summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
committerCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
commitb5e14a1344528861a7016aa2c6b0f2e9630d1526 (patch)
treef04bed14f7e8aed5c0e9d2f7785175c7951036d3
parent2b45e011ca352ce509bc83ae148230aeee0c7e0d (diff)
downloadsrc-test2-b5e14a1344528861a7016aa2c6b0f2e9630d1526.tar.gz
src-test2-b5e14a1344528861a7016aa2c6b0f2e9630d1526.zip
Vendor import ntp 4.2.8.vendor/ntp/4.2.8
Reviewed by: roberto Security: VUXML: 4033d826-87dd-11e4-9079-3c970e169bc2 Security: http://www.kb.cert.org/vuls/id/852879 Security: CVE-2014-9293 Security CVE-2014-9294 Security CVE-2014-9295 Security CVE-2014-9296
Notes
Notes: svn path=/vendor/ntp/dist/; revision=275970 svn path=/vendor/ntp/4.2.8/; revision=275971; tag=vendor/ntp/4.2.8
-rw-r--r--COPYRIGHT140
-rw-r--r--ChangeLog2084
-rw-r--r--CommitLog118559
-rw-r--r--FREEBSD-Xlist3
-rw-r--r--FREEBSD-upgrade64
-rw-r--r--Makefile.am127
-rw-r--r--Makefile.in303
-rw-r--r--NEWS184
-rw-r--r--WHERE-TO-START3
-rw-r--r--aclocal.m4203
-rw-r--r--adjtimed/Makefile.am28
-rw-r--r--adjtimed/Makefile.in361
-rw-r--r--bincheck.mf16
-rwxr-xr-xbootstrap90
-rwxr-xr-xbuild39
-rw-r--r--check-libopts.mf14
-rw-r--r--clockstuff/Makefile.am27
-rw-r--r--clockstuff/Makefile.in282
-rw-r--r--clockstuff/README18
-rw-r--r--clockstuff/chutest.c87
-rw-r--r--clockstuff/clktest.c412
-rw-r--r--clockstuff/propdelay.c6
-rw-r--r--config.h.in579
-rwxr-xr-xconfigure22458
-rw-r--r--configure.ac2942
-rw-r--r--deps-ver2
-rw-r--r--depsver.mf17
-rw-r--r--excludes1
-rwxr-xr-xflock-build15
-rw-r--r--html/access.html50
-rw-r--r--html/accopt.html243
-rw-r--r--html/assoc.html173
-rw-r--r--html/audio.html357
-rw-r--r--html/authentic.html65
-rw-r--r--html/authopt.html538
-rw-r--r--html/autokey.html215
-rw-r--r--html/bugs.html55
-rw-r--r--html/build.html112
-rw-r--r--html/clock.html65
-rw-r--r--html/clockopt.html122
-rw-r--r--html/cluster.html32
-rw-r--r--html/comdex.html55
-rw-r--r--html/config.html7
-rw-r--r--html/confopt.html199
-rw-r--r--html/copyright.html162
-rw-r--r--html/debug.html185
-rw-r--r--html/decode.html1433
-rw-r--r--html/discipline.html49
-rw-r--r--html/discover.html75
-rw-r--r--html/drivers/driver1.html96
-rw-r--r--html/drivers/driver10.html102
-rw-r--r--html/drivers/driver11.html120
-rw-r--r--html/drivers/driver12.html94
-rw-r--r--html/drivers/driver16.html53
-rw-r--r--html/drivers/driver18.html160
-rw-r--r--html/drivers/driver19.html106
-rw-r--r--html/drivers/driver2.html67
-rw-r--r--html/drivers/driver20.html533
-rw-r--r--html/drivers/driver22.html175
-rw-r--r--html/drivers/driver26.html3
-rw-r--r--html/drivers/driver27.html5
-rw-r--r--html/drivers/driver28.html84
-rw-r--r--html/drivers/driver29.html5
-rw-r--r--html/drivers/driver3.html104
-rw-r--r--html/drivers/driver30.html5
-rw-r--r--html/drivers/driver31.html5
-rw-r--r--html/drivers/driver32.html6
-rw-r--r--html/drivers/driver33.html7
-rw-r--r--html/drivers/driver34.html3
-rw-r--r--html/drivers/driver35.html5
-rw-r--r--html/drivers/driver36.html293
-rw-r--r--html/drivers/driver37.html5
-rw-r--r--html/drivers/driver38.html8
-rw-r--r--html/drivers/driver39.html6
-rw-r--r--html/drivers/driver4.html110
-rw-r--r--html/drivers/driver40.html121
-rw-r--r--html/drivers/driver42.html5
-rw-r--r--html/drivers/driver43.html5
-rwxr-xr-xhtml/drivers/driver44.html5
-rw-r--r--html/drivers/driver45.html32
-rw-r--r--html/drivers/driver46.html184
-rw-r--r--html/drivers/driver5.html143
-rw-r--r--html/drivers/driver6.html152
-rw-r--r--html/drivers/driver7.html253
-rw-r--r--html/drivers/driver8.html566
-rw-r--r--html/drivers/driver9.html5
-rw-r--r--html/drivers/mx4200data.html5
-rw-r--r--html/drivers/oncore-shmem.html5
-rw-r--r--html/drivers/scripts/footer.txt10
-rw-r--r--html/drivers/scripts/style.css2
-rw-r--r--html/drivers/tf582_4.html5
-rw-r--r--html/extern.html94
-rw-r--r--html/filter.html34
-rw-r--r--html/gadget.html42
-rw-r--r--html/hints.html42
-rw-r--r--html/hints/sco.html5
-rw-r--r--html/hints/solaris.html96
-rw-r--r--html/hints/vxworks.html5
-rw-r--r--html/hints/winnt.html125
-rw-r--r--html/history.html74
-rw-r--r--html/howto.html220
-rw-r--r--html/huffpuff.html31
-rw-r--r--html/icons/sitemap.pngbin0 -> 2825 bytes
-rw-r--r--html/index.html159
-rw-r--r--html/kern.html61
-rw-r--r--html/kernpps.html93
-rw-r--r--html/keygen.html281
-rw-r--r--html/leap.html24
-rw-r--r--html/manyopt.html66
-rw-r--r--html/miscopt.html307
-rw-r--r--html/monopt.html1021
-rw-r--r--html/msyslog.html250
-rw-r--r--html/ntp-wait.html3
-rw-r--r--html/ntp_conf.html342
-rw-r--r--html/ntpd.html403
-rw-r--r--html/ntpdate.html147
-rw-r--r--html/ntpdc.html390
-rw-r--r--html/ntpdsim.html124
-rw-r--r--html/ntpdsim_new.html159
-rw-r--r--html/ntpq.html1238
-rw-r--r--html/ntptime.html90
-rw-r--r--html/ntptrace.html68
-rw-r--r--html/orphan.html42
-rw-r--r--html/parsedata.html5
-rw-r--r--html/parsenew.html7
-rw-r--r--html/pic/9400n.jpgbin0 -> 5736 bytes
-rw-r--r--html/pic/alice11.gifbin0 -> 18003 bytes
-rw-r--r--html/pic/alice13.gifbin0 -> 11516 bytes
-rw-r--r--html/pic/alice15.gifbin0 -> 26328 bytes
-rw-r--r--html/pic/alice23.gifbin0 -> 7753 bytes
-rw-r--r--html/pic/alice31.gifbin0 -> 13824 bytes
-rw-r--r--html/pic/alice32.gifbin0 -> 17168 bytes
-rw-r--r--html/pic/alice35.gifbin0 -> 8968 bytes
-rw-r--r--html/pic/alice38.gifbin0 -> 10296 bytes
-rw-r--r--html/pic/alice44.gifbin0 -> 19897 bytes
-rw-r--r--html/pic/alice47.gifbin0 -> 10771 bytes
-rw-r--r--html/pic/alice51.gifbin0 -> 12403 bytes
-rw-r--r--html/pic/alice61.gifbin0 -> 11269 bytes
-rw-r--r--html/pic/barnstable.gifbin0 -> 2946 bytes
-rw-r--r--html/pic/beaver.gifbin0 -> 2831 bytes
-rw-r--r--html/pic/boom3.gifbin0 -> 11042 bytes
-rw-r--r--html/pic/boom3a.gifbin0 -> 18300 bytes
-rw-r--r--html/pic/boom4.gifbin0 -> 16157 bytes
-rw-r--r--html/pic/broad.gifbin0 -> 5728 bytes
-rw-r--r--html/pic/bustardfly.gifbin0 -> 8476 bytes
-rw-r--r--html/pic/c51.jpgbin0 -> 16429 bytes
-rw-r--r--html/pic/description.jpg (renamed from html/description_files/description.jpg)bin34170 -> 34170 bytes
-rw-r--r--html/pic/discipline.gifbin0 -> 6836 bytes
-rw-r--r--html/pic/dogsnake.gifbin0 -> 5445 bytes
-rw-r--r--html/pic/driver29.gifbin0 -> 11723 bytes
-rw-r--r--html/pic/driver43_1.gifbin0 -> 38818 bytes
-rw-r--r--html/pic/driver43_2.jpgbin0 -> 6576 bytes
-rw-r--r--html/pic/fg6021.gifbin0 -> 21593 bytes
-rw-r--r--html/pic/fg6039.jpgbin0 -> 7383 bytes
-rw-r--r--html/pic/fig_3_1.gifbin0 -> 10428 bytes
-rw-r--r--html/pic/flatheads.gifbin0 -> 13085 bytes
-rw-r--r--html/pic/flt1.gifbin0 -> 9045 bytes
-rw-r--r--html/pic/flt2.gifbin0 -> 3148 bytes
-rw-r--r--html/pic/flt3.gifbin0 -> 1847 bytes
-rw-r--r--html/pic/flt4.gifbin0 -> 3876 bytes
-rw-r--r--html/pic/flt5.gifbin0 -> 10609 bytes
-rw-r--r--html/pic/flt6.gifbin0 -> 15563 bytes
-rw-r--r--html/pic/flt7.gifbin0 -> 7848 bytes
-rw-r--r--html/pic/flt8.gifbin0 -> 5969 bytes
-rw-r--r--html/pic/flt9.gifbin0 -> 8948 bytes
-rw-r--r--html/pic/freq1211.gifbin0 -> 11428 bytes
-rw-r--r--html/pic/gadget.jpgbin0 -> 26341 bytes
-rw-r--r--html/pic/gps167.jpgbin0 -> 15589 bytes
-rw-r--r--html/pic/group.gifbin0 -> 2756 bytes
-rw-r--r--html/pic/hornraba.gifbin0 -> 8790 bytes
-rw-r--r--html/pic/igclock.gifbin0 -> 8985 bytes
-rwxr-xr-xhtml/pic/neoclock4x.gifbin0 -> 14977 bytes
-rw-r--r--html/pic/offset1211.gifbin0 -> 25493 bytes
-rw-r--r--html/pic/oncore_evalbig.gifbin0 -> 7904 bytes
-rw-r--r--html/pic/oncore_remoteant.jpgbin0 -> 4828 bytes
-rw-r--r--html/pic/oncore_utplusbig.gifbin0 -> 10117 bytes
-rw-r--r--html/pic/oz2.gifbin0 -> 8225 bytes
-rw-r--r--html/pic/panda.gifbin0 -> 1660 bytes
-rw-r--r--html/pic/pd_om006.gifbin0 -> 16704 bytes
-rw-r--r--html/pic/pd_om011.gifbin0 -> 12848 bytes
-rw-r--r--html/pic/peer.gifbin0 -> 4936 bytes
-rw-r--r--html/pic/pogo.gifbin0 -> 1918 bytes
-rw-r--r--html/pic/pogo1a.gifbin0 -> 18769 bytes
-rw-r--r--html/pic/pogo3a.gifbin0 -> 3657 bytes
-rw-r--r--html/pic/pogo4.gifbin0 -> 3213 bytes
-rw-r--r--html/pic/pogo5.gifbin0 -> 5819 bytes
-rw-r--r--html/pic/pogo6.gifbin0 -> 5902 bytes
-rw-r--r--html/pic/pogo7.gifbin0 -> 13817 bytes
-rw-r--r--html/pic/pogo8.gifbin0 -> 7820 bytes
-rw-r--r--html/pic/pzf509.jpgbin0 -> 13011 bytes
-rw-r--r--html/pic/pzf511.jpgbin0 -> 20370 bytes
-rw-r--r--html/pic/rabbit.gifbin0 -> 3342 bytes
-rw-r--r--html/pic/radio2.jpgbin0 -> 17006 bytes
-rw-r--r--html/pic/sheepb.jpgbin0 -> 20295 bytes
-rw-r--r--html/pic/stack1a.jpgbin0 -> 29655 bytes
-rw-r--r--html/pic/stats.gifbin0 -> 12168 bytes
-rw-r--r--html/pic/sx5.gifbin0 -> 20470 bytes
-rw-r--r--html/pic/thunderbolt.jpgbin0 -> 38718 bytes
-rw-r--r--html/pic/time1.gifbin0 -> 4507 bytes
-rw-r--r--html/pic/tonea.gifbin0 -> 12002 bytes
-rw-r--r--html/pic/tribeb.gifbin0 -> 30287 bytes
-rw-r--r--html/pic/wingdorothy.gifbin0 -> 10849 bytes
-rw-r--r--html/poll.html26
-rw-r--r--html/pps.html92
-rw-r--r--html/prefer.html196
-rw-r--r--html/quick.html87
-rw-r--r--html/rate.html133
-rw-r--r--html/rdebug.html56
-rw-r--r--html/refclock.html179
-rw-r--r--html/release.html129
-rw-r--r--html/scripts/accopt.txt10
-rw-r--r--html/scripts/audio.txt12
-rw-r--r--html/scripts/authopt.txt22
-rw-r--r--html/scripts/clockopt.txt8
-rw-r--r--html/scripts/command.txt18
-rw-r--r--html/scripts/config.txt12
-rw-r--r--html/scripts/confopt.txt24
-rw-r--r--html/scripts/external.txt34
-rw-r--r--html/scripts/footer.txt10
-rw-r--r--html/scripts/hand.txt11
-rw-r--r--html/scripts/install.txt22
-rw-r--r--html/scripts/manual.txt26
-rw-r--r--html/scripts/misc.txt18
-rw-r--r--html/scripts/miscopt.txt40
-rw-r--r--html/scripts/monopt.txt11
-rw-r--r--html/scripts/refclock.txt14
-rw-r--r--html/scripts/special.txt17
-rw-r--r--html/scripts/style.css2
-rw-r--r--html/select.html41
-rw-r--r--html/sitemap.html65
-rw-r--r--html/sntp.html131
-rw-r--r--html/stats.html70
-rw-r--r--html/tickadj.html89
-rw-r--r--html/warp.html60
-rw-r--r--html/xleave.html66
-rw-r--r--include/Makefile.am15
-rw-r--r--include/Makefile.in181
-rw-r--r--include/autogen-version.def2
-rw-r--r--include/copyright.def24
-rw-r--r--include/debug-opt.def32
-rw-r--r--include/declcond.h21
-rw-r--r--include/intreswork.h29
-rw-r--r--include/iosignal.h55
-rw-r--r--include/isc/Makefile.am2
-rw-r--r--include/isc/Makefile.in168
-rw-r--r--include/isc/mem.h6
-rw-r--r--include/l_stdlib.h22
-rw-r--r--include/lib_strbuf.h32
-rw-r--r--include/libntp.h16
-rw-r--r--include/mbg_gps166.h4
-rw-r--r--include/ntp.h195
-rw-r--r--include/ntp_assert.h21
-rw-r--r--include/ntp_calendar.h372
-rw-r--r--include/ntp_cmdargs.h5
-rw-r--r--include/ntp_config.h377
-rw-r--r--include/ntp_control.h145
-rw-r--r--include/ntp_crypto.h27
-rw-r--r--include/ntp_data_structures.h53
-rw-r--r--include/ntp_debug.h25
-rw-r--r--include/ntp_filegen.h34
-rw-r--r--include/ntp_fp.h377
-rw-r--r--include/ntp_intres.h47
-rw-r--r--include/ntp_io.h24
-rw-r--r--include/ntp_libopts.h1
-rw-r--r--include/ntp_machine.h255
-rw-r--r--include/ntp_md5.h37
-rw-r--r--include/ntp_net.h7
-rw-r--r--include/ntp_prio_q.h83
-rw-r--r--include/ntp_proto.h10
-rw-r--r--include/ntp_random.h3
-rw-r--r--include/ntp_refclock.h101
-rw-r--r--include/ntp_request.h77
-rw-r--r--include/ntp_rfc2553.h27
-rw-r--r--include/ntp_select.h37
-rw-r--r--include/ntp_sprintf.h13
-rw-r--r--include/ntp_stdlib.h146
-rw-r--r--include/ntp_string.h26
-rw-r--r--include/ntp_syscall.h58
-rw-r--r--include/ntp_syslog.h33
-rw-r--r--include/ntp_tty.h70
-rw-r--r--include/ntp_types.h208
-rw-r--r--include/ntp_unixtime.h113
-rw-r--r--include/ntp_worker.h162
-rw-r--r--include/ntp_workimpl.h30
-rw-r--r--include/ntpd.h318
-rw-r--r--include/ntpsim.h77
-rw-r--r--include/recvbuff.h83
-rw-r--r--include/refclock_atom.h2
-rw-r--r--include/timepps-SCO.h2
-rw-r--r--include/timepps-Solaris.h2
-rw-r--r--include/timepps-SunOS.h2
-rw-r--r--include/timespecops.h393
-rw-r--r--include/timetoa.h83
-rw-r--r--include/timevalops.h446
-rw-r--r--include/version.def1
-rw-r--r--include/version.texi3
-rw-r--r--include/vint64ops.h28
-rw-r--r--includes.mf6
-rw-r--r--kernel/Makefile.am4
-rw-r--r--kernel/Makefile.in173
-rw-r--r--kernel/README200
-rw-r--r--kernel/chuinit.c74
-rw-r--r--kernel/clkinit.c74
-rw-r--r--kernel/sys/Makefile.am8
-rw-r--r--kernel/sys/Makefile.in175
-rw-r--r--kernel/sys/chudefs.h22
-rw-r--r--kernel/sys/clkdefs.h38
-rw-r--r--kernel/tty_chu.c276
-rw-r--r--kernel/tty_chu_STREAMS.c603
-rw-r--r--kernel/tty_clk.c317
-rw-r--r--kernel/tty_clk_STREAMS.c266
-rw-r--r--lib/isc/Atffile5
-rw-r--r--lib/isc/alpha/include/isc/atomic.h4
-rw-r--r--lib/isc/api7
-rw-r--r--lib/isc/app_api.c136
-rw-r--r--lib/isc/assertions.c64
-rw-r--r--lib/isc/backtrace-emptytbl.c34
-rw-r--r--lib/isc/backtrace.c285
-rw-r--r--lib/isc/base32.c4
-rw-r--r--lib/isc/base64.c8
-rw-r--r--lib/isc/entropy.c11
-rw-r--r--lib/isc/hash.c20
-rw-r--r--lib/isc/heap.c19
-rw-r--r--lib/isc/hmacmd5.c35
-rw-r--r--lib/isc/hmacsha.c284
-rw-r--r--lib/isc/httpd.c75
-rw-r--r--lib/isc/ia64/include/isc/atomic.h8
-rw-r--r--lib/isc/include/isc/app.h173
-rw-r--r--lib/isc/include/isc/assertions.h8
-rw-r--r--lib/isc/include/isc/backtrace.h131
-rw-r--r--lib/isc/include/isc/bind9.h30
-rw-r--r--lib/isc/include/isc/buffer.h4
-rw-r--r--lib/isc/include/isc/entropy.h14
-rw-r--r--lib/isc/include/isc/error.h9
-rw-r--r--lib/isc/include/isc/file.h56
-rw-r--r--lib/isc/include/isc/fsaccess.h2
-rw-r--r--lib/isc/include/isc/hash.h2
-rw-r--r--lib/isc/include/isc/heap.h2
-rw-r--r--lib/isc/include/isc/hmacmd5.h13
-rw-r--r--lib/isc/include/isc/hmacsha.h17
-rw-r--r--lib/isc/include/isc/lib.h13
-rw-r--r--lib/isc/include/isc/list.h17
-rw-r--r--lib/isc/include/isc/log.h2
-rw-r--r--lib/isc/include/isc/md5.h14
-rw-r--r--lib/isc/include/isc/mem.h175
-rw-r--r--lib/isc/include/isc/msgs.h6
-rw-r--r--lib/isc/include/isc/namespace.h171
-rw-r--r--lib/isc/include/isc/netaddr.h2
-rw-r--r--lib/isc/include/isc/netscope.h6
-rw-r--r--lib/isc/include/isc/platform.h.in32
-rw-r--r--lib/isc/include/isc/portset.h4
-rw-r--r--lib/isc/include/isc/queue.h100
-rw-r--r--lib/isc/include/isc/radix.h2
-rw-r--r--lib/isc/include/isc/random.h2
-rw-r--r--lib/isc/include/isc/ratelimiter.h2
-rw-r--r--lib/isc/include/isc/refcount.h12
-rw-r--r--lib/isc/include/isc/result.h8
-rw-r--r--lib/isc/include/isc/resultclass.h5
-rw-r--r--lib/isc/include/isc/serial.h2
-rw-r--r--lib/isc/include/isc/sha1.h13
-rw-r--r--lib/isc/include/isc/sha2.h25
-rw-r--r--lib/isc/include/isc/sockaddr.h2
-rw-r--r--lib/isc/include/isc/socket.h165
-rw-r--r--lib/isc/include/isc/stats.h4
-rw-r--r--lib/isc/include/isc/symtab.h12
-rw-r--r--lib/isc/include/isc/task.h180
-rw-r--r--lib/isc/include/isc/taskpool.h64
-rw-r--r--lib/isc/include/isc/timer.h93
-rw-r--r--lib/isc/include/isc/types.h11
-rw-r--r--lib/isc/include/isc/util.h11
-rw-r--r--lib/isc/inet_aton.c4
-rw-r--r--lib/isc/inet_ntop.c26
-rw-r--r--lib/isc/inet_pton.c1
-rw-r--r--lib/isc/iterated_hash.c2
-rw-r--r--lib/isc/lib.c34
-rw-r--r--lib/isc/log.c16
-rw-r--r--lib/isc/md5.c30
-rw-r--r--lib/isc/mem.c616
-rw-r--r--lib/isc/mem_api.c303
-rw-r--r--lib/isc/mutexblock.c9
-rw-r--r--lib/isc/netaddr.c33
-rw-r--r--lib/isc/powerpc/include/isc/atomic.h71
-rw-r--r--lib/isc/print.c6
-rw-r--r--lib/isc/pthreads/mutex.c32
-rw-r--r--lib/isc/radix.c6
-rw-r--r--lib/isc/random.c29
-rw-r--r--lib/isc/result.c31
-rw-r--r--lib/isc/rwlock.c5
-rw-r--r--lib/isc/sha1.c43
-rw-r--r--lib/isc/sha2.c457
-rw-r--r--lib/isc/sockaddr.c13
-rw-r--r--lib/isc/socket_api.c231
-rw-r--r--lib/isc/sparc64/include/isc/atomic.h2
-rw-r--r--lib/isc/stats.c4
-rw-r--r--lib/isc/string.c11
-rw-r--r--lib/isc/symtab.c53
-rw-r--r--lib/isc/task.c799
-rw-r--r--lib/isc/task_api.c244
-rw-r--r--lib/isc/task_p.h16
-rw-r--r--lib/isc/taskpool.c117
-rw-r--r--lib/isc/tests/Atffile5
-rw-r--r--lib/isc/tests/hash_test.c1805
-rw-r--r--lib/isc/tests/isctest.c178
-rw-r--r--lib/isc/tests/isctest.h57
-rw-r--r--lib/isc/tests/queue_test.c144
-rw-r--r--lib/isc/tests/socket_test.c255
-rw-r--r--lib/isc/tests/symtab_test.c147
-rw-r--r--lib/isc/tests/task_test.c416
-rw-r--r--lib/isc/tests/taskpool_test.c211
-rw-r--r--lib/isc/timer.c353
-rw-r--r--lib/isc/timer_api.c144
-rw-r--r--lib/isc/timer_p.h8
-rw-r--r--lib/isc/unix/app.c540
-rw-r--r--lib/isc/unix/dir.c21
-rw-r--r--lib/isc/unix/entropy.c4
-rw-r--r--lib/isc/unix/errno2result.c11
-rw-r--r--lib/isc/unix/errno2result.h8
-rw-r--r--lib/isc/unix/file.c134
-rw-r--r--lib/isc/unix/ifiter_getifaddrs.c34
-rw-r--r--lib/isc/unix/ifiter_ioctl.c43
-rw-r--r--lib/isc/unix/ifiter_sysctl.c13
-rw-r--r--lib/isc/unix/include/isc/net.h4
-rw-r--r--lib/isc/unix/include/isc/offset.h4
-rw-r--r--lib/isc/unix/include/isc/stdtime.h8
-rw-r--r--lib/isc/unix/include/isc/strerror.h4
-rw-r--r--lib/isc/unix/include/isc/time.h2
-rw-r--r--lib/isc/unix/interfaceiter.c35
-rw-r--r--lib/isc/unix/net.c7
-rw-r--r--lib/isc/unix/resource.c2
-rw-r--r--lib/isc/unix/socket.c1239
-rw-r--r--lib/isc/unix/socket_p.h9
-rw-r--r--lib/isc/unix/stdio.c18
-rw-r--r--lib/isc/unix/strerror.c2
-rw-r--r--lib/isc/unix/time.c30
-rw-r--r--lib/isc/win32/app.c22
-rw-r--r--lib/isc/win32/dir.c6
-rw-r--r--lib/isc/win32/entropy.c2
-rw-r--r--lib/isc/win32/file.c140
-rw-r--r--lib/isc/win32/include/isc/ipv6.h4
-rw-r--r--lib/isc/win32/include/isc/mutex.h2
-rw-r--r--lib/isc/win32/include/isc/net.h4
-rw-r--r--lib/isc/win32/include/isc/ntpaths.h9
-rw-r--r--lib/isc/win32/include/isc/platform.h10
-rw-r--r--lib/isc/win32/include/isc/stat.h23
-rw-r--r--lib/isc/win32/include/isc/stdtime.h8
-rw-r--r--lib/isc/win32/include/isc/thread.h12
-rw-r--r--lib/isc/win32/include/isc/time.h2
-rw-r--r--lib/isc/win32/include/isc/win32os.h6
-rw-r--r--lib/isc/win32/interfaceiter.c10
-rw-r--r--lib/isc/win32/libgen.h25
-rw-r--r--lib/isc/win32/libisc.def266
-rw-r--r--lib/isc/win32/libisc.dsp26
-rw-r--r--lib/isc/win32/libisc.mak57
-rw-r--r--lib/isc/win32/net.c10
-rw-r--r--lib/isc/win32/netdb.h2
-rw-r--r--lib/isc/win32/ntgroups.c46
-rw-r--r--lib/isc/win32/ntpaths.c15
-rw-r--r--lib/isc/win32/socket.c483
-rw-r--r--lib/isc/win32/time.c63
-rw-r--r--lib/isc/win32/unistd.h11
-rw-r--r--libjsmn/LICENSE20
-rw-r--r--libjsmn/Makefile27
-rw-r--r--libjsmn/README.md161
-rw-r--r--libjsmn/jsmn.c268
-rw-r--r--libjsmn/jsmn.h67
-rw-r--r--libjsmn/jsmn_test.c409
-rw-r--r--libntp/Makefile.am109
-rw-r--r--libntp/Makefile.in871
-rw-r--r--libntp/a_md5encrypt.c47
-rw-r--r--libntp/atoint.c1
-rw-r--r--libntp/atolfp.c1
-rw-r--r--libntp/atouint.c31
-rw-r--r--libntp/audio.c17
-rw-r--r--libntp/authkeys.c663
-rw-r--r--libntp/authreadkeys.c33
-rw-r--r--libntp/authusekey.c9
-rw-r--r--libntp/bsd_strerror.c7
-rw-r--r--libntp/buftvtots.c29
-rw-r--r--libntp/caljulian.c186
-rw-r--r--libntp/caltontp.c77
-rw-r--r--libntp/calyearstart.c110
-rw-r--r--libntp/clocktime.c211
-rw-r--r--libntp/clocktypes.c5
-rw-r--r--libntp/decodenetnum.c4
-rw-r--r--libntp/dofptoa.c43
-rw-r--r--libntp/dolfptoa.c207
-rw-r--r--libntp/findconfig.c6
-rw-r--r--libntp/fptoa.c25
-rw-r--r--libntp/fptoms.c24
-rw-r--r--libntp/getopt.c1
-rw-r--r--libntp/hextoint.c1
-rw-r--r--libntp/hextolfp.c1
-rw-r--r--libntp/humandate.c30
-rw-r--r--libntp/inttoa.c21
-rw-r--r--libntp/iosignal.c75
-rw-r--r--libntp/lib_strbuf.c21
-rw-r--r--libntp/machines.c57
-rw-r--r--libntp/memmove.c140
-rw-r--r--libntp/mfptoa.c23
-rw-r--r--libntp/mfptoms.c23
-rw-r--r--libntp/mktime.c5
-rw-r--r--libntp/modetoa.c3
-rw-r--r--libntp/mstolfp.c1
-rw-r--r--libntp/msutotsf.c35
-rw-r--r--libntp/msyslog.c381
-rw-r--r--libntp/netof.c3
-rw-r--r--libntp/ntp_calendar.c1615
-rw-r--r--libntp/ntp_crypto_rnd.c96
-rw-r--r--libntp/ntp_intres.c1143
-rw-r--r--libntp/ntp_libopts.c52
-rw-r--r--libntp/ntp_lineedit.c5
-rw-r--r--libntp/ntp_random.c58
-rw-r--r--libntp/ntp_rfc2553.c161
-rw-r--r--libntp/ntp_worker.c340
-rw-r--r--libntp/numtoa.c26
-rw-r--r--libntp/numtohost.c5
-rw-r--r--libntp/octtoint.c1
-rw-r--r--libntp/prettydate.c277
-rw-r--r--libntp/recvbuff.c150
-rw-r--r--libntp/refnumtoa.c34
-rw-r--r--libntp/snprintf.c2158
-rw-r--r--libntp/socket.c218
-rw-r--r--libntp/socktoa.c142
-rw-r--r--libntp/socktohost.c89
-rw-r--r--libntp/ssl_init.c30
-rw-r--r--libntp/statestr.c354
-rw-r--r--libntp/strl_obsd.c123
-rw-r--r--libntp/strstr.c52
-rw-r--r--libntp/syssignal.c159
-rw-r--r--libntp/systime.c488
-rw-r--r--libntp/timetoa.c109
-rw-r--r--libntp/timevalops.c297
-rw-r--r--libntp/tsftomsu.c38
-rw-r--r--libntp/tstotv.c135
-rw-r--r--libntp/tvtots.c159
-rw-r--r--libntp/uglydate.c1
-rw-r--r--libntp/uinttoa.c20
-rw-r--r--libntp/vint64ops.c284
-rw-r--r--libntp/work_fork.c526
-rw-r--r--libntp/work_thread.c726
-rw-r--r--libntp/ymd2yd.c39
-rw-r--r--libparse/Makefile.am115
-rw-r--r--libparse/Makefile.in378
-rw-r--r--libparse/binio.c5
-rw-r--r--libparse/clk_rawdcf.c4
-rw-r--r--libparse/clk_sel240x.c178
-rw-r--r--libparse/clk_trimtsip.c2
-rw-r--r--libparse/clk_wharton.c2
-rw-r--r--libparse/data_mbg.c7
-rw-r--r--libparse/gpstolfp.c1
-rw-r--r--libparse/ieee754io.c44
-rw-r--r--libparse/mfp_mul.c1
-rw-r--r--libparse/mkinfo_rcmd.sed8
-rw-r--r--libparse/mkinfo_scmd.sed11
-rw-r--r--libparse/parse.c8
-rw-r--r--libparse/parse_conf.c7
-rw-r--r--libparse/parsesolaris.c14
-rw-r--r--libparse/trim_info.c1
-rw-r--r--m4/define_dir.m426
-rw-r--r--m4/ntp_openssl.m4283
-rw-r--r--m4/ntp_vpathhack.m429
-rw-r--r--ntpd/Makefile.am312
-rw-r--r--ntpd/Makefile.in1009
-rw-r--r--ntpd/check_y2k.c1
-rw-r--r--ntpd/cmd_args.c63
-rw-r--r--ntpd/complete.conf.in (renamed from ntpd/complete.conf)33
-rw-r--r--ntpd/declcond.h21
-rw-r--r--ntpd/invoke-ntp.conf.menu1
-rw-r--r--ntpd/invoke-ntp.conf.texi2634
-rw-r--r--ntpd/invoke-ntp.keys.menu1
-rw-r--r--ntpd/invoke-ntp.keys.texi125
-rw-r--r--ntpd/invoke-ntpd.menu (renamed from ntpd/ntpd-opts.menu)0
-rw-r--r--ntpd/invoke-ntpd.texi (renamed from ntpd/ntpd-opts.texi)734
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c221
-rw-r--r--ntpd/ntp.conf.5man3004
-rw-r--r--ntpd/ntp.conf.5mdoc2808
-rw-r--r--ntpd/ntp.conf.def2795
-rw-r--r--ntpd/ntp.conf.html2625
-rw-r--r--ntpd/ntp.conf.man.in3004
-rw-r--r--ntpd/ntp.conf.mdoc.in2808
-rw-r--r--ntpd/ntp.conf.texi49
-rw-r--r--ntpd/ntp.keys.5man173
-rw-r--r--ntpd/ntp.keys.5mdoc158
-rw-r--r--ntpd/ntp.keys.def152
-rw-r--r--ntpd/ntp.keys.html200
-rw-r--r--ntpd/ntp.keys.man.in173
-rw-r--r--ntpd/ntp.keys.mdoc.in158
-rw-r--r--ntpd/ntp.keys.texi49
-rw-r--r--ntpd/ntp_config.c4357
-rw-r--r--ntpd/ntp_control.c3775
-rw-r--r--ntpd/ntp_crypto.c512
-rw-r--r--ntpd/ntp_data_structures.c199
-rw-r--r--ntpd/ntp_filegen.c353
-rw-r--r--ntpd/ntp_intres.c1301
-rw-r--r--ntpd/ntp_io.c1636
-rw-r--r--ntpd/ntp_keyword.h1901
-rw-r--r--ntpd/ntp_leapsec.c1009
-rw-r--r--ntpd/ntp_leapsec.h218
-rw-r--r--ntpd/ntp_loopfilter.c627
-rw-r--r--ntpd/ntp_monitor.c578
-rw-r--r--ntpd/ntp_parser.c4436
-rw-r--r--ntpd/ntp_parser.h770
-rw-r--r--ntpd/ntp_parser.y847
-rw-r--r--ntpd/ntp_peer.c712
-rw-r--r--ntpd/ntp_prio_q.c238
-rw-r--r--ntpd/ntp_proto.c1589
-rw-r--r--ntpd/ntp_refclock.c418
-rw-r--r--ntpd/ntp_request.c1205
-rw-r--r--ntpd/ntp_restrict.c87
-rw-r--r--ntpd/ntp_scanner.c224
-rw-r--r--ntpd/ntp_scanner.h10
-rw-r--r--ntpd/ntp_signd.c10
-rw-r--r--ntpd/ntp_timer.c501
-rw-r--r--ntpd/ntp_util.c688
-rw-r--r--ntpd/ntpd-opts.c1918
-rw-r--r--ntpd/ntpd-opts.def606
-rw-r--r--ntpd/ntpd-opts.h148
-rw-r--r--ntpd/ntpd.1339
-rw-r--r--ntpd/ntpd.1ntpdman987
-rw-r--r--ntpd/ntpd.1ntpdmdoc891
-rw-r--r--ntpd/ntpd.c1286
-rw-r--r--ntpd/ntpd.html995
-rw-r--r--ntpd/ntpd.man.in987
-rw-r--r--ntpd/ntpd.mdoc.in891
-rw-r--r--ntpd/ntpd.texi113
-rw-r--r--ntpd/ntpdbase-opts.def160
-rw-r--r--ntpd/ntpsim.c359
-rw-r--r--ntpd/refclock_acts.c891
-rw-r--r--ntpd/refclock_arbiter.c41
-rw-r--r--ntpd/refclock_arc.c29
-rw-r--r--ntpd/refclock_as2201.c35
-rw-r--r--ntpd/refclock_atom.c6
-rw-r--r--ntpd/refclock_bancomm.c19
-rw-r--r--ntpd/refclock_chronolog.c20
-rw-r--r--ntpd/refclock_chu.c61
-rw-r--r--ntpd/refclock_conf.c21
-rw-r--r--ntpd/refclock_datum.c201
-rw-r--r--ntpd/refclock_dumbclock.c17
-rw-r--r--ntpd/refclock_fg.c226
-rw-r--r--ntpd/refclock_gpsdjson.c1341
-rw-r--r--ntpd/refclock_gpsvme.c6
-rw-r--r--ntpd/refclock_heath.c13
-rw-r--r--ntpd/refclock_hopfpci.c11
-rw-r--r--ntpd/refclock_hopfser.c37
-rw-r--r--ntpd/refclock_hpgps.c35
-rw-r--r--ntpd/refclock_irig.c31
-rw-r--r--ntpd/refclock_jjy.c474
-rw-r--r--ntpd/refclock_jupiter.c100
-rw-r--r--ntpd/refclock_leitch.c62
-rw-r--r--ntpd/refclock_msfees.c47
-rw-r--r--ntpd/refclock_mx4200.c64
-rw-r--r--ntpd/refclock_neoclock4x.c58
-rw-r--r--ntpd/refclock_nmea.c2198
-rw-r--r--ntpd/refclock_oncore.c813
-rw-r--r--ntpd/refclock_palisade.c153
-rw-r--r--ntpd/refclock_palisade.h20
-rw-r--r--ntpd/refclock_parse.c416
-rw-r--r--ntpd/refclock_pcf.c7
-rw-r--r--ntpd/refclock_pst.c22
-rw-r--r--ntpd/refclock_ripencc.c40
-rw-r--r--ntpd/refclock_shm.c462
-rw-r--r--ntpd/refclock_tpro.c17
-rw-r--r--ntpd/refclock_trak.c358
-rw-r--r--ntpd/refclock_true.c392
-rw-r--r--ntpd/refclock_tsyncpci.c912
-rw-r--r--ntpd/refclock_tt560.c16
-rw-r--r--ntpd/refclock_ulink.c67
-rw-r--r--ntpd/refclock_wwv.c155
-rw-r--r--ntpd/refclock_wwvb.c25
-rw-r--r--ntpd/refclock_zyfer.c59
-rw-r--r--ntpdate/Makefile.am49
-rw-r--r--ntpdate/Makefile.in396
-rw-r--r--ntpdate/ntpdate.c22
-rw-r--r--ntpdate/ntpdate.h9
-rw-r--r--ntpdate/ntptime_config.c552
-rw-r--r--ntpdate/ntptimeset.c2164
-rw-r--r--ntpdc/Makefile.am148
-rw-r--r--ntpdc/Makefile.in555
-rw-r--r--ntpdc/invoke-ntpdc.menu (renamed from ntpdc/ntpdc-opts.menu)0
-rw-r--r--ntpdc/invoke-ntpdc.texi349
-rw-r--r--ntpdc/layout.std20
-rwxr-xr-xntpdc/nl.pl10
-rw-r--r--ntpdc/nl.pl.in10
-rw-r--r--ntpdc/ntpdc-layout.c1
-rw-r--r--ntpdc/ntpdc-opts.c1231
-rw-r--r--ntpdc/ntpdc-opts.def771
-rw-r--r--ntpdc/ntpdc-opts.h174
-rw-r--r--ntpdc/ntpdc-opts.texi269
-rw-r--r--ntpdc/ntpdc.1161
-rw-r--r--ntpdc/ntpdc.1ntpdcman874
-rw-r--r--ntpdc/ntpdc.1ntpdcmdoc809
-rw-r--r--ntpdc/ntpdc.c232
-rw-r--r--ntpdc/ntpdc.h2
-rw-r--r--ntpdc/ntpdc.html515
-rw-r--r--ntpdc/ntpdc.man.in874
-rw-r--r--ntpdc/ntpdc.mdoc.in809
-rw-r--r--ntpdc/ntpdc.texi88
-rw-r--r--ntpdc/ntpdc_ops.c353
-rw-r--r--ntpq/Makefile.am136
-rw-r--r--ntpq/Makefile.in586
-rw-r--r--ntpq/invoke-ntpq.menu (renamed from ntpq/ntpq-opts.menu)0
-rw-r--r--ntpq/invoke-ntpq.texi1086
-rw-r--r--ntpq/libntpq.c9
-rw-r--r--ntpq/libntpq.h9
-rw-r--r--ntpq/libntpq_subs.c16
-rw-r--r--ntpq/ntpq-opts.c1188
-rw-r--r--ntpq/ntpq-opts.def1130
-rw-r--r--ntpq/ntpq-opts.h153
-rw-r--r--ntpq/ntpq-opts.texi229
-rw-r--r--ntpq/ntpq-subs.c2538
-rw-r--r--ntpq/ntpq.1399
-rw-r--r--ntpq/ntpq.1ntpqman1408
-rw-r--r--ntpq/ntpq.1ntpqmdoc954
-rw-r--r--ntpq/ntpq.c1240
-rw-r--r--ntpq/ntpq.h83
-rw-r--r--ntpq/ntpq.html1814
-rw-r--r--ntpq/ntpq.man.in1408
-rw-r--r--ntpq/ntpq.mdoc.in954
-rw-r--r--ntpq/ntpq.texi834
-rw-r--r--ntpsnmpd/Makefile.am125
-rw-r--r--ntpsnmpd/Makefile.in542
-rw-r--r--ntpsnmpd/invoke-ntpsnmpd.menu (renamed from ntpsnmpd/ntpsnmpd-opts.menu)0
-rw-r--r--ntpsnmpd/invoke-ntpsnmpd.texi188
-rw-r--r--ntpsnmpd/netsnmp_daemonize.c10
-rw-r--r--ntpsnmpd/ntpSnmpSubagentObject.c2
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.c874
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.def112
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.h112
-rw-r--r--ntpsnmpd/ntpsnmpd-opts.texi82
-rw-r--r--ntpsnmpd/ntpsnmpd.187
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdman203
-rw-r--r--ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc144
-rw-r--r--ntpsnmpd/ntpsnmpd.c2
-rw-r--r--ntpsnmpd/ntpsnmpd.html79
-rw-r--r--ntpsnmpd/ntpsnmpd.man.in203
-rw-r--r--ntpsnmpd/ntpsnmpd.mdoc.in144
-rw-r--r--ntpsnmpd/ntpsnmpd.texi53
-rw-r--r--packageinfo.sh22
-rw-r--r--parseutil/Makefile.am14
-rw-r--r--parseutil/Makefile.in248
-rw-r--r--parseutil/dcfd.c52
-rw-r--r--parseutil/testdcf.c1
-rw-r--r--ports/winnt/include/arpa/inet.h4
-rw-r--r--ports/winnt/include/clockstuff.h44
-rw-r--r--ports/winnt/include/config.h554
-rw-r--r--ports/winnt/include/gaa_compat.h771
-rw-r--r--ports/winnt/include/hopf_PCI_io.h91
-rw-r--r--ports/winnt/include/netdb.h4
-rw-r--r--ports/winnt/include/ntp_iocompletionport.h27
-rw-r--r--ports/winnt/include/ntp_timer.h6
-rw-r--r--ports/winnt/include/ntservice.h31
-rw-r--r--ports/winnt/include/stdint.h244
-rw-r--r--ports/winnt/include/stdnoreturn.h61
-rw-r--r--ports/winnt/include/sys/ioctl.h11
-rw-r--r--ports/winnt/include/sys/param.h4
-rw-r--r--ports/winnt/include/sys/resource.h10
-rw-r--r--ports/winnt/include/sys/signal.h4
-rw-r--r--ports/winnt/include/sys/time.h25
-rw-r--r--ports/winnt/include/sys/wait.h4
-rw-r--r--ports/winnt/include/syslog.h82
-rw-r--r--ports/winnt/include/termios.h214
-rw-r--r--ports/winnt/include/timepps.h811
-rw-r--r--ports/winnt/include/unistd.h4
-rw-r--r--ports/winnt/include/win32_io.h7
-rw-r--r--ports/winnt/instsrv/instsrv.c461
-rw-r--r--ports/winnt/libntp/MSG00001.binbin0 -> 104 bytes
-rw-r--r--ports/winnt/libntp/SetSystemTime.c34
-rw-r--r--ports/winnt/libntp/getclock.c63
-rw-r--r--ports/winnt/libntp/messages.h199
-rw-r--r--ports/winnt/libntp/messages.mc161
-rw-r--r--ports/winnt/libntp/messages.rc2
-rw-r--r--ports/winnt/libntp/randfile.c109
-rw-r--r--ports/winnt/libntp/setpriority.c76
-rw-r--r--ports/winnt/libntp/syslog.c219
-rw-r--r--ports/winnt/libntp/termios.c789
-rw-r--r--ports/winnt/libntp/util_clockstuff.c26
-rw-r--r--ports/winnt/libntp/win32_io.c81
-rw-r--r--ports/winnt/ntpd/hopf_PCI_io.c335
-rw-r--r--ports/winnt/ntpd/nt_clockstuff.c1743
-rw-r--r--ports/winnt/ntpd/ntp_iocompletionport.c1639
-rw-r--r--ports/winnt/ntpd/ntservice.c321
-rw-r--r--ports/winnt/ntptrace/ntptrace.dsp153
-rw-r--r--ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h714
-rw-r--r--ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt52
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c465
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def9
-rw-r--r--ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h49
-rw-r--r--ports/winnt/ppsapi/loopback/src/sys/time.h18
-rw-r--r--ports/winnt/ppsapi/loopback/src/timepps.h805
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c382
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def9
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h22
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln19
-rw-r--r--ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj227
-rw-r--r--ports/winnt/ppsapi/skelprov/sys/time.h18
-rwxr-xr-xports/winnt/scripts/mkver.bat439
-rw-r--r--ports/winnt/vs2005/Instsrv.vcproj244
-rw-r--r--ports/winnt/vs2005/libntp.vcproj864
-rw-r--r--ports/winnt/vs2005/ntp.sln70
-rw-r--r--ports/winnt/vs2005/ntpd.vcproj1893
-rw-r--r--ports/winnt/vs2005/ntpdate.vcproj294
-rw-r--r--ports/winnt/vs2005/ntpdc.vcproj338
-rw-r--r--ports/winnt/vs2005/ntpkeygen.vcproj378
-rw-r--r--ports/winnt/vs2005/ntpq.vcproj338
-rw-r--r--ports/winnt/vs2008/instsrv/instsrv.vcproj258
-rw-r--r--ports/winnt/vs2008/libntp/libntp.vcproj948
-rw-r--r--ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj256
-rw-r--r--ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj335
-rw-r--r--ports/winnt/vs2008/ntp.sln90
-rw-r--r--ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj273
-rw-r--r--ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat39
-rw-r--r--ports/winnt/vs2008/ntpd/ntpd.vcproj1126
-rw-r--r--ports/winnt/vs2008/ntpdate/ntpdate.vcproj362
-rw-r--r--ports/winnt/vs2008/ntpdc/ntpdc.vcproj367
-rw-r--r--ports/winnt/vs2008/ntpq/ntpq.vcproj357
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcproj258
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcxproj680
-rw-r--r--ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters22
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcproj936
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj740
-rw-r--r--ports/winnt/vs2013/libntp/libntp.vcxproj.filters568
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj256
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj583
-rw-r--r--ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters36
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj335
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj752
-rw-r--r--ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters36
-rw-r--r--ports/winnt/vs2013/ntp.sln166
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj273
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj531
-rw-r--r--ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters69
-rw-r--r--ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat39
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcproj1126
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcxproj1036
-rw-r--r--ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters559
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcproj362
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcxproj750
-rw-r--r--ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters72
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcproj367
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcxproj768
-rw-r--r--ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters45
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcproj357
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcxproj740
-rw-r--r--ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters42
-rwxr-xr-xreadme.y2kfixesbin8192 -> 4874 bytes
-rw-r--r--scripts/Makefile.am193
-rw-r--r--scripts/Makefile.in827
-rw-r--r--scripts/README26
-rw-r--r--scripts/build/Makefile.am17
-rw-r--r--scripts/build/Makefile.in551
-rwxr-xr-xscripts/build/UpdatePoint (renamed from scripts/UpdatePoint)6
-rwxr-xr-xscripts/build/VersionName (renamed from scripts/VersionName)8
-rwxr-xr-xscripts/build/check--help (renamed from scripts/check--help)0
-rwxr-xr-xscripts/build/checkChangeLog (renamed from scripts/checkChangeLog)0
-rwxr-xr-xscripts/build/checkHtmlFileDates16
-rwxr-xr-x[-rw-r--r--]scripts/build/fixautomakedepsmagic (renamed from scripts/fixautomakedepsmagic)0
-rwxr-xr-xscripts/build/genCommitLog (renamed from scripts/genCommitLog)0
-rwxr-xr-xscripts/build/genver96
-rw-r--r--scripts/build/mkver.in (renamed from scripts/mkver.in)8
-rwxr-xr-xscripts/build/updateBEDate53
-rw-r--r--scripts/calc_tickadj.in38
-rw-r--r--scripts/calc_tickadj/Makefile.am104
-rw-r--r--scripts/calc_tickadj/Makefile.in866
-rw-r--r--scripts/calc_tickadj/calc_tickadj-opts60
-rw-r--r--scripts/calc_tickadj/calc_tickadj-opts.def60
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjman108
-rw-r--r--scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc84
-rw-r--r--scripts/calc_tickadj/calc_tickadj.html166
-rw-r--r--scripts/calc_tickadj/calc_tickadj.in59
-rw-r--r--scripts/calc_tickadj/calc_tickadj.man.in108
-rw-r--r--scripts/calc_tickadj/calc_tickadj.mdoc.in84
-rw-r--r--scripts/calc_tickadj/calc_tickadj.texi37
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.menu1
-rw-r--r--scripts/calc_tickadj/invoke-calc_tickadj.texi102
-rw-r--r--scripts/checktime.in79
-rw-r--r--scripts/deprecated/freq_adj.in (renamed from scripts/freq_adj.in)0
-rwxr-xr-xscripts/deprecated/hpadjtime.sh (renamed from scripts/hpadjtime.sh)0
-rwxr-xr-xscripts/deprecated/html2man.in (renamed from scripts/html2man.in)24
-rwxr-xr-xscripts/deprecated/ntp-close (renamed from scripts/ntp-close)0
-rwxr-xr-xscripts/deprecated/ntp-groper (renamed from scripts/ntp-groper)0
-rwxr-xr-xscripts/deprecated/ntp-restart (renamed from scripts/ntp-restart)0
-rwxr-xr-xscripts/deprecated/ntp-status (renamed from scripts/ntp-status)0
-rwxr-xr-xscripts/genver88
-rw-r--r--scripts/invoke-plot_summary.menu1
-rw-r--r--scripts/invoke-plot_summary.texi121
-rw-r--r--scripts/invoke-summary.menu1
-rw-r--r--scripts/invoke-summary.texi103
-rw-r--r--scripts/lib/Makefile.am5
-rw-r--r--scripts/lib/Makefile.in584
-rw-r--r--scripts/lib/NTP/Util.pm137
-rw-r--r--scripts/monitoring/ntp.pl81
-rw-r--r--scripts/monitoring/ntptrap10
-rw-r--r--scripts/ntp-wait.in54
-rw-r--r--scripts/ntp-wait/Makefile.am96
-rw-r--r--scripts/ntp-wait/Makefile.in880
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.menu1
-rw-r--r--scripts/ntp-wait/invoke-ntp-wait.texi114
-rw-r--r--scripts/ntp-wait/ntp-wait-opts62
-rw-r--r--scripts/ntp-wait/ntp-wait-opts.def109
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitman122
-rw-r--r--scripts/ntp-wait/ntp-wait.1ntp-waitmdoc95
-rw-r--r--scripts/ntp-wait/ntp-wait.html208
-rw-r--r--scripts/ntp-wait/ntp-wait.in66
-rw-r--r--scripts/ntp-wait/ntp-wait.man.in122
-rw-r--r--scripts/ntp-wait/ntp-wait.mdoc.in95
-rw-r--r--scripts/ntp-wait/ntp-wait.texi52
-rw-r--r--scripts/ntpsweep.in300
-rw-r--r--scripts/ntpsweep/Makefile.am102
-rw-r--r--scripts/ntpsweep/Makefile.in886
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.menu1
-rw-r--r--scripts/ntpsweep/invoke-ntpsweep.texi118
-rw-r--r--scripts/ntpsweep/ntpsweep-opts67
-rw-r--r--scripts/ntpsweep/ntpsweep-opts.def66
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepman97
-rw-r--r--scripts/ntpsweep/ntpsweep.1ntpsweepmdoc75
-rw-r--r--scripts/ntpsweep/ntpsweep.html201
-rw-r--r--scripts/ntpsweep/ntpsweep.in204
-rw-r--r--scripts/ntpsweep/ntpsweep.man.in97
-rw-r--r--scripts/ntpsweep/ntpsweep.mdoc.in75
-rw-r--r--scripts/ntpsweep/ntpsweep.texi43
-rwxr-xr-xscripts/ntptrace.in71
-rw-r--r--scripts/ntptrace/Makefile.am95
-rw-r--r--scripts/ntptrace/Makefile.in879
-rw-r--r--scripts/ntptrace/invoke-ntptrace.menu1
-rw-r--r--scripts/ntptrace/invoke-ntptrace.texi109
-rw-r--r--scripts/ntptrace/ntptrace-opts62
-rw-r--r--scripts/ntptrace/ntptrace-opts.def69
-rw-r--r--scripts/ntptrace/ntptrace.1ntptraceman114
-rw-r--r--scripts/ntptrace/ntptrace.1ntptracemdoc91
-rw-r--r--scripts/ntptrace/ntptrace.html180
-rwxr-xr-xscripts/ntptrace/ntptrace.in80
-rw-r--r--scripts/ntptrace/ntptrace.man.in114
-rw-r--r--scripts/ntptrace/ntptrace.mdoc.in91
-rw-r--r--scripts/ntptrace/ntptrace.texi40
-rw-r--r--scripts/ntpver.in4
-rw-r--r--scripts/plot_summary-opts73
-rw-r--r--scripts/plot_summary-opts.def83
-rw-r--r--scripts/plot_summary.1plot_summaryman114
-rw-r--r--scripts/plot_summary.1plot_summarymdoc88
-rw-r--r--scripts/plot_summary.html207
-rw-r--r--scripts/plot_summary.in90
-rw-r--r--scripts/plot_summary.man.in114
-rw-r--r--scripts/plot_summary.mdoc.in88
-rw-r--r--scripts/plot_summary.texi40
-rw-r--r--scripts/rc/README13
-rw-r--r--scripts/rc/ntpd88
-rw-r--r--scripts/rc/ntpwait15
-rw-r--r--scripts/rc/rc.d/TIMESYNC8
-rw-r--r--scripts/rc/rc.d/ntpd32
-rw-r--r--scripts/rc/rc.d/ntpwait21
-rw-r--r--scripts/rc1/postinstall2
-rw-r--r--scripts/rc1/preinstall6
-rw-r--r--scripts/rc1/preremove4
-rw-r--r--scripts/rc1/prototype19
-rw-r--r--scripts/rc1/xntp29
-rw-r--r--scripts/rc2/local.ntpd64
-rw-r--r--scripts/summary-opts69
-rw-r--r--scripts/summary-opts.def82
-rw-r--r--scripts/summary.1summaryman123
-rw-r--r--scripts/summary.1summarymdoc98
-rw-r--r--scripts/summary.html182
-rw-r--r--scripts/summary.in162
-rw-r--r--scripts/summary.man.in123
-rw-r--r--scripts/summary.mdoc.in98
-rw-r--r--scripts/summary.texi40
-rw-r--r--sntp/COPYRIGHT140
-rw-r--r--sntp/Makefile.am320
-rw-r--r--sntp/Makefile.in715
-rw-r--r--sntp/aclocal.m4185
-rw-r--r--sntp/ag-tpl/0-old/Mdoc.pm515
-rw-r--r--sntp/ag-tpl/0-old/agman-cmd.tpl58
-rw-r--r--sntp/ag-tpl/0-old/agmdoc-cmd.tpl46
-rw-r--r--sntp/ag-tpl/0-old/cmd-doc.tlib1079
-rw-r--r--sntp/ag-tpl/0-old/mdoc-synopsis.tlib92
-rwxr-xr-xsntp/ag-tpl/0-old/mdoc2man193
-rwxr-xr-xsntp/ag-tpl/0-old/mdoc2texi162
-rw-r--r--sntp/ag-tpl/0-old/perlopt.tpl188
-rw-r--r--sntp/autogen-version.def2
-rw-r--r--sntp/bincheck.mf16
-rw-r--r--sntp/check-libntp.mf15
-rw-r--r--sntp/check-libopts.mf14
-rw-r--r--sntp/config.h.in596
-rwxr-xr-xsntp/configure20134
-rw-r--r--sntp/configure.ac892
-rw-r--r--sntp/crypto.c7
-rw-r--r--sntp/crypto.h6
-rw-r--r--sntp/deps-ver2
-rw-r--r--sntp/depsver.mf17
-rw-r--r--sntp/header.h88
-rw-r--r--sntp/include/Makefile.am19
-rw-r--r--sntp/include/Makefile.in512
-rw-r--r--sntp/include/autogen-version.def4
-rw-r--r--sntp/include/copyright.def30
-rw-r--r--sntp/include/debug-opt.def29
-rw-r--r--sntp/include/homerc.def (renamed from include/homerc.def)0
-rw-r--r--sntp/include/ntp.lic18
-rw-r--r--sntp/include/version.def1
-rw-r--r--sntp/include/version.texi3
-rw-r--r--sntp/includes.mf6
-rw-r--r--sntp/invoke-sntp.menu (renamed from sntp/sntp-opts.menu)0
-rw-r--r--sntp/invoke-sntp.texi427
-rw-r--r--sntp/kod_management.c90
-rw-r--r--sntp/kod_management.h12
-rw-r--r--sntp/libevent/ChangeLog736
-rw-r--r--sntp/libevent/ChangeLog-1.4231
-rw-r--r--sntp/libevent/ChangeLog-2.01280
-rw-r--r--sntp/libevent/Doxyfile257
-rw-r--r--sntp/libevent/LICENSE99
-rw-r--r--sntp/libevent/Makefile.am301
-rw-r--r--sntp/libevent/Makefile.in2293
-rw-r--r--sntp/libevent/Makefile.nmake82
-rw-r--r--sntp/libevent/README218
-rw-r--r--sntp/libevent/WIN32-Code/nmake/evconfig-private.h6
-rw-r--r--sntp/libevent/WIN32-Code/nmake/event2/event-config.h360
-rw-r--r--sntp/libevent/WIN32-Code/tree.h1354
-rw-r--r--sntp/libevent/aclocal.m41142
-rw-r--r--sntp/libevent/arc4random.c556
-rwxr-xr-xsntp/libevent/autogen.sh15
-rw-r--r--sntp/libevent/buffer.c3375
-rw-r--r--sntp/libevent/buffer_iocp.c326
-rw-r--r--sntp/libevent/bufferevent-internal.h450
-rw-r--r--sntp/libevent/bufferevent.c984
-rw-r--r--sntp/libevent/bufferevent_async.c684
-rw-r--r--sntp/libevent/bufferevent_filter.c518
-rw-r--r--sntp/libevent/bufferevent_openssl.c1502
-rw-r--r--sntp/libevent/bufferevent_pair.c327
-rw-r--r--sntp/libevent/bufferevent_ratelim.c1092
-rw-r--r--sntp/libevent/bufferevent_sock.c709
-rwxr-xr-xsntp/libevent/build-aux/compile143
-rwxr-xr-xsntp/libevent/build-aux/config.guess1517
-rwxr-xr-xsntp/libevent/build-aux/config.sub1756
-rwxr-xr-xsntp/libevent/build-aux/depcomp630
-rwxr-xr-xsntp/libevent/build-aux/install-sh520
-rwxr-xr-xsntp/libevent/build-aux/ltmain.sh9636
-rwxr-xr-xsntp/libevent/build-aux/missing376
-rwxr-xr-xsntp/libevent/build-aux/ylwrap222
-rw-r--r--sntp/libevent/changelist-internal.h102
-rw-r--r--sntp/libevent/compat/sys/queue.h488
-rw-r--r--sntp/libevent/config.h.in632
-rwxr-xr-xsntp/libevent/configure22030
-rw-r--r--sntp/libevent/configure.ac919
-rw-r--r--sntp/libevent/defer-internal.h70
-rw-r--r--sntp/libevent/devpoll.c311
-rw-r--r--sntp/libevent/epoll.c541
-rw-r--r--sntp/libevent/epoll_sub.c66
-rw-r--r--sntp/libevent/epolltable-internal.h1166
-rw-r--r--sntp/libevent/evbuffer-internal.h339
-rw-r--r--sntp/libevent/evconfig-private.h49
-rw-r--r--sntp/libevent/evconfig-private.h.in48
-rw-r--r--sntp/libevent/evdns.c4709
-rw-r--r--sntp/libevent/event-internal.h474
-rw-r--r--sntp/libevent/event.c3862
-rw-r--r--sntp/libevent/event_iocp.c294
-rwxr-xr-xsntp/libevent/event_rpcgen.py1728
-rw-r--r--sntp/libevent/event_tagging.c591
-rw-r--r--sntp/libevent/evmap-internal.h117
-rw-r--r--sntp/libevent/evmap.c1055
-rw-r--r--sntp/libevent/evport.c451
-rw-r--r--sntp/libevent/evrpc-internal.h204
-rw-r--r--sntp/libevent/evrpc.c1171
-rw-r--r--sntp/libevent/evsignal-internal.h65
-rw-r--r--sntp/libevent/evthread-internal.h385
-rw-r--r--sntp/libevent/evthread.c464
-rw-r--r--sntp/libevent/evthread_pthread.c191
-rw-r--r--sntp/libevent/evthread_win32.c341
-rw-r--r--sntp/libevent/evutil.c2649
-rw-r--r--sntp/libevent/evutil_rand.c206
-rw-r--r--sntp/libevent/evutil_time.c488
-rw-r--r--sntp/libevent/ht-internal.h488
-rw-r--r--sntp/libevent/http-internal.h204
-rw-r--r--sntp/libevent/http.c4814
-rw-r--r--sntp/libevent/include/evdns.h45
-rw-r--r--sntp/libevent/include/event.h85
-rw-r--r--sntp/libevent/include/event2/buffer.h1081
-rw-r--r--sntp/libevent/include/event2/buffer_compat.h115
-rw-r--r--sntp/libevent/include/event2/bufferevent.h994
-rw-r--r--sntp/libevent/include/event2/bufferevent_compat.h100
-rw-r--r--sntp/libevent/include/event2/bufferevent_ssl.h134
-rw-r--r--sntp/libevent/include/event2/bufferevent_struct.h116
-rw-r--r--sntp/libevent/include/event2/dns.h701
-rw-r--r--sntp/libevent/include/event2/dns_compat.h336
-rw-r--r--sntp/libevent/include/event2/dns_struct.h80
-rw-r--r--sntp/libevent/include/event2/event.h1669
-rw-r--r--sntp/libevent/include/event2/event_compat.h230
-rw-r--r--sntp/libevent/include/event2/event_struct.h180
-rw-r--r--sntp/libevent/include/event2/http.h1140
-rw-r--r--sntp/libevent/include/event2/http_compat.h90
-rw-r--r--sntp/libevent/include/event2/http_struct.h152
-rw-r--r--sntp/libevent/include/event2/keyvalq_struct.h80
-rw-r--r--sntp/libevent/include/event2/listener.h171
-rw-r--r--sntp/libevent/include/event2/rpc.h596
-rw-r--r--sntp/libevent/include/event2/rpc_compat.h61
-rw-r--r--sntp/libevent/include/event2/rpc_struct.h100
-rw-r--r--sntp/libevent/include/event2/tag.h146
-rw-r--r--sntp/libevent/include/event2/tag_compat.h49
-rw-r--r--sntp/libevent/include/event2/thread.h253
-rw-r--r--sntp/libevent/include/event2/util.h768
-rw-r--r--sntp/libevent/include/event2/visibility.h55
-rw-r--r--sntp/libevent/include/evhttp.h45
-rw-r--r--sntp/libevent/include/evrpc.h45
-rw-r--r--sntp/libevent/include/evutil.h39
-rw-r--r--sntp/libevent/include/include.am46
-rw-r--r--sntp/libevent/iocp-internal.h201
-rw-r--r--sntp/libevent/ipv6-internal.h83
-rw-r--r--sntp/libevent/kqueue-internal.h39
-rw-r--r--sntp/libevent/kqueue.c549
-rw-r--r--sntp/libevent/libevent.pc.in16
-rw-r--r--sntp/libevent/libevent_openssl.pc.in16
-rw-r--r--sntp/libevent/libevent_pthreads.pc.in16
-rw-r--r--sntp/libevent/listener.c882
-rw-r--r--sntp/libevent/log-internal.h83
-rw-r--r--sntp/libevent/log.c253
-rw-r--r--sntp/libevent/m4/ac_backport_259_ssizet.m43
-rw-r--r--sntp/libevent/m4/libevent_openssl.m447
-rw-r--r--sntp/libevent/m4/libtool.m4 (renamed from m4/libtool.m4)0
-rw-r--r--sntp/libevent/m4/ltoptions.m4 (renamed from m4/ltoptions.m4)0
-rw-r--r--sntp/libevent/m4/ltsugar.m4 (renamed from m4/ltsugar.m4)0
-rw-r--r--sntp/libevent/m4/ltversion.m4 (renamed from m4/ltversion.m4)0
-rw-r--r--sntp/libevent/m4/lt~obsolete.m4 (renamed from m4/lt~obsolete.m4)0
-rw-r--r--sntp/libevent/m4/ntp_pkg_config.m427
-rw-r--r--sntp/libevent/m4/openldap-thread-check.m4683
-rw-r--r--sntp/libevent/m4/openldap.m41131
-rw-r--r--sntp/libevent/make-event-config.sed23
-rw-r--r--sntp/libevent/minheap-internal.h188
-rw-r--r--sntp/libevent/mm-internal.h87
-rw-r--r--sntp/libevent/poll.c341
-rw-r--r--sntp/libevent/ratelim-internal.h105
-rw-r--r--sntp/libevent/sample/dns-example.c248
-rw-r--r--sntp/libevent/sample/event-read-fifo.c162
-rw-r--r--sntp/libevent/sample/hello-world.c141
-rw-r--r--sntp/libevent/sample/hostcheck.c217
-rw-r--r--sntp/libevent/sample/hostcheck.h30
-rw-r--r--sntp/libevent/sample/http-server.c415
-rw-r--r--sntp/libevent/sample/https-client.c426
-rw-r--r--sntp/libevent/sample/include.am51
-rw-r--r--sntp/libevent/sample/le-proxy.c288
-rw-r--r--sntp/libevent/sample/openssl_hostname_validation.c172
-rw-r--r--sntp/libevent/sample/openssl_hostname_validation.h56
-rw-r--r--sntp/libevent/sample/signal-test.c75
-rw-r--r--sntp/libevent/sample/time-test.c107
-rw-r--r--sntp/libevent/select.c346
-rw-r--r--sntp/libevent/signal.c479
-rw-r--r--sntp/libevent/strlcpy-internal.h22
-rw-r--r--sntp/libevent/strlcpy.c75
-rw-r--r--sntp/libevent/test/Makefile.nmake79
-rw-r--r--sntp/libevent/test/bench.c207
-rw-r--r--sntp/libevent/test/bench_cascade.c188
-rw-r--r--sntp/libevent/test/bench_http.c195
-rw-r--r--sntp/libevent/test/bench_httpclient.c230
-rwxr-xr-xsntp/libevent/test/check-dumpevents.py54
-rw-r--r--sntp/libevent/test/include.am145
-rw-r--r--sntp/libevent/test/regress.c3309
-rw-r--r--sntp/libevent/test/regress.gen.c1
-rw-r--r--sntp/libevent/test/regress.gen.h1
-rw-r--r--sntp/libevent/test/regress.h132
-rw-r--r--sntp/libevent/test/regress.rpc25
-rw-r--r--sntp/libevent/test/regress_buffer.c2240
-rw-r--r--sntp/libevent/test/regress_bufferevent.c1014
-rw-r--r--sntp/libevent/test/regress_dns.c1922
-rw-r--r--sntp/libevent/test/regress_et.c208
-rw-r--r--sntp/libevent/test/regress_finalize.c346
-rw-r--r--sntp/libevent/test/regress_http.c3893
-rw-r--r--sntp/libevent/test/regress_iocp.c352
-rw-r--r--sntp/libevent/test/regress_listener.c214
-rw-r--r--sntp/libevent/test/regress_main.c462
-rw-r--r--sntp/libevent/test/regress_minheap.c98
-rw-r--r--sntp/libevent/test/regress_rpc.c905
-rw-r--r--sntp/libevent/test/regress_ssl.c477
-rw-r--r--sntp/libevent/test/regress_testutils.c219
-rw-r--r--sntp/libevent/test/regress_testutils.h66
-rw-r--r--sntp/libevent/test/regress_thread.c584
-rw-r--r--sntp/libevent/test/regress_thread.h48
-rw-r--r--sntp/libevent/test/regress_util.c1411
-rw-r--r--sntp/libevent/test/regress_zlib.c345
-rwxr-xr-xsntp/libevent/test/rpcgen_wrapper.sh52
-rw-r--r--sntp/libevent/test/test-changelist.c224
-rw-r--r--sntp/libevent/test/test-closed.c117
-rw-r--r--sntp/libevent/test/test-dumpevents.c179
-rw-r--r--sntp/libevent/test/test-eof.c124
-rw-r--r--sntp/libevent/test/test-fdleak.c249
-rw-r--r--sntp/libevent/test/test-init.c65
-rw-r--r--sntp/libevent/test/test-ratelim.c602
-rw-r--r--sntp/libevent/test/test-time.c113
-rw-r--r--sntp/libevent/test/test-weof.c117
-rwxr-xr-xsntp/libevent/test/test.sh144
-rw-r--r--sntp/libevent/test/tinytest.c460
-rw-r--r--sntp/libevent/test/tinytest.h98
-rw-r--r--sntp/libevent/test/tinytest_local.h12
-rw-r--r--sntp/libevent/test/tinytest_macros.h184
-rw-r--r--sntp/libevent/time-internal.h101
-rw-r--r--sntp/libevent/util-internal.h479
-rw-r--r--sntp/libevent/whatsnew-2.0.txt609
-rw-r--r--sntp/libevent/whatsnew-2.1.txt639
-rw-r--r--sntp/libevent/win32select.c388
-rw-r--r--sntp/libopts/COPYING.gplv36
-rw-r--r--sntp/libopts/COPYING.lgplv32
-rw-r--r--sntp/libopts/Makefile.am64
-rw-r--r--sntp/libopts/Makefile.in270
-rw-r--r--sntp/libopts/README2
-rw-r--r--sntp/libopts/ag-char-map.h638
-rw-r--r--sntp/libopts/alias.c116
-rw-r--r--sntp/libopts/ao-strs.c374
-rw-r--r--sntp/libopts/ao-strs.h330
-rw-r--r--sntp/libopts/autoopts.c1048
-rw-r--r--sntp/libopts/autoopts.h244
-rw-r--r--sntp/libopts/autoopts/options.h1307
-rw-r--r--sntp/libopts/autoopts/project.h31
-rw-r--r--sntp/libopts/autoopts/usage-txt.h1018
-rw-r--r--sntp/libopts/boolean.c53
-rw-r--r--sntp/libopts/check.c177
-rw-r--r--sntp/libopts/compat/_Noreturn.h10
-rw-r--r--sntp/libopts/compat/compat.h85
-rw-r--r--sntp/libopts/compat/pathfind.c129
-rw-r--r--sntp/libopts/compat/snprintf.c2
-rw-r--r--sntp/libopts/compat/strchr.c18
-rw-r--r--sntp/libopts/compat/strdup.c3
-rw-r--r--sntp/libopts/compat/windows-config.h117
-rw-r--r--sntp/libopts/configfile.c907
-rw-r--r--sntp/libopts/cook.c98
-rw-r--r--sntp/libopts/enum.c (renamed from sntp/libopts/enumeration.c)434
-rw-r--r--sntp/libopts/env.c (renamed from sntp/libopts/environment.c)68
-rw-r--r--sntp/libopts/file.c232
-rw-r--r--sntp/libopts/find.c780
-rw-r--r--sntp/libopts/genshell.c812
-rw-r--r--sntp/libopts/genshell.h115
-rw-r--r--sntp/libopts/gettext.h288
-rw-r--r--sntp/libopts/init.c298
-rw-r--r--sntp/libopts/intprops.h320
-rw-r--r--sntp/libopts/libopts.c25
-rw-r--r--sntp/libopts/load.c480
-rw-r--r--sntp/libopts/m4/libopts.m4202
-rw-r--r--sntp/libopts/m4/liboptschk.m44
-rw-r--r--sntp/libopts/m4/stdnoreturn.m441
-rw-r--r--sntp/libopts/makeshell.c1137
-rw-r--r--sntp/libopts/nested.c739
-rw-r--r--sntp/libopts/numeric.c84
-rw-r--r--sntp/libopts/option-value-type.c156
-rw-r--r--sntp/libopts/option-value-type.h60
-rw-r--r--sntp/libopts/option-xat-attribute.c148
-rw-r--r--sntp/libopts/option-xat-attribute.h57
-rw-r--r--sntp/libopts/parse-duration.c25
-rw-r--r--sntp/libopts/parse-duration.h12
-rw-r--r--sntp/libopts/pgusage.c155
-rw-r--r--sntp/libopts/proto.h152
-rw-r--r--sntp/libopts/putshell.c321
-rw-r--r--sntp/libopts/reset.c44
-rw-r--r--sntp/libopts/restore.c47
-rw-r--r--sntp/libopts/save.c393
-rw-r--r--sntp/libopts/sort.c160
-rw-r--r--sntp/libopts/stack.c115
-rw-r--r--sntp/libopts/stdnoreturn.in.h50
-rw-r--r--sntp/libopts/streqvcmp.c71
-rw-r--r--sntp/libopts/text_mmap.c504
-rw-r--r--sntp/libopts/time.c84
-rw-r--r--sntp/libopts/tokenize.c44
-rw-r--r--sntp/libopts/usage.c1025
-rw-r--r--sntp/libopts/value-type.c123
-rw-r--r--sntp/libopts/value-type.h25
-rw-r--r--sntp/libopts/version.c232
-rw-r--r--sntp/libopts/xat-attribute.c114
-rw-r--r--sntp/libopts/xat-attribute.h22
-rw-r--r--sntp/loc/README17
-rw-r--r--sntp/loc/darwin14
-rw-r--r--sntp/loc/debian17
-rw-r--r--sntp/loc/freebsd14
-rw-r--r--sntp/loc/legacy17
-rw-r--r--sntp/loc/netbsd14
-rw-r--r--sntp/loc/redhat17
-rw-r--r--sntp/loc/solaris16
-rw-r--r--sntp/log.c18
-rw-r--r--sntp/log.h4
-rw-r--r--sntp/m4/define_dir.m435
-rw-r--r--sntp/m4/hms_search_lib.m430
-rw-r--r--sntp/m4/libtool.m47831
-rw-r--r--sntp/m4/ltoptions.m4369
-rw-r--r--sntp/m4/ltsugar.m4123
-rw-r--r--sntp/m4/ltversion.m423
-rw-r--r--sntp/m4/lt~obsolete.m498
-rw-r--r--sntp/m4/ntp_cacheversion.m4 (renamed from m4/ntp_cacheversion.m4)31
-rw-r--r--sntp/m4/ntp_compiler.m4195
-rw-r--r--sntp/m4/ntp_crosscompile.m48
-rw-r--r--sntp/m4/ntp_crypto_rand.m453
-rw-r--r--sntp/m4/ntp_debug.m422
-rw-r--r--sntp/m4/ntp_dir_sep.m4 (renamed from m4/ntp_dir_sep.m4)2
-rw-r--r--sntp/m4/ntp_facilitynames.m424
-rw-r--r--sntp/m4/ntp_googletest.m453
-rw-r--r--sntp/m4/ntp_ipv6.m4528
-rw-r--r--sntp/m4/ntp_lib_m.m4 (renamed from m4/ntp_lib_m.m4)0
-rw-r--r--sntp/m4/ntp_libevent.m4150
-rw-r--r--sntp/m4/ntp_libntp.m41137
-rw-r--r--sntp/m4/ntp_lineeditlibs.m4 (renamed from m4/ntp_lineeditlibs.m4)0
-rw-r--r--sntp/m4/ntp_locinfo.m4129
-rw-r--r--sntp/m4/ntp_openssl.m4372
-rw-r--r--sntp/m4/ntp_pkg_config.m427
-rw-r--r--sntp/m4/ntp_prog_cc.m421
-rw-r--r--sntp/m4/ntp_rlimit.m466
-rw-r--r--sntp/m4/ntp_sntp.m429
-rw-r--r--sntp/m4/ntp_sysexits.m411
-rw-r--r--sntp/m4/ntp_ver_suffix.m413
-rw-r--r--sntp/m4/ntp_vpathhack.m443
-rw-r--r--sntp/m4/os_cflags.m4 (renamed from m4/os_cflags.m4)11
-rw-r--r--sntp/m4/snprintf.m4288
-rw-r--r--sntp/m4/version.m41
-rw-r--r--sntp/main.c1636
-rw-r--r--sntp/main.h33
-rw-r--r--sntp/networking.c572
-rw-r--r--sntp/networking.h35
-rw-r--r--sntp/scm-rev1
-rw-r--r--sntp/scripts/Makefile.am7
-rw-r--r--sntp/scripts/Makefile.in498
-rwxr-xr-xsntp/scripts/cvo.sh (renamed from scripts/cvo.sh)0
-rwxr-xr-xsntp/scripts/genLocInfo256
-rw-r--r--sntp/scripts/mansec2subst.sed28
-rw-r--r--sntp/sntp-opts.c1619
-rw-r--r--sntp/sntp-opts.def410
-rw-r--r--sntp/sntp-opts.h280
-rw-r--r--sntp/sntp-opts.texi286
-rw-r--r--sntp/sntp.1219
-rw-r--r--sntp/sntp.1sntpman340
-rw-r--r--sntp/sntp.1sntpmdoc296
-rw-r--r--sntp/sntp.c8
-rw-r--r--sntp/sntp.html553
-rw-r--r--sntp/sntp.man.in340
-rw-r--r--sntp/sntp.mdoc.in296
-rw-r--r--sntp/sntp.texi12
-rw-r--r--sntp/tests/Makefile.am111
-rw-r--r--sntp/tests/Makefile.in898
-rw-r--r--sntp/tests/crypto.cpp129
-rw-r--r--sntp/tests/data/debug-input-lfp-bin3
-rw-r--r--sntp/tests/data/debug-input-lfp-dec3
-rw-r--r--sntp/tests/data/debug-input-pkt8
-rw-r--r--sntp/tests/data/key-test-ascii2
-rw-r--r--sntp/tests/data/key-test-comments3
-rw-r--r--sntp/tests/data/key-test-empty0
-rw-r--r--sntp/tests/data/key-test-hex3
-rw-r--r--sntp/tests/data/key-test-invalid-hex2
-rw-r--r--sntp/tests/data/kod-expected-multiple3
-rw-r--r--sntp/tests/data/kod-expected-single1
-rw-r--r--sntp/tests/data/kod-test-blanks6
-rw-r--r--sntp/tests/data/kod-test-correct2
-rw-r--r--sntp/tests/data/kod-test-empty0
-rw-r--r--sntp/tests/fileHandlingTest.h64
-rw-r--r--sntp/tests/keyFile.cpp131
-rw-r--r--sntp/tests/kodDatabase.cpp118
-rw-r--r--sntp/tests/kodFile.cpp138
-rw-r--r--sntp/tests/networking.cpp5
-rw-r--r--sntp/tests/packetHandling.cpp264
-rw-r--r--sntp/tests/packetProcessing.cpp334
-rw-r--r--sntp/tests/sntptest.h35
-rwxr-xr-xsntp/tests/tests-runner13
-rw-r--r--sntp/tests/utilities.cpp176
-rw-r--r--sntp/tests_main.cpp25
-rw-r--r--sntp/tests_main.h22
-rw-r--r--sntp/utilities.c69
-rw-r--r--sntp/utilities.h24
-rw-r--r--sntp/version.def1
-rw-r--r--sntp/version.m41
-rw-r--r--sntp/version.texi3
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/Makefile.in737
-rw-r--r--tests/libntp/Makefile.am93
-rw-r--r--tests/libntp/Makefile.in971
-rw-r--r--tests/libntp/a_md5encrypt.cpp89
-rw-r--r--tests/libntp/atoint.cpp48
-rw-r--r--tests/libntp/atouint.cpp40
-rw-r--r--tests/libntp/authkeys.cpp100
-rw-r--r--tests/libntp/buftvtots.cpp61
-rw-r--r--tests/libntp/calendar.cpp337
-rw-r--r--tests/libntp/caljulian.cpp94
-rw-r--r--tests/libntp/caltontp.cpp49
-rw-r--r--tests/libntp/calyearstart.cpp43
-rw-r--r--tests/libntp/clocktime.cpp187
-rw-r--r--tests/libntp/decodenetnum.cpp93
-rw-r--r--tests/libntp/hextoint.cpp42
-rw-r--r--tests/libntp/hextolfp.cpp58
-rw-r--r--tests/libntp/humandate.cpp41
-rw-r--r--tests/libntp/lfpfunc.cpp547
-rw-r--r--tests/libntp/lfptest.h31
-rw-r--r--tests/libntp/lfptostr.cpp103
-rw-r--r--tests/libntp/libntptest.cpp27
-rw-r--r--tests/libntp/libntptest.h15
-rw-r--r--tests/libntp/modetoa.cpp16
-rw-r--r--tests/libntp/msyslog.cpp137
-rw-r--r--tests/libntp/netof.cpp69
-rw-r--r--tests/libntp/numtoa.cpp18
-rw-r--r--tests/libntp/numtohost.cpp15
-rw-r--r--tests/libntp/octtoint.cpp57
-rw-r--r--tests/libntp/prettydate.cpp16
-rw-r--r--tests/libntp/recvbuff.cpp38
-rw-r--r--tests/libntp/refnumtoa.cpp52
-rw-r--r--tests/libntp/sfptostr.cpp71
-rw-r--r--tests/libntp/sockaddrtest.h58
-rw-r--r--tests/libntp/socktoa.cpp100
-rw-r--r--tests/libntp/ssl_init.cpp50
-rw-r--r--tests/libntp/statestr.cpp27
-rw-r--r--tests/libntp/strtolfp.cpp107
-rw-r--r--tests/libntp/timespecops.cpp475
-rw-r--r--tests/libntp/timestructs.cpp156
-rw-r--r--tests/libntp/timestructs.h185
-rw-r--r--tests/libntp/timevalops.cpp480
-rw-r--r--tests/libntp/tstotv.cpp57
-rw-r--r--tests/libntp/tvtots.cpp54
-rw-r--r--tests/libntp/uglydate.cpp18
-rw-r--r--tests/libntp/vi64ops.cpp64
-rw-r--r--tests/libntp/ymd2yd.cpp23
-rw-r--r--tests/ntpd/Makefile.am55
-rw-r--r--tests/ntpd/Makefile.in939
-rw-r--r--tests/ntpd/leapsec.cpp901
-rw-r--r--tests/ntpd/ntpdtest.cpp27
-rw-r--r--tests/ntpd/ntpdtest.h15
-rw-r--r--util/Makefile.am150
-rw-r--r--util/Makefile.in653
-rw-r--r--util/README7
-rw-r--r--util/audio-pcm.c4
-rw-r--r--util/hist.c35
-rw-r--r--util/invoke-ntp-keygen.menu (renamed from util/ntp-keygen-opts.menu)0
-rw-r--r--util/invoke-ntp-keygen.texi1354
-rw-r--r--util/jitter.c1
-rw-r--r--util/ntp-keygen-opts.c1909
-rw-r--r--util/ntp-keygen-opts.def1002
-rw-r--r--util/ntp-keygen-opts.h234
-rw-r--r--util/ntp-keygen-opts.texi363
-rw-r--r--util/ntp-keygen.1190
-rw-r--r--util/ntp-keygen.1ntp-keygenman1221
-rw-r--r--util/ntp-keygen.1ntp-keygenmdoc1071
-rw-r--r--util/ntp-keygen.c470
-rw-r--r--util/ntp-keygen.html1811
-rw-r--r--util/ntp-keygen.man.in1221
-rw-r--r--util/ntp-keygen.mdoc.in1071
-rw-r--r--util/ntp-keygen.texi307
-rw-r--r--util/ntptime.c223
-rw-r--r--util/sht.c221
-rw-r--r--util/tg.c19
-rw-r--r--util/tg2.c2506
-rw-r--r--util/tickadj.c24
-rw-r--r--version1
-rw-r--r--version.m41
1438 files changed, 498917 insertions, 69331 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
index a4a8dbca37c2..1775a64784a5 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,7 +4,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 1-Jan-2011 08:34 UTC
+ Last update: 9-Aug-2014 07:56 UTC
_________________________________________________________________
The following copyright notice applies to all files collectively
@@ -13,7 +13,7 @@ This file is automatically generated from html/copyright.html
applies as if the text was explicitly included in the file.
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2011 *
+* Copyright (c) University of Delaware 1992-2014 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -75,53 +75,58 @@ This file is automatically generated from html/copyright.html
27. [29]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
28. [30]Frank Kardel [31]<kardel (at) ntp (dot) org> PARSE <GENERIC>
- driver (>14 reference clocks), STREAMS modules for PARSE, support
+ (driver 14 reference clocks), STREAMS modules for PARSE, support
scripts, syslog cleanup, dynamic interface handling
- 29. [32]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 29. [32]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
+ comply with NTPv4 specification, ntpq saveconfig
+ 30. [33]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 30. [33]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 31. [34]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ 31. [34]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 32. [35]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
- 32. [35]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 33. [36]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 34. [37]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 33. [36]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 34. [37]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 35. [38]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 35. [38]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
+ 36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance
- 36. [39]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
- 37. [40]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 38. [41]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 39. [42]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 40. [43]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 41. [44]Derek Mulcahy <derek@toybox.demon.co.uk> and [45]Damon
+ 37. [40]David L. Mills <mills@udel.edu> Version 4 foundation,
+ precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19,
+ 22, 36
+ 38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 41. [44]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 42. [45]Derek Mulcahy <derek@toybox.demon.co.uk> and [46]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 42. [46]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
+ 43. [47]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
maintenance
- 43. [47]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 44. [48]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 45. [49]Wilfredo Sánchez <wsanchez@apple.com> added support for
+ 45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo
- 46. [50]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 47. [51]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 48. [52]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 49. [53]Michael Shields <shields@tembel.org> USNO clock driver
- 50. [54]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
+ 49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 50. [54]Michael Shields <shields@tembel.org> USNO clock driver
+ 51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver
- 51. [55]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 52. [56]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 53. [57]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
+ 53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support
- 54. [58]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
+ 55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
- 55. [59]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
+ Solaris issues
+ 57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
+ (libseccomp) support
+ 58. [62]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 56. [60]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
@@ -141,7 +146,7 @@ References
12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
13. mailto:%20reg@dwf.com
14. mailto:%20clift@ml.csiro.au
- 15. mailto:casey@csc.co.za
+ 15. mailto:%20casey@csc.co.za
16. mailto:%20Sven_Dietrich@trimble.COM
17. mailto:%20dundas@salt.jpl.nasa.gov
18. mailto:%20duwe@immd4.informatik.uni-erlangen.de
@@ -153,37 +158,40 @@ References
24. mailto:%20iglesias@uci.edu
25. mailto:%20jagubox.gsfc.nasa.gov
26. mailto:%20jbj@chatham.usdesign.com
- 27. mailto:Hans.Lambermont@nl.origin-it.com
+ 27. mailto:%20Hans.Lambermont@nl.origin-it.com
28. mailto:H.Lambermont@chello.nl
29. mailto:%20phk@FreeBSD.ORG
30. http://www4.informatik.uni-erlangen.de/%7ekardel
- 31. mailto:%20kardel(at)ntp(dot)org
- 32. mailto:%20jones@hermes.chpc.utexas.edu
- 33. mailto:%20dkatz@cisco.com
- 34. mailto:%20leres@ee.lbl.gov
- 35. mailto:%20lindholm@ucs.ubc.ca
- 36. mailto:%20louie@ni.umd.edu
- 37. mailto:%20thorinn@diku.dk
- 38. mailto:%20mayer@ntp.org
- 39. mailto:%20mills@udel.edu
- 40. mailto:%20moeller@gwdgv1.dnet.gwdg.de
- 41. mailto:%20mogul@pa.dec.com
- 42. mailto:%20tmoore@fievel.daytonoh.ncr.com
- 43. mailto:%20kamal@whence.com
- 44. mailto:%20derek@toybox.demon.co.uk
- 45. mailto:%20d@hd.org
- 46. mailto:%20neal@ntp.org
- 47. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
- 48. mailto:%20dirce@zk3.dec.com
- 49. mailto:%20wsanchez@apple.com
- 50. mailto:%20mrapple@quack.kfu.com
- 51. mailto:%20jack@innovativeinternet.com
- 52. mailto:%20schnitz@unipress.com
- 53. mailto:%20shields@tembel.org
- 54. mailto:%20pebbles.jpl.nasa.gov
- 55. mailto:%20harlan@pfcs.com
- 56. mailto:%20ken@sdd.hp.com
- 57. mailto:%20ajit@ee.udel.edu
- 58. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
- 59. mailto:%20vixie@vix.com
- 60. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
+ 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
+ 32. mailto:kuehn@ntp.org
+ 33. mailto:%20jones@hermes.chpc.utexas.edu
+ 34. mailto:%20dkatz@cisco.com
+ 35. mailto:%20leres@ee.lbl.gov
+ 36. mailto:%20lindholm@ucs.ubc.ca
+ 37. mailto:%20louie@ni.umd.edu
+ 38. mailto:%20thorinn@diku.dk
+ 39. mailto:%20mayer@ntp.org
+ 40. mailto:%20mills@udel.edu
+ 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de
+ 42. mailto:%20mogul@pa.dec.com
+ 43. mailto:%20tmoore@fievel.daytonoh.ncr.com
+ 44. mailto:%20kamal@whence.com
+ 45. mailto:%20derek@toybox.demon.co.uk
+ 46. mailto:%20d@hd.org
+ 47. mailto:%20neal@ntp.org
+ 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
+ 49. mailto:%20dirce@zk3.dec.com
+ 50. mailto:%20wsanchez@apple.com
+ 51. mailto:%20mrapple@quack.kfu.com
+ 52. mailto:%20jack@innovativeinternet.com
+ 53. mailto:%20schnitz@unipress.com
+ 54. mailto:%20shields@tembel.org
+ 55. mailto:%20pebbles.jpl.nasa.gov
+ 56. mailto:%20harlan@pfcs.com
+ 57. mailto:%20ken@sdd.hp.com
+ 58. mailto:%20ajit@ee.udel.edu
+ 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
+ 60. mailto:%20brian.utterback@oracle.com
+ 61. mailto:%20loganaden@gmail.com
+ 62. mailto:%20vixie@vix.com
+ 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
diff --git a/ChangeLog b/ChangeLog
index 38ac2f819e90..4d2ea91b0fac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,2048 @@
---
+(4.2.8) 2014/12/19 Released by Harlan Stenn <stenn@ntp.org>
+
+* [Sec 730] Increase RSA_generate_key modulus.
+* [Sec 2666] Use cryptographic random numbers for md5 key generation.
+* [Sec 2667] buffer overflow in crypto_recv().
+* [Sec 2668] buffer overflow in ctl_putdata().
+* [Sec 2669] buffer overflow in configure().
+* [Sec 2670] Missing return; from error clause.
+* [Sec 2671] vallen in extension fields are not validated.
+* [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs.
+* [Bug 2691] Wrong variable name in refclock_ripencc.c.
+(4.2.7p486-RC) 2014/12/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2687] RefClock 26/hpgps doesn't work at default line speed
+(4.2.7p485-RC) 2014/12/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present.
+(4.2.7p484-RC) 2014/12/11 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p483) 2014/12/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2685] Better document the KOD file for sntp.
+(4.2.7p482) 2014/12/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2641] sntp is installed in the wrong location in Solaris.
+* [Bug 2678] nmea_control() now checks 'refclock_params()' result.
+(4.2.7p481) 2014/11/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
+* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition.
+* Rename pps_enable to hardpps_enable.
+(4.2.7p480) 2014/11/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2677] PATH_MAX isn't #define'd under Windows.
+ Regression from the patch fixing Bug 2639.
+(4.2.7p479) 2014/11/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed.
+(4.2.7p478) 2014/11/14 Released by Harlan Stenn <stenn@ntp.org>
+* [Sec 2630] buffer overrun in ntpq tokenize().
+* [Bug 2639] Check return value of ntp_adjtime().
+* [Bug 2650] includefile processing broken.
+* [Bug 2661] ntpq crashes with mreadvar.
+(4.2.7p477) 2014/11/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2657] Document that "restrict nopeer" intereferes with "pool".
+(4.2.7p476) 2014/10/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2503] SHT utility outdated
+(4.2.7p475) 2014/09/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2654] refclock_true.c doesn't identify the Mk III.
+(4.2.7p474) 2014/09/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup.
+* [Bug 2649] Clean up html/ page installation.
+(4.2.7p473) 2014/09/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2649] Clean up html/ page installation.
+(4.2.7p472) 2014/09/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2556] mrulist is missing from the generated ntpq man page.
+(4.2.7p471) 2014/09/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2649] "make install" leaves wrong owner for files in html/.
+* [Bug 2652] Windows hates directory names that contain a :.
+(4.2.7p470) 2014/09/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2502] Autogen text replacement errors.
+* autogen-5.18.5pre1
+* html/ cleanups from Hal Murray.
+(4.2.7p469) 2014/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup.
+(4.2.7p468) 2014/08/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2556] ntpq man page cleanup.
+* autogen-5.18.4
+(4.2.7p467) 2014/08/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2639] Check return value of ntp_adjtime().
+* [Bug 2640] STA_NANO can result in invalid ntv.constant.
+(4.2.7p466) 2014/08/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup.
+(4.2.7p465) 2014/08/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2538] NTP programs print exit code in help/usage text.
+* [Bug 2595] Man page quirks: ntpdate references in ntpd.
+* [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM.
+* [Bug 2636] Clutter in syslog if gpsd not running
+ - found (hopefully) last cause for clutter in protocol version
+ - log GPSD revision and release numbers with protocol version
+(4.2.7p464) 2014/08/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2636] Fix coverity warning from previous patch.
+(4.2.7p463) 2014/08/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2636] Clutter in syslog if gpsd not running
+ - make driver work with GPSD protocol version 3.9
+ - use exponential back-off for connection problems
+ - implement rate-limit for syslog entries
+(4.2.7p462) 2014/08/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2622] Synchronisation problem using SHM [...]
+ Add 'control' function -- fudge values not available during start.
+(4.2.7p461) 2014/08/14 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1128] ntpq truncates "remote" host information.
+* More autogen-5.18.4pre14 cleanup.
+(4.2.7p460) 2014/08/13 Released by Harlan Stenn <stenn@ntp.org>
+* More autogen-5.18.4pre14 cleanup.
+(4.2.7p459) 2014/08/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2630] Limit the ntpq command buffer to 512 bytes.
+* FlexeLint cleanups.
+* Try bison-3.0.2 instead of bison-2.5.
+(4.2.7p458) 2014/08/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2633] Provide stdnoreturn.h for windows port.
+(4.2.7p457) 2014/08/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2622] Synchronisation problem using SHM when time difference is
+ more than four hours: Change SHM driver so TOY restricted API is not
+ used any more. (Plus some minor cleanup in logic and flow control)
+* Pass the configration source into the parser as argument rather
+ than through a global variable.
+* Fix nits in the ntpq man page.
+* autogen-5.18.4pre14
+(4.2.7p456) 2014/08/07 Released by Harlan Stenn <stenn@ntp.org>
+* CID 739722: Change the way the extention and MAC fields are processed.
+(4.2.7p455) 2014/08/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors.
+* CID 739722: Clean up the definition of the exten field of struct pkt.
+(4.2.7p454) 2014/07/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour
+(4.2.7p453) 2014/07/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2597] leap file loose ends (follow-up)
+ - uniform expiration check messages for config and timer triggered
+ leap file loads
+ - timer triggered loads log messages only once per day
+(4.2.7p452) 2014/07/18 Released by Harlan Stenn <stenn@ntp.org>
+* Make all of the html/ .html files use the same format for "Last update".
+(4.2.7p451) 2014/07/17 Released by Harlan Stenn <stenn@ntp.org>
+* Fix the "Last update" entries in the html/ subtree.
+(4.2.7p450) 2014/07/16 Released by Harlan Stenn <stenn@ntp.org>
+* Distribute the scripts needed for the fix for Bug 2547.
+(4.2.7p449) 2014/07/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2547] Automate update of "Last Update" datestamps in .html files.
+* [Bug 2623] Missing {} in refclock_oncore.c.
+* Quiet warnings from ntp_calendar.h: avoid using argument names.
+* Fix typos in decode.html and debug.html .
+(4.2.7p448) 2014/07/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2621] Avoid use of indeterminate address after 'free()'
+ (minor C standard conformance issue)
+* Quiet warnings from ntp_calendar.h: avoid using argument names.
+(4.2.7p447) 2014/07/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2620] Use version.pm for checking version numbers in NTP::Util.
+* [Bug 2624] Fix signed compare on 'l_fp'.
+(4.2.7p446) 2014/06/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2597] leap file processing -- loose ends.
+* [Bug 2614] use 'unsigned long' consistently in ntp_random.c
+ to avoid possibly undefined behaviour in signed int overflow
+* [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG().
+ Provide missing msyslog() message in crypto_alice().
+* Fix a variable lifetime issue.
+* Allow for version suffix in libevent in ntp_libevent.m4.
+(4.2.7p445) 2014/06/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2556] mrulist isn't mentioned in the ntpq man page.
+(4.2.7p444) 2014/05/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2597] leap file processing -- loose ends
+ fixed coverity issues
+(4.2.7p443) 2014/05/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2594] Update the year in sntp/include/copyright.def.
+(4.2.7p442) 2014/05/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2589] Update VS2013 project files for libntp.
+* [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page.
+(4.2.7p441) 2014/05/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2597] leap file processing -- loose ends
+ log daily warning when leap info less than 28 days to expiration or
+ already expired; nag hourly on last day before expiration; log when
+ leapfile name is invalid
+(4.2.7p440) 2014/04/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup.
+* [Bug 2570] cleanup: fix log format for successful leapfile load
+(4.2.7p439) 2014/04/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2589] fix VS2009 compile problem.
+(4.2.7p438) 2014/04/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2546] Windows build documentation updates.
+(4.2.7p437) 2014/03/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2537] ntpd truncates symmetric keys to 20 bytes.
+* [Bug 2546] Documentation updates.
+(4.2.7p436) 2014/03/31 Released by Harlan Stenn <stenn@ntp.org>
+* Update to libopts-40.2.15, and autogen-5.18.3pre18.
+* [Bug 2311] Add more tags to mdoc2xxx.
+* [Bug 2502] Assorted text replacement errors in 4.2.7p345
+* [Bug 2538] ntp programs print exit code as part of the "usage" text.
+(4.2.7p435) 2014/03/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2570] cleanup: reduced logging noise, moved some functions
+ into libntp.
+(4.2.7p434) 2014/03/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2577] Update VS2013 solution and project files.
+(4.2.7p433) 2014/03/10 Released by Harlan Stenn <stenn@ntp.org>
+* Clean up last-update timestamps of html/*.html files.
+* [Bug 2546] Documentation updates.
+(4.2.7p432) 2014/03/09 Released by Harlan Stenn <stenn@ntp.org>
+* CID 711660: Do a non-NULL pointer assertion check a bit earlier.
+(4.2.7p431) 2014/03/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2572] cross-compiling fails for --with-yielding-select.
+(4.2.7p430) 2014/03/04 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to libevent-2.1.3-alpha-dev.
+* [Bug 2572] cross-compiling fails for --with-yielding-select.
+(4.2.7p429) 2014/03/03 Released by Harlan Stenn <stenn@ntp.org>
+* CID 1165098: Remove logically dead code from refclock_true.c.
+* CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check.
+* In ntp_dir_sep.m4, we care about $host_os, not $target_os.
+* [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP.
+* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups.
+* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+ -- change reading the hash line code: NIST omits leading zeros.
+* [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is
+ not enabled at configure time.
+(4.2.7p428) 2014/03/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+* [Bug 2562] Distribute the code in libjsmn/ .
+(4.2.7p427) 2014/03/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2562] GPSD_JSON: fix solaris issues (asprintf(), isfinite())
+* [Bug 2562] first release of the GPSD client clock (type 46)
+(4.2.7p426) 2014/02/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2113] Warn about ignored extra args in ntpq.
+* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups.
+* [Bug 2561] Allow wildcards in the target of the "interface" command.
+* [Bug 2572] cross-compiling fails for --with-yielding_select.
+(4.2.7p425) 2014/02/26 Released by Harlan Stenn <stenn@ntp.org>
+* Copyright file update.
+(4.2.7p424) 2014/02/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly.
+(4.2.7p423) 2014/02/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2565] Handle EINTR on getifaddrs().
+(4.2.7p422) 2014/02/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2536] ntpd sandboxing support (libseccomp2).
+(4.2.7p421) 2014/02/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 898] More documentation fixes.
+* [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10.
+* calc_tickadj/Makefile.am man/mdoc page build cleanup.
+(4.2.7p420) 2014/02/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 492] Clearly document ntpdate's pending deprecation.
+* [Bug 1186] ntpd fails with link local IPv6 addresses.
+* [Sec 2542] Strengthen the mrulist nonce.
+(4.2.7p419) 2014/02/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2466] Wrap NMEA timestamps in 1024 week cycles.
+(4.2.7p418) 2014/02/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2551] --disable-local-libevent breaks the build.
+(4.2.7p417) 2014/02/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2539] doc and code tweaks for NMEA driver.
+* Add check for enable stats to ntpd/complete.conf.in
+* Fix typo in html/confopt.html
+(4.2.7p416) 2014/01/31 Released by Harlan Stenn <stenn@ntp.org>
+* Tweak the 'Modified' line on appropriate html pages.
+* Note in the deprecation of ntpdc in its documentation.
+* [Bug 2332] Be more careful about when we use 'libgcc_s'.
+(4.2.7p415) 2014/01/28 Released by Harlan Stenn <stenn@ntp.org>
+* Fix the man page installation for the scripts/ files.
+(4.2.7p414) 2014/01/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 792] TrueTime TL-3 WWV refclock support.
+* [Bug 898] Documentation fixes.
+* [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'.
+* [Bug 1002] ntp-keygen option and documentation updates: -p/--pvt-passwd
+ is now -p/--password, and -q/--get-pvt-passwd is now -q/--export-passwd.
+* [Bug 1349] statistics command not documented in HTML documentation.
+ In html/monopt.html, add statistics id, definition, description, and
+ correct typo.
+ In html/scripts/monopt.txt, add statistics item, href, and comment.
+ In ntpd/ntp.conf.def, under statistics correct four to eight kinds.
+ In ntpd/complete.conf.in, add all eight kinds to statistics.
+ In html/comdex.html, remove duplicate footer.
+* [Bug 1734] Include man page for ntp.conf (fixed in 4.2.7p297).
+* [Bug 2049] Clarify ntpdate's -d option behavior.
+* [Bug 2366] ntpdc.html: burst/iburst only work on servers.
+* [Bug 2493] ntptrace needs a man page (fixed in 4.2.7p402).
+* [Bug 2545] Cleanup of scripts/monitoring/ntptrap.
+(4.2.7p413) 2014/01/27 Released by Harlan Stenn <stenn@ntp.org>
+* Require a version string for perl scripts that use autogen.
+* html/ cleanup.
+(4.2.7p412) 2014/01/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups.
+(4.2.7p411) 2014/01/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd.
+(4.2.7p410) 2014/01/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2332] Force reference to 'libgcc_s' when using GCC, because
+ threading+restricted user+locked memory otherwise fails on Linux.
+* [Bug 2530] Fix documentation for enable/disable mode7 and pps.
+* Cleanup to the new scripts/*/Makefile.am files.
+(4.2.7p409) 2014/01/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2060] Warn about restrictions with "kod" but not "limited".
+(4.2.7p408) 2013/12/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2187] Update version number generation scripts.
+(4.2.7p407) 2013/12/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not
+ need timegm() and the Solaris provides mktime().
+* [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility.
+(4.2.7p406) 2013/12/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2521] VPATH tweaks for perl -opts files.
+(4.2.7p405) 2013/12/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2521] bootstrap script needs a tweak for perl -opts files.
+* [Bug 2524] Add ntpsweep to sntp/loc/* files.
+* [Bug 2526] Add "noinst" support to the sntp/loc/ framework.
+(4.2.7p404) 2013/12/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 135] AIX5: "Address already in use" for IPv6 wildcard.
+(4.2.7p403) 2013/12/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2513] Remove any PIDFILE in finish().
+* [Bug 2516] Enable clock_gettime() support for AIX 5+.
+* [Bug 2517] Fix peer status errors in decode.html.
+(4.2.7p402) 2013/12/23 Released by Harlan Stenn <stenn@ntp.org>
+* Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup.
+(4.2.7p401) 2013/11/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2491] VS20xx compile fixes.
+(4.2.7p400) 2013/11/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2491] VS2013 project files.
+(4.2.7p399) 2013/11/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] More leapsecond file notification cleanup.
+* [Bug 2506] make sure routing updates are always tracked
+* [Bug 2514] secs/* #define usage cleanup.
+(4.2.7p398) 2013/11/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] More leapsecond file notification cleanup.
+* Improve sntp KoD data file fopen() error message.
+(4.2.7p397) 2013/11/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] More leapsecond file notification cleanup.
+(4.2.7p396) 2013/11/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] Improve stale leapsecond notifications.
+(4.2.7p395) 2013/11/12 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to autogen-5.18.3pre5 and libopts-40.1.15.
+(4.2.7p394) 2013/11/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1050] Change ONCORE log message for leap second announcement
+ to avoid misunderstandings.
+* [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples.
+* [Bug 2256] Improve configure's function searches in libraries.
+(4.2.7p393) 2013/10/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2272] Use C99 integer types. ntp_calendar.h and ntp_types.h .
+(4.2.7p392) 2013/10/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2375] Improve AIX compatibility.
+* [Bug 2490] Fixed non-const initializer coming from [Bug 2250] fix.
+(4.2.7p391) 2013/10/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2250] Rework of leap second handling machine.
+* [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends
+ data without valid GPS fix.
+(4.2.7p390) 2013/09/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2482] Cleanup of droproot and jail support for Solaris.
+(4.2.7p389) 2013/09/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2473] revisited: NTPD exits after clock is stepped backwards
+ Avoid possible unsigned underrun for startup condition when testing
+ for clock backstep.
+* [Bug 2481] ntpd aborts when both user and group are specified with -u.
+* [Bug 2482] Add droproot and jail support for Solaris.
+(4.2.7p388) 2013/09/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2473] NTPD exits after clock is stepped backwards externally
+(4.2.7p387) 2013/09/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1642] ntpdsim can't find simnulate block in config file.
+(4.2.7p386) 2013/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2472] (WinXP) Avoid self-termination of IO thread during exit().
+(4.2.7p385) 2013/08/19 Released by Harlan Stenn <stenn@ntp.org>
+* CID 975596: Copy/paste error: vallen should be siglen.
+* CID 1009579: Check return status of X509_add_ext().
+* [2085] Fix root distance and root dispersion calculations.
+* [Bug 2426] Possibly uninitialized data in crypto_send() - CID 975596.
+(4.2.7p384) 2013/08/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2450] --version has bogus short option.
+(4.2.7p383) 2013/08/10 Released by Harlan Stenn <stenn@ntp.org>
+* (no changes - force a rebuild for a new Coverity scan)
+(4.2.7p382) 2013/08/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2454] Need way to set file descriptor limit - cleanup.
+(4.2.7p381) 2013/08/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2451] rlimit command is missing from the table of contents in
+ miscopt.html .
+* [Bug 2452] provide io_handler/input_handler only on
+ non HAVE_IO_COMPLETION_PORT platforms
+* [Bug 2453] Need a way to avoid calling mlockall.
+* [Bug 2454] Need way to set file descriptor limit.
+* [Bug 2458] AM_CONFIG_HEADER is obsolete.
+(4.2.7p380) 2013/08/03 Released by Harlan Stenn <stenn@ntp.org>
+* CID 984511: Some systems have different printf needs for sizeof.
+(4.2.7p379) 2013/08/02 Released by Harlan Stenn <stenn@ntp.org>
+* CID 739724: Fix printf arg mismatch in a debug line.
+* [Bug 2425] compile io_handler() in ntp_io.c unconditionally
+* [Bug 2448] Fix checks for configure --with-stack-limit and --with-memlock
+ values.
+(4.2.7p378) 2013/08/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2425] move part of input handler code from ntpd.c to ntp_io.c
+ and fix select()-only platforms calling input_handler directly.
+* [Bug 2446] Quiet warnings from Oracle's Studio compiler.
+* Upgrade to AutoGen-5.18.1pre3
+* Upgrade to libopts-40.1.15.
+(4.2.7p377) 2013/07/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2397] License/copyright cleanup.
+* [Bug 2439] Fix check of EscapeCommFunction() in ports/winnt/libntp/termios.c.
+(4.2.7p376) 2013/07/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2322] Oncore driver should send 0 PPS offset to GPS.
+(4.2.7p375) 2013/07/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 883] log warning arguments swapped in refclock_gpsvme.c.
+* [Bug 2368] Correct bug in previous attempt.
+* [Bug 2413] Fix "make check" with automake >= 1.13.
+* [Bug 2434] Line-buffer (v. block-buffer) stdout.
+(4.2.7p374) 2013/07/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2368] make check troubles in libevent.
+* [Bug 2425] setup SIGIO/SIGPOLL for asyncio on the read side
+ of a socketpair for the worker thread.
+(4.2.7p373) 2013/07/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2427] configure fails to detect recvmsg() on Solaris.
+(4.2.7p372) 2013/07/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1466] Oncore should set FLAG_PPS.
+* [Bug 2375] AIX 7 doesn't like a libevent validation check.
+* [Bug 2423] Log command-line args at LOG_INFO.
+* [Bug 2428] do_unconf() should reset 'items' before the 2nd loop.
+(4.2.7p371) 2013/07/07 Released by Harlan Stenn <stenn@ntp.org>
+* CID 1042586: Check the return value of clock_gettime() in worker_sleep().
+* Upgrade to libopts-39.0.14 from 5.17.5pre10.
+(4.2.7p370) 2013/07/06 Released by Harlan Stenn <stenn@ntp.org>
+* Remove \n's from syslog output strings.
+(4.2.7p369) 2013/07/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2415] RES_LIMITED flags check should use &, not &&.
+* Have NTP_LIBNTP check for time.h and clock_getres().
+* Fix ntpsweep to use sntp instead of ntpdate, from Oliver Kindernay.
+(4.2.7p368) 2013/05/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2145] ntpq dumps core when displaying sys_var_list and more.
+(4.2.7p367) 2013/04/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1485] Sometimes ntpd crashes
+* [Bug 2382] Implement LOGTOD using ldexp() instead of shifting.
+(4.2.7p366) 2013/04/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1866] Disable some debugging output in refclock_oncore.
+(4.2.7p365) 2013/04/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2149] Log an error message if /proc/net/if_inet6 cannot be opened.
+(4.2.7p364) 2013/03/26 Released by Harlan Stenn <stenn@ntp.org>
+* Bump sntp/include/autogen-version.def .
+(4.2.7p363) 2013/03/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl.
+* Upgrade to libopts from 5.17.3pre10.
+(4.2.7p362) 2013/03/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2364] "sed -i" is not portable.
+(4.2.7p361) 2013/03/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl.
+* [Bug 2365] "make check" fails in libevent.
+(4.2.7p360) 2013/03/15 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade libevent (coverity fixes, etc.).
+* EEXIST is OK for mkdir() in sntp/kod_management.c.
+(4.2.7p359) 2013/03/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2359] Fix send_via_ntp_signd() prototype.
+(4.2.7p358) 2013/02/27 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to autogen-5.17.3pre4 and libopts-38.0.13.
+* [Bug 2357] sntp/libopts/usage.c on NetBSD needs -lintl.
+(4.2.7p357) 2013/02/22 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to autogen-5.17.2pre and libopts-38.0.13.
+(4.2.7p356) 2013/02/19 Released by Harlan Stenn <stenn@ntp.org>
+* Added loc/debian.
+(4.2.7p355) 2013/02/18 Released by Harlan Stenn <stenn@ntp.org>
+* CID 739708: Check return status of fcntl() in refclock_arc.c.
+* CID 739709: Check return status of fcntl() in refclock_datum.c.
+* CID 739710: Check return status of mkdir() in sntp/kod_management.c.
+* CID 739711: Ignore return status of remove() in ntp-keygen.c.
+* CID 739723: Print sizeof as unsigned.
+* CID 971094: Clean up time of check/time of use in check_leap_file().
+(4.2.7p354) 2013/02/10 Released by Harlan Stenn <stenn@ntp.org>
+* CID 97194: Check return from setsockopt().
+* CID 739473,739532: Out-of-bounds access/illegal address computation.
+* CID 739558: Double close.
+* CID 739559: Double close.
+* CID 739713: devmask/recmask copy/paste error.
+* CID 739714: Fix code indentation level.
+* CID 739715: Clean up sockaddr_dump().
+(4.2.7p353) 2013/02/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] Check hourly for a new leapfile if the old one expired.
+(4.2.7p352) 2013/01/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2326] Notice when a new leapfile has been installed.
+(4.2.7p351) 2013/01/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2328] Don't apply small time adjustments on Windows versions
+ which don't support this.
+(4.2.7p350) 2013/01/21 Released by Harlan Stenn <stenn@ntp.org>
+* Added sntp/loc/netbsd based on info from Christos Zoulas.
+(4.2.7p349) 2013/01/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2321] Fixed Windows build, but autogen update still required.
+(4.2.7p348) 2013/01/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2327] Rename sntp/ag-tpl/:Old to sntp/ag-tpl/Old.
+* Cleanup to ntpsnmpd-opts.def.
+* Cleanup to ntpq.texi.
+* Documentation cleanup to the ntpd, ntpdc, ntpq and ntp-wait
+ .def files.
+* In ntp.conf.def, cleanup SEE ALSO, document 'rlimit' options.
+* Add a reference to RFC5907 in the ntpsnmpd documentation.
+(4.2.7p347) 2013/01/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2325] Re-enable mlockall() check under Linux post-1223 fix.
+(4.2.7p346) 2013/01/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1223] reorganize inclusion of sys/resource.h.
+(4.2.7p345) 2013/01/04 Released by Harlan Stenn <stenn@ntp.org>
+* Update several .def files to use autogen-5.17 feature set.
+(4.2.7p344) 2013/01/03 Released by Harlan Stenn <stenn@ntp.org>
+* Refactor and enhance mdoc2texi.
+* Make sure agtexi-file.tpl defines label-str.
+* Cleanup to ntp.conf.def.
+* Upgrade to autogen-5.17 and libopts-37.0.12.
+(4.2.7p343) 2013/01/02 Released by Harlan Stenn <stenn@ntp.org>
+* Update the copyright year.
+(4.2.7p342) 2012/12/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2081 - Backward Incompatible] rawstats now logs everything.
+(4.2.7p341) 2012/12/30 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p340) 2012/12/29 Released by Harlan Stenn <stenn@ntp.org>
+* mdoc2texi fixes: trailing punctuation.
+(4.2.7p339) 2012/12/26 Released by Harlan Stenn <stenn@ntp.org>
+* mdoc2texi fixes: parseQuote, closing of list item tables.
+* ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates.
+(4.2.7p338) 2012/12/25 Released by Harlan Stenn <stenn@ntp.org>
+* mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ.
+* ntp-keygen autogen documentation updates.
+* ntpq autogen docs.
+(4.2.7p337) 2012/12/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1223] More final cleanup for rlimit changes.
+(4.2.7p336) 2012/12/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1223] Final cleanup for rlimit changes.
+(4.2.7p335) 2012/12/18 Released by Harlan Stenn <stenn@ntp.org>
+* Update documentation templates and definitions.
+* Create agtexi-file.tpl .
+(4.2.7p334) 2012/12/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2114] Update tests for sntp's synch distance.
+* Create ntp-keygen.{html,texi}.
+(4.2.7p333) 2012/12/07 Released by Harlan Stenn <stenn@ntp.org>
+* Autogen documentation cleanup.
+(4.2.7p332) 2012/12/06 Released by Harlan Stenn <stenn@ntp.org>
+* sntp documentation cleanup.
+(4.2.7p331) 2012/12/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2114] Correctly calculate sntp's synch distance.
+(4.2.7p330) 2012/12/03 Released by Harlan Stenn <stenn@ntp.org>
+* autogen doc cleanup
+(4.2.7p329) 2012/12/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2278] ACTS flag3 mismatch between code and driver18.html.
+* Use an enum for the ACTS state table.
+* html doc reconciliation with DLM's copy.
+(4.2.7p328) 2012/11/30 Released by Harlan Stenn <stenn@ntp.org>
+* html doc reconciliation with DLM's copy.
+(4.2.7p327) 2012/11/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2024] Identify Events in the system status word in decode.html.'
+* [Bug 2040] Provide a command-line option for the identity key bits.
+* Create loc/darwin for Mac OSX
+(4.2.7p326) 2012/11/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1214] 'proto: precision = ...' should be at INFO, not NOTICE.
+* [Bug 2246] Clear sys_leap when voting says to disarm the leap.
+(4.2.7p325) 2012/11/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2202] ntpq.html: there is no "acv" billboard.
+* [Bug 2306] keep pps hack for Win32 even if user-mode/loopback
+ PPS API is activated on a serial line.
+(4.2.7p324) 2012/11/19 Released by Harlan Stenn <stenn@ntp.org>
+* Reinstate doc fix to authentic.html from Mike T.
+* [Bug 1223] cleanup for rlimit changes.
+* [Bug 2098] Install DLM's HTML documentation.
+* [Bug 2306] Added user-mode/loop-back PPS API provider for Win32
+(4.2.7p323) 2012/11/18 Released by Harlan Stenn <stenn@ntp.org>
+* html/ updates from Dave Mills.
+(4.2.7p322) 2012/11/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1223] Allow configurable values for RLIMIT_STACK and
+ RLIMIT_MEMLOCK.
+* [Bug 1320] Log ntpd's initial command-line parameters. (updated fix)
+* [Bug 2120] no sysexits.h under QNX.
+* [Bug 2123] cleanup to html/leap.html.
+(4.2.7p321) 2012/11/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1320] Log ntpd's initial command-line parameters.
+(4.2.7p320) 2012/11/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 969] Clarify ntpdate.html documentation about -u and ntpd.
+* [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM
+ messages with wrong version
+(4.2.7p319) 2012/11/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2296] Fix compile problem with building with old OpenSSL.
+(4.2.7p318) 2012/11/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2301] Remove spurious debug output from ntpq.
+(4.2.7p317) 2012/11/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line.
+(4.2.7p316) 2012/10/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2296] Update fix for Bug 2294 to handle --without-crypto.
+(4.2.7p315) 2012/10/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2294] ntpd crashes in FIPS mode.
+(4.2.7p314) 2012/10/23 Released by Harlan Stenn <stenn@ntp.org>
+* Document a tricky malloc() of dns_ctx in sntp.
+(4.2.7p313) 2012/10/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2291] sntp should report why it cannot open file.kod.
+* [Bug 2293] add support for SO_BINTIME, refine support for
+ SO_TIMESTAMPNS (bug 1374)
+(4.2.7p312) 2012/10/11 Released by Harlan Stenn <stenn@ntp.org>
+* Clean up testing/debugging of fix for [Bug 938] from sntp/main.c .
+(4.2.7p311) 2012/10/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 938] The argument to the -D flag takes a number, not a string.
+* [Bug 1013] ntpdate's HTML page claims wrong default version.
+* [Bug 1374] Support SO_TIMESTAMPNS.
+(4.2.7p310) 2012/10/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1374] Support SO_TIMESTAMPNS.
+* [Bug 2266] Remove deprecated refclock_trak.c from Windows Makefile
+ equivalents.
+* [Bug 2274] Bring libopts/enum.c back to (old) ANSI C compliance.
+(4.2.7p309) 2012/10/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2287] ntpdate returns 0 even if adjtime() call fails.
+(4.2.7p308) 2012/09/29 Released by Harlan Stenn <stenn@ntp.org>
+* CID 97198: Check return from ioctl() calls in refclock_acts.c.
+(4.2.7p307) 2012/09/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1997] Fix sntp broadcast timeouts.
+* [Bug 2234] Fix incorrect ntptrace html documentation.
+* [Bug 2262] Install html docs in $htmldir.
+* Fix typo in html/select.html.
+(4.2.7p306) 2012/09/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 752] ToS cleanup from Mike Tatarinov.
+(4.2.7p305) 2012/09/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6.
+* [Bug 1232] Convert SHM refclock to use struct timespec.
+* [Bug 2258] Add syslog message about leap insertion.
+* [Bug 2263] broadcast server doesn't work for host with
+ OS_MISSES_SPECIFIC_ROUTE_UPDATES.
+* [Bug 2271] Decode refclock types when built with --disable-all-clocks.
+* [Bug 2276] clk_sel240x.c #define's _XOPEN_SOURCE, breaking QNX6.
+* Updates to driver28.html.
+(4.2.7p304) 2012/09/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2264] Cleanup SEL240X Refclock.
+* In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN.
+(4.2.7p303) 2012/09/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1232] Add nanosecond support to SHM driver.
+(4.2.7p302) 2012/09/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2160] Log warning about expired leapseconds file.
+(4.2.7p301) 2012/09/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2164] Greater precision needed for ntpq offset report.
+* Clean the man5_MANS in ntpd/ .
+(4.2.7p300) 2012/09/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2262] Install sntp.html into htmldir.
+* [Bug 2270] Install fails due to repeated man5 page names.
+(4.2.7p299) 2012/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* More cleanup to the bootstrap script.
+(4.2.7p298) 2012/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* Handle additional man page sections in the bootstrap script.
+* Remove extraneous parens.
+* Add a missing "%s" syslog format string.
+(4.2.7p297) 2012/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* Fix mdoc2man.
+* Distribute ntp.conf.def and ntp.keys.def.
+(4.2.7p296) 2012/08/31 Released by Harlan Stenn <stenn@ntp.org>
+* Begin support for autogen maintaining ntp.conf and ntp.keys docs.
+* Upgrade to autogen-5.16.2 and libopts-36.5.11.
+* Potential bugfix for agtexi-cmd.tpl.
+(4.2.7p295) 2012/08/11 Released by Harlan Stenn <stenn@ntp.org>
+* Look for syslog's facilitynames[].
+(4.2.7p294) 2012/08/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2242] configure fails to detect getifaddrs function on Solaris.
+* [Bug 2249] Bad operator for 'test' in 'make check' of libevent.
+* [Bug 2252] palisade: formats nanosecs to a 6-char field.
+* Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
+* Fix && -> & typo in refclock_palisade.c debug statements.
+(4.2.7p293) 2012/08/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+* Documentation cleanup from Mike T.
+* Cleanup kclk_sel240x.o rules in libparse/Makefile.am.
+(4.2.7p292) 2012/08/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1545] Note why we are logging the Version string.
+* [Bug 1872] Remove legacy ppsclock fdpps, #ifdef PPS.
+* [Bug 2075] Fix spelling of 'incompatible'.
+* [Bug 2247] Get rid of the TRAK refclock - deprecated since 2006.
+* Clean up an exit status in ntpq.c.
+(4.2.7p291) 2012/07/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2241] MDNS registration should only happen if requested.
+(4.2.7p290) 2012/07/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1454] Add parse clock support for the SEL-240x GPS products.
+* CID 709185: refclock_chu.c will leak fd==0 (better fix)
+(4.2.7p289) 2012/07/16 Released by Harlan Stenn <stenn@ntp.org>
+* CID 97123: Future-proof possible change to refclock_nmea.c.
+* CID 97377: ntp-keygen.c's followlink() might not NUL-terminate.
+* CID 709185: refclock_chu.c will leak fd==0 (which should be impossible).
+(4.2.7p288) 2012/07/03 Released by Harlan Stenn <stenn@ntp.org>
+* CID 709173: Make sure a libisc function we do not use is called properly.
+(4.2.7p287) 2012/07/03 Released by Harlan Stenn <stenn@ntp.org>
+* Remove 1024 associations-per-server limit from ntpq.
+* Remove blank line between ntpq mreadvar associations.
+(4.2.7p286) 2012/06/28 Released by Harlan Stenn <stenn@ntp.org>
+* CID 97193: check return from sscanf() in ntp_config.c.
+* CID 709169: check return from open("/dev/null", 0) and friends.
+* CID 709207: Initialize "quality" for ulink_receive.
+(4.2.7p285) 2012/06/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2227] Enable mrulist access control via "restrict ... nomrulist".
+* Automake-1.12 wants us to use AM_PROG_AR.
+* Conditionalize msyslog messages about rejected mode 6 requests due to
+ nomodify and nomrulist restrictions under "logconfig +sysinfo".
+* Increment sys_restricted in a few rejection paths due to nomodify
+ restrictions where previosuly overlooked.
+(4.2.7p284) 2012/06/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2225] libevent configure hangs.
+* Update bundled libevent to git master, post libevent 2.1.1-alpha.
+(4.2.7p283) 2012/06/16 Released by Harlan Stenn <stenn@ntp.org>
+* In sntp/m4/ntp_openssl.m4, Support multiple package names for the
+ crypto library. Add legacy support for -Wl,-rpath.
+(4.2.7p282) 2012/06/15 Released by Harlan Stenn <stenn@ntp.org>
+* tickadj may need to be linked with PTHREAD_LIBS.
+(4.2.7p281) 2012/06/14 Released by Harlan Stenn <stenn@ntp.org>
+* U_INT32_MAX cleanup in include/ntp_types.h .
+* When linking, ntp_keygen and tickadj need $(LIBM).
+(4.2.7p280) 2012/06/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2224] Use-after-free in routing socket code after dropping root.
+(4.2.7p279) 2012/06/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2211] findbcastinter(): possibly undefined variable iface used.
+* [Bug 2220] Incorrect check for maximum association id in ntpq.
+(4.2.7p278) 2012/06/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2204] Build with --enable-getifaddrs=glibc fails.
+* [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+* [Bug 2191] dcfd -Y y2kcheck on CentOS 6.2 x86_64 breaks make check.
+(4.2.7p277) 2012/05/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2193] Building timestruct tests with Clang 3.1 fails.
+(4.2.7p276) 2012/05/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2179] Remove sntp/header.h.
+(4.2.7p275) 2012/04/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1744] Remove obsolete ntpdate/ntptime* items.
+(4.2.7p274) 2012/04/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2174] ntpd rejects source UDP ports less than 123 as bogus.
+(4.2.7p273) 2012/04/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2141] handle_sigio() calls get_systime(), which must be
+ reentrant when SIGIO is used. Sanity checks relative to the prior
+ get_systime() are disabled in ntpd on systems with signaled I/O, but
+ active in sntp and ntpdate.
+* Correct authnumfreekeys accounting broken in 4.2.7p262.
+(4.2.7p272) 2012/04/14 Released by Harlan Stenn <stenn@ntp.org>
+* LCRYPTO is gone - replace with VER_SUFFIX.
+* Change the link order for ntpsntpd.
+* Remove extra 'nlist' check from configure.ac.
+(4.2.7p271) 2012/04/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1122] openssl detection via pkg-config fails when no additional
+ -Idir flags are needed.
+* Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+(4.2.7p270) 2012/03/26 Released by Harlan Stenn <stenn@ntp.org>
+* Update driver45.html page.
+(4.2.7p269) 2012/03/25 Released by Harlan Stenn <stenn@ntp.org>
+* Clean up configure.ac.
+* Cleanup configure.ac's TSYNC PCI section.
+(4.2.7p268) 2012/03/24 Released by Harlan Stenn <stenn@ntp.org>
+* Update driver45.html page.
+(4.2.7p267) 2012/03/23 Released by Harlan Stenn <stenn@ntp.org>
+* Initial cut at a basic driver45.html page.
+(4.2.7p266) 2012/03/21 Released by Harlan Stenn <stenn@ntp.org>
+* Add refclock_tsyncpci.c (driver 45) supporting Spectracom TSYNC timing
+ boards.
+(4.2.7p265) 2012/03/20 Released by Harlan Stenn <stenn@ntp.org>
+* Treat zero counter as indication of precise system time in Windows
+ PPSAPI helper function pps_ntp_timestamp_from_counter(), enabling
+ PPSAPI providers to use the Windows 8 precise clock directly.
+(4.2.7p264) 2012/03/14 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2160] Note if leapseconds file is past its prime.
+* Use GetSystemTimePreciseAsFileTime() on Windows 8.
+(4.2.7p263) 2012/03/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2156] clock instability with LOCAL driver, from Miroslav Lichvar.
+* [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+(4.2.7p262) 2012/02/29 Released by Harlan Stenn <stenn@ntp.org>
+* Improve ntpd scalability for servers with many trusted keys.
+(4.2.7p261) 2012/02/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2048] add the clock variable timecode to SHM refclock.
+(4.2.7p260) 2012/02/24 Released by Harlan Stenn <stenn@ntp.org>
+* Fix the check-scm-rev invocation in several Makefile.am's.
+(4.2.7p259) 2012/02/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2148] ntpd 4.2.7p258 segfault with 0x0100000 bit in NMEA mode.
+* refclock_nmea.c merge cleanup thanks to Juergen Perlinger.
+(4.2.7p258) 2012/02/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2140] Rework of Windows I/O completion port handling to avoid
+ garbling serial input in UNIX line discipline emulation.
+* [Bug 2143] NMEA driver: discard data if quality indication not good,
+ add statistic counters (mode bit enabled) to clockstats file.
+(4.2.7p257) 2012/02/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2135] defer calls to 'io_input' to main thread under Windows.
+(4.2.7p256) 2012/02/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2131] Set the system variable settimeofday only after clock step.
+* [Bug 2134] --enable-C99-snprintf does not force rpl_snprintf use.
+(4.2.7p255) 2012/01/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 603] Only link with nlist()-related libraries when needed:
+ More cleanup.
+(4.2.7p254) 2012/01/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 603] Only link with nlist()-related libraries when needed.
+(4.2.7p253) 2012/01/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2126] Compile error on Windows with libopts from Autogen 5.14.
+* Update one of the license URLs.
+(4.2.7p252) 2012/01/25 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to autogen-5.14 (and libopts-36.1.11).
+(4.2.7p251) 2012/01/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2115] ntptrace should accept both rootdispersion and rootdisp.
+(4.2.7p250) 2012/01/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2113] Warn about ignored extra args in ntpq.
+* Update the copyright year.
+(4.2.7p249) 2012/01/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2111] Remove minpoll delay before iburst for pool and
+ manycastclient.
+* Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+(4.2.7p248) 2012/01/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2109] "make clean check" is broken with gtest available.
+* [Bug 2110] systime.c typo breaks build on microsecond clocks.
+(4.2.7p247) 2012/01/07 Released by Harlan Stenn <stenn@ntp.org>
+* Fix build break triggered by updating deps-ver and libntp/systime.c at
+ the same time by explicitly depending systime_s.c on systime.c.
+(4.2.7p246) 2012/01/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2104] ntpdc fault with oversize -c command.
+* [Bug 2106] Fix warnings when using -Wformat-security.
+* Refactor timespecops.h and timevalops.h into inline functions.
+(4.2.7p245) 2011/12/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2100] conversion problem with timespec/timeval <--> l_fp fixed;
+ added tests to expose the bug.
+(4.2.7p244) 2011/12/25 Released by Harlan Stenn <stenn@ntp.org>
+* Updates from 4.2.6p5.
+(4.2.7p243) 2011/12/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2095] ntptrace now needs 'rv' instead of 'pstat', reported
+ by Michael Tatarinov.
+(4.2.7p242) 2011/12/21 Released by Harlan Stenn <stenn@ntp.org>
+* Include missing html/icons/sitemap.png, reported by Michael Tatarinov.
+* Documentation updates from Dave Mills.
+(4.2.7p241) 2011/12/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+* [Bug 2037] Fuzzed non-interpolated clock may decrease.
+* [Bug 2068] "tos ceiling" default and cap changed to 15.
+* Floor peer delay using system precision, as with jitter, reflecting
+ inability to measure shorter intervals.
+(4.2.7p240) 2011/12/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2092] clock_select() selection jitter miscalculated.
+* [Bug 2093] Reintroduce smaller stratum factor to system peer metric.
+(4.2.7p239) 2011/12/11 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p238) 2011/12/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2082] from 4.2.6p5-RC3: 3-char refid sent by ntpd 4.2.6p5-RC2
+ ends with extra dot.
+* [Bug 2085] from 4.2.6p5-RC3: clock_update() sys_rootdisp calculation
+ omits root delay.
+* [Bug 2086] from 4.2.6p5-RC3: get_systime() should not offset by
+ sys_residual.
+* [Bug 2087] from 4.2.6p5-RC3: sys_jitter calculation overweights
+ sys.peer jitter.
+* from 4.2.6p5-RC3: Ensure NULL peer->dstadr is not accessed in orphan
+ parent selection.
+(4.2.7p237) 2011/12/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2050] from 4.2.6p5-RC2: Orphan mode stratum counting to infinity.
+* [Bug 2059] from 4.2.6p5-RC2: optional billboard column "server" does
+ not honor -n.
+* [Bug 2066] from 4.2.6p5-RC2: ntpq lopeers ipv6 "local" column overrun.
+* [Bug 2068] from 4.2.6p5-RC2: ntpd sends nonprintable stratum 16 refid
+ to ntpq.
+* [Bug 2069] from 4.2.6p5-RC2: broadcastclient, multicastclient spin up
+ duplicate ephemeral associations without broadcastdelay.
+* [Bug 2072] from 4.2.6p5-RC2: Orphan parent selection metric needs
+ ntohl().
+* [Bug 2073] Correct ntpq billboard's MODE_PASSIVE t from 'u' to 'S'.
+* from 4.2.6p5-RC2: Exclude not-yet-determined sys_refid from use in
+ loopback TEST12 (from Dave Mills).
+* from 4.2.6p5-RC2: Never send KoD rate limiting response to MODE_SERVER.
+* Floor calculation of sys_rootdisp at sys_mindisp in clock_update (from
+ Dave Mills).
+* Restore 4.2.6 clock_combine() weighting to ntp-dev, reverting to pre-
+ 4.2.7p70 method while also avoiding divide-by-zero (from Dave Mills).
+* Round l_fp traffic interval when converting to integer in rate limit
+ and KoD calculation.
+(4.2.7p236) 2011/11/16 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p235) 2011/11/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2052] Autokey CRYPTO_ASSOC host@group vallen needs checking.
+(4.2.7p234) 2011/11/07 Released by Harlan Stenn <stenn@ntp.org>
+* Clean up -libm entries regarding libntp.a
+(4.2.7p233) 2011/11/06 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p232) 2011/11/05 Released by Harlan Stenn <stenn@ntp.org>
+* Update the NEWS file so we note the default disable of mode 7 requests.
+* Clean up some bitrotted code in libntp/socket.c.
+(4.2.7p231) 2011/11/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1940] ignore auth key if hex decoding fails.
+* Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+(4.2.7p230) 2011/11/01 Released by Harlan Stenn <stenn@ntp.org>
+* Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+* Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+* Documentation updates from Dave Mills.
+(4.2.7p229) 2011/10/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1995] fix wrong use of ZERO() macro in 'ntp_calendar.c'
+(4.2.7p228) 2011/10/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1995] add compile time stamp based era unfolding for
+ 'step_systime()' and necessary support to 'ntp-calendar.c'.
+(4.2.7p227) 2011/10/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2036] gcc 2.95.3 preprocessor can't nest #ifdef in macro args.
+* A number of compiler warnings eliminated.
+(4.2.7p226) 2011/10/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec.
+* Documentation updates from Dave Mills.
+(4.2.7p225) 2011/10/15 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p224) 2011/10/14 Released by Harlan Stenn <stenn@ntp.org>
+* ntpq mrulist shows intermediate counts every five seconds while
+ retrieving list, and allows Ctrl-C interruption of the retrieval,
+ showing the incomplete list as retrieved. Reduce delay between
+ successive mrulist retrieval queries from 30 to 5 msec. Do not
+ give up mrulist retrieval when a single query times out.
+(4.2.7p223) 2011/10/12 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p222) 2011/10/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2029] "make check" clutters syslog.
+* Log signal description along with number on ntpd exit.
+(4.2.7p221) 2011/10/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+* [Bug 2028] ntpd -n (nofork) redirects logging to stderr.
+* Documentation updates from Dave Mills.
+(4.2.7p220) 2011/10/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1945] mbg_gps166.h use of _TM_DEFINED conflicts with MS VC.
+* [Bug 1946] parse_start uses open; does not work on Windows.
+* [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+* [Bug 2024] Remove unused system event code EVNT_CLKHOP.
+(4.2.7p219) 2011/10/04 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p218) 2011/10/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2019] Allow selection of cipher for private key files.
+* Documentation updates from Dave Mills.
+* ntp-keygen private key cipher default now triple-key triple DES CBC.
+* ntp-keygen -M is intended to ignore all other defaults and
+ options, so do not attempt to open existing Autokey host certificate
+ before generating symmetric keys and terminating.
+* Restore IFF, MV, and GQ identity parameter filename convention to
+ ntpkey_<scheme>par_<group/host> in ntpd, matching ntp-keygen.
+* Change some error logging to syslog to ignore logconfig mask, such
+ as reporting PPSAPI failure in NMEA and WWVB refclocks.
+* ntp-keygen on Windows XP and later systems will now create links
+ expected by ntpd. They are hardlinks on Windows, soft on POSIX.
+* Conditionalize NMEA serial open message under clockevent.
+* Send all peer variables to trappers in report_event().
+(4.2.7p217) 2011/09/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2020] ntp-keygen -s no longer sets host in cert file name.
+* [Backward Incompatible] ntp-keygen -i option long name changed from
+ misleading --issuer-name to --ident.
+(4.2.7p216) 2011/09/27 Released by Harlan Stenn <stenn@ntp.org>
+* sntp documentation tag cleanup.
+* mdoc2man improvements.
+(4.2.7p215) 2011/09/24 Released by Harlan Stenn <stenn@ntp.org>
+* Use patched mdoc2man script, from Eric Feng.
+* Sync with ntp-4.2.6p4 (a no-op).
+(4.2.7p214) 2011/09/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1981] Initial offset convergence applies frequency correction 2x
+ with kernel discipline.
+* [Bug 2008] Initial offset convergence degraded with 500 PPM adjtime().
+* [Bug 2009] EVNT_NSET adj_systime() mishandled by Windows ntpd.
+(4.2.7p213) 2011/09/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1999] NMEA does not send PMOTG messages any more.
+(4.2.7p212) 2011/09/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2003] from 4.2.6p4-RC3: ntpq_read_assoc_peervars() broken.
+(4.2.7p211) 2011/09/01 Released by Harlan Stenn <stenn@ntp.org>
+* Update libevent to git head (2.1 branch) as of 2.0.14-stable.
+(4.2.7p210) 2011/08/31 Released by Harlan Stenn <stenn@ntp.org>
+* Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000].
+(4.2.7p209) 2011/08/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2000] ntpd worker threads must block signals expected in main
+ thread.
+* [Bug 2001] add ntpq -c timerstats like ntpdc -c timerstats.
+* [Bug 2001] from 4.2.6p4-RC3: ntpdc timerstats reports overruns as
+ handled.
+* Update sntp tests to track the change of root dispersion to
+ synchronization distance.
+(4.2.7p208) 2011/08/24 Released by Harlan Stenn <stenn@ntp.org>
+* Fix the CLOCK_MONOTONIC TRACE() message.
+(4.2.7p207) 2011/08/22 Released by Harlan Stenn <stenn@ntp.org>
+* Restore the original CLOCK_MONOTONIC output format in sntp.
+* Cleanups for ntp-wait-opts.def and ntp.keys.def .
+(4.2.7p206) 2011/08/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1993] ntpd Windows port adj_systime() broken in 4.2.7p203.
+* sntp documentation and behavior improvements suggested by
+ Steven Sommars.
+* Have sntp report synchronization distance instead of root dispersion.
+* Clean up ntp-wait-opts.def .
+(4.2.7p205) 2011/08/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1992] util/tg2 doesn't compile, needs libntp.
+(4.2.7p204) 2011/08/16 Released by Harlan Stenn <stenn@ntp.org>
+* Added support for Garmin's $PGRMF sentence to NMEA driver
+* [Bug 1988] Better sntp send failed error message needed.
+* [Bug 1989] sntp manual page sometimes refers to SNTP as a program.
+* [Bug 1990] sntp output should include stratum.
+(4.2.7p203) 2011/08/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1986] Require Visual C++ 2005 or later compilers in Windows port.
+* Actually use long long for (u_)int64 by correcting spelling of
+ SIZEOF_LONG_LONG in ntp_types.h.
+* Force .exe minimum Windows version to 0x0400 to allow NT4 in
+ vs2005/*.vcproj files.
+* Fix make distcheck with --enable-libevent-regress problem with
+ unwritable $srcdir.
+* Correct init_logging()'s def_syslogmask type to u_int32 following
+ change of ntp_syslogmask from u_long to u_int32 in p202.
+(4.2.7p202) 2011/08/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1983] --without-sntp build breaks in sntp subdir.
+* [Bug 1984] from 4.2.6p4-RC3: ntp/libisc fails to compile on OS X 10.7.
+* [Bug 1985] from 4.2.6p4-RC3: "logconfig =allall" rejected.
+(4.2.7p201) 2011/08/05 Released by Harlan Stenn <stenn@ntp.org>
+* sntp: change -h/--headspace to -g/--gap, and change the default gap
+ from 10 to 50ms
+* [Backward Incompatible] from 4.2.6p4: sntp: -l/--filelog ->
+ -l/--logfile, to be consistent with ntpd.
+* Documentation updates from Dave Mills.
+* From 4.2.6p4: libopts/file.c fix from Bruce Korb (arg-type=file).
+(4.2.7p200) 2011/08/04 Released by Harlan Stenn <stenn@ntp.org>
+* Sync with 4.2.6p4-RC2.
+(4.2.7p199) 2011/07/29 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p198) 2011/07/28 Released by Harlan Stenn <stenn@ntp.org>
+* remove old binsubdir stuff from SNTP, as NTP_LOCINFO does that now.
+(4.2.7p197) 2011/07/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1975] from 4.2.6p4-RC2: libntp/mktime.c won't work with 64-bit
+ time_t
+* [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
+* [Bug 1977] Fix flag/description mismatches in ntp-keygen-opts.def.
+* Do not force "legacy" when --with-locfile is not given, genLocInfo
+ will find the correct default for the system.
+* Fix warnings in ntp_request.c ([Bug 1973] oversight) and sntp/main.c
+ (CID 159, apparent overrun due to union, actually correct).
+* Update sntp/loc/solaris to conform to stock locations.
+(4.2.7p196) 2011/07/27 Released by Harlan Stenn <stenn@ntp.org>
+* DEFAULT INSTALLATION DIRECTORY CHANGES ON SOME OSes: to get the old
+ behavior, pass --with-locfile=legacy to 'configure'
+* [Bug 1972] from 4.2.6p4-RC2: checking for struct rtattr fails.
+* [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+* Removed sntp/m4/ntp_bindir.m4 - no longer needed.
+* Move loc/ to sntp/loc/ .
+* Move scripts/cvo.sh to sntp/scripts/cvo.sh .
+* Move scripts/genLocInfo to sntp/scripts/genLocInfo .
+* Give NTP_LOCINFO an optional path-to argument.
+* Remove hacks to get NTP_LOCINFO-related data to sntp/ .
+* Move sntp/include/mansec2subst.sed to sntp/scripts/mansec2subst.sed .
+* If no "more specific" loc file is found for redhat* or fedora*,
+ look for a loc/redhat file.
+* If no "more specific" loc file is found and uname says this is Linux,
+ look for a loc/linux file.
+* Improve the help text: --with-locfile=XXX .
+* work around solaris /bin/sh issues for genLocInfo.
+(4.2.7p195) 2011/07/25 Released by Harlan Stenn <stenn@ntp.org>
+* Added loc/redhat.
+(4.2.7p194) 2011/07/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1608] from 4.2.6p4-RC2: Parse Refclock driver should honor
+ trusttime.
+* Add support for installing programs and scripts to libexec.
+* Added loc/solaris.
+(4.2.7p193) 2011/07/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1970] from 4.2.6p4-RC2: UNLINK_EXPR_SLIST() causes crash if list
+ is empty.
+* Update libevent to 2.1 HEAD as of merge of 2.0.13-stable-dev.
+* Match addr_eqprefix() sizeof and memcpy destination to make it clear
+ to static analysis that there is no buffer overrun (CID 402).
+(4.2.7p192) 2011/07/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1966] Broken FILES section for ntp.keys.def.
+(4.2.7p191) 2011/07/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1948] Update man page section layout.
+* [Bug 1963] add reset command for ntpq :config, similar to ntpdc's.
+* [Bug 1964] --without-sntp should not build sntp.
+(4.2.7p190) 2011/07/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1961] from 4.2.6p4: html2man update: distribute ntp-wait.html.
+* Require autogen-5.12.
+(4.2.7p189) 2011/07/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1134] from 4.2.6p4-RC1: ntpd fails binding to tentative IPv6
+ addresses.
+* [Bug 1790] from 4.2.6p4-RC1: Update config.guess and config.sub to
+ detect AIX6.
+(4.2.7p188) 2011/06/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1958] genLocInfo must export PATH.
+* ntp-wait: some versions of ntpd spell "associd" differently.
+(4.2.7p187) 2011/06/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1954] Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am.
+* Implement --with-locfile=filename configure argument. If filename is
+ empty we'll look under loc/ for a good fit. If the filename contains
+ a / character, it will be treated as a "normal" pathname. Otherwise,
+ that explicit file will be searched for under loc/ .
+(4.2.7p186) 2011/06/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1950] Control installation of event_rpcgen.py.
+* Update .point-changed-filelist for the new man pages.
+* Update the building of OS-specific programs.
+* Finish conversion to genLocInfo.
+* validate MANTAGFMT in genLocInfo.
+* Documentation update from Dave Mills.
+(4.2.7p185) 2011/06/21 Released by Harlan Stenn <stenn@ntp.org>
+* ntp_locs.m4: handle the case where . is not in the PATH.
+* More genLocInfo cleanup.
+(4.2.7p184) 2011/06/20 Released by Harlan Stenn <stenn@ntp.org>
+* Added ntp_locs.m4.
+* genLocInfo improvements.
+* Add the man page tag "flavor" to the loc.* files.
+* Add/distribute genLocInfo.
+(4.2.7p183) 2011/06/19 Released by Harlan Stenn <stenn@ntp.org>
+* Update the autogen include list for scripts/Makefile.am.
+* Added loc.freebsd (and distribute it).
+* Added loc.legacy (and distribute it).
+(4.2.7p182) 2011/06/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1304] Update sntp.html to reflect new implementation.
+* Update .point-changed-filelist .
+* ntpdc documentation fixes.
+* Update ntp-wait autogen docs.
+* Update the ntpd autogen docs.
+* Update the ntpsnmpd autogen docs.
+* Use autogen to produce ntp-keygen docs.
+* Add "license name" to ntp.lic for autogen-5.11.10.
+* Prepare for ntp.keys.5.
+(4.2.7p181) 2011/06/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1938] addr_eqprefix() doesn't clear enough storage.
+(4.2.7p180) 2011/06/06 Released by Harlan Stenn <stenn@ntp.org>
+* Upgrade to libevent-2.0.12.
+* More sntp.1 cleanups.
+* Produce ntpq.1 with the new autogen macros.
+* Remove the deprecated "detail" stanza from ntpdc-opts.def.
+(4.2.7p179) 2011/06/03 Released by Harlan Stenn <stenn@ntp.org>
+* Update cmd-doc.tlib to autogen-5.11.10pre5.
+* Upgrade local autoopts templates to 5.11.10pre5.
+(4.2.7p178) 2011/06/02 Released by Harlan Stenn <stenn@ntp.org>
+* Update the std_def_list to include the ntp.lic file.
+* Distribute the ntp.lic file.
+* Add http://ntp.org/license to the ntp.lic file.
+(4.2.7p177) 2011/06/01 Released by Harlan Stenn <stenn@ntp.org>
+* Use the latest autogen's new copyright template code.
+* Clean up the ntp.lic file.
+(4.2.7p176) 2011/05/31 Released by Harlan Stenn <stenn@ntp.org>
+* sntp documentation cleanup.
+* autogen documentation template cleanup.
+(4.2.7p175) 2011/05/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1936] Correctly set IPV6_MULTICAST_LOOP.
+* cmd-doc.tlib cleanup from Bruce Korb.
+* sntp documentation cleanup.
+(4.2.7p174) 2011/05/28 Released by Harlan Stenn <stenn@ntp.org>
+* ntpdc documentation cleanup.
+* sntp documentation cleanup.
+* Don't build libevent with openssl support. Right now, libevent
+ doesn't use pkg-config to find openssl's installation location.
+(4.2.7p173) 2011/05/25 Released by Harlan Stenn <stenn@ntp.org>
+* Typo in emalloc.c hides file and line number from emalloc() error msg.
+* parsesolaris.c compile fails on SPARC Solaris with conflicting printf.
+* ntp_util.c compile fails on AIX and OSF with conflicting statsdir.
+(4.2.7p172) 2011/05/24 Released by Harlan Stenn <stenn@ntp.org>
+* Remove hardcoded 1/960 s. fudge for <CR> transmission time at 9600 8n1
+ from WWVB/Spectracom driver introduced in 4.2.7p169.
+(4.2.7p171) 2011/05/23 Released by Harlan Stenn <stenn@ntp.org>
+* Eliminate warnings about shadowing global "basename" on Linux.
+* Use filegen_config() consistently when changing filegen options.
+* mprintf() should go to stdout, not stderr. DPRINTF() uses mprintf().
+* Repair a few simulator problems (more remain).
+* Documentation updates from Dave Mills.
+(4.2.7p170) 2011/05/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1932] libevent/util_internal.h builtin_expect compile error with
+ gcc 2.95.
+* Use 64-bit scalars in LFPTOD() and DTOLFP() on more platforms by
+ conditionalizing on HAVE_U_INT64 rather than UINT64_MAX.
+(4.2.7p169) 2011/05/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs.
+(4.2.7p168) 2011/05/16 Released by Harlan Stenn <stenn@ntp.org>
+* Convert receive buffer queue from doubly-linked list to FIFO.
+(4.2.7p167) 2011/05/14 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1927] io_closeclock() should purge pending recvbufs.
+* [Bug 1931] cv always includes fudgetime1, never fudgetime2.
+* Use acts_close() in acts_shutdown() to avoid leaving a stale lockfile
+ if unpeered via runtime configuration while the modem is open.
+* Correct acts_close() test of pp->io.fd to see if it is open.
+* 4.2.7p164 documentation updates re: 'tos orphanwait' expanded scope.
+(4.2.7p166) 2011/05/13 Released by Harlan Stenn <stenn@ntp.org>
+* If we have local overrides for autogen template files, use them.
+* Convert more of the sntp-opt.def documentation from man to mdoc.
+(4.2.7p165) 2011/05/11 Released by Harlan Stenn <stenn@ntp.org>
+* Convert snmp docs to mdoc format, which requires autogen 5.11.9.
+* from 4.2.6p4-RC1: Require autogen 5.11.9.
+(4.2.7p164) 2011/05/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 988] Local clock eats up -g option, so ntpd stops with large
+ initial time offset.
+* [Bug 1921] LOCAL, ACTS drivers with "prefer" excluded from initial
+ candidate list.
+* [Bug 1922] "tos orphanwait" applied incorrectly at startup.
+* [Bug 1923] orphan parent favored over LOCAL, ACTS drivers.
+* [Bug 1924] Billboard tally codes sometimes do not match operation,
+ variables.
+* Change "pool DNS" messages from msyslog to debug trace output.
+* Remove unused FLAG_SYSPEER from peer->status.
+* Respect "tos orphanwait" at startup. Previously there was an
+ unconditional 300 s. startup orphanwait, though other values were
+ respected for subsequent orphan wait periods after no_sys_peer events.
+* Apply "tos orphanwait" (def. 300 seconds) to LOCAL and ACTS reference
+ clock drivers, in addition to orphan parent operation. LOCAL and ACTS
+ are not selectable during the orphanwait delay at startup and after
+ each no_sys_peer event. This prevents a particular form of clock-
+ hopping, such as using LOCAL briefly at startup before remote peers
+ are selectable. This fixes the issue reported in [Bug 988].
+* Documentation updates from Dave Mills.
+(4.2.7p163) 2011/05/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1911] missing curly brace in libntp/ntp_rfc2553.c
+(4.2.7p162) 2011/05/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1910] Support the Tristate Ltd. TS-GPSclock-01.
+(4.2.7p161) 2011/05/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1904] 4.2.7p160 Windows build broken (POSIX_SHELL).
+* [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+* Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+* Add missing --enable-local-libevent help to top-level configure.
+(4.2.7p160) 2011/05/01 Released by Harlan Stenn <stenn@ntp.org>
+* from 4.2.6p4-RC1: Upgrade to libopts 35.0.10 from AutoGen 5.11.9pre8.
+* [Bug 1901] Simulator does not set progname.
+(4.2.7p159) 2011/04/28 Released by Harlan Stenn <stenn@ntp.org>
+* Fix a couple of unused variable warnings.
+* cleanup in timespecops.c / timevalops.c
+(4.2.7p158) 2011/04/24 Released by Harlan Stenn <stenn@ntp.org>
+* Update libevent --disable-libevent-regress handling to work when
+ building libevent using mingw.
+(4.2.7p157) 2011/04/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1890] 4.2.7p156 segfault in duplicate freeaddrinfo().
+(4.2.7p156) 2011/04/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1851] freeaddrinfo() called after getaddrinfo() fails.
+(4.2.7p155) 2011/04/18 Released by Harlan Stenn <stenn@ntp.org>
+* Fix leak in refclock_datum.c start failure path.
+(4.2.7p154) 2011/04/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1887] DNS fails on 4.2.7p153 using threads.
+(4.2.7p153) 2011/04/16 Released by Harlan Stenn <stenn@ntp.org>
+* A few more Coverity Scan cleanups.
+(4.2.7p152) 2011/04/15 Released by Harlan Stenn <stenn@ntp.org>
+* Update embedded libevent to current 2.1 git HEAD.
+(4.2.7p151) 2011/04/14 Released by Harlan Stenn <stenn@ntp.org>
+* Detect vsnprintf() support for "%m" and disable our "%m" expansion.
+* Add --enable-c99-sprintf to configure args for -noopenssl variety of
+ flock-build to avoid regressions in (v)snprintf() replacement.
+* More msnprintf() unit tests.
+* Coverity Scan error checking fixes.
+* Log failure to fetch time from HOPF_P hardware.
+* Check HOPF_S sscanf() conversion count before converted values.
+(4.2.7p150) 2011/04/13 Released by Harlan Stenn <stenn@ntp.org>
+* Remove never-used, incomplete ports/winnt/ntpd/refclock_trimbledc.[ch]
+* On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements (http://www.jhweiss.de/software/snprintf.html)
+* Remove remaining sprintf() calls except refclock_ripencc.c (which is
+ kept out of --enable-all-clocks as a result), upstream libs which use
+ sprintf() only after careful buffer sizing.
+(4.2.7p149) 2011/04/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1881] describe the {+,-,s} characters in configure --help output.
+(4.2.7p148) 2011/04/09 Released by Harlan Stenn <stenn@ntp.org>
+* Use _mkgmtime() as timegm() in the Windows port, rather than
+ libntp/mktime.c's timegm(). Fixed [Bug 1875] on Windows using the old
+ asn2ntp() code from before 4.2.7p147.
+* ntp_crypto.c string buffer safety.
+* Remove use of MAXFILENAME in mode 7 (ntpdc) on-wire structs.
+* Change ntpd MAXFILENAME from 128 to 256 to match ntp-keygen.
+* Buffer safety and sign extension fixes (thanks Coverity Scan).
+(4.2.7p147) 2011/04/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1875] 'asn2ntp()' rewritten with 'caltontp()'; 'timegm()'
+ substitute likely to crash with 64bit time_t.
+(4.2.7p146) 2011/04/05 Released by Harlan Stenn <stenn@ntp.org>
+* String buffer safety cleanup, converting to strlcpy() and strlcat().
+* Use utmpname() before pututline() so repeated steps do not
+ accidentally record into wtmp where utmp was intended.
+* Use setutent() before each pututline() including first.
+(4.2.7p145) 2011/04/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1840] ntp_lists.h FIFO macros buggy.
+(4.2.7p144) 2011/04/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1874] ntpq -c "rv 0 sys_var_list" empty.
+(4.2.7p143) 2011/03/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1732] ntpd ties up CPU on disconnected USB refclock.
+* [Bug 1861] tickadj build failure using uClibc.
+* [Bug 1862] in6addr_any test in configure fooled by arm gcc 4.1.3 -O2.
+* Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+* Remove "signal_no_reset: signal 17 had flags 4000000" logging, as it
+ indicates no problem and is interpreted as an error. Previously some
+ bits had been ignored one-by-one, but Linux SA_RESTORER definition is
+ unavailable to user headers.
+(4.2.7p142) 2011/03/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1844] ntpd 4.2.7p131 NetBSD, --gc-sections links bad executable.
+* Fix "make distcheck" break in libevent/sample caused by typo.
+(4.2.7p141) 2011/03/20 Released by Harlan Stenn <stenn@ntp.org>
+* Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+* Compare entire timestamp to reject duplicates in refclock_pps().
+(4.2.7p140) 2011/03/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
+* Add --disable-thread-support to one flock-build variation.
+* One more lock-while-init in lib/isc/task.c to quiet lock analysis.
+(4.2.7p139) 2011/03/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
+(4.2.7p138) 2011/03/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1846] MacOSX: debug symbol not found by propdelay or tickadj.
+(4.2.7p137) 2011/03/07 Released by Harlan Stenn <stenn@ntp.org>
+* Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+* Declare debug in libntp instead of each program. Expose extern
+ declaration to utilities, libntp, and DEBUG ntpd.
+* Lock under-construction task, taskmgr objects to satisfy Coverity's
+ mostly-correct assumptions about which variables are protected by
+ which locks.
+(4.2.7p136) 2011/03/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1839] 4.2.7p135 still installs libevent ev*.h headers.
+(4.2.7p135) 2011/03/02 Released by Harlan Stenn <stenn@ntp.org>
+* libevent: When building on systems with CLOCK_MONOTONIC available,
+ separate the internal timeline (possibly counting since system boot)
+ from the gettimeofday() timeline in event_base cached timevals. Adds
+ new event_base_tv_cached() to retrieve cached callback round start
+ time on the internal timeline, and changes
+ event_based_gettimeofday_cached() to always return times using the
+ namesake timeline. This preserves the benefit of using the never-
+ stepped monotonic clock for event timeouts while providing clients
+ with times consistently using gettimeofday().
+* Correct event_base_gettimeofday_cached() workaround code in
+ sntp to work with corrected libevent.
+* Remove sntp l_fp_output() test now that it uses prettydate().
+* [Bug 1839] 4.2.7p131 installs libevent ev*.h headers.
+* Ensure CONFIG_SHELL is not empty before relying on it for #! scripts.
+(4.2.7p134) 2011/02/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1837] Build fails on Win7 due to regedit requiring privilege.
+* Provide fallback definitions for GetAdaptersAddresses() for Windows
+ build environments lacking iphlpapi.h.
+* Rename file containing 1.xxxx ChangeSet revision from version to
+ scm-rev to avoid invoking GNU make implicit rules attempting to
+ compile version.c into version. Problem was with sntp/version.o
+ during make distcheck after fix for spurious sntp rebuilds.
+* Add INC_ALIGNED_PTR() macro to align pointers like malloc().
+(4.2.7p133) 2011/02/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+* Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
+ tearoff (if required) and sntp are compiled after the rest.
+* Use a single set of Automake options for each package in configure.ac
+ AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
+* Correct spurious sntp rebuilds triggered by a make misperception
+ sntp/version was out-of-date relative to phony target FRC.version.
+* Do not cache paths to perl, test, or pkg-config, searching the PATH
+ at configure time is worth it to pick up tool updates.
+(4.2.7p132) 2011/02/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1832] ntpdate doesn't allow timeout > 2s.
+* [Bug 1833] The checking sem_timedwait() fails without -pthread.
+* ElectricFence was suffering bitrot - remove it. valgrind works well.
+* Enable all relevant automake warnings.
+* Correct Solaris 2.1x PTHREAD_ONCE_INIT extra braces test to avoid
+ triggering warnings due to excess braces.
+* Remove libevent-cfg from sntp/Makefile.am.
+* Provide bug report and URL options to Autoconf.
+* Avoid relying on remake rules for routine build/flock-build for
+ libevent as for the top-level and sntp subproject.
+(4.2.7p131) 2011/02/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1087] -v/--normalverbose conflicts with -v/--version in sntp.
+* [Bug 1088] sntp should (only) report the time difference without -s/-a.
+* older autoconf sometimes dislikes [].
+* Move "can't write KoD file" warning from sntp shutdown to startup.
+* refclock_acts.c cleanup from Dave Mills.
+* Convert sntp to libevent event-driven socket programming. Instead of
+ blocking name resolution and querying one NTP server at a time,
+ resolve server names and send NTP queries without blocking. Add
+ sntp command-line options to adjust timing and optionally wait for all
+ servers to respond instead of exiting after the first.
+* Import libevent 2.0.10-stable plus local patches as a tearoff, used
+ only if the target system lacks an installed libevent 2.0.9 or later.
+* Move blocking worker and resolver to libntp from ntpd.
+* Use threads rather than forked child processes for blocking worker
+ when possible. Override with configure --disable-thread-support.
+* Move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp, use them in sntp.
+* Test --without-sntp in flock-build script's -no-refclocks variety.
+* Avoid invoking config.status twice in a row in build script.
+* Move more m4sh tests needed by libntp to shared .m4 files.
+* Split up ntp_libntp.m4 into smaller, more specific subsets.
+* Enable gcc -Wcast-align, fix many instances of warnings when casting
+ a pointer to a more-strictly-aligned underlying type.
+(4.2.7p130) 2011/02/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1811] Update the download location in WHERE-TO-START.
+(4.2.7p129) 2011/02/09 Released by Harlan Stenn <stenn@ntp.org>
+* Add missing "break;" to ntp_control.c ctl_putsys() for caliberrs, used
+ by ntpq -c kerninfo introduced in 4.2.7p104.
+* Fix leak in ntp_control.c read_mru_list().
+(4.2.7p128) 2011/01/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1799] ntpq mrv crash.
+* [Bug 1801] ntpq mreadvar requires prior association caching.
+(4.2.7p127) 2011/01/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1797] Restore stale timestamp check from the RANGEGATE cleanup.
+(4.2.7p126) 2011/01/27 Released by Harlan Stenn <stenn@ntp.org>
+* Fix unexposed fencepost error in format_time_fraction().
+* Add more unit tests for timeval_tostr() and timespec_tostr().
+(4.2.7p125) 2011/01/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1794] ntpq -c rv missing clk_wander information.
+* [Bug 1795] ntpq readvar does not display last variable.
+(4.2.7p124) 2011/01/25 Released by Harlan Stenn <stenn@ntp.org>
+* sntp/Makefile.am needs any passed-in CFLAGS.
+(4.2.7p123) 2011/01/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1788] tvtots.c tables inaccurate
+(4.2.7p122) 2011/01/22 Released by Harlan Stenn <stenn@ntp.org>
+* ACTS refclock cleanup from Dave Mills.
+* Avoid shadowing the "group" global variable.
+(4.2.7p121) 2011/01/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1786] Remove extra semicolon from ntp_proto.c .
+(4.2.7p120) 2011/01/20 Released by Harlan Stenn <stenn@ntp.org>
+* Change new timeval and timespec to string routines to use snprintf()
+ rather than hand-crafted conversion, avoid signed int overflow there.
+* Add configure support for SIZEOF_LONG_LONG to enable portable use of
+ snprintf() with time_t.
+* Grow ntpd/work_thread.c arrays as needed.
+* Add DEBUG_* variants of ntp_assert.h macros which compile away using
+ ./configure --disable-debugging.
+* Fix tvalops.cpp unit test failures for 32-bit builds.
+* Return to a single autoreconf invocation in ./bootstrap script.
+* Fix warnings seen on FreeBSD 9.
+* crypto group changes from Dave Mills.
+* Lose the RANGEGATE check in PPS, from Dave Mills.
+* ACTS refclock cleanup from Dave Mills.
+* Documentation updates from Dave Mills.
+* NMEA driver documentation update from Juergen Perlinger.
+(4.2.7p119) 2011/01/18 Released by Harlan Stenn <stenn@ntp.org>
+* added timespecops.{c,h} and tievalops.{c.h} to libntp and include
+ added tspecops.cpp to tests/libntp
+* Correct msyslog.c build break on Solaris 2.9 from #ifdef/#if mixup.
+(4.2.7p118) 2011/01/15 Released by Harlan Stenn <stenn@ntp.org>
+* Simplify the built-sources stuff in sntp/ .
+* Fix check for -lipv6 on HP-UX 11.
+(4.2.7p117) 2011/01/13 Released by Harlan Stenn <stenn@ntp.org>
+* Add configure --without-sntp option to disable building sntp and
+ sntp/tests. withsntp=no in the environment changes the default.
+* Build infrastructure cleanup:
+ Move m4 directory to sntp/m4.
+ Share a single set of genver output between sntp and the top level.
+ Share a single set of autogen included .defs in sntp/include.
+ Share a single set of build-aux scripts (e.g. config.guess, missing).
+ Add ntp_libntp.m4 and ntp_ipv6.m4 to reduce configure.ac duplication.
+ Warn and exit build/flock-build if bootstrap needs to be run.
+(4.2.7p116) 2011/01/10 Released by Harlan Stenn <stenn@ntp.org>
+* refclock_nmea.c refactoring by Juergen Perlinger.
+(4.2.7p115) 2011/01/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1780] Windows ntpd 4.2.7p114 crashes in ioctl().
+* [Bug 1781] longlong undefined in sntp handle_pkt() on Debian amd64.
+(4.2.7p114) 2011/01/08 Released by Harlan Stenn <stenn@ntp.org>
+* Fix for openssl pkg-config detection eval failure.
+* Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+(4.2.7p113) 2011/01/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.
+* Default to silent make rules, override with make V=1 or ./configure
+ --disable-silent-rules.
+* Correct --with-openssl-incdir defaulting with pkg-config.
+* Correct ./build on systems without gtest available.
+* Begin moving some of the low-level socket stuff to libntp.
+(4.2.7p112) 2011/01/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1773] openssl not detected during ./configure.
+* [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
+* Use make V=0 in build script to increase signal/noise ratio.
+(4.2.7p111) 2011/01/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1772] refclock_open() return value check wrong for ACTS.
+* Default --with-openssl-libdir and --with-openssl-incdir to the values
+ from pkg-config, falling back on our usual search paths if pkg-config
+ is not available or does not have openssl.pc on PKG_CONFIG_PATH.
+* Change refclock_open() to return -1 on failure like open().
+* Update all refclock_open() callers to check for fd <= 0 indicating
+ failure, so they work with older and newer refclock_open() and can
+ easily backport.
+* Initialize refclockproc.rio.fd to -1, harmonize refclock shutdown
+ entrypoints to avoid crashing, particularly if refclock_open() fails.
+* Enable tickadj-like taming of wildly off-spec Windows clock using
+ NTPD_TICKADJ_PPM env. var. specifying baseline slew.
+(4.2.7p110) 2011/01/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1771] algorithmic error in 'clocktime()' fixed.
+* Unit tests extended for hard-coded system time.
+* make V=0 and configure --enable-silent-rules supported.
+* setvar modemsetup = ATE0... overrides ACTS driver default.
+* Preserve last timecode in ACTS driver (ntpq -ccv).
+* Tolerate previous ATE1 state when sending ACTS setup.
+* Enable raw tty line discipline in Windows port.
+* Allow tty open/close/open to succeed on Windows port.
+* Enable ACTS and CHU reference clock drivers on Windows.
+(4.2.7p109) 2011/01/02 Released by Harlan Stenn <stenn@ntp.org>
+* Remove nearly all strcpy() and most strcat() from NTP distribution.
+ One major pocket remains in ntp_crypto.c. libopts & libisc also have
+ (safe) uses of strcpy() and strcat() remaining.
+* Documentation updates from Dave Mills.
+(4.2.7p108) 2011/01/01 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1764] Move Palisade modem control logic to configure.ac.
+* [Bug 1768] TIOCFLUSH undefined in linux for refclock_acts.
+* Autokey multiple identity group improvements from Dave Mills.
+* from 4.2.6p3: Update the copyright year.
+(4.2.7p107) 2010/12/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1764] Palisade driver doesn't build on Linux.
+* [Bug 1766] Oncore clock has offset/high jitter at startup.
+* Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+* refclock_acts.c updates from Dave Mills.
+(4.2.7p106) 2010/12/30 Released by Harlan Stenn <stenn@ntp.org>
+* from 4.2.6p3: Update genCommitLog for the bk-5 release.
+(4.2.7p105) 2010/12/29 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p104) 2010/12/28 Released by Harlan Stenn <stenn@ntp.org>
+* from 4.2.6p3: Create and use scripts/check--help when generating
+ .texi files.
+* from 4.2.6p3: Update bk triggers for the bk-5 release.
+* Support for multiple Autokey identity groups from Dave Mills.
+* Documentation updates from Dave Mills.
+* Add ntpq kerninfo, authinfo, and sysinfo commands similar to ntpdc's.
+(4.2.7p103) 2010/12/24 Released by Harlan Stenn <stenn@ntp.org>
+* Add ntpq pstats command similar to ntpdc's.
+* Remove ntpq pstatus command, rv/readvar does the same and more.
+* Documentation updates from Dave Mills.
+(4.2.7p102) 2010/12/23 Released by Harlan Stenn <stenn@ntp.org>
+* Allow ntpq &1 associd use without preceding association-fetching.
+* Documentation updates from Dave Mills.
+(4.2.7p101) 2010/12/22 Released by Harlan Stenn <stenn@ntp.org>
+* from 4.2.6p3-RC12: Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre7.
+* from 4.2.6p3-RC12: Relax minimum Automake version to 1.10 with updated
+ libopts.m4.
+(4.2.7p100) 2010/12/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1743] from 4.2.6p3-RC12: Display timezone offset when showing
+ time for sntp in the local timezone (documentation updates).
+(4.2.7p99) 2010/12/21 Released by Harlan Stenn <stenn@ntp.org>
+* Add unit tests for msnprintf().
+(4.2.7p98) 2010/12/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1761] clockstuff/clktest-opts.h omitted from tarball.
+* [Bug 1762] from 4.2.6p3-RC12: manycastclient responses interfere.
+* Documentation updates from Dave Mills.
+(4.2.7p97) 2010/12/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1458] from 4.2.6p3-RC12: Can not compile NTP on FreeBSD 4.7.
+* [Bug 1760] from 4.2.6p3-RC12: ntpd Windows interpolation cannot be
+ disabled.
+* from 4.2.6p3-RC12: Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre5.
+* Documentation updates from Dave Mills.
+(4.2.7p96) 2010/12/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1758] from 4.2.6p3-RC12: setsockopt IPV6_MULTICAST_IF with wrong
+ ifindex.
+* Documentation updates from Dave Mills.
+(4.2.7p95) 2010/12/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
+* [Bug 1754] from 4.2.6p3-RC12: --version output should be more verbose.
+* [Bug 1757] from 4.2.6p3-RC12: oncore snprintf("%m") doesn't expand %m.
+* from 4.2.6p3-RC12: Suppress ntp-keygen OpenSSL version display for
+ --help, --version, display both build and runtime OpenSSL versions
+ when they differ.
+* from 4.2.6p3-RC12: Upgrade to libopts 33.5.8 from AutoGen 5.11.6pre3.
+* Documentation updates from Dave Mills.
+(4.2.7p94) 2010/12/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1751] from 4.2.6p3-RC12: Support for Atari FreeMiNT OS.
+* Documentation updates from Dave Mills.
+(4.2.7p93) 2010/12/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1510] from 4.2.6p3-RC12: Add modes 20/21 for driver 8 to support
+ RAWDCF @ 75 baud.
+* [Bug 1741] from 4.2.6p3-RC12: Enable multicast reception on each
+ address (Windows).
+* from 4.2.6p3-RC12: Other manycastclient repairs:
+ Separate handling of scope ID embedded in many in6_addr from ifindex
+ used for IPv6 multicasting ioctls.
+ Add INT_PRIVACY endpt bit flag for IPv6 RFC 4941 privacy addresses.
+ Enable outbound multicast from only one address per interface in the
+ same subnet, and in that case prefer embedded MAC address modified
+ EUI-64 IPv6 addresses first, then static, and last RFC 4941 privacy
+ addresses.
+ Use setsockopt(IP[V6]_MULTICAST_IF) before each send to multicast to
+ select the local source address, using the correct socket is not
+ enough.
+* "server ... ident <groupname>" changes from Dave Mills.
+* Documentation updates from Dave Mills.
+(4.2.7p92) 2010/12/08 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1743] from 4.2.6p3-RC12: Display timezone offset when showing
+ time for sntp in the local timezone.
+(4.2.7p91) 2010/12/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1732] ntpd ties up CPU on disconnected USB device.
+* [Bug 1742] form 4.2.6p3-RC12: Fix a typo in an error message in the
+ "build" script.
+(4.2.7p90) 2010/12/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1738] Windows ntpd has wrong net adapter name.
+* [Bug 1740] ntpdc -c reslist packet count wrongly treated as signed.
+(4.2.7p89) 2010/12/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1736] tos int, bool options broken in 4.2.7p66.
+* from 4.2.6p3-RC12: Clean up the SNTP documentation.
+(4.2.7p88) 2010/12/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1735] 'clocktime()' aborts ntpd on bogus input
+(4.2.7p87) 2010/12/01 Released by Harlan Stenn <stenn@ntp.org>
+* from 4.2.6p3-RC12: Clean up m4 quoting in configure.ac, *.m4 files,
+ resolving intermittent AC_LANG_PROGRAM possibly undefined errors.
+(4.2.7p86) 2010/11/29 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p85) 2010/11/24 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p84) 2010/11/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1618] Unreachable code in jjy_start().
+* [Bug 1725] from 4.2.6p3-RC11: ntpd sends multicast from only one
+ address.
+* from 4.2.6p3-RC11: Upgrade libopts to 33.3.8.
+* from 4.2.6p3-RC11: Bump minimum Automake version to 1.11, required for
+ AM_COND_IF use in LIBOPTS_CHECK.
+* An almost complete rebuild of the initial loopfilter configuration
+ process, including the code that determines the interval between
+ frequency file updates, from Dave Mills.
+* Documentation updates from Dave Mills.
+* Add ntp-keygen -l/--lifetime to control certificate expiry.
+* JJY driver improvements for Tristate JJY01/02, including changes
+ to its clockstats format.
+* Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+(4.2.7p83) 2010/11/17 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+* Remove top-level libopts, use sntp/libopts.
+* from 4.2.6p3-RC11: Remove log_msg() and debug_msg() from sntp in favor
+ of msyslog().
+* Documentation updates from Dave Mills.
+(4.2.7p82) 2010/11/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1728] from 4.2.6p3-RC11: In ntp_openssl.m4, don't add
+ -I/usr/include or -L/usr/lib to CPPFLAGS or LDFLAGS.
+(4.2.7p81) 2010/11/14 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1681] from 4.2.6p3-RC10: More sntp logging cleanup.
+* [Bug 1683] from 4.2.6p3-RC10: Non-localhost on loopback exempted from
+ nic rules.
+* [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills.
+(4.2.7p80) 2010/11/10 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1574] from 4.2.6p3-RC9: sntp doesn't set tv_usec correctly.
+* [Bug 1681] from 4.2.6p3-RC9: sntp logging cleanup.
+* [Bug 1683] from 4.2.6p3-RC9: Interface binding does not seem to work
+ as intended.
+* [Bug 1708] make check fails with googletest 1.4.0.
+* [Bug 1709] from 4.2.6p3-RC9: ntpdate ignores replies with equal
+ receive and transmit timestamps.
+* [Bug 1715] sntp utilitiesTest.IPv6Address failed.
+* [Bug 1718] Improve gtest checks in configure.ac.
+(4.2.7p79) 2010/11/07 Released by Harlan Stenn <stenn@ntp.org>
+* Correct frequency estimate with no drift file, from David Mills.
+(4.2.7p78) 2010/11/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1697] filegen implementation should be improved.
+* Refactor calendar functions in terms of new common code.
+* Documentation updates from Dave Mills.
+(4.2.7p77) 2010/11/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1692] packageinfo.sh needs to be "sourced" using ./ .
+* [Bug 1695] ntpdate takes longer than necessary.
+(4.2.7p76) 2010/11/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1690] Unit tests fails to build on some systems.
+* [Bug 1691] Use first NMEA sentence each second.
+* Put the sntp tests under sntp/ .
+* ... and only build/run them if we have gtest.
+* Documentation updates from Dave Mills.
+(4.2.7p75) 2010/10/30 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+* Include Linus Karlsson's GSoC 2010 testing code.
+(4.2.7p74) 2010/10/29 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1685] from 4.2.6p3-RC8: NMEA driver mode byte confusion.
+* from 4.2.6p3-RC8: First cut at using scripts/checkChangeLog.
+* Documentation updates from Dave Mills.
+(4.2.7p73) 2010/10/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1680] Fix alignment of clock_select() arrays.
+* refinements to new startup behavior from David Mills.
+* For the bootstrap script, touch .html files last.
+* Add 'make check' test case that would have caught [Bug 1678].
+(4.2.7p72) 2010/10/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1679] Fix test for -lsocket.
+* Clean up missing ;; entries in configure.ac.
+(4.2.7p71) 2010/10/25 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1676] from 4.2.6p3-RC7: NMEA: $GPGLL did not work after fix
+ for Bug 1571.
+* [Bug 1678] "restrict source" treated as "restrict default".
+* from 4.2.6p3-RC7: Added scripts/checkChangeLog.
+(4.2.7p70) 2010/10/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1571] from 4.2.6p3-RC6: NMEA does not relate data to PPS edge.
+* [Bug 1572] from 4.2.p63-RC6: NMEA time adjustment for GPZDG buggy.
+* [Bug 1675] from 4.2.6p3-RC6: Prohibit includefile remote config.
+* Enable generating ntpd/ntp_keyword.h after keyword-gen.c changes on
+ Windows as well as POSIX platforms.
+* Fix from Dave Mills for a rare singularity in clock_combine().
+(4.2.7p69) 2010/10/23 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1671] Automatic delay calibration is sometimes inaccurate.
+(4.2.7p68) 2010/10/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1669] from 4.2.6p3-RC5: NTP fails to compile on IBM AIX 5.3.
+* [Bug 1670] Fix peer->bias and broadcastdelay.
+* Documentation updates from Dave Mills.
+* Documentation EOL cleanup.
+(4.2.7p67) 2010/10/21 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1649] from 4.2.6p3-RC5: Require NMEA checksum if $GPRMC or
+ previously seen.
+(4.2.7p66) 2010/10/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1277] Provide and use O(1) FIFOs, esp. in the config tree code.
+* Remove unused 'bias' configuration keyword.
+(4.2.7p65) 2010/10/16 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1584] from 4.2.6p3-RC4: wrong SNMP type for precision,
+ resolution.
+* Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
+(4.2.7p64) 2010/10/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1584] from 4.2.6p3-RC3: ntpsnmpd OID must be mib-2.197.
+* [Bug 1659] from 4.2.6p3-RC4: Need CLOCK_TRUETIME not CLOCK_TRUE.
+* [Bug 1663] ntpdsim should not open net sockets.
+* [Bug 1665] from 4.2.6p3-RC4: is_anycast() u_int32_t should be u_int32.
+* from 4.2.6p3: ntpsnmpd, libntpq warning cleanup.
+* Remove 'calldelay' and 'sign' keywords (Dave Mills).
+* Documentation updates from Dave Mills.
+(4.2.7p63) 2010/10/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1080] from 4.2.6p3-RC3: ntpd on ipv6 routers very chatty.
+* Documentation nit cleanup.
+* Documentation updates from Dave Mills.
+(4.2.7p62) 2010/10/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 750] from 4.2.6p3-RC3: Non-existing device causes coredump with
+ RIPE-NCC driver.
+* [Bug 1567] from 4.2.6p3-RC3: Support Arbiter 1093C Satellite Clock on
+ Windows.
+* [Bug 1581] from 4.2.6p3-RC3: printf format string mismatch leftover.
+* [Bug 1659] from 4.2.6p3-RC3: Support Truetime Satellite Clocks on
+ Windows.
+* [Bug 1660] from 4.2.6p3-RC3: On some systems, test is in /usr/bin, not
+ /bin.
+* [Bug 1661] from 4.2.6p3-RC3: Re-indent refclock_ripencc.c.
+* Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills).
+* Documentation updates from Dave Mills.
+(4.2.7p61) 2010/10/06 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+(4.2.7p60) 2010/10/04 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p59) 2010/10/02 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+* Variable name cleanup from Dave Mills.
+* [Bug 1657] darwin needs res_9_init, not res_init.
+(4.2.7p58) 2010/09/30 Released by Harlan Stenn <stenn@ntp.org>
+* Clock select bugfix from Dave Mills.
+* [Bug 1554] peer may stay selected as system peer after becoming
+ unreachable.
+* [Bug 1644] from 4.2.6p3-RC3: cvo.sh should use lsb_release to identify
+ linux distros.
+* [Bug 1646] ntpd crashes with relative path to logfile.
+(4.2.7p57) 2010/09/27 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p56) 2010/09/25 Released by Harlan Stenn <stenn@ntp.org>
+* Clock combining algorithm improvements from Dave Mills.
+* Documentation updates from Dave Mills.
+* [Bug 1642] ntpdsim can't find simulate block in config file.
+* [Bug 1643] from 4.2.6p3-RC3: Range-check the decoding of the RIPE-NCC
+ status codes.
+(4.2.7p55) 2010/09/22 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+* [Bug 1636] from 4.2.6p3-RC2: segfault after denied remote config.
+(4.2.7p54) 2010/09/21 Released by Harlan Stenn <stenn@ntp.org>
+* More Initial convergence improvements from Dave Mills.
+* Documentation updates from Dave Mills.
+* [Bug 1635] from 4.2.6p3-RC2: "filegen ... enable" is not default.
+(4.2.7p53) 2010/09/20 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+* More Initial convergence improvements from Dave Mills.
+(4.2.7p52) 2010/09/19 Released by Harlan Stenn <stenn@ntp.org>
+* Initial convergence improvements from Dave Mills.
+(4.2.7p51) 2010/09/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1344] from 4.2.6p3-RC1: ntpd on Windows exits without logging
+ cause.
+* [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
+* [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
+(4.2.7p50) 2010/09/16 Released by Harlan Stenn <stenn@ntp.org>
+* Cleanup NTP_LIB_M.
+* [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris.
+(4.2.7p49) 2010/09/13 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p48) 2010/09/12 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+(4.2.7p47) 2010/09/11 Released by Harlan Stenn <stenn@ntp.org>
+* Documentation updates from Dave Mills.
+* [Bug 1588] finish configure --disable-autokey implementation.
+* [Bug 1616] refclock_acts.c: if (pp->leap == 2) is always false.
+* [Bug 1620] [Backward Incompatible] "discard minimum" value should be in
+ seconds, not log2 seconds.
+(4.2.7p46) 2010/09/10 Released by Harlan Stenn <stenn@ntp.org>
+* Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for NTP_LIB_M.
+(4.2.7p45) 2010/09/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1578] Consistently use -lm when needed.
+(4.2.7p44) 2010/08/27 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1573] from 4.2.6p3-beta1: Miscalculation of offset in sntp.
+(4.2.7p43) 2010/08/26 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1602] Refactor some of the sntp/ directory to facililtate testing.
+(4.2.7p42) 2010/08/18 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1593] ntpd abort in free() with logconfig syntax error.
+* [Bug 1595] from 4.2.6p3-beta1: empty last line in key file causes
+ duplicate key to be added
+* [Bug 1597] from 4.2.6p3-beta1: packet processing ignores RATE KoD packets,
+ Because of a bug in string comparison.
+(4.2.7p41) 2010/07/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1581] from 4.2.6p3-beta1: ntp_intres.c size_t printf format
+ string mismatch.
+* [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+* Avoid race with parallel builds using same source directory in
+ scripts/genver by using build directory for temporary files.
+* orphanwait documentation updates.
+(4.2.7p40) 2010/07/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
+* [Bug 1396] allow servers on ntpd command line like ntpdate
+(4.2.7p39) 2010/07/09 Released by Harlan Stenn <stenn@ntp.org>
+* Fix typo in driver28.html.
+* [Bug 1581] from 4.2.6p2: size_t printf format string mismatches, IRIG
+ string buffers undersized. Mostly backported from earlier ntp-dev
+ fixes by Juergen Perlinger.
+(4.2.7p38) 2010/06/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1570] backported to 4.2.6p2-RC7.
+* [Bug 1575] from 4.2.6p2-RC7: use 'snprintf' with LIB_BUFLENGTH in
+ inttoa.c, tvtoa.c and utvtoa.c
+* [Bug 1576] backported to 4.2.6p2-RC7.
+* Typo fix in a comment in ntp_proto.c.
+(4.2.7p37) 2010/06/19 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD.
+(4.2.7p36) 2010/06/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1560] Initial support for orphanwait, from Dave Mills.
+* clock_filter()/reachability fixes from Dave Mills.
+(4.2.7p35) 2010/06/12 Released by Harlan Stenn <stenn@ntp.org>
+* Rewrite of multiprecision macros in 'ntp_fp.h' from J. Perlinger
+ <perlinger@ntp.org>
+* [Bug 715] from 4.2.6p2-RC6: libisc Linux IPv6 interface iteration
+ drops multicast flags.
+(4.2.7p34) 2010/06/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1570] serial clock drivers get outdated input from kernel tty
+ line buffer after startup
+(4.2.7p33) 2010/06/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1561] from 4.2.6p2-RC5: ntpq, ntpdc "passwd" prompts for MD5
+ password w/SHA1.
+* [Bug 1565] from 4.2.6p2-RC5: sntp/crypto.c compile fails on MacOS over
+ vsnprintf().
+* from 4.2.6p2-RC5: Windows port: do not exit in
+ ntp_timestamp_from_counter() without first logging the reason.
+(4.2.7p32) 2010/05/19 Released by Harlan Stenn <stenn@ntp.org>
+* Copyright file cleanup from Dave Mills.
+* [Bug 1555] from 4.2.6p2-RC4: sntp illegal C (mixed code and
+ declarations).
+* [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr.
+* configure.ac: add --disable-autokey, #define AUTOKEY to enable future
+ support for building without Autokey, but with OpenSSL for its digest
+ algorithms (hash functions). Code must be modified to use #ifdef
+ AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.
+* include/ntp_crypto.h: make assumption AUTOKEY implies OPENSSL explicit.
+(4.2.7p31) 2010/05/11 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1325] from 4.2.6p2-RC3: unreachable code sntp recv_bcst_data().
+* [Bug 1459] from 4.2.6p2-RC3: sntp MD5 authentication does not work
+ with ntpd.
+* [Bug 1552] from 4.2.6p2-RC3: update and complete broadcast and crypto
+ features in sntp.
+* [Bug 1553] from 4.2.6p2-RC3: sntp/configure.ac OpenSSL support.
+* from 4.2.6p2-RC3: Escape unprintable characters in a refid in ntpq -p
+ billboard.
+* from 4.2.6p2-RC3: Simplify hash client code by providing OpenSSL
+ EVP_*() API when built without OpenSSL. (already in 4.2.7)
+* from 4.2.6p2-RC3: Do not depend on ASCII in sntp.
+(4.2.7p30) 2010/05/06 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1526] ntpd DNS pipe read EINTR with no network at startup.
+* Update the ChangeLog entries when merging items from -stable.
+(4.2.7p29) 2010/05/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1542] ntpd mrulist response may have incorrect last.older.
+* [Bug 1543] ntpq mrulist must refresh nonce when retrying.
+* [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit.
+* Windows compiling hints/winnt.html update from G. Sunil Tej.
+(4.2.7p28) 2010/05/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1512] from 4.2.6p2-RC3: ntpsnmpd should connect to net-snmpd
+ via a unix-domain socket by default.
+ Provide a command-line 'socket name' option.
+* [Bug 1538] from 4.2.6p2-RC3: update refclock_nmea.c's call to
+ getprotobyname().
+* [Bug 1541] from 4.2.6p2-RC3: Fix wrong keyword for "maxclock".
+(4.2.7p27) 2010/04/27 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p26) 2010/04/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1465] from 4.2.6p2-RC2: Make sure time from TS2100 is not
+ invalid (backport from -dev).
+* [Bug 1528] from 4.2.6p2-RC2: Fix EDITLINE_LIBS link order for ntpq
+ and ntpdc.
+* [Bug 1531] Require nonce with mrulist requests.
+* [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's
+ mrulist.
+* [Bug 1534] from 4.2.6p2-RC2: conflicts with VC++ 2010 errno.h.
+* [Bug 1535] from 4.2.6p2-RC2: "restrict -4 default" and "restrict
+ -6 default" ignored.
+(4.2.7p25) 2010/04/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1528] from 4.2.6p2-RC2: Remove --with-arlib from br-flock.
+* [Bug 1503] [Bug 1504] [Bug 1518] [Bug 1522] from 4.2.6p2-RC2:
+ all of which were fixed in 4.2.7 previously.
+(4.2.7p24) 2010/04/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1390] Control PPS on the Oncore M12.
+* [Bug 1518] Windows ntpd should lock to one processor more
+ conservatively.
+* [Bug 1520] '%u' formats for size_t gives warnings with 64-bit builds.
+* [Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
+* Documentation updates for 4.2.7p22 changes and additions, updating
+ ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
+ miscopt.html, and miscopt.txt.
+* accopt.html: non-ntpport doc changes from Dave Mills.
+* Modify full MRU list preemption when full to match "discard monitor"
+ documentation, by removing exception for count == 1.
+(4.2.7p23) 2010/04/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1516] unpeer by IP address fails, DNS name works.
+* [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
+ ntpq and ntpdc now use the following format for showing purported
+ DNS names from IP address "reverse" DNS lookups when the DNS name
+ does not exist or does not include the original IP address among
+ the results: "192.168.1.2 (fake.dns.local)".
+(4.2.7p22) 2010/04/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1432] Don't set inheritable flag for linux capabilities.
+* [Bug 1465] Make sure time from TS2100 is not invalid.
+* [Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20.
+* [Bug 1497] fudge is broken by getnetnum() change.
+* [Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
+* [Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
+ "restrict ... limited" is used.
+* ntpdate: stop querying source after KoD packet response, log it.
+* ntpdate: rate limit each server to 2s between packets.
+* From J. N. Perlinger: avoid pointer wraparound warnings in dolfptoa(),
+ printf format mismatches with 64-bit size_t.
+* Broadcast client (ephemeral) associations should be demobilized only
+ if they are not heard from for 10 consecutive polls, regardless of
+ surviving the clock selection. Fix from David Mills.
+* Add "ntpq -c ifstats" similar to "ntpdc -c ifstats".
+* Add "ntpq -c sysstats" similar to "ntpdc -c sysstats".
+* Add "ntpq -c monstats" to show monlist knobs and stats.
+* Add "ntpq -c mrulist" similar to "ntpdc -c monlist" but not
+ limited to 600 rows, and with filtering and sorting options:
+ ntpq -c "mrulist mincount=2 laddr=192.168.1.2 sort=-avgint"
+ ntpq -c "mrulist sort=addr"
+ ntpq -c "mrulist mincount=2 sort=count"
+ ntpq -c "mrulist sort=-lstint"
+* Modify internal representation of MRU list to use l_fp fixed-point
+ NTP timestamps instead of seconds since startup. This increases the
+ resolution and substantially improves accuracy of sorts involving
+ timestamps, at the cost of flushing all MRU entries when the clock is
+ stepped, to ensure the timestamps can be compared with the current
+ get_systime() results.
+* Add ntp.conf "mru" directive to configure MRU parameters, such as
+ "mru mindepth 600 maxage 64 maxdepth 5000 maxmem 1024" or
+ "mru initalloc 0 initmem 16 incalloc 99 incmem 4". Several pairs are
+ equivalent with one in units of MRU entries and its twin in units of
+ kilobytes of memory, so the last one used in ntp.conf controls:
+ maxdepth/maxmem, initalloc/initmem, incalloc/incmem. With the above
+ values, ntpd will preallocate 16kB worth of MRU entries, allocating
+ 4kB worth each time more are needed, with a hard limit of 1MB of MRU
+ entries. Until there are more than 600 entries none would be reused.
+ Then only entries for addresses last seen 64 seconds or longer ago are
+ reused.
+* Limit "ntpdc -c monlist" response in ntpd to 600 entries, the previous
+ overall limit on the MRU list depth which was driven by the monlist
+ implementation limit of one request with a single multipacket
+ response.
+* New "pool" directive implementation modeled on manycastclient.
+* Do not abort on non-ASCII characters in ntp.conf, ignore them.
+* ntpq: increase response reassembly limit from 24 to 32 packets, add
+ discussion in comment regarding results with even larger MAXFRAGS.
+* ntpq: handle "passwd MYPASSWORD" (without prompting) as with ntpdc.
+* ntpdc: do not examine argument to "passwd" if not supplied.
+* configure: remove check for pointer type used with qsort(), we
+ require ANSI C which mandates void *.
+* Reset sys_kodsent to 0 in proto_clr_stats().
+* Add sptoa()/sockporttoa() similar to stoa()/socktoa() adding :port.
+* Use memcpy() instead of memmove() when buffers can not overlap.
+* Remove sockaddr_storage from our sockaddr_u union of sockaddr,
+ sockaddr_in, and sockaddr_in6, shaving about 100 bytes from its size
+ and substantially decreasing MRU entry memory consumption.
+* Extend ntpq readvar (alias rv) to allow fetching up to three named
+ variables in one operation: ntpq -c "rv 0 version offset frequency".
+* ntpq: use srchost variable to show .POOL. prototype associations'
+ hostname instead of address 0.0.0.0.
+* "restrict source ..." configures override restrictions for time
+ sources, allows tight default restrictions to be used with the pool
+ directive (where server addresses are not known in advance).
+* Ignore "preempt" modifier on manycastclient and pool prototype
+ associations. The resulting associations are preemptible, but the
+ prototype must not be.
+* Maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+* Remove more workarounds unneeded since we require ISO C90 AKA ANSI C:
+ - remove fallback implementations for memmove(), memset, strstr().
+ - do not test for atexit() or memcpy().
+* Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with
+ support for IPv6.
+* Correct some corner case failures in automatically enabling the MRU
+ list if any "restrict ... limited" is in effect, and in disabling MRU
+ maintenance. (ntp_monitor.c, ntp_restrict.c)
+* Reverse the internal sort order of the address restriction lists, but
+ preserve the same behavior. This allows removal of special-case code
+ related to the default restrictions and more straightforward lookups
+ of restrictions for a given address (now, stop on first match).
+* Move ntp_restrict.c MRU doubly-linked list maintenance code into
+ ntp_lists.h macros, allowing more duplicated source excision.
+* Repair ntpdate.c to no longer test HAVE_TIMER_SETTIME.
+* Do not reference peer_node/unpeer_node after freeing when built with
+ --disable-saveconfig and using DNS.
+(4.2.7p21) 2010/03/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 2399] Reset sys_kodsent in proto_clr_stats().
+* [Bug 1514] from 4.2.6p1-RC6: Typo in ntp_proto.c: fabs(foo < .4)
+ should be fabs(foo) < .4.
+* [Bug 1464] from 4.2.6p1-RC6: synchronization source wrong for
+ refclocks ARCRON_MSF (27) and SHM (28).
+* From 4.2.6p1-RC6: Correct Windows port's refclock_open() to
+ return 0 on failure not -1.
+* From 4.2.6p1-RC6: Correct CHU, dumbclock, and WWVB drivers to
+ check for 0 returned from refclock_open() on failure.
+* From 4.2.6p1-RC6: Correct "SIMUL=4 ./flock-build -1" to
+ prioritize -1/--one.
+* [Bug 1306] constant conditionals in audio_gain().
+(4.2.7p20) 2010/02/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1483] hostname in ntp.conf "restrict" parameter rejected.
+* Use all addresses for each restrict by hostname.
+* Use async DNS to resolve trap directive hostnames.
+(4.2.7p19) 2010/02/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1338] Update the association type codes in ntpq.html.
+* [Bug 1478] from 4.2.6p1-RC5: linking fails: EVP_MD_pkey_type.
+* [Bug 1479] from 4.2.6p1-RC5: not finding readline headers.
+* [Bug 1484] from 4.2.6p1-RC5: ushort is not defined in QNX6.
+(4.2.7p18) 2010/02/07 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1480] from 4.2.6p1-RC5: snprintf() cleanup caused
+ unterminated refclock IDs.
+* Stop using getaddrinfo() to convert numeric address strings to on-wire
+ addresses in favor of is_ip_address() alone.
+(4.2.7p17) 2010/02/05 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1477] from 4.2.6p1-RC5: First non-gmake make in clone
+ w/VPATH can't make COPYRIGHT.
+* Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
+* Broaden ylwrap workaround VPATH_HACK to all non-GNU make.
+(4.2.7p16) 2010/02/04 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1474] from 4.2.6p1-RC4: ntp_keygen LCRYPTO after libntp.a.
+* Include 4.2.6p1-RC4: Remove arlib.
+(4.2.7p15) 2010/02/03 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1455] from 4.2.6p1: ntpd does not try /etc/ntp.audio.
+* Include 4.2.6p1: Convert many sprintf() calls to snprintf(), also
+ strcpy(), strcat().
+* Include 4.2.6p1: Fix widely cut-n-pasted bug in refclock shutdown
+ after failed start.
+* Include 4.2.6p1: Remove some dead code checking for emalloc()
+ returning NULL.
+(4.2.7p14) 2010/02/02 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1338] ntpq displays incorrect association type codes.
+* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+* [Bug 1470] from 4.2.6p1: "make distdir" compiles keyword-gen.
+* [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+* [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+* [Bug 1473] from 4.2.6p1: "make distcheck" version.m4 error.
+(4.2.7p13) 2010/01/31 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1467] from 4.2.6p1: Fix bogus rebuild of sntp/sntp.html.
+(4.2.7p12) 2010/01/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1468] 'make install' broken for root on default NFS mount.
+(4.2.7p11) 2010/01/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 47] Debugging and logging do not work after a fork.
+* [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+* New async DNS resolver in ntpd allows nonblocking queries anytime,
+ instead of only once at startup.
+(4.2.7p10) 2010/01/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1140] from 4.2.6p1-RC5: Clean up debug.html, decode.html,
+ and ntpq.html.
+* Include 4.2.6p1-RC3: Use TZ=UTC instead of TZ= when calling date in
+ scripts/mkver.in .
+* [Bug 1448] from 4.2.6p1-RC3: Some macros not correctly conditionally
+ or absolutely defined on Windows.
+* [Bug 1449] from 4.2.6p1-RC3: ntpsim.h in ntp_config.c should be used
+ conditionally.
+* [Bug 1450] from 4.2.6p1-RC3: Option to exclude warnings not
+ unconditionally defined on Windows.
+(4.2.7p9) 2010/01/13 Released by Harlan Stenn <stenn@ntp.org>
+(4.2.7p8) 2010/01/12 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 702] ntpd service logic should use libopts to examine cmdline.
+* [Bug 1451] from 4.2.6p1-RC3: sntp leaks KoD entry updating.
+* [Bug 1453] from 4.2.6p1-RC3: Use $CC in config.cache filename.
+(4.2.7p7) 2009/12/30 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize.
+* [Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu.
+(4.2.7p6) 2009/12/28 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+* [Bug 1442] Move Windows functions into libntp files
+* [Bug 1127] from 4.2.6p1-RC3: Check the return of X590_verify().
+* [Bug 1439] from 4.2.6p1-RC3: .texi gen after binary is linked.
+* [Bug 1440] from 4.2.6p1-RC3: Update configure.ac to support kfreebsd.
+* [Bug 1445] from 4.2.6p1-RC3: IRIX does not have -lcap or support
+ linux capabilities.
+(4.2.7p5) 2009/12/25 Released by Harlan Stenn <stenn@ntp.org>
+* Include 4.2.6p1-RC2
+(4.2.7p4) 2009/12/24 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1429] ntpd -4 option does not reliably force IPv4 resolution.
+* [Bug 1431] System headers must come before ntp headers in ntp_intres.c .
+(4.2.7p3) 2009/12/22 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1426] scripts/VersionName needs . on the search path.
+* [Bug 1427] quote missing in ./build - shows up on NetBSD.
+* [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
+(4.2.7p2) 2009/12/20 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
+* [Bug 1421] add util/tg2, a clone of tg that works on Linux, NetBSD, and
+ FreeBSD
+(4.2.7p1) 2009/12/15 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1348] ntpd Windows port should wait for sendto() completion.
+* [Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes.
+* [Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails.
+(4.2.7p0) 2009/12/13 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
+* [Bug 1414] Enable "make distcheck" success with BSD make.
+(4.2.7) 2009/12/09 Released by Harlan Stenn <stenn@ntp.org>
+* [Bug 1407] configure.ac: recent GNU Make -v does not include "version".
+---
(4.2.6p5) 2011/12/24 Released by Harlan Stenn <stenn@ntp.org>
-(4.2.6p5) 2011/12/24 Released by Harlan Stenn <stenn@ntp.org>
+
+No changes from 4.2.6p5-RC3.
---
(4.2.6p5-RC3) 2011/12/08 Released by Harlan Stenn <stenn@ntp.org>
@@ -104,7 +2146,7 @@
* [Bug 1741] Enable multicast reception on each address (Windows).
* [Bug 1742] Fix a typo in an error message in the "build" script.
* [Bug 1743] Display timezone offset when showing time for sntp in the
- local timezone.
+local timezone.
* [Bug 1751] Support for Atari FreeMiNT OS.
* [Bug 1754] --version output should be more verbose.
* [Bug 1757] oncore snprintf("%m") doesn't expand %m.
@@ -114,7 +2156,7 @@
* Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre7.
* Relax minimum Automake version to 1.10 with updated libopts.m4.
* Suppress ntp-keygen OpenSSL version display for --help, --version,
- display both build and runtime OpenSSL versions when they differ.
+display both build and runtime OpenSSL versions when they differ.
* Clean up m4 quoting in configure.ac, *.m4 files, resolving
intermittent AC_LANG_PROGRAM possibly undefined errors.
* Clean up the SNTP documentation.
@@ -385,7 +2427,7 @@
---
(4.2.6) 2009/12/09 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p8) - [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
+* [Sec 1331] from4.2.4p8: DoS with mode 7 packets - CVE-2009-3563.
* [Bug 508] Fixed leap second handling for Windows.
(4.2.5p250-RC) 2009/11/30 Released by Harlan Stenn <stenn@ntp.org>
* sntp documentation updates.
@@ -576,7 +2618,7 @@
* add wildcard match class for interface/nic rules.
* fix mistaken carryover of prefixlen from one rule to the next.
* Ensure IPv6 localhost address ::1 is included in libisc's Windows IPv6
- address enumeration, allowing ntpq and ntpdc's hardcoding to 127.0.0.1
+ address enumeration, allowing ntpq and ntpdc's hardcoding to 127.0.0.1
on Windows to end.
(4.2.5p218) 2009/09/21 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1314] saveconfig emits -4 and -6 on when not given.
@@ -687,7 +2729,7 @@
(4.2.5p193) 2009/07/25 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1261] CID 34: simulate_server() rbuf.msg_flags uninitialized.
* [Bug 1262] CID 35: xpkt.mac uninitialized in simulate_server().
-* [Bug 1263] CID 37: CID 38: CID 40: CID 43: multiple refclocks
+* [Bug 1263] CID 37: CID 38: CID 40: CID 43: multiple refclocks
uninitialized tm_zone (arc, chronolog, dumbclock, pcf).
* [Bug 1264] CID 64: gsoc_sntp on_wire() frees wrong ptr receiving KoD.
* [Bug 1265] CID 65: CID 66: gsoc_sntp on_wire() leaks x_pkt, r_pkt.
@@ -704,7 +2746,7 @@
* [Bug 1250] CID 53: kod_init_kod_db() overruns kod_db malloc'd buffer.
* [Bug 1251] CID 68: search_entry() mishandles dst argument.
* [Bug 1252] CID 32: Quiet Coverity warning with assertion.
-* [Bug 1253] CID 50: gsoc_sntp/crypto.c auth_init() always returns a
+* [Bug 1253] CID 50: gsoc_sntp/crypto.c auth_init() always returns a
list with one entry.
* [Bug 1254] CID 56: tv_to_str() leaks a struct tm each call.
* [Bug 1255] CID 55: pkt_output() leaks a copy of each packet.
@@ -792,7 +2834,7 @@
* [Bug 320] "restrict default ignore" does not affect IPv6.
* [Bug 1192] "restrict -6 ..." reports a syntax error.
(4.2.5p177) 2009/05/18 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p7)
+* Include 4.2.4p7
* [Bug 1174] nmea_shutdown assumes that nmea has a unit assigned
* [Bug 1190] NMEA refclock fudge flag4 1 obscures position in timecode
* Update NMEA refclock documentation in html/drivers/driver20.html
@@ -800,7 +2842,7 @@
* [Bug 1154] mDNS registration should be done later, repeatedly and only
if asked for. (second try for fix)
(4.2.5p175) 2009/05/12 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p7-RC7)
+* Include 4.2.4p7-RC7
* [Bug 1180] ntpd won't start with more than ~1000 interfaces
* [Bug 1182] Documentation typos and missing bits.
* [Bug 1183] COM port support should extend past COM3
@@ -810,7 +2852,7 @@
(4.2.5p174) 2009/05/09 Released by Harlan Stenn <stenn@ntp.org>
* Stale leapsecond file fixes from Dave Mills.
(4.2.5p173) 2009/05/08 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p7-RC6)
+* Include 4.2.4p7-RC6
(4.2.5p172) 2009/05/06 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1175] Instability in PLL daemon mode.
* [Bug 1176] refclock_parse.c does not compile without PPSAPI.
@@ -823,7 +2865,7 @@
* Do not clear config.cache when it is empty.
(4.2.5p170) 2009/05/02 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1152] adjust PARSE to new refclock_pps logic
-* Include (4.2.4p7-RC5)
+* Include 4.2.4p7-RC5
* loopfilter FLL/PLL crossover cleanup from Dave Mills.
* Documentation updates from Dave Mills.
* ntp-keygen cleanup from Dave Mills.
@@ -834,7 +2876,7 @@
* [Bug 1171] Note that we never look for -lreadline by default.
* [Bug 1090] Fix bogus leap seconds in refclock_hpgps.
(4.2.5p168) 2009/04/29 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p7-RC4)
+* Include 4.2.4p7-RC4
* [Bug 1169] quiet compiler warnings
* Re-enable gcc -Wstrict-prototypes when not building with OpenSSL
* Enable gcc -Wstrict-overflow
@@ -874,7 +2916,7 @@
* Documentation updates from Dave Mills.
* timepps-Solaris.h patches from Dave Hart.
(4.2.5p164) 2009/04/22 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p7-RC3)
+* Include 4.2.4p7-RC3
* PPS/PPSAPI cleanup from Dave Mills.
* Documentation updates from Dave Mills.
* [Bug 1125] C runtime per-thread initialization on Windows
@@ -886,7 +2928,7 @@
(4.2.5p162) 2009/04/09 Released by Harlan Stenn <stenn@ntp.org>
* Documentation updates from Dave Mills.
* Mitigation and PPS cleanup from Dave Mills.
-* Include (4.2.4p7-RC2)
+* Include 4.2.4p7-RC2
* [Bug 216] New interpolation scheme for Windows eliminates 1ms jitter
* remove a bunch of #ifdef SYS_WINNT from portable code
* 64-bit time_t cleanup for building on newer Windows compilers
@@ -900,7 +2942,7 @@
(4.2.5p160) 2009/03/30 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1141] refclock_report missing braces cause spurious "peer event:
clock clk_unspec" log entries
-* Include (4.2.4p7-RC1)
+* Include 4.2.4p7-RC1
(4.2.5p159) 2009/03/28 Released by Harlan Stenn <stenn@ntp.org>
* "bias" changes from Dave Mills.
(4.2.5p158) 2009/01/30 Released by Harlan Stenn <stenn@ntp.org>
@@ -926,7 +2968,7 @@
file name problems under Windows.
Removed German umlaut from log msg for 4.2.5p142.
(4.2.5p152) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
-* Include (4.2.4p6) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
+* Include 4.2.4p6: 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
(4.2.5p151) 2008/12/23 Released by Harlan Stenn <stenn@ntp.org>
* Stats file logging cleanup from Dave Mills.
(4.2.5p150) 2008/12/15 Released by Harlan Stenn <stenn@ntp.org>
@@ -1010,7 +3052,7 @@
* [Bug 1052] Add linuxPPS support to ONCORE driver.
(4.2.5p124) 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
* Documentation updates from Dave Mills.
-* Include (4.2.4p5) 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
+* Include 4.2.4p5: 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 861] leap info was not being transmitted.
* [Bug 1046] refnumtoa.c is using the wrong header file.
* [Bug 1047] enable/disable options processing fix.
@@ -1183,7 +3225,7 @@
---
(4.2.4p6) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
-* [Bug 1113] Fixed build errors with recent versions of openSSL.
+* [Bug 1113] Fixed build errors with recent versions of openSSL.
* [Sec 1111] Fix incorrect check of EVP_VerifyFinal()'s return value.
* Update the copyright year.
@@ -1252,9 +3294,9 @@
* Update bugreport URL.
* Update -I documentation.
* [Bug 713] Fix bug reporting information.
-* A bug in the application of the negative-sawtooth for 12 channel receivers.
+* A bug in the application of the negative-sawtooth for 12 channel receivers.
* The removal of unneeded startup code used for the original LinuxPPS, it now
- conforms to the PPSAPI and does not need special code.
+ conforms to the PPSAPI and does not need special code.
* ntp-keygen.c: Coverity fixes [CID 33,47].
* Volley cleanup from Dave Mills.
* Fuzz cleanup from Dave Mills.
@@ -1262,7 +3304,7 @@
* ntpsim.c: add missing protypes and fix [CID 34], a nit.
* Upgraded bison at UDel.
* Update br-flock and flock-build machine lists.
-* [Bug 752] QoS: add parse/config handling code.
+* [Bug 752] QoS: add parse/config handling code.
* Fix the #include order in tickadj.c for picky machines.
* [Bug 752] QoS: On some systems, netinet/ip.h needs netinet/ip_systm.h.
* [Bug 752] Update the QoS tagging (code only - configuration to follow).
diff --git a/CommitLog b/CommitLog
index c66b71622c81..fdf3f5e3ac9a 100644
--- a/CommitLog
+++ b/CommitLog
@@ -1,375 +1,71482 @@
-ChangeSet@1.2349, 2011-12-24 18:34:58-05:00, stenn@deacon.udel.edu
+ChangeSet@1.3266, 2014-12-19 07:53:07-05:00, stenn@deacon.udel.edu
+ NTP_4_2_8
+ TAG: NTP_4_2_8
+
+ ChangeLog@1.1593 +1 -0
+ NTP_4_2_8
+
+ ntpd/invoke-ntp.conf.texi@1.168 +1 -1
+ NTP_4_2_8
+
+ ntpd/invoke-ntp.keys.texi@1.165 +1 -1
+ NTP_4_2_8
+
+ ntpd/invoke-ntpd.texi@1.481 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.conf.5man@1.202 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntp.conf.5mdoc@1.202 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.conf.html@1.161 +1 -1
+ NTP_4_2_8
+
+ ntpd/ntp.conf.man.in@1.202 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntp.conf.mdoc.in@1.202 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.5man@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.5mdoc@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.html@1.162 +1 -1
+ NTP_4_2_8
+
+ ntpd/ntp.keys.man.in@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntp.keys.mdoc.in@1.199 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd-opts.c@1.502 +239 -239
+ NTP_4_2_8
+
+ ntpd/ntpd-opts.h@1.501 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.1ntpdman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.1ntpdmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd.html@1.156 +2 -2
+ NTP_4_2_8
+
+ ntpd/ntpd.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpd/ntpd.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpdc/invoke-ntpdc.texi@1.479 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc-opts.c@1.497 +107 -107
+ NTP_4_2_8
+
+ ntpdc/ntpdc-opts.h@1.496 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.1ntpdcman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc.html@1.323 +2 -2
+ NTP_4_2_8
+
+ ntpdc/ntpdc.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpdc/ntpdc.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpq/invoke-ntpq.texi@1.485 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq-opts.c@1.502 +106 -106
+ NTP_4_2_8
+
+ ntpq/ntpq-opts.h@1.500 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.1ntpqman@1.313 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.1ntpqmdoc@1.313 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq.html@1.153 +2 -2
+ NTP_4_2_8
+
+ ntpq/ntpq.man.in@1.313 +3 -3
+ NTP_4_2_8
+
+ ntpq/ntpq.mdoc.in@1.313 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.481 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.499 +68 -68
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.498 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.html@1.151 +1 -1
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ packageinfo.sh@1.493 +1 -1
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.72 +3 -3
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.72 +2 -2
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.html@1.74 +1 -1
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.71 +3 -3
+ NTP_4_2_8
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.72 +2 -2
+ NTP_4_2_8
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.76 +1 -1
+ NTP_4_2_8
+
+ scripts/invoke-plot_summary.texi@1.93 +2 -2
+ NTP_4_2_8
+
+ scripts/invoke-summary.texi@1.93 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.302 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait-opts@1.38 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.300 +3 -3
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.300 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.html@1.319 +2 -2
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.man.in@1.300 +3 -3
+ NTP_4_2_8
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.300 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.79 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.html@1.92 +2 -2
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.man.in@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.80 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.79 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.html@1.92 +2 -2
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.man.in@1.79 +3 -3
+ NTP_4_2_8
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.80 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.1plot_summaryman@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/plot_summary.1plot_summarymdoc@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.html@1.94 +2 -2
+ NTP_4_2_8
+
+ scripts/plot_summary.man.in@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/plot_summary.mdoc.in@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/summary-opts@1.40 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.1summaryman@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/summary.1summarymdoc@1.91 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.html@1.94 +2 -2
+ NTP_4_2_8
+
+ scripts/summary.man.in@1.91 +3 -3
+ NTP_4_2_8
+
+ scripts/summary.mdoc.in@1.91 +2 -2
+ NTP_4_2_8
+
+ sntp/invoke-sntp.texi@1.478 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp-opts.c@1.496 +159 -159
+ NTP_4_2_8
+
+ sntp/sntp-opts.h@1.495 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.1sntpman@1.313 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.1sntpmdoc@1.313 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp.html@1.493 +2 -2
+ NTP_4_2_8
+
+ sntp/sntp.man.in@1.313 +3 -3
+ NTP_4_2_8
+
+ sntp/sntp.mdoc.in@1.313 +2 -2
+ NTP_4_2_8
+
+ util/invoke-ntp-keygen.texi@1.482 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen-opts.c@1.499 +173 -173
+ NTP_4_2_8
+
+ util/ntp-keygen-opts.h@1.498 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.1ntp-keygenman@1.310 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.310 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen.html@1.157 +2 -2
+ NTP_4_2_8
+
+ util/ntp-keygen.man.in@1.310 +3 -3
+ NTP_4_2_8
+
+ util/ntp-keygen.mdoc.in@1.310 +2 -2
+ NTP_4_2_8
+
+ChangeSet@1.3265, 2014-12-19 05:55:30-05:00, stenn@deacon.udel.edu
+ ntp-4.2.8
+
+ ChangeLog@1.1592 +2 -0
+ ntp-4.2.8
+
+ packageinfo.sh@1.492 +4 -4
+ ntp-4.2.8
+
+ChangeSet@1.3264, 2014-12-19 04:43:15-05:00, stenn@deacon.udel.edu
+ Disable Sec 2672 interim fix for now
+
+ ntpd/ntp_io.c@1.396 +3 -0
+ Disable Sec 2672 interim fix for now
+
+ChangeSet@1.3263, 2014-12-19 04:41:40-05:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.1591 +0 -2
+ cleanup
+
+ChangeSet@1.3245.1.7, 2014-12-19 08:05:17+00:00, stenn@psp-deb1.ntp.org
+ NEWS file for 4.2.8
+
+ NEWS@1.128 +136 -5
+ NEWS file for 4.2.8
+
+ChangeSet@1.3245.1.6, 2014-12-18 23:01:06-05:00, stenn@deacon.udel.edu
+ [Sec 730] Increase RSA_generate_key modulus
+
+ ChangeLog@1.1579.1.5 +1 -0
+ [Sec 730] Increase RSA_generate_key modulus
+
+ util/ntp-keygen.c@1.97.1.1 +2 -2
+ [Sec 730] Increase RSA_generate_key modulus
+
+ChangeSet@1.3245.1.5, 2014-12-18 21:42:38-05:00, stenn@deacon.udel.edu
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ ChangeLog@1.1579.1.4 +1 -0
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ ntpd/refclock_ripencc.c@1.18 +1 -1
+ [Bug 2691] Wrong variable name in refclock_ripencc.c
+
+ChangeSet@1.3260, 2014-12-18 13:14:59+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2671] vallen in extension fields are not validated
+
+ ChangeLog@1.1589 +1 -0
+ [Sec 2671] vallen in extension fields are not validated
+
+ ntpd/ntp_proto.c@1.352 +9 -1
+ [Sec 2671] vallen in extension fields are not validated
+
+ChangeSet@1.3259, 2014-12-18 13:11:35+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs: debug output tweaking
+
+ ntpd/ntp_io.c@1.395 +6 -2
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs: debug output tweaking
+
+ChangeSet@1.3256.1.1, 2014-12-18 10:08:38+00:00, stenn@psp-deb1.ntp.org
+ Comment cleanup
+
+ ntpd/ntp_crypto.c@1.170 +1 -0
+ Comment cleanup
+
+ChangeSet@1.3245.1.4, 2014-12-18 09:42:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P486_RC
+ TAG: NTP_4_2_7P486_RC
+
+ ChangeLog@1.1579.1.3 +1 -0
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntp.conf.texi@1.167 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntp.keys.texi@1.164 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/invoke-ntpd.texi@1.480 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.5man@1.201 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.5mdoc@1.201 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.html@1.160 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.man.in@1.201 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.conf.mdoc.in@1.201 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.5man@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.5mdoc@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.html@1.161 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.man.in@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntp.keys.mdoc.in@1.198 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd-opts.c@1.501 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd-opts.h@1.500 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.1ntpdman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.html@1.155 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpd/ntpd.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/invoke-ntpdc.texi@1.478 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc-opts.c@1.496 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc-opts.h@1.495 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.html@1.322 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpdc/ntpdc.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/invoke-ntpq.texi@1.484 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq-opts.c@1.501 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq-opts.h@1.499 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.1ntpqman@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.html@1.152 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.man.in@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpq/ntpq.mdoc.in@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.480 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.498 +7 -7
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.497 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.150 +1 -1
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ packageinfo.sh@1.491 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.71 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.71 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.73 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.70 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.71 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.75 +1 -1
+ NTP_4_2_7P486_RC
+
+ scripts/invoke-plot_summary.texi@1.92 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/invoke-summary.texi@1.92 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.301 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.37 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.299 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.299 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.318 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.299 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.78 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.91 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.78 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.html@1.91 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.78 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.1plot_summaryman@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.html@1.93 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.man.in@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/plot_summary.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary-opts@1.39 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.1summaryman@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/summary.1summarymdoc@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.html@1.93 +2 -2
+ NTP_4_2_7P486_RC
+
+ scripts/summary.man.in@1.90 +3 -3
+ NTP_4_2_7P486_RC
+
+ scripts/summary.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/invoke-sntp.texi@1.477 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp-opts.c@1.495 +7 -7
+ NTP_4_2_7P486_RC
+
+ sntp/sntp-opts.h@1.494 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.1sntpman@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.1sntpmdoc@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.html@1.492 +2 -2
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.man.in@1.312 +3 -3
+ NTP_4_2_7P486_RC
+
+ sntp/sntp.mdoc.in@1.312 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/invoke-ntp-keygen.texi@1.481 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen-opts.c@1.498 +7 -7
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen-opts.h@1.497 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.html@1.156 +2 -2
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.man.in@1.309 +3 -3
+ NTP_4_2_7P486_RC
+
+ util/ntp-keygen.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P486_RC
+
+ChangeSet@1.3255, 2014-12-18 01:18:29+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ChangeLog@1.1586 +1 -0
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ ntpd/ntp_io.c@1.394 +20 -0
+ [Sec 2672] On some OSes ::1 can be spoofed, bypassing source IP ACLs
+
+ChangeSet@1.3254, 2014-12-18 01:17:02+00:00, stenn@psp-deb1.ntp.org
+ ntp_io.c lint removal
+
+ ntpd/ntp_io.c@1.393 +4 -1
+ lint removal
+
+ChangeSet@1.3245.1.3, 2014-12-16 04:59:54-05:00, murray@pogo.udel.edu
+ refclock_hpgps.c:
+ Fix typo.
+
+ ntpd/refclock_hpgps.c@1.16 +1 -1
+ Fix typo.
+
+ChangeSet@1.3245.1.2, 2014-12-16 03:36:46-05:00, murray@pogo.udel.edu
+ refclock_hpgps.c, ChangeLog:
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ ChangeLog@1.1579.1.2 +1 -0
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ ntpd/refclock_hpgps.c@1.15 +6 -3
+ Fix for bug 2687: RefClock 26/hpgps doesn't work at default line speed
+
+ChangeSet@1.3253, 2014-12-15 13:12:45+00:00, stenn@psp-deb1.ntp.org
+ Use finer-grained config.cache files for our configure runs
+
+ build@1.47 +2 -2
+ Use finer-grained config.cache files for our configure runs
+
+ChangeSet@1.3252, 2014-12-15 05:40:20+00:00, stenn@psp-deb1.ntp.org
+ Quiet some debug output
+
+ sntp/m4/ntp_crypto_rand.m4@1.2 +1 -1
+ Quiet some debug output
+
+ChangeSet@1.3251, 2014-12-14 16:12:13+00:00, stenn@psp-deb1.ntp.org
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ ChangeLog@1.1585 +1 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ configure.ac@1.578 +2 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ include/ntp_random.h@1.3 +3 -0
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ libntp/Makefile.am@1.75 +2 -1
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ libntp/ntp_crypto_rnd.c@1.1 +96 -0
+ BitKeeper file /home/stenn/ntp-dev-sec-2666/libntp/ntp_crypto_rnd.c
+
+ libntp/ntp_crypto_rnd.c@1.0 +0 -0
+
+ sntp/m4/ntp_crypto_rand.m4@1.1 +53 -0
+ BitKeeper file /home/stenn/ntp-dev-sec-2666/sntp/m4/ntp_crypto_rand.m4
+
+ sntp/m4/ntp_crypto_rand.m4@1.0 +0 -0
+
+ util/ntp-keygen.c@1.98 +10 -2
+ [Sec 2666] Use cryptographic random numbers for md5 key generation
+
+ChangeSet@1.3245.1.1, 2014-12-12 11:58:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P485_RC
+ TAG: NTP_4_2_7P485_RC
+
+ ChangeLog@1.1579.1.1 +1 -0
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntp.conf.texi@1.166 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntp.keys.texi@1.163 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/invoke-ntpd.texi@1.479 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.5man@1.200 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.5mdoc@1.200 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.html@1.159 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.man.in@1.200 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.conf.mdoc.in@1.200 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.5man@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.5mdoc@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.html@1.160 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.man.in@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntp.keys.mdoc.in@1.197 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd-opts.c@1.500 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd-opts.h@1.499 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.1ntpdman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.html@1.154 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpd/ntpd.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/invoke-ntpdc.texi@1.477 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc-opts.c@1.495 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc-opts.h@1.494 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.html@1.321 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpdc/ntpdc.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/invoke-ntpq.texi@1.483 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq-opts.c@1.500 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq-opts.h@1.498 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.1ntpqman@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.html@1.151 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.man.in@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpq/ntpq.mdoc.in@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.479 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.497 +7 -7
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.496 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.149 +1 -1
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ packageinfo.sh@1.490 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.70 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.70 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.72 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.69 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.74 +1 -1
+ NTP_4_2_7P485_RC
+
+ scripts/invoke-plot_summary.texi@1.91 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/invoke-summary.texi@1.91 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.300 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.36 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.298 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.298 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.317 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.298 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.77 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.90 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.77 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.html@1.90 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.77 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.1plot_summaryman@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.html@1.92 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.man.in@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/plot_summary.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary-opts@1.38 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.1summaryman@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/summary.1summarymdoc@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.html@1.92 +2 -2
+ NTP_4_2_7P485_RC
+
+ scripts/summary.man.in@1.89 +3 -3
+ NTP_4_2_7P485_RC
+
+ scripts/summary.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/invoke-sntp.texi@1.476 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp-opts.c@1.494 +7 -7
+ NTP_4_2_7P485_RC
+
+ sntp/sntp-opts.h@1.493 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.1sntpman@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.1sntpmdoc@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.html@1.491 +2 -2
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.man.in@1.311 +3 -3
+ NTP_4_2_7P485_RC
+
+ sntp/sntp.mdoc.in@1.311 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/invoke-ntp-keygen.texi@1.480 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen-opts.c@1.497 +7 -7
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen-opts.h@1.496 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.html@1.155 +2 -2
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.man.in@1.308 +3 -3
+ NTP_4_2_7P485_RC
+
+ util/ntp-keygen.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P485_RC
+
+ChangeSet@1.3249, 2014-12-12 11:24:31+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2670] Missing return; from error clause
+
+ ChangeLog@1.1583 +1 -0
+ [Sec 2670] Missing return; from error clause
+
+ ntpd/ntp_proto.c@1.351 +1 -0
+ [Sec 2670] Missing return; from error clause
+
+ChangeSet@1.3248, 2014-12-12 11:19:49+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2669] buffer overflow in configure()
+
+ ChangeLog@1.1582 +1 -0
+ [Sec 2669] buffer overflow in configure()
+
+ ntpd/ntp_control.c@1.192 +14 -0
+ [Sec 2669] buffer overflow in configure()
+
+ChangeSet@1.3247, 2014-12-12 11:13:55+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ ChangeLog@1.1581 +1 -0
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ ntpd/ntp_control.c@1.191 +16 -1
+ [Sec 2668] buffer overflow in ctl_putdata()
+
+ChangeSet@1.3246, 2014-12-12 11:06:53+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ ChangeLog@1.1580 +1 -0
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ ntpd/ntp_crypto.c@1.169 +12 -3
+ [Sec 2667] buffer overflow in crypto_recv()
+
+ChangeSet@1.3245, 2014-12-12 08:49:58+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ ChangeLog@1.1579 +1 -0
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ configure.ac@1.577 +5 -1
+ [Bug 2686] refclock_gpsdjson needs strtoll(), which is not always present
+
+ChangeSet@1.3244, 2014-12-11 12:13:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P484_RC
+ TAG: NTP_4_2_7P484_RC
+
+ ChangeLog@1.1578 +1 -0
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntp.conf.texi@1.165 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntp.keys.texi@1.162 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/invoke-ntpd.texi@1.478 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.5man@1.199 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.5mdoc@1.199 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.html@1.158 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.man.in@1.199 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.conf.mdoc.in@1.199 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.5man@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.5mdoc@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.html@1.159 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.man.in@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntp.keys.mdoc.in@1.196 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd-opts.c@1.499 +239 -239
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd-opts.h@1.498 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.1ntpdman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.1ntpdmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.html@1.153 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpd/ntpd.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/invoke-ntpdc.texi@1.476 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc-opts.c@1.494 +106 -106
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc-opts.h@1.493 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.1ntpdcman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.html@1.320 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpdc/ntpdc.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/invoke-ntpq.texi@1.482 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq-opts.c@1.499 +105 -105
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq-opts.h@1.497 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.1ntpqman@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.1ntpqmdoc@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.html@1.150 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.man.in@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpq/ntpq.mdoc.in@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.478 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.496 +67 -67
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.495 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.html@1.148 +1 -1
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ packageinfo.sh@1.489 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.69 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.69 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.html@1.71 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.68 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.69 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.73 +1 -1
+ NTP_4_2_7P484_RC
+
+ scripts/invoke-plot_summary.texi@1.90 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/invoke-summary.texi@1.90 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.299 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait-opts@1.35 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.297 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.297 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.html@1.316 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.man.in@1.297 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.76 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.html@1.89 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.man.in@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.76 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.html@1.89 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.man.in@1.76 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.1plot_summaryman@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.1plot_summarymdoc@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.html@1.91 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.man.in@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/plot_summary.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary-opts@1.37 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.1summaryman@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/summary.1summarymdoc@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.html@1.91 +2 -2
+ NTP_4_2_7P484_RC
+
+ scripts/summary.man.in@1.88 +3 -3
+ NTP_4_2_7P484_RC
+
+ scripts/summary.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/invoke-sntp.texi@1.475 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp-opts.c@1.493 +158 -158
+ NTP_4_2_7P484_RC
+
+ sntp/sntp-opts.h@1.492 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.1sntpman@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.1sntpmdoc@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.html@1.490 +2 -2
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.man.in@1.310 +3 -3
+ NTP_4_2_7P484_RC
+
+ sntp/sntp.mdoc.in@1.310 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/invoke-ntp-keygen.texi@1.479 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen-opts.c@1.496 +172 -172
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen-opts.h@1.495 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.1ntp-keygenman@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.html@1.154 +2 -2
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.man.in@1.307 +3 -3
+ NTP_4_2_7P484_RC
+
+ util/ntp-keygen.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P484_RC
+
+ChangeSet@1.3243, 2014-12-11 06:51:38-05:00, stenn@deacon.udel.edu
+ Start the RC cycle for 4.2.8
+
+ packageinfo.sh@1.488 +1 -1
+ Start the RC cycle for 4.2.8
+
+ChangeSet@1.3242, 2014-12-08 08:59:52+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P483
+ TAG: NTP_4_2_7P483
+
+ ChangeLog@1.1577 +1 -0
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntp.conf.texi@1.164 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntp.keys.texi@1.161 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/invoke-ntpd.texi@1.477 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.5man@1.198 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.5mdoc@1.198 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.html@1.157 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.man.in@1.198 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntp.conf.mdoc.in@1.198 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.5man@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.5mdoc@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.html@1.158 +1 -1
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.man.in@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntp.keys.mdoc.in@1.195 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd-opts.c@1.498 +7 -7
+ NTP_4_2_7P483
+
+ ntpd/ntpd-opts.h@1.497 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.1ntpdman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.1ntpdmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd.html@1.152 +2 -2
+ NTP_4_2_7P483
+
+ ntpd/ntpd.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpd/ntpd.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/invoke-ntpdc.texi@1.475 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc-opts.c@1.493 +7 -7
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc-opts.h@1.492 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.1ntpdcman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.html@1.319 +2 -2
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpdc/ntpdc.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/invoke-ntpq.texi@1.481 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq-opts.c@1.498 +7 -7
+ NTP_4_2_7P483
+
+ ntpq/ntpq-opts.h@1.496 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.1ntpqman@1.309 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.1ntpqmdoc@1.309 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq.html@1.149 +2 -2
+ NTP_4_2_7P483
+
+ ntpq/ntpq.man.in@1.309 +3 -3
+ NTP_4_2_7P483
+
+ ntpq/ntpq.mdoc.in@1.309 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.477 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.495 +7 -7
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.494 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.html@1.147 +1 -1
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ packageinfo.sh@1.487 +1 -1
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.68 +3 -3
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.68 +2 -2
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.html@1.70 +1 -1
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.67 +3 -3
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P483
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.72 +1 -1
+ NTP_4_2_7P483
+
+ scripts/invoke-plot_summary.texi@1.89 +2 -2
+ NTP_4_2_7P483
+
+ scripts/invoke-summary.texi@1.89 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.298 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait-opts@1.34 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.296 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.296 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.html@1.315 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.man.in@1.296 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.296 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.75 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.html@1.88 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.man.in@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.75 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.html@1.88 +2 -2
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.man.in@1.75 +3 -3
+ NTP_4_2_7P483
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.1plot_summaryman@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/plot_summary.1plot_summarymdoc@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.html@1.90 +2 -2
+ NTP_4_2_7P483
+
+ scripts/plot_summary.man.in@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/plot_summary.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary-opts@1.36 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.1summaryman@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/summary.1summarymdoc@1.87 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.html@1.90 +2 -2
+ NTP_4_2_7P483
+
+ scripts/summary.man.in@1.87 +3 -3
+ NTP_4_2_7P483
+
+ scripts/summary.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P483
+
+ sntp/invoke-sntp.texi@1.474 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp-opts.c@1.492 +9 -8
+ NTP_4_2_7P483
+
+ sntp/sntp-opts.h@1.491 +3 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.1sntpman@1.309 +5 -4
+ NTP_4_2_7P483
+
+ sntp/sntp.1sntpmdoc@1.309 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.html@1.489 +4 -3
+ NTP_4_2_7P483
+
+ sntp/sntp.man.in@1.309 +5 -4
+ NTP_4_2_7P483
+
+ sntp/sntp.mdoc.in@1.309 +4 -3
+ NTP_4_2_7P483
+
+ util/invoke-ntp-keygen.texi@1.478 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen-opts.c@1.495 +7 -7
+ NTP_4_2_7P483
+
+ util/ntp-keygen-opts.h@1.494 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.1ntp-keygenman@1.306 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.306 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen.html@1.153 +2 -2
+ NTP_4_2_7P483
+
+ util/ntp-keygen.man.in@1.306 +3 -3
+ NTP_4_2_7P483
+
+ util/ntp-keygen.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P483
+
+ChangeSet@1.3241, 2014-12-07 11:30:07+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2685] Better document the KOD file for sntp
+
+ ChangeLog@1.1576 +1 -0
+ [Bug 2685] Better document the KOD file for sntp
+
+ html/sntp.html@1.11 +3 -2
+ [Bug 2685] Better document the KOD file for sntp
+
+ sntp/sntp-opts.def@1.45 +2 -1
+ [Bug 2685] Better document the KOD file for sntp
+
+ChangeSet@1.3240, 2014-12-02 08:59:55+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P482
+ TAG: NTP_4_2_7P482
+
+ ChangeLog@1.1575 +1 -0
+ NTP_4_2_7P482
+
+ ntpd/invoke-ntp.conf.texi@1.163 +1 -1
+ NTP_4_2_7P482
+
+ ntpd/invoke-ntp.keys.texi@1.160 +1 -1
+ NTP_4_2_7P482
+
+ ntpd/invoke-ntpd.texi@1.476 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.conf.5man@1.197 +3 -3
+ NTP_4_2_7P482
+
+ ntpd/ntp.conf.5mdoc@1.197 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.conf.html@1.156 +1 -1
+ NTP_4_2_7P482
+
+ ntpd/ntp.conf.man.in@1.197 +3 -3
+ NTP_4_2_7P482
+
+ ntpd/ntp.conf.mdoc.in@1.197 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.keys.5man@1.194 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.keys.5mdoc@1.194 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.keys.html@1.157 +1 -1
+ NTP_4_2_7P482
+
+ ntpd/ntp.keys.man.in@1.194 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntp.keys.mdoc.in@1.194 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntpd-opts.c@1.497 +7 -7
+ NTP_4_2_7P482
+
+ ntpd/ntpd-opts.h@1.496 +3 -3
+ NTP_4_2_7P482
+
+ ntpd/ntpd.1ntpdman@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpd/ntpd.1ntpdmdoc@1.305 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntpd.html@1.151 +2 -2
+ NTP_4_2_7P482
+
+ ntpd/ntpd.man.in@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpd/ntpd.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P482
+
+ ntpdc/invoke-ntpdc.texi@1.474 +2 -2
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc-opts.c@1.492 +7 -7
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc-opts.h@1.491 +3 -3
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc.1ntpdcman@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.305 +2 -2
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc.html@1.318 +2 -2
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc.man.in@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpdc/ntpdc.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P482
+
+ ntpq/invoke-ntpq.texi@1.480 +2 -2
+ NTP_4_2_7P482
+
+ ntpq/ntpq-opts.c@1.497 +7 -7
+ NTP_4_2_7P482
+
+ ntpq/ntpq-opts.h@1.495 +3 -3
+ NTP_4_2_7P482
+
+ ntpq/ntpq.1ntpqman@1.308 +3 -3
+ NTP_4_2_7P482
+
+ ntpq/ntpq.1ntpqmdoc@1.308 +2 -2
+ NTP_4_2_7P482
+
+ ntpq/ntpq.html@1.148 +2 -2
+ NTP_4_2_7P482
+
+ ntpq/ntpq.man.in@1.308 +3 -3
+ NTP_4_2_7P482
+
+ ntpq/ntpq.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P482
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.476 +2 -2
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.494 +7 -7
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.493 +3 -3
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.305 +2 -2
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd.html@1.146 +1 -1
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd.man.in@1.305 +3 -3
+ NTP_4_2_7P482
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P482
+
+ packageinfo.sh@1.486 +1 -1
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.67 +3 -3
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.67 +2 -2
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/calc_tickadj.html@1.69 +1 -1
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.66 +3 -3
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P482
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.71 +1 -1
+ NTP_4_2_7P482
+
+ scripts/invoke-plot_summary.texi@1.88 +2 -2
+ NTP_4_2_7P482
+
+ scripts/invoke-summary.texi@1.88 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.297 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait-opts@1.33 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.295 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.295 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait.html@1.314 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait.man.in@1.295 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.295 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.86 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep-opts@1.35 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.74 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.74 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep.html@1.87 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep.man.in@1.74 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.86 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace-opts@1.35 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.74 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.74 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace.html@1.87 +2 -2
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace.man.in@1.74 +3 -3
+ NTP_4_2_7P482
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P482
+
+ scripts/plot_summary-opts@1.35 +2 -2
+ NTP_4_2_7P482
+
+ scripts/plot_summary.1plot_summaryman@1.86 +3 -3
+ NTP_4_2_7P482
+
+ scripts/plot_summary.1plot_summarymdoc@1.86 +2 -2
+ NTP_4_2_7P482
+
+ scripts/plot_summary.html@1.89 +2 -2
+ NTP_4_2_7P482
+
+ scripts/plot_summary.man.in@1.86 +3 -3
+ NTP_4_2_7P482
+
+ scripts/plot_summary.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P482
+
+ scripts/summary-opts@1.35 +2 -2
+ NTP_4_2_7P482
+
+ scripts/summary.1summaryman@1.86 +3 -3
+ NTP_4_2_7P482
+
+ scripts/summary.1summarymdoc@1.86 +2 -2
+ NTP_4_2_7P482
+
+ scripts/summary.html@1.89 +2 -2
+ NTP_4_2_7P482
+
+ scripts/summary.man.in@1.86 +3 -3
+ NTP_4_2_7P482
+
+ scripts/summary.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P482
+
+ sntp/invoke-sntp.texi@1.473 +2 -2
+ NTP_4_2_7P482
+
+ sntp/sntp-opts.c@1.491 +7 -7
+ NTP_4_2_7P482
+
+ sntp/sntp-opts.h@1.490 +3 -3
+ NTP_4_2_7P482
+
+ sntp/sntp.1sntpman@1.308 +3 -3
+ NTP_4_2_7P482
+
+ sntp/sntp.1sntpmdoc@1.308 +2 -2
+ NTP_4_2_7P482
+
+ sntp/sntp.html@1.488 +2 -2
+ NTP_4_2_7P482
+
+ sntp/sntp.man.in@1.308 +3 -3
+ NTP_4_2_7P482
+
+ sntp/sntp.mdoc.in@1.308 +2 -2
+ NTP_4_2_7P482
+
+ util/invoke-ntp-keygen.texi@1.477 +2 -2
+ NTP_4_2_7P482
+
+ util/ntp-keygen-opts.c@1.494 +7 -7
+ NTP_4_2_7P482
+
+ util/ntp-keygen-opts.h@1.493 +3 -3
+ NTP_4_2_7P482
+
+ util/ntp-keygen.1ntp-keygenman@1.305 +3 -3
+ NTP_4_2_7P482
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.305 +2 -2
+ NTP_4_2_7P482
+
+ util/ntp-keygen.html@1.152 +2 -2
+ NTP_4_2_7P482
+
+ util/ntp-keygen.man.in@1.305 +3 -3
+ NTP_4_2_7P482
+
+ util/ntp-keygen.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P482
+
+ChangeSet@1.3237.1.1, 2014-12-02 02:55:23+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2641] sntp is installed in the wrong location in Solaris
+
+ ChangeLog@1.1572.1.1 +1 -0
+ [Bug 2641] sntp is installed in the wrong location in Solaris
+
+ sntp/loc/solaris@1.6 +1 -1
+ [Bug 2641] sntp is installed in the wrong location in Solaris
+
+ChangeSet@1.3238, 2014-12-02 00:37:46+01:00, jnperlin@hydra.(none)
+ [Bug 2678] nmea_control() now checks 'refclock_params()' result.
+
+ ChangeLog@1.1573 +1 -0
+ [Bug 2678] nmea_control() now checks 'refclock_params()' result.
+
+ ntpd/refclock_nmea.c@1.75 +12 -2
+ [Bug 2678] nmea_control() now checks 'refclock_params()' result.
+
+ChangeSet@1.3237, 2014-11-22 08:59:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P481
+ TAG: NTP_4_2_7P481
+
+ ChangeLog@1.1572 +1 -0
+ NTP_4_2_7P481
+
+ ntpd/invoke-ntp.conf.texi@1.162 +1 -1
+ NTP_4_2_7P481
+
+ ntpd/invoke-ntp.keys.texi@1.159 +1 -1
+ NTP_4_2_7P481
+
+ ntpd/invoke-ntpd.texi@1.475 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.conf.5man@1.196 +3 -3
+ NTP_4_2_7P481
+
+ ntpd/ntp.conf.5mdoc@1.196 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.conf.html@1.155 +1 -1
+ NTP_4_2_7P481
+
+ ntpd/ntp.conf.man.in@1.196 +3 -3
+ NTP_4_2_7P481
+
+ ntpd/ntp.conf.mdoc.in@1.196 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.keys.5man@1.193 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.keys.5mdoc@1.193 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.keys.html@1.156 +1 -1
+ NTP_4_2_7P481
+
+ ntpd/ntp.keys.man.in@1.193 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntp.keys.mdoc.in@1.193 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntpd-opts.c@1.496 +7 -7
+ NTP_4_2_7P481
+
+ ntpd/ntpd-opts.h@1.495 +3 -3
+ NTP_4_2_7P481
+
+ ntpd/ntpd.1ntpdman@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpd/ntpd.1ntpdmdoc@1.304 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntpd.html@1.150 +2 -2
+ NTP_4_2_7P481
+
+ ntpd/ntpd.man.in@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpd/ntpd.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P481
+
+ ntpdc/invoke-ntpdc.texi@1.473 +2 -2
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc-opts.c@1.491 +7 -7
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc-opts.h@1.490 +3 -3
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc.1ntpdcman@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.304 +2 -2
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc.html@1.317 +2 -2
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc.man.in@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpdc/ntpdc.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P481
+
+ ntpq/invoke-ntpq.texi@1.479 +2 -2
+ NTP_4_2_7P481
+
+ ntpq/ntpq-opts.c@1.496 +7 -7
+ NTP_4_2_7P481
+
+ ntpq/ntpq-opts.h@1.494 +3 -3
+ NTP_4_2_7P481
+
+ ntpq/ntpq.1ntpqman@1.307 +3 -3
+ NTP_4_2_7P481
+
+ ntpq/ntpq.1ntpqmdoc@1.307 +2 -2
+ NTP_4_2_7P481
+
+ ntpq/ntpq.html@1.147 +2 -2
+ NTP_4_2_7P481
+
+ ntpq/ntpq.man.in@1.307 +3 -3
+ NTP_4_2_7P481
+
+ ntpq/ntpq.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P481
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.475 +2 -2
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.493 +7 -7
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.492 +3 -3
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.304 +2 -2
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd.html@1.145 +1 -1
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd.man.in@1.304 +3 -3
+ NTP_4_2_7P481
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P481
+
+ packageinfo.sh@1.485 +1 -1
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.66 +3 -3
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.66 +2 -2
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/calc_tickadj.html@1.68 +1 -1
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.65 +3 -3
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P481
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.70 +1 -1
+ NTP_4_2_7P481
+
+ scripts/invoke-plot_summary.texi@1.87 +2 -2
+ NTP_4_2_7P481
+
+ scripts/invoke-summary.texi@1.87 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.296 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait-opts@1.32 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.294 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.294 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait.html@1.313 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait.man.in@1.294 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.294 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.85 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep-opts@1.34 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.73 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.73 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep.html@1.86 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep.man.in@1.73 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.85 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace-opts@1.34 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.73 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.73 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace.html@1.86 +2 -2
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace.man.in@1.73 +3 -3
+ NTP_4_2_7P481
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P481
+
+ scripts/plot_summary-opts@1.34 +2 -2
+ NTP_4_2_7P481
+
+ scripts/plot_summary.1plot_summaryman@1.85 +3 -3
+ NTP_4_2_7P481
+
+ scripts/plot_summary.1plot_summarymdoc@1.85 +2 -2
+ NTP_4_2_7P481
+
+ scripts/plot_summary.html@1.88 +2 -2
+ NTP_4_2_7P481
+
+ scripts/plot_summary.man.in@1.85 +3 -3
+ NTP_4_2_7P481
+
+ scripts/plot_summary.mdoc.in@1.85 +2 -2
+ NTP_4_2_7P481
+
+ scripts/summary-opts@1.34 +2 -2
+ NTP_4_2_7P481
+
+ scripts/summary.1summaryman@1.85 +3 -3
+ NTP_4_2_7P481
+
+ scripts/summary.1summarymdoc@1.85 +2 -2
+ NTP_4_2_7P481
+
+ scripts/summary.html@1.88 +2 -2
+ NTP_4_2_7P481
+
+ scripts/summary.man.in@1.85 +3 -3
+ NTP_4_2_7P481
+
+ scripts/summary.mdoc.in@1.85 +2 -2
+ NTP_4_2_7P481
+
+ sntp/invoke-sntp.texi@1.472 +2 -2
+ NTP_4_2_7P481
+
+ sntp/sntp-opts.c@1.490 +7 -7
+ NTP_4_2_7P481
+
+ sntp/sntp-opts.h@1.489 +3 -3
+ NTP_4_2_7P481
+
+ sntp/sntp.1sntpman@1.307 +3 -3
+ NTP_4_2_7P481
+
+ sntp/sntp.1sntpmdoc@1.307 +2 -2
+ NTP_4_2_7P481
+
+ sntp/sntp.html@1.487 +2 -2
+ NTP_4_2_7P481
+
+ sntp/sntp.man.in@1.307 +3 -3
+ NTP_4_2_7P481
+
+ sntp/sntp.mdoc.in@1.307 +2 -2
+ NTP_4_2_7P481
+
+ util/invoke-ntp-keygen.texi@1.476 +2 -2
+ NTP_4_2_7P481
+
+ util/ntp-keygen-opts.c@1.493 +7 -7
+ NTP_4_2_7P481
+
+ util/ntp-keygen-opts.h@1.492 +3 -3
+ NTP_4_2_7P481
+
+ util/ntp-keygen.1ntp-keygenman@1.304 +3 -3
+ NTP_4_2_7P481
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.304 +2 -2
+ NTP_4_2_7P481
+
+ util/ntp-keygen.html@1.151 +2 -2
+ NTP_4_2_7P481
+
+ util/ntp-keygen.man.in@1.304 +3 -3
+ NTP_4_2_7P481
+
+ util/ntp-keygen.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P481
+
+ChangeSet@1.3236, 2014-11-21 21:13:03+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition
+
+ ChangeLog@1.1571 +1 -0
+ [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition
+
+ ntpd/ntp_refclock.c@1.119 +5 -8
+ [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition
+
+ChangeSet@1.3235, 2014-11-21 11:08:32+00:00, stenn@psp-fb1.ntp.org
+ Rename pps_enable to hardpps_enable.
+
+ ChangeLog@1.1570 +1 -0
+ Rename pps_enable to hardpps_enable.
+
+ include/ntpd.h@1.183 +1 -1
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/ntp_loopfilter.c@1.175 +3 -3
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/ntp_proto.c@1.350 +2 -2
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/ntp_refclock.c@1.118 +1 -1
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/ntp_request.c@1.112 +1 -1
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/refclock_jupiter.c@1.28 +1 -1
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/refclock_oncore.c@1.101 +1 -1
+ Rename pps_enable to hardpps_enable.
+
+ ntpd/refclock_parse.c@1.68 +2 -2
+ Rename pps_enable to hardpps_enable.
+
+ChangeSet@1.3234, 2014-11-21 09:44:10+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2314] Only enable PPS if kernel consumer binding succeeds
+
+ ChangeLog@1.1569 +1 -0
+ [Bug 2314] Only enable PPS if kernel consumer binding succeeds
+
+ ntpd/ntp_refclock.c@1.117 +4 -3
+ [Bug 2314] Only enable PPS if kernel consumer binding succeeds
+
+ChangeSet@1.3233, 2014-11-21 09:00:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P480
+ TAG: NTP_4_2_7P480
+
+ ChangeLog@1.1568 +1 -0
+ NTP_4_2_7P480
+
+ ntpd/invoke-ntp.conf.texi@1.161 +1 -1
+ NTP_4_2_7P480
+
+ ntpd/invoke-ntp.keys.texi@1.158 +1 -1
+ NTP_4_2_7P480
+
+ ntpd/invoke-ntpd.texi@1.474 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.conf.5man@1.195 +3 -3
+ NTP_4_2_7P480
+
+ ntpd/ntp.conf.5mdoc@1.195 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.conf.html@1.154 +1 -1
+ NTP_4_2_7P480
+
+ ntpd/ntp.conf.man.in@1.195 +3 -3
+ NTP_4_2_7P480
+
+ ntpd/ntp.conf.mdoc.in@1.195 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.keys.5man@1.192 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.keys.5mdoc@1.192 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.keys.html@1.155 +1 -1
+ NTP_4_2_7P480
+
+ ntpd/ntp.keys.man.in@1.192 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntp.keys.mdoc.in@1.192 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntpd-opts.c@1.495 +7 -7
+ NTP_4_2_7P480
+
+ ntpd/ntpd-opts.h@1.494 +3 -3
+ NTP_4_2_7P480
+
+ ntpd/ntpd.1ntpdman@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpd/ntpd.1ntpdmdoc@1.303 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntpd.html@1.149 +2 -2
+ NTP_4_2_7P480
+
+ ntpd/ntpd.man.in@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpd/ntpd.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P480
+
+ ntpdc/invoke-ntpdc.texi@1.472 +2 -2
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc-opts.c@1.490 +7 -7
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc-opts.h@1.489 +3 -3
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc.1ntpdcman@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.303 +2 -2
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc.html@1.316 +2 -2
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc.man.in@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpdc/ntpdc.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P480
+
+ ntpq/invoke-ntpq.texi@1.478 +2 -2
+ NTP_4_2_7P480
+
+ ntpq/ntpq-opts.c@1.495 +7 -7
+ NTP_4_2_7P480
+
+ ntpq/ntpq-opts.h@1.493 +3 -3
+ NTP_4_2_7P480
+
+ ntpq/ntpq.1ntpqman@1.306 +3 -3
+ NTP_4_2_7P480
+
+ ntpq/ntpq.1ntpqmdoc@1.306 +2 -2
+ NTP_4_2_7P480
+
+ ntpq/ntpq.html@1.146 +2 -2
+ NTP_4_2_7P480
+
+ ntpq/ntpq.man.in@1.306 +3 -3
+ NTP_4_2_7P480
+
+ ntpq/ntpq.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P480
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.474 +2 -2
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.492 +7 -7
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.491 +3 -3
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.303 +2 -2
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd.html@1.144 +1 -1
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd.man.in@1.303 +3 -3
+ NTP_4_2_7P480
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P480
+
+ packageinfo.sh@1.484 +1 -1
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.65 +3 -3
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.65 +2 -2
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/calc_tickadj.html@1.67 +1 -1
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.64 +3 -3
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P480
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.69 +1 -1
+ NTP_4_2_7P480
+
+ scripts/invoke-plot_summary.texi@1.86 +2 -2
+ NTP_4_2_7P480
+
+ scripts/invoke-summary.texi@1.86 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.295 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait-opts@1.31 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.293 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.293 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait.html@1.312 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait.man.in@1.293 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.293 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.84 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep-opts@1.33 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.72 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.72 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep.html@1.85 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep.man.in@1.72 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.84 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace-opts@1.33 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.72 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.72 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace.html@1.85 +2 -2
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace.man.in@1.72 +3 -3
+ NTP_4_2_7P480
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P480
+
+ scripts/plot_summary-opts@1.33 +2 -2
+ NTP_4_2_7P480
+
+ scripts/plot_summary.1plot_summaryman@1.84 +3 -3
+ NTP_4_2_7P480
+
+ scripts/plot_summary.1plot_summarymdoc@1.84 +2 -2
+ NTP_4_2_7P480
+
+ scripts/plot_summary.html@1.87 +2 -2
+ NTP_4_2_7P480
+
+ scripts/plot_summary.man.in@1.84 +3 -3
+ NTP_4_2_7P480
+
+ scripts/plot_summary.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P480
+
+ scripts/summary-opts@1.33 +2 -2
+ NTP_4_2_7P480
+
+ scripts/summary.1summaryman@1.84 +3 -3
+ NTP_4_2_7P480
+
+ scripts/summary.1summarymdoc@1.84 +2 -2
+ NTP_4_2_7P480
+
+ scripts/summary.html@1.87 +2 -2
+ NTP_4_2_7P480
+
+ scripts/summary.man.in@1.84 +3 -3
+ NTP_4_2_7P480
+
+ scripts/summary.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P480
+
+ sntp/invoke-sntp.texi@1.471 +2 -2
+ NTP_4_2_7P480
+
+ sntp/sntp-opts.c@1.489 +7 -7
+ NTP_4_2_7P480
+
+ sntp/sntp-opts.h@1.488 +3 -3
+ NTP_4_2_7P480
+
+ sntp/sntp.1sntpman@1.306 +3 -3
+ NTP_4_2_7P480
+
+ sntp/sntp.1sntpmdoc@1.306 +2 -2
+ NTP_4_2_7P480
+
+ sntp/sntp.html@1.486 +2 -2
+ NTP_4_2_7P480
+
+ sntp/sntp.man.in@1.306 +3 -3
+ NTP_4_2_7P480
+
+ sntp/sntp.mdoc.in@1.306 +2 -2
+ NTP_4_2_7P480
+
+ util/invoke-ntp-keygen.texi@1.475 +2 -2
+ NTP_4_2_7P480
+
+ util/ntp-keygen-opts.c@1.492 +7 -7
+ NTP_4_2_7P480
+
+ util/ntp-keygen-opts.h@1.491 +3 -3
+ NTP_4_2_7P480
+
+ util/ntp-keygen.1ntp-keygenman@1.303 +3 -3
+ NTP_4_2_7P480
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.303 +2 -2
+ NTP_4_2_7P480
+
+ util/ntp-keygen.html@1.150 +2 -2
+ NTP_4_2_7P480
+
+ util/ntp-keygen.man.in@1.303 +3 -3
+ NTP_4_2_7P480
+
+ util/ntp-keygen.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P480
+
+ChangeSet@1.3232, 2014-11-20 10:21:46+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2677] PATH_MAX isn't #define'd under Windows
+
+ ChangeLog@1.1567 +2 -0
+ [Bug 2677] PATH_MAX isn't #define'd under Windows
+
+ ntpd/ntp_loopfilter.c@1.174 +3 -0
+ [Bug 2677] PATH_MAX isn't #define'd under Windows
+
+ChangeSet@1.3231, 2014-11-15 08:58:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P479
+ TAG: NTP_4_2_7P479
+
+ ChangeLog@1.1566 +1 -0
+ NTP_4_2_7P479
+
+ ntpd/invoke-ntp.conf.texi@1.160 +1 -1
+ NTP_4_2_7P479
+
+ ntpd/invoke-ntp.keys.texi@1.157 +1 -1
+ NTP_4_2_7P479
+
+ ntpd/invoke-ntpd.texi@1.473 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.conf.5man@1.194 +3 -3
+ NTP_4_2_7P479
+
+ ntpd/ntp.conf.5mdoc@1.194 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.conf.html@1.153 +1 -1
+ NTP_4_2_7P479
+
+ ntpd/ntp.conf.man.in@1.194 +3 -3
+ NTP_4_2_7P479
+
+ ntpd/ntp.conf.mdoc.in@1.194 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.keys.5man@1.191 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.keys.5mdoc@1.191 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.keys.html@1.154 +1 -1
+ NTP_4_2_7P479
+
+ ntpd/ntp.keys.man.in@1.191 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntp.keys.mdoc.in@1.191 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntpd-opts.c@1.494 +7 -7
+ NTP_4_2_7P479
+
+ ntpd/ntpd-opts.h@1.493 +3 -3
+ NTP_4_2_7P479
+
+ ntpd/ntpd.1ntpdman@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpd/ntpd.1ntpdmdoc@1.302 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntpd.html@1.148 +2 -2
+ NTP_4_2_7P479
+
+ ntpd/ntpd.man.in@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpd/ntpd.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P479
+
+ ntpdc/invoke-ntpdc.texi@1.471 +2 -2
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc-opts.c@1.489 +7 -7
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc-opts.h@1.488 +3 -3
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc.1ntpdcman@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.302 +2 -2
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc.html@1.315 +2 -2
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc.man.in@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpdc/ntpdc.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P479
+
+ ntpq/invoke-ntpq.texi@1.477 +2 -2
+ NTP_4_2_7P479
+
+ ntpq/ntpq-opts.c@1.494 +7 -7
+ NTP_4_2_7P479
+
+ ntpq/ntpq-opts.h@1.492 +3 -3
+ NTP_4_2_7P479
+
+ ntpq/ntpq.1ntpqman@1.305 +3 -3
+ NTP_4_2_7P479
+
+ ntpq/ntpq.1ntpqmdoc@1.305 +2 -2
+ NTP_4_2_7P479
+
+ ntpq/ntpq.html@1.145 +2 -2
+ NTP_4_2_7P479
+
+ ntpq/ntpq.man.in@1.305 +3 -3
+ NTP_4_2_7P479
+
+ ntpq/ntpq.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P479
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.473 +2 -2
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.491 +7 -7
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.490 +3 -3
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.302 +2 -2
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd.html@1.143 +1 -1
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd.man.in@1.302 +3 -3
+ NTP_4_2_7P479
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P479
+
+ packageinfo.sh@1.483 +1 -1
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.64 +3 -3
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.64 +2 -2
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/calc_tickadj.html@1.66 +1 -1
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.63 +3 -3
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P479
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.68 +1 -1
+ NTP_4_2_7P479
+
+ scripts/invoke-plot_summary.texi@1.85 +2 -2
+ NTP_4_2_7P479
+
+ scripts/invoke-summary.texi@1.85 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.294 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait-opts@1.30 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.292 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.292 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait.html@1.311 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait.man.in@1.292 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.292 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.83 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep-opts@1.32 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.71 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.71 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep.html@1.84 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep.man.in@1.71 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.83 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace-opts@1.32 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.71 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.71 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace.html@1.84 +2 -2
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace.man.in@1.71 +3 -3
+ NTP_4_2_7P479
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P479
+
+ scripts/plot_summary-opts@1.32 +2 -2
+ NTP_4_2_7P479
+
+ scripts/plot_summary.1plot_summaryman@1.83 +3 -3
+ NTP_4_2_7P479
+
+ scripts/plot_summary.1plot_summarymdoc@1.83 +2 -2
+ NTP_4_2_7P479
+
+ scripts/plot_summary.html@1.86 +2 -2
+ NTP_4_2_7P479
+
+ scripts/plot_summary.man.in@1.83 +3 -3
+ NTP_4_2_7P479
+
+ scripts/plot_summary.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P479
+
+ scripts/summary-opts@1.32 +2 -2
+ NTP_4_2_7P479
+
+ scripts/summary.1summaryman@1.83 +3 -3
+ NTP_4_2_7P479
+
+ scripts/summary.1summarymdoc@1.83 +2 -2
+ NTP_4_2_7P479
+
+ scripts/summary.html@1.86 +2 -2
+ NTP_4_2_7P479
+
+ scripts/summary.man.in@1.83 +3 -3
+ NTP_4_2_7P479
+
+ scripts/summary.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P479
+
+ sntp/invoke-sntp.texi@1.470 +2 -2
+ NTP_4_2_7P479
+
+ sntp/sntp-opts.c@1.488 +7 -7
+ NTP_4_2_7P479
+
+ sntp/sntp-opts.h@1.487 +3 -3
+ NTP_4_2_7P479
+
+ sntp/sntp.1sntpman@1.305 +3 -3
+ NTP_4_2_7P479
+
+ sntp/sntp.1sntpmdoc@1.305 +2 -2
+ NTP_4_2_7P479
+
+ sntp/sntp.html@1.485 +2 -2
+ NTP_4_2_7P479
+
+ sntp/sntp.man.in@1.305 +3 -3
+ NTP_4_2_7P479
+
+ sntp/sntp.mdoc.in@1.305 +2 -2
+ NTP_4_2_7P479
+
+ util/invoke-ntp-keygen.texi@1.474 +2 -2
+ NTP_4_2_7P479
+
+ util/ntp-keygen-opts.c@1.491 +7 -7
+ NTP_4_2_7P479
+
+ util/ntp-keygen-opts.h@1.490 +3 -3
+ NTP_4_2_7P479
+
+ util/ntp-keygen.1ntp-keygenman@1.302 +3 -3
+ NTP_4_2_7P479
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.302 +2 -2
+ NTP_4_2_7P479
+
+ util/ntp-keygen.html@1.149 +2 -2
+ NTP_4_2_7P479
+
+ util/ntp-keygen.man.in@1.302 +3 -3
+ NTP_4_2_7P479
+
+ util/ntp-keygen.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P479
+
+ChangeSet@1.3230, 2014-11-15 04:42:01+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed
+
+ ChangeLog@1.1565 +1 -0
+ [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed
+
+ include/ntp_crypto.h@1.51 +4 -2
+ [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed
+
+ ntpd/ntp_control.c@1.190 +4 -1
+ [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed
+
+ ntpd/ntp_crypto.c@1.168 +98 -32
+ [Bug 2651] Certificates with ASN timestamps w/ 4-digit years mis-parsed
+
+ChangeSet@1.3229, 2014-11-14 10:55:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P478
+ TAG: NTP_4_2_7P478
+
+ ChangeLog@1.1564 +1 -0
+ NTP_4_2_7P478
+
+ ntpd/invoke-ntp.conf.texi@1.159 +1 -1
+ NTP_4_2_7P478
+
+ ntpd/invoke-ntp.keys.texi@1.156 +1 -1
+ NTP_4_2_7P478
+
+ ntpd/invoke-ntpd.texi@1.472 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.conf.5man@1.193 +3 -3
+ NTP_4_2_7P478
+
+ ntpd/ntp.conf.5mdoc@1.193 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.conf.html@1.152 +1 -1
+ NTP_4_2_7P478
+
+ ntpd/ntp.conf.man.in@1.193 +3 -3
+ NTP_4_2_7P478
+
+ ntpd/ntp.conf.mdoc.in@1.193 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.keys.5man@1.190 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.keys.5mdoc@1.190 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.keys.html@1.153 +1 -1
+ NTP_4_2_7P478
+
+ ntpd/ntp.keys.man.in@1.190 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntp.keys.mdoc.in@1.190 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntpd-opts.c@1.493 +7 -7
+ NTP_4_2_7P478
+
+ ntpd/ntpd-opts.h@1.492 +3 -3
+ NTP_4_2_7P478
+
+ ntpd/ntpd.1ntpdman@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpd/ntpd.1ntpdmdoc@1.301 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntpd.html@1.147 +2 -2
+ NTP_4_2_7P478
+
+ ntpd/ntpd.man.in@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpd/ntpd.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P478
+
+ ntpdc/invoke-ntpdc.texi@1.470 +2 -2
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc-opts.c@1.488 +7 -7
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc-opts.h@1.487 +3 -3
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc.1ntpdcman@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.301 +2 -2
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc.html@1.314 +2 -2
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc.man.in@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpdc/ntpdc.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P478
+
+ ntpq/invoke-ntpq.texi@1.476 +2 -2
+ NTP_4_2_7P478
+
+ ntpq/ntpq-opts.c@1.493 +7 -7
+ NTP_4_2_7P478
+
+ ntpq/ntpq-opts.h@1.491 +3 -3
+ NTP_4_2_7P478
+
+ ntpq/ntpq.1ntpqman@1.304 +3 -3
+ NTP_4_2_7P478
+
+ ntpq/ntpq.1ntpqmdoc@1.304 +2 -2
+ NTP_4_2_7P478
+
+ ntpq/ntpq.html@1.144 +2 -2
+ NTP_4_2_7P478
+
+ ntpq/ntpq.man.in@1.304 +3 -3
+ NTP_4_2_7P478
+
+ ntpq/ntpq.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P478
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.472 +2 -2
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.490 +7 -7
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.489 +3 -3
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.301 +2 -2
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd.html@1.142 +1 -1
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd.man.in@1.301 +3 -3
+ NTP_4_2_7P478
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P478
+
+ packageinfo.sh@1.482 +1 -1
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.63 +3 -3
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.63 +2 -2
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/calc_tickadj.html@1.65 +1 -1
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.62 +3 -3
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.63 +2 -2
+ NTP_4_2_7P478
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.67 +1 -1
+ NTP_4_2_7P478
+
+ scripts/invoke-plot_summary.texi@1.84 +2 -2
+ NTP_4_2_7P478
+
+ scripts/invoke-summary.texi@1.84 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.293 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait-opts@1.29 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.291 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.291 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait.html@1.310 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait.man.in@1.291 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.291 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.82 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep-opts@1.31 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.70 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.70 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep.html@1.83 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep.man.in@1.70 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.71 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.82 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace-opts@1.31 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.70 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.70 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace.html@1.83 +2 -2
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace.man.in@1.70 +3 -3
+ NTP_4_2_7P478
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.71 +2 -2
+ NTP_4_2_7P478
+
+ scripts/plot_summary-opts@1.31 +2 -2
+ NTP_4_2_7P478
+
+ scripts/plot_summary.1plot_summaryman@1.82 +3 -3
+ NTP_4_2_7P478
+
+ scripts/plot_summary.1plot_summarymdoc@1.82 +2 -2
+ NTP_4_2_7P478
+
+ scripts/plot_summary.html@1.85 +2 -2
+ NTP_4_2_7P478
+
+ scripts/plot_summary.man.in@1.82 +3 -3
+ NTP_4_2_7P478
+
+ scripts/plot_summary.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P478
+
+ scripts/summary-opts@1.31 +2 -2
+ NTP_4_2_7P478
+
+ scripts/summary.1summaryman@1.82 +3 -3
+ NTP_4_2_7P478
+
+ scripts/summary.1summarymdoc@1.82 +2 -2
+ NTP_4_2_7P478
+
+ scripts/summary.html@1.85 +2 -2
+ NTP_4_2_7P478
+
+ scripts/summary.man.in@1.82 +3 -3
+ NTP_4_2_7P478
+
+ scripts/summary.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P478
+
+ sntp/invoke-sntp.texi@1.469 +2 -2
+ NTP_4_2_7P478
+
+ sntp/sntp-opts.c@1.487 +7 -7
+ NTP_4_2_7P478
+
+ sntp/sntp-opts.h@1.486 +3 -3
+ NTP_4_2_7P478
+
+ sntp/sntp.1sntpman@1.304 +3 -3
+ NTP_4_2_7P478
+
+ sntp/sntp.1sntpmdoc@1.304 +2 -2
+ NTP_4_2_7P478
+
+ sntp/sntp.html@1.484 +2 -2
+ NTP_4_2_7P478
+
+ sntp/sntp.man.in@1.304 +3 -3
+ NTP_4_2_7P478
+
+ sntp/sntp.mdoc.in@1.304 +2 -2
+ NTP_4_2_7P478
+
+ util/invoke-ntp-keygen.texi@1.473 +2 -2
+ NTP_4_2_7P478
+
+ util/ntp-keygen-opts.c@1.490 +7 -7
+ NTP_4_2_7P478
+
+ util/ntp-keygen-opts.h@1.489 +3 -3
+ NTP_4_2_7P478
+
+ util/ntp-keygen.1ntp-keygenman@1.301 +3 -3
+ NTP_4_2_7P478
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.301 +2 -2
+ NTP_4_2_7P478
+
+ util/ntp-keygen.html@1.148 +2 -2
+ NTP_4_2_7P478
+
+ util/ntp-keygen.man.in@1.301 +3 -3
+ NTP_4_2_7P478
+
+ util/ntp-keygen.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P478
+
+ChangeSet@1.3228, 2014-11-14 09:53:23+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2650] includefile processing broken
+
+ ChangeLog@1.1563 +1 -0
+ [Bug 2650] includefile processing broken
+
+ ntpd/ntp_scanner.c@1.45 +2 -0
+ [Bug 2650] includefile processing broken
+
+ChangeSet@1.3227, 2014-11-14 09:40:06+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ ChangeLog@1.1562 +1 -0
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ ntpd/ntp_loopfilter.c@1.173 +136 -26
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ChangeSet@1.3226, 2014-11-14 09:19:09+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2630] buffer overrun in ntpq tokenize()
+
+ ChangeLog@1.1561 +1 -0
+ [Sec 2630] buffer overrun in ntpq tokenize()
+
+ ntpq/ntpq.c@1.153 +16 -0
+ [Sec 2630] buffer overrun in ntpq tokenize()
+
+ChangeSet@1.3225, 2014-11-14 08:54:11+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2661] ntpq crashes with mreadvar
+
+ ChangeLog@1.1560 +1 -0
+ [Bug 2661] ntpq crashes with mreadvar
+
+ ntpq/ntpq-subs.c@1.101 +1 -1
+ [Bug 2661] ntpq crashes with mreadvar
+
+ChangeSet@1.3224, 2014-11-13 09:01:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P477
+ TAG: NTP_4_2_7P477
+
+ ChangeLog@1.1559 +1 -0
+ NTP_4_2_7P477
+
+ ntpd/invoke-ntp.conf.texi@1.158 +1 -1
+ NTP_4_2_7P477
+
+ ntpd/invoke-ntp.keys.texi@1.155 +1 -1
+ NTP_4_2_7P477
+
+ ntpd/invoke-ntpd.texi@1.471 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.conf.5man@1.192 +3 -3
+ NTP_4_2_7P477
+
+ ntpd/ntp.conf.5mdoc@1.192 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.conf.html@1.151 +12 -1
+ NTP_4_2_7P477
+
+ ntpd/ntp.conf.man.in@1.192 +3 -3
+ NTP_4_2_7P477
+
+ ntpd/ntp.conf.mdoc.in@1.192 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.keys.5man@1.189 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.keys.5mdoc@1.189 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.keys.html@1.152 +1 -1
+ NTP_4_2_7P477
+
+ ntpd/ntp.keys.man.in@1.189 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntp.keys.mdoc.in@1.189 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntpd-opts.c@1.492 +7 -7
+ NTP_4_2_7P477
+
+ ntpd/ntpd-opts.h@1.491 +3 -3
+ NTP_4_2_7P477
+
+ ntpd/ntpd.1ntpdman@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpd/ntpd.1ntpdmdoc@1.300 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntpd.html@1.146 +2 -2
+ NTP_4_2_7P477
+
+ ntpd/ntpd.man.in@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpd/ntpd.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P477
+
+ ntpdc/invoke-ntpdc.texi@1.469 +2 -2
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc-opts.c@1.487 +7 -7
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc-opts.h@1.486 +3 -3
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc.1ntpdcman@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.300 +2 -2
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc.html@1.313 +2 -2
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc.man.in@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpdc/ntpdc.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P477
+
+ ntpq/invoke-ntpq.texi@1.475 +2 -2
+ NTP_4_2_7P477
+
+ ntpq/ntpq-opts.c@1.492 +7 -7
+ NTP_4_2_7P477
+
+ ntpq/ntpq-opts.h@1.490 +3 -3
+ NTP_4_2_7P477
+
+ ntpq/ntpq.1ntpqman@1.303 +3 -3
+ NTP_4_2_7P477
+
+ ntpq/ntpq.1ntpqmdoc@1.303 +2 -2
+ NTP_4_2_7P477
+
+ ntpq/ntpq.html@1.143 +2 -2
+ NTP_4_2_7P477
+
+ ntpq/ntpq.man.in@1.303 +3 -3
+ NTP_4_2_7P477
+
+ ntpq/ntpq.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P477
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.471 +2 -2
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.489 +7 -7
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.488 +3 -3
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.300 +2 -2
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd.html@1.141 +1 -1
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd.man.in@1.300 +3 -3
+ NTP_4_2_7P477
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P477
+
+ packageinfo.sh@1.481 +1 -1
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.62 +3 -3
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.62 +2 -2
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/calc_tickadj.html@1.64 +1 -1
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.61 +3 -3
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P477
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.66 +1 -1
+ NTP_4_2_7P477
+
+ scripts/invoke-plot_summary.texi@1.83 +2 -2
+ NTP_4_2_7P477
+
+ scripts/invoke-summary.texi@1.83 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.292 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait-opts@1.28 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.290 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.290 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait.html@1.309 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait.man.in@1.290 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.290 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.81 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep-opts@1.30 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.69 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.69 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep.html@1.82 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep.man.in@1.69 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.81 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace-opts@1.30 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.69 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.69 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace.html@1.82 +2 -2
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace.man.in@1.69 +3 -3
+ NTP_4_2_7P477
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P477
+
+ scripts/plot_summary-opts@1.30 +2 -2
+ NTP_4_2_7P477
+
+ scripts/plot_summary.1plot_summaryman@1.81 +3 -3
+ NTP_4_2_7P477
+
+ scripts/plot_summary.1plot_summarymdoc@1.81 +2 -2
+ NTP_4_2_7P477
+
+ scripts/plot_summary.html@1.84 +2 -2
+ NTP_4_2_7P477
+
+ scripts/plot_summary.man.in@1.81 +3 -3
+ NTP_4_2_7P477
+
+ scripts/plot_summary.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P477
+
+ scripts/summary-opts@1.30 +2 -2
+ NTP_4_2_7P477
+
+ scripts/summary.1summaryman@1.81 +3 -3
+ NTP_4_2_7P477
+
+ scripts/summary.1summarymdoc@1.81 +2 -2
+ NTP_4_2_7P477
+
+ scripts/summary.html@1.84 +2 -2
+ NTP_4_2_7P477
+
+ scripts/summary.man.in@1.81 +3 -3
+ NTP_4_2_7P477
+
+ scripts/summary.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P477
+
+ sntp/invoke-sntp.texi@1.468 +2 -2
+ NTP_4_2_7P477
+
+ sntp/sntp-opts.c@1.486 +7 -7
+ NTP_4_2_7P477
+
+ sntp/sntp-opts.h@1.485 +3 -3
+ NTP_4_2_7P477
+
+ sntp/sntp.1sntpman@1.303 +3 -3
+ NTP_4_2_7P477
+
+ sntp/sntp.1sntpmdoc@1.303 +2 -2
+ NTP_4_2_7P477
+
+ sntp/sntp.html@1.483 +2 -2
+ NTP_4_2_7P477
+
+ sntp/sntp.man.in@1.303 +3 -3
+ NTP_4_2_7P477
+
+ sntp/sntp.mdoc.in@1.303 +2 -2
+ NTP_4_2_7P477
+
+ util/invoke-ntp-keygen.texi@1.472 +2 -2
+ NTP_4_2_7P477
+
+ util/ntp-keygen-opts.c@1.489 +7 -7
+ NTP_4_2_7P477
+
+ util/ntp-keygen-opts.h@1.488 +3 -3
+ NTP_4_2_7P477
+
+ util/ntp-keygen.1ntp-keygenman@1.300 +3 -3
+ NTP_4_2_7P477
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.300 +2 -2
+ NTP_4_2_7P477
+
+ util/ntp-keygen.html@1.147 +2 -2
+ NTP_4_2_7P477
+
+ util/ntp-keygen.man.in@1.300 +3 -3
+ NTP_4_2_7P477
+
+ util/ntp-keygen.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P477
+
+ChangeSet@1.3223, 2014-11-13 03:05:35+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2657] Document that "restrict nopeer" interferes with "pool"
+
+ ChangeLog@1.1558 +1 -0
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ html/accopt.html@1.43 +4 -3
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/invoke-ntp.conf.texi@1.157 +13 -1
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/ntp.conf.5man@1.191 +16 -3
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/ntp.conf.5mdoc@1.191 +14 -2
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/ntp.conf.def@1.13 +12 -0
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/ntp.conf.man.in@1.191 +16 -3
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ ntpd/ntp.conf.mdoc.in@1.191 +14 -2
+ [Bug 2657] Document that "restrict nopeer" intereferes with "pool"
+
+ChangeSet@1.3222, 2014-10-08 09:36:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P476
+ TAG: NTP_4_2_7P476
+
+ ChangeLog@1.1557 +1 -0
+ NTP_4_2_7P476
+
+ ntpd/invoke-ntp.conf.texi@1.156 +1 -1
+ NTP_4_2_7P476
+
+ ntpd/invoke-ntp.keys.texi@1.154 +1 -1
+ NTP_4_2_7P476
+
+ ntpd/invoke-ntpd.texi@1.470 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.conf.5man@1.190 +3 -3
+ NTP_4_2_7P476
+
+ ntpd/ntp.conf.5mdoc@1.190 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.conf.html@1.150 +1 -1
+ NTP_4_2_7P476
+
+ ntpd/ntp.conf.man.in@1.190 +3 -3
+ NTP_4_2_7P476
+
+ ntpd/ntp.conf.mdoc.in@1.190 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.keys.5man@1.188 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.keys.5mdoc@1.188 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.keys.html@1.151 +1 -1
+ NTP_4_2_7P476
+
+ ntpd/ntp.keys.man.in@1.188 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntp.keys.mdoc.in@1.188 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntpd-opts.c@1.491 +10 -10
+ NTP_4_2_7P476
+
+ ntpd/ntpd-opts.h@1.490 +3 -3
+ NTP_4_2_7P476
+
+ ntpd/ntpd.1ntpdman@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpd/ntpd.1ntpdmdoc@1.299 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntpd.html@1.145 +2 -2
+ NTP_4_2_7P476
+
+ ntpd/ntpd.man.in@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpd/ntpd.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P476
+
+ ntpdc/invoke-ntpdc.texi@1.468 +2 -2
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc-opts.c@1.486 +10 -10
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc-opts.h@1.485 +3 -3
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc.1ntpdcman@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.299 +2 -2
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc.html@1.312 +2 -2
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc.man.in@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpdc/ntpdc.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P476
+
+ ntpq/invoke-ntpq.texi@1.474 +2 -2
+ NTP_4_2_7P476
+
+ ntpq/ntpq-opts.c@1.491 +10 -10
+ NTP_4_2_7P476
+
+ ntpq/ntpq-opts.h@1.489 +3 -3
+ NTP_4_2_7P476
+
+ ntpq/ntpq.1ntpqman@1.302 +3 -3
+ NTP_4_2_7P476
+
+ ntpq/ntpq.1ntpqmdoc@1.302 +2 -2
+ NTP_4_2_7P476
+
+ ntpq/ntpq.html@1.142 +2 -2
+ NTP_4_2_7P476
+
+ ntpq/ntpq.man.in@1.302 +3 -3
+ NTP_4_2_7P476
+
+ ntpq/ntpq.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P476
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.470 +2 -2
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.488 +10 -10
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.487 +3 -3
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.299 +2 -2
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd.html@1.140 +1 -1
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd.man.in@1.299 +3 -3
+ NTP_4_2_7P476
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P476
+
+ packageinfo.sh@1.480 +1 -1
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.61 +3 -3
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.61 +2 -2
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/calc_tickadj.html@1.63 +1 -1
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.60 +3 -3
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P476
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.65 +1 -1
+ NTP_4_2_7P476
+
+ scripts/invoke-plot_summary.texi@1.82 +2 -2
+ NTP_4_2_7P476
+
+ scripts/invoke-summary.texi@1.82 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.291 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait-opts@1.27 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.289 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.289 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait.html@1.308 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait.man.in@1.289 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.80 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep-opts@1.29 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.68 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.68 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep.html@1.81 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep.man.in@1.68 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.69 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.80 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace-opts@1.29 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.68 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.68 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace.html@1.81 +2 -2
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace.man.in@1.68 +3 -3
+ NTP_4_2_7P476
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.69 +2 -2
+ NTP_4_2_7P476
+
+ scripts/plot_summary-opts@1.29 +2 -2
+ NTP_4_2_7P476
+
+ scripts/plot_summary.1plot_summaryman@1.80 +3 -3
+ NTP_4_2_7P476
+
+ scripts/plot_summary.1plot_summarymdoc@1.80 +2 -2
+ NTP_4_2_7P476
+
+ scripts/plot_summary.html@1.83 +2 -2
+ NTP_4_2_7P476
+
+ scripts/plot_summary.man.in@1.80 +3 -3
+ NTP_4_2_7P476
+
+ scripts/plot_summary.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P476
+
+ scripts/summary-opts@1.29 +2 -2
+ NTP_4_2_7P476
+
+ scripts/summary.1summaryman@1.80 +3 -3
+ NTP_4_2_7P476
+
+ scripts/summary.1summarymdoc@1.80 +2 -2
+ NTP_4_2_7P476
+
+ scripts/summary.html@1.83 +2 -2
+ NTP_4_2_7P476
+
+ scripts/summary.man.in@1.80 +3 -3
+ NTP_4_2_7P476
+
+ scripts/summary.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P476
+
+ sntp/invoke-sntp.texi@1.467 +2 -2
+ NTP_4_2_7P476
+
+ sntp/sntp-opts.c@1.485 +10 -10
+ NTP_4_2_7P476
+
+ sntp/sntp-opts.h@1.484 +3 -3
+ NTP_4_2_7P476
+
+ sntp/sntp.1sntpman@1.302 +3 -3
+ NTP_4_2_7P476
+
+ sntp/sntp.1sntpmdoc@1.302 +2 -2
+ NTP_4_2_7P476
+
+ sntp/sntp.html@1.482 +2 -2
+ NTP_4_2_7P476
+
+ sntp/sntp.man.in@1.302 +3 -3
+ NTP_4_2_7P476
+
+ sntp/sntp.mdoc.in@1.302 +2 -2
+ NTP_4_2_7P476
+
+ util/invoke-ntp-keygen.texi@1.471 +2 -2
+ NTP_4_2_7P476
+
+ util/ntp-keygen-opts.c@1.488 +10 -10
+ NTP_4_2_7P476
+
+ util/ntp-keygen-opts.h@1.487 +3 -3
+ NTP_4_2_7P476
+
+ util/ntp-keygen.1ntp-keygenman@1.299 +3 -3
+ NTP_4_2_7P476
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.299 +2 -2
+ NTP_4_2_7P476
+
+ util/ntp-keygen.html@1.146 +2 -2
+ NTP_4_2_7P476
+
+ util/ntp-keygen.man.in@1.299 +3 -3
+ NTP_4_2_7P476
+
+ util/ntp-keygen.mdoc.in@1.299 +2 -2
+ NTP_4_2_7P476
+
+ChangeSet@1.3221, 2014-10-04 11:53:31+02:00, jnperlin@hydra.(none)
+ [Bug 2503] sht utility outdated
+
+ ChangeLog@1.1556 +1 -0
+ [Bug 2503] sht utility outdated
+
+ util/sht.c@1.5 +147 -72
+ [Bug 2503] sht utility outdated
+
+ChangeSet@1.3220, 2014-09-11 08:58:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P475
+ TAG: NTP_4_2_7P475
+
+ ChangeLog@1.1555 +1 -0
+ NTP_4_2_7P475
+
+ ntpd/invoke-ntp.conf.texi@1.155 +1 -1
+ NTP_4_2_7P475
+
+ ntpd/invoke-ntp.keys.texi@1.153 +1 -1
+ NTP_4_2_7P475
+
+ ntpd/invoke-ntpd.texi@1.469 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.conf.5man@1.189 +3 -3
+ NTP_4_2_7P475
+
+ ntpd/ntp.conf.5mdoc@1.189 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.conf.html@1.149 +1 -1
+ NTP_4_2_7P475
+
+ ntpd/ntp.conf.man.in@1.189 +3 -3
+ NTP_4_2_7P475
+
+ ntpd/ntp.conf.mdoc.in@1.189 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.keys.5man@1.187 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.keys.5mdoc@1.187 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.keys.html@1.150 +1 -1
+ NTP_4_2_7P475
+
+ ntpd/ntp.keys.man.in@1.187 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntp.keys.mdoc.in@1.187 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntpd-opts.c@1.490 +7 -7
+ NTP_4_2_7P475
+
+ ntpd/ntpd-opts.h@1.489 +3 -3
+ NTP_4_2_7P475
+
+ ntpd/ntpd.1ntpdman@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpd/ntpd.1ntpdmdoc@1.298 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntpd.html@1.144 +2 -2
+ NTP_4_2_7P475
+
+ ntpd/ntpd.man.in@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpd/ntpd.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P475
+
+ ntpdc/invoke-ntpdc.texi@1.467 +2 -2
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc-opts.c@1.485 +7 -7
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc-opts.h@1.484 +3 -3
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc.1ntpdcman@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.298 +2 -2
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc.html@1.311 +2 -2
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc.man.in@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpdc/ntpdc.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P475
+
+ ntpq/invoke-ntpq.texi@1.473 +2 -2
+ NTP_4_2_7P475
+
+ ntpq/ntpq-opts.c@1.490 +7 -7
+ NTP_4_2_7P475
+
+ ntpq/ntpq-opts.h@1.488 +3 -3
+ NTP_4_2_7P475
+
+ ntpq/ntpq.1ntpqman@1.301 +3 -3
+ NTP_4_2_7P475
+
+ ntpq/ntpq.1ntpqmdoc@1.301 +2 -2
+ NTP_4_2_7P475
+
+ ntpq/ntpq.html@1.141 +2 -2
+ NTP_4_2_7P475
+
+ ntpq/ntpq.man.in@1.301 +3 -3
+ NTP_4_2_7P475
+
+ ntpq/ntpq.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P475
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.469 +2 -2
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.487 +7 -7
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.486 +3 -3
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.298 +2 -2
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd.html@1.139 +1 -1
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd.man.in@1.298 +3 -3
+ NTP_4_2_7P475
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P475
+
+ packageinfo.sh@1.479 +1 -1
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.60 +3 -3
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.60 +2 -2
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/calc_tickadj.html@1.62 +1 -1
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.59 +3 -3
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P475
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.64 +1 -1
+ NTP_4_2_7P475
+
+ scripts/invoke-plot_summary.texi@1.81 +2 -2
+ NTP_4_2_7P475
+
+ scripts/invoke-summary.texi@1.81 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.290 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait-opts@1.26 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.288 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.288 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait.html@1.307 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait.man.in@1.288 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.79 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep-opts@1.28 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.67 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.67 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep.html@1.80 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep.man.in@1.67 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.79 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace-opts@1.28 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.67 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.67 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace.html@1.80 +2 -2
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace.man.in@1.67 +3 -3
+ NTP_4_2_7P475
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P475
+
+ scripts/plot_summary-opts@1.28 +2 -2
+ NTP_4_2_7P475
+
+ scripts/plot_summary.1plot_summaryman@1.79 +3 -3
+ NTP_4_2_7P475
+
+ scripts/plot_summary.1plot_summarymdoc@1.79 +2 -2
+ NTP_4_2_7P475
+
+ scripts/plot_summary.html@1.82 +2 -2
+ NTP_4_2_7P475
+
+ scripts/plot_summary.man.in@1.79 +3 -3
+ NTP_4_2_7P475
+
+ scripts/plot_summary.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P475
+
+ scripts/summary-opts@1.28 +2 -2
+ NTP_4_2_7P475
+
+ scripts/summary.1summaryman@1.79 +3 -3
+ NTP_4_2_7P475
+
+ scripts/summary.1summarymdoc@1.79 +2 -2
+ NTP_4_2_7P475
+
+ scripts/summary.html@1.82 +2 -2
+ NTP_4_2_7P475
+
+ scripts/summary.man.in@1.79 +3 -3
+ NTP_4_2_7P475
+
+ scripts/summary.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P475
+
+ sntp/invoke-sntp.texi@1.466 +2 -2
+ NTP_4_2_7P475
+
+ sntp/sntp-opts.c@1.484 +7 -7
+ NTP_4_2_7P475
+
+ sntp/sntp-opts.h@1.483 +3 -3
+ NTP_4_2_7P475
+
+ sntp/sntp.1sntpman@1.301 +3 -3
+ NTP_4_2_7P475
+
+ sntp/sntp.1sntpmdoc@1.301 +2 -2
+ NTP_4_2_7P475
+
+ sntp/sntp.html@1.481 +2 -2
+ NTP_4_2_7P475
+
+ sntp/sntp.man.in@1.301 +3 -3
+ NTP_4_2_7P475
+
+ sntp/sntp.mdoc.in@1.301 +2 -2
+ NTP_4_2_7P475
+
+ util/invoke-ntp-keygen.texi@1.470 +2 -2
+ NTP_4_2_7P475
+
+ util/ntp-keygen-opts.c@1.487 +7 -7
+ NTP_4_2_7P475
+
+ util/ntp-keygen-opts.h@1.486 +3 -3
+ NTP_4_2_7P475
+
+ util/ntp-keygen.1ntp-keygenman@1.298 +3 -3
+ NTP_4_2_7P475
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.298 +2 -2
+ NTP_4_2_7P475
+
+ util/ntp-keygen.html@1.145 +2 -2
+ NTP_4_2_7P475
+
+ util/ntp-keygen.man.in@1.298 +3 -3
+ NTP_4_2_7P475
+
+ util/ntp-keygen.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P475
+
+ChangeSet@1.3219, 2014-09-10 09:48:50+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2654] refclock_true.c doesn't identify the Mk III
+
+ ChangeLog@1.1554 +1 -0
+ [Bug 2654] refclock_true.c doesn't identify the Mk III
+
+ ntpd/refclock_true.c@1.22 +1 -1
+ [Bug 2654] refclock_true.c doesn't identify the Mk III
+
+ChangeSet@1.3218, 2014-09-10 09:21:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P474
+ TAG: NTP_4_2_7P474
+
+ ChangeLog@1.1553 +1 -0
+ NTP_4_2_7P474
+
+ ntpd/invoke-ntp.conf.texi@1.154 +1 -1
+ NTP_4_2_7P474
+
+ ntpd/invoke-ntp.keys.texi@1.152 +1 -1
+ NTP_4_2_7P474
+
+ ntpd/invoke-ntpd.texi@1.468 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.conf.5man@1.188 +2990 -0
+ NTP_4_2_7P474
+
+ ntpd/ntp.conf.5mdoc@1.188 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.conf.html@1.148 +1 -1
+ NTP_4_2_7P474
+
+ ntpd/ntp.conf.man.in@1.188 +2990 -0
+ NTP_4_2_7P474
+
+ ntpd/ntp.conf.mdoc.in@1.188 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.keys.5man@1.186 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.keys.5mdoc@1.186 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.keys.html@1.149 +1 -1
+ NTP_4_2_7P474
+
+ ntpd/ntp.keys.man.in@1.186 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntp.keys.mdoc.in@1.186 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntpd-opts.c@1.489 +7 -7
+ NTP_4_2_7P474
+
+ ntpd/ntpd-opts.h@1.488 +3 -3
+ NTP_4_2_7P474
+
+ ntpd/ntpd.1ntpdman@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpd/ntpd.1ntpdmdoc@1.297 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntpd.html@1.143 +2 -2
+ NTP_4_2_7P474
+
+ ntpd/ntpd.man.in@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpd/ntpd.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P474
+
+ ntpdc/invoke-ntpdc.texi@1.466 +2 -2
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc-opts.c@1.484 +7 -7
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc-opts.h@1.483 +3 -3
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc.1ntpdcman@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.297 +2 -2
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc.html@1.310 +2 -2
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc.man.in@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpdc/ntpdc.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P474
+
+ ntpq/invoke-ntpq.texi@1.472 +2 -2
+ NTP_4_2_7P474
+
+ ntpq/ntpq-opts.c@1.489 +7 -7
+ NTP_4_2_7P474
+
+ ntpq/ntpq-opts.h@1.487 +3 -3
+ NTP_4_2_7P474
+
+ ntpq/ntpq.1ntpqman@1.300 +3 -3
+ NTP_4_2_7P474
+
+ ntpq/ntpq.1ntpqmdoc@1.300 +2 -2
+ NTP_4_2_7P474
+
+ ntpq/ntpq.html@1.140 +2 -2
+ NTP_4_2_7P474
+
+ ntpq/ntpq.man.in@1.300 +3 -3
+ NTP_4_2_7P474
+
+ ntpq/ntpq.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P474
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.468 +2 -2
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.486 +7 -7
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.485 +3 -3
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.297 +2 -2
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd.html@1.138 +1 -1
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd.man.in@1.297 +3 -3
+ NTP_4_2_7P474
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P474
+
+ packageinfo.sh@1.478 +1 -1
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.59 +3 -3
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.59 +2 -2
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/calc_tickadj.html@1.61 +1 -1
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.58 +3 -3
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P474
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.63 +1 -1
+ NTP_4_2_7P474
+
+ scripts/invoke-plot_summary.texi@1.80 +2 -2
+ NTP_4_2_7P474
+
+ scripts/invoke-summary.texi@1.80 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.289 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait-opts@1.25 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.287 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.287 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait.html@1.306 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait.man.in@1.287 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.78 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep-opts@1.27 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.66 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.66 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep.html@1.79 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep.man.in@1.66 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.78 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace-opts@1.27 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.66 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.66 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace.html@1.79 +2 -2
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace.man.in@1.66 +3 -3
+ NTP_4_2_7P474
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P474
+
+ scripts/plot_summary-opts@1.27 +2 -2
+ NTP_4_2_7P474
+
+ scripts/plot_summary.1plot_summaryman@1.78 +3 -3
+ NTP_4_2_7P474
+
+ scripts/plot_summary.1plot_summarymdoc@1.78 +2 -2
+ NTP_4_2_7P474
+
+ scripts/plot_summary.html@1.81 +2 -2
+ NTP_4_2_7P474
+
+ scripts/plot_summary.man.in@1.78 +3 -3
+ NTP_4_2_7P474
+
+ scripts/plot_summary.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P474
+
+ scripts/summary-opts@1.27 +2 -2
+ NTP_4_2_7P474
+
+ scripts/summary.1summaryman@1.78 +3 -3
+ NTP_4_2_7P474
+
+ scripts/summary.1summarymdoc@1.78 +2 -2
+ NTP_4_2_7P474
+
+ scripts/summary.html@1.81 +2 -2
+ NTP_4_2_7P474
+
+ scripts/summary.man.in@1.78 +3 -3
+ NTP_4_2_7P474
+
+ scripts/summary.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P474
+
+ sntp/invoke-sntp.texi@1.465 +2 -2
+ NTP_4_2_7P474
+
+ sntp/sntp-opts.c@1.483 +7 -7
+ NTP_4_2_7P474
+
+ sntp/sntp-opts.h@1.482 +3 -3
+ NTP_4_2_7P474
+
+ sntp/sntp.1sntpman@1.300 +3 -3
+ NTP_4_2_7P474
+
+ sntp/sntp.1sntpmdoc@1.300 +2 -2
+ NTP_4_2_7P474
+
+ sntp/sntp.html@1.480 +2 -2
+ NTP_4_2_7P474
+
+ sntp/sntp.man.in@1.300 +3 -3
+ NTP_4_2_7P474
+
+ sntp/sntp.mdoc.in@1.300 +2 -2
+ NTP_4_2_7P474
+
+ util/invoke-ntp-keygen.texi@1.469 +2 -2
+ NTP_4_2_7P474
+
+ util/ntp-keygen-opts.c@1.486 +7 -7
+ NTP_4_2_7P474
+
+ util/ntp-keygen-opts.h@1.485 +3 -3
+ NTP_4_2_7P474
+
+ util/ntp-keygen.1ntp-keygenman@1.297 +3 -3
+ NTP_4_2_7P474
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.297 +2 -2
+ NTP_4_2_7P474
+
+ util/ntp-keygen.html@1.144 +2 -2
+ NTP_4_2_7P474
+
+ util/ntp-keygen.man.in@1.297 +3 -3
+ NTP_4_2_7P474
+
+ util/ntp-keygen.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P474
+
+ChangeSet@1.3217, 2014-09-10 08:56:05+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ChangeLog@1.1552 +1 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ configure.ac@1.576 +40 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ntpd/ntpd.c@1.157 +4 -4
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ChangeSet@1.3216, 2014-09-10 08:25:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2649] Clean up html/ page installation
+
+ ChangeLog@1.1551 +1 -0
+ [Bug 2649] Clean up html/ page installation
+
+ Makefile.am@1.123 +1 -1
+ [Bug 2649] Clean up html/ page installation
+
+ChangeSet@1.3215, 2014-09-07 02:04:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P473
+ TAG: NTP_4_2_7P473
+
+ ChangeLog@1.1550 +1 -0
+ NTP_4_2_7P473
+
+ ntpd/invoke-ntp.conf.texi@1.153 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/invoke-ntp.keys.texi@1.151 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/invoke-ntpd.texi@1.467 +2 -2
+ NTP_4_2_7P473
+
+ ntpd/ntp.conf.5man@1.187 +0 -2990
+ NTP_4_2_7P473
+
+ ntpd/ntp.conf.5mdoc@1.187 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntp.conf.html@1.147 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntp.conf.man.in@1.187 +0 -2990
+ NTP_4_2_7P473
+
+ ntpd/ntp.conf.mdoc.in@1.187 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntp.keys.5man@1.185 +2 -2
+ NTP_4_2_7P473
+
+ ntpd/ntp.keys.5mdoc@1.185 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntp.keys.html@1.148 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntp.keys.man.in@1.185 +2 -2
+ NTP_4_2_7P473
+
+ ntpd/ntp.keys.mdoc.in@1.185 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntpd-opts.c@1.488 +7 -7
+ NTP_4_2_7P473
+
+ ntpd/ntpd-opts.h@1.487 +3 -3
+ NTP_4_2_7P473
+
+ ntpd/ntpd.1ntpdman@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpd/ntpd.1ntpdmdoc@1.296 +1 -1
+ NTP_4_2_7P473
+
+ ntpd/ntpd.html@1.142 +2 -2
+ NTP_4_2_7P473
+
+ ntpd/ntpd.man.in@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpd/ntpd.mdoc.in@1.296 +1 -1
+ NTP_4_2_7P473
+
+ ntpdc/invoke-ntpdc.texi@1.465 +2 -2
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc-opts.c@1.483 +7 -7
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc-opts.h@1.482 +3 -3
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc.1ntpdcman@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.296 +1 -1
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc.html@1.309 +2 -2
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc.man.in@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpdc/ntpdc.mdoc.in@1.296 +1 -1
+ NTP_4_2_7P473
+
+ ntpq/invoke-ntpq.texi@1.471 +2 -2
+ NTP_4_2_7P473
+
+ ntpq/ntpq-opts.c@1.488 +7 -7
+ NTP_4_2_7P473
+
+ ntpq/ntpq-opts.h@1.486 +3 -3
+ NTP_4_2_7P473
+
+ ntpq/ntpq.1ntpqman@1.299 +3 -3
+ NTP_4_2_7P473
+
+ ntpq/ntpq.1ntpqmdoc@1.299 +1 -1
+ NTP_4_2_7P473
+
+ ntpq/ntpq.html@1.139 +56 -11
+ NTP_4_2_7P473
+
+ ntpq/ntpq.man.in@1.299 +3 -3
+ NTP_4_2_7P473
+
+ ntpq/ntpq.mdoc.in@1.299 +1 -1
+ NTP_4_2_7P473
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.467 +2 -2
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.485 +7 -7
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.484 +3 -3
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.296 +1 -1
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd.html@1.137 +1 -1
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd.man.in@1.296 +3 -3
+ NTP_4_2_7P473
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.296 +1 -1
+ NTP_4_2_7P473
+
+ packageinfo.sh@1.477 +1 -1
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.58 +3 -3
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.58 +1 -1
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/calc_tickadj.html@1.60 +1 -1
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.57 +3 -3
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.58 +1 -1
+ NTP_4_2_7P473
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.62 +1 -1
+ NTP_4_2_7P473
+
+ scripts/invoke-plot_summary.texi@1.79 +1 -1
+ NTP_4_2_7P473
+
+ scripts/invoke-summary.texi@1.79 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.288 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait-opts@1.24 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.286 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.286 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait.html@1.305 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait.man.in@1.286 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.286 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep-opts@1.26 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.65 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.65 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep.html@1.78 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep.man.in@1.65 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.66 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace-opts@1.26 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.65 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.65 +1 -1
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace.html@1.78 +2 -2
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace.man.in@1.65 +3 -3
+ NTP_4_2_7P473
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.66 +1 -1
+ NTP_4_2_7P473
+
+ scripts/plot_summary-opts@1.26 +1 -1
+ NTP_4_2_7P473
+
+ scripts/plot_summary.1plot_summaryman@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/plot_summary.1plot_summarymdoc@1.77 +1 -1
+ NTP_4_2_7P473
+
+ scripts/plot_summary.html@1.80 +2 -2
+ NTP_4_2_7P473
+
+ scripts/plot_summary.man.in@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/plot_summary.mdoc.in@1.77 +1 -1
+ NTP_4_2_7P473
+
+ scripts/summary-opts@1.26 +1 -1
+ NTP_4_2_7P473
+
+ scripts/summary.1summaryman@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/summary.1summarymdoc@1.77 +1 -1
+ NTP_4_2_7P473
+
+ scripts/summary.html@1.80 +2 -2
+ NTP_4_2_7P473
+
+ scripts/summary.man.in@1.77 +2 -2
+ NTP_4_2_7P473
+
+ scripts/summary.mdoc.in@1.77 +1 -1
+ NTP_4_2_7P473
+
+ sntp/invoke-sntp.texi@1.464 +2 -2
+ NTP_4_2_7P473
+
+ sntp/sntp-opts.c@1.482 +7 -7
+ NTP_4_2_7P473
+
+ sntp/sntp-opts.h@1.481 +3 -3
+ NTP_4_2_7P473
+
+ sntp/sntp.1sntpman@1.299 +3 -3
+ NTP_4_2_7P473
+
+ sntp/sntp.1sntpmdoc@1.299 +1 -1
+ NTP_4_2_7P473
+
+ sntp/sntp.html@1.479 +2 -2
+ NTP_4_2_7P473
+
+ sntp/sntp.man.in@1.299 +3 -3
+ NTP_4_2_7P473
+
+ sntp/sntp.mdoc.in@1.299 +1 -1
+ NTP_4_2_7P473
+
+ util/invoke-ntp-keygen.texi@1.468 +2 -2
+ NTP_4_2_7P473
+
+ util/ntp-keygen-opts.c@1.485 +7 -7
+ NTP_4_2_7P473
+
+ util/ntp-keygen-opts.h@1.484 +3 -3
+ NTP_4_2_7P473
+
+ util/ntp-keygen.1ntp-keygenman@1.296 +3 -3
+ NTP_4_2_7P473
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.296 +1 -1
+ NTP_4_2_7P473
+
+ util/ntp-keygen.html@1.143 +2 -2
+ NTP_4_2_7P473
+
+ util/ntp-keygen.man.in@1.296 +3 -3
+ NTP_4_2_7P473
+
+ util/ntp-keygen.mdoc.in@1.296 +1 -1
+ NTP_4_2_7P473
+
+ChangeSet@1.3214, 2014-09-06 22:03:18-04:00, stenn@deacon.udel.edu
+ Autogen DNE fix
+
+ scripts/Makefile.am@1.39 +1 -1
+ Autogen DNE fix
+
+ChangeSet@1.3213, 2014-09-06 05:38:30-04:00, stenn@deacon.udel.edu
+ [Bug 2649] Clean up html/ page installation
+
+ Makefile.am@1.122 +2 -0
+ [Bug 2649] Clean up html/ page installation
+
+ChangeSet@1.3212, 2014-09-06 09:27:29+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2649] Clean up html/ page installation
+
+ ChangeLog@1.1549 +1 -0
+ [Bug 2649] Clean up html/ page installation
+
+ Makefile.am@1.121 +1 -1
+ [Bug 2649] Clean up html/ page installation
+
+ChangeSet@1.3211, 2014-09-06 08:58:30+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P472
+ TAG: NTP_4_2_7P472
+
+ ChangeLog@1.1548 +1 -0
+ NTP_4_2_7P472
+
+ ntpd/invoke-ntp.conf.texi@1.152 +1 -1
+ NTP_4_2_7P472
+
+ ntpd/invoke-ntp.keys.texi@1.150 +1 -1
+ NTP_4_2_7P472
+
+ ntpd/invoke-ntpd.texi@1.466 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.conf.5man@1.186 +3 -3
+ NTP_4_2_7P472
+
+ ntpd/ntp.conf.5mdoc@1.186 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.conf.html@1.146 +1 -1
+ NTP_4_2_7P472
+
+ ntpd/ntp.conf.man.in@1.186 +3 -3
+ NTP_4_2_7P472
+
+ ntpd/ntp.conf.mdoc.in@1.186 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.keys.5man@1.184 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.keys.5mdoc@1.184 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.keys.html@1.147 +1 -1
+ NTP_4_2_7P472
+
+ ntpd/ntp.keys.man.in@1.184 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntp.keys.mdoc.in@1.184 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntpd-opts.c@1.487 +7 -7
+ NTP_4_2_7P472
+
+ ntpd/ntpd-opts.h@1.486 +3 -3
+ NTP_4_2_7P472
+
+ ntpd/ntpd.1ntpdman@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpd/ntpd.1ntpdmdoc@1.295 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntpd.html@1.141 +2 -2
+ NTP_4_2_7P472
+
+ ntpd/ntpd.man.in@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpd/ntpd.mdoc.in@1.295 +2 -2
+ NTP_4_2_7P472
+
+ ntpdc/invoke-ntpdc.texi@1.464 +2 -2
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc-opts.c@1.482 +7 -7
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc-opts.h@1.481 +3 -3
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc.1ntpdcman@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.295 +2 -2
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc.html@1.308 +2 -2
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc.man.in@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpdc/ntpdc.mdoc.in@1.295 +2 -2
+ NTP_4_2_7P472
+
+ ntpq/invoke-ntpq.texi@1.470 +72 -13
+ NTP_4_2_7P472
+
+ ntpq/ntpq-opts.c@1.487 +7 -7
+ NTP_4_2_7P472
+
+ ntpq/ntpq-opts.h@1.485 +3 -3
+ NTP_4_2_7P472
+
+ ntpq/ntpq.1ntpqman@1.298 +119 -15
+ NTP_4_2_7P472
+
+ ntpq/ntpq.1ntpqmdoc@1.298 +92 -14
+ NTP_4_2_7P472
+
+ ntpq/ntpq.html@1.138 +2 -2
+ NTP_4_2_7P472
+
+ ntpq/ntpq.man.in@1.298 +119 -15
+ NTP_4_2_7P472
+
+ ntpq/ntpq.mdoc.in@1.298 +92 -14
+ NTP_4_2_7P472
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.466 +2 -2
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.484 +7 -7
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.483 +3 -3
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.295 +2 -2
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd.html@1.136 +1 -1
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd.man.in@1.295 +3 -3
+ NTP_4_2_7P472
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.295 +2 -2
+ NTP_4_2_7P472
+
+ packageinfo.sh@1.476 +1 -1
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.57 +3 -3
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.57 +2 -2
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/calc_tickadj.html@1.59 +1 -1
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.56 +3 -3
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P472
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.61 +1 -1
+ NTP_4_2_7P472
+
+ scripts/invoke-plot_summary.texi@1.78 +1 -1
+ NTP_4_2_7P472
+
+ scripts/invoke-summary.texi@1.78 +1 -1
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.287 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait-opts@1.23 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.285 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.285 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait.html@1.304 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait.man.in@1.285 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.285 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep-opts@1.25 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.64 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.64 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep.html@1.77 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep.man.in@1.64 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace-opts@1.25 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.64 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.64 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace.html@1.77 +2 -2
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace.man.in@1.64 +3 -3
+ NTP_4_2_7P472
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P472
+
+ scripts/plot_summary-opts@1.25 +1 -1
+ NTP_4_2_7P472
+
+ scripts/plot_summary.1plot_summaryman@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/plot_summary.1plot_summarymdoc@1.76 +1 -1
+ NTP_4_2_7P472
+
+ scripts/plot_summary.html@1.79 +2 -2
+ NTP_4_2_7P472
+
+ scripts/plot_summary.man.in@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/plot_summary.mdoc.in@1.76 +1 -1
+ NTP_4_2_7P472
+
+ scripts/summary-opts@1.25 +1 -1
+ NTP_4_2_7P472
+
+ scripts/summary.1summaryman@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/summary.1summarymdoc@1.76 +1 -1
+ NTP_4_2_7P472
+
+ scripts/summary.html@1.79 +2 -2
+ NTP_4_2_7P472
+
+ scripts/summary.man.in@1.76 +2 -2
+ NTP_4_2_7P472
+
+ scripts/summary.mdoc.in@1.76 +1 -1
+ NTP_4_2_7P472
+
+ sntp/invoke-sntp.texi@1.463 +2 -2
+ NTP_4_2_7P472
+
+ sntp/sntp-opts.c@1.481 +7 -7
+ NTP_4_2_7P472
+
+ sntp/sntp-opts.h@1.480 +3 -3
+ NTP_4_2_7P472
+
+ sntp/sntp.1sntpman@1.298 +3 -3
+ NTP_4_2_7P472
+
+ sntp/sntp.1sntpmdoc@1.298 +2 -2
+ NTP_4_2_7P472
+
+ sntp/sntp.html@1.478 +2 -2
+ NTP_4_2_7P472
+
+ sntp/sntp.man.in@1.298 +3 -3
+ NTP_4_2_7P472
+
+ sntp/sntp.mdoc.in@1.298 +2 -2
+ NTP_4_2_7P472
+
+ util/invoke-ntp-keygen.texi@1.467 +2 -2
+ NTP_4_2_7P472
+
+ util/ntp-keygen-opts.c@1.484 +7 -7
+ NTP_4_2_7P472
+
+ util/ntp-keygen-opts.h@1.483 +3 -3
+ NTP_4_2_7P472
+
+ util/ntp-keygen.1ntp-keygenman@1.295 +3 -3
+ NTP_4_2_7P472
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.295 +2 -2
+ NTP_4_2_7P472
+
+ util/ntp-keygen.html@1.142 +2 -2
+ NTP_4_2_7P472
+
+ util/ntp-keygen.man.in@1.295 +3 -3
+ NTP_4_2_7P472
+
+ util/ntp-keygen.mdoc.in@1.295 +2 -2
+ NTP_4_2_7P472
+
+ChangeSet@1.3210, 2014-09-05 10:34:18+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2556] mrulist is missing from the generated ntpq man page
+
+ ChangeLog@1.1547 +1 -0
+ [Bug 2556] mrulist is missing from the generated ntpq man page
+
+ ntpq/ntpq-opts.def@1.24 +91 -12
+ [Bug 2556] mrulist is missing from the generated ntpq man page
+
+ChangeSet@1.3209, 2014-09-05 08:58:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P471
+ TAG: NTP_4_2_7P471
+
+ ChangeLog@1.1546 +1 -0
+ NTP_4_2_7P471
+
+ ntpd/invoke-ntp.conf.texi@1.151 +1 -1
+ NTP_4_2_7P471
+
+ ntpd/invoke-ntp.keys.texi@1.149 +1 -1
+ NTP_4_2_7P471
+
+ ntpd/invoke-ntpd.texi@1.465 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.conf.5man@1.185 +3 -3
+ NTP_4_2_7P471
+
+ ntpd/ntp.conf.5mdoc@1.185 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.conf.html@1.145 +1 -1
+ NTP_4_2_7P471
+
+ ntpd/ntp.conf.man.in@1.185 +3 -3
+ NTP_4_2_7P471
+
+ ntpd/ntp.conf.mdoc.in@1.185 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.keys.5man@1.183 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.keys.5mdoc@1.183 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.keys.html@1.146 +1 -1
+ NTP_4_2_7P471
+
+ ntpd/ntp.keys.man.in@1.183 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntp.keys.mdoc.in@1.183 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntpd-opts.c@1.486 +7 -7
+ NTP_4_2_7P471
+
+ ntpd/ntpd-opts.h@1.485 +3 -3
+ NTP_4_2_7P471
+
+ ntpd/ntpd.1ntpdman@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpd/ntpd.1ntpdmdoc@1.294 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntpd.html@1.140 +2 -2
+ NTP_4_2_7P471
+
+ ntpd/ntpd.man.in@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpd/ntpd.mdoc.in@1.294 +2 -2
+ NTP_4_2_7P471
+
+ ntpdc/invoke-ntpdc.texi@1.463 +2 -2
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc-opts.c@1.481 +7 -7
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc-opts.h@1.480 +3 -3
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc.1ntpdcman@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.294 +2 -2
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc.html@1.307 +2 -2
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc.man.in@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpdc/ntpdc.mdoc.in@1.294 +2 -2
+ NTP_4_2_7P471
+
+ ntpq/invoke-ntpq.texi@1.469 +2 -2
+ NTP_4_2_7P471
+
+ ntpq/ntpq-opts.c@1.486 +7 -7
+ NTP_4_2_7P471
+
+ ntpq/ntpq-opts.h@1.484 +3 -3
+ NTP_4_2_7P471
+
+ ntpq/ntpq.1ntpqman@1.297 +3 -3
+ NTP_4_2_7P471
+
+ ntpq/ntpq.1ntpqmdoc@1.297 +2 -2
+ NTP_4_2_7P471
+
+ ntpq/ntpq.html@1.137 +2 -2
+ NTP_4_2_7P471
+
+ ntpq/ntpq.man.in@1.297 +3 -3
+ NTP_4_2_7P471
+
+ ntpq/ntpq.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P471
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.465 +2 -2
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.483 +7 -7
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.482 +3 -3
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.294 +2 -2
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd.html@1.135 +1 -1
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd.man.in@1.294 +3 -3
+ NTP_4_2_7P471
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.294 +2 -2
+ NTP_4_2_7P471
+
+ packageinfo.sh@1.475 +1 -1
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.56 +3 -3
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.56 +2 -2
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/calc_tickadj.html@1.58 +1 -1
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.55 +3 -3
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P471
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.60 +1 -1
+ NTP_4_2_7P471
+
+ scripts/invoke-plot_summary.texi@1.77 +1 -1
+ NTP_4_2_7P471
+
+ scripts/invoke-summary.texi@1.77 +1 -1
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.286 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait-opts@1.22 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.284 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.284 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait.html@1.303 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait.man.in@1.284 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.284 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep-opts@1.24 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.63 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.63 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep.html@1.76 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep.man.in@1.63 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace-opts@1.24 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.63 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.63 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace.html@1.76 +2 -2
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace.man.in@1.63 +3 -3
+ NTP_4_2_7P471
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P471
+
+ scripts/plot_summary-opts@1.24 +1 -1
+ NTP_4_2_7P471
+
+ scripts/plot_summary.1plot_summaryman@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/plot_summary.1plot_summarymdoc@1.75 +1 -1
+ NTP_4_2_7P471
+
+ scripts/plot_summary.html@1.78 +2 -2
+ NTP_4_2_7P471
+
+ scripts/plot_summary.man.in@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/plot_summary.mdoc.in@1.75 +1 -1
+ NTP_4_2_7P471
+
+ scripts/summary-opts@1.24 +1 -1
+ NTP_4_2_7P471
+
+ scripts/summary.1summaryman@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/summary.1summarymdoc@1.75 +1 -1
+ NTP_4_2_7P471
+
+ scripts/summary.html@1.78 +2 -2
+ NTP_4_2_7P471
+
+ scripts/summary.man.in@1.75 +2 -2
+ NTP_4_2_7P471
+
+ scripts/summary.mdoc.in@1.75 +1 -1
+ NTP_4_2_7P471
+
+ sntp/invoke-sntp.texi@1.462 +2 -2
+ NTP_4_2_7P471
+
+ sntp/sntp-opts.c@1.480 +7 -7
+ NTP_4_2_7P471
+
+ sntp/sntp-opts.h@1.479 +3 -3
+ NTP_4_2_7P471
+
+ sntp/sntp.1sntpman@1.297 +3 -3
+ NTP_4_2_7P471
+
+ sntp/sntp.1sntpmdoc@1.297 +2 -2
+ NTP_4_2_7P471
+
+ sntp/sntp.html@1.477 +2 -2
+ NTP_4_2_7P471
+
+ sntp/sntp.man.in@1.297 +3 -3
+ NTP_4_2_7P471
+
+ sntp/sntp.mdoc.in@1.297 +2 -2
+ NTP_4_2_7P471
+
+ util/invoke-ntp-keygen.texi@1.466 +2 -2
+ NTP_4_2_7P471
+
+ util/ntp-keygen-opts.c@1.483 +7 -7
+ NTP_4_2_7P471
+
+ util/ntp-keygen-opts.h@1.482 +3 -3
+ NTP_4_2_7P471
+
+ util/ntp-keygen.1ntp-keygenman@1.294 +3 -3
+ NTP_4_2_7P471
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.294 +2 -2
+ NTP_4_2_7P471
+
+ util/ntp-keygen.html@1.141 +2 -2
+ NTP_4_2_7P471
+
+ util/ntp-keygen.man.in@1.294 +3 -3
+ NTP_4_2_7P471
+
+ util/ntp-keygen.mdoc.in@1.294 +2 -2
+ NTP_4_2_7P471
+
+ChangeSet@1.3208, 2014-09-05 02:34:19+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2649] "make install" leaves wrong owner for files in html/
+
+ ChangeLog@1.1545 +1 -0
+ [Bug 2649] "make install" leaves wrong owner for files in html/
+
+ Makefile.am@1.120 +2 -2
+ [Bug 2649] "make install" leaves wrong owner for files in html/
+
+ChangeSet@1.3207, 2014-09-05 02:29:49+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2652] Windows hates directory names that contain a :
+
+ ChangeLog@1.1544 +1 -0
+ [Bug 2652] Windows hates directory names that contain a :
+
+ sntp/ag-tpl/0-old/Mdoc.pm@1.4 +0 -0
+ Rename: sntp/ag-tpl/:Old/Mdoc.pm -> sntp/ag-tpl/0-old/Mdoc.pm
+
+ sntp/ag-tpl/0-old/agman-cmd.tpl@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/agman-cmd.tpl -> sntp/ag-tpl/0-old/agman-cmd.tpl
+
+ sntp/ag-tpl/0-old/agmdoc-cmd.tpl@1.4 +0 -0
+ Rename: sntp/ag-tpl/:Old/agmdoc-cmd.tpl -> sntp/ag-tpl/0-old/agmdoc-cmd.tpl
+
+ sntp/ag-tpl/0-old/cmd-doc.tlib@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/cmd-doc.tlib -> sntp/ag-tpl/0-old/cmd-doc.tlib
+
+ sntp/ag-tpl/0-old/mdoc-synopsis.tlib@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/mdoc-synopsis.tlib -> sntp/ag-tpl/0-old/mdoc-synopsis.tlib
+
+ sntp/ag-tpl/0-old/mdoc2man@1.4 +0 -0
+ Rename: sntp/ag-tpl/:Old/mdoc2man -> sntp/ag-tpl/0-old/mdoc2man
+
+ sntp/ag-tpl/0-old/mdoc2texi@1.11 +0 -0
+ Rename: sntp/ag-tpl/:Old/mdoc2texi -> sntp/ag-tpl/0-old/mdoc2texi
+
+ sntp/ag-tpl/0-old/perlopt.tpl@1.5 +0 -0
+ Rename: sntp/ag-tpl/:Old/perlopt.tpl -> sntp/ag-tpl/0-old/perlopt.tpl
+
+ChangeSet@1.3206, 2014-09-02 08:58:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P470
+ TAG: NTP_4_2_7P470
+
+ ChangeLog@1.1543 +1 -0
+ NTP_4_2_7P470
+
+ ntpd/invoke-ntp.conf.texi@1.150 +1 -1
+ NTP_4_2_7P470
+
+ ntpd/invoke-ntp.keys.texi@1.148 +1 -1
+ NTP_4_2_7P470
+
+ ntpd/invoke-ntpd.texi@1.464 +2 -2
+ NTP_4_2_7P470
+
+ ntpd/ntp.conf.5man@1.184 +3 -54
+ NTP_4_2_7P470
+
+ ntpd/ntp.conf.5mdoc@1.184 +2 -44
+ NTP_4_2_7P470
+
+ ntpd/ntp.conf.html@1.144 +1 -1
+ NTP_4_2_7P470
+
+ ntpd/ntp.conf.man.in@1.184 +3 -54
+ NTP_4_2_7P470
+
+ ntpd/ntp.conf.mdoc.in@1.184 +2 -44
+ NTP_4_2_7P470
+
+ ntpd/ntp.keys.5man@1.182 +2 -43
+ NTP_4_2_7P470
+
+ ntpd/ntp.keys.5mdoc@1.182 +2 -44
+ NTP_4_2_7P470
+
+ ntpd/ntp.keys.html@1.145 +1 -1
+ NTP_4_2_7P470
+
+ ntpd/ntp.keys.man.in@1.182 +2 -43
+ NTP_4_2_7P470
+
+ ntpd/ntp.keys.mdoc.in@1.182 +2 -44
+ NTP_4_2_7P470
+
+ ntpd/ntpd-opts.c@1.485 +7 -7
+ NTP_4_2_7P470
+
+ ntpd/ntpd-opts.h@1.484 +3 -3
+ NTP_4_2_7P470
+
+ ntpd/ntpd.1ntpdman@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpd/ntpd.1ntpdmdoc@1.293 +2 -44
+ NTP_4_2_7P470
+
+ ntpd/ntpd.html@1.139 +2 -2
+ NTP_4_2_7P470
+
+ ntpd/ntpd.man.in@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpd/ntpd.mdoc.in@1.293 +2 -44
+ NTP_4_2_7P470
+
+ ntpdc/invoke-ntpdc.texi@1.462 +2 -2
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc-opts.c@1.480 +7 -7
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc-opts.h@1.479 +3 -3
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc.1ntpdcman@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.293 +2 -44
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc.html@1.306 +2 -2
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc.man.in@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpdc/ntpdc.mdoc.in@1.293 +2 -44
+ NTP_4_2_7P470
+
+ ntpq/invoke-ntpq.texi@1.468 +2 -2
+ NTP_4_2_7P470
+
+ ntpq/ntpq-opts.c@1.485 +7 -7
+ NTP_4_2_7P470
+
+ ntpq/ntpq-opts.h@1.483 +3 -3
+ NTP_4_2_7P470
+
+ ntpq/ntpq.1ntpqman@1.296 +3 -54
+ NTP_4_2_7P470
+
+ ntpq/ntpq.1ntpqmdoc@1.296 +2 -44
+ NTP_4_2_7P470
+
+ ntpq/ntpq.html@1.136 +2 -2
+ NTP_4_2_7P470
+
+ ntpq/ntpq.man.in@1.296 +3 -54
+ NTP_4_2_7P470
+
+ ntpq/ntpq.mdoc.in@1.296 +2 -44
+ NTP_4_2_7P470
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.464 +2 -2
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.482 +7 -7
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.481 +3 -3
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.293 +2 -44
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd.html@1.134 +1 -1
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd.man.in@1.293 +3 -54
+ NTP_4_2_7P470
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.293 +2 -44
+ NTP_4_2_7P470
+
+ packageinfo.sh@1.474 +1 -1
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.55 +3 -54
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.55 +2 -44
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/calc_tickadj.html@1.57 +1 -1
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.54 +3 -54
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.55 +2 -44
+ NTP_4_2_7P470
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.59 +1 -1
+ NTP_4_2_7P470
+
+ scripts/invoke-plot_summary.texi@1.76 +1 -1
+ NTP_4_2_7P470
+
+ scripts/invoke-summary.texi@1.76 +1 -1
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.285 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait-opts@1.21 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.283 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.283 +2 -44
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait.html@1.302 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait.man.in@1.283 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.283 +2 -44
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.74 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep-opts@1.23 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.62 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.62 +2 -44
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep.html@1.75 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep.man.in@1.62 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.63 +2 -44
+ NTP_4_2_7P470
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.74 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace-opts@1.23 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.62 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.62 +2 -44
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace.html@1.75 +2 -2
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace.man.in@1.62 +3 -54
+ NTP_4_2_7P470
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.63 +2 -44
+ NTP_4_2_7P470
+
+ scripts/plot_summary-opts@1.23 +1 -1
+ NTP_4_2_7P470
+
+ scripts/plot_summary.1plot_summaryman@1.74 +2 -54
+ NTP_4_2_7P470
+
+ scripts/plot_summary.1plot_summarymdoc@1.74 +1 -44
+ NTP_4_2_7P470
+
+ scripts/plot_summary.html@1.77 +2 -2
+ NTP_4_2_7P470
+
+ scripts/plot_summary.man.in@1.74 +2 -54
+ NTP_4_2_7P470
+
+ scripts/plot_summary.mdoc.in@1.74 +1 -44
+ NTP_4_2_7P470
+
+ scripts/summary-opts@1.23 +1 -1
+ NTP_4_2_7P470
+
+ scripts/summary.1summaryman@1.74 +2 -53
+ NTP_4_2_7P470
+
+ scripts/summary.1summarymdoc@1.74 +1 -43
+ NTP_4_2_7P470
+
+ scripts/summary.html@1.77 +2 -2
+ NTP_4_2_7P470
+
+ scripts/summary.man.in@1.74 +2 -53
+ NTP_4_2_7P470
+
+ scripts/summary.mdoc.in@1.74 +1 -43
+ NTP_4_2_7P470
+
+ sntp/invoke-sntp.texi@1.461 +2 -2
+ NTP_4_2_7P470
+
+ sntp/sntp-opts.c@1.479 +7 -7
+ NTP_4_2_7P470
+
+ sntp/sntp-opts.h@1.478 +3 -3
+ NTP_4_2_7P470
+
+ sntp/sntp.1sntpman@1.296 +3 -54
+ NTP_4_2_7P470
+
+ sntp/sntp.1sntpmdoc@1.296 +2 -44
+ NTP_4_2_7P470
+
+ sntp/sntp.html@1.476 +2 -2
+ NTP_4_2_7P470
+
+ sntp/sntp.man.in@1.296 +3 -54
+ NTP_4_2_7P470
+
+ sntp/sntp.mdoc.in@1.296 +2 -44
+ NTP_4_2_7P470
+
+ util/invoke-ntp-keygen.texi@1.465 +2 -2
+ NTP_4_2_7P470
+
+ util/ntp-keygen-opts.c@1.482 +7 -7
+ NTP_4_2_7P470
+
+ util/ntp-keygen-opts.h@1.481 +3 -3
+ NTP_4_2_7P470
+
+ util/ntp-keygen.1ntp-keygenman@1.293 +3 -54
+ NTP_4_2_7P470
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.293 +2 -44
+ NTP_4_2_7P470
+
+ util/ntp-keygen.html@1.140 +2 -2
+ NTP_4_2_7P470
+
+ util/ntp-keygen.man.in@1.293 +3 -54
+ NTP_4_2_7P470
+
+ util/ntp-keygen.mdoc.in@1.293 +2 -44
+ NTP_4_2_7P470
+
+ChangeSet@1.3205, 2014-09-01 23:43:55-04:00, stenn@pogo.udel.edu
+ html/ cleanups from Hal Murray
+
+ ChangeLog@1.1542 +1 -0
+ html/ cleanups from Hal Murray
+
+ html/clockopt.html@1.25 +1 -1
+ html/ cleanups from Hal Murray
+
+ html/miscopt.html@1.79 +2 -2
+ html/ cleanups from Hal Murray
+
+ html/refclock.html@1.44 +1 -1
+ html/ cleanups from Hal Murray
+
+ChangeSet@1.3204, 2014-09-01 19:13:08-04:00, stenn@deacon.udel.edu
+ autogen-5.18.5pre1 fixes [Bug 2502] Autogen text replacement errors
+
+ ChangeLog@1.1541 +2 -0
+ autogen-5.18.5pre1 fixes [Bug 2502] Autogen text replacement errors
+
+ChangeSet@1.3203, 2014-09-01 08:58:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P469
+ TAG: NTP_4_2_7P469
+
+ ChangeLog@1.1540 +1 -0
+ NTP_4_2_7P469
+
+ ntpd/invoke-ntp.conf.texi@1.149 +1 -1
+ NTP_4_2_7P469
+
+ ntpd/invoke-ntp.keys.texi@1.147 +1 -1
+ NTP_4_2_7P469
+
+ ntpd/invoke-ntpd.texi@1.463 +2 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.conf.5man@1.183 +16 -6
+ NTP_4_2_7P469
+
+ ntpd/ntp.conf.5mdoc@1.183 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.conf.html@1.143 +1 -1
+ NTP_4_2_7P469
+
+ ntpd/ntp.conf.man.in@1.183 +16 -6
+ NTP_4_2_7P469
+
+ ntpd/ntp.conf.mdoc.in@1.183 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.keys.5man@1.181 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.keys.5mdoc@1.181 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.keys.html@1.144 +1 -1
+ NTP_4_2_7P469
+
+ ntpd/ntp.keys.man.in@1.181 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntp.keys.mdoc.in@1.181 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntpd-opts.c@1.484 +7 -7
+ NTP_4_2_7P469
+
+ ntpd/ntpd-opts.h@1.483 +3 -3
+ NTP_4_2_7P469
+
+ ntpd/ntpd.1ntpdman@1.292 +16 -6
+ NTP_4_2_7P469
+
+ ntpd/ntpd.1ntpdmdoc@1.292 +12 -2
+ NTP_4_2_7P469
+
+ ntpd/ntpd.html@1.138 +4 -4
+ NTP_4_2_7P469
+
+ ntpd/ntpd.man.in@1.292 +16 -6
+ NTP_4_2_7P469
+
+ ntpd/ntpd.mdoc.in@1.292 +12 -2
+ NTP_4_2_7P469
+
+ ntpdc/invoke-ntpdc.texi@1.461 +2 -2
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc-opts.c@1.479 +7 -7
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc-opts.h@1.478 +3 -3
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc.1ntpdcman@1.292 +16 -6
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.292 +12 -2
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc.html@1.305 +2 -2
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc.man.in@1.292 +16 -6
+ NTP_4_2_7P469
+
+ ntpdc/ntpdc.mdoc.in@1.292 +12 -2
+ NTP_4_2_7P469
+
+ ntpq/invoke-ntpq.texi@1.467 +2 -2
+ NTP_4_2_7P469
+
+ ntpq/ntpq-opts.c@1.484 +7 -7
+ NTP_4_2_7P469
+
+ ntpq/ntpq-opts.h@1.482 +3 -3
+ NTP_4_2_7P469
+
+ ntpq/ntpq.1ntpqman@1.295 +16 -6
+ NTP_4_2_7P469
+
+ ntpq/ntpq.1ntpqmdoc@1.295 +12 -2
+ NTP_4_2_7P469
+
+ ntpq/ntpq.html@1.135 +2 -2
+ NTP_4_2_7P469
+
+ ntpq/ntpq.man.in@1.295 +16 -6
+ NTP_4_2_7P469
+
+ ntpq/ntpq.mdoc.in@1.295 +12 -2
+ NTP_4_2_7P469
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.463 +2 -2
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.481 +7 -7
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.480 +3 -3
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.292 +23 -13
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.292 +12 -2
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd.html@1.133 +1 -1
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd.man.in@1.292 +23 -13
+ NTP_4_2_7P469
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.292 +12 -2
+ NTP_4_2_7P469
+
+ packageinfo.sh@1.473 +1 -1
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.54 +16 -6
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.54 +12 -2
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/calc_tickadj.html@1.56 +1 -1
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.53 +16 -6
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.54 +12 -2
+ NTP_4_2_7P469
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.58 +1 -1
+ NTP_4_2_7P469
+
+ scripts/invoke-plot_summary.texi@1.75 +1 -1
+ NTP_4_2_7P469
+
+ scripts/invoke-summary.texi@1.75 +1 -1
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.284 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait-opts@1.20 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.282 +16 -6
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.282 +12 -2
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait.html@1.301 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait.man.in@1.282 +16 -6
+ NTP_4_2_7P469
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.282 +12 -2
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.73 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep-opts@1.22 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.61 +16 -6
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.61 +12 -2
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep.html@1.74 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep.man.in@1.61 +16 -6
+ NTP_4_2_7P469
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.62 +12 -2
+ NTP_4_2_7P469
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.73 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace-opts@1.22 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.61 +23 -13
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.61 +12 -2
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace.html@1.74 +2 -2
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace.man.in@1.61 +23 -13
+ NTP_4_2_7P469
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.62 +12 -2
+ NTP_4_2_7P469
+
+ scripts/plot_summary-opts@1.22 +1 -1
+ NTP_4_2_7P469
+
+ scripts/plot_summary.1plot_summaryman@1.73 +14 -4
+ NTP_4_2_7P469
+
+ scripts/plot_summary.1plot_summarymdoc@1.73 +11 -1
+ NTP_4_2_7P469
+
+ scripts/plot_summary.html@1.76 +2 -2
+ NTP_4_2_7P469
+
+ scripts/plot_summary.man.in@1.73 +14 -4
+ NTP_4_2_7P469
+
+ scripts/plot_summary.mdoc.in@1.73 +11 -1
+ NTP_4_2_7P469
+
+ scripts/summary-opts@1.22 +1 -1
+ NTP_4_2_7P469
+
+ scripts/summary.1summaryman@1.73 +14 -4
+ NTP_4_2_7P469
+
+ scripts/summary.1summarymdoc@1.73 +11 -1
+ NTP_4_2_7P469
+
+ scripts/summary.html@1.76 +2 -2
+ NTP_4_2_7P469
+
+ scripts/summary.man.in@1.73 +14 -4
+ NTP_4_2_7P469
+
+ scripts/summary.mdoc.in@1.73 +11 -1
+ NTP_4_2_7P469
+
+ sntp/invoke-sntp.texi@1.460 +2 -2
+ NTP_4_2_7P469
+
+ sntp/sntp-opts.c@1.478 +7 -7
+ NTP_4_2_7P469
+
+ sntp/sntp-opts.h@1.477 +3 -3
+ NTP_4_2_7P469
+
+ sntp/sntp.1sntpman@1.295 +16 -6
+ NTP_4_2_7P469
+
+ sntp/sntp.1sntpmdoc@1.295 +12 -2
+ NTP_4_2_7P469
+
+ sntp/sntp.html@1.475 +2 -2
+ NTP_4_2_7P469
+
+ sntp/sntp.man.in@1.295 +16 -6
+ NTP_4_2_7P469
+
+ sntp/sntp.mdoc.in@1.295 +12 -2
+ NTP_4_2_7P469
+
+ util/invoke-ntp-keygen.texi@1.464 +2 -2
+ NTP_4_2_7P469
+
+ util/ntp-keygen-opts.c@1.481 +7 -7
+ NTP_4_2_7P469
+
+ util/ntp-keygen-opts.h@1.480 +3 -3
+ NTP_4_2_7P469
+
+ util/ntp-keygen.1ntp-keygenman@1.292 +16 -6
+ NTP_4_2_7P469
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.292 +12 -2
+ NTP_4_2_7P469
+
+ util/ntp-keygen.html@1.139 +2 -2
+ NTP_4_2_7P469
+
+ util/ntp-keygen.man.in@1.292 +16 -6
+ NTP_4_2_7P469
+
+ util/ntp-keygen.mdoc.in@1.292 +12 -2
+ NTP_4_2_7P469
+
+ChangeSet@1.3202, 2014-09-01 03:12:34+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ChangeLog@1.1539 +1 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ntpd/ntpd.c@1.156 +2 -2
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ChangeSet@1.3201, 2014-08-31 09:00:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P468
+ TAG: NTP_4_2_7P468
+
+ ChangeLog@1.1538 +1 -0
+ NTP_4_2_7P468
+
+ ntpd/invoke-ntp.conf.texi@1.148 +1 -1
+ NTP_4_2_7P468
+
+ ntpd/invoke-ntp.keys.texi@1.146 +1 -1
+ NTP_4_2_7P468
+
+ ntpd/invoke-ntpd.texi@1.462 +4 -4
+ NTP_4_2_7P468
+
+ ntpd/ntp.conf.5man@1.182 +44 -3
+ NTP_4_2_7P468
+
+ ntpd/ntp.conf.5mdoc@1.182 +32 -1
+ NTP_4_2_7P468
+
+ ntpd/ntp.conf.html@1.142 +1 -1
+ NTP_4_2_7P468
+
+ ntpd/ntp.conf.man.in@1.182 +44 -3
+ NTP_4_2_7P468
+
+ ntpd/ntp.conf.mdoc.in@1.182 +32 -1
+ NTP_4_2_7P468
+
+ ntpd/ntp.keys.5man@1.180 +33 -2
+ NTP_4_2_7P468
+
+ ntpd/ntp.keys.5mdoc@1.180 +33 -2
+ NTP_4_2_7P468
+
+ ntpd/ntp.keys.html@1.143 +1 -1
+ NTP_4_2_7P468
+
+ ntpd/ntp.keys.man.in@1.180 +33 -2
+ NTP_4_2_7P468
+
+ ntpd/ntp.keys.mdoc.in@1.180 +33 -2
+ NTP_4_2_7P468
+
+ ntpd/ntpd-opts.c@1.483 +7 -7
+ NTP_4_2_7P468
+
+ ntpd/ntpd-opts.h@1.482 +3 -3
+ NTP_4_2_7P468
+
+ ntpd/ntpd.1ntpdman@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpd/ntpd.1ntpdmdoc@1.291 +32 -1
+ NTP_4_2_7P468
+
+ ntpd/ntpd.html@1.137 +4 -4
+ NTP_4_2_7P468
+
+ ntpd/ntpd.man.in@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpd/ntpd.mdoc.in@1.291 +32 -1
+ NTP_4_2_7P468
+
+ ntpdc/invoke-ntpdc.texi@1.460 +2 -2
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc-opts.c@1.478 +7 -7
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc-opts.h@1.477 +3 -3
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc.1ntpdcman@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.291 +32 -1
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc.html@1.304 +57 -77
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc.man.in@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpdc/ntpdc.mdoc.in@1.291 +32 -1
+ NTP_4_2_7P468
+
+ ntpq/invoke-ntpq.texi@1.466 +2 -2
+ NTP_4_2_7P468
+
+ ntpq/ntpq-opts.c@1.483 +7 -7
+ NTP_4_2_7P468
+
+ ntpq/ntpq-opts.h@1.481 +3 -3
+ NTP_4_2_7P468
+
+ ntpq/ntpq.1ntpqman@1.294 +44 -3
+ NTP_4_2_7P468
+
+ ntpq/ntpq.1ntpqmdoc@1.294 +32 -1
+ NTP_4_2_7P468
+
+ ntpq/ntpq.html@1.134 +3 -3
+ NTP_4_2_7P468
+
+ ntpq/ntpq.man.in@1.294 +44 -3
+ NTP_4_2_7P468
+
+ ntpq/ntpq.mdoc.in@1.294 +32 -1
+ NTP_4_2_7P468
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.462 +2 -2
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.480 +7 -7
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.479 +3 -3
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.291 +32 -1
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd.html@1.132 +1 -1
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd.man.in@1.291 +44 -3
+ NTP_4_2_7P468
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.291 +32 -1
+ NTP_4_2_7P468
+
+ packageinfo.sh@1.472 +1 -1
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.53 +44 -3
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.53 +32 -1
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/calc_tickadj.html@1.55 +23 -35
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.52 +44 -3
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.53 +32 -1
+ NTP_4_2_7P468
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.57 +2 -2
+ NTP_4_2_7P468
+
+ scripts/invoke-plot_summary.texi@1.74 +1 -1
+ NTP_4_2_7P468
+
+ scripts/invoke-summary.texi@1.74 +1 -1
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.283 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait-opts@1.19 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.281 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.281 +32 -1
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait.html@1.300 +31 -49
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait.man.in@1.281 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.281 +32 -1
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.72 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep-opts@1.21 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.60 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.60 +32 -1
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep.html@1.73 +33 -44
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep.man.in@1.60 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.61 +32 -1
+ NTP_4_2_7P468
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.72 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace-opts@1.21 +2 -2
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.60 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.60 +32 -1
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace.html@1.73 +27 -36
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace.man.in@1.60 +44 -3
+ NTP_4_2_7P468
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.61 +32 -1
+ NTP_4_2_7P468
+
+ scripts/plot_summary-opts@1.21 +1 -1
+ NTP_4_2_7P468
+
+ scripts/plot_summary.1plot_summaryman@1.72 +44 -2
+ NTP_4_2_7P468
+
+ scripts/plot_summary.1plot_summarymdoc@1.72 +32 -0
+ NTP_4_2_7P468
+
+ scripts/plot_summary.html@1.75 +29 -47
+ NTP_4_2_7P468
+
+ scripts/plot_summary.man.in@1.72 +44 -2
+ NTP_4_2_7P468
+
+ scripts/plot_summary.mdoc.in@1.72 +32 -0
+ NTP_4_2_7P468
+
+ scripts/summary-opts@1.21 +1 -1
+ NTP_4_2_7P468
+
+ scripts/summary.1summaryman@1.72 +43 -2
+ NTP_4_2_7P468
+
+ scripts/summary.1summarymdoc@1.72 +31 -0
+ NTP_4_2_7P468
+
+ scripts/summary.html@1.75 +27 -39
+ NTP_4_2_7P468
+
+ scripts/summary.man.in@1.72 +43 -2
+ NTP_4_2_7P468
+
+ scripts/summary.mdoc.in@1.72 +31 -0
+ NTP_4_2_7P468
+
+ sntp/invoke-sntp.texi@1.459 +2 -2
+ NTP_4_2_7P468
+
+ sntp/sntp-opts.c@1.477 +7 -7
+ NTP_4_2_7P468
+
+ sntp/sntp-opts.h@1.476 +3 -3
+ NTP_4_2_7P468
+
+ sntp/sntp.1sntpman@1.294 +44 -3
+ NTP_4_2_7P468
+
+ sntp/sntp.1sntpmdoc@1.294 +32 -1
+ NTP_4_2_7P468
+
+ sntp/sntp.html@1.474 +85 -109
+ NTP_4_2_7P468
+
+ sntp/sntp.man.in@1.294 +44 -3
+ NTP_4_2_7P468
+
+ sntp/sntp.mdoc.in@1.294 +32 -1
+ NTP_4_2_7P468
+
+ util/invoke-ntp-keygen.texi@1.463 +2 -2
+ NTP_4_2_7P468
+
+ util/ntp-keygen-opts.c@1.480 +7 -7
+ NTP_4_2_7P468
+
+ util/ntp-keygen-opts.h@1.479 +3 -3
+ NTP_4_2_7P468
+
+ util/ntp-keygen.1ntp-keygenman@1.291 +44 -3
+ NTP_4_2_7P468
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.291 +32 -1
+ NTP_4_2_7P468
+
+ util/ntp-keygen.html@1.138 +2 -2
+ NTP_4_2_7P468
+
+ util/ntp-keygen.man.in@1.291 +44 -3
+ NTP_4_2_7P468
+
+ util/ntp-keygen.mdoc.in@1.291 +32 -1
+ NTP_4_2_7P468
+
+ChangeSet@1.3200, 2014-08-31 05:07:43+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4
+
+ ChangeLog@1.1537 +1 -0
+ autogen-5.18.4
+
+ ntpd/invoke-ntp.conf.texi@1.147 +1 -1
+ autogen-5.18.4
+
+ ntpd/invoke-ntp.keys.texi@1.145 +1 -1
+ autogen-5.18.4
+
+ ntpd/invoke-ntpd.texi@1.461 +3 -3
+ autogen-5.18.4
+
+ ntpd/ntp.conf.5man@1.181 +3 -32
+ autogen-5.18.4
+
+ ntpd/ntp.conf.5mdoc@1.181 +3 -21
+ autogen-5.18.4
+
+ ntpd/ntp.conf.man.in@1.181 +3 -32
+ autogen-5.18.4
+
+ ntpd/ntp.conf.mdoc.in@1.181 +3 -21
+ autogen-5.18.4
+
+ ntpd/ntp.keys.5man@1.179 +2 -21
+ autogen-5.18.4
+
+ ntpd/ntp.keys.5mdoc@1.179 +4 -22
+ autogen-5.18.4
+
+ ntpd/ntp.keys.man.in@1.179 +2 -21
+ autogen-5.18.4
+
+ ntpd/ntp.keys.mdoc.in@1.179 +4 -22
+ autogen-5.18.4
+
+ ntpd/ntpd-opts.c@1.482 +1 -1
+ autogen-5.18.4
+
+ ntpd/ntpd-opts.h@1.481 +1 -1
+ autogen-5.18.4
+
+ ntpd/ntpd.1ntpdman@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpd/ntpd.1ntpdmdoc@1.290 +3 -21
+ autogen-5.18.4
+
+ ntpd/ntpd.man.in@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpd/ntpd.mdoc.in@1.290 +3 -21
+ autogen-5.18.4
+
+ ntpdc/invoke-ntpdc.texi@1.459 +1 -1
+ autogen-5.18.4
+
+ ntpdc/ntpdc-opts.c@1.477 +1 -1
+ autogen-5.18.4
+
+ ntpdc/ntpdc-opts.h@1.476 +1 -1
+ autogen-5.18.4
+
+ ntpdc/ntpdc.1ntpdcman@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.290 +3 -21
+ autogen-5.18.4
+
+ ntpdc/ntpdc.html@1.303 +75 -55
+ autogen-5.18.4
+
+ ntpdc/ntpdc.man.in@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpdc/ntpdc.mdoc.in@1.290 +3 -21
+ autogen-5.18.4
+
+ ntpq/invoke-ntpq.texi@1.465 +2 -2
+ autogen-5.18.4
+
+ ntpq/ntpq-opts.c@1.482 +1 -1
+ autogen-5.18.4
+
+ ntpq/ntpq-opts.h@1.480 +1 -1
+ autogen-5.18.4
+
+ ntpq/ntpq.1ntpqman@1.293 +4 -33
+ autogen-5.18.4
+
+ ntpq/ntpq.1ntpqmdoc@1.293 +4 -22
+ autogen-5.18.4
+
+ ntpq/ntpq.man.in@1.293 +4 -33
+ autogen-5.18.4
+
+ ntpq/ntpq.mdoc.in@1.293 +4 -22
+ autogen-5.18.4
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.461 +1 -1
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.479 +1 -1
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.478 +1 -1
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.290 +3 -21
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd.man.in@1.290 +3 -32
+ autogen-5.18.4
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.290 +3 -21
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.9 +2 -2
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.52 +3 -32
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.52 +3 -21
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj.html@1.54 +33 -21
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.51 +3 -32
+ autogen-5.18.4
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.52 +3 -21
+ autogen-5.18.4
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.56 +1 -1
+ autogen-5.18.4
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.282 +1 -1
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait-opts@1.18 +1 -1
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.280 +3 -32
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.280 +3 -21
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait.html@1.299 +47 -29
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait.man.in@1.280 +3 -32
+ autogen-5.18.4
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.280 +3 -21
+ autogen-5.18.4
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.71 +1 -1
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep-opts@1.20 +1 -1
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.59 +3 -32
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.59 +3 -21
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep.html@1.72 +42 -31
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep.man.in@1.59 +3 -32
+ autogen-5.18.4
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.60 +3 -21
+ autogen-5.18.4
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.71 +1 -1
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace-opts@1.20 +1 -1
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.59 +3 -32
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.59 +3 -21
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace.html@1.72 +34 -25
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace.man.in@1.59 +3 -32
+ autogen-5.18.4
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.60 +3 -21
+ autogen-5.18.4
+
+ scripts/plot_summary.1plot_summaryman@1.71 +2 -32
+ autogen-5.18.4
+
+ scripts/plot_summary.1plot_summarymdoc@1.71 +2 -21
+ autogen-5.18.4
+
+ scripts/plot_summary.html@1.74 +45 -27
+ autogen-5.18.4
+
+ scripts/plot_summary.man.in@1.71 +2 -32
+ autogen-5.18.4
+
+ scripts/plot_summary.mdoc.in@1.71 +2 -21
+ autogen-5.18.4
+
+ scripts/summary.1summaryman@1.71 +2 -31
+ autogen-5.18.4
+
+ scripts/summary.1summarymdoc@1.71 +2 -20
+ autogen-5.18.4
+
+ scripts/summary.html@1.74 +37 -25
+ autogen-5.18.4
+
+ scripts/summary.man.in@1.71 +2 -31
+ autogen-5.18.4
+
+ scripts/summary.mdoc.in@1.71 +2 -20
+ autogen-5.18.4
+
+ sntp/include/autogen-version.def@1.21 +2 -2
+ autogen-5.18.4
+
+ sntp/invoke-sntp.texi@1.458 +1 -1
+ autogen-5.18.4
+
+ sntp/sntp-opts.c@1.476 +1 -1
+ autogen-5.18.4
+
+ sntp/sntp-opts.h@1.475 +1 -1
+ autogen-5.18.4
+
+ sntp/sntp.1sntpman@1.293 +3 -32
+ autogen-5.18.4
+
+ sntp/sntp.1sntpmdoc@1.293 +3 -21
+ autogen-5.18.4
+
+ sntp/sntp.html@1.473 +107 -83
+ autogen-5.18.4
+
+ sntp/sntp.man.in@1.293 +3 -32
+ autogen-5.18.4
+
+ sntp/sntp.mdoc.in@1.293 +3 -21
+ autogen-5.18.4
+
+ util/invoke-ntp-keygen.texi@1.462 +1 -1
+ autogen-5.18.4
+
+ util/ntp-keygen-opts.c@1.479 +1 -1
+ autogen-5.18.4
+
+ util/ntp-keygen-opts.h@1.478 +1 -1
+ autogen-5.18.4
+
+ util/ntp-keygen.1ntp-keygenman@1.290 +3 -32
+ autogen-5.18.4
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.290 +3 -21
+ autogen-5.18.4
+
+ util/ntp-keygen.man.in@1.290 +3 -32
+ autogen-5.18.4
+
+ util/ntp-keygen.mdoc.in@1.290 +3 -21
+ autogen-5.18.4
+
+ChangeSet@1.3199, 2014-08-31 04:47:39+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2556] ntpq man page cleanup
+
+ ChangeLog@1.1536 +1 -0
+ [Bug 2556] ntpq man page cleanup
+
+ ntpq/ntpq-opts.def@1.23 +1 -1
+ [Bug 2556] ntpq man page cleanup
+
+ChangeSet@1.3198, 2014-08-28 08:58:35+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P467
+ TAG: NTP_4_2_7P467
+
+ ChangeLog@1.1535 +1 -0
+ NTP_4_2_7P467
+
+ ntpd/invoke-ntp.conf.texi@1.146 +1 -1
+ NTP_4_2_7P467
+
+ ntpd/invoke-ntp.keys.texi@1.144 +1 -1
+ NTP_4_2_7P467
+
+ ntpd/invoke-ntpd.texi@1.460 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.conf.5man@1.180 +6 -6
+ NTP_4_2_7P467
+
+ ntpd/ntp.conf.5mdoc@1.180 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.conf.html@1.141 +1 -1
+ NTP_4_2_7P467
+
+ ntpd/ntp.conf.man.in@1.180 +6 -6
+ NTP_4_2_7P467
+
+ ntpd/ntp.conf.mdoc.in@1.180 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.keys.5man@1.178 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.keys.5mdoc@1.178 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.keys.html@1.142 +1 -1
+ NTP_4_2_7P467
+
+ ntpd/ntp.keys.man.in@1.178 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntp.keys.mdoc.in@1.178 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntpd-opts.c@1.481 +7 -7
+ NTP_4_2_7P467
+
+ ntpd/ntpd-opts.h@1.480 +3 -3
+ NTP_4_2_7P467
+
+ ntpd/ntpd.1ntpdman@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpd/ntpd.1ntpdmdoc@1.289 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntpd.html@1.136 +2 -2
+ NTP_4_2_7P467
+
+ ntpd/ntpd.man.in@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpd/ntpd.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P467
+
+ ntpdc/invoke-ntpdc.texi@1.458 +2 -2
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc-opts.c@1.476 +7 -7
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc-opts.h@1.475 +3 -3
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc.1ntpdcman@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.289 +2 -2
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc.html@1.302 +2 -2
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc.man.in@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpdc/ntpdc.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P467
+
+ ntpq/invoke-ntpq.texi@1.464 +2 -2
+ NTP_4_2_7P467
+
+ ntpq/ntpq-opts.c@1.481 +7 -7
+ NTP_4_2_7P467
+
+ ntpq/ntpq-opts.h@1.479 +3 -3
+ NTP_4_2_7P467
+
+ ntpq/ntpq.1ntpqman@1.292 +6 -6
+ NTP_4_2_7P467
+
+ ntpq/ntpq.1ntpqmdoc@1.292 +2 -2
+ NTP_4_2_7P467
+
+ ntpq/ntpq.html@1.133 +2 -2
+ NTP_4_2_7P467
+
+ ntpq/ntpq.man.in@1.292 +6 -6
+ NTP_4_2_7P467
+
+ ntpq/ntpq.mdoc.in@1.292 +2 -2
+ NTP_4_2_7P467
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.460 +2 -2
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.478 +7 -7
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.477 +3 -3
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.289 +2 -2
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd.html@1.131 +1 -1
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd.man.in@1.289 +6 -6
+ NTP_4_2_7P467
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P467
+
+ packageinfo.sh@1.471 +1 -1
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.51 +6 -6
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.51 +2 -2
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/calc_tickadj.html@1.53 +1 -1
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.50 +6 -6
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P467
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.55 +1 -1
+ NTP_4_2_7P467
+
+ scripts/invoke-plot_summary.texi@1.73 +1 -1
+ NTP_4_2_7P467
+
+ scripts/invoke-summary.texi@1.73 +1 -1
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.281 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait-opts@1.17 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.279 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.279 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait.html@1.298 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait.man.in@1.279 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.70 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep-opts@1.19 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.58 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.58 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep.html@1.71 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep.man.in@1.58 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.70 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace-opts@1.19 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.58 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.58 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace.html@1.71 +2 -2
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace.man.in@1.58 +6 -6
+ NTP_4_2_7P467
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P467
+
+ scripts/plot_summary-opts@1.20 +1 -1
+ NTP_4_2_7P467
+
+ scripts/plot_summary.1plot_summaryman@1.70 +4 -4
+ NTP_4_2_7P467
+
+ scripts/plot_summary.1plot_summarymdoc@1.70 +1 -1
+ NTP_4_2_7P467
+
+ scripts/plot_summary.html@1.73 +2 -2
+ NTP_4_2_7P467
+
+ scripts/plot_summary.man.in@1.70 +4 -4
+ NTP_4_2_7P467
+
+ scripts/plot_summary.mdoc.in@1.70 +1 -1
+ NTP_4_2_7P467
+
+ scripts/summary-opts@1.20 +1 -1
+ NTP_4_2_7P467
+
+ scripts/summary.1summaryman@1.70 +4 -4
+ NTP_4_2_7P467
+
+ scripts/summary.1summarymdoc@1.70 +1 -1
+ NTP_4_2_7P467
+
+ scripts/summary.html@1.73 +2 -2
+ NTP_4_2_7P467
+
+ scripts/summary.man.in@1.70 +4 -4
+ NTP_4_2_7P467
+
+ scripts/summary.mdoc.in@1.70 +1 -1
+ NTP_4_2_7P467
+
+ sntp/invoke-sntp.texi@1.457 +2 -2
+ NTP_4_2_7P467
+
+ sntp/sntp-opts.c@1.475 +7 -7
+ NTP_4_2_7P467
+
+ sntp/sntp-opts.h@1.474 +3 -3
+ NTP_4_2_7P467
+
+ sntp/sntp.1sntpman@1.292 +6 -6
+ NTP_4_2_7P467
+
+ sntp/sntp.1sntpmdoc@1.292 +2 -2
+ NTP_4_2_7P467
+
+ sntp/sntp.html@1.472 +2 -2
+ NTP_4_2_7P467
+
+ sntp/sntp.man.in@1.292 +6 -6
+ NTP_4_2_7P467
+
+ sntp/sntp.mdoc.in@1.292 +2 -2
+ NTP_4_2_7P467
+
+ util/invoke-ntp-keygen.texi@1.461 +2 -2
+ NTP_4_2_7P467
+
+ util/ntp-keygen-opts.c@1.478 +7 -7
+ NTP_4_2_7P467
+
+ util/ntp-keygen-opts.h@1.477 +3 -3
+ NTP_4_2_7P467
+
+ util/ntp-keygen.1ntp-keygenman@1.289 +6 -6
+ NTP_4_2_7P467
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.289 +2 -2
+ NTP_4_2_7P467
+
+ util/ntp-keygen.html@1.137 +2 -2
+ NTP_4_2_7P467
+
+ util/ntp-keygen.man.in@1.289 +6 -6
+ NTP_4_2_7P467
+
+ util/ntp-keygen.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P467
+
+ChangeSet@1.3197, 2014-08-28 03:33:02-04:00, stenn@deacon.udel.edu
+ [Bug 2640] STA_NANO can result in invalid ntv.constant
+
+ ChangeLog@1.1534 +1 -0
+ [Bug 2640] STA_NANO can result in invalid ntv.constant
+
+ ntpd/ntp_loopfilter.c@1.172 +3 -0
+ [Bug 2640] STA_NANO can result in invalid ntv.constant
+
+ChangeSet@1.3196, 2014-08-28 07:13:56+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ ChangeLog@1.1533 +1 -0
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ ntpd/ntp_loopfilter.c@1.171 +24 -6
+ [Bug 2639] Check return value of ntp_adjtime()
+
+ChangeSet@1.3195, 2014-08-27 08:59:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P466
+ TAG: NTP_4_2_7P466
+
+ ChangeLog@1.1532 +1 -0
+ NTP_4_2_7P466
+
+ ntpd/invoke-ntp.conf.texi@1.145 +1 -1
+ NTP_4_2_7P466
+
+ ntpd/invoke-ntp.keys.texi@1.143 +1 -1
+ NTP_4_2_7P466
+
+ ntpd/invoke-ntpd.texi@1.459 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.conf.5man@1.179 +6 -6
+ NTP_4_2_7P466
+
+ ntpd/ntp.conf.5mdoc@1.179 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.conf.html@1.140 +1 -1
+ NTP_4_2_7P466
+
+ ntpd/ntp.conf.man.in@1.179 +6 -6
+ NTP_4_2_7P466
+
+ ntpd/ntp.conf.mdoc.in@1.179 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.keys.5man@1.177 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.keys.5mdoc@1.177 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.keys.html@1.141 +1 -1
+ NTP_4_2_7P466
+
+ ntpd/ntp.keys.man.in@1.177 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntp.keys.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntpd-opts.c@1.480 +7 -7
+ NTP_4_2_7P466
+
+ ntpd/ntpd-opts.h@1.479 +3 -3
+ NTP_4_2_7P466
+
+ ntpd/ntpd.1ntpdman@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpd/ntpd.1ntpdmdoc@1.288 +2 -2
+ NTP_4_2_7P466
+
+ ntpd/ntpd.html@1.135 +2 -4
+ NTP_4_2_7P466
+
+ ntpd/ntpd.man.in@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpd/ntpd.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P466
+
+ ntpdc/invoke-ntpdc.texi@1.457 +2 -2
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc-opts.c@1.475 +7 -7
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc-opts.h@1.474 +3 -3
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc.1ntpdcman@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.288 +2 -2
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc.html@1.301 +2 -2
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc.man.in@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpdc/ntpdc.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P466
+
+ ntpq/invoke-ntpq.texi@1.463 +2 -2
+ NTP_4_2_7P466
+
+ ntpq/ntpq-opts.c@1.480 +7 -7
+ NTP_4_2_7P466
+
+ ntpq/ntpq-opts.h@1.478 +3 -3
+ NTP_4_2_7P466
+
+ ntpq/ntpq.1ntpqman@1.291 +6 -6
+ NTP_4_2_7P466
+
+ ntpq/ntpq.1ntpqmdoc@1.291 +2 -2
+ NTP_4_2_7P466
+
+ ntpq/ntpq.html@1.132 +2 -4
+ NTP_4_2_7P466
+
+ ntpq/ntpq.man.in@1.291 +6 -6
+ NTP_4_2_7P466
+
+ ntpq/ntpq.mdoc.in@1.291 +2 -2
+ NTP_4_2_7P466
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.459 +2 -2
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.477 +7 -7
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.476 +3 -3
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.288 +2 -2
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd.html@1.130 +1 -1
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd.man.in@1.288 +6 -6
+ NTP_4_2_7P466
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P466
+
+ packageinfo.sh@1.470 +1 -1
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.50 +6 -6
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.50 +2 -2
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/calc_tickadj.html@1.52 +1 -1
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.49 +6 -6
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P466
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.54 +1 -1
+ NTP_4_2_7P466
+
+ scripts/invoke-plot_summary.texi@1.72 +1 -1
+ NTP_4_2_7P466
+
+ scripts/invoke-summary.texi@1.72 +1 -1
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.280 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait-opts@1.16 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.278 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.278 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait.html@1.297 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait.man.in@1.278 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.69 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep-opts@1.18 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.57 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.57 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep.html@1.70 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep.man.in@1.57 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.69 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace-opts@1.18 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.57 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.57 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace.html@1.70 +2 -2
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace.man.in@1.57 +6 -6
+ NTP_4_2_7P466
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P466
+
+ scripts/plot_summary-opts@1.19 +1 -1
+ NTP_4_2_7P466
+
+ scripts/plot_summary.1plot_summaryman@1.69 +4 -4
+ NTP_4_2_7P466
+
+ scripts/plot_summary.1plot_summarymdoc@1.69 +1 -1
+ NTP_4_2_7P466
+
+ scripts/plot_summary.html@1.72 +2 -2
+ NTP_4_2_7P466
+
+ scripts/plot_summary.man.in@1.69 +4 -4
+ NTP_4_2_7P466
+
+ scripts/plot_summary.mdoc.in@1.69 +1 -1
+ NTP_4_2_7P466
+
+ scripts/summary-opts@1.19 +1 -1
+ NTP_4_2_7P466
+
+ scripts/summary.1summaryman@1.69 +4 -4
+ NTP_4_2_7P466
+
+ scripts/summary.1summarymdoc@1.69 +1 -1
+ NTP_4_2_7P466
+
+ scripts/summary.html@1.72 +2 -2
+ NTP_4_2_7P466
+
+ scripts/summary.man.in@1.69 +4 -4
+ NTP_4_2_7P466
+
+ scripts/summary.mdoc.in@1.69 +1 -1
+ NTP_4_2_7P466
+
+ sntp/invoke-sntp.texi@1.456 +2 -2
+ NTP_4_2_7P466
+
+ sntp/sntp-opts.c@1.474 +7 -7
+ NTP_4_2_7P466
+
+ sntp/sntp-opts.h@1.473 +3 -3
+ NTP_4_2_7P466
+
+ sntp/sntp.1sntpman@1.291 +6 -6
+ NTP_4_2_7P466
+
+ sntp/sntp.1sntpmdoc@1.291 +2 -2
+ NTP_4_2_7P466
+
+ sntp/sntp.html@1.471 +2 -2
+ NTP_4_2_7P466
+
+ sntp/sntp.man.in@1.291 +6 -6
+ NTP_4_2_7P466
+
+ sntp/sntp.mdoc.in@1.291 +2 -2
+ NTP_4_2_7P466
+
+ util/invoke-ntp-keygen.texi@1.460 +2 -2
+ NTP_4_2_7P466
+
+ util/ntp-keygen-opts.c@1.477 +7 -7
+ NTP_4_2_7P466
+
+ util/ntp-keygen-opts.h@1.476 +3 -3
+ NTP_4_2_7P466
+
+ util/ntp-keygen.1ntp-keygenman@1.288 +6 -6
+ NTP_4_2_7P466
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.288 +2 -2
+ NTP_4_2_7P466
+
+ util/ntp-keygen.html@1.136 +2 -4
+ NTP_4_2_7P466
+
+ util/ntp-keygen.man.in@1.288 +6 -6
+ NTP_4_2_7P466
+
+ util/ntp-keygen.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P466
+
+ChangeSet@1.3194, 2014-08-27 04:53:42+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ChangeLog@1.1531 +1 -0
+
+ ntpd/ntpd.c@1.155 +10 -3
+
+ChangeSet@1.3193, 2014-08-23 08:59:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P465
+ TAG: NTP_4_2_7P465
+
+ ChangeLog@1.1530 +1 -0
+ NTP_4_2_7P465
+
+ ntpd/invoke-ntp.conf.texi@1.144 +1 -1
+ NTP_4_2_7P465
+
+ ntpd/invoke-ntp.keys.texi@1.142 +1 -1
+ NTP_4_2_7P465
+
+ ntpd/invoke-ntpd.texi@1.458 +2 -4
+ NTP_4_2_7P465
+
+ ntpd/ntp.conf.5man@1.178 +6 -6
+ NTP_4_2_7P465
+
+ ntpd/ntp.conf.5mdoc@1.178 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntp.conf.html@1.139 +1 -1
+ NTP_4_2_7P465
+
+ ntpd/ntp.conf.man.in@1.178 +6 -6
+ NTP_4_2_7P465
+
+ ntpd/ntp.conf.mdoc.in@1.178 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntp.keys.5man@1.176 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntp.keys.5mdoc@1.176 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntp.keys.html@1.140 +1 -1
+ NTP_4_2_7P465
+
+ ntpd/ntp.keys.man.in@1.176 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntp.keys.mdoc.in@1.176 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntpd-opts.c@1.479 +7 -7
+ NTP_4_2_7P465
+
+ ntpd/ntpd-opts.h@1.478 +3 -3
+ NTP_4_2_7P465
+
+ ntpd/ntpd.1ntpdman@1.287 +22 -13
+ NTP_4_2_7P465
+
+ ntpd/ntpd.1ntpdmdoc@1.287 +18 -9
+ NTP_4_2_7P465
+
+ ntpd/ntpd.html@1.134 +2 -2
+ NTP_4_2_7P465
+
+ ntpd/ntpd.man.in@1.287 +22 -13
+ NTP_4_2_7P465
+
+ ntpd/ntpd.mdoc.in@1.287 +18 -9
+ NTP_4_2_7P465
+
+ ntpdc/invoke-ntpdc.texi@1.456 +2 -4
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc-opts.c@1.474 +7 -7
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc-opts.h@1.473 +3 -3
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc.1ntpdcman@1.287 +6 -6
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.287 +2 -2
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc.html@1.300 +2 -4
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc.man.in@1.287 +6 -6
+ NTP_4_2_7P465
+
+ ntpdc/ntpdc.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P465
+
+ ntpq/invoke-ntpq.texi@1.462 +2 -4
+ NTP_4_2_7P465
+
+ ntpq/ntpq-opts.c@1.479 +7 -7
+ NTP_4_2_7P465
+
+ ntpq/ntpq-opts.h@1.477 +3 -3
+ NTP_4_2_7P465
+
+ ntpq/ntpq.1ntpqman@1.290 +6 -6
+ NTP_4_2_7P465
+
+ ntpq/ntpq.1ntpqmdoc@1.290 +2 -2
+ NTP_4_2_7P465
+
+ ntpq/ntpq.html@1.131 +2 -2
+ NTP_4_2_7P465
+
+ ntpq/ntpq.man.in@1.290 +6 -6
+ NTP_4_2_7P465
+
+ ntpq/ntpq.mdoc.in@1.290 +2 -2
+ NTP_4_2_7P465
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.458 +2 -4
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.476 +7 -7
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.475 +3 -3
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.287 +6 -6
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.287 +2 -2
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd.html@1.129 +1 -1
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd.man.in@1.287 +6 -6
+ NTP_4_2_7P465
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P465
+
+ packageinfo.sh@1.469 +1 -1
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.49 +6 -6
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.49 +2 -2
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/calc_tickadj.html@1.51 +22 -34
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.48 +6 -6
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P465
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.53 +1 -1
+ NTP_4_2_7P465
+
+ scripts/invoke-plot_summary.texi@1.71 +1 -1
+ NTP_4_2_7P465
+
+ scripts/invoke-summary.texi@1.71 +1 -1
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.279 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait-opts@1.15 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.277 +6 -6
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.277 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait.html@1.296 +31 -49
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait.man.in@1.277 +6 -6
+ NTP_4_2_7P465
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.68 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep-opts@1.17 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.56 +6 -6
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.56 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep.html@1.69 +33 -44
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep.man.in@1.56 +6 -6
+ NTP_4_2_7P465
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.68 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace-opts@1.17 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.56 +13 -13
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.56 +2 -2
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace.html@1.69 +27 -36
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace.man.in@1.56 +13 -13
+ NTP_4_2_7P465
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P465
+
+ scripts/plot_summary-opts@1.18 +1 -1
+ NTP_4_2_7P465
+
+ scripts/plot_summary.1plot_summaryman@1.68 +6 -6
+ NTP_4_2_7P465
+
+ scripts/plot_summary.1plot_summarymdoc@1.68 +3 -3
+ NTP_4_2_7P465
+
+ scripts/plot_summary.html@1.71 +29 -47
+ NTP_4_2_7P465
+
+ scripts/plot_summary.man.in@1.68 +6 -6
+ NTP_4_2_7P465
+
+ scripts/plot_summary.mdoc.in@1.68 +3 -3
+ NTP_4_2_7P465
+
+ scripts/summary-opts@1.18 +1 -1
+ NTP_4_2_7P465
+
+ scripts/summary.1summaryman@1.68 +6 -6
+ NTP_4_2_7P465
+
+ scripts/summary.1summarymdoc@1.68 +2 -2
+ NTP_4_2_7P465
+
+ scripts/summary.html@1.71 +27 -39
+ NTP_4_2_7P465
+
+ scripts/summary.man.in@1.68 +6 -6
+ NTP_4_2_7P465
+
+ scripts/summary.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P465
+
+ sntp/invoke-sntp.texi@1.455 +2 -4
+ NTP_4_2_7P465
+
+ sntp/sntp-opts.c@1.473 +7 -7
+ NTP_4_2_7P465
+
+ sntp/sntp-opts.h@1.472 +3 -3
+ NTP_4_2_7P465
+
+ sntp/sntp.1sntpman@1.290 +6 -6
+ NTP_4_2_7P465
+
+ sntp/sntp.1sntpmdoc@1.290 +2 -2
+ NTP_4_2_7P465
+
+ sntp/sntp.html@1.470 +2 -4
+ NTP_4_2_7P465
+
+ sntp/sntp.man.in@1.290 +6 -6
+ NTP_4_2_7P465
+
+ sntp/sntp.mdoc.in@1.290 +2 -2
+ NTP_4_2_7P465
+
+ util/invoke-ntp-keygen.texi@1.459 +2 -4
+ NTP_4_2_7P465
+
+ util/ntp-keygen-opts.c@1.476 +7 -7
+ NTP_4_2_7P465
+
+ util/ntp-keygen-opts.h@1.475 +3 -3
+ NTP_4_2_7P465
+
+ util/ntp-keygen.1ntp-keygenman@1.287 +6 -6
+ NTP_4_2_7P465
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.287 +2 -2
+ NTP_4_2_7P465
+
+ util/ntp-keygen.html@1.135 +2 -2
+ NTP_4_2_7P465
+
+ util/ntp-keygen.man.in@1.287 +6 -6
+ NTP_4_2_7P465
+
+ util/ntp-keygen.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P465
+
+ChangeSet@1.3192, 2014-08-23 08:37:07+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2595] Man page quirks: ntpdate references in ntpd
+
+ ChangeLog@1.1529 +1 -0
+ [Bug 2595] Man page quirks: ntpdate references in ntpd
+
+ ntpd/ntpd-opts.def@1.12 +16 -7
+ [Bug 2595] Man page quirks: ntpdate references in ntpd
+
+ChangeSet@1.3191, 2014-08-23 05:39:03+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM
+
+ ChangeLog@1.1528 +1 -0
+ [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM
+
+ html/bugs.html@1.8 +4 -7
+ [Bug 2613] www.ntp.org/bugs.html tells folks to email doc bugs to DLM
+
+ChangeSet@1.3190, 2014-08-23 00:23:55+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ChangeLog@1.1527 +1 -0
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpd/Makefile.am@1.131 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpd/ntpd-opts.c@1.478 +3 -60
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpd/ntpdbase-opts.def@1.27 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpd/ntpdsim-opts.c@1.28 +9 -66
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpd/ntpdsim-opts.h@1.28 +2 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpdc/Makefile.am@1.75 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpdc/ntpdc-opts.c@1.473 +3 -60
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpdc/ntpdc-opts.def@1.23 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpq/Makefile.am@1.71 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpq/ntpq-opts.c@1.478 +5 -69
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpq/ntpq-opts.def@1.22 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpsnmpd/Makefile.am@1.40 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.475 +2 -44
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.11 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/build/Makefile.am@1.4 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/calc_tickadj/Makefile.am@1.10 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.8 +2 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/calc_tickadj/calc_tickadj.html@1.50 +34 -22
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.52 +2 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/invoke-plot_summary.texi@1.70 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/invoke-summary.texi@1.70 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntp-wait/Makefile.am@1.9 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.278 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntp-wait/ntp-wait-opts@1.14 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntp-wait/ntp-wait-opts.def@1.11 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntp-wait/ntp-wait.html@1.295 +47 -29
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntpsweep/Makefile.am@1.10 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.67 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntpsweep/ntpsweep-opts@1.16 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntpsweep/ntpsweep.html@1.68 +42 -31
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntptrace/Makefile.am@1.10 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.67 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntptrace/ntptrace-opts@1.16 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/ntptrace/ntptrace.html@1.68 +34 -25
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/plot_summary-opts@1.17 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/plot_summary.html@1.70 +45 -27
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/summary-opts@1.17 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ scripts/summary.html@1.70 +37 -25
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ sntp/Makefile.am@1.76 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ sntp/sntp-opts.c@1.472 +3 -61
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ sntp/sntp-opts.def@1.44 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ util/Makefile.am@1.76 +1 -1
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ util/ntp-keygen-opts.c@1.475 +3 -60
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ util/ntp-keygen-opts.def@1.27 +0 -2
+ [Bug 2538] NTP programs print exit code in help/usage text
+
+ChangeSet@1.3189, 2014-08-22 22:14:11+02:00, jnperlin@hydra.(none)
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - log GPSD revision and release numbers with protocol version
+
+ ChangeLog@1.1526 +1 -0
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - log GPSD revision and release numbers with protocol version
+
+ ntpd/refclock_gpsdjson.c@1.14 +8 -1
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - log GPSD revision and release numbers with protocol version
+
+ChangeSet@1.3188, 2014-08-22 18:36:17+02:00, jnperlin@hydra.(none)
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - found (hopefully) last cause for clutter in protocol version
+
+ ChangeLog@1.1525 +2 -0
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - found (hopefully) last cause for clutter in protocol version
+
+
+ ntpd/refclock_gpsdjson.c@1.13 +12 -13
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - found (hopefully) last cause for clutter in protocol version
+
+
+ChangeSet@1.3187, 2014-08-22 08:58:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P464
+ TAG: NTP_4_2_7P464
+
+ ChangeLog@1.1524 +1 -0
+ NTP_4_2_7P464
+
+ ntpd/invoke-ntp.conf.texi@1.143 +1 -1
+ NTP_4_2_7P464
+
+ ntpd/invoke-ntp.keys.texi@1.141 +1 -1
+ NTP_4_2_7P464
+
+ ntpd/invoke-ntpd.texi@1.457 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.conf.5man@1.177 +6 -6
+ NTP_4_2_7P464
+
+ ntpd/ntp.conf.5mdoc@1.177 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.conf.html@1.138 +1 -1
+ NTP_4_2_7P464
+
+ ntpd/ntp.conf.man.in@1.177 +6 -6
+ NTP_4_2_7P464
+
+ ntpd/ntp.conf.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.keys.5man@1.175 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.keys.5mdoc@1.175 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.keys.html@1.139 +1 -1
+ NTP_4_2_7P464
+
+ ntpd/ntp.keys.man.in@1.175 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntp.keys.mdoc.in@1.175 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntpd-opts.c@1.477 +6 -6
+ NTP_4_2_7P464
+
+ ntpd/ntpd-opts.h@1.477 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntpd.1ntpdman@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpd/ntpd.1ntpdmdoc@1.286 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntpd.html@1.133 +2 -2
+ NTP_4_2_7P464
+
+ ntpd/ntpd.man.in@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpd/ntpd.mdoc.in@1.286 +2 -2
+ NTP_4_2_7P464
+
+ ntpdc/invoke-ntpdc.texi@1.455 +2 -2
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc-opts.c@1.472 +6 -6
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc-opts.h@1.472 +2 -2
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc.1ntpdcman@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.286 +2 -2
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc.html@1.299 +2 -2
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc.man.in@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpdc/ntpdc.mdoc.in@1.286 +2 -2
+ NTP_4_2_7P464
+
+ ntpq/invoke-ntpq.texi@1.461 +2 -2
+ NTP_4_2_7P464
+
+ ntpq/ntpq-opts.c@1.477 +6 -6
+ NTP_4_2_7P464
+
+ ntpq/ntpq-opts.h@1.476 +2 -2
+ NTP_4_2_7P464
+
+ ntpq/ntpq.1ntpqman@1.289 +6 -6
+ NTP_4_2_7P464
+
+ ntpq/ntpq.1ntpqmdoc@1.289 +2 -2
+ NTP_4_2_7P464
+
+ ntpq/ntpq.html@1.130 +2 -2
+ NTP_4_2_7P464
+
+ ntpq/ntpq.man.in@1.289 +6 -6
+ NTP_4_2_7P464
+
+ ntpq/ntpq.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P464
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.457 +2 -2
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.474 +6 -6
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.474 +2 -2
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.286 +2 -2
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd.html@1.128 +1 -1
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd.man.in@1.286 +6 -6
+ NTP_4_2_7P464
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.286 +2 -2
+ NTP_4_2_7P464
+
+ packageinfo.sh@1.468 +1 -1
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.48 +6 -6
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.48 +2 -2
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/calc_tickadj.html@1.49 +1 -1
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.47 +6 -6
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P464
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.51 +1 -1
+ NTP_4_2_7P464
+
+ scripts/invoke-plot_summary.texi@1.69 +2 -2
+ NTP_4_2_7P464
+
+ scripts/invoke-summary.texi@1.69 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.277 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait-opts@1.13 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.276 +6 -6
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.276 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait.html@1.294 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait.man.in@1.276 +6 -6
+ NTP_4_2_7P464
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.66 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep-opts@1.15 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.55 +6 -6
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.55 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep.html@1.67 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep.man.in@1.55 +6 -6
+ NTP_4_2_7P464
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.66 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace-opts@1.15 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.55 +13 -13
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.55 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace.html@1.67 +2 -2
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace.man.in@1.55 +13 -13
+ NTP_4_2_7P464
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P464
+
+ scripts/plot_summary-opts@1.16 +2 -2
+ NTP_4_2_7P464
+
+ scripts/plot_summary.1plot_summaryman@1.67 +14 -14
+ NTP_4_2_7P464
+
+ scripts/plot_summary.1plot_summarymdoc@1.67 +3 -3
+ NTP_4_2_7P464
+
+ scripts/plot_summary.html@1.69 +2 -2
+ NTP_4_2_7P464
+
+ scripts/plot_summary.man.in@1.67 +14 -14
+ NTP_4_2_7P464
+
+ scripts/plot_summary.mdoc.in@1.67 +3 -3
+ NTP_4_2_7P464
+
+ scripts/summary-opts@1.16 +2 -2
+ NTP_4_2_7P464
+
+ scripts/summary.1summaryman@1.67 +6 -6
+ NTP_4_2_7P464
+
+ scripts/summary.1summarymdoc@1.67 +2 -2
+ NTP_4_2_7P464
+
+ scripts/summary.html@1.69 +2 -2
+ NTP_4_2_7P464
+
+ scripts/summary.man.in@1.67 +6 -6
+ NTP_4_2_7P464
+
+ scripts/summary.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P464
+
+ sntp/invoke-sntp.texi@1.454 +2 -2
+ NTP_4_2_7P464
+
+ sntp/sntp-opts.c@1.471 +6 -6
+ NTP_4_2_7P464
+
+ sntp/sntp-opts.h@1.471 +2 -2
+ NTP_4_2_7P464
+
+ sntp/sntp.1sntpman@1.289 +6 -6
+ NTP_4_2_7P464
+
+ sntp/sntp.1sntpmdoc@1.289 +2 -2
+ NTP_4_2_7P464
+
+ sntp/sntp.html@1.469 +2 -2
+ NTP_4_2_7P464
+
+ sntp/sntp.man.in@1.289 +6 -6
+ NTP_4_2_7P464
+
+ sntp/sntp.mdoc.in@1.289 +2 -2
+ NTP_4_2_7P464
+
+ util/invoke-ntp-keygen.texi@1.458 +2 -2
+ NTP_4_2_7P464
+
+ util/ntp-keygen-opts.c@1.474 +6 -6
+ NTP_4_2_7P464
+
+ util/ntp-keygen-opts.h@1.474 +2 -2
+ NTP_4_2_7P464
+
+ util/ntp-keygen.1ntp-keygenman@1.286 +6 -6
+ NTP_4_2_7P464
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.286 +2 -2
+ NTP_4_2_7P464
+
+ util/ntp-keygen.html@1.134 +2 -2
+ NTP_4_2_7P464
+
+ util/ntp-keygen.man.in@1.286 +6 -6
+ NTP_4_2_7P464
+
+ util/ntp-keygen.mdoc.in@1.286 +2 -2
+ NTP_4_2_7P464
+
+ChangeSet@1.3186, 2014-08-22 02:15:10-04:00, stenn@deacon.udel.edu
+ typos
+
+ ChangeLog@1.1523 +1 -1
+ typos
+
+ChangeSet@1.3185, 2014-08-21 21:40:54+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2636] Fix coverity warning from previous patch
+
+ ChangeLog@1.1522 +1 -0
+ [Bug 2636] Fix coverity warning from previous patch
+
+ChangeSet@1.3184, 2014-08-21 18:17:07+02:00, jnperlin@hydra.(none)
+ refclock_gpsdjson: Fix coverity warning. Did not cause a bug, but the code was not excatly as intented.
+
+ ntpd/refclock_gpsdjson.c@1.12 +11 -5
+ Fix coverity warning. Did not cause a bug, but the code was not excatly as intented.
+
+ChangeSet@1.3183, 2014-08-21 08:59:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P463
+ TAG: NTP_4_2_7P463
+
+ ChangeLog@1.1521 +1 -0
+ NTP_4_2_7P463
+
+ ntpd/invoke-ntp.conf.texi@1.142 +1 -1
+ NTP_4_2_7P463
+
+ ntpd/invoke-ntp.keys.texi@1.140 +1 -1
+ NTP_4_2_7P463
+
+ ntpd/invoke-ntpd.texi@1.456 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.conf.5man@1.176 +6 -6
+ NTP_4_2_7P463
+
+ ntpd/ntp.conf.5mdoc@1.176 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.conf.html@1.137 +1 -1
+ NTP_4_2_7P463
+
+ ntpd/ntp.conf.man.in@1.176 +6 -6
+ NTP_4_2_7P463
+
+ ntpd/ntp.conf.mdoc.in@1.176 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.keys.5man@1.174 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.keys.5mdoc@1.174 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.keys.html@1.138 +1 -1
+ NTP_4_2_7P463
+
+ ntpd/ntp.keys.man.in@1.174 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntp.keys.mdoc.in@1.174 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntpd-opts.c@1.476 +6 -6
+ NTP_4_2_7P463
+
+ ntpd/ntpd-opts.h@1.476 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntpd.1ntpdman@1.285 +6 -6
+ NTP_4_2_7P463
+
+ ntpd/ntpd.1ntpdmdoc@1.285 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntpd.html@1.132 +2 -2
+ NTP_4_2_7P463
+
+ ntpd/ntpd.man.in@1.285 +6 -6
+ NTP_4_2_7P463
+
+ ntpd/ntpd.mdoc.in@1.285 +2 -2
+ NTP_4_2_7P463
+
+ ntpdc/invoke-ntpdc.texi@1.454 +2 -2
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc-opts.c@1.471 +6 -6
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc-opts.h@1.471 +2 -2
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc.1ntpdcman@1.285 +13 -13
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.285 +2 -2
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc.html@1.298 +2 -2
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc.man.in@1.285 +13 -13
+ NTP_4_2_7P463
+
+ ntpdc/ntpdc.mdoc.in@1.285 +2 -2
+ NTP_4_2_7P463
+
+ ntpq/invoke-ntpq.texi@1.460 +2 -2
+ NTP_4_2_7P463
+
+ ntpq/ntpq-opts.c@1.476 +6 -6
+ NTP_4_2_7P463
+
+ ntpq/ntpq-opts.h@1.475 +2 -2
+ NTP_4_2_7P463
+
+ ntpq/ntpq.1ntpqman@1.288 +6 -6
+ NTP_4_2_7P463
+
+ ntpq/ntpq.1ntpqmdoc@1.288 +2 -2
+ NTP_4_2_7P463
+
+ ntpq/ntpq.html@1.129 +2 -2
+ NTP_4_2_7P463
+
+ ntpq/ntpq.man.in@1.288 +6 -6
+ NTP_4_2_7P463
+
+ ntpq/ntpq.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P463
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.456 +2 -2
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.473 +6 -6
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.473 +2 -2
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.285 +6 -6
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.285 +2 -2
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd.html@1.127 +1 -1
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd.man.in@1.285 +6 -6
+ NTP_4_2_7P463
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.285 +2 -2
+ NTP_4_2_7P463
+
+ packageinfo.sh@1.467 +1 -1
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.47 +6 -6
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.47 +2 -2
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/calc_tickadj.html@1.48 +1 -1
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.46 +6 -6
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P463
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.50 +1 -1
+ NTP_4_2_7P463
+
+ scripts/invoke-plot_summary.texi@1.68 +2 -2
+ NTP_4_2_7P463
+
+ scripts/invoke-summary.texi@1.68 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.276 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait-opts@1.12 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.275 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.275 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait.html@1.293 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait.man.in@1.275 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.65 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep-opts@1.14 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.54 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.54 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep.html@1.66 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep.man.in@1.54 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.65 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace-opts@1.14 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.54 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.54 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace.html@1.66 +2 -2
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace.man.in@1.54 +6 -6
+ NTP_4_2_7P463
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P463
+
+ scripts/plot_summary-opts@1.15 +2 -2
+ NTP_4_2_7P463
+
+ scripts/plot_summary.1plot_summaryman@1.66 +14 -14
+ NTP_4_2_7P463
+
+ scripts/plot_summary.1plot_summarymdoc@1.66 +2 -2
+ NTP_4_2_7P463
+
+ scripts/plot_summary.html@1.68 +2 -2
+ NTP_4_2_7P463
+
+ scripts/plot_summary.man.in@1.66 +14 -14
+ NTP_4_2_7P463
+
+ scripts/plot_summary.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P463
+
+ scripts/summary-opts@1.15 +2 -2
+ NTP_4_2_7P463
+
+ scripts/summary.1summaryman@1.66 +6 -6
+ NTP_4_2_7P463
+
+ scripts/summary.1summarymdoc@1.66 +2 -2
+ NTP_4_2_7P463
+
+ scripts/summary.html@1.68 +2 -2
+ NTP_4_2_7P463
+
+ scripts/summary.man.in@1.66 +6 -6
+ NTP_4_2_7P463
+
+ scripts/summary.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P463
+
+ sntp/invoke-sntp.texi@1.453 +2 -2
+ NTP_4_2_7P463
+
+ sntp/sntp-opts.c@1.470 +6 -6
+ NTP_4_2_7P463
+
+ sntp/sntp-opts.h@1.470 +2 -2
+ NTP_4_2_7P463
+
+ sntp/sntp.1sntpman@1.288 +6 -6
+ NTP_4_2_7P463
+
+ sntp/sntp.1sntpmdoc@1.288 +2 -2
+ NTP_4_2_7P463
+
+ sntp/sntp.html@1.468 +2 -2
+ NTP_4_2_7P463
+
+ sntp/sntp.man.in@1.288 +6 -6
+ NTP_4_2_7P463
+
+ sntp/sntp.mdoc.in@1.288 +2 -2
+ NTP_4_2_7P463
+
+ util/invoke-ntp-keygen.texi@1.457 +2 -2
+ NTP_4_2_7P463
+
+ util/ntp-keygen-opts.c@1.473 +6 -6
+ NTP_4_2_7P463
+
+ util/ntp-keygen-opts.h@1.473 +2 -2
+ NTP_4_2_7P463
+
+ util/ntp-keygen.1ntp-keygenman@1.285 +6 -6
+ NTP_4_2_7P463
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.285 +2 -2
+ NTP_4_2_7P463
+
+ util/ntp-keygen.html@1.133 +2 -2
+ NTP_4_2_7P463
+
+ util/ntp-keygen.man.in@1.285 +6 -6
+ NTP_4_2_7P463
+
+ util/ntp-keygen.mdoc.in@1.285 +2 -2
+ NTP_4_2_7P463
+
+ChangeSet@1.3182, 2014-08-20 22:14:09+02:00, jnperlin@hydra.(none)
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - make driver work with PSD protocol versio 3.9
+ - use exponential back-off for connection problems
+ - implement rate-limit for syslog entries
+
+ ChangeLog@1.1520 +4 -0
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - make driver work with PSD protocol versio 3.9
+ - use exponential back-off for connection problems
+ - implement rate-limit for syslog entries
+
+ html/drivers/driver46.html@1.4 +102 -43
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - documentation update and extension
+
+ ntpd/refclock_gpsdjson.c@1.11 +125 -74
+ [Bug 2636] Clutter in syslog if gpsd not running
+ - make driver work with PSD protocol versio 3.9
+ - use exponential back-off for connection problems
+ - implement rate-limit for syslog entries
+
+ChangeSet@1.3181, 2014-08-19 22:39:42+02:00, jnperlin@hydra.(none)
+ [Bug 2636] reduce logging of recurrent/persistent errors to avoid syslog flooding;
+ adapt to protocol version 3.9 and nanosecond PPS precision.
+
+ html/drivers/driver46.html@1.3 +10 -3
+ [Bug 2636] describe fudge flags used for clock stats and log throttle
+
+ ntpd/refclock_gpsdjson.c@1.10 +271 -121
+ [Bug 2636] imlement log throttling, adapt to GPSD protoco verdion 3.9
+
+ChangeSet@1.3180, 2014-08-16 06:28:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P462
+ TAG: NTP_4_2_7P462
+
+ ChangeLog@1.1519 +1 -0
+ NTP_4_2_7P462
+
+ ntpd/invoke-ntp.conf.texi@1.141 +1 -1
+ NTP_4_2_7P462
+
+ ntpd/invoke-ntp.keys.texi@1.139 +1 -1
+ NTP_4_2_7P462
+
+ ntpd/invoke-ntpd.texi@1.455 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.conf.5man@1.175 +6 -6
+ NTP_4_2_7P462
+
+ ntpd/ntp.conf.5mdoc@1.175 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.conf.html@1.136 +1 -1
+ NTP_4_2_7P462
+
+ ntpd/ntp.conf.man.in@1.175 +6 -6
+ NTP_4_2_7P462
+
+ ntpd/ntp.conf.mdoc.in@1.175 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.keys.5man@1.173 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.keys.5mdoc@1.173 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.keys.html@1.137 +1 -1
+ NTP_4_2_7P462
+
+ ntpd/ntp.keys.man.in@1.173 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntp.keys.mdoc.in@1.173 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntpd-opts.c@1.475 +6 -6
+ NTP_4_2_7P462
+
+ ntpd/ntpd-opts.h@1.475 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntpd.1ntpdman@1.284 +6 -6
+ NTP_4_2_7P462
+
+ ntpd/ntpd.1ntpdmdoc@1.284 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntpd.html@1.131 +2 -2
+ NTP_4_2_7P462
+
+ ntpd/ntpd.man.in@1.284 +6 -6
+ NTP_4_2_7P462
+
+ ntpd/ntpd.mdoc.in@1.284 +2 -2
+ NTP_4_2_7P462
+
+ ntpdc/invoke-ntpdc.texi@1.453 +2 -2
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc-opts.c@1.470 +6 -6
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc-opts.h@1.470 +2 -2
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc.1ntpdcman@1.284 +13 -13
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.284 +2 -2
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc.html@1.297 +2 -2
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc.man.in@1.284 +13 -13
+ NTP_4_2_7P462
+
+ ntpdc/ntpdc.mdoc.in@1.284 +2 -2
+ NTP_4_2_7P462
+
+ ntpq/invoke-ntpq.texi@1.459 +2 -2
+ NTP_4_2_7P462
+
+ ntpq/ntpq-opts.c@1.475 +6 -6
+ NTP_4_2_7P462
+
+ ntpq/ntpq-opts.h@1.474 +2 -2
+ NTP_4_2_7P462
+
+ ntpq/ntpq.1ntpqman@1.287 +6 -6
+ NTP_4_2_7P462
+
+ ntpq/ntpq.1ntpqmdoc@1.287 +2 -2
+ NTP_4_2_7P462
+
+ ntpq/ntpq.html@1.128 +2 -2
+ NTP_4_2_7P462
+
+ ntpq/ntpq.man.in@1.287 +6 -6
+ NTP_4_2_7P462
+
+ ntpq/ntpq.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P462
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.455 +2 -2
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.472 +6 -6
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.472 +2 -2
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.284 +6 -6
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.284 +2 -2
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd.html@1.126 +1 -1
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd.man.in@1.284 +6 -6
+ NTP_4_2_7P462
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.284 +2 -2
+ NTP_4_2_7P462
+
+ packageinfo.sh@1.466 +1 -1
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.46 +6 -6
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.46 +2 -2
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/calc_tickadj.html@1.47 +1 -1
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.45 +6 -6
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P462
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.49 +1 -1
+ NTP_4_2_7P462
+
+ scripts/invoke-plot_summary.texi@1.67 +3 -3
+ NTP_4_2_7P462
+
+ scripts/invoke-summary.texi@1.67 +3 -3
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.275 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait-opts@1.11 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.274 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.274 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait.html@1.292 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait.man.in@1.274 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.64 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep-opts@1.13 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.53 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.53 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep.html@1.65 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep.man.in@1.53 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.64 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace-opts@1.13 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.53 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.53 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace.html@1.65 +2 -2
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace.man.in@1.53 +6 -6
+ NTP_4_2_7P462
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P462
+
+ scripts/plot_summary-opts@1.14 +3 -3
+ NTP_4_2_7P462
+
+ scripts/plot_summary.1plot_summaryman@1.65 +6 -6
+ NTP_4_2_7P462
+
+ scripts/plot_summary.1plot_summarymdoc@1.65 +3 -3
+ NTP_4_2_7P462
+
+ scripts/plot_summary.html@1.67 +3 -3
+ NTP_4_2_7P462
+
+ scripts/plot_summary.man.in@1.65 +6 -6
+ NTP_4_2_7P462
+
+ scripts/plot_summary.mdoc.in@1.65 +3 -3
+ NTP_4_2_7P462
+
+ scripts/summary-opts@1.14 +2 -2
+ NTP_4_2_7P462
+
+ scripts/summary.1summaryman@1.65 +6 -6
+ NTP_4_2_7P462
+
+ scripts/summary.1summarymdoc@1.65 +3 -3
+ NTP_4_2_7P462
+
+ scripts/summary.html@1.67 +3 -3
+ NTP_4_2_7P462
+
+ scripts/summary.man.in@1.65 +6 -6
+ NTP_4_2_7P462
+
+ scripts/summary.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P462
+
+ sntp/invoke-sntp.texi@1.452 +2 -2
+ NTP_4_2_7P462
+
+ sntp/sntp-opts.c@1.469 +6 -6
+ NTP_4_2_7P462
+
+ sntp/sntp-opts.h@1.469 +2 -2
+ NTP_4_2_7P462
+
+ sntp/sntp.1sntpman@1.287 +6 -6
+ NTP_4_2_7P462
+
+ sntp/sntp.1sntpmdoc@1.287 +2 -2
+ NTP_4_2_7P462
+
+ sntp/sntp.html@1.467 +2 -2
+ NTP_4_2_7P462
+
+ sntp/sntp.man.in@1.287 +6 -6
+ NTP_4_2_7P462
+
+ sntp/sntp.mdoc.in@1.287 +2 -2
+ NTP_4_2_7P462
+
+ util/invoke-ntp-keygen.texi@1.456 +2 -2
+ NTP_4_2_7P462
+
+ util/ntp-keygen-opts.c@1.472 +6 -6
+ NTP_4_2_7P462
+
+ util/ntp-keygen-opts.h@1.472 +2 -2
+ NTP_4_2_7P462
+
+ util/ntp-keygen.1ntp-keygenman@1.284 +6 -6
+ NTP_4_2_7P462
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.284 +2 -2
+ NTP_4_2_7P462
+
+ util/ntp-keygen.html@1.132 +2 -2
+ NTP_4_2_7P462
+
+ util/ntp-keygen.man.in@1.284 +6 -6
+ NTP_4_2_7P462
+
+ util/ntp-keygen.mdoc.in@1.284 +2 -2
+ NTP_4_2_7P462
+
+ChangeSet@1.3177.1.5, 2014-08-14 09:32:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P461
+ TAG: NTP_4_2_7P461
+
+ ChangeLog@1.1516.1.5 +2 -0
+ NTP_4_2_7P461
+
+ ntpd/invoke-ntp.conf.texi@1.140 +1 -1
+ NTP_4_2_7P461
+
+ ntpd/invoke-ntp.keys.texi@1.138 +1 -1
+ NTP_4_2_7P461
+
+ ntpd/invoke-ntpd.texi@1.454 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.conf.5man@1.174 +6 -6
+ NTP_4_2_7P461
+
+ ntpd/ntp.conf.5mdoc@1.174 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.conf.html@1.135 +1 -1
+ NTP_4_2_7P461
+
+ ntpd/ntp.conf.man.in@1.174 +6 -6
+ NTP_4_2_7P461
+
+ ntpd/ntp.conf.mdoc.in@1.174 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.keys.5man@1.172 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.keys.5mdoc@1.172 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.keys.html@1.136 +1 -1
+ NTP_4_2_7P461
+
+ ntpd/ntp.keys.man.in@1.172 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntp.keys.mdoc.in@1.172 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntpd-opts.c@1.474 +6 -6
+ NTP_4_2_7P461
+
+ ntpd/ntpd-opts.h@1.474 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntpd.1ntpdman@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpd/ntpd.1ntpdmdoc@1.283 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntpd.html@1.130 +2 -2
+ NTP_4_2_7P461
+
+ ntpd/ntpd.man.in@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpd/ntpd.mdoc.in@1.283 +2 -2
+ NTP_4_2_7P461
+
+ ntpdc/invoke-ntpdc.texi@1.452 +2 -2
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc-opts.c@1.469 +6 -6
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc-opts.h@1.469 +2 -2
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc.1ntpdcman@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.283 +2 -2
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc.html@1.296 +2 -2
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc.man.in@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpdc/ntpdc.mdoc.in@1.283 +2 -2
+ NTP_4_2_7P461
+
+ ntpq/invoke-ntpq.texi@1.458 +2 -2
+ NTP_4_2_7P461
+
+ ntpq/ntpq-opts.c@1.474 +6 -6
+ NTP_4_2_7P461
+
+ ntpq/ntpq-opts.h@1.473 +2 -2
+ NTP_4_2_7P461
+
+ ntpq/ntpq.1ntpqman@1.286 +32 -3
+ NTP_4_2_7P461
+
+ ntpq/ntpq.1ntpqmdoc@1.286 +20 -1
+ NTP_4_2_7P461
+
+ ntpq/ntpq.html@1.127 +63 -41
+ NTP_4_2_7P461
+
+ ntpq/ntpq.man.in@1.286 +32 -3
+ NTP_4_2_7P461
+
+ ntpq/ntpq.mdoc.in@1.286 +20 -1
+ NTP_4_2_7P461
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.454 +2 -2
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.471 +6 -6
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.471 +2 -2
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.283 +2 -2
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd.html@1.125 +1 -1
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd.man.in@1.283 +6 -6
+ NTP_4_2_7P461
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.283 +2 -2
+ NTP_4_2_7P461
+
+ packageinfo.sh@1.465 +1 -1
+ NTP_4_2_7P461
+
+ scripts/Makefile.am@1.38 +1 -0
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.45 +6 -6
+ NTP_4_2_7P461
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.45 +2 -2
+ NTP_4_2_7P461
+
+ scripts/calc_tickadj/calc_tickadj.html@1.46 +1 -1
+ NTP_4_2_7P461
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.44 +6 -6
+ NTP_4_2_7P461
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P461
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.48 +1 -1
+ NTP_4_2_7P461
+
+ scripts/invoke-plot_summary.texi@1.66 +1 -1
+ NTP_4_2_7P461
+
+ scripts/invoke-plot_summary.texi@1.65 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/invoke-summary.texi@1.66 +1 -1
+ NTP_4_2_7P461
+
+ scripts/invoke-summary.texi@1.65 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/Makefile.am@1.8 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.274 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait-opts@1.10 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.273 +6 -6
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.273 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait.html@1.291 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait.man.in@1.273 +6 -6
+ NTP_4_2_7P461
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/Makefile.am@1.9 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.63 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep-opts@1.12 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.52 +13 -13
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.52 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep.html@1.64 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep.man.in@1.52 +13 -13
+ NTP_4_2_7P461
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntptrace/Makefile.am@1.9 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.63 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace-opts@1.12 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.52 +6 -6
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.52 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace.html@1.64 +2 -2
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace.man.in@1.52 +6 -6
+ NTP_4_2_7P461
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P461
+
+ scripts/plot_summary-opts@1.13 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary-opts@1.12 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.1plot_summaryman@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary.1plot_summaryman@1.63 +6 -6
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.1plot_summarymdoc@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary.1plot_summarymdoc@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.html@1.66 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary.html@1.65 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.man.in@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary.man.in@1.63 +6 -6
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.mdoc.in@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/plot_summary.mdoc.in@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary-opts@1.13 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary-opts@1.12 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.1summaryman@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary.1summaryman@1.63 +6 -6
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.1summarymdoc@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary.1summarymdoc@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.html@1.66 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary.html@1.65 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.man.in@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary.man.in@1.63 +6 -6
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.mdoc.in@1.64 +1 -1
+ NTP_4_2_7P461
+
+ scripts/summary.mdoc.in@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ sntp/invoke-sntp.texi@1.451 +2 -2
+ NTP_4_2_7P461
+
+ sntp/sntp-opts.c@1.468 +6 -6
+ NTP_4_2_7P461
+
+ sntp/sntp-opts.h@1.468 +2 -2
+ NTP_4_2_7P461
+
+ sntp/sntp.1sntpman@1.286 +6 -6
+ NTP_4_2_7P461
+
+ sntp/sntp.1sntpmdoc@1.286 +2 -2
+ NTP_4_2_7P461
+
+ sntp/sntp.html@1.466 +2 -2
+ NTP_4_2_7P461
+
+ sntp/sntp.man.in@1.286 +6 -6
+ NTP_4_2_7P461
+
+ sntp/sntp.mdoc.in@1.286 +2 -2
+ NTP_4_2_7P461
+
+ util/invoke-ntp-keygen.texi@1.455 +2 -2
+ NTP_4_2_7P461
+
+ util/ntp-keygen-opts.c@1.471 +6 -6
+ NTP_4_2_7P461
+
+ util/ntp-keygen-opts.h@1.471 +2 -2
+ NTP_4_2_7P461
+
+ util/ntp-keygen.1ntp-keygenman@1.283 +6 -6
+ NTP_4_2_7P461
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.283 +2 -2
+ NTP_4_2_7P461
+
+ util/ntp-keygen.html@1.131 +2 -2
+ NTP_4_2_7P461
+
+ util/ntp-keygen.man.in@1.283 +6 -6
+ NTP_4_2_7P461
+
+ util/ntp-keygen.mdoc.in@1.283 +2 -2
+ NTP_4_2_7P461
+
+ChangeSet@1.3177.1.4, 2014-08-14 08:27:49+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ChangeLog@1.1516.1.4 +1 -0
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/invoke-ntpq.texi@1.457 +38 -23
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq-opts.c@1.473 +129 -99
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq-opts.def@1.21 +30 -14
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq-opts.h@1.472 +23 -16
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq-subs.c@1.100 +5 -1
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq.1ntpqman@1.285 +24 -41
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq.1ntpqmdoc@1.285 +22 -30
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq.c@1.152 +4 -0
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq.man.in@1.285 +24 -41
+ [Bug 1128] ntpq truncates "remote" host information
+
+ ntpq/ntpq.mdoc.in@1.285 +22 -30
+ [Bug 1128] ntpq truncates "remote" host information
+
+ChangeSet@1.3177.1.3, 2014-08-13 11:49:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P460
+ TAG: NTP_4_2_7P460
+
+ ChangeLog@1.1516.1.3 +1 -0
+ NTP_4_2_7P460
+
+ ntpd/invoke-ntp.conf.texi@1.139 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/invoke-ntp.keys.texi@1.137 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/invoke-ntpd.texi@1.453 +2 -2
+ NTP_4_2_7P460
+
+ ntpd/ntp.conf.5man@1.173 +4 -4
+ NTP_4_2_7P460
+
+ ntpd/ntp.conf.5mdoc@1.173 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/ntp.conf.html@1.134 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/ntp.conf.man.in@1.173 +4 -4
+ NTP_4_2_7P460
+
+ ntpd/ntp.conf.mdoc.in@1.173 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/ntp.keys.5man@1.171 +11 -4
+ NTP_4_2_7P460
+
+ ntpd/ntp.keys.5mdoc@1.171 +7 -3
+ NTP_4_2_7P460
+
+ ntpd/ntp.keys.html@1.135 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/ntp.keys.man.in@1.171 +11 -4
+ NTP_4_2_7P460
+
+ ntpd/ntp.keys.mdoc.in@1.171 +7 -3
+ NTP_4_2_7P460
+
+ ntpd/ntpd-opts.c@1.473 +6 -6
+ NTP_4_2_7P460
+
+ ntpd/ntpd-opts.h@1.473 +2 -2
+ NTP_4_2_7P460
+
+ ntpd/ntpd.1ntpdman@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpd/ntpd.1ntpdmdoc@1.282 +1 -1
+ NTP_4_2_7P460
+
+ ntpd/ntpd.html@1.129 +2 -2
+ NTP_4_2_7P460
+
+ ntpd/ntpd.man.in@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpd/ntpd.mdoc.in@1.282 +1 -1
+ NTP_4_2_7P460
+
+ ntpdc/invoke-ntpdc.texi@1.451 +2 -2
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc-opts.c@1.468 +6 -6
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc-opts.h@1.468 +2 -2
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc.1ntpdcman@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.282 +1 -1
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc.html@1.295 +2 -2
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc.man.in@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpdc/ntpdc.mdoc.in@1.282 +1 -1
+ NTP_4_2_7P460
+
+ ntpq/invoke-ntpq.texi@1.456 +2 -2
+ NTP_4_2_7P460
+
+ ntpq/ntpq-opts.c@1.472 +6 -6
+ NTP_4_2_7P460
+
+ ntpq/ntpq-opts.h@1.471 +2 -2
+ NTP_4_2_7P460
+
+ ntpq/ntpq.1ntpqman@1.284 +4 -4
+ NTP_4_2_7P460
+
+ ntpq/ntpq.1ntpqmdoc@1.284 +1 -1
+ NTP_4_2_7P460
+
+ ntpq/ntpq.html@1.126 +2 -2
+ NTP_4_2_7P460
+
+ ntpq/ntpq.man.in@1.284 +4 -4
+ NTP_4_2_7P460
+
+ ntpq/ntpq.mdoc.in@1.284 +1 -1
+ NTP_4_2_7P460
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.453 +2 -2
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.470 +6 -6
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.470 +2 -2
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.282 +1 -1
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd.html@1.124 +1 -1
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd.man.in@1.282 +4 -4
+ NTP_4_2_7P460
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.282 +1 -1
+ NTP_4_2_7P460
+
+ packageinfo.sh@1.464 +1 -1
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.44 +4 -4
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.44 +1 -1
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/calc_tickadj.html@1.45 +22 -34
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.43 +4 -4
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.44 +1 -1
+ NTP_4_2_7P460
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.47 +1 -1
+ NTP_4_2_7P460
+
+ scripts/invoke-plot_summary.texi@1.64 +2 -2
+ NTP_4_2_7P460
+
+ scripts/invoke-summary.texi@1.64 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.273 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait-opts@1.9 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.272 +4 -4
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.272 +1 -1
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait.html@1.290 +31 -49
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait.man.in@1.272 +4 -4
+ NTP_4_2_7P460
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.272 +1 -1
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.62 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep-opts@1.11 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.51 +12 -12
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.51 +1 -1
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep.html@1.63 +33 -44
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep.man.in@1.51 +12 -12
+ NTP_4_2_7P460
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P460
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.62 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace-opts@1.11 +2 -2
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.51 +4 -4
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.51 +1 -1
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace.html@1.63 +27 -36
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace.man.in@1.51 +4 -4
+ NTP_4_2_7P460
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P460
+
+ scripts/plot_summary-opts@1.11 +2 -2
+ NTP_4_2_7P460
+
+ scripts/plot_summary.1plot_summaryman@1.62 +4 -4
+ NTP_4_2_7P460
+
+ scripts/plot_summary.1plot_summarymdoc@1.62 +1 -1
+ NTP_4_2_7P460
+
+ scripts/plot_summary.html@1.64 +29 -47
+ NTP_4_2_7P460
+
+ scripts/plot_summary.man.in@1.62 +4 -4
+ NTP_4_2_7P460
+
+ scripts/plot_summary.mdoc.in@1.62 +1 -1
+ NTP_4_2_7P460
+
+ scripts/summary-opts@1.11 +2 -2
+ NTP_4_2_7P460
+
+ scripts/summary.1summaryman@1.62 +4 -4
+ NTP_4_2_7P460
+
+ scripts/summary.1summarymdoc@1.62 +1 -1
+ NTP_4_2_7P460
+
+ scripts/summary.html@1.64 +27 -39
+ NTP_4_2_7P460
+
+ scripts/summary.man.in@1.62 +4 -4
+ NTP_4_2_7P460
+
+ scripts/summary.mdoc.in@1.62 +1 -1
+ NTP_4_2_7P460
+
+ sntp/invoke-sntp.texi@1.450 +2 -2
+ NTP_4_2_7P460
+
+ sntp/sntp-opts.c@1.467 +6 -6
+ NTP_4_2_7P460
+
+ sntp/sntp-opts.h@1.467 +2 -2
+ NTP_4_2_7P460
+
+ sntp/sntp.1sntpman@1.285 +4 -4
+ NTP_4_2_7P460
+
+ sntp/sntp.1sntpmdoc@1.285 +1 -1
+ NTP_4_2_7P460
+
+ sntp/sntp.html@1.465 +2 -2
+ NTP_4_2_7P460
+
+ sntp/sntp.man.in@1.285 +4 -4
+ NTP_4_2_7P460
+
+ sntp/sntp.mdoc.in@1.285 +1 -1
+ NTP_4_2_7P460
+
+ util/invoke-ntp-keygen.texi@1.454 +2 -2
+ NTP_4_2_7P460
+
+ util/ntp-keygen-opts.c@1.470 +6 -6
+ NTP_4_2_7P460
+
+ util/ntp-keygen-opts.h@1.470 +2 -2
+ NTP_4_2_7P460
+
+ util/ntp-keygen.1ntp-keygenman@1.282 +4 -4
+ NTP_4_2_7P460
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.282 +1 -1
+ NTP_4_2_7P460
+
+ util/ntp-keygen.html@1.130 +2 -2
+ NTP_4_2_7P460
+
+ util/ntp-keygen.man.in@1.282 +4 -4
+ NTP_4_2_7P460
+
+ util/ntp-keygen.mdoc.in@1.282 +1 -1
+ NTP_4_2_7P460
+
+ChangeSet@1.3177.1.2, 2014-08-13 10:36:39+00:00, stenn@psp-fb1.ntp.org
+ More autogen-5.18.4pre14 cleanup
+
+ BitKeeper/deleted/00/mdoc2man~8fe2ef1ce14f0f8e@1.4 +0 -0
+ Delete: sntp/ag-tpl/Old/mdoc2man
+
+ BitKeeper/deleted/0f/agman-file.tpl~e66d0c3c8f6fdd@1.4 +0 -0
+ Delete: sntp/ag-tpl/Old/agman-file.tpl
+
+ BitKeeper/deleted/63/agtexi-cmd.tpl~2f8da79991e6b4d4@1.4 +0 -0
+ Delete: sntp/ag-tpl/Old/agtexi-cmd.tpl
+
+ BitKeeper/deleted/80/agmdoc-file.tpl~4fa7cc72899a18a3@1.4 +0 -0
+ Delete: sntp/ag-tpl/Old/agmdoc-file.tpl
+
+ BitKeeper/deleted/a6/cmd-doc.tlib~e55de6df878a7dcc@1.4 +0 -0
+ Delete: sntp/ag-tpl/Old/cmd-doc.tlib
+
+ ChangeLog@1.1516.1.2 +1 -0
+ More autogen-5.18.4pre14 cleanup
+
+ ntpd/ntpdsim-opts.c@1.27 +6 -6
+ More autogen-5.18.4pre14 cleanup
+
+ ntpd/ntpdsim-opts.h@1.27 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/Makefile.am@1.37 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/calc_tickadj/Makefile.am@1.9 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.7 +3 -3
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/calc_tickadj/calc_tickadj.html@1.44 +35 -23
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.46 +3 -3
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/invoke-plot_summary.texi@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/invoke-summary.texi@1.63 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/Makefile.am@1.7 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.272 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/ntp-wait-opts@1.8 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntp-wait/ntp-wait.html@1.289 +48 -30
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntpsweep/Makefile.am@1.8 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.61 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntpsweep/ntpsweep-opts@1.10 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntpsweep/ntpsweep.html@1.62 +43 -32
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntptrace/Makefile.am@1.8 +1 -1
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.61 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntptrace/ntptrace-opts@1.10 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/ntptrace/ntptrace.html@1.62 +35 -26
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary-opts@1.10 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/plot_summary.html@1.63 +46 -28
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary-opts@1.10 +2 -2
+ More autogen-5.18.4pre14 cleanup
+
+ scripts/summary.html@1.63 +38 -26
+ More autogen-5.18.4pre14 cleanup
+
+ sntp/ag-tpl/:Old/Mdoc.pm@1.3 +0 -0
+ Rename: sntp/ag-tpl/Mdoc.pm -> sntp/ag-tpl/:Old/Mdoc.pm
+
+ sntp/ag-tpl/:Old/agman-cmd.tpl@1.2 +0 -0
+ Rename: sntp/ag-tpl/agman-cmd.tpl -> sntp/ag-tpl/:Old/agman-cmd.tpl
+
+ sntp/ag-tpl/:Old/agmdoc-cmd.tpl@1.3 +0 -0
+ Rename: sntp/ag-tpl/agmdoc-cmd.tpl -> sntp/ag-tpl/:Old/agmdoc-cmd.tpl
+
+ sntp/ag-tpl/:Old/cmd-doc.tlib@1.2 +0 -0
+ Rename: sntp/ag-tpl/cmd-doc.tlib -> sntp/ag-tpl/:Old/cmd-doc.tlib
+
+ sntp/ag-tpl/:Old/mdoc-synopsis.tlib@1.2 +0 -0
+ Rename: sntp/ag-tpl/mdoc-synopsis.tlib -> sntp/ag-tpl/:Old/mdoc-synopsis.tlib
+
+ sntp/ag-tpl/:Old/mdoc2man@1.3 +0 -0
+ Rename: sntp/ag-tpl/mdoc2man -> sntp/ag-tpl/:Old/mdoc2man
+
+ sntp/ag-tpl/:Old/mdoc2texi@1.10 +0 -0
+ Rename: sntp/ag-tpl/mdoc2texi -> sntp/ag-tpl/:Old/mdoc2texi
+
+ sntp/ag-tpl/:Old/perlopt.tpl@1.4 +0 -0
+ Rename: sntp/ag-tpl/perlopt.tpl -> sntp/ag-tpl/:Old/perlopt.tpl
+
+ChangeSet@1.3177.1.1, 2014-08-13 08:38:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P459
+ TAG: NTP_4_2_7P459
+
+ ChangeLog@1.1516.1.1 +1 -0
+ NTP_4_2_7P459
+
+ ntpd/invoke-ntp.conf.texi@1.138 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/invoke-ntp.keys.texi@1.136 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/invoke-ntpd.texi@1.452 +2 -2
+ NTP_4_2_7P459
+
+ ntpd/ntp.conf.5man@1.172 +4 -4
+ NTP_4_2_7P459
+
+ ntpd/ntp.conf.5mdoc@1.172 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.conf.html@1.133 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.conf.man.in@1.172 +4 -4
+ NTP_4_2_7P459
+
+ ntpd/ntp.conf.mdoc.in@1.172 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.keys.5man@1.170 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.keys.5mdoc@1.170 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.keys.html@1.134 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.keys.man.in@1.170 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntp.keys.mdoc.in@1.170 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntpd-opts.c@1.472 +6 -6
+ NTP_4_2_7P459
+
+ ntpd/ntpd-opts.h@1.472 +2 -2
+ NTP_4_2_7P459
+
+ ntpd/ntpd.1ntpdman@1.281 +4 -4
+ NTP_4_2_7P459
+
+ ntpd/ntpd.1ntpdmdoc@1.281 +1 -1
+ NTP_4_2_7P459
+
+ ntpd/ntpd.html@1.128 +2 -2
+ NTP_4_2_7P459
+
+ ntpd/ntpd.man.in@1.281 +4 -4
+ NTP_4_2_7P459
+
+ ntpd/ntpd.mdoc.in@1.281 +1 -1
+ NTP_4_2_7P459
+
+ ntpdc/invoke-ntpdc.texi@1.450 +2 -2
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc-opts.c@1.467 +6 -6
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc-opts.h@1.467 +2 -2
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc.1ntpdcman@1.281 +12 -12
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.281 +1 -1
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc.html@1.294 +2 -2
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc.man.in@1.281 +12 -12
+ NTP_4_2_7P459
+
+ ntpdc/ntpdc.mdoc.in@1.281 +1 -1
+ NTP_4_2_7P459
+
+ ntpq/invoke-ntpq.texi@1.455 +2 -2
+ NTP_4_2_7P459
+
+ ntpq/ntpq-opts.c@1.471 +6 -6
+ NTP_4_2_7P459
+
+ ntpq/ntpq-opts.h@1.470 +2 -2
+ NTP_4_2_7P459
+
+ ntpq/ntpq.1ntpqman@1.283 +4 -4
+ NTP_4_2_7P459
+
+ ntpq/ntpq.1ntpqmdoc@1.283 +1 -1
+ NTP_4_2_7P459
+
+ ntpq/ntpq.html@1.125 +4 -4
+ NTP_4_2_7P459
+
+ ntpq/ntpq.man.in@1.283 +4 -4
+ NTP_4_2_7P459
+
+ ntpq/ntpq.mdoc.in@1.283 +1 -1
+ NTP_4_2_7P459
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.452 +2 -2
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.469 +6 -6
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.469 +2 -2
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.281 +4 -4
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.281 +1 -1
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd.html@1.123 +1 -1
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd.man.in@1.281 +4 -4
+ NTP_4_2_7P459
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.281 +1 -1
+ NTP_4_2_7P459
+
+ packageinfo.sh@1.463 +1 -1
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.43 +4 -4
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.43 +1 -1
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/calc_tickadj.html@1.43 +1 -1
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.42 +4 -4
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.43 +1 -1
+ NTP_4_2_7P459
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.45 +1 -1
+ NTP_4_2_7P459
+
+ scripts/invoke-plot_summary.texi@1.62 +2 -2
+ NTP_4_2_7P459
+
+ scripts/invoke-summary.texi@1.62 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.271 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait-opts@1.7 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.271 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.271 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait.html@1.288 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait.man.in@1.271 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.271 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.60 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep-opts@1.9 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.50 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.50 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep.html@1.61 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep.man.in@1.50 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.51 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.60 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace-opts@1.9 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.50 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.50 +1 -1
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace.html@1.61 +2 -2
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace.man.in@1.50 +4 -4
+ NTP_4_2_7P459
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.51 +1 -1
+ NTP_4_2_7P459
+
+ scripts/plot_summary-opts@1.9 +1 -1
+ NTP_4_2_7P459
+
+ scripts/plot_summary.1plot_summaryman@1.61 +4 -4
+ NTP_4_2_7P459
+
+ scripts/plot_summary.1plot_summarymdoc@1.61 +1 -1
+ NTP_4_2_7P459
+
+ scripts/plot_summary.html@1.62 +2 -2
+ NTP_4_2_7P459
+
+ scripts/plot_summary.man.in@1.61 +4 -4
+ NTP_4_2_7P459
+
+ scripts/plot_summary.mdoc.in@1.61 +1 -1
+ NTP_4_2_7P459
+
+ scripts/summary-opts@1.9 +1 -1
+ NTP_4_2_7P459
+
+ scripts/summary.1summaryman@1.61 +4 -4
+ NTP_4_2_7P459
+
+ scripts/summary.1summarymdoc@1.61 +1 -1
+ NTP_4_2_7P459
+
+ scripts/summary.html@1.62 +2 -2
+ NTP_4_2_7P459
+
+ scripts/summary.man.in@1.61 +4 -4
+ NTP_4_2_7P459
+
+ scripts/summary.mdoc.in@1.61 +1 -1
+ NTP_4_2_7P459
+
+ sntp/invoke-sntp.texi@1.449 +2 -2
+ NTP_4_2_7P459
+
+ sntp/sntp-opts.c@1.466 +6 -6
+ NTP_4_2_7P459
+
+ sntp/sntp-opts.h@1.466 +2 -2
+ NTP_4_2_7P459
+
+ sntp/sntp.1sntpman@1.284 +4 -4
+ NTP_4_2_7P459
+
+ sntp/sntp.1sntpmdoc@1.284 +1 -1
+ NTP_4_2_7P459
+
+ sntp/sntp.html@1.464 +2 -2
+ NTP_4_2_7P459
+
+ sntp/sntp.man.in@1.284 +4 -4
+ NTP_4_2_7P459
+
+ sntp/sntp.mdoc.in@1.284 +1 -1
+ NTP_4_2_7P459
+
+ util/invoke-ntp-keygen.texi@1.453 +2 -2
+ NTP_4_2_7P459
+
+ util/ntp-keygen-opts.c@1.469 +6 -6
+ NTP_4_2_7P459
+
+ util/ntp-keygen-opts.h@1.469 +2 -2
+ NTP_4_2_7P459
+
+ util/ntp-keygen.1ntp-keygenman@1.281 +4 -4
+ NTP_4_2_7P459
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.281 +1 -1
+ NTP_4_2_7P459
+
+ util/ntp-keygen.html@1.129 +2 -2
+ NTP_4_2_7P459
+
+ util/ntp-keygen.man.in@1.281 +4 -4
+ NTP_4_2_7P459
+
+ util/ntp-keygen.mdoc.in@1.281 +1 -1
+ NTP_4_2_7P459
+
+ChangeSet@1.3178, 2014-08-12 20:29:54+02:00, jnperlin@hydra.(none)
+ [Bug 2622] Synchronisation problem using SHM [...]
+ Add 'control' function to SHM driver-- fudge values not available during start.
+
+ ChangeLog@1.1517 +2 -0
+ [Bug 2622] Synchronisation problem using SHM [...]
+ Add 'control' function -- fudge values not available during start.
+
+ ntpd/refclock_shm.c@1.29 +38 -9
+ [Bug 2622] Synchronisation problem using SHM [...]
+ Add 'control' function -- fudge values not available during start.
+
+ChangeSet@1.3177, 2014-08-12 02:08:55-04:00, stenn@deacon.udel.edu
+ Try bison-3.0.2 instead of bison-2.5
+
+ ChangeLog@1.1516 +1 -0
+ Try bison-3.0.2 instead of bison-2.5
+
+ ntpd/ntp_parser.c@1.88 +1109 -1510
+ Try bison-3.0.2 instead of bison-2.5
+
+ ntpd/ntp_parser.h@1.54 +215 -211
+ Try bison-3.0.2 instead of bison-2.5
+
+ChangeSet@1.3176, 2014-08-12 02:01:01-04:00, stenn@deacon.udel.edu
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ChangeLog@1.1515 +1 -0
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/invoke-ntpq.texi@1.454 +3 -3
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq-opts.c@1.470 +1 -1
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq-opts.def@1.20 +1 -1
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq.1ntpqman@1.282 +5 -5
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq.1ntpqmdoc@1.282 +2 -2
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq.man.in@1.282 +5 -5
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ ntpq/ntpq.mdoc.in@1.282 +2 -2
+ [Bug 2630] Limit the ntpq command buffer to 512 bytes
+
+ChangeSet@1.3175, 2014-08-12 02:08:30+00:00, stenn@psp-fb1.ntp.org
+ FlexeLint cleanups
+
+ ChangeLog@1.1514 +1 -0
+ FlexeLint cleanups
+
+ChangeSet@1.3172.1.2, 2014-08-12 01:27:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P458
+ TAG: NTP_4_2_7P458
+
+ ChangeLog@1.1513 +1 -0
+ NTP_4_2_7P458
+
+ ntpd/invoke-ntp.conf.texi@1.137 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/invoke-ntp.keys.texi@1.135 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/invoke-ntpd.texi@1.451 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.conf.5man@1.171 +4 -4
+ NTP_4_2_7P458
+
+ ntpd/ntp.conf.5mdoc@1.171 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.conf.html@1.132 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.conf.man.in@1.171 +4 -4
+ NTP_4_2_7P458
+
+ ntpd/ntp.conf.mdoc.in@1.171 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.keys.5man@1.169 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.keys.5mdoc@1.169 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.keys.html@1.133 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.keys.man.in@1.169 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntp.keys.mdoc.in@1.169 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntpd-opts.c@1.471 +6 -6
+ NTP_4_2_7P458
+
+ ntpd/ntpd-opts.h@1.471 +2 -2
+ NTP_4_2_7P458
+
+ ntpd/ntpd.1ntpdman@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpd/ntpd.1ntpdmdoc@1.280 +1 -1
+ NTP_4_2_7P458
+
+ ntpd/ntpd.html@1.127 +2 -2
+ NTP_4_2_7P458
+
+ ntpd/ntpd.man.in@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpd/ntpd.mdoc.in@1.280 +1 -1
+ NTP_4_2_7P458
+
+ ntpdc/invoke-ntpdc.texi@1.449 +1 -1
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc-opts.c@1.466 +6 -6
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc-opts.h@1.466 +2 -2
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc.1ntpdcman@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.280 +1 -1
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc.html@1.293 +2 -2
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc.man.in@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpdc/ntpdc.mdoc.in@1.280 +1 -1
+ NTP_4_2_7P458
+
+ ntpq/invoke-ntpq.texi@1.453 +1 -1
+ NTP_4_2_7P458
+
+ ntpq/ntpq-opts.c@1.469 +6 -6
+ NTP_4_2_7P458
+
+ ntpq/ntpq-opts.h@1.469 +2 -2
+ NTP_4_2_7P458
+
+ ntpq/ntpq.1ntpqman@1.281 +4 -4
+ NTP_4_2_7P458
+
+ ntpq/ntpq.1ntpqmdoc@1.281 +1 -1
+ NTP_4_2_7P458
+
+ ntpq/ntpq.html@1.124 +27 -26
+ NTP_4_2_7P458
+
+ ntpq/ntpq.man.in@1.281 +4 -4
+ NTP_4_2_7P458
+
+ ntpq/ntpq.mdoc.in@1.281 +1 -1
+ NTP_4_2_7P458
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.451 +1 -1
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.468 +6 -6
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.468 +2 -2
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.280 +1 -1
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd.html@1.122 +1 -1
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd.man.in@1.280 +4 -4
+ NTP_4_2_7P458
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.280 +1 -1
+ NTP_4_2_7P458
+
+ packageinfo.sh@1.462 +1 -1
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.42 +4 -4
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.42 +1 -1
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/calc_tickadj.html@1.42 +1 -1
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.41 +4 -4
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.42 +1 -1
+ NTP_4_2_7P458
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.44 +1 -1
+ NTP_4_2_7P458
+
+ scripts/invoke-plot_summary.texi@1.61 +1 -1
+ NTP_4_2_7P458
+
+ scripts/invoke-summary.texi@1.61 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.270 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait-opts@1.6 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.270 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.270 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait.html@1.287 +2 -2
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait.man.in@1.270 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.270 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.59 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep-opts@1.8 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.49 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.49 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep.html@1.60 +2 -2
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep.man.in@1.49 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.50 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.59 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace-opts@1.8 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.49 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.49 +1 -1
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace.html@1.60 +2 -2
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace.man.in@1.49 +4 -4
+ NTP_4_2_7P458
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.50 +1 -1
+ NTP_4_2_7P458
+
+ scripts/plot_summary-opts@1.8 +1 -1
+ NTP_4_2_7P458
+
+ scripts/plot_summary.1plot_summaryman@1.60 +4 -4
+ NTP_4_2_7P458
+
+ scripts/plot_summary.1plot_summarymdoc@1.60 +1 -1
+ NTP_4_2_7P458
+
+ scripts/plot_summary.html@1.61 +2 -2
+ NTP_4_2_7P458
+
+ scripts/plot_summary.man.in@1.60 +4 -4
+ NTP_4_2_7P458
+
+ scripts/plot_summary.mdoc.in@1.60 +1 -1
+ NTP_4_2_7P458
+
+ scripts/summary-opts@1.8 +1 -1
+ NTP_4_2_7P458
+
+ scripts/summary.1summaryman@1.60 +4 -4
+ NTP_4_2_7P458
+
+ scripts/summary.1summarymdoc@1.60 +1 -1
+ NTP_4_2_7P458
+
+ scripts/summary.html@1.61 +2 -2
+ NTP_4_2_7P458
+
+ scripts/summary.man.in@1.60 +4 -4
+ NTP_4_2_7P458
+
+ scripts/summary.mdoc.in@1.60 +1 -1
+ NTP_4_2_7P458
+
+ sntp/invoke-sntp.texi@1.448 +1 -1
+ NTP_4_2_7P458
+
+ sntp/sntp-opts.c@1.465 +6 -6
+ NTP_4_2_7P458
+
+ sntp/sntp-opts.h@1.465 +2 -2
+ NTP_4_2_7P458
+
+ sntp/sntp.1sntpman@1.283 +4 -4
+ NTP_4_2_7P458
+
+ sntp/sntp.1sntpmdoc@1.283 +1 -1
+ NTP_4_2_7P458
+
+ sntp/sntp.html@1.463 +2 -2
+ NTP_4_2_7P458
+
+ sntp/sntp.man.in@1.283 +4 -4
+ NTP_4_2_7P458
+
+ sntp/sntp.mdoc.in@1.283 +1 -1
+ NTP_4_2_7P458
+
+ util/invoke-ntp-keygen.texi@1.452 +1 -1
+ NTP_4_2_7P458
+
+ util/ntp-keygen-opts.c@1.468 +6 -6
+ NTP_4_2_7P458
+
+ util/ntp-keygen-opts.h@1.468 +2 -2
+ NTP_4_2_7P458
+
+ util/ntp-keygen.1ntp-keygenman@1.280 +4 -4
+ NTP_4_2_7P458
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.280 +1 -1
+ NTP_4_2_7P458
+
+ util/ntp-keygen.html@1.128 +2 -2
+ NTP_4_2_7P458
+
+ util/ntp-keygen.man.in@1.280 +4 -4
+ NTP_4_2_7P458
+
+ util/ntp-keygen.mdoc.in@1.280 +1 -1
+ NTP_4_2_7P458
+
+ChangeSet@1.3172.1.1, 2014-08-10 22:26:19+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2633] Provide stdnoreturn.h for windows port
+
+ ChangeLog@1.1512 +1 -0
+ [Bug 2633] Provide stdnoreturn.h for windows port
+
+ ports/winnt/include/hopf_PCI_io.h@1.3 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/include/stdnoreturn.h@1.1 +61 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/ports/winnt/include/stdnoreturn.h
+
+ ports/winnt/include/stdnoreturn.h@1.0 +0 -0
+
+ChangeSet@1.3173, 2014-08-09 20:32:45+00:00, phk@psp-fb1.ntp.org
+ ntp.h, ntp_proto.c:
+ Don't do arithmetic on NULL pointer when we have a real pointer to use
+ ntp_parser.y, ntp_config.c:
+ A set of no-op pedantic changes inspired by FlexeLints complaints,
+ while looking for ways to make the simulator work again:
+
+ Add prototype for yyparser() until bison joins the century of the fruit-bat.
+ Make some functions static.
+ Spell NTP_INSIST() INSIST()
+ Deal with "SIM-only" stuff in ntp_parser.y rather than later.
+ Mark knowingly unused arguments
+ Signed/Unsigned/Long fixes to constants.
+ Const char* argument to fprintf(3).
+ ntp_assert.h:
+ Use systems assert(3) for FlexeLint analysis
+
+ include/ntp.h@1.210 +1 -2
+ Don't do arithmetic on NULL pointer when we have a real pointer to use
+
+ include/ntp_assert.h@1.8 +12 -1
+ Use systems assert(3) for FlexeLint analysis
+
+ ntpd/ntp_config.c@1.320 +59 -50
+ A set of no-op pedantic changes inspired by FlexeLints complaints,
+ while looking for ways to make the simulator work again:
+
+ Add prototype for yyparser() until bison joins the century of the fruit-bat.
+ Make some functions static.
+ Spell NTP_INSIST() INSIST()
+ Deal with "SIM-only" stuff in ntp_parser.y rather than later.
+ Mark knowingly unused arguments
+ Signed/Unsigned/Long fixes to constants.
+ Const char* argument to fprintf(3).
+
+ ntpd/ntp_parser.c@1.87 +187 -181
+ A set of no-op pedantic changes inspired by FlexeLints complaints,
+ while looking for ways to make the simulator work again:
+
+ Add prototype for yyparser() until bison joins the century of the fruit-bat.
+ Make some functions static.
+ Spell NTP_INSIST() INSIST()
+ Deal with "SIM-only" stuff in ntp_parser.y rather than later.
+ Mark knowingly unused arguments
+ Signed/Unsigned/Long fixes to constants.
+ Const char* argument to fprintf(3).
+
+ ntpd/ntp_parser.h@1.53 +1 -1
+
+ ntpd/ntp_parser.y@1.81 +8 -2
+
+ ntpd/ntp_proto.c@1.349 +1 -1
+ Don't do arithmetic on NULL pointer when we have a real pointer to use
+
+ChangeSet@1.3172, 2014-08-09 11:04:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P457
+ TAG: NTP_4_2_7P457
+
+ ChangeLog@1.1511 +1 -0
+ NTP_4_2_7P457
+
+ ntpd/invoke-ntp.conf.texi@1.136 +1 -1
+ NTP_4_2_7P457
+
+ ntpd/invoke-ntp.keys.texi@1.134 +1 -1
+ NTP_4_2_7P457
+
+ ntpd/invoke-ntpd.texi@1.450 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.conf.5man@1.170 +6 -6
+ NTP_4_2_7P457
+
+ ntpd/ntp.conf.5mdoc@1.170 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.conf.html@1.131 +1 -1
+ NTP_4_2_7P457
+
+ ntpd/ntp.conf.man.in@1.170 +6 -6
+ NTP_4_2_7P457
+
+ ntpd/ntp.conf.mdoc.in@1.170 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.keys.5man@1.168 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.keys.5mdoc@1.168 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.keys.html@1.132 +1 -1
+ NTP_4_2_7P457
+
+ ntpd/ntp.keys.man.in@1.168 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntp.keys.mdoc.in@1.168 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntpd-opts.c@1.470 +6 -6
+ NTP_4_2_7P457
+
+ ntpd/ntpd-opts.h@1.470 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntpd.1ntpdman@1.279 +6 -6
+ NTP_4_2_7P457
+
+ ntpd/ntpd.1ntpdmdoc@1.279 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntpd.html@1.126 +2 -2
+ NTP_4_2_7P457
+
+ ntpd/ntpd.man.in@1.279 +6 -6
+ NTP_4_2_7P457
+
+ ntpd/ntpd.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P457
+
+ ntpdc/invoke-ntpdc.texi@1.448 +2 -2
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc-opts.c@1.465 +6 -6
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc-opts.h@1.465 +2 -2
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc.1ntpdcman@1.279 +13 -13
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.279 +2 -2
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc.html@1.292 +2 -2
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc.man.in@1.279 +13 -13
+ NTP_4_2_7P457
+
+ ntpdc/ntpdc.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P457
+
+ ntpq/invoke-ntpq.texi@1.452 +28 -26
+ NTP_4_2_7P457
+
+ ntpq/ntpq-opts.c@1.468 +6 -6
+ NTP_4_2_7P457
+
+ ntpq/ntpq-opts.h@1.468 +2 -2
+ NTP_4_2_7P457
+
+ ntpq/ntpq.1ntpqman@1.280 +43 -34
+ NTP_4_2_7P457
+
+ ntpq/ntpq.1ntpqmdoc@1.280 +31 -28
+ NTP_4_2_7P457
+
+ ntpq/ntpq.html@1.123 +2 -2
+ NTP_4_2_7P457
+
+ ntpq/ntpq.man.in@1.280 +43 -34
+ NTP_4_2_7P457
+
+ ntpq/ntpq.mdoc.in@1.280 +31 -28
+ NTP_4_2_7P457
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.450 +2 -2
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.467 +6 -6
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.467 +2 -2
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.279 +6 -6
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.279 +2 -2
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd.html@1.121 +1 -1
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd.man.in@1.279 +6 -6
+ NTP_4_2_7P457
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P457
+
+ packageinfo.sh@1.461 +1 -1
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.41 +6 -6
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.41 +2 -2
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/calc_tickadj.html@1.41 +23 -35
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.40 +6 -6
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P457
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.43 +1 -1
+ NTP_4_2_7P457
+
+ scripts/invoke-plot_summary.texi@1.60 +1 -1
+ NTP_4_2_7P457
+
+ scripts/invoke-summary.texi@1.60 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.269 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait-opts@1.5 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.269 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.269 +2 -2
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait.html@1.286 +31 -49
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait.man.in@1.269 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.58 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep-opts@1.7 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.48 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.48 +2 -2
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep.html@1.59 +33 -44
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep.man.in@1.48 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P457
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.58 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace-opts@1.7 +1 -1
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.48 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.48 +2 -2
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace.html@1.59 +27 -36
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace.man.in@1.48 +6 -6
+ NTP_4_2_7P457
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P457
+
+ scripts/plot_summary-opts@1.7 +1 -1
+ NTP_4_2_7P457
+
+ scripts/plot_summary.1plot_summaryman@1.59 +6 -6
+ NTP_4_2_7P457
+
+ scripts/plot_summary.1plot_summarymdoc@1.59 +2 -2
+ NTP_4_2_7P457
+
+ scripts/plot_summary.html@1.60 +29 -47
+ NTP_4_2_7P457
+
+ scripts/plot_summary.man.in@1.59 +6 -6
+ NTP_4_2_7P457
+
+ scripts/plot_summary.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P457
+
+ scripts/summary-opts@1.7 +1 -1
+ NTP_4_2_7P457
+
+ scripts/summary.1summaryman@1.59 +6 -6
+ NTP_4_2_7P457
+
+ scripts/summary.1summarymdoc@1.59 +2 -2
+ NTP_4_2_7P457
+
+ scripts/summary.html@1.60 +27 -39
+ NTP_4_2_7P457
+
+ scripts/summary.man.in@1.59 +6 -6
+ NTP_4_2_7P457
+
+ scripts/summary.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P457
+
+ sntp/invoke-sntp.texi@1.447 +2 -2
+ NTP_4_2_7P457
+
+ sntp/sntp-opts.c@1.464 +6 -6
+ NTP_4_2_7P457
+
+ sntp/sntp-opts.h@1.464 +2 -2
+ NTP_4_2_7P457
+
+ sntp/sntp.1sntpman@1.282 +6 -6
+ NTP_4_2_7P457
+
+ sntp/sntp.1sntpmdoc@1.282 +2 -2
+ NTP_4_2_7P457
+
+ sntp/sntp.html@1.462 +2 -2
+ NTP_4_2_7P457
+
+ sntp/sntp.man.in@1.282 +6 -6
+ NTP_4_2_7P457
+
+ sntp/sntp.mdoc.in@1.282 +2 -2
+ NTP_4_2_7P457
+
+ util/invoke-ntp-keygen.texi@1.451 +2 -2
+ NTP_4_2_7P457
+
+ util/ntp-keygen-opts.c@1.467 +6 -6
+ NTP_4_2_7P457
+
+ util/ntp-keygen-opts.h@1.467 +2 -2
+ NTP_4_2_7P457
+
+ util/ntp-keygen.1ntp-keygenman@1.279 +6 -6
+ NTP_4_2_7P457
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.279 +2 -2
+ NTP_4_2_7P457
+
+ util/ntp-keygen.html@1.127 +2 -2
+ NTP_4_2_7P457
+
+ util/ntp-keygen.man.in@1.279 +6 -6
+ NTP_4_2_7P457
+
+ util/ntp-keygen.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P457
+
+ChangeSet@1.3171, 2014-08-09 07:02:16-04:00, stenn@deacon.udel.edu
+ Update .point-changed-filelist
+
+ .point-changed-filelist@1.25 +5 -0
+ Update .point-changed-filelist
+
+ChangeSet@1.3156.2.2, 2014-08-09 08:17:47+00:00, phk@psp-fb1.ntp.org
+ Typo fix
+
+ ChangeLog@1.1502.2.2 +1 -1
+ Typo fix
+
+ChangeSet@1.3168, 2014-08-09 08:00:44+00:00, stenn@psp-fb1.ntp.org
+ Added Brian Utterback to the copyright file
+
+ html/copyright.html@1.65 +2 -1
+ Added Brian Utterback to the copyright file
+
+ChangeSet@1.3167, 2014-08-09 07:51:01+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre14
+
+ scripts/calc_tickadj/calc_tickadj.html@1.40 +1 -1
+ autogen-5.18.4pre14
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.42 +3 -3
+ autogen-5.18.4pre14
+
+ scripts/invoke-plot_summary.texi@1.59 +10 -10
+ autogen-5.18.4pre14
+
+ scripts/invoke-summary.texi@1.59 +9 -9
+ autogen-5.18.4pre14
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.268 +3 -3
+ autogen-5.18.4pre14
+
+ scripts/ntp-wait/ntp-wait.html@1.285 +49 -31
+ autogen-5.18.4pre14
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.57 +3 -3
+ autogen-5.18.4pre14
+
+ scripts/ntpsweep/ntpsweep.html@1.58 +1 -1
+ autogen-5.18.4pre14
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.57 +3 -3
+ autogen-5.18.4pre14
+
+ scripts/ntptrace/ntptrace.html@1.58 +1 -1
+ autogen-5.18.4pre14
+
+ scripts/plot_summary.html@1.59 +1 -1
+ autogen-5.18.4pre14
+
+ scripts/summary.html@1.59 +1 -1
+ autogen-5.18.4pre14
+
+ChangeSet@1.3166, 2014-08-09 07:27:03+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre14
+
+ ntpd/ntpd-opts.c@1.469 +7 -7
+ autogen-5.18.4pre14
+
+ ntpd/ntpd-opts.h@1.469 +3 -3
+ autogen-5.18.4pre14
+
+ ntpd/ntpdsim-opts.c@1.26 +7 -7
+ autogen-5.18.4pre14
+
+ ntpd/ntpdsim-opts.h@1.26 +3 -3
+ autogen-5.18.4pre14
+
+ ntpdc/ntpdc-opts.c@1.464 +7 -7
+ autogen-5.18.4pre14
+
+ ntpdc/ntpdc-opts.h@1.464 +3 -3
+ autogen-5.18.4pre14
+
+ ntpq/ntpq-opts.c@1.467 +7 -7
+ autogen-5.18.4pre14
+
+ ntpq/ntpq-opts.h@1.467 +3 -3
+ autogen-5.18.4pre14
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.466 +7 -7
+ autogen-5.18.4pre14
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.466 +3 -3
+ autogen-5.18.4pre14
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.6 +2 -2
+ autogen-5.18.4pre14
+
+ scripts/ntp-wait/ntp-wait-opts@1.4 +2 -2
+ autogen-5.18.4pre14
+
+ scripts/ntpsweep/ntpsweep-opts@1.6 +2 -2
+ autogen-5.18.4pre14
+
+ scripts/ntptrace/ntptrace-opts@1.6 +2 -2
+ autogen-5.18.4pre14
+
+ scripts/plot_summary-opts@1.6 +2 -2
+ autogen-5.18.4pre14
+
+ scripts/summary-opts@1.6 +2 -2
+ autogen-5.18.4pre14
+
+ sntp/sntp-opts.c@1.463 +7 -7
+ autogen-5.18.4pre14
+
+ sntp/sntp-opts.h@1.463 +3 -3
+ autogen-5.18.4pre14
+
+ util/ntp-keygen-opts.c@1.466 +7 -7
+ autogen-5.18.4pre14
+
+ util/ntp-keygen-opts.h@1.466 +3 -3
+ autogen-5.18.4pre14
+
+ChangeSet@1.3165, 2014-08-09 07:16:25+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre14
+
+ ChangeLog@1.1508 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/Makefile.am@1.27 +3 -3
+ autogen-5.18.4pre14
+
+ sntp/libopts/ag-char-map.h@1.30 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/ao-strs.c@1.16 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/ao-strs.h@1.15 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/genshell.c@1.30 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/genshell.h@1.30 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/option-value-type.c@1.17 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/option-value-type.h@1.31 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/option-xat-attribute.c@1.17 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/option-xat-attribute.h@1.31 +1 -1
+ autogen-5.18.4pre14
+
+ sntp/libopts/proto.h@1.30 +1 -1
+ autogen-5.18.4pre14
+
+ChangeSet@1.3156.1.12, 2014-08-08 22:47:50+02:00, jnperlin@hydra.(none)
+ implement new logic to define difference limit and limit check with SHM clock (driver28)
+
+ html/drivers/driver28.html@1.16 +25 -5
+ updated docs to describe flag1 and time2
+
+ ntpd/refclock_shm.c@1.28 +125 -55
+ use time2 for difference limit and flag1 to disable distance limit check
+
+ChangeSet@1.3156.2.1, 2014-08-08 09:54:12+00:00, phk@psp-fb1.ntp.org
+ Pass the configration source into the parser as argument rather than through a global variable
+
+ ChangeLog@1.1502.2.1 +2 -0
+ Changelog entry
+
+ ntpd/ntp_config.c@1.319 +2 -5
+ Pass config file source to yyparse() as argument, not through global variable
+
+ ntpd/ntp_parser.c@1.86 +610 -558
+ Pass config file source to yyparse() as argument, not through global variable
+
+ ntpd/ntp_parser.h@1.52 +7 -9
+ Pass config file source to yyparse() as argument, not through global variable
+
+ ntpd/ntp_parser.y@1.80 +13 -13
+ Pass config file source to yyparse() as argument, not through global variable
+
+ ntpd/ntp_scanner.c@1.44 +13 -15
+ Pass config file source to yyparse() as argument, not through global variable
+
+ ntpd/ntp_scanner.h@1.18 +1 -5
+ Pass config file source to yyparse() as argument, not through global variable
+
+ChangeSet@1.3164, 2014-08-08 09:31:03+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre12
+
+ ntpd/ntpd-opts.c@1.468 +8 -8
+ autogen-5.18.4pre12
+
+ ntpd/ntpd-opts.h@1.468 +11 -11
+ autogen-5.18.4pre12
+
+ ntpd/ntpdsim-opts.c@1.25 +7 -7
+ autogen-5.18.4pre12
+
+ ntpd/ntpdsim-opts.h@1.25 +3 -3
+ autogen-5.18.4pre12
+
+ ntpdc/ntpdc-opts.c@1.463 +8 -8
+ autogen-5.18.4pre12
+
+ ntpdc/ntpdc-opts.h@1.463 +13 -13
+ autogen-5.18.4pre12
+
+ ntpq/ntpq-opts.c@1.466 +8 -8
+ autogen-5.18.4pre12
+
+ ntpq/ntpq-opts.h@1.466 +13 -13
+ autogen-5.18.4pre12
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.465 +8 -8
+ autogen-5.18.4pre12
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.465 +13 -13
+ autogen-5.18.4pre12
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.5 +2 -2
+ autogen-5.18.4pre12
+
+ scripts/ntpsweep/ntpsweep-opts@1.5 +2 -2
+ autogen-5.18.4pre12
+
+ scripts/ntptrace/ntptrace-opts@1.5 +2 -2
+ autogen-5.18.4pre12
+
+ scripts/plot_summary-opts@1.5 +2 -2
+ autogen-5.18.4pre12
+
+ scripts/summary-opts@1.5 +2 -2
+ autogen-5.18.4pre12
+
+ util/ntp-keygen-opts.c@1.465 +8 -8
+ autogen-5.18.4pre12
+
+ util/ntp-keygen-opts.h@1.465 +13 -13
+ autogen-5.18.4pre12
+
+ChangeSet@1.3163, 2014-08-08 09:24:12+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre12
+
+ sntp/libopts/Makefile.am@1.26 +19 -26
+ autogen-5.18.4pre12
+
+ sntp/libopts/ag-char-map.h@1.29 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/ao-strs.c@1.15 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/ao-strs.h@1.14 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/autoopts/options.h@1.28 +26 -5
+ autogen-5.18.4pre12
+
+ sntp/libopts/autoopts/usage-txt.h@1.28 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/genshell.c@1.29 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/genshell.h@1.29 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/m4/libopts.m4@1.32 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/option-value-type.c@1.16 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/option-value-type.h@1.30 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/option-xat-attribute.c@1.16 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/option-xat-attribute.h@1.30 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/proto.h@1.29 +1 -1
+ autogen-5.18.4pre12
+
+ sntp/libopts/version.c@1.18 +0 -2
+ autogen-5.18.4pre12
+
+ sntp/sntp-opts.c@1.462 +8 -8
+ autogen-5.18.4pre12
+
+ sntp/sntp-opts.h@1.462 +13 -13
+ autogen-5.18.4pre12
+
+ChangeSet@1.3156.1.11, 2014-08-07 21:24:29+02:00, jnperlin@hydra.(none)
+ [Bug 2622] Change SHM driver so TOY restricted API is not used any more. (Plus some minor cleanup in logic and flow control)
+
+ ChangeLog@1.1502.1.9 +3 -0
+ [Bug 2622] change SHM driver so TOY restricted API is not used any more. (Plus some minor cleanup in logic and flow control)
+
+ ntpd/refclock_shm.c@1.27 +106 -103
+ [Bug 2622] Change SHM driver so TOY restricted API is not used any more. (Plus some minor cleanup in logic and flow control)
+
+ChangeSet@1.3156.1.10, 2014-08-07 09:34:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P456
+ TAG: NTP_4_2_7P456
+
+ ChangeLog@1.1502.1.8 +1 -0
+ NTP_4_2_7P456
+
+ ntpd/invoke-ntp.conf.texi@1.135 +1 -1
+ NTP_4_2_7P456
+
+ ntpd/invoke-ntp.keys.texi@1.133 +1 -1
+ NTP_4_2_7P456
+
+ ntpd/invoke-ntpd.texi@1.449 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.conf.5man@1.169 +6 -6
+ NTP_4_2_7P456
+
+ ntpd/ntp.conf.5mdoc@1.169 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.conf.html@1.130 +1 -1
+ NTP_4_2_7P456
+
+ ntpd/ntp.conf.man.in@1.169 +6 -6
+ NTP_4_2_7P456
+
+ ntpd/ntp.conf.mdoc.in@1.169 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.keys.5man@1.167 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.keys.5mdoc@1.167 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.keys.html@1.131 +1 -1
+ NTP_4_2_7P456
+
+ ntpd/ntp.keys.man.in@1.167 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntp.keys.mdoc.in@1.167 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntpd-opts.c@1.464.1.3 +7 -7
+ NTP_4_2_7P456
+
+ ntpd/ntpd-opts.h@1.464.1.3 +3 -3
+ NTP_4_2_7P456
+
+ ntpd/ntpd.1ntpdman@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpd/ntpd.1ntpdmdoc@1.278 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntpd.html@1.125 +2 -2
+ NTP_4_2_7P456
+
+ ntpd/ntpd.man.in@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpd/ntpd.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P456
+
+ ntpdc/invoke-ntpdc.texi@1.447 +2 -2
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc-opts.c@1.459.1.3 +7 -7
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc-opts.h@1.459.1.3 +3 -3
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc.1ntpdcman@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.278 +2 -2
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc.html@1.291 +2 -2
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc.man.in@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpdc/ntpdc.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P456
+
+ ntpq/invoke-ntpq.texi@1.448.1.3 +2 -2
+ NTP_4_2_7P456
+
+ ntpq/ntpq-opts.c@1.462.1.3 +7 -7
+ NTP_4_2_7P456
+
+ ntpq/ntpq-opts.h@1.462.1.3 +3 -3
+ NTP_4_2_7P456
+
+ ntpq/ntpq.1ntpqman@1.276.1.3 +6 -6
+ NTP_4_2_7P456
+
+ ntpq/ntpq.1ntpqmdoc@1.276.1.3 +2 -2
+ NTP_4_2_7P456
+
+ ntpq/ntpq.html@1.122 +2 -2
+ NTP_4_2_7P456
+
+ ntpq/ntpq.man.in@1.276.1.3 +6 -6
+ NTP_4_2_7P456
+
+ ntpq/ntpq.mdoc.in@1.276.1.3 +2 -2
+ NTP_4_2_7P456
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.449 +2 -2
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.461.1.3 +7 -7
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.461.1.3 +3 -3
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.278 +2 -2
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd.html@1.120 +1 -1
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd.man.in@1.278 +6 -6
+ NTP_4_2_7P456
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P456
+
+ packageinfo.sh@1.460 +1 -1
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.40 +6 -6
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.40 +2 -2
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/calc_tickadj.html@1.36.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.39 +6 -6
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P456
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.38.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/invoke-plot_summary.texi@1.55.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/invoke-summary.texi@1.55.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.267 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.268 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.268 +2 -2
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/ntp-wait.html@1.284 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/ntp-wait.man.in@1.268 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.268 +2 -2
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.53.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.47 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.47 +2 -2
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/ntpsweep.html@1.54.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/ntpsweep.man.in@1.47 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P456
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.53.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.47 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.47 +2 -2
+ NTP_4_2_7P456
+
+ scripts/ntptrace/ntptrace.html@1.54.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/ntptrace/ntptrace.man.in@1.47 +6 -6
+ NTP_4_2_7P456
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P456
+
+ scripts/plot_summary.1plot_summaryman@1.58 +6 -6
+ NTP_4_2_7P456
+
+ scripts/plot_summary.1plot_summarymdoc@1.58 +2 -2
+ NTP_4_2_7P456
+
+ scripts/plot_summary.html@1.55.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/plot_summary.man.in@1.58 +6 -6
+ NTP_4_2_7P456
+
+ scripts/plot_summary.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P456
+
+ scripts/summary.1summaryman@1.58 +6 -6
+ NTP_4_2_7P456
+
+ scripts/summary.1summarymdoc@1.58 +2 -2
+ NTP_4_2_7P456
+
+ scripts/summary.html@1.55.1.3 +1 -1
+ NTP_4_2_7P456
+
+ scripts/summary.man.in@1.58 +6 -6
+ NTP_4_2_7P456
+
+ scripts/summary.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P456
+
+ sntp/invoke-sntp.texi@1.446 +2 -2
+ NTP_4_2_7P456
+
+ sntp/sntp-opts.c@1.458.1.3 +7 -7
+ NTP_4_2_7P456
+
+ sntp/sntp-opts.h@1.458.1.3 +3 -3
+ NTP_4_2_7P456
+
+ sntp/sntp.1sntpman@1.281 +6 -6
+ NTP_4_2_7P456
+
+ sntp/sntp.1sntpmdoc@1.281 +2 -2
+ NTP_4_2_7P456
+
+ sntp/sntp.html@1.461 +2 -2
+ NTP_4_2_7P456
+
+ sntp/sntp.man.in@1.281 +6 -6
+ NTP_4_2_7P456
+
+ sntp/sntp.mdoc.in@1.281 +2 -2
+ NTP_4_2_7P456
+
+ util/invoke-ntp-keygen.texi@1.450 +2 -2
+ NTP_4_2_7P456
+
+ util/ntp-keygen-opts.c@1.461.1.3 +7 -7
+ NTP_4_2_7P456
+
+ util/ntp-keygen-opts.h@1.461.1.3 +3 -3
+ NTP_4_2_7P456
+
+ util/ntp-keygen.1ntp-keygenman@1.278 +13 -13
+ NTP_4_2_7P456
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.278 +2 -2
+ NTP_4_2_7P456
+
+ util/ntp-keygen.html@1.126 +2 -2
+ NTP_4_2_7P456
+
+ util/ntp-keygen.man.in@1.278 +13 -13
+ NTP_4_2_7P456
+
+ util/ntp-keygen.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P456
+
+ChangeSet@1.3156.1.9, 2014-08-07 07:07:31+00:00, stenn@psp-fb1.ntp.org
+ CID 739722: Change the way the extention and MAC fields are processed
+
+ ChangeLog@1.1502.1.7 +1 -0
+ CID 739722: Change the way the extention and MAC fields are processed
+
+ sntp/networking.c@1.64 +6 -6
+ CID 739722: Change the way the extention and MAC fields are processed
+
+ChangeSet@1.3156.1.8, 2014-08-06 22:22:18+02:00, jnperlin@hydra.(none)
+ Work around Coverity issue over mismatch of formal and paket layout.
+
+ sntp/networking.c@1.63 +47 -24
+ Move skipping over extension fields into a pointer-based separate function.
+ Should deal with coverity issue with formal/actual structure layout.
+ Also easier to read.
+
+ChangeSet@1.3156.1.7, 2014-08-03 09:34:31+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P455
+ TAG: NTP_4_2_7P455
+
+ ChangeLog@1.1502.1.6 +1 -0
+ NTP_4_2_7P455
+
+ ntpd/invoke-ntp.conf.texi@1.134 +1 -1
+ NTP_4_2_7P455
+
+ ntpd/invoke-ntp.keys.texi@1.132 +1 -1
+ NTP_4_2_7P455
+
+ ntpd/invoke-ntpd.texi@1.448 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.conf.5man@1.168 +6 -6
+ NTP_4_2_7P455
+
+ ntpd/ntp.conf.5mdoc@1.168 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.conf.html@1.129 +1 -1
+ NTP_4_2_7P455
+
+ ntpd/ntp.conf.man.in@1.168 +6 -6
+ NTP_4_2_7P455
+
+ ntpd/ntp.conf.mdoc.in@1.168 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.keys.5man@1.166 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.keys.5mdoc@1.166 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.keys.html@1.130 +1 -1
+ NTP_4_2_7P455
+
+ ntpd/ntp.keys.man.in@1.166 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntp.keys.mdoc.in@1.166 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntpd-opts.c@1.464.1.2 +7 -7
+ NTP_4_2_7P455
+
+ ntpd/ntpd-opts.h@1.464.1.2 +3 -3
+ NTP_4_2_7P455
+
+ ntpd/ntpd.1ntpdman@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpd/ntpd.1ntpdmdoc@1.277 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntpd.html@1.124 +2 -2
+ NTP_4_2_7P455
+
+ ntpd/ntpd.man.in@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpd/ntpd.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P455
+
+ ntpdc/invoke-ntpdc.texi@1.446 +2 -2
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc-opts.c@1.459.1.2 +7 -7
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc-opts.h@1.459.1.2 +3 -3
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc.1ntpdcman@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.277 +2 -2
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc.html@1.290 +2 -2
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc.man.in@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpdc/ntpdc.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P455
+
+ ntpq/invoke-ntpq.texi@1.448.1.2 +2 -2
+ NTP_4_2_7P455
+
+ ntpq/ntpq-opts.c@1.462.1.2 +7 -7
+ NTP_4_2_7P455
+
+ ntpq/ntpq-opts.h@1.462.1.2 +3 -3
+ NTP_4_2_7P455
+
+ ntpq/ntpq.1ntpqman@1.276.1.2 +6 -6
+ NTP_4_2_7P455
+
+ ntpq/ntpq.1ntpqmdoc@1.276.1.2 +2 -2
+ NTP_4_2_7P455
+
+ ntpq/ntpq.html@1.121 +2 -2
+ NTP_4_2_7P455
+
+ ntpq/ntpq.man.in@1.276.1.2 +6 -6
+ NTP_4_2_7P455
+
+ ntpq/ntpq.mdoc.in@1.276.1.2 +2 -2
+ NTP_4_2_7P455
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.448 +2 -2
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.461.1.2 +7 -7
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.461.1.2 +3 -3
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.277 +2 -2
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd.html@1.119 +1 -1
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd.man.in@1.277 +6 -6
+ NTP_4_2_7P455
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P455
+
+ packageinfo.sh@1.459 +1 -1
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.39 +6 -6
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.39 +2 -2
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/calc_tickadj.html@1.36.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.38 +6 -6
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P455
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.38.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/invoke-plot_summary.texi@1.55.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/invoke-summary.texi@1.55.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.266 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.267 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.267 +2 -2
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/ntp-wait.html@1.283 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/ntp-wait.man.in@1.267 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.53.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.46 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.46 +2 -2
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/ntpsweep.html@1.54.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/ntpsweep.man.in@1.46 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P455
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.53.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.46 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.46 +2 -2
+ NTP_4_2_7P455
+
+ scripts/ntptrace/ntptrace.html@1.54.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/ntptrace/ntptrace.man.in@1.46 +6 -6
+ NTP_4_2_7P455
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P455
+
+ scripts/plot_summary.1plot_summaryman@1.57 +6 -6
+ NTP_4_2_7P455
+
+ scripts/plot_summary.1plot_summarymdoc@1.57 +2 -2
+ NTP_4_2_7P455
+
+ scripts/plot_summary.html@1.55.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/plot_summary.man.in@1.57 +6 -6
+ NTP_4_2_7P455
+
+ scripts/plot_summary.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P455
+
+ scripts/summary.1summaryman@1.57 +13 -13
+ NTP_4_2_7P455
+
+ scripts/summary.1summarymdoc@1.57 +2 -2
+ NTP_4_2_7P455
+
+ scripts/summary.html@1.55.1.2 +1 -1
+ NTP_4_2_7P455
+
+ scripts/summary.man.in@1.57 +13 -13
+ NTP_4_2_7P455
+
+ scripts/summary.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P455
+
+ sntp/invoke-sntp.texi@1.445 +2 -2
+ NTP_4_2_7P455
+
+ sntp/sntp-opts.c@1.458.1.2 +7 -7
+ NTP_4_2_7P455
+
+ sntp/sntp-opts.h@1.458.1.2 +3 -3
+ NTP_4_2_7P455
+
+ sntp/sntp.1sntpman@1.280 +6 -6
+ NTP_4_2_7P455
+
+ sntp/sntp.1sntpmdoc@1.280 +2 -2
+ NTP_4_2_7P455
+
+ sntp/sntp.html@1.460 +2 -2
+ NTP_4_2_7P455
+
+ sntp/sntp.man.in@1.280 +6 -6
+ NTP_4_2_7P455
+
+ sntp/sntp.mdoc.in@1.280 +2 -2
+ NTP_4_2_7P455
+
+ util/invoke-ntp-keygen.texi@1.449 +2 -2
+ NTP_4_2_7P455
+
+ util/ntp-keygen-opts.c@1.461.1.2 +7 -7
+ NTP_4_2_7P455
+
+ util/ntp-keygen-opts.h@1.461.1.2 +3 -3
+ NTP_4_2_7P455
+
+ util/ntp-keygen.1ntp-keygenman@1.277 +13 -13
+ NTP_4_2_7P455
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.277 +2 -2
+ NTP_4_2_7P455
+
+ util/ntp-keygen.html@1.125 +2 -2
+ NTP_4_2_7P455
+
+ util/ntp-keygen.man.in@1.277 +13 -13
+ NTP_4_2_7P455
+
+ util/ntp-keygen.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P455
+
+ChangeSet@1.3156.1.6, 2014-08-03 05:03:03+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors
+
+ ChangeLog@1.1502.1.5 +1 -0
+ [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.12 +14 -17
+ [Bug 2565] ntpd sometimes logs unexpected getifaddrs() errors
+
+ChangeSet@1.3156.1.5, 2014-08-02 19:56:24-04:00, stenn@deacon.udel.edu
+ CID 739722: Clean up the definition of the exten field of struct pkt
+
+ ChangeLog@1.1502.1.4 +1 -1
+ CID 739722: Clean up the definition of the exten field of struct pkt
+
+ChangeSet@1.3156.1.4, 2014-08-02 23:44:12+00:00, stenn@psp-fb1.ntp.org
+ Clean up the definition of the exten field of struct pkt
+
+ ChangeLog@1.1502.1.3 +1 -0
+ Clean up the definition of the exten field of struct pkt
+
+ChangeSet@1.3156.1.3, 2014-08-02 13:15:10+02:00, jnperlin@hydra.(none)
+ make consistent layout for 'struct pkt'
+
+ include/ntp.h@1.209 +9 -3
+ make consistent layout for 'struct pkt'
+
+ libntp/work_thread.c@1.17 +1 -1
+ fix minor 64-bit casting issue for 'thread_exit()' macro
+
+ sntp/main.c@1.93 +2 -6
+ make consistent layout for 'struct pkt'
+
+ChangeSet@1.3156.1.2, 2014-07-30 09:34:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P454
+ TAG: NTP_4_2_7P454
+
+ ChangeLog@1.1502.1.2 +1 -0
+ NTP_4_2_7P454
+
+ ntpd/invoke-ntp.conf.texi@1.133 +1 -1
+ NTP_4_2_7P454
+
+ ntpd/invoke-ntp.keys.texi@1.131 +1 -1
+ NTP_4_2_7P454
+
+ ntpd/invoke-ntpd.texi@1.447 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.conf.5man@1.167 +6 -6
+ NTP_4_2_7P454
+
+ ntpd/ntp.conf.5mdoc@1.167 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.conf.html@1.128 +1 -1
+ NTP_4_2_7P454
+
+ ntpd/ntp.conf.man.in@1.167 +6 -6
+ NTP_4_2_7P454
+
+ ntpd/ntp.conf.mdoc.in@1.167 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.keys.5man@1.165 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.keys.5mdoc@1.165 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.keys.html@1.129 +1 -1
+ NTP_4_2_7P454
+
+ ntpd/ntp.keys.man.in@1.165 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntp.keys.mdoc.in@1.165 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntpd-opts.c@1.464.1.1 +7 -7
+ NTP_4_2_7P454
+
+ ntpd/ntpd-opts.h@1.464.1.1 +3 -3
+ NTP_4_2_7P454
+
+ ntpd/ntpd.1ntpdman@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpd/ntpd.1ntpdmdoc@1.276 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntpd.html@1.123 +2 -2
+ NTP_4_2_7P454
+
+ ntpd/ntpd.man.in@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpd/ntpd.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P454
+
+ ntpdc/invoke-ntpdc.texi@1.445 +2 -2
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc-opts.c@1.459.1.1 +7 -7
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc-opts.h@1.459.1.1 +3 -3
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc.1ntpdcman@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.276 +2 -2
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc.html@1.289 +2 -2
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc.man.in@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpdc/ntpdc.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P454
+
+ ntpq/invoke-ntpq.texi@1.448.1.1 +2 -2
+ NTP_4_2_7P454
+
+ ntpq/ntpq-opts.c@1.462.1.1 +7 -7
+ NTP_4_2_7P454
+
+ ntpq/ntpq-opts.h@1.462.1.1 +3 -3
+ NTP_4_2_7P454
+
+ ntpq/ntpq.1ntpqman@1.276.1.1 +6 -6
+ NTP_4_2_7P454
+
+ ntpq/ntpq.1ntpqmdoc@1.276.1.1 +2 -2
+ NTP_4_2_7P454
+
+ ntpq/ntpq.html@1.120 +2 -2
+ NTP_4_2_7P454
+
+ ntpq/ntpq.man.in@1.276.1.1 +6 -6
+ NTP_4_2_7P454
+
+ ntpq/ntpq.mdoc.in@1.276.1.1 +2 -2
+ NTP_4_2_7P454
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.447 +2 -2
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.461.1.1 +7 -7
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.461.1.1 +3 -3
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.276 +2 -2
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd.html@1.118 +1 -1
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd.man.in@1.276 +6 -6
+ NTP_4_2_7P454
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P454
+
+ packageinfo.sh@1.458 +1 -1
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.38 +6 -6
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.38 +2 -2
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/calc_tickadj.html@1.36.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.37 +6 -6
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P454
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.38.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/invoke-plot_summary.texi@1.55.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/invoke-summary.texi@1.55.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.265 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.266 +13 -13
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.266 +2 -2
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/ntp-wait.html@1.282 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/ntp-wait.man.in@1.266 +13 -13
+ NTP_4_2_7P454
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.53.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.45 +6 -6
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.45 +2 -2
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/ntpsweep.html@1.54.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/ntpsweep.man.in@1.45 +6 -6
+ NTP_4_2_7P454
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P454
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.53.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.45 +6 -6
+ NTP_4_2_7P454
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.45 +2 -2
+ NTP_4_2_7P454
+
+ scripts/ntptrace/ntptrace.html@1.54.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/ntptrace/ntptrace.man.in@1.45 +6 -6
+ NTP_4_2_7P454
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P454
+
+ scripts/plot_summary.1plot_summaryman@1.56 +6 -6
+ NTP_4_2_7P454
+
+ scripts/plot_summary.1plot_summarymdoc@1.56 +2 -2
+ NTP_4_2_7P454
+
+ scripts/plot_summary.html@1.55.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/plot_summary.man.in@1.56 +6 -6
+ NTP_4_2_7P454
+
+ scripts/plot_summary.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P454
+
+ scripts/summary.1summaryman@1.56 +13 -13
+ NTP_4_2_7P454
+
+ scripts/summary.1summarymdoc@1.56 +2 -2
+ NTP_4_2_7P454
+
+ scripts/summary.html@1.55.1.1 +1 -1
+ NTP_4_2_7P454
+
+ scripts/summary.man.in@1.56 +13 -13
+ NTP_4_2_7P454
+
+ scripts/summary.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P454
+
+ sntp/invoke-sntp.texi@1.444 +2 -2
+ NTP_4_2_7P454
+
+ sntp/sntp-opts.c@1.458.1.1 +7 -7
+ NTP_4_2_7P454
+
+ sntp/sntp-opts.h@1.458.1.1 +3 -3
+ NTP_4_2_7P454
+
+ sntp/sntp.1sntpman@1.279 +6 -6
+ NTP_4_2_7P454
+
+ sntp/sntp.1sntpmdoc@1.279 +2 -2
+ NTP_4_2_7P454
+
+ sntp/sntp.html@1.459 +2 -2
+ NTP_4_2_7P454
+
+ sntp/sntp.man.in@1.279 +6 -6
+ NTP_4_2_7P454
+
+ sntp/sntp.mdoc.in@1.279 +2 -2
+ NTP_4_2_7P454
+
+ util/invoke-ntp-keygen.texi@1.448 +2 -2
+ NTP_4_2_7P454
+
+ util/ntp-keygen-opts.c@1.461.1.1 +7 -7
+ NTP_4_2_7P454
+
+ util/ntp-keygen-opts.h@1.461.1.1 +3 -3
+ NTP_4_2_7P454
+
+ util/ntp-keygen.1ntp-keygenman@1.276 +6 -6
+ NTP_4_2_7P454
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.276 +2 -2
+ NTP_4_2_7P454
+
+ util/ntp-keygen.html@1.124 +2 -2
+ NTP_4_2_7P454
+
+ util/ntp-keygen.man.in@1.276 +6 -6
+ NTP_4_2_7P454
+
+ util/ntp-keygen.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P454
+
+ChangeSet@1.3156.1.1, 2014-07-29 20:35:32+02:00, jnperlin@hydra.(none)
+ [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour
+
+ ChangeLog@1.1502.1.1 +1 -0
+ [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour
+
+ ntpd/ntp_monitor.c@1.41 +8 -7
+ [Bug 2628] 'mon_getmoremem()' relies on undefined behaviour
+
+ChangeSet@1.3160, 2014-07-20 09:44:32+00:00, stenn@psp-fb1.ntp.org
+ autogen-5.18.4pre9
+
+ ntpd/ntpd-opts.c@1.465 +2 -2
+ autogen-5.18.4pre9
+
+ ntpd/ntpd-opts.h@1.465 +9 -9
+ autogen-5.18.4pre9
+
+ ntpd/ntpdsim-opts.c@1.24 +11 -11
+ autogen-5.18.4pre9
+
+ ntpd/ntpdsim-opts.h@1.24 +14 -14
+ autogen-5.18.4pre9
+
+ ntpdc/ntpdc-opts.c@1.460 +2 -2
+ autogen-5.18.4pre9
+
+ ntpdc/ntpdc-opts.h@1.460 +11 -11
+ autogen-5.18.4pre9
+
+ ntpq/invoke-ntpq.texi@1.449 +27 -25
+ autogen-5.18.4pre9
+
+ ntpq/ntpq-opts.c@1.463 +2 -2
+ autogen-5.18.4pre9
+
+ ntpq/ntpq-opts.h@1.463 +11 -11
+ autogen-5.18.4pre9
+
+ ntpq/ntpq.1ntpqman@1.277 +40 -60
+ autogen-5.18.4pre9
+
+ ntpq/ntpq.1ntpqmdoc@1.277 +31 -47
+ autogen-5.18.4pre9
+
+ ntpq/ntpq.man.in@1.277 +40 -60
+ autogen-5.18.4pre9
+
+ ntpq/ntpq.mdoc.in@1.277 +31 -47
+ autogen-5.18.4pre9
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.462 +2 -2
+ autogen-5.18.4pre9
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.462 +11 -11
+ autogen-5.18.4pre9
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.4 +6 -6
+ autogen-5.18.4pre9
+
+ scripts/calc_tickadj/calc_tickadj.html@1.37 +35 -23
+ autogen-5.18.4pre9
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.39 +3 -3
+ autogen-5.18.4pre9
+
+ scripts/invoke-plot_summary.texi@1.56 +10 -10
+ autogen-5.18.4pre9
+
+ scripts/invoke-summary.texi@1.56 +9 -9
+ autogen-5.18.4pre9
+
+ scripts/ntp-wait/ntp-wait-opts@1.3 +6 -6
+ autogen-5.18.4pre9
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.54 +3 -3
+ autogen-5.18.4pre9
+
+ scripts/ntpsweep/ntpsweep-opts@1.4 +6 -11
+ autogen-5.18.4pre9
+
+ scripts/ntpsweep/ntpsweep.html@1.55 +44 -33
+ autogen-5.18.4pre9
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.54 +3 -3
+ autogen-5.18.4pre9
+
+ scripts/ntptrace/ntptrace-opts@1.4 +6 -11
+ autogen-5.18.4pre9
+
+ scripts/ntptrace/ntptrace.html@1.55 +36 -27
+ autogen-5.18.4pre9
+
+ scripts/plot_summary-opts@1.4 +13 -13
+ autogen-5.18.4pre9
+
+ scripts/plot_summary.html@1.56 +54 -36
+ autogen-5.18.4pre9
+
+ scripts/summary-opts@1.4 +12 -12
+ autogen-5.18.4pre9
+
+ scripts/summary.html@1.56 +45 -33
+ autogen-5.18.4pre9
+
+ sntp/sntp-opts.c@1.459 +2 -2
+ autogen-5.18.4pre9
+
+ sntp/sntp-opts.h@1.459 +11 -11
+ autogen-5.18.4pre9
+
+ util/ntp-keygen-opts.c@1.462 +2 -2
+ autogen-5.18.4pre9
+
+ util/ntp-keygen-opts.h@1.462 +11 -11
+ autogen-5.18.4pre9
+
+ChangeSet@1.3159, 2014-07-20 09:34:20+00:00, stenn@psp-fb1.ntp.org
+ Fix nits in the ntpq man page
+
+ ChangeLog@1.1505 +1 -1
+ Fix nits in the ntpq man page
+
+ ntpq/ntpq-opts.def@1.19 +28 -28
+ Fix nits in the ntpq man page
+
+ChangeSet@1.3158, 2014-07-20 07:31:46+00:00, stenn@psp-deb1.ntp.org
+ Fix a nit in the ntpq man page
+
+ ChangeLog@1.1504 +1 -0
+ Fix a nit in the ntpq man page
+
+ ntpq/ntpq-opts.def@1.18 +1 -1
+ Fix a nit in the ntpq man page
+
+ChangeSet@1.3157, 2014-07-20 07:30:06+00:00, stenn@psp-deb1.ntp.org
+ autogen-5.18.4pre9
+
+ ChangeLog@1.1503 +1 -0
+ autogen-5.18.4pre9
+
+ sntp/libopts/Makefile.am@1.25 +52 -16
+ autogen-5.18.4pre9
+
+ sntp/libopts/ag-char-map.h@1.28 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/ao-strs.c@1.14 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/ao-strs.h@1.13 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/autoopts.h@1.18 +1 -0
+ autogen-5.18.4pre9
+
+ sntp/libopts/autoopts/options.h@1.27 +6 -4
+ autogen-5.18.4pre9
+
+ sntp/libopts/autoopts/usage-txt.h@1.27 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/compat/_Noreturn.h@1.1 +10 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen-5.18.4/sntp/libopts/compat/_Noreturn.h
+
+ sntp/libopts/compat/_Noreturn.h@1.0 +0 -0
+
+ sntp/libopts/genshell.c@1.28 +2 -2
+ autogen-5.18.4pre9
+
+ sntp/libopts/genshell.h@1.28 +9 -9
+ autogen-5.18.4pre9
+
+ sntp/libopts/intprops.h@1.1 +320 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen-5.18.4/sntp/libopts/intprops.h
+
+ sntp/libopts/intprops.h@1.0 +0 -0
+
+ sntp/libopts/m4/libopts.m4@1.31 +2 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/m4/stdnoreturn.m4@1.1 +41 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen-5.18.4/sntp/libopts/m4/stdnoreturn.m4
+
+ sntp/libopts/m4/stdnoreturn.m4@1.0 +0 -0
+
+ sntp/libopts/makeshell.c@1.18 +3 -3
+ autogen-5.18.4pre9
+
+ sntp/libopts/option-value-type.c@1.15 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/option-value-type.h@1.29 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/option-xat-attribute.c@1.15 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/option-xat-attribute.h@1.29 +1 -1
+ autogen-5.18.4pre9
+
+ sntp/libopts/parse-duration.c@1.12 +6 -3
+ autogen-5.18.4pre9
+
+ sntp/libopts/proto.h@1.28 +4 -4
+ autogen-5.18.4pre9
+
+ sntp/libopts/stdnoreturn.in.h@1.1 +50 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen-5.18.4/sntp/libopts/stdnoreturn.in.h
+
+ sntp/libopts/stdnoreturn.in.h@1.0 +0 -0
+
+ sntp/libopts/version.c@1.17 +24 -4
+ autogen-5.18.4pre9
+
+ChangeSet@1.3156, 2014-07-19 09:33:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P453
+ TAG: NTP_4_2_7P453
+
+ ChangeLog@1.1502 +1 -0
+ NTP_4_2_7P453
+
+ ntpd/invoke-ntp.conf.texi@1.132 +1 -1
+ NTP_4_2_7P453
+
+ ntpd/invoke-ntp.keys.texi@1.130 +1 -1
+ NTP_4_2_7P453
+
+ ntpd/invoke-ntpd.texi@1.446 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.conf.5man@1.166 +6 -6
+ NTP_4_2_7P453
+
+ ntpd/ntp.conf.5mdoc@1.166 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.conf.html@1.127 +1 -1
+ NTP_4_2_7P453
+
+ ntpd/ntp.conf.man.in@1.166 +6 -6
+ NTP_4_2_7P453
+
+ ntpd/ntp.conf.mdoc.in@1.166 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.keys.5man@1.164 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.keys.5mdoc@1.164 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.keys.html@1.128 +1 -1
+ NTP_4_2_7P453
+
+ ntpd/ntp.keys.man.in@1.164 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntp.keys.mdoc.in@1.164 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntpd-opts.c@1.464 +7 -7
+ NTP_4_2_7P453
+
+ ntpd/ntpd-opts.h@1.464 +3 -3
+ NTP_4_2_7P453
+
+ ntpd/ntpd.1ntpdman@1.275 +13 -13
+ NTP_4_2_7P453
+
+ ntpd/ntpd.1ntpdmdoc@1.275 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntpd.html@1.122 +2 -2
+ NTP_4_2_7P453
+
+ ntpd/ntpd.man.in@1.275 +13 -13
+ NTP_4_2_7P453
+
+ ntpd/ntpd.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P453
+
+ ntpdc/invoke-ntpdc.texi@1.444 +2 -2
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc-opts.c@1.459 +7 -7
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc-opts.h@1.459 +3 -3
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc.1ntpdcman@1.275 +6 -6
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.275 +2 -2
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc.html@1.288 +2 -2
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc.man.in@1.275 +6 -6
+ NTP_4_2_7P453
+
+ ntpdc/ntpdc.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P453
+
+ ntpq/invoke-ntpq.texi@1.448 +2 -2
+ NTP_4_2_7P453
+
+ ntpq/ntpq-opts.c@1.462 +7 -7
+ NTP_4_2_7P453
+
+ ntpq/ntpq-opts.h@1.462 +3 -3
+ NTP_4_2_7P453
+
+ ntpq/ntpq.1ntpqman@1.276 +6 -6
+ NTP_4_2_7P453
+
+ ntpq/ntpq.1ntpqmdoc@1.276 +2 -2
+ NTP_4_2_7P453
+
+ ntpq/ntpq.html@1.119 +2 -2
+ NTP_4_2_7P453
+
+ ntpq/ntpq.man.in@1.276 +6 -6
+ NTP_4_2_7P453
+
+ ntpq/ntpq.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P453
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.446 +2 -2
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.461 +7 -7
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.461 +3 -3
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.275 +6 -6
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.275 +2 -2
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd.html@1.117 +1 -1
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd.man.in@1.275 +6 -6
+ NTP_4_2_7P453
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P453
+
+ packageinfo.sh@1.457 +1 -1
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.37 +6 -6
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.37 +2 -2
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/calc_tickadj.html@1.36 +1 -1
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.36 +6 -6
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P453
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.38 +1 -1
+ NTP_4_2_7P453
+
+ scripts/invoke-plot_summary.texi@1.55 +1 -1
+ NTP_4_2_7P453
+
+ scripts/invoke-summary.texi@1.55 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.264 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.265 +13 -13
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.265 +2 -2
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/ntp-wait.html@1.281 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/ntp-wait.man.in@1.265 +13 -13
+ NTP_4_2_7P453
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.265 +2 -2
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.53 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.44 +6 -6
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.44 +2 -2
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/ntpsweep.html@1.54 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/ntpsweep.man.in@1.44 +6 -6
+ NTP_4_2_7P453
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P453
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.53 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.44 +6 -6
+ NTP_4_2_7P453
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.44 +2 -2
+ NTP_4_2_7P453
+
+ scripts/ntptrace/ntptrace.html@1.54 +1 -1
+ NTP_4_2_7P453
+
+ scripts/ntptrace/ntptrace.man.in@1.44 +6 -6
+ NTP_4_2_7P453
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P453
+
+ scripts/plot_summary.1plot_summaryman@1.55 +6 -6
+ NTP_4_2_7P453
+
+ scripts/plot_summary.1plot_summarymdoc@1.55 +2 -2
+ NTP_4_2_7P453
+
+ scripts/plot_summary.html@1.55 +1 -1
+ NTP_4_2_7P453
+
+ scripts/plot_summary.man.in@1.55 +6 -6
+ NTP_4_2_7P453
+
+ scripts/plot_summary.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P453
+
+ scripts/summary.1summaryman@1.55 +6 -6
+ NTP_4_2_7P453
+
+ scripts/summary.1summarymdoc@1.55 +2 -2
+ NTP_4_2_7P453
+
+ scripts/summary.html@1.55 +1 -1
+ NTP_4_2_7P453
+
+ scripts/summary.man.in@1.55 +6 -6
+ NTP_4_2_7P453
+
+ scripts/summary.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P453
+
+ sntp/invoke-sntp.texi@1.443 +2 -2
+ NTP_4_2_7P453
+
+ sntp/sntp-opts.c@1.458 +7 -7
+ NTP_4_2_7P453
+
+ sntp/sntp-opts.h@1.458 +3 -3
+ NTP_4_2_7P453
+
+ sntp/sntp.1sntpman@1.278 +6 -6
+ NTP_4_2_7P453
+
+ sntp/sntp.1sntpmdoc@1.278 +2 -2
+ NTP_4_2_7P453
+
+ sntp/sntp.html@1.458 +2 -2
+ NTP_4_2_7P453
+
+ sntp/sntp.man.in@1.278 +6 -6
+ NTP_4_2_7P453
+
+ sntp/sntp.mdoc.in@1.278 +2 -2
+ NTP_4_2_7P453
+
+ util/invoke-ntp-keygen.texi@1.447 +2 -2
+ NTP_4_2_7P453
+
+ util/ntp-keygen-opts.c@1.461 +7 -7
+ NTP_4_2_7P453
+
+ util/ntp-keygen-opts.h@1.461 +3 -3
+ NTP_4_2_7P453
+
+ util/ntp-keygen.1ntp-keygenman@1.275 +6 -6
+ NTP_4_2_7P453
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.275 +2 -2
+ NTP_4_2_7P453
+
+ util/ntp-keygen.html@1.123 +2 -2
+ NTP_4_2_7P453
+
+ util/ntp-keygen.man.in@1.275 +6 -6
+ NTP_4_2_7P453
+
+ util/ntp-keygen.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P453
+
+ChangeSet@1.3154, 2014-07-18 09:33:45+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P452
+ TAG: NTP_4_2_7P452
+
+ ChangeLog@1.1500 +1 -0
+ NTP_4_2_7P452
+
+ ntpd/invoke-ntp.conf.texi@1.131 +1 -1
+ NTP_4_2_7P452
+
+ ntpd/invoke-ntp.keys.texi@1.129 +1 -1
+ NTP_4_2_7P452
+
+ ntpd/invoke-ntpd.texi@1.445 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.conf.5man@1.165 +6 -6
+ NTP_4_2_7P452
+
+ ntpd/ntp.conf.5mdoc@1.165 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.conf.html@1.126 +1 -1
+ NTP_4_2_7P452
+
+ ntpd/ntp.conf.man.in@1.165 +6 -6
+ NTP_4_2_7P452
+
+ ntpd/ntp.conf.mdoc.in@1.165 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.keys.5man@1.163 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.keys.5mdoc@1.163 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.keys.html@1.127 +1 -1
+ NTP_4_2_7P452
+
+ ntpd/ntp.keys.man.in@1.163 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntp.keys.mdoc.in@1.163 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntpd-opts.c@1.463 +7 -7
+ NTP_4_2_7P452
+
+ ntpd/ntpd-opts.h@1.463 +3 -3
+ NTP_4_2_7P452
+
+ ntpd/ntpd.1ntpdman@1.274 +13 -13
+ NTP_4_2_7P452
+
+ ntpd/ntpd.1ntpdmdoc@1.274 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntpd.html@1.121 +2 -2
+ NTP_4_2_7P452
+
+ ntpd/ntpd.man.in@1.274 +13 -13
+ NTP_4_2_7P452
+
+ ntpd/ntpd.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P452
+
+ ntpdc/invoke-ntpdc.texi@1.443 +2 -2
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc-opts.c@1.458 +7 -7
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc-opts.h@1.458 +3 -3
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc.1ntpdcman@1.274 +6 -6
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.274 +2 -2
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc.html@1.287 +2 -2
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc.man.in@1.274 +6 -6
+ NTP_4_2_7P452
+
+ ntpdc/ntpdc.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P452
+
+ ntpq/invoke-ntpq.texi@1.447 +2 -2
+ NTP_4_2_7P452
+
+ ntpq/ntpq-opts.c@1.461 +7 -7
+ NTP_4_2_7P452
+
+ ntpq/ntpq-opts.h@1.461 +3 -3
+ NTP_4_2_7P452
+
+ ntpq/ntpq.1ntpqman@1.275 +6 -6
+ NTP_4_2_7P452
+
+ ntpq/ntpq.1ntpqmdoc@1.275 +2 -2
+ NTP_4_2_7P452
+
+ ntpq/ntpq.html@1.118 +2 -2
+ NTP_4_2_7P452
+
+ ntpq/ntpq.man.in@1.275 +6 -6
+ NTP_4_2_7P452
+
+ ntpq/ntpq.mdoc.in@1.275 +2 -2
+ NTP_4_2_7P452
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.445 +2 -2
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.460 +7 -7
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.460 +3 -3
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.274 +6 -6
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.274 +2 -2
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd.html@1.116 +1 -1
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd.man.in@1.274 +6 -6
+ NTP_4_2_7P452
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P452
+
+ packageinfo.sh@1.456 +1 -1
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.36 +6 -6
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.36 +2 -2
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/calc_tickadj.html@1.35 +1 -1
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.35 +6 -6
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P452
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.37 +1 -1
+ NTP_4_2_7P452
+
+ scripts/invoke-plot_summary.texi@1.54 +1 -1
+ NTP_4_2_7P452
+
+ scripts/invoke-summary.texi@1.54 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.263 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.264 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.264 +2 -2
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/ntp-wait.html@1.280 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/ntp-wait.man.in@1.264 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.52 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.43 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.43 +2 -2
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/ntpsweep.html@1.53 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/ntpsweep.man.in@1.43 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P452
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.52 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.43 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.43 +2 -2
+ NTP_4_2_7P452
+
+ scripts/ntptrace/ntptrace.html@1.53 +1 -1
+ NTP_4_2_7P452
+
+ scripts/ntptrace/ntptrace.man.in@1.43 +6 -6
+ NTP_4_2_7P452
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P452
+
+ scripts/plot_summary.1plot_summaryman@1.54 +6 -6
+ NTP_4_2_7P452
+
+ scripts/plot_summary.1plot_summarymdoc@1.54 +2 -2
+ NTP_4_2_7P452
+
+ scripts/plot_summary.html@1.54 +1 -1
+ NTP_4_2_7P452
+
+ scripts/plot_summary.man.in@1.54 +6 -6
+ NTP_4_2_7P452
+
+ scripts/plot_summary.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P452
+
+ scripts/summary.1summaryman@1.54 +6 -6
+ NTP_4_2_7P452
+
+ scripts/summary.1summarymdoc@1.54 +2 -2
+ NTP_4_2_7P452
+
+ scripts/summary.html@1.54 +1 -1
+ NTP_4_2_7P452
+
+ scripts/summary.man.in@1.54 +6 -6
+ NTP_4_2_7P452
+
+ scripts/summary.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P452
+
+ sntp/invoke-sntp.texi@1.442 +2 -2
+ NTP_4_2_7P452
+
+ sntp/sntp-opts.c@1.457 +7 -7
+ NTP_4_2_7P452
+
+ sntp/sntp-opts.h@1.457 +3 -3
+ NTP_4_2_7P452
+
+ sntp/sntp.1sntpman@1.277 +6 -6
+ NTP_4_2_7P452
+
+ sntp/sntp.1sntpmdoc@1.277 +2 -2
+ NTP_4_2_7P452
+
+ sntp/sntp.html@1.457 +2 -2
+ NTP_4_2_7P452
+
+ sntp/sntp.man.in@1.277 +6 -6
+ NTP_4_2_7P452
+
+ sntp/sntp.mdoc.in@1.277 +2 -2
+ NTP_4_2_7P452
+
+ util/invoke-ntp-keygen.texi@1.446 +2 -2
+ NTP_4_2_7P452
+
+ util/ntp-keygen-opts.c@1.460 +7 -7
+ NTP_4_2_7P452
+
+ util/ntp-keygen-opts.h@1.460 +3 -3
+ NTP_4_2_7P452
+
+ util/ntp-keygen.1ntp-keygenman@1.274 +6 -6
+ NTP_4_2_7P452
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.274 +2 -2
+ NTP_4_2_7P452
+
+ util/ntp-keygen.html@1.122 +2 -2
+ NTP_4_2_7P452
+
+ util/ntp-keygen.man.in@1.274 +6 -6
+ NTP_4_2_7P452
+
+ util/ntp-keygen.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P452
+
+ChangeSet@1.3153, 2014-07-18 04:36:57-04:00, stenn@deacon.udel.edu
+ Make all of the html/ .html files use the same format for "Last update"
+
+ ChangeLog@1.1499 +1 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/assoc.html@1.41 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/comdex.html@1.7 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/config.html@1.25 +3 -2
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/confopt.html@1.62 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/copyright.html@1.64 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/decode.html@1.25 +3 -2
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/discipline.html@1.10 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/discover.html@1.6 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver16.html@1.13 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver20.html@1.29 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver26.html@1.11 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver27.html@1.17 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver28.html@1.15 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver29.html@1.17 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver30.html@1.21 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver31.html@1.4 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver32.html@1.14 +3 -1
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver33.html@1.14 +3 -2
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver34.html@1.13 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver35.html@1.16 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver37.html@1.14 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver38.html@1.16 +3 -1
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver39.html@1.15 +3 -1
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver40.html@1.16 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver42.html@1.14 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver43.html@1.12 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver44.html@1.15 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver45.html@1.4 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver46.html@1.2 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver6.html@1.30 +2 -2
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver7.html@1.31 +2 -1
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver8.html@1.31 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/driver9.html@1.16 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/mx4200data.html@1.3 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/oncore-shmem.html@1.14 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/drivers/tf582_4.html@1.4 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/extern.html@1.21 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/filter.html@1.8 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/hints.html@1.20 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/hints/sco.html@1.12 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/hints/solaris.html@1.12 +4 -1
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/hints/vxworks.html@1.11 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/history.html@1.4 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/howto.html@1.25 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/huffpuff.html@1.6 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/kern.html@1.22 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/kernpps.html@1.5 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/keygen.html@1.34 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/leap.html@1.7 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/miscopt.html@1.78 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/monopt.html@1.38 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/msyslog.html@1.12 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntp-wait.html@1.2 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntpd.html@1.62 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntpdate.html@1.28 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntpdc.html@1.39 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntpdsim_new.html@1.9 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntpq.html@1.50 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/ntptrace.html@1.21 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/parsedata.html@1.14 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/parsenew.html@1.13 +3 -0
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/poll.html@1.5 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/pps.html@1.26 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/prefer.html@1.33 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/rate.html@1.13 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/rdebug.html@1.19 +4 -4
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/refclock.html@1.43 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/select.html@1.10 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/stats.html@1.3 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/tickadj.html@1.19 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/warp.html@1.24 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ html/xleave.html@1.10 +3 -3
+ Make all of the html/ .html files use the same format for "Last update"
+
+ChangeSet@1.3152, 2014-07-17 09:33:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P451
+ TAG: NTP_4_2_7P451
+
+ ChangeLog@1.1498 +1 -0
+ NTP_4_2_7P451
+
+ ntpd/invoke-ntp.conf.texi@1.130 +1 -1
+ NTP_4_2_7P451
+
+ ntpd/invoke-ntp.keys.texi@1.128 +1 -1
+ NTP_4_2_7P451
+
+ ntpd/invoke-ntpd.texi@1.444 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.conf.5man@1.164 +6 -6
+ NTP_4_2_7P451
+
+ ntpd/ntp.conf.5mdoc@1.164 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.conf.html@1.125 +1 -1
+ NTP_4_2_7P451
+
+ ntpd/ntp.conf.man.in@1.164 +6 -6
+ NTP_4_2_7P451
+
+ ntpd/ntp.conf.mdoc.in@1.164 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.keys.5man@1.162 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.keys.5mdoc@1.162 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.keys.html@1.126 +1 -1
+ NTP_4_2_7P451
+
+ ntpd/ntp.keys.man.in@1.162 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntp.keys.mdoc.in@1.162 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntpd-opts.c@1.462 +7 -7
+ NTP_4_2_7P451
+
+ ntpd/ntpd-opts.h@1.462 +3 -3
+ NTP_4_2_7P451
+
+ ntpd/ntpd.1ntpdman@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpd/ntpd.1ntpdmdoc@1.273 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntpd.html@1.120 +2 -2
+ NTP_4_2_7P451
+
+ ntpd/ntpd.man.in@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpd/ntpd.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P451
+
+ ntpdc/invoke-ntpdc.texi@1.442 +2 -2
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc-opts.c@1.457 +7 -7
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc-opts.h@1.457 +3 -3
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc.1ntpdcman@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.273 +2 -2
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc.html@1.286 +2 -2
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc.man.in@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpdc/ntpdc.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P451
+
+ ntpq/invoke-ntpq.texi@1.446 +2 -2
+ NTP_4_2_7P451
+
+ ntpq/ntpq-opts.c@1.460 +7 -7
+ NTP_4_2_7P451
+
+ ntpq/ntpq-opts.h@1.460 +3 -3
+ NTP_4_2_7P451
+
+ ntpq/ntpq.1ntpqman@1.274 +6 -6
+ NTP_4_2_7P451
+
+ ntpq/ntpq.1ntpqmdoc@1.274 +2 -2
+ NTP_4_2_7P451
+
+ ntpq/ntpq.html@1.117 +2 -2
+ NTP_4_2_7P451
+
+ ntpq/ntpq.man.in@1.274 +6 -6
+ NTP_4_2_7P451
+
+ ntpq/ntpq.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P451
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.444 +2 -2
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.459 +7 -7
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.459 +3 -3
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.273 +2 -2
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd.html@1.115 +1 -1
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd.man.in@1.273 +6 -6
+ NTP_4_2_7P451
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P451
+
+ packageinfo.sh@1.455 +1 -1
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.35 +6 -6
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.35 +2 -2
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/calc_tickadj.html@1.34 +1 -1
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.34 +6 -6
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P451
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.36 +1 -1
+ NTP_4_2_7P451
+
+ scripts/invoke-plot_summary.texi@1.53 +1 -1
+ NTP_4_2_7P451
+
+ scripts/invoke-summary.texi@1.53 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.262 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.263 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.263 +2 -2
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/ntp-wait.html@1.279 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/ntp-wait.man.in@1.263 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.51 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.42 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.42 +2 -2
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/ntpsweep.html@1.52 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/ntpsweep.man.in@1.42 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P451
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.51 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.42 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.42 +2 -2
+ NTP_4_2_7P451
+
+ scripts/ntptrace/ntptrace.html@1.52 +1 -1
+ NTP_4_2_7P451
+
+ scripts/ntptrace/ntptrace.man.in@1.42 +6 -6
+ NTP_4_2_7P451
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P451
+
+ scripts/plot_summary.1plot_summaryman@1.53 +6 -6
+ NTP_4_2_7P451
+
+ scripts/plot_summary.1plot_summarymdoc@1.53 +2 -2
+ NTP_4_2_7P451
+
+ scripts/plot_summary.html@1.53 +1 -1
+ NTP_4_2_7P451
+
+ scripts/plot_summary.man.in@1.53 +6 -6
+ NTP_4_2_7P451
+
+ scripts/plot_summary.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P451
+
+ scripts/summary.1summaryman@1.53 +6 -6
+ NTP_4_2_7P451
+
+ scripts/summary.1summarymdoc@1.53 +2 -2
+ NTP_4_2_7P451
+
+ scripts/summary.html@1.53 +1 -1
+ NTP_4_2_7P451
+
+ scripts/summary.man.in@1.53 +6 -6
+ NTP_4_2_7P451
+
+ scripts/summary.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P451
+
+ sntp/invoke-sntp.texi@1.441 +2 -2
+ NTP_4_2_7P451
+
+ sntp/sntp-opts.c@1.456 +7 -7
+ NTP_4_2_7P451
+
+ sntp/sntp-opts.h@1.456 +3 -3
+ NTP_4_2_7P451
+
+ sntp/sntp.1sntpman@1.276 +6 -6
+ NTP_4_2_7P451
+
+ sntp/sntp.1sntpmdoc@1.276 +2 -2
+ NTP_4_2_7P451
+
+ sntp/sntp.html@1.456 +2 -2
+ NTP_4_2_7P451
+
+ sntp/sntp.man.in@1.276 +6 -6
+ NTP_4_2_7P451
+
+ sntp/sntp.mdoc.in@1.276 +2 -2
+ NTP_4_2_7P451
+
+ util/invoke-ntp-keygen.texi@1.445 +2 -2
+ NTP_4_2_7P451
+
+ util/ntp-keygen-opts.c@1.459 +7 -7
+ NTP_4_2_7P451
+
+ util/ntp-keygen-opts.h@1.459 +3 -3
+ NTP_4_2_7P451
+
+ util/ntp-keygen.1ntp-keygenman@1.273 +6 -6
+ NTP_4_2_7P451
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.273 +2 -2
+ NTP_4_2_7P451
+
+ util/ntp-keygen.html@1.121 +2 -2
+ NTP_4_2_7P451
+
+ util/ntp-keygen.man.in@1.273 +6 -6
+ NTP_4_2_7P451
+
+ util/ntp-keygen.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P451
+
+ChangeSet@1.3151, 2014-07-17 06:13:14+00:00, stenn@psp-deb1.ntp.org
+ Fix the "Last update" entries in the html/ subtree
+
+ ChangeLog@1.1497 +1 -0
+ Fix the "Last update" entries in the html/ subtree
+
+ html/access.html@1.2 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/accopt.html@1.42 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/audio.html@1.23 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/authentic.html@1.14 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/authopt.html@1.74 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/autokey.html@1.22 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/bugs.html@1.7 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/build.html@1.27 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/clock.html@1.4 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/clockopt.html@1.24 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/cluster.html@1.9 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/debug.html@1.33 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver1.html@1.22 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver10.html@1.14 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver11.html@1.14 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver12.html@1.13 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver18.html@1.20 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver19.html@1.13 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver22.html@1.22 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver3.html@1.13 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver36.html@1.35 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver4.html@1.17 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver6.html@1.29 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/drivers/driver7.html@1.30 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/hints/winnt.html@1.24 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/index.html@1.47 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/ntp_conf.html@1.7 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/ntpdsim.html@1.9 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/ntptime.html@1.18 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/orphan.html@1.4 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/quick.html@1.25 +2 -2
+ Fix the "Last update" entries in the html/ subtree
+
+ html/release.html@1.43 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/sitemap.html@1.5 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ html/sntp.html@1.10 +1 -1
+ Fix the "Last update" entries in the html/ subtree
+
+ChangeSet@1.3148.1.1, 2014-07-17 00:02:39+02:00, jnperlin@hydra.(none)
+ [Bug 2597] leap file loose ends
+ - uniform log messages for timer and config triggered leap file loads
+ - timer triggered load errors only once per day
+
+ ChangeLog@1.1494.1.1 +4 -0
+ [Bug 2597] leap file loose ends
+ - uniform log messages for timer and config triggered leap file loads
+ - timer triggered load errors only once per day
+
+ ntpd/ntp_leapsec.c@1.13 +37 -32
+ [Bug 2597] file/stream load supports 'logall' flag to enable silent operation
+
+ ntpd/ntp_leapsec.h@1.8 +3 -2
+ [Bug 2597] file/stream load supports 'logall' flag to enable silent operation
+
+ ntpd/ntp_timer.c@1.82 +4 -4
+ [Bug 2597] proper setup for leap file check timer
+
+ ntpd/ntp_util.c@1.115 +32 -11
+ [Bug 2597] unified expiration check messages for timer and config triggered leap file load
+
+ChangeSet@1.3150, 2014-07-16 21:57:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P450
+ TAG: NTP_4_2_7P450
+
+ ChangeLog@1.1496 +1 -0
+ NTP_4_2_7P450
+
+ ntpd/invoke-ntp.conf.texi@1.129 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/invoke-ntp.keys.texi@1.127 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/invoke-ntpd.texi@1.443 +2 -2
+ NTP_4_2_7P450
+
+ ntpd/ntp.conf.5man@1.163 +6 -6
+ NTP_4_2_7P450
+
+ ntpd/ntp.conf.5mdoc@1.163 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntp.conf.html@1.124 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntp.conf.man.in@1.163 +6 -6
+ NTP_4_2_7P450
+
+ ntpd/ntp.conf.mdoc.in@1.163 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntp.keys.5man@1.161 +2 -2
+ NTP_4_2_7P450
+
+ ntpd/ntp.keys.5mdoc@1.161 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntp.keys.html@1.125 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntp.keys.man.in@1.161 +2 -2
+ NTP_4_2_7P450
+
+ ntpd/ntp.keys.mdoc.in@1.161 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntpd-opts.c@1.461 +7 -7
+ NTP_4_2_7P450
+
+ ntpd/ntpd-opts.h@1.461 +3 -3
+ NTP_4_2_7P450
+
+ ntpd/ntpd.1ntpdman@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpd/ntpd.1ntpdmdoc@1.272 +1 -1
+ NTP_4_2_7P450
+
+ ntpd/ntpd.html@1.119 +2 -2
+ NTP_4_2_7P450
+
+ ntpd/ntpd.man.in@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpd/ntpd.mdoc.in@1.272 +1 -1
+ NTP_4_2_7P450
+
+ ntpdc/invoke-ntpdc.texi@1.441 +2 -2
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc-opts.c@1.456 +7 -7
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc-opts.h@1.456 +3 -3
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc.1ntpdcman@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.272 +1 -1
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc.html@1.285 +2 -2
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc.man.in@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpdc/ntpdc.mdoc.in@1.272 +1 -1
+ NTP_4_2_7P450
+
+ ntpq/invoke-ntpq.texi@1.445 +2 -2
+ NTP_4_2_7P450
+
+ ntpq/ntpq-opts.c@1.459 +7 -7
+ NTP_4_2_7P450
+
+ ntpq/ntpq-opts.h@1.459 +3 -3
+ NTP_4_2_7P450
+
+ ntpq/ntpq.1ntpqman@1.273 +6 -6
+ NTP_4_2_7P450
+
+ ntpq/ntpq.1ntpqmdoc@1.273 +1 -1
+ NTP_4_2_7P450
+
+ ntpq/ntpq.html@1.116 +2 -2
+ NTP_4_2_7P450
+
+ ntpq/ntpq.man.in@1.273 +6 -6
+ NTP_4_2_7P450
+
+ ntpq/ntpq.mdoc.in@1.273 +1 -1
+ NTP_4_2_7P450
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.443 +2 -2
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.458 +7 -7
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.458 +3 -3
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.272 +1 -1
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd.html@1.114 +1 -1
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd.man.in@1.272 +6 -6
+ NTP_4_2_7P450
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.272 +1 -1
+ NTP_4_2_7P450
+
+ packageinfo.sh@1.454 +1 -1
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.34 +6 -6
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.34 +1 -1
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/calc_tickadj.html@1.33 +1 -1
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.33 +6 -6
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.34 +1 -1
+ NTP_4_2_7P450
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.35 +1 -1
+ NTP_4_2_7P450
+
+ scripts/invoke-plot_summary.texi@1.52 +1 -1
+ NTP_4_2_7P450
+
+ scripts/invoke-summary.texi@1.52 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.261 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.262 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.262 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/ntp-wait.html@1.278 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/ntp-wait.man.in@1.262 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.262 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.50 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.41 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.41 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/ntpsweep.html@1.51 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/ntpsweep.man.in@1.41 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.42 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.50 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.41 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.41 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntptrace/ntptrace.html@1.51 +1 -1
+ NTP_4_2_7P450
+
+ scripts/ntptrace/ntptrace.man.in@1.41 +6 -6
+ NTP_4_2_7P450
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.42 +1 -1
+ NTP_4_2_7P450
+
+ scripts/plot_summary.1plot_summaryman@1.52 +6 -6
+ NTP_4_2_7P450
+
+ scripts/plot_summary.1plot_summarymdoc@1.52 +2 -2
+ NTP_4_2_7P450
+
+ scripts/plot_summary.html@1.52 +1 -1
+ NTP_4_2_7P450
+
+ scripts/plot_summary.man.in@1.52 +6 -6
+ NTP_4_2_7P450
+
+ scripts/plot_summary.mdoc.in@1.52 +2 -2
+ NTP_4_2_7P450
+
+ scripts/summary.1summaryman@1.52 +6 -6
+ NTP_4_2_7P450
+
+ scripts/summary.1summarymdoc@1.52 +1 -1
+ NTP_4_2_7P450
+
+ scripts/summary.html@1.52 +1 -1
+ NTP_4_2_7P450
+
+ scripts/summary.man.in@1.52 +6 -6
+ NTP_4_2_7P450
+
+ scripts/summary.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P450
+
+ sntp/invoke-sntp.texi@1.440 +2 -2
+ NTP_4_2_7P450
+
+ sntp/sntp-opts.c@1.455 +7 -7
+ NTP_4_2_7P450
+
+ sntp/sntp-opts.h@1.455 +3 -3
+ NTP_4_2_7P450
+
+ sntp/sntp.1sntpman@1.275 +6 -6
+ NTP_4_2_7P450
+
+ sntp/sntp.1sntpmdoc@1.275 +1 -1
+ NTP_4_2_7P450
+
+ sntp/sntp.html@1.455 +2 -2
+ NTP_4_2_7P450
+
+ sntp/sntp.man.in@1.275 +6 -6
+ NTP_4_2_7P450
+
+ sntp/sntp.mdoc.in@1.275 +1 -1
+ NTP_4_2_7P450
+
+ util/invoke-ntp-keygen.texi@1.444 +2 -2
+ NTP_4_2_7P450
+
+ util/ntp-keygen-opts.c@1.458 +7 -7
+ NTP_4_2_7P450
+
+ util/ntp-keygen-opts.h@1.458 +3 -3
+ NTP_4_2_7P450
+
+ util/ntp-keygen.1ntp-keygenman@1.272 +6 -6
+ NTP_4_2_7P450
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.272 +1 -1
+ NTP_4_2_7P450
+
+ util/ntp-keygen.html@1.120 +2 -2
+ NTP_4_2_7P450
+
+ util/ntp-keygen.man.in@1.272 +6 -6
+ NTP_4_2_7P450
+
+ util/ntp-keygen.mdoc.in@1.272 +1 -1
+ NTP_4_2_7P450
+
+ChangeSet@1.3149, 2014-07-16 17:20:01-04:00, stenn@deacon.udel.edu
+ Distribute the scripts needed for the fix for Bug 2547
+
+ ChangeLog@1.1495 +1 -0
+ Distribute the scripts needed for the fix for Bug 2547
+
+ scripts/build/Makefile.am@1.3 +5 -1
+ Distribute the scripts needed for the fix for Bug 2547
+
+ scripts/build/Makefile.am@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ChangeSet@1.3148, 2014-07-16 09:33:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P449
+ TAG: NTP_4_2_7P449
+
+ ChangeLog@1.1494 +1 -0
+ NTP_4_2_7P449
+
+ ntpd/invoke-ntp.conf.texi@1.128 +1 -1
+ NTP_4_2_7P449
+
+ ntpd/invoke-ntp.keys.texi@1.126 +1 -1
+ NTP_4_2_7P449
+
+ ntpd/invoke-ntpd.texi@1.442 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.conf.5man@1.162 +6 -6
+ NTP_4_2_7P449
+
+ ntpd/ntp.conf.5mdoc@1.162 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.conf.html@1.123 +1 -1
+ NTP_4_2_7P449
+
+ ntpd/ntp.conf.man.in@1.162 +6 -6
+ NTP_4_2_7P449
+
+ ntpd/ntp.conf.mdoc.in@1.162 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.keys.5man@1.160 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.keys.5mdoc@1.160 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.keys.html@1.124 +1 -1
+ NTP_4_2_7P449
+
+ ntpd/ntp.keys.man.in@1.160 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntp.keys.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntpd-opts.c@1.460 +7 -7
+ NTP_4_2_7P449
+
+ ntpd/ntpd-opts.h@1.460 +3 -3
+ NTP_4_2_7P449
+
+ ntpd/ntpd.1ntpdman@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpd/ntpd.1ntpdmdoc@1.271 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntpd.html@1.118 +2 -2
+ NTP_4_2_7P449
+
+ ntpd/ntpd.man.in@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpd/ntpd.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P449
+
+ ntpdc/invoke-ntpdc.texi@1.440 +2 -2
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc-opts.c@1.455 +7 -7
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc-opts.h@1.455 +3 -3
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc.1ntpdcman@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.271 +2 -2
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc.html@1.284 +2 -2
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc.man.in@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpdc/ntpdc.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P449
+
+ ntpq/invoke-ntpq.texi@1.444 +2 -2
+ NTP_4_2_7P449
+
+ ntpq/ntpq-opts.c@1.458 +7 -7
+ NTP_4_2_7P449
+
+ ntpq/ntpq-opts.h@1.458 +3 -3
+ NTP_4_2_7P449
+
+ ntpq/ntpq.1ntpqman@1.272 +6 -6
+ NTP_4_2_7P449
+
+ ntpq/ntpq.1ntpqmdoc@1.272 +2 -2
+ NTP_4_2_7P449
+
+ ntpq/ntpq.html@1.115 +2 -2
+ NTP_4_2_7P449
+
+ ntpq/ntpq.man.in@1.272 +6 -6
+ NTP_4_2_7P449
+
+ ntpq/ntpq.mdoc.in@1.272 +2 -2
+ NTP_4_2_7P449
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.442 +2 -2
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.457 +7 -7
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.457 +3 -3
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.271 +2 -2
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd.html@1.113 +1 -1
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd.man.in@1.271 +6 -6
+ NTP_4_2_7P449
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P449
+
+ packageinfo.sh@1.453 +1 -1
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.33 +6 -6
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.33 +2 -2
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/calc_tickadj.html@1.32 +1 -1
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.32 +6 -6
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P449
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.34 +1 -1
+ NTP_4_2_7P449
+
+ scripts/invoke-plot_summary.texi@1.51 +1 -1
+ NTP_4_2_7P449
+
+ scripts/invoke-summary.texi@1.51 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.260 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.261 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.261 +2 -2
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/ntp-wait.html@1.277 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/ntp-wait.man.in@1.261 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.49 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.40 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.40 +2 -2
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/ntpsweep.html@1.50 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/ntpsweep.man.in@1.40 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P449
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.49 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.40 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.40 +2 -2
+ NTP_4_2_7P449
+
+ scripts/ntptrace/ntptrace.html@1.50 +1 -1
+ NTP_4_2_7P449
+
+ scripts/ntptrace/ntptrace.man.in@1.40 +6 -6
+ NTP_4_2_7P449
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P449
+
+ scripts/plot_summary.1plot_summaryman@1.51 +6 -6
+ NTP_4_2_7P449
+
+ scripts/plot_summary.1plot_summarymdoc@1.51 +3 -3
+ NTP_4_2_7P449
+
+ scripts/plot_summary.html@1.51 +1 -1
+ NTP_4_2_7P449
+
+ scripts/plot_summary.man.in@1.51 +6 -6
+ NTP_4_2_7P449
+
+ scripts/plot_summary.mdoc.in@1.51 +3 -3
+ NTP_4_2_7P449
+
+ scripts/summary.1summaryman@1.51 +6 -6
+ NTP_4_2_7P449
+
+ scripts/summary.1summarymdoc@1.51 +2 -2
+ NTP_4_2_7P449
+
+ scripts/summary.html@1.51 +1 -1
+ NTP_4_2_7P449
+
+ scripts/summary.man.in@1.51 +6 -6
+ NTP_4_2_7P449
+
+ scripts/summary.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P449
+
+ sntp/invoke-sntp.texi@1.439 +2 -2
+ NTP_4_2_7P449
+
+ sntp/sntp-opts.c@1.454 +7 -7
+ NTP_4_2_7P449
+
+ sntp/sntp-opts.h@1.454 +3 -3
+ NTP_4_2_7P449
+
+ sntp/sntp.1sntpman@1.274 +6 -6
+ NTP_4_2_7P449
+
+ sntp/sntp.1sntpmdoc@1.274 +2 -2
+ NTP_4_2_7P449
+
+ sntp/sntp.html@1.454 +2 -2
+ NTP_4_2_7P449
+
+ sntp/sntp.man.in@1.274 +6 -6
+ NTP_4_2_7P449
+
+ sntp/sntp.mdoc.in@1.274 +2 -2
+ NTP_4_2_7P449
+
+ util/invoke-ntp-keygen.texi@1.443 +2 -2
+ NTP_4_2_7P449
+
+ util/ntp-keygen-opts.c@1.457 +7 -7
+ NTP_4_2_7P449
+
+ util/ntp-keygen-opts.h@1.457 +3 -3
+ NTP_4_2_7P449
+
+ util/ntp-keygen.1ntp-keygenman@1.271 +6 -6
+ NTP_4_2_7P449
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.271 +2 -2
+ NTP_4_2_7P449
+
+ util/ntp-keygen.html@1.119 +2 -2
+ NTP_4_2_7P449
+
+ util/ntp-keygen.man.in@1.271 +6 -6
+ NTP_4_2_7P449
+
+ util/ntp-keygen.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P449
+
+ChangeSet@1.3147, 2014-07-16 01:37:41-07:00, harlan@hms-mbp11.pfcs.com
+ Fix typos in decode.html and debug.html
+
+ ChangeLog@1.1493 +1 -0
+ Fix typos in decode.html and debug.html
+
+ html/debug.html@1.32 +3 -3
+ Fix typos in decode.html and debug.html
+
+ html/decode.html@1.24 +1 -1
+ Fix typos in decode.html and debug.html
+
+ChangeSet@1.3146, 2014-07-16 01:33:06-07:00, harlan@hms-mbp11.pfcs.com
+ [Bug 2547] Automate update of "Last Update" datestamps in .html files
+
+ ChangeLog@1.1492 +1 -0
+ [Bug 2547] Automate update of "Last Update" datestamps in .html files
+
+ Makefile.am@1.119 +24 -19
+ [Bug 2547] Automate update of "Last Update" datestamps in .html files
+
+ scripts/build/checkHtmlFileDates@1.1 +16 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/scripts/build/checkHtmlFileDates
+
+ scripts/build/checkHtmlFileDates@1.0 +0 -0
+
+ scripts/build/updateBEDate@1.1 +53 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/scripts/build/updateBEDate
+
+ scripts/build/updateBEDate@1.0 +0 -0
+
+ChangeSet@1.3145, 2014-07-16 02:45:17-04:00, stenn@deacon.udel.edu
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ ChangeLog@1.1491 +1 -0
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ include/ntp_calendar.h@1.16 +41 -38
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ChangeSet@1.3144, 2014-07-16 04:17:40+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2623] Missing {} in refclock_oncore.c
+
+ ChangeLog@1.1490 +1 -0
+ [Bug 2623] Missing {} in refclock_oncore.c
+
+ ntpd/refclock_oncore.c@1.100 +2 -1
+ [Bug 2623] Missing {} in refclock_oncore.c
+
+ChangeSet@1.3143, 2014-07-15 09:34:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P448
+ TAG: NTP_4_2_7P448
+
+ ChangeLog@1.1489 +1 -0
+ NTP_4_2_7P448
+
+ ntpd/invoke-ntp.conf.texi@1.127 +1 -1
+ NTP_4_2_7P448
+
+ ntpd/invoke-ntp.keys.texi@1.125 +1 -1
+ NTP_4_2_7P448
+
+ ntpd/invoke-ntpd.texi@1.441 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.conf.5man@1.161 +6 -6
+ NTP_4_2_7P448
+
+ ntpd/ntp.conf.5mdoc@1.161 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.conf.html@1.122 +1 -1
+ NTP_4_2_7P448
+
+ ntpd/ntp.conf.man.in@1.161 +6 -6
+ NTP_4_2_7P448
+
+ ntpd/ntp.conf.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.keys.5man@1.159 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.keys.5mdoc@1.159 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.keys.html@1.123 +1 -1
+ NTP_4_2_7P448
+
+ ntpd/ntp.keys.man.in@1.159 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntp.keys.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntpd-opts.c@1.459 +7 -7
+ NTP_4_2_7P448
+
+ ntpd/ntpd-opts.h@1.459 +3 -3
+ NTP_4_2_7P448
+
+ ntpd/ntpd.1ntpdman@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpd/ntpd.1ntpdmdoc@1.270 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntpd.html@1.117 +2 -2
+ NTP_4_2_7P448
+
+ ntpd/ntpd.man.in@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpd/ntpd.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P448
+
+ ntpdc/invoke-ntpdc.texi@1.439 +2 -2
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc-opts.c@1.454 +7 -7
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc-opts.h@1.454 +3 -3
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc.1ntpdcman@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.270 +2 -2
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc.html@1.283 +2 -2
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc.man.in@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpdc/ntpdc.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P448
+
+ ntpq/invoke-ntpq.texi@1.443 +2 -2
+ NTP_4_2_7P448
+
+ ntpq/ntpq-opts.c@1.457 +7 -7
+ NTP_4_2_7P448
+
+ ntpq/ntpq-opts.h@1.457 +3 -3
+ NTP_4_2_7P448
+
+ ntpq/ntpq.1ntpqman@1.271 +6 -6
+ NTP_4_2_7P448
+
+ ntpq/ntpq.1ntpqmdoc@1.271 +2 -2
+ NTP_4_2_7P448
+
+ ntpq/ntpq.html@1.114 +2 -2
+ NTP_4_2_7P448
+
+ ntpq/ntpq.man.in@1.271 +6 -6
+ NTP_4_2_7P448
+
+ ntpq/ntpq.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P448
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.441 +2 -2
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.456 +7 -7
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.456 +3 -3
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.270 +2 -2
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd.html@1.112 +1 -1
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd.man.in@1.270 +6 -6
+ NTP_4_2_7P448
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P448
+
+ packageinfo.sh@1.452 +1 -1
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.32 +6 -6
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.32 +2 -2
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/calc_tickadj.html@1.31 +1 -1
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.31 +6 -6
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P448
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.33 +1 -1
+ NTP_4_2_7P448
+
+ scripts/invoke-plot_summary.texi@1.50 +1 -1
+ NTP_4_2_7P448
+
+ scripts/invoke-summary.texi@1.50 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.259 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.260 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.260 +2 -2
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/ntp-wait.html@1.276 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/ntp-wait.man.in@1.260 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.48 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.39 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.39 +2 -2
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/ntpsweep.html@1.49 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/ntpsweep.man.in@1.39 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P448
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.48 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.39 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.39 +2 -2
+ NTP_4_2_7P448
+
+ scripts/ntptrace/ntptrace.html@1.49 +1 -1
+ NTP_4_2_7P448
+
+ scripts/ntptrace/ntptrace.man.in@1.39 +6 -6
+ NTP_4_2_7P448
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P448
+
+ scripts/plot_summary.1plot_summaryman@1.50 +6 -6
+ NTP_4_2_7P448
+
+ scripts/plot_summary.1plot_summarymdoc@1.50 +3 -3
+ NTP_4_2_7P448
+
+ scripts/plot_summary.html@1.50 +1 -1
+ NTP_4_2_7P448
+
+ scripts/plot_summary.man.in@1.50 +6 -6
+ NTP_4_2_7P448
+
+ scripts/plot_summary.mdoc.in@1.50 +3 -3
+ NTP_4_2_7P448
+
+ scripts/summary.1summaryman@1.50 +6 -6
+ NTP_4_2_7P448
+
+ scripts/summary.1summarymdoc@1.50 +2 -2
+ NTP_4_2_7P448
+
+ scripts/summary.html@1.50 +1 -1
+ NTP_4_2_7P448
+
+ scripts/summary.man.in@1.50 +6 -6
+ NTP_4_2_7P448
+
+ scripts/summary.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P448
+
+ sntp/invoke-sntp.texi@1.438 +2 -2
+ NTP_4_2_7P448
+
+ sntp/sntp-opts.c@1.453 +7 -7
+ NTP_4_2_7P448
+
+ sntp/sntp-opts.h@1.453 +3 -3
+ NTP_4_2_7P448
+
+ sntp/sntp.1sntpman@1.273 +6 -6
+ NTP_4_2_7P448
+
+ sntp/sntp.1sntpmdoc@1.273 +2 -2
+ NTP_4_2_7P448
+
+ sntp/sntp.html@1.453 +2 -2
+ NTP_4_2_7P448
+
+ sntp/sntp.man.in@1.273 +6 -6
+ NTP_4_2_7P448
+
+ sntp/sntp.mdoc.in@1.273 +2 -2
+ NTP_4_2_7P448
+
+ util/invoke-ntp-keygen.texi@1.442 +2 -2
+ NTP_4_2_7P448
+
+ util/ntp-keygen-opts.c@1.456 +7 -7
+ NTP_4_2_7P448
+
+ util/ntp-keygen-opts.h@1.456 +3 -3
+ NTP_4_2_7P448
+
+ util/ntp-keygen.1ntp-keygenman@1.270 +6 -6
+ NTP_4_2_7P448
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.270 +2 -2
+ NTP_4_2_7P448
+
+ util/ntp-keygen.html@1.118 +2 -2
+ NTP_4_2_7P448
+
+ util/ntp-keygen.man.in@1.270 +6 -6
+ NTP_4_2_7P448
+
+ util/ntp-keygen.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P448
+
+ChangeSet@1.3142, 2014-07-15 08:41:34+00:00, stenn@psp-deb1.ntp.org
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ ChangeLog@1.1488 +1 -0
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ include/ntp_calendar.h@1.15 +8 -8
+ Quiet warnings from ntp_calendar.h: avoid using argument names
+
+ChangeSet@1.3141, 2014-07-12 12:26:38+02:00, jnperlin@hydra.(none)
+ [Bug 2621] Avoid use of indeterminate address after 'free()'
+
+ ChangeLog@1.1487 +2 -0
+ [Bug 2621] Avoid use of indeterminate address after 'free()'
+
+ libntp/recvbuff.c@1.39 +11 -9
+ [Bug 2621] Avoid use of indeterminate address after 'free()'
+
+ ntpd/ntp_config.c@1.318 +62 -61
+ [Bug 2621] Avoid use of indeterminate address after 'free()', unification of cleanup pattern
+
+ ntpd/ntp_io.c@1.392 +8 -8
+ [Bug 2621] Avoid use of indeterminate address after 'free()'
+
+ChangeSet@1.3140, 2014-07-05 11:09:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P447
+ TAG: NTP_4_2_7P447
+
+ ChangeLog@1.1486 +1 -0
+ NTP_4_2_7P447
+
+ ntpd/invoke-ntp.conf.texi@1.126 +1 -1
+ NTP_4_2_7P447
+
+ ntpd/invoke-ntp.keys.texi@1.124 +1 -1
+ NTP_4_2_7P447
+
+ ntpd/invoke-ntpd.texi@1.440 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.conf.5man@1.160 +6 -6
+ NTP_4_2_7P447
+
+ ntpd/ntp.conf.5mdoc@1.160 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.conf.html@1.121 +1 -1
+ NTP_4_2_7P447
+
+ ntpd/ntp.conf.man.in@1.160 +6 -6
+ NTP_4_2_7P447
+
+ ntpd/ntp.conf.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.keys.5man@1.158 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.keys.5mdoc@1.158 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.keys.html@1.122 +1 -1
+ NTP_4_2_7P447
+
+ ntpd/ntp.keys.man.in@1.158 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntp.keys.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntpd-opts.c@1.458 +7 -7
+ NTP_4_2_7P447
+
+ ntpd/ntpd-opts.h@1.458 +3 -3
+ NTP_4_2_7P447
+
+ ntpd/ntpd.1ntpdman@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpd/ntpd.1ntpdmdoc@1.269 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntpd.html@1.116 +2 -2
+ NTP_4_2_7P447
+
+ ntpd/ntpd.man.in@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpd/ntpd.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P447
+
+ ntpdc/invoke-ntpdc.texi@1.438 +2 -2
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc-opts.c@1.453 +7 -7
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc-opts.h@1.453 +3 -3
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc.1ntpdcman@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.269 +2 -2
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc.html@1.282 +2 -2
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc.man.in@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpdc/ntpdc.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P447
+
+ ntpq/invoke-ntpq.texi@1.442 +2 -2
+ NTP_4_2_7P447
+
+ ntpq/ntpq-opts.c@1.456 +7 -7
+ NTP_4_2_7P447
+
+ ntpq/ntpq-opts.h@1.456 +3 -3
+ NTP_4_2_7P447
+
+ ntpq/ntpq.1ntpqman@1.270 +6 -6
+ NTP_4_2_7P447
+
+ ntpq/ntpq.1ntpqmdoc@1.270 +2 -2
+ NTP_4_2_7P447
+
+ ntpq/ntpq.html@1.113 +2 -2
+ NTP_4_2_7P447
+
+ ntpq/ntpq.man.in@1.270 +6 -6
+ NTP_4_2_7P447
+
+ ntpq/ntpq.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P447
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.440 +2 -2
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.455 +7 -7
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.455 +3 -3
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.269 +2 -2
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd.html@1.111 +1 -1
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd.man.in@1.269 +6 -6
+ NTP_4_2_7P447
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P447
+
+ packageinfo.sh@1.451 +1 -1
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.31 +6 -6
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.31 +2 -2
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/calc_tickadj.html@1.30 +1 -1
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.30 +6 -6
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P447
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.32 +1 -1
+ NTP_4_2_7P447
+
+ scripts/invoke-plot_summary.texi@1.49 +1 -1
+ NTP_4_2_7P447
+
+ scripts/invoke-summary.texi@1.49 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.258 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.259 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.259 +2 -2
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/ntp-wait.html@1.275 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/ntp-wait.man.in@1.259 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.259 +2 -2
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.47 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.38 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.38 +2 -2
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/ntpsweep.html@1.48 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/ntpsweep.man.in@1.38 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P447
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.47 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.38 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.38 +2 -2
+ NTP_4_2_7P447
+
+ scripts/ntptrace/ntptrace.html@1.48 +1 -1
+ NTP_4_2_7P447
+
+ scripts/ntptrace/ntptrace.man.in@1.38 +6 -6
+ NTP_4_2_7P447
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P447
+
+ scripts/plot_summary.1plot_summaryman@1.49 +6 -6
+ NTP_4_2_7P447
+
+ scripts/plot_summary.1plot_summarymdoc@1.49 +3 -3
+ NTP_4_2_7P447
+
+ scripts/plot_summary.html@1.49 +1 -1
+ NTP_4_2_7P447
+
+ scripts/plot_summary.man.in@1.49 +6 -6
+ NTP_4_2_7P447
+
+ scripts/plot_summary.mdoc.in@1.49 +3 -3
+ NTP_4_2_7P447
+
+ scripts/summary.1summaryman@1.49 +6 -6
+ NTP_4_2_7P447
+
+ scripts/summary.1summarymdoc@1.49 +2 -2
+ NTP_4_2_7P447
+
+ scripts/summary.html@1.49 +1 -1
+ NTP_4_2_7P447
+
+ scripts/summary.man.in@1.49 +6 -6
+ NTP_4_2_7P447
+
+ scripts/summary.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P447
+
+ sntp/invoke-sntp.texi@1.437 +2 -2
+ NTP_4_2_7P447
+
+ sntp/sntp-opts.c@1.452 +7 -7
+ NTP_4_2_7P447
+
+ sntp/sntp-opts.h@1.452 +3 -3
+ NTP_4_2_7P447
+
+ sntp/sntp.1sntpman@1.272 +6 -6
+ NTP_4_2_7P447
+
+ sntp/sntp.1sntpmdoc@1.272 +2 -2
+ NTP_4_2_7P447
+
+ sntp/sntp.html@1.452 +2 -2
+ NTP_4_2_7P447
+
+ sntp/sntp.man.in@1.272 +6 -6
+ NTP_4_2_7P447
+
+ sntp/sntp.mdoc.in@1.272 +2 -2
+ NTP_4_2_7P447
+
+ util/invoke-ntp-keygen.texi@1.441 +2 -2
+ NTP_4_2_7P447
+
+ util/ntp-keygen-opts.c@1.455 +7 -7
+ NTP_4_2_7P447
+
+ util/ntp-keygen-opts.h@1.455 +3 -3
+ NTP_4_2_7P447
+
+ util/ntp-keygen.1ntp-keygenman@1.269 +6 -6
+ NTP_4_2_7P447
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.269 +2 -2
+ NTP_4_2_7P447
+
+ util/ntp-keygen.html@1.117 +2 -2
+ NTP_4_2_7P447
+
+ util/ntp-keygen.man.in@1.269 +6 -6
+ NTP_4_2_7P447
+
+ util/ntp-keygen.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P447
+
+ChangeSet@1.3139, 2014-07-05 08:22:01+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2624] Fix signed compare on 'l_fp'
+
+ ChangeLog@1.1485 +1 -1
+ [Bug 2624] Fix signed compare on 'l_fp'
+
+ChangeSet@1.3131.3.2, 2014-07-05 09:34:14+02:00, jnperlin@hydra.(none)
+ [Bug 2618) (side work) added unit test for 'l_fp' operations
+
+ ChangeLog@1.1478.3.1 +1 -0
+ [Bug 2618) (side work) added unit test for 'l_fp' operations
+
+ include/ntp_fp.h@1.31 +3 -3
+ fixed a sign/unsigned compare problem inside signed compare macros
+
+ tests/libntp/lfpfunc.cpp@1.2 +224 -28
+ added relational operation tests
+ cleanup and more independent reference implementations
+
+ChangeSet@1.3137, 2014-07-04 16:57:21-04:00, stenn@deacon.udel.edu
+ Remove extraneous NULs
+
+ readme.y2kfixes@1.6 +1 -75
+ Remove extraneous NULs
+
+ChangeSet@1.3136, 2014-07-04 03:12:30+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2620] Use version.pm for checking version numbers in NTP::Util
+
+ ChangeLog@1.1483 +1 -0
+ [Bug 2620] Use version.pm for checking version numbers in NTP::Util
+
+ scripts/lib/NTP/Util.pm@1.2 +2 -1
+ [Bug 2620] Use version.pm for checking version numbers in NTP::Util
+
+ChangeSet@1.3131.3.1, 2014-07-01 00:59:29+02:00, jnperlin@hydra.(none)
+ added first tests for 'l_fp'
+
+ tests/libntp/Makefile.am@1.42 +1 -0
+ added first tests for 'l_fp'
+
+ tests/libntp/lfpfunc.cpp@1.1 +351 -0
+ added first tests for 'l_fp'
+
+ tests/libntp/lfpfunc.cpp@1.0 +0 -0
+
+ChangeSet@1.3135, 2014-06-28 09:33:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P446
+ TAG: NTP_4_2_7P446
+
+ ChangeLog@1.1482 +1 -0
+ NTP_4_2_7P446
+
+ ntpd/invoke-ntp.conf.texi@1.125 +1 -1
+ NTP_4_2_7P446
+
+ ntpd/invoke-ntp.keys.texi@1.123 +1 -1
+ NTP_4_2_7P446
+
+ ntpd/invoke-ntpd.texi@1.439 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.conf.5man@1.159 +6 -6
+ NTP_4_2_7P446
+
+ ntpd/ntp.conf.5mdoc@1.159 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.conf.html@1.120 +1 -1
+ NTP_4_2_7P446
+
+ ntpd/ntp.conf.man.in@1.159 +6 -6
+ NTP_4_2_7P446
+
+ ntpd/ntp.conf.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.keys.5man@1.157 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.keys.5mdoc@1.157 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.keys.html@1.121 +1 -1
+ NTP_4_2_7P446
+
+ ntpd/ntp.keys.man.in@1.157 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntp.keys.mdoc.in@1.157 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntpd-opts.c@1.457 +7 -7
+ NTP_4_2_7P446
+
+ ntpd/ntpd-opts.h@1.457 +3 -3
+ NTP_4_2_7P446
+
+ ntpd/ntpd.1ntpdman@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpd/ntpd.1ntpdmdoc@1.268 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntpd.html@1.115 +2 -2
+ NTP_4_2_7P446
+
+ ntpd/ntpd.man.in@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpd/ntpd.mdoc.in@1.268 +2 -2
+ NTP_4_2_7P446
+
+ ntpdc/invoke-ntpdc.texi@1.437 +2 -2
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc-opts.c@1.452 +7 -7
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc-opts.h@1.452 +3 -3
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc.1ntpdcman@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.268 +2 -2
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc.html@1.281 +2 -2
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc.man.in@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpdc/ntpdc.mdoc.in@1.268 +2 -2
+ NTP_4_2_7P446
+
+ ntpq/invoke-ntpq.texi@1.441 +2 -2
+ NTP_4_2_7P446
+
+ ntpq/ntpq-opts.c@1.455 +7 -7
+ NTP_4_2_7P446
+
+ ntpq/ntpq-opts.h@1.455 +3 -3
+ NTP_4_2_7P446
+
+ ntpq/ntpq.1ntpqman@1.269 +6 -6
+ NTP_4_2_7P446
+
+ ntpq/ntpq.1ntpqmdoc@1.269 +2 -2
+ NTP_4_2_7P446
+
+ ntpq/ntpq.html@1.112 +3 -3
+ NTP_4_2_7P446
+
+ ntpq/ntpq.man.in@1.269 +6 -6
+ NTP_4_2_7P446
+
+ ntpq/ntpq.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P446
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.439 +2 -2
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.454 +7 -7
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.454 +3 -3
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.268 +2 -2
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd.html@1.110 +1 -1
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd.man.in@1.268 +6 -6
+ NTP_4_2_7P446
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.268 +2 -2
+ NTP_4_2_7P446
+
+ packageinfo.sh@1.450 +1 -1
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.30 +6 -6
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.30 +2 -2
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/calc_tickadj.html@1.29 +1 -1
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.29 +6 -6
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P446
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.31 +1 -1
+ NTP_4_2_7P446
+
+ scripts/invoke-plot_summary.texi@1.48 +1 -1
+ NTP_4_2_7P446
+
+ scripts/invoke-summary.texi@1.48 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.257 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.258 +13 -13
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.258 +2 -2
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/ntp-wait.html@1.274 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/ntp-wait.man.in@1.258 +13 -13
+ NTP_4_2_7P446
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.258 +2 -2
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.46 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.37 +6 -6
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.37 +2 -2
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/ntpsweep.html@1.47 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/ntpsweep.man.in@1.37 +6 -6
+ NTP_4_2_7P446
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P446
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.46 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.37 +6 -6
+ NTP_4_2_7P446
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.37 +2 -2
+ NTP_4_2_7P446
+
+ scripts/ntptrace/ntptrace.html@1.47 +1 -1
+ NTP_4_2_7P446
+
+ scripts/ntptrace/ntptrace.man.in@1.37 +6 -6
+ NTP_4_2_7P446
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P446
+
+ scripts/plot_summary.1plot_summaryman@1.48 +6 -6
+ NTP_4_2_7P446
+
+ scripts/plot_summary.1plot_summarymdoc@1.48 +2 -2
+ NTP_4_2_7P446
+
+ scripts/plot_summary.html@1.48 +1 -1
+ NTP_4_2_7P446
+
+ scripts/plot_summary.man.in@1.48 +6 -6
+ NTP_4_2_7P446
+
+ scripts/plot_summary.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P446
+
+ scripts/summary.1summaryman@1.48 +6 -6
+ NTP_4_2_7P446
+
+ scripts/summary.1summarymdoc@1.48 +2 -2
+ NTP_4_2_7P446
+
+ scripts/summary.html@1.48 +1 -1
+ NTP_4_2_7P446
+
+ scripts/summary.man.in@1.48 +6 -6
+ NTP_4_2_7P446
+
+ scripts/summary.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P446
+
+ sntp/invoke-sntp.texi@1.436 +2 -2
+ NTP_4_2_7P446
+
+ sntp/sntp-opts.c@1.451 +7 -7
+ NTP_4_2_7P446
+
+ sntp/sntp-opts.h@1.451 +3 -3
+ NTP_4_2_7P446
+
+ sntp/sntp.1sntpman@1.271 +6 -6
+ NTP_4_2_7P446
+
+ sntp/sntp.1sntpmdoc@1.271 +2 -2
+ NTP_4_2_7P446
+
+ sntp/sntp.html@1.451 +2 -2
+ NTP_4_2_7P446
+
+ sntp/sntp.man.in@1.271 +6 -6
+ NTP_4_2_7P446
+
+ sntp/sntp.mdoc.in@1.271 +2 -2
+ NTP_4_2_7P446
+
+ util/invoke-ntp-keygen.texi@1.440 +2 -2
+ NTP_4_2_7P446
+
+ util/ntp-keygen-opts.c@1.454 +7 -7
+ NTP_4_2_7P446
+
+ util/ntp-keygen-opts.h@1.454 +3 -3
+ NTP_4_2_7P446
+
+ util/ntp-keygen.1ntp-keygenman@1.268 +6 -6
+ NTP_4_2_7P446
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.268 +2 -2
+ NTP_4_2_7P446
+
+ util/ntp-keygen.html@1.116 +2 -2
+ NTP_4_2_7P446
+
+ util/ntp-keygen.man.in@1.268 +6 -6
+ NTP_4_2_7P446
+
+ util/ntp-keygen.mdoc.in@1.268 +2 -2
+ NTP_4_2_7P446
+
+ChangeSet@1.3134, 2014-06-28 05:00:22-04:00, stenn@deacon.udel.edu
+ Allow for version suffix in libevent in ntp_libevent.m4
+
+ ChangeLog@1.1481 +1 -0
+ Allow for version suffix in libevent in ntp_libevent.m4
+
+ sntp/m4/ntp_libevent.m4@1.11 +19 -1
+ Allow for version suffix in libevent in ntp_libevent.m4
+
+ChangeSet@1.3131.1.4, 2014-06-28 07:48:23+00:00, stenn@psp-fb1.ntp.org
+ ntp_crypto.c, ChangeLog:
+ [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG().
+ Provide missing msyslog() message in crypto_alice().
+
+ ChangeLog@1.1478.1.3 +2 -0
+ [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG().
+ Provide missing msyslog() message in crypto_alice().
+
+ ntpd/ntp_crypto.c@1.167 +6 -3
+ [Bug 2619] Save a signed int copy of the return value of i2d_DSA_SIG().
+ Provide missing msyslog() message in crypto_alice().
+
+ChangeSet@1.3131.2.1, 2014-06-28 07:25:32+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2597] leap file processing -- loose ends
+
+ ChangeLog@1.1478.2.1 +1 -0
+ [Bug 2597] leap file processing -- loose ends
+
+ ntpd/ntp_util.c@1.114 +1 -1
+ [Bug 2597] leap file processing -- loose ends
+
+ChangeSet@1.3131.1.2, 2014-06-28 06:27:42+00:00, phk@psp-fb1.ntp.org
+ ChangeLog:
+ fix a variable lifetime issue
+
+ ChangeLog@1.1478.1.1 +1 -0
+ fix a variable lifetime issue
+
+ChangeSet@1.3131.1.1, 2014-06-28 06:19:58+00:00, phk@psp-fb1.ntp.org
+ ntp_crypto.c:
+ Don't assign stack variables to globals.
+
+ ntpd/ntp_crypto.c@1.166 +1 -1
+ Don't assign stack variables to globals.
+
+ChangeSet@1.3132, 2014-06-20 10:59:35+02:00, jnperlin@hydra.(none)
+ [Bug 2614] use 'unsigned long' consistently in 'ntp_random.c' to avoid undefined signed int overflow
+
+ ChangeLog@1.1479 +2 -0
+ [Bug 2614] use 'unsigned long' consistently in 'ntp_random.c' to avoid undefined signed int overflow
+
+ libntp/ntp_random.c@1.11 +8 -8
+ [Bug 2614] use 'unsigned long' consistently in 'ntp_random.c' to avoid undefined signed int overflow
+
+ChangeSet@1.3131, 2014-06-12 09:34:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P445
+ TAG: NTP_4_2_7P445
+
+ ChangeLog@1.1478 +1 -0
+ NTP_4_2_7P445
+
+ ntpd/invoke-ntp.conf.texi@1.124 +1 -1
+ NTP_4_2_7P445
+
+ ntpd/invoke-ntp.keys.texi@1.122 +1 -1
+ NTP_4_2_7P445
+
+ ntpd/invoke-ntpd.texi@1.438 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.conf.5man@1.158 +6 -6
+ NTP_4_2_7P445
+
+ ntpd/ntp.conf.5mdoc@1.158 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.conf.html@1.119 +1 -1
+ NTP_4_2_7P445
+
+ ntpd/ntp.conf.man.in@1.158 +6 -6
+ NTP_4_2_7P445
+
+ ntpd/ntp.conf.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.keys.5man@1.156 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.keys.5mdoc@1.156 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.keys.html@1.120 +1 -1
+ NTP_4_2_7P445
+
+ ntpd/ntp.keys.man.in@1.156 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntp.keys.mdoc.in@1.156 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntpd-opts.c@1.456 +7 -7
+ NTP_4_2_7P445
+
+ ntpd/ntpd-opts.h@1.456 +3 -3
+ NTP_4_2_7P445
+
+ ntpd/ntpd.1ntpdman@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpd/ntpd.1ntpdmdoc@1.267 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntpd.html@1.114 +2 -2
+ NTP_4_2_7P445
+
+ ntpd/ntpd.man.in@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpd/ntpd.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P445
+
+ ntpdc/invoke-ntpdc.texi@1.436 +2 -2
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc-opts.c@1.451 +7 -7
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc-opts.h@1.451 +3 -3
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc.1ntpdcman@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.267 +2 -2
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc.html@1.280 +2 -2
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc.man.in@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpdc/ntpdc.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P445
+
+ ntpq/invoke-ntpq.texi@1.440 +3 -3
+ NTP_4_2_7P445
+
+ ntpq/ntpq-opts.c@1.454 +7 -7
+ NTP_4_2_7P445
+
+ ntpq/ntpq-opts.h@1.454 +3 -3
+ NTP_4_2_7P445
+
+ ntpq/ntpq.1ntpqman@1.268 +33 -4
+ NTP_4_2_7P445
+
+ ntpq/ntpq.1ntpqmdoc@1.268 +21 -2
+ NTP_4_2_7P445
+
+ ntpq/ntpq.html@1.111 +359 -2
+ NTP_4_2_7P445
+
+ ntpq/ntpq.man.in@1.268 +33 -4
+ NTP_4_2_7P445
+
+ ntpq/ntpq.mdoc.in@1.268 +21 -2
+ NTP_4_2_7P445
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.438 +2 -2
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.453 +7 -7
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.453 +3 -3
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.267 +2 -2
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd.html@1.109 +1 -1
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd.man.in@1.267 +6 -6
+ NTP_4_2_7P445
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P445
+
+ packageinfo.sh@1.449 +1 -1
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.29 +6 -6
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.29 +2 -2
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/calc_tickadj.html@1.28 +1 -1
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.28 +6 -6
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P445
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.30 +1 -1
+ NTP_4_2_7P445
+
+ scripts/invoke-plot_summary.texi@1.47 +1 -1
+ NTP_4_2_7P445
+
+ scripts/invoke-summary.texi@1.47 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.256 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.257 +13 -13
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.257 +2 -2
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/ntp-wait.html@1.273 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/ntp-wait.man.in@1.257 +13 -13
+ NTP_4_2_7P445
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.257 +2 -2
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.45 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.36 +6 -6
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.36 +2 -2
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/ntpsweep.html@1.46 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/ntpsweep.man.in@1.36 +6 -6
+ NTP_4_2_7P445
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P445
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.45 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.36 +6 -6
+ NTP_4_2_7P445
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.36 +2 -2
+ NTP_4_2_7P445
+
+ scripts/ntptrace/ntptrace.html@1.46 +1 -1
+ NTP_4_2_7P445
+
+ scripts/ntptrace/ntptrace.man.in@1.36 +6 -6
+ NTP_4_2_7P445
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P445
+
+ scripts/plot_summary.1plot_summaryman@1.47 +6 -6
+ NTP_4_2_7P445
+
+ scripts/plot_summary.1plot_summarymdoc@1.47 +2 -2
+ NTP_4_2_7P445
+
+ scripts/plot_summary.html@1.47 +1 -1
+ NTP_4_2_7P445
+
+ scripts/plot_summary.man.in@1.47 +6 -6
+ NTP_4_2_7P445
+
+ scripts/plot_summary.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P445
+
+ scripts/summary.1summaryman@1.47 +6 -6
+ NTP_4_2_7P445
+
+ scripts/summary.1summarymdoc@1.47 +2 -2
+ NTP_4_2_7P445
+
+ scripts/summary.html@1.47 +1 -1
+ NTP_4_2_7P445
+
+ scripts/summary.man.in@1.47 +6 -6
+ NTP_4_2_7P445
+
+ scripts/summary.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P445
+
+ sntp/invoke-sntp.texi@1.435 +2 -2
+ NTP_4_2_7P445
+
+ sntp/sntp-opts.c@1.450 +7 -7
+ NTP_4_2_7P445
+
+ sntp/sntp-opts.h@1.450 +3 -3
+ NTP_4_2_7P445
+
+ sntp/sntp.1sntpman@1.270 +6 -6
+ NTP_4_2_7P445
+
+ sntp/sntp.1sntpmdoc@1.270 +2 -2
+ NTP_4_2_7P445
+
+ sntp/sntp.html@1.450 +2 -2
+ NTP_4_2_7P445
+
+ sntp/sntp.man.in@1.270 +6 -6
+ NTP_4_2_7P445
+
+ sntp/sntp.mdoc.in@1.270 +2 -2
+ NTP_4_2_7P445
+
+ util/invoke-ntp-keygen.texi@1.439 +2 -2
+ NTP_4_2_7P445
+
+ util/ntp-keygen-opts.c@1.453 +7 -7
+ NTP_4_2_7P445
+
+ util/ntp-keygen-opts.h@1.453 +3 -3
+ NTP_4_2_7P445
+
+ util/ntp-keygen.1ntp-keygenman@1.267 +6 -6
+ NTP_4_2_7P445
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.267 +2 -2
+ NTP_4_2_7P445
+
+ util/ntp-keygen.html@1.115 +2 -2
+ NTP_4_2_7P445
+
+ util/ntp-keygen.man.in@1.267 +6 -6
+ NTP_4_2_7P445
+
+ util/ntp-keygen.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P445
+
+ChangeSet@1.3130, 2014-06-12 08:47:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ChangeLog@1.1477 +1 -0
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/invoke-ntpq.texi@1.439 +491 -1
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq-opts.c@1.453 +1 -1
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq-opts.def@1.17 +487 -0
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq-opts.h@1.453 +1 -1
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq.1ntpqman@1.267 +839 -32
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq.1ntpqmdoc@1.267 +479 -21
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq.man.in@1.267 +839 -32
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ ntpq/ntpq.mdoc.in@1.267 +479 -21
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ sntp/ag-tpl/Mdoc.pm@1.2 +1 -1
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ sntp/ag-tpl/mdoc2man@1.2 +13 -1
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ sntp/ag-tpl/mdoc2texi@1.9 +12 -0
+ [Bug 2556] mrulist isn't mentioned in the ntpq man page
+
+ChangeSet@1.3129, 2014-05-19 09:34:39+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P444
+ TAG: NTP_4_2_7P444
+
+ ChangeLog@1.1476 +1 -0
+ NTP_4_2_7P444
+
+ ntpd/invoke-ntp.conf.texi@1.123 +1 -1
+ NTP_4_2_7P444
+
+ ntpd/invoke-ntp.keys.texi@1.121 +1 -1
+ NTP_4_2_7P444
+
+ ntpd/invoke-ntpd.texi@1.437 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.conf.5man@1.157 +6 -6
+ NTP_4_2_7P444
+
+ ntpd/ntp.conf.5mdoc@1.157 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.conf.html@1.118 +1 -1
+ NTP_4_2_7P444
+
+ ntpd/ntp.conf.man.in@1.157 +6 -6
+ NTP_4_2_7P444
+
+ ntpd/ntp.conf.mdoc.in@1.157 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.keys.5man@1.155 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.keys.5mdoc@1.155 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.keys.html@1.119 +1 -1
+ NTP_4_2_7P444
+
+ ntpd/ntp.keys.man.in@1.155 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntp.keys.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntpd-opts.c@1.455 +7 -7
+ NTP_4_2_7P444
+
+ ntpd/ntpd-opts.h@1.455 +3 -3
+ NTP_4_2_7P444
+
+ ntpd/ntpd.1ntpdman@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpd/ntpd.1ntpdmdoc@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntpd.html@1.113 +2 -2
+ NTP_4_2_7P444
+
+ ntpd/ntpd.man.in@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpd/ntpd.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpdc/invoke-ntpdc.texi@1.435 +2 -2
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc-opts.c@1.450 +7 -7
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc-opts.h@1.450 +3 -3
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc.1ntpdcman@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc.html@1.279 +2 -2
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc.man.in@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpdc/ntpdc.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpq/invoke-ntpq.texi@1.438 +2 -2
+ NTP_4_2_7P444
+
+ ntpq/ntpq-opts.c@1.452 +7 -7
+ NTP_4_2_7P444
+
+ ntpq/ntpq-opts.h@1.452 +3 -3
+ NTP_4_2_7P444
+
+ ntpq/ntpq.1ntpqman@1.266 +13 -13
+ NTP_4_2_7P444
+
+ ntpq/ntpq.1ntpqmdoc@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpq/ntpq.html@1.110 +2 -2
+ NTP_4_2_7P444
+
+ ntpq/ntpq.man.in@1.266 +13 -13
+ NTP_4_2_7P444
+
+ ntpq/ntpq.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.437 +2 -2
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.452 +7 -7
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.452 +3 -3
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.266 +2 -2
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd.html@1.108 +1 -1
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd.man.in@1.266 +6 -6
+ NTP_4_2_7P444
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P444
+
+ packageinfo.sh@1.448 +1 -1
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.28 +6 -6
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.28 +2 -2
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/calc_tickadj.html@1.27 +1 -1
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.27 +6 -6
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P444
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.29 +1 -1
+ NTP_4_2_7P444
+
+ scripts/invoke-plot_summary.texi@1.46 +1 -1
+ NTP_4_2_7P444
+
+ scripts/invoke-summary.texi@1.46 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.255 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.256 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.256 +2 -2
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/ntp-wait.html@1.272 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/ntp-wait.man.in@1.256 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.256 +2 -2
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.44 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.35 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.35 +2 -2
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/ntpsweep.html@1.45 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/ntpsweep.man.in@1.35 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P444
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.44 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.35 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.35 +2 -2
+ NTP_4_2_7P444
+
+ scripts/ntptrace/ntptrace.html@1.45 +1 -1
+ NTP_4_2_7P444
+
+ scripts/ntptrace/ntptrace.man.in@1.35 +6 -6
+ NTP_4_2_7P444
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P444
+
+ scripts/plot_summary.1plot_summaryman@1.46 +6 -6
+ NTP_4_2_7P444
+
+ scripts/plot_summary.1plot_summarymdoc@1.46 +2 -2
+ NTP_4_2_7P444
+
+ scripts/plot_summary.html@1.46 +1 -1
+ NTP_4_2_7P444
+
+ scripts/plot_summary.man.in@1.46 +6 -6
+ NTP_4_2_7P444
+
+ scripts/plot_summary.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P444
+
+ scripts/summary.1summaryman@1.46 +6 -6
+ NTP_4_2_7P444
+
+ scripts/summary.1summarymdoc@1.46 +2 -2
+ NTP_4_2_7P444
+
+ scripts/summary.html@1.46 +1 -1
+ NTP_4_2_7P444
+
+ scripts/summary.man.in@1.46 +6 -6
+ NTP_4_2_7P444
+
+ scripts/summary.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P444
+
+ sntp/invoke-sntp.texi@1.434 +2 -2
+ NTP_4_2_7P444
+
+ sntp/sntp-opts.c@1.449 +7 -7
+ NTP_4_2_7P444
+
+ sntp/sntp-opts.h@1.449 +3 -3
+ NTP_4_2_7P444
+
+ sntp/sntp.1sntpman@1.269 +6 -6
+ NTP_4_2_7P444
+
+ sntp/sntp.1sntpmdoc@1.269 +2 -2
+ NTP_4_2_7P444
+
+ sntp/sntp.html@1.449 +2 -2
+ NTP_4_2_7P444
+
+ sntp/sntp.man.in@1.269 +6 -6
+ NTP_4_2_7P444
+
+ sntp/sntp.mdoc.in@1.269 +2 -2
+ NTP_4_2_7P444
+
+ util/invoke-ntp-keygen.texi@1.438 +2 -2
+ NTP_4_2_7P444
+
+ util/ntp-keygen-opts.c@1.452 +7 -7
+ NTP_4_2_7P444
+
+ util/ntp-keygen-opts.h@1.452 +3 -3
+ NTP_4_2_7P444
+
+ util/ntp-keygen.1ntp-keygenman@1.266 +6 -6
+ NTP_4_2_7P444
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.266 +2 -2
+ NTP_4_2_7P444
+
+ util/ntp-keygen.html@1.114 +2 -2
+ NTP_4_2_7P444
+
+ util/ntp-keygen.man.in@1.266 +6 -6
+ NTP_4_2_7P444
+
+ util/ntp-keygen.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P444
+
+ChangeSet@1.3127, 2014-05-10 09:33:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P443
+ TAG: NTP_4_2_7P443
+
+ ChangeLog@1.1473.1.6 +1 -0
+ NTP_4_2_7P443
+
+ ntpd/invoke-ntp.conf.texi@1.122 +1 -1
+ NTP_4_2_7P443
+
+ ntpd/invoke-ntp.keys.texi@1.120 +1 -1
+ NTP_4_2_7P443
+
+ ntpd/invoke-ntpd.texi@1.436 +2 -2
+ NTP_4_2_7P443
+
+ ntpd/ntp.conf.5man@1.156 +7 -7
+ NTP_4_2_7P443
+
+ ntpd/ntp.conf.5mdoc@1.156 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntp.conf.html@1.117 +1 -1
+ NTP_4_2_7P443
+
+ ntpd/ntp.conf.man.in@1.156 +7 -7
+ NTP_4_2_7P443
+
+ ntpd/ntp.conf.mdoc.in@1.156 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntp.keys.5man@1.154 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntp.keys.5mdoc@1.154 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntp.keys.html@1.118 +1 -1
+ NTP_4_2_7P443
+
+ ntpd/ntp.keys.man.in@1.154 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntp.keys.mdoc.in@1.154 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntpd-opts.c@1.454 +10 -10
+ NTP_4_2_7P443
+
+ ntpd/ntpd-opts.h@1.454 +4 -4
+ NTP_4_2_7P443
+
+ ntpd/ntpd.1ntpdman@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpd/ntpd.1ntpdmdoc@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpd/ntpd.html@1.112 +2 -2
+ NTP_4_2_7P443
+
+ ntpd/ntpd.man.in@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpd/ntpd.mdoc.in@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpdc/invoke-ntpdc.texi@1.434 +2 -2
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc-opts.c@1.449 +10 -10
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc-opts.h@1.449 +4 -4
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc.1ntpdcman@1.265 +14 -14
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc.html@1.278 +2 -2
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc.man.in@1.265 +14 -14
+ NTP_4_2_7P443
+
+ ntpdc/ntpdc.mdoc.in@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpq/invoke-ntpq.texi@1.437 +2 -2
+ NTP_4_2_7P443
+
+ ntpq/ntpq-opts.c@1.451 +10 -10
+ NTP_4_2_7P443
+
+ ntpq/ntpq-opts.h@1.451 +4 -4
+ NTP_4_2_7P443
+
+ ntpq/ntpq.1ntpqman@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpq/ntpq.1ntpqmdoc@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpq/ntpq.html@1.109 +2 -2
+ NTP_4_2_7P443
+
+ ntpq/ntpq.man.in@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpq/ntpq.mdoc.in@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.436 +2 -2
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.451 +10 -10
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.451 +4 -4
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.265 +3 -3
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd.html@1.107 +1 -1
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd.man.in@1.265 +7 -7
+ NTP_4_2_7P443
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.265 +3 -3
+ NTP_4_2_7P443
+
+ packageinfo.sh@1.447 +1 -1
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.27 +6 -6
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.27 +2 -2
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/calc_tickadj.html@1.26 +1 -1
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.26 +6 -6
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P443
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.28 +1 -1
+ NTP_4_2_7P443
+
+ scripts/invoke-plot_summary.texi@1.45 +1 -1
+ NTP_4_2_7P443
+
+ scripts/invoke-summary.texi@1.45 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.254 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.255 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.255 +2 -2
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/ntp-wait.html@1.271 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/ntp-wait.man.in@1.255 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.255 +2 -2
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.43 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.34 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.34 +2 -2
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/ntpsweep.html@1.44 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/ntpsweep.man.in@1.34 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P443
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.43 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.34 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.34 +2 -2
+ NTP_4_2_7P443
+
+ scripts/ntptrace/ntptrace.html@1.44 +1 -1
+ NTP_4_2_7P443
+
+ scripts/ntptrace/ntptrace.man.in@1.34 +6 -6
+ NTP_4_2_7P443
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P443
+
+ scripts/plot_summary.1plot_summaryman@1.45 +6 -6
+ NTP_4_2_7P443
+
+ scripts/plot_summary.1plot_summarymdoc@1.45 +2 -2
+ NTP_4_2_7P443
+
+ scripts/plot_summary.html@1.45 +1 -1
+ NTP_4_2_7P443
+
+ scripts/plot_summary.man.in@1.45 +6 -6
+ NTP_4_2_7P443
+
+ scripts/plot_summary.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P443
+
+ scripts/summary.1summaryman@1.45 +6 -6
+ NTP_4_2_7P443
+
+ scripts/summary.1summarymdoc@1.45 +2 -2
+ NTP_4_2_7P443
+
+ scripts/summary.html@1.45 +1 -1
+ NTP_4_2_7P443
+
+ scripts/summary.man.in@1.45 +6 -6
+ NTP_4_2_7P443
+
+ scripts/summary.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P443
+
+ sntp/invoke-sntp.texi@1.433 +2 -2
+ NTP_4_2_7P443
+
+ sntp/sntp-opts.c@1.448 +10 -10
+ NTP_4_2_7P443
+
+ sntp/sntp-opts.h@1.448 +4 -4
+ NTP_4_2_7P443
+
+ sntp/sntp.1sntpman@1.268 +7 -7
+ NTP_4_2_7P443
+
+ sntp/sntp.1sntpmdoc@1.268 +3 -3
+ NTP_4_2_7P443
+
+ sntp/sntp.html@1.448 +2 -2
+ NTP_4_2_7P443
+
+ sntp/sntp.man.in@1.268 +7 -7
+ NTP_4_2_7P443
+
+ sntp/sntp.mdoc.in@1.268 +3 -3
+ NTP_4_2_7P443
+
+ util/invoke-ntp-keygen.texi@1.437 +2 -2
+ NTP_4_2_7P443
+
+ util/ntp-keygen-opts.c@1.451 +10 -10
+ NTP_4_2_7P443
+
+ util/ntp-keygen-opts.h@1.451 +4 -4
+ NTP_4_2_7P443
+
+ util/ntp-keygen.1ntp-keygenman@1.265 +7 -7
+ NTP_4_2_7P443
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.265 +3 -3
+ NTP_4_2_7P443
+
+ util/ntp-keygen.html@1.113 +2 -2
+ NTP_4_2_7P443
+
+ util/ntp-keygen.man.in@1.265 +7 -7
+ NTP_4_2_7P443
+
+ util/ntp-keygen.mdoc.in@1.265 +3 -3
+ NTP_4_2_7P443
+
+ChangeSet@1.3126, 2014-05-09 21:52:34+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2594] Update the year in sntp/include/copyright.def
+
+ ChangeLog@1.1473.1.5 +1 -1
+ [Bug 2594] Update the year in sntp/include/copyright.def
+
+ChangeSet@1.3123.1.1, 2014-05-09 09:34:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P442
+ TAG: NTP_4_2_7P442
+
+ ChangeLog@1.1473.2.1 +1 -0
+ NTP_4_2_7P442
+
+ ntpd/invoke-ntp.conf.texi@1.121 +1 -1
+ NTP_4_2_7P442
+
+ ntpd/invoke-ntp.keys.texi@1.119 +1 -1
+ NTP_4_2_7P442
+
+ ntpd/invoke-ntpd.texi@1.435 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.conf.5man@1.155 +6 -6
+ NTP_4_2_7P442
+
+ ntpd/ntp.conf.5mdoc@1.155 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.conf.html@1.116 +1 -1
+ NTP_4_2_7P442
+
+ ntpd/ntp.conf.man.in@1.155 +6 -6
+ NTP_4_2_7P442
+
+ ntpd/ntp.conf.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.keys.5man@1.153 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.keys.5mdoc@1.153 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.keys.html@1.117 +1 -1
+ NTP_4_2_7P442
+
+ ntpd/ntp.keys.man.in@1.153 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntp.keys.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntpd-opts.c@1.453 +7 -7
+ NTP_4_2_7P442
+
+ ntpd/ntpd-opts.h@1.453 +3 -3
+ NTP_4_2_7P442
+
+ ntpd/ntpd.1ntpdman@1.264 +13 -13
+ NTP_4_2_7P442
+
+ ntpd/ntpd.1ntpdmdoc@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntpd.html@1.111 +2 -2
+ NTP_4_2_7P442
+
+ ntpd/ntpd.man.in@1.264 +13 -13
+ NTP_4_2_7P442
+
+ ntpd/ntpd.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpdc/invoke-ntpdc.texi@1.433 +2 -2
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc-opts.c@1.448 +7 -7
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc-opts.h@1.448 +3 -3
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc.1ntpdcman@1.264 +13 -13
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc.html@1.277 +2 -2
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc.man.in@1.264 +13 -13
+ NTP_4_2_7P442
+
+ ntpdc/ntpdc.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpq/invoke-ntpq.texi@1.436 +2 -2
+ NTP_4_2_7P442
+
+ ntpq/ntpq-opts.c@1.450 +7 -7
+ NTP_4_2_7P442
+
+ ntpq/ntpq-opts.h@1.450 +3 -3
+ NTP_4_2_7P442
+
+ ntpq/ntpq.1ntpqman@1.264 +6 -6
+ NTP_4_2_7P442
+
+ ntpq/ntpq.1ntpqmdoc@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpq/ntpq.html@1.108 +2 -2
+ NTP_4_2_7P442
+
+ ntpq/ntpq.man.in@1.264 +6 -6
+ NTP_4_2_7P442
+
+ ntpq/ntpq.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.435 +2 -2
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.450 +7 -7
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.450 +3 -3
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.264 +6 -6
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.264 +2 -2
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd.html@1.106 +1 -1
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd.man.in@1.264 +6 -6
+ NTP_4_2_7P442
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P442
+
+ packageinfo.sh@1.446 +1 -1
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.26 +6 -6
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.26 +2 -2
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/calc_tickadj.html@1.25 +1 -1
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.25 +6 -6
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P442
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.27 +1 -1
+ NTP_4_2_7P442
+
+ scripts/invoke-plot_summary.texi@1.44 +1 -1
+ NTP_4_2_7P442
+
+ scripts/invoke-summary.texi@1.44 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.253 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.254 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.254 +2 -2
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/ntp-wait.html@1.270 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/ntp-wait.man.in@1.254 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.254 +2 -2
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.42 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.33 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.33 +2 -2
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/ntpsweep.html@1.43 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/ntpsweep.man.in@1.33 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P442
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.42 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.33 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.33 +2 -2
+ NTP_4_2_7P442
+
+ scripts/ntptrace/ntptrace.html@1.43 +1 -1
+ NTP_4_2_7P442
+
+ scripts/ntptrace/ntptrace.man.in@1.33 +6 -6
+ NTP_4_2_7P442
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P442
+
+ scripts/plot_summary.1plot_summaryman@1.44 +6 -6
+ NTP_4_2_7P442
+
+ scripts/plot_summary.1plot_summarymdoc@1.44 +2 -2
+ NTP_4_2_7P442
+
+ scripts/plot_summary.html@1.44 +1 -1
+ NTP_4_2_7P442
+
+ scripts/plot_summary.man.in@1.44 +6 -6
+ NTP_4_2_7P442
+
+ scripts/plot_summary.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P442
+
+ scripts/summary.1summaryman@1.44 +6 -6
+ NTP_4_2_7P442
+
+ scripts/summary.1summarymdoc@1.44 +2 -2
+ NTP_4_2_7P442
+
+ scripts/summary.html@1.44 +1 -1
+ NTP_4_2_7P442
+
+ scripts/summary.man.in@1.44 +6 -6
+ NTP_4_2_7P442
+
+ scripts/summary.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P442
+
+ sntp/invoke-sntp.texi@1.432 +2 -2
+ NTP_4_2_7P442
+
+ sntp/sntp-opts.c@1.447 +7 -7
+ NTP_4_2_7P442
+
+ sntp/sntp-opts.h@1.447 +3 -3
+ NTP_4_2_7P442
+
+ sntp/sntp.1sntpman@1.267 +6 -6
+ NTP_4_2_7P442
+
+ sntp/sntp.1sntpmdoc@1.267 +2 -2
+ NTP_4_2_7P442
+
+ sntp/sntp.html@1.447 +2 -2
+ NTP_4_2_7P442
+
+ sntp/sntp.man.in@1.267 +6 -6
+ NTP_4_2_7P442
+
+ sntp/sntp.mdoc.in@1.267 +2 -2
+ NTP_4_2_7P442
+
+ util/invoke-ntp-keygen.texi@1.436 +2 -2
+ NTP_4_2_7P442
+
+ util/ntp-keygen-opts.c@1.450 +7 -7
+ NTP_4_2_7P442
+
+ util/ntp-keygen-opts.h@1.450 +3 -3
+ NTP_4_2_7P442
+
+ util/ntp-keygen.1ntp-keygenman@1.264 +6 -6
+ NTP_4_2_7P442
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.264 +2 -2
+ NTP_4_2_7P442
+
+ util/ntp-keygen.html@1.112 +2 -2
+ NTP_4_2_7P442
+
+ util/ntp-keygen.man.in@1.264 +6 -6
+ NTP_4_2_7P442
+
+ util/ntp-keygen.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P442
+
+ChangeSet@1.3124, 2014-05-09 01:54:22-07:00, harlan@hms-mbp11.local
+ [Bug 2594] Update the year in sntp/include/copyright.def
+
+ ChangeLog@1.1473.1.3 +1 -0
+ [Bug 2594] Update the year in sntp/include/copyright.def
+
+ sntp/include/copyright.def@1.24 +1 -1
+ [Bug 2594] Update the year in sntp/include/copyright.def
+
+ChangeSet@1.3123, 2014-05-09 01:32:31-07:00, harlan@hms-mbp11.local
+ turn off the SCCS flag in extern.html
+
+ html/extern.html@1.20 +0 -0
+ Turn off SCCS flag
+
+ChangeSet@1.3122, 2014-05-08 23:29:15-07:00, harlan@hms-mbp11.local
+ [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page
+
+ ChangeLog@1.1473.1.2 +1 -0
+ [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page
+
+ html/drivers/driver1.html@1.21 +3 -3
+ [Bug 2600] Fix "Undisicplined Local Clock" driver1.html page
+
+ChangeSet@1.3121, 2014-05-08 23:07:27-07:00, harlan@hms-mbp11.local
+ [Bug 2589] Update VS2013 project files for libntp
+
+ ChangeLog@1.1473.1.1 +1 -0
+ [Bug 2589] Update VS2013 project files for libntp
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.4 +2 -0
+ [Bug 2589] Update VS2013 project files for libntp
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.3 +6 -0
+ [Bug 2589] Update VS2013 project files for libntp
+
+ChangeSet@1.3107.1.41, 2014-05-06 00:48:08+02:00, jnperlin@hydra.(none)
+ [bug 2597] leap second loose ends -- coverity issues
+
+ ChangeLog@1.1474 +2 -0
+ [bug 2597] leap second loose ends -- coverity issues
+
+ ntpd/ntp_leapsec.c@1.12 +17 -1
+ [bug 2597] leap second loose ends -- coverity issues
+
+ ntpd/ntp_util.c@1.113 +4 -4
+ [bug 2597] leap second loose ends -- coverity issues
+
+ChangeSet@1.3107.1.40, 2014-05-04 06:10:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P441
+ TAG: NTP_4_2_7P441
+
+ ChangeLog@1.1473 +1 -0
+ NTP_4_2_7P441
+
+ ntpd/invoke-ntp.conf.texi@1.120 +1 -1
+ NTP_4_2_7P441
+
+ ntpd/invoke-ntp.keys.texi@1.118 +1 -1
+ NTP_4_2_7P441
+
+ ntpd/invoke-ntpd.texi@1.434 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.conf.5man@1.154 +3019 -0
+ NTP_4_2_7P441
+
+ ntpd/ntp.conf.5mdoc@1.154 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.conf.html@1.115 +1 -1
+ NTP_4_2_7P441
+
+ ntpd/ntp.conf.man.in@1.154 +3019 -0
+ NTP_4_2_7P441
+
+ ntpd/ntp.conf.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.keys.5man@1.152 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.keys.5mdoc@1.152 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.keys.html@1.116 +1 -1
+ NTP_4_2_7P441
+
+ ntpd/ntp.keys.man.in@1.152 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntp.keys.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntpd-opts.c@1.452 +7 -7
+ NTP_4_2_7P441
+
+ ntpd/ntpd-opts.h@1.452 +3 -3
+ NTP_4_2_7P441
+
+ ntpd/ntpd.1ntpdman@1.263 +13 -13
+ NTP_4_2_7P441
+
+ ntpd/ntpd.1ntpdmdoc@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntpd.html@1.110 +2 -2
+ NTP_4_2_7P441
+
+ ntpd/ntpd.man.in@1.263 +13 -13
+ NTP_4_2_7P441
+
+ ntpd/ntpd.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpdc/invoke-ntpdc.texi@1.432 +2 -2
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc-opts.c@1.447 +7 -7
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc-opts.h@1.447 +3 -3
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc.1ntpdcman@1.263 +6 -6
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc.html@1.276 +2 -2
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc.man.in@1.263 +6 -6
+ NTP_4_2_7P441
+
+ ntpdc/ntpdc.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpq/invoke-ntpq.texi@1.435 +2 -2
+ NTP_4_2_7P441
+
+ ntpq/ntpq-opts.c@1.449 +7 -7
+ NTP_4_2_7P441
+
+ ntpq/ntpq-opts.h@1.449 +3 -3
+ NTP_4_2_7P441
+
+ ntpq/ntpq.1ntpqman@1.263 +13 -13
+ NTP_4_2_7P441
+
+ ntpq/ntpq.1ntpqmdoc@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpq/ntpq.html@1.107 +2 -2
+ NTP_4_2_7P441
+
+ ntpq/ntpq.man.in@1.263 +13 -13
+ NTP_4_2_7P441
+
+ ntpq/ntpq.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.434 +2 -2
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.449 +7 -7
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.449 +3 -3
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.263 +6 -6
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.263 +2 -2
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd.html@1.105 +1 -1
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd.man.in@1.263 +6 -6
+ NTP_4_2_7P441
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P441
+
+ packageinfo.sh@1.445 +1 -1
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.25 +6 -6
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.25 +2 -2
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/calc_tickadj.html@1.24 +1 -1
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.24 +6 -6
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P441
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.26 +1 -1
+ NTP_4_2_7P441
+
+ scripts/invoke-plot_summary.texi@1.43 +1 -1
+ NTP_4_2_7P441
+
+ scripts/invoke-summary.texi@1.43 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.252 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.253 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.253 +2 -2
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/ntp-wait.html@1.269 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/ntp-wait.man.in@1.253 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.253 +2 -2
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.41 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.32 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.32 +2 -2
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/ntpsweep.html@1.42 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/ntpsweep.man.in@1.32 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P441
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.41 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.32 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.32 +2 -2
+ NTP_4_2_7P441
+
+ scripts/ntptrace/ntptrace.html@1.42 +1 -1
+ NTP_4_2_7P441
+
+ scripts/ntptrace/ntptrace.man.in@1.32 +6 -6
+ NTP_4_2_7P441
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P441
+
+ scripts/plot_summary.1plot_summaryman@1.43 +6 -6
+ NTP_4_2_7P441
+
+ scripts/plot_summary.1plot_summarymdoc@1.43 +2 -2
+ NTP_4_2_7P441
+
+ scripts/plot_summary.html@1.43 +1 -1
+ NTP_4_2_7P441
+
+ scripts/plot_summary.man.in@1.43 +6 -6
+ NTP_4_2_7P441
+
+ scripts/plot_summary.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P441
+
+ scripts/summary.1summaryman@1.43 +6 -6
+ NTP_4_2_7P441
+
+ scripts/summary.1summarymdoc@1.43 +2 -2
+ NTP_4_2_7P441
+
+ scripts/summary.html@1.43 +1 -1
+ NTP_4_2_7P441
+
+ scripts/summary.man.in@1.43 +6 -6
+ NTP_4_2_7P441
+
+ scripts/summary.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P441
+
+ sntp/invoke-sntp.texi@1.431 +2 -2
+ NTP_4_2_7P441
+
+ sntp/sntp-opts.c@1.446 +7 -7
+ NTP_4_2_7P441
+
+ sntp/sntp-opts.h@1.446 +3 -3
+ NTP_4_2_7P441
+
+ sntp/sntp.1sntpman@1.266 +6 -6
+ NTP_4_2_7P441
+
+ sntp/sntp.1sntpmdoc@1.266 +2 -2
+ NTP_4_2_7P441
+
+ sntp/sntp.html@1.446 +2 -2
+ NTP_4_2_7P441
+
+ sntp/sntp.man.in@1.266 +6 -6
+ NTP_4_2_7P441
+
+ sntp/sntp.mdoc.in@1.266 +2 -2
+ NTP_4_2_7P441
+
+ util/invoke-ntp-keygen.texi@1.435 +2 -2
+ NTP_4_2_7P441
+
+ util/ntp-keygen-opts.c@1.449 +7 -7
+ NTP_4_2_7P441
+
+ util/ntp-keygen-opts.h@1.449 +3 -3
+ NTP_4_2_7P441
+
+ util/ntp-keygen.1ntp-keygenman@1.263 +6 -6
+ NTP_4_2_7P441
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.263 +2 -2
+ NTP_4_2_7P441
+
+ util/ntp-keygen.html@1.111 +2 -2
+ NTP_4_2_7P441
+
+ util/ntp-keygen.man.in@1.263 +6 -6
+ NTP_4_2_7P441
+
+ util/ntp-keygen.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P441
+
+ChangeSet@1.3107.1.39, 2014-05-04 04:51:37+00:00, stenn@psp-deb1.ntp.org
+ nits
+
+ ntpd/ntp_leapsec.c@1.11 +9 -7
+ nits
+
+ ntpd/ntp_util.c@1.112 +2 -2
+ nits
+
+ChangeSet@1.3107.1.38, 2014-04-22 21:40:54+02:00, jnperlin@hydra.(none)
+ [Bug 2597] fixed loose ends: changed/unified logging for leapfile related actions
+
+ ChangeLog@1.1472 +4 -0
+ [Bug 2597] changed/unified logging for leapfile related actions
+
+ include/ntpd.h@1.182 +1 -1
+ [Bug 2597] changed/unified logging for leapfile related actions
+ changed signature for 'check_leap_file()'
+
+ ntpd/ntp_leapsec.c@1.10 +83 -7
+ [Bug 2597] changed/unified logging for leapfile related actions
+ split functionality between 'leapsec_load_file()' and 'leapsec_load_stream()'
+ improve logging for non-existing and successfully loaded files
+
+ ntpd/ntp_leapsec.h@1.7 +17 -4
+ [Bug 2597] changed/unified logging for leapfile related actions
+ split functionality between 'leapsec_load_file()' and 'leapsec_load_stream()'
+
+ ntpd/ntp_timer.c@1.81 +5 -26
+ [Bug 2597] changed/unified logging for leapfile related actions
+ let 'check_leap_file()' do the expiration test and logging
+
+ ntpd/ntp_util.c@1.111 +44 -54
+ [Bug 2597] changed/unified logging for leapfile related actions
+ 'check_leap_file()' checks for leapfile load/reload and expiration,
+ let 'leapsec_load_file()' do the handling & logging for the disk file
+
+ChangeSet@1.3107.1.37, 2014-04-09 10:24:43+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P440
+ TAG: NTP_4_2_7P440
+
+ ChangeLog@1.1471 +1 -0
+ NTP_4_2_7P440
+
+ ntpd/invoke-ntp.conf.texi@1.119 +1 -1
+ NTP_4_2_7P440
+
+ ntpd/invoke-ntp.keys.texi@1.117 +1 -1
+ NTP_4_2_7P440
+
+ ntpd/invoke-ntpd.texi@1.433 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.conf.5man@1.153 +0 -3019
+ NTP_4_2_7P440
+
+ ntpd/ntp.conf.5mdoc@1.153 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.conf.html@1.114 +1 -1
+ NTP_4_2_7P440
+
+ ntpd/ntp.conf.man.in@1.153 +0 -3019
+ NTP_4_2_7P440
+
+ ntpd/ntp.conf.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.keys.5man@1.151 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.keys.5mdoc@1.151 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.keys.html@1.115 +1 -1
+ NTP_4_2_7P440
+
+ ntpd/ntp.keys.man.in@1.151 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntp.keys.mdoc.in@1.151 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntpd-opts.c@1.451 +7 -7
+ NTP_4_2_7P440
+
+ ntpd/ntpd-opts.h@1.451 +3 -3
+ NTP_4_2_7P440
+
+ ntpd/ntpd.1ntpdman@1.262 +6 -6
+ NTP_4_2_7P440
+
+ ntpd/ntpd.1ntpdmdoc@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntpd.html@1.109 +2 -2
+ NTP_4_2_7P440
+
+ ntpd/ntpd.man.in@1.262 +6 -6
+ NTP_4_2_7P440
+
+ ntpd/ntpd.mdoc.in@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpdc/invoke-ntpdc.texi@1.431 +2 -2
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc-opts.c@1.446 +7 -7
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc-opts.h@1.446 +3 -3
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc.1ntpdcman@1.262 +6 -6
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc.html@1.275 +2 -2
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc.man.in@1.262 +6 -6
+ NTP_4_2_7P440
+
+ ntpdc/ntpdc.mdoc.in@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpq/invoke-ntpq.texi@1.434 +2 -2
+ NTP_4_2_7P440
+
+ ntpq/ntpq-opts.c@1.448 +7 -7
+ NTP_4_2_7P440
+
+ ntpq/ntpq-opts.h@1.448 +3 -3
+ NTP_4_2_7P440
+
+ ntpq/ntpq.1ntpqman@1.262 +475 -0
+ NTP_4_2_7P440
+
+ ntpq/ntpq.1ntpqmdoc@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpq/ntpq.html@1.106 +2 -2
+ NTP_4_2_7P440
+
+ ntpq/ntpq.man.in@1.262 +475 -0
+ NTP_4_2_7P440
+
+ ntpq/ntpq.mdoc.in@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.433 +2 -2
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.448 +7 -7
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.448 +3 -3
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.262 +13 -13
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.262 +2 -2
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd.html@1.104 +1 -1
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd.man.in@1.262 +13 -13
+ NTP_4_2_7P440
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.262 +2 -2
+ NTP_4_2_7P440
+
+ packageinfo.sh@1.444 +1 -1
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.24 +6 -6
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.24 +2 -2
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/calc_tickadj.html@1.23 +1 -1
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.23 +6 -6
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P440
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.25 +1 -1
+ NTP_4_2_7P440
+
+ scripts/invoke-plot_summary.texi@1.42 +1 -1
+ NTP_4_2_7P440
+
+ scripts/invoke-summary.texi@1.42 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.251 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.252 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.252 +2 -2
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/ntp-wait.html@1.268 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/ntp-wait.man.in@1.252 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.252 +2 -2
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.40 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.31 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.31 +2 -2
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/ntpsweep.html@1.41 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/ntpsweep.man.in@1.31 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P440
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.40 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.31 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.31 +2 -2
+ NTP_4_2_7P440
+
+ scripts/ntptrace/ntptrace.html@1.41 +1 -1
+ NTP_4_2_7P440
+
+ scripts/ntptrace/ntptrace.man.in@1.31 +6 -6
+ NTP_4_2_7P440
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P440
+
+ scripts/plot_summary.1plot_summaryman@1.42 +6 -6
+ NTP_4_2_7P440
+
+ scripts/plot_summary.1plot_summarymdoc@1.42 +2 -2
+ NTP_4_2_7P440
+
+ scripts/plot_summary.html@1.42 +1 -1
+ NTP_4_2_7P440
+
+ scripts/plot_summary.man.in@1.42 +6 -6
+ NTP_4_2_7P440
+
+ scripts/plot_summary.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P440
+
+ scripts/summary.1summaryman@1.42 +6 -6
+ NTP_4_2_7P440
+
+ scripts/summary.1summarymdoc@1.42 +2 -2
+ NTP_4_2_7P440
+
+ scripts/summary.html@1.42 +1 -1
+ NTP_4_2_7P440
+
+ scripts/summary.man.in@1.42 +6 -6
+ NTP_4_2_7P440
+
+ scripts/summary.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P440
+
+ sntp/invoke-sntp.texi@1.430 +2 -2
+ NTP_4_2_7P440
+
+ sntp/sntp-opts.c@1.445 +7 -7
+ NTP_4_2_7P440
+
+ sntp/sntp-opts.h@1.445 +3 -3
+ NTP_4_2_7P440
+
+ sntp/sntp.1sntpman@1.265 +6 -6
+ NTP_4_2_7P440
+
+ sntp/sntp.1sntpmdoc@1.265 +2 -2
+ NTP_4_2_7P440
+
+ sntp/sntp.html@1.445 +2 -2
+ NTP_4_2_7P440
+
+ sntp/sntp.man.in@1.265 +6 -6
+ NTP_4_2_7P440
+
+ sntp/sntp.mdoc.in@1.265 +2 -2
+ NTP_4_2_7P440
+
+ util/invoke-ntp-keygen.texi@1.434 +2 -2
+ NTP_4_2_7P440
+
+ util/ntp-keygen-opts.c@1.448 +7 -7
+ NTP_4_2_7P440
+
+ util/ntp-keygen-opts.h@1.448 +3 -3
+ NTP_4_2_7P440
+
+ util/ntp-keygen.1ntp-keygenman@1.262 +6 -6
+ NTP_4_2_7P440
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.262 +2 -2
+ NTP_4_2_7P440
+
+ util/ntp-keygen.html@1.110 +2 -2
+ NTP_4_2_7P440
+
+ util/ntp-keygen.man.in@1.262 +6 -6
+ NTP_4_2_7P440
+
+ util/ntp-keygen.mdoc.in@1.262 +2 -2
+ NTP_4_2_7P440
+
+ChangeSet@1.3107.4.2, 2014-04-08 07:40:51+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ChangeLog@1.1468.1.2 +1 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ ntpd/ntpd.c@1.154 +46 -45
+ [Bug 2536] ntpd sandboxing support (libseccomp2) cleanup
+
+ChangeSet@1.3107.4.1, 2014-04-03 10:22:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P439
+ TAG: NTP_4_2_7P439
+
+ ChangeLog@1.1468.1.1 +1 -0
+ NTP_4_2_7P439
+
+ ntpd/invoke-ntp.conf.texi@1.118 +1 -1
+ NTP_4_2_7P439
+
+ ntpd/invoke-ntp.keys.texi@1.116 +1 -1
+ NTP_4_2_7P439
+
+ ntpd/invoke-ntpd.texi@1.432 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.conf.5man@1.152 +6 -6
+ NTP_4_2_7P439
+
+ ntpd/ntp.conf.5mdoc@1.152 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.conf.html@1.113 +1 -1
+ NTP_4_2_7P439
+
+ ntpd/ntp.conf.man.in@1.152 +6 -6
+ NTP_4_2_7P439
+
+ ntpd/ntp.conf.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.keys.5man@1.150 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.keys.5mdoc@1.150 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.keys.html@1.114 +1 -1
+ NTP_4_2_7P439
+
+ ntpd/ntp.keys.man.in@1.150 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntp.keys.mdoc.in@1.150 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntpd-opts.c@1.450 +7 -7
+ NTP_4_2_7P439
+
+ ntpd/ntpd-opts.h@1.450 +3 -3
+ NTP_4_2_7P439
+
+ ntpd/ntpd.1ntpdman@1.261 +6 -6
+ NTP_4_2_7P439
+
+ ntpd/ntpd.1ntpdmdoc@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntpd.html@1.108 +2 -2
+ NTP_4_2_7P439
+
+ ntpd/ntpd.man.in@1.261 +6 -6
+ NTP_4_2_7P439
+
+ ntpd/ntpd.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpdc/invoke-ntpdc.texi@1.430 +2 -2
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc-opts.c@1.445 +7 -7
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc-opts.h@1.445 +3 -3
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc.1ntpdcman@1.261 +6 -6
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc.html@1.274 +2 -2
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc.man.in@1.261 +6 -6
+ NTP_4_2_7P439
+
+ ntpdc/ntpdc.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpq/invoke-ntpq.texi@1.433 +2 -2
+ NTP_4_2_7P439
+
+ ntpq/ntpq-opts.c@1.447 +7 -7
+ NTP_4_2_7P439
+
+ ntpq/ntpq-opts.h@1.447 +3 -3
+ NTP_4_2_7P439
+
+ ntpq/ntpq.1ntpqman@1.261 +0 -475
+ NTP_4_2_7P439
+
+ ntpq/ntpq.1ntpqmdoc@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpq/ntpq.html@1.105 +2 -2
+ NTP_4_2_7P439
+
+ ntpq/ntpq.man.in@1.261 +0 -475
+ NTP_4_2_7P439
+
+ ntpq/ntpq.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.432 +2 -2
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.447 +7 -7
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.447 +3 -3
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.261 +13 -13
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.261 +2 -2
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd.html@1.103 +1 -1
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd.man.in@1.261 +13 -13
+ NTP_4_2_7P439
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P439
+
+ packageinfo.sh@1.443 +1 -1
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.23 +6 -6
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.23 +2 -2
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/calc_tickadj.html@1.22 +1 -1
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.22 +6 -6
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P439
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.24 +1 -1
+ NTP_4_2_7P439
+
+ scripts/invoke-plot_summary.texi@1.41 +1 -1
+ NTP_4_2_7P439
+
+ scripts/invoke-summary.texi@1.41 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.250 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.251 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.251 +2 -2
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/ntp-wait.html@1.267 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/ntp-wait.man.in@1.251 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.251 +2 -2
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.39 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.30 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.30 +2 -2
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/ntpsweep.html@1.40 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/ntpsweep.man.in@1.30 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P439
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.39 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.30 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.30 +2 -2
+ NTP_4_2_7P439
+
+ scripts/ntptrace/ntptrace.html@1.40 +1 -1
+ NTP_4_2_7P439
+
+ scripts/ntptrace/ntptrace.man.in@1.30 +6 -6
+ NTP_4_2_7P439
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P439
+
+ scripts/plot_summary.1plot_summaryman@1.41 +6 -6
+ NTP_4_2_7P439
+
+ scripts/plot_summary.1plot_summarymdoc@1.41 +2 -2
+ NTP_4_2_7P439
+
+ scripts/plot_summary.html@1.41 +1 -1
+ NTP_4_2_7P439
+
+ scripts/plot_summary.man.in@1.41 +6 -6
+ NTP_4_2_7P439
+
+ scripts/plot_summary.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P439
+
+ scripts/summary.1summaryman@1.41 +6 -6
+ NTP_4_2_7P439
+
+ scripts/summary.1summarymdoc@1.41 +2 -2
+ NTP_4_2_7P439
+
+ scripts/summary.html@1.41 +1 -1
+ NTP_4_2_7P439
+
+ scripts/summary.man.in@1.41 +6 -6
+ NTP_4_2_7P439
+
+ scripts/summary.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P439
+
+ sntp/invoke-sntp.texi@1.429 +2 -2
+ NTP_4_2_7P439
+
+ sntp/sntp-opts.c@1.444 +7 -7
+ NTP_4_2_7P439
+
+ sntp/sntp-opts.h@1.444 +3 -3
+ NTP_4_2_7P439
+
+ sntp/sntp.1sntpman@1.264 +6 -6
+ NTP_4_2_7P439
+
+ sntp/sntp.1sntpmdoc@1.264 +2 -2
+ NTP_4_2_7P439
+
+ sntp/sntp.html@1.444 +2 -2
+ NTP_4_2_7P439
+
+ sntp/sntp.man.in@1.264 +6 -6
+ NTP_4_2_7P439
+
+ sntp/sntp.mdoc.in@1.264 +2 -2
+ NTP_4_2_7P439
+
+ util/invoke-ntp-keygen.texi@1.433 +2 -2
+ NTP_4_2_7P439
+
+ util/ntp-keygen-opts.c@1.447 +7 -7
+ NTP_4_2_7P439
+
+ util/ntp-keygen-opts.h@1.447 +3 -3
+ NTP_4_2_7P439
+
+ util/ntp-keygen.1ntp-keygenman@1.261 +6 -6
+ NTP_4_2_7P439
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.261 +2 -2
+ NTP_4_2_7P439
+
+ util/ntp-keygen.html@1.109 +2 -2
+ NTP_4_2_7P439
+
+ util/ntp-keygen.man.in@1.261 +6 -6
+ NTP_4_2_7P439
+
+ util/ntp-keygen.mdoc.in@1.261 +2 -2
+ NTP_4_2_7P439
+
+ChangeSet@1.3107.1.35, 2014-04-02 20:26:10+02:00, jnperlin@hydra.(none)
+ [Bug 2570] cleanup: log format for successful leapfile load
+
+ ChangeLog@1.1469 +1 -0
+ [Bug 2570] cleanup: log format for successful leapfile load
+
+ ntpd/ntp_leapsec.c@1.9 +1 -1
+ [Bug 2570] cleanup: log format for successful leapfile load
+
+ChangeSet@1.3107.1.34, 2014-04-02 03:00:46-04:00, stenn@deacon.udel.edu
+ [Bug 2589] fix VS2009 compile problem
+
+ ChangeLog@1.1468 +1 -0
+ [Bug 2589] fix VS2009 compile problem
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.50 +10 -2
+ [Bug 2589] fix VS2009 compile problem
+
+ChangeSet@1.3107.1.33, 2014-04-01 10:50:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P438
+ TAG: NTP_4_2_7P438
+
+ ChangeLog@1.1467 +1 -0
+ NTP_4_2_7P438
+
+ ntpd/invoke-ntp.conf.texi@1.117 +1 -1
+ NTP_4_2_7P438
+
+ ntpd/invoke-ntp.keys.texi@1.115 +1 -1
+ NTP_4_2_7P438
+
+ ntpd/invoke-ntpd.texi@1.431 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.conf.5man@1.151 +6 -6
+ NTP_4_2_7P438
+
+ ntpd/ntp.conf.5mdoc@1.151 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.conf.html@1.112 +1 -1
+ NTP_4_2_7P438
+
+ ntpd/ntp.conf.man.in@1.151 +6 -6
+ NTP_4_2_7P438
+
+ ntpd/ntp.conf.mdoc.in@1.151 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.keys.5man@1.149 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.keys.5mdoc@1.149 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.keys.html@1.113 +1 -1
+ NTP_4_2_7P438
+
+ ntpd/ntp.keys.man.in@1.149 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntp.keys.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntpd-opts.c@1.449 +7 -7
+ NTP_4_2_7P438
+
+ ntpd/ntpd-opts.h@1.449 +3 -3
+ NTP_4_2_7P438
+
+ ntpd/ntpd.1ntpdman@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpd/ntpd.1ntpdmdoc@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntpd.html@1.107 +2 -2
+ NTP_4_2_7P438
+
+ ntpd/ntpd.man.in@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpd/ntpd.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpdc/invoke-ntpdc.texi@1.429 +2 -2
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc-opts.c@1.444 +7 -7
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc-opts.h@1.444 +3 -3
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc.1ntpdcman@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc.html@1.273 +2 -2
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc.man.in@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpdc/ntpdc.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpq/invoke-ntpq.texi@1.432 +2 -2
+ NTP_4_2_7P438
+
+ ntpq/ntpq-opts.c@1.446 +7 -7
+ NTP_4_2_7P438
+
+ ntpq/ntpq-opts.h@1.446 +3 -3
+ NTP_4_2_7P438
+
+ ntpq/ntpq.1ntpqman@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpq/ntpq.1ntpqmdoc@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpq/ntpq.html@1.104 +2 -2
+ NTP_4_2_7P438
+
+ ntpq/ntpq.man.in@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpq/ntpq.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.431 +2 -2
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.446 +7 -7
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.446 +3 -3
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.260 +2 -2
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd.html@1.102 +1 -1
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd.man.in@1.260 +6 -6
+ NTP_4_2_7P438
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P438
+
+ packageinfo.sh@1.442 +1 -1
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.22 +6 -6
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.22 +2 -2
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/calc_tickadj.html@1.21 +1 -1
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.21 +6 -6
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P438
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.23 +1 -1
+ NTP_4_2_7P438
+
+ scripts/invoke-plot_summary.texi@1.40 +1 -1
+ NTP_4_2_7P438
+
+ scripts/invoke-summary.texi@1.40 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.249 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.250 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.250 +2 -2
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/ntp-wait.html@1.266 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/ntp-wait.man.in@1.250 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.250 +2 -2
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.38 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.29 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.29 +2 -2
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/ntpsweep.html@1.39 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/ntpsweep.man.in@1.29 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P438
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.38 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.29 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.29 +2 -2
+ NTP_4_2_7P438
+
+ scripts/ntptrace/ntptrace.html@1.39 +1 -1
+ NTP_4_2_7P438
+
+ scripts/ntptrace/ntptrace.man.in@1.29 +6 -6
+ NTP_4_2_7P438
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P438
+
+ scripts/plot_summary.1plot_summaryman@1.40 +6 -6
+ NTP_4_2_7P438
+
+ scripts/plot_summary.1plot_summarymdoc@1.40 +2 -2
+ NTP_4_2_7P438
+
+ scripts/plot_summary.html@1.40 +1 -1
+ NTP_4_2_7P438
+
+ scripts/plot_summary.man.in@1.40 +6 -6
+ NTP_4_2_7P438
+
+ scripts/plot_summary.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P438
+
+ scripts/summary.1summaryman@1.40 +6 -6
+ NTP_4_2_7P438
+
+ scripts/summary.1summarymdoc@1.40 +2 -2
+ NTP_4_2_7P438
+
+ scripts/summary.html@1.40 +1 -1
+ NTP_4_2_7P438
+
+ scripts/summary.man.in@1.40 +6 -6
+ NTP_4_2_7P438
+
+ scripts/summary.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P438
+
+ sntp/invoke-sntp.texi@1.428 +2 -2
+ NTP_4_2_7P438
+
+ sntp/sntp-opts.c@1.443 +7 -7
+ NTP_4_2_7P438
+
+ sntp/sntp-opts.h@1.443 +3 -3
+ NTP_4_2_7P438
+
+ sntp/sntp.1sntpman@1.263 +6 -6
+ NTP_4_2_7P438
+
+ sntp/sntp.1sntpmdoc@1.263 +2 -2
+ NTP_4_2_7P438
+
+ sntp/sntp.html@1.443 +2 -2
+ NTP_4_2_7P438
+
+ sntp/sntp.man.in@1.263 +6 -6
+ NTP_4_2_7P438
+
+ sntp/sntp.mdoc.in@1.263 +2 -2
+ NTP_4_2_7P438
+
+ util/invoke-ntp-keygen.texi@1.432 +2 -2
+ NTP_4_2_7P438
+
+ util/ntp-keygen-opts.c@1.446 +7 -7
+ NTP_4_2_7P438
+
+ util/ntp-keygen-opts.h@1.446 +3 -3
+ NTP_4_2_7P438
+
+ util/ntp-keygen.1ntp-keygenman@1.260 +6 -6
+ NTP_4_2_7P438
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.260 +2 -2
+ NTP_4_2_7P438
+
+ util/ntp-keygen.html@1.108 +2 -2
+ NTP_4_2_7P438
+
+ util/ntp-keygen.man.in@1.260 +6 -6
+ NTP_4_2_7P438
+
+ util/ntp-keygen.mdoc.in@1.260 +2 -2
+ NTP_4_2_7P438
+
+ChangeSet@1.3107.1.32, 2014-04-01 02:26:13-04:00, stenn@deacon.udel.edu
+ Windows build documentation updates
+
+ ChangeLog@1.1466 +1 -0
+ Windows build documentation updates
+
+ html/hints/winnt.html@1.23 +6 -5
+ Windows build documentation updates
+
+ChangeSet@1.3107.1.31, 2014-03-31 10:52:43+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P437
+ TAG: NTP_4_2_7P437
+
+ ChangeLog@1.1465 +1 -0
+ NTP_4_2_7P437
+
+ ntpd/invoke-ntp.conf.texi@1.116 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/invoke-ntp.keys.texi@1.114 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/invoke-ntpd.texi@1.430 +2 -2
+ NTP_4_2_7P437
+
+ ntpd/ntp.conf.5man@1.150 +6 -6
+ NTP_4_2_7P437
+
+ ntpd/ntp.conf.5mdoc@1.150 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntp.conf.html@1.111 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntp.conf.man.in@1.150 +6 -6
+ NTP_4_2_7P437
+
+ ntpd/ntp.conf.mdoc.in@1.150 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntp.keys.5man@1.148 +2 -2
+ NTP_4_2_7P437
+
+ ntpd/ntp.keys.5mdoc@1.148 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntp.keys.html@1.112 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntp.keys.man.in@1.148 +2 -2
+ NTP_4_2_7P437
+
+ ntpd/ntp.keys.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntpd-opts.c@1.448 +7 -7
+ NTP_4_2_7P437
+
+ ntpd/ntpd-opts.h@1.448 +3 -3
+ NTP_4_2_7P437
+
+ ntpd/ntpd.1ntpdman@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpd/ntpd.1ntpdmdoc@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpd/ntpd.html@1.106 +4 -4
+ NTP_4_2_7P437
+
+ ntpd/ntpd.man.in@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpd/ntpd.mdoc.in@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpdc/invoke-ntpdc.texi@1.428 +2 -2
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc-opts.c@1.443 +7 -7
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc-opts.h@1.443 +3 -3
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc.1ntpdcman@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc.html@1.272 +2 -2
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc.man.in@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpdc/ntpdc.mdoc.in@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpq/invoke-ntpq.texi@1.431 +2 -2
+ NTP_4_2_7P437
+
+ ntpq/ntpq-opts.c@1.445 +7 -7
+ NTP_4_2_7P437
+
+ ntpq/ntpq-opts.h@1.445 +3 -3
+ NTP_4_2_7P437
+
+ ntpq/ntpq.1ntpqman@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpq/ntpq.1ntpqmdoc@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpq/ntpq.html@1.103 +2 -2
+ NTP_4_2_7P437
+
+ ntpq/ntpq.man.in@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpq/ntpq.mdoc.in@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.430 +2 -2
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.445 +7 -7
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.445 +3 -3
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.259 +1 -1
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd.html@1.101 +1 -1
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd.man.in@1.259 +6 -6
+ NTP_4_2_7P437
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.259 +1 -1
+ NTP_4_2_7P437
+
+ packageinfo.sh@1.441 +1 -1
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.21 +6 -6
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.21 +1 -1
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/calc_tickadj.html@1.20 +1 -1
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.20 +6 -6
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.21 +1 -1
+ NTP_4_2_7P437
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.22 +1 -1
+ NTP_4_2_7P437
+
+ scripts/invoke-plot_summary.texi@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/invoke-summary.texi@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.248 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.249 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.249 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/ntp-wait.html@1.265 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/ntp-wait.man.in@1.249 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.249 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.37 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.28 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.28 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/ntpsweep.html@1.38 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/ntpsweep.man.in@1.28 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.29 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.37 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.28 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.28 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntptrace/ntptrace.html@1.38 +1 -1
+ NTP_4_2_7P437
+
+ scripts/ntptrace/ntptrace.man.in@1.28 +6 -6
+ NTP_4_2_7P437
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.29 +1 -1
+ NTP_4_2_7P437
+
+ scripts/plot_summary.1plot_summaryman@1.39 +6 -6
+ NTP_4_2_7P437
+
+ scripts/plot_summary.1plot_summarymdoc@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/plot_summary.html@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/plot_summary.man.in@1.39 +6 -6
+ NTP_4_2_7P437
+
+ scripts/plot_summary.mdoc.in@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/summary.1summaryman@1.39 +6 -6
+ NTP_4_2_7P437
+
+ scripts/summary.1summarymdoc@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/summary.html@1.39 +1 -1
+ NTP_4_2_7P437
+
+ scripts/summary.man.in@1.39 +6 -6
+ NTP_4_2_7P437
+
+ scripts/summary.mdoc.in@1.39 +1 -1
+ NTP_4_2_7P437
+
+ sntp/invoke-sntp.texi@1.427 +2 -2
+ NTP_4_2_7P437
+
+ sntp/sntp-opts.c@1.442 +7 -7
+ NTP_4_2_7P437
+
+ sntp/sntp-opts.h@1.442 +3 -3
+ NTP_4_2_7P437
+
+ sntp/sntp.1sntpman@1.262 +6 -6
+ NTP_4_2_7P437
+
+ sntp/sntp.1sntpmdoc@1.262 +1 -1
+ NTP_4_2_7P437
+
+ sntp/sntp.html@1.442 +2 -2
+ NTP_4_2_7P437
+
+ sntp/sntp.man.in@1.262 +6 -6
+ NTP_4_2_7P437
+
+ sntp/sntp.mdoc.in@1.262 +1 -1
+ NTP_4_2_7P437
+
+ util/invoke-ntp-keygen.texi@1.431 +2 -2
+ NTP_4_2_7P437
+
+ util/ntp-keygen-opts.c@1.445 +7 -7
+ NTP_4_2_7P437
+
+ util/ntp-keygen-opts.h@1.445 +3 -3
+ NTP_4_2_7P437
+
+ util/ntp-keygen.1ntp-keygenman@1.259 +6 -6
+ NTP_4_2_7P437
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.259 +1 -1
+ NTP_4_2_7P437
+
+ util/ntp-keygen.html@1.107 +2 -2
+ NTP_4_2_7P437
+
+ util/ntp-keygen.man.in@1.259 +6 -6
+ NTP_4_2_7P437
+
+ util/ntp-keygen.mdoc.in@1.259 +1 -1
+ NTP_4_2_7P437
+
+ChangeSet@1.3107.1.30, 2014-03-31 04:06:33-04:00, stenn@deacon.udel.edu
+ [Bug 2537] ntpd truncates symmetric keys to 20 bytes
+
+ ChangeLog@1.1464 +1 -0
+ [Bug 2537] ntpd truncates symmetric keys to 20 bytes
+
+ libntp/authreadkeys.c@1.19 +2 -2
+ [Bug 2537] ntpd truncates symmetric keys to 20 bytes
+
+ChangeSet@1.3107.1.29, 2014-03-31 07:53:05+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2546] Documentation updates
+
+ ChangeLog@1.1463 +1 -0
+ [Bug 2546] Documentation updates
+
+ChangeSet@1.3107.3.1, 2014-03-31 07:50:34+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2546] Documentation updates
+
+ ChangeLog@1.1453.1.1 +1 -0
+ [Bug 2546] Documentation updates
+
+ html/build.html@1.26 +3 -3
+ [Bug 2546] Documentation updates
+
+ html/drivers/driver20.html@1.28 +5 -1
+ [Bug 2546] Documentation updates
+
+ html/drivers/driver22.html@1.21 +4 -3
+ [Bug 2546] Documentation updates
+
+ html/hints/winnt.html@1.22 +11 -109
+ [Bug 2546] Documentation updates
+
+ html/index.html@1.46 +3 -3
+ [Bug 2546] Documentation updates
+
+ChangeSet@1.3107.1.27, 2014-03-31 06:48:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P436
+ TAG: NTP_4_2_7P436
+
+ ChangeLog@1.1461 +1 -0
+ NTP_4_2_7P436
+
+ ntpd/invoke-ntp.conf.texi@1.115 +1 -1
+ NTP_4_2_7P436
+
+ ntpd/invoke-ntp.keys.texi@1.113 +1 -1
+ NTP_4_2_7P436
+
+ ntpd/invoke-ntpd.texi@1.429 +4 -4
+ NTP_4_2_7P436
+
+ ntpd/ntp.conf.5man@1.149 +32 -3
+ NTP_4_2_7P436
+
+ ntpd/ntp.conf.5mdoc@1.149 +20 -1
+ NTP_4_2_7P436
+
+ ntpd/ntp.conf.html@1.110 +91 -104
+ NTP_4_2_7P436
+
+ ntpd/ntp.conf.man.in@1.149 +32 -3
+ NTP_4_2_7P436
+
+ ntpd/ntp.conf.mdoc.in@1.149 +20 -1
+ NTP_4_2_7P436
+
+ ntpd/ntp.keys.5man@1.147 +21 -2
+ NTP_4_2_7P436
+
+ ntpd/ntp.keys.5mdoc@1.147 +21 -2
+ NTP_4_2_7P436
+
+ ntpd/ntp.keys.html@1.111 +17 -29
+ NTP_4_2_7P436
+
+ ntpd/ntp.keys.man.in@1.147 +21 -2
+ NTP_4_2_7P436
+
+ ntpd/ntp.keys.mdoc.in@1.147 +21 -2
+ NTP_4_2_7P436
+
+ ntpd/ntpd-opts.c@1.447 +7 -7
+ NTP_4_2_7P436
+
+ ntpd/ntpd-opts.h@1.447 +3 -3
+ NTP_4_2_7P436
+
+ ntpd/ntpd.1ntpdman@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpd/ntpd.1ntpdmdoc@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpd/ntpd.html@1.105 +100 -142
+ NTP_4_2_7P436
+
+ ntpd/ntpd.man.in@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpd/ntpd.mdoc.in@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpdc/invoke-ntpdc.texi@1.427 +2 -2
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc-opts.c@1.442 +7 -7
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc-opts.h@1.442 +3 -3
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc.1ntpdcman@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc.html@1.271 +57 -77
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc.man.in@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpdc/ntpdc.mdoc.in@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpq/invoke-ntpq.texi@1.430 +2 -2
+ NTP_4_2_7P436
+
+ ntpq/ntpq-opts.c@1.444 +7 -7
+ NTP_4_2_7P436
+
+ ntpq/ntpq-opts.h@1.444 +3 -3
+ NTP_4_2_7P436
+
+ ntpq/ntpq.1ntpqman@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpq/ntpq.1ntpqmdoc@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpq/ntpq.html@1.102 +97 -119
+ NTP_4_2_7P436
+
+ ntpq/ntpq.man.in@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpq/ntpq.mdoc.in@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.429 +2 -2
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.444 +7 -7
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.444 +3 -3
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.258 +20 -1
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd.html@1.100 +10 -14
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd.man.in@1.258 +32 -3
+ NTP_4_2_7P436
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.258 +20 -1
+ NTP_4_2_7P436
+
+ packageinfo.sh@1.440 +1 -1
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.20 +32 -3
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.20 +20 -1
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/calc_tickadj.html@1.19 +22 -34
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.19 +32 -3
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.20 +20 -1
+ NTP_4_2_7P436
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.21 +1 -1
+ NTP_4_2_7P436
+
+ scripts/invoke-plot_summary.texi@1.38 +1 -1
+ NTP_4_2_7P436
+
+ scripts/invoke-summary.texi@1.38 +1 -1
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.247 +1 -1
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.248 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.248 +20 -1
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/ntp-wait.html@1.264 +30 -48
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/ntp-wait.man.in@1.248 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.248 +20 -1
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.36 +1 -1
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.27 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.27 +20 -1
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/ntpsweep.html@1.37 +32 -43
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/ntpsweep.man.in@1.27 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.28 +20 -1
+ NTP_4_2_7P436
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.36 +1 -1
+ NTP_4_2_7P436
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.27 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.27 +20 -1
+ NTP_4_2_7P436
+
+ scripts/ntptrace/ntptrace.html@1.37 +26 -35
+ NTP_4_2_7P436
+
+ scripts/ntptrace/ntptrace.man.in@1.27 +32 -3
+ NTP_4_2_7P436
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.28 +20 -1
+ NTP_4_2_7P436
+
+ scripts/plot_summary.1plot_summaryman@1.38 +33 -3
+ NTP_4_2_7P436
+
+ scripts/plot_summary.1plot_summarymdoc@1.38 +21 -1
+ NTP_4_2_7P436
+
+ scripts/plot_summary.html@1.38 +28 -46
+ NTP_4_2_7P436
+
+ scripts/plot_summary.man.in@1.38 +33 -3
+ NTP_4_2_7P436
+
+ scripts/plot_summary.mdoc.in@1.38 +21 -1
+ NTP_4_2_7P436
+
+ scripts/summary.1summaryman@1.38 +32 -3
+ NTP_4_2_7P436
+
+ scripts/summary.1summarymdoc@1.38 +20 -1
+ NTP_4_2_7P436
+
+ scripts/summary.html@1.38 +26 -38
+ NTP_4_2_7P436
+
+ scripts/summary.man.in@1.38 +32 -3
+ NTP_4_2_7P436
+
+ scripts/summary.mdoc.in@1.38 +20 -1
+ NTP_4_2_7P436
+
+ sntp/invoke-sntp.texi@1.426 +2 -2
+ NTP_4_2_7P436
+
+ sntp/sntp-opts.c@1.441 +7 -7
+ NTP_4_2_7P436
+
+ sntp/sntp-opts.h@1.441 +3 -3
+ NTP_4_2_7P436
+
+ sntp/sntp.1sntpman@1.261 +32 -3
+ NTP_4_2_7P436
+
+ sntp/sntp.1sntpmdoc@1.261 +20 -1
+ NTP_4_2_7P436
+
+ sntp/sntp.html@1.441 +85 -109
+ NTP_4_2_7P436
+
+ sntp/sntp.man.in@1.261 +32 -3
+ NTP_4_2_7P436
+
+ sntp/sntp.mdoc.in@1.261 +20 -1
+ NTP_4_2_7P436
+
+ util/invoke-ntp-keygen.texi@1.430 +2 -2
+ NTP_4_2_7P436
+
+ util/ntp-keygen-opts.c@1.444 +7 -7
+ NTP_4_2_7P436
+
+ util/ntp-keygen-opts.h@1.444 +3 -3
+ NTP_4_2_7P436
+
+ util/ntp-keygen.1ntp-keygenman@1.258 +32 -3
+ NTP_4_2_7P436
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.258 +20 -1
+ NTP_4_2_7P436
+
+ util/ntp-keygen.html@1.106 +124 -183
+ NTP_4_2_7P436
+
+ util/ntp-keygen.man.in@1.258 +32 -3
+ NTP_4_2_7P436
+
+ util/ntp-keygen.mdoc.in@1.258 +20 -1
+ NTP_4_2_7P436
+
+ChangeSet@1.3107.1.26, 2014-03-31 04:52:47+00:00, stenn@psp-fb1.ntp.org
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ChangeLog@1.1460 +4 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/invoke-ntp.conf.texi@1.114 +1 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/invoke-ntp.keys.texi@1.112 +1 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/invoke-ntpd.texi@1.428 +3 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.5man@1.148 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.5mdoc@1.148 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.def@1.12 +0 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.html@1.109 +104 -92
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.man.in@1.148 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.conf.mdoc.in@1.148 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.5man@1.146 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.5mdoc@1.146 +3 -23
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.def@1.10 +0 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.html@1.110 +29 -18
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.man.in@1.146 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntp.keys.mdoc.in@1.146 +3 -23
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd-opts.c@1.446 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd-opts.def@1.11 +0 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd-opts.h@1.446 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd.1ntpdman@1.257 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd.1ntpdmdoc@1.257 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd.html@1.104 +143 -101
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd.man.in@1.257 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpd.mdoc.in@1.257 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpdsim-opts.c@1.23 +196 -195
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpd/ntpdsim-opts.h@1.23 +16 -11
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/invoke-ntpdc.texi@1.426 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc-opts.c@1.441 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc-opts.h@1.441 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc.1ntpdcman@1.257 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.257 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc.html@1.270 +75 -55
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc.man.in@1.257 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpdc/ntpdc.mdoc.in@1.257 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/invoke-ntpq.texi@1.429 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq-opts.c@1.443 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq-opts.h@1.443 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq.1ntpqman@1.257 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq.1ntpqmdoc@1.257 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq.html@1.101 +118 -96
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq.man.in@1.257 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpq/ntpq.mdoc.in@1.257 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.428 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.443 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.10 +0 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.443 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.257 +3 -36
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.257 +2 -23
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd.html@1.99 +13 -9
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd.man.in@1.257 +3 -36
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.257 +2 -23
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.3 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.19 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.19 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj.html@1.18 +34 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.18 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.19 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.20 +2 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/invoke-plot_summary.texi@1.37 +2 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/invoke-summary.texi@1.37 +2 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.246 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.247 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.247 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/ntp-wait.html@1.263 +47 -29
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/ntp-wait.man.in@1.247 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.247 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.35 +2 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep-opts@1.3 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.26 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.26 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep.html@1.36 +43 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep.man.in@1.26 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.27 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.35 +2 -2
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace-opts@1.3 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.26 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.26 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace.html@1.36 +35 -26
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace.man.in@1.26 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.27 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary-opts@1.3 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary.1plot_summaryman@1.37 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary.1plot_summarymdoc@1.37 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary.html@1.37 +46 -28
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary.man.in@1.37 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/plot_summary.mdoc.in@1.37 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary-opts@1.3 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary.1summaryman@1.37 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary.1summarymdoc@1.37 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary.html@1.37 +38 -26
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary.man.in@1.37 +3 -32
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ scripts/summary.mdoc.in@1.37 +2 -21
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/ag-tpl/perlopt.tpl@1.3 +66 -55
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/include/autogen-version.def@1.20 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/include/copyright.def@1.23 +8 -4
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/invoke-sntp.texi@1.425 +1 -4
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp-opts.c@1.440 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp-opts.def@1.43 +0 -9
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp-opts.h@1.440 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp.1sntpman@1.260 +4 -38
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp.1sntpmdoc@1.260 +3 -25
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp.html@1.440 +104 -91
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp.man.in@1.260 +4 -38
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ sntp/sntp.mdoc.in@1.260 +3 -25
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/invoke-ntp-keygen.texi@1.429 +1 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen-opts.c@1.443 +6 -6
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen-opts.def@1.26 +0 -1
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen-opts.h@1.443 +8 -3
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen.1ntp-keygenman@1.257 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.257 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen.html@1.105 +182 -123
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen.man.in@1.257 +3 -33
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ util/ntp-keygen.mdoc.in@1.257 +2 -22
+ * Update to libopts-40.2.15, and autogen-5.18.3pre18.
+ * [Bug 2311] Add more tags to mdoc2xxx.
+ * [Bug 2502] Assorted text replacement errors in 4.2.7p345
+ * [Bug 2538] ntp programs print exit code as part of the "usage" text.
+
+ChangeSet@1.3107.1.25, 2014-03-29 23:11:12+00:00, stenn@psp-fb1.ntp.org
+ Update to libopts-40.2.15
+
+ ChangeLog@1.1459 +1 -0
+ Update to libopts-40.2.15
+
+ sntp/libopts/COPYING.gplv3@1.7 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/COPYING.lgplv3@1.7 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/Makefile.am@1.24 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/README@1.9 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/ag-char-map.h@1.27 +2 -2
+ Update to libopts-40.2.15
+
+ sntp/libopts/alias.c@1.7 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/ao-strs.c@1.13 +2 -2
+ Update to libopts-40.2.15
+
+ sntp/libopts/ao-strs.h@1.12 +2 -2
+ Update to libopts-40.2.15
+
+ sntp/libopts/autoopts.c@1.19 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/autoopts.h@1.17 +11 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/autoopts/options.h@1.26 +6 -6
+ Update to libopts-40.2.15
+
+ sntp/libopts/autoopts/project.h@1.7 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/autoopts/usage-txt.h@1.26 +7 -7
+ Update to libopts-40.2.15
+
+ sntp/libopts/boolean.c@1.14 +14 -19
+ Update to libopts-40.2.15
+
+ sntp/libopts/check.c@1.7 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/compat/compat.h@1.15 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/compat/windows-config.h@1.13 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/configfile.c@1.21 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/cook.c@1.14 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/enum.c@1.10 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/env.c@1.8 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/file.c@1.14 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/find.c@1.10 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/genshell.c@1.27 +9 -9
+ Update to libopts-40.2.15
+
+ sntp/libopts/genshell.h@1.27 +9 -4
+ Update to libopts-40.2.15
+
+ sntp/libopts/gettext.h@1.3 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/init.c@1.6 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/load.c@1.19 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/m4/libopts.m4@1.30 +5 -5
+ Update to libopts-40.2.15
+
+ sntp/libopts/m4/liboptschk.m4@1.12 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/makeshell.c@1.17 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/nested.c@1.14 +75 -52
+ Update to libopts-40.2.15
+
+ sntp/libopts/numeric.c@1.13 +8 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/option-value-type.c@1.14 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/option-value-type.h@1.28 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/option-xat-attribute.c@1.14 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/option-xat-attribute.h@1.28 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/parse-duration.c@1.11 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/parse-duration.h@1.9 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/pgusage.c@1.16 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/proto.h@1.27 +2 -2
+ Update to libopts-40.2.15
+
+ sntp/libopts/putshell.c@1.14 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/reset.c@1.15 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/restore.c@1.13 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/save.c@1.16 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/sort.c@1.13 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/stack.c@1.15 +41 -46
+ Update to libopts-40.2.15
+
+ sntp/libopts/streqvcmp.c@1.15 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/text_mmap.c@1.16 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/time.c@1.14 +32 -35
+ Update to libopts-40.2.15
+
+ sntp/libopts/tokenize.c@1.11 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/usage.c@1.19 +1 -1
+ Update to libopts-40.2.15
+
+ sntp/libopts/version.c@1.16 +1 -1
+ Update to libopts-40.2.15
+
+ChangeSet@1.3107.1.24, 2014-03-29 11:41:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P435
+ TAG: NTP_4_2_7P435
+
+ ChangeLog@1.1458 +1 -0
+ NTP_4_2_7P435
+
+ ntpd/invoke-ntp.conf.texi@1.113 +1 -1
+ NTP_4_2_7P435
+
+ ntpd/invoke-ntp.keys.texi@1.111 +1 -1
+ NTP_4_2_7P435
+
+ ntpd/invoke-ntpd.texi@1.427 +2 -2
+ NTP_4_2_7P435
+
+ ntpd/ntp.conf.5man@1.147 +7 -7
+ NTP_4_2_7P435
+
+ ntpd/ntp.conf.5mdoc@1.147 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntp.conf.html@1.108 +1 -1
+ NTP_4_2_7P435
+
+ ntpd/ntp.conf.man.in@1.147 +7 -7
+ NTP_4_2_7P435
+
+ ntpd/ntp.conf.mdoc.in@1.147 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntp.keys.5man@1.145 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntp.keys.5mdoc@1.145 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntp.keys.html@1.109 +1 -1
+ NTP_4_2_7P435
+
+ ntpd/ntp.keys.man.in@1.145 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntp.keys.mdoc.in@1.145 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntpd-opts.c@1.445 +7 -7
+ NTP_4_2_7P435
+
+ ntpd/ntpd-opts.h@1.445 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntpd.1ntpdman@1.256 +7 -7
+ NTP_4_2_7P435
+
+ ntpd/ntpd.1ntpdmdoc@1.256 +3 -3
+ NTP_4_2_7P435
+
+ ntpd/ntpd.html@1.103 +2 -2
+ NTP_4_2_7P435
+
+ ntpd/ntpd.man.in@1.256 +7 -7
+ NTP_4_2_7P435
+
+ ntpd/ntpd.mdoc.in@1.256 +3 -3
+ NTP_4_2_7P435
+
+ ntpdc/invoke-ntpdc.texi@1.425 +2 -2
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc-opts.c@1.440 +7 -7
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc-opts.h@1.440 +3 -3
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc.1ntpdcman@1.256 +6 -6
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.256 +2 -2
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc.html@1.269 +2 -2
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc.man.in@1.256 +6 -6
+ NTP_4_2_7P435
+
+ ntpdc/ntpdc.mdoc.in@1.256 +2 -2
+ NTP_4_2_7P435
+
+ ntpq/invoke-ntpq.texi@1.428 +2 -2
+ NTP_4_2_7P435
+
+ ntpq/ntpq-opts.c@1.442 +7 -7
+ NTP_4_2_7P435
+
+ ntpq/ntpq-opts.h@1.442 +3 -3
+ NTP_4_2_7P435
+
+ ntpq/ntpq.1ntpqman@1.256 +6 -6
+ NTP_4_2_7P435
+
+ ntpq/ntpq.1ntpqmdoc@1.256 +2 -2
+ NTP_4_2_7P435
+
+ ntpq/ntpq.html@1.100 +2 -2
+ NTP_4_2_7P435
+
+ ntpq/ntpq.man.in@1.256 +6 -6
+ NTP_4_2_7P435
+
+ ntpq/ntpq.mdoc.in@1.256 +2 -2
+ NTP_4_2_7P435
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.427 +2 -2
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.442 +7 -7
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.442 +3 -3
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.256 +14 -14
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.256 +3 -3
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd.html@1.98 +1 -1
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd.man.in@1.256 +14 -14
+ NTP_4_2_7P435
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.256 +3 -3
+ NTP_4_2_7P435
+
+ packageinfo.sh@1.439 +1 -1
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.18 +6 -6
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.18 +2 -2
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/calc_tickadj.html@1.17 +82 -1
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.17 +6 -6
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P435
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.19 +60 -1
+ NTP_4_2_7P435
+
+ scripts/invoke-plot_summary.texi@1.36 +1 -1
+ NTP_4_2_7P435
+
+ scripts/invoke-summary.texi@1.36 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.245 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.246 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.246 +2 -2
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/ntp-wait.html@1.262 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/ntp-wait.man.in@1.246 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.246 +2 -2
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.34 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.25 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.25 +2 -2
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/ntpsweep.html@1.35 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/ntpsweep.man.in@1.25 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P435
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.34 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.25 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.25 +2 -2
+ NTP_4_2_7P435
+
+ scripts/ntptrace/ntptrace.html@1.35 +1 -1
+ NTP_4_2_7P435
+
+ scripts/ntptrace/ntptrace.man.in@1.25 +6 -6
+ NTP_4_2_7P435
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P435
+
+ scripts/plot_summary.1plot_summaryman@1.36 +6 -6
+ NTP_4_2_7P435
+
+ scripts/plot_summary.1plot_summarymdoc@1.36 +2 -2
+ NTP_4_2_7P435
+
+ scripts/plot_summary.html@1.36 +1 -1
+ NTP_4_2_7P435
+
+ scripts/plot_summary.man.in@1.36 +6 -6
+ NTP_4_2_7P435
+
+ scripts/plot_summary.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P435
+
+ scripts/summary.1summaryman@1.36 +13 -13
+ NTP_4_2_7P435
+
+ scripts/summary.1summarymdoc@1.36 +2 -2
+ NTP_4_2_7P435
+
+ scripts/summary.html@1.36 +1 -1
+ NTP_4_2_7P435
+
+ scripts/summary.man.in@1.36 +13 -13
+ NTP_4_2_7P435
+
+ scripts/summary.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P435
+
+ sntp/invoke-sntp.texi@1.424 +2 -2
+ NTP_4_2_7P435
+
+ sntp/sntp-opts.c@1.439 +7 -7
+ NTP_4_2_7P435
+
+ sntp/sntp-opts.h@1.439 +3 -3
+ NTP_4_2_7P435
+
+ sntp/sntp.1sntpman@1.259 +7 -7
+ NTP_4_2_7P435
+
+ sntp/sntp.1sntpmdoc@1.259 +3 -3
+ NTP_4_2_7P435
+
+ sntp/sntp.html@1.439 +2 -2
+ NTP_4_2_7P435
+
+ sntp/sntp.man.in@1.259 +7 -7
+ NTP_4_2_7P435
+
+ sntp/sntp.mdoc.in@1.259 +3 -3
+ NTP_4_2_7P435
+
+ util/invoke-ntp-keygen.texi@1.428 +2 -2
+ NTP_4_2_7P435
+
+ util/ntp-keygen-opts.c@1.442 +7 -7
+ NTP_4_2_7P435
+
+ util/ntp-keygen-opts.h@1.442 +3 -3
+ NTP_4_2_7P435
+
+ util/ntp-keygen.1ntp-keygenman@1.256 +7 -7
+ NTP_4_2_7P435
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.256 +3 -3
+ NTP_4_2_7P435
+
+ util/ntp-keygen.html@1.104 +2 -2
+ NTP_4_2_7P435
+
+ util/ntp-keygen.man.in@1.256 +7 -7
+ NTP_4_2_7P435
+
+ util/ntp-keygen.mdoc.in@1.256 +3 -3
+ NTP_4_2_7P435
+
+ChangeSet@1.3107.1.23, 2014-03-26 11:01:31+01:00, jnperlin@hydra.(none)
+ [Bug 2570] cleanup: reduced logging noise, moved some functions into libntp
+
+ ChangeLog@1.1457 +2 -0
+ [Bug 2570] cleanup: reduced logging noise, moved some functions into libntp
+
+ include/Makefile.am@1.50 +1 -0
+ [Bug 2570] cleanup: added 'vint64ops.h'
+
+ include/ntp_calendar.h@1.14 +12 -0
+ [Bug 2570] cleanup: moved functions for 64bit times to to calendar
+
+ include/vint64ops.h@1.1 +28 -0
+ [Bug 2570] cleanup: moved vint64 operations to libntp
+
+ include/vint64ops.h@1.0 +0 -0
+
+ libntp/Makefile.am@1.74 +1 -0
+ [Bug 2570] cleanup: added 'vint64ops.c'
+
+ libntp/ntp_calendar.c@1.13 +71 -23
+ [Bug 2570] cleanup: moved functions for 64bit times to to calendar
+
+ libntp/vint64ops.c@1.1 +284 -0
+ [Bug 2570] cleanup: moved vint64 operations to libntp
+
+ libntp/vint64ops.c@1.0 +0 -0
+
+ ntpd/ntp_leapsec.c@1.8 +44 -277
+ [Bug 2570] cleanup: reduced logging noise, moved some functions into libntp
+
+ ntpd/ntp_leapsec.h@1.6 +1 -6
+ [Bug 2570] cleanup: reduced logging noise, moved some functions into libntp
+
+ ntpd/ntp_util.c@1.110 +2 -10
+ [Bug 2570] cleanup: reduced logging noise
+
+ tests/libntp/Makefile.am@1.41 +1 -0
+ [Bug 2570] cleanup: added test cases for vint64 ops
+
+ tests/libntp/vi64ops.cpp@1.1 +64 -0
+ [Bug 2570] cleanup: added test cases for vint64 ops
+
+ tests/libntp/vi64ops.cpp@1.0 +0 -0
+
+ tests/ntpd/leapsec.cpp@1.8 +0 -42
+ [Bug 2570] cleanup: moved vint64 tests to libntp
+
+ChangeSet@1.3107.1.22, 2014-03-21 06:02:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P434
+ TAG: NTP_4_2_7P434
+
+ ChangeLog@1.1456 +1 -0
+ NTP_4_2_7P434
+
+ ntpd/invoke-ntp.conf.texi@1.112 +1 -1
+ NTP_4_2_7P434
+
+ ntpd/invoke-ntp.keys.texi@1.110 +1 -1
+ NTP_4_2_7P434
+
+ ntpd/invoke-ntpd.texi@1.426 +2 -2
+ NTP_4_2_7P434
+
+ ntpd/ntp.conf.5man@1.146 +7 -7
+ NTP_4_2_7P434
+
+ ntpd/ntp.conf.5mdoc@1.146 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntp.conf.html@1.107 +1 -1
+ NTP_4_2_7P434
+
+ ntpd/ntp.conf.man.in@1.146 +7 -7
+ NTP_4_2_7P434
+
+ ntpd/ntp.conf.mdoc.in@1.146 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntp.keys.5man@1.144 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntp.keys.5mdoc@1.144 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntp.keys.html@1.108 +1 -1
+ NTP_4_2_7P434
+
+ ntpd/ntp.keys.man.in@1.144 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntp.keys.mdoc.in@1.144 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntpd-opts.c@1.444 +7 -7
+ NTP_4_2_7P434
+
+ ntpd/ntpd-opts.h@1.444 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntpd.1ntpdman@1.255 +7 -7
+ NTP_4_2_7P434
+
+ ntpd/ntpd.1ntpdmdoc@1.255 +3 -3
+ NTP_4_2_7P434
+
+ ntpd/ntpd.html@1.102 +2 -2
+ NTP_4_2_7P434
+
+ ntpd/ntpd.man.in@1.255 +7 -7
+ NTP_4_2_7P434
+
+ ntpd/ntpd.mdoc.in@1.255 +3 -3
+ NTP_4_2_7P434
+
+ ntpdc/invoke-ntpdc.texi@1.424 +2 -2
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc-opts.c@1.439 +7 -7
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc-opts.h@1.439 +3 -3
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc.1ntpdcman@1.255 +6 -6
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.255 +2 -2
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc.html@1.268 +2 -2
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc.man.in@1.255 +6 -6
+ NTP_4_2_7P434
+
+ ntpdc/ntpdc.mdoc.in@1.255 +2 -2
+ NTP_4_2_7P434
+
+ ntpq/invoke-ntpq.texi@1.427 +2 -2
+ NTP_4_2_7P434
+
+ ntpq/ntpq-opts.c@1.441 +7 -7
+ NTP_4_2_7P434
+
+ ntpq/ntpq-opts.h@1.441 +3 -3
+ NTP_4_2_7P434
+
+ ntpq/ntpq.1ntpqman@1.255 +6 -6
+ NTP_4_2_7P434
+
+ ntpq/ntpq.1ntpqmdoc@1.255 +2 -2
+ NTP_4_2_7P434
+
+ ntpq/ntpq.html@1.99 +2 -2
+ NTP_4_2_7P434
+
+ ntpq/ntpq.man.in@1.255 +6 -6
+ NTP_4_2_7P434
+
+ ntpq/ntpq.mdoc.in@1.255 +2 -2
+ NTP_4_2_7P434
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.426 +2 -2
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.441 +7 -7
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.441 +3 -3
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.255 +7 -7
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.255 +3 -3
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd.html@1.97 +1 -1
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd.man.in@1.255 +7 -7
+ NTP_4_2_7P434
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.255 +3 -3
+ NTP_4_2_7P434
+
+ packageinfo.sh@1.438 +1 -1
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.17 +6 -6
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.17 +2 -2
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/calc_tickadj.html@1.16 +1 -82
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.16 +6 -6
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P434
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.18 +1 -60
+ NTP_4_2_7P434
+
+ scripts/invoke-plot_summary.texi@1.35 +1 -1
+ NTP_4_2_7P434
+
+ scripts/invoke-summary.texi@1.35 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.244 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.245 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.245 +2 -2
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/ntp-wait.html@1.261 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/ntp-wait.man.in@1.245 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.245 +2 -2
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.33 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.24 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.24 +2 -2
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/ntpsweep.html@1.34 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/ntpsweep.man.in@1.24 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P434
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.33 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.24 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.24 +2 -2
+ NTP_4_2_7P434
+
+ scripts/ntptrace/ntptrace.html@1.34 +1 -1
+ NTP_4_2_7P434
+
+ scripts/ntptrace/ntptrace.man.in@1.24 +6 -6
+ NTP_4_2_7P434
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P434
+
+ scripts/plot_summary.1plot_summaryman@1.35 +13 -13
+ NTP_4_2_7P434
+
+ scripts/plot_summary.1plot_summarymdoc@1.35 +2 -2
+ NTP_4_2_7P434
+
+ scripts/plot_summary.html@1.35 +1 -1
+ NTP_4_2_7P434
+
+ scripts/plot_summary.man.in@1.35 +13 -13
+ NTP_4_2_7P434
+
+ scripts/plot_summary.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P434
+
+ scripts/summary.1summaryman@1.35 +13 -13
+ NTP_4_2_7P434
+
+ scripts/summary.1summarymdoc@1.35 +2 -2
+ NTP_4_2_7P434
+
+ scripts/summary.html@1.35 +1 -1
+ NTP_4_2_7P434
+
+ scripts/summary.man.in@1.35 +13 -13
+ NTP_4_2_7P434
+
+ scripts/summary.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P434
+
+ sntp/invoke-sntp.texi@1.423 +2 -2
+ NTP_4_2_7P434
+
+ sntp/sntp-opts.c@1.438 +7 -7
+ NTP_4_2_7P434
+
+ sntp/sntp-opts.h@1.438 +3 -3
+ NTP_4_2_7P434
+
+ sntp/sntp.1sntpman@1.258 +7 -7
+ NTP_4_2_7P434
+
+ sntp/sntp.1sntpmdoc@1.258 +3 -3
+ NTP_4_2_7P434
+
+ sntp/sntp.html@1.438 +2 -2
+ NTP_4_2_7P434
+
+ sntp/sntp.man.in@1.258 +7 -7
+ NTP_4_2_7P434
+
+ sntp/sntp.mdoc.in@1.258 +3 -3
+ NTP_4_2_7P434
+
+ util/invoke-ntp-keygen.texi@1.427 +2 -2
+ NTP_4_2_7P434
+
+ util/ntp-keygen-opts.c@1.441 +7 -7
+ NTP_4_2_7P434
+
+ util/ntp-keygen-opts.h@1.441 +3 -3
+ NTP_4_2_7P434
+
+ util/ntp-keygen.1ntp-keygenman@1.255 +7 -7
+ NTP_4_2_7P434
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.255 +3 -3
+ NTP_4_2_7P434
+
+ util/ntp-keygen.html@1.103 +2 -2
+ NTP_4_2_7P434
+
+ util/ntp-keygen.man.in@1.255 +7 -7
+ NTP_4_2_7P434
+
+ util/ntp-keygen.mdoc.in@1.255 +3 -3
+ NTP_4_2_7P434
+
+ChangeSet@1.3107.1.21, 2014-03-20 05:43:19-04:00, stenn@deacon.udel.edu
+ [Bug 2577] Update VS2013 solution and project files
+
+ ChangeLog@1.1455 +1 -0
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/instsrv/instsrv.vcxproj@1.2 +375 -6
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.3 +295 -0
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.2 +6 -0
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj@1.2 +313 -6
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj@1.3 +401 -4
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntp.sln@1.2 +59 -1
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.3 +281 -0
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.3 +451 -9
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj@1.3 +393 -3
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj@1.3 +407 -4
+ [Bug 2577] Update VS2013 solution and project files
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj@1.3 +395 -4
+ [Bug 2577] Update VS2013 solution and project files
+
+ChangeSet@1.3107.1.20, 2014-03-10 11:23:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P433
+ TAG: NTP_4_2_7P433
+
+ ChangeLog@1.1454 +1 -0
+ NTP_4_2_7P433
+
+ ntpd/invoke-ntp.conf.texi@1.111 +1 -1
+ NTP_4_2_7P433
+
+ ntpd/invoke-ntp.keys.texi@1.109 +1 -1
+ NTP_4_2_7P433
+
+ ntpd/invoke-ntpd.texi@1.425 +2 -2
+ NTP_4_2_7P433
+
+ ntpd/ntp.conf.5man@1.145 +7 -7
+ NTP_4_2_7P433
+
+ ntpd/ntp.conf.5mdoc@1.145 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntp.conf.html@1.106 +1 -1
+ NTP_4_2_7P433
+
+ ntpd/ntp.conf.man.in@1.145 +7 -7
+ NTP_4_2_7P433
+
+ ntpd/ntp.conf.mdoc.in@1.145 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntp.keys.5man@1.143 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntp.keys.5mdoc@1.143 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntp.keys.html@1.107 +1 -1
+ NTP_4_2_7P433
+
+ ntpd/ntp.keys.man.in@1.143 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntp.keys.mdoc.in@1.143 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntpd-opts.c@1.443 +7 -7
+ NTP_4_2_7P433
+
+ ntpd/ntpd-opts.h@1.443 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntpd.1ntpdman@1.254 +7 -7
+ NTP_4_2_7P433
+
+ ntpd/ntpd.1ntpdmdoc@1.254 +3 -3
+ NTP_4_2_7P433
+
+ ntpd/ntpd.html@1.101 +2 -2
+ NTP_4_2_7P433
+
+ ntpd/ntpd.man.in@1.254 +7 -7
+ NTP_4_2_7P433
+
+ ntpd/ntpd.mdoc.in@1.254 +3 -3
+ NTP_4_2_7P433
+
+ ntpdc/invoke-ntpdc.texi@1.423 +2 -2
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc-opts.c@1.438 +7 -7
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc-opts.h@1.438 +3 -3
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc.1ntpdcman@1.254 +6 -6
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.254 +2 -2
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc.html@1.267 +2 -2
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc.man.in@1.254 +6 -6
+ NTP_4_2_7P433
+
+ ntpdc/ntpdc.mdoc.in@1.254 +2 -2
+ NTP_4_2_7P433
+
+ ntpq/invoke-ntpq.texi@1.426 +2 -2
+ NTP_4_2_7P433
+
+ ntpq/ntpq-opts.c@1.440 +7 -7
+ NTP_4_2_7P433
+
+ ntpq/ntpq-opts.h@1.440 +3 -3
+ NTP_4_2_7P433
+
+ ntpq/ntpq.1ntpqman@1.254 +6 -6
+ NTP_4_2_7P433
+
+ ntpq/ntpq.1ntpqmdoc@1.254 +2 -2
+ NTP_4_2_7P433
+
+ ntpq/ntpq.html@1.98 +2 -2
+ NTP_4_2_7P433
+
+ ntpq/ntpq.man.in@1.254 +6 -6
+ NTP_4_2_7P433
+
+ ntpq/ntpq.mdoc.in@1.254 +2 -2
+ NTP_4_2_7P433
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.425 +2 -2
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.440 +7 -7
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.440 +3 -3
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.254 +7 -7
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.254 +3 -3
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd.html@1.96 +1 -1
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd.man.in@1.254 +7 -7
+ NTP_4_2_7P433
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.254 +3 -3
+ NTP_4_2_7P433
+
+ packageinfo.sh@1.437 +1 -1
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.16 +6 -6
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.16 +2 -2
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/calc_tickadj.html@1.15 +1 -1
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.15 +6 -6
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P433
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.17 +1 -1
+ NTP_4_2_7P433
+
+ scripts/invoke-plot_summary.texi@1.34 +1 -1
+ NTP_4_2_7P433
+
+ scripts/invoke-summary.texi@1.34 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.243 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.244 +13 -13
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.244 +2 -2
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/ntp-wait.html@1.260 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/ntp-wait.man.in@1.244 +13 -13
+ NTP_4_2_7P433
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.244 +2 -2
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.32 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.23 +6 -6
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.23 +2 -2
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/ntpsweep.html@1.33 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/ntpsweep.man.in@1.23 +6 -6
+ NTP_4_2_7P433
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P433
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.32 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.23 +6 -6
+ NTP_4_2_7P433
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.23 +2 -2
+ NTP_4_2_7P433
+
+ scripts/ntptrace/ntptrace.html@1.33 +1 -1
+ NTP_4_2_7P433
+
+ scripts/ntptrace/ntptrace.man.in@1.23 +6 -6
+ NTP_4_2_7P433
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P433
+
+ scripts/plot_summary.1plot_summaryman@1.34 +13 -13
+ NTP_4_2_7P433
+
+ scripts/plot_summary.1plot_summarymdoc@1.34 +2 -2
+ NTP_4_2_7P433
+
+ scripts/plot_summary.html@1.34 +1 -1
+ NTP_4_2_7P433
+
+ scripts/plot_summary.man.in@1.34 +13 -13
+ NTP_4_2_7P433
+
+ scripts/plot_summary.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P433
+
+ scripts/summary.1summaryman@1.34 +6 -6
+ NTP_4_2_7P433
+
+ scripts/summary.1summarymdoc@1.34 +2 -2
+ NTP_4_2_7P433
+
+ scripts/summary.html@1.34 +1 -1
+ NTP_4_2_7P433
+
+ scripts/summary.man.in@1.34 +6 -6
+ NTP_4_2_7P433
+
+ scripts/summary.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P433
+
+ sntp/invoke-sntp.texi@1.422 +2 -2
+ NTP_4_2_7P433
+
+ sntp/sntp-opts.c@1.437 +7 -7
+ NTP_4_2_7P433
+
+ sntp/sntp-opts.h@1.437 +3 -3
+ NTP_4_2_7P433
+
+ sntp/sntp.1sntpman@1.257 +7 -7
+ NTP_4_2_7P433
+
+ sntp/sntp.1sntpmdoc@1.257 +3 -3
+ NTP_4_2_7P433
+
+ sntp/sntp.html@1.437 +2 -2
+ NTP_4_2_7P433
+
+ sntp/sntp.man.in@1.257 +7 -7
+ NTP_4_2_7P433
+
+ sntp/sntp.mdoc.in@1.257 +3 -3
+ NTP_4_2_7P433
+
+ util/invoke-ntp-keygen.texi@1.426 +2 -2
+ NTP_4_2_7P433
+
+ util/ntp-keygen-opts.c@1.440 +7 -7
+ NTP_4_2_7P433
+
+ util/ntp-keygen-opts.h@1.440 +3 -3
+ NTP_4_2_7P433
+
+ util/ntp-keygen.1ntp-keygenman@1.254 +7 -7
+ NTP_4_2_7P433
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.254 +3 -3
+ NTP_4_2_7P433
+
+ util/ntp-keygen.html@1.102 +2 -2
+ NTP_4_2_7P433
+
+ util/ntp-keygen.man.in@1.254 +7 -7
+ NTP_4_2_7P433
+
+ util/ntp-keygen.mdoc.in@1.254 +3 -3
+ NTP_4_2_7P433
+
+ChangeSet@1.3107.1.19, 2014-03-10 05:31:40-04:00, stenn@deacon.udel.edu
+ Clean up last-update timestamps of html/*.html files
+
+ ChangeLog@1.1453 +1 -0
+ Clean up last-update timestamps of html/*.html files
+
+ html/confopt.html@1.61 +1 -1
+ Clean up last-update timestamps of html/*.html files
+
+ html/copyright.html@1.63 +5 -4
+ Clean up last-update timestamps of html/*.html files
+
+ html/discipline.html@1.9 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/discover.html@1.5 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/extern.html@1.16.1.1 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/filter.html@1.7 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/hints.html@1.19 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/history.html@1.3 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/howto.html@1.24 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/huffpuff.html@1.5 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/index.html@1.45 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/kern.html@1.21 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/kernpps.html@1.4 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/keygen.html@1.33 +2 -2
+ Clean up last-update timestamps of html/*.html files
+
+ html/leap.html@1.6 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/msyslog.html@1.11 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/ntpd.html@1.61 +1 -1
+ Clean up last-update timestamps of html/*.html files
+
+ html/poll.html@1.4 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/pps.html@1.25 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/prefer.html@1.32 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/rate.html@1.12 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/rdebug.html@1.18 +3 -5
+ Clean up last-update timestamps of html/*.html files
+
+ html/refclock.html@1.42 +1 -1
+ Clean up last-update timestamps of html/*.html files
+
+ html/select.html@1.9 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/stats.html@1.2 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/tickadj.html@1.18 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/warp.html@1.23 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ html/xleave.html@1.9 +3 -3
+ Clean up last-update timestamps of html/*.html files
+
+ChangeSet@1.3107.1.18, 2014-03-09 11:46:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P432
+ TAG: NTP_4_2_7P432
+
+ ChangeLog@1.1452 +1 -0
+ NTP_4_2_7P432
+
+ ntpd/invoke-ntp.conf.texi@1.110 +1 -1
+ NTP_4_2_7P432
+
+ ntpd/invoke-ntp.keys.texi@1.108 +1 -1
+ NTP_4_2_7P432
+
+ ntpd/invoke-ntpd.texi@1.424 +2 -2
+ NTP_4_2_7P432
+
+ ntpd/ntp.conf.5man@1.144 +7 -7
+ NTP_4_2_7P432
+
+ ntpd/ntp.conf.5mdoc@1.144 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntp.conf.html@1.105 +1 -1
+ NTP_4_2_7P432
+
+ ntpd/ntp.conf.man.in@1.144 +7 -7
+ NTP_4_2_7P432
+
+ ntpd/ntp.conf.mdoc.in@1.144 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntp.keys.5man@1.142 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntp.keys.5mdoc@1.142 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntp.keys.html@1.106 +1 -1
+ NTP_4_2_7P432
+
+ ntpd/ntp.keys.man.in@1.142 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntp.keys.mdoc.in@1.142 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntpd-opts.c@1.442 +7 -7
+ NTP_4_2_7P432
+
+ ntpd/ntpd-opts.h@1.442 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntpd.1ntpdman@1.253 +7 -7
+ NTP_4_2_7P432
+
+ ntpd/ntpd.1ntpdmdoc@1.253 +3 -3
+ NTP_4_2_7P432
+
+ ntpd/ntpd.html@1.100 +2 -2
+ NTP_4_2_7P432
+
+ ntpd/ntpd.man.in@1.253 +7 -7
+ NTP_4_2_7P432
+
+ ntpd/ntpd.mdoc.in@1.253 +3 -3
+ NTP_4_2_7P432
+
+ ntpdc/invoke-ntpdc.texi@1.422 +2 -2
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc-opts.c@1.437 +7 -7
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc-opts.h@1.437 +3 -3
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc.1ntpdcman@1.253 +6 -6
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.253 +2 -2
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc.html@1.266 +2 -2
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc.man.in@1.253 +6 -6
+ NTP_4_2_7P432
+
+ ntpdc/ntpdc.mdoc.in@1.253 +2 -2
+ NTP_4_2_7P432
+
+ ntpq/invoke-ntpq.texi@1.425 +2 -2
+ NTP_4_2_7P432
+
+ ntpq/ntpq-opts.c@1.439 +7 -7
+ NTP_4_2_7P432
+
+ ntpq/ntpq-opts.h@1.439 +3 -3
+ NTP_4_2_7P432
+
+ ntpq/ntpq.1ntpqman@1.253 +6 -6
+ NTP_4_2_7P432
+
+ ntpq/ntpq.1ntpqmdoc@1.253 +2 -2
+ NTP_4_2_7P432
+
+ ntpq/ntpq.html@1.97 +2 -2
+ NTP_4_2_7P432
+
+ ntpq/ntpq.man.in@1.253 +6 -6
+ NTP_4_2_7P432
+
+ ntpq/ntpq.mdoc.in@1.253 +2 -2
+ NTP_4_2_7P432
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.424 +2 -2
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.439 +7 -7
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.439 +3 -3
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.253 +7 -7
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.253 +3 -3
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd.html@1.95 +1 -1
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd.man.in@1.253 +7 -7
+ NTP_4_2_7P432
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.253 +3 -3
+ NTP_4_2_7P432
+
+ packageinfo.sh@1.436 +1 -1
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.15 +13 -13
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.15 +2 -2
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/calc_tickadj.html@1.14 +1 -1
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.14 +13 -13
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P432
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.16 +1 -1
+ NTP_4_2_7P432
+
+ scripts/invoke-plot_summary.texi@1.33 +1 -1
+ NTP_4_2_7P432
+
+ scripts/invoke-summary.texi@1.33 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.242 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.243 +13 -13
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.243 +2 -2
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/ntp-wait.html@1.259 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/ntp-wait.man.in@1.243 +13 -13
+ NTP_4_2_7P432
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.243 +2 -2
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.31 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.22 +6 -6
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.22 +2 -2
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/ntpsweep.html@1.32 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/ntpsweep.man.in@1.22 +6 -6
+ NTP_4_2_7P432
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P432
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.31 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.22 +6 -6
+ NTP_4_2_7P432
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.22 +2 -2
+ NTP_4_2_7P432
+
+ scripts/ntptrace/ntptrace.html@1.32 +1 -1
+ NTP_4_2_7P432
+
+ scripts/ntptrace/ntptrace.man.in@1.22 +6 -6
+ NTP_4_2_7P432
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P432
+
+ scripts/plot_summary.1plot_summaryman@1.33 +6 -6
+ NTP_4_2_7P432
+
+ scripts/plot_summary.1plot_summarymdoc@1.33 +2 -2
+ NTP_4_2_7P432
+
+ scripts/plot_summary.html@1.33 +1 -1
+ NTP_4_2_7P432
+
+ scripts/plot_summary.man.in@1.33 +6 -6
+ NTP_4_2_7P432
+
+ scripts/plot_summary.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P432
+
+ scripts/summary.1summaryman@1.33 +6 -6
+ NTP_4_2_7P432
+
+ scripts/summary.1summarymdoc@1.33 +2 -2
+ NTP_4_2_7P432
+
+ scripts/summary.html@1.33 +1 -1
+ NTP_4_2_7P432
+
+ scripts/summary.man.in@1.33 +6 -6
+ NTP_4_2_7P432
+
+ scripts/summary.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P432
+
+ sntp/invoke-sntp.texi@1.421 +2 -2
+ NTP_4_2_7P432
+
+ sntp/sntp-opts.c@1.436 +7 -7
+ NTP_4_2_7P432
+
+ sntp/sntp-opts.h@1.436 +3 -3
+ NTP_4_2_7P432
+
+ sntp/sntp.1sntpman@1.256 +7 -7
+ NTP_4_2_7P432
+
+ sntp/sntp.1sntpmdoc@1.256 +3 -3
+ NTP_4_2_7P432
+
+ sntp/sntp.html@1.436 +2 -2
+ NTP_4_2_7P432
+
+ sntp/sntp.man.in@1.256 +7 -7
+ NTP_4_2_7P432
+
+ sntp/sntp.mdoc.in@1.256 +3 -3
+ NTP_4_2_7P432
+
+ util/invoke-ntp-keygen.texi@1.425 +2 -2
+ NTP_4_2_7P432
+
+ util/ntp-keygen-opts.c@1.439 +7 -7
+ NTP_4_2_7P432
+
+ util/ntp-keygen-opts.h@1.439 +3 -3
+ NTP_4_2_7P432
+
+ util/ntp-keygen.1ntp-keygenman@1.253 +7 -7
+ NTP_4_2_7P432
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.253 +3 -3
+ NTP_4_2_7P432
+
+ util/ntp-keygen.html@1.101 +2 -2
+ NTP_4_2_7P432
+
+ util/ntp-keygen.man.in@1.253 +7 -7
+ NTP_4_2_7P432
+
+ util/ntp-keygen.mdoc.in@1.253 +3 -3
+ NTP_4_2_7P432
+
+ChangeSet@1.3107.1.17, 2014-03-08 23:11:31-05:00, stenn@deacon.udel.edu
+ CID 711660: Do a non-NULL pointer assertion check a bit earlier
+
+ ChangeLog@1.1451 +1 -1
+ CID 711660: Do a non-NULL pointer assertion check a bit earlier
+
+ sntp/libevent/event.c@1.12 +1 -1
+ CID 711660: Do a non-NULL pointer assertion check a bit earlier
+
+ChangeSet@1.3107.1.16, 2014-03-05 11:18:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P431
+ TAG: NTP_4_2_7P431
+
+ ChangeLog@1.1450 +1 -0
+ NTP_4_2_7P431
+
+ ntpd/invoke-ntp.conf.texi@1.109 +1 -1
+ NTP_4_2_7P431
+
+ ntpd/invoke-ntp.keys.texi@1.107 +1 -1
+ NTP_4_2_7P431
+
+ ntpd/invoke-ntpd.texi@1.423 +2 -2
+ NTP_4_2_7P431
+
+ ntpd/ntp.conf.5man@1.143 +7 -7
+ NTP_4_2_7P431
+
+ ntpd/ntp.conf.5mdoc@1.143 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntp.conf.html@1.104 +1 -1
+ NTP_4_2_7P431
+
+ ntpd/ntp.conf.man.in@1.143 +7 -7
+ NTP_4_2_7P431
+
+ ntpd/ntp.conf.mdoc.in@1.143 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntp.keys.5man@1.141 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntp.keys.5mdoc@1.141 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntp.keys.html@1.105 +1 -1
+ NTP_4_2_7P431
+
+ ntpd/ntp.keys.man.in@1.141 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntp.keys.mdoc.in@1.141 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntpd-opts.c@1.441 +7 -7
+ NTP_4_2_7P431
+
+ ntpd/ntpd-opts.h@1.441 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntpd.1ntpdman@1.252 +7 -7
+ NTP_4_2_7P431
+
+ ntpd/ntpd.1ntpdmdoc@1.252 +3 -3
+ NTP_4_2_7P431
+
+ ntpd/ntpd.html@1.99 +2 -2
+ NTP_4_2_7P431
+
+ ntpd/ntpd.man.in@1.252 +7 -7
+ NTP_4_2_7P431
+
+ ntpd/ntpd.mdoc.in@1.252 +3 -3
+ NTP_4_2_7P431
+
+ ntpdc/invoke-ntpdc.texi@1.421 +2 -2
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc-opts.c@1.436 +7 -7
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc-opts.h@1.436 +3 -3
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc.1ntpdcman@1.252 +6 -6
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.252 +2 -2
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc.html@1.265 +2 -2
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc.man.in@1.252 +6 -6
+ NTP_4_2_7P431
+
+ ntpdc/ntpdc.mdoc.in@1.252 +2 -2
+ NTP_4_2_7P431
+
+ ntpq/invoke-ntpq.texi@1.424 +2 -2
+ NTP_4_2_7P431
+
+ ntpq/ntpq-opts.c@1.438 +7 -7
+ NTP_4_2_7P431
+
+ ntpq/ntpq-opts.h@1.438 +3 -3
+ NTP_4_2_7P431
+
+ ntpq/ntpq.1ntpqman@1.252 +6 -6
+ NTP_4_2_7P431
+
+ ntpq/ntpq.1ntpqmdoc@1.252 +2 -2
+ NTP_4_2_7P431
+
+ ntpq/ntpq.html@1.96 +2 -2
+ NTP_4_2_7P431
+
+ ntpq/ntpq.man.in@1.252 +6 -6
+ NTP_4_2_7P431
+
+ ntpq/ntpq.mdoc.in@1.252 +2 -2
+ NTP_4_2_7P431
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.423 +2 -2
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.438 +7 -7
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.438 +3 -3
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.252 +7 -7
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.252 +3 -3
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd.html@1.94 +1 -1
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd.man.in@1.252 +7 -7
+ NTP_4_2_7P431
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.252 +3 -3
+ NTP_4_2_7P431
+
+ packageinfo.sh@1.435 +1 -1
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.14 +6 -6
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.14 +2 -2
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/calc_tickadj.html@1.13 +1 -1
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.13 +6 -6
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.14 +2 -2
+ NTP_4_2_7P431
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.15 +1 -1
+ NTP_4_2_7P431
+
+ scripts/invoke-plot_summary.texi@1.32 +1 -1
+ NTP_4_2_7P431
+
+ scripts/invoke-summary.texi@1.32 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.241 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.242 +6 -6
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.242 +2 -2
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/ntp-wait.html@1.258 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/ntp-wait.man.in@1.242 +6 -6
+ NTP_4_2_7P431
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.242 +2 -2
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.30 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.21 +6 -6
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.21 +2 -2
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/ntpsweep.html@1.31 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/ntpsweep.man.in@1.21 +6 -6
+ NTP_4_2_7P431
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P431
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.30 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.21 +13 -13
+ NTP_4_2_7P431
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.21 +2 -2
+ NTP_4_2_7P431
+
+ scripts/ntptrace/ntptrace.html@1.31 +1 -1
+ NTP_4_2_7P431
+
+ scripts/ntptrace/ntptrace.man.in@1.21 +13 -13
+ NTP_4_2_7P431
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P431
+
+ scripts/plot_summary.1plot_summaryman@1.32 +6 -6
+ NTP_4_2_7P431
+
+ scripts/plot_summary.1plot_summarymdoc@1.32 +3 -3
+ NTP_4_2_7P431
+
+ scripts/plot_summary.html@1.32 +1 -1
+ NTP_4_2_7P431
+
+ scripts/plot_summary.man.in@1.32 +6 -6
+ NTP_4_2_7P431
+
+ scripts/plot_summary.mdoc.in@1.32 +3 -3
+ NTP_4_2_7P431
+
+ scripts/summary.1summaryman@1.32 +6 -6
+ NTP_4_2_7P431
+
+ scripts/summary.1summarymdoc@1.32 +2 -2
+ NTP_4_2_7P431
+
+ scripts/summary.html@1.32 +1 -1
+ NTP_4_2_7P431
+
+ scripts/summary.man.in@1.32 +6 -6
+ NTP_4_2_7P431
+
+ scripts/summary.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P431
+
+ sntp/invoke-sntp.texi@1.420 +2 -2
+ NTP_4_2_7P431
+
+ sntp/sntp-opts.c@1.435 +7 -7
+ NTP_4_2_7P431
+
+ sntp/sntp-opts.h@1.435 +3 -3
+ NTP_4_2_7P431
+
+ sntp/sntp.1sntpman@1.255 +7 -7
+ NTP_4_2_7P431
+
+ sntp/sntp.1sntpmdoc@1.255 +3 -3
+ NTP_4_2_7P431
+
+ sntp/sntp.html@1.435 +2 -2
+ NTP_4_2_7P431
+
+ sntp/sntp.man.in@1.255 +7 -7
+ NTP_4_2_7P431
+
+ sntp/sntp.mdoc.in@1.255 +3 -3
+ NTP_4_2_7P431
+
+ util/invoke-ntp-keygen.texi@1.424 +2 -2
+ NTP_4_2_7P431
+
+ util/ntp-keygen-opts.c@1.438 +7 -7
+ NTP_4_2_7P431
+
+ util/ntp-keygen-opts.h@1.438 +3 -3
+ NTP_4_2_7P431
+
+ util/ntp-keygen.1ntp-keygenman@1.252 +7 -7
+ NTP_4_2_7P431
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.252 +3 -3
+ NTP_4_2_7P431
+
+ util/ntp-keygen.html@1.100 +2 -2
+ NTP_4_2_7P431
+
+ util/ntp-keygen.man.in@1.252 +7 -7
+ NTP_4_2_7P431
+
+ util/ntp-keygen.mdoc.in@1.252 +3 -3
+ NTP_4_2_7P431
+
+ChangeSet@1.3107.1.15, 2014-03-05 01:44:37-05:00, stenn@deacon.udel.edu
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ ChangeLog@1.1449 +1 -0
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ sntp/libevent/m4/openldap-thread-check.m4@1.4 +1 -1
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ChangeSet@1.3107.1.14, 2014-03-05 00:53:47-05:00, stenn@deacon.udel.edu
+ CID 711669: Do a non-NULL pointer assertion check a bit earlier
+
+ ChangeLog@1.1448 +1 -0
+ CID 711669: Do a non-NULL pointer assertion check a bit earlier
+
+ sntp/libevent/event.c@1.11 +1 -1
+ CID 711669: Do a non-NULL pointer assertion check a bit earlier
+
+ChangeSet@1.3107.1.13, 2014-03-04 11:54:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P430
+ TAG: NTP_4_2_7P430
+
+ ChangeLog@1.1447 +1 -0
+ NTP_4_2_7P430
+
+ ntpd/invoke-ntp.conf.texi@1.108 +1 -1
+ NTP_4_2_7P430
+
+ ntpd/invoke-ntp.keys.texi@1.106 +1 -1
+ NTP_4_2_7P430
+
+ ntpd/invoke-ntpd.texi@1.422 +2 -2
+ NTP_4_2_7P430
+
+ ntpd/ntp.conf.5man@1.142 +7 -7
+ NTP_4_2_7P430
+
+ ntpd/ntp.conf.5mdoc@1.142 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntp.conf.html@1.103 +1 -1
+ NTP_4_2_7P430
+
+ ntpd/ntp.conf.man.in@1.142 +7 -7
+ NTP_4_2_7P430
+
+ ntpd/ntp.conf.mdoc.in@1.142 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntp.keys.5man@1.140 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntp.keys.5mdoc@1.140 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntp.keys.html@1.104 +1 -1
+ NTP_4_2_7P430
+
+ ntpd/ntp.keys.man.in@1.140 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntp.keys.mdoc.in@1.140 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntpd-opts.c@1.440 +7 -7
+ NTP_4_2_7P430
+
+ ntpd/ntpd-opts.h@1.440 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntpd.1ntpdman@1.251 +1007 -0
+ NTP_4_2_7P430
+
+ ntpd/ntpd.1ntpdmdoc@1.251 +3 -3
+ NTP_4_2_7P430
+
+ ntpd/ntpd.html@1.98 +2 -2
+ NTP_4_2_7P430
+
+ ntpd/ntpd.man.in@1.251 +1007 -0
+ NTP_4_2_7P430
+
+ ntpd/ntpd.mdoc.in@1.251 +3 -3
+ NTP_4_2_7P430
+
+ ntpdc/invoke-ntpdc.texi@1.420 +2 -2
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc-opts.c@1.435 +7 -7
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc-opts.h@1.435 +3 -3
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc.1ntpdcman@1.251 +6 -6
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.251 +2 -2
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc.html@1.264 +2 -2
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc.man.in@1.251 +6 -6
+ NTP_4_2_7P430
+
+ ntpdc/ntpdc.mdoc.in@1.251 +2 -2
+ NTP_4_2_7P430
+
+ ntpq/invoke-ntpq.texi@1.423 +2 -2
+ NTP_4_2_7P430
+
+ ntpq/ntpq-opts.c@1.437 +7 -7
+ NTP_4_2_7P430
+
+ ntpq/ntpq-opts.h@1.437 +3 -3
+ NTP_4_2_7P430
+
+ ntpq/ntpq.1ntpqman@1.251 +6 -6
+ NTP_4_2_7P430
+
+ ntpq/ntpq.1ntpqmdoc@1.251 +2 -2
+ NTP_4_2_7P430
+
+ ntpq/ntpq.html@1.95 +2 -2
+ NTP_4_2_7P430
+
+ ntpq/ntpq.man.in@1.251 +6 -6
+ NTP_4_2_7P430
+
+ ntpq/ntpq.mdoc.in@1.251 +2 -2
+ NTP_4_2_7P430
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.422 +2 -2
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.437 +7 -7
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.437 +3 -3
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.251 +7 -7
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.251 +3 -3
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd.html@1.93 +1 -1
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd.man.in@1.251 +7 -7
+ NTP_4_2_7P430
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.251 +3 -3
+ NTP_4_2_7P430
+
+ packageinfo.sh@1.434 +1 -1
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.13 +13 -13
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.13 +2 -2
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/calc_tickadj.html@1.12 +1 -1
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.12 +13 -13
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P430
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.14 +1 -1
+ NTP_4_2_7P430
+
+ scripts/invoke-plot_summary.texi@1.31 +1 -1
+ NTP_4_2_7P430
+
+ scripts/invoke-summary.texi@1.31 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.240 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.241 +6 -6
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.241 +2 -2
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/ntp-wait.html@1.257 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/ntp-wait.man.in@1.241 +6 -6
+ NTP_4_2_7P430
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.241 +2 -2
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.29 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.20 +6 -6
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.20 +2 -2
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/ntpsweep.html@1.30 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/ntpsweep.man.in@1.20 +6 -6
+ NTP_4_2_7P430
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P430
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.29 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.20 +13 -13
+ NTP_4_2_7P430
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.20 +2 -2
+ NTP_4_2_7P430
+
+ scripts/ntptrace/ntptrace.html@1.30 +1 -1
+ NTP_4_2_7P430
+
+ scripts/ntptrace/ntptrace.man.in@1.20 +13 -13
+ NTP_4_2_7P430
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P430
+
+ scripts/plot_summary.1plot_summaryman@1.31 +6 -6
+ NTP_4_2_7P430
+
+ scripts/plot_summary.1plot_summarymdoc@1.31 +3 -3
+ NTP_4_2_7P430
+
+ scripts/plot_summary.html@1.31 +1 -1
+ NTP_4_2_7P430
+
+ scripts/plot_summary.man.in@1.31 +6 -6
+ NTP_4_2_7P430
+
+ scripts/plot_summary.mdoc.in@1.31 +3 -3
+ NTP_4_2_7P430
+
+ scripts/summary.1summaryman@1.31 +6 -6
+ NTP_4_2_7P430
+
+ scripts/summary.1summarymdoc@1.31 +2 -2
+ NTP_4_2_7P430
+
+ scripts/summary.html@1.31 +1 -1
+ NTP_4_2_7P430
+
+ scripts/summary.man.in@1.31 +6 -6
+ NTP_4_2_7P430
+
+ scripts/summary.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P430
+
+ sntp/invoke-sntp.texi@1.419 +2 -2
+ NTP_4_2_7P430
+
+ sntp/sntp-opts.c@1.434 +7 -7
+ NTP_4_2_7P430
+
+ sntp/sntp-opts.h@1.434 +3 -3
+ NTP_4_2_7P430
+
+ sntp/sntp.1sntpman@1.254 +7 -7
+ NTP_4_2_7P430
+
+ sntp/sntp.1sntpmdoc@1.254 +3 -3
+ NTP_4_2_7P430
+
+ sntp/sntp.html@1.434 +2 -2
+ NTP_4_2_7P430
+
+ sntp/sntp.man.in@1.254 +7 -7
+ NTP_4_2_7P430
+
+ sntp/sntp.mdoc.in@1.254 +3 -3
+ NTP_4_2_7P430
+
+ util/invoke-ntp-keygen.texi@1.423 +2 -2
+ NTP_4_2_7P430
+
+ util/ntp-keygen-opts.c@1.437 +7 -7
+ NTP_4_2_7P430
+
+ util/ntp-keygen-opts.h@1.437 +3 -3
+ NTP_4_2_7P430
+
+ util/ntp-keygen.1ntp-keygenman@1.251 +7 -7
+ NTP_4_2_7P430
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.251 +3 -3
+ NTP_4_2_7P430
+
+ util/ntp-keygen.html@1.99 +2 -2
+ NTP_4_2_7P430
+
+ util/ntp-keygen.man.in@1.251 +7 -7
+ NTP_4_2_7P430
+
+ util/ntp-keygen.mdoc.in@1.251 +3 -3
+ NTP_4_2_7P430
+
+ChangeSet@1.3107.1.12, 2014-03-04 01:43:16-08:00, harlan@hms-mbp11.local
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ sntp/libevent/configure.ac@1.16 +2 -0
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ChangeSet@1.3107.1.11, 2014-03-04 01:36:37-08:00, harlan@hms-mbp11.local
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ ChangeLog@1.1446 +1 -0
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ sntp/libevent/configure.ac@1.15 +16 -10
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ sntp/libevent/m4/openldap-thread-check.m4@1.3 +4 -2
+ [Bug 2572] cross-compiling fails for --with-yielding-select
+
+ChangeSet@1.3107.1.10, 2014-03-04 00:36:34-08:00, harlan@hms-mbp11.local
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ BitKeeper/deleted/17/evconfig-private.h~e326850fdeaa98a0@1.3 +0 -0
+ Delete: sntp/libevent/WIN32-Code/evconfig-private.h
+
+ BitKeeper/deleted/1d/test-ratelim.sh~dddafffaaeb54e28@1.4 +0 -0
+ Delete: sntp/libevent/test/test-ratelim.sh
+
+ BitKeeper/deleted/27/event.3~f0ceb5963a3e2eb2@1.2 +0 -0
+ Delete: sntp/libevent/event.3
+
+ BitKeeper/deleted/5d/make_epoll_table.py~9cb592404263d3ec@1.3 +0 -0
+ Delete: sntp/libevent/make_epoll_table.py
+
+ BitKeeper/deleted/5e/CommitLog~8348099c640278eb@1.3 +0 -0
+ Delete: sntp/libevent/CommitLog
+
+ BitKeeper/deleted/a5/event-config.h~b5f19946803cd6c3@1.7 +0 -0
+ Delete: sntp/libevent/WIN32-Code/event2/event-config.h
+
+ BitKeeper/deleted/ae/print-winsock-errors.c~9a8c717f5ec35467@1.2 +0 -0
+ Delete: sntp/libevent/test/print-winsock-errors.c
+
+ BitKeeper/deleted/c5/tinytest_demo.c~ce8c6418b673bdfe@1.4 +0 -0
+ Delete: sntp/libevent/test/tinytest_demo.c
+
+ BitKeeper/deleted/d8/evdns.3~b3752932bb1e0709@1.2 +0 -0
+ Delete: sntp/libevent/evdns.3
+
+ BitKeeper/etc/ignore@1.85 +1 -0
+ added sntp/libevent/build-aux/ar-lib
+
+ ChangeLog@1.1445 +1 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/ChangeLog@1.8 +257 -1
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/Makefile.am@1.12 +10 -7
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/Makefile.nmake@1.5 +1 -1
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/WIN32-Code/nmake/evconfig-private.h@1.1 +6 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/WIN32-Code/nmake/evconfig-private.h
+
+ sntp/libevent/WIN32-Code/nmake/evconfig-private.h@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/nmake/event2/event-config.h@1.1 +360 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
+
+ sntp/libevent/WIN32-Code/nmake/event2/event-config.h@1.0 +0 -0
+
+ sntp/libevent/arc4random.c@1.6 +36 -20
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/buffer.c@1.9 +36 -8
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent-internal.h@1.7 +34 -10
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent.c@1.7 +119 -44
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_async.c@1.6 +10 -17
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_filter.c@1.6 +16 -11
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_openssl.c@1.8 +46 -37
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_pair.c@1.7 +10 -17
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_ratelim.c@1.5 +22 -5
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/bufferevent_sock.c@1.7 +16 -20
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/changelist-internal.h@1.3 +1 -0
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/configure.ac@1.14 +28 -22
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/epoll.c@1.6 +33 -176
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/epoll_sub.c@1.4 +13 -0
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/epolltable-internal.h@1.1 +1166 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/epolltable-internal.h
+
+ sntp/libevent/epolltable-internal.h@1.0 +0 -0
+
+ sntp/libevent/evbuffer-internal.h@1.7 +5 -0
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evconfig-private.h@1.1 +49 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/evconfig-private.h
+
+ sntp/libevent/evconfig-private.h@1.0 +0 -0
+
+ sntp/libevent/evdns.c@1.9 +87 -37
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/event-internal.h@1.9 +45 -3
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/event.c@1.10 +381 -69
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/event_iocp.c@1.6 +4 -1
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evmap.c@1.7 +54 -13
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evrpc.c@1.6 +5 -9
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evutil.c@1.9 +25 -9
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evutil_rand.c@1.7 +26 -3
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/evutil_time.c@1.4 +14 -3
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/http-internal.h@1.5 +10 -9
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/http.c@1.9 +116 -28
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/buffer.h@1.6 +59 -5
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/buffer_compat.h@1.4 +5 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/bufferevent.h@1.5 +123 -3
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/bufferevent_ssl.h@1.4 +8 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/dns.h@1.6 +59 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/event.h@1.9 +266 -15
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/event_compat.h@1.5 +10 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/event_struct.h@1.5 +8 -3
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/http.h@1.6 +209 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/http_struct.h@1.4 +22 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/listener.h@1.3 +11 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/tag.h@1.4 +22 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/thread.h@1.6 +10 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/util.h@1.6 +47 -3
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/include/event2/visibility.h@1.1 +55 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/include/event2/visibility.h
+
+ sntp/libevent/include/event2/visibility.h@1.0 +0 -0
+
+ sntp/libevent/include/include.am@1.2 +2 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/log-internal.h@1.3 +3 -0
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/log.c@1.6 +13 -12
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/m4/acx_pthread.m4@1.1 +279 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/m4/acx_pthread.m4
+
+ sntp/libevent/m4/acx_pthread.m4@1.0 +0 -0
+
+ sntp/libevent/minheap-internal.h@1.6 +1 -1
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/sample/dns-example.c@1.7 +2 -2
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/sample/hostcheck.c@1.1 +217 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/sample/hostcheck.c
+
+ sntp/libevent/sample/hostcheck.c@1.0 +0 -0
+
+ sntp/libevent/sample/hostcheck.h@1.1 +30 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/sample/hostcheck.h
+
+ sntp/libevent/sample/hostcheck.h@1.0 +0 -0
+
+ sntp/libevent/sample/http-server.c@1.9 +2 -2
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/sample/https-client.c@1.1 +426 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/sample/https-client.c
+
+ sntp/libevent/sample/https-client.c@1.0 +0 -0
+
+ sntp/libevent/sample/include.am@1.2 +12 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/sample/le-proxy.c@1.3 +10 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/sample/openssl_hostname_validation.c@1.1 +172 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/sample/openssl_hostname_validation.c
+
+ sntp/libevent/sample/openssl_hostname_validation.c@1.0 +0 -0
+
+ sntp/libevent/sample/openssl_hostname_validation.h@1.1 +56 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/sample/openssl_hostname_validation.h
+
+ sntp/libevent/sample/openssl_hostname_validation.h@1.0 +0 -0
+
+ sntp/libevent/test/Makefile.nmake@1.5 +7 -5
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/bench.c@1.5 +15 -4
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/bench_cascade.c@1.5 +15 -6
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/bench_http.c@1.5 +6 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/include.am@1.3 +11 -10
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress.c@1.5 +604 -7
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress.h@1.4 +3 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_buffer.c@1.7 +15 -14
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_bufferevent.c@1.5 +159 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_dns.c@1.7 +68 -8
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_et.c@1.5 +2 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_finalize.c@1.1 +346 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/test/regress_finalize.c
+
+ sntp/libevent/test/regress_finalize.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_http.c@1.7 +215 -18
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_main.c@1.6 +12 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_rpc.c@1.6 +8 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_ssl.c@1.6 +5 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_thread.c@1.5 +1 -18
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/regress_thread.h@1.1 +48 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/test/regress_thread.h
+
+ sntp/libevent/test/regress_thread.h@1.0 +0 -0
+
+ sntp/libevent/test/regress_util.c@1.6 +1 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.4 +2 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/test-changelist.c@1.5 +2 -1
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/test-closed.c@1.1 +117 -0
+ BitKeeper file /Users/harlan/src/ntp-dev-libevent/sntp/libevent/test/test-closed.c
+
+ sntp/libevent/test/test-closed.c@1.0 +0 -0
+
+ sntp/libevent/test/test-ratelim.c@1.8 +2 -0
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/test/test.sh@1.10 +3 -10
+ Upgrade to libevent-2.1.3-alpha-dev
+
+ sntp/libevent/util-internal.h@1.9 +4 -0
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/whatsnew-2.1.txt@1.3 +125 -7
+ upgrade to libevent 2.1.3-alpha-dev
+
+ sntp/libevent/win32select.c@1.5 +1 -1
+ upgrade to libevent 2.1.3-alpha-dev
+
+ChangeSet@1.3107.1.9, 2014-03-03 11:15:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P429
+ TAG: NTP_4_2_7P429
+
+ ChangeLog@1.1444 +1 -0
+ NTP_4_2_7P429
+
+ ntpd/invoke-ntp.conf.texi@1.107 +1 -1
+ NTP_4_2_7P429
+
+ ntpd/invoke-ntp.keys.texi@1.105 +1 -1
+ NTP_4_2_7P429
+
+ ntpd/invoke-ntpd.texi@1.421 +2 -2
+ NTP_4_2_7P429
+
+ ntpd/ntp.conf.5man@1.141 +7 -7
+ NTP_4_2_7P429
+
+ ntpd/ntp.conf.5mdoc@1.141 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntp.conf.html@1.102 +1 -1
+ NTP_4_2_7P429
+
+ ntpd/ntp.conf.man.in@1.141 +7 -7
+ NTP_4_2_7P429
+
+ ntpd/ntp.conf.mdoc.in@1.141 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntp.keys.5man@1.139 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntp.keys.5mdoc@1.139 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntp.keys.html@1.103 +1 -1
+ NTP_4_2_7P429
+
+ ntpd/ntp.keys.man.in@1.139 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntp.keys.mdoc.in@1.139 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntpd-opts.c@1.439 +7 -7
+ NTP_4_2_7P429
+
+ ntpd/ntpd-opts.h@1.439 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntpd.1ntpdman@1.250 +0 -1007
+ NTP_4_2_7P429
+
+ ntpd/ntpd.1ntpdmdoc@1.250 +3 -3
+ NTP_4_2_7P429
+
+ ntpd/ntpd.html@1.97 +2 -2
+ NTP_4_2_7P429
+
+ ntpd/ntpd.man.in@1.250 +0 -1007
+ NTP_4_2_7P429
+
+ ntpd/ntpd.mdoc.in@1.250 +3 -3
+ NTP_4_2_7P429
+
+ ntpdc/invoke-ntpdc.texi@1.419 +2 -2
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc-opts.c@1.434 +7 -7
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc-opts.h@1.434 +3 -3
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc.1ntpdcman@1.250 +6 -6
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.250 +2 -2
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc.html@1.263 +2 -2
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc.man.in@1.250 +6 -6
+ NTP_4_2_7P429
+
+ ntpdc/ntpdc.mdoc.in@1.250 +2 -2
+ NTP_4_2_7P429
+
+ ntpq/invoke-ntpq.texi@1.422 +2 -2
+ NTP_4_2_7P429
+
+ ntpq/ntpq-opts.c@1.436 +7 -7
+ NTP_4_2_7P429
+
+ ntpq/ntpq-opts.h@1.436 +3 -3
+ NTP_4_2_7P429
+
+ ntpq/ntpq.1ntpqman@1.250 +6 -6
+ NTP_4_2_7P429
+
+ ntpq/ntpq.1ntpqmdoc@1.250 +2 -2
+ NTP_4_2_7P429
+
+ ntpq/ntpq.html@1.94 +2 -2
+ NTP_4_2_7P429
+
+ ntpq/ntpq.man.in@1.250 +6 -6
+ NTP_4_2_7P429
+
+ ntpq/ntpq.mdoc.in@1.250 +2 -2
+ NTP_4_2_7P429
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.421 +2 -2
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.436 +7 -7
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.436 +3 -3
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.250 +7 -7
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.250 +3 -3
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd.html@1.92 +1 -1
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd.man.in@1.250 +7 -7
+ NTP_4_2_7P429
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.250 +3 -3
+ NTP_4_2_7P429
+
+ packageinfo.sh@1.433 +1 -1
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.12 +6 -6
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.12 +2 -2
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/calc_tickadj.html@1.11 +1 -1
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.11 +6 -6
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P429
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.13 +1 -1
+ NTP_4_2_7P429
+
+ scripts/invoke-plot_summary.texi@1.30 +1 -1
+ NTP_4_2_7P429
+
+ scripts/invoke-summary.texi@1.30 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.239 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.240 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.240 +2 -2
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/ntp-wait.html@1.256 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/ntp-wait.man.in@1.240 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.240 +2 -2
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.28 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.19 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.19 +2 -2
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/ntpsweep.html@1.29 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/ntpsweep.man.in@1.19 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P429
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.28 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.19 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.19 +2 -2
+ NTP_4_2_7P429
+
+ scripts/ntptrace/ntptrace.html@1.29 +1 -1
+ NTP_4_2_7P429
+
+ scripts/ntptrace/ntptrace.man.in@1.19 +6 -6
+ NTP_4_2_7P429
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P429
+
+ scripts/plot_summary.1plot_summaryman@1.30 +6 -6
+ NTP_4_2_7P429
+
+ scripts/plot_summary.1plot_summarymdoc@1.30 +3 -3
+ NTP_4_2_7P429
+
+ scripts/plot_summary.html@1.30 +1 -1
+ NTP_4_2_7P429
+
+ scripts/plot_summary.man.in@1.30 +6 -6
+ NTP_4_2_7P429
+
+ scripts/plot_summary.mdoc.in@1.30 +3 -3
+ NTP_4_2_7P429
+
+ scripts/summary.1summaryman@1.30 +6 -6
+ NTP_4_2_7P429
+
+ scripts/summary.1summarymdoc@1.30 +2 -2
+ NTP_4_2_7P429
+
+ scripts/summary.html@1.30 +1 -1
+ NTP_4_2_7P429
+
+ scripts/summary.man.in@1.30 +6 -6
+ NTP_4_2_7P429
+
+ scripts/summary.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P429
+
+ sntp/invoke-sntp.texi@1.418 +2 -2
+ NTP_4_2_7P429
+
+ sntp/sntp-opts.c@1.433 +7 -7
+ NTP_4_2_7P429
+
+ sntp/sntp-opts.h@1.433 +3 -3
+ NTP_4_2_7P429
+
+ sntp/sntp.1sntpman@1.253 +7 -7
+ NTP_4_2_7P429
+
+ sntp/sntp.1sntpmdoc@1.253 +3 -3
+ NTP_4_2_7P429
+
+ sntp/sntp.html@1.433 +2 -2
+ NTP_4_2_7P429
+
+ sntp/sntp.man.in@1.253 +7 -7
+ NTP_4_2_7P429
+
+ sntp/sntp.mdoc.in@1.253 +3 -3
+ NTP_4_2_7P429
+
+ util/invoke-ntp-keygen.texi@1.422 +2 -2
+ NTP_4_2_7P429
+
+ util/ntp-keygen-opts.c@1.436 +7 -7
+ NTP_4_2_7P429
+
+ util/ntp-keygen-opts.h@1.436 +3 -3
+ NTP_4_2_7P429
+
+ util/ntp-keygen.1ntp-keygenman@1.250 +7 -7
+ NTP_4_2_7P429
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.250 +3 -3
+ NTP_4_2_7P429
+
+ util/ntp-keygen.html@1.98 +2 -2
+ NTP_4_2_7P429
+
+ util/ntp-keygen.man.in@1.250 +7 -7
+ NTP_4_2_7P429
+
+ util/ntp-keygen.mdoc.in@1.250 +3 -3
+ NTP_4_2_7P429
+
+ChangeSet@1.3107.1.8, 2014-03-03 09:53:09+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP
+
+ ChangeLog@1.1443 +1 -0
+ [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP
+
+ configure.ac@1.575 +51 -59
+ [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP
+
+ sntp/m4/ntp_libntp.m4@1.27 +6 -8
+ [Bug 2170] Use AC_PREPROC_IFELSE instead of AC_EGREP_CPP
+
+ChangeSet@1.3107.2.2, 2014-03-03 09:33:00+00:00, stenn@psp-deb1.ntp.org
+ Reorder ChangeLog entry
+
+ ChangeLog@1.1440.1.2 +2 -2
+ Reorder ChangeLog entry
+
+ChangeSet@1.3107.2.1, 2014-03-03 10:06:43+01:00, jnperlin@hydra.(none)
+ * [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+ -- change reading the hash line code: NIST omits leading zeros.
+
+ ChangeLog@1.1440.1.1 +2 -0
+ * [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+ -- change reading the hash line code: NIST omits leading zeros.
+
+ ntpd/ntp_leapsec.c@1.7 +24 -22
+ * [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+ -- change reading the hash line code: NIST omits leading zeros.
+
+ tests/ntpd/leapsec.cpp@1.7 +74 -0
+ * [Bug 2570] refuse to load leapsec file with bad/missing SHA1 hash
+ -- added test cases for modified hash line read.
+
+ChangeSet@1.3107.1.6, 2014-03-03 03:37:29-05:00, stenn@deacon.udel.edu
+ CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check
+
+ ChangeLog@1.1441 +1 -0
+ CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check
+
+ ntpd/refclock_gpsdjson.c@1.9 +5 -4
+ CID 1189401: Use INSIST() instead of a belt-and-suspenders pointer check
+
+ChangeSet@1.3107.1.5, 2014-03-03 02:34:17-05:00, stenn@deacon.udel.edu
+ [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is not enabled at configure time
+
+ ChangeLog@1.1440 +2 -0
+ [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is not enabled at configure time
+
+ ntpd/refclock_gpsdjson.c@1.8 +2 -1
+ [Bug 2576] refclock_gpsdjson.c doesn't compile if CLOCK_GPSDJSON is not enabled at configure time
+
+ChangeSet@1.3107.1.4, 2014-03-03 02:04:30-05:00, stenn@deacon.udel.edu
+ CID 1165098: Remove logically dead code from refclock_true.c
+
+ ChangeLog@1.1439 +1 -0
+ CID 1165098: Remove logically dead code from refclock_true.c
+
+ ntpd/refclock_true.c@1.21 +2 -4
+ CID 1165098: Remove logically dead code from refclock_true.c
+
+ChangeSet@1.3107.1.3, 2014-03-02 22:47:14-05:00, stenn@deacon.udel.edu
+ In ntp_dir_sep.m4, we care about $host_os, not $target_os
+
+ ChangeLog@1.1438 +1 -0
+ In ntp_dir_sep.m4, we care about $host_os, not $target_os
+
+ sntp/m4/ntp_dir_sep.m4@1.5 +1 -1
+ In ntp_dir_sep.m4, we care about $host_os, not $target_os
+
+ChangeSet@1.3107.1.2, 2014-03-02 21:45:57-05:00, stenn@deacon.udel.edu
+ bootstrap script needs to 'touch' files in finer-grained groups
+
+ ChangeLog@1.1437 +1 -0
+ bootstrap script needs to 'touch' files in finer-grained groups
+
+ bootstrap@1.47 +3 -0
+ bootstrap script needs to 'touch' files in finer-grained groups
+
+ChangeSet@1.3107.1.1, 2014-03-03 01:58:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P428
+ TAG: NTP_4_2_7P428
+
+ ChangeLog@1.1436 +1 -0
+ NTP_4_2_7P428
+
+ ntpd/invoke-ntp.conf.texi@1.106 +1 -1
+ NTP_4_2_7P428
+
+ ntpd/invoke-ntp.keys.texi@1.104 +1 -1
+ NTP_4_2_7P428
+
+ ntpd/invoke-ntpd.texi@1.420 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntp.conf.5man@1.140 +7 -7
+ NTP_4_2_7P428
+
+ ntpd/ntp.conf.5mdoc@1.140 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntp.conf.html@1.101 +1 -1
+ NTP_4_2_7P428
+
+ ntpd/ntp.conf.man.in@1.140 +7 -7
+ NTP_4_2_7P428
+
+ ntpd/ntp.conf.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntp.keys.5man@1.138 +3 -3
+ NTP_4_2_7P428
+
+ ntpd/ntp.keys.5mdoc@1.138 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntp.keys.html@1.102 +1 -1
+ NTP_4_2_7P428
+
+ ntpd/ntp.keys.man.in@1.138 +3 -3
+ NTP_4_2_7P428
+
+ ntpd/ntp.keys.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntpd-opts.c@1.438 +7 -7
+ NTP_4_2_7P428
+
+ ntpd/ntpd-opts.h@1.438 +3 -3
+ NTP_4_2_7P428
+
+ ntpd/ntpd.1ntpdman@1.249 +7 -7
+ NTP_4_2_7P428
+
+ ntpd/ntpd.1ntpdmdoc@1.249 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntpd.html@1.96 +2 -2
+ NTP_4_2_7P428
+
+ ntpd/ntpd.man.in@1.249 +7 -7
+ NTP_4_2_7P428
+
+ ntpd/ntpd.mdoc.in@1.249 +2 -2
+ NTP_4_2_7P428
+
+ ntpdc/invoke-ntpdc.texi@1.418 +2 -2
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc-opts.c@1.433 +7 -7
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc-opts.h@1.433 +3 -3
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc.1ntpdcman@1.249 +6 -6
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.249 +1 -1
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc.html@1.262 +2 -2
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc.man.in@1.249 +6 -6
+ NTP_4_2_7P428
+
+ ntpdc/ntpdc.mdoc.in@1.249 +1 -1
+ NTP_4_2_7P428
+
+ ntpq/invoke-ntpq.texi@1.421 +2 -2
+ NTP_4_2_7P428
+
+ ntpq/ntpq-opts.c@1.435 +7 -7
+ NTP_4_2_7P428
+
+ ntpq/ntpq-opts.h@1.435 +3 -3
+ NTP_4_2_7P428
+
+ ntpq/ntpq.1ntpqman@1.249 +6 -6
+ NTP_4_2_7P428
+
+ ntpq/ntpq.1ntpqmdoc@1.249 +1 -1
+ NTP_4_2_7P428
+
+ ntpq/ntpq.html@1.93 +2 -2
+ NTP_4_2_7P428
+
+ ntpq/ntpq.man.in@1.249 +6 -6
+ NTP_4_2_7P428
+
+ ntpq/ntpq.mdoc.in@1.249 +1 -1
+ NTP_4_2_7P428
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.420 +2 -2
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.435 +7 -7
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.435 +3 -3
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.249 +7 -7
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.249 +2 -2
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd.html@1.91 +1 -1
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd.man.in@1.249 +7 -7
+ NTP_4_2_7P428
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.249 +2 -2
+ NTP_4_2_7P428
+
+ packageinfo.sh@1.432 +1 -1
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.11 +6 -6
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.11 +2 -2
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/calc_tickadj.html@1.10 +1 -1
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.10 +6 -6
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P428
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.12 +1 -1
+ NTP_4_2_7P428
+
+ scripts/invoke-plot_summary.texi@1.29 +1 -1
+ NTP_4_2_7P428
+
+ scripts/invoke-summary.texi@1.29 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.238 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.239 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.239 +2 -2
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/ntp-wait.html@1.255 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/ntp-wait.man.in@1.239 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.239 +2 -2
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.27 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.18 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.18 +2 -2
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/ntpsweep.html@1.28 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/ntpsweep.man.in@1.18 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P428
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.27 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.18 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.18 +2 -2
+ NTP_4_2_7P428
+
+ scripts/ntptrace/ntptrace.html@1.28 +1 -1
+ NTP_4_2_7P428
+
+ scripts/ntptrace/ntptrace.man.in@1.18 +6 -6
+ NTP_4_2_7P428
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P428
+
+ scripts/plot_summary.1plot_summaryman@1.29 +6 -6
+ NTP_4_2_7P428
+
+ scripts/plot_summary.1plot_summarymdoc@1.29 +3 -3
+ NTP_4_2_7P428
+
+ scripts/plot_summary.html@1.29 +1 -1
+ NTP_4_2_7P428
+
+ scripts/plot_summary.man.in@1.29 +6 -6
+ NTP_4_2_7P428
+
+ scripts/plot_summary.mdoc.in@1.29 +3 -3
+ NTP_4_2_7P428
+
+ scripts/summary.1summaryman@1.29 +6 -6
+ NTP_4_2_7P428
+
+ scripts/summary.1summarymdoc@1.29 +2 -2
+ NTP_4_2_7P428
+
+ scripts/summary.html@1.29 +1 -1
+ NTP_4_2_7P428
+
+ scripts/summary.man.in@1.29 +6 -6
+ NTP_4_2_7P428
+
+ scripts/summary.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P428
+
+ sntp/invoke-sntp.texi@1.417 +2 -2
+ NTP_4_2_7P428
+
+ sntp/sntp-opts.c@1.432 +7 -7
+ NTP_4_2_7P428
+
+ sntp/sntp-opts.h@1.432 +3 -3
+ NTP_4_2_7P428
+
+ sntp/sntp.1sntpman@1.252 +14 -14
+ NTP_4_2_7P428
+
+ sntp/sntp.1sntpmdoc@1.252 +2 -2
+ NTP_4_2_7P428
+
+ sntp/sntp.html@1.432 +2 -2
+ NTP_4_2_7P428
+
+ sntp/sntp.man.in@1.252 +14 -14
+ NTP_4_2_7P428
+
+ sntp/sntp.mdoc.in@1.252 +2 -2
+ NTP_4_2_7P428
+
+ util/invoke-ntp-keygen.texi@1.421 +2 -2
+ NTP_4_2_7P428
+
+ util/ntp-keygen-opts.c@1.435 +7 -7
+ NTP_4_2_7P428
+
+ util/ntp-keygen-opts.h@1.435 +3 -3
+ NTP_4_2_7P428
+
+ util/ntp-keygen.1ntp-keygenman@1.249 +7 -7
+ NTP_4_2_7P428
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.249 +2 -2
+ NTP_4_2_7P428
+
+ util/ntp-keygen.html@1.97 +2 -2
+ NTP_4_2_7P428
+
+ util/ntp-keygen.man.in@1.249 +7 -7
+ NTP_4_2_7P428
+
+ util/ntp-keygen.mdoc.in@1.249 +2 -2
+ NTP_4_2_7P428
+
+ChangeSet@1.3103.2.3, 2014-03-02 04:45:25-05:00, stenn@deacon.udel.edu
+ [Bug 2562] Distribute the code in libjsmn/
+
+ ChangeLog@1.1432.2.3 +1 -0
+ [Bug 2562] Distribute the code in libjsmn/
+
+ Makefile.am@1.118 +1 -0
+ [Bug 2562] Distribute the code in libjsmn/
+
+ChangeSet@1.3103.2.2, 2014-03-02 09:11:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P427
+ TAG: NTP_4_2_7P427
+
+ ChangeLog@1.1432.2.2 +1 -0
+ NTP_4_2_7P427
+
+ ntpd/invoke-ntp.conf.texi@1.105 +1 -1
+ NTP_4_2_7P427
+
+ ntpd/invoke-ntp.keys.texi@1.103 +1 -1
+ NTP_4_2_7P427
+
+ ntpd/invoke-ntpd.texi@1.419 +2 -2
+ NTP_4_2_7P427
+
+ ntpd/ntp.conf.5man@1.139 +14 -14
+ NTP_4_2_7P427
+
+ ntpd/ntp.conf.5mdoc@1.139 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntp.conf.html@1.100 +1 -1
+ NTP_4_2_7P427
+
+ ntpd/ntp.conf.man.in@1.139 +14 -14
+ NTP_4_2_7P427
+
+ ntpd/ntp.conf.mdoc.in@1.139 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntp.keys.5man@1.137 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntp.keys.5mdoc@1.137 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntp.keys.html@1.101 +1 -1
+ NTP_4_2_7P427
+
+ ntpd/ntp.keys.man.in@1.137 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntp.keys.mdoc.in@1.137 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntpd-opts.c@1.437 +7 -7
+ NTP_4_2_7P427
+
+ ntpd/ntpd-opts.h@1.437 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntpd.1ntpdman@1.248 +7 -7
+ NTP_4_2_7P427
+
+ ntpd/ntpd.1ntpdmdoc@1.248 +3 -3
+ NTP_4_2_7P427
+
+ ntpd/ntpd.html@1.95 +2 -2
+ NTP_4_2_7P427
+
+ ntpd/ntpd.man.in@1.248 +7 -7
+ NTP_4_2_7P427
+
+ ntpd/ntpd.mdoc.in@1.248 +3 -3
+ NTP_4_2_7P427
+
+ ntpdc/invoke-ntpdc.texi@1.417 +2 -2
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc-opts.c@1.432 +7 -7
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc-opts.h@1.432 +3 -3
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc.1ntpdcman@1.248 +13 -13
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.248 +2 -2
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc.html@1.261 +2 -2
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc.man.in@1.248 +13 -13
+ NTP_4_2_7P427
+
+ ntpdc/ntpdc.mdoc.in@1.248 +2 -2
+ NTP_4_2_7P427
+
+ ntpq/invoke-ntpq.texi@1.420 +2 -2
+ NTP_4_2_7P427
+
+ ntpq/ntpq-opts.c@1.434 +7 -7
+ NTP_4_2_7P427
+
+ ntpq/ntpq-opts.h@1.434 +3 -3
+ NTP_4_2_7P427
+
+ ntpq/ntpq.1ntpqman@1.248 +13 -13
+ NTP_4_2_7P427
+
+ ntpq/ntpq.1ntpqmdoc@1.248 +2 -2
+ NTP_4_2_7P427
+
+ ntpq/ntpq.html@1.92 +2 -2
+ NTP_4_2_7P427
+
+ ntpq/ntpq.man.in@1.248 +13 -13
+ NTP_4_2_7P427
+
+ ntpq/ntpq.mdoc.in@1.248 +2 -2
+ NTP_4_2_7P427
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.419 +2 -2
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.434 +7 -7
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.434 +3 -3
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.248 +7 -7
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.248 +3 -3
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd.html@1.90 +1 -1
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd.man.in@1.248 +7 -7
+ NTP_4_2_7P427
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.248 +3 -3
+ NTP_4_2_7P427
+
+ packageinfo.sh@1.431 +1 -1
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.10 +6 -6
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.10 +2 -2
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/calc_tickadj.html@1.9 +1 -1
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.9 +6 -6
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P427
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.11 +1 -1
+ NTP_4_2_7P427
+
+ scripts/invoke-plot_summary.texi@1.28 +1 -1
+ NTP_4_2_7P427
+
+ scripts/invoke-summary.texi@1.28 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.237 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.238 +6 -6
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.238 +2 -2
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/ntp-wait.html@1.254 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/ntp-wait.man.in@1.238 +6 -6
+ NTP_4_2_7P427
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.238 +2 -2
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.26 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.17 +6 -6
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.17 +2 -2
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/ntpsweep.html@1.27 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/ntpsweep.man.in@1.17 +6 -6
+ NTP_4_2_7P427
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P427
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.26 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.17 +13 -13
+ NTP_4_2_7P427
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.17 +2 -2
+ NTP_4_2_7P427
+
+ scripts/ntptrace/ntptrace.html@1.27 +1 -1
+ NTP_4_2_7P427
+
+ scripts/ntptrace/ntptrace.man.in@1.17 +13 -13
+ NTP_4_2_7P427
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P427
+
+ scripts/plot_summary.1plot_summaryman@1.28 +6 -6
+ NTP_4_2_7P427
+
+ scripts/plot_summary.1plot_summarymdoc@1.28 +2 -2
+ NTP_4_2_7P427
+
+ scripts/plot_summary.html@1.28 +1 -1
+ NTP_4_2_7P427
+
+ scripts/plot_summary.man.in@1.28 +6 -6
+ NTP_4_2_7P427
+
+ scripts/plot_summary.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P427
+
+ scripts/summary.1summaryman@1.28 +6 -6
+ NTP_4_2_7P427
+
+ scripts/summary.1summarymdoc@1.28 +2 -2
+ NTP_4_2_7P427
+
+ scripts/summary.html@1.28 +1 -1
+ NTP_4_2_7P427
+
+ scripts/summary.man.in@1.28 +6 -6
+ NTP_4_2_7P427
+
+ scripts/summary.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P427
+
+ sntp/invoke-sntp.texi@1.416 +2 -2
+ NTP_4_2_7P427
+
+ sntp/sntp-opts.c@1.431 +7 -7
+ NTP_4_2_7P427
+
+ sntp/sntp-opts.h@1.431 +3 -3
+ NTP_4_2_7P427
+
+ sntp/sntp.1sntpman@1.251 +14 -14
+ NTP_4_2_7P427
+
+ sntp/sntp.1sntpmdoc@1.251 +3 -3
+ NTP_4_2_7P427
+
+ sntp/sntp.html@1.431 +2 -2
+ NTP_4_2_7P427
+
+ sntp/sntp.man.in@1.251 +14 -14
+ NTP_4_2_7P427
+
+ sntp/sntp.mdoc.in@1.251 +3 -3
+ NTP_4_2_7P427
+
+ util/invoke-ntp-keygen.texi@1.420 +2 -2
+ NTP_4_2_7P427
+
+ util/ntp-keygen-opts.c@1.434 +7 -7
+ NTP_4_2_7P427
+
+ util/ntp-keygen-opts.h@1.434 +3 -3
+ NTP_4_2_7P427
+
+ util/ntp-keygen.1ntp-keygenman@1.248 +7 -7
+ NTP_4_2_7P427
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.248 +3 -3
+ NTP_4_2_7P427
+
+ util/ntp-keygen.html@1.96 +2 -2
+ NTP_4_2_7P427
+
+ util/ntp-keygen.man.in@1.248 +7 -7
+ NTP_4_2_7P427
+
+ util/ntp-keygen.mdoc.in@1.248 +3 -3
+ NTP_4_2_7P427
+
+ChangeSet@1.3102.1.1, 2014-03-02 09:25:15+01:00, jnperlin@hydra.(none)
+ [Bug 2562] GPSD_JSON clock: fix build issues with solaris (asprintf(),isfinite())
+
+ ChangeLog@1.1431.1.1 +1 -0
+ [Bug 2562] GPSD_JSON clock: fix build issues with solaris (asprintf(),isfinite())
+
+ ntpd/refclock_gpsdjson.c@1.7 +40 -14
+ [Bug 2562] GPSD_JSON clock: fix build issues with solaris (asprintf(),isfinite())
+
+ChangeSet@1.3103.1.1, 2014-03-01 11:52:12+00:00, perlinger@psp-deb1.ntp.org
+ [Bug 2570] add signature check when reading leapseconds file
+
+ ChangeLog@1.1432.1.1 +1 -0
+ [Bug 2570] add signature check when reading leapseconds file
+
+ libntp/Makefile.am@1.71.1.1 +1 -0
+ [Bug 2570] add signature check when reading leapseconds file
+ - include isc/sha1.c in build
+
+ ntpd/ntp_leapsec.c@1.4.1.1 +141 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - add support functions and plumbing
+
+ ntpd/ntp_leapsec.h@1.3.1.1 +14 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - define hash validation result definitions
+ - provide argument how to handle validation results
+
+
+ ntpd/ntp_util.c@1.106.1.1 +10 -2
+ [Bug 2570] add signature check when reading leapseconds file
+ - hardwired refusal of files with bad signature (no signature is OK!)
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.47.1.1 +7 -3
+ [Bug 2570] add signature check when reading leapseconds file
+ - include isc/sha1.c in build
+
+ tests/ntpd/leapsec.cpp@1.4.1.1 +114 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - Add test cases for good/missing/bad/malformed SHA1 lines
+
+ChangeSet@1.3105, 2014-03-01 12:46:15+01:00, jnperlin@hydra.(none)
+ default
+
+ ntpd/ntp_util.c@1.108 +10 -2
+ default
+
+ChangeSet@1.3104, 2014-03-01 11:13:10+00:00, perlinger@psp-deb1.ntp.org
+ [Bug 2570] add signature check when reading leapseconds file
+ - include isc/sha1.c in build
+
+ ChangeLog@1.1433 +1 -0
+ [Bug 2570] add signature check when reading leapseconds file
+
+ libntp/Makefile.am@1.72 +1 -0
+ [Bug 2570] add signature check when reading leapseconds file
+ - include isc/sha1.c in build
+
+ ntpd/ntp_leapsec.c@1.5 +141 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - add support functions and plumbing
+
+ ntpd/ntp_leapsec.h@1.4 +14 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - define hash validation result definitions
+ - provide argument how to handle validation results
+
+
+ ntpd/ntp_util.c@1.107 +2 -2
+ [Bug 2570] add signature check when reading leapseconds file
+ - hardwired refusal of files without good signature
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.48 +7 -3
+ [Bug 2570] add signature check when reading leapseconds file
+ - include isc/sha1.c in build
+
+ tests/ntpd/leapsec.cpp@1.5 +114 -1
+ [Bug 2570] add signature check when reading leapseconds file
+ - Add test cases for good/missing/bad/malformed SHA1 lines
+
+ChangeSet@1.3093.4.4, 2014-02-28 11:46:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P426
+ TAG: NTP_4_2_7P426
+
+ ChangeLog@1.1430.1.6 +1 -0
+ NTP_4_2_7P426
+
+ ntpd/invoke-ntp.conf.texi@1.104 +1 -1
+ NTP_4_2_7P426
+
+ ntpd/invoke-ntp.keys.texi@1.102 +1 -1
+ NTP_4_2_7P426
+
+ ntpd/invoke-ntpd.texi@1.418 +2 -2
+ NTP_4_2_7P426
+
+ ntpd/ntp.conf.5man@1.138 +14 -14
+ NTP_4_2_7P426
+
+ ntpd/ntp.conf.5mdoc@1.138 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntp.conf.html@1.99 +1 -1
+ NTP_4_2_7P426
+
+ ntpd/ntp.conf.man.in@1.138 +14 -14
+ NTP_4_2_7P426
+
+ ntpd/ntp.conf.mdoc.in@1.138 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntp.keys.5man@1.136 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntp.keys.5mdoc@1.136 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntp.keys.html@1.100 +1 -1
+ NTP_4_2_7P426
+
+ ntpd/ntp.keys.man.in@1.136 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntp.keys.mdoc.in@1.136 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntpd-opts.c@1.436 +7 -7
+ NTP_4_2_7P426
+
+ ntpd/ntpd-opts.h@1.436 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntpd.1ntpdman@1.247 +7 -7
+ NTP_4_2_7P426
+
+ ntpd/ntpd.1ntpdmdoc@1.247 +3 -3
+ NTP_4_2_7P426
+
+ ntpd/ntpd.html@1.94 +2 -2
+ NTP_4_2_7P426
+
+ ntpd/ntpd.man.in@1.247 +7 -7
+ NTP_4_2_7P426
+
+ ntpd/ntpd.mdoc.in@1.247 +3 -3
+ NTP_4_2_7P426
+
+ ntpdc/invoke-ntpdc.texi@1.416 +2 -2
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc-opts.c@1.431 +7 -7
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc-opts.h@1.431 +3 -3
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc.1ntpdcman@1.247 +13 -13
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.247 +2 -2
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc.html@1.260 +2 -2
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc.man.in@1.247 +13 -13
+ NTP_4_2_7P426
+
+ ntpdc/ntpdc.mdoc.in@1.247 +2 -2
+ NTP_4_2_7P426
+
+ ntpq/invoke-ntpq.texi@1.419 +2 -2
+ NTP_4_2_7P426
+
+ ntpq/ntpq-opts.c@1.433 +7 -7
+ NTP_4_2_7P426
+
+ ntpq/ntpq-opts.h@1.433 +3 -3
+ NTP_4_2_7P426
+
+ ntpq/ntpq.1ntpqman@1.247 +13 -13
+ NTP_4_2_7P426
+
+ ntpq/ntpq.1ntpqmdoc@1.247 +2 -2
+ NTP_4_2_7P426
+
+ ntpq/ntpq.html@1.91 +2 -2
+ NTP_4_2_7P426
+
+ ntpq/ntpq.man.in@1.247 +13 -13
+ NTP_4_2_7P426
+
+ ntpq/ntpq.mdoc.in@1.247 +2 -2
+ NTP_4_2_7P426
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.418 +2 -2
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.433 +7 -7
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.433 +3 -3
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.247 +7 -7
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.247 +3 -3
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd.html@1.89 +1 -1
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd.man.in@1.247 +7 -7
+ NTP_4_2_7P426
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.247 +3 -3
+ NTP_4_2_7P426
+
+ packageinfo.sh@1.430 +1 -1
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.9 +13 -13
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.9 +2 -2
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/calc_tickadj.html@1.8 +1 -1
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.8 +13 -13
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P426
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.10 +1 -1
+ NTP_4_2_7P426
+
+ scripts/invoke-plot_summary.texi@1.27 +1 -1
+ NTP_4_2_7P426
+
+ scripts/invoke-summary.texi@1.27 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.236 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.237 +6 -6
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.237 +2 -2
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/ntp-wait.html@1.253 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/ntp-wait.man.in@1.237 +6 -6
+ NTP_4_2_7P426
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.237 +2 -2
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.25 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.16 +6 -6
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.16 +2 -2
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/ntpsweep.html@1.26 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/ntpsweep.man.in@1.16 +6 -6
+ NTP_4_2_7P426
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P426
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.25 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.16 +13 -13
+ NTP_4_2_7P426
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.16 +2 -2
+ NTP_4_2_7P426
+
+ scripts/ntptrace/ntptrace.html@1.26 +1 -1
+ NTP_4_2_7P426
+
+ scripts/ntptrace/ntptrace.man.in@1.16 +13 -13
+ NTP_4_2_7P426
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P426
+
+ scripts/plot_summary.1plot_summaryman@1.27 +6 -6
+ NTP_4_2_7P426
+
+ scripts/plot_summary.1plot_summarymdoc@1.27 +2 -2
+ NTP_4_2_7P426
+
+ scripts/plot_summary.html@1.27 +1 -1
+ NTP_4_2_7P426
+
+ scripts/plot_summary.man.in@1.27 +6 -6
+ NTP_4_2_7P426
+
+ scripts/plot_summary.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P426
+
+ scripts/summary.1summaryman@1.27 +6 -6
+ NTP_4_2_7P426
+
+ scripts/summary.1summarymdoc@1.27 +2 -2
+ NTP_4_2_7P426
+
+ scripts/summary.html@1.27 +1 -1
+ NTP_4_2_7P426
+
+ scripts/summary.man.in@1.27 +6 -6
+ NTP_4_2_7P426
+
+ scripts/summary.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P426
+
+ sntp/invoke-sntp.texi@1.415 +2 -2
+ NTP_4_2_7P426
+
+ sntp/sntp-opts.c@1.430 +7 -7
+ NTP_4_2_7P426
+
+ sntp/sntp-opts.h@1.430 +3 -3
+ NTP_4_2_7P426
+
+ sntp/sntp.1sntpman@1.250 +7 -7
+ NTP_4_2_7P426
+
+ sntp/sntp.1sntpmdoc@1.250 +3 -3
+ NTP_4_2_7P426
+
+ sntp/sntp.html@1.430 +2 -2
+ NTP_4_2_7P426
+
+ sntp/sntp.man.in@1.250 +7 -7
+ NTP_4_2_7P426
+
+ sntp/sntp.mdoc.in@1.250 +3 -3
+ NTP_4_2_7P426
+
+ util/invoke-ntp-keygen.texi@1.419 +2 -2
+ NTP_4_2_7P426
+
+ util/ntp-keygen-opts.c@1.433 +7 -7
+ NTP_4_2_7P426
+
+ util/ntp-keygen-opts.h@1.433 +3 -3
+ NTP_4_2_7P426
+
+ util/ntp-keygen.1ntp-keygenman@1.247 +1250 -0
+ NTP_4_2_7P426
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.247 +3 -3
+ NTP_4_2_7P426
+
+ util/ntp-keygen.html@1.95 +2 -2
+ NTP_4_2_7P426
+
+ util/ntp-keygen.man.in@1.247 +1250 -0
+ NTP_4_2_7P426
+
+ util/ntp-keygen.mdoc.in@1.247 +3 -3
+ NTP_4_2_7P426
+
+ChangeSet@1.3093.4.3, 2014-02-28 06:24:16-05:00, stenn@deacon.udel.edu
+ test -nt is not portable
+
+ bootstrap@1.46 +7 -2
+ test -nt is not portable
+
+ChangeSet@1.3093.4.2, 2014-02-28 04:20:55-05:00, stenn@deacon.udel.edu
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ ntpd/ntp_io.c@1.391 +4 -1
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ChangeSet@1.3093.4.1, 2014-02-28 08:14:13+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2572] cross-compiling fails for --with-yielding_select
+
+ ChangeLog@1.1430.1.5 +1 -0
+ [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups
+
+ ChangeLog@1.1430.1.4 +1 -0
+ [Bug 2572] cross-compiling fails for --with-yielding_select
+
+ bootstrap@1.45 +3 -0
+ [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups.
+
+ sntp/libevent/m4/openldap-thread-check.m4@1.2 +1 -1
+ [Bug 2572] cross-compiling fails for --with-yielding_select
+
+ChangeSet@1.3093.3.2, 2014-02-27 23:55:28-08:00, harlan@hms-mbp11.local
+ test SCCS date/time keyword expansion for html files
+
+ html/extern.html@1.18 +0 -0
+ Turn on SCCS flag
+
+ChangeSet@1.3093.1.10, 2014-02-28 02:29:49-05:00, stenn@deacon.udel.edu
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ ChangeLog@1.1430.1.3 +1 -0
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ ntpq/ntpq-subs.c@1.99 +7 -3
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ChangeSet@1.3093.3.1, 2014-02-27 22:53:21-08:00, harlan@hms-mbp11.local
+ test bk keyword expansion
+
+ html/extern.html@1.17 +1 -1
+ test bk keyword expansion
+
+ChangeSet@1.3093.2.1, 2014-02-28 06:37:01+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ ChangeLog@1.1425.1.1 +1 -0
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ configure.ac@1.571.1.2 +2 -2
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ ntpd/ntp_io.c@1.390 +9 -1
+ [Bug 2561] Allow wildcards in the target of the "interface" command
+
+ChangeSet@1.3093.1.8, 2014-02-26 10:06:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P425
+ TAG: NTP_4_2_7P425
+
+ ChangeLog@1.1430.1.1 +1 -0
+ NTP_4_2_7P425
+
+ ntpd/invoke-ntp.conf.texi@1.103 +1 -1
+ NTP_4_2_7P425
+
+ ntpd/invoke-ntp.keys.texi@1.101 +1 -1
+ NTP_4_2_7P425
+
+ ntpd/invoke-ntpd.texi@1.417 +2 -2
+ NTP_4_2_7P425
+
+ ntpd/ntp.conf.5man@1.137 +7 -7
+ NTP_4_2_7P425
+
+ ntpd/ntp.conf.5mdoc@1.137 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntp.conf.html@1.98 +1 -1
+ NTP_4_2_7P425
+
+ ntpd/ntp.conf.man.in@1.137 +7 -7
+ NTP_4_2_7P425
+
+ ntpd/ntp.conf.mdoc.in@1.137 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntp.keys.5man@1.135 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntp.keys.5mdoc@1.135 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntp.keys.html@1.99 +1 -1
+ NTP_4_2_7P425
+
+ ntpd/ntp.keys.man.in@1.135 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntp.keys.mdoc.in@1.135 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntpd-opts.c@1.435 +7 -7
+ NTP_4_2_7P425
+
+ ntpd/ntpd-opts.h@1.435 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntpd.1ntpdman@1.246 +7 -7
+ NTP_4_2_7P425
+
+ ntpd/ntpd.1ntpdmdoc@1.246 +3 -3
+ NTP_4_2_7P425
+
+ ntpd/ntpd.html@1.93 +2 -2
+ NTP_4_2_7P425
+
+ ntpd/ntpd.man.in@1.246 +7 -7
+ NTP_4_2_7P425
+
+ ntpd/ntpd.mdoc.in@1.246 +3 -3
+ NTP_4_2_7P425
+
+ ntpdc/invoke-ntpdc.texi@1.415 +2 -2
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc-opts.c@1.430 +7 -7
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc-opts.h@1.430 +3 -3
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc.1ntpdcman@1.246 +6 -6
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.246 +2 -2
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc.html@1.259 +2 -2
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc.man.in@1.246 +6 -6
+ NTP_4_2_7P425
+
+ ntpdc/ntpdc.mdoc.in@1.246 +2 -2
+ NTP_4_2_7P425
+
+ ntpq/invoke-ntpq.texi@1.418 +2 -2
+ NTP_4_2_7P425
+
+ ntpq/ntpq-opts.c@1.432 +7 -7
+ NTP_4_2_7P425
+
+ ntpq/ntpq-opts.h@1.432 +3 -3
+ NTP_4_2_7P425
+
+ ntpq/ntpq.1ntpqman@1.246 +6 -6
+ NTP_4_2_7P425
+
+ ntpq/ntpq.1ntpqmdoc@1.246 +2 -2
+ NTP_4_2_7P425
+
+ ntpq/ntpq.html@1.90 +2 -2
+ NTP_4_2_7P425
+
+ ntpq/ntpq.man.in@1.246 +6 -6
+ NTP_4_2_7P425
+
+ ntpq/ntpq.mdoc.in@1.246 +2 -2
+ NTP_4_2_7P425
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.417 +2 -2
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.432 +7 -7
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.432 +3 -3
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.246 +7 -7
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.246 +3 -3
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd.html@1.88 +1 -1
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd.man.in@1.246 +7 -7
+ NTP_4_2_7P425
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.246 +3 -3
+ NTP_4_2_7P425
+
+ packageinfo.sh@1.429 +1 -1
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.8 +13 -13
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.8 +2 -2
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/calc_tickadj.html@1.7 +1 -1
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.7 +13 -13
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P425
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.9 +1 -1
+ NTP_4_2_7P425
+
+ scripts/invoke-plot_summary.texi@1.26 +1 -1
+ NTP_4_2_7P425
+
+ scripts/invoke-summary.texi@1.26 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.235 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.236 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.236 +2 -2
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/ntp-wait.html@1.252 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/ntp-wait.man.in@1.236 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.236 +2 -2
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.24 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.15 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.15 +2 -2
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/ntpsweep.html@1.25 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/ntpsweep.man.in@1.15 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P425
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.24 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.15 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.15 +2 -2
+ NTP_4_2_7P425
+
+ scripts/ntptrace/ntptrace.html@1.25 +1 -1
+ NTP_4_2_7P425
+
+ scripts/ntptrace/ntptrace.man.in@1.15 +6 -6
+ NTP_4_2_7P425
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P425
+
+ scripts/plot_summary.1plot_summaryman@1.26 +6 -6
+ NTP_4_2_7P425
+
+ scripts/plot_summary.1plot_summarymdoc@1.26 +2 -2
+ NTP_4_2_7P425
+
+ scripts/plot_summary.html@1.26 +1 -1
+ NTP_4_2_7P425
+
+ scripts/plot_summary.man.in@1.26 +6 -6
+ NTP_4_2_7P425
+
+ scripts/plot_summary.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P425
+
+ scripts/summary.1summaryman@1.26 +6 -6
+ NTP_4_2_7P425
+
+ scripts/summary.1summarymdoc@1.26 +2 -2
+ NTP_4_2_7P425
+
+ scripts/summary.html@1.26 +1 -1
+ NTP_4_2_7P425
+
+ scripts/summary.man.in@1.26 +6 -6
+ NTP_4_2_7P425
+
+ scripts/summary.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P425
+
+ sntp/invoke-sntp.texi@1.414 +2 -2
+ NTP_4_2_7P425
+
+ sntp/sntp-opts.c@1.429 +7 -7
+ NTP_4_2_7P425
+
+ sntp/sntp-opts.h@1.429 +3 -3
+ NTP_4_2_7P425
+
+ sntp/sntp.1sntpman@1.249 +7 -7
+ NTP_4_2_7P425
+
+ sntp/sntp.1sntpmdoc@1.249 +3 -3
+ NTP_4_2_7P425
+
+ sntp/sntp.html@1.429 +2 -2
+ NTP_4_2_7P425
+
+ sntp/sntp.man.in@1.249 +7 -7
+ NTP_4_2_7P425
+
+ sntp/sntp.mdoc.in@1.249 +3 -3
+ NTP_4_2_7P425
+
+ util/invoke-ntp-keygen.texi@1.418 +2 -2
+ NTP_4_2_7P425
+
+ util/ntp-keygen-opts.c@1.432 +7 -7
+ NTP_4_2_7P425
+
+ util/ntp-keygen-opts.h@1.432 +3 -3
+ NTP_4_2_7P425
+
+ util/ntp-keygen.1ntp-keygenman@1.246 +0 -1250
+ NTP_4_2_7P425
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.246 +3 -3
+ NTP_4_2_7P425
+
+ util/ntp-keygen.html@1.94 +2 -2
+ NTP_4_2_7P425
+
+ util/ntp-keygen.man.in@1.246 +0 -1250
+ NTP_4_2_7P425
+
+ util/ntp-keygen.mdoc.in@1.246 +3 -3
+ NTP_4_2_7P425
+
+ChangeSet@1.3102, 2014-02-25 21:26:28+01:00, jnperlin@hydra.(none)
+ [Bug 2562] first release of the GPSD client clock (type 46)
+
+ ChangeLog@1.1431 +1 -0
+ [Bug 2562] first release of the GPSD client clock (type 46)
+
+ChangeSet@1.3093.1.7, 2014-02-25 01:36:30-05:00, stenn@deacon.udel.edu
+ Copyright file update
+
+ ChangeLog@1.1430 +1 -0
+ Copyright file update
+
+ html/copyright.html@1.62 +1 -0
+ Copyright file update
+
+ChangeSet@1.3093.1.6, 2014-02-24 05:59:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P424
+ TAG: NTP_4_2_7P424
+
+ ChangeLog@1.1429 +1 -0
+ NTP_4_2_7P424
+
+ ntpd/invoke-ntp.conf.texi@1.102 +1 -1
+ NTP_4_2_7P424
+
+ ntpd/invoke-ntp.keys.texi@1.100 +1 -1
+ NTP_4_2_7P424
+
+ ntpd/invoke-ntpd.texi@1.416 +2 -2
+ NTP_4_2_7P424
+
+ ntpd/ntp.conf.5man@1.136 +7 -7
+ NTP_4_2_7P424
+
+ ntpd/ntp.conf.5mdoc@1.136 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntp.conf.html@1.97 +1 -1
+ NTP_4_2_7P424
+
+ ntpd/ntp.conf.man.in@1.136 +7 -7
+ NTP_4_2_7P424
+
+ ntpd/ntp.conf.mdoc.in@1.136 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntp.keys.5man@1.134 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntp.keys.5mdoc@1.134 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntp.keys.html@1.98 +1 -1
+ NTP_4_2_7P424
+
+ ntpd/ntp.keys.man.in@1.134 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntp.keys.mdoc.in@1.134 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntpd-opts.c@1.434 +7 -7
+ NTP_4_2_7P424
+
+ ntpd/ntpd-opts.h@1.434 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntpd.1ntpdman@1.245 +7 -7
+ NTP_4_2_7P424
+
+ ntpd/ntpd.1ntpdmdoc@1.245 +3 -3
+ NTP_4_2_7P424
+
+ ntpd/ntpd.html@1.92 +2 -2
+ NTP_4_2_7P424
+
+ ntpd/ntpd.man.in@1.245 +7 -7
+ NTP_4_2_7P424
+
+ ntpd/ntpd.mdoc.in@1.245 +3 -3
+ NTP_4_2_7P424
+
+ ntpdc/invoke-ntpdc.texi@1.414 +2 -2
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc-opts.c@1.429 +7 -7
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc-opts.h@1.429 +3 -3
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc.1ntpdcman@1.245 +6 -6
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.245 +2 -2
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc.html@1.258 +2 -2
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc.man.in@1.245 +6 -6
+ NTP_4_2_7P424
+
+ ntpdc/ntpdc.mdoc.in@1.245 +2 -2
+ NTP_4_2_7P424
+
+ ntpq/invoke-ntpq.texi@1.417 +2 -2
+ NTP_4_2_7P424
+
+ ntpq/ntpq-opts.c@1.431 +7 -7
+ NTP_4_2_7P424
+
+ ntpq/ntpq-opts.h@1.431 +3 -3
+ NTP_4_2_7P424
+
+ ntpq/ntpq.1ntpqman@1.245 +6 -6
+ NTP_4_2_7P424
+
+ ntpq/ntpq.1ntpqmdoc@1.245 +2 -2
+ NTP_4_2_7P424
+
+ ntpq/ntpq.html@1.89 +2 -2
+ NTP_4_2_7P424
+
+ ntpq/ntpq.man.in@1.245 +6 -6
+ NTP_4_2_7P424
+
+ ntpq/ntpq.mdoc.in@1.245 +2 -2
+ NTP_4_2_7P424
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.416 +2 -2
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.431 +7 -7
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.431 +3 -3
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.245 +235 -0
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.245 +3 -3
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd.html@1.87 +1 -1
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd.man.in@1.245 +235 -0
+ NTP_4_2_7P424
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.245 +3 -3
+ NTP_4_2_7P424
+
+ packageinfo.sh@1.428 +1 -1
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.7 +6 -6
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.7 +2 -2
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/calc_tickadj.html@1.6 +1 -1
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.6 +6 -6
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P424
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.8 +1 -1
+ NTP_4_2_7P424
+
+ scripts/invoke-plot_summary.texi@1.25 +1 -1
+ NTP_4_2_7P424
+
+ scripts/invoke-summary.texi@1.25 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.234 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.235 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.235 +2 -2
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/ntp-wait.html@1.251 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/ntp-wait.man.in@1.235 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.235 +2 -2
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.23 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.14 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.14 +2 -2
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/ntpsweep.html@1.24 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/ntpsweep.man.in@1.14 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P424
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.23 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.14 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.14 +2 -2
+ NTP_4_2_7P424
+
+ scripts/ntptrace/ntptrace.html@1.24 +1 -1
+ NTP_4_2_7P424
+
+ scripts/ntptrace/ntptrace.man.in@1.14 +6 -6
+ NTP_4_2_7P424
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P424
+
+ scripts/plot_summary.1plot_summaryman@1.25 +6 -6
+ NTP_4_2_7P424
+
+ scripts/plot_summary.1plot_summarymdoc@1.25 +2 -2
+ NTP_4_2_7P424
+
+ scripts/plot_summary.html@1.25 +1 -1
+ NTP_4_2_7P424
+
+ scripts/plot_summary.man.in@1.25 +6 -6
+ NTP_4_2_7P424
+
+ scripts/plot_summary.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P424
+
+ scripts/summary.1summaryman@1.25 +6 -6
+ NTP_4_2_7P424
+
+ scripts/summary.1summarymdoc@1.25 +2 -2
+ NTP_4_2_7P424
+
+ scripts/summary.html@1.25 +1 -1
+ NTP_4_2_7P424
+
+ scripts/summary.man.in@1.25 +6 -6
+ NTP_4_2_7P424
+
+ scripts/summary.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P424
+
+ sntp/invoke-sntp.texi@1.413 +2 -2
+ NTP_4_2_7P424
+
+ sntp/sntp-opts.c@1.428 +7 -7
+ NTP_4_2_7P424
+
+ sntp/sntp-opts.h@1.428 +3 -3
+ NTP_4_2_7P424
+
+ sntp/sntp.1sntpman@1.248 +7 -7
+ NTP_4_2_7P424
+
+ sntp/sntp.1sntpmdoc@1.248 +3 -3
+ NTP_4_2_7P424
+
+ sntp/sntp.html@1.428 +2 -2
+ NTP_4_2_7P424
+
+ sntp/sntp.man.in@1.248 +7 -7
+ NTP_4_2_7P424
+
+ sntp/sntp.mdoc.in@1.248 +3 -3
+ NTP_4_2_7P424
+
+ util/invoke-ntp-keygen.texi@1.417 +2 -2
+ NTP_4_2_7P424
+
+ util/ntp-keygen-opts.c@1.431 +7 -7
+ NTP_4_2_7P424
+
+ util/ntp-keygen-opts.h@1.431 +3 -3
+ NTP_4_2_7P424
+
+ util/ntp-keygen.1ntp-keygenman@1.245 +7 -7
+ NTP_4_2_7P424
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.245 +3 -3
+ NTP_4_2_7P424
+
+ util/ntp-keygen.html@1.93 +2 -2
+ NTP_4_2_7P424
+
+ util/ntp-keygen.man.in@1.245 +7 -7
+ NTP_4_2_7P424
+
+ util/ntp-keygen.mdoc.in@1.245 +3 -3
+ NTP_4_2_7P424
+
+ChangeSet@1.3093.1.5, 2014-02-23 18:25:43-05:00, stenn@deacon.udel.edu
+ [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly
+
+ ChangeLog@1.1428 +1 -0
+ [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly
+
+ libntp/work_fork.c@1.12 +3 -1
+ [Bug 2541] ntpd terminates itself with SIGHUP unexpectedly
+
+ChangeSet@1.3093.1.4, 2014-02-23 22:59:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P423
+ TAG: NTP_4_2_7P423
+
+ ChangeLog@1.1427 +1 -0
+ NTP_4_2_7P423
+
+ ntpd/invoke-ntp.conf.texi@1.101 +1 -1
+ NTP_4_2_7P423
+
+ ntpd/invoke-ntp.keys.texi@1.99 +1 -1
+ NTP_4_2_7P423
+
+ ntpd/invoke-ntpd.texi@1.415 +2 -2
+ NTP_4_2_7P423
+
+ ntpd/ntp.conf.5man@1.135 +7 -7
+ NTP_4_2_7P423
+
+ ntpd/ntp.conf.5mdoc@1.135 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntp.conf.html@1.96 +1 -1
+ NTP_4_2_7P423
+
+ ntpd/ntp.conf.man.in@1.135 +7 -7
+ NTP_4_2_7P423
+
+ ntpd/ntp.conf.mdoc.in@1.135 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntp.keys.5man@1.133 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntp.keys.5mdoc@1.133 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntp.keys.html@1.97 +1 -1
+ NTP_4_2_7P423
+
+ ntpd/ntp.keys.man.in@1.133 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntp.keys.mdoc.in@1.133 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntpd-opts.c@1.433 +7 -7
+ NTP_4_2_7P423
+
+ ntpd/ntpd-opts.h@1.433 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntpd.1ntpdman@1.244 +7 -7
+ NTP_4_2_7P423
+
+ ntpd/ntpd.1ntpdmdoc@1.244 +3 -3
+ NTP_4_2_7P423
+
+ ntpd/ntpd.html@1.91 +2 -2
+ NTP_4_2_7P423
+
+ ntpd/ntpd.man.in@1.244 +7 -7
+ NTP_4_2_7P423
+
+ ntpd/ntpd.mdoc.in@1.244 +3 -3
+ NTP_4_2_7P423
+
+ ntpdc/invoke-ntpdc.texi@1.413 +2 -2
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc-opts.c@1.428 +7 -7
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc-opts.h@1.428 +3 -3
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc.1ntpdcman@1.244 +6 -6
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.244 +2 -2
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc.html@1.257 +2 -2
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc.man.in@1.244 +6 -6
+ NTP_4_2_7P423
+
+ ntpdc/ntpdc.mdoc.in@1.244 +2 -2
+ NTP_4_2_7P423
+
+ ntpq/invoke-ntpq.texi@1.416 +2 -2
+ NTP_4_2_7P423
+
+ ntpq/ntpq-opts.c@1.430 +7 -7
+ NTP_4_2_7P423
+
+ ntpq/ntpq-opts.h@1.430 +3 -3
+ NTP_4_2_7P423
+
+ ntpq/ntpq.1ntpqman@1.244 +6 -6
+ NTP_4_2_7P423
+
+ ntpq/ntpq.1ntpqmdoc@1.244 +2 -2
+ NTP_4_2_7P423
+
+ ntpq/ntpq.html@1.88 +2 -2
+ NTP_4_2_7P423
+
+ ntpq/ntpq.man.in@1.244 +6 -6
+ NTP_4_2_7P423
+
+ ntpq/ntpq.mdoc.in@1.244 +2 -2
+ NTP_4_2_7P423
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.415 +2 -2
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.430 +7 -7
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.430 +3 -3
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.244 +0 -235
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.244 +3 -3
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd.html@1.86 +1 -1
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd.man.in@1.244 +0 -235
+ NTP_4_2_7P423
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.244 +3 -3
+ NTP_4_2_7P423
+
+ packageinfo.sh@1.427 +1 -1
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.6 +6 -6
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.6 +2 -2
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/calc_tickadj.html@1.5 +1 -1
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.5 +6 -6
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P423
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.7 +1 -1
+ NTP_4_2_7P423
+
+ scripts/invoke-plot_summary.texi@1.24 +1 -1
+ NTP_4_2_7P423
+
+ scripts/invoke-summary.texi@1.24 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.233 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.234 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.234 +2 -2
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/ntp-wait.html@1.250 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/ntp-wait.man.in@1.234 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.234 +2 -2
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.22 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.13 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.13 +2 -2
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/ntpsweep.html@1.23 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/ntpsweep.man.in@1.13 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.14 +2 -2
+ NTP_4_2_7P423
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.22 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.13 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.13 +2 -2
+ NTP_4_2_7P423
+
+ scripts/ntptrace/ntptrace.html@1.23 +1 -1
+ NTP_4_2_7P423
+
+ scripts/ntptrace/ntptrace.man.in@1.13 +6 -6
+ NTP_4_2_7P423
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.14 +2 -2
+ NTP_4_2_7P423
+
+ scripts/plot_summary.1plot_summaryman@1.24 +6 -6
+ NTP_4_2_7P423
+
+ scripts/plot_summary.1plot_summarymdoc@1.24 +2 -2
+ NTP_4_2_7P423
+
+ scripts/plot_summary.html@1.24 +1 -1
+ NTP_4_2_7P423
+
+ scripts/plot_summary.man.in@1.24 +6 -6
+ NTP_4_2_7P423
+
+ scripts/plot_summary.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P423
+
+ scripts/summary.1summaryman@1.24 +6 -6
+ NTP_4_2_7P423
+
+ scripts/summary.1summarymdoc@1.24 +2 -2
+ NTP_4_2_7P423
+
+ scripts/summary.html@1.24 +1 -1
+ NTP_4_2_7P423
+
+ scripts/summary.man.in@1.24 +6 -6
+ NTP_4_2_7P423
+
+ scripts/summary.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P423
+
+ sntp/invoke-sntp.texi@1.412 +2 -2
+ NTP_4_2_7P423
+
+ sntp/sntp-opts.c@1.427 +7 -7
+ NTP_4_2_7P423
+
+ sntp/sntp-opts.h@1.427 +3 -3
+ NTP_4_2_7P423
+
+ sntp/sntp.1sntpman@1.247 +7 -7
+ NTP_4_2_7P423
+
+ sntp/sntp.1sntpmdoc@1.247 +3 -3
+ NTP_4_2_7P423
+
+ sntp/sntp.html@1.427 +2 -2
+ NTP_4_2_7P423
+
+ sntp/sntp.man.in@1.247 +7 -7
+ NTP_4_2_7P423
+
+ sntp/sntp.mdoc.in@1.247 +3 -3
+ NTP_4_2_7P423
+
+ util/invoke-ntp-keygen.texi@1.416 +2 -2
+ NTP_4_2_7P423
+
+ util/ntp-keygen-opts.c@1.430 +7 -7
+ NTP_4_2_7P423
+
+ util/ntp-keygen-opts.h@1.430 +3 -3
+ NTP_4_2_7P423
+
+ util/ntp-keygen.1ntp-keygenman@1.244 +7 -7
+ NTP_4_2_7P423
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.244 +3 -3
+ NTP_4_2_7P423
+
+ util/ntp-keygen.html@1.92 +2 -2
+ NTP_4_2_7P423
+
+ util/ntp-keygen.man.in@1.244 +7 -7
+ NTP_4_2_7P423
+
+ util/ntp-keygen.mdoc.in@1.244 +3 -3
+ NTP_4_2_7P423
+
+ChangeSet@1.3093.1.3, 2014-02-22 05:25:52+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2565] Handle EINTR on getifaddrs()
+
+ ChangeLog@1.1426 +1 -0
+ [Bug 2565] Handle EINTR on getifaddrs()
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.11 +18 -11
+ [Bug 2565] Handle EINTR on getifaddrs()
+
+ChangeSet@1.3100, 2014-02-20 21:22:08+01:00, jnperlin@hydra.(none)
+ refclock_gpsdjson: operation reordering (grouping) during startup
+
+ ntpd/refclock_gpsdjson.c@1.6 +5 -3
+ operation reordering (grouping) during startup
+
+ChangeSet@1.3099, 2014-02-18 21:36:24+01:00, jnperlin@hydra.(none)
+ refclock_gpsdjson: fix clock status report logic (did not work after reconnect)
+
+ ntpd/refclock_gpsdjson.c@1.5 +43 -16
+ fix clock status report logic (did not work after reconnect)
+
+ChangeSet@1.3098, 2014-02-17 19:42:56+01:00, jnperlin@hydra.(none)
+ GPSD_JSON: do not build on Win32
+
+ ntpd/refclock_conf.c@1.35 +1 -1
+ GPSD_JSON: do not build on Win32
+
+ ntpd/refclock_gpsdjson.c@1.4 +40 -30
+ GPSD_JSON: do not build on Win32 (and some typo fixing)
+
+ChangeSet@1.3093.1.2, 2014-02-17 11:39:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P422
+ TAG: NTP_4_2_7P422
+
+ ChangeLog@1.1425 +1 -0
+ NTP_4_2_7P422
+
+ ntpd/invoke-ntp.conf.texi@1.100 +1 -1
+ NTP_4_2_7P422
+
+ ntpd/invoke-ntp.keys.texi@1.98 +1 -1
+ NTP_4_2_7P422
+
+ ntpd/invoke-ntpd.texi@1.414 +2 -2
+ NTP_4_2_7P422
+
+ ntpd/ntp.conf.5man@1.134 +7 -7
+ NTP_4_2_7P422
+
+ ntpd/ntp.conf.5mdoc@1.134 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntp.conf.html@1.95 +1 -1
+ NTP_4_2_7P422
+
+ ntpd/ntp.conf.man.in@1.134 +7 -7
+ NTP_4_2_7P422
+
+ ntpd/ntp.conf.mdoc.in@1.134 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntp.keys.5man@1.132 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntp.keys.5mdoc@1.132 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntp.keys.html@1.96 +1 -1
+ NTP_4_2_7P422
+
+ ntpd/ntp.keys.man.in@1.132 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntp.keys.mdoc.in@1.132 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntpd-opts.c@1.432 +7 -7
+ NTP_4_2_7P422
+
+ ntpd/ntpd-opts.h@1.432 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntpd.1ntpdman@1.243 +7 -7
+ NTP_4_2_7P422
+
+ ntpd/ntpd.1ntpdmdoc@1.243 +3 -3
+ NTP_4_2_7P422
+
+ ntpd/ntpd.html@1.90 +2 -2
+ NTP_4_2_7P422
+
+ ntpd/ntpd.man.in@1.243 +7 -7
+ NTP_4_2_7P422
+
+ ntpd/ntpd.mdoc.in@1.243 +3 -3
+ NTP_4_2_7P422
+
+ ntpdc/invoke-ntpdc.texi@1.412 +2 -2
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc-opts.c@1.427 +7 -7
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc-opts.h@1.427 +3 -3
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc.1ntpdcman@1.243 +6 -6
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.243 +2 -2
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc.html@1.256 +2 -2
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc.man.in@1.243 +6 -6
+ NTP_4_2_7P422
+
+ ntpdc/ntpdc.mdoc.in@1.243 +2 -2
+ NTP_4_2_7P422
+
+ ntpq/invoke-ntpq.texi@1.415 +2 -2
+ NTP_4_2_7P422
+
+ ntpq/ntpq-opts.c@1.429 +7 -7
+ NTP_4_2_7P422
+
+ ntpq/ntpq-opts.h@1.429 +3 -3
+ NTP_4_2_7P422
+
+ ntpq/ntpq.1ntpqman@1.243 +6 -6
+ NTP_4_2_7P422
+
+ ntpq/ntpq.1ntpqmdoc@1.243 +2 -2
+ NTP_4_2_7P422
+
+ ntpq/ntpq.html@1.87 +2 -2
+ NTP_4_2_7P422
+
+ ntpq/ntpq.man.in@1.243 +6 -6
+ NTP_4_2_7P422
+
+ ntpq/ntpq.mdoc.in@1.243 +2 -2
+ NTP_4_2_7P422
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.414 +2 -2
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.429 +7 -7
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.429 +3 -3
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.243 +7 -7
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.243 +3 -3
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd.html@1.85 +1 -1
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd.man.in@1.243 +7 -7
+ NTP_4_2_7P422
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.243 +3 -3
+ NTP_4_2_7P422
+
+ packageinfo.sh@1.426 +1 -1
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.5 +6 -6
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.5 +2 -2
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/calc_tickadj.html@1.4 +1 -1
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.4 +6 -6
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P422
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.6 +1 -1
+ NTP_4_2_7P422
+
+ scripts/invoke-plot_summary.texi@1.23 +1 -1
+ NTP_4_2_7P422
+
+ scripts/invoke-summary.texi@1.23 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.232 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.233 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.233 +2 -2
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/ntp-wait.html@1.249 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/ntp-wait.man.in@1.233 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.233 +2 -2
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.21 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.12 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.12 +2 -2
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/ntpsweep.html@1.22 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/ntpsweep.man.in@1.12 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P422
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.21 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.12 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.12 +2 -2
+ NTP_4_2_7P422
+
+ scripts/ntptrace/ntptrace.html@1.22 +1 -1
+ NTP_4_2_7P422
+
+ scripts/ntptrace/ntptrace.man.in@1.12 +6 -6
+ NTP_4_2_7P422
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P422
+
+ scripts/plot_summary.1plot_summaryman@1.23 +6 -6
+ NTP_4_2_7P422
+
+ scripts/plot_summary.1plot_summarymdoc@1.23 +2 -2
+ NTP_4_2_7P422
+
+ scripts/plot_summary.html@1.23 +1 -1
+ NTP_4_2_7P422
+
+ scripts/plot_summary.man.in@1.23 +6 -6
+ NTP_4_2_7P422
+
+ scripts/plot_summary.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P422
+
+ scripts/summary.1summaryman@1.23 +6 -6
+ NTP_4_2_7P422
+
+ scripts/summary.1summarymdoc@1.23 +2 -2
+ NTP_4_2_7P422
+
+ scripts/summary.html@1.23 +1 -1
+ NTP_4_2_7P422
+
+ scripts/summary.man.in@1.23 +6 -6
+ NTP_4_2_7P422
+
+ scripts/summary.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P422
+
+ sntp/invoke-sntp.texi@1.411 +2 -2
+ NTP_4_2_7P422
+
+ sntp/sntp-opts.c@1.426 +7 -7
+ NTP_4_2_7P422
+
+ sntp/sntp-opts.h@1.426 +3 -3
+ NTP_4_2_7P422
+
+ sntp/sntp.1sntpman@1.246 +14 -14
+ NTP_4_2_7P422
+
+ sntp/sntp.1sntpmdoc@1.246 +3 -3
+ NTP_4_2_7P422
+
+ sntp/sntp.html@1.426 +2 -2
+ NTP_4_2_7P422
+
+ sntp/sntp.man.in@1.246 +14 -14
+ NTP_4_2_7P422
+
+ sntp/sntp.mdoc.in@1.246 +3 -3
+ NTP_4_2_7P422
+
+ util/invoke-ntp-keygen.texi@1.415 +2 -2
+ NTP_4_2_7P422
+
+ util/ntp-keygen-opts.c@1.429 +7 -7
+ NTP_4_2_7P422
+
+ util/ntp-keygen-opts.h@1.429 +3 -3
+ NTP_4_2_7P422
+
+ util/ntp-keygen.1ntp-keygenman@1.243 +7 -7
+ NTP_4_2_7P422
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.243 +3 -3
+ NTP_4_2_7P422
+
+ util/ntp-keygen.html@1.91 +2 -2
+ NTP_4_2_7P422
+
+ util/ntp-keygen.man.in@1.243 +7 -7
+ NTP_4_2_7P422
+
+ util/ntp-keygen.mdoc.in@1.243 +3 -3
+ NTP_4_2_7P422
+
+ChangeSet@1.3093.1.1, 2014-02-17 07:51:58+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2536] ntpd sandboxing support (libseccomp2)
+
+ ChangeLog@1.1424 +1 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2)
+
+ configure.ac@1.571.1.1 +24 -0
+ [Bug 2536] ntpd sandboxing support (libseccomp2)
+
+ ntpd/ntpd.c@1.153 +106 -4
+ [Bug 2536] ntpd sandboxing support (libseccomp2)
+
+ChangeSet@1.3097, 2014-02-16 22:43:49+01:00, jnperlin@hydra.(none)
+ GPSD/JSON driver: added type aliases, some more cleanup
+
+ ntpd/refclock_gpsdjson.c@1.3 +137 -152
+ added type aliases, some more cleanup
+
+ChangeSet@1.3096, 2014-02-16 15:07:57+01:00, jnperlin@hydra.(none)
+ started documentation on driver 46 (GPSD_JSON)
+
+ html/drivers/driver46.html@1.1 +115 -0
+ started documentation
+
+ html/drivers/driver46.html@1.0 +0 -0
+
+ html/refclock.html@1.41 +1 -0
+ added link to driver 46 /GPSD_JSON)
+
+ ntpd/ntp_control.c@1.189 +1 -0
+ added GPSD_JSON
+
+ChangeSet@1.3095, 2014-02-16 14:10:37+01:00, jnperlin@hydra.(none)
+ logging, cleanup, refactoring: still a work in progress
+
+ ntpd/refclock_gpsdjson.c@1.2 +463 -308
+ logging, cleanup, refactoring: still a work in progress
+
+ChangeSet@1.3094, 2014-02-15 02:56:41+01:00, jnperlin@hydra.(none)
+ added the GPSD-JSON client driver
+
+ configure.ac@1.572 +18 -0
+ added the GPSD-JSON client driver
+
+ include/ntp.h@1.208 +3 -2
+ added the GPSD-JSON client driver
+
+ libjsmn/LICENSE@1.1 +20 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/LICENSE@1.0 +0 -0
+
+ libjsmn/Makefile@1.1 +27 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/Makefile@1.0 +0 -0
+
+ libjsmn/README.md@1.1 +161 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/README.md@1.0 +0 -0
+
+ libjsmn/jsmn.c@1.1 +268 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/jsmn.c@1.0 +0 -0
+
+ libjsmn/jsmn.h@1.1 +67 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/jsmn.h@1.0 +0 -0
+
+ libjsmn/jsmn_test.c@1.1 +409 -0
+ added the GPSD-JSON client driver
+
+ libjsmn/jsmn_test.c@1.0 +0 -0
+
+ libntp/clocktypes.c@1.21 +2 -0
+ added the GPSD-JSON client driver
+
+ ntpd/Makefile.am@1.130 +1 -0
+ added the GPSD-JSON client driver
+
+ ntpd/refclock_conf.c@1.34 +8 -1
+ added the GPSD-JSON client driver
+
+ ntpd/refclock_gpsdjson.c@1.1 +921 -0
+ added the GPSD-JSON client driver
+
+ ntpd/refclock_gpsdjson.c@1.0 +0 -0
+
+ChangeSet@1.3093, 2014-02-10 20:34:39+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P421
+ TAG: NTP_4_2_7P421
+
+ ChangeLog@1.1423 +1 -0
+ NTP_4_2_7P421
+
+ ntpd/invoke-ntp.conf.texi@1.99 +1 -1
+ NTP_4_2_7P421
+
+ ntpd/invoke-ntp.keys.texi@1.97 +1 -1
+ NTP_4_2_7P421
+
+ ntpd/invoke-ntpd.texi@1.413 +2 -2
+ NTP_4_2_7P421
+
+ ntpd/ntp.conf.5man@1.133 +7 -7
+ NTP_4_2_7P421
+
+ ntpd/ntp.conf.5mdoc@1.133 +4 -4
+ NTP_4_2_7P421
+
+ ntpd/ntp.conf.html@1.94 +1 -1
+ NTP_4_2_7P421
+
+ ntpd/ntp.conf.man.in@1.133 +7 -7
+ NTP_4_2_7P421
+
+ ntpd/ntp.conf.mdoc.in@1.133 +4 -4
+ NTP_4_2_7P421
+
+ ntpd/ntp.keys.5man@1.131 +3 -3
+ NTP_4_2_7P421
+
+ ntpd/ntp.keys.5mdoc@1.131 +3 -3
+ NTP_4_2_7P421
+
+ ntpd/ntp.keys.html@1.95 +1 -1
+ NTP_4_2_7P421
+
+ ntpd/ntp.keys.man.in@1.131 +3 -3
+ NTP_4_2_7P421
+
+ ntpd/ntp.keys.mdoc.in@1.131 +3 -3
+ NTP_4_2_7P421
+
+ ntpd/ntpd-opts.c@1.431 +7 -7
+ NTP_4_2_7P421
+
+ ntpd/ntpd-opts.h@1.431 +3 -3
+ NTP_4_2_7P421
+
+ ntpd/ntpd.1ntpdman@1.242 +7 -7
+ NTP_4_2_7P421
+
+ ntpd/ntpd.1ntpdmdoc@1.242 +4 -4
+ NTP_4_2_7P421
+
+ ntpd/ntpd.html@1.89 +2 -2
+ NTP_4_2_7P421
+
+ ntpd/ntpd.man.in@1.242 +7 -7
+ NTP_4_2_7P421
+
+ ntpd/ntpd.mdoc.in@1.242 +4 -4
+ NTP_4_2_7P421
+
+ ntpdc/invoke-ntpdc.texi@1.411 +2 -2
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc-opts.c@1.426 +7 -7
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc-opts.h@1.426 +3 -3
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc.1ntpdcman@1.242 +6 -6
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.242 +3 -3
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc.html@1.255 +2 -2
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc.man.in@1.242 +6 -6
+ NTP_4_2_7P421
+
+ ntpdc/ntpdc.mdoc.in@1.242 +3 -3
+ NTP_4_2_7P421
+
+ ntpq/invoke-ntpq.texi@1.414 +2 -2
+ NTP_4_2_7P421
+
+ ntpq/ntpq-opts.c@1.428 +7 -7
+ NTP_4_2_7P421
+
+ ntpq/ntpq-opts.h@1.428 +3 -3
+ NTP_4_2_7P421
+
+ ntpq/ntpq.1ntpqman@1.242 +6 -6
+ NTP_4_2_7P421
+
+ ntpq/ntpq.1ntpqmdoc@1.242 +3 -3
+ NTP_4_2_7P421
+
+ ntpq/ntpq.html@1.86 +2 -2
+ NTP_4_2_7P421
+
+ ntpq/ntpq.man.in@1.242 +6 -6
+ NTP_4_2_7P421
+
+ ntpq/ntpq.mdoc.in@1.242 +3 -3
+ NTP_4_2_7P421
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.413 +2 -2
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.428 +7 -7
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.428 +3 -3
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.242 +7 -7
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.242 +4 -4
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd.html@1.84 +1 -1
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd.man.in@1.242 +7 -7
+ NTP_4_2_7P421
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.242 +4 -4
+ NTP_4_2_7P421
+
+ packageinfo.sh@1.425 +1 -1
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.4 +6 -6
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.4 +1 -1
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/calc_tickadj.html@1.3 +23 -35
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.3 +6 -6
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.4 +1 -1
+ NTP_4_2_7P421
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.5 +2 -2
+ NTP_4_2_7P421
+
+ scripts/invoke-plot_summary.texi@1.22 +1 -1
+ NTP_4_2_7P421
+
+ scripts/invoke-summary.texi@1.22 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.231 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.232 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.232 +3 -3
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/ntp-wait.html@1.248 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/ntp-wait.man.in@1.232 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.232 +3 -3
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.20 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.11 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.11 +3 -3
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/ntpsweep.html@1.21 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/ntpsweep.man.in@1.11 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.12 +3 -3
+ NTP_4_2_7P421
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.20 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.11 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.11 +3 -3
+ NTP_4_2_7P421
+
+ scripts/ntptrace/ntptrace.html@1.21 +1 -1
+ NTP_4_2_7P421
+
+ scripts/ntptrace/ntptrace.man.in@1.11 +6 -6
+ NTP_4_2_7P421
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.12 +3 -3
+ NTP_4_2_7P421
+
+ scripts/plot_summary.1plot_summaryman@1.22 +6 -6
+ NTP_4_2_7P421
+
+ scripts/plot_summary.1plot_summarymdoc@1.22 +3 -3
+ NTP_4_2_7P421
+
+ scripts/plot_summary.html@1.22 +1 -1
+ NTP_4_2_7P421
+
+ scripts/plot_summary.man.in@1.22 +6 -6
+ NTP_4_2_7P421
+
+ scripts/plot_summary.mdoc.in@1.22 +3 -3
+ NTP_4_2_7P421
+
+ scripts/summary.1summaryman@1.22 +6 -6
+ NTP_4_2_7P421
+
+ scripts/summary.1summarymdoc@1.22 +3 -3
+ NTP_4_2_7P421
+
+ scripts/summary.html@1.22 +1 -1
+ NTP_4_2_7P421
+
+ scripts/summary.man.in@1.22 +6 -6
+ NTP_4_2_7P421
+
+ scripts/summary.mdoc.in@1.22 +3 -3
+ NTP_4_2_7P421
+
+ sntp/invoke-sntp.texi@1.410 +2 -2
+ NTP_4_2_7P421
+
+ sntp/sntp-opts.c@1.425 +7 -7
+ NTP_4_2_7P421
+
+ sntp/sntp-opts.h@1.425 +3 -3
+ NTP_4_2_7P421
+
+ sntp/sntp.1sntpman@1.245 +14 -14
+ NTP_4_2_7P421
+
+ sntp/sntp.1sntpmdoc@1.245 +4 -4
+ NTP_4_2_7P421
+
+ sntp/sntp.html@1.425 +2 -2
+ NTP_4_2_7P421
+
+ sntp/sntp.man.in@1.245 +14 -14
+ NTP_4_2_7P421
+
+ sntp/sntp.mdoc.in@1.245 +4 -4
+ NTP_4_2_7P421
+
+ util/invoke-ntp-keygen.texi@1.414 +2 -2
+ NTP_4_2_7P421
+
+ util/ntp-keygen-opts.c@1.428 +7 -7
+ NTP_4_2_7P421
+
+ util/ntp-keygen-opts.h@1.428 +3 -3
+ NTP_4_2_7P421
+
+ util/ntp-keygen.1ntp-keygenman@1.242 +7 -7
+ NTP_4_2_7P421
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.242 +4 -4
+ NTP_4_2_7P421
+
+ util/ntp-keygen.html@1.90 +2 -2
+ NTP_4_2_7P421
+
+ util/ntp-keygen.man.in@1.242 +7 -7
+ NTP_4_2_7P421
+
+ util/ntp-keygen.mdoc.in@1.242 +4 -4
+ NTP_4_2_7P421
+
+ChangeSet@1.3092, 2014-02-10 15:34:22-05:00, stenn@deacon.udel.edu
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ .point-changed-filelist@1.24 +6 -0
+
+ChangeSet@1.3091, 2014-02-10 02:35:55-05:00, stenn@deacon.udel.edu
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ ChangeLog@1.1422 +1 -0
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ scripts/calc_tickadj/Makefile.am@1.8 +11 -0
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.3 +32 -3
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.3 +22 -3
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.2 +37 -3
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.3 +22 -3
+ calc_tickadj/Makefile.am man/mdoc page build cleanup
+
+ChangeSet@1.3090, 2014-02-10 01:17:38-05:00, stenn@deacon.udel.edu
+ [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10
+
+ ChangeLog@1.1421 +1 -0
+ [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.2 +1 -1
+ [Bug 2555] Autogen mdoc man pages all stamped with SunOS 5.10
+
+ChangeSet@1.3089, 2014-02-10 05:55:42+00:00, stenn@psp-fb1.ntp.org
+ [Bug 898] More documentation fixes
+
+ ChangeLog@1.1420 +1 -0
+ [Bug 898] More documentation fixes
+
+ html/ntpd.html@1.60 +4 -3
+ [Bug 898] More documentation fixes
+
+ChangeSet@1.3088, 2014-02-09 11:19:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P420
+ TAG: NTP_4_2_7P420
+
+ ChangeLog@1.1419 +1 -0
+ NTP_4_2_7P420
+
+ ntpd/invoke-ntp.conf.texi@1.98 +1 -1
+ NTP_4_2_7P420
+
+ ntpd/invoke-ntp.keys.texi@1.96 +1 -1
+ NTP_4_2_7P420
+
+ ntpd/invoke-ntpd.texi@1.412 +2 -2
+ NTP_4_2_7P420
+
+ ntpd/ntp.conf.5man@1.132 +7 -7
+ NTP_4_2_7P420
+
+ ntpd/ntp.conf.5mdoc@1.132 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntp.conf.html@1.93 +1 -1
+ NTP_4_2_7P420
+
+ ntpd/ntp.conf.man.in@1.132 +7 -7
+ NTP_4_2_7P420
+
+ ntpd/ntp.conf.mdoc.in@1.132 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntp.keys.5man@1.130 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntp.keys.5mdoc@1.130 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntp.keys.html@1.94 +1 -1
+ NTP_4_2_7P420
+
+ ntpd/ntp.keys.man.in@1.130 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntp.keys.mdoc.in@1.130 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntpd-opts.c@1.430 +7 -7
+ NTP_4_2_7P420
+
+ ntpd/ntpd-opts.h@1.430 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntpd.1ntpdman@1.241 +7 -7
+ NTP_4_2_7P420
+
+ ntpd/ntpd.1ntpdmdoc@1.241 +3 -3
+ NTP_4_2_7P420
+
+ ntpd/ntpd.html@1.88 +2 -2
+ NTP_4_2_7P420
+
+ ntpd/ntpd.man.in@1.241 +7 -7
+ NTP_4_2_7P420
+
+ ntpd/ntpd.mdoc.in@1.241 +3 -3
+ NTP_4_2_7P420
+
+ ntpdc/invoke-ntpdc.texi@1.410 +2 -2
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc-opts.c@1.425 +7 -7
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc-opts.h@1.425 +3 -3
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc.1ntpdcman@1.241 +6 -6
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.241 +2 -2
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc.html@1.254 +2 -2
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc.man.in@1.241 +6 -6
+ NTP_4_2_7P420
+
+ ntpdc/ntpdc.mdoc.in@1.241 +2 -2
+ NTP_4_2_7P420
+
+ ntpq/invoke-ntpq.texi@1.413 +2 -2
+ NTP_4_2_7P420
+
+ ntpq/ntpq-opts.c@1.427 +7 -7
+ NTP_4_2_7P420
+
+ ntpq/ntpq-opts.h@1.427 +3 -3
+ NTP_4_2_7P420
+
+ ntpq/ntpq.1ntpqman@1.241 +6 -6
+ NTP_4_2_7P420
+
+ ntpq/ntpq.1ntpqmdoc@1.241 +2 -2
+ NTP_4_2_7P420
+
+ ntpq/ntpq.html@1.85 +2 -2
+ NTP_4_2_7P420
+
+ ntpq/ntpq.man.in@1.241 +6 -6
+ NTP_4_2_7P420
+
+ ntpq/ntpq.mdoc.in@1.241 +2 -2
+ NTP_4_2_7P420
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.412 +2 -2
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.427 +7 -7
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.427 +3 -3
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.241 +7 -7
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.241 +3 -3
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd.html@1.83 +1 -1
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd.man.in@1.241 +7 -7
+ NTP_4_2_7P420
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.241 +3 -3
+ NTP_4_2_7P420
+
+ packageinfo.sh@1.424 +1 -1
+ NTP_4_2_7P420
+
+ scripts/invoke-plot_summary.texi@1.21 +1 -1
+ NTP_4_2_7P420
+
+ scripts/invoke-summary.texi@1.21 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.230 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.231 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.231 +2 -2
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/ntp-wait.html@1.247 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/ntp-wait.man.in@1.231 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.231 +2 -2
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.19 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.10 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.10 +2 -2
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/ntpsweep.html@1.20 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/ntpsweep.man.in@1.10 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P420
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.19 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.10 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.10 +2 -2
+ NTP_4_2_7P420
+
+ scripts/ntptrace/ntptrace.html@1.20 +1 -1
+ NTP_4_2_7P420
+
+ scripts/ntptrace/ntptrace.man.in@1.10 +6 -6
+ NTP_4_2_7P420
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P420
+
+ scripts/plot_summary.1plot_summaryman@1.21 +6 -6
+ NTP_4_2_7P420
+
+ scripts/plot_summary.1plot_summarymdoc@1.21 +2 -2
+ NTP_4_2_7P420
+
+ scripts/plot_summary.html@1.21 +1 -1
+ NTP_4_2_7P420
+
+ scripts/plot_summary.man.in@1.21 +6 -6
+ NTP_4_2_7P420
+
+ scripts/plot_summary.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P420
+
+ scripts/summary.1summaryman@1.21 +6 -6
+ NTP_4_2_7P420
+
+ scripts/summary.1summarymdoc@1.21 +2 -2
+ NTP_4_2_7P420
+
+ scripts/summary.html@1.21 +1 -1
+ NTP_4_2_7P420
+
+ scripts/summary.man.in@1.21 +6 -6
+ NTP_4_2_7P420
+
+ scripts/summary.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P420
+
+ sntp/invoke-sntp.texi@1.409 +2 -2
+ NTP_4_2_7P420
+
+ sntp/sntp-opts.c@1.424 +7 -7
+ NTP_4_2_7P420
+
+ sntp/sntp-opts.h@1.424 +3 -3
+ NTP_4_2_7P420
+
+ sntp/sntp.1sntpman@1.244 +7 -7
+ NTP_4_2_7P420
+
+ sntp/sntp.1sntpmdoc@1.244 +3 -3
+ NTP_4_2_7P420
+
+ sntp/sntp.html@1.424 +2 -2
+ NTP_4_2_7P420
+
+ sntp/sntp.man.in@1.244 +7 -7
+ NTP_4_2_7P420
+
+ sntp/sntp.mdoc.in@1.244 +3 -3
+ NTP_4_2_7P420
+
+ util/invoke-ntp-keygen.texi@1.413 +2 -2
+ NTP_4_2_7P420
+
+ util/ntp-keygen-opts.c@1.427 +7 -7
+ NTP_4_2_7P420
+
+ util/ntp-keygen-opts.h@1.427 +3 -3
+ NTP_4_2_7P420
+
+ util/ntp-keygen.1ntp-keygenman@1.241 +7 -7
+ NTP_4_2_7P420
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.241 +3 -3
+ NTP_4_2_7P420
+
+ util/ntp-keygen.html@1.89 +2 -2
+ NTP_4_2_7P420
+
+ util/ntp-keygen.man.in@1.241 +7 -7
+ NTP_4_2_7P420
+
+ util/ntp-keygen.mdoc.in@1.241 +3 -3
+ NTP_4_2_7P420
+
+ChangeSet@1.3087, 2014-02-09 09:00:04+00:00, stenn@psp-fb1.ntp.org
+ [Sec 2542] Strengthen the mrulist nonce
+
+ ChangeLog@1.1418 +1 -0
+ [Sec 2542] Strengthen the mrulist nonce
+
+ ntpd/ntp_control.c@1.188 +8 -3
+ [Sec 2542] Strengthen the mrulist nonce
+
+ChangeSet@1.3086, 2014-02-09 03:37:08-05:00, stenn@deacon.udel.edu
+ [Bug 492] Clearly document ntpdate's pending deprecation
+
+ ChangeLog@1.1417 +1 -0
+ [Bug 492] Clearly document ntpdate's pending deprecation
+
+ html/ntpdate.html@1.27 +11 -1
+ [Bug 492] Clearly document ntpdate's pending deprecation
+
+ChangeSet@1.3085, 2014-02-09 08:09:56+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1186] ntpd fails with link local IPv6 addresses
+
+ ChangeLog@1.1416 +3 -2
+ [Bug 1186] ntpd fails with link local IPv6 addresses
+
+ ntpd/ntp_io.c@1.389 +11 -6
+ [Bug 1186] ntpd fails with link local IPv6 addresses
+
+ChangeSet@1.3084, 2014-02-08 11:29:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P419
+ TAG: NTP_4_2_7P419
+
+ ChangeLog@1.1415 +1 -0
+ NTP_4_2_7P419
+
+ ntpd/invoke-ntp.conf.texi@1.97 +1 -1
+ NTP_4_2_7P419
+
+ ntpd/invoke-ntp.keys.texi@1.95 +1 -1
+ NTP_4_2_7P419
+
+ ntpd/invoke-ntpd.texi@1.411 +2 -2
+ NTP_4_2_7P419
+
+ ntpd/ntp.conf.5man@1.131 +7 -7
+ NTP_4_2_7P419
+
+ ntpd/ntp.conf.5mdoc@1.131 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntp.conf.html@1.92 +1 -1
+ NTP_4_2_7P419
+
+ ntpd/ntp.conf.man.in@1.131 +7 -7
+ NTP_4_2_7P419
+
+ ntpd/ntp.conf.mdoc.in@1.131 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntp.keys.5man@1.129 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntp.keys.5mdoc@1.129 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntp.keys.html@1.93 +1 -1
+ NTP_4_2_7P419
+
+ ntpd/ntp.keys.man.in@1.129 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntp.keys.mdoc.in@1.129 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntpd-opts.c@1.429 +7 -7
+ NTP_4_2_7P419
+
+ ntpd/ntpd-opts.h@1.429 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntpd.1ntpdman@1.240 +14 -14
+ NTP_4_2_7P419
+
+ ntpd/ntpd.1ntpdmdoc@1.240 +3 -3
+ NTP_4_2_7P419
+
+ ntpd/ntpd.html@1.87 +2 -2
+ NTP_4_2_7P419
+
+ ntpd/ntpd.man.in@1.240 +14 -14
+ NTP_4_2_7P419
+
+ ntpd/ntpd.mdoc.in@1.240 +3 -3
+ NTP_4_2_7P419
+
+ ntpdc/invoke-ntpdc.texi@1.409 +2 -2
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc-opts.c@1.424 +7 -7
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc-opts.h@1.424 +3 -3
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc.1ntpdcman@1.240 +6 -6
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.240 +2 -2
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc.html@1.253 +2 -2
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc.man.in@1.240 +6 -6
+ NTP_4_2_7P419
+
+ ntpdc/ntpdc.mdoc.in@1.240 +2 -2
+ NTP_4_2_7P419
+
+ ntpq/invoke-ntpq.texi@1.412 +2 -2
+ NTP_4_2_7P419
+
+ ntpq/ntpq-opts.c@1.426 +7 -7
+ NTP_4_2_7P419
+
+ ntpq/ntpq-opts.h@1.426 +3 -3
+ NTP_4_2_7P419
+
+ ntpq/ntpq.1ntpqman@1.240 +6 -6
+ NTP_4_2_7P419
+
+ ntpq/ntpq.1ntpqmdoc@1.240 +2 -2
+ NTP_4_2_7P419
+
+ ntpq/ntpq.html@1.84 +2 -2
+ NTP_4_2_7P419
+
+ ntpq/ntpq.man.in@1.240 +6 -6
+ NTP_4_2_7P419
+
+ ntpq/ntpq.mdoc.in@1.240 +2 -2
+ NTP_4_2_7P419
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.411 +2 -2
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.426 +7 -7
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.426 +3 -3
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.240 +7 -7
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.240 +3 -3
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd.html@1.82 +1 -1
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd.man.in@1.240 +7 -7
+ NTP_4_2_7P419
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.240 +3 -3
+ NTP_4_2_7P419
+
+ packageinfo.sh@1.423 +1 -1
+ NTP_4_2_7P419
+
+ scripts/invoke-plot_summary.texi@1.20 +1 -1
+ NTP_4_2_7P419
+
+ scripts/invoke-summary.texi@1.20 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.229 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.230 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.230 +2 -2
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/ntp-wait.html@1.246 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/ntp-wait.man.in@1.230 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.230 +2 -2
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.18 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.9 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.9 +2 -2
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/ntpsweep.html@1.19 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/ntpsweep.man.in@1.9 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P419
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.18 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.9 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.9 +2 -2
+ NTP_4_2_7P419
+
+ scripts/ntptrace/ntptrace.html@1.19 +1 -1
+ NTP_4_2_7P419
+
+ scripts/ntptrace/ntptrace.man.in@1.9 +6 -6
+ NTP_4_2_7P419
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P419
+
+ scripts/plot_summary.1plot_summaryman@1.20 +6 -6
+ NTP_4_2_7P419
+
+ scripts/plot_summary.1plot_summarymdoc@1.20 +2 -2
+ NTP_4_2_7P419
+
+ scripts/plot_summary.html@1.20 +1 -1
+ NTP_4_2_7P419
+
+ scripts/plot_summary.man.in@1.20 +6 -6
+ NTP_4_2_7P419
+
+ scripts/plot_summary.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P419
+
+ scripts/summary.1summaryman@1.20 +6 -6
+ NTP_4_2_7P419
+
+ scripts/summary.1summarymdoc@1.20 +2 -2
+ NTP_4_2_7P419
+
+ scripts/summary.html@1.20 +1 -1
+ NTP_4_2_7P419
+
+ scripts/summary.man.in@1.20 +6 -6
+ NTP_4_2_7P419
+
+ scripts/summary.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P419
+
+ sntp/invoke-sntp.texi@1.408 +2 -2
+ NTP_4_2_7P419
+
+ sntp/sntp-opts.c@1.423 +7 -7
+ NTP_4_2_7P419
+
+ sntp/sntp-opts.h@1.423 +3 -3
+ NTP_4_2_7P419
+
+ sntp/sntp.1sntpman@1.243 +7 -7
+ NTP_4_2_7P419
+
+ sntp/sntp.1sntpmdoc@1.243 +3 -3
+ NTP_4_2_7P419
+
+ sntp/sntp.html@1.423 +2 -2
+ NTP_4_2_7P419
+
+ sntp/sntp.man.in@1.243 +7 -7
+ NTP_4_2_7P419
+
+ sntp/sntp.mdoc.in@1.243 +3 -3
+ NTP_4_2_7P419
+
+ util/invoke-ntp-keygen.texi@1.412 +2 -2
+ NTP_4_2_7P419
+
+ util/ntp-keygen-opts.c@1.426 +7 -7
+ NTP_4_2_7P419
+
+ util/ntp-keygen-opts.h@1.426 +3 -3
+ NTP_4_2_7P419
+
+ util/ntp-keygen.1ntp-keygenman@1.240 +7 -7
+ NTP_4_2_7P419
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.240 +3 -3
+ NTP_4_2_7P419
+
+ util/ntp-keygen.html@1.88 +2 -2
+ NTP_4_2_7P419
+
+ util/ntp-keygen.man.in@1.240 +7 -7
+ NTP_4_2_7P419
+
+ util/ntp-keygen.mdoc.in@1.240 +3 -3
+ NTP_4_2_7P419
+
+ChangeSet@1.3052.1.1, 2014-02-08 08:52:51+01:00, jnperlin@hydra.(none)
+ [Bug 2466] Fold NMEA date into 1024 week cycles - GPS has no absolute date.
+
+ ChangeLog@1.1387.1.1 +1 -0
+ [Bug 2466] Fold NMEA date into 1024 week cycles - GPS has no absolute date.
+
+ libntp/ntp_calendar.c@1.12 +17 -1
+ [Bug 2466] Fold NMEA date into 1024 week cycles - GPS has no absolute date.
+ Evaluation of build date can be blocked for DEBUG builds by environment.
+
+ ntpd/refclock_nmea.c@1.72.1.1 +156 -4
+ [Bug 2466] Fold NMEA date into 1024 week cycles - GPS has no absolute date.
+ Refactored date evaluation into separate function.
+
+ChangeSet@1.3082, 2014-02-05 12:02:45+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P418
+ TAG: NTP_4_2_7P418
+
+ ChangeLog@1.1413 +1 -0
+ NTP_4_2_7P418
+
+ ntpd/invoke-ntp.conf.texi@1.96 +1 -1
+ NTP_4_2_7P418
+
+ ntpd/invoke-ntp.keys.texi@1.94 +1 -1
+ NTP_4_2_7P418
+
+ ntpd/invoke-ntpd.texi@1.410 +2 -2
+ NTP_4_2_7P418
+
+ ntpd/ntp.conf.5man@1.130 +7 -7
+ NTP_4_2_7P418
+
+ ntpd/ntp.conf.5mdoc@1.130 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntp.conf.html@1.91 +1 -1
+ NTP_4_2_7P418
+
+ ntpd/ntp.conf.man.in@1.130 +7 -7
+ NTP_4_2_7P418
+
+ ntpd/ntp.conf.mdoc.in@1.130 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntp.keys.5man@1.128 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntp.keys.5mdoc@1.128 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntp.keys.html@1.92 +1 -1
+ NTP_4_2_7P418
+
+ ntpd/ntp.keys.man.in@1.128 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntp.keys.mdoc.in@1.128 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntpd-opts.c@1.428 +7 -7
+ NTP_4_2_7P418
+
+ ntpd/ntpd-opts.h@1.428 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntpd.1ntpdman@1.239 +14 -14
+ NTP_4_2_7P418
+
+ ntpd/ntpd.1ntpdmdoc@1.239 +3 -3
+ NTP_4_2_7P418
+
+ ntpd/ntpd.html@1.86 +2 -2
+ NTP_4_2_7P418
+
+ ntpd/ntpd.man.in@1.239 +14 -14
+ NTP_4_2_7P418
+
+ ntpd/ntpd.mdoc.in@1.239 +3 -3
+ NTP_4_2_7P418
+
+ ntpdc/invoke-ntpdc.texi@1.408 +2 -2
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc-opts.c@1.423 +7 -7
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc-opts.h@1.423 +3 -3
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc.1ntpdcman@1.239 +6 -6
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.239 +2 -2
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc.html@1.252 +2 -2
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc.man.in@1.239 +6 -6
+ NTP_4_2_7P418
+
+ ntpdc/ntpdc.mdoc.in@1.239 +2 -2
+ NTP_4_2_7P418
+
+ ntpq/invoke-ntpq.texi@1.411 +2 -2
+ NTP_4_2_7P418
+
+ ntpq/ntpq-opts.c@1.425 +7 -7
+ NTP_4_2_7P418
+
+ ntpq/ntpq-opts.h@1.425 +3 -3
+ NTP_4_2_7P418
+
+ ntpq/ntpq.1ntpqman@1.239 +6 -6
+ NTP_4_2_7P418
+
+ ntpq/ntpq.1ntpqmdoc@1.239 +2 -2
+ NTP_4_2_7P418
+
+ ntpq/ntpq.html@1.83 +2 -2
+ NTP_4_2_7P418
+
+ ntpq/ntpq.man.in@1.239 +6 -6
+ NTP_4_2_7P418
+
+ ntpq/ntpq.mdoc.in@1.239 +2 -2
+ NTP_4_2_7P418
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.410 +2 -2
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.425 +7 -7
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.425 +3 -3
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.239 +7 -7
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.239 +3 -3
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd.html@1.81 +1 -1
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd.man.in@1.239 +7 -7
+ NTP_4_2_7P418
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.239 +3 -3
+ NTP_4_2_7P418
+
+ packageinfo.sh@1.422 +1 -1
+ NTP_4_2_7P418
+
+ scripts/invoke-plot_summary.texi@1.19 +1 -1
+ NTP_4_2_7P418
+
+ scripts/invoke-summary.texi@1.19 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.228 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.229 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.229 +2 -2
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/ntp-wait.html@1.245 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/ntp-wait.man.in@1.229 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.229 +2 -2
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.17 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.8 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.8 +2 -2
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/ntpsweep.html@1.18 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/ntpsweep.man.in@1.8 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P418
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.17 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.8 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.8 +2 -2
+ NTP_4_2_7P418
+
+ scripts/ntptrace/ntptrace.html@1.18 +1 -1
+ NTP_4_2_7P418
+
+ scripts/ntptrace/ntptrace.man.in@1.8 +6 -6
+ NTP_4_2_7P418
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P418
+
+ scripts/plot_summary.1plot_summaryman@1.19 +6 -6
+ NTP_4_2_7P418
+
+ scripts/plot_summary.1plot_summarymdoc@1.19 +2 -2
+ NTP_4_2_7P418
+
+ scripts/plot_summary.html@1.19 +1 -1
+ NTP_4_2_7P418
+
+ scripts/plot_summary.man.in@1.19 +6 -6
+ NTP_4_2_7P418
+
+ scripts/plot_summary.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P418
+
+ scripts/summary.1summaryman@1.19 +6 -6
+ NTP_4_2_7P418
+
+ scripts/summary.1summarymdoc@1.19 +2 -2
+ NTP_4_2_7P418
+
+ scripts/summary.html@1.19 +1 -1
+ NTP_4_2_7P418
+
+ scripts/summary.man.in@1.19 +6 -6
+ NTP_4_2_7P418
+
+ scripts/summary.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P418
+
+ sntp/invoke-sntp.texi@1.407 +2 -2
+ NTP_4_2_7P418
+
+ sntp/sntp-opts.c@1.422 +7 -7
+ NTP_4_2_7P418
+
+ sntp/sntp-opts.h@1.422 +3 -3
+ NTP_4_2_7P418
+
+ sntp/sntp.1sntpman@1.242 +7 -7
+ NTP_4_2_7P418
+
+ sntp/sntp.1sntpmdoc@1.242 +3 -3
+ NTP_4_2_7P418
+
+ sntp/sntp.html@1.422 +2 -2
+ NTP_4_2_7P418
+
+ sntp/sntp.man.in@1.242 +7 -7
+ NTP_4_2_7P418
+
+ sntp/sntp.mdoc.in@1.242 +3 -3
+ NTP_4_2_7P418
+
+ util/invoke-ntp-keygen.texi@1.411 +2 -2
+ NTP_4_2_7P418
+
+ util/ntp-keygen-opts.c@1.425 +7 -7
+ NTP_4_2_7P418
+
+ util/ntp-keygen-opts.h@1.425 +3 -3
+ NTP_4_2_7P418
+
+ util/ntp-keygen.1ntp-keygenman@1.239 +7 -7
+ NTP_4_2_7P418
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.239 +3 -3
+ NTP_4_2_7P418
+
+ util/ntp-keygen.html@1.87 +2 -2
+ NTP_4_2_7P418
+
+ util/ntp-keygen.man.in@1.239 +7 -7
+ NTP_4_2_7P418
+
+ util/ntp-keygen.mdoc.in@1.239 +3 -3
+ NTP_4_2_7P418
+
+ChangeSet@1.3081, 2014-02-05 07:02:58+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2551] --disable-local-libevent breaks the build
+
+ ChangeLog@1.1412 +1 -0
+ [Bug 2551] --disable-local-libevent breaks the build
+
+ sntp/m4/ntp_libevent.m4@1.10 +1 -3
+ [Bug 2551] --disable-local-libevent breaks the build
+
+ChangeSet@1.3080, 2014-02-02 11:35:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P417
+ TAG: NTP_4_2_7P417
+
+ ChangeLog@1.1411 +1 -0
+ NTP_4_2_7P417
+
+ ntpd/invoke-ntp.conf.texi@1.95 +1 -1
+ NTP_4_2_7P417
+
+ ntpd/invoke-ntp.keys.texi@1.93 +1 -1
+ NTP_4_2_7P417
+
+ ntpd/invoke-ntpd.texi@1.409 +2 -2
+ NTP_4_2_7P417
+
+ ntpd/ntp.conf.5man@1.129 +7 -7
+ NTP_4_2_7P417
+
+ ntpd/ntp.conf.5mdoc@1.129 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntp.conf.html@1.90 +1 -1
+ NTP_4_2_7P417
+
+ ntpd/ntp.conf.man.in@1.129 +7 -7
+ NTP_4_2_7P417
+
+ ntpd/ntp.conf.mdoc.in@1.129 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntp.keys.5man@1.127 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntp.keys.5mdoc@1.127 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntp.keys.html@1.91 +1 -1
+ NTP_4_2_7P417
+
+ ntpd/ntp.keys.man.in@1.127 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntp.keys.mdoc.in@1.127 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntpd-opts.c@1.427 +7 -7
+ NTP_4_2_7P417
+
+ ntpd/ntpd-opts.h@1.427 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntpd.1ntpdman@1.238 +7 -7
+ NTP_4_2_7P417
+
+ ntpd/ntpd.1ntpdmdoc@1.238 +3 -3
+ NTP_4_2_7P417
+
+ ntpd/ntpd.html@1.85 +2 -2
+ NTP_4_2_7P417
+
+ ntpd/ntpd.man.in@1.238 +7 -7
+ NTP_4_2_7P417
+
+ ntpd/ntpd.mdoc.in@1.238 +3 -3
+ NTP_4_2_7P417
+
+ ntpdc/invoke-ntpdc.texi@1.407 +2 -2
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc-opts.c@1.422 +7 -7
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc-opts.h@1.422 +3 -3
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc.1ntpdcman@1.238 +6 -6
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.238 +2 -2
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc.html@1.251 +2 -2
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc.man.in@1.238 +6 -6
+ NTP_4_2_7P417
+
+ ntpdc/ntpdc.mdoc.in@1.238 +2 -2
+ NTP_4_2_7P417
+
+ ntpq/invoke-ntpq.texi@1.410 +2 -2
+ NTP_4_2_7P417
+
+ ntpq/ntpq-opts.c@1.424 +7 -7
+ NTP_4_2_7P417
+
+ ntpq/ntpq-opts.h@1.424 +3 -3
+ NTP_4_2_7P417
+
+ ntpq/ntpq.1ntpqman@1.238 +6 -6
+ NTP_4_2_7P417
+
+ ntpq/ntpq.1ntpqmdoc@1.238 +2 -2
+ NTP_4_2_7P417
+
+ ntpq/ntpq.html@1.82 +2 -2
+ NTP_4_2_7P417
+
+ ntpq/ntpq.man.in@1.238 +6 -6
+ NTP_4_2_7P417
+
+ ntpq/ntpq.mdoc.in@1.238 +2 -2
+ NTP_4_2_7P417
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.409 +2 -2
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.424 +7 -7
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.424 +3 -3
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.238 +7 -7
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.238 +3 -3
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd.html@1.80 +1 -1
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd.man.in@1.238 +7 -7
+ NTP_4_2_7P417
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.238 +3 -3
+ NTP_4_2_7P417
+
+ packageinfo.sh@1.421 +1 -1
+ NTP_4_2_7P417
+
+ scripts/invoke-plot_summary.texi@1.18 +1 -1
+ NTP_4_2_7P417
+
+ scripts/invoke-summary.texi@1.18 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.227 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.228 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.228 +2 -2
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/ntp-wait.html@1.244 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/ntp-wait.man.in@1.228 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.228 +2 -2
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.16 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.7 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.7 +2 -2
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/ntpsweep.html@1.17 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/ntpsweep.man.in@1.7 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P417
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.16 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.7 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.7 +2 -2
+ NTP_4_2_7P417
+
+ scripts/ntptrace/ntptrace.html@1.17 +1 -1
+ NTP_4_2_7P417
+
+ scripts/ntptrace/ntptrace.man.in@1.7 +6 -6
+ NTP_4_2_7P417
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P417
+
+ scripts/plot_summary.1plot_summaryman@1.18 +6 -6
+ NTP_4_2_7P417
+
+ scripts/plot_summary.1plot_summarymdoc@1.18 +2 -2
+ NTP_4_2_7P417
+
+ scripts/plot_summary.html@1.18 +1 -1
+ NTP_4_2_7P417
+
+ scripts/plot_summary.man.in@1.18 +6 -6
+ NTP_4_2_7P417
+
+ scripts/plot_summary.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P417
+
+ scripts/summary.1summaryman@1.18 +6 -6
+ NTP_4_2_7P417
+
+ scripts/summary.1summarymdoc@1.18 +2 -2
+ NTP_4_2_7P417
+
+ scripts/summary.html@1.18 +1 -1
+ NTP_4_2_7P417
+
+ scripts/summary.man.in@1.18 +6 -6
+ NTP_4_2_7P417
+
+ scripts/summary.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P417
+
+ sntp/invoke-sntp.texi@1.406 +2 -2
+ NTP_4_2_7P417
+
+ sntp/sntp-opts.c@1.421 +7 -7
+ NTP_4_2_7P417
+
+ sntp/sntp-opts.h@1.421 +3 -3
+ NTP_4_2_7P417
+
+ sntp/sntp.1sntpman@1.241 +7 -7
+ NTP_4_2_7P417
+
+ sntp/sntp.1sntpmdoc@1.241 +3 -3
+ NTP_4_2_7P417
+
+ sntp/sntp.html@1.421 +2 -2
+ NTP_4_2_7P417
+
+ sntp/sntp.man.in@1.241 +7 -7
+ NTP_4_2_7P417
+
+ sntp/sntp.mdoc.in@1.241 +3 -3
+ NTP_4_2_7P417
+
+ util/invoke-ntp-keygen.texi@1.410 +2 -2
+ NTP_4_2_7P417
+
+ util/ntp-keygen-opts.c@1.424 +7 -7
+ NTP_4_2_7P417
+
+ util/ntp-keygen-opts.h@1.424 +3 -3
+ NTP_4_2_7P417
+
+ util/ntp-keygen.1ntp-keygenman@1.238 +7 -7
+ NTP_4_2_7P417
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.238 +3 -3
+ NTP_4_2_7P417
+
+ util/ntp-keygen.html@1.86 +2 -2
+ NTP_4_2_7P417
+
+ util/ntp-keygen.man.in@1.238 +7 -7
+ NTP_4_2_7P417
+
+ util/ntp-keygen.mdoc.in@1.238 +3 -3
+ NTP_4_2_7P417
+
+ChangeSet@1.3075.1.4, 2014-01-31 12:14:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P416
+ TAG: NTP_4_2_7P416
+
+ ChangeLog@1.1406.1.4 +1 -0
+ NTP_4_2_7P416
+
+ ntpd/invoke-ntp.conf.texi@1.94 +1 -1
+ NTP_4_2_7P416
+
+ ntpd/invoke-ntp.keys.texi@1.92 +1 -1
+ NTP_4_2_7P416
+
+ ntpd/invoke-ntpd.texi@1.408 +2 -2
+ NTP_4_2_7P416
+
+ ntpd/ntp.conf.5man@1.128 +7 -7
+ NTP_4_2_7P416
+
+ ntpd/ntp.conf.5mdoc@1.128 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntp.conf.html@1.89 +1 -1
+ NTP_4_2_7P416
+
+ ntpd/ntp.conf.man.in@1.128 +7 -7
+ NTP_4_2_7P416
+
+ ntpd/ntp.conf.mdoc.in@1.128 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntp.keys.5man@1.126 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntp.keys.5mdoc@1.126 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntp.keys.html@1.90 +1 -1
+ NTP_4_2_7P416
+
+ ntpd/ntp.keys.man.in@1.126 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntp.keys.mdoc.in@1.126 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntpd-opts.c@1.426 +7 -7
+ NTP_4_2_7P416
+
+ ntpd/ntpd-opts.h@1.426 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntpd.1ntpdman@1.237 +7 -7
+ NTP_4_2_7P416
+
+ ntpd/ntpd.1ntpdmdoc@1.237 +3 -3
+ NTP_4_2_7P416
+
+ ntpd/ntpd.html@1.84 +2 -2
+ NTP_4_2_7P416
+
+ ntpd/ntpd.man.in@1.237 +7 -7
+ NTP_4_2_7P416
+
+ ntpd/ntpd.mdoc.in@1.237 +3 -3
+ NTP_4_2_7P416
+
+ ntpdc/invoke-ntpdc.texi@1.406 +2 -2
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc-opts.c@1.421 +7 -7
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc-opts.h@1.421 +3 -3
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc.1ntpdcman@1.237 +32 -3
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.237 +21 -2
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc.html@1.250 +57 -77
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc.man.in@1.237 +32 -3
+ NTP_4_2_7P416
+
+ ntpdc/ntpdc.mdoc.in@1.237 +21 -2
+ NTP_4_2_7P416
+
+ ntpq/invoke-ntpq.texi@1.409 +2 -2
+ NTP_4_2_7P416
+
+ ntpq/ntpq-opts.c@1.423 +7 -7
+ NTP_4_2_7P416
+
+ ntpq/ntpq-opts.h@1.423 +3 -3
+ NTP_4_2_7P416
+
+ ntpq/ntpq.1ntpqman@1.237 +6 -6
+ NTP_4_2_7P416
+
+ ntpq/ntpq.1ntpqmdoc@1.237 +2 -2
+ NTP_4_2_7P416
+
+ ntpq/ntpq.html@1.81 +2 -2
+ NTP_4_2_7P416
+
+ ntpq/ntpq.man.in@1.237 +6 -6
+ NTP_4_2_7P416
+
+ ntpq/ntpq.mdoc.in@1.237 +2 -2
+ NTP_4_2_7P416
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.408 +2 -2
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.423 +7 -7
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.423 +3 -3
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.237 +7 -7
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.237 +3 -3
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd.html@1.79 +1 -1
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd.man.in@1.237 +7 -7
+ NTP_4_2_7P416
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.237 +3 -3
+ NTP_4_2_7P416
+
+ packageinfo.sh@1.420 +1 -1
+ NTP_4_2_7P416
+
+ scripts/invoke-plot_summary.texi@1.17 +1 -1
+ NTP_4_2_7P416
+
+ scripts/invoke-summary.texi@1.17 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.226 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.227 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.227 +2 -2
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/ntp-wait.html@1.243 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/ntp-wait.man.in@1.227 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.227 +2 -2
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.15 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.6 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.6 +2 -2
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/ntpsweep.html@1.16 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/ntpsweep.man.in@1.6 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P416
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.15 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.6 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.6 +2 -2
+ NTP_4_2_7P416
+
+ scripts/ntptrace/ntptrace.html@1.16 +1 -1
+ NTP_4_2_7P416
+
+ scripts/ntptrace/ntptrace.man.in@1.6 +6 -6
+ NTP_4_2_7P416
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P416
+
+ scripts/plot_summary.1plot_summaryman@1.17 +6 -6
+ NTP_4_2_7P416
+
+ scripts/plot_summary.1plot_summarymdoc@1.17 +2 -2
+ NTP_4_2_7P416
+
+ scripts/plot_summary.html@1.17 +1 -1
+ NTP_4_2_7P416
+
+ scripts/plot_summary.man.in@1.17 +6 -6
+ NTP_4_2_7P416
+
+ scripts/plot_summary.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P416
+
+ scripts/summary.1summaryman@1.17 +6 -6
+ NTP_4_2_7P416
+
+ scripts/summary.1summarymdoc@1.17 +2 -2
+ NTP_4_2_7P416
+
+ scripts/summary.html@1.17 +1 -1
+ NTP_4_2_7P416
+
+ scripts/summary.man.in@1.17 +6 -6
+ NTP_4_2_7P416
+
+ scripts/summary.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P416
+
+ sntp/invoke-sntp.texi@1.405 +2 -2
+ NTP_4_2_7P416
+
+ sntp/sntp-opts.c@1.420 +7 -7
+ NTP_4_2_7P416
+
+ sntp/sntp-opts.h@1.420 +3 -3
+ NTP_4_2_7P416
+
+ sntp/sntp.1sntpman@1.240 +7 -7
+ NTP_4_2_7P416
+
+ sntp/sntp.1sntpmdoc@1.240 +3 -3
+ NTP_4_2_7P416
+
+ sntp/sntp.html@1.420 +2 -2
+ NTP_4_2_7P416
+
+ sntp/sntp.man.in@1.240 +7 -7
+ NTP_4_2_7P416
+
+ sntp/sntp.mdoc.in@1.240 +3 -3
+ NTP_4_2_7P416
+
+ util/invoke-ntp-keygen.texi@1.409 +2 -2
+ NTP_4_2_7P416
+
+ util/ntp-keygen-opts.c@1.423 +7 -7
+ NTP_4_2_7P416
+
+ util/ntp-keygen-opts.h@1.423 +3 -3
+ NTP_4_2_7P416
+
+ util/ntp-keygen.1ntp-keygenman@1.237 +7 -7
+ NTP_4_2_7P416
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.237 +3 -3
+ NTP_4_2_7P416
+
+ util/ntp-keygen.html@1.85 +2 -2
+ NTP_4_2_7P416
+
+ util/ntp-keygen.man.in@1.237 +7 -7
+ NTP_4_2_7P416
+
+ util/ntp-keygen.mdoc.in@1.237 +3 -3
+ NTP_4_2_7P416
+
+ChangeSet@1.3075.1.3, 2014-01-31 11:53:07+00:00, stenn@psp-fb1.ntp.org
+ Tweak the 'Modified' line on appropriate html pages
+
+ ChangeLog@1.1406.1.3 +1 -0
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/assoc.html@1.40 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/comdex.html@1.6 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/confopt.html@1.58.1.1 +3 -2
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/decode.html@1.23 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/miscopt.html@1.77 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/monopt.html@1.37 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/ntpd.html@1.59 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/ntpdate.html@1.26 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/ntpdsim_new.html@1.8 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/ntpq.html@1.49 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/ntptrace.html@1.20 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ html/refclock.html@1.40 +3 -3
+ Tweak the 'Modified' line on appropriate html pages
+
+ChangeSet@1.3075.1.2, 2014-01-31 11:50:29+00:00, stenn@psp-fb1.ntp.org
+ Note in the deprecation of ntpdc in its documentation
+
+ ChangeLog@1.1406.1.2 +1 -0
+ Note in the deprecation of ntpdc in its documentation
+
+ html/ntpdc.html@1.38 +6 -4
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/invoke-ntpdc.texi@1.405 +8 -1
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc-opts.c@1.420 +1 -1
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc-opts.def@1.22 +7 -0
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc-opts.h@1.420 +1 -1
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc.1ntpdcman@1.236 +12 -32
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.236 +10 -22
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc.html@1.249 +82 -55
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc.man.in@1.236 +12 -32
+ Note in the deprecation of ntpdc in its documentation
+
+ ntpdc/ntpdc.mdoc.in@1.236 +10 -22
+ Note in the deprecation of ntpdc in its documentation
+
+ChangeSet@1.3075.1.1, 2014-01-31 11:48:11+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2332] Be more careful about when we use 'libgcc_s'
+
+ ChangeLog@1.1406.1.1 +1 -0
+ [Bug 2332] Be more careful about when we use 'libgcc_s'
+
+ sntp/m4/ntp_libntp.m4@1.26 +6 -4
+ [Bug 2332] Be more careful about when we use 'libgcc_s'
+
+ChangeSet@1.3078, 2014-01-29 04:21:29-05:00, murray@pogo.udel.edu
+ ChangeLog:
+ Bug 2539, doc extra statistics and code fixe for NMEA driver
+ refclock_nmea.c:
+ expand extra counters
+ fix for missing NMEA sentence in clockstats
+ driver20.html:
+ document extra statistics
+ several minor fixes
+
+ ChangeLog@1.1409 +1 -0
+ Bug 2539, doc extra statistics and code fixe for NMEA driver
+
+ html/drivers/driver20.html@1.27 +100 -6
+ document extra statistics
+ several minor fixes
+
+ ntpd/refclock_nmea.c@1.73 +22 -13
+ expand extra counters
+ fix for missing NMEA sentence in clockstats
+
+ChangeSet@1.3077, 2014-01-29 04:16:00-05:00, murray@pogo.udel.edu
+ ChangeLog:
+ Add check for enable stats to ntpd/complete.conf.in
+ complete.conf.in:
+ Add check for enable stats
+
+ ChangeLog@1.1408 +1 -0
+ Add check for enable stats to ntpd/complete.conf.in
+
+ ntpd/complete.conf.in@1.27 +2 -1
+ Add check for enable stats
+
+ChangeSet@1.3076, 2014-01-29 04:12:05-05:00, murray@pogo.udel.edu
+ confopt.html, ChangeLog:
+ Fix typo
+
+ ChangeLog@1.1407 +1 -0
+ Fix typo
+
+ html/confopt.html@1.59 +2 -2
+ Fix typo
+
+ChangeSet@1.3075, 2014-01-28 12:18:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P415
+ TAG: NTP_4_2_7P415
+
+ ChangeLog@1.1406 +1 -0
+ NTP_4_2_7P415
+
+ ntpd/invoke-ntp.conf.texi@1.93 +1 -1
+ NTP_4_2_7P415
+
+ ntpd/invoke-ntp.keys.texi@1.91 +1 -1
+ NTP_4_2_7P415
+
+ ntpd/invoke-ntpd.texi@1.407 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntp.conf.5man@1.127 +7 -7
+ NTP_4_2_7P415
+
+ ntpd/ntp.conf.5mdoc@1.127 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntp.conf.html@1.88 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntp.conf.man.in@1.127 +7 -7
+ NTP_4_2_7P415
+
+ ntpd/ntp.conf.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntp.keys.5man@1.125 +3 -3
+ NTP_4_2_7P415
+
+ ntpd/ntp.keys.5mdoc@1.125 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntp.keys.html@1.89 +1 -1
+ NTP_4_2_7P415
+
+ ntpd/ntp.keys.man.in@1.125 +3 -3
+ NTP_4_2_7P415
+
+ ntpd/ntp.keys.mdoc.in@1.125 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntpd-opts.c@1.425 +7 -7
+ NTP_4_2_7P415
+
+ ntpd/ntpd-opts.h@1.425 +3 -3
+ NTP_4_2_7P415
+
+ ntpd/ntpd.1ntpdman@1.236 +7 -7
+ NTP_4_2_7P415
+
+ ntpd/ntpd.1ntpdmdoc@1.236 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntpd.html@1.83 +2 -2
+ NTP_4_2_7P415
+
+ ntpd/ntpd.man.in@1.236 +7 -7
+ NTP_4_2_7P415
+
+ ntpd/ntpd.mdoc.in@1.236 +2 -2
+ NTP_4_2_7P415
+
+ ntpdc/invoke-ntpdc.texi@1.404 +2 -2
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc-opts.c@1.419 +7 -7
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc-opts.h@1.419 +3 -3
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc.1ntpdcman@1.235 +6 -6
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.235 +1 -1
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc.html@1.248 +2 -2
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc.man.in@1.235 +6 -6
+ NTP_4_2_7P415
+
+ ntpdc/ntpdc.mdoc.in@1.235 +1 -1
+ NTP_4_2_7P415
+
+ ntpq/invoke-ntpq.texi@1.408 +2 -2
+ NTP_4_2_7P415
+
+ ntpq/ntpq-opts.c@1.422 +7 -7
+ NTP_4_2_7P415
+
+ ntpq/ntpq-opts.h@1.422 +3 -3
+ NTP_4_2_7P415
+
+ ntpq/ntpq.1ntpqman@1.236 +6 -6
+ NTP_4_2_7P415
+
+ ntpq/ntpq.1ntpqmdoc@1.236 +1 -1
+ NTP_4_2_7P415
+
+ ntpq/ntpq.html@1.80 +2 -2
+ NTP_4_2_7P415
+
+ ntpq/ntpq.man.in@1.236 +6 -6
+ NTP_4_2_7P415
+
+ ntpq/ntpq.mdoc.in@1.236 +1 -1
+ NTP_4_2_7P415
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.407 +2 -2
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.422 +7 -7
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.422 +3 -3
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.236 +7 -7
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.236 +2 -2
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd.html@1.78 +1 -1
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd.man.in@1.236 +7 -7
+ NTP_4_2_7P415
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.236 +2 -2
+ NTP_4_2_7P415
+
+ packageinfo.sh@1.419 +1 -1
+ NTP_4_2_7P415
+
+ scripts/invoke-plot_summary.texi@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/invoke-summary.texi@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.225 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.226 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.226 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/ntp-wait.html@1.242 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/ntp-wait.man.in@1.226 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.226 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.14 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.5 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.5 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/ntpsweep.html@1.15 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/ntpsweep.man.in@1.5 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.6 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.14 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.5 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.5 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntptrace/ntptrace.html@1.15 +1 -1
+ NTP_4_2_7P415
+
+ scripts/ntptrace/ntptrace.man.in@1.5 +6 -6
+ NTP_4_2_7P415
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.6 +1 -1
+ NTP_4_2_7P415
+
+ scripts/plot_summary.1plot_summaryman@1.16 +6 -6
+ NTP_4_2_7P415
+
+ scripts/plot_summary.1plot_summarymdoc@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/plot_summary.html@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/plot_summary.man.in@1.16 +6 -6
+ NTP_4_2_7P415
+
+ scripts/plot_summary.mdoc.in@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/summary.1summaryman@1.16 +6 -6
+ NTP_4_2_7P415
+
+ scripts/summary.1summarymdoc@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/summary.html@1.16 +1 -1
+ NTP_4_2_7P415
+
+ scripts/summary.man.in@1.16 +6 -6
+ NTP_4_2_7P415
+
+ scripts/summary.mdoc.in@1.16 +1 -1
+ NTP_4_2_7P415
+
+ sntp/invoke-sntp.texi@1.404 +2 -2
+ NTP_4_2_7P415
+
+ sntp/sntp-opts.c@1.419 +7 -7
+ NTP_4_2_7P415
+
+ sntp/sntp-opts.h@1.419 +3 -3
+ NTP_4_2_7P415
+
+ sntp/sntp.1sntpman@1.239 +7 -7
+ NTP_4_2_7P415
+
+ sntp/sntp.1sntpmdoc@1.239 +2 -2
+ NTP_4_2_7P415
+
+ sntp/sntp.html@1.419 +2 -2
+ NTP_4_2_7P415
+
+ sntp/sntp.man.in@1.239 +7 -7
+ NTP_4_2_7P415
+
+ sntp/sntp.mdoc.in@1.239 +2 -2
+ NTP_4_2_7P415
+
+ util/invoke-ntp-keygen.texi@1.408 +2 -2
+ NTP_4_2_7P415
+
+ util/ntp-keygen-opts.c@1.422 +7 -7
+ NTP_4_2_7P415
+
+ util/ntp-keygen-opts.h@1.422 +3 -3
+ NTP_4_2_7P415
+
+ util/ntp-keygen.1ntp-keygenman@1.236 +7 -7
+ NTP_4_2_7P415
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.236 +2 -2
+ NTP_4_2_7P415
+
+ util/ntp-keygen.html@1.84 +27 -20
+ NTP_4_2_7P415
+
+ util/ntp-keygen.man.in@1.236 +7 -7
+ NTP_4_2_7P415
+
+ util/ntp-keygen.mdoc.in@1.236 +2 -2
+ NTP_4_2_7P415
+
+ChangeSet@1.3074, 2014-01-28 03:51:39-08:00, harlan@hms-mbp11.local
+ Fix the man page installation for the scripts/ files
+
+ ChangeLog@1.1405 +1 -0
+ Fix the man page installation for the scripts/ files
+
+ scripts/calc_tickadj/Makefile.am@1.7 +2 -0
+ Fix the man page installation for the scripts/ files
+
+ scripts/ntp-wait/Makefile.am@1.6 +2 -0
+ Fix the man page installation for the scripts/ files
+
+ scripts/ntpsweep/Makefile.am@1.7 +2 -0
+ Fix the man page installation for the scripts/ files
+
+ scripts/ntptrace/Makefile.am@1.7 +2 -0
+ Fix the man page installation for the scripts/ files
+
+ sntp/loc/README@1.3 +7 -0
+ Fix the man page installation for the scripts/ files
+
+ChangeSet@1.3073, 2014-01-28 11:26:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P414
+ TAG: NTP_4_2_7P414
+
+ ChangeLog@1.1404 +1 -0
+ NTP_4_2_7P414
+
+ ntpd/invoke-ntp.conf.texi@1.92 +2 -2
+ NTP_4_2_7P414
+
+ ntpd/invoke-ntp.keys.texi@1.90 +1 -1
+ NTP_4_2_7P414
+
+ ntpd/invoke-ntpd.texi@1.406 +2 -2
+ NTP_4_2_7P414
+
+ ntpd/ntp.conf.5man@1.126 +8 -8
+ NTP_4_2_7P414
+
+ ntpd/ntp.conf.5mdoc@1.126 +4 -4
+ NTP_4_2_7P414
+
+ ntpd/ntp.conf.html@1.87 +1 -1
+ NTP_4_2_7P414
+
+ ntpd/ntp.conf.man.in@1.126 +8 -8
+ NTP_4_2_7P414
+
+ ntpd/ntp.conf.mdoc.in@1.126 +4 -4
+ NTP_4_2_7P414
+
+ ntpd/ntp.keys.5man@1.124 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntp.keys.5mdoc@1.124 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntp.keys.html@1.88 +1 -1
+ NTP_4_2_7P414
+
+ ntpd/ntp.keys.man.in@1.124 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntp.keys.mdoc.in@1.124 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntpd-opts.c@1.424 +7 -7
+ NTP_4_2_7P414
+
+ ntpd/ntpd-opts.h@1.424 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntpd.1ntpdman@1.235 +7 -7
+ NTP_4_2_7P414
+
+ ntpd/ntpd.1ntpdmdoc@1.235 +3 -3
+ NTP_4_2_7P414
+
+ ntpd/ntpd.html@1.82 +2 -2
+ NTP_4_2_7P414
+
+ ntpd/ntpd.man.in@1.235 +7 -7
+ NTP_4_2_7P414
+
+ ntpd/ntpd.mdoc.in@1.235 +3 -3
+ NTP_4_2_7P414
+
+ ntpdc/invoke-ntpdc.texi@1.403 +2 -2
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc-opts.c@1.418 +7 -7
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc-opts.h@1.418 +3 -3
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc.1ntpdcman@1.234 +7 -7
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.234 +3 -3
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc.html@1.247 +2 -2
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc.man.in@1.234 +7 -7
+ NTP_4_2_7P414
+
+ ntpdc/ntpdc.mdoc.in@1.234 +3 -3
+ NTP_4_2_7P414
+
+ ntpq/invoke-ntpq.texi@1.407 +2 -2
+ NTP_4_2_7P414
+
+ ntpq/ntpq-opts.c@1.421 +7 -7
+ NTP_4_2_7P414
+
+ ntpq/ntpq-opts.h@1.421 +3 -3
+ NTP_4_2_7P414
+
+ ntpq/ntpq.1ntpqman@1.235 +6 -6
+ NTP_4_2_7P414
+
+ ntpq/ntpq.1ntpqmdoc@1.235 +2 -2
+ NTP_4_2_7P414
+
+ ntpq/ntpq.html@1.79 +2 -2
+ NTP_4_2_7P414
+
+ ntpq/ntpq.man.in@1.235 +6 -6
+ NTP_4_2_7P414
+
+ ntpq/ntpq.mdoc.in@1.235 +2 -2
+ NTP_4_2_7P414
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.406 +2 -2
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.421 +7 -7
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.421 +3 -3
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.235 +14 -14
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.235 +3 -3
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd.html@1.77 +1 -1
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd.man.in@1.235 +14 -14
+ NTP_4_2_7P414
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.235 +3 -3
+ NTP_4_2_7P414
+
+ packageinfo.sh@1.418 +1 -1
+ NTP_4_2_7P414
+
+ scripts/invoke-plot_summary.texi@1.15 +1 -1
+ NTP_4_2_7P414
+
+ scripts/invoke-summary.texi@1.15 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.224 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.225 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.225 +2 -2
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/ntp-wait.html@1.241 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/ntp-wait.man.in@1.225 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.225 +2 -2
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.13 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.4 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.4 +2 -2
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/ntpsweep.html@1.14 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/ntpsweep.man.in@1.4 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P414
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.13 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.4 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.4 +2 -2
+ NTP_4_2_7P414
+
+ scripts/ntptrace/ntptrace.html@1.14 +1 -1
+ NTP_4_2_7P414
+
+ scripts/ntptrace/ntptrace.man.in@1.4 +6 -6
+ NTP_4_2_7P414
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P414
+
+ scripts/plot_summary.1plot_summaryman@1.15 +6 -6
+ NTP_4_2_7P414
+
+ scripts/plot_summary.1plot_summarymdoc@1.15 +2 -2
+ NTP_4_2_7P414
+
+ scripts/plot_summary.html@1.15 +1 -1
+ NTP_4_2_7P414
+
+ scripts/plot_summary.man.in@1.15 +6 -6
+ NTP_4_2_7P414
+
+ scripts/plot_summary.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P414
+
+ scripts/summary.1summaryman@1.15 +6 -6
+ NTP_4_2_7P414
+
+ scripts/summary.1summarymdoc@1.15 +2 -2
+ NTP_4_2_7P414
+
+ scripts/summary.html@1.15 +1 -1
+ NTP_4_2_7P414
+
+ scripts/summary.man.in@1.15 +6 -6
+ NTP_4_2_7P414
+
+ scripts/summary.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P414
+
+ sntp/invoke-sntp.texi@1.403 +2 -2
+ NTP_4_2_7P414
+
+ sntp/sntp-opts.c@1.418 +7 -7
+ NTP_4_2_7P414
+
+ sntp/sntp-opts.h@1.418 +3 -3
+ NTP_4_2_7P414
+
+ sntp/sntp.1sntpman@1.238 +7 -7
+ NTP_4_2_7P414
+
+ sntp/sntp.1sntpmdoc@1.238 +3 -3
+ NTP_4_2_7P414
+
+ sntp/sntp.html@1.418 +2 -2
+ NTP_4_2_7P414
+
+ sntp/sntp.man.in@1.238 +7 -7
+ NTP_4_2_7P414
+
+ sntp/sntp.mdoc.in@1.238 +3 -3
+ NTP_4_2_7P414
+
+ util/invoke-ntp-keygen.texi@1.407 +24 -17
+ NTP_4_2_7P414
+
+ util/ntp-keygen-opts.c@1.421 +122 -122
+ NTP_4_2_7P414
+
+ util/ntp-keygen-opts.h@1.421 +16 -16
+ NTP_4_2_7P414
+
+ util/ntp-keygen.1ntp-keygenman@1.235 +23 -16
+ NTP_4_2_7P414
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.235 +18 -11
+ NTP_4_2_7P414
+
+ util/ntp-keygen.html@1.83 +2 -2
+ NTP_4_2_7P414
+
+ util/ntp-keygen.man.in@1.235 +23 -16
+ NTP_4_2_7P414
+
+ util/ntp-keygen.mdoc.in@1.235 +18 -11
+ NTP_4_2_7P414
+
+ChangeSet@1.3072, 2014-01-28 06:21:33-05:00, stenn@deacon.udel.edu
+ [Bug 1002] ntp-keygen option and documentation updates
+
+ util/ntp-keygen.c@1.97 +4 -4
+ [Bug 1002] ntp-keygen option and documentation updates
+
+ChangeSet@1.3071, 2014-01-28 04:40:20-05:00, stenn@deacon.udel.edu
+ [Bug 2493] ntptrace needs a man page (fixed in 4.2.7p402)
+
+ ChangeLog@1.1403 +1 -0
+ [Bug 2493] ntptrace needs a man page (fixed in 4.2.7p402)
+
+ChangeSet@1.3070, 2014-01-28 09:33:40+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2366] ntpdc.html: burst/iburst only work on servers
+
+ ChangeLog@1.1402 +1 -0
+ [Bug 2366] ntpdc.html: burst/iburst only work on servers
+
+ html/confopt.html@1.58 +1 -1
+ fix a typo
+
+ html/ntpdc.html@1.37 +3 -3
+ [Bug 2366] ntpdc.html: burst/iburst only work on servers
+
+ChangeSet@1.3069, 2014-01-28 08:45:42+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2049] Clarify ntpdate's -d option behavior
+
+ ChangeLog@1.1401 +1 -0
+ [Bug 2049] Clarify ntpdate's -d option behavior
+
+ html/ntpdate.html@1.25 +1 -1
+ [Bug 2049] Clarify ntpdate's -d option behavior
+
+ChangeSet@1.3068, 2014-01-28 03:35:19-05:00, stenn@deacon.udel.edu
+ [Bug 1734] Include man page for ntp.conf (fixed in 4.2.7p297)
+
+ ChangeLog@1.1400 +1 -0
+ [Bug 1734] Include man page for ntp.conf (fixed in 4.2.7p297)
+
+ChangeSet@1.3067, 2014-01-28 08:28:29+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ ChangeLog@1.1399 +7 -0
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ html/comdex.html@1.5 +2 -2
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ html/monopt.html@1.36 +5 -1
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ html/scripts/monopt.txt@1.4 +1 -0
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ ntpd/complete.conf.in@1.26 +1 -1
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ ntpd/ntp.conf.def@1.11 +1 -1
+ [Bug 1349] statistics command not documented in HTML documentation
+
+ChangeSet@1.3066, 2014-01-28 08:14:17+00:00, stenn@psp-fb1.ntp.org
+ [Bug 1002] ntp-keygen option and documentation updates
+
+ ChangeLog@1.1398 +2 -0
+ [Bug 1002] ntp-keygen option and documentation updates
+
+ util/ntp-keygen-opts.def@1.25 +14 -7
+ [Bug 1002] ntp-keygen option and documentation updates
+
+ChangeSet@1.3065, 2014-01-28 07:35:00+00:00, stenn@psp-fb1.ntp.org
+ [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'
+
+ ChangeLog@1.1397 +1 -0
+ [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'
+
+ html/ntpdc.html@1.36 +1 -1
+ [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'
+
+ ntpdc/ntpdc-opts.def@1.21 +1 -1
+ [Bug 930] ntpdc docs refer to 'clockinfo', but mean 'clockstat'
+
+ChangeSet@1.3064, 2014-01-28 07:07:13+00:00, stenn@psp-fb1.ntp.org
+ [Bug 898] Documentation fixes
+
+ ChangeLog@1.1396 +1 -0
+ [Bug 898] Documentation fixes
+
+ html/ntpd.html@1.58 +5 -1
+ [Bug 898] Documentation fixes
+
+ html/ntpdate.html@1.24 +5 -5
+ [Bug 898] Documentation fixes
+
+ html/ntpdc.html@1.35 +4 -2
+ [Bug 898] Documentation fixes
+
+ html/ntpq.html@1.48 +1 -1
+ [Bug 898] Documentation fixes
+
+ html/ntptrace.html@1.19 +1 -1
+ [Bug 898] Documentation fixes
+
+ChangeSet@1.3063, 2014-01-28 00:00:50-05:00, stenn@deacon.udel.edu
+ [Bug 2545] Cleanup of scripts/monitoring/ntptrap
+
+ ChangeLog@1.1395 +1 -0
+ [Bug 2545] Cleanup of scripts/monitoring/ntptrap
+
+ scripts/monitoring/ntp.pl@1.4 +54 -27
+ [Bug 2545] Cleanup of scripts/monitoring/ntptrap
+
+ scripts/monitoring/ntptrap@1.3 +6 -4
+ [Bug 2545] Cleanup of scripts/monitoring/ntptrap
+
+ChangeSet@1.3062, 2014-01-27 21:32:42-05:00, stenn@deacon.udel.edu
+ [Bug 792] TrueTime TL-3 WWV refclock support
+
+ ChangeLog@1.1394 +1 -0
+ [Bug 792] TrueTime TL-3 WWV refclock support
+
+ html/drivers/driver5.html@1.15 +17 -6
+ [Bug 792] TrueTime TL-3 WWV refclock support
+
+ ntpd/refclock_true.c@1.20 +121 -30
+ [Bug 792] TrueTime TL-3 WWV refclock support
+
+ChangeSet@1.3061, 2014-01-28 00:35:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P413
+ TAG: NTP_4_2_7P413
+
+ ChangeLog@1.1393 +1 -0
+ NTP_4_2_7P413
+
+ ntpd/invoke-ntp.conf.texi@1.91 +1 -1
+ NTP_4_2_7P413
+
+ ntpd/invoke-ntp.keys.texi@1.89 +1 -1
+ NTP_4_2_7P413
+
+ ntpd/invoke-ntpd.texi@1.405 +2 -2
+ NTP_4_2_7P413
+
+ ntpd/ntp.conf.5man@1.125 +7 -7
+ NTP_4_2_7P413
+
+ ntpd/ntp.conf.5mdoc@1.125 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntp.conf.html@1.86 +1 -1
+ NTP_4_2_7P413
+
+ ntpd/ntp.conf.man.in@1.125 +7 -7
+ NTP_4_2_7P413
+
+ ntpd/ntp.conf.mdoc.in@1.125 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntp.keys.5man@1.123 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntp.keys.5mdoc@1.123 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntp.keys.html@1.87 +1 -1
+ NTP_4_2_7P413
+
+ ntpd/ntp.keys.man.in@1.123 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntp.keys.mdoc.in@1.123 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntpd-opts.c@1.423 +7 -7
+ NTP_4_2_7P413
+
+ ntpd/ntpd-opts.h@1.423 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntpd.1ntpdman@1.234 +7 -7
+ NTP_4_2_7P413
+
+ ntpd/ntpd.1ntpdmdoc@1.234 +3 -3
+ NTP_4_2_7P413
+
+ ntpd/ntpd.html@1.81 +2 -2
+ NTP_4_2_7P413
+
+ ntpd/ntpd.man.in@1.234 +7 -7
+ NTP_4_2_7P413
+
+ ntpd/ntpd.mdoc.in@1.234 +3 -3
+ NTP_4_2_7P413
+
+ ntpdc/invoke-ntpdc.texi@1.402 +2 -2
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc-opts.c@1.417 +7 -7
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc-opts.h@1.417 +3 -3
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc.1ntpdcman@1.233 +6 -6
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.233 +2 -2
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc.html@1.246 +2 -2
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc.man.in@1.233 +6 -6
+ NTP_4_2_7P413
+
+ ntpdc/ntpdc.mdoc.in@1.233 +2 -2
+ NTP_4_2_7P413
+
+ ntpq/invoke-ntpq.texi@1.406 +2 -2
+ NTP_4_2_7P413
+
+ ntpq/ntpq-opts.c@1.420 +7 -7
+ NTP_4_2_7P413
+
+ ntpq/ntpq-opts.h@1.420 +3 -3
+ NTP_4_2_7P413
+
+ ntpq/ntpq.1ntpqman@1.234 +6 -6
+ NTP_4_2_7P413
+
+ ntpq/ntpq.1ntpqmdoc@1.234 +2 -2
+ NTP_4_2_7P413
+
+ ntpq/ntpq.html@1.78 +2 -2
+ NTP_4_2_7P413
+
+ ntpq/ntpq.man.in@1.234 +6 -6
+ NTP_4_2_7P413
+
+ ntpq/ntpq.mdoc.in@1.234 +2 -2
+ NTP_4_2_7P413
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.405 +2 -2
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.420 +7 -7
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.420 +3 -3
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.234 +7 -7
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.234 +3 -3
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd.html@1.76 +1 -1
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd.man.in@1.234 +7 -7
+ NTP_4_2_7P413
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.234 +3 -3
+ NTP_4_2_7P413
+
+ packageinfo.sh@1.417 +1 -1
+ NTP_4_2_7P413
+
+ scripts/invoke-plot_summary.texi@1.14 +1 -1
+ NTP_4_2_7P413
+
+ scripts/invoke-summary.texi@1.14 +1 -1
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.223 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.224 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.224 +21 -2
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/ntp-wait.html@1.240 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/ntp-wait.man.in@1.224 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.224 +21 -2
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.12 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.3 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.3 +21 -2
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/ntpsweep.html@1.13 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/ntpsweep.man.in@1.3 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.4 +21 -2
+ NTP_4_2_7P413
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.12 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.3 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.3 +21 -2
+ NTP_4_2_7P413
+
+ scripts/ntptrace/ntptrace.html@1.13 +2 -2
+ NTP_4_2_7P413
+
+ scripts/ntptrace/ntptrace.man.in@1.3 +32 -3
+ NTP_4_2_7P413
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.4 +21 -2
+ NTP_4_2_7P413
+
+ scripts/plot_summary.1plot_summaryman@1.14 +33 -3
+ NTP_4_2_7P413
+
+ scripts/plot_summary.1plot_summarymdoc@1.14 +22 -2
+ NTP_4_2_7P413
+
+ scripts/plot_summary.html@1.14 +28 -46
+ NTP_4_2_7P413
+
+ scripts/plot_summary.man.in@1.14 +33 -3
+ NTP_4_2_7P413
+
+ scripts/plot_summary.mdoc.in@1.14 +22 -2
+ NTP_4_2_7P413
+
+ scripts/summary.1summaryman@1.14 +32 -3
+ NTP_4_2_7P413
+
+ scripts/summary.1summarymdoc@1.14 +21 -2
+ NTP_4_2_7P413
+
+ scripts/summary.html@1.14 +26 -38
+ NTP_4_2_7P413
+
+ scripts/summary.man.in@1.14 +32 -3
+ NTP_4_2_7P413
+
+ scripts/summary.mdoc.in@1.14 +21 -2
+ NTP_4_2_7P413
+
+ sntp/invoke-sntp.texi@1.402 +2 -2
+ NTP_4_2_7P413
+
+ sntp/sntp-opts.c@1.417 +7 -7
+ NTP_4_2_7P413
+
+ sntp/sntp-opts.h@1.417 +3 -3
+ NTP_4_2_7P413
+
+ sntp/sntp.1sntpman@1.237 +7 -7
+ NTP_4_2_7P413
+
+ sntp/sntp.1sntpmdoc@1.237 +3 -3
+ NTP_4_2_7P413
+
+ sntp/sntp.html@1.417 +2 -2
+ NTP_4_2_7P413
+
+ sntp/sntp.man.in@1.237 +7 -7
+ NTP_4_2_7P413
+
+ sntp/sntp.mdoc.in@1.237 +3 -3
+ NTP_4_2_7P413
+
+ util/invoke-ntp-keygen.texi@1.406 +2 -2
+ NTP_4_2_7P413
+
+ util/ntp-keygen-opts.c@1.420 +7 -7
+ NTP_4_2_7P413
+
+ util/ntp-keygen-opts.h@1.420 +3 -3
+ NTP_4_2_7P413
+
+ util/ntp-keygen.1ntp-keygenman@1.234 +7 -7
+ NTP_4_2_7P413
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.234 +3 -3
+ NTP_4_2_7P413
+
+ util/ntp-keygen.html@1.82 +2 -2
+ NTP_4_2_7P413
+
+ util/ntp-keygen.man.in@1.234 +7 -7
+ NTP_4_2_7P413
+
+ util/ntp-keygen.mdoc.in@1.234 +3 -3
+ NTP_4_2_7P413
+
+ChangeSet@1.3060, 2014-01-27 19:35:20-05:00, stenn@deacon.udel.edu
+ update .point-changed-filelist
+
+ .point-changed-filelist@1.23 +12 -0
+ update .point-changed-filelist
+
+ChangeSet@1.3059, 2014-01-27 19:31:58-05:00, stenn@deacon.udel.edu
+ Add missing std_def_list
+
+ scripts/ntp-wait/Makefile.am@1.5 +8 -0
+ Add missing std_def_list
+
+ scripts/ntpsweep/Makefile.am@1.6 +8 -0
+ Add missing std_def_list
+
+ scripts/ntptrace/Makefile.am@1.6 +8 -0
+ Add missing std_def_list
+
+ChangeSet@1.3058, 2014-01-27 09:55:09+00:00, stenn@psp-fb1.ntp.org
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj-opts.def@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.2 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj.html@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.2 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.4 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/invoke-plot_summary.texi@1.13 +2 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/invoke-summary.texi@1.13 +2 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait-opts.def@1.10 +6 -4
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.223 +71 -72
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.223 +27 -53
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait.man.in@1.223 +71 -72
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.223 +27 -53
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep-opts.def@1.2 +3 -0
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.2 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep.man.in@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.3 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace-opts.def@1.2 +7 -4
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.2 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace.man.in@1.2 +7 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.3 +6 -2
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary-opts.def@1.2 +6 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary.1plot_summaryman@1.13 +8 -33
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary.1plot_summarymdoc@1.13 +7 -23
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary.html@1.13 +46 -28
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary.man.in@1.13 +8 -33
+ Require a version string for perl scripts that use autogen
+
+ scripts/plot_summary.mdoc.in@1.13 +7 -23
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary-opts@1.2 +1 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary-opts.def@1.2 +6 -1
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary.1summaryman@1.13 +8 -32
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary.1summarymdoc@1.13 +7 -22
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary.html@1.13 +38 -26
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary.man.in@1.13 +8 -32
+ Require a version string for perl scripts that use autogen
+
+ scripts/summary.mdoc.in@1.13 +7 -22
+ Require a version string for perl scripts that use autogen
+
+ChangeSet@1.3057, 2014-01-27 09:46:42+00:00, stenn@psp-fb1.ntp.org
+ Require a version string for perl scripts that use autogen
+
+ ChangeLog@1.1392 +2 -1
+ Require a version string for perl scripts that use autogen
+
+ sntp/ag-tpl/perlopt.tpl@1.2 +3 -2
+ Require a version string for perl scripts that use autogen
+
+ChangeSet@1.3056, 2014-01-27 09:42:49+00:00, stenn@psp-fb1.ntp.org
+ html/ cleanup
+
+ ChangeLog@1.1391 +1 -0
+ html/ cleanup
+
+ html/assoc.html@1.39 +1 -1
+ html/ cleanup
+
+ html/drivers/driver8.html@1.30 +1 -1
+ html/ cleanup
+
+ html/hints/solaris.html@1.11 +90 -1
+ html/ cleanup
+
+ html/pic/stats.gif@1.1, stenn@stenn.ntp.org +272 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/html/pic/stats.gif
+
+ html/pic/stats.gif@1.0, stenn@stenn.ntp.org +0 -0
+
+ html/pic/time1.gif@1.1, stenn@stenn.ntp.org +102 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/html/pic/time1.gif
+
+ html/pic/time1.gif@1.0, stenn@stenn.ntp.org +0 -0
+
+ html/refclock.html@1.39 +1 -1
+ html/ cleanup
+
+ChangeSet@1.3055, 2014-01-27 09:13:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P412
+ TAG: NTP_4_2_7P412
+
+ ChangeLog@1.1390 +1 -0
+ NTP_4_2_7P412
+
+ ntpd/invoke-ntp.conf.texi@1.90 +1 -1
+ NTP_4_2_7P412
+
+ ntpd/invoke-ntp.keys.texi@1.88 +1 -1
+ NTP_4_2_7P412
+
+ ntpd/invoke-ntpd.texi@1.404 +2 -2
+ NTP_4_2_7P412
+
+ ntpd/ntp.conf.5man@1.124 +7 -7
+ NTP_4_2_7P412
+
+ ntpd/ntp.conf.5mdoc@1.124 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntp.conf.html@1.85 +1 -1
+ NTP_4_2_7P412
+
+ ntpd/ntp.conf.man.in@1.124 +7 -7
+ NTP_4_2_7P412
+
+ ntpd/ntp.conf.mdoc.in@1.124 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntp.keys.5man@1.122 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntp.keys.5mdoc@1.122 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntp.keys.html@1.86 +1 -1
+ NTP_4_2_7P412
+
+ ntpd/ntp.keys.man.in@1.122 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntp.keys.mdoc.in@1.122 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntpd-opts.c@1.422 +7 -7
+ NTP_4_2_7P412
+
+ ntpd/ntpd-opts.h@1.422 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntpd.1ntpdman@1.233 +7 -7
+ NTP_4_2_7P412
+
+ ntpd/ntpd.1ntpdmdoc@1.233 +3 -3
+ NTP_4_2_7P412
+
+ ntpd/ntpd.html@1.80 +2 -2
+ NTP_4_2_7P412
+
+ ntpd/ntpd.man.in@1.233 +7 -7
+ NTP_4_2_7P412
+
+ ntpd/ntpd.mdoc.in@1.233 +3 -3
+ NTP_4_2_7P412
+
+ ntpdc/invoke-ntpdc.texi@1.401 +2 -2
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc-opts.c@1.416 +7 -7
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc-opts.h@1.416 +3 -3
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc.1ntpdcman@1.232 +893 -0
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.232 +2 -2
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc.html@1.245 +2 -2
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc.man.in@1.232 +893 -0
+ NTP_4_2_7P412
+
+ ntpdc/ntpdc.mdoc.in@1.232 +2 -2
+ NTP_4_2_7P412
+
+ ntpq/invoke-ntpq.texi@1.405 +2 -2
+ NTP_4_2_7P412
+
+ ntpq/ntpq-opts.c@1.419 +7 -7
+ NTP_4_2_7P412
+
+ ntpq/ntpq-opts.h@1.419 +3 -3
+ NTP_4_2_7P412
+
+ ntpq/ntpq.1ntpqman@1.233 +6 -6
+ NTP_4_2_7P412
+
+ ntpq/ntpq.1ntpqmdoc@1.233 +2 -2
+ NTP_4_2_7P412
+
+ ntpq/ntpq.html@1.77 +2 -2
+ NTP_4_2_7P412
+
+ ntpq/ntpq.man.in@1.233 +6 -6
+ NTP_4_2_7P412
+
+ ntpq/ntpq.mdoc.in@1.233 +2 -2
+ NTP_4_2_7P412
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.404 +2 -2
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.419 +7 -7
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.419 +3 -3
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.233 +7 -7
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.233 +3 -3
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd.html@1.75 +1 -1
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd.man.in@1.233 +7 -7
+ NTP_4_2_7P412
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.233 +3 -3
+ NTP_4_2_7P412
+
+ packageinfo.sh@1.416 +1 -1
+ NTP_4_2_7P412
+
+ scripts/invoke-plot_summary.texi@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/invoke-summary.texi@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.222 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntp-wait/ntp-wait.html@1.239 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.11 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntpsweep/ntpsweep.html@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.11 +1 -1
+ NTP_4_2_7P412
+
+ scripts/ntptrace/ntptrace.html@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/plot_summary.1plot_summaryman@1.12 +6 -6
+ NTP_4_2_7P412
+
+ scripts/plot_summary.1plot_summarymdoc@1.12 +2 -2
+ NTP_4_2_7P412
+
+ scripts/plot_summary.html@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/plot_summary.man.in@1.12 +6 -6
+ NTP_4_2_7P412
+
+ scripts/plot_summary.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P412
+
+ scripts/summary.1summaryman@1.12 +6 -6
+ NTP_4_2_7P412
+
+ scripts/summary.1summarymdoc@1.12 +2 -2
+ NTP_4_2_7P412
+
+ scripts/summary.html@1.12 +1 -1
+ NTP_4_2_7P412
+
+ scripts/summary.man.in@1.12 +6 -6
+ NTP_4_2_7P412
+
+ scripts/summary.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P412
+
+ sntp/invoke-sntp.texi@1.401 +2 -2
+ NTP_4_2_7P412
+
+ sntp/sntp-opts.c@1.416 +7 -7
+ NTP_4_2_7P412
+
+ sntp/sntp-opts.h@1.416 +3 -3
+ NTP_4_2_7P412
+
+ sntp/sntp.1sntpman@1.236 +372 -0
+ NTP_4_2_7P412
+
+ sntp/sntp.1sntpmdoc@1.236 +3 -3
+ NTP_4_2_7P412
+
+ sntp/sntp.html@1.416 +2 -2
+ NTP_4_2_7P412
+
+ sntp/sntp.man.in@1.236 +372 -0
+ NTP_4_2_7P412
+
+ sntp/sntp.mdoc.in@1.236 +3 -3
+ NTP_4_2_7P412
+
+ util/invoke-ntp-keygen.texi@1.405 +2 -2
+ NTP_4_2_7P412
+
+ util/ntp-keygen-opts.c@1.419 +7 -7
+ NTP_4_2_7P412
+
+ util/ntp-keygen-opts.h@1.419 +3 -3
+ NTP_4_2_7P412
+
+ util/ntp-keygen.1ntp-keygenman@1.233 +7 -7
+ NTP_4_2_7P412
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.233 +3 -3
+ NTP_4_2_7P412
+
+ util/ntp-keygen.html@1.81 +2 -2
+ NTP_4_2_7P412
+
+ util/ntp-keygen.man.in@1.233 +7 -7
+ NTP_4_2_7P412
+
+ util/ntp-keygen.mdoc.in@1.233 +3 -3
+ NTP_4_2_7P412
+
+ChangeSet@1.3054, 2014-01-20 02:39:11+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups
+
+ ChangeLog@1.1389 +1 -0
+ [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups
+
+ bootstrap@1.44 +26 -7
+ [Bug 2540] bootstrap script needs to 'touch' files in finer-grained groups
+
+ChangeSet@1.3053, 2014-01-12 10:07:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P411
+ TAG: NTP_4_2_7P411
+
+ ChangeLog@1.1388 +1 -0
+ NTP_4_2_7P411
+
+ ntpd/invoke-ntp.conf.texi@1.89 +1 -1
+ NTP_4_2_7P411
+
+ ntpd/invoke-ntp.keys.texi@1.87 +1 -1
+ NTP_4_2_7P411
+
+ ntpd/invoke-ntpd.texi@1.403 +2 -2
+ NTP_4_2_7P411
+
+ ntpd/ntp.conf.5man@1.123 +7 -7
+ NTP_4_2_7P411
+
+ ntpd/ntp.conf.5mdoc@1.123 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntp.conf.html@1.84 +14 -12
+ NTP_4_2_7P411
+
+ ntpd/ntp.conf.man.in@1.123 +7 -7
+ NTP_4_2_7P411
+
+ ntpd/ntp.conf.mdoc.in@1.123 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntp.keys.5man@1.121 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntp.keys.5mdoc@1.121 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntp.keys.html@1.85 +1 -1
+ NTP_4_2_7P411
+
+ ntpd/ntp.keys.man.in@1.121 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntp.keys.mdoc.in@1.121 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntpd-opts.c@1.421 +7 -7
+ NTP_4_2_7P411
+
+ ntpd/ntpd-opts.h@1.421 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntpd.1ntpdman@1.232 +7 -7
+ NTP_4_2_7P411
+
+ ntpd/ntpd.1ntpdmdoc@1.232 +3 -3
+ NTP_4_2_7P411
+
+ ntpd/ntpd.html@1.79 +2 -2
+ NTP_4_2_7P411
+
+ ntpd/ntpd.man.in@1.232 +7 -7
+ NTP_4_2_7P411
+
+ ntpd/ntpd.mdoc.in@1.232 +3 -3
+ NTP_4_2_7P411
+
+ ntpdc/invoke-ntpdc.texi@1.400 +2 -2
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc-opts.c@1.415 +7 -7
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc-opts.h@1.415 +3 -3
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc.1ntpdcman@1.231 +0 -893
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.231 +2 -2
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc.html@1.244 +2 -2
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc.man.in@1.231 +0 -893
+ NTP_4_2_7P411
+
+ ntpdc/ntpdc.mdoc.in@1.231 +2 -2
+ NTP_4_2_7P411
+
+ ntpq/invoke-ntpq.texi@1.404 +2 -2
+ NTP_4_2_7P411
+
+ ntpq/ntpq-opts.c@1.418 +7 -7
+ NTP_4_2_7P411
+
+ ntpq/ntpq-opts.h@1.418 +3 -3
+ NTP_4_2_7P411
+
+ ntpq/ntpq.1ntpqman@1.232 +6 -6
+ NTP_4_2_7P411
+
+ ntpq/ntpq.1ntpqmdoc@1.232 +2 -2
+ NTP_4_2_7P411
+
+ ntpq/ntpq.html@1.76 +2 -2
+ NTP_4_2_7P411
+
+ ntpq/ntpq.man.in@1.232 +6 -6
+ NTP_4_2_7P411
+
+ ntpq/ntpq.mdoc.in@1.232 +2 -2
+ NTP_4_2_7P411
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.403 +2 -2
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.418 +7 -7
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.418 +3 -3
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.232 +14 -14
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.232 +3 -3
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd.html@1.74 +1 -1
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd.man.in@1.232 +14 -14
+ NTP_4_2_7P411
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.232 +3 -3
+ NTP_4_2_7P411
+
+ packageinfo.sh@1.415 +1 -1
+ NTP_4_2_7P411
+
+ scripts/invoke-plot_summary.texi@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/invoke-summary.texi@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.221 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntp-wait/ntp-wait.html@1.238 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.10 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntpsweep/ntpsweep.html@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.10 +1 -1
+ NTP_4_2_7P411
+
+ scripts/ntptrace/ntptrace.html@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/plot_summary.1plot_summaryman@1.11 +6 -6
+ NTP_4_2_7P411
+
+ scripts/plot_summary.1plot_summarymdoc@1.11 +2 -2
+ NTP_4_2_7P411
+
+ scripts/plot_summary.html@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/plot_summary.man.in@1.11 +6 -6
+ NTP_4_2_7P411
+
+ scripts/plot_summary.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P411
+
+ scripts/summary.1summaryman@1.11 +6 -6
+ NTP_4_2_7P411
+
+ scripts/summary.1summarymdoc@1.11 +2 -2
+ NTP_4_2_7P411
+
+ scripts/summary.html@1.11 +1 -1
+ NTP_4_2_7P411
+
+ scripts/summary.man.in@1.11 +6 -6
+ NTP_4_2_7P411
+
+ scripts/summary.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P411
+
+ sntp/invoke-sntp.texi@1.400 +2 -2
+ NTP_4_2_7P411
+
+ sntp/sntp-opts.c@1.415 +7 -7
+ NTP_4_2_7P411
+
+ sntp/sntp-opts.h@1.415 +3 -3
+ NTP_4_2_7P411
+
+ sntp/sntp.1sntpman@1.235 +0 -372
+ NTP_4_2_7P411
+
+ sntp/sntp.1sntpmdoc@1.235 +3 -3
+ NTP_4_2_7P411
+
+ sntp/sntp.html@1.415 +2 -2
+ NTP_4_2_7P411
+
+ sntp/sntp.man.in@1.235 +0 -372
+ NTP_4_2_7P411
+
+ sntp/sntp.mdoc.in@1.235 +3 -3
+ NTP_4_2_7P411
+
+ util/invoke-ntp-keygen.texi@1.404 +2 -2
+ NTP_4_2_7P411
+
+ util/ntp-keygen-opts.c@1.418 +7 -7
+ NTP_4_2_7P411
+
+ util/ntp-keygen-opts.h@1.418 +3 -3
+ NTP_4_2_7P411
+
+ util/ntp-keygen.1ntp-keygenman@1.232 +7 -7
+ NTP_4_2_7P411
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.232 +3 -3
+ NTP_4_2_7P411
+
+ util/ntp-keygen.html@1.80 +2 -2
+ NTP_4_2_7P411
+
+ util/ntp-keygen.man.in@1.232 +7 -7
+ NTP_4_2_7P411
+
+ util/ntp-keygen.mdoc.in@1.232 +3 -3
+ NTP_4_2_7P411
+
+ChangeSet@1.3052, 2014-01-09 05:21:23-05:00, stenn@deacon.udel.edu
+ [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd
+
+ ChangeLog@1.1387 +1 -0
+ [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd
+
+ html/ntpdc.html@1.34 +1 -0
+ [Bug 2532] Note in ntpdc docs that "enable pps" only works on older ntpd
+
+ChangeSet@1.3051, 2014-01-08 11:47:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P410
+ TAG: NTP_4_2_7P410
+
+ ChangeLog@1.1386 +1 -0
+ NTP_4_2_7P410
+
+ ntpd/invoke-ntp.conf.texi@1.88 +16 -14
+ NTP_4_2_7P410
+
+ ntpd/invoke-ntp.keys.texi@1.86 +1 -1
+ NTP_4_2_7P410
+
+ ntpd/invoke-ntpd.texi@1.402 +2 -2
+ NTP_4_2_7P410
+
+ ntpd/ntp.conf.5man@1.122 +24 -22
+ NTP_4_2_7P410
+
+ ntpd/ntp.conf.5mdoc@1.122 +21 -19
+ NTP_4_2_7P410
+
+ ntpd/ntp.conf.html@1.83 +1 -1
+ NTP_4_2_7P410
+
+ ntpd/ntp.conf.man.in@1.122 +24 -22
+ NTP_4_2_7P410
+
+ ntpd/ntp.conf.mdoc.in@1.122 +21 -19
+ NTP_4_2_7P410
+
+ ntpd/ntp.keys.5man@1.120 +4 -4
+ NTP_4_2_7P410
+
+ ntpd/ntp.keys.5mdoc@1.120 +4 -4
+ NTP_4_2_7P410
+
+ ntpd/ntp.keys.html@1.84 +1 -1
+ NTP_4_2_7P410
+
+ ntpd/ntp.keys.man.in@1.120 +4 -4
+ NTP_4_2_7P410
+
+ ntpd/ntp.keys.mdoc.in@1.120 +4 -4
+ NTP_4_2_7P410
+
+ ntpd/ntpd-opts.c@1.420 +7 -7
+ NTP_4_2_7P410
+
+ ntpd/ntpd-opts.h@1.420 +3 -3
+ NTP_4_2_7P410
+
+ ntpd/ntpd.1ntpdman@1.231 +8 -8
+ NTP_4_2_7P410
+
+ ntpd/ntpd.1ntpdmdoc@1.231 +4 -4
+ NTP_4_2_7P410
+
+ ntpd/ntpd.html@1.78 +2 -2
+ NTP_4_2_7P410
+
+ ntpd/ntpd.man.in@1.231 +8 -8
+ NTP_4_2_7P410
+
+ ntpd/ntpd.mdoc.in@1.231 +4 -4
+ NTP_4_2_7P410
+
+ ntpdc/invoke-ntpdc.texi@1.399 +2 -2
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc-opts.c@1.414 +7 -7
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc-opts.h@1.414 +3 -3
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc.1ntpdcman@1.230 +7 -7
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.230 +3 -3
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc.html@1.243 +2 -2
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc.man.in@1.230 +7 -7
+ NTP_4_2_7P410
+
+ ntpdc/ntpdc.mdoc.in@1.230 +3 -3
+ NTP_4_2_7P410
+
+ ntpq/invoke-ntpq.texi@1.403 +2 -2
+ NTP_4_2_7P410
+
+ ntpq/ntpq-opts.c@1.417 +7 -7
+ NTP_4_2_7P410
+
+ ntpq/ntpq-opts.h@1.417 +3 -3
+ NTP_4_2_7P410
+
+ ntpq/ntpq.1ntpqman@1.231 +7 -7
+ NTP_4_2_7P410
+
+ ntpq/ntpq.1ntpqmdoc@1.231 +3 -3
+ NTP_4_2_7P410
+
+ ntpq/ntpq.html@1.75 +2 -2
+ NTP_4_2_7P410
+
+ ntpq/ntpq.man.in@1.231 +7 -7
+ NTP_4_2_7P410
+
+ ntpq/ntpq.mdoc.in@1.231 +3 -3
+ NTP_4_2_7P410
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.402 +2 -2
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.417 +7 -7
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.417 +3 -3
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.231 +15 -15
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.231 +4 -4
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd.html@1.73 +1 -1
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd.man.in@1.231 +15 -15
+ NTP_4_2_7P410
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.231 +4 -4
+ NTP_4_2_7P410
+
+ packageinfo.sh@1.414 +1 -1
+ NTP_4_2_7P410
+
+ scripts/invoke-plot_summary.texi@1.10 +1 -1
+ NTP_4_2_7P410
+
+ scripts/invoke-summary.texi@1.10 +14 -1
+ NTP_4_2_7P410
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.220 +29 -1
+ NTP_4_2_7P410
+
+ scripts/ntp-wait/ntp-wait.html@1.237 +31 -2
+ NTP_4_2_7P410
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.9 +1 -1
+ NTP_4_2_7P410
+
+ scripts/ntpsweep/ntpsweep.html@1.10 +1 -1
+ NTP_4_2_7P410
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.9 +1 -1
+ NTP_4_2_7P410
+
+ scripts/ntptrace/ntptrace.html@1.10 +1 -1
+ NTP_4_2_7P410
+
+ scripts/plot_summary.1plot_summaryman@1.10 +138 -0
+ NTP_4_2_7P410
+
+ scripts/plot_summary.1plot_summarymdoc@1.10 +3 -3
+ NTP_4_2_7P410
+
+ scripts/plot_summary.html@1.10 +1 -1
+ NTP_4_2_7P410
+
+ scripts/plot_summary.man.in@1.10 +138 -0
+ NTP_4_2_7P410
+
+ scripts/plot_summary.mdoc.in@1.10 +3 -3
+ NTP_4_2_7P410
+
+ scripts/summary.1summaryman@1.10 +7 -7
+ NTP_4_2_7P410
+
+ scripts/summary.1summarymdoc@1.10 +3 -3
+ NTP_4_2_7P410
+
+ scripts/summary.html@1.10 +15 -2
+ NTP_4_2_7P410
+
+ scripts/summary.man.in@1.10 +7 -7
+ NTP_4_2_7P410
+
+ scripts/summary.mdoc.in@1.10 +3 -3
+ NTP_4_2_7P410
+
+ sntp/invoke-sntp.texi@1.399 +2 -2
+ NTP_4_2_7P410
+
+ sntp/sntp-opts.c@1.414 +7 -7
+ NTP_4_2_7P410
+
+ sntp/sntp-opts.h@1.414 +3 -3
+ NTP_4_2_7P410
+
+ sntp/sntp.1sntpman@1.234 +8 -8
+ NTP_4_2_7P410
+
+ sntp/sntp.1sntpmdoc@1.234 +4 -4
+ NTP_4_2_7P410
+
+ sntp/sntp.html@1.414 +2 -2
+ NTP_4_2_7P410
+
+ sntp/sntp.man.in@1.234 +8 -8
+ NTP_4_2_7P410
+
+ sntp/sntp.mdoc.in@1.234 +4 -4
+ NTP_4_2_7P410
+
+ util/invoke-ntp-keygen.texi@1.403 +2 -2
+ NTP_4_2_7P410
+
+ util/ntp-keygen-opts.c@1.417 +7 -7
+ NTP_4_2_7P410
+
+ util/ntp-keygen-opts.h@1.417 +3 -3
+ NTP_4_2_7P410
+
+ util/ntp-keygen.1ntp-keygenman@1.231 +8 -8
+ NTP_4_2_7P410
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.231 +4 -4
+ NTP_4_2_7P410
+
+ util/ntp-keygen.html@1.79 +2 -2
+ NTP_4_2_7P410
+
+ util/ntp-keygen.man.in@1.231 +8 -8
+ NTP_4_2_7P410
+
+ util/ntp-keygen.mdoc.in@1.231 +4 -4
+ NTP_4_2_7P410
+
+ChangeSet@1.3050, 2014-01-08 10:25:17+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2530] Fix documentation for enable/disable mode7 and pps
+
+ ChangeLog@1.1385 +1 -0
+ [Bug 2530] Fix documentation for enable/disable mode7 and pps
+
+ html/miscopt.html@1.76 +4 -4
+ [Bug 2530] Fix documentation for enable/disable mode7 and pps
+
+ ntpd/ntp.conf.def@1.10 +17 -15
+ [Bug 2530] Fix documentation for enable/disable mode7 and pps
+
+ChangeSet@1.3049, 2014-01-08 02:46:45-05:00, stenn@deacon.udel.edu
+ [Bug 2332] Force reference to 'libgcc_s' when using GCC and GNU ld
+
+ sntp/m4/ntp_libntp.m4@1.25 +5 -3
+ [Bug 2332] Force reference to 'libgcc_s' when using GCC and GNU ld
+
+ChangeSet@1.3046.2.2, 2014-01-07 20:33:45-05:00, stenn@deacon.udel.edu
+ Cleanup to the new scripts/*/Makefile.am files
+
+ ChangeLog@1.1382.1.2 +1 -0
+
+ scripts/calc_tickadj/Makefile.am@1.6 +2 -0
+
+ scripts/ntp-wait/Makefile.am@1.4 +1 -0
+
+ scripts/ntptrace/Makefile.am@1.5 +2 -0
+
+ChangeSet@1.3046.2.1, 2014-01-04 11:22:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P409
+ TAG: NTP_4_2_7P409
+
+ ChangeLog@1.1382.1.1 +1 -0
+ NTP_4_2_7P409
+
+ ntpd/invoke-ntp.conf.texi@1.87 +1 -1
+ NTP_4_2_7P409
+
+ ntpd/invoke-ntp.keys.texi@1.85 +1 -1
+ NTP_4_2_7P409
+
+ ntpd/invoke-ntpd.texi@1.401 +2 -2
+ NTP_4_2_7P409
+
+ ntpd/ntp.conf.5man@1.121 +7 -7
+ NTP_4_2_7P409
+
+ ntpd/ntp.conf.5mdoc@1.121 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntp.conf.html@1.82 +1 -1
+ NTP_4_2_7P409
+
+ ntpd/ntp.conf.man.in@1.121 +7 -7
+ NTP_4_2_7P409
+
+ ntpd/ntp.conf.mdoc.in@1.121 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntp.keys.5man@1.119 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntp.keys.5mdoc@1.119 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntp.keys.html@1.83 +1 -1
+ NTP_4_2_7P409
+
+ ntpd/ntp.keys.man.in@1.119 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntp.keys.mdoc.in@1.119 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntpd-opts.c@1.419 +7 -7
+ NTP_4_2_7P409
+
+ ntpd/ntpd-opts.h@1.419 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntpd.1ntpdman@1.230 +7 -7
+ NTP_4_2_7P409
+
+ ntpd/ntpd.1ntpdmdoc@1.230 +3 -3
+ NTP_4_2_7P409
+
+ ntpd/ntpd.html@1.77 +2 -2
+ NTP_4_2_7P409
+
+ ntpd/ntpd.man.in@1.230 +7 -7
+ NTP_4_2_7P409
+
+ ntpd/ntpd.mdoc.in@1.230 +3 -3
+ NTP_4_2_7P409
+
+ ntpdc/invoke-ntpdc.texi@1.398 +2 -2
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc-opts.c@1.413 +7 -7
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc-opts.h@1.413 +3 -3
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc.1ntpdcman@1.229 +6 -6
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.229 +2 -2
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc.html@1.242 +2 -2
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc.man.in@1.229 +6 -6
+ NTP_4_2_7P409
+
+ ntpdc/ntpdc.mdoc.in@1.229 +2 -2
+ NTP_4_2_7P409
+
+ ntpq/invoke-ntpq.texi@1.402 +2 -2
+ NTP_4_2_7P409
+
+ ntpq/ntpq-opts.c@1.416 +7 -7
+ NTP_4_2_7P409
+
+ ntpq/ntpq-opts.h@1.416 +3 -3
+ NTP_4_2_7P409
+
+ ntpq/ntpq.1ntpqman@1.230 +6 -6
+ NTP_4_2_7P409
+
+ ntpq/ntpq.1ntpqmdoc@1.230 +2 -2
+ NTP_4_2_7P409
+
+ ntpq/ntpq.html@1.74 +2 -2
+ NTP_4_2_7P409
+
+ ntpq/ntpq.man.in@1.230 +6 -6
+ NTP_4_2_7P409
+
+ ntpq/ntpq.mdoc.in@1.230 +2 -2
+ NTP_4_2_7P409
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.401 +2 -2
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.416 +7 -7
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.416 +3 -3
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.230 +14 -14
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.230 +3 -3
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd.html@1.72 +1 -1
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd.man.in@1.230 +14 -14
+ NTP_4_2_7P409
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.230 +3 -3
+ NTP_4_2_7P409
+
+ packageinfo.sh@1.413 +1 -1
+ NTP_4_2_7P409
+
+ scripts/invoke-plot_summary.texi@1.9 +1 -1
+ NTP_4_2_7P409
+
+ scripts/invoke-summary.texi@1.9 +1 -14
+ NTP_4_2_7P409
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.219 +1 -29
+ NTP_4_2_7P409
+
+ scripts/ntp-wait/ntp-wait.html@1.236 +2 -31
+ NTP_4_2_7P409
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.8 +1 -1
+ NTP_4_2_7P409
+
+ scripts/ntpsweep/ntpsweep.html@1.9 +1 -1
+ NTP_4_2_7P409
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.8 +1 -1
+ NTP_4_2_7P409
+
+ scripts/ntptrace/ntptrace.html@1.9 +1 -1
+ NTP_4_2_7P409
+
+ scripts/plot_summary.1plot_summaryman@1.9 +0 -138
+ NTP_4_2_7P409
+
+ scripts/plot_summary.1plot_summarymdoc@1.9 +2 -2
+ NTP_4_2_7P409
+
+ scripts/plot_summary.html@1.9 +1 -1
+ NTP_4_2_7P409
+
+ scripts/plot_summary.man.in@1.9 +0 -138
+ NTP_4_2_7P409
+
+ scripts/plot_summary.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P409
+
+ scripts/summary.1summaryman@1.9 +6 -6
+ NTP_4_2_7P409
+
+ scripts/summary.1summarymdoc@1.9 +2 -2
+ NTP_4_2_7P409
+
+ scripts/summary.html@1.9 +2 -15
+ NTP_4_2_7P409
+
+ scripts/summary.man.in@1.9 +6 -6
+ NTP_4_2_7P409
+
+ scripts/summary.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P409
+
+ sntp/invoke-sntp.texi@1.398 +2 -2
+ NTP_4_2_7P409
+
+ sntp/sntp-opts.c@1.413 +7 -7
+ NTP_4_2_7P409
+
+ sntp/sntp-opts.h@1.413 +3 -3
+ NTP_4_2_7P409
+
+ sntp/sntp.1sntpman@1.233 +7 -7
+ NTP_4_2_7P409
+
+ sntp/sntp.1sntpmdoc@1.233 +3 -3
+ NTP_4_2_7P409
+
+ sntp/sntp.html@1.413 +2 -2
+ NTP_4_2_7P409
+
+ sntp/sntp.man.in@1.233 +7 -7
+ NTP_4_2_7P409
+
+ sntp/sntp.mdoc.in@1.233 +3 -3
+ NTP_4_2_7P409
+
+ util/invoke-ntp-keygen.texi@1.402 +2 -2
+ NTP_4_2_7P409
+
+ util/ntp-keygen-opts.c@1.416 +7 -7
+ NTP_4_2_7P409
+
+ util/ntp-keygen-opts.h@1.416 +3 -3
+ NTP_4_2_7P409
+
+ util/ntp-keygen.1ntp-keygenman@1.230 +7 -7
+ NTP_4_2_7P409
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.230 +3 -3
+ NTP_4_2_7P409
+
+ util/ntp-keygen.html@1.78 +2 -2
+ NTP_4_2_7P409
+
+ util/ntp-keygen.man.in@1.230 +7 -7
+ NTP_4_2_7P409
+
+ util/ntp-keygen.mdoc.in@1.230 +3 -3
+ NTP_4_2_7P409
+
+ChangeSet@1.3046.1.1, 2014-01-04 00:11:38+01:00, jnperlin@hydra.(none)
+ [Bug 2332] Force reference to 'libgcc_s' when using GCC, because threading+restricted user+locked memory otherwise fails on Linux.
+
+ ChangeLog@1.1383 +2 -0
+ [Bug 2332] Force reference to 'libgcc_s' when using GCC, because threading+restricted user+locked memory otherwise fails on Linux.
+
+ sntp/m4/ntp_libntp.m4@1.24 +10 -0
+ [Bug 2332] Force reference to 'libgcc_s' when using GCC, because threading+restricted user+locked memory otherwise fails on Linux.
+
+ChangeSet@1.3047, 2014-01-01 08:25:27+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2060] Warn about restrictions with "kod" but not "limited"
+
+ ntpd/ntp_config.c@1.317 +7 -2
+ [Bug 2060] Warn about restrictions with "kod" but not "limited"
+
+ChangeSet@1.3046, 2014-01-01 05:51:07+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2060] Warn about restrictions with "kod" but not "limited"
+
+ ChangeLog@1.1382 +1 -0
+ [Bug 2060] Warn about restrictions with "kod" but not "limited"
+
+ ntpd/ntp_config.c@1.316 +9 -1
+ [Bug 2060] Warn about restrictions with "kod" but not "limited"
+
+ChangeSet@1.3045, 2013-12-29 13:02:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P408
+ TAG: NTP_4_2_7P408
+
+ ChangeLog@1.1381 +1 -0
+ NTP_4_2_7P408
+
+ ntpd/invoke-ntp.conf.texi@1.86 +1 -1
+ NTP_4_2_7P408
+
+ ntpd/invoke-ntp.keys.texi@1.84 +1 -1
+ NTP_4_2_7P408
+
+ ntpd/invoke-ntpd.texi@1.400 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntp.conf.5man@1.120 +7 -7
+ NTP_4_2_7P408
+
+ ntpd/ntp.conf.5mdoc@1.120 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntp.conf.html@1.81 +1 -1
+ NTP_4_2_7P408
+
+ ntpd/ntp.conf.man.in@1.120 +7 -7
+ NTP_4_2_7P408
+
+ ntpd/ntp.conf.mdoc.in@1.120 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntp.keys.5man@1.118 +3 -3
+ NTP_4_2_7P408
+
+ ntpd/ntp.keys.5mdoc@1.118 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntp.keys.html@1.82 +1 -1
+ NTP_4_2_7P408
+
+ ntpd/ntp.keys.man.in@1.118 +3 -3
+ NTP_4_2_7P408
+
+ ntpd/ntp.keys.mdoc.in@1.118 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntpd-opts.c@1.418 +7 -7
+ NTP_4_2_7P408
+
+ ntpd/ntpd-opts.h@1.418 +3 -3
+ NTP_4_2_7P408
+
+ ntpd/ntpd.1ntpdman@1.229 +7 -7
+ NTP_4_2_7P408
+
+ ntpd/ntpd.1ntpdmdoc@1.229 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntpd.html@1.76 +2 -2
+ NTP_4_2_7P408
+
+ ntpd/ntpd.man.in@1.229 +7 -7
+ NTP_4_2_7P408
+
+ ntpd/ntpd.mdoc.in@1.229 +2 -2
+ NTP_4_2_7P408
+
+ ntpdc/invoke-ntpdc.texi@1.397 +2 -2
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc-opts.c@1.412 +7 -7
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc-opts.h@1.412 +3 -3
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc.1ntpdcman@1.228 +6 -6
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.228 +1 -1
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc.html@1.241 +2 -2
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc.man.in@1.228 +6 -6
+ NTP_4_2_7P408
+
+ ntpdc/ntpdc.mdoc.in@1.228 +1 -1
+ NTP_4_2_7P408
+
+ ntpq/invoke-ntpq.texi@1.401 +2 -2
+ NTP_4_2_7P408
+
+ ntpq/ntpq-opts.c@1.415 +7 -7
+ NTP_4_2_7P408
+
+ ntpq/ntpq-opts.h@1.415 +3 -3
+ NTP_4_2_7P408
+
+ ntpq/ntpq.1ntpqman@1.229 +6 -6
+ NTP_4_2_7P408
+
+ ntpq/ntpq.1ntpqmdoc@1.229 +1 -1
+ NTP_4_2_7P408
+
+ ntpq/ntpq.html@1.73 +2 -2
+ NTP_4_2_7P408
+
+ ntpq/ntpq.man.in@1.229 +6 -6
+ NTP_4_2_7P408
+
+ ntpq/ntpq.mdoc.in@1.229 +1 -1
+ NTP_4_2_7P408
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.400 +2 -2
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.415 +7 -7
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.415 +3 -3
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.229 +7 -7
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.229 +2 -2
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd.html@1.71 +1 -1
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd.man.in@1.229 +7 -7
+ NTP_4_2_7P408
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.229 +2 -2
+ NTP_4_2_7P408
+
+ packageinfo.sh@1.412 +1 -1
+ NTP_4_2_7P408
+
+ scripts/invoke-plot_summary.texi@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/invoke-summary.texi@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.218 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntp-wait/ntp-wait.html@1.235 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.7 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntpsweep/ntpsweep.html@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.7 +1 -1
+ NTP_4_2_7P408
+
+ scripts/ntptrace/ntptrace.html@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/plot_summary.1plot_summaryman@1.8 +4 -4
+ NTP_4_2_7P408
+
+ scripts/plot_summary.1plot_summarymdoc@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/plot_summary.html@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/plot_summary.man.in@1.8 +4 -4
+ NTP_4_2_7P408
+
+ scripts/plot_summary.mdoc.in@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/summary.1summaryman@1.8 +4 -4
+ NTP_4_2_7P408
+
+ scripts/summary.1summarymdoc@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/summary.html@1.8 +1 -1
+ NTP_4_2_7P408
+
+ scripts/summary.man.in@1.8 +4 -4
+ NTP_4_2_7P408
+
+ scripts/summary.mdoc.in@1.8 +1 -1
+ NTP_4_2_7P408
+
+ sntp/invoke-sntp.texi@1.397 +2 -2
+ NTP_4_2_7P408
+
+ sntp/sntp-opts.c@1.412 +7 -7
+ NTP_4_2_7P408
+
+ sntp/sntp-opts.h@1.412 +3 -3
+ NTP_4_2_7P408
+
+ sntp/sntp.1sntpman@1.232 +7 -7
+ NTP_4_2_7P408
+
+ sntp/sntp.1sntpmdoc@1.232 +2 -2
+ NTP_4_2_7P408
+
+ sntp/sntp.html@1.412 +2 -2
+ NTP_4_2_7P408
+
+ sntp/sntp.man.in@1.232 +7 -7
+ NTP_4_2_7P408
+
+ sntp/sntp.mdoc.in@1.232 +2 -2
+ NTP_4_2_7P408
+
+ util/invoke-ntp-keygen.texi@1.401 +2 -2
+ NTP_4_2_7P408
+
+ util/ntp-keygen-opts.c@1.415 +7 -7
+ NTP_4_2_7P408
+
+ util/ntp-keygen-opts.h@1.415 +3 -3
+ NTP_4_2_7P408
+
+ util/ntp-keygen.1ntp-keygenman@1.229 +7 -7
+ NTP_4_2_7P408
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.229 +2 -2
+ NTP_4_2_7P408
+
+ util/ntp-keygen.html@1.77 +2 -2
+ NTP_4_2_7P408
+
+ util/ntp-keygen.man.in@1.229 +7 -7
+ NTP_4_2_7P408
+
+ util/ntp-keygen.mdoc.in@1.229 +2 -2
+ NTP_4_2_7P408
+
+ChangeSet@1.3042.1.1, 2013-12-29 11:41:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P407
+ TAG: NTP_4_2_7P407
+
+ ChangeLog@1.1378.1.1 +1 -0
+ NTP_4_2_7P407
+
+ ntpd/invoke-ntp.conf.texi@1.85 +1 -1
+ NTP_4_2_7P407
+
+ ntpd/invoke-ntp.keys.texi@1.83 +1 -1
+ NTP_4_2_7P407
+
+ ntpd/invoke-ntpd.texi@1.399 +2 -2
+ NTP_4_2_7P407
+
+ ntpd/ntp.conf.5man@1.119 +7 -7
+ NTP_4_2_7P407
+
+ ntpd/ntp.conf.5mdoc@1.119 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntp.conf.html@1.80 +1 -1
+ NTP_4_2_7P407
+
+ ntpd/ntp.conf.man.in@1.119 +7 -7
+ NTP_4_2_7P407
+
+ ntpd/ntp.conf.mdoc.in@1.119 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntp.keys.5man@1.117 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntp.keys.5mdoc@1.117 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntp.keys.html@1.81 +1 -1
+ NTP_4_2_7P407
+
+ ntpd/ntp.keys.man.in@1.117 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntp.keys.mdoc.in@1.117 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntpd-opts.c@1.417 +7 -7
+ NTP_4_2_7P407
+
+ ntpd/ntpd-opts.h@1.417 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntpd.1ntpdman@1.228 +7 -7
+ NTP_4_2_7P407
+
+ ntpd/ntpd.1ntpdmdoc@1.228 +3 -3
+ NTP_4_2_7P407
+
+ ntpd/ntpd.html@1.75 +2 -2
+ NTP_4_2_7P407
+
+ ntpd/ntpd.man.in@1.228 +7 -7
+ NTP_4_2_7P407
+
+ ntpd/ntpd.mdoc.in@1.228 +3 -3
+ NTP_4_2_7P407
+
+ ntpdc/invoke-ntpdc.texi@1.396 +2 -2
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc-opts.c@1.411 +7 -7
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc-opts.h@1.411 +3 -3
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc.1ntpdcman@1.227 +6 -6
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.227 +2 -2
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc.html@1.240 +2 -2
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc.man.in@1.227 +6 -6
+ NTP_4_2_7P407
+
+ ntpdc/ntpdc.mdoc.in@1.227 +2 -2
+ NTP_4_2_7P407
+
+ ntpq/invoke-ntpq.texi@1.400 +2 -2
+ NTP_4_2_7P407
+
+ ntpq/ntpq-opts.c@1.414 +7 -7
+ NTP_4_2_7P407
+
+ ntpq/ntpq-opts.h@1.414 +3 -3
+ NTP_4_2_7P407
+
+ ntpq/ntpq.1ntpqman@1.228 +6 -6
+ NTP_4_2_7P407
+
+ ntpq/ntpq.1ntpqmdoc@1.228 +2 -2
+ NTP_4_2_7P407
+
+ ntpq/ntpq.html@1.72 +2 -2
+ NTP_4_2_7P407
+
+ ntpq/ntpq.man.in@1.228 +6 -6
+ NTP_4_2_7P407
+
+ ntpq/ntpq.mdoc.in@1.228 +2 -2
+ NTP_4_2_7P407
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.399 +2 -2
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.414 +7 -7
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.414 +3 -3
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.228 +7 -7
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.228 +3 -3
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd.html@1.70 +1 -1
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd.man.in@1.228 +7 -7
+ NTP_4_2_7P407
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.228 +3 -3
+ NTP_4_2_7P407
+
+ packageinfo.sh@1.409.1.1 +1 -1
+ NTP_4_2_7P407
+
+ scripts/invoke-plot_summary.texi@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/invoke-summary.texi@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.217 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntp-wait/ntp-wait.html@1.234 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.6 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntpsweep/ntpsweep.html@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.6 +1 -1
+ NTP_4_2_7P407
+
+ scripts/ntptrace/ntptrace.html@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/plot_summary.1plot_summaryman@1.7 +6 -6
+ NTP_4_2_7P407
+
+ scripts/plot_summary.1plot_summarymdoc@1.7 +2 -2
+ NTP_4_2_7P407
+
+ scripts/plot_summary.html@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/plot_summary.man.in@1.7 +6 -6
+ NTP_4_2_7P407
+
+ scripts/plot_summary.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P407
+
+ scripts/summary.1summaryman@1.7 +6 -6
+ NTP_4_2_7P407
+
+ scripts/summary.1summarymdoc@1.7 +2 -2
+ NTP_4_2_7P407
+
+ scripts/summary.html@1.7 +1 -1
+ NTP_4_2_7P407
+
+ scripts/summary.man.in@1.7 +6 -6
+ NTP_4_2_7P407
+
+ scripts/summary.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P407
+
+ sntp/invoke-sntp.texi@1.396 +2 -2
+ NTP_4_2_7P407
+
+ sntp/sntp-opts.c@1.411 +7 -7
+ NTP_4_2_7P407
+
+ sntp/sntp-opts.h@1.411 +3 -3
+ NTP_4_2_7P407
+
+ sntp/sntp.1sntpman@1.231 +14 -14
+ NTP_4_2_7P407
+
+ sntp/sntp.1sntpmdoc@1.231 +3 -3
+ NTP_4_2_7P407
+
+ sntp/sntp.html@1.411 +2 -2
+ NTP_4_2_7P407
+
+ sntp/sntp.man.in@1.231 +14 -14
+ NTP_4_2_7P407
+
+ sntp/sntp.mdoc.in@1.231 +3 -3
+ NTP_4_2_7P407
+
+ util/invoke-ntp-keygen.texi@1.400 +2 -2
+ NTP_4_2_7P407
+
+ util/ntp-keygen-opts.c@1.414 +7 -7
+ NTP_4_2_7P407
+
+ util/ntp-keygen-opts.h@1.414 +3 -3
+ NTP_4_2_7P407
+
+ util/ntp-keygen.1ntp-keygenman@1.228 +7 -7
+ NTP_4_2_7P407
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.228 +3 -3
+ NTP_4_2_7P407
+
+ util/ntp-keygen.html@1.76 +2 -2
+ NTP_4_2_7P407
+
+ util/ntp-keygen.man.in@1.228 +7 -7
+ NTP_4_2_7P407
+
+ util/ntp-keygen.mdoc.in@1.228 +3 -3
+ NTP_4_2_7P407
+
+ChangeSet@1.3043, 2013-12-29 10:20:38+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2187] Update version number generation scripts
+
+ ChangeLog@1.1379 +1 -0
+ [Bug 2187] Update version number generation scripts
+
+ configure.ac@1.571 +1 -1
+ [Bug 2187] Update version number generation scripts
+
+ packageinfo.sh@1.410 +14 -1
+ [Bug 2187] Update version number generation scripts
+
+ scripts/build/VersionName@1.8 +7 -1
+ [Bug 2187] Update version number generation scripts
+
+ChangeSet@1.3042, 2013-12-29 07:55:28+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not need timegm() and the Solaris provides mktime()
+
+ ChangeLog@1.1378 +2 -0
+ [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not need timegm() and the Solaris provides mktime()
+
+ libntp/mktime.c@1.13 +3 -1
+ [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not need timegm() and the Solaris provides mktime()
+
+ChangeSet@1.3041, 2013-12-29 07:06:37+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility
+
+ ChangeLog@1.1377 +1 -0
+ [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility
+
+ ntpd/ntpd.c@1.152 +1 -4
+ [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility
+
+ChangeSet@1.3040, 2013-12-28 12:09:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P406
+ TAG: NTP_4_2_7P406
+
+ ChangeLog@1.1376 +1 -0
+ NTP_4_2_7P406
+
+ ntpd/invoke-ntp.conf.texi@1.84 +1 -1
+ NTP_4_2_7P406
+
+ ntpd/invoke-ntp.keys.texi@1.82 +1 -1
+ NTP_4_2_7P406
+
+ ntpd/invoke-ntpd.texi@1.398 +2 -2
+ NTP_4_2_7P406
+
+ ntpd/ntp.conf.5man@1.118 +7 -7
+ NTP_4_2_7P406
+
+ ntpd/ntp.conf.5mdoc@1.118 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntp.conf.html@1.79 +1 -1
+ NTP_4_2_7P406
+
+ ntpd/ntp.conf.man.in@1.118 +7 -7
+ NTP_4_2_7P406
+
+ ntpd/ntp.conf.mdoc.in@1.118 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntp.keys.5man@1.116 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntp.keys.5mdoc@1.116 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntp.keys.html@1.80 +1 -1
+ NTP_4_2_7P406
+
+ ntpd/ntp.keys.man.in@1.116 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntp.keys.mdoc.in@1.116 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntpd-opts.c@1.416 +7 -7
+ NTP_4_2_7P406
+
+ ntpd/ntpd-opts.h@1.416 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntpd.1ntpdman@1.227 +7 -7
+ NTP_4_2_7P406
+
+ ntpd/ntpd.1ntpdmdoc@1.227 +3 -3
+ NTP_4_2_7P406
+
+ ntpd/ntpd.html@1.74 +2 -2
+ NTP_4_2_7P406
+
+ ntpd/ntpd.man.in@1.227 +7 -7
+ NTP_4_2_7P406
+
+ ntpd/ntpd.mdoc.in@1.227 +3 -3
+ NTP_4_2_7P406
+
+ ntpdc/invoke-ntpdc.texi@1.395 +2 -2
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc-opts.c@1.410 +7 -7
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc-opts.h@1.410 +3 -3
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc.1ntpdcman@1.226 +6 -6
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.226 +2 -2
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc.html@1.239 +2 -2
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc.man.in@1.226 +6 -6
+ NTP_4_2_7P406
+
+ ntpdc/ntpdc.mdoc.in@1.226 +2 -2
+ NTP_4_2_7P406
+
+ ntpq/invoke-ntpq.texi@1.399 +2 -2
+ NTP_4_2_7P406
+
+ ntpq/ntpq-opts.c@1.413 +7 -7
+ NTP_4_2_7P406
+
+ ntpq/ntpq-opts.h@1.413 +3 -3
+ NTP_4_2_7P406
+
+ ntpq/ntpq.1ntpqman@1.227 +6 -6
+ NTP_4_2_7P406
+
+ ntpq/ntpq.1ntpqmdoc@1.227 +2 -2
+ NTP_4_2_7P406
+
+ ntpq/ntpq.html@1.71 +2 -2
+ NTP_4_2_7P406
+
+ ntpq/ntpq.man.in@1.227 +6 -6
+ NTP_4_2_7P406
+
+ ntpq/ntpq.mdoc.in@1.227 +2 -2
+ NTP_4_2_7P406
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.398 +2 -2
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.413 +7 -7
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.413 +3 -3
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.227 +7 -7
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.227 +3 -3
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd.html@1.69 +1 -1
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd.man.in@1.227 +7 -7
+ NTP_4_2_7P406
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.227 +3 -3
+ NTP_4_2_7P406
+
+ packageinfo.sh@1.409 +1 -1
+ NTP_4_2_7P406
+
+ scripts/invoke-plot_summary.texi@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/invoke-summary.texi@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.216 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntp-wait/ntp-wait.html@1.233 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.5 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntpsweep/ntpsweep.html@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.5 +1 -1
+ NTP_4_2_7P406
+
+ scripts/ntptrace/ntptrace.html@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/plot_summary.1plot_summaryman@1.6 +6 -6
+ NTP_4_2_7P406
+
+ scripts/plot_summary.1plot_summarymdoc@1.6 +2 -2
+ NTP_4_2_7P406
+
+ scripts/plot_summary.html@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/plot_summary.man.in@1.6 +6 -6
+ NTP_4_2_7P406
+
+ scripts/plot_summary.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P406
+
+ scripts/summary.1summaryman@1.6 +6 -6
+ NTP_4_2_7P406
+
+ scripts/summary.1summarymdoc@1.6 +2 -2
+ NTP_4_2_7P406
+
+ scripts/summary.html@1.6 +1 -1
+ NTP_4_2_7P406
+
+ scripts/summary.man.in@1.6 +6 -6
+ NTP_4_2_7P406
+
+ scripts/summary.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P406
+
+ sntp/invoke-sntp.texi@1.395 +2 -2
+ NTP_4_2_7P406
+
+ sntp/sntp-opts.c@1.410 +7 -7
+ NTP_4_2_7P406
+
+ sntp/sntp-opts.h@1.410 +3 -3
+ NTP_4_2_7P406
+
+ sntp/sntp.1sntpman@1.230 +14 -14
+ NTP_4_2_7P406
+
+ sntp/sntp.1sntpmdoc@1.230 +3 -3
+ NTP_4_2_7P406
+
+ sntp/sntp.html@1.410 +2 -2
+ NTP_4_2_7P406
+
+ sntp/sntp.man.in@1.230 +14 -14
+ NTP_4_2_7P406
+
+ sntp/sntp.mdoc.in@1.230 +3 -3
+ NTP_4_2_7P406
+
+ util/invoke-ntp-keygen.texi@1.399 +2 -2
+ NTP_4_2_7P406
+
+ util/ntp-keygen-opts.c@1.413 +7 -7
+ NTP_4_2_7P406
+
+ util/ntp-keygen-opts.h@1.413 +3 -3
+ NTP_4_2_7P406
+
+ util/ntp-keygen.1ntp-keygenman@1.227 +7 -7
+ NTP_4_2_7P406
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.227 +3 -3
+ NTP_4_2_7P406
+
+ util/ntp-keygen.html@1.75 +2 -2
+ NTP_4_2_7P406
+
+ util/ntp-keygen.man.in@1.227 +7 -7
+ NTP_4_2_7P406
+
+ util/ntp-keygen.mdoc.in@1.227 +3 -3
+ NTP_4_2_7P406
+
+ChangeSet@1.3039, 2013-12-28 11:47:47+00:00, harlan@chessie.everett.org
+ [Bug 2521] VPATH tweaks for perl -opts files
+
+ ChangeLog@1.1375 +1 -0
+ [Bug 2521] VPATH tweaks for perl -opts files
+
+ scripts/Makefile.am@1.36 +4 -4
+ [Bug 2521] VPATH tweaks for perl -opts files
+
+ChangeSet@1.3038, 2013-12-28 10:34:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P405
+ TAG: NTP_4_2_7P405
+
+ .point-changed-filelist@1.22 +3 -0
+ Updates for some of the new script invoke-* files
+
+ ChangeLog@1.1374 +1 -0
+ NTP_4_2_7P405
+
+ ntpd/invoke-ntp.conf.texi@1.83 +1 -1
+ NTP_4_2_7P405
+
+ ntpd/invoke-ntp.keys.texi@1.81 +1 -1
+ NTP_4_2_7P405
+
+ ntpd/invoke-ntpd.texi@1.397 +2 -2
+ NTP_4_2_7P405
+
+ ntpd/ntp.conf.5man@1.117 +7 -7
+ NTP_4_2_7P405
+
+ ntpd/ntp.conf.5mdoc@1.117 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntp.conf.html@1.78 +1 -1
+ NTP_4_2_7P405
+
+ ntpd/ntp.conf.man.in@1.117 +7 -7
+ NTP_4_2_7P405
+
+ ntpd/ntp.conf.mdoc.in@1.117 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntp.keys.5man@1.115 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntp.keys.5mdoc@1.115 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntp.keys.html@1.79 +1 -1
+ NTP_4_2_7P405
+
+ ntpd/ntp.keys.man.in@1.115 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntp.keys.mdoc.in@1.115 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntpd-opts.c@1.415 +7 -7
+ NTP_4_2_7P405
+
+ ntpd/ntpd-opts.h@1.415 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntpd.1ntpdman@1.226 +7 -7
+ NTP_4_2_7P405
+
+ ntpd/ntpd.1ntpdmdoc@1.226 +3 -3
+ NTP_4_2_7P405
+
+ ntpd/ntpd.html@1.73 +2 -2
+ NTP_4_2_7P405
+
+ ntpd/ntpd.man.in@1.226 +7 -7
+ NTP_4_2_7P405
+
+ ntpd/ntpd.mdoc.in@1.226 +3 -3
+ NTP_4_2_7P405
+
+ ntpdc/invoke-ntpdc.texi@1.394 +2 -2
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc-opts.c@1.409 +7 -7
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc-opts.h@1.409 +3 -3
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc.1ntpdcman@1.225 +13 -13
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.225 +2 -2
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc.html@1.238 +2 -2
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc.man.in@1.225 +13 -13
+ NTP_4_2_7P405
+
+ ntpdc/ntpdc.mdoc.in@1.225 +2 -2
+ NTP_4_2_7P405
+
+ ntpq/invoke-ntpq.texi@1.398 +2 -2
+ NTP_4_2_7P405
+
+ ntpq/ntpq-opts.c@1.412 +7 -7
+ NTP_4_2_7P405
+
+ ntpq/ntpq-opts.h@1.412 +3 -3
+ NTP_4_2_7P405
+
+ ntpq/ntpq.1ntpqman@1.226 +6 -6
+ NTP_4_2_7P405
+
+ ntpq/ntpq.1ntpqmdoc@1.226 +2 -2
+ NTP_4_2_7P405
+
+ ntpq/ntpq.html@1.70 +2 -2
+ NTP_4_2_7P405
+
+ ntpq/ntpq.man.in@1.226 +6 -6
+ NTP_4_2_7P405
+
+ ntpq/ntpq.mdoc.in@1.226 +2 -2
+ NTP_4_2_7P405
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.397 +2 -2
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.412 +7 -7
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.412 +3 -3
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.226 +7 -7
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.226 +3 -3
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd.html@1.68 +1 -1
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd.man.in@1.226 +7 -7
+ NTP_4_2_7P405
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.226 +3 -3
+ NTP_4_2_7P405
+
+ packageinfo.sh@1.408 +1 -1
+ NTP_4_2_7P405
+
+ scripts/invoke-plot_summary.texi@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/invoke-summary.texi@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.215 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntp-wait/ntp-wait.html@1.232 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.4 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntpsweep/ntpsweep.html@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.4 +1 -1
+ NTP_4_2_7P405
+
+ scripts/ntptrace/ntptrace.html@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/plot_summary.1plot_summaryman@1.5 +6 -6
+ NTP_4_2_7P405
+
+ scripts/plot_summary.1plot_summarymdoc@1.5 +2 -2
+ NTP_4_2_7P405
+
+ scripts/plot_summary.html@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/plot_summary.man.in@1.5 +6 -6
+ NTP_4_2_7P405
+
+ scripts/plot_summary.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P405
+
+ scripts/summary.1summaryman@1.5 +6 -6
+ NTP_4_2_7P405
+
+ scripts/summary.1summarymdoc@1.5 +2 -2
+ NTP_4_2_7P405
+
+ scripts/summary.html@1.5 +1 -1
+ NTP_4_2_7P405
+
+ scripts/summary.man.in@1.5 +6 -6
+ NTP_4_2_7P405
+
+ scripts/summary.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P405
+
+ sntp/invoke-sntp.texi@1.394 +2 -2
+ NTP_4_2_7P405
+
+ sntp/sntp-opts.c@1.409 +7 -7
+ NTP_4_2_7P405
+
+ sntp/sntp-opts.h@1.409 +3 -3
+ NTP_4_2_7P405
+
+ sntp/sntp.1sntpman@1.229 +7 -7
+ NTP_4_2_7P405
+
+ sntp/sntp.1sntpmdoc@1.229 +3 -3
+ NTP_4_2_7P405
+
+ sntp/sntp.html@1.409 +2 -2
+ NTP_4_2_7P405
+
+ sntp/sntp.man.in@1.229 +7 -7
+ NTP_4_2_7P405
+
+ sntp/sntp.mdoc.in@1.229 +3 -3
+ NTP_4_2_7P405
+
+ util/invoke-ntp-keygen.texi@1.398 +2 -2
+ NTP_4_2_7P405
+
+ util/ntp-keygen-opts.c@1.412 +7 -7
+ NTP_4_2_7P405
+
+ util/ntp-keygen-opts.h@1.412 +3 -3
+ NTP_4_2_7P405
+
+ util/ntp-keygen.1ntp-keygenman@1.226 +7 -7
+ NTP_4_2_7P405
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.226 +3 -3
+ NTP_4_2_7P405
+
+ util/ntp-keygen.html@1.74 +2 -2
+ NTP_4_2_7P405
+
+ util/ntp-keygen.man.in@1.226 +7 -7
+ NTP_4_2_7P405
+
+ util/ntp-keygen.mdoc.in@1.226 +3 -3
+ NTP_4_2_7P405
+
+ChangeSet@1.3037, 2013-12-27 03:50:46-05:00, stenn@deacon.udel.edu
+ [Bug 2521] bootstrap script needs a tweak for perl *-opts files
+
+ ChangeLog@1.1373 +1 -0
+ [Bug 2521] bootstrap script needs a tweak for perl *-opts files
+
+ bootstrap@1.43 +1 -1
+ [Bug 2521] bootstrap script needs a tweak for perl *-opts files
+
+ChangeSet@1.3036, 2013-12-27 05:51:12+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ ChangeLog@1.1372 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ ChangeLog@1.1371 +1 -0
+ [Bug 2526] Add "noinst" support to the sntp/loc/ framework
+
+ scripts/ntpsweep/Makefile.am@1.5 +12 -2
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/README@1.2 +2 -1
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/darwin@1.2 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/debian@1.3 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/freebsd@1.5 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/legacy@1.6 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/netbsd@1.2 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/redhat@1.4 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/loc/solaris@1.5 +1 -0
+ [Bug 2524] Add ntpsweep to sntp/loc/* files
+
+ sntp/m4/ntp_locinfo.m4@1.17 +21 -0
+ [Bug 2526] Add "noinst" support to the sntp/loc/ framework
+
+ sntp/scripts/genLocInfo@1.17 +16 -4
+ [Bug 2526] Add "noinst" support to the sntp/loc/ framework
+
+ChangeSet@1.3035, 2013-12-24 11:40:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P404
+ TAG: NTP_4_2_7P404
+
+ ChangeLog@1.1370 +1 -0
+ NTP_4_2_7P404
+
+ ntpd/invoke-ntp.conf.texi@1.82 +1 -1
+ NTP_4_2_7P404
+
+ ntpd/invoke-ntp.keys.texi@1.80 +1 -1
+ NTP_4_2_7P404
+
+ ntpd/invoke-ntpd.texi@1.396 +2 -2
+ NTP_4_2_7P404
+
+ ntpd/ntp.conf.5man@1.116 +7 -7
+ NTP_4_2_7P404
+
+ ntpd/ntp.conf.5mdoc@1.116 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntp.conf.html@1.77 +1 -1
+ NTP_4_2_7P404
+
+ ntpd/ntp.conf.man.in@1.116 +7 -7
+ NTP_4_2_7P404
+
+ ntpd/ntp.conf.mdoc.in@1.116 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntp.keys.5man@1.114 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntp.keys.5mdoc@1.114 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntp.keys.html@1.78 +1 -1
+ NTP_4_2_7P404
+
+ ntpd/ntp.keys.man.in@1.114 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntp.keys.mdoc.in@1.114 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntpd-opts.c@1.414 +7 -7
+ NTP_4_2_7P404
+
+ ntpd/ntpd-opts.h@1.414 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntpd.1ntpdman@1.225 +7 -7
+ NTP_4_2_7P404
+
+ ntpd/ntpd.1ntpdmdoc@1.225 +3 -3
+ NTP_4_2_7P404
+
+ ntpd/ntpd.html@1.72 +2 -2
+ NTP_4_2_7P404
+
+ ntpd/ntpd.man.in@1.225 +7 -7
+ NTP_4_2_7P404
+
+ ntpd/ntpd.mdoc.in@1.225 +3 -3
+ NTP_4_2_7P404
+
+ ntpdc/invoke-ntpdc.texi@1.393 +2 -2
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc-opts.c@1.408 +7 -7
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc-opts.h@1.408 +3 -3
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc.1ntpdcman@1.224 +13 -13
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.224 +2 -2
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc.html@1.237 +2 -2
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc.man.in@1.224 +13 -13
+ NTP_4_2_7P404
+
+ ntpdc/ntpdc.mdoc.in@1.224 +2 -2
+ NTP_4_2_7P404
+
+ ntpq/invoke-ntpq.texi@1.397 +2 -2
+ NTP_4_2_7P404
+
+ ntpq/ntpq-opts.c@1.411 +7 -7
+ NTP_4_2_7P404
+
+ ntpq/ntpq-opts.h@1.411 +3 -3
+ NTP_4_2_7P404
+
+ ntpq/ntpq.1ntpqman@1.225 +13 -13
+ NTP_4_2_7P404
+
+ ntpq/ntpq.1ntpqmdoc@1.225 +2 -2
+ NTP_4_2_7P404
+
+ ntpq/ntpq.html@1.69 +2 -2
+ NTP_4_2_7P404
+
+ ntpq/ntpq.man.in@1.225 +13 -13
+ NTP_4_2_7P404
+
+ ntpq/ntpq.mdoc.in@1.225 +2 -2
+ NTP_4_2_7P404
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.396 +2 -2
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.411 +7 -7
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.411 +3 -3
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.225 +7 -7
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.225 +3 -3
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd.html@1.67 +1 -1
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd.man.in@1.225 +7 -7
+ NTP_4_2_7P404
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.225 +3 -3
+ NTP_4_2_7P404
+
+ packageinfo.sh@1.407 +1 -1
+ NTP_4_2_7P404
+
+ scripts/invoke-plot_summary.texi@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/invoke-summary.texi@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/ntp-wait/ntp-wait.html@1.231 +1 -1
+ NTP_4_2_7P404
+
+ scripts/ntpsweep/ntpsweep.html@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/ntptrace/ntptrace.html@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/plot_summary.1plot_summaryman@1.4 +6 -6
+ NTP_4_2_7P404
+
+ scripts/plot_summary.1plot_summarymdoc@1.4 +2 -2
+ NTP_4_2_7P404
+
+ scripts/plot_summary.html@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/plot_summary.man.in@1.4 +6 -6
+ NTP_4_2_7P404
+
+ scripts/plot_summary.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P404
+
+ scripts/summary.1summaryman@1.4 +6 -6
+ NTP_4_2_7P404
+
+ scripts/summary.1summarymdoc@1.4 +2 -2
+ NTP_4_2_7P404
+
+ scripts/summary.html@1.4 +1 -1
+ NTP_4_2_7P404
+
+ scripts/summary.man.in@1.4 +6 -6
+ NTP_4_2_7P404
+
+ scripts/summary.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P404
+
+ sntp/invoke-sntp.texi@1.393 +2 -2
+ NTP_4_2_7P404
+
+ sntp/sntp-opts.c@1.408 +7 -7
+ NTP_4_2_7P404
+
+ sntp/sntp-opts.h@1.408 +3 -3
+ NTP_4_2_7P404
+
+ sntp/sntp.1sntpman@1.228 +7 -7
+ NTP_4_2_7P404
+
+ sntp/sntp.1sntpmdoc@1.228 +3 -3
+ NTP_4_2_7P404
+
+ sntp/sntp.html@1.408 +2 -2
+ NTP_4_2_7P404
+
+ sntp/sntp.man.in@1.228 +7 -7
+ NTP_4_2_7P404
+
+ sntp/sntp.mdoc.in@1.228 +3 -3
+ NTP_4_2_7P404
+
+ util/invoke-ntp-keygen.texi@1.397 +2 -2
+ NTP_4_2_7P404
+
+ util/ntp-keygen-opts.c@1.411 +7 -7
+ NTP_4_2_7P404
+
+ util/ntp-keygen-opts.h@1.411 +3 -3
+ NTP_4_2_7P404
+
+ util/ntp-keygen.1ntp-keygenman@1.225 +7 -7
+ NTP_4_2_7P404
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.225 +3 -3
+ NTP_4_2_7P404
+
+ util/ntp-keygen.html@1.73 +2 -2
+ NTP_4_2_7P404
+
+ util/ntp-keygen.man.in@1.225 +7 -7
+ NTP_4_2_7P404
+
+ util/ntp-keygen.mdoc.in@1.225 +3 -3
+ NTP_4_2_7P404
+
+ChangeSet@1.3034, 2013-12-24 09:49:09+00:00, stenn@psp-deb1.ntp.org
+ [Bug 135] AIX5: "Address already in use" for IPv6 wildcard
+
+ ChangeLog@1.1369 +1 -0
+ [Bug 135] AIX5: "Address already in use" for IPv6 wildcard
+
+ ntpd/ntp_io.c@1.388 +159 -159
+ [Bug 135] AIX5: "Address already in use" for IPv6 wildcard
+
+ChangeSet@1.3033, 2013-12-23 11:39:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P403
+ TAG: NTP_4_2_7P403
+
+ ChangeLog@1.1368 +1 -0
+ NTP_4_2_7P403
+
+ ntpd/invoke-ntp.conf.texi@1.81 +1 -1
+ NTP_4_2_7P403
+
+ ntpd/invoke-ntp.keys.texi@1.79 +1 -1
+ NTP_4_2_7P403
+
+ ntpd/invoke-ntpd.texi@1.395 +2 -2
+ NTP_4_2_7P403
+
+ ntpd/ntp.conf.5man@1.115 +7 -7
+ NTP_4_2_7P403
+
+ ntpd/ntp.conf.5mdoc@1.115 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntp.conf.html@1.76 +1211 -139
+ NTP_4_2_7P403
+
+ ntpd/ntp.conf.man.in@1.115 +7 -7
+ NTP_4_2_7P403
+
+ ntpd/ntp.conf.mdoc.in@1.115 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntp.keys.5man@1.113 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntp.keys.5mdoc@1.113 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntp.keys.html@1.77 +2 -2
+ NTP_4_2_7P403
+
+ ntpd/ntp.keys.man.in@1.113 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntp.keys.mdoc.in@1.113 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntpd-opts.c@1.413 +7 -7
+ NTP_4_2_7P403
+
+ ntpd/ntpd-opts.h@1.413 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntpd.1ntpdman@1.224 +7 -7
+ NTP_4_2_7P403
+
+ ntpd/ntpd.1ntpdmdoc@1.224 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntpd.html@1.71 +3 -3
+ NTP_4_2_7P403
+
+ ntpd/ntpd.man.in@1.224 +7 -7
+ NTP_4_2_7P403
+
+ ntpd/ntpd.mdoc.in@1.224 +3 -3
+ NTP_4_2_7P403
+
+ ntpdc/invoke-ntpdc.texi@1.392 +2 -2
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc-opts.c@1.407 +7 -7
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc-opts.h@1.407 +3 -3
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc.1ntpdcman@1.223 +6 -6
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.223 +2 -2
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc.html@1.236 +2 -2
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc.man.in@1.223 +6 -6
+ NTP_4_2_7P403
+
+ ntpdc/ntpdc.mdoc.in@1.223 +2 -2
+ NTP_4_2_7P403
+
+ ntpq/invoke-ntpq.texi@1.396 +2 -2
+ NTP_4_2_7P403
+
+ ntpq/ntpq-opts.c@1.410 +7 -7
+ NTP_4_2_7P403
+
+ ntpq/ntpq-opts.h@1.410 +3 -3
+ NTP_4_2_7P403
+
+ ntpq/ntpq.1ntpqman@1.224 +13 -13
+ NTP_4_2_7P403
+
+ ntpq/ntpq.1ntpqmdoc@1.224 +2 -2
+ NTP_4_2_7P403
+
+ ntpq/ntpq.html@1.68 +30 -57
+ NTP_4_2_7P403
+
+ ntpq/ntpq.man.in@1.224 +13 -13
+ NTP_4_2_7P403
+
+ ntpq/ntpq.mdoc.in@1.224 +2 -2
+ NTP_4_2_7P403
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.395 +2 -2
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.410 +7 -7
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.410 +3 -3
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.224 +14 -14
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.224 +3 -3
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd.html@1.66 +1 -1
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd.man.in@1.224 +14 -14
+ NTP_4_2_7P403
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.224 +3 -3
+ NTP_4_2_7P403
+
+ packageinfo.sh@1.406 +1 -1
+ NTP_4_2_7P403
+
+ scripts/invoke-plot_summary.texi@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/invoke-summary.texi@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/ntp-wait/ntp-wait.html@1.230 +1 -1
+ NTP_4_2_7P403
+
+ scripts/ntpsweep/ntpsweep.html@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/ntptrace/ntptrace.html@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/plot_summary.1plot_summaryman@1.3 +6 -6
+ NTP_4_2_7P403
+
+ scripts/plot_summary.1plot_summarymdoc@1.3 +3 -3
+ NTP_4_2_7P403
+
+ scripts/plot_summary.html@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/plot_summary.man.in@1.3 +6 -6
+ NTP_4_2_7P403
+
+ scripts/plot_summary.mdoc.in@1.3 +3 -3
+ NTP_4_2_7P403
+
+ scripts/summary.1summaryman@1.3 +6 -6
+ NTP_4_2_7P403
+
+ scripts/summary.1summarymdoc@1.3 +2 -2
+ NTP_4_2_7P403
+
+ scripts/summary.html@1.3 +1 -1
+ NTP_4_2_7P403
+
+ scripts/summary.man.in@1.3 +6 -6
+ NTP_4_2_7P403
+
+ scripts/summary.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P403
+
+ sntp/invoke-sntp.texi@1.392 +2 -2
+ NTP_4_2_7P403
+
+ sntp/sntp-opts.c@1.407 +7 -7
+ NTP_4_2_7P403
+
+ sntp/sntp-opts.h@1.407 +3 -3
+ NTP_4_2_7P403
+
+ sntp/sntp.1sntpman@1.227 +14 -14
+ NTP_4_2_7P403
+
+ sntp/sntp.1sntpmdoc@1.227 +3 -3
+ NTP_4_2_7P403
+
+ sntp/sntp.html@1.407 +2 -2
+ NTP_4_2_7P403
+
+ sntp/sntp.man.in@1.227 +14 -14
+ NTP_4_2_7P403
+
+ sntp/sntp.mdoc.in@1.227 +3 -3
+ NTP_4_2_7P403
+
+ util/invoke-ntp-keygen.texi@1.396 +2 -2
+ NTP_4_2_7P403
+
+ util/ntp-keygen-opts.c@1.410 +7 -7
+ NTP_4_2_7P403
+
+ util/ntp-keygen-opts.h@1.410 +3 -3
+ NTP_4_2_7P403
+
+ util/ntp-keygen.1ntp-keygenman@1.224 +7 -7
+ NTP_4_2_7P403
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.224 +3 -3
+ NTP_4_2_7P403
+
+ util/ntp-keygen.html@1.72 +60 -95
+ NTP_4_2_7P403
+
+ util/ntp-keygen.man.in@1.224 +7 -7
+ NTP_4_2_7P403
+
+ util/ntp-keygen.mdoc.in@1.224 +3 -3
+ NTP_4_2_7P403
+
+ChangeSet@1.3032, 2013-12-23 03:03:25-05:00, stenn@deacon.udel.edu
+ [Bug 2513] Remove any PIDFILE in finish()
+
+ ChangeLog@1.1367 +1 -0
+ [Bug 2513] Remove any PIDFILE in finish()
+
+ ntpd/ntpd.c@1.151 +4 -0
+ [Bug 2513] Remove any PIDFILE in finish()
+
+ChangeSet@1.3031, 2013-12-23 07:22:20+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2517] Fix peer status errors in decode.html
+
+ ChangeLog@1.1366 +1 -0
+ [Bug 2517] Fix peer status errors in decode.html
+
+ html/decode.html@1.22 +4 -4
+ [Bug 2517] Fix peer status errors in decode.html
+
+ChangeSet@1.3030, 2013-12-23 07:03:41+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2516] Enable clock_gettime() support for AIX 5+
+
+ ChangeLog@1.1365 +1 -0
+ [Bug 2516] Enable clock_gettime() support for AIX 5+
+
+ sntp/m4/ntp_libntp.m4@1.23 +7 -2
+ [Bug 2516] Enable clock_gettime() support for AIX 5+
+
+ChangeSet@1.3029, 2013-12-23 02:44:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P402
+ TAG: NTP_4_2_7P402
+
+ .point-changed-filelist@1.21 +15 -6
+ updated point changed list
+
+ ChangeLog@1.1364 +1 -0
+ NTP_4_2_7P402
+
+ ntpd/invoke-ntp.conf.texi@1.80 +117 -230
+ NTP_4_2_7P402
+
+ ntpd/invoke-ntp.keys.texi@1.78 +2 -4
+ NTP_4_2_7P402
+
+ ntpd/invoke-ntpd.texi@1.394 +3 -3
+ NTP_4_2_7P402
+
+ ntpd/ntp.conf.5man@1.114 +985 -953
+ NTP_4_2_7P402
+
+ ntpd/ntp.conf.5mdoc@1.114 +6 -6
+ NTP_4_2_7P402
+
+ ntpd/ntp.conf.html@1.75 +1 -1
+ NTP_4_2_7P402
+
+ ntpd/ntp.conf.man.in@1.114 +985 -953
+ NTP_4_2_7P402
+
+ ntpd/ntp.conf.mdoc.in@1.114 +6 -6
+ NTP_4_2_7P402
+
+ ntpd/ntp.keys.5man@1.112 +93 -47
+ NTP_4_2_7P402
+
+ ntpd/ntp.keys.5mdoc@1.112 +10 -6
+ NTP_4_2_7P402
+
+ ntpd/ntp.keys.html@1.76 +1 -1
+ NTP_4_2_7P402
+
+ ntpd/ntp.keys.man.in@1.112 +93 -47
+ NTP_4_2_7P402
+
+ ntpd/ntp.keys.mdoc.in@1.112 +10 -6
+ NTP_4_2_7P402
+
+ ntpd/ntpd-opts.c@1.412 +7 -7
+ NTP_4_2_7P402
+
+ ntpd/ntpd-opts.h@1.412 +3 -3
+ NTP_4_2_7P402
+
+ ntpd/ntpd.1ntpdman@1.223 +282 -209
+ NTP_4_2_7P402
+
+ ntpd/ntpd.1ntpdmdoc@1.223 +42 -42
+ NTP_4_2_7P402
+
+ ntpd/ntpd.html@1.70 +2 -2
+ NTP_4_2_7P402
+
+ ntpd/ntpd.man.in@1.223 +282 -209
+ NTP_4_2_7P402
+
+ ntpd/ntpd.mdoc.in@1.223 +42 -42
+ NTP_4_2_7P402
+
+ ntpdc/invoke-ntpdc.texi@1.391 +3 -3
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc-opts.c@1.406 +7 -7
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc-opts.h@1.406 +3 -3
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc.1ntpdcman@1.222 +306 -289
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.222 +19 -19
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc.html@1.235 +3 -3
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc.man.in@1.222 +306 -289
+ NTP_4_2_7P402
+
+ ntpdc/ntpdc.mdoc.in@1.222 +19 -19
+ NTP_4_2_7P402
+
+ ntpq/invoke-ntpq.texi@1.395 +24 -36
+ NTP_4_2_7P402
+
+ ntpq/ntpq-opts.c@1.409 +7 -7
+ NTP_4_2_7P402
+
+ ntpq/ntpq-opts.h@1.409 +3 -3
+ NTP_4_2_7P402
+
+ ntpq/ntpq.1ntpqman@1.223 +165 -117
+ NTP_4_2_7P402
+
+ ntpq/ntpq.1ntpqmdoc@1.223 +18 -18
+ NTP_4_2_7P402
+
+ ntpq/ntpq.html@1.67 +2 -2
+ NTP_4_2_7P402
+
+ ntpq/ntpq.man.in@1.223 +165 -117
+ NTP_4_2_7P402
+
+ ntpq/ntpq.mdoc.in@1.223 +18 -18
+ NTP_4_2_7P402
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.394 +2 -2
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.409 +7 -7
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.409 +3 -3
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.223 +126 -66
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.223 +16 -14
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd.html@1.65 +1 -1
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd.man.in@1.223 +126 -66
+ NTP_4_2_7P402
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.223 +16 -14
+ NTP_4_2_7P402
+
+ packageinfo.sh@1.405 +1 -1
+ NTP_4_2_7P402
+
+ scripts/invoke-plot_summary.texi@1.2 +1 -1
+ NTP_4_2_7P402
+
+ scripts/invoke-summary.texi@1.2 +1 -1
+ NTP_4_2_7P402
+
+ scripts/ntp-wait/ntp-wait.html@1.229 +30 -48
+ NTP_4_2_7P402
+
+ scripts/ntpsweep/Makefile.am@1.4 +3 -0
+ cleanup
+
+ scripts/ntpsweep/ntpsweep.html@1.2 +32 -43
+ NTP_4_2_7P402
+
+ scripts/ntptrace/ntptrace.html@1.2 +26 -35
+ NTP_4_2_7P402
+
+ scripts/plot_summary.1plot_summaryman@1.2 +32 -2
+ NTP_4_2_7P402
+
+ scripts/plot_summary.1plot_summarymdoc@1.2 +22 -2
+ NTP_4_2_7P402
+
+ scripts/plot_summary.html@1.2 +28 -46
+ NTP_4_2_7P402
+
+ scripts/plot_summary.man.in@1.2 +32 -2
+ NTP_4_2_7P402
+
+ scripts/plot_summary.mdoc.in@1.2 +22 -2
+ NTP_4_2_7P402
+
+ scripts/summary.1summaryman@1.2 +31 -2
+ NTP_4_2_7P402
+
+ scripts/summary.1summarymdoc@1.2 +21 -2
+ NTP_4_2_7P402
+
+ scripts/summary.html@1.2 +26 -38
+ NTP_4_2_7P402
+
+ scripts/summary.man.in@1.2 +31 -2
+ NTP_4_2_7P402
+
+ scripts/summary.mdoc.in@1.2 +21 -2
+ NTP_4_2_7P402
+
+ sntp/invoke-sntp.texi@1.391 +7 -7
+ NTP_4_2_7P402
+
+ sntp/sntp-opts.c@1.406 +7 -7
+ NTP_4_2_7P402
+
+ sntp/sntp-opts.h@1.406 +3 -3
+ NTP_4_2_7P402
+
+ sntp/sntp.1sntpman@1.226 +119 -70
+ NTP_4_2_7P402
+
+ sntp/sntp.1sntpmdoc@1.226 +46 -34
+ NTP_4_2_7P402
+
+ sntp/sntp.html@1.406 +7 -7
+ NTP_4_2_7P402
+
+ sntp/sntp.man.in@1.226 +119 -70
+ NTP_4_2_7P402
+
+ sntp/sntp.mdoc.in@1.226 +46 -34
+ NTP_4_2_7P402
+
+ util/invoke-ntp-keygen.texi@1.395 +28 -50
+ NTP_4_2_7P402
+
+ util/ntp-keygen-opts.c@1.409 +7 -7
+ NTP_4_2_7P402
+
+ util/ntp-keygen-opts.h@1.409 +3 -3
+ NTP_4_2_7P402
+
+ util/ntp-keygen.1ntp-keygenman@1.223 +397 -270
+ NTP_4_2_7P402
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.223 +37 -33
+ NTP_4_2_7P402
+
+ util/ntp-keygen.html@1.71 +2 -2
+ NTP_4_2_7P402
+
+ util/ntp-keygen.man.in@1.223 +397 -270
+ NTP_4_2_7P402
+
+ util/ntp-keygen.mdoc.in@1.223 +37 -33
+ NTP_4_2_7P402
+
+ChangeSet@1.3028, 2013-12-22 10:28:11+00:00, stenn@psp-fb1.ntp.org
+ Create doc framework for summary and plot_summary
+
+ scripts/Makefile.am@1.35 +120 -9
+ Create doc framework for summary and plot_summary
+
+ scripts/invoke-plot_summary.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/invoke-plot_summary.menu
+
+ scripts/invoke-plot_summary.menu@1.0 +0 -0
+
+ scripts/invoke-plot_summary.texi@1.1 +121 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/invoke-plot_summary.texi
+
+ scripts/invoke-plot_summary.texi@1.0 +0 -0
+
+ scripts/invoke-summary.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/invoke-summary.menu
+
+ scripts/invoke-summary.menu@1.0 +0 -0
+
+ scripts/invoke-summary.texi@1.1 +103 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/invoke-summary.texi
+
+ scripts/invoke-summary.texi@1.0 +0 -0
+
+ scripts/ntptrace/Makefile.am@1.4 +2 -2
+ fix typos in ntptrace/Makefile.am
+
+ scripts/plot_summary.1plot_summaryman@1.1 +109 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.1plot_summaryman
+
+ scripts/plot_summary.1plot_summaryman@1.0 +0 -0
+
+ scripts/plot_summary.1plot_summarymdoc@1.1 +84 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.1plot_summarymdoc
+
+ scripts/plot_summary.1plot_summarymdoc@1.0 +0 -0
+
+ scripts/plot_summary.html@1.1 +225 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.html
+
+ scripts/plot_summary.html@1.0 +0 -0
+
+ scripts/plot_summary.man.in@1.1 +109 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.man.in
+
+ scripts/plot_summary.man.in@1.0 +0 -0
+
+ scripts/plot_summary.mdoc.in@1.1 +84 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.mdoc.in
+
+ scripts/plot_summary.mdoc.in@1.0 +0 -0
+
+ scripts/plot_summary.texi@1.1 +40 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary.texi
+
+ scripts/plot_summary.texi@1.0 +0 -0
+
+ scripts/summary.1summaryman@1.1 +118 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.1summaryman
+
+ scripts/summary.1summaryman@1.0 +0 -0
+
+ scripts/summary.1summarymdoc@1.1 +94 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.1summarymdoc
+
+ scripts/summary.1summarymdoc@1.0 +0 -0
+
+ scripts/summary.html@1.1 +194 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.html
+
+ scripts/summary.html@1.0 +0 -0
+
+ scripts/summary.man.in@1.1 +118 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.man.in
+
+ scripts/summary.man.in@1.0 +0 -0
+
+ scripts/summary.mdoc.in@1.1 +94 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.mdoc.in
+
+ scripts/summary.mdoc.in@1.0 +0 -0
+
+ scripts/summary.texi@1.1 +40 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary.texi
+
+ scripts/summary.texi@1.0 +0 -0
+
+ChangeSet@1.3027, 2013-12-21 10:12:36+00:00, stenn@psp-fb1.ntp.org
+ More build cleanup around Oliver's GSoC project
+
+ scripts/Makefile.am@1.34 +4 -0
+ More build cleanup around Oliver's GSoC project
+
+ scripts/calc_tickadj/Makefile.am@1.5 +11 -8
+ More build cleanup around Oliver's GSoC project
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.1 +103 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.man.in
+
+ scripts/calc_tickadj/calc_tickadj.man.in@1.0 +0 -0
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.3 +1 -1
+ More build cleanup around Oliver's GSoC project
+
+ scripts/lib/Makefile.am@1.2 +1 -1
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntp-wait/Makefile.am@1.3 +24 -27
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.214 +1 -1
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntpsweep/Makefile.am@1.3 +34 -36
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.3 +1 -1
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntpsweep/ntpsweep.man.in@1.1 +92 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.man.in
+
+ scripts/ntpsweep/ntpsweep.man.in@1.0 +0 -0
+
+ scripts/ntptrace/Makefile.am@1.3 +26 -27
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.3 +1 -1
+ More build cleanup around Oliver's GSoC project
+
+ scripts/ntptrace/ntptrace.man.in@1.1 +109 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.man.in
+
+ scripts/ntptrace/ntptrace.man.in@1.0 +0 -0
+
+ChangeSet@1.3026, 2013-12-19 11:47:46+00:00, stenn@psp-fb1.ntp.org
+ calc_tickadj man page generation fixes
+
+ scripts/calc_tickadj/Makefile.am@1.4 +2 -1
+ calc_tickadj man page generation fixes
+
+ sntp/m4/ntp_locinfo.m4@1.16 +2 -0
+ calc_tickadj man page generation fixes
+
+ChangeSet@1.3025, 2013-12-19 09:27:41+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ scripts/calc_tickadj/Makefile.am@1.3 +26 -21
+ cleanup
+
+ChangeSet@1.3024, 2013-12-19 07:56:15+00:00, stenn@psp-fb1.ntp.org
+ automake cleanup for Oliver's work
+
+ configure.ac@1.570 +4 -0
+ automake cleanup for Oliver's work
+
+ scripts/Makefile.am@1.33 +8 -2
+ automake cleanup for Oliver's work
+
+ scripts/calc_tickadj/Makefile.am@1.2 +8 -7
+ automake cleanup for Oliver's work
+
+ scripts/calc_tickadj/calc_tickadj.texi@1.2 +1 -1
+ automake cleanup for Oliver's work
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.2 +1 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntp-wait/Makefile.am@1.2 +27 -26
+ automake cleanup for Oliver's work
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.213 +1 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntp-wait/ntp-wait.in@1.11 +0 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntpsweep/Makefile.am@1.2 +23 -22
+ automake cleanup for Oliver's work
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.2 +1 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntpsweep/ntpsweep.in@1.8 +0 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntptrace/Makefile.am@1.2 +5 -7
+ automake cleanup for Oliver's work
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.2 +1 -1
+ automake cleanup for Oliver's work
+
+ scripts/ntptrace/ntptrace.in@1.12 +0 -1
+ automake cleanup for Oliver's work
+
+ sntp/loc/debian@1.2 +1 -0
+ automake cleanup for Oliver's work
+
+ sntp/loc/legacy@1.5 +1 -0
+ automake cleanup for Oliver's work
+
+ sntp/loc/redhat@1.3 +1 -0
+ automake cleanup for Oliver's work
+
+ sntp/loc/solaris@1.4 +1 -0
+ automake cleanup for Oliver's work
+
+ sntp/m4/ntp_locinfo.m4@1.15 +4 -0
+ automake cleanup for Oliver's work
+
+ChangeSet@1.3023, 2013-12-18 11:09:54+00:00, stenn@psp-fb1.ntp.org
+ updates
+
+ configure.ac@1.569 +6 -6
+ fix *_opts variables
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.1 +103 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.1 +80 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
+
+ scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj.html@1.1 +178 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.html
+
+ scripts/calc_tickadj/calc_tickadj.html@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.1 +80 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.mdoc.in
+
+ scripts/calc_tickadj/calc_tickadj.mdoc.in@1.0 +0 -0
+
+ scripts/calc_tickadj/invoke-calc_tickadj.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/invoke-calc_tickadj.menu
+
+ scripts/calc_tickadj/invoke-calc_tickadj.menu@1.0 +0 -0
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.1 +102 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/invoke-calc_tickadj.texi
+
+ scripts/calc_tickadj/invoke-calc_tickadj.texi@1.0 +0 -0
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.212 +32 -64
+ updates
+
+ scripts/ntp-wait/ntp-wait.html@1.228 +85 -117
+ updates
+
+ scripts/ntp-wait/ntp-wait.in@1.10 +2 -0
+ updates
+
+ scripts/ntpsweep/invoke-ntpsweep.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/invoke-ntpsweep.menu
+
+ scripts/ntpsweep/invoke-ntpsweep.menu@1.0 +0 -0
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.1 +118 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/invoke-ntpsweep.texi
+
+ scripts/ntpsweep/invoke-ntpsweep.texi@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.1 +92 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.1ntpsweepman
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepman@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.1 +71 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
+
+ scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.html@1.1 +212 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.html
+
+ scripts/ntpsweep/ntpsweep.html@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.in@1.7 +2 -0
+ updates
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.2 +2 -2
+ updates
+
+ scripts/ntptrace/invoke-ntptrace.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/invoke-ntptrace.menu
+
+ scripts/ntptrace/invoke-ntptrace.menu@1.0 +0 -0
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.1 +109 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/invoke-ntptrace.texi
+
+ scripts/ntptrace/invoke-ntptrace.texi@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.1 +109 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.1ntptraceman
+
+ scripts/ntptrace/ntptrace.1ntptraceman@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.1 +87 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.1ntptracemdoc
+
+ scripts/ntptrace/ntptrace.1ntptracemdoc@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.html@1.1 +189 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.html
+
+ scripts/ntptrace/ntptrace.html@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.in@1.11 +2 -0
+ updates
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.2 +2 -2
+ updates
+
+ChangeSet@1.3020.1.5, 2013-11-30 11:34:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P401
+ TAG: NTP_4_2_7P401
+
+ ChangeLog@1.1361.1.4 +1 -0
+ NTP_4_2_7P401
+
+ ntpd/invoke-ntp.conf.texi@1.79 +1 -1
+ NTP_4_2_7P401
+
+ ntpd/invoke-ntp.keys.texi@1.77 +1 -1
+ NTP_4_2_7P401
+
+ ntpd/invoke-ntpd.texi@1.393 +2 -2
+ NTP_4_2_7P401
+
+ ntpd/ntp.conf.5man@1.113 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.conf.5mdoc@1.113 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.conf.html@1.74 +1 -1
+ NTP_4_2_7P401
+
+ ntpd/ntp.conf.man.in@1.113 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.conf.mdoc.in@1.113 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.keys.5man@1.111 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.keys.5mdoc@1.111 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.keys.html@1.75 +1 -1
+ NTP_4_2_7P401
+
+ ntpd/ntp.keys.man.in@1.111 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntp.keys.mdoc.in@1.111 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntpd-opts.c@1.411 +7 -7
+ NTP_4_2_7P401
+
+ ntpd/ntpd-opts.h@1.411 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntpd.1ntpdman@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntpd.1ntpdmdoc@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntpd.html@1.69 +2 -2
+ NTP_4_2_7P401
+
+ ntpd/ntpd.man.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpd/ntpd.mdoc.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpdc/invoke-ntpdc.texi@1.390 +2 -2
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc-opts.c@1.405 +7 -7
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc-opts.h@1.405 +3 -3
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc.1ntpdcman@1.221 +2 -2
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.221 +2 -2
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc.html@1.234 +2 -2
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc.man.in@1.221 +2 -2
+ NTP_4_2_7P401
+
+ ntpdc/ntpdc.mdoc.in@1.221 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/invoke-ntpq.texi@1.394 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/ntpq-opts.c@1.408 +7 -7
+ NTP_4_2_7P401
+
+ ntpq/ntpq-opts.h@1.408 +3 -3
+ NTP_4_2_7P401
+
+ ntpq/ntpq.1ntpqman@1.222 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/ntpq.1ntpqmdoc@1.222 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/ntpq.html@1.66 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/ntpq.man.in@1.222 +2 -2
+ NTP_4_2_7P401
+
+ ntpq/ntpq.mdoc.in@1.222 +2 -2
+ NTP_4_2_7P401
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.393 +2 -2
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.408 +7 -7
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.408 +3 -3
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd.html@1.64 +1 -1
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd.man.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ packageinfo.sh@1.404 +1 -1
+ NTP_4_2_7P401
+
+ scripts/invoke-ntp-wait.texi@1.208.1.2 +1 -1
+ NTP_4_2_7P401
+
+ scripts/ntp-wait.1ntp-waitman@1.219.1.2 +3 -3
+ NTP_4_2_7P401
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.219.1.2 +3 -3
+ NTP_4_2_7P401
+
+ scripts/ntp-wait.html@1.224.1.2 +1 -1
+ NTP_4_2_7P401
+
+ scripts/ntp-wait.man.in@1.219.1.2 +3 -3
+ NTP_4_2_7P401
+
+ scripts/ntp-wait.mdoc.in@1.219.1.2 +3 -3
+ NTP_4_2_7P401
+
+ sntp/invoke-sntp.texi@1.390 +2 -2
+ NTP_4_2_7P401
+
+ sntp/sntp-opts.c@1.405 +7 -7
+ NTP_4_2_7P401
+
+ sntp/sntp-opts.h@1.405 +3 -3
+ NTP_4_2_7P401
+
+ sntp/sntp.1sntpman@1.225 +3 -3
+ NTP_4_2_7P401
+
+ sntp/sntp.1sntpmdoc@1.225 +3 -3
+ NTP_4_2_7P401
+
+ sntp/sntp.html@1.405 +2 -2
+ NTP_4_2_7P401
+
+ sntp/sntp.man.in@1.225 +3 -3
+ NTP_4_2_7P401
+
+ sntp/sntp.mdoc.in@1.225 +3 -3
+ NTP_4_2_7P401
+
+ util/invoke-ntp-keygen.texi@1.394 +2 -2
+ NTP_4_2_7P401
+
+ util/ntp-keygen-opts.c@1.408 +7 -7
+ NTP_4_2_7P401
+
+ util/ntp-keygen-opts.h@1.408 +3 -3
+ NTP_4_2_7P401
+
+ util/ntp-keygen.1ntp-keygenman@1.222 +3 -3
+ NTP_4_2_7P401
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.222 +3 -3
+ NTP_4_2_7P401
+
+ util/ntp-keygen.html@1.70 +2 -2
+ NTP_4_2_7P401
+
+ util/ntp-keygen.man.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ util/ntp-keygen.mdoc.in@1.222 +3 -3
+ NTP_4_2_7P401
+
+ChangeSet@1.3020.1.4, 2013-11-30 03:56:11-05:00, stenn@deacon.udel.edu
+ [Bug 2491] VS20xx compile fixes
+
+ ChangeLog@1.1361.1.3 +1 -0
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/include/config.h@1.107 +12 -3
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/include/stdint.h@1.2 +2 -2
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj@1.2 +4 -4
+ [Bug 2491] VS20xx compile fixes
+
+ChangeSet@1.3020.1.3, 2013-11-29 11:36:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P400
+ TAG: NTP_4_2_7P400
+
+ ChangeLog@1.1361.1.2 +1 -0
+ NTP_4_2_7P400
+
+ ntpd/invoke-ntp.conf.texi@1.78 +1 -1
+ NTP_4_2_7P400
+
+ ntpd/invoke-ntp.keys.texi@1.76 +1 -1
+ NTP_4_2_7P400
+
+ ntpd/invoke-ntpd.texi@1.392 +2 -2
+ NTP_4_2_7P400
+
+ ntpd/ntp.conf.5man@1.112 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.conf.5mdoc@1.112 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.conf.html@1.73 +1 -1
+ NTP_4_2_7P400
+
+ ntpd/ntp.conf.man.in@1.112 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.conf.mdoc.in@1.112 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.keys.5man@1.110 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.keys.5mdoc@1.110 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.keys.html@1.74 +1 -1
+ NTP_4_2_7P400
+
+ ntpd/ntp.keys.man.in@1.110 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntp.keys.mdoc.in@1.110 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntpd-opts.c@1.410 +7 -7
+ NTP_4_2_7P400
+
+ ntpd/ntpd-opts.h@1.410 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntpd.1ntpdman@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntpd.1ntpdmdoc@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntpd.html@1.68 +2 -2
+ NTP_4_2_7P400
+
+ ntpd/ntpd.man.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpd/ntpd.mdoc.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpdc/invoke-ntpdc.texi@1.389 +2 -2
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc-opts.c@1.404 +7 -7
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc-opts.h@1.404 +3 -3
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc.1ntpdcman@1.220 +2 -2
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.220 +2 -2
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc.html@1.233 +2 -2
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc.man.in@1.220 +2 -2
+ NTP_4_2_7P400
+
+ ntpdc/ntpdc.mdoc.in@1.220 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/invoke-ntpq.texi@1.393 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/ntpq-opts.c@1.407 +7 -7
+ NTP_4_2_7P400
+
+ ntpq/ntpq-opts.h@1.407 +3 -3
+ NTP_4_2_7P400
+
+ ntpq/ntpq.1ntpqman@1.221 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/ntpq.1ntpqmdoc@1.221 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/ntpq.html@1.65 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/ntpq.man.in@1.221 +2 -2
+ NTP_4_2_7P400
+
+ ntpq/ntpq.mdoc.in@1.221 +2 -2
+ NTP_4_2_7P400
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.392 +2 -2
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.407 +7 -7
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.407 +3 -3
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd.html@1.63 +1 -1
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd.man.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ packageinfo.sh@1.403 +1 -1
+ NTP_4_2_7P400
+
+ scripts/invoke-ntp-wait.texi@1.208.1.1 +1 -1
+ NTP_4_2_7P400
+
+ scripts/ntp-wait.1ntp-waitman@1.219.1.1 +3 -3
+ NTP_4_2_7P400
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.219.1.1 +3 -3
+ NTP_4_2_7P400
+
+ scripts/ntp-wait.html@1.224.1.1 +1 -1
+ NTP_4_2_7P400
+
+ scripts/ntp-wait.man.in@1.219.1.1 +3 -3
+ NTP_4_2_7P400
+
+ scripts/ntp-wait.mdoc.in@1.219.1.1 +3 -3
+ NTP_4_2_7P400
+
+ sntp/invoke-sntp.texi@1.389 +2 -2
+ NTP_4_2_7P400
+
+ sntp/sntp-opts.c@1.404 +7 -7
+ NTP_4_2_7P400
+
+ sntp/sntp-opts.h@1.404 +3 -3
+ NTP_4_2_7P400
+
+ sntp/sntp.1sntpman@1.224 +3 -3
+ NTP_4_2_7P400
+
+ sntp/sntp.1sntpmdoc@1.224 +3 -3
+ NTP_4_2_7P400
+
+ sntp/sntp.html@1.404 +2 -2
+ NTP_4_2_7P400
+
+ sntp/sntp.man.in@1.224 +3 -3
+ NTP_4_2_7P400
+
+ sntp/sntp.mdoc.in@1.224 +3 -3
+ NTP_4_2_7P400
+
+ util/invoke-ntp-keygen.texi@1.393 +2 -2
+ NTP_4_2_7P400
+
+ util/ntp-keygen-opts.c@1.407 +7 -7
+ NTP_4_2_7P400
+
+ util/ntp-keygen-opts.h@1.407 +3 -3
+ NTP_4_2_7P400
+
+ util/ntp-keygen.1ntp-keygenman@1.221 +3 -3
+ NTP_4_2_7P400
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.221 +3 -3
+ NTP_4_2_7P400
+
+ util/ntp-keygen.html@1.69 +2 -2
+ NTP_4_2_7P400
+
+ util/ntp-keygen.man.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ util/ntp-keygen.mdoc.in@1.221 +3 -3
+ NTP_4_2_7P400
+
+ChangeSet@1.3020.1.2, 2013-11-29 05:40:01-05:00, stenn@deacon.udel.edu
+ [Bug 2491] VS2013 project files
+
+ ports/winnt/include/config.h@1.106 +5 -1
+ [Bug 2491] VS2013 project files
+
+ChangeSet@1.3020.1.1, 2013-11-29 05:34:11-05:00, stenn@deacon.udel.edu
+ [Bug 2491] VS2013 project files
+
+ ChangeLog@1.1361.1.1 +1 -0
+ [Bug 2491] VS2013 project files
+
+ ports/winnt/vs2013/instsrv/instsrv.vcproj@1.1 +258 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/instsrv/instsrv.vcproj
+
+ ports/winnt/vs2013/instsrv/instsrv.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/instsrv/instsrv.vcxproj@1.1 +311 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/instsrv/instsrv.vcxproj
+
+ ports/winnt/vs2013/instsrv/instsrv.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters@1.1 +22 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters
+
+ ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/libntp/libntp.vcproj@1.1 +936 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/libntp/libntp.vcproj
+
+ ports/winnt/vs2013/libntp/libntp.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.1 +443 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/libntp/libntp.vcxproj
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.1 +556 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
+
+ ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj@1.1 +256 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj@1.1 +276 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters@1.1 +36 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters
+
+ ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj@1.1 +335 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj@1.1 +355 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters@1.1 +36 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters
+
+ ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntp.sln@1.1 +108 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntp.sln
+
+ ports/winnt/vs2013/ntp.sln@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.1 +273 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.1 +250 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.1 +69 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters
+
+ ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat@1.1 +39 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat
+
+ ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd/ntpd.vcproj@1.1 +1126 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd/ntpd.vcproj
+
+ ports/winnt/vs2013/ntpd/ntpd.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.1 +594 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd/ntpd.vcxproj
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.1 +559 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters
+
+ ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcproj@1.1 +362 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdate/ntpdate.vcproj
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj@1.1 +360 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters@1.1 +72 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters
+
+ ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcproj@1.1 +367 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdc/ntpdc.vcproj
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj@1.1 +365 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters@1.1 +45 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters
+
+ ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpq/ntpq.vcproj@1.1 +357 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpq/ntpq.vcproj
+
+ ports/winnt/vs2013/ntpq/ntpq.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj@1.1 +349 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpq/ntpq.vcxproj
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj@1.0 +0 -0
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters@1.1 +42 -0
+ BitKeeper file /deacon/backroom/ntp-dev/ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters
+
+ ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters@1.0 +0 -0
+
+ChangeSet@1.2991.2.1, 2013-11-29 06:12:37+00:00, stenn@psp-fb1.ntp.org
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ BitKeeper/deleted/21/checktime.in~d65a0b68@1.3 +0 -0
+ Delete: scripts/checktime.in
+
+ ChangeLog@1.1338.2.1 +1 -0
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ Makefile.am@1.117 +3 -3
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ bootstrap@1.42 +2 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ configure.ac@1.562.2.1 +27 -8
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ ntpd/Makefile.am@1.127.1.1 +2 -2
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ ntpdate/Makefile.am@1.37 +1 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ ntpdc/Makefile.am@1.74 +2 -2
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ ntpq/Makefile.am@1.70 +2 -2
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ ntpsnmpd/Makefile.am@1.39 +1 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/Makefile.am@1.32 +13 -74
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/README@1.9 +7 -19
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/build/Makefile.am@1.1 +13 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/build/Makefile.am
+
+ scripts/build/Makefile.am@1.0 +0 -0
+
+ scripts/build/UpdatePoint@1.6 +3 -3
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/build/UpdatePoint@1.5 +0 -0
+ Rename: scripts/UpdatePoint -> scripts/build/UpdatePoint
+
+ scripts/build/VersionName@1.7 +0 -0
+ Rename: scripts/VersionName -> scripts/build/VersionName
+
+ scripts/build/addChangeLogTag@1.5 +1 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/build/addChangeLogTag@1.4 +0 -0
+ Rename: scripts/addChangeLogTag -> scripts/build/addChangeLogTag
+
+ scripts/build/check--help@1.3 +0 -0
+ Rename: scripts/check--help -> scripts/build/check--help
+
+ scripts/build/checkChangeLog@1.6 +0 -0
+ Rename: scripts/checkChangeLog -> scripts/build/checkChangeLog
+
+ scripts/build/fixautomakedepsmagic@1.4 +0 -0
+ Change mode to -rwxrwxr-x
+
+ scripts/build/fixautomakedepsmagic@1.3 +0 -0
+ Rename: scripts/fixautomakedepsmagic -> scripts/build/fixautomakedepsmagic
+
+ scripts/build/genChangeLogTag@1.3 +1 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/build/genChangeLogTag@1.2 +0 -0
+ Rename: scripts/genChangeLogTag -> scripts/build/genChangeLogTag
+
+ scripts/build/genCommitLog@1.9 +0 -0
+ Rename: scripts/genCommitLog -> scripts/build/genCommitLog
+
+ scripts/build/genver@1.9 +1 -1
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/build/genver@1.8 +0 -0
+ Rename: scripts/genver -> scripts/build/genver
+
+ scripts/build/mkver.in@1.15 +0 -0
+ Rename: scripts/mkver.in -> scripts/build/mkver.in
+
+ scripts/calc_tickadj/Makefile.am@1.1 +79 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/Makefile.am
+
+ scripts/calc_tickadj/Makefile.am@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.1 +60 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj-opts
+
+ scripts/calc_tickadj/calc_tickadj-opts@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj-opts.def@1.1 +55 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj-opts.def
+
+ scripts/calc_tickadj/calc_tickadj-opts.def@1.0 +0 -0
+
+ scripts/calc_tickadj/calc_tickadj.in@1.4 +51 -30
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/calc_tickadj/calc_tickadj.in@1.3 +0 -0
+ Rename: scripts/calc_tickadj.in -> scripts/calc_tickadj/calc_tickadj.in
+
+ scripts/calc_tickadj/calc_tickadj.texi@1.1 +37 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/calc_tickadj/calc_tickadj.texi
+
+ scripts/calc_tickadj/calc_tickadj.texi@1.0 +0 -0
+
+ scripts/deprecated/freq_adj.in@1.3 +0 -0
+ Rename: scripts/freq_adj.in -> scripts/deprecated/freq_adj.in
+
+ scripts/deprecated/hpadjtime.sh@1.3 +0 -0
+ Rename: scripts/hpadjtime.sh -> scripts/deprecated/hpadjtime.sh
+
+ scripts/deprecated/html2man.in@1.8 +0 -0
+ Rename: scripts/html2man.in -> scripts/deprecated/html2man.in
+
+ scripts/deprecated/ntp-close@1.3 +0 -0
+ Rename: scripts/ntp-close -> scripts/deprecated/ntp-close
+
+ scripts/deprecated/ntp-groper@1.3 +0 -0
+ Rename: scripts/ntp-groper -> scripts/deprecated/ntp-groper
+
+ scripts/deprecated/ntp-restart@1.4 +0 -0
+ Rename: scripts/ntp-restart -> scripts/deprecated/ntp-restart
+
+ scripts/deprecated/ntp-status@1.3 +0 -0
+ Rename: scripts/ntp-status -> scripts/deprecated/ntp-status
+
+ scripts/lib/Makefile.am@1.1 +5 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/lib/Makefile.am
+
+ scripts/lib/Makefile.am@1.0 +0 -0
+
+ scripts/lib/NTP/Mode6/Packet.pm@1.1 +222 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/lib/NTP/Mode6/Packet.pm
+
+ scripts/lib/NTP/Mode6/Packet.pm@1.0 +0 -0
+
+ scripts/lib/NTP/Util.pm@1.1 +136 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/lib/NTP/Util.pm
+
+ scripts/lib/NTP/Util.pm@1.0 +0 -0
+
+ scripts/ntp-wait/Makefile.am@1.1 +87 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntp-wait/Makefile.am
+
+ scripts/ntp-wait/Makefile.am@1.0 +0 -0
+
+ scripts/ntp-wait/invoke-ntp-wait.menu@1.3 +0 -0
+ Rename: scripts/invoke-ntp-wait.menu -> scripts/ntp-wait/invoke-ntp-wait.menu
+
+ scripts/ntp-wait/invoke-ntp-wait.texi@1.199.1.1 +0 -0
+ Rename: scripts/invoke-ntp-wait.texi -> scripts/ntp-wait/invoke-ntp-wait.texi
+
+ scripts/ntp-wait/ntp-wait-opts@1.1 +62 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntp-wait/ntp-wait-opts
+
+ scripts/ntp-wait/ntp-wait-opts@1.0 +0 -0
+
+ scripts/ntp-wait/ntp-wait-opts.def@1.9 +30 -29
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntp-wait/ntp-wait-opts.def@1.8 +0 -0
+ Rename: scripts/ntp-wait-opts.def -> scripts/ntp-wait/ntp-wait-opts.def
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitman@1.210.1.1 +0 -0
+ Rename: scripts/ntp-wait.1ntp-waitman -> scripts/ntp-wait/ntp-wait.1ntp-waitman
+
+ scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.210.1.1 +0 -0
+ Rename: scripts/ntp-wait.1ntp-waitmdoc -> scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
+
+ scripts/ntp-wait/ntp-wait.html@1.215.1.1 +0 -0
+ Rename: scripts/ntp-wait.html -> scripts/ntp-wait/ntp-wait.html
+
+ scripts/ntp-wait/ntp-wait.in@1.9 +62 -51
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntp-wait/ntp-wait.in@1.8 +0 -0
+ Rename: scripts/ntp-wait.in -> scripts/ntp-wait/ntp-wait.in
+
+ scripts/ntp-wait/ntp-wait.man.in@1.210.1.1 +0 -0
+ Rename: scripts/ntp-wait.man.in -> scripts/ntp-wait/ntp-wait.man.in
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.210.1.2 +26 -56
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntp-wait/ntp-wait.mdoc.in@1.210.1.1 +0 -0
+ Rename: scripts/ntp-wait.mdoc.in -> scripts/ntp-wait/ntp-wait.mdoc.in
+
+ scripts/ntp-wait/ntp-wait.texi@1.6 +1 -10
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntp-wait/ntp-wait.texi@1.5 +0 -0
+ Rename: scripts/ntp-wait.texi -> scripts/ntp-wait/ntp-wait.texi
+
+ scripts/ntpsweep/Makefile.am@1.1 +80 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/Makefile.am
+
+ scripts/ntpsweep/Makefile.am@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep-opts@1.1 +72 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep-opts
+
+ scripts/ntpsweep/ntpsweep-opts@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep-opts.def@1.1 +63 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep-opts.def
+
+ scripts/ntpsweep/ntpsweep-opts.def@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.in@1.6 +150 -247
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntpsweep/ntpsweep.in@1.5 +0 -0
+ Rename: scripts/ntpsweep.in -> scripts/ntpsweep/ntpsweep.in
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.1 +71 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.mdoc.in
+
+ scripts/ntpsweep/ntpsweep.mdoc.in@1.0 +0 -0
+
+ scripts/ntpsweep/ntpsweep.texi@1.1 +43 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntpsweep/ntpsweep.texi
+
+ scripts/ntpsweep/ntpsweep.texi@1.0 +0 -0
+
+ scripts/ntptrace/Makefile.am@1.1 +86 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/Makefile.am
+
+ scripts/ntptrace/Makefile.am@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace-opts@1.1 +67 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace-opts
+
+ scripts/ntptrace/ntptrace-opts@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace-opts.def@1.1 +66 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace-opts.def
+
+ scripts/ntptrace/ntptrace-opts.def@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.in@1.10 +74 -67
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/ntptrace/ntptrace.in@1.9 +0 -0
+ Rename: scripts/ntptrace.in -> scripts/ntptrace/ntptrace.in
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.1 +87 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.mdoc.in
+
+ scripts/ntptrace/ntptrace.mdoc.in@1.0 +0 -0
+
+ scripts/ntptrace/ntptrace.texi@1.1 +40 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/ntptrace/ntptrace.texi
+
+ scripts/ntptrace/ntptrace.texi@1.0 +0 -0
+
+ scripts/plot_summary-opts@1.1 +73 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary-opts
+
+ scripts/plot_summary-opts@1.0 +0 -0
+
+ scripts/plot_summary-opts.def@1.1 +78 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/plot_summary-opts.def
+
+ scripts/plot_summary-opts.def@1.0 +0 -0
+
+ scripts/plot_summary.in@1.3 +42 -50
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc/README@1.1 +13 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/README
+
+ scripts/rc/README@1.0 +0 -0
+
+ scripts/rc/ntpd@1.1 +88 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/ntpd
+
+ scripts/rc/ntpd@1.0 +0 -0
+
+ scripts/rc/ntpwait@1.1 +15 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/ntpwait
+
+ scripts/rc/ntpwait@1.0 +0 -0
+
+ scripts/rc/rc.d/TIMESYNC@1.1 +8 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/rc.d/TIMESYNC
+
+ scripts/rc/rc.d/TIMESYNC@1.0 +0 -0
+
+ scripts/rc/rc.d/ntpd@1.1 +32 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/rc.d/ntpd
+
+ scripts/rc/rc.d/ntpd@1.0 +0 -0
+
+ scripts/rc/rc.d/ntpwait@1.1 +21 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/rc/rc.d/ntpwait
+
+ scripts/rc/rc.d/ntpwait@1.0 +0 -0
+
+ scripts/rc1/postinstall@1.3 +0 -2
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc1/preinstall@1.3 +0 -6
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc1/preremove@1.3 +0 -4
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc1/prototype@1.3 +0 -19
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc1/xntp@1.3 +0 -29
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/rc2/local.ntpd@1.3 +0 -64
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/summary-opts@1.1 +69 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary-opts
+
+ scripts/summary-opts@1.0 +0 -0
+
+ scripts/summary-opts.def@1.1 +77 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/summary-opts.def
+
+ scripts/summary-opts.def@1.0 +0 -0
+
+ scripts/summary.in@1.3 +81 -85
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ scripts/t/1_common.t@1.1 +28 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/1_common.t
+
+ scripts/t/1_common.t@1.0 +0 -0
+
+ scripts/t/calc_tickadj.t@1.1 +90 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/calc_tickadj.t
+
+ scripts/t/calc_tickadj.t@1.0 +0 -0
+
+ scripts/t/lib/Test/Command.pm@1.1 +261 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/lib/Test/Command.pm
+
+ scripts/t/lib/Test/Command.pm@1.0 +0 -0
+
+ scripts/t/lib/Test/Mode6/Server.pm@1.1 +66 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/lib/Test/Mode6/Server.pm
+
+ scripts/t/lib/Test/Mode6/Server.pm@1.0 +0 -0
+
+ scripts/t/lib/Test/Util.pm@1.1 +167 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/lib/Test/Util.pm
+
+ scripts/t/lib/Test/Util.pm@1.0 +0 -0
+
+ scripts/t/ntp-wait.t@1.1 +142 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/ntp-wait.t
+
+ scripts/t/ntp-wait.t@1.0 +0 -0
+
+ scripts/t/ntpsweep.t@1.1 +117 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/ntpsweep.t
+
+ scripts/t/ntpsweep.t@1.0 +0 -0
+
+ scripts/t/ntptrace.t@1.1 +154 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/ntptrace.t
+
+ scripts/t/ntptrace.t@1.0 +0 -0
+
+ scripts/t/plot_summary.t@1.1 +17 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/plot_summary.t
+
+ scripts/t/plot_summary.t@1.0 +0 -0
+
+ scripts/t/summary.t@1.1 +17 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/summary.t
+
+ scripts/t/summary.t@1.0 +0 -0
+
+ scripts/t/util.t@1.1 +179 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/scripts/t/util.t
+
+ scripts/t/util.t@1.0 +0 -0
+
+ sntp/Makefile.am@1.75 +5 -5
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ sntp/ag-tpl/Mdoc.pm@1.1 +515 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/Mdoc.pm
+
+ sntp/ag-tpl/Mdoc.pm@1.0 +0 -0
+
+ sntp/ag-tpl/agman-cmd.tpl@1.1 +58 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/agman-cmd.tpl
+
+ sntp/ag-tpl/agman-cmd.tpl@1.0 +0 -0
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.1 +46 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/agmdoc-cmd.tpl
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.0 +0 -0
+
+ sntp/ag-tpl/cmd-doc.tlib@1.1 +1079 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/cmd-doc.tlib
+
+ sntp/ag-tpl/cmd-doc.tlib@1.0 +0 -0
+
+ sntp/ag-tpl/mdoc-synopsis.tlib@1.1 +92 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/mdoc-synopsis.tlib
+
+ sntp/ag-tpl/mdoc-synopsis.tlib@1.0 +0 -0
+
+ sntp/ag-tpl/mdoc2man@1.1 +181 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.0 +0 -0
+
+ sntp/ag-tpl/mdoc2texi@1.8 +144 -1016
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ sntp/ag-tpl/perlopt.tpl@1.1 +176 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/kindernay/ntp-dev-final/sntp/ag-tpl/perlopt.tpl
+
+ sntp/ag-tpl/perlopt.tpl@1.0 +0 -0
+
+ sntp/m4/define_dir.m4@1.4 +26 -17
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ util/Makefile.am@1.75 +2 -2
+ Incorporate Oliver Kindernay's GSoC 2013 scripts/ cleanup
+
+ChangeSet@1.3020, 2013-11-28 11:37:11+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P399
+ TAG: NTP_4_2_7P399
+
+ ChangeLog@1.1361 +1 -0
+ NTP_4_2_7P399
+
+ ntpd/invoke-ntp.conf.texi@1.77 +1 -1
+ NTP_4_2_7P399
+
+ ntpd/invoke-ntp.keys.texi@1.75 +1 -1
+ NTP_4_2_7P399
+
+ ntpd/invoke-ntpd.texi@1.391 +2 -2
+ NTP_4_2_7P399
+
+ ntpd/ntp.conf.5man@1.111 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.conf.5mdoc@1.111 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.conf.html@1.72 +1 -1
+ NTP_4_2_7P399
+
+ ntpd/ntp.conf.man.in@1.111 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.conf.mdoc.in@1.111 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.keys.5man@1.109 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.keys.5mdoc@1.109 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.keys.html@1.73 +1 -1
+ NTP_4_2_7P399
+
+ ntpd/ntp.keys.man.in@1.109 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntp.keys.mdoc.in@1.109 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntpd-opts.c@1.409 +7 -7
+ NTP_4_2_7P399
+
+ ntpd/ntpd-opts.h@1.409 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntpd.1ntpdman@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntpd.1ntpdmdoc@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntpd.html@1.67 +2 -2
+ NTP_4_2_7P399
+
+ ntpd/ntpd.man.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpd/ntpd.mdoc.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpdc/invoke-ntpdc.texi@1.388 +2 -2
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc-opts.c@1.403 +7 -7
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc-opts.h@1.403 +3 -3
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc.1ntpdcman@1.219 +2 -2
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.219 +2 -2
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc.html@1.232 +2 -2
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc.man.in@1.219 +2 -2
+ NTP_4_2_7P399
+
+ ntpdc/ntpdc.mdoc.in@1.219 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/invoke-ntpq.texi@1.392 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/ntpq-opts.c@1.406 +7 -7
+ NTP_4_2_7P399
+
+ ntpq/ntpq-opts.h@1.406 +3 -3
+ NTP_4_2_7P399
+
+ ntpq/ntpq.1ntpqman@1.220 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/ntpq.1ntpqmdoc@1.220 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/ntpq.html@1.64 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/ntpq.man.in@1.220 +2 -2
+ NTP_4_2_7P399
+
+ ntpq/ntpq.mdoc.in@1.220 +2 -2
+ NTP_4_2_7P399
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.391 +2 -2
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.406 +7 -7
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.406 +3 -3
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd.html@1.62 +1 -1
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd.man.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ packageinfo.sh@1.402 +1 -1
+ NTP_4_2_7P399
+
+ scripts/invoke-ntp-wait.texi@1.208 +1 -1
+ NTP_4_2_7P399
+
+ scripts/ntp-wait.1ntp-waitman@1.219 +3 -3
+ NTP_4_2_7P399
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.219 +3 -3
+ NTP_4_2_7P399
+
+ scripts/ntp-wait.html@1.224 +1 -1
+ NTP_4_2_7P399
+
+ scripts/ntp-wait.man.in@1.219 +3 -3
+ NTP_4_2_7P399
+
+ scripts/ntp-wait.mdoc.in@1.219 +3 -3
+ NTP_4_2_7P399
+
+ sntp/invoke-sntp.texi@1.388 +2 -2
+ NTP_4_2_7P399
+
+ sntp/sntp-opts.c@1.403 +7 -7
+ NTP_4_2_7P399
+
+ sntp/sntp-opts.h@1.403 +3 -3
+ NTP_4_2_7P399
+
+ sntp/sntp.1sntpman@1.223 +3 -3
+ NTP_4_2_7P399
+
+ sntp/sntp.1sntpmdoc@1.223 +3 -3
+ NTP_4_2_7P399
+
+ sntp/sntp.html@1.403 +2 -2
+ NTP_4_2_7P399
+
+ sntp/sntp.man.in@1.223 +3 -3
+ NTP_4_2_7P399
+
+ sntp/sntp.mdoc.in@1.223 +3 -3
+ NTP_4_2_7P399
+
+ util/invoke-ntp-keygen.texi@1.392 +2 -2
+ NTP_4_2_7P399
+
+ util/ntp-keygen-opts.c@1.406 +7 -7
+ NTP_4_2_7P399
+
+ util/ntp-keygen-opts.h@1.406 +3 -3
+ NTP_4_2_7P399
+
+ util/ntp-keygen.1ntp-keygenman@1.220 +3 -3
+ NTP_4_2_7P399
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.220 +3 -3
+ NTP_4_2_7P399
+
+ util/ntp-keygen.html@1.68 +2 -2
+ NTP_4_2_7P399
+
+ util/ntp-keygen.man.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ util/ntp-keygen.mdoc.in@1.220 +3 -3
+ NTP_4_2_7P399
+
+ChangeSet@1.3017, 2013-11-28 00:20:43-05:00, stenn@deacon.udel.edu
+ [Bug 2514] secs/* #define usage cleanup
+
+ ChangeLog@1.1359 +1 -0
+ [Bug 2514] secs/* #define usage cleanup
+
+ include/ntp_stdlib.h@1.76 +0 -4
+ [Bug 2514] secs/* #define usage cleanup
+
+ ntpd/ntp_loopfilter.c@1.170 +0 -2
+ [Bug 2514] secs/* #define usage cleanup
+
+ ntpd/ntp_timer.c@1.80 +4 -3
+ [Bug 2514] secs/* #define usage cleanup
+
+ ntpd/refclock_tsyncpci.c@1.9 +19 -29
+ [Bug 2514] secs/* #define usage cleanup
+
+ util/ntp-keygen.c@1.96 +2 -3
+ [Bug 2514] secs/* #define usage cleanup
+
+ChangeSet@1.3016, 2013-11-27 22:07:41+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ChangeLog@1.1358 +1 -0
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_timer.c@1.79 +4 -4
+ [Bug 2326] More leapsecond file notification cleanup
+
+ChangeSet@1.3015, 2013-11-25 13:00:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P398
+ TAG: NTP_4_2_7P398
+
+ ChangeLog@1.1357 +1 -0
+ NTP_4_2_7P398
+
+ ntpd/invoke-ntp.conf.texi@1.76 +1 -1
+ NTP_4_2_7P398
+
+ ntpd/invoke-ntp.keys.texi@1.74 +1 -1
+ NTP_4_2_7P398
+
+ ntpd/invoke-ntpd.texi@1.390 +2 -2
+ NTP_4_2_7P398
+
+ ntpd/ntp.conf.5man@1.110 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.conf.5mdoc@1.110 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.conf.html@1.71 +1 -1
+ NTP_4_2_7P398
+
+ ntpd/ntp.conf.man.in@1.110 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.conf.mdoc.in@1.110 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.keys.5man@1.108 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.keys.5mdoc@1.108 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.keys.html@1.72 +1 -1
+ NTP_4_2_7P398
+
+ ntpd/ntp.keys.man.in@1.108 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntp.keys.mdoc.in@1.108 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntpd-opts.c@1.408 +7 -7
+ NTP_4_2_7P398
+
+ ntpd/ntpd-opts.h@1.408 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntpd.1ntpdman@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntpd.1ntpdmdoc@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntpd.html@1.66 +2 -2
+ NTP_4_2_7P398
+
+ ntpd/ntpd.man.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpd/ntpd.mdoc.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpdc/invoke-ntpdc.texi@1.387 +2 -2
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc-opts.c@1.402 +7 -7
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc-opts.h@1.402 +3 -3
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc.1ntpdcman@1.218 +2 -2
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.218 +2 -2
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc.html@1.231 +2 -2
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc.man.in@1.218 +2 -2
+ NTP_4_2_7P398
+
+ ntpdc/ntpdc.mdoc.in@1.218 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/invoke-ntpq.texi@1.391 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/ntpq-opts.c@1.405 +7 -7
+ NTP_4_2_7P398
+
+ ntpq/ntpq-opts.h@1.405 +3 -3
+ NTP_4_2_7P398
+
+ ntpq/ntpq.1ntpqman@1.219 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/ntpq.1ntpqmdoc@1.219 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/ntpq.html@1.63 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/ntpq.man.in@1.219 +2 -2
+ NTP_4_2_7P398
+
+ ntpq/ntpq.mdoc.in@1.219 +2 -2
+ NTP_4_2_7P398
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.390 +2 -2
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.405 +7 -7
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.405 +3 -3
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd.html@1.61 +1 -1
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd.man.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ packageinfo.sh@1.401 +1 -1
+ NTP_4_2_7P398
+
+ scripts/invoke-ntp-wait.texi@1.207 +1 -1
+ NTP_4_2_7P398
+
+ scripts/ntp-wait.1ntp-waitman@1.218 +3 -3
+ NTP_4_2_7P398
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.218 +3 -3
+ NTP_4_2_7P398
+
+ scripts/ntp-wait.html@1.223 +1 -1
+ NTP_4_2_7P398
+
+ scripts/ntp-wait.man.in@1.218 +3 -3
+ NTP_4_2_7P398
+
+ scripts/ntp-wait.mdoc.in@1.218 +3 -3
+ NTP_4_2_7P398
+
+ sntp/invoke-sntp.texi@1.387 +2 -2
+ NTP_4_2_7P398
+
+ sntp/sntp-opts.c@1.402 +7 -7
+ NTP_4_2_7P398
+
+ sntp/sntp-opts.h@1.402 +3 -3
+ NTP_4_2_7P398
+
+ sntp/sntp.1sntpman@1.222 +3 -3
+ NTP_4_2_7P398
+
+ sntp/sntp.1sntpmdoc@1.222 +3 -3
+ NTP_4_2_7P398
+
+ sntp/sntp.html@1.402 +2 -2
+ NTP_4_2_7P398
+
+ sntp/sntp.man.in@1.222 +3 -3
+ NTP_4_2_7P398
+
+ sntp/sntp.mdoc.in@1.222 +3 -3
+ NTP_4_2_7P398
+
+ util/invoke-ntp-keygen.texi@1.391 +2 -2
+ NTP_4_2_7P398
+
+ util/ntp-keygen-opts.c@1.405 +7 -7
+ NTP_4_2_7P398
+
+ util/ntp-keygen-opts.h@1.405 +3 -3
+ NTP_4_2_7P398
+
+ util/ntp-keygen.1ntp-keygenman@1.219 +3 -3
+ NTP_4_2_7P398
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.219 +3 -3
+ NTP_4_2_7P398
+
+ util/ntp-keygen.html@1.67 +2 -2
+ NTP_4_2_7P398
+
+ util/ntp-keygen.man.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ util/ntp-keygen.mdoc.in@1.219 +3 -3
+ NTP_4_2_7P398
+
+ChangeSet@1.3014, 2013-11-25 04:01:41-08:00, harlan@hms-mbp11.local
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_config.c@1.315 +0 -1
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_io.c@1.386 +0 -32
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_timer.c@1.78 +18 -13
+ [Bug 2326] More leapsecond file notification cleanup
+
+ChangeSet@1.3013, 2013-11-23 14:08:57-08:00, harlan@hms-mbp11.local
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ChangeLog@1.1356 +2 -0
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_io.c@1.385 +25 -8
+ [Bug 2326] More leapsecond file notification cleanup
+
+ ntpd/ntp_timer.c@1.77 +3 -2
+ [Bug 2326] More leapsecond file notification cleanup
+
+ChangeSet@1.3012, 2013-11-23 13:59:42-08:00, harlan@hms-mbp11.local
+ Emit %m value on KoD file open failure.
+
+ sntp/kod_management.c@1.32 +1 -1
+ Emit %m value on KoD file open failure.
+
+ChangeSet@1.3011, 2013-11-20 11:34:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P397
+ TAG: NTP_4_2_7P397
+
+ ChangeLog@1.1355 +1 -0
+ NTP_4_2_7P397
+
+ ntpd/invoke-ntp.conf.texi@1.75 +1 -1
+ NTP_4_2_7P397
+
+ ntpd/invoke-ntp.keys.texi@1.73 +1 -1
+ NTP_4_2_7P397
+
+ ntpd/invoke-ntpd.texi@1.389 +2 -2
+ NTP_4_2_7P397
+
+ ntpd/ntp.conf.5man@1.109 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.conf.5mdoc@1.109 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.conf.html@1.70 +1 -1
+ NTP_4_2_7P397
+
+ ntpd/ntp.conf.man.in@1.109 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.conf.mdoc.in@1.109 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.keys.5man@1.107 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.keys.5mdoc@1.107 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.keys.html@1.71 +1 -1
+ NTP_4_2_7P397
+
+ ntpd/ntp.keys.man.in@1.107 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntp.keys.mdoc.in@1.107 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntpd-opts.c@1.407 +7 -7
+ NTP_4_2_7P397
+
+ ntpd/ntpd-opts.h@1.407 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntpd.1ntpdman@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntpd.1ntpdmdoc@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntpd.html@1.65 +2 -2
+ NTP_4_2_7P397
+
+ ntpd/ntpd.man.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpd/ntpd.mdoc.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpdc/invoke-ntpdc.texi@1.386 +2 -2
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc-opts.c@1.401 +7 -7
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc-opts.h@1.401 +3 -3
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc.1ntpdcman@1.217 +2 -2
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.217 +2 -2
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc.html@1.230 +2 -2
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc.man.in@1.217 +2 -2
+ NTP_4_2_7P397
+
+ ntpdc/ntpdc.mdoc.in@1.217 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/invoke-ntpq.texi@1.390 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/ntpq-opts.c@1.404 +7 -7
+ NTP_4_2_7P397
+
+ ntpq/ntpq-opts.h@1.404 +3 -3
+ NTP_4_2_7P397
+
+ ntpq/ntpq.1ntpqman@1.218 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/ntpq.1ntpqmdoc@1.218 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/ntpq.html@1.62 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/ntpq.man.in@1.218 +2 -2
+ NTP_4_2_7P397
+
+ ntpq/ntpq.mdoc.in@1.218 +2 -2
+ NTP_4_2_7P397
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.389 +2 -2
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.404 +7 -7
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.404 +3 -3
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd.html@1.60 +1 -1
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd.man.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ packageinfo.sh@1.400 +1 -1
+ NTP_4_2_7P397
+
+ scripts/invoke-ntp-wait.texi@1.206 +1 -1
+ NTP_4_2_7P397
+
+ scripts/ntp-wait.1ntp-waitman@1.217 +3 -3
+ NTP_4_2_7P397
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.217 +3 -3
+ NTP_4_2_7P397
+
+ scripts/ntp-wait.html@1.222 +1 -1
+ NTP_4_2_7P397
+
+ scripts/ntp-wait.man.in@1.217 +3 -3
+ NTP_4_2_7P397
+
+ scripts/ntp-wait.mdoc.in@1.217 +3 -3
+ NTP_4_2_7P397
+
+ sntp/invoke-sntp.texi@1.386 +2 -2
+ NTP_4_2_7P397
+
+ sntp/sntp-opts.c@1.401 +7 -7
+ NTP_4_2_7P397
+
+ sntp/sntp-opts.h@1.401 +3 -3
+ NTP_4_2_7P397
+
+ sntp/sntp.1sntpman@1.221 +3 -3
+ NTP_4_2_7P397
+
+ sntp/sntp.1sntpmdoc@1.221 +3 -3
+ NTP_4_2_7P397
+
+ sntp/sntp.html@1.401 +2 -2
+ NTP_4_2_7P397
+
+ sntp/sntp.man.in@1.221 +3 -3
+ NTP_4_2_7P397
+
+ sntp/sntp.mdoc.in@1.221 +3 -3
+ NTP_4_2_7P397
+
+ util/invoke-ntp-keygen.texi@1.390 +2 -2
+ NTP_4_2_7P397
+
+ util/ntp-keygen-opts.c@1.404 +7 -7
+ NTP_4_2_7P397
+
+ util/ntp-keygen-opts.h@1.404 +3 -3
+ NTP_4_2_7P397
+
+ util/ntp-keygen.1ntp-keygenman@1.218 +3 -3
+ NTP_4_2_7P397
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.218 +3 -3
+ NTP_4_2_7P397
+
+ util/ntp-keygen.html@1.66 +2 -2
+ NTP_4_2_7P397
+
+ util/ntp-keygen.man.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ util/ntp-keygen.mdoc.in@1.218 +3 -3
+ NTP_4_2_7P397
+
+ChangeSet@1.3010, 2013-11-20 03:56:38-05:00, stenn@deacon.udel.edu
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ChangeLog@1.1354 +1 -0
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ntpd/ntp_io.c@1.384 +7 -1
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ntpd/ntp_timer.c@1.76 +2 -3
+ [Bug 2326] Improve stale leapsecond notifications
+
+ChangeSet@1.3009, 2013-11-19 11:37:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P396
+ TAG: NTP_4_2_7P396
+
+ ChangeLog@1.1353 +1 -0
+ NTP_4_2_7P396
+
+ ntpd/invoke-ntp.conf.texi@1.74 +1 -1
+ NTP_4_2_7P396
+
+ ntpd/invoke-ntp.keys.texi@1.72 +1 -1
+ NTP_4_2_7P396
+
+ ntpd/invoke-ntpd.texi@1.388 +2 -2
+ NTP_4_2_7P396
+
+ ntpd/ntp.conf.5man@1.108 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.conf.5mdoc@1.108 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.conf.html@1.69 +1 -1
+ NTP_4_2_7P396
+
+ ntpd/ntp.conf.man.in@1.108 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.conf.mdoc.in@1.108 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.keys.5man@1.106 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.keys.5mdoc@1.106 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.keys.html@1.70 +1 -1
+ NTP_4_2_7P396
+
+ ntpd/ntp.keys.man.in@1.106 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntp.keys.mdoc.in@1.106 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntpd-opts.c@1.406 +7 -7
+ NTP_4_2_7P396
+
+ ntpd/ntpd-opts.h@1.406 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntpd.1ntpdman@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntpd.1ntpdmdoc@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntpd.html@1.64 +18 -18
+ NTP_4_2_7P396
+
+ ntpd/ntpd.man.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpd/ntpd.mdoc.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpdc/invoke-ntpdc.texi@1.385 +2 -2
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc-opts.c@1.400 +7 -7
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc-opts.h@1.400 +3 -3
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc.1ntpdcman@1.216 +2 -2
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.216 +2 -2
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc.html@1.229 +2 -2
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc.man.in@1.216 +2 -2
+ NTP_4_2_7P396
+
+ ntpdc/ntpdc.mdoc.in@1.216 +2 -2
+ NTP_4_2_7P396
+
+ ntpq/invoke-ntpq.texi@1.389 +2 -2
+ NTP_4_2_7P396
+
+ ntpq/ntpq-opts.c@1.403 +7 -7
+ NTP_4_2_7P396
+
+ ntpq/ntpq-opts.h@1.403 +3 -3
+ NTP_4_2_7P396
+
+ ntpq/ntpq.1ntpqman@1.217 +2 -2
+ NTP_4_2_7P396
+
+ ntpq/ntpq.1ntpqmdoc@1.217 +2 -2
+ NTP_4_2_7P396
+
+ ntpq/ntpq.html@1.61 +3 -3
+ NTP_4_2_7P396
+
+ ntpq/ntpq.man.in@1.217 +2 -2
+ NTP_4_2_7P396
+
+ ntpq/ntpq.mdoc.in@1.217 +2 -2
+ NTP_4_2_7P396
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.388 +2 -2
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.403 +7 -7
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.403 +3 -3
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd.html@1.59 +1 -1
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd.man.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ packageinfo.sh@1.399 +1 -1
+ NTP_4_2_7P396
+
+ scripts/invoke-ntp-wait.texi@1.205 +1 -1
+ NTP_4_2_7P396
+
+ scripts/ntp-wait.1ntp-waitman@1.216 +3 -3
+ NTP_4_2_7P396
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.216 +3 -3
+ NTP_4_2_7P396
+
+ scripts/ntp-wait.html@1.221 +1 -1
+ NTP_4_2_7P396
+
+ scripts/ntp-wait.man.in@1.216 +3 -3
+ NTP_4_2_7P396
+
+ scripts/ntp-wait.mdoc.in@1.216 +3 -3
+ NTP_4_2_7P396
+
+ sntp/invoke-sntp.texi@1.385 +2 -2
+ NTP_4_2_7P396
+
+ sntp/sntp-opts.c@1.400 +7 -7
+ NTP_4_2_7P396
+
+ sntp/sntp-opts.h@1.400 +3 -3
+ NTP_4_2_7P396
+
+ sntp/sntp.1sntpman@1.220 +3 -3
+ NTP_4_2_7P396
+
+ sntp/sntp.1sntpmdoc@1.220 +3 -3
+ NTP_4_2_7P396
+
+ sntp/sntp.html@1.400 +2 -2
+ NTP_4_2_7P396
+
+ sntp/sntp.man.in@1.220 +3 -3
+ NTP_4_2_7P396
+
+ sntp/sntp.mdoc.in@1.220 +3 -3
+ NTP_4_2_7P396
+
+ util/invoke-ntp-keygen.texi@1.389 +2 -2
+ NTP_4_2_7P396
+
+ util/ntp-keygen-opts.c@1.403 +7 -7
+ NTP_4_2_7P396
+
+ util/ntp-keygen-opts.h@1.403 +3 -3
+ NTP_4_2_7P396
+
+ util/ntp-keygen.1ntp-keygenman@1.217 +3 -3
+ NTP_4_2_7P396
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.217 +3 -3
+ NTP_4_2_7P396
+
+ util/ntp-keygen.html@1.65 +14 -14
+ NTP_4_2_7P396
+
+ util/ntp-keygen.man.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ util/ntp-keygen.mdoc.in@1.217 +3 -3
+ NTP_4_2_7P396
+
+ChangeSet@1.3005.1.1, 2013-11-18 20:55:37+00:00, kardel@pogo.udel.edu
+ ChangeLog:
+ ntp_io.c:
+ [Bug 2506] make sure routing updates are always tracked
+ the 'flapping fix' from 2010-12-12 was and is incorrect
+ as routes can change without change of interface
+ configuration.
+
+ ChangeLog@1.1351.1.1 +1 -0
+ [Bug 2506] make sure routing updates are always tracked
+ the 'flapping fix' from 2010-12-12 was and is incorrect
+ as routes can change without change of interface
+ configuration.
+
+ ntpd/ntp_io.c@1.382.1.1 +14 -24
+
+ChangeSet@1.3008, 2013-11-17 14:38:45+01:00, jnperlin@hydra.(none)
+ [Bug 2326] sidekick: C99 type cleanup
+
+ tests/ntpd/leapsec.cpp@1.4 +4 -4
+ [Bug 2326] sidekick: C99 type cleanup
+
+ChangeSet@1.3007, 2013-11-17 14:36:40+01:00, jnperlin@hydra.(none)
+ [bug 2326] use time-to-live of leap second table for better diagnostics
+
+ ntpd/ntp_leapsec.c@1.4 +101 -56
+ [bug 2326] add support for calculation of remaining time-to-live of table data
+
+ ntpd/ntp_leapsec.h@1.3 +22 -22
+ [bug 2326] add support for calculation of remaining time-to-live of table data
+
+ ntpd/ntp_util.c@1.106 +24 -22
+ [Bug 2326] plumbing to TTL calculation for leap second data
+
+ tests/ntpd/leapsec.cpp@1.3 +28 -1
+ [Bug 2326] add tests for TTL calculation of table data
+
+ChangeSet@1.3006, 2013-11-17 09:03:39+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ChangeLog@1.1352 +1 -0
+ [Bug 2326] Improve stale leapsecond notifications
+
+ include/ntpd.h@1.181 +1 -1
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ntpd/ntp_io.c@1.383 +1 -1
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ntpd/ntp_timer.c@1.75 +19 -11
+ [Bug 2326] Improve stale leapsecond notifications
+
+ ntpd/ntp_util.c@1.105 +15 -4
+ [Bug 2326] Improve stale leapsecond notifications
+
+ChangeSet@1.3005, 2013-11-12 11:30:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P395
+ TAG: NTP_4_2_7P395
+
+ ChangeLog@1.1351 +1 -0
+ NTP_4_2_7P395
+
+ ntpd/invoke-ntp.conf.texi@1.73 +1 -1
+ NTP_4_2_7P395
+
+ ntpd/invoke-ntp.keys.texi@1.71 +1 -1
+ NTP_4_2_7P395
+
+ ntpd/invoke-ntpd.texi@1.387 +18 -18
+ NTP_4_2_7P395
+
+ ntpd/ntp.conf.5man@1.107 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.conf.5mdoc@1.107 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.conf.html@1.68 +1 -1
+ NTP_4_2_7P395
+
+ ntpd/ntp.conf.man.in@1.107 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.conf.mdoc.in@1.107 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.keys.5man@1.105 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.keys.5mdoc@1.105 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.keys.html@1.69 +1 -1
+ NTP_4_2_7P395
+
+ ntpd/ntp.keys.man.in@1.105 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntp.keys.mdoc.in@1.105 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntpd-opts.c@1.405 +10 -9
+ NTP_4_2_7P395
+
+ ntpd/ntpd-opts.h@1.405 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntpd.1ntpdman@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntpd.1ntpdmdoc@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntpd.html@1.63 +2 -2
+ NTP_4_2_7P395
+
+ ntpd/ntpd.man.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpd/ntpd.mdoc.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpdc/invoke-ntpdc.texi@1.384 +3 -3
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc-opts.c@1.399 +10 -9
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc-opts.h@1.399 +3 -3
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc.1ntpdcman@1.215 +2 -2
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.215 +2 -2
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc.html@1.228 +3 -3
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc.man.in@1.215 +2 -2
+ NTP_4_2_7P395
+
+ ntpdc/ntpdc.mdoc.in@1.215 +2 -2
+ NTP_4_2_7P395
+
+ ntpq/invoke-ntpq.texi@1.388 +3 -3
+ NTP_4_2_7P395
+
+ ntpq/ntpq-opts.c@1.402 +10 -9
+ NTP_4_2_7P395
+
+ ntpq/ntpq-opts.h@1.402 +3 -3
+ NTP_4_2_7P395
+
+ ntpq/ntpq.1ntpqman@1.216 +2 -2
+ NTP_4_2_7P395
+
+ ntpq/ntpq.1ntpqmdoc@1.216 +2 -2
+ NTP_4_2_7P395
+
+ ntpq/ntpq.html@1.60 +2 -2
+ NTP_4_2_7P395
+
+ ntpq/ntpq.man.in@1.216 +2 -2
+ NTP_4_2_7P395
+
+ ntpq/ntpq.mdoc.in@1.216 +2 -2
+ NTP_4_2_7P395
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.387 +3 -3
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.402 +10 -9
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.402 +3 -3
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd.html@1.58 +1 -1
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd.man.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ packageinfo.sh@1.398 +1 -1
+ NTP_4_2_7P395
+
+ scripts/invoke-ntp-wait.texi@1.204 +3 -3
+ NTP_4_2_7P395
+
+ scripts/ntp-wait.1ntp-waitman@1.215 +3 -3
+ NTP_4_2_7P395
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.215 +3 -3
+ NTP_4_2_7P395
+
+ scripts/ntp-wait.html@1.220 +3 -3
+ NTP_4_2_7P395
+
+ scripts/ntp-wait.man.in@1.215 +3 -3
+ NTP_4_2_7P395
+
+ scripts/ntp-wait.mdoc.in@1.215 +3 -3
+ NTP_4_2_7P395
+
+ sntp/invoke-sntp.texi@1.384 +15 -13
+ NTP_4_2_7P395
+
+ sntp/sntp-opts.c@1.399 +10 -9
+ NTP_4_2_7P395
+
+ sntp/sntp-opts.h@1.399 +3 -3
+ NTP_4_2_7P395
+
+ sntp/sntp.1sntpman@1.219 +3 -3
+ NTP_4_2_7P395
+
+ sntp/sntp.1sntpmdoc@1.219 +3 -3
+ NTP_4_2_7P395
+
+ sntp/sntp.html@1.399 +14 -13
+ NTP_4_2_7P395
+
+ sntp/sntp.man.in@1.219 +3 -3
+ NTP_4_2_7P395
+
+ sntp/sntp.mdoc.in@1.219 +3 -3
+ NTP_4_2_7P395
+
+ util/invoke-ntp-keygen.texi@1.388 +14 -14
+ NTP_4_2_7P395
+
+ util/ntp-keygen-opts.c@1.402 +10 -9
+ NTP_4_2_7P395
+
+ util/ntp-keygen-opts.h@1.402 +3 -3
+ NTP_4_2_7P395
+
+ util/ntp-keygen.1ntp-keygenman@1.216 +3 -3
+ NTP_4_2_7P395
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.216 +3 -3
+ NTP_4_2_7P395
+
+ util/ntp-keygen.html@1.64 +2 -2
+ NTP_4_2_7P395
+
+ util/ntp-keygen.man.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ util/ntp-keygen.mdoc.in@1.216 +3 -3
+ NTP_4_2_7P395
+
+ChangeSet@1.3004, 2013-11-12 08:16:16+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ ChangeLog@1.1350 +1 -0
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/include/autogen-version.def@1.19 +2 -2
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/Makefile.am@1.23 +4 -4
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/ag-char-map.h@1.26 +2 -3
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/ao-strs.c@1.12 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/ao-strs.h@1.11 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/autoopts/options.h@1.25 +51 -51
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/autoopts/usage-txt.h@1.25 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/compat/compat.h@1.14 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/genshell.c@1.26 +49 -48
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/genshell.h@1.26 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/m4/libopts.m4@1.29 +1 -2
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/option-value-type.c@1.13 +2 -2
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/option-value-type.h@1.27 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/option-xat-attribute.c@1.13 +2 -2
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/option-xat-attribute.h@1.27 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ sntp/libopts/proto.h@1.26 +1 -1
+ Upgrade to autogen-5.18.3pre5 and libopts-40.1.15
+
+ChangeSet@1.3003, 2013-11-05 11:37:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P394
+ TAG: NTP_4_2_7P394
+
+ ChangeLog@1.1349 +1 -0
+ NTP_4_2_7P394
+
+ ntpd/invoke-ntp.conf.texi@1.72 +1 -1
+ NTP_4_2_7P394
+
+ ntpd/invoke-ntp.keys.texi@1.70 +1 -1
+ NTP_4_2_7P394
+
+ ntpd/invoke-ntpd.texi@1.386 +2 -2
+ NTP_4_2_7P394
+
+ ntpd/ntp.conf.5man@1.106 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.conf.5mdoc@1.106 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.conf.html@1.67 +1 -1
+ NTP_4_2_7P394
+
+ ntpd/ntp.conf.man.in@1.106 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.conf.mdoc.in@1.106 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.keys.5man@1.104 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.keys.5mdoc@1.104 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.keys.html@1.68 +1 -1
+ NTP_4_2_7P394
+
+ ntpd/ntp.keys.man.in@1.104 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntp.keys.mdoc.in@1.104 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntpd-opts.c@1.404 +7 -7
+ NTP_4_2_7P394
+
+ ntpd/ntpd-opts.h@1.404 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntpd.1ntpdman@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntpd.1ntpdmdoc@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntpd.html@1.62 +2 -2
+ NTP_4_2_7P394
+
+ ntpd/ntpd.man.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpd/ntpd.mdoc.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpdc/invoke-ntpdc.texi@1.383 +2 -2
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc-opts.c@1.398 +7 -7
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc-opts.h@1.398 +3 -3
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc.1ntpdcman@1.214 +2 -2
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.214 +2 -2
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc.html@1.227 +2 -2
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc.man.in@1.214 +2 -2
+ NTP_4_2_7P394
+
+ ntpdc/ntpdc.mdoc.in@1.214 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/invoke-ntpq.texi@1.387 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/ntpq-opts.c@1.401 +7 -7
+ NTP_4_2_7P394
+
+ ntpq/ntpq-opts.h@1.401 +3 -3
+ NTP_4_2_7P394
+
+ ntpq/ntpq.1ntpqman@1.215 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/ntpq.1ntpqmdoc@1.215 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/ntpq.html@1.59 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/ntpq.man.in@1.215 +2 -2
+ NTP_4_2_7P394
+
+ ntpq/ntpq.mdoc.in@1.215 +2 -2
+ NTP_4_2_7P394
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.386 +2 -2
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.401 +7 -7
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.401 +3 -3
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd.html@1.57 +1 -1
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd.man.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ packageinfo.sh@1.397 +1 -1
+ NTP_4_2_7P394
+
+ scripts/invoke-ntp-wait.texi@1.203 +14 -2
+ NTP_4_2_7P394
+
+ scripts/ntp-wait.1ntp-waitman@1.214 +3 -3
+ NTP_4_2_7P394
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.214 +3 -3
+ NTP_4_2_7P394
+
+ scripts/ntp-wait.html@1.219 +14 -2
+ NTP_4_2_7P394
+
+ scripts/ntp-wait.man.in@1.214 +3 -3
+ NTP_4_2_7P394
+
+ scripts/ntp-wait.mdoc.in@1.214 +3 -3
+ NTP_4_2_7P394
+
+ sntp/invoke-sntp.texi@1.383 +2 -2
+ NTP_4_2_7P394
+
+ sntp/sntp-opts.c@1.398 +7 -7
+ NTP_4_2_7P394
+
+ sntp/sntp-opts.h@1.398 +3 -3
+ NTP_4_2_7P394
+
+ sntp/sntp.1sntpman@1.218 +3 -3
+ NTP_4_2_7P394
+
+ sntp/sntp.1sntpmdoc@1.218 +3 -3
+ NTP_4_2_7P394
+
+ sntp/sntp.html@1.398 +2 -2
+ NTP_4_2_7P394
+
+ sntp/sntp.man.in@1.218 +3 -3
+ NTP_4_2_7P394
+
+ sntp/sntp.mdoc.in@1.218 +3 -3
+ NTP_4_2_7P394
+
+ util/invoke-ntp-keygen.texi@1.387 +2 -2
+ NTP_4_2_7P394
+
+ util/ntp-keygen-opts.c@1.401 +7 -7
+ NTP_4_2_7P394
+
+ util/ntp-keygen-opts.h@1.401 +3 -3
+ NTP_4_2_7P394
+
+ util/ntp-keygen.1ntp-keygenman@1.215 +3 -3
+ NTP_4_2_7P394
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.215 +3 -3
+ NTP_4_2_7P394
+
+ util/ntp-keygen.html@1.63 +2 -2
+ NTP_4_2_7P394
+
+ util/ntp-keygen.man.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ util/ntp-keygen.mdoc.in@1.215 +3 -3
+ NTP_4_2_7P394
+
+ChangeSet@1.2996.4.1, 2013-11-02 16:14:35+01:00, jnperlin@nemesis.localnet
+ [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples.
+
+ ChangeLog@1.1346.2.1 +1 -0
+ [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.70 +29 -29
+ [Bug 2499] Win32 user-space/loopback ppsapi provider drops samples.
+ Caused by FIFO buffer access logic.
+
+ChangeSet@1.2996.3.1, 2013-11-01 10:37:27+01:00, jnperlin@nemesis.localnet
+ [Bug 2272] (update) Use C99 integer types.
+
+ include/ntp_calendar.h@1.13 +76 -76
+ [Bug 2272] (update) Use C99 integer types. Consequently, not for just u_char.
+
+ libntp/caljulian.c@1.15 +1 -1
+ [Bug 2272] (update) Use C99 integer types.
+
+ libntp/caltontp.c@1.6 +3 -3
+ [Bug 2272] (update) Use C99 integer types.
+
+ libntp/ntp_calendar.c@1.11 +157 -155
+ [Bug 2272] (update) Use C99 integer types. Consequently, not for just u_char.
+
+ ports/winnt/include/config.h@1.105 +0 -5
+ [Bug 2272] (update) Use C99 integer types.
+ Avoid including stdint/stdtypes from inside the config header.
+
+ ports/winnt/include/stdint.h@1.1 +244 -0
+ [Bug 2272] (update) Use C99 integer types.
+ Provide a C99 compatible <stdint.h> for local use if the compiler comes without one.
+
+ ports/winnt/include/stdint.h@1.0 +0 -0
+
+ChangeSet@1.3001, 2013-10-28 08:17:56+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2256] Improve configure's function searches in libraries
+
+ configure.ac@1.567 +1 -1
+ [Bug 2256] Improve configure's function searches in libraries
+
+ sntp/configure.ac@1.76 +3 -1
+ [Bug 2256] Improve configure's function searches in libraries
+
+ sntp/m4/ntp_ipv6.m4@1.8 +4 -0
+ [Bug 2256] Improve configure's function searches in libraries
+
+ChangeSet@1.3000, 2013-10-26 09:04:23+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2256] Improve configure's function searches in libraries
+
+ configure.ac@1.566 +6 -12
+ [Bug 2256] Improve configure's function searches in libraries
+
+ChangeSet@1.2996.1.7, 2013-10-25 18:32:28+02:00, jnperlin@hydra.(none)
+ [Bug 1050] Change ONCORE log message for leap second announcement to avoid misunderstandings.
+
+ ChangeLog@1.1346.1.1 +2 -0
+ [Bug 1050] Change ONCORE log message for leap second announcement to avoid misunderstandings.
+
+ ntpd/refclock_oncore.c@1.99 +21 -4
+ [Bug 1050] Change ONCORE log message for leap second announcement to avoid misunderstandings.
+
+ChangeSet@1.2998, 2013-10-17 07:15:02+00:00, stenn@psp-deb1.ntp.org
+ [Bug 2256] Improve configure's function searches in libraries
+
+ ChangeLog@1.1341.1.1 +1 -0
+ [Bug 2256] Improve configure's function searches in libraries
+
+ sntp/configure.ac@1.75 +2 -0
+ [Bug 2256] Improve configure's function searches in libraries
+
+ sntp/m4/hms_search_lib.m4@1.1 +30 -0
+ BitKeeper file /home/stenn/ntp-dev-2256/sntp/m4/hms_search_lib.m4
+
+ sntp/m4/hms_search_lib.m4@1.0 +0 -0
+
+ sntp/m4/ntp_libntp.m4@1.20.1.1 +9 -5
+ [Bug 2256] Improve configure's function searches in libraries
+
+ChangeSet@1.2996.1.6, 2013-10-16 11:37:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P393
+ TAG: NTP_4_2_7P393
+
+ ChangeLog@1.1346 +1 -0
+ NTP_4_2_7P393
+
+ ntpd/invoke-ntp.conf.texi@1.71 +1 -1
+ NTP_4_2_7P393
+
+ ntpd/invoke-ntp.keys.texi@1.69 +1 -1
+ NTP_4_2_7P393
+
+ ntpd/invoke-ntpd.texi@1.385 +2 -2
+ NTP_4_2_7P393
+
+ ntpd/ntp.conf.5man@1.105 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.conf.5mdoc@1.105 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.conf.html@1.66 +1 -1
+ NTP_4_2_7P393
+
+ ntpd/ntp.conf.man.in@1.105 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.conf.mdoc.in@1.105 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.keys.5man@1.103 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.keys.5mdoc@1.103 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.keys.html@1.67 +1 -1
+ NTP_4_2_7P393
+
+ ntpd/ntp.keys.man.in@1.103 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntp.keys.mdoc.in@1.103 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntpd-opts.c@1.403 +7 -7
+ NTP_4_2_7P393
+
+ ntpd/ntpd-opts.h@1.403 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntpd.1ntpdman@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntpd.1ntpdmdoc@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntpd.html@1.61 +2 -2
+ NTP_4_2_7P393
+
+ ntpd/ntpd.man.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpd/ntpd.mdoc.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpdc/invoke-ntpdc.texi@1.382 +2 -2
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc-opts.c@1.397 +7 -7
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc-opts.h@1.397 +3 -3
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc.1ntpdcman@1.213 +2 -2
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.213 +2 -2
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc.html@1.226 +2 -2
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc.man.in@1.213 +2 -2
+ NTP_4_2_7P393
+
+ ntpdc/ntpdc.mdoc.in@1.213 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/invoke-ntpq.texi@1.386 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/ntpq-opts.c@1.400 +7 -7
+ NTP_4_2_7P393
+
+ ntpq/ntpq-opts.h@1.400 +3 -3
+ NTP_4_2_7P393
+
+ ntpq/ntpq.1ntpqman@1.214 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/ntpq.1ntpqmdoc@1.214 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/ntpq.html@1.58 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/ntpq.man.in@1.214 +2 -2
+ NTP_4_2_7P393
+
+ ntpq/ntpq.mdoc.in@1.214 +2 -2
+ NTP_4_2_7P393
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.385 +2 -2
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.400 +7 -7
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.400 +3 -3
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd.html@1.56 +1 -1
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd.man.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ packageinfo.sh@1.396 +1 -1
+ NTP_4_2_7P393
+
+ scripts/invoke-ntp-wait.texi@1.202 +1 -1
+ NTP_4_2_7P393
+
+ scripts/ntp-wait.1ntp-waitman@1.213 +3 -3
+ NTP_4_2_7P393
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.213 +3 -3
+ NTP_4_2_7P393
+
+ scripts/ntp-wait.html@1.218 +1 -1
+ NTP_4_2_7P393
+
+ scripts/ntp-wait.man.in@1.213 +3 -3
+ NTP_4_2_7P393
+
+ scripts/ntp-wait.mdoc.in@1.213 +3 -3
+ NTP_4_2_7P393
+
+ sntp/invoke-sntp.texi@1.382 +2 -2
+ NTP_4_2_7P393
+
+ sntp/sntp-opts.c@1.397 +7 -7
+ NTP_4_2_7P393
+
+ sntp/sntp-opts.h@1.397 +3 -3
+ NTP_4_2_7P393
+
+ sntp/sntp.1sntpman@1.217 +3 -3
+ NTP_4_2_7P393
+
+ sntp/sntp.1sntpmdoc@1.217 +3 -3
+ NTP_4_2_7P393
+
+ sntp/sntp.html@1.397 +2 -2
+ NTP_4_2_7P393
+
+ sntp/sntp.man.in@1.217 +3 -3
+ NTP_4_2_7P393
+
+ sntp/sntp.mdoc.in@1.217 +3 -3
+ NTP_4_2_7P393
+
+ util/invoke-ntp-keygen.texi@1.386 +2 -2
+ NTP_4_2_7P393
+
+ util/ntp-keygen-opts.c@1.400 +7 -7
+ NTP_4_2_7P393
+
+ util/ntp-keygen-opts.h@1.400 +3 -3
+ NTP_4_2_7P393
+
+ util/ntp-keygen.1ntp-keygenman@1.214 +3 -3
+ NTP_4_2_7P393
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.214 +3 -3
+ NTP_4_2_7P393
+
+ util/ntp-keygen.html@1.62 +2 -2
+ NTP_4_2_7P393
+
+ util/ntp-keygen.man.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ util/ntp-keygen.mdoc.in@1.214 +3 -3
+ NTP_4_2_7P393
+
+ChangeSet@1.2996.1.5, 2013-10-16 08:45:10+00:00, stenn@hikaru.il.thewrittenword.com
+ [Bug 2272] Use c99 integer types: ntp_calendar.h, ntp_types.h
+
+ ChangeLog@1.1345 +1 -0
+ [Bug 2272] Use c99 integer types: ntp_calendar.h, ntp_types.h
+
+ include/ntp_calendar.h@1.12 +14 -14
+ [Bug 2272] Use c99 integer types: ntp_calendar.h, ntp_types.h
+
+ include/ntp_types.h@1.33 +13 -8
+ [Bug 2272] Use c99 integer types: ntp_calendar.h, ntp_types.h
+
+ChangeSet@1.2996.1.4, 2013-10-15 11:35:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P392
+ TAG: NTP_4_2_7P392
+
+ ChangeLog@1.1344 +1 -0
+ NTP_4_2_7P392
+
+ ntpd/invoke-ntp.conf.texi@1.70 +1 -1
+ NTP_4_2_7P392
+
+ ntpd/invoke-ntp.keys.texi@1.68 +1 -1
+ NTP_4_2_7P392
+
+ ntpd/invoke-ntpd.texi@1.384 +2 -2
+ NTP_4_2_7P392
+
+ ntpd/ntp.conf.5man@1.104 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.conf.5mdoc@1.104 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.conf.html@1.65 +1 -1
+ NTP_4_2_7P392
+
+ ntpd/ntp.conf.man.in@1.104 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.conf.mdoc.in@1.104 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.keys.5man@1.102 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.keys.5mdoc@1.102 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.keys.html@1.66 +1 -1
+ NTP_4_2_7P392
+
+ ntpd/ntp.keys.man.in@1.102 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntp.keys.mdoc.in@1.102 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntpd-opts.c@1.402 +7 -7
+ NTP_4_2_7P392
+
+ ntpd/ntpd-opts.h@1.402 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntpd.1ntpdman@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntpd.1ntpdmdoc@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntpd.html@1.60 +2 -2
+ NTP_4_2_7P392
+
+ ntpd/ntpd.man.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpd/ntpd.mdoc.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpdc/invoke-ntpdc.texi@1.381 +2 -2
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc-opts.c@1.396 +7 -7
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc-opts.h@1.396 +3 -3
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc.1ntpdcman@1.212 +2 -2
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.212 +2 -2
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc.html@1.225 +2 -2
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc.man.in@1.212 +2 -2
+ NTP_4_2_7P392
+
+ ntpdc/ntpdc.mdoc.in@1.212 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/invoke-ntpq.texi@1.385 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/ntpq-opts.c@1.399 +7 -7
+ NTP_4_2_7P392
+
+ ntpq/ntpq-opts.h@1.399 +3 -3
+ NTP_4_2_7P392
+
+ ntpq/ntpq.1ntpqman@1.213 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/ntpq.1ntpqmdoc@1.213 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/ntpq.html@1.57 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/ntpq.man.in@1.213 +2 -2
+ NTP_4_2_7P392
+
+ ntpq/ntpq.mdoc.in@1.213 +2 -2
+ NTP_4_2_7P392
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.384 +2 -2
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.399 +7 -7
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.399 +3 -3
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd.html@1.55 +1 -1
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd.man.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ packageinfo.sh@1.395 +1 -1
+ NTP_4_2_7P392
+
+ scripts/invoke-ntp-wait.texi@1.201 +1 -1
+ NTP_4_2_7P392
+
+ scripts/ntp-wait.1ntp-waitman@1.212 +3 -3
+ NTP_4_2_7P392
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.212 +3 -3
+ NTP_4_2_7P392
+
+ scripts/ntp-wait.html@1.217 +1 -1
+ NTP_4_2_7P392
+
+ scripts/ntp-wait.man.in@1.212 +3 -3
+ NTP_4_2_7P392
+
+ scripts/ntp-wait.mdoc.in@1.212 +3 -3
+ NTP_4_2_7P392
+
+ sntp/invoke-sntp.texi@1.381 +2 -2
+ NTP_4_2_7P392
+
+ sntp/sntp-opts.c@1.396 +7 -7
+ NTP_4_2_7P392
+
+ sntp/sntp-opts.h@1.396 +3 -3
+ NTP_4_2_7P392
+
+ sntp/sntp.1sntpman@1.216 +3 -3
+ NTP_4_2_7P392
+
+ sntp/sntp.1sntpmdoc@1.216 +3 -3
+ NTP_4_2_7P392
+
+ sntp/sntp.html@1.396 +2 -2
+ NTP_4_2_7P392
+
+ sntp/sntp.man.in@1.216 +3 -3
+ NTP_4_2_7P392
+
+ sntp/sntp.mdoc.in@1.216 +3 -3
+ NTP_4_2_7P392
+
+ util/invoke-ntp-keygen.texi@1.385 +2 -2
+ NTP_4_2_7P392
+
+ util/ntp-keygen-opts.c@1.399 +7 -7
+ NTP_4_2_7P392
+
+ util/ntp-keygen-opts.h@1.399 +3 -3
+ NTP_4_2_7P392
+
+ util/ntp-keygen.1ntp-keygenman@1.213 +3 -3
+ NTP_4_2_7P392
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.213 +3 -3
+ NTP_4_2_7P392
+
+ util/ntp-keygen.html@1.61 +2 -2
+ NTP_4_2_7P392
+
+ util/ntp-keygen.man.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ util/ntp-keygen.mdoc.in@1.213 +3 -3
+ NTP_4_2_7P392
+
+ChangeSet@1.2996.1.3, 2013-10-15 03:16:55-07:00, harlan@hms-mbp11.local
+ [Bug 2375] Improve AIX compatibility
+
+ ChangeLog@1.1343 +1 -0
+ [Bug 2375] Improve AIX compatibility
+
+ configure.ac@1.563.1.2 +10 -5
+ [Bug 2375] Improve AIX compatibility
+
+ sntp/m4/ntp_libntp.m4@1.21 +6 -3
+ [Bug 2375] Improve AIX compatibility
+
+ sntp/m4/os_cflags.m4@1.9 +6 -1
+ [Bug 2375] Improve AIX compatibility
+
+ChangeSet@1.2996.2.1, 2013-10-14 21:11:05+02:00, jnperlin@hydra.localnet
+ [Bug 2490] Fixed non-const initializer introduced with [Bug 2250] fix.
+
+ ChangeLog@1.1342 +1 -0
+ [Bug 2490] Fixed non-const initializer introduced with [Bug 2250] fix.
+
+ ntpd/ntp_control.c@1.187 +4 -4
+ [Bug 2490] Fixed non-const initializer introduced with [Bug 2250] fix.
+
+ChangeSet@1.2996.1.1, 2013-10-13 17:43:29-07:00, harlan@hms-mbp11.local
+ Fix comments and netbsd patterns in configure.ac
+
+ configure.ac@1.563.1.1 +14 -14
+ Fix comments and netbsd patterns in configure.ac
+
+ChangeSet@1.2990.1.1, 2013-10-13 09:26:49+00:00, stenn@psp-fb1.ntp.org
+ Prep for fixing bug 2256
+
+ configure.ac@1.562.1.1 +9 -0
+ Prep for fixing bug 2256
+
+ sntp/configure.ac@1.74 +6 -1
+ Prep for fixing bug 2256
+
+ChangeSet@1.2996, 2013-10-12 11:26:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P391
+ TAG: NTP_4_2_7P391
+
+ ChangeLog@1.1341 +1 -0
+ NTP_4_2_7P391
+
+ ntpd/invoke-ntp.conf.texi@1.69 +1 -1
+ NTP_4_2_7P391
+
+ ntpd/invoke-ntp.keys.texi@1.67 +1 -1
+ NTP_4_2_7P391
+
+ ntpd/invoke-ntpd.texi@1.383 +2 -2
+ NTP_4_2_7P391
+
+ ntpd/ntp.conf.5man@1.103 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.conf.5mdoc@1.103 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.conf.html@1.64 +1 -1
+ NTP_4_2_7P391
+
+ ntpd/ntp.conf.man.in@1.103 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.conf.mdoc.in@1.103 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.keys.5man@1.101 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.keys.5mdoc@1.101 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.keys.html@1.65 +1 -1
+ NTP_4_2_7P391
+
+ ntpd/ntp.keys.man.in@1.101 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntp.keys.mdoc.in@1.101 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntpd-opts.c@1.401 +7 -7
+ NTP_4_2_7P391
+
+ ntpd/ntpd-opts.h@1.401 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntpd.1ntpdman@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntpd.1ntpdmdoc@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntpd.html@1.59 +2 -2
+ NTP_4_2_7P391
+
+ ntpd/ntpd.man.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpd/ntpd.mdoc.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpdc/invoke-ntpdc.texi@1.380 +2 -2
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc-opts.c@1.395 +7 -7
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc-opts.h@1.395 +3 -3
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc.1ntpdcman@1.211 +2 -2
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.211 +2 -2
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc.html@1.224 +2 -2
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc.man.in@1.211 +2 -2
+ NTP_4_2_7P391
+
+ ntpdc/ntpdc.mdoc.in@1.211 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/invoke-ntpq.texi@1.384 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/ntpq-opts.c@1.398 +7 -7
+ NTP_4_2_7P391
+
+ ntpq/ntpq-opts.h@1.398 +3 -3
+ NTP_4_2_7P391
+
+ ntpq/ntpq.1ntpqman@1.212 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/ntpq.1ntpqmdoc@1.212 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/ntpq.html@1.56 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/ntpq.man.in@1.212 +2 -2
+ NTP_4_2_7P391
+
+ ntpq/ntpq.mdoc.in@1.212 +2 -2
+ NTP_4_2_7P391
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.383 +2 -2
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.398 +7 -7
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.398 +3 -3
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd.html@1.54 +1 -1
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd.man.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ packageinfo.sh@1.394 +1 -1
+ NTP_4_2_7P391
+
+ scripts/invoke-ntp-wait.texi@1.200 +2 -14
+ NTP_4_2_7P391
+
+ scripts/ntp-wait.1ntp-waitman@1.211 +3 -3
+ NTP_4_2_7P391
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.211 +3 -3
+ NTP_4_2_7P391
+
+ scripts/ntp-wait.html@1.216 +2 -14
+ NTP_4_2_7P391
+
+ scripts/ntp-wait.man.in@1.211 +3 -3
+ NTP_4_2_7P391
+
+ scripts/ntp-wait.mdoc.in@1.211 +3 -3
+ NTP_4_2_7P391
+
+ sntp/invoke-sntp.texi@1.380 +2 -2
+ NTP_4_2_7P391
+
+ sntp/sntp-opts.c@1.395 +7 -7
+ NTP_4_2_7P391
+
+ sntp/sntp-opts.h@1.395 +3 -3
+ NTP_4_2_7P391
+
+ sntp/sntp.1sntpman@1.215 +3 -3
+ NTP_4_2_7P391
+
+ sntp/sntp.1sntpmdoc@1.215 +3 -3
+ NTP_4_2_7P391
+
+ sntp/sntp.html@1.395 +2 -2
+ NTP_4_2_7P391
+
+ sntp/sntp.man.in@1.215 +3 -3
+ NTP_4_2_7P391
+
+ sntp/sntp.mdoc.in@1.215 +3 -3
+ NTP_4_2_7P391
+
+ util/invoke-ntp-keygen.texi@1.384 +2 -2
+ NTP_4_2_7P391
+
+ util/ntp-keygen-opts.c@1.398 +7 -7
+ NTP_4_2_7P391
+
+ util/ntp-keygen-opts.h@1.398 +3 -3
+ NTP_4_2_7P391
+
+ util/ntp-keygen.1ntp-keygenman@1.212 +3 -3
+ NTP_4_2_7P391
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.212 +3 -3
+ NTP_4_2_7P391
+
+ util/ntp-keygen.html@1.60 +2 -2
+ NTP_4_2_7P391
+
+ util/ntp-keygen.man.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ util/ntp-keygen.mdoc.in@1.212 +3 -3
+ NTP_4_2_7P391
+
+ChangeSet@1.2991.1.1, 2013-10-06 15:06:40+02:00, jnperlin@hydra.localnet
+ [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends data without valid GPS fix.
+
+ ChangeLog@1.1338.1.1 +2 -0
+ [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends data without valid GPS fix.
+
+ ntpd/refclock_nmea.c@1.72 +38 -22
+ [Bug 2419] [rc-nmea] Improve clockstats reporting when receiver sends data without valid GPS fix.
+
+ChangeSet@1.2994, 2013-10-03 14:55:29+02:00, jnperlin@hydra.localnet
+ [Bug 2250] Cleanup & Win32 integration of the NTPD leapsec module
+ fixed handling of leap second removal
+ trigger logic and windows port for leap seconds
+
+ include/ntpd.h@1.180 +1 -0
+ [Bug 2250] make difference in TAI offset at next leap second globally visible
+
+ ntpd/ntp_crypto.c@1.165 +2 -2
+ [Bug 2250] some argument reordering in leapsec module for clearer code
+
+ ntpd/ntp_leapsec.c@1.3 +137 -87
+ [Bug 2250] further cleanup & MSVC warning issues
+ better support for Win32 clock handling;
+ some argument reordering and more consistent naming
+ handling of leap second removal was buggy
+ some further refinements in parsing
+
+ ntpd/ntp_leapsec.h@1.2 +55 -24
+ [Bug 2250] further cleanup & MSVC warning issues;
+ some argument reordering
+
+ ntpd/ntp_proto.c@1.348 +3 -3
+ [Bug 2250] reset leap frame by API function
+ some argument reordering in leapsec module for clearer code
+
+ ntpd/ntp_timer.c@1.74 +35 -27
+ [Bug 2250] let windows clock stuff decide how to handle a leap second
+ separation of concerns
+ fix trigger logic for leap events
+
+ ntpd/ntp_util.c@1.104 +1 -5
+ [Bug 2250] use proper leapsec function to read file
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.61 +43 -48
+ [Bug 2250] use NTPD's leapsec module to decide when leap seconds occur
+ fix offset NTP vs FILETIME (don't trust constants you haven't calculated yourself...)
+
+ ports/winnt/vs2005/ntpd.vcproj@1.19 +8 -0
+ [Bug 2250] add ntp_leapsec.* to build
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.46 +8 -0
+ [Bug 2250] add ntp_leapsec.* to build
+
+ tests/ntpd/leapsec.cpp@1.2 +246 -85
+ [Bug 2250] some argument reordering in leapsec module for clearer code
+ removed some irrelevant checks
+ added a (faked) leap second deleteion table and test cases
+
+ChangeSet@1.2993, 2013-09-28 08:43:01+02:00, jnperlin@hydra.localnet
+ [Bug 2250] minor cleanup
+
+ ntpd/ntp_leapsec.c@1.2 +25 -18
+ [Bug 2250] minor cleanup
+
+ChangeSet@1.2985.2.1, 2013-09-27 20:37:04+02:00, jnperlin@hydra.localnet
+ [Bug 2250] Rework of leap second handling machine
+
+ ChangeLog@1.1333.2.1 +1 -0
+ [Bug 2250] Rework of leap second handling machine
+
+ configure.ac@1.561.1.1 +1 -0
+ [Bug 2250] add unit test dir for NTPD modules
+
+ include/ntpd.h@1.179 +1 -6
+ [Bug 2250] removed global values that went into leap second handling module
+
+ ntpd/Makefile.am@1.128 +5 -1
+ [Bug 2250] add references to 'ntp_leapsec.[ch]'
+
+ ntpd/ntp_control.c@1.186 +17 -10
+ [Bug 2250] rewired to 'ntp_leapsec'
+
+ ntpd/ntp_crypto.c@1.164 +18 -12
+ [Bug 2250] rewired to 'ntp_leapsec'
+
+ ntpd/ntp_leapsec.c@1.1 +899 -0
+ [Bug 2250] new module for leap second processing
+
+ ntpd/ntp_leapsec.c@1.0 +0 -0
+
+ ntpd/ntp_leapsec.h@1.1 +165 -0
+ [Bug 2250] new module for leap second processing
+
+ ntpd/ntp_leapsec.h@1.0 +0 -0
+
+ ntpd/ntp_proto.c@1.347 +31 -40
+ [Bug 2250] rewired to 'ntp_leapsec'
+
+ ntpd/ntp_timer.c@1.73 +103 -47
+ [Bug 2250] rewired to 'ntp_leapsec'
+
+ ntpd/ntp_util.c@1.103 +24 -124
+ [Bug 2250] rewired to 'ntp_leapsec'
+
+ tests/Makefile.am@1.5 +4 -1
+ [Bug 2250] subdir references to unit test for NTPD modules
+
+ tests/ntpd/Makefile.am@1.1 +55 -0
+ [Bug 2250] unit test support
+
+ tests/ntpd/Makefile.am@1.0 +0 -0
+
+ tests/ntpd/leapsec.cpp@1.1 +568 -0
+ [Bug 2250] unit test for leap second machine
+
+ tests/ntpd/leapsec.cpp@1.0 +0 -0
+
+ tests/ntpd/ntpdtest.cpp@1.1 +27 -0
+ [Bug 2250] unit test support
+
+ tests/ntpd/ntpdtest.cpp@1.0 +0 -0
+
+ tests/ntpd/ntpdtest.h@1.1 +15 -0
+ [Bug 2250] unit test support
+
+ tests/ntpd/ntpdtest.h@1.0 +0 -0
+
+ChangeSet@1.2991, 2013-09-26 11:37:35+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P390
+ TAG: NTP_4_2_7P390
+
+ ChangeLog@1.1338 +1 -0
+ NTP_4_2_7P390
+
+ ntpd/invoke-ntp.conf.texi@1.68 +1 -1
+ NTP_4_2_7P390
+
+ ntpd/invoke-ntp.keys.texi@1.66 +1 -1
+ NTP_4_2_7P390
+
+ ntpd/invoke-ntpd.texi@1.382 +2 -2
+ NTP_4_2_7P390
+
+ ntpd/ntp.conf.5man@1.102 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.conf.5mdoc@1.102 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.conf.html@1.63 +1 -1
+ NTP_4_2_7P390
+
+ ntpd/ntp.conf.man.in@1.102 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.conf.mdoc.in@1.102 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.keys.5man@1.100 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.keys.5mdoc@1.100 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.keys.html@1.64 +1 -1
+ NTP_4_2_7P390
+
+ ntpd/ntp.keys.man.in@1.100 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntp.keys.mdoc.in@1.100 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntpd-opts.c@1.400 +7 -7
+ NTP_4_2_7P390
+
+ ntpd/ntpd-opts.h@1.400 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntpd.1ntpdman@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntpd.1ntpdmdoc@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntpd.html@1.58 +8 -8
+ NTP_4_2_7P390
+
+ ntpd/ntpd.man.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpd/ntpd.mdoc.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpdc/invoke-ntpdc.texi@1.379 +2 -2
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc-opts.c@1.394 +7 -7
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc-opts.h@1.394 +3 -3
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc.1ntpdcman@1.210 +2 -2
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.210 +2 -2
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc.html@1.223 +2 -2
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc.man.in@1.210 +2 -2
+ NTP_4_2_7P390
+
+ ntpdc/ntpdc.mdoc.in@1.210 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/invoke-ntpq.texi@1.383 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/ntpq-opts.c@1.397 +7 -7
+ NTP_4_2_7P390
+
+ ntpq/ntpq-opts.h@1.397 +3 -3
+ NTP_4_2_7P390
+
+ ntpq/ntpq.1ntpqman@1.211 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/ntpq.1ntpqmdoc@1.211 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/ntpq.html@1.55 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/ntpq.man.in@1.211 +2 -2
+ NTP_4_2_7P390
+
+ ntpq/ntpq.mdoc.in@1.211 +2 -2
+ NTP_4_2_7P390
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.382 +2 -2
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.397 +7 -7
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.397 +3 -3
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd.html@1.53 +1 -1
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd.man.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ packageinfo.sh@1.393 +1 -1
+ NTP_4_2_7P390
+
+ scripts/invoke-ntp-wait.texi@1.199 +1 -1
+ NTP_4_2_7P390
+
+ scripts/ntp-wait.1ntp-waitman@1.210 +3 -3
+ NTP_4_2_7P390
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.210 +3 -3
+ NTP_4_2_7P390
+
+ scripts/ntp-wait.html@1.215 +1 -1
+ NTP_4_2_7P390
+
+ scripts/ntp-wait.man.in@1.210 +3 -3
+ NTP_4_2_7P390
+
+ scripts/ntp-wait.mdoc.in@1.210 +3 -3
+ NTP_4_2_7P390
+
+ sntp/invoke-sntp.texi@1.379 +2 -2
+ NTP_4_2_7P390
+
+ sntp/sntp-opts.c@1.394 +7 -7
+ NTP_4_2_7P390
+
+ sntp/sntp-opts.h@1.394 +3 -3
+ NTP_4_2_7P390
+
+ sntp/sntp.1sntpman@1.214 +3 -3
+ NTP_4_2_7P390
+
+ sntp/sntp.1sntpmdoc@1.214 +3 -3
+ NTP_4_2_7P390
+
+ sntp/sntp.html@1.394 +2 -2
+ NTP_4_2_7P390
+
+ sntp/sntp.man.in@1.214 +3 -3
+ NTP_4_2_7P390
+
+ sntp/sntp.mdoc.in@1.214 +3 -3
+ NTP_4_2_7P390
+
+ util/invoke-ntp-keygen.texi@1.383 +2 -2
+ NTP_4_2_7P390
+
+ util/ntp-keygen-opts.c@1.397 +7 -7
+ NTP_4_2_7P390
+
+ util/ntp-keygen-opts.h@1.397 +3 -3
+ NTP_4_2_7P390
+
+ util/ntp-keygen.1ntp-keygenman@1.211 +3 -3
+ NTP_4_2_7P390
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.211 +3 -3
+ NTP_4_2_7P390
+
+ util/ntp-keygen.html@1.59 +2 -2
+ NTP_4_2_7P390
+
+ util/ntp-keygen.man.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ util/ntp-keygen.mdoc.in@1.211 +3 -3
+ NTP_4_2_7P390
+
+ChangeSet@1.2990, 2013-09-25 08:24:34-04:00, stenn@deacon.udel.edu
+ [Bug 2482] Cleanup of droproot and jail support for Solaris
+
+ ChangeLog@1.1337 +2 -1
+ [Bug 2482] Cleanup of droproot and jail support for Solaris
+
+ ntpd/ntpd.c@1.150 +1 -3
+ [Bug 2482] Cleanup of droproot and jail support for Solaris
+
+ChangeSet@1.2989, 2013-09-24 08:54:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P389
+ TAG: NTP_4_2_7P389
+
+ ChangeLog@1.1336 +1 -0
+ NTP_4_2_7P389
+
+ ntpd/invoke-ntp.conf.texi@1.67 +1 -1
+ NTP_4_2_7P389
+
+ ntpd/invoke-ntp.keys.texi@1.65 +1 -1
+ NTP_4_2_7P389
+
+ ntpd/invoke-ntpd.texi@1.381 +8 -8
+ NTP_4_2_7P389
+
+ ntpd/ntp.conf.5man@1.101 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.conf.5mdoc@1.101 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.conf.html@1.62 +1 -1
+ NTP_4_2_7P389
+
+ ntpd/ntp.conf.man.in@1.101 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.conf.mdoc.in@1.101 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.keys.5man@1.99 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.keys.5mdoc@1.99 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.keys.html@1.63 +1 -1
+ NTP_4_2_7P389
+
+ ntpd/ntp.keys.man.in@1.99 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntp.keys.mdoc.in@1.99 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntpd-opts.c@1.399 +170 -170
+ NTP_4_2_7P389
+
+ ntpd/ntpd-opts.h@1.399 +3 -3
+ NTP_4_2_7P389
+
+ ntpd/ntpd.1ntpdman@1.210 +7 -7
+ NTP_4_2_7P389
+
+ ntpd/ntpd.1ntpdmdoc@1.210 +7 -7
+ NTP_4_2_7P389
+
+ ntpd/ntpd.html@1.57 +2 -2
+ NTP_4_2_7P389
+
+ ntpd/ntpd.man.in@1.210 +7 -7
+ NTP_4_2_7P389
+
+ ntpd/ntpd.mdoc.in@1.210 +7 -7
+ NTP_4_2_7P389
+
+ ntpdc/invoke-ntpdc.texi@1.378 +2 -2
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc-opts.c@1.393 +7 -7
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc-opts.h@1.393 +3 -3
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc.1ntpdcman@1.209 +2 -2
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.209 +2 -2
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc.html@1.222 +2 -2
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc.man.in@1.209 +2 -2
+ NTP_4_2_7P389
+
+ ntpdc/ntpdc.mdoc.in@1.209 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/invoke-ntpq.texi@1.382 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/ntpq-opts.c@1.396 +7 -7
+ NTP_4_2_7P389
+
+ ntpq/ntpq-opts.h@1.396 +3 -3
+ NTP_4_2_7P389
+
+ ntpq/ntpq.1ntpqman@1.210 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/ntpq.1ntpqmdoc@1.210 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/ntpq.html@1.54 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/ntpq.man.in@1.210 +2 -2
+ NTP_4_2_7P389
+
+ ntpq/ntpq.mdoc.in@1.210 +2 -2
+ NTP_4_2_7P389
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.381 +2 -2
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.396 +7 -7
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.396 +3 -3
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.210 +3 -3
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.210 +3 -3
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd.html@1.52 +1 -1
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd.man.in@1.210 +3 -3
+ NTP_4_2_7P389
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.210 +3 -3
+ NTP_4_2_7P389
+
+ packageinfo.sh@1.392 +1 -1
+ NTP_4_2_7P389
+
+ scripts/invoke-ntp-wait.texi@1.198 +1 -1
+ NTP_4_2_7P389
+
+ scripts/ntp-wait.1ntp-waitman@1.209 +3 -3
+ NTP_4_2_7P389
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.209 +3 -3
+ NTP_4_2_7P389
+
+ scripts/ntp-wait.html@1.214 +1 -1
+ NTP_4_2_7P389
+
+ scripts/ntp-wait.man.in@1.209 +3 -3
+ NTP_4_2_7P389
+
+ scripts/ntp-wait.mdoc.in@1.209 +3 -3
+ NTP_4_2_7P389
+
+ sntp/invoke-sntp.texi@1.378 +2 -2
+ NTP_4_2_7P389
+
+ sntp/sntp-opts.c@1.393 +7 -7
+ NTP_4_2_7P389
+
+ sntp/sntp-opts.h@1.393 +3 -3
+ NTP_4_2_7P389
+
+ sntp/sntp.1sntpman@1.213 +3 -3
+ NTP_4_2_7P389
+
+ sntp/sntp.1sntpmdoc@1.213 +3 -3
+ NTP_4_2_7P389
+
+ sntp/sntp.html@1.393 +2 -2
+ NTP_4_2_7P389
+
+ sntp/sntp.man.in@1.213 +3 -3
+ NTP_4_2_7P389
+
+ sntp/sntp.mdoc.in@1.213 +3 -3
+ NTP_4_2_7P389
+
+ util/invoke-ntp-keygen.texi@1.382 +2 -2
+ NTP_4_2_7P389
+
+ util/ntp-keygen-opts.c@1.396 +7 -7
+ NTP_4_2_7P389
+
+ util/ntp-keygen-opts.h@1.396 +3 -3
+ NTP_4_2_7P389
+
+ util/ntp-keygen.1ntp-keygenman@1.210 +3 -3
+ NTP_4_2_7P389
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.210 +3 -3
+ NTP_4_2_7P389
+
+ util/ntp-keygen.html@1.58 +2 -2
+ NTP_4_2_7P389
+
+ util/ntp-keygen.man.in@1.210 +3 -3
+ NTP_4_2_7P389
+
+ util/ntp-keygen.mdoc.in@1.210 +3 -3
+ NTP_4_2_7P389
+
+ChangeSet@1.2988, 2013-09-24 04:30:55-04:00, stenn@deacon.udel.edu
+ #ifdef PRIV_AWARE_RESET for older Solaris for now...
+
+ ntpd/ntpd.c@1.149 +2 -0
+ #ifdef PRIV_AWARE_RESET for older Solaris for now...
+
+ChangeSet@1.2985.1.1, 2013-09-24 04:05:09-04:00, stenn@pogo.udel.edu
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ ChangeLog@1.1333.1.2 +1 -0
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ ChangeLog@1.1333.1.1 +1 -0
+ [Bug 2481] ntpd aborts when both user and group are specified with -u
+
+ configure.ac@1.562 +0 -11
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ ntpd/cmd_args.c@1.61 +4 -1
+ [Bug 2481] ntpd aborts when both user and group are specified with -u
+
+ ntpd/ntpd.c@1.148 +44 -5
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ ntpd/ntpdbase-opts.def@1.26 +6 -6
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ sntp/m4/ntp_libntp.m4@1.20 +37 -1
+ [Bug 2482] Add droproot ahd jail support for Solaris
+
+ChangeSet@1.2986, 2013-09-20 13:40:43+02:00, jnperlin@hydra.localnet
+ [Bug 2473] revisited: Avoid possible unsigned underrun for startup condition when testing for clock backstep.
+
+ ChangeLog@1.1334 +3 -0
+ [Bug 2473] revisited: Avoid possible unsigned underrun for startup condition when testing for clock backstep.
+
+ libntp/systime.c@1.68 +10 -2
+ [Bug 2473] revisited: Avoid possible unsigned underrun for startup condition when testing for clock backstep.
+
+ChangeSet@1.2985, 2013-09-19 11:35:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P388
+ TAG: NTP_4_2_7P388
+
+ ChangeLog@1.1333 +1 -0
+ NTP_4_2_7P388
+
+ ntpd/invoke-ntp.conf.texi@1.66 +1 -1
+ NTP_4_2_7P388
+
+ ntpd/invoke-ntp.keys.texi@1.64 +1 -1
+ NTP_4_2_7P388
+
+ ntpd/invoke-ntpd.texi@1.380 +2 -2
+ NTP_4_2_7P388
+
+ ntpd/ntp.conf.5man@1.100 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.conf.5mdoc@1.100 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.conf.html@1.61 +1 -1
+ NTP_4_2_7P388
+
+ ntpd/ntp.conf.man.in@1.100 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.conf.mdoc.in@1.100 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.keys.5man@1.98 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.keys.5mdoc@1.98 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.keys.html@1.62 +1 -1
+ NTP_4_2_7P388
+
+ ntpd/ntp.keys.man.in@1.98 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntp.keys.mdoc.in@1.98 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntpd-opts.c@1.398 +7 -7
+ NTP_4_2_7P388
+
+ ntpd/ntpd-opts.h@1.398 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntpd.1ntpdman@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntpd.1ntpdmdoc@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntpd.html@1.56 +2 -2
+ NTP_4_2_7P388
+
+ ntpd/ntpd.man.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpd/ntpd.mdoc.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpdc/invoke-ntpdc.texi@1.377 +2 -2
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc-opts.c@1.392 +7 -7
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc-opts.h@1.392 +3 -3
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc.1ntpdcman@1.208 +2 -2
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.208 +2 -2
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc.html@1.221 +2 -2
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc.man.in@1.208 +2 -2
+ NTP_4_2_7P388
+
+ ntpdc/ntpdc.mdoc.in@1.208 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/invoke-ntpq.texi@1.381 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/ntpq-opts.c@1.395 +7 -7
+ NTP_4_2_7P388
+
+ ntpq/ntpq-opts.h@1.395 +3 -3
+ NTP_4_2_7P388
+
+ ntpq/ntpq.1ntpqman@1.209 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/ntpq.1ntpqmdoc@1.209 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/ntpq.html@1.53 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/ntpq.man.in@1.209 +2 -2
+ NTP_4_2_7P388
+
+ ntpq/ntpq.mdoc.in@1.209 +2 -2
+ NTP_4_2_7P388
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.380 +2 -2
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.395 +7 -7
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.395 +3 -3
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd.html@1.51 +1 -1
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd.man.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ packageinfo.sh@1.391 +1 -1
+ NTP_4_2_7P388
+
+ scripts/invoke-ntp-wait.texi@1.197 +1 -1
+ NTP_4_2_7P388
+
+ scripts/ntp-wait.1ntp-waitman@1.208 +3 -3
+ NTP_4_2_7P388
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.208 +3 -3
+ NTP_4_2_7P388
+
+ scripts/ntp-wait.html@1.213 +1 -1
+ NTP_4_2_7P388
+
+ scripts/ntp-wait.man.in@1.208 +3 -3
+ NTP_4_2_7P388
+
+ scripts/ntp-wait.mdoc.in@1.208 +3 -3
+ NTP_4_2_7P388
+
+ sntp/invoke-sntp.texi@1.377 +2 -2
+ NTP_4_2_7P388
+
+ sntp/sntp-opts.c@1.392 +7 -7
+ NTP_4_2_7P388
+
+ sntp/sntp-opts.h@1.392 +3 -3
+ NTP_4_2_7P388
+
+ sntp/sntp.1sntpman@1.212 +3 -3
+ NTP_4_2_7P388
+
+ sntp/sntp.1sntpmdoc@1.212 +3 -3
+ NTP_4_2_7P388
+
+ sntp/sntp.html@1.392 +2 -2
+ NTP_4_2_7P388
+
+ sntp/sntp.man.in@1.212 +3 -3
+ NTP_4_2_7P388
+
+ sntp/sntp.mdoc.in@1.212 +3 -3
+ NTP_4_2_7P388
+
+ util/invoke-ntp-keygen.texi@1.381 +2 -2
+ NTP_4_2_7P388
+
+ util/ntp-keygen-opts.c@1.395 +7 -7
+ NTP_4_2_7P388
+
+ util/ntp-keygen-opts.h@1.395 +3 -3
+ NTP_4_2_7P388
+
+ util/ntp-keygen.1ntp-keygenman@1.209 +3 -3
+ NTP_4_2_7P388
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.209 +3 -3
+ NTP_4_2_7P388
+
+ util/ntp-keygen.html@1.57 +2 -2
+ NTP_4_2_7P388
+
+ util/ntp-keygen.man.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ util/ntp-keygen.mdoc.in@1.209 +3 -3
+ NTP_4_2_7P388
+
+ChangeSet@1.2983, 2013-09-16 11:34:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P387
+ TAG: NTP_4_2_7P387
+
+ ChangeLog@1.1331 +1 -0
+ NTP_4_2_7P387
+
+ ntpd/invoke-ntp.conf.texi@1.65 +1 -1
+ NTP_4_2_7P387
+
+ ntpd/invoke-ntp.keys.texi@1.63 +1 -1
+ NTP_4_2_7P387
+
+ ntpd/invoke-ntpd.texi@1.379 +2 -2
+ NTP_4_2_7P387
+
+ ntpd/ntp.conf.5man@1.99 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.conf.5mdoc@1.99 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.conf.html@1.60 +1 -1
+ NTP_4_2_7P387
+
+ ntpd/ntp.conf.man.in@1.99 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.conf.mdoc.in@1.99 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.keys.5man@1.97 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.keys.5mdoc@1.97 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.keys.html@1.61 +1 -1
+ NTP_4_2_7P387
+
+ ntpd/ntp.keys.man.in@1.97 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntp.keys.mdoc.in@1.97 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntpd-opts.c@1.397 +7 -7
+ NTP_4_2_7P387
+
+ ntpd/ntpd-opts.h@1.397 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntpd.1ntpdman@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntpd.1ntpdmdoc@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntpd.html@1.55 +2 -2
+ NTP_4_2_7P387
+
+ ntpd/ntpd.man.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpd/ntpd.mdoc.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpdc/invoke-ntpdc.texi@1.376 +2 -2
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc-opts.c@1.391 +7 -7
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc-opts.h@1.391 +3 -3
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc.1ntpdcman@1.207 +2 -2
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.207 +2 -2
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc.html@1.220 +2 -2
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc.man.in@1.207 +2 -2
+ NTP_4_2_7P387
+
+ ntpdc/ntpdc.mdoc.in@1.207 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/invoke-ntpq.texi@1.380 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/ntpq-opts.c@1.394 +7 -7
+ NTP_4_2_7P387
+
+ ntpq/ntpq-opts.h@1.394 +3 -3
+ NTP_4_2_7P387
+
+ ntpq/ntpq.1ntpqman@1.208 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/ntpq.1ntpqmdoc@1.208 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/ntpq.html@1.52 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/ntpq.man.in@1.208 +2 -2
+ NTP_4_2_7P387
+
+ ntpq/ntpq.mdoc.in@1.208 +2 -2
+ NTP_4_2_7P387
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.379 +2 -2
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.394 +7 -7
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.394 +3 -3
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd.html@1.50 +1 -1
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd.man.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ packageinfo.sh@1.390 +1 -1
+ NTP_4_2_7P387
+
+ scripts/invoke-ntp-wait.texi@1.196 +1 -1
+ NTP_4_2_7P387
+
+ scripts/ntp-wait.1ntp-waitman@1.207 +3 -3
+ NTP_4_2_7P387
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.207 +3 -3
+ NTP_4_2_7P387
+
+ scripts/ntp-wait.html@1.212 +1 -1
+ NTP_4_2_7P387
+
+ scripts/ntp-wait.man.in@1.207 +3 -3
+ NTP_4_2_7P387
+
+ scripts/ntp-wait.mdoc.in@1.207 +3 -3
+ NTP_4_2_7P387
+
+ sntp/invoke-sntp.texi@1.376 +2 -2
+ NTP_4_2_7P387
+
+ sntp/sntp-opts.c@1.391 +7 -7
+ NTP_4_2_7P387
+
+ sntp/sntp-opts.h@1.391 +3 -3
+ NTP_4_2_7P387
+
+ sntp/sntp.1sntpman@1.211 +3 -3
+ NTP_4_2_7P387
+
+ sntp/sntp.1sntpmdoc@1.211 +3 -3
+ NTP_4_2_7P387
+
+ sntp/sntp.html@1.391 +2 -2
+ NTP_4_2_7P387
+
+ sntp/sntp.man.in@1.211 +3 -3
+ NTP_4_2_7P387
+
+ sntp/sntp.mdoc.in@1.211 +3 -3
+ NTP_4_2_7P387
+
+ util/invoke-ntp-keygen.texi@1.380 +2 -2
+ NTP_4_2_7P387
+
+ util/ntp-keygen-opts.c@1.394 +7 -7
+ NTP_4_2_7P387
+
+ util/ntp-keygen-opts.h@1.394 +3 -3
+ NTP_4_2_7P387
+
+ util/ntp-keygen.1ntp-keygenman@1.208 +3 -3
+ NTP_4_2_7P387
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.208 +3 -3
+ NTP_4_2_7P387
+
+ util/ntp-keygen.html@1.56 +2 -2
+ NTP_4_2_7P387
+
+ util/ntp-keygen.man.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ util/ntp-keygen.mdoc.in@1.208 +3 -3
+ NTP_4_2_7P387
+
+ChangeSet@1.2977.1.10, 2013-09-16 01:24:16-07:00, harlan@hms-mbp11.local
+ [Bug 1642] ntpdsim can't find simnulate block in config file
+
+ ChangeLog@1.1326.1.10 +1 -0
+ [Bug 1642] ntpdsim can't find simnulate block in config file
+
+ html/ntpdsim_new.html@1.7 +28 -28
+ [Bug 1642] ntpdsim can't find simnulate block in config file
+
+ChangeSet@1.2981, 2013-09-16 03:56:14-04:00, stenn@psp-deb1.ntp.org
+ Remove obsolete agtexi-file.tpl patch
+
+ BitKeeper/deleted/86/agtexi-file.tpl~53aac9b4490bfb69@1.5, stenn@psp-fb1.ntp.org +0 -0
+ Delete: sntp/ag-tpl/agtexi-file.tpl
+
+ChangeSet@1.2977.1.9, 2013-09-01 11:39:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P386
+ TAG: NTP_4_2_7P386
+
+ ChangeLog@1.1326.1.9 +1 -0
+ NTP_4_2_7P386
+
+ ntpd/invoke-ntp.conf.texi@1.64 +1 -1
+ NTP_4_2_7P386
+
+ ntpd/invoke-ntp.keys.texi@1.62 +1 -1
+ NTP_4_2_7P386
+
+ ntpd/invoke-ntpd.texi@1.378 +2 -2
+ NTP_4_2_7P386
+
+ ntpd/ntp.conf.5man@1.98 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.conf.5mdoc@1.98 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.conf.html@1.59 +1 -1
+ NTP_4_2_7P386
+
+ ntpd/ntp.conf.man.in@1.98 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.conf.mdoc.in@1.98 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.keys.5man@1.96 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.keys.5mdoc@1.96 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.keys.html@1.60 +1 -1
+ NTP_4_2_7P386
+
+ ntpd/ntp.keys.man.in@1.96 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntp.keys.mdoc.in@1.96 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntpd-opts.c@1.396 +7 -7
+ NTP_4_2_7P386
+
+ ntpd/ntpd-opts.h@1.396 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntpd.1ntpdman@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntpd.1ntpdmdoc@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntpd.html@1.54 +2 -2
+ NTP_4_2_7P386
+
+ ntpd/ntpd.man.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpd/ntpd.mdoc.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpdc/invoke-ntpdc.texi@1.375 +2 -2
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc-opts.c@1.390 +7 -7
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc-opts.h@1.390 +3 -3
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc.1ntpdcman@1.206 +2 -2
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.206 +2 -2
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc.html@1.219 +2 -2
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc.man.in@1.206 +2 -2
+ NTP_4_2_7P386
+
+ ntpdc/ntpdc.mdoc.in@1.206 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/invoke-ntpq.texi@1.379 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/ntpq-opts.c@1.393 +7 -7
+ NTP_4_2_7P386
+
+ ntpq/ntpq-opts.h@1.393 +3 -3
+ NTP_4_2_7P386
+
+ ntpq/ntpq.1ntpqman@1.207 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/ntpq.1ntpqmdoc@1.207 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/ntpq.html@1.51 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/ntpq.man.in@1.207 +2 -2
+ NTP_4_2_7P386
+
+ ntpq/ntpq.mdoc.in@1.207 +2 -2
+ NTP_4_2_7P386
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.378 +2 -2
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.393 +7 -7
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.393 +3 -3
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd.html@1.49 +1 -1
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd.man.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ packageinfo.sh@1.389 +1 -1
+ NTP_4_2_7P386
+
+ scripts/invoke-ntp-wait.texi@1.195 +1 -1
+ NTP_4_2_7P386
+
+ scripts/ntp-wait.1ntp-waitman@1.206 +3 -3
+ NTP_4_2_7P386
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.206 +3 -3
+ NTP_4_2_7P386
+
+ scripts/ntp-wait.html@1.211 +1 -1
+ NTP_4_2_7P386
+
+ scripts/ntp-wait.man.in@1.206 +3 -3
+ NTP_4_2_7P386
+
+ scripts/ntp-wait.mdoc.in@1.206 +3 -3
+ NTP_4_2_7P386
+
+ sntp/invoke-sntp.texi@1.375 +2 -2
+ NTP_4_2_7P386
+
+ sntp/sntp-opts.c@1.390 +7 -7
+ NTP_4_2_7P386
+
+ sntp/sntp-opts.h@1.390 +3 -3
+ NTP_4_2_7P386
+
+ sntp/sntp.1sntpman@1.210 +3 -3
+ NTP_4_2_7P386
+
+ sntp/sntp.1sntpmdoc@1.210 +3 -3
+ NTP_4_2_7P386
+
+ sntp/sntp.html@1.390 +2 -2
+ NTP_4_2_7P386
+
+ sntp/sntp.man.in@1.210 +3 -3
+ NTP_4_2_7P386
+
+ sntp/sntp.mdoc.in@1.210 +3 -3
+ NTP_4_2_7P386
+
+ util/invoke-ntp-keygen.texi@1.379 +2 -2
+ NTP_4_2_7P386
+
+ util/ntp-keygen-opts.c@1.393 +7 -7
+ NTP_4_2_7P386
+
+ util/ntp-keygen-opts.h@1.393 +3 -3
+ NTP_4_2_7P386
+
+ util/ntp-keygen.1ntp-keygenman@1.207 +3 -3
+ NTP_4_2_7P386
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.207 +3 -3
+ NTP_4_2_7P386
+
+ util/ntp-keygen.html@1.55 +2 -2
+ NTP_4_2_7P386
+
+ util/ntp-keygen.man.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ util/ntp-keygen.mdoc.in@1.207 +3 -3
+ NTP_4_2_7P386
+
+ChangeSet@1.2977.2.1, 2013-09-01 10:34:32+02:00, jnperlin@armageddon.
+ [Bug 2473] NTPD exits after clock is stepped backwards externally
+
+ ChangeLog@1.1326.2.1 +1 -0
+ [Bug 2473] NTPD exits after clock is stepped backwards externally
+
+ libntp/systime.c@1.67 +10 -0
+ [Bug 2473] NTPD exits after clock is stepped backwards externally
+ Check for back-steps of the system clock to avoid sporious Lamport advance violations
+
+ChangeSet@1.2977.1.8, 2013-08-30 21:23:39+02:00, jnperlin@armageddon.
+ * [Bug 2472] (WinXP) Avoid self-termination of IO thread during exit().
+
+ ChangeLog@1.1326.1.8 +1 -0
+ * [Bug 2472] (WinXP) Avoid self-termination of IO thread during exit().
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.69 +16 -10
+ * [Bug 2472] (WinXP) Avoid self-termination of IO thread during exit().
+
+ChangeSet@1.2977.1.7, 2013-08-19 03:48:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P385
+ TAG: NTP_4_2_7P385
+
+ ChangeLog@1.1326.1.7 +1 -0
+ NTP_4_2_7P385
+
+ ntpd/invoke-ntp.conf.texi@1.63 +1 -1
+ NTP_4_2_7P385
+
+ ntpd/invoke-ntp.keys.texi@1.61 +1 -1
+ NTP_4_2_7P385
+
+ ntpd/invoke-ntpd.texi@1.377 +2 -2
+ NTP_4_2_7P385
+
+ ntpd/ntp.conf.5man@1.97 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.conf.5mdoc@1.97 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.conf.html@1.58 +1 -1
+ NTP_4_2_7P385
+
+ ntpd/ntp.conf.man.in@1.97 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.conf.mdoc.in@1.97 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.keys.5man@1.95 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.keys.5mdoc@1.95 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.keys.html@1.59 +1 -1
+ NTP_4_2_7P385
+
+ ntpd/ntp.keys.man.in@1.95 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntp.keys.mdoc.in@1.95 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd-opts.c@1.395 +7 -7
+ NTP_4_2_7P385
+
+ ntpd/ntpd-opts.h@1.395 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd.1ntpdman@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd.1ntpdmdoc@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd.html@1.53 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd.man.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpd/ntpd.mdoc.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpdc/invoke-ntpdc.texi@1.374 +2 -2
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc-opts.c@1.389 +7 -7
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc-opts.h@1.389 +3 -3
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc.1ntpdcman@1.205 +2 -2
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.205 +2 -2
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc.html@1.218 +2 -2
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc.man.in@1.205 +2 -2
+ NTP_4_2_7P385
+
+ ntpdc/ntpdc.mdoc.in@1.205 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/invoke-ntpq.texi@1.378 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/ntpq-opts.c@1.392 +7 -7
+ NTP_4_2_7P385
+
+ ntpq/ntpq-opts.h@1.392 +3 -3
+ NTP_4_2_7P385
+
+ ntpq/ntpq.1ntpqman@1.206 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/ntpq.1ntpqmdoc@1.206 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/ntpq.html@1.50 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/ntpq.man.in@1.206 +2 -2
+ NTP_4_2_7P385
+
+ ntpq/ntpq.mdoc.in@1.206 +2 -2
+ NTP_4_2_7P385
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.377 +2 -2
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.392 +7 -7
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.392 +3 -3
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd.html@1.48 +1 -1
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd.man.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ packageinfo.sh@1.388 +1 -1
+ NTP_4_2_7P385
+
+ scripts/invoke-ntp-wait.texi@1.194 +1 -1
+ NTP_4_2_7P385
+
+ scripts/ntp-wait.1ntp-waitman@1.205 +3 -3
+ NTP_4_2_7P385
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.205 +3 -3
+ NTP_4_2_7P385
+
+ scripts/ntp-wait.html@1.210 +1 -1
+ NTP_4_2_7P385
+
+ scripts/ntp-wait.man.in@1.205 +3 -3
+ NTP_4_2_7P385
+
+ scripts/ntp-wait.mdoc.in@1.205 +3 -3
+ NTP_4_2_7P385
+
+ sntp/invoke-sntp.texi@1.374 +2 -2
+ NTP_4_2_7P385
+
+ sntp/sntp-opts.c@1.389 +7 -7
+ NTP_4_2_7P385
+
+ sntp/sntp-opts.h@1.389 +3 -3
+ NTP_4_2_7P385
+
+ sntp/sntp.1sntpman@1.209 +3 -3
+ NTP_4_2_7P385
+
+ sntp/sntp.1sntpmdoc@1.209 +3 -3
+ NTP_4_2_7P385
+
+ sntp/sntp.html@1.389 +2 -2
+ NTP_4_2_7P385
+
+ sntp/sntp.man.in@1.209 +3 -3
+ NTP_4_2_7P385
+
+ sntp/sntp.mdoc.in@1.209 +3 -3
+ NTP_4_2_7P385
+
+ util/invoke-ntp-keygen.texi@1.378 +2 -2
+ NTP_4_2_7P385
+
+ util/ntp-keygen-opts.c@1.392 +7 -7
+ NTP_4_2_7P385
+
+ util/ntp-keygen-opts.h@1.392 +3 -3
+ NTP_4_2_7P385
+
+ util/ntp-keygen.1ntp-keygenman@1.206 +3 -3
+ NTP_4_2_7P385
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.206 +3 -3
+ NTP_4_2_7P385
+
+ util/ntp-keygen.html@1.54 +2 -2
+ NTP_4_2_7P385
+
+ util/ntp-keygen.man.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ util/ntp-keygen.mdoc.in@1.206 +3 -3
+ NTP_4_2_7P385
+
+ChangeSet@1.2977.1.6, 2013-08-18 23:30:39-04:00, stenn@deacon.udel.edu
+ [Bug 2426] Possibly uninitialized data in crypto_send() - CID 975596
+
+ ChangeLog@1.1326.1.6 +1 -0
+ [Bug 2426] Possibly uninitialized data in crypto_send() - CID 975596
+
+ChangeSet@1.2977.1.5, 2013-08-18 23:05:39-04:00, stenn@pogo.udel.edu
+ CID 975596: Copy/paste error: vallen should be siglen
+
+ ChangeLog@1.1326.1.5 +1 -0
+ CID 975596: Copy/paste error: vallen should be siglen
+
+ ntpd/ntp_crypto.c@1.163 +1 -1
+ CID 975596: Copy/paste error: vallen should be siglen
+
+ChangeSet@1.2977.1.4, 2013-08-18 23:00:37-04:00, stenn@pogo.udel.edu
+ CID 1009579: Check return status of X509_add_ext()
+
+ ChangeLog@1.1326.1.4 +1 -0
+ CID 1009579: Check return status of X509_add_ext()
+
+ ntpd/ntp_crypto.c@1.162 +1 -1
+ CID 1009579: Check return status of X509_add_ext()
+
+ChangeSet@1.2977.1.3, 2013-08-18 22:20:55-04:00, stenn@pogo.udel.edu
+ [2085] Fix root distance and root dispersion calculations
+
+ ChangeLog@1.1326.1.3 +1 -0
+ [2085] Fix root distance and root dispersion calculations
+
+ ntpd/ntp_proto.c@1.346 +48 -6
+ [2085] Fix root distance and root dispersion calculations
+
+ChangeSet@1.2977.1.2, 2013-08-18 11:41:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P384
+ TAG: NTP_4_2_7P384
+
+ ChangeLog@1.1326.1.2 +1 -0
+ NTP_4_2_7P384
+
+ ntpd/invoke-ntp.conf.texi@1.62 +1 -1
+ NTP_4_2_7P384
+
+ ntpd/invoke-ntp.keys.texi@1.60 +1 -1
+ NTP_4_2_7P384
+
+ ntpd/invoke-ntpd.texi@1.376 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.conf.5man@1.96 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.conf.5mdoc@1.96 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.conf.html@1.57 +1 -1
+ NTP_4_2_7P384
+
+ ntpd/ntp.conf.man.in@1.96 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.conf.mdoc.in@1.96 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.keys.5man@1.94 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.keys.5mdoc@1.94 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.keys.html@1.58 +1 -1
+ NTP_4_2_7P384
+
+ ntpd/ntp.keys.man.in@1.94 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntp.keys.mdoc.in@1.94 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntpd-opts.c@1.394 +7 -7
+ NTP_4_2_7P384
+
+ ntpd/ntpd-opts.h@1.394 +9 -9
+ NTP_4_2_7P384
+
+ ntpd/ntpd.1ntpdman@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntpd.1ntpdmdoc@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntpd.html@1.52 +2 -2
+ NTP_4_2_7P384
+
+ ntpd/ntpd.man.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpd/ntpd.mdoc.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpdc/invoke-ntpdc.texi@1.373 +2 -2
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc-opts.c@1.388 +7 -7
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc-opts.h@1.388 +4 -4
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc.1ntpdcman@1.204 +2 -2
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.204 +2 -2
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc.html@1.217 +2 -2
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc.man.in@1.204 +2 -2
+ NTP_4_2_7P384
+
+ ntpdc/ntpdc.mdoc.in@1.204 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/invoke-ntpq.texi@1.377 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/ntpq-opts.c@1.391 +7 -7
+ NTP_4_2_7P384
+
+ ntpq/ntpq-opts.h@1.391 +5 -5
+ NTP_4_2_7P384
+
+ ntpq/ntpq.1ntpqman@1.205 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/ntpq.1ntpqmdoc@1.205 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/ntpq.html@1.49 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/ntpq.man.in@1.205 +2 -2
+ NTP_4_2_7P384
+
+ ntpq/ntpq.mdoc.in@1.205 +2 -2
+ NTP_4_2_7P384
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.376 +2 -2
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.391 +7 -7
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.391 +5 -5
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd.html@1.47 +1 -1
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd.man.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ packageinfo.sh@1.387 +1 -1
+ NTP_4_2_7P384
+
+ scripts/invoke-ntp-wait.texi@1.193 +1 -1
+ NTP_4_2_7P384
+
+ scripts/ntp-wait.1ntp-waitman@1.204 +3 -3
+ NTP_4_2_7P384
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.204 +3 -3
+ NTP_4_2_7P384
+
+ scripts/ntp-wait.html@1.209 +1 -1
+ NTP_4_2_7P384
+
+ scripts/ntp-wait.man.in@1.204 +3 -3
+ NTP_4_2_7P384
+
+ scripts/ntp-wait.mdoc.in@1.204 +3 -3
+ NTP_4_2_7P384
+
+ sntp/invoke-sntp.texi@1.373 +2 -2
+ NTP_4_2_7P384
+
+ sntp/sntp-opts.c@1.388 +7 -7
+ NTP_4_2_7P384
+
+ sntp/sntp-opts.h@1.388 +5 -5
+ NTP_4_2_7P384
+
+ sntp/sntp.1sntpman@1.208 +3 -3
+ NTP_4_2_7P384
+
+ sntp/sntp.1sntpmdoc@1.208 +3 -3
+ NTP_4_2_7P384
+
+ sntp/sntp.html@1.388 +2 -2
+ NTP_4_2_7P384
+
+ sntp/sntp.man.in@1.208 +3 -3
+ NTP_4_2_7P384
+
+ sntp/sntp.mdoc.in@1.208 +3 -3
+ NTP_4_2_7P384
+
+ util/invoke-ntp-keygen.texi@1.377 +2 -2
+ NTP_4_2_7P384
+
+ util/ntp-keygen-opts.c@1.391 +7 -7
+ NTP_4_2_7P384
+
+ util/ntp-keygen-opts.h@1.391 +4 -4
+ NTP_4_2_7P384
+
+ util/ntp-keygen.1ntp-keygenman@1.205 +3 -3
+ NTP_4_2_7P384
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.205 +3 -3
+ NTP_4_2_7P384
+
+ util/ntp-keygen.html@1.53 +2 -2
+ NTP_4_2_7P384
+
+ util/ntp-keygen.man.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ util/ntp-keygen.mdoc.in@1.205 +3 -3
+ NTP_4_2_7P384
+
+ChangeSet@1.2977.1.1, 2013-08-18 01:42:12-04:00, stenn@deacon.udel.edu
+ [Bug 2450] --version has bogus short option
+
+ ChangeLog@1.1326.1.1 +1 -0
+ [Bug 2450] --version has bogus short option
+
+ChangeSet@1.2978, 2013-08-13 07:22:26+00:00, stenn@psp-fb1.ntp.org
+ Note [Bug 2399] Reset sys_kodsent in proto_clr_stats() was fixed in 4.2.7p21
+
+ ChangeLog@1.1327 +1 -0
+ Note [Bug 2399] Reset sys_kodsent in proto_clr_stats() was fixed in 4.2.7p21
+
+ChangeSet@1.2977, 2013-08-10 11:34:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P383
+ TAG: NTP_4_2_7P383
+
+ ChangeLog@1.1326 +1 -0
+ NTP_4_2_7P383
+
+ ntpd/invoke-ntp.conf.texi@1.61 +1 -1
+ NTP_4_2_7P383
+
+ ntpd/invoke-ntp.keys.texi@1.59 +1 -1
+ NTP_4_2_7P383
+
+ ntpd/invoke-ntpd.texi@1.375 +2 -2
+ NTP_4_2_7P383
+
+ ntpd/ntp.conf.5man@1.95 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.conf.5mdoc@1.95 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.conf.html@1.56 +1 -1
+ NTP_4_2_7P383
+
+ ntpd/ntp.conf.man.in@1.95 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.conf.mdoc.in@1.95 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.keys.5man@1.93 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.keys.5mdoc@1.93 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.keys.html@1.57 +1 -1
+ NTP_4_2_7P383
+
+ ntpd/ntp.keys.man.in@1.93 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntp.keys.mdoc.in@1.93 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntpd-opts.c@1.393 +7 -7
+ NTP_4_2_7P383
+
+ ntpd/ntpd-opts.h@1.393 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntpd.1ntpdman@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntpd.1ntpdmdoc@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntpd.html@1.51 +2 -2
+ NTP_4_2_7P383
+
+ ntpd/ntpd.man.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpd/ntpd.mdoc.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpdc/invoke-ntpdc.texi@1.372 +2 -2
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc-opts.c@1.387 +7 -7
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc-opts.h@1.387 +3 -3
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc.1ntpdcman@1.203 +2 -2
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.203 +2 -2
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc.html@1.216 +2 -2
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc.man.in@1.203 +2 -2
+ NTP_4_2_7P383
+
+ ntpdc/ntpdc.mdoc.in@1.203 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/invoke-ntpq.texi@1.376 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/ntpq-opts.c@1.390 +7 -7
+ NTP_4_2_7P383
+
+ ntpq/ntpq-opts.h@1.390 +3 -3
+ NTP_4_2_7P383
+
+ ntpq/ntpq.1ntpqman@1.204 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/ntpq.1ntpqmdoc@1.204 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/ntpq.html@1.48 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/ntpq.man.in@1.204 +2 -2
+ NTP_4_2_7P383
+
+ ntpq/ntpq.mdoc.in@1.204 +2 -2
+ NTP_4_2_7P383
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.375 +2 -2
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.390 +7 -7
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.390 +3 -3
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd.html@1.46 +1 -1
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd.man.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ packageinfo.sh@1.386 +1 -1
+ NTP_4_2_7P383
+
+ scripts/invoke-ntp-wait.texi@1.192 +1 -1
+ NTP_4_2_7P383
+
+ scripts/ntp-wait.1ntp-waitman@1.203 +3 -3
+ NTP_4_2_7P383
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.203 +3 -3
+ NTP_4_2_7P383
+
+ scripts/ntp-wait.html@1.208 +1 -1
+ NTP_4_2_7P383
+
+ scripts/ntp-wait.man.in@1.203 +3 -3
+ NTP_4_2_7P383
+
+ scripts/ntp-wait.mdoc.in@1.203 +3 -3
+ NTP_4_2_7P383
+
+ sntp/invoke-sntp.texi@1.372 +2 -2
+ NTP_4_2_7P383
+
+ sntp/sntp-opts.c@1.387 +7 -7
+ NTP_4_2_7P383
+
+ sntp/sntp-opts.h@1.387 +3 -3
+ NTP_4_2_7P383
+
+ sntp/sntp.1sntpman@1.207 +3 -3
+ NTP_4_2_7P383
+
+ sntp/sntp.1sntpmdoc@1.207 +3 -3
+ NTP_4_2_7P383
+
+ sntp/sntp.html@1.387 +2 -2
+ NTP_4_2_7P383
+
+ sntp/sntp.man.in@1.207 +3 -3
+ NTP_4_2_7P383
+
+ sntp/sntp.mdoc.in@1.207 +3 -3
+ NTP_4_2_7P383
+
+ util/invoke-ntp-keygen.texi@1.376 +2 -2
+ NTP_4_2_7P383
+
+ util/ntp-keygen-opts.c@1.390 +7 -7
+ NTP_4_2_7P383
+
+ util/ntp-keygen-opts.h@1.390 +3 -3
+ NTP_4_2_7P383
+
+ util/ntp-keygen.1ntp-keygenman@1.204 +3 -3
+ NTP_4_2_7P383
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.204 +3 -3
+ NTP_4_2_7P383
+
+ util/ntp-keygen.html@1.52 +2 -2
+ NTP_4_2_7P383
+
+ util/ntp-keygen.man.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ util/ntp-keygen.mdoc.in@1.204 +3 -3
+ NTP_4_2_7P383
+
+ChangeSet@1.2976, 2013-08-10 06:47:51-04:00, stenn@deacon.udel.edu
+ (no changes - force a rebuild for a new Coverity scan)
+
+ ChangeLog@1.1325 +1 -0
+ (no changes - force a rebuild for a new Coverity scan)
+
+ChangeSet@1.2975, 2013-08-08 11:38:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P382
+ TAG: NTP_4_2_7P382
+
+ ChangeLog@1.1324 +1 -0
+ NTP_4_2_7P382
+
+ ntpd/invoke-ntp.conf.texi@1.60 +1 -1
+ NTP_4_2_7P382
+
+ ntpd/invoke-ntp.keys.texi@1.58 +1 -1
+ NTP_4_2_7P382
+
+ ntpd/invoke-ntpd.texi@1.374 +2 -2
+ NTP_4_2_7P382
+
+ ntpd/ntp.conf.5man@1.94 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntp.conf.5mdoc@1.94 +2 -2
+ NTP_4_2_7P382
+
+ ntpd/ntp.conf.html@1.55 +1 -1
+ NTP_4_2_7P382
+
+ ntpd/ntp.conf.man.in@1.94 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntp.conf.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P382
+
+ ntpd/ntp.keys.5man@1.92 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntp.keys.5mdoc@1.92 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntp.keys.html@1.56 +1 -1
+ NTP_4_2_7P382
+
+ ntpd/ntp.keys.man.in@1.92 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntp.keys.mdoc.in@1.92 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntpd-opts.c@1.392 +7 -7
+ NTP_4_2_7P382
+
+ ntpd/ntpd-opts.h@1.392 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntpd.1ntpdman@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntpd.1ntpdmdoc@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntpd.html@1.50 +2 -2
+ NTP_4_2_7P382
+
+ ntpd/ntpd.man.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpd/ntpd.mdoc.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpdc/invoke-ntpdc.texi@1.371 +2 -2
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc-opts.c@1.386 +7 -7
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc-opts.h@1.386 +3 -3
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc.1ntpdcman@1.202 +2 -2
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.202 +2 -2
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc.html@1.215 +2 -2
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc.man.in@1.202 +2 -2
+ NTP_4_2_7P382
+
+ ntpdc/ntpdc.mdoc.in@1.202 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/invoke-ntpq.texi@1.375 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/ntpq-opts.c@1.389 +7 -7
+ NTP_4_2_7P382
+
+ ntpq/ntpq-opts.h@1.389 +3 -3
+ NTP_4_2_7P382
+
+ ntpq/ntpq.1ntpqman@1.203 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/ntpq.1ntpqmdoc@1.203 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/ntpq.html@1.47 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/ntpq.man.in@1.203 +2 -2
+ NTP_4_2_7P382
+
+ ntpq/ntpq.mdoc.in@1.203 +2 -2
+ NTP_4_2_7P382
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.374 +2 -2
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.389 +7 -7
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.389 +3 -3
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd.html@1.45 +1 -1
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd.man.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ packageinfo.sh@1.385 +1 -1
+ NTP_4_2_7P382
+
+ scripts/invoke-ntp-wait.texi@1.191 +1 -1
+ NTP_4_2_7P382
+
+ scripts/ntp-wait.1ntp-waitman@1.202 +3 -3
+ NTP_4_2_7P382
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.202 +3 -3
+ NTP_4_2_7P382
+
+ scripts/ntp-wait.html@1.207 +1 -1
+ NTP_4_2_7P382
+
+ scripts/ntp-wait.man.in@1.202 +3 -3
+ NTP_4_2_7P382
+
+ scripts/ntp-wait.mdoc.in@1.202 +3 -3
+ NTP_4_2_7P382
+
+ sntp/invoke-sntp.texi@1.371 +2 -2
+ NTP_4_2_7P382
+
+ sntp/sntp-opts.c@1.386 +7 -7
+ NTP_4_2_7P382
+
+ sntp/sntp-opts.h@1.386 +3 -3
+ NTP_4_2_7P382
+
+ sntp/sntp.1sntpman@1.206 +3 -3
+ NTP_4_2_7P382
+
+ sntp/sntp.1sntpmdoc@1.206 +3 -3
+ NTP_4_2_7P382
+
+ sntp/sntp.html@1.386 +2 -2
+ NTP_4_2_7P382
+
+ sntp/sntp.man.in@1.206 +3 -3
+ NTP_4_2_7P382
+
+ sntp/sntp.mdoc.in@1.206 +3 -3
+ NTP_4_2_7P382
+
+ util/invoke-ntp-keygen.texi@1.375 +2 -2
+ NTP_4_2_7P382
+
+ util/ntp-keygen-opts.c@1.389 +7 -7
+ NTP_4_2_7P382
+
+ util/ntp-keygen-opts.h@1.389 +3 -3
+ NTP_4_2_7P382
+
+ util/ntp-keygen.1ntp-keygenman@1.203 +3 -3
+ NTP_4_2_7P382
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.203 +3 -3
+ NTP_4_2_7P382
+
+ util/ntp-keygen.html@1.51 +2 -2
+ NTP_4_2_7P382
+
+ util/ntp-keygen.man.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ util/ntp-keygen.mdoc.in@1.203 +3 -3
+ NTP_4_2_7P382
+
+ChangeSet@1.2974, 2013-08-08 04:18:46-04:00, stenn@deacon.udel.edu
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ChangeLog@1.1323 +15 -14
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ html/miscopt.html@1.75 +3 -3
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ include/ntp_config.h@1.81 +1 -1
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/invoke-ntp.conf.texi@1.59 +3 -3
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp.conf.5man@1.93 +4 -4
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp.conf.5mdoc@1.93 +4 -4
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp.conf.def@1.9 +2 -2
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp.conf.man.in@1.93 +4 -4
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp.conf.mdoc.in@1.93 +4 -4
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ ntpd/ntp_config.c@1.314 +13 -11
+ [Bug 2454] Need way to set file descriptor limit - cleanup
+
+ChangeSet@1.2973, 2013-08-07 11:44:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P381
+ TAG: NTP_4_2_7P381
+
+ ChangeLog@1.1322 +1 -0
+ NTP_4_2_7P381
+
+ ntpd/invoke-ntp.conf.texi@1.58 +1 -1
+ NTP_4_2_7P381
+
+ ntpd/invoke-ntp.keys.texi@1.57 +1 -1
+ NTP_4_2_7P381
+
+ ntpd/invoke-ntpd.texi@1.373 +2 -2
+ NTP_4_2_7P381
+
+ ntpd/ntp.conf.5man@1.92 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.conf.5mdoc@1.92 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.conf.html@1.54 +1 -1
+ NTP_4_2_7P381
+
+ ntpd/ntp.conf.man.in@1.92 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.conf.mdoc.in@1.92 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.keys.5man@1.91 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.keys.5mdoc@1.91 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.keys.html@1.55 +1 -1
+ NTP_4_2_7P381
+
+ ntpd/ntp.keys.man.in@1.91 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntp.keys.mdoc.in@1.91 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntpd-opts.c@1.391 +7 -7
+ NTP_4_2_7P381
+
+ ntpd/ntpd-opts.h@1.391 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntpd.1ntpdman@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntpd.1ntpdmdoc@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntpd.html@1.49 +2 -2
+ NTP_4_2_7P381
+
+ ntpd/ntpd.man.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpd/ntpd.mdoc.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpdc/invoke-ntpdc.texi@1.370 +2 -2
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc-opts.c@1.385 +7 -7
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc-opts.h@1.385 +3 -3
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc.1ntpdcman@1.201 +2 -2
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.201 +2 -2
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc.html@1.214 +2 -2
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc.man.in@1.201 +2 -2
+ NTP_4_2_7P381
+
+ ntpdc/ntpdc.mdoc.in@1.201 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/invoke-ntpq.texi@1.374 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/ntpq-opts.c@1.388 +7 -7
+ NTP_4_2_7P381
+
+ ntpq/ntpq-opts.h@1.388 +3 -3
+ NTP_4_2_7P381
+
+ ntpq/ntpq.1ntpqman@1.202 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/ntpq.1ntpqmdoc@1.202 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/ntpq.html@1.46 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/ntpq.man.in@1.202 +2 -2
+ NTP_4_2_7P381
+
+ ntpq/ntpq.mdoc.in@1.202 +2 -2
+ NTP_4_2_7P381
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.373 +2 -2
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.388 +7 -7
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.388 +3 -3
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd.html@1.44 +1 -1
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd.man.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ packageinfo.sh@1.384 +1 -1
+ NTP_4_2_7P381
+
+ scripts/invoke-ntp-wait.texi@1.190 +1 -1
+ NTP_4_2_7P381
+
+ scripts/ntp-wait.1ntp-waitman@1.201 +3 -3
+ NTP_4_2_7P381
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.201 +3 -3
+ NTP_4_2_7P381
+
+ scripts/ntp-wait.html@1.206 +1 -1
+ NTP_4_2_7P381
+
+ scripts/ntp-wait.man.in@1.201 +3 -3
+ NTP_4_2_7P381
+
+ scripts/ntp-wait.mdoc.in@1.201 +3 -3
+ NTP_4_2_7P381
+
+ sntp/invoke-sntp.texi@1.370 +2 -2
+ NTP_4_2_7P381
+
+ sntp/sntp-opts.c@1.385 +7 -7
+ NTP_4_2_7P381
+
+ sntp/sntp-opts.h@1.385 +3 -3
+ NTP_4_2_7P381
+
+ sntp/sntp.1sntpman@1.205 +3 -3
+ NTP_4_2_7P381
+
+ sntp/sntp.1sntpmdoc@1.205 +3 -3
+ NTP_4_2_7P381
+
+ sntp/sntp.html@1.385 +2 -2
+ NTP_4_2_7P381
+
+ sntp/sntp.man.in@1.205 +3 -3
+ NTP_4_2_7P381
+
+ sntp/sntp.mdoc.in@1.205 +3 -3
+ NTP_4_2_7P381
+
+ util/invoke-ntp-keygen.texi@1.374 +2 -2
+ NTP_4_2_7P381
+
+ util/ntp-keygen-opts.c@1.388 +7 -7
+ NTP_4_2_7P381
+
+ util/ntp-keygen-opts.h@1.388 +3 -3
+ NTP_4_2_7P381
+
+ util/ntp-keygen.1ntp-keygenman@1.202 +3 -3
+ NTP_4_2_7P381
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.202 +3 -3
+ NTP_4_2_7P381
+
+ util/ntp-keygen.html@1.50 +2 -2
+ NTP_4_2_7P381
+
+ util/ntp-keygen.man.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ util/ntp-keygen.mdoc.in@1.202 +3 -3
+ NTP_4_2_7P381
+
+ChangeSet@1.2972, 2013-08-07 06:31:17-04:00, stenn@deacon.udel.edu
+ [Bug 2458] AM_CONFIG_HEADER is obsolete
+
+ sntp/m4/ntp_cacheversion.m4@1.14 +1 -1
+ [Bug 2458] AM_CONFIG_HEADER is obsolete
+
+ChangeSet@1.2971, 2013-08-07 05:59:16-04:00, stenn@deacon.udel.edu
+ [Bug 2458] AM_CONFIG_HEADER is obsolete
+
+ ChangeLog@1.1321 +1 -0
+ [Bug 2458] AM_CONFIG_HEADER is obsolete
+
+ configure.ac@1.561 +1 -1
+ [Bug 2458] AM_CONFIG_HEADER is obsolete
+
+ChangeSet@1.2970, 2013-08-07 05:54:22-04:00, stenn@deacon.udel.edu
+ fix type in miscopt.html - thanks Michael Tatarinov!
+
+ html/miscopt.html@1.74 +1 -1
+ fix type in miscopt.html - thanks Michael Tatarinov!
+
+ChangeSet@1.2966.1.5, 2013-08-07 05:31:26-04:00, stenn@pogo.udel.edu
+ Reorder bug numbers in ChangeLog
+
+ ChangeLog@1.1317.1.4 +3 -2
+ Reorder bug numbers in ChangeLog
+
+ChangeSet@1.2966.1.4, 2013-08-04 01:02:28-04:00, stenn@pogo.udel.edu
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/invoke-ntp.conf.texi@1.57 +5 -3
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/keyword-gen-utd@1.20 +1 -1
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp.conf.5man@1.91 +7 -3
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp.conf.5mdoc@1.91 +6 -3
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp.conf.man.in@1.91 +7 -3
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp.conf.mdoc.in@1.91 +6 -3
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp_keyword.h@1.22 +793 -789
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp_parser.c@1.85 +1448 -1130
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ ntpd/ntp_parser.h@1.51 +321 -313
+ Check in of updated files from Brian's updates for 2451,53,54
+
+ChangeSet@1.2966.1.3, 2013-08-03 15:13:34-04:00, utterback@pogo.udel.edu
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+ [Bug 2451] rlimit command is missing from the table of contents in miscopt.html
+
+ ChangeLog@1.1317.1.3 +3 -0
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+ [Bug 2451] rlimit command is missing from the table of contents in miscopt.html
+
+
+ html/miscopt.html@1.73 +3 -1
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+
+ html/scripts/miscopt.txt@1.9 +1 -0
+ [Bug 2451] rlimit command is missing from the table of contents in miscopt.html
+
+ include/ntp_config.h@1.80 +3 -0
+ [Bug 2453] Need a way to avoid calling mlockall.
+
+ ntpd/keyword-gen.c@1.25 +1 -0
+ [Bug 2454] Need way to set file descriptor limit.
+
+ ntpd/ntp.conf.def@1.8 +4 -1
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+
+ ntpd/ntp_config.c@1.313 +40 -6
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+
+ ntpd/ntp_parser.y@1.79 +2 -0
+ [Bug 2454] Need way to set file descriptor limit.
+
+ ntpd/ntpd.c@1.147 +34 -22
+ [Bug 2454] Need way to set file descriptor limit.
+ [Bug 2453] Need a way to avoid calling mlockall.
+
+ChangeSet@1.2966.1.2, 2013-08-03 11:35:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P380
+ TAG: NTP_4_2_7P380
+
+ ChangeLog@1.1317.1.2 +1 -0
+ NTP_4_2_7P380
+
+ ntpd/invoke-ntp.conf.texi@1.56 +1 -1
+ NTP_4_2_7P380
+
+ ntpd/invoke-ntp.keys.texi@1.56 +1 -1
+ NTP_4_2_7P380
+
+ ntpd/invoke-ntpd.texi@1.372 +2 -2
+ NTP_4_2_7P380
+
+ ntpd/ntp.conf.5man@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.conf.5mdoc@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.conf.html@1.53 +1 -1
+ NTP_4_2_7P380
+
+ ntpd/ntp.conf.man.in@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.conf.mdoc.in@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.keys.5man@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.keys.5mdoc@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.keys.html@1.54 +1 -1
+ NTP_4_2_7P380
+
+ ntpd/ntp.keys.man.in@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntp.keys.mdoc.in@1.90 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntpd-opts.c@1.390 +7 -7
+ NTP_4_2_7P380
+
+ ntpd/ntpd-opts.h@1.390 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntpd.1ntpdman@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntpd.1ntpdmdoc@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntpd.html@1.48 +2 -2
+ NTP_4_2_7P380
+
+ ntpd/ntpd.man.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpd/ntpd.mdoc.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpdc/invoke-ntpdc.texi@1.369 +2 -2
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc-opts.c@1.384 +7 -7
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc-opts.h@1.384 +3 -3
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc.1ntpdcman@1.200 +2 -2
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.200 +2 -2
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc.html@1.213 +2 -2
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc.man.in@1.200 +2 -2
+ NTP_4_2_7P380
+
+ ntpdc/ntpdc.mdoc.in@1.200 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/invoke-ntpq.texi@1.373 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/ntpq-opts.c@1.387 +7 -7
+ NTP_4_2_7P380
+
+ ntpq/ntpq-opts.h@1.387 +3 -3
+ NTP_4_2_7P380
+
+ ntpq/ntpq.1ntpqman@1.201 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/ntpq.1ntpqmdoc@1.201 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/ntpq.html@1.45 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/ntpq.man.in@1.201 +2 -2
+ NTP_4_2_7P380
+
+ ntpq/ntpq.mdoc.in@1.201 +2 -2
+ NTP_4_2_7P380
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.372 +2 -2
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.387 +7 -7
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.387 +3 -3
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd.html@1.43 +1 -1
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd.man.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ packageinfo.sh@1.383 +1 -1
+ NTP_4_2_7P380
+
+ scripts/invoke-ntp-wait.texi@1.189 +16 -1
+ NTP_4_2_7P380
+
+ scripts/ntp-wait.1ntp-waitman@1.200 +3 -3
+ NTP_4_2_7P380
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.200 +3 -3
+ NTP_4_2_7P380
+
+ scripts/ntp-wait.html@1.205 +17 -1
+ NTP_4_2_7P380
+
+ scripts/ntp-wait.man.in@1.200 +3 -3
+ NTP_4_2_7P380
+
+ scripts/ntp-wait.mdoc.in@1.200 +3 -3
+ NTP_4_2_7P380
+
+ sntp/invoke-sntp.texi@1.369 +2 -2
+ NTP_4_2_7P380
+
+ sntp/sntp-opts.c@1.384 +7 -7
+ NTP_4_2_7P380
+
+ sntp/sntp-opts.h@1.384 +3 -3
+ NTP_4_2_7P380
+
+ sntp/sntp.1sntpman@1.204 +3 -3
+ NTP_4_2_7P380
+
+ sntp/sntp.1sntpmdoc@1.204 +3 -3
+ NTP_4_2_7P380
+
+ sntp/sntp.html@1.384 +2 -2
+ NTP_4_2_7P380
+
+ sntp/sntp.man.in@1.204 +3 -3
+ NTP_4_2_7P380
+
+ sntp/sntp.mdoc.in@1.204 +3 -3
+ NTP_4_2_7P380
+
+ util/invoke-ntp-keygen.texi@1.373 +2 -2
+ NTP_4_2_7P380
+
+ util/ntp-keygen-opts.c@1.387 +7 -7
+ NTP_4_2_7P380
+
+ util/ntp-keygen-opts.h@1.387 +3 -3
+ NTP_4_2_7P380
+
+ util/ntp-keygen.1ntp-keygenman@1.201 +3 -3
+ NTP_4_2_7P380
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.201 +3 -3
+ NTP_4_2_7P380
+
+ util/ntp-keygen.html@1.49 +2 -2
+ NTP_4_2_7P380
+
+ util/ntp-keygen.man.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ util/ntp-keygen.mdoc.in@1.201 +3 -3
+ NTP_4_2_7P380
+
+ChangeSet@1.2966.1.1, 2013-08-03 05:35:28-04:00, stenn@deacon.udel.edu
+ CID 984511: Some systems have different printf needs for sizeof
+
+ ChangeLog@1.1317.1.1 +1 -0
+ CID 984511: Some systems have different printf needs for sizeof
+
+ sntp/main.c@1.92 +1 -1
+ CID 984511: Some systems have different printf needs for sizeof
+
+ChangeSet@1.2967, 2013-08-03 08:15:49+00:00, kardel@pogo.udel.edu
+ ChangeLog ntpd.h, ntp_io.c:
+ [Bug 2452] provide io_handler/input_handler only on non HAVE_IO_COMPLETION_PORT platforms
+
+ ChangeLog@1.1318 +2 -0
+ [Bug 2452] provide io_handler/input_handler only on non HAVE_IO_COMPLETION_PORT platforms
+
+ include/ntpd.h@1.178 +2 -0
+ [Bug 2452] provide io_handler/input_handler only on HAVE_IO_COMPLETION platforms
+
+ ntpd/ntp_io.c@1.382 +64 -64
+ [Bug 2452] provide io_handler/input_handler only on HAVE_IO_COMPLETION platforms
+
+ChangeSet@1.2966, 2013-08-02 11:37:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P379
+ TAG: NTP_4_2_7P379
+
+ ChangeLog@1.1317 +1 -0
+ NTP_4_2_7P379
+
+ ntpd/invoke-ntp.conf.texi@1.55 +1 -1
+ NTP_4_2_7P379
+
+ ntpd/invoke-ntp.keys.texi@1.55 +1 -1
+ NTP_4_2_7P379
+
+ ntpd/invoke-ntpd.texi@1.371 +2 -2
+ NTP_4_2_7P379
+
+ ntpd/ntp.conf.5man@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.conf.5mdoc@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.conf.html@1.52 +1 -1
+ NTP_4_2_7P379
+
+ ntpd/ntp.conf.man.in@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.conf.mdoc.in@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.keys.5man@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.keys.5mdoc@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.keys.html@1.53 +1 -1
+ NTP_4_2_7P379
+
+ ntpd/ntp.keys.man.in@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntp.keys.mdoc.in@1.89 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntpd-opts.c@1.389 +7 -7
+ NTP_4_2_7P379
+
+ ntpd/ntpd-opts.h@1.389 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntpd.1ntpdman@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntpd.1ntpdmdoc@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntpd.html@1.47 +2 -2
+ NTP_4_2_7P379
+
+ ntpd/ntpd.man.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpd/ntpd.mdoc.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpdc/invoke-ntpdc.texi@1.368 +2 -2
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc-opts.c@1.383 +7 -7
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc-opts.h@1.383 +3 -3
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc.1ntpdcman@1.199 +2 -2
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.199 +2 -2
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc.html@1.212 +2 -2
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc.man.in@1.199 +2 -2
+ NTP_4_2_7P379
+
+ ntpdc/ntpdc.mdoc.in@1.199 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/invoke-ntpq.texi@1.372 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/ntpq-opts.c@1.386 +7 -7
+ NTP_4_2_7P379
+
+ ntpq/ntpq-opts.h@1.386 +3 -3
+ NTP_4_2_7P379
+
+ ntpq/ntpq.1ntpqman@1.200 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/ntpq.1ntpqmdoc@1.200 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/ntpq.html@1.44 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/ntpq.man.in@1.200 +2 -2
+ NTP_4_2_7P379
+
+ ntpq/ntpq.mdoc.in@1.200 +2 -2
+ NTP_4_2_7P379
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.371 +2 -2
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.386 +7 -7
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.386 +3 -3
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd.html@1.42 +1 -1
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd.man.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ packageinfo.sh@1.382 +1 -1
+ NTP_4_2_7P379
+
+ scripts/invoke-ntp-wait.texi@1.188 +1 -16
+ NTP_4_2_7P379
+
+ scripts/ntp-wait.1ntp-waitman@1.199 +3 -3
+ NTP_4_2_7P379
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.199 +3 -3
+ NTP_4_2_7P379
+
+ scripts/ntp-wait.html@1.204 +1 -17
+ NTP_4_2_7P379
+
+ scripts/ntp-wait.man.in@1.199 +3 -3
+ NTP_4_2_7P379
+
+ scripts/ntp-wait.mdoc.in@1.199 +3 -3
+ NTP_4_2_7P379
+
+ sntp/invoke-sntp.texi@1.368 +2 -2
+ NTP_4_2_7P379
+
+ sntp/sntp-opts.c@1.383 +7 -7
+ NTP_4_2_7P379
+
+ sntp/sntp-opts.h@1.383 +3 -3
+ NTP_4_2_7P379
+
+ sntp/sntp.1sntpman@1.203 +3 -3
+ NTP_4_2_7P379
+
+ sntp/sntp.1sntpmdoc@1.203 +3 -3
+ NTP_4_2_7P379
+
+ sntp/sntp.html@1.383 +2 -2
+ NTP_4_2_7P379
+
+ sntp/sntp.man.in@1.203 +3 -3
+ NTP_4_2_7P379
+
+ sntp/sntp.mdoc.in@1.203 +3 -3
+ NTP_4_2_7P379
+
+ util/invoke-ntp-keygen.texi@1.372 +2 -2
+ NTP_4_2_7P379
+
+ util/ntp-keygen-opts.c@1.386 +7 -7
+ NTP_4_2_7P379
+
+ util/ntp-keygen-opts.h@1.386 +3 -3
+ NTP_4_2_7P379
+
+ util/ntp-keygen.1ntp-keygenman@1.200 +3 -3
+ NTP_4_2_7P379
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.200 +3 -3
+ NTP_4_2_7P379
+
+ util/ntp-keygen.html@1.48 +2 -2
+ NTP_4_2_7P379
+
+ util/ntp-keygen.man.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ util/ntp-keygen.mdoc.in@1.200 +3 -3
+ NTP_4_2_7P379
+
+ChangeSet@1.2965, 2013-08-02 06:30:59-04:00, stenn@deacon.udel.edu
+ CID 739724: Fix printf arg mismatch in a debug line
+
+ sntp/main.c@1.91 +1 -1
+ CID 739724: Fix printf arg mismatch in a debug line
+
+ChangeSet@1.2964, 2013-08-02 06:28:46-04:00, stenn@deacon.udel.edu
+ CID 739724: Fix printf arg mismatch in a debug line
+
+ ChangeLog@1.1316 +1 -0
+ CID 739724: Fix printf arg mismatch in a debug line
+
+ sntp/main.c@1.90 +1 -1
+ CID 739724: Fix printf arg mismatch in a debug line
+
+ChangeSet@1.2963, 2013-08-02 06:08:47+00:00, kardel@pogo.udel.edu
+ ChangeLog ntp_io.c:
+ [Bug 2425] compile io_handler() in ntp_io.c unconditionally
+
+ ChangeLog@1.1315 +1 -0
+ [Bug 2425] compile io_handler() in ntp_io.c unconditionally
+
+ ntpd/ntp_io.c@1.381 +7 -8
+ place io_handler outside of HAVE_ROUTING_SOCKET conditional
+
+ChangeSet@1.2962, 2013-08-01 17:58:31-04:00, stenn@deacon.udel.edu
+ [Bug 2448] Fix checks for configure --with-stack-limit and --with-memlock values
+
+ ChangeLog@1.1314 +2 -0
+ [Bug 2448] Fix checks for configure --with-stack-limit and --with-memlock values
+
+ configure.ac@1.560 +2 -2
+ [Bug 2448] Fix checks for configure --with-stack-limit and --with-memlock values
+
+ChangeSet@1.2961, 2013-08-01 06:45:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P378
+ TAG: NTP_4_2_7P378
+
+ ChangeLog@1.1313 +1 -0
+ NTP_4_2_7P378
+
+ ntpd/invoke-ntp.conf.texi@1.54 +1 -1
+ NTP_4_2_7P378
+
+ ntpd/invoke-ntp.keys.texi@1.54 +1 -1
+ NTP_4_2_7P378
+
+ ntpd/invoke-ntpd.texi@1.370 +2 -2
+ NTP_4_2_7P378
+
+ ntpd/ntp.conf.5man@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.conf.5mdoc@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.conf.html@1.51 +1 -1
+ NTP_4_2_7P378
+
+ ntpd/ntp.conf.man.in@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.conf.mdoc.in@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.keys.5man@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.keys.5mdoc@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.keys.html@1.52 +1 -1
+ NTP_4_2_7P378
+
+ ntpd/ntp.keys.man.in@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntp.keys.mdoc.in@1.88 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntpd-opts.c@1.388 +7 -7
+ NTP_4_2_7P378
+
+ ntpd/ntpd-opts.h@1.388 +3 -3
+ NTP_4_2_7P378
+
+ ntpd/ntpd.1ntpdman@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntpd.1ntpdmdoc@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntpd.html@1.46 +2 -2
+ NTP_4_2_7P378
+
+ ntpd/ntpd.man.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpd/ntpd.mdoc.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpdc/invoke-ntpdc.texi@1.367 +2 -2
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc-opts.c@1.382 +7 -7
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc-opts.h@1.382 +3 -3
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc.1ntpdcman@1.198 +21 -2
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.198 +21 -2
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc.html@1.211 +57 -77
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc.man.in@1.198 +21 -2
+ NTP_4_2_7P378
+
+ ntpdc/ntpdc.mdoc.in@1.198 +21 -2
+ NTP_4_2_7P378
+
+ ntpq/invoke-ntpq.texi@1.371 +2 -2
+ NTP_4_2_7P378
+
+ ntpq/ntpq-opts.c@1.385 +7 -7
+ NTP_4_2_7P378
+
+ ntpq/ntpq-opts.h@1.385 +3 -3
+ NTP_4_2_7P378
+
+ ntpq/ntpq.1ntpqman@1.199 +21 -2
+ NTP_4_2_7P378
+
+ ntpq/ntpq.1ntpqmdoc@1.199 +21 -2
+ NTP_4_2_7P378
+
+ ntpq/ntpq.html@1.43 +2 -2
+ NTP_4_2_7P378
+
+ ntpq/ntpq.man.in@1.199 +21 -2
+ NTP_4_2_7P378
+
+ ntpq/ntpq.mdoc.in@1.199 +21 -2
+ NTP_4_2_7P378
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.370 +2 -2
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.385 +7 -7
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.385 +3 -3
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd.html@1.41 +1 -1
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd.man.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ packageinfo.sh@1.381 +1 -1
+ NTP_4_2_7P378
+
+ scripts/invoke-ntp-wait.texi@1.187 +3 -3
+ NTP_4_2_7P378
+
+ scripts/ntp-wait.1ntp-waitman@1.198 +22 -3
+ NTP_4_2_7P378
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.198 +22 -3
+ NTP_4_2_7P378
+
+ scripts/ntp-wait.html@1.203 +40 -62
+ NTP_4_2_7P378
+
+ scripts/ntp-wait.man.in@1.198 +22 -3
+ NTP_4_2_7P378
+
+ scripts/ntp-wait.mdoc.in@1.198 +22 -3
+ NTP_4_2_7P378
+
+ sntp/invoke-sntp.texi@1.367 +2 -2
+ NTP_4_2_7P378
+
+ sntp/sntp-opts.c@1.382 +7 -7
+ NTP_4_2_7P378
+
+ sntp/sntp-opts.h@1.382 +3 -3
+ NTP_4_2_7P378
+
+ sntp/sntp.1sntpman@1.202 +22 -3
+ NTP_4_2_7P378
+
+ sntp/sntp.1sntpmdoc@1.202 +22 -3
+ NTP_4_2_7P378
+
+ sntp/sntp.html@1.382 +87 -112
+ NTP_4_2_7P378
+
+ sntp/sntp.man.in@1.202 +22 -3
+ NTP_4_2_7P378
+
+ sntp/sntp.mdoc.in@1.202 +22 -3
+ NTP_4_2_7P378
+
+ util/invoke-ntp-keygen.texi@1.371 +2 -2
+ NTP_4_2_7P378
+
+ util/ntp-keygen-opts.c@1.385 +7 -7
+ NTP_4_2_7P378
+
+ util/ntp-keygen-opts.h@1.385 +3 -3
+ NTP_4_2_7P378
+
+ util/ntp-keygen.1ntp-keygenman@1.199 +22 -3
+ NTP_4_2_7P378
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.199 +22 -3
+ NTP_4_2_7P378
+
+ util/ntp-keygen.html@1.47 +2 -2
+ NTP_4_2_7P378
+
+ util/ntp-keygen.man.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ util/ntp-keygen.mdoc.in@1.199 +22 -3
+ NTP_4_2_7P378
+
+ChangeSet@1.2960, 2013-08-01 01:34:34-04:00, stenn@deacon.udel.edu
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ ChangeLog@1.1312 +1 -0
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ include/ntp_stdlib.h@1.75 +11 -10
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ include/ntp_worker.h@1.3 +2 -2
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ include/ntpd.h@1.177 +2 -2
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ libntp/ntp_random.c@1.10 +5 -5
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ ntpd/refclock_oncore.c@1.98 +1 -1
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ sntp/libevent/minheap-internal.h@1.5 +1 -2
+ [Bug 2446] Quiet warnings from Oracle's Studio compiler
+
+ChangeSet@1.2957.1.3, 2013-08-01 02:39:32+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to AutoGen-5.18.1pre3
+
+ ChangeLog@1.1307.1.2 +1 -0
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/invoke-ntp.conf.texi@1.53 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/invoke-ntp.keys.texi@1.53 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/invoke-ntpd.texi@1.369 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.conf.5man@1.87 +11 -30
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.conf.5mdoc@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.conf.man.in@1.87 +11 -30
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.conf.mdoc.in@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.keys.5man@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.keys.5mdoc@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.keys.man.in@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntp.keys.mdoc.in@1.87 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd-opts.c@1.387 +66 -66
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd-opts.h@1.387 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd.1ntpdman@1.198 +44 -63
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd.1ntpdmdoc@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd.man.in@1.198 +44 -63
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpd.mdoc.in@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpdsim-opts.c@1.22 +324 -167
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpd/ntpdsim-opts.h@1.22 +47 -25
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/invoke-ntpdc.texi@1.366 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc-opts.c@1.381 +67 -67
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc-opts.h@1.381 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc.1ntpdcman@1.197 +17 -36
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.197 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc.html@1.210 +75 -55
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc.man.in@1.197 +17 -36
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpdc/ntpdc.mdoc.in@1.197 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/invoke-ntpq.texi@1.370 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq-opts.c@1.384 +67 -67
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq-opts.h@1.384 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq.1ntpqman@1.198 +15 -34
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq.1ntpqmdoc@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq.man.in@1.198 +15 -34
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpq/ntpq.mdoc.in@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.369 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.384 +67 -67
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.384 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.198 +5 -24
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd.man.in@1.198 +5 -24
+ Upgrade to AutoGen-5.18.1pre3
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/invoke-ntp-wait.texi@1.186 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/ntp-wait.1ntp-waitman@1.197 +6 -25
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.197 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/ntp-wait.html@1.202 +61 -39
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/ntp-wait.man.in@1.197 +6 -25
+ Upgrade to AutoGen-5.18.1pre3
+
+ scripts/ntp-wait.mdoc.in@1.197 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/include/autogen-version.def@1.18 +2 -2
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/invoke-sntp.texi@1.366 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp-opts.c@1.381 +67 -67
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp-opts.h@1.381 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp.1sntpman@1.201 +20 -39
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp.1sntpmdoc@1.201 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp.html@1.381 +110 -85
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp.man.in@1.201 +20 -39
+ Upgrade to AutoGen-5.18.1pre3
+
+ sntp/sntp.mdoc.in@1.201 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/invoke-ntp-keygen.texi@1.370 +1 -1
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen-opts.c@1.384 +67 -67
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen-opts.h@1.384 +3 -3
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen.1ntp-keygenman@1.198 +45 -64
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen.man.in@1.198 +45 -64
+ Upgrade to AutoGen-5.18.1pre3
+
+ util/ntp-keygen.mdoc.in@1.198 +3 -22
+ Upgrade to AutoGen-5.18.1pre3
+
+ChangeSet@1.2957.1.2, 2013-08-01 02:05:18+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to libopts-40.1.15
+
+ ChangeLog@1.1307.1.1 +1 -0
+ Upgrade to libopts-40.1.15
+
+ChangeSet@1.2957.1.1, 2013-08-01 02:03:52+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/Makefile.am@1.22 +6 -6
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/ag-char-map.h@1.25 +5 -5
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/ao-strs.c@1.11 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/ao-strs.h@1.10 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/autoopts.c@1.18 +22 -22
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/autoopts.h@1.16 +11 -0
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/autoopts/options.h@1.24 +4 -4
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/autoopts/usage-txt.h@1.24 +61 -61
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/compat/pathfind.c@1.10 +22 -76
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/compat/strchr.c@1.4 +2 -2
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/configfile.c@1.20 +12 -5
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/find.c@1.9 +10 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/genshell.c@1.25 +20 -20
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/genshell.h@1.25 +3 -3
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/init.c@1.5 +6 -6
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/load.c@1.18 +164 -117
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/m4/libopts.m4@1.28 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/option-value-type.c@1.12 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/option-value-type.h@1.26 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/option-xat-attribute.c@1.12 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/option-xat-attribute.h@1.26 +1 -1
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/pgusage.c@1.15 +4 -0
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/proto.h@1.25 +3 -3
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/streqvcmp.c@1.14 +2 -2
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/text_mmap.c@1.15 +25 -18
+ Upgrade to libopts-40.1.15
+
+ sntp/libopts/usage.c@1.18 +1 -0
+ Upgrade to libopts-40.1.15
+
+ChangeSet@1.2958, 2013-07-31 08:45:06+00:00, kardel@pogo.udel.edu
+ ntpd.c, ntp_io.c, ChangeLog, ntpd.h, iosignal.h:
+ [Bug 2425] move part of input handler code from ntpd.c to ntp_io.c
+ and fix select() only platforms calling input_handler directly.
+
+ ChangeLog@1.1310 +1 -1
+ fix wording
+
+ ChangeLog@1.1309 +1 -1
+ fix spelling
+
+ ChangeLog@1.1308 +2 -0
+ [Bug 2425] move part of inputhandle code from ntpd.c to ntp_io.c
+ and fix select() only platforms callint input_handler.
+
+ include/iosignal.h@1.8 +3 -3
+ [Bug 2425] move part of inputhandle code from ntpd.c to ntp_io.c
+ and fix select() only platforms callint input_handler.
+
+ include/ntpd.h@1.176 +1 -3
+ [Bug 2425] move part of inputhandle code from ntpd.c to ntp_io.c
+ and fix select() only platforms callint input_handler..
+
+ ntpd/ntp_io.c@1.380 +69 -4
+ [Bug 2425] move part of inputhandle code from ntpd.c to ntp_io.c
+ and fix select() only platforms callint input_handler.
+
+ ntpd/ntpd.c@1.146 +6 -61
+ [Bug 2425] move part of inputhandle code from ntpd.c to ntp_io.c
+ and fix select() only platforms callint input_handler..
+
+ChangeSet@1.2957, 2013-07-28 11:41:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P377
+ TAG: NTP_4_2_7P377
+
+ ChangeLog@1.1307 +1 -0
+ NTP_4_2_7P377
+
+ ntpd/invoke-ntp.conf.texi@1.52 +1 -1
+ NTP_4_2_7P377
+
+ ntpd/invoke-ntp.keys.texi@1.52 +1 -1
+ NTP_4_2_7P377
+
+ ntpd/invoke-ntpd.texi@1.368 +2 -2
+ NTP_4_2_7P377
+
+ ntpd/ntp.conf.5man@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.conf.5mdoc@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.conf.html@1.50 +1 -1
+ NTP_4_2_7P377
+
+ ntpd/ntp.conf.man.in@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.conf.mdoc.in@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.keys.5man@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.keys.5mdoc@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.keys.html@1.51 +1 -1
+ NTP_4_2_7P377
+
+ ntpd/ntp.keys.man.in@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntp.keys.mdoc.in@1.86 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntpd-opts.c@1.386 +7 -7
+ NTP_4_2_7P377
+
+ ntpd/ntpd-opts.h@1.386 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntpd.1ntpdman@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntpd.1ntpdmdoc@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntpd.html@1.45 +2 -2
+ NTP_4_2_7P377
+
+ ntpd/ntpd.man.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpd/ntpd.mdoc.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpdc/invoke-ntpdc.texi@1.365 +2 -2
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc-opts.c@1.380 +7 -7
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc-opts.h@1.380 +3 -3
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc.1ntpdcman@1.196 +2 -2
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.196 +2 -2
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc.html@1.209 +2 -2
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc.man.in@1.196 +2 -2
+ NTP_4_2_7P377
+
+ ntpdc/ntpdc.mdoc.in@1.196 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/invoke-ntpq.texi@1.369 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/ntpq-opts.c@1.383 +7 -7
+ NTP_4_2_7P377
+
+ ntpq/ntpq-opts.h@1.383 +3 -3
+ NTP_4_2_7P377
+
+ ntpq/ntpq.1ntpqman@1.197 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/ntpq.1ntpqmdoc@1.197 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/ntpq.html@1.42 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/ntpq.man.in@1.197 +2 -2
+ NTP_4_2_7P377
+
+ ntpq/ntpq.mdoc.in@1.197 +2 -2
+ NTP_4_2_7P377
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.368 +2 -2
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.383 +7 -7
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.383 +3 -3
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd.html@1.40 +1 -1
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd.man.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ packageinfo.sh@1.380 +1 -1
+ NTP_4_2_7P377
+
+ scripts/invoke-ntp-wait.texi@1.185 +1 -1
+ NTP_4_2_7P377
+
+ scripts/ntp-wait.1ntp-waitman@1.196 +3 -3
+ NTP_4_2_7P377
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.196 +3 -3
+ NTP_4_2_7P377
+
+ scripts/ntp-wait.html@1.201 +1 -1
+ NTP_4_2_7P377
+
+ scripts/ntp-wait.man.in@1.196 +3 -3
+ NTP_4_2_7P377
+
+ scripts/ntp-wait.mdoc.in@1.196 +3 -3
+ NTP_4_2_7P377
+
+ sntp/invoke-sntp.texi@1.365 +2 -2
+ NTP_4_2_7P377
+
+ sntp/sntp-opts.c@1.380 +7 -7
+ NTP_4_2_7P377
+
+ sntp/sntp-opts.h@1.380 +3 -3
+ NTP_4_2_7P377
+
+ sntp/sntp.1sntpman@1.200 +3 -3
+ NTP_4_2_7P377
+
+ sntp/sntp.1sntpmdoc@1.200 +3 -3
+ NTP_4_2_7P377
+
+ sntp/sntp.html@1.380 +2 -2
+ NTP_4_2_7P377
+
+ sntp/sntp.man.in@1.200 +3 -3
+ NTP_4_2_7P377
+
+ sntp/sntp.mdoc.in@1.200 +3 -3
+ NTP_4_2_7P377
+
+ util/invoke-ntp-keygen.texi@1.369 +2 -2
+ NTP_4_2_7P377
+
+ util/ntp-keygen-opts.c@1.383 +7 -7
+ NTP_4_2_7P377
+
+ util/ntp-keygen-opts.h@1.383 +3 -3
+ NTP_4_2_7P377
+
+ util/ntp-keygen.1ntp-keygenman@1.197 +3 -3
+ NTP_4_2_7P377
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.197 +3 -3
+ NTP_4_2_7P377
+
+ util/ntp-keygen.html@1.46 +2 -2
+ NTP_4_2_7P377
+
+ util/ntp-keygen.man.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ util/ntp-keygen.mdoc.in@1.197 +3 -3
+ NTP_4_2_7P377
+
+ChangeSet@1.2956, 2013-07-28 04:16:23-04:00, stenn@deacon.udel.edu
+ [Bug 2397] License/copyright cleanup
+
+ ChangeLog@1.1306 +1 -0
+ [Bug 2397] License/copyright cleanup
+
+ include/timepps-SCO.h@1.3 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ include/timepps-Solaris.h@1.7 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ include/timepps-SunOS.h@1.4 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ ports/winnt/include/timepps.h@1.3 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h@1.2 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt@1.2 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ ports/winnt/ppsapi/loopback/src/timepps.h@1.2 +1 -1
+ [Bug 2397] License/copyright cleanup
+
+ChangeSet@1.2955, 2013-07-28 02:28:23-04:00, stenn@deacon.udel.edu
+ [Bug 2439] Fix check of EscapeCommFunction() in ports/winnt/libntp/termios.c
+
+ ChangeLog@1.1305 +1 -0
+ [Bug 2439] Fix check of EscapeCommFunction() in ports/winnt/libntp/termios.c
+
+ ports/winnt/libntp/termios.c@1.29 +2 -2
+ [Bug 2439] Fix check of EscapeCommFunction() in ports/winnt/libntp/termios.c
+
+ChangeSet@1.2954, 2013-07-24 11:38:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P376
+ TAG: NTP_4_2_7P376
+
+ ChangeLog@1.1304 +1 -0
+ NTP_4_2_7P376
+
+ ntpd/invoke-ntp.conf.texi@1.51 +1 -1
+ NTP_4_2_7P376
+
+ ntpd/invoke-ntp.keys.texi@1.51 +1 -1
+ NTP_4_2_7P376
+
+ ntpd/invoke-ntpd.texi@1.367 +2 -2
+ NTP_4_2_7P376
+
+ ntpd/ntp.conf.5man@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.conf.5mdoc@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.conf.html@1.49 +1 -1
+ NTP_4_2_7P376
+
+ ntpd/ntp.conf.man.in@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.conf.mdoc.in@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.keys.5man@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.keys.5mdoc@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.keys.html@1.50 +1 -1
+ NTP_4_2_7P376
+
+ ntpd/ntp.keys.man.in@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntp.keys.mdoc.in@1.85 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntpd-opts.c@1.385 +7 -7
+ NTP_4_2_7P376
+
+ ntpd/ntpd-opts.h@1.385 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntpd.1ntpdman@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntpd.1ntpdmdoc@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntpd.html@1.44 +2 -2
+ NTP_4_2_7P376
+
+ ntpd/ntpd.man.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpd/ntpd.mdoc.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpdc/invoke-ntpdc.texi@1.364 +2 -2
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc-opts.c@1.379 +7 -7
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc-opts.h@1.379 +3 -3
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc.1ntpdcman@1.195 +2 -2
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.195 +2 -2
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc.html@1.208 +2 -2
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc.man.in@1.195 +2 -2
+ NTP_4_2_7P376
+
+ ntpdc/ntpdc.mdoc.in@1.195 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/invoke-ntpq.texi@1.368 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/ntpq-opts.c@1.382 +7 -7
+ NTP_4_2_7P376
+
+ ntpq/ntpq-opts.h@1.382 +3 -3
+ NTP_4_2_7P376
+
+ ntpq/ntpq.1ntpqman@1.196 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/ntpq.1ntpqmdoc@1.196 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/ntpq.html@1.41 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/ntpq.man.in@1.196 +2 -2
+ NTP_4_2_7P376
+
+ ntpq/ntpq.mdoc.in@1.196 +2 -2
+ NTP_4_2_7P376
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.367 +2 -2
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.382 +7 -7
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.382 +3 -3
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd.html@1.39 +1 -1
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd.man.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ packageinfo.sh@1.379 +1 -1
+ NTP_4_2_7P376
+
+ scripts/invoke-ntp-wait.texi@1.184 +1 -1
+ NTP_4_2_7P376
+
+ scripts/ntp-wait.1ntp-waitman@1.195 +3 -3
+ NTP_4_2_7P376
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.195 +3 -3
+ NTP_4_2_7P376
+
+ scripts/ntp-wait.html@1.200 +1 -1
+ NTP_4_2_7P376
+
+ scripts/ntp-wait.man.in@1.195 +3 -3
+ NTP_4_2_7P376
+
+ scripts/ntp-wait.mdoc.in@1.195 +3 -3
+ NTP_4_2_7P376
+
+ sntp/invoke-sntp.texi@1.364 +2 -2
+ NTP_4_2_7P376
+
+ sntp/sntp-opts.c@1.379 +7 -7
+ NTP_4_2_7P376
+
+ sntp/sntp-opts.h@1.379 +3 -3
+ NTP_4_2_7P376
+
+ sntp/sntp.1sntpman@1.199 +3 -3
+ NTP_4_2_7P376
+
+ sntp/sntp.1sntpmdoc@1.199 +3 -3
+ NTP_4_2_7P376
+
+ sntp/sntp.html@1.379 +2 -2
+ NTP_4_2_7P376
+
+ sntp/sntp.man.in@1.199 +3 -3
+ NTP_4_2_7P376
+
+ sntp/sntp.mdoc.in@1.199 +3 -3
+ NTP_4_2_7P376
+
+ util/invoke-ntp-keygen.texi@1.368 +2 -2
+ NTP_4_2_7P376
+
+ util/ntp-keygen-opts.c@1.382 +7 -7
+ NTP_4_2_7P376
+
+ util/ntp-keygen-opts.h@1.382 +3 -3
+ NTP_4_2_7P376
+
+ util/ntp-keygen.1ntp-keygenman@1.196 +3 -3
+ NTP_4_2_7P376
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.196 +3 -3
+ NTP_4_2_7P376
+
+ util/ntp-keygen.html@1.45 +2 -2
+ NTP_4_2_7P376
+
+ util/ntp-keygen.man.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ util/ntp-keygen.mdoc.in@1.196 +3 -3
+ NTP_4_2_7P376
+
+ChangeSet@1.2953, 2013-07-24 05:46:25-04:00, stenn@deacon.udel.edu
+ [Bug 2322] Oncore driver should send 0 PPS offset to GPS
+
+ ChangeLog@1.1303 +1 -0
+ [Bug 2322] Oncore driver should send 0 PPS offset to GPS
+
+ ntpd/refclock_oncore.c@1.97 +3 -5
+ [Bug 2322] Oncore driver should send 0 PPS offset to GPS
+
+ChangeSet@1.2952, 2013-07-22 11:40:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P375
+ TAG: NTP_4_2_7P375
+
+ ChangeLog@1.1302 +1 -0
+ NTP_4_2_7P375
+
+ ntpd/invoke-ntp.conf.texi@1.50 +1 -1
+ NTP_4_2_7P375
+
+ ntpd/invoke-ntp.keys.texi@1.50 +1 -1
+ NTP_4_2_7P375
+
+ ntpd/invoke-ntpd.texi@1.366 +2 -2
+ NTP_4_2_7P375
+
+ ntpd/ntp.conf.5man@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.conf.5mdoc@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.conf.html@1.48 +1 -1
+ NTP_4_2_7P375
+
+ ntpd/ntp.conf.man.in@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.conf.mdoc.in@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.keys.5man@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.keys.5mdoc@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.keys.html@1.49 +1 -1
+ NTP_4_2_7P375
+
+ ntpd/ntp.keys.man.in@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntp.keys.mdoc.in@1.84 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntpd-opts.c@1.384 +7 -7
+ NTP_4_2_7P375
+
+ ntpd/ntpd-opts.h@1.384 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntpd.1ntpdman@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntpd.1ntpdmdoc@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntpd.html@1.43 +2 -2
+ NTP_4_2_7P375
+
+ ntpd/ntpd.man.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpd/ntpd.mdoc.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpdc/invoke-ntpdc.texi@1.363 +2 -2
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc-opts.c@1.378 +7 -7
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc-opts.h@1.378 +3 -3
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc.1ntpdcman@1.194 +2 -2
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.194 +2 -2
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc.html@1.207 +2 -2
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc.man.in@1.194 +2 -2
+ NTP_4_2_7P375
+
+ ntpdc/ntpdc.mdoc.in@1.194 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/invoke-ntpq.texi@1.367 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/ntpq-opts.c@1.381 +7 -7
+ NTP_4_2_7P375
+
+ ntpq/ntpq-opts.h@1.381 +3 -3
+ NTP_4_2_7P375
+
+ ntpq/ntpq.1ntpqman@1.195 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/ntpq.1ntpqmdoc@1.195 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/ntpq.html@1.40 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/ntpq.man.in@1.195 +2 -2
+ NTP_4_2_7P375
+
+ ntpq/ntpq.mdoc.in@1.195 +2 -2
+ NTP_4_2_7P375
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.366 +2 -2
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.381 +7 -7
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.381 +3 -3
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd.html@1.38 +1 -1
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd.man.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ packageinfo.sh@1.378 +1 -1
+ NTP_4_2_7P375
+
+ scripts/invoke-ntp-wait.texi@1.183 +1 -1
+ NTP_4_2_7P375
+
+ scripts/ntp-wait.1ntp-waitman@1.194 +3 -3
+ NTP_4_2_7P375
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.194 +3 -3
+ NTP_4_2_7P375
+
+ scripts/ntp-wait.html@1.199 +1 -1
+ NTP_4_2_7P375
+
+ scripts/ntp-wait.man.in@1.194 +3 -3
+ NTP_4_2_7P375
+
+ scripts/ntp-wait.mdoc.in@1.194 +3 -3
+ NTP_4_2_7P375
+
+ sntp/invoke-sntp.texi@1.363 +2 -2
+ NTP_4_2_7P375
+
+ sntp/sntp-opts.c@1.378 +7 -7
+ NTP_4_2_7P375
+
+ sntp/sntp-opts.h@1.378 +3 -3
+ NTP_4_2_7P375
+
+ sntp/sntp.1sntpman@1.198 +3 -3
+ NTP_4_2_7P375
+
+ sntp/sntp.1sntpmdoc@1.198 +3 -3
+ NTP_4_2_7P375
+
+ sntp/sntp.html@1.378 +2 -2
+ NTP_4_2_7P375
+
+ sntp/sntp.man.in@1.198 +3 -3
+ NTP_4_2_7P375
+
+ sntp/sntp.mdoc.in@1.198 +3 -3
+ NTP_4_2_7P375
+
+ util/invoke-ntp-keygen.texi@1.367 +2 -2
+ NTP_4_2_7P375
+
+ util/ntp-keygen-opts.c@1.381 +7 -7
+ NTP_4_2_7P375
+
+ util/ntp-keygen-opts.h@1.381 +3 -3
+ NTP_4_2_7P375
+
+ util/ntp-keygen.1ntp-keygenman@1.195 +3 -3
+ NTP_4_2_7P375
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.195 +3 -3
+ NTP_4_2_7P375
+
+ util/ntp-keygen.html@1.44 +2 -2
+ NTP_4_2_7P375
+
+ util/ntp-keygen.man.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ util/ntp-keygen.mdoc.in@1.195 +3 -3
+ NTP_4_2_7P375
+
+ChangeSet@1.2951, 2013-07-22 06:50:54-04:00, stenn@deacon.udel.edu
+ [Bug 883] log warning arguments swapped in refclock_gpsvme.c
+
+ ChangeLog@1.1301 +1 -0
+ [Bug 883] log warning arguments swapped in refclock_gpsvme.c
+
+ ntpd/refclock_gpsvme.c@1.10 +1 -1
+ [Bug 883] log warning arguments swapped in refclock_gpsvme.c
+
+ChangeSet@1.2950, 2013-07-22 06:39:38-04:00, stenn@deacon.udel.edu
+ [Bug 2434] Line-buffer (v. block-buffer) stdout
+
+ ChangeLog@1.1300 +1 -0
+ [Bug 2434] Line-buffer (v. block-buffer) stdout
+
+ ntpd/ntpd.c@1.145 +3 -0
+ [Bug 2434] Line-buffer (v. block-buffer) stdout
+
+ChangeSet@1.2946.1.22, 2013-07-21 17:50:57-04:00, murray@pogo.udel.edu
+ test.sh, ChangeLog:
+ Correct bug in previous attempt to fix bug-2368.
+
+ ChangeLog@1.1296.1.19 +1 -0
+ Correct bug in previous attempt to fix bug-2368.
+
+ sntp/libevent/test/test.sh@1.9 +1 -1
+ Correct bug in previous attempt to fix bug-2368.
+
+ChangeSet@1.2946.1.21, 2013-07-21 11:39:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P374
+ TAG: NTP_4_2_7P374
+
+ ChangeLog@1.1296.1.18 +1 -0
+ NTP_4_2_7P374
+
+ ntpd/invoke-ntp.conf.texi@1.49 +1 -1
+ NTP_4_2_7P374
+
+ ntpd/invoke-ntp.keys.texi@1.49 +1 -1
+ NTP_4_2_7P374
+
+ ntpd/invoke-ntpd.texi@1.365 +2 -2
+ NTP_4_2_7P374
+
+ ntpd/ntp.conf.5man@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.conf.5mdoc@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.conf.html@1.47 +1 -1
+ NTP_4_2_7P374
+
+ ntpd/ntp.conf.man.in@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.conf.mdoc.in@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.keys.5man@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.keys.5mdoc@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.keys.html@1.48 +1 -1
+ NTP_4_2_7P374
+
+ ntpd/ntp.keys.man.in@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntp.keys.mdoc.in@1.83 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntpd-opts.c@1.383 +7 -7
+ NTP_4_2_7P374
+
+ ntpd/ntpd-opts.h@1.383 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntpd.1ntpdman@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntpd.1ntpdmdoc@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntpd.html@1.42 +2 -2
+ NTP_4_2_7P374
+
+ ntpd/ntpd.man.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpd/ntpd.mdoc.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpdc/invoke-ntpdc.texi@1.362 +2 -2
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc-opts.c@1.377 +7 -7
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc-opts.h@1.377 +3 -3
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc.1ntpdcman@1.193 +2 -2
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.193 +2 -2
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc.html@1.206 +2 -2
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc.man.in@1.193 +2 -2
+ NTP_4_2_7P374
+
+ ntpdc/ntpdc.mdoc.in@1.193 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/invoke-ntpq.texi@1.366 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/ntpq-opts.c@1.380 +7 -7
+ NTP_4_2_7P374
+
+ ntpq/ntpq-opts.h@1.380 +3 -3
+ NTP_4_2_7P374
+
+ ntpq/ntpq.1ntpqman@1.194 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/ntpq.1ntpqmdoc@1.194 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/ntpq.html@1.39 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/ntpq.man.in@1.194 +2 -2
+ NTP_4_2_7P374
+
+ ntpq/ntpq.mdoc.in@1.194 +2 -2
+ NTP_4_2_7P374
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.365 +2 -2
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.380 +7 -7
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.380 +3 -3
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd.html@1.37 +1 -1
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd.man.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ packageinfo.sh@1.377 +1 -1
+ NTP_4_2_7P374
+
+ scripts/invoke-ntp-wait.texi@1.182 +1 -1
+ NTP_4_2_7P374
+
+ scripts/ntp-wait.1ntp-waitman@1.193 +3 -3
+ NTP_4_2_7P374
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.193 +3 -3
+ NTP_4_2_7P374
+
+ scripts/ntp-wait.html@1.198 +1 -1
+ NTP_4_2_7P374
+
+ scripts/ntp-wait.man.in@1.193 +3 -3
+ NTP_4_2_7P374
+
+ scripts/ntp-wait.mdoc.in@1.193 +3 -3
+ NTP_4_2_7P374
+
+ sntp/invoke-sntp.texi@1.362 +2 -2
+ NTP_4_2_7P374
+
+ sntp/sntp-opts.c@1.377 +7 -7
+ NTP_4_2_7P374
+
+ sntp/sntp-opts.h@1.377 +3 -3
+ NTP_4_2_7P374
+
+ sntp/sntp.1sntpman@1.197 +3 -3
+ NTP_4_2_7P374
+
+ sntp/sntp.1sntpmdoc@1.197 +3 -3
+ NTP_4_2_7P374
+
+ sntp/sntp.html@1.377 +2 -2
+ NTP_4_2_7P374
+
+ sntp/sntp.man.in@1.197 +3 -3
+ NTP_4_2_7P374
+
+ sntp/sntp.mdoc.in@1.197 +3 -3
+ NTP_4_2_7P374
+
+ util/invoke-ntp-keygen.texi@1.366 +2 -2
+ NTP_4_2_7P374
+
+ util/ntp-keygen-opts.c@1.380 +7 -7
+ NTP_4_2_7P374
+
+ util/ntp-keygen-opts.h@1.380 +3 -3
+ NTP_4_2_7P374
+
+ util/ntp-keygen.1ntp-keygenman@1.194 +3 -3
+ NTP_4_2_7P374
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.194 +3 -3
+ NTP_4_2_7P374
+
+ util/ntp-keygen.html@1.43 +2 -2
+ NTP_4_2_7P374
+
+ util/ntp-keygen.man.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ util/ntp-keygen.mdoc.in@1.194 +3 -3
+ NTP_4_2_7P374
+
+ChangeSet@1.2946.4.4, 2013-07-21 01:37:05-04:00, karlsson@psp-deb1.ntp.org
+ [Bug 2413] Fix "make check" with automake >= 1.13
+
+ ChangeLog@1.1296.3.4 +1 -1
+ [Bug 2413] Fix "make check" with automake >= 1.13
+
+ChangeSet@1.2946.4.3, 2013-07-21 01:36:42-04:00, karlsson@psp-deb1.ntp.org
+ [Bug 2413] Fix "make check" with automake >= 1.13
+
+ ChangeLog@1.1296.3.3 +2 -1
+ [Bug 2413] Fix "make check" with automamke >= 1.13
+
+ChangeSet@1.2946.5.1, 2013-07-20 19:56:47-04:00, murray@pogo.udel.edu
+ test.sh, ChangeLog:
+ Fix bug 2368
+
+ ChangeLog@1.1296.4.1 +1 -0
+ Fix bug 2368
+
+ sntp/libevent/test/test.sh@1.8 +7 -0
+ Fix bug 2368
+
+ChangeSet@1.2946.4.1, 2013-07-20 11:32:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P373
+ TAG: NTP_4_2_7P373
+
+ ChangeLog@1.1296.3.1 +1 -0
+ NTP_4_2_7P373
+
+ ntpd/invoke-ntp.conf.texi@1.48 +1 -1
+ NTP_4_2_7P373
+
+ ntpd/invoke-ntp.keys.texi@1.48 +1 -1
+ NTP_4_2_7P373
+
+ ntpd/invoke-ntpd.texi@1.364 +2 -2
+ NTP_4_2_7P373
+
+ ntpd/ntp.conf.5man@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.conf.5mdoc@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.conf.html@1.46 +1 -1
+ NTP_4_2_7P373
+
+ ntpd/ntp.conf.man.in@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.conf.mdoc.in@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.keys.5man@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.keys.5mdoc@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.keys.html@1.47 +1 -1
+ NTP_4_2_7P373
+
+ ntpd/ntp.keys.man.in@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntp.keys.mdoc.in@1.82 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntpd-opts.c@1.382 +7 -7
+ NTP_4_2_7P373
+
+ ntpd/ntpd-opts.h@1.382 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntpd.1ntpdman@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntpd.1ntpdmdoc@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntpd.html@1.41 +2 -2
+ NTP_4_2_7P373
+
+ ntpd/ntpd.man.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpd/ntpd.mdoc.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpdc/invoke-ntpdc.texi@1.361 +2 -2
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc-opts.c@1.376 +7 -7
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc-opts.h@1.376 +3 -3
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc.1ntpdcman@1.192 +2 -2
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.192 +2 -2
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc.html@1.205 +2 -2
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc.man.in@1.192 +2 -2
+ NTP_4_2_7P373
+
+ ntpdc/ntpdc.mdoc.in@1.192 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/invoke-ntpq.texi@1.365 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/ntpq-opts.c@1.379 +7 -7
+ NTP_4_2_7P373
+
+ ntpq/ntpq-opts.h@1.379 +3 -3
+ NTP_4_2_7P373
+
+ ntpq/ntpq.1ntpqman@1.193 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/ntpq.1ntpqmdoc@1.193 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/ntpq.html@1.38 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/ntpq.man.in@1.193 +2 -2
+ NTP_4_2_7P373
+
+ ntpq/ntpq.mdoc.in@1.193 +2 -2
+ NTP_4_2_7P373
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.364 +2 -2
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.379 +7 -7
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.379 +3 -3
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd.html@1.36 +1 -1
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd.man.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ packageinfo.sh@1.376 +1 -1
+ NTP_4_2_7P373
+
+ scripts/invoke-ntp-wait.texi@1.181 +1 -1
+ NTP_4_2_7P373
+
+ scripts/ntp-wait.1ntp-waitman@1.192 +3 -3
+ NTP_4_2_7P373
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.192 +3 -3
+ NTP_4_2_7P373
+
+ scripts/ntp-wait.html@1.197 +1 -1
+ NTP_4_2_7P373
+
+ scripts/ntp-wait.man.in@1.192 +3 -3
+ NTP_4_2_7P373
+
+ scripts/ntp-wait.mdoc.in@1.192 +3 -3
+ NTP_4_2_7P373
+
+ sntp/invoke-sntp.texi@1.361 +2 -2
+ NTP_4_2_7P373
+
+ sntp/sntp-opts.c@1.376 +7 -7
+ NTP_4_2_7P373
+
+ sntp/sntp-opts.h@1.376 +3 -3
+ NTP_4_2_7P373
+
+ sntp/sntp.1sntpman@1.196 +3 -3
+ NTP_4_2_7P373
+
+ sntp/sntp.1sntpmdoc@1.196 +3 -3
+ NTP_4_2_7P373
+
+ sntp/sntp.html@1.376 +2 -2
+ NTP_4_2_7P373
+
+ sntp/sntp.man.in@1.196 +3 -3
+ NTP_4_2_7P373
+
+ sntp/sntp.mdoc.in@1.196 +3 -3
+ NTP_4_2_7P373
+
+ util/invoke-ntp-keygen.texi@1.365 +2 -2
+ NTP_4_2_7P373
+
+ util/ntp-keygen-opts.c@1.379 +7 -7
+ NTP_4_2_7P373
+
+ util/ntp-keygen-opts.h@1.379 +3 -3
+ NTP_4_2_7P373
+
+ util/ntp-keygen.1ntp-keygenman@1.193 +3 -3
+ NTP_4_2_7P373
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.193 +3 -3
+ NTP_4_2_7P373
+
+ util/ntp-keygen.html@1.42 +2 -2
+ NTP_4_2_7P373
+
+ util/ntp-keygen.man.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ util/ntp-keygen.mdoc.in@1.193 +3 -3
+ NTP_4_2_7P373
+
+ChangeSet@1.2946.1.19, 2013-07-20 10:59:15+00:00, kardel@pogo.udel.edu
+ ntp_io.c:
+ add missing static
+
+ ntpd/ntp_io.c@1.379 +1 -1
+ add missing static
+
+ChangeSet@1.2946.1.18, 2013-07-20 10:48:50+00:00, kardel@pogo.udel.edu
+ ntp_io.c, work_thread.c:
+ [Bug 2425] keep init_socket_sig() within ntp_io.c to avoid interference with sntp's way of doing i/o
+
+ libntp/work_thread.c@1.16 +0 -4
+ [Bug 2425] keep init_socket_sig() within ntp_io.c to avoid interference with sntp's way of doing things
+
+ ntpd/ntp_io.c@1.378 +6 -1
+ [Bug 2425] keep init_socket_sig() within ntp_io.c to avoid interference with sntp's way of doing things
+
+ChangeSet@1.2946.1.17, 2013-07-20 08:25:40+00:00, kardel@pogo.udel.edu
+ work_thread.c, ntpd.h, ntpd.c, ntp_io.c, ChangeLog, iosignal.h, iosignal.c:
+ [Bug 2425] fix async io setup for worker thread
+
+ ChangeLog@1.1296.1.16 +2 -0
+ [Bug 2425] fix async io setup for worker thread
+
+ include/iosignal.h@1.7 +4 -2
+ [Bug 2425] fix async io setup for worker thread
+
+ include/ntpd.h@1.175 +0 -1
+ [Bug 2425] fix async io setup for worker thread
+
+ libntp/iosignal.c@1.17 +30 -15
+ [Bug 2425] fix async io setup for worker thread
+
+ libntp/work_thread.c@1.15 +4 -0
+ [Bug 2425] fix async io setup for worker thread.
+
+ ntpd/ntp_io.c@1.377 +1 -1
+ [Bug 2425] fix async io setup for worker thread
+
+ ntpd/ntpd.c@1.144 +1 -0
+ [Bug 2425] fix async io setup for worker thread
+
+ChangeSet@1.2946.1.16, 2013-07-20 00:33:31-04:00, stenn@pogo.udel.edu
+ Bug 2427] configure fails to detect recvmsg() on Solaris
+
+ ChangeLog@1.1296.1.15 +1 -0
+ Bug 2427] configure fails to detect recvmsg() on Solaris
+
+ configure.ac@1.559 +1 -1
+ Bug 2427] configure fails to detect recvmsg() on Solaris
+
+ sntp/m4/ntp_libntp.m4@1.19 +3 -0
+ Bug 2427] configure fails to detect recvmsg() on Solaris
+
+ChangeSet@1.2946.1.15, 2013-07-17 11:39:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P372
+ TAG: NTP_4_2_7P372
+
+ ChangeLog@1.1296.1.14 +1 -0
+ NTP_4_2_7P372
+
+ ntpd/invoke-ntp.conf.texi@1.47 +1 -1
+ NTP_4_2_7P372
+
+ ntpd/invoke-ntp.keys.texi@1.47 +1 -1
+ NTP_4_2_7P372
+
+ ntpd/invoke-ntpd.texi@1.363 +2 -2
+ NTP_4_2_7P372
+
+ ntpd/ntp.conf.5man@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.conf.5mdoc@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.conf.html@1.45 +1 -1
+ NTP_4_2_7P372
+
+ ntpd/ntp.conf.man.in@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.conf.mdoc.in@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.keys.5man@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.keys.5mdoc@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.keys.html@1.46 +1 -1
+ NTP_4_2_7P372
+
+ ntpd/ntp.keys.man.in@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntp.keys.mdoc.in@1.81 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntpd-opts.c@1.381 +7 -7
+ NTP_4_2_7P372
+
+ ntpd/ntpd-opts.h@1.381 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntpd.1ntpdman@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntpd.1ntpdmdoc@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntpd.html@1.40 +4 -2
+ NTP_4_2_7P372
+
+ ntpd/ntpd.man.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpd/ntpd.mdoc.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpdc/invoke-ntpdc.texi@1.360 +2 -2
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc-opts.c@1.375 +7 -7
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc-opts.h@1.375 +3 -3
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc.1ntpdcman@1.191 +2 -2
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.191 +2 -2
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc.html@1.204 +2 -2
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc.man.in@1.191 +2 -2
+ NTP_4_2_7P372
+
+ ntpdc/ntpdc.mdoc.in@1.191 +2 -2
+ NTP_4_2_7P372
+
+ ntpq/invoke-ntpq.texi@1.364 +2 -2
+ NTP_4_2_7P372
+
+ ntpq/ntpq-opts.c@1.378 +7 -7
+ NTP_4_2_7P372
+
+ ntpq/ntpq-opts.h@1.378 +3 -3
+ NTP_4_2_7P372
+
+ ntpq/ntpq.1ntpqman@1.192 +2 -2
+ NTP_4_2_7P372
+
+ ntpq/ntpq.1ntpqmdoc@1.192 +2 -2
+ NTP_4_2_7P372
+
+ ntpq/ntpq.html@1.37 +4 -2
+ NTP_4_2_7P372
+
+ ntpq/ntpq.man.in@1.192 +2 -2
+ NTP_4_2_7P372
+
+ ntpq/ntpq.mdoc.in@1.192 +2 -2
+ NTP_4_2_7P372
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.363 +2 -2
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.378 +7 -7
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.378 +3 -3
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd.html@1.35 +1 -1
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd.man.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ packageinfo.sh@1.375 +1 -1
+ NTP_4_2_7P372
+
+ scripts/invoke-ntp-wait.texi@1.180 +1 -1
+ NTP_4_2_7P372
+
+ scripts/ntp-wait.1ntp-waitman@1.191 +3 -3
+ NTP_4_2_7P372
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.191 +3 -3
+ NTP_4_2_7P372
+
+ scripts/ntp-wait.html@1.196 +1 -1
+ NTP_4_2_7P372
+
+ scripts/ntp-wait.man.in@1.191 +3 -3
+ NTP_4_2_7P372
+
+ scripts/ntp-wait.mdoc.in@1.191 +3 -3
+ NTP_4_2_7P372
+
+ sntp/invoke-sntp.texi@1.360 +2 -2
+ NTP_4_2_7P372
+
+ sntp/sntp-opts.c@1.375 +7 -7
+ NTP_4_2_7P372
+
+ sntp/sntp-opts.h@1.375 +3 -3
+ NTP_4_2_7P372
+
+ sntp/sntp.1sntpman@1.195 +3 -3
+ NTP_4_2_7P372
+
+ sntp/sntp.1sntpmdoc@1.195 +3 -3
+ NTP_4_2_7P372
+
+ sntp/sntp.html@1.375 +2 -2
+ NTP_4_2_7P372
+
+ sntp/sntp.man.in@1.195 +3 -3
+ NTP_4_2_7P372
+
+ sntp/sntp.mdoc.in@1.195 +3 -3
+ NTP_4_2_7P372
+
+ util/invoke-ntp-keygen.texi@1.364 +2 -2
+ NTP_4_2_7P372
+
+ util/ntp-keygen-opts.c@1.378 +7 -7
+ NTP_4_2_7P372
+
+ util/ntp-keygen-opts.h@1.378 +3 -3
+ NTP_4_2_7P372
+
+ util/ntp-keygen.1ntp-keygenman@1.192 +3 -3
+ NTP_4_2_7P372
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.192 +3 -3
+ NTP_4_2_7P372
+
+ util/ntp-keygen.html@1.41 +4 -2
+ NTP_4_2_7P372
+
+ util/ntp-keygen.man.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ util/ntp-keygen.mdoc.in@1.192 +3 -3
+ NTP_4_2_7P372
+
+ChangeSet@1.2946.1.14, 2013-07-17 05:23:29-04:00, stenn@deacon.udel.edu
+ [Bug 2428] do_unconf() should reset 'items' before the 2nd loop
+
+ ChangeLog@1.1296.1.13 +1 -0
+ [Bug 2428] do_unconf() should reset 'items' before the 2nd loop
+
+ ntpd/ntp_request.c@1.111 +1 -0
+ [Bug 2428] do_unconf() should reset 'items' before the 2nd loop
+
+ChangeSet@1.2946.1.13, 2013-07-17 05:18:42-04:00, stenn@deacon.udel.edu
+ [Bug 2423] Log command-line args at LOG_INFO
+
+ ChangeLog@1.1296.1.12 +1 -0
+ [Bug 2423] Log command-line args at LOG_INFO
+
+ ntpd/ntpd.c@1.143 +1 -1
+ [Bug 2423] Log command-line args at LOG_INFO
+
+ChangeSet@1.2946.1.12, 2013-07-17 05:11:31-04:00, stenn@pogo.udel.edu
+ [Bug 2375] AIX 7 doesn't like a libevent validation check
+
+ ChangeLog@1.1296.1.11 +1 -0
+ [Bug 2375] AIX 7 doesn't like a libevent validation check
+
+ sntp/libevent/evutil_time.c@1.3 +0 -10
+ [Bug 2375] AIX 7 doesn't like a libevent validation check
+
+ChangeSet@1.2946.1.11, 2013-07-17 03:34:42-04:00, stenn@deacon.udel.edu
+ [Bug 1466] Oncore should set FLAG_PPS
+
+ ChangeLog@1.1296.1.10 +1 -0
+ [Bug 1466] Oncore should set FLAG_PPS
+
+ ntpd/refclock_oncore.c@1.96 +12 -3
+ [Bug 1466] Oncore should set FLAG_PPS
+
+ChangeSet@1.2946.1.10, 2013-07-07 06:34:52+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P371
+ TAG: NTP_4_2_7P371
+
+ ChangeLog@1.1296.1.9 +1 -0
+ NTP_4_2_7P371
+
+ ntpd/invoke-ntp.conf.texi@1.46 +1 -1
+ NTP_4_2_7P371
+
+ ntpd/invoke-ntp.keys.texi@1.46 +1 -1
+ NTP_4_2_7P371
+
+ ntpd/invoke-ntpd.texi@1.362 +4 -2
+ NTP_4_2_7P371
+
+ ntpd/ntp.conf.5man@1.80 +36 -36
+ NTP_4_2_7P371
+
+ ntpd/ntp.conf.5mdoc@1.80 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntp.conf.html@1.44 +1 -1
+ NTP_4_2_7P371
+
+ ntpd/ntp.conf.man.in@1.80 +36 -36
+ NTP_4_2_7P371
+
+ ntpd/ntp.conf.mdoc.in@1.80 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntp.keys.5man@1.80 +10 -10
+ NTP_4_2_7P371
+
+ ntpd/ntp.keys.5mdoc@1.80 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntp.keys.html@1.45 +1 -1
+ NTP_4_2_7P371
+
+ ntpd/ntp.keys.man.in@1.80 +10 -10
+ NTP_4_2_7P371
+
+ ntpd/ntp.keys.mdoc.in@1.80 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntpd-opts.c@1.380 +104 -99
+ NTP_4_2_7P371
+
+ ntpd/ntpd-opts.h@1.380 +13 -15
+ NTP_4_2_7P371
+
+ ntpd/ntpd.1ntpdman@1.191 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntpd.1ntpdmdoc@1.191 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntpd.html@1.39 +2 -2
+ NTP_4_2_7P371
+
+ ntpd/ntpd.man.in@1.191 +4 -4
+ NTP_4_2_7P371
+
+ ntpd/ntpd.mdoc.in@1.191 +4 -4
+ NTP_4_2_7P371
+
+ ntpdc/invoke-ntpdc.texi@1.359 +4 -3
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc-opts.c@1.374 +104 -99
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc-opts.h@1.374 +14 -16
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc.1ntpdcman@1.190 +14 -13
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.190 +9 -8
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc.html@1.203 +4 -2
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc.man.in@1.190 +14 -13
+ NTP_4_2_7P371
+
+ ntpdc/ntpdc.mdoc.in@1.190 +9 -8
+ NTP_4_2_7P371
+
+ ntpq/invoke-ntpq.texi@1.363 +4 -3
+ NTP_4_2_7P371
+
+ ntpq/ntpq-opts.c@1.377 +104 -99
+ NTP_4_2_7P371
+
+ ntpq/ntpq-opts.h@1.377 +14 -16
+ NTP_4_2_7P371
+
+ ntpq/ntpq.1ntpqman@1.191 +10 -9
+ NTP_4_2_7P371
+
+ ntpq/ntpq.1ntpqmdoc@1.191 +9 -8
+ NTP_4_2_7P371
+
+ ntpq/ntpq.html@1.36 +2 -2
+ NTP_4_2_7P371
+
+ ntpq/ntpq.man.in@1.191 +10 -9
+ NTP_4_2_7P371
+
+ ntpq/ntpq.mdoc.in@1.191 +9 -8
+ NTP_4_2_7P371
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.362 +4 -3
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.377 +104 -99
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.377 +14 -16
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.191 +10 -9
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.191 +10 -9
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd.html@1.34 +1 -1
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd.man.in@1.191 +10 -9
+ NTP_4_2_7P371
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.191 +10 -9
+ NTP_4_2_7P371
+
+ packageinfo.sh@1.374 +1 -1
+ NTP_4_2_7P371
+
+ scripts/invoke-ntp-wait.texi@1.179 +1 -1
+ NTP_4_2_7P371
+
+ scripts/ntp-wait.1ntp-waitman@1.190 +6 -6
+ NTP_4_2_7P371
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.190 +4 -4
+ NTP_4_2_7P371
+
+ scripts/ntp-wait.html@1.195 +1 -1
+ NTP_4_2_7P371
+
+ scripts/ntp-wait.man.in@1.190 +6 -6
+ NTP_4_2_7P371
+
+ scripts/ntp-wait.mdoc.in@1.190 +4 -4
+ NTP_4_2_7P371
+
+ sntp/invoke-sntp.texi@1.359 +4 -3
+ NTP_4_2_7P371
+
+ sntp/sntp-opts.c@1.374 +104 -99
+ NTP_4_2_7P371
+
+ sntp/sntp-opts.h@1.374 +14 -16
+ NTP_4_2_7P371
+
+ sntp/sntp.1sntpman@1.194 +10 -9
+ NTP_4_2_7P371
+
+ sntp/sntp.1sntpmdoc@1.194 +10 -9
+ NTP_4_2_7P371
+
+ sntp/sntp.html@1.374 +4 -2
+ NTP_4_2_7P371
+
+ sntp/sntp.man.in@1.194 +10 -9
+ NTP_4_2_7P371
+
+ sntp/sntp.mdoc.in@1.194 +10 -9
+ NTP_4_2_7P371
+
+ util/invoke-ntp-keygen.texi@1.363 +4 -3
+ NTP_4_2_7P371
+
+ util/ntp-keygen-opts.c@1.377 +104 -99
+ NTP_4_2_7P371
+
+ util/ntp-keygen-opts.h@1.377 +9 -11
+ NTP_4_2_7P371
+
+ util/ntp-keygen.1ntp-keygenman@1.191 +36 -35
+ NTP_4_2_7P371
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.191 +10 -9
+ NTP_4_2_7P371
+
+ util/ntp-keygen.html@1.40 +2 -2
+ NTP_4_2_7P371
+
+ util/ntp-keygen.man.in@1.191 +36 -35
+ NTP_4_2_7P371
+
+ util/ntp-keygen.mdoc.in@1.191 +10 -9
+ NTP_4_2_7P371
+
+ChangeSet@1.2946.1.8, 2013-07-07 01:42:37-04:00, stenn@deacon.udel.edu
+ CID 1042586: Check the return value of clock_gettime() in worker_sleep()
+
+ ChangeLog@1.1296.1.7 +1 -0
+ CID 1042586: Check the return value of clock_gettime() in worker_sleep()
+
+ libntp/work_thread.c@1.14 +9 -3
+ CID 1042586: Check the return value of clock_gettime() in worker_sleep()
+
+ChangeSet@1.2946.3.1, 2013-07-07 05:39:47+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ ChangeLog@1.1296.2.1 +1 -0
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/Makefile.am@1.21 +5 -5
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/ag-char-map.h@1.24 +2 -2
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/alias.c@1.6 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/ao-strs.c@1.10 +58 -56
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/ao-strs.h@1.9 +64 -60
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/autoopts.c@1.17 +4 -19
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/autoopts.h@1.15 +59 -0
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/autoopts/options.h@1.23 +22 -6
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/autoopts/project.h@1.6 +2 -0
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/autoopts/usage-txt.h@1.23 +78 -78
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/enum.c@1.9 +211 -95
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/find.c@1.8 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/genshell.c@1.24 +91 -89
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/genshell.h@1.24 +9 -11
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/init.c@1.4 +1 -0
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/load.c@1.17 +28 -18
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/m4/libopts.m4@1.27 +11 -9
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/makeshell.c@1.16 +19 -11
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/option-value-type.c@1.11 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/option-value-type.h@1.25 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/option-xat-attribute.c@1.11 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/option-xat-attribute.h@1.25 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/pgusage.c@1.14 +81 -34
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/proto.h@1.24 +9 -10
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/putshell.c@1.13 +4 -9
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/restore.c@1.12 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/save.c@1.15 +39 -41
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/stack.c@1.14 +2 -2
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/text_mmap.c@1.14 +1 -1
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/usage.c@1.17 +35 -63
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ sntp/libopts/version.c@1.15 +3 -3
+ Upgrade to libopts-39.0.14 from 5.17.5pre10
+
+ChangeSet@1.2946.1.7, 2013-07-06 11:30:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P370
+ TAG: NTP_4_2_7P370
+
+ ChangeLog@1.1296.1.6 +1 -0
+ NTP_4_2_7P370
+
+ ntpd/invoke-ntp.conf.texi@1.45 +1 -1
+ NTP_4_2_7P370
+
+ ntpd/invoke-ntp.keys.texi@1.45 +1 -1
+ NTP_4_2_7P370
+
+ ntpd/invoke-ntpd.texi@1.361 +2 -2
+ NTP_4_2_7P370
+
+ ntpd/ntp.conf.5man@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.conf.5mdoc@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.conf.html@1.43 +1 -1
+ NTP_4_2_7P370
+
+ ntpd/ntp.conf.man.in@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.conf.mdoc.in@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.keys.5man@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.keys.5mdoc@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.keys.html@1.44 +1 -1
+ NTP_4_2_7P370
+
+ ntpd/ntp.keys.man.in@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntp.keys.mdoc.in@1.79 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntpd-opts.c@1.379 +7 -7
+ NTP_4_2_7P370
+
+ ntpd/ntpd-opts.h@1.379 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntpd.1ntpdman@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntpd.1ntpdmdoc@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntpd.html@1.38 +2 -2
+ NTP_4_2_7P370
+
+ ntpd/ntpd.man.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpd/ntpd.mdoc.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpdc/invoke-ntpdc.texi@1.358 +2 -2
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc-opts.c@1.373 +7 -7
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc-opts.h@1.373 +3 -3
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc.1ntpdcman@1.189 +2 -2
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.189 +2 -2
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc.html@1.202 +2 -2
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc.man.in@1.189 +2 -2
+ NTP_4_2_7P370
+
+ ntpdc/ntpdc.mdoc.in@1.189 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/invoke-ntpq.texi@1.362 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/ntpq-opts.c@1.376 +7 -7
+ NTP_4_2_7P370
+
+ ntpq/ntpq-opts.h@1.376 +3 -3
+ NTP_4_2_7P370
+
+ ntpq/ntpq.1ntpqman@1.190 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/ntpq.1ntpqmdoc@1.190 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/ntpq.html@1.35 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/ntpq.man.in@1.190 +2 -2
+ NTP_4_2_7P370
+
+ ntpq/ntpq.mdoc.in@1.190 +2 -2
+ NTP_4_2_7P370
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.361 +2 -2
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.376 +7 -7
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.376 +3 -3
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd.html@1.33 +1 -1
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd.man.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ packageinfo.sh@1.373 +1 -1
+ NTP_4_2_7P370
+
+ scripts/invoke-ntp-wait.texi@1.178 +1 -1
+ NTP_4_2_7P370
+
+ scripts/ntp-wait.1ntp-waitman@1.189 +3 -3
+ NTP_4_2_7P370
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.189 +3 -3
+ NTP_4_2_7P370
+
+ scripts/ntp-wait.html@1.194 +1 -1
+ NTP_4_2_7P370
+
+ scripts/ntp-wait.man.in@1.189 +3 -3
+ NTP_4_2_7P370
+
+ scripts/ntp-wait.mdoc.in@1.189 +3 -3
+ NTP_4_2_7P370
+
+ sntp/invoke-sntp.texi@1.358 +2 -2
+ NTP_4_2_7P370
+
+ sntp/sntp-opts.c@1.373 +7 -7
+ NTP_4_2_7P370
+
+ sntp/sntp-opts.h@1.373 +3 -3
+ NTP_4_2_7P370
+
+ sntp/sntp.1sntpman@1.193 +3 -3
+ NTP_4_2_7P370
+
+ sntp/sntp.1sntpmdoc@1.193 +3 -3
+ NTP_4_2_7P370
+
+ sntp/sntp.html@1.373 +2 -2
+ NTP_4_2_7P370
+
+ sntp/sntp.man.in@1.193 +3 -3
+ NTP_4_2_7P370
+
+ sntp/sntp.mdoc.in@1.193 +3 -3
+ NTP_4_2_7P370
+
+ util/invoke-ntp-keygen.texi@1.362 +2 -2
+ NTP_4_2_7P370
+
+ util/ntp-keygen-opts.c@1.376 +7 -7
+ NTP_4_2_7P370
+
+ util/ntp-keygen-opts.h@1.376 +3 -3
+ NTP_4_2_7P370
+
+ util/ntp-keygen.1ntp-keygenman@1.190 +3 -3
+ NTP_4_2_7P370
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.190 +3 -3
+ NTP_4_2_7P370
+
+ util/ntp-keygen.html@1.39 +2 -2
+ NTP_4_2_7P370
+
+ util/ntp-keygen.man.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ util/ntp-keygen.mdoc.in@1.190 +3 -3
+ NTP_4_2_7P370
+
+ChangeSet@1.2946.1.6, 2013-07-05 22:39:55-07:00, harlan@hms-mbp11.local
+ Remove tailing \n's from msyslog output strings
+
+ ChangeLog@1.1296.1.5 +1 -0
+ Remove tailing \n's from msyslog output strings
+
+ChangeSet@1.2946.2.1, 2013-07-05 22:36:33-07:00, harlan@hms-mbp11.local
+ Remove tailing \n's from msyslog output strings
+
+ libntp/audio.c@1.34 +3 -3
+ Remove tailing \n's from msyslog output strings
+
+ libntp/ssl_init.c@1.16 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ libntp/work_fork.c@1.11 +5 -5
+ Remove tailing \n's from msyslog output strings
+
+ libntp/work_thread.c@1.13 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ libparse/clk_rawdcf.c@1.16 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ libparse/parse.c@1.16 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_config.c@1.312 +9 -9
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_control.c@1.185 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_crypto.c@1.161 +3 -3
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_parser.c@1.84 +167 -470
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_parser.h@1.50 +20 -25
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_parser.y@1.78 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_proto.c@1.345 +3 -3
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntp_timer.c@1.72 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/ntpd.c@1.142 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_arc.c@1.31 +4 -4
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_bancomm.c@1.16 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_datum.c@1.22 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_hopfpci.c@1.14 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_msfees.c@1.18 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_palisade.c@1.41 +4 -4
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_ripencc.c@1.17 +5 -5
+ Remove tailing \n's from msyslog output strings
+
+ ntpd/refclock_tsyncpci.c@1.8 +5 -5
+ Remove tailing \n's from msyslog output strings
+
+ ntpdate/ntpdate.c@1.92 +4 -4
+ Remove tailing \n's from msyslog output strings
+
+ ports/winnt/libntp/SetSystemTime.c@1.11 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ports/winnt/libntp/win32_io.c@1.3 +1 -1
+ Remove tailing \n's from msyslog output strings
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.60 +5 -5
+ Remove tailing \n's from msyslog output strings
+
+ sntp/main.c@1.89 +2 -2
+ Remove tailing \n's from msyslog output strings
+
+ sntp/networking.c@1.62 +3 -3
+ Remove tailing \n's from msyslog output strings
+
+ChangeSet@1.2946.1.4, 2013-07-05 11:39:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P369
+ TAG: NTP_4_2_7P369
+
+ ChangeLog@1.1296.1.4 +1 -0
+ NTP_4_2_7P369
+
+ ntpd/invoke-ntp.conf.texi@1.44 +1 -1
+ NTP_4_2_7P369
+
+ ntpd/invoke-ntp.keys.texi@1.44 +1 -1
+ NTP_4_2_7P369
+
+ ntpd/invoke-ntpd.texi@1.360 +2 -2
+ NTP_4_2_7P369
+
+ ntpd/ntp.conf.5man@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.conf.5mdoc@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.conf.html@1.42 +1 -1
+ NTP_4_2_7P369
+
+ ntpd/ntp.conf.man.in@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.conf.mdoc.in@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.keys.5man@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.keys.5mdoc@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.keys.html@1.43 +1 -1
+ NTP_4_2_7P369
+
+ ntpd/ntp.keys.man.in@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntp.keys.mdoc.in@1.78 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntpd-opts.c@1.378 +7 -7
+ NTP_4_2_7P369
+
+ ntpd/ntpd-opts.h@1.378 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntpd.1ntpdman@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntpd.1ntpdmdoc@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntpd.html@1.37 +2 -2
+ NTP_4_2_7P369
+
+ ntpd/ntpd.man.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpd/ntpd.mdoc.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpdc/invoke-ntpdc.texi@1.357 +2 -2
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc-opts.c@1.372 +7 -7
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc-opts.h@1.372 +3 -3
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc.1ntpdcman@1.188 +2 -2
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.188 +2 -2
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc.html@1.201 +2 -2
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc.man.in@1.188 +2 -2
+ NTP_4_2_7P369
+
+ ntpdc/ntpdc.mdoc.in@1.188 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/invoke-ntpq.texi@1.361 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/ntpq-opts.c@1.375 +7 -7
+ NTP_4_2_7P369
+
+ ntpq/ntpq-opts.h@1.375 +3 -3
+ NTP_4_2_7P369
+
+ ntpq/ntpq.1ntpqman@1.189 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/ntpq.1ntpqmdoc@1.189 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/ntpq.html@1.34 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/ntpq.man.in@1.189 +2 -2
+ NTP_4_2_7P369
+
+ ntpq/ntpq.mdoc.in@1.189 +2 -2
+ NTP_4_2_7P369
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.360 +2 -2
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.375 +7 -7
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.375 +3 -3
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd.html@1.32 +1 -1
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd.man.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ packageinfo.sh@1.372 +1 -1
+ NTP_4_2_7P369
+
+ scripts/invoke-ntp-wait.texi@1.177 +1 -1
+ NTP_4_2_7P369
+
+ scripts/ntp-wait.1ntp-waitman@1.188 +3 -3
+ NTP_4_2_7P369
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.188 +3 -3
+ NTP_4_2_7P369
+
+ scripts/ntp-wait.html@1.193 +1 -1
+ NTP_4_2_7P369
+
+ scripts/ntp-wait.man.in@1.188 +3 -3
+ NTP_4_2_7P369
+
+ scripts/ntp-wait.mdoc.in@1.188 +3 -3
+ NTP_4_2_7P369
+
+ sntp/invoke-sntp.texi@1.357 +2 -2
+ NTP_4_2_7P369
+
+ sntp/sntp-opts.c@1.372 +7 -7
+ NTP_4_2_7P369
+
+ sntp/sntp-opts.h@1.372 +3 -3
+ NTP_4_2_7P369
+
+ sntp/sntp.1sntpman@1.192 +3 -3
+ NTP_4_2_7P369
+
+ sntp/sntp.1sntpmdoc@1.192 +3 -3
+ NTP_4_2_7P369
+
+ sntp/sntp.html@1.372 +2 -2
+ NTP_4_2_7P369
+
+ sntp/sntp.man.in@1.192 +3 -3
+ NTP_4_2_7P369
+
+ sntp/sntp.mdoc.in@1.192 +3 -3
+ NTP_4_2_7P369
+
+ util/invoke-ntp-keygen.texi@1.361 +2 -2
+ NTP_4_2_7P369
+
+ util/ntp-keygen-opts.c@1.375 +7 -7
+ NTP_4_2_7P369
+
+ util/ntp-keygen-opts.h@1.375 +3 -3
+ NTP_4_2_7P369
+
+ util/ntp-keygen.1ntp-keygenman@1.189 +3 -3
+ NTP_4_2_7P369
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.189 +3 -3
+ NTP_4_2_7P369
+
+ util/ntp-keygen.html@1.38 +2 -2
+ NTP_4_2_7P369
+
+ util/ntp-keygen.man.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ util/ntp-keygen.mdoc.in@1.189 +3 -3
+ NTP_4_2_7P369
+
+ChangeSet@1.2946.1.3, 2013-07-04 23:01:44-04:00, stenn@deacon.udel.edu
+ [Bug 2415] RES_LIMITED flags check should use &, not &&
+
+ ChangeLog@1.1296.1.3 +1 -0
+ [Bug 2415] RES_LIMITED flags check should use &, not &&
+
+ ntpd/ntp_restrict.c@1.35 +1 -1
+ [Bug 2415] RES_LIMITED flags check should use &, not &&
+
+ChangeSet@1.2946.1.2, 2013-07-04 21:45:09-04:00, stenn@deacon.udel.edu
+ Have NTP_LIBNTP check for time.h and clock_getres()
+
+ ChangeLog@1.1296.1.2 +1 -0
+ Have NTP_LIBNTP check for time.h and clock_getres()
+
+ sntp/m4/ntp_libntp.m4@1.18 +2 -2
+ Have NTP_LIBNTP check for time.h and clock_getres()
+
+ChangeSet@1.2939.1.1, 2013-07-04 20:43:53-04:00, stenn@psp-deb1.ntp.org
+ Fix ntpsweep to use sntp instead of ntpdate, from Oliver Kindernay
+
+ ChangeLog@1.1289.1.1 +1 -0
+ Fix ntpsweep to use sntp instead of ntpdate, from Oliver Kindernay
+
+ scripts/ntpsweep.in@1.4 +13 -13
+ Fix ntpsweep to use sntp instead of ntpdate, from Oliver Kindernay
+
+ChangeSet@1.2947, 2013-06-28 13:18:15-04:00, karlsson@psp-deb1.ntp.org
+ [Bug 2413] make check fails to run tests with automake >= 1.13
+
+ BitKeeper/deleted/31/test-driver~38cbd0dac650aed0@1.5 +0 -0
+ Delete: sntp/tests/test-driver
+
+ ChangeLog@1.1297 +1 -0
+ [Bug 2413] make check fails to run tests with automake >= 1.13
+
+ sntp/tests/Makefile.am@1.28 +2 -7
+ [Bug 2413] make check fails to run tests with automake >= 1.13
+
+ sntp/tests/tests-runner@1.1 +13 -0
+ BitKeeper file /home/karlsson/2413/ntp-dev-2413/sntp/tests/tests-runner
+
+ sntp/tests/tests-runner@1.0 +0 -0
+
+ChangeSet@1.2946, 2013-05-01 11:35:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P368
+ TAG: NTP_4_2_7P368
+
+ ChangeLog@1.1296 +1 -0
+ NTP_4_2_7P368
+
+ ntpd/invoke-ntp.conf.texi@1.43 +1 -1
+ NTP_4_2_7P368
+
+ ntpd/invoke-ntp.keys.texi@1.43 +1 -1
+ NTP_4_2_7P368
+
+ ntpd/invoke-ntpd.texi@1.359 +2 -2
+ NTP_4_2_7P368
+
+ ntpd/ntp.conf.5man@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.conf.5mdoc@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.conf.html@1.41 +1 -1
+ NTP_4_2_7P368
+
+ ntpd/ntp.conf.man.in@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.conf.mdoc.in@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.keys.5man@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.keys.5mdoc@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.keys.html@1.42 +1 -1
+ NTP_4_2_7P368
+
+ ntpd/ntp.keys.man.in@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntp.keys.mdoc.in@1.77 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntpd-opts.c@1.377 +7 -7
+ NTP_4_2_7P368
+
+ ntpd/ntpd-opts.h@1.377 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntpd.1ntpdman@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntpd.1ntpdmdoc@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntpd.html@1.36 +2 -2
+ NTP_4_2_7P368
+
+ ntpd/ntpd.man.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpd/ntpd.mdoc.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpdc/invoke-ntpdc.texi@1.356 +2 -2
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc-opts.c@1.371 +7 -7
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc-opts.h@1.371 +3 -3
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc.1ntpdcman@1.187 +2 -2
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.187 +2 -2
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc.html@1.200 +2 -2
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc.man.in@1.187 +2 -2
+ NTP_4_2_7P368
+
+ ntpdc/ntpdc.mdoc.in@1.187 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/invoke-ntpq.texi@1.360 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/ntpq-opts.c@1.374 +7 -7
+ NTP_4_2_7P368
+
+ ntpq/ntpq-opts.h@1.374 +3 -3
+ NTP_4_2_7P368
+
+ ntpq/ntpq.1ntpqman@1.188 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/ntpq.1ntpqmdoc@1.188 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/ntpq.html@1.33 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/ntpq.man.in@1.188 +2 -2
+ NTP_4_2_7P368
+
+ ntpq/ntpq.mdoc.in@1.188 +2 -2
+ NTP_4_2_7P368
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.359 +2 -2
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.374 +7 -7
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.374 +3 -3
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd.html@1.31 +1 -1
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd.man.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ packageinfo.sh@1.371 +1 -1
+ NTP_4_2_7P368
+
+ scripts/invoke-ntp-wait.texi@1.176 +1 -1
+ NTP_4_2_7P368
+
+ scripts/ntp-wait.1ntp-waitman@1.187 +3 -3
+ NTP_4_2_7P368
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.187 +3 -3
+ NTP_4_2_7P368
+
+ scripts/ntp-wait.html@1.192 +1 -1
+ NTP_4_2_7P368
+
+ scripts/ntp-wait.man.in@1.187 +3 -3
+ NTP_4_2_7P368
+
+ scripts/ntp-wait.mdoc.in@1.187 +3 -3
+ NTP_4_2_7P368
+
+ sntp/invoke-sntp.texi@1.356 +2 -2
+ NTP_4_2_7P368
+
+ sntp/sntp-opts.c@1.371 +7 -7
+ NTP_4_2_7P368
+
+ sntp/sntp-opts.h@1.371 +3 -3
+ NTP_4_2_7P368
+
+ sntp/sntp.1sntpman@1.191 +3 -3
+ NTP_4_2_7P368
+
+ sntp/sntp.1sntpmdoc@1.191 +3 -3
+ NTP_4_2_7P368
+
+ sntp/sntp.html@1.371 +2 -2
+ NTP_4_2_7P368
+
+ sntp/sntp.man.in@1.191 +3 -3
+ NTP_4_2_7P368
+
+ sntp/sntp.mdoc.in@1.191 +3 -3
+ NTP_4_2_7P368
+
+ util/invoke-ntp-keygen.texi@1.360 +2 -2
+ NTP_4_2_7P368
+
+ util/ntp-keygen-opts.c@1.374 +7 -7
+ NTP_4_2_7P368
+
+ util/ntp-keygen-opts.h@1.374 +3 -3
+ NTP_4_2_7P368
+
+ util/ntp-keygen.1ntp-keygenman@1.188 +3 -3
+ NTP_4_2_7P368
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.188 +3 -3
+ NTP_4_2_7P368
+
+ util/ntp-keygen.html@1.37 +2 -2
+ NTP_4_2_7P368
+
+ util/ntp-keygen.man.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ util/ntp-keygen.mdoc.in@1.188 +3 -3
+ NTP_4_2_7P368
+
+ChangeSet@1.2945, 2013-04-30 22:36:28-04:00, stenn@pogo.udel.edu
+ [Bug 2145] ntpq dumps core when displaying sys_var_list and more
+
+ ChangeLog@1.1295 +1 -0
+ [Bug 2145] ntpq dumps core when displaying sys_var_list and more
+
+ ntpd/ntp_control.c@1.184 +43 -18
+ [Bug 2145] ntpq dumps core when displaying sys_var_list and more
+
+ChangeSet@1.2944, 2013-04-25 11:43:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P367
+ TAG: NTP_4_2_7P367
+
+ ChangeLog@1.1294 +1 -0
+ NTP_4_2_7P367
+
+ ntpd/invoke-ntp.conf.texi@1.42 +1 -1
+ NTP_4_2_7P367
+
+ ntpd/invoke-ntp.keys.texi@1.42 +1 -1
+ NTP_4_2_7P367
+
+ ntpd/invoke-ntpd.texi@1.358 +2 -2
+ NTP_4_2_7P367
+
+ ntpd/ntp.conf.5man@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.conf.5mdoc@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.conf.html@1.40 +1 -1
+ NTP_4_2_7P367
+
+ ntpd/ntp.conf.man.in@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.conf.mdoc.in@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.keys.5man@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.keys.5mdoc@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.keys.html@1.41 +1 -1
+ NTP_4_2_7P367
+
+ ntpd/ntp.keys.man.in@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntp.keys.mdoc.in@1.76 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntpd-opts.c@1.376 +7 -7
+ NTP_4_2_7P367
+
+ ntpd/ntpd-opts.h@1.376 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntpd.1ntpdman@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntpd.1ntpdmdoc@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntpd.html@1.35 +2 -2
+ NTP_4_2_7P367
+
+ ntpd/ntpd.man.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpd/ntpd.mdoc.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpdc/invoke-ntpdc.texi@1.355 +2 -2
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc-opts.c@1.370 +7 -7
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc-opts.h@1.370 +3 -3
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc.1ntpdcman@1.186 +2 -2
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.186 +2 -2
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc.html@1.199 +2 -2
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc.man.in@1.186 +2 -2
+ NTP_4_2_7P367
+
+ ntpdc/ntpdc.mdoc.in@1.186 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/invoke-ntpq.texi@1.359 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/ntpq-opts.c@1.373 +7 -7
+ NTP_4_2_7P367
+
+ ntpq/ntpq-opts.h@1.373 +3 -3
+ NTP_4_2_7P367
+
+ ntpq/ntpq.1ntpqman@1.187 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/ntpq.1ntpqmdoc@1.187 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/ntpq.html@1.32 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/ntpq.man.in@1.187 +2 -2
+ NTP_4_2_7P367
+
+ ntpq/ntpq.mdoc.in@1.187 +2 -2
+ NTP_4_2_7P367
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.358 +2 -2
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.373 +7 -7
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.373 +3 -3
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd.html@1.30 +1 -1
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd.man.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ packageinfo.sh@1.370 +1 -1
+ NTP_4_2_7P367
+
+ scripts/invoke-ntp-wait.texi@1.175 +1 -1
+ NTP_4_2_7P367
+
+ scripts/ntp-wait.1ntp-waitman@1.186 +3 -3
+ NTP_4_2_7P367
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.186 +3 -3
+ NTP_4_2_7P367
+
+ scripts/ntp-wait.html@1.191 +1 -1
+ NTP_4_2_7P367
+
+ scripts/ntp-wait.man.in@1.186 +3 -3
+ NTP_4_2_7P367
+
+ scripts/ntp-wait.mdoc.in@1.186 +3 -3
+ NTP_4_2_7P367
+
+ sntp/invoke-sntp.texi@1.355 +2 -2
+ NTP_4_2_7P367
+
+ sntp/sntp-opts.c@1.370 +7 -7
+ NTP_4_2_7P367
+
+ sntp/sntp-opts.h@1.370 +3 -3
+ NTP_4_2_7P367
+
+ sntp/sntp.1sntpman@1.190 +3 -3
+ NTP_4_2_7P367
+
+ sntp/sntp.1sntpmdoc@1.190 +3 -3
+ NTP_4_2_7P367
+
+ sntp/sntp.html@1.370 +2 -2
+ NTP_4_2_7P367
+
+ sntp/sntp.man.in@1.190 +3 -3
+ NTP_4_2_7P367
+
+ sntp/sntp.mdoc.in@1.190 +3 -3
+ NTP_4_2_7P367
+
+ util/invoke-ntp-keygen.texi@1.359 +2 -2
+ NTP_4_2_7P367
+
+ util/ntp-keygen-opts.c@1.373 +7 -7
+ NTP_4_2_7P367
+
+ util/ntp-keygen-opts.h@1.373 +3 -3
+ NTP_4_2_7P367
+
+ util/ntp-keygen.1ntp-keygenman@1.187 +3 -3
+ NTP_4_2_7P367
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.187 +3 -3
+ NTP_4_2_7P367
+
+ util/ntp-keygen.html@1.36 +2 -2
+ NTP_4_2_7P367
+
+ util/ntp-keygen.man.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ util/ntp-keygen.mdoc.in@1.187 +3 -3
+ NTP_4_2_7P367
+
+ChangeSet@1.2943, 2013-04-24 19:13:53-04:00, stenn@deacon.udel.edu
+ [Bug 2382] Implement LOGTOD using ldexp() instead of shifting
+
+ ChangeLog@1.1293 +1 -0
+ [Bug 2382] Implement LOGTOD using ldexp() instead of shifting
+
+ include/ntp.h@1.207 +2 -3
+ [Bug 2382] Implement LOGTOD using ldexp() instead of shifting
+
+ChangeSet@1.2942, 2013-04-17 12:50:12-04:00, utterback@pogo.udel.edu
+ ChangeLog, ifiter_ioctl.c:
+ [Bug 1485] Sometimes ntpd crashes
+
+ ChangeLog@1.1292 +1 -0
+ [Bug 1485] Sometimes ntpd crashes
+
+ lib/isc/unix/ifiter_ioctl.c@1.32 +26 -11
+ [Bug 1485] Sometimes ntpd crashes
+
+ChangeSet@1.2941, 2013-04-17 11:36:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P366
+ TAG: NTP_4_2_7P366
+
+ ChangeLog@1.1291 +1 -0
+ NTP_4_2_7P366
+
+ ntpd/invoke-ntp.conf.texi@1.41 +1 -1
+ NTP_4_2_7P366
+
+ ntpd/invoke-ntp.keys.texi@1.41 +1 -1
+ NTP_4_2_7P366
+
+ ntpd/invoke-ntpd.texi@1.357 +2 -2
+ NTP_4_2_7P366
+
+ ntpd/ntp.conf.5man@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.conf.5mdoc@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.conf.html@1.39 +1 -1
+ NTP_4_2_7P366
+
+ ntpd/ntp.conf.man.in@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.conf.mdoc.in@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.keys.5man@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.keys.5mdoc@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.keys.html@1.40 +1 -1
+ NTP_4_2_7P366
+
+ ntpd/ntp.keys.man.in@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntp.keys.mdoc.in@1.75 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntpd-opts.c@1.375 +7 -7
+ NTP_4_2_7P366
+
+ ntpd/ntpd-opts.h@1.375 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntpd.1ntpdman@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntpd.1ntpdmdoc@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntpd.html@1.34 +2 -2
+ NTP_4_2_7P366
+
+ ntpd/ntpd.man.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpd/ntpd.mdoc.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpdc/invoke-ntpdc.texi@1.354 +2 -2
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc-opts.c@1.369 +7 -7
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc-opts.h@1.369 +3 -3
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc.1ntpdcman@1.185 +2 -2
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.185 +2 -2
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc.html@1.198 +2 -2
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc.man.in@1.185 +2 -2
+ NTP_4_2_7P366
+
+ ntpdc/ntpdc.mdoc.in@1.185 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/invoke-ntpq.texi@1.358 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/ntpq-opts.c@1.372 +7 -7
+ NTP_4_2_7P366
+
+ ntpq/ntpq-opts.h@1.372 +3 -3
+ NTP_4_2_7P366
+
+ ntpq/ntpq.1ntpqman@1.186 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/ntpq.1ntpqmdoc@1.186 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/ntpq.html@1.31 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/ntpq.man.in@1.186 +2 -2
+ NTP_4_2_7P366
+
+ ntpq/ntpq.mdoc.in@1.186 +2 -2
+ NTP_4_2_7P366
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.357 +2 -2
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.372 +7 -7
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.372 +3 -3
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd.html@1.29 +1 -1
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd.man.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ packageinfo.sh@1.369 +1 -1
+ NTP_4_2_7P366
+
+ scripts/invoke-ntp-wait.texi@1.174 +1 -1
+ NTP_4_2_7P366
+
+ scripts/ntp-wait.1ntp-waitman@1.185 +3 -3
+ NTP_4_2_7P366
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.185 +3 -3
+ NTP_4_2_7P366
+
+ scripts/ntp-wait.html@1.190 +1 -1
+ NTP_4_2_7P366
+
+ scripts/ntp-wait.man.in@1.185 +3 -3
+ NTP_4_2_7P366
+
+ scripts/ntp-wait.mdoc.in@1.185 +3 -3
+ NTP_4_2_7P366
+
+ sntp/invoke-sntp.texi@1.354 +2 -2
+ NTP_4_2_7P366
+
+ sntp/sntp-opts.c@1.369 +7 -7
+ NTP_4_2_7P366
+
+ sntp/sntp-opts.h@1.369 +3 -3
+ NTP_4_2_7P366
+
+ sntp/sntp.1sntpman@1.189 +3 -3
+ NTP_4_2_7P366
+
+ sntp/sntp.1sntpmdoc@1.189 +3 -3
+ NTP_4_2_7P366
+
+ sntp/sntp.html@1.369 +2 -2
+ NTP_4_2_7P366
+
+ sntp/sntp.man.in@1.189 +3 -3
+ NTP_4_2_7P366
+
+ sntp/sntp.mdoc.in@1.189 +3 -3
+ NTP_4_2_7P366
+
+ util/invoke-ntp-keygen.texi@1.358 +2 -2
+ NTP_4_2_7P366
+
+ util/ntp-keygen-opts.c@1.372 +7 -7
+ NTP_4_2_7P366
+
+ util/ntp-keygen-opts.h@1.372 +3 -3
+ NTP_4_2_7P366
+
+ util/ntp-keygen.1ntp-keygenman@1.186 +3 -3
+ NTP_4_2_7P366
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.186 +3 -3
+ NTP_4_2_7P366
+
+ util/ntp-keygen.html@1.35 +2 -2
+ NTP_4_2_7P366
+
+ util/ntp-keygen.man.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ util/ntp-keygen.mdoc.in@1.186 +3 -3
+ NTP_4_2_7P366
+
+ChangeSet@1.2940, 2013-04-16 19:58:03-04:00, stenn@deacon.udel.edu
+ [Bug 1866] Disable some debugging output in refclock_oncore
+
+ ChangeLog@1.1290 +1 -0
+ [Bug 1866] Disable some debugging output in refclock_oncore
+
+ ntpd/refclock_oncore.c@1.95 +7 -0
+ [Bug 1866] Disable some debugging output in refclock_oncore
+
+ChangeSet@1.2939, 2013-04-16 09:55:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P365
+ TAG: NTP_4_2_7P365
+
+ ChangeLog@1.1289 +1 -0
+ NTP_4_2_7P365
+
+ ntpd/invoke-ntp.conf.texi@1.40 +1 -1
+ NTP_4_2_7P365
+
+ ntpd/invoke-ntp.keys.texi@1.40 +1 -1
+ NTP_4_2_7P365
+
+ ntpd/invoke-ntpd.texi@1.356 +2 -2
+ NTP_4_2_7P365
+
+ ntpd/ntp.conf.5man@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.conf.5mdoc@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.conf.html@1.38 +1 -1
+ NTP_4_2_7P365
+
+ ntpd/ntp.conf.man.in@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.conf.mdoc.in@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.keys.5man@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.keys.5mdoc@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.keys.html@1.39 +1 -1
+ NTP_4_2_7P365
+
+ ntpd/ntp.keys.man.in@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntp.keys.mdoc.in@1.74 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntpd-opts.c@1.374 +7 -7
+ NTP_4_2_7P365
+
+ ntpd/ntpd-opts.h@1.374 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntpd.1ntpdman@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntpd.1ntpdmdoc@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntpd.html@1.33 +2 -2
+ NTP_4_2_7P365
+
+ ntpd/ntpd.man.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpd/ntpd.mdoc.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpdc/invoke-ntpdc.texi@1.353 +2 -2
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc-opts.c@1.368 +7 -7
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc-opts.h@1.368 +3 -3
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc.1ntpdcman@1.184 +2 -2
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.184 +2 -2
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc.html@1.197 +2 -2
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc.man.in@1.184 +2 -2
+ NTP_4_2_7P365
+
+ ntpdc/ntpdc.mdoc.in@1.184 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/invoke-ntpq.texi@1.357 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/ntpq-opts.c@1.371 +7 -7
+ NTP_4_2_7P365
+
+ ntpq/ntpq-opts.h@1.371 +3 -3
+ NTP_4_2_7P365
+
+ ntpq/ntpq.1ntpqman@1.185 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/ntpq.1ntpqmdoc@1.185 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/ntpq.html@1.30 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/ntpq.man.in@1.185 +2 -2
+ NTP_4_2_7P365
+
+ ntpq/ntpq.mdoc.in@1.185 +2 -2
+ NTP_4_2_7P365
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.356 +2 -2
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.371 +7 -7
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.371 +3 -3
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd.html@1.28 +1 -1
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd.man.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ packageinfo.sh@1.368 +1 -1
+ NTP_4_2_7P365
+
+ scripts/invoke-ntp-wait.texi@1.173 +1 -1
+ NTP_4_2_7P365
+
+ scripts/ntp-wait.1ntp-waitman@1.184 +3 -3
+ NTP_4_2_7P365
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.184 +3 -3
+ NTP_4_2_7P365
+
+ scripts/ntp-wait.html@1.189 +1 -1
+ NTP_4_2_7P365
+
+ scripts/ntp-wait.man.in@1.184 +3 -3
+ NTP_4_2_7P365
+
+ scripts/ntp-wait.mdoc.in@1.184 +3 -3
+ NTP_4_2_7P365
+
+ sntp/invoke-sntp.texi@1.353 +2 -2
+ NTP_4_2_7P365
+
+ sntp/sntp-opts.c@1.368 +7 -7
+ NTP_4_2_7P365
+
+ sntp/sntp-opts.h@1.368 +3 -3
+ NTP_4_2_7P365
+
+ sntp/sntp.1sntpman@1.188 +3 -3
+ NTP_4_2_7P365
+
+ sntp/sntp.1sntpmdoc@1.188 +3 -3
+ NTP_4_2_7P365
+
+ sntp/sntp.html@1.368 +2 -2
+ NTP_4_2_7P365
+
+ sntp/sntp.man.in@1.188 +3 -3
+ NTP_4_2_7P365
+
+ sntp/sntp.mdoc.in@1.188 +3 -3
+ NTP_4_2_7P365
+
+ util/invoke-ntp-keygen.texi@1.357 +2 -2
+ NTP_4_2_7P365
+
+ util/ntp-keygen-opts.c@1.371 +7 -7
+ NTP_4_2_7P365
+
+ util/ntp-keygen-opts.h@1.371 +3 -3
+ NTP_4_2_7P365
+
+ util/ntp-keygen.1ntp-keygenman@1.185 +3 -3
+ NTP_4_2_7P365
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.185 +3 -3
+ NTP_4_2_7P365
+
+ util/ntp-keygen.html@1.34 +2 -2
+ NTP_4_2_7P365
+
+ util/ntp-keygen.man.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ util/ntp-keygen.mdoc.in@1.185 +3 -3
+ NTP_4_2_7P365
+
+ChangeSet@1.2936.1.1, 2013-04-16 09:32:43+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2149] Log an error message if /proc/net/if_inet6 cannot be opened
+
+ ChangeLog@1.1288 +1 -0
+ [Bug 2149] Log an error message if /proc/net/if_inet6 cannot be opened
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.10 +8 -2
+ [Bug 2149] Log an error message if /proc/net/if_inet6 cannot be opened
+
+ChangeSet@1.2937, 2013-04-16 05:22:18-04:00, stenn@deacon.udel.edu
+ Clean up autogen-version check
+
+ sntp/include/autogen-version.def@1.17 +1 -1
+ Clean up autogen-version check
+
+ChangeSet@1.2936, 2013-03-26 11:35:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P364
+ TAG: NTP_4_2_7P364
+
+ ChangeLog@1.1287 +1 -0
+ NTP_4_2_7P364
+
+ ntpd/invoke-ntp.conf.texi@1.39 +1 -1
+ NTP_4_2_7P364
+
+ ntpd/invoke-ntp.keys.texi@1.39 +1 -1
+ NTP_4_2_7P364
+
+ ntpd/invoke-ntpd.texi@1.355 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntp.conf.5man@1.73 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntp.conf.5mdoc@1.73 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntp.conf.html@1.37 +1 -1
+ NTP_4_2_7P364
+
+ ntpd/ntp.conf.man.in@1.73 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntp.conf.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntp.keys.5man@1.73 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntp.keys.5mdoc@1.73 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntp.keys.html@1.38 +1 -1
+ NTP_4_2_7P364
+
+ ntpd/ntp.keys.man.in@1.73 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntp.keys.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntpd-opts.c@1.373 +7 -7
+ NTP_4_2_7P364
+
+ ntpd/ntpd-opts.h@1.373 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntpd.1ntpdman@1.184 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntpd.1ntpdmdoc@1.184 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntpd.html@1.32 +2 -2
+ NTP_4_2_7P364
+
+ ntpd/ntpd.man.in@1.184 +3 -3
+ NTP_4_2_7P364
+
+ ntpd/ntpd.mdoc.in@1.184 +2 -2
+ NTP_4_2_7P364
+
+ ntpdc/invoke-ntpdc.texi@1.352 +2 -2
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc-opts.c@1.367 +7 -7
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc-opts.h@1.367 +3 -3
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc.1ntpdcman@1.183 +2 -2
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.183 +1 -1
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc.html@1.196 +2 -2
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc.man.in@1.183 +2 -2
+ NTP_4_2_7P364
+
+ ntpdc/ntpdc.mdoc.in@1.183 +1 -1
+ NTP_4_2_7P364
+
+ ntpq/invoke-ntpq.texi@1.356 +2 -2
+ NTP_4_2_7P364
+
+ ntpq/ntpq-opts.c@1.370 +7 -7
+ NTP_4_2_7P364
+
+ ntpq/ntpq-opts.h@1.370 +3 -3
+ NTP_4_2_7P364
+
+ ntpq/ntpq.1ntpqman@1.184 +2 -2
+ NTP_4_2_7P364
+
+ ntpq/ntpq.1ntpqmdoc@1.184 +1 -1
+ NTP_4_2_7P364
+
+ ntpq/ntpq.html@1.29 +2 -2
+ NTP_4_2_7P364
+
+ ntpq/ntpq.man.in@1.184 +2 -2
+ NTP_4_2_7P364
+
+ ntpq/ntpq.mdoc.in@1.184 +1 -1
+ NTP_4_2_7P364
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.355 +2 -2
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.370 +7 -7
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.370 +3 -3
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.184 +3 -3
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.184 +2 -2
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd.html@1.27 +1 -1
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd.man.in@1.184 +3 -3
+ NTP_4_2_7P364
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.184 +2 -2
+ NTP_4_2_7P364
+
+ packageinfo.sh@1.367 +1 -1
+ NTP_4_2_7P364
+
+ scripts/invoke-ntp-wait.texi@1.172 +1 -1
+ NTP_4_2_7P364
+
+ scripts/ntp-wait.1ntp-waitman@1.183 +3 -3
+ NTP_4_2_7P364
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.183 +2 -2
+ NTP_4_2_7P364
+
+ scripts/ntp-wait.html@1.188 +1 -1
+ NTP_4_2_7P364
+
+ scripts/ntp-wait.man.in@1.183 +3 -3
+ NTP_4_2_7P364
+
+ scripts/ntp-wait.mdoc.in@1.183 +2 -2
+ NTP_4_2_7P364
+
+ sntp/invoke-sntp.texi@1.352 +2 -2
+ NTP_4_2_7P364
+
+ sntp/sntp-opts.c@1.367 +7 -7
+ NTP_4_2_7P364
+
+ sntp/sntp-opts.h@1.367 +3 -3
+ NTP_4_2_7P364
+
+ sntp/sntp.1sntpman@1.187 +3 -3
+ NTP_4_2_7P364
+
+ sntp/sntp.1sntpmdoc@1.187 +2 -2
+ NTP_4_2_7P364
+
+ sntp/sntp.html@1.367 +2 -2
+ NTP_4_2_7P364
+
+ sntp/sntp.man.in@1.187 +3 -3
+ NTP_4_2_7P364
+
+ sntp/sntp.mdoc.in@1.187 +2 -2
+ NTP_4_2_7P364
+
+ util/invoke-ntp-keygen.texi@1.356 +2 -2
+ NTP_4_2_7P364
+
+ util/ntp-keygen-opts.c@1.370 +7 -7
+ NTP_4_2_7P364
+
+ util/ntp-keygen-opts.h@1.370 +3 -3
+ NTP_4_2_7P364
+
+ util/ntp-keygen.1ntp-keygenman@1.184 +3 -3
+ NTP_4_2_7P364
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.184 +2 -2
+ NTP_4_2_7P364
+
+ util/ntp-keygen.html@1.33 +2 -2
+ NTP_4_2_7P364
+
+ util/ntp-keygen.man.in@1.184 +3 -3
+ NTP_4_2_7P364
+
+ util/ntp-keygen.mdoc.in@1.184 +2 -2
+ NTP_4_2_7P364
+
+ChangeSet@1.2935, 2013-03-26 06:25:16-04:00, stenn@deacon.udel.edu
+ sntp/include/autogen-version.def
+
+ ChangeLog@1.1286 +1 -0
+ sntp/include/autogen-version.def
+
+ sntp/include/autogen-version.def@1.16 +2 -1
+ sntp/include/autogen-version.def
+
+ChangeSet@1.2934, 2013-03-26 09:16:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P363
+ TAG: NTP_4_2_7P363
+
+ ChangeLog@1.1285 +1 -0
+ NTP_4_2_7P363
+
+ ntpd/invoke-ntp.conf.texi@1.38 +1 -1
+ NTP_4_2_7P363
+
+ ntpd/invoke-ntp.keys.texi@1.38 +1 -1
+ NTP_4_2_7P363
+
+ ntpd/invoke-ntpd.texi@1.354 +2 -2
+ NTP_4_2_7P363
+
+ ntpd/ntp.conf.5man@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.conf.5mdoc@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.conf.html@1.36 +1 -1
+ NTP_4_2_7P363
+
+ ntpd/ntp.conf.man.in@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.conf.mdoc.in@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.keys.5man@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.keys.5mdoc@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.keys.html@1.37 +1 -1
+ NTP_4_2_7P363
+
+ ntpd/ntp.keys.man.in@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntp.keys.mdoc.in@1.72 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntpd-opts.c@1.372 +7 -7
+ NTP_4_2_7P363
+
+ ntpd/ntpd-opts.h@1.372 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntpd.1ntpdman@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntpd.1ntpdmdoc@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntpd.html@1.31 +2 -2
+ NTP_4_2_7P363
+
+ ntpd/ntpd.man.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpd/ntpd.mdoc.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpdc/invoke-ntpdc.texi@1.351 +2 -2
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc-opts.c@1.366 +7 -7
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc-opts.h@1.366 +3 -3
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc.1ntpdcman@1.182 +2 -2
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.182 +2 -2
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc.html@1.195 +2 -2
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc.man.in@1.182 +2 -2
+ NTP_4_2_7P363
+
+ ntpdc/ntpdc.mdoc.in@1.182 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/invoke-ntpq.texi@1.355 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/ntpq-opts.c@1.369 +7 -7
+ NTP_4_2_7P363
+
+ ntpq/ntpq-opts.h@1.369 +3 -3
+ NTP_4_2_7P363
+
+ ntpq/ntpq.1ntpqman@1.183 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/ntpq.1ntpqmdoc@1.183 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/ntpq.html@1.28 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/ntpq.man.in@1.183 +2 -2
+ NTP_4_2_7P363
+
+ ntpq/ntpq.mdoc.in@1.183 +2 -2
+ NTP_4_2_7P363
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.354 +2 -2
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.369 +7 -7
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.369 +3 -3
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd.html@1.26 +1 -1
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd.man.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ packageinfo.sh@1.366 +1 -1
+ NTP_4_2_7P363
+
+ scripts/invoke-ntp-wait.texi@1.171 +1 -1
+ NTP_4_2_7P363
+
+ scripts/ntp-wait.1ntp-waitman@1.182 +3 -3
+ NTP_4_2_7P363
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.182 +3 -3
+ NTP_4_2_7P363
+
+ scripts/ntp-wait.html@1.187 +1 -1
+ NTP_4_2_7P363
+
+ scripts/ntp-wait.man.in@1.182 +3 -3
+ NTP_4_2_7P363
+
+ scripts/ntp-wait.mdoc.in@1.182 +3 -3
+ NTP_4_2_7P363
+
+ sntp/invoke-sntp.texi@1.351 +2 -2
+ NTP_4_2_7P363
+
+ sntp/sntp-opts.c@1.366 +7 -7
+ NTP_4_2_7P363
+
+ sntp/sntp-opts.h@1.366 +3 -3
+ NTP_4_2_7P363
+
+ sntp/sntp.1sntpman@1.186 +3 -3
+ NTP_4_2_7P363
+
+ sntp/sntp.1sntpmdoc@1.186 +3 -3
+ NTP_4_2_7P363
+
+ sntp/sntp.html@1.366 +2 -2
+ NTP_4_2_7P363
+
+ sntp/sntp.man.in@1.186 +3 -3
+ NTP_4_2_7P363
+
+ sntp/sntp.mdoc.in@1.186 +3 -3
+ NTP_4_2_7P363
+
+ util/invoke-ntp-keygen.texi@1.355 +2 -2
+ NTP_4_2_7P363
+
+ util/ntp-keygen-opts.c@1.369 +7 -7
+ NTP_4_2_7P363
+
+ util/ntp-keygen-opts.h@1.369 +3 -3
+ NTP_4_2_7P363
+
+ util/ntp-keygen.1ntp-keygenman@1.183 +3 -3
+ NTP_4_2_7P363
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.183 +3 -3
+ NTP_4_2_7P363
+
+ util/ntp-keygen.html@1.32 +2 -2
+ NTP_4_2_7P363
+
+ util/ntp-keygen.man.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ util/ntp-keygen.mdoc.in@1.183 +3 -3
+ NTP_4_2_7P363
+
+ChangeSet@1.2933, 2013-03-26 04:56:04-04:00, stenn@deacon.udel.edu
+ Upgrade to libopts from 5.17.3pre10
+
+ ChangeLog@1.1284 +2 -0
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/Makefile.am@1.20 +4 -4
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/ag-char-map.h@1.23 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/ao-strs.c@1.9 +2 -2
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/ao-strs.h@1.8 +2 -2
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/autoopts/options.h@1.22 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/autoopts/usage-txt.h@1.22 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/genshell.c@1.23 +116 -114
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/genshell.h@1.23 +13 -12
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/m4/libopts.m4@1.26 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/option-value-type.c@1.10 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/option-value-type.h@1.24 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/option-xat-attribute.c@1.10 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/option-xat-attribute.h@1.24 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/proto.h@1.23 +1 -1
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/streqvcmp.c@1.13 +16 -2
+ Upgrade to libopts from 5.17.3pre10
+
+ sntp/libopts/usage.c@1.16 +3 -3
+ Upgrade to libopts from 5.17.3pre10
+
+ChangeSet@1.2932, 2013-03-19 11:40:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P362
+ TAG: NTP_4_2_7P362
+
+ ChangeLog@1.1283 +1 -0
+ NTP_4_2_7P362
+
+ ntpd/invoke-ntp.conf.texi@1.37 +1 -1
+ NTP_4_2_7P362
+
+ ntpd/invoke-ntp.keys.texi@1.37 +1 -1
+ NTP_4_2_7P362
+
+ ntpd/invoke-ntpd.texi@1.353 +2 -2
+ NTP_4_2_7P362
+
+ ntpd/ntp.conf.5man@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.conf.5mdoc@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.conf.html@1.35 +1 -1
+ NTP_4_2_7P362
+
+ ntpd/ntp.conf.man.in@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.conf.mdoc.in@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.keys.5man@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.keys.5mdoc@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.keys.html@1.36 +1 -1
+ NTP_4_2_7P362
+
+ ntpd/ntp.keys.man.in@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntp.keys.mdoc.in@1.71 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntpd-opts.c@1.371 +7 -7
+ NTP_4_2_7P362
+
+ ntpd/ntpd-opts.h@1.371 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntpd.1ntpdman@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntpd.1ntpdmdoc@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntpd.html@1.30 +2 -2
+ NTP_4_2_7P362
+
+ ntpd/ntpd.man.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpd/ntpd.mdoc.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpdc/invoke-ntpdc.texi@1.350 +2 -2
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc-opts.c@1.365 +7 -7
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc-opts.h@1.365 +3 -3
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc.1ntpdcman@1.181 +2 -2
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.181 +2 -2
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc.html@1.194 +2 -2
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc.man.in@1.181 +2 -2
+ NTP_4_2_7P362
+
+ ntpdc/ntpdc.mdoc.in@1.181 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/invoke-ntpq.texi@1.354 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/ntpq-opts.c@1.368 +7 -7
+ NTP_4_2_7P362
+
+ ntpq/ntpq-opts.h@1.368 +3 -3
+ NTP_4_2_7P362
+
+ ntpq/ntpq.1ntpqman@1.182 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/ntpq.1ntpqmdoc@1.182 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/ntpq.html@1.27 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/ntpq.man.in@1.182 +2 -2
+ NTP_4_2_7P362
+
+ ntpq/ntpq.mdoc.in@1.182 +2 -2
+ NTP_4_2_7P362
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.353 +2 -2
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.368 +7 -7
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.368 +3 -3
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd.html@1.25 +1 -1
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd.man.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ packageinfo.sh@1.365 +1 -1
+ NTP_4_2_7P362
+
+ scripts/invoke-ntp-wait.texi@1.170 +1 -1
+ NTP_4_2_7P362
+
+ scripts/ntp-wait.1ntp-waitman@1.181 +3 -3
+ NTP_4_2_7P362
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.181 +3 -3
+ NTP_4_2_7P362
+
+ scripts/ntp-wait.html@1.186 +1 -1
+ NTP_4_2_7P362
+
+ scripts/ntp-wait.man.in@1.181 +3 -3
+ NTP_4_2_7P362
+
+ scripts/ntp-wait.mdoc.in@1.181 +3 -3
+ NTP_4_2_7P362
+
+ sntp/invoke-sntp.texi@1.350 +2 -2
+ NTP_4_2_7P362
+
+ sntp/sntp-opts.c@1.365 +7 -7
+ NTP_4_2_7P362
+
+ sntp/sntp-opts.h@1.365 +3 -3
+ NTP_4_2_7P362
+
+ sntp/sntp.1sntpman@1.185 +3 -3
+ NTP_4_2_7P362
+
+ sntp/sntp.1sntpmdoc@1.185 +3 -3
+ NTP_4_2_7P362
+
+ sntp/sntp.html@1.365 +2 -2
+ NTP_4_2_7P362
+
+ sntp/sntp.man.in@1.185 +3 -3
+ NTP_4_2_7P362
+
+ sntp/sntp.mdoc.in@1.185 +3 -3
+ NTP_4_2_7P362
+
+ util/invoke-ntp-keygen.texi@1.354 +2 -2
+ NTP_4_2_7P362
+
+ util/ntp-keygen-opts.c@1.368 +7 -7
+ NTP_4_2_7P362
+
+ util/ntp-keygen-opts.h@1.368 +3 -3
+ NTP_4_2_7P362
+
+ util/ntp-keygen.1ntp-keygenman@1.182 +3 -3
+ NTP_4_2_7P362
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.182 +3 -3
+ NTP_4_2_7P362
+
+ util/ntp-keygen.html@1.31 +2 -2
+ NTP_4_2_7P362
+
+ util/ntp-keygen.man.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ util/ntp-keygen.mdoc.in@1.182 +3 -3
+ NTP_4_2_7P362
+
+ChangeSet@1.2931, 2013-03-19 06:26:04-04:00, stenn@deacon.udel.edu
+ [Bug 2364] "sed -i" is not portable
+
+ ChangeLog@1.1282 +1 -0
+ [Bug 2364] "sed -i" is not portable
+
+ configure.ac@1.558 +1 -1
+ [Bug 2364] "sed -i" is not portable
+
+ChangeSet@1.2930, 2013-03-17 05:08:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P361
+ TAG: NTP_4_2_7P361
+
+ ChangeLog@1.1281 +1 -0
+ NTP_4_2_7P361
+
+ ntpd/invoke-ntp.conf.texi@1.36 +1 -1
+ NTP_4_2_7P361
+
+ ntpd/invoke-ntp.keys.texi@1.36 +1 -1
+ NTP_4_2_7P361
+
+ ntpd/invoke-ntpd.texi@1.352 +2 -2
+ NTP_4_2_7P361
+
+ ntpd/ntp.conf.5man@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.conf.5mdoc@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.conf.html@1.34 +1 -1
+ NTP_4_2_7P361
+
+ ntpd/ntp.conf.man.in@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.conf.mdoc.in@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.keys.5man@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.keys.5mdoc@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.keys.html@1.35 +1 -1
+ NTP_4_2_7P361
+
+ ntpd/ntp.keys.man.in@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntp.keys.mdoc.in@1.70 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntpd-opts.c@1.370 +10 -11
+ NTP_4_2_7P361
+
+ ntpd/ntpd-opts.h@1.370 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntpd.1ntpdman@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntpd.1ntpdmdoc@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntpd.html@1.29 +2 -2
+ NTP_4_2_7P361
+
+ ntpd/ntpd.man.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpd/ntpd.mdoc.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpdc/invoke-ntpdc.texi@1.349 +2 -2
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc-opts.c@1.364 +10 -11
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc-opts.h@1.364 +3 -3
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc.1ntpdcman@1.180 +2 -2
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.180 +2 -2
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc.html@1.193 +2 -2
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc.man.in@1.180 +2 -2
+ NTP_4_2_7P361
+
+ ntpdc/ntpdc.mdoc.in@1.180 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/invoke-ntpq.texi@1.353 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/ntpq-opts.c@1.367 +10 -11
+ NTP_4_2_7P361
+
+ ntpq/ntpq-opts.h@1.367 +3 -3
+ NTP_4_2_7P361
+
+ ntpq/ntpq.1ntpqman@1.181 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/ntpq.1ntpqmdoc@1.181 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/ntpq.html@1.26 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/ntpq.man.in@1.181 +2 -2
+ NTP_4_2_7P361
+
+ ntpq/ntpq.mdoc.in@1.181 +2 -2
+ NTP_4_2_7P361
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.352 +2 -2
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.367 +10 -11
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.367 +3 -3
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd.html@1.24 +1 -1
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd.man.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ packageinfo.sh@1.364 +1 -1
+ NTP_4_2_7P361
+
+ scripts/invoke-ntp-wait.texi@1.169 +1 -1
+ NTP_4_2_7P361
+
+ scripts/ntp-wait.1ntp-waitman@1.180 +3 -3
+ NTP_4_2_7P361
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.180 +3 -3
+ NTP_4_2_7P361
+
+ scripts/ntp-wait.html@1.185 +1 -1
+ NTP_4_2_7P361
+
+ scripts/ntp-wait.man.in@1.180 +3 -3
+ NTP_4_2_7P361
+
+ scripts/ntp-wait.mdoc.in@1.180 +3 -3
+ NTP_4_2_7P361
+
+ sntp/invoke-sntp.texi@1.349 +2 -2
+ NTP_4_2_7P361
+
+ sntp/sntp-opts.c@1.364 +10 -11
+ NTP_4_2_7P361
+
+ sntp/sntp-opts.h@1.364 +3 -3
+ NTP_4_2_7P361
+
+ sntp/sntp.1sntpman@1.184 +3 -3
+ NTP_4_2_7P361
+
+ sntp/sntp.1sntpmdoc@1.184 +3 -3
+ NTP_4_2_7P361
+
+ sntp/sntp.html@1.364 +2 -2
+ NTP_4_2_7P361
+
+ sntp/sntp.man.in@1.184 +3 -3
+ NTP_4_2_7P361
+
+ sntp/sntp.mdoc.in@1.184 +3 -3
+ NTP_4_2_7P361
+
+ util/invoke-ntp-keygen.texi@1.353 +2 -2
+ NTP_4_2_7P361
+
+ util/ntp-keygen-opts.c@1.367 +10 -11
+ NTP_4_2_7P361
+
+ util/ntp-keygen-opts.h@1.367 +3 -3
+ NTP_4_2_7P361
+
+ util/ntp-keygen.1ntp-keygenman@1.181 +3 -3
+ NTP_4_2_7P361
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.181 +3 -3
+ NTP_4_2_7P361
+
+ util/ntp-keygen.html@1.30 +2 -2
+ NTP_4_2_7P361
+
+ util/ntp-keygen.man.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ util/ntp-keygen.mdoc.in@1.181 +3 -3
+ NTP_4_2_7P361
+
+ChangeSet@1.2929, 2013-03-17 00:09:12+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2365] "make check" fails in libevent
+
+ ChangeLog@1.1280 +1 -0
+ [Bug 2365] "make check" fails in libevent
+
+ sntp/libevent/test/include.am@1.2 +1 -1
+ [Bug 2365] "make check" fails in libevent
+
+ChangeSet@1.2928, 2013-03-16 23:12:44+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl
+
+ ChangeLog@1.1279 +1 -0
+ [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl
+
+ configure.ac@1.557 +1 -0
+ [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl
+
+ sntp/configure.ac@1.73 +1 -0
+ [Bug 2357] sntp/libopts/usage.c sometimes needs -lintl
+
+ChangeSet@1.2927, 2013-03-15 07:13:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P360
+ TAG: NTP_4_2_7P360
+
+ ChangeLog@1.1278 +1 -0
+ NTP_4_2_7P360
+
+ ntpd/invoke-ntp.conf.texi@1.35 +1 -1
+ NTP_4_2_7P360
+
+ ntpd/invoke-ntp.keys.texi@1.35 +1 -1
+ NTP_4_2_7P360
+
+ ntpd/invoke-ntpd.texi@1.351 +2 -2
+ NTP_4_2_7P360
+
+ ntpd/ntp.conf.5man@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.conf.5mdoc@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.conf.html@1.33 +1 -1
+ NTP_4_2_7P360
+
+ ntpd/ntp.conf.man.in@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.conf.mdoc.in@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.keys.5man@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.keys.5mdoc@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.keys.html@1.34 +1 -1
+ NTP_4_2_7P360
+
+ ntpd/ntp.keys.man.in@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntp.keys.mdoc.in@1.69 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd-opts.c@1.369 +7 -7
+ NTP_4_2_7P360
+
+ ntpd/ntpd-opts.h@1.369 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd.1ntpdman@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd.1ntpdmdoc@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd.html@1.28 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd.man.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpd/ntpd.mdoc.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpdc/invoke-ntpdc.texi@1.348 +2 -2
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc-opts.c@1.363 +7 -7
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc-opts.h@1.363 +3 -3
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc.1ntpdcman@1.179 +2 -2
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.179 +2 -2
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc.html@1.192 +2 -2
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc.man.in@1.179 +2 -2
+ NTP_4_2_7P360
+
+ ntpdc/ntpdc.mdoc.in@1.179 +2 -2
+ NTP_4_2_7P360
+
+ ntpq/invoke-ntpq.texi@1.352 +2 -2
+ NTP_4_2_7P360
+
+ ntpq/ntpq-opts.c@1.366 +7 -7
+ NTP_4_2_7P360
+
+ ntpq/ntpq-opts.h@1.366 +3 -3
+ NTP_4_2_7P360
+
+ ntpq/ntpq.1ntpqman@1.180 +2 -2
+ NTP_4_2_7P360
+
+ ntpq/ntpq.1ntpqmdoc@1.180 +2 -2
+ NTP_4_2_7P360
+
+ ntpq/ntpq.html@1.25 +3 -3
+ NTP_4_2_7P360
+
+ ntpq/ntpq.man.in@1.180 +2 -2
+ NTP_4_2_7P360
+
+ ntpq/ntpq.mdoc.in@1.180 +2 -2
+ NTP_4_2_7P360
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.351 +2 -2
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.366 +7 -7
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.366 +3 -3
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd.html@1.23 +1 -1
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd.man.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ packageinfo.sh@1.363 +1 -1
+ NTP_4_2_7P360
+
+ scripts/invoke-ntp-wait.texi@1.168 +1 -1
+ NTP_4_2_7P360
+
+ scripts/ntp-wait.1ntp-waitman@1.179 +3 -3
+ NTP_4_2_7P360
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.179 +3 -3
+ NTP_4_2_7P360
+
+ scripts/ntp-wait.html@1.184 +1 -1
+ NTP_4_2_7P360
+
+ scripts/ntp-wait.man.in@1.179 +3 -3
+ NTP_4_2_7P360
+
+ scripts/ntp-wait.mdoc.in@1.179 +3 -3
+ NTP_4_2_7P360
+
+ sntp/invoke-sntp.texi@1.348 +2 -2
+ NTP_4_2_7P360
+
+ sntp/sntp-opts.c@1.363 +7 -7
+ NTP_4_2_7P360
+
+ sntp/sntp-opts.h@1.363 +3 -3
+ NTP_4_2_7P360
+
+ sntp/sntp.1sntpman@1.183 +3 -3
+ NTP_4_2_7P360
+
+ sntp/sntp.1sntpmdoc@1.183 +3 -3
+ NTP_4_2_7P360
+
+ sntp/sntp.html@1.363 +2 -2
+ NTP_4_2_7P360
+
+ sntp/sntp.man.in@1.183 +3 -3
+ NTP_4_2_7P360
+
+ sntp/sntp.mdoc.in@1.183 +3 -3
+ NTP_4_2_7P360
+
+ util/invoke-ntp-keygen.texi@1.352 +2 -2
+ NTP_4_2_7P360
+
+ util/ntp-keygen-opts.c@1.366 +7 -7
+ NTP_4_2_7P360
+
+ util/ntp-keygen-opts.h@1.366 +3 -3
+ NTP_4_2_7P360
+
+ util/ntp-keygen.1ntp-keygenman@1.180 +3 -3
+ NTP_4_2_7P360
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.180 +3 -3
+ NTP_4_2_7P360
+
+ util/ntp-keygen.html@1.29 +3 -3
+ NTP_4_2_7P360
+
+ util/ntp-keygen.man.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ util/ntp-keygen.mdoc.in@1.180 +3 -3
+ NTP_4_2_7P360
+
+ChangeSet@1.2926, 2013-03-15 02:31:25-04:00, stenn@psp-deb1.ntp.org
+ UPgrade libevent (Coverity fixes, etc.).
+ ChangeLog, kod_management.c:
+ EEXIST is OK for mkdir() in sntp/kod_management.c
+
+ BitKeeper/deleted/00/Makefile.am~474636ab6fc9e8d9@1.5 +0 -0
+ Delete: sntp/libevent/include/Makefile.am
+
+ BitKeeper/deleted/51/Makefile.am~1dee536054aa1db2@1.11 +0 -0
+ Delete: sntp/libevent/test/Makefile.am
+
+ BitKeeper/deleted/97/Makefile.am~e1e2decef1947524@1.8 +0 -0
+ Delete: sntp/libevent/sample/Makefile.am
+
+ ChangeLog@1.1277 +1 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ ChangeLog@1.1276 +1 -0
+ EEXIST is OK for mkdir() in sntp/kod_management.c
+
+ sntp/kod_management.c@1.31 +2 -1
+ EEXIST is OK for mkdir() in sntp/kod_management.c
+
+ sntp/libevent/ChangeLog@1.7 +192 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/ChangeLog-2.0@1.2 +56 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/Makefile.am@1.11 +27 -14
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/Makefile.nmake@1.4 +37 -4
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/README@1.6 +18 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.6 +2 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/buffer.c@1.8 +39 -13
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/bufferevent-internal.h@1.6 +2 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/bufferevent.c@1.6 +25 -14
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/bufferevent_openssl.c@1.7 +68 -38
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/bufferevent_pair.c@1.6 +2 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/bufferevent_sock.c@1.6 +26 -6
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/configure.ac@1.13 +42 -30
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/configure.ac@1.12 +0 -0
+ Rename: sntp/libevent/configure.in -> sntp/libevent/configure.ac
+
+ sntp/libevent/defer-internal.h@1.5 +16 -52
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/epoll.c@1.5 +6 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evbuffer-internal.h@1.6 +8 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evdns.c@1.8 +29 -5
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/event-internal.h@1.8 +59 -16
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/event.c@1.9 +580 -273
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/event_rpcgen.py@1.3 +17 -6
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evmap.c@1.6 +2 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evthread-internal.h@1.6 +1 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evthread.c@1.7 +7 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evthread_pthread.c@1.6 +1 -13
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evthread_win32.c@1.6 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evutil.c@1.8 +201 -78
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evutil_rand.c@1.6 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/evutil_time.c@1.2 +2 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/http-internal.h@1.4 +4 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/http.c@1.8 +99 -56
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/buffer.h@1.5 +22 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/bufferevent.h@1.4 +6 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/event.h@1.8 +81 -29
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/event_struct.h@1.4 +38 -22
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/http.h@1.5 +3 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/thread.h@1.5 +4 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/event2/util.h@1.5 +5 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/include/include.am@1.1 +45 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/include.am
+
+ sntp/libevent/include/include.am@1.0 +0 -0
+
+ sntp/libevent/libevent_openssl.pc.in@1.3 +2 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/listener.c@1.6 +27 -18
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/log.c@1.5 +8 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/make_epoll_table.py@1.2 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/sample/event-read-fifo.c@1.5 +3 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/sample/http-server.c@1.8 +11 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/sample/include.am@1.1 +40 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/include.am
+
+ sntp/libevent/sample/include.am@1.0 +0 -0
+
+ sntp/libevent/sample/signal-test.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/sample/time-test.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/signal.c@1.7 +3 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/Makefile.nmake@1.4 +22 -6
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/bench.c@1.4 +8 -8
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/bench_cascade.c@1.4 +16 -11
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/bench_httpclient.c@1.6 +12 -4
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/check-dumpevents.py@1.3 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/include.am@1.1 +144 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/include.am
+
+ sntp/libevent/test/include.am@1.0 +0 -0
+
+ sntp/libevent/test/print-winsock-errors.c@1.1 +84 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/print-winsock-errors.c
+
+ sntp/libevent/test/print-winsock-errors.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.c@1.4 +175 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_buffer.c@1.6 +81 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_bufferevent.c@1.4 +13 -5
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_dns.c@1.6 +19 -17
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_et.c@1.4 +3 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_http.c@1.6 +126 -51
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_listener.c@1.6 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_main.c@1.5 +31 -4
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_rpc.c@1.5 +5 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_ssl.c@1.5 +30 -7
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_testutils.c@1.6 +8 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_thread.c@1.4 +24 -13
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_util.c@1.5 +93 -16
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/regress_zlib.c@1.4 +2 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.3 +13 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-changelist.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-dumpevents.c@1.2 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-eof.c@1.6 +3 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-init.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-ratelim.c@1.7 +10 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-time.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test-weof.c@1.4 +1 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/test.sh@1.7 +11 -4
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/tinytest.c@1.5 +83 -22
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/tinytest.h@1.3 +14 -3
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/test/tinytest_demo.c@1.3 +42 -0
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/util-internal.h@1.8 +27 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/whatsnew-2.0.txt@1.4 +1 -1
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/whatsnew-2.1.txt@1.2 +135 -4
+ Upgrade libevent (coverity fixes, etc.)
+
+ sntp/libevent/win32select.c@1.4 +3 -2
+ Upgrade libevent (coverity fixes, etc.)
+
+ChangeSet@1.2925, 2013-03-03 11:39:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P359
+ TAG: NTP_4_2_7P359
+
+ ChangeLog@1.1275 +1 -0
+ NTP_4_2_7P359
+
+ ntpd/invoke-ntp.conf.texi@1.34 +1 -1
+ NTP_4_2_7P359
+
+ ntpd/invoke-ntp.keys.texi@1.34 +1 -1
+ NTP_4_2_7P359
+
+ ntpd/invoke-ntpd.texi@1.350 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.conf.5man@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.conf.5mdoc@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.conf.html@1.32 +1 -1
+ NTP_4_2_7P359
+
+ ntpd/ntp.conf.man.in@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.conf.mdoc.in@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.keys.5man@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.keys.5mdoc@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.keys.html@1.33 +1 -1
+ NTP_4_2_7P359
+
+ ntpd/ntp.keys.man.in@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntp.keys.mdoc.in@1.68 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntpd-opts.c@1.368 +7 -7
+ NTP_4_2_7P359
+
+ ntpd/ntpd-opts.h@1.368 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntpd.1ntpdman@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntpd.1ntpdmdoc@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntpd.html@1.27 +2 -2
+ NTP_4_2_7P359
+
+ ntpd/ntpd.man.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpd/ntpd.mdoc.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpdc/invoke-ntpdc.texi@1.347 +3 -3
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc-opts.c@1.362 +7 -7
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc-opts.h@1.362 +3 -3
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc.1ntpdcman@1.178 +2 -2
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.178 +2 -2
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc.html@1.191 +3 -3
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc.man.in@1.178 +2 -2
+ NTP_4_2_7P359
+
+ ntpdc/ntpdc.mdoc.in@1.178 +2 -2
+ NTP_4_2_7P359
+
+ ntpq/invoke-ntpq.texi@1.351 +3 -3
+ NTP_4_2_7P359
+
+ ntpq/ntpq-opts.c@1.365 +7 -7
+ NTP_4_2_7P359
+
+ ntpq/ntpq-opts.h@1.365 +3 -3
+ NTP_4_2_7P359
+
+ ntpq/ntpq.1ntpqman@1.179 +2 -2
+ NTP_4_2_7P359
+
+ ntpq/ntpq.1ntpqmdoc@1.179 +2 -2
+ NTP_4_2_7P359
+
+ ntpq/ntpq.html@1.24 +2 -2
+ NTP_4_2_7P359
+
+ ntpq/ntpq.man.in@1.179 +2 -2
+ NTP_4_2_7P359
+
+ ntpq/ntpq.mdoc.in@1.179 +2 -2
+ NTP_4_2_7P359
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.350 +3 -3
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.365 +7 -7
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.365 +3 -3
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd.html@1.22 +1 -1
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd.man.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ packageinfo.sh@1.362 +1 -1
+ NTP_4_2_7P359
+
+ scripts/invoke-ntp-wait.texi@1.167 +1 -1
+ NTP_4_2_7P359
+
+ scripts/ntp-wait.1ntp-waitman@1.178 +3 -3
+ NTP_4_2_7P359
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.178 +3 -3
+ NTP_4_2_7P359
+
+ scripts/ntp-wait.html@1.183 +1 -1
+ NTP_4_2_7P359
+
+ scripts/ntp-wait.man.in@1.178 +3 -3
+ NTP_4_2_7P359
+
+ scripts/ntp-wait.mdoc.in@1.178 +3 -3
+ NTP_4_2_7P359
+
+ sntp/invoke-sntp.texi@1.347 +2 -2
+ NTP_4_2_7P359
+
+ sntp/sntp-opts.c@1.362 +7 -7
+ NTP_4_2_7P359
+
+ sntp/sntp-opts.h@1.362 +3 -3
+ NTP_4_2_7P359
+
+ sntp/sntp.1sntpman@1.182 +3 -3
+ NTP_4_2_7P359
+
+ sntp/sntp.1sntpmdoc@1.182 +3 -3
+ NTP_4_2_7P359
+
+ sntp/sntp.html@1.362 +2 -2
+ NTP_4_2_7P359
+
+ sntp/sntp.man.in@1.182 +3 -3
+ NTP_4_2_7P359
+
+ sntp/sntp.mdoc.in@1.182 +3 -3
+ NTP_4_2_7P359
+
+ util/invoke-ntp-keygen.texi@1.351 +3 -3
+ NTP_4_2_7P359
+
+ util/ntp-keygen-opts.c@1.365 +7 -7
+ NTP_4_2_7P359
+
+ util/ntp-keygen-opts.h@1.365 +3 -3
+ NTP_4_2_7P359
+
+ util/ntp-keygen.1ntp-keygenman@1.179 +3 -3
+ NTP_4_2_7P359
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.179 +3 -3
+ NTP_4_2_7P359
+
+ util/ntp-keygen.html@1.28 +2 -2
+ NTP_4_2_7P359
+
+ util/ntp-keygen.man.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ util/ntp-keygen.mdoc.in@1.179 +3 -3
+ NTP_4_2_7P359
+
+ChangeSet@1.2924, 2013-03-02 22:41:29-05:00, stenn@deacon.udel.edu
+ [Bug 2359] Fix send_via_ntp_signd() prototype
+
+ ChangeLog@1.1274 +1 -0
+ [Bug 2359] Fix send_via_ntp_signd() prototype
+
+ include/ntpd.h@1.174 +1 -1
+ [Bug 2359] Fix send_via_ntp_signd() prototype
+
+ChangeSet@1.2923, 2013-02-27 11:39:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P358
+ TAG: NTP_4_2_7P358
+
+ ChangeLog@1.1273 +1 -0
+ NTP_4_2_7P358
+
+ ntpd/invoke-ntp.conf.texi@1.33 +1 -1
+ NTP_4_2_7P358
+
+ ntpd/invoke-ntp.keys.texi@1.33 +1 -1
+ NTP_4_2_7P358
+
+ ntpd/invoke-ntpd.texi@1.349 +2 -2
+ NTP_4_2_7P358
+
+ ntpd/ntp.conf.5man@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.conf.5mdoc@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.conf.html@1.31 +1 -1
+ NTP_4_2_7P358
+
+ ntpd/ntp.conf.man.in@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.conf.mdoc.in@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.keys.5man@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.keys.5mdoc@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.keys.html@1.32 +1 -1
+ NTP_4_2_7P358
+
+ ntpd/ntp.keys.man.in@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntp.keys.mdoc.in@1.67 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntpd-opts.c@1.367 +248 -95
+ NTP_4_2_7P358
+
+ ntpd/ntpd-opts.h@1.367 +37 -15
+ NTP_4_2_7P358
+
+ ntpd/ntpd.1ntpdman@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntpd.1ntpdmdoc@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntpd.html@1.26 +2 -2
+ NTP_4_2_7P358
+
+ ntpd/ntpd.man.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpd/ntpd.mdoc.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpdc/invoke-ntpdc.texi@1.346 +2 -2
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc-opts.c@1.361 +124 -71
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc-opts.h@1.361 +39 -15
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc.1ntpdcman@1.177 +2 -2
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.177 +2 -2
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc.html@1.190 +2 -2
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc.man.in@1.177 +2 -2
+ NTP_4_2_7P358
+
+ ntpdc/ntpdc.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/invoke-ntpq.texi@1.350 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/ntpq-opts.c@1.364 +117 -70
+ NTP_4_2_7P358
+
+ ntpq/ntpq-opts.h@1.364 +39 -15
+ NTP_4_2_7P358
+
+ ntpq/ntpq.1ntpqman@1.178 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/ntpq.1ntpqmdoc@1.178 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/ntpq.html@1.23 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/ntpq.man.in@1.178 +2 -2
+ NTP_4_2_7P358
+
+ ntpq/ntpq.mdoc.in@1.178 +2 -2
+ NTP_4_2_7P358
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.349 +2 -2
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.364 +81 -61
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.364 +39 -15
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd.html@1.21 +1 -1
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd.man.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ packageinfo.sh@1.361 +1 -1
+ NTP_4_2_7P358
+
+ scripts/invoke-ntp-wait.texi@1.166 +1 -1
+ NTP_4_2_7P358
+
+ scripts/ntp-wait.1ntp-waitman@1.177 +3 -3
+ NTP_4_2_7P358
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.177 +3 -3
+ NTP_4_2_7P358
+
+ scripts/ntp-wait.html@1.182 +1 -1
+ NTP_4_2_7P358
+
+ scripts/ntp-wait.man.in@1.177 +3 -3
+ NTP_4_2_7P358
+
+ scripts/ntp-wait.mdoc.in@1.177 +3 -3
+ NTP_4_2_7P358
+
+ sntp/invoke-sntp.texi@1.346 +3 -3
+ NTP_4_2_7P358
+
+ sntp/sntp-opts.c@1.361 +189 -94
+ NTP_4_2_7P358
+
+ sntp/sntp-opts.h@1.361 +39 -15
+ NTP_4_2_7P358
+
+ sntp/sntp.1sntpman@1.181 +3 -3
+ NTP_4_2_7P358
+
+ sntp/sntp.1sntpmdoc@1.181 +3 -3
+ NTP_4_2_7P358
+
+ sntp/sntp.html@1.361 +3 -3
+ NTP_4_2_7P358
+
+ sntp/sntp.man.in@1.181 +3 -3
+ NTP_4_2_7P358
+
+ sntp/sntp.mdoc.in@1.181 +3 -3
+ NTP_4_2_7P358
+
+ util/invoke-ntp-keygen.texi@1.350 +2 -2
+ NTP_4_2_7P358
+
+ util/ntp-keygen-opts.c@1.364 +179 -88
+ NTP_4_2_7P358
+
+ util/ntp-keygen-opts.h@1.364 +39 -15
+ NTP_4_2_7P358
+
+ util/ntp-keygen.1ntp-keygenman@1.178 +3 -3
+ NTP_4_2_7P358
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.178 +3 -3
+ NTP_4_2_7P358
+
+ util/ntp-keygen.html@1.27 +2 -2
+ NTP_4_2_7P358
+
+ util/ntp-keygen.man.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ util/ntp-keygen.mdoc.in@1.178 +3 -3
+ NTP_4_2_7P358
+
+ChangeSet@1.2919.1.1, 2013-02-27 10:18:58+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ ChangeLog@1.1270.1.1 +1 -0
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/Makefile.am@1.19 +3 -3
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/ag-char-map.h@1.22 +1 -1
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/ao-strs.c@1.8 +1 -1
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/ao-strs.h@1.7 +1 -1
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/autoopts/options.h@1.21 +2 -1
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/autoopts/usage-txt.h@1.21 +141 -141
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/configfile.c@1.19 +31 -18
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/genshell.c@1.22 +31 -14
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/genshell.h@1.22 +33 -12
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/m4/libopts.m4@1.25 +40 -21
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/nested.c@1.13 +2 -10
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/option-value-type.c@1.9 +3 -3
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/option-value-type.h@1.23 +3 -3
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/option-xat-attribute.c@1.9 +3 -3
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/option-xat-attribute.h@1.23 +1 -1
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/proto.h@1.22 +3 -3
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ sntp/libopts/usage.c@1.15 +18 -5
+ Upgrade to autogen-5.17.3pre4 and libopts-38.0.13
+
+ChangeSet@1.2921, 2013-02-22 03:49:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P357
+ TAG: NTP_4_2_7P357
+
+ ChangeLog@1.1271 +1 -0
+ NTP_4_2_7P357
+
+ ntpd/invoke-ntp.conf.texi@1.32 +1 -1
+ NTP_4_2_7P357
+
+ ntpd/invoke-ntp.keys.texi@1.32 +1 -1
+ NTP_4_2_7P357
+
+ ntpd/invoke-ntpd.texi@1.348 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntp.conf.5man@1.66 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntp.conf.5mdoc@1.66 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntp.conf.html@1.30 +1 -1
+ NTP_4_2_7P357
+
+ ntpd/ntp.conf.man.in@1.66 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntp.conf.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntp.keys.5man@1.66 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntp.keys.5mdoc@1.66 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntp.keys.html@1.31 +1 -1
+ NTP_4_2_7P357
+
+ ntpd/ntp.keys.man.in@1.66 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntp.keys.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntpd-opts.c@1.366 +7 -7
+ NTP_4_2_7P357
+
+ ntpd/ntpd-opts.h@1.366 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntpd.1ntpdman@1.177 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntpd.1ntpdmdoc@1.177 +2 -2
+ NTP_4_2_7P357
+
+ ntpd/ntpd.html@1.25 +12 -18
+ NTP_4_2_7P357
+
+ ntpd/ntpd.man.in@1.177 +3 -3
+ NTP_4_2_7P357
+
+ ntpd/ntpd.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P357
+
+ ntpdc/invoke-ntpdc.texi@1.345 +2 -2
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc-opts.c@1.360 +7 -7
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc-opts.h@1.360 +3 -3
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc.1ntpdcman@1.176 +2 -2
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.176 +1 -1
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc.html@1.189 +2 -2
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc.man.in@1.176 +2 -2
+ NTP_4_2_7P357
+
+ ntpdc/ntpdc.mdoc.in@1.176 +1 -1
+ NTP_4_2_7P357
+
+ ntpq/invoke-ntpq.texi@1.349 +2 -2
+ NTP_4_2_7P357
+
+ ntpq/ntpq-opts.c@1.363 +7 -7
+ NTP_4_2_7P357
+
+ ntpq/ntpq-opts.h@1.363 +3 -3
+ NTP_4_2_7P357
+
+ ntpq/ntpq.1ntpqman@1.177 +2 -2
+ NTP_4_2_7P357
+
+ ntpq/ntpq.1ntpqmdoc@1.177 +1 -1
+ NTP_4_2_7P357
+
+ ntpq/ntpq.html@1.22 +13 -16
+ NTP_4_2_7P357
+
+ ntpq/ntpq.man.in@1.177 +2 -2
+ NTP_4_2_7P357
+
+ ntpq/ntpq.mdoc.in@1.177 +1 -1
+ NTP_4_2_7P357
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.348 +2 -2
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.363 +7 -7
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.363 +3 -3
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.177 +3 -3
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.177 +2 -2
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd.html@1.20 +1 -1
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd.man.in@1.177 +3 -3
+ NTP_4_2_7P357
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P357
+
+ packageinfo.sh@1.360 +1 -1
+ NTP_4_2_7P357
+
+ scripts/invoke-ntp-wait.texi@1.165 +2 -2
+ NTP_4_2_7P357
+
+ scripts/ntp-wait.1ntp-waitman@1.176 +3 -3
+ NTP_4_2_7P357
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.176 +3 -3
+ NTP_4_2_7P357
+
+ scripts/ntp-wait.html@1.181 +2 -2
+ NTP_4_2_7P357
+
+ scripts/ntp-wait.man.in@1.176 +3 -3
+ NTP_4_2_7P357
+
+ scripts/ntp-wait.mdoc.in@1.176 +3 -3
+ NTP_4_2_7P357
+
+ sntp/invoke-sntp.texi@1.345 +2 -2
+ NTP_4_2_7P357
+
+ sntp/sntp-opts.c@1.360 +7 -7
+ NTP_4_2_7P357
+
+ sntp/sntp-opts.h@1.360 +3 -3
+ NTP_4_2_7P357
+
+ sntp/sntp.1sntpman@1.180 +3 -3
+ NTP_4_2_7P357
+
+ sntp/sntp.1sntpmdoc@1.180 +2 -2
+ NTP_4_2_7P357
+
+ sntp/sntp.html@1.360 +2 -2
+ NTP_4_2_7P357
+
+ sntp/sntp.man.in@1.180 +3 -3
+ NTP_4_2_7P357
+
+ sntp/sntp.mdoc.in@1.180 +2 -2
+ NTP_4_2_7P357
+
+ util/invoke-ntp-keygen.texi@1.349 +2 -2
+ NTP_4_2_7P357
+
+ util/ntp-keygen-opts.c@1.363 +7 -7
+ NTP_4_2_7P357
+
+ util/ntp-keygen-opts.h@1.363 +3 -3
+ NTP_4_2_7P357
+
+ util/ntp-keygen.1ntp-keygenman@1.177 +3 -3
+ NTP_4_2_7P357
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.177 +2 -2
+ NTP_4_2_7P357
+
+ util/ntp-keygen.html@1.26 +12 -13
+ NTP_4_2_7P357
+
+ util/ntp-keygen.man.in@1.177 +3 -3
+ NTP_4_2_7P357
+
+ util/ntp-keygen.mdoc.in@1.177 +2 -2
+ NTP_4_2_7P357
+
+ChangeSet@1.2920, 2013-02-21 21:29:59-05:00, stenn@deacon.udel.edu
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/invoke-ntp.conf.texi@1.31 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/invoke-ntp.keys.texi@1.31 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/invoke-ntpd.texi@1.347 +13 -19
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.conf.5man@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.conf.5mdoc@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.conf.man.in@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.conf.mdoc.in@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.keys.5man@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.keys.5mdoc@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.keys.man.in@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntp.keys.mdoc.in@1.65 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd-opts.c@1.365 +493 -41
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd-opts.h@1.365 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd.1ntpdman@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd.1ntpdmdoc@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd.man.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpd.mdoc.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpdsim-opts.c@1.21 +780 -312
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpd/ntpdsim-opts.h@1.21 +17 -14
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/invoke-ntpdc.texi@1.344 +16 -22
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc-opts.c@1.359 +424 -45
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc-opts.h@1.359 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc.1ntpdcman@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc.html@1.188 +13 -19
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc.man.in@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpdc/ntpdc.mdoc.in@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/invoke-ntpq.texi@1.348 +14 -17
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq-opts.c@1.362 +414 -41
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq-opts.h@1.362 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq.1ntpqman@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq.1ntpqmdoc@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq.man.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpq/ntpq.mdoc.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.347 +11 -12
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.362 +403 -45
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.362 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd.man.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/invoke-ntp-wait.texi@1.164 +4 -4
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/ntp-wait.1ntp-waitman@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/ntp-wait.html@1.180 +1 -1
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/ntp-wait.man.in@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ scripts/ntp-wait.mdoc.in@1.175 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/include/autogen-version.def@1.15 +1 -1
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/invoke-sntp.texi@1.344 +16 -19
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp-opts.c@1.359 +449 -45
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp-opts.h@1.359 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp.1sntpman@1.179 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp.1sntpmdoc@1.179 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp.html@1.359 +13 -16
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp.man.in@1.179 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/sntp.mdoc.in@1.179 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/invoke-ntp-keygen.texi@1.348 +13 -14
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen-opts.c@1.362 +457 -45
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen-opts.h@1.362 +6 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen.1ntp-keygenman@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen.man.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ util/ntp-keygen.mdoc.in@1.176 +3 -3
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ChangeSet@1.2919, 2013-02-22 01:52:51+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ ChangeLog@1.1270 +1 -0
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/Makefile.am@1.18 +4 -4
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/ag-char-map.h@1.21 +5 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/alias.c@1.5 +49 -39
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/ao-strs.c@1.7 +146 -107
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/ao-strs.h@1.6 +188 -114
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/autoopts.c@1.16 +51 -56
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/autoopts.h@1.14 +69 -32
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/autoopts/options.h@1.20 +507 -335
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/autoopts/project.h@1.5 +4 -4
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/autoopts/usage-txt.h@1.20 +541 -580
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/boolean.c@1.13 +11 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/check.c@1.6 +37 -24
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/compat/compat.h@1.13 +22 -40
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/compat/windows-config.h@1.12 +40 -50
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/configfile.c@1.18 +13 -11
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/cook.c@1.13 +11 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/enum.c@1.8 +26 -35
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/env.c@1.7 +10 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/file.c@1.13 +27 -32
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/find.c@1.7 +27 -38
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/genshell.c@1.21 +450 -99
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/genshell.h@1.21 +15 -16
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/init.c@1.3 +19 -14
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/load.c@1.16 +11 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/m4/libopts.m4@1.24 +9 -19
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/makeshell.c@1.15 +131 -104
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/nested.c@1.12 +13 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/numeric.c@1.12 +34 -25
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/option-value-type.c@1.8 +5 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/option-value-type.h@1.22 +8 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/option-xat-attribute.c@1.8 +5 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/option-xat-attribute.h@1.22 +8 -6
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/pgusage.c@1.13 +10 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/proto.h@1.21 +20 -2
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/putshell.c@1.12 +212 -55
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/reset.c@1.14 +16 -11
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/restore.c@1.11 +12 -16
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/save.c@1.14 +133 -88
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/sort.c@1.12 +10 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/stack.c@1.13 +12 -7
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/streqvcmp.c@1.12 +21 -16
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/text_mmap.c@1.13 +11 -7
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/time.c@1.13 +10 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/tokenize.c@1.10 +13 -5
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/usage.c@1.14 +496 -204
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ sntp/libopts/version.c@1.14 +78 -69
+ Upgrade to autogen-5.17.2pre and libopts-38.0.13
+
+ChangeSet@1.2918, 2013-02-19 11:40:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P356
+ TAG: NTP_4_2_7P356
+
+ ChangeLog@1.1269 +1 -0
+ NTP_4_2_7P356
+
+ ntpd/invoke-ntp.conf.texi@1.30 +1 -1
+ NTP_4_2_7P356
+
+ ntpd/invoke-ntp.keys.texi@1.30 +1 -1
+ NTP_4_2_7P356
+
+ ntpd/invoke-ntpd.texi@1.346 +2 -2
+ NTP_4_2_7P356
+
+ ntpd/ntp.conf.5man@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.conf.5mdoc@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.conf.html@1.29 +1 -1
+ NTP_4_2_7P356
+
+ ntpd/ntp.conf.man.in@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.conf.mdoc.in@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.keys.5man@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.keys.5mdoc@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.keys.html@1.30 +1 -1
+ NTP_4_2_7P356
+
+ ntpd/ntp.keys.man.in@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntp.keys.mdoc.in@1.64 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntpd-opts.c@1.364 +4 -4
+ NTP_4_2_7P356
+
+ ntpd/ntpd-opts.h@1.364 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntpd.1ntpdman@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntpd.1ntpdmdoc@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntpd.html@1.24 +2 -2
+ NTP_4_2_7P356
+
+ ntpd/ntpd.man.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpd/ntpd.mdoc.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpdc/invoke-ntpdc.texi@1.343 +2 -2
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc-opts.c@1.358 +4 -4
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc-opts.h@1.358 +3 -3
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc.1ntpdcman@1.174 +2 -2
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.174 +2 -2
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc.html@1.187 +2 -2
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc.man.in@1.174 +2 -2
+ NTP_4_2_7P356
+
+ ntpdc/ntpdc.mdoc.in@1.174 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/invoke-ntpq.texi@1.347 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/ntpq-opts.c@1.361 +4 -4
+ NTP_4_2_7P356
+
+ ntpq/ntpq-opts.h@1.361 +3 -3
+ NTP_4_2_7P356
+
+ ntpq/ntpq.1ntpqman@1.175 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/ntpq.1ntpqmdoc@1.175 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/ntpq.html@1.21 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/ntpq.man.in@1.175 +2 -2
+ NTP_4_2_7P356
+
+ ntpq/ntpq.mdoc.in@1.175 +2 -2
+ NTP_4_2_7P356
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.346 +2 -2
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.361 +4 -4
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.361 +3 -3
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd.html@1.19 +1 -1
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd.man.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ packageinfo.sh@1.359 +1 -1
+ NTP_4_2_7P356
+
+ scripts/invoke-ntp-wait.texi@1.163 +1 -1
+ NTP_4_2_7P356
+
+ scripts/ntp-wait.1ntp-waitman@1.174 +3 -3
+ NTP_4_2_7P356
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.174 +3 -3
+ NTP_4_2_7P356
+
+ scripts/ntp-wait.html@1.179 +1 -1
+ NTP_4_2_7P356
+
+ scripts/ntp-wait.man.in@1.174 +3 -3
+ NTP_4_2_7P356
+
+ scripts/ntp-wait.mdoc.in@1.174 +3 -3
+ NTP_4_2_7P356
+
+ sntp/invoke-sntp.texi@1.343 +2 -2
+ NTP_4_2_7P356
+
+ sntp/sntp-opts.c@1.358 +4 -4
+ NTP_4_2_7P356
+
+ sntp/sntp-opts.h@1.358 +3 -3
+ NTP_4_2_7P356
+
+ sntp/sntp.1sntpman@1.178 +3 -3
+ NTP_4_2_7P356
+
+ sntp/sntp.1sntpmdoc@1.178 +3 -3
+ NTP_4_2_7P356
+
+ sntp/sntp.html@1.358 +2 -2
+ NTP_4_2_7P356
+
+ sntp/sntp.man.in@1.178 +3 -3
+ NTP_4_2_7P356
+
+ sntp/sntp.mdoc.in@1.178 +3 -3
+ NTP_4_2_7P356
+
+ util/invoke-ntp-keygen.texi@1.347 +2 -2
+ NTP_4_2_7P356
+
+ util/ntp-keygen-opts.c@1.361 +4 -4
+ NTP_4_2_7P356
+
+ util/ntp-keygen-opts.h@1.361 +3 -3
+ NTP_4_2_7P356
+
+ util/ntp-keygen.1ntp-keygenman@1.175 +3 -3
+ NTP_4_2_7P356
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.175 +3 -3
+ NTP_4_2_7P356
+
+ util/ntp-keygen.html@1.25 +2 -2
+ NTP_4_2_7P356
+
+ util/ntp-keygen.man.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ util/ntp-keygen.mdoc.in@1.175 +3 -3
+ NTP_4_2_7P356
+
+ChangeSet@1.2917, 2013-02-18 22:58:22-08:00, harlan@hms-mbp11.local
+ Added loc/debian
+
+ ChangeLog@1.1268 +1 -0
+ Added loc/debian
+
+ sntp/loc/debian@1.1 +15 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/sntp/loc/debian
+
+ sntp/loc/debian@1.0 +0 -0
+
+ChangeSet@1.2916, 2013-02-18 09:26:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P355
+ TAG: NTP_4_2_7P355
+
+ ChangeLog@1.1267 +1 -0
+ NTP_4_2_7P355
+
+ ntpd/invoke-ntp.conf.texi@1.29 +1 -1
+ NTP_4_2_7P355
+
+ ntpd/invoke-ntp.keys.texi@1.29 +1 -1
+ NTP_4_2_7P355
+
+ ntpd/invoke-ntpd.texi@1.345 +2 -2
+ NTP_4_2_7P355
+
+ ntpd/ntp.conf.5man@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.conf.5mdoc@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.conf.html@1.28 +1 -1
+ NTP_4_2_7P355
+
+ ntpd/ntp.conf.man.in@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.conf.mdoc.in@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.keys.5man@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.keys.5mdoc@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.keys.html@1.29 +1 -1
+ NTP_4_2_7P355
+
+ ntpd/ntp.keys.man.in@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntp.keys.mdoc.in@1.63 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntpd-opts.c@1.363 +4 -4
+ NTP_4_2_7P355
+
+ ntpd/ntpd-opts.h@1.363 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntpd.1ntpdman@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntpd.1ntpdmdoc@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntpd.html@1.23 +2 -2
+ NTP_4_2_7P355
+
+ ntpd/ntpd.man.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpd/ntpd.mdoc.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpdc/invoke-ntpdc.texi@1.342 +2 -2
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc-opts.c@1.357 +4 -4
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc-opts.h@1.357 +3 -3
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc.1ntpdcman@1.173 +2 -2
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.173 +2 -2
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc.html@1.186 +2 -2
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc.man.in@1.173 +2 -2
+ NTP_4_2_7P355
+
+ ntpdc/ntpdc.mdoc.in@1.173 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/invoke-ntpq.texi@1.346 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/ntpq-opts.c@1.360 +4 -4
+ NTP_4_2_7P355
+
+ ntpq/ntpq-opts.h@1.360 +3 -3
+ NTP_4_2_7P355
+
+ ntpq/ntpq.1ntpqman@1.174 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/ntpq.1ntpqmdoc@1.174 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/ntpq.html@1.20 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/ntpq.man.in@1.174 +2 -2
+ NTP_4_2_7P355
+
+ ntpq/ntpq.mdoc.in@1.174 +2 -2
+ NTP_4_2_7P355
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.345 +2 -2
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.360 +4 -4
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.360 +3 -3
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd.html@1.18 +1 -1
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd.man.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ packageinfo.sh@1.358 +1 -1
+ NTP_4_2_7P355
+
+ scripts/invoke-ntp-wait.texi@1.162 +1 -1
+ NTP_4_2_7P355
+
+ scripts/ntp-wait.1ntp-waitman@1.173 +3 -3
+ NTP_4_2_7P355
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.173 +3 -3
+ NTP_4_2_7P355
+
+ scripts/ntp-wait.html@1.178 +1 -1
+ NTP_4_2_7P355
+
+ scripts/ntp-wait.man.in@1.173 +3 -3
+ NTP_4_2_7P355
+
+ scripts/ntp-wait.mdoc.in@1.173 +3 -3
+ NTP_4_2_7P355
+
+ sntp/invoke-sntp.texi@1.342 +2 -2
+ NTP_4_2_7P355
+
+ sntp/sntp-opts.c@1.357 +4 -4
+ NTP_4_2_7P355
+
+ sntp/sntp-opts.h@1.357 +3 -3
+ NTP_4_2_7P355
+
+ sntp/sntp.1sntpman@1.177 +3 -3
+ NTP_4_2_7P355
+
+ sntp/sntp.1sntpmdoc@1.177 +3 -3
+ NTP_4_2_7P355
+
+ sntp/sntp.html@1.357 +2 -2
+ NTP_4_2_7P355
+
+ sntp/sntp.man.in@1.177 +3 -3
+ NTP_4_2_7P355
+
+ sntp/sntp.mdoc.in@1.177 +3 -3
+ NTP_4_2_7P355
+
+ util/invoke-ntp-keygen.texi@1.346 +2 -2
+ NTP_4_2_7P355
+
+ util/ntp-keygen-opts.c@1.360 +4 -4
+ NTP_4_2_7P355
+
+ util/ntp-keygen-opts.h@1.360 +3 -3
+ NTP_4_2_7P355
+
+ util/ntp-keygen.1ntp-keygenman@1.174 +3 -3
+ NTP_4_2_7P355
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.174 +3 -3
+ NTP_4_2_7P355
+
+ util/ntp-keygen.html@1.24 +2 -2
+ NTP_4_2_7P355
+
+ util/ntp-keygen.man.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ util/ntp-keygen.mdoc.in@1.174 +3 -3
+ NTP_4_2_7P355
+
+ChangeSet@1.2915, 2013-02-18 04:01:05-05:00, stenn@deacon.udel.edu
+ CID 739711: Ignore return status of remove() in ntp-keygen.c
+
+ ChangeLog@1.1266 +1 -0
+ CID 739711: Ignore return status of remove() in ntp-keygen.c
+
+ util/ntp-keygen.c@1.95 +1 -1
+ CID 739711: Ignore return status of remove() in ntp-keygen.c
+
+ChangeSet@1.2914, 2013-02-18 03:28:57-05:00, stenn@deacon.udel.edu
+ CID 739710: Check return status of mkdir() in sntp/kod_management.c
+
+ ChangeLog@1.1265 +1 -0
+ CID 739710: Check return status of mkdir() in sntp/kod_management.c
+
+ sntp/kod_management.c@1.30 +5 -1
+ CID 739710: Check return status of mkdir() in sntp/kod_management.c
+
+ChangeSet@1.2913, 2013-02-18 03:18:18-05:00, stenn@deacon.udel.edu
+ CID 739709: Check return status of fcntl() in refclock_datum.c
+
+ ChangeLog@1.1264 +1 -0
+ CID 739709: Check return status of fcntl() in refclock_datum.c
+
+ ntpd/refclock_datum.c@1.21 +3 -1
+ CID 739709: Check return status of fcntl() in refclock_datum.c
+
+ChangeSet@1.2912, 2013-02-18 03:10:44-05:00, stenn@deacon.udel.edu
+ CID 739708: Check return status of fcntl() in refclock_arc.c
+
+ ChangeLog@1.1263 +1 -0
+ CID 739708: Check return status of fcntl() in refclock_arc.c
+
+ ntpd/refclock_arc.c@1.30 +4 -1
+ CID 739708: Check return status of fcntl() in refclock_arc.c
+
+ChangeSet@1.2911, 2013-02-18 03:05:01-05:00, stenn@deacon.udel.edu
+ CID 739723: Print sizeof as unsigned
+
+ ChangeLog@1.1262 +1 -0
+ CID 739723: Print sizeof as unsigned
+
+ sntp/main.c@1.88 +1 -1
+ CID 739723: Print sizeof as unsigned
+
+ChangeSet@1.2910, 2013-02-18 01:09:24-05:00, stenn@deacon.udel.edu
+ CID 971094: Clean up time of check/time of use in check_leap_file()
+
+ ChangeLog@1.1261 +1 -0
+ CID 971094: Clean up time of check/time of use in check_leap_file()
+
+ ntpd/ntp_util.c@1.102 +13 -13
+ CID 971094: Clean up time of check/time of use in check_leap_file()
+
+ChangeSet@1.2909, 2013-02-10 11:50:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P354
+ TAG: NTP_4_2_7P354
+
+ ChangeLog@1.1260 +1 -0
+ NTP_4_2_7P354
+
+ ntpd/invoke-ntp.conf.texi@1.28 +1 -1
+ NTP_4_2_7P354
+
+ ntpd/invoke-ntp.keys.texi@1.28 +1 -1
+ NTP_4_2_7P354
+
+ ntpd/invoke-ntpd.texi@1.344 +2 -2
+ NTP_4_2_7P354
+
+ ntpd/ntp.conf.5man@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.conf.5mdoc@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.conf.html@1.27 +1 -1
+ NTP_4_2_7P354
+
+ ntpd/ntp.conf.man.in@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.conf.mdoc.in@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.keys.5man@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.keys.5mdoc@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.keys.html@1.28 +1 -1
+ NTP_4_2_7P354
+
+ ntpd/ntp.keys.man.in@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntp.keys.mdoc.in@1.62 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntpd-opts.c@1.362 +4 -4
+ NTP_4_2_7P354
+
+ ntpd/ntpd-opts.h@1.362 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntpd.1ntpdman@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntpd.1ntpdmdoc@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntpd.html@1.22 +2 -2
+ NTP_4_2_7P354
+
+ ntpd/ntpd.man.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpd/ntpd.mdoc.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpdc/invoke-ntpdc.texi@1.341 +2 -2
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc-opts.c@1.356 +4 -4
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc-opts.h@1.356 +3 -3
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc.1ntpdcman@1.172 +2 -2
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.172 +2 -2
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc.html@1.185 +2 -2
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc.man.in@1.172 +2 -2
+ NTP_4_2_7P354
+
+ ntpdc/ntpdc.mdoc.in@1.172 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/invoke-ntpq.texi@1.345 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/ntpq-opts.c@1.359 +4 -4
+ NTP_4_2_7P354
+
+ ntpq/ntpq-opts.h@1.359 +3 -3
+ NTP_4_2_7P354
+
+ ntpq/ntpq.1ntpqman@1.173 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/ntpq.1ntpqmdoc@1.173 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/ntpq.html@1.19 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/ntpq.man.in@1.173 +2 -2
+ NTP_4_2_7P354
+
+ ntpq/ntpq.mdoc.in@1.173 +2 -2
+ NTP_4_2_7P354
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.344 +2 -2
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.359 +4 -4
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.359 +3 -3
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd.html@1.17 +1 -1
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd.man.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ packageinfo.sh@1.357 +1 -1
+ NTP_4_2_7P354
+
+ scripts/invoke-ntp-wait.texi@1.161 +1 -1
+ NTP_4_2_7P354
+
+ scripts/ntp-wait.1ntp-waitman@1.172 +3 -3
+ NTP_4_2_7P354
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.172 +3 -3
+ NTP_4_2_7P354
+
+ scripts/ntp-wait.html@1.177 +1 -1
+ NTP_4_2_7P354
+
+ scripts/ntp-wait.man.in@1.172 +3 -3
+ NTP_4_2_7P354
+
+ scripts/ntp-wait.mdoc.in@1.172 +3 -3
+ NTP_4_2_7P354
+
+ sntp/invoke-sntp.texi@1.341 +2 -2
+ NTP_4_2_7P354
+
+ sntp/sntp-opts.c@1.356 +4 -4
+ NTP_4_2_7P354
+
+ sntp/sntp-opts.h@1.356 +3 -3
+ NTP_4_2_7P354
+
+ sntp/sntp.1sntpman@1.176 +3 -3
+ NTP_4_2_7P354
+
+ sntp/sntp.1sntpmdoc@1.176 +3 -3
+ NTP_4_2_7P354
+
+ sntp/sntp.html@1.356 +2 -2
+ NTP_4_2_7P354
+
+ sntp/sntp.man.in@1.176 +3 -3
+ NTP_4_2_7P354
+
+ sntp/sntp.mdoc.in@1.176 +3 -3
+ NTP_4_2_7P354
+
+ util/invoke-ntp-keygen.texi@1.345 +2 -2
+ NTP_4_2_7P354
+
+ util/ntp-keygen-opts.c@1.359 +4 -4
+ NTP_4_2_7P354
+
+ util/ntp-keygen-opts.h@1.359 +3 -3
+ NTP_4_2_7P354
+
+ util/ntp-keygen.1ntp-keygenman@1.173 +3 -3
+ NTP_4_2_7P354
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.173 +3 -3
+ NTP_4_2_7P354
+
+ util/ntp-keygen.html@1.23 +2 -2
+ NTP_4_2_7P354
+
+ util/ntp-keygen.man.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ util/ntp-keygen.mdoc.in@1.173 +3 -3
+ NTP_4_2_7P354
+
+ChangeSet@1.2908, 2013-02-09 20:25:46-05:00, stenn@deacon.udel.edu
+ CID 739714: Fix code indentation level
+
+ ChangeLog@1.1259 +1 -0
+ CID 739714: Fix code indentation level
+
+ ntpd/refclock_irig.c@1.36 +2 -2
+ CID 739714: Fix code indentation level
+
+ChangeSet@1.2907, 2013-02-09 19:55:02-05:00, stenn@deacon.udel.edu
+ CID 739715: Clean up sockaddr_dump()
+
+ ChangeLog@1.1258 +1 -0
+ CID 739715: Clean up sockaddr_dump()
+
+ ntpd/ntp_io.c@1.376 +2 -1
+ CID 739715: Clean up sockaddr_dump()
+
+ChangeSet@1.2906, 2013-02-09 19:05:32-05:00, stenn@deacon.udel.edu
+ CID 97194: Check return from setsockopt()
+
+ ChangeLog@1.1257 +1 -0
+ CID 97194: Check return from setsockopt()
+
+ ntpd/ntp_io.c@1.375 +7 -2
+ CID 97194: Check return from setsockopt()
+
+ChangeSet@1.2905, 2013-02-09 18:28:45-05:00, stenn@deacon.udel.edu
+ CID 739713: devmask/recmask copy/paste error
+
+ ChangeLog@1.1256 +1 -0
+ CID 739713: devmask/recmask copy/paste error
+
+ libntp/audio.c@1.33 +2 -1
+ CID 739713: devmask/recmask copy/paste error
+
+ChangeSet@1.2904, 2013-02-09 18:17:48-05:00, stenn@deacon.udel.edu
+ CID 739559: Double close
+
+ ChangeLog@1.1255 +2 -1
+ CID 739559: Double close
+
+ lib/isc/unix/net.c@1.18 +0 -1
+ CID 739559: Double close
+
+ChangeSet@1.2903, 2013-02-09 18:14:26-05:00, stenn@deacon.udel.edu
+ CID 739558: Double close
+
+ ChangeLog@1.1254 +1 -0
+ CID 739558: Double close
+
+ lib/isc/unix/net.c@1.17 +0 -2
+ CID 739558: Double close
+
+ChangeSet@1.2902, 2013-02-09 18:05:03-05:00, stenn@deacon.udel.edu
+ CID 739473,739532: Out-of-bounds access/illegal address computation
+
+ ChangeLog@1.1253 +1 -0
+ CID 739473,739532: Out-of-bounds access/illegal address computation
+
+ lib/isc/sockaddr.c@1.11 +1 -1
+ CID 739473,739532: Out-of-bounds access/illegal address computation
+
+ChangeSet@1.2901, 2013-02-09 11:31:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P353
+ TAG: NTP_4_2_7P353
+
+ ChangeLog@1.1252 +1 -0
+ NTP_4_2_7P353
+
+ ntpd/invoke-ntp.conf.texi@1.27 +1 -1
+ NTP_4_2_7P353
+
+ ntpd/invoke-ntp.keys.texi@1.27 +1 -1
+ NTP_4_2_7P353
+
+ ntpd/invoke-ntpd.texi@1.343 +2 -2
+ NTP_4_2_7P353
+
+ ntpd/ntp.conf.5man@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.conf.5mdoc@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.conf.html@1.26 +1 -1
+ NTP_4_2_7P353
+
+ ntpd/ntp.conf.man.in@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.conf.mdoc.in@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.keys.5man@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.keys.5mdoc@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.keys.html@1.27 +1 -1
+ NTP_4_2_7P353
+
+ ntpd/ntp.keys.man.in@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntp.keys.mdoc.in@1.61 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntpd-opts.c@1.361 +4 -4
+ NTP_4_2_7P353
+
+ ntpd/ntpd-opts.h@1.361 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntpd.1ntpdman@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntpd.1ntpdmdoc@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntpd.html@1.21 +2 -2
+ NTP_4_2_7P353
+
+ ntpd/ntpd.man.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpd/ntpd.mdoc.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpdc/invoke-ntpdc.texi@1.340 +2 -2
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc-opts.c@1.355 +4 -4
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc-opts.h@1.355 +3 -3
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc.1ntpdcman@1.171 +2 -2
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.171 +2 -2
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc.html@1.184 +2 -2
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc.man.in@1.171 +2 -2
+ NTP_4_2_7P353
+
+ ntpdc/ntpdc.mdoc.in@1.171 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/invoke-ntpq.texi@1.344 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/ntpq-opts.c@1.358 +4 -4
+ NTP_4_2_7P353
+
+ ntpq/ntpq-opts.h@1.358 +3 -3
+ NTP_4_2_7P353
+
+ ntpq/ntpq.1ntpqman@1.172 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/ntpq.1ntpqmdoc@1.172 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/ntpq.html@1.18 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/ntpq.man.in@1.172 +2 -2
+ NTP_4_2_7P353
+
+ ntpq/ntpq.mdoc.in@1.172 +2 -2
+ NTP_4_2_7P353
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.343 +2 -2
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.358 +4 -4
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.358 +3 -3
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd.html@1.16 +1 -1
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd.man.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ packageinfo.sh@1.356 +1 -1
+ NTP_4_2_7P353
+
+ scripts/invoke-ntp-wait.texi@1.160 +1 -1
+ NTP_4_2_7P353
+
+ scripts/ntp-wait.1ntp-waitman@1.171 +3 -3
+ NTP_4_2_7P353
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.171 +3 -3
+ NTP_4_2_7P353
+
+ scripts/ntp-wait.html@1.176 +1 -1
+ NTP_4_2_7P353
+
+ scripts/ntp-wait.man.in@1.171 +3 -3
+ NTP_4_2_7P353
+
+ scripts/ntp-wait.mdoc.in@1.171 +3 -3
+ NTP_4_2_7P353
+
+ sntp/invoke-sntp.texi@1.340 +2 -2
+ NTP_4_2_7P353
+
+ sntp/sntp-opts.c@1.355 +4 -4
+ NTP_4_2_7P353
+
+ sntp/sntp-opts.h@1.355 +3 -3
+ NTP_4_2_7P353
+
+ sntp/sntp.1sntpman@1.175 +3 -3
+ NTP_4_2_7P353
+
+ sntp/sntp.1sntpmdoc@1.175 +3 -3
+ NTP_4_2_7P353
+
+ sntp/sntp.html@1.355 +2 -2
+ NTP_4_2_7P353
+
+ sntp/sntp.man.in@1.175 +3 -3
+ NTP_4_2_7P353
+
+ sntp/sntp.mdoc.in@1.175 +3 -3
+ NTP_4_2_7P353
+
+ util/invoke-ntp-keygen.texi@1.344 +2 -2
+ NTP_4_2_7P353
+
+ util/ntp-keygen-opts.c@1.358 +4 -4
+ NTP_4_2_7P353
+
+ util/ntp-keygen-opts.h@1.358 +3 -3
+ NTP_4_2_7P353
+
+ util/ntp-keygen.1ntp-keygenman@1.172 +3 -3
+ NTP_4_2_7P353
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.172 +3 -3
+ NTP_4_2_7P353
+
+ util/ntp-keygen.html@1.22 +2 -2
+ NTP_4_2_7P353
+
+ util/ntp-keygen.man.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ util/ntp-keygen.mdoc.in@1.172 +3 -3
+ NTP_4_2_7P353
+
+ChangeSet@1.2900, 2013-02-08 23:15:13-08:00, harlan@hms-mbp11.lan
+ [Bug 2326] Check hourly for a new leapfile if the old one expired
+
+ ChangeLog@1.1251 +1 -0
+ [Bug 2326] Check hourly for a new leapfile if the old one expired
+
+ ntpd/ntp_timer.c@1.71 +7 -0
+ [Bug 2326] Check hourly for a new leapfile if the old one expired
+
+ ntpd/ntp_util.c@1.101 +1 -1
+ [Bug 2326] Check hourly for a new leapfile if the old one expired
+
+ChangeSet@1.2899, 2013-01-28 02:57:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P352
+ TAG: NTP_4_2_7P352
+
+ ChangeLog@1.1250 +1 -0
+ NTP_4_2_7P352
+
+ ntpd/invoke-ntp.conf.texi@1.26 +1 -1
+ NTP_4_2_7P352
+
+ ntpd/invoke-ntp.keys.texi@1.26 +1 -1
+ NTP_4_2_7P352
+
+ ntpd/invoke-ntpd.texi@1.342 +2 -2
+ NTP_4_2_7P352
+
+ ntpd/ntp.conf.5man@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.conf.5mdoc@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.conf.html@1.25 +1 -1
+ NTP_4_2_7P352
+
+ ntpd/ntp.conf.man.in@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.conf.mdoc.in@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.keys.5man@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.keys.5mdoc@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.keys.html@1.26 +1 -1
+ NTP_4_2_7P352
+
+ ntpd/ntp.keys.man.in@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntp.keys.mdoc.in@1.60 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntpd-opts.c@1.360 +4 -4
+ NTP_4_2_7P352
+
+ ntpd/ntpd-opts.h@1.360 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntpd.1ntpdman@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntpd.1ntpdmdoc@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntpd.html@1.20 +2 -2
+ NTP_4_2_7P352
+
+ ntpd/ntpd.man.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpd/ntpd.mdoc.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpdc/invoke-ntpdc.texi@1.339 +2 -2
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc-opts.c@1.354 +4 -4
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc-opts.h@1.354 +3 -3
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc.1ntpdcman@1.170 +2 -2
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.170 +2 -2
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc.html@1.183 +2 -2
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc.man.in@1.170 +2 -2
+ NTP_4_2_7P352
+
+ ntpdc/ntpdc.mdoc.in@1.170 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/invoke-ntpq.texi@1.343 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/ntpq-opts.c@1.357 +4 -4
+ NTP_4_2_7P352
+
+ ntpq/ntpq-opts.h@1.357 +3 -3
+ NTP_4_2_7P352
+
+ ntpq/ntpq.1ntpqman@1.171 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/ntpq.1ntpqmdoc@1.171 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/ntpq.html@1.17 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/ntpq.man.in@1.171 +2 -2
+ NTP_4_2_7P352
+
+ ntpq/ntpq.mdoc.in@1.171 +2 -2
+ NTP_4_2_7P352
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.342 +2 -2
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.357 +4 -4
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.357 +3 -3
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd.html@1.15 +1 -1
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd.man.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ packageinfo.sh@1.355 +1 -1
+ NTP_4_2_7P352
+
+ scripts/invoke-ntp-wait.texi@1.159 +1 -1
+ NTP_4_2_7P352
+
+ scripts/ntp-wait.1ntp-waitman@1.170 +3 -3
+ NTP_4_2_7P352
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.170 +3 -3
+ NTP_4_2_7P352
+
+ scripts/ntp-wait.html@1.175 +1 -1
+ NTP_4_2_7P352
+
+ scripts/ntp-wait.man.in@1.170 +3 -3
+ NTP_4_2_7P352
+
+ scripts/ntp-wait.mdoc.in@1.170 +3 -3
+ NTP_4_2_7P352
+
+ sntp/invoke-sntp.texi@1.339 +2 -2
+ NTP_4_2_7P352
+
+ sntp/sntp-opts.c@1.354 +4 -4
+ NTP_4_2_7P352
+
+ sntp/sntp-opts.h@1.354 +3 -3
+ NTP_4_2_7P352
+
+ sntp/sntp.1sntpman@1.174 +3 -3
+ NTP_4_2_7P352
+
+ sntp/sntp.1sntpmdoc@1.174 +3 -3
+ NTP_4_2_7P352
+
+ sntp/sntp.html@1.354 +2 -2
+ NTP_4_2_7P352
+
+ sntp/sntp.man.in@1.174 +3 -3
+ NTP_4_2_7P352
+
+ sntp/sntp.mdoc.in@1.174 +3 -3
+ NTP_4_2_7P352
+
+ util/invoke-ntp-keygen.texi@1.343 +2 -2
+ NTP_4_2_7P352
+
+ util/ntp-keygen-opts.c@1.357 +4 -4
+ NTP_4_2_7P352
+
+ util/ntp-keygen-opts.h@1.357 +3 -3
+ NTP_4_2_7P352
+
+ util/ntp-keygen.1ntp-keygenman@1.171 +3 -3
+ NTP_4_2_7P352
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.171 +3 -3
+ NTP_4_2_7P352
+
+ util/ntp-keygen.html@1.21 +2 -2
+ NTP_4_2_7P352
+
+ util/ntp-keygen.man.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ util/ntp-keygen.mdoc.in@1.171 +3 -3
+ NTP_4_2_7P352
+
+ChangeSet@1.2898, 2013-01-28 00:44:57+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ html/miscopt.html@1.72 +1 -0
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ChangeSet@1.2897, 2013-01-28 00:20:35+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ ChangeLog@1.1249 +1 -0
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ include/ntpd.h@1.173 +1 -0
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ ntpd/ntp_config.c@1.311 +1 -1
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ ntpd/ntp_io.c@1.374 +15 -5
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ ntpd/ntp_util.c@1.100 +60 -5
+ [Bug 2326] Notice when a new leapfile has been installed
+
+ChangeSet@1.2896, 2013-01-24 11:39:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P351
+ TAG: NTP_4_2_7P351
+
+ ChangeLog@1.1248 +1 -0
+ NTP_4_2_7P351
+
+ ntpd/invoke-ntp.conf.texi@1.25 +1 -1
+ NTP_4_2_7P351
+
+ ntpd/invoke-ntp.keys.texi@1.25 +1 -1
+ NTP_4_2_7P351
+
+ ntpd/invoke-ntpd.texi@1.341 +2 -2
+ NTP_4_2_7P351
+
+ ntpd/ntp.conf.5man@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.conf.5mdoc@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.conf.html@1.24 +1 -1
+ NTP_4_2_7P351
+
+ ntpd/ntp.conf.man.in@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.conf.mdoc.in@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.keys.5man@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.keys.5mdoc@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.keys.html@1.25 +1 -1
+ NTP_4_2_7P351
+
+ ntpd/ntp.keys.man.in@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntp.keys.mdoc.in@1.59 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntpd-opts.c@1.359 +4 -4
+ NTP_4_2_7P351
+
+ ntpd/ntpd-opts.h@1.359 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntpd.1ntpdman@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntpd.1ntpdmdoc@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntpd.html@1.19 +2 -2
+ NTP_4_2_7P351
+
+ ntpd/ntpd.man.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpd/ntpd.mdoc.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpdc/invoke-ntpdc.texi@1.338 +2 -2
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc-opts.c@1.353 +4 -4
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc-opts.h@1.353 +3 -3
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc.1ntpdcman@1.169 +2 -2
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.169 +2 -2
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc.html@1.182 +2 -2
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc.man.in@1.169 +2 -2
+ NTP_4_2_7P351
+
+ ntpdc/ntpdc.mdoc.in@1.169 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/invoke-ntpq.texi@1.342 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/ntpq-opts.c@1.356 +4 -4
+ NTP_4_2_7P351
+
+ ntpq/ntpq-opts.h@1.356 +3 -3
+ NTP_4_2_7P351
+
+ ntpq/ntpq.1ntpqman@1.170 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/ntpq.1ntpqmdoc@1.170 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/ntpq.html@1.16 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/ntpq.man.in@1.170 +2 -2
+ NTP_4_2_7P351
+
+ ntpq/ntpq.mdoc.in@1.170 +2 -2
+ NTP_4_2_7P351
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.341 +2 -2
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.356 +4 -4
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.356 +3 -3
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd.html@1.14 +1 -1
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd.man.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ packageinfo.sh@1.354 +1 -1
+ NTP_4_2_7P351
+
+ scripts/invoke-ntp-wait.texi@1.158 +1 -1
+ NTP_4_2_7P351
+
+ scripts/ntp-wait.1ntp-waitman@1.169 +3 -3
+ NTP_4_2_7P351
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.169 +3 -3
+ NTP_4_2_7P351
+
+ scripts/ntp-wait.html@1.174 +1 -1
+ NTP_4_2_7P351
+
+ scripts/ntp-wait.man.in@1.169 +3 -3
+ NTP_4_2_7P351
+
+ scripts/ntp-wait.mdoc.in@1.169 +3 -3
+ NTP_4_2_7P351
+
+ sntp/invoke-sntp.texi@1.338 +2 -2
+ NTP_4_2_7P351
+
+ sntp/sntp-opts.c@1.353 +4 -4
+ NTP_4_2_7P351
+
+ sntp/sntp-opts.h@1.353 +3 -3
+ NTP_4_2_7P351
+
+ sntp/sntp.1sntpman@1.173 +3 -3
+ NTP_4_2_7P351
+
+ sntp/sntp.1sntpmdoc@1.173 +3 -3
+ NTP_4_2_7P351
+
+ sntp/sntp.html@1.353 +2 -2
+ NTP_4_2_7P351
+
+ sntp/sntp.man.in@1.173 +3 -3
+ NTP_4_2_7P351
+
+ sntp/sntp.mdoc.in@1.173 +3 -3
+ NTP_4_2_7P351
+
+ util/invoke-ntp-keygen.texi@1.342 +2 -2
+ NTP_4_2_7P351
+
+ util/ntp-keygen-opts.c@1.356 +4 -4
+ NTP_4_2_7P351
+
+ util/ntp-keygen-opts.h@1.356 +3 -3
+ NTP_4_2_7P351
+
+ util/ntp-keygen.1ntp-keygenman@1.170 +3 -3
+ NTP_4_2_7P351
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.170 +3 -3
+ NTP_4_2_7P351
+
+ util/ntp-keygen.html@1.20 +2 -2
+ NTP_4_2_7P351
+
+ util/ntp-keygen.man.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ util/ntp-keygen.mdoc.in@1.170 +3 -3
+ NTP_4_2_7P351
+
+ChangeSet@1.2895, 2013-01-23 17:50:49+01:00, burnicki@pc-martin4.
+ [Bug 2328] Don't apply small time adjustments on Windows versions which don't support this.
+
+ ChangeLog@1.1247 +2 -0
+ [Bug 2328] Don't apply small time adjustments on Windows versions which don't support this.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.59 +58 -0
+ [bug 2328] Don't apply small time adjustments on Windows versions which don't support this.
+
+ChangeSet@1.2894, 2013-01-21 11:44:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P350
+ TAG: NTP_4_2_7P350
+
+ ChangeLog@1.1246 +1 -0
+ NTP_4_2_7P350
+
+ ntpd/invoke-ntp.conf.texi@1.24 +1 -1
+ NTP_4_2_7P350
+
+ ntpd/invoke-ntp.keys.texi@1.24 +1 -1
+ NTP_4_2_7P350
+
+ ntpd/invoke-ntpd.texi@1.340 +2 -2
+ NTP_4_2_7P350
+
+ ntpd/ntp.conf.5man@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.conf.5mdoc@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.conf.html@1.23 +1 -1
+ NTP_4_2_7P350
+
+ ntpd/ntp.conf.man.in@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.conf.mdoc.in@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.keys.5man@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.keys.5mdoc@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.keys.html@1.24 +1 -1
+ NTP_4_2_7P350
+
+ ntpd/ntp.keys.man.in@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntp.keys.mdoc.in@1.58 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntpd-opts.c@1.358 +4 -4
+ NTP_4_2_7P350
+
+ ntpd/ntpd-opts.h@1.358 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntpd.1ntpdman@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntpd.1ntpdmdoc@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntpd.html@1.18 +2 -2
+ NTP_4_2_7P350
+
+ ntpd/ntpd.man.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpd/ntpd.mdoc.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpdc/invoke-ntpdc.texi@1.337 +2 -2
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc-opts.c@1.352 +4 -4
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc-opts.h@1.352 +3 -3
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc.1ntpdcman@1.168 +2 -2
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.168 +2 -2
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc.html@1.181 +2 -2
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc.man.in@1.168 +2 -2
+ NTP_4_2_7P350
+
+ ntpdc/ntpdc.mdoc.in@1.168 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/invoke-ntpq.texi@1.341 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/ntpq-opts.c@1.355 +4 -4
+ NTP_4_2_7P350
+
+ ntpq/ntpq-opts.h@1.355 +3 -3
+ NTP_4_2_7P350
+
+ ntpq/ntpq.1ntpqman@1.169 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/ntpq.1ntpqmdoc@1.169 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/ntpq.html@1.15 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/ntpq.man.in@1.169 +2 -2
+ NTP_4_2_7P350
+
+ ntpq/ntpq.mdoc.in@1.169 +2 -2
+ NTP_4_2_7P350
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.340 +2 -2
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.355 +4 -4
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.355 +3 -3
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd.html@1.13 +1 -1
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd.man.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ packageinfo.sh@1.353 +1 -1
+ NTP_4_2_7P350
+
+ scripts/invoke-ntp-wait.texi@1.157 +1 -1
+ NTP_4_2_7P350
+
+ scripts/ntp-wait.1ntp-waitman@1.168 +3 -3
+ NTP_4_2_7P350
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.168 +3 -3
+ NTP_4_2_7P350
+
+ scripts/ntp-wait.html@1.173 +1 -1
+ NTP_4_2_7P350
+
+ scripts/ntp-wait.man.in@1.168 +3 -3
+ NTP_4_2_7P350
+
+ scripts/ntp-wait.mdoc.in@1.168 +3 -3
+ NTP_4_2_7P350
+
+ sntp/invoke-sntp.texi@1.337 +2 -2
+ NTP_4_2_7P350
+
+ sntp/sntp-opts.c@1.352 +4 -4
+ NTP_4_2_7P350
+
+ sntp/sntp-opts.h@1.352 +3 -3
+ NTP_4_2_7P350
+
+ sntp/sntp.1sntpman@1.172 +3 -3
+ NTP_4_2_7P350
+
+ sntp/sntp.1sntpmdoc@1.172 +3 -3
+ NTP_4_2_7P350
+
+ sntp/sntp.html@1.352 +2 -2
+ NTP_4_2_7P350
+
+ sntp/sntp.man.in@1.172 +3 -3
+ NTP_4_2_7P350
+
+ sntp/sntp.mdoc.in@1.172 +3 -3
+ NTP_4_2_7P350
+
+ util/invoke-ntp-keygen.texi@1.341 +2 -2
+ NTP_4_2_7P350
+
+ util/ntp-keygen-opts.c@1.355 +4 -4
+ NTP_4_2_7P350
+
+ util/ntp-keygen-opts.h@1.355 +3 -3
+ NTP_4_2_7P350
+
+ util/ntp-keygen.1ntp-keygenman@1.169 +3 -3
+ NTP_4_2_7P350
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.169 +3 -3
+ NTP_4_2_7P350
+
+ util/ntp-keygen.html@1.19 +2 -2
+ NTP_4_2_7P350
+
+ util/ntp-keygen.man.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ util/ntp-keygen.mdoc.in@1.169 +3 -3
+ NTP_4_2_7P350
+
+ChangeSet@1.2893, 2013-01-20 20:58:35-05:00, stenn@deacon.udel.edu
+ Added sntp/loc/netbsd based on info from Christos Zoulas
+
+ ChangeLog@1.1245 +1 -0
+ Added sntp/loc/netbsd based on info from Christos Zoulas
+
+ sntp/loc/netbsd@1.1 +13 -0
+ BitKeeper file /deacon/backroom/ntp-dev/sntp/loc/netbsd
+
+ sntp/loc/netbsd@1.0 +0 -0
+
+ChangeSet@1.2892, 2013-01-20 11:44:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P349
+ TAG: NTP_4_2_7P349
+
+ ChangeLog@1.1244 +1 -0
+ NTP_4_2_7P349
+
+ ntpd/invoke-ntp.conf.texi@1.23 +1 -1
+ NTP_4_2_7P349
+
+ ntpd/invoke-ntp.keys.texi@1.23 +1 -1
+ NTP_4_2_7P349
+
+ ntpd/invoke-ntpd.texi@1.339 +2 -2
+ NTP_4_2_7P349
+
+ ntpd/ntp.conf.5man@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.conf.5mdoc@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.conf.html@1.22 +1 -1
+ NTP_4_2_7P349
+
+ ntpd/ntp.conf.man.in@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.conf.mdoc.in@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.keys.5man@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.keys.5mdoc@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.keys.html@1.23 +1 -1
+ NTP_4_2_7P349
+
+ ntpd/ntp.keys.man.in@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntp.keys.mdoc.in@1.57 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntpd-opts.c@1.357 +4 -4
+ NTP_4_2_7P349
+
+ ntpd/ntpd-opts.h@1.357 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntpd.1ntpdman@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntpd.1ntpdmdoc@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntpd.html@1.17 +4 -4
+ NTP_4_2_7P349
+
+ ntpd/ntpd.man.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpd/ntpd.mdoc.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpdc/invoke-ntpdc.texi@1.336 +2 -2
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc-opts.c@1.351 +4 -4
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc-opts.h@1.351 +3 -3
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc.1ntpdcman@1.167 +2 -2
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.167 +2 -2
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc.html@1.180 +2 -2
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc.man.in@1.167 +2 -2
+ NTP_4_2_7P349
+
+ ntpdc/ntpdc.mdoc.in@1.167 +2 -2
+ NTP_4_2_7P349
+
+ ntpq/invoke-ntpq.texi@1.340 +2 -2
+ NTP_4_2_7P349
+
+ ntpq/ntpq-opts.c@1.354 +4 -4
+ NTP_4_2_7P349
+
+ ntpq/ntpq-opts.h@1.354 +3 -3
+ NTP_4_2_7P349
+
+ ntpq/ntpq.1ntpqman@1.168 +2 -2
+ NTP_4_2_7P349
+
+ ntpq/ntpq.1ntpqmdoc@1.168 +2 -2
+ NTP_4_2_7P349
+
+ ntpq/ntpq.html@1.14 +13 -10
+ NTP_4_2_7P349
+
+ ntpq/ntpq.man.in@1.168 +2 -2
+ NTP_4_2_7P349
+
+ ntpq/ntpq.mdoc.in@1.168 +2 -2
+ NTP_4_2_7P349
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.339 +2 -2
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.354 +4 -4
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.354 +3 -3
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd.html@1.12 +1 -1
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd.man.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ packageinfo.sh@1.352 +1 -1
+ NTP_4_2_7P349
+
+ scripts/invoke-ntp-wait.texi@1.156 +1 -1
+ NTP_4_2_7P349
+
+ scripts/ntp-wait.1ntp-waitman@1.167 +3 -3
+ NTP_4_2_7P349
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.167 +3 -3
+ NTP_4_2_7P349
+
+ scripts/ntp-wait.html@1.172 +1 -1
+ NTP_4_2_7P349
+
+ scripts/ntp-wait.man.in@1.167 +3 -3
+ NTP_4_2_7P349
+
+ scripts/ntp-wait.mdoc.in@1.167 +3 -3
+ NTP_4_2_7P349
+
+ sntp/invoke-sntp.texi@1.336 +2 -2
+ NTP_4_2_7P349
+
+ sntp/sntp-opts.c@1.351 +4 -4
+ NTP_4_2_7P349
+
+ sntp/sntp-opts.h@1.351 +3 -3
+ NTP_4_2_7P349
+
+ sntp/sntp.1sntpman@1.171 +3 -3
+ NTP_4_2_7P349
+
+ sntp/sntp.1sntpmdoc@1.171 +3 -3
+ NTP_4_2_7P349
+
+ sntp/sntp.html@1.351 +2 -2
+ NTP_4_2_7P349
+
+ sntp/sntp.man.in@1.171 +3 -3
+ NTP_4_2_7P349
+
+ sntp/sntp.mdoc.in@1.171 +3 -3
+ NTP_4_2_7P349
+
+ util/invoke-ntp-keygen.texi@1.340 +2 -2
+ NTP_4_2_7P349
+
+ util/ntp-keygen-opts.c@1.354 +4 -4
+ NTP_4_2_7P349
+
+ util/ntp-keygen-opts.h@1.354 +3 -3
+ NTP_4_2_7P349
+
+ util/ntp-keygen.1ntp-keygenman@1.168 +3 -3
+ NTP_4_2_7P349
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.168 +3 -3
+ NTP_4_2_7P349
+
+ util/ntp-keygen.html@1.18 +2 -2
+ NTP_4_2_7P349
+
+ util/ntp-keygen.man.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ util/ntp-keygen.mdoc.in@1.168 +3 -3
+ NTP_4_2_7P349
+
+ChangeSet@1.2891, 2013-01-18 09:44:02+01:00, burnicki@pc-martin4.
+ Support C99 exact size int types in a way which is compatible with the upcoming
+ version of libopts which will not #include <inttypes.h> unconditionally anymore.
+ Fixes the build errors under Windows reported in [Bug 2321].
+
+ ChangeLog@1.1243 +1 -0
+ [Bug 2321] Fixed Windows build, but autogen update still required.
+
+ ports/winnt/include/config.h@1.104 +46 -0
+ Support C99 exact size int types in a way which is compatible with the upcoming
+ version of libopts which will not #include <inttypes.h> unconditionally anymore.
+ See [Bug 2321] for details.
+
+ChangeSet@1.2890, 2013-01-17 07:08:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P348
+ TAG: NTP_4_2_7P348
+
+ ChangeLog@1.1242 +1 -0
+ NTP_4_2_7P348
+
+ ntpd/invoke-ntp.conf.texi@1.22 +17 -5
+ NTP_4_2_7P348
+
+ ntpd/invoke-ntp.keys.texi@1.22 +1 -1
+ NTP_4_2_7P348
+
+ ntpd/invoke-ntpd.texi@1.338 +4 -4
+ NTP_4_2_7P348
+
+ ntpd/ntp.conf.5man@1.56 +26 -4
+ NTP_4_2_7P348
+
+ ntpd/ntp.conf.5mdoc@1.56 +23 -4
+ NTP_4_2_7P348
+
+ ntpd/ntp.conf.html@1.21 +1 -1
+ NTP_4_2_7P348
+
+ ntpd/ntp.conf.man.in@1.56 +26 -4
+ NTP_4_2_7P348
+
+ ntpd/ntp.conf.mdoc.in@1.56 +23 -4
+ NTP_4_2_7P348
+
+ ntpd/ntp.keys.5man@1.56 +3 -3
+ NTP_4_2_7P348
+
+ ntpd/ntp.keys.5mdoc@1.56 +3 -3
+ NTP_4_2_7P348
+
+ ntpd/ntp.keys.html@1.22 +1 -1
+ NTP_4_2_7P348
+
+ ntpd/ntp.keys.man.in@1.56 +3 -3
+ NTP_4_2_7P348
+
+ ntpd/ntp.keys.mdoc.in@1.56 +3 -3
+ NTP_4_2_7P348
+
+ ntpd/ntpd-opts.c@1.356 +4 -4
+ NTP_4_2_7P348
+
+ ntpd/ntpd-opts.h@1.356 +3 -3
+ NTP_4_2_7P348
+
+ ntpd/ntpd.1ntpdman@1.167 +18 -18
+ NTP_4_2_7P348
+
+ ntpd/ntpd.1ntpdmdoc@1.167 +18 -18
+ NTP_4_2_7P348
+
+ ntpd/ntpd.html@1.16 +2 -2
+ NTP_4_2_7P348
+
+ ntpd/ntpd.man.in@1.167 +18 -18
+ NTP_4_2_7P348
+
+ ntpd/ntpd.mdoc.in@1.167 +18 -18
+ NTP_4_2_7P348
+
+ ntpdc/invoke-ntpdc.texi@1.335 +3 -3
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc-opts.c@1.350 +4 -4
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc-opts.h@1.350 +3 -3
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc.1ntpdcman@1.166 +14 -14
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.166 +14 -14
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc.html@1.179 +3 -3
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc.man.in@1.166 +14 -14
+ NTP_4_2_7P348
+
+ ntpdc/ntpdc.mdoc.in@1.166 +14 -14
+ NTP_4_2_7P348
+
+ ntpq/invoke-ntpq.texi@1.339 +13 -10
+ NTP_4_2_7P348
+
+ ntpq/ntpq-opts.c@1.353 +4 -4
+ NTP_4_2_7P348
+
+ ntpq/ntpq-opts.h@1.353 +3 -3
+ NTP_4_2_7P348
+
+ ntpq/ntpq.1ntpqman@1.167 +13 -10
+ NTP_4_2_7P348
+
+ ntpq/ntpq.1ntpqmdoc@1.167 +13 -10
+ NTP_4_2_7P348
+
+ ntpq/ntpq.html@1.13 +2 -25
+ NTP_4_2_7P348
+
+ ntpq/ntpq.man.in@1.167 +13 -10
+ NTP_4_2_7P348
+
+ ntpq/ntpq.mdoc.in@1.167 +13 -10
+ NTP_4_2_7P348
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.338 +2 -2
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.353 +4 -4
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.353 +3 -3
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.167 +3 -3
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.167 +3 -3
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd.html@1.11 +1 -1
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd.man.in@1.167 +3 -3
+ NTP_4_2_7P348
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.167 +3 -3
+ NTP_4_2_7P348
+
+ packageinfo.sh@1.351 +1 -1
+ NTP_4_2_7P348
+
+ scripts/invoke-ntp-wait.texi@1.155 +7 -7
+ NTP_4_2_7P348
+
+ scripts/ntp-wait.1ntp-waitman@1.166 +9 -9
+ NTP_4_2_7P348
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.166 +9 -9
+ NTP_4_2_7P348
+
+ scripts/ntp-wait.html@1.171 +7 -7
+ NTP_4_2_7P348
+
+ scripts/ntp-wait.man.in@1.166 +9 -9
+ NTP_4_2_7P348
+
+ scripts/ntp-wait.mdoc.in@1.166 +9 -9
+ NTP_4_2_7P348
+
+ sntp/invoke-sntp.texi@1.335 +2 -2
+ NTP_4_2_7P348
+
+ sntp/sntp-opts.c@1.350 +4 -4
+ NTP_4_2_7P348
+
+ sntp/sntp-opts.h@1.350 +3 -3
+ NTP_4_2_7P348
+
+ sntp/sntp.1sntpman@1.170 +3 -3
+ NTP_4_2_7P348
+
+ sntp/sntp.1sntpmdoc@1.170 +3 -3
+ NTP_4_2_7P348
+
+ sntp/sntp.html@1.350 +2 -2
+ NTP_4_2_7P348
+
+ sntp/sntp.man.in@1.170 +3 -3
+ NTP_4_2_7P348
+
+ sntp/sntp.mdoc.in@1.170 +3 -3
+ NTP_4_2_7P348
+
+ util/invoke-ntp-keygen.texi@1.339 +2 -2
+ NTP_4_2_7P348
+
+ util/ntp-keygen-opts.c@1.353 +4 -4
+ NTP_4_2_7P348
+
+ util/ntp-keygen-opts.h@1.353 +3 -3
+ NTP_4_2_7P348
+
+ util/ntp-keygen.1ntp-keygenman@1.167 +3 -3
+ NTP_4_2_7P348
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.167 +3 -3
+ NTP_4_2_7P348
+
+ util/ntp-keygen.html@1.17 +2 -2
+ NTP_4_2_7P348
+
+ util/ntp-keygen.man.in@1.167 +3 -3
+ NTP_4_2_7P348
+
+ util/ntp-keygen.mdoc.in@1.167 +3 -3
+ NTP_4_2_7P348
+
+ChangeSet@1.2889, 2013-01-17 02:07:52-05:00, stenn@deacon.udel.edu
+ Cleanup to ntpsnmpd-opts.def
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.9 +2 -0
+ Cleanup to ntpsnmpd-opts.def
+
+ChangeSet@1.2888, 2013-01-17 01:40:10-05:00, stenn@deacon.udel.edu
+ Cleanup to ntpsnmpd-opts.def
+
+ ChangeLog@1.1241 +1 -0
+ Cleanup to ntpsnmpd-opts.def
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.8 +1 -0
+ Cleanup to ntpsnmpd-opts.def
+
+ChangeSet@1.2887, 2013-01-13 10:47:08+00:00, stenn@psp-fb1.ntp.org
+ Cleanup to ntpq.texi
+
+ ChangeLog@1.1240 +1 -0
+ Cleanup to ntpq.texi
+
+ ntpq/ntpq.texi@1.4 +0 -23
+ Cleanup to ntpq.texi
+
+ChangeSet@1.2886, 2013-01-13 09:54:06+00:00, stenn@psp-fb1.ntp.org
+ Documentation cleanup to various .def files
+
+ ChangeLog@1.1239 +2 -0
+ Documentation cleanup to various .def files
+
+ChangeSet@1.2885, 2013-01-13 09:53:41+00:00, stenn@psp-fb1.ntp.org
+ Documentation cleanup to various .def files
+
+ ntpd/ntpd-opts.def@1.10 +15 -15
+ Documentation cleanup to the ntpd .def files
+
+ ntpdc/ntpdc-opts.def@1.20 +12 -12
+ Documentation cleanup to the ntpdc .def files
+
+ ntpq/ntpq-opts.def@1.16 +11 -8
+ Documentation cleanup to the ntpq .def files
+
+ scripts/ntp-wait-opts.def@1.7 +6 -6
+ Documentation cleanup to the ntp-wait .def files
+
+ChangeSet@1.2884, 2013-01-13 07:37:17+00:00, stenn@psp-fb1.ntp.org
+ In ntp.conf.def, cleanup SEE ALSO, document 'rlimit' options
+
+ ChangeLog@1.1238 +1 -0
+ In ntp.conf.def, cleanup SEE ALSO, document 'rlimit' options
+
+ ntpd/ntp.conf.def@1.7 +20 -1
+ In ntp.conf.def, cleanup SEE ALSO, document 'rlimit' options
+
+ChangeSet@1.2883, 2013-01-09 10:07:33+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2327] Rename sntp/ag-tpl/:Old to sntp/ag-tpl/Old.
+
+ ChangeLog@1.1237 +1 -0
+ [Bug 2327] Rename sntp/ag-tpl/:Old to sntp/ag-tpl/Old.
+
+ sntp/ag-tpl/Old/agman-file.tpl@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/agman-file.tpl -> sntp/ag-tpl/Old/agman-file.tpl
+
+ sntp/ag-tpl/Old/agmdoc-file.tpl@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/agmdoc-file.tpl -> sntp/ag-tpl/Old/agmdoc-file.tpl
+
+ sntp/ag-tpl/Old/agtexi-cmd.tpl@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/agtexi-cmd.tpl -> sntp/ag-tpl/Old/agtexi-cmd.tpl
+
+ sntp/ag-tpl/Old/cmd-doc.tlib@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/cmd-doc.tlib -> sntp/ag-tpl/Old/cmd-doc.tlib
+
+ sntp/ag-tpl/Old/mdoc2man@1.3 +0 -0
+ Rename: sntp/ag-tpl/:Old/mdoc2man -> sntp/ag-tpl/Old/mdoc2man
+
+ChangeSet@1.2882, 2013-01-09 09:09:37+00:00, stenn@psp-fb1.ntp.org
+ Add a reference to RFC5907 in the ntpsnmpd documentation
+
+ ChangeLog@1.1236 +1 -0
+ Add a reference to RFC5907 in the ntpsnmpd documentation
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.7 +13 -0
+ Add a reference to RFC5907 in the ntpsnmpd documentation
+
+ChangeSet@1.2881, 2013-01-07 11:42:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P347
+ TAG: NTP_4_2_7P347
+
+ ChangeLog@1.1235 +1 -0
+ NTP_4_2_7P347
+
+ ntpd/invoke-ntp.conf.texi@1.21 +1 -1
+ NTP_4_2_7P347
+
+ ntpd/invoke-ntp.keys.texi@1.21 +1 -1
+ NTP_4_2_7P347
+
+ ntpd/invoke-ntpd.texi@1.337 +2 -2
+ NTP_4_2_7P347
+
+ ntpd/ntp.conf.5man@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.conf.5mdoc@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.conf.html@1.20 +1 -1
+ NTP_4_2_7P347
+
+ ntpd/ntp.conf.man.in@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.conf.mdoc.in@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.keys.5man@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.keys.5mdoc@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.keys.html@1.21 +1 -1
+ NTP_4_2_7P347
+
+ ntpd/ntp.keys.man.in@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntp.keys.mdoc.in@1.55 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntpd-opts.c@1.355 +4 -4
+ NTP_4_2_7P347
+
+ ntpd/ntpd-opts.h@1.355 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntpd.1ntpdman@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntpd.1ntpdmdoc@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntpd.html@1.15 +2 -492
+ NTP_4_2_7P347
+
+ ntpd/ntpd.man.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpd/ntpd.mdoc.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpdc/invoke-ntpdc.texi@1.334 +2 -2
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc-opts.c@1.349 +4 -4
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc-opts.h@1.349 +3 -3
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc.1ntpdcman@1.165 +2 -2
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.165 +2 -2
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc.html@1.178 +2 -2
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc.man.in@1.165 +2 -2
+ NTP_4_2_7P347
+
+ ntpdc/ntpdc.mdoc.in@1.165 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/invoke-ntpq.texi@1.338 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/ntpq-opts.c@1.352 +4 -4
+ NTP_4_2_7P347
+
+ ntpq/ntpq-opts.h@1.352 +3 -3
+ NTP_4_2_7P347
+
+ ntpq/ntpq.1ntpqman@1.166 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/ntpq.1ntpqmdoc@1.166 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/ntpq.html@1.12 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/ntpq.man.in@1.166 +2 -2
+ NTP_4_2_7P347
+
+ ntpq/ntpq.mdoc.in@1.166 +2 -2
+ NTP_4_2_7P347
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.337 +2 -2
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.352 +4 -4
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.352 +3 -3
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd.html@1.10 +1 -1
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd.man.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ packageinfo.sh@1.350 +1 -1
+ NTP_4_2_7P347
+
+ scripts/invoke-ntp-wait.texi@1.154 +1 -1
+ NTP_4_2_7P347
+
+ scripts/ntp-wait.1ntp-waitman@1.165 +3 -3
+ NTP_4_2_7P347
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.165 +3 -3
+ NTP_4_2_7P347
+
+ scripts/ntp-wait.html@1.170 +1 -1
+ NTP_4_2_7P347
+
+ scripts/ntp-wait.man.in@1.165 +3 -3
+ NTP_4_2_7P347
+
+ scripts/ntp-wait.mdoc.in@1.165 +3 -3
+ NTP_4_2_7P347
+
+ sntp/invoke-sntp.texi@1.334 +2 -2
+ NTP_4_2_7P347
+
+ sntp/sntp-opts.c@1.349 +4 -4
+ NTP_4_2_7P347
+
+ sntp/sntp-opts.h@1.349 +3 -3
+ NTP_4_2_7P347
+
+ sntp/sntp.1sntpman@1.169 +3 -3
+ NTP_4_2_7P347
+
+ sntp/sntp.1sntpmdoc@1.169 +3 -3
+ NTP_4_2_7P347
+
+ sntp/sntp.html@1.349 +2 -2
+ NTP_4_2_7P347
+
+ sntp/sntp.man.in@1.169 +3 -3
+ NTP_4_2_7P347
+
+ sntp/sntp.mdoc.in@1.169 +3 -3
+ NTP_4_2_7P347
+
+ util/invoke-ntp-keygen.texi@1.338 +2 -2
+ NTP_4_2_7P347
+
+ util/ntp-keygen-opts.c@1.352 +4 -4
+ NTP_4_2_7P347
+
+ util/ntp-keygen-opts.h@1.352 +3 -3
+ NTP_4_2_7P347
+
+ util/ntp-keygen.1ntp-keygenman@1.166 +3 -3
+ NTP_4_2_7P347
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.166 +3 -3
+ NTP_4_2_7P347
+
+ util/ntp-keygen.html@1.16 +2 -23
+ NTP_4_2_7P347
+
+ util/ntp-keygen.man.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ util/ntp-keygen.mdoc.in@1.166 +3 -3
+ NTP_4_2_7P347
+
+ChangeSet@1.2880, 2013-01-07 04:15:55-05:00, stenn@deacon.udel.edu
+ [Bug 2325] Re-enable mlockall() check under Linux post-1223 fix
+
+ ChangeLog@1.1234 +1 -0
+ [Bug 2325] Re-enable mlockall() check under Linux post-1223 fix
+
+ configure.ac@1.556 +4 -3
+ [Bug 2325] Re-enable mlockall() check under Linux post-1223 fix
+
+ChangeSet@1.2879, 2013-01-06 11:47:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P346
+ TAG: NTP_4_2_7P346
+
+ ChangeLog@1.1233 +1 -0
+ NTP_4_2_7P346
+
+ ntpd/invoke-ntp.conf.texi@1.20 +1 -1
+ NTP_4_2_7P346
+
+ ntpd/invoke-ntp.keys.texi@1.20 +1 -1
+ NTP_4_2_7P346
+
+ ntpd/invoke-ntpd.texi@1.336 +2 -471
+ NTP_4_2_7P346
+
+ ntpd/ntp.conf.5man@1.54 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntp.conf.5mdoc@1.54 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntp.conf.html@1.19 +1 -1
+ NTP_4_2_7P346
+
+ ntpd/ntp.conf.man.in@1.54 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntp.conf.mdoc.in@1.54 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntp.keys.5man@1.54 +5 -4
+ NTP_4_2_7P346
+
+ ntpd/ntp.keys.5mdoc@1.54 +5 -4
+ NTP_4_2_7P346
+
+ ntpd/ntp.keys.html@1.20 +2 -2
+ NTP_4_2_7P346
+
+ ntpd/ntp.keys.man.in@1.54 +5 -4
+ NTP_4_2_7P346
+
+ ntpd/ntp.keys.mdoc.in@1.54 +5 -4
+ NTP_4_2_7P346
+
+ ntpd/ntpd-opts.c@1.354 +5 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd-opts.h@1.354 +5 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd.1ntpdman@1.165 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd.1ntpdmdoc@1.165 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd.html@1.14 +5 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd.man.in@1.165 +8 -5
+ NTP_4_2_7P346
+
+ ntpd/ntpd.mdoc.in@1.165 +8 -5
+ NTP_4_2_7P346
+
+ ntpdc/invoke-ntpdc.texi@1.333 +2 -609
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc-opts.c@1.348 +5 -5
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc-opts.h@1.348 +5 -5
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc.1ntpdcman@1.164 +5 -3
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.164 +5 -3
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc.html@1.177 +47 -187
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc.man.in@1.164 +5 -3
+ NTP_4_2_7P346
+
+ ntpdc/ntpdc.mdoc.in@1.164 +5 -3
+ NTP_4_2_7P346
+
+ ntpq/invoke-ntpq.texi@1.337 +2 -2
+ NTP_4_2_7P346
+
+ ntpq/ntpq-opts.c@1.351 +5 -5
+ NTP_4_2_7P346
+
+ ntpq/ntpq-opts.h@1.351 +5 -5
+ NTP_4_2_7P346
+
+ ntpq/ntpq.1ntpqman@1.165 +2 -2
+ NTP_4_2_7P346
+
+ ntpq/ntpq.1ntpqmdoc@1.165 +2 -2
+ NTP_4_2_7P346
+
+ ntpq/ntpq.html@1.11 +4 -4
+ NTP_4_2_7P346
+
+ ntpq/ntpq.man.in@1.165 +2 -2
+ NTP_4_2_7P346
+
+ ntpq/ntpq.mdoc.in@1.165 +2 -2
+ NTP_4_2_7P346
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.336 +2 -48
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.351 +5 -5
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.351 +5 -5
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.165 +4 -3
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.165 +4 -3
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd.html@1.9 +1 -1
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd.man.in@1.165 +4 -3
+ NTP_4_2_7P346
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.165 +4 -3
+ NTP_4_2_7P346
+
+ packageinfo.sh@1.349 +1 -1
+ NTP_4_2_7P346
+
+ scripts/invoke-ntp-wait.texi@1.153 +1 -3
+ NTP_4_2_7P346
+
+ scripts/ntp-wait.1ntp-waitman@1.164 +4 -3
+ NTP_4_2_7P346
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.164 +4 -3
+ NTP_4_2_7P346
+
+ scripts/ntp-wait.html@1.169 +2 -5
+ NTP_4_2_7P346
+
+ scripts/ntp-wait.man.in@1.164 +4 -3
+ NTP_4_2_7P346
+
+ scripts/ntp-wait.mdoc.in@1.164 +4 -3
+ NTP_4_2_7P346
+
+ sntp/invoke-sntp.texi@1.333 +2 -27
+ NTP_4_2_7P346
+
+ sntp/sntp-opts.c@1.348 +5 -5
+ NTP_4_2_7P346
+
+ sntp/sntp-opts.h@1.348 +5 -5
+ NTP_4_2_7P346
+
+ sntp/sntp.1sntpman@1.168 +6 -4
+ NTP_4_2_7P346
+
+ sntp/sntp.1sntpmdoc@1.168 +6 -4
+ NTP_4_2_7P346
+
+ sntp/sntp.html@1.348 +2 -25
+ NTP_4_2_7P346
+
+ sntp/sntp.man.in@1.168 +6 -4
+ NTP_4_2_7P346
+
+ sntp/sntp.mdoc.in@1.168 +6 -4
+ NTP_4_2_7P346
+
+ util/invoke-ntp-keygen.texi@1.337 +2 -22
+ NTP_4_2_7P346
+
+ util/ntp-keygen-opts.c@1.351 +5 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen-opts.h@1.351 +5 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen.1ntp-keygenman@1.165 +9 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.165 +9 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen.html@1.15 +5 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen.man.in@1.165 +9 -5
+ NTP_4_2_7P346
+
+ util/ntp-keygen.mdoc.in@1.165 +9 -5
+ NTP_4_2_7P346
+
+ChangeSet@1.2878, 2013-01-06 06:26:49-05:00, stenn@deacon.udel.edu
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/autoopts/options.h@1.19 +60 -40
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/autoopts/project.h@1.4 +25 -0
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/autoopts/usage-txt.h@1.19 +9 -9
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/compat/compat.h@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/compat/windows-config.h@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/m4/libopts.m4@1.23 +2 -2
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/m4/liboptschk.m4@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ChangeSet@1.2877, 2013-01-06 05:17:07-05:00, stenn@deacon.udel.edu
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/COPYING.gplv3@1.6 +3 -3
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/COPYING.lgplv3@1.6 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/Makefile.am@1.17 +3 -3
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/README@1.8 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/ag-char-map.h@1.20 +2 -2
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/alias.c@1.4 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/ao-strs.c@1.6 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/ao-strs.h@1.5 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/autoopts.c@1.15 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/autoopts.h@1.13 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/boolean.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/check.c@1.5 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/configfile.c@1.17 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/cook.c@1.12 +24 -15
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/enum.c@1.7 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/env.c@1.6 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/file.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/find.c@1.6 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/genshell.c@1.20 +2 -2
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/genshell.h@1.20 +3 -3
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/gettext.h@1.2 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/init.c@1.2 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/load.c@1.15 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/makeshell.c@1.14 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/nested.c@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/numeric.c@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/option-value-type.c@1.7 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/option-value-type.h@1.21 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/option-xat-attribute.c@1.7 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/option-xat-attribute.h@1.21 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/parse-duration.c@1.10 +4 -4
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/parse-duration.h@1.8 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/pgusage.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/proto.h@1.20 +29 -39
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/putshell.c@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/reset.c@1.13 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/restore.c@1.10 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/save.c@1.13 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/sort.c@1.11 +70 -70
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/stack.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/streqvcmp.c@1.11 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/text_mmap.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/time.c@1.12 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/tokenize.c@1.9 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/usage.c@1.13 +1 -1
+ Libopts-5.17.1pre14 update
+
+ sntp/libopts/version.c@1.13 +3 -5
+ Libopts-5.17.1pre14 update
+
+ChangeSet@1.2876, 2013-01-06 09:08:55+00:00, stenn@psp-at1.ntp.org
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ ChangeLog@1.1232 +1 -0
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ include/ntp_config.h@1.79 +4 -0
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ ntpd/ntp_config.c@1.310 +0 -3
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ ntpd/ntp_util.c@1.99 +0 -6
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ ntpd/ntpd.c@1.141 +0 -3
+ [Bug 1223] reorganize inclusion of sys/resource.h
+
+ChangeSet@1.2875, 2013-01-04 09:05:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P345
+ TAG: NTP_4_2_7P345
+
+ ChangeLog@1.1231 +1 -0
+ NTP_4_2_7P345
+
+ ntpd/invoke-ntp.conf.texi@1.19 +2 -2
+ NTP_4_2_7P345
+
+ ntpd/invoke-ntp.keys.texi@1.19 +2 -2
+ NTP_4_2_7P345
+
+ ntpd/invoke-ntpd.texi@1.335 +5 -5
+ NTP_4_2_7P345
+
+ ntpd/ntp.conf.5man@1.53 +61 -10
+ NTP_4_2_7P345
+
+ ntpd/ntp.conf.5mdoc@1.53 +136 -87
+ NTP_4_2_7P345
+
+ ntpd/ntp.conf.html@1.18 +405 -1603
+ NTP_4_2_7P345
+
+ ntpd/ntp.conf.man.in@1.53 +61 -10
+ NTP_4_2_7P345
+
+ ntpd/ntp.conf.mdoc.in@1.53 +136 -87
+ NTP_4_2_7P345
+
+ ntpd/ntp.keys.5man@1.53 +24 -6
+ NTP_4_2_7P345
+
+ ntpd/ntp.keys.5mdoc@1.53 +58 -9
+ NTP_4_2_7P345
+
+ ntpd/ntp.keys.html@1.19 +71 -27
+ NTP_4_2_7P345
+
+ ntpd/ntp.keys.man.in@1.53 +24 -6
+ NTP_4_2_7P345
+
+ ntpd/ntp.keys.mdoc.in@1.53 +58 -9
+ NTP_4_2_7P345
+
+ ntpd/ntpd-opts.c@1.353 +4 -4
+ NTP_4_2_7P345
+
+ ntpd/ntpd-opts.h@1.353 +3 -3
+ NTP_4_2_7P345
+
+ ntpd/ntpd.1ntpdman@1.164 +42 -20
+ NTP_4_2_7P345
+
+ ntpd/ntpd.1ntpdmdoc@1.164 +68 -53
+ NTP_4_2_7P345
+
+ ntpd/ntpd.html@1.13 +70 -178
+ NTP_4_2_7P345
+
+ ntpd/ntpd.man.in@1.164 +42 -20
+ NTP_4_2_7P345
+
+ ntpd/ntpd.mdoc.in@1.164 +68 -53
+ NTP_4_2_7P345
+
+ ntpdc/invoke-ntpdc.texi@1.332 +4 -4
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc-opts.c@1.347 +4 -4
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc-opts.h@1.347 +3 -3
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc.1ntpdcman@1.163 +31 -12
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.163 +53 -36
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc.html@1.176 +4 -4
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc.man.in@1.163 +31 -12
+ NTP_4_2_7P345
+
+ ntpdc/ntpdc.mdoc.in@1.163 +53 -36
+ NTP_4_2_7P345
+
+ ntpq/invoke-ntpq.texi@1.336 +4 -4
+ NTP_4_2_7P345
+
+ ntpq/ntpq-opts.c@1.350 +4 -4
+ NTP_4_2_7P345
+
+ ntpq/ntpq-opts.h@1.350 +3 -3
+ NTP_4_2_7P345
+
+ ntpq/ntpq.1ntpqman@1.164 +28 -9
+ NTP_4_2_7P345
+
+ ntpq/ntpq.1ntpqmdoc@1.164 +40 -23
+ NTP_4_2_7P345
+
+ ntpq/ntpq.html@1.10 +68 -37
+ NTP_4_2_7P345
+
+ ntpq/ntpq.man.in@1.164 +28 -9
+ NTP_4_2_7P345
+
+ ntpq/ntpq.mdoc.in@1.164 +40 -23
+ NTP_4_2_7P345
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.335 +5 -5
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.350 +4 -4
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.350 +3 -3
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.164 +25 -7
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.164 +35 -19
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd.html@1.8 +1 -1
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd.man.in@1.164 +25 -7
+ NTP_4_2_7P345
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.164 +35 -19
+ NTP_4_2_7P345
+
+ packageinfo.sh@1.348 +1 -1
+ NTP_4_2_7P345
+
+ scripts/invoke-ntp-wait.texi@1.152 +5 -5
+ NTP_4_2_7P345
+
+ scripts/ntp-wait.1ntp-waitman@1.163 +27 -5
+ NTP_4_2_7P345
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.163 +33 -12
+ NTP_4_2_7P345
+
+ scripts/ntp-wait.html@1.168 +5 -5
+ NTP_4_2_7P345
+
+ scripts/ntp-wait.man.in@1.163 +27 -5
+ NTP_4_2_7P345
+
+ scripts/ntp-wait.mdoc.in@1.163 +33 -12
+ NTP_4_2_7P345
+
+ sntp/invoke-sntp.texi@1.332 +5 -5
+ NTP_4_2_7P345
+
+ sntp/sntp-opts.c@1.347 +4 -4
+ NTP_4_2_7P345
+
+ sntp/sntp-opts.h@1.347 +3 -3
+ NTP_4_2_7P345
+
+ sntp/sntp.1sntpman@1.167 +32 -14
+ NTP_4_2_7P345
+
+ sntp/sntp.1sntpmdoc@1.167 +47 -34
+ NTP_4_2_7P345
+
+ sntp/sntp.html@1.347 +5 -5
+ NTP_4_2_7P345
+
+ sntp/sntp.man.in@1.167 +32 -14
+ NTP_4_2_7P345
+
+ sntp/sntp.mdoc.in@1.167 +47 -34
+ NTP_4_2_7P345
+
+ util/invoke-ntp-keygen.texi@1.336 +5 -5
+ NTP_4_2_7P345
+
+ util/ntp-keygen-opts.c@1.350 +4 -4
+ NTP_4_2_7P345
+
+ util/ntp-keygen-opts.h@1.350 +3 -3
+ NTP_4_2_7P345
+
+ util/ntp-keygen.1ntp-keygenman@1.164 +32 -14
+ NTP_4_2_7P345
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.164 +74 -59
+ NTP_4_2_7P345
+
+ util/ntp-keygen.html@1.14 +233 -205
+ NTP_4_2_7P345
+
+ util/ntp-keygen.man.in@1.164 +32 -14
+ NTP_4_2_7P345
+
+ util/ntp-keygen.mdoc.in@1.164 +74 -59
+ NTP_4_2_7P345
+
+ChangeSet@1.2874, 2013-01-04 03:36:43-05:00, stenn@deacon.udel.edu
+ clarify the reasoning for local libopts
+
+ configure.ac@1.555 +3 -2
+ clarify the reasoning for local libopts
+
+ChangeSet@1.2873, 2013-01-04 08:12:48+00:00, stenn@psp-at1.ntp.org
+ Update several .def files to use autogen-5.17 feature set
+
+ ChangeLog@1.1230 +1 -0
+ Update several .def files to use autogen-5.17 feature set
+
+ ntpd/ntp.conf.def@1.6 +1 -6
+ Update several .def files to use autogen-5.17 feature set
+
+ ntpd/ntp.keys.def@1.9 +1 -6
+ Update several .def files to use autogen-5.17 feature set
+
+ ntpd/ntpd-opts.def@1.9 +1 -1
+ Update several .def files to use autogen-5.17 feature set
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.6 +1 -1
+ Update several .def files to use autogen-5.17 feature set
+
+ scripts/ntp-wait-opts.def@1.6 +1 -6
+ Update several .def files to use autogen-5.17 feature set
+
+ sntp/ag-tpl/:Old/agman-file.tpl@1.2 +0 -0
+ Rename: sntp/ag-tpl/agman-file.tpl -> sntp/ag-tpl/:Old/agman-file.tpl
+
+ sntp/ag-tpl/:Old/agmdoc-file.tpl@1.2 +0 -0
+ Rename: sntp/ag-tpl/agmdoc-file.tpl -> sntp/ag-tpl/:Old/agmdoc-file.tpl
+
+ sntp/ag-tpl/:Old/agtexi-cmd.tpl@1.2 +0 -0
+ Rename: sntp/ag-tpl/agtexi-cmd.tpl -> sntp/ag-tpl/:Old/agtexi-cmd.tpl
+
+ sntp/ag-tpl/:Old/cmd-doc.tlib@1.2 +0 -0
+ Rename: sntp/ag-tpl/cmd-doc.tlib -> sntp/ag-tpl/:Old/cmd-doc.tlib
+
+ sntp/ag-tpl/:Old/mdoc2man@1.2 +0 -0
+ Rename: sntp/ag-tpl/mdoc2man -> sntp/ag-tpl/:Old/mdoc2man
+
+ sntp/include/autogen-version.def@1.14 +2 -1
+ Update several .def files to use autogen-5.17 feature set
+
+ sntp/include/copyright.def@1.22 +5 -0
+ Update several .def files to use autogen-5.17 feature set
+
+ sntp/sntp-opts.def@1.42 +1 -47
+ Update several .def files to use autogen-5.17 feature set
+
+ util/ntp-keygen-opts.def@1.24 +1 -6
+ Update several .def files to use autogen-5.17 feature set
+
+ChangeSet@1.2872, 2013-01-03 13:11:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P344
+ TAG: NTP_4_2_7P344
+
+ ChangeLog@1.1229 +1 -0
+ NTP_4_2_7P344
+
+ ntpd/invoke-ntp.conf.texi@1.18 +773 -774
+ NTP_4_2_7P344
+
+ ntpd/invoke-ntp.keys.texi@1.18 +54 -29
+ NTP_4_2_7P344
+
+ ntpd/invoke-ntpd.texi@1.334 +72 -173
+ NTP_4_2_7P344
+
+ ntpd/ntp.conf.5man@1.52 +2879 -3
+ NTP_4_2_7P344
+
+ ntpd/ntp.conf.5mdoc@1.52 +2711 -3
+ NTP_4_2_7P344
+
+ ntpd/ntp.conf.html@1.17 +1 -1
+ NTP_4_2_7P344
+
+ ntpd/ntp.conf.man.in@1.52 +2879 -3
+ NTP_4_2_7P344
+
+ ntpd/ntp.conf.mdoc.in@1.52 +2711 -3
+ NTP_4_2_7P344
+
+ ntpd/ntp.keys.5man@1.52 +95 -2
+ NTP_4_2_7P344
+
+ ntpd/ntp.keys.5mdoc@1.52 +94 -2
+ NTP_4_2_7P344
+
+ ntpd/ntp.keys.html@1.18 +1 -1
+ NTP_4_2_7P344
+
+ ntpd/ntp.keys.man.in@1.52 +95 -2
+ NTP_4_2_7P344
+
+ ntpd/ntp.keys.mdoc.in@1.52 +94 -2
+ NTP_4_2_7P344
+
+ ntpd/ntpd-opts.c@1.352 +73 -45
+ NTP_4_2_7P344
+
+ ntpd/ntpd-opts.h@1.352 +10 -9
+ NTP_4_2_7P344
+
+ ntpd/ntpd.1ntpdman@1.163 +550 -4
+ NTP_4_2_7P344
+
+ ntpd/ntpd.1ntpdmdoc@1.163 +548 -3
+ NTP_4_2_7P344
+
+ ntpd/ntpd.html@1.12 +2 -2
+ NTP_4_2_7P344
+
+ ntpd/ntpd.man.in@1.163 +550 -4
+ NTP_4_2_7P344
+
+ ntpd/ntpd.mdoc.in@1.163 +548 -3
+ NTP_4_2_7P344
+
+ ntpdc/invoke-ntpdc.texi@1.331 +154 -205
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc-opts.c@1.346 +73 -45
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc-opts.h@1.346 +12 -11
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc.1ntpdcman@1.162 +705 -4
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.162 +659 -3
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc.html@1.175 +40 -34
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc.man.in@1.162 +705 -4
+ NTP_4_2_7P344
+
+ ntpdc/ntpdc.mdoc.in@1.162 +659 -3
+ NTP_4_2_7P344
+
+ ntpq/invoke-ntpq.texi@1.335 +61 -42
+ NTP_4_2_7P344
+
+ ntpq/ntpq-opts.c@1.349 +73 -45
+ NTP_4_2_7P344
+
+ ntpq/ntpq-opts.h@1.349 +12 -11
+ NTP_4_2_7P344
+
+ ntpq/ntpq.1ntpqman@1.163 +261 -3
+ NTP_4_2_7P344
+
+ ntpq/ntpq.1ntpqmdoc@1.163 +245 -2
+ NTP_4_2_7P344
+
+ ntpq/ntpq.html@1.9 +2 -2
+ NTP_4_2_7P344
+
+ ntpq/ntpq.man.in@1.163 +261 -3
+ NTP_4_2_7P344
+
+ ntpq/ntpq.mdoc.in@1.163 +245 -2
+ NTP_4_2_7P344
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.334 +19 -23
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.349 +67 -45
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.349 +12 -11
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.163 +57 -3
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.163 +48 -2
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd.html@1.7 +1 -1
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd.man.in@1.163 +57 -3
+ NTP_4_2_7P344
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.163 +48 -2
+ NTP_4_2_7P344
+
+ packageinfo.sh@1.347 +1 -1
+ NTP_4_2_7P344
+
+ scripts/invoke-ntp-wait.texi@1.151 +9 -6
+ NTP_4_2_7P344
+
+ scripts/ntp-wait.1ntp-waitman@1.162 +20 -3
+ NTP_4_2_7P344
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.162 +19 -2
+ NTP_4_2_7P344
+
+ scripts/ntp-wait.html@1.167 +9 -6
+ NTP_4_2_7P344
+
+ scripts/ntp-wait.man.in@1.162 +20 -3
+ NTP_4_2_7P344
+
+ scripts/ntp-wait.mdoc.in@1.162 +19 -2
+ NTP_4_2_7P344
+
+ sntp/invoke-sntp.texi@1.331 +28 -18
+ NTP_4_2_7P344
+
+ sntp/sntp-opts.c@1.346 +75 -47
+ NTP_4_2_7P344
+
+ sntp/sntp-opts.h@1.346 +12 -11
+ NTP_4_2_7P344
+
+ sntp/sntp.1sntpman@1.166 +67 -3
+ NTP_4_2_7P344
+
+ sntp/sntp.1sntpmdoc@1.166 +66 -2
+ NTP_4_2_7P344
+
+ sntp/sntp.html@1.346 +26 -17
+ NTP_4_2_7P344
+
+ sntp/sntp.man.in@1.166 +67 -3
+ NTP_4_2_7P344
+
+ sntp/sntp.mdoc.in@1.166 +66 -2
+ NTP_4_2_7P344
+
+ util/invoke-ntp-keygen.texi@1.335 +208 -171
+ NTP_4_2_7P344
+
+ util/ntp-keygen-opts.c@1.349 +75 -47
+ NTP_4_2_7P344
+
+ util/ntp-keygen-opts.h@1.349 +10 -9
+ NTP_4_2_7P344
+
+ util/ntp-keygen.1ntp-keygenman@1.163 +854 -4
+ NTP_4_2_7P344
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.163 +839 -3
+ NTP_4_2_7P344
+
+ util/ntp-keygen.html@1.13 +2 -2
+ NTP_4_2_7P344
+
+ util/ntp-keygen.man.in@1.163 +854 -4
+ NTP_4_2_7P344
+
+ util/ntp-keygen.mdoc.in@1.163 +839 -3
+ NTP_4_2_7P344
+
+ChangeSet@1.2871, 2013-01-03 11:36:26+00:00, stenn@psp-at1.ntp.org
+ Refactor and enhance mdoc2texi
+
+ ChangeLog@1.1228 +1 -0
+ Refactor and enhance mdoc2texi
+
+ ChangeLog@1.1227 +1 -0
+ Make sure agtexi-file.tpl defines label-str
+
+ sntp/ag-tpl/agtexi-file.tpl@1.4 +4 -4
+ Make sure agtexi-file.tpl defines label-str
+
+ sntp/ag-tpl/mdoc2texi@1.7 +676 -393
+ Refactor and enhance mdoc2texi
+
+ChangeSet@1.2870, 2013-01-03 11:23:34+00:00, stenn@psp-at1.ntp.org
+ Cleanup to ntp.conf.def
+
+ ChangeLog@1.1226 +1 -0
+ Cleanup to ntp.conf.def
+
+ ntpd/ntp.conf.def@1.5 +4 -2
+ Cleanup to ntp.conf.def
+
+ChangeSet@1.2865.1.7, 2013-01-02 02:21:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P343
+ TAG: NTP_4_2_7P343
+
+ ChangeLog@1.1222.1.6 +1 -0
+ NTP_4_2_7P343
+
+ ntpd/invoke-ntp.conf.texi@1.17 +1 -1
+ NTP_4_2_7P343
+
+ ntpd/invoke-ntp.keys.texi@1.17 +1 -1
+ NTP_4_2_7P343
+
+ ntpd/invoke-ntpd.texi@1.333 +2 -2
+ NTP_4_2_7P343
+
+ ntpd/ntp.conf.5man@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.conf.5mdoc@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.conf.html@1.16 +1 -1
+ NTP_4_2_7P343
+
+ ntpd/ntp.conf.man.in@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.conf.mdoc.in@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.keys.5man@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.keys.5mdoc@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.keys.html@1.17 +1 -1
+ NTP_4_2_7P343
+
+ ntpd/ntp.keys.man.in@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntp.keys.mdoc.in@1.51 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntpd-opts.c@1.351 +6 -6
+ NTP_4_2_7P343
+
+ ntpd/ntpd-opts.h@1.351 +4 -4
+ NTP_4_2_7P343
+
+ ntpd/ntpd.1ntpdman@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntpd.1ntpdmdoc@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntpd.html@1.11 +2 -2
+ NTP_4_2_7P343
+
+ ntpd/ntpd.man.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpd/ntpd.mdoc.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpdc/invoke-ntpdc.texi@1.330 +2 -2
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc-opts.c@1.345 +6 -6
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc-opts.h@1.345 +4 -4
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc.1ntpdcman@1.161 +3 -3
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.161 +3 -3
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc.html@1.174 +2 -2
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc.man.in@1.161 +3 -3
+ NTP_4_2_7P343
+
+ ntpdc/ntpdc.mdoc.in@1.161 +3 -3
+ NTP_4_2_7P343
+
+ ntpq/invoke-ntpq.texi@1.334 +2 -2
+ NTP_4_2_7P343
+
+ ntpq/ntpq-opts.c@1.348 +6 -6
+ NTP_4_2_7P343
+
+ ntpq/ntpq-opts.h@1.348 +4 -4
+ NTP_4_2_7P343
+
+ ntpq/ntpq.1ntpqman@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpq/ntpq.1ntpqmdoc@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpq/ntpq.html@1.8 +2 -2
+ NTP_4_2_7P343
+
+ ntpq/ntpq.man.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpq/ntpq.mdoc.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.333 +2 -2
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.348 +6 -6
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.348 +4 -4
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd.html@1.6 +1 -1
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd.man.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ packageinfo.sh@1.346 +1 -1
+ NTP_4_2_7P343
+
+ scripts/invoke-ntp-wait.texi@1.150 +1 -1
+ NTP_4_2_7P343
+
+ scripts/ntp-wait.1ntp-waitman@1.161 +3 -3
+ NTP_4_2_7P343
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.161 +3 -3
+ NTP_4_2_7P343
+
+ scripts/ntp-wait.html@1.166 +1 -1
+ NTP_4_2_7P343
+
+ scripts/ntp-wait.man.in@1.161 +3 -3
+ NTP_4_2_7P343
+
+ scripts/ntp-wait.mdoc.in@1.161 +3 -3
+ NTP_4_2_7P343
+
+ sntp/invoke-sntp.texi@1.330 +2 -2
+ NTP_4_2_7P343
+
+ sntp/sntp-opts.c@1.345 +6 -6
+ NTP_4_2_7P343
+
+ sntp/sntp-opts.h@1.345 +4 -4
+ NTP_4_2_7P343
+
+ sntp/sntp.1sntpman@1.165 +3 -3
+ NTP_4_2_7P343
+
+ sntp/sntp.1sntpmdoc@1.165 +3 -3
+ NTP_4_2_7P343
+
+ sntp/sntp.html@1.345 +2 -2
+ NTP_4_2_7P343
+
+ sntp/sntp.man.in@1.165 +3 -3
+ NTP_4_2_7P343
+
+ sntp/sntp.mdoc.in@1.165 +3 -3
+ NTP_4_2_7P343
+
+ util/invoke-ntp-keygen.texi@1.334 +2 -2
+ NTP_4_2_7P343
+
+ util/ntp-keygen-opts.c@1.348 +6 -6
+ NTP_4_2_7P343
+
+ util/ntp-keygen-opts.h@1.348 +4 -4
+ NTP_4_2_7P343
+
+ util/ntp-keygen.1ntp-keygenman@1.162 +3 -3
+ NTP_4_2_7P343
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.162 +3 -3
+ NTP_4_2_7P343
+
+ util/ntp-keygen.html@1.12 +2 -2
+ NTP_4_2_7P343
+
+ util/ntp-keygen.man.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ util/ntp-keygen.mdoc.in@1.162 +3 -3
+ NTP_4_2_7P343
+
+ChangeSet@1.2865.1.6, 2012-12-31 20:47:19-05:00, stenn@deacon.udel.edu
+ Update the copyright year
+
+ ChangeLog@1.1222.1.5 +1 -0
+ Update the copyright year
+
+ html/copyright.html@1.61 +1 -1
+ Update the copyright year
+
+ sntp/include/copyright.def@1.21 +1 -1
+ Update the copyright year
+
+ChangeSet@1.2865.1.5, 2012-12-31 09:25:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P342
+ TAG: NTP_4_2_7P342
+
+ ChangeLog@1.1222.1.4 +1 -0
+ NTP_4_2_7P342
+
+ ntpd/invoke-ntp.conf.texi@1.16 +1 -1
+ NTP_4_2_7P342
+
+ ntpd/invoke-ntp.keys.texi@1.16 +1 -1
+ NTP_4_2_7P342
+
+ ntpd/invoke-ntpd.texi@1.332 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.conf.5man@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.conf.5mdoc@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.conf.html@1.15 +1 -1
+ NTP_4_2_7P342
+
+ ntpd/ntp.conf.man.in@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.conf.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.keys.5man@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.keys.5mdoc@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.keys.html@1.16 +1 -1
+ NTP_4_2_7P342
+
+ ntpd/ntp.keys.man.in@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntp.keys.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntpd-opts.c@1.350 +4 -4
+ NTP_4_2_7P342
+
+ ntpd/ntpd-opts.h@1.350 +3 -3
+ NTP_4_2_7P342
+
+ ntpd/ntpd.1ntpdman@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntpd.1ntpdmdoc@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntpd.html@1.10 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntpd.man.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpd/ntpd.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/invoke-ntpdc.texi@1.329 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc-opts.c@1.344 +4 -4
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc-opts.h@1.344 +3 -3
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc.1ntpdcman@1.160 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.160 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc.html@1.173 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc.man.in@1.160 +2 -2
+ NTP_4_2_7P342
+
+ ntpdc/ntpdc.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/invoke-ntpq.texi@1.333 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/ntpq-opts.c@1.347 +4 -4
+ NTP_4_2_7P342
+
+ ntpq/ntpq-opts.h@1.347 +3 -3
+ NTP_4_2_7P342
+
+ ntpq/ntpq.1ntpqman@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/ntpq.1ntpqmdoc@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/ntpq.html@1.7 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/ntpq.man.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpq/ntpq.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.332 +2 -2
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.347 +4 -4
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.347 +3 -3
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd.html@1.5 +1 -1
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd.man.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ packageinfo.sh@1.345 +1 -1
+ NTP_4_2_7P342
+
+ scripts/invoke-ntp-wait.texi@1.149 +1 -1
+ NTP_4_2_7P342
+
+ scripts/ntp-wait.1ntp-waitman@1.160 +2 -2
+ NTP_4_2_7P342
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.160 +2 -2
+ NTP_4_2_7P342
+
+ scripts/ntp-wait.html@1.165 +1 -1
+ NTP_4_2_7P342
+
+ scripts/ntp-wait.man.in@1.160 +2 -2
+ NTP_4_2_7P342
+
+ scripts/ntp-wait.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P342
+
+ sntp/invoke-sntp.texi@1.329 +2 -2
+ NTP_4_2_7P342
+
+ sntp/sntp-opts.c@1.344 +4 -4
+ NTP_4_2_7P342
+
+ sntp/sntp-opts.h@1.344 +3 -3
+ NTP_4_2_7P342
+
+ sntp/sntp.1sntpman@1.164 +2 -2
+ NTP_4_2_7P342
+
+ sntp/sntp.1sntpmdoc@1.164 +2 -2
+ NTP_4_2_7P342
+
+ sntp/sntp.html@1.344 +2 -2
+ NTP_4_2_7P342
+
+ sntp/sntp.man.in@1.164 +2 -2
+ NTP_4_2_7P342
+
+ sntp/sntp.mdoc.in@1.164 +2 -2
+ NTP_4_2_7P342
+
+ util/invoke-ntp-keygen.texi@1.333 +2 -2
+ NTP_4_2_7P342
+
+ util/ntp-keygen-opts.c@1.347 +4 -4
+ NTP_4_2_7P342
+
+ util/ntp-keygen-opts.h@1.347 +3 -3
+ NTP_4_2_7P342
+
+ util/ntp-keygen.1ntp-keygenman@1.161 +2 -2
+ NTP_4_2_7P342
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.161 +2 -2
+ NTP_4_2_7P342
+
+ util/ntp-keygen.html@1.11 +2 -2
+ NTP_4_2_7P342
+
+ util/ntp-keygen.man.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ util/ntp-keygen.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P342
+
+ChangeSet@1.2865.1.3, 2012-12-30 16:01:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P341
+ TAG: NTP_4_2_7P341
+
+ ChangeLog@1.1222.1.2 +1 -0
+ NTP_4_2_7P341
+
+ ntpd/invoke-ntp.conf.texi@1.15 +1 -1
+ NTP_4_2_7P341
+
+ ntpd/invoke-ntp.keys.texi@1.15 +1 -1
+ NTP_4_2_7P341
+
+ ntpd/invoke-ntpd.texi@1.331 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.conf.5man@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.conf.5mdoc@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.conf.html@1.14 +1 -13
+ NTP_4_2_7P341
+
+ ntpd/ntp.conf.man.in@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.conf.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.keys.5man@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.keys.5mdoc@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.keys.html@1.15 +1 -1
+ NTP_4_2_7P341
+
+ ntpd/ntp.keys.man.in@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntp.keys.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntpd-opts.c@1.349 +4 -4
+ NTP_4_2_7P341
+
+ ntpd/ntpd-opts.h@1.349 +3 -3
+ NTP_4_2_7P341
+
+ ntpd/ntpd.1ntpdman@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntpd.1ntpdmdoc@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntpd.html@1.9 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntpd.man.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpd/ntpd.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/invoke-ntpdc.texi@1.328 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc-opts.c@1.343 +4 -4
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc-opts.h@1.343 +3 -3
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc.1ntpdcman@1.159 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.159 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc.html@1.172 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc.man.in@1.159 +2 -2
+ NTP_4_2_7P341
+
+ ntpdc/ntpdc.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P341
+
+ ntpq/invoke-ntpq.texi@1.332 +2 -2
+ NTP_4_2_7P341
+
+ ntpq/ntpq-opts.c@1.346 +4 -4
+ NTP_4_2_7P341
+
+ ntpq/ntpq-opts.h@1.346 +3 -3
+ NTP_4_2_7P341
+
+ ntpq/ntpq.1ntpqman@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpq/ntpq.1ntpqmdoc@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpq/ntpq.html@1.6 +2 -4
+ NTP_4_2_7P341
+
+ ntpq/ntpq.man.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpq/ntpq.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.331 +2 -2
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.346 +4 -4
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.346 +3 -3
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd.html@1.4 +1 -1
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd.man.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ packageinfo.sh@1.344 +1 -1
+ NTP_4_2_7P341
+
+ scripts/invoke-ntp-wait.texi@1.148 +1 -1
+ NTP_4_2_7P341
+
+ scripts/ntp-wait.1ntp-waitman@1.159 +2 -2
+ NTP_4_2_7P341
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.159 +2 -2
+ NTP_4_2_7P341
+
+ scripts/ntp-wait.html@1.164 +1 -1
+ NTP_4_2_7P341
+
+ scripts/ntp-wait.man.in@1.159 +2 -2
+ NTP_4_2_7P341
+
+ scripts/ntp-wait.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P341
+
+ sntp/invoke-sntp.texi@1.328 +2 -2
+ NTP_4_2_7P341
+
+ sntp/sntp-opts.c@1.343 +4 -4
+ NTP_4_2_7P341
+
+ sntp/sntp-opts.h@1.343 +3 -3
+ NTP_4_2_7P341
+
+ sntp/sntp.1sntpman@1.163 +2 -2
+ NTP_4_2_7P341
+
+ sntp/sntp.1sntpmdoc@1.163 +2 -2
+ NTP_4_2_7P341
+
+ sntp/sntp.html@1.343 +2 -2
+ NTP_4_2_7P341
+
+ sntp/sntp.man.in@1.163 +2 -2
+ NTP_4_2_7P341
+
+ sntp/sntp.mdoc.in@1.163 +2 -2
+ NTP_4_2_7P341
+
+ util/invoke-ntp-keygen.texi@1.332 +2 -2
+ NTP_4_2_7P341
+
+ util/ntp-keygen-opts.c@1.346 +4 -4
+ NTP_4_2_7P341
+
+ util/ntp-keygen-opts.h@1.346 +3 -3
+ NTP_4_2_7P341
+
+ util/ntp-keygen.1ntp-keygenman@1.160 +2 -2
+ NTP_4_2_7P341
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.160 +2 -2
+ NTP_4_2_7P341
+
+ util/ntp-keygen.html@1.10 +2 -3
+ NTP_4_2_7P341
+
+ util/ntp-keygen.man.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ util/ntp-keygen.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P341
+
+ChangeSet@1.2865.1.2, 2012-12-29 19:57:16-05:00, stenn@deacon.udel.edu
+ Fix permissions on ntpsnmpd/netsnmp_daemonize.c
+
+ ntpsnmpd/netsnmp_daemonize.c@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ChangeSet@1.2865.1.1, 2012-12-29 09:30:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P340
+ TAG: NTP_4_2_7P340
+
+ ChangeLog@1.1222.1.1 +1 -0
+ NTP_4_2_7P340
+
+ ntpd/invoke-ntp.conf.texi@1.14 +1 -13
+ NTP_4_2_7P340
+
+ ntpd/invoke-ntp.keys.texi@1.14 +1 -1
+ NTP_4_2_7P340
+
+ ntpd/invoke-ntpd.texi@1.330 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.conf.5man@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.conf.5mdoc@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.conf.html@1.13 +451 -126
+ NTP_4_2_7P340
+
+ ntpd/ntp.conf.man.in@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.conf.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.keys.5man@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.keys.5mdoc@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.keys.html@1.14 +6 -5
+ NTP_4_2_7P340
+
+ ntpd/ntp.keys.man.in@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntp.keys.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntpd-opts.c@1.348 +4 -4
+ NTP_4_2_7P340
+
+ ntpd/ntpd-opts.h@1.348 +3 -3
+ NTP_4_2_7P340
+
+ ntpd/ntpd.1ntpdman@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntpd.1ntpdmdoc@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntpd.html@1.8 +8 -8
+ NTP_4_2_7P340
+
+ ntpd/ntpd.man.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpd/ntpd.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpdc/invoke-ntpdc.texi@1.327 +2 -3
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc-opts.c@1.342 +4 -4
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc-opts.h@1.342 +3 -3
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc.1ntpdcman@1.158 +2 -2
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.158 +2 -2
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc.html@1.171 +2 -3
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc.man.in@1.158 +2 -2
+ NTP_4_2_7P340
+
+ ntpdc/ntpdc.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P340
+
+ ntpq/invoke-ntpq.texi@1.331 +2 -4
+ NTP_4_2_7P340
+
+ ntpq/ntpq-opts.c@1.345 +4 -4
+ NTP_4_2_7P340
+
+ ntpq/ntpq-opts.h@1.345 +3 -3
+ NTP_4_2_7P340
+
+ ntpq/ntpq.1ntpqman@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpq/ntpq.1ntpqmdoc@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpq/ntpq.html@1.5 +6 -4
+ NTP_4_2_7P340
+
+ ntpq/ntpq.man.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpq/ntpq.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.330 +2 -3
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.345 +4 -4
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.345 +3 -3
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd.html@1.3 +1 -1
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd.man.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ packageinfo.sh@1.343 +1 -1
+ NTP_4_2_7P340
+
+ scripts/invoke-ntp-wait.texi@1.147 +1 -1
+ NTP_4_2_7P340
+
+ scripts/ntp-wait.1ntp-waitman@1.158 +2 -2
+ NTP_4_2_7P340
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.158 +2 -2
+ NTP_4_2_7P340
+
+ scripts/ntp-wait.html@1.163 +1 -1
+ NTP_4_2_7P340
+
+ scripts/ntp-wait.man.in@1.158 +2 -2
+ NTP_4_2_7P340
+
+ scripts/ntp-wait.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P340
+
+ sntp/invoke-sntp.texi@1.327 +3 -3
+ NTP_4_2_7P340
+
+ sntp/sntp-opts.c@1.342 +4 -4
+ NTP_4_2_7P340
+
+ sntp/sntp-opts.h@1.342 +3 -3
+ NTP_4_2_7P340
+
+ sntp/sntp.1sntpman@1.162 +2 -2
+ NTP_4_2_7P340
+
+ sntp/sntp.1sntpmdoc@1.162 +2 -2
+ NTP_4_2_7P340
+
+ sntp/sntp.html@1.342 +3 -3
+ NTP_4_2_7P340
+
+ sntp/sntp.man.in@1.162 +2 -2
+ NTP_4_2_7P340
+
+ sntp/sntp.mdoc.in@1.162 +2 -2
+ NTP_4_2_7P340
+
+ util/invoke-ntp-keygen.texi@1.331 +2 -3
+ NTP_4_2_7P340
+
+ util/ntp-keygen-opts.c@1.345 +4 -4
+ NTP_4_2_7P340
+
+ util/ntp-keygen-opts.h@1.345 +3 -3
+ NTP_4_2_7P340
+
+ util/ntp-keygen.1ntp-keygenman@1.159 +2 -2
+ NTP_4_2_7P340
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.159 +2 -2
+ NTP_4_2_7P340
+
+ util/ntp-keygen.html@1.9 +214 -213
+ NTP_4_2_7P340
+
+ util/ntp-keygen.man.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ util/ntp-keygen.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P340
+
+ChangeSet@1.2863.2.1, 2012-12-29 06:47:23+00:00, stenn@psp-fb1.ntp.org
+ mdoc2texi: fix trailing punctuation handlers
+
+ ChangeLog@1.1220.2.1 +2 -1
+ mdoc2texi: fix trailing punctuation handlers
+
+ sntp/ag-tpl/mdoc2texi@1.6 +16 -5
+ mdoc2texi: fix trailing punctuation handlers
+
+ChangeSet@1.2863.1.1, 2012-12-28 11:41:12+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ ChangeLog@1.1220.1.1 +1 -0
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/include/autogen-version.def@1.13 +1 -1
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/Makefile.am@1.16 +9 -8
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/ag-char-map.h@1.19 +23 -6
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/alias.c@1.3 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/ao-strs.c@1.5 +201 -191
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/ao-strs.h@1.4 +210 -208
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/autoopts.c@1.14 +58 -370
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/autoopts.h@1.12 +38 -7
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/autoopts/options.h@1.18 +218 -307
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/autoopts/usage-txt.h@1.18 +531 -270
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/boolean.c@1.11 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/check.c@1.4 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/compat.h@1.11 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/pathfind.c@1.9 +18 -16
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/snprintf.c@1.3 +2 -0
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/strchr.c@1.3 +10 -4
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/strdup.c@1.3 +3 -0
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/compat/windows-config.h@1.10 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/configfile.c@1.16 +349 -422
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/cook.c@1.11 +8 -9
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/enum.c@1.6 +11 -12
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/env.c@1.5 +12 -14
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/file.c@1.11 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/find.c@1.5 +248 -45
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/genshell.c@1.19 +63 -41
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/genshell.h@1.19 +7 -6
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/gettext.h@1.1 +288 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen-5.17/sntp/libopts/gettext.h
+
+ sntp/libopts/gettext.h@1.0 +0 -0
+
+ sntp/libopts/init.c@1.1 +292 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen-5.17/sntp/libopts/init.c
+
+ sntp/libopts/init.c@1.0 +0 -0
+
+ sntp/libopts/libopts.c@1.8 +5 -4
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/load.c@1.14 +21 -15
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/m4/libopts.m4@1.22 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/m4/liboptschk.m4@1.10 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/makeshell.c@1.13 +220 -177
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/nested.c@1.10 +334 -269
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/numeric.c@1.10 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/option-value-type.c@1.6 +115 -82
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/option-value-type.c@1.5 +0 -0
+ Rename: sntp/libopts/value-type.c -> sntp/libopts/option-value-type.c
+
+ sntp/libopts/option-value-type.h@1.20 +54 -21
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/option-value-type.h@1.19 +0 -0
+ Rename: sntp/libopts/value-type.h -> sntp/libopts/option-value-type.h
+
+ sntp/libopts/option-xat-attribute.c@1.6 +106 -72
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/option-xat-attribute.c@1.5 +0 -0
+ Rename: sntp/libopts/xat-attribute.c -> sntp/libopts/option-xat-attribute.c
+
+ sntp/libopts/option-xat-attribute.h@1.20 +51 -18
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/option-xat-attribute.h@1.19 +0 -0
+ Rename: sntp/libopts/xat-attribute.h -> sntp/libopts/option-xat-attribute.h
+
+ sntp/libopts/parse-duration.c@1.9 +6 -6
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/pgusage.c@1.11 +18 -19
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/proto.h@1.19 +24 -15
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/putshell.c@1.10 +0 -2
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/reset.c@1.12 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/restore.c@1.9 +7 -8
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/save.c@1.12 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/sort.c@1.10 +5 -6
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/stack.c@1.11 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/streqvcmp.c@1.10 +1 -3
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/text_mmap.c@1.11 +2 -4
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/time.c@1.11 +3 -5
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/tokenize.c@1.8 +2 -4
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/usage.c@1.12 +114 -109
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ sntp/libopts/version.c@1.12 +3 -5
+ Upgrade to autogen-5.17 and libopts-37.0.12
+
+ChangeSet@1.2857.1.2, 2012-12-27 20:14:04-05:00, murray@pogo.udel.edu
+ monopt.html:
+ Fix for bug-2801
+
+ html/monopt.html@1.35 +53 -9
+ Fix for bug-2801
+
+ChangeSet@1.2857.1.1, 2012-12-27 20:09:00-05:00, murray@pogo.udel.edu
+ ntp_util.c, ntpd.h, ChangeLog, ntp_proto.c:
+ Fix for bug 2081
+
+ ChangeLog@1.1214.1.1 +1 -0
+ Fix for bug 2081
+
+ include/ntpd.h@1.172 +1 -1
+ Fix for bug 2081
+
+ ntpd/ntp_proto.c@1.344 +6 -3
+ Fix for bug 2081
+
+ ntpd/ntp_util.c@1.98 +18 -5
+ Fix for bug 2081
+
+ChangeSet@1.2864, 2012-12-26 04:12:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P339
+ TAG: NTP_4_2_7P339
+
+ ChangeLog@1.1221 +1 -0
+ NTP_4_2_7P339
+
+ ntpd/invoke-ntp.conf.texi@1.13 +36 -39
+ NTP_4_2_7P339
+
+ ntpd/invoke-ntp.keys.texi@1.13 +2 -3
+ NTP_4_2_7P339
+
+ ntpd/invoke-ntpd.texi@1.329 +3 -4
+ NTP_4_2_7P339
+
+ ntpd/ntp.conf.5man@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.conf.5mdoc@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.conf.html@1.12 +114 -155
+ NTP_4_2_7P339
+
+ ntpd/ntp.conf.man.in@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.conf.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.keys.5man@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.keys.5mdoc@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.keys.html@1.13 +9 -9
+ NTP_4_2_7P339
+
+ ntpd/ntp.keys.man.in@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntp.keys.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntpd-opts.c@1.347 +4 -4
+ NTP_4_2_7P339
+
+ ntpd/ntpd-opts.h@1.347 +3 -3
+ NTP_4_2_7P339
+
+ ntpd/ntpd.1ntpdman@1.158 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntpd.1ntpdmdoc@1.158 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntpd.html@1.7 +123 -177
+ NTP_4_2_7P339
+
+ ntpd/ntpd.man.in@1.158 +2 -2
+ NTP_4_2_7P339
+
+ ntpd/ntpd.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P339
+
+ ntpdc/invoke-ntpdc.texi@1.326 +7 -9
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc-opts.c@1.341 +4 -4
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc-opts.h@1.341 +3 -3
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc.1ntpdcman@1.157 +2 -2
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.157 +2 -2
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc.html@1.170 +77 -603
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc.man.in@1.157 +2 -2
+ NTP_4_2_7P339
+
+ ntpdc/ntpdc.mdoc.in@1.157 +2 -2
+ NTP_4_2_7P339
+
+ ntpq/invoke-ntpq.texi@1.330 +6 -4
+ NTP_4_2_7P339
+
+ ntpq/ntpq-opts.c@1.344 +4 -4
+ NTP_4_2_7P339
+
+ ntpq/ntpq-opts.h@1.344 +3 -3
+ NTP_4_2_7P339
+
+ ntpq/ntpq.1ntpqman@1.158 +2 -260
+ NTP_4_2_7P339
+
+ ntpq/ntpq.1ntpqmdoc@1.158 +3 -246
+ NTP_4_2_7P339
+
+ ntpq/ntpq.html@1.4 +281 -304
+ NTP_4_2_7P339
+
+ ntpq/ntpq.man.in@1.158 +2 -260
+ NTP_4_2_7P339
+
+ ntpq/ntpq.mdoc.in@1.158 +3 -246
+ NTP_4_2_7P339
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.329 +3 -4
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.344 +4 -4
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.344 +3 -3
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.158 +2 -56
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.158 +3 -49
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd.html@1.2 +10 -15
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd.man.in@1.158 +2 -56
+ NTP_4_2_7P339
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.158 +3 -49
+ NTP_4_2_7P339
+
+ packageinfo.sh@1.342 +1 -1
+ NTP_4_2_7P339
+
+ scripts/invoke-ntp-wait.texi@1.146 +2 -1
+ NTP_4_2_7P339
+
+ scripts/ntp-wait.1ntp-waitman@1.157 +2 -2
+ NTP_4_2_7P339
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.157 +1 -1
+ NTP_4_2_7P339
+
+ scripts/ntp-wait.html@1.162 +39 -60
+ NTP_4_2_7P339
+
+ scripts/ntp-wait.man.in@1.157 +2 -2
+ NTP_4_2_7P339
+
+ scripts/ntp-wait.mdoc.in@1.157 +1 -1
+ NTP_4_2_7P339
+
+ sntp/invoke-sntp.texi@1.326 +4 -4
+ NTP_4_2_7P339
+
+ sntp/sntp-opts.c@1.341 +4 -4
+ NTP_4_2_7P339
+
+ sntp/sntp-opts.h@1.341 +3 -3
+ NTP_4_2_7P339
+
+ sntp/sntp.1sntpman@1.161 +2 -2
+ NTP_4_2_7P339
+
+ sntp/sntp.1sntpmdoc@1.161 +2 -2
+ NTP_4_2_7P339
+
+ sntp/sntp.html@1.341 +15 -14
+ NTP_4_2_7P339
+
+ sntp/sntp.man.in@1.161 +2 -2
+ NTP_4_2_7P339
+
+ sntp/sntp.mdoc.in@1.161 +2 -2
+ NTP_4_2_7P339
+
+ util/invoke-ntp-keygen.texi@1.330 +5 -5
+ NTP_4_2_7P339
+
+ util/ntp-keygen-opts.c@1.344 +4 -4
+ NTP_4_2_7P339
+
+ util/ntp-keygen-opts.h@1.344 +3 -3
+ NTP_4_2_7P339
+
+ util/ntp-keygen.1ntp-keygenman@1.158 +2 -2
+ NTP_4_2_7P339
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.158 +2 -2
+ NTP_4_2_7P339
+
+ util/ntp-keygen.html@1.8 +121 -181
+ NTP_4_2_7P339
+
+ util/ntp-keygen.man.in@1.158 +2 -2
+ NTP_4_2_7P339
+
+ util/ntp-keygen.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P339
+
+ChangeSet@1.2860.1.1, 2012-12-25 11:36:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P338
+ TAG: NTP_4_2_7P338
+
+ ChangeLog@1.1217.1.1 +1 -0
+ NTP_4_2_7P338
+
+ ntpd/invoke-ntp.conf.texi@1.12 +118 -160
+ NTP_4_2_7P338
+
+ ntpd/invoke-ntp.keys.texi@1.12 +9 -9
+ NTP_4_2_7P338
+
+ ntpd/invoke-ntpd.texi@1.328 +4 -8
+ NTP_4_2_7P338
+
+ ntpd/ntp.conf.5man@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.conf.5mdoc@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.conf.html@1.11 +1 -1
+ NTP_4_2_7P338
+
+ ntpd/ntp.conf.man.in@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.conf.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.keys.5man@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.keys.5mdoc@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.keys.html@1.12 +1 -1
+ NTP_4_2_7P338
+
+ ntpd/ntp.keys.man.in@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntp.keys.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntpd-opts.c@1.346 +4 -4
+ NTP_4_2_7P338
+
+ ntpd/ntpd-opts.h@1.346 +3 -3
+ NTP_4_2_7P338
+
+ ntpd/ntpd.1ntpdman@1.157 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntpd.1ntpdmdoc@1.157 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntpd.html@1.4.1.1 +1 -1
+ NTP_4_2_7P338
+
+ ntpd/ntpd.man.in@1.157 +2 -2
+ NTP_4_2_7P338
+
+ ntpd/ntpd.mdoc.in@1.157 +2 -2
+ NTP_4_2_7P338
+
+ ntpdc/invoke-ntpdc.texi@1.325 +26 -31
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc-opts.c@1.340 +4 -4
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc-opts.h@1.340 +3 -3
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc.1ntpdcman@1.156 +2 -2
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.156 +2 -2
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc.html@1.167.1.1 +5 -5
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc.man.in@1.156 +2 -2
+ NTP_4_2_7P338
+
+ ntpdc/ntpdc.mdoc.in@1.156 +2 -2
+ NTP_4_2_7P338
+
+ ntpq/invoke-ntpq.texi@1.327.1.1 +7 -7
+ NTP_4_2_7P338
+
+ ntpq/ntpq-opts.c@1.341.1.1 +4 -4
+ NTP_4_2_7P338
+
+ ntpq/ntpq-opts.h@1.341.1.1 +3 -3
+ NTP_4_2_7P338
+
+ ntpq/ntpq.1ntpqman@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpq/ntpq.1ntpqmdoc@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpq/ntpq.html@1.1.1.1 +717 -195
+ NTP_4_2_7P338
+
+ ntpq/ntpq.man.in@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpq/ntpq.mdoc.in@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.326.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.341.1.1 +4 -4
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.341.1.1 +3 -3
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd.man.in@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.155.1.1 +2 -2
+ NTP_4_2_7P338
+
+ packageinfo.sh@1.341 +1 -1
+ NTP_4_2_7P338
+
+ scripts/invoke-ntp-wait.texi@1.145 +3 -3
+ NTP_4_2_7P338
+
+ scripts/ntp-wait.1ntp-waitman@1.156 +2 -2
+ NTP_4_2_7P338
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.156 +2 -2
+ NTP_4_2_7P338
+
+ scripts/ntp-wait.html@1.159.1.1 +3 -3
+ NTP_4_2_7P338
+
+ scripts/ntp-wait.man.in@1.156 +2 -2
+ NTP_4_2_7P338
+
+ scripts/ntp-wait.mdoc.in@1.156 +2 -2
+ NTP_4_2_7P338
+
+ sntp/invoke-sntp.texi@1.325 +2 -2
+ NTP_4_2_7P338
+
+ sntp/sntp-opts.c@1.340 +4 -4
+ NTP_4_2_7P338
+
+ sntp/sntp-opts.h@1.340 +3 -3
+ NTP_4_2_7P338
+
+ sntp/sntp.1sntpman@1.160 +2 -2
+ NTP_4_2_7P338
+
+ sntp/sntp.1sntpmdoc@1.160 +2 -2
+ NTP_4_2_7P338
+
+ sntp/sntp.html@1.340 +2 -2
+ NTP_4_2_7P338
+
+ sntp/sntp.man.in@1.160 +2 -2
+ NTP_4_2_7P338
+
+ sntp/sntp.mdoc.in@1.160 +2 -2
+ NTP_4_2_7P338
+
+ util/invoke-ntp-keygen.texi@1.329 +2 -2
+ NTP_4_2_7P338
+
+ util/ntp-keygen-opts.c@1.343 +4 -4
+ NTP_4_2_7P338
+
+ util/ntp-keygen-opts.h@1.343 +3 -3
+ NTP_4_2_7P338
+
+ util/ntp-keygen.1ntp-keygenman@1.157 +3 -853
+ NTP_4_2_7P338
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.157 +4 -840
+ NTP_4_2_7P338
+
+ util/ntp-keygen.html@1.5.1.1 +210 -230
+ NTP_4_2_7P338
+
+ util/ntp-keygen.man.in@1.157 +3 -853
+ NTP_4_2_7P338
+
+ util/ntp-keygen.mdoc.in@1.157 +4 -840
+ NTP_4_2_7P338
+
+ChangeSet@1.2862, 2012-12-25 11:21:04+00:00, stenn@psp-fb1.ntp.org
+ mdoc2texi fixes: parseQuote, closing of list item tables
+
+ ChangeLog@1.1219 +1 -0
+ mdoc2texi fixes: parseQuote, closing of list item tables
+
+ sntp/ag-tpl/mdoc2texi@1.5 +17 -7
+ mdoc2texi fixes: parseQuote, closing of list item tables
+
+ChangeSet@1.2861, 2012-12-25 11:20:12+00:00, stenn@psp-fb1.ntp.org
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ .point-changed-filelist@1.20 +1 -0
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ChangeLog@1.1218 +1 -0
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpd/ntpd.html@1.5 +171 -121
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpd/ntpd.texi@1.2 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpdc/ntpdc.html@1.168 +598 -71
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpdc/ntpdc.texi@1.4 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/invoke-ntpq.texi@1.328 +9 -8
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq-opts.c@1.342 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq-opts.h@1.342 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.1ntpqman@1.156 +260 -2
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.1ntpqmdoc@1.156 +246 -3
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.html@1.2 +662 -131
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.man.in@1.156 +260 -2
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.mdoc.in@1.156 +246 -3
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpq/ntpq.texi@1.3 +16 -21
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/Makefile.am@1.38 +12 -0
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.327 +61 -2
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.342 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.5 +47 -3
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.342 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.156 +60 -3
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.156 +53 -4
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd.html@1.1 +84 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpsnmpd/ntpsnmpd.html
+
+ ntpsnmpd/ntpsnmpd.html@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.man.in@1.156 +60 -3
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.156 +53 -4
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ ntpsnmpd/ntpsnmpd.texi@1.1 +53 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpsnmpd/ntpsnmpd.texi
+
+ ntpsnmpd/ntpsnmpd.texi@1.0 +0 -0
+
+ scripts/ntp-wait.html@1.160 +59 -37
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ scripts/ntp-wait.texi@1.4 +1 -1
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ util/ntp-keygen.html@1.6 +429 -383
+ ntp-wait, ntpd, ntpdc, ntpq, ntpsnmpd autogen documentation updates
+
+ChangeSet@1.2860, 2012-12-25 05:14:20+00:00, stenn@psp-fb1.ntp.org
+ mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ
+
+ ChangeLog@1.1217 +1 -0
+ mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ
+
+ sntp/ag-tpl/mdoc2texi@1.4 +71 -10
+ mdoc2texi fixes: Handle_ArCmFlIc, Handle_Fn, HandleQ.
+
+ChangeSet@1.2859, 2012-12-25 05:09:53+00:00, stenn@psp-fb1.ntp.org
+ ntp-keygen autogen documentation updates
+
+ ChangeLog@1.1216 +1 -0
+ ntp-keygen autogen documentation updates
+
+ ntpq/ntpq.html@1.1 +902 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpq/ntpq.html
+
+ ntpq/ntpq.html@1.0 +0 -0
+
+ util/invoke-ntp-keygen.texi@1.328 +82 -135
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen-opts.c@1.342 +1 -1
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen-opts.def@1.23 +31 -26
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen-opts.h@1.342 +1 -1
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen.1ntp-keygenman@1.156 +867 -16
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.156 +854 -17
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen.man.in@1.156 +867 -16
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen.mdoc.in@1.156 +854 -17
+ ntp-keygen autogen documentation updates
+
+ util/ntp-keygen.texi@1.2 +115 -82
+ ntp-keygen autogen documentation updates
+
+ChangeSet@1.2858, 2012-12-24 08:51:47+00:00, stenn@psp-fb1.ntp.org
+ ntpq autogen docs
+
+ .point-changed-filelist@1.19 +1 -0
+ ntpq autogen docs.
+
+ ChangeLog@1.1215 +1 -0
+ ntpq autogen docs.
+
+ ntpq/Makefile.am@1.69 +14 -0
+ ntpq autogen docs
+
+ ntpq/invoke-ntpq.texi@1.327 +1 -1
+ ntpq autogen docs
+
+ ntpq/ntpq.texi@1.2 +29 -18
+ ntpq autogen docs
+
+ ntpq/ntpq.texi@1.1 +851 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpq/ntpq.texi
+
+ ntpq/ntpq.texi@1.0 +0 -0
+
+ChangeSet@1.2857, 2012-12-22 11:54:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P337
+ TAG: NTP_4_2_7P337
+
+ ChangeLog@1.1214 +1 -0
+ NTP_4_2_7P337
+
+ ntpd/invoke-ntp.conf.texi@1.11 +1 -1
+ NTP_4_2_7P337
+
+ ntpd/invoke-ntp.keys.texi@1.11 +1 -1
+ NTP_4_2_7P337
+
+ ntpd/invoke-ntpd.texi@1.327 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.conf.5man@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.conf.5mdoc@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.conf.html@1.10 +1 -1
+ NTP_4_2_7P337
+
+ ntpd/ntp.conf.man.in@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.conf.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.keys.5man@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.keys.5mdoc@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.keys.html@1.11 +1 -1
+ NTP_4_2_7P337
+
+ ntpd/ntp.keys.man.in@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntp.keys.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntpd-opts.c@1.345 +4 -4
+ NTP_4_2_7P337
+
+ ntpd/ntpd-opts.h@1.345 +3 -3
+ NTP_4_2_7P337
+
+ ntpd/ntpd.1ntpdman@1.156 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntpd.1ntpdmdoc@1.156 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntpd.html@1.4 +1 -1
+ NTP_4_2_7P337
+
+ ntpd/ntpd.man.in@1.156 +2 -2
+ NTP_4_2_7P337
+
+ ntpd/ntpd.mdoc.in@1.156 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/invoke-ntpdc.texi@1.324 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc-opts.c@1.339 +4 -4
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc-opts.h@1.339 +3 -3
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc.1ntpdcman@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc.html@1.167 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc.man.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpdc/ntpdc.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpq/invoke-ntpq.texi@1.326 +2 -2
+ NTP_4_2_7P337
+
+ ntpq/ntpq-opts.c@1.341 +4 -4
+ NTP_4_2_7P337
+
+ ntpq/ntpq-opts.h@1.341 +3 -3
+ NTP_4_2_7P337
+
+ ntpq/ntpq.1ntpqman@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpq/ntpq.1ntpqmdoc@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpq/ntpq.man.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpq/ntpq.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.326 +2 -2
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.341 +4 -4
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.341 +3 -3
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd.man.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ packageinfo.sh@1.340 +1 -1
+ NTP_4_2_7P337
+
+ scripts/invoke-ntp-wait.texi@1.144 +1 -1
+ NTP_4_2_7P337
+
+ scripts/ntp-wait.1ntp-waitman@1.155 +2 -2
+ NTP_4_2_7P337
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.155 +2 -2
+ NTP_4_2_7P337
+
+ scripts/ntp-wait.html@1.159 +1 -1
+ NTP_4_2_7P337
+
+ scripts/ntp-wait.man.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ scripts/ntp-wait.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ sntp/invoke-sntp.texi@1.324 +2 -2
+ NTP_4_2_7P337
+
+ sntp/sntp-opts.c@1.339 +4 -4
+ NTP_4_2_7P337
+
+ sntp/sntp-opts.h@1.339 +3 -3
+ NTP_4_2_7P337
+
+ sntp/sntp.1sntpman@1.159 +2 -2
+ NTP_4_2_7P337
+
+ sntp/sntp.1sntpmdoc@1.159 +2 -2
+ NTP_4_2_7P337
+
+ sntp/sntp.html@1.339 +2 -2
+ NTP_4_2_7P337
+
+ sntp/sntp.man.in@1.159 +2 -2
+ NTP_4_2_7P337
+
+ sntp/sntp.mdoc.in@1.159 +2 -2
+ NTP_4_2_7P337
+
+ util/invoke-ntp-keygen.texi@1.327 +2 -2
+ NTP_4_2_7P337
+
+ util/ntp-keygen-opts.c@1.341 +4 -4
+ NTP_4_2_7P337
+
+ util/ntp-keygen-opts.h@1.341 +3 -3
+ NTP_4_2_7P337
+
+ util/ntp-keygen.1ntp-keygenman@1.155 +2 -2
+ NTP_4_2_7P337
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.155 +2 -2
+ NTP_4_2_7P337
+
+ util/ntp-keygen.html@1.5 +2 -2
+ NTP_4_2_7P337
+
+ util/ntp-keygen.man.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ util/ntp-keygen.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P337
+
+ChangeSet@1.2856, 2012-12-22 06:35:37-05:00, stenn@deacon.udel.edu
+ [Bug 1223] More final cleanup for rlimit changes
+
+ ChangeLog@1.1213 +1 -0
+ [Bug 1223] More final cleanup for rlimit changes
+
+ ntpd/ntp_config.c@1.309 +2 -2
+ [Bug 1223] More final cleanup for rlimit changes
+
+ChangeSet@1.2855, 2012-12-21 23:25:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P336
+ TAG: NTP_4_2_7P336
+
+ ChangeLog@1.1212 +1 -0
+ NTP_4_2_7P336
+
+ ntpd/invoke-ntp.conf.texi@1.10 +1 -1
+ NTP_4_2_7P336
+
+ ntpd/invoke-ntp.keys.texi@1.10 +1 -1
+ NTP_4_2_7P336
+
+ ntpd/invoke-ntpd.texi@1.326 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.conf.5man@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.conf.5mdoc@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.conf.html@1.9 +552 -1862
+ NTP_4_2_7P336
+
+ ntpd/ntp.conf.man.in@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.conf.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.keys.5man@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.keys.5mdoc@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.keys.html@1.10 +13 -149
+ NTP_4_2_7P336
+
+ ntpd/ntp.keys.man.in@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntp.keys.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntpd-opts.c@1.344 +4 -4
+ NTP_4_2_7P336
+
+ ntpd/ntpd-opts.h@1.344 +3 -3
+ NTP_4_2_7P336
+
+ ntpd/ntpd.1ntpdman@1.155 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntpd.1ntpdmdoc@1.155 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntpd.html@1.3 +116 -126
+ NTP_4_2_7P336
+
+ ntpd/ntpd.man.in@1.155 +2 -2
+ NTP_4_2_7P336
+
+ ntpd/ntpd.mdoc.in@1.155 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/invoke-ntpdc.texi@1.323 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc-opts.c@1.338 +4 -4
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc-opts.h@1.338 +3 -3
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc.1ntpdcman@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc.html@1.166 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc.man.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpdc/ntpdc.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpq/invoke-ntpq.texi@1.325 +2 -2
+ NTP_4_2_7P336
+
+ ntpq/ntpq-opts.c@1.340 +4 -4
+ NTP_4_2_7P336
+
+ ntpq/ntpq-opts.h@1.340 +3 -3
+ NTP_4_2_7P336
+
+ ntpq/ntpq.1ntpqman@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpq/ntpq.1ntpqmdoc@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpq/ntpq.man.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpq/ntpq.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.325 +2 -2
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.340 +4 -4
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.340 +3 -3
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd.man.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ packageinfo.sh@1.339 +1 -1
+ NTP_4_2_7P336
+
+ scripts/invoke-ntp-wait.texi@1.143 +1 -1
+ NTP_4_2_7P336
+
+ scripts/ntp-wait.1ntp-waitman@1.154 +2 -2
+ NTP_4_2_7P336
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.154 +2 -2
+ NTP_4_2_7P336
+
+ scripts/ntp-wait.html@1.158 +1 -1
+ NTP_4_2_7P336
+
+ scripts/ntp-wait.man.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ scripts/ntp-wait.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ sntp/invoke-sntp.texi@1.323 +2 -2
+ NTP_4_2_7P336
+
+ sntp/sntp-opts.c@1.338 +4 -4
+ NTP_4_2_7P336
+
+ sntp/sntp-opts.h@1.338 +3 -3
+ NTP_4_2_7P336
+
+ sntp/sntp.1sntpman@1.158 +2 -2
+ NTP_4_2_7P336
+
+ sntp/sntp.1sntpmdoc@1.158 +2 -2
+ NTP_4_2_7P336
+
+ sntp/sntp.html@1.338 +2 -2
+ NTP_4_2_7P336
+
+ sntp/sntp.man.in@1.158 +2 -2
+ NTP_4_2_7P336
+
+ sntp/sntp.mdoc.in@1.158 +2 -2
+ NTP_4_2_7P336
+
+ util/invoke-ntp-keygen.texi@1.326 +2 -2
+ NTP_4_2_7P336
+
+ util/ntp-keygen-opts.c@1.340 +4 -4
+ NTP_4_2_7P336
+
+ util/ntp-keygen-opts.h@1.340 +3 -3
+ NTP_4_2_7P336
+
+ util/ntp-keygen.1ntp-keygenman@1.154 +2 -2
+ NTP_4_2_7P336
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.154 +2 -2
+ NTP_4_2_7P336
+
+ util/ntp-keygen.html@1.4 +181 -293
+ NTP_4_2_7P336
+
+ util/ntp-keygen.man.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ util/ntp-keygen.mdoc.in@1.154 +2 -2
+ NTP_4_2_7P336
+
+ChangeSet@1.2854, 2012-12-21 05:41:54-05:00, stenn@deacon.udel.edu
+ [Bug 1223] Final cleanup for rlimit changes
+
+ ChangeLog@1.1211 +1 -0
+ [Bug 1223] Final cleanup for rlimit changes
+
+ ntpd/ntpd.c@1.140 +3 -2
+ [Bug 1223] Final cleanup for rlimit changes
+
+ChangeSet@1.2853, 2012-12-18 09:00:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P335
+ TAG: NTP_4_2_7P335
+
+ ChangeLog@1.1210 +1 -0
+ NTP_4_2_7P335
+
+ ntpd/invoke-ntp.conf.texi@1.9 +410 -1484
+ NTP_4_2_7P335
+
+ ntpd/invoke-ntp.keys.texi@1.9 +13 -118
+ NTP_4_2_7P335
+
+ ntpd/invoke-ntpd.texi@1.325 +87 -127
+ NTP_4_2_7P335
+
+ ntpd/ntp.conf.5man@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.conf.5mdoc@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.conf.html@1.8 +5 -4
+ NTP_4_2_7P335
+
+ ntpd/ntp.conf.man.in@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.conf.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.keys.5man@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.keys.5mdoc@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.keys.html@1.9 +5 -4
+ NTP_4_2_7P335
+
+ ntpd/ntp.keys.man.in@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntp.keys.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P335
+
+ ntpd/ntpd-opts.c@1.343 +4 -4
+ NTP_4_2_7P335
+
+ ntpd/ntpd-opts.h@1.343 +3 -3
+ NTP_4_2_7P335
+
+ ntpd/ntpd.1ntpdman@1.154 +43 -47
+ NTP_4_2_7P335
+
+ ntpd/ntpd.1ntpdmdoc@1.154 +43 -47
+ NTP_4_2_7P335
+
+ ntpd/ntpd.html@1.2 +97 -139
+ NTP_4_2_7P335
+
+ ntpd/ntpd.man.in@1.154 +43 -47
+ NTP_4_2_7P335
+
+ ntpd/ntpd.mdoc.in@1.154 +43 -47
+ NTP_4_2_7P335
+
+ ntpdc/invoke-ntpdc.texi@1.322 +89 -299
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc-opts.c@1.337 +4 -4
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc-opts.h@1.337 +3 -3
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc.1ntpdcman@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc.html@1.165 +26 -725
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc.man.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpdc/ntpdc.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpq/invoke-ntpq.texi@1.324 +27 -83
+ NTP_4_2_7P335
+
+ ntpq/ntpq-opts.c@1.339 +4 -4
+ NTP_4_2_7P335
+
+ ntpq/ntpq-opts.h@1.339 +3 -3
+ NTP_4_2_7P335
+
+ ntpq/ntpq.1ntpqman@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpq/ntpq.1ntpqmdoc@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpq/ntpq.man.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpq/ntpq.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.324 +2 -5
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.339 +4 -4
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.339 +3 -3
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd.man.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ packageinfo.sh@1.338 +1 -1
+ NTP_4_2_7P335
+
+ scripts/invoke-ntp-wait.texi@1.142 +3 -10
+ NTP_4_2_7P335
+
+ scripts/ntp-wait.1ntp-waitman@1.153 +2 -2
+ NTP_4_2_7P335
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.153 +2 -2
+ NTP_4_2_7P335
+
+ scripts/ntp-wait.html@1.157 +16 -52
+ NTP_4_2_7P335
+
+ scripts/ntp-wait.man.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ scripts/ntp-wait.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ sntp/invoke-sntp.texi@1.322 +14 -57
+ NTP_4_2_7P335
+
+ sntp/sntp-opts.c@1.337 +4 -4
+ NTP_4_2_7P335
+
+ sntp/sntp-opts.h@1.337 +3 -3
+ NTP_4_2_7P335
+
+ sntp/sntp.1sntpman@1.157 +2 -2
+ NTP_4_2_7P335
+
+ sntp/sntp.1sntpmdoc@1.157 +2 -2
+ NTP_4_2_7P335
+
+ sntp/sntp.html@1.337 +15 -58
+ NTP_4_2_7P335
+
+ sntp/sntp.man.in@1.157 +2 -2
+ NTP_4_2_7P335
+
+ sntp/sntp.mdoc.in@1.157 +2 -2
+ NTP_4_2_7P335
+
+ util/invoke-ntp-keygen.texi@1.325 +107 -254
+ NTP_4_2_7P335
+
+ util/ntp-keygen-opts.c@1.339 +4 -4
+ NTP_4_2_7P335
+
+ util/ntp-keygen-opts.h@1.339 +3 -3
+ NTP_4_2_7P335
+
+ util/ntp-keygen.1ntp-keygenman@1.153 +2 -2
+ NTP_4_2_7P335
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.153 +2 -2
+ NTP_4_2_7P335
+
+ util/ntp-keygen.html@1.3 +152 -2
+ NTP_4_2_7P335
+
+ util/ntp-keygen.man.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ util/ntp-keygen.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P335
+
+ChangeSet@1.2852, 2012-12-17 05:34:02-05:00, stenn@deacon.udel.edu
+ nothing
+
+ ChangeLog@1.1209 +0 -0
+ nothing
+
+ChangeSet@1.2851, 2012-12-17 09:43:26+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ sntp/ag-tpl/agtexi-file.tpl@1.3 +5 -2
+ Update documentation templates and definitions
+
+ChangeSet@1.2850, 2012-12-16 10:32:46+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ sntp/ag-tpl/mdoc2texi@1.3 +22 -5
+ Update documentation templates and definitions
+
+ChangeSet@1.2849, 2012-12-16 09:50:14+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ sntp/ag-tpl/mdoc2texi@1.2 +121 -10
+ Update documentation templates and definitions
+
+ChangeSet@1.2848, 2012-12-16 05:08:04+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ ntpd/ntpd.html@1.1 +1655 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntpd.html
+
+ ntpd/ntpd.html@1.0 +0 -0
+
+ ntpd/ntpdbase-opts.def@1.25 +45 -45
+ Update documentation templates and definitions
+
+ sntp/ag-tpl/mdoc2texi@1.1 +529 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/ag-tpl/mdoc2texi
+
+ sntp/ag-tpl/mdoc2texi@1.0 +0 -0
+
+ChangeSet@1.2847, 2012-12-12 09:52:10+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ .point-changed-filelist@1.18 +1 -0
+ Update documentation templates and definitions
+
+ ntpd/Makefile.am@1.127 +6 -0
+ Update documentation templates and definitions
+
+ ntpd/ntpd.texi@1.1 +113 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntpd.texi
+
+ ntpd/ntpd.texi@1.0 +0 -0
+
+ChangeSet@1.2846, 2012-12-12 08:13:15+00:00, stenn@psp-fb1.ntp.org
+ Update documentation templates and definitions
+
+ ChangeLog@1.1208 +1 -0
+ Update documentation templates and definitions
+
+ ntpd/invoke-ntp.conf.menu@1.2 +1 -1
+ Update documentation templates and definitions
+
+ ntpd/invoke-ntp.keys.menu@1.2 +1 -1
+ Update documentation templates and definitions
+
+ ntpd/ntp.conf.texi@1.4 +3 -3
+ Update documentation templates and definitions
+
+ ntpd/ntp.keys.texi@1.4 +3 -3
+ Update documentation templates and definitions
+
+ scripts/ntp-wait.texi@1.3 +15 -45
+ Update documentation templates and definitions
+
+ sntp/ag-tpl/agtexi-file.tpl@1.2 +0 -559
+ Update documentation templates and definitions
+
+ChangeSet@1.2845, 2012-12-11 05:37:07-05:00, stenn@psp-deb1.ntp.org
+ Create agtexi-file.tpl
+
+ ChangeLog@1.1207 +1 -0
+ Create agtexi-file.tpl
+
+ ntpd/Makefile.am@1.126 +2 -2
+ Create agtexi-file.tpl
+
+ sntp/ag-tpl/agtexi-file.tpl@1.1 +884 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/sntp/ag-tpl/agtexi-file.tpl
+
+ sntp/ag-tpl/agtexi-file.tpl@1.0 +0 -0
+
+ChangeSet@1.2844, 2012-12-10 11:42:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P334
+ TAG: NTP_4_2_7P334
+
+ ChangeLog@1.1206 +1 -0
+ NTP_4_2_7P334
+
+ ntpd/invoke-ntp.conf.texi@1.8 +1 -1
+ NTP_4_2_7P334
+
+ ntpd/invoke-ntp.keys.texi@1.8 +1 -1
+ NTP_4_2_7P334
+
+ ntpd/invoke-ntpd.texi@1.324 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.conf.5man@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.conf.5mdoc@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.conf.html@1.7 +1 -1
+ NTP_4_2_7P334
+
+ ntpd/ntp.conf.man.in@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.conf.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.keys.5man@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.keys.5mdoc@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.keys.html@1.8 +1 -1
+ NTP_4_2_7P334
+
+ ntpd/ntp.keys.man.in@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntp.keys.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntpd-opts.c@1.342 +4 -4
+ NTP_4_2_7P334
+
+ ntpd/ntpd-opts.h@1.342 +3 -3
+ NTP_4_2_7P334
+
+ ntpd/ntpd.1ntpdman@1.153 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntpd.1ntpdmdoc@1.153 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntpd.man.in@1.153 +2 -2
+ NTP_4_2_7P334
+
+ ntpd/ntpd.mdoc.in@1.153 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/invoke-ntpdc.texi@1.321 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc-opts.c@1.336 +4 -4
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc-opts.h@1.336 +3 -3
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc.1ntpdcman@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc.html@1.164 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc.man.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpdc/ntpdc.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpq/invoke-ntpq.texi@1.323 +2 -2
+ NTP_4_2_7P334
+
+ ntpq/ntpq-opts.c@1.338 +4 -4
+ NTP_4_2_7P334
+
+ ntpq/ntpq-opts.h@1.338 +3 -3
+ NTP_4_2_7P334
+
+ ntpq/ntpq.1ntpqman@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpq/ntpq.1ntpqmdoc@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpq/ntpq.man.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpq/ntpq.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.323 +2 -2
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.338 +4 -4
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.338 +3 -3
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd.man.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ packageinfo.sh@1.337 +1 -1
+ NTP_4_2_7P334
+
+ scripts/invoke-ntp-wait.texi@1.141 +1 -1
+ NTP_4_2_7P334
+
+ scripts/ntp-wait.1ntp-waitman@1.152 +2 -2
+ NTP_4_2_7P334
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.152 +2 -2
+ NTP_4_2_7P334
+
+ scripts/ntp-wait.html@1.156 +1 -1
+ NTP_4_2_7P334
+
+ scripts/ntp-wait.man.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ scripts/ntp-wait.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ sntp/invoke-sntp.texi@1.321 +2 -2
+ NTP_4_2_7P334
+
+ sntp/sntp-opts.c@1.336 +4 -4
+ NTP_4_2_7P334
+
+ sntp/sntp-opts.h@1.336 +3 -3
+ NTP_4_2_7P334
+
+ sntp/sntp.1sntpman@1.156 +2 -2
+ NTP_4_2_7P334
+
+ sntp/sntp.1sntpmdoc@1.156 +2 -2
+ NTP_4_2_7P334
+
+ sntp/sntp.html@1.336 +2 -2
+ NTP_4_2_7P334
+
+ sntp/sntp.man.in@1.156 +2 -2
+ NTP_4_2_7P334
+
+ sntp/sntp.mdoc.in@1.156 +2 -2
+ NTP_4_2_7P334
+
+ util/invoke-ntp-keygen.texi@1.324 +154 -2
+ NTP_4_2_7P334
+
+ util/ntp-keygen-opts.c@1.338 +4 -4
+ NTP_4_2_7P334
+
+ util/ntp-keygen-opts.h@1.338 +3 -3
+ NTP_4_2_7P334
+
+ util/ntp-keygen.1ntp-keygenman@1.152 +2 -2
+ NTP_4_2_7P334
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.152 +2 -2
+ NTP_4_2_7P334
+
+ util/ntp-keygen.html@1.2 +115 -174
+ NTP_4_2_7P334
+
+ util/ntp-keygen.man.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ util/ntp-keygen.mdoc.in@1.152 +2 -2
+ NTP_4_2_7P334
+
+ChangeSet@1.2843, 2012-12-10 04:25:24-05:00, stenn@psp-deb1.ntp.org
+ [Bug 2114] Update tests for sntp's synch distance
+
+ ChangeLog@1.1205 +1 -0
+ [Bug 2114] Update tests for sntp's synch distance
+
+ sntp/tests/packetHandling.cpp@1.10 +3 -2
+ [Bug 2114] Update tests for sntp's synch distance
+
+ChangeSet@1.2842, 2012-12-10 04:23:36-05:00, stenn@psp-deb1.ntp.org
+ Create ntp-keygen.{html,texi}
+
+ .point-changed-filelist@1.17 +1 -0
+ Create ntp-keygen.{html,texi}
+
+ ChangeLog@1.1204 +1 -0
+ Create ntp-keygen.{html,texi}
+
+ util/Makefile.am@1.74 +11 -0
+ Create ntp-keygen.{html,texi}
+
+ util/ntp-keygen-opts.def@1.22 +130 -0
+ Create ntp-keygen.{html,texi}
+
+ util/ntp-keygen.html@1.1 +1874 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/util/ntp-keygen.html
+
+ util/ntp-keygen.html@1.0 +0 -0
+
+ util/ntp-keygen.texi@1.1 +274 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/util/ntp-keygen.texi
+
+ util/ntp-keygen.texi@1.0 +0 -0
+
+ChangeSet@1.2841, 2012-12-07 11:33:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P333
+ TAG: NTP_4_2_7P333
+
+ ChangeLog@1.1203 +1 -0
+ NTP_4_2_7P333
+
+ ntpd/invoke-ntp.conf.texi@1.7 +1 -1
+ NTP_4_2_7P333
+
+ ntpd/invoke-ntp.keys.texi@1.7 +1 -1
+ NTP_4_2_7P333
+
+ ntpd/invoke-ntpd.texi@1.323 +2 -2
+ NTP_4_2_7P333
+
+ ntpd/ntp.conf.5man@1.41 +3 -2877
+ NTP_4_2_7P333
+
+ ntpd/ntp.conf.5mdoc@1.41 +3 -2709
+ NTP_4_2_7P333
+
+ ntpd/ntp.conf.html@1.6 +168 -187
+ NTP_4_2_7P333
+
+ ntpd/ntp.conf.man.in@1.41 +3 -2877
+ NTP_4_2_7P333
+
+ ntpd/ntp.conf.mdoc.in@1.41 +3 -2709
+ NTP_4_2_7P333
+
+ ntpd/ntp.keys.5man@1.41 +2 -95
+ NTP_4_2_7P333
+
+ ntpd/ntp.keys.5mdoc@1.41 +2 -94
+ NTP_4_2_7P333
+
+ ntpd/ntp.keys.html@1.7 +36 -53
+ NTP_4_2_7P333
+
+ ntpd/ntp.keys.man.in@1.41 +2 -95
+ NTP_4_2_7P333
+
+ ntpd/ntp.keys.mdoc.in@1.41 +2 -94
+ NTP_4_2_7P333
+
+ ntpd/ntpd-opts.c@1.341 +4 -4
+ NTP_4_2_7P333
+
+ ntpd/ntpd-opts.h@1.341 +3 -3
+ NTP_4_2_7P333
+
+ ntpd/ntpd.1ntpdman@1.152 +3 -549
+ NTP_4_2_7P333
+
+ ntpd/ntpd.1ntpdmdoc@1.152 +3 -548
+ NTP_4_2_7P333
+
+ ntpd/ntpd.man.in@1.152 +3 -549
+ NTP_4_2_7P333
+
+ ntpd/ntpd.mdoc.in@1.152 +3 -548
+ NTP_4_2_7P333
+
+ ntpdc/invoke-ntpdc.texi@1.320 +2 -2
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc-opts.c@1.335 +4 -4
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc-opts.h@1.335 +3 -3
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc.1ntpdcman@1.151 +3 -704
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.151 +3 -659
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc.html@1.163 +98 -118
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc.man.in@1.151 +3 -704
+ NTP_4_2_7P333
+
+ ntpdc/ntpdc.mdoc.in@1.151 +3 -659
+ NTP_4_2_7P333
+
+ ntpq/invoke-ntpq.texi@1.322 +2 -2
+ NTP_4_2_7P333
+
+ ntpq/ntpq-opts.c@1.337 +4 -4
+ NTP_4_2_7P333
+
+ ntpq/ntpq-opts.h@1.337 +3 -3
+ NTP_4_2_7P333
+
+ ntpq/ntpq.1ntpqman@1.151 +2 -260
+ NTP_4_2_7P333
+
+ ntpq/ntpq.1ntpqmdoc@1.151 +2 -245
+ NTP_4_2_7P333
+
+ ntpq/ntpq.man.in@1.151 +2 -260
+ NTP_4_2_7P333
+
+ ntpq/ntpq.mdoc.in@1.151 +2 -245
+ NTP_4_2_7P333
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.322 +2 -2
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.337 +4 -4
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.337 +3 -3
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.151 +2 -4
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.151 +2 -4
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd.man.in@1.151 +2 -4
+ NTP_4_2_7P333
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.151 +2 -4
+ NTP_4_2_7P333
+
+ packageinfo.sh@1.336 +1 -1
+ NTP_4_2_7P333
+
+ scripts/invoke-ntp-wait.texi@1.140 +3 -3
+ NTP_4_2_7P333
+
+ scripts/ntp-wait.1ntp-waitman@1.151 +2 -19
+ NTP_4_2_7P333
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.151 +2 -19
+ NTP_4_2_7P333
+
+ scripts/ntp-wait.html@1.155 +42 -65
+ NTP_4_2_7P333
+
+ scripts/ntp-wait.man.in@1.151 +2 -19
+ NTP_4_2_7P333
+
+ scripts/ntp-wait.mdoc.in@1.151 +2 -19
+ NTP_4_2_7P333
+
+ sntp/invoke-sntp.texi@1.320 +2 -2
+ NTP_4_2_7P333
+
+ sntp/sntp-opts.c@1.335 +4 -4
+ NTP_4_2_7P333
+
+ sntp/sntp-opts.h@1.335 +3 -3
+ NTP_4_2_7P333
+
+ sntp/sntp.1sntpman@1.155 +2 -66
+ NTP_4_2_7P333
+
+ sntp/sntp.1sntpmdoc@1.155 +2 -66
+ NTP_4_2_7P333
+
+ sntp/sntp.html@1.335 +91 -116
+ NTP_4_2_7P333
+
+ sntp/sntp.man.in@1.155 +2 -66
+ NTP_4_2_7P333
+
+ sntp/sntp.mdoc.in@1.155 +2 -66
+ NTP_4_2_7P333
+
+ util/invoke-ntp-keygen.texi@1.323 +2 -2
+ NTP_4_2_7P333
+
+ util/ntp-keygen-opts.c@1.337 +4 -4
+ NTP_4_2_7P333
+
+ util/ntp-keygen-opts.h@1.337 +3 -3
+ NTP_4_2_7P333
+
+ util/ntp-keygen.1ntp-keygenman@1.151 +3 -721
+ NTP_4_2_7P333
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.151 +3 -707
+ NTP_4_2_7P333
+
+ util/ntp-keygen.man.in@1.151 +3 -721
+ NTP_4_2_7P333
+
+ util/ntp-keygen.mdoc.in@1.151 +3 -707
+ NTP_4_2_7P333
+
+ChangeSet@1.2840, 2012-12-07 09:56:25+00:00, stenn@psp-fb1.ntp.org
+ Autogen documentation cleanup
+
+ ChangeLog@1.1202 +1 -0
+ Autogen documentation cleanup
+
+ ntpd/invoke-ntp.conf.texi@1.6 +3 -2
+ Autogen documentation cleanup
+
+ ntpd/invoke-ntp.keys.texi@1.6 +3 -2
+ Autogen documentation cleanup
+
+ ntpd/invoke-ntpd.texi@1.322 +2 -1
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.5man@1.40 +2877 -3
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.5mdoc@1.40 +2710 -4
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.def@1.4 +2 -1
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.html@1.5 +185 -165
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.man.in@1.40 +2877 -3
+ Autogen documentation cleanup
+
+ ntpd/ntp.conf.mdoc.in@1.40 +2710 -4
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.5man@1.40 +95 -2
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.5mdoc@1.40 +95 -3
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.def@1.8 +2 -1
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.html@1.6 +51 -33
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.man.in@1.40 +95 -2
+ Autogen documentation cleanup
+
+ ntpd/ntp.keys.mdoc.in@1.40 +95 -3
+ Autogen documentation cleanup
+
+ ntpd/ntpd-opts.c@1.340 +1 -1
+ Autogen documentation cleanup
+
+ ntpd/ntpd-opts.def@1.8 +1 -0
+ Autogen documentation cleanup
+
+ ntpd/ntpd-opts.h@1.340 +1 -1
+ Autogen documentation cleanup
+
+ ntpd/ntpd.1ntpdman@1.151 +549 -3
+ Autogen documentation cleanup
+
+ ntpd/ntpd.1ntpdmdoc@1.151 +549 -4
+ Autogen documentation cleanup
+
+ ntpd/ntpd.man.in@1.151 +549 -3
+ Autogen documentation cleanup
+
+ ntpd/ntpd.mdoc.in@1.151 +549 -4
+ Autogen documentation cleanup
+
+ ntpdc/invoke-ntpdc.texi@1.319 +1 -1
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc-opts.c@1.334 +1 -1
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc-opts.h@1.334 +1 -1
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc.1ntpdcman@1.150 +704 -3
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.150 +660 -4
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc.html@1.162 +116 -96
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc.man.in@1.150 +704 -3
+ Autogen documentation cleanup
+
+ ntpdc/ntpdc.mdoc.in@1.150 +660 -4
+ Autogen documentation cleanup
+
+ ntpq/invoke-ntpq.texi@1.321 +1 -1
+ Autogen documentation cleanup
+
+ ntpq/ntpq-opts.c@1.336 +1 -1
+ Autogen documentation cleanup
+
+ ntpq/ntpq-opts.h@1.336 +1 -1
+ Autogen documentation cleanup
+
+ ntpq/ntpq.1ntpqman@1.150 +260 -2
+ Autogen documentation cleanup
+
+ ntpq/ntpq.1ntpqmdoc@1.150 +246 -3
+ Autogen documentation cleanup
+
+ ntpq/ntpq.man.in@1.150 +260 -2
+ Autogen documentation cleanup
+
+ ntpq/ntpq.mdoc.in@1.150 +246 -3
+ Autogen documentation cleanup
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.321 +5 -1
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.336 +1 -1
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.4 +1 -2
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.336 +1 -1
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.150 +6 -3
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.150 +7 -4
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd.man.in@1.150 +6 -3
+ Autogen documentation cleanup
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.150 +7 -4
+ Autogen documentation cleanup
+
+ scripts/invoke-ntp-wait.texi@1.139 +7 -3
+ Autogen documentation cleanup
+
+ scripts/ntp-wait-opts.def@1.5 +9 -1
+ Autogen documentation cleanup
+
+ scripts/ntp-wait.1ntp-waitman@1.150 +21 -3
+ Autogen documentation cleanup
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.150 +22 -4
+ Autogen documentation cleanup
+
+ scripts/ntp-wait.html@1.154 +74 -39
+ Autogen documentation cleanup
+
+ scripts/ntp-wait.man.in@1.150 +21 -3
+ Autogen documentation cleanup
+
+ scripts/ntp-wait.mdoc.in@1.150 +22 -4
+ Autogen documentation cleanup
+
+ sntp/invoke-sntp.texi@1.319 +1 -1
+ Autogen documentation cleanup
+
+ sntp/sntp-opts.c@1.334 +1 -1
+ Autogen documentation cleanup
+
+ sntp/sntp-opts.h@1.334 +1 -1
+ Autogen documentation cleanup
+
+ sntp/sntp.1sntpman@1.154 +66 -2
+ Autogen documentation cleanup
+
+ sntp/sntp.1sntpmdoc@1.154 +67 -3
+ Autogen documentation cleanup
+
+ sntp/sntp.html@1.334 +114 -89
+ Autogen documentation cleanup
+
+ sntp/sntp.man.in@1.154 +66 -2
+ Autogen documentation cleanup
+
+ sntp/sntp.mdoc.in@1.154 +67 -3
+ Autogen documentation cleanup
+
+ util/invoke-ntp-keygen.texi@1.322 +2 -1
+ Autogen documentation cleanup
+
+ util/ntp-keygen-opts.c@1.336 +1 -1
+ Autogen documentation cleanup
+
+ util/ntp-keygen-opts.def@1.21 +1 -0
+ Autogen documentation cleanup
+
+ util/ntp-keygen-opts.h@1.336 +1 -1
+ Autogen documentation cleanup
+
+ util/ntp-keygen.1ntp-keygenman@1.150 +721 -3
+ Autogen documentation cleanup
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.150 +708 -4
+ Autogen documentation cleanup
+
+ util/ntp-keygen.man.in@1.150 +721 -3
+ Autogen documentation cleanup
+
+ util/ntp-keygen.mdoc.in@1.150 +708 -4
+ Autogen documentation cleanup
+
+ChangeSet@1.2839, 2012-12-06 07:46:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P332
+ TAG: NTP_4_2_7P332
+
+ ChangeLog@1.1201 +1 -0
+ NTP_4_2_7P332
+
+ ntpd/invoke-ntp.conf.texi@1.5 +1 -1
+ NTP_4_2_7P332
+
+ ntpd/invoke-ntp.keys.texi@1.5 +1 -1
+ NTP_4_2_7P332
+
+ ntpd/invoke-ntpd.texi@1.321 +2 -2
+ NTP_4_2_7P332
+
+ ntpd/ntp.conf.5man@1.39 +3 -2876
+ NTP_4_2_7P332
+
+ ntpd/ntp.conf.5mdoc@1.39 +4 -2709
+ NTP_4_2_7P332
+
+ ntpd/ntp.conf.html@1.4 +1 -1
+ NTP_4_2_7P332
+
+ ntpd/ntp.conf.man.in@1.39 +3 -2876
+ NTP_4_2_7P332
+
+ ntpd/ntp.conf.mdoc.in@1.39 +4 -2709
+ NTP_4_2_7P332
+
+ ntpd/ntp.keys.5man@1.39 +2 -94
+ NTP_4_2_7P332
+
+ ntpd/ntp.keys.5mdoc@1.39 +3 -94
+ NTP_4_2_7P332
+
+ ntpd/ntp.keys.html@1.5 +1 -1
+ NTP_4_2_7P332
+
+ ntpd/ntp.keys.man.in@1.39 +2 -94
+ NTP_4_2_7P332
+
+ ntpd/ntp.keys.mdoc.in@1.39 +3 -94
+ NTP_4_2_7P332
+
+ ntpd/ntpd-opts.c@1.339 +4 -4
+ NTP_4_2_7P332
+
+ ntpd/ntpd-opts.h@1.339 +3 -3
+ NTP_4_2_7P332
+
+ ntpd/ntpd.1ntpdman@1.150 +2 -2
+ NTP_4_2_7P332
+
+ ntpd/ntpd.1ntpdmdoc@1.150 +2 -2
+ NTP_4_2_7P332
+
+ ntpd/ntpd.man.in@1.150 +2 -2
+ NTP_4_2_7P332
+
+ ntpd/ntpd.mdoc.in@1.150 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/invoke-ntpdc.texi@1.318 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc-opts.c@1.333 +4 -4
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc-opts.h@1.333 +3 -3
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc.1ntpdcman@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc.html@1.161 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc.man.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpdc/ntpdc.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpq/invoke-ntpq.texi@1.320 +2 -2
+ NTP_4_2_7P332
+
+ ntpq/ntpq-opts.c@1.335 +4 -4
+ NTP_4_2_7P332
+
+ ntpq/ntpq-opts.h@1.335 +3 -3
+ NTP_4_2_7P332
+
+ ntpq/ntpq.1ntpqman@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpq/ntpq.1ntpqmdoc@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpq/ntpq.man.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpq/ntpq.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.320 +2 -2
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.335 +4 -4
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.335 +3 -3
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd.man.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ packageinfo.sh@1.335 +1 -1
+ NTP_4_2_7P332
+
+ scripts/invoke-ntp-wait.texi@1.138 +1 -1
+ NTP_4_2_7P332
+
+ scripts/ntp-wait.1ntp-waitman@1.149 +2 -2
+ NTP_4_2_7P332
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.149 +2 -2
+ NTP_4_2_7P332
+
+ scripts/ntp-wait.html@1.153 +1 -1
+ NTP_4_2_7P332
+
+ scripts/ntp-wait.man.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ scripts/ntp-wait.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ sntp/invoke-sntp.texi@1.318 +2 -2
+ NTP_4_2_7P332
+
+ sntp/sntp-opts.c@1.333 +4 -4
+ NTP_4_2_7P332
+
+ sntp/sntp-opts.h@1.333 +3 -3
+ NTP_4_2_7P332
+
+ sntp/sntp.1sntpman@1.153 +2 -66
+ NTP_4_2_7P332
+
+ sntp/sntp.1sntpmdoc@1.153 +2 -66
+ NTP_4_2_7P332
+
+ sntp/sntp.html@1.333 +91 -116
+ NTP_4_2_7P332
+
+ sntp/sntp.man.in@1.153 +2 -66
+ NTP_4_2_7P332
+
+ sntp/sntp.mdoc.in@1.153 +2 -66
+ NTP_4_2_7P332
+
+ util/invoke-ntp-keygen.texi@1.321 +2 -2
+ NTP_4_2_7P332
+
+ util/ntp-keygen-opts.c@1.335 +4 -4
+ NTP_4_2_7P332
+
+ util/ntp-keygen-opts.h@1.335 +3 -3
+ NTP_4_2_7P332
+
+ util/ntp-keygen.1ntp-keygenman@1.149 +2 -2
+ NTP_4_2_7P332
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.149 +2 -2
+ NTP_4_2_7P332
+
+ util/ntp-keygen.man.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ util/ntp-keygen.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P332
+
+ChangeSet@1.2838, 2012-12-06 02:20:55+00:00, stenn@psp-fb1.ntp.org
+ update ntpd docs
+
+ ntpd/invoke-ntp.conf.texi@1.4 +1 -1
+ update ntpd docs
+
+ ntpd/invoke-ntp.keys.texi@1.4 +1 -1
+ update ntpd docs
+
+ ntpd/ntp.conf.5man@1.38 +2876 -3
+ update ntpd docs
+
+ ntpd/ntp.conf.5mdoc@1.38 +2709 -4
+ update ntpd docs
+
+ ntpd/ntp.conf.man.in@1.38 +2876 -3
+ update ntpd docs
+
+ ntpd/ntp.conf.mdoc.in@1.38 +2709 -4
+ update ntpd docs
+
+ ntpd/ntp.keys.5man@1.38 +94 -2
+ update ntpd docs
+
+ ntpd/ntp.keys.5mdoc@1.38 +94 -3
+ update ntpd docs
+
+ ntpd/ntp.keys.man.in@1.38 +94 -2
+ update ntpd docs
+
+ ntpd/ntp.keys.mdoc.in@1.38 +94 -3
+ update ntpd docs
+
+ChangeSet@1.2837, 2012-12-06 02:14:12+00:00, stenn@psp-fb1.ntp.org
+ sntp doc cleanup
+
+ ChangeLog@1.1200 +1 -0
+ sntp doc cleanup
+
+ sntp/invoke-sntp.texi@1.317 +17 -26
+ sntp doc cleanup
+
+ sntp/sntp-opts.c@1.332 +78 -78
+ sntp doc cleanup
+
+ sntp/sntp-opts.def@1.41 +15 -24
+ sntp doc cleanup
+
+ sntp/sntp-opts.h@1.332 +1 -1
+ sntp doc cleanup
+
+ sntp/sntp.1sntpman@1.152 +78 -20
+ sntp doc cleanup
+
+ sntp/sntp.1sntpmdoc@1.152 +79 -24
+ sntp doc cleanup
+
+ sntp/sntp.html@1.332 +125 -110
+ sntp doc cleanup
+
+ sntp/sntp.man.in@1.152 +78 -20
+ sntp doc cleanup
+
+ sntp/sntp.mdoc.in@1.152 +79 -24
+ sntp doc cleanup
+
+ChangeSet@1.2836, 2012-12-03 12:35:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P331
+ TAG: NTP_4_2_7P331
+
+ ChangeLog@1.1199 +1 -0
+ NTP_4_2_7P331
+
+ ntpd/invoke-ntp.conf.texi@1.3 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/invoke-ntp.keys.texi@1.3 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/invoke-ntpd.texi@1.320 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntp.conf.5man@1.37 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntp.conf.5mdoc@1.37 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntp.conf.html@1.3 +36 -3
+ NTP_4_2_7P331
+
+ ntpd/ntp.conf.man.in@1.37 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntp.conf.mdoc.in@1.37 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntp.keys.5man@1.37 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntp.keys.5mdoc@1.37 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntp.keys.html@1.4 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntp.keys.man.in@1.37 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntp.keys.mdoc.in@1.37 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntpd-opts.c@1.338 +4 -4
+ NTP_4_2_7P331
+
+ ntpd/ntpd-opts.h@1.338 +3 -3
+ NTP_4_2_7P331
+
+ ntpd/ntpd.1ntpdman@1.149 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntpd.1ntpdmdoc@1.149 +1 -1
+ NTP_4_2_7P331
+
+ ntpd/ntpd.man.in@1.149 +2 -2
+ NTP_4_2_7P331
+
+ ntpd/ntpd.mdoc.in@1.149 +1 -1
+ NTP_4_2_7P331
+
+ ntpdc/invoke-ntpdc.texi@1.317 +2 -2
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc-opts.c@1.332 +4 -4
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc-opts.h@1.332 +3 -3
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc.1ntpdcman@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.148 +1 -1
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc.html@1.160 +2 -2
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc.man.in@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpdc/ntpdc.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P331
+
+ ntpq/invoke-ntpq.texi@1.319 +2 -2
+ NTP_4_2_7P331
+
+ ntpq/ntpq-opts.c@1.334 +4 -4
+ NTP_4_2_7P331
+
+ ntpq/ntpq-opts.h@1.334 +3 -3
+ NTP_4_2_7P331
+
+ ntpq/ntpq.1ntpqman@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpq/ntpq.1ntpqmdoc@1.148 +1 -1
+ NTP_4_2_7P331
+
+ ntpq/ntpq.man.in@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpq/ntpq.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P331
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.319 +2 -2
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.334 +4 -4
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.334 +3 -3
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.148 +1 -1
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd.man.in@1.148 +2 -2
+ NTP_4_2_7P331
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P331
+
+ packageinfo.sh@1.334 +1 -1
+ NTP_4_2_7P331
+
+ scripts/invoke-ntp-wait.texi@1.137 +1 -1
+ NTP_4_2_7P331
+
+ scripts/ntp-wait.1ntp-waitman@1.148 +2 -2
+ NTP_4_2_7P331
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.148 +1 -1
+ NTP_4_2_7P331
+
+ scripts/ntp-wait.html@1.152 +1 -1
+ NTP_4_2_7P331
+
+ scripts/ntp-wait.man.in@1.148 +2 -2
+ NTP_4_2_7P331
+
+ scripts/ntp-wait.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P331
+
+ sntp/invoke-sntp.texi@1.316 +2 -2
+ NTP_4_2_7P331
+
+ sntp/sntp-opts.c@1.331 +4 -4
+ NTP_4_2_7P331
+
+ sntp/sntp-opts.h@1.331 +3 -3
+ NTP_4_2_7P331
+
+ sntp/sntp.1sntpman@1.151 +2 -2
+ NTP_4_2_7P331
+
+ sntp/sntp.1sntpmdoc@1.151 +1 -1
+ NTP_4_2_7P331
+
+ sntp/sntp.html@1.331 +2 -2
+ NTP_4_2_7P331
+
+ sntp/sntp.man.in@1.151 +2 -2
+ NTP_4_2_7P331
+
+ sntp/sntp.mdoc.in@1.151 +1 -1
+ NTP_4_2_7P331
+
+ util/invoke-ntp-keygen.texi@1.320 +2 -2
+ NTP_4_2_7P331
+
+ util/ntp-keygen-opts.c@1.334 +4 -4
+ NTP_4_2_7P331
+
+ util/ntp-keygen-opts.h@1.334 +3 -3
+ NTP_4_2_7P331
+
+ util/ntp-keygen.1ntp-keygenman@1.148 +2 -2
+ NTP_4_2_7P331
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.148 +1 -1
+ NTP_4_2_7P331
+
+ util/ntp-keygen.man.in@1.148 +2 -2
+ NTP_4_2_7P331
+
+ util/ntp-keygen.mdoc.in@1.148 +1 -1
+ NTP_4_2_7P331
+
+ChangeSet@1.2835, 2012-12-03 07:24:46-05:00, stenn@deacon.udel.edu
+ Include VERSION in the texi output
+
+ ntpd/ntp.conf.texi@1.3 +2 -1
+ Include VERSION in the texi output
+
+ ntpd/ntp.keys.texi@1.3 +2 -1
+ Include VERSION in the texi output
+
+ChangeSet@1.2834, 2012-12-03 07:14:45-05:00, stenn@deacon.udel.edu
+ autogen cleanup
+
+ ntpd/ntp.keys.def@1.7 +1 -0
+ autogen cleanup
+
+ ntpd/ntp.keys.html@1.3 +1 -1
+ autogen cleanup
+
+ChangeSet@1.2833, 2012-12-03 07:11:28-05:00, stenn@deacon.udel.edu
+ fix include path for texi version
+
+ ntpd/ntp.conf.texi@1.2 +1 -1
+ fix include path for texi version
+
+ ntpd/ntp.keys.texi@1.2 +1 -1
+ fix include path for texi version
+
+ChangeSet@1.2832, 2012-12-03 02:40:27-08:00, harlan@hms-mbp11.local
+ [Bug 2114] Correctly calculate sntp's synch distance
+
+ ChangeLog@1.1198 +1 -0
+ [Bug 2114] Correctly calculate sntp's synch distance
+
+ sntp/main.c@1.87 +52 -17
+ [Bug 2114] Correctly calculate sntp's synch distance
+
+ChangeSet@1.2831, 2012-12-03 05:37:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P330
+ TAG: NTP_4_2_7P330
+
+ ChangeLog@1.1197 +1 -0
+ NTP_4_2_7P330
+
+ ntpd/invoke-ntp.conf.texi@1.2 +37 -2
+ NTP_4_2_7P330
+
+ ntpd/invoke-ntp.keys.texi@1.2 +1 -1
+ NTP_4_2_7P330
+
+ ntpd/invoke-ntpd.texi@1.319 +2 -2
+ NTP_4_2_7P330
+
+ ntpd/ntp.conf.5man@1.36 +2 -31
+ NTP_4_2_7P330
+
+ ntpd/ntp.conf.5mdoc@1.36 +2 -30
+ NTP_4_2_7P330
+
+ ntpd/ntp.conf.html@1.2 +163 -183
+ NTP_4_2_7P330
+
+ ntpd/ntp.conf.man.in@1.36 +2 -31
+ NTP_4_2_7P330
+
+ ntpd/ntp.conf.mdoc.in@1.36 +2 -30
+ NTP_4_2_7P330
+
+ ntpd/ntp.keys.5man@1.36 +6 -38
+ NTP_4_2_7P330
+
+ ntpd/ntp.keys.5mdoc@1.36 +6 -38
+ NTP_4_2_7P330
+
+ ntpd/ntp.keys.html@1.2 +235 -12
+ NTP_4_2_7P330
+
+ ntpd/ntp.keys.man.in@1.36 +6 -38
+ NTP_4_2_7P330
+
+ ntpd/ntp.keys.mdoc.in@1.36 +6 -38
+ NTP_4_2_7P330
+
+ ntpd/ntpd-opts.c@1.337 +4 -4
+ NTP_4_2_7P330
+
+ ntpd/ntpd-opts.h@1.337 +3 -3
+ NTP_4_2_7P330
+
+ ntpd/ntpd.1ntpdman@1.148 +2 -2
+ NTP_4_2_7P330
+
+ ntpd/ntpd.1ntpdmdoc@1.148 +2 -2
+ NTP_4_2_7P330
+
+ ntpd/ntpd.man.in@1.148 +2 -2
+ NTP_4_2_7P330
+
+ ntpd/ntpd.mdoc.in@1.148 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/invoke-ntpdc.texi@1.316 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc-opts.c@1.331 +4 -4
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc-opts.h@1.331 +3 -3
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc.1ntpdcman@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc.html@1.159 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc.man.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpdc/ntpdc.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpq/invoke-ntpq.texi@1.318 +2 -2
+ NTP_4_2_7P330
+
+ ntpq/ntpq-opts.c@1.333 +4 -4
+ NTP_4_2_7P330
+
+ ntpq/ntpq-opts.h@1.333 +3 -3
+ NTP_4_2_7P330
+
+ ntpq/ntpq.1ntpqman@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpq/ntpq.1ntpqmdoc@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpq/ntpq.man.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpq/ntpq.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.318 +2 -2
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.333 +4 -4
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.333 +3 -3
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd.man.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ packageinfo.sh@1.333 +1 -1
+ NTP_4_2_7P330
+
+ scripts/invoke-ntp-wait.texi@1.136 +1 -1
+ NTP_4_2_7P330
+
+ scripts/ntp-wait.1ntp-waitman@1.147 +2 -2
+ NTP_4_2_7P330
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.147 +2 -2
+ NTP_4_2_7P330
+
+ scripts/ntp-wait.html@1.151 +1 -1
+ NTP_4_2_7P330
+
+ scripts/ntp-wait.man.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ scripts/ntp-wait.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ sntp/invoke-sntp.texi@1.315 +2 -2
+ NTP_4_2_7P330
+
+ sntp/sntp-opts.c@1.330 +4 -4
+ NTP_4_2_7P330
+
+ sntp/sntp-opts.h@1.330 +3 -3
+ NTP_4_2_7P330
+
+ sntp/sntp.1sntpman@1.150 +2 -2
+ NTP_4_2_7P330
+
+ sntp/sntp.1sntpmdoc@1.150 +2 -2
+ NTP_4_2_7P330
+
+ sntp/sntp.html@1.330 +2 -2
+ NTP_4_2_7P330
+
+ sntp/sntp.man.in@1.150 +2 -2
+ NTP_4_2_7P330
+
+ sntp/sntp.mdoc.in@1.150 +2 -2
+ NTP_4_2_7P330
+
+ util/invoke-ntp-keygen.texi@1.319 +2 -2
+ NTP_4_2_7P330
+
+ util/ntp-keygen-opts.c@1.333 +4 -4
+ NTP_4_2_7P330
+
+ util/ntp-keygen-opts.h@1.333 +3 -3
+ NTP_4_2_7P330
+
+ util/ntp-keygen.1ntp-keygenman@1.147 +2 -2
+ NTP_4_2_7P330
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.147 +2 -2
+ NTP_4_2_7P330
+
+ util/ntp-keygen.man.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ util/ntp-keygen.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P330
+
+ChangeSet@1.2830, 2012-12-03 00:37:12-05:00, stenn@deacon.udel.edu
+ autogen doc update
+
+ .point-changed-filelist@1.16 +0 -2
+ autogen doc update
+
+ChangeSet@1.2829, 2012-12-03 04:52:58+00:00, stenn@psp-fb1.ntp.org
+ autogen doc cleanup
+
+ ntpd/ntp.conf.def@1.3 +16 -1
+ autogen doc cleanup
+
+ChangeSet@1.2828, 2012-12-02 23:09:51-05:00, stenn@deacon.udel.edu
+ autogen doc cleanup
+
+ ntpd/ntp.conf.def@1.2 +1 -0
+ autogen doc cleanup
+
+ChangeSet@1.2827, 2012-12-03 02:51:53+00:00, stenn@psp-fb1.ntp.org
+ autogen doc cleanup
+
+ .point-changed-filelist@1.15 +6 -0
+ autogen doc cleanup
+
+ ChangeLog@1.1196 +1 -0
+ autogen doc cleanup
+
+ ntpd/Makefile.am@1.125 +59 -18
+ autogen doc cleanup
+
+ ntpd/invoke-ntp.conf.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/invoke-ntp.conf.menu
+
+ ntpd/invoke-ntp.conf.menu@1.0 +0 -0
+
+ ntpd/invoke-ntp.conf.texi@1.1 +3816 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/invoke-ntp.conf.texi
+
+ ntpd/invoke-ntp.conf.texi@1.0 +0 -0
+
+ ntpd/invoke-ntp.keys.menu@1.1 +1 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/invoke-ntp.keys.menu
+
+ ntpd/invoke-ntp.keys.menu@1.0 +0 -0
+
+ ntpd/invoke-ntp.keys.texi@1.1 +208 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/invoke-ntp.keys.texi
+
+ ntpd/invoke-ntp.keys.texi@1.0 +0 -0
+
+ ntpd/ntp.conf.html@1.1 +3762 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntp.conf.html
+
+ ntpd/ntp.conf.html@1.0 +0 -0
+
+ ntpd/ntp.conf.texi@1.1 +48 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntp.conf.texi
+
+ ntpd/ntp.conf.texi@1.0 +0 -0
+
+ ntpd/ntp.keys.def@1.6 +40 -48
+ autogen doc cleanup
+
+ ntpd/ntp.keys.html@1.1 +67 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntp.keys.html
+
+ ntpd/ntp.keys.html@1.0 +0 -0
+
+ ntpd/ntp.keys.texi@1.1 +48 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/ntpd/ntp.keys.texi
+
+ ntpd/ntp.keys.texi@1.0 +0 -0
+
+ sntp/ag-tpl/agman-file.tpl@1.1 +86 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/ag-tpl/agman-file.tpl
+
+ sntp/ag-tpl/agman-file.tpl@1.0 +0 -0
+
+ sntp/ag-tpl/agmdoc-file.tpl@1.1 +73 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/ag-tpl/agmdoc-file.tpl
+
+ sntp/ag-tpl/agmdoc-file.tpl@1.0 +0 -0
+
+ sntp/ag-tpl/cmd-doc.tlib@1.1 +1003 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/ag-tpl/cmd-doc.tlib
+
+ sntp/ag-tpl/cmd-doc.tlib@1.0 +0 -0
+
+ChangeSet@1.2826, 2012-12-01 11:33:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P329
+ TAG: NTP_4_2_7P329
+
+ ChangeLog@1.1195 +1 -0
+ NTP_4_2_7P329
+
+ ntpd/invoke-ntpd.texi@1.318 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.conf.5man@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.conf.5mdoc@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.conf.man.in@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.conf.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.keys.5man@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.keys.5mdoc@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.keys.man.in@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntp.keys.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntpd-opts.c@1.336 +4 -4
+ NTP_4_2_7P329
+
+ ntpd/ntpd-opts.h@1.336 +3 -3
+ NTP_4_2_7P329
+
+ ntpd/ntpd.1ntpdman@1.147 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntpd.1ntpdmdoc@1.147 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntpd.man.in@1.147 +2 -2
+ NTP_4_2_7P329
+
+ ntpd/ntpd.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/invoke-ntpdc.texi@1.315 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc-opts.c@1.330 +4 -4
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc-opts.h@1.330 +3 -3
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc.1ntpdcman@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc.html@1.158 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc.man.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpdc/ntpdc.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpq/invoke-ntpq.texi@1.317 +2 -2
+ NTP_4_2_7P329
+
+ ntpq/ntpq-opts.c@1.332 +4 -4
+ NTP_4_2_7P329
+
+ ntpq/ntpq-opts.h@1.332 +3 -3
+ NTP_4_2_7P329
+
+ ntpq/ntpq.1ntpqman@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpq/ntpq.1ntpqmdoc@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpq/ntpq.man.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpq/ntpq.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.317 +2 -2
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.332 +4 -4
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.332 +3 -3
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd.man.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ packageinfo.sh@1.332 +1 -1
+ NTP_4_2_7P329
+
+ scripts/invoke-ntp-wait.texi@1.135 +1 -1
+ NTP_4_2_7P329
+
+ scripts/ntp-wait.1ntp-waitman@1.146 +2 -2
+ NTP_4_2_7P329
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.146 +2 -2
+ NTP_4_2_7P329
+
+ scripts/ntp-wait.html@1.150 +1 -1
+ NTP_4_2_7P329
+
+ scripts/ntp-wait.man.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ scripts/ntp-wait.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ sntp/invoke-sntp.texi@1.314 +2 -2
+ NTP_4_2_7P329
+
+ sntp/sntp-opts.c@1.329 +4 -4
+ NTP_4_2_7P329
+
+ sntp/sntp-opts.h@1.329 +3 -3
+ NTP_4_2_7P329
+
+ sntp/sntp.1sntpman@1.149 +2 -2
+ NTP_4_2_7P329
+
+ sntp/sntp.1sntpmdoc@1.149 +2 -2
+ NTP_4_2_7P329
+
+ sntp/sntp.html@1.329 +2 -2
+ NTP_4_2_7P329
+
+ sntp/sntp.man.in@1.149 +2 -2
+ NTP_4_2_7P329
+
+ sntp/sntp.mdoc.in@1.149 +2 -2
+ NTP_4_2_7P329
+
+ util/invoke-ntp-keygen.texi@1.318 +2 -2
+ NTP_4_2_7P329
+
+ util/ntp-keygen-opts.c@1.332 +4 -4
+ NTP_4_2_7P329
+
+ util/ntp-keygen-opts.h@1.332 +3 -3
+ NTP_4_2_7P329
+
+ util/ntp-keygen.1ntp-keygenman@1.146 +2 -2
+ NTP_4_2_7P329
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.146 +2 -2
+ NTP_4_2_7P329
+
+ util/ntp-keygen.man.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ util/ntp-keygen.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P329
+
+ChangeSet@1.2824, 2012-12-01 10:43:56+00:00, stenn@psp-fb1.ntp.org
+ Use an enum for the ACTS state table
+
+ ChangeLog@1.1193 +1 -0
+ Use an enum for the ACTS state table
+
+ ntpd/refclock_acts.c@1.51.1.1 +8 -6
+ Use an enum for the ACTS state table
+
+ChangeSet@1.2822.1.73, 2012-11-30 23:45:57-05:00, stenn@deacon.udel.edu
+ html doc reconciliation with DLM's copy
+
+ ChangeLog@1.1191.1.63 +1 -0
+ html doc reconciliation with DLM's copy
+
+ html/authentic.html@1.13 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/copyright.html@1.60 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/decode.html@1.21 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/drivers/driver1.html@1.20 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/leap.html@1.5 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/miscopt.html@1.71 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/ntpd.html@1.57 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/ntpdate.html@1.23 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/ntpq.html@1.47 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/ntptrace.html@1.18 +1 -1
+ html doc reconciliation with DLM's copy
+
+ html/quick.html@1.24 +2 -2
+ html doc reconciliation with DLM's copy
+
+ChangeSet@1.2822.1.72, 2012-11-30 11:34:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P328
+ TAG: NTP_4_2_7P328
+
+ ChangeLog@1.1191.1.62 +1 -0
+ NTP_4_2_7P328
+
+ ntpd/invoke-ntpd.texi@1.317 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.conf.5man@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.conf.5mdoc@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.conf.man.in@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.conf.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.keys.5man@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.keys.5mdoc@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.keys.man.in@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntp.keys.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntpd-opts.c@1.335 +4 -4
+ NTP_4_2_7P328
+
+ ntpd/ntpd-opts.h@1.335 +3 -3
+ NTP_4_2_7P328
+
+ ntpd/ntpd.1ntpdman@1.146 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntpd.1ntpdmdoc@1.146 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntpd.man.in@1.146 +2 -2
+ NTP_4_2_7P328
+
+ ntpd/ntpd.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/invoke-ntpdc.texi@1.314 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc-opts.c@1.329 +4 -4
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc-opts.h@1.329 +3 -3
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc.1ntpdcman@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc.html@1.157 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc.man.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpdc/ntpdc.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpq/invoke-ntpq.texi@1.316 +2 -2
+ NTP_4_2_7P328
+
+ ntpq/ntpq-opts.c@1.331 +4 -4
+ NTP_4_2_7P328
+
+ ntpq/ntpq-opts.h@1.331 +3 -3
+ NTP_4_2_7P328
+
+ ntpq/ntpq.1ntpqman@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpq/ntpq.1ntpqmdoc@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpq/ntpq.man.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpq/ntpq.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.316 +2 -2
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.331 +4 -4
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.331 +3 -3
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd.man.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ packageinfo.sh@1.331 +1 -1
+ NTP_4_2_7P328
+
+ scripts/invoke-ntp-wait.texi@1.134 +1 -1
+ NTP_4_2_7P328
+
+ scripts/ntp-wait.1ntp-waitman@1.145 +2 -2
+ NTP_4_2_7P328
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.145 +2 -2
+ NTP_4_2_7P328
+
+ scripts/ntp-wait.html@1.149 +1 -1
+ NTP_4_2_7P328
+
+ scripts/ntp-wait.man.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ scripts/ntp-wait.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ sntp/invoke-sntp.texi@1.313 +2 -2
+ NTP_4_2_7P328
+
+ sntp/sntp-opts.c@1.328 +4 -4
+ NTP_4_2_7P328
+
+ sntp/sntp-opts.h@1.328 +3 -3
+ NTP_4_2_7P328
+
+ sntp/sntp.1sntpman@1.148 +2 -2
+ NTP_4_2_7P328
+
+ sntp/sntp.1sntpmdoc@1.148 +2 -2
+ NTP_4_2_7P328
+
+ sntp/sntp.html@1.328 +2 -2
+ NTP_4_2_7P328
+
+ sntp/sntp.man.in@1.148 +2 -2
+ NTP_4_2_7P328
+
+ sntp/sntp.mdoc.in@1.148 +2 -2
+ NTP_4_2_7P328
+
+ util/invoke-ntp-keygen.texi@1.317 +2 -2
+ NTP_4_2_7P328
+
+ util/ntp-keygen-opts.c@1.331 +4 -4
+ NTP_4_2_7P328
+
+ util/ntp-keygen-opts.h@1.331 +3 -3
+ NTP_4_2_7P328
+
+ util/ntp-keygen.1ntp-keygenman@1.145 +2 -2
+ NTP_4_2_7P328
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.145 +2 -2
+ NTP_4_2_7P328
+
+ util/ntp-keygen.man.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ util/ntp-keygen.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P328
+
+ChangeSet@1.2822.1.71, 2012-11-30 06:00:13-05:00, stenn@deacon.udel.edu
+ html doc reconciliation with DLM's copy
+
+ ChangeLog@1.1191.1.61 +1 -0
+ html doc reconciliation with DLM's copy
+
+ html/refclock.html@1.38 +1 -0
+ html doc reconciliation with DLM's copy
+
+ChangeSet@1.2822.1.70, 2012-11-29 11:36:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P327
+ TAG: NTP_4_2_7P327
+
+ ChangeLog@1.1191.1.60 +1 -0
+ NTP_4_2_7P327
+
+ ntpd/invoke-ntpd.texi@1.316 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.conf.5man@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.conf.5mdoc@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.conf.man.in@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.conf.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.keys.5man@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.keys.5mdoc@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.keys.man.in@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntp.keys.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntpd-opts.c@1.334 +4 -4
+ NTP_4_2_7P327
+
+ ntpd/ntpd-opts.h@1.334 +3 -3
+ NTP_4_2_7P327
+
+ ntpd/ntpd.1ntpdman@1.145 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntpd.1ntpdmdoc@1.145 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntpd.man.in@1.145 +2 -2
+ NTP_4_2_7P327
+
+ ntpd/ntpd.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/invoke-ntpdc.texi@1.313 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc-opts.c@1.328 +4 -4
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc-opts.h@1.328 +3 -3
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc.1ntpdcman@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc.html@1.156 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc.man.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpdc/ntpdc.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpq/invoke-ntpq.texi@1.315 +2 -2
+ NTP_4_2_7P327
+
+ ntpq/ntpq-opts.c@1.330 +4 -4
+ NTP_4_2_7P327
+
+ ntpq/ntpq-opts.h@1.330 +3 -3
+ NTP_4_2_7P327
+
+ ntpq/ntpq.1ntpqman@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpq/ntpq.1ntpqmdoc@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpq/ntpq.man.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpq/ntpq.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.315 +2 -2
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.330 +4 -4
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.330 +3 -3
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd.man.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ packageinfo.sh@1.330 +1 -1
+ NTP_4_2_7P327
+
+ scripts/invoke-ntp-wait.texi@1.133 +1 -1
+ NTP_4_2_7P327
+
+ scripts/ntp-wait.1ntp-waitman@1.144 +2 -2
+ NTP_4_2_7P327
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.144 +2 -2
+ NTP_4_2_7P327
+
+ scripts/ntp-wait.html@1.148 +1 -1
+ NTP_4_2_7P327
+
+ scripts/ntp-wait.man.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ scripts/ntp-wait.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P327
+
+ sntp/invoke-sntp.texi@1.312 +2 -2
+ NTP_4_2_7P327
+
+ sntp/sntp-opts.c@1.327 +4 -4
+ NTP_4_2_7P327
+
+ sntp/sntp-opts.h@1.327 +3 -3
+ NTP_4_2_7P327
+
+ sntp/sntp.1sntpman@1.147 +2 -2
+ NTP_4_2_7P327
+
+ sntp/sntp.1sntpmdoc@1.147 +2 -2
+ NTP_4_2_7P327
+
+ sntp/sntp.html@1.327 +2 -2
+ NTP_4_2_7P327
+
+ sntp/sntp.man.in@1.147 +2 -2
+ NTP_4_2_7P327
+
+ sntp/sntp.mdoc.in@1.147 +2 -2
+ NTP_4_2_7P327
+
+ util/invoke-ntp-keygen.texi@1.316 +21 -2
+ NTP_4_2_7P327
+
+ util/ntp-keygen-opts.c@1.330 +277 -203
+ NTP_4_2_7P327
+
+ util/ntp-keygen-opts.h@1.330 +40 -30
+ NTP_4_2_7P327
+
+ util/ntp-keygen.1ntp-keygenman@1.144 +15 -2
+ NTP_4_2_7P327
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.144 +14 -2
+ NTP_4_2_7P327
+
+ util/ntp-keygen.man.in@1.144 +15 -2
+ NTP_4_2_7P327
+
+ util/ntp-keygen.mdoc.in@1.144 +14 -2
+ NTP_4_2_7P327
+
+ChangeSet@1.2822.1.69, 2012-11-29 03:55:28-05:00, stenn@deacon.udel.edu
+ [Bug 2024] Identify Events in the system status word in decode.html
+
+ ChangeLog@1.1191.1.59 +1 -0
+ [Bug 2024] Identify Events in the system status word in decode.html
+
+ html/decode.html@1.20 +3 -3
+ [Bug 2024] Identify Events in the system status word in decode.html
+
+ChangeSet@1.2822.1.68, 2012-11-29 03:48:03-05:00, stenn@deacon.udel.edu
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ util/ntp-keygen.c@1.94 +4 -0
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ChangeSet@1.2822.1.67, 2012-11-29 03:45:42-05:00, stenn@deacon.udel.edu
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ ChangeLog@1.1191.1.58 +1 -0
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ html/keygen.html@1.32 +4 -2
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ util/ntp-keygen-opts.def@1.20 +13 -0
+ [Bug 2040] Provide a command-line option for the identity key bits
+
+ChangeSet@1.2822.1.66, 2012-11-29 08:21:55+00:00, stenn@psp-fb1.ntp.org
+ Create loc/darwin for Mac OSX
+
+ ChangeLog@1.1191.1.57 +1 -0
+ Create loc/darwin for Mac OSX
+
+ sntp/loc/darwin@1.1 +13 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/loc/darwin
+
+ sntp/loc/darwin@1.0 +0 -0
+
+ChangeSet@1.2822.1.65, 2012-11-21 11:33:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P326
+ TAG: NTP_4_2_7P326
+
+ ChangeLog@1.1191.1.56 +1 -0
+ NTP_4_2_7P326
+
+ ntpd/invoke-ntpd.texi@1.315 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.conf.5man@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.conf.5mdoc@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.conf.man.in@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.conf.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.keys.5man@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.keys.5mdoc@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.keys.man.in@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntp.keys.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntpd-opts.c@1.333 +4 -4
+ NTP_4_2_7P326
+
+ ntpd/ntpd-opts.h@1.333 +3 -3
+ NTP_4_2_7P326
+
+ ntpd/ntpd.1ntpdman@1.144 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntpd.1ntpdmdoc@1.144 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntpd.man.in@1.144 +2 -2
+ NTP_4_2_7P326
+
+ ntpd/ntpd.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/invoke-ntpdc.texi@1.312 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc-opts.c@1.327 +4 -4
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc-opts.h@1.327 +3 -3
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc.1ntpdcman@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc.html@1.155 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc.man.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpdc/ntpdc.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpq/invoke-ntpq.texi@1.314 +2 -2
+ NTP_4_2_7P326
+
+ ntpq/ntpq-opts.c@1.329 +4 -4
+ NTP_4_2_7P326
+
+ ntpq/ntpq-opts.h@1.329 +3 -3
+ NTP_4_2_7P326
+
+ ntpq/ntpq.1ntpqman@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpq/ntpq.1ntpqmdoc@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpq/ntpq.man.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpq/ntpq.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.314 +2 -2
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.329 +4 -4
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.329 +3 -3
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd.man.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ packageinfo.sh@1.329 +1 -1
+ NTP_4_2_7P326
+
+ scripts/invoke-ntp-wait.texi@1.132 +1 -1
+ NTP_4_2_7P326
+
+ scripts/ntp-wait.1ntp-waitman@1.143 +2 -2
+ NTP_4_2_7P326
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.143 +2 -2
+ NTP_4_2_7P326
+
+ scripts/ntp-wait.html@1.147 +1 -1
+ NTP_4_2_7P326
+
+ scripts/ntp-wait.man.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ scripts/ntp-wait.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ sntp/invoke-sntp.texi@1.311 +2 -2
+ NTP_4_2_7P326
+
+ sntp/sntp-opts.c@1.326 +4 -4
+ NTP_4_2_7P326
+
+ sntp/sntp-opts.h@1.326 +3 -3
+ NTP_4_2_7P326
+
+ sntp/sntp.1sntpman@1.146 +2 -2
+ NTP_4_2_7P326
+
+ sntp/sntp.1sntpmdoc@1.146 +2 -2
+ NTP_4_2_7P326
+
+ sntp/sntp.html@1.326 +2 -2
+ NTP_4_2_7P326
+
+ sntp/sntp.man.in@1.146 +2 -2
+ NTP_4_2_7P326
+
+ sntp/sntp.mdoc.in@1.146 +2 -2
+ NTP_4_2_7P326
+
+ util/invoke-ntp-keygen.texi@1.315 +2 -2
+ NTP_4_2_7P326
+
+ util/ntp-keygen-opts.c@1.329 +4 -4
+ NTP_4_2_7P326
+
+ util/ntp-keygen-opts.h@1.329 +3 -3
+ NTP_4_2_7P326
+
+ util/ntp-keygen.1ntp-keygenman@1.143 +2 -2
+ NTP_4_2_7P326
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.143 +2 -2
+ NTP_4_2_7P326
+
+ util/ntp-keygen.man.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ util/ntp-keygen.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P326
+
+ChangeSet@1.2822.11.2, 2012-11-20 11:35:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P325
+ TAG: NTP_4_2_7P325
+
+ ChangeLog@1.1191.8.1 +1 -0
+ NTP_4_2_7P325
+
+ ntpd/invoke-ntpd.texi@1.314 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.conf.5man@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.conf.5mdoc@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.conf.man.in@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.conf.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.keys.5man@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.keys.5mdoc@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.keys.man.in@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntp.keys.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntpd-opts.c@1.332 +4 -4
+ NTP_4_2_7P325
+
+ ntpd/ntpd-opts.h@1.332 +3 -3
+ NTP_4_2_7P325
+
+ ntpd/ntpd.1ntpdman@1.143 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntpd.1ntpdmdoc@1.143 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntpd.man.in@1.143 +2 -2
+ NTP_4_2_7P325
+
+ ntpd/ntpd.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/invoke-ntpdc.texi@1.311 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc-opts.c@1.326 +4 -4
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc-opts.h@1.326 +3 -3
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc.1ntpdcman@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc.html@1.154 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc.man.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpdc/ntpdc.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpq/invoke-ntpq.texi@1.313 +2 -2
+ NTP_4_2_7P325
+
+ ntpq/ntpq-opts.c@1.328 +4 -4
+ NTP_4_2_7P325
+
+ ntpq/ntpq-opts.h@1.328 +3 -3
+ NTP_4_2_7P325
+
+ ntpq/ntpq.1ntpqman@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpq/ntpq.1ntpqmdoc@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpq/ntpq.man.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpq/ntpq.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.313 +2 -2
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.328 +4 -4
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.328 +3 -3
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd.man.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ packageinfo.sh@1.328 +1 -1
+ NTP_4_2_7P325
+
+ scripts/invoke-ntp-wait.texi@1.131 +1 -1
+ NTP_4_2_7P325
+
+ scripts/ntp-wait.1ntp-waitman@1.142 +2 -2
+ NTP_4_2_7P325
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.142 +2 -2
+ NTP_4_2_7P325
+
+ scripts/ntp-wait.html@1.146 +1 -1
+ NTP_4_2_7P325
+
+ scripts/ntp-wait.man.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ scripts/ntp-wait.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ sntp/invoke-sntp.texi@1.310 +2 -2
+ NTP_4_2_7P325
+
+ sntp/sntp-opts.c@1.325 +4 -4
+ NTP_4_2_7P325
+
+ sntp/sntp-opts.h@1.325 +3 -3
+ NTP_4_2_7P325
+
+ sntp/sntp.1sntpman@1.145 +2 -2
+ NTP_4_2_7P325
+
+ sntp/sntp.1sntpmdoc@1.145 +2 -2
+ NTP_4_2_7P325
+
+ sntp/sntp.html@1.325 +2 -2
+ NTP_4_2_7P325
+
+ sntp/sntp.man.in@1.145 +2 -2
+ NTP_4_2_7P325
+
+ sntp/sntp.mdoc.in@1.145 +2 -2
+ NTP_4_2_7P325
+
+ util/invoke-ntp-keygen.texi@1.314 +2 -2
+ NTP_4_2_7P325
+
+ util/ntp-keygen-opts.c@1.328 +4 -4
+ NTP_4_2_7P325
+
+ util/ntp-keygen-opts.h@1.328 +3 -3
+ NTP_4_2_7P325
+
+ util/ntp-keygen.1ntp-keygenman@1.142 +2 -2
+ NTP_4_2_7P325
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.142 +2 -2
+ NTP_4_2_7P325
+
+ util/ntp-keygen.man.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ util/ntp-keygen.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P325
+
+ChangeSet@1.2822.11.1, 2012-11-20 03:45:54-05:00, stenn@deacon.udel.edu
+ typo fix
+
+ html/leap.html@1.4 +1 -1
+ typo fix
+
+ChangeSet@1.2822.1.62, 2012-11-19 23:37:09-05:00, stenn@deacon.udel.edu
+ [Bug 2202] ntpq.html: there is no "acv" billboard
+
+ ChangeLog@1.1191.1.53 +1 -0
+ [Bug 2202] ntpq.html: there is no "acv" billboard
+
+ html/ntpq.html@1.46 +1 -1
+ [Bug 2202] ntpq.html: there is no "acv" billboard
+
+ChangeSet@1.2822.10.2, 2012-11-19 20:17:35-08:00, harlan@hms-mbp11.local
+ [Bug 2246] Clear sys_leap when voting says to disarm the leap
+
+ ChangeLog@1.1191.7.2 +1 -0
+ [Bug 2246] Clear sys_leap when voting says to disarm the leap
+
+ ntpd/ntp_proto.c@1.343 +1 -0
+ [Bug 2246] Clear sys_leap when voting says to disarm the leap
+
+ChangeSet@1.2822.10.1, 2012-11-19 18:44:38-08:00, harlan@hms-mbp11.local
+ [Bug 1214] 'proto: precision = ...' should be at INFO, not NOTICE
+
+ ChangeLog@1.1191.7.1 +1 -0
+ [Bug 1214] 'proto: precision = ...' should be at INFO, not NOTICE
+
+ ntpd/ntp_proto.c@1.342 +1 -1
+ [Bug 1214] 'proto: precision = ...' should be at INFO, not NOTICE
+
+ChangeSet@1.2822.1.61, 2012-11-19 19:38:43+01:00, jnperlin@armageddon.
+ [Bug 2306] Keep pps hack for Win32 even if user-mode/loopback PPS API is activated on a serial line.
+
+ ChangeLog@1.1191.1.52 +2 -0
+ [Bug 2306] Keep pps hack for Win32 even if user-mode/loopback PPS API is activated on a serial line.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.68 +10 -1
+ [Bug 2306] Keep pps hack for Win32 even if user-mode/loopback PPS API is activated on a serial line.
+
+ChangeSet@1.2822.1.60, 2012-11-19 12:05:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P324
+ TAG: NTP_4_2_7P324
+
+ ChangeLog@1.1191.1.51 +1 -0
+ NTP_4_2_7P324
+
+ ntpd/invoke-ntpd.texi@1.313 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.conf.5man@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.conf.5mdoc@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.conf.man.in@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.conf.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.keys.5man@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.keys.5mdoc@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.keys.man.in@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntp.keys.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntpd-opts.c@1.331 +4 -4
+ NTP_4_2_7P324
+
+ ntpd/ntpd-opts.h@1.331 +3 -3
+ NTP_4_2_7P324
+
+ ntpd/ntpd.1ntpdman@1.142 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntpd.1ntpdmdoc@1.142 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntpd.man.in@1.142 +2 -2
+ NTP_4_2_7P324
+
+ ntpd/ntpd.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/invoke-ntpdc.texi@1.310 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc-opts.c@1.325 +4 -4
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc-opts.h@1.325 +3 -3
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc.1ntpdcman@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc.html@1.153 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc.man.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpdc/ntpdc.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpq/invoke-ntpq.texi@1.312 +2 -2
+ NTP_4_2_7P324
+
+ ntpq/ntpq-opts.c@1.327 +4 -4
+ NTP_4_2_7P324
+
+ ntpq/ntpq-opts.h@1.327 +3 -3
+ NTP_4_2_7P324
+
+ ntpq/ntpq.1ntpqman@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpq/ntpq.1ntpqmdoc@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpq/ntpq.man.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpq/ntpq.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.312 +2 -2
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.327 +4 -4
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.327 +3 -3
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd.man.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ packageinfo.sh@1.327 +1 -1
+ NTP_4_2_7P324
+
+ scripts/invoke-ntp-wait.texi@1.130 +1 -1
+ NTP_4_2_7P324
+
+ scripts/ntp-wait.1ntp-waitman@1.141 +2 -2
+ NTP_4_2_7P324
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.141 +2 -2
+ NTP_4_2_7P324
+
+ scripts/ntp-wait.html@1.145 +1 -1
+ NTP_4_2_7P324
+
+ scripts/ntp-wait.man.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ scripts/ntp-wait.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ sntp/invoke-sntp.texi@1.309 +2 -2
+ NTP_4_2_7P324
+
+ sntp/sntp-opts.c@1.324 +4 -4
+ NTP_4_2_7P324
+
+ sntp/sntp-opts.h@1.324 +3 -3
+ NTP_4_2_7P324
+
+ sntp/sntp.1sntpman@1.144 +2 -2
+ NTP_4_2_7P324
+
+ sntp/sntp.1sntpmdoc@1.144 +2 -2
+ NTP_4_2_7P324
+
+ sntp/sntp.html@1.324 +2 -2
+ NTP_4_2_7P324
+
+ sntp/sntp.man.in@1.144 +2 -2
+ NTP_4_2_7P324
+
+ sntp/sntp.mdoc.in@1.144 +2 -2
+ NTP_4_2_7P324
+
+ util/invoke-ntp-keygen.texi@1.313 +2 -2
+ NTP_4_2_7P324
+
+ util/ntp-keygen-opts.c@1.327 +4 -4
+ NTP_4_2_7P324
+
+ util/ntp-keygen-opts.h@1.327 +3 -3
+ NTP_4_2_7P324
+
+ util/ntp-keygen.1ntp-keygenman@1.141 +2 -2
+ NTP_4_2_7P324
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.141 +2 -2
+ NTP_4_2_7P324
+
+ util/ntp-keygen.man.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ util/ntp-keygen.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P324
+
+ChangeSet@1.2822.1.59, 2012-11-19 02:49:32-08:00, harlan@hms-mbp11.local
+ [Bug 2098] Install DLM's HTML documentation
+
+ ChangeLog@1.1191.1.50 +1 -0
+ [Bug 2098] Install DLM's HTML documentation
+
+ Makefile.am@1.116 +7 -0
+ [Bug 2098] Install DLM's HTML documentation
+
+ configure.ac@1.554 +1 -1
+ [Bug 2098] Install DLM's HTML documentation
+
+ChangeSet@1.2822.1.58, 2012-11-19 02:32:45-05:00, stenn@deacon.udel.edu
+ Use "diff -u" when comparing complete.conf
+
+ ntpd/Makefile.am@1.124 +1 -1
+ Use "diff -u" when comparing complete.conf
+
+ChangeSet@1.2822.1.56, 2012-11-19 02:01:25-05:00, stenn@deacon.udel.edu
+ Reinstate change from Mike T. to authentic.html
+
+ ChangeLog@1.1191.1.48 +1 -0
+ Reinstate change from Mike T. to authentic.html
+
+ html/authentic.html@1.12 +2 -2
+ Reinstate change from Mike T. to authentic.html
+
+ChangeSet@1.2822.1.55, 2012-11-19 01:50:59-05:00, stenn@deacon.udel.edu
+ [Bug 1223] cleanup for rlimit changes
+
+ ChangeLog@1.1191.1.47 +1 -0
+ [Bug 1223] cleanup for rlimit changes
+
+ChangeSet@1.2822.9.1, 2012-11-18 12:58:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P323
+ TAG: NTP_4_2_7P323
+
+ ChangeLog@1.1191.1.46 +1 -0
+ NTP_4_2_7P323
+
+ ntpd/invoke-ntpd.texi@1.312 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.conf.5man@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.conf.5mdoc@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.conf.man.in@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.conf.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.keys.5man@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.keys.5mdoc@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.keys.man.in@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntp.keys.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntpd-opts.c@1.330 +4 -4
+ NTP_4_2_7P323
+
+ ntpd/ntpd-opts.h@1.330 +3 -3
+ NTP_4_2_7P323
+
+ ntpd/ntpd.1ntpdman@1.141 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntpd.1ntpdmdoc@1.141 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntpd.man.in@1.141 +2 -2
+ NTP_4_2_7P323
+
+ ntpd/ntpd.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/invoke-ntpdc.texi@1.309 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc-opts.c@1.324 +4 -4
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc-opts.h@1.324 +3 -3
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc.1ntpdcman@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc.html@1.152 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc.man.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpdc/ntpdc.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpq/invoke-ntpq.texi@1.311 +2 -2
+ NTP_4_2_7P323
+
+ ntpq/ntpq-opts.c@1.326 +4 -4
+ NTP_4_2_7P323
+
+ ntpq/ntpq-opts.h@1.326 +3 -3
+ NTP_4_2_7P323
+
+ ntpq/ntpq.1ntpqman@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpq/ntpq.1ntpqmdoc@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpq/ntpq.man.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpq/ntpq.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.311 +2 -2
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.326 +4 -4
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.326 +3 -3
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd.man.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ packageinfo.sh@1.326 +1 -1
+ NTP_4_2_7P323
+
+ scripts/invoke-ntp-wait.texi@1.129 +111 -1
+ NTP_4_2_7P323
+
+ scripts/ntp-wait.1ntp-waitman@1.140 +2 -2
+ NTP_4_2_7P323
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.140 +2 -2
+ NTP_4_2_7P323
+
+ scripts/ntp-wait.html@1.144 +152 -4
+ NTP_4_2_7P323
+
+ scripts/ntp-wait.man.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ scripts/ntp-wait.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ sntp/invoke-sntp.texi@1.308 +2 -2
+ NTP_4_2_7P323
+
+ sntp/sntp-opts.c@1.323 +4 -4
+ NTP_4_2_7P323
+
+ sntp/sntp-opts.h@1.323 +3 -3
+ NTP_4_2_7P323
+
+ sntp/sntp.1sntpman@1.143 +2 -2
+ NTP_4_2_7P323
+
+ sntp/sntp.1sntpmdoc@1.143 +2 -2
+ NTP_4_2_7P323
+
+ sntp/sntp.html@1.323 +2 -2
+ NTP_4_2_7P323
+
+ sntp/sntp.man.in@1.143 +2 -2
+ NTP_4_2_7P323
+
+ sntp/sntp.mdoc.in@1.143 +2 -2
+ NTP_4_2_7P323
+
+ util/invoke-ntp-keygen.texi@1.312 +2 -2
+ NTP_4_2_7P323
+
+ util/ntp-keygen-opts.c@1.326 +4 -4
+ NTP_4_2_7P323
+
+ util/ntp-keygen-opts.h@1.326 +3 -3
+ NTP_4_2_7P323
+
+ util/ntp-keygen.1ntp-keygenman@1.140 +2 -2
+ NTP_4_2_7P323
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.140 +2 -2
+ NTP_4_2_7P323
+
+ util/ntp-keygen.man.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ util/ntp-keygen.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P323
+
+ChangeSet@1.2822.8.2, 2012-11-18 07:31:57-05:00, stenn@psp-deb1.ntp.org
+ added ntp_rlimit.m4
+
+ sntp/m4/ntp_rlimit.m4@1.1 +66 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/m4/ntp_rlimit.m4
+
+ sntp/m4/ntp_rlimit.m4@1.0 +0 -0
+
+ChangeSet@1.2822.8.1, 2012-11-18 12:15:14+00:00, stenn@psp-fb1.ntp.org
+ rlimit cleanup
+
+ configure.ac@1.553 +57 -54
+ rlimit cleanup
+
+ ntpd/Makefile.am@1.123 +6 -6
+ rlimit cleanup
+
+ ntpd/complete.conf.in@1.25 +1 -1
+ rlimit cleanup
+
+ ntpd/complete.conf.in@1.24, stenn@psp-deb1.ntp.org +0 -0
+ Rename: ntpd/complete.conf -> ntpd/complete.conf.in
+
+ ntpd/ntp_parser.c@1.83 +422 -418
+ rlimit cleanup
+
+ ntpd/ntp_parser.h@1.49 +6 -7
+ rlimit cleanup
+
+ ntpd/ntp_parser.y@1.77 +1 -1
+ rlimit cleanup
+
+ChangeSet@1.2822.7.1, 2012-11-18 12:15:34+01:00, jnperlin@armageddon.
+ [Bug 2306] Added user-mode/loop-back PPS API provider for Win32
+
+ ChangeLog@1.1191.6.1 +1 -0
+ [Bug 2306] Added user-mode/loop-back PPS API provider for Win32
+
+ include/ntp_refclock.h@1.36 +4 -0
+ [Bug 2306](user-mode PPS API) add device context handle for Win32
+
+ ports/winnt/include/ntp_iocompletionport.h@1.20 +1 -0
+ [Bug 2306](user-mode PPS API) support clean removal of clocks
+
+ ports/winnt/include/termios.h@1.16 +1 -0
+ [Bug 2306](user-mode PPS API) check for DUPs of serial line device handles
+
+ ports/winnt/libntp/termios.c@1.28 +18 -0
+ [Bug 2306](user-mode PPS API) check for DUPs of serial line device handles
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.67 +383 -64
+ [Bug 2306](user-mode PPS API) provide wiring and lock-free buffers for data exchange with loop-back PPS API
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h@1.1 +714 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt@1.1 +52 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c@1.1 +465 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def@1.1 +9 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h@1.1 +49 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/src/sys/time.h@1.1 +18 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/src/sys/time.h@1.0 +0 -0
+
+ ports/winnt/ppsapi/loopback/src/timepps.h@1.1 +805 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/ppsapi/loopback/src/timepps.h@1.0 +0 -0
+
+ ports/winnt/vs2008/instsrv/instsrv.vcproj@1.6 +25 -20
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.47 +18 -17
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj@1.1 +256 -0
+ [Bug 2306](user-mode PPS API) PPS-API implementation
+
+ ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.14 +25 -21
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/ntp.sln@1.10 +9 -0
+ [Bug 2306](user-mode PPS API) add DLL project
+
+ ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.2 +19 -9
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.45 +25 -24
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/ntpdate/ntpdate.vcproj@1.14 +26 -21
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/ntpdc/ntpdc.vcproj@1.16 +26 -21
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ ports/winnt/vs2008/ntpq/ntpq.vcproj@1.15 +26 -21
+ [Bug 2306](user-mode PPS API) cleanup of build process
+
+ChangeSet@1.2822.1.50, 2012-11-18 03:37:42-05:00, stenn@psp-deb1.ntp.org
+ RLIMIT header cleanup
+
+ ntpd/ntp_config.c@1.308 +3 -0
+ RLIMIT header cleanup
+
+ ntpd/ntpd.c@1.139 +0 -3
+ RLIMIT header cleanup
+
+ChangeSet@1.2822.6.1, 2012-11-15 11:21:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P322
+ TAG: NTP_4_2_7P322
+
+ ChangeLog@1.1191.5.1 +1 -0
+ NTP_4_2_7P322
+
+ ntpd/invoke-ntpd.texi@1.311 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.conf.5man@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.conf.5mdoc@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.conf.man.in@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.conf.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.keys.5man@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.keys.5mdoc@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.keys.man.in@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntp.keys.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntpd-opts.c@1.329 +4 -4
+ NTP_4_2_7P322
+
+ ntpd/ntpd-opts.h@1.329 +3 -3
+ NTP_4_2_7P322
+
+ ntpd/ntpd.1ntpdman@1.140 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntpd.1ntpdmdoc@1.140 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntpd.man.in@1.140 +2 -2
+ NTP_4_2_7P322
+
+ ntpd/ntpd.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/invoke-ntpdc.texi@1.308 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc-opts.c@1.323 +4 -4
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc-opts.h@1.323 +3 -3
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc.1ntpdcman@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc.html@1.151 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc.man.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpdc/ntpdc.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpq/invoke-ntpq.texi@1.310 +2 -2
+ NTP_4_2_7P322
+
+ ntpq/ntpq-opts.c@1.325 +4 -4
+ NTP_4_2_7P322
+
+ ntpq/ntpq-opts.h@1.325 +3 -3
+ NTP_4_2_7P322
+
+ ntpq/ntpq.1ntpqman@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpq/ntpq.1ntpqmdoc@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpq/ntpq.man.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpq/ntpq.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.310 +2 -2
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.325 +4 -4
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.325 +3 -3
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd.man.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ packageinfo.sh@1.325 +1 -1
+ NTP_4_2_7P322
+
+ scripts/invoke-ntp-wait.texi@1.128 +1 -111
+ NTP_4_2_7P322
+
+ scripts/ntp-wait.1ntp-waitman@1.139 +2 -2
+ NTP_4_2_7P322
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.139 +2 -2
+ NTP_4_2_7P322
+
+ scripts/ntp-wait.html@1.143 +4 -152
+ NTP_4_2_7P322
+
+ scripts/ntp-wait.man.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ scripts/ntp-wait.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ sntp/invoke-sntp.texi@1.307 +2 -2
+ NTP_4_2_7P322
+
+ sntp/sntp-opts.c@1.322 +4 -4
+ NTP_4_2_7P322
+
+ sntp/sntp-opts.h@1.322 +3 -3
+ NTP_4_2_7P322
+
+ sntp/sntp.1sntpman@1.142 +2 -2
+ NTP_4_2_7P322
+
+ sntp/sntp.1sntpmdoc@1.142 +2 -2
+ NTP_4_2_7P322
+
+ sntp/sntp.html@1.322 +2 -2
+ NTP_4_2_7P322
+
+ sntp/sntp.man.in@1.142 +2 -2
+ NTP_4_2_7P322
+
+ sntp/sntp.mdoc.in@1.142 +2 -2
+ NTP_4_2_7P322
+
+ util/invoke-ntp-keygen.texi@1.311 +2 -2
+ NTP_4_2_7P322
+
+ util/ntp-keygen-opts.c@1.325 +4 -4
+ NTP_4_2_7P322
+
+ util/ntp-keygen-opts.h@1.325 +3 -3
+ NTP_4_2_7P322
+
+ util/ntp-keygen.1ntp-keygenman@1.139 +2 -2
+ NTP_4_2_7P322
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.139 +2 -2
+ NTP_4_2_7P322
+
+ util/ntp-keygen.man.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ util/ntp-keygen.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P322
+
+ChangeSet@1.2822.1.49, 2012-11-15 04:10:48-05:00, stenn@deacon.udel.edu
+ html/ updates from Dave Mills
+
+ ChangeLog@1.1191.1.44 +1 -0
+ html/ updates from Dave Mills
+
+ html/stats.html@1.1 +70 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/stats.html
+
+ html/stats.html@1.0 +0 -0
+
+ChangeSet@1.2822.5.1, 2012-11-14 22:58:44-08:00, harlan@hms-mbp11.local
+ Documentation updates from Dave Mills.
+
+ html/authentic.html@1.11 +2 -2
+ Updates from Dave Mills
+
+ html/cluster.html@1.8 +7 -7
+ Updates from Dave Mills
+
+ html/discipline.html@1.8 +14 -6
+ Updates from Dave Mills
+
+ html/drivers/driver18.html@1.17.1.1 +3 -3
+ Updates from Dave Mills
+
+ html/drivers/driver20.html@1.26 +1 -1
+ Updates from Dave Mills
+
+ html/drivers/driver36.html@1.34 +6 -6
+ Updates from Dave Mills
+
+ html/drivers/driver6.html@1.28 +3 -3
+ Updates from Dave Mills
+
+ html/drivers/driver7.html@1.29 +2 -2
+ Updates from Dave Mills
+
+ html/filter.html@1.6 +7 -5
+ Updates from Dave Mills
+
+ html/huffpuff.html@1.4 +3 -3
+ Updates from Dave Mills
+
+ html/kern.html@1.20 +1 -1
+ Updates from Dave Mills
+
+ html/leap.html@1.1.1.1 +2 -2
+ Updates from Dave Mills
+
+ html/poll.html@1.3 +10 -8
+ Updates from Dave Mills
+
+ html/pps.html@1.24 +1 -1
+ Updates from Dave Mills
+
+ html/prefer.html@1.31 +30 -29
+ Updates from Dave Mills
+
+ html/quick.html@1.23 +3 -3
+ Updates from Dave Mills
+
+ html/rate.html@1.11 +8 -8
+ Updates from Dave Mills
+
+ html/refclock.html@1.37 +1 -0
+ Updates from Dave Mills
+
+ html/scripts/external.txt@1.6 +1 -0
+ Updates from Dave Mills
+
+ html/scripts/special.txt@1.7 +1 -1
+ Updates from Dave Mills
+
+ html/select.html@1.8 +8 -8
+ Updates from Dave Mills
+
+ html/warp.html@1.22 +27 -39
+ Updates from Dave Mills
+
+ html/xleave.html@1.8 +3 -4
+ Updates from Dave Mills
+
+ChangeSet@1.2822.1.47, 2012-11-14 05:53:00-05:00, stenn@psp-deb1.ntp.org
+ [Bug 2123] cleanup to html/leap.html
+
+ ChangeLog@1.1191.1.43 +1 -0
+ [Bug 2123] cleanup to html/leap.html
+
+ html/leap.html@1.2 +5 -5
+ [Bug 2123] cleanup to html/leap.html
+
+ChangeSet@1.2822.1.46, 2012-11-14 05:07:30-05:00, stenn@deacon.udel.edu
+ for the setrlimit() stuff, use INSIST(), not ASSERT()
+
+ ntpd/ntp_config.c@1.307 +1 -1
+ for the setrlimit() stuff, use INSIST(), not ASSERT()
+
+ChangeSet@1.2822.1.45, 2012-11-14 01:35:24-08:00, harlan@hms-mbp11.local
+ [Bug 2120] no sysexits.h under QNX
+
+ ChangeLog@1.1191.1.42 +1 -0
+ [Bug 2120] no sysexits.h under QNX
+
+ sntp/configure.ac@1.72 +1 -0
+ [Bug 2120] no sysexits.h under QNX
+
+ sntp/m4/ntp_sysexits.m4@1.1 +11 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/sntp/m4/ntp_sysexits.m4
+
+ sntp/m4/ntp_sysexits.m4@1.0 +0 -0
+
+ChangeSet@1.2822.1.44, 2012-11-14 02:38:45-05:00, stenn@psp-deb1.ntp.org
+ Cleanup for bug 1223 - rlimit() updates
+
+ include/ntp_config.h@1.78 +1 -1
+ Cleanup for bug 1223 - rlimit() updates
+
+ ntpd/ntp_config.c@1.306 +38 -18
+ Cleanup for bug 1223 - rlimit() updates
+
+ChangeSet@1.2822.1.43, 2012-11-13 19:27:23-05:00, stenn@psp-deb1.ntp.org
+ Bug 1223 cleanup
+
+ include/ntp_config.h@1.77 +1 -3
+ Bug 1223 cleanup
+
+ ntpd/complete.conf@1.23 +1 -0
+ Bug 1223 cleanup
+
+ ntpd/ntp_config.c@1.305 +68 -66
+ Bug 1223 cleanup
+
+ ntpd/ntpd.c@1.138 +3 -3
+ Bug 1223 cleanup
+
+ChangeSet@1.2822.4.5, 2012-11-13 18:50:25-05:00, stenn@deacon.udel.edu
+ More cleanup of fix for Bug 1320
+
+ ntpd/ntpd.c@1.134.1.3 +8 -4
+ More cleanup of fix for Bug 1320
+
+ChangeSet@1.2822.4.4, 2012-11-13 17:49:10-05:00, stenn@deacon.udel.edu
+ [Bug 1320] Log ntpd's initial command-line parameters - updated fix
+
+ ChangeLog@1.1191.4.4 +1 -0
+ [Bug 1320] Log ntpd's initial command-line parameters - updated fix
+
+ ntpd/ntpd.c@1.134.1.2 +1 -1
+ [Bug 1320] Log ntpd's initial command-line parameters - updated fix
+
+ChangeSet@1.2822.4.3, 2012-11-13 11:33:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P321
+ TAG: NTP_4_2_7P321
+
+ ChangeLog@1.1191.4.3 +1 -0
+ NTP_4_2_7P321
+
+ ntpd/invoke-ntpd.texi@1.310 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.conf.5man@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.conf.5mdoc@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.conf.man.in@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.conf.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.keys.5man@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.keys.5mdoc@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.keys.man.in@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntp.keys.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntpd-opts.c@1.328 +4 -4
+ NTP_4_2_7P321
+
+ ntpd/ntpd-opts.h@1.328 +3 -3
+ NTP_4_2_7P321
+
+ ntpd/ntpd.1ntpdman@1.139 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntpd.1ntpdmdoc@1.139 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntpd.man.in@1.139 +2 -2
+ NTP_4_2_7P321
+
+ ntpd/ntpd.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/invoke-ntpdc.texi@1.307 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc-opts.c@1.322 +4 -4
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc-opts.h@1.322 +3 -3
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc.1ntpdcman@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc.html@1.150 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc.man.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpdc/ntpdc.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpq/invoke-ntpq.texi@1.309 +2 -2
+ NTP_4_2_7P321
+
+ ntpq/ntpq-opts.c@1.324 +4 -4
+ NTP_4_2_7P321
+
+ ntpq/ntpq-opts.h@1.324 +3 -3
+ NTP_4_2_7P321
+
+ ntpq/ntpq.1ntpqman@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpq/ntpq.1ntpqmdoc@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpq/ntpq.man.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpq/ntpq.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.309 +2 -2
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.324 +4 -4
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.324 +3 -3
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd.man.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ packageinfo.sh@1.324 +1 -1
+ NTP_4_2_7P321
+
+ scripts/invoke-ntp-wait.texi@1.127 +1 -1
+ NTP_4_2_7P321
+
+ scripts/ntp-wait.1ntp-waitman@1.138 +2 -2
+ NTP_4_2_7P321
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.138 +2 -2
+ NTP_4_2_7P321
+
+ scripts/ntp-wait.html@1.142 +1 -1
+ NTP_4_2_7P321
+
+ scripts/ntp-wait.man.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ scripts/ntp-wait.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ sntp/invoke-sntp.texi@1.306 +2 -2
+ NTP_4_2_7P321
+
+ sntp/sntp-opts.c@1.321 +4 -4
+ NTP_4_2_7P321
+
+ sntp/sntp-opts.h@1.321 +3 -3
+ NTP_4_2_7P321
+
+ sntp/sntp.1sntpman@1.141 +2 -2
+ NTP_4_2_7P321
+
+ sntp/sntp.1sntpmdoc@1.141 +2 -2
+ NTP_4_2_7P321
+
+ sntp/sntp.html@1.321 +2 -2
+ NTP_4_2_7P321
+
+ sntp/sntp.man.in@1.141 +2 -2
+ NTP_4_2_7P321
+
+ sntp/sntp.mdoc.in@1.141 +2 -2
+ NTP_4_2_7P321
+
+ util/invoke-ntp-keygen.texi@1.310 +2 -2
+ NTP_4_2_7P321
+
+ util/ntp-keygen-opts.c@1.324 +4 -4
+ NTP_4_2_7P321
+
+ util/ntp-keygen-opts.h@1.324 +3 -3
+ NTP_4_2_7P321
+
+ util/ntp-keygen.1ntp-keygenman@1.138 +2 -2
+ NTP_4_2_7P321
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.138 +2 -2
+ NTP_4_2_7P321
+
+ util/ntp-keygen.man.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ util/ntp-keygen.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P321
+
+ChangeSet@1.2822.4.2, 2012-11-13 03:59:29-05:00, stenn@psp-deb1.ntp.org
+ Fix typo: [Bug 1320] Log ntpd's initial command-line parameters
+
+ ChangeLog@1.1191.4.2 +1 -1
+ Fix typo: [Bug 1320] Log ntpd's initial command-line parameters
+
+ChangeSet@1.2822.4.1, 2012-11-13 03:57:34-05:00, stenn@psp-deb1.ntp.org
+ [Bug 1320] Log ntpd's initial command-line paprameters
+
+ ChangeLog@1.1191.4.1 +1 -0
+ [Bug 1320] Log ntpd's initial command-line paprameters
+
+ ntpd/ntpd.c@1.134.1.1 +18 -0
+ [Bug 1320] Log ntpd's initial command-line paprameters
+
+ChangeSet@1.2822.1.40, 2012-11-12 22:56:50-05:00, stenn@psp-deb1.ntp.org
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ChangeLog@1.1191.1.39 +2 -0
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ configure.ac@1.552 +54 -0
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ html/miscopt.html@1.70 +10 -0
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ include/ntp_config.h@1.76 +6 -0
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/keyword-gen-utd@1.19 +1 -1
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/keyword-gen.c@1.24 +4 -0
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntp_config.c@1.304 +124 -15
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntp_keyword.h@1.21 +584 -566
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntp_parser.c@1.82 +1181 -1138
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntp_parser.h@1.48 +201 -194
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntp_parser.y@1.76 +48 -1
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ ntpd/ntpd.c@1.135 +2 -18
+ [Bug 1223] Allow configurable values for RLIMIT_STACK and RLIMIT_MEMLOCK
+
+ChangeSet@1.2822.1.39, 2012-11-12 11:34:28+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P320
+ TAG: NTP_4_2_7P320
+
+ ChangeLog@1.1191.1.38 +1 -0
+ NTP_4_2_7P320
+
+ ntpd/invoke-ntpd.texi@1.309 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.conf.5man@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.conf.5mdoc@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.conf.man.in@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.conf.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.keys.5man@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.keys.5mdoc@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.keys.man.in@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntp.keys.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntpd-opts.c@1.327 +4 -4
+ NTP_4_2_7P320
+
+ ntpd/ntpd-opts.h@1.327 +3 -3
+ NTP_4_2_7P320
+
+ ntpd/ntpd.1ntpdman@1.138 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntpd.1ntpdmdoc@1.138 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntpd.man.in@1.138 +2 -2
+ NTP_4_2_7P320
+
+ ntpd/ntpd.mdoc.in@1.138 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/invoke-ntpdc.texi@1.306 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc-opts.c@1.321 +4 -4
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc-opts.h@1.321 +3 -3
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc.1ntpdcman@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc.html@1.149 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc.man.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpdc/ntpdc.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpq/invoke-ntpq.texi@1.308 +2 -2
+ NTP_4_2_7P320
+
+ ntpq/ntpq-opts.c@1.323 +4 -4
+ NTP_4_2_7P320
+
+ ntpq/ntpq-opts.h@1.323 +3 -3
+ NTP_4_2_7P320
+
+ ntpq/ntpq.1ntpqman@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpq/ntpq.1ntpqmdoc@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpq/ntpq.man.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpq/ntpq.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.308 +2 -2
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.323 +4 -4
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.323 +3 -3
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd.man.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ packageinfo.sh@1.323 +1 -1
+ NTP_4_2_7P320
+
+ scripts/invoke-ntp-wait.texi@1.126 +1 -1
+ NTP_4_2_7P320
+
+ scripts/ntp-wait.1ntp-waitman@1.137 +2 -2
+ NTP_4_2_7P320
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.137 +2 -2
+ NTP_4_2_7P320
+
+ scripts/ntp-wait.html@1.141 +1 -1
+ NTP_4_2_7P320
+
+ scripts/ntp-wait.man.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ scripts/ntp-wait.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ sntp/invoke-sntp.texi@1.305 +2 -2
+ NTP_4_2_7P320
+
+ sntp/sntp-opts.c@1.320 +4 -4
+ NTP_4_2_7P320
+
+ sntp/sntp-opts.h@1.320 +3 -3
+ NTP_4_2_7P320
+
+ sntp/sntp.1sntpman@1.140 +2 -2
+ NTP_4_2_7P320
+
+ sntp/sntp.1sntpmdoc@1.140 +2 -2
+ NTP_4_2_7P320
+
+ sntp/sntp.html@1.320 +2 -2
+ NTP_4_2_7P320
+
+ sntp/sntp.man.in@1.140 +2 -2
+ NTP_4_2_7P320
+
+ sntp/sntp.mdoc.in@1.140 +2 -2
+ NTP_4_2_7P320
+
+ util/invoke-ntp-keygen.texi@1.309 +2 -2
+ NTP_4_2_7P320
+
+ util/ntp-keygen-opts.c@1.323 +4 -4
+ NTP_4_2_7P320
+
+ util/ntp-keygen-opts.h@1.323 +3 -3
+ NTP_4_2_7P320
+
+ util/ntp-keygen.1ntp-keygenman@1.137 +2 -2
+ NTP_4_2_7P320
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.137 +2 -2
+ NTP_4_2_7P320
+
+ util/ntp-keygen.man.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ util/ntp-keygen.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P320
+
+ChangeSet@1.2822.1.38, 2012-11-12 00:58:20-05:00, stenn@deacon.udel.edu
+ [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong version
+
+ ChangeLog@1.1191.1.37 +2 -0
+ [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong version
+
+ lib/isc/unix/ifiter_sysctl.c@1.18 +4 -0
+ [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong version
+
+ChangeSet@1.2822.1.37, 2012-11-11 20:09:21-05:00, stenn@psp-deb1.ntp.org
+ [Bug 969] Clarify ntpdate.html documentation about -u and ntpd
+
+ ChangeLog@1.1191.1.36 +1 -0
+ [Bug 969] Clarify ntpdate.html documentation about -u and ntpd
+
+ html/ntpdate.html@1.22 +1 -1
+ [Bug 969] Clarify ntpdate.html documentation about -u and ntpd
+
+ChangeSet@1.2822.1.36, 2012-11-11 11:38:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P319
+ TAG: NTP_4_2_7P319
+
+ ChangeLog@1.1191.1.35 +1 -0
+ NTP_4_2_7P319
+
+ ntpd/invoke-ntpd.texi@1.308 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.conf.5man@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.conf.5mdoc@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.conf.man.in@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.conf.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.keys.5man@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.keys.5mdoc@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.keys.man.in@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntp.keys.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntpd-opts.c@1.326 +4 -4
+ NTP_4_2_7P319
+
+ ntpd/ntpd-opts.h@1.326 +3 -3
+ NTP_4_2_7P319
+
+ ntpd/ntpd.1ntpdman@1.137 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntpd.1ntpdmdoc@1.137 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntpd.man.in@1.137 +2 -2
+ NTP_4_2_7P319
+
+ ntpd/ntpd.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/invoke-ntpdc.texi@1.305 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc-opts.c@1.320 +4 -4
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc-opts.h@1.320 +3 -3
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc.1ntpdcman@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc.html@1.148 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc.man.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpdc/ntpdc.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpq/invoke-ntpq.texi@1.307 +2 -2
+ NTP_4_2_7P319
+
+ ntpq/ntpq-opts.c@1.322 +4 -4
+ NTP_4_2_7P319
+
+ ntpq/ntpq-opts.h@1.322 +3 -3
+ NTP_4_2_7P319
+
+ ntpq/ntpq.1ntpqman@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpq/ntpq.1ntpqmdoc@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpq/ntpq.man.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpq/ntpq.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.307 +2 -2
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.322 +4 -4
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.322 +3 -3
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd.man.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ packageinfo.sh@1.322 +1 -1
+ NTP_4_2_7P319
+
+ scripts/invoke-ntp-wait.texi@1.125 +1 -1
+ NTP_4_2_7P319
+
+ scripts/ntp-wait.1ntp-waitman@1.136 +2 -2
+ NTP_4_2_7P319
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.136 +2 -2
+ NTP_4_2_7P319
+
+ scripts/ntp-wait.html@1.140 +1 -1
+ NTP_4_2_7P319
+
+ scripts/ntp-wait.man.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ scripts/ntp-wait.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ sntp/invoke-sntp.texi@1.304 +2 -2
+ NTP_4_2_7P319
+
+ sntp/sntp-opts.c@1.319 +4 -4
+ NTP_4_2_7P319
+
+ sntp/sntp-opts.h@1.319 +3 -3
+ NTP_4_2_7P319
+
+ sntp/sntp.1sntpman@1.139 +2 -2
+ NTP_4_2_7P319
+
+ sntp/sntp.1sntpmdoc@1.139 +2 -2
+ NTP_4_2_7P319
+
+ sntp/sntp.html@1.319 +2 -2
+ NTP_4_2_7P319
+
+ sntp/sntp.man.in@1.139 +2 -2
+ NTP_4_2_7P319
+
+ sntp/sntp.mdoc.in@1.139 +2 -2
+ NTP_4_2_7P319
+
+ util/invoke-ntp-keygen.texi@1.308 +2 -2
+ NTP_4_2_7P319
+
+ util/ntp-keygen-opts.c@1.322 +4 -4
+ NTP_4_2_7P319
+
+ util/ntp-keygen-opts.h@1.322 +3 -3
+ NTP_4_2_7P319
+
+ util/ntp-keygen.1ntp-keygenman@1.136 +2 -2
+ NTP_4_2_7P319
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.136 +2 -2
+ NTP_4_2_7P319
+
+ util/ntp-keygen.man.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ util/ntp-keygen.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P319
+
+ChangeSet@1.2822.1.35, 2012-11-11 03:49:15-05:00, stenn@deacon.udel.edu
+ [Bug 2296] Fix compile problem with building with old OpenSSL
+
+ ChangeLog@1.1191.1.34 +1 -0
+ [Bug 2296] Fix compile problem with building with old OpenSSL
+
+ libntp/a_md5encrypt.c@1.34 +14 -0
+ [Bug 2296] Fix compile problem with building with old OpenSSL
+
+ChangeSet@1.2822.1.34, 2012-11-05 11:28:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P318
+ TAG: NTP_4_2_7P318
+
+ ChangeLog@1.1191.1.33 +1 -0
+ NTP_4_2_7P318
+
+ ntpd/invoke-ntpd.texi@1.307 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntp.conf.5man@1.24 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntp.conf.5mdoc@1.24 +1 -1
+ NTP_4_2_7P318
+
+ ntpd/ntp.conf.man.in@1.24 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntp.conf.mdoc.in@1.24 +1 -1
+ NTP_4_2_7P318
+
+ ntpd/ntp.keys.5man@1.24 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntp.keys.5mdoc@1.24 +1 -1
+ NTP_4_2_7P318
+
+ ntpd/ntp.keys.man.in@1.24 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntp.keys.mdoc.in@1.24 +1 -1
+ NTP_4_2_7P318
+
+ ntpd/ntpd-opts.c@1.325 +4 -4
+ NTP_4_2_7P318
+
+ ntpd/ntpd-opts.h@1.325 +3 -3
+ NTP_4_2_7P318
+
+ ntpd/ntpd.1ntpdman@1.136 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntpd.1ntpdmdoc@1.136 +1 -1
+ NTP_4_2_7P318
+
+ ntpd/ntpd.man.in@1.136 +2 -2
+ NTP_4_2_7P318
+
+ ntpd/ntpd.mdoc.in@1.136 +1 -1
+ NTP_4_2_7P318
+
+ ntpdc/invoke-ntpdc.texi@1.304 +2 -2
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc-opts.c@1.319 +4 -4
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc-opts.h@1.319 +3 -3
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc.1ntpdcman@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.135 +1 -1
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc.html@1.147 +2 -2
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc.man.in@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpdc/ntpdc.mdoc.in@1.135 +1 -1
+ NTP_4_2_7P318
+
+ ntpq/invoke-ntpq.texi@1.306 +2 -2
+ NTP_4_2_7P318
+
+ ntpq/ntpq-opts.c@1.321 +4 -4
+ NTP_4_2_7P318
+
+ ntpq/ntpq-opts.h@1.321 +3 -3
+ NTP_4_2_7P318
+
+ ntpq/ntpq.1ntpqman@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpq/ntpq.1ntpqmdoc@1.135 +1 -1
+ NTP_4_2_7P318
+
+ ntpq/ntpq.man.in@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpq/ntpq.mdoc.in@1.135 +1 -1
+ NTP_4_2_7P318
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.306 +2 -2
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.321 +4 -4
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.321 +3 -3
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.135 +1 -1
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd.man.in@1.135 +2 -2
+ NTP_4_2_7P318
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.135 +1 -1
+ NTP_4_2_7P318
+
+ packageinfo.sh@1.321 +1 -1
+ NTP_4_2_7P318
+
+ scripts/invoke-ntp-wait.texi@1.124 +1 -1
+ NTP_4_2_7P318
+
+ scripts/ntp-wait.1ntp-waitman@1.135 +2 -2
+ NTP_4_2_7P318
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.135 +1 -1
+ NTP_4_2_7P318
+
+ scripts/ntp-wait.html@1.139 +1 -1
+ NTP_4_2_7P318
+
+ scripts/ntp-wait.man.in@1.135 +2 -2
+ NTP_4_2_7P318
+
+ scripts/ntp-wait.mdoc.in@1.135 +1 -1
+ NTP_4_2_7P318
+
+ sntp/invoke-sntp.texi@1.303 +2 -2
+ NTP_4_2_7P318
+
+ sntp/sntp-opts.c@1.318 +4 -4
+ NTP_4_2_7P318
+
+ sntp/sntp-opts.h@1.318 +3 -3
+ NTP_4_2_7P318
+
+ sntp/sntp.1sntpman@1.138 +2 -2
+ NTP_4_2_7P318
+
+ sntp/sntp.1sntpmdoc@1.138 +1 -1
+ NTP_4_2_7P318
+
+ sntp/sntp.html@1.318 +2 -2
+ NTP_4_2_7P318
+
+ sntp/sntp.man.in@1.138 +2 -2
+ NTP_4_2_7P318
+
+ sntp/sntp.mdoc.in@1.138 +1 -1
+ NTP_4_2_7P318
+
+ util/invoke-ntp-keygen.texi@1.307 +2 -2
+ NTP_4_2_7P318
+
+ util/ntp-keygen-opts.c@1.321 +4 -4
+ NTP_4_2_7P318
+
+ util/ntp-keygen-opts.h@1.321 +3 -3
+ NTP_4_2_7P318
+
+ util/ntp-keygen.1ntp-keygenman@1.135 +2 -2
+ NTP_4_2_7P318
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.135 +1 -1
+ NTP_4_2_7P318
+
+ util/ntp-keygen.man.in@1.135 +2 -2
+ NTP_4_2_7P318
+
+ util/ntp-keygen.mdoc.in@1.135 +1 -1
+ NTP_4_2_7P318
+
+ChangeSet@1.2822.1.33, 2012-11-05 02:09:35-05:00, stenn@deacon.udel.edu
+ [Bug 2301] Remove spurious debug output from ntpq
+
+ ChangeLog@1.1191.1.32 +1 -0
+ [Bug 2301] Remove spurious debug output from ntpq
+
+ ntpq/ntpq.c@1.151 +0 -1
+ [Bug 2301] Remove spurious debug output from ntpq
+
+ChangeSet@1.2822.1.32, 2012-11-05 06:02:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P317
+ TAG: NTP_4_2_7P317
+
+ ChangeLog@1.1191.1.31 +1 -0
+ NTP_4_2_7P317
+
+ ntpd/invoke-ntpd.texi@1.306 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.conf.5man@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.conf.5mdoc@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.conf.man.in@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.conf.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.keys.5man@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.keys.5mdoc@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.keys.man.in@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntp.keys.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntpd-opts.c@1.324 +4 -4
+ NTP_4_2_7P317
+
+ ntpd/ntpd-opts.h@1.324 +3 -3
+ NTP_4_2_7P317
+
+ ntpd/ntpd.1ntpdman@1.135 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntpd.1ntpdmdoc@1.135 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntpd.man.in@1.135 +2 -2
+ NTP_4_2_7P317
+
+ ntpd/ntpd.mdoc.in@1.135 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/invoke-ntpdc.texi@1.303 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc-opts.c@1.318 +4 -4
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc-opts.h@1.318 +3 -3
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc.1ntpdcman@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc.html@1.146 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc.man.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpdc/ntpdc.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpq/invoke-ntpq.texi@1.305 +2 -2
+ NTP_4_2_7P317
+
+ ntpq/ntpq-opts.c@1.320 +4 -4
+ NTP_4_2_7P317
+
+ ntpq/ntpq-opts.h@1.320 +3 -3
+ NTP_4_2_7P317
+
+ ntpq/ntpq.1ntpqman@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpq/ntpq.1ntpqmdoc@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpq/ntpq.man.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpq/ntpq.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.305 +2 -2
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.320 +4 -4
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.320 +3 -3
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd.man.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ packageinfo.sh@1.320 +1 -1
+ NTP_4_2_7P317
+
+ scripts/invoke-ntp-wait.texi@1.123 +14 -2
+ NTP_4_2_7P317
+
+ scripts/ntp-wait.1ntp-waitman@1.134 +2 -2
+ NTP_4_2_7P317
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.134 +2 -2
+ NTP_4_2_7P317
+
+ scripts/ntp-wait.html@1.138 +14 -2
+ NTP_4_2_7P317
+
+ scripts/ntp-wait.man.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ scripts/ntp-wait.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ sntp/invoke-sntp.texi@1.302 +2 -2
+ NTP_4_2_7P317
+
+ sntp/sntp-opts.c@1.317 +4 -4
+ NTP_4_2_7P317
+
+ sntp/sntp-opts.h@1.317 +3 -3
+ NTP_4_2_7P317
+
+ sntp/sntp.1sntpman@1.137 +2 -2
+ NTP_4_2_7P317
+
+ sntp/sntp.1sntpmdoc@1.137 +2 -2
+ NTP_4_2_7P317
+
+ sntp/sntp.html@1.317 +2 -2
+ NTP_4_2_7P317
+
+ sntp/sntp.man.in@1.137 +2 -2
+ NTP_4_2_7P317
+
+ sntp/sntp.mdoc.in@1.137 +2 -2
+ NTP_4_2_7P317
+
+ util/invoke-ntp-keygen.texi@1.306 +2 -2
+ NTP_4_2_7P317
+
+ util/ntp-keygen-opts.c@1.320 +4 -4
+ NTP_4_2_7P317
+
+ util/ntp-keygen-opts.h@1.320 +3 -3
+ NTP_4_2_7P317
+
+ util/ntp-keygen.1ntp-keygenman@1.134 +2 -2
+ NTP_4_2_7P317
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.134 +2 -2
+ NTP_4_2_7P317
+
+ util/ntp-keygen.man.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ util/ntp-keygen.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P317
+
+ChangeSet@1.2822.1.31, 2012-11-05 02:34:01+00:00, stenn@psp-fb1.ntp.org
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ChangeLog@1.1191.1.30 +1 -0
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpq/libntpq.c@1.12 +7 -2
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpq/libntpq.h@1.9 +1 -1
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpq/ntpq-subs.c@1.98 +2 -3
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpq/ntpq.c@1.150 +54 -14
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpq/ntpq.h@1.28 +8 -0
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ ntpsnmpd/ntpsnmpd.c@1.8 +1 -1
+ [Bug 922] Allow interspersed -4 and -6 flags on the ntpq command line
+
+ChangeSet@1.2822.1.30, 2012-10-27 11:26:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P316
+ TAG: NTP_4_2_7P316
+
+ ChangeLog@1.1191.1.29 +1 -0
+ NTP_4_2_7P316
+
+ ntpd/invoke-ntpd.texi@1.305 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.conf.5man@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.conf.5mdoc@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.conf.man.in@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.conf.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.keys.5man@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.keys.5mdoc@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.keys.man.in@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntp.keys.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntpd-opts.c@1.323 +4 -4
+ NTP_4_2_7P316
+
+ ntpd/ntpd-opts.h@1.323 +3 -3
+ NTP_4_2_7P316
+
+ ntpd/ntpd.1ntpdman@1.134 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntpd.1ntpdmdoc@1.134 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntpd.man.in@1.134 +2 -2
+ NTP_4_2_7P316
+
+ ntpd/ntpd.mdoc.in@1.134 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/invoke-ntpdc.texi@1.302 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc-opts.c@1.317 +4 -4
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc-opts.h@1.317 +3 -3
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc.1ntpdcman@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc.html@1.145 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc.man.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpdc/ntpdc.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpq/invoke-ntpq.texi@1.304 +2 -2
+ NTP_4_2_7P316
+
+ ntpq/ntpq-opts.c@1.319 +4 -4
+ NTP_4_2_7P316
+
+ ntpq/ntpq-opts.h@1.319 +3 -3
+ NTP_4_2_7P316
+
+ ntpq/ntpq.1ntpqman@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpq/ntpq.1ntpqmdoc@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpq/ntpq.man.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpq/ntpq.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.304 +2 -2
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.319 +4 -4
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.319 +3 -3
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd.man.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ packageinfo.sh@1.319 +1 -1
+ NTP_4_2_7P316
+
+ scripts/invoke-ntp-wait.texi@1.122 +1 -1
+ NTP_4_2_7P316
+
+ scripts/ntp-wait.1ntp-waitman@1.133 +2 -2
+ NTP_4_2_7P316
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.133 +2 -2
+ NTP_4_2_7P316
+
+ scripts/ntp-wait.html@1.137 +1 -1
+ NTP_4_2_7P316
+
+ scripts/ntp-wait.man.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ scripts/ntp-wait.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ sntp/invoke-sntp.texi@1.301 +2 -2
+ NTP_4_2_7P316
+
+ sntp/sntp-opts.c@1.316 +4 -4
+ NTP_4_2_7P316
+
+ sntp/sntp-opts.h@1.316 +3 -3
+ NTP_4_2_7P316
+
+ sntp/sntp.1sntpman@1.136 +2 -2
+ NTP_4_2_7P316
+
+ sntp/sntp.1sntpmdoc@1.136 +2 -2
+ NTP_4_2_7P316
+
+ sntp/sntp.html@1.316 +2 -2
+ NTP_4_2_7P316
+
+ sntp/sntp.man.in@1.136 +2 -2
+ NTP_4_2_7P316
+
+ sntp/sntp.mdoc.in@1.136 +2 -2
+ NTP_4_2_7P316
+
+ util/invoke-ntp-keygen.texi@1.305 +2 -2
+ NTP_4_2_7P316
+
+ util/ntp-keygen-opts.c@1.319 +4 -4
+ NTP_4_2_7P316
+
+ util/ntp-keygen-opts.h@1.319 +3 -3
+ NTP_4_2_7P316
+
+ util/ntp-keygen.1ntp-keygenman@1.133 +2 -2
+ NTP_4_2_7P316
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.133 +2 -2
+ NTP_4_2_7P316
+
+ util/ntp-keygen.man.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ util/ntp-keygen.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P316
+
+ChangeSet@1.2822.1.29, 2012-10-26 13:37:56-04:00, stenn@deacon.udel.edu
+ [Bug 2296] Update fix for Bug 2294 to handle --without-crypto
+
+ ChangeLog@1.1191.1.28 +1 -0
+ [Bug 2296] Update fix for Bug 2294 to handle --without-crypto
+
+ include/ntp_md5.h@1.9 +5 -1
+ [Bug 2296] Update fix for Bug 2294 to handle --without-crypto
+
+ChangeSet@1.2822.1.28, 2012-10-26 07:13:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P315
+ TAG: NTP_4_2_7P315
+
+ ChangeLog@1.1191.1.27 +1 -0
+ NTP_4_2_7P315
+
+ ntpd/invoke-ntpd.texi@1.304 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.conf.5man@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.conf.5mdoc@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.conf.man.in@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.conf.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.keys.5man@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.keys.5mdoc@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.keys.man.in@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntp.keys.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntpd-opts.c@1.322 +4 -4
+ NTP_4_2_7P315
+
+ ntpd/ntpd-opts.h@1.322 +3 -3
+ NTP_4_2_7P315
+
+ ntpd/ntpd.1ntpdman@1.133 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntpd.1ntpdmdoc@1.133 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntpd.man.in@1.133 +2 -2
+ NTP_4_2_7P315
+
+ ntpd/ntpd.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/invoke-ntpdc.texi@1.301 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc-opts.c@1.316 +4 -4
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc-opts.h@1.316 +3 -3
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc.1ntpdcman@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc.html@1.144 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc.man.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpdc/ntpdc.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpq/invoke-ntpq.texi@1.303 +2 -2
+ NTP_4_2_7P315
+
+ ntpq/ntpq-opts.c@1.318 +4 -4
+ NTP_4_2_7P315
+
+ ntpq/ntpq-opts.h@1.318 +3 -3
+ NTP_4_2_7P315
+
+ ntpq/ntpq.1ntpqman@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpq/ntpq.1ntpqmdoc@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpq/ntpq.man.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpq/ntpq.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.303 +2 -2
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.318 +4 -4
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.318 +3 -3
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd.man.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ packageinfo.sh@1.318 +1 -1
+ NTP_4_2_7P315
+
+ scripts/invoke-ntp-wait.texi@1.121 +1 -1
+ NTP_4_2_7P315
+
+ scripts/ntp-wait.1ntp-waitman@1.132 +2 -2
+ NTP_4_2_7P315
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.132 +2 -2
+ NTP_4_2_7P315
+
+ scripts/ntp-wait.html@1.136 +1 -1
+ NTP_4_2_7P315
+
+ scripts/ntp-wait.man.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ scripts/ntp-wait.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ sntp/invoke-sntp.texi@1.300 +2 -2
+ NTP_4_2_7P315
+
+ sntp/sntp-opts.c@1.315 +4 -4
+ NTP_4_2_7P315
+
+ sntp/sntp-opts.h@1.315 +3 -3
+ NTP_4_2_7P315
+
+ sntp/sntp.1sntpman@1.135 +2 -2
+ NTP_4_2_7P315
+
+ sntp/sntp.1sntpmdoc@1.135 +2 -2
+ NTP_4_2_7P315
+
+ sntp/sntp.html@1.315 +2 -2
+ NTP_4_2_7P315
+
+ sntp/sntp.man.in@1.135 +2 -2
+ NTP_4_2_7P315
+
+ sntp/sntp.mdoc.in@1.135 +2 -2
+ NTP_4_2_7P315
+
+ util/invoke-ntp-keygen.texi@1.304 +2 -2
+ NTP_4_2_7P315
+
+ util/ntp-keygen-opts.c@1.318 +4 -4
+ NTP_4_2_7P315
+
+ util/ntp-keygen-opts.h@1.318 +3 -3
+ NTP_4_2_7P315
+
+ util/ntp-keygen.1ntp-keygenman@1.132 +2 -2
+ NTP_4_2_7P315
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.132 +2 -2
+ NTP_4_2_7P315
+
+ util/ntp-keygen.man.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ util/ntp-keygen.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P315
+
+ChangeSet@1.2822.1.27, 2012-10-26 02:23:16-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2294] ntpd crashes in FIPS mode
+
+ ChangeLog@1.1191.1.26 +1 -0
+ [Bug 2294] ntpd crashes in FIPS mode
+
+ libntp/a_md5encrypt.c@1.33 +20 -3
+ [Bug 2294] ntpd crashes in FIPS mode
+
+ChangeSet@1.2822.1.26, 2012-10-23 11:32:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P314
+ TAG: NTP_4_2_7P314
+
+ ChangeLog@1.1191.1.25 +1 -0
+ NTP_4_2_7P314
+
+ ntpd/invoke-ntpd.texi@1.303 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntp.conf.5man@1.20 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntp.conf.5mdoc@1.20 +1 -1
+ NTP_4_2_7P314
+
+ ntpd/ntp.conf.man.in@1.20 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntp.conf.mdoc.in@1.20 +1 -1
+ NTP_4_2_7P314
+
+ ntpd/ntp.keys.5man@1.20 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntp.keys.5mdoc@1.20 +1 -1
+ NTP_4_2_7P314
+
+ ntpd/ntp.keys.man.in@1.20 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntp.keys.mdoc.in@1.20 +1 -1
+ NTP_4_2_7P314
+
+ ntpd/ntpd-opts.c@1.321 +4 -4
+ NTP_4_2_7P314
+
+ ntpd/ntpd-opts.h@1.321 +3 -3
+ NTP_4_2_7P314
+
+ ntpd/ntpd.1ntpdman@1.132 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntpd.1ntpdmdoc@1.132 +1 -1
+ NTP_4_2_7P314
+
+ ntpd/ntpd.man.in@1.132 +2 -2
+ NTP_4_2_7P314
+
+ ntpd/ntpd.mdoc.in@1.132 +1 -1
+ NTP_4_2_7P314
+
+ ntpdc/invoke-ntpdc.texi@1.300 +2 -2
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc-opts.c@1.315 +4 -4
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc-opts.h@1.315 +3 -3
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc.1ntpdcman@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.131 +1 -1
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc.html@1.143 +2 -2
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc.man.in@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpdc/ntpdc.mdoc.in@1.131 +1 -1
+ NTP_4_2_7P314
+
+ ntpq/invoke-ntpq.texi@1.302 +2 -2
+ NTP_4_2_7P314
+
+ ntpq/ntpq-opts.c@1.317 +4 -4
+ NTP_4_2_7P314
+
+ ntpq/ntpq-opts.h@1.317 +3 -3
+ NTP_4_2_7P314
+
+ ntpq/ntpq.1ntpqman@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpq/ntpq.1ntpqmdoc@1.131 +1 -1
+ NTP_4_2_7P314
+
+ ntpq/ntpq.man.in@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpq/ntpq.mdoc.in@1.131 +1 -1
+ NTP_4_2_7P314
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.302 +2 -2
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.317 +4 -4
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.317 +3 -3
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.131 +1 -1
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd.man.in@1.131 +2 -2
+ NTP_4_2_7P314
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.131 +1 -1
+ NTP_4_2_7P314
+
+ packageinfo.sh@1.317 +1 -1
+ NTP_4_2_7P314
+
+ scripts/invoke-ntp-wait.texi@1.120 +1 -1
+ NTP_4_2_7P314
+
+ scripts/ntp-wait.1ntp-waitman@1.131 +2 -2
+ NTP_4_2_7P314
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.131 +1 -1
+ NTP_4_2_7P314
+
+ scripts/ntp-wait.html@1.135 +1 -1
+ NTP_4_2_7P314
+
+ scripts/ntp-wait.man.in@1.131 +2 -2
+ NTP_4_2_7P314
+
+ scripts/ntp-wait.mdoc.in@1.131 +1 -1
+ NTP_4_2_7P314
+
+ sntp/invoke-sntp.texi@1.299 +2 -2
+ NTP_4_2_7P314
+
+ sntp/sntp-opts.c@1.314 +4 -4
+ NTP_4_2_7P314
+
+ sntp/sntp-opts.h@1.314 +3 -3
+ NTP_4_2_7P314
+
+ sntp/sntp.1sntpman@1.134 +2 -2
+ NTP_4_2_7P314
+
+ sntp/sntp.1sntpmdoc@1.134 +1 -1
+ NTP_4_2_7P314
+
+ sntp/sntp.html@1.314 +2 -2
+ NTP_4_2_7P314
+
+ sntp/sntp.man.in@1.134 +2 -2
+ NTP_4_2_7P314
+
+ sntp/sntp.mdoc.in@1.134 +1 -1
+ NTP_4_2_7P314
+
+ util/invoke-ntp-keygen.texi@1.303 +2 -2
+ NTP_4_2_7P314
+
+ util/ntp-keygen-opts.c@1.317 +4 -4
+ NTP_4_2_7P314
+
+ util/ntp-keygen-opts.h@1.317 +3 -3
+ NTP_4_2_7P314
+
+ util/ntp-keygen.1ntp-keygenman@1.131 +2 -2
+ NTP_4_2_7P314
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.131 +1 -1
+ NTP_4_2_7P314
+
+ util/ntp-keygen.man.in@1.131 +2 -2
+ NTP_4_2_7P314
+
+ util/ntp-keygen.mdoc.in@1.131 +1 -1
+ NTP_4_2_7P314
+
+ChangeSet@1.2822.1.25, 2012-10-23 08:43:55+00:00, stenn@psp-fb1.ntp.org
+ Document a tricky malloc() of dns_ctx in sntp
+
+ ChangeLog@1.1191.1.24 +1 -0
+ Document a tricky malloc() of dns_ctx in sntp
+
+ sntp/main.c@1.86 +5 -5
+ Document a tricky malloc() of dns_ctx in sntp
+
+ChangeSet@1.2822.1.24, 2012-10-23 06:09:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P313
+ TAG: NTP_4_2_7P313
+
+ ChangeLog@1.1191.1.23 +1 -0
+ NTP_4_2_7P313
+
+ ntpd/invoke-ntpd.texi@1.302 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.conf.5man@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.conf.5mdoc@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.conf.man.in@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.conf.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.keys.5man@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.keys.5mdoc@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.keys.man.in@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntp.keys.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntpd-opts.c@1.320 +4 -4
+ NTP_4_2_7P313
+
+ ntpd/ntpd-opts.h@1.320 +3 -3
+ NTP_4_2_7P313
+
+ ntpd/ntpd.1ntpdman@1.131 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntpd.1ntpdmdoc@1.131 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntpd.man.in@1.131 +2 -2
+ NTP_4_2_7P313
+
+ ntpd/ntpd.mdoc.in@1.131 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/invoke-ntpdc.texi@1.299 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc-opts.c@1.314 +4 -4
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc-opts.h@1.314 +3 -3
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc.1ntpdcman@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc.html@1.142 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc.man.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpdc/ntpdc.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpq/invoke-ntpq.texi@1.301 +2 -2
+ NTP_4_2_7P313
+
+ ntpq/ntpq-opts.c@1.316 +4 -4
+ NTP_4_2_7P313
+
+ ntpq/ntpq-opts.h@1.316 +3 -3
+ NTP_4_2_7P313
+
+ ntpq/ntpq.1ntpqman@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpq/ntpq.1ntpqmdoc@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpq/ntpq.man.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpq/ntpq.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.301 +2 -2
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.316 +4 -4
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.316 +3 -3
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd.man.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ packageinfo.sh@1.316 +1 -1
+ NTP_4_2_7P313
+
+ scripts/invoke-ntp-wait.texi@1.119 +2 -14
+ NTP_4_2_7P313
+
+ scripts/ntp-wait.1ntp-waitman@1.130 +2 -2
+ NTP_4_2_7P313
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.130 +2 -2
+ NTP_4_2_7P313
+
+ scripts/ntp-wait.html@1.134 +2 -14
+ NTP_4_2_7P313
+
+ scripts/ntp-wait.man.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ scripts/ntp-wait.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ sntp/invoke-sntp.texi@1.298 +2 -2
+ NTP_4_2_7P313
+
+ sntp/sntp-opts.c@1.313 +4 -4
+ NTP_4_2_7P313
+
+ sntp/sntp-opts.h@1.313 +3 -3
+ NTP_4_2_7P313
+
+ sntp/sntp.1sntpman@1.133 +2 -2
+ NTP_4_2_7P313
+
+ sntp/sntp.1sntpmdoc@1.133 +2 -2
+ NTP_4_2_7P313
+
+ sntp/sntp.html@1.313 +2 -2
+ NTP_4_2_7P313
+
+ sntp/sntp.man.in@1.133 +2 -2
+ NTP_4_2_7P313
+
+ sntp/sntp.mdoc.in@1.133 +2 -2
+ NTP_4_2_7P313
+
+ util/invoke-ntp-keygen.texi@1.302 +2 -2
+ NTP_4_2_7P313
+
+ util/ntp-keygen-opts.c@1.316 +4 -4
+ NTP_4_2_7P313
+
+ util/ntp-keygen-opts.h@1.316 +3 -3
+ NTP_4_2_7P313
+
+ util/ntp-keygen.1ntp-keygenman@1.130 +2 -2
+ NTP_4_2_7P313
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.130 +2 -2
+ NTP_4_2_7P313
+
+ util/ntp-keygen.man.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ util/ntp-keygen.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P313
+
+ChangeSet@1.2822.1.23, 2012-10-23 02:16:06+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2293] add support for SO_BINTIME, refine support for SO_TIMESTAMPNS (bug 1374)
+
+ ChangeLog@1.1191.1.22 +2 -0
+ [Bug 2293] add support for SO_BINTIME, refine support for SO_TIMESTAMPNS (bug 1374)
+
+ ntpd/ntp_io.c@1.373 +89 -45
+ [Bug 2293] add support for SO_BINTIME, refine support for SO_TIMESTAMPNS (bug 1374)
+
+ChangeSet@1.2822.1.22, 2012-10-18 16:31:00-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2291] sntp should report why it cannot open file.kod
+
+ ChangeLog@1.1191.1.21 +1 -0
+ [Bug 2291] sntp should report why it cannot open file.kod
+
+ sntp/kod_management.c@1.29 +1 -1
+ [Bug 2291] sntp should report why it cannot open file.kod
+
+ChangeSet@1.2822.1.21, 2012-10-11 07:12:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P312
+ TAG: NTP_4_2_7P312
+
+ ChangeLog@1.1191.1.20 +1 -0
+ NTP_4_2_7P312
+
+ ntpd/invoke-ntpd.texi@1.301 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.conf.5man@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.conf.5mdoc@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.conf.man.in@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.conf.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.keys.5man@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.keys.5mdoc@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.keys.man.in@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntp.keys.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntpd-opts.c@1.319 +4 -4
+ NTP_4_2_7P312
+
+ ntpd/ntpd-opts.h@1.319 +3 -3
+ NTP_4_2_7P312
+
+ ntpd/ntpd.1ntpdman@1.130 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntpd.1ntpdmdoc@1.130 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntpd.man.in@1.130 +2 -2
+ NTP_4_2_7P312
+
+ ntpd/ntpd.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/invoke-ntpdc.texi@1.298 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc-opts.c@1.313 +4 -4
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc-opts.h@1.313 +3 -3
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc.1ntpdcman@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc.html@1.141 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc.man.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpdc/ntpdc.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpq/invoke-ntpq.texi@1.300 +2 -2
+ NTP_4_2_7P312
+
+ ntpq/ntpq-opts.c@1.315 +4 -4
+ NTP_4_2_7P312
+
+ ntpq/ntpq-opts.h@1.315 +3 -3
+ NTP_4_2_7P312
+
+ ntpq/ntpq.1ntpqman@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpq/ntpq.1ntpqmdoc@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpq/ntpq.man.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpq/ntpq.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.300 +2 -2
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.315 +4 -4
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.315 +3 -3
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd.man.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ packageinfo.sh@1.315 +1 -1
+ NTP_4_2_7P312
+
+ scripts/invoke-ntp-wait.texi@1.118 +1 -1
+ NTP_4_2_7P312
+
+ scripts/ntp-wait.1ntp-waitman@1.129 +2 -2
+ NTP_4_2_7P312
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.129 +2 -2
+ NTP_4_2_7P312
+
+ scripts/ntp-wait.html@1.133 +1 -1
+ NTP_4_2_7P312
+
+ scripts/ntp-wait.man.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ scripts/ntp-wait.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ sntp/invoke-sntp.texi@1.297 +2 -2
+ NTP_4_2_7P312
+
+ sntp/sntp-opts.c@1.312 +4 -4
+ NTP_4_2_7P312
+
+ sntp/sntp-opts.h@1.312 +3 -3
+ NTP_4_2_7P312
+
+ sntp/sntp.1sntpman@1.132 +2 -2
+ NTP_4_2_7P312
+
+ sntp/sntp.1sntpmdoc@1.132 +2 -2
+ NTP_4_2_7P312
+
+ sntp/sntp.html@1.312 +2 -2
+ NTP_4_2_7P312
+
+ sntp/sntp.man.in@1.132 +2 -2
+ NTP_4_2_7P312
+
+ sntp/sntp.mdoc.in@1.132 +2 -2
+ NTP_4_2_7P312
+
+ util/invoke-ntp-keygen.texi@1.301 +2 -2
+ NTP_4_2_7P312
+
+ util/ntp-keygen-opts.c@1.315 +4 -4
+ NTP_4_2_7P312
+
+ util/ntp-keygen-opts.h@1.315 +3 -3
+ NTP_4_2_7P312
+
+ util/ntp-keygen.1ntp-keygenman@1.129 +2 -2
+ NTP_4_2_7P312
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.129 +2 -2
+ NTP_4_2_7P312
+
+ util/ntp-keygen.man.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ util/ntp-keygen.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P312
+
+ChangeSet@1.2822.1.20, 2012-10-11 01:30:28-04:00, stenn@deacon.udel.edu
+ Remove debugging from testing the fix for [Bug 938]
+
+ ChangeLog@1.1191.1.19 +1 -0
+ Remove debugging from testing the fix for [Bug 938]
+
+ sntp/main.c@1.85 +0 -5
+ Remove debugging from testing the fix for [Bug 938]
+
+ChangeSet@1.2822.1.19, 2012-10-10 06:30:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P311
+ TAG: NTP_4_2_7P311
+
+ ChangeLog@1.1191.1.18 +1 -0
+ NTP_4_2_7P311
+
+ ntpd/invoke-ntpd.texi@1.300 +4 -40
+ NTP_4_2_7P311
+
+ ntpd/ntp.conf.5man@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.conf.5mdoc@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.conf.man.in@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.conf.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.keys.5man@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.keys.5mdoc@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.keys.man.in@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntp.keys.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P311
+
+ ntpd/ntpd-opts.c@1.318 +214 -231
+ NTP_4_2_7P311
+
+ ntpd/ntpd-opts.h@1.318 +5 -3
+ NTP_4_2_7P311
+
+ ntpd/ntpd.1ntpdman@1.129 +6 -8
+ NTP_4_2_7P311
+
+ ntpd/ntpd.1ntpdmdoc@1.129 +8 -8
+ NTP_4_2_7P311
+
+ ntpd/ntpd.man.in@1.129 +6 -8
+ NTP_4_2_7P311
+
+ ntpd/ntpd.mdoc.in@1.129 +8 -8
+ NTP_4_2_7P311
+
+ ntpdc/invoke-ntpdc.texi@1.297 +3 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc-opts.c@1.312 +15 -14
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc-opts.h@1.312 +5 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc.1ntpdcman@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc.html@1.140 +3 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc.man.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpdc/ntpdc.mdoc.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpq/invoke-ntpq.texi@1.299 +3 -3
+ NTP_4_2_7P311
+
+ ntpq/ntpq-opts.c@1.314 +15 -14
+ NTP_4_2_7P311
+
+ ntpq/ntpq-opts.h@1.314 +5 -3
+ NTP_4_2_7P311
+
+ ntpq/ntpq.1ntpqman@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpq/ntpq.1ntpqmdoc@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpq/ntpq.man.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpq/ntpq.mdoc.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.299 +2 -2
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.314 +4 -4
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.314 +3 -3
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.128 +2 -2
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.128 +2 -2
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd.man.in@1.128 +2 -2
+ NTP_4_2_7P311
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.128 +2 -2
+ NTP_4_2_7P311
+
+ packageinfo.sh@1.314 +1 -1
+ NTP_4_2_7P311
+
+ scripts/invoke-ntp-wait.texi@1.117 +1 -1
+ NTP_4_2_7P311
+
+ scripts/ntp-wait.1ntp-waitman@1.128 +2 -2
+ NTP_4_2_7P311
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.128 +2 -2
+ NTP_4_2_7P311
+
+ scripts/ntp-wait.html@1.132 +1 -1
+ NTP_4_2_7P311
+
+ scripts/ntp-wait.man.in@1.128 +2 -2
+ NTP_4_2_7P311
+
+ scripts/ntp-wait.mdoc.in@1.128 +2 -2
+ NTP_4_2_7P311
+
+ sntp/invoke-sntp.texi@1.296 +3 -3
+ NTP_4_2_7P311
+
+ sntp/sntp-opts.c@1.311 +16 -16
+ NTP_4_2_7P311
+
+ sntp/sntp-opts.h@1.311 +5 -3
+ NTP_4_2_7P311
+
+ sntp/sntp.1sntpman@1.131 +4 -3
+ NTP_4_2_7P311
+
+ sntp/sntp.1sntpmdoc@1.131 +4 -3
+ NTP_4_2_7P311
+
+ sntp/sntp.html@1.311 +3 -3
+ NTP_4_2_7P311
+
+ sntp/sntp.man.in@1.131 +4 -3
+ NTP_4_2_7P311
+
+ sntp/sntp.mdoc.in@1.131 +4 -3
+ NTP_4_2_7P311
+
+ util/invoke-ntp-keygen.texi@1.300 +3 -3
+ NTP_4_2_7P311
+
+ util/ntp-keygen-opts.c@1.314 +15 -14
+ NTP_4_2_7P311
+
+ util/ntp-keygen-opts.h@1.314 +5 -3
+ NTP_4_2_7P311
+
+ util/ntp-keygen.1ntp-keygenman@1.128 +4 -3
+ NTP_4_2_7P311
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.128 +4 -3
+ NTP_4_2_7P311
+
+ util/ntp-keygen.man.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ util/ntp-keygen.mdoc.in@1.128 +4 -3
+ NTP_4_2_7P311
+
+ChangeSet@1.2822.1.17, 2012-10-10 01:49:46-04:00, stenn@psp-deb1.ntp.org
+ [Bug 938] The argument to the -D flag takes a number, not a string
+
+ ChangeLog@1.1191.1.16 +1 -0
+ [Bug 938] The argument to the -D flag takes a number, not a string
+
+ChangeSet@1.2822.1.16, 2012-10-09 23:19:59-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ChangeLog@1.1191.1.15 +1 -0
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpd/ntpd.c@1.134 +2 -2
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpd/ntpdbase-opts.def@1.24 +1 -27
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpdc/ntpdc.c@1.101 +1 -1
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpq/ntpq.c@1.149 +1 -1
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ports/winnt/ntpd/ntservice.c@1.29 +1 -1
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ sntp/include/debug-opt.def@1.8 +2 -2
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ sntp/main.c@1.84 +6 -1
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ util/ntp-keygen.c@1.93 +1 -1
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ChangeSet@1.2822.1.15, 2012-10-09 22:55:48-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpd/ntp_io.c@1.372 +9 -8
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ChangeSet@1.2822.3.1, 2012-10-09 11:41:30+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P310
+ TAG: NTP_4_2_7P310
+
+ ChangeLog@1.1191.3.1 +1 -0
+ NTP_4_2_7P310
+
+ ntpd/invoke-ntpd.texi@1.299 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.conf.5man@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.conf.5mdoc@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.conf.man.in@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.conf.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.keys.5man@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.keys.5mdoc@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.keys.man.in@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntp.keys.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntpd-opts.c@1.317 +4 -4
+ NTP_4_2_7P310
+
+ ntpd/ntpd-opts.h@1.317 +3 -3
+ NTP_4_2_7P310
+
+ ntpd/ntpd.1ntpdman@1.128 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntpd.1ntpdmdoc@1.128 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntpd.man.in@1.128 +2 -2
+ NTP_4_2_7P310
+
+ ntpd/ntpd.mdoc.in@1.128 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/invoke-ntpdc.texi@1.296 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc-opts.c@1.311 +4 -4
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc-opts.h@1.311 +3 -3
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc.1ntpdcman@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc.html@1.139 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc.man.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpdc/ntpdc.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpq/invoke-ntpq.texi@1.298 +2 -2
+ NTP_4_2_7P310
+
+ ntpq/ntpq-opts.c@1.313 +4 -4
+ NTP_4_2_7P310
+
+ ntpq/ntpq-opts.h@1.313 +3 -3
+ NTP_4_2_7P310
+
+ ntpq/ntpq.1ntpqman@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpq/ntpq.1ntpqmdoc@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpq/ntpq.man.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpq/ntpq.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.298 +2 -2
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.313 +4 -4
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.313 +3 -3
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd.man.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ packageinfo.sh@1.313 +1 -1
+ NTP_4_2_7P310
+
+ scripts/invoke-ntp-wait.texi@1.116 +1 -1
+ NTP_4_2_7P310
+
+ scripts/ntp-wait.1ntp-waitman@1.127 +2 -2
+ NTP_4_2_7P310
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.127 +2 -2
+ NTP_4_2_7P310
+
+ scripts/ntp-wait.html@1.131 +1 -1
+ NTP_4_2_7P310
+
+ scripts/ntp-wait.man.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ scripts/ntp-wait.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ sntp/invoke-sntp.texi@1.295 +2 -2
+ NTP_4_2_7P310
+
+ sntp/sntp-opts.c@1.310 +4 -4
+ NTP_4_2_7P310
+
+ sntp/sntp-opts.h@1.310 +3 -3
+ NTP_4_2_7P310
+
+ sntp/sntp.1sntpman@1.130 +2 -2
+ NTP_4_2_7P310
+
+ sntp/sntp.1sntpmdoc@1.130 +2 -2
+ NTP_4_2_7P310
+
+ sntp/sntp.html@1.310 +2 -2
+ NTP_4_2_7P310
+
+ sntp/sntp.man.in@1.130 +2 -2
+ NTP_4_2_7P310
+
+ sntp/sntp.mdoc.in@1.130 +2 -2
+ NTP_4_2_7P310
+
+ util/invoke-ntp-keygen.texi@1.299 +2 -2
+ NTP_4_2_7P310
+
+ util/ntp-keygen-opts.c@1.313 +4 -4
+ NTP_4_2_7P310
+
+ util/ntp-keygen-opts.h@1.313 +3 -3
+ NTP_4_2_7P310
+
+ util/ntp-keygen.1ntp-keygenman@1.127 +2 -2
+ NTP_4_2_7P310
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.127 +2 -2
+ NTP_4_2_7P310
+
+ util/ntp-keygen.man.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ util/ntp-keygen.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P310
+
+ChangeSet@1.2822.1.14, 2012-10-09 02:15:38-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1013] ntpdate's HTML page claims wrong default version.
+
+ ChangeLog@1.1191.1.14 +1 -0
+ [Bug 1013] ntpdate's HTML page claims wrong default version.
+
+ html/ntpdate.html@1.21 +2 -1
+ [Bug 1013] ntpdate's HTML page claims wrong default version.
+
+ChangeSet@1.2822.1.13, 2012-10-08 23:50:56-04:00, stenn@deacon.udel.edu
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ChangeLog@1.1191.1.13 +1 -0
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ ntpd/ntp_io.c@1.371 +68 -16
+ [Bug 1374] Support SO_TIMESTAMPNS
+
+ChangeSet@1.2822.1.12, 2012-10-08 22:50:36-04:00, stenn@deacon.udel.edu
+ [Bug 2274] Bring libopts/enum.c back to (old) ANSI C compliance
+
+ ChangeLog@1.1191.1.12 +1 -1
+ [Bug 2274] Bring libopts/enum.c back to (old) ANSI C compliance
+
+ChangeSet@1.2822.1.11, 2012-10-08 20:17:15-04:00, stenn@deacon.udel.edu
+ [Bug 2266] Remove deprecated refclock_trak.c from Windows Makefile equivalents
+
+ ChangeLog@1.1191.1.11 +2 -1
+ [Bug 2266] Remove deprecated refclock_trak.c from Windows Makefile equivalents
+
+ChangeSet@1.2822.2.1, 2012-10-05 01:53:46+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Bring libopts/enum.c back to ANSI C compliance.
+ Reflect removal of refclock_trak.c in Windows Makefile equivalents.
+
+ ChangeLog@1.1191.2.1 +2 -0
+ Bring libopts/enum.c back to ANSI C compliance.
+ Reflect removal of refclock_trak.c in Windows Makefile equivalents.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.18 +0 -24
+ Reflect removal of refclock_trak.c in Windows Makefile equivalents.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.44 +0 -4
+ Reflect removal of refclock_trak.c in Windows Makefile equivalents.
+
+ sntp/libopts/enum.c@1.5 +3 -3
+ Bring libopts/enum.c back to ANSI C compliance.
+
+
+ChangeSet@1.2822.1.9, 2012-10-04 11:41:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P309
+ TAG: NTP_4_2_7P309
+
+ ChangeLog@1.1191.1.9 +1 -0
+ NTP_4_2_7P309
+
+ ntpd/invoke-ntpd.texi@1.298 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.conf.5man@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.conf.5mdoc@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.conf.man.in@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.conf.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.keys.5man@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.keys.5mdoc@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.keys.man.in@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntp.keys.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntpd-opts.c@1.316 +4 -4
+ NTP_4_2_7P309
+
+ ntpd/ntpd-opts.h@1.316 +3 -3
+ NTP_4_2_7P309
+
+ ntpd/ntpd.1ntpdman@1.127 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntpd.1ntpdmdoc@1.127 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntpd.man.in@1.127 +2 -2
+ NTP_4_2_7P309
+
+ ntpd/ntpd.mdoc.in@1.127 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/invoke-ntpdc.texi@1.295 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc-opts.c@1.310 +4 -4
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc-opts.h@1.310 +3 -3
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc.1ntpdcman@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc.html@1.138 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc.man.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpdc/ntpdc.mdoc.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpq/invoke-ntpq.texi@1.297 +2 -2
+ NTP_4_2_7P309
+
+ ntpq/ntpq-opts.c@1.312 +4 -4
+ NTP_4_2_7P309
+
+ ntpq/ntpq-opts.h@1.312 +3 -3
+ NTP_4_2_7P309
+
+ ntpq/ntpq.1ntpqman@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpq/ntpq.1ntpqmdoc@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpq/ntpq.man.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpq/ntpq.mdoc.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.297 +2 -2
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.312 +4 -4
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.312 +3 -3
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd.man.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ packageinfo.sh@1.312 +1 -1
+ NTP_4_2_7P309
+
+ scripts/invoke-ntp-wait.texi@1.115 +1 -1
+ NTP_4_2_7P309
+
+ scripts/ntp-wait.1ntp-waitman@1.126 +2 -2
+ NTP_4_2_7P309
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.126 +2 -2
+ NTP_4_2_7P309
+
+ scripts/ntp-wait.html@1.130 +1 -1
+ NTP_4_2_7P309
+
+ scripts/ntp-wait.man.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ scripts/ntp-wait.mdoc.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ sntp/invoke-sntp.texi@1.294 +2 -2
+ NTP_4_2_7P309
+
+ sntp/sntp-opts.c@1.309 +4 -4
+ NTP_4_2_7P309
+
+ sntp/sntp-opts.h@1.309 +3 -3
+ NTP_4_2_7P309
+
+ sntp/sntp.1sntpman@1.129 +2 -2
+ NTP_4_2_7P309
+
+ sntp/sntp.1sntpmdoc@1.129 +2 -2
+ NTP_4_2_7P309
+
+ sntp/sntp.html@1.309 +2 -2
+ NTP_4_2_7P309
+
+ sntp/sntp.man.in@1.129 +2 -2
+ NTP_4_2_7P309
+
+ sntp/sntp.mdoc.in@1.129 +2 -2
+ NTP_4_2_7P309
+
+ util/invoke-ntp-keygen.texi@1.298 +2 -2
+ NTP_4_2_7P309
+
+ util/ntp-keygen-opts.c@1.312 +4 -4
+ NTP_4_2_7P309
+
+ util/ntp-keygen-opts.h@1.312 +3 -3
+ NTP_4_2_7P309
+
+ util/ntp-keygen.1ntp-keygenman@1.126 +2 -2
+ NTP_4_2_7P309
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.126 +2 -2
+ NTP_4_2_7P309
+
+ util/ntp-keygen.man.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ util/ntp-keygen.mdoc.in@1.126 +2 -2
+ NTP_4_2_7P309
+
+ChangeSet@1.2822.1.8, 2012-10-04 03:37:21-04:00, stenn@deacon.udel.edu
+ [Bug 2287] ntpdate returns 0 even if adjtime() call fails
+
+ ChangeLog@1.1191.1.8 +1 -0
+ [Bug 2287] ntpdate returns 0 even if adjtime() call fails
+
+ ntpdate/ntpdate.c@1.91 +1 -1
+ [Bug 2287] ntpdate returns 0 even if adjtime() call fails
+
+ChangeSet@1.2822.1.7, 2012-09-29 10:48:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P308
+ TAG: NTP_4_2_7P308
+
+ ChangeLog@1.1191.1.7 +1 -0
+ NTP_4_2_7P308
+
+ ntpd/invoke-ntpd.texi@1.297 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntp.conf.5man@1.14 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntp.conf.5mdoc@1.14 +1 -1
+ NTP_4_2_7P308
+
+ ntpd/ntp.conf.man.in@1.14 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntp.conf.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P308
+
+ ntpd/ntp.keys.5man@1.14 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntp.keys.5mdoc@1.14 +1 -1
+ NTP_4_2_7P308
+
+ ntpd/ntp.keys.man.in@1.14 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntp.keys.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P308
+
+ ntpd/ntpd-opts.c@1.315 +4 -4
+ NTP_4_2_7P308
+
+ ntpd/ntpd-opts.h@1.315 +3 -3
+ NTP_4_2_7P308
+
+ ntpd/ntpd.1ntpdman@1.126 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntpd.1ntpdmdoc@1.126 +1 -1
+ NTP_4_2_7P308
+
+ ntpd/ntpd.man.in@1.126 +2 -2
+ NTP_4_2_7P308
+
+ ntpd/ntpd.mdoc.in@1.126 +1 -1
+ NTP_4_2_7P308
+
+ ntpdc/invoke-ntpdc.texi@1.294 +2 -2
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc-opts.c@1.309 +4 -4
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc-opts.h@1.309 +3 -3
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc.1ntpdcman@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.125 +1 -1
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc.html@1.137 +2 -2
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc.man.in@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpdc/ntpdc.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P308
+
+ ntpq/invoke-ntpq.texi@1.296 +2 -2
+ NTP_4_2_7P308
+
+ ntpq/ntpq-opts.c@1.311 +4 -4
+ NTP_4_2_7P308
+
+ ntpq/ntpq-opts.h@1.311 +3 -3
+ NTP_4_2_7P308
+
+ ntpq/ntpq.1ntpqman@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpq/ntpq.1ntpqmdoc@1.125 +1 -1
+ NTP_4_2_7P308
+
+ ntpq/ntpq.man.in@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpq/ntpq.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P308
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.296 +2 -2
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.311 +4 -4
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.311 +3 -3
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.125 +1 -1
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd.man.in@1.125 +2 -2
+ NTP_4_2_7P308
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P308
+
+ packageinfo.sh@1.311 +1 -1
+ NTP_4_2_7P308
+
+ scripts/invoke-ntp-wait.texi@1.114 +1 -1
+ NTP_4_2_7P308
+
+ scripts/ntp-wait.1ntp-waitman@1.125 +2 -2
+ NTP_4_2_7P308
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.125 +1 -1
+ NTP_4_2_7P308
+
+ scripts/ntp-wait.html@1.129 +1 -1
+ NTP_4_2_7P308
+
+ scripts/ntp-wait.man.in@1.125 +2 -2
+ NTP_4_2_7P308
+
+ scripts/ntp-wait.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P308
+
+ sntp/invoke-sntp.texi@1.293 +2 -2
+ NTP_4_2_7P308
+
+ sntp/sntp-opts.c@1.308 +4 -4
+ NTP_4_2_7P308
+
+ sntp/sntp-opts.h@1.308 +3 -3
+ NTP_4_2_7P308
+
+ sntp/sntp.1sntpman@1.128 +2 -2
+ NTP_4_2_7P308
+
+ sntp/sntp.1sntpmdoc@1.128 +1 -1
+ NTP_4_2_7P308
+
+ sntp/sntp.html@1.308 +2 -2
+ NTP_4_2_7P308
+
+ sntp/sntp.man.in@1.128 +2 -2
+ NTP_4_2_7P308
+
+ sntp/sntp.mdoc.in@1.128 +1 -1
+ NTP_4_2_7P308
+
+ util/invoke-ntp-keygen.texi@1.297 +2 -2
+ NTP_4_2_7P308
+
+ util/ntp-keygen-opts.c@1.311 +4 -4
+ NTP_4_2_7P308
+
+ util/ntp-keygen-opts.h@1.311 +3 -3
+ NTP_4_2_7P308
+
+ util/ntp-keygen.1ntp-keygenman@1.125 +2 -2
+ NTP_4_2_7P308
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.125 +1 -1
+ NTP_4_2_7P308
+
+ util/ntp-keygen.man.in@1.125 +2 -2
+ NTP_4_2_7P308
+
+ util/ntp-keygen.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P308
+
+ChangeSet@1.2822.1.6, 2012-09-29 02:03:52-04:00, stenn@psp-deb1.ntp.org
+ CID 97198: Check return from ioctl() calls in refclock_acts.c
+
+ ChangeLog@1.1191.1.6 +1 -0
+ CID 97198: Check return from ioctl() calls in refclock_acts.c
+
+ ntpd/refclock_acts.c@1.52 +4 -2
+ CID 97198: Check return from ioctl() calls in refclock_acts.c
+
+ChangeSet@1.2822.1.5, 2012-09-29 00:52:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P307
+ TAG: NTP_4_2_7P307
+
+ ChangeLog@1.1191.1.5 +1 -0
+ NTP_4_2_7P307
+
+ ntpd/invoke-ntpd.texi@1.296 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.conf.5man@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.conf.5mdoc@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.conf.man.in@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.conf.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.keys.5man@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.keys.5mdoc@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.keys.man.in@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntp.keys.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntpd-opts.c@1.314 +4 -4
+ NTP_4_2_7P307
+
+ ntpd/ntpd-opts.h@1.314 +3 -3
+ NTP_4_2_7P307
+
+ ntpd/ntpd.1ntpdman@1.125 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntpd.1ntpdmdoc@1.125 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntpd.man.in@1.125 +2 -2
+ NTP_4_2_7P307
+
+ ntpd/ntpd.mdoc.in@1.125 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/invoke-ntpdc.texi@1.293 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc-opts.c@1.308 +4 -4
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc-opts.h@1.308 +3 -3
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc.1ntpdcman@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc.html@1.136 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc.man.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpdc/ntpdc.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpq/invoke-ntpq.texi@1.295 +2 -2
+ NTP_4_2_7P307
+
+ ntpq/ntpq-opts.c@1.310 +4 -4
+ NTP_4_2_7P307
+
+ ntpq/ntpq-opts.h@1.310 +3 -3
+ NTP_4_2_7P307
+
+ ntpq/ntpq.1ntpqman@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpq/ntpq.1ntpqmdoc@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpq/ntpq.man.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpq/ntpq.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.295 +2 -2
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.310 +4 -4
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.310 +3 -3
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd.man.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ packageinfo.sh@1.310 +1 -1
+ NTP_4_2_7P307
+
+ scripts/invoke-ntp-wait.texi@1.113 +1 -1
+ NTP_4_2_7P307
+
+ scripts/ntp-wait.1ntp-waitman@1.124 +2 -2
+ NTP_4_2_7P307
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.124 +2 -2
+ NTP_4_2_7P307
+
+ scripts/ntp-wait.html@1.128 +1 -1
+ NTP_4_2_7P307
+
+ scripts/ntp-wait.man.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ scripts/ntp-wait.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ sntp/invoke-sntp.texi@1.292 +2 -2
+ NTP_4_2_7P307
+
+ sntp/sntp-opts.c@1.307 +4 -4
+ NTP_4_2_7P307
+
+ sntp/sntp-opts.h@1.307 +3 -3
+ NTP_4_2_7P307
+
+ sntp/sntp.1sntpman@1.127 +3 -65
+ NTP_4_2_7P307
+
+ sntp/sntp.1sntpmdoc@1.127 +4 -66
+ NTP_4_2_7P307
+
+ sntp/sntp.html@1.307 +93 -118
+ NTP_4_2_7P307
+
+ sntp/sntp.man.in@1.127 +3 -65
+ NTP_4_2_7P307
+
+ sntp/sntp.mdoc.in@1.127 +4 -66
+ NTP_4_2_7P307
+
+ util/invoke-ntp-keygen.texi@1.296 +2 -2
+ NTP_4_2_7P307
+
+ util/ntp-keygen-opts.c@1.310 +4 -4
+ NTP_4_2_7P307
+
+ util/ntp-keygen-opts.h@1.310 +3 -3
+ NTP_4_2_7P307
+
+ util/ntp-keygen.1ntp-keygenman@1.124 +2 -2
+ NTP_4_2_7P307
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.124 +2 -2
+ NTP_4_2_7P307
+
+ util/ntp-keygen.man.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ util/ntp-keygen.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P307
+
+ChangeSet@1.2822.1.4, 2012-09-28 20:12:45-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ ChangeLog@1.1191.1.4 +1 -0
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/invoke-sntp.texi@1.291 +13 -20
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/main.c@1.83 +68 -18
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp-opts.c@1.306 +172 -197
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp-opts.def@1.40 +9 -19
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp-opts.h@1.306 +30 -39
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp.1sntpman@1.126 +73 -18
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp.1sntpmdoc@1.126 +74 -18
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp.html@1.306 +141 -130
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp.man.in@1.126 +73 -18
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ sntp/sntp.mdoc.in@1.126 +74 -18
+ [Bug 1997] Fix sntp broadcast timeouts
+
+ChangeSet@1.2822.1.3, 2012-09-23 01:03:01-04:00, stenn@psp-deb1.ntp.org
+ Fix typo in html/select.html
+
+ ChangeLog@1.1191.1.3 +1 -0
+ Fix typo in html/select.html
+
+ html/select.html@1.7 +1 -1
+ Fix typo in html/select.html
+
+ChangeSet@1.2822.1.2, 2012-09-22 21:07:43-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2234] Fix incorrect ntptrace html documentation.
+
+ ChangeLog@1.1191.1.2 +1 -0
+ [Bug 2234] Fix incorrect ntptrace html documentation.
+
+ html/ntptrace.html@1.17 +3 -9
+ [Bug 2234] Fix incorrect ntptrace html documentation.
+
+ChangeSet@1.2822.1.1, 2012-09-17 06:11:50-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2262] Install html docs in $htmldir
+
+ ChangeLog@1.1191.1.1 +1 -0
+ [Bug 2262] Install html docs in $htmldir
+
+ ntpdc/Makefile.am@1.73 +6 -1
+ [Bug 2262] Install html docs in $htmldir
+
+ scripts/Makefile.am@1.31 +6 -1
+ [Bug 2262] Install html docs in $htmldir
+
+ChangeSet@1.2823, 2012-09-17 02:46:11-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2278] ACTS flag3 mismatch between code and driver18.html.
+
+ ChangeLog@1.1192 +1 -0
+ [Bug 2278] ACTS flag3 mismatch between code and driver18.html.
+
+ html/drivers/driver18.html@1.18 +4 -4
+ [Bug 2278] ACTS flag3 mismatch between code and driver18.html.
+
+ChangeSet@1.2822, 2012-09-15 11:26:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P306
+ TAG: NTP_4_2_7P306
+
+ ChangeLog@1.1191 +1 -0
+ NTP_4_2_7P306
+
+ ntpd/invoke-ntpd.texi@1.295 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntp.conf.5man@1.12 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntp.conf.5mdoc@1.12 +1 -1
+ NTP_4_2_7P306
+
+ ntpd/ntp.conf.man.in@1.12 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntp.conf.mdoc.in@1.12 +1 -1
+ NTP_4_2_7P306
+
+ ntpd/ntp.keys.5man@1.12 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntp.keys.5mdoc@1.12 +1 -1
+ NTP_4_2_7P306
+
+ ntpd/ntp.keys.man.in@1.12 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntp.keys.mdoc.in@1.12 +1 -1
+ NTP_4_2_7P306
+
+ ntpd/ntpd-opts.c@1.313 +4 -4
+ NTP_4_2_7P306
+
+ ntpd/ntpd-opts.h@1.313 +3 -3
+ NTP_4_2_7P306
+
+ ntpd/ntpd.1ntpdman@1.124 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntpd.1ntpdmdoc@1.124 +1 -1
+ NTP_4_2_7P306
+
+ ntpd/ntpd.man.in@1.124 +2 -2
+ NTP_4_2_7P306
+
+ ntpd/ntpd.mdoc.in@1.124 +1 -1
+ NTP_4_2_7P306
+
+ ntpdc/invoke-ntpdc.texi@1.292 +2 -2
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc-opts.c@1.307 +4 -4
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc-opts.h@1.307 +3 -3
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc.1ntpdcman@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.123 +1 -1
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc.html@1.135 +2 -2
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc.man.in@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpdc/ntpdc.mdoc.in@1.123 +1 -1
+ NTP_4_2_7P306
+
+ ntpq/invoke-ntpq.texi@1.294 +2 -2
+ NTP_4_2_7P306
+
+ ntpq/ntpq-opts.c@1.309 +4 -4
+ NTP_4_2_7P306
+
+ ntpq/ntpq-opts.h@1.309 +3 -3
+ NTP_4_2_7P306
+
+ ntpq/ntpq.1ntpqman@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpq/ntpq.1ntpqmdoc@1.123 +1 -1
+ NTP_4_2_7P306
+
+ ntpq/ntpq.man.in@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpq/ntpq.mdoc.in@1.123 +1 -1
+ NTP_4_2_7P306
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.294 +2 -2
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.309 +4 -4
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.309 +3 -3
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.123 +1 -1
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd.man.in@1.123 +2 -2
+ NTP_4_2_7P306
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.123 +1 -1
+ NTP_4_2_7P306
+
+ packageinfo.sh@1.309 +1 -1
+ NTP_4_2_7P306
+
+ scripts/invoke-ntp-wait.texi@1.112 +1 -1
+ NTP_4_2_7P306
+
+ scripts/ntp-wait.1ntp-waitman@1.123 +2 -2
+ NTP_4_2_7P306
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.123 +1 -1
+ NTP_4_2_7P306
+
+ scripts/ntp-wait.html@1.127 +1 -1
+ NTP_4_2_7P306
+
+ scripts/ntp-wait.man.in@1.123 +2 -2
+ NTP_4_2_7P306
+
+ scripts/ntp-wait.mdoc.in@1.123 +1 -1
+ NTP_4_2_7P306
+
+ sntp/invoke-sntp.texi@1.290 +2 -2
+ NTP_4_2_7P306
+
+ sntp/sntp-opts.c@1.305 +4 -4
+ NTP_4_2_7P306
+
+ sntp/sntp-opts.h@1.305 +3 -3
+ NTP_4_2_7P306
+
+ sntp/sntp.1sntpman@1.125 +2 -2
+ NTP_4_2_7P306
+
+ sntp/sntp.1sntpmdoc@1.125 +1 -1
+ NTP_4_2_7P306
+
+ sntp/sntp.html@1.305 +2 -2
+ NTP_4_2_7P306
+
+ sntp/sntp.man.in@1.125 +2 -2
+ NTP_4_2_7P306
+
+ sntp/sntp.mdoc.in@1.125 +1 -1
+ NTP_4_2_7P306
+
+ util/invoke-ntp-keygen.texi@1.295 +2 -2
+ NTP_4_2_7P306
+
+ util/ntp-keygen-opts.c@1.309 +4 -4
+ NTP_4_2_7P306
+
+ util/ntp-keygen-opts.h@1.309 +3 -3
+ NTP_4_2_7P306
+
+ util/ntp-keygen.1ntp-keygenman@1.123 +2 -2
+ NTP_4_2_7P306
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.123 +1 -1
+ NTP_4_2_7P306
+
+ util/ntp-keygen.man.in@1.123 +2 -2
+ NTP_4_2_7P306
+
+ util/ntp-keygen.mdoc.in@1.123 +1 -1
+ NTP_4_2_7P306
+
+ChangeSet@1.2821, 2012-09-15 03:45:57-04:00, stenn@deacon.udel.edu
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ChangeLog@1.1190 +1 -0
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ include/ntp_config.h@1.75 +0 -23
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ libntp/socket.c@1.9 +0 -13
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/keyword-gen-utd@1.18 +1 -1
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/keyword-gen.c@1.23 +0 -1
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/ntp_keyword.h@1.20 +488 -492
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/ntp_parser.c@1.81 +713 -717
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/ntp_parser.h@1.47 +107 -109
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ ntpd/ntp_parser.y@1.75 +0 -2
+ [Bug 752] ToS cleanup from Mike Tatarinov
+
+ChangeSet@1.2820, 2012-09-15 07:21:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P305
+ TAG: NTP_4_2_7P305
+
+ ChangeLog@1.1189 +1 -0
+ NTP_4_2_7P305
+
+ ntpd/invoke-ntpd.texi@1.294 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.conf.5man@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.conf.5mdoc@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.conf.man.in@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.conf.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.keys.5man@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.keys.5mdoc@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.keys.man.in@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntp.keys.mdoc.in@1.11 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntpd-opts.c@1.312 +4 -4
+ NTP_4_2_7P305
+
+ ntpd/ntpd-opts.h@1.312 +3 -3
+ NTP_4_2_7P305
+
+ ntpd/ntpd.1ntpdman@1.123 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntpd.1ntpdmdoc@1.123 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntpd.man.in@1.123 +2 -2
+ NTP_4_2_7P305
+
+ ntpd/ntpd.mdoc.in@1.123 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/invoke-ntpdc.texi@1.291 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc-opts.c@1.306 +4 -4
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc-opts.h@1.306 +3 -3
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc.1ntpdcman@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc.html@1.134 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc.man.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpdc/ntpdc.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpq/invoke-ntpq.texi@1.293 +2 -2
+ NTP_4_2_7P305
+
+ ntpq/ntpq-opts.c@1.308 +4 -4
+ NTP_4_2_7P305
+
+ ntpq/ntpq-opts.h@1.308 +3 -3
+ NTP_4_2_7P305
+
+ ntpq/ntpq.1ntpqman@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpq/ntpq.1ntpqmdoc@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpq/ntpq.man.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpq/ntpq.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.293 +2 -2
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.308 +4 -4
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.308 +3 -3
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd.man.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ packageinfo.sh@1.308 +1 -1
+ NTP_4_2_7P305
+
+ scripts/invoke-ntp-wait.texi@1.111 +1 -1
+ NTP_4_2_7P305
+
+ scripts/ntp-wait.1ntp-waitman@1.122 +2 -2
+ NTP_4_2_7P305
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.122 +2 -2
+ NTP_4_2_7P305
+
+ scripts/ntp-wait.html@1.126 +1 -1
+ NTP_4_2_7P305
+
+ scripts/ntp-wait.man.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ scripts/ntp-wait.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ sntp/invoke-sntp.texi@1.289 +2 -2
+ NTP_4_2_7P305
+
+ sntp/sntp-opts.c@1.304 +4 -4
+ NTP_4_2_7P305
+
+ sntp/sntp-opts.h@1.304 +3 -3
+ NTP_4_2_7P305
+
+ sntp/sntp.1sntpman@1.124 +2 -2
+ NTP_4_2_7P305
+
+ sntp/sntp.1sntpmdoc@1.124 +2 -2
+ NTP_4_2_7P305
+
+ sntp/sntp.html@1.304 +2 -2
+ NTP_4_2_7P305
+
+ sntp/sntp.man.in@1.124 +2 -2
+ NTP_4_2_7P305
+
+ sntp/sntp.mdoc.in@1.124 +2 -2
+ NTP_4_2_7P305
+
+ util/invoke-ntp-keygen.texi@1.294 +2 -2
+ NTP_4_2_7P305
+
+ util/ntp-keygen-opts.c@1.308 +4 -4
+ NTP_4_2_7P305
+
+ util/ntp-keygen-opts.h@1.308 +3 -3
+ NTP_4_2_7P305
+
+ util/ntp-keygen.1ntp-keygenman@1.122 +2 -2
+ NTP_4_2_7P305
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.122 +2 -2
+ NTP_4_2_7P305
+
+ util/ntp-keygen.man.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ util/ntp-keygen.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P305
+
+ChangeSet@1.2819, 2012-09-15 02:20:37-04:00, stenn@deacon.udel.edu
+ [Bug 2276] clk_sel240x.c #define's _XOPEN_SOURCE, breaking QNX6
+
+ ChangeLog@1.1188 +1 -0
+ [Bug 2276] clk_sel240x.c #define's _XOPEN_SOURCE, breaking QNX6
+
+ libparse/clk_sel240x.c@1.3 +3 -3
+ [Bug 2276] clk_sel240x.c #define's _XOPEN_SOURCE, breaking QNX6
+
+ChangeSet@1.2818, 2012-09-15 00:38:40-04:00, stenn@deacon.udel.edu
+ generated parser file cleanup
+
+ ntpd/keyword-gen-utd@1.17 +1 -1
+ generated parser file cleanup
+
+ ntpd/ntp_keyword.h@1.19 +995 -989
+ generated parser file cleanup
+
+ ntpd/ntp_parser.c@1.80 +1015 -1002
+ generated parser file cleanup
+
+ ntpd/ntp_parser.h@1.46 +367 -365
+ generated parser file cleanup
+
+ChangeSet@1.2817, 2012-09-15 00:35:46-04:00, stenn@deacon.udel.edu
+ [Bug 2258] Add syslog message about leap insertion
+
+ ChangeLog@1.1187 +1 -0
+ [Bug 2258] Add syslog message about leap insertion
+
+ ntpd/ntp_timer.c@1.70 +6 -5
+ [Bug 2258] Add syslog message about leap insertion
+
+ChangeSet@1.2816, 2012-09-14 23:42:10-04:00, stenn@deacon.udel.edu
+ [Bug 1232] Convert SHM refclock to use struct timespec
+
+ ChangeLog@1.1186 +1 -0
+ [Bug 1232] Convert SHM refclock to use struct timespec
+
+ ntpd/refclock_shm.c@1.26 +25 -33
+ [Bug 1232] Convert SHM refclock to use struct timespec
+
+ChangeSet@1.2815, 2012-09-14 18:45:55-04:00, stenn@psp-deb1.ntp.org
+ Updates to driver28.html
+
+ ChangeLog@1.1185 +1 -0
+ Updates to driver28.html
+
+ html/drivers/driver28.html@1.14 +26 -25
+ Updates to driver28.html
+
+ChangeSet@1.2814, 2012-09-14 18:44:39-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ ChangeLog@1.1184 +2 -0
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ include/ntp.h@1.206 +2 -1
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ ntpd/keyword-gen.c@1.22 +1 -0
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ ntpd/ntp_io.c@1.370 +49 -35
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ ntpd/ntp_parser.y@1.74 +3 -0
+ [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES
+
+ChangeSet@1.2813, 2012-09-14 18:33:31-04:00, stenn@psp-deb1.ntp.org
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ ChangeLog@1.1183 +1 -0
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ configure.ac@1.551 +0 -27
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ include/libntp.h@1.3 +0 -2
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ ntpd/ntp_config.c@1.303 +0 -84
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ ntpd/ntp_io.c@1.369 +15 -3
+ [Bug 752] Use proper ToS network packet markings for IPv4 and IPv6
+
+ChangeSet@1.2812, 2012-09-09 19:05:06-04:00, stenn@deacon.udel.edu
+ [Bug 2271] Decode refclock types when built with --disable-all-clocks.
+
+ ChangeLog@1.1182 +1 -0
+ [Bug 2271] Decode refclock types when built with --disable-all-clocks.
+
+ include/ntp_net.h@1.12 +0 -4
+ [Bug 2271] Decode refclock types when built with --disable-all-clocks.
+
+ ntpd/ntp_peer.c@1.153 +8 -3
+ [Bug 2271] Decode refclock types when built with --disable-all-clocks.
+
+ChangeSet@1.2811, 2012-09-06 08:28:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P304
+ TAG: NTP_4_2_7P304
+
+ ChangeLog@1.1181 +1 -0
+ NTP_4_2_7P304
+
+ ntpd/invoke-ntpd.texi@1.293 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.conf.5man@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.conf.5mdoc@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.conf.man.in@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.conf.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.keys.5man@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.keys.5mdoc@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.keys.man.in@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntp.keys.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntpd-opts.c@1.311 +4 -4
+ NTP_4_2_7P304
+
+ ntpd/ntpd-opts.h@1.311 +3 -3
+ NTP_4_2_7P304
+
+ ntpd/ntpd.1ntpdman@1.122 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntpd.1ntpdmdoc@1.122 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntpd.man.in@1.122 +2 -2
+ NTP_4_2_7P304
+
+ ntpd/ntpd.mdoc.in@1.122 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/invoke-ntpdc.texi@1.290 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc-opts.c@1.305 +4 -4
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc-opts.h@1.305 +3 -3
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc.1ntpdcman@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc.html@1.133 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc.man.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpdc/ntpdc.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpq/invoke-ntpq.texi@1.292 +2 -2
+ NTP_4_2_7P304
+
+ ntpq/ntpq-opts.c@1.307 +4 -4
+ NTP_4_2_7P304
+
+ ntpq/ntpq-opts.h@1.307 +3 -3
+ NTP_4_2_7P304
+
+ ntpq/ntpq.1ntpqman@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpq/ntpq.1ntpqmdoc@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpq/ntpq.man.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpq/ntpq.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.292 +2 -2
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.307 +4 -4
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.307 +3 -3
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd.man.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ packageinfo.sh@1.307 +1 -1
+ NTP_4_2_7P304
+
+ scripts/invoke-ntp-wait.texi@1.110 +1 -1
+ NTP_4_2_7P304
+
+ scripts/ntp-wait.1ntp-waitman@1.121 +2 -2
+ NTP_4_2_7P304
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.121 +2 -2
+ NTP_4_2_7P304
+
+ scripts/ntp-wait.html@1.125 +1 -1
+ NTP_4_2_7P304
+
+ scripts/ntp-wait.man.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ scripts/ntp-wait.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ sntp/invoke-sntp.texi@1.288 +2 -2
+ NTP_4_2_7P304
+
+ sntp/sntp-opts.c@1.303 +4 -4
+ NTP_4_2_7P304
+
+ sntp/sntp-opts.h@1.303 +3 -3
+ NTP_4_2_7P304
+
+ sntp/sntp.1sntpman@1.123 +2 -2
+ NTP_4_2_7P304
+
+ sntp/sntp.1sntpmdoc@1.123 +2 -2
+ NTP_4_2_7P304
+
+ sntp/sntp.html@1.303 +2 -2
+ NTP_4_2_7P304
+
+ sntp/sntp.man.in@1.123 +2 -2
+ NTP_4_2_7P304
+
+ sntp/sntp.mdoc.in@1.123 +2 -2
+ NTP_4_2_7P304
+
+ util/invoke-ntp-keygen.texi@1.293 +2 -2
+ NTP_4_2_7P304
+
+ util/ntp-keygen-opts.c@1.307 +4 -4
+ NTP_4_2_7P304
+
+ util/ntp-keygen-opts.h@1.307 +3 -3
+ NTP_4_2_7P304
+
+ util/ntp-keygen.1ntp-keygenman@1.121 +2 -2
+ NTP_4_2_7P304
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.121 +2 -2
+ NTP_4_2_7P304
+
+ util/ntp-keygen.man.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ util/ntp-keygen.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P304
+
+ChangeSet@1.2810, 2012-09-06 00:56:00-04:00, stenn@deacon.udel.edu
+ In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN
+
+ ChangeLog@1.1180 +1 -0
+ In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN
+
+ ntpd/refclock_wwv.c@1.78 +29 -29
+ In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN
+
+ChangeSet@1.2809, 2012-09-05 21:13:07-04:00, stenn@deacon.udel.edu
+ [Bug 2264] Cleanup SEL240X Refclock
+
+ ChangeLog@1.1179 +1 -0
+ [Bug 2264] Cleanup SEL240X Refclock
+
+ libparse/clk_sel240x.c@1.2 +13 -29
+ [Bug 2264] Cleanup SEL240X Refclock
+
+ChangeSet@1.2808, 2012-09-05 20:02:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P303
+ TAG: NTP_4_2_7P303
+
+ ChangeLog@1.1178 +1 -0
+ NTP_4_2_7P303
+
+ ntpd/invoke-ntpd.texi@1.292 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntp.conf.5man@1.9 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntp.conf.5mdoc@1.9 +1 -1
+ NTP_4_2_7P303
+
+ ntpd/ntp.conf.man.in@1.9 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntp.conf.mdoc.in@1.9 +1 -1
+ NTP_4_2_7P303
+
+ ntpd/ntp.keys.5man@1.9 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntp.keys.5mdoc@1.9 +1 -1
+ NTP_4_2_7P303
+
+ ntpd/ntp.keys.man.in@1.9 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntp.keys.mdoc.in@1.9 +1 -1
+ NTP_4_2_7P303
+
+ ntpd/ntpd-opts.c@1.310 +4 -4
+ NTP_4_2_7P303
+
+ ntpd/ntpd-opts.h@1.310 +3 -3
+ NTP_4_2_7P303
+
+ ntpd/ntpd.1ntpdman@1.121 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntpd.1ntpdmdoc@1.121 +1 -1
+ NTP_4_2_7P303
+
+ ntpd/ntpd.man.in@1.121 +2 -2
+ NTP_4_2_7P303
+
+ ntpd/ntpd.mdoc.in@1.121 +1 -1
+ NTP_4_2_7P303
+
+ ntpdc/invoke-ntpdc.texi@1.289 +2 -2
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc-opts.c@1.304 +4 -4
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc-opts.h@1.304 +3 -3
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc.1ntpdcman@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.120 +1 -1
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc.html@1.132 +2 -2
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc.man.in@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpdc/ntpdc.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P303
+
+ ntpq/invoke-ntpq.texi@1.291 +2 -2
+ NTP_4_2_7P303
+
+ ntpq/ntpq-opts.c@1.306 +4 -4
+ NTP_4_2_7P303
+
+ ntpq/ntpq-opts.h@1.306 +3 -3
+ NTP_4_2_7P303
+
+ ntpq/ntpq.1ntpqman@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpq/ntpq.1ntpqmdoc@1.120 +1 -1
+ NTP_4_2_7P303
+
+ ntpq/ntpq.man.in@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpq/ntpq.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P303
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.291 +2 -2
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.306 +4 -4
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.306 +3 -3
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.120 +1 -1
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd.man.in@1.120 +2 -2
+ NTP_4_2_7P303
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P303
+
+ packageinfo.sh@1.306 +1 -1
+ NTP_4_2_7P303
+
+ scripts/invoke-ntp-wait.texi@1.109 +1 -1
+ NTP_4_2_7P303
+
+ scripts/ntp-wait.1ntp-waitman@1.120 +2 -2
+ NTP_4_2_7P303
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.120 +1 -1
+ NTP_4_2_7P303
+
+ scripts/ntp-wait.html@1.124 +1 -1
+ NTP_4_2_7P303
+
+ scripts/ntp-wait.man.in@1.120 +2 -2
+ NTP_4_2_7P303
+
+ scripts/ntp-wait.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P303
+
+ sntp/invoke-sntp.texi@1.287 +2 -2
+ NTP_4_2_7P303
+
+ sntp/sntp-opts.c@1.302 +4 -4
+ NTP_4_2_7P303
+
+ sntp/sntp-opts.h@1.302 +3 -3
+ NTP_4_2_7P303
+
+ sntp/sntp.1sntpman@1.122 +2 -2
+ NTP_4_2_7P303
+
+ sntp/sntp.1sntpmdoc@1.122 +1 -1
+ NTP_4_2_7P303
+
+ sntp/sntp.html@1.302 +2 -2
+ NTP_4_2_7P303
+
+ sntp/sntp.man.in@1.122 +2 -2
+ NTP_4_2_7P303
+
+ sntp/sntp.mdoc.in@1.122 +1 -1
+ NTP_4_2_7P303
+
+ util/invoke-ntp-keygen.texi@1.292 +2 -2
+ NTP_4_2_7P303
+
+ util/ntp-keygen-opts.c@1.306 +4 -4
+ NTP_4_2_7P303
+
+ util/ntp-keygen-opts.h@1.306 +3 -3
+ NTP_4_2_7P303
+
+ util/ntp-keygen.1ntp-keygenman@1.120 +2 -2
+ NTP_4_2_7P303
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.120 +1 -1
+ NTP_4_2_7P303
+
+ util/ntp-keygen.man.in@1.120 +2 -2
+ NTP_4_2_7P303
+
+ util/ntp-keygen.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P303
+
+ChangeSet@1.2807, 2012-09-05 15:13:58-04:00, stenn@deacon.udel.edu
+ [Bug 1232] Add nanosecond support to SHM driver
+
+ ChangeLog@1.1177 +1 -0
+ [Bug 1232] Add nanosecond support to SHM driver
+
+ ntpd/refclock_shm.c@1.25 +134 -86
+ [Bug 1232] Add nanosecond support to SHM driver
+
+ChangeSet@1.2806, 2012-09-05 11:49:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P302
+ TAG: NTP_4_2_7P302
+
+ ChangeLog@1.1176 +1 -0
+ NTP_4_2_7P302
+
+ ntpd/invoke-ntpd.texi@1.291 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.conf.5man@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.conf.5mdoc@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.conf.man.in@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.conf.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.keys.5man@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.keys.5mdoc@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.keys.man.in@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntp.keys.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntpd-opts.c@1.309 +4 -4
+ NTP_4_2_7P302
+
+ ntpd/ntpd-opts.h@1.309 +3 -3
+ NTP_4_2_7P302
+
+ ntpd/ntpd.1ntpdman@1.120 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntpd.1ntpdmdoc@1.120 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntpd.man.in@1.120 +2 -2
+ NTP_4_2_7P302
+
+ ntpd/ntpd.mdoc.in@1.120 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/invoke-ntpdc.texi@1.288 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc-opts.c@1.303 +4 -4
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc-opts.h@1.303 +3 -3
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc.1ntpdcman@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc.html@1.131 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc.man.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpdc/ntpdc.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpq/invoke-ntpq.texi@1.290 +2 -2
+ NTP_4_2_7P302
+
+ ntpq/ntpq-opts.c@1.305 +4 -4
+ NTP_4_2_7P302
+
+ ntpq/ntpq-opts.h@1.305 +3 -3
+ NTP_4_2_7P302
+
+ ntpq/ntpq.1ntpqman@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpq/ntpq.1ntpqmdoc@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpq/ntpq.man.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpq/ntpq.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.290 +2 -2
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.305 +4 -4
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.305 +3 -3
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd.man.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ packageinfo.sh@1.305 +1 -1
+ NTP_4_2_7P302
+
+ scripts/invoke-ntp-wait.texi@1.108 +1 -1
+ NTP_4_2_7P302
+
+ scripts/ntp-wait.1ntp-waitman@1.119 +2 -2
+ NTP_4_2_7P302
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.119 +2 -2
+ NTP_4_2_7P302
+
+ scripts/ntp-wait.html@1.123 +1 -1
+ NTP_4_2_7P302
+
+ scripts/ntp-wait.man.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ scripts/ntp-wait.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ sntp/invoke-sntp.texi@1.286 +2 -2
+ NTP_4_2_7P302
+
+ sntp/sntp-opts.c@1.301 +4 -4
+ NTP_4_2_7P302
+
+ sntp/sntp-opts.h@1.301 +3 -3
+ NTP_4_2_7P302
+
+ sntp/sntp.1sntpman@1.121 +2 -2
+ NTP_4_2_7P302
+
+ sntp/sntp.1sntpmdoc@1.121 +2 -2
+ NTP_4_2_7P302
+
+ sntp/sntp.html@1.301 +2 -2
+ NTP_4_2_7P302
+
+ sntp/sntp.man.in@1.121 +2 -2
+ NTP_4_2_7P302
+
+ sntp/sntp.mdoc.in@1.121 +2 -2
+ NTP_4_2_7P302
+
+ util/invoke-ntp-keygen.texi@1.291 +2 -2
+ NTP_4_2_7P302
+
+ util/ntp-keygen-opts.c@1.305 +4 -4
+ NTP_4_2_7P302
+
+ util/ntp-keygen-opts.h@1.305 +3 -3
+ NTP_4_2_7P302
+
+ util/ntp-keygen.1ntp-keygenman@1.119 +2 -2
+ NTP_4_2_7P302
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.119 +2 -2
+ NTP_4_2_7P302
+
+ util/ntp-keygen.man.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ util/ntp-keygen.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P302
+
+ChangeSet@1.2805, 2012-09-05 06:33:07-04:00, stenn@deacon.udel.edu
+ [Bug 2160] Log warning about expired leapseconds file
+
+ ChangeLog@1.1175 +1 -0
+ [Bug 2160] Log warning about expired leapseconds file
+
+ ntpd/ntp_timer.c@1.69 +9 -1
+ [Bug 2160] Log warning about expired leapseconds file
+
+ChangeSet@1.2804, 2012-09-03 11:47:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P301
+ TAG: NTP_4_2_7P301
+
+ ChangeLog@1.1174 +1 -0
+ NTP_4_2_7P301
+
+ ntpd/invoke-ntpd.texi@1.290 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntp.conf.5man@1.7 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntp.conf.5mdoc@1.7 +1 -1
+ NTP_4_2_7P301
+
+ ntpd/ntp.conf.man.in@1.7 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntp.conf.mdoc.in@1.7 +1 -1
+ NTP_4_2_7P301
+
+ ntpd/ntp.keys.5man@1.7 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntp.keys.5mdoc@1.7 +1 -1
+ NTP_4_2_7P301
+
+ ntpd/ntp.keys.man.in@1.7 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntp.keys.mdoc.in@1.7 +1 -1
+ NTP_4_2_7P301
+
+ ntpd/ntpd-opts.c@1.308 +4 -4
+ NTP_4_2_7P301
+
+ ntpd/ntpd-opts.h@1.308 +3 -3
+ NTP_4_2_7P301
+
+ ntpd/ntpd.1ntpdman@1.119 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntpd.1ntpdmdoc@1.119 +1 -1
+ NTP_4_2_7P301
+
+ ntpd/ntpd.man.in@1.119 +2 -2
+ NTP_4_2_7P301
+
+ ntpd/ntpd.mdoc.in@1.119 +1 -1
+ NTP_4_2_7P301
+
+ ntpdc/invoke-ntpdc.texi@1.287 +2 -2
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc-opts.c@1.302 +4 -4
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc-opts.h@1.302 +3 -3
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc.1ntpdcman@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.118 +1 -1
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc.html@1.130 +2 -2
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc.man.in@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpdc/ntpdc.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P301
+
+ ntpq/invoke-ntpq.texi@1.289 +2 -2
+ NTP_4_2_7P301
+
+ ntpq/ntpq-opts.c@1.304 +4 -4
+ NTP_4_2_7P301
+
+ ntpq/ntpq-opts.h@1.304 +3 -3
+ NTP_4_2_7P301
+
+ ntpq/ntpq.1ntpqman@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpq/ntpq.1ntpqmdoc@1.118 +1 -1
+ NTP_4_2_7P301
+
+ ntpq/ntpq.man.in@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpq/ntpq.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P301
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.289 +2 -2
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.304 +4 -4
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.304 +3 -3
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.118 +1 -1
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd.man.in@1.118 +2 -2
+ NTP_4_2_7P301
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P301
+
+ packageinfo.sh@1.304 +1 -1
+ NTP_4_2_7P301
+
+ scripts/invoke-ntp-wait.texi@1.107 +1 -1
+ NTP_4_2_7P301
+
+ scripts/ntp-wait.1ntp-waitman@1.118 +2 -2
+ NTP_4_2_7P301
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.118 +1 -1
+ NTP_4_2_7P301
+
+ scripts/ntp-wait.html@1.122 +1 -1
+ NTP_4_2_7P301
+
+ scripts/ntp-wait.man.in@1.118 +2 -2
+ NTP_4_2_7P301
+
+ scripts/ntp-wait.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P301
+
+ sntp/invoke-sntp.texi@1.285 +2 -2
+ NTP_4_2_7P301
+
+ sntp/sntp-opts.c@1.300 +4 -4
+ NTP_4_2_7P301
+
+ sntp/sntp-opts.h@1.300 +3 -3
+ NTP_4_2_7P301
+
+ sntp/sntp.1sntpman@1.120 +2 -2
+ NTP_4_2_7P301
+
+ sntp/sntp.1sntpmdoc@1.120 +1 -1
+ NTP_4_2_7P301
+
+ sntp/sntp.html@1.300 +2 -2
+ NTP_4_2_7P301
+
+ sntp/sntp.man.in@1.120 +2 -2
+ NTP_4_2_7P301
+
+ sntp/sntp.mdoc.in@1.120 +1 -1
+ NTP_4_2_7P301
+
+ util/invoke-ntp-keygen.texi@1.290 +2 -2
+ NTP_4_2_7P301
+
+ util/ntp-keygen-opts.c@1.304 +4 -4
+ NTP_4_2_7P301
+
+ util/ntp-keygen-opts.h@1.304 +3 -3
+ NTP_4_2_7P301
+
+ util/ntp-keygen.1ntp-keygenman@1.118 +2 -2
+ NTP_4_2_7P301
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.118 +1 -1
+ NTP_4_2_7P301
+
+ util/ntp-keygen.man.in@1.118 +2 -2
+ NTP_4_2_7P301
+
+ util/ntp-keygen.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P301
+
+ChangeSet@1.2803, 2012-09-03 05:13:00-04:00, stenn@deacon.udel.edu
+ [Bug 2164] Greater precision needed for ntpq offset report
+
+ ChangeLog@1.1173 +1 -0
+ [Bug 2164] Greater precision needed for ntpq offset report
+
+ ntpd/ntp_control.c@1.183 +4 -2
+ [Bug 2164] Greater precision needed for ntpq offset report
+
+ChangeSet@1.2802, 2012-09-03 03:20:41-04:00, stenn@deacon.udel.edu
+ Clean the man5_MANS in ntpd/
+
+ ChangeLog@1.1172 +1 -0
+ Clean the man5_MANS in ntpd/
+
+ ntpd/Makefile.am@1.122 +1 -0
+ Clean the man5_MANS in ntpd/
+
+ChangeSet@1.2801, 2012-09-03 06:02:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P300
+ TAG: NTP_4_2_7P300
+
+ ChangeLog@1.1171 +1 -0
+ NTP_4_2_7P300
+
+ ntpd/invoke-ntpd.texi@1.289 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.conf.5man@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.conf.5mdoc@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.conf.man.in@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.conf.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.keys.5man@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.keys.5mdoc@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.keys.man.in@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntp.keys.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntpd-opts.c@1.307 +4 -4
+ NTP_4_2_7P300
+
+ ntpd/ntpd-opts.h@1.307 +3 -3
+ NTP_4_2_7P300
+
+ ntpd/ntpd.1ntpdman@1.118 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntpd.1ntpdmdoc@1.118 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntpd.man.in@1.118 +2 -2
+ NTP_4_2_7P300
+
+ ntpd/ntpd.mdoc.in@1.118 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/invoke-ntpdc.texi@1.286 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc-opts.c@1.301 +4 -4
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc-opts.h@1.301 +3 -3
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc.1ntpdcman@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc.html@1.129 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc.man.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpdc/ntpdc.mdoc.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpq/invoke-ntpq.texi@1.288 +2 -2
+ NTP_4_2_7P300
+
+ ntpq/ntpq-opts.c@1.303 +4 -4
+ NTP_4_2_7P300
+
+ ntpq/ntpq-opts.h@1.303 +3 -3
+ NTP_4_2_7P300
+
+ ntpq/ntpq.1ntpqman@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpq/ntpq.1ntpqmdoc@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpq/ntpq.man.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpq/ntpq.mdoc.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.288 +2 -2
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.303 +4 -4
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.303 +3 -3
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd.man.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ packageinfo.sh@1.303 +1 -1
+ NTP_4_2_7P300
+
+ scripts/invoke-ntp-wait.texi@1.106 +1 -1
+ NTP_4_2_7P300
+
+ scripts/ntp-wait.1ntp-waitman@1.117 +2 -2
+ NTP_4_2_7P300
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.117 +2 -2
+ NTP_4_2_7P300
+
+ scripts/ntp-wait.html@1.121 +1 -1
+ NTP_4_2_7P300
+
+ scripts/ntp-wait.man.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ scripts/ntp-wait.mdoc.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ sntp/invoke-sntp.texi@1.284 +2 -2
+ NTP_4_2_7P300
+
+ sntp/sntp-opts.c@1.299 +4 -4
+ NTP_4_2_7P300
+
+ sntp/sntp-opts.h@1.299 +3 -3
+ NTP_4_2_7P300
+
+ sntp/sntp.1sntpman@1.119 +2 -2
+ NTP_4_2_7P300
+
+ sntp/sntp.1sntpmdoc@1.119 +2 -2
+ NTP_4_2_7P300
+
+ sntp/sntp.html@1.299 +2 -2
+ NTP_4_2_7P300
+
+ sntp/sntp.man.in@1.119 +2 -2
+ NTP_4_2_7P300
+
+ sntp/sntp.mdoc.in@1.119 +2 -2
+ NTP_4_2_7P300
+
+ util/invoke-ntp-keygen.texi@1.289 +2 -2
+ NTP_4_2_7P300
+
+ util/ntp-keygen-opts.c@1.303 +4 -4
+ NTP_4_2_7P300
+
+ util/ntp-keygen-opts.h@1.303 +3 -3
+ NTP_4_2_7P300
+
+ util/ntp-keygen.1ntp-keygenman@1.117 +2 -2
+ NTP_4_2_7P300
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.117 +2 -2
+ NTP_4_2_7P300
+
+ util/ntp-keygen.man.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ util/ntp-keygen.mdoc.in@1.117 +2 -2
+ NTP_4_2_7P300
+
+ChangeSet@1.2791.1.3, 2012-09-02 03:42:22-04:00, stenn@psp-deb1.ntp.org
+ Installing html docs is bug 2262
+
+ ChangeLog@1.1161.1.3 +1 -1
+ Installing html docs is bug 2262
+
+ChangeSet@1.2791.1.2, 2012-09-02 03:35:48-04:00, stenn@psp-deb1.ntp.org
+ Install sntp.html into htmldir
+
+ ChangeLog@1.1161.1.2 +1 -0
+ Install sntp.html into htmldir
+
+ sntp/Makefile.am@1.74 +6 -1
+ Install sntp.html into htmldir
+
+ChangeSet@1.2791.1.1, 2012-09-02 03:34:32-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2270] Install fails due to repeated man5 page names
+
+ ChangeLog@1.1161.1.1 +1 -0
+ [Bug 2270] Install fails due to repeated man5 page names
+
+ ntpd/Makefile.am@1.119.1.1 +1 -1
+ [Bug 2270] Install fails due to repeated man5 page names
+
+ChangeSet@1.2799, 2012-09-01 18:38:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P299
+ TAG: NTP_4_2_7P299
+
+ ChangeLog@1.1169 +1 -0
+ NTP_4_2_7P299
+
+ ntpd/invoke-ntpd.texi@1.288 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntp.conf.5man@1.5 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntp.conf.5mdoc@1.5 +1 -1
+ NTP_4_2_7P299
+
+ ntpd/ntp.conf.man.in@1.5 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntp.conf.mdoc.in@1.5 +1 -1
+ NTP_4_2_7P299
+
+ ntpd/ntp.keys.5man@1.5 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntp.keys.5mdoc@1.5 +1 -1
+ NTP_4_2_7P299
+
+ ntpd/ntp.keys.man.in@1.5 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntp.keys.mdoc.in@1.5 +1 -1
+ NTP_4_2_7P299
+
+ ntpd/ntpd-opts.c@1.306 +4 -4
+ NTP_4_2_7P299
+
+ ntpd/ntpd-opts.h@1.306 +3 -3
+ NTP_4_2_7P299
+
+ ntpd/ntpd.1ntpdman@1.117 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntpd.1ntpdmdoc@1.117 +1 -1
+ NTP_4_2_7P299
+
+ ntpd/ntpd.man.in@1.117 +2 -2
+ NTP_4_2_7P299
+
+ ntpd/ntpd.mdoc.in@1.117 +1 -1
+ NTP_4_2_7P299
+
+ ntpdc/invoke-ntpdc.texi@1.285 +2 -2
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc-opts.c@1.300 +4 -4
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc-opts.h@1.300 +3 -3
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc.1ntpdcman@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.116 +1 -1
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc.html@1.128 +2 -2
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc.man.in@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpdc/ntpdc.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P299
+
+ ntpq/invoke-ntpq.texi@1.287 +2 -2
+ NTP_4_2_7P299
+
+ ntpq/ntpq-opts.c@1.302 +4 -4
+ NTP_4_2_7P299
+
+ ntpq/ntpq-opts.h@1.302 +3 -3
+ NTP_4_2_7P299
+
+ ntpq/ntpq.1ntpqman@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpq/ntpq.1ntpqmdoc@1.116 +1 -1
+ NTP_4_2_7P299
+
+ ntpq/ntpq.man.in@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpq/ntpq.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P299
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.287 +2 -2
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.302 +4 -4
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.302 +3 -3
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.116 +1 -1
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd.man.in@1.116 +2 -2
+ NTP_4_2_7P299
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P299
+
+ packageinfo.sh@1.302 +1 -1
+ NTP_4_2_7P299
+
+ scripts/invoke-ntp-wait.texi@1.105 +1 -1
+ NTP_4_2_7P299
+
+ scripts/ntp-wait.1ntp-waitman@1.116 +2 -2
+ NTP_4_2_7P299
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.116 +1 -1
+ NTP_4_2_7P299
+
+ scripts/ntp-wait.html@1.120 +1 -1
+ NTP_4_2_7P299
+
+ scripts/ntp-wait.man.in@1.116 +2 -2
+ NTP_4_2_7P299
+
+ scripts/ntp-wait.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P299
+
+ sntp/invoke-sntp.texi@1.283 +2 -2
+ NTP_4_2_7P299
+
+ sntp/sntp-opts.c@1.298 +4 -4
+ NTP_4_2_7P299
+
+ sntp/sntp-opts.h@1.298 +3 -3
+ NTP_4_2_7P299
+
+ sntp/sntp.1sntpman@1.118 +2 -2
+ NTP_4_2_7P299
+
+ sntp/sntp.1sntpmdoc@1.118 +1 -1
+ NTP_4_2_7P299
+
+ sntp/sntp.html@1.298 +2 -2
+ NTP_4_2_7P299
+
+ sntp/sntp.man.in@1.118 +2 -2
+ NTP_4_2_7P299
+
+ sntp/sntp.mdoc.in@1.118 +1 -1
+ NTP_4_2_7P299
+
+ util/invoke-ntp-keygen.texi@1.288 +2 -2
+ NTP_4_2_7P299
+
+ util/ntp-keygen-opts.c@1.302 +4 -4
+ NTP_4_2_7P299
+
+ util/ntp-keygen-opts.h@1.302 +3 -3
+ NTP_4_2_7P299
+
+ util/ntp-keygen.1ntp-keygenman@1.116 +2 -2
+ NTP_4_2_7P299
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.116 +1 -1
+ NTP_4_2_7P299
+
+ util/ntp-keygen.man.in@1.116 +2 -2
+ NTP_4_2_7P299
+
+ util/ntp-keygen.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P299
+
+ChangeSet@1.2798, 2012-09-01 14:24:07-04:00, stenn@deacon.udel.edu
+ More cleanup to the bootstrap script
+
+ ChangeLog@1.1168 +1 -0
+ More cleanup to the bootstrap script
+
+ bootstrap@1.41 +4 -2
+ More cleanup to the bootstrap script
+
+ChangeSet@1.2797, 2012-09-01 04:07:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P298
+ TAG: NTP_4_2_7P298
+
+ ChangeLog@1.1167 +1 -0
+ NTP_4_2_7P298
+
+ ntpd/invoke-ntpd.texi@1.287 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntp.conf.5man@1.4 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntp.conf.5mdoc@1.4 +1 -1
+ NTP_4_2_7P298
+
+ ntpd/ntp.conf.man.in@1.4 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntp.conf.mdoc.in@1.4 +1 -1
+ NTP_4_2_7P298
+
+ ntpd/ntp.keys.5man@1.4 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntp.keys.5mdoc@1.4 +1 -1
+ NTP_4_2_7P298
+
+ ntpd/ntp.keys.man.in@1.4 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntp.keys.mdoc.in@1.4 +1 -1
+ NTP_4_2_7P298
+
+ ntpd/ntpd-opts.c@1.305 +4 -4
+ NTP_4_2_7P298
+
+ ntpd/ntpd-opts.h@1.305 +3 -3
+ NTP_4_2_7P298
+
+ ntpd/ntpd.1ntpdman@1.116 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntpd.1ntpdmdoc@1.116 +1 -1
+ NTP_4_2_7P298
+
+ ntpd/ntpd.man.in@1.116 +2 -2
+ NTP_4_2_7P298
+
+ ntpd/ntpd.mdoc.in@1.116 +1 -1
+ NTP_4_2_7P298
+
+ ntpdc/invoke-ntpdc.texi@1.284 +2 -2
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc-opts.c@1.299 +4 -4
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc-opts.h@1.299 +3 -3
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc.1ntpdcman@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.115 +1 -1
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc.html@1.127 +2 -2
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc.man.in@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpdc/ntpdc.mdoc.in@1.115 +1 -1
+ NTP_4_2_7P298
+
+ ntpq/invoke-ntpq.texi@1.286 +2 -2
+ NTP_4_2_7P298
+
+ ntpq/ntpq-opts.c@1.301 +4 -4
+ NTP_4_2_7P298
+
+ ntpq/ntpq-opts.h@1.301 +3 -3
+ NTP_4_2_7P298
+
+ ntpq/ntpq.1ntpqman@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpq/ntpq.1ntpqmdoc@1.115 +1 -1
+ NTP_4_2_7P298
+
+ ntpq/ntpq.man.in@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpq/ntpq.mdoc.in@1.115 +1 -1
+ NTP_4_2_7P298
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.286 +2 -2
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.301 +4 -4
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.301 +3 -3
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.115 +1 -1
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd.man.in@1.115 +2 -2
+ NTP_4_2_7P298
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.115 +1 -1
+ NTP_4_2_7P298
+
+ packageinfo.sh@1.301 +1 -1
+ NTP_4_2_7P298
+
+ scripts/invoke-ntp-wait.texi@1.104 +1 -1
+ NTP_4_2_7P298
+
+ scripts/ntp-wait.1ntp-waitman@1.115 +2 -2
+ NTP_4_2_7P298
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.115 +1 -1
+ NTP_4_2_7P298
+
+ scripts/ntp-wait.html@1.119 +1 -1
+ NTP_4_2_7P298
+
+ scripts/ntp-wait.man.in@1.115 +2 -2
+ NTP_4_2_7P298
+
+ scripts/ntp-wait.mdoc.in@1.115 +1 -1
+ NTP_4_2_7P298
+
+ sntp/invoke-sntp.texi@1.282 +2 -2
+ NTP_4_2_7P298
+
+ sntp/sntp-opts.c@1.297 +4 -4
+ NTP_4_2_7P298
+
+ sntp/sntp-opts.h@1.297 +3 -3
+ NTP_4_2_7P298
+
+ sntp/sntp.1sntpman@1.117 +2 -2
+ NTP_4_2_7P298
+
+ sntp/sntp.1sntpmdoc@1.117 +1 -1
+ NTP_4_2_7P298
+
+ sntp/sntp.html@1.297 +2 -2
+ NTP_4_2_7P298
+
+ sntp/sntp.man.in@1.117 +2 -2
+ NTP_4_2_7P298
+
+ sntp/sntp.mdoc.in@1.117 +1 -1
+ NTP_4_2_7P298
+
+ util/invoke-ntp-keygen.texi@1.287 +2 -2
+ NTP_4_2_7P298
+
+ util/ntp-keygen-opts.c@1.301 +4 -4
+ NTP_4_2_7P298
+
+ util/ntp-keygen-opts.h@1.301 +3 -3
+ NTP_4_2_7P298
+
+ util/ntp-keygen.1ntp-keygenman@1.115 +2 -2
+ NTP_4_2_7P298
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.115 +1 -1
+ NTP_4_2_7P298
+
+ util/ntp-keygen.man.in@1.115 +2 -2
+ NTP_4_2_7P298
+
+ util/ntp-keygen.mdoc.in@1.115 +1 -1
+ NTP_4_2_7P298
+
+ChangeSet@1.2796, 2012-08-31 23:45:41-04:00, stenn@deacon.udel.edu
+ Remove extraneous parens
+
+ ntpdc/ntpdc_ops.c@1.79 +1 -1
+ Remove extraneous parens
+
+ChangeSet@1.2795, 2012-08-31 23:40:43-04:00, stenn@deacon.udel.edu
+ Remove extraneous parens
+
+ ChangeLog@1.1166 +1 -0
+ Remove extraneous parens
+
+ChangeSet@1.2794, 2012-08-31 23:37:42-04:00, stenn@deacon.udel.edu
+ Add a missing "%s" syslog format string
+
+ ChangeLog@1.1165 +1 -0
+ Handle additional man page sections in the bootstrap script
+
+ ChangeLog@1.1164 +1 -0
+ Add a missing "%s" syslog format string
+
+ bootstrap@1.40 +1 -1
+ Handle additional man page sections in the bootstrap script
+
+ ntpd/ntp_config.c@1.302 +1 -1
+ Add a missing "%s" syslog format string
+
+ChangeSet@1.2793, 2012-09-01 00:34:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P297
+ TAG: NTP_4_2_7P297
+
+ ChangeLog@1.1163 +1 -0
+ NTP_4_2_7P297
+
+ ntpd/invoke-ntpd.texi@1.286 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntp.conf.5man@1.3 +8 -8
+ NTP_4_2_7P297
+
+ ntpd/ntp.conf.5mdoc@1.3 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntp.conf.man.in@1.3 +8 -8
+ NTP_4_2_7P297
+
+ ntpd/ntp.conf.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntp.keys.5man@1.3 +8 -8
+ NTP_4_2_7P297
+
+ ntpd/ntp.keys.5mdoc@1.3 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntp.keys.man.in@1.3 +8 -8
+ NTP_4_2_7P297
+
+ ntpd/ntp.keys.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntpd-opts.c@1.304 +4 -4
+ NTP_4_2_7P297
+
+ ntpd/ntpd-opts.h@1.304 +3 -3
+ NTP_4_2_7P297
+
+ ntpd/ntpd.1ntpdman@1.115 +27 -27
+ NTP_4_2_7P297
+
+ ntpd/ntpd.1ntpdmdoc@1.115 +2 -2
+ NTP_4_2_7P297
+
+ ntpd/ntpd.man.in@1.115 +27 -27
+ NTP_4_2_7P297
+
+ ntpd/ntpd.mdoc.in@1.115 +2 -2
+ NTP_4_2_7P297
+
+ ntpdc/invoke-ntpdc.texi@1.283 +2 -2
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc-opts.c@1.298 +4 -4
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc-opts.h@1.298 +3 -3
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc.1ntpdcman@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.114 +2 -2
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc.html@1.126 +2 -2
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc.man.in@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpdc/ntpdc.mdoc.in@1.114 +2 -2
+ NTP_4_2_7P297
+
+ ntpq/invoke-ntpq.texi@1.285 +2 -2
+ NTP_4_2_7P297
+
+ ntpq/ntpq-opts.c@1.300 +4 -4
+ NTP_4_2_7P297
+
+ ntpq/ntpq-opts.h@1.300 +3 -3
+ NTP_4_2_7P297
+
+ ntpq/ntpq.1ntpqman@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpq/ntpq.1ntpqmdoc@1.114 +2 -2
+ NTP_4_2_7P297
+
+ ntpq/ntpq.man.in@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpq/ntpq.mdoc.in@1.114 +2 -2
+ NTP_4_2_7P297
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.285 +2 -2
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.300 +4 -4
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.300 +3 -3
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.114 +2 -2
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd.man.in@1.114 +21 -21
+ NTP_4_2_7P297
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.114 +2 -2
+ NTP_4_2_7P297
+
+ packageinfo.sh@1.300 +1 -1
+ NTP_4_2_7P297
+
+ scripts/invoke-ntp-wait.texi@1.103 +1 -1
+ NTP_4_2_7P297
+
+ scripts/ntp-wait.1ntp-waitman@1.114 +13 -13
+ NTP_4_2_7P297
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.114 +2 -2
+ NTP_4_2_7P297
+
+ scripts/ntp-wait.html@1.118 +1 -1
+ NTP_4_2_7P297
+
+ scripts/ntp-wait.man.in@1.114 +13 -13
+ NTP_4_2_7P297
+
+ scripts/ntp-wait.mdoc.in@1.114 +2 -2
+ NTP_4_2_7P297
+
+ sntp/invoke-sntp.texi@1.281 +2 -2
+ NTP_4_2_7P297
+
+ sntp/sntp-opts.c@1.296 +4 -4
+ NTP_4_2_7P297
+
+ sntp/sntp-opts.h@1.296 +3 -3
+ NTP_4_2_7P297
+
+ sntp/sntp.1sntpman@1.116 +68 -68
+ NTP_4_2_7P297
+
+ sntp/sntp.1sntpmdoc@1.116 +2 -2
+ NTP_4_2_7P297
+
+ sntp/sntp.html@1.296 +2 -2
+ NTP_4_2_7P297
+
+ sntp/sntp.man.in@1.116 +68 -68
+ NTP_4_2_7P297
+
+ sntp/sntp.mdoc.in@1.116 +2 -2
+ NTP_4_2_7P297
+
+ util/invoke-ntp-keygen.texi@1.286 +2 -2
+ NTP_4_2_7P297
+
+ util/ntp-keygen-opts.c@1.300 +4 -4
+ NTP_4_2_7P297
+
+ util/ntp-keygen-opts.h@1.300 +3 -3
+ NTP_4_2_7P297
+
+ util/ntp-keygen.1ntp-keygenman@1.114 +32 -32
+ NTP_4_2_7P297
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.114 +2 -2
+ NTP_4_2_7P297
+
+ util/ntp-keygen.man.in@1.114 +32 -32
+ NTP_4_2_7P297
+
+ util/ntp-keygen.mdoc.in@1.114 +2 -2
+ NTP_4_2_7P297
+
+ChangeSet@1.2792, 2012-08-31 14:18:39-04:00, stenn@deacon.udel.edu
+ Distribute ntp.conf.def and ntp.keys.def
+
+ ChangeLog@1.1162 +1 -1
+ Distribute ntp.conf.def and ntp.keys.def
+
+ ntpd/Makefile.am@1.120 +1 -0
+ Distribute ntp.conf.def and ntp.keys.def
+
+ChangeSet@1.2791, 2012-08-31 06:27:38+00:00, stenn@psp-fb1.ntp.org
+ Fix mdoc2man
+
+ ChangeLog@1.1161 +1 -0
+ Fix mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.1 +308 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.0 +0 -0
+
+ChangeSet@1.2790, 2012-08-31 00:07:37-04:00, stenn@deacon.udel.edu
+ Distribute ntp.conf.def
+
+ ChangeLog@1.1160 +1 -0
+ Distribute ntp.conf.def
+
+ ntpd/Makefile.am@1.119 +1 -0
+ Distribute ntp.conf.def
+
+ChangeSet@1.2789, 2012-08-31 03:43:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P296
+ TAG: NTP_4_2_7P296
+
+ ChangeLog@1.1159 +1 -0
+ NTP_4_2_7P296
+
+ ntpd/invoke-ntpd.texi@1.285 +80 -5
+ NTP_4_2_7P296
+
+ ntpd/ntp.conf.5man@1.2 +10 -2865
+ NTP_4_2_7P296
+
+ ntpd/ntp.conf.5mdoc@1.2 +5 -2694
+ NTP_4_2_7P296
+
+ ntpd/ntp.conf.man.in@1.2 +10 -2865
+ NTP_4_2_7P296
+
+ ntpd/ntp.conf.mdoc.in@1.2 +5 -2694
+ NTP_4_2_7P296
+
+ ntpd/ntp.keys.5man@1.2 +9 -109
+ NTP_4_2_7P296
+
+ ntpd/ntp.keys.5mdoc@1.2 +4 -103
+ NTP_4_2_7P296
+
+ ntpd/ntp.keys.man.in@1.2 +9 -109
+ NTP_4_2_7P296
+
+ ntpd/ntp.keys.mdoc.in@1.2 +4 -103
+ NTP_4_2_7P296
+
+ ntpd/ntpd-opts.c@1.303 +4 -4
+ NTP_4_2_7P296
+
+ ntpd/ntpd-opts.h@1.303 +3 -3
+ NTP_4_2_7P296
+
+ ntpd/ntpd.1ntpdman@1.114 +29 -573
+ NTP_4_2_7P296
+
+ ntpd/ntpd.1ntpdmdoc@1.114 +5 -548
+ NTP_4_2_7P296
+
+ ntpd/ntpd.man.in@1.114 +29 -573
+ NTP_4_2_7P296
+
+ ntpd/ntpd.mdoc.in@1.114 +5 -548
+ NTP_4_2_7P296
+
+ ntpdc/invoke-ntpdc.texi@1.282 +56 -5
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc-opts.c@1.297 +4 -4
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc-opts.h@1.297 +3 -3
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc.1ntpdcman@1.113 +22 -723
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.113 +4 -660
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc.html@1.125 +150 -119
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc.man.in@1.113 +22 -723
+ NTP_4_2_7P296
+
+ ntpdc/ntpdc.mdoc.in@1.113 +4 -660
+ NTP_4_2_7P296
+
+ ntpq/invoke-ntpq.texi@1.284 +47 -5
+ NTP_4_2_7P296
+
+ ntpq/ntpq-opts.c@1.299 +4 -4
+ NTP_4_2_7P296
+
+ ntpq/ntpq-opts.h@1.299 +3 -3
+ NTP_4_2_7P296
+
+ ntpq/ntpq.1ntpqman@1.113 +21 -279
+ NTP_4_2_7P296
+
+ ntpq/ntpq.1ntpqmdoc@1.113 +3 -246
+ NTP_4_2_7P296
+
+ ntpq/ntpq.man.in@1.113 +21 -279
+ NTP_4_2_7P296
+
+ ntpq/ntpq.mdoc.in@1.113 +3 -246
+ NTP_4_2_7P296
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.284 +31 -5
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.299 +4 -4
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.299 +3 -3
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.113 +21 -22
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.113 +3 -4
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd.man.in@1.113 +21 -22
+ NTP_4_2_7P296
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.113 +3 -4
+ NTP_4_2_7P296
+
+ packageinfo.sh@1.299 +1 -1
+ NTP_4_2_7P296
+
+ scripts/invoke-ntp-wait.texi@1.102 +19 -5
+ NTP_4_2_7P296
+
+ scripts/ntp-wait.1ntp-waitman@1.113 +13 -29
+ NTP_4_2_7P296
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.113 +3 -19
+ NTP_4_2_7P296
+
+ scripts/ntp-wait.html@1.117 +54 -61
+ NTP_4_2_7P296
+
+ scripts/ntp-wait.man.in@1.113 +13 -29
+ NTP_4_2_7P296
+
+ scripts/ntp-wait.mdoc.in@1.113 +3 -19
+ NTP_4_2_7P296
+
+ sntp/invoke-sntp.texi@1.280 +7 -5
+ NTP_4_2_7P296
+
+ sntp/sntp-opts.c@1.295 +4 -4
+ NTP_4_2_7P296
+
+ sntp/sntp-opts.h@1.295 +3 -3
+ NTP_4_2_7P296
+
+ sntp/sntp.1sntpman@1.115 +69 -131
+ NTP_4_2_7P296
+
+ sntp/sntp.1sntpmdoc@1.115 +4 -66
+ NTP_4_2_7P296
+
+ sntp/sntp.html@1.295 +99 -123
+ NTP_4_2_7P296
+
+ sntp/sntp.man.in@1.115 +69 -131
+ NTP_4_2_7P296
+
+ sntp/sntp.mdoc.in@1.115 +4 -66
+ NTP_4_2_7P296
+
+ util/invoke-ntp-keygen.texi@1.285 +52 -5
+ NTP_4_2_7P296
+
+ util/ntp-keygen-opts.c@1.299 +4 -4
+ NTP_4_2_7P296
+
+ util/ntp-keygen-opts.h@1.299 +3 -3
+ NTP_4_2_7P296
+
+ util/ntp-keygen.1ntp-keygenman@1.113 +34 -750
+ NTP_4_2_7P296
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.113 +5 -707
+ NTP_4_2_7P296
+
+ util/ntp-keygen.man.in@1.113 +34 -750
+ NTP_4_2_7P296
+
+ util/ntp-keygen.mdoc.in@1.113 +5 -707
+ NTP_4_2_7P296
+
+ChangeSet@1.2788, 2012-08-30 22:01:12-04:00, stenn@deacon.udel.edu
+ Potential bugfix for agtexi-cmd.tpl
+
+ ChangeLog@1.1158 +1 -0
+ Potential bugfix for agtexi-cmd.tpl
+
+ sntp/ag-tpl/agtexi-cmd.tpl@1.1 +884 -0
+ BitKeeper file /deacon/backroom/ntp-dev-autogen/sntp/ag-tpl/agtexi-cmd.tpl
+
+ sntp/ag-tpl/agtexi-cmd.tpl@1.0 +0 -0
+
+ChangeSet@1.2787, 2012-08-30 21:48:02-04:00, stenn@deacon.udel.edu
+ Begin support for autogen maintaining ntp.conf and ntp.keys docs
+
+ .point-changed-filelist@1.14 +15 -7
+ Begin support for autogen maintaining ntp.conf and ntp.keys docs
+
+ChangeSet@1.2786, 2012-08-30 20:44:10-04:00, stenn@psp-deb1.ntp.org
+ Begin support for autogen maintaining ntp.conf and ntp.keys docs
+
+ ChangeLog@1.1157 +1 -0
+ Begin support for autogen maintaining ntp.conf and ntp.keys docs
+
+ ntpd/ntp.conf.5man@1.1 +2915 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.conf.5man
+
+ ntpd/ntp.conf.5man@1.0 +0 -0
+
+ ntpd/ntp.conf.5mdoc@1.1 +2749 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.conf.5mdoc
+
+ ntpd/ntp.conf.5mdoc@1.0 +0 -0
+
+ ntpd/ntp.conf.def@1.1 +2746 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.conf.def
+
+ ntpd/ntp.conf.def@1.0 +0 -0
+
+ ntpd/ntp.conf.man.in@1.1 +2915 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.conf.man.in
+
+ ntpd/ntp.conf.man.in@1.0 +0 -0
+
+ ntpd/ntp.conf.mdoc.in@1.1 +2749 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.conf.mdoc.in
+
+ ntpd/ntp.conf.mdoc.in@1.0 +0 -0
+
+ ntpd/ntp.keys.5man@1.1 +160 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.keys.5man
+
+ ntpd/ntp.keys.5man@1.0 +0 -0
+
+ ntpd/ntp.keys.5mdoc@1.1 +159 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.keys.5mdoc
+
+ ntpd/ntp.keys.5mdoc@1.0 +0 -0
+
+ ntpd/ntp.keys.man.in@1.1 +160 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.keys.man.in
+
+ ntpd/ntp.keys.man.in@1.0 +0 -0
+
+ ntpd/ntp.keys.mdoc.in@1.1 +159 -0
+ BitKeeper file /home/stenn/ntp-dev-autogen/ntpd/ntp.keys.mdoc.in
+
+ ntpd/ntp.keys.mdoc.in@1.0 +0 -0
+
+ChangeSet@1.2785, 2012-08-12 04:33:15+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ChangeLog@1.1156 +1 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/invoke-ntpd.texi@1.284 +360 -132
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd-opts.c@1.302 +309 -261
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd-opts.h@1.302 +12 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd.1ntpdman@1.113 +43 -43
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd.1ntpdmdoc@1.113 +13 -9
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd.man.in@1.113 +43 -43
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpd.mdoc.in@1.113 +13 -9
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpdsim-opts.c@1.20 +112 -53
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpd/ntpdsim-opts.h@1.20 +24 -11
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/invoke-ntpdc.texi@1.281 +421 -72
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc-opts.c@1.296 +172 -124
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc-opts.h@1.296 +13 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc.1ntpdcman@1.112 +28 -21
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.112 +13 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc.html@1.124 +1108 -189
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc.man.in@1.112 +28 -21
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpdc/ntpdc.mdoc.in@1.112 +13 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/invoke-ntpq.texi@1.283 +285 -237
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq-opts.c@1.298 +165 -119
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq-opts.h@1.298 +13 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq.1ntpqman@1.112 +22 -15
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq.1ntpqmdoc@1.112 +15 -8
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq.man.in@1.112 +22 -15
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpq/ntpq.mdoc.in@1.112 +15 -8
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.283 +5 -29
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.298 +125 -81
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.298 +13 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.112 +10 -3
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.112 +13 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd.man.in@1.112 +10 -3
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.112 +13 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/invoke-ntp-wait.texi@1.101 +21 -24
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/ntp-wait.1ntp-waitman@1.112 +6 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.112 +6 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/ntp-wait.html@1.116 +162 -37
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/ntp-wait.man.in@1.112 +6 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ scripts/ntp-wait.mdoc.in@1.112 +6 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/include/autogen-version.def@1.12 +1 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/invoke-sntp.texi@1.279 +67 -59
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/Makefile.am@1.15 +4 -4
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/ag-char-map.h@1.18 +322 -308
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/alias.c@1.2 +2 -2
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/ao-strs.c@1.4 +52 -52
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/ao-strs.h@1.3 +206 -207
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/autoopts/options.h@1.17 +8 -7
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/autoopts/usage-txt.h@1.17 +185 -183
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/boolean.c@1.10 +4 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/compat/compat.h@1.10 +4 -2
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/compat/pathfind.c@1.8 +2 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/configfile.c@1.15 +7 -3
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/enum.c@1.4 +4 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/env.c@1.4 +3 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/find.c@1.4 +31 -18
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/genshell.c@1.18 +3 -3
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/genshell.h@1.18 +9 -3
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/load.c@1.13 +67 -63
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/m4/libopts.m4@1.21 +19 -19
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/makeshell.c@1.12 +96 -61
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/proto.h@1.18 +6 -6
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/reset.c@1.11 +4 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/stack.c@1.10 +7 -2
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/time.c@1.10 +7 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/value-type.h@1.18 +1 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/version.c@1.11 +54 -51
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/libopts/xat-attribute.h@1.18 +1 -1
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp-opts.c@1.294 +265 -195
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp-opts.h@1.294 +13 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp.1sntpman@1.114 +39 -32
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp.1sntpmdoc@1.114 +48 -35
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp.html@1.294 +402 -252
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp.man.in@1.114 +39 -32
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ sntp/sntp.mdoc.in@1.114 +48 -35
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/invoke-ntp-keygen.texi@1.284 +784 -497
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen-opts.c@1.298 +238 -188
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen-opts.h@1.298 +13 -5
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen.1ntp-keygenman@1.112 +43 -36
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.112 +27 -19
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen.man.in@1.112 +43 -36
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ util/ntp-keygen.mdoc.in@1.112 +27 -19
+ Upgrade to autogen-5.16.2 and libopts-36.5.11
+
+ChangeSet@1.2773.1.76, 2012-08-11 11:33:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P295
+ TAG: NTP_4_2_7P295
+
+ ChangeLog@1.1146.1.67 +1 -0
+ NTP_4_2_7P295
+
+ ntpd/ntpd-opts.c@1.301 +4 -4
+ NTP_4_2_7P295
+
+ ntpd/ntpd-opts.h@1.301 +3 -3
+ NTP_4_2_7P295
+
+ ntpd/ntpd-opts.texi@1.275.5.6 +2 -2
+ NTP_4_2_7P295
+
+ ntpd/ntpd.1ntpdman@1.112 +2 -2
+ NTP_4_2_7P295
+
+ ntpd/ntpd.1ntpdmdoc@1.112 +2 -2
+ NTP_4_2_7P295
+
+ ntpd/ntpd.man.in@1.112 +2 -2
+ NTP_4_2_7P295
+
+ ntpd/ntpd.mdoc.in@1.112 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc-opts.c@1.295 +4 -4
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc-opts.h@1.295 +3 -3
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc-opts.texi@1.272.5.5 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc.1ntpdcman@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc.html@1.123 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc.man.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpdc/ntpdc.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpq/ntpq-opts.c@1.297 +4 -4
+ NTP_4_2_7P295
+
+ ntpq/ntpq-opts.h@1.297 +3 -3
+ NTP_4_2_7P295
+
+ ntpq/ntpq-opts.texi@1.274.5.5 +2 -2
+ NTP_4_2_7P295
+
+ ntpq/ntpq.1ntpqman@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpq/ntpq.1ntpqmdoc@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpq/ntpq.man.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpq/ntpq.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.297 +4 -4
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.297 +3 -3
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.5.5 +2 -2
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd.man.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ packageinfo.sh@1.298 +1 -1
+ NTP_4_2_7P295
+
+ scripts/ntp-wait-opts.texi@1.92.5.5 +14 -2
+ NTP_4_2_7P295
+
+ scripts/ntp-wait.1ntp-waitman@1.111 +2 -2
+ NTP_4_2_7P295
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.111 +2 -2
+ NTP_4_2_7P295
+
+ scripts/ntp-wait.html@1.115 +14 -2
+ NTP_4_2_7P295
+
+ scripts/ntp-wait.man.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ scripts/ntp-wait.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp-opts.c@1.293 +4 -4
+ NTP_4_2_7P295
+
+ sntp/sntp-opts.h@1.293 +3 -3
+ NTP_4_2_7P295
+
+ sntp/sntp-opts.texi@1.270.5.5 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp.1sntpman@1.113 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp.1sntpmdoc@1.113 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp.html@1.293 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp.man.in@1.113 +2 -2
+ NTP_4_2_7P295
+
+ sntp/sntp.mdoc.in@1.113 +2 -2
+ NTP_4_2_7P295
+
+ util/ntp-keygen-opts.c@1.297 +4 -4
+ NTP_4_2_7P295
+
+ util/ntp-keygen-opts.h@1.297 +3 -3
+ NTP_4_2_7P295
+
+ util/ntp-keygen-opts.texi@1.275.5.5 +2 -2
+ NTP_4_2_7P295
+
+ util/ntp-keygen.1ntp-keygenman@1.111 +2 -2
+ NTP_4_2_7P295
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.111 +2 -2
+ NTP_4_2_7P295
+
+ util/ntp-keygen.man.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ util/ntp-keygen.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P295
+
+ChangeSet@1.2773.1.75, 2012-08-11 04:28:13-04:00, stenn@psp-deb1.ntp.org
+ Look for syslog's facilitynames[]
+
+ ChangeLog@1.1146.1.66 +1 -0
+ Look for syslog's facilitynames[]
+
+ configure.ac@1.550 +2 -0
+ Look for syslog's facilitynames[]
+
+ sntp/configure.ac@1.71 +1 -0
+ Look for syslog's facilitynames[]
+
+ sntp/m4/ntp_facilitynames.m4@1.1 +24 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/m4/ntp_facilitynames.m4
+
+ sntp/m4/ntp_facilitynames.m4@1.0 +0 -0
+
+ChangeSet@1.2773.1.74, 2012-08-08 11:38:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P294
+ TAG: NTP_4_2_7P294
+
+ ChangeLog@1.1146.1.65 +1 -0
+ NTP_4_2_7P294
+
+ ntpd/ntpd-opts.c@1.300 +4 -4
+ NTP_4_2_7P294
+
+ ntpd/ntpd-opts.h@1.300 +3 -3
+ NTP_4_2_7P294
+
+ ntpd/ntpd-opts.texi@1.275.5.5 +2 -2
+ NTP_4_2_7P294
+
+ ntpd/ntpd.1ntpdman@1.111 +2 -2
+ NTP_4_2_7P294
+
+ ntpd/ntpd.1ntpdmdoc@1.111 +2 -2
+ NTP_4_2_7P294
+
+ ntpd/ntpd.man.in@1.111 +2 -2
+ NTP_4_2_7P294
+
+ ntpd/ntpd.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc-opts.c@1.294 +4 -4
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc-opts.h@1.294 +3 -3
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc-opts.texi@1.272.5.4 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc.1ntpdcman@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc.html@1.122 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc.man.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpdc/ntpdc.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpq/ntpq-opts.c@1.296 +4 -4
+ NTP_4_2_7P294
+
+ ntpq/ntpq-opts.h@1.296 +3 -3
+ NTP_4_2_7P294
+
+ ntpq/ntpq-opts.texi@1.274.5.4 +2 -2
+ NTP_4_2_7P294
+
+ ntpq/ntpq.1ntpqman@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpq/ntpq.1ntpqmdoc@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpq/ntpq.man.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpq/ntpq.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.296 +4 -4
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.296 +3 -3
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.5.4 +2 -2
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd.man.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ packageinfo.sh@1.297 +1 -1
+ NTP_4_2_7P294
+
+ scripts/ntp-wait-opts.texi@1.92.5.4 +1 -1
+ NTP_4_2_7P294
+
+ scripts/ntp-wait.1ntp-waitman@1.110 +2 -2
+ NTP_4_2_7P294
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.110 +2 -2
+ NTP_4_2_7P294
+
+ scripts/ntp-wait.html@1.114 +1 -1
+ NTP_4_2_7P294
+
+ scripts/ntp-wait.man.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ scripts/ntp-wait.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp-opts.c@1.292 +4 -4
+ NTP_4_2_7P294
+
+ sntp/sntp-opts.h@1.292 +3 -3
+ NTP_4_2_7P294
+
+ sntp/sntp-opts.texi@1.270.5.4 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp.1sntpman@1.112 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp.1sntpmdoc@1.112 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp.html@1.292 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp.man.in@1.112 +2 -2
+ NTP_4_2_7P294
+
+ sntp/sntp.mdoc.in@1.112 +2 -2
+ NTP_4_2_7P294
+
+ util/ntp-keygen-opts.c@1.296 +4 -4
+ NTP_4_2_7P294
+
+ util/ntp-keygen-opts.h@1.296 +3 -3
+ NTP_4_2_7P294
+
+ util/ntp-keygen-opts.texi@1.275.5.4 +2 -2
+ NTP_4_2_7P294
+
+ util/ntp-keygen.1ntp-keygenman@1.110 +2 -2
+ NTP_4_2_7P294
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.110 +2 -2
+ NTP_4_2_7P294
+
+ util/ntp-keygen.man.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ util/ntp-keygen.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P294
+
+ChangeSet@1.2773.4.5, 2012-08-06 04:22:39+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
+ Force prior config.cache files to be flushed due to [Bug 2242] fix
+ invalidating getifaddrs() cached result.
+
+ ChangeLog@1.1146.4.4 +1 -0
+ Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
+
+ configure.ac@1.549 +1 -1
+ Force prior config.cache files to be flushed due to [Bug 2242] fix
+ invalidating getifaddrs() cached result.
+
+ ntpd/refclock_tsyncpci.c@1.7 +5 -3
+ Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
+
+ sntp/configure.ac@1.70 +1 -1
+ Force prior config.cache files to be flushed due to [Bug 2242] fix
+ invalidating getifaddrs() cached result.
+
+ChangeSet@1.2773.4.4, 2012-08-05 21:15:00+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2242] configure fails to detect getifaddrs function on Solaris.
+
+ ChangeLog@1.1146.4.3 +1 -0
+ [Bug 2242] configure fails to detect getifaddrs function on Solaris.
+
+ sntp/m4/ntp_ipv6.m4@1.7 +7 -3
+ [Bug 2242] configure fails to detect getifaddrs function on Solaris.
+
+ChangeSet@1.2773.4.3, 2012-08-05 21:04:38+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2252] palisade: formats nanosecs to a 6-char field.
+
+ ChangeLog@1.1146.4.2 +1 -0
+ [Bug 2252] palisade: formats nanosecs to a 6-char field.
+
+ ntpd/refclock_palisade.c@1.38.1.1 +5 -5
+ [Bug 2252] palisade: formats nanosecs to a 6-char field.
+
+ChangeSet@1.2773.4.2, 2012-08-05 20:48:27+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Remove unneeded \ line continuation in ntp_config.c if condition.
+ Use INSIST() instead of equivalent NTP_INSIST in a few places.
+
+ ntpd/ntp_config.c@1.301 +4 -4
+ Remove unneeded \ line continuation in ntp_config.c if condition.
+ Use INSIST() instead of equivalent NTP_INSIST in a few places.
+
+ChangeSet@1.2773.4.1, 2012-08-05 19:09:38+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2249] Bad operator for 'test' in 'make check' of libevent.
+
+ ChangeLog@1.1146.4.1 +1 -0
+ [Bug 2249] Bad operator for 'test' in 'make check' of libevent.
+
+ sntp/libevent/test/test.sh@1.6 +1 -1
+ [Bug 2249] Bad operator for 'test' in 'make check' of libevent.
+
+ChangeSet@1.2773.1.72, 2012-08-05 05:03:59-04:00, stenn@psp-deb1.ntp.org
+ Fix && -> & typo in refclock_palisade.c debug statements
+
+ ChangeLog@1.1146.1.63 +1 -0
+ Fix && -> & typo in refclock_palisade.c debug statements
+
+ ntpd/refclock_palisade.c@1.39 +5 -5
+ Fix && -> & typo in refclock_palisade.c debug statements
+
+ChangeSet@1.2773.1.71, 2012-08-04 11:34:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P293
+ TAG: NTP_4_2_7P293
+
+ ChangeLog@1.1146.1.62 +1 -0
+ NTP_4_2_7P293
+
+ ntpd/ntpd-opts.c@1.299 +4 -4
+ NTP_4_2_7P293
+
+ ntpd/ntpd-opts.h@1.299 +3 -3
+ NTP_4_2_7P293
+
+ ntpd/ntpd-opts.texi@1.275.5.4 +2 -2
+ NTP_4_2_7P293
+
+ ntpd/ntpd.1ntpdman@1.110 +2 -2
+ NTP_4_2_7P293
+
+ ntpd/ntpd.1ntpdmdoc@1.110 +2 -2
+ NTP_4_2_7P293
+
+ ntpd/ntpd.man.in@1.110 +2 -2
+ NTP_4_2_7P293
+
+ ntpd/ntpd.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc-opts.c@1.293 +4 -4
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc-opts.h@1.293 +3 -3
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc-opts.texi@1.272.5.3 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc.1ntpdcman@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc.html@1.121 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc.man.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpdc/ntpdc.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpq/ntpq-opts.c@1.295 +4 -4
+ NTP_4_2_7P293
+
+ ntpq/ntpq-opts.h@1.295 +3 -3
+ NTP_4_2_7P293
+
+ ntpq/ntpq-opts.texi@1.274.5.3 +2 -2
+ NTP_4_2_7P293
+
+ ntpq/ntpq.1ntpqman@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpq/ntpq.1ntpqmdoc@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpq/ntpq.man.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpq/ntpq.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.295 +4 -4
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.295 +3 -3
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.5.3 +2 -2
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd.man.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ packageinfo.sh@1.296 +1 -1
+ NTP_4_2_7P293
+
+ scripts/ntp-wait-opts.texi@1.92.5.3 +1 -1
+ NTP_4_2_7P293
+
+ scripts/ntp-wait.1ntp-waitman@1.109 +2 -2
+ NTP_4_2_7P293
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.109 +2 -2
+ NTP_4_2_7P293
+
+ scripts/ntp-wait.html@1.113 +1 -1
+ NTP_4_2_7P293
+
+ scripts/ntp-wait.man.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ scripts/ntp-wait.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp-opts.c@1.291 +4 -4
+ NTP_4_2_7P293
+
+ sntp/sntp-opts.h@1.291 +3 -3
+ NTP_4_2_7P293
+
+ sntp/sntp-opts.texi@1.270.5.3 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp.1sntpman@1.111 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp.1sntpmdoc@1.111 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp.html@1.291 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp.man.in@1.111 +2 -2
+ NTP_4_2_7P293
+
+ sntp/sntp.mdoc.in@1.111 +2 -2
+ NTP_4_2_7P293
+
+ util/ntp-keygen-opts.c@1.295 +4 -4
+ NTP_4_2_7P293
+
+ util/ntp-keygen-opts.h@1.295 +3 -3
+ NTP_4_2_7P293
+
+ util/ntp-keygen-opts.texi@1.275.5.3 +2 -2
+ NTP_4_2_7P293
+
+ util/ntp-keygen.1ntp-keygenman@1.109 +2 -2
+ NTP_4_2_7P293
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.109 +2 -2
+ NTP_4_2_7P293
+
+ util/ntp-keygen.man.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ util/ntp-keygen.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P293
+
+ChangeSet@1.2773.1.70, 2012-08-03 23:15:30-04:00, stenn@psp-deb1.ntp.org
+ Cleanup kclk_sel240x.o rules in libparse/Makefile.am
+
+ ChangeLog@1.1146.1.61 +1 -0
+ Cleanup kclk_sel240x.o rules in libparse/Makefile.am
+
+ libparse/Makefile.am@1.30 +1 -4
+ Cleanup kclk_sel240x.o rules in libparse/Makefile.am
+
+ChangeSet@1.2773.1.69, 2012-08-03 23:11:04-04:00, stenn@psp-deb1.ntp.org
+ Documentation cleanup from Mike T.
+
+ ChangeLog@1.1146.1.60 +1 -0
+ Documentation cleanup from Mike T.
+
+ html/authentic.html@1.10 +2 -2
+ Documentation cleanup from Mike T.
+
+ html/decode.html@1.19 +1 -1
+ Documentation cleanup from Mike T.
+
+ html/drivers/driver1.html@1.19 +1 -1
+ Documentation cleanup from Mike T.
+
+ html/miscopt.html@1.69 +2 -2
+ Documentation cleanup from Mike T.
+
+ChangeSet@1.2773.1.68, 2012-08-03 02:51:04-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+
+ BitKeeper/deleted/55/driver2.htm~3aed0663@1.14 +0 -0
+ Delete: html/drivers/driver2.html
+
+ ChangeLog@1.1146.1.59 +1 -0
+ [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+
+ html/refclock.html@1.36 +0 -1
+ [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+
+ ntpd/ntp_control.c@1.182 +1 -1
+ [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+
+ ntpd/refclock_conf.c@1.33 +0 -6
+ [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
+
+ChangeSet@1.2773.1.67, 2012-08-02 11:34:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P292
+ TAG: NTP_4_2_7P292
+
+ ChangeLog@1.1146.1.58 +1 -0
+ NTP_4_2_7P292
+
+ ntpd/ntpd-opts.c@1.298 +4 -4
+ NTP_4_2_7P292
+
+ ntpd/ntpd-opts.h@1.298 +3 -3
+ NTP_4_2_7P292
+
+ ntpd/ntpd-opts.texi@1.275.5.3 +2 -2
+ NTP_4_2_7P292
+
+ ntpd/ntpd.1ntpdman@1.109 +2 -2
+ NTP_4_2_7P292
+
+ ntpd/ntpd.1ntpdmdoc@1.109 +2 -2
+ NTP_4_2_7P292
+
+ ntpd/ntpd.man.in@1.109 +2 -2
+ NTP_4_2_7P292
+
+ ntpd/ntpd.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc-opts.c@1.292 +4 -4
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc-opts.h@1.292 +3 -3
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc-opts.texi@1.272.5.2 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc.1ntpdcman@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc.html@1.120 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc.man.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpdc/ntpdc.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpq/ntpq-opts.c@1.294 +4 -4
+ NTP_4_2_7P292
+
+ ntpq/ntpq-opts.h@1.294 +3 -3
+ NTP_4_2_7P292
+
+ ntpq/ntpq-opts.texi@1.274.5.2 +2 -2
+ NTP_4_2_7P292
+
+ ntpq/ntpq.1ntpqman@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpq/ntpq.1ntpqmdoc@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpq/ntpq.man.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpq/ntpq.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.294 +4 -4
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.294 +3 -3
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.5.2 +2 -2
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd.man.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ packageinfo.sh@1.295 +1 -1
+ NTP_4_2_7P292
+
+ scripts/ntp-wait-opts.texi@1.92.5.2 +1 -1
+ NTP_4_2_7P292
+
+ scripts/ntp-wait.1ntp-waitman@1.108 +2 -2
+ NTP_4_2_7P292
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.108 +2 -2
+ NTP_4_2_7P292
+
+ scripts/ntp-wait.html@1.112 +1 -1
+ NTP_4_2_7P292
+
+ scripts/ntp-wait.man.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ scripts/ntp-wait.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp-opts.c@1.290 +4 -4
+ NTP_4_2_7P292
+
+ sntp/sntp-opts.h@1.290 +3 -3
+ NTP_4_2_7P292
+
+ sntp/sntp-opts.texi@1.270.5.2 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp.1sntpman@1.110 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp.1sntpmdoc@1.110 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp.html@1.290 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp.man.in@1.110 +2 -2
+ NTP_4_2_7P292
+
+ sntp/sntp.mdoc.in@1.110 +2 -2
+ NTP_4_2_7P292
+
+ util/ntp-keygen-opts.c@1.294 +4 -4
+ NTP_4_2_7P292
+
+ util/ntp-keygen-opts.h@1.294 +3 -3
+ NTP_4_2_7P292
+
+ util/ntp-keygen-opts.texi@1.275.5.2 +2 -2
+ NTP_4_2_7P292
+
+ util/ntp-keygen.1ntp-keygenman@1.108 +2 -2
+ NTP_4_2_7P292
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.108 +2 -2
+ NTP_4_2_7P292
+
+ util/ntp-keygen.man.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ util/ntp-keygen.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P292
+
+ChangeSet@1.2773.1.66, 2012-08-02 06:48:06-04:00, stenn@deacon.udel.edu
+ [Bug 1545] Note why we are logging the Version string
+
+ ChangeLog@1.1146.1.57 +1 -0
+ [Bug 1545] Note why we are logging the Version string
+
+ ntpd/ntpd.c@1.133 +1 -1
+ [Bug 1545] Note why we are logging the Version string
+
+ChangeSet@1.2773.1.65, 2012-08-02 04:41:05-04:00, stenn@deacon.udel.edu
+ [Bug 2247] Get rid of the TRAK refclock - deprecated since 2006
+
+ BitKeeper/deleted/50/refclock_trak.c~3aed0663@1.12 +0 -0
+ Delete: ntpd/refclock_trak.c
+
+ ChangeLog@1.1146.1.56 +1 -0
+ [Bug 2247] Get rid of the TRAK refclock - deprecated since 2006
+
+ configure.ac@1.548 +0 -11
+ [Bug 2247] Get rid of the TRAK refclock - deprecated since 2006
+
+ ntpd/Makefile.am@1.112.1.4 +0 -1
+ [Bug 2247] Get rid of the TRAK refclock - deprecated since 2006
+
+ChangeSet@1.2773.1.64, 2012-08-02 04:35:10-04:00, stenn@deacon.udel.edu
+ [Bug 1872] Remove legacy ppsclock fdpps, #ifdef PPS
+
+ ChangeLog@1.1146.1.55 +1 -0
+ [Bug 1872] Remove legacy ppsclock fdpps, #ifdef PPS
+
+ ntpd/ntp_refclock.c@1.116 +1 -6
+ [Bug 1872] Remove legacy ppsclock fdpps, #ifdef PPS
+
+ ntpd/refclock_zyfer.c@1.10 +1 -18
+ [Bug 1872] Remove legacy ppsclock fdpps, #ifdef PPS
+
+ChangeSet@1.2773.1.63, 2012-08-02 02:32:58-04:00, stenn@deacon.udel.edu
+ Clean up an exit status in ntpq.c
+
+ ChangeLog@1.1146.1.54 +1 -0
+ Clean up an exit status in ntpq.c
+
+ ntpq/ntpq.c@1.148 +1 -1
+ Clean up an exit status in ntpq.c
+
+ChangeSet@1.2773.1.62, 2012-08-01 21:26:07-04:00, stenn@psp-deb1.ntp.org
+ [Bug 2075] Fix spelling of 'incompatible'
+
+ ChangeLog@1.1146.1.53 +1 -0
+ [Bug 2075] Fix spelling of 'incompatible'
+
+ include/ntp_request.h@1.47 +2 -2
+ [Bug 2075] Fix spelling of 'incompatible'
+
+ ntpdc/ntpdc.c@1.100 +1 -1
+ [Bug 2075] Fix spelling of 'incompatible'
+
+ChangeSet@1.2773.1.61, 2012-07-31 11:34:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P291
+ TAG: NTP_4_2_7P291
+
+ ChangeLog@1.1146.1.52 +1 -0
+ NTP_4_2_7P291
+
+ ntpd/ntpd-opts.c@1.297 +6 -6
+ NTP_4_2_7P291
+
+ ntpd/ntpd-opts.h@1.297 +3 -3
+ NTP_4_2_7P291
+
+ ntpd/ntpd-opts.texi@1.275.5.2 +2 -2
+ NTP_4_2_7P291
+
+ ntpd/ntpd.1ntpdman@1.108 +548 -8
+ NTP_4_2_7P291
+
+ ntpd/ntpd.1ntpdmdoc@1.108 +547 -8
+ NTP_4_2_7P291
+
+ ntpd/ntpd.man.in@1.108 +548 -8
+ NTP_4_2_7P291
+
+ ntpd/ntpd.mdoc.in@1.108 +547 -8
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc-opts.c@1.291 +4 -4
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc-opts.h@1.291 +3 -3
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc-opts.texi@1.272.5.1 +2 -2
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc.1ntpdcman@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc.html@1.119 +2 -2
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc.man.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpdc/ntpdc.mdoc.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpq/ntpq-opts.c@1.293 +4 -4
+ NTP_4_2_7P291
+
+ ntpq/ntpq-opts.h@1.293 +3 -3
+ NTP_4_2_7P291
+
+ ntpq/ntpq-opts.texi@1.274.5.1 +2 -2
+ NTP_4_2_7P291
+
+ ntpq/ntpq.1ntpqman@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpq/ntpq.1ntpqmdoc@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpq/ntpq.man.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpq/ntpq.mdoc.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.293 +4 -4
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.293 +3 -3
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.5.1 +2 -2
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd.man.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ packageinfo.sh@1.294 +1 -1
+ NTP_4_2_7P291
+
+ scripts/ntp-wait-opts.texi@1.92.5.1 +1 -1
+ NTP_4_2_7P291
+
+ scripts/ntp-wait.1ntp-waitman@1.107 +2 -2
+ NTP_4_2_7P291
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.107 +2 -2
+ NTP_4_2_7P291
+
+ scripts/ntp-wait.html@1.111 +1 -1
+ NTP_4_2_7P291
+
+ scripts/ntp-wait.man.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ scripts/ntp-wait.mdoc.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp-opts.c@1.289 +4 -4
+ NTP_4_2_7P291
+
+ sntp/sntp-opts.h@1.289 +3 -3
+ NTP_4_2_7P291
+
+ sntp/sntp-opts.texi@1.270.5.1 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp.1sntpman@1.109 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp.1sntpmdoc@1.109 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp.html@1.289 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp.man.in@1.109 +2 -2
+ NTP_4_2_7P291
+
+ sntp/sntp.mdoc.in@1.109 +2 -2
+ NTP_4_2_7P291
+
+ util/ntp-keygen-opts.c@1.293 +4 -4
+ NTP_4_2_7P291
+
+ util/ntp-keygen-opts.h@1.293 +3 -3
+ NTP_4_2_7P291
+
+ util/ntp-keygen-opts.texi@1.275.5.1 +2 -2
+ NTP_4_2_7P291
+
+ util/ntp-keygen.1ntp-keygenman@1.107 +2 -2
+ NTP_4_2_7P291
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.107 +2 -2
+ NTP_4_2_7P291
+
+ util/ntp-keygen.man.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ util/ntp-keygen.mdoc.in@1.107 +2 -2
+ NTP_4_2_7P291
+
+ChangeSet@1.2773.1.60, 2012-07-27 15:12:58-04:00, utterback@pogo.udel.edu
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ChangeLog@1.1146.1.51 +1 -0
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ html/ntpd.html@1.56 +2 -0
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd-opts.c@1.296 +58 -27
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd-opts.h@1.296 +12 -5
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd-opts.texi@1.275.5.1 +18 -2
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd.1ntpdman@1.107 +14 -548
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd.1ntpdmdoc@1.107 +13 -547
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd.c@1.132 +11 -2
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd.man.in@1.107 +14 -548
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpd.mdoc.in@1.107 +13 -547
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ ntpd/ntpdbase-opts.def@1.23 +11 -0
+ [Bug 2241] New: MDNS registration should only happen if requested.
+
+ChangeSet@1.2782, 2012-07-20 06:02:41-04:00, stenn@psp-deb1.ntp.org
+ Upgrade to autogen-5.16.1 and libopts-36.4.11
+
+ sntp/include/autogen-version.def@1.11 +1 -1
+ Upgrade to autogen-5.16.1 and libopts-36.4.11
+
+ sntp/libopts/Makefile.am@1.14, stenn@psp-fb1.ntp.org +5 -5
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/ag-char-map.h@1.17, stenn@psp-fb1.ntp.org +295 -197
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/ao-strs.c@1.3, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/ao-strs.h@1.2, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/autoopts/options.h@1.16, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/autoopts/project.h@1.3, stenn@psp-fb1.ntp.org +0 -2
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/autoopts/usage-txt.h@1.16, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/compat/windows-config.h@1.9, stenn@psp-fb1.ntp.org +25 -14
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/genshell.c@1.17, stenn@psp-fb1.ntp.org +41 -11
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/genshell.h@1.17, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/libopts.c@1.7, stenn@psp-fb1.ntp.org +0 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/m4/libopts.m4@1.20, stenn@psp-fb1.ntp.org +7 -7
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/parse-duration.c@1.8, stenn@psp-fb1.ntp.org +7 -7
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/parse-duration.h@1.7, stenn@psp-fb1.ntp.org +4 -4
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/proto.h@1.17, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/value-type.h@1.17, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/libopts/xat-attribute.h@1.17, stenn@psp-fb1.ntp.org +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ChangeSet@1.2773.1.59, 2012-07-20 00:03:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P290
+ TAG: NTP_4_2_7P290
+
+ ChangeLog@1.1146.1.50 +1 -0
+ NTP_4_2_7P290
+
+ ntpd/ntpd-opts.c@1.295 +4 -4
+ NTP_4_2_7P290
+
+ ntpd/ntpd-opts.h@1.295 +3 -3
+ NTP_4_2_7P290
+
+ ntpd/ntpd-opts.texi@1.275.4.6 +2 -2
+ NTP_4_2_7P290
+
+ ntpd/ntpd.1ntpdman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpd/ntpd.1ntpdmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpd/ntpd.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpd/ntpd.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc-opts.c@1.290 +4 -4
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc-opts.h@1.290 +3 -3
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc-opts.texi@1.272.4.6 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc.1ntpdcman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc.html@1.118 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpdc/ntpdc.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpq/ntpq-opts.c@1.292 +4 -4
+ NTP_4_2_7P290
+
+ ntpq/ntpq-opts.h@1.292 +3 -3
+ NTP_4_2_7P290
+
+ ntpq/ntpq-opts.texi@1.274.4.6 +2 -2
+ NTP_4_2_7P290
+
+ ntpq/ntpq.1ntpqman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpq/ntpq.1ntpqmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpq/ntpq.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpq/ntpq.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.292 +4 -4
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.292 +3 -3
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.6 +2 -2
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ packageinfo.sh@1.293 +1 -1
+ NTP_4_2_7P290
+
+ scripts/ntp-wait-opts.texi@1.92.4.6 +1 -1
+ NTP_4_2_7P290
+
+ scripts/ntp-wait.1ntp-waitman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ scripts/ntp-wait.html@1.110 +1 -1
+ NTP_4_2_7P290
+
+ scripts/ntp-wait.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ scripts/ntp-wait.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp-opts.c@1.288 +4 -4
+ NTP_4_2_7P290
+
+ sntp/sntp-opts.h@1.288 +3 -3
+ NTP_4_2_7P290
+
+ sntp/sntp-opts.texi@1.270.4.6 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp.1sntpman@1.108 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp.1sntpmdoc@1.108 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp.html@1.288 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp.man.in@1.108 +2 -2
+ NTP_4_2_7P290
+
+ sntp/sntp.mdoc.in@1.108 +2 -2
+ NTP_4_2_7P290
+
+ util/ntp-keygen-opts.c@1.292 +4 -4
+ NTP_4_2_7P290
+
+ util/ntp-keygen-opts.h@1.292 +3 -3
+ NTP_4_2_7P290
+
+ util/ntp-keygen-opts.texi@1.275.4.6 +2 -2
+ NTP_4_2_7P290
+
+ util/ntp-keygen.1ntp-keygenman@1.106 +2 -2
+ NTP_4_2_7P290
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.106 +2 -2
+ NTP_4_2_7P290
+
+ util/ntp-keygen.man.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ util/ntp-keygen.mdoc.in@1.106 +2 -2
+ NTP_4_2_7P290
+
+ChangeSet@1.2773.1.58, 2012-07-19 19:26:56-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ ChangeLog@1.1146.1.49 +1 -0
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ configure.ac@1.547 +16 -0
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ html/drivers/driver8.html@1.29 +252 -242
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ libparse/Makefile.am@1.29 +8 -0
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ libparse/clk_sel240x.c@1.1 +194 -0
+ BitKeeper file /home/stenn/ntp-dev/libparse/clk_sel240x.c
+
+ libparse/clk_sel240x.c@1.0 +0 -0
+
+ libparse/parse_conf.c@1.10 +7 -0
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ ntpd/refclock_parse.c@1.67 +52 -0
+ [Bug 1454] Add parse clock support for the SEL-240x GPS products
+
+ChangeSet@1.2773.1.57, 2012-07-17 01:15:11-04:00, stenn@psp-deb1.ntp.org
+ CID 709185: refclock_chu.c will leak fd==0 (better fix)
+
+ ChangeLog@1.1146.1.48 +1 -0
+ CID 709185: refclock_chu.c will leak fd==0 (better fix)
+
+ ntpd/refclock_chu.c@1.55 +4 -13
+ CID 709185: refclock_chu.c will leak fd==0 (better fix)
+
+ChangeSet@1.2773.1.56, 2012-07-16 00:21:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P289
+ TAG: NTP_4_2_7P289
+
+ ChangeLog@1.1146.1.47 +1 -0
+ NTP_4_2_7P289
+
+ ntpd/ntpd-opts.c@1.294 +4 -4
+ NTP_4_2_7P289
+
+ ntpd/ntpd-opts.h@1.294 +3 -3
+ NTP_4_2_7P289
+
+ ntpd/ntpd-opts.texi@1.275.4.5 +2 -2
+ NTP_4_2_7P289
+
+ ntpd/ntpd.1ntpdman@1.105 +4 -10
+ NTP_4_2_7P289
+
+ ntpd/ntpd.1ntpdmdoc@1.105 +4 -10
+ NTP_4_2_7P289
+
+ ntpd/ntpd.man.in@1.105 +4 -10
+ NTP_4_2_7P289
+
+ ntpd/ntpd.mdoc.in@1.105 +4 -10
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc-opts.c@1.289 +4 -4
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc-opts.h@1.289 +3 -3
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc-opts.texi@1.272.4.5 +2 -2
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc.1ntpdcman@1.105 +3 -8
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.105 +3 -8
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc.html@1.117 +2 -2
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc.man.in@1.105 +3 -8
+ NTP_4_2_7P289
+
+ ntpdc/ntpdc.mdoc.in@1.105 +3 -8
+ NTP_4_2_7P289
+
+ ntpq/ntpq-opts.c@1.291 +4 -4
+ NTP_4_2_7P289
+
+ ntpq/ntpq-opts.h@1.291 +3 -3
+ NTP_4_2_7P289
+
+ ntpq/ntpq-opts.texi@1.274.4.5 +2 -2
+ NTP_4_2_7P289
+
+ ntpq/ntpq.1ntpqman@1.105 +2 -3
+ NTP_4_2_7P289
+
+ ntpq/ntpq.1ntpqmdoc@1.105 +2 -3
+ NTP_4_2_7P289
+
+ ntpq/ntpq.man.in@1.105 +2 -3
+ NTP_4_2_7P289
+
+ ntpq/ntpq.mdoc.in@1.105 +2 -3
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.291 +4 -4
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.291 +3 -3
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.5 +2 -2
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.105 +2 -4
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.105 +2 -4
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd.man.in@1.105 +2 -4
+ NTP_4_2_7P289
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.105 +2 -4
+ NTP_4_2_7P289
+
+ packageinfo.sh@1.292 +1 -1
+ NTP_4_2_7P289
+
+ scripts/ntp-wait-opts.texi@1.92.4.5 +2 -14
+ NTP_4_2_7P289
+
+ scripts/ntp-wait.1ntp-waitman@1.105 +2 -4
+ NTP_4_2_7P289
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.105 +2 -4
+ NTP_4_2_7P289
+
+ scripts/ntp-wait.html@1.109 +2 -14
+ NTP_4_2_7P289
+
+ scripts/ntp-wait.man.in@1.105 +2 -4
+ NTP_4_2_7P289
+
+ scripts/ntp-wait.mdoc.in@1.105 +2 -4
+ NTP_4_2_7P289
+
+ sntp/sntp-opts.c@1.287 +4 -4
+ NTP_4_2_7P289
+
+ sntp/sntp-opts.h@1.287 +3 -3
+ NTP_4_2_7P289
+
+ sntp/sntp-opts.texi@1.270.4.5 +2 -2
+ NTP_4_2_7P289
+
+ sntp/sntp.1sntpman@1.107 +3 -7
+ NTP_4_2_7P289
+
+ sntp/sntp.1sntpmdoc@1.107 +3 -7
+ NTP_4_2_7P289
+
+ sntp/sntp.html@1.287 +2 -2
+ NTP_4_2_7P289
+
+ sntp/sntp.man.in@1.107 +3 -7
+ NTP_4_2_7P289
+
+ sntp/sntp.mdoc.in@1.107 +3 -7
+ NTP_4_2_7P289
+
+ util/ntp-keygen-opts.c@1.291 +4 -4
+ NTP_4_2_7P289
+
+ util/ntp-keygen-opts.h@1.291 +3 -3
+ NTP_4_2_7P289
+
+ util/ntp-keygen-opts.texi@1.275.4.5 +2 -2
+ NTP_4_2_7P289
+
+ util/ntp-keygen.1ntp-keygenman@1.105 +4 -8
+ NTP_4_2_7P289
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.105 +4 -8
+ NTP_4_2_7P289
+
+ util/ntp-keygen.man.in@1.105 +4 -8
+ NTP_4_2_7P289
+
+ util/ntp-keygen.mdoc.in@1.105 +4 -8
+ NTP_4_2_7P289
+
+ChangeSet@1.2773.1.55, 2012-07-15 02:28:03-07:00, stenn@stenn.ntp.org
+ CID 97123: Future-proof possible change to refclock_nmea.c
+
+ ChangeLog@1.1146.1.46 +1 -0
+ CID 97123: Future-proof possible change to refclock_nmea.c
+
+ ntpd/refclock_nmea.c@1.71 +1 -0
+ CID 97123: Future-proof possible change to refclock_nmea.c
+
+ChangeSet@1.2773.1.54, 2012-07-15 01:04:03-07:00, stenn@stenn.ntp.org
+ CID 97377: ntp-keygen.c's followlink() might not NUL-terminate
+
+ ChangeLog@1.1146.1.45 +1 -0
+ CID 97377: ntp-keygen.c's followlink() might not NUL-terminate
+
+ util/ntp-keygen.c@1.92 +5 -1
+ CID 97377: ntp-keygen.c's followlink() might not NUL-terminate
+
+ChangeSet@1.2773.1.53, 2012-07-14 23:46:24-07:00, stenn@stenn.ntp.org
+ CID 709185: refclock_chu.c will leak fd==0 (which should be impossible)
+
+ ChangeLog@1.1146.1.44 +1 -0
+ CID 709185: refclock_chu.c will leak fd==0 (which should be impossible)
+
+ ntpd/refclock_chu.c@1.54 +11 -0
+ CID 709185: refclock_chu.c will leak fd==0 (which should be impossible)
+
+ChangeSet@1.2773.1.52, 2012-07-03 09:13:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P288
+ TAG: NTP_4_2_7P288
+
+ ChangeLog@1.1146.1.43 +1 -0
+ NTP_4_2_7P288
+
+ ntpd/ntpd-opts.c@1.293 +4 -4
+ NTP_4_2_7P288
+
+ ntpd/ntpd-opts.h@1.293 +3 -3
+ NTP_4_2_7P288
+
+ ntpd/ntpd-opts.texi@1.275.4.4 +2 -2
+ NTP_4_2_7P288
+
+ ntpd/ntpd.1ntpdman@1.104 +554 -8
+ NTP_4_2_7P288
+
+ ntpd/ntpd.1ntpdmdoc@1.104 +552 -7
+ NTP_4_2_7P288
+
+ ntpd/ntpd.man.in@1.104 +554 -8
+ NTP_4_2_7P288
+
+ ntpd/ntpd.mdoc.in@1.104 +552 -7
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc-opts.c@1.288 +4 -4
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc-opts.h@1.288 +3 -3
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc-opts.texi@1.272.4.4 +2 -2
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc.1ntpdcman@1.104 +709 -7
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.104 +663 -6
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc.html@1.116 +2 -2
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc.man.in@1.104 +709 -7
+ NTP_4_2_7P288
+
+ ntpdc/ntpdc.mdoc.in@1.104 +663 -6
+ NTP_4_2_7P288
+
+ ntpq/ntpq-opts.c@1.290 +4 -4
+ NTP_4_2_7P288
+
+ ntpq/ntpq-opts.h@1.290 +3 -3
+ NTP_4_2_7P288
+
+ ntpq/ntpq-opts.texi@1.274.4.4 +2 -2
+ NTP_4_2_7P288
+
+ ntpq/ntpq.1ntpqman@1.104 +261 -3
+ NTP_4_2_7P288
+
+ ntpq/ntpq.1ntpqmdoc@1.104 +245 -2
+ NTP_4_2_7P288
+
+ ntpq/ntpq.man.in@1.104 +261 -3
+ NTP_4_2_7P288
+
+ ntpq/ntpq.mdoc.in@1.104 +245 -2
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.290 +4 -4
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.290 +3 -3
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.4 +2 -2
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.104 +5 -4
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.104 +4 -3
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd.man.in@1.104 +5 -4
+ NTP_4_2_7P288
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.104 +4 -3
+ NTP_4_2_7P288
+
+ packageinfo.sh@1.291 +1 -1
+ NTP_4_2_7P288
+
+ scripts/ntp-wait-opts.texi@1.92.4.4 +1 -1
+ NTP_4_2_7P288
+
+ scripts/ntp-wait.1ntp-waitman@1.104 +20 -4
+ NTP_4_2_7P288
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.104 +19 -3
+ NTP_4_2_7P288
+
+ scripts/ntp-wait.html@1.108 +1 -1
+ NTP_4_2_7P288
+
+ scripts/ntp-wait.man.in@1.104 +20 -4
+ NTP_4_2_7P288
+
+ scripts/ntp-wait.mdoc.in@1.104 +19 -3
+ NTP_4_2_7P288
+
+ sntp/sntp-opts.c@1.286 +4 -4
+ NTP_4_2_7P288
+
+ sntp/sntp-opts.h@1.286 +3 -3
+ NTP_4_2_7P288
+
+ sntp/sntp-opts.texi@1.270.4.4 +2 -2
+ NTP_4_2_7P288
+
+ sntp/sntp.1sntpman@1.106 +69 -6
+ NTP_4_2_7P288
+
+ sntp/sntp.1sntpmdoc@1.106 +68 -5
+ NTP_4_2_7P288
+
+ sntp/sntp.html@1.286 +2 -2
+ NTP_4_2_7P288
+
+ sntp/sntp.man.in@1.106 +69 -6
+ NTP_4_2_7P288
+
+ sntp/sntp.mdoc.in@1.106 +68 -5
+ NTP_4_2_7P288
+
+ util/ntp-keygen-opts.c@1.290 +4 -4
+ NTP_4_2_7P288
+
+ util/ntp-keygen-opts.h@1.290 +3 -3
+ NTP_4_2_7P288
+
+ util/ntp-keygen-opts.texi@1.275.4.4 +2 -2
+ NTP_4_2_7P288
+
+ util/ntp-keygen.1ntp-keygenman@1.104 +724 -6
+ NTP_4_2_7P288
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.104 +709 -5
+ NTP_4_2_7P288
+
+ util/ntp-keygen.man.in@1.104 +724 -6
+ NTP_4_2_7P288
+
+ util/ntp-keygen.mdoc.in@1.104 +709 -5
+ NTP_4_2_7P288
+
+ChangeSet@1.2773.1.51, 2012-07-03 04:44:18-04:00, stenn@deacon.udel.edu
+ CID 709173: Make sure a libisc function we do not use is called properly
+
+ ChangeLog@1.1146.1.42 +1 -0
+ CID 709173: Make sure a libisc function we do not use is called properly
+
+ lib/isc/unix/file.c@1.6 +2 -0
+ CID 709173: Make sure a libisc function we do not use is called properly
+
+ChangeSet@1.2773.1.50, 2012-07-03 01:29:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P287
+ TAG: NTP_4_2_7P287
+
+ ChangeLog@1.1146.1.41 +1 -0
+ NTP_4_2_7P287
+
+ ntpd/ntpd-opts.c@1.292 +4 -4
+ NTP_4_2_7P287
+
+ ntpd/ntpd-opts.h@1.292 +3 -3
+ NTP_4_2_7P287
+
+ ntpd/ntpd-opts.texi@1.275.4.3 +2 -2
+ NTP_4_2_7P287
+
+ ntpd/ntpd.1ntpdman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpd/ntpd.1ntpdmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpd/ntpd.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpd/ntpd.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc-opts.c@1.287 +4 -4
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc-opts.h@1.287 +3 -3
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc-opts.texi@1.272.4.3 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc.1ntpdcman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc.html@1.115 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpdc/ntpdc.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpq/ntpq-opts.c@1.289 +4 -4
+ NTP_4_2_7P287
+
+ ntpq/ntpq-opts.h@1.289 +3 -3
+ NTP_4_2_7P287
+
+ ntpq/ntpq-opts.texi@1.274.4.3 +2 -2
+ NTP_4_2_7P287
+
+ ntpq/ntpq.1ntpqman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpq/ntpq.1ntpqmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpq/ntpq.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpq/ntpq.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.289 +4 -4
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.289 +3 -3
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.3 +2 -2
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ packageinfo.sh@1.290 +1 -1
+ NTP_4_2_7P287
+
+ scripts/ntp-wait-opts.texi@1.92.4.3 +14 -2
+ NTP_4_2_7P287
+
+ scripts/ntp-wait.1ntp-waitman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ scripts/ntp-wait.html@1.107 +14 -2
+ NTP_4_2_7P287
+
+ scripts/ntp-wait.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ scripts/ntp-wait.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp-opts.c@1.285 +4 -4
+ NTP_4_2_7P287
+
+ sntp/sntp-opts.h@1.285 +3 -3
+ NTP_4_2_7P287
+
+ sntp/sntp-opts.texi@1.270.4.3 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp.1sntpman@1.105 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp.1sntpmdoc@1.105 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp.html@1.285 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp.man.in@1.105 +2 -2
+ NTP_4_2_7P287
+
+ sntp/sntp.mdoc.in@1.105 +2 -2
+ NTP_4_2_7P287
+
+ util/ntp-keygen-opts.c@1.289 +4 -4
+ NTP_4_2_7P287
+
+ util/ntp-keygen-opts.h@1.289 +3 -3
+ NTP_4_2_7P287
+
+ util/ntp-keygen-opts.texi@1.275.4.3 +2 -2
+ NTP_4_2_7P287
+
+ util/ntp-keygen.1ntp-keygenman@1.103 +2 -2
+ NTP_4_2_7P287
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.103 +2 -2
+ NTP_4_2_7P287
+
+ util/ntp-keygen.man.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ util/ntp-keygen.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P287
+
+ChangeSet@1.2773.1.49, 2012-07-02 02:17:35+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Remove 1024 associations-per-server limit from ntpq.
+ Remove blank line between ntpq mreadvar associations.
+
+ ChangeLog@1.1146.1.40 +2 -0
+ Remove 1024 associations-per-server limit from ntpq.
+ Remove blank line between ntpq mreadvar associations.
+
+ ntpq/ntpq-subs.c@1.97 +13 -10
+ Remove 1024 associations-per-server limit from ntpq.
+ Remove blank line between ntpq mreadvar associations.
+
+ ntpq/ntpq.c@1.147 +28 -2
+ Remove 1024 associations-per-server limit from ntpq.
+
+ ntpq/ntpq.h@1.27 +3 -3
+ Remove 1024 associations-per-server limit from ntpq.
+
+ChangeSet@1.2773.1.48, 2012-06-28 07:06:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P286
+ TAG: NTP_4_2_7P286
+
+ ChangeLog@1.1146.1.39 +1 -0
+ NTP_4_2_7P286
+
+ ntpd/ntpd-opts.c@1.291 +4 -4
+ NTP_4_2_7P286
+
+ ntpd/ntpd-opts.h@1.291 +3 -3
+ NTP_4_2_7P286
+
+ ntpd/ntpd-opts.texi@1.275.4.2 +2 -2
+ NTP_4_2_7P286
+
+ ntpd/ntpd.1ntpdman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpd/ntpd.1ntpdmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpd/ntpd.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpd/ntpd.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc-opts.c@1.286 +4 -4
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc-opts.h@1.286 +3 -3
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc-opts.texi@1.272.4.2 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc.1ntpdcman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc.html@1.114 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpdc/ntpdc.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpq/ntpq-opts.c@1.288 +4 -4
+ NTP_4_2_7P286
+
+ ntpq/ntpq-opts.h@1.288 +3 -3
+ NTP_4_2_7P286
+
+ ntpq/ntpq-opts.texi@1.274.4.2 +2 -2
+ NTP_4_2_7P286
+
+ ntpq/ntpq.1ntpqman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpq/ntpq.1ntpqmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpq/ntpq.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpq/ntpq.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.288 +4 -4
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.288 +3 -3
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.2 +2 -2
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ packageinfo.sh@1.289 +1 -1
+ NTP_4_2_7P286
+
+ scripts/ntp-wait-opts.texi@1.92.4.2 +2 -14
+ NTP_4_2_7P286
+
+ scripts/ntp-wait.1ntp-waitman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ scripts/ntp-wait.html@1.106 +2 -14
+ NTP_4_2_7P286
+
+ scripts/ntp-wait.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ scripts/ntp-wait.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp-opts.c@1.284 +4 -4
+ NTP_4_2_7P286
+
+ sntp/sntp-opts.h@1.284 +3 -3
+ NTP_4_2_7P286
+
+ sntp/sntp-opts.texi@1.270.4.2 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp.1sntpman@1.104 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp.1sntpmdoc@1.104 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp.html@1.284 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp.man.in@1.104 +2 -2
+ NTP_4_2_7P286
+
+ sntp/sntp.mdoc.in@1.104 +2 -2
+ NTP_4_2_7P286
+
+ util/ntp-keygen-opts.c@1.288 +4 -4
+ NTP_4_2_7P286
+
+ util/ntp-keygen-opts.h@1.288 +3 -3
+ NTP_4_2_7P286
+
+ util/ntp-keygen-opts.texi@1.275.4.2 +2 -2
+ NTP_4_2_7P286
+
+ util/ntp-keygen.1ntp-keygenman@1.102 +2 -2
+ NTP_4_2_7P286
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.102 +2 -2
+ NTP_4_2_7P286
+
+ util/ntp-keygen.man.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ util/ntp-keygen.mdoc.in@1.102 +2 -2
+ NTP_4_2_7P286
+
+ChangeSet@1.2773.1.47, 2012-06-27 23:43:05-07:00, stenn@stenn.ntp.org
+ CID 97193: check return from sscanf() in ntp_config.c
+
+ ChangeLog@1.1146.1.38 +1 -0
+ CID 97193: check return from sscanf() in ntp_config.c
+
+ ntpd/ntp_config.c@1.300 +3 -3
+ CID 97193: check return from sscanf() in ntp_config.c
+
+ChangeSet@1.2773.1.46, 2012-06-27 23:37:22-07:00, stenn@stenn.ntp.org
+ CID 709207: Initialize "quality" for ulink_receive
+
+ ChangeLog@1.1146.1.37 +1 -0
+ CID 709207: Initialize "quality" for ulink_receive
+
+ ntpd/refclock_ulink.c@1.19 +7 -7
+ CID 709207: Initialize "quality" for ulink_receive
+
+ChangeSet@1.2773.1.45, 2012-06-27 23:28:32-07:00, stenn@stenn.ntp.org
+ CID 709169: check return from open("/dev/null", 0) and friends
+
+ ChangeLog@1.1146.1.36 +1 -0
+ CID 709169: check return from open("/dev/null", 0) and friends
+
+ ntpd/ntpd.c@1.131 +2 -3
+ CID 709169: check return from open("/dev/null", 0) and friends
+
+ChangeSet@1.2773.1.44, 2012-06-18 11:33:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P285
+ TAG: NTP_4_2_7P285
+
+ ChangeLog@1.1146.1.35 +1 -0
+ NTP_4_2_7P285
+
+ ntpd/ntpd-opts.c@1.290 +4 -4
+ NTP_4_2_7P285
+
+ ntpd/ntpd-opts.h@1.290 +3 -3
+ NTP_4_2_7P285
+
+ ntpd/ntpd-opts.texi@1.275.4.1 +2 -2
+ NTP_4_2_7P285
+
+ ntpd/ntpd.1ntpdman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpd/ntpd.1ntpdmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpd/ntpd.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpd/ntpd.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc-opts.c@1.285 +4 -4
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc-opts.h@1.285 +3 -3
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc-opts.texi@1.272.4.1 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc.1ntpdcman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc.html@1.113 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpdc/ntpdc.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpq/ntpq-opts.c@1.287 +4 -4
+ NTP_4_2_7P285
+
+ ntpq/ntpq-opts.h@1.287 +3 -3
+ NTP_4_2_7P285
+
+ ntpq/ntpq-opts.texi@1.274.4.1 +2 -2
+ NTP_4_2_7P285
+
+ ntpq/ntpq.1ntpqman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpq/ntpq.1ntpqmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpq/ntpq.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpq/ntpq.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.287 +4 -4
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.287 +3 -3
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.4.1 +2 -2
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ packageinfo.sh@1.288 +1 -1
+ NTP_4_2_7P285
+
+ scripts/ntp-wait-opts.texi@1.92.4.1 +1 -1
+ NTP_4_2_7P285
+
+ scripts/ntp-wait.1ntp-waitman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ scripts/ntp-wait.html@1.105 +1 -1
+ NTP_4_2_7P285
+
+ scripts/ntp-wait.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ scripts/ntp-wait.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp-opts.c@1.283 +4 -4
+ NTP_4_2_7P285
+
+ sntp/sntp-opts.h@1.283 +3 -3
+ NTP_4_2_7P285
+
+ sntp/sntp-opts.texi@1.270.4.1 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp.1sntpman@1.103 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp.1sntpmdoc@1.103 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp.html@1.283 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp.man.in@1.103 +2 -2
+ NTP_4_2_7P285
+
+ sntp/sntp.mdoc.in@1.103 +2 -2
+ NTP_4_2_7P285
+
+ util/ntp-keygen-opts.c@1.287 +4 -4
+ NTP_4_2_7P285
+
+ util/ntp-keygen-opts.h@1.287 +3 -3
+ NTP_4_2_7P285
+
+ util/ntp-keygen-opts.texi@1.275.4.1 +2 -2
+ NTP_4_2_7P285
+
+ util/ntp-keygen.1ntp-keygenman@1.101 +2 -2
+ NTP_4_2_7P285
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.101 +2 -2
+ NTP_4_2_7P285
+
+ util/ntp-keygen.man.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ util/ntp-keygen.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P285
+
+ChangeSet@1.2773.1.43, 2012-06-18 07:49:19+00:00, stenn@psp-fb1.ntp.org
+ Automake-1.12 wants us to use AM_PROG_AR
+
+ ChangeLog@1.1146.1.34 +1 -0
+ Automake-1.12 wants us to use AM_PROG_AR
+
+ configure.ac@1.546 +6 -0
+ Automake-1.12 wants us to use AM_PROG_AR
+
+ sntp/configure.ac@1.69 +6 -0
+ Automake-1.12 wants us to use AM_PROG_AR
+
+ChangeSet@1.2773.1.42, 2012-06-18 05:18:28+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ generated files from last cset's ntp_parser.y and keyword-gen.c changes.
+
+ ntpd/keyword-gen-utd@1.16 +1 -1
+ generated from last cset's keyword-gen.c changes.
+
+ ntpd/ntp_keyword.h@1.18 +535 -528
+ generated from last cset's keyword-gen.c changes.
+
+ ntpd/ntp_parser.c@1.79 +806 -796
+ generated from last cset's ntp_parser.y changes.
+
+ ntpd/ntp_parser.h@1.45 +161 -159
+ generated from last cset's ntp_parser.y changes.
+
+ChangeSet@1.2773.1.41, 2012-06-18 05:01:49+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2227] Enable mrulist access control via "restrict ... nomrulist".
+ Conditionalize msyslog messages about rejected mode 6 requests due to
+ nomodify and nomrulist restrictions under "logconfig +sysinfo".
+ Increment sys_restricted in a few rejection paths due to nomodify
+ restrictions where previosuly overlooked.
+
+ ChangeLog@1.1146.1.33 +5 -0
+ [Bug 2227] Enable mrulist access control via "restrict ... nomrulist".
+ Conditionalize msyslog messages about rejected mode 6 requests due to
+ nomodify and nomrulist restrictions under "logconfig +sysinfo".
+ Increment sys_restricted in a few rejection paths due to nomodify
+ restrictions where previosuly overlooked.
+
+ include/ntp.h@1.205 +5 -3
+ Add RES_NOMRULIST (0x2000) for "restrict ... nomrulist"
+
+ include/ntp_request.h@1.46 +1 -0
+ Make explicit MAX_INFO_ERR macro for ntp_request.c
+
+ ntpd/complete.conf@1.22 +1 -1
+ Add "nomrulist" to round-trip parser/saveconfig test.
+
+ ntpd/keyword-gen.c@1.21 +1 -0
+ Add "nomrulist" / T_Nomrulist
+
+ ntpd/ntp_config.c@1.299 +4 -0
+ [Bug 2227] Enable mrulist access control via "restrict ... nomrulist".
+
+ ntpd/ntp_control.c@1.181 +24 -10
+ [Bug 2227] Enable mrulist access control via "restrict ... nomrulist".
+ Conditionalize msyslog messages about rejected mode 6 requests due to
+ nomodify and nomrulist restrictions under "logconfig +sysinfo".
+ Increment sys_restricted in a few rejection paths due to nomodify
+ restrictions where previosuly overlooked.
+
+ ntpd/ntp_parser.y@1.73 +2 -0
+ Add, use "nomrulist" restriction.
+
+ ntpd/ntp_request.c@1.110 +7 -2
+ Increment sys_restricted in a few rejection paths due to nomodify
+ restrictions where previosuly overlooked.
+ Use explicit MAX_INFO_ERR macro instead of implicitly assuming
+ INFO_ERR_AUTH is the highest-numbered.
+
+ChangeSet@1.2773.1.40, 2012-06-16 21:36:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P284
+ TAG: NTP_4_2_7P284
+
+ ChangeLog@1.1146.1.32 +1 -0
+ NTP_4_2_7P284
+
+ ntpd/ntpd-opts.c@1.289 +4 -4
+ NTP_4_2_7P284
+
+ ntpd/ntpd-opts.h@1.289 +3 -3
+ NTP_4_2_7P284
+
+ ntpd/ntpd-opts.texi@1.275.3.6 +2 -2
+ NTP_4_2_7P284
+
+ ntpd/ntpd.1ntpdman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpd/ntpd.1ntpdmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpd/ntpd.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpd/ntpd.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc-opts.c@1.284 +4 -4
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc-opts.h@1.284 +3 -3
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc-opts.texi@1.272.3.6 +2 -2
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc.1ntpdcman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc.html@1.112 +2 -2
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpdc/ntpdc.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpq/ntpq-opts.c@1.286 +4 -4
+ NTP_4_2_7P284
+
+ ntpq/ntpq-opts.h@1.286 +3 -3
+ NTP_4_2_7P284
+
+ ntpq/ntpq-opts.texi@1.274.3.6 +2 -2
+ NTP_4_2_7P284
+
+ ntpq/ntpq.1ntpqman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpq/ntpq.1ntpqmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpq/ntpq.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpq/ntpq.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.286 +4 -4
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.286 +3 -3
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.6 +2 -2
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ packageinfo.sh@1.287 +1 -1
+ NTP_4_2_7P284
+
+ scripts/ntp-wait-opts.texi@1.92.3.6 +1 -1
+ NTP_4_2_7P284
+
+ scripts/ntp-wait.1ntp-waitman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ scripts/ntp-wait.html@1.104 +1 -1
+ NTP_4_2_7P284
+
+ scripts/ntp-wait.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ scripts/ntp-wait.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ sntp/sntp-opts.c@1.282 +4 -4
+ NTP_4_2_7P284
+
+ sntp/sntp-opts.h@1.282 +3 -3
+ NTP_4_2_7P284
+
+ sntp/sntp-opts.texi@1.270.3.6 +2 -2
+ NTP_4_2_7P284
+
+ sntp/sntp.1sntpman@1.102 +2 -2
+ NTP_4_2_7P284
+
+ sntp/sntp.1sntpmdoc@1.102 +1 -1
+ NTP_4_2_7P284
+
+ sntp/sntp.html@1.282 +2 -2
+ NTP_4_2_7P284
+
+ sntp/sntp.man.in@1.102 +2 -2
+ NTP_4_2_7P284
+
+ sntp/sntp.mdoc.in@1.102 +1 -1
+ NTP_4_2_7P284
+
+ util/ntp-keygen-opts.c@1.286 +4 -4
+ NTP_4_2_7P284
+
+ util/ntp-keygen-opts.h@1.286 +3 -3
+ NTP_4_2_7P284
+
+ util/ntp-keygen-opts.texi@1.275.3.6 +2 -2
+ NTP_4_2_7P284
+
+ util/ntp-keygen.1ntp-keygenman@1.100 +2 -2
+ NTP_4_2_7P284
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.100 +1 -1
+ NTP_4_2_7P284
+
+ util/ntp-keygen.man.in@1.100 +2 -2
+ NTP_4_2_7P284
+
+ util/ntp-keygen.mdoc.in@1.100 +1 -1
+ NTP_4_2_7P284
+
+ChangeSet@1.2773.3.3, 2012-06-16 11:23:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P283
+ TAG: NTP_4_2_7P283
+
+ ChangeLog@1.1146.3.1 +1 -0
+ NTP_4_2_7P283
+
+ ntpd/ntpd-opts.c@1.288 +4 -4
+ NTP_4_2_7P283
+
+ ntpd/ntpd-opts.h@1.288 +3 -3
+ NTP_4_2_7P283
+
+ ntpd/ntpd-opts.texi@1.275.3.5 +2 -2
+ NTP_4_2_7P283
+
+ ntpd/ntpd.1ntpdman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpd/ntpd.1ntpdmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpd/ntpd.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpd/ntpd.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc-opts.c@1.283 +4 -4
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc-opts.h@1.283 +3 -3
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc-opts.texi@1.272.3.5 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc.1ntpdcman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc.html@1.111 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpdc/ntpdc.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpq/ntpq-opts.c@1.285 +4 -4
+ NTP_4_2_7P283
+
+ ntpq/ntpq-opts.h@1.285 +3 -3
+ NTP_4_2_7P283
+
+ ntpq/ntpq-opts.texi@1.274.3.5 +2 -2
+ NTP_4_2_7P283
+
+ ntpq/ntpq.1ntpqman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpq/ntpq.1ntpqmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpq/ntpq.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpq/ntpq.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.285 +4 -4
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.285 +3 -3
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.5 +2 -2
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ packageinfo.sh@1.286 +1 -1
+ NTP_4_2_7P283
+
+ scripts/ntp-wait-opts.texi@1.92.3.5 +1 -1
+ NTP_4_2_7P283
+
+ scripts/ntp-wait.1ntp-waitman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ scripts/ntp-wait.html@1.103 +1 -1
+ NTP_4_2_7P283
+
+ scripts/ntp-wait.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ scripts/ntp-wait.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp-opts.c@1.281 +4 -4
+ NTP_4_2_7P283
+
+ sntp/sntp-opts.h@1.281 +3 -3
+ NTP_4_2_7P283
+
+ sntp/sntp-opts.texi@1.270.3.5 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp.1sntpman@1.101 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp.1sntpmdoc@1.101 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp.html@1.281 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp.man.in@1.101 +2 -2
+ NTP_4_2_7P283
+
+ sntp/sntp.mdoc.in@1.101 +2 -2
+ NTP_4_2_7P283
+
+ util/ntp-keygen-opts.c@1.285 +4 -4
+ NTP_4_2_7P283
+
+ util/ntp-keygen-opts.h@1.285 +3 -3
+ NTP_4_2_7P283
+
+ util/ntp-keygen-opts.texi@1.275.3.5 +2 -2
+ NTP_4_2_7P283
+
+ util/ntp-keygen.1ntp-keygenman@1.99 +2 -2
+ NTP_4_2_7P283
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.99 +2 -2
+ NTP_4_2_7P283
+
+ util/ntp-keygen.man.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ util/ntp-keygen.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P283
+
+ChangeSet@1.2773.1.38, 2012-06-16 05:58:30+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Update ChangeLog for libevent update and [Bug 2225].
+
+ ChangeLog@1.1146.1.30 +2 -0
+ [Bug 2225] libevent configure hangs.
+ Update bundled libevent to git master, post libevent 2.1.1-alpha.
+
+
+ChangeSet@1.2773.1.36, 2012-06-16 04:51:53+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to
+ nonzero flags, yet some systems using that version have the nonworking
+ flags in their header files (Debian Lenny). Do not spew warnings in
+ regress output in that case, and set epollop->timerfd = -1. Suggested
+ by Nick Mathewson.
+
+ sntp/libevent/epoll.c@1.4 +4 -1
+ Linux 2.6.26 and earlier will fail libevent's timerfd_create() call due to
+ nonzero flags, yet some systems using that version have the nonworking
+ flags in their header files (Debian Lenny). Do not spew warnings in
+ regress output in that case, and set epollop->timerfd = -1. Suggested
+ by Nick Mathewson.
+
+ChangeSet@1.2773.3.2, 2012-06-16 03:45:09+00:00, stenn@poog.il.thewrittenword.com
+ Improvements to sntp/m4/ntp_openssl.m4
+
+ ChangeLog@1.1146.1.29 +2 -0
+ Improvements to sntp/m4/ntp_openssl.m4
+
+ sntp/m4/ntp_openssl.m4@1.21 +35 -16
+ Improvements to sntp/m4/ntp_openssl.m4
+
+ChangeSet@1.2773.3.1, 2012-06-15 11:22:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P282
+ TAG: NTP_4_2_7P282
+
+ ChangeLog@1.1146.1.28 +1 -0
+ NTP_4_2_7P282
+
+ ntpd/ntpd-opts.c@1.287 +4 -4
+ NTP_4_2_7P282
+
+ ntpd/ntpd-opts.h@1.287 +3 -3
+ NTP_4_2_7P282
+
+ ntpd/ntpd-opts.texi@1.275.3.4 +2 -2
+ NTP_4_2_7P282
+
+ ntpd/ntpd.1ntpdman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpd/ntpd.1ntpdmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpd/ntpd.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpd/ntpd.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc-opts.c@1.282 +4 -4
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc-opts.h@1.282 +3 -3
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc-opts.texi@1.272.3.4 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc.1ntpdcman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc.html@1.110 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpdc/ntpdc.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpq/ntpq-opts.c@1.284 +4 -4
+ NTP_4_2_7P282
+
+ ntpq/ntpq-opts.h@1.284 +3 -3
+ NTP_4_2_7P282
+
+ ntpq/ntpq-opts.texi@1.274.3.4 +2 -2
+ NTP_4_2_7P282
+
+ ntpq/ntpq.1ntpqman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpq/ntpq.1ntpqmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpq/ntpq.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpq/ntpq.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.284 +4 -4
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.284 +3 -3
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.4 +2 -2
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ packageinfo.sh@1.285 +1 -1
+ NTP_4_2_7P282
+
+ scripts/ntp-wait-opts.texi@1.92.3.4 +1 -1
+ NTP_4_2_7P282
+
+ scripts/ntp-wait.1ntp-waitman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ scripts/ntp-wait.html@1.102 +1 -1
+ NTP_4_2_7P282
+
+ scripts/ntp-wait.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ scripts/ntp-wait.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp-opts.c@1.280 +4 -4
+ NTP_4_2_7P282
+
+ sntp/sntp-opts.h@1.280 +3 -3
+ NTP_4_2_7P282
+
+ sntp/sntp-opts.texi@1.270.3.4 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp.1sntpman@1.100 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp.1sntpmdoc@1.100 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp.html@1.280 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp.man.in@1.100 +2 -2
+ NTP_4_2_7P282
+
+ sntp/sntp.mdoc.in@1.100 +2 -2
+ NTP_4_2_7P282
+
+ util/ntp-keygen-opts.c@1.284 +4 -4
+ NTP_4_2_7P282
+
+ util/ntp-keygen-opts.h@1.284 +3 -3
+ NTP_4_2_7P282
+
+ util/ntp-keygen-opts.texi@1.275.3.4 +2 -2
+ NTP_4_2_7P282
+
+ util/ntp-keygen.1ntp-keygenman@1.98 +2 -2
+ NTP_4_2_7P282
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.98 +2 -2
+ NTP_4_2_7P282
+
+ util/ntp-keygen.man.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ util/ntp-keygen.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P282
+
+ChangeSet@1.2773.1.35, 2012-06-14 23:17:32+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ repair merge flub
+ keep local-to-NTP patch up to date with event-config.h s/_EVENT/EVENT_/
+
+ sntp/libevent/configure.in@1.11 +3 -0
+ repair merge flub
+
+ sntp/libevent/evthread_pthread.c@1.5 +1 -1
+ keep local-to-NTP patch up to date with event-config.h s/_EVENT/EVENT_/
+
+ChangeSet@1.2461.1.10, 2012-06-14 22:20:00+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/ChangeLog@1.6 +289 -1127
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/ChangeLog-1.4@1.1 +231 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/ChangeLog-1.4
+
+ sntp/libevent/ChangeLog-1.4@1.0 +0 -0
+
+ sntp/libevent/ChangeLog-2.0@1.1 +1225 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/ChangeLog-2.0
+
+ sntp/libevent/ChangeLog-2.0@1.0 +0 -0
+
+ sntp/libevent/Doxyfile@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/LICENSE@1.2 +26 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/Makefile.am@1.1.1.6 +83 -44
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/Makefile.nmake@1.3 +5 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/README@1.5 +41 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/WIN32-Code/evconfig-private.h@1.2 +2 -2
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.1.1.3 +115 -115
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/arc4random.c@1.1.1.3 +20 -19
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/buffer.c@1.7 +432 -175
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/buffer_iocp.c@1.5 +19 -19
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent-internal.h@1.5 +48 -34
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent.c@1.5 +77 -55
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_async.c@1.5 +74 -74
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_filter.c@1.5 +33 -33
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_openssl.c@1.6 +171 -60
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_pair.c@1.5 +13 -13
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_ratelim.c@1.4 +170 -107
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/bufferevent_sock.c@1.5 +49 -49
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/changelist-internal.h@1.2 +8 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/compat/sys/queue.h@1.3 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/configure.in@1.1.1.5 +110 -23
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/defer-internal.h@1.4 +9 -9
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/devpoll.c@1.3 +10 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/epoll.c@1.3 +116 -21
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/epoll_sub.c@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evbuffer-internal.h@1.5 +39 -22
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evconfig-private.h.in@1.2 +7 -2
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evdns.c@1.1.1.5 +171 -101
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/event-internal.h@1.1.1.5 +55 -30
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/event.c@1.1.1.6 +731 -460
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/event_iocp.c@1.5 +13 -13
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/event_rpcgen.py@1.2 +17 -16
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/event_tagging.c@1.4 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evmap-internal.h@1.2 +42 -15
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evmap.c@1.5 +359 -68
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evport.c@1.1.1.3 +13 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evrpc-internal.h@1.2 +11 -11
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evrpc.c@1.5 +24 -24
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evsignal-internal.h@1.2 +9 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evthread-internal.h@1.5 +112 -102
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evthread.c@1.1.1.4 +100 -85
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evthread_pthread.c@1.1.1.2 +16 -16
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evthread_win32.c@1.5 +24 -23
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evutil.c@1.1.1.5 +511 -168
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evutil_rand.c@1.5 +49 -14
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/evutil_time.c@1.1 +485 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/evutil_time.c
+
+ sntp/libevent/evutil_time.c@1.0 +0 -0
+
+ sntp/libevent/ht-internal.h@1.3 +52 -48
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/http-internal.h@1.3 +17 -12
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/http.c@1.1.1.6 +197 -150
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/Makefile.am@1.1.1.2 +6 -0
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evdns.h@1.4 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evdns.h@1.3 +0 -0
+ Rename: sntp/libevent/evdns.h -> sntp/libevent/include/evdns.h
+
+ sntp/libevent/include/event.h@1.5 +7 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event.h@1.4 +0 -0
+ Rename: sntp/libevent/event.h -> sntp/libevent/include/event.h
+
+ sntp/libevent/include/event2/buffer.h@1.4 +100 -16
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/buffer_compat.h@1.3 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/bufferevent.h@1.3 +55 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/bufferevent_compat.h@1.3 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/bufferevent_ssl.h@1.3 +25 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/bufferevent_struct.h@1.3 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/dns.h@1.5 +12 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/dns_compat.h@1.4 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/dns_struct.h@1.3 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/event.h@1.1.1.5 +142 -20
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/event_compat.h@1.4 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/event_struct.h@1.3 +32 -14
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/http.h@1.4 +70 -10
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/http_compat.h@1.3 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/http_struct.h@1.3 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/keyvalq_struct.h@1.2 +7 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/listener.h@1.2 +20 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/rpc.h@1.3 +8 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/rpc_compat.h@1.3 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/rpc_struct.h@1.3 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/tag.h@1.3 +6 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/tag_compat.h@1.3 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/thread.h@1.4 +11 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/event2/util.h@1.4 +93 -64
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evhttp.h@1.4 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evhttp.h@1.3 +0 -0
+ Rename: sntp/libevent/evhttp.h -> sntp/libevent/include/evhttp.h
+
+ sntp/libevent/include/evrpc.h@1.4 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evrpc.h@1.3 +0 -0
+ Rename: sntp/libevent/evrpc.h -> sntp/libevent/include/evrpc.h
+
+ sntp/libevent/include/evutil.h@1.4 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/include/evutil.h@1.3 +0 -0
+ Rename: sntp/libevent/evutil.h -> sntp/libevent/include/evutil.h
+
+ sntp/libevent/iocp-internal.h@1.3 +28 -28
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/ipv6-internal.h@1.1.1.2 +7 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/kqueue-internal.h@1.1 +39 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/kqueue-internal.h
+
+ sntp/libevent/kqueue-internal.h@1.0 +0 -0
+
+ sntp/libevent/kqueue.c@1.6 +98 -16
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/listener.c@1.5 +48 -45
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/log-internal.h@1.2 +29 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/log.c@1.4 +36 -17
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/m4/libevent_openssl.m4@1.2 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/make-event-config.sed@1.1 +23 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/make-event-config.sed
+
+ sntp/libevent/make-event-config.sed@1.0 +0 -0
+
+ sntp/libevent/minheap-internal.h@1.4 +30 -30
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/mm-internal.h@1.2 +31 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/poll.c@1.3 +22 -15
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/ratelim-internal.h@1.2 +7 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/Makefile.am@1.1.1.5 +21 -9
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/dns-example.c@1.1.1.4 +28 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/event-read-fifo.c@1.4 +45 -26
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/event-read-fifo.c@1.3 +0 -0
+ Rename: sntp/libevent/sample/event-test.c -> sntp/libevent/sample/event-read-fifo.c
+
+ sntp/libevent/sample/http-server.c@1.1.1.5 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/signal-test.c@1.3 +7 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/sample/time-test.c@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/select.c@1.1.1.4 +14 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/signal.c@1.6 +65 -32
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/strlcpy-internal.h@1.3 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/strlcpy.c@1.3 +2 -2
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/Makefile.am@1.1.1.5 +60 -13
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/bench.c@1.3 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/bench_cascade.c@1.3 +3 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/bench_http.c@1.4 +1 -3
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/bench_httpclient.c@1.1.1.3 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/check-dumpevents.py@1.2 +0 -0
+ Change mode to -rwxr-xr-x
+
+ sntp/libevent/test/check-dumpevents.py@1.1 +54 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/test/check-dumpevents.py
+
+ sntp/libevent/test/check-dumpevents.py@1.0 +0 -0
+
+ sntp/libevent/test/regress.c@1.3 +273 -86
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress.h@1.3 +10 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_buffer.c@1.5 +331 -16
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_bufferevent.c@1.3 +21 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_dns.c@1.1.1.3 +186 -33
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_et.c@1.3 +16 -8
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_http.c@1.1.1.4 +47 -40
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_iocp.c@1.2 +29 -29
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_listener.c@1.1.1.3 +5 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_main.c@1.4 +38 -10
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_minheap.c@1.2 +11 -11
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_rpc.c@1.4 +7 -7
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_ssl.c@1.4 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_testutils.c@1.1.1.3 +21 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_testutils.h@1.2 +4 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_thread.c@1.3 +104 -25
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_util.c@1.4 +262 -23
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/regress_zlib.c@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-changelist.c@1.3 +31 -5
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-dumpevents.c@1.1 +180 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/test/test-dumpevents.c
+
+ sntp/libevent/test/test-dumpevents.c@1.0 +0 -0
+
+ sntp/libevent/test/test-eof.c@1.1.1.3 +28 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-fdleak.c@1.1 +249 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/test/test-fdleak.c
+
+ sntp/libevent/test/test-fdleak.c@1.0 +0 -0
+
+ sntp/libevent/test/test-init.c@1.3 +26 -4
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-ratelim.c@1.1.1.4 +124 -9
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-ratelim.sh@1.3 +11 -0
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-time.c@1.3 +24 -2
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test-weof.c@1.3 +28 -6
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/test.sh@1.1.1.3 +48 -52
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/tinytest.c@1.4 +31 -20
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/tinytest.h@1.2 +9 -9
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/tinytest_demo.c@1.2 +2 -2
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/tinytest_local.h@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/test/tinytest_macros.h@1.2 +39 -39
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/time-internal.h@1.1 +101 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/time-internal.h
+
+ sntp/libevent/time-internal.h@1.0 +0 -0
+
+ sntp/libevent/util-internal.h@1.1.1.4 +181 -47
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/whatsnew-2.0.txt@1.3 +1 -1
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ sntp/libevent/whatsnew-2.1.txt@1.1 +390 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/whatsnew-2.1.txt
+
+ sntp/libevent/whatsnew-2.1.txt@1.0 +0 -0
+
+ sntp/libevent/win32select.c@1.3 +30 -20
+ update to libevent git master, after 2.1.1-alpha, as of 14-Jun-2012 git cset
+ e7bf4c84afd7961eb92a2d6583c84b56a87f2555
+
+ChangeSet@1.2773.1.33, 2012-06-14 07:53:00-04:00, stenn@deacon.udel.edu
+ tickadj may need to be linked with PTHREAD_LIBS
+
+ ChangeLog@1.1146.1.27 +1 -0
+ tickadj may need to be linked with PTHREAD_LIBS
+
+ util/Makefile.am@1.71.1.2 +1 -1
+ tickadj may need to be linked with PTHREAD_LIBS
+
+ChangeSet@1.2773.1.32, 2012-06-14 11:24:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P281
+ TAG: NTP_4_2_7P281
+
+ ChangeLog@1.1146.1.26 +1 -0
+ NTP_4_2_7P281
+
+ ntpd/ntpd-opts.c@1.286 +4 -4
+ NTP_4_2_7P281
+
+ ntpd/ntpd-opts.h@1.286 +3 -3
+ NTP_4_2_7P281
+
+ ntpd/ntpd-opts.texi@1.275.3.3 +2 -2
+ NTP_4_2_7P281
+
+ ntpd/ntpd.1ntpdman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpd/ntpd.1ntpdmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpd/ntpd.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpd/ntpd.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc-opts.c@1.281 +4 -4
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc-opts.h@1.281 +3 -3
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc-opts.texi@1.272.3.3 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc.1ntpdcman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc.html@1.109 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpdc/ntpdc.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpq/ntpq-opts.c@1.283 +4 -4
+ NTP_4_2_7P281
+
+ ntpq/ntpq-opts.h@1.283 +3 -3
+ NTP_4_2_7P281
+
+ ntpq/ntpq-opts.texi@1.274.3.3 +2 -2
+ NTP_4_2_7P281
+
+ ntpq/ntpq.1ntpqman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpq/ntpq.1ntpqmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpq/ntpq.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpq/ntpq.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.283 +4 -4
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.283 +3 -3
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.3 +2 -2
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ packageinfo.sh@1.284 +1 -1
+ NTP_4_2_7P281
+
+ scripts/ntp-wait-opts.texi@1.92.3.3 +14 -2
+ NTP_4_2_7P281
+
+ scripts/ntp-wait.1ntp-waitman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ scripts/ntp-wait.html@1.101 +14 -2
+ NTP_4_2_7P281
+
+ scripts/ntp-wait.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ scripts/ntp-wait.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp-opts.c@1.279 +4 -4
+ NTP_4_2_7P281
+
+ sntp/sntp-opts.h@1.279 +3 -3
+ NTP_4_2_7P281
+
+ sntp/sntp-opts.texi@1.270.3.3 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp.1sntpman@1.99 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp.1sntpmdoc@1.99 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp.html@1.279 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp.man.in@1.99 +2 -2
+ NTP_4_2_7P281
+
+ sntp/sntp.mdoc.in@1.99 +2 -2
+ NTP_4_2_7P281
+
+ util/ntp-keygen-opts.c@1.283 +4 -4
+ NTP_4_2_7P281
+
+ util/ntp-keygen-opts.h@1.283 +3 -3
+ NTP_4_2_7P281
+
+ util/ntp-keygen-opts.texi@1.275.3.3 +2 -2
+ NTP_4_2_7P281
+
+ util/ntp-keygen.1ntp-keygenman@1.97 +2 -2
+ NTP_4_2_7P281
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.97 +2 -2
+ NTP_4_2_7P281
+
+ util/ntp-keygen.man.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ util/ntp-keygen.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P281
+
+ChangeSet@1.2773.1.31, 2012-06-14 06:38:51-04:00, stenn@deacon.udel.edu
+ U_INT32_MAX cleanup in include/ntp_types.h
+
+ ChangeLog@1.1146.1.25 +1 -0
+ U_INT32_MAX cleanup in include/ntp_types.h
+
+ include/ntp_types.h@1.32 +4 -4
+ U_INT32_MAX cleanup in include/ntp_types.h
+
+ChangeSet@1.2773.1.30, 2012-06-14 05:41:58-04:00, stenn@deacon.udel.edu
+ When linking, ntp_keygen and tickadj need $(LIBM)
+
+ ChangeLog@1.1146.1.24 +1 -0
+ When linking, ntp_keygen and tickadj need $(LIBM)
+
+ util/Makefile.am@1.71.1.1 +2 -2
+ When linking, ntp_keygen and tickadj need $(LIBM)
+
+ChangeSet@1.2773.1.29, 2012-06-13 05:35:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P280
+ TAG: NTP_4_2_7P280
+
+ ChangeLog@1.1146.1.23 +1 -0
+ NTP_4_2_7P280
+
+ ntpd/ntpd-opts.c@1.285 +4 -4
+ NTP_4_2_7P280
+
+ ntpd/ntpd-opts.h@1.285 +3 -3
+ NTP_4_2_7P280
+
+ ntpd/ntpd-opts.texi@1.275.3.2 +2 -2
+ NTP_4_2_7P280
+
+ ntpd/ntpd.1ntpdman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpd/ntpd.1ntpdmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpd/ntpd.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpd/ntpd.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc-opts.c@1.280 +4 -4
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc-opts.h@1.280 +3 -3
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc-opts.texi@1.272.3.2 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc.1ntpdcman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc.html@1.108 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpdc/ntpdc.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpq/ntpq-opts.c@1.282 +4 -4
+ NTP_4_2_7P280
+
+ ntpq/ntpq-opts.h@1.282 +3 -3
+ NTP_4_2_7P280
+
+ ntpq/ntpq-opts.texi@1.274.3.2 +2 -2
+ NTP_4_2_7P280
+
+ ntpq/ntpq.1ntpqman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpq/ntpq.1ntpqmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpq/ntpq.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpq/ntpq.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.282 +4 -4
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.282 +3 -3
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.2 +2 -2
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ packageinfo.sh@1.283 +1 -1
+ NTP_4_2_7P280
+
+ scripts/ntp-wait-opts.texi@1.92.3.2 +2 -14
+ NTP_4_2_7P280
+
+ scripts/ntp-wait.1ntp-waitman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ scripts/ntp-wait.html@1.100 +2 -14
+ NTP_4_2_7P280
+
+ scripts/ntp-wait.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ scripts/ntp-wait.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp-opts.c@1.278 +4 -4
+ NTP_4_2_7P280
+
+ sntp/sntp-opts.h@1.278 +3 -3
+ NTP_4_2_7P280
+
+ sntp/sntp-opts.texi@1.270.3.2 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp.1sntpman@1.98 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp.1sntpmdoc@1.98 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp.html@1.278 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp.man.in@1.98 +2 -2
+ NTP_4_2_7P280
+
+ sntp/sntp.mdoc.in@1.98 +2 -2
+ NTP_4_2_7P280
+
+ util/ntp-keygen-opts.c@1.282 +4 -4
+ NTP_4_2_7P280
+
+ util/ntp-keygen-opts.h@1.282 +3 -3
+ NTP_4_2_7P280
+
+ util/ntp-keygen-opts.texi@1.275.3.2 +2 -2
+ NTP_4_2_7P280
+
+ util/ntp-keygen.1ntp-keygenman@1.96 +2 -2
+ NTP_4_2_7P280
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.96 +2 -2
+ NTP_4_2_7P280
+
+ util/ntp-keygen.man.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ util/ntp-keygen.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P280
+
+ChangeSet@1.2773.1.28, 2012-06-11 17:22:29+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2224] Use-after-free in routing socket code after dropping root.
+
+ ChangeLog@1.1146.1.22 +2 -1
+ [Bug 2224] Use-after-free in routing socket code after dropping root.
+
+ ntpd/ntp_io.c@1.368 +6 -3
+ [Bug 2224] Use-after-free in routing socket code after dropping root.
+
+ChangeSet@1.2773.1.27, 2012-06-10 06:52:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P279
+ TAG: NTP_4_2_7P279
+
+ ChangeLog@1.1146.1.21 +1 -0
+ NTP_4_2_7P279
+
+ ntpd/ntpd-opts.c@1.284 +4 -4
+ NTP_4_2_7P279
+
+ ntpd/ntpd-opts.h@1.284 +3 -3
+ NTP_4_2_7P279
+
+ ntpd/ntpd-opts.texi@1.275.3.1 +2 -2
+ NTP_4_2_7P279
+
+ ntpd/ntpd.1ntpdman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpd/ntpd.1ntpdmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpd/ntpd.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpd/ntpd.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc-opts.c@1.279 +4 -4
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc-opts.h@1.279 +3 -3
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc-opts.texi@1.272.3.1 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc.1ntpdcman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc.html@1.107 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpdc/ntpdc.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpq/ntpq-opts.c@1.281 +4 -4
+ NTP_4_2_7P279
+
+ ntpq/ntpq-opts.h@1.281 +3 -3
+ NTP_4_2_7P279
+
+ ntpq/ntpq-opts.texi@1.274.3.1 +2 -2
+ NTP_4_2_7P279
+
+ ntpq/ntpq.1ntpqman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpq/ntpq.1ntpqmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpq/ntpq.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpq/ntpq.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.281 +4 -4
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.281 +3 -3
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.3.1 +2 -2
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ packageinfo.sh@1.282 +1 -1
+ NTP_4_2_7P279
+
+ scripts/ntp-wait-opts.texi@1.92.3.1 +1 -1
+ NTP_4_2_7P279
+
+ scripts/ntp-wait.1ntp-waitman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ scripts/ntp-wait.html@1.99 +1 -1
+ NTP_4_2_7P279
+
+ scripts/ntp-wait.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ scripts/ntp-wait.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp-opts.c@1.277 +4 -4
+ NTP_4_2_7P279
+
+ sntp/sntp-opts.h@1.277 +3 -3
+ NTP_4_2_7P279
+
+ sntp/sntp-opts.texi@1.270.3.1 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp.1sntpman@1.97 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp.1sntpmdoc@1.97 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp.html@1.277 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp.man.in@1.97 +2 -2
+ NTP_4_2_7P279
+
+ sntp/sntp.mdoc.in@1.97 +2 -2
+ NTP_4_2_7P279
+
+ util/ntp-keygen-opts.c@1.281 +4 -4
+ NTP_4_2_7P279
+
+ util/ntp-keygen-opts.h@1.281 +3 -3
+ NTP_4_2_7P279
+
+ util/ntp-keygen-opts.texi@1.275.3.1 +2 -2
+ NTP_4_2_7P279
+
+ util/ntp-keygen.1ntp-keygenman@1.95 +2 -2
+ NTP_4_2_7P279
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.95 +2 -2
+ NTP_4_2_7P279
+
+ util/ntp-keygen.man.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ util/ntp-keygen.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P279
+
+ChangeSet@1.2773.1.26, 2012-06-09 14:16:49+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2211] findbcastinter(): possibly undefined variable iface used.
+ [Bug 2220] Incorrect check for maximum association id in ntpq.
+
+ ChangeLog@1.1146.1.20 +3 -0
+ [Bug 2211] findbcastinter(): possibly undefined variable iface used.
+ [Bug 2220] Incorrect check for maximum association id in ntpq.
+
+ ntpd/ntp_io.c@1.367 +6 -4
+ [Bug 2211] findbcastinter(): possibly undefined variable iface used.
+
+ ntpq/ntpq.c@1.146 +9 -7
+ [Bug 2220] Incorrect check for maximum association id in ntpq.
+
+ChangeSet@1.2773.1.25, 2012-06-03 08:13:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P278
+ TAG: NTP_4_2_7P278
+
+ ChangeLog@1.1146.1.19 +1 -0
+ NTP_4_2_7P278
+
+ ntpd/ntpd-opts.c@1.283 +4 -4
+ NTP_4_2_7P278
+
+ ntpd/ntpd-opts.h@1.283 +3 -3
+ NTP_4_2_7P278
+
+ ntpd/ntpd-opts.texi@1.275.2.3 +2 -2
+ NTP_4_2_7P278
+
+ ntpd/ntpd.1ntpdman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpd/ntpd.1ntpdmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpd/ntpd.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpd/ntpd.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc-opts.c@1.278 +4 -4
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc-opts.h@1.278 +3 -3
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc-opts.texi@1.272.2.3 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc.1ntpdcman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc.html@1.106 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpdc/ntpdc.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpq/ntpq-opts.c@1.280 +4 -4
+ NTP_4_2_7P278
+
+ ntpq/ntpq-opts.h@1.280 +3 -3
+ NTP_4_2_7P278
+
+ ntpq/ntpq-opts.texi@1.274.2.3 +2 -2
+ NTP_4_2_7P278
+
+ ntpq/ntpq.1ntpqman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpq/ntpq.1ntpqmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpq/ntpq.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpq/ntpq.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.280 +4 -4
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.280 +3 -3
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.2.3 +2 -2
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ packageinfo.sh@1.281 +1 -1
+ NTP_4_2_7P278
+
+ scripts/ntp-wait-opts.texi@1.92.2.3 +1 -1
+ NTP_4_2_7P278
+
+ scripts/ntp-wait.1ntp-waitman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ scripts/ntp-wait.html@1.98 +1 -1
+ NTP_4_2_7P278
+
+ scripts/ntp-wait.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ scripts/ntp-wait.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp-opts.c@1.276 +4 -4
+ NTP_4_2_7P278
+
+ sntp/sntp-opts.h@1.276 +3 -3
+ NTP_4_2_7P278
+
+ sntp/sntp-opts.texi@1.270.2.3 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp.1sntpman@1.96 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp.1sntpmdoc@1.96 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp.html@1.276 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp.man.in@1.96 +2 -2
+ NTP_4_2_7P278
+
+ sntp/sntp.mdoc.in@1.96 +2 -2
+ NTP_4_2_7P278
+
+ util/ntp-keygen-opts.c@1.280 +4 -4
+ NTP_4_2_7P278
+
+ util/ntp-keygen-opts.h@1.280 +3 -3
+ NTP_4_2_7P278
+
+ util/ntp-keygen-opts.texi@1.275.2.3 +2 -2
+ NTP_4_2_7P278
+
+ util/ntp-keygen.1ntp-keygenman@1.94 +2 -2
+ NTP_4_2_7P278
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.94 +2 -2
+ NTP_4_2_7P278
+
+ util/ntp-keygen.man.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ util/ntp-keygen.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P278
+
+ChangeSet@1.2773.1.24, 2012-06-03 07:18:47+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Update --enable-getifaddrs handling in ntp_ipv6.m4 to match bind 9.9.1 for
+ [Bug 2204] Build with --enable-getifaddrs=glibc fails
+
+ include/isc/mem.h@1.5 +3 -3
+ Clean up merge of libisc from bind-9.9.1
+ some isc_mem_* are now implemented in isc__mem_*
+
+ include/ntp_stdlib.h@1.74 +0 -19
+ Clean up merge of libisc from bind-9.9.1
+ __attribute__ conditionaliztion moved to config.h
+
+ lib/isc/assertions.c@1.7 +1 -2
+ Clean up merge of libisc from bind-9.9.1
+ Follow libisc __attribute__((__noreturn__)) convention now there is one.
+
+ lib/isc/include/isc/assertions.h@1.7 +1 -21
+ Clean up merge of libisc from bind-9.9.1
+ __attribute__ conditionaliztion moved to config.h
+
+ lib/isc/task.c@1.7 +0 -2
+ Automerge was successful where I might wish it had not been.
+
+ lib/isc/unix/interfaceiter.c@1.25 +1 -30
+ Remove NTP local addition to Linux fallback IPv6 address enumeration code
+ which broke --enable-getifaddrs on Linux, which is now default there with
+ coincident ntp_ipv6.m4 change.
+
+ libntp/Makefile.am@1.71 +2 -0
+ Clean up merge of libisc from bind-9.9.1
+ task.c depends on global provided by backtrace.c
+
+ libntp/msyslog.c@1.49 +1 -17
+ Remove broken strerror_r workaround code with the real problem fixed,
+ which is ensuring _GNU_SOURCE is defined before the first system
+ header is included.
+
+ ports/winnt/include/config.h@1.103 +2 -1
+ Clean up merge of libisc from bind-9.9.1
+ __attribute__ conditionaliztion moved to config.h
+
+ ports/winnt/vs2005/libntp.vcproj@1.23 +8 -0
+ Clean up merge of libisc from bind-9.9.1
+ task.c depends on global provided by backtrace.c
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.46 +10 -2
+ Clean up merge of libisc from bind-9.9.1
+ task.c depends on global provided by backtrace.c
+
+ sntp/m4/ntp_compiler.m4@1.4 +29 -0
+ Clean up merge of libisc from bind-9.9.1
+ __attribute__ conditionaliztion moved to config.h
+
+ sntp/m4/ntp_ipv6.m4@1.6 +6 -39
+ Update --enable-getifaddrs handling to match bind 9.9.1 configure.in
+
+ sntp/m4/ntp_libntp.m4@1.17 +10 -4
+ ensure _GNU_SOURCE is defined before any system headers are included.
+
+ChangeSet@1.2773.1.22, 2012-06-02 12:51:48+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Correct incompatible pointer type assignment warning refclock_tsyncpci.c:341
+
+ ntpd/refclock_tsyncpci.c@1.6 +1 -1
+ Correct incompatible pointer type assignment warning refclock_tsyncpci.c:341
+
+ChangeSet@1.2773.1.21, 2012-06-02 12:44:37+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2191] dcfd -Y y2kcheck on CentOS 6.2 x86_64 breaks make check.
+
+ ChangeLog@1.1146.1.18 +1 -0
+ [Bug 2191] dcfd -Y y2kcheck on CentOS 6.2 x86_64 breaks make check.
+
+ parseutil/dcfd.c@1.25 +0 -37
+ [Bug 2191] dcfd -Y y2kcheck on CentOS 6.2 x86_64 breaks make check.
+ Patch supplied by Frank Kardel.
+
+ChangeSet@1.2773.1.20, 2012-06-02 00:02:32+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ChangeLog@1.1146.1.17 +1 -0
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/ntp_io.c@1.366 +1 -1
+ DPRINTF lacked \n
+
+ ntpd/refclock_as2201.c@1.16 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_fg.c@1.15 +0 -3
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_heath.c@1.18 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_hopfser.c@1.17 +0 -1
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_jjy.c@1.25 +0 -1
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_neoclock4x.c@1.22 +0 -1
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_pst.c@1.13 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_tpro.c@1.14 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_tsyncpci.c@1.5 +0 -8
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_tt560.c@1.4 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ ntpd/refclock_ulink.c@1.18 +0 -4
+ [Bug 2178] refclock_tsyncpci.c reach register fails to shift.
+
+ChangeSet@1.2004.2.2, 2012-06-01 18:17:30+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ unmodified bind-9.9.1
+
+ lib/isc/Atffile@1.1 +5 -0
+ bind-9.9.1
+
+ lib/isc/Atffile@1.0 +0 -0
+
+ lib/isc/alpha/include/isc/atomic.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/api@1.2 +6 -1
+ bind-9.9.1
+
+ lib/isc/app_api.c@1.1 +136 -0
+ bind-9.9.1
+
+ lib/isc/app_api.c@1.0 +0 -0
+
+ lib/isc/assertions.c@1.4.1.1 +53 -11
+ bind-9.9.1
+
+ lib/isc/backtrace-emptytbl.c@1.1 +34 -0
+ bind-9.9.1
+
+ lib/isc/backtrace-emptytbl.c@1.0 +0 -0
+
+ lib/isc/backtrace.c@1.1 +285 -0
+ bind-9.9.1
+
+ lib/isc/backtrace.c@1.0 +0 -0
+
+ lib/isc/base32.c@1.2 +3 -1
+ bind-9.9.1
+
+ lib/isc/base64.c@1.2 +5 -3
+ bind-9.9.1
+
+ lib/isc/entropy.c@1.2 +7 -4
+ bind-9.9.1
+
+ lib/isc/hash.c@1.2 +17 -3
+ bind-9.9.1
+
+ lib/isc/heap.c@1.2 +11 -8
+ bind-9.9.1
+
+ lib/isc/hmacmd5.c@1.2 +33 -2
+ bind-9.9.1
+
+ lib/isc/hmacsha.c@1.2 +220 -64
+ bind-9.9.1
+
+ lib/isc/httpd.c@1.2 +58 -17
+ bind-9.9.1
+
+ lib/isc/ia64/include/isc/atomic.h@1.2 +4 -4
+ bind-9.9.1
+
+ lib/isc/include/isc/app.h@1.5 +168 -5
+ bind-9.9.1
+
+ lib/isc/include/isc/assertions.h@1.4.1.1 +5 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/backtrace.h@1.1 +131 -0
+ bind-9.9.1
+
+ lib/isc/include/isc/backtrace.h@1.0 +0 -0
+
+ lib/isc/include/isc/bind9.h@1.1 +30 -0
+ bind-9.9.1
+
+ lib/isc/include/isc/bind9.h@1.0 +0 -0
+
+ lib/isc/include/isc/buffer.h@1.5 +2 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/entropy.h@1.2 +7 -7
+ bind-9.9.1
+
+ lib/isc/include/isc/error.h@1.5 +5 -4
+ bind-9.9.1
+
+ lib/isc/include/isc/file.h@1.4.1.1 +50 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/fsaccess.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/hash.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/heap.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/hmacmd5.h@1.2 +11 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/hmacsha.h@1.2 +15 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/lib.h@1.5 +11 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/list.h@1.5 +15 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/log.h@1.4 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/md5.h@1.3 +12 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/mem.h@1.6 +148 -27
+ bind-9.9.1
+
+ lib/isc/include/isc/msgs.h@1.5.1.1 +3 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/namespace.h@1.1 +171 -0
+ bind-9.9.1
+
+ lib/isc/include/isc/namespace.h@1.0 +0 -0
+
+ lib/isc/include/isc/netaddr.h@1.7 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/netscope.h@1.4 +3 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/platform.h.in@1.2 +30 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/portset.h@1.2 +2 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/queue.h@1.1 +100 -0
+ bind-9.9.1
+
+ lib/isc/include/isc/queue.h@1.0 +0 -0
+
+ lib/isc/include/isc/radix.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/random.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/ratelimiter.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/refcount.h@1.2 +6 -6
+ bind-9.9.1
+
+ lib/isc/include/isc/result.h@1.6 +5 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/resultclass.h@1.2 +3 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/serial.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/sha1.h@1.2 +11 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/sha2.h@1.2 +18 -5
+ bind-9.9.1
+
+ lib/isc/include/isc/sockaddr.h@1.6 +1 -1
+ bind-9.9.1
+
+ lib/isc/include/isc/socket.h@1.2 +163 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/stats.h@1.2 +2 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/symtab.h@1.2 +10 -2
+ bind-9.9.1
+
+ lib/isc/include/isc/task.h@1.2 +176 -4
+ bind-9.9.1
+
+ lib/isc/include/isc/taskpool.h@1.2 +58 -6
+ bind-9.9.1
+
+ lib/isc/include/isc/timer.h@1.2 +90 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/types.h@1.5 +8 -3
+ bind-9.9.1
+
+ lib/isc/include/isc/util.h@1.4.1.1 +7 -2
+ bind-9.9.1
+
+ lib/isc/inet_aton.c@1.5 +2 -2
+ bind-9.9.1
+
+ lib/isc/inet_ntop.c@1.7.1.1 +6 -5
+ bind-9.9.1
+
+ lib/isc/iterated_hash.c@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/lib.c@1.5 +29 -5
+ bind-9.9.1
+
+ lib/isc/log.c@1.3.1.1 +5 -4
+ bind-9.9.1
+
+ lib/isc/md5.c@1.3 +28 -2
+ bind-9.9.1
+
+ lib/isc/mem.c@1.6 +444 -172
+ bind-9.9.1
+
+ lib/isc/mem_api.c@1.1 +303 -0
+ bind-9.9.1
+
+ lib/isc/mem_api.c@1.0 +0 -0
+
+ lib/isc/mutexblock.c@1.2 +4 -5
+ bind-9.9.1
+
+ lib/isc/netaddr.c@1.6.1.1 +20 -22
+ bind-9.9.1
+
+ lib/isc/powerpc/include/isc/atomic.h@1.2 +54 -17
+ bind-9.9.1
+
+ lib/isc/print.c@1.2 +3 -3
+ bind-9.9.1
+
+ lib/isc/pthreads/mutex.c@1.1.1.1 +13 -10
+ bind-9.9.1
+
+ lib/isc/radix.c@1.2 +3 -3
+ bind-9.9.1
+
+ lib/isc/random.c@1.2 +19 -10
+ bind-9.9.1
+
+ lib/isc/result.c@1.1.1.1 +3 -2
+ bind-9.9.1
+
+ lib/isc/rwlock.c@1.2 +3 -2
+ bind-9.9.1
+
+ lib/isc/sha1.c@1.2 +41 -2
+ bind-9.9.1
+
+ lib/isc/sha2.c@1.2 +335 -120
+ bind-9.9.1
+
+ lib/isc/sockaddr.c@1.8.1.1 +7 -4
+ bind-9.9.1
+
+ lib/isc/socket_api.c@1.1 +231 -0
+ bind-9.9.1
+
+ lib/isc/socket_api.c@1.0 +0 -0
+
+ lib/isc/stats.c@1.2 +2 -2
+ bind-9.9.1
+
+ lib/isc/string.c@1.2 +6 -5
+ bind-9.9.1
+
+ lib/isc/symtab.c@1.2 +51 -2
+ bind-9.9.1
+
+ lib/isc/task.c@1.1.1.1 +607 -178
+ bind-9.9.1
+
+ lib/isc/task_api.c@1.1 +244 -0
+ bind-9.9.1
+
+ lib/isc/task_api.c@1.0 +0 -0
+
+ lib/isc/task_p.h@1.2 +12 -4
+ bind-9.9.1
+
+ lib/isc/taskpool.c@1.2 +103 -14
+ bind-9.9.1
+
+ lib/isc/tests/Atffile@1.1 +5 -0
+ bind-9.9.1
+
+ lib/isc/tests/Atffile@1.0 +0 -0
+
+ lib/isc/tests/hash_test.c@1.1 +1805 -0
+ bind-9.9.1
+
+ lib/isc/tests/hash_test.c@1.0 +0 -0
+
+ lib/isc/tests/isctest.c@1.1 +178 -0
+ bind-9.9.1
+
+ lib/isc/tests/isctest.c@1.0 +0 -0
+
+ lib/isc/tests/isctest.h@1.1 +57 -0
+ bind-9.9.1
+
+ lib/isc/tests/isctest.h@1.0 +0 -0
+
+ lib/isc/tests/queue_test.c@1.1 +144 -0
+ bind-9.9.1
+
+ lib/isc/tests/queue_test.c@1.0 +0 -0
+
+ lib/isc/tests/socket_test.c@1.1 +255 -0
+ bind-9.9.1
+
+ lib/isc/tests/socket_test.c@1.0 +0 -0
+
+ lib/isc/tests/symtab_test.c@1.1 +147 -0
+ bind-9.9.1
+
+ lib/isc/tests/symtab_test.c@1.0 +0 -0
+
+ lib/isc/tests/task_test.c@1.1 +416 -0
+ bind-9.9.1
+
+ lib/isc/tests/task_test.c@1.0 +0 -0
+
+ lib/isc/tests/taskpool_test.c@1.1 +211 -0
+ bind-9.9.1
+
+ lib/isc/tests/taskpool_test.c@1.0 +0 -0
+
+ lib/isc/timer.c@1.2 +246 -107
+ bind-9.9.1
+
+ lib/isc/timer_api.c@1.1 +144 -0
+ bind-9.9.1
+
+ lib/isc/timer_api.c@1.0 +0 -0
+
+ lib/isc/timer_p.h@1.2 +4 -4
+ bind-9.9.1
+
+ lib/isc/unix/app.c@1.2 +399 -137
+ bind-9.9.1
+
+ lib/isc/unix/dir.c@1.1.1.1 +3 -3
+ bind-9.9.1
+
+ lib/isc/unix/entropy.c@1.2 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/errno2result.c@1.2 +5 -6
+ bind-9.9.1
+
+ lib/isc/unix/errno2result.h@1.2 +5 -3
+ bind-9.9.1
+
+ lib/isc/unix/file.c@1.1.1.1 +102 -5
+ bind-9.9.1
+
+ lib/isc/unix/ifiter_getifaddrs.c@1.7.1.1 +3 -3
+ bind-9.9.1
+
+ lib/isc/unix/ifiter_ioctl.c@1.27.1.1 +1 -1
+ bind-9.9.1
+
+ lib/isc/unix/include/isc/net.h@1.10.1.1 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/include/isc/offset.h@1.5 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/include/isc/stdtime.h@1.2 +6 -2
+ bind-9.9.1
+
+ lib/isc/unix/include/isc/strerror.h@1.5 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/include/isc/time.h@1.4 +1 -1
+ bind-9.9.1
+
+ lib/isc/unix/interfaceiter.c@1.17.1.1 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/net.c@1.12.1.1 +2 -2
+ bind-9.9.1
+
+ lib/isc/unix/resource.c@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/unix/socket.c@1.2 +851 -390
+ bind-9.9.1
+
+ lib/isc/unix/socket_p.h@1.2 +5 -4
+ bind-9.9.1
+
+ lib/isc/unix/stdio.c@1.2 +15 -3
+ bind-9.9.1
+
+ lib/isc/unix/strerror.c@1.5.1.1 +1 -1
+ bind-9.9.1
+
+ lib/isc/unix/time.c@1.2 +6 -24
+ bind-9.9.1
+
+ lib/isc/win32/app.c@1.2 +11 -11
+ bind-9.9.1
+
+ lib/isc/win32/dir.c@1.2 +3 -3
+ bind-9.9.1
+
+ lib/isc/win32/entropy.c@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/win32/file.c@1.2 +126 -14
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/ipv6.h@1.8.1.1 +6 -6
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/mutex.h@1.5 +1 -1
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/net.h@1.8.1.1 +2 -2
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/ntpaths.h@1.2 +5 -4
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/platform.h@1.5.1.1 +7 -1
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/stat.h@1.3.1.1 +16 -3
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/stdtime.h@1.2 +6 -2
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/thread.h@1.1.1.1 +7 -7
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/time.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/win32/include/isc/win32os.h@1.5 +3 -3
+ bind-9.9.1
+
+ lib/isc/win32/interfaceiter.c@1.10.2.1 +1 -1
+ bind-9.9.1
+
+ lib/isc/win32/libgen.h@1.1 +25 -0
+ bind-9.9.1
+
+ lib/isc/win32/libgen.h@1.0 +0 -0
+
+ lib/isc/win32/libisc.def@1.2 +149 -117
+ bind-9.9.1
+
+ lib/isc/win32/libisc.dsp@1.2 +22 -4
+ bind-9.9.1
+
+ lib/isc/win32/libisc.mak@1.2 +53 -4
+ bind-9.9.1
+
+ lib/isc/win32/net.c@1.11.1.1 +7 -5
+ bind-9.9.1
+
+ lib/isc/win32/netdb.h@1.2 +1 -1
+ bind-9.9.1
+
+ lib/isc/win32/ntgroups.c@1.2 +23 -23
+ bind-9.9.1
+
+ lib/isc/win32/ntpaths.c@1.2 +11 -4
+ bind-9.9.1
+
+ lib/isc/win32/socket.c@1.2 +388 -95
+ bind-9.9.1
+
+ lib/isc/win32/time.c@1.2 +44 -19
+ bind-9.9.1
+
+ lib/isc/win32/unistd.h@1.2 +9 -2
+ bind-9.9.1
+
+ChangeSet@1.2773.1.19, 2012-05-25 05:07:31+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P277
+ TAG: NTP_4_2_7P277
+
+ ChangeLog@1.1146.1.16 +1 -0
+ NTP_4_2_7P277
+
+ ntpd/ntpd-opts.c@1.282 +4 -4
+ NTP_4_2_7P277
+
+ ntpd/ntpd-opts.h@1.282 +3 -3
+ NTP_4_2_7P277
+
+ ntpd/ntpd-opts.texi@1.275.2.2 +2 -2
+ NTP_4_2_7P277
+
+ ntpd/ntpd.1ntpdman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpd/ntpd.1ntpdmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpd/ntpd.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpd/ntpd.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc-opts.c@1.277 +4 -4
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc-opts.h@1.277 +3 -3
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc-opts.texi@1.272.2.2 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc.1ntpdcman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc.html@1.105 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpdc/ntpdc.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpq/ntpq-opts.c@1.279 +4 -4
+ NTP_4_2_7P277
+
+ ntpq/ntpq-opts.h@1.279 +3 -3
+ NTP_4_2_7P277
+
+ ntpq/ntpq-opts.texi@1.274.2.2 +2 -2
+ NTP_4_2_7P277
+
+ ntpq/ntpq.1ntpqman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpq/ntpq.1ntpqmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpq/ntpq.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpq/ntpq.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.279 +4 -4
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.279 +3 -3
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.2.2 +2 -2
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ packageinfo.sh@1.280 +1 -1
+ NTP_4_2_7P277
+
+ scripts/ntp-wait-opts.texi@1.92.2.2 +1 -1
+ NTP_4_2_7P277
+
+ scripts/ntp-wait.1ntp-waitman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ scripts/ntp-wait.html@1.97 +1 -1
+ NTP_4_2_7P277
+
+ scripts/ntp-wait.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ scripts/ntp-wait.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp-opts.c@1.275 +4 -4
+ NTP_4_2_7P277
+
+ sntp/sntp-opts.h@1.275 +3 -3
+ NTP_4_2_7P277
+
+ sntp/sntp-opts.texi@1.270.2.2 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp.1sntpman@1.95 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp.1sntpmdoc@1.95 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp.html@1.275 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp.man.in@1.95 +2 -2
+ NTP_4_2_7P277
+
+ sntp/sntp.mdoc.in@1.95 +2 -2
+ NTP_4_2_7P277
+
+ util/ntp-keygen-opts.c@1.279 +4 -4
+ NTP_4_2_7P277
+
+ util/ntp-keygen-opts.h@1.279 +3 -3
+ NTP_4_2_7P277
+
+ util/ntp-keygen-opts.texi@1.275.2.2 +2 -2
+ NTP_4_2_7P277
+
+ util/ntp-keygen.1ntp-keygenman@1.93 +2 -2
+ NTP_4_2_7P277
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.93 +2 -2
+ NTP_4_2_7P277
+
+ util/ntp-keygen.man.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ util/ntp-keygen.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P277
+
+ChangeSet@1.2773.1.18, 2012-05-25 00:36:37+02:00, karlsson@luft.lund.zozs.se
+ [Bug 2193] Building timestruct tests with Clang 3.1 fails.
+
+ ChangeLog@1.1146.1.15 +1 -0
+ [Bug 2193] Building timestruct tests with Clang 3.1 fails.
+
+ tests/libntp/timestructs.cpp@1.4 +2 -2
+ [Bug 2193] Building timestruct tests with Clang 3.1 fails.
+
+ tests/libntp/timestructs.h@1.4 +2 -2
+ [Bug 2193] Building timestruct tests with Clang 3.1 fails.
+
+ChangeSet@1.2773.1.17, 2012-05-15 06:32:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P276
+ TAG: NTP_4_2_7P276
+
+ ChangeLog@1.1146.1.14 +1 -0
+ NTP_4_2_7P276
+
+ ntpd/ntpd-opts.c@1.281 +4 -4
+ NTP_4_2_7P276
+
+ ntpd/ntpd-opts.h@1.281 +3 -3
+ NTP_4_2_7P276
+
+ ntpd/ntpd-opts.texi@1.275.2.1 +2 -2
+ NTP_4_2_7P276
+
+ ntpd/ntpd.1ntpdman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpd/ntpd.1ntpdmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpd/ntpd.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpd/ntpd.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc-opts.c@1.276 +4 -4
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc-opts.h@1.276 +3 -3
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc-opts.texi@1.272.2.1 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc.1ntpdcman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc.html@1.104 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpdc/ntpdc.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpq/ntpq-opts.c@1.278 +4 -4
+ NTP_4_2_7P276
+
+ ntpq/ntpq-opts.h@1.278 +3 -3
+ NTP_4_2_7P276
+
+ ntpq/ntpq-opts.texi@1.274.2.1 +2 -2
+ NTP_4_2_7P276
+
+ ntpq/ntpq.1ntpqman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpq/ntpq.1ntpqmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpq/ntpq.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpq/ntpq.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.278 +4 -4
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.278 +3 -3
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.2.1 +2 -2
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ packageinfo.sh@1.279 +1 -1
+ NTP_4_2_7P276
+
+ scripts/ntp-wait-opts.texi@1.92.2.1 +1 -1
+ NTP_4_2_7P276
+
+ scripts/ntp-wait.1ntp-waitman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ scripts/ntp-wait.html@1.96 +1 -1
+ NTP_4_2_7P276
+
+ scripts/ntp-wait.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ scripts/ntp-wait.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp-opts.c@1.274 +4 -4
+ NTP_4_2_7P276
+
+ sntp/sntp-opts.h@1.274 +3 -3
+ NTP_4_2_7P276
+
+ sntp/sntp-opts.texi@1.270.2.1 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp.1sntpman@1.94 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp.1sntpmdoc@1.94 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp.html@1.274 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp.man.in@1.94 +2 -2
+ NTP_4_2_7P276
+
+ sntp/sntp.mdoc.in@1.94 +2 -2
+ NTP_4_2_7P276
+
+ util/ntp-keygen-opts.c@1.278 +4 -4
+ NTP_4_2_7P276
+
+ util/ntp-keygen-opts.h@1.278 +3 -3
+ NTP_4_2_7P276
+
+ util/ntp-keygen-opts.texi@1.275.2.1 +2 -2
+ NTP_4_2_7P276
+
+ util/ntp-keygen.1ntp-keygenman@1.92 +2 -2
+ NTP_4_2_7P276
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.92 +2 -2
+ NTP_4_2_7P276
+
+ util/ntp-keygen.man.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ util/ntp-keygen.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P276
+
+ChangeSet@1.2773.1.16, 2012-05-15 02:16:33-04:00, stenn@deacon.udel.edu
+ [Bug 2179] Remove sntp/header.h
+
+ BitKeeper/deleted/28/header.h~bd6b45785988925a@1.8 +0 -0
+ Delete: sntp/header.h
+
+ ChangeLog@1.1146.1.13 +1 -0
+ [Bug 2179] Remove sntp/header.h
+
+ sntp/Makefile.am@1.71.1.1 +0 -1
+ [Bug 2179] Remove sntp/header.h
+
+ChangeSet@1.2778, 2012-05-08 05:47:09+00:00, stenn@psp-fb1.ntp.org
+ autogen upgrade
+
+ ntpd/invoke-ntpd.texi@1.278 +2 -2
+ autogen upgrade
+
+ ntpd/ntpdsim-opts.c@1.19 +643 -472
+ autogen upgrade
+
+ ntpd/ntpdsim-opts.h@1.19 +57 -31
+ autogen upgrade
+
+ ntpdc/invoke-ntpdc.texi@1.275 +2 -2
+ autogen upgrade
+
+ ntpq/invoke-ntpq.texi@1.277 +2 -2
+ autogen upgrade
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.277 +3 -25
+ autogen upgrade
+
+ scripts/invoke-ntp-wait.texi@1.95 +1 -1
+ autogen upgrade
+
+ sntp/invoke-sntp.texi@1.273 +8 -8
+ autogen upgrade
+
+ util/invoke-ntp-keygen.texi@1.278 +2 -2
+ autogen upgrade
+
+ChangeSet@1.2773.1.15, 2012-04-28 06:38:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P275
+ TAG: NTP_4_2_7P275
+
+ ChangeLog@1.1146.1.12 +1 -0
+ NTP_4_2_7P275
+
+ ntpd/ntpd-opts.c@1.280 +4 -4
+ NTP_4_2_7P275
+
+ ntpd/ntpd-opts.h@1.280 +3 -3
+ NTP_4_2_7P275
+
+ ntpd/ntpd-opts.texi@1.275.1.3 +2 -2
+ NTP_4_2_7P275
+
+ ntpd/ntpd.1ntpdman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpd/ntpd.1ntpdmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpd/ntpd.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpd/ntpd.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc-opts.c@1.275 +4 -4
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc-opts.h@1.275 +3 -3
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc-opts.texi@1.272.1.3 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc.1ntpdcman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc.html@1.103 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpdc/ntpdc.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpq/ntpq-opts.c@1.277 +4 -4
+ NTP_4_2_7P275
+
+ ntpq/ntpq-opts.h@1.277 +3 -3
+ NTP_4_2_7P275
+
+ ntpq/ntpq-opts.texi@1.274.1.3 +2 -2
+ NTP_4_2_7P275
+
+ ntpq/ntpq.1ntpqman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpq/ntpq.1ntpqmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpq/ntpq.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpq/ntpq.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.277 +4 -4
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.277 +3 -3
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.1.3 +2 -2
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ packageinfo.sh@1.278 +1 -1
+ NTP_4_2_7P275
+
+ scripts/ntp-wait-opts.texi@1.92.1.3 +1 -1
+ NTP_4_2_7P275
+
+ scripts/ntp-wait.1ntp-waitman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ scripts/ntp-wait.html@1.95 +1 -1
+ NTP_4_2_7P275
+
+ scripts/ntp-wait.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ scripts/ntp-wait.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp-opts.c@1.273 +4 -4
+ NTP_4_2_7P275
+
+ sntp/sntp-opts.h@1.273 +3 -3
+ NTP_4_2_7P275
+
+ sntp/sntp-opts.texi@1.270.1.3 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp.1sntpman@1.93 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp.1sntpmdoc@1.93 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp.html@1.273 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp.man.in@1.93 +2 -2
+ NTP_4_2_7P275
+
+ sntp/sntp.mdoc.in@1.93 +2 -2
+ NTP_4_2_7P275
+
+ util/ntp-keygen-opts.c@1.277 +4 -4
+ NTP_4_2_7P275
+
+ util/ntp-keygen-opts.h@1.277 +3 -3
+ NTP_4_2_7P275
+
+ util/ntp-keygen-opts.texi@1.275.1.3 +2 -2
+ NTP_4_2_7P275
+
+ util/ntp-keygen.1ntp-keygenman@1.91 +2 -2
+ NTP_4_2_7P275
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.91 +2 -2
+ NTP_4_2_7P275
+
+ util/ntp-keygen.man.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ util/ntp-keygen.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P275
+
+ChangeSet@1.2773.1.14, 2012-04-27 15:02:14-07:00, harlan@hms-mbp.local
+ [Bug 1744] Remove obsolete ntpdate/ntptime* items
+
+ BitKeeper/deleted/2e/ntptime_config.c~491a3955@1.7 +0 -0
+ Delete: ntpdate/ntptime_config.c
+
+ BitKeeper/deleted/92/ntptimeset.c~491a3955@1.16 +0 -0
+ Delete: ntpdate/ntptimeset.c
+
+ ChangeLog@1.1146.1.11 +1 -0
+ [Bug 1744] Remove obsolete ntpdate/ntptime* items
+
+ ntpdate/Makefile.am@1.36 +1 -3
+ [Bug 1744] Remove obsolete ntpdate/ntptime* items
+
+ChangeSet@1.2773.1.13, 2012-04-25 04:41:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P274
+ TAG: NTP_4_2_7P274
+
+ ChangeLog@1.1146.1.10 +1 -0
+ NTP_4_2_7P274
+
+ ntpd/ntpd-opts.c@1.279 +4 -4
+ NTP_4_2_7P274
+
+ ntpd/ntpd-opts.h@1.279 +3 -3
+ NTP_4_2_7P274
+
+ ntpd/ntpd-opts.texi@1.275.1.2 +2 -2
+ NTP_4_2_7P274
+
+ ntpd/ntpd.1ntpdman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpd/ntpd.1ntpdmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpd/ntpd.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpd/ntpd.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc-opts.c@1.274 +4 -4
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc-opts.h@1.274 +3 -3
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc-opts.texi@1.272.1.2 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc.1ntpdcman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc.html@1.102 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpdc/ntpdc.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpq/ntpq-opts.c@1.276 +4 -4
+ NTP_4_2_7P274
+
+ ntpq/ntpq-opts.h@1.276 +3 -3
+ NTP_4_2_7P274
+
+ ntpq/ntpq-opts.texi@1.274.1.2 +2 -2
+ NTP_4_2_7P274
+
+ ntpq/ntpq.1ntpqman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpq/ntpq.1ntpqmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpq/ntpq.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpq/ntpq.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.276 +4 -4
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.276 +3 -3
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.1.2 +2 -2
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ packageinfo.sh@1.277 +1 -1
+ NTP_4_2_7P274
+
+ scripts/ntp-wait-opts.texi@1.92.1.2 +1 -1
+ NTP_4_2_7P274
+
+ scripts/ntp-wait.1ntp-waitman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ scripts/ntp-wait.html@1.94 +1 -1
+ NTP_4_2_7P274
+
+ scripts/ntp-wait.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ scripts/ntp-wait.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp-opts.c@1.272 +4 -4
+ NTP_4_2_7P274
+
+ sntp/sntp-opts.h@1.272 +3 -3
+ NTP_4_2_7P274
+
+ sntp/sntp-opts.texi@1.270.1.2 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp.1sntpman@1.92 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp.1sntpmdoc@1.92 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp.html@1.272 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp.man.in@1.92 +2 -2
+ NTP_4_2_7P274
+
+ sntp/sntp.mdoc.in@1.92 +2 -2
+ NTP_4_2_7P274
+
+ util/ntp-keygen-opts.c@1.276 +4 -4
+ NTP_4_2_7P274
+
+ util/ntp-keygen-opts.h@1.276 +3 -3
+ NTP_4_2_7P274
+
+ util/ntp-keygen-opts.texi@1.275.1.2 +2 -2
+ NTP_4_2_7P274
+
+ util/ntp-keygen.1ntp-keygenman@1.90 +2 -2
+ NTP_4_2_7P274
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.90 +2 -2
+ NTP_4_2_7P274
+
+ util/ntp-keygen.man.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ util/ntp-keygen.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P274
+
+ChangeSet@1.2773.1.12, 2012-04-25 03:53:28+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2174] ntpd rejects source UDP ports less than 123 as bogus.
+
+ ChangeLog@1.1146.1.9 +1 -0
+ [Bug 2174] ntpd rejects source UDP ports less than 123 as bogus.
+
+ ntpd/ntp_proto.c@1.341 +3 -6
+ [Bug 2174] ntpd rejects source UDP ports less than 123 as bogus.
+
+ChangeSet@1.2773.1.11, 2012-04-25 03:18:53+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Remove redundant manual systime_s.o: systime.c dependency from libntp's
+ Makefile.am.
+
+ libntp/Makefile.am@1.70 +0 -7
+ Remove redundant manual dependency of systime_s.o upon systime.c. The
+ same dependency is automatically generated in .deps/systime_s.Po which
+ Makefile includes. The manual dependency was an attempt to resolve a
+ problem caused by the release snapshot Makefile erroneously removing
+ all .deps directories from the build tree before running configure.
+ .dep/*.Po must not be removed unless *.o are removed at the same time,
+ or else automatic dependencies are missing.
+
+ChangeSet@1.2773.1.10, 2012-04-19 05:43:39+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P273
+ TAG: NTP_4_2_7P273
+
+ ChangeLog@1.1146.1.8 +1 -0
+ NTP_4_2_7P273
+
+ libntp/Makefile.am@1.69 +1 -1
+ Use $(OBJEXT), not .o
+
+ libntp/Makefile.am@1.68 +1 -2
+ Fix systime_s.o dependency
+
+ ntpd/ntpd-opts.c@1.278 +4 -4
+ NTP_4_2_7P273
+
+ ntpd/ntpd-opts.h@1.278 +3 -3
+ NTP_4_2_7P273
+
+ ntpd/ntpd-opts.texi@1.275.1.1 +2 -2
+ NTP_4_2_7P273
+
+ ntpd/ntpd.1ntpdman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpd/ntpd.1ntpdmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpd/ntpd.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpd/ntpd.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc-opts.c@1.273 +4 -4
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc-opts.h@1.273 +3 -3
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc-opts.texi@1.272.1.1 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc.1ntpdcman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc.html@1.101 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpdc/ntpdc.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpq/ntpq-opts.c@1.275 +4 -4
+ NTP_4_2_7P273
+
+ ntpq/ntpq-opts.h@1.275 +3 -3
+ NTP_4_2_7P273
+
+ ntpq/ntpq-opts.texi@1.274.1.1 +2 -2
+ NTP_4_2_7P273
+
+ ntpq/ntpq.1ntpqman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpq/ntpq.1ntpqmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpq/ntpq.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpq/ntpq.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.275 +4 -4
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.275 +3 -3
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274.1.1 +2 -2
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ packageinfo.sh@1.276 +1 -1
+ NTP_4_2_7P273
+
+ scripts/ntp-wait-opts.texi@1.92.1.1 +1 -1
+ NTP_4_2_7P273
+
+ scripts/ntp-wait.1ntp-waitman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ scripts/ntp-wait.html@1.93 +1 -1
+ NTP_4_2_7P273
+
+ scripts/ntp-wait.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ scripts/ntp-wait.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp-opts.c@1.271 +4 -4
+ NTP_4_2_7P273
+
+ sntp/sntp-opts.h@1.271 +3 -3
+ NTP_4_2_7P273
+
+ sntp/sntp-opts.texi@1.270.1.1 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp.1sntpman@1.91 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp.1sntpmdoc@1.91 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp.html@1.271 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp.man.in@1.91 +2 -2
+ NTP_4_2_7P273
+
+ sntp/sntp.mdoc.in@1.91 +2 -2
+ NTP_4_2_7P273
+
+ util/ntp-keygen-opts.c@1.275 +4 -4
+ NTP_4_2_7P273
+
+ util/ntp-keygen-opts.h@1.275 +3 -3
+ NTP_4_2_7P273
+
+ util/ntp-keygen-opts.texi@1.275.1.1 +2 -2
+ NTP_4_2_7P273
+
+ util/ntp-keygen.1ntp-keygenman@1.89 +2 -2
+ NTP_4_2_7P273
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.89 +2 -2
+ NTP_4_2_7P273
+
+ util/ntp-keygen.man.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ util/ntp-keygen.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P273
+
+ChangeSet@1.2773.1.9, 2012-04-18 19:30:28+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Correct authnumfreekeys accounting broken in 4.2.7p262.
+
+ ChangeLog@1.1146.1.7 +1 -0
+ Correct authnumfreekeys accounting broken in 4.2.7p262.
+
+ libntp/authkeys.c@1.24 +2 -2
+ Correct authnumfreekeys accounting broken in 4.2.7p262.
+
+ChangeSet@1.2773.1.8, 2012-04-18 11:46:26+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2141] handle_sigio() calls get_systime(), which must be
+ reentrant when SIGIO is used. Sanity checks relative to the prior
+ get_systime() are disabled in ntpd on systems with signaled I/O, but
+ active in sntp and ntpdate.
+
+ ChangeLog@1.1146.1.6 +4 -0
+ [Bug 2141] handle_sigio() calls get_systime(), which must be
+ reentrant when SIGIO is used. Sanity checks relative to the prior
+ get_systime() are disabled in ntpd on systems with signaled I/O, but
+ active in sntp and ntpdate.
+
+ include/iosignal.h@1.6 +5 -0
+ Add USING_SIGIO() and using_sigio.
+
+ libntp/iosignal.c@1.16 +2 -0
+ Set using_sigio when doing so.
+
+ libntp/systime.c@1.66 +51 -31
+ Disable non-reentrant checks in get_systime() when SIGIO is being used,
+ as handle_sigio() calls get_systime().
+
+ChangeSet@1.2773.1.7, 2012-04-18 05:03:10+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Remove inttoa() and uinttoa(), convert solitary use of latter
+ to simpler code.
+
+ BitKeeper/deleted/73/inttoa.cpp~827ae0ffc75432e4@1.5 +0 -0
+ Delete: tests/libntp/inttoa.cpp
+
+ BitKeeper/deleted/a5/inttoa.c~3e480692@1.5 +0 -0
+ Delete: libntp/inttoa.c
+
+ BitKeeper/deleted/ac/uinttoa.c~3e480692@1.5 +0 -0
+ Delete: libntp/uinttoa.c
+
+ BitKeeper/deleted/f0/uinttoa.cpp~d804670d7d9346f4@1.2 +0 -0
+ Delete: tests/libntp/uinttoa.cpp
+
+ include/ntp_stdlib.h@1.73 +0 -2
+ Remove inttoa() and uinttoa().
+
+ libntp/Makefile.am@1.67 +0 -2
+ Remove inttoa() and uinttoa().
+
+ ntpq/ntpq-subs.c@1.96 +2 -4
+ Convert solitary callsite of uinttoa() to simpler equivalent.
+
+ ports/winnt/vs2005/libntp.vcproj@1.22 +0 -8
+ Remove inttoa() and uinttoa().
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.45 +2 -10
+ Remove inttoa() and uinttoa().
+
+ tests/libntp/Makefile.am@1.40 +0 -2
+ Remove inttoa() and uinttoa() unit tests.
+
+ChangeSet@1.2776, 2012-04-17 01:54:04-07:00, stenn@stenn.ntp.org
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ChangeLog@1.1149 +1 -0
+ Upgrade to autogen-5.16
+
+ ntpd/Makefile.am@1.117 +7 -7
+ Upgrade to autogen-5.16
+
+ ntpd/invoke-ntpd.menu@1.7 +0 -0
+ Rename: ntpd/ntpd-opts.menu -> ntpd/invoke-ntpd.menu
+
+ ntpd/invoke-ntpd.texi@1.274.1.2 +681 -272
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ntpd/invoke-ntpd.texi@1.274.1.1 +0 -0
+ Rename: ntpd/ntpd-opts.texi -> ntpd/invoke-ntpd.texi
+
+ ntpdc/Makefile.am@1.72 +9 -9
+ Upgrade to autogen-5.16
+
+ ntpdc/invoke-ntpdc.menu@1.7 +0 -0
+ Rename: ntpdc/ntpdc-opts.menu -> ntpdc/invoke-ntpdc.menu
+
+ ntpdc/invoke-ntpdc.texi@1.271.1.2 +667 -84
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ntpdc/invoke-ntpdc.texi@1.271.1.1 +0 -0
+ Rename: ntpdc/ntpdc-opts.texi -> ntpdc/invoke-ntpdc.texi
+
+ ntpdc/ntpdc.texi@1.3 +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ntpq/Makefile.am@1.68 +7 -7
+ Upgrade to autogen-5.16
+
+ ntpq/invoke-ntpq.menu@1.7 +0 -0
+ Rename: ntpq/ntpq-opts.menu -> ntpq/invoke-ntpq.menu
+
+ ntpq/invoke-ntpq.texi@1.273.1.2 +352 -83
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ntpq/invoke-ntpq.texi@1.273.1.1 +0 -0
+ Rename: ntpq/ntpq-opts.texi -> ntpq/invoke-ntpq.texi
+
+ ntpsnmpd/Makefile.am@1.35.1.1 +7 -7
+ Upgrade to autogen-5.16
+
+ ntpsnmpd/invoke-ntpsnmpd.menu@1.7 +0 -0
+ Rename: ntpsnmpd/ntpsnmpd-opts.menu -> ntpsnmpd/invoke-ntpsnmpd.menu
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.273.1.2 +120 -47
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ ntpsnmpd/invoke-ntpsnmpd.texi@1.273.1.1 +0 -0
+ Rename: ntpsnmpd/ntpsnmpd-opts.texi -> ntpsnmpd/invoke-ntpsnmpd.texi
+
+ scripts/Makefile.am@1.30 +8 -8
+ Upgrade to autogen-5.16
+
+ scripts/invoke-ntp-wait.menu@1.2 +0 -0
+ Rename: scripts/ntp-wait-opts.menu -> scripts/invoke-ntp-wait.menu
+
+ scripts/invoke-ntp-wait.texi@1.91.1.2 +92 -26
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ scripts/invoke-ntp-wait.texi@1.91.1.1 +0 -0
+ Rename: scripts/ntp-wait-opts.texi -> scripts/invoke-ntp-wait.texi
+
+ scripts/ntp-wait.texi@1.2 +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/Makefile.am@1.72 +9 -9
+ Upgrade to autogen-5.16
+
+ sntp/invoke-sntp.menu@1.7 +0 -0
+ Rename: sntp/sntp-opts.menu -> sntp/invoke-sntp.menu
+
+ sntp/invoke-sntp.texi@1.269.1.2 +254 -133
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ sntp/invoke-sntp.texi@1.269.1.1 +0 -0
+ Rename: sntp/sntp-opts.texi -> sntp/invoke-sntp.texi
+
+ sntp/libopts/Makefile.am@1.13 +6 -6
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/ag-char-map.h@1.16 +305 -129
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/ao-strs.c@1.2 +1 -1
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/ao-strs.h@1.1 +251 -0
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/ao-strs.h@1.0 +0 -0
+
+ sntp/libopts/autoopts.c@1.13 +14 -5
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/autoopts.h@1.11 +8 -9
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/autoopts/options.h@1.15 +50 -29
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/autoopts/project.h@1.2 +2 -0
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/autoopts/usage-txt.h@1.15 +161 -159
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/boolean.c@1.9 +8 -6
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/check.c@1.3 +17 -15
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/compat/compat.h@1.9 +15 -4
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/compat/pathfind.c@1.7 +2 -2
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/configfile.c@1.14 +58 -50
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/cook.c@1.10 +8 -8
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/enum.c@1.3 +32 -6
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/env.c@1.3 +7 -4
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/find.c@1.3 +4 -4
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/genshell.c@1.16 +17 -16
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/genshell.h@1.16 +6 -5
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/libopts.c@1.6 +1 -2
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/load.c@1.12 +46 -47
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/m4/libopts.m4@1.19 +3 -2
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/makeshell.c@1.11 +5 -3
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/nested.c@1.9 +7 -6
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/parse-duration.c@1.7 +3 -3
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/pgusage.c@1.10 +4 -11
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/proto.h@1.16 +4 -7
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/putshell.c@1.9 +6 -4
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/reset.c@1.10 +4 -4
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/save.c@1.11 +3 -3
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/stack.c@1.9 +8 -8
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/streqvcmp.c@1.9 +3 -3
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/tokenize.c@1.7 +7 -9
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/usage.c@1.11 +30 -32
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/value-type.h@1.16 +1 -1
+ upgrade to libopts-36.4.11
+
+ sntp/libopts/xat-attribute.h@1.16 +1 -1
+ upgrade to libopts-36.4.11
+
+ sntp/sntp.texi@1.9 +1 -1
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ util/Makefile.am@1.72 +7 -7
+ Upgrade to autogen-5.16
+
+ util/invoke-ntp-keygen.menu@1.8 +0 -0
+ Rename: util/ntp-keygen-opts.menu -> util/invoke-ntp-keygen.menu
+
+ util/invoke-ntp-keygen.texi@1.274.1.2 +761 -120
+ Upgrade to autogen-5.16 and libopts-36.4.11
+
+ util/invoke-ntp-keygen.texi@1.274.1.1 +0 -0
+ Rename: util/ntp-keygen-opts.texi -> util/invoke-ntp-keygen.texi
+
+ChangeSet@1.2773.1.6, 2012-04-14 04:43:39+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P272
+ TAG: NTP_4_2_7P272
+
+ ChangeLog@1.1146.1.5 +1 -0
+ NTP_4_2_7P272
+
+ ntpd/ntpd-opts.c@1.277 +4 -4
+ NTP_4_2_7P272
+
+ ntpd/ntpd-opts.h@1.277 +3 -3
+ NTP_4_2_7P272
+
+ ntpd/ntpd-opts.texi@1.275 +2 -2
+ NTP_4_2_7P272
+
+ ntpd/ntpd.1ntpdman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpd/ntpd.1ntpdmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpd/ntpd.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpd/ntpd.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc-opts.c@1.272 +4 -4
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc-opts.h@1.272 +3 -3
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc-opts.texi@1.272 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc.1ntpdcman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc.html@1.100 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpdc/ntpdc.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpq/ntpq-opts.c@1.274 +4 -4
+ NTP_4_2_7P272
+
+ ntpq/ntpq-opts.h@1.274 +3 -3
+ NTP_4_2_7P272
+
+ ntpq/ntpq-opts.texi@1.274 +2 -2
+ NTP_4_2_7P272
+
+ ntpq/ntpq.1ntpqman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpq/ntpq.1ntpqmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpq/ntpq.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpq/ntpq.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.274 +4 -4
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.274 +3 -3
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.274 +2 -2
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ packageinfo.sh@1.275 +1 -1
+ NTP_4_2_7P272
+
+ scripts/ntp-wait-opts.texi@1.92 +1 -1
+ NTP_4_2_7P272
+
+ scripts/ntp-wait.1ntp-waitman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ scripts/ntp-wait.html@1.92 +1 -1
+ NTP_4_2_7P272
+
+ scripts/ntp-wait.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ scripts/ntp-wait.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp-opts.c@1.270 +4 -4
+ NTP_4_2_7P272
+
+ sntp/sntp-opts.h@1.270 +3 -3
+ NTP_4_2_7P272
+
+ sntp/sntp-opts.texi@1.270 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp.1sntpman@1.90 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp.1sntpmdoc@1.90 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp.html@1.270 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp.man.in@1.90 +2 -2
+ NTP_4_2_7P272
+
+ sntp/sntp.mdoc.in@1.90 +2 -2
+ NTP_4_2_7P272
+
+ util/ntp-keygen-opts.c@1.274 +4 -4
+ NTP_4_2_7P272
+
+ util/ntp-keygen-opts.h@1.274 +3 -3
+ NTP_4_2_7P272
+
+ util/ntp-keygen-opts.texi@1.275 +2 -2
+ NTP_4_2_7P272
+
+ util/ntp-keygen.1ntp-keygenman@1.88 +2 -2
+ NTP_4_2_7P272
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.88 +2 -2
+ NTP_4_2_7P272
+
+ util/ntp-keygen.man.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ util/ntp-keygen.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P272
+
+ChangeSet@1.2773.2.1, 2012-04-13 23:49:28-04:00, stenn@deacon.udel.edu
+ Change the link order for ntpsntpd
+
+ ChangeLog@1.1146.2.2 +1 -0
+ Change the link order for ntpsntpd
+
+ ChangeLog@1.1146.2.1 +1 -0
+ Remove extra nlist test
+
+ configure.ac@1.545 +1 -1
+ Remove extra nlist test
+
+ ntpsnmpd/Makefile.am@1.36 +3 -2
+ Change the link order for ntpsntpd
+
+ChangeSet@1.2773.1.4, 2012-04-13 02:02:55-07:00, harlan@hms-mbp.lan
+ LCRYPTO is gone - replace with VER_SUFFIX
+
+ ChangeLog@1.1146.1.3 +1 -0
+ LCRYPTO is gone - replace with VER_SUFFIX
+
+ scripts/mkver.in@1.14 +2 -4
+ LCRYPTO is gone - replace with VER_SUFFIX
+
+ sntp/m4/ntp_openssl.m4@1.20 +8 -0
+ LCRYPTO is gone - replace with VER_SUFFIX
+
+ sntp/m4/ntp_ver_suffix.m4@1.1 +13 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/sntp/m4/ntp_ver_suffix.m4
+
+ sntp/m4/ntp_ver_suffix.m4@1.0 +0 -0
+
+ChangeSet@1.2773.1.3, 2012-04-11 08:44:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P271
+ TAG: NTP_4_2_7P271
+
+ ChangeLog@1.1146.1.2 +1 -0
+ NTP_4_2_7P271
+
+ ntpd/ntpd-opts.c@1.276 +4 -4
+ NTP_4_2_7P271
+
+ ntpd/ntpd-opts.h@1.276 +3 -3
+ NTP_4_2_7P271
+
+ ntpd/ntpd-opts.texi@1.274 +2 -2
+ NTP_4_2_7P271
+
+ ntpd/ntpd.1ntpdman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpd/ntpd.1ntpdmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpd/ntpd.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpd/ntpd.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc-opts.c@1.271 +4 -4
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc-opts.h@1.271 +3 -3
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc-opts.texi@1.271 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc.1ntpdcman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc.html@1.99 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpdc/ntpdc.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpq/ntpq-opts.c@1.273 +4 -4
+ NTP_4_2_7P271
+
+ ntpq/ntpq-opts.h@1.273 +3 -3
+ NTP_4_2_7P271
+
+ ntpq/ntpq-opts.texi@1.273 +2 -2
+ NTP_4_2_7P271
+
+ ntpq/ntpq.1ntpqman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpq/ntpq.1ntpqmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpq/ntpq.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpq/ntpq.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.273 +4 -4
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.273 +3 -3
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.273 +2 -2
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ packageinfo.sh@1.274 +1 -1
+ NTP_4_2_7P271
+
+ scripts/ntp-wait-opts.texi@1.91 +14 -2
+ NTP_4_2_7P271
+
+ scripts/ntp-wait.1ntp-waitman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ scripts/ntp-wait.html@1.91 +14 -2
+ NTP_4_2_7P271
+
+ scripts/ntp-wait.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ scripts/ntp-wait.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp-opts.c@1.269 +4 -4
+ NTP_4_2_7P271
+
+ sntp/sntp-opts.h@1.269 +3 -3
+ NTP_4_2_7P271
+
+ sntp/sntp-opts.texi@1.269 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp.1sntpman@1.89 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp.1sntpmdoc@1.89 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp.html@1.269 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp.man.in@1.89 +2 -2
+ NTP_4_2_7P271
+
+ sntp/sntp.mdoc.in@1.89 +2 -2
+ NTP_4_2_7P271
+
+ util/ntp-keygen-opts.c@1.273 +4 -4
+ NTP_4_2_7P271
+
+ util/ntp-keygen-opts.h@1.273 +3 -3
+ NTP_4_2_7P271
+
+ util/ntp-keygen-opts.texi@1.274 +2 -2
+ NTP_4_2_7P271
+
+ util/ntp-keygen.1ntp-keygenman@1.87 +2 -2
+ NTP_4_2_7P271
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.87 +2 -2
+ NTP_4_2_7P271
+
+ util/ntp-keygen.man.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ util/ntp-keygen.mdoc.in@1.87 +2 -2
+ NTP_4_2_7P271
+
+ChangeSet@1.2773.1.2, 2012-04-09 16:19:04+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Put openssl -L flags from pkg-config in LDADD_NTP as comment indicates,
+ rather than in LDFLAGS_NTP.
+
+ sntp/m4/ntp_openssl.m4@1.19 +4 -4
+ Put openssl -L flags from pkg-config in LDADD_NTP as comment indicates,
+ rather than in LDFLAGS_NTP.
+
+ChangeSet@1.2773.1.1, 2012-04-09 05:25:13+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 1122] openssl detection via pkg-config fails when no additional
+ -Idir flags are needed.
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ ChangeLog@1.1146.1.1 +4 -0
+ [Bug 1122] openssl detection via pkg-config fails when no additional
+ -Idir flags are needed.
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+
+ ntpd/Makefile.am@1.112.1.3 +4 -2
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ ntpdate/Makefile.am@1.35 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ ntpdc/Makefile.am@1.71 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ ntpq/Makefile.am@1.67 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ ntpsnmpd/Makefile.am@1.35 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ sntp/Makefile.am@1.71 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ sntp/m4/ntp_compiler.m4@1.3 +4 -0
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ sntp/m4/ntp_openssl.m4@1.18 +185 -197
+ [Bug 1122] openssl detection via pkg-config fails when no additional
+ -Idir flags are needed.
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+
+ sntp/tests/Makefile.am@1.27 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ tests/libntp/Makefile.am@1.39 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ util/Makefile.am@1.71 +3 -1
+ Avoid overwriting user variable LDFLAGS with OpenSSL flags, instead
+ they are added to LDFLAGS_NTP.
+
+ChangeSet@1.2773, 2012-03-26 09:24:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P270
+ TAG: NTP_4_2_7P270
+
+ ChangeLog@1.1146 +1 -0
+ NTP_4_2_7P270
+
+ ntpd/ntpd-opts.c@1.275 +4 -4
+ NTP_4_2_7P270
+
+ ntpd/ntpd-opts.h@1.275 +3 -3
+ NTP_4_2_7P270
+
+ ntpd/ntpd-opts.texi@1.273 +2 -2
+ NTP_4_2_7P270
+
+ ntpd/ntpd.1ntpdman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpd/ntpd.1ntpdmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpd/ntpd.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpd/ntpd.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc-opts.c@1.270 +4 -4
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc-opts.h@1.270 +3 -3
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc-opts.texi@1.270 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc.1ntpdcman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc.html@1.98 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpdc/ntpdc.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpq/ntpq-opts.c@1.272 +4 -4
+ NTP_4_2_7P270
+
+ ntpq/ntpq-opts.h@1.272 +3 -3
+ NTP_4_2_7P270
+
+ ntpq/ntpq-opts.texi@1.272 +2 -2
+ NTP_4_2_7P270
+
+ ntpq/ntpq.1ntpqman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpq/ntpq.1ntpqmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpq/ntpq.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpq/ntpq.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.272 +4 -4
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.272 +3 -3
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.272 +2 -2
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ packageinfo.sh@1.273 +1 -1
+ NTP_4_2_7P270
+
+ scripts/ntp-wait-opts.texi@1.90 +1 -1
+ NTP_4_2_7P270
+
+ scripts/ntp-wait.1ntp-waitman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ scripts/ntp-wait.html@1.90 +1 -1
+ NTP_4_2_7P270
+
+ scripts/ntp-wait.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ scripts/ntp-wait.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp-opts.c@1.268 +4 -4
+ NTP_4_2_7P270
+
+ sntp/sntp-opts.h@1.268 +3 -3
+ NTP_4_2_7P270
+
+ sntp/sntp-opts.texi@1.268 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp.1sntpman@1.88 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp.1sntpmdoc@1.88 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp.html@1.268 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp.man.in@1.88 +2 -2
+ NTP_4_2_7P270
+
+ sntp/sntp.mdoc.in@1.88 +2 -2
+ NTP_4_2_7P270
+
+ util/ntp-keygen-opts.c@1.272 +4 -4
+ NTP_4_2_7P270
+
+ util/ntp-keygen-opts.h@1.272 +3 -3
+ NTP_4_2_7P270
+
+ util/ntp-keygen-opts.texi@1.273 +2 -2
+ NTP_4_2_7P270
+
+ util/ntp-keygen.1ntp-keygenman@1.86 +2 -2
+ NTP_4_2_7P270
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.86 +2 -2
+ NTP_4_2_7P270
+
+ util/ntp-keygen.man.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ util/ntp-keygen.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P270
+
+ChangeSet@1.2772, 2012-03-26 05:12:44-04:00, stenn@deacon.udel.edu
+ Update driver45.html page
+
+ ChangeLog@1.1145 +1 -0
+ Update driver45.html page
+
+ html/drivers/driver45.html@1.3 +1 -1
+ Update driver45.html page
+
+ChangeSet@1.2771, 2012-03-25 05:07:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P269
+ TAG: NTP_4_2_7P269
+
+ ChangeLog@1.1144 +1 -0
+ NTP_4_2_7P269
+
+ ntpd/ntpd-opts.c@1.274 +4 -4
+ NTP_4_2_7P269
+
+ ntpd/ntpd-opts.h@1.274 +3 -3
+ NTP_4_2_7P269
+
+ ntpd/ntpd-opts.texi@1.272 +2 -2
+ NTP_4_2_7P269
+
+ ntpd/ntpd.1ntpdman@1.85 +8 -548
+ NTP_4_2_7P269
+
+ ntpd/ntpd.1ntpdmdoc@1.85 +8 -547
+ NTP_4_2_7P269
+
+ ntpd/ntpd.man.in@1.85 +8 -548
+ NTP_4_2_7P269
+
+ ntpd/ntpd.mdoc.in@1.85 +8 -547
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc-opts.c@1.269 +4 -4
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc-opts.h@1.269 +3 -3
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc-opts.texi@1.269 +2 -2
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc.1ntpdcman@1.85 +7 -704
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.85 +7 -659
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc.html@1.97 +2 -2
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc.man.in@1.85 +7 -704
+ NTP_4_2_7P269
+
+ ntpdc/ntpdc.mdoc.in@1.85 +7 -659
+ NTP_4_2_7P269
+
+ ntpq/ntpq-opts.c@1.271 +4 -4
+ NTP_4_2_7P269
+
+ ntpq/ntpq-opts.h@1.271 +3 -3
+ NTP_4_2_7P269
+
+ ntpq/ntpq-opts.texi@1.271 +2 -2
+ NTP_4_2_7P269
+
+ ntpq/ntpq.1ntpqman@1.85 +3 -260
+ NTP_4_2_7P269
+
+ ntpq/ntpq.1ntpqmdoc@1.85 +3 -245
+ NTP_4_2_7P269
+
+ ntpq/ntpq.man.in@1.85 +3 -260
+ NTP_4_2_7P269
+
+ ntpq/ntpq.mdoc.in@1.85 +3 -245
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.271 +4 -4
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.271 +3 -3
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.271 +2 -2
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.85 +4 -3
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.85 +4 -3
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd.man.in@1.85 +4 -3
+ NTP_4_2_7P269
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.85 +4 -3
+ NTP_4_2_7P269
+
+ packageinfo.sh@1.272 +1 -1
+ NTP_4_2_7P269
+
+ scripts/ntp-wait-opts.texi@1.89 +1 -1
+ NTP_4_2_7P269
+
+ scripts/ntp-wait.1ntp-waitman@1.85 +4 -18
+ NTP_4_2_7P269
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.85 +4 -18
+ NTP_4_2_7P269
+
+ scripts/ntp-wait.html@1.89 +1 -1
+ NTP_4_2_7P269
+
+ scripts/ntp-wait.man.in@1.85 +4 -18
+ NTP_4_2_7P269
+
+ scripts/ntp-wait.mdoc.in@1.85 +4 -18
+ NTP_4_2_7P269
+
+ sntp/sntp-opts.c@1.267 +4 -4
+ NTP_4_2_7P269
+
+ sntp/sntp-opts.h@1.267 +3 -3
+ NTP_4_2_7P269
+
+ sntp/sntp-opts.texi@1.267 +2 -2
+ NTP_4_2_7P269
+
+ sntp/sntp.1sntpman@1.87 +6 -65
+ NTP_4_2_7P269
+
+ sntp/sntp.1sntpmdoc@1.87 +6 -65
+ NTP_4_2_7P269
+
+ sntp/sntp.html@1.267 +2 -2
+ NTP_4_2_7P269
+
+ sntp/sntp.man.in@1.87 +6 -65
+ NTP_4_2_7P269
+
+ sntp/sntp.mdoc.in@1.87 +6 -65
+ NTP_4_2_7P269
+
+ util/ntp-keygen-opts.c@1.271 +4 -4
+ NTP_4_2_7P269
+
+ util/ntp-keygen-opts.h@1.271 +3 -3
+ NTP_4_2_7P269
+
+ util/ntp-keygen-opts.texi@1.272 +2 -2
+ NTP_4_2_7P269
+
+ util/ntp-keygen.1ntp-keygenman@1.85 +6 -720
+ NTP_4_2_7P269
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.85 +6 -706
+ NTP_4_2_7P269
+
+ util/ntp-keygen.man.in@1.85 +6 -720
+ NTP_4_2_7P269
+
+ util/ntp-keygen.mdoc.in@1.85 +6 -706
+ NTP_4_2_7P269
+
+ChangeSet@1.2770, 2012-03-24 22:19:50-04:00, stenn@deacon.udel.edu
+ Clean up configure.ac
+
+ ChangeLog@1.1143 +1 -0
+ Clean up configure.ac
+
+ configure.ac@1.544 +221 -117
+ Clean up configure.ac
+
+ChangeSet@1.2769, 2012-03-24 19:30:26-04:00, stenn@psp-deb1.ntp.org
+ Cleanup configure.ac's TSYNC PCI section
+
+ ChangeLog@1.1142 +2 -0
+ Cleanup configure.ac's TSYNC PCI section
+
+ configure.ac@1.543 +2 -2
+ Cleanup configure.ac's TSYNC PCI section
+
+ChangeSet@1.2762.1.43, 2012-03-24 11:22:52+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P268
+ TAG: NTP_4_2_7P268
+
+ ChangeLog@1.1141 +1 -0
+ NTP_4_2_7P268
+
+ ntpd/ntpd-opts.c@1.273 +4 -4
+ NTP_4_2_7P268
+
+ ntpd/ntpd-opts.h@1.273 +3 -3
+ NTP_4_2_7P268
+
+ ntpd/ntpd-opts.texi@1.271 +2 -2
+ NTP_4_2_7P268
+
+ ntpd/ntpd.1ntpdman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpd/ntpd.1ntpdmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpd/ntpd.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpd/ntpd.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc-opts.c@1.268 +4 -4
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc-opts.h@1.268 +3 -3
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc-opts.texi@1.268 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc.1ntpdcman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc.html@1.96 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpdc/ntpdc.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpq/ntpq-opts.c@1.270 +4 -4
+ NTP_4_2_7P268
+
+ ntpq/ntpq-opts.h@1.270 +3 -3
+ NTP_4_2_7P268
+
+ ntpq/ntpq-opts.texi@1.270 +2 -2
+ NTP_4_2_7P268
+
+ ntpq/ntpq.1ntpqman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpq/ntpq.1ntpqmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpq/ntpq.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpq/ntpq.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.270 +4 -4
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.270 +3 -3
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.270 +2 -2
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ packageinfo.sh@1.271 +1 -1
+ NTP_4_2_7P268
+
+ scripts/ntp-wait-opts.texi@1.88 +1 -1
+ NTP_4_2_7P268
+
+ scripts/ntp-wait.1ntp-waitman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ scripts/ntp-wait.html@1.88 +1 -1
+ NTP_4_2_7P268
+
+ scripts/ntp-wait.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ scripts/ntp-wait.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp-opts.c@1.266 +4 -4
+ NTP_4_2_7P268
+
+ sntp/sntp-opts.h@1.266 +3 -3
+ NTP_4_2_7P268
+
+ sntp/sntp-opts.texi@1.266 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp.1sntpman@1.86 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp.1sntpmdoc@1.86 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp.html@1.266 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp.man.in@1.86 +2 -2
+ NTP_4_2_7P268
+
+ sntp/sntp.mdoc.in@1.86 +2 -2
+ NTP_4_2_7P268
+
+ util/ntp-keygen-opts.c@1.270 +4 -4
+ NTP_4_2_7P268
+
+ util/ntp-keygen-opts.h@1.270 +3 -3
+ NTP_4_2_7P268
+
+ util/ntp-keygen-opts.texi@1.271 +2 -2
+ NTP_4_2_7P268
+
+ util/ntp-keygen.1ntp-keygenman@1.84 +2 -2
+ NTP_4_2_7P268
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.84 +2 -2
+ NTP_4_2_7P268
+
+ util/ntp-keygen.man.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ util/ntp-keygen.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P268
+
+ChangeSet@1.2762.1.42, 2012-03-23 21:50:58-04:00, stenn@deacon.udel.edu
+ reindent driver45.html
+
+ html/drivers/driver45.html@1.2 +22 -22
+ reindent driver45.html
+
+ChangeSet@1.2762.1.41, 2012-03-23 11:23:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P267
+ TAG: NTP_4_2_7P267
+
+ ChangeLog@1.1140 +1 -0
+ NTP_4_2_7P267
+
+ ntpd/ntpd-opts.c@1.272 +4 -4
+ NTP_4_2_7P267
+
+ ntpd/ntpd-opts.h@1.272 +3 -3
+ NTP_4_2_7P267
+
+ ntpd/ntpd-opts.texi@1.270 +2 -2
+ NTP_4_2_7P267
+
+ ntpd/ntpd.1ntpdman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpd/ntpd.1ntpdmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpd/ntpd.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpd/ntpd.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc-opts.c@1.267 +4 -4
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc-opts.h@1.267 +3 -3
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc-opts.texi@1.267 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc.1ntpdcman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc.html@1.95 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpdc/ntpdc.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpq/ntpq-opts.c@1.269 +4 -4
+ NTP_4_2_7P267
+
+ ntpq/ntpq-opts.h@1.269 +3 -3
+ NTP_4_2_7P267
+
+ ntpq/ntpq-opts.texi@1.269 +2 -2
+ NTP_4_2_7P267
+
+ ntpq/ntpq.1ntpqman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpq/ntpq.1ntpqmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpq/ntpq.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpq/ntpq.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.269 +4 -4
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.269 +3 -3
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.269 +2 -2
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ packageinfo.sh@1.270 +1 -1
+ NTP_4_2_7P267
+
+ scripts/ntp-wait-opts.texi@1.87 +1 -1
+ NTP_4_2_7P267
+
+ scripts/ntp-wait.1ntp-waitman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ scripts/ntp-wait.html@1.87 +1 -1
+ NTP_4_2_7P267
+
+ scripts/ntp-wait.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ scripts/ntp-wait.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp-opts.c@1.265 +4 -4
+ NTP_4_2_7P267
+
+ sntp/sntp-opts.h@1.265 +3 -3
+ NTP_4_2_7P267
+
+ sntp/sntp-opts.texi@1.265 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp.1sntpman@1.85 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp.1sntpmdoc@1.85 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp.html@1.265 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp.man.in@1.85 +2 -2
+ NTP_4_2_7P267
+
+ sntp/sntp.mdoc.in@1.85 +2 -2
+ NTP_4_2_7P267
+
+ util/ntp-keygen-opts.c@1.269 +4 -4
+ NTP_4_2_7P267
+
+ util/ntp-keygen-opts.h@1.269 +3 -3
+ NTP_4_2_7P267
+
+ util/ntp-keygen-opts.texi@1.270 +2 -2
+ NTP_4_2_7P267
+
+ util/ntp-keygen.1ntp-keygenman@1.83 +2 -2
+ NTP_4_2_7P267
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.83 +2 -2
+ NTP_4_2_7P267
+
+ util/ntp-keygen.man.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ util/ntp-keygen.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P267
+
+ChangeSet@1.2762.1.40, 2012-03-22 20:20:29-04:00, stenn@deacon.udel.edu
+ Initial cut at a basic driver45.html page
+
+ ChangeLog@1.1139 +1 -0
+ Initial cut at a basic driver45.html page
+
+ html/drivers/driver45.html@1.1 +29 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/drivers/driver45.html
+
+ html/drivers/driver45.html@1.0 +0 -0
+
+ChangeSet@1.2762.1.39, 2012-03-21 11:24:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P266
+ TAG: NTP_4_2_7P266
+
+ ChangeLog@1.1138 +1 -0
+ NTP_4_2_7P266
+
+ ntpd/ntpd-opts.c@1.271 +4 -4
+ NTP_4_2_7P266
+
+ ntpd/ntpd-opts.h@1.271 +3 -3
+ NTP_4_2_7P266
+
+ ntpd/ntpd-opts.texi@1.269 +2 -2
+ NTP_4_2_7P266
+
+ ntpd/ntpd.1ntpdman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpd/ntpd.1ntpdmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpd/ntpd.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpd/ntpd.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc-opts.c@1.266 +4 -4
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc-opts.h@1.266 +3 -3
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc-opts.texi@1.266 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc.1ntpdcman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc.html@1.94 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpdc/ntpdc.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpq/ntpq-opts.c@1.268 +4 -4
+ NTP_4_2_7P266
+
+ ntpq/ntpq-opts.h@1.268 +3 -3
+ NTP_4_2_7P266
+
+ ntpq/ntpq-opts.texi@1.268 +2 -2
+ NTP_4_2_7P266
+
+ ntpq/ntpq.1ntpqman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpq/ntpq.1ntpqmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpq/ntpq.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpq/ntpq.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.268 +4 -4
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.268 +3 -3
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.268 +2 -2
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ packageinfo.sh@1.269 +1 -1
+ NTP_4_2_7P266
+
+ scripts/ntp-wait-opts.texi@1.86 +1 -1
+ NTP_4_2_7P266
+
+ scripts/ntp-wait.1ntp-waitman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ scripts/ntp-wait.html@1.86 +1 -1
+ NTP_4_2_7P266
+
+ scripts/ntp-wait.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ scripts/ntp-wait.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp-opts.c@1.264 +4 -4
+ NTP_4_2_7P266
+
+ sntp/sntp-opts.h@1.264 +3 -3
+ NTP_4_2_7P266
+
+ sntp/sntp-opts.texi@1.264 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp.1sntpman@1.84 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp.1sntpmdoc@1.84 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp.html@1.264 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp.man.in@1.84 +2 -2
+ NTP_4_2_7P266
+
+ sntp/sntp.mdoc.in@1.84 +2 -2
+ NTP_4_2_7P266
+
+ util/ntp-keygen-opts.c@1.268 +4 -4
+ NTP_4_2_7P266
+
+ util/ntp-keygen-opts.h@1.268 +3 -3
+ NTP_4_2_7P266
+
+ util/ntp-keygen-opts.texi@1.269 +2 -2
+ NTP_4_2_7P266
+
+ util/ntp-keygen.1ntp-keygenman@1.82 +2 -2
+ NTP_4_2_7P266
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.82 +2 -2
+ NTP_4_2_7P266
+
+ util/ntp-keygen.man.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ util/ntp-keygen.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P266
+
+ChangeSet@1.2762.1.38, 2012-03-21 05:23:41+00:00, hart@psp-os1.ntp.org
+ refclock_tsyncpci.c:
+ Change mode to -rw-rw-r--
+
+ ntpd/refclock_tsyncpci.c@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ntpd/refclock_tsyncpci.c@1.3 +0 -0
+ Change mode to -rw-r--r--
+
+ChangeSet@1.2762.1.36, 2012-03-21 03:04:51+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Include Linux-specific refclock_tsyncpci.c in --enable-all-clocks only
+ on Linux.
+ Clean up configure.ac m4 quoting, indents to match current style.
+
+ configure.ac@1.542 +18 -5
+ Include Linux-specific refclock_tsyncpci.c in --enable-all-clocks only
+ on Linux.
+ Clean up m4 quoting, indents to match current style.
+
+ ntpd/refclock_tsyncpci.c@1.2 +3 -1
+ protect sys/ioctl.h include with HAVE_SYS_IOCTL_H
+
+ChangeSet@1.2762.10.1, 2012-03-20 11:25:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P265
+ TAG: NTP_4_2_7P265
+
+ ChangeLog@1.1135.1.1 +1 -0
+ NTP_4_2_7P265
+
+ ntpd/ntpd-opts.c@1.270 +4 -4
+ NTP_4_2_7P265
+
+ ntpd/ntpd-opts.h@1.270 +3 -3
+ NTP_4_2_7P265
+
+ ntpd/ntpd-opts.texi@1.268 +2 -2
+ NTP_4_2_7P265
+
+ ntpd/ntpd.1ntpdman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpd/ntpd.1ntpdmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpd/ntpd.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpd/ntpd.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc-opts.c@1.265 +4 -4
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc-opts.h@1.265 +3 -3
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc-opts.texi@1.265 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc.1ntpdcman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc.html@1.93 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpdc/ntpdc.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpq/ntpq-opts.c@1.267 +4 -4
+ NTP_4_2_7P265
+
+ ntpq/ntpq-opts.h@1.267 +3 -3
+ NTP_4_2_7P265
+
+ ntpq/ntpq-opts.texi@1.267 +2 -2
+ NTP_4_2_7P265
+
+ ntpq/ntpq.1ntpqman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpq/ntpq.1ntpqmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpq/ntpq.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpq/ntpq.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.267 +4 -4
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.267 +3 -3
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.267 +2 -2
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ packageinfo.sh@1.268 +1 -1
+ NTP_4_2_7P265
+
+ scripts/ntp-wait-opts.texi@1.85 +1 -1
+ NTP_4_2_7P265
+
+ scripts/ntp-wait.1ntp-waitman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ scripts/ntp-wait.html@1.85 +1 -1
+ NTP_4_2_7P265
+
+ scripts/ntp-wait.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ scripts/ntp-wait.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp-opts.c@1.263 +4 -4
+ NTP_4_2_7P265
+
+ sntp/sntp-opts.h@1.263 +3 -3
+ NTP_4_2_7P265
+
+ sntp/sntp-opts.texi@1.263 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp.1sntpman@1.83 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp.1sntpmdoc@1.83 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp.html@1.263 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp.man.in@1.83 +2 -2
+ NTP_4_2_7P265
+
+ sntp/sntp.mdoc.in@1.83 +2 -2
+ NTP_4_2_7P265
+
+ util/ntp-keygen-opts.c@1.267 +4 -4
+ NTP_4_2_7P265
+
+ util/ntp-keygen-opts.h@1.267 +3 -3
+ NTP_4_2_7P265
+
+ util/ntp-keygen-opts.texi@1.268 +2 -2
+ NTP_4_2_7P265
+
+ util/ntp-keygen.1ntp-keygenman@1.81 +2 -2
+ NTP_4_2_7P265
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.81 +2 -2
+ NTP_4_2_7P265
+
+ util/ntp-keygen.man.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ util/ntp-keygen.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P265
+
+ChangeSet@1.2762.1.35, 2012-03-20 06:29:13+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Add reference to refclock_tsyncpci.c to ntpd.vcproj
+
+ ports/winnt/vs2005/ntpd.vcproj@1.17 +4 -0
+ Add reference to refclock_tsyncpci.c
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.43 +4 -0
+ Add reference to refclock_tsyncpci.c
+
+ChangeSet@1.2762.1.34, 2012-03-20 06:18:59+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz downloaded from
+ http://www.spectracomcorp.com/Support/HowCanWeHelpYou/Library/tabid/59/Default.aspx?EntryId=107
+ (see linux/ntp/tsync.patch)
+
+ ChangeLog@1.1136 +2 -0
+ david.sohn@spectracom.orolia.com
+
+ configure.ac@1.541 +11 -0
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ include/ntp.h@1.204 +2 -1
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ libntp/clocktypes.c@1.20 +2 -0
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ ntpd/Makefile.am@1.112.1.2 +1 -0
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ ntpd/ntp_control.c@1.180 +1 -0
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ ntpd/refclock_conf.c@1.32 +7 -1
+ Spectracom TSYNC reference clock driver from tsync.2.5.0.tar.gz
+
+ ntpd/refclock_tsyncpci.c@1.1 +926 -0
+ Via email from david.sohn@spectracom.orolia.com 19 Mar 2012
+
+ ntpd/refclock_tsyncpci.c@1.0 +0 -0
+
+ChangeSet@1.2762.1.33, 2012-03-20 06:03:15+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Treat zero counter as indication of precise system time in Windows
+ PPSAPI helper function pps_ntp_timestamp_from_counter(), enabling
+ PPSAPI providers to use the Windows 8 precise clock directly.
+
+ ChangeLog@1.1135 +3 -0
+ Treat zero counter as indication of precise system time in Windows
+ PPSAPI helper function pps_ntp_timestamp_from_counter(), enabling
+ PPSAPI providers to use the Windows 8 precise clock directly.
+
+ ports/winnt/include/clockstuff.h@1.13 +0 -9
+ Treat zero counter as indication of precise system time in Windows
+ PPSAPI helper function pps_ntp_timestamp_from_counter(), enabling
+ PPSAPI providers to use the Windows 8 precise clock directly.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.58 +6 -37
+ Treat zero counter as indication of precise system time in Windows
+ PPSAPI helper function pps_ntp_timestamp_from_counter(), enabling
+ PPSAPI providers to use the Windows 8 precise clock directly.
+
+ChangeSet@1.2762.1.32, 2012-03-14 07:58:25+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P264
+ TAG: NTP_4_2_7P264
+
+ ChangeLog@1.1134 +1 -0
+ NTP_4_2_7P264
+
+ ntpd/ntpd-opts.c@1.269 +4 -4
+ NTP_4_2_7P264
+
+ ntpd/ntpd-opts.h@1.269 +3 -3
+ NTP_4_2_7P264
+
+ ntpd/ntpd-opts.texi@1.267 +2 -2
+ NTP_4_2_7P264
+
+ ntpd/ntpd.1ntpdman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpd/ntpd.1ntpdmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpd/ntpd.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpd/ntpd.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc-opts.c@1.264 +4 -4
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc-opts.h@1.264 +3 -3
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc-opts.texi@1.264 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc.1ntpdcman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc.html@1.92 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpdc/ntpdc.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpq/ntpq-opts.c@1.266 +4 -4
+ NTP_4_2_7P264
+
+ ntpq/ntpq-opts.h@1.266 +3 -3
+ NTP_4_2_7P264
+
+ ntpq/ntpq-opts.texi@1.266 +2 -2
+ NTP_4_2_7P264
+
+ ntpq/ntpq.1ntpqman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpq/ntpq.1ntpqmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpq/ntpq.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpq/ntpq.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.266 +4 -4
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.266 +3 -3
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.266 +2 -2
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ packageinfo.sh@1.267 +1 -1
+ NTP_4_2_7P264
+
+ scripts/ntp-wait-opts.texi@1.84 +1 -1
+ NTP_4_2_7P264
+
+ scripts/ntp-wait.1ntp-waitman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ scripts/ntp-wait.html@1.84 +1 -1
+ NTP_4_2_7P264
+
+ scripts/ntp-wait.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ scripts/ntp-wait.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp-opts.c@1.262 +4 -4
+ NTP_4_2_7P264
+
+ sntp/sntp-opts.h@1.262 +3 -3
+ NTP_4_2_7P264
+
+ sntp/sntp-opts.texi@1.262 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp.1sntpman@1.82 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp.1sntpmdoc@1.82 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp.html@1.262 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp.man.in@1.82 +2 -2
+ NTP_4_2_7P264
+
+ sntp/sntp.mdoc.in@1.82 +2 -2
+ NTP_4_2_7P264
+
+ util/ntp-keygen-opts.c@1.266 +4 -4
+ NTP_4_2_7P264
+
+ util/ntp-keygen-opts.h@1.266 +3 -3
+ NTP_4_2_7P264
+
+ util/ntp-keygen-opts.texi@1.267 +2 -2
+ NTP_4_2_7P264
+
+ util/ntp-keygen.1ntp-keygenman@1.80 +2 -2
+ NTP_4_2_7P264
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.80 +2 -2
+ NTP_4_2_7P264
+
+ util/ntp-keygen.man.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ util/ntp-keygen.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P264
+
+ChangeSet@1.2762.1.31, 2012-03-13 09:31:09+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Quiet "DAY" redefinition warning compiling ntp-keygen.c
+
+ util/ntp-keygen.c@1.91 +0 -1
+ Quiet "DAY" redefinition warning.
+
+ChangeSet@1.2762.1.30, 2012-03-13 09:22:37+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2160] Note if leapseconds file is past its prime.
+
+ ChangeLog@1.1133 +1 -0
+ [Bug 2160] Note if leapseconds file is past its prime.
+
+ ntpd/ntp_util.c@1.97 +10 -3
+ [Bug 2160] Note if leapseconds file is past its prime.
+
+ChangeSet@1.2762.1.29, 2012-03-13 09:02:35+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ ChangeLog@1.1132 +1 -0
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ include/ntp_fp.h@1.30 +4 -0
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ libntp/systime.c@1.65 +1 -0
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ ports/winnt/include/clockstuff.h@1.12 +2 -1
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ ports/winnt/include/sys/time.h@1.8 +1 -0
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ ports/winnt/libntp/getclock.c@1.4 +20 -8
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.57 +74 -49
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ util/ntp-keygen.c@1.90 +1 -1
+ Use GetSystemTimePreciseAsFileTime() on Windows 8.
+
+ChangeSet@1.2762.1.28, 2012-03-13 03:57:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P263
+ TAG: NTP_4_2_7P263
+
+ ChangeLog@1.1131 +1 -0
+ NTP_4_2_7P263
+
+ ntpd/ntpd-opts.c@1.268 +4 -4
+ NTP_4_2_7P263
+
+ ntpd/ntpd-opts.h@1.268 +3 -3
+ NTP_4_2_7P263
+
+ ntpd/ntpd-opts.texi@1.266 +2 -2
+ NTP_4_2_7P263
+
+ ntpd/ntpd.1ntpdman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpd/ntpd.1ntpdmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpd/ntpd.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpd/ntpd.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc-opts.c@1.263 +4 -4
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc-opts.h@1.263 +3 -3
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc-opts.texi@1.263 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc.1ntpdcman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc.html@1.91 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpdc/ntpdc.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpq/ntpq-opts.c@1.265 +4 -4
+ NTP_4_2_7P263
+
+ ntpq/ntpq-opts.h@1.265 +3 -3
+ NTP_4_2_7P263
+
+ ntpq/ntpq-opts.texi@1.265 +2 -2
+ NTP_4_2_7P263
+
+ ntpq/ntpq.1ntpqman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpq/ntpq.1ntpqmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpq/ntpq.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpq/ntpq.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.265 +4 -4
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.265 +3 -3
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.265 +2 -2
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ packageinfo.sh@1.266 +1 -1
+ NTP_4_2_7P263
+
+ scripts/ntp-wait-opts.texi@1.83 +2 -14
+ NTP_4_2_7P263
+
+ scripts/ntp-wait.1ntp-waitman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ scripts/ntp-wait.html@1.83 +2 -14
+ NTP_4_2_7P263
+
+ scripts/ntp-wait.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ scripts/ntp-wait.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp-opts.c@1.261 +4 -4
+ NTP_4_2_7P263
+
+ sntp/sntp-opts.h@1.261 +3 -3
+ NTP_4_2_7P263
+
+ sntp/sntp-opts.texi@1.261 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp.1sntpman@1.81 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp.1sntpmdoc@1.81 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp.html@1.261 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp.man.in@1.81 +2 -2
+ NTP_4_2_7P263
+
+ sntp/sntp.mdoc.in@1.81 +2 -2
+ NTP_4_2_7P263
+
+ util/ntp-keygen-opts.c@1.265 +4 -4
+ NTP_4_2_7P263
+
+ util/ntp-keygen-opts.h@1.265 +3 -3
+ NTP_4_2_7P263
+
+ util/ntp-keygen-opts.texi@1.266 +2 -2
+ NTP_4_2_7P263
+
+ util/ntp-keygen.1ntp-keygenman@1.79 +2 -2
+ NTP_4_2_7P263
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.79 +2 -2
+ NTP_4_2_7P263
+
+ util/ntp-keygen.man.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ util/ntp-keygen.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P263
+
+ChangeSet@1.2762.1.27, 2012-03-11 07:10:54+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+
+ ChangeLog@1.1130 +1 -0
+ [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+
+ include/ntp_stdlib.h@1.72 +4 -0
+ [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+
+ ntpd/ntp_timer.c@1.68 +0 -4
+ [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.56 +4 -3
+ [Bug 2159] Windows ntpd using leapfile erroneous leap second 20120401.
+
+ChangeSet@1.2762.1.26, 2012-03-10 17:27:45+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2156] clock instability with LOCAL driver, from Miroslav Lichvar.
+
+ ChangeLog@1.1129 +1 -0
+ [Bug 2156] clock instability with LOCAL driver, from Miroslav Lichvar.
+
+ ntpd/ntp_proto.c@1.340 +1 -1
+ [Bug 2156] clock instability with LOCAL driver, from Miroslav Lichvar.
+
+ChangeSet@1.2082.4.263, 2012-03-10 04:49:48-05:00, stenn@deacon.udel.edu
+ Update 2mirror trigger to copy directly to bk2
+
+ BitKeeper/triggers/2mirrors@1.7.1.1 +5 -3
+ Update 2mirror trigger to copy directly to bk2
+
+ChangeSet@1.2762.1.24, 2012-02-29 01:27:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P262
+ TAG: NTP_4_2_7P262
+
+ ChangeLog@1.1128 +1 -0
+ NTP_4_2_7P262
+
+ ntpd/ntpd-opts.c@1.267 +4 -4
+ NTP_4_2_7P262
+
+ ntpd/ntpd-opts.h@1.267 +3 -3
+ NTP_4_2_7P262
+
+ ntpd/ntpd-opts.texi@1.265 +2 -2
+ NTP_4_2_7P262
+
+ ntpd/ntpd.1ntpdman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpd/ntpd.1ntpdmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpd/ntpd.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpd/ntpd.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc-opts.c@1.262 +4 -4
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc-opts.h@1.262 +3 -3
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc-opts.texi@1.262 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc.1ntpdcman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc.html@1.90 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpdc/ntpdc.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpq/ntpq-opts.c@1.264 +4 -4
+ NTP_4_2_7P262
+
+ ntpq/ntpq-opts.h@1.264 +3 -3
+ NTP_4_2_7P262
+
+ ntpq/ntpq-opts.texi@1.264 +2 -2
+ NTP_4_2_7P262
+
+ ntpq/ntpq.1ntpqman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpq/ntpq.1ntpqmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpq/ntpq.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpq/ntpq.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.264 +4 -4
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.264 +3 -3
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.264 +2 -2
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ packageinfo.sh@1.265 +1 -1
+ NTP_4_2_7P262
+
+ scripts/ntp-wait-opts.texi@1.82 +1 -1
+ NTP_4_2_7P262
+
+ scripts/ntp-wait.1ntp-waitman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ scripts/ntp-wait.html@1.82 +1 -1
+ NTP_4_2_7P262
+
+ scripts/ntp-wait.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ scripts/ntp-wait.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp-opts.c@1.260 +4 -4
+ NTP_4_2_7P262
+
+ sntp/sntp-opts.h@1.260 +3 -3
+ NTP_4_2_7P262
+
+ sntp/sntp-opts.texi@1.260 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp.1sntpman@1.80 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp.1sntpmdoc@1.80 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp.html@1.260 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp.man.in@1.80 +2 -2
+ NTP_4_2_7P262
+
+ sntp/sntp.mdoc.in@1.80 +2 -2
+ NTP_4_2_7P262
+
+ util/ntp-keygen-opts.c@1.264 +4 -4
+ NTP_4_2_7P262
+
+ util/ntp-keygen-opts.h@1.264 +3 -3
+ NTP_4_2_7P262
+
+ util/ntp-keygen-opts.texi@1.265 +2 -2
+ NTP_4_2_7P262
+
+ util/ntp-keygen.1ntp-keygenman@1.78 +2 -2
+ NTP_4_2_7P262
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.78 +2 -2
+ NTP_4_2_7P262
+
+ util/ntp-keygen.man.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ util/ntp-keygen.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P262
+
+ChangeSet@1.2762.1.23, 2012-02-28 20:27:35-05:00, stenn@deacon.udel.edu
+ Add missing library to ntpsnmpd build
+
+ ntpsnmpd/Makefile.am@1.34 +1 -1
+ Add missing library to ntpsnmpd build
+
+ChangeSet@1.2762.9.1, 2012-02-28 04:42:34-05:00, stenn@deacon.udel.edu
+ Disable bkbits as a mirror for now
+
+ BitKeeper/triggers/2mirrors@1.8 +3 -1
+ Disable bkbits as a mirror for now
+
+ChangeSet@1.2762.1.21, 2012-02-27 23:05:11+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Improve ntpd scalability for servers with many trusted keys.
+
+ ChangeLog@1.1127 +1 -0
+ Improve ntpd scalability for servers with many trusted keys.
+
+ include/ntp_stdlib.h@1.71 +6 -4
+ Improve ntpd scalability for servers with many trusted keys.
+
+ libntp/a_md5encrypt.c@1.32 +3 -3
+ Improve ntpd scalability for servers with many trusted keys.
+
+ libntp/authkeys.c@1.23 +410 -257
+ Improve ntpd scalability for servers with many trusted keys.
+
+ ntpd/ntp_config.c@1.298 +43 -9
+ Improve ntpd scalability for servers with many trusted keys.
+
+ ntpdc/ntpdc.c@1.99 +1 -0
+ Use init_auth() before other symmetric key routines.
+
+ ntpq/ntpq.c@1.145 +1 -0
+ Use init_auth() before other symmetric key routines.
+
+ sntp/main.c@1.82 +2 -0
+ Use init_auth() before other symmetric key routines.
+
+ sntp/tests_main.cpp@1.8 +1 -0
+ Use init_auth() before other symmetric key routines.
+
+ tests/libntp/a_md5encrypt.cpp@1.5 +4 -4
+ Improve ntpd scalability for servers with many trusted keys.
+
+ tests/libntp/authkeys.cpp@1.7 +7 -11
+ Improve ntpd scalability for servers with many trusted keys.
+
+ChangeSet@1.2762.1.20, 2012-02-27 11:45:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P261
+ TAG: NTP_4_2_7P261
+
+ ChangeLog@1.1126 +1 -0
+ NTP_4_2_7P261
+
+ ntpd/ntpd-opts.c@1.266 +4 -4
+ NTP_4_2_7P261
+
+ ntpd/ntpd-opts.h@1.266 +3 -3
+ NTP_4_2_7P261
+
+ ntpd/ntpd-opts.texi@1.264 +2 -2
+ NTP_4_2_7P261
+
+ ntpd/ntpd.1ntpdman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpd/ntpd.1ntpdmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpd/ntpd.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpd/ntpd.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc-opts.c@1.261 +4 -4
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc-opts.h@1.261 +3 -3
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc-opts.texi@1.261 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc.1ntpdcman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc.html@1.89 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpdc/ntpdc.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpq/ntpq-opts.c@1.263 +4 -4
+ NTP_4_2_7P261
+
+ ntpq/ntpq-opts.h@1.263 +3 -3
+ NTP_4_2_7P261
+
+ ntpq/ntpq-opts.texi@1.263 +2 -2
+ NTP_4_2_7P261
+
+ ntpq/ntpq.1ntpqman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpq/ntpq.1ntpqmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpq/ntpq.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpq/ntpq.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.263 +4 -4
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.263 +3 -3
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.263 +2 -2
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ packageinfo.sh@1.264 +1 -1
+ NTP_4_2_7P261
+
+ scripts/ntp-wait-opts.texi@1.81 +1 -1
+ NTP_4_2_7P261
+
+ scripts/ntp-wait.1ntp-waitman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ scripts/ntp-wait.html@1.81 +1 -1
+ NTP_4_2_7P261
+
+ scripts/ntp-wait.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ scripts/ntp-wait.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp-opts.c@1.259 +4 -4
+ NTP_4_2_7P261
+
+ sntp/sntp-opts.h@1.259 +3 -3
+ NTP_4_2_7P261
+
+ sntp/sntp-opts.texi@1.259 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp.1sntpman@1.79 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp.1sntpmdoc@1.79 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp.html@1.259 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp.man.in@1.79 +2 -2
+ NTP_4_2_7P261
+
+ sntp/sntp.mdoc.in@1.79 +2 -2
+ NTP_4_2_7P261
+
+ util/ntp-keygen-opts.c@1.263 +4 -4
+ NTP_4_2_7P261
+
+ util/ntp-keygen-opts.h@1.263 +3 -3
+ NTP_4_2_7P261
+
+ util/ntp-keygen-opts.texi@1.264 +2 -2
+ NTP_4_2_7P261
+
+ util/ntp-keygen.1ntp-keygenman@1.77 +2 -2
+ NTP_4_2_7P261
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.77 +2 -2
+ NTP_4_2_7P261
+
+ util/ntp-keygen.man.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ util/ntp-keygen.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P261
+
+ChangeSet@1.2762.7.3, 2012-02-27 06:45:32+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.15
+
+ ChangeLog@1.1123.1.2 +1 -0
+ Upgrade to autogen-5.15
+
+ sntp/include/autogen-version.def@1.10 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/COPYING.gplv3@1.5 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/COPYING.lgplv3@1.5 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/Makefile.am@1.12 +5 -4
+ Upgrade to autogen-5.15
+
+ sntp/libopts/README@1.7 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/ag-char-map.h@1.15 +132 -102
+ Upgrade to autogen-5.15
+
+ sntp/libopts/alias.c@1.1 +108 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/libopts/alias.c
+
+ sntp/libopts/alias.c@1.0 +0 -0
+
+ sntp/libopts/ao-strs.c@1.1 +323 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-autogen/sntp/libopts/ao-strs.c
+
+ sntp/libopts/ao-strs.c@1.0 +0 -0
+
+ sntp/libopts/autoopts.c@1.12 +14 -14
+ Upgrade to autogen-5.15
+
+ sntp/libopts/autoopts.h@1.10 +5 -3
+ Upgrade to autogen-5.15
+
+ sntp/libopts/autoopts/options.h@1.14 +31 -19
+ Upgrade to autogen-5.15
+
+ sntp/libopts/autoopts/usage-txt.h@1.14 +168 -170
+ Upgrade to autogen-5.15
+
+ sntp/libopts/boolean.c@1.8 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/check.c@1.2 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/compat/compat.h@1.8 +5 -3
+ Upgrade to autogen-5.15
+
+ sntp/libopts/compat/windows-config.h@1.8 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/configfile.c@1.13 +16 -14
+ Upgrade to autogen-5.15
+
+ sntp/libopts/cook.c@1.9 +12 -12
+ Upgrade to autogen-5.15
+
+ sntp/libopts/enum.c@1.2 +31 -36
+ Upgrade to autogen-5.15
+
+ sntp/libopts/env.c@1.2 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/file.c@1.10 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/find.c@1.2 +36 -38
+ Upgrade to autogen-5.15
+
+ sntp/libopts/genshell.c@1.15 +25 -19
+ Upgrade to autogen-5.15
+
+ sntp/libopts/genshell.h@1.15 +4 -4
+ Upgrade to autogen-5.15
+
+ sntp/libopts/libopts.c@1.5 +7 -3
+ Upgrade to autogen-5.15
+
+ sntp/libopts/load.c@1.11 +10 -11
+ Upgrade to autogen-5.15
+
+ sntp/libopts/m4/libopts.m4@1.18 +30 -30
+ Upgrade to autogen-5.15
+
+ sntp/libopts/m4/liboptschk.m4@1.9 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/makeshell.c@1.10 +124 -436
+ Upgrade to autogen-5.15
+
+ sntp/libopts/nested.c@1.8 +65 -40
+ Upgrade to autogen-5.15
+
+ sntp/libopts/numeric.c@1.9 +9 -13
+ Upgrade to autogen-5.15
+
+ sntp/libopts/parse-duration.c@1.6 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/parse-duration.h@1.6 +2 -2
+ Upgrade to autogen-5.15
+
+ sntp/libopts/pgusage.c@1.9 +8 -9
+ Upgrade to autogen-5.15
+
+ sntp/libopts/proto.h@1.15 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/putshell.c@1.8 +21 -34
+ Upgrade to autogen-5.15
+
+ sntp/libopts/reset.c@1.9 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/restore.c@1.8 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/save.c@1.10 +82 -98
+ Upgrade to autogen-5.15
+
+ sntp/libopts/sort.c@1.9 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/stack.c@1.8 +6 -6
+ Upgrade to autogen-5.15
+
+ sntp/libopts/streqvcmp.c@1.8 +6 -6
+ Upgrade to autogen-5.15
+
+ sntp/libopts/text_mmap.c@1.10 +2 -2
+ Upgrade to autogen-5.15
+
+ sntp/libopts/time.c@1.9 +3 -3
+ Upgrade to autogen-5.15
+
+ sntp/libopts/tokenize.c@1.6 +5 -5
+ Upgrade to autogen-5.15
+
+ sntp/libopts/usage.c@1.10 +9 -9
+ Upgrade to autogen-5.15
+
+ sntp/libopts/value-type.h@1.15 +1 -1
+ Upgrade to autogen-5.15
+
+ sntp/libopts/version.c@1.10 +25 -10
+ Upgrade to autogen-5.15
+
+ sntp/libopts/xat-attribute.h@1.15 +1 -1
+ Upgrade to autogen-5.15
+
+ChangeSet@1.2762.7.1, 2012-02-24 11:36:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P260
+ TAG: NTP_4_2_7P260
+
+ ChangeLog@1.1123.1.1 +1 -0
+ NTP_4_2_7P260
+
+ ntpd/ntpd-opts.c@1.265 +4 -4
+ NTP_4_2_7P260
+
+ ntpd/ntpd-opts.h@1.265 +3 -3
+ NTP_4_2_7P260
+
+ ntpd/ntpd-opts.texi@1.263 +2 -2
+ NTP_4_2_7P260
+
+ ntpd/ntpd.1ntpdman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpd/ntpd.1ntpdmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpd/ntpd.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpd/ntpd.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc-opts.c@1.260 +4 -4
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc-opts.h@1.260 +3 -3
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc-opts.texi@1.260 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc.1ntpdcman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc.html@1.88 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpdc/ntpdc.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpq/ntpq-opts.c@1.262 +4 -4
+ NTP_4_2_7P260
+
+ ntpq/ntpq-opts.h@1.262 +3 -3
+ NTP_4_2_7P260
+
+ ntpq/ntpq-opts.texi@1.262 +2 -2
+ NTP_4_2_7P260
+
+ ntpq/ntpq.1ntpqman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpq/ntpq.1ntpqmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpq/ntpq.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpq/ntpq.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.262 +4 -4
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.262 +3 -3
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.262 +2 -2
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ packageinfo.sh@1.263 +1 -1
+ NTP_4_2_7P260
+
+ scripts/ntp-wait-opts.texi@1.80 +1 -1
+ NTP_4_2_7P260
+
+ scripts/ntp-wait.1ntp-waitman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ scripts/ntp-wait.html@1.80 +1 -1
+ NTP_4_2_7P260
+
+ scripts/ntp-wait.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ scripts/ntp-wait.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp-opts.c@1.258 +4 -4
+ NTP_4_2_7P260
+
+ sntp/sntp-opts.h@1.258 +3 -3
+ NTP_4_2_7P260
+
+ sntp/sntp-opts.texi@1.258 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp.1sntpman@1.78 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp.1sntpmdoc@1.78 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp.html@1.258 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp.man.in@1.78 +2 -2
+ NTP_4_2_7P260
+
+ sntp/sntp.mdoc.in@1.78 +2 -2
+ NTP_4_2_7P260
+
+ util/ntp-keygen-opts.c@1.262 +4 -4
+ NTP_4_2_7P260
+
+ util/ntp-keygen-opts.h@1.262 +3 -3
+ NTP_4_2_7P260
+
+ util/ntp-keygen-opts.texi@1.263 +2 -2
+ NTP_4_2_7P260
+
+ util/ntp-keygen.1ntp-keygenman@1.76 +2 -2
+ NTP_4_2_7P260
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.76 +2 -2
+ NTP_4_2_7P260
+
+ util/ntp-keygen.man.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ util/ntp-keygen.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P260
+
+ChangeSet@1.2762.1.18, 2012-02-24 08:07:56+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2048] add the clock variable timecode to SHM refclock.
+ Thanks to Michael Tatarinov.
+
+ ChangeLog@1.1124 +1 -0
+ [Bug 2048] add the clock variable timecode to SHM refclock.
+
+ ntpd/refclock_shm.c@1.24 +16 -6
+ [Bug 2048] add the clock variable timecode to SHM refclock.
+
+ChangeSet@1.2762.1.17, 2012-02-23 18:16:42-05:00, stenn@deacon.udel.edu
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ ChangeLog@1.1123 +1 -0
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ ntpd/Makefile.am@1.112.1.1 +1 -1
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ ntpdate/Makefile.am@1.34 +1 -1
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ ntpdc/Makefile.am@1.70 +1 -1
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ ntpq/Makefile.am@1.66 +1 -1
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ util/Makefile.am@1.70 +1 -1
+ Fix the check-scm-rev invocation in several Makefile.am's.
+
+ChangeSet@1.2762.1.16, 2012-02-22 05:59:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P259
+ TAG: NTP_4_2_7P259
+
+ ChangeLog@1.1122 +1 -0
+ NTP_4_2_7P259
+
+ ntpd/ntpd-opts.c@1.264 +4 -4
+ NTP_4_2_7P259
+
+ ntpd/ntpd-opts.h@1.264 +3 -3
+ NTP_4_2_7P259
+
+ ntpd/ntpd-opts.texi@1.262 +2 -2
+ NTP_4_2_7P259
+
+ ntpd/ntpd.1ntpdman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpd/ntpd.1ntpdmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpd/ntpd.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpd/ntpd.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc-opts.c@1.259 +4 -4
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc-opts.h@1.259 +3 -3
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc-opts.texi@1.259 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc.1ntpdcman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc.html@1.87 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpdc/ntpdc.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpq/ntpq-opts.c@1.261 +4 -4
+ NTP_4_2_7P259
+
+ ntpq/ntpq-opts.h@1.261 +3 -3
+ NTP_4_2_7P259
+
+ ntpq/ntpq-opts.texi@1.261 +2 -2
+ NTP_4_2_7P259
+
+ ntpq/ntpq.1ntpqman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpq/ntpq.1ntpqmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpq/ntpq.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpq/ntpq.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.261 +4 -4
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.261 +3 -3
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.261 +2 -2
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ packageinfo.sh@1.262 +1 -1
+ NTP_4_2_7P259
+
+ scripts/ntp-wait-opts.texi@1.79 +1 -1
+ NTP_4_2_7P259
+
+ scripts/ntp-wait.1ntp-waitman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ scripts/ntp-wait.html@1.79 +1 -1
+ NTP_4_2_7P259
+
+ scripts/ntp-wait.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ scripts/ntp-wait.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp-opts.c@1.257 +4 -4
+ NTP_4_2_7P259
+
+ sntp/sntp-opts.h@1.257 +3 -3
+ NTP_4_2_7P259
+
+ sntp/sntp-opts.texi@1.257 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp.1sntpman@1.77 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp.1sntpmdoc@1.77 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp.html@1.257 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp.man.in@1.77 +2 -2
+ NTP_4_2_7P259
+
+ sntp/sntp.mdoc.in@1.77 +2 -2
+ NTP_4_2_7P259
+
+ util/ntp-keygen-opts.c@1.261 +4 -4
+ NTP_4_2_7P259
+
+ util/ntp-keygen-opts.h@1.261 +3 -3
+ NTP_4_2_7P259
+
+ util/ntp-keygen-opts.texi@1.262 +2 -2
+ NTP_4_2_7P259
+
+ util/ntp-keygen.1ntp-keygenman@1.75 +2 -2
+ NTP_4_2_7P259
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.75 +2 -2
+ NTP_4_2_7P259
+
+ util/ntp-keygen.man.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ util/ntp-keygen.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P259
+
+ChangeSet@1.2762.1.15, 2012-02-22 05:05:04+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2148] ntpd 4.2.7p258 segfault with 0x0100000 bit in NMEA mode.
+ refclock_nmea.c merge cleanup thanks to Juergen Perlinger.
+ Use mutex with Lamport checks in get_systime() on Windows, which
+ unlike portable ntpd uses the routine across threads.
+
+ ChangeLog@1.1121 +2 -0
+ [Bug 2148] ntpd 4.2.7p258 segfault with 0x0100000 bit in NMEA mode.
+ refclock_nmea.c merge cleanup thanks to Juergen Perlinger.
+
+ include/ntp_assert.h@1.7 +4 -4
+ Do not evaluate expression for compiled-out DEBUG_INSIST() and other
+ DEBUG_*() assertions.
+
+ include/ntp_fp.h@1.29 +30 -0
+ Make recent fuzz Lamport checks in get_systime() safe on Windows ntpd,
+ which invokes get_systime() on independent threads with mutex.
+
+ libntp/lib_strbuf.c@1.10 +5 -0
+ Make recent fuzz Lamport checks in get_systime() safe on Windows ntpd,
+ which invokes get_systime() on independent threads with mutex.
+
+ libntp/systime.c@1.64 +26 -2
+ Make recent fuzz Lamport checks in get_systime() safe on Windows ntpd,
+ which invokes get_systime() on independent threads with mutex.
+
+ ntpd/ntp_control.c@1.179 +7 -1
+ [Bug 2148] ntpd 4.2.7p258 segfault with 0x0100000 bit in NMEA mode.
+
+ ntpd/ntp_refclock.c@1.115 +3 -1
+ p257 change requires reflective change to debug trace code to avoid
+ unprintable spew.
+
+ ntpd/ntpd.c@1.130 +1 -1
+ init_lib() calls init_systime() which needs to happen before get_systime()
+
+ ntpd/refclock_nmea.c@1.70 +0 -13
+ merge cleanup of Dave's merge, courtesy Juergen OOB
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.66 +1 -1
+ debug trace of user PPS hack treated DCD timestamp as signed.
+
+ sntp/tests_main.cpp@1.7 +2 -0
+ Call libntp's init_lib() early in unit tests.
+
+ sntp/tests_main.h@1.8 +3 -0
+ ntp_stdlib.h for init_lib()
+
+ChangeSet@1.2762.1.14, 2012-02-21 04:53:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P258
+ TAG: NTP_4_2_7P258
+
+ ChangeLog@1.1120 +1 -0
+ NTP_4_2_7P258
+
+ ntpd/ntpd-opts.c@1.263 +4 -4
+ NTP_4_2_7P258
+
+ ntpd/ntpd-opts.h@1.263 +3 -3
+ NTP_4_2_7P258
+
+ ntpd/ntpd-opts.texi@1.261 +2 -2
+ NTP_4_2_7P258
+
+ ntpd/ntpd.1ntpdman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpd/ntpd.1ntpdmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpd/ntpd.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpd/ntpd.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc-opts.c@1.258 +4 -4
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc-opts.h@1.258 +3 -3
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc-opts.texi@1.258 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc.1ntpdcman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc.html@1.86 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpdc/ntpdc.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpq/ntpq-opts.c@1.260 +4 -4
+ NTP_4_2_7P258
+
+ ntpq/ntpq-opts.h@1.260 +3 -3
+ NTP_4_2_7P258
+
+ ntpq/ntpq-opts.texi@1.260 +2 -2
+ NTP_4_2_7P258
+
+ ntpq/ntpq.1ntpqman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpq/ntpq.1ntpqmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpq/ntpq.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpq/ntpq.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.260 +4 -4
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.260 +3 -3
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.260 +2 -2
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ packageinfo.sh@1.261 +1 -1
+ NTP_4_2_7P258
+
+ scripts/ntp-wait-opts.texi@1.78 +1 -1
+ NTP_4_2_7P258
+
+ scripts/ntp-wait.1ntp-waitman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ scripts/ntp-wait.html@1.78 +1 -1
+ NTP_4_2_7P258
+
+ scripts/ntp-wait.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ scripts/ntp-wait.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp-opts.c@1.256 +4 -4
+ NTP_4_2_7P258
+
+ sntp/sntp-opts.h@1.256 +3 -3
+ NTP_4_2_7P258
+
+ sntp/sntp-opts.texi@1.256 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp.1sntpman@1.76 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp.1sntpmdoc@1.76 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp.html@1.256 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp.man.in@1.76 +2 -2
+ NTP_4_2_7P258
+
+ sntp/sntp.mdoc.in@1.76 +2 -2
+ NTP_4_2_7P258
+
+ util/ntp-keygen-opts.c@1.260 +4 -4
+ NTP_4_2_7P258
+
+ util/ntp-keygen-opts.h@1.260 +3 -3
+ NTP_4_2_7P258
+
+ util/ntp-keygen-opts.texi@1.261 +2 -2
+ NTP_4_2_7P258
+
+ util/ntp-keygen.1ntp-keygenman@1.74 +2 -2
+ NTP_4_2_7P258
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.74 +2 -2
+ NTP_4_2_7P258
+
+ util/ntp-keygen.man.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ util/ntp-keygen.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P258
+
+ChangeSet@1.2762.1.13, 2012-02-21 02:43:49+00:00, hart@psp-os1.ntp.org
+ refclock_nmea.c:
+ add newline to EOF
+
+ ntpd/refclock_nmea.c@1.69 +1 -1
+ add newline to EOF
+
+ChangeSet@1.2762.6.1, 2012-02-21 01:26:03+01:00, jnperlin@hydra.localnet
+ [bug 2143] discard data if quality indication not good to avoid glitches
+ add stat counters for diagnostics (mode bit enabled) to clockstats file
+
+ ChangeLog@1.1116.2.1 +2 -0
+ [bug 2143] discard data if quality indication not good to avoid glitches
+ add stat counters for diagnostics (mode bit enabled) to clockstats file
+
+ ntpd/refclock_nmea.c@1.65.1.1 +63 -12
+ [bug 2143] discard data if quality indication not good to avoid glitches
+ add stat counters for diagnostics (mode bit enabled) to clockstats file
+
+ChangeSet@1.2762.4.2, 2012-02-20 22:16:37+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2143] NMEA 4.2.7p204 uses timecodes indicating lost reception.
+ Increase detail in clockstats for NMEA driver (from Hal Murray).
+
+ ChangeLog@1.1116.1.1 +2 -0
+ [Bug 2143] NMEA 4.2.7p204 uses timecodes indicating lost reception.
+ Increase detail in clockstats for NMEA driver (from Hal Murray).
+
+ ntpd/refclock_nmea.c@1.67 +39 -6
+ Increase detail in clockstats for NMEA driver (from Hal Murray).
+
+
+ChangeSet@1.2762.1.10, 2012-02-19 16:30:28+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ fix user-mode PPS end of line timestamp, and use wait I/O
+ completion timestamp not read completion.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.65 +5 -2
+ fix user-mode PPS end of line timestamp, and use wait I/O
+ completion timestamp not read completion.
+
+ChangeSet@1.2762.5.1, 2012-02-19 16:06:38+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Minor nonfunctional refclock_nmea.c cleanup while hunting bug.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.62.1.1 +74 -54
+ Minor nonfunctional cleanup while hunting bug.
+
+ChangeSet@1.2762.1.8, 2012-02-19 16:10:00+01:00, jnperlin@hydra.localnet
+ hack to get rid of leading CR/LF and keep timestamp for the whole buffer
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.63 +16 -6
+ hack to get rid of leading CR/LF and keep timestamp for the whole buffer
+
+ChangeSet@1.2762.4.1, 2012-02-19 09:29:05+01:00, jnperlin@hydra.localnet
+ [bug 2143] do not process data if quality indication says 'not good' to avoid glitches
+
+ ntpd/refclock_nmea.c@1.66 +6 -1
+ [bug 2143] do not process data if quality indication says 'not good' to avoid glitches
+
+ChangeSet@1.2762.1.7, 2012-02-18 02:41:22+01:00, jnperlin@hydra.localnet
+ [Bug 2140] Rework of Windows I/O completion port handling to avoid garbling serial input in UNIX line discipline emulation.
+
+ ChangeLog@1.1117 +2 -0
+ [Bug 2140] Rework of Windows I/O completion port handling to avoid garbling serial input in UNIX line discipline emulation.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.62 +775 -598
+ [Bug 2140] Rework of Windows I/O completion port handling to avoid garbling serial input in UNIX line discipline emulation.
+
+ChangeSet@1.2762.1.6, 2012-02-17 05:52:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P257
+ TAG: NTP_4_2_7P257
+
+ ChangeLog@1.1116 +1 -0
+ NTP_4_2_7P257
+
+ ntpd/ntpd-opts.c@1.262 +4 -4
+ NTP_4_2_7P257
+
+ ntpd/ntpd-opts.h@1.262 +3 -3
+ NTP_4_2_7P257
+
+ ntpd/ntpd-opts.texi@1.260 +2 -2
+ NTP_4_2_7P257
+
+ ntpd/ntpd.1ntpdman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpd/ntpd.1ntpdmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpd/ntpd.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpd/ntpd.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc-opts.c@1.257 +4 -4
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc-opts.h@1.257 +3 -3
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc-opts.texi@1.257 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc.1ntpdcman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc.html@1.85 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpdc/ntpdc.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpq/ntpq-opts.c@1.259 +4 -4
+ NTP_4_2_7P257
+
+ ntpq/ntpq-opts.h@1.259 +3 -3
+ NTP_4_2_7P257
+
+ ntpq/ntpq-opts.texi@1.259 +2 -2
+ NTP_4_2_7P257
+
+ ntpq/ntpq.1ntpqman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpq/ntpq.1ntpqmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpq/ntpq.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpq/ntpq.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.259 +4 -4
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.259 +3 -3
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.259 +2 -2
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ packageinfo.sh@1.260 +1 -1
+ NTP_4_2_7P257
+
+ scripts/ntp-wait-opts.texi@1.77 +1 -1
+ NTP_4_2_7P257
+
+ scripts/ntp-wait.1ntp-waitman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ scripts/ntp-wait.html@1.77 +1 -1
+ NTP_4_2_7P257
+
+ scripts/ntp-wait.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ scripts/ntp-wait.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp-opts.c@1.255 +4 -4
+ NTP_4_2_7P257
+
+ sntp/sntp-opts.h@1.255 +3 -3
+ NTP_4_2_7P257
+
+ sntp/sntp-opts.texi@1.255 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp.1sntpman@1.75 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp.1sntpmdoc@1.75 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp.html@1.255 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp.man.in@1.75 +2 -2
+ NTP_4_2_7P257
+
+ sntp/sntp.mdoc.in@1.75 +2 -2
+ NTP_4_2_7P257
+
+ util/ntp-keygen-opts.c@1.259 +4 -4
+ NTP_4_2_7P257
+
+ util/ntp-keygen-opts.h@1.259 +3 -3
+ NTP_4_2_7P257
+
+ util/ntp-keygen-opts.texi@1.260 +2 -2
+ NTP_4_2_7P257
+
+ util/ntp-keygen.1ntp-keygenman@1.73 +2 -2
+ NTP_4_2_7P257
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.73 +2 -2
+ NTP_4_2_7P257
+
+ util/ntp-keygen.man.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ util/ntp-keygen.mdoc.in@1.73 +2 -2
+ NTP_4_2_7P257
+
+ChangeSet@1.2762.1.5, 2012-02-15 02:48:49+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Restore accidentally-removed "parsetime" local variable declaration
+ in refclock_parse.c stream_receive().
+ Remove Windows-specific code from indicate_refclock_packet() as it is
+ now used only on non-Windows systems.
+ process_refclock_packet() is used only on Windows, #ifdef away elsewhere.
+
+ ntpd/ntp_refclock.c@1.114 +3 -3
+ Remove Windows-specific code from indicate_refclock_packet() as it is
+ now used only on non-Windows systems.
+ process_refclock_packet() is used only on Windows, #ifdef away elsewhere.
+
+
+ ntpd/refclock_parse.c@1.66 +1 -0
+ Restore accidentally-removed "parsetime" local variable declaration
+ in refclock_parse.c stream_receive().
+
+ChangeSet@1.2762.2.1, 2012-02-09 23:18:03+01:00, jnperlin@hydra.localnet
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+
+ ChangeLog@1.1111.1.1 +1 -0
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+
+ include/ntp_refclock.h@1.35 +1 -0
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+ * add prototype for 'process_refclock_packet()'
+
+ ntpd/ntp_refclock.c@1.111.1.1 +65 -32
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+ * implement 'process_refclock_packet()'
+ * cleanup 'refclock_gtlin()' and refclock_gtraw()'
+
+ ntpd/refclock_msfees.c@1.17 +2 -2
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+ * fix 'io.srcclock' mangling -- this should be the peer. Use the unit ptr to get the unit.
+
+ ntpd/refclock_parse.c@1.65 +8 -5
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+ * fix 'io.srcclock' mangling -- this should be the peer. Use the unit ptr to get the unit.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.61 +7 -14
+ [Bug 2135] defer calls to 'io_input' to main thread under Windows
+
+ChangeSet@1.2762.1.3, 2012-02-08 08:33:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P256
+ TAG: NTP_4_2_7P256
+
+ ChangeLog@1.1114 +1 -0
+ NTP_4_2_7P256
+
+ ntpd/ntpd-opts.c@1.261 +4 -4
+ NTP_4_2_7P256
+
+ ntpd/ntpd-opts.h@1.261 +3 -3
+ NTP_4_2_7P256
+
+ ntpd/ntpd-opts.texi@1.259 +2 -2
+ NTP_4_2_7P256
+
+ ntpd/ntpd.1ntpdman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpd/ntpd.1ntpdmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpd/ntpd.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpd/ntpd.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc-opts.c@1.256 +4 -4
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc-opts.h@1.256 +3 -3
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc-opts.texi@1.256 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc.1ntpdcman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc.html@1.84 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpdc/ntpdc.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpq/ntpq-opts.c@1.258 +4 -4
+ NTP_4_2_7P256
+
+ ntpq/ntpq-opts.h@1.258 +3 -3
+ NTP_4_2_7P256
+
+ ntpq/ntpq-opts.texi@1.258 +2 -2
+ NTP_4_2_7P256
+
+ ntpq/ntpq.1ntpqman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpq/ntpq.1ntpqmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpq/ntpq.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpq/ntpq.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.258 +4 -4
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.258 +3 -3
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.258 +2 -2
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ packageinfo.sh@1.259 +1 -1
+ NTP_4_2_7P256
+
+ scripts/ntp-wait-opts.texi@1.76 +1 -1
+ NTP_4_2_7P256
+
+ scripts/ntp-wait.1ntp-waitman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ scripts/ntp-wait.html@1.76 +1 -1
+ NTP_4_2_7P256
+
+ scripts/ntp-wait.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ scripts/ntp-wait.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp-opts.c@1.254 +4 -4
+ NTP_4_2_7P256
+
+ sntp/sntp-opts.h@1.254 +3 -3
+ NTP_4_2_7P256
+
+ sntp/sntp-opts.texi@1.254 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp.1sntpman@1.74 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp.1sntpmdoc@1.74 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp.html@1.254 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp.man.in@1.74 +2 -2
+ NTP_4_2_7P256
+
+ sntp/sntp.mdoc.in@1.74 +2 -2
+ NTP_4_2_7P256
+
+ util/ntp-keygen-opts.c@1.258 +4 -4
+ NTP_4_2_7P256
+
+ util/ntp-keygen-opts.h@1.258 +3 -3
+ NTP_4_2_7P256
+
+ util/ntp-keygen-opts.texi@1.259 +2 -2
+ NTP_4_2_7P256
+
+ util/ntp-keygen.1ntp-keygenman@1.72 +2 -2
+ NTP_4_2_7P256
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.72 +2 -2
+ NTP_4_2_7P256
+
+ util/ntp-keygen.man.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ util/ntp-keygen.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P256
+
+ChangeSet@1.2762.1.2, 2012-02-08 07:25:26+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2131] Set the system variable settimeofday only after clock step.
+
+ ChangeLog@1.1113 +1 -0
+ [Bug 2131] Set the system variable settimeofday only after clock step.
+
+ ntpd/ntp_config.c@1.297 +0 -8
+ [Bug 2131] Set the system variable settimeofday only after clock step.
+
+ ntpd/ntp_refclock.c@1.112 +0 -1
+ Remove unused local from refclock_timer().
+
+ChangeSet@1.2762.1.1, 2012-02-08 02:33:45+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2134] --enable-C99-snprintf does not force rpl_snprintf use.
+
+ ChangeLog@1.1112 +1 -0
+ [Bug 2134] --enable-C99-snprintf does not force rpl_snprintf use.
+
+ sntp/m4/snprintf.m4@1.3 +4 -4
+ [Bug 2134] --enable-C99-snprintf does not force rpl_snprintf use.
+
+ChangeSet@1.2764, 2012-02-06 19:40:41+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/ag-tpl/texi2txt@1.2 +2 -4
+ cleanup
+
+ChangeSet@1.2763, 2012-02-06 06:04:15+00:00, stenn@psp-fb1.ntp.org
+ autogen translator updates
+
+ BitKeeper/deleted/02/mdoc2mdoc~efc40f7d5fb243b2@1.2 +0 -0
+ Delete: sntp/ag-tpl/mdoc2mdoc
+
+ BitKeeper/deleted/55/mdoc2man~beb9c4c088d95890@1.3 +0 -0
+ Delete: sntp/ag-tpl/mdoc2man
+
+ sntp/ag-tpl/texi2man@1.1 +63 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/texi2man
+
+ sntp/ag-tpl/texi2man@1.0 +0 -0
+
+ sntp/ag-tpl/texi2mdoc@1.1 +182 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/texi2mdoc
+
+ sntp/ag-tpl/texi2mdoc@1.0 +0 -0
+
+ sntp/ag-tpl/texi2plain@1.1 +62 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/texi2plain
+
+ sntp/ag-tpl/texi2plain@1.0 +0 -0
+
+ sntp/ag-tpl/texi2txt@1.1 +81 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/texi2txt
+
+ sntp/ag-tpl/texi2txt@1.0 +0 -0
+
+ChangeSet@1.2759.1.2, 2012-01-30 05:15:20+00:00, stenn@psp-fb1.ntp.org
+ Handle .5 in the mansec substitutions
+
+ sntp/scripts/mansec2subst.sed@1.3 +2 -0
+ Handle .5 in the mansec substitutions
+
+ChangeSet@1.2759.1.1, 2012-01-30 05:14:29+00:00, stenn@psp-fb1.ntp.org
+ Rules for ntp.conf.5 and ntp.keys.5
+
+ ntpd/Makefile.am@1.113 +62 -1
+ Rules for ntp.conf.5 and ntp.keys.5
+
+ChangeSet@1.2762, 2012-01-29 22:06:30+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P255
+ TAG: NTP_4_2_7P255
+
+ ChangeLog@1.1111 +1 -0
+ NTP_4_2_7P255
+
+ ntpd/ntpd-opts.c@1.260 +4 -4
+ NTP_4_2_7P255
+
+ ntpd/ntpd-opts.h@1.260 +3 -3
+ NTP_4_2_7P255
+
+ ntpd/ntpd-opts.texi@1.258 +2 -2
+ NTP_4_2_7P255
+
+ ntpd/ntpd.1ntpdman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpd/ntpd.1ntpdmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpd/ntpd.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpd/ntpd.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc-opts.c@1.255 +4 -4
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc-opts.h@1.255 +3 -3
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc-opts.texi@1.255 +2 -2
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc.1ntpdcman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc.html@1.83 +2 -2
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpdc/ntpdc.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpq/ntpq-opts.c@1.257 +4 -4
+ NTP_4_2_7P255
+
+ ntpq/ntpq-opts.h@1.257 +3 -3
+ NTP_4_2_7P255
+
+ ntpq/ntpq-opts.texi@1.257 +2 -2
+ NTP_4_2_7P255
+
+ ntpq/ntpq.1ntpqman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpq/ntpq.1ntpqmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpq/ntpq.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpq/ntpq.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.257 +4 -4
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.257 +3 -3
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.257 +2 -2
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ packageinfo.sh@1.258 +1 -1
+ NTP_4_2_7P255
+
+ scripts/ntp-wait-opts.texi@1.75 +1 -1
+ NTP_4_2_7P255
+
+ scripts/ntp-wait.1ntp-waitman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ scripts/ntp-wait.html@1.75 +1 -1
+ NTP_4_2_7P255
+
+ scripts/ntp-wait.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ scripts/ntp-wait.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ sntp/sntp-opts.c@1.253 +4 -4
+ NTP_4_2_7P255
+
+ sntp/sntp-opts.h@1.253 +3 -3
+ NTP_4_2_7P255
+
+ sntp/sntp-opts.texi@1.253 +2 -2
+ NTP_4_2_7P255
+
+ sntp/sntp.1sntpman@1.73 +2 -2
+ NTP_4_2_7P255
+
+ sntp/sntp.1sntpmdoc@1.73 +1 -1
+ NTP_4_2_7P255
+
+ sntp/sntp.html@1.253 +2 -2
+ NTP_4_2_7P255
+
+ sntp/sntp.man.in@1.73 +2 -2
+ NTP_4_2_7P255
+
+ sntp/sntp.mdoc.in@1.73 +1 -1
+ NTP_4_2_7P255
+
+ util/ntp-keygen-opts.c@1.257 +4 -4
+ NTP_4_2_7P255
+
+ util/ntp-keygen-opts.h@1.257 +3 -3
+ NTP_4_2_7P255
+
+ util/ntp-keygen-opts.texi@1.258 +2 -2
+ NTP_4_2_7P255
+
+ util/ntp-keygen.1ntp-keygenman@1.71 +2 -2
+ NTP_4_2_7P255
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.71 +1 -1
+ NTP_4_2_7P255
+
+ util/ntp-keygen.man.in@1.71 +2 -2
+ NTP_4_2_7P255
+
+ util/ntp-keygen.mdoc.in@1.71 +1 -1
+ NTP_4_2_7P255
+
+ChangeSet@1.2761, 2012-01-29 16:49:09-05:00, stenn@deacon.udel.edu
+ [Bug 603] Only link with nlist()-related libraries when needed: More cleanup
+
+ ChangeLog@1.1110 +2 -0
+ [Bug 603] Only link with nlist()-related libraries when needed: More cleanup
+
+ configure.ac@1.540 +6 -1
+ [Bug 603] Only link with nlist()-related libraries when needed: More cleanup
+
+ChangeSet@1.2760, 2012-01-29 07:02:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P254
+ TAG: NTP_4_2_7P254
+
+ ChangeLog@1.1109 +1 -0
+ NTP_4_2_7P254
+
+ ntpd/ntpd-opts.c@1.259 +4 -4
+ NTP_4_2_7P254
+
+ ntpd/ntpd-opts.h@1.259 +3 -3
+ NTP_4_2_7P254
+
+ ntpd/ntpd-opts.texi@1.257 +2 -2
+ NTP_4_2_7P254
+
+ ntpd/ntpd.1ntpdman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpd/ntpd.1ntpdmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpd/ntpd.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpd/ntpd.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc-opts.c@1.254 +4 -4
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc-opts.h@1.254 +3 -3
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc-opts.texi@1.254 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc.1ntpdcman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc.html@1.82 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpdc/ntpdc.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpq/ntpq-opts.c@1.256 +4 -4
+ NTP_4_2_7P254
+
+ ntpq/ntpq-opts.h@1.256 +3 -3
+ NTP_4_2_7P254
+
+ ntpq/ntpq-opts.texi@1.256 +2 -2
+ NTP_4_2_7P254
+
+ ntpq/ntpq.1ntpqman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpq/ntpq.1ntpqmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpq/ntpq.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpq/ntpq.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.256 +4 -4
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.256 +3 -3
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.256 +2 -2
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ packageinfo.sh@1.257 +1 -1
+ NTP_4_2_7P254
+
+ scripts/ntp-wait-opts.texi@1.74 +1 -1
+ NTP_4_2_7P254
+
+ scripts/ntp-wait.1ntp-waitman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ scripts/ntp-wait.html@1.74 +1 -1
+ NTP_4_2_7P254
+
+ scripts/ntp-wait.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ scripts/ntp-wait.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp-opts.c@1.252 +4 -4
+ NTP_4_2_7P254
+
+ sntp/sntp-opts.h@1.252 +3 -3
+ NTP_4_2_7P254
+
+ sntp/sntp-opts.texi@1.252 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp.1sntpman@1.72 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp.1sntpmdoc@1.72 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp.html@1.252 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp.man.in@1.72 +2 -2
+ NTP_4_2_7P254
+
+ sntp/sntp.mdoc.in@1.72 +2 -2
+ NTP_4_2_7P254
+
+ util/ntp-keygen-opts.c@1.256 +4 -4
+ NTP_4_2_7P254
+
+ util/ntp-keygen-opts.h@1.256 +3 -3
+ NTP_4_2_7P254
+
+ util/ntp-keygen-opts.texi@1.257 +2 -2
+ NTP_4_2_7P254
+
+ util/ntp-keygen.1ntp-keygenman@1.70 +2 -2
+ NTP_4_2_7P254
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.70 +2 -2
+ NTP_4_2_7P254
+
+ util/ntp-keygen.man.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ util/ntp-keygen.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P254
+
+ChangeSet@1.2759, 2012-01-28 23:24:08+00:00, stenn@psp-fb1.ntp.org
+ Only link with nlist()-related libraries when needed
+
+ ChangeLog@1.1108 +1 -0
+ Only link with nlist()-related libraries when needed
+
+ configure.ac@1.539 +8 -5
+ Only link with nlist()-related libraries when needed
+
+ util/Makefile.am@1.69 +2 -0
+ Only link with nlist()-related libraries when needed
+
+ChangeSet@1.2758, 2012-01-26 06:05:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P253
+ TAG: NTP_4_2_7P253
+
+ ChangeLog@1.1107 +1 -0
+ NTP_4_2_7P253
+
+ ntpd/ntpd-opts.c@1.258 +251 -256
+ NTP_4_2_7P253
+
+ ntpd/ntpd-opts.h@1.258 +7 -7
+ NTP_4_2_7P253
+
+ ntpd/ntpd-opts.texi@1.256 +2 -2
+ NTP_4_2_7P253
+
+ ntpd/ntpd.1ntpdman@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpd/ntpd.1ntpdmdoc@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpd/ntpd.man.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpd/ntpd.mdoc.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc-opts.c@1.253 +120 -125
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc-opts.h@1.253 +7 -7
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc-opts.texi@1.253 +2 -2
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc.1ntpdcman@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc.html@1.81 +2 -2
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc.man.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpdc/ntpdc.mdoc.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpq/ntpq-opts.c@1.255 +111 -116
+ NTP_4_2_7P253
+
+ ntpq/ntpq-opts.h@1.255 +7 -7
+ NTP_4_2_7P253
+
+ ntpq/ntpq-opts.texi@1.255 +2 -2
+ NTP_4_2_7P253
+
+ ntpq/ntpq.1ntpqman@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpq/ntpq.1ntpqmdoc@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpq/ntpq.man.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpq/ntpq.mdoc.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.255 +81 -86
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.255 +7 -7
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.255 +2 -2
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd.man.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ packageinfo.sh@1.256 +1 -1
+ NTP_4_2_7P253
+
+ scripts/ntp-wait-opts.texi@1.73 +1 -1
+ NTP_4_2_7P253
+
+ scripts/ntp-wait.1ntp-waitman@1.69 +3 -3
+ NTP_4_2_7P253
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.69 +3 -3
+ NTP_4_2_7P253
+
+ scripts/ntp-wait.html@1.73 +1 -1
+ NTP_4_2_7P253
+
+ scripts/ntp-wait.man.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ scripts/ntp-wait.mdoc.in@1.69 +3 -3
+ NTP_4_2_7P253
+
+ sntp/sntp-opts.c@1.251 +178 -183
+ NTP_4_2_7P253
+
+ sntp/sntp-opts.h@1.251 +7 -7
+ NTP_4_2_7P253
+
+ sntp/sntp-opts.texi@1.251 +2 -2
+ NTP_4_2_7P253
+
+ sntp/sntp.1sntpman@1.71 +3 -3
+ NTP_4_2_7P253
+
+ sntp/sntp.1sntpmdoc@1.71 +3 -3
+ NTP_4_2_7P253
+
+ sntp/sntp.html@1.251 +2 -2
+ NTP_4_2_7P253
+
+ sntp/sntp.man.in@1.71 +3 -3
+ NTP_4_2_7P253
+
+ sntp/sntp.mdoc.in@1.71 +3 -3
+ NTP_4_2_7P253
+
+ util/ntp-keygen-opts.c@1.255 +180 -185
+ NTP_4_2_7P253
+
+ util/ntp-keygen-opts.h@1.255 +7 -7
+ NTP_4_2_7P253
+
+ util/ntp-keygen-opts.texi@1.256 +2 -2
+ NTP_4_2_7P253
+
+ util/ntp-keygen.1ntp-keygenman@1.69 +4 -4
+ NTP_4_2_7P253
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.69 +4 -4
+ NTP_4_2_7P253
+
+ util/ntp-keygen.man.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ util/ntp-keygen.mdoc.in@1.69 +4 -4
+ NTP_4_2_7P253
+
+ChangeSet@1.2757, 2012-01-25 23:01:37-05:00, stenn@deacon.udel.edu
+ Update a license URL
+
+ ChangeLog@1.1106 +1 -0
+ Update a license URL
+
+ sntp/include/ntp.lic@1.6 +1 -1
+ Update a license URL
+
+ChangeSet@1.2756, 2012-01-26 03:33:12+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Override --version output without the ugly hack previously used,
+ as Autogen 5.13 and later provide version-proc = override in .def.
+
+ include/ntp_libopts.h@1.2 +1 -0
+ Override --version output without the ugly hack previously used,
+ as Autogen 5.13 and later provide version-proc = override in .def.
+
+ libntp/ntp_libopts.c@1.5 +28 -30
+ Override --version output without the ugly hack previously used,
+ as Autogen 5.13 and later provide version-proc = override in .def.
+
+ sntp/include/copyright.def@1.20 +2 -1
+ Override --version output without the ugly hack previously used,
+ as Autogen 5.13 and later provide version-proc = override in .def.
+ Change owner = to match copyright.html.
+
+ChangeSet@1.2755, 2012-01-26 01:44:08+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2126] Compile error on Windows with libopts from Autogen 5.14.
+
+ ChangeLog@1.1105 +1 -0
+ [Bug 2126] Compile error on Windows with libopts from Autogen 5.14.
+
+ sntp/libopts/text_mmap.c@1.9 +6 -2
+ [Bug 2126] Compile error on Windows with libopts from Autogen 5.14.
+ Patch provided by Bruce Korb based on pending Autogen changes.
+
+ChangeSet@1.2754, 2012-01-25 12:05:43+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P252
+ TAG: NTP_4_2_7P252
+
+ ChangeLog@1.1104 +1 -0
+ NTP_4_2_7P252
+
+ ntpd/ntpd-opts.c@1.257 +516 -442
+ NTP_4_2_7P252
+
+ ntpd/ntpd-opts.h@1.257 +11 -10
+ NTP_4_2_7P252
+
+ ntpd/ntpd-opts.texi@1.255 +3 -3
+ NTP_4_2_7P252
+
+ ntpd/ntpd.1ntpdman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpd/ntpd.1ntpdmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpd/ntpd.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpd/ntpd.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc-opts.c@1.252 +255 -219
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc-opts.h@1.252 +11 -9
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc-opts.texi@1.252 +3 -3
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc.1ntpdcman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc.html@1.80 +3 -3
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpdc/ntpdc.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpq/ntpq-opts.c@1.254 +244 -207
+ NTP_4_2_7P252
+
+ ntpq/ntpq-opts.h@1.254 +11 -9
+ NTP_4_2_7P252
+
+ ntpq/ntpq-opts.texi@1.254 +3 -3
+ NTP_4_2_7P252
+
+ ntpq/ntpq.1ntpqman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpq/ntpq.1ntpqmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpq/ntpq.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpq/ntpq.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.254 +164 -132
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.254 +11 -9
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.254 +3 -3
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ packageinfo.sh@1.255 +1 -1
+ NTP_4_2_7P252
+
+ scripts/ntp-wait-opts.texi@1.72 +2 -2
+ NTP_4_2_7P252
+
+ scripts/ntp-wait.1ntp-waitman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ scripts/ntp-wait.html@1.72 +2 -2
+ NTP_4_2_7P252
+
+ scripts/ntp-wait.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ scripts/ntp-wait.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ sntp/sntp-opts.c@1.250 +366 -305
+ NTP_4_2_7P252
+
+ sntp/sntp-opts.h@1.250 +11 -9
+ NTP_4_2_7P252
+
+ sntp/sntp-opts.texi@1.250 +3 -3
+ NTP_4_2_7P252
+
+ sntp/sntp.1sntpman@1.70 +2 -2
+ NTP_4_2_7P252
+
+ sntp/sntp.1sntpmdoc@1.70 +2 -2
+ NTP_4_2_7P252
+
+ sntp/sntp.html@1.250 +3 -3
+ NTP_4_2_7P252
+
+ sntp/sntp.man.in@1.70 +2 -2
+ NTP_4_2_7P252
+
+ sntp/sntp.mdoc.in@1.70 +2 -2
+ NTP_4_2_7P252
+
+ util/ntp-keygen-opts.c@1.254 +451 -387
+ NTP_4_2_7P252
+
+ util/ntp-keygen-opts.h@1.254 +11 -13
+ NTP_4_2_7P252
+
+ util/ntp-keygen-opts.texi@1.255 +3 -3
+ NTP_4_2_7P252
+
+ util/ntp-keygen.1ntp-keygenman@1.68 +2 -2
+ NTP_4_2_7P252
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.68 +2 -2
+ NTP_4_2_7P252
+
+ util/ntp-keygen.man.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ util/ntp-keygen.mdoc.in@1.68 +2 -2
+ NTP_4_2_7P252
+
+ChangeSet@1.2753, 2012-01-25 09:54:11+00:00, stenn@psp-fb1.ntp.org
+ Upgrade to autogen-5.14 (and libopts-36.1.11)
+
+ BitKeeper/deleted/94/enumeration.c~263a95e02049b99c@1.9 +0 -0
+ Delete: sntp/libopts/enumeration.c
+
+ BitKeeper/deleted/97/environment.c~444322456d6044d7@1.11 +0 -0
+ Delete: sntp/libopts/environment.c
+
+ ChangeLog@1.1103 +1 -0
+ Upgrade to autogen-5.14 (and libopts-36.1.11)
+
+ sntp/include/autogen-version.def@1.9 +1 -1
+ Upgrade to autogen 5.14
+
+ sntp/libopts/Makefile.am@1.11 +16 -15
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/ag-char-map.h@1.14 +3 -3
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/autoopts.c@1.11 +48 -515
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/autoopts/options.h@1.13 +47 -37
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/autoopts/usage-txt.h@1.13 +324 -312
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/check.c@1.1 +164 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/libopts/check.c
+
+ sntp/libopts/check.c@1.0 +0 -0
+
+ sntp/libopts/configfile.c@1.12 +35 -25
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/enum.c@1.1 +522 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/libopts/enum.c
+
+ sntp/libopts/enum.c@1.0 +0 -0
+
+ sntp/libopts/env.c@1.1 +259 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/libopts/env.c
+
+ sntp/libopts/env.c@1.0 +0 -0
+
+ sntp/libopts/file.c@1.9 +129 -94
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/find.c@1.1 +568 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/libopts/find.c
+
+ sntp/libopts/find.c@1.0 +0 -0
+
+ sntp/libopts/genshell.c@1.14 +140 -114
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/genshell.h@1.14 +29 -24
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/libopts.c@1.4 +4 -2
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/load.c@1.10 +15 -16
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/m4/libopts.m4@1.17 +4 -4
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/proto.h@1.14 +35 -14
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/reset.c@1.8 +3 -3
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/sort.c@1.8 +5 -5
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/text_mmap.c@1.8 +231 -248
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/usage.c@1.9 +220 -62
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/value-type.h@1.14 +1 -1
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/version.c@1.9 +14 -7
+ Upgrade to libopts-36.1.11
+
+ sntp/libopts/xat-attribute.h@1.14 +1 -1
+ Upgrade to libopts-36.1.11
+
+ChangeSet@1.2752, 2012-01-17 11:36:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P251
+ TAG: NTP_4_2_7P251
+
+ ChangeLog@1.1102 +1 -0
+ NTP_4_2_7P251
+
+ ntpd/ntpd-opts.c@1.256 +3 -3
+ NTP_4_2_7P251
+
+ ntpd/ntpd-opts.h@1.256 +3 -3
+ NTP_4_2_7P251
+
+ ntpd/ntpd-opts.texi@1.254 +2 -2
+ NTP_4_2_7P251
+
+ ntpd/ntpd.1ntpdman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpd/ntpd.1ntpdmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpd/ntpd.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpd/ntpd.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc-opts.c@1.251 +3 -3
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc-opts.h@1.251 +3 -3
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc-opts.texi@1.251 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc.1ntpdcman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc.html@1.79 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpdc/ntpdc.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpq/ntpq-opts.c@1.253 +3 -3
+ NTP_4_2_7P251
+
+ ntpq/ntpq-opts.h@1.253 +3 -3
+ NTP_4_2_7P251
+
+ ntpq/ntpq-opts.texi@1.253 +2 -2
+ NTP_4_2_7P251
+
+ ntpq/ntpq.1ntpqman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpq/ntpq.1ntpqmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpq/ntpq.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpq/ntpq.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.253 +3 -3
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.253 +3 -3
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.253 +2 -2
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ packageinfo.sh@1.254 +1 -1
+ NTP_4_2_7P251
+
+ scripts/ntp-wait-opts.texi@1.71 +1 -1
+ NTP_4_2_7P251
+
+ scripts/ntp-wait.1ntp-waitman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ scripts/ntp-wait.html@1.71 +1 -1
+ NTP_4_2_7P251
+
+ scripts/ntp-wait.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ scripts/ntp-wait.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp-opts.c@1.249 +3 -3
+ NTP_4_2_7P251
+
+ sntp/sntp-opts.h@1.249 +3 -3
+ NTP_4_2_7P251
+
+ sntp/sntp-opts.texi@1.249 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp.1sntpman@1.69 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp.1sntpmdoc@1.69 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp.html@1.249 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp.man.in@1.69 +2 -2
+ NTP_4_2_7P251
+
+ sntp/sntp.mdoc.in@1.69 +2 -2
+ NTP_4_2_7P251
+
+ util/ntp-keygen-opts.c@1.253 +3 -3
+ NTP_4_2_7P251
+
+ util/ntp-keygen-opts.h@1.253 +3 -3
+ NTP_4_2_7P251
+
+ util/ntp-keygen-opts.texi@1.254 +2 -2
+ NTP_4_2_7P251
+
+ util/ntp-keygen.1ntp-keygenman@1.67 +2 -2
+ NTP_4_2_7P251
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.67 +2 -2
+ NTP_4_2_7P251
+
+ util/ntp-keygen.man.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ util/ntp-keygen.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P251
+
+ChangeSet@1.2751, 2012-01-17 00:59:47+00:00, stenn@psp-fb1.ntp.org
+ [Bug 2115] ntptrace should accept both rootdispersion and rootdisp
+
+ ChangeLog@1.1101 +1 -0
+ [Bug 2115] ntptrace should accept both rootdispersion and rootdisp
+
+ scripts/ntptrace.in@1.8 +2 -1
+ [Bug 2115] ntptrace should accept both rootdispersion and rootdisp
+
+ChangeSet@1.2750, 2012-01-15 11:37:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P250
+ TAG: NTP_4_2_7P250
+
+ ChangeLog@1.1100 +1 -0
+ NTP_4_2_7P250
+
+ ntpd/ntpd-opts.c@1.255 +5 -5
+ NTP_4_2_7P250
+
+ ntpd/ntpd-opts.h@1.255 +4 -4
+ NTP_4_2_7P250
+
+ ntpd/ntpd-opts.texi@1.253 +2 -2
+ NTP_4_2_7P250
+
+ ntpd/ntpd.1ntpdman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpd/ntpd.1ntpdmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpd/ntpd.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpd/ntpd.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc-opts.c@1.250 +5 -5
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc-opts.h@1.250 +4 -4
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc-opts.texi@1.250 +2 -2
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc.1ntpdcman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc.html@1.78 +2 -2
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpdc/ntpdc.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpq/ntpq-opts.c@1.252 +5 -5
+ NTP_4_2_7P250
+
+ ntpq/ntpq-opts.h@1.252 +4 -4
+ NTP_4_2_7P250
+
+ ntpq/ntpq-opts.texi@1.252 +2 -2
+ NTP_4_2_7P250
+
+ ntpq/ntpq.1ntpqman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpq/ntpq.1ntpqmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpq/ntpq.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpq/ntpq.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.252 +5 -5
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.252 +4 -4
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.252 +2 -2
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ packageinfo.sh@1.253 +1 -1
+ NTP_4_2_7P250
+
+ scripts/ntp-wait-opts.texi@1.70 +1 -1
+ NTP_4_2_7P250
+
+ scripts/ntp-wait.1ntp-waitman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ scripts/ntp-wait.html@1.70 +1 -1
+ NTP_4_2_7P250
+
+ scripts/ntp-wait.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ scripts/ntp-wait.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ sntp/sntp-opts.c@1.248 +5 -5
+ NTP_4_2_7P250
+
+ sntp/sntp-opts.h@1.248 +4 -4
+ NTP_4_2_7P250
+
+ sntp/sntp-opts.texi@1.248 +2 -2
+ NTP_4_2_7P250
+
+ sntp/sntp.1sntpman@1.68 +3 -3
+ NTP_4_2_7P250
+
+ sntp/sntp.1sntpmdoc@1.68 +3 -3
+ NTP_4_2_7P250
+
+ sntp/sntp.html@1.248 +2 -2
+ NTP_4_2_7P250
+
+ sntp/sntp.man.in@1.68 +3 -3
+ NTP_4_2_7P250
+
+ sntp/sntp.mdoc.in@1.68 +3 -3
+ NTP_4_2_7P250
+
+ util/ntp-keygen-opts.c@1.252 +5 -5
+ NTP_4_2_7P250
+
+ util/ntp-keygen-opts.h@1.252 +4 -4
+ NTP_4_2_7P250
+
+ util/ntp-keygen-opts.texi@1.253 +2 -2
+ NTP_4_2_7P250
+
+ util/ntp-keygen.1ntp-keygenman@1.66 +3 -3
+ NTP_4_2_7P250
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.66 +3 -3
+ NTP_4_2_7P250
+
+ util/ntp-keygen.man.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ util/ntp-keygen.mdoc.in@1.66 +3 -3
+ NTP_4_2_7P250
+
+ChangeSet@1.2749, 2012-01-14 21:57:29+00:00, stenn@psp-fb1.ntp.org
+ Update the copyright year
+
+ ChangeLog@1.1099 +1 -0
+ Update the copyright year
+
+ html/copyright.html@1.59 +1 -1
+ Update the copyright year
+
+ sntp/include/copyright.def@1.19 +1 -1
+ Update the copyright year
+
+ChangeSet@1.2748, 2012-01-13 00:20:30-08:00, harlan@hms-mbp.local
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ ChangeLog@1.1098 +1 -0
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ ntpq/ntpq.c@1.144 +36 -29
+ [Bug 2113] Warn about ignored extra args in ntpq
+
+ChangeSet@1.2747, 2012-01-10 06:49:35+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P249
+ TAG: NTP_4_2_7P249
+
+ ChangeLog@1.1097 +1 -0
+ NTP_4_2_7P249
+
+ ntpd/ntpd-opts.c@1.254 +3 -3
+ NTP_4_2_7P249
+
+ ntpd/ntpd-opts.h@1.254 +3 -3
+ NTP_4_2_7P249
+
+ ntpd/ntpd-opts.texi@1.252 +2 -2
+ NTP_4_2_7P249
+
+ ntpd/ntpd.1ntpdman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpd/ntpd.1ntpdmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpd/ntpd.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpd/ntpd.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc-opts.c@1.249 +3 -3
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc-opts.h@1.249 +3 -3
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc-opts.texi@1.249 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc.1ntpdcman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc.html@1.77 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpdc/ntpdc.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpq/ntpq-opts.c@1.251 +3 -3
+ NTP_4_2_7P249
+
+ ntpq/ntpq-opts.h@1.251 +3 -3
+ NTP_4_2_7P249
+
+ ntpq/ntpq-opts.texi@1.251 +2 -2
+ NTP_4_2_7P249
+
+ ntpq/ntpq.1ntpqman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpq/ntpq.1ntpqmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpq/ntpq.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpq/ntpq.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.251 +3 -3
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.251 +3 -3
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.251 +2 -2
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ packageinfo.sh@1.252 +1 -1
+ NTP_4_2_7P249
+
+ scripts/ntp-wait-opts.texi@1.69 +1 -1
+ NTP_4_2_7P249
+
+ scripts/ntp-wait.1ntp-waitman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ scripts/ntp-wait.html@1.69 +1 -1
+ NTP_4_2_7P249
+
+ scripts/ntp-wait.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ scripts/ntp-wait.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp-opts.c@1.247 +3 -3
+ NTP_4_2_7P249
+
+ sntp/sntp-opts.h@1.247 +3 -3
+ NTP_4_2_7P249
+
+ sntp/sntp-opts.texi@1.247 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp.1sntpman@1.67 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp.1sntpmdoc@1.67 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp.html@1.247 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp.man.in@1.67 +2 -2
+ NTP_4_2_7P249
+
+ sntp/sntp.mdoc.in@1.67 +2 -2
+ NTP_4_2_7P249
+
+ util/ntp-keygen-opts.c@1.251 +3 -3
+ NTP_4_2_7P249
+
+ util/ntp-keygen-opts.h@1.251 +3 -3
+ NTP_4_2_7P249
+
+ util/ntp-keygen-opts.texi@1.252 +2 -2
+ NTP_4_2_7P249
+
+ util/ntp-keygen.1ntp-keygenman@1.65 +2 -2
+ NTP_4_2_7P249
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.65 +2 -2
+ NTP_4_2_7P249
+
+ util/ntp-keygen.man.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ util/ntp-keygen.mdoc.in@1.65 +2 -2
+ NTP_4_2_7P249
+
+ChangeSet@1.2746, 2012-01-10 05:24:10+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2111] Remove minpoll delay before iburst for pool and
+ manycastclient.
+
+ ChangeLog@1.1096 +2 -0
+ [Bug 2111] Remove minpoll delay before iburst for pool and
+ manycastclient.
+
+ ntpd/ntp_proto.c@1.339 +30 -46
+ [Bug 2111] Remove minpoll delay before iburst for pool and
+ manycastclient.
+
+ChangeSet@1.2745, 2012-01-10 04:55:48+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ ChangeLog@1.1095 +4 -0
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ include/ntp.h@1.203 +1 -3
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ include/ntp_refclock.h@1.34 +4 -1
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ ntpd/ntp_peer.c@1.152 +2 -3
+ use TRUE and comment typo
+
+ ntpd/ntp_refclock.c@1.111 +12 -8
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ ntpd/ntp_timer.c@1.67 +0 -2
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ ntpd/refclock_arc.c@1.29 +3 -3
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ ntpd/refclock_parse.c@1.64 +10 -10
+ Move refclock-specific scheduled timer code under #ifdef REFCLOCK
+ and move "action" and "nextaction" data for same from struct peer to
+ struct refclockproc. These provide a way to schedule a callback some
+ seconds in the future.
+
+ChangeSet@1.2744, 2012-01-08 23:14:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P248
+ TAG: NTP_4_2_7P248
+
+ ChangeLog@1.1094 +1 -0
+ NTP_4_2_7P248
+
+ ntpd/ntpd-opts.c@1.253 +3 -3
+ NTP_4_2_7P248
+
+ ntpd/ntpd-opts.h@1.253 +3 -3
+ NTP_4_2_7P248
+
+ ntpd/ntpd-opts.texi@1.251 +2 -2
+ NTP_4_2_7P248
+
+ ntpd/ntpd.1ntpdman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpd/ntpd.1ntpdmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpd/ntpd.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpd/ntpd.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc-opts.c@1.248 +3 -3
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc-opts.h@1.248 +3 -3
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc-opts.texi@1.248 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc.1ntpdcman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc.html@1.76 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpdc/ntpdc.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpq/ntpq-opts.c@1.250 +3 -3
+ NTP_4_2_7P248
+
+ ntpq/ntpq-opts.h@1.250 +3 -3
+ NTP_4_2_7P248
+
+ ntpq/ntpq-opts.texi@1.250 +2 -2
+ NTP_4_2_7P248
+
+ ntpq/ntpq.1ntpqman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpq/ntpq.1ntpqmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpq/ntpq.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpq/ntpq.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.250 +3 -3
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.250 +3 -3
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.250 +2 -2
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ packageinfo.sh@1.251 +1 -1
+ NTP_4_2_7P248
+
+ scripts/ntp-wait-opts.texi@1.68 +1 -1
+ NTP_4_2_7P248
+
+ scripts/ntp-wait.1ntp-waitman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ scripts/ntp-wait.html@1.68 +1 -1
+ NTP_4_2_7P248
+
+ scripts/ntp-wait.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ scripts/ntp-wait.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp-opts.c@1.246 +3 -3
+ NTP_4_2_7P248
+
+ sntp/sntp-opts.h@1.246 +3 -3
+ NTP_4_2_7P248
+
+ sntp/sntp-opts.texi@1.246 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp.1sntpman@1.66 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp.1sntpmdoc@1.66 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp.html@1.246 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp.man.in@1.66 +2 -2
+ NTP_4_2_7P248
+
+ sntp/sntp.mdoc.in@1.66 +2 -2
+ NTP_4_2_7P248
+
+ util/ntp-keygen-opts.c@1.250 +3 -3
+ NTP_4_2_7P248
+
+ util/ntp-keygen-opts.h@1.250 +3 -3
+ NTP_4_2_7P248
+
+ util/ntp-keygen-opts.texi@1.251 +2 -2
+ NTP_4_2_7P248
+
+ util/ntp-keygen.1ntp-keygenman@1.64 +2 -2
+ NTP_4_2_7P248
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.64 +2 -2
+ NTP_4_2_7P248
+
+ util/ntp-keygen.man.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ util/ntp-keygen.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P248
+
+ChangeSet@1.2743, 2012-01-08 12:02:32+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2109] "make clean check" is broken with gtest available.
+ [Bug 2110] systime.c typo breaks build on microsecond clocks.
+ Use $(MAKE) $(AM_MAKEFLAGS) for submakes.
+
+ ChangeLog@1.1093 +2 -0
+ [Bug 2109] "make clean check" is broken with gtest available.
+ [Bug 2110] systime.c typo breaks build on microsecond clocks.
+
+ Makefile.am@1.115 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ check-libopts.mf@1.2 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ depsver.mf@1.4 +2 -2
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ libntp/systime.c@1.63 +1 -1
+ [Bug 2110] systime.c typo breaks build on microsecond clocks.
+
+ ntpd/Makefile.am@1.112 +4 -4
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ ntpdate/Makefile.am@1.33 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ ntpdc/Makefile.am@1.69 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ ntpq/Makefile.am@1.65 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ sntp/Makefile.am@1.70 +31 -24
+ [Bug 2109] "make clean check" is broken with gtest available.
+
+ sntp/check-libntp.mf@1.2 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ sntp/check-libopts.mf@1.2 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ sntp/include/Makefile.am@1.5 +2 -2
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ sntp/main.c@1.81 +3 -3
+ Pass version string to sntp_main() as arg instead of global to remove main.o dependency on version.o for libsntp.a.
+
+ sntp/main.h@1.7 +1 -1
+ Pass version string to sntp_main() as arg instead of global to remove main.o dependency on version.o for libsntp.a.
+
+ sntp/sntp.c@1.4 +1 -1
+ Pass version string to sntp_main() as arg instead of global to remove main.o dependency on version.o for libsntp.a.
+
+ sntp/tests/Makefile.am@1.26 +13 -15
+ [Bug 2109] "make clean check" is broken with gtest available.
+
+ sntp/tests/utilities.cpp@1.8 +1 -0
+ Provide stub Version string for libntp.a/ntp_libopts.o
+
+ tests/libntp/Makefile.am@1.38 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ util/Makefile.am@1.68 +1 -1
+ use $(MAKE) $(AM_MAKEFLAGS) for submakes
+
+ChangeSet@1.2742, 2012-01-07 01:05:31+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P247
+ TAG: NTP_4_2_7P247
+
+ ChangeLog@1.1092 +1 -0
+ NTP_4_2_7P247
+
+ ntpd/ntpd-opts.c@1.252 +3 -3
+ NTP_4_2_7P247
+
+ ntpd/ntpd-opts.h@1.252 +3 -3
+ NTP_4_2_7P247
+
+ ntpd/ntpd-opts.texi@1.250 +2 -2
+ NTP_4_2_7P247
+
+ ntpd/ntpd.1ntpdman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpd/ntpd.1ntpdmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpd/ntpd.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpd/ntpd.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc-opts.c@1.247 +3 -3
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc-opts.h@1.247 +3 -3
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc-opts.texi@1.247 +2 -2
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc.1ntpdcman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc.html@1.75 +2 -2
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpdc/ntpdc.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpq/ntpq-opts.c@1.249 +3 -3
+ NTP_4_2_7P247
+
+ ntpq/ntpq-opts.h@1.249 +3 -3
+ NTP_4_2_7P247
+
+ ntpq/ntpq-opts.texi@1.249 +2 -2
+ NTP_4_2_7P247
+
+ ntpq/ntpq.1ntpqman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpq/ntpq.1ntpqmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpq/ntpq.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpq/ntpq.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.249 +3 -3
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.249 +3 -3
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.249 +2 -2
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ packageinfo.sh@1.250 +1 -1
+ NTP_4_2_7P247
+
+ scripts/ntp-wait-opts.texi@1.67 +1 -1
+ NTP_4_2_7P247
+
+ scripts/ntp-wait.1ntp-waitman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ scripts/ntp-wait.html@1.67 +1 -1
+ NTP_4_2_7P247
+
+ scripts/ntp-wait.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ scripts/ntp-wait.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ sntp/sntp-opts.c@1.245 +3 -3
+ NTP_4_2_7P247
+
+ sntp/sntp-opts.h@1.245 +3 -3
+ NTP_4_2_7P247
+
+ sntp/sntp-opts.texi@1.245 +2 -2
+ NTP_4_2_7P247
+
+ sntp/sntp.1sntpman@1.65 +2 -2
+ NTP_4_2_7P247
+
+ sntp/sntp.1sntpmdoc@1.65 +1 -1
+ NTP_4_2_7P247
+
+ sntp/sntp.html@1.245 +2 -2
+ NTP_4_2_7P247
+
+ sntp/sntp.man.in@1.65 +2 -2
+ NTP_4_2_7P247
+
+ sntp/sntp.mdoc.in@1.65 +1 -1
+ NTP_4_2_7P247
+
+ util/ntp-keygen-opts.c@1.249 +3 -3
+ NTP_4_2_7P247
+
+ util/ntp-keygen-opts.h@1.249 +3 -3
+ NTP_4_2_7P247
+
+ util/ntp-keygen-opts.texi@1.250 +2 -2
+ NTP_4_2_7P247
+
+ util/ntp-keygen.1ntp-keygenman@1.63 +2 -2
+ NTP_4_2_7P247
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.63 +1 -1
+ NTP_4_2_7P247
+
+ util/ntp-keygen.man.in@1.63 +2 -2
+ NTP_4_2_7P247
+
+ util/ntp-keygen.mdoc.in@1.63 +1 -1
+ NTP_4_2_7P247
+
+ChangeSet@1.2741, 2012-01-06 20:05:11-05:00, stenn@deacon.udel.edu
+ cleanup
+
+ libntp/Makefile.am@1.66 +2 -2
+ cleanup
+
+ChangeSet@1.2740, 2012-01-06 18:38:02-05:00, stenn@deacon.udel.edu
+ tolerate an error touching a file in a read-only srcdir
+
+ libntp/Makefile.am@1.65 +1 -1
+ tolerate an error touching a file in a read-only srcdir
+
+ChangeSet@1.2739, 2012-01-06 22:31:21+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ Fix build break triggered by updating deps-ver and libntp/systime.c at
+ the same time by explicitly depending systime_s.c on systime.c.
+
+ ChangeLog@1.1091 +2 -0
+ Fix build break triggered by updating deps-ver and libntp/systime.c at
+ the same time by explicitly depending systime_s.c on systime.c.
+
+ libntp/Makefile.am@1.64 +8 -0
+ Fix build break triggered by updating deps-ver and libntp/systime.c at
+ the same time by explicitly depending systime_s.c on systime.c.
+
+ChangeSet@1.2738, 2012-01-06 22:04:11+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P246
+ TAG: NTP_4_2_7P246
+
+ ChangeLog@1.1090 +1 -0
+ NTP_4_2_7P246
+
+ ntpd/ntpd-opts.c@1.251 +3 -3
+ NTP_4_2_7P246
+
+ ntpd/ntpd-opts.h@1.251 +3 -3
+ NTP_4_2_7P246
+
+ ntpd/ntpd-opts.texi@1.249 +2 -2
+ NTP_4_2_7P246
+
+ ntpd/ntpd.1ntpdman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpd/ntpd.1ntpdmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpd/ntpd.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpd/ntpd.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc-opts.c@1.246 +3 -3
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc-opts.h@1.246 +3 -3
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc-opts.texi@1.246 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc.1ntpdcman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc.html@1.74 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpdc/ntpdc.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpq/ntpq-opts.c@1.248 +3 -3
+ NTP_4_2_7P246
+
+ ntpq/ntpq-opts.h@1.248 +3 -3
+ NTP_4_2_7P246
+
+ ntpq/ntpq-opts.texi@1.248 +2 -2
+ NTP_4_2_7P246
+
+ ntpq/ntpq.1ntpqman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpq/ntpq.1ntpqmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpq/ntpq.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpq/ntpq.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.248 +3 -3
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.248 +3 -3
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.248 +2 -2
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ packageinfo.sh@1.249 +1 -1
+ NTP_4_2_7P246
+
+ scripts/ntp-wait-opts.texi@1.66 +1 -1
+ NTP_4_2_7P246
+
+ scripts/ntp-wait.1ntp-waitman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ scripts/ntp-wait.html@1.66 +1 -1
+ NTP_4_2_7P246
+
+ scripts/ntp-wait.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ scripts/ntp-wait.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp-opts.c@1.244 +3 -3
+ NTP_4_2_7P246
+
+ sntp/sntp-opts.h@1.244 +3 -3
+ NTP_4_2_7P246
+
+ sntp/sntp-opts.texi@1.244 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp.1sntpman@1.64 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp.1sntpmdoc@1.64 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp.html@1.244 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp.man.in@1.64 +2 -2
+ NTP_4_2_7P246
+
+ sntp/sntp.mdoc.in@1.64 +2 -2
+ NTP_4_2_7P246
+
+ util/ntp-keygen-opts.c@1.248 +3 -3
+ NTP_4_2_7P246
+
+ util/ntp-keygen-opts.h@1.248 +3 -3
+ NTP_4_2_7P246
+
+ util/ntp-keygen-opts.texi@1.249 +2 -2
+ NTP_4_2_7P246
+
+ util/ntp-keygen.1ntp-keygenman@1.62 +2 -2
+ NTP_4_2_7P246
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.62 +2 -2
+ NTP_4_2_7P246
+
+ util/ntp-keygen.man.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ util/ntp-keygen.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P246
+
+ChangeSet@1.2732.1.1, 2012-01-05 19:29:42+00:00, davehart@dlh-7551.ad.hartbrothers.com
+ [Bug 2104] ntpdc fault with oversize -c command.
+ [Bug 2106] Fix warnings when using -Wformat-security.
+ Refactor timespecops.h and timevalops.h into inline functions.
+
+ BitKeeper/deleted/0e/fptoa.c~3e480692@1.5 +0 -0
+ Rename: libntp/fptoa.c -> BitKeeper/deleted/0e/fptoa.c~3e480692
+
+ BitKeeper/deleted/22/mfptoa.c~3e480692@1.5 +0 -0
+ Rename: libntp/mfptoa.c -> BitKeeper/deleted/22/mfptoa.c~3e480692
+
+ BitKeeper/deleted/40/tsftomsu.c~3e480692@1.5 +0 -0
+ Rename: libntp/tsftomsu.c -> BitKeeper/deleted/40/tsftomsu.c~3e480692
+
+ BitKeeper/deleted/6d/mfptoms.c~3e480692@1.5 +0 -0
+ Rename: libntp/mfptoms.c -> BitKeeper/deleted/6d/mfptoms.c~3e480692
+
+ BitKeeper/deleted/84/tvtots.c~3e480692@1.5 +0 -0
+ Rename: libntp/tvtots.c -> BitKeeper/deleted/84/tvtots.c~3e480692
+
+ BitKeeper/deleted/b0/tstotv.c~3e480692@1.5 +0 -0
+ Rename: libntp/tstotv.c -> BitKeeper/deleted/b0/tstotv.c~3e480692
+
+ BitKeeper/deleted/b2/msutotsf.c~3e480692@1.5 +0 -0
+ Rename: libntp/msutotsf.c -> BitKeeper/deleted/b2/msutotsf.c~3e480692
+
+ BitKeeper/deleted/b2/timespecops.c~89e74bdf8b9e22c4@1.8.1.1 +0 -0
+ Rename: libntp/timespecops.c -> BitKeeper/deleted/b2/timespecops.c~89e74bdf8b9e22c4
+
+ BitKeeper/deleted/ed/tsftomsu.cpp~5ef492abb78ec38b@1.2 +0 -0
+ Rename: tests/libntp/tsftomsu.cpp -> BitKeeper/deleted/ed/tsftomsu.cpp~5ef492abb78ec38b
+
+ BitKeeper/deleted/f5/fptoms.c~3e480692@1.5 +0 -0
+ Rename: libntp/fptoms.c -> BitKeeper/deleted/f5/fptoms.c~3e480692
+
+ BitKeeper/etc/ignore@1.84 +1 -0
+ added ports/winnt/vs2008/ntp.suo
+
+ ChangeLog@1.1085.1.1 +3 -0
+ [Bug 2104] ntpdc fault with oversize -c command.
+ [Bug 2106] Fix warnings when using -Wformat-security.
+ Refactor timespecops.h and timevalops.h into inline functions.
+
+ deps-ver@1.6 +1 -1
+ No longer building some libntp source files can trigger breakage via
+ stale Makefiles including nonexistent .deps/*.Po files. Bumping
+ deps-ver cleans older .deps dirs to cure the problem.
+
+ depsver.mf@1.3 +3 -10
+ Support tests/libntp use of depsver.mf by removing requirement that
+ consuming Makefile.am files be no deeper than one subdirectory from
+ the top $srcdir.
+
+ include/ntp_fp.h@1.28 +83 -59
+ remove lfp.l_f signed fraction, which has little legit use.
+ remove unused fraction argument from M_ISNEG().
+ style cleanup.
+
+ include/ntp_stdlib.h@1.70 +3 -3
+ use u_int32 not u_long for mfpto*() l_fp halves
+
+ include/ntp_types.h@1.31 +9 -0
+ provide NONEMPTY_TRANSLATION_UNIT macro for conditionally-compiled files.
+
+ include/ntp_unixtime.h@1.13 +1 -98
+ consolidate timeval conversion in timevalops.[ch]
+
+ include/timespecops.h@1.5 +295 -46
+ experiment with two levels of inlining timespecops/timevalops
+
+ include/timevalops.h@1.4 +369 -38
+ experiment with two levels of inlining timespecops/timevalops
+
+ lib/isc/include/isc/util.h@1.6 +1 -1
+ suppress "defined but not used" warning re: nonempty_translation_unit.
+
+ lib/isc/unix/ifiter_sysctl.c@1.17 +5 -4
+ [Bug 2106] Fix warnings when using -Wformat-security.
+
+ libntp/Makefile.am@1.63 +0 -9
+ consolidate several single-function source files
+
+ libntp/buftvtots.c@1.6 +7 -22
+ consolidate timeval conversion in timevalops.[ch]
+
+ libntp/dofptoa.c@1.9 +40 -0
+ consolidate several single-function source files
+
+ libntp/dolfptoa.c@1.11 +42 -3
+ consolidate several single-function source files
+
+ libntp/ntp_calendar.c@1.10 +1 -1
+ remove unused M_ISNEG() fraction argument
+
+ libntp/systime.c@1.62 +34 -48
+ Refine recent get_systime() fuzzing changes on non-interpolated clocks.
+ Conditionalize less iin get_systime() so measure_precision() sees
+ performance while calibrating which is closer to get_systime() use
+ later. Instead of comparing two doubles to decide if the rarely-
+ used simulation of a low-precision clock is configured via "tinker
+ tick", use a Bool-like int trunc_os_clock.
+
+ libntp/timevalops.c@1.7.1.1 +278 -347
+ refactor time*ops.h with renamed inline functions
+
+ libntp/work_thread.c@1.12 +1 -1
+ experiment with two levels of inlining timespecops/timevalops
+
+ libparse/clk_trimtsip.c@1.11 +1 -1
+ move timeval fraction macros to timevalops.h
+
+ libparse/parse.c@1.15 +1 -1
+ move timeval fraction macros to timevalops.h
+
+ ntpd/ntp_io.c@1.365 +3 -3
+ include timevalops.h explicitly
+
+ ntpd/ntp_proto.c@1.338 +41 -22
+ Minor refinement of prior precision and fuzz determination changes.
+
+ ntpd/ntp_request.c@1.109 +1 -1
+ remove l_fp.l_f signed fraction
+
+ ntpd/refclock_arc.c@1.28 +4 -2
+ remove l_fp.l_f signed fraction
+
+ ntpd/refclock_chu.c@1.53 +4 -2
+ remove l_fp.l_f signed fraction
+
+ ntpd/refclock_datum.c@1.20 +4 -2
+ move timeval fraction macros to timevalops.h
+
+ ntpd/refclock_leitch.c@1.15 +4 -2
+ move milllisecond/l_fp conversion macro to timevalops.h
+
+ ntpd/refclock_msfees.c@1.16 +7 -6
+ use tval_stamp_to_lfp() rather than buftvtots()
+
+ ntpd/refclock_nmea.c@1.65 +5 -3
+ refactor time*ops.h with renamed inline functions
+
+ ntpd/refclock_parse.c@1.63 +15 -34
+ use tval_stamp_to_lfp() rather than buftvtots().
+ remove l_fp.l_f signed fraction.
+
+ ntpd/refclock_shm.c@1.23 +7 -5
+ move timeval fraction macros to timevalops.h
+
+ ntpdate/ntpdate.c@1.90 +1 -1
+ move timeval fraction macros to timevalops.h
+
+ ntpdc/ntpdc.c@1.98 +5 -0
+ [Bug 2104] ntpdc fault with oversize -c command.
+
+ ports/winnt/include/termios.h@1.15 +1 -0
+ add overlooked tcflush() prototype referenced by refclock_parse.c
+
+ ports/winnt/vs2005/libntp.vcproj@1.21 +0 -36
+ consolidate several single-function source files
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.44 +2 -38
+ consolidate several single-function source files
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.42 +8 -0
+ add timespecops.h and timevalops.h references
+
+ sntp/main.c@1.80 +4 -4
+ refactor time*ops.h with renamed inline functions
+
+ tests/libntp/Makefile.am@1.37 +0 -1
+ remove tsftomsu.cpp as tested code was unused and removed.
+
+ tests/libntp/lfptostr.cpp@1.3 +2 -2
+ remove l_fp.l_f signed fraction
+
+ tests/libntp/strtolfp.cpp@1.9 +1 -1
+ remove l_fp.l_f signed fraction
+
+ tests/libntp/timespecops.cpp@1.6.1.1 +260 -144
+ refactor time*ops.h with renamed inline functions (thanks to Juergen
+ for helping refactor the tests).
+
+ tests/libntp/timestructs.cpp@1.1.1.1 +36 -7
+ refactor time*ops.h with renamed inline functions
+
+ tests/libntp/timestructs.h@1.1.1.1 +28 -2
+ Cherry-picked from Juergen's [Bug 2100] fix
+
+ tests/libntp/timevalops.cpp@1.6.1.1 +140 -59
+ experiment with two levels of inlining timespecops/timevalops
+
+ tests/libntp/tstotv.cpp@1.2 +1 -1
+ move timeval fraction macros to timevalops.h
+
+ tests/libntp/tvtots.cpp@1.6 +1 -1
+ move timeval fraction macros to timevalops.h
+
+ util/ntp-keygen.c@1.89 +1 -1
+ Resolve MAXFILENAME redefinition warning.
+
+ util/ntptime.c@1.24 +8 -1
+ move timeval fraction macros to timevalops.h
+
+ChangeSet@1.2736, 2011-12-31 11:27:35+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P245
+ TAG: NTP_4_2_7P245
+
+ ChangeLog@1.1088 +1 -0
+ NTP_4_2_7P245
+
+ ntpd/ntpd-opts.c@1.250 +3 -3
+ NTP_4_2_7P245
+
+ ntpd/ntpd-opts.h@1.250 +3 -3
+ NTP_4_2_7P245
+
+ ntpd/ntpd-opts.texi@1.248 +2 -2
+ NTP_4_2_7P245
+
+ ntpd/ntpd.1ntpdman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpd/ntpd.1ntpdmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpd/ntpd.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpd/ntpd.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc-opts.c@1.245 +3 -3
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc-opts.h@1.245 +3 -3
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc-opts.texi@1.245 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc.1ntpdcman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc.html@1.73 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpdc/ntpdc.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpq/ntpq-opts.c@1.247 +3 -3
+ NTP_4_2_7P245
+
+ ntpq/ntpq-opts.h@1.247 +3 -3
+ NTP_4_2_7P245
+
+ ntpq/ntpq-opts.texi@1.247 +2 -2
+ NTP_4_2_7P245
+
+ ntpq/ntpq.1ntpqman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpq/ntpq.1ntpqmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpq/ntpq.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpq/ntpq.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.247 +3 -3
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.247 +3 -3
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.247 +2 -2
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ packageinfo.sh@1.248 +1 -1
+ NTP_4_2_7P245
+
+ scripts/ntp-wait-opts.texi@1.65 +1 -1
+ NTP_4_2_7P245
+
+ scripts/ntp-wait.1ntp-waitman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ scripts/ntp-wait.html@1.65 +1 -1
+ NTP_4_2_7P245
+
+ scripts/ntp-wait.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ scripts/ntp-wait.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp-opts.c@1.243 +3 -3
+ NTP_4_2_7P245
+
+ sntp/sntp-opts.h@1.243 +3 -3
+ NTP_4_2_7P245
+
+ sntp/sntp-opts.texi@1.243 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp.1sntpman@1.63 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp.1sntpmdoc@1.63 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp.html@1.243 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp.man.in@1.63 +2 -2
+ NTP_4_2_7P245
+
+ sntp/sntp.mdoc.in@1.63 +2 -2
+ NTP_4_2_7P245
+
+ util/ntp-keygen-opts.c@1.247 +3 -3
+ NTP_4_2_7P245
+
+ util/ntp-keygen-opts.h@1.247 +3 -3
+ NTP_4_2_7P245
+
+ util/ntp-keygen-opts.texi@1.248 +2 -2
+ NTP_4_2_7P245
+
+ util/ntp-keygen.1ntp-keygenman@1.61 +2 -2
+ NTP_4_2_7P245
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.61 +2 -2
+ NTP_4_2_7P245
+
+ util/ntp-keygen.man.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ util/ntp-keygen.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P245
+
+ChangeSet@1.2735, 2011-12-30 21:10:00-05:00, stenn@deacon.udel.edu
+ typo
+
+ ChangeLog@1.1087 +3 -2
+ typo
+
+ChangeSet@1.2734, 2011-12-30 12:17:49+01:00, jnperlin@hydra.localnet
+ [Bug2100] conversion timespec/timeval <--> l_fp fixed
+
+ ChangeLog@1.1086 +2 -0
+ [Bug2100] conversion timespec/timeval <--> l_fp fixed
+
+ libntp/timespecops.c@1.9 +2 -2
+ [Bug2100] conversion l_fp --> timespec fixed
+
+ libntp/timevalops.c@1.8 +2 -2
+ [Bug2100] conversion lfp --> timeval fixed
+
+ChangeSet@1.2733, 2011-12-30 12:12:49+01:00, jnperlin@hydra.localnet
+ add test cases to reveal bug#2100
+ cleanup of test code
+
+ tests/libntp/timespecops.cpp@1.7 +229 -130
+ add test cases to reveal bug#2100
+ synchronise test cases & coding between timeval <--> timespec
+
+ tests/libntp/timestructs.cpp@1.2 +34 -1
+ use 'lfptoa' for printing l_fp values
+ timespec closeness predicate implementation
+
+ tests/libntp/timestructs.h@1.2 +27 -0
+ added copy C'TORs to timespec/timeval wrappers,
+ added a timespec closeness predicate class
+
+ tests/libntp/timevalops.cpp@1.7 +109 -45
+ add test cases to reveal bug#2100
+ synchronise test cases & coding between timeval <--> timespec
+
+ChangeSet@1.2732, 2011-12-25 11:32:25+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P244
+ TAG: NTP_4_2_7P244
+
+ ChangeLog@1.1085 +1 -0
+ NTP_4_2_7P244
+
+ ntpd/ntpd-opts.c@1.249 +3 -3
+ NTP_4_2_7P244
+
+ ntpd/ntpd-opts.h@1.249 +3 -3
+ NTP_4_2_7P244
+
+ ntpd/ntpd-opts.texi@1.247 +2 -2
+ NTP_4_2_7P244
+
+ ntpd/ntpd.1ntpdman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpd/ntpd.1ntpdmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpd/ntpd.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpd/ntpd.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc-opts.c@1.244 +3 -3
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc-opts.h@1.244 +3 -3
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc-opts.texi@1.244 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc.1ntpdcman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc.html@1.72 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpdc/ntpdc.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpq/ntpq-opts.c@1.246 +3 -3
+ NTP_4_2_7P244
+
+ ntpq/ntpq-opts.h@1.246 +3 -3
+ NTP_4_2_7P244
+
+ ntpq/ntpq-opts.texi@1.246 +2 -2
+ NTP_4_2_7P244
+
+ ntpq/ntpq.1ntpqman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpq/ntpq.1ntpqmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpq/ntpq.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpq/ntpq.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.246 +3 -3
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.246 +3 -3
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.246 +2 -2
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ packageinfo.sh@1.247 +1 -1
+ NTP_4_2_7P244
+
+ scripts/ntp-wait-opts.texi@1.64 +1 -1
+ NTP_4_2_7P244
+
+ scripts/ntp-wait.1ntp-waitman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ scripts/ntp-wait.html@1.64 +1 -1
+ NTP_4_2_7P244
+
+ scripts/ntp-wait.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ scripts/ntp-wait.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp-opts.c@1.242 +3 -3
+ NTP_4_2_7P244
+
+ sntp/sntp-opts.h@1.242 +3 -3
+ NTP_4_2_7P244
+
+ sntp/sntp-opts.texi@1.242 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp.1sntpman@1.62 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp.1sntpmdoc@1.62 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp.html@1.242 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp.man.in@1.62 +2 -2
+ NTP_4_2_7P244
+
+ sntp/sntp.mdoc.in@1.62 +2 -2
+ NTP_4_2_7P244
+
+ util/ntp-keygen-opts.c@1.246 +3 -3
+ NTP_4_2_7P244
+
+ util/ntp-keygen-opts.h@1.246 +3 -3
+ NTP_4_2_7P244
+
+ util/ntp-keygen-opts.texi@1.247 +2 -2
+ NTP_4_2_7P244
+
+ util/ntp-keygen.1ntp-keygenman@1.60 +2 -2
+ NTP_4_2_7P244
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.60 +2 -2
+ NTP_4_2_7P244
+
+ util/ntp-keygen.man.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ util/ntp-keygen.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P244
+
+ChangeSet@1.2082.4.262, 2011-12-24 18:34:58-05:00, stenn@deacon.udel.edu
NTP_4_2_6P5
TAG: NTP_4_2_6P5
- ChangeLog@1.753 +1 -0
+ ChangeLog@1.496.26.186 +1 -0
NTP_4_2_6P5
- ntpd/ntpd-opts.c@1.291 +5 -5
+ ntpd/ntpd-opts.c@1.248.43.1 +5 -5
NTP_4_2_6P5
- ntpd/ntpd-opts.h@1.291 +3 -3
+ ntpd/ntpd-opts.h@1.248.43.1 +3 -3
NTP_4_2_6P5
- ntpd/ntpd-opts.texi@1.288 +2 -2
+ ntpd/ntpd-opts.texi@1.246.42.1 +2 -2
NTP_4_2_6P5
- ntpd/ntpd.1@1.288 +2 -2
+ ntpd/ntpd.1@1.246.42.1 +2 -2
NTP_4_2_6P5
- ntpdc/ntpdc-opts.c@1.287 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.43.1 +5 -5
NTP_4_2_6P5
- ntpdc/ntpdc-opts.h@1.287 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.43.1 +3 -3
NTP_4_2_6P5
- ntpdc/ntpdc-opts.texi@1.285 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.42.1 +2 -2
NTP_4_2_6P5
- ntpdc/ntpdc.1@1.285 +2 -2
+ ntpdc/ntpdc.1@1.243.42.1 +2 -2
NTP_4_2_6P5
- ntpq/ntpq-opts.c@1.288 +5 -5
+ ntpq/ntpq-opts.c@1.245.43.1 +5 -5
NTP_4_2_6P5
- ntpq/ntpq-opts.h@1.288 +3 -3
+ ntpq/ntpq-opts.h@1.245.43.1 +3 -3
NTP_4_2_6P5
- ntpq/ntpq-opts.texi@1.286 +2 -2
+ ntpq/ntpq-opts.texi@1.244.42.1 +2 -2
NTP_4_2_6P5
- ntpq/ntpq.1@1.286 +2 -2
+ ntpq/ntpq.1@1.244.42.1 +2 -2
NTP_4_2_6P5
- ntpsnmpd/ntpsnmpd-opts.c@1.167 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.44.1 +5 -5
NTP_4_2_6P5
- ntpsnmpd/ntpsnmpd-opts.h@1.167 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.44.1 +3 -3
NTP_4_2_6P5
- ntpsnmpd/ntpsnmpd-opts.texi@1.166 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.43.1 +2 -2
NTP_4_2_6P5
- ntpsnmpd/ntpsnmpd.1@1.165 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.43.1 +2 -2
NTP_4_2_6P5
- packageinfo.sh@1.306 +2 -2
+ packageinfo.sh@1.255.40.2 +2 -2
NTP_4_2_6P5
- sntp/sntp-opts.c@1.159 +5 -5
+ sntp/sntp-opts.c@1.117.42.1 +5 -5
NTP_4_2_6P5
- sntp/sntp-opts.h@1.159 +3 -3
+ sntp/sntp-opts.h@1.117.42.1 +3 -3
NTP_4_2_6P5
- sntp/sntp-opts.texi@1.158 +2 -2
+ sntp/sntp-opts.texi@1.117.41.1 +2 -2
NTP_4_2_6P5
- sntp/sntp.1@1.158 +2 -2
+ sntp/sntp.1@1.117.41.1 +2 -2
NTP_4_2_6P5
- sntp/sntp.html@1.49 +2 -2
+ sntp/sntp.html@1.7.42.1 +2 -2
NTP_4_2_6P5
- util/ntp-keygen-opts.c@1.290 +5 -5
+ util/ntp-keygen-opts.c@1.247.43.1 +5 -5
NTP_4_2_6P5
- util/ntp-keygen-opts.h@1.290 +3 -3
+ util/ntp-keygen-opts.h@1.247.43.1 +3 -3
NTP_4_2_6P5
- util/ntp-keygen-opts.texi@1.288 +2 -2
+ util/ntp-keygen-opts.texi@1.246.42.1 +2 -2
NTP_4_2_6P5
- util/ntp-keygen.1@1.288 +2 -2
+ util/ntp-keygen.1@1.246.42.1 +2 -2
NTP_4_2_6P5
-ChangeSet@1.2348, 2011-12-24 18:21:54-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.261, 2011-12-24 18:21:54-05:00, stenn@deacon.udel.edu
ntp-4.2.6p5
- packageinfo.sh@1.305 +3 -2
+ packageinfo.sh@1.255.40.1 +3 -2
ntp-4.2.6p5
-ChangeSet@1.2347, 2011-12-24 18:08:51-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.260, 2011-12-24 18:08:51-05:00, stenn@deacon.udel.edu
fix typos
- NEWS@1.127 +8 -8
+ NEWS@1.122.1.5 +8 -8
fix typos
-ChangeSet@1.2346, 2011-12-24 17:47:02-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.259, 2011-12-24 17:47:02-05:00, stenn@deacon.udel.edu
NEWS cleanup
- NEWS@1.126 +25 -21
+ NEWS@1.122.1.4 +25 -21
NEWS cleanup
-ChangeSet@1.2345, 2011-12-23 22:48:14-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.258, 2011-12-23 22:48:14-05:00, stenn@deacon.udel.edu
NEWS file cleanup
- ChangeLog@1.752 +3 -0
+ ChangeLog@1.496.26.185 +3 -0
NEWS file cleanup
- NEWS@1.125 +6 -8
+ NEWS@1.122.1.3 +6 -8
NEWS file cleanup
-ChangeSet@1.2344, 2011-12-08 21:09:05-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2730, 2011-12-23 04:43:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P243
+ TAG: NTP_4_2_7P243
+
+ ChangeLog@1.1083 +1 -0
+ NTP_4_2_7P243
+
+ ntpd/ntpd-opts.c@1.248 +3 -3
+ NTP_4_2_7P243
+
+ ntpd/ntpd-opts.h@1.248 +3 -3
+ NTP_4_2_7P243
+
+ ntpd/ntpd-opts.texi@1.246 +2 -2
+ NTP_4_2_7P243
+
+ ntpd/ntpd.1ntpdman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpd/ntpd.1ntpdmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpd/ntpd.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpd/ntpd.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc-opts.c@1.243 +3 -3
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc-opts.h@1.243 +3 -3
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc-opts.texi@1.243 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc.1ntpdcman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc.html@1.71 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpdc/ntpdc.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpq/ntpq-opts.c@1.245 +3 -3
+ NTP_4_2_7P243
+
+ ntpq/ntpq-opts.h@1.245 +3 -3
+ NTP_4_2_7P243
+
+ ntpq/ntpq-opts.texi@1.245 +2 -2
+ NTP_4_2_7P243
+
+ ntpq/ntpq.1ntpqman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpq/ntpq.1ntpqmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpq/ntpq.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpq/ntpq.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.245 +3 -3
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.245 +3 -3
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.245 +2 -2
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ packageinfo.sh@1.246 +1 -1
+ NTP_4_2_7P243
+
+ scripts/ntp-wait-opts.texi@1.63 +1 -1
+ NTP_4_2_7P243
+
+ scripts/ntp-wait.1ntp-waitman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ scripts/ntp-wait.html@1.63 +1 -1
+ NTP_4_2_7P243
+
+ scripts/ntp-wait.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ scripts/ntp-wait.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp-opts.c@1.241 +3 -3
+ NTP_4_2_7P243
+
+ sntp/sntp-opts.h@1.241 +3 -3
+ NTP_4_2_7P243
+
+ sntp/sntp-opts.texi@1.241 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp.1sntpman@1.61 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp.1sntpmdoc@1.61 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp.html@1.241 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp.man.in@1.61 +2 -2
+ NTP_4_2_7P243
+
+ sntp/sntp.mdoc.in@1.61 +2 -2
+ NTP_4_2_7P243
+
+ util/ntp-keygen-opts.c@1.245 +3 -3
+ NTP_4_2_7P243
+
+ util/ntp-keygen-opts.h@1.245 +3 -3
+ NTP_4_2_7P243
+
+ util/ntp-keygen-opts.texi@1.246 +2 -2
+ NTP_4_2_7P243
+
+ util/ntp-keygen.1ntp-keygenman@1.59 +2 -2
+ NTP_4_2_7P243
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.59 +2 -2
+ NTP_4_2_7P243
+
+ util/ntp-keygen.man.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ util/ntp-keygen.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P243
+
+ChangeSet@1.2729, 2011-12-22 23:22:36-05:00, stenn@deacon.udel.edu
+ typo
+
+ ChangeLog@1.1082 +1 -1
+ typo
+
+ChangeSet@1.2728, 2011-12-22 23:07:30-05:00, stenn@deacon.udel.edu
+ [Bug 2095] ntptrace now needs 'rv' instead pf 'pstat', reported by Michael Tatarinov
+
+ ChangeLog@1.1081 +2 -0
+ [Bug 2095] ntptrace now needs 'rv' instead pf 'pstat', reported by Michael Tatarinov
+
+ scripts/ntptrace.in@1.7 +1 -1
+ [Bug 2095] ntptrace now needs 'rv' instead pf 'pstat', reported by Michael Tatarinov
+
+ChangeSet@1.2727, 2011-12-21 21:08:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P242
+ TAG: NTP_4_2_7P242
+
+ ChangeLog@1.1080 +1 -0
+ NTP_4_2_7P242
+
+ ntpd/ntpd-opts.c@1.247 +3 -3
+ NTP_4_2_7P242
+
+ ntpd/ntpd-opts.h@1.247 +3 -3
+ NTP_4_2_7P242
+
+ ntpd/ntpd-opts.texi@1.245 +2 -2
+ NTP_4_2_7P242
+
+ ntpd/ntpd.1ntpdman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpd/ntpd.1ntpdmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpd/ntpd.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpd/ntpd.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc-opts.c@1.242 +3 -3
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc-opts.h@1.242 +3 -3
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc-opts.texi@1.242 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc.1ntpdcman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc.html@1.70 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpdc/ntpdc.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpq/ntpq-opts.c@1.244 +3 -3
+ NTP_4_2_7P242
+
+ ntpq/ntpq-opts.h@1.244 +3 -3
+ NTP_4_2_7P242
+
+ ntpq/ntpq-opts.texi@1.244 +2 -2
+ NTP_4_2_7P242
+
+ ntpq/ntpq.1ntpqman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpq/ntpq.1ntpqmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpq/ntpq.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpq/ntpq.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.244 +3 -3
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.244 +3 -3
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.244 +2 -2
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ packageinfo.sh@1.245 +1 -1
+ NTP_4_2_7P242
+
+ scripts/ntp-wait-opts.texi@1.62 +1 -1
+ NTP_4_2_7P242
+
+ scripts/ntp-wait.1ntp-waitman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ scripts/ntp-wait.html@1.62 +1 -1
+ NTP_4_2_7P242
+
+ scripts/ntp-wait.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ scripts/ntp-wait.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp-opts.c@1.240 +3 -3
+ NTP_4_2_7P242
+
+ sntp/sntp-opts.h@1.240 +3 -3
+ NTP_4_2_7P242
+
+ sntp/sntp-opts.texi@1.240 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp.1sntpman@1.60 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp.1sntpmdoc@1.60 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp.html@1.240 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp.man.in@1.60 +2 -2
+ NTP_4_2_7P242
+
+ sntp/sntp.mdoc.in@1.60 +2 -2
+ NTP_4_2_7P242
+
+ util/ntp-keygen-opts.c@1.244 +3 -3
+ NTP_4_2_7P242
+
+ util/ntp-keygen-opts.h@1.244 +3 -3
+ NTP_4_2_7P242
+
+ util/ntp-keygen-opts.texi@1.245 +2 -2
+ NTP_4_2_7P242
+
+ util/ntp-keygen.1ntp-keygenman@1.58 +2 -2
+ NTP_4_2_7P242
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.58 +2 -2
+ NTP_4_2_7P242
+
+ util/ntp-keygen.man.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ util/ntp-keygen.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P242
+
+ChangeSet@1.2726, 2011-12-21 15:05:08-05:00, stenn@deacon.udel.edu
+ Documentation updates
+
+ ChangeLog@1.1079 +1 -0
+ Include missing html/icons/sitemap.png, reported by Michael Tatarinov
+
+ ChangeLog@1.1078 +1 -0
+ Documentation updates from Dave Mills
+
+ html/icons/sitemap.png@1.1 +64 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/icons/sitemap.png
+
+ html/icons/sitemap.png@1.0 +0 -0
+
+ html/prefer.html@1.30 +3 -3
+ Documentation updates from Dave Mills
+
+ html/select.html@1.6 +2 -2
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.21 +6 -8
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2725, 2011-12-18 22:08:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P241
+ TAG: NTP_4_2_7P241
+
+ ChangeLog@1.1077 +1 -0
+ NTP_4_2_7P241
+
+ ntpd/ntpd-opts.c@1.246 +3 -3
+ NTP_4_2_7P241
+
+ ntpd/ntpd-opts.h@1.246 +3 -3
+ NTP_4_2_7P241
+
+ ntpd/ntpd-opts.texi@1.244 +2 -2
+ NTP_4_2_7P241
+
+ ntpd/ntpd.1ntpdman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpd/ntpd.1ntpdmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpd/ntpd.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpd/ntpd.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc-opts.c@1.241 +3 -3
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc-opts.h@1.241 +3 -3
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc-opts.texi@1.241 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc.1ntpdcman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc.html@1.69 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpdc/ntpdc.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpq/ntpq-opts.c@1.243 +3 -3
+ NTP_4_2_7P241
+
+ ntpq/ntpq-opts.h@1.243 +3 -3
+ NTP_4_2_7P241
+
+ ntpq/ntpq-opts.texi@1.243 +2 -2
+ NTP_4_2_7P241
+
+ ntpq/ntpq.1ntpqman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpq/ntpq.1ntpqmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpq/ntpq.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpq/ntpq.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.243 +3 -3
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.243 +3 -3
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.243 +2 -2
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ packageinfo.sh@1.244 +1 -1
+ NTP_4_2_7P241
+
+ scripts/ntp-wait-opts.texi@1.61 +1 -1
+ NTP_4_2_7P241
+
+ scripts/ntp-wait.1ntp-waitman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ scripts/ntp-wait.html@1.61 +1 -1
+ NTP_4_2_7P241
+
+ scripts/ntp-wait.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ scripts/ntp-wait.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp-opts.c@1.239 +3 -3
+ NTP_4_2_7P241
+
+ sntp/sntp-opts.h@1.239 +3 -3
+ NTP_4_2_7P241
+
+ sntp/sntp-opts.texi@1.239 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp.1sntpman@1.59 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp.1sntpmdoc@1.59 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp.html@1.239 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp.man.in@1.59 +2 -2
+ NTP_4_2_7P241
+
+ sntp/sntp.mdoc.in@1.59 +2 -2
+ NTP_4_2_7P241
+
+ util/ntp-keygen-opts.c@1.243 +3 -3
+ NTP_4_2_7P241
+
+ util/ntp-keygen-opts.h@1.243 +3 -3
+ NTP_4_2_7P241
+
+ util/ntp-keygen-opts.texi@1.244 +2 -2
+ NTP_4_2_7P241
+
+ util/ntp-keygen.1ntp-keygenman@1.57 +2 -2
+ NTP_4_2_7P241
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.57 +2 -2
+ NTP_4_2_7P241
+
+ util/ntp-keygen.man.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ util/ntp-keygen.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P241
+
+ChangeSet@1.2724, 2011-12-18 04:24:58+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+ [Bug 2068] "tos ceiling" default and cap changed to 15.
+ Floor peer delay using system precision, as with jitter, reflecting
+ inability to measure shorter intervals.
+
+ ChangeLog@1.1076 +4 -0
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+ [Bug 2068] "tos ceiling" default and cap changed to 15.
+ Floor peer delay using system precision, as with jitter, reflecting
+ inability to measure shorter intervals.
+
+ include/ntp.h@1.202 +2 -1
+ move sys_tick override from proto_config() to loop_config()
+
+ include/ntp_stdlib.h@1.69 +1 -0
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+
+ include/ntp_unixtime.h@1.12 +2 -0
+ include timespecops.h and timevalops.h
+
+ include/ntpd.h@1.171 +1 -0
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+
+ libntp/systime.c@1.61 +11 -3
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+
+ ntpd/complete.conf@1.21 +1 -1
+ add "tinker tick 0.01" coverage
+
+ ntpd/ntp_config.c@1.296 +17 -4
+ support "tinker tick 0.01" syntax alongside older "tick 0.01"
+ [Bug 2068] "tos ceiling" default and cap changed to 15.
+
+ ntpd/ntp_control.c@1.178 +8 -2
+ Expose sys_fuzz to ntpq as nondefault system variable fuzz.
+
+ ntpd/ntp_io.c@1.364 +30 -25
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+
+ ntpd/ntp_loopfilter.c@1.169 +5 -1
+ move sys_tick override from proto_config() to loop_config()
+
+ ntpd/ntp_parser.c@1.78 +428 -424
+ Bison output for ntp_parser.y
+
+ ntpd/ntp_parser.y@1.72 +1 -0
+ support "tinker tick 0.01" syntax alongside older "tick 0.01"
+
+ ntpd/ntp_proto.c@1.337 +46 -17
+ [Bug 2015] Overriding sys_tick should recalculate sys_precision.
+ [Bug 2068] "tos ceiling" default and cap changed to 15.
+ Floor peer delay using system precision, as with jitter, reflecting
+ inability to measure shorter intervals.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.55 +6 -13
+ nonfunctional cleanup
+
+ util/ntp-keygen.c@1.88 +1 -2
+ remove now-redundant MAXHOSTNAME declaration (in ntp.h)
+
+ChangeSet@1.2713.1.1, 2011-12-17 02:30:42+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ ChangeLog@1.1065.1.1 +1 -0
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ include/ntp_fp.h@1.27 +7 -1
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ include/ntp_stdlib.h@1.68 +2 -1
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ libntp/systime.c@1.58.1.1 +151 -74
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ libntp/timespecops.c@1.8 +1 -1
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ ntpd/ntp_proto.c@1.332.1.1 +57 -23
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ ntpd/refclock_arc.c@1.27 +1 -1
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.54 +11 -2
+ [Bug 2037] Fuzzed non-interpolated clock may decrease.
+
+ChangeSet@1.2722, 2011-12-15 08:50:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P240
+ TAG: NTP_4_2_7P240
+
+ ChangeLog@1.1074 +1 -0
+ NTP_4_2_7P240
+
+ ntpd/ntpd-opts.c@1.245 +3 -3
+ NTP_4_2_7P240
+
+ ntpd/ntpd-opts.h@1.245 +3 -3
+ NTP_4_2_7P240
+
+ ntpd/ntpd-opts.texi@1.243 +2 -2
+ NTP_4_2_7P240
+
+ ntpd/ntpd.1ntpdman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpd/ntpd.1ntpdmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpd/ntpd.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpd/ntpd.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc-opts.c@1.240 +3 -3
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc-opts.h@1.240 +3 -3
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc-opts.texi@1.240 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc.1ntpdcman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc.html@1.68 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpdc/ntpdc.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpq/ntpq-opts.c@1.242 +3 -3
+ NTP_4_2_7P240
+
+ ntpq/ntpq-opts.h@1.242 +3 -3
+ NTP_4_2_7P240
+
+ ntpq/ntpq-opts.texi@1.242 +2 -2
+ NTP_4_2_7P240
+
+ ntpq/ntpq.1ntpqman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpq/ntpq.1ntpqmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpq/ntpq.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpq/ntpq.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.242 +3 -3
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.242 +3 -3
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.242 +2 -2
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ packageinfo.sh@1.243 +1 -1
+ NTP_4_2_7P240
+
+ scripts/ntp-wait-opts.texi@1.60 +1 -1
+ NTP_4_2_7P240
+
+ scripts/ntp-wait.1ntp-waitman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ scripts/ntp-wait.html@1.60 +1 -1
+ NTP_4_2_7P240
+
+ scripts/ntp-wait.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ scripts/ntp-wait.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp-opts.c@1.238 +3 -3
+ NTP_4_2_7P240
+
+ sntp/sntp-opts.h@1.238 +3 -3
+ NTP_4_2_7P240
+
+ sntp/sntp-opts.texi@1.238 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp.1sntpman@1.58 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp.1sntpmdoc@1.58 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp.html@1.238 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp.man.in@1.58 +2 -2
+ NTP_4_2_7P240
+
+ sntp/sntp.mdoc.in@1.58 +2 -2
+ NTP_4_2_7P240
+
+ util/ntp-keygen-opts.c@1.242 +3 -3
+ NTP_4_2_7P240
+
+ util/ntp-keygen-opts.h@1.242 +3 -3
+ NTP_4_2_7P240
+
+ util/ntp-keygen-opts.texi@1.243 +2 -2
+ NTP_4_2_7P240
+
+ util/ntp-keygen.1ntp-keygenman@1.56 +2 -2
+ NTP_4_2_7P240
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.56 +2 -2
+ NTP_4_2_7P240
+
+ util/ntp-keygen.man.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ util/ntp-keygen.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P240
+
+ChangeSet@1.2721, 2011-12-15 03:27:02+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2092] clock_select() selection jitter miscalculated.
+ [Bug 2093] Reintroduce smaller stratum factor to system peer metric.
+
+ ChangeLog@1.1073 +2 -0
+ [Bug 2092] clock_select() selection jitter miscalculated.
+ [Bug 2093] Reintroduce smaller stratum factor to system peer metric.
+
+ include/ntp_calendar.h@1.11 +14 -12
+ Reduce use of magic precomputed numbers in favor of construction.
+
+ include/ntp_unixtime.h@1.11 +5 -2
+ Reduce use of magic precomputed numbers in favor of construction.
+
+ libntp/humandate.c@1.11 +0 -1
+ Remove declaration now redundant with ntp_calendar.h
+
+ ntpd/ntp_proto.c@1.335 +157 -164
+ [Bug 2092] clock_select() selection jitter miscalculated.
+ [Bug 2093] Reintroduce smaller stratum factor to system peer metric.
+ Refactor clock_select() to use single peers array of new peer_select
+ struct instead of separate synch and error arrays kept in sync,
+ no longer sort peers array by selection metric.
+
+ChangeSet@1.2720, 2011-12-11 11:39:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P239
+ TAG: NTP_4_2_7P239
+
+ ChangeLog@1.1072 +1 -0
+ NTP_4_2_7P239
+
+ ntpd/ntpd-opts.c@1.244 +3 -3
+ NTP_4_2_7P239
+
+ ntpd/ntpd-opts.h@1.244 +3 -3
+ NTP_4_2_7P239
+
+ ntpd/ntpd-opts.texi@1.242 +2 -2
+ NTP_4_2_7P239
+
+ ntpd/ntpd.1ntpdman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpd/ntpd.1ntpdmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpd/ntpd.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpd/ntpd.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc-opts.c@1.239 +3 -3
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc-opts.h@1.239 +3 -3
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc-opts.texi@1.239 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc.1ntpdcman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc.html@1.67 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpdc/ntpdc.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpq/ntpq-opts.c@1.241 +3 -3
+ NTP_4_2_7P239
+
+ ntpq/ntpq-opts.h@1.241 +3 -3
+ NTP_4_2_7P239
+
+ ntpq/ntpq-opts.texi@1.241 +2 -2
+ NTP_4_2_7P239
+
+ ntpq/ntpq.1ntpqman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpq/ntpq.1ntpqmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpq/ntpq.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpq/ntpq.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.241 +3 -3
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.241 +3 -3
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.241 +2 -2
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ packageinfo.sh@1.242 +1 -1
+ NTP_4_2_7P239
+
+ scripts/ntp-wait-opts.texi@1.59 +1 -1
+ NTP_4_2_7P239
+
+ scripts/ntp-wait.1ntp-waitman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ scripts/ntp-wait.html@1.59 +1 -1
+ NTP_4_2_7P239
+
+ scripts/ntp-wait.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ scripts/ntp-wait.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp-opts.c@1.237 +3 -3
+ NTP_4_2_7P239
+
+ sntp/sntp-opts.h@1.237 +3 -3
+ NTP_4_2_7P239
+
+ sntp/sntp-opts.texi@1.237 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp.1sntpman@1.57 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp.1sntpmdoc@1.57 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp.html@1.237 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp.man.in@1.57 +2 -2
+ NTP_4_2_7P239
+
+ sntp/sntp.mdoc.in@1.57 +2 -2
+ NTP_4_2_7P239
+
+ util/ntp-keygen-opts.c@1.241 +3 -3
+ NTP_4_2_7P239
+
+ util/ntp-keygen-opts.h@1.241 +3 -3
+ NTP_4_2_7P239
+
+ util/ntp-keygen-opts.texi@1.242 +2 -2
+ NTP_4_2_7P239
+
+ util/ntp-keygen.1ntp-keygenman@1.55 +2 -2
+ NTP_4_2_7P239
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.55 +2 -2
+ NTP_4_2_7P239
+
+ util/ntp-keygen.man.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ util/ntp-keygen.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P239
+
+ChangeSet@1.2719, 2011-12-11 05:57:08-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1071 +1 -0
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.7 +4 -3
+ Documentation updates from Dave Mills
+
+ html/filter.html@1.5 +7 -6
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.29 +20 -33
+ Documentation updates from Dave Mills
+
+ html/select.html@1.5 +10 -3
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.20 +12 -12
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2718, 2011-12-09 19:19:04+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P238
+ TAG: NTP_4_2_7P238
+
+ ChangeLog@1.1070 +1 -0
+ NTP_4_2_7P238
+
+ ntpd/ntpd-opts.c@1.243 +3 -3
+ NTP_4_2_7P238
+
+ ntpd/ntpd-opts.h@1.243 +3 -3
+ NTP_4_2_7P238
+
+ ntpd/ntpd-opts.texi@1.241 +2 -2
+ NTP_4_2_7P238
+
+ ntpd/ntpd.1ntpdman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpd/ntpd.1ntpdmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpd/ntpd.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpd/ntpd.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc-opts.c@1.238 +3 -3
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc-opts.h@1.238 +3 -3
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc-opts.texi@1.238 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc.1ntpdcman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc.html@1.66 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpdc/ntpdc.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpq/ntpq-opts.c@1.240 +3 -3
+ NTP_4_2_7P238
+
+ ntpq/ntpq-opts.h@1.240 +3 -3
+ NTP_4_2_7P238
+
+ ntpq/ntpq-opts.texi@1.240 +2 -2
+ NTP_4_2_7P238
+
+ ntpq/ntpq.1ntpqman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpq/ntpq.1ntpqmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpq/ntpq.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpq/ntpq.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.240 +3 -3
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.240 +3 -3
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.240 +2 -2
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ packageinfo.sh@1.241 +1 -1
+ NTP_4_2_7P238
+
+ scripts/ntp-wait-opts.texi@1.58 +1 -1
+ NTP_4_2_7P238
+
+ scripts/ntp-wait.1ntp-waitman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ scripts/ntp-wait.html@1.58 +1 -1
+ NTP_4_2_7P238
+
+ scripts/ntp-wait.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ scripts/ntp-wait.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp-opts.c@1.236 +3 -3
+ NTP_4_2_7P238
+
+ sntp/sntp-opts.h@1.236 +3 -3
+ NTP_4_2_7P238
+
+ sntp/sntp-opts.texi@1.236 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp.1sntpman@1.56 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp.1sntpmdoc@1.56 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp.html@1.236 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp.man.in@1.56 +2 -2
+ NTP_4_2_7P238
+
+ sntp/sntp.mdoc.in@1.56 +2 -2
+ NTP_4_2_7P238
+
+ util/ntp-keygen-opts.c@1.240 +3 -3
+ NTP_4_2_7P238
+
+ util/ntp-keygen-opts.h@1.240 +3 -3
+ NTP_4_2_7P238
+
+ util/ntp-keygen-opts.texi@1.241 +2 -2
+ NTP_4_2_7P238
+
+ util/ntp-keygen.1ntp-keygenman@1.54 +2 -2
+ NTP_4_2_7P238
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.54 +2 -2
+ NTP_4_2_7P238
+
+ util/ntp-keygen.man.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ util/ntp-keygen.mdoc.in@1.54 +2 -2
+ NTP_4_2_7P238
+
+ChangeSet@1.2082.4.257, 2011-12-08 21:09:05-05:00, stenn@deacon.udel.edu
NTP_4_2_6P5_RC3
TAG: NTP_4_2_6P5_RC3
- ChangeLog@1.751 +1 -0
+ ChangeLog@1.496.26.184 +1 -0
NTP_4_2_6P5_RC3
- ntpd/ntpd-opts.c@1.290 +3 -3
+ ntpd/ntpd-opts.c@1.248.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpd/ntpd-opts.h@1.290 +3 -3
+ ntpd/ntpd-opts.h@1.248.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpd/ntpd-opts.texi@1.287 +2 -2
+ ntpd/ntpd-opts.texi@1.246.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpd/ntpd.1@1.287 +2 -2
+ ntpd/ntpd.1@1.246.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpdc/ntpdc-opts.c@1.286 +3 -3
+ ntpdc/ntpdc-opts.c@1.244.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpdc/ntpdc-opts.h@1.286 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpdc/ntpdc-opts.texi@1.284 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpdc/ntpdc.1@1.284 +2 -2
+ ntpdc/ntpdc.1@1.243.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpq/ntpq-opts.c@1.287 +3 -3
+ ntpq/ntpq-opts.c@1.245.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpq/ntpq-opts.h@1.287 +3 -3
+ ntpq/ntpq-opts.h@1.245.42.1 +3 -3
NTP_4_2_6P5_RC3
- ntpq/ntpq-opts.texi@1.285 +2 -2
+ ntpq/ntpq-opts.texi@1.244.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpq/ntpq.1@1.285 +2 -2
+ ntpq/ntpq.1@1.244.41.1 +2 -2
NTP_4_2_6P5_RC3
- ntpsnmpd/ntpsnmpd-opts.c@1.166 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.43.1 +3 -3
NTP_4_2_6P5_RC3
- ntpsnmpd/ntpsnmpd-opts.h@1.166 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.43.1 +3 -3
NTP_4_2_6P5_RC3
- ntpsnmpd/ntpsnmpd-opts.texi@1.165 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.42.1 +2 -2
NTP_4_2_6P5_RC3
- ntpsnmpd/ntpsnmpd.1@1.164 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.42.1 +2 -2
NTP_4_2_6P5_RC3
- packageinfo.sh@1.304 +1 -1
+ packageinfo.sh@1.255.39.1 +1 -1
NTP_4_2_6P5_RC3
- sntp/sntp-opts.c@1.158 +3 -3
+ sntp/sntp-opts.c@1.117.41.1 +3 -3
NTP_4_2_6P5_RC3
- sntp/sntp-opts.h@1.158 +3 -3
+ sntp/sntp-opts.h@1.117.41.1 +3 -3
NTP_4_2_6P5_RC3
- sntp/sntp-opts.texi@1.157 +2 -2
+ sntp/sntp-opts.texi@1.117.40.1 +2 -2
NTP_4_2_6P5_RC3
- sntp/sntp.1@1.157 +2 -2
+ sntp/sntp.1@1.117.40.1 +2 -2
NTP_4_2_6P5_RC3
- sntp/sntp.html@1.48 +2 -2
+ sntp/sntp.html@1.7.41.1 +2 -2
NTP_4_2_6P5_RC3
- util/ntp-keygen-opts.c@1.289 +3 -3
+ util/ntp-keygen-opts.c@1.247.42.1 +3 -3
NTP_4_2_6P5_RC3
- util/ntp-keygen-opts.h@1.289 +3 -3
+ util/ntp-keygen-opts.h@1.247.42.1 +3 -3
NTP_4_2_6P5_RC3
- util/ntp-keygen-opts.texi@1.287 +2 -2
+ util/ntp-keygen-opts.texi@1.246.41.1 +2 -2
NTP_4_2_6P5_RC3
- util/ntp-keygen.1@1.287 +2 -2
+ util/ntp-keygen.1@1.246.41.1 +2 -2
NTP_4_2_6P5_RC3
-ChangeSet@1.2343, 2011-12-08 00:21:36-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.256, 2011-12-08 00:21:36-05:00, stenn@deacon.udel.edu
Update NEWS for RC3
- NEWS@1.124 +6 -1
+ NEWS@1.122.1.2 +6 -1
Update NEWS for RC3
-ChangeSet@1.2342, 2011-12-07 22:28:13+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2716, 2011-12-07 23:17:43+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct ChangeLog merge to duplicate -stable entries in -dev section.
+
+ ChangeLog@1.1068 +6 -0
+ Correct ChangeLog merge to duplicate -stable entries in -dev section.
+
+ChangeSet@1.2082.4.255, 2011-12-07 22:28:13+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2087] sys_jitter calculation overweights sys.peer jitter.
- ChangeLog@1.750 +1 -0
+ ChangeLog@1.496.26.183 +1 -0
[Bug 2087] sys_jitter calculation overweights sys.peer jitter.
- ntpd/ntp_proto.c@1.307 +2 -2
+ ntpd/ntp_proto.c@1.297.2.10 +2 -2
[Bug 2087] sys_jitter calculation overweights sys.peer jitter.
-ChangeSet@1.2341, 2011-12-07 22:24:26+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.254, 2011-12-07 22:24:26+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2086] get_systime() should not offset by sys_residual.
- ChangeLog@1.749 +1 -0
+ ChangeLog@1.496.26.182 +1 -0
[Bug 2086] get_systime() should not offset by sys_residual.
- libntp/systime.c@1.49 +2 -2
+ libntp/systime.c@1.48.1.1 +2 -2
[Bug 2086] get_systime() should not offset by sys_residual.
-ChangeSet@1.2340, 2011-12-07 22:21:41+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.253, 2011-12-07 22:21:41+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
- ChangeLog@1.748 +1 -0
+ ChangeLog@1.496.26.181 +1 -0
[Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
- ntpd/ntp_proto.c@1.306 +2 -1
+ ntpd/ntp_proto.c@1.297.2.9 +2 -1
[Bug 2085] clock_update() sys_rootdisp calculation omits root delay.
-ChangeSet@1.2339, 2011-12-05 17:07:40+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.252, 2011-12-05 17:07:40+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
Ensure NULL peer->dstadr is not accessed in orphan parent selection.
- ChangeLog@1.747 +5 -0
+ ChangeLog@1.496.26.180 +5 -0
[Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
Ensure NULL peer->dstadr is not accessed in orphan parent selection.
- ntpd/ntp_control.c@1.137 +2 -1
+ ntpd/ntp_control.c@1.129.1.8 +2 -1
[Bug 2082] 3-char refid sent by ntpd 4.2.6p5-RC2 ends with extra dot.
- ntpd/ntp_proto.c@1.305 +4 -1
+ ntpd/ntp_proto.c@1.297.2.8 +4 -1
Ensure NULL peer->dstadr is not accessed in orphan parent selection.
-ChangeSet@1.2338, 2011-11-30 22:06:41-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2713, 2011-12-01 05:30:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P237
+ TAG: NTP_4_2_7P237
+
+ ChangeLog@1.1065 +1 -0
+ NTP_4_2_7P237
+
+ ntpd/ntpd-opts.c@1.242 +3 -3
+ NTP_4_2_7P237
+
+ ntpd/ntpd-opts.h@1.242 +3 -3
+ NTP_4_2_7P237
+
+ ntpd/ntpd-opts.texi@1.240 +2 -2
+ NTP_4_2_7P237
+
+ ntpd/ntpd.1ntpdman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpd/ntpd.1ntpdmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpd/ntpd.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpd/ntpd.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc-opts.c@1.237 +3 -3
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc-opts.h@1.237 +3 -3
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc-opts.texi@1.237 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc.1ntpdcman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc.html@1.65 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpdc/ntpdc.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpq/ntpq-opts.c@1.239 +3 -3
+ NTP_4_2_7P237
+
+ ntpq/ntpq-opts.h@1.239 +3 -3
+ NTP_4_2_7P237
+
+ ntpq/ntpq-opts.texi@1.239 +2 -2
+ NTP_4_2_7P237
+
+ ntpq/ntpq.1ntpqman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpq/ntpq.1ntpqmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpq/ntpq.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpq/ntpq.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.239 +3 -3
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.239 +3 -3
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.239 +2 -2
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ packageinfo.sh@1.240 +1 -1
+ NTP_4_2_7P237
+
+ scripts/ntp-wait-opts.texi@1.57 +1 -1
+ NTP_4_2_7P237
+
+ scripts/ntp-wait.1ntp-waitman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ scripts/ntp-wait.html@1.57 +1 -1
+ NTP_4_2_7P237
+
+ scripts/ntp-wait.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ scripts/ntp-wait.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp-opts.c@1.235 +3 -3
+ NTP_4_2_7P237
+
+ sntp/sntp-opts.h@1.235 +3 -3
+ NTP_4_2_7P237
+
+ sntp/sntp-opts.texi@1.235 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp.1sntpman@1.55 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp.1sntpmdoc@1.55 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp.html@1.235 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp.man.in@1.55 +2 -2
+ NTP_4_2_7P237
+
+ sntp/sntp.mdoc.in@1.55 +2 -2
+ NTP_4_2_7P237
+
+ util/ntp-keygen-opts.c@1.239 +3 -3
+ NTP_4_2_7P237
+
+ util/ntp-keygen-opts.h@1.239 +3 -3
+ NTP_4_2_7P237
+
+ util/ntp-keygen-opts.texi@1.240 +2 -2
+ NTP_4_2_7P237
+
+ util/ntp-keygen.1ntp-keygenman@1.53 +2 -2
+ NTP_4_2_7P237
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.53 +2 -2
+ NTP_4_2_7P237
+
+ util/ntp-keygen.man.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ util/ntp-keygen.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P237
+
+ChangeSet@1.2082.4.251, 2011-11-30 22:06:41-05:00, stenn@deacon.udel.edu
NTP_4_2_6P5_RC2
TAG: NTP_4_2_6P5_RC2
- ChangeLog@1.746 +1 -0
+ ChangeLog@1.496.26.179 +1 -0
NTP_4_2_6P5_RC2
- ntpd/ntpd-opts.c@1.289 +3 -3
+ ntpd/ntpd-opts.c@1.248.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpd/ntpd-opts.h@1.289 +3 -3
+ ntpd/ntpd-opts.h@1.248.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpd/ntpd-opts.texi@1.286 +2 -2
+ ntpd/ntpd-opts.texi@1.246.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpd/ntpd.1@1.286 +2 -2
+ ntpd/ntpd.1@1.246.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpdc/ntpdc-opts.c@1.285 +3 -3
+ ntpdc/ntpdc-opts.c@1.244.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpdc/ntpdc-opts.h@1.285 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpdc/ntpdc-opts.texi@1.283 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpdc/ntpdc.1@1.283 +2 -2
+ ntpdc/ntpdc.1@1.243.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpq/ntpq-opts.c@1.286 +3 -3
+ ntpq/ntpq-opts.c@1.245.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpq/ntpq-opts.h@1.286 +3 -3
+ ntpq/ntpq-opts.h@1.245.41.1 +3 -3
NTP_4_2_6P5_RC2
- ntpq/ntpq-opts.texi@1.284 +2 -2
+ ntpq/ntpq-opts.texi@1.244.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpq/ntpq.1@1.284 +2 -2
+ ntpq/ntpq.1@1.244.40.1 +2 -2
NTP_4_2_6P5_RC2
- ntpsnmpd/ntpsnmpd-opts.c@1.165 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.42.1 +3 -3
NTP_4_2_6P5_RC2
- ntpsnmpd/ntpsnmpd-opts.h@1.165 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.42.1 +3 -3
NTP_4_2_6P5_RC2
- ntpsnmpd/ntpsnmpd-opts.texi@1.164 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.41.1 +2 -2
NTP_4_2_6P5_RC2
- ntpsnmpd/ntpsnmpd.1@1.163 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.41.1 +2 -2
NTP_4_2_6P5_RC2
- packageinfo.sh@1.303 +1 -1
+ packageinfo.sh@1.255.38.1 +1 -1
NTP_4_2_6P5_RC2
- sntp/sntp-opts.c@1.157 +3 -3
+ sntp/sntp-opts.c@1.117.40.1 +3 -3
NTP_4_2_6P5_RC2
- sntp/sntp-opts.h@1.157 +3 -3
+ sntp/sntp-opts.h@1.117.40.1 +3 -3
NTP_4_2_6P5_RC2
- sntp/sntp-opts.texi@1.156 +2 -2
+ sntp/sntp-opts.texi@1.117.39.1 +2 -2
NTP_4_2_6P5_RC2
- sntp/sntp.1@1.156 +2 -2
+ sntp/sntp.1@1.117.39.1 +2 -2
NTP_4_2_6P5_RC2
- sntp/sntp.html@1.47 +2 -2
+ sntp/sntp.html@1.7.40.1 +2 -2
NTP_4_2_6P5_RC2
- util/ntp-keygen-opts.c@1.288 +3 -3
+ util/ntp-keygen-opts.c@1.247.41.1 +3 -3
NTP_4_2_6P5_RC2
- util/ntp-keygen-opts.h@1.288 +3 -3
+ util/ntp-keygen-opts.h@1.247.41.1 +3 -3
NTP_4_2_6P5_RC2
- util/ntp-keygen-opts.texi@1.286 +2 -2
+ util/ntp-keygen-opts.texi@1.246.40.1 +2 -2
NTP_4_2_6P5_RC2
- util/ntp-keygen.1@1.286 +2 -2
+ util/ntp-keygen.1@1.246.40.1 +2 -2
NTP_4_2_6P5_RC2
-ChangeSet@1.2337, 2011-11-30 21:49:45-05:00, stenn@pogo.udel.edu
+ChangeSet@1.2082.4.250, 2011-11-30 21:49:45-05:00, stenn@pogo.udel.edu
update
- NEWS@1.123 +20 -5
+ NEWS@1.122.1.1 +20 -5
update
-ChangeSet@1.2336, 2011-11-29 13:35:16+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2711, 2011-11-30 04:00:32+00:00, davehart@shiny.ad.hartbrothers.com
+ Floor calculation of sys_rootdisp at sys_mindisp in clock_update (from
+ Dave Mills).
+
+ ChangeLog@1.1063 +2 -0
+ Floor calculation of sys_rootdisp at sys_mindisp in clock_update (from
+ Dave Mills).
+
+ ntpd/ntp_proto.c@1.332 +6 -3
+ Floor calculation of sys_rootdisp at sys_mindisp in clock_update (from
+ Dave Mills).
+
+ChangeSet@1.2709, 2011-11-29 21:58:49+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2073] Correct ntpq billboard's MODE_PASSIVE t from 'u' to 'S'.
+ Round l_fp traffic interval when converting to integer in rate limit
+ and KoD calculation.
+
+ ChangeLog@1.1061 +4 -1
+ [Bug 2073] Correct ntpq billboard's MODE_PASSIVE t from 'u' to 'S'.
+ Round l_fp traffic interval when converting to integer in rate limit
+ and KoD calculation.
+
+ include/ntp.h@1.201 +1 -1
+ MDF_UCLNT indicates preemptible, not ephemeral (comment fix).
+
+ ntpd/ntp_monitor.c@1.40 +5 -1
+ Round l_fp traffic interval when converting to integer in rate limit
+ and KoD calculation.
+
+ ntpd/ntp_peer.c@1.151 +20 -2
+ provide debug trace output of newpeer()/findexistingpeer() search
+ for duplicate associations.
+
+ ntpd/ntp_proto.c@1.330 +12 -10
+ Avoid duplicate "no servers found".
+
+ ntpq/ntpq-subs.c@1.95 +6 -2
+ [Bug 2073] Correct ntpq billboard's MODE_PASSIVE t from 'u' to 'S'.
+
+ChangeSet@1.2082.4.249, 2011-11-29 13:35:16+00:00, davehart@shiny.ad.hartbrothers.com
merge cleanup
- ChangeLog@1.745 +0 -1
+ ChangeLog@1.496.26.178 +0 -1
merge cleanup
-ChangeSet@1.2330.1.2, 2011-11-29 13:33:26+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.47.2, 2011-11-29 13:33:26+00:00, davehart@shiny.ad.hartbrothers.com
Never send KoD rate limiting response to MODE_SERVER response.
- ChangeLog@1.740.1.2 +3 -1
+ ChangeLog@1.496.61.2 +3 -1
Never send KoD rate limiting response to MODE_SERVER response.
- ntpd/ntp_crypto.c@1.147 +1 -1
+ ntpd/ntp_crypto.c@1.146.1.1 +1 -1
Use () to enforce intended precendence of & and && operators
- ntpd/ntp_proto.c@1.300.1.2 +3 -3
+ ntpd/ntp_proto.c@1.297.3.2 +3 -3
Never send KoD rate limiting response to MODE_SERVER response.
-ChangeSet@1.2331.1.2, 2011-11-27 00:39:11+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.48.2, 2011-11-27 00:39:11+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2072] Orphan parent selection metric needs ntohl().
- ChangeLog@1.741.1.1 +1 -0
+ ChangeLog@1.496.62.1 +1 -0
[Bug 2072] Orphan parent selection metric needs ntohl().
- libntp/a_md5encrypt.c@1.28 +1 -0
+ libntp/a_md5encrypt.c@1.26.1.2 +1 -0
[Bug 2072] Orphan parent selection metric needs ntohl().
- ntpd/ntp_proto.c@1.301.1.1 +3 -3
+ ntpd/ntp_proto.c@1.297.4.1 +3 -3
[Bug 2072] Orphan parent selection metric needs ntohl().
-ChangeSet@1.2331.1.1, 2011-11-26 19:43:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2707, 2011-11-26 23:06:48+00:00, davehart@shiny.ad.hartbrothers.com
+ more merge cleanup
+
+ include/lib_strbuf.h@1.11 +4 -0
+ guard against multiple inclusion (more merge cleanup)
+
+ include/ntp_fp.h@1.26 +1 -1
+ more merge cleanup
+
+ include/ntp_types.h@1.30 +11 -11
+ more merge cleanup
+
+ChangeSet@1.2082.48.1, 2011-11-26 19:43:12+00:00, davehart@shiny.ad.hartbrothers.com
Avoid redefinition warnings for INT32_MIN, INT32_MAX, U_INT32_MAX.
- include/ntp_types.h@1.17 +18 -6
+ include/ntp_types.h@1.14.1.3 +18 -6
Avoid redefinition warnings for INT32_MIN, INT32_MAX, U_INT32_MAX.
-ChangeSet@1.2330.1.1, 2011-11-25 10:23:58+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2705, 2011-11-26 12:50:07+00:00, davehart@shiny.ad.hartbrothers.com
+ Restore 4.2.6 clock_combine() weighting to ntp-dev, reverting
+ to pre-4.2.7p70 logic and avoiding divide-by-zero (from Dave Mills).
+
+ ChangeLog@1.1059 +3 -1
+ Restore 4.2.6 clock_combine() weighting to ntp-dev, reverting
+ to pre-4.2.7p70 logic and avoiding divide-by-zero (from Dave Mills).
+
+ ntpd/ntp_proto.c@1.328 +5 -5
+ Restore 4.2.6 clock_combine() weighting to ntp-dev, reverting
+ to pre-4.2.7p70 logic and avoiding divide-by-zero (from Dave Mills).
+
+ChangeSet@1.2704, 2011-11-26 12:11:56+00:00, davehart@shiny.ad.hartbrothers.com
+ merge cleanup
+
+ ntpd/ntp_control.c@1.176 +6 -6
+ merge cleanup
+
+ ntpd/ntp_io.c@1.363 +0 -11
+ merge cleanup
+
+ ntpd/ntp_peer.c@1.150 +6 -4
+ merge cleanup
+
+ ntpd/ntp_proto.c@1.327 +1 -1
+ merge cleanup
+
+ ntpq/ntpq-subs.c@1.94 +28 -18
+ merge cleanup
+
+ ntpq/ntpq.c@1.143 +3 -3
+ merge cleanup
+
+ ntpq/ntpq.h@1.26 +2 -2
+ merge cleanup
+
+ChangeSet@1.2082.47.1, 2011-11-25 10:23:58+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2059] optional billboard column "server" does not honor -n.
[Bug 2066] ntpq lopeers ipv6 "local" column overrun.
[Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq.
@@ -378,7 +71485,7 @@ ChangeSet@1.2330.1.1, 2011-11-25 10:23:58+00:00, davehart@shiny.ad.hartbrothers.
Exclude not-yet-determined sys_refid from use in loopback TEST12
(from David Mills).
- ChangeLog@1.740.1.1 +9 -0
+ ChangeLog@1.496.61.1 +9 -0
[Bug 2059] optional billboard column "server" does not honor -n.
[Bug 2066] ntpq lopeers ipv6 "local" column overrun.
[Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq.
@@ -387,578 +71494,10447 @@ ChangeSet@1.2330.1.1, 2011-11-25 10:23:58+00:00, davehart@shiny.ad.hartbrothers.
Exclude not-yet-determined sys_refid from use in loopback TEST12
(from David Mills).
- include/ntp.h@1.175 +1 -0
+ include/ntp.h@1.168.1.7 +1 -0
Add peer flag FLAG_BC_VOL indicating the broadcastclient delay
calibration is still in progress.
- include/ntp_refclock.h@1.26 +1 -1
+ include/ntp_refclock.h@1.24.1.2 +1 -1
[Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq.
- include/ntp_request.h@1.41 +2 -2
+ include/ntp_request.h@1.40.1.1 +2 -2
[Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq.
- include/ntpd.h@1.144 +3 -1
+ include/ntpd.h@1.137.2.7 +3 -1
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
backport latoa() -> localaddrtoa(endpt *) from 4.2.7
- ntpd/ntp_config.c@1.251 +1 -1
+ ntpd/ntp_config.c@1.241.1.10 +1 -1
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
- ntpd/ntp_control.c@1.136 +50 -37
+ ntpd/ntp_control.c@1.129.1.7 +50 -37
[Bug 2068] ntpd sends nonprintable stratum 16 refid to ntpq.
- ntpd/ntp_io.c@1.323 +11 -0
+ ntpd/ntp_io.c@1.306.1.17 +11 -0
backport latoa() -> localaddrtoa(endpt *) from 4.2.7
- ntpd/ntp_peer.c@1.130 +40 -21
+ ntpd/ntp_peer.c@1.126.1.4 +40 -21
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
- ntpd/ntp_proto.c@1.300.1.1 +53 -14
+ ntpd/ntp_proto.c@1.297.3.1 +53 -14
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
Exclude not-yet-determined sys_refid from use in loopback TEST12
(from David Mills).
- ntpd/ntp_refclock.c@1.95 +2 -2
+ ntpd/ntp_refclock.c@1.92.1.3 +2 -2
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
- ntpd/ntp_request.c@1.88 +13 -11
+ ntpd/ntp_request.c@1.82.1.6 +13 -11
[Bug 2069] broadcastclient, multicastclient spin up duplicate
ephemeral associations without broadcastdelay.
- ntpq/ntpq-subs.c@1.47 +42 -22
+ ntpq/ntpq-subs.c@1.39.2.6 +42 -22
[Bug 2059] optional billboard column "server" does not honor -n.
[Bug 2066] ntpq lopeers ipv6 "local" column overrun.
- ntpq/ntpq.c@1.107 +94 -9
+ ntpq/ntpq.c@1.97.1.10 +94 -9
[Bug 2059] optional billboard column "server" does not honor -n.
- ntpq/ntpq.h@1.15 +4 -0
+ ntpq/ntpq.h@1.10.1.5 +4 -0
[Bug 2059] optional billboard column "server" does not honor -n.
[Bug 2066] ntpq lopeers ipv6 "local" column overrun.
-ChangeSet@1.2331, 2011-11-21 09:35:28+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.244, 2011-11-21 09:35:28+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2050] Orphan mode stratum counting to infinity.
- ChangeLog@1.741 +4 -0
+ ChangeLog@1.496.26.174 +4 -0
[Bug 2050] Orphan mode stratum counting to infinity.
- include/ntp_types.h@1.16 +6 -0
+ include/ntp_types.h@1.14.1.2 +6 -0
[Bug 2050] Orphan mode stratum counting to infinity.
- ntpd/ntp_proto.c@1.301 +31 -8
+ ntpd/ntp_proto.c@1.297.2.4 +31 -8
[Bug 2050] Orphan mode stratum counting to infinity.
- ntpd/ntp_timer.c@1.57 +2 -2
+ ntpd/ntp_timer.c@1.56.1.1 +2 -2
[Bug 2050] Orphan mode stratum counting to infinity.
-ChangeSet@1.2330, 2011-10-18 23:14:54+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2702, 2011-11-16 10:47:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P236
+ TAG: NTP_4_2_7P236
+
+ ChangeLog@1.1057 +1 -0
+ NTP_4_2_7P236
+
+ ntpd/ntpd-opts.c@1.241 +3 -3
+ NTP_4_2_7P236
+
+ ntpd/ntpd-opts.h@1.241 +3 -3
+ NTP_4_2_7P236
+
+ ntpd/ntpd-opts.texi@1.239 +2 -2
+ NTP_4_2_7P236
+
+ ntpd/ntpd.1ntpdman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpd/ntpd.1ntpdmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpd/ntpd.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpd/ntpd.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc-opts.c@1.236 +3 -3
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc-opts.h@1.236 +3 -3
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc-opts.texi@1.236 +2 -2
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc.1ntpdcman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc.html@1.64 +2 -2
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpdc/ntpdc.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpq/ntpq-opts.c@1.238 +3 -3
+ NTP_4_2_7P236
+
+ ntpq/ntpq-opts.h@1.238 +3 -3
+ NTP_4_2_7P236
+
+ ntpq/ntpq-opts.texi@1.238 +2 -2
+ NTP_4_2_7P236
+
+ ntpq/ntpq.1ntpqman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpq/ntpq.1ntpqmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpq/ntpq.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpq/ntpq.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.238 +3 -3
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.238 +3 -3
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.238 +2 -2
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ packageinfo.sh@1.239 +1 -1
+ NTP_4_2_7P236
+
+ scripts/ntp-wait-opts.texi@1.56 +1 -1
+ NTP_4_2_7P236
+
+ scripts/ntp-wait.1ntp-waitman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ scripts/ntp-wait.html@1.56 +1 -1
+ NTP_4_2_7P236
+
+ scripts/ntp-wait.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ scripts/ntp-wait.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ sntp/sntp-opts.c@1.234 +3 -3
+ NTP_4_2_7P236
+
+ sntp/sntp-opts.h@1.234 +3 -3
+ NTP_4_2_7P236
+
+ sntp/sntp-opts.texi@1.234 +2 -2
+ NTP_4_2_7P236
+
+ sntp/sntp.1sntpman@1.54 +2 -2
+ NTP_4_2_7P236
+
+ sntp/sntp.1sntpmdoc@1.54 +1 -1
+ NTP_4_2_7P236
+
+ sntp/sntp.html@1.234 +2 -2
+ NTP_4_2_7P236
+
+ sntp/sntp.man.in@1.54 +2 -2
+ NTP_4_2_7P236
+
+ sntp/sntp.mdoc.in@1.54 +1 -1
+ NTP_4_2_7P236
+
+ util/ntp-keygen-opts.c@1.238 +3 -3
+ NTP_4_2_7P236
+
+ util/ntp-keygen-opts.h@1.238 +3 -3
+ NTP_4_2_7P236
+
+ util/ntp-keygen-opts.texi@1.239 +2 -2
+ NTP_4_2_7P236
+
+ util/ntp-keygen.1ntp-keygenman@1.52 +2 -2
+ NTP_4_2_7P236
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.52 +1 -1
+ NTP_4_2_7P236
+
+ util/ntp-keygen.man.in@1.52 +2 -2
+ NTP_4_2_7P236
+
+ util/ntp-keygen.mdoc.in@1.52 +1 -1
+ NTP_4_2_7P236
+
+ChangeSet@1.2701, 2011-11-16 00:27:58-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1056 +1 -0
+ Documentation updates from Dave Mills
+
+ html/index.html@1.44 +8 -8
+ Documentation updates from Dave Mills
+
+ html/rate.html@1.10 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2700, 2011-11-16 03:15:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P235
+ TAG: NTP_4_2_7P235
+
+ ChangeLog@1.1055 +1 -0
+ NTP_4_2_7P235
+
+ ntpd/ntpd-opts.c@1.240 +3 -3
+ NTP_4_2_7P235
+
+ ntpd/ntpd-opts.h@1.240 +3 -3
+ NTP_4_2_7P235
+
+ ntpd/ntpd-opts.texi@1.238 +2 -2
+ NTP_4_2_7P235
+
+ ntpd/ntpd.1ntpdman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpd/ntpd.1ntpdmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpd/ntpd.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpd/ntpd.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc-opts.c@1.235 +3 -3
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc-opts.h@1.235 +3 -3
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc-opts.texi@1.235 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc.1ntpdcman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc.html@1.63 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpdc/ntpdc.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpq/ntpq-opts.c@1.237 +3 -3
+ NTP_4_2_7P235
+
+ ntpq/ntpq-opts.h@1.237 +3 -3
+ NTP_4_2_7P235
+
+ ntpq/ntpq-opts.texi@1.237 +2 -2
+ NTP_4_2_7P235
+
+ ntpq/ntpq.1ntpqman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpq/ntpq.1ntpqmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpq/ntpq.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpq/ntpq.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.237 +3 -3
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.237 +3 -3
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.237 +2 -2
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ packageinfo.sh@1.238 +1 -1
+ NTP_4_2_7P235
+
+ scripts/ntp-wait-opts.texi@1.55 +1 -1
+ NTP_4_2_7P235
+
+ scripts/ntp-wait.1ntp-waitman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ scripts/ntp-wait.html@1.55 +1 -1
+ NTP_4_2_7P235
+
+ scripts/ntp-wait.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ scripts/ntp-wait.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp-opts.c@1.233 +3 -3
+ NTP_4_2_7P235
+
+ sntp/sntp-opts.h@1.233 +3 -3
+ NTP_4_2_7P235
+
+ sntp/sntp-opts.texi@1.233 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp.1sntpman@1.53 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp.1sntpmdoc@1.53 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp.html@1.233 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp.man.in@1.53 +2 -2
+ NTP_4_2_7P235
+
+ sntp/sntp.mdoc.in@1.53 +2 -2
+ NTP_4_2_7P235
+
+ util/ntp-keygen-opts.c@1.237 +3 -3
+ NTP_4_2_7P235
+
+ util/ntp-keygen-opts.h@1.237 +3 -3
+ NTP_4_2_7P235
+
+ util/ntp-keygen-opts.texi@1.238 +2 -2
+ NTP_4_2_7P235
+
+ util/ntp-keygen.1ntp-keygenman@1.51 +2 -2
+ NTP_4_2_7P235
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.51 +2 -2
+ NTP_4_2_7P235
+
+ util/ntp-keygen.man.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ util/ntp-keygen.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P235
+
+ChangeSet@1.2699, 2011-11-08 18:44:39+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2052] Autokey CRYPTO_ASSOC host@group vallen needs checking.
+
+ ChangeLog@1.1054 +1 -0
+ [Bug 2052] Autokey CRYPTO_ASSOC host@group vallen needs checking.
+
+ ntpd/ntp_proto.c@1.325 +27 -18
+ [Bug 2052] Autokey CRYPTO_ASSOC host@group vallen needs checking.
+ Fix a number of comment typos.
+
+ChangeSet@1.2698, 2011-11-07 23:09:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P234
+ TAG: NTP_4_2_7P234
+
+ ChangeLog@1.1053 +1 -0
+ NTP_4_2_7P234
+
+ ntpd/ntpd-opts.c@1.239 +3 -3
+ NTP_4_2_7P234
+
+ ntpd/ntpd-opts.h@1.239 +3 -3
+ NTP_4_2_7P234
+
+ ntpd/ntpd-opts.texi@1.237 +2 -2
+ NTP_4_2_7P234
+
+ ntpd/ntpd.1ntpdman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpd/ntpd.1ntpdmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpd/ntpd.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpd/ntpd.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc-opts.c@1.234 +3 -3
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc-opts.h@1.234 +3 -3
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc-opts.texi@1.234 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc.1ntpdcman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc.html@1.62 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpdc/ntpdc.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpq/ntpq-opts.c@1.236 +3 -3
+ NTP_4_2_7P234
+
+ ntpq/ntpq-opts.h@1.236 +3 -3
+ NTP_4_2_7P234
+
+ ntpq/ntpq-opts.texi@1.236 +2 -2
+ NTP_4_2_7P234
+
+ ntpq/ntpq.1ntpqman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpq/ntpq.1ntpqmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpq/ntpq.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpq/ntpq.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.236 +3 -3
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.236 +3 -3
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.236 +2 -2
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ packageinfo.sh@1.237 +1 -1
+ NTP_4_2_7P234
+
+ scripts/ntp-wait-opts.texi@1.54 +1 -1
+ NTP_4_2_7P234
+
+ scripts/ntp-wait.1ntp-waitman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ scripts/ntp-wait.html@1.54 +1 -1
+ NTP_4_2_7P234
+
+ scripts/ntp-wait.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ scripts/ntp-wait.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp-opts.c@1.232 +3 -3
+ NTP_4_2_7P234
+
+ sntp/sntp-opts.h@1.232 +3 -3
+ NTP_4_2_7P234
+
+ sntp/sntp-opts.texi@1.232 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp.1sntpman@1.52 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp.1sntpmdoc@1.52 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp.html@1.232 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp.man.in@1.52 +2 -2
+ NTP_4_2_7P234
+
+ sntp/sntp.mdoc.in@1.52 +2 -2
+ NTP_4_2_7P234
+
+ util/ntp-keygen-opts.c@1.236 +3 -3
+ NTP_4_2_7P234
+
+ util/ntp-keygen-opts.h@1.236 +3 -3
+ NTP_4_2_7P234
+
+ util/ntp-keygen-opts.texi@1.237 +2 -2
+ NTP_4_2_7P234
+
+ util/ntp-keygen.1ntp-keygenman@1.50 +2 -2
+ NTP_4_2_7P234
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.50 +2 -2
+ NTP_4_2_7P234
+
+ util/ntp-keygen.man.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ util/ntp-keygen.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P234
+
+ChangeSet@1.2697, 2011-11-07 01:54:46-05:00, stenn@deacon.udel.edu
+ LDADD cleanup
+
+ libparse/Makefile.am@1.28 +2 -2
+ LDADD cleanup
+
+ ntpdc/Makefile.am@1.68 +1 -1
+ LDADD cleanup
+
+ ntpq/Makefile.am@1.64 +1 -1
+ LDADD cleanup
+
+ChangeSet@1.2696, 2011-11-07 01:04:24-05:00, stenn@deacon.udel.edu
+ Clean up -libm entries regarding libntp.a
+
+ ChangeLog@1.1052 +1 -0
+ Clean up -libm entries regarding libntp.a
+
+ adjtimed/Makefile.am@1.15 +1 -1
+ Clean up -libm entries regarding libntp.a
+
+ clockstuff/Makefile.am@1.21 +2 -2
+ Clean up -libm entries regarding libntp.a
+
+ libparse/Makefile.am@1.27 +2 -2
+ Clean up -libm entries regarding libntp.a
+
+ ntpd/Makefile.am@1.111 +3 -3
+ Clean up -libm entries regarding libntp.a
+
+ ntpdc/Makefile.am@1.67 +3 -2
+ Clean up -libm entries regarding libntp.a
+
+ ntpq/Makefile.am@1.63 +3 -2
+ Clean up -libm entries regarding libntp.a
+
+ parseutil/Makefile.am@1.17 +1 -1
+ Clean up -libm entries regarding libntp.a
+
+ sntp/Makefile.am@1.69 +1 -3
+ Clean up -libm entries regarding libntp.a
+
+ util/Makefile.am@1.67 +2 -2
+ Clean up -libm entries regarding libntp.a
+
+ChangeSet@1.2695, 2011-11-06 11:16:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P233
+ TAG: NTP_4_2_7P233
+
+ ChangeLog@1.1051 +1 -0
+ NTP_4_2_7P233
+
+ ntpd/ntpd-opts.c@1.238 +3 -3
+ NTP_4_2_7P233
+
+ ntpd/ntpd-opts.h@1.238 +3 -3
+ NTP_4_2_7P233
+
+ ntpd/ntpd-opts.texi@1.236 +2 -2
+ NTP_4_2_7P233
+
+ ntpd/ntpd.1ntpdman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpd/ntpd.1ntpdmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpd/ntpd.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpd/ntpd.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc-opts.c@1.233 +3 -3
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc-opts.h@1.233 +3 -3
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc-opts.texi@1.233 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc.1ntpdcman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc.html@1.61 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpdc/ntpdc.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpq/ntpq-opts.c@1.235 +3 -3
+ NTP_4_2_7P233
+
+ ntpq/ntpq-opts.h@1.235 +3 -3
+ NTP_4_2_7P233
+
+ ntpq/ntpq-opts.texi@1.235 +2 -2
+ NTP_4_2_7P233
+
+ ntpq/ntpq.1ntpqman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpq/ntpq.1ntpqmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpq/ntpq.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpq/ntpq.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.235 +3 -3
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.235 +3 -3
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.235 +2 -2
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ packageinfo.sh@1.236 +1 -1
+ NTP_4_2_7P233
+
+ scripts/ntp-wait-opts.texi@1.53 +1 -1
+ NTP_4_2_7P233
+
+ scripts/ntp-wait.1ntp-waitman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ scripts/ntp-wait.html@1.53 +1 -1
+ NTP_4_2_7P233
+
+ scripts/ntp-wait.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ scripts/ntp-wait.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp-opts.c@1.231 +3 -3
+ NTP_4_2_7P233
+
+ sntp/sntp-opts.h@1.231 +3 -3
+ NTP_4_2_7P233
+
+ sntp/sntp-opts.texi@1.231 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp.1sntpman@1.51 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp.1sntpmdoc@1.51 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp.html@1.231 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp.man.in@1.51 +2 -2
+ NTP_4_2_7P233
+
+ sntp/sntp.mdoc.in@1.51 +2 -2
+ NTP_4_2_7P233
+
+ util/ntp-keygen-opts.c@1.235 +3 -3
+ NTP_4_2_7P233
+
+ util/ntp-keygen-opts.h@1.235 +3 -3
+ NTP_4_2_7P233
+
+ util/ntp-keygen-opts.texi@1.236 +2 -2
+ NTP_4_2_7P233
+
+ util/ntp-keygen.1ntp-keygenman@1.49 +2 -2
+ NTP_4_2_7P233
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.49 +2 -2
+ NTP_4_2_7P233
+
+ util/ntp-keygen.man.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ util/ntp-keygen.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P233
+
+ChangeSet@1.2694, 2011-11-06 01:37:19-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1050 +1 -0
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.7 +1 -1
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.68 +5 -3
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.28 +28 -30
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2693, 2011-11-05 10:46:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P232
+ TAG: NTP_4_2_7P232
+
+ ChangeLog@1.1049 +1 -0
+ NTP_4_2_7P232
+
+ ntpd/ntpd-opts.c@1.237 +3 -3
+ NTP_4_2_7P232
+
+ ntpd/ntpd-opts.h@1.237 +3 -3
+ NTP_4_2_7P232
+
+ ntpd/ntpd-opts.texi@1.235 +2 -2
+ NTP_4_2_7P232
+
+ ntpd/ntpd.1ntpdman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpd/ntpd.1ntpdmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpd/ntpd.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpd/ntpd.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc-opts.c@1.232 +3 -3
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc-opts.h@1.232 +3 -3
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc-opts.texi@1.232 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc.1ntpdcman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc.html@1.60 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpdc/ntpdc.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpq/ntpq-opts.c@1.234 +3 -3
+ NTP_4_2_7P232
+
+ ntpq/ntpq-opts.h@1.234 +3 -3
+ NTP_4_2_7P232
+
+ ntpq/ntpq-opts.texi@1.234 +2 -2
+ NTP_4_2_7P232
+
+ ntpq/ntpq.1ntpqman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpq/ntpq.1ntpqmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpq/ntpq.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpq/ntpq.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.234 +3 -3
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.234 +3 -3
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.234 +2 -2
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ packageinfo.sh@1.235 +1 -1
+ NTP_4_2_7P232
+
+ scripts/ntp-wait-opts.texi@1.52 +1 -1
+ NTP_4_2_7P232
+
+ scripts/ntp-wait.1ntp-waitman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ scripts/ntp-wait.html@1.52 +1 -1
+ NTP_4_2_7P232
+
+ scripts/ntp-wait.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ scripts/ntp-wait.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp-opts.c@1.230 +3 -3
+ NTP_4_2_7P232
+
+ sntp/sntp-opts.h@1.230 +3 -3
+ NTP_4_2_7P232
+
+ sntp/sntp-opts.texi@1.230 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp.1sntpman@1.50 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp.1sntpmdoc@1.50 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp.html@1.230 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp.man.in@1.50 +2 -2
+ NTP_4_2_7P232
+
+ sntp/sntp.mdoc.in@1.50 +2 -2
+ NTP_4_2_7P232
+
+ util/ntp-keygen-opts.c@1.234 +3 -3
+ NTP_4_2_7P232
+
+ util/ntp-keygen-opts.h@1.234 +3 -3
+ NTP_4_2_7P232
+
+ util/ntp-keygen-opts.texi@1.235 +2 -2
+ NTP_4_2_7P232
+
+ util/ntp-keygen.1ntp-keygenman@1.48 +2 -2
+ NTP_4_2_7P232
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.48 +2 -2
+ NTP_4_2_7P232
+
+ util/ntp-keygen.man.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ util/ntp-keygen.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P232
+
+ChangeSet@1.2692, 2011-11-05 00:03:53-04:00, stenn@deacon.udel.edu
+ Clean up some bitrotted code in libntp/socket.c
+
+ ChangeLog@1.1048 +1 -0
+ Clean up some bitrotted code in libntp/socket.c
+
+ libntp/socket.c@1.8 +2 -503
+ Clean up some bitrotted code in libntp/socket.c
+
+ChangeSet@1.2691, 2011-11-05 00:01:22-04:00, stenn@deacon.udel.edu
+ Update the NEWS file so we note the default disable of mode 7 requests
+
+ ChangeLog@1.1047 +1 -0
+ Update the NEWS file so we note the default disable of mode 7 requests
+
+ NEWS@1.124 +35 -0
+ Update the NEWS file so we note the default disable of mode 7 requests
+
+ChangeSet@1.2690, 2011-11-03 19:28:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P231
+ TAG: NTP_4_2_7P231
+
+ ChangeLog@1.1046 +1 -0
+ NTP_4_2_7P231
+
+ ntpd/ntpd-opts.c@1.236 +3 -3
+ NTP_4_2_7P231
+
+ ntpd/ntpd-opts.h@1.236 +3 -3
+ NTP_4_2_7P231
+
+ ntpd/ntpd-opts.texi@1.234 +2 -2
+ NTP_4_2_7P231
+
+ ntpd/ntpd.1ntpdman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpd/ntpd.1ntpdmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpd/ntpd.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpd/ntpd.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc-opts.c@1.231 +3 -3
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc-opts.h@1.231 +3 -3
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc-opts.texi@1.231 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc.1ntpdcman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc.html@1.59 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpdc/ntpdc.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpq/ntpq-opts.c@1.233 +3 -3
+ NTP_4_2_7P231
+
+ ntpq/ntpq-opts.h@1.233 +3 -3
+ NTP_4_2_7P231
+
+ ntpq/ntpq-opts.texi@1.233 +2 -2
+ NTP_4_2_7P231
+
+ ntpq/ntpq.1ntpqman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpq/ntpq.1ntpqmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpq/ntpq.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpq/ntpq.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.233 +3 -3
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.233 +3 -3
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.233 +2 -2
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ packageinfo.sh@1.234 +1 -1
+ NTP_4_2_7P231
+
+ scripts/ntp-wait-opts.texi@1.51 +1 -1
+ NTP_4_2_7P231
+
+ scripts/ntp-wait.1ntp-waitman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ scripts/ntp-wait.html@1.51 +1 -1
+ NTP_4_2_7P231
+
+ scripts/ntp-wait.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ scripts/ntp-wait.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp-opts.c@1.229 +3 -3
+ NTP_4_2_7P231
+
+ sntp/sntp-opts.h@1.229 +3 -3
+ NTP_4_2_7P231
+
+ sntp/sntp-opts.texi@1.229 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp.1sntpman@1.49 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp.1sntpmdoc@1.49 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp.html@1.229 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp.man.in@1.49 +2 -2
+ NTP_4_2_7P231
+
+ sntp/sntp.mdoc.in@1.49 +2 -2
+ NTP_4_2_7P231
+
+ util/ntp-keygen-opts.c@1.233 +3 -3
+ NTP_4_2_7P231
+
+ util/ntp-keygen-opts.h@1.233 +3 -3
+ NTP_4_2_7P231
+
+ util/ntp-keygen-opts.texi@1.234 +2 -2
+ NTP_4_2_7P231
+
+ util/ntp-keygen.1ntp-keygenman@1.47 +2 -2
+ NTP_4_2_7P231
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.47 +2 -2
+ NTP_4_2_7P231
+
+ util/ntp-keygen.man.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ util/ntp-keygen.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P231
+
+ChangeSet@1.2689, 2011-11-03 10:46:39+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ ChangeLog@1.1045 +2 -0
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ include/ntp_control.h@1.58 +9 -1
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ include/ntp_stdlib.h@1.67 +3 -0
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ libntp/decodenetnum.c@1.16 +1 -0
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ libntp/socktoa.c@1.18 +26 -6
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ libntp/statestr.c@1.27 +49 -0
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ ntpd/ntp_control.c@1.174 +263 -66
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ ntpq/ntpq-subs.c@1.92 +218 -13
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ ntpq/ntpq.c@1.141 +40 -31
+ Add ntpq reslist command to query access restrictions, similar to
+ ntpdc's reslist.
+
+ChangeSet@1.2688, 2011-11-03 05:55:39+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ ChangeLog@1.1044 +1 -1
+ cleanup
+
+ChangeSet@1.2687, 2011-11-02 22:39:22+01:00, jnperlin@hydra.localnet
+ [Bug 1940] ignore auth key if hex decoding fails
+
+ ChangeLog@1.1043 +1 -0
+ [Bug 1940] ignore auth key if hex decoding fails
+
+ libntp/authreadkeys.c@1.18 +8 -6
+ [Bug 1940] ignore auth key if hex decoding fails
+
+ChangeSet@1.2686, 2011-11-01 10:56:11+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P230
+ TAG: NTP_4_2_7P230
+
+ ChangeLog@1.1042 +1 -0
+ NTP_4_2_7P230
+
+ ntpd/ntpd-opts.c@1.235 +3 -3
+ NTP_4_2_7P230
+
+ ntpd/ntpd-opts.h@1.235 +3 -3
+ NTP_4_2_7P230
+
+ ntpd/ntpd-opts.texi@1.233 +2 -2
+ NTP_4_2_7P230
+
+ ntpd/ntpd.1ntpdman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpd/ntpd.1ntpdmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpd/ntpd.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpd/ntpd.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc-opts.c@1.230 +3 -3
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc-opts.h@1.230 +3 -3
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc-opts.texi@1.230 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc.1ntpdcman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc.html@1.58 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpdc/ntpdc.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpq/ntpq-opts.c@1.232 +3 -3
+ NTP_4_2_7P230
+
+ ntpq/ntpq-opts.h@1.232 +3 -3
+ NTP_4_2_7P230
+
+ ntpq/ntpq-opts.texi@1.232 +2 -2
+ NTP_4_2_7P230
+
+ ntpq/ntpq.1ntpqman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpq/ntpq.1ntpqmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpq/ntpq.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpq/ntpq.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.232 +3 -3
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.232 +3 -3
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.232 +2 -2
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ packageinfo.sh@1.233 +1 -1
+ NTP_4_2_7P230
+
+ scripts/ntp-wait-opts.texi@1.50 +1 -1
+ NTP_4_2_7P230
+
+ scripts/ntp-wait.1ntp-waitman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ scripts/ntp-wait.html@1.50 +1 -1
+ NTP_4_2_7P230
+
+ scripts/ntp-wait.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ scripts/ntp-wait.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp-opts.c@1.228 +3 -3
+ NTP_4_2_7P230
+
+ sntp/sntp-opts.h@1.228 +3 -3
+ NTP_4_2_7P230
+
+ sntp/sntp-opts.texi@1.228 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp.1sntpman@1.48 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp.1sntpmdoc@1.48 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp.html@1.228 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp.man.in@1.48 +2 -2
+ NTP_4_2_7P230
+
+ sntp/sntp.mdoc.in@1.48 +2 -2
+ NTP_4_2_7P230
+
+ util/ntp-keygen-opts.c@1.232 +3 -3
+ NTP_4_2_7P230
+
+ util/ntp-keygen-opts.h@1.232 +3 -3
+ NTP_4_2_7P230
+
+ util/ntp-keygen-opts.texi@1.233 +2 -2
+ NTP_4_2_7P230
+
+ util/ntp-keygen.1ntp-keygenman@1.46 +2 -2
+ NTP_4_2_7P230
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.46 +2 -2
+ NTP_4_2_7P230
+
+ util/ntp-keygen.man.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ util/ntp-keygen.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P230
+
+ChangeSet@1.2685, 2011-10-31 15:38:17-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1041 +1 -0
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.6 +7 -7
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.6 +2 -2
+ Documentation updates from Dave Mills
+
+ html/discover.html@1.4 +14 -12
+ Documentation updates from Dave Mills
+
+ html/drivers/driver22.html@1.20 +3 -3
+ Documentation updates from Dave Mills
+
+ html/filter.html@1.4 +4 -4
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.27 +12 -11
+ Documentation updates from Dave Mills
+
+ html/rate.html@1.9 +22 -17
+ Documentation updates from Dave Mills
+
+ html/select.html@1.4 +5 -4
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.19 +21 -20
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2684, 2011-10-31 14:54:08+00:00, davehart@shiny.ad.hartbrothers.com
+ use rand() twice to get about 32 bits of noise for mrulist.
+
+ ntpd/ntp_control.c@1.173 +3 -3
+ use rand() twice to get about 32 bits of noise for mrulist.
+
+ChangeSet@1.2683, 2011-10-31 04:40:04+00:00, davehart@shiny.ad.hartbrothers.com
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ChangeLog@1.1040 +5 -0
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ include/ntp.h@1.199 +1 -0
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ntpd/complete.conf@1.20 +1 -1
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ntpd/keyword-gen-utd@1.15 +1 -1
+ derived from ntp_keyword.h
+
+ ntpd/keyword-gen.c@1.20 +1 -0
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ntpd/ntp_config.c@1.294 +5 -1
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ntpd/ntp_keyword.h@1.17 +545 -543
+ keyword-gen output
+
+ ntpd/ntp_parser.c@1.77 +831 -823
+ Bison output
+
+ ntpd/ntp_parser.h@1.44 +175 -173
+ Bison output
+
+ ntpd/ntp_parser.y@1.71 +14 -2
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ ntpd/ntp_proto.c@1.324 +7 -2
+ Disable mode 7 (ntpdc) query processing in ntpd by default. ntpq is
+ believed to provide all functionality ntpdc did, and uses a less-
+ fragile protocol that's safer and easier to maintain. If you do find
+ some management via ntpdc is needed, you can use "enable mode7" in the
+ ntpd configuration.
+
+ChangeSet@1.2682, 2011-10-31 03:52:23+00:00, davehart@shiny.ad.hartbrothers.com
+ Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+
+ ChangeLog@1.1039 +3 -0
+ Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+
+ include/ntp.h@1.198 +2 -0
+ Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+
+ libntp/ntp_random.c@1.9 +8 -5
+ Seed rand() while seeding ntp_random(), so that code needing low-grade
+ random numbers can use the former.
+
+ ntpd/ntp_control.c@1.172 +53 -28
+ Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+
+ ntpq/ntpq-subs.c@1.91 +53 -21
+ Directly limit the number of datagrams in a mrulist response, rather
+ than limiting the number of entries returned to indirectly limit the
+ datagram count.
+
+ util/ntp-keygen.c@1.87 +1 -1
+ Use a better random seed for ntp-keygen (tv_sec + tv_usec)
+
+ChangeSet@1.2681, 2011-10-26 00:22:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P229
+ TAG: NTP_4_2_7P229
+
+ ChangeLog@1.1038 +1 -0
+ NTP_4_2_7P229
+
+ ntpd/ntpd-opts.c@1.234 +3 -3
+ NTP_4_2_7P229
+
+ ntpd/ntpd-opts.h@1.234 +3 -3
+ NTP_4_2_7P229
+
+ ntpd/ntpd-opts.texi@1.232 +2 -2
+ NTP_4_2_7P229
+
+ ntpd/ntpd.1ntpdman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpd/ntpd.1ntpdmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpd/ntpd.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpd/ntpd.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc-opts.c@1.229 +3 -3
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc-opts.h@1.229 +3 -3
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc-opts.texi@1.229 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc.1ntpdcman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc.html@1.57 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpdc/ntpdc.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpq/ntpq-opts.c@1.231 +3 -3
+ NTP_4_2_7P229
+
+ ntpq/ntpq-opts.h@1.231 +3 -3
+ NTP_4_2_7P229
+
+ ntpq/ntpq-opts.texi@1.231 +2 -2
+ NTP_4_2_7P229
+
+ ntpq/ntpq.1ntpqman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpq/ntpq.1ntpqmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpq/ntpq.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpq/ntpq.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.231 +3 -3
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.231 +3 -3
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.231 +2 -2
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ packageinfo.sh@1.232 +1 -1
+ NTP_4_2_7P229
+
+ scripts/ntp-wait-opts.texi@1.49 +1 -1
+ NTP_4_2_7P229
+
+ scripts/ntp-wait.1ntp-waitman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ scripts/ntp-wait.html@1.49 +1 -1
+ NTP_4_2_7P229
+
+ scripts/ntp-wait.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ scripts/ntp-wait.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp-opts.c@1.227 +3 -3
+ NTP_4_2_7P229
+
+ sntp/sntp-opts.h@1.227 +3 -3
+ NTP_4_2_7P229
+
+ sntp/sntp-opts.texi@1.227 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp.1sntpman@1.47 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp.1sntpmdoc@1.47 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp.html@1.227 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp.man.in@1.47 +2 -2
+ NTP_4_2_7P229
+
+ sntp/sntp.mdoc.in@1.47 +2 -2
+ NTP_4_2_7P229
+
+ util/ntp-keygen-opts.c@1.231 +3 -3
+ NTP_4_2_7P229
+
+ util/ntp-keygen-opts.h@1.231 +3 -3
+ NTP_4_2_7P229
+
+ util/ntp-keygen-opts.texi@1.232 +2 -2
+ NTP_4_2_7P229
+
+ util/ntp-keygen.1ntp-keygenman@1.45 +2 -2
+ NTP_4_2_7P229
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.45 +2 -2
+ NTP_4_2_7P229
+
+ util/ntp-keygen.man.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ util/ntp-keygen.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P229
+
+ChangeSet@1.2680, 2011-10-25 17:18:33-04:00, perlinger@psp-deb1.ntp.org
+ [bug 1995] fixed wrong use of ZERO() macro in ntp_calendar.c
+
+ ChangeLog@1.1037 +1 -0
+ [bug 1995] fixed wrong use of ZERO() macro in ntp_calendar.c
+
+ libntp/ntp_calendar.c@1.9 +1 -1
+ [bug 1995] fixed wron use of ZERO() macro in ntp_calendar.c
+
+ChangeSet@1.2679, 2011-10-23 10:52:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P228
+ TAG: NTP_4_2_7P228
+
+ ChangeLog@1.1036 +1 -0
+ NTP_4_2_7P228
+
+ ntpd/ntpd-opts.c@1.233 +3 -3
+ NTP_4_2_7P228
+
+ ntpd/ntpd-opts.h@1.233 +3 -3
+ NTP_4_2_7P228
+
+ ntpd/ntpd-opts.texi@1.231 +2 -2
+ NTP_4_2_7P228
+
+ ntpd/ntpd.1ntpdman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpd/ntpd.1ntpdmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpd/ntpd.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpd/ntpd.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc-opts.c@1.228 +3 -3
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc-opts.h@1.228 +3 -3
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc-opts.texi@1.228 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc.1ntpdcman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc.html@1.56 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpdc/ntpdc.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpq/ntpq-opts.c@1.230 +3 -3
+ NTP_4_2_7P228
+
+ ntpq/ntpq-opts.h@1.230 +3 -3
+ NTP_4_2_7P228
+
+ ntpq/ntpq-opts.texi@1.230 +2 -2
+ NTP_4_2_7P228
+
+ ntpq/ntpq.1ntpqman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpq/ntpq.1ntpqmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpq/ntpq.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpq/ntpq.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.230 +3 -3
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.230 +3 -3
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.230 +2 -2
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ packageinfo.sh@1.231 +1 -1
+ NTP_4_2_7P228
+
+ scripts/ntp-wait-opts.texi@1.48 +1 -1
+ NTP_4_2_7P228
+
+ scripts/ntp-wait.1ntp-waitman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ scripts/ntp-wait.html@1.48 +1 -1
+ NTP_4_2_7P228
+
+ scripts/ntp-wait.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ scripts/ntp-wait.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp-opts.c@1.226 +3 -3
+ NTP_4_2_7P228
+
+ sntp/sntp-opts.h@1.226 +3 -3
+ NTP_4_2_7P228
+
+ sntp/sntp-opts.texi@1.226 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp.1sntpman@1.46 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp.1sntpmdoc@1.46 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp.html@1.226 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp.man.in@1.46 +2 -2
+ NTP_4_2_7P228
+
+ sntp/sntp.mdoc.in@1.46 +2 -2
+ NTP_4_2_7P228
+
+ util/ntp-keygen-opts.c@1.230 +3 -3
+ NTP_4_2_7P228
+
+ util/ntp-keygen-opts.h@1.230 +3 -3
+ NTP_4_2_7P228
+
+ util/ntp-keygen-opts.texi@1.231 +2 -2
+ NTP_4_2_7P228
+
+ util/ntp-keygen.1ntp-keygenman@1.44 +2 -2
+ NTP_4_2_7P228
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.44 +2 -2
+ NTP_4_2_7P228
+
+ util/ntp-keygen.man.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ util/ntp-keygen.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P228
+
+ChangeSet@1.2678, 2011-10-22 18:05:27-04:00, stenn@deacon.udel.edu
+ Start the NEWS file updates in preparation for 4.2.8
+
+ NEWS@1.123 +18 -0
+ Start the NEWS file updates in preparation for 4.2.8
+
+ChangeSet@1.2673.1.50, 2011-10-22 10:34:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P227
+ TAG: NTP_4_2_7P227
+
+ ChangeLog@1.1032.1.42 +1 -0
+ NTP_4_2_7P227
+
+ ntpd/ntpd-opts.c@1.232 +3 -3
+ NTP_4_2_7P227
+
+ ntpd/ntpd-opts.h@1.232 +3 -3
+ NTP_4_2_7P227
+
+ ntpd/ntpd-opts.texi@1.230 +2 -2
+ NTP_4_2_7P227
+
+ ntpd/ntpd.1ntpdman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpd/ntpd.1ntpdmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpd/ntpd.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpd/ntpd.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc-opts.c@1.227 +3 -3
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc-opts.h@1.227 +3 -3
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc-opts.texi@1.227 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc.1ntpdcman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc.html@1.55 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpdc/ntpdc.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpq/ntpq-opts.c@1.229 +3 -3
+ NTP_4_2_7P227
+
+ ntpq/ntpq-opts.h@1.229 +3 -3
+ NTP_4_2_7P227
+
+ ntpq/ntpq-opts.texi@1.229 +2 -2
+ NTP_4_2_7P227
+
+ ntpq/ntpq.1ntpqman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpq/ntpq.1ntpqmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpq/ntpq.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpq/ntpq.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.229 +3 -3
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.229 +3 -3
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.229 +2 -2
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ packageinfo.sh@1.230 +1 -1
+ NTP_4_2_7P227
+
+ scripts/ntp-wait-opts.texi@1.47 +1 -1
+ NTP_4_2_7P227
+
+ scripts/ntp-wait.1ntp-waitman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ scripts/ntp-wait.html@1.47 +1 -1
+ NTP_4_2_7P227
+
+ scripts/ntp-wait.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ scripts/ntp-wait.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp-opts.c@1.225 +3 -3
+ NTP_4_2_7P227
+
+ sntp/sntp-opts.h@1.225 +3 -3
+ NTP_4_2_7P227
+
+ sntp/sntp-opts.texi@1.225 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp.1sntpman@1.45 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp.1sntpmdoc@1.45 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp.html@1.225 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp.man.in@1.45 +2 -2
+ NTP_4_2_7P227
+
+ sntp/sntp.mdoc.in@1.45 +2 -2
+ NTP_4_2_7P227
+
+ util/ntp-keygen-opts.c@1.229 +3 -3
+ NTP_4_2_7P227
+
+ util/ntp-keygen-opts.h@1.229 +3 -3
+ NTP_4_2_7P227
+
+ util/ntp-keygen-opts.texi@1.230 +2 -2
+ NTP_4_2_7P227
+
+ util/ntp-keygen.1ntp-keygenman@1.43 +2 -2
+ NTP_4_2_7P227
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.43 +2 -2
+ NTP_4_2_7P227
+
+ util/ntp-keygen.man.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ util/ntp-keygen.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P227
+
+ChangeSet@1.2673.1.49, 2011-10-21 19:10:02+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2036] gcc 2.95.3 preprocessor can't nest #ifdef in macro args.
+ A number of compiler warnings eliminated.
+
+ ChangeLog@1.1032.1.41 +2 -0
+ [Bug 2036] gcc 2.95.3 preprocessor can't nest #ifdef in macro args.
+ A number of compiler warnings eliminated.
+
+ lib/isc/include/isc/file.h@1.5 +2 -2
+ A number of compiler warnings eliminated.
+
+ lib/isc/include/isc/util.h@1.5 +1 -1
+ A number of compiler warnings eliminated.
+
+ lib/isc/inet_ntop.c@1.12 +2 -1
+ A number of compiler warnings eliminated.
+
+ lib/isc/inet_pton.c@1.6 +1 -0
+ A number of compiler warnings eliminated.
+
+ lib/isc/result.c@1.2 +13 -13
+ A number of compiler warnings eliminated.
+
+ lib/isc/unix/file.c@1.4 +7 -7
+ A number of compiler warnings eliminated.
+
+ libntp/msyslog.c@1.48 +6 -2
+ A number of compiler warnings eliminated.
+
+ libntp/snprintf.c@1.12 +0 -2
+ A number of compiler warnings eliminated.
+
+ ntpd/ntp_io.c@1.361 +6 -1
+ A number of compiler warnings eliminated.
+
+ ntpd/refclock_nmea.c@1.64 +2 -0
+ A number of compiler warnings eliminated.
+
+ ntpd/refclock_parse.c@1.62 +9 -11
+ [Bug 2036] gcc 2.95.3 preprocessor can't nest #ifdef in macro args.
+ A number of compiler warnings eliminated.
+
+ ntpd/refclock_wwvb.c@1.33 +2 -0
+ A number of compiler warnings eliminated.
+
+ChangeSet@1.2673.1.48, 2011-10-21 18:40:55+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P226
+ TAG: NTP_4_2_7P226
+
+ ChangeLog@1.1032.1.40 +1 -0
+ NTP_4_2_7P226
+
+ ntpd/ntpd-opts.c@1.231 +3 -3
+ NTP_4_2_7P226
+
+ ntpd/ntpd-opts.h@1.231 +3 -3
+ NTP_4_2_7P226
+
+ ntpd/ntpd-opts.texi@1.229 +2 -2
+ NTP_4_2_7P226
+
+ ntpd/ntpd.1ntpdman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpd/ntpd.1ntpdmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpd/ntpd.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpd/ntpd.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc-opts.c@1.226 +3 -3
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc-opts.h@1.226 +3 -3
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc-opts.texi@1.226 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc.1ntpdcman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc.html@1.54 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpdc/ntpdc.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpq/ntpq-opts.c@1.228 +3 -3
+ NTP_4_2_7P226
+
+ ntpq/ntpq-opts.h@1.228 +3 -3
+ NTP_4_2_7P226
+
+ ntpq/ntpq-opts.texi@1.228 +2 -2
+ NTP_4_2_7P226
+
+ ntpq/ntpq.1ntpqman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpq/ntpq.1ntpqmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpq/ntpq.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpq/ntpq.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.228 +3 -3
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.228 +3 -3
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.228 +2 -2
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ packageinfo.sh@1.229 +1 -1
+ NTP_4_2_7P226
+
+ scripts/ntp-wait-opts.texi@1.46 +1 -1
+ NTP_4_2_7P226
+
+ scripts/ntp-wait.1ntp-waitman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ scripts/ntp-wait.html@1.46 +1 -1
+ NTP_4_2_7P226
+
+ scripts/ntp-wait.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ scripts/ntp-wait.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp-opts.c@1.224 +3 -3
+ NTP_4_2_7P226
+
+ sntp/sntp-opts.h@1.224 +3 -3
+ NTP_4_2_7P226
+
+ sntp/sntp-opts.texi@1.224 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp.1sntpman@1.44 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp.1sntpmdoc@1.44 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp.html@1.224 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp.man.in@1.44 +2 -2
+ NTP_4_2_7P226
+
+ sntp/sntp.mdoc.in@1.44 +2 -2
+ NTP_4_2_7P226
+
+ util/ntp-keygen-opts.c@1.228 +3 -3
+ NTP_4_2_7P226
+
+ util/ntp-keygen-opts.h@1.228 +3 -3
+ NTP_4_2_7P226
+
+ util/ntp-keygen-opts.texi@1.229 +2 -2
+ NTP_4_2_7P226
+
+ util/ntp-keygen.1ntp-keygenman@1.42 +2 -2
+ NTP_4_2_7P226
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.42 +2 -2
+ NTP_4_2_7P226
+
+ util/ntp-keygen.man.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ util/ntp-keygen.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P226
+
+ChangeSet@1.2676, 2011-10-21 02:07:25+00:00, davehart@shiny.ad.hartbrothers.com
+ Minor style cleanup of ntp_calendar.c and systime.c
+
+ include/ntp_types.h@1.27 +4 -1
+ provide UNUSED_LOCAL() like UNUSED_ARG() to quiet warnings.
+
+ libntp/ntp_calendar.c@1.8 +180 -119
+ Remove shadowing "tmp" redeclaration in time_to_vint64(), rename tmp to tt.
+ Minor style cleanup, including older code.
+
+ libntp/systime.c@1.58 +25 -28
+ minor style cleanup, reduce indenting
+
+ChangeSet@1.2673.1.47, 2011-10-18 23:37:23-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.1.39 +1 -0
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.5 +5 -5
+ Documentation updates from Dave Mills
+
+ html/drivers/scripts/footer.txt@1.4 +5 -3
+ Documentation updates from Dave Mills
+
+ html/scripts/command.txt@1.5 +7 -9
+ Documentation updates from Dave Mills
+
+ html/scripts/confopt.txt@1.5 +5 -5
+ Documentation updates from Dave Mills
+
+ html/scripts/footer.txt@1.5 +5 -8
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.4.243, 2011-10-18 23:14:54+00:00, stenn@deacon.udel.edu
NTP_4_2_6P5_RC1
TAG: NTP_4_2_6P5_RC1
- ChangeLog@1.740 +1 -0
+ ChangeLog@1.496.26.173 +1 -0
NTP_4_2_6P5_RC1
- ntpd/ntpd-opts.c@1.288 +5 -5
+ ntpd/ntpd-opts.c@1.248.40.1 +5 -5
NTP_4_2_6P5_RC1
- ntpd/ntpd-opts.h@1.288 +3 -3
+ ntpd/ntpd-opts.h@1.248.40.1 +3 -3
NTP_4_2_6P5_RC1
- ntpd/ntpd-opts.texi@1.285 +2 -2
+ ntpd/ntpd-opts.texi@1.246.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpd/ntpd.1@1.285 +2 -2
+ ntpd/ntpd.1@1.246.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpdc/ntpdc-opts.c@1.284 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.40.1 +5 -5
NTP_4_2_6P5_RC1
- ntpdc/ntpdc-opts.h@1.284 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.40.1 +3 -3
NTP_4_2_6P5_RC1
- ntpdc/ntpdc-opts.texi@1.282 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpdc/ntpdc.1@1.282 +2 -2
+ ntpdc/ntpdc.1@1.243.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpq/ntpq-opts.c@1.285 +5 -5
+ ntpq/ntpq-opts.c@1.245.40.1 +5 -5
NTP_4_2_6P5_RC1
- ntpq/ntpq-opts.h@1.285 +3 -3
+ ntpq/ntpq-opts.h@1.245.40.1 +3 -3
NTP_4_2_6P5_RC1
- ntpq/ntpq-opts.texi@1.283 +2 -2
+ ntpq/ntpq-opts.texi@1.244.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpq/ntpq.1@1.283 +2 -2
+ ntpq/ntpq.1@1.244.39.1 +2 -2
NTP_4_2_6P5_RC1
- ntpsnmpd/ntpsnmpd-opts.c@1.164 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.41.1 +5 -5
NTP_4_2_6P5_RC1
- ntpsnmpd/ntpsnmpd-opts.h@1.164 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.41.1 +3 -3
NTP_4_2_6P5_RC1
- ntpsnmpd/ntpsnmpd-opts.texi@1.163 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.40.1 +2 -2
NTP_4_2_6P5_RC1
- ntpsnmpd/ntpsnmpd.1@1.162 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.40.1 +2 -2
NTP_4_2_6P5_RC1
- packageinfo.sh@1.302 +2 -2
+ packageinfo.sh@1.255.37.2 +2 -2
NTP_4_2_6P5_RC1
- sntp/sntp-opts.c@1.156 +5 -5
+ sntp/sntp-opts.c@1.117.39.1 +5 -5
NTP_4_2_6P5_RC1
- sntp/sntp-opts.h@1.156 +3 -3
+ sntp/sntp-opts.h@1.117.39.1 +3 -3
NTP_4_2_6P5_RC1
- sntp/sntp-opts.texi@1.155 +2 -2
+ sntp/sntp-opts.texi@1.117.38.1 +2 -2
NTP_4_2_6P5_RC1
- sntp/sntp.1@1.155 +2 -2
+ sntp/sntp.1@1.117.38.1 +2 -2
NTP_4_2_6P5_RC1
- sntp/sntp.html@1.46 +2 -2
+ sntp/sntp.html@1.7.39.1 +2 -2
NTP_4_2_6P5_RC1
- util/ntp-keygen-opts.c@1.287 +5 -5
+ util/ntp-keygen-opts.c@1.247.40.1 +5 -5
NTP_4_2_6P5_RC1
- util/ntp-keygen-opts.h@1.287 +3 -3
+ util/ntp-keygen-opts.h@1.247.40.1 +3 -3
NTP_4_2_6P5_RC1
- util/ntp-keygen-opts.texi@1.285 +2 -2
+ util/ntp-keygen-opts.texi@1.246.39.1 +2 -2
NTP_4_2_6P5_RC1
- util/ntp-keygen.1@1.285 +2 -2
+ util/ntp-keygen.1@1.246.39.1 +2 -2
NTP_4_2_6P5_RC1
-ChangeSet@1.2329, 2011-10-18 14:31:10-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.242, 2011-10-18 14:31:10-04:00, stenn@deacon.udel.edu
ntp-4.2.6p5-RC1
- packageinfo.sh@1.301 +1 -1
+ packageinfo.sh@1.255.37.1 +1 -1
ntp-4.2.6p5-RC1
-ChangeSet@1.2328, 2011-10-18 14:27:46-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.241, 2011-10-18 14:27:46-04:00, stenn@deacon.udel.edu
update NEWS file
NEWS@1.122 +5 -5
update
-ChangeSet@1.2327, 2011-10-18 02:35:21+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2673.1.45, 2011-10-18 06:33:06+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec.
+
+ ChangeLog@1.1032.1.37 +1 -0
+ [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec.
+
+ configure.ac@1.538 +1 -1
+ [Bug 2035] ntpq -c mrulist sleeps 1 sec between queries, not 5 msec.
+
+ ntpq/ntpq-subs.c@1.90 +6 -10
+ Move add_mru trace output from -D 1 to -D 2
+
+ChangeSet@1.2082.4.240, 2011-10-18 02:35:21+00:00, davehart@shiny.ad.hartbrothers.com
Generalize [Bug 2034] summary, correct NEWS description of same.
- ChangeLog@1.739 +1 -1
+ ChangeLog@1.496.26.172 +1 -1
Generalize [Bug 2034] summary, correct NEWS description of same.
NEWS@1.121 +7 -4
Generalize [Bug 2034] summary, correct NEWS description of same.
-ChangeSet@1.2326, 2011-10-17 20:43:13-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.239, 2011-10-17 20:43:13-04:00, stenn@deacon.udel.edu
Update NEWS file for 4.2.6p5
NEWS@1.120 +15 -0
Update NEWS file for 4.2.6p5
-ChangeSet@1.2325, 2011-10-17 20:14:44+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.238, 2011-10-17 20:14:44+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2034] interface ignore fe80::/64 mismatches ::, ::1...
- ChangeLog@1.738 +4 -1
+ ChangeLog@1.496.26.171 +4 -1
[Bug 2034] interface ignore fe80::/64 mismatches ::, ::1...
- ntpd/ntp_io.c@1.322 +7 -4
+ ntpd/ntp_io.c@1.306.1.16 +7 -4
[Bug 2034] interface ignore fe80::/64 mismatches ::, ::1...
-ChangeSet@1.2324, 2011-09-23 03:38:30+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2673.1.42, 2011-10-15 10:36:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P225
+ TAG: NTP_4_2_7P225
+
+ ChangeLog@1.1032.1.34 +1 -0
+ NTP_4_2_7P225
+
+ ntpd/ntpd-opts.c@1.230 +3 -3
+ NTP_4_2_7P225
+
+ ntpd/ntpd-opts.h@1.230 +3 -3
+ NTP_4_2_7P225
+
+ ntpd/ntpd-opts.texi@1.228 +2 -2
+ NTP_4_2_7P225
+
+ ntpd/ntpd.1ntpdman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpd/ntpd.1ntpdmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpd/ntpd.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpd/ntpd.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc-opts.c@1.225 +3 -3
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc-opts.h@1.225 +3 -3
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc-opts.texi@1.225 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc.1ntpdcman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc.html@1.53 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpdc/ntpdc.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpq/ntpq-opts.c@1.227 +3 -3
+ NTP_4_2_7P225
+
+ ntpq/ntpq-opts.h@1.227 +3 -3
+ NTP_4_2_7P225
+
+ ntpq/ntpq-opts.texi@1.227 +2 -2
+ NTP_4_2_7P225
+
+ ntpq/ntpq.1ntpqman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpq/ntpq.1ntpqmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpq/ntpq.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpq/ntpq.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.227 +3 -3
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.227 +3 -3
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.227 +2 -2
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ packageinfo.sh@1.228 +1 -1
+ NTP_4_2_7P225
+
+ scripts/ntp-wait-opts.texi@1.45 +1 -1
+ NTP_4_2_7P225
+
+ scripts/ntp-wait.1ntp-waitman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ scripts/ntp-wait.html@1.45 +1 -1
+ NTP_4_2_7P225
+
+ scripts/ntp-wait.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ scripts/ntp-wait.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp-opts.c@1.223 +3 -3
+ NTP_4_2_7P225
+
+ sntp/sntp-opts.h@1.223 +3 -3
+ NTP_4_2_7P225
+
+ sntp/sntp-opts.texi@1.223 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp.1sntpman@1.43 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp.1sntpmdoc@1.43 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp.html@1.223 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp.man.in@1.43 +2 -2
+ NTP_4_2_7P225
+
+ sntp/sntp.mdoc.in@1.43 +2 -2
+ NTP_4_2_7P225
+
+ util/ntp-keygen-opts.c@1.227 +3 -3
+ NTP_4_2_7P225
+
+ util/ntp-keygen-opts.h@1.227 +3 -3
+ NTP_4_2_7P225
+
+ util/ntp-keygen-opts.texi@1.228 +2 -2
+ NTP_4_2_7P225
+
+ util/ntp-keygen.1ntp-keygenman@1.41 +2 -2
+ NTP_4_2_7P225
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.41 +2 -2
+ NTP_4_2_7P225
+
+ util/ntp-keygen.man.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ util/ntp-keygen.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P225
+
+ChangeSet@1.2673.1.41, 2011-10-14 21:01:03-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.1.33 +1 -0
+ Documentation updates from Dave Mills
+
+ html/accopt.html@1.41 +2 -1
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.38 +3 -3
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.73 +3 -6
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.4 +3 -3
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.57 +7 -7
+ Documentation updates from Dave Mills
+
+ html/discover.html@1.3 +7 -6
+ Documentation updates from Dave Mills
+
+ html/huffpuff.html@1.3 +9 -3
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.18 +3 -3
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2673.1.40, 2011-10-14 10:39:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P224
+ TAG: NTP_4_2_7P224
+
+ ChangeLog@1.1032.1.32 +1 -0
+ NTP_4_2_7P224
+
+ ntpd/ntpd-opts.c@1.229 +3 -3
+ NTP_4_2_7P224
+
+ ntpd/ntpd-opts.h@1.229 +3 -3
+ NTP_4_2_7P224
+
+ ntpd/ntpd-opts.texi@1.227 +2 -2
+ NTP_4_2_7P224
+
+ ntpd/ntpd.1ntpdman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpd/ntpd.1ntpdmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpd/ntpd.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpd/ntpd.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc-opts.c@1.224 +3 -3
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc-opts.h@1.224 +3 -3
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc-opts.texi@1.224 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc.1ntpdcman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc.html@1.52 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpdc/ntpdc.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpq/ntpq-opts.c@1.226 +3 -3
+ NTP_4_2_7P224
+
+ ntpq/ntpq-opts.h@1.226 +3 -3
+ NTP_4_2_7P224
+
+ ntpq/ntpq-opts.texi@1.226 +2 -2
+ NTP_4_2_7P224
+
+ ntpq/ntpq.1ntpqman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpq/ntpq.1ntpqmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpq/ntpq.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpq/ntpq.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.226 +3 -3
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.226 +3 -3
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.226 +2 -2
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ packageinfo.sh@1.227 +1 -1
+ NTP_4_2_7P224
+
+ scripts/ntp-wait-opts.texi@1.44 +1 -1
+ NTP_4_2_7P224
+
+ scripts/ntp-wait.1ntp-waitman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ scripts/ntp-wait.html@1.44 +1 -1
+ NTP_4_2_7P224
+
+ scripts/ntp-wait.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ scripts/ntp-wait.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp-opts.c@1.222 +3 -3
+ NTP_4_2_7P224
+
+ sntp/sntp-opts.h@1.222 +3 -3
+ NTP_4_2_7P224
+
+ sntp/sntp-opts.texi@1.222 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp.1sntpman@1.42 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp.1sntpmdoc@1.42 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp.html@1.222 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp.man.in@1.42 +2 -2
+ NTP_4_2_7P224
+
+ sntp/sntp.mdoc.in@1.42 +2 -2
+ NTP_4_2_7P224
+
+ util/ntp-keygen-opts.c@1.226 +3 -3
+ NTP_4_2_7P224
+
+ util/ntp-keygen-opts.h@1.226 +3 -3
+ NTP_4_2_7P224
+
+ util/ntp-keygen-opts.texi@1.227 +2 -2
+ NTP_4_2_7P224
+
+ util/ntp-keygen.1ntp-keygenman@1.40 +2 -2
+ NTP_4_2_7P224
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.40 +2 -2
+ NTP_4_2_7P224
+
+ util/ntp-keygen.man.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ util/ntp-keygen.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P224
+
+ChangeSet@1.2673.1.39, 2011-10-13 18:13:58+00:00, davehart@shiny.ad.hartbrothers.com
+ ntpq mrulist shows intermediate counts every five seconds while
+ retrieving list, and allows Ctrl-C interruption of the retrieval,
+ showing the incomplete list as retrieved. Reduce delay between
+ successive mrulist retrieval queries from 30 to 5 msec. Do not
+ give up mrulist retrieval when a single query times out.
+
+ ChangeLog@1.1032.1.31 +5 -0
+ ntpq mrulist shows intermediate counts every five seconds while
+ retrieving list, and allows Ctrl-C interruption of the retrieval,
+ showing the incomplete list as retrieved. Reduce delay between
+ successive mrulist retrieval queries from 30 to 5 msec. Do not
+ give up mrulist retrieval when a single query times out.
+
+ include/ntp_stdlib.h@1.66 +3 -0
+ provide portable POSIX/Win32 Ctrl-C interception.
+
+ libntp/syssignal.c@1.15 +79 -0
+ provide portable POSIX/Win32 Ctrl-C interception.
+
+ ntpq/ntpq-subs.c@1.89 +53 -8
+ ntpq mrulist shows intermediate counts every five seconds while
+ retrieving list, and allows Ctrl-C interruption of the retrieval,
+ showing the incomplete list as retrieved. Reduce delay between
+ successive mrulist retrieval queries from 30 to 5 msec. Do not
+ give up mrulist retrieval when a single query times out.
+
+ ntpq/ntpq.h@1.24 +5 -0
+ ntpq mrulist shows intermediate counts every five seconds while
+ retrieving list.
+
+ChangeSet@1.2673.1.38, 2011-10-12 10:41:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P223
+ TAG: NTP_4_2_7P223
+
+ ChangeLog@1.1032.1.30 +1 -0
+ NTP_4_2_7P223
+
+ ntpd/ntpd-opts.c@1.228 +3 -3
+ NTP_4_2_7P223
+
+ ntpd/ntpd-opts.h@1.228 +3 -3
+ NTP_4_2_7P223
+
+ ntpd/ntpd-opts.texi@1.226 +2 -2
+ NTP_4_2_7P223
+
+ ntpd/ntpd.1ntpdman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpd/ntpd.1ntpdmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpd/ntpd.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpd/ntpd.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc-opts.c@1.223 +3 -3
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc-opts.h@1.223 +3 -3
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc-opts.texi@1.223 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc.1ntpdcman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc.html@1.51 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpdc/ntpdc.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpq/ntpq-opts.c@1.225 +3 -3
+ NTP_4_2_7P223
+
+ ntpq/ntpq-opts.h@1.225 +3 -3
+ NTP_4_2_7P223
+
+ ntpq/ntpq-opts.texi@1.225 +2 -2
+ NTP_4_2_7P223
+
+ ntpq/ntpq.1ntpqman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpq/ntpq.1ntpqmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpq/ntpq.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpq/ntpq.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.225 +3 -3
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.225 +3 -3
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.225 +2 -2
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ packageinfo.sh@1.226 +1 -1
+ NTP_4_2_7P223
+
+ scripts/ntp-wait-opts.texi@1.43 +1 -1
+ NTP_4_2_7P223
+
+ scripts/ntp-wait.1ntp-waitman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ scripts/ntp-wait.html@1.43 +1 -1
+ NTP_4_2_7P223
+
+ scripts/ntp-wait.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ scripts/ntp-wait.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp-opts.c@1.221 +3 -3
+ NTP_4_2_7P223
+
+ sntp/sntp-opts.h@1.221 +3 -3
+ NTP_4_2_7P223
+
+ sntp/sntp-opts.texi@1.221 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp.1sntpman@1.41 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp.1sntpmdoc@1.41 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp.html@1.221 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp.man.in@1.41 +2 -2
+ NTP_4_2_7P223
+
+ sntp/sntp.mdoc.in@1.41 +2 -2
+ NTP_4_2_7P223
+
+ util/ntp-keygen-opts.c@1.225 +3 -3
+ NTP_4_2_7P223
+
+ util/ntp-keygen-opts.h@1.225 +3 -3
+ NTP_4_2_7P223
+
+ util/ntp-keygen-opts.texi@1.226 +2 -2
+ NTP_4_2_7P223
+
+ util/ntp-keygen.1ntp-keygenman@1.39 +2 -2
+ NTP_4_2_7P223
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.39 +2 -2
+ NTP_4_2_7P223
+
+ util/ntp-keygen.man.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ util/ntp-keygen.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P223
+
+ChangeSet@1.2673.1.37, 2011-10-12 02:48:59-04:00, stenn@deacon.udel.edu
+ revert bogus changes
+
+ html/accopt.html@1.40 +72 -55
+ revert bogus changes
+
+ html/assoc.html@1.37 +61 -671
+ revert bogus changes
+
+ChangeSet@1.2673.1.36, 2011-10-12 02:28:11-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.1.29 +1 -0
+ Documentation updates from Dave Mills
+
+ html/accopt.html@1.39 +55 -72
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.36 +671 -61
+ Documentation updates from Dave Mills
+
+ html/decode.html@1.18 +1 -11
+ Documentation updates from Dave Mills
+
+ html/discover.html@1.2 +2 -2
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.17 +3 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2673.1.35, 2011-10-11 09:09:30+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P222
+ TAG: NTP_4_2_7P222
+
+ ChangeLog@1.1032.1.28 +1 -0
+ NTP_4_2_7P222
+
+ ntpd/ntpd-opts.c@1.227 +3 -3
+ NTP_4_2_7P222
+
+ ntpd/ntpd-opts.h@1.227 +3 -3
+ NTP_4_2_7P222
+
+ ntpd/ntpd-opts.texi@1.225 +2 -2
+ NTP_4_2_7P222
+
+ ntpd/ntpd.1ntpdman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpd/ntpd.1ntpdmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpd/ntpd.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpd/ntpd.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc-opts.c@1.222 +3 -3
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc-opts.h@1.222 +3 -3
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc-opts.texi@1.222 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc.1ntpdcman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc.html@1.50 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpdc/ntpdc.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpq/ntpq-opts.c@1.224 +3 -3
+ NTP_4_2_7P222
+
+ ntpq/ntpq-opts.h@1.224 +3 -3
+ NTP_4_2_7P222
+
+ ntpq/ntpq-opts.texi@1.224 +2 -2
+ NTP_4_2_7P222
+
+ ntpq/ntpq.1ntpqman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpq/ntpq.1ntpqmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpq/ntpq.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpq/ntpq.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.224 +3 -3
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.224 +3 -3
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.224 +2 -2
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ packageinfo.sh@1.225 +1 -1
+ NTP_4_2_7P222
+
+ scripts/ntp-wait-opts.texi@1.42 +14 -2
+ NTP_4_2_7P222
+
+ scripts/ntp-wait.1ntp-waitman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ scripts/ntp-wait.html@1.42 +14 -2
+ NTP_4_2_7P222
+
+ scripts/ntp-wait.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ scripts/ntp-wait.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp-opts.c@1.220 +3 -3
+ NTP_4_2_7P222
+
+ sntp/sntp-opts.h@1.220 +3 -3
+ NTP_4_2_7P222
+
+ sntp/sntp-opts.texi@1.220 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp.1sntpman@1.40 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp.1sntpmdoc@1.40 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp.html@1.220 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp.man.in@1.40 +2 -2
+ NTP_4_2_7P222
+
+ sntp/sntp.mdoc.in@1.40 +2 -2
+ NTP_4_2_7P222
+
+ util/ntp-keygen-opts.c@1.224 +3 -3
+ NTP_4_2_7P222
+
+ util/ntp-keygen-opts.h@1.224 +3 -3
+ NTP_4_2_7P222
+
+ util/ntp-keygen-opts.texi@1.225 +2 -2
+ NTP_4_2_7P222
+
+ util/ntp-keygen.1ntp-keygenman@1.38 +2 -2
+ NTP_4_2_7P222
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.38 +2 -2
+ NTP_4_2_7P222
+
+ util/ntp-keygen.man.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ util/ntp-keygen.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P222
+
+ChangeSet@1.2673.1.34, 2011-10-11 02:04:21+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2029] "make check" clutters syslog.
+ Log signal description along with number on ntpd exit.
+
+ ChangeLog@1.1032.1.27 +2 -0
+ [Bug 2029] "make check" clutters syslog.
+ Log signal description along with number on ntpd exit.
+
+
+ configure.ac@1.537 +1 -4
+ Log signal description along with number on ntpd exit.
+
+ include/ntpd.h@1.169 +1 -1
+ cosmetic only
+
+ ntpd/ntpd.c@1.129 +26 -47
+ [Bug 2029] "make check" clutters syslog.
+ Log signal description along with number on ntpd exit.
+
+
+ChangeSet@1.2673.1.33, 2011-10-10 05:59:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P221
+ TAG: NTP_4_2_7P221
+
+ ChangeLog@1.1032.1.26 +1 -0
+ NTP_4_2_7P221
+
+ ntpd/ntpd-opts.c@1.226 +3 -3
+ NTP_4_2_7P221
+
+ ntpd/ntpd-opts.h@1.226 +3 -3
+ NTP_4_2_7P221
+
+ ntpd/ntpd-opts.texi@1.224 +2 -2
+ NTP_4_2_7P221
+
+ ntpd/ntpd.1ntpdman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpd/ntpd.1ntpdmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpd/ntpd.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpd/ntpd.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc-opts.c@1.221 +3 -3
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc-opts.h@1.221 +3 -3
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc-opts.texi@1.221 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc.1ntpdcman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc.html@1.49 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpdc/ntpdc.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpq/ntpq-opts.c@1.223 +3 -3
+ NTP_4_2_7P221
+
+ ntpq/ntpq-opts.h@1.223 +3 -3
+ NTP_4_2_7P221
+
+ ntpq/ntpq-opts.texi@1.223 +2 -2
+ NTP_4_2_7P221
+
+ ntpq/ntpq.1ntpqman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpq/ntpq.1ntpqmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpq/ntpq.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpq/ntpq.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.223 +3 -3
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.223 +3 -3
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.223 +2 -2
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ packageinfo.sh@1.224 +1 -1
+ NTP_4_2_7P221
+
+ scripts/ntp-wait-opts.texi@1.41 +2 -14
+ NTP_4_2_7P221
+
+ scripts/ntp-wait.1ntp-waitman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ scripts/ntp-wait.html@1.41 +2 -14
+ NTP_4_2_7P221
+
+ scripts/ntp-wait.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ scripts/ntp-wait.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp-opts.c@1.219 +3 -3
+ NTP_4_2_7P221
+
+ sntp/sntp-opts.h@1.219 +3 -3
+ NTP_4_2_7P221
+
+ sntp/sntp-opts.texi@1.219 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp.1sntpman@1.39 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp.1sntpmdoc@1.39 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp.html@1.219 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp.man.in@1.39 +2 -2
+ NTP_4_2_7P221
+
+ sntp/sntp.mdoc.in@1.39 +2 -2
+ NTP_4_2_7P221
+
+ util/ntp-keygen-opts.c@1.223 +3 -3
+ NTP_4_2_7P221
+
+ util/ntp-keygen-opts.h@1.223 +3 -3
+ NTP_4_2_7P221
+
+ util/ntp-keygen-opts.texi@1.224 +2 -2
+ NTP_4_2_7P221
+
+ util/ntp-keygen.1ntp-keygenman@1.37 +2 -2
+ NTP_4_2_7P221
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.37 +2 -2
+ NTP_4_2_7P221
+
+ util/ntp-keygen.man.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ util/ntp-keygen.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P221
+
+ChangeSet@1.2673.1.32, 2011-10-10 04:49:18+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2028] ntpd -n (nofork) redirects logging to stderr.
+
+ ChangeLog@1.1032.1.25 +1 -0
+ [Bug 2028] ntpd -n (nofork) redirects logging to stderr.
+
+ ntpd/ntpd.c@1.128 +2 -5
+ [Bug 2028] ntpd -n (nofork) redirects logging to stderr.
+
+ChangeSet@1.2673.1.31, 2011-10-09 16:48:41-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.1.24 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.9 +6 -13
+ Documentation updates from Dave Mills
+
+ html/drivers/scripts/footer.txt@1.3 +1 -1
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2673.1.30, 2011-10-09 20:33:29+00:00, davehart@shiny.ad.hartbrothers.com
+ DLM does not want STA_UNSYNC set in kernel when ntpd exits.
+
+ ntpd/ntp_loopfilter.c@1.168 +1 -17
+ DLM does not want STA_UNSYNC set in kernel when ntpd exits.
+
+ChangeSet@1.2673.1.29, 2011-10-09 05:08:21+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+
+ ChangeLog@1.1032.1.23 +2 -0
+ [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+
+ include/ntp_stdlib.h@1.65 +2 -0
+ conditionalize k_st_flags() prototype to match implementation.
+
+ include/ntpd.h@1.168 +1 -0
+ [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+
+ include/refclock_atom.h@1.4 +1 -0
+ Quiet NANOSECOND redeclaration warning with #undef.
+
+ libntp/statestr.c@1.26 +3 -0
+ Make decode_bitflags() (and thereby its wrappers like k_st_flags())
+ safe for using in msyslog/DPRINTF/msnprintf arguments with %m by
+ preserving errno across the function.
+
+ ntpd/cmd_args.c@1.60 +2 -4
+ Use loop_config() instead of duplicating logic for -x handling.
+
+ ntpd/ntp_loopfilter.c@1.167 +135 -62
+ [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+
+ ntpd/ntp_proto.c@1.323 +1 -1
+ [Bug 2025] Switching between daemon and kernel loops can doubly-
+ correct drift
+
+ChangeSet@1.2673.1.28, 2011-10-05 09:03:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P220
+ TAG: NTP_4_2_7P220
+
+ ChangeLog@1.1032.1.22 +1 -0
+ NTP_4_2_7P220
+
+ ntpd/ntpd-opts.c@1.225 +3 -3
+ NTP_4_2_7P220
+
+ ntpd/ntpd-opts.h@1.225 +3 -3
+ NTP_4_2_7P220
+
+ ntpd/ntpd-opts.texi@1.223 +2 -2
+ NTP_4_2_7P220
+
+ ntpd/ntpd.1ntpdman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpd/ntpd.1ntpdmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpd/ntpd.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpd/ntpd.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc-opts.c@1.220 +3 -3
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc-opts.h@1.220 +3 -3
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc-opts.texi@1.220 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc.1ntpdcman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc.html@1.48 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpdc/ntpdc.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpq/ntpq-opts.c@1.222 +3 -3
+ NTP_4_2_7P220
+
+ ntpq/ntpq-opts.h@1.222 +3 -3
+ NTP_4_2_7P220
+
+ ntpq/ntpq-opts.texi@1.222 +2 -2
+ NTP_4_2_7P220
+
+ ntpq/ntpq.1ntpqman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpq/ntpq.1ntpqmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpq/ntpq.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpq/ntpq.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.222 +3 -3
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.222 +3 -3
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.222 +2 -2
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ packageinfo.sh@1.223 +1 -1
+ NTP_4_2_7P220
+
+ scripts/ntp-wait-opts.texi@1.40 +1 -1
+ NTP_4_2_7P220
+
+ scripts/ntp-wait.1ntp-waitman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ scripts/ntp-wait.html@1.40 +1 -1
+ NTP_4_2_7P220
+
+ scripts/ntp-wait.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ scripts/ntp-wait.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp-opts.c@1.218 +3 -3
+ NTP_4_2_7P220
+
+ sntp/sntp-opts.h@1.218 +3 -3
+ NTP_4_2_7P220
+
+ sntp/sntp-opts.texi@1.218 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp.1sntpman@1.38 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp.1sntpmdoc@1.38 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp.html@1.218 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp.man.in@1.38 +2 -2
+ NTP_4_2_7P220
+
+ sntp/sntp.mdoc.in@1.38 +2 -2
+ NTP_4_2_7P220
+
+ util/ntp-keygen-opts.c@1.222 +3 -3
+ NTP_4_2_7P220
+
+ util/ntp-keygen-opts.h@1.222 +3 -3
+ NTP_4_2_7P220
+
+ util/ntp-keygen-opts.texi@1.223 +2 -2
+ NTP_4_2_7P220
+
+ util/ntp-keygen.1ntp-keygenman@1.36 +2 -2
+ NTP_4_2_7P220
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.36 +2 -2
+ NTP_4_2_7P220
+
+ util/ntp-keygen.man.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ util/ntp-keygen.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P220
+
+ChangeSet@1.2673.1.27, 2011-10-05 08:34:46+00:00, davehart@shiny.ad.hartbrothers.com
+ Keep add_full_recv_buffer() and SetEvent(WaitableIoEventHandle) 1:1
+
+ include/ntp_refclock.h@1.32 +4 -0
+ Keep add_full_recv_buffer() and SetEvent(WaitableIoEventHandle) 1:1
+
+ ntpd/ntp_refclock.c@1.109 +3 -1
+ Keep add_full_recv_buffer() and SetEvent(WaitableIoEventHandle) 1:1
+
+ ntpd/refclock_parse.c@1.61 +3 -0
+ Keep add_full_recv_buffer() and SetEvent(WaitableIoEventHandle) 1:1
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.60 +2 -4
+ Keep add_full_recv_buffer() and SetEvent(WaitableIoEventHandle) 1:1
+
+ChangeSet@1.2673.1.26, 2011-10-05 07:49:15+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1945] mbg_gps166.h use of _TM_DEFINED conflicts with MS VC.
+ [Bug 1946] parse_start uses open; does not work on Windows.
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ChangeLog@1.1032.1.21 +3 -0
+ [Bug 1945] mbg_gps166.h use of _TM_DEFINED conflicts with MS VC.
+ [Bug 1946] parse_start uses open; does not work on Windows.
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ include/mbg_gps166.h@1.11 +2 -2
+ [Bug 1945] mbg_gps166.h use of _TM_DEFINED conflicts with MS VC.
+
+ include/ntp_refclock.h@1.31 +4 -1
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ libparse/clk_wharton.c@1.8 +1 -1
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ntpd/ntp_io.c@1.359 +15 -22
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ntpd/ntp_refclock.c@1.108 +33 -0
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ntpd/refclock_parse.c@1.60 +13 -10
+ [Bug 1946] parse_start uses open; does not work on Windows.
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ports/winnt/include/config.h@1.102 +14 -1
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.59 +17 -15
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.16 +12 -240
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.41 +4 -336
+ [Bug 1947] Porting parse-based Wharton refclock driver to Windows.
+
+ChangeSet@1.2673.1.25, 2011-10-04 21:34:33+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2024] Remove unused system event code EVNT_CLKHOP.
+
+ ChangeLog@1.1032.1.20 +1 -0
+ [Bug 2024] Remove unused system event code EVNT_CLKHOP.
+
+ include/ntp.h@1.197 +0 -1
+ [Bug 2024] Remove unused system event code EVNT_CLKHOP.
+
+ libntp/statestr.c@1.25 +0 -1
+ [Bug 2024] Remove unused system event code EVNT_CLKHOP.
+
+ChangeSet@1.2673.1.24, 2011-10-04 10:54:55+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P219
+ TAG: NTP_4_2_7P219
+
+ ChangeLog@1.1032.1.19 +1 -0
+ NTP_4_2_7P219
+
+ ntpd/ntpd-opts.c@1.224 +3 -3
+ NTP_4_2_7P219
+
+ ntpd/ntpd-opts.h@1.224 +3 -3
+ NTP_4_2_7P219
+
+ ntpd/ntpd-opts.texi@1.222 +2 -2
+ NTP_4_2_7P219
+
+ ntpd/ntpd.1ntpdman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpd/ntpd.1ntpdmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpd/ntpd.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpd/ntpd.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc-opts.c@1.219 +3 -3
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc-opts.h@1.219 +3 -3
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc-opts.texi@1.219 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc.1ntpdcman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc.html@1.47 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpdc/ntpdc.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpq/ntpq-opts.c@1.221 +3 -3
+ NTP_4_2_7P219
+
+ ntpq/ntpq-opts.h@1.221 +3 -3
+ NTP_4_2_7P219
+
+ ntpq/ntpq-opts.texi@1.221 +2 -2
+ NTP_4_2_7P219
+
+ ntpq/ntpq.1ntpqman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpq/ntpq.1ntpqmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpq/ntpq.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpq/ntpq.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.221 +3 -3
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.221 +3 -3
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.221 +2 -2
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ packageinfo.sh@1.222 +1 -1
+ NTP_4_2_7P219
+
+ scripts/ntp-wait-opts.texi@1.39 +1 -1
+ NTP_4_2_7P219
+
+ scripts/ntp-wait.1ntp-waitman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ scripts/ntp-wait.html@1.39 +1 -1
+ NTP_4_2_7P219
+
+ scripts/ntp-wait.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ scripts/ntp-wait.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp-opts.c@1.217 +3 -3
+ NTP_4_2_7P219
+
+ sntp/sntp-opts.h@1.217 +3 -3
+ NTP_4_2_7P219
+
+ sntp/sntp-opts.texi@1.217 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp.1sntpman@1.37 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp.1sntpmdoc@1.37 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp.html@1.217 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp.man.in@1.37 +2 -2
+ NTP_4_2_7P219
+
+ sntp/sntp.mdoc.in@1.37 +2 -2
+ NTP_4_2_7P219
+
+ util/ntp-keygen-opts.c@1.221 +3 -3
+ NTP_4_2_7P219
+
+ util/ntp-keygen-opts.h@1.221 +3 -3
+ NTP_4_2_7P219
+
+ util/ntp-keygen-opts.texi@1.222 +2 -2
+ NTP_4_2_7P219
+
+ util/ntp-keygen.1ntp-keygenman@1.35 +2 -2
+ NTP_4_2_7P219
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.35 +2 -2
+ NTP_4_2_7P219
+
+ util/ntp-keygen.man.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ util/ntp-keygen.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P219
+
+ChangeSet@1.2673.1.23, 2011-10-03 17:51:59-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.1.18 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.8 +12 -5
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.21 +3 -3
+ Documentation updates from Dave Mills
+
+ html/drivers/driver20.html@1.25 +12 -21
+ Documentation updates from Dave Mills
+
+ html/drivers/driver8.html@1.28 +2 -2
+ Documentation updates from Dave Mills
+
+ html/history.html@1.2 +2 -2
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.31 +10 -10
+ Documentation updates from Dave Mills
+
+ html/release.html@1.42 +3 -3
+ Documentation updates from Dave Mills
+
+ html/scripts/footer.txt@1.4 +6 -1
+ Documentation updates from Dave Mills
+
+ html/sntp.html@1.9 +4 -4
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2673.1.22, 2011-10-03 05:00:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P218
+ TAG: NTP_4_2_7P218
+
+ ChangeLog@1.1032.1.17 +1 -0
+ NTP_4_2_7P218
+
+ ntpd/ntpd-opts.c@1.223 +3 -3
+ NTP_4_2_7P218
+
+ ntpd/ntpd-opts.h@1.223 +3 -3
+ NTP_4_2_7P218
+
+ ntpd/ntpd-opts.texi@1.221 +2 -2
+ NTP_4_2_7P218
+
+ ntpd/ntpd.1ntpdman@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpd/ntpd.1ntpdmdoc@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpd/ntpd.man.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpd/ntpd.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc-opts.c@1.218 +3 -3
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc-opts.h@1.218 +3 -3
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc-opts.texi@1.218 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc.1ntpdcman@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc.html@1.46 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc.man.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpdc/ntpdc.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpq/ntpq-opts.c@1.220 +3 -3
+ NTP_4_2_7P218
+
+ ntpq/ntpq-opts.h@1.220 +3 -3
+ NTP_4_2_7P218
+
+ ntpq/ntpq-opts.texi@1.220 +2 -2
+ NTP_4_2_7P218
+
+ ntpq/ntpq.1ntpqman@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpq/ntpq.1ntpqmdoc@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpq/ntpq.man.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpq/ntpq.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.220 +3 -3
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.220 +3 -3
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.220 +2 -2
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd.man.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ packageinfo.sh@1.221 +1 -1
+ NTP_4_2_7P218
+
+ scripts/ntp-wait-opts.texi@1.38 +1 -1
+ NTP_4_2_7P218
+
+ scripts/ntp-wait.1ntp-waitman@1.34 +2 -2
+ NTP_4_2_7P218
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.34 +2 -2
+ NTP_4_2_7P218
+
+ scripts/ntp-wait.html@1.38 +1 -1
+ NTP_4_2_7P218
+
+ scripts/ntp-wait.man.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ scripts/ntp-wait.mdoc.in@1.34 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp-opts.c@1.216 +3 -3
+ NTP_4_2_7P218
+
+ sntp/sntp-opts.h@1.216 +3 -3
+ NTP_4_2_7P218
+
+ sntp/sntp-opts.texi@1.216 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp.1sntpman@1.36 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp.1sntpmdoc@1.36 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp.html@1.216 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp.man.in@1.36 +2 -2
+ NTP_4_2_7P218
+
+ sntp/sntp.mdoc.in@1.36 +2 -2
+ NTP_4_2_7P218
+
+ util/ntp-keygen-opts.c@1.220 +3 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen-opts.h@1.220 +3 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen-opts.texi@1.221 +22 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen.1ntp-keygenman@1.34 +11 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.34 +10 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen.man.in@1.34 +11 -3
+ NTP_4_2_7P218
+
+ util/ntp-keygen.mdoc.in@1.34 +10 -3
+ NTP_4_2_7P218
+
+ChangeSet@1.2673.1.21, 2011-10-02 19:41:17-04:00, stenn@deacon.udel.edu
+ typo
+
+ util/ntp-keygen-opts.def@1.19 +1 -1
+ typo
+
+ChangeSet@1.2673.1.19, 2011-10-02 22:12:47+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2019] Allow selection of cipher for private key files.
+ ntp-keygen private key cipher default now triple-key triple DES CBC.
+ ntp-keygen on Windows XP and later systems will now create links
+ expected by ntpd. They are hardlinks on Windows, soft on POSIX.
+
+ ChangeLog@1.1032.1.15 +4 -0
+ [Bug 2019] Allow selection of cipher for private key files.
+ ntp-keygen private key cipher default now triple-key triple DES CBC.
+ ntp-keygen on Windows XP and later systems will now create links
+ expected by ntpd. They are hardlinks on Windows, soft on POSIX.
+
+
+ util/ntp-keygen-opts.c@1.219 +68 -38
+ [Bug 2019] add -c/--cipher
+
+ util/ntp-keygen-opts.def@1.18 +1 -1
+ Minor correction.
+
+ util/ntp-keygen-opts.h@1.219 +32 -25
+ [Bug 2019] add -c/--cipher
+
+ util/ntp-keygen.c@1.86 +81 -38
+ Change multiple fclose(stdout) to fflush(stdout).
+ Generate ntp-keygen (hard) links correctly on Windows XP and later.
+ Use PEM_write_PKCS8PrivateKey() in place of deprecated predecessor.
+ Existing clients going back to at least 2002 can use the new format
+ with no changes to deployed code.
+
+
+ChangeSet@1.2673.3.2, 2011-10-02 18:09:07-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/history.html@1.1 +74 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/history.html
+
+ html/history.html@1.0 +0 -0
+
+ChangeSet@1.2673.3.1, 2011-10-02 17:43:54-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.1032.3.1 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.7 +10 -10
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.30 +2 -3
+ Documentation updates from Dave Mills
+
+ html/release.html@1.41 +2 -1
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2673.1.18, 2011-10-02 19:14:22+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2019] Allow selection of cipher for private key files.
+ Change default cipher from DES CBC to triple-key triple DES CBC.
+
+ util/ntp-keygen-opts.def@1.17 +15 -0
+ Add -C/--cipher option to ntp-keygen for [Bug 2019]
+
+ util/ntp-keygen.c@1.85 +20 -8
+ [Bug 2019] Allow selection of cipher for private key files.
+ Change default cipher from DES CBC to triple-key triple DES CBC.
+
+ChangeSet@1.2673.1.17, 2011-10-02 08:47:56+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp-keygen -M is intended to ignore all other defaults and
+ options, so do not attempt to open existing Autokey host certificate
+ before generating symmetric keys and terminating.
+ Restore IFF, MV, and GQ identity parameter filename convention to
+ ntpkey_<scheme>par_<group/host> in ntpd, matching ntp-keygen.
+ Change some error logging to syslog to ignore logconfig mask, such
+ as reporting PPSAPI failure in NMEA and WWVB refclocks.
+ Conditionalize NMEA serial open message under clockevent.
+ Send all peer variables to trappers in report_event().
+
+ ChangeLog@1.1032.1.14 +9 -0
+ ntp-keygen -M is intended to ignore all other defaults and
+ options, so do not attempt to open existing Autokey host certificate
+ before generating symmetric keys and terminating.
+ Restore IFF, MV, and GQ identity parameter filename convention to
+ ntpkey_<scheme>par_<group/host> in ntpd, matching ntp-keygen.
+ Change some error logging to syslog to ignore logconfig mask, such
+ as reporting PPSAPI failure in NMEA and WWVB refclocks.
+ Conditionalize NMEA serial open message under clockevent.
+ Send all peer variables to trappers in report_event().
+
+
+ include/ntp_syslog.h@1.8 +8 -1
+ Provide LOGIF(CLOCKINFO, (LOG_INFO, "msyslog %s", "args"))
+ as alternative to
+ NLOG(NLOG_CLOCKINFO)
+ msyslog(LOG_INFO, "msyslog %s", args);
+
+ ntpd/ntp_control.c@1.171 +6 -21
+ Send all peer variables to trappers, as intended.
+
+ ntpd/ntp_crypto.c@1.159 +37 -27
+ Restore IFF, MV, and GQ identity parameter filename convention to
+ ntpkey_<scheme>par_<group/host> in ntpd, matching ntp-keygen.
+
+ ntpd/ntp_loopfilter.c@1.166 +1 -1
+ Fix spelling in comment.
+
+ ntpd/refclock_nmea.c@1.63 +32 -34
+ Make failure and GPS time syslog output ignore logconfig.
+ Conditionalize serial output syslog under clockevent.
+
+ ntpd/refclock_wwvb.c@1.32 +10 -11
+ Report PPSAPI failure to log regardless of logconfig.
+
+ util/ntp-keygen.c@1.84 +11 -11
+ ntp-keygen -M is intended to ignore all other defaults and
+ options, so do not attempt to open existing Autokey host certificate
+ before generating symmetric keys and terminating.
+
+ChangeSet@1.2673.1.16, 2011-09-29 08:06:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P217
+ TAG: NTP_4_2_7P217
+
+ ChangeLog@1.1032.1.13 +1 -0
+ NTP_4_2_7P217
+
+ ntpd/ntpd-opts.c@1.222 +3 -3
+ NTP_4_2_7P217
+
+ ntpd/ntpd-opts.h@1.222 +3 -3
+ NTP_4_2_7P217
+
+ ntpd/ntpd-opts.texi@1.220 +2 -2
+ NTP_4_2_7P217
+
+ ntpd/ntpd.1ntpdman@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpd/ntpd.1ntpdmdoc@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpd/ntpd.man.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpd/ntpd.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc-opts.c@1.217 +3 -3
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc-opts.h@1.217 +3 -3
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc-opts.texi@1.217 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc.1ntpdcman@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc.html@1.45 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc.man.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpdc/ntpdc.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpq/ntpq-opts.c@1.219 +3 -3
+ NTP_4_2_7P217
+
+ ntpq/ntpq-opts.h@1.219 +3 -3
+ NTP_4_2_7P217
+
+ ntpq/ntpq-opts.texi@1.219 +2 -2
+ NTP_4_2_7P217
+
+ ntpq/ntpq.1ntpqman@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpq/ntpq.1ntpqmdoc@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpq/ntpq.man.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpq/ntpq.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.219 +3 -3
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.219 +3 -3
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.219 +2 -2
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd.man.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ packageinfo.sh@1.220 +1 -1
+ NTP_4_2_7P217
+
+ scripts/ntp-wait-opts.texi@1.37 +1 -1
+ NTP_4_2_7P217
+
+ scripts/ntp-wait.1ntp-waitman@1.33 +2 -2
+ NTP_4_2_7P217
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.33 +2 -2
+ NTP_4_2_7P217
+
+ scripts/ntp-wait.html@1.37 +1 -1
+ NTP_4_2_7P217
+
+ scripts/ntp-wait.man.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ scripts/ntp-wait.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp-opts.c@1.215 +3 -3
+ NTP_4_2_7P217
+
+ sntp/sntp-opts.h@1.215 +3 -3
+ NTP_4_2_7P217
+
+ sntp/sntp-opts.texi@1.215 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp.1sntpman@1.35 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp.1sntpmdoc@1.35 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp.html@1.215 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp.man.in@1.35 +2 -2
+ NTP_4_2_7P217
+
+ sntp/sntp.mdoc.in@1.35 +2 -2
+ NTP_4_2_7P217
+
+ util/ntp-keygen-opts.c@1.218 +3 -3
+ NTP_4_2_7P217
+
+ util/ntp-keygen-opts.h@1.218 +3 -3
+ NTP_4_2_7P217
+
+ util/ntp-keygen-opts.texi@1.220 +34 -20
+ NTP_4_2_7P217
+
+ util/ntp-keygen.1ntp-keygenman@1.33 +24 -10
+ NTP_4_2_7P217
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.33 +24 -10
+ NTP_4_2_7P217
+
+ util/ntp-keygen.man.in@1.33 +24 -10
+ NTP_4_2_7P217
+
+ util/ntp-keygen.mdoc.in@1.33 +24 -10
+ NTP_4_2_7P217
+
+ChangeSet@1.2673.1.15, 2011-09-29 03:52:53-04:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.1032.1.12 +2 -2
+ cleanup
+
+ChangeSet@1.2673.1.14, 2011-09-29 07:17:56+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2020] ntp-keygen -s no longer sets host in cert file name.
+ ntp-keygen -i option long name changed from misleading --issuer-name
+ to --ident. [Backward Incompatible]
+
+ ChangeLog@1.1032.1.11 +3 -0
+ [Bug 2020] ntp-keygen -s no longer sets host in cert file name.
+ ntp-keygen -i option long name changed from misleading --issuer-name
+ to --ident. [Backward Incompatible]
+
+ ports/winnt/include/sys/time.h@1.7 +1 -1
+ Correct type of unused 2nd argument in port's gettimeofday()
+
+ ports/winnt/libntp/util_clockstuff.c@1.6 +2 -2
+ Correct type of unused 2nd argument in port's gettimeofday()
+
+ util/ntp-keygen-opts.c@1.217 +17 -17
+ ntp-keygen -i option long name changed from misleading --issuer-name
+ to --ident. [Backward Incompatible]
+
+ util/ntp-keygen-opts.h@1.217 +7 -7
+ ntp-keygen -i option long name changed from misleading --issuer-name
+ to --ident. [Backward Incompatible]
+
+ util/ntp-keygen.c@1.83 +51 -28
+ [Bug 2020] ntp-keygen -s no longer sets host in cert file name.
+ ntp-keygen -i option long name changed from misleading --issuer-name
+ to --ident. [Backward Incompatible]
+
+ChangeSet@1.2673.1.13, 2011-09-29 05:16:02+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2009] cleanup warning about adj_systime() returning no value.
+ [Bug 2020] Expand ntp-keygen-opts.def explanations of host name and
+ group name options and how they affect output, rename -i long form
+ from --issuer-name to --ident to match reality.
+
+ libntp/systime.c@1.55.1.2 +3 -3
+ [Bug 2009] cleanup: adj_systime() must return a value.
+
+ util/ntp-keygen-opts.def@1.16 +23 -9
+ [Bug 2020] groundwork. Clarify interaction of -i group and -s host[@group]
+ options and rename long option for -i from --issuer-name to --ident, as
+ the group name is never used for certificate issuer. Spell out how group
+ and host names are used. Backward compatibility is a relatively minor
+ issue as the official documentation and Steve's examples mention only
+ the short flag -i.
+
+ util/ntp-keygen.c@1.82 +9 -9
+ [Bug 2020] groundwork. Clarify interaction of -i group and -s host[@group]
+ options and rename long option for -i from --issuer-name to --ident, as
+ the group name is never used for certificate issuer. Spell out how group
+ and host names are used. Backward compatibility is a relatively minor
+ issue as the official documentation and Steve's examples mention only
+ the short flag -i.
+
+ChangeSet@1.2673.1.12, 2011-09-27 10:41:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P216
+ TAG: NTP_4_2_7P216
+
+ ChangeLog@1.1032.1.10 +1 -0
+ NTP_4_2_7P216
+
+ ntpd/ntpd-opts.c@1.221 +3 -3
+ NTP_4_2_7P216
+
+ ntpd/ntpd-opts.h@1.221 +3 -3
+ NTP_4_2_7P216
+
+ ntpd/ntpd-opts.texi@1.219 +2 -2
+ NTP_4_2_7P216
+
+ ntpd/ntpd.1ntpdman@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpd/ntpd.1ntpdmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpd/ntpd.man.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpd/ntpd.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc-opts.c@1.216 +3 -3
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc-opts.h@1.216 +3 -3
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc-opts.texi@1.216 +2 -2
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc.1ntpdcman@1.32 +8 -8
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc.html@1.44 +2 -2
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc.man.in@1.32 +8 -8
+ NTP_4_2_7P216
+
+ ntpdc/ntpdc.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpq/ntpq-opts.c@1.218 +3 -3
+ NTP_4_2_7P216
+
+ ntpq/ntpq-opts.h@1.218 +3 -3
+ NTP_4_2_7P216
+
+ ntpq/ntpq-opts.texi@1.218 +2 -2
+ NTP_4_2_7P216
+
+ ntpq/ntpq.1ntpqman@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpq/ntpq.1ntpqmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpq/ntpq.man.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpq/ntpq.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.218 +3 -3
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.218 +3 -3
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.218 +2 -2
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd.man.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ packageinfo.sh@1.219 +1 -1
+ NTP_4_2_7P216
+
+ scripts/ntp-wait-opts.texi@1.36 +1 -1
+ NTP_4_2_7P216
+
+ scripts/ntp-wait.1ntp-waitman@1.32 +2 -2
+ NTP_4_2_7P216
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ scripts/ntp-wait.html@1.36 +1 -1
+ NTP_4_2_7P216
+
+ scripts/ntp-wait.man.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ scripts/ntp-wait.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ sntp/sntp-opts.c@1.214 +9 -9
+ NTP_4_2_7P216
+
+ sntp/sntp-opts.h@1.214 +3 -3
+ NTP_4_2_7P216
+
+ sntp/sntp-opts.texi@1.214 +21 -21
+ NTP_4_2_7P216
+
+ sntp/sntp.1sntpman@1.34 +15 -15
+ NTP_4_2_7P216
+
+ sntp/sntp.1sntpmdoc@1.34 +15 -15
+ NTP_4_2_7P216
+
+ sntp/sntp.html@1.214 +21 -21
+ NTP_4_2_7P216
+
+ sntp/sntp.man.in@1.34 +15 -15
+ NTP_4_2_7P216
+
+ sntp/sntp.mdoc.in@1.34 +15 -15
+ NTP_4_2_7P216
+
+ util/ntp-keygen-opts.c@1.216 +3 -3
+ NTP_4_2_7P216
+
+ util/ntp-keygen-opts.h@1.216 +3 -3
+ NTP_4_2_7P216
+
+ util/ntp-keygen-opts.texi@1.219 +2 -2
+ NTP_4_2_7P216
+
+ util/ntp-keygen.1ntp-keygenman@1.32 +2 -2
+ NTP_4_2_7P216
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.32 +2 -2
+ NTP_4_2_7P216
+
+ util/ntp-keygen.man.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ util/ntp-keygen.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P216
+
+ChangeSet@1.2673.2.1, 2011-09-27 05:49:23-04:00, stenn@psp-deb1.ntp.org
+ mdoc2man improvements
+
+ ChangeLog@1.1032.2.2 +1 -0
+ mdoc2man improvements
+
+ ChangeLog@1.1032.2.1 +1 -0
+ sntp documentation tag cleanup
+
+ sntp/ag-tpl/mdoc2man@1.2 +27 -14
+ mdoc2man improvements
+
+ sntp/sntp-opts.def@1.39 +13 -13
+ sntp documentation tag cleanup
+
+ChangeSet@1.2673.1.10, 2011-09-24 02:03:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P215
+ TAG: NTP_4_2_7P215
+
+ ChangeLog@1.1032.1.8 +1 -0
+ NTP_4_2_7P215
+
+ ntpd/ntpd-opts.c@1.220 +3 -3
+ NTP_4_2_7P215
+
+ ntpd/ntpd-opts.h@1.220 +3 -3
+ NTP_4_2_7P215
+
+ ntpd/ntpd-opts.texi@1.218 +2 -2
+ NTP_4_2_7P215
+
+ ntpd/ntpd.1ntpdman@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpd/ntpd.1ntpdmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpd/ntpd.man.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpd/ntpd.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc-opts.c@1.215 +3 -3
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc-opts.h@1.215 +3 -3
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc-opts.texi@1.215 +2 -2
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc.1ntpdcman@1.31 +309 -3
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc.html@1.43 +2 -2
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc.man.in@1.31 +309 -3
+ NTP_4_2_7P215
+
+ ntpdc/ntpdc.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpq/ntpq-opts.c@1.217 +3 -3
+ NTP_4_2_7P215
+
+ ntpq/ntpq-opts.h@1.217 +3 -3
+ NTP_4_2_7P215
+
+ ntpq/ntpq-opts.texi@1.217 +2 -2
+ NTP_4_2_7P215
+
+ ntpq/ntpq.1ntpqman@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpq/ntpq.1ntpqmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpq/ntpq.man.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpq/ntpq.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.217 +3 -3
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.217 +3 -3
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.217 +2 -2
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd.man.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ packageinfo.sh@1.218 +1 -1
+ NTP_4_2_7P215
+
+ scripts/ntp-wait-opts.texi@1.35 +1 -1
+ NTP_4_2_7P215
+
+ scripts/ntp-wait.1ntp-waitman@1.31 +2 -2
+ NTP_4_2_7P215
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ scripts/ntp-wait.html@1.35 +1 -1
+ NTP_4_2_7P215
+
+ scripts/ntp-wait.man.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ scripts/ntp-wait.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp-opts.c@1.213 +3 -3
+ NTP_4_2_7P215
+
+ sntp/sntp-opts.h@1.213 +3 -3
+ NTP_4_2_7P215
+
+ sntp/sntp-opts.texi@1.213 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp.1sntpman@1.33 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp.1sntpmdoc@1.33 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp.html@1.213 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp.man.in@1.33 +2 -2
+ NTP_4_2_7P215
+
+ sntp/sntp.mdoc.in@1.33 +2 -2
+ NTP_4_2_7P215
+
+ util/ntp-keygen-opts.c@1.215 +3 -3
+ NTP_4_2_7P215
+
+ util/ntp-keygen-opts.h@1.215 +3 -3
+ NTP_4_2_7P215
+
+ util/ntp-keygen-opts.texi@1.218 +2 -2
+ NTP_4_2_7P215
+
+ util/ntp-keygen.1ntp-keygenman@1.31 +2 -2
+ NTP_4_2_7P215
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.31 +2 -2
+ NTP_4_2_7P215
+
+ util/ntp-keygen.man.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ util/ntp-keygen.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P215
+
+ChangeSet@1.2673.1.9, 2011-09-23 21:47:46-04:00, stenn@deacon.udel.edu
+ Use patched mdoc2man script, from Eric Feng
+
+ ChangeLog@1.1032.1.7 +2 -0
+ Use patched mdoc2man script, from Eric Feng
+
+ChangeSet@1.2673.1.8, 2011-09-23 05:32:43+00:00, stenn@psp-fb1.ntp.org
+ Use updated mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.1 +288 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev/sntp/ag-tpl/mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.0 +0 -0
+
+ChangeSet@1.2082.4.237, 2011-09-23 03:38:30+00:00, stenn@deacon.udel.edu
NTP_4_2_6P4
TAG: NTP_4_2_6P4
- ChangeLog@1.737 +1 -0
+ ChangeLog@1.496.26.170 +1 -0
NTP_4_2_6P4
- ntpd/ntpd-opts.c@1.287 +5 -5
+ ntpd/ntpd-opts.c@1.248.39.1 +5 -5
NTP_4_2_6P4
- ntpd/ntpd-opts.h@1.287 +3 -3
+ ntpd/ntpd-opts.h@1.248.39.1 +3 -3
NTP_4_2_6P4
- ntpd/ntpd-opts.texi@1.284 +2 -2
+ ntpd/ntpd-opts.texi@1.246.38.1 +2 -2
NTP_4_2_6P4
- ntpd/ntpd.1@1.284 +2 -2
+ ntpd/ntpd.1@1.246.38.1 +2 -2
NTP_4_2_6P4
- ntpdc/ntpdc-opts.c@1.283 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.39.1 +5 -5
NTP_4_2_6P4
- ntpdc/ntpdc-opts.h@1.283 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.39.1 +3 -3
NTP_4_2_6P4
- ntpdc/ntpdc-opts.texi@1.281 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.38.1 +2 -2
NTP_4_2_6P4
- ntpdc/ntpdc.1@1.281 +2 -2
+ ntpdc/ntpdc.1@1.243.38.1 +2 -2
NTP_4_2_6P4
- ntpq/ntpq-opts.c@1.284 +5 -5
+ ntpq/ntpq-opts.c@1.245.39.1 +5 -5
NTP_4_2_6P4
- ntpq/ntpq-opts.h@1.284 +3 -3
+ ntpq/ntpq-opts.h@1.245.39.1 +3 -3
NTP_4_2_6P4
- ntpq/ntpq-opts.texi@1.282 +2 -2
+ ntpq/ntpq-opts.texi@1.244.38.1 +2 -2
NTP_4_2_6P4
- ntpq/ntpq.1@1.282 +2 -2
+ ntpq/ntpq.1@1.244.38.1 +2 -2
NTP_4_2_6P4
- ntpsnmpd/ntpsnmpd-opts.c@1.163 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.40.1 +5 -5
NTP_4_2_6P4
- ntpsnmpd/ntpsnmpd-opts.h@1.163 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.40.1 +3 -3
NTP_4_2_6P4
- ntpsnmpd/ntpsnmpd-opts.texi@1.162 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.39.1 +2 -2
NTP_4_2_6P4
- ntpsnmpd/ntpsnmpd.1@1.161 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.39.1 +2 -2
NTP_4_2_6P4
- packageinfo.sh@1.300 +3 -3
+ packageinfo.sh@1.255.36.2 +3 -3
NTP_4_2_6P4
- sntp/sntp-opts.c@1.155 +7 -7
+ sntp/sntp-opts.c@1.117.38.1 +7 -7
NTP_4_2_6P4
- sntp/sntp-opts.h@1.155 +3 -3
+ sntp/sntp-opts.h@1.117.38.1 +3 -3
NTP_4_2_6P4
- sntp/sntp-opts.texi@1.154 +4 -4
+ sntp/sntp-opts.texi@1.117.37.1 +4 -4
NTP_4_2_6P4
- sntp/sntp.1@1.154 +2 -2
+ sntp/sntp.1@1.117.37.1 +2 -2
NTP_4_2_6P4
- sntp/sntp.html@1.45 +42 -60
+ sntp/sntp.html@1.7.38.1 +42 -60
NTP_4_2_6P4
- util/ntp-keygen-opts.c@1.286 +5 -5
+ util/ntp-keygen-opts.c@1.247.39.1 +5 -5
NTP_4_2_6P4
- util/ntp-keygen-opts.h@1.286 +3 -3
+ util/ntp-keygen-opts.h@1.247.39.1 +3 -3
NTP_4_2_6P4
- util/ntp-keygen-opts.texi@1.284 +2 -2
+ util/ntp-keygen-opts.texi@1.246.38.1 +2 -2
NTP_4_2_6P4
- util/ntp-keygen.1@1.284 +2 -2
+ util/ntp-keygen.1@1.246.38.1 +2 -2
NTP_4_2_6P4
-ChangeSet@1.2323, 2011-09-22 22:40:12-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.236, 2011-09-22 22:40:12-04:00, stenn@deacon.udel.edu
ntp-4.2.6p4
- ChangeLog@1.736 +1 -0
+ ChangeLog@1.496.26.169 +1 -0
ntp-4.2.6p4
NEWS@1.119 +62 -37
ntp-4.2.6p4
- packageinfo.sh@1.299 +1 -1
+ packageinfo.sh@1.255.36.1 +1 -1
ntp-4.2.6p4
-ChangeSet@1.2322, 2011-09-07 04:29:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2673.1.6, 2011-09-20 19:45:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P214
+ TAG: NTP_4_2_7P214
+
+ ChangeLog@1.1032.1.5 +1 -0
+ NTP_4_2_7P214
+
+ ntpd/ntpd-opts.c@1.219 +3 -3
+ NTP_4_2_7P214
+
+ ntpd/ntpd-opts.h@1.219 +3 -3
+ NTP_4_2_7P214
+
+ ntpd/ntpd-opts.texi@1.217 +2 -2
+ NTP_4_2_7P214
+
+ ntpd/ntpd.1ntpdman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpd/ntpd.1ntpdmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpd/ntpd.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpd/ntpd.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc-opts.c@1.214 +3 -3
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc-opts.h@1.214 +3 -3
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc-opts.texi@1.214 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc.1ntpdcman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc.html@1.42 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpdc/ntpdc.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpq/ntpq-opts.c@1.216 +3 -3
+ NTP_4_2_7P214
+
+ ntpq/ntpq-opts.h@1.216 +3 -3
+ NTP_4_2_7P214
+
+ ntpq/ntpq-opts.texi@1.216 +2 -2
+ NTP_4_2_7P214
+
+ ntpq/ntpq.1ntpqman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpq/ntpq.1ntpqmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpq/ntpq.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpq/ntpq.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.216 +3 -3
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.216 +3 -3
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.216 +2 -2
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ packageinfo.sh@1.217 +1 -1
+ NTP_4_2_7P214
+
+ scripts/ntp-wait-opts.texi@1.34 +1 -1
+ NTP_4_2_7P214
+
+ scripts/ntp-wait.1ntp-waitman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ scripts/ntp-wait.html@1.34 +1 -1
+ NTP_4_2_7P214
+
+ scripts/ntp-wait.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ scripts/ntp-wait.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp-opts.c@1.212 +3 -3
+ NTP_4_2_7P214
+
+ sntp/sntp-opts.h@1.212 +3 -3
+ NTP_4_2_7P214
+
+ sntp/sntp-opts.texi@1.212 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp.1sntpman@1.32 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp.1sntpmdoc@1.32 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp.html@1.212 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp.man.in@1.32 +2 -2
+ NTP_4_2_7P214
+
+ sntp/sntp.mdoc.in@1.32 +2 -2
+ NTP_4_2_7P214
+
+ util/ntp-keygen-opts.c@1.214 +3 -3
+ NTP_4_2_7P214
+
+ util/ntp-keygen-opts.h@1.214 +3 -3
+ NTP_4_2_7P214
+
+ util/ntp-keygen-opts.texi@1.217 +2 -2
+ NTP_4_2_7P214
+
+ util/ntp-keygen.1ntp-keygenman@1.30 +2 -2
+ NTP_4_2_7P214
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.30 +2 -2
+ NTP_4_2_7P214
+
+ util/ntp-keygen.man.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ util/ntp-keygen.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P214
+
+ChangeSet@1.2673.1.5, 2011-09-20 15:29:47-04:00, stenn@deacon.udel.edu
+ whitespace cleanup
+
+ Makefile.am@1.114 +3 -3
+ whitespace cleanup
+
+ChangeSet@1.2673.1.4, 2011-09-20 01:32:36+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2009] EVNT_NSET adj_systime() mishandled by Windows ntpd.
+
+ ChangeLog@1.1032.1.4 +1 -0
+ [Bug 2009] EVNT_NSET adj_systime() mishandled by Windows ntpd.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.53 +33 -19
+ [Bug 2009] EVNT_NSET adj_systime() mishandled by Windows ntpd.
+
+ChangeSet@1.2673.1.3, 2011-09-19 18:09:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1981] Initial offset convergence applies frequency correction 2x
+ with kernel discipline.
+ [Bug 2008] Initial offset convergence degraded with 500 PPM adjtime().
+
+ ChangeLog@1.1032.1.3 +3 -0
+ [Bug 1981] Initial offset convergence applies frequency correction 2x
+ with kernel discipline.
+ [Bug 2008] Initial offset convergence degraded with 500 PPM adjtime().
+
+ libntp/systime.c@1.55.1.1 +12 -0
+ [Bug 1981] Initial offset convergence applies frequency correction 2x
+ with kernel discipline.
+ [Bug 2008] Initial offset convergence degraded with 500 PPM adjtime().
+
+ ntpd/ntp_loopfilter.c@1.165 +61 -47
+ [Bug 1981] Initial offset convergence applies frequency correction 2x
+ with kernel discipline.
+ [Bug 2008] Initial offset convergence degraded with 500 PPM adjtime().
+
+ChangeSet@1.2673.1.2, 2011-09-08 11:46:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P213
+ TAG: NTP_4_2_7P213
+
+ ChangeLog@1.1032.1.2 +1 -0
+ NTP_4_2_7P213
+
+ ntpd/ntpd-opts.c@1.218 +3 -3
+ NTP_4_2_7P213
+
+ ntpd/ntpd-opts.h@1.218 +3 -3
+ NTP_4_2_7P213
+
+ ntpd/ntpd-opts.texi@1.216 +2 -2
+ NTP_4_2_7P213
+
+ ntpd/ntpd.1ntpdman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpd/ntpd.1ntpdmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpd/ntpd.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpd/ntpd.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc-opts.c@1.213 +3 -3
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc-opts.h@1.213 +3 -3
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc-opts.texi@1.213 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc.1ntpdcman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc.html@1.41 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpdc/ntpdc.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpq/ntpq-opts.c@1.215 +3 -3
+ NTP_4_2_7P213
+
+ ntpq/ntpq-opts.h@1.215 +3 -3
+ NTP_4_2_7P213
+
+ ntpq/ntpq-opts.texi@1.215 +2 -2
+ NTP_4_2_7P213
+
+ ntpq/ntpq.1ntpqman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpq/ntpq.1ntpqmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpq/ntpq.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpq/ntpq.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.215 +3 -3
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.215 +3 -3
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.215 +2 -2
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ packageinfo.sh@1.216 +1 -1
+ NTP_4_2_7P213
+
+ scripts/ntp-wait-opts.texi@1.33 +1 -1
+ NTP_4_2_7P213
+
+ scripts/ntp-wait.1ntp-waitman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ scripts/ntp-wait.html@1.33 +1 -1
+ NTP_4_2_7P213
+
+ scripts/ntp-wait.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ scripts/ntp-wait.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp-opts.c@1.211 +3 -3
+ NTP_4_2_7P213
+
+ sntp/sntp-opts.h@1.211 +3 -3
+ NTP_4_2_7P213
+
+ sntp/sntp-opts.texi@1.211 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp.1sntpman@1.31 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp.1sntpmdoc@1.31 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp.html@1.211 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp.man.in@1.31 +2 -2
+ NTP_4_2_7P213
+
+ sntp/sntp.mdoc.in@1.31 +2 -2
+ NTP_4_2_7P213
+
+ util/ntp-keygen-opts.c@1.213 +3 -3
+ NTP_4_2_7P213
+
+ util/ntp-keygen-opts.h@1.213 +3 -3
+ NTP_4_2_7P213
+
+ util/ntp-keygen-opts.texi@1.216 +2 -2
+ NTP_4_2_7P213
+
+ util/ntp-keygen.1ntp-keygenman@1.29 +2 -2
+ NTP_4_2_7P213
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.29 +2 -2
+ NTP_4_2_7P213
+
+ util/ntp-keygen.man.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ util/ntp-keygen.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P213
+
+ChangeSet@1.2673.1.1, 2011-09-07 20:08:08+02:00, jnperlin@hydra.localnet
+ [Bug 1999] NMEA driver should not send PMOTG once per second
+
+ ChangeLog@1.1032.1.1 +1 -0
+ [Bug 1999] NMEA driver should not send PMOTG once per second
+
+ ntpd/refclock_nmea.c@1.62 +27 -7
+ [Bug 1999] NMEA driver should not send PMOTG once per second. NMEA ouput support disabled by preprocessor conditionals.
+
+ChangeSet@1.2674, 2011-09-07 19:25:23+02:00, jnperlin@hydra.localnet
+ [Bug 1995] added support for getting build time stamp
+
+ ChangeLog@1.1033 +2 -0
+ [Bug 1995] compile time stamp support for 'step_systime()'
+
+ include/ntp_calendar.h@1.10 +18 -0
+ [Bug 1995] added support for getting build time stamp
+
+ libntp/ntp_calendar.c@1.7 +169 -41
+ [Bug 1995] added support for getting build time stamp; refactoring of some code pathes
+
+ libntp/systime.c@1.56 +105 -62
+ [Bug 1995] added support for NTP era unfolding based on build time stamp in 'step_systime()'
+
+ChangeSet@1.2673, 2011-09-07 11:53:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P212
+ TAG: NTP_4_2_7P212
+
+ ChangeLog@1.1032 +1 -0
+ NTP_4_2_7P212
+
+ ntpd/ntpd-opts.c@1.217 +3 -3
+ NTP_4_2_7P212
+
+ ntpd/ntpd-opts.h@1.217 +3 -3
+ NTP_4_2_7P212
+
+ ntpd/ntpd-opts.texi@1.215 +2 -2
+ NTP_4_2_7P212
+
+ ntpd/ntpd.1ntpdman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpd/ntpd.1ntpdmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpd/ntpd.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpd/ntpd.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc-opts.c@1.212 +3 -3
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc-opts.h@1.212 +3 -3
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc-opts.texi@1.212 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc.1ntpdcman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc.html@1.40 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpdc/ntpdc.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpq/ntpq-opts.c@1.214 +3 -3
+ NTP_4_2_7P212
+
+ ntpq/ntpq-opts.h@1.214 +3 -3
+ NTP_4_2_7P212
+
+ ntpq/ntpq-opts.texi@1.214 +2 -2
+ NTP_4_2_7P212
+
+ ntpq/ntpq.1ntpqman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpq/ntpq.1ntpqmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpq/ntpq.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpq/ntpq.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.214 +3 -3
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.214 +3 -3
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.214 +2 -2
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ packageinfo.sh@1.215 +1 -1
+ NTP_4_2_7P212
+
+ scripts/ntp-wait-opts.texi@1.32 +1 -1
+ NTP_4_2_7P212
+
+ scripts/ntp-wait.1ntp-waitman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ scripts/ntp-wait.html@1.32 +1 -1
+ NTP_4_2_7P212
+
+ scripts/ntp-wait.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ scripts/ntp-wait.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp-opts.c@1.210 +3 -3
+ NTP_4_2_7P212
+
+ sntp/sntp-opts.h@1.210 +3 -3
+ NTP_4_2_7P212
+
+ sntp/sntp-opts.texi@1.210 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp.1sntpman@1.30 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp.1sntpmdoc@1.30 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp.html@1.210 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp.man.in@1.30 +2 -2
+ NTP_4_2_7P212
+
+ sntp/sntp.mdoc.in@1.30 +2 -2
+ NTP_4_2_7P212
+
+ util/ntp-keygen-opts.c@1.212 +3 -3
+ NTP_4_2_7P212
+
+ util/ntp-keygen-opts.h@1.212 +3 -3
+ NTP_4_2_7P212
+
+ util/ntp-keygen-opts.texi@1.215 +2 -2
+ NTP_4_2_7P212
+
+ util/ntp-keygen.1ntp-keygenman@1.28 +2 -2
+ NTP_4_2_7P212
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.28 +2 -2
+ NTP_4_2_7P212
+
+ util/ntp-keygen.man.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ util/ntp-keygen.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P212
+
+ChangeSet@1.2082.4.235, 2011-09-07 04:29:25+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2003] libntpq ntpq_read_assoc_peervars() broken.
- ChangeLog@1.735 +1 -0
+ ChangeLog@1.496.26.168 +1 -0
[Bug 2003] libntpq ntpq_read_assoc_peervars() broken.
- ntpq/libntpq.c@1.9 +56 -66
+ ntpq/libntpq.c@1.3.1.6 +56 -66
[Bug 2003] libntpq ntpq_read_assoc_peervars() broken.
- ntpq/libntpq.h@1.7 +1 -1
+ ntpq/libntpq.h@1.3.1.4 +1 -1
[Bug 2003] libntpq ntpq_read_assoc_peervars() broken.
-ChangeSet@1.2321, 2011-08-27 03:34:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2671, 2011-09-01 11:04:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P211
+ TAG: NTP_4_2_7P211
+
+ ChangeLog@1.1030 +1 -0
+ NTP_4_2_7P211
+
+ ntpd/ntpd-opts.c@1.216 +3 -3
+ NTP_4_2_7P211
+
+ ntpd/ntpd-opts.h@1.216 +3 -3
+ NTP_4_2_7P211
+
+ ntpd/ntpd-opts.texi@1.214 +2 -2
+ NTP_4_2_7P211
+
+ ntpd/ntpd.1ntpdman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpd/ntpd.1ntpdmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpd/ntpd.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpd/ntpd.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc-opts.c@1.211 +3 -3
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc-opts.h@1.211 +3 -3
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc-opts.texi@1.211 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc.1ntpdcman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc.html@1.39 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpdc/ntpdc.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpq/ntpq-opts.c@1.213 +3 -3
+ NTP_4_2_7P211
+
+ ntpq/ntpq-opts.h@1.213 +3 -3
+ NTP_4_2_7P211
+
+ ntpq/ntpq-opts.texi@1.213 +2 -2
+ NTP_4_2_7P211
+
+ ntpq/ntpq.1ntpqman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpq/ntpq.1ntpqmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpq/ntpq.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpq/ntpq.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.213 +3 -3
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.213 +3 -3
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.213 +2 -2
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ packageinfo.sh@1.214 +1 -1
+ NTP_4_2_7P211
+
+ scripts/ntp-wait-opts.texi@1.31 +1 -1
+ NTP_4_2_7P211
+
+ scripts/ntp-wait.1ntp-waitman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ scripts/ntp-wait.html@1.31 +1 -1
+ NTP_4_2_7P211
+
+ scripts/ntp-wait.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ scripts/ntp-wait.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp-opts.c@1.209 +3 -3
+ NTP_4_2_7P211
+
+ sntp/sntp-opts.h@1.209 +3 -3
+ NTP_4_2_7P211
+
+ sntp/sntp-opts.texi@1.209 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp.1sntpman@1.29 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp.1sntpmdoc@1.29 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp.html@1.209 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp.man.in@1.29 +2 -2
+ NTP_4_2_7P211
+
+ sntp/sntp.mdoc.in@1.29 +2 -2
+ NTP_4_2_7P211
+
+ util/ntp-keygen-opts.c@1.211 +3 -3
+ NTP_4_2_7P211
+
+ util/ntp-keygen-opts.h@1.211 +3 -3
+ NTP_4_2_7P211
+
+ util/ntp-keygen-opts.texi@1.214 +2 -2
+ NTP_4_2_7P211
+
+ util/ntp-keygen.1ntp-keygenman@1.27 +2 -2
+ NTP_4_2_7P211
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.27 +2 -2
+ NTP_4_2_7P211
+
+ util/ntp-keygen.man.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ util/ntp-keygen.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P211
+
+ChangeSet@1.2461.1.9, 2011-08-31 17:07:44+00:00, davehart@shiny.ad.hartbrothers.com
+ make libevent/test/*.sh scripts executable
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.2 +0 -0
+ Change mode to -rwxrwxr-x
+
+ sntp/libevent/test/test-ratelim.sh@1.2 +0 -0
+ Change mode to -rwxrwxr-x
+
+ChangeSet@1.2669, 2011-08-31 16:46:40+00:00, davehart@shiny.ad.hartbrothers.com
+ Update libevent to git head (2.1 branch) as of 2.0.14-stable.
+
+ Applies to prior merge cset.
+
+ ChangeLog@1.1029 +1 -0
+ Update libevent to git head (2.1 branch) as of 2.0.14-stable.
+
+ChangeSet@1.2667, 2011-08-31 16:37:06+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove now-unsupported vc6 and vs2003 subdirs of ports/winnt.
+
+ BitKeeper/deleted/04/ntpkeygen.vcproj~7e53b51bab97a85@1.7 +0 -0
+ Delete: ports/winnt/vs2003/ntpkeygen.vcproj
+
+ BitKeeper/deleted/11/libntp.vcproj~ae0be90114fde0a7@1.23 +0 -0
+ Delete: ports/winnt/vs2003/libntp.vcproj
+
+ BitKeeper/deleted/42/ntpdc.vcproj~531302457eef61a9@1.7 +0 -0
+ Delete: ports/winnt/vs2003/ntpdc.vcproj
+
+ BitKeeper/deleted/43/ntpdc.dsp~29080509@1.31 +0 -0
+ Delete: ports/winnt/vc6/ntpdc.dsp
+
+ BitKeeper/deleted/4a/ntp.sln~b86a8294928e984c@1.3 +0 -0
+ Delete: ports/winnt/vs2003/ntp.sln
+
+ BitKeeper/deleted/67/ntpq.dsp~29080509@1.32 +0 -0
+ Delete: ports/winnt/vc6/ntpq.dsp
+
+ BitKeeper/deleted/69/ntp.dsw~29080509@1.14 +0 -0
+ Delete: ports/winnt/vc6/ntp.dsw
+
+ BitKeeper/deleted/9a/ntpdate.dsp~29080509@1.26 +0 -0
+ Delete: ports/winnt/vc6/ntpdate.dsp
+
+ BitKeeper/deleted/a2/ntpdate.vcproj~208e4d43d00e01e7@1.5 +0 -0
+ Delete: ports/winnt/vs2003/ntpdate.vcproj
+
+ BitKeeper/deleted/ad/Instsrv.vcproj~aa43ae49bdb6d4d6@1.2 +0 -0
+ Delete: ports/winnt/vs2003/Instsrv.vcproj
+
+ BitKeeper/deleted/ae/libntp.dsp~29080509@1.64 +0 -0
+ Delete: ports/winnt/vc6/libntp.dsp
+
+ BitKeeper/deleted/b0/Instsrv.dsp~29080509@1.13 +0 -0
+ Delete: ports/winnt/vc6/Instsrv.dsp
+
+ BitKeeper/deleted/c9/ntpd.vcproj~c453035eff854e7c@1.15 +0 -0
+ Delete: ports/winnt/vs2003/ntpd.vcproj
+
+ BitKeeper/deleted/db/ntpkeygen.dsp~d24bb34d@1.24 +0 -0
+ Delete: ports/winnt/vc6/ntpkeygen.dsp
+
+ BitKeeper/deleted/e2/ntpq.vcproj~dbbd02e21a47962f@1.7 +0 -0
+ Delete: ports/winnt/vs2003/ntpq.vcproj
+
+ BitKeeper/deleted/f7/ntpd.dsp~29080509@1.54 +0 -0
+ Delete: ports/winnt/vc6/ntpd.dsp
+
+ChangeSet@1.2461.1.8, 2011-08-31 16:12:20+00:00, davehart@shiny.ad.hartbrothers.com
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/ChangeLog@1.5 +25 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/Makefile.am@1.1.1.5 +1 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/buffer.c@1.6 +12 -6
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/buffer_iocp.c@1.4 +3 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent-internal.h@1.4 +4 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent.c@1.4 +15 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent_async.c@1.4 +41 -15
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent_filter.c@1.4 +1 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent_openssl.c@1.5 +5 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent_ratelim.c@1.3 +33 -2
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/bufferevent_sock.c@1.4 +4 -2
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/configure.in@1.1.1.4 +18 -16
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/defer-internal.h@1.3 +4 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/evbuffer-internal.h@1.4 +2 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/evdns.c@1.1.1.4 +2 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/event-internal.h@1.1.1.4 +10 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/event.c@1.1.1.5 +234 -100
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/evrpc.c@1.4 +16 -5
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/evutil.c@1.1.1.4 +1 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/evutil_rand.c@1.4 +12 -4
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/http.c@1.1.1.5 +1 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/include/event2/dns.h@1.4 +1 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/include/event2/event.h@1.1.1.4 +32 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/include/event2/event_compat.h@1.3 +2 -2
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/kqueue.c@1.5 +7 -9
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/m4/libevent_openssl.m4@1.1 +47 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/m4/libevent_openssl.m4@1.0 +0 -0
+
+ sntp/libevent/m4/ntp_pkg_config.m4@1.1 +27 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/m4/ntp_pkg_config.m4@1.0 +0 -0
+
+ sntp/libevent/minheap-internal.h@1.3 +34 -6
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/sample/Makefile.am@1.1.1.4 +1 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/sample/dns-example.c@1.1.1.3 +4 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/sample/http-server.c@1.1.1.4 +4 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/signal.c@1.5 +3 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/test/Makefile.am@1.1.1.4 +10 -5
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/test/bench_http.c@1.3 +16 -3
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.1 +41 -0
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.0 +0 -0
+
+ sntp/libevent/test/test-ratelim.c@1.1.1.3 +18 -1
+ Update to libevent master (to be 2.1) as of 2.0.14-stable, HEAD git commit
+ 148458e0a1fd25e167aa2ef229d1c9a70b27c3e9
+
+ChangeSet@1.2666, 2011-08-31 04:15:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P210
+ TAG: NTP_4_2_7P210
+
+ ChangeLog@1.1028 +1 -0
+ NTP_4_2_7P210
+
+ ntpd/ntpd-opts.c@1.215 +3 -3
+ NTP_4_2_7P210
+
+ ntpd/ntpd-opts.h@1.215 +3 -3
+ NTP_4_2_7P210
+
+ ntpd/ntpd-opts.texi@1.213 +2 -2
+ NTP_4_2_7P210
+
+ ntpd/ntpd.1ntpdman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpd/ntpd.1ntpdmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpd/ntpd.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpd/ntpd.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc-opts.c@1.210 +3 -3
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc-opts.h@1.210 +3 -3
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc-opts.texi@1.210 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc.1ntpdcman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc.html@1.38 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpdc/ntpdc.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpq/ntpq-opts.c@1.212 +3 -3
+ NTP_4_2_7P210
+
+ ntpq/ntpq-opts.h@1.212 +3 -3
+ NTP_4_2_7P210
+
+ ntpq/ntpq-opts.texi@1.212 +2 -2
+ NTP_4_2_7P210
+
+ ntpq/ntpq.1ntpqman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpq/ntpq.1ntpqmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpq/ntpq.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpq/ntpq.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.212 +3 -3
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.212 +3 -3
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.212 +2 -2
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ packageinfo.sh@1.213 +1 -1
+ NTP_4_2_7P210
+
+ scripts/ntp-wait-opts.texi@1.30 +1 -1
+ NTP_4_2_7P210
+
+ scripts/ntp-wait.1ntp-waitman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ scripts/ntp-wait.html@1.30 +1 -1
+ NTP_4_2_7P210
+
+ scripts/ntp-wait.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ scripts/ntp-wait.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp-opts.c@1.208 +3 -3
+ NTP_4_2_7P210
+
+ sntp/sntp-opts.h@1.208 +3 -3
+ NTP_4_2_7P210
+
+ sntp/sntp-opts.texi@1.208 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp.1sntpman@1.28 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp.1sntpmdoc@1.28 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp.html@1.208 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp.man.in@1.28 +2 -2
+ NTP_4_2_7P210
+
+ sntp/sntp.mdoc.in@1.28 +2 -2
+ NTP_4_2_7P210
+
+ util/ntp-keygen-opts.c@1.210 +3 -3
+ NTP_4_2_7P210
+
+ util/ntp-keygen-opts.h@1.210 +3 -3
+ NTP_4_2_7P210
+
+ util/ntp-keygen-opts.texi@1.213 +2 -2
+ NTP_4_2_7P210
+
+ util/ntp-keygen.1ntp-keygenman@1.26 +2 -2
+ NTP_4_2_7P210
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.26 +2 -2
+ NTP_4_2_7P210
+
+ util/ntp-keygen.man.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ util/ntp-keygen.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P210
+
+ChangeSet@1.2665, 2011-08-30 09:01:00+00:00, davehart@shiny.ad.hartbrothers.com
+ Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000].
+
+ ChangeLog@1.1027 +1 -0
+ Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000].
+
+ ntpd/ntp_timer.c@1.65 +10 -10
+ Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000].
+
+ChangeSet@1.2664, 2011-08-27 10:47:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P209
+ TAG: NTP_4_2_7P209
+
+ ChangeLog@1.1026 +1 -0
+ NTP_4_2_7P209
+
+ ntpd/ntpd-opts.c@1.214 +3 -3
+ NTP_4_2_7P209
+
+ ntpd/ntpd-opts.h@1.214 +3 -3
+ NTP_4_2_7P209
+
+ ntpd/ntpd-opts.texi@1.212 +2 -2
+ NTP_4_2_7P209
+
+ ntpd/ntpd.1ntpdman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpd/ntpd.1ntpdmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpd/ntpd.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpd/ntpd.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc-opts.c@1.209 +3 -3
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc-opts.h@1.209 +3 -3
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc-opts.texi@1.209 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc.1ntpdcman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc.html@1.37 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpdc/ntpdc.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpq/ntpq-opts.c@1.211 +3 -3
+ NTP_4_2_7P209
+
+ ntpq/ntpq-opts.h@1.211 +3 -3
+ NTP_4_2_7P209
+
+ ntpq/ntpq-opts.texi@1.211 +2 -2
+ NTP_4_2_7P209
+
+ ntpq/ntpq.1ntpqman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpq/ntpq.1ntpqmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpq/ntpq.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpq/ntpq.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.211 +3 -3
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.211 +3 -3
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.211 +2 -2
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ packageinfo.sh@1.212 +1 -1
+ NTP_4_2_7P209
+
+ scripts/ntp-wait-opts.texi@1.29 +1 -1
+ NTP_4_2_7P209
+
+ scripts/ntp-wait.1ntp-waitman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ scripts/ntp-wait.html@1.29 +1 -1
+ NTP_4_2_7P209
+
+ scripts/ntp-wait.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ scripts/ntp-wait.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp-opts.c@1.207 +3 -3
+ NTP_4_2_7P209
+
+ sntp/sntp-opts.h@1.207 +3 -3
+ NTP_4_2_7P209
+
+ sntp/sntp-opts.texi@1.207 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp.1sntpman@1.27 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp.1sntpmdoc@1.27 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp.html@1.207 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp.man.in@1.27 +2 -2
+ NTP_4_2_7P209
+
+ sntp/sntp.mdoc.in@1.27 +2 -2
+ NTP_4_2_7P209
+
+ util/ntp-keygen-opts.c@1.209 +3 -3
+ NTP_4_2_7P209
+
+ util/ntp-keygen-opts.h@1.209 +3 -3
+ NTP_4_2_7P209
+
+ util/ntp-keygen-opts.texi@1.212 +2 -2
+ NTP_4_2_7P209
+
+ util/ntp-keygen.1ntp-keygenman@1.25 +2 -2
+ NTP_4_2_7P209
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.25 +2 -2
+ NTP_4_2_7P209
+
+ util/ntp-keygen.man.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ util/ntp-keygen.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P209
+
+ChangeSet@1.2663, 2011-08-27 03:38:01-04:00, stenn@deacon.udel.edu
+ Use pre-calculated values for the sntp synch distance checks
+
+ sntp/tests/packetHandling.cpp@1.9 +5 -7
+ Use pre-calculated values for the sntp synch distance checks
+
+ChangeSet@1.2662, 2011-08-27 03:18:26-04:00, stenn@deacon.udel.edu
+ Update sntp test to use synch distance instead of root dispersion
+
+ ChangeLog@1.1025 +2 -0
+ Update sntp test to use synch distance instead of root dispersion
+
+ sntp/tests/packetHandling.cpp@1.8 +10 -6
+ Update sntp test to use synch distance instead of root dispersion
+
+ChangeSet@1.2661, 2011-08-27 07:07:45+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix copy/paste error (SIGIO -> SIGPOLL)
+
+ libntp/work_thread.c@1.11 +3 -3
+ Fix copy/paste error (SIGIO -> SIGPOLL)
+
+ChangeSet@1.2660, 2011-08-27 02:33:48-04:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.1024 +2 -0
+ cleanup
+
+ChangeSet@1.2659, 2011-08-27 05:24:07+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2000] ntpd worker threads must block signals expected in main thread.
+
+ ChangeLog@1.1023 +2 -0
+ [Bug 2000] ntpd worker threads must block signals expected in main thread.
+
+ include/ntpd.h@1.167 +14 -0
+ Expose signal number macros previously private to ntpd.c for use by work_thread.c.
+
+ libntp/syssignal.c@1.14 +1 -1
+ tiny tweak
+
+ libntp/work_thread.c@1.10 +57 -0
+ [Bug 2000] ntpd worker threads must block signals expected in main thread.
+
+ ntpd/ntp_timer.c@1.64 +116 -81
+ Check for failures setting interval timer, use more common code in
+ setitimer()/timer_settime() paths.
+
+ ntpd/ntpd.c@1.127 +44 -47
+ [Bug 2000] ntpd worker threads must block signals expected in main thread.
+
+ChangeSet@1.2658, 2011-08-27 04:19:04+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 2001] add ntpq -c timerstats like ntpdc -c timerstats.
+
+ ChangeLog@1.1022 +1 -0
+ [Bug 2001] add ntpq -c timerstats like ntpdc -c timerstats.
+
+ ntpd/ntp_control.c@1.170 +21 -2
+ [Bug 2001] add ntpq -c timerstats like ntpdc -c timerstats.
+
+ ntpq/ntpq-subs.c@1.88 +25 -1
+ [Bug 2001] add ntpq -c timerstats like ntpdc -c timerstats.
+
+ChangeSet@1.2082.4.234, 2011-08-27 03:34:10+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 2001] ntpdc timerstats reports overruns as handled.
- ChangeLog@1.734 +1 -0
+ ChangeLog@1.496.26.167 +1 -0
[Bug 2001] ntpdc timerstats reports overruns as handled.
- ntpd/ntp_request.c@1.87 +11 -16
+ ntpd/ntp_request.c@1.82.1.5 +11 -16
[Bug 2001] ntpdc timerstats reports overruns as handled.
-ChangeSet@1.2320, 2011-08-09 04:27:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2656, 2011-08-24 09:02:39+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P208
+ TAG: NTP_4_2_7P208
+
+ ChangeLog@1.1020 +1 -0
+ NTP_4_2_7P208
+
+ ntpd/ntpd-opts.c@1.213 +3 -3
+ NTP_4_2_7P208
+
+ ntpd/ntpd-opts.h@1.213 +3 -3
+ NTP_4_2_7P208
+
+ ntpd/ntpd-opts.texi@1.211 +2 -2
+ NTP_4_2_7P208
+
+ ntpd/ntpd.1ntpdman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpd/ntpd.1ntpdmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpd/ntpd.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpd/ntpd.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc-opts.c@1.208 +3 -3
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc-opts.h@1.208 +3 -3
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc-opts.texi@1.208 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc.1ntpdcman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc.html@1.36 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpdc/ntpdc.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpq/ntpq-opts.c@1.210 +3 -3
+ NTP_4_2_7P208
+
+ ntpq/ntpq-opts.h@1.210 +3 -3
+ NTP_4_2_7P208
+
+ ntpq/ntpq-opts.texi@1.210 +2 -2
+ NTP_4_2_7P208
+
+ ntpq/ntpq.1ntpqman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpq/ntpq.1ntpqmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpq/ntpq.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpq/ntpq.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.210 +3 -3
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.210 +3 -3
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.210 +2 -2
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ packageinfo.sh@1.211 +1 -1
+ NTP_4_2_7P208
+
+ scripts/ntp-wait-opts.texi@1.28 +1 -1
+ NTP_4_2_7P208
+
+ scripts/ntp-wait.1ntp-waitman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ scripts/ntp-wait.html@1.28 +1 -1
+ NTP_4_2_7P208
+
+ scripts/ntp-wait.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ scripts/ntp-wait.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp-opts.c@1.206 +3 -3
+ NTP_4_2_7P208
+
+ sntp/sntp-opts.h@1.206 +3 -3
+ NTP_4_2_7P208
+
+ sntp/sntp-opts.texi@1.206 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp.1sntpman@1.26 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp.1sntpmdoc@1.26 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp.html@1.206 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp.man.in@1.26 +2 -2
+ NTP_4_2_7P208
+
+ sntp/sntp.mdoc.in@1.26 +2 -2
+ NTP_4_2_7P208
+
+ util/ntp-keygen-opts.c@1.208 +3 -3
+ NTP_4_2_7P208
+
+ util/ntp-keygen-opts.h@1.208 +3 -3
+ NTP_4_2_7P208
+
+ util/ntp-keygen-opts.texi@1.211 +2 -2
+ NTP_4_2_7P208
+
+ util/ntp-keygen.1ntp-keygenman@1.24 +2 -2
+ NTP_4_2_7P208
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.24 +2 -2
+ NTP_4_2_7P208
+
+ util/ntp-keygen.man.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ util/ntp-keygen.mdoc.in@1.24 +2 -2
+ NTP_4_2_7P208
+
+ChangeSet@1.2655, 2011-08-24 03:50:28-04:00, stenn@deacon.udel.edu
+ Fix the CLOCK_MONOTONIC TRACE() message
+
+ ChangeLog@1.1019 +1 -0
+ Fix the CLOCK_MONOTONIC TRACE() message
+
+ sntp/main.c@1.79 +2 -1
+ Fix the CLOCK_MONOTONIC TRACE() message
+
+ChangeSet@1.2654, 2011-08-22 05:13:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P207
+ TAG: NTP_4_2_7P207
+
+ ChangeLog@1.1018 +1 -0
+ NTP_4_2_7P207
+
+ ntpd/ntpd-opts.c@1.212 +3 -3
+ NTP_4_2_7P207
+
+ ntpd/ntpd-opts.h@1.212 +3 -3
+ NTP_4_2_7P207
+
+ ntpd/ntpd-opts.texi@1.210 +2 -2
+ NTP_4_2_7P207
+
+ ntpd/ntpd.1ntpdman@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpd/ntpd.1ntpdmdoc@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpd/ntpd.man.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpd/ntpd.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc-opts.c@1.207 +3 -3
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc-opts.h@1.207 +3 -3
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc-opts.texi@1.207 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc.1ntpdcman@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc.html@1.35 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc.man.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpdc/ntpdc.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpq/ntpq-opts.c@1.209 +3 -3
+ NTP_4_2_7P207
+
+ ntpq/ntpq-opts.h@1.209 +3 -3
+ NTP_4_2_7P207
+
+ ntpq/ntpq-opts.texi@1.209 +2 -2
+ NTP_4_2_7P207
+
+ ntpq/ntpq.1ntpqman@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpq/ntpq.1ntpqmdoc@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpq/ntpq.man.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpq/ntpq.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.209 +3 -3
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.209 +3 -3
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.209 +2 -2
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd.man.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ packageinfo.sh@1.210 +1 -1
+ NTP_4_2_7P207
+
+ scripts/ntp-wait-opts.texi@1.27 +1 -1
+ NTP_4_2_7P207
+
+ scripts/ntp-wait.1ntp-waitman@1.23 +8 -7
+ NTP_4_2_7P207
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.23 +7 -6
+ NTP_4_2_7P207
+
+ scripts/ntp-wait.html@1.27 +1 -1
+ NTP_4_2_7P207
+
+ scripts/ntp-wait.man.in@1.23 +8 -7
+ NTP_4_2_7P207
+
+ scripts/ntp-wait.mdoc.in@1.23 +7 -6
+ NTP_4_2_7P207
+
+ sntp/sntp-opts.c@1.205 +3 -3
+ NTP_4_2_7P207
+
+ sntp/sntp-opts.h@1.205 +3 -3
+ NTP_4_2_7P207
+
+ sntp/sntp-opts.texi@1.205 +2 -2
+ NTP_4_2_7P207
+
+ sntp/sntp.1sntpman@1.25 +2 -2
+ NTP_4_2_7P207
+
+ sntp/sntp.1sntpmdoc@1.25 +2 -2
+ NTP_4_2_7P207
+
+ sntp/sntp.html@1.205 +2 -2
+ NTP_4_2_7P207
+
+ sntp/sntp.man.in@1.25 +2 -2
+ NTP_4_2_7P207
+
+ sntp/sntp.mdoc.in@1.25 +2 -2
+ NTP_4_2_7P207
+
+ util/ntp-keygen-opts.c@1.207 +3 -3
+ NTP_4_2_7P207
+
+ util/ntp-keygen-opts.h@1.207 +3 -3
+ NTP_4_2_7P207
+
+ util/ntp-keygen-opts.texi@1.210 +2 -2
+ NTP_4_2_7P207
+
+ util/ntp-keygen.1ntp-keygenman@1.23 +2 -2
+ NTP_4_2_7P207
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.23 +2 -2
+ NTP_4_2_7P207
+
+ util/ntp-keygen.man.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ util/ntp-keygen.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P207
+
+ChangeSet@1.2653, 2011-08-22 02:58:47+00:00, stenn@psp-fb2.ntp.org
+ Cleanups for ntp-wait-opts.def
+
+ scripts/ntp-wait-opts.def@1.4 +1 -1
+ Cleanups for ntp-wait-opts.def
+
+ChangeSet@1.2652, 2011-08-21 23:45:28+00:00, stenn@psp-fb2.ntp.org
+ cleanup ntp.keys.def
+
+ ntpd/ntp.keys.def@1.5 +5 -1
+ cleanup ntp.keys.def
+
+ChangeSet@1.2651, 2011-08-21 09:13:07+00:00, stenn@psp-fb2.ntp.org
+ ntp.keys.def cleanup
+
+ ntpd/ntp.keys.def@1.4 +2 -2
+ ntp.keys.def cleanup
+
+ChangeSet@1.2650, 2011-08-21 01:24:12-04:00, stenn@deacon.udel.edu
+ Restore the original CLOCK_MONOTONIC output format in sntp
+
+ ChangeLog@1.1017 +1 -0
+ Restore the original CLOCK_MONOTONIC output format in sntp
+
+ sntp/main.c@1.78 +2 -1
+ Restore the original CLOCK_MONOTONIC output format in sntp
+
+ChangeSet@1.2649, 2011-08-21 05:04:33+00:00, stenn@psp-fb2.ntp.org
+ Cleanups for ntp-wait-opts.def and ntp.keys.def
+
+ ChangeLog@1.1016 +1 -0
+ Cleanups for ntp-wait-opts.def and ntp.keys.def
+
+ ntpd/ntp.keys.def@1.3 +11 -8
+ Cleanups for ntp-wait-opts.def and ntp.keys.def
+
+ scripts/ntp-wait-opts.def@1.3 +6 -5
+ Cleanups for ntp-wait-opts.def and ntp.keys.def
+
+ChangeSet@1.2648, 2011-08-20 06:04:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P206
+ TAG: NTP_4_2_7P206
+
+ ChangeLog@1.1015 +1 -0
+ NTP_4_2_7P206
+
+ ntpd/ntpd-opts.c@1.211 +3 -3
+ NTP_4_2_7P206
+
+ ntpd/ntpd-opts.h@1.211 +3 -3
+ NTP_4_2_7P206
+
+ ntpd/ntpd-opts.texi@1.209 +2 -2
+ NTP_4_2_7P206
+
+ ntpd/ntpd.1ntpdman@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpd/ntpd.1ntpdmdoc@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpd/ntpd.man.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpd/ntpd.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc-opts.c@1.206 +3 -3
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc-opts.h@1.206 +3 -3
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc-opts.texi@1.206 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc.1ntpdcman@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc.html@1.34 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc.man.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpdc/ntpdc.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpq/ntpq-opts.c@1.208 +3 -3
+ NTP_4_2_7P206
+
+ ntpq/ntpq-opts.h@1.208 +3 -3
+ NTP_4_2_7P206
+
+ ntpq/ntpq-opts.texi@1.208 +2 -2
+ NTP_4_2_7P206
+
+ ntpq/ntpq.1ntpqman@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpq/ntpq.1ntpqmdoc@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpq/ntpq.man.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpq/ntpq.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.208 +3 -3
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.208 +3 -3
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.208 +2 -2
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd.man.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ packageinfo.sh@1.209 +1 -1
+ NTP_4_2_7P206
+
+ scripts/ntp-wait-opts.texi@1.26 +1 -1
+ NTP_4_2_7P206
+
+ scripts/ntp-wait.1ntp-waitman@1.22 +9 -5
+ NTP_4_2_7P206
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.22 +9 -5
+ NTP_4_2_7P206
+
+ scripts/ntp-wait.html@1.26 +1 -1
+ NTP_4_2_7P206
+
+ scripts/ntp-wait.man.in@1.22 +9 -5
+ NTP_4_2_7P206
+
+ scripts/ntp-wait.mdoc.in@1.22 +9 -5
+ NTP_4_2_7P206
+
+ sntp/sntp-opts.c@1.204 +7 -7
+ NTP_4_2_7P206
+
+ sntp/sntp-opts.h@1.204 +3 -3
+ NTP_4_2_7P206
+
+ sntp/sntp-opts.texi@1.204 +52 -37
+ NTP_4_2_7P206
+
+ sntp/sntp.1sntpman@1.24 +50 -35
+ NTP_4_2_7P206
+
+ sntp/sntp.1sntpmdoc@1.24 +50 -35
+ NTP_4_2_7P206
+
+ sntp/sntp.html@1.204 +49 -37
+ NTP_4_2_7P206
+
+ sntp/sntp.man.in@1.24 +50 -35
+ NTP_4_2_7P206
+
+ sntp/sntp.mdoc.in@1.24 +50 -35
+ NTP_4_2_7P206
+
+ util/ntp-keygen-opts.c@1.206 +3 -3
+ NTP_4_2_7P206
+
+ util/ntp-keygen-opts.h@1.206 +3 -3
+ NTP_4_2_7P206
+
+ util/ntp-keygen-opts.texi@1.209 +2 -2
+ NTP_4_2_7P206
+
+ util/ntp-keygen.1ntp-keygenman@1.22 +2 -2
+ NTP_4_2_7P206
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.22 +2 -2
+ NTP_4_2_7P206
+
+ util/ntp-keygen.man.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ util/ntp-keygen.mdoc.in@1.22 +2 -2
+ NTP_4_2_7P206
+
+ChangeSet@1.2645.1.2, 2011-08-20 02:51:43+00:00, stenn@psp-fb2.ntp.org
+ sntp documentation and behavior improvements suggested by Steven Sommars
+
+ ChangeLog@1.1012.1.3 +2 -0
+ sntp documentation and behavior improvements suggested by Steven Sommars
+
+ sntp/sntp-opts.def@1.38 +72 -42
+ sntp documentation and behavior improvements suggested by Steven Sommars
+
+ChangeSet@1.2645.1.1, 2011-08-20 02:42:48+00:00, stenn@psp-fb2.ntp.org
+ Have sntp report synchronization distance instead of root dispersion
+
+ ChangeLog@1.1012.1.2 +1 -0
+ Have sntp report synchronization distance instead of root dispersion
+
+ ChangeLog@1.1012.1.1 +1 -0
+ Clean up ntp-wait-opts.def
+
+ scripts/ntp-wait-opts.def@1.2 +16 -18
+ Clean up ntp-wait-opts.def
+
+ sntp/main.c@1.77 +9 -10
+ Have sntp report synchronization distance instead of root dispersion
+
+ChangeSet@1.2646, 2011-08-19 16:06:28+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1993] ntpd Windows port adj_systime() broken in 4.2.7p203.
+
+ ChangeLog@1.1013 +1 -0
+ [Bug 1993] ntpd Windows port adj_systime() broken in 4.2.7p203.
+
+ include/ntp_fp.h@1.25 +1 -1
+ Work around DebugBreak() in debug build of Windows port when a cast from
+ 64 to 32 bits changes the value by masking off upper 32 bits explicitly
+ in DTOLFP().
+
+ include/ntp_types.h@1.26 +5 -0
+ Provide UINT32_MAX corresponding to u_int32 type.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.52 +29 -23
+ [Bug 1993] ntpd Windows port adj_systime() broken in 4.2.7p203.
+
+ChangeSet@1.2645, 2011-08-19 07:46:19+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P205
+ TAG: NTP_4_2_7P205
+
+ ChangeLog@1.1012 +1 -0
+ NTP_4_2_7P205
+
+ ntpd/ntpd-opts.c@1.210 +3 -3
+ NTP_4_2_7P205
+
+ ntpd/ntpd-opts.h@1.210 +3 -3
+ NTP_4_2_7P205
+
+ ntpd/ntpd-opts.texi@1.208 +2 -2
+ NTP_4_2_7P205
+
+ ntpd/ntpd.1ntpdman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpd/ntpd.1ntpdmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpd/ntpd.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpd/ntpd.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc-opts.c@1.205 +3 -3
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc-opts.h@1.205 +3 -3
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc-opts.texi@1.205 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc.1ntpdcman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc.html@1.33 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpdc/ntpdc.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpq/ntpq-opts.c@1.207 +3 -3
+ NTP_4_2_7P205
+
+ ntpq/ntpq-opts.h@1.207 +3 -3
+ NTP_4_2_7P205
+
+ ntpq/ntpq-opts.texi@1.207 +2 -2
+ NTP_4_2_7P205
+
+ ntpq/ntpq.1ntpqman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpq/ntpq.1ntpqmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpq/ntpq.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpq/ntpq.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.207 +3 -3
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.207 +3 -3
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.207 +2 -2
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ packageinfo.sh@1.208 +1 -1
+ NTP_4_2_7P205
+
+ scripts/ntp-wait-opts.texi@1.25 +1 -1
+ NTP_4_2_7P205
+
+ scripts/ntp-wait.1ntp-waitman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ scripts/ntp-wait.html@1.25 +1 -1
+ NTP_4_2_7P205
+
+ scripts/ntp-wait.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ scripts/ntp-wait.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp-opts.c@1.203 +3 -3
+ NTP_4_2_7P205
+
+ sntp/sntp-opts.h@1.203 +3 -3
+ NTP_4_2_7P205
+
+ sntp/sntp-opts.texi@1.203 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp.1sntpman@1.23 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp.1sntpmdoc@1.23 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp.html@1.203 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp.man.in@1.23 +2 -2
+ NTP_4_2_7P205
+
+ sntp/sntp.mdoc.in@1.23 +2 -2
+ NTP_4_2_7P205
+
+ util/ntp-keygen-opts.c@1.205 +3 -3
+ NTP_4_2_7P205
+
+ util/ntp-keygen-opts.h@1.205 +3 -3
+ NTP_4_2_7P205
+
+ util/ntp-keygen-opts.texi@1.208 +2 -2
+ NTP_4_2_7P205
+
+ util/ntp-keygen.1ntp-keygenman@1.21 +2 -2
+ NTP_4_2_7P205
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.21 +2 -2
+ NTP_4_2_7P205
+
+ util/ntp-keygen.man.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ util/ntp-keygen.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P205
+
+ChangeSet@1.2644, 2011-08-18 02:26:57+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix typo in libevent/test/rpcgen_wrapper.sh spotted by Nick Mathewson.
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.2 +1 -1
+ Fix typo in libevent/test/rpcgen_wrapper.sh spotted by Nick Mathewson.
+
+ChangeSet@1.2643, 2011-08-18 02:25:11+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1992] util/tg2 doesn't compile, needs libntp.
+ Patch supplied by kukabu@gmail.com:
+ http://bugs.ntp.org/attachment.cgi?id=786
+
+ ChangeLog@1.1011 +1 -0
+ [Bug 1992] util/tg2 doesn't compile, needs libntp.
+
+ util/Makefile.am@1.66 +1 -1
+ [Bug 1992] util/tg2 doesn't compile, needs libntp.
+
+ util/tg2.c@1.6 +2 -3
+ [Bug 1992] util/tg2 doesn't compile, needs libntp.
+
+ChangeSet@1.2642, 2011-08-16 11:18:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P204
+ TAG: NTP_4_2_7P204
+
+ ChangeLog@1.1010 +1 -0
+ NTP_4_2_7P204
+
+ ntpd/ntpd-opts.c@1.209 +3 -3
+ NTP_4_2_7P204
+
+ ntpd/ntpd-opts.h@1.209 +3 -3
+ NTP_4_2_7P204
+
+ ntpd/ntpd-opts.texi@1.207 +2 -2
+ NTP_4_2_7P204
+
+ ntpd/ntpd.1ntpdman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpd/ntpd.1ntpdmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpd/ntpd.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpd/ntpd.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc-opts.c@1.204 +3 -3
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc-opts.h@1.204 +3 -3
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc-opts.texi@1.204 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc.1ntpdcman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc.html@1.32 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpdc/ntpdc.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpq/ntpq-opts.c@1.206 +3 -3
+ NTP_4_2_7P204
+
+ ntpq/ntpq-opts.h@1.206 +3 -3
+ NTP_4_2_7P204
+
+ ntpq/ntpq-opts.texi@1.206 +2 -2
+ NTP_4_2_7P204
+
+ ntpq/ntpq.1ntpqman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpq/ntpq.1ntpqmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpq/ntpq.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpq/ntpq.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.206 +3 -3
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.206 +3 -3
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.206 +2 -2
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ packageinfo.sh@1.207 +1 -1
+ NTP_4_2_7P204
+
+ scripts/ntp-wait-opts.texi@1.24 +1 -1
+ NTP_4_2_7P204
+
+ scripts/ntp-wait.1ntp-waitman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ scripts/ntp-wait.html@1.24 +1 -1
+ NTP_4_2_7P204
+
+ scripts/ntp-wait.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ scripts/ntp-wait.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ sntp/sntp-opts.c@1.202 +3 -3
+ NTP_4_2_7P204
+
+ sntp/sntp-opts.h@1.202 +3 -3
+ NTP_4_2_7P204
+
+ sntp/sntp-opts.texi@1.202 +13 -15
+ NTP_4_2_7P204
+
+ sntp/sntp.1sntpman@1.22 +13 -15
+ NTP_4_2_7P204
+
+ sntp/sntp.1sntpmdoc@1.22 +13 -15
+ NTP_4_2_7P204
+
+ sntp/sntp.html@1.202 +14 -16
+ NTP_4_2_7P204
+
+ sntp/sntp.man.in@1.22 +13 -15
+ NTP_4_2_7P204
+
+ sntp/sntp.mdoc.in@1.22 +13 -15
+ NTP_4_2_7P204
+
+ util/ntp-keygen-opts.c@1.204 +3 -3
+ NTP_4_2_7P204
+
+ util/ntp-keygen-opts.h@1.204 +3 -3
+ NTP_4_2_7P204
+
+ util/ntp-keygen-opts.texi@1.207 +2 -2
+ NTP_4_2_7P204
+
+ util/ntp-keygen.1ntp-keygenman@1.20 +2 -2
+ NTP_4_2_7P204
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.20 +2 -2
+ NTP_4_2_7P204
+
+ util/ntp-keygen.man.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ util/ntp-keygen.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P204
+
+ChangeSet@1.2637.1.3, 2011-08-15 18:24:53-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1989] sntp manual page sometimes refers to SNTP as a program
+
+ ChangeLog@1.1005.1.3 +1 -0
+ [Bug 1989] sntp manual page sometimes refers to SNTP as a program
+
+ sntp/sntp-opts.def@1.37 +12 -14
+ [Bug 1989] sntp manual page sometimes refers to SNTP as a program
+
+ChangeSet@1.2637.1.2, 2011-08-14 23:08:50+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ ChangeLog@1.1005.1.2 +2 -0
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ include/ntp_syslog.h@1.7 +2 -0
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ libntp/msyslog.c@1.47 +21 -6
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ libntp/socktoa.c@1.17 +9 -2
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ sntp/log.c@1.22 +2 -1
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ sntp/main.c@1.76 +42 -25
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ sntp/networking.c@1.61 +11 -14
+ [Bug 1988] Better sntp send failed error message needed.
+ [Bug 1990] sntp output should include stratum.
+
+ sntp/networking.h@1.27 +2 -3
+ return FALSE from sendpkt() on error.
+
+ sntp/utilities.c@1.19 +33 -0
+ add hostnameaddr() to display given hostname and resolved numeric
+ IP address, avoid duplication if the input was a numeric address.
+
+ sntp/utilities.h@1.11 +14 -12
+ add hostnameaddr() to display given hostname and resolved numeric
+ IP address, avoid duplication if the input was a numeric address.
+
+ChangeSet@1.2637.1.1, 2011-08-13 10:46:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P203
+ TAG: NTP_4_2_7P203
+
+ ChangeLog@1.1005.1.1 +1 -0
+ NTP_4_2_7P203
+
+ ntpd/ntpd-opts.c@1.208 +3 -3
+ NTP_4_2_7P203
+
+ ntpd/ntpd-opts.h@1.208 +3 -3
+ NTP_4_2_7P203
+
+ ntpd/ntpd-opts.texi@1.206 +2 -2
+ NTP_4_2_7P203
+
+ ntpd/ntpd.1ntpdman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpd/ntpd.1ntpdmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpd/ntpd.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpd/ntpd.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc-opts.c@1.203 +3 -3
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc-opts.h@1.203 +3 -3
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc-opts.texi@1.203 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc.1ntpdcman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc.html@1.31 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpdc/ntpdc.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpq/ntpq-opts.c@1.205 +3 -3
+ NTP_4_2_7P203
+
+ ntpq/ntpq-opts.h@1.205 +3 -3
+ NTP_4_2_7P203
+
+ ntpq/ntpq-opts.texi@1.205 +2 -2
+ NTP_4_2_7P203
+
+ ntpq/ntpq.1ntpqman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpq/ntpq.1ntpqmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpq/ntpq.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpq/ntpq.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.205 +3 -3
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.205 +3 -3
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.205 +2 -2
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ packageinfo.sh@1.206 +1 -1
+ NTP_4_2_7P203
+
+ scripts/ntp-wait-opts.texi@1.23 +1 -1
+ NTP_4_2_7P203
+
+ scripts/ntp-wait.1ntp-waitman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ scripts/ntp-wait.html@1.23 +1 -1
+ NTP_4_2_7P203
+
+ scripts/ntp-wait.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ scripts/ntp-wait.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp-opts.c@1.201 +3 -3
+ NTP_4_2_7P203
+
+ sntp/sntp-opts.h@1.201 +3 -3
+ NTP_4_2_7P203
+
+ sntp/sntp-opts.texi@1.201 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp.1sntpman@1.21 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp.1sntpmdoc@1.21 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp.html@1.201 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp.man.in@1.21 +2 -2
+ NTP_4_2_7P203
+
+ sntp/sntp.mdoc.in@1.21 +2 -2
+ NTP_4_2_7P203
+
+ util/ntp-keygen-opts.c@1.203 +3 -3
+ NTP_4_2_7P203
+
+ util/ntp-keygen-opts.h@1.203 +3 -3
+ NTP_4_2_7P203
+
+ util/ntp-keygen-opts.texi@1.206 +2 -2
+ NTP_4_2_7P203
+
+ util/ntp-keygen.1ntp-keygenman@1.19 +2 -2
+ NTP_4_2_7P203
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.19 +2 -2
+ NTP_4_2_7P203
+
+ util/ntp-keygen.man.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ util/ntp-keygen.mdoc.in@1.19 +2 -2
+ NTP_4_2_7P203
+
+ChangeSet@1.2638, 2011-08-13 08:59:34+02:00, jnperlin@hydra.localnet
+ PGRMF support in NMEA driver
+
+ ChangeLog@1.1006 +1 -0
+ PGRMF support in NMEA driver
+
+ ntpd/refclock_nmea.c@1.61 +647 -475
+ PGRMF support in NMEA driver
+
+ChangeSet@1.2637, 2011-08-12 15:04:45-04:00, stenn@deacon.udel.edu
+ Note that 1986 was fixed by this changeset
+
+ ChangeLog@1.1005 +1 -1
+ Note that 1986 was fixed by this changeset
+
+ChangeSet@1.2636, 2011-08-12 17:17:54+00:00, davehart@shiny.ad.hartbrothers.com
+ Actually use long long for (u_)int64 by correcting spelling
+ of SIZEOF_LONG_LONG in ntp_types.h.
+ Require Visual C++ 2005 or later compilers in Windows port.
+ Force .exe minimum Windows version to 0x0400 to allow NT4 in
+ vs2005/*.vcproj files.
+
+ ChangeLog@1.1004 +5 -0
+ Actually use long long for (u_)int64 by correcting spelling of
+ SIZEOF_LONG_LONG in ntp_types.h.
+ Require Visual C++ 2005 or later compilers in Windows port.
+ Force .exe minimum Windows version to 0x0400 to allow NT4 in
+ vs2005/*.vcproj files.
+
+
+ include/ntp_machine.h@1.36 +0 -5
+ Remove long-untested SYS_CYGWIN32-specific block.
+
+ include/ntp_types.h@1.25 +1 -6
+ Correct spelling of SIZEOF_LONG_LONG, which will restore NTP's int64 on a
+ number of platforms.
+ With VC++ 2005 the minimum requirement, remove _MSC_VER __int64 block,
+ using the same "long long" types for (u_)int64.
+
+ include/timetoa.h@1.4 +3 -2
+ comment cleanup
+
+ lib/isc/win32/include/isc/platform.h@1.8 +2 -0
+ Allow presetting ISC_PLATFORM_QUADFORMAT, as ports\winnt\include\config.h
+ now does.
+
+ libntp/timespecops.c@1.7 +4 -3
+ Use u_int64 where available, instead of only where long is 64-bit.
+
+ ntpd/complete.conf@1.19 +1 -0
+ test "server" with IPv6 link-local with interface specifier
+
+ ports/winnt/include/config.h@1.101 +54 -63
+ Require Visual C++ 2005 or later, enabling portable "long long" and
+ "%lld" for 64-bit scalars.
+ Switch libisc from %I64 to %ll.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.51 +77 -121
+ Require Visual C++ 2005 or later, enabling portable "long long" and
+ "%lld" for 64-bit scalars.
+ Switch from %I64 to %ll.
+ Remove workarounds for VC6 deficit converting u_int64 to double,
+ removing many (LONGLONG) casts of ULONGLONGs in particular.
+ Code style cleanup.
+
+ ports/winnt/vs2005/Instsrv.vcproj@1.3 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ ports/winnt/vs2005/ntpd.vcproj@1.15 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ ports/winnt/vs2005/ntpdate.vcproj@1.5 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ ports/winnt/vs2005/ntpdc.vcproj@1.7 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ ports/winnt/vs2005/ntpkeygen.vcproj@1.7 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ ports/winnt/vs2005/ntpq.vcproj@1.7 +2 -0
+ Force .exe minimum Windows version to 0x0400 to allow NT4
+
+ChangeSet@1.2635, 2011-08-12 06:25:53+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct init_logging()'s def_syslogmask type to u_int32 following
+ change of ntp_syslogmask from u_long to u_int32 in p202.
+
+ ChangeLog@1.1003 +2 -0
+ Correct init_logging()'s def_syslogmask type to u_int32 following
+ change of ntp_syslogmask from u_long to u_int32 in p202.
+
+ include/ntp_stdlib.h@1.64 +1 -1
+ change init_logging()'s def_syslogmask type to u_int32 to match
+ recent change of ntp_syslogmask from u_long to u_int32.
+
+ libntp/msyslog.c@1.46 +7 -3
+ More (u_long) to (u_int32) around ntp_syslogmask type change.
+
+ sntp/m4/ntp_libevent.m4@1.9 +6 -1
+ Detect --gc-sections support by default for our tearoff libevent,
+ now that libevent has opted to default to --disable-function-sections.
+
+ChangeSet@1.2634, 2011-08-12 06:21:59+00:00, davehart@shiny.ad.hartbrothers.com
+ Attempt to fix libevent "make distcheck" failure related to read-only
+ srcdir and event_rpcgen.py by avoiding creating stub regress.gen.h and
+ regress.gen.c in the build directory when $srcdir has both already.
+
+ ChangeLog@1.1002 +2 -0
+ Fix make distcheck with --enable-libevent-regress problem with
+ unwritable $srcdir.
+
+ sntp/libevent/test/Makefile.am@1.8 +9 -4
+ Attempt to fix libevent "make distcheck" failure related to read-only
+ srcdir and event_rpcgen.py by avoiding creating stub regress.gen.h and
+ regress.gen.c in the build directory when $srcdir has both already.
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.1 +42 -0
+ BitKeeper file C:/ntp/ntp-dev-1986/sntp/libevent/test/rpcgen_wrapper.sh
+
+ sntp/libevent/test/rpcgen_wrapper.sh@1.0 +0 -0
+
+ChangeSet@1.2633, 2011-08-09 08:20:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P202
+ TAG: NTP_4_2_7P202
+
+ ChangeLog@1.1001 +1 -0
+ NTP_4_2_7P202
+
+ ntpd/ntpd-opts.c@1.207 +3 -3
+ NTP_4_2_7P202
+
+ ntpd/ntpd-opts.h@1.207 +3 -3
+ NTP_4_2_7P202
+
+ ntpd/ntpd-opts.texi@1.205 +2 -2
+ NTP_4_2_7P202
+
+ ntpd/ntpd.1ntpdman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpd/ntpd.1ntpdmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpd/ntpd.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpd/ntpd.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc-opts.c@1.202 +3 -3
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc-opts.h@1.202 +3 -3
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc-opts.texi@1.202 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc.1ntpdcman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc.html@1.30 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpdc/ntpdc.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpq/ntpq-opts.c@1.204 +3 -3
+ NTP_4_2_7P202
+
+ ntpq/ntpq-opts.h@1.204 +3 -3
+ NTP_4_2_7P202
+
+ ntpq/ntpq-opts.texi@1.204 +2 -2
+ NTP_4_2_7P202
+
+ ntpq/ntpq.1ntpqman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpq/ntpq.1ntpqmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpq/ntpq.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpq/ntpq.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.204 +3 -3
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.204 +3 -3
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.204 +2 -2
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ packageinfo.sh@1.205 +1 -1
+ NTP_4_2_7P202
+
+ scripts/ntp-wait-opts.texi@1.22 +1 -1
+ NTP_4_2_7P202
+
+ scripts/ntp-wait.1ntp-waitman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ scripts/ntp-wait.html@1.22 +1 -1
+ NTP_4_2_7P202
+
+ scripts/ntp-wait.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ scripts/ntp-wait.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp-opts.c@1.200 +3 -3
+ NTP_4_2_7P202
+
+ sntp/sntp-opts.h@1.200 +3 -3
+ NTP_4_2_7P202
+
+ sntp/sntp-opts.texi@1.200 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp.1sntpman@1.20 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp.1sntpmdoc@1.20 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp.html@1.200 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp.man.in@1.20 +2 -2
+ NTP_4_2_7P202
+
+ sntp/sntp.mdoc.in@1.20 +2 -2
+ NTP_4_2_7P202
+
+ util/ntp-keygen-opts.c@1.202 +3 -3
+ NTP_4_2_7P202
+
+ util/ntp-keygen-opts.h@1.202 +3 -3
+ NTP_4_2_7P202
+
+ util/ntp-keygen-opts.texi@1.205 +2 -2
+ NTP_4_2_7P202
+
+ util/ntp-keygen.1ntp-keygenman@1.18 +2 -2
+ NTP_4_2_7P202
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.18 +2 -2
+ NTP_4_2_7P202
+
+ util/ntp-keygen.man.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ util/ntp-keygen.mdoc.in@1.18 +2 -2
+ NTP_4_2_7P202
+
+ChangeSet@1.2632, 2011-08-09 03:58:30-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1983] --without-sntp build breaks in sntp subdir
+
+ sntp/Makefile.am@1.68 +0 -2
+ [Bug 1983] --without-sntp build breaks in sntp subdir
+
+ sntp/configure.ac@1.68 +8 -0
+ [Bug 1983] --without-sntp build breaks in sntp subdir
+
+ChangeSet@1.2631, 2011-08-09 05:46:47+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1983] --without-sntp build breaks in sntp subdir.
+
+ ChangeLog@1.1000 +1 -0
+ [Bug 1983] --without-sntp build breaks in sntp subdir.
+
+ sntp/Makefile.am@1.67 +5 -3
+ [Bug 1983] --without-sntp build breaks in sntp subdir.
+
+ Wrap *_PROGRAMS assignments with "if BUILD_SNTP" / "endif".
+
+ChangeSet@1.2082.4.233, 2011-08-09 04:27:25+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1985] "logconfig =allall" rejected.
- ChangeLog@1.733 +1 -0
+ ChangeLog@1.496.26.166 +1 -0
[Bug 1985] "logconfig =allall" rejected.
- include/ntp_syslog.h@1.5 +7 -5
+ include/ntp_syslog.h@1.3.1.2 +7 -5
convert spaces to tabs, change ntp_syslogmask type from u_long to u_int32.
- include/ntpd.h@1.143 +1 -2
+ include/ntpd.h@1.137.2.6 +1 -2
#include ntp.h before ntp_syslog.h
- libntp/machines.c@1.22 +1 -0
+ libntp/machines.c@1.21.1.1 +1 -0
#include ntp.h before ntp_syslog.h
- libntp/msyslog.c@1.29 +1 -1
+ libntp/msyslog.c@1.24.1.5 +1 -1
[Bug 1985] "logconfig =allall" rejected.
- ntpd/complete.conf@1.5 +1 -1
+ ntpd/complete.conf@1.3.1.2 +1 -1
[Bug 1985] "logconfig =allall" rejected.
- ntpd/ntp_config.c@1.250 +53 -40
+ ntpd/ntp_config.c@1.241.1.9 +53 -40
[Bug 1985] "logconfig =allall" rejected.
-ChangeSet@1.2319, 2011-08-08 18:13:07+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2628, 2011-08-08 20:03:45+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
+
+ ChangeLog@1.997 +1 -0
+ [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
+
+ sntp/m4/ntp_ipv6.m4@1.5 +7 -0
+ [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
+
+ChangeSet@1.2082.4.232, 2011-08-08 18:13:07+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
- ChangeLog@1.732 +1 -0
+ ChangeLog@1.496.26.165 +1 -0
[Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
- configure.ac@1.495 +7 -0
+ configure.ac@1.465.1.30 +7 -0
[Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
- sntp/configure.ac@1.41 +7 -0
+ sntp/configure.ac@1.31.1.10 +7 -0
[Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
-ChangeSet@1.2318, 2011-08-04 15:45:08-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2627, 2011-08-05 04:59:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P201
+ TAG: NTP_4_2_7P201
+
+ ChangeLog@1.996 +1 -0
+ NTP_4_2_7P201
+
+ ntpd/ntpd-opts.c@1.206 +3 -3
+ NTP_4_2_7P201
+
+ ntpd/ntpd-opts.h@1.206 +3 -3
+ NTP_4_2_7P201
+
+ ntpd/ntpd-opts.texi@1.204 +2 -2
+ NTP_4_2_7P201
+
+ ntpd/ntpd.1ntpdman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpd/ntpd.1ntpdmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpd/ntpd.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpd/ntpd.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc-opts.c@1.201 +3 -3
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc-opts.h@1.201 +3 -3
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc-opts.texi@1.201 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc.1ntpdcman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc.html@1.29 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpdc/ntpdc.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpq/ntpq-opts.c@1.203 +3 -3
+ NTP_4_2_7P201
+
+ ntpq/ntpq-opts.h@1.203 +3 -3
+ NTP_4_2_7P201
+
+ ntpq/ntpq-opts.texi@1.203 +2 -2
+ NTP_4_2_7P201
+
+ ntpq/ntpq.1ntpqman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpq/ntpq.1ntpqmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpq/ntpq.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpq/ntpq.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.203 +3 -3
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.203 +3 -3
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.203 +2 -2
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ packageinfo.sh@1.204 +1 -1
+ NTP_4_2_7P201
+
+ scripts/ntp-wait-opts.texi@1.21 +1 -1
+ NTP_4_2_7P201
+
+ scripts/ntp-wait.1ntp-waitman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ scripts/ntp-wait.html@1.21 +1 -1
+ NTP_4_2_7P201
+
+ scripts/ntp-wait.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ scripts/ntp-wait.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ sntp/sntp-opts.c@1.199 +3 -3
+ NTP_4_2_7P201
+
+ sntp/sntp-opts.h@1.199 +3 -3
+ NTP_4_2_7P201
+
+ sntp/sntp-opts.texi@1.199 +2 -2
+ NTP_4_2_7P201
+
+ sntp/sntp.1sntpman@1.19 +2 -2
+ NTP_4_2_7P201
+
+ sntp/sntp.1sntpmdoc@1.19 +3 -3
+ NTP_4_2_7P201
+
+ sntp/sntp.html@1.199 +51 -78
+ NTP_4_2_7P201
+
+ sntp/sntp.man.in@1.19 +2 -2
+ NTP_4_2_7P201
+
+ sntp/sntp.mdoc.in@1.19 +3 -3
+ NTP_4_2_7P201
+
+ util/ntp-keygen-opts.c@1.201 +3 -3
+ NTP_4_2_7P201
+
+ util/ntp-keygen-opts.h@1.201 +3 -3
+ NTP_4_2_7P201
+
+ util/ntp-keygen-opts.texi@1.204 +2 -2
+ NTP_4_2_7P201
+
+ util/ntp-keygen.1ntp-keygenman@1.17 +2 -2
+ NTP_4_2_7P201
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.17 +2 -2
+ NTP_4_2_7P201
+
+ util/ntp-keygen.man.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ util/ntp-keygen.mdoc.in@1.17 +2 -2
+ NTP_4_2_7P201
+
+ChangeSet@1.2626, 2011-08-04 19:41:51-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.995 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.6 +2 -2
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.72 +7 -7
+ Documentation updates from Dave Mills
+
+ html/clock.html@1.3 +5 -4
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.3 +5 -4
+ Documentation updates from Dave Mills
+
+ html/copyright.html@1.58 +8 -4
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.5 +6 -6
+ Documentation updates from Dave Mills
+
+ html/filter.html@1.3 +2 -2
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.67 +3 -1
+ Documentation updates from Dave Mills
+
+ html/orphan.html@1.3 +17 -11
+ Documentation updates from Dave Mills
+
+ html/poll.html@1.2 +2 -2
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.26 +18 -28
+ Documentation updates from Dave Mills
+
+ html/scripts/authopt.txt@1.5 +2 -0
+ Documentation updates from Dave Mills
+
+ html/scripts/miscopt.txt@1.8 +1 -0
+ Documentation updates from Dave Mills
+
+ html/select.html@1.3 +4 -3
+ Documentation updates from Dave Mills
+
+ html/sntp.html@1.8 +50 -26
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2625, 2011-08-04 18:51:13-04:00, stenn@psp-deb1.ntp.org
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp-opts.c@1.198 +26 -28
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp-opts.def@1.36 +1 -1
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp-opts.h@1.198 +9 -9
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp-opts.texi@1.198 +12 -14
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp.1sntpman@1.18 +4 -4
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp.1sntpmdoc@1.18 +4 -4
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp.html@1.198 +98 -73
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp.man.in@1.18 +4 -4
+ sntp autogen regenerate after merge cleanup
+
+ sntp/sntp.mdoc.in@1.18 +4 -4
+ sntp autogen regenerate after merge cleanup
+
+ChangeSet@1.2620.1.1, 2011-08-04 16:13:31-04:00, stenn@psp-deb1.ntp.org
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ ChangeLog@1.990.1.1 +2 -0
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/main.c@1.74 +6 -6
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp-opts.c@1.195.1.1 +20 -20
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp-opts.def@1.34 +3 -3
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp-opts.h@1.195.1.1 +8 -8
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp-opts.texi@1.195.1.1 +6 -6
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp.1sntpman@1.15.1.1 +4 -4
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp.1sntpmdoc@1.15.1.1 +5 -5
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp.html@1.195.1.1 +7 -7
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp.man.in@1.15.1.1 +4 -4
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ sntp/sntp.mdoc.in@1.15.1.1 +5 -5
+ sntp: change -h/--headspace to -g/--gap, and change the default gap from 10 to 50ms
+
+ChangeSet@1.2082.4.231, 2011-08-04 15:45:08-04:00, stenn@psp-deb1.ntp.org
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp-opts.c@1.154 +19 -19
+ sntp/sntp-opts.c@1.117.37.1 +19 -19
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp-opts.h@1.154 +7 -7
+ sntp/sntp-opts.h@1.117.37.1 +7 -7
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp-opts.texi@1.153 +30 -29
+ sntp/sntp-opts.texi@1.117.36.1 +30 -29
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp.1@1.153 +8 -8
+ sntp/sntp.1@1.117.36.1 +8 -8
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp.html@1.44 +96 -77
+ sntp/sntp.html@1.7.37.1 +96 -77
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
-ChangeSet@1.2317, 2011-08-04 15:39:31-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.230, 2011-08-04 15:39:31-04:00, stenn@psp-deb1.ntp.org
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- ChangeLog@1.731 +2 -0
+ ChangeLog@1.496.26.164 +2 -0
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/main.c@1.34 +2 -2
+ sntp/main.c@1.24.1.10 +2 -2
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
- sntp/sntp-opts.def@1.20 +9 -14
+ sntp/sntp-opts.def@1.19.1.1 +9 -14
[Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be consistent with ntpd
-ChangeSet@1.2316, 2011-08-04 15:17:36-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.229, 2011-08-04 15:17:36-04:00, stenn@psp-deb1.ntp.org
libopts/file.c fix from Bruce Korb (arg-type=file)
- ChangeLog@1.730 +4 -0
+ ChangeLog@1.496.26.163 +4 -0
libopts/file.c fix from Bruce Korb (arg-type=file)
sntp/libopts/file.c@1.8 +4 -2
libopts/file.c fix from Bruce Korb (arg-type=file)
-ChangeSet@1.2315, 2011-08-04 04:50:12+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2622, 2011-08-04 13:37:42-04:00, stenn@deacon.udel.edu
+ Update Changelog
+
+ ChangeLog@1.992 +1 -0
+ Update Changelog
+
+ChangeSet@1.2621, 2011-08-04 11:56:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P200
+ TAG: NTP_4_2_7P200
+
+ ChangeLog@1.991 +1 -0
+ NTP_4_2_7P200
+
+ ntpd/ntpd-opts.c@1.205 +3 -3
+ NTP_4_2_7P200
+
+ ntpd/ntpd-opts.h@1.205 +3 -3
+ NTP_4_2_7P200
+
+ ntpd/ntpd-opts.texi@1.203 +2 -2
+ NTP_4_2_7P200
+
+ ntpd/ntpd.1ntpdman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpd/ntpd.1ntpdmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpd/ntpd.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpd/ntpd.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc-opts.c@1.200 +3 -3
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc-opts.h@1.200 +3 -3
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc-opts.texi@1.200 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc.1ntpdcman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc.html@1.28 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpdc/ntpdc.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpq/ntpq-opts.c@1.202 +3 -3
+ NTP_4_2_7P200
+
+ ntpq/ntpq-opts.h@1.202 +3 -3
+ NTP_4_2_7P200
+
+ ntpq/ntpq-opts.texi@1.202 +2 -2
+ NTP_4_2_7P200
+
+ ntpq/ntpq.1ntpqman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpq/ntpq.1ntpqmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpq/ntpq.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpq/ntpq.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.202 +3 -3
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.202 +3 -3
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.202 +2 -2
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ packageinfo.sh@1.203 +1 -1
+ NTP_4_2_7P200
+
+ scripts/ntp-wait-opts.texi@1.20 +1 -1
+ NTP_4_2_7P200
+
+ scripts/ntp-wait.1ntp-waitman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ scripts/ntp-wait.html@1.20 +1 -1
+ NTP_4_2_7P200
+
+ scripts/ntp-wait.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ scripts/ntp-wait.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp-opts.c@1.196 +3 -3
+ NTP_4_2_7P200
+
+ sntp/sntp-opts.h@1.196 +3 -3
+ NTP_4_2_7P200
+
+ sntp/sntp-opts.texi@1.196 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp.1sntpman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp.1sntpmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp.html@1.196 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ sntp/sntp.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ util/ntp-keygen-opts.c@1.200 +3 -3
+ NTP_4_2_7P200
+
+ util/ntp-keygen-opts.h@1.200 +3 -3
+ NTP_4_2_7P200
+
+ util/ntp-keygen-opts.texi@1.203 +2 -2
+ NTP_4_2_7P200
+
+ util/ntp-keygen.1ntp-keygenman@1.16 +2 -2
+ NTP_4_2_7P200
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.16 +2 -2
+ NTP_4_2_7P200
+
+ util/ntp-keygen.man.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ util/ntp-keygen.mdoc.in@1.16 +2 -2
+ NTP_4_2_7P200
+
+ChangeSet@1.2082.4.228, 2011-08-04 04:50:12+00:00, stenn@deacon.udel.edu
NTP_4_2_6P4_RC2
TAG: NTP_4_2_6P4_RC2
- ChangeLog@1.729 +1 -0
+ ChangeLog@1.496.26.162 +1 -0
NTP_4_2_6P4_RC2
- ntpd/ntpd-opts.c@1.286 +3 -3
+ ntpd/ntpd-opts.c@1.248.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpd/ntpd-opts.h@1.286 +3 -3
+ ntpd/ntpd-opts.h@1.248.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpd/ntpd-opts.texi@1.283 +2 -2
+ ntpd/ntpd-opts.texi@1.246.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpd/ntpd.1@1.283 +2 -2
+ ntpd/ntpd.1@1.246.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpdc/ntpdc-opts.c@1.282 +3 -3
+ ntpdc/ntpdc-opts.c@1.244.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpdc/ntpdc-opts.h@1.282 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpdc/ntpdc-opts.texi@1.280 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpdc/ntpdc.1@1.280 +2 -2
+ ntpdc/ntpdc.1@1.243.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpq/ntpq-opts.c@1.283 +3 -3
+ ntpq/ntpq-opts.c@1.245.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpq/ntpq-opts.h@1.283 +3 -3
+ ntpq/ntpq-opts.h@1.245.38.1 +3 -3
NTP_4_2_6P4_RC2
- ntpq/ntpq-opts.texi@1.281 +2 -2
+ ntpq/ntpq-opts.texi@1.244.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpq/ntpq.1@1.281 +2 -2
+ ntpq/ntpq.1@1.244.37.1 +2 -2
NTP_4_2_6P4_RC2
- ntpsnmpd/ntpsnmpd-opts.c@1.162 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.39.1 +3 -3
NTP_4_2_6P4_RC2
- ntpsnmpd/ntpsnmpd-opts.h@1.162 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.39.1 +3 -3
NTP_4_2_6P4_RC2
- ntpsnmpd/ntpsnmpd-opts.texi@1.161 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.38.1 +2 -2
NTP_4_2_6P4_RC2
- ntpsnmpd/ntpsnmpd.1@1.160 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.38.1 +2 -2
NTP_4_2_6P4_RC2
- packageinfo.sh@1.298 +1 -1
+ packageinfo.sh@1.255.35.1 +1 -1
NTP_4_2_6P4_RC2
- sntp/sntp-opts.c@1.153 +3 -3
+ sntp/sntp-opts.c@1.117.36.1 +3 -3
NTP_4_2_6P4_RC2
- sntp/sntp-opts.h@1.153 +3 -3
+ sntp/sntp-opts.h@1.117.36.1 +3 -3
NTP_4_2_6P4_RC2
- sntp/sntp-opts.texi@1.152 +2 -2
+ sntp/sntp-opts.texi@1.117.35.1 +2 -2
NTP_4_2_6P4_RC2
- sntp/sntp.1@1.152 +2 -2
+ sntp/sntp.1@1.117.35.1 +2 -2
NTP_4_2_6P4_RC2
- sntp/sntp.html@1.43 +2 -2
+ sntp/sntp.html@1.7.36.1 +2 -2
NTP_4_2_6P4_RC2
- util/ntp-keygen-opts.c@1.285 +3 -3
+ util/ntp-keygen-opts.c@1.247.38.1 +3 -3
NTP_4_2_6P4_RC2
- util/ntp-keygen-opts.h@1.285 +3 -3
+ util/ntp-keygen-opts.h@1.247.38.1 +3 -3
NTP_4_2_6P4_RC2
- util/ntp-keygen-opts.texi@1.283 +2 -2
+ util/ntp-keygen-opts.texi@1.246.37.1 +2 -2
NTP_4_2_6P4_RC2
- util/ntp-keygen.1@1.283 +2 -2
+ util/ntp-keygen.1@1.246.37.1 +2 -2
NTP_4_2_6P4_RC2
-ChangeSet@1.2314, 2011-07-28 02:59:20-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2619, 2011-07-29 11:12:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P199
+ TAG: NTP_4_2_7P199
+
+ ChangeLog@1.989 +1 -0
+ NTP_4_2_7P199
+
+ ntpd/ntpd-opts.c@1.204 +3 -3
+ NTP_4_2_7P199
+
+ ntpd/ntpd-opts.h@1.204 +3 -3
+ NTP_4_2_7P199
+
+ ntpd/ntpd-opts.texi@1.202 +2 -2
+ NTP_4_2_7P199
+
+ ntpd/ntpd.1ntpdman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpd/ntpd.1ntpdmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpd/ntpd.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpd/ntpd.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc-opts.c@1.199 +3 -3
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc-opts.h@1.199 +3 -3
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc-opts.texi@1.199 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc.1ntpdcman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc.html@1.27 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpdc/ntpdc.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpq/ntpq-opts.c@1.201 +3 -3
+ NTP_4_2_7P199
+
+ ntpq/ntpq-opts.h@1.201 +3 -3
+ NTP_4_2_7P199
+
+ ntpq/ntpq-opts.texi@1.201 +2 -2
+ NTP_4_2_7P199
+
+ ntpq/ntpq.1ntpqman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpq/ntpq.1ntpqmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpq/ntpq.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpq/ntpq.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.201 +3 -3
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.201 +3 -3
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.201 +2 -2
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ packageinfo.sh@1.202 +1 -1
+ NTP_4_2_7P199
+
+ scripts/ntp-wait-opts.texi@1.19 +1 -1
+ NTP_4_2_7P199
+
+ scripts/ntp-wait.1ntp-waitman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ scripts/ntp-wait.html@1.19 +1 -1
+ NTP_4_2_7P199
+
+ scripts/ntp-wait.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ scripts/ntp-wait.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp-opts.c@1.195 +3 -3
+ NTP_4_2_7P199
+
+ sntp/sntp-opts.h@1.195 +3 -3
+ NTP_4_2_7P199
+
+ sntp/sntp-opts.texi@1.195 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp.1sntpman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp.1sntpmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp.html@1.195 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ sntp/sntp.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ util/ntp-keygen-opts.c@1.199 +3 -3
+ NTP_4_2_7P199
+
+ util/ntp-keygen-opts.h@1.199 +3 -3
+ NTP_4_2_7P199
+
+ util/ntp-keygen-opts.texi@1.202 +2 -2
+ NTP_4_2_7P199
+
+ util/ntp-keygen.1ntp-keygenman@1.15 +2 -2
+ NTP_4_2_7P199
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.15 +2 -2
+ NTP_4_2_7P199
+
+ util/ntp-keygen.man.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ util/ntp-keygen.mdoc.in@1.15 +2 -2
+ NTP_4_2_7P199
+
+ChangeSet@1.2618, 2011-07-29 04:19:55-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.988 +1 -0
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.56 +2 -2
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.16 +20 -12
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2617, 2011-07-28 08:48:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P198
+ TAG: NTP_4_2_7P198
+
+ ChangeLog@1.987 +1 -0
+ NTP_4_2_7P198
+
+ ntpd/ntpd-opts.c@1.203 +3 -3
+ NTP_4_2_7P198
+
+ ntpd/ntpd-opts.h@1.203 +3 -3
+ NTP_4_2_7P198
+
+ ntpd/ntpd-opts.texi@1.201 +2 -2
+ NTP_4_2_7P198
+
+ ntpd/ntpd.1ntpdman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpd/ntpd.1ntpdmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpd/ntpd.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpd/ntpd.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc-opts.c@1.198 +3 -3
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc-opts.h@1.198 +3 -3
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc-opts.texi@1.198 +2 -2
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc.1ntpdcman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc.html@1.26 +2 -2
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpdc/ntpdc.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpq/ntpq-opts.c@1.200 +3 -3
+ NTP_4_2_7P198
+
+ ntpq/ntpq-opts.h@1.200 +3 -3
+ NTP_4_2_7P198
+
+ ntpq/ntpq-opts.texi@1.200 +2 -2
+ NTP_4_2_7P198
+
+ ntpq/ntpq.1ntpqman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpq/ntpq.1ntpqmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpq/ntpq.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpq/ntpq.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.200 +3 -3
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.200 +3 -3
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.200 +2 -2
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ packageinfo.sh@1.201 +1 -1
+ NTP_4_2_7P198
+
+ scripts/ntp-wait-opts.texi@1.18 +1 -1
+ NTP_4_2_7P198
+
+ scripts/ntp-wait.1ntp-waitman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ scripts/ntp-wait.html@1.18 +1 -1
+ NTP_4_2_7P198
+
+ scripts/ntp-wait.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ scripts/ntp-wait.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ sntp/sntp-opts.c@1.194 +3 -3
+ NTP_4_2_7P198
+
+ sntp/sntp-opts.h@1.194 +3 -3
+ NTP_4_2_7P198
+
+ sntp/sntp-opts.texi@1.194 +2 -2
+ NTP_4_2_7P198
+
+ sntp/sntp.1sntpman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ sntp/sntp.1sntpmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ sntp/sntp.html@1.194 +2 -2
+ NTP_4_2_7P198
+
+ sntp/sntp.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ sntp/sntp.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ util/ntp-keygen-opts.c@1.198 +3 -3
+ NTP_4_2_7P198
+
+ util/ntp-keygen-opts.h@1.198 +3 -3
+ NTP_4_2_7P198
+
+ util/ntp-keygen-opts.texi@1.201 +2 -2
+ NTP_4_2_7P198
+
+ util/ntp-keygen.1ntp-keygenman@1.14 +2 -2
+ NTP_4_2_7P198
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.14 +1 -1
+ NTP_4_2_7P198
+
+ util/ntp-keygen.man.in@1.14 +2 -2
+ NTP_4_2_7P198
+
+ util/ntp-keygen.mdoc.in@1.14 +1 -1
+ NTP_4_2_7P198
+
+ChangeSet@1.2616, 2011-07-28 04:04:18-04:00, stenn@deacon.udel.edu
+ remove old binsubdir stuff from SNTP, as NTP_LOCINFO does that now.
+
+ ChangeLog@1.986 +1 -0
+ remove old binsubdir stuff from SNTP, as NTP_LOCINFO does that now.
+
+ sntp/configure.ac@1.66 +0 -100
+ remove old binsubdir stuff from SNTP, as NTP_LOCINFO does that now.
+
+ChangeSet@1.2615, 2011-07-28 07:03:09+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P197
+ TAG: NTP_4_2_7P197
+
+ ChangeLog@1.985 +1 -0
+ NTP_4_2_7P197
+
+ ntpd/ntpd-opts.c@1.202 +3 -3
+ NTP_4_2_7P197
+
+ ntpd/ntpd-opts.h@1.202 +3 -3
+ NTP_4_2_7P197
+
+ ntpd/ntpd-opts.texi@1.200 +2 -2
+ NTP_4_2_7P197
+
+ ntpd/ntpd.1ntpdman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpd/ntpd.1ntpdmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpd/ntpd.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpd/ntpd.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc-opts.c@1.197 +3 -3
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc-opts.h@1.197 +3 -3
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc-opts.texi@1.197 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc.1ntpdcman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc.html@1.25 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpdc/ntpdc.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpq/ntpq-opts.c@1.199 +3 -3
+ NTP_4_2_7P197
+
+ ntpq/ntpq-opts.h@1.199 +3 -3
+ NTP_4_2_7P197
+
+ ntpq/ntpq-opts.texi@1.199 +2 -2
+ NTP_4_2_7P197
+
+ ntpq/ntpq.1ntpqman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpq/ntpq.1ntpqmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpq/ntpq.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpq/ntpq.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.199 +3 -3
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.199 +3 -3
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.199 +2 -2
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ packageinfo.sh@1.200 +1 -1
+ NTP_4_2_7P197
+
+ scripts/ntp-wait-opts.texi@1.17 +1 -1
+ NTP_4_2_7P197
+
+ scripts/ntp-wait.1ntp-waitman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ scripts/ntp-wait.html@1.17 +1 -1
+ NTP_4_2_7P197
+
+ scripts/ntp-wait.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ scripts/ntp-wait.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp-opts.c@1.193 +3 -3
+ NTP_4_2_7P197
+
+ sntp/sntp-opts.h@1.193 +3 -3
+ NTP_4_2_7P197
+
+ sntp/sntp-opts.texi@1.193 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp.1sntpman@1.13 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp.1sntpmdoc@1.13 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp.html@1.193 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp.man.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ sntp/sntp.mdoc.in@1.13 +2 -2
+ NTP_4_2_7P197
+
+ util/ntp-keygen-opts.c@1.197 +3 -3
+ NTP_4_2_7P197
+
+ util/ntp-keygen-opts.h@1.197 +3 -3
+ NTP_4_2_7P197
+
+ util/ntp-keygen-opts.texi@1.200 +4 -4
+ NTP_4_2_7P197
+
+ util/ntp-keygen.1ntp-keygenman@1.13 +4 -4
+ NTP_4_2_7P197
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.13 +4 -4
+ NTP_4_2_7P197
+
+ util/ntp-keygen.man.in@1.13 +4 -4
+ NTP_4_2_7P197
+
+ util/ntp-keygen.mdoc.in@1.13 +4 -4
+ NTP_4_2_7P197
+
+ChangeSet@1.2082.4.227, 2011-07-28 02:59:20-04:00, stenn@deacon.udel.edu
Backport if_nametoindex() check for hpux
- ChangeLog@1.728 +1 -0
+ ChangeLog@1.496.26.161 +1 -0
Backport if_nametoindex() check for hpux
- configure.ac@1.494 +4 -10
+ configure.ac@1.465.1.29 +4 -10
Backport if_nametoindex() check for hpux
-ChangeSet@1.2313, 2011-07-27 22:22:03+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2612.1.9, 2011-07-28 02:25:31-04:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.984 +1 -1
+ cleanup
+
+ChangeSet@1.2612.1.8, 2011-07-27 22:10:08-07:00, harlan@hms-mbp.local
+ [Bug 1977] Mismatch between flag and description in ntp-keygen-opts.def
+
+ ChangeLog@1.983 +1 -0
+ [Bug 1977] Mismatch between flag and description in ntp-keygen-opts.def
+
+ util/ntp-keygen-opts.def@1.15 +2 -2
+ [Bug 1977] Mismatch between flag and description in ntp-keygen-opts.def
+
+ChangeSet@1.2612.1.7, 2011-07-27 19:45:16-04:00, stenn@deacon.udel.edu
+ Update sntp/loc/solaris to conform to stock locations
+
+ ChangeLog@1.982 +1 -0
+ Update sntp/loc/solaris to conform to stock locations
+
+ sntp/loc/solaris@1.3 +11 -11
+ Update sntp/loc/solaris to conform to stock locations
+
+ChangeSet@1.2612.1.6, 2011-07-27 22:42:23+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix warnings in ntp_request.c ([Bug 1973] oversight) and sntp/main.c
+ (CID 159, apparent overrun due to union, actually correct).
+
+ ChangeLog@1.981 +2 -0
+ Fix warnings in ntp_request.c ([Bug 1973] oversight) and sntp/main.c
+ (CID 159, apparent overrun due to union, actually correct).
+
+ ntpd/ntp_request.c@1.106 +1 -1
+ Fix warning in ntp_request.c ([Bug 1973] fix oversight, peer->ttl is now
+ 32 bits but mode 7 protocol still uses 8 bits, cast to avoid truncation
+ warning.
+
+ sntp/main.c@1.73 +1 -1
+ Fix CID 159, apparent overrun due to union, actually correct.
+
+ sntp/networking.c@1.60 +3 -3
+ Fix CID 159, apparent overrun due to union, actually correct.
+
+ sntp/networking.h@1.26 +1 -1
+ Fix CID 159, apparent overrun due to union, actually correct.
+
+ChangeSet@1.2082.4.226, 2011-07-27 22:22:03+00:00, davehart@shiny.ad.hartbrothers.com
Correct [Bug 1978] description in ChangeLog.
- ChangeLog@1.727 +1 -1
+ ChangeLog@1.496.26.160 +1 -1
[Bug 1978] [Bug 1134] fix in 4.2.6p4-RC1 doesn't build on older Linux.
-ChangeSet@1.2312, 2011-07-27 21:41:02+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.225, 2011-07-27 21:41:02+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1978] Ignore tentative IP addresses on Linux.
Backport several fixes for Coverity warnings from ntp-dev.
- ChangeLog@1.726 +2 -0
+ ChangeLog@1.496.26.159 +2 -0
[Bug 1978] Ignore tentative IP addresses on Linux.
Backport several fixes for Coverity warnings from ntp-dev.
- configure.ac@1.493 +9 -0
+ configure.ac@1.465.1.28 +9 -0
[Bug 1978] Ignore tentative IP addresses on Linux.
- include/ntp_rfc2553.h@1.34 +10 -2
+ include/ntp_rfc2553.h@1.33.1.1 +10 -2
Backport several fixes for Coverity warnings from ntp-dev.
- lib/isc/unix/interfaceiter.c@1.21 +5 -3
+ lib/isc/unix/interfaceiter.c@1.19.1.2 +5 -3
[Bug 1978] Ignore tentative IP addresses on Linux.
- libntp/audio.c@1.28 +29 -29
+ libntp/audio.c@1.27.1.1 +29 -29
Backport several fixes for Coverity warnings from ntp-dev.
- libntp/decodenetnum.c@1.11 +43 -10
+ libntp/decodenetnum.c@1.10.1.1 +43 -10
Backport several fixes for Coverity warnings from ntp-dev.
- libntp/icom.c@1.12 +34 -10
+ libntp/icom.c@1.11.1.1 +34 -10
Backport several fixes for Coverity warnings from ntp-dev.
- ntpd/refclock_arc.c@1.23 +37 -34
+ ntpd/refclock_arc.c@1.22.1.1 +37 -34
Backport several fixes for Coverity warnings from ntp-dev.
- ntpdc/ntpdc.c@1.80 +25 -17
+ ntpdc/ntpdc.c@1.75.1.5 +25 -17
Backport several fixes for Coverity warnings from ntp-dev.
- ntpq/ntpq.c@1.106 +25 -17
+ ntpq/ntpq.c@1.97.1.9 +25 -17
Backport several fixes for Coverity warnings from ntp-dev.
-ChangeSet@1.2311, 2011-07-26 11:21:46+02:00, karlsson@beam.lund.zozs.se
+ChangeSet@1.2612.1.3, 2011-07-27 16:38:38+00:00, davehart@shiny.ad.hartbrothers.com
+ Do not force "legacy" when --with-locfile is not given, genLocInfo
+ will find the correct default for the system.
+
+ ChangeLog@1.978 +2 -0
+ Do not force "legacy" when --with-locfile is not given, genLocInfo
+ will find the correct default for the system.
+
+ sntp/m4/ntp_locinfo.m4@1.14 +13 -4
+ Do not force "legacy" when --with-locfile is not given, genLocInfo
+ will find the correct default for the system.
+
+ChangeSet@1.2612.1.1, 2011-07-27 06:27:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
+
+ ChangeLog@1.976 +2 -1
+ [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
+
+ sntp/m4/ntp_locinfo.m4@1.13 +8 -6
+ [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
+
+ sntp/scripts/Makefile.am@1.3 +0 -3
+ Remove unneeded DISTCLEANFILES=config.log in sntp/scripts/Makefile.am.
+
+ sntp/scripts/genLocInfo@1.14.1.1 +17 -11
+ [Bug 1976] genLocInfo writes to srcdir break 'make distcheck'.
+
+ChangeSet@1.2613, 2011-07-26 22:44:46-04:00, stenn@deacon.udel.edu
+ cleanup
+
+ sntp/scripts/genLocInfo@1.15 +1 -1
+ cleanup
+
+ChangeSet@1.2612, 2011-07-27 02:25:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P196
+ TAG: NTP_4_2_7P196
+
+ ChangeLog@1.975 +1 -0
+ NTP_4_2_7P196
+
+ ntpd/ntpd-opts.c@1.201 +3 -3
+ NTP_4_2_7P196
+
+ ntpd/ntpd-opts.h@1.201 +3 -3
+ NTP_4_2_7P196
+
+ ntpd/ntpd-opts.texi@1.199 +2 -2
+ NTP_4_2_7P196
+
+ ntpd/ntpd.1ntpdman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpd/ntpd.1ntpdmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpd/ntpd.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpd/ntpd.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc-opts.c@1.196 +3 -3
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc-opts.h@1.196 +3 -3
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc-opts.texi@1.196 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc.1ntpdcman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc.html@1.24 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpdc/ntpdc.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpq/ntpq-opts.c@1.198 +3 -3
+ NTP_4_2_7P196
+
+ ntpq/ntpq-opts.h@1.198 +3 -3
+ NTP_4_2_7P196
+
+ ntpq/ntpq-opts.texi@1.198 +2 -2
+ NTP_4_2_7P196
+
+ ntpq/ntpq.1ntpqman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpq/ntpq.1ntpqmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpq/ntpq.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpq/ntpq.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.198 +3 -3
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.198 +3 -3
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.198 +2 -2
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ packageinfo.sh@1.199 +1 -1
+ NTP_4_2_7P196
+
+ scripts/ntp-wait-opts.texi@1.16 +1 -1
+ NTP_4_2_7P196
+
+ scripts/ntp-wait.1ntp-waitman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ scripts/ntp-wait.html@1.16 +1 -1
+ NTP_4_2_7P196
+
+ scripts/ntp-wait.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ scripts/ntp-wait.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp-opts.c@1.192 +3 -3
+ NTP_4_2_7P196
+
+ sntp/sntp-opts.h@1.192 +3 -3
+ NTP_4_2_7P196
+
+ sntp/sntp-opts.texi@1.192 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp.1sntpman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp.1sntpmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp.html@1.192 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ sntp/sntp.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ util/ntp-keygen-opts.c@1.196 +3 -3
+ NTP_4_2_7P196
+
+ util/ntp-keygen-opts.h@1.196 +3 -3
+ NTP_4_2_7P196
+
+ util/ntp-keygen-opts.texi@1.199 +2 -2
+ NTP_4_2_7P196
+
+ util/ntp-keygen.1ntp-keygenman@1.12 +2 -2
+ NTP_4_2_7P196
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.12 +2 -2
+ NTP_4_2_7P196
+
+ util/ntp-keygen.man.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ util/ntp-keygen.mdoc.in@1.12 +2 -2
+ NTP_4_2_7P196
+
+ChangeSet@1.2611, 2011-07-26 21:55:09-04:00, stenn@deacon.udel.edu
+ use --with-loc=legacy in br-flock
+
+ br-flock@1.16 +1 -1
+ use --with-loc=legacy in br-flock
+
+ChangeSet@1.2610, 2011-07-26 21:51:16-04:00, stenn@deacon.udel.edu
+ cleanup
+
+ ChangeLog@1.974 +1 -1
+ cleanup
+
+ChangeSet@1.2609, 2011-07-26 21:38:54-04:00, stenn@pogo.udel.edu
+ work around solaris /bin/sh issues for genLocInfo.
+
+ ChangeLog@1.973 +1 -0
+ work around solaris /bin/sh issues for genLocInfo.
+
+ sntp/scripts/genLocInfo@1.14 +23 -12
+ work around solaris /bin/sh issues for genLocInfo.
+
+ChangeSet@1.2608, 2011-07-26 14:26:17-04:00, stenn@psp-deb1.ntp.org
+ Be louder about loc/ changes
+
+ ChangeLog@1.972 +2 -0
+ Be louder about loc/ changes
+
+ChangeSet@1.2607, 2011-07-26 14:23:35-04:00, stenn@psp-deb1.ntp.org
+ Improve the help text: --with-locfile=XXX
+
+ ChangeLog@1.971 +1 -0
+ Improve the help text: --with-locfile=XXX
+
+ sntp/m4/ntp_locinfo.m4@1.12 +1 -1
+ Improve the help text: --with-locfile=XXX
+
+ChangeSet@1.2606, 2011-07-26 14:10:34-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo cleanup
+
+ ChangeLog@1.970 +10 -0
+ genLocInfo cleanup
+
+ Makefile.am@1.113 +0 -1
+ genLocInfo cleanup
+
+ build@1.46 +4 -4
+ genLocInfo cleanup
+
+ configure.ac@1.533 +1 -20
+ genLocInfo cleanup
+
+ ntpd/Makefile.am@1.110 +4 -4
+ genLocInfo cleanup
+
+ ntpdc/Makefile.am@1.66 +4 -4
+ genLocInfo cleanup
+
+ ntpq/Makefile.am@1.62 +4 -4
+ genLocInfo cleanup
+
+ ntpsnmpd/Makefile.am@1.33 +4 -4
+ genLocInfo cleanup
+
+ scripts/Makefile.am@1.29 +4 -6
+ genLocInfo cleanup
+
+ sntp/Makefile.am@1.66 +7 -6
+ genLocInfo cleanup
+
+ sntp/configure.ac@1.65 +2 -2
+ genLocInfo cleanup
+
+ sntp/include/Makefile.am@1.4 +0 -1
+ genLocInfo cleanup
+
+ sntp/loc/README@1.1 +9 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/loc/README
+
+ sntp/loc/README@1.0 +0 -0
+
+ sntp/loc/freebsd@1.4 +0 -0
+ Rename: loc/freebsd -> sntp/loc/freebsd
+
+ sntp/loc/legacy@1.4 +0 -0
+ Rename: loc/legacy -> sntp/loc/legacy
+
+ sntp/loc/redhat@1.2 +0 -0
+ Rename: loc/redhat -> sntp/loc/redhat
+
+ sntp/loc/solaris@1.2 +0 -0
+ Rename: loc/solaris -> sntp/loc/solaris
+
+ sntp/m4/ntp_locinfo.m4@1.11 +59 -58
+ genLocInfo cleanup
+
+ sntp/scripts/Makefile.am@1.2 +1 -0
+ genLocInfo cleanup
+
+ sntp/scripts/Makefile.am@1.1 +9 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/scripts/Makefile.am
+
+ sntp/scripts/Makefile.am@1.0 +0 -0
+
+ sntp/scripts/cvo.sh@1.7 +0 -0
+ Rename: scripts/cvo.sh -> sntp/scripts/cvo.sh
+
+ sntp/scripts/genLocInfo@1.13 +37 -3
+ genLocInfo cleanup
+
+ sntp/scripts/genLocInfo@1.12 +0 -0
+ Rename: scripts/genLocInfo -> sntp/scripts/genLocInfo
+
+ sntp/scripts/mansec2subst.sed@1.2 +0 -0
+ Rename: sntp/include/mansec2subst.sed -> sntp/scripts/mansec2subst.sed
+
+ util/Makefile.am@1.65 +4 -4
+ genLocInfo cleanup
+
+ChangeSet@1.2082.4.224, 2011-07-26 11:21:46+02:00, karlsson@beam.lund.zozs.se
[Bug 1975] libntp/mktime.c won't work with 64-bit time_t
- ChangeLog@1.725 +1 -0
+ ChangeLog@1.496.26.158 +1 -0
[Bug 1975] libntp/mktime.c won't work with 64-bit time_t
- libntp/mktime.c@1.10 +4 -0
+ libntp/mktime.c@1.8.1.2 +4 -0
[Bug 1975] libntp/mktime.c won't work with 64-bit time_t
-ChangeSet@1.2310, 2011-07-25 14:10:27+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2605, 2011-07-26 01:57:56-04:00, stenn@psp-deb1.ntp.org
+ Removed sntp/m4/ntp_bindir.m4 - no longer needed
+
+ BitKeeper/deleted/a9/ntp_bindir.m4~14281a43d40ac9cd@1.2 +0 -0
+ Delete: sntp/m4/ntp_bindir.m4
+
+ ChangeLog@1.969 +1 -0
+ Removed sntp/m4/ntp_bindir.m4 - no longer needed
+
+ChangeSet@1.2604, 2011-07-26 01:59:51+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix build on Linux systems lacking linux/if_addr.h or IFA_F_TENTATIVE.
+
+ lib/isc/unix/interfaceiter.c@1.22 +3 -1
+ Fix build on Linux systems lacking linux/if_addr.h or IFA_F_TENTATIVE.
+
+ sntp/m4/ntp_libntp.m4@1.16 +9 -0
+ Fix build on Linux systems lacking linux/if_addr.h or IFA_F_TENTATIVE.
+
+ChangeSet@1.2603, 2011-07-26 00:18:29+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ ChangeLog@1.968 +1 -0
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ include/ntp.h@1.196 +1 -1
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ include/ntp_config.h@1.74 +2 -1
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ include/ntpd.h@1.165 +3 -3
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ libntp/tsftomsu.c@1.4 +10 -7
+ Eliminate warning: "round" shadows global (use "round_it").
+
+ ntpd/complete.conf@1.17 +1 -1
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ ntpd/keyword-gen-utd@1.14 +1 -1
+ keyword-gen output
+
+ ntpd/ntp_config.c@1.292 +18 -6
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ ntpd/ntp_keyword.h@1.16 +62 -61
+ keyword-gen output
+
+ ntpd/ntp_parser.c@1.76 +747 -744
+ Bison output
+
+ ntpd/ntp_parser.h@1.43 +44 -41
+ Bison output
+
+ ntpd/ntp_parser.y@1.70 +7 -3
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ ntpd/ntp_peer.c@1.148 +6 -6
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ ntpd/ntp_scanner.c@1.43 +103 -26
+ [Bug 1973] Widen reference clock mode from 8 to 32 bits.
+
+ sntp/main.c@1.72 +1 -1
+ Quiet incompatible type to recvdata() warning.
+
+ChangeSet@1.2082.4.223, 2011-07-25 14:10:27+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1972] checking for struct rtattr fails.
- ChangeLog@1.724 +1 -0
+ ChangeLog@1.496.26.157 +1 -0
[Bug 1972] checking for struct rtattr fails.
- configure.ac@1.492 +6 -5
+ configure.ac@1.465.1.27 +6 -5
[Bug 1972] checking for struct rtattr fails.
-ChangeSet@1.2309, 2011-07-25 00:09:06-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2601, 2011-07-25 08:10:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P195
+ TAG: NTP_4_2_7P195
+
+ ChangeLog@1.966 +1 -0
+ NTP_4_2_7P195
+
+ ntpd/ntpd-opts.c@1.200 +3 -3
+ NTP_4_2_7P195
+
+ ntpd/ntpd-opts.h@1.200 +3 -3
+ NTP_4_2_7P195
+
+ ntpd/ntpd-opts.texi@1.198 +2 -2
+ NTP_4_2_7P195
+
+ ntpd/ntpd.1ntpdman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpd/ntpd.1ntpdmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpd/ntpd.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpd/ntpd.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc-opts.c@1.195 +3 -3
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc-opts.h@1.195 +3 -3
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc-opts.texi@1.195 +2 -2
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc.1ntpdcman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc.html@1.23 +2 -2
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpdc/ntpdc.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpq/ntpq-opts.c@1.197 +3 -3
+ NTP_4_2_7P195
+
+ ntpq/ntpq-opts.h@1.197 +3 -3
+ NTP_4_2_7P195
+
+ ntpq/ntpq-opts.texi@1.197 +2 -2
+ NTP_4_2_7P195
+
+ ntpq/ntpq.1ntpqman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpq/ntpq.1ntpqmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpq/ntpq.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpq/ntpq.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.197 +3 -3
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.197 +3 -3
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.197 +2 -2
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ packageinfo.sh@1.198 +1 -1
+ NTP_4_2_7P195
+
+ scripts/ntp-wait-opts.texi@1.15 +1 -1
+ NTP_4_2_7P195
+
+ scripts/ntp-wait.1ntp-waitman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ scripts/ntp-wait.html@1.15 +1 -1
+ NTP_4_2_7P195
+
+ scripts/ntp-wait.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ scripts/ntp-wait.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ sntp/sntp-opts.c@1.191 +3 -3
+ NTP_4_2_7P195
+
+ sntp/sntp-opts.h@1.191 +3 -3
+ NTP_4_2_7P195
+
+ sntp/sntp-opts.texi@1.191 +2 -2
+ NTP_4_2_7P195
+
+ sntp/sntp.1sntpman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ sntp/sntp.1sntpmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ sntp/sntp.html@1.191 +2 -2
+ NTP_4_2_7P195
+
+ sntp/sntp.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ sntp/sntp.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ util/ntp-keygen-opts.c@1.195 +3 -3
+ NTP_4_2_7P195
+
+ util/ntp-keygen-opts.h@1.195 +3 -3
+ NTP_4_2_7P195
+
+ util/ntp-keygen-opts.texi@1.198 +2 -2
+ NTP_4_2_7P195
+
+ util/ntp-keygen.1ntp-keygenman@1.11 +2 -2
+ NTP_4_2_7P195
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.11 +1 -1
+ NTP_4_2_7P195
+
+ util/ntp-keygen.man.in@1.11 +2 -2
+ NTP_4_2_7P195
+
+ util/ntp-keygen.mdoc.in@1.11 +1 -1
+ NTP_4_2_7P195
+
+ChangeSet@1.2598.1.10, 2011-07-25 07:02:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P194
+ TAG: NTP_4_2_7P194
+
+ ChangeLog@1.963.1.8 +1 -0
+ NTP_4_2_7P194
+
+ ntpd/ntpd-opts.c@1.199 +3 -3
+ NTP_4_2_7P194
+
+ ntpd/ntpd-opts.h@1.199 +3 -3
+ NTP_4_2_7P194
+
+ ntpd/ntpd-opts.texi@1.197 +2 -2
+ NTP_4_2_7P194
+
+ ntpd/ntpd.1ntpdman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpd/ntpd.1ntpdmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpd/ntpd.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpd/ntpd.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc-opts.c@1.194 +3 -3
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc-opts.h@1.194 +3 -3
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc-opts.texi@1.194 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc.1ntpdcman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc.html@1.22 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpdc/ntpdc.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpq/ntpq-opts.c@1.196 +3 -3
+ NTP_4_2_7P194
+
+ ntpq/ntpq-opts.h@1.196 +3 -3
+ NTP_4_2_7P194
+
+ ntpq/ntpq-opts.texi@1.196 +2 -2
+ NTP_4_2_7P194
+
+ ntpq/ntpq.1ntpqman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpq/ntpq.1ntpqmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpq/ntpq.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpq/ntpq.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.196 +3 -3
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.196 +3 -3
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.196 +2 -2
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ packageinfo.sh@1.197 +1 -1
+ NTP_4_2_7P194
+
+ scripts/ntp-wait-opts.texi@1.14 +1 -1
+ NTP_4_2_7P194
+
+ scripts/ntp-wait.1ntp-waitman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ scripts/ntp-wait.html@1.14 +1 -1
+ NTP_4_2_7P194
+
+ scripts/ntp-wait.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ scripts/ntp-wait.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp-opts.c@1.190 +3 -3
+ NTP_4_2_7P194
+
+ sntp/sntp-opts.h@1.190 +3 -3
+ NTP_4_2_7P194
+
+ sntp/sntp-opts.texi@1.190 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp.1sntpman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp.1sntpmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp.html@1.190 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ sntp/sntp.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ util/ntp-keygen-opts.c@1.194 +3 -3
+ NTP_4_2_7P194
+
+ util/ntp-keygen-opts.h@1.194 +3 -3
+ NTP_4_2_7P194
+
+ util/ntp-keygen-opts.texi@1.197 +2 -2
+ NTP_4_2_7P194
+
+ util/ntp-keygen.1ntp-keygenman@1.10 +2 -2
+ NTP_4_2_7P194
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.10 +2 -2
+ NTP_4_2_7P194
+
+ util/ntp-keygen.man.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ util/ntp-keygen.mdoc.in@1.10 +2 -2
+ NTP_4_2_7P194
+
+ChangeSet@1.2598.1.9, 2011-07-25 02:23:52-04:00, stenn@deacon.udel.edu
+ Added loc/solaris
+
+ ChangeLog@1.963.1.7 +1 -0
+ Added loc/solaris
+
+ loc/solaris@1.1 +14 -0
+ BitKeeper file /deacon/backroom/ntp-dev/loc/solaris
+
+ loc/solaris@1.0 +0 -0
+
+ChangeSet@1.2598.1.8, 2011-07-25 02:21:49-04:00, stenn@deacon.udel.edu
+ Add support for installing programs and scripts to libexec
+
+ ChangeLog@1.963.1.6 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ adjtimed/Makefile.am@1.14 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ configure.ac@1.531 +11 -0
+ Add support for installing programs and scripts to libexec
+
+ ntpd/Makefile.am@1.109 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ ntpdate/Makefile.am@1.32 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ ntpdc/Makefile.am@1.65 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ ntpq/Makefile.am@1.61 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ ntpsnmpd/Makefile.am@1.32 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ scripts/Makefile.am@1.28 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ scripts/genLocInfo@1.11 +13 -3
+ Add support for installing programs and scripts to libexec
+
+ sntp/Makefile.am@1.65 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ sntp/configure.ac@1.64 +11 -2
+ Add support for installing programs and scripts to libexec
+
+ sntp/m4/ntp_locinfo.m4@1.10 +14 -1
+ Add support for installing programs and scripts to libexec
+
+ util/Makefile.am@1.64 +1 -0
+ Add support for installing programs and scripts to libexec
+
+ChangeSet@1.2082.4.222, 2011-07-25 00:09:06-04:00, stenn@deacon.udel.edu
[Bug 1608] Parse Refclock driver should honor trusttime
- ChangeLog@1.723 +2 -1
+ ChangeLog@1.496.26.156 +2 -1
[Bug 1608] Parse Refclock driver should honor trusttime
- html/drivers/driver8.html@1.26 +9 -0
+ html/drivers/driver8.html@1.25.1.1 +9 -0
[Bug 1608] Parse Refclock driver should honor trusttime
- ntpd/refclock_parse.c@1.54 +62 -13
+ ntpd/refclock_parse.c@1.52.1.2 +62 -13
[Bug 1608] Parse Refclock driver should honor trusttime
-ChangeSet@1.2308, 2011-07-20 19:37:50+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2598.1.6, 2011-07-24 12:28:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P193
+ TAG: NTP_4_2_7P193
+
+ ChangeLog@1.963.1.4 +1 -0
+ NTP_4_2_7P193
+
+ ntpd/ntpd-opts.c@1.198 +3 -3
+ NTP_4_2_7P193
+
+ ntpd/ntpd-opts.h@1.198 +3 -3
+ NTP_4_2_7P193
+
+ ntpd/ntpd-opts.texi@1.196 +2 -2
+ NTP_4_2_7P193
+
+ ntpd/ntpd.1ntpdman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpd/ntpd.1ntpdmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpd/ntpd.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpd/ntpd.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc-opts.c@1.193 +3 -3
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc-opts.h@1.193 +3 -3
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc-opts.texi@1.193 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc.1ntpdcman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc.html@1.21 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpdc/ntpdc.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpq/ntpq-opts.c@1.195 +3 -3
+ NTP_4_2_7P193
+
+ ntpq/ntpq-opts.h@1.195 +3 -3
+ NTP_4_2_7P193
+
+ ntpq/ntpq-opts.texi@1.195 +2 -2
+ NTP_4_2_7P193
+
+ ntpq/ntpq.1ntpqman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpq/ntpq.1ntpqmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpq/ntpq.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpq/ntpq.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.195 +3 -3
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.195 +3 -3
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.195 +2 -2
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ packageinfo.sh@1.196 +1 -1
+ NTP_4_2_7P193
+
+ scripts/ntp-wait-opts.texi@1.13 +1 -1
+ NTP_4_2_7P193
+
+ scripts/ntp-wait.1ntp-waitman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ scripts/ntp-wait.html@1.13 +1 -1
+ NTP_4_2_7P193
+
+ scripts/ntp-wait.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ scripts/ntp-wait.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp-opts.c@1.189 +3 -3
+ NTP_4_2_7P193
+
+ sntp/sntp-opts.h@1.189 +3 -3
+ NTP_4_2_7P193
+
+ sntp/sntp-opts.texi@1.189 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp.1sntpman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp.1sntpmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp.html@1.189 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ sntp/sntp.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ util/ntp-keygen-opts.c@1.193 +3 -3
+ NTP_4_2_7P193
+
+ util/ntp-keygen-opts.h@1.193 +3 -3
+ NTP_4_2_7P193
+
+ util/ntp-keygen-opts.texi@1.196 +2 -2
+ NTP_4_2_7P193
+
+ util/ntp-keygen.1ntp-keygenman@1.9 +2 -2
+ NTP_4_2_7P193
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.9 +2 -2
+ NTP_4_2_7P193
+
+ util/ntp-keygen.man.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ util/ntp-keygen.mdoc.in@1.9 +2 -2
+ NTP_4_2_7P193
+
+ChangeSet@1.2598.1.5, 2011-07-24 01:41:56+00:00, davehart@shiny.ad.hartbrothers.com
+ Update libevent to 2.1 HEAD as of merge of 2.0.13-stable-dev.
+ (applies to prior cset)
+ Match addr_eqprefix() sizeof and memcpy destination to make it clear
+ to static analysis that there is no buffer overrun (CID 402).
+
+ ChangeLog@1.963.1.3 +3 -0
+ Update libevent to 2.1 HEAD as of merge of 2.0.13-stable-dev.
+ Match addr_eqprefix() sizeof and memcpy destination to make it clear
+ to static analysis that there is no buffer overrun (CID 402).
+
+
+ ntpd/ntp_io.c@1.358 +2 -4
+ Match addr_eqprefix() sizeof and memcpy destination to make it clear
+ to static analysis that there is no buffer overrun (CID 402).
+
+ChangeSet@1.2461.1.7, 2011-07-24 00:59:52+00:00, davehart@shiny.ad.hartbrothers.com
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/ChangeLog@1.4 +28 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/Doxyfile@1.2 +31 -18
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/Makefile.am@1.1.1.4 +3 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/README@1.4 +2 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/buffer.c@1.5 +50 -19
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/buffer_iocp.c@1.3 +2 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/bufferevent_openssl.c@1.4 +2 -2
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/bufferevent_pair.c@1.4 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evdns.h@1.2 +10 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/event-internal.h@1.1.1.3 +3 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/event.c@1.1.1.4 +25 -7
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/event.h@1.3 +6 -127
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evhttp.h@1.2 +10 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evmap.c@1.4 +6 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evrpc.h@1.2 +10 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evthread-internal.h@1.4 +18 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evthread.c@1.1.1.3 +90 -2
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evutil.c@1.1.1.3 +3 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evutil.h@1.2 +8 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/evutil_rand.c@1.3 +16 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/ht-internal.h@1.2 +1 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/http.c@1.1.1.4 +21 -13
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/buffer.h@1.3 +153 -68
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/buffer_compat.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/bufferevent.h@1.2 +99 -37
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/bufferevent_compat.h@1.2 +4 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/bufferevent_ssl.h@1.2 +31 -2
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/bufferevent_struct.h@1.2 +4 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/dns.h@1.3 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/dns_compat.h@1.3 +2 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/dns_struct.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/event.h@1.1.1.3 +553 -151
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/event_compat.h@1.2 +48 -152
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/event_struct.h@1.2 +5 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/http.h@1.3 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/http_compat.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/http_struct.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/rpc_compat.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/rpc_struct.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/tag.h@1.2 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/tag_compat.h@1.2 +11 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/thread.h@1.3 +36 -25
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/include/event2/util.h@1.3 +131 -33
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/kqueue.c@1.4 +46 -19
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/sample/Makefile.am@1.1.1.3 +1 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/select.c@1.1.1.3 +19 -9
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/signal.c@1.4 +9 -5
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/Makefile.am@1.1.1.3 +7 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/Makefile.nmake@1.3 +5 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/regress_buffer.c@1.4 +103 -1
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/regress_rpc.c@1.3 +9 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/regress_util.c@1.3 +18 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/test.sh@1.1.1.2 +18 -40
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/test/tinytest.c@1.3 +8 -3
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ sntp/libevent/util-internal.h@1.1.1.3 +37 -0
+ Update to libevent HEAD as of 20110723, 77a4d7f406be9d78876ba8a1b7c7d834d8998479
+ Snapshot of libevent 2.1, as of 2.0.13-stable-dev release.
+
+ChangeSet@1.2598.1.3, 2011-07-20 20:12:25+00:00, davehart@shiny.ad.hartbrothers.com
+ slight ChangeLog cleanup (wrap after 72 chars, s/4.2.6p4/4.2.6p4-RC2/)
+
+ ChangeLog@1.963.1.2 +2 -1
+ slight ChangeLog cleanup (wrap after 72 chars, s/4.2.6p4/4.2.6p4-RC2/)
+
+ChangeSet@1.2082.4.221, 2011-07-20 19:37:50+00:00, davehart@shiny.ad.hartbrothers.com
Backport latest ntp_lists.h from ntp-dev, remove redundant () in
UNLINK_EXPR_SLIST().
- include/ntp_lists.h@1.4 +213 -28
+ include/ntp_lists.h@1.1.1.3 +213 -28
Backport latest ntp_lists.h from ntp-dev, remove redundant () in
UNLINK_EXPR_SLIST().
-ChangeSet@1.2307, 2011-07-20 13:06:51+02:00, karlsson@beam.lund.zozs.se
+ChangeSet@1.2082.4.220, 2011-07-20 13:06:51+02:00, karlsson@beam.lund.zozs.se
[BUG 1970] UNLINK_EXPR_SLIST() causes crash if list is empty.
- ChangeLog@1.722 +1 -0
+ ChangeLog@1.496.26.155 +1 -0
[BUG 1970] UNLINK_EXPR_SLIST() causes crash if list is empty.
- include/ntp_lists.h@1.3 +4 -3
+ include/ntp_lists.h@1.1.1.2 +4 -3
[BUG 1970] UNLINK_EXPR_SLIST() causes crash if list is empty.
-ChangeSet@1.2306, 2011-07-12 21:46:20-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2599, 2011-07-19 06:55:38-04:00, stenn@psp-deb1.ntp.org
+ Added loc/redhat
+
+ ChangeLog@1.964 +1 -0
+ Added loc/redhat
+
+ loc/redhat@1.1 +15 -0
+ BitKeeper file /home/stenn/ntp-dev/loc/redhat
+
+ loc/redhat@1.0 +0 -0
+
+ChangeSet@1.2598, 2011-07-18 11:53:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P192
+ TAG: NTP_4_2_7P192
+
+ ChangeLog@1.963 +1 -0
+ NTP_4_2_7P192
+
+ ntpd/ntpd-opts.c@1.197 +3 -3
+ NTP_4_2_7P192
+
+ ntpd/ntpd-opts.h@1.197 +3 -3
+ NTP_4_2_7P192
+
+ ntpd/ntpd-opts.texi@1.195 +2 -2
+ NTP_4_2_7P192
+
+ ntpd/ntpd.1ntpdman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpd/ntpd.1ntpdmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpd/ntpd.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpd/ntpd.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc-opts.c@1.192 +3 -3
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc-opts.h@1.192 +3 -3
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc-opts.texi@1.192 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc.1ntpdcman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc.html@1.20 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpdc/ntpdc.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpq/ntpq-opts.c@1.194 +3 -3
+ NTP_4_2_7P192
+
+ ntpq/ntpq-opts.h@1.194 +3 -3
+ NTP_4_2_7P192
+
+ ntpq/ntpq-opts.texi@1.194 +2 -2
+ NTP_4_2_7P192
+
+ ntpq/ntpq.1ntpqman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpq/ntpq.1ntpqmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpq/ntpq.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpq/ntpq.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.194 +3 -3
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.194 +3 -3
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.194 +2 -2
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ packageinfo.sh@1.195 +1 -1
+ NTP_4_2_7P192
+
+ scripts/ntp-wait-opts.texi@1.12 +1 -1
+ NTP_4_2_7P192
+
+ scripts/ntp-wait.1ntp-waitman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ scripts/ntp-wait.html@1.12 +1 -1
+ NTP_4_2_7P192
+
+ scripts/ntp-wait.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ scripts/ntp-wait.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp-opts.c@1.188 +3 -3
+ NTP_4_2_7P192
+
+ sntp/sntp-opts.h@1.188 +3 -3
+ NTP_4_2_7P192
+
+ sntp/sntp-opts.texi@1.188 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp.1sntpman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp.1sntpmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp.html@1.188 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ sntp/sntp.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ util/ntp-keygen-opts.c@1.192 +3 -3
+ NTP_4_2_7P192
+
+ util/ntp-keygen-opts.h@1.192 +3 -3
+ NTP_4_2_7P192
+
+ util/ntp-keygen-opts.texi@1.195 +2 -2
+ NTP_4_2_7P192
+
+ util/ntp-keygen.1ntp-keygenman@1.8 +2 -2
+ NTP_4_2_7P192
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.8 +2 -2
+ NTP_4_2_7P192
+
+ util/ntp-keygen.man.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ util/ntp-keygen.mdoc.in@1.8 +2 -2
+ NTP_4_2_7P192
+
+ChangeSet@1.2597, 2011-07-17 19:09:30-04:00, stenn@deacon.udel.edu
+ [Bug 1966] Broken FILES section for ntp.keys.def
+
+ ChangeLog@1.962 +1 -0
+ [Bug 1966] Broken FILES section for ntp.keys.def
+
+ ntpd/ntp.keys.def@1.2 +4 -0
+ [Bug 1966] Broken FILES section for ntp.keys.def
+
+ChangeSet@1.2596, 2011-07-17 06:51:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P191
+ TAG: NTP_4_2_7P191
+
+ ChangeLog@1.961 +1 -0
+ NTP_4_2_7P191
+
+ ntpd/ntpd-opts.c@1.196 +3 -3
+ NTP_4_2_7P191
+
+ ntpd/ntpd-opts.h@1.196 +3 -3
+ NTP_4_2_7P191
+
+ ntpd/ntpd-opts.texi@1.194 +2 -2
+ NTP_4_2_7P191
+
+ ntpd/ntpd.1ntpdman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpd/ntpd.1ntpdmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpd/ntpd.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpd/ntpd.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc-opts.c@1.191 +3 -3
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc-opts.h@1.191 +3 -3
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc-opts.texi@1.191 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc.1ntpdcman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc.html@1.19 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpdc/ntpdc.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpq/ntpq-opts.c@1.193 +3 -3
+ NTP_4_2_7P191
+
+ ntpq/ntpq-opts.h@1.193 +3 -3
+ NTP_4_2_7P191
+
+ ntpq/ntpq-opts.texi@1.193 +2 -2
+ NTP_4_2_7P191
+
+ ntpq/ntpq.1ntpqman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpq/ntpq.1ntpqmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpq/ntpq.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpq/ntpq.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.193 +3 -3
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.193 +3 -3
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.193 +2 -2
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ packageinfo.sh@1.194 +1 -1
+ NTP_4_2_7P191
+
+ scripts/ntp-wait-opts.texi@1.11 +1 -1
+ NTP_4_2_7P191
+
+ scripts/ntp-wait.1ntp-waitman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ scripts/ntp-wait.html@1.11 +1 -1
+ NTP_4_2_7P191
+
+ scripts/ntp-wait.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ scripts/ntp-wait.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp-opts.c@1.187 +3 -3
+ NTP_4_2_7P191
+
+ sntp/sntp-opts.h@1.187 +3 -3
+ NTP_4_2_7P191
+
+ sntp/sntp-opts.texi@1.187 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp.1sntpman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp.1sntpmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp.html@1.187 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ sntp/sntp.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ util/ntp-keygen-opts.c@1.191 +3 -3
+ NTP_4_2_7P191
+
+ util/ntp-keygen-opts.h@1.191 +3 -3
+ NTP_4_2_7P191
+
+ util/ntp-keygen-opts.texi@1.194 +2 -2
+ NTP_4_2_7P191
+
+ util/ntp-keygen.1ntp-keygenman@1.7 +2 -2
+ NTP_4_2_7P191
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.7 +2 -2
+ NTP_4_2_7P191
+
+ util/ntp-keygen.man.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ util/ntp-keygen.mdoc.in@1.7 +2 -2
+ NTP_4_2_7P191
+
+ChangeSet@1.2593.1.2, 2011-07-16 18:00:11-04:00, stenn@deacon.udel.edu
+ [Bug 1948] Update man page section layout
+
+ ChangeLog@1.958.1.2 +1 -0
+ [Bug 1948] Update man page section layout
+
+ scripts/html2man.in@1.7 +12 -12
+ [Bug 1948] Update man page section layout
+
+ChangeSet@1.2593.1.1, 2011-07-16 17:07:59-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1964] --without-sntp should not build sntp
+
+ ChangeLog@1.958.1.1 +1 -0
+ [Bug 1964] --without-sntp should not build sntp
+
+ sntp/configure.ac@1.63 +4 -4
+ [Bug 1964] --without-sntp should not build sntp
+
+ChangeSet@1.2594, 2011-07-16 15:26:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ChangeLog@1.959 +1 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ include/ntp_config.h@1.73 +1 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ include/ntp_request.h@1.44 +9 -3
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ include/ntpd.h@1.164 +1 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpd/complete.conf@1.16 +1 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpd/keyword-gen-utd@1.13 +1 -1
+ keyword-gen.c output
+
+ ntpd/keyword-gen.c@1.19 +7 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpd/ntp_config.c@1.291 +77 -2
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpd/ntp_keyword.h@1.15 +971 -951
+ keyword-gen.c output
+
+ ntpd/ntp_parser.c@1.75 +1029 -969
+ ntp_parser.y output
+
+ ntpd/ntp_parser.h@1.42 +353 -339
+ ntp_parser.y output
+
+ ntpd/ntp_parser.y@1.69 +40 -0
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpd/ntp_request.c@1.105 +1 -2
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpdc/ntpdc_ops.c@1.78 +9 -8
+ [Bug 1963] add reset command for ntpq :config, similar to ntpdc's
+
+ ntpq/ntpq.c@1.139 +1 -1
+ Silence signed/unsigned comparison warning from VC++ 2008.
+
+ChangeSet@1.2593, 2011-07-13 09:55:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P190
+ TAG: NTP_4_2_7P190
+
+ ChangeLog@1.958 +1 -0
+ NTP_4_2_7P190
+
+ ntpd/ntpd-opts.c@1.195 +3 -3
+ NTP_4_2_7P190
+
+ ntpd/ntpd-opts.h@1.195 +3 -3
+ NTP_4_2_7P190
+
+ ntpd/ntpd-opts.texi@1.193 +2 -2
+ NTP_4_2_7P190
+
+ ntpd/ntpd.1ntpdman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpd/ntpd.1ntpdmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpd/ntpd.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpd/ntpd.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc-opts.c@1.190 +3 -3
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc-opts.h@1.190 +3 -3
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc-opts.texi@1.190 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc.1ntpdcman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc.html@1.18 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpdc/ntpdc.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpq/ntpq-opts.c@1.192 +3 -3
+ NTP_4_2_7P190
+
+ ntpq/ntpq-opts.h@1.192 +3 -3
+ NTP_4_2_7P190
+
+ ntpq/ntpq-opts.texi@1.192 +2 -2
+ NTP_4_2_7P190
+
+ ntpq/ntpq.1ntpqman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpq/ntpq.1ntpqmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpq/ntpq.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpq/ntpq.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.192 +3 -3
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.192 +3 -3
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.192 +2 -2
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ packageinfo.sh@1.193 +1 -1
+ NTP_4_2_7P190
+
+ scripts/ntp-wait-opts.texi@1.10 +1 -1
+ NTP_4_2_7P190
+
+ scripts/ntp-wait.1ntp-waitman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ scripts/ntp-wait.html@1.10 +1 -1
+ NTP_4_2_7P190
+
+ scripts/ntp-wait.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ scripts/ntp-wait.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp-opts.c@1.186 +3 -3
+ NTP_4_2_7P190
+
+ sntp/sntp-opts.h@1.186 +3 -3
+ NTP_4_2_7P190
+
+ sntp/sntp-opts.texi@1.186 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp.1sntpman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp.1sntpmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp.html@1.186 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ sntp/sntp.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ util/ntp-keygen-opts.c@1.190 +3 -3
+ NTP_4_2_7P190
+
+ util/ntp-keygen-opts.h@1.190 +3 -3
+ NTP_4_2_7P190
+
+ util/ntp-keygen-opts.texi@1.193 +2 -2
+ NTP_4_2_7P190
+
+ util/ntp-keygen.1ntp-keygenman@1.6 +2 -2
+ NTP_4_2_7P190
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.6 +2 -2
+ NTP_4_2_7P190
+
+ util/ntp-keygen.man.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ util/ntp-keygen.mdoc.in@1.6 +2 -2
+ NTP_4_2_7P190
+
+ChangeSet@1.2592, 2011-07-12 22:11:22-04:00, stenn@deacon.udel.edu
+ Require autogen-5.12
+
+ ChangeLog@1.957 +2 -0
+ Require autogen-5.12
+
+ sntp/include/autogen-version.def@1.8 +1 -1
+ Require autogen-5.12
+
+ChangeSet@1.2082.4.219, 2011-07-12 21:46:20-04:00, stenn@psp-deb1.ntp.org
[Bug 1961] html2man update: distribute ntp-wait.html
- ChangeLog@1.721 +4 -0
+ ChangeLog@1.496.26.154 +4 -0
[Bug 1961] html2man update: distribute ntp-wait.html
html/ntp-wait.html@1.1 +30 -0
@@ -966,373 +81942,4056 @@ ChangeSet@1.2306, 2011-07-12 21:46:20-04:00, stenn@psp-deb1.ntp.org
html/ntp-wait.html@1.0 +0 -0
-ChangeSet@1.2305, 2011-07-10 23:03:48-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2590, 2011-07-11 06:29:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P189
+ TAG: NTP_4_2_7P189
+
+ ChangeLog@1.955 +1 -0
+ NTP_4_2_7P189
+
+ ntpd/ntpd-opts.c@1.194 +3 -3
+ NTP_4_2_7P189
+
+ ntpd/ntpd-opts.h@1.194 +3 -3
+ NTP_4_2_7P189
+
+ ntpd/ntpd-opts.texi@1.192 +2 -2
+ NTP_4_2_7P189
+
+ ntpd/ntpd.1ntpdman@1.5 +4 -5
+ NTP_4_2_7P189
+
+ ntpd/ntpd.1ntpdmdoc@1.5 +4 -5
+ NTP_4_2_7P189
+
+ ntpd/ntpd.man.in@1.5 +4 -5
+ NTP_4_2_7P189
+
+ ntpd/ntpd.mdoc.in@1.5 +4 -5
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc-opts.c@1.189 +3 -3
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc-opts.h@1.189 +3 -3
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc-opts.texi@1.189 +2 -2
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc.1ntpdcman@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.5 +3 -3
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc.html@1.17 +2 -2
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc.man.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpdc/ntpdc.mdoc.in@1.5 +3 -3
+ NTP_4_2_7P189
+
+ ntpq/ntpq-opts.c@1.191 +3 -3
+ NTP_4_2_7P189
+
+ ntpq/ntpq-opts.h@1.191 +3 -3
+ NTP_4_2_7P189
+
+ ntpq/ntpq-opts.texi@1.191 +2 -2
+ NTP_4_2_7P189
+
+ ntpq/ntpq.1ntpqman@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpq/ntpq.1ntpqmdoc@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpq/ntpq.man.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpq/ntpq.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.191 +3 -3
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.191 +3 -3
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.191 +2 -2
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd.man.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ packageinfo.sh@1.192 +1 -1
+ NTP_4_2_7P189
+
+ scripts/ntp-wait-opts.texi@1.9 +1 -1
+ NTP_4_2_7P189
+
+ scripts/ntp-wait.1ntp-waitman@1.5 +2 -2
+ NTP_4_2_7P189
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.5 +2 -2
+ NTP_4_2_7P189
+
+ scripts/ntp-wait.html@1.9 +1 -1
+ NTP_4_2_7P189
+
+ scripts/ntp-wait.man.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ scripts/ntp-wait.mdoc.in@1.5 +2 -2
+ NTP_4_2_7P189
+
+ sntp/sntp-opts.c@1.185 +3 -3
+ NTP_4_2_7P189
+
+ sntp/sntp-opts.h@1.185 +3 -3
+ NTP_4_2_7P189
+
+ sntp/sntp-opts.texi@1.185 +2 -2
+ NTP_4_2_7P189
+
+ sntp/sntp.1sntpman@1.5 +3 -3
+ NTP_4_2_7P189
+
+ sntp/sntp.1sntpmdoc@1.5 +3 -3
+ NTP_4_2_7P189
+
+ sntp/sntp.html@1.185 +2 -2
+ NTP_4_2_7P189
+
+ sntp/sntp.man.in@1.5 +3 -3
+ NTP_4_2_7P189
+
+ sntp/sntp.mdoc.in@1.5 +3 -3
+ NTP_4_2_7P189
+
+ util/ntp-keygen-opts.c@1.189 +3 -3
+ NTP_4_2_7P189
+
+ util/ntp-keygen-opts.h@1.189 +3 -3
+ NTP_4_2_7P189
+
+ util/ntp-keygen-opts.texi@1.192 +2 -2
+ NTP_4_2_7P189
+
+ util/ntp-keygen.1ntp-keygenman@1.5 +4 -5
+ NTP_4_2_7P189
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.5 +4 -5
+ NTP_4_2_7P189
+
+ util/ntp-keygen.man.in@1.5 +4 -5
+ NTP_4_2_7P189
+
+ util/ntp-keygen.mdoc.in@1.5 +4 -5
+ NTP_4_2_7P189
+
+ChangeSet@1.2082.4.218, 2011-07-10 23:03:48-04:00, stenn@deacon.udel.edu
NTP_4_2_6P4_RC1
TAG: NTP_4_2_6P4_RC1
- ChangeLog@1.720 +1 -0
+ ChangeLog@1.496.26.153 +1 -0
NTP_4_2_6P4_RC1
- ntpd/ntpd-opts.c@1.285 +7 -9
+ ntpd/ntpd-opts.c@1.248.37.1 +7 -9
NTP_4_2_6P4_RC1
- ntpd/ntpd-opts.h@1.285 +9 -11
+ ntpd/ntpd-opts.h@1.248.37.1 +9 -11
NTP_4_2_6P4_RC1
- ntpd/ntpd-opts.texi@1.282 +3 -3
+ ntpd/ntpd-opts.texi@1.246.36.1 +3 -3
NTP_4_2_6P4_RC1
- ntpd/ntpd.1@1.282 +2 -2
+ ntpd/ntpd.1@1.246.36.1 +2 -2
NTP_4_2_6P4_RC1
- ntpdc/ntpdc-opts.c@1.281 +7 -9
+ ntpdc/ntpdc-opts.c@1.244.37.1 +7 -9
NTP_4_2_6P4_RC1
- ntpdc/ntpdc-opts.h@1.281 +9 -11
+ ntpdc/ntpdc-opts.h@1.244.37.1 +9 -11
NTP_4_2_6P4_RC1
- ntpdc/ntpdc-opts.texi@1.279 +3 -3
+ ntpdc/ntpdc-opts.texi@1.243.36.1 +3 -3
NTP_4_2_6P4_RC1
- ntpdc/ntpdc.1@1.279 +2 -2
+ ntpdc/ntpdc.1@1.243.36.1 +2 -2
NTP_4_2_6P4_RC1
- ntpq/ntpq-opts.c@1.282 +7 -9
+ ntpq/ntpq-opts.c@1.245.37.1 +7 -9
NTP_4_2_6P4_RC1
- ntpq/ntpq-opts.h@1.282 +9 -11
+ ntpq/ntpq-opts.h@1.245.37.1 +9 -11
NTP_4_2_6P4_RC1
- ntpq/ntpq-opts.texi@1.280 +3 -3
+ ntpq/ntpq-opts.texi@1.244.36.1 +3 -3
NTP_4_2_6P4_RC1
- ntpq/ntpq.1@1.280 +2 -2
+ ntpq/ntpq.1@1.244.36.1 +2 -2
NTP_4_2_6P4_RC1
- ntpsnmpd/ntpsnmpd-opts.c@1.161 +7 -9
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.38.1 +7 -9
NTP_4_2_6P4_RC1
- ntpsnmpd/ntpsnmpd-opts.h@1.161 +9 -11
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.38.1 +9 -11
NTP_4_2_6P4_RC1
- ntpsnmpd/ntpsnmpd-opts.texi@1.160 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.37.1 +3 -3
NTP_4_2_6P4_RC1
- ntpsnmpd/ntpsnmpd.1@1.159 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.37.1 +2 -2
NTP_4_2_6P4_RC1
- packageinfo.sh@1.297 +1 -1
+ packageinfo.sh@1.255.34.2 +1 -1
NTP_4_2_6P4_RC1
- sntp/sntp-opts.c@1.152 +7 -9
+ sntp/sntp-opts.c@1.117.35.1 +7 -9
NTP_4_2_6P4_RC1
- sntp/sntp-opts.h@1.152 +9 -11
+ sntp/sntp-opts.h@1.117.35.1 +9 -11
NTP_4_2_6P4_RC1
- sntp/sntp-opts.texi@1.151 +3 -3
+ sntp/sntp-opts.texi@1.117.34.1 +3 -3
NTP_4_2_6P4_RC1
- sntp/sntp.1@1.151 +2 -2
+ sntp/sntp.1@1.117.34.1 +2 -2
NTP_4_2_6P4_RC1
- sntp/sntp.html@1.42 +3 -3
+ sntp/sntp.html@1.7.35.1 +3 -3
NTP_4_2_6P4_RC1
- util/ntp-keygen-opts.c@1.284 +7 -9
+ util/ntp-keygen-opts.c@1.247.37.1 +7 -9
NTP_4_2_6P4_RC1
- util/ntp-keygen-opts.h@1.284 +9 -11
+ util/ntp-keygen-opts.h@1.247.37.1 +9 -11
NTP_4_2_6P4_RC1
- util/ntp-keygen-opts.texi@1.282 +3 -3
+ util/ntp-keygen-opts.texi@1.246.36.1 +3 -3
NTP_4_2_6P4_RC1
- util/ntp-keygen.1@1.282 +2 -2
+ util/ntp-keygen.1@1.246.36.1 +2 -2
NTP_4_2_6P4_RC1
-ChangeSet@1.2304, 2011-07-10 22:14:53-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.217, 2011-07-10 22:14:53-04:00, stenn@deacon.udel.edu
4.2.6p4-RC1
- packageinfo.sh@1.296 +1 -1
+ packageinfo.sh@1.255.34.1 +1 -1
4.2.6p4-RC1
-ChangeSet@1.2303, 2011-07-10 17:51:34-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.216, 2011-07-10 17:51:34-04:00, stenn@deacon.udel.edu
Update the NEWS file
- ChangeLog@1.719 +1 -0
+ ChangeLog@1.496.26.152 +1 -0
Update the NEWS file
NEWS@1.118 +39 -0
Update the NEWS file
-ChangeSet@1.2302, 2011-07-10 08:02:44-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.215, 2011-07-10 08:02:44-04:00, stenn@psp-deb1.ntp.org
[Bug 1961] html2man needs an update
- ChangeLog@1.718 +1 -0
+ ChangeLog@1.496.26.151 +1 -0
[Bug 1961] html2man needs an update
- html/authopt.html@1.61 +1 -5
+ html/authopt.html@1.60.1.1 +1 -5
[Bug 1961] html2man needs an update
- html/keygen.html@1.20 +1 -0
+ html/keygen.html@1.19.1.1 +1 -0
[Bug 1961] html2man needs an update
- html/ntpd.html@1.52 +12 -4
+ html/ntpd.html@1.51.1.1 +12 -4
[Bug 1961] html2man needs an update
- html/ntpdate.html@1.19 +6 -6
+ html/ntpdate.html@1.18.1.1 +6 -6
[Bug 1961] html2man needs an update
- html/ntpdc.html@1.31 +10 -8
+ html/ntpdc.html@1.30.1.1 +10 -8
[Bug 1961] html2man needs an update
- html/ntpq.html@1.38 +2 -2
+ html/ntpq.html@1.36.1.2 +2 -2
[Bug 1961] html2man needs an update
- html/ntptrace.html@1.15 +2 -10
+ html/ntptrace.html@1.14.1.1 +2 -10
[Bug 1961] html2man needs an update
- html/tickadj.html@1.16 +3 -1
+ html/tickadj.html@1.15.1.1 +3 -1
[Bug 1961] html2man needs an update
scripts/html2man.in@1.6 +99 -37
[Bug 1961] html2man needs an update
-ChangeSet@1.2301, 2011-07-10 07:34:24-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.214, 2011-07-10 07:34:24-04:00, stenn@deacon.udel.edu
[Bug 1790] Update config.guess and config.sub to detect AIX6
- ChangeLog@1.717 +1 -0
+ ChangeLog@1.496.26.150 +1 -0
[Bug 1790] Update config.guess and config.sub to detect AIX6
-ChangeSet@1.2300, 2011-07-05 03:39:02-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.213, 2011-07-05 03:39:02-04:00, stenn@psp-deb1.ntp.org
[Bug 1134] ntpd fails binding to tentative IPv6 addresses
- ChangeLog@1.716 +4 -0
+ ChangeLog@1.496.26.149 +4 -0
[Bug 1134] ntpd fails binding to tentative IPv6 addresses
- lib/isc/unix/interfaceiter.c@1.20 +11 -0
+ lib/isc/unix/interfaceiter.c@1.19.1.1 +11 -0
[Bug 1134] ntpd fails binding to tentative IPv6 addresses
-ChangeSet@1.2299, 2011-05-25 05:27:31+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2587, 2011-06-28 07:07:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P188
+ TAG: NTP_4_2_7P188
+
+ ChangeLog@1.952 +1 -0
+ NTP_4_2_7P188
+
+ ntpd/ntpd-opts.c@1.193 +3 -3
+ NTP_4_2_7P188
+
+ ntpd/ntpd-opts.h@1.193 +3 -3
+ NTP_4_2_7P188
+
+ ntpd/ntpd-opts.texi@1.191 +2 -2
+ NTP_4_2_7P188
+
+ ntpd/ntpd.1ntpdman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpd/ntpd.1ntpdmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpd/ntpd.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpd/ntpd.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc-opts.c@1.188 +3 -3
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc-opts.h@1.188 +3 -3
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc-opts.texi@1.188 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc.1ntpdcman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc.html@1.16 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpdc/ntpdc.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpq/ntpq-opts.c@1.190 +3 -3
+ NTP_4_2_7P188
+
+ ntpq/ntpq-opts.h@1.190 +3 -3
+ NTP_4_2_7P188
+
+ ntpq/ntpq-opts.texi@1.190 +2 -2
+ NTP_4_2_7P188
+
+ ntpq/ntpq.1ntpqman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpq/ntpq.1ntpqmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpq/ntpq.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpq/ntpq.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.190 +3 -3
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.190 +3 -3
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.190 +2 -2
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ packageinfo.sh@1.191 +1 -1
+ NTP_4_2_7P188
+
+ scripts/ntp-wait-opts.texi@1.8 +14 -2
+ NTP_4_2_7P188
+
+ scripts/ntp-wait.1ntp-waitman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ scripts/ntp-wait.html@1.8 +14 -2
+ NTP_4_2_7P188
+
+ scripts/ntp-wait.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ scripts/ntp-wait.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp-opts.c@1.184 +3 -3
+ NTP_4_2_7P188
+
+ sntp/sntp-opts.h@1.184 +3 -3
+ NTP_4_2_7P188
+
+ sntp/sntp-opts.texi@1.184 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp.1sntpman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp.1sntpmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp.html@1.184 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ sntp/sntp.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ util/ntp-keygen-opts.c@1.188 +3 -3
+ NTP_4_2_7P188
+
+ util/ntp-keygen-opts.h@1.188 +3 -3
+ NTP_4_2_7P188
+
+ util/ntp-keygen-opts.texi@1.191 +2 -2
+ NTP_4_2_7P188
+
+ util/ntp-keygen.1ntp-keygenman@1.4 +2 -2
+ NTP_4_2_7P188
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.4 +2 -2
+ NTP_4_2_7P188
+
+ util/ntp-keygen.man.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ util/ntp-keygen.mdoc.in@1.4 +2 -2
+ NTP_4_2_7P188
+
+ChangeSet@1.2586, 2011-06-27 22:31:27-07:00, harlan@hms-mbp.local
+ ntp-wait: some versions of ntpd spell "associd" differently
+
+ ChangeLog@1.951 +1 -0
+ ntp-wait: some versions of ntpd spell "associd" differently
+
+ scripts/ntp-wait.in@1.7 +1 -1
+ ntp-wait: some versions of ntpd spell "associd" differently
+
+ChangeSet@1.2585, 2011-06-27 22:30:17-07:00, harlan@hms-mbp.local
+ [Bug 1958] genLocInfo must export PATH
+
+ ChangeLog@1.950 +1 -0
+ [Bug 1958] genLocInfo must export PATH
+
+ scripts/genLocInfo@1.10 +1 -0
+ [Bug 1958] genLocInfo must export PATH
+
+ChangeSet@1.2584, 2011-06-24 08:03:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P187
+ TAG: NTP_4_2_7P187
+
+ ChangeLog@1.949 +1 -0
+ NTP_4_2_7P187
+
+ ntpd/ntpd-opts.c@1.192 +3 -3
+ NTP_4_2_7P187
+
+ ntpd/ntpd-opts.h@1.192 +3 -3
+ NTP_4_2_7P187
+
+ ntpd/ntpd-opts.texi@1.190 +2 -2
+ NTP_4_2_7P187
+
+ ntpd/ntpd.1ntpdman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpd/ntpd.1ntpdmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpd/ntpd.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpd/ntpd.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc-opts.c@1.187 +3 -3
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc-opts.h@1.187 +3 -3
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc-opts.texi@1.187 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc.1ntpdcman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc.html@1.15 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpdc/ntpdc.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpq/ntpq-opts.c@1.189 +3 -3
+ NTP_4_2_7P187
+
+ ntpq/ntpq-opts.h@1.189 +3 -3
+ NTP_4_2_7P187
+
+ ntpq/ntpq-opts.texi@1.189 +2 -2
+ NTP_4_2_7P187
+
+ ntpq/ntpq.1ntpqman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpq/ntpq.1ntpqmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpq/ntpq.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpq/ntpq.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.189 +3 -3
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.189 +3 -3
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.189 +2 -2
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ packageinfo.sh@1.190 +1 -1
+ NTP_4_2_7P187
+
+ scripts/ntp-wait-opts.texi@1.7 +1 -1
+ NTP_4_2_7P187
+
+ scripts/ntp-wait.1ntp-waitman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ scripts/ntp-wait.html@1.7 +1 -1
+ NTP_4_2_7P187
+
+ scripts/ntp-wait.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ scripts/ntp-wait.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp-opts.c@1.183 +3 -3
+ NTP_4_2_7P187
+
+ sntp/sntp-opts.h@1.183 +3 -3
+ NTP_4_2_7P187
+
+ sntp/sntp-opts.texi@1.183 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp.1sntpman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp.1sntpmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp.html@1.183 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ sntp/sntp.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ util/ntp-keygen-opts.c@1.187 +3 -3
+ NTP_4_2_7P187
+
+ util/ntp-keygen-opts.h@1.187 +3 -3
+ NTP_4_2_7P187
+
+ util/ntp-keygen-opts.texi@1.190 +2 -2
+ NTP_4_2_7P187
+
+ util/ntp-keygen.1ntp-keygenman@1.3 +2 -2
+ NTP_4_2_7P187
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.3 +2 -2
+ NTP_4_2_7P187
+
+ util/ntp-keygen.man.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ util/ntp-keygen.mdoc.in@1.3 +2 -2
+ NTP_4_2_7P187
+
+ChangeSet@1.2583, 2011-06-24 03:02:21-04:00, stenn@deacon.udel.edu
+ Implement --with-locfile=filename configure argument
+
+ ChangeLog@1.948 +4 -0
+ Implement --with-locfile=filename configure argument
+
+ scripts/genLocInfo@1.9 +71 -50
+ Implement --with-locfile=filename configure argument
+
+ sntp/m4/ntp_locinfo.m4@1.9 +13 -1
+ Implement --with-locfile=filename configure argument
+
+ChangeSet@1.2582, 2011-06-24 02:52:59-04:00, stenn@deacon.udel.edu
+ [Bug 1954] Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am
+
+ ChangeLog@1.947 +1 -1
+ [Bug 1954] Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am
+
+ChangeSet@1.2581, 2011-06-24 01:25:47-04:00, stenn@deacon.udel.edu
+ Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am
+
+ ChangeLog@1.946 +1 -0
+ Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am
+
+ ntpd/Makefile.am@1.108 +2 -2
+ Fix typos in [s]bin_PROGRAMS in ntpd/Makefile.am
+
+ChangeSet@1.2580, 2011-06-23 11:29:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P186
+ TAG: NTP_4_2_7P186
+
+ ChangeLog@1.945 +1 -0
+ NTP_4_2_7P186
+
+ ntpd/ntpd-opts.c@1.191 +3 -3
+ NTP_4_2_7P186
+
+ ntpd/ntpd-opts.h@1.191 +3 -3
+ NTP_4_2_7P186
+
+ ntpd/ntpd-opts.texi@1.189 +1 -1
+ NTP_4_2_7P186
+
+ ntpd/ntpd.1ntpdman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpd/ntpd.1ntpdmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpd/ntpd.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpd/ntpd.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc-opts.c@1.186 +3 -3
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc-opts.h@1.186 +3 -3
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc-opts.texi@1.186 +2 -2
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc.1ntpdcman@1.2 +3 -31
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc.html@1.14 +2 -2
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc.man.in@1.2 +3 -31
+ NTP_4_2_7P186
+
+ ntpdc/ntpdc.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpq/ntpq-opts.c@1.188 +3 -3
+ NTP_4_2_7P186
+
+ ntpq/ntpq-opts.h@1.188 +3 -3
+ NTP_4_2_7P186
+
+ ntpq/ntpq-opts.texi@1.188 +2 -2
+ NTP_4_2_7P186
+
+ ntpq/ntpq.1ntpqman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpq/ntpq.1ntpqmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpq/ntpq.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpq/ntpq.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.188 +3 -3
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.188 +3 -3
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.188 +2 -2
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ packageinfo.sh@1.189 +1 -1
+ NTP_4_2_7P186
+
+ scripts/ntp-wait-opts.texi@1.6 +1 -1
+ NTP_4_2_7P186
+
+ scripts/ntp-wait.1ntp-waitman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ scripts/ntp-wait.html@1.6 +1 -1
+ NTP_4_2_7P186
+
+ scripts/ntp-wait.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ scripts/ntp-wait.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ sntp/sntp-opts.c@1.182 +3 -3
+ NTP_4_2_7P186
+
+ sntp/sntp-opts.h@1.182 +3 -3
+ NTP_4_2_7P186
+
+ sntp/sntp-opts.texi@1.182 +2 -2
+ NTP_4_2_7P186
+
+ sntp/sntp.1sntpman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ sntp/sntp.1sntpmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ sntp/sntp.html@1.182 +2 -2
+ NTP_4_2_7P186
+
+ sntp/sntp.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ sntp/sntp.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ util/ntp-keygen-opts.c@1.186 +3 -3
+ NTP_4_2_7P186
+
+ util/ntp-keygen-opts.h@1.186 +3 -3
+ NTP_4_2_7P186
+
+ util/ntp-keygen-opts.texi@1.189 +2 -2
+ NTP_4_2_7P186
+
+ util/ntp-keygen.1ntp-keygenman@1.2 +2 -2
+ NTP_4_2_7P186
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.2 +3 -3
+ NTP_4_2_7P186
+
+ util/ntp-keygen.man.in@1.2 +2 -2
+ NTP_4_2_7P186
+
+ util/ntp-keygen.mdoc.in@1.2 +3 -3
+ NTP_4_2_7P186
+
+ChangeSet@1.2577.1.1, 2011-06-23 03:27:04-04:00, stenn@psp-deb1.ntp.org
+ Update .point-changed-filelist for the new man pages
+
+ .point-changed-filelist@1.13 +25 -7
+ Update .point-changed-filelist for the new man pages
+
+ ChangeLog@1.942.1.1 +1 -0
+ Update .point-changed-filelist for the new man pages
+
+ChangeSet@1.2578, 2011-06-23 02:47:56-04:00, stenn@deacon.udel.edu
+ Documentation update from Dave Mills
+
+ ChangeLog@1.943 +2 -1
+ Documentation update from Dave Mills
+
+ html/warp.html@1.15 +11 -3
+ Documentation update from Dave Mills
+
+ChangeSet@1.2577, 2011-06-23 02:42:14-04:00, stenn@psp-deb1.ntp.org
+ merge cleanup
+
+ ChangeLog@1.942 +1 -2
+ merge cleanup
+
+ChangeSet@1.2574.1.6, 2011-06-23 02:16:14-04:00, stenn@psp-deb1.ntp.org
+ Update the building of OS-specific programs
+
+ ChangeLog@1.939.1.3 +1 -0
+ Update the building of OS-specific programs
+
+ configure.ac@1.530 +25 -2
+ Update the building of OS-specific programs
+
+ChangeSet@1.2574.1.5, 2011-06-22 23:14:06-04:00, stenn@psp-deb1.ntp.org
+ generated man page updates
+
+ bootstrap@1.39 +1 -1
+ generated man page updates
+
+ ntpd/ntpd.1ntpdman@1.1 +909 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpd/ntpd.1ntpdman
+
+ ntpd/ntpd.1ntpdman@1.0 +0 -0
+
+ ntpd/ntpd.1ntpdmdoc@1.1 +878 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpd/ntpd.1ntpdmdoc
+
+ ntpd/ntpd.1ntpdmdoc@1.0 +0 -0
+
+ ntpd/ntpd.man.in@1.1 +909 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpd/ntpd.man.in
+
+ ntpd/ntpd.man.in@1.0 +0 -0
+
+ ntpd/ntpd.mdoc.in@1.1 +878 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpd/ntpd.mdoc.in
+
+ ntpd/ntpd.mdoc.in@1.0 +0 -0
+
+ ntpdc/ntpdc.1ntpdcman@1.1 +569 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.1ntpdcman
+
+ ntpdc/ntpdc.1ntpdcman@1.0 +0 -0
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.1 +793 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.1ntpdcmdoc
+
+ ntpdc/ntpdc.1ntpdcmdoc@1.0 +0 -0
+
+ ntpdc/ntpdc.man.in@1.1 +569 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.man.in
+
+ ntpdc/ntpdc.man.in@1.0 +0 -0
+
+ ntpdc/ntpdc.mdoc.in@1.1 +793 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.mdoc.in
+
+ ntpdc/ntpdc.mdoc.in@1.0 +0 -0
+
+ ntpq/ntpq.1ntpqman@1.1 +397 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpq/ntpq.1ntpqman
+
+ ntpq/ntpq.1ntpqman@1.0 +0 -0
+
+ ntpq/ntpq.1ntpqmdoc@1.1 +375 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpq/ntpq.1ntpqmdoc
+
+ ntpq/ntpq.1ntpqmdoc@1.0 +0 -0
+
+ ntpq/ntpq.man.in@1.1 +397 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpq/ntpq.man.in
+
+ ntpq/ntpq.man.in@1.0 +0 -0
+
+ ntpq/ntpq.mdoc.in@1.1 +375 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpq/ntpq.mdoc.in
+
+ ntpq/ntpq.mdoc.in@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.1 +89 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
+
+ ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.man.in@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpsnmpd/ntpsnmpd.man.in
+
+ ntpsnmpd/ntpsnmpd.man.in@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.1 +89 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpsnmpd/ntpsnmpd.mdoc.in
+
+ ntpsnmpd/ntpsnmpd.mdoc.in@1.0 +0 -0
+
+ scripts/ntp-wait.1ntp-waitman@1.1 +93 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.1ntp-waitman
+
+ scripts/ntp-wait.1ntp-waitman@1.0 +0 -0
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.1ntp-waitmdoc
+
+ scripts/ntp-wait.1ntp-waitmdoc@1.0 +0 -0
+
+ scripts/ntp-wait.man.in@1.1 +93 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.man.in
+
+ scripts/ntp-wait.man.in@1.0 +0 -0
+
+ scripts/ntp-wait.mdoc.in@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.mdoc.in
+
+ scripts/ntp-wait.mdoc.in@1.0 +0 -0
+
+ sntp/include/mansec2subst.sed@1.1 +26 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/include/mansec2subst.sed
+
+ sntp/include/mansec2subst.sed@1.0 +0 -0
+
+ sntp/sntp.1sntpman@1.1 +293 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/sntp.1sntpman
+
+ sntp/sntp.1sntpman@1.0 +0 -0
+
+ sntp/sntp.1sntpmdoc@1.1 +275 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/sntp.1sntpmdoc
+
+ sntp/sntp.1sntpmdoc@1.0 +0 -0
+
+ sntp/sntp.man.in@1.1 +293 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/sntp.man.in
+
+ sntp/sntp.man.in@1.0 +0 -0
+
+ sntp/sntp.mdoc.in@1.1 +275 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/sntp.mdoc.in
+
+ sntp/sntp.mdoc.in@1.0 +0 -0
+
+ util/ntp-keygen.1ntp-keygenman@1.1 +917 -0
+ BitKeeper file /home/stenn/ntp-dev/util/ntp-keygen.1ntp-keygenman
+
+ util/ntp-keygen.1ntp-keygenman@1.0 +0 -0
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.1 +884 -0
+ BitKeeper file /home/stenn/ntp-dev/util/ntp-keygen.1ntp-keygenmdoc
+
+ util/ntp-keygen.1ntp-keygenmdoc@1.0 +0 -0
+
+ util/ntp-keygen.man.in@1.1 +917 -0
+ BitKeeper file /home/stenn/ntp-dev/util/ntp-keygen.man.in
+
+ util/ntp-keygen.man.in@1.0 +0 -0
+
+ util/ntp-keygen.mdoc.in@1.1 +884 -0
+ BitKeeper file /home/stenn/ntp-dev/util/ntp-keygen.mdoc.in
+
+ util/ntp-keygen.mdoc.in@1.0 +0 -0
+
+ChangeSet@1.2574.1.4, 2011-06-22 22:57:47-04:00, stenn@psp-deb1.ntp.org
+ Work around solaris /bin/sh braindamage
+
+ scripts/genLocInfo@1.8 +2 -12
+ Work around solaris /bin/sh braindamage
+
+ChangeSet@1.2574.1.3, 2011-06-22 22:57:21-04:00, stenn@psp-deb1.ntp.org
+ Do not ignore generated man pages
+
+ BitKeeper/etc/ignore@1.83 +0 -4
+ Do not ignore generated man pages
+
+ChangeSet@1.2574.1.2, 2011-06-22 20:18:20-04:00, stenn@psp-deb1.ntp.org
+ validate MANTAGFMT in genLocInfo
+
+ ChangeLog@1.939.1.2 +1 -0
+ validate MANTAGFMT in genLocInfo
+
+ scripts/genLocInfo@1.7 +9 -1
+ validate MANTAGFMT in genLocInfo
+
+ChangeSet@1.2573.1.4, 2011-06-22 18:49:43-04:00, stenn@psp-deb1.ntp.org
+ Finish conversion to genLocInfo.
+
+ .point-changed-filelist@1.12 +4 -1
+ Finish conversion to genLocInfo.
+
+ BitKeeper/deleted/10/ntp-wait.1~5aa615f3f31c2873@1.4.1.1 +0 -0
+ Delete: scripts/ntp-wait.1
+
+ BitKeeper/deleted/1d/ntp-keygen.1~ef7a6b66bc6794e8@1.187.1.1 +0 -0
+ Delete: util/ntp-keygen.1
+
+ BitKeeper/deleted/4d/sntp.1~9b6f13948b8b0ead@1.181 +0 -0
+ Delete: sntp/sntp.1
+
+ BitKeeper/deleted/70/ntpdsim.1~916fd6f22320fcad@1.16 +0 -0
+ Delete: ntpd/ntpdsim.1
+
+ BitKeeper/deleted/a7/ntpdc.1~1dd38e607d4b7e9a@1.184.1.1 +0 -0
+ Delete: ntpdc/ntpdc.1
+
+ BitKeeper/deleted/ac/ntpd.1~e95786c25d7ce6ae@1.187.1.1 +0 -0
+ Delete: ntpd/ntpd.1
+
+ BitKeeper/deleted/ad/ntpq.1~b5913739d03602e2@1.186.1.1 +0 -0
+ Delete: ntpq/ntpq.1
+
+ BitKeeper/deleted/e5/ntpsnmpd.1~14083c7c951dc39f@1.186.1.1 +0 -0
+ Delete: ntpsnmpd/ntpsnmpd.1
+
+ BitKeeper/etc/ignore@1.82 +5 -0
+ Finish conversion to genLocInfo.
+
+ ChangeLog@1.938.1.3 +1 -0
+ Finish conversion to genLocInfo.
+
+ Makefile.am@1.112 +1 -2
+ Finish conversion to genLocInfo.
+
+ adjtimed/Makefile.am@1.13 +2 -5
+ Finish conversion to genLocInfo.
+
+ bincheck.mf@1.4 +9 -7
+ Finish conversion to genLocInfo.
+
+ configure.ac@1.529 +26 -0
+ Finish conversion to genLocInfo.
+
+ loc/freebsd@1.3 +0 -0
+ Rename: loc.freebsd -> loc/freebsd
+
+ loc/legacy@1.3 +0 -0
+ Rename: loc.legacy -> loc/legacy
+
+ ntpd/Makefile.am@1.107 +45 -13
+ Finish conversion to genLocInfo.
+
+ ntpdate/Makefile.am@1.31 +3 -6
+ Finish conversion to genLocInfo.
+
+ ntpdc/Makefile.am@1.64 +38 -15
+ Finish conversion to genLocInfo.
+
+ ntpq/Makefile.am@1.60 +49 -15
+ Finish conversion to genLocInfo.
+
+ ntpsnmpd/Makefile.am@1.31 +50 -13
+ Finish conversion to genLocInfo.
+
+ scripts/Makefile.am@1.27 +42 -13
+ Finish conversion to genLocInfo.
+
+ scripts/genLocInfo@1.6 +7 -5
+ Finish conversion to genLocInfo.
+
+ sntp/Makefile.am@1.64 +39 -12
+ Finish conversion to genLocInfo.
+
+ sntp/configure.ac@1.62 +97 -0
+ Finish conversion to genLocInfo.
+
+ sntp/include/Makefile.am@1.3 +1 -0
+ Finish conversion to genLocInfo.
+
+ sntp/m4/ntp_libntp.m4@1.15 +0 -1
+ Finish conversion to genLocInfo.
+
+ sntp/m4/ntp_locinfo.m4@1.5.1.3 +2 -1
+ Finish conversion to genLocInfo.
+
+ sntp/sntp-opts.def@1.33 +1 -1
+ Finish conversion to genLocInfo.
+
+ util/Makefile.am@1.63 +54 -19
+ Finish conversion to genLocInfo.
+
+ChangeSet@1.2575, 2011-06-21 11:29:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P185
+ TAG: NTP_4_2_7P185
+
+ ChangeLog@1.940 +1 -0
+ NTP_4_2_7P185
+
+ ntpd/ntpd-opts.c@1.190 +3 -3
+ NTP_4_2_7P185
+
+ ntpd/ntpd-opts.h@1.190 +3 -3
+ NTP_4_2_7P185
+
+ ntpd/ntpd-opts.texi@1.188 +2 -2
+ NTP_4_2_7P185
+
+ ntpd/ntpd.1@1.188 +2 -2
+ NTP_4_2_7P185
+
+ ntpdc/ntpdc-opts.c@1.185 +3 -3
+ NTP_4_2_7P185
+
+ ntpdc/ntpdc-opts.h@1.185 +3 -3
+ NTP_4_2_7P185
+
+ ntpdc/ntpdc-opts.texi@1.185 +2 -2
+ NTP_4_2_7P185
+
+ ntpdc/ntpdc.1@1.185 +2 -2
+ NTP_4_2_7P185
+
+ ntpdc/ntpdc.html@1.13 +2 -2
+ NTP_4_2_7P185
+
+ ntpq/ntpq-opts.c@1.187 +3 -3
+ NTP_4_2_7P185
+
+ ntpq/ntpq-opts.h@1.187 +3 -3
+ NTP_4_2_7P185
+
+ ntpq/ntpq-opts.texi@1.187 +2 -2
+ NTP_4_2_7P185
+
+ ntpq/ntpq.1@1.187 +2 -2
+ NTP_4_2_7P185
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.187 +3 -3
+ NTP_4_2_7P185
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.187 +3 -3
+ NTP_4_2_7P185
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.187 +2 -2
+ NTP_4_2_7P185
+
+ ntpsnmpd/ntpsnmpd.1@1.187 +2 -2
+ NTP_4_2_7P185
+
+ packageinfo.sh@1.188 +1 -1
+ NTP_4_2_7P185
+
+ scripts/ntp-wait-opts.texi@1.5 +1 -1
+ NTP_4_2_7P185
+
+ scripts/ntp-wait.1@1.5 +2 -2
+ NTP_4_2_7P185
+
+ scripts/ntp-wait.html@1.5 +1 -1
+ NTP_4_2_7P185
+
+ sntp/sntp-opts.c@1.181 +3 -3
+ NTP_4_2_7P185
+
+ sntp/sntp-opts.h@1.181 +3 -3
+ NTP_4_2_7P185
+
+ sntp/sntp-opts.texi@1.181 +2 -2
+ NTP_4_2_7P185
+
+ sntp/sntp.1@1.180.1.1 +2 -2
+ NTP_4_2_7P185
+
+ sntp/sntp.html@1.181 +2 -2
+ NTP_4_2_7P185
+
+ util/ntp-keygen-opts.c@1.185 +3 -3
+ NTP_4_2_7P185
+
+ util/ntp-keygen-opts.h@1.185 +3 -3
+ NTP_4_2_7P185
+
+ util/ntp-keygen-opts.texi@1.188 +2 -2
+ NTP_4_2_7P185
+
+ util/ntp-keygen.1@1.188 +2 -2
+ NTP_4_2_7P185
+
+ChangeSet@1.2573.1.3, 2011-06-21 02:14:29-04:00, stenn@psp-deb1.ntp.org
+ Rename ntp_locs.m4 to ntp_locinfo.m4
+
+ sntp/m4/ntp_locinfo.m4@1.5.1.2 +0 -0
+ Rename: sntp/m4/ntp_locs.m4 -> sntp/m4/ntp_locinfo.m4
+
+ChangeSet@1.2573.1.2, 2011-06-21 02:09:40-04:00, stenn@psp-deb1.ntp.org
+ ntp_locs.m4: handle the case where . is not in the PATH
+
+ ChangeLog@1.938.1.2 +1 -0
+ ntp_locs.m4: handle the case where . is not in the PATH
+
+ sntp/m4/ntp_locs.m4@1.5.1.1 +1 -1
+ ntp_locs.m4: handle the case where . is not in the PATH
+
+ChangeSet@1.2573.1.1, 2011-06-21 01:58:35-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1950] Control installation of event_rpcgen.py
+
+ ChangeLog@1.938.1.1 +1 -0
+ [Bug 1950] Control installation of event_rpcgen.py
+
+ sntp/libevent/Makefile.am@1.7 +3 -0
+ [Bug 1950] Control installation of event_rpcgen.py
+
+ChangeSet@1.2574, 2011-06-20 18:50:41-04:00, stenn@deacon.udel.edu
+ . may not be in the PATH - ntp_locs.m4 fix
+
+ ChangeLog@1.939 +1 -0
+ . may not be in the PATH - ntp_locs.m4 fix
+
+ sntp/m4/ntp_locs.m4@1.6 +1 -1
+ . may not be in the PATH - ntp_locs.m4 fix
+
+ChangeSet@1.2573, 2011-06-20 07:02:17-04:00, stenn@psp-deb1.ntp.org
+ More genLocInfo cleanup
+
+ ChangeLog@1.938 +1 -0
+ More genLocInfo cleanup
+
+ configure.ac@1.528 +2 -0
+ More genLocInfo cleanup
+
+ scripts/genLocInfo@1.5 +1 -0
+ More genLocInfo cleanup
+
+ sntp/m4/ntp_locs.m4@1.5 +7 -1
+ More genLocInfo cleanup
+
+ChangeSet@1.2572, 2011-06-20 05:58:04-04:00, stenn@deacon.udel.edu
+ genLocInfo is EXTRA_DIST, not noinst_SCRIPT
+
+ scripts/Makefile.am@1.26 +1 -1
+ genLocInfo is EXTRA_DIST, not noinst_SCRIPT
+
+ChangeSet@1.2571, 2011-06-20 09:46:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P184
+ TAG: NTP_4_2_7P184
+
+ ChangeLog@1.937 +1 -0
+ NTP_4_2_7P184
+
+ ntpd/ntpd-opts.c@1.189 +3 -3
+ NTP_4_2_7P184
+
+ ntpd/ntpd-opts.h@1.189 +3 -3
+ NTP_4_2_7P184
+
+ ntpd/ntpd-opts.texi@1.187 +2 -2
+ NTP_4_2_7P184
+
+ ntpd/ntpd.1@1.187 +2 -2
+ NTP_4_2_7P184
+
+ ntpdc/ntpdc-opts.c@1.184 +3 -3
+ NTP_4_2_7P184
+
+ ntpdc/ntpdc-opts.h@1.184 +3 -3
+ NTP_4_2_7P184
+
+ ntpdc/ntpdc-opts.texi@1.184 +2 -2
+ NTP_4_2_7P184
+
+ ntpdc/ntpdc.1@1.184 +2 -2
+ NTP_4_2_7P184
+
+ ntpdc/ntpdc.html@1.12 +2 -2
+ NTP_4_2_7P184
+
+ ntpq/ntpq-opts.c@1.186 +3 -3
+ NTP_4_2_7P184
+
+ ntpq/ntpq-opts.h@1.186 +3 -3
+ NTP_4_2_7P184
+
+ ntpq/ntpq-opts.texi@1.186 +2 -2
+ NTP_4_2_7P184
+
+ ntpq/ntpq.1@1.186 +2 -2
+ NTP_4_2_7P184
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.186 +3 -3
+ NTP_4_2_7P184
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.186 +3 -3
+ NTP_4_2_7P184
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.186 +2 -2
+ NTP_4_2_7P184
+
+ ntpsnmpd/ntpsnmpd.1@1.186 +2 -2
+ NTP_4_2_7P184
+
+ packageinfo.sh@1.187 +1 -1
+ NTP_4_2_7P184
+
+ scripts/ntp-wait-opts.texi@1.4 +1 -1
+ NTP_4_2_7P184
+
+ scripts/ntp-wait.1@1.4 +2 -2
+ NTP_4_2_7P184
+
+ scripts/ntp-wait.html@1.4 +1 -1
+ NTP_4_2_7P184
+
+ sntp/sntp-opts.c@1.180 +3 -3
+ NTP_4_2_7P184
+
+ sntp/sntp-opts.h@1.180 +3 -3
+ NTP_4_2_7P184
+
+ sntp/sntp-opts.texi@1.180 +2 -2
+ NTP_4_2_7P184
+
+ sntp/sntp.1@1.180 +2 -2
+ NTP_4_2_7P184
+
+ sntp/sntp.html@1.180 +2 -2
+ NTP_4_2_7P184
+
+ util/ntp-keygen-opts.c@1.184 +3 -3
+ NTP_4_2_7P184
+
+ util/ntp-keygen-opts.h@1.184 +3 -3
+ NTP_4_2_7P184
+
+ util/ntp-keygen-opts.texi@1.187 +2 -2
+ NTP_4_2_7P184
+
+ util/ntp-keygen.1@1.187 +2 -2
+ NTP_4_2_7P184
+
+ChangeSet@1.2570, 2011-06-20 05:31:49-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo cleanup
+
+ scripts/genLocInfo@1.4 +4 -0
+ genLocInfo cleanup
+
+ChangeSet@1.2569, 2011-06-20 05:24:55-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo cleanup
+
+ sntp/m4/ntp_locs.m4@1.4 +2 -2
+ genLocInfo cleanup
+
+ChangeSet@1.2568, 2011-06-20 04:54:00-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo cleanup
+
+ sntp/m4/ntp_locs.m4@1.3 +2 -1
+ genLocInfo cleanup
+
+ChangeSet@1.2567, 2011-06-20 03:58:19-04:00, stenn@psp-deb1.ntp.org
+ Updates to ntp_locs.m4
+
+ ChangeLog@1.936 +1 -0
+ Updates to ntp_locs.m4
+
+ sntp/m4/ntp_locs.m4@1.2 +1 -1
+ Updates to ntp_locs.m4
+
+ sntp/m4/ntp_locs.m4@1.1 +57 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/m4/ntp_locs.m4
+
+ sntp/m4/ntp_locs.m4@1.0 +0 -0
+
+ChangeSet@1.2566, 2011-06-20 02:08:50-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo improvements
+
+ scripts/genLocInfo@1.3 +8 -3
+ genLocInfo improvements
+
+ChangeSet@1.2565, 2011-06-19 23:07:56-04:00, stenn@psp-deb1.ntp.org
+ genLocInfo improvements
+
+ ChangeLog@1.935 +1 -0
+ genLocInfo improvements
+
+ scripts/genLocInfo@1.2 +97 -12
+ genLocInfo improvements
+
+ChangeSet@1.2561.1.2, 2011-06-19 19:06:27-04:00, stenn@psp-deb1.ntp.org
+ Add the man page tag "flavor" to the loc.* files
+
+ ChangeLog@1.931.1.2 +1 -0
+ Add the man page tag "flavor" to the loc.* files
+
+ loc.freebsd@1.2 +1 -0
+ Add the man page tag "flavor" to the loc.* files
+
+ loc.legacy@1.2 +1 -0
+ Add the man page tag "flavor" to the loc.* files
+
+ChangeSet@1.2561.1.1, 2011-06-19 19:04:22-04:00, stenn@psp-deb1.ntp.org
+ Add/distribute genLocInfo
+
+ ChangeLog@1.931.1.1 +1 -0
+ Add/distribute genLocInfo
+
+ scripts/Makefile.am@1.23.1.1 +1 -0
+ Distribute genLocInfo
+
+ scripts/genLocInfo@1.1 +66 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/genLocInfo
+
+ scripts/genLocInfo@1.0 +0 -0
+
+ChangeSet@1.2563, 2011-06-19 22:34:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P183
+ TAG: NTP_4_2_7P183
+
+ ChangeLog@1.933 +1 -1
+ NTP_4_2_7P183
+
+ ntpd/ntpd-opts.c@1.188 +3 -3
+ NTP_4_2_7P183
+
+ ntpd/ntpd-opts.h@1.188 +3 -3
+ NTP_4_2_7P183
+
+ ntpd/ntpd-opts.texi@1.186 +2 -2
+ NTP_4_2_7P183
+
+ ntpd/ntpd.1@1.186 +2 -2
+ NTP_4_2_7P183
+
+ ntpdc/ntpdc-opts.c@1.183 +3 -3
+ NTP_4_2_7P183
+
+ ntpdc/ntpdc-opts.h@1.183 +3 -3
+ NTP_4_2_7P183
+
+ ntpdc/ntpdc-opts.texi@1.183 +2 -2
+ NTP_4_2_7P183
+
+ ntpdc/ntpdc.1@1.183 +2 -2
+ NTP_4_2_7P183
+
+ ntpdc/ntpdc.html@1.11 +2 -2
+ NTP_4_2_7P183
+
+ ntpq/ntpq-opts.c@1.185 +3 -3
+ NTP_4_2_7P183
+
+ ntpq/ntpq-opts.h@1.185 +3 -3
+ NTP_4_2_7P183
+
+ ntpq/ntpq-opts.texi@1.185 +2 -2
+ NTP_4_2_7P183
+
+ ntpq/ntpq.1@1.185 +2 -2
+ NTP_4_2_7P183
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.185 +3 -3
+ NTP_4_2_7P183
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.185 +3 -3
+ NTP_4_2_7P183
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.185 +2 -2
+ NTP_4_2_7P183
+
+ ntpsnmpd/ntpsnmpd.1@1.185 +2 -2
+ NTP_4_2_7P183
+
+ packageinfo.sh@1.186 +1 -1
+ NTP_4_2_7P183
+
+ scripts/ntp-wait-opts.texi@1.3 +1 -1
+ NTP_4_2_7P183
+
+ scripts/ntp-wait.1@1.3 +2 -2
+ NTP_4_2_7P183
+
+ scripts/ntp-wait.html@1.3 +1 -1
+ NTP_4_2_7P183
+
+ sntp/sntp-opts.c@1.179 +3 -3
+ NTP_4_2_7P183
+
+ sntp/sntp-opts.h@1.179 +3 -3
+ NTP_4_2_7P183
+
+ sntp/sntp-opts.texi@1.179 +2 -2
+ NTP_4_2_7P183
+
+ sntp/sntp.1@1.179 +2 -2
+ NTP_4_2_7P183
+
+ sntp/sntp.html@1.179 +2 -2
+ NTP_4_2_7P183
+
+ util/ntp-keygen-opts.c@1.183 +3 -3
+ NTP_4_2_7P183
+
+ util/ntp-keygen-opts.h@1.183 +3 -3
+ NTP_4_2_7P183
+
+ util/ntp-keygen-opts.texi@1.186 +2 -2
+ NTP_4_2_7P183
+
+ util/ntp-keygen.1@1.186 +2 -2
+ NTP_4_2_7P183
+
+ChangeSet@1.2562, 2011-06-19 18:17:53-04:00, stenn@deacon.udel.edu
+ Update the autogen include list for scripts/Makefile.am
+
+ ChangeLog@1.932 +2 -0
+ Update the autogen include list for scripts/Makefile.am
+
+ scripts/Makefile.am@1.24 +1 -1
+ Update the autogen include list for scripts/Makefile.am
+
+ChangeSet@1.2561, 2011-06-19 03:07:32-04:00, stenn@psp-deb1.ntp.org
+ Added loc.freebsd (and distribute it)
+
+ ChangeLog@1.931 +1 -0
+ Added loc.freebsd (and distribute it)
+
+ Makefile.am@1.111 +1 -0
+ Added loc.freebsd (and distribute it)
+
+ loc.freebsd@1.1 +12 -0
+ BitKeeper file /home/stenn/ntp-dev/loc.freebsd
+
+ loc.freebsd@1.0 +0 -0
+
+ChangeSet@1.2560, 2011-06-19 01:27:46-04:00, stenn@psp-deb1.ntp.org
+ Added loc.legacy (and distribute it)
+
+ ChangeLog@1.930 +1 -0
+ Added loc.legacy (and distribute it)
+
+ Makefile.am@1.110 +1 -0
+ Added loc.legacy (and distribute it)
+
+ loc.legacy@1.1 +14 -0
+ BitKeeper file /home/stenn/ntp-dev/loc.legacy
+
+ loc.legacy@1.0 +0 -0
+
+ChangeSet@1.2559, 2011-06-15 09:03:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P182
+ TAG: NTP_4_2_7P182
+
+ ChangeLog@1.929 +1 -0
+ NTP_4_2_7P182
+
+ ntpd/ntpd-opts.c@1.187 +21 -6
+ NTP_4_2_7P182
+
+ ntpd/ntpd-opts.h@1.187 +23 -8
+ NTP_4_2_7P182
+
+ ntpd/ntpd-opts.texi@1.185 +4 -5
+ NTP_4_2_7P182
+
+ ntpd/ntpd.1@1.185 +623 -102
+ NTP_4_2_7P182
+
+ ntpdc/ntpdc-opts.c@1.182 +21 -15
+ NTP_4_2_7P182
+
+ ntpdc/ntpdc-opts.h@1.182 +23 -8
+ NTP_4_2_7P182
+
+ ntpdc/ntpdc-opts.texi@1.182 +4 -29
+ NTP_4_2_7P182
+
+ ntpdc/ntpdc.1@1.182 +11 -9
+ NTP_4_2_7P182
+
+ ntpdc/ntpdc.html@1.10 +6 -31
+ NTP_4_2_7P182
+
+ ntpq/ntpq-opts.c@1.184 +20 -11
+ NTP_4_2_7P182
+
+ ntpq/ntpq-opts.h@1.184 +23 -8
+ NTP_4_2_7P182
+
+ ntpq/ntpq-opts.texi@1.184 +3 -17
+ NTP_4_2_7P182
+
+ ntpq/ntpq.1@1.184 +106 -124
+ NTP_4_2_7P182
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.184 +20 -5
+ NTP_4_2_7P182
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.184 +23 -8
+ NTP_4_2_7P182
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.184 +4 -3
+ NTP_4_2_7P182
+
+ ntpsnmpd/ntpsnmpd.1@1.184 +52 -45
+ NTP_4_2_7P182
+
+ packageinfo.sh@1.185 +1 -1
+ NTP_4_2_7P182
+
+ scripts/ntp-wait-opts.texi@1.2 +2 -14
+ NTP_4_2_7P182
+
+ scripts/ntp-wait.1@1.2 +3 -3
+ NTP_4_2_7P182
+
+ scripts/ntp-wait.html@1.2 +14 -37
+ NTP_4_2_7P182
+
+ sntp/sntp-opts.c@1.178 +19 -4
+ NTP_4_2_7P182
+
+ sntp/sntp-opts.h@1.178 +23 -8
+ NTP_4_2_7P182
+
+ sntp/sntp-opts.texi@1.178 +2 -2
+ NTP_4_2_7P182
+
+ sntp/sntp.1@1.178 +11 -13
+ NTP_4_2_7P182
+
+ sntp/sntp.html@1.178 +2 -2
+ NTP_4_2_7P182
+
+ util/ntp-keygen-opts.c@1.182 +21 -8
+ NTP_4_2_7P182
+
+ util/ntp-keygen-opts.h@1.182 +23 -8
+ NTP_4_2_7P182
+
+ util/ntp-keygen-opts.texi@1.185 +5 -8
+ NTP_4_2_7P182
+
+ util/ntp-keygen.1@1.185 +772 -78
+ NTP_4_2_7P182
+
+ChangeSet@1.2558, 2011-06-15 04:50:01-04:00, stenn@deacon.udel.edu
+ Update .point-changed-filelist
+
+ .point-changed-filelist@1.11 +3 -0
+ Update .point-changed-filelist
+
+ ChangeLog@1.928 +1 -0
+ Update .point-changed-filelist
+
+ChangeSet@1.2557, 2011-06-15 04:21:57-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1304] Update sntp.html to reflect new implementation
+
+ ChangeLog@1.927 +1 -0
+ [Bug 1304] Update sntp.html to reflect new implementation
+
+ChangeSet@1.2556, 2011-06-15 04:11:33-04:00, stenn@psp-deb1.ntp.org
+ ntpdc documentation fixes
+
+ ChangeLog@1.926 +1 -0
+ ntpdc documentation fixes
+
+ ntpdc/ntpdc-opts.def@1.19 +3 -0
+ ntpdc documentation fixes
+
+ ntpdc/ntpdc.texi@1.2 +1 -1
+ ntpdc documentation fixes
+
+ChangeSet@1.2555, 2011-06-15 04:10:12-04:00, stenn@psp-deb1.ntp.org
+ Update ntp-wait autogen docs
+
+ ChangeLog@1.925 +1 -0
+ Update ntp-wait autogen docs
+
+ scripts/Makefile.am@1.23 +40 -0
+ Update ntp-wait autogen docs
+
+ scripts/ntp-wait-opts.def@1.1 +106 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait-opts.def
+
+ scripts/ntp-wait-opts.def@1.0 +0 -0
+
+ scripts/ntp-wait-opts.menu@1.1 +1 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait-opts.menu
+
+ scripts/ntp-wait-opts.menu@1.0 +0 -0
+
+ scripts/ntp-wait-opts.texi@1.1 +58 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait-opts.texi
+
+ scripts/ntp-wait-opts.texi@1.0 +0 -0
+
+ scripts/ntp-wait.1@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.1
+
+ scripts/ntp-wait.1@1.0 +0 -0
+
+ scripts/ntp-wait.html@1.1 +174 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.html
+
+ scripts/ntp-wait.html@1.0 +0 -0
+
+ scripts/ntp-wait.texi@1.1 +91 -0
+ BitKeeper file /home/stenn/ntp-dev/scripts/ntp-wait.texi
+
+ scripts/ntp-wait.texi@1.0 +0 -0
+
+ChangeSet@1.2554, 2011-06-14 08:10:15+00:00, stenn@psp-fb2.ntp.org
+ Update the ntpd autogen docs
+
+ ChangeLog@1.924 +1 -0
+ Update the ntpd autogen docs
+
+ ntpd/Makefile.am@1.106 +3 -1
+ Update the ntpd autogen docs
+
+ ntpd/ntpd-opts.def@1.7 +590 -2
+ Update the ntpd autogen docs
+
+ChangeSet@1.2553, 2011-06-13 22:24:35-07:00, stenn@psp-os1.ntp.org
+ Update the ntpsnmpd autogen docs
+
+ ChangeLog@1.923 +1 -0
+ Update the ntpsnmpd autogen docs
+
+ ntpsnmpd/Makefile.am@1.30 +3 -1
+ Update the ntpsnmpd autogen docs
+
+ ntpsnmpd/ntpsnmpd-opts.def@1.3 +51 -0
+ Update the ntpsnmpd autogen docs
+
+ChangeSet@1.2552, 2011-06-12 14:53:25-07:00, stenn@psp-os1.ntp.org
+ Use autogen to produce ntp-keygen docs
+
+ ChangeLog@1.922 +1 -0
+ Use autogen to produce ntp-keygen docs
+
+ util/Makefile.am@1.62 +3 -1
+ Use autogen to produce ntp-keygen docs
+
+ util/ntp-keygen-opts.def@1.14 +743 -4
+ Use autogen to produce ntp-keygen docs
+
+ChangeSet@1.2551, 2011-06-12 14:52:05-07:00, stenn@psp-os1.ntp.org
+ Add "license name" to ntp.lic for autogen-5.11.10
+
+ ChangeLog@1.921 +1 -0
+ Add "license name" to ntp.lic for autogen-5.11.10
+
+ sntp/include/ntp.lic@1.5 +2 -0
+ Add "license name" to ntp.lic for autogen-5.11.10
+
+ChangeSet@1.2550, 2011-06-12 14:40:43-07:00, stenn@psp-os1.ntp.org
+ Prepare for ntp.keys.5
+
+ ChangeLog@1.920 +1 -0
+ Prepare for ntp.keys.5
+
+ ntpd/ntp.keys.def@1.1 +153 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpd/ntp.keys.def
+
+ ntpd/ntp.keys.def@1.0 +0 -0
+
+ChangeSet@1.2544.1.5, 2011-06-07 10:34:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P181
+ TAG: NTP_4_2_7P181
+
+ ChangeLog@1.915.1.4 +1 -0
+ NTP_4_2_7P181
+
+ ntpd/ntpd-opts.c@1.186 +3 -3
+ NTP_4_2_7P181
+
+ ntpd/ntpd-opts.h@1.186 +3 -3
+ NTP_4_2_7P181
+
+ ntpd/ntpd-opts.texi@1.184 +2 -2
+ NTP_4_2_7P181
+
+ ntpd/ntpd.1@1.184 +2 -2
+ NTP_4_2_7P181
+
+ ntpdc/ntpdc-opts.c@1.181 +3 -3
+ NTP_4_2_7P181
+
+ ntpdc/ntpdc-opts.h@1.181 +3 -3
+ NTP_4_2_7P181
+
+ ntpdc/ntpdc-opts.texi@1.181 +2 -2
+ NTP_4_2_7P181
+
+ ntpdc/ntpdc.1@1.181 +2 -2
+ NTP_4_2_7P181
+
+ ntpdc/ntpdc.html@1.9 +2 -2
+ NTP_4_2_7P181
+
+ ntpq/ntpq-opts.c@1.183 +3 -3
+ NTP_4_2_7P181
+
+ ntpq/ntpq-opts.h@1.183 +3 -3
+ NTP_4_2_7P181
+
+ ntpq/ntpq-opts.texi@1.183 +2 -2
+ NTP_4_2_7P181
+
+ ntpq/ntpq.1@1.183 +2 -2
+ NTP_4_2_7P181
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.183 +3 -3
+ NTP_4_2_7P181
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.183 +3 -3
+ NTP_4_2_7P181
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.183 +2 -2
+ NTP_4_2_7P181
+
+ ntpsnmpd/ntpsnmpd.1@1.183 +2 -2
+ NTP_4_2_7P181
+
+ packageinfo.sh@1.184 +1 -1
+ NTP_4_2_7P181
+
+ sntp/sntp-opts.c@1.177 +3 -3
+ NTP_4_2_7P181
+
+ sntp/sntp-opts.h@1.177 +3 -3
+ NTP_4_2_7P181
+
+ sntp/sntp-opts.texi@1.177 +2 -2
+ NTP_4_2_7P181
+
+ sntp/sntp.1@1.177 +2 -2
+ NTP_4_2_7P181
+
+ sntp/sntp.html@1.177 +2 -2
+ NTP_4_2_7P181
+
+ util/ntp-keygen-opts.c@1.181 +3 -3
+ NTP_4_2_7P181
+
+ util/ntp-keygen-opts.h@1.181 +3 -3
+ NTP_4_2_7P181
+
+ util/ntp-keygen-opts.texi@1.184 +2 -2
+ NTP_4_2_7P181
+
+ util/ntp-keygen.1@1.184 +2 -2
+ NTP_4_2_7P181
+
+ChangeSet@1.2544.1.4, 2011-06-07 02:25:51-04:00, stenn@deacon.udel.edu
+ [Bug 1938] addr_eqprefix() doesn't clear enough storage
+
+ ChangeLog@1.915.1.3 +1 -0
+ [Bug 1938] addr_eqprefix() doesn't clear enough storage
+
+ ntpd/ntp_io.c@1.357 +2 -2
+ [Bug 1938] addr_eqprefix() doesn't clear enough storage
+
+ChangeSet@1.2544.1.3, 2011-06-06 18:10:10-04:00, stenn@deacon.udel.edu
+ p180 was: Upgrade to libevent-2.0.12
+
+ ChangeLog@1.915.1.2 +1 -0
+ p180 was: Upgrade to libevent-2.0.12
+
+ChangeSet@1.2544.1.2, 2011-06-06 10:41:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P180
+ TAG: NTP_4_2_7P180
+
+ ChangeLog@1.915.1.1 +1 -0
+ NTP_4_2_7P180
+
+ ntpd/ntpd-opts.c@1.185 +3 -3
+ NTP_4_2_7P180
+
+ ntpd/ntpd-opts.h@1.185 +3 -3
+ NTP_4_2_7P180
+
+ ntpd/ntpd-opts.texi@1.183 +2 -2
+ NTP_4_2_7P180
+
+ ntpd/ntpd.1@1.183 +2 -2
+ NTP_4_2_7P180
+
+ ntpdc/ntpdc-opts.c@1.180 +3 -3
+ NTP_4_2_7P180
+
+ ntpdc/ntpdc-opts.h@1.180 +3 -3
+ NTP_4_2_7P180
+
+ ntpdc/ntpdc-opts.texi@1.180 +2 -2
+ NTP_4_2_7P180
+
+ ntpdc/ntpdc.1@1.180 +2 -2
+ NTP_4_2_7P180
+
+ ntpdc/ntpdc.html@1.8 +2 -2
+ NTP_4_2_7P180
+
+ ntpq/ntpq-opts.c@1.182 +3 -3
+ NTP_4_2_7P180
+
+ ntpq/ntpq-opts.h@1.182 +3 -3
+ NTP_4_2_7P180
+
+ ntpq/ntpq-opts.texi@1.182 +2 -2
+ NTP_4_2_7P180
+
+ ntpq/ntpq.1@1.182 +2 -2
+ NTP_4_2_7P180
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.182 +3 -3
+ NTP_4_2_7P180
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.182 +3 -3
+ NTP_4_2_7P180
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.182 +2 -2
+ NTP_4_2_7P180
+
+ ntpsnmpd/ntpsnmpd.1@1.182 +2 -2
+ NTP_4_2_7P180
+
+ packageinfo.sh@1.183 +1 -1
+ NTP_4_2_7P180
+
+ sntp/sntp-opts.c@1.176 +3 -3
+ NTP_4_2_7P180
+
+ sntp/sntp-opts.h@1.176 +3 -3
+ NTP_4_2_7P180
+
+ sntp/sntp-opts.texi@1.176 +2 -2
+ NTP_4_2_7P180
+
+ sntp/sntp.1@1.176 +2 -2
+ NTP_4_2_7P180
+
+ sntp/sntp.html@1.176 +2 -2
+ NTP_4_2_7P180
+
+ util/ntp-keygen-opts.c@1.180 +3 -3
+ NTP_4_2_7P180
+
+ util/ntp-keygen-opts.h@1.180 +3 -3
+ NTP_4_2_7P180
+
+ util/ntp-keygen-opts.texi@1.183 +2 -2
+ NTP_4_2_7P180
+
+ util/ntp-keygen.1@1.183 +2 -2
+ NTP_4_2_7P180
+
+ChangeSet@1.2548, 2011-06-06 03:59:08-04:00, stenn@psp-deb1.ntp.org
+ More sntp.1 cleanups
+
+ BitKeeper/deleted/3d/agmdoc-cmd.tpl~35a32d60c0791c7f@1.3 +0 -0
+ Delete: sntp/ag-tpl/agmdoc-cmd.tpl
+
+ BitKeeper/deleted/97/mdoc2man~9f658b3ccb67c829@1.3 +0 -0
+ Delete: sntp/ag-tpl/mdoc2man
+
+ BitKeeper/deleted/bf/aginfo.tpl~67b16ec8b8871afe@1.2 +0 -0
+ Delete: sntp/ag-tpl/aginfo.tpl
+
+ BitKeeper/deleted/f2/cmd-doc.tlib~e5f798f139ab3308@1.5 +0 -0
+ Delete: sntp/ag-tpl/cmd-doc.tlib
+
+ ChangeLog@1.918 +1 -0
+ More sntp.1 cleanups
+
+ sntp/sntp-opts.def@1.32 +0 -10
+ More sntp.1 cleanups
+
+ChangeSet@1.2461.1.6, 2011-06-05 11:23:00+00:00, davehart@shiny.ad.hartbrothers.com
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/ChangeLog@1.3 +40 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/Makefile.am@1.1.1.3 +16 -1
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/README@1.3 +5 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/buffer.c@1.4 +41 -16
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/configure.in@1.1.1.3 +15 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/event.c@1.1.1.3 +5 -1
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/event_iocp.c@1.4 +4 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/evport.c@1.1.1.2 +85 -112
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/evthread_win32.c@1.4 +4 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/http.c@1.1.1.3 +45 -11
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/listener.c@1.4 +4 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/select.c@1.1.1.2 +3 -3
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/test/regress_http.c@1.1.1.3 +3 -3
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ sntp/libevent/test/regress_ssl.c@1.3 +1 -0
+ Update to libevent HEAD as of 20110604, e40bafe796a8e544e9e54e247cb3aa30c95e06b0
+ Snapshot of libevent 2.1, as of 2.0.12-stable release.
+
+ChangeSet@1.2461.1.5, 2011-06-05 11:16:07+00:00, davehart@shiny.ad.hartbrothers.com
+ cleanup arlib cruft.
+ add sntp/libevent/.git and .gitignore to ease shared bk/git repo for libevent upstream.
+
+ BitKeeper/etc/ignore@1.77.1.1 +2 -4
+ cleanup arlib cruft.
+ add sntp/libevent/.git and .gitignore to ease shared bk/git repo for libevent upstream.
+
+
+ChangeSet@1.2546, 2011-06-04 04:22:32-04:00, stenn@psp-deb1.ntp.org
+ Produce ntpq.1 with the new autogen macros
+
+ ChangeLog@1.917 +1 -0
+ Produce ntpq.1 with the new autogen macros
+
+ ntpq/Makefile.am@1.59 +6 -1
+ Produce ntpq.1 with the new autogen macros
+
+ ntpq/ntpq-opts.def@1.15 +254 -259
+ Produce ntpq.1 with the new autogen macros
+
+ChangeSet@1.2545, 2011-06-04 02:57:47-04:00, stenn@psp-deb1.ntp.org
+ Remove the deprecated "detail" stanza from ntpdc-opts.def
+
+ ChangeLog@1.916 +1 -0
+ Remove the deprecated "detail" stanza from ntpdc-opts.def
+
+ ntpdc/ntpdc-opts.def@1.18 +0 -20
+ Remove the deprecated "detail" stanza from ntpdc-opts.def
+
+ChangeSet@1.2544, 2011-06-03 08:00:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P179
+ TAG: NTP_4_2_7P179
+
+ ChangeLog@1.915 +1 -0
+ NTP_4_2_7P179
+
+ ntpd/ntpd-opts.c@1.184 +3 -3
+ NTP_4_2_7P179
+
+ ntpd/ntpd-opts.h@1.184 +3 -3
+ NTP_4_2_7P179
+
+ ntpd/ntpd-opts.texi@1.182 +2 -2
+ NTP_4_2_7P179
+
+ ntpd/ntpd.1@1.182 +2 -2
+ NTP_4_2_7P179
+
+ ntpdc/ntpdc-opts.c@1.179 +3 -3
+ NTP_4_2_7P179
+
+ ntpdc/ntpdc-opts.h@1.179 +3 -3
+ NTP_4_2_7P179
+
+ ntpdc/ntpdc-opts.texi@1.179 +2 -2
+ NTP_4_2_7P179
+
+ ntpdc/ntpdc.1@1.179 +5 -5
+ NTP_4_2_7P179
+
+ ntpdc/ntpdc.html@1.7 +2 -2
+ NTP_4_2_7P179
+
+ ntpq/ntpq-opts.c@1.181 +3 -3
+ NTP_4_2_7P179
+
+ ntpq/ntpq-opts.h@1.181 +3 -3
+ NTP_4_2_7P179
+
+ ntpq/ntpq-opts.texi@1.181 +2 -2
+ NTP_4_2_7P179
+
+ ntpq/ntpq.1@1.181 +2 -2
+ NTP_4_2_7P179
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.181 +3 -3
+ NTP_4_2_7P179
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.181 +3 -3
+ NTP_4_2_7P179
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.181 +2 -2
+ NTP_4_2_7P179
+
+ ntpsnmpd/ntpsnmpd.1@1.181 +2 -2
+ NTP_4_2_7P179
+
+ packageinfo.sh@1.182 +1 -1
+ NTP_4_2_7P179
+
+ sntp/sntp-opts.c@1.175 +3 -3
+ NTP_4_2_7P179
+
+ sntp/sntp-opts.h@1.175 +3 -3
+ NTP_4_2_7P179
+
+ sntp/sntp-opts.texi@1.175 +2 -2
+ NTP_4_2_7P179
+
+ sntp/sntp.1@1.175 +9 -5
+ NTP_4_2_7P179
+
+ sntp/sntp.html@1.175 +2 -2
+ NTP_4_2_7P179
+
+ util/ntp-keygen-opts.c@1.179 +3 -3
+ NTP_4_2_7P179
+
+ util/ntp-keygen-opts.h@1.179 +3 -3
+ NTP_4_2_7P179
+
+ util/ntp-keygen-opts.texi@1.182 +2 -2
+ NTP_4_2_7P179
+
+ util/ntp-keygen.1@1.182 +2 -2
+ NTP_4_2_7P179
+
+ChangeSet@1.2543, 2011-06-03 02:55:13-04:00, stenn@psp-deb1.ntp.org
+ Upgrade local autoopts templates to 5.11.10pre5
+
+ ChangeLog@1.914 +1 -0
+ Upgrade local autoopts templates to 5.11.10pre5
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.2 +19 -18
+ Upgrade local autoopts templates to 5.11.10pre5
+
+ sntp/ag-tpl/mdoc2man@1.2 +15 -12
+ Upgrade local autoopts templates to 5.11.10pre5
+
+ChangeSet@1.2542, 2011-06-02 15:51:22-04:00, stenn@psp-deb1.ntp.org
+ Update cmd-doc.tlib to autogen-5.11.10pre5
+
+ ChangeLog@1.913 +1 -0
+ Update cmd-doc.tlib to autogen-5.11.10pre5
+
+ sntp/ag-tpl/cmd-doc.tlib@1.4 +10 -9
+ Update cmd-doc.tlib to autogen-5.11.10pre5
+
+ChangeSet@1.2541, 2011-06-02 07:29:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P178
+ TAG: NTP_4_2_7P178
+
+ ChangeLog@1.912 +1 -0
+ NTP_4_2_7P178
+
+ ntpd/ntpd-opts.c@1.183 +5 -4
+ NTP_4_2_7P178
+
+ ntpd/ntpd-opts.h@1.183 +3 -3
+ NTP_4_2_7P178
+
+ ntpd/ntpd-opts.texi@1.181 +2 -2
+ NTP_4_2_7P178
+
+ ntpd/ntpd.1@1.181 +2 -2
+ NTP_4_2_7P178
+
+ ntpdc/ntpdc-opts.c@1.178 +5 -4
+ NTP_4_2_7P178
+
+ ntpdc/ntpdc-opts.h@1.178 +3 -3
+ NTP_4_2_7P178
+
+ ntpdc/ntpdc-opts.texi@1.178 +2 -2
+ NTP_4_2_7P178
+
+ ntpdc/ntpdc.1@1.178 +2 -2
+ NTP_4_2_7P178
+
+ ntpdc/ntpdc.html@1.6 +2 -2
+ NTP_4_2_7P178
+
+ ntpq/ntpq-opts.c@1.180 +5 -4
+ NTP_4_2_7P178
+
+ ntpq/ntpq-opts.h@1.180 +3 -3
+ NTP_4_2_7P178
+
+ ntpq/ntpq-opts.texi@1.180 +2 -2
+ NTP_4_2_7P178
+
+ ntpq/ntpq.1@1.180 +2 -2
+ NTP_4_2_7P178
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.180 +5 -4
+ NTP_4_2_7P178
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.180 +3 -3
+ NTP_4_2_7P178
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.180 +2 -2
+ NTP_4_2_7P178
+
+ ntpsnmpd/ntpsnmpd.1@1.180 +2 -2
+ NTP_4_2_7P178
+
+ packageinfo.sh@1.181 +1 -1
+ NTP_4_2_7P178
+
+ sntp/sntp-opts.c@1.174 +5 -4
+ NTP_4_2_7P178
+
+ sntp/sntp-opts.h@1.174 +3 -3
+ NTP_4_2_7P178
+
+ sntp/sntp-opts.texi@1.174 +2 -2
+ NTP_4_2_7P178
+
+ sntp/sntp.1@1.174 +2 -2
+ NTP_4_2_7P178
+
+ sntp/sntp.html@1.174 +2 -2
+ NTP_4_2_7P178
+
+ util/ntp-keygen-opts.c@1.178 +5 -4
+ NTP_4_2_7P178
+
+ util/ntp-keygen-opts.h@1.178 +3 -3
+ NTP_4_2_7P178
+
+ util/ntp-keygen-opts.texi@1.181 +2 -2
+ NTP_4_2_7P178
+
+ util/ntp-keygen.1@1.181 +2 -2
+ NTP_4_2_7P178
+
+ChangeSet@1.2540, 2011-06-02 02:25:52-04:00, stenn@psp-deb1.ntp.org
+ Update the std_def_list to include the ntp.lic file.
+
+ ChangeLog@1.911 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ ntpd/Makefile.am@1.105 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ ntpdc/Makefile.am@1.63 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ ntpq/Makefile.am@1.58 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ ntpsnmpd/Makefile.am@1.29 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ sntp/Makefile.am@1.63 +11 -3
+ Update the std_def_list to include the ntp.lic file.
+
+ util/Makefile.am@1.61 +1 -0
+ Update the std_def_list to include the ntp.lic file.
+
+ChangeSet@1.2539, 2011-06-01 22:03:22-04:00, stenn@deacon.udel.edu
+ Distribute ntp.lic
+
+ ChangeLog@1.910 +2 -0
+ Distribute ntp.lic
+
+ChangeSet@1.2538, 2011-06-01 21:59:17-04:00, stenn@deacon.udel.edu
+ Distribute ntp.lic
+
+ sntp/include/Makefile.am@1.2 +1 -0
+ Distribute ntp.lic
+
+ sntp/include/ntp.lic@1.4 +0 -0
+ Rename: sntp/ag-tpl/ntp.lic -> sntp/include/ntp.lic
+
+ sntp/ag-tpl/ntp.lic@1.3 +1 -0
+ Add http://ntp.org/license to the ntp.lic file
+
+ChangeSet@1.2537, 2011-06-01 11:01:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P177
+ TAG: NTP_4_2_7P177
+
+ ChangeLog@1.909 +1 -0
+ NTP_4_2_7P177
+
+ ntpd/ntpd-opts.c@1.182 +21 -11
+ NTP_4_2_7P177
+
+ ntpd/ntpd-opts.h@1.182 +4 -7
+ NTP_4_2_7P177
+
+ ntpd/ntpd-opts.texi@1.180 +3 -3
+ NTP_4_2_7P177
+
+ ntpd/ntpd.1@1.180 +4 -9
+ NTP_4_2_7P177
+
+ ntpdc/ntpdc-opts.c@1.177 +21 -11
+ NTP_4_2_7P177
+
+ ntpdc/ntpdc-opts.h@1.177 +4 -7
+ NTP_4_2_7P177
+
+ ntpdc/ntpdc-opts.texi@1.177 +2 -2
+ NTP_4_2_7P177
+
+ ntpdc/ntpdc.1@1.177 +3 -7
+ NTP_4_2_7P177
+
+ ntpdc/ntpdc.html@1.5 +2 -2
+ NTP_4_2_7P177
+
+ ntpq/ntpq-opts.c@1.179 +21 -11
+ NTP_4_2_7P177
+
+ ntpq/ntpq-opts.h@1.179 +4 -7
+ NTP_4_2_7P177
+
+ ntpq/ntpq-opts.texi@1.179 +3 -3
+ NTP_4_2_7P177
+
+ ntpq/ntpq.1@1.179 +4 -9
+ NTP_4_2_7P177
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.179 +21 -11
+ NTP_4_2_7P177
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.179 +4 -7
+ NTP_4_2_7P177
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.179 +3 -3
+ NTP_4_2_7P177
+
+ ntpsnmpd/ntpsnmpd.1@1.179 +4 -9
+ NTP_4_2_7P177
+
+ packageinfo.sh@1.180 +1 -1
+ NTP_4_2_7P177
+
+ sntp/sntp-opts.c@1.173 +21 -11
+ NTP_4_2_7P177
+
+ sntp/sntp-opts.h@1.173 +4 -7
+ NTP_4_2_7P177
+
+ sntp/sntp-opts.texi@1.173 +2 -2
+ NTP_4_2_7P177
+
+ sntp/sntp.1@1.173 +3 -7
+ NTP_4_2_7P177
+
+ sntp/sntp.html@1.173 +2 -2
+ NTP_4_2_7P177
+
+ util/ntp-keygen-opts.c@1.177 +21 -11
+ NTP_4_2_7P177
+
+ util/ntp-keygen-opts.h@1.177 +4 -7
+ NTP_4_2_7P177
+
+ util/ntp-keygen-opts.texi@1.180 +3 -3
+ NTP_4_2_7P177
+
+ util/ntp-keygen.1@1.180 +4 -9
+ NTP_4_2_7P177
+
+ChangeSet@1.2536, 2011-06-01 03:26:00-04:00, stenn@deacon.udel.edu
+ Clean up the ntp.lic file
+
+ ChangeLog@1.908 +1 -0
+ Clean up the ntp.lic file
+
+ sntp/ag-tpl/ntp.lic@1.2 +2 -2
+ Clean up the ntp.lic file
+
+ChangeSet@1.2535, 2011-06-01 03:14:41-04:00, stenn@psp-deb1.ntp.org
+ Provide ntp.lic for the new autogen license template
+
+ sntp/ag-tpl/ntp.lic@1.1 +15 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/ntp.lic
+
+ sntp/ag-tpl/ntp.lic@1.0 +0 -0
+
+ChangeSet@1.2534, 2011-06-01 03:11:05-04:00, stenn@psp-deb1.ntp.org
+ Use the latest autogen's new copyright template code
+
+ ChangeLog@1.907 +1 -0
+ Use the latest autogen's new copyright template code
+
+ ntpd/Makefile.am@1.104 +1 -1
+ Use the latest autogen's new copyright template code
+
+ ntpq/Makefile.am@1.57 +1 -1
+ Use the latest autogen's new copyright template code
+
+ ntpsnmpd/Makefile.am@1.28 +1 -1
+ Use the latest autogen's new copyright template code
+
+ sntp/include/copyright.def@1.18 +2 -6
+ Use the latest autogen's new copyright template code
+
+ util/Makefile.am@1.60 +1 -1
+ Use the latest autogen's new copyright template code
+
+ChangeSet@1.2533, 2011-06-01 02:07:55-04:00, stenn@deacon.udel.edu
+ p176 cleaned up sntp docs and autogen doc templates
+
+ ChangeLog@1.906 +2 -0
+ p176 cleaned up sntp docs and autogen doc templates
+
+ChangeSet@1.2532, 2011-05-31 11:00:25+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P176
+ TAG: NTP_4_2_7P176
+
+ ChangeLog@1.905 +1 -0
+ NTP_4_2_7P176
+
+ ntpd/ntpd-opts.c@1.181 +3 -3
+ NTP_4_2_7P176
+
+ ntpd/ntpd-opts.h@1.181 +3 -3
+ NTP_4_2_7P176
+
+ ntpd/ntpd-opts.texi@1.179 +2 -2
+ NTP_4_2_7P176
+
+ ntpd/ntpd.1@1.179 +2 -2
+ NTP_4_2_7P176
+
+ ntpdc/ntpdc-opts.c@1.176 +3 -3
+ NTP_4_2_7P176
+
+ ntpdc/ntpdc-opts.h@1.176 +3 -3
+ NTP_4_2_7P176
+
+ ntpdc/ntpdc-opts.texi@1.176 +3 -3
+ NTP_4_2_7P176
+
+ ntpdc/ntpdc.1@1.176 +2 -2
+ NTP_4_2_7P176
+
+ ntpdc/ntpdc.html@1.4 +3 -3
+ NTP_4_2_7P176
+
+ ntpq/ntpq-opts.c@1.178 +3 -3
+ NTP_4_2_7P176
+
+ ntpq/ntpq-opts.h@1.178 +3 -3
+ NTP_4_2_7P176
+
+ ntpq/ntpq-opts.texi@1.178 +2 -2
+ NTP_4_2_7P176
+
+ ntpq/ntpq.1@1.178 +2 -2
+ NTP_4_2_7P176
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.178 +3 -3
+ NTP_4_2_7P176
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.178 +3 -3
+ NTP_4_2_7P176
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.178 +2 -2
+ NTP_4_2_7P176
+
+ ntpsnmpd/ntpsnmpd.1@1.178 +2 -2
+ NTP_4_2_7P176
+
+ packageinfo.sh@1.179 +1 -1
+ NTP_4_2_7P176
+
+ sntp/sntp-opts.c@1.172 +4 -10
+ NTP_4_2_7P176
+
+ sntp/sntp-opts.h@1.172 +3 -3
+ NTP_4_2_7P176
+
+ sntp/sntp-opts.texi@1.172 +4 -13
+ NTP_4_2_7P176
+
+ sntp/sntp.1@1.172 +3 -3
+ NTP_4_2_7P176
+
+ sntp/sntp.html@1.172 +4 -13
+ NTP_4_2_7P176
+
+ util/ntp-keygen-opts.c@1.176 +3 -3
+ NTP_4_2_7P176
+
+ util/ntp-keygen-opts.h@1.176 +3 -3
+ NTP_4_2_7P176
+
+ util/ntp-keygen-opts.texi@1.179 +2 -2
+ NTP_4_2_7P176
+
+ util/ntp-keygen.1@1.179 +2 -2
+ NTP_4_2_7P176
+
+ChangeSet@1.2529.1.1, 2011-05-30 11:16:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P175
+ TAG: NTP_4_2_7P175
+
+ ChangeLog@1.902.1.1 +1 -0
+ NTP_4_2_7P175
+
+ ntpd/ntpd-opts.c@1.180 +3 -3
+ NTP_4_2_7P175
+
+ ntpd/ntpd-opts.h@1.180 +3 -3
+ NTP_4_2_7P175
+
+ ntpd/ntpd-opts.texi@1.178 +2 -2
+ NTP_4_2_7P175
+
+ ntpd/ntpd.1@1.178 +2 -2
+ NTP_4_2_7P175
+
+ ntpdc/ntpdc-opts.c@1.175 +3 -3
+ NTP_4_2_7P175
+
+ ntpdc/ntpdc-opts.h@1.175 +3 -3
+ NTP_4_2_7P175
+
+ ntpdc/ntpdc-opts.texi@1.175 +2 -2
+ NTP_4_2_7P175
+
+ ntpdc/ntpdc.1@1.175 +13 -12
+ NTP_4_2_7P175
+
+ ntpdc/ntpdc.html@1.3 +2 -2
+ NTP_4_2_7P175
+
+ ntpq/ntpq-opts.c@1.177 +3 -3
+ NTP_4_2_7P175
+
+ ntpq/ntpq-opts.h@1.177 +3 -3
+ NTP_4_2_7P175
+
+ ntpq/ntpq-opts.texi@1.177 +2 -2
+ NTP_4_2_7P175
+
+ ntpq/ntpq.1@1.177 +2 -2
+ NTP_4_2_7P175
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.177 +3 -3
+ NTP_4_2_7P175
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.177 +3 -3
+ NTP_4_2_7P175
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.177 +2 -2
+ NTP_4_2_7P175
+
+ ntpsnmpd/ntpsnmpd.1@1.177 +2 -2
+ NTP_4_2_7P175
+
+ packageinfo.sh@1.178 +1 -1
+ NTP_4_2_7P175
+
+ sntp/sntp-opts.c@1.171 +3 -3
+ NTP_4_2_7P175
+
+ sntp/sntp-opts.h@1.171 +3 -3
+ NTP_4_2_7P175
+
+ sntp/sntp-opts.texi@1.171 +2 -2
+ NTP_4_2_7P175
+
+ sntp/sntp.1@1.171 +9 -6
+ NTP_4_2_7P175
+
+ sntp/sntp.html@1.171 +2 -2
+ NTP_4_2_7P175
+
+ util/ntp-keygen-opts.c@1.175 +3 -3
+ NTP_4_2_7P175
+
+ util/ntp-keygen-opts.h@1.175 +3 -3
+ NTP_4_2_7P175
+
+ util/ntp-keygen-opts.texi@1.178 +2 -2
+ NTP_4_2_7P175
+
+ util/ntp-keygen.1@1.178 +2 -2
+ NTP_4_2_7P175
+
+ChangeSet@1.2530, 2011-05-30 04:44:11-04:00, stenn@psp-deb1.ntp.org
+ sntp documentation updates
+
+ ChangeLog@1.903 +1 -0
+ sntp documentation cleanup
+
+ sntp/ag-tpl/aginfo.tpl@1.1 +308 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/aginfo.tpl
+
+ sntp/ag-tpl/aginfo.tpl@1.0 +0 -0
+
+ sntp/ag-tpl/mdoc2man@1.1 +284 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/mdoc2man
+
+ sntp/ag-tpl/mdoc2man@1.0 +0 -0
+
+ sntp/sntp-opts.def@1.31 +31 -42
+ documentation cleanup
+
+ChangeSet@1.2529, 2011-05-29 21:36:04-04:00, stenn@psp-deb1.ntp.org
+ cmd-doc.tlib cleanup from Bruce Korb
+
+ ChangeLog@1.902 +1 -0
+ cmd-doc.tlib cleanup from Bruce Korb
+
+ sntp/ag-tpl/cmd-doc.tlib@1.3 +50 -35
+ cmd-doc.tlib cleanup from Bruce Korb
+
+ChangeSet@1.2528, 2011-05-29 21:28:17-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1936] Correctly set IPV6_MULTICAST_LOOP
+
+ ChangeLog@1.901 +1 -0
+ [Bug 1936] Correctly set IPV6_MULTICAST_LOOP
+
+ ntpd/ntp_io.c@1.356 +7 -2
+ [Bug 1936] Correctly set IPV6_MULTICAST_LOOP
+
+ChangeSet@1.2527, 2011-05-28 11:03:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P174
+ TAG: NTP_4_2_7P174
+
+ ChangeLog@1.900 +1 -0
+ NTP_4_2_7P174
+
+ ntpd/ntpd-opts.c@1.179 +7 -7
+ NTP_4_2_7P174
+
+ ntpd/ntpd-opts.h@1.179 +5 -5
+ NTP_4_2_7P174
+
+ ntpd/ntpd-opts.texi@1.177 +2 -2
+ NTP_4_2_7P174
+
+ ntpd/ntpd.1@1.177 +4 -4
+ NTP_4_2_7P174
+
+ ntpdc/ntpdc-opts.c@1.174 +95 -95
+ NTP_4_2_7P174
+
+ ntpdc/ntpdc-opts.h@1.174 +36 -36
+ NTP_4_2_7P174
+
+ ntpdc/ntpdc-opts.texi@1.174 +20 -22
+ NTP_4_2_7P174
+
+ ntpdc/ntpdc.1@1.174 +719 -86
+ NTP_4_2_7P174
+
+ ntpdc/ntpdc.html@1.2 +50 -73
+ NTP_4_2_7P174
+
+ ntpq/ntpq-opts.c@1.176 +10 -10
+ NTP_4_2_7P174
+
+ ntpq/ntpq-opts.h@1.176 +5 -5
+ NTP_4_2_7P174
+
+ ntpq/ntpq-opts.texi@1.176 +7 -10
+ NTP_4_2_7P174
+
+ ntpq/ntpq.1@1.176 +8 -9
+ NTP_4_2_7P174
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.176 +7 -7
+ NTP_4_2_7P174
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.176 +5 -5
+ NTP_4_2_7P174
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.176 +2 -2
+ NTP_4_2_7P174
+
+ ntpsnmpd/ntpsnmpd.1@1.176 +4 -4
+ NTP_4_2_7P174
+
+ packageinfo.sh@1.177 +1 -1
+ NTP_4_2_7P174
+
+ sntp/sntp-opts.c@1.170 +15 -13
+ NTP_4_2_7P174
+
+ sntp/sntp-opts.h@1.170 +5 -5
+ NTP_4_2_7P174
+
+ sntp/sntp-opts.texi@1.170 +21 -20
+ NTP_4_2_7P174
+
+ sntp/sntp.1@1.170 +27 -36
+ NTP_4_2_7P174
+
+ sntp/sntp.html@1.170 +19 -22
+ NTP_4_2_7P174
+
+ util/ntp-keygen-opts.c@1.174 +10 -10
+ NTP_4_2_7P174
+
+ util/ntp-keygen-opts.h@1.174 +5 -5
+ NTP_4_2_7P174
+
+ util/ntp-keygen-opts.texi@1.177 +8 -9
+ NTP_4_2_7P174
+
+ util/ntp-keygen.1@1.177 +8 -9
+ NTP_4_2_7P174
+
+ChangeSet@1.2526, 2011-05-27 16:40:04-04:00, stenn@psp-deb1.ntp.org
+ sntp documentation cleanup
+
+ sntp/include/debug-opt.def@1.7 +4 -7
+ sntp documentation cleanup
+
+ sntp/sntp-opts.def@1.30 +9 -9
+ sntp documentation cleanup
+
+ChangeSet@1.2525, 2011-05-27 06:32:14-04:00, stenn@psp-deb1.ntp.org
+ sntp documentation cleanup (for autogen)
+
+ ChangeLog@1.899 +1 -0
+ sntp documentation cleanup (for autogen)
+
+ sntp/ag-tpl/cmd-doc.tlib@1.2 +42 -151
+ documentation cleanup (for autogen)
+
+ sntp/include/copyright.def@1.17 +2 -2
+ documentation cleanup (for autogen)
+
+ sntp/sntp-opts.def@1.29 +28 -5
+ documentation cleanup (for autogen)
+
+ChangeSet@1.2524, 2011-05-27 05:15:52-04:00, stenn@psp-deb1.ntp.org
+ ntpdc documentation cleanup
+
+ ChangeLog@1.898 +1 -0
+ ntpdc documentation cleanup
+
+ ntpdc/ntpdc-opts.def@1.17 +4 -2
+ ntpdc documentation cleanup
+
+ChangeSet@1.2523, 2011-05-26 18:54:06-04:00, stenn@psp-deb1.ntp.org
+ Don't build libevent with openssl support
+
+ ChangeLog@1.897 +2 -0
+ Don't build libevent with openssl support
+
+ sntp/m4/ntp_libevent.m4@1.8 +1 -0
+ Don't build libevent with openssl support
+
+ChangeSet@1.2461.1.4, 2011-05-26 07:10:45+00:00, davehart@shiny.ad.hartbrothers.com
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/ChangeLog@1.2 +84 -0
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/Makefile.am@1.1.1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/Makefile.nmake@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/README@1.2 +8 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.1.1.2 +3 -0
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/arc4random.c@1.1.1.2 +5 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/buffer.c@1.3 +12 -12
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent-internal.h@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent.c@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent_async.c@1.3 +10 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent_filter.c@1.3 +2 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent_openssl.c@1.3 +2 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent_pair.c@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/bufferevent_sock.c@1.3 +7 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/compat/sys/queue.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/configure.in@1.1.1.2 +58 -25
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evbuffer-internal.h@1.3 +4 -4
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evdns.3@1.1 +322 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/evdns.3
+
+ sntp/libevent/evdns.3@1.0 +0 -0
+
+ sntp/libevent/evdns.c@1.1.1.3 +20 -8
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/event-internal.h@1.1.1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/event.3@1.1 +624 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/event.3
+
+ sntp/libevent/event.3@1.0 +0 -0
+
+ sntp/libevent/event.c@1.1.1.2 +12 -12
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/event.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/event_iocp.c@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/event_tagging.c@1.3 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evmap.c@1.3 +4 -4
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evrpc.c@1.3 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evthread-internal.h@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evthread.c@1.1.1.2 +1 -0
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evthread_win32.c@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/evutil.c@1.1.1.2 +19 -19
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/http.c@1.1.1.2 +165 -55
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/Makefile.am@1.1.1.1 +9 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/dns.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/dns_compat.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/event.h@1.1.1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/rpc.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/thread.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/include/event2/util.h@1.2 +8 -8
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/iocp-internal.h@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/kqueue.c@1.3 +37 -9
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/libevent_openssl.pc.in@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/listener.c@1.3 +6 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/log.c@1.3 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/m4/ac_backport_259_ssizet.m4@1.1 +3 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/m4/ac_backport_259_ssizet.m4
+
+ sntp/libevent/m4/ac_backport_259_ssizet.m4@1.0 +0 -0
+
+ sntp/libevent/make_epoll_table.py@1.1 +57 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/make_epoll_table.py
+
+ sntp/libevent/make_epoll_table.py@1.0 +0 -0
+
+ sntp/libevent/sample/Makefile.am@1.1.1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/dns-example.c@1.1.1.2 +4 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/event-test.c@1.2 +6 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/hello-world.c@1.1.1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/http-server.c@1.1.1.3 +11 -8
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/le-proxy.c@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/signal-test.c@1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/sample/time-test.c@1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/signal.c@1.3 +5 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/Makefile.am@1.1.1.2 +6 -4
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/Makefile.nmake@1.2 +1 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/bench.c@1.2 +11 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/bench_cascade.c@1.2 +10 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/bench_http.c@1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/bench_httpclient.c@1.1.1.2 +9 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress.c@1.2 +28 -16
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_buffer.c@1.3 +4 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_bufferevent.c@1.2 +5 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_dns.c@1.1.1.2 +5 -6
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_et.c@1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_http.c@1.1.1.2 +67 -4
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_listener.c@1.1.1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_main.c@1.3 +9 -9
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_rpc.c@1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_ssl.c@1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_testutils.c@1.1.1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_thread.c@1.2 +5 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_util.c@1.2 +7 -7
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/regress_zlib.c@1.2 +25 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-changelist.c@1.2 +7 -7
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-eof.c@1.1.1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-init.c@1.2 +2 -2
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-ratelim.c@1.1.1.2 +5 -5
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-time.c@1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/test-weof.c@1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/tinytest.c@1.2 +4 -4
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/test/tinytest_local.h@1.2 +4 -1
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ sntp/libevent/util-internal.h@1.1.1.2 +3 -3
+ libevent HEAD (will be 2.1) 20110526 95f70166df3bc9c0817ef98aa3711564300d5bb3
+
+ChangeSet@1.2517.1.14, 2011-05-25 19:29:28+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P173
+ TAG: NTP_4_2_7P173
+
+ ChangeLog@1.896 +1 -0
+ NTP_4_2_7P173
+
+ ntpd/ntpd-opts.c@1.178 +3 -3
+ NTP_4_2_7P173
+
+ ntpd/ntpd-opts.h@1.178 +3 -3
+ NTP_4_2_7P173
+
+ ntpd/ntpd-opts.texi@1.176 +2 -2
+ NTP_4_2_7P173
+
+ ntpd/ntpd.1@1.176 +2 -2
+ NTP_4_2_7P173
+
+ ntpdc/ntpdc-opts.c@1.170.1.5 +3 -3
+ NTP_4_2_7P173
+
+ ntpdc/ntpdc-opts.h@1.170.1.5 +3 -3
+ NTP_4_2_7P173
+
+ ntpdc/ntpdc-opts.texi@1.170.1.5 +2 -2
+ NTP_4_2_7P173
+
+ ntpdc/ntpdc.1@1.170.1.5 +2 -2
+ NTP_4_2_7P173
+
+ ntpq/ntpq-opts.c@1.175 +3 -3
+ NTP_4_2_7P173
+
+ ntpq/ntpq-opts.h@1.175 +3 -3
+ NTP_4_2_7P173
+
+ ntpq/ntpq-opts.texi@1.175 +2 -2
+ NTP_4_2_7P173
+
+ ntpq/ntpq.1@1.175 +2 -2
+ NTP_4_2_7P173
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.175 +3 -3
+ NTP_4_2_7P173
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.175 +3 -3
+ NTP_4_2_7P173
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.175 +2 -2
+ NTP_4_2_7P173
+
+ ntpsnmpd/ntpsnmpd.1@1.175 +2 -2
+ NTP_4_2_7P173
+
+ packageinfo.sh@1.176 +1 -1
+ NTP_4_2_7P173
+
+ sntp/sntp-opts.c@1.169 +3 -3
+ NTP_4_2_7P173
+
+ sntp/sntp-opts.h@1.169 +3 -3
+ NTP_4_2_7P173
+
+ sntp/sntp-opts.texi@1.169 +2 -2
+ NTP_4_2_7P173
+
+ sntp/sntp.1@1.169 +2 -2
+ NTP_4_2_7P173
+
+ sntp/sntp.html@1.169 +2 -2
+ NTP_4_2_7P173
+
+ util/ntp-keygen-opts.c@1.173 +3 -3
+ NTP_4_2_7P173
+
+ util/ntp-keygen-opts.h@1.173 +3 -3
+ NTP_4_2_7P173
+
+ util/ntp-keygen-opts.texi@1.176 +2 -2
+ NTP_4_2_7P173
+
+ util/ntp-keygen.1@1.176 +2 -2
+ NTP_4_2_7P173
+
+ChangeSet@1.2517.2.1, 2011-05-25 07:35:27+00:00, davehart@shiny.ad.hartbrothers.com
+ parsesolaris.c compile fails on SPARC Solaris with conflicting printf.
+ ntp_util.c compile fails on AIX and OSF with conflicting statsdir.
+
+ ChangeLog@1.893.1.1 +2 -0
+ parsesolaris.c compile fails on SPARC Solaris with conflicting printf.
+ ntp_util.c compile fails on AIX and OSF with conflicting statsdir.
+
+
+ include/ntp_fp.h@1.24 +11 -2
+ parsesolaris.c compile fails on SPARC Solaris with conflicting printf.
+
+ include/ntpd.h@1.163 +1 -4
+ ntp_util.c compile fails on AIX and OSF with conflicting statsdir.
+
+ ntpd/ntp_util.c@1.96 +1 -1
+ ntp_util.c compile fails on AIX and OSF with conflicting statsdir.
+
+ChangeSet@1.2082.4.212, 2011-05-25 05:27:31+00:00, stenn@deacon.udel.edu
NTP_4_2_6P4_BETA2
TAG: NTP_4_2_6P4_BETA2
- ChangeLog@1.715 +1 -0
+ ChangeLog@1.496.26.148 +1 -0
NTP_4_2_6P4_BETA2
- ntpd/ntpd-opts.c@1.284 +3 -3
+ ntpd/ntpd-opts.c@1.248.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpd/ntpd-opts.h@1.284 +3 -3
+ ntpd/ntpd-opts.h@1.248.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpd/ntpd-opts.texi@1.281 +2 -2
+ ntpd/ntpd-opts.texi@1.246.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpd/ntpd.1@1.281 +2 -2
+ ntpd/ntpd.1@1.246.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpdc/ntpdc-opts.c@1.280 +3 -3
+ ntpdc/ntpdc-opts.c@1.244.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpdc/ntpdc-opts.h@1.280 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpdc/ntpdc-opts.texi@1.278 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpdc/ntpdc.1@1.278 +2 -2
+ ntpdc/ntpdc.1@1.243.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpq/ntpq-opts.c@1.281 +3 -3
+ ntpq/ntpq-opts.c@1.245.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpq/ntpq-opts.h@1.281 +3 -3
+ ntpq/ntpq-opts.h@1.245.36.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpq/ntpq-opts.texi@1.279 +2 -2
+ ntpq/ntpq-opts.texi@1.244.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpq/ntpq.1@1.279 +2 -2
+ ntpq/ntpq.1@1.244.35.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpsnmpd/ntpsnmpd-opts.c@1.160 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.37.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpsnmpd/ntpsnmpd-opts.h@1.160 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.37.1 +3 -3
NTP_4_2_6P4_BETA2
- ntpsnmpd/ntpsnmpd-opts.texi@1.159 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.36.1 +2 -2
NTP_4_2_6P4_BETA2
- ntpsnmpd/ntpsnmpd.1@1.158 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.36.1 +2 -2
NTP_4_2_6P4_BETA2
- packageinfo.sh@1.295 +1 -1
+ packageinfo.sh@1.255.33.1 +1 -1
NTP_4_2_6P4_BETA2
- sntp/sntp-opts.c@1.151 +3 -3
+ sntp/sntp-opts.c@1.117.34.1 +3 -3
NTP_4_2_6P4_BETA2
- sntp/sntp-opts.h@1.151 +3 -3
+ sntp/sntp-opts.h@1.117.34.1 +3 -3
NTP_4_2_6P4_BETA2
- sntp/sntp-opts.texi@1.150 +2 -2
+ sntp/sntp-opts.texi@1.117.33.1 +2 -2
NTP_4_2_6P4_BETA2
- sntp/sntp.1@1.150 +2 -2
+ sntp/sntp.1@1.117.33.1 +2 -2
NTP_4_2_6P4_BETA2
- sntp/sntp.html@1.41 +2 -2
+ sntp/sntp.html@1.7.34.1 +2 -2
NTP_4_2_6P4_BETA2
- util/ntp-keygen-opts.c@1.283 +3 -3
+ util/ntp-keygen-opts.c@1.247.36.1 +3 -3
NTP_4_2_6P4_BETA2
- util/ntp-keygen-opts.h@1.283 +3 -3
+ util/ntp-keygen-opts.h@1.247.36.1 +3 -3
NTP_4_2_6P4_BETA2
- util/ntp-keygen-opts.texi@1.281 +2 -2
+ util/ntp-keygen-opts.texi@1.246.35.1 +2 -2
NTP_4_2_6P4_BETA2
- util/ntp-keygen.1@1.281 +2 -2
+ util/ntp-keygen.1@1.246.35.1 +2 -2
NTP_4_2_6P4_BETA2
-ChangeSet@1.2298, 2011-05-25 03:44:32+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2517.1.10, 2011-05-25 03:52:15+00:00, davehart@shiny.ad.hartbrothers.com
+ typo in #ifndef EREALLOC_CALLSITE hides file/line number from
+ emalloc() error message where available.
+
+ libntp/emalloc.c@1.15 +1 -1
+ typo in #ifndef EREALLOC_CALLSITE hides file/line number from
+ emalloc() error message where available.
+
+ChangeSet@1.2082.4.211, 2011-05-25 03:44:32+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1695] ntpdate takes longer than necessary.
[Bug 1832] ntpdate doesn't allow timeout > 2s.
[Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs.
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- ChangeLog@1.714 +7 -0
+ ChangeLog@1.496.26.147 +7 -0
[Bug 1695] ntpdate takes longer than necessary.
[Bug 1832] ntpdate doesn't allow timeout > 2s.
[Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs.
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- include/ntp_assert.h@1.4 +54 -17
+ include/ntp_assert.h@1.3.1.1 +54 -17
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- include/ntp_malloc.h@1.4 +46 -4
+ include/ntp_malloc.h@1.3.1.1 +46 -4
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- include/ntp_refclock.h@1.25 +1 -1
+ include/ntp_refclock.h@1.24.1.1 +1 -1
Use void * instead of char * for pp->unitptr to ease backports from 4.2.7.
- include/ntp_stdlib.h@1.45 +37 -14
+ include/ntp_stdlib.h@1.40.1.5 +37 -14
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- include/ntp_types.h@1.15 +7 -0
+ include/ntp_types.h@1.14.1.1 +7 -0
provide TRUE, FALSE definitions.
- libntp/emalloc.c@1.11 +53 -79
+ libntp/emalloc.c@1.10.1.1 +53 -79
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- libntp/msyslog.c@1.28 +80 -7
+ libntp/msyslog.c@1.24.1.4 +80 -7
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
- libntp/strdup.c@1.6 +16 -14
+ libntp/strdup.c@1.5.1.1 +16 -14
include <config.h> first, include <string.h> to resolve incompatible
implicit declaration warnings.
- ntpd/refclock_wwvb.c@1.25 +61 -23
+ ntpd/refclock_wwvb.c@1.24.1.1 +61 -23
[Bug 1933] WWVB/Spectracom driver timestamps LFs, not CRs.
- ntpdate/ntpdate.c@1.73 +50 -92
+ ntpdate/ntpdate.c@1.69.2.3 +50 -92
[Bug 1695] ntpdate takes longer than necessary.
[Bug 1832] ntpdate doesn't allow timeout > 2s.
- ports/winnt/include/config.h@1.85 +2 -0
+ ports/winnt/include/config.h@1.79.1.6 +2 -0
Backport utility routines from ntp-dev: mprintf(), emalloc_zero().
-ChangeSet@1.2297, 2011-05-16 04:25:03+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2517.1.9, 2011-05-24 06:09:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P172
+ TAG: NTP_4_2_7P172
+
+ ChangeLog@1.892 +1 -0
+ NTP_4_2_7P172
+
+ ntpd/ntpd-opts.c@1.177 +3 -3
+ NTP_4_2_7P172
+
+ ntpd/ntpd-opts.h@1.177 +3 -3
+ NTP_4_2_7P172
+
+ ntpd/ntpd-opts.texi@1.175 +2 -2
+ NTP_4_2_7P172
+
+ ntpd/ntpd.1@1.175 +2 -2
+ NTP_4_2_7P172
+
+ ntpdc/ntpdc-opts.c@1.170.1.4 +3 -3
+ NTP_4_2_7P172
+
+ ntpdc/ntpdc-opts.h@1.170.1.4 +3 -3
+ NTP_4_2_7P172
+
+ ntpdc/ntpdc-opts.texi@1.170.1.4 +2 -2
+ NTP_4_2_7P172
+
+ ntpdc/ntpdc.1@1.170.1.4 +2 -2
+ NTP_4_2_7P172
+
+ ntpq/ntpq-opts.c@1.174 +3 -3
+ NTP_4_2_7P172
+
+ ntpq/ntpq-opts.h@1.174 +3 -3
+ NTP_4_2_7P172
+
+ ntpq/ntpq-opts.texi@1.174 +2 -2
+ NTP_4_2_7P172
+
+ ntpq/ntpq.1@1.174 +2 -2
+ NTP_4_2_7P172
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.174 +3 -3
+ NTP_4_2_7P172
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.174 +3 -3
+ NTP_4_2_7P172
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.174 +2 -2
+ NTP_4_2_7P172
+
+ ntpsnmpd/ntpsnmpd.1@1.174 +2 -2
+ NTP_4_2_7P172
+
+ packageinfo.sh@1.175 +1 -1
+ NTP_4_2_7P172
+
+ sntp/sntp-opts.c@1.168 +3 -3
+ NTP_4_2_7P172
+
+ sntp/sntp-opts.h@1.168 +3 -3
+ NTP_4_2_7P172
+
+ sntp/sntp-opts.texi@1.168 +2 -2
+ NTP_4_2_7P172
+
+ sntp/sntp.1@1.168 +2 -2
+ NTP_4_2_7P172
+
+ sntp/sntp.html@1.168 +2 -2
+ NTP_4_2_7P172
+
+ util/ntp-keygen-opts.c@1.172 +3 -3
+ NTP_4_2_7P172
+
+ util/ntp-keygen-opts.h@1.172 +3 -3
+ NTP_4_2_7P172
+
+ util/ntp-keygen-opts.texi@1.175 +2 -2
+ NTP_4_2_7P172
+
+ util/ntp-keygen.1@1.175 +2 -2
+ NTP_4_2_7P172
+
+ChangeSet@1.2517.1.8, 2011-05-24 05:27:19+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove hardcoded 1/960 s. fudge for <CR> transmission time at 9600 8n1
+ from WWVB/Spectracom driver introduced in 4.2.7p169.
+
+ ChangeLog@1.891 +2 -0
+ Remove hardcoded 1/960 s. fudge for <CR> transmission time at 9600 8n1
+ from WWVB/Spectracom driver introduced in 4.2.7p169.
+
+ ntpd/refclock_wwvb.c@1.30 +0 -7
+ Remove hardcoded 1/960 s. fudge for <CR> transmission time at 9600 8n1
+ from WWVB/Spectracom driver introduced in 4.2.7p169.
+
+ChangeSet@1.2517.1.7, 2011-05-23 06:42:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P171
+ TAG: NTP_4_2_7P171
+
+ ChangeLog@1.890 +1 -0
+ NTP_4_2_7P171
+
+ ntpd/ntpd-opts.c@1.176 +3 -3
+ NTP_4_2_7P171
+
+ ntpd/ntpd-opts.h@1.176 +3 -3
+ NTP_4_2_7P171
+
+ ntpd/ntpd-opts.texi@1.174 +2 -2
+ NTP_4_2_7P171
+
+ ntpd/ntpd.1@1.174 +2 -2
+ NTP_4_2_7P171
+
+ ntpdc/ntpdc-opts.c@1.170.1.3 +3 -3
+ NTP_4_2_7P171
+
+ ntpdc/ntpdc-opts.h@1.170.1.3 +3 -3
+ NTP_4_2_7P171
+
+ ntpdc/ntpdc-opts.texi@1.170.1.3 +2 -2
+ NTP_4_2_7P171
+
+ ntpdc/ntpdc.1@1.170.1.3 +2 -2
+ NTP_4_2_7P171
+
+ ntpq/ntpq-opts.c@1.173 +3 -3
+ NTP_4_2_7P171
+
+ ntpq/ntpq-opts.h@1.173 +3 -3
+ NTP_4_2_7P171
+
+ ntpq/ntpq-opts.texi@1.173 +2 -2
+ NTP_4_2_7P171
+
+ ntpq/ntpq.1@1.173 +2 -2
+ NTP_4_2_7P171
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.173 +3 -3
+ NTP_4_2_7P171
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.173 +3 -3
+ NTP_4_2_7P171
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.173 +2 -2
+ NTP_4_2_7P171
+
+ ntpsnmpd/ntpsnmpd.1@1.173 +2 -2
+ NTP_4_2_7P171
+
+ packageinfo.sh@1.174 +1 -1
+ NTP_4_2_7P171
+
+ sntp/sntp-opts.c@1.167 +3 -3
+ NTP_4_2_7P171
+
+ sntp/sntp-opts.h@1.167 +3 -3
+ NTP_4_2_7P171
+
+ sntp/sntp-opts.texi@1.167 +2 -2
+ NTP_4_2_7P171
+
+ sntp/sntp.1@1.167 +2 -2
+ NTP_4_2_7P171
+
+ sntp/sntp.html@1.167 +2 -2
+ NTP_4_2_7P171
+
+ util/ntp-keygen-opts.c@1.171 +3 -3
+ NTP_4_2_7P171
+
+ util/ntp-keygen-opts.h@1.171 +3 -3
+ NTP_4_2_7P171
+
+ util/ntp-keygen-opts.texi@1.174 +2 -2
+ NTP_4_2_7P171
+
+ util/ntp-keygen.1@1.174 +2 -2
+ NTP_4_2_7P171
+
+ChangeSet@1.2517.1.6, 2011-05-23 02:28:42-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.889 +1 -0
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.4 +8 -8
+ Documentation updates from Dave Mills
+
+ html/ntpq.html@1.44 +41 -35
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.14 +4 -3
+ Documentation updates from Dave Mills
+
+ html/xleave.html@1.7 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2517.1.5, 2011-05-23 04:26:31+00:00, davehart@shiny.ad.hartbrothers.com
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+ mprintf() should go to stdout, not stderr.
+ Repair a few simulator problems (more remain).
+
+ ChangeLog@1.888 +4 -0
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+ mprintf() should go to stdout, not stderr.
+ Repair a few simulator problems (more remain).
+
+ include/ntp_filegen.h@1.10 +13 -12
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+
+ include/ntpd.h@1.162 +10 -4
+ expose statsdir globally
+
+ include/ntpsim.h@1.16 +18 -20
+ whitespace -> tabs
+
+ libntp/msyslog.c@1.43 +1 -1
+ mprintf() should go to stdout, not stderr.
+
+ libntp/systime.c@1.55 +2 -13
+ remove empty #else block for SIM
+
+ ntpd/ntp_config.c@1.290 +13 -8
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+
+ ntpd/ntp_filegen.c@1.24 +102 -71
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+
+ ntpd/ntp_io.c@1.355 +71 -0
+ Move select_peerinterface() from ntp_peer.c to ntp_io.c so it can
+ use #ifdef SIM.
+
+ ntpd/ntp_monitor.c@1.39 +1 -1
+ struct interface -> endpt
+
+ ntpd/ntp_peer.c@1.147 +25 -95
+ Move select_peerinterface() from ntp_peer.c to ntp_io.c so it can
+ use #ifdef SIM.
+
+ ntpd/ntp_util.c@1.95 +9 -70
+ Eliminate warnings about shadowing global "basename" on Linux.
+ Use filegen_config() consistently when changing filegen options.
+
+ ntpd/ntpsim.c@1.32 +87 -50
+ Set msyslog_term = TRUE in ntpsim() to get syslog messages on console.
+ Use HTONL_FP() and NTOHL_FP() to byteswap simulated on-wire timestamps.
+ Use loopback IPv4 interface for simulator peer->dstadr.
+
+ ntpd/refclock_wwvb.c@1.29 +6 -0
+ timestamp 'T' polls in -D1 output
+
+ChangeSet@1.2517.1.4, 2011-05-19 11:26:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P170
+ TAG: NTP_4_2_7P170
+
+ ChangeLog@1.887 +1 -0
+ NTP_4_2_7P170
+
+ ntpd/ntpd-opts.c@1.175 +3 -3
+ NTP_4_2_7P170
+
+ ntpd/ntpd-opts.h@1.175 +3 -3
+ NTP_4_2_7P170
+
+ ntpd/ntpd-opts.texi@1.173 +2 -2
+ NTP_4_2_7P170
+
+ ntpd/ntpd.1@1.173 +2 -2
+ NTP_4_2_7P170
+
+ ntpdc/ntpdc-opts.c@1.170.1.2 +3 -3
+ NTP_4_2_7P170
+
+ ntpdc/ntpdc-opts.h@1.170.1.2 +3 -3
+ NTP_4_2_7P170
+
+ ntpdc/ntpdc-opts.texi@1.170.1.2 +2 -2
+ NTP_4_2_7P170
+
+ ntpdc/ntpdc.1@1.170.1.2 +2 -2
+ NTP_4_2_7P170
+
+ ntpq/ntpq-opts.c@1.172 +3 -3
+ NTP_4_2_7P170
+
+ ntpq/ntpq-opts.h@1.172 +3 -3
+ NTP_4_2_7P170
+
+ ntpq/ntpq-opts.texi@1.172 +2 -2
+ NTP_4_2_7P170
+
+ ntpq/ntpq.1@1.172 +2 -2
+ NTP_4_2_7P170
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.172 +3 -3
+ NTP_4_2_7P170
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.172 +3 -3
+ NTP_4_2_7P170
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.172 +2 -2
+ NTP_4_2_7P170
+
+ ntpsnmpd/ntpsnmpd.1@1.172 +2 -2
+ NTP_4_2_7P170
+
+ packageinfo.sh@1.173 +1 -1
+ NTP_4_2_7P170
+
+ sntp/sntp-opts.c@1.166 +3 -3
+ NTP_4_2_7P170
+
+ sntp/sntp-opts.h@1.166 +3 -3
+ NTP_4_2_7P170
+
+ sntp/sntp-opts.texi@1.166 +2 -2
+ NTP_4_2_7P170
+
+ sntp/sntp.1@1.166 +2 -2
+ NTP_4_2_7P170
+
+ sntp/sntp.html@1.166 +2 -2
+ NTP_4_2_7P170
+
+ util/ntp-keygen-opts.c@1.170 +3 -3
+ NTP_4_2_7P170
+
+ util/ntp-keygen-opts.h@1.170 +3 -3
+ NTP_4_2_7P170
+
+ util/ntp-keygen-opts.texi@1.173 +2 -2
+ NTP_4_2_7P170
+
+ util/ntp-keygen.1@1.173 +2 -2
+ NTP_4_2_7P170
+
+ChangeSet@1.2517.1.3, 2011-05-19 02:46:37+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1932] libevent/util_internal.h builtin_expect compile error with
+ gcc 2.95.
+ Use 64-bit scalars in LFPTOD() and DTOLFP() on more platforms by
+ conditionalizing on HAVE_U_INT64 rather than UINT64_MAX.
+
+ ChangeLog@1.886 +5 -1
+ [Bug 1932] libevent/util_internal.h builtin_expect compile error with
+ gcc 2.95.
+ Use 64-bit scalars in LFPTOD() and DTOLFP() on more platforms by
+ conditionalizing on HAVE_U_INT64 rather than UINT64_MAX.
+
+
+ include/ntp_fp.h@1.23 +12 -8
+ Use 64-bit scalars in LFPTOD() and DTOLFP() on more platforms by
+ conditionalizing on HAVE_U_INT64 rather than UINT64_MAX.
+
+ sntp/libevent/util-internal.h@1.4 +1 -1
+ [Bug 1932] libevent/util_internal.h builtin_expect compile error with
+ gcc 2.95.
+
+ChangeSet@1.2517.1.2, 2011-05-18 11:24:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P169
+ TAG: NTP_4_2_7P169
+
+ ChangeLog@1.885 +1 -0
+ NTP_4_2_7P169
+
+ ntpd/ntpd-opts.c@1.174 +3 -3
+ NTP_4_2_7P169
+
+ ntpd/ntpd-opts.h@1.174 +3 -3
+ NTP_4_2_7P169
+
+ ntpd/ntpd-opts.texi@1.172 +2 -2
+ NTP_4_2_7P169
+
+ ntpd/ntpd.1@1.172 +2 -2
+ NTP_4_2_7P169
+
+ ntpdc/ntpdc-opts.c@1.170.1.1 +3 -3
+ NTP_4_2_7P169
+
+ ntpdc/ntpdc-opts.h@1.170.1.1 +3 -3
+ NTP_4_2_7P169
+
+ ntpdc/ntpdc-opts.texi@1.170.1.1 +2 -2
+ NTP_4_2_7P169
+
+ ntpdc/ntpdc.1@1.170.1.1 +2 -2
+ NTP_4_2_7P169
+
+ ntpq/ntpq-opts.c@1.171 +3 -3
+ NTP_4_2_7P169
+
+ ntpq/ntpq-opts.h@1.171 +3 -3
+ NTP_4_2_7P169
+
+ ntpq/ntpq-opts.texi@1.171 +2 -2
+ NTP_4_2_7P169
+
+ ntpq/ntpq.1@1.171 +2 -2
+ NTP_4_2_7P169
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.171 +3 -3
+ NTP_4_2_7P169
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.171 +3 -3
+ NTP_4_2_7P169
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.171 +2 -2
+ NTP_4_2_7P169
+
+ ntpsnmpd/ntpsnmpd.1@1.171 +2 -2
+ NTP_4_2_7P169
+
+ packageinfo.sh@1.172 +1 -1
+ NTP_4_2_7P169
+
+ sntp/sntp-opts.c@1.165 +3 -3
+ NTP_4_2_7P169
+
+ sntp/sntp-opts.h@1.165 +3 -3
+ NTP_4_2_7P169
+
+ sntp/sntp-opts.texi@1.165 +2 -2
+ NTP_4_2_7P169
+
+ sntp/sntp.1@1.165 +2 -2
+ NTP_4_2_7P169
+
+ sntp/sntp.html@1.165 +2 -2
+ NTP_4_2_7P169
+
+ util/ntp-keygen-opts.c@1.169 +3 -3
+ NTP_4_2_7P169
+
+ util/ntp-keygen-opts.h@1.169 +3 -3
+ NTP_4_2_7P169
+
+ util/ntp-keygen-opts.texi@1.172 +2 -2
+ NTP_4_2_7P169
+
+ util/ntp-keygen.1@1.172 +2 -2
+ NTP_4_2_7P169
+
+ChangeSet@1.2520, 2011-05-18 04:48:08-04:00, stenn@psp-deb1.ntp.org
+ More cleanup around autogen-erating ntpdc.1 and ntpdc.html
+
+ sntp/ag-tpl/cmd-doc.tlib@1.1 +943 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/cmd-doc.tlib
+
+ sntp/ag-tpl/cmd-doc.tlib@1.0 +0 -0
+
+ sntp/ag-tpl/mdoc2mdoc@1.1 +2 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/mdoc2mdoc
+
+ sntp/ag-tpl/mdoc2mdoc@1.0 +0 -0
+
+ChangeSet@1.2519, 2011-05-18 04:46:41-04:00, stenn@psp-deb1.ntp.org
+ More cleanup around autogen-erating ntpdc.1 and ntpdc.html
+
+ .point-changed-filelist@1.10 +1 -0
+ Deal with the creation of ntpdc/ntpdc.html
+
+ ntpdc/Makefile.am@1.62 +8 -1
+ autogen ntpdc.1 cleanup
+
+ ntpdc/ntpdc-opts.def@1.16 +29 -5
+ autogen ntpdc.1 cleanup
+
+ sntp/sntp-opts.def@1.28 +2 -6
+ Use the homerc.def file like the other programs do
+
+ChangeSet@1.2517.1.1, 2011-05-17 23:17:51+00:00, davehart@shiny.ad.hartbrothers.com
+ Bug 1933 - WWVB/Spectracom driver timestamps LFs, not CRs
+
+ ChangeLog@1.884 +1 -0
+ Bug 1933 - WWVB/Spectracom driver timestamps LFs, not CRs
+
+ ntpd/refclock_wwvb.c@1.28 +49 -9
+ Bug 1933 - WWVB/Spectracom driver timestamps LFs, not CRs
+
+ChangeSet@1.2516.1.2, 2011-05-17 02:38:20-04:00, stenn@psp-deb1.ntp.org
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc-opts.c@1.169.1.1 +95 -95
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc-opts.h@1.169.1.1 +32 -32
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc-opts.texi@1.169.1.1 +22 -23
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc.1@1.169.1.1 +718 -81
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc.html@1.1 +445 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.html
+
+ ntpdc/ntpdc.html@1.0 +0 -0
+
+ChangeSet@1.2516.1.1, 2011-05-17 02:19:23-04:00, stenn@psp-deb1.ntp.org
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/Makefile.am@1.61 +26 -5
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc-opts.def@1.15 +696 -25
+ Prepare for the autogen versions of ntpdc.1 and friends
+
+ ntpdc/ntpdc.texi@1.1 +88 -0
+ BitKeeper file /home/stenn/ntp-dev/ntpdc/ntpdc.texi
+
+ ntpdc/ntpdc.texi@1.0 +0 -0
+
+ChangeSet@1.2517, 2011-05-16 07:40:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P168
+ TAG: NTP_4_2_7P168
+
+ ChangeLog@1.883 +1 -0
+ NTP_4_2_7P168
+
+ ntpd/ntpd-opts.c@1.173 +3 -3
+ NTP_4_2_7P168
+
+ ntpd/ntpd-opts.h@1.173 +3 -3
+ NTP_4_2_7P168
+
+ ntpd/ntpd-opts.texi@1.171 +2 -2
+ NTP_4_2_7P168
+
+ ntpd/ntpd.1@1.171 +2 -2
+ NTP_4_2_7P168
+
+ ntpdc/ntpdc-opts.c@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpdc/ntpdc-opts.h@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpdc/ntpdc-opts.texi@1.170 +2 -2
+ NTP_4_2_7P168
+
+ ntpdc/ntpdc.1@1.170 +2 -2
+ NTP_4_2_7P168
+
+ ntpq/ntpq-opts.c@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpq/ntpq-opts.h@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpq/ntpq-opts.texi@1.170 +2 -2
+ NTP_4_2_7P168
+
+ ntpq/ntpq.1@1.170 +2 -2
+ NTP_4_2_7P168
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.170 +3 -3
+ NTP_4_2_7P168
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.170 +2 -2
+ NTP_4_2_7P168
+
+ ntpsnmpd/ntpsnmpd.1@1.170 +2 -2
+ NTP_4_2_7P168
+
+ packageinfo.sh@1.171 +1 -1
+ NTP_4_2_7P168
+
+ sntp/sntp-opts.c@1.164 +3 -3
+ NTP_4_2_7P168
+
+ sntp/sntp-opts.h@1.164 +3 -3
+ NTP_4_2_7P168
+
+ sntp/sntp-opts.texi@1.164 +2 -2
+ NTP_4_2_7P168
+
+ sntp/sntp.1@1.164 +2 -2
+ NTP_4_2_7P168
+
+ sntp/sntp.html@1.164 +2 -2
+ NTP_4_2_7P168
+
+ util/ntp-keygen-opts.c@1.168 +3 -3
+ NTP_4_2_7P168
+
+ util/ntp-keygen-opts.h@1.168 +3 -3
+ NTP_4_2_7P168
+
+ util/ntp-keygen-opts.texi@1.171 +2 -2
+ NTP_4_2_7P168
+
+ util/ntp-keygen.1@1.171 +2 -2
+ NTP_4_2_7P168
+
+ChangeSet@1.2516, 2011-05-16 05:18:56+00:00, davehart@shiny.ad.hartbrothers.com
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ ChangeLog@1.882 +1 -0
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ include/ntp_config.h@1.72 +0 -10
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ include/ntp_lists.h@1.12 +50 -3
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ include/recvbuff.h@1.25 +20 -20
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ libntp/recvbuff.c@1.38 +52 -34
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ ntpd/ntp_config.c@1.289 +0 -24
+ Convert receive buffer queue from doubly-linked list to FIFO.
+
+ChangeSet@1.2514, 2011-05-16 00:47:02-04:00, stenn@deacon.udel.edu
+ update the comments in packageinfo.sh
+
+ packageinfo.sh@1.170 +13 -0
+ update the comments in packageinfo.sh
+
+ChangeSet@1.2082.4.210, 2011-05-16 04:25:03+00:00, stenn@deacon.udel.edu
NTP_4_2_6P4_BETA1
TAG: NTP_4_2_6P4_BETA1
- ChangeLog@1.713 +1 -0
+ ChangeLog@1.496.26.146 +1 -0
NTP_4_2_6P4_BETA1
- ntpd/ntpd-opts.c@1.283 +43 -48
+ ntpd/ntpd-opts.c@1.248.35.1 +43 -48
NTP_4_2_6P4_BETA1
- ntpd/ntpd-opts.h@1.283 +12 -12
+ ntpd/ntpd-opts.h@1.248.35.1 +12 -12
NTP_4_2_6P4_BETA1
- ntpd/ntpd-opts.texi@1.280 +4 -4
+ ntpd/ntpd-opts.texi@1.246.34.1 +4 -4
NTP_4_2_6P4_BETA1
- ntpd/ntpd.1@1.280 +3 -2
+ ntpd/ntpd.1@1.246.34.1 +3 -2
NTP_4_2_6P4_BETA1
- ntpdc/ntpdc-opts.c@1.279 +43 -48
+ ntpdc/ntpdc-opts.c@1.244.35.1 +43 -48
NTP_4_2_6P4_BETA1
- ntpdc/ntpdc-opts.h@1.279 +12 -12
+ ntpdc/ntpdc-opts.h@1.244.35.1 +12 -12
NTP_4_2_6P4_BETA1
- ntpdc/ntpdc-opts.texi@1.277 +12 -19
+ ntpdc/ntpdc-opts.texi@1.243.34.1 +12 -19
NTP_4_2_6P4_BETA1
- ntpdc/ntpdc.1@1.277 +3 -2
+ ntpdc/ntpdc.1@1.243.34.1 +3 -2
NTP_4_2_6P4_BETA1
- ntpq/ntpq-opts.c@1.280 +43 -48
+ ntpq/ntpq-opts.c@1.245.35.1 +43 -48
NTP_4_2_6P4_BETA1
- ntpq/ntpq-opts.h@1.280 +12 -12
+ ntpq/ntpq-opts.h@1.245.35.1 +12 -12
NTP_4_2_6P4_BETA1
- ntpq/ntpq-opts.texi@1.278 +10 -12
+ ntpq/ntpq-opts.texi@1.244.34.1 +10 -12
NTP_4_2_6P4_BETA1
- ntpq/ntpq.1@1.278 +3 -2
+ ntpq/ntpq.1@1.244.34.1 +3 -2
NTP_4_2_6P4_BETA1
- ntpsnmpd/ntpsnmpd-opts.c@1.159 +43 -48
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.36.1 +43 -48
NTP_4_2_6P4_BETA1
- ntpsnmpd/ntpsnmpd-opts.h@1.159 +12 -12
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.36.1 +12 -12
NTP_4_2_6P4_BETA1
- ntpsnmpd/ntpsnmpd-opts.texi@1.158 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.35.1 +4 -4
NTP_4_2_6P4_BETA1
- ntpsnmpd/ntpsnmpd.1@1.157 +3 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.35.1 +3 -2
NTP_4_2_6P4_BETA1
- packageinfo.sh@1.294 +3 -3
+ packageinfo.sh@1.255.32.1 +3 -3
NTP_4_2_6P4_BETA1
- sntp/sntp-opts.c@1.150 +43 -48
+ sntp/sntp-opts.c@1.117.33.1 +43 -48
NTP_4_2_6P4_BETA1
- sntp/sntp-opts.h@1.150 +12 -12
+ sntp/sntp-opts.h@1.117.33.1 +12 -12
NTP_4_2_6P4_BETA1
- sntp/sntp-opts.texi@1.149 +7 -7
+ sntp/sntp-opts.texi@1.117.32.1 +7 -7
NTP_4_2_6P4_BETA1
- sntp/sntp.1@1.149 +3 -2
+ sntp/sntp.1@1.117.32.1 +3 -2
NTP_4_2_6P4_BETA1
- sntp/sntp.html@1.40 +7 -7
+ sntp/sntp.html@1.7.33.1 +7 -7
NTP_4_2_6P4_BETA1
- util/ntp-keygen-opts.c@1.282 +52 -75
+ util/ntp-keygen-opts.c@1.247.35.1 +52 -75
NTP_4_2_6P4_BETA1
- util/ntp-keygen-opts.h@1.282 +12 -12
+ util/ntp-keygen-opts.h@1.247.35.1 +12 -12
NTP_4_2_6P4_BETA1
- util/ntp-keygen-opts.texi@1.280 +8 -7
+ util/ntp-keygen-opts.texi@1.246.34.1 +8 -7
NTP_4_2_6P4_BETA1
- util/ntp-keygen.1@1.280 +3 -2
+ util/ntp-keygen.1@1.246.34.1 +3 -2
NTP_4_2_6P4_BETA1
-ChangeSet@1.2296, 2011-05-15 19:19:24+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.209, 2011-05-15 19:19:24+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1554] peer may stay selected as system peer after becoming
unreachable.
[Bug 1921] LOCAL, ACTS drivers with "prefer" excluded from initial
@@ -1343,7 +86002,7 @@ ChangeSet@1.2296, 2011-05-15 19:19:24+00:00, davehart@shiny.ad.hartbrothers.com
Enable tickadj-like taming of wildly off-spec Windows clock using
NTPD_TICKADJ_PPM env. var. specifying baseline slew.
- ChangeLog@1.712 +9 -0
+ ChangeLog@1.496.26.145 +9 -0
[Bug 1554] peer may stay selected as system peer after becoming
unreachable.
[Bug 1921] LOCAL, ACTS drivers with "prefer" excluded from initial
@@ -1354,18 +86013,18 @@ ChangeSet@1.2296, 2011-05-15 19:19:24+00:00, davehart@shiny.ad.hartbrothers.com
Enable tickadj-like taming of wildly off-spec Windows clock using
NTPD_TICKADJ_PPM env. var. specifying baseline slew.
- include/ntp.h@1.174 +9 -9
+ include/ntp.h@1.168.1.6 +9 -9
[Bug 1924] Billboard tally codes sometimes do not match operation,
variables.
- libntp/mktime.c@1.9 +2 -2
+ libntp/mktime.c@1.8.1.1 +2 -2
leading spaces -> tabs
- ntpd/ntp_loopfilter.c@1.154 +1 -1
+ ntpd/ntp_loopfilter.c@1.153.2.1 +1 -1
Comment typo
- ntpd/ntp_proto.c@1.300 +37 -29
+ ntpd/ntp_proto.c@1.297.2.3 +37 -29
[Bug 1554] peer may stay selected as system peer after becoming
unreachable.
[Bug 1921] LOCAL, ACTS drivers with "prefer" excluded from initial
@@ -1375,39 +86034,940 @@ ChangeSet@1.2296, 2011-05-15 19:19:24+00:00, davehart@shiny.ad.hartbrothers.com
variables.
- ports/winnt/include/config.h@1.84 +2 -0
+ ports/winnt/include/config.h@1.79.1.5 +2 -0
Use _mkgmtime() for timegm() in Windows ports, resolves crash at startup
loading Autokey host certificate.
- ports/winnt/ntpd/nt_clockstuff.c@1.43 +23 -0
+ ports/winnt/ntpd/nt_clockstuff.c@1.38.1.5 +23 -0
Enable tickadj-like taming of wildly off-spec Windows clock using
NTPD_TICKADJ_PPM env. var. specifying baseline slew.
-ChangeSet@1.2295, 2011-05-11 04:40:35-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2512, 2011-05-14 11:34:43+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P167
+ TAG: NTP_4_2_7P167
+
+ ChangeLog@1.879 +1 -0
+ NTP_4_2_7P167
+
+ ntpd/ntpd-opts.c@1.172 +3 -3
+ NTP_4_2_7P167
+
+ ntpd/ntpd-opts.h@1.172 +3 -3
+ NTP_4_2_7P167
+
+ ntpd/ntpd-opts.texi@1.170 +2 -2
+ NTP_4_2_7P167
+
+ ntpd/ntpd.1@1.170 +2 -2
+ NTP_4_2_7P167
+
+ ntpdc/ntpdc-opts.c@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpdc/ntpdc-opts.h@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpdc/ntpdc-opts.texi@1.169 +2 -2
+ NTP_4_2_7P167
+
+ ntpdc/ntpdc.1@1.169 +2 -2
+ NTP_4_2_7P167
+
+ ntpq/ntpq-opts.c@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpq/ntpq-opts.h@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpq/ntpq-opts.texi@1.169 +2 -2
+ NTP_4_2_7P167
+
+ ntpq/ntpq.1@1.169 +2 -2
+ NTP_4_2_7P167
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.169 +3 -3
+ NTP_4_2_7P167
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.169 +2 -2
+ NTP_4_2_7P167
+
+ ntpsnmpd/ntpsnmpd.1@1.169 +2 -2
+ NTP_4_2_7P167
+
+ packageinfo.sh@1.169 +1 -1
+ NTP_4_2_7P167
+
+ sntp/sntp-opts.c@1.163 +3 -3
+ NTP_4_2_7P167
+
+ sntp/sntp-opts.h@1.163 +3 -3
+ NTP_4_2_7P167
+
+ sntp/sntp-opts.texi@1.163 +2 -2
+ NTP_4_2_7P167
+
+ sntp/sntp.1@1.163 +2 -2
+ NTP_4_2_7P167
+
+ sntp/sntp.html@1.163 +2 -2
+ NTP_4_2_7P167
+
+ util/ntp-keygen-opts.c@1.167 +3 -3
+ NTP_4_2_7P167
+
+ util/ntp-keygen-opts.h@1.167 +3 -3
+ NTP_4_2_7P167
+
+ util/ntp-keygen-opts.texi@1.170 +2 -2
+ NTP_4_2_7P167
+
+ util/ntp-keygen.1@1.170 +2 -2
+ NTP_4_2_7P167
+
+ChangeSet@1.2511, 2011-05-14 01:11:38-04:00, stenn@deacon.udel.edu
+ 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope
+
+ ChangeLog@1.878 +1 -0
+ 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope
+
+ html/assoc.html@1.35 +2 -2
+ 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope
+
+ html/miscopt.html@1.66 +3 -4
+ 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope
+
+ html/orphan.html@1.2 +3 -3
+ 4.2.7p164 documentation updates regarding 'tos orphanwait' expanded scope
+
+ChangeSet@1.2510, 2011-05-14 03:37:31+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1931] cv always includes fudgetime1, never fudgetime2.
+
+ ChangeLog@1.877 +1 -0
+ [Bug 1931] cv always includes fudgetime1, never fudgetime2.
+
+ ntpd/ntp_control.c@1.169 +33 -32
+ [Bug 1931] cv always includes fudgetime1, never fudgetime2.
+
+ ntpd/ntp_refclock.c@1.107 +17 -6
+ [Bug 1931] cv always includes fudgetime1, never fudgetime2.
+
+ChangeSet@1.2509, 2011-05-13 21:38:33+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1927] io_closeclock() should purge pending recvbufs.
+ Use acts_close() in acts_shutdown() to avoid leaving a stale lockfile
+ if unpeered via runtime configuration while the modem is open.
+ Correct acts_close() test of pp->io.fd to see if it is open.
+
+ ChangeLog@1.876 +4 -0
+ [Bug 1927] io_closeclock() should purge pending recvbufs.
+ Use acts_close() in acts_shutdown() to avoid leaving a stale lockfile
+ if unpeered via runtime configuration while the modem is open.
+ Correct acts_close() test of pp->io.fd to see if it is open.
+
+ include/recvbuff.h@1.24 +21 -14
+ [Bug 1927] io_closeclock() should purge pending recvbufs.
+
+ libntp/recvbuff.c@1.37 +35 -1
+ [Bug 1927] io_closeclock() should purge pending recvbufs.
+
+ ntpd/ntp_io.c@1.354 +15 -22
+ [Bug 1927] io_closeclock() should purge pending recvbufs.
+
+ ntpd/refclock_acts.c@1.51 +7 -9
+ Use acts_close() in acts_shutdown() to avoid leaving a stale lockfile
+ if unpeered via runtime configuration while the modem is open.
+ Correct acts_close() test of pp->io.fd to see if it is open.
+
+ChangeSet@1.2508, 2011-05-13 11:42:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P166
+ TAG: NTP_4_2_7P166
+
+ ChangeLog@1.875 +1 -0
+ NTP_4_2_7P166
+
+ ntpd/ntpd-opts.c@1.171 +3 -3
+ NTP_4_2_7P166
+
+ ntpd/ntpd-opts.h@1.171 +3 -3
+ NTP_4_2_7P166
+
+ ntpd/ntpd-opts.texi@1.169 +2 -2
+ NTP_4_2_7P166
+
+ ntpd/ntpd.1@1.169 +2 -2
+ NTP_4_2_7P166
+
+ ntpdc/ntpdc-opts.c@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpdc/ntpdc-opts.h@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpdc/ntpdc-opts.texi@1.168 +2 -2
+ NTP_4_2_7P166
+
+ ntpdc/ntpdc.1@1.168 +2 -2
+ NTP_4_2_7P166
+
+ ntpq/ntpq-opts.c@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpq/ntpq-opts.h@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpq/ntpq-opts.texi@1.168 +2 -2
+ NTP_4_2_7P166
+
+ ntpq/ntpq.1@1.168 +2 -2
+ NTP_4_2_7P166
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.168 +3 -3
+ NTP_4_2_7P166
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.168 +2 -2
+ NTP_4_2_7P166
+
+ ntpsnmpd/ntpsnmpd.1@1.168 +2 -2
+ NTP_4_2_7P166
+
+ packageinfo.sh@1.168 +1 -1
+ NTP_4_2_7P166
+
+ sntp/sntp-opts.c@1.162 +3 -3
+ NTP_4_2_7P166
+
+ sntp/sntp-opts.h@1.162 +3 -3
+ NTP_4_2_7P166
+
+ sntp/sntp-opts.texi@1.162 +2 -2
+ NTP_4_2_7P166
+
+ sntp/sntp.1@1.162 +27 -22
+ NTP_4_2_7P166
+
+ sntp/sntp.html@1.162 +2 -2
+ NTP_4_2_7P166
+
+ util/ntp-keygen-opts.c@1.166 +3 -3
+ NTP_4_2_7P166
+
+ util/ntp-keygen-opts.h@1.166 +3 -3
+ NTP_4_2_7P166
+
+ util/ntp-keygen-opts.texi@1.169 +2 -2
+ NTP_4_2_7P166
+
+ util/ntp-keygen.1@1.169 +2 -2
+ NTP_4_2_7P166
+
+ChangeSet@1.2507, 2011-05-13 06:05:54-04:00, stenn@psp-deb1.ntp.org
+ Distribute sntp/ag-tpl/
+
+ sntp/Makefile.am@1.62 +1 -0
+ Distribute sntp/ag-tpl/
+
+ChangeSet@1.2506, 2011-05-13 05:08:53-04:00, stenn@psp-deb1.ntp.org
+ Use our autogen templates if we have any
+
+ ChangeLog@1.874 +2 -0
+ Use our autogen templates if we have any
+
+ sntp/Makefile.am@1.61 +1 -1
+ Use our autogen templates if we have any
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.1 +115 -0
+ BitKeeper file /home/stenn/ntp-dev/sntp/ag-tpl/agmdoc-cmd.tpl
+
+ sntp/ag-tpl/agmdoc-cmd.tpl@1.0 +0 -0
+
+ sntp/sntp-opts.def@1.27 +24 -20
+ Update sntp docs
+
+ChangeSet@1.2505, 2011-05-11 19:29:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P165
+ TAG: NTP_4_2_7P165
+
+ ChangeLog@1.873 +1 -0
+ NTP_4_2_7P165
+
+ ntpd/ntpd-opts.c@1.170 +5 -5
+ NTP_4_2_7P165
+
+ ntpd/ntpd-opts.h@1.170 +3 -3
+ NTP_4_2_7P165
+
+ ntpd/ntpd-opts.texi@1.168 +2 -2
+ NTP_4_2_7P165
+
+ ntpd/ntpd.1@1.168 +2 -2
+ NTP_4_2_7P165
+
+ ntpdc/ntpdc-opts.c@1.167 +5 -5
+ NTP_4_2_7P165
+
+ ntpdc/ntpdc-opts.h@1.167 +3 -3
+ NTP_4_2_7P165
+
+ ntpdc/ntpdc-opts.texi@1.167 +2 -2
+ NTP_4_2_7P165
+
+ ntpdc/ntpdc.1@1.167 +2 -2
+ NTP_4_2_7P165
+
+ ntpq/ntpq-opts.c@1.167 +5 -5
+ NTP_4_2_7P165
+
+ ntpq/ntpq-opts.h@1.167 +3 -3
+ NTP_4_2_7P165
+
+ ntpq/ntpq-opts.texi@1.167 +2 -2
+ NTP_4_2_7P165
+
+ ntpq/ntpq.1@1.167 +2 -2
+ NTP_4_2_7P165
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.167 +5 -5
+ NTP_4_2_7P165
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.167 +3 -3
+ NTP_4_2_7P165
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.167 +2 -2
+ NTP_4_2_7P165
+
+ ntpsnmpd/ntpsnmpd.1@1.167 +2 -2
+ NTP_4_2_7P165
+
+ packageinfo.sh@1.167 +1 -1
+ NTP_4_2_7P165
+
+ sntp/sntp-opts.c@1.161 +60 -60
+ NTP_4_2_7P165
+
+ sntp/sntp-opts.h@1.161 +24 -24
+ NTP_4_2_7P165
+
+ sntp/sntp-opts.texi@1.161 +23 -18
+ NTP_4_2_7P165
+
+ sntp/sntp.1@1.161 +127 -121
+ NTP_4_2_7P165
+
+ sntp/sntp.html@1.161 +23 -18
+ NTP_4_2_7P165
+
+ util/ntp-keygen-opts.c@1.165 +5 -5
+ NTP_4_2_7P165
+
+ util/ntp-keygen-opts.h@1.165 +3 -3
+ NTP_4_2_7P165
+
+ util/ntp-keygen-opts.texi@1.168 +2 -2
+ NTP_4_2_7P165
+
+ util/ntp-keygen.1@1.168 +2 -2
+ NTP_4_2_7P165
+
+ChangeSet@1.2082.4.208, 2011-05-11 04:40:35-04:00, stenn@deacon.udel.edu
Upgrade to AutoGen 5.11.9 (and require it)
- ChangeLog@1.711 +1 -0
+ ChangeLog@1.496.26.144 +1 -0
Upgrade to AutoGen 5.11.9 (and require it)
- include/autogen-version.def@1.5 +1 -1
+ include/autogen-version.def@1.4.1.1 +1 -1
Upgrade to AutoGen 5.11.9 (and require it)
-ChangeSet@1.2294, 2011-05-01 10:37:55+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2503, 2011-05-11 03:21:39-04:00, stenn@psp-deb1.ntp.org
+ Convert snmp docs to mdoc format, which requires autogen 5.11.9
+
+ ChangeLog@1.871 +1 -0
+ Convert snmp docs to mdoc format, which requires autogen 5.11.9
+
+ sntp/Makefile.am@1.60 +3 -1
+ Convert snmp docs to mdoc format, which requires autogen 5.11.9
+
+ sntp/include/autogen-version.def@1.6 +1 -1
+ Upgrade autogen to 5.11.9
+
+ sntp/sntp-opts.def@1.26 +146 -130
+ Convert snmp docs to mdoc format, which requires autogen 5.11.9
+
+ sntp/sntp.texi@1.8 +1 -1
+ Convert snmp docs to mdoc format, which requires autogen 5.11.9
+
+ChangeSet@1.2502, 2011-05-11 00:48:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P164
+ TAG: NTP_4_2_7P164
+
+ ChangeLog@1.870 +1 -0
+ NTP_4_2_7P164
+
+ ntpd/ntpd-opts.c@1.169 +3 -3
+ NTP_4_2_7P164
+
+ ntpd/ntpd-opts.h@1.169 +3 -3
+ NTP_4_2_7P164
+
+ ntpd/ntpd-opts.texi@1.167 +2 -2
+ NTP_4_2_7P164
+
+ ntpd/ntpd.1@1.167 +2 -2
+ NTP_4_2_7P164
+
+ ntpdc/ntpdc-opts.c@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpdc/ntpdc-opts.h@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpdc/ntpdc-opts.texi@1.166 +2 -2
+ NTP_4_2_7P164
+
+ ntpdc/ntpdc.1@1.166 +2 -2
+ NTP_4_2_7P164
+
+ ntpq/ntpq-opts.c@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpq/ntpq-opts.h@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpq/ntpq-opts.texi@1.166 +2 -2
+ NTP_4_2_7P164
+
+ ntpq/ntpq.1@1.166 +2 -2
+ NTP_4_2_7P164
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.166 +3 -3
+ NTP_4_2_7P164
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.166 +2 -2
+ NTP_4_2_7P164
+
+ ntpsnmpd/ntpsnmpd.1@1.166 +2 -2
+ NTP_4_2_7P164
+
+ packageinfo.sh@1.166 +1 -1
+ NTP_4_2_7P164
+
+ sntp/sntp-opts.c@1.160 +3 -3
+ NTP_4_2_7P164
+
+ sntp/sntp-opts.h@1.160 +3 -3
+ NTP_4_2_7P164
+
+ sntp/sntp-opts.texi@1.160 +2 -2
+ NTP_4_2_7P164
+
+ sntp/sntp.1@1.160 +2 -2
+ NTP_4_2_7P164
+
+ sntp/sntp.html@1.160 +1 -1
+ NTP_4_2_7P164
+
+ util/ntp-keygen-opts.c@1.164 +3 -3
+ NTP_4_2_7P164
+
+ util/ntp-keygen-opts.h@1.164 +3 -3
+ NTP_4_2_7P164
+
+ util/ntp-keygen-opts.texi@1.167 +2 -2
+ NTP_4_2_7P164
+
+ util/ntp-keygen.1@1.167 +2 -2
+ NTP_4_2_7P164
+
+ChangeSet@1.2501, 2011-05-10 15:46:36-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.869 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.20 +36 -52
+ Documentation updates from Dave Mills
+
+ html/drivers/driver6.html@1.27 +1 -2
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.65 +2 -2
+ Documentation updates from Dave Mills
+
+ html/release.html@1.40 +9 -7
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.13 +8 -7
+ Documentation updates from Dave Mills
+
+ html/xleave.html@1.6 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2479.13.2, 2011-05-09 23:20:17+00:00, davehart@shiny.ad.hartbrothers.com
+ Update ChangeLog additions for ntp_proto.c changes to reference newly-filed
+ bug reports: [Bug 1921] [Bug 1922] [Bug 1923] [Bug 1924]
+
+ ChangeLog@1.867 +9 -5
+ Update ChangeLog additions for ntp_proto.c changes to reference newly-filed
+ bug reports: [Bug 1921] [Bug 1922] [Bug 1923] [Bug 1924]
+
+ChangeSet@1.2499, 2011-05-08 09:10:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P163
+ TAG: NTP_4_2_7P163
+
+ ChangeLog@1.865.1.11 +1 -0
+ NTP_4_2_7P163
+
+ ntpd/ntpd-opts.c@1.168 +3 -3
+ NTP_4_2_7P163
+
+ ntpd/ntpd-opts.h@1.168 +3 -3
+ NTP_4_2_7P163
+
+ ntpd/ntpd-opts.texi@1.166 +2 -2
+ NTP_4_2_7P163
+
+ ntpd/ntpd.1@1.166 +2 -2
+ NTP_4_2_7P163
+
+ ntpdc/ntpdc-opts.c@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpdc/ntpdc-opts.h@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpdc/ntpdc-opts.texi@1.165 +2 -2
+ NTP_4_2_7P163
+
+ ntpdc/ntpdc.1@1.165 +2 -2
+ NTP_4_2_7P163
+
+ ntpq/ntpq-opts.c@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpq/ntpq-opts.h@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpq/ntpq-opts.texi@1.165 +2 -2
+ NTP_4_2_7P163
+
+ ntpq/ntpq.1@1.165 +2 -2
+ NTP_4_2_7P163
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.165 +3 -3
+ NTP_4_2_7P163
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.165 +2 -2
+ NTP_4_2_7P163
+
+ ntpsnmpd/ntpsnmpd.1@1.165 +2 -2
+ NTP_4_2_7P163
+
+ packageinfo.sh@1.165 +1 -1
+ NTP_4_2_7P163
+
+ sntp/sntp-opts.c@1.159 +3 -3
+ NTP_4_2_7P163
+
+ sntp/sntp-opts.h@1.159 +3 -3
+ NTP_4_2_7P163
+
+ sntp/sntp-opts.texi@1.159 +2 -2
+ NTP_4_2_7P163
+
+ sntp/sntp.1@1.159 +2 -2
+ NTP_4_2_7P163
+
+ sntp/sntp.html@1.159 +1 -1
+ NTP_4_2_7P163
+
+ util/ntp-keygen-opts.c@1.163 +3 -3
+ NTP_4_2_7P163
+
+ util/ntp-keygen-opts.h@1.163 +3 -3
+ NTP_4_2_7P163
+
+ util/ntp-keygen-opts.texi@1.166 +2 -2
+ NTP_4_2_7P163
+
+ util/ntp-keygen.1@1.166 +2 -2
+ NTP_4_2_7P163
+
+ChangeSet@1.2498, 2011-05-08 01:58:37+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1911] missing curly brace in libntp/ntp_rfc2553.c
+
+ ChangeLog@1.865.1.10 +1 -0
+ [Bug 1911] missing curly brace in libntp/ntp_rfc2553.c
+
+ libntp/ntp_rfc2553.c@1.47 +57 -35
+ [Bug 1911] missing curly brace in libntp/ntp_rfc2553.c
+ Refactor copy_addrinfo_common() code out of copy_addrinfo_impl()
+ and copy_addrinfo_list_impl().
+
+ChangeSet@1.2497, 2011-05-03 09:00:25+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P162
+ TAG: NTP_4_2_7P162
+
+ ChangeLog@1.865.1.9 +1 -0
+ NTP_4_2_7P162
+
+ ntpd/ntpd-opts.c@1.167 +3 -3
+ NTP_4_2_7P162
+
+ ntpd/ntpd-opts.h@1.167 +3 -3
+ NTP_4_2_7P162
+
+ ntpd/ntpd-opts.texi@1.165 +2 -2
+ NTP_4_2_7P162
+
+ ntpd/ntpd.1@1.165 +2 -2
+ NTP_4_2_7P162
+
+ ntpdc/ntpdc-opts.c@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpdc/ntpdc-opts.h@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpdc/ntpdc-opts.texi@1.164 +2 -2
+ NTP_4_2_7P162
+
+ ntpdc/ntpdc.1@1.164 +2 -2
+ NTP_4_2_7P162
+
+ ntpq/ntpq-opts.c@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpq/ntpq-opts.h@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpq/ntpq-opts.texi@1.164 +2 -2
+ NTP_4_2_7P162
+
+ ntpq/ntpq.1@1.164 +2 -2
+ NTP_4_2_7P162
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.164 +3 -3
+ NTP_4_2_7P162
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.164 +2 -2
+ NTP_4_2_7P162
+
+ ntpsnmpd/ntpsnmpd.1@1.164 +2 -2
+ NTP_4_2_7P162
+
+ packageinfo.sh@1.164 +1 -1
+ NTP_4_2_7P162
+
+ sntp/sntp-opts.c@1.158 +3 -3
+ NTP_4_2_7P162
+
+ sntp/sntp-opts.h@1.158 +3 -3
+ NTP_4_2_7P162
+
+ sntp/sntp-opts.texi@1.158 +2 -2
+ NTP_4_2_7P162
+
+ sntp/sntp.1@1.158 +2 -2
+ NTP_4_2_7P162
+
+ sntp/sntp.html@1.158 +1 -1
+ NTP_4_2_7P162
+
+ util/ntp-keygen-opts.c@1.162 +3 -3
+ NTP_4_2_7P162
+
+ util/ntp-keygen-opts.h@1.162 +3 -3
+ NTP_4_2_7P162
+
+ util/ntp-keygen-opts.texi@1.165 +2 -2
+ NTP_4_2_7P162
+
+ util/ntp-keygen.1@1.165 +2 -2
+ NTP_4_2_7P162
+
+ChangeSet@1.2496, 2011-05-02 21:16:22-07:00, harlan@hms-mbp.local
+ [Bug 1910] Support the Tristate Ltd. TS-GPSclock-01
+
+ ChangeLog@1.865.1.8 +1 -0
+ [Bug 1910] Support the Tristate Ltd. TS-GPSclock-01
+
+ html/drivers/driver40.html@1.15 +95 -23
+ [Bug 1910] Support the Tristate Ltd. TS-GPSclock-01
+
+ ntpd/refclock_jjy.c@1.24 +368 -24
+ [Bug 1910] Support the Tristate Ltd. TS-GPSclock-01
+
+ChangeSet@1.2495, 2011-05-02 17:58:58-04:00, stenn@deacon.udel.edu
+ more ignore file cleanup
+
+ BitKeeper/etc/ignore@1.80 +7 -11
+ more ignore file cleanup
+
+ChangeSet@1.2494, 2011-05-02 21:14:30+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P161
+ TAG: NTP_4_2_7P161
+
+ ChangeLog@1.865.1.7 +1 -0
+ NTP_4_2_7P161
+
+ ntpd/ntpd-opts.c@1.166 +3 -3
+ NTP_4_2_7P161
+
+ ntpd/ntpd-opts.h@1.166 +3 -3
+ NTP_4_2_7P161
+
+ ntpd/ntpd-opts.texi@1.164 +2 -2
+ NTP_4_2_7P161
+
+ ntpd/ntpd.1@1.164 +2 -2
+ NTP_4_2_7P161
+
+ ntpdc/ntpdc-opts.c@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpdc/ntpdc-opts.h@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpdc/ntpdc-opts.texi@1.163 +2 -2
+ NTP_4_2_7P161
+
+ ntpdc/ntpdc.1@1.163 +2 -2
+ NTP_4_2_7P161
+
+ ntpq/ntpq-opts.c@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpq/ntpq-opts.h@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpq/ntpq-opts.texi@1.163 +2 -2
+ NTP_4_2_7P161
+
+ ntpq/ntpq.1@1.163 +2 -2
+ NTP_4_2_7P161
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.163 +3 -3
+ NTP_4_2_7P161
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.163 +2 -2
+ NTP_4_2_7P161
+
+ ntpsnmpd/ntpsnmpd.1@1.163 +2 -2
+ NTP_4_2_7P161
+
+ packageinfo.sh@1.163 +1 -1
+ NTP_4_2_7P161
+
+ sntp/sntp-opts.c@1.157 +3 -3
+ NTP_4_2_7P161
+
+ sntp/sntp-opts.h@1.157 +3 -3
+ NTP_4_2_7P161
+
+ sntp/sntp-opts.texi@1.157 +2 -2
+ NTP_4_2_7P161
+
+ sntp/sntp.1@1.157 +2 -2
+ NTP_4_2_7P161
+
+ sntp/sntp.html@1.157 +1 -1
+ NTP_4_2_7P161
+
+ util/ntp-keygen-opts.c@1.161 +3 -3
+ NTP_4_2_7P161
+
+ util/ntp-keygen-opts.h@1.161 +3 -3
+ NTP_4_2_7P161
+
+ util/ntp-keygen-opts.texi@1.164 +2 -2
+ NTP_4_2_7P161
+
+ util/ntp-keygen.1@1.164 +2 -2
+ NTP_4_2_7P161
+
+ChangeSet@1.2493, 2011-05-01 22:57:03+00:00, davehart@shiny.ad.hartbrothers.com
+ Add missing --enable-local-libevent help to top-level configure.
+
+ ChangeLog@1.865.1.6 +1 -0
+ Add missing --enable-local-libevent help to top-level configure.
+
+ configure.ac@1.527 +2 -0
+ Add missing --enable-local-libevent help to top-level configure.
+
+ sntp/m4/ntp_libevent.m4@1.7 +24 -10
+ Add missing --enable-local-libevent help to top-level configure.
+
+ChangeSet@1.2492, 2011-05-01 21:15:54+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ ChangeLog@1.865.1.5 +4 -0
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ Makefile.am@1.109 +1 -1
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ build@1.45 +2 -2
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ configure.ac@1.526 +1 -1
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ flock-build@1.52 +1 -1
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ sntp/configure.ac@1.61 +1 -1
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ sntp/libevent/configure.in@1.7 +1 -0
+ [Bug 1906] 4.2.7p160 - libtool: compile: cannot determine name of
+ library object in ./libevent
+ Share a single sntp/libevent/build-aux directory between all three
+ configure scripts.
+
+ChangeSet@1.2491, 2011-05-01 10:40:29+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog entry needed for -dev, which rolled with the bug.
+
+ ChangeLog@1.865.1.4 +1 -0
+ ChangeLog entry needed for -dev, which rolled with the bug.
+
+ChangeSet@1.2082.4.207, 2011-05-01 10:37:55+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1904] New: 4.2.7p160 Windows build broken (POSIX_SHELL).
- ports/winnt/include/config.h@1.83 +1 -0
+ ports/winnt/include/config.h@1.79.1.4 +1 -0
[Bug 1904] New: 4.2.7p160 Windows build broken (POSIX_SHELL).
-ChangeSet@1.2293, 2011-05-01 02:47:38-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2489, 2011-05-01 08:30:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P160
+ TAG: NTP_4_2_7P160
+
+ ChangeLog@1.865.1.3 +1 -0
+ NTP_4_2_7P160
+
+ ntpd/ntpd-opts.c@1.165 +41 -46
+ NTP_4_2_7P160
+
+ ntpd/ntpd-opts.h@1.165 +12 -12
+ NTP_4_2_7P160
+
+ ntpd/ntpd-opts.texi@1.163 +2 -2
+ NTP_4_2_7P160
+
+ ntpd/ntpd.1@1.163 +3 -2
+ NTP_4_2_7P160
+
+ ntpdc/ntpdc-opts.c@1.162 +41 -46
+ NTP_4_2_7P160
+
+ ntpdc/ntpdc-opts.h@1.162 +12 -12
+ NTP_4_2_7P160
+
+ ntpdc/ntpdc-opts.texi@1.162 +2 -2
+ NTP_4_2_7P160
+
+ ntpdc/ntpdc.1@1.162 +3 -2
+ NTP_4_2_7P160
+
+ ntpq/ntpq-opts.c@1.162 +41 -46
+ NTP_4_2_7P160
+
+ ntpq/ntpq-opts.h@1.162 +12 -12
+ NTP_4_2_7P160
+
+ ntpq/ntpq-opts.texi@1.162 +2 -2
+ NTP_4_2_7P160
+
+ ntpq/ntpq.1@1.162 +3 -2
+ NTP_4_2_7P160
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.162 +41 -46
+ NTP_4_2_7P160
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.162 +12 -12
+ NTP_4_2_7P160
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.162 +2 -2
+ NTP_4_2_7P160
+
+ ntpsnmpd/ntpsnmpd.1@1.162 +3 -2
+ NTP_4_2_7P160
+
+ packageinfo.sh@1.162 +1 -1
+ NTP_4_2_7P160
+
+ sntp/sntp-opts.c@1.156 +57 -97
+ NTP_4_2_7P160
+
+ sntp/sntp-opts.h@1.156 +12 -12
+ NTP_4_2_7P160
+
+ sntp/sntp-opts.texi@1.156 +6 -4
+ NTP_4_2_7P160
+
+ sntp/sntp.1@1.156 +69 -90
+ NTP_4_2_7P160
+
+ sntp/sntp.html@1.156 +5 -3
+ NTP_4_2_7P160
+
+ util/ntp-keygen-opts.c@1.160 +50 -73
+ NTP_4_2_7P160
+
+ util/ntp-keygen-opts.h@1.160 +12 -12
+ NTP_4_2_7P160
+
+ util/ntp-keygen-opts.texi@1.163 +4 -3
+ NTP_4_2_7P160
+
+ util/ntp-keygen.1@1.163 +3 -2
+ NTP_4_2_7P160
+
+ChangeSet@1.2082.4.206, 2011-05-01 02:47:38-04:00, stenn@deacon.udel.edu
hack around a possible regression in the new autogen
- include/copyright.def@1.14 +4 -1
+ include/copyright.def@1.13.1.1 +4 -1
hack around a possible regression in the new autogen
-ChangeSet@1.2292, 2011-05-01 02:41:53-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.205, 2011-05-01 02:41:53-04:00, stenn@deacon.udel.edu
Upgrade to libopts 35.0.10 from AutoGen 5.11.9pre8
- ChangeLog@1.710 +4 -0
+ ChangeLog@1.496.26.143 +4 -0
Upgrade to libopts 35.0.10 from AutoGen 5.11.9pre8
sntp/libopts/Makefile.am@1.10 +16 -16
@@ -1490,19 +87050,4680 @@ ChangeSet@1.2292, 2011-05-01 02:41:53-04:00, stenn@deacon.udel.edu
sntp/libopts/xat-attribute.h@1.13 +1 -1
Updated to libopts-35.0.10
-ChangeSet@1.2291, 2011-02-22 00:38:53-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2487, 2011-04-30 03:15:11-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1901] Simulator does not set progname.
+
+ ChangeLog@1.865.1.1 +1 -0
+ [Bug 1901] Simulator does not set progname.
+
+ ntpd/ntpd.c@1.126 +1 -0
+ [Bug 1901] Simulator does not set progname.
+
+ChangeSet@1.2479.13.1, 2011-04-29 19:44:06+00:00, davehart@shiny.ad.hartbrothers.com
+ Change "pool DNS" messages from msyslog to debug trace output.
+ Prefer LOCAL and ACTS drivers to orphan parent peer as documented.
+ Include LOCAL and ACTS drivers marked prefer in candidate list.
+ Remove unused FLAG_SYSPEER from peer->status.
+ Respect "tos orphanwait 0" at startup. Previously there was an
+ unconditional 300 s. startup orphanwait, though other values were
+ respected for subsequent orphan wait periods after no_sys_peer events.
+ Apply "tos orphanwait" (def. 300 seconds) to LOCAL and ACTS reference
+ clock drivers, in addition to orphan parent operation. LOCAL and ACTS
+ are not selectable during the orphanwait delay at startup and after
+ each no_sys_peer event. This prevents a particular form of clock-
+ hopping, such as using LOCAL briefly at startup before remote peers
+ are selectable. This fixes the issue reported in [Bug 988].
+ [Bug 988] Local clock eats up -g option, so ntpd stops with large
+ initial time offset.
+
+ ChangeLog@1.866 +15 -0
+ Change "pool DNS" messages from msyslog to debug trace output.
+ Prefer LOCAL and ACTS drivers to orphan parent peer as documented.
+ Include LOCAL and ACTS drivers marked prefer in candidate list.
+ Remove unused FLAG_SYSPEER from peer->status.
+ Respect "tos orphanwait 0" at startup. Previously there was an
+ unconditional 300 s. startup orphanwait, though other values were
+ respected for subsequent orphan wait periods after no_sys_peer events.
+ Apply "tos orphanwait" (def. 300 seconds) to LOCAL and ACTS reference
+ clock drivers, in addition to orphan parent operation. LOCAL and ACTS
+ are not selectable during the orphanwait delay at startup and after
+ each no_sys_peer event. This prevents a particular form of clock-
+ hopping, such as using LOCAL briefly at startup before remote peers
+ are selectable. This fixes the issue reported in [Bug 988].
+ [Bug 988] Local clock eats up -g option, so ntpd stops with large
+ initial time offset.
+
+ include/ntp.h@1.194 +9 -9
+ Remove unused FLAG_SYSPEER from peer->status.
+
+ ntpd/ntp_loopfilter.c@1.163 +1 -1
+ comment typo fix
+
+ ntpd/ntp_proto.c@1.321 +41 -33
+ Change "pool DNS" messages from msyslog to debug trace output.
+ Prefer LOCAL and ACTS drivers to orphan parent peer as documented.
+ Include LOCAL and ACTS drivers marked prefer in candidate list.
+ Remove unused FLAG_SYSPEER from peer->status.
+ Respect "tos orphanwait 0" at startup. Previously there was an
+ unconditional 300 s. startup orphanwait, though other values were
+ respected for subsequent orphan wait periods after no_sys_peer events.
+ Apply "tos orphanwait" (def. 300 seconds) to LOCAL and ACTS reference
+ clock drivers, in addition to orphan parent operation. LOCAL and ACTS
+ are not selectable during the orphanwait delay at startup and after
+ each no_sys_peer event. This prevents a particular form of clock-
+ hopping, such as using LOCAL briefly at startup before remote peers
+ are selectable. This fixes the issue reported in [Bug 988].
+ [Bug 988] Local clock eats up -g option, so ntpd stops with large
+ initial time offset.
+
+ ntpd/refclock_acts.c@1.50 +7 -6
+ whitespace-only cleanup
+
+ChangeSet@1.2479.1.82, 2011-04-28 21:42:13-04:00, stenn@deacon.udel.edu
+ cleanup the bk ignore file - add sntp/scm-rev, remove old version stuff
+
+ BitKeeper/etc/ignore@1.79 +12 -11
+ cleanup the bk ignore file - add sntp/scm-rev, remove old version stuff
+
+ChangeSet@1.2479.1.81, 2011-04-28 06:47:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P159
+ TAG: NTP_4_2_7P159
+
+ ChangeLog@1.865 +1 -0
+ NTP_4_2_7P159
+
+ ntpd/ntpd-opts.c@1.164 +2 -2
+ NTP_4_2_7P159
+
+ ntpd/ntpd-opts.h@1.164 +3 -3
+ NTP_4_2_7P159
+
+ ntpd/ntpd-opts.texi@1.162 +2 -2
+ NTP_4_2_7P159
+
+ ntpd/ntpd.1@1.162 +2 -2
+ NTP_4_2_7P159
+
+ ntpdc/ntpdc-opts.c@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpdc/ntpdc-opts.h@1.161 +3 -3
+ NTP_4_2_7P159
+
+ ntpdc/ntpdc-opts.texi@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpdc/ntpdc.1@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpq/ntpq-opts.c@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpq/ntpq-opts.h@1.161 +3 -3
+ NTP_4_2_7P159
+
+ ntpq/ntpq-opts.texi@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpq/ntpq.1@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.161 +3 -3
+ NTP_4_2_7P159
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.161 +2 -2
+ NTP_4_2_7P159
+
+ ntpsnmpd/ntpsnmpd.1@1.161 +2 -2
+ NTP_4_2_7P159
+
+ packageinfo.sh@1.161 +1 -1
+ NTP_4_2_7P159
+
+ sntp/sntp-opts.c@1.155 +2 -2
+ NTP_4_2_7P159
+
+ sntp/sntp-opts.h@1.155 +3 -3
+ NTP_4_2_7P159
+
+ sntp/sntp-opts.texi@1.155 +2 -2
+ NTP_4_2_7P159
+
+ sntp/sntp.1@1.155 +2 -2
+ NTP_4_2_7P159
+
+ sntp/sntp.html@1.155 +1 -1
+ NTP_4_2_7P159
+
+ util/ntp-keygen-opts.c@1.159 +2 -2
+ NTP_4_2_7P159
+
+ util/ntp-keygen-opts.h@1.159 +3 -3
+ NTP_4_2_7P159
+
+ util/ntp-keygen-opts.texi@1.162 +2 -2
+ NTP_4_2_7P159
+
+ util/ntp-keygen.1@1.162 +2 -2
+ NTP_4_2_7P159
+
+ChangeSet@1.2479.12.3, 2011-04-28 00:05:49-04:00, murray@pogo.udel.edu
+ ntp_io.c:
+ Fix unused variable warning (no IPv6)
+ ntp_control.c:
+ Fix unused variable warning (no REFCLOCKs)
+ ChangeLog:
+ Fix unused variable warnings.
+
+ ChangeLog@1.861.1.3 +1 -0
+ Fix unused variable warnings.
+
+ ntpd/ntp_control.c@1.168 +2 -0
+ Fix unused variable warning (no REFCLOCKs)
+
+ ntpd/ntp_io.c@1.353 +4 -1
+ Fix unused variable warning (no IPv6)
+
+ChangeSet@1.2479.12.2, 2011-04-24 07:38:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P158
+ TAG: NTP_4_2_7P158
+
+ ChangeLog@1.861.1.2 +1 -0
+ NTP_4_2_7P158
+
+ ntpd/ntpd-opts.c@1.163 +2 -2
+ NTP_4_2_7P158
+
+ ntpd/ntpd-opts.h@1.163 +3 -3
+ NTP_4_2_7P158
+
+ ntpd/ntpd-opts.texi@1.161 +2 -2
+ NTP_4_2_7P158
+
+ ntpd/ntpd.1@1.161 +2 -2
+ NTP_4_2_7P158
+
+ ntpdc/ntpdc-opts.c@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpdc/ntpdc-opts.h@1.160 +3 -3
+ NTP_4_2_7P158
+
+ ntpdc/ntpdc-opts.texi@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpdc/ntpdc.1@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpq/ntpq-opts.c@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpq/ntpq-opts.h@1.160 +3 -3
+ NTP_4_2_7P158
+
+ ntpq/ntpq-opts.texi@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpq/ntpq.1@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.160 +3 -3
+ NTP_4_2_7P158
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.160 +2 -2
+ NTP_4_2_7P158
+
+ ntpsnmpd/ntpsnmpd.1@1.160 +2 -2
+ NTP_4_2_7P158
+
+ packageinfo.sh@1.160 +1 -1
+ NTP_4_2_7P158
+
+ sntp/sntp-opts.c@1.154 +2 -2
+ NTP_4_2_7P158
+
+ sntp/sntp-opts.h@1.154 +3 -3
+ NTP_4_2_7P158
+
+ sntp/sntp-opts.texi@1.154 +2 -2
+ NTP_4_2_7P158
+
+ sntp/sntp.1@1.154 +2 -2
+ NTP_4_2_7P158
+
+ sntp/sntp.html@1.154 +1 -1
+ NTP_4_2_7P158
+
+ util/ntp-keygen-opts.c@1.158 +2 -2
+ NTP_4_2_7P158
+
+ util/ntp-keygen-opts.h@1.158 +3 -3
+ NTP_4_2_7P158
+
+ util/ntp-keygen-opts.texi@1.161 +2 -2
+ NTP_4_2_7P158
+
+ util/ntp-keygen.1@1.161 +2 -2
+ NTP_4_2_7P158
+
+ChangeSet@1.2479.12.1, 2011-04-23 16:50:09+00:00, davehart@shiny.ad.hartbrothers.com
+ Update libevent --disable-libevent-regress handling to work when
+ building libevent using mingw.
+
+ ChangeLog@1.861.1.1 +2 -0
+ Update libevent --disable-libevent-regress handling to work when
+ building libevent using mingw.
+
+ sntp/libevent/configure.in@1.6 +0 -6
+ Update libevent --disable-libevent-regress handling to work when
+ building libevent using mingw.
+
+ sntp/libevent/test/Makefile.am@1.5 +4 -1
+ Update libevent --disable-libevent-regress handling to work when
+ building libevent using mingw.
+
+ChangeSet@1.2479.1.78, 2011-04-23 11:38:29+02:00, jnperlin@hydra.localnet
+ minor cleanup in timespecops/timevalops
+
+ ChangeLog@1.862 +1 -0
+ minor cleanup in timespecops/timevalops
+
+ libntp/timespecops.c@1.6 +12 -69
+ unified with tvalops, use string formatting in libntp, fixed misleading comments
+
+ libntp/timevalops.c@1.7 +9 -4
+ fixed misleading comments
+
+ChangeSet@1.2479.1.77, 2011-04-21 06:16:26+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P157
+ TAG: NTP_4_2_7P157
+
+ ChangeLog@1.861 +1 -0
+ NTP_4_2_7P157
+
+ ntpd/ntpd-opts.c@1.162 +2 -2
+ NTP_4_2_7P157
+
+ ntpd/ntpd-opts.h@1.162 +3 -3
+ NTP_4_2_7P157
+
+ ntpd/ntpd-opts.texi@1.160 +2 -2
+ NTP_4_2_7P157
+
+ ntpd/ntpd.1@1.160 +2 -2
+ NTP_4_2_7P157
+
+ ntpdc/ntpdc-opts.c@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpdc/ntpdc-opts.h@1.159 +3 -3
+ NTP_4_2_7P157
+
+ ntpdc/ntpdc-opts.texi@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpdc/ntpdc.1@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpq/ntpq-opts.c@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpq/ntpq-opts.h@1.159 +3 -3
+ NTP_4_2_7P157
+
+ ntpq/ntpq-opts.texi@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpq/ntpq.1@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.159 +3 -3
+ NTP_4_2_7P157
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.159 +2 -2
+ NTP_4_2_7P157
+
+ ntpsnmpd/ntpsnmpd.1@1.159 +2 -2
+ NTP_4_2_7P157
+
+ packageinfo.sh@1.159 +1 -1
+ NTP_4_2_7P157
+
+ sntp/sntp-opts.c@1.153 +2 -2
+ NTP_4_2_7P157
+
+ sntp/sntp-opts.h@1.153 +3 -3
+ NTP_4_2_7P157
+
+ sntp/sntp-opts.texi@1.153 +2 -2
+ NTP_4_2_7P157
+
+ sntp/sntp.1@1.153 +2 -2
+ NTP_4_2_7P157
+
+ sntp/sntp.html@1.153 +1 -1
+ NTP_4_2_7P157
+
+ util/ntp-keygen-opts.c@1.157 +2 -2
+ NTP_4_2_7P157
+
+ util/ntp-keygen-opts.h@1.157 +3 -3
+ NTP_4_2_7P157
+
+ util/ntp-keygen-opts.texi@1.160 +2 -2
+ NTP_4_2_7P157
+
+ util/ntp-keygen.1@1.160 +2 -2
+ NTP_4_2_7P157
+
+ChangeSet@1.2479.1.76, 2011-04-19 09:38:26+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1890] 4.2.7p156 segfault in duplicate freeaddrinfo().
+
+ ChangeLog@1.860 +1 -0
+ [Bug 1890] 4.2.7p156 segfault in duplicate freeaddrinfo().
+
+ libntp/ntp_intres.c@1.97 +0 -1
+ [Bug 1890] 4.2.7p156 segfault in duplicate freeaddrinfo().
+
+ChangeSet@1.2479.1.75, 2011-04-19 06:55:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P156
+ TAG: NTP_4_2_7P156
+
+ ChangeLog@1.859 +1 -0
+ NTP_4_2_7P156
+
+ ntpd/ntpd-opts.c@1.161 +2 -2
+ NTP_4_2_7P156
+
+ ntpd/ntpd-opts.h@1.161 +3 -3
+ NTP_4_2_7P156
+
+ ntpd/ntpd-opts.texi@1.159 +2 -2
+ NTP_4_2_7P156
+
+ ntpd/ntpd.1@1.159 +2 -2
+ NTP_4_2_7P156
+
+ ntpdc/ntpdc-opts.c@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpdc/ntpdc-opts.h@1.158 +3 -3
+ NTP_4_2_7P156
+
+ ntpdc/ntpdc-opts.texi@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpdc/ntpdc.1@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpq/ntpq-opts.c@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpq/ntpq-opts.h@1.158 +3 -3
+ NTP_4_2_7P156
+
+ ntpq/ntpq-opts.texi@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpq/ntpq.1@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.158 +3 -3
+ NTP_4_2_7P156
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.158 +2 -2
+ NTP_4_2_7P156
+
+ ntpsnmpd/ntpsnmpd.1@1.158 +2 -2
+ NTP_4_2_7P156
+
+ packageinfo.sh@1.158 +1 -1
+ NTP_4_2_7P156
+
+ sntp/sntp-opts.c@1.152 +2 -2
+ NTP_4_2_7P156
+
+ sntp/sntp-opts.h@1.152 +3 -3
+ NTP_4_2_7P156
+
+ sntp/sntp-opts.texi@1.152 +2 -2
+ NTP_4_2_7P156
+
+ sntp/sntp.1@1.152 +2 -2
+ NTP_4_2_7P156
+
+ sntp/sntp.html@1.152 +1 -1
+ NTP_4_2_7P156
+
+ util/ntp-keygen-opts.c@1.156 +2 -2
+ NTP_4_2_7P156
+
+ util/ntp-keygen-opts.h@1.156 +3 -3
+ NTP_4_2_7P156
+
+ util/ntp-keygen-opts.texi@1.159 +2 -2
+ NTP_4_2_7P156
+
+ util/ntp-keygen.1@1.159 +2 -2
+ NTP_4_2_7P156
+
+ChangeSet@1.2479.1.74, 2011-04-18 22:32:32+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1851] freeaddrinfo() called after getaddrinfo() fails.
+
+ ChangeLog@1.858 +1 -0
+ [Bug 1851] freeaddrinfo() called after getaddrinfo() fails.
+
+ libntp/ntp_intres.c@1.96 +8 -7
+ [Bug 1851] freeaddrinfo() called after getaddrinfo() fails.
+
+ChangeSet@1.2479.1.73, 2011-04-18 04:58:45+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P155
+ TAG: NTP_4_2_7P155
+
+ ChangeLog@1.857 +1 -0
+ NTP_4_2_7P155
+
+ ntpd/ntpd-opts.c@1.160 +2 -2
+ NTP_4_2_7P155
+
+ ntpd/ntpd-opts.h@1.160 +3 -3
+ NTP_4_2_7P155
+
+ ntpd/ntpd-opts.texi@1.158 +2 -2
+ NTP_4_2_7P155
+
+ ntpd/ntpd.1@1.158 +2 -2
+ NTP_4_2_7P155
+
+ ntpdc/ntpdc-opts.c@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpdc/ntpdc-opts.h@1.157 +3 -3
+ NTP_4_2_7P155
+
+ ntpdc/ntpdc-opts.texi@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpdc/ntpdc.1@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpq/ntpq-opts.c@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpq/ntpq-opts.h@1.157 +3 -3
+ NTP_4_2_7P155
+
+ ntpq/ntpq-opts.texi@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpq/ntpq.1@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.157 +3 -3
+ NTP_4_2_7P155
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.157 +2 -2
+ NTP_4_2_7P155
+
+ ntpsnmpd/ntpsnmpd.1@1.157 +2 -2
+ NTP_4_2_7P155
+
+ packageinfo.sh@1.157 +1 -1
+ NTP_4_2_7P155
+
+ sntp/sntp-opts.c@1.151 +2 -2
+ NTP_4_2_7P155
+
+ sntp/sntp-opts.h@1.151 +3 -3
+ NTP_4_2_7P155
+
+ sntp/sntp-opts.texi@1.151 +2 -2
+ NTP_4_2_7P155
+
+ sntp/sntp.1@1.151 +2 -2
+ NTP_4_2_7P155
+
+ sntp/sntp.html@1.151 +1 -1
+ NTP_4_2_7P155
+
+ util/ntp-keygen-opts.c@1.155 +2 -2
+ NTP_4_2_7P155
+
+ util/ntp-keygen-opts.h@1.155 +3 -3
+ NTP_4_2_7P155
+
+ util/ntp-keygen-opts.texi@1.158 +2 -2
+ NTP_4_2_7P155
+
+ util/ntp-keygen.1@1.158 +2 -2
+ NTP_4_2_7P155
+
+ChangeSet@1.2479.1.72, 2011-04-17 20:08:44+00:00, davehart@shiny.ad.hartbrothers.com
+ Automerge of ChangeLog got it wrong.
+
+ ChangeLog@1.856 +1 -1
+ Automerge of ChangeLog got it wrong.
+
+ChangeSet@1.2479.11.1, 2011-04-17 11:32:14+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P154
+ TAG: NTP_4_2_7P154
+
+ ChangeLog@1.853.1.1 +1 -0
+ NTP_4_2_7P154
+
+ ntpd/ntpd-opts.c@1.159 +2 -2
+ NTP_4_2_7P154
+
+ ntpd/ntpd-opts.h@1.159 +3 -3
+ NTP_4_2_7P154
+
+ ntpd/ntpd-opts.texi@1.157 +2 -2
+ NTP_4_2_7P154
+
+ ntpd/ntpd.1@1.157 +2 -2
+ NTP_4_2_7P154
+
+ ntpdc/ntpdc-opts.c@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpdc/ntpdc-opts.h@1.156 +3 -3
+ NTP_4_2_7P154
+
+ ntpdc/ntpdc-opts.texi@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpdc/ntpdc.1@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpq/ntpq-opts.c@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpq/ntpq-opts.h@1.156 +3 -3
+ NTP_4_2_7P154
+
+ ntpq/ntpq-opts.texi@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpq/ntpq.1@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.156 +3 -3
+ NTP_4_2_7P154
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.156 +2 -2
+ NTP_4_2_7P154
+
+ ntpsnmpd/ntpsnmpd.1@1.156 +2 -2
+ NTP_4_2_7P154
+
+ packageinfo.sh@1.156 +1 -1
+ NTP_4_2_7P154
+
+ sntp/sntp-opts.c@1.150 +2 -2
+ NTP_4_2_7P154
+
+ sntp/sntp-opts.h@1.150 +3 -3
+ NTP_4_2_7P154
+
+ sntp/sntp-opts.texi@1.150 +2 -2
+ NTP_4_2_7P154
+
+ sntp/sntp.1@1.150 +2 -2
+ NTP_4_2_7P154
+
+ sntp/sntp.html@1.150 +1 -1
+ NTP_4_2_7P154
+
+ util/ntp-keygen-opts.c@1.154 +2 -2
+ NTP_4_2_7P154
+
+ util/ntp-keygen-opts.h@1.154 +3 -3
+ NTP_4_2_7P154
+
+ util/ntp-keygen-opts.texi@1.157 +2 -2
+ NTP_4_2_7P154
+
+ util/ntp-keygen.1@1.157 +2 -2
+ NTP_4_2_7P154
+
+ChangeSet@1.2479.1.70, 2011-04-17 08:22:57+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct includes in lib/isc for strlcpy(), strlcat() prototypes.
+
+ lib/isc/log.c@1.5 +1 -1
+ Correct includes in lib/isc for strlcpy(), strlcat() prototypes.
+
+ lib/isc/netaddr.c@1.11 +1 -1
+ Correct includes in lib/isc for strlcpy(), strlcat() prototypes.
+
+ lib/isc/unix/dir.c@1.3 +1 -1
+ Correct includes in lib/isc for strlcpy(), strlcat() prototypes.
+
+ lib/isc/unix/file.c@1.3 +1 -1
+ Correct includes in lib/isc for strlcpy(), strlcat() prototypes.
+
+ChangeSet@1.2479.1.69, 2011-04-17 08:10:39+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix leak in refclock_datum.c start failure path.
+
+ ChangeLog@1.854 +1 -0
+ Fix leak in refclock_datum.c start failure path.
+
+ ntpd/refclock_datum.c@1.19 +1 -0
+ Fix leak in refclock_datum.c start failure path.
+
+ChangeSet@1.2479.1.68, 2011-04-16 18:14:13+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1887] DNS fails on 4.2.7p153 using threads.
+
+ ChangeLog@1.853 +1 -0
+ [Bug 1887] DNS fails on 4.2.7p153 using threads.
+
+ libntp/work_thread.c@1.9 +4 -3
+ [Bug 1887] DNS fails on 4.2.7p153 using threads.
+
+ChangeSet@1.2479.1.67, 2011-04-16 07:31:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P153
+ TAG: NTP_4_2_7P153
+
+ ChangeLog@1.852 +1 -0
+ NTP_4_2_7P153
+
+ ntpd/ntpd-opts.c@1.158 +2 -2
+ NTP_4_2_7P153
+
+ ntpd/ntpd-opts.h@1.158 +3 -3
+ NTP_4_2_7P153
+
+ ntpd/ntpd-opts.texi@1.156 +2 -2
+ NTP_4_2_7P153
+
+ ntpd/ntpd.1@1.156 +2 -2
+ NTP_4_2_7P153
+
+ ntpdc/ntpdc-opts.c@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpdc/ntpdc-opts.h@1.155 +3 -3
+ NTP_4_2_7P153
+
+ ntpdc/ntpdc-opts.texi@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpdc/ntpdc.1@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpq/ntpq-opts.c@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpq/ntpq-opts.h@1.155 +3 -3
+ NTP_4_2_7P153
+
+ ntpq/ntpq-opts.texi@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpq/ntpq.1@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.155 +3 -3
+ NTP_4_2_7P153
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.155 +2 -2
+ NTP_4_2_7P153
+
+ ntpsnmpd/ntpsnmpd.1@1.155 +2 -2
+ NTP_4_2_7P153
+
+ packageinfo.sh@1.155 +1 -1
+ NTP_4_2_7P153
+
+ sntp/sntp-opts.c@1.149 +2 -2
+ NTP_4_2_7P153
+
+ sntp/sntp-opts.h@1.149 +3 -3
+ NTP_4_2_7P153
+
+ sntp/sntp-opts.texi@1.149 +2 -2
+ NTP_4_2_7P153
+
+ sntp/sntp.1@1.149 +2 -2
+ NTP_4_2_7P153
+
+ sntp/sntp.html@1.149 +1 -1
+ NTP_4_2_7P153
+
+ util/ntp-keygen-opts.c@1.153 +2 -2
+ NTP_4_2_7P153
+
+ util/ntp-keygen-opts.h@1.153 +3 -3
+ NTP_4_2_7P153
+
+ util/ntp-keygen-opts.texi@1.156 +2 -2
+ NTP_4_2_7P153
+
+ util/ntp-keygen.1@1.156 +2 -2
+ NTP_4_2_7P153
+
+ChangeSet@1.2479.1.66, 2011-04-15 19:53:04+00:00, davehart@shiny.ad.hartbrothers.com
+ A few more Coverity Scan cleanups.
+
+ ChangeLog@1.851 +1 -0
+ A few more Coverity Scan cleanups.
+
+ lib/isc/inet_ntop.c@1.11 +6 -5
+ strcpy() -> memcpy()
+ sprintf() -> snprintf()
+
+ lib/isc/log.c@1.4 +5 -2
+ strcpy() -> strlcpy()
+
+ lib/isc/netaddr.c@1.10 +2 -1
+ strcpy() -> strlcpy()
+
+ lib/isc/task.c@1.5 +3 -1
+ Lock manager object during destruction to keep Coverity Scan lock
+ analysis on track.
+
+ lib/isc/unix/dir.c@1.2 +10 -5
+ strcpy() -> strlcpy()
+
+ lib/isc/unix/file.c@1.2 +6 -5
+ strncpy() -> strlcpy()
+ strcat() -> strlcat()
+
+ libntp/icom.c@1.16 +1 -1
+ Add missed assignment in tcsetattr() error check.
+
+ libntp/work_thread.c@1.8 +3 -1
+ Another attempt at convincing Coverity sizeof(*hdr) - hdr->octets is
+ always positive.
+
+ ntpd/refclock_datum.c@1.18 +7 -1
+ Check tcsetattr() return value.
+
+ChangeSet@1.2461.1.3, 2011-04-15 11:33:32+00:00, davehart@shiny.ad.hartbrothers.com
+ libevent HEAD 20110415 11:33 UTC d28fc52815023113840fb9e108ada0126964a799
+
+ sntp/libevent/CommitLog@1.2 +19 -0
+ libevent HEAD 20110415 11:33 UTC d28fc52815023113840fb9e108ada0126964a799
+
+ sntp/libevent/evdns.c@1.1.1.2 +2 -1
+ libevent HEAD 20110415 11:33 UTC d28fc52815023113840fb9e108ada0126964a799
+
+ sntp/libevent/sample/http-server.c@1.1.1.2 +5 -4
+ libevent HEAD 20110415 11:33 UTC d28fc52815023113840fb9e108ada0126964a799
+
+ChangeSet@1.2479.1.64, 2011-04-15 08:46:52+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P152
+ TAG: NTP_4_2_7P152
+
+ ChangeLog@1.850 +1 -0
+ NTP_4_2_7P152
+
+ ntpd/ntpd-opts.c@1.157 +2 -2
+ NTP_4_2_7P152
+
+ ntpd/ntpd-opts.h@1.157 +3 -3
+ NTP_4_2_7P152
+
+ ntpd/ntpd-opts.texi@1.155 +2 -2
+ NTP_4_2_7P152
+
+ ntpd/ntpd.1@1.155 +2 -2
+ NTP_4_2_7P152
+
+ ntpdc/ntpdc-opts.c@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpdc/ntpdc-opts.h@1.154 +3 -3
+ NTP_4_2_7P152
+
+ ntpdc/ntpdc-opts.texi@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpdc/ntpdc.1@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpq/ntpq-opts.c@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpq/ntpq-opts.h@1.154 +3 -3
+ NTP_4_2_7P152
+
+ ntpq/ntpq-opts.texi@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpq/ntpq.1@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.154 +3 -3
+ NTP_4_2_7P152
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.154 +2 -2
+ NTP_4_2_7P152
+
+ ntpsnmpd/ntpsnmpd.1@1.154 +2 -2
+ NTP_4_2_7P152
+
+ packageinfo.sh@1.154 +1 -1
+ NTP_4_2_7P152
+
+ sntp/sntp-opts.c@1.148 +2 -2
+ NTP_4_2_7P152
+
+ sntp/sntp-opts.h@1.148 +3 -3
+ NTP_4_2_7P152
+
+ sntp/sntp-opts.texi@1.148 +2 -2
+ NTP_4_2_7P152
+
+ sntp/sntp.1@1.148 +2 -2
+ NTP_4_2_7P152
+
+ sntp/sntp.html@1.148 +1 -1
+ NTP_4_2_7P152
+
+ util/ntp-keygen-opts.c@1.152 +2 -2
+ NTP_4_2_7P152
+
+ util/ntp-keygen-opts.h@1.152 +3 -3
+ NTP_4_2_7P152
+
+ util/ntp-keygen-opts.texi@1.155 +2 -2
+ NTP_4_2_7P152
+
+ util/ntp-keygen.1@1.155 +2 -2
+ NTP_4_2_7P152
+
+ChangeSet@1.2479.1.63, 2011-04-15 00:12:03+00:00, davehart@shiny.ad.hartbrothers.com
+ Automerge cleanup
+
+ ChangeLog@1.849 +1 -0
+ Update embedded libevent to current 2.1 git HEAD.
+
+ sntp/libevent/event.c@1.4 +2 -70
+ Automerge cleanup
+
+ChangeSet@1.2461.1.2, 2011-04-14 23:28:43+00:00, davehart@shiny.ad.hartbrothers.com
+ overlooked file
+
+ sntp/libevent/evconfig-private.h.in@1.1 +43 -0
+ BitKeeper file C:/ntp/ntp-dev-libevent-upstream/sntp/libevent/evconfig-private.h.in
+
+ sntp/libevent/evconfig-private.h.in@1.0 +0 -0
+
+ChangeSet@1.2461.1.1, 2011-04-14 19:55:12+00:00, davehart@shiny.ad.hartbrothers.com
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/CommitLog@1.1 +18272 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/CommitLog@1.0 +0 -0
+
+ sntp/libevent/Makefile.am@1.1.1.1 +27 -24
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/WIN32-Code/evconfig-private.h@1.1 +6 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/WIN32-Code/evconfig-private.h@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.1.1.1 +2 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/arc4random.c@1.1.1.1 +6 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/buffer.c@1.2 +283 -266
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/buffer_iocp.c@1.2 +2 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent-internal.h@1.2 +16 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent.c@1.2 +21 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_async.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_filter.c@1.2 +2 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_openssl.c@1.2 +3 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_pair.c@1.2 +2 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_ratelim.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/bufferevent_sock.c@1.2 +3 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/configure.in@1.1.1.1 +162 -17
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/defer-internal.h@1.2 +2 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/devpoll.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/epoll.c@1.2 +251 -140
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/epoll_sub.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evbuffer-internal.h@1.2 +45 -12
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evdns.c@1.1.1.1 +7 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/event-internal.h@1.1.1.1 +13 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/event.c@1.1.1.1 +29 -7
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/event_iocp.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/event_tagging.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evmap.c@1.2 +8 -12
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evport.c@1.1.1.1 +15 -4
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evrpc.c@1.2 +8 -7
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evthread-internal.h@1.2 +3 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evthread.c@1.1.1.1 +13 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evthread_pthread.c@1.1.1.1 +4 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evthread_win32.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evutil.c@1.1.1.1 +94 -22
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/evutil_rand.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/http-internal.h@1.2 +2 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/http.c@1.1.1.1 +212 -47
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/include/event2/buffer.h@1.2 +102 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/include/event2/event.h@1.1.1.1 +13 -3
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/include/event2/http.h@1.2 +45 -3
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/ipv6-internal.h@1.1.1.1 +12 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/kqueue.c@1.2 +1 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/listener.c@1.2 +3 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/log.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/minheap-internal.h@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/poll.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/sample/Makefile.am@1.1.1.1 +1 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/sample/dns-example.c@1.1.1.1 +3 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/sample/hello-world.c@1.1.1.1 +3 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/sample/http-server.c@1.1.1.1 +6 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/select.c@1.1.1.1 +28 -9
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/signal.c@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/strlcpy-internal.h@1.2 +1 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/strlcpy.c@1.2 +3 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/Makefile.am@1.1.1.1 +14 -9
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/bench_httpclient.c@1.1.1.1 +3 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress.h@1.2 +1 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_buffer.c@1.2 +219 -46
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_dns.c@1.1.1.1 +2 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_http.c@1.1.1.1 +62 -53
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_listener.c@1.1.1.1 +3 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_main.c@1.2 +5 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/regress_testutils.c@1.1.1.1 +2 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/test-eof.c@1.1.1.1 +9 -3
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/test-ratelim.c@1.1.1.1 +5 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/test-ratelim.sh@1.1 +77 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/test-ratelim.sh@1.0 +0 -0
+
+ sntp/libevent/test/test.sh@1.1.1.1 +12 -5
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/tinytest_demo.c@1.1 +215 -0
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/test/tinytest_demo.c@1.0 +0 -0
+
+ sntp/libevent/util-internal.h@1.1.1.1 +25 -2
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/whatsnew-2.0.txt@1.2 +1 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ sntp/libevent/win32select.c@1.2 +2 -1
+ libevent 2.1 (prerelease git head bfdda26534ea66b847760720260a4b4d8fcefe58)
+
+ChangeSet@1.2479.1.60, 2011-04-14 08:03:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P151
+ TAG: NTP_4_2_7P151
+
+ ChangeLog@1.848 +1 -0
+ NTP_4_2_7P151
+
+ ntpd/ntpd-opts.c@1.156 +2 -2
+ NTP_4_2_7P151
+
+ ntpd/ntpd-opts.h@1.156 +3 -3
+ NTP_4_2_7P151
+
+ ntpd/ntpd-opts.texi@1.154 +2 -2
+ NTP_4_2_7P151
+
+ ntpd/ntpd.1@1.154 +2 -2
+ NTP_4_2_7P151
+
+ ntpdc/ntpdc-opts.c@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpdc/ntpdc-opts.h@1.153 +3 -3
+ NTP_4_2_7P151
+
+ ntpdc/ntpdc-opts.texi@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpdc/ntpdc.1@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpq/ntpq-opts.c@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpq/ntpq-opts.h@1.153 +3 -3
+ NTP_4_2_7P151
+
+ ntpq/ntpq-opts.texi@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpq/ntpq.1@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.153 +3 -3
+ NTP_4_2_7P151
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.153 +2 -2
+ NTP_4_2_7P151
+
+ ntpsnmpd/ntpsnmpd.1@1.153 +2 -2
+ NTP_4_2_7P151
+
+ packageinfo.sh@1.153 +1 -1
+ NTP_4_2_7P151
+
+ sntp/sntp-opts.c@1.147 +2 -2
+ NTP_4_2_7P151
+
+ sntp/sntp-opts.h@1.147 +3 -3
+ NTP_4_2_7P151
+
+ sntp/sntp-opts.texi@1.147 +2 -2
+ NTP_4_2_7P151
+
+ sntp/sntp.1@1.147 +2 -2
+ NTP_4_2_7P151
+
+ sntp/sntp.html@1.147 +1 -1
+ NTP_4_2_7P151
+
+ util/ntp-keygen-opts.c@1.151 +2 -2
+ NTP_4_2_7P151
+
+ util/ntp-keygen-opts.h@1.151 +3 -3
+ NTP_4_2_7P151
+
+ util/ntp-keygen-opts.texi@1.154 +2 -2
+ NTP_4_2_7P151
+
+ util/ntp-keygen.1@1.154 +2 -2
+ NTP_4_2_7P151
+
+ChangeSet@1.2479.1.59, 2011-04-14 05:30:10+00:00, davehart@shiny.ad.hartbrothers.com
+ Log failure to fetch time from HOPF_P hardware.
+ Check HOPF_S sscanf() conversion count before converted values.
+ Correct mvsnprintf() and mvfprintf() for vsnprintf() that handles %m.
+
+ ChangeLog@1.847 +2 -0
+ Log failure to fetch time from HOPF_P hardware.
+ Check HOPF_S sscanf() conversion count before converted values.
+
+ libntp/msyslog.c@1.42 +59 -54
+ Correct mvsnprintf() and mvfprintf() for vsnprintf() that handles %m.
+
+ ntpd/refclock_hopfpci.c@1.13 +3 -1
+ Log failure to fetch time from HOPF_P hardware.
+
+ ntpd/refclock_hopfser.c@1.16 +11 -10
+ Check HOPF_S sscanf() conversion count before converted values.
+
+ sntp/crypto.c@1.17 +2 -1
+ Minor leak fix.
+
+ sntp/main.c@1.71 +7 -7
+ nonfunctional, makes static analysis happy.
+
+ChangeSet@1.2479.1.58, 2011-04-14 02:00:02+00:00, davehart@shiny.ad.hartbrothers.com
+ Detect vsnprintf() support for "%m" and disable our "%m" expansion.
+ Add --enable-c99-sprintf to configure args for -noopenssl variety of
+ flock-build to avoid regressions in (v)snprintf() replacement.
+ More msnprintf() unit tests.
+ Coverity Scan error checking fixes.
+
+ ChangeLog@1.846 +5 -0
+ Detect vsnprintf() support for "%m" and disable our "%m" expansion.
+ Add --enable-c99-sprintf to configure args for -noopenssl variety of
+ flock-build to avoid regressions in (v)snprintf() replacement.
+ More msnprintf() unit tests.
+ Coverity Scan error checking fixes.
+
+ flock-build@1.51 +2 -2
+ Add --enable-c99-sprintf to configure args for -noopenssl variety of
+ flock-build to avoid regressions in (v)snprintf() replacement.
+
+ libntp/audio.c@1.31 +8 -8
+ check sscanf() return values
+
+ libntp/msyslog.c@1.41 +71 -66
+ Detect vsnprintf() support for "%m" and disable our "%m" expansion.
+ Remove pre-C99-snprintf() workaround.
+
+ libntp/snprintf.c@1.11 +1 -0
+ Add /* FALLTHROUGH */ comment to %F handling.
+
+ ntpd/refclock_arc.c@1.25 +30 -27
+ use msyslog instead of printf for failure to open clock.
+
+ ntpq/ntpq-subs.c@1.87 +10 -3
+ Check decodenetnum() return value.
+
+ ntpq/ntpq.c@1.138 +3 -3
+ printf format mismatch on 64-bit.
+
+ parseutil/dcfd.c@1.24 +2 -2
+ printf format mismatch on 64-bit.
+
+ sntp/m4/ntp_libntp.m4@1.14 +62 -0
+ Detect vsnprintf() support for "%m" and disable our "%m" expansion.
+
+ tests/libntp/msyslog.cpp@1.3 +74 -22
+ More msnprintf() unit tests.
+
+ChangeSet@1.2479.1.57, 2011-04-13 04:57:19+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P150
+ TAG: NTP_4_2_7P150
+
+ ChangeLog@1.845 +1 -0
+ NTP_4_2_7P150
+
+ ntpd/ntpd-opts.c@1.155 +2 -2
+ NTP_4_2_7P150
+
+ ntpd/ntpd-opts.h@1.155 +3 -3
+ NTP_4_2_7P150
+
+ ntpd/ntpd-opts.texi@1.153 +2 -2
+ NTP_4_2_7P150
+
+ ntpd/ntpd.1@1.153 +2 -2
+ NTP_4_2_7P150
+
+ ntpdc/ntpdc-opts.c@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpdc/ntpdc-opts.h@1.152 +3 -3
+ NTP_4_2_7P150
+
+ ntpdc/ntpdc-opts.texi@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpdc/ntpdc.1@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpq/ntpq-opts.c@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpq/ntpq-opts.h@1.152 +3 -3
+ NTP_4_2_7P150
+
+ ntpq/ntpq-opts.texi@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpq/ntpq.1@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.152 +3 -3
+ NTP_4_2_7P150
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.152 +2 -2
+ NTP_4_2_7P150
+
+ ntpsnmpd/ntpsnmpd.1@1.152 +2 -2
+ NTP_4_2_7P150
+
+ packageinfo.sh@1.152 +1 -1
+ NTP_4_2_7P150
+
+ sntp/sntp-opts.c@1.146 +2 -2
+ NTP_4_2_7P150
+
+ sntp/sntp-opts.h@1.146 +3 -3
+ NTP_4_2_7P150
+
+ sntp/sntp-opts.texi@1.146 +2 -2
+ NTP_4_2_7P150
+
+ sntp/sntp.1@1.146 +2 -2
+ NTP_4_2_7P150
+
+ sntp/sntp.html@1.146 +1 -1
+ NTP_4_2_7P150
+
+ util/ntp-keygen-opts.c@1.150 +2 -2
+ NTP_4_2_7P150
+
+ util/ntp-keygen-opts.h@1.150 +3 -3
+ NTP_4_2_7P150
+
+ util/ntp-keygen-opts.texi@1.153 +2 -2
+ NTP_4_2_7P150
+
+ util/ntp-keygen.1@1.153 +2 -2
+ NTP_4_2_7P150
+
+ChangeSet@1.2479.1.56, 2011-04-13 02:22:24+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_proto.c sprintf() -> snprintf()
+
+ ChangeLog@1.844 +1 -1
+ ntp_proto.c sprintf() -> snprintf()
+
+ ntpd/ntp_proto.c@1.320 +3 -2
+ ntp_proto.c sprintf() -> snprintf()
+
+ChangeSet@1.2479.1.55, 2011-04-13 01:02:31+00:00, davehart@shiny.ad.hartbrothers.com
+ Move rpl_vsnprintf() declaration and #define vsnprintf to config.h
+
+ include/l_stdlib.h@1.20 +0 -10
+ Move rpl_vsnprintf() declaration and #define vsnprintf to config.h
+
+ lib/isc/inet_ntop.c@1.10 +2 -3
+ leftover SNPRINTF() -> snprintf() overlooked in prior cset.
+
+ libntp/msyslog.c@1.40 +19 -2
+ Work around strerror_r return type misdetection.
+
+ ports/winnt/include/config.h@1.97 +5 -0
+ Move rpl_vsnprintf() declaration and #define vsnprintf to config.h
+
+ ports/winnt/libntp/syslog.c@1.11 +2 -0
+ include ntp_stdlib.h for strlcpy() declaration
+
+ sntp/m4/ntp_libntp.m4@1.13 +45 -19
+ Move rpl_vsnprintf() declaration and #define vsnprintf to config.h
+
+ sntp/m4/snprintf.m4@1.2 +1 -6
+ Update comment.
+
+ tests/libntp/msyslog.cpp@1.2 +1 -0
+ strerror() prototyped by string.h
+
+ChangeSet@1.2479.1.54, 2011-04-12 06:01:57+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove remaining sprintf() calls except refclock_ripencc.c (which is
+ kept out of --enable-all-clocks as a result), upstream libs which use
+ sprintf() ony after careful buffer sizing, and ntp_proto.c.
+
+ BitKeeper/deleted/14/ntp_sprintf.h~a4bd6474a120d477@1.2 +0 -0
+ Delete: include/ntp_sprintf.h
+
+ BitKeeper/deleted/53/refclock_trimbledc.c~29080509@1.5 +0 -0
+ Delete: ports/winnt/ntpd/refclock_trimbledc.c
+
+ BitKeeper/deleted/ab/refclock_trimbledc.h~29080509@1.4 +0 -0
+ Delete: ports/winnt/ntpd/refclock_trimbledc.h
+
+ ChangeLog@1.843 +3 -0
+ Remove remaining sprintf() calls except refclock_ripencc.c (which is
+ kept out of --enable-all-clocks as a result), upstream libs which use
+ sprintf() ony after careful buffer sizing, and ntp_proto.c.
+
+ configure.ac@1.525 +0 -6
+ SPRINTF_CHAR check is not needed, ANSI C mandates int return type.
+
+ include/Makefile.am@1.49 +0 -1
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ lib/isc/inet_ntop.c@1.9 +1 -3
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ libntp/bsd_strerror.c@1.6 +4 -3
+ sprintf() -> snprintf().
+
+ libntp/snprintf.c@1.10 +4 -4
+ clarify HAVE_* macros in non-Autoconf use.
+
+ libparse/ieee754io.c@1.11 +19 -15
+ sprintf() -> snprintf().
+
+ ntpd/refclock_mx4200.c@1.30 +0 -2
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ ntpd/refclock_tpro.c@1.13 +1 -1
+ comment only.
+
+ ntpd/refclock_tt560.c@1.3 +6 -6
+ sprintf() -> snprintf().
+
+ ntpd/refclock_wwv.c@1.77 +2 -2
+ sprintf() -> snprintf().
+
+ ntpdate/ntptimeset.c@1.15 +4 -29
+ sprintf() -> msyslog().
+ Remove replacement vsprintf(), ANSI C mandates it.
+
+ ports/winnt/include/config.h@1.96 +4 -2
+ Comment out #define vsnprintf _vsnprintf as l_stdlib.h #defines them now.
+
+ ports/winnt/libntp/syslog.c@1.10 +1 -1
+ vsprintf() -> vsnprintf().
+
+ ports/winnt/ntpd/hopf_PCI_io.c@1.9 +2 -0
+ include ntp_stdlib.h for snprintf define.
+
+ ports/winnt/vs2003/libntp.vcproj@1.22 +0 -3
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ ports/winnt/vs2005/libntp.vcproj@1.20 +0 -4
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.43 +0 -4
+ Remove ntp_sprintf.h workaround for pre-ANSI C sprintf().
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.40 +4 -0
+ add refclock_tt560.c
+
+ util/audio-pcm.c@1.2 +2 -2
+ sprintf() -> snprintf().
+
+ util/sht.c@1.4 +1 -1
+ sprintf() -> snprintf().
+
+ util/tg.c@1.5 +8 -7
+ sprintf() -> snprintf().
+
+ util/tg2.c@1.5 +28 -19
+ sprintf() -> snprintf().
+
+ChangeSet@1.2479.9.1, 2011-04-11 21:24:15+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove never-used, incomplete ports/winnt/ntpd/refclock_trimbledc.[ch]
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ ChangeLog@1.839.1.1 +3 -0
+ Remove never-used, incomplete ports/winnt/ntpd/refclock_trimbledc.[ch]
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ configure.ac@1.521.1.1 +2 -2
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ include/l_stdlib.h@1.19 +6 -6
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ include/ntp_machine.h@1.35 +0 -1
+ Remove unused MAXHOSTNAMELEN.
+
+ libntp/ntp_intres.c@1.95 +1 -1
+ Remove unused MAXHOSTNAMELEN.
+
+ libntp/snprintf.c@1.9 +2115 -44
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ ntpd/ntp_io.c@1.352 +3 -1
+ Add #ifdef REFCLOCK to quiet input_handler() unused locals warning.
+
+ ntpdate/ntpdate.c@1.88 +0 -51
+ vsprintf() is required by ANSI C, remove fallback implementation.
+ Remove #if 0'd signal_no_reset() replacement.
+
+ ntpq/ntpq.c@1.137 +2 -2
+ Correct printf() format mismatch on 64-bit systems.
+
+ parseutil/Makefile.am@1.16 +1 -1
+ dcfd needs libntp.a when using rpl_snprintf().
+
+ ports/winnt/include/config.h@1.95 +23 -24
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+ Remove unused MAXHOSTNAMELEN.
+
+ ports/winnt/ntpd/hopf_PCI_io.c@1.8 +6 -0
+ #ifdef away unused code.
+
+ ports/winnt/vc6/libntp.dsp@1.63 +4 -0
+ add libntp/snprintf.c reference.
+
+ ports/winnt/vs2003/libntp.vcproj@1.21 +4 -344
+ add libntp/snprintf.c reference.
+
+ ports/winnt/vs2005/libntp.vcproj@1.19 +4 -0
+ add libntp/snprintf.c reference.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.42 +6 -2
+ add libntp/snprintf.c reference.
+
+ sntp/configure.ac@1.58.1.1 +1 -1
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ sntp/m4/ntp_libntp.m4@1.9.1.1 +27 -1
+ On systems without C99-compliant (v)snprintf(), use C99-snprintf
+ replacements. (http://www.jhweiss.de/software/snprintf.html)
+
+ sntp/m4/snprintf.m4@1.1 +293 -0
+ BitKeeper file C:/ntp/ntp-dev-C99-snprintf/sntp/m4/snprintf.m4
+ ---
+ Adapt snprintf.m4 for integration in NTP.
+
+ sntp/m4/snprintf.m4@1.0 +0 -0
+
+ChangeSet@1.2479.1.52, 2011-04-11 07:20:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P149
+ TAG: NTP_4_2_7P149
+
+ ChangeLog@1.841 +1 -0
+ NTP_4_2_7P149
+
+ ntpd/ntpd-opts.c@1.154 +2 -2
+ NTP_4_2_7P149
+
+ ntpd/ntpd-opts.h@1.154 +3 -3
+ NTP_4_2_7P149
+
+ ntpd/ntpd-opts.texi@1.152 +2 -2
+ NTP_4_2_7P149
+
+ ntpd/ntpd.1@1.152 +2 -2
+ NTP_4_2_7P149
+
+ ntpdc/ntpdc-opts.c@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpdc/ntpdc-opts.h@1.151 +3 -3
+ NTP_4_2_7P149
+
+ ntpdc/ntpdc-opts.texi@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpdc/ntpdc.1@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpq/ntpq-opts.c@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpq/ntpq-opts.h@1.151 +3 -3
+ NTP_4_2_7P149
+
+ ntpq/ntpq-opts.texi@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpq/ntpq.1@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.151 +3 -3
+ NTP_4_2_7P149
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.151 +2 -2
+ NTP_4_2_7P149
+
+ ntpsnmpd/ntpsnmpd.1@1.151 +2 -2
+ NTP_4_2_7P149
+
+ packageinfo.sh@1.151 +1 -1
+ NTP_4_2_7P149
+
+ sntp/sntp-opts.c@1.145 +2 -2
+ NTP_4_2_7P149
+
+ sntp/sntp-opts.h@1.145 +3 -3
+ NTP_4_2_7P149
+
+ sntp/sntp-opts.texi@1.145 +2 -2
+ NTP_4_2_7P149
+
+ sntp/sntp.1@1.145 +2 -2
+ NTP_4_2_7P149
+
+ sntp/sntp.html@1.145 +1 -1
+ NTP_4_2_7P149
+
+ util/ntp-keygen-opts.c@1.149 +2 -2
+ NTP_4_2_7P149
+
+ util/ntp-keygen-opts.h@1.149 +3 -3
+ NTP_4_2_7P149
+
+ util/ntp-keygen-opts.texi@1.152 +2 -2
+ NTP_4_2_7P149
+
+ util/ntp-keygen.1@1.152 +2 -2
+ NTP_4_2_7P149
+
+ChangeSet@1.2479.1.51, 2011-04-10 22:39:36-07:00, harlan@hms-mbp.local
+ Cleanup autoconf macro ordering/dependencies
+
+ configure.ac@1.523 +1 -0
+ Cleanup autoconf macro ordering/dependencies
+
+ sntp/configure.ac@1.59 +1 -0
+ Cleanup autoconf macro ordering/dependencies
+
+ sntp/m4/ntp_libntp.m4@1.11 +1 -12
+ Cleanup autoconf macro ordering/dependencies
+
+ sntp/m4/ntp_prog_cc.m4@1.1 +21 -0
+ BitKeeper file /Users/harlan/src/ntp-dev/sntp/m4/ntp_prog_cc.m4
+
+ sntp/m4/ntp_prog_cc.m4@1.0 +0 -0
+
+ChangeSet@1.2479.1.50, 2011-04-10 18:45:38-07:00, harlan@hms-mbp.local
+ [Bug 1881] describe the {+,-,s} characters in configure --help output
+
+ ChangeLog@1.840 +1 -0
+ [Bug 1881] describe the {+,-,s} characters in configure --help output
+
+ChangeSet@1.2479.8.1, 2011-04-10 18:39:40-07:00, harlan@hms-mbp.local
+ Bug 1881: describe the {+,-,s} characters in configure --help output
+
+ configure.ac@1.522 +5 -2
+ Bug 1881: describe the {+,-,s} characters in configure --help output
+
+ sntp/m4/ntp_googletest.m4@1.4 +1 -1
+ Bug 1881: describe the {+,-,s} characters in configure --help output
+
+ sntp/m4/ntp_libntp.m4@1.10 +10 -2
+ Bug 1881: describe the {+,-,s} characters in configure --help output
+
+ChangeSet@1.2479.1.48, 2011-04-09 07:09:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P148
+ TAG: NTP_4_2_7P148
+
+ ChangeLog@1.839 +1 -0
+ NTP_4_2_7P148
+
+ ntpd/ntpd-opts.c@1.153 +2 -2
+ NTP_4_2_7P148
+
+ ntpd/ntpd-opts.h@1.153 +3 -3
+ NTP_4_2_7P148
+
+ ntpd/ntpd-opts.texi@1.151 +2 -2
+ NTP_4_2_7P148
+
+ ntpd/ntpd.1@1.151 +2 -2
+ NTP_4_2_7P148
+
+ ntpdc/ntpdc-opts.c@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpdc/ntpdc-opts.h@1.150 +3 -3
+ NTP_4_2_7P148
+
+ ntpdc/ntpdc-opts.texi@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpdc/ntpdc.1@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpq/ntpq-opts.c@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpq/ntpq-opts.h@1.150 +3 -3
+ NTP_4_2_7P148
+
+ ntpq/ntpq-opts.texi@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpq/ntpq.1@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.150 +3 -3
+ NTP_4_2_7P148
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.150 +2 -2
+ NTP_4_2_7P148
+
+ ntpsnmpd/ntpsnmpd.1@1.150 +2 -2
+ NTP_4_2_7P148
+
+ packageinfo.sh@1.150 +1 -1
+ NTP_4_2_7P148
+
+ sntp/sntp-opts.c@1.144 +2 -2
+ NTP_4_2_7P148
+
+ sntp/sntp-opts.h@1.144 +3 -3
+ NTP_4_2_7P148
+
+ sntp/sntp-opts.texi@1.144 +2 -2
+ NTP_4_2_7P148
+
+ sntp/sntp.1@1.144 +2 -2
+ NTP_4_2_7P148
+
+ sntp/sntp.html@1.144 +1 -1
+ NTP_4_2_7P148
+
+ util/ntp-keygen-opts.c@1.148 +2 -2
+ NTP_4_2_7P148
+
+ util/ntp-keygen-opts.h@1.148 +3 -3
+ NTP_4_2_7P148
+
+ util/ntp-keygen-opts.texi@1.151 +2 -2
+ NTP_4_2_7P148
+
+ util/ntp-keygen.1@1.151 +2 -2
+ NTP_4_2_7P148
+
+ChangeSet@1.2479.1.47, 2011-04-09 06:20:32+00:00, davehart@shiny.ad.hartbrothers.com
+ Buffer safety and sign extension fixes (thanks Coverity Scan).
+
+ ChangeLog@1.838 +1 -0
+ Buffer safety and sign extension fixes (thanks Coverity Scan).
+
+ libntp/icom.c@1.15 +18 -3
+ Check for failure of tcgetattr() and tcsetattr() in icom_init().
+
+ libparse/binio.c@1.8 +2 -2
+ Avoid sign-extension on 64-bit platforms.
+
+ libparse/ieee754io.c@1.10 +5 -5
+ Avoid sign-extension on 64-bit platforms.
+
+ ntpd/refclock_fg.c@1.14 +86 -91
+ Whitespace cleanup of refclock_fg.c.
+ Replace literal ctrl-P with '\x10'.
+ sprintf() -> snprintf().
+
+ ntpd/refclock_ulink.c@1.17 +1 -1
+ sprintf() -> snprintf().
+
+ ntpd/refclock_wwv.c@1.76 +8 -6
+ sprintf() -> snprintf().
+
+ ntpd/refclock_zyfer.c@1.9 +1 -1
+ sprintf() -> snprintf().
+
+ ntpq/ntpq.c@1.136 +2 -2
+ printf signed/unsigned format mismatch.
+
+ parseutil/dcfd.c@1.23 +10 -5
+ printf signed/unsigned format mismatch.
+ sprintf() -> snprintf().
+
+ util/ntptime.c@1.23 +120 -93
+ sprintf() -> snprintf().
+ Protect against buffer overrun in sprintb().
+
+ChangeSet@1.2479.7.4, 2011-04-08 02:02:48+00:00, davehart@shiny.ad.hartbrothers.com
+ Use _mkgmtime() as timegm() in the Windows port, rather than
+ libntp/mktime.c's timegm(). Fixed [Bug 1875] on Windows using the old
+ asn2ntp() code from before 4.2.7p147.
+ ntp_crypto.c string buffer safety.
+ Remove use of MAXFILENAME in mode 7 (ntpdc) on-wire structs.
+ Change ntpd MAXFILENAME from 128 to 256 to match ntp-keygen.
+
+ ChangeLog@1.834.1.1 +6 -0
+ Use _mkgmtime() as timegm() in the Windows port, rather than
+ libntp/mktime.c's timegm(). Fixed [Bug 1875] on Windows using the old
+ asn2ntp() code from before 4.2.7p147.
+ ntp_crypto.c string buffer safety.
+ Remove use of MAXFILENAME in mode 7 (ntpdc) on-wire structs.
+ Change ntpd MAXFILENAME from 128 to 256 to match ntp-keygen.
+
+ include/ntp.h@1.193 +1 -1
+ Change ntpd's MAXFILENAME to 256 to match what ntp-keygen uses.
+
+ include/ntp_request.h@1.43 +6 -5
+ Remove use of MAXFILENAME in mode 7 (ntpdc) on-wire structs.
+
+ ntpd/ntp_control.c@1.167 +2 -2
+ use sizeof(buffer) rather than inside knowledge of buffer size.
+
+ ntpd/ntp_crypto.c@1.155.1.1 +46 -51
+ emalloc() + strcpy() -> estrdup().
+ fstostr() + strcpy() + fstostr() + strcpy() + snprintf() + report_event()
+ -> fstostr() + mprintf_event().
+ Use sizeof(buffer) rather than hardcoded knowledge of buffer size.
+
+ ntpd/ntp_util.c@1.94 +2 -5
+ fstostr() can now safely return strings longer than 19 characters.
+
+ ports/winnt/include/config.h@1.94 +2 -0
+ Use _mkgmtime() as timegm() in the Windows port, rather than
+ libntp/mktime.c's timegm(). Fixes [Bug 1875] on Windows, however that
+ bug is still present on systems without timegm().
+
+ sntp/tests/keyFile.cpp@1.4 +7 -6
+ strncpy() -> strlcpy()
+
+ util/ntp-keygen.c@1.81 +26 -21
+ Remove duplicate BN_CTX_new() call from gen_gqkey(), flagged by Coverity.
+
+ChangeSet@1.2479.1.45, 2011-04-07 11:30:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P147
+ TAG: NTP_4_2_7P147
+
+ ChangeLog@1.836 +1 -0
+ NTP_4_2_7P147
+
+ ntpd/ntpd-opts.c@1.152 +2 -2
+ NTP_4_2_7P147
+
+ ntpd/ntpd-opts.h@1.152 +3 -3
+ NTP_4_2_7P147
+
+ ntpd/ntpd-opts.texi@1.150 +2 -2
+ NTP_4_2_7P147
+
+ ntpd/ntpd.1@1.150 +2 -2
+ NTP_4_2_7P147
+
+ ntpdc/ntpdc-opts.c@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpdc/ntpdc-opts.h@1.149 +3 -3
+ NTP_4_2_7P147
+
+ ntpdc/ntpdc-opts.texi@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpdc/ntpdc.1@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpq/ntpq-opts.c@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpq/ntpq-opts.h@1.149 +3 -3
+ NTP_4_2_7P147
+
+ ntpq/ntpq-opts.texi@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpq/ntpq.1@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.149 +3 -3
+ NTP_4_2_7P147
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.149 +2 -2
+ NTP_4_2_7P147
+
+ ntpsnmpd/ntpsnmpd.1@1.149 +2 -2
+ NTP_4_2_7P147
+
+ packageinfo.sh@1.149 +1 -1
+ NTP_4_2_7P147
+
+ sntp/sntp-opts.c@1.143 +2 -2
+ NTP_4_2_7P147
+
+ sntp/sntp-opts.h@1.143 +3 -3
+ NTP_4_2_7P147
+
+ sntp/sntp-opts.texi@1.143 +2 -2
+ NTP_4_2_7P147
+
+ sntp/sntp.1@1.143 +2 -2
+ NTP_4_2_7P147
+
+ sntp/sntp.html@1.143 +1 -1
+ NTP_4_2_7P147
+
+ util/ntp-keygen-opts.c@1.147 +2 -2
+ NTP_4_2_7P147
+
+ util/ntp-keygen-opts.h@1.147 +3 -3
+ NTP_4_2_7P147
+
+ util/ntp-keygen-opts.texi@1.150 +2 -2
+ NTP_4_2_7P147
+
+ util/ntp-keygen.1@1.150 +2 -2
+ NTP_4_2_7P147
+
+ChangeSet@1.2479.1.43, 2011-04-05 19:23:34+02:00, jnperlin@hydra.localnet
+ [bug 1875] 'asn2ntp()' rewritten in terms of 'caltontp()' (ChangeLog update)
+
+ ChangeLog@1.832.1.1 +2 -0
+ [bug 1875] 'asn2ntp()' rewritten in terms of 'caltontp()'
+
+ChangeSet@1.2479.7.3, 2011-04-05 07:50:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P146
+ TAG: NTP_4_2_7P146
+
+ ChangeLog@1.834 +1 -0
+ NTP_4_2_7P146
+
+ ntpd/ntpd-opts.c@1.151 +2 -2
+ NTP_4_2_7P146
+
+ ntpd/ntpd-opts.h@1.151 +3 -3
+ NTP_4_2_7P146
+
+ ntpd/ntpd-opts.texi@1.149 +2 -2
+ NTP_4_2_7P146
+
+ ntpd/ntpd.1@1.149 +2 -2
+ NTP_4_2_7P146
+
+ ntpdc/ntpdc-opts.c@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpdc/ntpdc-opts.h@1.148 +3 -3
+ NTP_4_2_7P146
+
+ ntpdc/ntpdc-opts.texi@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpdc/ntpdc.1@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpq/ntpq-opts.c@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpq/ntpq-opts.h@1.148 +3 -3
+ NTP_4_2_7P146
+
+ ntpq/ntpq-opts.texi@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpq/ntpq.1@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.148 +3 -3
+ NTP_4_2_7P146
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.148 +2 -2
+ NTP_4_2_7P146
+
+ ntpsnmpd/ntpsnmpd.1@1.148 +2 -2
+ NTP_4_2_7P146
+
+ packageinfo.sh@1.148 +1 -1
+ NTP_4_2_7P146
+
+ sntp/sntp-opts.c@1.142 +2 -2
+ NTP_4_2_7P146
+
+ sntp/sntp-opts.h@1.142 +3 -3
+ NTP_4_2_7P146
+
+ sntp/sntp-opts.texi@1.142 +2 -2
+ NTP_4_2_7P146
+
+ sntp/sntp.1@1.142 +2 -2
+ NTP_4_2_7P146
+
+ sntp/sntp.html@1.142 +1 -1
+ NTP_4_2_7P146
+
+ util/ntp-keygen-opts.c@1.146 +2 -2
+ NTP_4_2_7P146
+
+ util/ntp-keygen-opts.h@1.146 +3 -3
+ NTP_4_2_7P146
+
+ util/ntp-keygen-opts.texi@1.149 +2 -2
+ NTP_4_2_7P146
+
+ util/ntp-keygen.1@1.149 +2 -2
+ NTP_4_2_7P146
+
+ChangeSet@1.2479.7.2, 2011-04-05 07:30:59+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog entry for prior cset.
+ String buffer safety cleanup, converting to strlcpy() and strlcat().
+ Use utmpname() before pututline() so repeated steps do not
+ accidentally record into wtmp where utmp was intended.
+ Use setutent() before each pututline() including first.
+
+ ChangeLog@1.833 +4 -0
+ ChangeLog entry for prior cset.
+ String buffer safety cleanup, converting to strlcpy() and strlcat().
+ Use utmpname() before pututline() so repeated steps do not
+ accidentally record into wtmp where utmp was intended.
+ Use setutent() before each pututline() including first.
+
+ChangeSet@1.2479.7.1, 2011-04-05 07:05:55+00:00, davehart@shiny.ad.hartbrothers.com
+ String buffer safety cleanup, converting to strlcpy() and strlcat().
+ Use utmpname() before pututline() so repeated steps do not accidentally
+ record into wtmp where utmp was intended.
+ Use setutent() before each pututline() including first.
+
+ BitKeeper/deleted/e7/ntp_resolver.c~47dd06e9@1.19 +0 -0
+ Rename: ntpd/ntp_resolver.c -> BitKeeper/deleted/e7/ntp_resolver.c~47dd06e9
+
+ include/ntp_stdlib.h@1.62 +21 -0
+ Conditional declarations for strlcpy(), strlcat() for systems which
+ do not provide them.
+
+ libntp/Makefile.am@1.62 +1 -0
+ add strl_obsd.c containing fallback strlcpy() and strlcat() picked up
+ from OpenBSD.
+
+ libntp/audio.c@1.30 +4 -4
+ strncpy() -> strlcpy()
+
+ libntp/authkeys.c@1.22 +2 -2
+ strncpy() -> strlcpy()
+
+ libntp/decodenetnum.c@1.14 +1 -1
+ strncpy() -> strlcpy()
+
+ libntp/findconfig.c@1.5 +2 -2
+ strncpy() -> strlcpy()
+
+ libntp/msyslog.c@1.39 +1 -1
+ strncpy() -> strlcpy()
+
+ libntp/ntp_rfc2553.c@1.46 +1 -10
+ strncpy() -> strlcpy()
+
+ libntp/numtoa.c@1.7 +1 -1
+ strncpy() -> memcpy()
+
+ libntp/numtohost.c@1.6 +2 -3
+ strncpy() -> strlcpy()
+
+ libntp/socktoa.c@1.16 +1 -1
+ strncpy() -> strlcpy()
+
+ libntp/ssl_init.c@1.15 +1 -1
+ strncpy() -> strlcpy()
+
+ libntp/strl_obsd.c@1.1 +123 -0
+ BitKeeper file C:/ntp/ntp-dev-strlcpy/libntp/strl_obsd.c
+
+ libntp/strl_obsd.c@1.0 +0 -0
+
+ libntp/systime.c@1.54 +22 -11
+ Use utmpname() before pututline() so repeated steps do not accidentally
+ record into wtmp where utmp was intended.
+ Use setutent() before each pututline() including first.
+ strncpy() -> strlcpy()
+
+ libparse/data_mbg.c@1.11 +3 -3
+ strncpy() -> strlcpy()
+
+ libparse/parsesolaris.c@1.11 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_config.c@1.288 +2 -4
+ strncpy() -> strlcpy()
+ Remove leftover redundant CHECK_FIFO_CONSISTENCY() calls added to
+ get correct line numbers from failures. CONCAT_FIFO() has same.
+
+ ntpd/ntp_control.c@1.166 +12 -10
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_filegen.c@1.23 +8 -9
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_io.c@1.351 +11 -11
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_request.c@1.104 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_scanner.c@1.42 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_signd.c@1.4 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/ntp_util.c@1.93 +7 -7
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_acts.c@1.49 +2 -2
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_arbiter.c@1.20 +11 -11
+ strcat() -> strlcat()
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_chu.c@1.52 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_hpgps.c@1.14 +1 -1
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_jjy.c@1.23 +8 -11
+ strncat() -> strlcat() (was nearly the only correct use of strncat() in NTP)
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_neoclock4x.c@1.21 +10 -10
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_oncore.c@1.94 +17 -18
+ strncat() -> strlcat()
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_parse.c@1.58 +110 -106
+ strncat() -> strlcat()
+ strncpy() -> strlcpy()
+
+ ntpd/refclock_true.c@1.19 +105 -97
+ strncpy() -> strlcpy()
+ indent cleanup
+
+ ntpd/refclock_wwv.c@1.75 +18 -13
+ sprintf() -> snprintf()
+ strcat() -> strlcat()
+
+ ntpdate/ntpdate.c@1.87 +2 -2
+ strncpy() -> strlcpy()
+
+ ntpdate/ntptime_config.c@1.6 +2 -4
+ emalloc() + strcpy() -> estrdup()
+
+ ntpdc/ntpdc.c@1.96 +5 -6
+ strncpy() -> strlcpy()
+
+ ntpdc/ntpdc_ops.c@1.77 +19 -15
+ strcat() -> strlcat()
+ strncpy() -> strlcpy()
+
+ ntpq/ntpq-subs.c@1.86 +7 -6
+ strncpy() -> strlcpy()
+ strncpy() -> memcpy()
+
+ ntpq/ntpq.c@1.135 +5 -6
+ strncat() -> strlcat()
+ strncpy() -> strlcpy()
+
+ ntpsnmpd/ntpSnmpSubagentObject.c@1.8 +1 -1
+ strncpy() -> strlcpy()
+
+ ports/winnt/libntp/syslog.c@1.9 +1 -2
+ strncpy() -> strlcpy()
+
+ ports/winnt/vc6/libntp.dsp@1.62 +4 -0
+ add strl_obsd.c containing fallback strlcpy() and strlcat() picked up
+ from OpenBSD.
+
+ ports/winnt/vs2003/libntp.vcproj@1.20 +3 -18
+ add strl_obsd.c containing fallback strlcpy() and strlcat() picked up
+ from OpenBSD.
+
+ ports/winnt/vs2005/libntp.vcproj@1.18 +4 -0
+ add strl_obsd.c containing fallback strlcpy() and strlcat() picked up
+ from OpenBSD.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.41 +6 -2
+ add strl_obsd.c containing fallback strlcpy() and strlcat() picked up
+ from OpenBSD.
+
+ sntp/kod_management.c@1.28 +1 -3
+ strncpy() -> strlcpy()
+
+ sntp/m4/ntp_libntp.m4@1.9 +1 -1
+ Check for strlcpy(), strlcat()
+
+ sntp/utilities.c@1.18 +2 -7
+ emalloc() + strncpy() -> estrdup()
+
+ util/ntp-keygen.c@1.80 +45 -19
+ Handle readlink() which doesn't NUL-terminate.
+ strdup() -> estrdup()
+ strcpy() -> strlcpy()
+ strcat() -> strlcat()
+ sprintf() -> snprintf()
+
+ util/tg.c@1.4 +2 -2
+ strcpy() -> strlcpy()
+
+ util/tg2.c@1.4 +15 -18
+ strcpy() -> strlcpy()
+ strncat() -> strlcat()
+
+ChangeSet@1.2479.1.42, 2011-04-04 18:39:05+02:00, jnperlin@hydra.localnet
+ bug1875 added missing header
+
+ ntpd/ntp_crypto.c@1.157 +1 -0
+ added missing header
+
+ChangeSet@1.2479.1.41, 2011-04-04 18:37:14+02:00, jnperlin@hydra.localnet
+ bug1875: timegm() from libntp blows up with 64bit time_t on Windows
+
+ ntpd/ntp_crypto.c@1.156 +14 -13
+ bug1875: timegm() from libntp blows up with 64bit time_t on Windows
+
+ChangeSet@1.2479.1.40, 2011-04-04 11:43:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P145
+ TAG: NTP_4_2_7P145
+
+ ChangeLog@1.832 +1 -0
+ NTP_4_2_7P145
+
+ ntpd/ntpd-opts.c@1.150 +2 -2
+ NTP_4_2_7P145
+
+ ntpd/ntpd-opts.h@1.150 +3 -3
+ NTP_4_2_7P145
+
+ ntpd/ntpd-opts.texi@1.148 +2 -2
+ NTP_4_2_7P145
+
+ ntpd/ntpd.1@1.148 +2 -2
+ NTP_4_2_7P145
+
+ ntpdc/ntpdc-opts.c@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpdc/ntpdc-opts.h@1.147 +3 -3
+ NTP_4_2_7P145
+
+ ntpdc/ntpdc-opts.texi@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpdc/ntpdc.1@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpq/ntpq-opts.c@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpq/ntpq-opts.h@1.147 +3 -3
+ NTP_4_2_7P145
+
+ ntpq/ntpq-opts.texi@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpq/ntpq.1@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.147 +3 -3
+ NTP_4_2_7P145
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.147 +2 -2
+ NTP_4_2_7P145
+
+ ntpsnmpd/ntpsnmpd.1@1.147 +2 -2
+ NTP_4_2_7P145
+
+ packageinfo.sh@1.147 +1 -1
+ NTP_4_2_7P145
+
+ sntp/sntp-opts.c@1.141 +2 -2
+ NTP_4_2_7P145
+
+ sntp/sntp-opts.h@1.141 +3 -3
+ NTP_4_2_7P145
+
+ sntp/sntp-opts.texi@1.141 +2 -2
+ NTP_4_2_7P145
+
+ sntp/sntp.1@1.141 +2 -2
+ NTP_4_2_7P145
+
+ sntp/sntp.html@1.141 +1 -1
+ NTP_4_2_7P145
+
+ util/ntp-keygen-opts.c@1.145 +2 -2
+ NTP_4_2_7P145
+
+ util/ntp-keygen-opts.h@1.145 +3 -3
+ NTP_4_2_7P145
+
+ util/ntp-keygen-opts.texi@1.148 +2 -2
+ NTP_4_2_7P145
+
+ util/ntp-keygen.1@1.148 +2 -2
+ NTP_4_2_7P145
+
+ChangeSet@1.2479.1.39, 2011-04-03 19:25:33+00:00, davehart@shiny.ad.hartbrothers.com
+ Cleanup a few Coverity static analysis warnings.
+
+ include/ntp_config.h@1.71 +3 -2
+ Add prototype for check_gen_fifo_consistency() overlooked in prior cet.
+
+ lib/isc/task.c@1.4 +1 -1
+ shuffle lock destruction until after protected field update to quiet
+ Coverity's lock analysis.
+
+ libntp/audio.c@1.29 +4 -4
+ Use width with sscanf(str, "%s", ...) to avoid overrun of destination.
+
+ libntp/work_thread.c@1.7 +3 -3
+ Change several DEBUG_REQUIRE to REQUIRE so needed safety checks are
+ included in -nodebug builds.
+
+ ntpd/ntp_config.c@1.287 +2 -2
+ match check_gen_fifo_consistency parameter naame with ntp_config.h
+
+ ntpd/refclock_nmea.c@1.60 +8 -6
+ leave room for terminating NUL by calling readlink with sizeof(...) - 1.
+
+ChangeSet@1.2479.1.38, 2011-04-03 17:35:33+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1840] ntp_lists.h FIFO macros buggy.
+
+ ChangeLog@1.831 +1 -0
+ [Bug 1840] ntp_lists.h FIFO macros buggy.
+
+ include/ntp_lists.h@1.11 +40 -28
+ Maintain pptail correctly in UNLINK_FIFO(), CONCAT_FIFO().
+ Add more checks to CHECK_FIFO_CONSISTENCY, use it more.
+ Re-enable NTP_DEBUG_LISTS_H on DEBUG builds.
+
+ libntp/mktime.c@1.10 +2 -2
+ whitespace only (leading blanks -> tab)
+
+ ntpd/ntp_config.c@1.286 +31 -0
+ Move CHECK_FIFO_CONSISTENCY guts from macro to function so debuggers
+ can highlight the failing check rather than entire macro invocation.
+
+ChangeSet@1.2479.1.37, 2011-04-03 06:35:28+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P144
+ TAG: NTP_4_2_7P144
+
+ ChangeLog@1.830 +1 -0
+ NTP_4_2_7P144
+
+ ntpd/ntpd-opts.c@1.149 +2 -2
+ NTP_4_2_7P144
+
+ ntpd/ntpd-opts.h@1.149 +3 -3
+ NTP_4_2_7P144
+
+ ntpd/ntpd-opts.texi@1.147 +2 -2
+ NTP_4_2_7P144
+
+ ntpd/ntpd.1@1.147 +2 -2
+ NTP_4_2_7P144
+
+ ntpdc/ntpdc-opts.c@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpdc/ntpdc-opts.h@1.146 +3 -3
+ NTP_4_2_7P144
+
+ ntpdc/ntpdc-opts.texi@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpdc/ntpdc.1@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpq/ntpq-opts.c@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpq/ntpq-opts.h@1.146 +3 -3
+ NTP_4_2_7P144
+
+ ntpq/ntpq-opts.texi@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpq/ntpq.1@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.146 +3 -3
+ NTP_4_2_7P144
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.146 +2 -2
+ NTP_4_2_7P144
+
+ ntpsnmpd/ntpsnmpd.1@1.146 +2 -2
+ NTP_4_2_7P144
+
+ packageinfo.sh@1.146 +1 -1
+ NTP_4_2_7P144
+
+ sntp/sntp-opts.c@1.140 +2 -2
+ NTP_4_2_7P144
+
+ sntp/sntp-opts.h@1.140 +3 -3
+ NTP_4_2_7P144
+
+ sntp/sntp-opts.texi@1.140 +2 -2
+ NTP_4_2_7P144
+
+ sntp/sntp.1@1.140 +2 -2
+ NTP_4_2_7P144
+
+ sntp/sntp.html@1.140 +1 -1
+ NTP_4_2_7P144
+
+ util/ntp-keygen-opts.c@1.144 +2 -2
+ NTP_4_2_7P144
+
+ util/ntp-keygen-opts.h@1.144 +3 -3
+ NTP_4_2_7P144
+
+ util/ntp-keygen-opts.texi@1.147 +2 -2
+ NTP_4_2_7P144
+
+ util/ntp-keygen.1@1.147 +2 -2
+ NTP_4_2_7P144
+
+ChangeSet@1.2479.1.36, 2011-04-02 06:32:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1874] ntpq -c "rv 0 sys_var_list" empty.
+
+ ChangeLog@1.829 +1 -0
+ [Bug 1874] ntpq -c "rv 0 sys_var_list" empty.
+
+ ntpd/ntp_control.c@1.165 +27 -44
+ [Bug 1874] ntpq -c "rv 0 sys_var_list" empty.
+
+ ntpq/ntpq.c@1.134 +10 -10
+ [Bug 1874] ntpq -c "rv 0 sys_var_list" empty.
+
+ChangeSet@1.2479.1.35, 2011-03-31 18:16:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P143
+ TAG: NTP_4_2_7P143
+
+ ChangeLog@1.828 +1 -0
+ NTP_4_2_7P143
+
+ ntpd/ntpd-opts.c@1.148 +2 -2
+ NTP_4_2_7P143
+
+ ntpd/ntpd-opts.h@1.148 +3 -3
+ NTP_4_2_7P143
+
+ ntpd/ntpd-opts.texi@1.146 +4 -4
+ NTP_4_2_7P143
+
+ ntpd/ntpd.1@1.146 +2 -2
+ NTP_4_2_7P143
+
+ ntpdc/ntpdc-opts.c@1.145 +2 -2
+ NTP_4_2_7P143
+
+ ntpdc/ntpdc-opts.h@1.145 +3 -3
+ NTP_4_2_7P143
+
+ ntpdc/ntpdc-opts.texi@1.145 +4 -4
+ NTP_4_2_7P143
+
+ ntpdc/ntpdc.1@1.145 +2 -2
+ NTP_4_2_7P143
+
+ ntpq/ntpq-opts.c@1.145 +2 -2
+ NTP_4_2_7P143
+
+ ntpq/ntpq-opts.h@1.145 +3 -3
+ NTP_4_2_7P143
+
+ ntpq/ntpq-opts.texi@1.145 +4 -4
+ NTP_4_2_7P143
+
+ ntpq/ntpq.1@1.145 +2 -2
+ NTP_4_2_7P143
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.145 +2 -2
+ NTP_4_2_7P143
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.145 +3 -3
+ NTP_4_2_7P143
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.145 +4 -4
+ NTP_4_2_7P143
+
+ ntpsnmpd/ntpsnmpd.1@1.145 +2 -2
+ NTP_4_2_7P143
+
+ packageinfo.sh@1.145 +1 -1
+ NTP_4_2_7P143
+
+ sntp/sntp-opts.c@1.139 +2 -2
+ NTP_4_2_7P143
+
+ sntp/sntp-opts.h@1.139 +3 -3
+ NTP_4_2_7P143
+
+ sntp/sntp-opts.texi@1.139 +4 -4
+ NTP_4_2_7P143
+
+ sntp/sntp.1@1.139 +2 -2
+ NTP_4_2_7P143
+
+ sntp/sntp.html@1.139 +3 -3
+ NTP_4_2_7P143
+
+ util/ntp-keygen-opts.c@1.143 +2 -2
+ NTP_4_2_7P143
+
+ util/ntp-keygen-opts.h@1.143 +3 -3
+ NTP_4_2_7P143
+
+ util/ntp-keygen-opts.texi@1.146 +4 -4
+ NTP_4_2_7P143
+
+ util/ntp-keygen.1@1.146 +2 -2
+ NTP_4_2_7P143
+
+ChangeSet@1.2479.1.34, 2011-03-31 13:11:38-04:00, stenn@deacon.udel.edu
+ Temporarily restore legacy ppsclock global fdpps for trak, zyfer refclocks
+
+ ntpd/ntp_refclock.c@1.106 +6 -1
+ Temporarily restore legacy ppsclock global fdpps for trak, zyfer refclocks
+
+ChangeSet@1.2479.1.33, 2011-03-30 04:53:34+00:00, davehart@shiny.ad.hartbrothers.com
+ Follow Ralf Wildenhues' advice for avoiding dead-code elimination
+ in configure test for in6addr_any.
+
+ sntp/m4/ntp_ipv6.m4@1.4 +23 -19
+ Follow Ralf Wildenhues' advice for avoiding dead-code elimination
+ in configure test for in6addr_any.
+
+ChangeSet@1.2479.1.32, 2011-03-29 13:35:13+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1862] in6addr_any test in configure fooled by arm gcc 4.1.3 -O2.
+
+ ChangeLog@1.827 +1 -0
+ [Bug 1862] in6addr_any test in configure fooled by arm gcc 4.1.3 -O2.
+
+ ntpd/ntp_crypto.c@1.155 +0 -1
+ Remove dead code (excess call to X509_get_ext()).
+
+ sntp/m4/ntp_ipv6.m4@1.3 +2 -2
+ [Bug 1862] in6addr_any test in configure fooled by arm gcc 4.1.3 -O2.
+
+ChangeSet@1.2479.6.1, 2011-03-28 02:29:10+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove "signal_no_reset: signal 17 had flags 4000000" logging, as it
+ indicates no problem and is interpreted as an error. Previously some
+ bits had been ignored one-by-one, but Linux SA_RESTORER definition is
+ unavailable to user headers.
+
+ ChangeLog@1.824.1.1 +4 -0
+ Remove "signal_no_reset: signal 17 had flags 4000000" logging, as it
+ indicates no problem and is interpreted as an error. Previously some
+ bits had been ignored one-by-one, but Linux SA_RESTORER definition is
+ unavailable to user headers.
+
+ libntp/syssignal.c@1.13 +1 -29
+ Remove "signal_no_reset: signal 17 had flags 4000000" logging, as it
+ indicates no problem and is interpreted as an error. Previously some
+ bits had been ignored one-by-one, but Linux SA_RESTORER definition is
+ unavailable to user headers.
+ Zero struct sigaction to silence warning about uninit vec.sa_restorer.
+
+ sntp/m4/ntp_libntp.m4@1.8 +0 -12
+ Remove unneeded dead code.
+
+ChangeSet@1.2479.1.30, 2011-03-26 02:03:35+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1861] tickadj build failure using uClibc.
+
+ ChangeLog@1.825 +1 -0
+ [Bug 1861] tickadj build failure using uClibc.
+
+ configure.ac@1.521 +62 -37
+ [Bug 1861] tickadj build failure using uClibc.
+
+ include/ntp_machine.h@1.34 +0 -11
+ moved to configure.ac
+
+ include/ntp_syscall.h@1.10 +24 -28
+ [Bug 1861] tickadj build failure using uClibc.
+
+ util/tickadj.c@1.12 +12 -9
+ [Bug 1861] tickadj build failure using uClibc.
+
+ChangeSet@1.2479.1.29, 2011-03-23 07:14:48+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1732] ntpd ties up CPU on disconnected USB refclock.
+
+ ChangeLog@1.824 +1 -0
+ [Bug 1732] ntpd ties up CPU on disconnected USB refclock.
+
+ ntpd/ntp_io.c@1.350 +39 -12
+ [Bug 1732] ntpd ties up CPU on disconnected USB refclock.
+
+ChangeSet@1.2479.5.2, 2011-03-21 07:57:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P142
+ TAG: NTP_4_2_7P142
+
+ ChangeLog@1.821.1.2 +1 -0
+ NTP_4_2_7P142
+
+ clockstuff/clktest-opts.c@1.67.1.1 +2 -2
+ NTP_4_2_7P142
+
+ clockstuff/clktest-opts.h@1.67.1.1 +3 -3
+ NTP_4_2_7P142
+
+ ntpd/ntpd-opts.c@1.147 +2 -2
+ NTP_4_2_7P142
+
+ ntpd/ntpd-opts.h@1.147 +3 -3
+ NTP_4_2_7P142
+
+ ntpd/ntpd-opts.texi@1.145 +2 -2
+ NTP_4_2_7P142
+
+ ntpd/ntpd.1@1.145 +2 -2
+ NTP_4_2_7P142
+
+ ntpdc/ntpdc-opts.c@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpdc/ntpdc-opts.h@1.144 +3 -3
+ NTP_4_2_7P142
+
+ ntpdc/ntpdc-opts.texi@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpdc/ntpdc.1@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpq/ntpq-opts.c@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpq/ntpq-opts.h@1.144 +3 -3
+ NTP_4_2_7P142
+
+ ntpq/ntpq-opts.texi@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpq/ntpq.1@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.144 +3 -3
+ NTP_4_2_7P142
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.144 +2 -2
+ NTP_4_2_7P142
+
+ ntpsnmpd/ntpsnmpd.1@1.144 +2 -2
+ NTP_4_2_7P142
+
+ packageinfo.sh@1.144 +1 -1
+ NTP_4_2_7P142
+
+ sntp/sntp-opts.c@1.138 +2 -2
+ NTP_4_2_7P142
+
+ sntp/sntp-opts.h@1.138 +3 -3
+ NTP_4_2_7P142
+
+ sntp/sntp-opts.texi@1.138 +2 -2
+ NTP_4_2_7P142
+
+ sntp/sntp.1@1.138 +2 -2
+ NTP_4_2_7P142
+
+ sntp/sntp.html@1.138 +1 -1
+ NTP_4_2_7P142
+
+ util/ntp-keygen-opts.c@1.142 +2 -2
+ NTP_4_2_7P142
+
+ util/ntp-keygen-opts.h@1.142 +3 -3
+ NTP_4_2_7P142
+
+ util/ntp-keygen-opts.texi@1.145 +2 -2
+ NTP_4_2_7P142
+
+ util/ntp-keygen.1@1.145 +2 -2
+ NTP_4_2_7P142
+
+ChangeSet@1.2479.5.1, 2011-03-21 06:28:29+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1844] ntpd 4.2.7p131 NetBSD, ld --gc-sections links bad executable.
+
+ ChangeLog@1.821.1.1 +2 -0
+ [Bug 1844] ntpd 4.2.7p131 NetBSD, ld --gc-sections links bad executable.
+ Fix "make distcheck" break in libevent/sample caused by typo.
+
+ sntp/libevent/Makefile.am@1.4 +1 -1
+ Fix "make distcheck" break in libevent/sample caused by typo.
+
+ sntp/libevent/configure.in@1.4 +45 -7
+ [Bug 1844] ntpd 4.2.7p131 NetBSD, ld --gc-sections links bad executable.
+
+ sntp/m4/ntp_compiler.m4@1.2 +45 -7
+ [Bug 1844] ntpd 4.2.7p131 NetBSD, ld --gc-sections links bad executable.
+
+ChangeSet@1.2479.4.1, 2011-03-20 20:39:43+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ .point-changed-filelist@1.9 +0 -2
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ BitKeeper/deleted/42/clktest-opts.c~28d4c334dbca58a1@1.66.1.1 +0 -0
+ Rename: clockstuff/clktest-opts.c -> BitKeeper/deleted/42/clktest-opts.c~28d4c334dbca58a1
+
+ BitKeeper/deleted/46/tty_chu.c~3e480692@1.3 +0 -0
+ Rename: kernel/tty_chu.c -> BitKeeper/deleted/46/tty_chu.c~3e480692
+
+ BitKeeper/deleted/69/clkinit.c~3e480692@1.4 +0 -0
+ Rename: kernel/clkinit.c -> BitKeeper/deleted/69/clkinit.c~3e480692
+
+ BitKeeper/deleted/7d/clktest.c~3e480692@1.7 +0 -0
+ Rename: clockstuff/clktest.c -> BitKeeper/deleted/7d/clktest.c~3e480692
+
+ BitKeeper/deleted/96/tty_clk_STREAMS.c~3e480692@1.3 +0 -0
+ Rename: kernel/tty_clk_STREAMS.c -> BitKeeper/deleted/96/tty_clk_STREAMS.c~3e480692
+
+ BitKeeper/deleted/99/tty_clk.c~3e480692@1.3 +0 -0
+ Rename: kernel/tty_clk.c -> BitKeeper/deleted/99/tty_clk.c~3e480692
+
+ BitKeeper/deleted/ab/chuinit.c~3e480692@1.4 +0 -0
+ Rename: kernel/chuinit.c -> BitKeeper/deleted/ab/chuinit.c~3e480692
+
+ BitKeeper/deleted/bf/chudefs.h~3e480692@1.3 +0 -0
+ Rename: kernel/sys/chudefs.h -> BitKeeper/deleted/bf/chudefs.h~3e480692
+
+ BitKeeper/deleted/d6/clkdefs.h~3e480692@1.3 +0 -0
+ Rename: kernel/sys/clkdefs.h -> BitKeeper/deleted/d6/clkdefs.h~3e480692
+
+ BitKeeper/deleted/d7/README~3e480692@1.3 +0 -0
+ Rename: kernel/README -> BitKeeper/deleted/d7/README~3e480692
+
+ BitKeeper/deleted/e1/clktest-opts.def~10c559de4ec2c50e@1.9 +0 -0
+ Rename: clockstuff/clktest-opts.def -> BitKeeper/deleted/e1/clktest-opts.def~10c559de4ec2c50e
+
+ BitKeeper/deleted/e5/clktest-opts.h~d3cf51ce6544d610@1.66.1.1 +0 -0
+ Rename: clockstuff/clktest-opts.h -> BitKeeper/deleted/e5/clktest-opts.h~d3cf51ce6544d610
+
+ BitKeeper/deleted/ed/tty_chu_STREAMS.c~3e480692@1.3 +0 -0
+ Rename: kernel/tty_chu_STREAMS.c -> BitKeeper/deleted/ed/tty_chu_STREAMS.c~3e480692
+
+ ChangeLog@1.820.1.1 +3 -0
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ clockstuff/Makefile.am@1.20 +3 -25
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ clockstuff/README@1.4 +4 -14
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ configure.ac@1.520 +1 -61
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ include/ntp_tty.h@1.6 +9 -7
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ include/ntpd.h@1.161 +0 -7
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ kernel/Makefile.am@1.6 +0 -1
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ kernel/sys/Makefile.am@1.7 +1 -1
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ ntpd/ntp_refclock.c@1.105 +9 -106
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ ntpd/refclock_datum.c@1.17 +0 -3
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ ntpd/refclock_leitch.c@1.14 +5 -43
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ ntpd/refclock_oncore.c@1.93 +0 -4
+ Remove kernel line discipline driver code for clk and chu, deprecate
+ related LDISC_ flags, and remove associated ntpd code to decode the
+ timestamps, remove clktest line discipline test program.
+
+ChangeSet@1.2479.1.26, 2011-03-20 11:16:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P141
+ TAG: NTP_4_2_7P141
+
+ ChangeLog@1.821 +1 -0
+ NTP_4_2_7P141
+
+ clockstuff/clktest-opts.c@1.67 +2 -2
+ NTP_4_2_7P141
+
+ clockstuff/clktest-opts.h@1.67 +3 -3
+ NTP_4_2_7P141
+
+ ntpd/ntpd-opts.c@1.146 +2 -2
+ NTP_4_2_7P141
+
+ ntpd/ntpd-opts.h@1.146 +3 -3
+ NTP_4_2_7P141
+
+ ntpd/ntpd-opts.texi@1.144 +2 -2
+ NTP_4_2_7P141
+
+ ntpd/ntpd.1@1.144 +2 -2
+ NTP_4_2_7P141
+
+ ntpdc/ntpdc-opts.c@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpdc/ntpdc-opts.h@1.143 +3 -3
+ NTP_4_2_7P141
+
+ ntpdc/ntpdc-opts.texi@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpdc/ntpdc.1@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpq/ntpq-opts.c@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpq/ntpq-opts.h@1.143 +3 -3
+ NTP_4_2_7P141
+
+ ntpq/ntpq-opts.texi@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpq/ntpq.1@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.143 +3 -3
+ NTP_4_2_7P141
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.143 +2 -2
+ NTP_4_2_7P141
+
+ ntpsnmpd/ntpsnmpd.1@1.143 +2 -2
+ NTP_4_2_7P141
+
+ packageinfo.sh@1.143 +1 -1
+ NTP_4_2_7P141
+
+ sntp/sntp-opts.c@1.137 +2 -2
+ NTP_4_2_7P141
+
+ sntp/sntp-opts.h@1.137 +3 -3
+ NTP_4_2_7P141
+
+ sntp/sntp-opts.texi@1.137 +2 -2
+ NTP_4_2_7P141
+
+ sntp/sntp.1@1.137 +2 -2
+ NTP_4_2_7P141
+
+ sntp/sntp.html@1.137 +1 -1
+ NTP_4_2_7P141
+
+ util/ntp-keygen-opts.c@1.141 +2 -2
+ NTP_4_2_7P141
+
+ util/ntp-keygen-opts.h@1.141 +3 -3
+ NTP_4_2_7P141
+
+ util/ntp-keygen-opts.texi@1.144 +2 -2
+ NTP_4_2_7P141
+
+ util/ntp-keygen.1@1.144 +2 -2
+ NTP_4_2_7P141
+
+ChangeSet@1.2479.1.25, 2011-03-19 20:14:05+00:00, davehart@shiny.ad.hartbrothers.com
+ Add overlooked ChangeLog entry for refclock_pps() (was in commit comment
+ but not ChangeLog text).
+
+ ChangeLog@1.820 +1 -0
+ Add overlooked ChangeLog entry for refclock_pps() (was in commit comment
+ but not ChangeLog text).
+
+ChangeSet@1.2479.1.24, 2011-03-19 16:38:10+00:00, davehart@shiny.ad.hartbrothers.com
+ Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+ Compare entire timestamp to reject duplicates in refclock_pps().
+
+ ChangeLog@1.819 +1 -0
+ Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+ Compare entire timestamp to reject duplicates in refclock_pps().
+
+ ntpd/ntp_control.c@1.164 +74 -1
+ Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+
+ ntpd/ntp_refclock.c@1.104 +1 -1
+ Compare entire timestamp to reject duplicates in refclock_pps().
+
+ ntpq/ntpq-subs.c@1.85 +34 -1
+ Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.58 +7 -3
+ Add "ntpq -c iostats" similar to "ntpdc -c iostats".
+
+ChangeSet@1.2479.1.23, 2011-03-17 11:20:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P140
+ TAG: NTP_4_2_7P140
+
+ ChangeLog@1.818 +1 -0
+ NTP_4_2_7P140
+
+ clockstuff/clktest-opts.c@1.66 +2 -2
+ NTP_4_2_7P140
+
+ clockstuff/clktest-opts.h@1.66 +3 -3
+ NTP_4_2_7P140
+
+ ntpd/ntpd-opts.c@1.145 +2 -2
+ NTP_4_2_7P140
+
+ ntpd/ntpd-opts.h@1.145 +3 -3
+ NTP_4_2_7P140
+
+ ntpd/ntpd-opts.texi@1.143 +2 -2
+ NTP_4_2_7P140
+
+ ntpd/ntpd.1@1.143 +2 -2
+ NTP_4_2_7P140
+
+ ntpdc/ntpdc-opts.c@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpdc/ntpdc-opts.h@1.142 +3 -3
+ NTP_4_2_7P140
+
+ ntpdc/ntpdc-opts.texi@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpdc/ntpdc.1@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpq/ntpq-opts.c@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpq/ntpq-opts.h@1.142 +3 -3
+ NTP_4_2_7P140
+
+ ntpq/ntpq-opts.texi@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpq/ntpq.1@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.142 +3 -3
+ NTP_4_2_7P140
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.142 +2 -2
+ NTP_4_2_7P140
+
+ ntpsnmpd/ntpsnmpd.1@1.142 +2 -2
+ NTP_4_2_7P140
+
+ packageinfo.sh@1.142 +1 -1
+ NTP_4_2_7P140
+
+ sntp/sntp-opts.c@1.136 +2 -2
+ NTP_4_2_7P140
+
+ sntp/sntp-opts.h@1.136 +3 -3
+ NTP_4_2_7P140
+
+ sntp/sntp-opts.texi@1.136 +2 -2
+ NTP_4_2_7P140
+
+ sntp/sntp.1@1.136 +2 -2
+ NTP_4_2_7P140
+
+ sntp/sntp.html@1.136 +1 -1
+ NTP_4_2_7P140
+
+ util/ntp-keygen-opts.c@1.140 +2 -2
+ NTP_4_2_7P140
+
+ util/ntp-keygen-opts.h@1.140 +3 -3
+ NTP_4_2_7P140
+
+ util/ntp-keygen-opts.texi@1.143 +2 -2
+ NTP_4_2_7P140
+
+ util/ntp-keygen.1@1.143 +2 -2
+ NTP_4_2_7P140
+
+ChangeSet@1.2479.1.22, 2011-03-17 01:25:14+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
+ Add --disable-thread-support to one flock-build variation.
+ One more lock-while-init in lib/isc/task.c to quiet lock analysis.
+
+ ChangeLog@1.817 +3 -0
+ [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
+ Add --disable-thread-support to one flock-build variation.
+ One more lock-while-init in lib/isc/task.c to quiet lock analysis.
+
+ flock-build@1.50 +2 -2
+ Add --disable-thread-support to one flock-build variation.
+
+ lib/isc/task.c@1.3 +2 -0
+ One more lock-while-init in lib/isc/task.c to quiet lock analysis.
+
+ libntp/msyslog.c@1.38 +4 -3
+ corner case leak fix with change_logfile("stderr")
+
+ libntp/work_fork.c@1.10 +2 -2
+ [Bug 1848] ntpd 4.2.7p139 --disable-thread-support does not compile.
+
+ChangeSet@1.2479.1.21, 2011-03-16 11:35:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P139
+ TAG: NTP_4_2_7P139
+
+ ChangeLog@1.816 +1 -0
+ NTP_4_2_7P139
+
+ clockstuff/clktest-opts.c@1.65 +2 -2
+ NTP_4_2_7P139
+
+ clockstuff/clktest-opts.h@1.65 +3 -3
+ NTP_4_2_7P139
+
+ ntpd/ntpd-opts.c@1.144 +2 -2
+ NTP_4_2_7P139
+
+ ntpd/ntpd-opts.h@1.144 +3 -3
+ NTP_4_2_7P139
+
+ ntpd/ntpd-opts.texi@1.142 +2 -2
+ NTP_4_2_7P139
+
+ ntpd/ntpd.1@1.142 +2 -2
+ NTP_4_2_7P139
+
+ ntpdc/ntpdc-opts.c@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpdc/ntpdc-opts.h@1.141 +3 -3
+ NTP_4_2_7P139
+
+ ntpdc/ntpdc-opts.texi@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpdc/ntpdc.1@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpq/ntpq-opts.c@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpq/ntpq-opts.h@1.141 +3 -3
+ NTP_4_2_7P139
+
+ ntpq/ntpq-opts.texi@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpq/ntpq.1@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.141 +3 -3
+ NTP_4_2_7P139
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.141 +2 -2
+ NTP_4_2_7P139
+
+ ntpsnmpd/ntpsnmpd.1@1.141 +2 -2
+ NTP_4_2_7P139
+
+ packageinfo.sh@1.141 +1 -1
+ NTP_4_2_7P139
+
+ sntp/sntp-opts.c@1.135 +2 -2
+ NTP_4_2_7P139
+
+ sntp/sntp-opts.h@1.135 +3 -3
+ NTP_4_2_7P139
+
+ sntp/sntp-opts.texi@1.135 +2 -2
+ NTP_4_2_7P139
+
+ sntp/sntp.1@1.135 +2 -2
+ NTP_4_2_7P139
+
+ sntp/sntp.html@1.135 +1 -1
+ NTP_4_2_7P139
+
+ util/ntp-keygen-opts.c@1.139 +2 -2
+ NTP_4_2_7P139
+
+ util/ntp-keygen-opts.h@1.139 +3 -3
+ NTP_4_2_7P139
+
+ util/ntp-keygen-opts.texi@1.142 +2 -2
+ NTP_4_2_7P139
+
+ util/ntp-keygen.1@1.142 +2 -2
+ NTP_4_2_7P139
+
+ChangeSet@1.2479.1.20, 2011-03-16 04:58:25-04:00, stenn@deacon.udel.edu
+ typo
+
+ ChangeLog@1.815 +1 -1
+ typo
+
+ChangeSet@1.2479.1.19, 2011-03-16 02:09:56+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
+
+ ChangeLog@1.814 +2 -1
+ [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
+
+ include/ntp_stdlib.h@1.61 +3 -4
+ Move version string logging out of common logging routines where
+ it was increasingly unwieldy.
+
+ libntp/msyslog.c@1.37 +5 -12
+ Move version string logging out of common logging routines where
+ it was increasingly unwieldy.
+
+ ntpd/ntp_config.c@1.285 +1 -1
+ Move version string logging out of common logging routines where
+ it was increasingly unwieldy.
+
+ ntpd/ntpd.c@1.125 +41 -40
+ [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
+
+ sntp/log.c@1.21 +3 -2
+ [Bug 1848] make check ntpd --saveconfigquit clutters syslog.
+
+ChangeSet@1.2479.1.18, 2011-03-08 11:17:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P138
+ TAG: NTP_4_2_7P138
+
+ ChangeLog@1.813 +1 -0
+ NTP_4_2_7P138
+
+ clockstuff/clktest-opts.c@1.64 +2 -2
+ NTP_4_2_7P138
+
+ clockstuff/clktest-opts.h@1.64 +3 -3
+ NTP_4_2_7P138
+
+ ntpd/ntpd-opts.c@1.143 +2 -2
+ NTP_4_2_7P138
+
+ ntpd/ntpd-opts.h@1.143 +3 -3
+ NTP_4_2_7P138
+
+ ntpd/ntpd-opts.texi@1.141 +2 -2
+ NTP_4_2_7P138
+
+ ntpd/ntpd.1@1.141 +2 -2
+ NTP_4_2_7P138
+
+ ntpdc/ntpdc-opts.c@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpdc/ntpdc-opts.h@1.140 +3 -3
+ NTP_4_2_7P138
+
+ ntpdc/ntpdc-opts.texi@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpdc/ntpdc.1@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpq/ntpq-opts.c@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpq/ntpq-opts.h@1.140 +3 -3
+ NTP_4_2_7P138
+
+ ntpq/ntpq-opts.texi@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpq/ntpq.1@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.140 +3 -3
+ NTP_4_2_7P138
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.140 +2 -2
+ NTP_4_2_7P138
+
+ ntpsnmpd/ntpsnmpd.1@1.140 +2 -2
+ NTP_4_2_7P138
+
+ packageinfo.sh@1.140 +1 -1
+ NTP_4_2_7P138
+
+ sntp/sntp-opts.c@1.134 +2 -2
+ NTP_4_2_7P138
+
+ sntp/sntp-opts.h@1.134 +3 -3
+ NTP_4_2_7P138
+
+ sntp/sntp-opts.texi@1.134 +2 -2
+ NTP_4_2_7P138
+
+ sntp/sntp.1@1.134 +2 -2
+ NTP_4_2_7P138
+
+ sntp/sntp.html@1.134 +1 -1
+ NTP_4_2_7P138
+
+ util/ntp-keygen-opts.c@1.138 +2 -2
+ NTP_4_2_7P138
+
+ util/ntp-keygen-opts.h@1.138 +3 -3
+ NTP_4_2_7P138
+
+ util/ntp-keygen-opts.texi@1.141 +2 -2
+ NTP_4_2_7P138
+
+ util/ntp-keygen.1@1.141 +2 -2
+ NTP_4_2_7P138
+
+ChangeSet@1.2479.1.17, 2011-03-08 01:10:53-05:00, stenn@deacon.udel.edu
+ [Bug 1846] MacOSX: debug symbol not found by propdelay or tickadj
+
+ ChangeLog@1.812 +1 -0
+ [Bug 1846] MacOSX: debug symbol not found by propdelay or tickadj
+
+ChangeSet@1.2479.1.16, 2011-03-07 12:12:49-08:00, harlan@hms-mbp.local
+ Call init_lib() in propdelay and tickadj just to get the debug symbol from libntp
+
+ clockstuff/propdelay.c@1.7 +2 -0
+ Call init_lib() just to get the debug symbol from libntp
+
+ util/tickadj.c@1.11 +2 -0
+ Call init_lib() just to get the debug symbol from libntp
+
+ChangeSet@1.2479.3.1, 2011-03-07 10:19:45+00:00, davehart@shiny.ad.hartbrothers.com
+ Lock under-construction task, taskmgr objects to satisfy Coverity's
+ mostly-correct assumptions about which variables are protected by
+ which locks.
+
+ ChangeLog@1.809.1.1 +3 -0
+ Lock under-construction task, taskmgr objects to satisfy Coverity's
+ mostly-correct assumptions about which variables are protected by
+ which locks.
+
+ lib/isc/task.c@1.2 +8 -4
+ Lock under-construction task, taskmgr objects to satisfy Coverity's
+ mostly-correct assumptions about which variables are protected by
+ which locks.
+
+ChangeSet@1.2479.1.14, 2011-03-07 10:06:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P137
+ TAG: NTP_4_2_7P137
+
+ ChangeLog@1.810 +1 -0
+ NTP_4_2_7P137
+
+ clockstuff/clktest-opts.c@1.63 +2 -2
+ NTP_4_2_7P137
+
+ clockstuff/clktest-opts.h@1.63 +3 -3
+ NTP_4_2_7P137
+
+ ntpd/ntpd-opts.c@1.142 +2 -2
+ NTP_4_2_7P137
+
+ ntpd/ntpd-opts.h@1.142 +3 -3
+ NTP_4_2_7P137
+
+ ntpd/ntpd-opts.texi@1.140 +2 -2
+ NTP_4_2_7P137
+
+ ntpd/ntpd.1@1.140 +2 -2
+ NTP_4_2_7P137
+
+ ntpdc/ntpdc-opts.c@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpdc/ntpdc-opts.h@1.139 +3 -3
+ NTP_4_2_7P137
+
+ ntpdc/ntpdc-opts.texi@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpdc/ntpdc.1@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpq/ntpq-opts.c@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpq/ntpq-opts.h@1.139 +3 -3
+ NTP_4_2_7P137
+
+ ntpq/ntpq-opts.texi@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpq/ntpq.1@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.139 +3 -3
+ NTP_4_2_7P137
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.139 +2 -2
+ NTP_4_2_7P137
+
+ ntpsnmpd/ntpsnmpd.1@1.139 +2 -2
+ NTP_4_2_7P137
+
+ packageinfo.sh@1.139 +1 -1
+ NTP_4_2_7P137
+
+ sntp/sntp-opts.c@1.133 +2 -2
+ NTP_4_2_7P137
+
+ sntp/sntp-opts.h@1.133 +3 -3
+ NTP_4_2_7P137
+
+ sntp/sntp-opts.texi@1.133 +2 -2
+ NTP_4_2_7P137
+
+ sntp/sntp.1@1.133 +2 -2
+ NTP_4_2_7P137
+
+ sntp/sntp.html@1.133 +1 -1
+ NTP_4_2_7P137
+
+ util/ntp-keygen-opts.c@1.137 +2 -2
+ NTP_4_2_7P137
+
+ util/ntp-keygen-opts.h@1.137 +3 -3
+ NTP_4_2_7P137
+
+ util/ntp-keygen-opts.texi@1.140 +2 -2
+ NTP_4_2_7P137
+
+ util/ntp-keygen.1@1.140 +2 -2
+ NTP_4_2_7P137
+
+ChangeSet@1.2479.1.13, 2011-03-06 01:24:22+00:00, davehart@shiny.ad.hartbrothers.com
+ Add overlooked ChangeLog entry for last cset.
+
+ ChangeLog@1.809 +2 -0
+ Add overlooked ChangeLog entry for last cset.
+
+ include/declcond.h@1.2 +4 -0
+ Use multiple-inclusion guard.
+
+ ntpd/declcond.h@1.2 +4 -0
+ Use multiple-inclusion guard.
+
+ChangeSet@1.2479.1.12, 2011-03-05 22:35:37+00:00, davehart@shiny.ad.hartbrothers.com
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ BitKeeper/deleted/16/sntptest.cpp~b166a62f6f744adb@1.4 +0 -0
+ Rename: sntp/tests/sntptest.cpp -> BitKeeper/deleted/16/sntptest.cpp~b166a62f6f744adb
+
+ BitKeeper/deleted/a3/dnslookup.c~96398d4d3428670@1.10 +0 -0
+ Rename: ports/winnt/libntp/dnslookup.c -> BitKeeper/deleted/a3/dnslookup.c~96398d4d3428670
+
+ BitKeeper/deleted/c4/mexit.c~13b0216e@1.5 +0 -0
+ Rename: ports/winnt/libntp/mexit.c -> BitKeeper/deleted/c4/mexit.c~13b0216e
+
+ ChangeLog@1.808 +2 -0
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ clockstuff/chutest.c@1.6 +0 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ clockstuff/propdelay.c@1.6 +0 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ include/Makefile.am@1.48 +1 -0
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ include/declcond.h@1.1 +17 -0
+ BitKeeper file C:/ntp/ntp-dev-trace/include/declcond.h
+
+ include/declcond.h@1.0 +0 -0
+
+ include/ntp_debug.h@1.5 +12 -16
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ include/ntp_stdlib.h@1.60 +3 -6
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ include/ntpd.h@1.160 +23 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/lib_strbuf.c@1.9 +6 -5
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ libntp/machines.c@1.24 +6 -6
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/msyslog.c@1.36 +1 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/ntp_intres.c@1.94 +46 -50
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/socket.c@1.7 +26 -26
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/socktohost.c@1.14 +3 -2
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/work_fork.c@1.9 +16 -16
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ libntp/work_thread.c@1.6 +2 -2
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ntpd/Makefile.am@1.103 +1 -0
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ntpd/check_y2k.c@1.8 +0 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ntpd/declcond.h@1.1 +17 -0
+ BitKeeper file C:/ntp/ntp-dev-trace/ntpd/declcond.h
+
+ ntpd/declcond.h@1.0 +0 -0
+
+ ntpd/keyword-gen.c@1.18 +2 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ntpd/ntp_scanner.c@1.41 +1 -1
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ntpd/ntpd.c@1.124 +0 -7
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ntpd/refclock_bancomm.c@1.15 +0 -5
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ntpdate/ntpdate.c@1.86 +2 -7
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ntpdate/ntptimeset.c@1.14 +0 -5
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ntpdc/ntpdc.c@1.95 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ntpq/ntpq.c@1.133 +29 -48
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ports/winnt/include/gaa_compat.h@1.2 +1 -1
+ mismatched #pragma warning(pop) #ifdef _W64
+
+ ports/winnt/libntp/setpriority.c@1.5 +2 -3
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ports/winnt/libntp/termios.c@1.27 +9 -13
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ ports/winnt/ntpd/ntservice.c@1.28 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.40 +6 -2
+ add include/declcond.h reference
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.39 +4 -0
+ add ntpd/declcond.h reference
+
+ sntp/kod_management.c@1.27 +7 -7
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ sntp/main.c@1.70 +51 -51
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ sntp/networking.c@1.59 +7 -7
+ Use TRACE() instead of DPRINTF() for libntp and utilities, which
+ use the "debug" variable regardless of #ifdef DEBUG.
+
+ sntp/sntp.c@1.3 +2 -4
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ sntp/tests/Makefile.am@1.25 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ tests/libntp/libntptest.cpp@1.3 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ util/jitter.c@1.10 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ util/ntp-keygen.c@1.79 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ util/ntptime.c@1.22 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ util/tickadj.c@1.10 +0 -1
+ Declare debug in libntp instead of each program. Expose extern declaration
+ to utilities, libntp, and DEBUG ntpd.
+
+ChangeSet@1.2479.1.11, 2011-03-02 07:25:19+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P136
+ TAG: NTP_4_2_7P136
+
+ ChangeLog@1.807 +1 -0
+ NTP_4_2_7P136
+
+ clockstuff/clktest-opts.c@1.62 +2 -2
+ NTP_4_2_7P136
+
+ clockstuff/clktest-opts.h@1.62 +3 -3
+ NTP_4_2_7P136
+
+ ntpd/ntpd-opts.c@1.141 +2 -2
+ NTP_4_2_7P136
+
+ ntpd/ntpd-opts.h@1.141 +3 -3
+ NTP_4_2_7P136
+
+ ntpd/ntpd-opts.texi@1.139 +2 -2
+ NTP_4_2_7P136
+
+ ntpd/ntpd.1@1.139 +2 -2
+ NTP_4_2_7P136
+
+ ntpdc/ntpdc-opts.c@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpdc/ntpdc-opts.h@1.138 +3 -3
+ NTP_4_2_7P136
+
+ ntpdc/ntpdc-opts.texi@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpdc/ntpdc.1@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpq/ntpq-opts.c@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpq/ntpq-opts.h@1.138 +3 -3
+ NTP_4_2_7P136
+
+ ntpq/ntpq-opts.texi@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpq/ntpq.1@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.138 +3 -3
+ NTP_4_2_7P136
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.138 +2 -2
+ NTP_4_2_7P136
+
+ ntpsnmpd/ntpsnmpd.1@1.138 +2 -2
+ NTP_4_2_7P136
+
+ packageinfo.sh@1.138 +1 -1
+ NTP_4_2_7P136
+
+ sntp/sntp-opts.c@1.132 +2 -2
+ NTP_4_2_7P136
+
+ sntp/sntp-opts.h@1.132 +3 -3
+ NTP_4_2_7P136
+
+ sntp/sntp-opts.texi@1.132 +2 -2
+ NTP_4_2_7P136
+
+ sntp/sntp.1@1.132 +2 -2
+ NTP_4_2_7P136
+
+ sntp/sntp.html@1.132 +1 -1
+ NTP_4_2_7P136
+
+ util/ntp-keygen-opts.c@1.136 +2 -2
+ NTP_4_2_7P136
+
+ util/ntp-keygen-opts.h@1.136 +3 -3
+ NTP_4_2_7P136
+
+ util/ntp-keygen-opts.texi@1.139 +2 -2
+ NTP_4_2_7P136
+
+ util/ntp-keygen.1@1.139 +2 -2
+ NTP_4_2_7P136
+
+ChangeSet@1.2479.1.10, 2011-03-02 06:13:26+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1839] 4.2.7p135 still installs libevent ev*.h headers.
+
+ ChangeLog@1.806 +1 -0
+ [Bug 1839] 4.2.7p135 still installs libevent ev*.h headers.
+
+ sntp/libevent/Makefile.am@1.3 +8 -2
+ [Bug 1839] 4.2.7p135 still installs libevent ev*.h headers.
+
+ChangeSet@1.2479.1.9, 2011-03-02 00:29:27+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P135
+ TAG: NTP_4_2_7P135
+
+ ChangeLog@1.805 +1 -0
+ NTP_4_2_7P135
+
+ clockstuff/clktest-opts.c@1.61 +2 -2
+ NTP_4_2_7P135
+
+ clockstuff/clktest-opts.h@1.61 +3 -3
+ NTP_4_2_7P135
+
+ ntpd/ntpd-opts.c@1.140 +2 -2
+ NTP_4_2_7P135
+
+ ntpd/ntpd-opts.h@1.140 +3 -3
+ NTP_4_2_7P135
+
+ ntpd/ntpd-opts.texi@1.138 +2 -2
+ NTP_4_2_7P135
+
+ ntpd/ntpd.1@1.138 +2 -2
+ NTP_4_2_7P135
+
+ ntpdc/ntpdc-opts.c@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpdc/ntpdc-opts.h@1.137 +3 -3
+ NTP_4_2_7P135
+
+ ntpdc/ntpdc-opts.texi@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpdc/ntpdc.1@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpq/ntpq-opts.c@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpq/ntpq-opts.h@1.137 +3 -3
+ NTP_4_2_7P135
+
+ ntpq/ntpq-opts.texi@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpq/ntpq.1@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.137 +3 -3
+ NTP_4_2_7P135
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.137 +2 -2
+ NTP_4_2_7P135
+
+ ntpsnmpd/ntpsnmpd.1@1.137 +2 -2
+ NTP_4_2_7P135
+
+ packageinfo.sh@1.137 +1 -1
+ NTP_4_2_7P135
+
+ sntp/sntp-opts.c@1.131 +2 -2
+ NTP_4_2_7P135
+
+ sntp/sntp-opts.h@1.131 +3 -3
+ NTP_4_2_7P135
+
+ sntp/sntp-opts.texi@1.131 +2 -2
+ NTP_4_2_7P135
+
+ sntp/sntp.1@1.131 +2 -2
+ NTP_4_2_7P135
+
+ sntp/sntp.html@1.131 +1 -1
+ NTP_4_2_7P135
+
+ util/ntp-keygen-opts.c@1.135 +2 -2
+ NTP_4_2_7P135
+
+ util/ntp-keygen-opts.h@1.135 +3 -3
+ NTP_4_2_7P135
+
+ util/ntp-keygen-opts.texi@1.138 +2 -2
+ NTP_4_2_7P135
+
+ util/ntp-keygen.1@1.138 +2 -2
+ NTP_4_2_7P135
+
+ChangeSet@1.2479.1.8, 2011-03-01 04:48:43+00:00, davehart@shiny.ad.hartbrothers.com
+ libevent: When building on systems with CLOCK_MONOTONIC available,
+ separate the internal timeline (possibly counting since system boot)
+ from the gettimeofday() timeline in event_base cached timevals. Adds
+ new event_base_tv_cached() to retrieve cached callback round start
+ time on the internal timeline, and changes
+ event_based_gettimeofday_cached() to always return times using the
+ namesake timeline. This preserves the benefit of using the never-
+ stepped monotonic clock for event timeouts while providing clients
+ with times consistently using gettimeofday().
+ Correct event_base_gettimeofday_cached() workaround code in
+ sntp to work with corrected libevent.
+ Remove sntp l_fp_output() test now that it uses prettydate().
+
+ BitKeeper/deleted/9f/debug-input-lfp-hex~523a3dc59a6a4e86@1.3 +0 -0
+ Rename: sntp/tests/data/debug-input-lfp-hex -> BitKeeper/deleted/9f/debug-input-lfp-hex~523a3dc59a6a4e86
+
+ ChangeLog@1.804 +12 -0
+ libevent: When building on systems with CLOCK_MONOTONIC available,
+ separate the internal timeline (possibly counting since system boot)
+ from the gettimeofday() timeline in event_base cached timevals. Adds
+ new event_base_tv_cached() to retrieve cached callback round start
+ time on the internal timeline, and changes
+ event_based_gettimeofday_cached() to always return times using the
+ namesake timeline. This preserves the benefit of using the never-
+ stepped monotonic clock for event timeouts while providing clients
+ with times consistently using gettimeofday().
+ Correct event_base_gettimeofday_cached() workaround code in
+ sntp to work with corrected libevent.
+ Remove sntp l_fp_output() test now that it uses prettydate().
+
+ libntp/socket.c@1.6 +3 -6
+ Add \n termination overlooked in msyslog()->DPRINTF() changes
+
+ libntp/work_fork.c@1.8 +1 -1
+ Add \n termination overlooked in msyslog()->DPRINTF() changes
+
+ sntp/libevent/configure.in@1.3 +4 -0
+ Add AM_SILENT_RULES patch now in git libevent.
+
+ sntp/libevent/event-internal.h@1.2 +8 -1
+ Add struct timeval tod_tv_cache to struct event_base, analogous
+ to tv_cache but always using the gettimeofdday() timeline. Not
+ needed on systems without CLOCK_MONOTONIC.
+
+ sntp/libevent/event.c@1.2 +73 -5
+ When building on systems with CLOCK_MONOTONIC available, separate the
+ internal timeline (possibly counting since system boot) from the
+ gettimeofday() timeline in event_base cached timevals. Adds new
+ event_base_tv_cached() to retrieve cached callback round start time
+ on the internal timeline, and changes
+ event_based_gettimeofday_cached() to always return times using the
+ namesake timeline. This preserves the benefit of using the never-
+ stepped monotonic clock for event timeouts while providing clients
+ with times consistently using gettimeofday().
+
+ sntp/libevent/evthread.c@1.2 +11 -1
+ Add signature to struct debug_lock so that invalid lock pointers
+ can be caught sooner.
+
+ sntp/libevent/include/event2/event.h@1.2 +18 -3
+ Add event_base_tv_cached() to retrieve the start-of-callbacks
+ time on the internal timeline (possibly monotonic).
+
+ sntp/m4/ntp_libevent.m4@1.6 +2 -1
+ Respect a hypothetical -R/some/lib/path in libevent.pc.
+ Pass --enable-silent-rules to tearoff libevent configure.
+
+ sntp/m4/ntp_openssl.m4@1.17 +1 -1
+ Correct comment to match code.
+
+ sntp/main.c@1.69 +121 -49
+ Use pthread locks/mutexes/cond vars despite our so-far single-threaded
+ use of libevent.
+ Correct event_base_gettimeofday_cached() workaround code in
+ sntp to work with corrected libevent.
+
+ sntp/networking.c@1.58 +31 -25
+ Show server address in wrong org timestamp message.
+
+ sntp/tests/Makefile.am@1.24 +0 -2
+ Remove sntp l_fp_output() test now that it uses prettydate().
+
+ sntp/tests/packetProcessing.cpp@1.5 +4 -4
+ whitespace cleanup only
+
+ sntp/tests/utilities.cpp@1.7 +0 -16
+ Remove sntp l_fp_output() test now that it uses prettydate().
+
+ sntp/utilities.c@1.17 +5 -14
+ use prettydate() for l_fp_output()
+
+ChangeSet@1.2479.1.7, 2011-02-25 12:37:40+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1839] 4.2.7p131 installs libevent ev*.h headers.
+
+ ChangeLog@1.803 +1 -0
+ [Bug 1839] 4.2.7p131 installs libevent ev*.h headers.
+
+ sntp/libevent/include/Makefile.am@1.2 +9 -2
+ [Bug 1839] 4.2.7p131 installs libevent ev*.h headers.
+
+ChangeSet@1.2479.1.6, 2011-02-25 12:36:58+00:00, davehart@shiny.ad.hartbrothers.com
+ Ensure CONFIG_SHELL is not empty before relying on it for #! scripts.
+
+ ChangeLog@1.802 +1 -0
+ Ensure CONFIG_SHELL is not empty before relying on it for #! scripts.
+
+ configure.ac@1.519 +1 -0
+ Ensure CONFIG_SHELL is not empty before relying on it for #! scripts.
+
+ChangeSet@1.2479.1.5, 2011-02-24 10:50:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P134
+ TAG: NTP_4_2_7P134
+
+ ChangeLog@1.801 +1 -0
+ NTP_4_2_7P134
+
+ clockstuff/clktest-opts.c@1.60 +2 -2
+ NTP_4_2_7P134
+
+ clockstuff/clktest-opts.h@1.60 +3 -3
+ NTP_4_2_7P134
+
+ ntpd/ntpd-opts.c@1.139 +2 -2
+ NTP_4_2_7P134
+
+ ntpd/ntpd-opts.h@1.139 +3 -3
+ NTP_4_2_7P134
+
+ ntpd/ntpd-opts.texi@1.137 +2 -2
+ NTP_4_2_7P134
+
+ ntpd/ntpd.1@1.137 +2 -2
+ NTP_4_2_7P134
+
+ ntpdc/ntpdc-opts.c@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpdc/ntpdc-opts.h@1.136 +3 -3
+ NTP_4_2_7P134
+
+ ntpdc/ntpdc-opts.texi@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpdc/ntpdc.1@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpq/ntpq-opts.c@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpq/ntpq-opts.h@1.136 +3 -3
+ NTP_4_2_7P134
+
+ ntpq/ntpq-opts.texi@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpq/ntpq.1@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.136 +3 -3
+ NTP_4_2_7P134
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.136 +2 -2
+ NTP_4_2_7P134
+
+ ntpsnmpd/ntpsnmpd.1@1.136 +2 -2
+ NTP_4_2_7P134
+
+ packageinfo.sh@1.136 +1 -1
+ NTP_4_2_7P134
+
+ sntp/sntp-opts.c@1.130 +2 -2
+ NTP_4_2_7P134
+
+ sntp/sntp-opts.h@1.130 +3 -3
+ NTP_4_2_7P134
+
+ sntp/sntp-opts.texi@1.130 +2 -2
+ NTP_4_2_7P134
+
+ sntp/sntp.1@1.130 +2 -2
+ NTP_4_2_7P134
+
+ sntp/sntp.html@1.130 +1 -1
+ NTP_4_2_7P134
+
+ util/ntp-keygen-opts.c@1.134 +2 -2
+ NTP_4_2_7P134
+
+ util/ntp-keygen-opts.h@1.134 +3 -3
+ NTP_4_2_7P134
+
+ util/ntp-keygen-opts.texi@1.137 +2 -2
+ NTP_4_2_7P134
+
+ util/ntp-keygen.1@1.137 +2 -2
+ NTP_4_2_7P134
+
+ChangeSet@1.2479.2.4, 2011-02-24 04:21:34+00:00, davehart@shiny.ad.hartbrothers.com
+ Another ac_cv_path* variable needs clearing to prevent caching the
+ full path to pkg-config.
+
+ sntp/m4/ntp_pkg_config.m4@1.2 +1 -0
+ Another ac_cv_path* variable needs clearing to prevent caching the
+ full path to pkg-config.
+
+ChangeSet@1.2479.1.3, 2011-02-23 16:58:30-05:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.800 +7 -7
+ merge cleanup
+
+ChangeSet@1.2479.2.3, 2011-02-23 20:34:51+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix make distcheck failure seen on psp-deb1 by distributing
+ sntp/tests/data files individually by name rather than
+ listing "data".
+
+ sntp/tests/Makefile.am@1.23 +16 -1
+ Fix make distcheck failure seen on psp-deb1 by distributing
+ sntp/tests/data files individually by name rather than
+ listing "data".
+
+ChangeSet@1.2479.2.1, 2011-02-23 18:57:00+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1837] Build fails on Win7 due to regedit requiring privilege.
+ Provide fallback definitions for GetAdaptersAddresses() for Windows
+ build environments lacking iphlpapi.h.
+ Rename file containing 1.xxxx ChangeSet revision from version to
+ scm-rev to avoid invoking GNU make implicit rules attempting to
+ compile version.c into version. Problem was with sntp/version.o
+ during make distcheck after fix for spurious sntp rebuilds.
+
+ ChangeLog@1.797.1.1 +7 -0
+ [Bug 1837] Build fails on Win7 due to regedit requiring privilege.
+ Provide fallback definitions for GetAdaptersAddresses() for Windows
+ build environments lacking iphlpapi.h.
+ Rename file containing 1.xxxx ChangeSet revision from version to
+ scm-rev to avoid invoking GNU make implicit rules attempting to
+ compile version.c into version. Problem was with sntp/version.o
+ during make distcheck after fix for spurious sntp rebuilds.
+
+ lib/isc/win32/interfaceiter.c@1.21 +4 -4
+ Provide fallback definitions for GetAdaptersAddresses() for Windows
+ build environments lacking iphlpapi.h.
+
+ ntpd/Makefile.am@1.102 +7 -5
+ Rename cset file from sntp/version to sntp/scm-rev.
+
+ ntpdate/Makefile.am@1.30 +7 -5
+ Rename cset file from sntp/version to sntp/scm-rev.
+
+ ntpdc/Makefile.am@1.60 +7 -5
+ Rename cset file from sntp/version to sntp/scm-rev.
+
+ ntpq/Makefile.am@1.56 +8 -6
+ Rename cset file from sntp/version to sntp/scm-rev.
+
+ ports/winnt/include/gaa_compat.h@1.1 +771 -0
+ BitKeeper file C:/ntp/ntp-dev-1837/ports/winnt/include/gaa_compat.h
+
+ ports/winnt/include/gaa_compat.h@1.0 +0 -0
+
+ ports/winnt/scripts/mkver.bat@1.14 +11 -7
+ [Bug 1837] Build fails on Win7 due to regedit requiring privilege.
+ Rename file containing 1.xxxx ChangeSet revision from version to
+ scm-rev to avoid invoking GNU make implicit rules attempting to
+ compile version.c into version. Problem was with sntp/version.o
+ during make distcheck after fix for spurious sntp rebuilds.
+
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.39 +6 -2
+ add gaa_compat.h reference
+
+ sntp/Makefile.am@1.57.1.1 +14 -9
+ Rename cset file from sntp/version to sntp/scm-rev.
+ Fixes psp-deb1 make distcheck failure on sntp/version.o, which was
+ using an implicit rule to build presumed-executable "version" from
+ ../../sntp/../../sntp/version.c.
+
+ sntp/libevent/test/Makefile.am@1.3 +1 -1
+ http://sourceforge.net/tracker/?func=detail&aid=3189896&group_id=50884&atid=461324
+
+ util/Makefile.am@1.59 +8 -6
+ Rename cset file from sntp/version to sntp/scm-rev.
+
+ChangeSet@1.2479.1.1, 2011-02-23 11:06:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P133
+ TAG: NTP_4_2_7P133
+
+ ChangeLog@1.798 +1 -0
+ NTP_4_2_7P133
+
+ clockstuff/clktest-opts.c@1.59 +2 -2
+ NTP_4_2_7P133
+
+ clockstuff/clktest-opts.h@1.59 +3 -3
+ NTP_4_2_7P133
+
+ ntpd/ntpd-opts.c@1.138 +2 -2
+ NTP_4_2_7P133
+
+ ntpd/ntpd-opts.h@1.138 +3 -3
+ NTP_4_2_7P133
+
+ ntpd/ntpd-opts.texi@1.136 +2 -2
+ NTP_4_2_7P133
+
+ ntpd/ntpd.1@1.136 +2 -2
+ NTP_4_2_7P133
+
+ ntpdc/ntpdc-opts.c@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpdc/ntpdc-opts.h@1.135 +3 -3
+ NTP_4_2_7P133
+
+ ntpdc/ntpdc-opts.texi@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpdc/ntpdc.1@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpq/ntpq-opts.c@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpq/ntpq-opts.h@1.135 +3 -3
+ NTP_4_2_7P133
+
+ ntpq/ntpq-opts.texi@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpq/ntpq.1@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.135 +3 -3
+ NTP_4_2_7P133
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.135 +2 -2
+ NTP_4_2_7P133
+
+ ntpsnmpd/ntpsnmpd.1@1.135 +2 -2
+ NTP_4_2_7P133
+
+ packageinfo.sh@1.135 +1 -1
+ NTP_4_2_7P133
+
+ sntp/sntp-opts.c@1.129 +2 -2
+ NTP_4_2_7P133
+
+ sntp/sntp-opts.h@1.129 +3 -3
+ NTP_4_2_7P133
+
+ sntp/sntp-opts.texi@1.129 +2 -2
+ NTP_4_2_7P133
+
+ sntp/sntp.1@1.129 +2 -2
+ NTP_4_2_7P133
+
+ sntp/sntp.html@1.129 +1 -1
+ NTP_4_2_7P133
+
+ util/ntp-keygen-opts.c@1.133 +2 -2
+ NTP_4_2_7P133
+
+ util/ntp-keygen-opts.h@1.133 +3 -3
+ NTP_4_2_7P133
+
+ util/ntp-keygen-opts.texi@1.136 +2 -2
+ NTP_4_2_7P133
+
+ util/ntp-keygen.1@1.136 +2 -2
+ NTP_4_2_7P133
+
+ChangeSet@1.2478.1.1, 2011-02-22 19:38:18-05:00, stenn@psp-deb1.ntp.org
+ Start using the new autogen doc template
+
+ sntp/Makefile.am@1.56.1.1 +1 -1
+ Start using the new autogen doc template
+
+ChangeSet@1.2479, 2011-02-22 23:21:13+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+ Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
+ tearoff (if required) and sntp are compiled after the rest.
+ Use a single set of Automake options for each package in configure.ac
+ AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
+ Correct spurious sntp rebuilds triggered by a make misperception
+ sntp/version was out-of-date relative to phony target FRC.version.
+ Do not cache paths to perl, test, or pkg-config, searching the PATH
+ at configure time is worth it to pick up tool updates.
+
+ ChangeLog@1.797 +9 -0
+ [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+ Move sntp last in top-level Makefile.am SUBDIRS so that the libevent
+ tearoff (if required) and sntp are compiled after the rest.
+ Use a single set of Automake options for each package in configure.ac
+ AM_INIT, remove Makefile.am AUTOMAKE_OPTIONS= lines.
+ Correct spurious sntp rebuilds triggered by a make misperception
+ sntp/version was out-of-date relative to phony target FRC.version.
+ Do not cache paths to perl, test, or pkg-config, searching the PATH
+ at configure time is worth it to pick up tool updates.
+
+ Makefile.am@1.108 +1 -5
+ Distribute includes.mf.
+ Build sntp late in the game to exhibit problems elsewhere first.
+
+ adjtimed/Makefile.am@1.12 +6 -11
+ use check-libntp.mf.
+
+ check-libopts.mf@1.1 +14 -0
+ BitKeeper file C:/ntp/ntp-dev-1834/check-libopts.mf
+
+ check-libopts.mf@1.0 +0 -0
+
+ clockstuff/Makefile.am@1.19 +3 -12
+ use check-libntp.mf and check-libopts.mf.
+
+ configure.ac@1.518 +12 -2
+ Do not cache paths to perl, test, or pkg-config, searching the PATH
+ at configure time is worth it to pick up tool updates.
+
+ include/Makefile.am@1.47 +0 -2
+ Use a single set of Automake options per package in AM_INIT
+
+ include/isc/Makefile.am@1.2 +0 -2
+ Use a single set of Automake options per package in AM_INIT
+
+ libparse/Makefile.am@1.26 +7 -10
+ add check-libparse target for ntpd/Makefile.am use
+
+ ntpd/Makefile.am@1.101 +12 -20
+ Use a single set of Automake options per package in AM_INIT
+
+ ntpdate/Makefile.am@1.29 +8 -15
+ use check-libntp.mf.
+
+ ntpdate/ntpdate.c@1.85 +1 -1
+ [Bug 1834] ntpdate 4.2.7p131 aborts with assertion failure.
+
+ ntpdc/Makefile.am@1.59 +3 -9
+ make sure libopts.la is up-to-date.
+
+ ntpq/Makefile.am@1.55 +3 -9
+ make sure libopts.la is up-to-date.
+
+ ntpsnmpd/Makefile.am@1.27 +3 -9
+ use check-libntp.mf and check-libopts.mf.
+
+ scripts/mkver.in@1.13 +1 -1
+ Use CONFIG_SHELL for #! line instead of AC_PATH_PROG(sh).
+
+ scripts/ntpver.in@1.3 +2 -2
+ Use CONFIG_SHELL for #! line instead of AC_PATH_PROG(sh).
+ Use @AWK@ from AC_PROG_AWK instead of 'awk'.
+
+ sntp/Makefile.am@1.57 +14 -20
+ Distribute includes.mf.
+
+ sntp/check-libntp.mf@1.1 +15 -0
+ BitKeeper file C:/ntp/ntp-dev-1834/sntp/check-libntp.mf
+
+ sntp/check-libntp.mf@1.0 +0 -0
+
+ sntp/check-libopts.mf@1.1 +14 -0
+ BitKeeper file C:/ntp/ntp-dev-1834/sntp/check-libopts.mf
+
+ sntp/check-libopts.mf@1.0 +0 -0
+
+ sntp/m4/ntp_googletest.m4@1.3 +1 -0
+ Do not cache paths to perl, test, or pkg-config, searching the PATH
+ at configure time is worth it to pick up tool updates.
+
+ sntp/m4/ntp_libevent.m4@1.5 +1 -15
+ Use NTP_PKG_CONFIG.
+
+ sntp/m4/ntp_openssl.m4@1.16 +10 -23
+ Use NTP_PKG_CONFIG.
+ Attempt to fix broken need_dash_r logic.
+
+ sntp/m4/ntp_pkg_config.m4@1.1 +26 -0
+ BitKeeper file C:/ntp/ntp-dev-1834/sntp/m4/ntp_pkg_config.m4
+
+ sntp/m4/ntp_pkg_config.m4@1.0 +0 -0
+
+ sntp/tests/Makefile.am@1.22 +12 -0
+ use adapted check-libntp.mf snippet
+
+ tests/libntp/Makefile.am@1.36 +12 -0
+ use adapted check-libntp.mf snippet
+
+ util/Makefile.am@1.58 +3 -8
+ use check-libntp.mf and check-libopts.mf.
+
+ChangeSet@1.2478, 2011-02-22 08:28:31+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P132
+ TAG: NTP_4_2_7P132
+
+ ChangeLog@1.796 +1 -0
+ NTP_4_2_7P132
+
+ clockstuff/clktest-opts.c@1.58 +2 -2
+ NTP_4_2_7P132
+
+ clockstuff/clktest-opts.h@1.58 +3 -3
+ NTP_4_2_7P132
+
+ ntpd/ntpd-opts.c@1.137 +2 -2
+ NTP_4_2_7P132
+
+ ntpd/ntpd-opts.h@1.137 +3 -3
+ NTP_4_2_7P132
+
+ ntpd/ntpd-opts.texi@1.135 +4 -4
+ NTP_4_2_7P132
+
+ ntpd/ntpd.1@1.135 +2 -2
+ NTP_4_2_7P132
+
+ ntpdc/ntpdc-opts.c@1.134 +2 -2
+ NTP_4_2_7P132
+
+ ntpdc/ntpdc-opts.h@1.134 +3 -3
+ NTP_4_2_7P132
+
+ ntpdc/ntpdc-opts.texi@1.134 +4 -4
+ NTP_4_2_7P132
+
+ ntpdc/ntpdc.1@1.134 +2 -2
+ NTP_4_2_7P132
+
+ ntpq/ntpq-opts.c@1.134 +2 -2
+ NTP_4_2_7P132
+
+ ntpq/ntpq-opts.h@1.134 +3 -3
+ NTP_4_2_7P132
+
+ ntpq/ntpq-opts.texi@1.134 +4 -4
+ NTP_4_2_7P132
+
+ ntpq/ntpq.1@1.134 +2 -2
+ NTP_4_2_7P132
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.134 +2 -2
+ NTP_4_2_7P132
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.134 +3 -3
+ NTP_4_2_7P132
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.134 +4 -4
+ NTP_4_2_7P132
+
+ ntpsnmpd/ntpsnmpd.1@1.134 +2 -2
+ NTP_4_2_7P132
+
+ packageinfo.sh@1.134 +1 -1
+ NTP_4_2_7P132
+
+ sntp/sntp-opts.c@1.128 +2 -2
+ NTP_4_2_7P132
+
+ sntp/sntp-opts.h@1.128 +3 -3
+ NTP_4_2_7P132
+
+ sntp/sntp-opts.texi@1.128 +4 -4
+ NTP_4_2_7P132
+
+ sntp/sntp.1@1.128 +2 -2
+ NTP_4_2_7P132
+
+ sntp/sntp.html@1.128 +3 -3
+ NTP_4_2_7P132
+
+ util/ntp-keygen-opts.c@1.132 +2 -2
+ NTP_4_2_7P132
+
+ util/ntp-keygen-opts.h@1.132 +3 -3
+ NTP_4_2_7P132
+
+ util/ntp-keygen-opts.texi@1.135 +4 -4
+ NTP_4_2_7P132
+
+ util/ntp-keygen.1@1.135 +2 -2
+ NTP_4_2_7P132
+
+ChangeSet@1.2477, 2011-02-22 08:01:28+00:00, davehart@shiny.ad.hartbrothers.com
+ Avoid relying on remake rules for routine build/flock-build for
+ libevent as for the top-level and sntp subproject.
+
+ ChangeLog@1.795 +3 -1
+ Avoid relying on remake rules for routine build/flock-build for
+ libevent as for the top-level and sntp subproject.
+
+ build@1.44 +8 -1
+ Avoid relying on remake rules for routine build/flock-build for
+ libevent as for the top-level and sntp subproject.
+
+ChangeSet@1.2476, 2011-02-22 02:51:42-05:00, stenn@deacon.udel.edu
+ ElectricFence was suffering bitrot - remove it. valgrind seems better.
+
+ BitKeeper/deleted/04/COPYING~52231e38@1.3 +0 -0
+ Delete: ElectricFence/COPYING
+
+ BitKeeper/deleted/26/Makefile-~52231e38@1.3 +0 -0
+ Delete: ElectricFence/Makefile-
+
+ BitKeeper/deleted/28/efence.h~52231e38@1.3 +0 -0
+ Delete: ElectricFence/efence.h
+
+ BitKeeper/deleted/49/Makefile.am~52231e38@1.8 +0 -0
+ Delete: ElectricFence/Makefile.am
+
+ BitKeeper/deleted/4b/README~52231e38@1.3 +0 -0
+ Delete: ElectricFence/README
+
+ BitKeeper/deleted/54/efence.c~52231e38@1.3 +0 -0
+ Delete: ElectricFence/efence.c
+
+ BitKeeper/deleted/59/print.c~52231e38@1.3 +0 -0
+ Delete: ElectricFence/print.c
+
+ BitKeeper/deleted/8b/page.c~52231e38@1.6 +0 -0
+ Delete: ElectricFence/page.c
+
+ BitKeeper/deleted/a8/eftest.c~52231e38@1.3 +0 -0
+ Delete: ElectricFence/eftest.c
+
+ BitKeeper/deleted/de/CHANGES~52231e38@1.3 +0 -0
+ Delete: ElectricFence/CHANGES
+
+ BitKeeper/deleted/e4/libefence.3~52231e38@1.3 +0 -0
+ Delete: ElectricFence/libefence.3
+
+ BitKeeper/deleted/e8/tstheap.c~52231e38@1.3 +0 -0
+ Delete: ElectricFence/tstheap.c
+
+ ChangeLog@1.794 +1 -0
+ ElectricFence was suffering bitrot - remove it. valgrind seems better.
+
+ Makefile.am@1.107 +0 -1
+ ElectricFence was suffering bitrot - remove it. valgrind seems better.
+
+ configure.ac@1.517 +0 -24
+ ElectricFence was suffering bitrot - remove it. valgrind seems better.
+
+ChangeSet@1.2471.1.2, 2011-02-22 01:35:03-05:00, stenn@deacon.udel.edu
+ Updated to AutoGen-5.11.6
+
+ clockstuff/clktest-opts.c@1.57 +27 -11
+ Updated to AutoGen-5.11.6
+
+ clockstuff/clktest-opts.h@1.57 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpd/ntpd-opts.c@1.136 +24 -8
+ Updated to AutoGen-5.11.6
+
+ ntpd/ntpd-opts.h@1.136 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpd/ntpd-opts.texi@1.134 +3 -3
+ Updated to AutoGen-5.11.6
+
+ ntpd/ntpd.1@1.134 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpdc/ntpdc-opts.c@1.133 +34 -25
+ Updated to AutoGen-5.11.6
+
+ ntpdc/ntpdc-opts.h@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpdc/ntpdc-opts.texi@1.133 +11 -18
+ Updated to AutoGen-5.11.6
+
+ ntpdc/ntpdc.1@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpq/ntpq-opts.c@1.133 +32 -18
+ Updated to AutoGen-5.11.6
+
+ ntpq/ntpq-opts.h@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpq/ntpq-opts.texi@1.133 +9 -11
+ Updated to AutoGen-5.11.6
+
+ ntpq/ntpq.1@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.133 +24 -8
+ Updated to AutoGen-5.11.6
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.133 +3 -3
+ Updated to AutoGen-5.11.6
+
+ ntpsnmpd/ntpsnmpd.1@1.133 +2 -2
+ Updated to AutoGen-5.11.6
+
+ sntp/sntp-opts.c@1.127 +28 -12
+ Updated to AutoGen-5.11.6
+
+ sntp/sntp-opts.h@1.127 +2 -2
+ Updated to AutoGen-5.11.6
+
+ sntp/sntp-opts.texi@1.127 +6 -6
+ Updated to AutoGen-5.11.6
+
+ sntp/sntp.1@1.127 +2 -2
+ Updated to AutoGen-5.11.6
+
+ sntp/sntp.html@1.127 +5 -5
+ Updated to AutoGen-5.11.6
+
+ util/ntp-keygen-opts.c@1.131 +28 -12
+ Updated to AutoGen-5.11.6
+
+ util/ntp-keygen-opts.h@1.131 +2 -2
+ Updated to AutoGen-5.11.6
+
+ util/ntp-keygen-opts.texi@1.134 +5 -5
+ Updated to AutoGen-5.11.6
+
+ util/ntp-keygen.1@1.134 +2 -2
+ Updated to AutoGen-5.11.6
+
+ChangeSet@1.2473, 2011-02-22 06:06:28+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1832] ntpdate doesn't allow timeout > 2s.
+ [Bug 1833] The checking sem_timedwait() fails without -pthread.
+ Enable all relevant automake warnings.
+ Correct Solaris 2.1x PTHREAD_ONCE_INIT extra braces test to avoid
+ triggering warnings due to excess braces.
+ Remove libevent-cfg from sntp/Makefile.am.
+ Provide bug report and URL options to Autoconf.
+
+ ChangeLog@1.793 +7 -1
+ [Bug 1832] ntpdate doesn't allow timeout > 2s.
+ [Bug 1833] The checking sem_timedwait() fails without -pthread.
+ Enable all relevant automake warnings.
+ Correct Solaris 2.1x PTHREAD_ONCE_INIT extra braces test to avoid
+ triggering warnings due to excess braces.
+ Remove libevent-cfg from sntp/Makefile.am.
+ Provide bug report and URL options to Autoconf.
+
+ Makefile.am@1.106 +1 -3
+ Enable all relevant automake warnings.
+
+
+ adjtimed/Makefile.am@1.11 +7 -10
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ clockstuff/Makefile.am@1.18 +7 -9
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ configure.ac@1.516 +11 -4
+ Pass automake options via AM_INIT_AUTOMAKE so they apply to all Makefile.am
+ without requiring duplicative AUTOMAKE_OPTIONS = lines.
+ Enable all relevant automake warnings.
+
+ includes.mf@1.1 +6 -0
+ BitKeeper file C:/ntp/ntp-dev-m4quote/includes.mf
+
+ includes.mf@1.0 +0 -0
+
+ kernel/Makefile.am@1.5 +0 -2
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ kernel/sys/Makefile.am@1.6 +0 -5
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ libntp/Makefile.am@1.61 +7 -11
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ libparse/Makefile.am@1.25 +5 -10
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ ntpd/Makefile.am@1.100 +6 -8
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ ntpd/refclock_true.c@1.18 +3 -3
+ include system and C runtime headers before NTP's
+
+ ntpdate/Makefile.am@1.28 +6 -10
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ ntpdate/ntpdate.c@1.84 +1 -12
+ [Bug 1832] ntpdate doesn't allow timeout > 2s.
+
+ ntpdate/ntpdate.h@1.13 +6 -3
+ [Bug 1832] ntpdate doesn't allow timeout > 2s.
+
+ ntpdc/Makefile.am@1.58 +8 -10
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ ntpq/Makefile.am@1.54 +8 -10
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ ntpsnmpd/Makefile.am@1.26 +10 -12
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ parseutil/Makefile.am@1.15 +7 -9
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ sntp/Makefile.am@1.56 +15 -17
+ Enable all relevant automake warnings.
+
+
+ sntp/configure.ac@1.58 +10 -4
+ Pass automake options via AM_INIT_AUTOMAKE so they apply to all Makefile.am
+ without requiring duplicative AUTOMAKE_OPTIONS = lines.
+ Enable all relevant automake warnings.
+
+ sntp/includes.mf@1.1 +6 -0
+ BitKeeper file C:/ntp/ntp-dev-m4quote/sntp/includes.mf
+
+ sntp/includes.mf@1.0 +0 -0
+
+ sntp/m4/ntp_libevent.m4@1.4 +3 -3
+ $ac_configure_args is maintained with a leading space, particularly important
+ with Autoconf 2.61, not so much with 2.68.
+
+ sntp/m4/ntp_libntp.m4@1.7 +27 -10
+ [Bug 1833] The checking sem_timedwait() fails without -pthread.
+
+ sntp/tests/Makefile.am@1.21 +20 -17
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ tests/libntp/Makefile.am@1.35 +18 -15
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ util/Makefile.am@1.57 +8 -13
+ automake deprecates INCLUDES, use AM_CPPFLAGS instead
+
+ChangeSet@1.2082.4.204, 2011-02-22 00:38:53-05:00, stenn@deacon.udel.edu
upgrade to libopts-34.0.9
- clockstuff/clktest-opts.c@1.13 +100 -76
+ clockstuff/clktest-opts.c@1.12.1.1 +100 -76
upgrade to libopts-34.0.9
- clockstuff/clktest-opts.h@1.13 +32 -25
+ clockstuff/clktest-opts.h@1.12.1.1 +32 -25
upgrade to libopts-34.0.9
- ntpd/ntpd-opts.c@1.282 +24 -8
+ ntpd/ntpd-opts.c@1.248.34.1 +24 -8
upgrade to libopts-34.0.9
- ntpd/ntpd-opts.h@1.282 +2 -2
+ ntpd/ntpd-opts.h@1.248.34.1 +2 -2
upgrade to libopts-34.0.9
ntpd/ntpdsim-opts.c@1.18 +202 -171
@@ -1511,22 +91732,22 @@ ChangeSet@1.2291, 2011-02-22 00:38:53-05:00, stenn@deacon.udel.edu
ntpd/ntpdsim-opts.h@1.18 +32 -28
upgrade to libopts-34.0.9
- ntpdc/ntpdc-opts.c@1.278 +34 -25
+ ntpdc/ntpdc-opts.c@1.244.34.1 +34 -25
upgrade to libopts-34.0.9
- ntpdc/ntpdc-opts.h@1.278 +2 -2
+ ntpdc/ntpdc-opts.h@1.244.34.1 +2 -2
upgrade to libopts-34.0.9
- ntpq/ntpq-opts.c@1.279 +32 -18
+ ntpq/ntpq-opts.c@1.245.34.1 +32 -18
upgrade to libopts-34.0.9
- ntpq/ntpq-opts.h@1.279 +2 -2
+ ntpq/ntpq-opts.h@1.245.34.1 +2 -2
upgrade to libopts-34.0.9
- ntpsnmpd/ntpsnmpd-opts.c@1.158 +24 -8
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.35.1 +24 -8
upgrade to libopts-34.0.9
- ntpsnmpd/ntpsnmpd-opts.h@1.158 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.35.1 +2 -2
upgrade to libopts-34.0.9
sntp/libopts/COPYING.gplv3@1.4 +1 -1
@@ -1658,211 +91879,6798 @@ ChangeSet@1.2291, 2011-02-22 00:38:53-05:00, stenn@deacon.udel.edu
sntp/libopts/xat-attribute.h@1.12 +1 -1
upgrade to libopts-34.0.9
- sntp/sntp-opts.c@1.149 +27 -11
+ sntp/sntp-opts.c@1.117.32.1 +27 -11
upgrade to libopts-34.0.9
- sntp/sntp-opts.h@1.149 +2 -2
+ sntp/sntp-opts.h@1.117.32.1 +2 -2
upgrade to libopts-34.0.9
- util/ntp-keygen-opts.c@1.281 +28 -12
+ util/ntp-keygen-opts.c@1.247.34.1 +28 -12
upgrade to libopts-34.0.9
- util/ntp-keygen-opts.h@1.281 +2 -2
+ util/ntp-keygen-opts.h@1.247.34.1 +2 -2
upgrade to libopts-34.0.9
-ChangeSet@1.2290, 2011-01-03 21:20:42-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2467.1.1, 2011-02-21 20:50:01+00:00, davehart@shiny.ad.hartbrothers.com
+ Autoconf 2.61 workarounds
+
+ sntp/m4/ntp_cacheversion.m4@1.13 +8 -1
+ Autoconf 2.61 workaround: do not use AS_UNSET with a variable variable name.
+
+ sntp/m4/ntp_libntp.m4@1.4.1.1 +12 -13
+ Autoconf 2.61 workarounds: do not use [] for action-if-not-found with
+ AC_CHECK_LIB and AC_CHECK_FUNC
+
+ChangeSet@1.2471, 2011-02-21 06:04:08-05:00, stenn@deacon.udel.edu
+ Remove libevent-cfg from sntp/Makefile.am
+
+ ChangeLog@1.792 +1 -0
+ Remove libevent-cfg from sntp/Makefile.am
+
+ sntp/Makefile.am@1.55 +0 -1
+ Remove libevent-cfg from sntp/Makefile.am
+
+ChangeSet@1.2470, 2011-02-21 09:21:02+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P131
+ TAG: NTP_4_2_7P131
+
+ ChangeLog@1.791 +1 -0
+ NTP_4_2_7P131
+
+ clockstuff/clktest-opts.c@1.55 +2 -2
+ NTP_4_2_7P131
+
+ clockstuff/clktest-opts.h@1.55 +3 -3
+ NTP_4_2_7P131
+
+ ntpd/ntpd-opts.c@1.135 +2 -2
+ NTP_4_2_7P131
+
+ ntpd/ntpd-opts.h@1.135 +3 -3
+ NTP_4_2_7P131
+
+ ntpd/ntpd-opts.texi@1.133 +2 -2
+ NTP_4_2_7P131
+
+ ntpd/ntpd.1@1.133 +2 -2
+ NTP_4_2_7P131
+
+ ntpdc/ntpdc-opts.c@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpdc/ntpdc-opts.h@1.132 +3 -3
+ NTP_4_2_7P131
+
+ ntpdc/ntpdc-opts.texi@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpdc/ntpdc.1@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpq/ntpq-opts.c@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpq/ntpq-opts.h@1.132 +3 -3
+ NTP_4_2_7P131
+
+ ntpq/ntpq-opts.texi@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpq/ntpq.1@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.132 +3 -3
+ NTP_4_2_7P131
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.132 +2 -2
+ NTP_4_2_7P131
+
+ ntpsnmpd/ntpsnmpd.1@1.132 +2 -2
+ NTP_4_2_7P131
+
+ packageinfo.sh@1.133 +1 -1
+ NTP_4_2_7P131
+
+ sntp/sntp-opts.c@1.126 +13 -29
+ NTP_4_2_7P131
+
+ sntp/sntp-opts.h@1.126 +4 -4
+ NTP_4_2_7P131
+
+ sntp/sntp-opts.texi@1.126 +7 -8
+ NTP_4_2_7P131
+
+ sntp/sntp.1@1.126 +2 -2
+ NTP_4_2_7P131
+
+ sntp/sntp.html@1.126 +56 -84
+ NTP_4_2_7P131
+
+ util/ntp-keygen-opts.c@1.130 +2 -2
+ NTP_4_2_7P131
+
+ util/ntp-keygen-opts.h@1.130 +3 -3
+ NTP_4_2_7P131
+
+ util/ntp-keygen-opts.texi@1.133 +2 -2
+ NTP_4_2_7P131
+
+ util/ntp-keygen.1@1.133 +2 -2
+ NTP_4_2_7P131
+
+ChangeSet@1.2469, 2011-02-21 03:59:49-05:00, stenn@deacon.udel.edu
+ The fixes for bugs 1087 and 1088 are in the udated SNTP code
+
+ ChangeLog@1.790 +2 -0
+ The fixes for bugs 1087 and 1088 are in the udated SNTP code
+
+ChangeSet@1.2468, 2011-02-21 00:26:17-08:00, harlan@hms-mbp.local
+ older autoconf sometimes dislikes [].
+
+ ChangeLog@1.789 +1 -0
+ older autoconf sometimes dislikes [].
+
+ sntp/m4/ntp_libntp.m4@1.5 +4 -6
+ older autoconf sometimes dislikes [].
+
+ChangeSet@1.2422.10.1, 2011-02-20 23:11:05-05:00, stenn@deacon.udel.edu
+ refclock_acts.c cleanup from Dave Mills
+
+ ChangeLog@1.784.2.1 +1 -0
+ refclock_acts.c cleanup from Dave Mills
+
+ ntpd/refclock_acts.c@1.46.1.1 +4 -3
+ refclock_acts.c cleanup from Dave Mills
+
+ChangeSet@1.2466, 2011-02-20 21:20:21+00:00, davehart@shiny.ad.hartbrothers.com
+ Cleanup for prior merge cset
+
+ include/ntp_machine.h@1.33 +5 -1
+ Cleanup for prior merge cset
+
+ include/ntp_unixtime.h@1.10 +1 -6
+ Cleanup for prior merge cset
+
+ libntp/systime.c@1.53 +2 -2
+ Cleanup for prior merge cset
+
+ ports/winnt/libntp/SetSystemTime.c@1.10 +2 -0
+ Cleanup for prior merge cset
+
+ ports/winnt/libntp/getclock.c@1.3 +2 -0
+ Cleanup for prior merge cset
+
+ ports/winnt/libntp/util_clockstuff.c@1.5 +1 -0
+ Cleanup for prior merge cset
+
+ util/ntp-keygen.c@1.78 +2 -2
+ Cleanup for prior merge cset
+
+ChangeSet@1.2464, 2011-02-20 20:23:00+00:00, davehart@shiny.ad.hartbrothers.com
+ Attempt typical subpackage approach for libevent
+ sntp test cleanup
+ IPv6 hackery
+ Split up ntp_lib.m4 into smaller, more specific subsets
+ Use {step,adj}_systime from libntp. Use EX_* codes for exit status.
+ libevent cleanup
+ libevent upgrade
+ Move blocking worker and intres from ntpd to libntp.
+ Move AC_FUNC_FORK and AC_FUNC_ALLOCA to ntp_libntp.m4 along with move
+ of intres/blocking worker to libntp.
+ Use %m instead of strerror().
+ make -lz depend on zlib.h
+ hp-ux portability fix
+ portability
+ Allow libevent's regress to be skipped in make check.
+ Switch sntp from evdns to blocking worker intres.
+ Quiet "signal_no_reset: signal 18 had flags 20000" on OpenSolaris,
+ adding SA_NOCLDSTOP to IGNORED_SA_FLAGS.
+ Be consistent about how blocking children go away:
+ 1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
+ 2. Child goes away quietly.
+ 3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
+ 4. Parent clears blocking_children entry for reuse.
+ Make delay between queries to addresses resolved from same hostname
+ per-family in sntp, as ntpd won't consider our v4 and v6 source
+ addresses to be one remote rate-limit target.
+ use freeaddrinfo() in ntpq's getnetnum().
+ valgrind warned of branch dependent on uninitialized value,
+ irig_decode()'s local syncdig.
+ Free OpenSSL dynamic allocations atexit.
+ Enable pthreads build
+ libntp autoconf macro cleanup
+ Move "can't write KoD file" warning from sntp shutdown to startup.
+ Use libevent log callback to redirect messages from stderr to msyslog()
+ enable libevent debug mode if sntp debug > 0
+ Issue a single read event for each socket, rather than one per query.
+ Do not attempt to read in socket callback for EV_TIMEOUT.
+ ipv6 fixes for sntp
+ Crib some pthread m4 from BIND for libisc.
+ Fix step/slew logic in sntp.
+ sntp --headspace option (default 10ms) spaces queries.
+ Provide less-broken gettimeofday_cached().
+ Add support for --(no-)wait and -uctimeout
+ Remove duplicate clock_gettime/clock_settime logic from sntp/configure.ac,
+ it's now in sntp/m4/ntp_libntp.m4.
+ Bump config.cache version stamps to account for cache-incompatible change
+ to librt detection.
+ Omit unused code with recent gcc and gnu ld.
+ AC_LANG update for openldap autoconf macros
+ Clean up AC_DEFINE and AC_DEFINE_UNQUOTED arg quoting in openldap*.m4
+ add a timeout for test-eof.c as it may hang under HP-UX 10.20
+ Use pthreads for blocking worker rather than fork, if possible.
+ Quiet alignment warning due to casting sockaddr * to sockaddr_u *
+ Quiet ntp_control.c and ntp_request.c warnings about casting char *
+ to u_int32 * using unions.
+ Use void * rather than char * for variant pointers to help with
+ pointer cast increases required alignment warnings.
+ Fix many warnings enabled with -Wcast-align, when casting
+ a pointer to a more-strictly-aligned underlying type.
+ preset ol_with_yielding_select=${ol_with_yielding_select-auto}
+ Also change tests to use x prefix as insurance against other issues.
+ We always need the PTHREADS AM_CONDITIONAL. Use the OL check.
+ Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
+ libevent.
+ Add readonly arg to kod_init_kod_db() for tests -- prevents editing
+ test baseline input KoD files during make check, regression limited
+ to sntp/libevent branch.
+ Switch libevent-2.0.10-stable from ACX_PTHREADS to OL_THREAD_CHECK
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+ Remove contentious libevent-cfg sentinel files, modify libevent's
+ confgure args via $ac_configure_args.
+ Strip unneeded checks from ntp_ipv6.m4:
+ for struct sockaddr_storage member ss_family
+ for struct sockaddr_storage member ss_len
+ for struct sockaddr_storage member __ss_len
+ Move things used by libntp from top-level configure.ac to NTP_LIBNTP and NTP_IPV6
+ Change "forked worker child (pid 0)" from msyslog() to DPRINTF().
+ Change initial socket boundary message from DEBUG-only msyslog() to DPRINTF().
+
+ BitKeeper/deleted/2b/regress.gen.c~aa03b6be21193937@1.2 +0 -0
+ Rename: sntp/libevent/test/regress.gen.c -> BitKeeper/deleted/2b/regress.gen.c~aa03b6be21193937
+
+ BitKeeper/deleted/31/Makefile.am~a4dc04c7982322c0@1.2 +0 -0
+ Rename: sntp/build-libevent/Makefile.am -> BitKeeper/deleted/31/Makefile.am~a4dc04c7982322c0
+
+ BitKeeper/deleted/5f/acx_pthread.m4~2200dd7a1a4e6b33@1.2 +0 -0
+ Rename: sntp/libevent/m4/acx_pthread.m4 -> BitKeeper/deleted/5f/acx_pthread.m4~2200dd7a1a4e6b33
+
+ BitKeeper/deleted/67/regress.gen.h~23d0c5b9df595958@1.2 +0 -0
+ Rename: sntp/libevent/test/regress.gen.h -> BitKeeper/deleted/67/regress.gen.h~23d0c5b9df595958
+
+ BitKeeper/etc/ignore@1.78 +2 -0
+ added regress.gen.c regress.gen.h
+
+ ChangeLog@1.786 +19 -1
+ Convert sntp to libevent event-driven socket programming. Instead of
+ blocking name resolution and querying one NTP server at a time,
+ resolve server names and send NTP queries without blocking. Add
+ sntp command-line options to adjust timing and optionally wait for all
+ servers to respond instead of exiting after the first.
+ Move "can't write KoD file" warning from sntp shutdown to startup.
+ Import libevent 2.0.10-stable plus local patches as a tearoff, used
+ only if the target system lacks an installed libevent 2.0.9 or later.
+ Move blocking worker and resolver to libntp from ntpd.
+ Use threads rather than forked child processes for blocking worker
+ when possible. Override with configure --disable-thread-support.
+ Move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp, use them in sntp.
+ Test --without-sntp in flock-build script's -no-refclocks variety.
+ Avoid invoking config.status twice in a row in build script.
+ Move more m4sh tests needed by libntp to shared .m4 files.
+ Split up ntp_libntp.m4 into smaller, more specific subsets.
+ Enable gcc -Wcast-align, fix many instances of warnings when casting
+ a pointer to a more-strictly-aligned underlying type.
+
+
+ Makefile.am@1.105 +2 -23
+ SUBDIRS and DIST_SUBDIRS were identical, remove definition of DIST_SUBDIRS
+ and allow Automake to default it to SUBDIRS.
+ Add -I sntp/libevent/m4 to ACLOCAL_AMFLAGS to find openldap*.m4.
+
+ adjtimed/Makefile.am@1.10 +2 -2
+ enable pthreads build.
+
+ build@1.43 +5 -4
+ build: Do not invoke config.status unless Makefile is out of date.
+ Avoids re-running config.status right after configure ran it, which
+ triggers spurious am--remake because Makefile is newer than config.h
+
+ clockstuff/Makefile.am@1.17 +2 -2
+ enable pthreads build.
+
+ configure.ac@1.515 +41 -806
+ Split up ntp_lib.m4 into smaller, more specific subsets
+ Move AC_FUNC_FORK and AC_FUNC_ALLOCA to ntp_libntp.m4 along with move
+ of intres/blocking worker to libntp.
+ Move droproot configure test to libntp with intres.
+ Bump config.cache version stamps to account for cache-incompatible change
+ to librt detection.
+ Move more m4 code needed by libntp to sntp/m4/*.m4 from top-level configure.ac
+
+ deps-ver@1.5 +1 -1
+ bump deps-ver to avoid build breaks from moved source files.
+
+ flock-build@1.49 +2 -2
+ test --without-sntp in one of the flock-build variants
+
+ include/Makefile.am@1.44.1.1 +1 -0
+ rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+
+ include/intreswork.h@1.5 +11 -5
+ Move blocking worker and intres from ntpd to libntp.
+ rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+
+ include/intreswork.h@1.4 +0 -0
+ Rename: include/ntp_intres.h -> include/intreswork.h
+
+ include/libntp.h@1.2 +3 -1
+ use getdtablesize() if available and _SC_OPEN_MAX is not.
+
+ include/ntp_calendar.h@1.9 +2 -0
+ include time.h in ntp_calendar.h which uses struct tm.
+
+ include/ntp_control.h@1.57 +7 -2
+ Quiet ntp_control.c and ntp_request.c -Wcast-align warnings.
+
+ include/ntp_debug.h@1.4 +2 -1
+ Allow %m in DPRINTF
+
+ include/ntp_intres.h@1.1 +45 -0
+ Former ntp_intres.h renamed to intreswork.h.
+ New public interface header for intres, contents moved from ntpd.h.
+
+ include/ntp_intres.h@1.0 +0 -0
+
+ include/ntp_io.h@1.21 +4 -5
+ Move blocking worker and intres from ntpd to libntp.
+ Move close_all_beyond() and close_all_except() to libntp.
+
+ include/ntp_lists.h@1.8.1.1 +3 -3
+ Do not invoke (beforecur) test in LINK_SORT_SLIST with a previously-empty list.
+
+ include/ntp_machine.h@1.32 +1 -11
+ Nothing sets TIME_WITH_SYS_TIME, remove it.
+
+ include/ntp_refclock.h@1.29 +2 -17
+ Use void * for variant clock/unit pointers.
+ Remove duplicate LDISC_* definitions.
+
+ include/ntp_request.h@1.42 +26 -17
+ Quiet ntp_control.c and ntp_request.c -Wcast-align warnings.
+
+ include/ntp_rfc2553.h@1.38 +9 -0
+ Add copy_addrinfo() to copy a single addrinfo and pointed-to
+ constituents.
+
+ include/ntp_stdlib.h@1.57.1.1 +14 -3
+ Add more m*printf() varieties.
+ Move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp.
+
+ include/ntp_tty.h@1.5 +10 -10
+ Whitespace, imply maximum LDISC_ flag value with leading 0s.
+
+ include/ntp_unixtime.h@1.7.1.1 +6 -5
+ Several files comment that ntp_unixtime.h includes sys/time.h and
+ time.h, make it so.
+ Provide GETTIMEOFDAY() macro on systems with getclock() for sntp.
+
+
+ include/ntp_worker.h@1.2 +120 -10
+ Move blocking worker and intres from ntpd to libntp.
+ Be consistent about how blocking children go away:
+ 1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
+ 2. Child goes away quietly.
+ 3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
+ 4. Parent clears blocking_children entry for reuse.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+
+ include/ntp_workimpl.h@1.2 +6 -1
+ Move blocking worker and intres from ntpd to libntp.
+ Use pthreads for blocking worker rather than fork, if possible.
+
+ include/ntpd.h@1.159 +4 -61
+ Move blocking worker and intres from ntpd to libntp.
+ Rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+ Move close_all_beyond() and close_all_except() to libntp.
+
+ include/recvbuff.h@1.23 +1 -1
+ include ntp_net.h for sockaddr_u declaration
+
+ lib/isc/pthreads/mutex.c@1.2 +9 -0
+ Work with very first draft posix M:N threads on HP-UX 10.20
+
+ lib/isc/unix/ifiter_ioctl.c@1.30 +2 -2
+ lib/isc/unix/ifiter_ioctl.c:456: warning: cast increases required alignment of target type
+ lib/isc/unix/ifiter_ioctl.c:669: warning: cast increases required alignment of target type
+
+
+ lib/isc/unix/interfaceiter.c@1.20 +2 -2
+ lib/isc/unix/interfaceiter.c:83: warning: cast increases required alignment of target type
+ lib/isc/unix/interfaceiter.c:87: warning: cast increases required alignment of target type
+
+ libntp/Makefile.am@1.58.1.1 +43 -29
+ Move blocking worker and intres from ntpd to libntp.
+ Enable pthreads build.
+
+ libntp/a_md5encrypt.c@1.30 +1 -1
+ Use sizeof() rather than hard-coding in addr2refid().
+
+ libntp/caljulian.c@1.14 +5 -4
+ style only
+
+ libntp/humandate.c@1.10 +2 -1
+ whitespace
+
+ libntp/lib_strbuf.c@1.8 +2 -0
+ Make sure init_lib() is called before ssl_init() returns.
+
+ libntp/machines.c@1.23 +14 -32
+ use %m instead of strerror()
+
+ libntp/msyslog.c@1.35 +281 -0
+ Add more m*printf() varieties.
+ Move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp.
+ strip .exe from program name in init_logging().
+ Log new logfile name to syslog on switching, as we do when switching
+ from one logfile to another.
+
+ libntp/ntp_intres.c@1.93 +322 -122
+ Move blocking worker and intres from ntpd to libntp.
+ Rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+ Use freeaddrinfo() in blocking_getaddrinfo().
+ Use pthreads for blocking worker rather than fork, if possible.
+
+ libntp/ntp_intres.c@1.92 +0 -0
+ Rename: ntpd/ntp_intres.c -> libntp/ntp_intres.c
+
+ libntp/ntp_libopts.c@1.4 +18 -12
+ Quiet -Wcast-align warnings in ntpOptionProcess const-silliness workaround.
+
+ libntp/ntp_lineedit.c@1.11 +1 -2
+ use %m instead of strerror()
+
+ libntp/ntp_random.c@1.8 +20 -7
+ #ifdef away unused code that triggers alignment warnings.
+
+ libntp/ntp_rfc2553.c@1.45 +40 -1
+ Add copy_addrinfo() to copy a single addrinfo and pointed-to
+ constituents.
+
+ libntp/ntp_worker.c@1.4 +221 -36
+ Move blocking worker and intres from ntpd to libntp.
+ Rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+ Quiet worker process startup/shutdown.
+ Be consistent about how blocking children go away:
+ 1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
+ 2. Child goes away quietly.
+ 3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
+ 4. Parent clears blocking_children entry for reuse.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+
+ libntp/ntp_worker.c@1.3 +0 -0
+ Rename: ntpd/ntp_worker.c -> libntp/ntp_worker.c
+
+ libntp/socket.c@1.5 +6 -8
+ Change initial socket boundary message from DEBUG-only msyslog() to DPRINTF().
+
+ libntp/socktohost.c@1.13 +15 -2
+ Quiet -Wcast-align warning due to casting sockaddr * to sockaddr_u *
+
+ libntp/ssl_init.c@1.14 +17 -1
+ Free OpenSSL dynamic allocations atexit.
+ Make sure init_lib() is called before ssl_init() returns.
+
+ libntp/syssignal.c@1.12 +24 -9
+ quiet "signal_no_reset: signal 18 had flags 20000" on OpenSolaris,
+ adding SA_NOCLDSTOP to IGNORED_SA_FLAGS.
+ Enable pthreads build.
+
+ libntp/work_fork.c@1.7 +211 -148
+ Move blocking worker and intres from ntpd to libntp.
+ Move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp.
+ Do not complain of short read 0 of 24 on normal forked worker exit.
+ Be consistent about how blocking children go away:
+ 1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
+ 2. Child goes away quietly.
+ 3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
+ 4. Parent clears blocking_children entry for reuse.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+ Change "forked worker child (pid 0)" from msyslog() to DPRINTF().
+
+ libntp/work_fork.c@1.6 +0 -0
+ Rename: ntpd/work_fork.c -> libntp/work_fork.c
+
+ libntp/work_thread.c@1.5 +479 -179
+ Move blocking worker and intres from ntpd to libntp.
+ Be consistent about how blocking children go away:
+ 1. Parent requests them to go by closing pipe or CHILD_EXIT_REQ.
+ 2. Child goes away quietly.
+ 3. Parent sees them gone via broken resp pipe or CHILD_GONE_RESP.
+ 4. Parent clears blocking_children entry for reuse.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+ Work around cast discards volatile qualifier realloc'ing request and
+ response arrays.
+
+ libntp/work_thread.c@1.4 +0 -0
+ Rename: ntpd/work_thread.c -> libntp/work_thread.c
+
+ libparse/Makefile.am@1.24 +1 -1
+ Enable pthreads build.
+
+ libparse/parsesolaris.c@1.10 +6 -5
+ Silence cast increases required alignment warnings.
+
+ ntpd/Makefile.am@1.99 +11 -12
+ Move blocking worker and intres from ntpd to libntp.
+ Enable pthreads build.
+
+ ntpd/cmd_args.c@1.59 +4 -1
+ Make user and group string pointers distinct allocations.
+
+ ntpd/ntp_config.c@1.284 +17 -20
+ Use %m instead of strerror().
+ Rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+ Avoid "gai_error" shadowing warning using "gai_err" instead.
+
+ ntpd/ntp_control.c@1.161.1.1 +8 -8
+ Quiet ntp_control.c and ntp_request.c -Wcast-align warnings.
+
+ ntpd/ntp_io.c@1.348 +54 -221
+ Move blocking worker and intres from ntpd to libntp.
+ Move close_all_beyond() and close_all_except() to libntp.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Avoid -Wcast-align warnings in routing message handling.
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+
+ ntpd/ntp_request.c@1.103 +305 -358
+ Quiet ntp_control.c and ntp_request.c -Wcast-align warnings.
+ struct interface -> endpt.
+
+ ntpd/ntp_timer.c@1.63 +22 -9
+ Move blocking worker and intres from ntpd to libntp.
+ Generalize intres_timeout_req(), provide ntpd and sntp implementations.
+
+ ntpd/ntpd.c@1.121.1.1 +32 -226
+ move init_logging(), change_logfile(), and setup_logfile() from ntpd
+ to libntp.
+ free(user) before replacement estrdup().
+ Call INIT_SSL() early with other init_*() routines.
+
+ ntpd/refclock_acts.c@1.45.1.1 +12 -13
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_arbiter.c@1.19 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_arc.c@1.24 +9 -10
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_as2201.c@1.13.1.1 +6 -7
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_atom.c@1.62 +3 -3
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_bancomm.c@1.14 +5 -6
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_chronolog.c@1.12 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_chu.c@1.51 +20 -21
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_datum.c@1.16 +32 -127
+ Get rid of units array, follow common idioms.
+
+ ntpd/refclock_dumbclock.c@1.18 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_fg.c@1.13 +5 -5
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_gpsvme.c@1.9 +2 -2
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_heath.c@1.17 +2 -2
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_hopfpci.c@1.12 +3 -4
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_hopfser.c@1.15 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_hpgps.c@1.13 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_irig.c@1.35 +13 -13
+ valgrind warned of branch dependent on uninitialized value,
+ irig_decode()'s local syncdig.
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_jjy.c@1.22 +16 -16
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_jupiter.c@1.27 +28 -40
+ Use %m instead of strerror().
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_leitch.c@1.13 +2 -2
+ silence increased alignment requirement from pointer cast.
+
+ ntpd/refclock_msfees.c@1.15 +2 -2
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_mx4200.c@1.29 +18 -32
+ Use %m instead of strerror().
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_neoclock4x.c@1.20 +8 -8
+ Use %m instead of strerror().
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_nmea.c@1.59 +40 -28
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_oncore.c@1.92 +6 -6
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_palisade.c@1.38 +20 -17
+ Use %m instead of strerror().
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_parse.c@1.57 +9 -9
+ silence cast increases required alignment warning.
+
+ ntpd/refclock_pcf.c@1.12 +2 -2
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_pst.c@1.12 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_ripencc.c@1.16 +9 -10
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_shm.c@1.22 +9 -9
+ Use %m instead of strerror().
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_tpro.c@1.12 +5 -6
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_trak.c@1.11 +7 -8
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_true.c@1.17 +9 -10
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_ulink.c@1.16 +5 -5
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_wwv.c@1.74 +23 -27
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_wwvb.c@1.27 +9 -10
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpd/refclock_zyfer.c@1.8 +6 -6
+ nonfunctional:
+ Use rbufp->recv_peer instead of casting rbufp->recv_srcclock.
+ pp->unitptr is now void *, no cast needed.
+
+ ntpdate/Makefile.am@1.27 +4 -3
+ Enable pthreads build.
+
+ ntpdate/ntpdate.c@1.83 +19 -11
+ Avoid alignment warnings from casting sockaddr * to sockaddr_u *.
+
+ ntpdc/Makefile.am@1.57 +5 -4
+ Enable pthreads build.
+ Make $(PROGRAMS) depend solely on version.o, whose dependencies should
+ take care of the rest.
+
+ ntpdc/layout.std@1.11 +10 -2
+ Adjust to less-trivial ntp_request.h.
+
+ ntpdc/nl.pl.in@1.9 +8 -2
+ Adjust to less-trivial ntp_request.h.
+
+ ntpdc/ntpdc.c@1.94 +33 -40
+ Quiet -Wcast-align warnings.
+ JAN_1970 definition now provided by ntp_unixtime.h
+
+ ntpdc/ntpdc_ops.c@1.76 +55 -52
+ Avoid increased required alignment warnings casting pointers.
+
+ ntpq/Makefile.am@1.53 +5 -5
+ Enable pthreads build.
+ Make $(PROGRAMS) depend on version.o alone, its dependencies should
+ handle the rest.
+
+ ntpq/ntpq.c@1.130.1.1 +35 -26
+ Use %m instead of strerror().
+ Use freeaddrinfo() in ntpq's getnetnum().
+ Quiet -Wcast-align warnings.
+
+ ntpsnmpd/Makefile.am@1.25 +5 -4
+ Enable pthreads build.
+
+ parseutil/Makefile.am@1.14 +5 -3
+ Enable pthreads build.
+ pick up -lresolv, needed by dcfd, via LDADD_LIBNTP.
+
+ ports/winnt/include/ntp_iocompletionport.h@1.19 +3 -3
+ Move blocking worker and intres from ntpd to libntp.
+ Get rid of accessor for WaitableExitEventHandle.
+
+ ports/winnt/include/ntp_timer.h@1.7 +0 -4
+ Move blocking worker and intres from ntpd to libntp.
+
+ ports/winnt/libntp/win32_io.c@1.2 +3 -2
+ Use %m instead of strerror().
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.57 +92 -53
+ Move blocking worker and intres from ntpd to libntp.
+ Get rid of accessor for WaitableExitEventHandle.
+ Use pthreads for blocking worker rather than fork, if possible.
+
+ ports/winnt/ntpd/ntservice.c@1.27 +11 -13
+ Get rid of accessor for WaitableExitEventHandle.
+
+ ports/winnt/vc6/libntp.dsp@1.59.1.1 +24 -0
+ Move blocking worker and intres from ntpd to libntp.
+ rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+
+ ports/winnt/vc6/ntpd.dsp@1.53 +0 -20
+ Move blocking worker and intres from ntpd to libntp.
+
+ ports/winnt/vs2003/libntp.vcproj@1.17.1.1 +18 -90
+ Move blocking worker and intres from ntpd to libntp.
+ rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+
+ ports/winnt/vs2003/ntpd.vcproj@1.14 +0 -32
+ Move blocking worker and intres from ntpd to libntp.
+
+ ports/winnt/vs2005/libntp.vcproj@1.15.1.1 +24 -1404
+ Move blocking worker and intres from ntpd to libntp.
+ rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.14 +0 -34
+ Move blocking worker and intres from ntpd to libntp.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.36.1.1 +30 -2
+ Move blocking worker and intres from ntpd to libntp.
+ Rename former ntp_intres.h to intreswork.h, move intres public
+ interface declarations from ntpd.h to new ntp_intres.h.
+ Add lib/isc/win32/include/isc/mutex.h reference.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.38 +4 -1031
+ Move blocking worker and intres from ntpd to libntp.
+ Add refclock_wwv.c reference.
+
+ sntp/Makefile.am@1.53 +50 -16
+ Enable pthreads build.
+ Link against the smaller libevent_core.la which suits us since sntp
+ no longer uses evdns.
+ Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
+ libevent.
+
+ sntp/configure.ac@1.57 +12 -96
+ Split up ntp_lib.m4 into smaller, more specific subsets
+ Remove duplicate clock_gettime/clock_settime logic now in ntp_libntp.m4.
+ Bump config.cache version stamps to account for cache-incompatible change
+ to librt detection.
+ Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
+ libevent.
+ Move more m4 code needed by libntp to sntp/m4/*.m4 from top-level configure.ac
+
+ sntp/deps-ver@1.3 +1 -1
+ bump deps-ver to avoid build breaks from moved source files.
+
+ sntp/kod_management.c@1.26 +29 -15
+ Do not write_kod_db() work atexit in forked children.
+ Move "can't write KoD file" warning from sntp shutdown to startup.
+ Use pthreads for blocking worker rather than fork, if possible.
+ Add readonly arg to kod_init_kod_db() for tests
+
+ sntp/kod_management.h@1.10 +3 -2
+ Move "can't write KoD file" warning from sntp shutdown to startup.
+ Add readonly arg to kod_init_kod_db() for tests.
+
+ sntp/libevent/Makefile.am@1.2 +14 -6
+ make -lz depend on zlib.h
+ We always need the PTHREADS AM_CONDITIONAL. Use the OL check.
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.2 +2 -2
+ libevent upgrade
+
+ sntp/libevent/arc4random.c@1.2 +5 -1
+ update from upstream
+
+ sntp/libevent/configure.in@1.2 +137 -33
+ Attempt typical subpackage approach for libevent
+ IPv6 hackery
+ Update from upstream.
+ make -lz depend on zlib.h
+ Allow libevent's regress to be skipped in make check.
+ Detect gcc (ld) support for --gc-sections and use it if available along
+ with --fdata-sections and -ffunction-sections to omit unused code and
+ data.
+ Add openldap thread check, remove ACX_PTHREAD
+ upstream patch to quiet autoreconf warnings
+ http://levent.git.sourceforge.net/git/gitweb.cgi?p=levent/libevent;a=commit;h=f663112fa238a3f5a1bdfddfd26c17e625e182df
+ We always need the PTHREADS AM_CONDITIONAL. Use the OL check.
+
+ sntp/libevent/evdns.c@1.2 +4 -0
+ libevent upgrade
+
+ sntp/libevent/evport.c@1.2 +6 -0
+ libevent upgrade
+
+ sntp/libevent/evthread_pthread.c@1.2 +13 -1
+ Work with very first draft posix M:N threads on HP-UX 10.20
+
+ sntp/libevent/evutil.c@1.2 +44 -3
+ IPv6 hackery.
+ libevent upgrade.
+
+ sntp/libevent/http.c@1.2 +47 -6
+ libevent upgrade.
+
+ sntp/libevent/ipv6-internal.h@1.2 +9 -0
+ libevent upgrade
+
+ sntp/libevent/m4/LICENSE-OPENLDAP@1.1 +47 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent-subpkg/sntp/m4/LICENSE-OPENLDAP
+
+ sntp/libevent/m4/LICENSE-OPENLDAP@1.0 +0 -0
+
+ sntp/libevent/m4/openldap-thread-check.m4@1.1 +681 -0
+ AC_LANG update for openldap autoconf macros
+ Clean up AC_DEFINE and AC_DEFINE_UNQUOTED arg quoting.
+ preset ol_with_yielding_select=${ol_with_yielding_select-auto}
+ Also change tests to use x prefix as insurance against other issues.
+ Move PTHREAD_LIBS AC_SUBST to ntp_libntp.m4
+
+ sntp/libevent/m4/openldap-thread-check.m4@1.0 +0 -0
+
+ sntp/libevent/m4/openldap.m4@1.1 +1131 -0
+ AC_LANG_SOURCE: unknown language: _AC_LANG on 588
+ Clean up AC_DEFINE and AC_DEFINE_UNQUOTED arg quoting.
+
+ sntp/libevent/m4/openldap.m4@1.0 +0 -0
+
+ sntp/libevent/sample/Makefile.am@1.2 +1 -1
+ Detect gcc (ld) support for --gc-sections and use it if available along
+ with --fdata-sections and -ffunction-sections to omit unused code and
+ data.
+
+ sntp/libevent/sample/dns-example.c@1.2 +2 -0
+ libevent upgrade
+
+ sntp/libevent/sample/hello-world.c@1.2 +3 -0
+ hp-ux portability fix.
+
+ sntp/libevent/sample/http-server.c@1.2 +7 -0
+ libevent upgrade
+ portability
+
+ sntp/libevent/select.c@1.2 +27 -9
+ libevent upgrade
+
+ sntp/libevent/test/Makefile.am@1.2 +13 -8
+ Allow libevent's regress to be skipped in make check.
+ Detect gcc (ld) support for --gc-sections and use it if available along
+ with --fdata-sections and -ffunction-sections to omit unused code and
+ data.
+
+ sntp/libevent/test/bench_httpclient.c@1.2 +3 -0
+ portability
+
+ sntp/libevent/test/regress_dns.c@1.2 +2 -0
+ cleanup
+
+ sntp/libevent/test/regress_http.c@1.2 +5 -21
+ libevent upgrade
+
+ sntp/libevent/test/regress_listener.c@1.2 +3 -0
+ cleanup
+
+ sntp/libevent/test/regress_testutils.c@1.2 +2 -0
+ libevent upgrade
+
+
+ sntp/libevent/test/test-eof.c@1.2 +9 -3
+ Add a timeout for test-eof.c as it may hang under HP-UX 10.20.
+
+
+ sntp/libevent/test/test-ratelim.c@1.2 +5 -0
+ cleanup
+
+ sntp/libevent/test/test.sh@1.2 +10 -4
+ Allow libevent's regress to be skipped in make check.
+
+ sntp/libevent/util-internal.h@1.2 +23 -2
+ update
+ ---
+ libevent upgrade
+
+ sntp/log.c@1.20 +6 -10
+ Rename init_logging() to sntp_init_logging() to avoid libntp conflict.
+ Use msyslog common code relocated from ntpd.
+
+ sntp/log.h@1.11 +3 -1
+ Rename init_logging() to sntp_init_logging() to avoid libntp conflict.
+ Use msyslog common code relocated from ntpd.
+ Declare extern char *progname.
+
+ sntp/m4/ntp_bindir.m4@1.1 +31 -0
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+
+ sntp/m4/ntp_bindir.m4@1.0 +0 -0
+
+ sntp/m4/ntp_cacheversion.m4@1.12 +11 -9
+ Attempt to make better use of header comment space.
+
+ sntp/m4/ntp_compiler.m4@1.1 +124 -0
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+ Omit unused code with gcc and gnu LD of recent vintage.
+ Ask autoconf for c89 only, AC_PROG_CC_STDC now means c99.
+
+ sntp/m4/ntp_compiler.m4@1.0 +0 -0
+
+ sntp/m4/ntp_crosscompile.m4@1.1 +8 -0
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+
+ sntp/m4/ntp_crosscompile.m4@1.0 +0 -0
+
+ sntp/m4/ntp_debug.m4@1.1 +22 -0
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+
+ sntp/m4/ntp_debug.m4@1.0 +0 -0
+
+ sntp/m4/ntp_ipv6.m4@1.2 +127 -112
+ Strip unneeded checks from ntp_ipv6.m4:
+ for struct sockaddr_storage member ss_family
+ for struct sockaddr_storage member ss_len
+ for struct sockaddr_storage member __ss_len
+ Move things used by libntp from top-level configure.ac to NTP_IPV6
+
+ sntp/m4/ntp_libevent.m4@1.3 +82 -35
+ Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
+ libevent.
+ Remove contentious libevent-cfg sentinel files, modify libevent's
+ confgure args via $ac_configure_args.
+
+ sntp/m4/ntp_libntp.m4@1.4 +753 -156
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+ Move AC_FUNC_FORK and AC_FUNC_ALLOCA to ntp_libntp.m4 along with move
+ of intres/blocking worker to libntp.
+ Move droproot configure test to libntp with intres.
+ Enable pthreads build.
+ crib some pthread m4 from BIND for libisc
+ move clock_gettime/clock_settime earlier within NTP_LIBNTP
+ check for socketpair()
+ Move more m4 code needed by libntp to sntp/m4/*.m4 from top-level configure.ac
+
+ sntp/m4/ntp_sntp.m4@1.1 +29 -0
+ Split up ntp_lib.m4 into smaller, more specific subsets.
+
+ sntp/m4/ntp_sntp.m4@1.0 +0 -0
+
+ sntp/main.c@1.68 +820 -313
+ Use {step,adj}_systime from libntp. Use EX_* codes for exit status.
+ Switch sntp from evdns to blocking worker intres.
+ Make delay between queries to addresses resolved from same hostname
+ per-family in sntp, as ntpd won't consider our v4 and v6 source
+ addresses to be one remote rate-limit target.
+ use ntpOptionProcess() to get verbose --version output.
+ Use libevent log callback to redirect messages from stderr to msyslog()
+ enable libevent debug mode if sntp debug > 0
+ Issue a single read event for each socket, rather than one per query.
+ Do not attempt to read in socket callback for EV_TIMEOUT.
+ Be conservative in KoD response claim
+ Fix step/slew logic in sntp
+ sntp --headroom option (default 10ms) spaces queries.
+ Provide less-broken gettimeofday_cached()
+ Add support for --(no-)wait and -uctimeout
+ remove duplicate progname declaration (log.c has it).
+ add readonly arg to kod_init_kod_db() for tests
+ Use socketpair() instead of pipe() when available, as avoiding
+ EV_FEATURE_FDS allows libevent to use a faster backend on
+ systems like Linux without an O(1) backend that handles pipes.
+
+ sntp/main.h@1.6 +18 -16
+ Switch sntp from evdns to blocking worker intres.
+ More -Wcast-align warnings workarounds.
+
+ sntp/networking.c@1.57 +36 -51
+ Authentication and debug cleanup.
+ remove recvpkt(), its two parts now done separately in sock_cb()
+ Quiet -Wcast-align warnings.
+
+ sntp/networking.h@1.25 +7 -8
+ Quiet -Wcast-align warnings.
+
+ sntp/sntp-opts.c@1.124 +499 -145
+ generated file updates from sntp def file changes
+
+ sntp/sntp-opts.def@1.25 +51 -11
+ generated file updates from sntp def file changes
+
+ sntp/sntp-opts.h@1.124 +135 -68
+ generated file updates from sntp def file changes
+
+ sntp/sntp-opts.texi@1.124 +168 -88
+ generated file updates from sntp def file changes
+
+ sntp/sntp.1@1.124 +135 -60
+ generated file updates from sntp def file changes
+
+ sntp/sntp.html@1.124 +95 -30
+ generated file updates from sntp def file changes
+
+ sntp/tests/Makefile.am@1.20 +54 -45
+ Enable pthreads build.
+ Link against the smaller libevent_core.la which suits us since sntp
+ no longer uses evdns.
+ Use NTP_LIBEVENT m4sh macro to decide between installed and tearoff
+ libevent.
+ Pick up -lresolv from @LDADD_LIBNTP@,
+
+ sntp/tests/kodDatabase.cpp@1.3 +1 -1
+ Add readonly arg to kod_init_kod_db() for tests.
+
+ sntp/tests/kodFile.cpp@1.8 +3 -11
+ Add readonly arg to kod_init_kod_db() for tests -- prevents editing
+ test baseline input KoD files during make check.
+
+ sntp/tests/nameresolution.cpp@1.1 +171 -0
+ Move name resolution unit test code to nameresolution.cpp.
+
+ sntp/tests/nameresolution.cpp@1.0 +0 -0
+
+ sntp/tests/networking.cpp@1.8 +0 -166
+ Move name resolution unit test code to nameresolution.cpp.
+
+ sntp/tests/packetHandling.cpp@1.7 +58 -46
+ Change handle_pkt() args to include hostname.
+ Add readonly arg to kod_init_kod_db() for tests.
+
+ sntp/utilities.c@1.16 +5 -5
+ const-ify addrinfo_to_str()
+
+ sntp/utilities.h@1.10 +1 -1
+ const-ify addrinfo_to_str()
+
+ tests/libntp/Makefile.am@1.30.1.1 +8 -6
+ Enable pthreads build.
+
+ tests/libntp/clocktime.cpp@1.4 +19 -7
+ Reduce runtime of AlwaysInLimit by an order of magnitude.
+
+ util/Makefile.am@1.56 +9 -7
+ Enable pthreads build.
+ correct cut-n-paste reference to ntpq_OBJECTS, make $(PROGRAMS) depend
+ on version.o.
+
+ util/ntp-keygen.c@1.77 +0 -1
+ JAN_1970 definition provided by ntp_unixtime.h now
+
+ChangeSet@1.2422.1.61, 2011-02-19 03:29:55+00:00, davehart@shiny.ad.hartbrothers.com
+ Add INC_ALIGNED_PTR() macro to align pointers like malloc().
+
+ ChangeLog@1.784.1.21 +1 -0
+ Add INC_ALIGNED_PTR() macro to align pointers like malloc().
+
+ include/ntp_types.h@1.23 +26 -0
+ Add INC_ALIGNED_PTR() macro to align pointers like malloc().
+
+ ntpd/ntp_crypto.c@1.154 +16 -9
+ strdup() -> estrdup()
+
+ ntpd/ntp_proto.c@1.319 +11 -10
+ Add INC_ALIGNED_PTR() macro to align pointers like malloc().
+
+ ntpd/refclock_as2201.c@1.14 +2 -2
+ Use memcpy() after bounds check instead of strcpy().
+ Correct a different bounds check that was off by one.
+
+ sntp/tests_main.h@1.7 +3 -2
+ #include config.h before all others, system before lib/app.
+
+ChangeSet@1.2422.1.60, 2011-02-12 11:07:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P130
+ TAG: NTP_4_2_7P130
+
+ ChangeLog@1.784.1.20 +1 -0
+ NTP_4_2_7P130
+
+ clockstuff/clktest-opts.c@1.54 +2 -2
+ NTP_4_2_7P130
+
+ clockstuff/clktest-opts.h@1.54 +3 -3
+ NTP_4_2_7P130
+
+ ntpd/ntpd-opts.c@1.134 +2 -2
+ NTP_4_2_7P130
+
+ ntpd/ntpd-opts.h@1.134 +3 -3
+ NTP_4_2_7P130
+
+ ntpd/ntpd-opts.texi@1.132 +2 -2
+ NTP_4_2_7P130
+
+ ntpd/ntpd.1@1.132 +2 -2
+ NTP_4_2_7P130
+
+ ntpdc/ntpdc-opts.c@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpdc/ntpdc-opts.h@1.131 +3 -3
+ NTP_4_2_7P130
+
+ ntpdc/ntpdc-opts.texi@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpdc/ntpdc.1@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpq/ntpq-opts.c@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpq/ntpq-opts.h@1.131 +3 -3
+ NTP_4_2_7P130
+
+ ntpq/ntpq-opts.texi@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpq/ntpq.1@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.131 +3 -3
+ NTP_4_2_7P130
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.131 +2 -2
+ NTP_4_2_7P130
+
+ ntpsnmpd/ntpsnmpd.1@1.131 +2 -2
+ NTP_4_2_7P130
+
+ packageinfo.sh@1.132 +1 -1
+ NTP_4_2_7P130
+
+ sntp/sntp-opts.c@1.115.1.16 +2 -2
+ NTP_4_2_7P130
+
+ sntp/sntp-opts.h@1.115.1.16 +3 -3
+ NTP_4_2_7P130
+
+ sntp/sntp-opts.texi@1.115.1.16 +2 -2
+ NTP_4_2_7P130
+
+ sntp/sntp.1@1.115.1.16 +2 -2
+ NTP_4_2_7P130
+
+ sntp/sntp.html@1.115.1.16 +1 -1
+ NTP_4_2_7P130
+
+ util/ntp-keygen-opts.c@1.129 +2 -2
+ NTP_4_2_7P130
+
+ util/ntp-keygen-opts.h@1.129 +3 -3
+ NTP_4_2_7P130
+
+ util/ntp-keygen-opts.texi@1.132 +2 -2
+ NTP_4_2_7P130
+
+ util/ntp-keygen.1@1.132 +2 -2
+ NTP_4_2_7P130
+
+ChangeSet@1.2422.1.59, 2011-02-11 07:26:12-05:00, stenn@deacon.udel.edu
+ [Bug 1811] Update the download location in WHERE-TO-START
+
+ ChangeLog@1.784.1.19 +1 -0
+ [Bug 1811] Update the download location in WHERE-TO-START
+
+ WHERE-TO-START@1.9 +2 -1
+ [Bug 1811] Update the download location in WHERE-TO-START
+
+ChangeSet@1.2422.1.58, 2011-02-09 08:55:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P129
+ TAG: NTP_4_2_7P129
+
+ ChangeLog@1.784.1.18 +1 -0
+ NTP_4_2_7P129
+
+ clockstuff/clktest-opts.c@1.53 +2 -2
+ NTP_4_2_7P129
+
+ clockstuff/clktest-opts.h@1.53 +3 -3
+ NTP_4_2_7P129
+
+ ntpd/ntpd-opts.c@1.133 +2 -2
+ NTP_4_2_7P129
+
+ ntpd/ntpd-opts.h@1.133 +3 -3
+ NTP_4_2_7P129
+
+ ntpd/ntpd-opts.texi@1.131 +2 -2
+ NTP_4_2_7P129
+
+ ntpd/ntpd.1@1.131 +2 -2
+ NTP_4_2_7P129
+
+ ntpdc/ntpdc-opts.c@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpdc/ntpdc-opts.h@1.130 +3 -3
+ NTP_4_2_7P129
+
+ ntpdc/ntpdc-opts.texi@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpdc/ntpdc.1@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpq/ntpq-opts.c@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpq/ntpq-opts.h@1.130 +3 -3
+ NTP_4_2_7P129
+
+ ntpq/ntpq-opts.texi@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpq/ntpq.1@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.130 +3 -3
+ NTP_4_2_7P129
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.130 +2 -2
+ NTP_4_2_7P129
+
+ ntpsnmpd/ntpsnmpd.1@1.130 +2 -2
+ NTP_4_2_7P129
+
+ packageinfo.sh@1.131 +1 -1
+ NTP_4_2_7P129
+
+ sntp/sntp-opts.c@1.115.1.15 +2 -2
+ NTP_4_2_7P129
+
+ sntp/sntp-opts.h@1.115.1.15 +3 -3
+ NTP_4_2_7P129
+
+ sntp/sntp-opts.texi@1.115.1.15 +2 -2
+ NTP_4_2_7P129
+
+ sntp/sntp.1@1.115.1.15 +2 -2
+ NTP_4_2_7P129
+
+ sntp/sntp.html@1.115.1.15 +1 -1
+ NTP_4_2_7P129
+
+ util/ntp-keygen-opts.c@1.128 +2 -2
+ NTP_4_2_7P129
+
+ util/ntp-keygen-opts.h@1.128 +3 -3
+ NTP_4_2_7P129
+
+ util/ntp-keygen-opts.texi@1.131 +2 -2
+ NTP_4_2_7P129
+
+ util/ntp-keygen.1@1.131 +2 -2
+ NTP_4_2_7P129
+
+ChangeSet@1.2422.1.57, 2011-02-09 07:14:49+00:00, davehart@shiny.ad.hartbrothers.com
+ Add missing "break;" to ntp_control.c ctl_putsys() for caliberrs, used
+ by ntpq -c kerninfo introduced in 4.2.7p104.
+ Fix leak in ntp_control.c read_mru_list().
+
+ ChangeLog@1.784.1.17 +3 -0
+ Add missing "break;" to ntp_control.c ctl_putsys() for caliberrs, used
+ by ntpq -c kerninfo introduced in 4.2.7p104.
+ Fix leak in ntp_control.c read_mru_list().
+
+ include/ntp_assert.h@1.5 +7 -1
+ Attempt allowing Coverity to analyze our actual assertion paths.
+
+ include/ntp_lists.h@1.9 +4 -19
+ Correct bug in LINK_SORT_SLIST() with an empty list.
+
+ ntpd/ntp_control.c@1.162 +5 -2
+ Fix leak in ntp_control.c read_mru_list().
+ Add missing "break;" to ntp_control.c ctl_putsys() for caliberrs, used
+ by ntpq -c kerninfo introduced in 4.2.7p104.
+
+
+ ntpd/ntp_io.c@1.346.1.1 +5 -0
+ Do not attempt setsockopt() for unopened -1 descriptors.
+
+ ntpd/ntp_monitor.c@1.38 +4 -2
+ Add debug-only assertion of non-NULL argument to mon_reclaim_entry().
+
+ChangeSet@1.2422.1.56, 2011-01-30 11:40:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P128
+ TAG: NTP_4_2_7P128
+
+ ChangeLog@1.784.1.16 +1 -0
+ NTP_4_2_7P128
+
+ clockstuff/clktest-opts.c@1.52 +2 -2
+ NTP_4_2_7P128
+
+ clockstuff/clktest-opts.h@1.52 +3 -3
+ NTP_4_2_7P128
+
+ ntpd/ntpd-opts.c@1.132 +2 -2
+ NTP_4_2_7P128
+
+ ntpd/ntpd-opts.h@1.132 +3 -3
+ NTP_4_2_7P128
+
+ ntpd/ntpd-opts.texi@1.130 +2 -2
+ NTP_4_2_7P128
+
+ ntpd/ntpd.1@1.130 +2 -2
+ NTP_4_2_7P128
+
+ ntpdc/ntpdc-opts.c@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpdc/ntpdc-opts.h@1.129 +3 -3
+ NTP_4_2_7P128
+
+ ntpdc/ntpdc-opts.texi@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpdc/ntpdc.1@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpq/ntpq-opts.c@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpq/ntpq-opts.h@1.129 +3 -3
+ NTP_4_2_7P128
+
+ ntpq/ntpq-opts.texi@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpq/ntpq.1@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.129 +3 -3
+ NTP_4_2_7P128
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.129 +2 -2
+ NTP_4_2_7P128
+
+ ntpsnmpd/ntpsnmpd.1@1.129 +2 -2
+ NTP_4_2_7P128
+
+ packageinfo.sh@1.130 +1 -1
+ NTP_4_2_7P128
+
+ sntp/sntp-opts.c@1.115.1.14 +2 -2
+ NTP_4_2_7P128
+
+ sntp/sntp-opts.h@1.115.1.14 +3 -3
+ NTP_4_2_7P128
+
+ sntp/sntp-opts.texi@1.115.1.14 +2 -2
+ NTP_4_2_7P128
+
+ sntp/sntp.1@1.115.1.14 +2 -2
+ NTP_4_2_7P128
+
+ sntp/sntp.html@1.115.1.14 +1 -1
+ NTP_4_2_7P128
+
+ util/ntp-keygen-opts.c@1.127 +2 -2
+ NTP_4_2_7P128
+
+ util/ntp-keygen-opts.h@1.127 +3 -3
+ NTP_4_2_7P128
+
+ util/ntp-keygen-opts.texi@1.130 +2 -2
+ NTP_4_2_7P128
+
+ util/ntp-keygen.1@1.130 +2 -2
+ NTP_4_2_7P128
+
+ChangeSet@1.2422.1.55, 2011-01-29 23:06:16+00:00, davehart@shiny.ad.hartbrothers.com
+ * [Bug 1799] ntpq mrv crash.
+ * [Bug 1801] ntpq mreadvar requires prior association caching.
+
+ ChangeLog@1.784.1.15 +3 -1
+ * [Bug 1799] ntpq mrv crash.
+ * [Bug 1801] ntpq mreadvar requires prior association caching.
+ Correct p126 ChangeLog entry to refer to format_time_fraction().
+
+ ntpq/ntpq-subs.c@1.84 +26 -19
+ * [Bug 1799] ntpq mrv crash.
+ * [Bug 1801] ntpq mreadvar requires prior association caching.
+
+ChangeSet@1.2422.1.54, 2011-01-28 06:31:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P127
+ TAG: NTP_4_2_7P127
+
+ ChangeLog@1.784.1.14 +1 -0
+ NTP_4_2_7P127
+
+ clockstuff/clktest-opts.c@1.51 +2 -2
+ NTP_4_2_7P127
+
+ clockstuff/clktest-opts.h@1.51 +3 -3
+ NTP_4_2_7P127
+
+ ntpd/ntpd-opts.c@1.131 +2 -2
+ NTP_4_2_7P127
+
+ ntpd/ntpd-opts.h@1.131 +3 -3
+ NTP_4_2_7P127
+
+ ntpd/ntpd-opts.texi@1.129 +2 -2
+ NTP_4_2_7P127
+
+ ntpd/ntpd.1@1.129 +2 -2
+ NTP_4_2_7P127
+
+ ntpdc/ntpdc-opts.c@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpdc/ntpdc-opts.h@1.128 +3 -3
+ NTP_4_2_7P127
+
+ ntpdc/ntpdc-opts.texi@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpdc/ntpdc.1@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpq/ntpq-opts.c@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpq/ntpq-opts.h@1.128 +3 -3
+ NTP_4_2_7P127
+
+ ntpq/ntpq-opts.texi@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpq/ntpq.1@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.128 +3 -3
+ NTP_4_2_7P127
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.128 +2 -2
+ NTP_4_2_7P127
+
+ ntpsnmpd/ntpsnmpd.1@1.128 +2 -2
+ NTP_4_2_7P127
+
+ packageinfo.sh@1.129 +1 -1
+ NTP_4_2_7P127
+
+ sntp/sntp-opts.c@1.115.1.13 +2 -2
+ NTP_4_2_7P127
+
+ sntp/sntp-opts.h@1.115.1.13 +3 -3
+ NTP_4_2_7P127
+
+ sntp/sntp-opts.texi@1.115.1.13 +2 -2
+ NTP_4_2_7P127
+
+ sntp/sntp.1@1.115.1.13 +2 -2
+ NTP_4_2_7P127
+
+ sntp/sntp.html@1.115.1.13 +1 -1
+ NTP_4_2_7P127
+
+ util/ntp-keygen-opts.c@1.126 +2 -2
+ NTP_4_2_7P127
+
+ util/ntp-keygen-opts.h@1.126 +3 -3
+ NTP_4_2_7P127
+
+ util/ntp-keygen-opts.texi@1.129 +2 -2
+ NTP_4_2_7P127
+
+ util/ntp-keygen.1@1.129 +2 -2
+ NTP_4_2_7P127
+
+ChangeSet@1.2422.1.53, 2011-01-28 01:07:13-05:00, stenn@deacon.udel.edu
+ [Bug 1797] Restore stale timestamp check from the RANGEGATE cleanup
+
+ ChangeLog@1.784.1.13 +1 -0
+ [Bug 1797] Restore stale timestamp check from the RANGEGATE cleanup
+
+ ntpd/ntp_refclock.c@1.103 +3 -0
+ [Bug 1797] Restore stale timestamp check from the RANGEGATE cleanup
+
+ChangeSet@1.2422.1.52, 2011-01-27 10:28:37+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P126
+ TAG: NTP_4_2_7P126
+
+ ChangeLog@1.784.1.12 +1 -0
+ NTP_4_2_7P126
+
+ clockstuff/clktest-opts.c@1.50 +2 -2
+ NTP_4_2_7P126
+
+ clockstuff/clktest-opts.h@1.50 +3 -3
+ NTP_4_2_7P126
+
+ ntpd/ntpd-opts.c@1.130 +2 -2
+ NTP_4_2_7P126
+
+ ntpd/ntpd-opts.h@1.130 +3 -3
+ NTP_4_2_7P126
+
+ ntpd/ntpd-opts.texi@1.128 +2 -2
+ NTP_4_2_7P126
+
+ ntpd/ntpd.1@1.128 +2 -2
+ NTP_4_2_7P126
+
+ ntpdc/ntpdc-opts.c@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpdc/ntpdc-opts.h@1.127 +3 -3
+ NTP_4_2_7P126
+
+ ntpdc/ntpdc-opts.texi@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpdc/ntpdc.1@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpq/ntpq-opts.c@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpq/ntpq-opts.h@1.127 +3 -3
+ NTP_4_2_7P126
+
+ ntpq/ntpq-opts.texi@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpq/ntpq.1@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.127 +3 -3
+ NTP_4_2_7P126
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.127 +2 -2
+ NTP_4_2_7P126
+
+ ntpsnmpd/ntpsnmpd.1@1.127 +2 -2
+ NTP_4_2_7P126
+
+ packageinfo.sh@1.128 +1 -1
+ NTP_4_2_7P126
+
+ sntp/sntp-opts.c@1.115.1.12 +2 -2
+ NTP_4_2_7P126
+
+ sntp/sntp-opts.h@1.115.1.12 +3 -3
+ NTP_4_2_7P126
+
+ sntp/sntp-opts.texi@1.115.1.12 +2 -2
+ NTP_4_2_7P126
+
+ sntp/sntp.1@1.115.1.12 +2 -2
+ NTP_4_2_7P126
+
+ sntp/sntp.html@1.115.1.12 +1 -1
+ NTP_4_2_7P126
+
+ util/ntp-keygen-opts.c@1.125 +2 -2
+ NTP_4_2_7P126
+
+ util/ntp-keygen-opts.h@1.125 +3 -3
+ NTP_4_2_7P126
+
+ util/ntp-keygen-opts.texi@1.128 +2 -2
+ NTP_4_2_7P126
+
+ util/ntp-keygen.1@1.128 +2 -2
+ NTP_4_2_7P126
+
+ChangeSet@1.2422.1.51, 2011-01-27 01:38:59-05:00, stenn@deacon.udel.edu
+ Add entries for updates from Dave Hart
+
+ ChangeLog@1.784.1.11 +2 -0
+ Add entries for updates from Dave Hart
+
+ChangeSet@1.2422.9.3, 2011-01-26 19:39:27+00:00, davehart@shiny.ad.hartbrothers.com
+ silence signed overflow warning
+ mark isc_assertioncallback_t __attribute((__noreturn__))
+
+ include/ntp_stdlib.h@1.58 +9 -6
+ add __attribute((__noreturn__)) to __attribute__ compat header snippet.
+
+ lib/isc/assertions.c@1.5 +2 -1
+ mark default_callback() __attribute__ ((__noreturn__))
+
+ lib/isc/include/isc/assertions.h@1.5 +21 -1
+ Mark isc_assertioncallback_t __attribute((__noreturn__))
+
+ libntp/timetoa.c@1.4 +18 -16
+ silence warning from recent gcc:
+ libntp/timetoa.c:53:1: warning: assuming signed overflow does not occur when simplifying conditional to constant
+
+ ntpd/ntpd.c@1.122 +2 -1
+ mark assertion_failed() __attribute__ ((__noreturn__))
+
+ChangeSet@1.2422.9.2, 2011-01-26 17:03:48+00:00, davehart@shiny.ad.hartbrothers.com
+ Rename tests/libntp/t{val|spec}ops.cpp to time{val|spec}ops.cpp so
+ base filename matches tested source file, as with others.
+
+ tests/libntp/Makefile.am@1.33 +2 -2
+ Rename tests/libntp/t{val|spec}ops.cpp to time{val|spec}ops.cpp so
+ base filename matches tested source file, as with others.
+
+ tests/libntp/timespecops.cpp@1.6 +0 -0
+ Rename: tests/libntp/tspecops.cpp -> tests/libntp/timespecops.cpp
+
+ tests/libntp/timevalops.cpp@1.6 +0 -0
+ Rename: tests/libntp/tvalops.cpp -> tests/libntp/timevalops.cpp
+
+ChangeSet@1.2422.9.1, 2011-01-26 16:50:03+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix off-by-one bug in format_time_fraction() introduced by hart@ntp.org.
+ Remove abs(prec) <= 9 requirement from format_time_fraction().
+ Add more time{spec|val}_tostr() tests.
+
+ include/timetoa.h@1.3 +3 -5
+ remove abs(prec) <= 9 limitation from format_time_fraction()
+
+ libntp/timetoa.c@1.3 +18 -26
+ remove abs(prec) <= 9 limitation from format_time_fraction().
+ calculate fraclimit from prec rather than use powers of ten lookup table.
+ fixes off-by-one bug introduced by hart@ntp.org (COUNTOF(limit) should have
+ been COUNTOF(limit) - 1).
+
+ tests/libntp/tspecops.cpp@1.5 +3 -1
+ add more timespec_tostr() tests
+
+ tests/libntp/tvalops.cpp@1.5 +3 -1
+ add more timeval_tostr() tests
+
+ChangeSet@1.2422.1.49, 2011-01-26 10:31:57+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P125
+ TAG: NTP_4_2_7P125
+
+ ChangeLog@1.784.1.10 +1 -0
+ NTP_4_2_7P125
+
+ clockstuff/clktest-opts.c@1.49 +2 -2
+ NTP_4_2_7P125
+
+ clockstuff/clktest-opts.h@1.49 +3 -3
+ NTP_4_2_7P125
+
+ ntpd/ntpd-opts.c@1.129 +2 -2
+ NTP_4_2_7P125
+
+ ntpd/ntpd-opts.h@1.129 +3 -3
+ NTP_4_2_7P125
+
+ ntpd/ntpd-opts.texi@1.127 +2 -2
+ NTP_4_2_7P125
+
+ ntpd/ntpd.1@1.127 +2 -2
+ NTP_4_2_7P125
+
+ ntpdc/ntpdc-opts.c@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpdc/ntpdc-opts.h@1.126 +3 -3
+ NTP_4_2_7P125
+
+ ntpdc/ntpdc-opts.texi@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpdc/ntpdc.1@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpq/ntpq-opts.c@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpq/ntpq-opts.h@1.126 +3 -3
+ NTP_4_2_7P125
+
+ ntpq/ntpq-opts.texi@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpq/ntpq.1@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.126 +3 -3
+ NTP_4_2_7P125
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.126 +2 -2
+ NTP_4_2_7P125
+
+ ntpsnmpd/ntpsnmpd.1@1.126 +2 -2
+ NTP_4_2_7P125
+
+ packageinfo.sh@1.127 +1 -1
+ NTP_4_2_7P125
+
+ sntp/sntp-opts.c@1.115.1.11 +2 -2
+ NTP_4_2_7P125
+
+ sntp/sntp-opts.h@1.115.1.11 +3 -3
+ NTP_4_2_7P125
+
+ sntp/sntp-opts.texi@1.115.1.11 +2 -2
+ NTP_4_2_7P125
+
+ sntp/sntp.1@1.115.1.11 +2 -2
+ NTP_4_2_7P125
+
+ sntp/sntp.html@1.115.1.11 +1 -1
+ NTP_4_2_7P125
+
+ util/ntp-keygen-opts.c@1.124 +2 -2
+ NTP_4_2_7P125
+
+ util/ntp-keygen-opts.h@1.124 +3 -3
+ NTP_4_2_7P125
+
+ util/ntp-keygen-opts.texi@1.127 +2 -2
+ NTP_4_2_7P125
+
+ util/ntp-keygen.1@1.127 +2 -2
+ NTP_4_2_7P125
+
+ChangeSet@1.2422.8.3, 2011-01-26 03:07:53+00:00, davehart@shiny.ad.hartbrothers.com
+ Add new files to Windows build.
+ Fix make distcheck by distributing include/timetoa.h and
+ tests/libntp/timestructs.h
+
+ include/Makefile.am@1.45 +1 -0
+ distribute include/timetoa.h
+
+ include/timetoa.h@1.2 +0 -1
+ config.h should be included only once, first, by each .c file
+
+ libntp/timetoa.c@1.2 +21 -18
+ nonfunctional style cleanup
+
+ ports/winnt/vc6/libntp.dsp@1.60 +4 -0
+ add libntp/timetoa.c reference
+
+ ports/winnt/vs2003/libntp.vcproj@1.18 +5 -2
+ add libntp/timetoa.c reference
+
+ ports/winnt/vs2005/libntp.vcproj@1.16 +4 -0
+ add libntp/timetoa.c reference
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.37 +10 -2
+ add libntp/timetoa.c, include/timetoa.h references
+
+ tests/libntp/Makefile.am@1.32 +5 -2
+ distribute tests/libntp/timestructs.h
+
+ChangeSet@1.2422.8.2, 2011-01-25 22:04:11+01:00, jnperlin@hydra.localnet
+ fixed cut&paste error in tests/libntp/tvalops.cpp
+
+ tests/libntp/tvalops.cpp@1.4 +1 -1
+ fixed cut&paste error
+
+ChangeSet@1.2422.7.1, 2011-01-25 21:08:29+01:00, jnperlin@hydra.localnet
+ Refactoring of struct timeval string conversion, extended regression tests for struct timeval processing
+
+ include/timespecops.h@1.4 +1 -1
+ cleaner expression for normality test (leave optimisation to the optimiser)
+
+ include/timetoa.h@1.1 +85 -0
+ new module for string conversion of time_t related values
+
+ include/timetoa.h@1.0 +0 -0
+
+ include/timevalops.h@1.3 +1 -1
+ cleaner expression for normality test (leave optimisation to the optimiser)
+
+ libntp/Makefile.am@1.59 +1 -0
+ new module for string conversion of time_t related values
+
+ libntp/timetoa.c@1.1 +112 -0
+ new module for string conversion of time_t related values
+
+ libntp/timetoa.c@1.0 +0 -0
+
+ libntp/timevalops.c@1.6 +4 -58
+ moved string formatting stuff to 'timetoa.c'
+
+ tests/libntp/Makefile.am@1.31 +1 -0
+ timestruct.cpp added
+
+ tests/libntp/timestructs.cpp@1.1 +127 -0
+ new module for adapting / testing time-related structures (l_fp, struct timeval, struct timespec)
+
+ tests/libntp/timestructs.cpp@1.0 +0 -0
+
+ tests/libntp/timestructs.h@1.1 +159 -0
+ new module for adapting / testing time-related structures (l_fp, struct timeval, struct timespec)
+
+ tests/libntp/timestructs.h@1.0 +0 -0
+
+ tests/libntp/tvalops.cpp@1.3 +162 -141
+ moved useful code to timestructs.{h,cpp};
+ closeness of l_fp and timeval values tested by special predicate objects;
+ added some roundtrip tests;
+
+
+ChangeSet@1.2422.1.47, 2011-01-25 19:25:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1794] ntpq -c rv missing clk_wander information.
+ [Bug 1795] ntpq readvar does not display last variable.
+ bk rm libntp/tvtoa.c libntp/utvtoa.c
+ Thanks to Pearly for noticing these dead, nondistributed files in
+ the version control system.
+
+ BitKeeper/deleted/4a/tvtoa.c~3aed0663@1.5 +0 -0
+ Delete: libntp/tvtoa.c
+
+ BitKeeper/deleted/ee/utvtoa.c~3aed0663@1.5 +0 -0
+ Delete: libntp/utvtoa.c
+
+ ChangeLog@1.784.1.9 +2 -0
+ [Bug 1794] ntpq -c rv missing clk_wander information.
+ [Bug 1795] ntpq readvar does not display last variable.
+
+
+ ntpq/ntpq-subs.c@1.83 +12 -11
+ nonfunctional cleanup
+
+ ntpq/ntpq.c@1.131 +7 -6
+ [Bug 1794] ntpq -c rv missing clk_wander information.
+ [Bug 1795] ntpq readvar does not display last variable.
+
+
+ChangeSet@1.2422.1.46, 2011-01-25 11:16:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P124
+ TAG: NTP_4_2_7P124
+
+ ChangeLog@1.784.1.8 +1 -0
+ NTP_4_2_7P124
+
+ clockstuff/clktest-opts.c@1.48 +2 -2
+ NTP_4_2_7P124
+
+ clockstuff/clktest-opts.h@1.48 +3 -3
+ NTP_4_2_7P124
+
+ ntpd/ntpd-opts.c@1.128 +2 -2
+ NTP_4_2_7P124
+
+ ntpd/ntpd-opts.h@1.128 +3 -3
+ NTP_4_2_7P124
+
+ ntpd/ntpd-opts.texi@1.126 +2 -2
+ NTP_4_2_7P124
+
+ ntpd/ntpd.1@1.126 +2 -2
+ NTP_4_2_7P124
+
+ ntpdc/ntpdc-opts.c@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpdc/ntpdc-opts.h@1.125 +3 -3
+ NTP_4_2_7P124
+
+ ntpdc/ntpdc-opts.texi@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpdc/ntpdc.1@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpq/ntpq-opts.c@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpq/ntpq-opts.h@1.125 +3 -3
+ NTP_4_2_7P124
+
+ ntpq/ntpq-opts.texi@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpq/ntpq.1@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.125 +3 -3
+ NTP_4_2_7P124
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.125 +2 -2
+ NTP_4_2_7P124
+
+ ntpsnmpd/ntpsnmpd.1@1.125 +2 -2
+ NTP_4_2_7P124
+
+ packageinfo.sh@1.126 +1 -1
+ NTP_4_2_7P124
+
+ sntp/sntp-opts.c@1.115.1.10 +2 -2
+ NTP_4_2_7P124
+
+ sntp/sntp-opts.h@1.115.1.10 +3 -3
+ NTP_4_2_7P124
+
+ sntp/sntp-opts.texi@1.115.1.10 +2 -2
+ NTP_4_2_7P124
+
+ sntp/sntp.1@1.115.1.10 +2 -2
+ NTP_4_2_7P124
+
+ sntp/sntp.html@1.115.1.10 +1 -1
+ NTP_4_2_7P124
+
+ util/ntp-keygen-opts.c@1.123 +2 -2
+ NTP_4_2_7P124
+
+ util/ntp-keygen-opts.h@1.123 +3 -3
+ NTP_4_2_7P124
+
+ util/ntp-keygen-opts.texi@1.126 +2 -2
+ NTP_4_2_7P124
+
+ util/ntp-keygen.1@1.126 +2 -2
+ NTP_4_2_7P124
+
+ChangeSet@1.2422.1.45, 2011-01-24 22:35:18-05:00, stenn@deacon.udel.edu
+ On second thought...
+
+ sntp/Makefile.am@1.47.1.8 +1 -1
+ On second thought...
+
+ChangeSet@1.2422.1.44, 2011-01-24 22:05:31-05:00, stenn@deacon.udel.edu
+ sntp/Makefile.am needs any passed-in CFLAGS.
+
+ ChangeLog@1.784.1.7 +1 -0
+ sntp/Makefile.am needs any passed-in CFLAGS.
+
+ sntp/Makefile.am@1.47.1.7 +1 -1
+ sntp/Makefile.am needs any passed-in CFLAGS.
+
+ChangeSet@1.2422.1.43, 2011-01-24 11:19:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P123
+ TAG: NTP_4_2_7P123
+
+ ChangeLog@1.784.1.6 +1 -0
+ NTP_4_2_7P123
+
+ clockstuff/clktest-opts.c@1.47 +2 -2
+ NTP_4_2_7P123
+
+ clockstuff/clktest-opts.h@1.47 +3 -3
+ NTP_4_2_7P123
+
+ ntpd/ntpd-opts.c@1.127 +2 -2
+ NTP_4_2_7P123
+
+ ntpd/ntpd-opts.h@1.127 +3 -3
+ NTP_4_2_7P123
+
+ ntpd/ntpd-opts.texi@1.125 +2 -2
+ NTP_4_2_7P123
+
+ ntpd/ntpd.1@1.125 +2 -2
+ NTP_4_2_7P123
+
+ ntpdc/ntpdc-opts.c@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpdc/ntpdc-opts.h@1.124 +3 -3
+ NTP_4_2_7P123
+
+ ntpdc/ntpdc-opts.texi@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpdc/ntpdc.1@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpq/ntpq-opts.c@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpq/ntpq-opts.h@1.124 +3 -3
+ NTP_4_2_7P123
+
+ ntpq/ntpq-opts.texi@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpq/ntpq.1@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.124 +3 -3
+ NTP_4_2_7P123
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.124 +2 -2
+ NTP_4_2_7P123
+
+ ntpsnmpd/ntpsnmpd.1@1.124 +2 -2
+ NTP_4_2_7P123
+
+ packageinfo.sh@1.125 +1 -1
+ NTP_4_2_7P123
+
+ sntp/sntp-opts.c@1.115.1.9 +2 -2
+ NTP_4_2_7P123
+
+ sntp/sntp-opts.h@1.115.1.9 +3 -3
+ NTP_4_2_7P123
+
+ sntp/sntp-opts.texi@1.115.1.9 +2 -2
+ NTP_4_2_7P123
+
+ sntp/sntp.1@1.115.1.9 +2 -2
+ NTP_4_2_7P123
+
+ sntp/sntp.html@1.115.1.9 +1 -1
+ NTP_4_2_7P123
+
+ util/ntp-keygen-opts.c@1.122 +2 -2
+ NTP_4_2_7P123
+
+ util/ntp-keygen-opts.h@1.122 +3 -3
+ NTP_4_2_7P123
+
+ util/ntp-keygen-opts.texi@1.125 +2 -2
+ NTP_4_2_7P123
+
+ util/ntp-keygen.1@1.125 +2 -2
+ NTP_4_2_7P123
+
+ChangeSet@1.2422.1.42, 2011-01-23 12:08:42+01:00, jnperlin@hydra.localnet
+ [Bug 1788] tables in libntp/tvtots.c imprecise
+
+ ChangeLog@1.784.1.5 +1 -0
+ [Bug 1788] tables in libntp/tvtots.c imprecise; tables used long/u_long values instead of 'const u_int32'
+
+ clockstuff/chutest.c@1.5 +0 -12
+ removed unused declarations of conversion timestamp conversion tables
+
+ clockstuff/clktest.c@1.6 +0 -4
+ removed unused declarations of conversion timestamp conversion tables
+
+ include/ntp_unixtime.h@1.8 +8 -8
+ timestamp conversion tables type changed to 'const u_int32' arrays
+
+ libntp/msutotsf.c@1.4 +2 -2
+ table type changed to 'const u_int32' arrays
+
+ libntp/tstotv.c@1.4 +3 -3
+ table type changed to 'const u_int32' arrays
+
+ libntp/tvtots.c@1.4 +75 -75
+ values recalculated and table type changed to 'const u_int32' arrays
+
+ libparse/parse.c@1.14 +0 -4
+ removed unused declarations of conversion timestamp conversion tables
+
+ChangeSet@1.2422.1.41, 2011-01-22 11:28:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P122
+ TAG: NTP_4_2_7P122
+
+ ChangeLog@1.784.1.4 +1 -0
+ NTP_4_2_7P122
+
+ clockstuff/clktest-opts.c@1.46 +2 -2
+ NTP_4_2_7P122
+
+ clockstuff/clktest-opts.h@1.46 +3 -3
+ NTP_4_2_7P122
+
+ ntpd/ntpd-opts.c@1.126 +2 -2
+ NTP_4_2_7P122
+
+ ntpd/ntpd-opts.h@1.126 +3 -3
+ NTP_4_2_7P122
+
+ ntpd/ntpd-opts.texi@1.124 +2 -2
+ NTP_4_2_7P122
+
+ ntpd/ntpd.1@1.124 +2 -2
+ NTP_4_2_7P122
+
+ ntpdc/ntpdc-opts.c@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpdc/ntpdc-opts.h@1.123 +3 -3
+ NTP_4_2_7P122
+
+ ntpdc/ntpdc-opts.texi@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpdc/ntpdc.1@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpq/ntpq-opts.c@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpq/ntpq-opts.h@1.123 +3 -3
+ NTP_4_2_7P122
+
+ ntpq/ntpq-opts.texi@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpq/ntpq.1@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.123 +3 -3
+ NTP_4_2_7P122
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123 +2 -2
+ NTP_4_2_7P122
+
+ ntpsnmpd/ntpsnmpd.1@1.123 +2 -2
+ NTP_4_2_7P122
+
+ packageinfo.sh@1.124 +1 -1
+ NTP_4_2_7P122
+
+ sntp/sntp-opts.c@1.115.1.8 +2 -2
+ NTP_4_2_7P122
+
+ sntp/sntp-opts.h@1.115.1.8 +3 -3
+ NTP_4_2_7P122
+
+ sntp/sntp-opts.texi@1.115.1.8 +2 -2
+ NTP_4_2_7P122
+
+ sntp/sntp.1@1.115.1.8 +2 -2
+ NTP_4_2_7P122
+
+ sntp/sntp.html@1.115.1.8 +1 -1
+ NTP_4_2_7P122
+
+ util/ntp-keygen-opts.c@1.121 +2 -2
+ NTP_4_2_7P122
+
+ util/ntp-keygen-opts.h@1.121 +3 -3
+ NTP_4_2_7P122
+
+ util/ntp-keygen-opts.texi@1.124 +2 -2
+ NTP_4_2_7P122
+
+ util/ntp-keygen.1@1.124 +2 -2
+ NTP_4_2_7P122
+
+ChangeSet@1.2422.1.40, 2011-01-22 01:22:35-05:00, stenn@deacon.udel.edu
+ ACTS refclock cleanup from Dave Mills
+
+ ChangeLog@1.784.1.3 +1 -0
+ ACTS refclock cleanup from Dave Mills
+
+ ntpd/refclock_acts.c@1.46 +8 -17
+ ACTS refclock cleanup from Dave Mills
+
+ChangeSet@1.2422.1.39, 2011-01-22 01:16:02-05:00, stenn@deacon.udel.edu
+ Avoid shadowing the "group" global variable
+
+ ChangeLog@1.784.1.2 +1 -0
+ Avoid shadowing the "group" global variable
+
+ ntpd/ntp_proto.c@1.318 +8 -8
+ Avoid shadowing the "group" global variable
+
+ChangeSet@1.2422.1.38, 2011-01-21 11:15:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P121
+ TAG: NTP_4_2_7P121
+
+ ChangeLog@1.784.1.1 +1 -0
+ NTP_4_2_7P121
+
+ clockstuff/clktest-opts.c@1.45 +2 -2
+ NTP_4_2_7P121
+
+ clockstuff/clktest-opts.h@1.45 +3 -3
+ NTP_4_2_7P121
+
+ ntpd/ntpd-opts.c@1.125 +2 -2
+ NTP_4_2_7P121
+
+ ntpd/ntpd-opts.h@1.125 +3 -3
+ NTP_4_2_7P121
+
+ ntpd/ntpd-opts.texi@1.123 +2 -2
+ NTP_4_2_7P121
+
+ ntpd/ntpd.1@1.123 +2 -2
+ NTP_4_2_7P121
+
+ ntpdc/ntpdc-opts.c@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpdc/ntpdc-opts.h@1.122 +3 -3
+ NTP_4_2_7P121
+
+ ntpdc/ntpdc-opts.texi@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpdc/ntpdc.1@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpq/ntpq-opts.c@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpq/ntpq-opts.h@1.122 +3 -3
+ NTP_4_2_7P121
+
+ ntpq/ntpq-opts.texi@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpq/ntpq.1@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.122 +3 -3
+ NTP_4_2_7P121
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.122 +2 -2
+ NTP_4_2_7P121
+
+ ntpsnmpd/ntpsnmpd.1@1.122 +2 -2
+ NTP_4_2_7P121
+
+ packageinfo.sh@1.123 +1 -1
+ NTP_4_2_7P121
+
+ sntp/sntp-opts.c@1.115.1.7 +2 -2
+ NTP_4_2_7P121
+
+ sntp/sntp-opts.h@1.115.1.7 +3 -3
+ NTP_4_2_7P121
+
+ sntp/sntp-opts.texi@1.115.1.7 +2 -2
+ NTP_4_2_7P121
+
+ sntp/sntp.1@1.115.1.7 +2 -2
+ NTP_4_2_7P121
+
+ sntp/sntp.html@1.115.1.7 +1 -1
+ NTP_4_2_7P121
+
+ util/ntp-keygen-opts.c@1.120 +2 -2
+ NTP_4_2_7P121
+
+ util/ntp-keygen-opts.h@1.120 +3 -3
+ NTP_4_2_7P121
+
+ util/ntp-keygen-opts.texi@1.123 +2 -2
+ NTP_4_2_7P121
+
+ util/ntp-keygen.1@1.123 +2 -2
+ NTP_4_2_7P121
+
+ChangeSet@1.2422.1.37, 2011-01-21 01:36:18-05:00, stenn@deacon.udel.edu
+ [Bug 1786] Remove extra semicolon from ntp_proto.c
+
+ ChangeLog@1.784 +1 -0
+ [Bug 1786] Remove extra semicolon from ntp_proto.c
+
+ ntpd/ntp_proto.c@1.317 +1 -1
+ [Bug 1786] Remove extra semicolon from ntp_proto.c
+
+ChangeSet@1.2422.1.36, 2011-01-20 11:33:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P120
+ TAG: NTP_4_2_7P120
+
+ ChangeLog@1.783 +1 -0
+ NTP_4_2_7P120
+
+ clockstuff/clktest-opts.c@1.44 +2 -2
+ NTP_4_2_7P120
+
+ clockstuff/clktest-opts.h@1.44 +3 -3
+ NTP_4_2_7P120
+
+ ntpd/ntpd-opts.c@1.124 +2 -2
+ NTP_4_2_7P120
+
+ ntpd/ntpd-opts.h@1.124 +3 -3
+ NTP_4_2_7P120
+
+ ntpd/ntpd-opts.texi@1.122 +2 -2
+ NTP_4_2_7P120
+
+ ntpd/ntpd.1@1.122 +2 -2
+ NTP_4_2_7P120
+
+ ntpdc/ntpdc-opts.c@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpdc/ntpdc-opts.h@1.121 +3 -3
+ NTP_4_2_7P120
+
+ ntpdc/ntpdc-opts.texi@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpdc/ntpdc.1@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpq/ntpq-opts.c@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpq/ntpq-opts.h@1.121 +3 -3
+ NTP_4_2_7P120
+
+ ntpq/ntpq-opts.texi@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpq/ntpq.1@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.121 +3 -3
+ NTP_4_2_7P120
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.121 +2 -2
+ NTP_4_2_7P120
+
+ ntpsnmpd/ntpsnmpd.1@1.121 +2 -2
+ NTP_4_2_7P120
+
+ packageinfo.sh@1.122 +1 -1
+ NTP_4_2_7P120
+
+ sntp/sntp-opts.c@1.115.1.6 +2 -2
+ NTP_4_2_7P120
+
+ sntp/sntp-opts.h@1.115.1.6 +3 -3
+ NTP_4_2_7P120
+
+ sntp/sntp-opts.texi@1.115.1.6 +2 -2
+ NTP_4_2_7P120
+
+ sntp/sntp.1@1.115.1.6 +2 -2
+ NTP_4_2_7P120
+
+ sntp/sntp.html@1.115.1.6 +1 -1
+ NTP_4_2_7P120
+
+ util/ntp-keygen-opts.c@1.119 +2 -2
+ NTP_4_2_7P120
+
+ util/ntp-keygen-opts.h@1.119 +3 -3
+ NTP_4_2_7P120
+
+ util/ntp-keygen-opts.texi@1.122 +2 -2
+ NTP_4_2_7P120
+
+ util/ntp-keygen.1@1.122 +2 -2
+ NTP_4_2_7P120
+
+ChangeSet@1.2422.1.35, 2011-01-20 08:27:32+00:00, davehart@shiny.ad.hartbrothers.com
+ Change new timeval and timespec to string routines to use snprintf()
+ rather than hand-crafted conversion, avoid signed int overflow there.
+ Add configure support for SIZEOF_LONG_LONG to enable portable use of
+ snprintf() with time_t.
+
+ ChangeLog@1.782 +4 -3
+ Change new timeval and timespec to string routines to use snprintf()
+ rather than hand-crafted conversion, avoid signed int overflow there.
+ Add configure support for SIZEOF_LONG_LONG to enable portable use of
+ snprintf() with time_t.
+
+ configure.ac@1.512.1.1 +0 -44
+ move more m4 code to ntp_libntp.m4
+
+ libntp/timespecops.c@1.5 +2 -2
+ Change new timeval and timespec to string routines to use snprintf()
+ rather than hand-crafted conversion, avoid signed int overflow there.
+
+ libntp/timevalops.c@1.5 +2 -2
+ Change new timeval and timespec to string routines to use snprintf()
+ rather than hand-crafted conversion, avoid signed int overflow there.
+
+ ports/winnt/include/config.h@1.93 +3 -1
+ SIZEOF_LONG, SIZEOF_LONG_LONG definitions for Win32
+
+ sntp/configure.ac@1.50.1.5 +0 -42
+ move more m4 code to ntp_libntp.m4
+
+ sntp/m4/ntp_libntp.m4@1.1.1.1 +53 -0
+ Add configure support for SIZEOF_LONG_LONG to enable portable use of
+ snprintf() with time_t.
+
+
+ChangeSet@1.2462, 2011-01-20 03:07:50-05:00, stenn@psp-deb1.ntp.org
+ Import libevent
+
+ ChangeLog@1.780.1.1 +1 -0
+ Import libevent
+
+ChangeSet@1.2461, 2011-01-20 03:07:20-05:00, stenn@psp-deb1.ntp.org
+ Import libevent
+
+ BitKeeper/etc/ignore@1.77 +7 -7
+
+ sntp/libevent/ChangeLog@1.1 +951 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/ChangeLog
+
+ sntp/libevent/ChangeLog@1.0 +0 -0
+
+ sntp/libevent/Doxyfile@1.1 +244 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/Doxyfile
+
+ sntp/libevent/Doxyfile@1.0 +0 -0
+
+ sntp/libevent/LICENSE@1.1 +74 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/LICENSE
+
+ sntp/libevent/LICENSE@1.0 +0 -0
+
+ sntp/libevent/Makefile.am@1.1 +223 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/Makefile.am
+
+ sntp/libevent/Makefile.am@1.0 +0 -0
+
+ sntp/libevent/Makefile.nmake@1.1 +47 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/Makefile.nmake
+
+ sntp/libevent/Makefile.nmake@1.0 +0 -0
+
+ sntp/libevent/README@1.1 +152 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/README
+
+ sntp/libevent/README@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.1 +360 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/WIN32-Code/event2/event-config.h
+
+ sntp/libevent/WIN32-Code/event2/event-config.h@1.0 +0 -0
+
+ sntp/libevent/WIN32-Code/tree.h@1.1 +1354 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/WIN32-Code/tree.h
+
+ sntp/libevent/WIN32-Code/tree.h@1.0 +0 -0
+
+ sntp/libevent/arc4random.c@1.1 +534 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/arc4random.c
+
+ sntp/libevent/arc4random.c@1.0 +0 -0
+
+ sntp/libevent/autogen.sh@1.1 +15 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/autogen.sh
+
+ sntp/libevent/autogen.sh@1.0 +0 -0
+
+ sntp/libevent/buffer.c@1.1 +2985 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/buffer.c
+
+ sntp/libevent/buffer.c@1.0 +0 -0
+
+ sntp/libevent/buffer_iocp.c@1.1 +320 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/buffer_iocp.c
+
+ sntp/libevent/buffer_iocp.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent-internal.h@1.1 +392 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent-internal.h
+
+ sntp/libevent/bufferevent-internal.h@1.0 +0 -0
+
+ sntp/libevent/bufferevent.c@1.1 +842 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent.c
+
+ sntp/libevent/bufferevent.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_async.c@1.1 +655 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_async.c
+
+ sntp/libevent/bufferevent_async.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_filter.c@1.1 +509 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_filter.c
+
+ sntp/libevent/bufferevent_filter.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_openssl.c@1.1 +1345 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_openssl.c
+
+ sntp/libevent/bufferevent_openssl.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_pair.c@1.1 +333 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_pair.c
+
+ sntp/libevent/bufferevent_pair.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_ratelim.c@1.1 +980 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_ratelim.c
+
+ sntp/libevent/bufferevent_ratelim.c@1.0 +0 -0
+
+ sntp/libevent/bufferevent_sock.c@1.1 +689 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/bufferevent_sock.c
+
+ sntp/libevent/bufferevent_sock.c@1.0 +0 -0
+
+ sntp/libevent/changelist-internal.h@1.1 +101 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/changelist-internal.h
+
+ sntp/libevent/changelist-internal.h@1.0 +0 -0
+
+ sntp/libevent/compat/sys/queue.h@1.1 +488 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/compat/sys/queue.h
+
+ sntp/libevent/compat/sys/queue.h@1.0 +0 -0
+
+ sntp/libevent/configure.in@1.1 +603 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/configure.in
+
+ sntp/libevent/configure.in@1.0 +0 -0
+
+ sntp/libevent/defer-internal.h@1.1 +100 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/defer-internal.h
+
+ sntp/libevent/defer-internal.h@1.0 +0 -0
+
+ sntp/libevent/devpoll.c@1.1 +306 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/devpoll.c
+
+ sntp/libevent/devpoll.c@1.0 +0 -0
+
+ sntp/libevent/epoll.c@1.1 +470 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/epoll.c
+
+ sntp/libevent/epoll.c@1.0 +0 -0
+
+ sntp/libevent/epoll_sub.c@1.1 +52 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/epoll_sub.c
+
+ sntp/libevent/epoll_sub.c@1.0 +0 -0
+
+ sntp/libevent/evbuffer-internal.h@1.1 +277 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evbuffer-internal.h
+
+ sntp/libevent/evbuffer-internal.h@1.0 +0 -0
+
+ sntp/libevent/evdns.c@1.1 +4544 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evdns.c
+
+ sntp/libevent/evdns.c@1.0 +0 -0
+
+ sntp/libevent/evdns.h@1.1 +35 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evdns.h
+
+ sntp/libevent/evdns.h@1.0 +0 -0
+
+ sntp/libevent/event-internal.h@1.1 +339 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event-internal.h
+
+ sntp/libevent/event-internal.h@1.0 +0 -0
+
+ sntp/libevent/event.c@1.1 +2794 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event.c
+
+ sntp/libevent/event.c@1.0 +0 -0
+
+ sntp/libevent/event.h@1.1 +206 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event.h
+
+ sntp/libevent/event.h@1.0 +0 -0
+
+ sntp/libevent/event_iocp.c@1.1 +286 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event_iocp.c
+
+ sntp/libevent/event_iocp.c@1.0 +0 -0
+
+ sntp/libevent/event_rpcgen.py@1.1 +1716 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event_rpcgen.py
+
+ sntp/libevent/event_rpcgen.py@1.0 +0 -0
+
+ sntp/libevent/event_tagging.c@1.1 +590 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/event_tagging.c
+
+ sntp/libevent/event_tagging.c@1.0 +0 -0
+
+ sntp/libevent/evhttp.h@1.1 +35 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evhttp.h
+
+ sntp/libevent/evhttp.h@1.0 +0 -0
+
+ sntp/libevent/evmap-internal.h@1.1 +90 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evmap-internal.h
+
+ sntp/libevent/evmap-internal.h@1.0 +0 -0
+
+ sntp/libevent/evmap.c@1.1 +724 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evmap.c
+
+ sntp/libevent/evmap.c@1.0 +0 -0
+
+ sntp/libevent/evport.c@1.1 +460 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evport.c
+
+ sntp/libevent/evport.c@1.0 +0 -0
+
+ sntp/libevent/evrpc-internal.h@1.1 +204 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evrpc-internal.h
+
+ sntp/libevent/evrpc-internal.h@1.0 +0 -0
+
+ sntp/libevent/evrpc.c@1.1 +1163 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evrpc.c
+
+ sntp/libevent/evrpc.c@1.0 +0 -0
+
+ sntp/libevent/evrpc.h@1.1 +35 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evrpc.h
+
+ sntp/libevent/evrpc.h@1.0 +0 -0
+
+ sntp/libevent/evsignal-internal.h@1.1 +64 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evsignal-internal.h
+
+ sntp/libevent/evsignal-internal.h@1.0 +0 -0
+
+ sntp/libevent/evthread-internal.h@1.1 +354 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evthread-internal.h
+
+ sntp/libevent/evthread-internal.h@1.0 +0 -0
+
+ sntp/libevent/evthread.c@1.1 +341 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evthread.c
+
+ sntp/libevent/evthread.c@1.0 +0 -0
+
+ sntp/libevent/evthread_pthread.c@1.1 +189 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evthread_pthread.c
+
+ sntp/libevent/evthread_pthread.c@1.0 +0 -0
+
+ sntp/libevent/evthread_win32.c@1.1 +335 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evthread_win32.c
+
+ sntp/libevent/evthread_win32.c@1.0 +0 -0
+
+ sntp/libevent/evutil.c@1.1 +2095 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evutil.c
+
+ sntp/libevent/evutil.c@1.0 +0 -0
+
+ sntp/libevent/evutil.h@1.1 +31 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evutil.h
+
+ sntp/libevent/evutil.h@1.0 +0 -0
+
+ sntp/libevent/evutil_rand.c@1.1 +126 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/evutil_rand.c
+
+ sntp/libevent/evutil_rand.c@1.0 +0 -0
+
+ sntp/libevent/ht-internal.h@1.1 +486 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/ht-internal.h
+
+ sntp/libevent/ht-internal.h@1.0 +0 -0
+
+ sntp/libevent/http-internal.h@1.1 +195 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/http-internal.h
+
+ sntp/libevent/http-internal.h@1.0 +0 -0
+
+ sntp/libevent/http.c@1.1 +4315 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/http.c
+
+ sntp/libevent/http.c@1.0 +0 -0
+
+ sntp/libevent/include/Makefile.am@1.1 +34 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/Makefile.am
+
+ sntp/libevent/include/Makefile.am@1.0 +0 -0
+
+ sntp/libevent/include/event2/buffer.h@1.1 +736 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/buffer.h
+
+ sntp/libevent/include/event2/buffer.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/buffer_compat.h@1.1 +110 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/buffer_compat.h
+
+ sntp/libevent/include/event2/buffer_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/bufferevent.h@1.1 +759 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/bufferevent.h
+
+ sntp/libevent/include/event2/bufferevent.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/bufferevent_compat.h@1.1 +96 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/bufferevent_compat.h
+
+ sntp/libevent/include/event2/bufferevent_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/bufferevent_ssl.h@1.1 +78 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/bufferevent_ssl.h
+
+ sntp/libevent/include/event2/bufferevent_ssl.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/bufferevent_struct.h@1.1 +113 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/bufferevent_struct.h
+
+ sntp/libevent/include/event2/bufferevent_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/dns.h@1.1 +639 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/dns.h
+
+ sntp/libevent/include/event2/dns.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/dns_compat.h@1.1 +335 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/dns_compat.h
+
+ sntp/libevent/include/event2/dns_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/dns_struct.h@1.1 +80 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/dns_struct.h
+
+ sntp/libevent/include/event2/dns_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/event.h@1.1 +785 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/event.h
+
+ sntp/libevent/include/event2/event.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/event_compat.h@1.1 +324 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/event_compat.h
+
+ sntp/libevent/include/event2/event_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/event_struct.h@1.1 +139 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/event_struct.h
+
+ sntp/libevent/include/event2/event_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/http.h@1.1 +828 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/http.h
+
+ sntp/libevent/include/event2/http.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/http_compat.h@1.1 +90 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/http_compat.h
+
+ sntp/libevent/include/event2/http_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/http_struct.h@1.1 +130 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/http_struct.h
+
+ sntp/libevent/include/event2/http_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/keyvalq_struct.h@1.1 +80 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/keyvalq_struct.h
+
+ sntp/libevent/include/event2/keyvalq_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/listener.h@1.1 +143 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/listener.h
+
+ sntp/libevent/include/event2/listener.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/rpc.h@1.1 +596 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/rpc.h
+
+ sntp/libevent/include/event2/rpc.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/rpc_compat.h@1.1 +61 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/rpc_compat.h
+
+ sntp/libevent/include/event2/rpc_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/rpc_struct.h@1.1 +100 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/rpc_struct.h
+
+ sntp/libevent/include/event2/rpc_struct.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/tag.h@1.1 +124 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/tag.h
+
+ sntp/libevent/include/event2/tag.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/tag_compat.h@1.1 +39 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/tag_compat.h
+
+ sntp/libevent/include/event2/tag_compat.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/thread.h@1.1 +225 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/thread.h
+
+ sntp/libevent/include/event2/thread.h@1.0 +0 -0
+
+ sntp/libevent/include/event2/util.h@1.1 +593 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/include/event2/util.h
+
+ sntp/libevent/include/event2/util.h@1.0 +0 -0
+
+ sntp/libevent/iocp-internal.h@1.1 +201 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/iocp-internal.h
+
+ sntp/libevent/iocp-internal.h@1.0 +0 -0
+
+ sntp/libevent/ipv6-internal.h@1.1 +72 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/ipv6-internal.h
+
+ sntp/libevent/ipv6-internal.h@1.0 +0 -0
+
+ sntp/libevent/kqueue.c@1.1 +415 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/kqueue.c
+
+ sntp/libevent/kqueue.c@1.0 +0 -0
+
+ sntp/libevent/libevent.pc.in@1.1 +16 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/libevent.pc.in
+
+ sntp/libevent/libevent.pc.in@1.0 +0 -0
+
+ sntp/libevent/libevent_openssl.pc.in@1.1 +16 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/libevent_openssl.pc.in
+
+ sntp/libevent/libevent_openssl.pc.in@1.0 +0 -0
+
+ sntp/libevent/libevent_pthreads.pc.in@1.1 +16 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/libevent_pthreads.pc.in
+
+ sntp/libevent/libevent_pthreads.pc.in@1.0 +0 -0
+
+ sntp/libevent/listener.c@1.1 +865 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/listener.c
+
+ sntp/libevent/listener.c@1.0 +0 -0
+
+ sntp/libevent/log-internal.h@1.1 +59 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/log-internal.h
+
+ sntp/libevent/log-internal.h@1.0 +0 -0
+
+ sntp/libevent/log.c@1.1 +224 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/log.c
+
+ sntp/libevent/log.c@1.0 +0 -0
+
+ sntp/libevent/m4/acx_pthread.m4@1.1 +279 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/m4/acx_pthread.m4
+
+ sntp/libevent/m4/acx_pthread.m4@1.0 +0 -0
+
+ sntp/libevent/minheap-internal.h@1.1 +160 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/minheap-internal.h
+
+ sntp/libevent/minheap-internal.h@1.0 +0 -0
+
+ sntp/libevent/mm-internal.h@1.1 +61 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/mm-internal.h
+
+ sntp/libevent/mm-internal.h@1.0 +0 -0
+
+ sntp/libevent/poll.c@1.1 +333 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/poll.c
+
+ sntp/libevent/poll.c@1.0 +0 -0
+
+ sntp/libevent/ratelim-internal.h@1.1 +105 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/ratelim-internal.h
+
+ sntp/libevent/ratelim-internal.h@1.0 +0 -0
+
+ sntp/libevent/sample/Makefile.am@1.1 +23 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/Makefile.am
+
+ sntp/libevent/sample/Makefile.am@1.0 +0 -0
+
+ sntp/libevent/sample/dns-example.c@1.1 +221 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/dns-example.c
+
+ sntp/libevent/sample/dns-example.c@1.0 +0 -0
+
+ sntp/libevent/sample/event-test.c@1.1 +143 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/event-test.c
+
+ sntp/libevent/sample/event-test.c@1.0 +0 -0
+
+ sntp/libevent/sample/hello-world.c@1.1 +138 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/hello-world.c
+
+ sntp/libevent/sample/hello-world.c@1.0 +0 -0
+
+ sntp/libevent/sample/http-server.c@1.1 +392 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/http-server.c
+
+ sntp/libevent/sample/http-server.c@1.0 +0 -0
+
+ sntp/libevent/sample/le-proxy.c@1.1 +278 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/le-proxy.c
+
+ sntp/libevent/sample/le-proxy.c@1.0 +0 -0
+
+ sntp/libevent/sample/signal-test.c@1.1 +77 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/signal-test.c
+
+ sntp/libevent/sample/signal-test.c@1.0 +0 -0
+
+ sntp/libevent/sample/time-test.c@1.1 +108 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/sample/time-test.c
+
+ sntp/libevent/sample/time-test.c@1.0 +0 -0
+
+ sntp/libevent/select.c@1.1 +311 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/select.c
+
+ sntp/libevent/select.c@1.0 +0 -0
+
+ sntp/libevent/signal.c@1.1 +438 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/signal.c
+
+ sntp/libevent/signal.c@1.0 +0 -0
+
+ sntp/libevent/strlcpy-internal.h@1.1 +21 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/strlcpy-internal.h
+
+ sntp/libevent/strlcpy-internal.h@1.0 +0 -0
+
+ sntp/libevent/strlcpy.c@1.1 +74 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/strlcpy.c
+
+ sntp/libevent/strlcpy.c@1.0 +0 -0
+
+ sntp/libevent/test/Makefile.am@1.1 +74 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/Makefile.am
+
+ sntp/libevent/test/Makefile.am@1.0 +0 -0
+
+ sntp/libevent/test/Makefile.nmake@1.1 +56 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/Makefile.nmake
+
+ sntp/libevent/test/Makefile.nmake@1.0 +0 -0
+
+ sntp/libevent/test/bench.c@1.1 +191 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/bench.c
+
+ sntp/libevent/test/bench.c@1.0 +0 -0
+
+ sntp/libevent/test/bench_cascade.c@1.1 +169 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/bench_cascade.c
+
+ sntp/libevent/test/bench_cascade.c@1.0 +0 -0
+
+ sntp/libevent/test/bench_http.c@1.1 +178 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/bench_http.c
+
+ sntp/libevent/test/bench_http.c@1.0 +0 -0
+
+ sntp/libevent/test/bench_httpclient.c@1.1 +216 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/bench_httpclient.c
+
+ sntp/libevent/test/bench_httpclient.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.c@1.1 +2339 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress.c
+
+ sntp/libevent/test/regress.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.gen.c@1.1 +1225 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress.gen.c
+
+ sntp/libevent/test/regress.gen.c@1.0 +0 -0
+
+ sntp/libevent/test/regress.gen.h@1.1 +207 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress.gen.h
+
+ sntp/libevent/test/regress.gen.h@1.0 +0 -0
+
+ sntp/libevent/test/regress.h@1.1 +125 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress.h
+
+ sntp/libevent/test/regress.h@1.0 +0 -0
+
+ sntp/libevent/test/regress.rpc@1.1 +25 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress.rpc
+
+ sntp/libevent/test/regress.rpc@1.0 +0 -0
+
+ sntp/libevent/test/regress_buffer.c@1.1 +1567 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_buffer.c
+
+ sntp/libevent/test/regress_buffer.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_bufferevent.c@1.1 +835 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_bufferevent.c
+
+ sntp/libevent/test/regress_bufferevent.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_dns.c@1.1 +1706 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_dns.c
+
+ sntp/libevent/test/regress_dns.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_et.c@1.1 +197 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_et.c
+
+ sntp/libevent/test/regress_et.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_http.c@1.1 +3542 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_http.c
+
+ sntp/libevent/test/regress_http.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_iocp.c@1.1 +352 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_iocp.c
+
+ sntp/libevent/test/regress_iocp.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_listener.c@1.1 +211 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_listener.c
+
+ sntp/libevent/test/regress_listener.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_main.c@1.1 +392 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_main.c
+
+ sntp/libevent/test/regress_main.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_minheap.c@1.1 +98 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_minheap.c
+
+ sntp/libevent/test/regress_minheap.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_rpc.c@1.1 +884 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_rpc.c
+
+ sntp/libevent/test/regress_rpc.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_ssl.c@1.1 +448 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_ssl.c
+
+ sntp/libevent/test/regress_ssl.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_testutils.c@1.1 +196 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_testutils.c
+
+ sntp/libevent/test/regress_testutils.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_testutils.h@1.1 +66 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_testutils.h
+
+ sntp/libevent/test/regress_testutils.h@1.0 +0 -0
+
+ sntp/libevent/test/regress_thread.c@1.1 +511 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_thread.c
+
+ sntp/libevent/test/regress_thread.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_util.c@1.1 +1076 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_util.c
+
+ sntp/libevent/test/regress_util.c@1.0 +0 -0
+
+ sntp/libevent/test/regress_zlib.c@1.1 +322 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/regress_zlib.c
+
+ sntp/libevent/test/regress_zlib.c@1.0 +0 -0
+
+ sntp/libevent/test/test-changelist.c@1.1 +198 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-changelist.c
+
+ sntp/libevent/test/test-changelist.c@1.0 +0 -0
+
+ sntp/libevent/test/test-eof.c@1.1 +96 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-eof.c
+
+ sntp/libevent/test/test-eof.c@1.0 +0 -0
+
+ sntp/libevent/test/test-init.c@1.1 +44 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-init.c
+
+ sntp/libevent/test/test-init.c@1.0 +0 -0
+
+ sntp/libevent/test/test-ratelim.c@1.1 +456 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-ratelim.c
+
+ sntp/libevent/test/test-ratelim.c@1.0 +0 -0
+
+ sntp/libevent/test/test-time.c@1.1 +92 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-time.c
+
+ sntp/libevent/test/test-time.c@1.0 +0 -0
+
+ sntp/libevent/test/test-weof.c@1.1 +96 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test-weof.c
+
+ sntp/libevent/test/test-weof.c@1.0 +0 -0
+
+ sntp/libevent/test/test.sh@1.1 +156 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/test.sh
+
+ sntp/libevent/test/test.sh@1.0 +0 -0
+
+ sntp/libevent/test/tinytest.c@1.1 +383 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/tinytest.c
+
+ sntp/libevent/test/tinytest.c@1.0 +0 -0
+
+ sntp/libevent/test/tinytest.h@1.1 +87 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/tinytest.h
+
+ sntp/libevent/test/tinytest.h@1.0 +0 -0
+
+ sntp/libevent/test/tinytest_local.h@1.1 +9 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/tinytest_local.h
+
+ sntp/libevent/test/tinytest_local.h@1.0 +0 -0
+
+ sntp/libevent/test/tinytest_macros.h@1.1 +184 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/test/tinytest_macros.h
+
+ sntp/libevent/test/tinytest_macros.h@1.0 +0 -0
+
+ sntp/libevent/util-internal.h@1.1 +256 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/util-internal.h
+
+ sntp/libevent/util-internal.h@1.0 +0 -0
+
+ sntp/libevent/whatsnew-2.0.txt@1.1 +609 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/whatsnew-2.0.txt
+
+ sntp/libevent/whatsnew-2.0.txt@1.0 +0 -0
+
+ sntp/libevent/win32select.c@1.1 +376 -0
+ BitKeeper file /home/stenn/ntp-dev-libevent/sntp/libevent/win32select.c
+
+ sntp/libevent/win32select.c@1.0 +0 -0
+
+ChangeSet@1.2460, 2011-01-20 02:57:31-05:00, stenn@psp-deb1.ntp.org
+ Add #ifdef DEBUG lines to sntp/main.c
+
+ sntp/main.c@1.67 +16 -0
+ Add #ifdef DEBUG lines to sntp/main.c
+
+ChangeSet@1.2422.1.34, 2011-01-19 20:43:27+01:00, jnperlin@hydra.localnet
+ changed timeval / timespec string conversion (snprintf() format strings for time_t vs. int / long / long long; avoid signed integer overflow)
+
+ ChangeLog@1.781 +3 -0
+ struct timeval / struct timespec string formatting changes
+
+ libntp/timespecops.c@1.4 +79 -85
+ changed struct timespec string conversion (snprintf() format for time_t)
+
+ libntp/timevalops.c@1.4 +82 -56
+ changed struct timeval string conversion (snprintf() format for time_t)
+
+ChangeSet@1.2422.1.33, 2011-01-19 12:26:17+00:00, davehart@shiny.ad.hartbrothers.com
+ Grow ntpd/work_thread.c arrays as needed.
+ Add DEBUG_* variants of ntp_assert.h macros which compile away using
+ ./configure --disable-debugging.
+ Fix tvalops.cpp unit test failures for 32-bit builds.
+ Return to a single autoreconf invocation in ./bootstrap script.
+ Fix warnings seen on FreeBSD 9.
+ NMEA driver documentation update from Juergen Perlinger.
+
+ ChangeLog@1.780 +8 -1
+ Grow ntpd/work_thread.c arrays as needed.
+ Add DEBUG_* variants of ntp_assert.h macros which compile away using
+ ./configure --disable-debugging.
+ Fix tvalops.cpp unit test failures for 32-bit builds.
+ Return to a single autoreconf invocation in ./bootstrap script.
+ Fix warnings seen on FreeBSD 9.
+ NMEA driver documentation update from Juergen Perlinger.
+
+ bootstrap@1.38 +6 -2
+ Use recursive autoreconf again now that we don't trigger bug.
+
+ include/ntp_assert.h@1.4 +47 -16
+ provide assertion macros without NTP_ prefix.
+ provide debug-only DEBUG_REQUIRE(), DEBUG_INSIST(), etc.
+
+ include/ntp_md5.h@1.8 +3 -2
+ silence warning seen on FreeBSD 9
+
+ include/timespecops.h@1.3 +37 -27
+ style cleanup.
+ reduce duplication.
+ comment fixes and additions.
+ TIMESPECOPS_H typos.
+
+ include/timevalops.h@1.2 +42 -35
+ style cleanup.
+ reduce duplication.
+ comment fixes and additions.
+ TIMEVALOPS_H typos.
+
+ libntp/socket.c@1.4 +0 -3
+ isc/util.h is for use by lib/isc code only, not clients
+
+ libntp/timespecops.c@1.3 +91 -88
+ style cleanup.
+ comment fixes and additions.
+ use abs(), labs() where appropriate.
+ reduce duplication.
+ silence int->char trucation warnings.
+
+ libntp/timevalops.c@1.3 +99 -103
+ style cleanup.
+ comment fixes and additions.
+ use abs(), labs() where appropriate.
+ reduce duplication.
+ silence int->char trucation warnings.
+
+ ntpd/refclock_zyfer.c@1.7 +3 -1
+ FreeBSD 9 warns of sys/termios.h deprecation, prefer termios.h
+
+ ntpd/work_thread.c@1.3 +92 -46
+ use dynamic-sized request and response arrays of pointers
+
+ ports/winnt/vc6/libntp.dsp@1.59 +10 -2
+ add timespecops.c, timevalops.c references
+
+ ports/winnt/vs2003/libntp.vcproj@1.17 +7 -19
+ add timespecops.c, timevalops.c references
+
+ ports/winnt/vs2005/libntp.vcproj@1.15 +8 -18
+ add timespecops.c, timevalops.c references
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.36 +17 -1
+ add references to timespecops.c and timevalops.c
+
+ tests/libntp/tspecops.cpp@1.4 +54 -33
+ style cleanup.
+ use class not struct for TVAL, LFP.
+
+ tests/libntp/tvalops.cpp@1.2 +109 -75
+ style cleanup.
+ use class not struct for TVAL, LFP.
+ use ASSERT_NEAR() for fuzzy double equality test, fixes 32-bit failures.
+
+ util/ntp-keygen.c@1.76 +1 -1
+ silence time_t -> u_int truncation warning.
+
+ChangeSet@1.2422.1.32, 2011-01-19 02:07:09-05:00, stenn@deacon.udel.edu
+ crypo group changes from Dave Mills
+
+ ChangeLog@1.779 +1 -0
+ crypo group changes from Dave Mills
+
+ ntpd/ntp_crypto.c@1.153 +20 -23
+ crypo group changes from Dave Mills
+
+ ntpd/ntp_proto.c@1.316 +119 -9
+ crypo group changes from Dave Mills
+
+ChangeSet@1.2422.1.31, 2011-01-19 02:03:53-05:00, stenn@deacon.udel.edu
+ Lose the RANGEGATE check in PPS, from Dave Mills
+
+ ChangeLog@1.778 +1 -0
+ Lose the RANGEGATE check in PPS, from Dave Mills
+
+ include/refclock_atom.h@1.3 +0 -1
+ Lose the RANGEGATE check in PPS, from Dave Mills
+
+ ntpd/ntp_refclock.c@1.102 +0 -10
+ Lose the RANGEGATE check in PPS, from Dave Mills
+
+ChangeSet@1.2422.1.30, 2011-01-19 02:01:33-05:00, stenn@deacon.udel.edu
+ ACTS refclock cleanup from Dave Mills
+
+ ChangeLog@1.777 +1 -0
+ ACTS refclock cleanup from Dave Mills
+
+ ntpd/refclock_acts.c@1.45 +2 -28
+ ACTS refclock cleanup from Dave Mills
+
+ChangeSet@1.2422.1.29, 2011-01-19 01:58:52-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.776 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.70 +5 -5
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.19 +14 -10
+ Documentation updates from Dave Mills
+
+ html/copyright.html@1.57 +2 -2
+ Documentation updates from Dave Mills
+
+ html/drivers/driver20.html@1.24 +339 -101
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.28 +4 -9
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.64 +2 -2
+ Documentation updates from Dave Mills
+
+ html/select.html@1.2 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2458, 2011-01-19 06:06:52+00:00, stenn@psp-fb1.ntp.org
+ Move DEBUG-enablement checks to ntp_libntp.m4
+
+ configure.ac@1.513 +0 -16
+ Move DEBUG-enablement checks to ntp_libntp.m4
+
+ sntp/m4/ntp_libntp.m4@1.2 +17 -1
+ Move DEBUG-enablement checks to ntp_libntp.m4
+
+ChangeSet@1.2457, 2011-01-19 06:05:57+00:00, stenn@psp-fb1.ntp.org
+ DEBUG cleanup
+
+ sntp/header.h@1.7 +0 -4
+ DEBUG cleanup
+
+ sntp/main.h@1.5 +0 -1
+ DEBUG cleanup
+
+ChangeSet@1.2422.6.2, 2011-01-18 19:35:18+01:00, jnperlin@hydra.localnet
+ added tests for timevalops.c, enhancements for timespecops.c tests
+
+ tests/libntp/Makefile.am@1.30 +1 -0
+ added timeval tests
+
+ tests/libntp/tspecops.cpp@1.3 +39 -47
+ refactoring and signed conversion tests
+
+ tests/libntp/tvalops.cpp@1.1 +342 -0
+ tests for tvalops
+
+ tests/libntp/tvalops.cpp@1.0 +0 -0
+
+ChangeSet@1.2422.5.1, 2011-01-18 18:09:37+01:00, jnperlin@hydra.localnet
+ Improvements on timeval / timespec ops
+
+ include/lib_strbuf.h@1.10 +3 -2
+ made LIB_BUFLENGTH useable for preprocessor tests
+
+ include/timespecops.h@1.2 +3 -0
+ additional explanation
+
+ libntp/timespecops.c@1.2 +108 -22
+ fixed string conversion and signed conversion
+
+ libntp/timevalops.c@1.2 +75 -27
+ fixed string conversion and signed conversion
+
+ tests/libntp/tspecops.cpp@1.2 +22 -0
+ added string conversion tests
+
+ChangeSet@1.2456, 2011-01-18 12:35:26+00:00, stenn@psp-fb1.ntp.org
+ autogen and debug cleanup
+
+ sntp/main.c@1.66 +4 -13
+ autogen and debug cleanup
+
+ sntp/main.h@1.4 +1 -0
+ autogen and debug cleanup
+
+ChangeSet@1.2422.1.27, 2011-01-18 11:32:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P119
+ TAG: NTP_4_2_7P119
+
+ ChangeLog@1.775 +1 -0
+ NTP_4_2_7P119
+
+ clockstuff/clktest-opts.c@1.43 +2 -2
+ NTP_4_2_7P119
+
+ clockstuff/clktest-opts.h@1.43 +3 -3
+ NTP_4_2_7P119
+
+ ntpd/ntpd-opts.c@1.123 +2 -2
+ NTP_4_2_7P119
+
+ ntpd/ntpd-opts.h@1.123 +3 -3
+ NTP_4_2_7P119
+
+ ntpd/ntpd-opts.texi@1.121 +2 -2
+ NTP_4_2_7P119
+
+ ntpd/ntpd.1@1.121 +2 -2
+ NTP_4_2_7P119
+
+ ntpdc/ntpdc-opts.c@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpdc/ntpdc-opts.h@1.120 +3 -3
+ NTP_4_2_7P119
+
+ ntpdc/ntpdc-opts.texi@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpdc/ntpdc.1@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpq/ntpq-opts.c@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpq/ntpq-opts.h@1.120 +3 -3
+ NTP_4_2_7P119
+
+ ntpq/ntpq-opts.texi@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpq/ntpq.1@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.120 +3 -3
+ NTP_4_2_7P119
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.120 +2 -2
+ NTP_4_2_7P119
+
+ ntpsnmpd/ntpsnmpd.1@1.120 +2 -2
+ NTP_4_2_7P119
+
+ packageinfo.sh@1.121 +1 -1
+ NTP_4_2_7P119
+
+ sntp/sntp-opts.c@1.115.1.5 +2 -2
+ NTP_4_2_7P119
+
+ sntp/sntp-opts.h@1.115.1.5 +3 -3
+ NTP_4_2_7P119
+
+ sntp/sntp-opts.texi@1.115.1.5 +2 -2
+ NTP_4_2_7P119
+
+ sntp/sntp.1@1.115.1.5 +2 -2
+ NTP_4_2_7P119
+
+ sntp/sntp.html@1.115.1.5 +1 -1
+ NTP_4_2_7P119
+
+ util/ntp-keygen-opts.c@1.118 +2 -2
+ NTP_4_2_7P119
+
+ util/ntp-keygen-opts.h@1.118 +3 -3
+ NTP_4_2_7P119
+
+ util/ntp-keygen-opts.texi@1.121 +2 -2
+ NTP_4_2_7P119
+
+ util/ntp-keygen.1@1.121 +2 -2
+ NTP_4_2_7P119
+
+ChangeSet@1.2422.4.6, 2011-01-18 07:14:14+00:00, stenn@psp-fb1.ntp.org
+ Distribute timespecops.h and timevalops.h
+
+ include/Makefile.am@1.44 +2 -0
+ Distribute timespecops.h and timevalops.h
+
+ChangeSet@1.2422.4.5, 2011-01-16 14:56:08+01:00, jnperlin@hydra.localnet
+ added timespecops and timevalops for operations on struct timespec and struct timeval
+
+ ChangeLog@1.771.1.4 +2 -0
+ added timespecops and timevalops for operations on struct timespec and struct timeval
+
+ include/timespecops.h@1.1 +131 -0
+ operations on struct timespec
+
+ include/timespecops.h@1.0 +0 -0
+
+ include/timevalops.h@1.1 +108 -0
+ operations on struct timeval
+
+ include/timevalops.h@1.0 +0 -0
+
+ libntp/Makefile.am@1.58 +2 -0
+ added timespecops and timevalops for operations on struct timespec and struct timeval
+
+ libntp/timespecops.c@1.1 +347 -0
+ operations on struct timespec
+
+ libntp/timespecops.c@1.0 +0 -0
+
+ libntp/timevalops.c@1.1 +346 -0
+ operations on struct timeval
+
+ libntp/timevalops.c@1.0 +0 -0
+
+ tests/libntp/Makefile.am@1.29 +2 -1
+ added test for timespecops
+
+ tests/libntp/tspecops.cpp@1.1 +327 -0
+ tests for timespecops
+
+ tests/libntp/tspecops.cpp@1.0 +0 -0
+
+ChangeSet@1.2455, 2011-01-16 10:49:33+00:00, stenn@psp-fb1.ntp.org
+ sntp option cleanup
+
+ sntp/main.c@1.65 +49 -24
+ sntp option cleanup
+
+ sntp/sntp-opts.c@1.121 +267 -184
+ sntp option cleanup
+
+ sntp/sntp-opts.def@1.24 +93 -94
+ sntp option cleanup
+
+ sntp/sntp-opts.h@1.121 +73 -71
+ sntp option cleanup
+
+ sntp/sntp-opts.texi@1.121 +55 -104
+ sntp option cleanup
+
+ sntp/sntp.1@1.121 +75 -66
+ sntp option cleanup
+
+ sntp/sntp.html@1.121 +94 -133
+ sntp option cleanup
+
+ sntp/sntp.texi@1.7 +6 -2
+ sntp option cleanup
+
+ChangeSet@1.2454, 2011-01-16 10:48:00+00:00, stenn@psp-fb1.ntp.org
+ libevent cleanup
+
+ sntp/Makefile.am@1.52 +1 -10
+ libevent cleanup
+
+ sntp/m4/ntp_libevent.m4@1.2, stenn@psp-deb1.ntp.org +0 -0
+ Rename: m4/ntp_libevent.m4 -> sntp/m4/ntp_libevent.m4
+
+ChangeSet@1.2422.4.4, 2011-01-15 10:47:08+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P118
+ TAG: NTP_4_2_7P118
+
+ ChangeLog@1.771.1.3 +1 -0
+ NTP_4_2_7P118
+
+ clockstuff/clktest-opts.c@1.42 +2 -2
+ NTP_4_2_7P118
+
+ clockstuff/clktest-opts.h@1.42 +3 -3
+ NTP_4_2_7P118
+
+ ntpd/ntpd-opts.c@1.122 +2 -2
+ NTP_4_2_7P118
+
+ ntpd/ntpd-opts.h@1.122 +3 -3
+ NTP_4_2_7P118
+
+ ntpd/ntpd-opts.texi@1.120 +2 -2
+ NTP_4_2_7P118
+
+ ntpd/ntpd.1@1.120 +2 -2
+ NTP_4_2_7P118
+
+ ntpdc/ntpdc-opts.c@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpdc/ntpdc-opts.h@1.119 +3 -3
+ NTP_4_2_7P118
+
+ ntpdc/ntpdc-opts.texi@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpdc/ntpdc.1@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpq/ntpq-opts.c@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpq/ntpq-opts.h@1.119 +3 -3
+ NTP_4_2_7P118
+
+ ntpq/ntpq-opts.texi@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpq/ntpq.1@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.119 +3 -3
+ NTP_4_2_7P118
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.119 +2 -2
+ NTP_4_2_7P118
+
+ ntpsnmpd/ntpsnmpd.1@1.119 +2 -2
+ NTP_4_2_7P118
+
+ packageinfo.sh@1.120 +1 -1
+ NTP_4_2_7P118
+
+ sntp/sntp-opts.c@1.115.1.4 +2 -2
+ NTP_4_2_7P118
+
+ sntp/sntp-opts.h@1.115.1.4 +3 -3
+ NTP_4_2_7P118
+
+ sntp/sntp-opts.texi@1.115.1.4 +2 -2
+ NTP_4_2_7P118
+
+ sntp/sntp.1@1.115.1.4 +2 -2
+ NTP_4_2_7P118
+
+ sntp/sntp.html@1.115.1.4 +1 -1
+ NTP_4_2_7P118
+
+ util/ntp-keygen-opts.c@1.117 +2 -2
+ NTP_4_2_7P118
+
+ util/ntp-keygen-opts.h@1.117 +3 -3
+ NTP_4_2_7P118
+
+ util/ntp-keygen-opts.texi@1.120 +2 -2
+ NTP_4_2_7P118
+
+ util/ntp-keygen.1@1.120 +2 -2
+ NTP_4_2_7P118
+
+ChangeSet@1.2422.4.3, 2011-01-15 02:04:43-05:00, stenn@deacon.udel.edu
+ Use a do-nothing rule to avoid an SCCS "get"
+
+ sntp/Makefile.am@1.47.1.6 +1 -0
+ Use a do-nothing rule to avoid an SCCS "get"
+
+ChangeSet@1.2422.4.2, 2011-01-15 00:16:55-05:00, stenn@deacon.udel.edu
+ Simplify the built-sources stuff in sntp/
+
+ ChangeLog@1.771.1.2 +1 -0
+ Simplify the built-sources stuff in sntp/
+
+ sntp/Makefile.am@1.47.1.5 +0 -1
+ Simplify the built-sources stuff in sntp/
+
+ChangeSet@1.2422.4.1, 2011-01-14 23:06:12-05:00, stenn@deacon.udel.edu
+ Fix check for -lipv6 on HP-UX 11
+
+ ChangeLog@1.771.1.1 +1 -0
+
+ configure.ac@1.512 +4 -8
+
+ChangeSet@1.2422.1.24, 2011-01-14 07:50:28+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct msyslog.c build break on Solaris 2.9 from #ifdef/#if mixup.
+
+ ChangeLog@1.772 +1 -0
+ Correct msyslog.c build break on Solaris 2.9 from #ifdef/#if mixup.
+
+ libntp/msyslog.c@1.34 +12 -3
+ Correct msyslog.c build break on Solaris 2.9 from #ifdef/#if mixup.
+
+ChangeSet@1.2422.1.23, 2011-01-13 07:32:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P117
+ TAG: NTP_4_2_7P117
+
+ ChangeLog@1.771 +1 -0
+ NTP_4_2_7P117
+
+ clockstuff/clktest-opts.c@1.41 +3 -3
+ NTP_4_2_7P117
+
+ clockstuff/clktest-opts.h@1.41 +3 -3
+ NTP_4_2_7P117
+
+ ntpd/ntpd-opts.c@1.121 +3 -3
+ NTP_4_2_7P117
+
+ ntpd/ntpd-opts.h@1.121 +3 -3
+ NTP_4_2_7P117
+
+ ntpd/ntpd-opts.texi@1.119 +2 -2
+ NTP_4_2_7P117
+
+ ntpd/ntpd.1@1.119 +2 -2
+ NTP_4_2_7P117
+
+ ntpdc/ntpdc-opts.c@1.118 +4 -4
+ NTP_4_2_7P117
+
+ ntpdc/ntpdc-opts.h@1.118 +3 -3
+ NTP_4_2_7P117
+
+ ntpdc/ntpdc-opts.texi@1.118 +2 -2
+ NTP_4_2_7P117
+
+ ntpdc/ntpdc.1@1.118 +2 -2
+ NTP_4_2_7P117
+
+ ntpq/ntpq-opts.c@1.118 +4 -4
+ NTP_4_2_7P117
+
+ ntpq/ntpq-opts.h@1.118 +3 -3
+ NTP_4_2_7P117
+
+ ntpq/ntpq-opts.texi@1.118 +2 -2
+ NTP_4_2_7P117
+
+ ntpq/ntpq.1@1.118 +2 -2
+ NTP_4_2_7P117
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.118 +3 -3
+ NTP_4_2_7P117
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.118 +3 -3
+ NTP_4_2_7P117
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.118 +2 -2
+ NTP_4_2_7P117
+
+ ntpsnmpd/ntpsnmpd.1@1.118 +2 -2
+ NTP_4_2_7P117
+
+ packageinfo.sh@1.119 +1 -1
+ NTP_4_2_7P117
+
+ sntp/sntp-opts.c@1.115.1.3 +3 -3
+ NTP_4_2_7P117
+
+ sntp/sntp-opts.h@1.115.1.3 +3 -3
+ NTP_4_2_7P117
+
+ sntp/sntp-opts.texi@1.115.1.3 +2 -2
+ NTP_4_2_7P117
+
+ sntp/sntp.1@1.115.1.3 +2 -2
+ NTP_4_2_7P117
+
+ sntp/sntp.html@1.115.1.3 +1 -1
+ NTP_4_2_7P117
+
+ util/ntp-keygen-opts.c@1.116 +4 -4
+ NTP_4_2_7P117
+
+ util/ntp-keygen-opts.h@1.116 +3 -3
+ NTP_4_2_7P117
+
+ util/ntp-keygen-opts.texi@1.119 +2 -2
+ NTP_4_2_7P117
+
+ util/ntp-keygen.1@1.119 +2 -2
+ NTP_4_2_7P117
+
+ChangeSet@1.2422.1.22, 2011-01-13 01:53:03-05:00, stenn@deacon.udel.edu
+ Make sure the built-sources-only target is writable
+
+ sntp/Makefile.am@1.47.1.4 +1 -1
+ Make sure the built-sources-only target is writable
+
+ChangeSet@1.2422.1.21, 2011-01-12 18:57:28-05:00, stenn@deacon.udel.edu
+ Some systems do not have strerror_r
+
+ libntp/msyslog.c@1.33 +3 -12
+ Some systems do not have strerror_r
+
+ChangeSet@1.2422.1.20, 2011-01-12 16:11:01-05:00, stenn@deacon.udel.edu
+ Improve libntp.a dependency checking
+
+ adjtimed/Makefile.am@1.9 +6 -1
+ Improve libntp.a dependency checking
+
+ clockstuff/Makefile.am@1.16 +6 -1
+ Improve libntp.a dependency checking
+
+ libparse/Makefile.am@1.23 +6 -1
+ Improve libntp.a dependency checking
+
+ ntpd/Makefile.am@1.98 +7 -1
+ Improve libntp.a dependency checking
+
+ ntpdate/Makefile.am@1.26 +6 -1
+ Improve libntp.a dependency checking
+
+ ntpdc/Makefile.am@1.56 +7 -2
+ Improve libntp.a dependency checking
+
+ ntpq/Makefile.am@1.52 +6 -1
+ Improve libntp.a dependency checking
+
+ ntpsnmpd/Makefile.am@1.24 +9 -1
+ Improve libntp.a dependency checking
+
+ sntp/Makefile.am@1.47.1.3 +5 -1
+ Improve libntp.a dependency checking
+
+ util/Makefile.am@1.55 +6 -1
+ Improve libntp.a dependency checking
+
+ChangeSet@1.2422.1.19, 2011-01-12 15:59:20-05:00, stenn@deacon.udel.edu
+ Keep AC_PROG_LIBTOOL, instead of changing to LT_INIT
+
+ configure.ac@1.511 +1 -1
+ Keep AC_PROG_LIBTOOL, instead of changing to LT_INIT
+
+ sntp/configure.ac@1.50.1.4 +1 -1
+ Keep AC_PROG_LIBTOOL, instead of changing to LT_INIT
+
+ChangeSet@1.2422.1.18, 2011-01-12 05:23:49+00:00, davehart@shiny.ad.hartbrothers.com
+ Add configure --without-sntp option to disable building sntp and
+ sntp/tests. withsntp=no in the environment changes the default.
+ Build infrastructure cleanup:
+ Move m4 directory to sntp/m4.
+ Share a single set of genver output between sntp and the top level.
+ Share a single set of autogen included .defs in sntp/include.
+ Share a single set of build-aux scripts (e.g. config.guess, missing).
+ Add ntp_libntp.m4 and ntp_ipv6.m4 to reduce configure.ac duplication.
+ Warn and exit build/flock-build if bootstrap needs to be run.
+
+ BitKeeper/deleted/cc/excludes~3e480692@1.6 +0 -0
+ Rename: excludes -> BitKeeper/deleted/cc/excludes~3e480692
+
+ ChangeLog@1.770 +9 -0
+ Add configure --without-sntp option to disable building sntp and
+ sntp/tests. withsntp=no in the environment changes the default.
+ Build infrastructure cleanup:
+ Move m4 directory to sntp/m4.
+ Share a single set of genver output between sntp and the top level.
+ Share a single set of autogen included .defs in sntp/include.
+ Share a single set of build-aux scripts (e.g. config.guess, missing).
+ Add ntp_libntp.m4 and ntp_ipv6.m4 to reduce configure.ac duplication.
+ Warn and exit build/flock-build if bootstrap needs to be run.
+
+
+ Makefile.am@1.104 +10 -40
+ move m4 subdir to sntp/m4.
+ use sntp/version.* files directly in top-level.
+ remove old CVS leftover file "excludes"
+
+ adjtimed/Makefile.am@1.8 +10 -1
+ Use CFGLAGS_NTP, AM_CFLAGS and leave CFLAGS to end user.
+
+ bootstrap@1.37 +12 -17
+ no more duplication of version.* to sntp subdir
+
+ build@1.42 +7 -4
+ use build-aux directory for autotools scripts.
+ Error out if bootstrap is needed.
+
+ clockstuff/Makefile.am@1.15 +15 -8
+ move autogen included .def files to sntp/include
+
+ configure.ac@1.510 +13 -805
+ move m4 subdir to sntp/m4
+ use sntp/version.* files directly in top-level
+ move hunks of common code to ntp_libntp.m4 and ntp_ipv6.m4
+
+ flock-build@1.48 +5 -1
+ Error out if bootstrap is needed.
+ Change with the times, default LIST=pogo
+
+ include/Makefile.am@1.43 +0 -1
+ move autogen included files to sntp/include.
+
+ include/lib_strbuf.h@1.9 +1 -2
+ No need to call init_lib(), lib_nextbuf is already zero initially.
+
+ include/ntp_stdlib.h@1.57 +3 -0
+ add errno_to_str() thread-safe alternative to strerror()
+
+ kernel/Makefile.am@1.4 +0 -1
+ remove ancient cruft
+
+ kernel/sys/Makefile.am@1.5 +0 -1
+ remove old cruft
+
+ libntp/Makefile.am@1.57 +9 -4
+ Use CFGLAGS_NTP, AM_CFLAGS and leave CFLAGS to end user.
+
+ libntp/lib_strbuf.c@1.7 +2 -3
+ no need to zero lib_nextbuf in init_lib(), it's zero initially.
+
+ libntp/msyslog.c@1.32 +45 -4
+ add errno_to_str(), thread-safe alternative to strerror()
+
+ libparse/Makefile.am@1.22 +7 -3
+ Use CFGLAGS_NTP, AM_CFLAGS and leave CFLAGS to end user.
+
+ ntpd/Makefile.am@1.97 +20 -11
+ move autogen included .def files to sntp/include
+
+ ntpdate/Makefile.am@1.25 +12 -8
+ move version to sntp/version
+
+ ntpdc/Makefile.am@1.55 +23 -14
+ move autogen included .def files to sntp/include
+
+ ntpq/Makefile.am@1.51 +20 -13
+ move autogen included .def files to sntp/include
+
+ ntpsnmpd/Makefile.am@1.23 +17 -11
+ move autogen included .def files to sntp/include
+
+ parseutil/Makefile.am@1.13 +4 -2
+ Use CFGLAGS_NTP, AM_CFLAGS and leave CFLAGS to end user.
+
+ ports/winnt/include/config.h@1.92 +4 -4
+ add errno_to_str(), thread-safe alternative to strerror()
+
+ ports/winnt/libntp/syslog.c@1.8 +5 -3
+ Use LIB_GETBUF instead of a static buffer for ntp_strerror()
+
+ ports/winnt/scripts/mkver.bat@1.13 +4 -4
+ move version to sntp/version
+
+ scripts/genver@1.7 +7 -7
+ move m4 subdir to sntp/m4
+ use sntp/version.* files directly in top-level
+
+ sntp/Makefile.am@1.47.1.2 +63 -75
+ move m4 subdir to sntp/m4
+ use sntp/version.* files directly in top-level
+ add --without-sntp configure option
+ remove FRC from libntp.a rule, it trips up BSD make
+
+ sntp/configure.ac@1.50.1.3 +11 -751
+ move m4 subdir to sntp/m4
+ use sntp/version.* files directly in top-level
+ move hunks of common m4sh code to ntp_libntp.m4 and ntp_ipv6.m4
+
+ sntp/include/Makefile.am@1.1 +18 -0
+ move autogen-included .def files to sntp/include
+
+ sntp/include/Makefile.am@1.0 +0 -0
+
+ sntp/include/autogen-version.def@1.5 +0 -0
+ Rename: include/autogen-version.def -> sntp/include/autogen-version.def
+
+ sntp/include/copyright.def@1.15 +1 -1
+ move version.m4 to sntp/m4
+
+ sntp/include/copyright.def@1.14 +0 -0
+ Rename: include/copyright.def -> sntp/include/copyright.def
+
+ sntp/include/debug-opt.def@1.6 +0 -0
+ Rename: include/debug-opt.def -> sntp/include/debug-opt.def
+
+ sntp/include/homerc.def@1.2 +0 -0
+ Rename: include/homerc.def -> sntp/include/homerc.def
+
+ sntp/m4/define_dir.m4@1.3 +0 -0
+ Rename: m4/define_dir.m4 -> sntp/m4/define_dir.m4
+
+ sntp/m4/ntp_cacheversion.m4@1.11 +0 -0
+ Rename: m4/ntp_cacheversion.m4 -> sntp/m4/ntp_cacheversion.m4
+
+ sntp/m4/ntp_dir_sep.m4@1.4 +0 -0
+ Rename: m4/ntp_dir_sep.m4 -> sntp/m4/ntp_dir_sep.m4
+
+ sntp/m4/ntp_googletest.m4@1.2 +0 -0
+ Rename: m4/ntp_googletest.m4 -> sntp/m4/ntp_googletest.m4
+
+ sntp/m4/ntp_ipv6.m4@1.1 +527 -0
+ Consolidate duplicated IPv6 detection between configure.ac and sntp/configure.ac
+
+ sntp/m4/ntp_ipv6.m4@1.0 +0 -0
+
+ sntp/m4/ntp_lib_m.m4@1.3 +0 -0
+ Rename: m4/ntp_lib_m.m4 -> sntp/m4/ntp_lib_m.m4
+
+ sntp/m4/ntp_libntp.m4@1.1 +281 -0
+ Add configure --without-sntp option to disable building sntp and
+ sntp/tests. withsntp=no in the environment changes the default.
+
+
+ sntp/m4/ntp_libntp.m4@1.0 +0 -0
+
+ sntp/m4/ntp_lineeditlibs.m4@1.11 +0 -0
+ Rename: m4/ntp_lineeditlibs.m4 -> sntp/m4/ntp_lineeditlibs.m4
+
+ sntp/m4/ntp_openssl.m4@1.15 +18 -8
+ modify CPPFLAGS_NTP not end-user variable CPPFLAGS
+
+ sntp/m4/ntp_openssl.m4@1.14 +0 -0
+ Rename: m4/ntp_openssl.m4 -> sntp/m4/ntp_openssl.m4
+
+ sntp/m4/ntp_vpathhack.m4@1.5 +0 -0
+ Rename: m4/ntp_vpathhack.m4 -> sntp/m4/ntp_vpathhack.m4
+
+ sntp/m4/os_cflags.m4@1.8 +2 -2
+ modify CFLAGS_NTP not end-user variable CFLAGS
+
+ sntp/m4/os_cflags.m4@1.7 +0 -0
+ Rename: m4/os_cflags.m4 -> sntp/m4/os_cflags.m4
+
+ sntp/tests/Makefile.am@1.19 +9 -4
+ use a single NTP_CROSSCOMPILE conditional for sntp and top-level
+ stay out of user CFLAGS, CPPFLAGS
+
+ tests/libntp/Makefile.am@1.28 +14 -3
+ use AM_CFLAGS and leave CFLAGS to end-user
+
+ util/Makefile.am@1.54 +20 -13
+ move autogen included .def files to sntp/include
+ keep hands off CFLAGS, CPPFLAGS so end-user can override at make time.
+
+ChangeSet@1.2452, 2011-01-11 11:18:09+00:00, stenn@psp-fb1.ntp.org
+ Implement -u for sntp
+
+ sntp/main.c@1.64 +1 -1
+ Implement -u for sntp
+
+ChangeSet@1.2451, 2011-01-11 11:01:26+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/networking.h@1.24 +0 -11
+ cleanup
+
+ChangeSet@1.2450, 2011-01-11 08:38:31+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/networking.c@1.56 +25 -317
+ cleanup
+
+ sntp/sntp-opts.c@1.119 +23 -2
+ cleanup
+
+ sntp/sntp-opts.def@1.23 +8 -0
+ cleanup
+
+ sntp/sntp-opts.h@1.119 +14 -7
+ cleanup
+
+ sntp/sntp-opts.texi@1.119 +9 -1
+ cleanup
+
+ sntp/sntp.1@1.119 +6 -1
+ cleanup
+
+ sntp/sntp.html@1.119 +17 -0
+ cleanup
+
+ChangeSet@1.2449, 2011-01-11 07:49:54+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.63 +5 -0
+ cleanup
+
+ChangeSet@1.2448, 2011-01-11 06:43:59+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.62 +2 -1
+ cleanup
+
+ChangeSet@1.2447, 2011-01-11 05:39:51+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.61 +1 -1
+ cleanup
+
+ChangeSet@1.2446, 2011-01-11 05:34:29+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/kod_management.c@1.25 +2 -2
+ cleanup
+
+ sntp/main.c@1.60 +4 -4
+ cleanup
+
+ sntp/networking.c@1.55 +2 -2
+ cleanup
+
+ChangeSet@1.2445, 2011-01-11 05:17:39+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.59 +205 -101
+ cleanup
+
+ChangeSet@1.2444, 2011-01-11 01:41:18+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.58 +2 -2
+ cleanup
+
+ChangeSet@1.2443, 2011-01-11 01:32:44+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.57 +71 -111
+ cleanup
+
+ sntp/sntp-opts.c@1.118 +6 -5
+ cleanup
+
+ sntp/sntp-opts.def@1.22 +3 -0
+ cleanup
+
+ sntp/sntp-opts.h@1.118 +1 -1
+ cleanup
+
+ sntp/sntp-opts.texi@1.118 +9 -1
+ cleanup
+
+ sntp/sntp.1@1.118 +6 -2
+ cleanup
+
+ sntp/sntp.html@1.118 +9 -2
+ cleanup
+
+ChangeSet@1.2442, 2011-01-10 23:45:26+00:00, stenn@psp-fb1.ntp.org
+ debug level cleanup
+
+ sntp/main.c@1.56 +3 -5
+ debug level cleanup
+
+ sntp/networking.c@1.54 +1 -4
+ debug level cleanup
+
+ChangeSet@1.2441, 2011-01-10 23:29:43+00:00, stenn@psp-fb1.ntp.org
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/main.c@1.55 +16 -4
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp-opts.c@1.117 +134 -29
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp-opts.def@1.21 +48 -16
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp-opts.h@1.117 +29 -13
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp-opts.texi@1.117 +57 -9
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp.1@1.117 +28 -6
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ sntp/sntp.html@1.117 +89 -27
+ autogen cleanup, debug level cleanup, add --concurrent support
+
+ChangeSet@1.2422.1.17, 2011-01-10 11:38:28+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P116
+ TAG: NTP_4_2_7P116
+
+ ChangeLog@1.769 +1 -0
+ NTP_4_2_7P116
+
+ clockstuff/clktest-opts.c@1.40 +2 -2
+ NTP_4_2_7P116
+
+ clockstuff/clktest-opts.h@1.40 +3 -3
+ NTP_4_2_7P116
+
+ ntpd/ntpd-opts.c@1.120 +2 -2
+ NTP_4_2_7P116
+
+ ntpd/ntpd-opts.h@1.120 +3 -3
+ NTP_4_2_7P116
+
+ ntpd/ntpd-opts.texi@1.118 +2 -2
+ NTP_4_2_7P116
+
+ ntpd/ntpd.1@1.118 +2 -2
+ NTP_4_2_7P116
+
+ ntpdc/ntpdc-opts.c@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpdc/ntpdc-opts.h@1.117 +3 -3
+ NTP_4_2_7P116
+
+ ntpdc/ntpdc-opts.texi@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpdc/ntpdc.1@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpq/ntpq-opts.c@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpq/ntpq-opts.h@1.117 +3 -3
+ NTP_4_2_7P116
+
+ ntpq/ntpq-opts.texi@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpq/ntpq.1@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.117 +3 -3
+ NTP_4_2_7P116
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.117 +2 -2
+ NTP_4_2_7P116
+
+ ntpsnmpd/ntpsnmpd.1@1.117 +2 -2
+ NTP_4_2_7P116
+
+ packageinfo.sh@1.118 +1 -1
+ NTP_4_2_7P116
+
+ sntp/sntp-opts.c@1.115.1.2 +2 -2
+ NTP_4_2_7P116
+
+ sntp/sntp-opts.h@1.115.1.2 +3 -3
+ NTP_4_2_7P116
+
+ sntp/sntp-opts.texi@1.115.1.2 +2 -2
+ NTP_4_2_7P116
+
+ sntp/sntp.1@1.115.1.2 +2 -2
+ NTP_4_2_7P116
+
+ sntp/sntp.html@1.115.1.2 +2 -2
+ NTP_4_2_7P116
+
+ util/ntp-keygen-opts.c@1.115 +2 -2
+ NTP_4_2_7P116
+
+ util/ntp-keygen-opts.h@1.115 +3 -3
+ NTP_4_2_7P116
+
+ util/ntp-keygen-opts.texi@1.118 +2 -2
+ NTP_4_2_7P116
+
+ util/ntp-keygen.1@1.118 +2 -2
+ NTP_4_2_7P116
+
+ChangeSet@1.2422.1.16, 2011-01-10 00:22:04+00:00, davehart@shiny.ad.hartbrothers.com
+ refclock_nmea.c refactoring by Juergen Perlinger.
+
+ ChangeLog@1.768 +1 -0
+ refclock_nmea.c refactoring by Juergen Perlinger.
+
+ html/drivers/driver20.html@1.23 +99 -341
+ restore current ntp-dev driver20.html, all html edits need to
+ flow through Dr. Mills.
+
+ ntpd/refclock_nmea.c@1.58 +24 -22
+ refclock_nmea.c refactoring by Juergen Perlinger.
+
+ChangeSet@1.2254.1.3, 2011-01-09 20:19:31+00:00, davehart@shiny.ad.hartbrothers.com
+ minor style cleanup of Juergen's refactored NMEA driver
+
+ libntp/atouint.c@1.4 +18 -12
+ Add detailed atouint() doc comment
+
+ ntpd/refclock_nmea.c@1.57 +142 -91
+ minor style cleanup of Juergen's refactored NMEA driver
+
+ChangeSet@1.2422.1.14, 2011-01-09 12:55:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P115
+ TAG: NTP_4_2_7P115
+
+ ChangeLog@1.767 +1 -0
+ NTP_4_2_7P115
+
+ clockstuff/clktest-opts.c@1.39 +2 -2
+ NTP_4_2_7P115
+
+ clockstuff/clktest-opts.h@1.39 +3 -3
+ NTP_4_2_7P115
+
+ ntpd/ntpd-opts.c@1.119 +2 -2
+ NTP_4_2_7P115
+
+ ntpd/ntpd-opts.h@1.119 +3 -3
+ NTP_4_2_7P115
+
+ ntpd/ntpd-opts.texi@1.117 +2 -2
+ NTP_4_2_7P115
+
+ ntpd/ntpd.1@1.117 +2 -2
+ NTP_4_2_7P115
+
+ ntpdc/ntpdc-opts.c@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpdc/ntpdc-opts.h@1.116 +3 -3
+ NTP_4_2_7P115
+
+ ntpdc/ntpdc-opts.texi@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpdc/ntpdc.1@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpq/ntpq-opts.c@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpq/ntpq-opts.h@1.116 +3 -3
+ NTP_4_2_7P115
+
+ ntpq/ntpq-opts.texi@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpq/ntpq.1@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.116 +3 -3
+ NTP_4_2_7P115
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.116 +2 -2
+ NTP_4_2_7P115
+
+ ntpsnmpd/ntpsnmpd.1@1.116 +2 -2
+ NTP_4_2_7P115
+
+ packageinfo.sh@1.117 +1 -1
+ NTP_4_2_7P115
+
+ sntp/sntp-opts.c@1.115.1.1 +2 -2
+ NTP_4_2_7P115
+
+ sntp/sntp-opts.h@1.115.1.1 +3 -3
+ NTP_4_2_7P115
+
+ sntp/sntp-opts.texi@1.115.1.1 +2 -2
+ NTP_4_2_7P115
+
+ sntp/sntp.1@1.115.1.1 +2 -2
+ NTP_4_2_7P115
+
+ sntp/sntp.html@1.115.1.1 +2 -2
+ NTP_4_2_7P115
+
+ util/ntp-keygen-opts.c@1.114 +2 -2
+ NTP_4_2_7P115
+
+ util/ntp-keygen-opts.h@1.114 +3 -3
+ NTP_4_2_7P115
+
+ util/ntp-keygen-opts.texi@1.117 +2 -2
+ NTP_4_2_7P115
+
+ util/ntp-keygen.1@1.117 +2 -2
+ NTP_4_2_7P115
+
+ChangeSet@1.2440, 2011-01-09 12:14:54+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/kod_management.c@1.24 +6 -12
+ cleanup
+
+ sntp/main.c@1.54 +81 -104
+ cleanup
+
+ sntp/networking.c@1.53 +7 -5
+ cleanup
+
+ChangeSet@1.2439, 2011-01-09 10:34:59+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.53 +6 -1
+ cleanup
+
+ChangeSet@1.2438, 2011-01-09 10:23:51+00:00, stenn@psp-fb1.ntp.org
+ progress and cleanup
+
+ sntp/main.c@1.52 +15 -77
+ progress and cleanup
+
+ sntp/networking.c@1.52 +38 -63
+ progress and cleanup
+
+ChangeSet@1.2437, 2011-01-09 08:32:33+00:00, stenn@psp-fb1.ntp.org
+ debug cleanup. Use our stock Version string stuff
+
+ sntp/Makefile.am@1.50 +18 -1
+ debug cleanup. Use our stock Version string stuff
+
+ sntp/networking.c@1.51 +13 -8
+ debug cleanup. Use our stock Version string stuff
+
+ChangeSet@1.2436, 2011-01-09 06:52:29+00:00, stenn@psp-fb1.ntp.org
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/configure.ac@1.54 +16 -0
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/crypto.c@1.16 +2 -2
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/kod_management.c@1.23 +1 -1
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/main.c@1.51 +15 -9
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/main.h@1.3 +1 -0
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/networking.c@1.50 +24 -24
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp-opts.c@1.116 +107 -49
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp-opts.def@1.20 +1 -12
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp-opts.h@1.116 +34 -27
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp-opts.texi@1.116 +35 -12
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp.1@1.116 +15 -10
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ sntp/sntp.html@1.116 +107 -58
+ Use the same "debug" mechanism that the rest of NTP uses
+
+ChangeSet@1.2435, 2011-01-09 05:00:18+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_io.c minor cleanup
+ sntp/main.c use sockaddr_u in new code
+
+ ntpd/ntp_io.c@1.347 +2 -2
+ INADDR_ANY is in network order, match IPv6 code
+
+ sntp/main.c@1.50 +31 -33
+ use sockaddr_u, ntp_net.h macros
+ memset() -> ZERO()
+
+ChangeSet@1.2434, 2011-01-09 04:28:36+00:00, stenn@psp-fb1.ntp.org
+ Use sptoa() in various places, so we can see the port #
+
+ sntp/networking.c@1.49 +7 -9
+ Use sptoa() in various places, so we can see the port #
+
+ChangeSet@1.2433, 2011-01-09 03:44:33+00:00, stenn@psp-fb1.ntp.org
+ cleanup
+
+ sntp/main.c@1.49 +54 -25
+ cleanup
+
+ChangeSet@1.2422.1.13, 2011-01-09 02:46:20+00:00, davehart@shiny.ad.hartbrothers.com
+ correct ntpq nextvar() warning cleanp
+
+ ntpq/ntpq.c@1.130 +2 -2
+ min()/max() mixup
+
+ChangeSet@1.2431, 2011-01-09 01:21:24+00:00, stenn@psp-fb1.ntp.org
+ cleanup, and start in on the NTP packet callback
+
+ sntp/main.c@1.47 +63 -34
+ cleanup, and start in on the NTP packet callback
+
+ChangeSet@1.2422.1.12, 2011-01-08 20:34:39+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1781] longlong undefined in sntp handle_pkt() on Debian amd64.
+ Bump deps-ver and sntp/deps-ver to force each directory to be cleaned once,
+ to work around build breaks triggered by changing erealloc() and
+ estrdup() from functions to macros.
+
+ ChangeLog@1.766 +1 -0
+ [Bug 1781] longlong undefined in sntp handle_pkt() on Debian amd64.
+
+ deps-ver@1.4 +1 -1
+ force each directory to be cleaned once, to work around build
+ breaks triggered by changing erealloc() and estrdup() from
+ functions to macros.
+
+ ntpd/ntp_control.c@1.161 +1 -1
+ more gcc 4.5.2 warning hunting
+
+ ntpq/ntpq.c@1.129 +23 -22
+ more gcc 4.5.2 warning hunting
+
+ sntp/Makefile.am@1.47.1.1 +1 -1
+ let libntp Makefile decide if libntp.a is up to date, fixes
+ building in sntp subdir before top level.
+
+ sntp/deps-ver@1.2 +1 -1
+ force each directory to be cleaned once, to work around build
+ breaks triggered by changing erealloc() and estrdup() from
+ functions to macros.
+
+ sntp/main.c@1.41.1.2 +1 -1
+ [Bug 1781] longlong undefined in sntp handle_pkt() on Debian amd64.
+
+ tests/libntp/Makefile.am@1.27 +1 -1
+ @LCRYPTO@ after libntp.a in LDADD
+
+ChangeSet@1.2422.1.11, 2011-01-08 10:54:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1780] Windows ntpd 4.2.7p114 crashes in ioctl().
+
+ ChangeLog@1.765 +1 -0
+ [Bug 1780] Windows ntpd 4.2.7p114 crashes in ioctl().
+
+ libntp/socket.c@1.3 +8 -0
+ [Bug 1780] Windows ntpd 4.2.7p114 crashes in ioctl().
+
+ ntpd/ntp_io.c@1.346 +1 -69
+ [Bug 1780] Windows ntpd 4.2.7p114 crashes in ioctl().
+
+ChangeSet@1.2422.1.10, 2011-01-08 09:53:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P114
+ TAG: NTP_4_2_7P114
+
+ ChangeLog@1.764 +1 -0
+ NTP_4_2_7P114
+
+ clockstuff/clktest-opts.c@1.38 +2 -2
+ NTP_4_2_7P114
+
+ clockstuff/clktest-opts.h@1.38 +3 -3
+ NTP_4_2_7P114
+
+ ntpd/ntpd-opts.c@1.118 +2 -2
+ NTP_4_2_7P114
+
+ ntpd/ntpd-opts.h@1.118 +3 -3
+ NTP_4_2_7P114
+
+ ntpd/ntpd-opts.texi@1.116 +2 -2
+ NTP_4_2_7P114
+
+ ntpd/ntpd.1@1.116 +2 -2
+ NTP_4_2_7P114
+
+ ntpdc/ntpdc-opts.c@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpdc/ntpdc-opts.h@1.115 +3 -3
+ NTP_4_2_7P114
+
+ ntpdc/ntpdc-opts.texi@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpdc/ntpdc.1@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpq/ntpq-opts.c@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpq/ntpq-opts.h@1.115 +3 -3
+ NTP_4_2_7P114
+
+ ntpq/ntpq-opts.texi@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpq/ntpq.1@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.115 +3 -3
+ NTP_4_2_7P114
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.115 +2 -2
+ NTP_4_2_7P114
+
+ ntpsnmpd/ntpsnmpd.1@1.115 +2 -2
+ NTP_4_2_7P114
+
+ packageinfo.sh@1.116 +1 -1
+ NTP_4_2_7P114
+
+ sntp/sntp-opts.c@1.115 +2 -2
+ NTP_4_2_7P114
+
+ sntp/sntp-opts.h@1.115 +3 -3
+ NTP_4_2_7P114
+
+ sntp/sntp-opts.texi@1.115 +2 -2
+ NTP_4_2_7P114
+
+ sntp/sntp.1@1.115 +2 -2
+ NTP_4_2_7P114
+
+ sntp/sntp.html@1.115 +2 -2
+ NTP_4_2_7P114
+
+ util/ntp-keygen-opts.c@1.113 +2 -2
+ NTP_4_2_7P114
+
+ util/ntp-keygen-opts.h@1.113 +3 -3
+ NTP_4_2_7P114
+
+ util/ntp-keygen-opts.texi@1.116 +2 -2
+ NTP_4_2_7P114
+
+ util/ntp-keygen.1@1.116 +2 -2
+ NTP_4_2_7P114
+
+ChangeSet@1.2422.1.9, 2011-01-08 08:45:17+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix for openssl pkg-config detection eval failure.
+ (applies to prior cset)
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ ChangeLog@1.763 +4 -0
+ Fix for openssl pkg-config detection eval failure.
+ (applies to prior cset)
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ configure.ac@1.509 +1 -43
+ Accept gtest versions greater than 1.5
+ Move google test detection to m4\ntp_googletest.m4
+
+ include/lib_strbuf.h@1.8 +1 -1
+ memset() -> ZERO()
+
+ include/ntp_control.h@1.56 +1 -1
+ rename ctl_trap[] to ctl_traps[] to be distinct from struct tag
+
+ include/ntp_malloc.h@1.5 +17 -0
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ include/ntp_net.h@1.11 +2 -1
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ include/ntp_rfc2553.h@1.37 +11 -7
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ include/ntp_stdlib.h@1.56 +27 -14
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ libntp/authkeys.c@1.21 +2 -2
+ memset() -> ZERO()
+
+ libntp/decodenetnum.c@1.13 +1 -1
+ memset() -> ZERO()
+
+ libntp/dofptoa.c@1.8 +1 -1
+ memset() -> ZERO()
+
+ libntp/dolfptoa.c@1.10 +1 -1
+ memset() -> ZERO()
+
+ libntp/emalloc.c@1.14 +56 -102
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ libntp/netof.c@1.9 +1 -1
+ memset() -> zero_mem()
+
+ libntp/ntp_lineedit.c@1.10 +1 -1
+ memset() -> ZERO()
+
+ libntp/ntp_rfc2553.c@1.44 +7 -16
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ libntp/recvbuff.c@1.36 +3 -4
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ libntp/socktohost.c@1.12 +1 -1
+ memset() -> ZERO()
+
+ libntp/syssignal.c@1.11 +1 -1
+ memset() -> ZERO()
+
+ libntp/systime.c@1.52 +2 -2
+ memset() -> ZERO()
+
+ m4/ntp_googletest.m4@1.1 +52 -0
+ BitKeeper file C:/ntp/ntp-dev-erealloc-zero/m4/ntp_googletest.m4
+
+ m4/ntp_googletest.m4@1.0 +0 -0
+
+ ntpd/keyword-gen.c@1.17 +1 -2
+ memset() -> ZERO()
+
+ ntpd/ntp_config.c@1.283 +12 -12
+ memset() -> ZERO()
+
+ ntpd/ntp_control.c@1.160 +126 -135
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_intres.c@1.91 +3 -6
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_io.c@1.345 +16 -18
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_monitor.c@1.37 +4 -5
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_peer.c@1.146 +2 -3
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_refclock.c@1.101 +3 -4
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_request.c@1.102 +20 -43
+ memset() -> ZERO()
+
+ ntpd/ntp_restrict.c@1.34 +5 -7
+ memset() -> ZERO()
+ memset() -> zero_mem()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpd/ntp_signd.c@1.3 +5 -5
+ memset() -> ZERO()
+
+ ntpd/ntp_util.c@1.92 +2 -0
+ save a hundred bytes or so on Windows
+
+ ntpd/ntpsim.c@1.31 +2 -2
+ memset() -> ZERO()
+
+ ntpdate/ntpdate.c@1.82 +8 -8
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpdc/ntpdc.c@1.93 +10 -9
+ use erealloc_zero
+
+ ntpdc/ntpdc_ops.c@1.75 +28 -55
+ memset() -> ZERO()
+
+ ntpq/ntpq-subs.c@1.82 +36 -41
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ntpq/ntpq.c@1.128 +21 -26
+ memset() -> ZERO()
+
+ ports/winnt/include/config.h@1.91 +7 -5
+ Add erealloc_zero(), refactor estrdup(), emalloc(), emalloc_zero() to
+ separate tracking callsite file/line from using debug MS C runtime,
+ and to reduce code duplication.
+
+ ports/winnt/libntp/termios.c@1.26 +2 -3
+ erealloc() + memset() -> erealloc_zero()
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.49 +2 -2
+ memset() -> ZERO()
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.56 +2 -3
+ memset() -> ZERO()
+ emalloc() + memset() -> emalloc_zero()
+
+ ports/winnt/ntpd/ntservice.c@1.26 +1 -1
+ memset() -> ZERO()
+
+ sntp/configure.ac@1.50.1.2 +3 -42
+ Move google test detection to m4\ntp_googletest.m4
+
+ sntp/tests/Makefile.am@1.18 +4 -4
+ put @GTEST_LDFLAGS@ @GTEST_LIBS@ after @LCRYPTO@ in LDADD
+
+ChangeSet@1.2422.3.2, 2011-01-07 17:46:18+00:00, davehart@shiny.ad.hartbrothers.com
+ use tr to deal with trailing newline from pkg-config in ntp_openssl.m4
+
+ m4/ntp_openssl.m4@1.13 +4 -6
+ use tr to deal with trailing newline from pkg-config in ntp_openssl.m4
+
+ChangeSet@1.2422.3.1, 2011-01-07 15:31:38+00:00, davehart@shiny.ad.hartbrothers.com
+ add libntp/socket.c references to Windows libntp projects.
+
+ ports/winnt/vc6/libntp.dsp@1.58 +4 -0
+ add libntp/socket.c references to Windows libntp projects.
+
+ ports/winnt/vs2003/libntp.vcproj@1.16 +3 -18
+ add libntp/socket.c references to Windows libntp projects.
+
+ ports/winnt/vs2005/libntp.vcproj@1.14 +4 -18
+ add libntp/socket.c references to Windows libntp projects.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.35 +6 -16
+ add libntp/socket.c references to Windows libntp projects.
+
+ChangeSet@1.2429, 2011-01-07 11:34:06+00:00, stenn@psp-fb1.ntp.org
+ first cut at key auth and the initial packet send for SNTP
+
+ sntp/main.c@1.46 +83 -1
+ first cut at key auth and the initial packet send
+
+ChangeSet@1.2422.1.7, 2011-01-07 11:16:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P113
+ TAG: NTP_4_2_7P113
+
+ ChangeLog@1.762 +1 -0
+ NTP_4_2_7P113
+
+ clockstuff/clktest-opts.c@1.37 +2 -2
+ NTP_4_2_7P113
+
+ clockstuff/clktest-opts.h@1.37 +3 -3
+ NTP_4_2_7P113
+
+ ntpd/ntpd-opts.c@1.117 +2 -2
+ NTP_4_2_7P113
+
+ ntpd/ntpd-opts.h@1.117 +3 -3
+ NTP_4_2_7P113
+
+ ntpd/ntpd-opts.texi@1.115 +2 -2
+ NTP_4_2_7P113
+
+ ntpd/ntpd.1@1.115 +2 -2
+ NTP_4_2_7P113
+
+ ntpdc/ntpdc-opts.c@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpdc/ntpdc-opts.h@1.114 +3 -3
+ NTP_4_2_7P113
+
+ ntpdc/ntpdc-opts.texi@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpdc/ntpdc.1@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpq/ntpq-opts.c@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpq/ntpq-opts.h@1.114 +3 -3
+ NTP_4_2_7P113
+
+ ntpq/ntpq-opts.texi@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpq/ntpq.1@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.114 +3 -3
+ NTP_4_2_7P113
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.114 +2 -2
+ NTP_4_2_7P113
+
+ ntpsnmpd/ntpsnmpd.1@1.114 +2 -2
+ NTP_4_2_7P113
+
+ packageinfo.sh@1.115 +1 -1
+ NTP_4_2_7P113
+
+ sntp/sntp-opts.c@1.114 +2 -2
+ NTP_4_2_7P113
+
+ sntp/sntp-opts.h@1.114 +3 -3
+ NTP_4_2_7P113
+
+ sntp/sntp-opts.texi@1.114 +2 -2
+ NTP_4_2_7P113
+
+ sntp/sntp.1@1.114 +2 -2
+ NTP_4_2_7P113
+
+ sntp/sntp.html@1.114 +2 -2
+ NTP_4_2_7P113
+
+ util/ntp-keygen-opts.c@1.112 +2 -2
+ NTP_4_2_7P113
+
+ util/ntp-keygen-opts.h@1.112 +3 -3
+ NTP_4_2_7P113
+
+ util/ntp-keygen-opts.texi@1.115 +2 -2
+ NTP_4_2_7P113
+
+ util/ntp-keygen.1@1.115 +2 -2
+ NTP_4_2_7P113
+
+ChangeSet@1.2428, 2011-01-07 09:30:07+00:00, stenn@psp-fb1.ntp.org
+ Handle initial socket creation for sntp
+
+ sntp/main.c@1.45 +27 -5
+ progress
+
+ChangeSet@1.2422.1.6, 2011-01-07 04:16:46-05:00, stenn@deacon.udel.edu
+ portability adjustment
+
+ include/ntp_io.h@1.20 +2 -1
+ portability adjustment
+
+ChangeSet@1.2422.1.5, 2011-01-07 04:03:07-05:00, stenn@deacon.udel.edu
+ typo
+
+ libntp/socket.c@1.2 +1 -1
+ typo
+
+ChangeSet@1.2422.1.4, 2011-01-07 03:38:35-05:00, stenn@deacon.udel.edu
+ Begin moving some of the low-level socket stuff to libntp
+
+ ChangeLog@1.761 +1 -0
+ Begin moving some of the low-level socket stuff to libntp
+
+ include/Makefile.am@1.42 +1 -0
+ Begin moving some of the low-level socket stuff to libntp
+
+ include/libntp.h@1.1 +16 -0
+ BitKeeper file /deacon/backroom/ntp-dev/include/libntp.h
+
+ include/libntp.h@1.0 +0 -0
+
+ include/ntp_io.h@1.19 +1 -0
+ Begin moving some of the low-level socket stuff to libntp
+
+ libntp/Makefile.am@1.56 +1 -0
+ Begin moving some of the low-level socket stuff to libntp
+
+ libntp/socket.c@1.1 +732 -0
+ BitKeeper file /deacon/backroom/ntp-dev/libntp/socket.c
+
+ libntp/socket.c@1.0 +0 -0
+
+ ntpd/ntp_io.c@1.344 +8 -11
+ Begin moving some of the low-level socket stuff to libntp
+
+ChangeSet@1.2422.2.1, 2011-01-06 23:06:38-05:00, stenn@deacon.udel.edu
+ If the subject-name begins with @, prefix it with the certname
+
+ util/ntp-keygen.c@1.73.1.1 +10 -2
+ If the subject-name begins with @, prefix it with the certname
+
+ChangeSet@1.2422.1.2, 2011-01-06 20:56:23+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.
+ Default to silent make rules, override with make V=1 or ./configure
+ --disable-silent-rules.
+ Correct --with-openssl-incdir defaulting with pkg-config.
+ Correct ./build on systems without gtest available.
+
+ ChangeLog@1.760 +5 -0
+ [Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.
+ Default to silent make rules, override with make V=1 or ./configure
+ --disable-silent-rules.
+ Correct --with-openssl-incdir defaulting with pkg-config.
+ Correct ./build on systems without gtest available.
+
+ build@1.41 +1 -5
+ Do not attempt to build tests unconditionally, some systems do not have gtest.
+
+ configure.ac@1.508 +2 -40
+ default to silent make rules.
+ move --without-rpath/need_dash_r logic to m4/ntp_openssl.m4 which depends on it.
+
+ include/ntp_md5.h@1.7 +1 -1
+ quiet gcc 4.5.1 warning re: pointers to incompatible types
+
+ libntp/ssl_init.c@1.13 +1 -1
+ quiet unused local warning building w/o openssl
+
+ libparse/Makefile.am@1.21 +2 -17
+ Remove old transitional rule from move of generated .c to $srcdir
+
+ m4/ntp_openssl.m4@1.12 +58 -7
+ Correct --with-openssl-incdir defaulting with pkg-config.
+
+ ntpd/ntp_control.c@1.159 +2 -2
+ quiet shadowing warning seen on linux
+
+ ntpd/ntp_io.c@1.343 +1 -0
+ quiet used potentially uninit warning for some members of sockaddr_u
+
+ ntpd/ntp_peer.c@1.145 +5 -5
+ quiet "group" shadows global warning
+
+ ntpd/ntp_refclock.c@1.100 +1 -1
+ correct printf() format to match change from int to size_t
+
+ ntpd/refclock_acts.c@1.44 +1 -1
+ printf format mismatch %d vs size_t
+
+ ntpdate/ntpdate.c@1.81 +1 -1
+ quiet warning re: recvfrom() fromlen arg by using socklen_t not int.
+
+ ntpdc/ntpdc.c@1.92 +2 -1
+ correct printf() args to match change from int to size_t
+
+ ntpq/ntpq-subs.c@1.81 +16 -15
+ correct printf format mismatch warnings.
+
+ ntpq/ntpq.c@1.127 +12 -16
+ correct printf format mismatch warnings.
+
+ sntp/configure.ac@1.50.1.1 +2 -2
+ default to silent make rules
+
+ sntp/main.c@1.41.1.1 +22 -9
+ [Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.
+ tighten resolve_hosts 1st arg constness to quiet gcc 4.5.1 warning.
+
+ sntp/networking.c@1.46.1.1 +10 -8
+ [Bug 1776] sntp mishandles -t/--timeout and -a/--authentication.
+ tighten resolve_hosts 1st arg constness to quiet gcc 4.5.1 warning.
+
+ sntp/networking.h@1.23 +2 -1
+ tighten resolve_hosts 1st arg constness to quiet gcc 4.5.1 warning.
+
+ util/ntp-keygen.c@1.74 +1 -1
+ quiet warning when building without AUTOKEY
+
+ChangeSet@1.2424, 2011-01-06 10:04:48+00:00, stenn@psp-fb1.ntp.org
+ libevent
+
+ sntp/main.c@1.43 +93 -73
+ libevent
+
+ChangeSet@1.2422.1.1, 2011-01-06 08:55:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P112
+ TAG: NTP_4_2_7P112
+
+ ChangeLog@1.759 +1 -0
+ NTP_4_2_7P112
+
+ clockstuff/clktest-opts.c@1.36 +2 -2
+ NTP_4_2_7P112
+
+ clockstuff/clktest-opts.h@1.36 +3 -3
+ NTP_4_2_7P112
+
+ ntpd/ntpd-opts.c@1.116 +2 -2
+ NTP_4_2_7P112
+
+ ntpd/ntpd-opts.h@1.116 +3 -3
+ NTP_4_2_7P112
+
+ ntpd/ntpd-opts.texi@1.114 +2 -2
+ NTP_4_2_7P112
+
+ ntpd/ntpd.1@1.114 +2 -2
+ NTP_4_2_7P112
+
+ ntpdc/ntpdc-opts.c@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpdc/ntpdc-opts.h@1.113 +3 -3
+ NTP_4_2_7P112
+
+ ntpdc/ntpdc-opts.texi@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpdc/ntpdc.1@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpq/ntpq-opts.c@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpq/ntpq-opts.h@1.113 +3 -3
+ NTP_4_2_7P112
+
+ ntpq/ntpq-opts.texi@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpq/ntpq.1@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.113 +3 -3
+ NTP_4_2_7P112
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.113 +2 -2
+ NTP_4_2_7P112
+
+ ntpsnmpd/ntpsnmpd.1@1.113 +2 -2
+ NTP_4_2_7P112
+
+ packageinfo.sh@1.114 +1 -1
+ NTP_4_2_7P112
+
+ sntp/sntp-opts.c@1.113 +2 -2
+ NTP_4_2_7P112
+
+ sntp/sntp-opts.h@1.113 +3 -3
+ NTP_4_2_7P112
+
+ sntp/sntp-opts.texi@1.113 +2 -2
+ NTP_4_2_7P112
+
+ sntp/sntp.1@1.113 +2 -2
+ NTP_4_2_7P112
+
+ sntp/sntp.html@1.113 +2 -2
+ NTP_4_2_7P112
+
+ util/ntp-keygen-opts.c@1.111 +2 -2
+ NTP_4_2_7P112
+
+ util/ntp-keygen-opts.h@1.111 +3 -3
+ NTP_4_2_7P112
+
+ util/ntp-keygen-opts.texi@1.114 +2 -2
+ NTP_4_2_7P112
+
+ util/ntp-keygen.1@1.114 +2 -2
+ NTP_4_2_7P112
+
+ChangeSet@1.2393.1.1, 2011-01-06 07:58:30+00:00, stenn@psp-fb1.ntp.org
+ libevent changes
+
+ m4/ntp_libevent.m4@1.1 +80 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-libevent/m4/ntp_libevent.m4
+
+ m4/ntp_libevent.m4@1.0 +0 -0
+
+ sntp/Makefile.am@1.48 +14 -7
+ libevent changes
+
+ sntp/build-libevent/Makefile.am@1.1 +61 -0
+ BitKeeper file /a/etc/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-dev-libevent/sntp/build-libevent/Makefile.am
+
+ sntp/build-libevent/Makefile.am@1.0 +0 -0
+
+ sntp/configure.ac@1.49.1.1 +8 -0
+ libevent changes
+
+ sntp/main.c@1.42 +252 -53
+ libevent changes
+
+ sntp/networking.c@1.47 +86 -42
+ libevent changes
+
+ChangeSet@1.2422, 2011-01-06 04:43:56+00:00, davehart@shiny.ad.hartbrothers.com
+ ./build makes unit tests with V=0 before make check
+
+ build@1.40 +4 -0
+ Build unit tests first with V=0
+
+ tests/libntp/Makefile.am@1.26 +5 -6
+ Remove tabs from $INCLUDES to make compiler command lines less sparse
+
+ChangeSet@1.2421, 2011-01-06 04:37:31+00:00, hart@psp-deb1.ntp.org
+ Use silent rules for first make invocation in build
+
+ ChangeLog@1.758 +1 -0
+ Use make V=0 in build script to increase signal/noise ratio.
+
+ build@1.39 +1 -1
+ Use make V=0 in build script to increase signal/noise ratio.
+
+ChangeSet@1.2420, 2011-01-06 04:02:24+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1773] openssl not detected during ./configure.
+ [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
+
+ ChangeLog@1.757 +2 -0
+ [Bug 1773] openssl not detected during ./configure.
+ [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
+
+
+ m4/ntp_openssl.m4@1.11 +16 -22
+ [Bug 1773] openssl not detected during ./configure.
+
+
+ ntpd/ntp_config.c@1.282 +12 -0
+ [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
+
+
+ ntpd/ntp_util.c@1.91 +2 -10
+ filegen_register() timingstats and cryptostats unconditionally, so we do
+ not consider them unrecognized, as it's harmless to attempt to enable
+ cryptostats with a non-autokey ntpd.
+
+ChangeSet@1.2419, 2011-01-05 08:46:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P111
+ TAG: NTP_4_2_7P111
+
+ ChangeLog@1.756 +1 -0
+ NTP_4_2_7P111
+
+ clockstuff/clktest-opts.c@1.35 +2 -2
+ NTP_4_2_7P111
+
+ clockstuff/clktest-opts.h@1.35 +3 -3
+ NTP_4_2_7P111
+
+ ntpd/ntpd-opts.c@1.115 +2 -2
+ NTP_4_2_7P111
+
+ ntpd/ntpd-opts.h@1.115 +3 -3
+ NTP_4_2_7P111
+
+ ntpd/ntpd-opts.texi@1.113 +2 -2
+ NTP_4_2_7P111
+
+ ntpd/ntpd.1@1.113 +2 -2
+ NTP_4_2_7P111
+
+ ntpdc/ntpdc-opts.c@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpdc/ntpdc-opts.h@1.112 +3 -3
+ NTP_4_2_7P111
+
+ ntpdc/ntpdc-opts.texi@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpdc/ntpdc.1@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpq/ntpq-opts.c@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpq/ntpq-opts.h@1.112 +3 -3
+ NTP_4_2_7P111
+
+ ntpq/ntpq-opts.texi@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpq/ntpq.1@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.112 +3 -3
+ NTP_4_2_7P111
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.112 +2 -2
+ NTP_4_2_7P111
+
+ ntpsnmpd/ntpsnmpd.1@1.112 +2 -2
+ NTP_4_2_7P111
+
+ packageinfo.sh@1.113 +1 -1
+ NTP_4_2_7P111
+
+ sntp/sntp-opts.c@1.112 +2 -2
+ NTP_4_2_7P111
+
+ sntp/sntp-opts.h@1.112 +3 -3
+ NTP_4_2_7P111
+
+ sntp/sntp-opts.texi@1.112 +2 -2
+ NTP_4_2_7P111
+
+ sntp/sntp.1@1.112 +2 -2
+ NTP_4_2_7P111
+
+ sntp/sntp.html@1.112 +2 -2
+ NTP_4_2_7P111
+
+ util/ntp-keygen-opts.c@1.110 +2 -2
+ NTP_4_2_7P111
+
+ util/ntp-keygen-opts.h@1.110 +3 -3
+ NTP_4_2_7P111
+
+ util/ntp-keygen-opts.texi@1.113 +2 -2
+ NTP_4_2_7P111
+
+ util/ntp-keygen.1@1.113 +2 -2
+ NTP_4_2_7P111
+
+ChangeSet@1.2418, 2011-01-05 08:08:26+00:00, davehart@shiny.ad.hartbrothers.com
+ Quiet warnings
+
+ libntp/ntp_calendar.c@1.6 +15 -15
+ Quiet definition isn't declaration warning for now(), use
+ leading tabs for indents.
+
+ libntp/ssl_init.c@1.12 +2 -2
+ Quiet warning about printf formaat mismatch re: OPENSSL_VERSION_NUMBER
+ building against OpenSSL 1.0.0c.
+
+ChangeSet@1.2417, 2011-01-05 07:35:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1772] refclock_open() return value check wrong for ACTS.
+ Default --with-openssl-libdir and --with-openssl-incdir to the values
+ from pkg-config, falling back on our usual search paths if pkg-config
+ is not available or does not have openssl.pc on PKG_CONFIG_PATH.
+ Change refclock_open() to return -1 on failure like open().
+ Update all refclock_open() callers to check for fd <= 0 indicating
+ failure, so they work with older and newer refclock_open() and can
+ easily backport.
+ Initialize refclockproc.rio.fd to -1, harmonize refclock shutdown
+ entrypoints to avoid crashing, particularly if refclock_open() fails.
+ Enable tickadj-like taming of wildly off-spec Windows clock using
+ NTPD_TICKADJ_PPM env. var. specifying baseline slew.
+
+ ChangeLog@1.755 +12 -0
+ [Bug 1772] refclock_open() return value check wrong for ACTS.
+ Change refclock_open() to return -1 on failure like open().
+ Update all refclock_open() callers to check for fd <= 0 indicating
+ failure, so they work with older and newer refclock_open() and can
+ easily backport.
+ Initialize refclockproc.rio.fd to -1, harmonize refclock shutdown
+ entrypoints to avoid crashing, particularly if refclock_open() fails.
+ Enable tickadj-like taming of wildly off-spec Windows clock using
+ NTPD_TICKADJ_PPM env. var. specifying baseline slew.
+
+
+ include/ntp_refclock.h@1.28 +1 -2
+ Remove refclock_ioctl() declaration, it's private to ntp_refclock.c
+
+ include/ntp_stdlib.h@1.55 +11 -0
+ SAVE_ERRNO(somecode();) macro
+
+ m4/ntp_openssl.m4@1.10 +37 -3
+ try pkg-config for openssl default location, then our traditional
+ lib and include search paths.
+
+ ntpd/ntp_io.c@1.342 +1 -0
+ initialize refclockproc.rio.fd to -1
+
+ ntpd/ntp_refclock.c@1.99 +72 -41
+ Follow open() convention for refclock_open(), returning -1 on failure.
+
+ ntpd/refclock_acts.c@1.43 +3 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_arbiter.c@1.18 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_arc.c@1.23 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_as2201.c@1.13 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_bancomm.c@1.13 +1 -0
+ add comment about lack of io_addclock()
+
+ ntpd/refclock_chronolog.c@1.11 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_dumbclock.c@1.17 +1 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_fg.c@1.12 +22 -24
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_heath.c@1.16 +3 -2
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_hpgps.c@1.12 +7 -8
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_irig.c@1.34 +1 -2
+ minor cleanup
+
+ ntpd/refclock_jjy.c@1.21 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_jupiter.c@1.26 +2 -2
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_mx4200.c@1.28 +3 -3
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_oncore.c@1.91 +16 -11
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_palisade.c@1.37 +2 -3
+ minor cleanup
+
+ ntpd/refclock_pst.c@1.11 +2 -1
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_ripencc.c@1.15 +5 -8
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_trak.c@1.10 +7 -6
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_true.c@1.16 +11 -11
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_ulink.c@1.15 +11 -28
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_wwvb.c@1.26 +3 -3
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ntpd/refclock_zyfer.c@1.6 +11 -11
+ Update refclocks to treat 0 and -1 as failure so they can backport.
+
+ ports/winnt/libntp/termios.c@1.25 +44 -22
+ Follow open() convention for refclock_open(), returning -1 on failure.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.48 +26 -3
+ Enable tickadj-like taming of wildly off-spec Windows clock using
+ NTPD_TICKADJ_PPM env. var. specifying baseline slew.
+
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.37 +13 -25
+ Add refclock_fg, refclock_ulink, refclock_zyfer.c references.
+ Remove reference to nonexistent refclock_usno.c
+
+ChangeSet@1.2416, 2011-01-04 10:07:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P110
+ TAG: NTP_4_2_7P110
+
+ ChangeLog@1.754 +1 -0
+ NTP_4_2_7P110
+
+ clockstuff/clktest-opts.c@1.34 +2 -2
+ NTP_4_2_7P110
+
+ clockstuff/clktest-opts.h@1.34 +3 -3
+ NTP_4_2_7P110
+
+ ntpd/ntpd-opts.c@1.114 +2 -2
+ NTP_4_2_7P110
+
+ ntpd/ntpd-opts.h@1.114 +3 -3
+ NTP_4_2_7P110
+
+ ntpd/ntpd-opts.texi@1.112 +2 -2
+ NTP_4_2_7P110
+
+ ntpd/ntpd.1@1.112 +2 -2
+ NTP_4_2_7P110
+
+ ntpdc/ntpdc-opts.c@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpdc/ntpdc-opts.h@1.111 +3 -3
+ NTP_4_2_7P110
+
+ ntpdc/ntpdc-opts.texi@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpdc/ntpdc.1@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpq/ntpq-opts.c@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpq/ntpq-opts.h@1.111 +3 -3
+ NTP_4_2_7P110
+
+ ntpq/ntpq-opts.texi@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpq/ntpq.1@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.111 +3 -3
+ NTP_4_2_7P110
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.111 +2 -2
+ NTP_4_2_7P110
+
+ ntpsnmpd/ntpsnmpd.1@1.111 +2 -2
+ NTP_4_2_7P110
+
+ packageinfo.sh@1.112 +1 -1
+ NTP_4_2_7P110
+
+ sntp/sntp-opts.c@1.111 +2 -2
+ NTP_4_2_7P110
+
+ sntp/sntp-opts.h@1.111 +3 -3
+ NTP_4_2_7P110
+
+ sntp/sntp-opts.texi@1.111 +2 -2
+ NTP_4_2_7P110
+
+ sntp/sntp.1@1.111 +2 -2
+ NTP_4_2_7P110
+
+ sntp/sntp.html@1.111 +2 -2
+ NTP_4_2_7P110
+
+ util/ntp-keygen-opts.c@1.109 +2 -2
+ NTP_4_2_7P110
+
+ util/ntp-keygen-opts.h@1.109 +3 -3
+ NTP_4_2_7P110
+
+ util/ntp-keygen-opts.texi@1.112 +2 -2
+ NTP_4_2_7P110
+
+ util/ntp-keygen.1@1.112 +2 -2
+ NTP_4_2_7P110
+
+ChangeSet@1.2415, 2011-01-04 08:47:26+00:00, davehart@shiny.ad.hartbrothers.com
+ don't stop the search on a prefix match in get_ext_sys_var()
+
+ ntpd/ntp_control.c@1.158 +5 -3
+ don't stop the search on a prefix match in get_ext_sys_var()
+
+ChangeSet@1.2414, 2011-01-04 07:06:40+00:00, davehart@shiny.ad.hartbrothers.com
+ make V=0 and configure --enable-silent-rules supported.
+
+ ChangeLog@1.753 +1 -0
+ make V=0 and configure --enable-silent-rules supported.
+
+ configure.ac@1.507 +5 -0
+ support make V=0 and configure --enable-silent-rules
+
+ sntp/configure.ac@1.50 +5 -0
+ support make V=0 and configure --enable-silent-rules
+
+ChangeSet@1.2413, 2011-01-04 06:27:59+00:00, davehart@shiny.ad.hartbrothers.com
+ setvar modemsetup = ATE0... overrides ACTS driver default.
+ Preserve last timecode in ACTS driver (ntpq -ccv).
+ Tolerate previous ATE1 state when sending ACTS setup.
+ Enable raw tty line discipline in Windows port.
+ Allow tty open/close/open to succeed on Windows port.
+ Enable ACTS and CHU reference clock drivers on Windows.
+
+ ChangeLog@1.752 +8 -2
+ setvar modemsetup = ATE0... overrides ACTS driver default.
+ Preserve last timecode in ACTS driver (ntpq -ccv).
+ Tolerate previous ATE1 state when sending ACTS setup.
+ Enable raw tty line discipline in Windows port.
+ Allow tty open/close/open to succeed on Windows port.
+ Enable ACTS and CHU reference clock drivers on Windows.
+
+
+ include/ntp_machine.h@1.31 +0 -17
+ consolidate windows/posix compatibility shims in ntp_types.h
+
+ include/ntp_refclock.h@1.27 +2 -1
+ add active flag to struct refclockio to help dispense with pending
+ refclock input on Windows serial port close.
+
+ include/ntp_types.h@1.22 +12 -1
+ consolidate windows/posix compatibility shims in ntp_types.h
+
+ include/ntpd.h@1.158 +1 -0
+ add get_ext_sys_var() to retrieve value of user-defined vars
+
+ libntp/dolfptoa.c@1.9 +3 -3
+ quiet warning about signed/unsigned > comparison
+
+ libntp/icom.c@1.14 +10 -2
+ enable CHU refclock for Windows ntpd
+
+ libntp/msyslog.c@1.31 +1 -3
+ slight cleanup
+
+ libntp/recvbuff.c@1.35 +18 -14
+ cleanup
+
+ ntpd/complete.conf@1.15 +1 -0
+ add coverage for phone directive
+
+ ntpd/ntp_config.c@1.281 +1 -1
+ quote phone strings in saveconfig output
+
+ ntpd/ntp_control.c@1.157 +30 -1
+ add get_ext_sys_var() to retrieve value of user-defined vars
+
+ ntpd/ntp_io.c@1.341 +26 -21
+ add active flag to struct refclockio to help dispense with pending
+ refclock input on Windows serial port close.
+ use closeserial() instead of close() for refclock ttys for Windows'
+ port benefit.
+
+ ntpd/refclock_acts.c@1.42 +96 -64
+ Increment pp->polls in acts_poll().
+ Change UART rate from 9600 to 19200.
+ Allow modem setup string override using: setvar modemsetup = ATE0...
+ Tolerate echo of the setup string in case ATE1 was set previously.
+ Buffer incomplete input lines in unit struct leaving pp->a_lastcode with
+ the last complete line, allowing "ntpq -c cv" to retrieve it.
+ Enable ACTS driver in the Windows port.
+
+ ntpd/refclock_chu.c@1.50 +2 -2
+ Enable CHU driver in the Windows port (MINCHAR in Windows .h files).
+
+ ntpd/refclock_pcf.c@1.11 +2 -1
+ attempt to avoid fault in pcf_shutdown() after unsuccessful start.
+
+ ports/winnt/include/config.h@1.90 +3 -0
+ Enable ACTS and CHU refclock drivers in Windows port.
+
+ ports/winnt/include/termios.h@1.14 +8 -12
+ Support raw line discipline and serial open/close/open in Windows port.
+
+ ports/winnt/libntp/termios.c@1.24 +134 -40
+ Support raw line discipline and serial open/close/open in Windows port.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.55 +196 -70
+ Support raw line discipline and serial open/close/open in Windows port.
+
+ ports/winnt/vc6/libntp.dsp@1.57 +4 -0
+ Enable icom.c compile on Windows.
+
+ ports/winnt/vc6/ntpd.dsp@1.52 +0 -2
+ Enable ACTS and CHU refclocks on Windows.
+
+ ports/winnt/vs2003/libntp.vcproj@1.15 +3 -0
+ Enable icom.c compile on Windows.
+
+ ports/winnt/vs2003/ntpd.vcproj@1.13 +0 -42
+ Enable ACTS and CHU refclocks on Windows.
+
+ ports/winnt/vs2005/libntp.vcproj@1.13 +4 -0
+ Enable icom.c compile on Windows.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.13 +0 -40
+ Enable ACTS and CHU refclocks on Windows.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.34 +2 -4
+ Enable icom.c compile on Windows.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.36 +2 -6
+ Enable ACTS and CHU refclocks on Windows.
+
+ChangeSet@1.2082.4.203, 2011-01-03 21:20:42-05:00, stenn@deacon.udel.edu
NTP_4_2_6P3
TAG: NTP_4_2_6P3
- ChangeLog@1.709 +1 -0
+ ChangeLog@1.496.26.142 +1 -0
NTP_4_2_6P3
- ntpd/ntpd-opts.c@1.281 +5 -5
+ ntpd/ntpd-opts.c@1.248.33.1 +5 -5
NTP_4_2_6P3
- ntpd/ntpd-opts.h@1.281 +4 -4
+ ntpd/ntpd-opts.h@1.248.33.1 +4 -4
NTP_4_2_6P3
- ntpd/ntpd-opts.texi@1.279 +61 -2
+ ntpd/ntpd-opts.texi@1.246.33.1 +61 -2
NTP_4_2_6P3
- ntpd/ntpd.1@1.279 +2 -2
+ ntpd/ntpd.1@1.246.33.1 +2 -2
NTP_4_2_6P3
- ntpdc/ntpdc-opts.c@1.277 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.33.1 +5 -5
NTP_4_2_6P3
- ntpdc/ntpdc-opts.h@1.277 +4 -4
+ ntpdc/ntpdc-opts.h@1.244.33.1 +4 -4
NTP_4_2_6P3
- ntpdc/ntpdc-opts.texi@1.276 +66 -2
+ ntpdc/ntpdc-opts.texi@1.243.33.1 +66 -2
NTP_4_2_6P3
- ntpdc/ntpdc.1@1.276 +2 -2
+ ntpdc/ntpdc.1@1.243.33.1 +2 -2
NTP_4_2_6P3
- ntpq/ntpq-opts.c@1.278 +5 -5
+ ntpq/ntpq-opts.c@1.245.33.1 +5 -5
NTP_4_2_6P3
- ntpq/ntpq-opts.h@1.278 +4 -4
+ ntpq/ntpq-opts.h@1.245.33.1 +4 -4
NTP_4_2_6P3
- ntpq/ntpq-opts.texi@1.277 +51 -2
+ ntpq/ntpq-opts.texi@1.244.33.1 +51 -2
NTP_4_2_6P3
- ntpq/ntpq.1@1.277 +2 -2
+ ntpq/ntpq.1@1.244.33.1 +2 -2
NTP_4_2_6P3
- ntpsnmpd/ntpsnmpd-opts.c@1.157 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.34.1 +5 -5
NTP_4_2_6P3
- ntpsnmpd/ntpsnmpd-opts.h@1.157 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.34.1 +4 -4
NTP_4_2_6P3
- ntpsnmpd/ntpsnmpd-opts.texi@1.157 +24 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.34.1 +24 -2
NTP_4_2_6P3
- ntpsnmpd/ntpsnmpd.1@1.156 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.34.1 +2 -2
NTP_4_2_6P3
- packageinfo.sh@1.293 +3 -3
+ packageinfo.sh@1.255.31.2 +3 -3
NTP_4_2_6P3
- sntp/sntp-opts.c@1.148 +5 -5
+ sntp/sntp-opts.c@1.117.31.1 +5 -5
NTP_4_2_6P3
- sntp/sntp-opts.h@1.148 +4 -4
+ sntp/sntp-opts.h@1.117.31.1 +4 -4
NTP_4_2_6P3
- sntp/sntp-opts.texi@1.148 +56 -2
+ sntp/sntp-opts.texi@1.117.31.1 +56 -2
NTP_4_2_6P3
- sntp/sntp.1@1.148 +2 -2
+ sntp/sntp.1@1.117.31.1 +2 -2
NTP_4_2_6P3
- sntp/sntp.html@1.39 +56 -2
+ sntp/sntp.html@1.7.32.1 +56 -2
NTP_4_2_6P3
- util/ntp-keygen-opts.c@1.280 +5 -5
+ util/ntp-keygen-opts.c@1.247.33.1 +5 -5
NTP_4_2_6P3
- util/ntp-keygen-opts.h@1.280 +4 -4
+ util/ntp-keygen-opts.h@1.247.33.1 +4 -4
NTP_4_2_6P3
- util/ntp-keygen-opts.texi@1.279 +45 -2
+ util/ntp-keygen-opts.texi@1.246.33.1 +45 -2
NTP_4_2_6P3
- util/ntp-keygen.1@1.279 +2 -2
+ util/ntp-keygen.1@1.246.33.1 +2 -2
NTP_4_2_6P3
-ChangeSet@1.2289, 2011-01-03 17:52:19-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.202, 2011-01-03 17:52:19-05:00, stenn@deacon.udel.edu
4.2.6p3
- packageinfo.sh@1.292 +1 -1
+ packageinfo.sh@1.255.31.1 +1 -1
4.2.6p3
-ChangeSet@1.2288, 2011-01-03 17:50:01-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.201, 2011-01-03 17:50:01-05:00, stenn@deacon.udel.edu
Fix release date
NEWS@1.117 +1 -1
Fix release date
-ChangeSet@1.2287, 2011-01-03 17:04:32-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.200, 2011-01-03 17:04:32-05:00, stenn@deacon.udel.edu
cleanup NEWS file for 4.2.6p3
NEWS@1.116 +4 -5
cleanup
-ChangeSet@1.2286, 2011-01-01 08:35:01+00:00, hart@psp-os1.ntp.org
+ChangeSet@1.2411, 2011-01-03 20:19:11+01:00, jnperlin@hydra.localnet
+ [Bug 1771] fixed and test cases provided
+
+ ChangeLog@1.750 +2 -0
+ Bug 1771
+
+ include/ntp_calendar.h@1.8 +9 -0
+ [Bug 1771] add 'time()' mockup facility
+
+ libntp/clocktime.c@1.6 +10 -29
+ [Bug 1771] fix algorithmic problem (result should ALWAYS be in +/- 0.5yrs around receive time)
+
+ libntp/ntp_calendar.c@1.5 +36 -4
+ [Bug 1771] add 'time()' mockup facility
+
+ tests/libntp/caljulian.cpp@1.5 +15 -0
+ [Bug 1771] use 'time()' mockup facility
+
+ tests/libntp/calyearstart.cpp@1.3 +21 -11
+ [Bug 1771] use 'time()' mockup facility
+
+ tests/libntp/clocktime.cpp@1.3 +58 -18
+ [Bug 1771] use 'time()' mockup facility, added test for 'wild' clocktime input (lengthy)
+
+ tests/libntp/libntptest.cpp@1.2 +19 -0
+ [Bug 1771] use 'time()' mockup facility
+
+ tests/libntp/libntptest.h@1.4 +6 -0
+ [Bug 1771] use 'time()' mockup facility
+
+ChangeSet@1.2410, 2011-01-02 10:23:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P109
+ TAG: NTP_4_2_7P109
+
+ ChangeLog@1.749 +1 -0
+ NTP_4_2_7P109
+
+ clockstuff/clktest-opts.c@1.33 +2 -2
+ NTP_4_2_7P109
+
+ clockstuff/clktest-opts.h@1.33 +3 -3
+ NTP_4_2_7P109
+
+ ntpd/ntpd-opts.c@1.113 +2 -2
+ NTP_4_2_7P109
+
+ ntpd/ntpd-opts.h@1.113 +3 -3
+ NTP_4_2_7P109
+
+ ntpd/ntpd-opts.texi@1.111 +2 -2
+ NTP_4_2_7P109
+
+ ntpd/ntpd.1@1.111 +2 -2
+ NTP_4_2_7P109
+
+ ntpdc/ntpdc-opts.c@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpdc/ntpdc-opts.h@1.110 +3 -3
+ NTP_4_2_7P109
+
+ ntpdc/ntpdc-opts.texi@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpdc/ntpdc.1@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpq/ntpq-opts.c@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpq/ntpq-opts.h@1.110 +3 -3
+ NTP_4_2_7P109
+
+ ntpq/ntpq-opts.texi@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpq/ntpq.1@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.110 +3 -3
+ NTP_4_2_7P109
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.110 +2 -2
+ NTP_4_2_7P109
+
+ ntpsnmpd/ntpsnmpd.1@1.110 +2 -2
+ NTP_4_2_7P109
+
+ packageinfo.sh@1.111 +1 -1
+ NTP_4_2_7P109
+
+ sntp/sntp-opts.c@1.110 +2 -2
+ NTP_4_2_7P109
+
+ sntp/sntp-opts.h@1.110 +3 -3
+ NTP_4_2_7P109
+
+ sntp/sntp-opts.texi@1.110 +2 -2
+ NTP_4_2_7P109
+
+ sntp/sntp.1@1.110 +2 -2
+ NTP_4_2_7P109
+
+ sntp/sntp.html@1.110 +2 -2
+ NTP_4_2_7P109
+
+ util/ntp-keygen-opts.c@1.108 +2 -2
+ NTP_4_2_7P109
+
+ util/ntp-keygen-opts.h@1.108 +3 -3
+ NTP_4_2_7P109
+
+ util/ntp-keygen-opts.texi@1.111 +2 -2
+ NTP_4_2_7P109
+
+ util/ntp-keygen.1@1.111 +2 -2
+ NTP_4_2_7P109
+
+ChangeSet@1.2409, 2011-01-02 09:50:53+00:00, davehart@shiny.ad.hartbrothers.com
+ quiet warning about n potentially used uninit in ntpq's collect_display_vdc()
+
+ ntpq/ntpq-subs.c@1.80 +1 -0
+ quiet warning about n potentially used uninit in collect_display_vdc()
+
+ChangeSet@1.2408, 2011-01-02 09:41:39+00:00, davehart@shiny.ad.hartbrothers.com
+ refactor peer_st_flags() and kstatus_to_text() to use common
+ data-driven loop instead of repeated macro expansions.
+
+ include/lib_strbuf.h@1.7 +15 -15
+ increase LIB_GETBUF() line limit to 128 from 80, reduce number
+ of buffers from 200 to 16. Reduces memory footprint from 16k
+ to 4k. k_st_flags() in statestr.c needs more than 80.
+
+ include/ntp.h@1.192 +0 -6
+ move TRUE/FALSE defines to ntp_types.h so lib_strbuf.h has them.
+
+ include/ntp_stdlib.h@1.54 +3 -5
+ add k_st_flags() declaration, remove declarations for three functions
+ apparently removed long ago.
+
+ include/ntp_types.h@1.21 +8 -0
+ move TRUE/FALSE defines to ntp_types.h so lib_strbuf.h has them.
+
+ libntp/lib_strbuf.c@1.6 +1 -1
+ increase LIB_GETBUF() line limit to 128 from 80, reduce number
+ of buffers from 200 to 16. Reduces memory footprint from 16k
+ to 4k. k_st_flags() in statestr.c needs more than 80.
+
+ libntp/statestr.c@1.24 +140 -26
+ refactor peer_st_flags() and kstatus_to_text() to use common
+ data-driven loop instead of repeated macro expansions.
+
+ ntpd/ntp_control.c@1.156 +3 -133
+ use common code from statestr.c for server side of ntpq -c kerninfo's
+ decoding of kernel loop status bits.
+
+ ntpq/ntpq-subs.c@1.79 +2 -0
+ Do not crash on an empty value in collect_display_vdc()
+
+ChangeSet@1.2407, 2011-01-02 06:15:33+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog was omitted accidentally from last cset
+
+ ChangeLog@1.748 +3 -0
+ Remove nearly all strcpy() and most strcat() from NTP distribution.
+ One major pocket remains in ntp_crypto.c. libopts & libisc also have
+ (safe) uses of strcpy() and strcat() remaining.
+
+ChangeSet@1.2406, 2011-01-02 05:13:56+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove nearly all strcpy() and most strcat() from NTP distribution.
+ One major pocket remains in ntp_crypto.c. libopts & libisc also have
+ (safe) uses of strcpy() and strcat() remaining
+
+ include/ntpd.h@1.157 +2 -0
+ add mprintf_event() alternative to report_event()
+
+ libntp/findconfig.c@1.4 +4 -2
+ strcpy() -> strncpy()
+
+ libntp/statestr.c@1.23 +88 -82
+ get rid of strcpy(), strcat() use in statustoa()
+ mark constant statestr.c arrays such.
+
+ libntp/systime.c@1.51 +10 -10
+ strcpy() -> strncpy()
+
+ ntpd/ntp_control.c@1.155 +41 -22
+ add mprintf_event() alternative to report_event()
+
+ ntpd/ntp_peer.c@1.144 +2 -7
+ use mprintf_event() in a two places
+
+ ntpd/ntp_util.c@1.90 +38 -33
+ strcpy() -> strncpy()
+
+ ntpd/refclock_arbiter.c@1.17 +3 -2
+ strcpy() -> strncpy()
+
+ ntpd/refclock_as2201.c@1.12 +9 -4
+ bounds-checked strcpy() -> memcpy()
+
+ ntpd/refclock_chu.c@1.49 +1 -1
+ strcpy() -> strncpy()
+
+ ntpd/refclock_hpgps.c@1.11 +2 -2
+ bounds-checked strcpy() -> memcpy(), strcpy() -> strncpy()
+
+ ntpd/refclock_neoclock4x.c@1.19 +9 -8
+ strcpy() -> strncpy()
+
+ ntpd/refclock_oncore.c@1.90 +2 -1
+ add gcc printf format attribute to oncore_log_f declaration.
+
+ ntpd/refclock_parse.c@1.56 +4 -3
+ bounds-checked strcpy() -> memcpy()
+
+ ntpd/refclock_true.c@1.15 +1 -1
+ strcpy() -> strncpy()
+
+ ntpdate/ntpdate.c@1.80 +6 -6
+ strcpy() -> strncpy()
+
+ ntpdc/ntpdc.c@1.91 +2 -2
+ strcpy() -> strncpy()
+
+ ntpdc/ntpdc_ops.c@1.74 +1 -1
+ strcpy() -> strncpy()
+
+ ntpq/ntpq.c@1.126 +1 -1
+ strcpy() -> strncpy()
+
+ ports/winnt/libntp/randfile.c@1.5 +1 -2
+ strcpy()+strcat() -> snprintf()
+
+ChangeSet@1.2405, 2011-01-01 11:30:29+00:00, hart@psp-os1.ntp.org
+ copyright.html:
+ bump copyright.html for 2011
+
+ html/copyright.html@1.56 +2 -2
+ bump copyright.html for 2011
+
+ChangeSet@1.2403, 2011-01-01 06:23:20-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.747 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.18 +2 -3
+ Documentation updates from Dave Mills
+
+ html/copyright.html@1.54 +19 -1
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2402, 2011-01-01 10:32:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P108
+ TAG: NTP_4_2_7P108
+
+ ChangeLog@1.746 +1 -0
+ NTP_4_2_7P108
+
+ clockstuff/clktest-opts.c@1.32 +4 -4
+ NTP_4_2_7P108
+
+ clockstuff/clktest-opts.h@1.32 +4 -4
+ NTP_4_2_7P108
+
+ ntpd/ntpd-opts.c@1.112 +4 -4
+ NTP_4_2_7P108
+
+ ntpd/ntpd-opts.h@1.112 +4 -4
+ NTP_4_2_7P108
+
+ ntpd/ntpd-opts.texi@1.110 +2 -2
+ NTP_4_2_7P108
+
+ ntpd/ntpd.1@1.110 +2 -2
+ NTP_4_2_7P108
+
+ ntpdc/ntpdc-opts.c@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpdc/ntpdc-opts.h@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpdc/ntpdc-opts.texi@1.109 +2 -2
+ NTP_4_2_7P108
+
+ ntpdc/ntpdc.1@1.109 +2 -2
+ NTP_4_2_7P108
+
+ ntpq/ntpq-opts.c@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpq/ntpq-opts.h@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpq/ntpq-opts.texi@1.109 +2 -2
+ NTP_4_2_7P108
+
+ ntpq/ntpq.1@1.109 +2 -2
+ NTP_4_2_7P108
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.109 +4 -4
+ NTP_4_2_7P108
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.109 +2 -2
+ NTP_4_2_7P108
+
+ ntpsnmpd/ntpsnmpd.1@1.109 +2 -2
+ NTP_4_2_7P108
+
+ packageinfo.sh@1.110 +1 -1
+ NTP_4_2_7P108
+
+ sntp/sntp-opts.c@1.109 +4 -4
+ NTP_4_2_7P108
+
+ sntp/sntp-opts.h@1.109 +4 -4
+ NTP_4_2_7P108
+
+ sntp/sntp-opts.texi@1.109 +2 -2
+ NTP_4_2_7P108
+
+ sntp/sntp.1@1.109 +2 -2
+ NTP_4_2_7P108
+
+ sntp/sntp.html@1.109 +2 -2
+ NTP_4_2_7P108
+
+ util/ntp-keygen-opts.c@1.107 +4 -4
+ NTP_4_2_7P108
+
+ util/ntp-keygen-opts.h@1.107 +4 -4
+ NTP_4_2_7P108
+
+ util/ntp-keygen-opts.texi@1.110 +2 -2
+ NTP_4_2_7P108
+
+ util/ntp-keygen.1@1.110 +2 -2
+ NTP_4_2_7P108
+
+ChangeSet@1.2082.4.199, 2011-01-01 08:35:01+00:00, hart@psp-os1.ntp.org
copyright.html:
bump copyright.html to 2011
- html/copyright.html@1.49 +2 -2
+ html/copyright.html@1.46.1.3 +2 -2
bump copyright.html to 2011
-ChangeSet@1.2285, 2010-12-31 20:38:09-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2400, 2010-12-31 20:41:55-05:00, stenn@deacon.udel.edu
+ Typo cleanup from DLM's recent changes
+
+ ntpd/ntp_control.c@1.154 +1 -1
+ Typo cleanup from DLM's recent changes
+
+ ntpd/ntp_crypto.c@1.152 +0 -1
+ Typo cleanup from DLM's recent changes
+
+ChangeSet@1.2082.4.198, 2010-12-31 20:38:09-05:00, stenn@deacon.udel.edu
Update the copyright year
- ChangeLog@1.708 +1 -0
+ ChangeLog@1.496.26.141 +1 -0
Update the copyright year
include/copyright.def@1.13 +1 -1
Update the copyright year
-ChangeSet@1.2284, 2010-12-31 23:12:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2396.1.1, 2010-12-31 19:47:13-05:00, stenn@deacon.udel.edu
+ typo
+
+ ChangeLog@1.742.1.1 +1 -1
+ typo
+
+ChangeSet@1.2398, 2010-12-31 23:55:50+00:00, davehart@shiny.ad.hartbrothers.com
+ remove -dev-only remains of earlier [Bug 1764] fix from
+ ntpd/refclock_conf.c
+
+ include/ntpd.h@1.156 +4 -3
+ use gcc printf() format attribute in mprintf_clock_stats() decl
+
+ ntpd/ntp_util.c@1.89 +2 -3
+ fix warning about return; from mprintf_clock_stats() without value.
+
+ ntpd/refclock_conf.c@1.31 +0 -6
+ remove -dev-only remains of earlier [Bug 1764] fix
+
+ChangeSet@1.2082.4.197, 2010-12-31 23:12:25+00:00, davehart@shiny.ad.hartbrothers.com
Test for modem control just once in configure.ac
- configure.ac@1.491 +39 -45
+ configure.ac@1.465.1.26 +39 -45
Test for modem control support just once
- include/ntpd.h@1.142 +2 -1
+ include/ntpd.h@1.137.2.5 +2 -1
make refclock_conf[] pointers const
- ntpd/refclock_conf.c@1.30 +2 -2
+ ntpd/refclock_conf.c@1.28.1.2 +2 -2
make refclock_conf[] pointers const
-ChangeSet@1.2283, 2010-12-31 16:28:55-05:00, murray@malarky.udel.edu
+ChangeSet@1.2396, 2010-12-31 17:34:44-05:00, stenn@deacon.udel.edu
+ Autokey multiple identity group improvements from Dave Mills
+
+ ChangeLog@1.742 +1 -0
+ Autokey multiple identity group improvements from Dave Mills
+
+ html/authopt.html@1.69 +11 -8
+ Autokey multiple identity group improvements from Dave Mills
+
+ html/confopt.html@1.55 +2 -2
+ Autokey multiple identity group improvements from Dave Mills
+
+ ntpd/ntp_control.c@1.153 +2 -2
+ Autokey multiple identity group improvements from Dave Mills
+
+ ntpd/ntp_crypto.c@1.151 +24 -19
+ Autokey multiple identity group improvements from Dave Mills
+
+ util/ntp-keygen.c@1.73 +3 -8
+ Autokey multiple identity group improvements from Dave Mills
+
+ChangeSet@1.2395, 2010-12-31 17:29:22-05:00, stenn@deacon.udel.edu
+ [Bug 1768] TIOCFLUSH undefined in linux for refclock_acts
+
+ ChangeLog@1.741 +1 -0
+ [Bug 1768] TIOCFLUSH undefined in linux for refclock_acts
+
+ ntpd/refclock_acts.c@1.41 +47 -29
+ [Bug 1768] TIOCFLUSH undefined in linux for refclock_acts
+
+ChangeSet@1.2082.4.196, 2010-12-31 16:28:55-05:00, murray@malarky.udel.edu
refclock_conf.c, configure.ac, refclock_palisade.c, ChangeLog:
[Bug 1764] Palisade driver doesn't build on Linux. (cleanup)
- ChangeLog@1.707 +1 -0
+ ChangeLog@1.496.26.140 +1 -0
[Bug 1764] Palisade driver doesn't build on Linux. (cleanup)
- configure.ac@1.490 +16 -9
+ configure.ac@1.465.1.25 +16 -9
[Bug 1764] Palisade driver doesn't build on Linux. (cleanup)
- ntpd/refclock_conf.c@1.29 +1 -1
+ ntpd/refclock_conf.c@1.28.1.1 +1 -1
[Bug 1764] Palisade driver doesn't build on Linux. (cleanup)
- ntpd/refclock_palisade.c@1.34 +0 -5
+ ntpd/refclock_palisade.c@1.31.1.3 +0 -5
[Bug 1764] Palisade driver doesn't build on Linux. (cleanup)
-ChangeSet@1.2282, 2010-12-29 19:24:12-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2394, 2010-12-31 10:50:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P107
+ TAG: NTP_4_2_7P107
+
+ ChangeLog@1.740 +1 -0
+ NTP_4_2_7P107
+
+ clockstuff/clktest-opts.c@1.31 +2 -2
+ NTP_4_2_7P107
+
+ clockstuff/clktest-opts.h@1.31 +3 -3
+ NTP_4_2_7P107
+
+ ntpd/ntpd-opts.c@1.111 +2 -2
+ NTP_4_2_7P107
+
+ ntpd/ntpd-opts.h@1.111 +3 -3
+ NTP_4_2_7P107
+
+ ntpd/ntpd-opts.texi@1.109 +2 -2
+ NTP_4_2_7P107
+
+ ntpd/ntpd.1@1.109 +2 -2
+ NTP_4_2_7P107
+
+ ntpdc/ntpdc-opts.c@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpdc/ntpdc-opts.h@1.108 +3 -3
+ NTP_4_2_7P107
+
+ ntpdc/ntpdc-opts.texi@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpdc/ntpdc.1@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpq/ntpq-opts.c@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpq/ntpq-opts.h@1.108 +3 -3
+ NTP_4_2_7P107
+
+ ntpq/ntpq-opts.texi@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpq/ntpq.1@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.108 +3 -3
+ NTP_4_2_7P107
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.108 +2 -2
+ NTP_4_2_7P107
+
+ ntpsnmpd/ntpsnmpd.1@1.108 +2 -2
+ NTP_4_2_7P107
+
+ packageinfo.sh@1.109 +1 -1
+ NTP_4_2_7P107
+
+ sntp/sntp-opts.c@1.108 +2 -2
+ NTP_4_2_7P107
+
+ sntp/sntp-opts.h@1.108 +3 -3
+ NTP_4_2_7P107
+
+ sntp/sntp-opts.texi@1.108 +2 -2
+ NTP_4_2_7P107
+
+ sntp/sntp.1@1.108 +2 -2
+ NTP_4_2_7P107
+
+ sntp/sntp.html@1.108 +2 -2
+ NTP_4_2_7P107
+
+ util/ntp-keygen-opts.c@1.106 +2 -2
+ NTP_4_2_7P107
+
+ util/ntp-keygen-opts.h@1.106 +3 -3
+ NTP_4_2_7P107
+
+ util/ntp-keygen-opts.texi@1.109 +2 -2
+ NTP_4_2_7P107
+
+ util/ntp-keygen.1@1.109 +2 -2
+ NTP_4_2_7P107
+
+ChangeSet@1.2393, 2010-12-31 01:45:11-05:00, stenn@deacon.udel.edu
+ refclock_acts.c updates from Dave Mills
+
+ ChangeLog@1.739 +1 -0
+ refclock_acts.c updates from Dave Mills
+
+ ntpd/refclock_acts.c@1.40 +335 -380
+ refclock_acts.c updates from Dave Mills
+
+ChangeSet@1.2392, 2010-12-31 03:31:28+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1766] Oncore clock has offset/high jitter at startup.
+
+ ChangeLog@1.738 +1 -0
+ [Bug 1766] Oncore clock has offset/high jitter at startup.
+
+ include/ntp_stdlib.h@1.53 +2 -2
+ correct return types of mvsnprintf() and msnprintf() to match
+ vsnprintf() and snprintf().
+
+ include/ntpd.h@1.154 +1 -0
+ add mprintf_clock_stats() vararg alternative to record_clock_stats()
+
+ libntp/msyslog.c@1.30 +9 -3
+ correct return types of mvsnprintf() and msnprintf() to match
+ vsnprintf() and snprintf().
+
+ ntpd/ntp_util.c@1.88 +25 -0
+ add mprintf_clock_stats() vararg alternative to record_clock_stats()
+
+ ntpd/refclock_oncore.c@1.89 +263 -358
+ [Bug 1766] Oncore clock has offset/high jitter at startup.
+
+ ntpd/refclock_parse.c@1.55 +1 -1
+ eliminate warning
+
+ChangeSet@1.2389.1.1, 2010-12-30 10:52:24+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1764] Palisade driver doesn't build on Linux.
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ ChangeLog@1.735.1.1 +4 -0
+ [Bug 1764] Palisade driver doesn't build on Linux.
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ include/ntp_control.h@1.55 +0 -178
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ libntp/refnumtoa.c@1.10 +12 -13
+ make refnumtoa() return socktoa() for non-refclock addresses to
+ simplify ntpq peers billboard use.
+
+ ntpd/ntp_control.c@1.152 +178 -0
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ ntpd/ntp_io.c@1.340 +2 -1
+ Do not log an error if setsockopt(IPV6_MULTICAST_IF) returns an error and
+ the ifindex we attempted to set is already the scope in the bound address.
+
+ ntpd/refclock_conf.c@1.29 +6 -0
+ [Bug 1764] Palisade driver doesn't build on Linux.
+
+ ntpd/refclock_palisade.c@1.35 +3 -0
+ [Bug 1764] Palisade driver doesn't build on Linux.
+
+ ntpq/ntpq-subs.c@1.78 +46 -123
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ ntpq/ntpq.c@1.125 +124 -290
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ ntpq/ntpq.h@1.23 +5 -8
+ Move ntp_control.h variable IDs to ntp_control.c, remove their use by
+ ntpq. They are implementation details private to ntpd. [Bug 597] was
+ caused by ntpq's reliance on these IDs it need not know about.
+
+ChangeSet@1.2390, 2010-12-30 10:32:31+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P106
+ TAG: NTP_4_2_7P106
+
+ ChangeLog@1.736 +1 -0
+ NTP_4_2_7P106
+
+ clockstuff/clktest-opts.c@1.30 +2 -2
+ NTP_4_2_7P106
+
+ clockstuff/clktest-opts.h@1.30 +3 -3
+ NTP_4_2_7P106
+
+ ntpd/ntpd-opts.c@1.110 +2 -2
+ NTP_4_2_7P106
+
+ ntpd/ntpd-opts.h@1.110 +3 -3
+ NTP_4_2_7P106
+
+ ntpd/ntpd-opts.texi@1.108 +2 -2
+ NTP_4_2_7P106
+
+ ntpd/ntpd.1@1.108 +2 -2
+ NTP_4_2_7P106
+
+ ntpdc/ntpdc-opts.c@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpdc/ntpdc-opts.h@1.107 +3 -3
+ NTP_4_2_7P106
+
+ ntpdc/ntpdc-opts.texi@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpdc/ntpdc.1@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpq/ntpq-opts.c@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpq/ntpq-opts.h@1.107 +3 -3
+ NTP_4_2_7P106
+
+ ntpq/ntpq-opts.texi@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpq/ntpq.1@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.107 +3 -3
+ NTP_4_2_7P106
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.107 +2 -2
+ NTP_4_2_7P106
+
+ ntpsnmpd/ntpsnmpd.1@1.107 +2 -2
+ NTP_4_2_7P106
+
+ packageinfo.sh@1.108 +1 -1
+ NTP_4_2_7P106
+
+ sntp/sntp-opts.c@1.107 +2 -2
+ NTP_4_2_7P106
+
+ sntp/sntp-opts.h@1.107 +3 -3
+ NTP_4_2_7P106
+
+ sntp/sntp-opts.texi@1.107 +2 -2
+ NTP_4_2_7P106
+
+ sntp/sntp.1@1.107 +2 -2
+ NTP_4_2_7P106
+
+ sntp/sntp.html@1.107 +2 -2
+ NTP_4_2_7P106
+
+ util/ntp-keygen-opts.c@1.105 +2 -2
+ NTP_4_2_7P106
+
+ util/ntp-keygen-opts.h@1.105 +3 -3
+ NTP_4_2_7P106
+
+ util/ntp-keygen-opts.texi@1.108 +2 -2
+ NTP_4_2_7P106
+
+ util/ntp-keygen.1@1.108 +2 -2
+ NTP_4_2_7P106
+
+ChangeSet@1.2082.4.195, 2010-12-29 19:24:12-05:00, stenn@deacon.udel.edu
Update genCommitLog for the bk-5 release
- ChangeLog@1.706 +1 -0
+ ChangeLog@1.496.26.139 +1 -0
Update genCommitLog for the bk-5 release
- scripts/genCommitLog@1.7 +1 -1
+ scripts/genCommitLog@1.5.1.2 +1 -1
Update genCommitLog for the bk-5 release
-ChangeSet@1.2281, 2010-12-29 02:06:21-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2388, 2010-12-29 08:13:01+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P105
+ TAG: NTP_4_2_7P105
+
+ ChangeLog@1.734 +1 -0
+ NTP_4_2_7P105
+
+ clockstuff/clktest-opts.c@1.29 +2 -2
+ NTP_4_2_7P105
+
+ clockstuff/clktest-opts.h@1.29 +3 -3
+ NTP_4_2_7P105
+
+ ntpd/ntpd-opts.c@1.109 +2 -2
+ NTP_4_2_7P105
+
+ ntpd/ntpd-opts.h@1.109 +3 -3
+ NTP_4_2_7P105
+
+ ntpd/ntpd-opts.texi@1.107 +2 -2
+ NTP_4_2_7P105
+
+ ntpd/ntpd.1@1.107 +2 -2
+ NTP_4_2_7P105
+
+ ntpdc/ntpdc-opts.c@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpdc/ntpdc-opts.h@1.106 +3 -3
+ NTP_4_2_7P105
+
+ ntpdc/ntpdc-opts.texi@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpdc/ntpdc.1@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpq/ntpq-opts.c@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpq/ntpq-opts.h@1.106 +3 -3
+ NTP_4_2_7P105
+
+ ntpq/ntpq-opts.texi@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpq/ntpq.1@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.106 +3 -3
+ NTP_4_2_7P105
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.106 +2 -2
+ NTP_4_2_7P105
+
+ ntpsnmpd/ntpsnmpd.1@1.106 +2 -2
+ NTP_4_2_7P105
+
+ packageinfo.sh@1.107 +1 -1
+ NTP_4_2_7P105
+
+ sntp/sntp-opts.c@1.106 +2 -2
+ NTP_4_2_7P105
+
+ sntp/sntp-opts.h@1.106 +3 -3
+ NTP_4_2_7P105
+
+ sntp/sntp-opts.texi@1.106 +56 -2
+ NTP_4_2_7P105
+
+ sntp/sntp.1@1.106 +2 -2
+ NTP_4_2_7P105
+
+ sntp/sntp.html@1.106 +56 -2
+ NTP_4_2_7P105
+
+ util/ntp-keygen-opts.c@1.104 +2 -2
+ NTP_4_2_7P105
+
+ util/ntp-keygen-opts.h@1.104 +3 -3
+ NTP_4_2_7P105
+
+ util/ntp-keygen-opts.texi@1.107 +2 -2
+ NTP_4_2_7P105
+
+ util/ntp-keygen.1@1.107 +2 -2
+ NTP_4_2_7P105
+
+ChangeSet@1.2082.4.194, 2010-12-29 02:06:21-05:00, stenn@deacon.udel.edu
Distribute check--help from the correct variable
- scripts/Makefile.am@1.21 +1 -1
+ scripts/Makefile.am@1.17.1.4 +1 -1
Distribute check--help from the correct variable
-ChangeSet@1.2280, 2010-12-28 04:20:11-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2386, 2010-12-28 09:37:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P104
+ TAG: NTP_4_2_7P104
+
+ ChangeLog@1.733 +1 -0
+ NTP_4_2_7P104
+
+ clockstuff/clktest-opts.c@1.28 +2 -2
+ NTP_4_2_7P104
+
+ clockstuff/clktest-opts.h@1.28 +3 -3
+ NTP_4_2_7P104
+
+ ntpd/ntpd-opts.c@1.108 +2 -2
+ NTP_4_2_7P104
+
+ ntpd/ntpd-opts.h@1.108 +3 -3
+ NTP_4_2_7P104
+
+ ntpd/ntpd-opts.texi@1.106 +75 -2
+ NTP_4_2_7P104
+
+ ntpd/ntpd.1@1.106 +2 -2
+ NTP_4_2_7P104
+
+ ntpdc/ntpdc-opts.c@1.105 +2 -2
+ NTP_4_2_7P104
+
+ ntpdc/ntpdc-opts.h@1.105 +3 -3
+ NTP_4_2_7P104
+
+ ntpdc/ntpdc-opts.texi@1.105 +66 -2
+ NTP_4_2_7P104
+
+ ntpdc/ntpdc.1@1.105 +2 -2
+ NTP_4_2_7P104
+
+ ntpq/ntpq-opts.c@1.105 +2 -2
+ NTP_4_2_7P104
+
+ ntpq/ntpq-opts.h@1.105 +3 -3
+ NTP_4_2_7P104
+
+ ntpq/ntpq-opts.texi@1.105 +51 -2
+ NTP_4_2_7P104
+
+ ntpq/ntpq.1@1.105 +2 -2
+ NTP_4_2_7P104
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.105 +2 -2
+ NTP_4_2_7P104
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.105 +3 -3
+ NTP_4_2_7P104
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.105 +24 -2
+ NTP_4_2_7P104
+
+ ntpsnmpd/ntpsnmpd.1@1.105 +2 -2
+ NTP_4_2_7P104
+
+ packageinfo.sh@1.106 +1 -1
+ NTP_4_2_7P104
+
+ sntp/sntp-opts.c@1.105 +2 -2
+ NTP_4_2_7P104
+
+ sntp/sntp-opts.h@1.105 +3 -3
+ NTP_4_2_7P104
+
+ sntp/sntp-opts.texi@1.105 +1 -1
+ NTP_4_2_7P104
+
+ sntp/sntp.1@1.105 +2 -2
+ NTP_4_2_7P104
+
+ sntp/sntp.html@1.105 +1 -1
+ NTP_4_2_7P104
+
+ util/ntp-keygen-opts.c@1.103 +2 -2
+ NTP_4_2_7P104
+
+ util/ntp-keygen-opts.h@1.103 +3 -3
+ NTP_4_2_7P104
+
+ util/ntp-keygen-opts.texi@1.106 +46 -2
+ NTP_4_2_7P104
+
+ util/ntp-keygen.1@1.106 +2 -2
+ NTP_4_2_7P104
+
+ChangeSet@1.2082.4.193, 2010-12-28 04:20:11-05:00, stenn@deacon.udel.edu
Fix location of check--help for sntp
- sntp/Makefile.am@1.37 +1 -1
+ sntp/Makefile.am@1.21.1.16 +1 -1
Fix location of check--help for sntp
-ChangeSet@1.2279, 2010-12-28 03:30:18-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2385, 2010-12-28 04:17:05-05:00, stenn@deacon.udel.edu
+ Fix location of check--help for sntp
+
+ sntp/Makefile.am@1.46 +1 -1
+ Fix location of check--help for sntp
+
+ChangeSet@1.2082.4.192, 2010-12-28 03:30:18-05:00, stenn@deacon.udel.edu
typo
scripts/check--help@1.2 +1 -1
typo
-ChangeSet@1.2278, 2010-12-28 03:16:01-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.191, 2010-12-28 03:16:01-05:00, stenn@deacon.udel.edu
Create and use scripts/check--help when generating .texi files
- ChangeLog@1.705 +2 -0
+ ChangeLog@1.496.26.138 +2 -0
Create and use scripts/check--help when generating .texi files
- ntpd/Makefile.am@1.88 +1 -0
+ ntpd/Makefile.am@1.80.1.8 +1 -0
Create and use scripts/check--help when generating .texi files
- ntpdc/Makefile.am@1.53 +1 -0
+ ntpdc/Makefile.am@1.48.1.5 +1 -0
Create and use scripts/check--help when generating .texi files
- ntpq/Makefile.am@1.48 +1 -0
+ ntpq/Makefile.am@1.43.1.5 +1 -0
Create and use scripts/check--help when generating .texi files
- ntpsnmpd/Makefile.am@1.21 +1 -0
+ ntpsnmpd/Makefile.am@1.16.1.5 +1 -0
Create and use scripts/check--help when generating .texi files
- scripts/Makefile.am@1.20 +1 -0
+ scripts/Makefile.am@1.17.1.3 +1 -0
Create and use scripts/check--help when generating .texi files
scripts/check--help@1.1 +22 -0
@@ -1870,13 +98678,40 @@ ChangeSet@1.2278, 2010-12-28 03:16:01-05:00, stenn@deacon.udel.edu
scripts/check--help@1.0 +0 -0
- sntp/Makefile.am@1.36 +1 -0
+ sntp/Makefile.am@1.21.1.15 +1 -0
Create and use scripts/check--help when generating .texi files
- util/Makefile.am@1.51 +1 -0
+ util/Makefile.am@1.45.1.6 +1 -0
Create and use scripts/check--help when generating .texi files
-ChangeSet@1.2277, 2010-12-28 01:22:04-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2382, 2010-12-28 01:35:52-05:00, stenn@deacon.udel.edu
+ Support for multiple Autokey identity groups from Dave Mills
+
+ ChangeLog@1.730 +2 -0
+ Support for multiple Autokey identity groups from Dave Mills
+
+ html/autokey.html@1.17 +8 -44
+ Support for multiple Autokey identity groups from Dave Mills
+
+ include/ntp_control.h@1.54 +1 -1
+ Support for multiple Autokey identity groups from Dave Mills
+
+ include/ntpd.h@1.153 +1 -0
+ Support for multiple Autokey identity groups from Dave Mills
+
+ ntpd/ntp_config.c@1.280 +1 -1
+ Support for multiple Autokey identity groups from Dave Mills
+
+ ntpd/ntp_control.c@1.151 +6 -6
+ Support for multiple Autokey identity groups from Dave Mills
+
+ ntpd/ntp_crypto.c@1.150 +48 -58
+ Support for multiple Autokey identity groups from Dave Mills
+
+ ntpd/ntp_proto.c@1.315 +5 -4
+ Support for multiple Autokey identity groups from Dave Mills
+
+ChangeSet@1.2082.4.190, 2010-12-28 01:22:04-05:00, stenn@deacon.udel.edu
Update bk triggers for the bk-5 release
BitKeeper/triggers/post-incoming.license-warn@1.8 +3 -0
@@ -1888,266 +98723,1228 @@ ChangeSet@1.2277, 2010-12-28 01:22:04-05:00, stenn@deacon.udel.edu
BitKeeper/triggers/send@1.15 +2 -2
Update bk triggers for the bk-5 release
- ChangeLog@1.704 +3 -0
+ ChangeLog@1.496.26.137 +3 -0
Update bk triggers for the bk-5 release
-ChangeSet@1.2276, 2010-12-25 16:24:06-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2381, 2010-12-27 21:29:19+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntpq kerninfo command similar to ntpdc's.
+
+ ChangeLog@1.729 +1 -2
+ Add ntpq kerninfo, authinfo, and sysinfo commands similar to ntpdc's.
+
+ include/ntp_control.h@1.53 +19 -1
+ Add variables needed by ntpq -c kerninfo
+
+ include/ntp_stdlib.h@1.52 +1 -1
+ make socktohost() return const char * now that stoa() and friends do.
+
+ include/ntpd.h@1.152 +1 -1
+ make stoa() clone localaddrtoa() return const char * as socktoa() now does.
+
+ libntp/socktohost.c@1.11 +1 -1
+ make socktohost() return const char * now that stoa() and friends do.
+
+ ntpd/ntp_control.c@1.150 +410 -84
+ Add variables needed by ntpq -c kerninfo
+
+ ntpd/ntp_io.c@1.339 +2 -2
+ make stoa() clone localaddrtoa() return const char * as socktoa() now does.
+
+ ntpd/ntp_request.c@1.101 +4 -4
+ declare constant tables using const.
+
+ ntpdate/ntpdate.c@1.79 +1 -1
+ respect const stoa()
+
+ ntpdc/ntpdc.c@1.90 +1 -1
+ make nntohost() return const char * now that stao() and friends do.
+
+ ntpdc/ntpdc.h@1.10 +1 -1
+ make nntohost() return const char * now that stao() and friends do.
+
+ ntpdc/ntpdc_ops.c@1.73 +4 -4
+ correct kerninfo maxerror/esterror scaling
+
+ ntpq/ntpq-subs.c@1.77 +53 -7
+ Add ntpq kerninfo command similar to ntpdc's.
+
+ ntpq/ntpq.c@1.124 +5 -5
+ make nntohost() const char * to match similar change to stoa() etc.
+
+ ntpq/ntpq.h@1.22 +2 -2
+ make nntohost() const char * to match similar change to stoa() etc.
+
+ sntp/kod_management.c@1.22 +8 -9
+ quiet sntp/tests deprecated conversion from string constant to char *
+ warnings by making search_entry(), add_entry(), and del_entry()
+ hostname args const char *.
+
+ sntp/kod_management.h@1.9 +3 -4
+ quiet sntp/tests deprecated conversion from string constant to char *
+ warnings by making search_entry(), add_entry(), and del_entry()
+ hostname args const char *.
+
+ChangeSet@1.2380, 2010-12-25 23:34:57+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntpq authinfo command, similar to ntpdc's authinfo.
+
+ ChangeLog@1.728 +1 -0
+ Add ntpq authinfo command, similar to ntpdc's authinfo.
+
+ include/ntp_control.h@1.52 +10 -1
+ add variables for ntpq -c authinfo
+
+ include/ntpd.h@1.151 +1 -0
+ extern auth_timereset from ntp_request.c
+
+ ntpd/ntp_control.c@1.149 +47 -1
+ add variables for ntpq -c authinfo
+
+ ntpd/ntp_request.c@1.100 +1 -1
+ extern auth_timereset from ntp_request.c
+
+ ntpq/ntpq-subs.c@1.76 +31 -1
+ Add ntpq authinfo command, similar to ntpdc's authinfo.
+
+ChangeSet@1.2082.4.189, 2010-12-25 16:24:06-05:00, stenn@deacon.udel.edu
Fix typo in NEWS file
NEWS@1.115 +1 -1
Fix typo in NEWS file
-ChangeSet@1.2275, 2010-12-25 10:23:24+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.188, 2010-12-25 10:23:24+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC12
TAG: NTP_4_2_6P3_RC12
- ChangeLog@1.703 +1 -0
+ ChangeLog@1.496.26.136 +1 -0
NTP_4_2_6P3_RC12
- ntpd/ntpd-opts.c@1.280 +5 -5
+ ntpd/ntpd-opts.c@1.248.32.1 +5 -5
NTP_4_2_6P3_RC12
- ntpd/ntpd-opts.h@1.280 +4 -4
+ ntpd/ntpd-opts.h@1.248.32.1 +4 -4
NTP_4_2_6P3_RC12
- ntpd/ntpd-opts.texi@1.278 +2 -61
+ ntpd/ntpd-opts.texi@1.246.32.1 +2 -61
NTP_4_2_6P3_RC12
- ntpd/ntpd.1@1.278 +2 -2
+ ntpd/ntpd.1@1.246.32.1 +2 -2
NTP_4_2_6P3_RC12
- ntpdc/ntpdc-opts.c@1.276 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.32.1 +5 -5
NTP_4_2_6P3_RC12
- ntpdc/ntpdc-opts.h@1.276 +4 -4
+ ntpdc/ntpdc-opts.h@1.244.32.1 +4 -4
NTP_4_2_6P3_RC12
- ntpdc/ntpdc-opts.texi@1.275 +2 -66
+ ntpdc/ntpdc-opts.texi@1.243.32.1 +2 -66
NTP_4_2_6P3_RC12
- ntpdc/ntpdc.1@1.275 +2 -2
+ ntpdc/ntpdc.1@1.243.32.1 +2 -2
NTP_4_2_6P3_RC12
- ntpq/ntpq-opts.c@1.277 +5 -5
+ ntpq/ntpq-opts.c@1.245.32.1 +5 -5
NTP_4_2_6P3_RC12
- ntpq/ntpq-opts.h@1.277 +4 -4
+ ntpq/ntpq-opts.h@1.245.32.1 +4 -4
NTP_4_2_6P3_RC12
- ntpq/ntpq-opts.texi@1.276 +2 -51
+ ntpq/ntpq-opts.texi@1.244.32.1 +2 -51
NTP_4_2_6P3_RC12
- ntpq/ntpq.1@1.276 +2 -2
+ ntpq/ntpq.1@1.244.32.1 +2 -2
NTP_4_2_6P3_RC12
- ntpsnmpd/ntpsnmpd-opts.c@1.156 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.33.1 +5 -5
NTP_4_2_6P3_RC12
- ntpsnmpd/ntpsnmpd-opts.h@1.156 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.33.1 +4 -4
NTP_4_2_6P3_RC12
- ntpsnmpd/ntpsnmpd-opts.texi@1.156 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.33.1 +1 -1
NTP_4_2_6P3_RC12
- ntpsnmpd/ntpsnmpd.1@1.155 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.33.1 +2 -2
NTP_4_2_6P3_RC12
- packageinfo.sh@1.291 +1 -1
+ packageinfo.sh@1.255.30.1 +1 -1
NTP_4_2_6P3_RC12
- sntp/sntp-opts.c@1.147 +5 -5
+ sntp/sntp-opts.c@1.117.30.1 +5 -5
NTP_4_2_6P3_RC12
- sntp/sntp-opts.h@1.147 +4 -4
+ sntp/sntp-opts.h@1.117.30.1 +4 -4
NTP_4_2_6P3_RC12
- sntp/sntp-opts.texi@1.147 +6 -59
+ sntp/sntp-opts.texi@1.117.30.1 +6 -59
NTP_4_2_6P3_RC12
- sntp/sntp.1@1.147 +8 -4
+ sntp/sntp.1@1.117.30.1 +8 -4
NTP_4_2_6P3_RC12
- sntp/sntp.html@1.38 +6 -59
+ sntp/sntp.html@1.7.31.1 +6 -59
NTP_4_2_6P3_RC12
- util/ntp-keygen-opts.c@1.279 +5 -5
+ util/ntp-keygen-opts.c@1.247.32.1 +5 -5
NTP_4_2_6P3_RC12
- util/ntp-keygen-opts.h@1.279 +4 -4
+ util/ntp-keygen-opts.h@1.247.32.1 +4 -4
NTP_4_2_6P3_RC12
- util/ntp-keygen-opts.texi@1.278 +2 -45
+ util/ntp-keygen-opts.texi@1.246.32.1 +2 -45
NTP_4_2_6P3_RC12
- util/ntp-keygen.1@1.278 +2 -2
+ util/ntp-keygen.1@1.246.32.1 +2 -2
NTP_4_2_6P3_RC12
-ChangeSet@1.2274, 2010-12-25 04:14:17-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.187, 2010-12-25 04:14:17-05:00, stenn@deacon.udel.edu
RC12 NEWS updates
NEWS@1.114 +23 -4
RC12 NEWS updates
-ChangeSet@1.2273, 2010-12-22 08:57:41+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2379, 2010-12-25 06:12:51+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntpq sysinfo command, similar to ntpdc's sysinfo.
+
+ ChangeLog@1.727 +1 -0
+ Add ntpq sysinfo command, similar to ntpdc's sysinfo.
+
+ include/ntp_control.h@1.51 +5 -1
+ add variables needed by ntpq -c sysinfo
+
+ include/ntp_stdlib.h@1.51 +4 -3
+ make stoa() and friends return const char *
+
+ libntp/modetoa.c@1.5 +1 -1
+ make modestrings[] pointers const
+
+ libntp/numtoa.c@1.6 +26 -0
+ add refid_str() using code lifted from ntp_control.c
+
+ libntp/refnumtoa.c@1.9 +4 -4
+ make stoa() and friends return const char *
+
+ libntp/socktoa.c@1.15 +2 -2
+ make stoa() and friends return const char *
+
+ ntpd/ntp_control.c@1.148 +44 -14
+ add variables needed by ntpq -c sysinfo
+
+ ntpd/ntp_request.c@1.99 +1 -1
+ ntpdc -c sysinfo stability units are supposed to be ppm but were s/s
+
+ ntpdc/ntpdc_ops.c@1.72 +5 -5
+ correct bug in last change to print_pflag()
+
+ ntpq/ntpq-subs.c@1.75 +94 -20
+ Add ntpq sysinfo command, similar to ntpdc's sysinfo.
+
+ ntpq/ntpq.h@1.21 +4 -0
+ Add ntpq sysinfo command, similar to ntpdc's sysinfo.
+
+ sntp/networking.c@1.46 +1 -1
+ Silence warnings about deprecated conversion from string constant to
+ char *.
+
+ sntp/networking.h@1.22 +2 -1
+ Silence warnings about deprecated conversion from string constant to
+ char *.
+
+ChangeSet@1.2378, 2010-12-24 09:44:20+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P103
+ TAG: NTP_4_2_7P103
+
+ ChangeLog@1.726 +1 -0
+ NTP_4_2_7P103
+
+ clockstuff/clktest-opts.c@1.27 +2 -2
+ NTP_4_2_7P103
+
+ clockstuff/clktest-opts.h@1.27 +3 -3
+ NTP_4_2_7P103
+
+ ntpd/ntpd-opts.c@1.107 +2 -2
+ NTP_4_2_7P103
+
+ ntpd/ntpd-opts.h@1.107 +3 -3
+ NTP_4_2_7P103
+
+ ntpd/ntpd-opts.texi@1.105 +1 -1
+ NTP_4_2_7P103
+
+ ntpd/ntpd.1@1.105 +2 -2
+ NTP_4_2_7P103
+
+ ntpdc/ntpdc-opts.c@1.104 +2 -2
+ NTP_4_2_7P103
+
+ ntpdc/ntpdc-opts.h@1.104 +3 -3
+ NTP_4_2_7P103
+
+ ntpdc/ntpdc-opts.texi@1.104 +1 -1
+ NTP_4_2_7P103
+
+ ntpdc/ntpdc.1@1.104 +2 -2
+ NTP_4_2_7P103
+
+ ntpq/ntpq-opts.c@1.104 +2 -2
+ NTP_4_2_7P103
+
+ ntpq/ntpq-opts.h@1.104 +3 -3
+ NTP_4_2_7P103
+
+ ntpq/ntpq-opts.texi@1.104 +1 -1
+ NTP_4_2_7P103
+
+ ntpq/ntpq.1@1.104 +2 -2
+ NTP_4_2_7P103
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.104 +2 -2
+ NTP_4_2_7P103
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.104 +3 -3
+ NTP_4_2_7P103
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.104 +1 -1
+ NTP_4_2_7P103
+
+ ntpsnmpd/ntpsnmpd.1@1.104 +2 -2
+ NTP_4_2_7P103
+
+ packageinfo.sh@1.105 +1 -1
+ NTP_4_2_7P103
+
+ sntp/sntp-opts.c@1.104 +2 -2
+ NTP_4_2_7P103
+
+ sntp/sntp-opts.h@1.104 +3 -3
+ NTP_4_2_7P103
+
+ sntp/sntp-opts.texi@1.104 +1 -1
+ NTP_4_2_7P103
+
+ sntp/sntp.1@1.104 +2 -2
+ NTP_4_2_7P103
+
+ sntp/sntp.html@1.104 +1 -1
+ NTP_4_2_7P103
+
+ util/ntp-keygen-opts.c@1.102 +2 -2
+ NTP_4_2_7P103
+
+ util/ntp-keygen-opts.h@1.102 +3 -3
+ NTP_4_2_7P103
+
+ util/ntp-keygen-opts.texi@1.105 +1 -1
+ NTP_4_2_7P103
+
+ util/ntp-keygen.1@1.105 +2 -2
+ NTP_4_2_7P103
+
+ChangeSet@1.2377, 2010-12-24 04:03:04-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.725 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.16 +33 -40
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2376, 2010-12-24 08:05:27+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntpq pstats command similar to ntpdc's.
+ Remove ntpq pstatus command, rv/readvar does the same and more.
+
+ ChangeLog@1.724 +2 -0
+ Add ntpq pstats command similar to ntpdc's.
+ Remove ntpq pstatus command, rv/readvar does the same and more.
+
+ include/ntp_control.h@1.50 +9 -1
+ add peer variables needed for ntpq -c "pstats &1" similar to
+ ntpdc -c "pstats 127.127.20.0".
+
+ libntp/statestr.c@1.22 +4 -4
+ correct switch/case indents.
+
+ ntpd/ntp_control.c@1.147 +59 -16
+ add peer variables needed for ntpq -c "pstats &1" similar to
+ ntpdc -c "pstats 127.127.20.0".
+
+ ntpdc/ntpdc_ops.c@1.71 +47 -40
+ repair print_pflag() removing inappropriate bclient, add missing flags.
+
+ ntpq/ntpq-subs.c@1.74 +120 -62
+ Add ntpq pstats command similar to ntpdc's.
+ Remove ntpq pstatus command, rv/readvar does the same and more.
+
+ ntpq/ntpq.c@1.123 +24 -0
+ add nntohostp() like nntohost() but including port.
+
+ ntpq/ntpq.h@1.20 +1 -0
+ add nntohostp()
+
+ChangeSet@1.2372.1.1, 2010-12-23 19:18:14+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct ntpq handling of &1 with multiple servers on cmd line.
+
+ include/ntp_calendar.h@1.7 +6 -5
+ make pointers in months[] and daynames[] const
+
+ libntp/prettydate.c@1.18 +2 -2
+ make pointers in months[] and daynames[] const
+
+ ntpq/ntpq-subs.c@1.73 +2 -2
+ clean up signed/unsigned comparison warnings
+
+ ntpq/ntpq.c@1.122 +10 -16
+ Correct ntpq handling of &1 with multiple servers on cmd line.
+
+ChangeSet@1.2374, 2010-12-23 11:12:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P102
+ TAG: NTP_4_2_7P102
+
+ ChangeLog@1.723 +1 -0
+ NTP_4_2_7P102
+
+ clockstuff/clktest-opts.c@1.26 +2 -2
+ NTP_4_2_7P102
+
+ clockstuff/clktest-opts.h@1.26 +3 -3
+ NTP_4_2_7P102
+
+ ntpd/ntpd-opts.c@1.106 +2 -2
+ NTP_4_2_7P102
+
+ ntpd/ntpd-opts.h@1.106 +3 -3
+ NTP_4_2_7P102
+
+ ntpd/ntpd-opts.texi@1.104 +1 -1
+ NTP_4_2_7P102
+
+ ntpd/ntpd.1@1.104 +2 -2
+ NTP_4_2_7P102
+
+ ntpdc/ntpdc-opts.c@1.103 +2 -2
+ NTP_4_2_7P102
+
+ ntpdc/ntpdc-opts.h@1.103 +3 -3
+ NTP_4_2_7P102
+
+ ntpdc/ntpdc-opts.texi@1.103 +1 -1
+ NTP_4_2_7P102
+
+ ntpdc/ntpdc.1@1.103 +2 -2
+ NTP_4_2_7P102
+
+ ntpq/ntpq-opts.c@1.103 +2 -2
+ NTP_4_2_7P102
+
+ ntpq/ntpq-opts.h@1.103 +3 -3
+ NTP_4_2_7P102
+
+ ntpq/ntpq-opts.texi@1.103 +1 -1
+ NTP_4_2_7P102
+
+ ntpq/ntpq.1@1.103 +2 -2
+ NTP_4_2_7P102
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.103 +2 -2
+ NTP_4_2_7P102
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.103 +3 -3
+ NTP_4_2_7P102
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.103 +1 -1
+ NTP_4_2_7P102
+
+ ntpsnmpd/ntpsnmpd.1@1.103 +2 -2
+ NTP_4_2_7P102
+
+ packageinfo.sh@1.104 +1 -1
+ NTP_4_2_7P102
+
+ sntp/sntp-opts.c@1.103 +2 -2
+ NTP_4_2_7P102
+
+ sntp/sntp-opts.h@1.103 +3 -3
+ NTP_4_2_7P102
+
+ sntp/sntp-opts.texi@1.103 +1 -1
+ NTP_4_2_7P102
+
+ sntp/sntp.1@1.103 +2 -2
+ NTP_4_2_7P102
+
+ sntp/sntp.html@1.103 +1 -1
+ NTP_4_2_7P102
+
+ util/ntp-keygen-opts.c@1.101 +2 -2
+ NTP_4_2_7P102
+
+ util/ntp-keygen-opts.h@1.101 +3 -3
+ NTP_4_2_7P102
+
+ util/ntp-keygen-opts.texi@1.104 +1 -1
+ NTP_4_2_7P102
+
+ util/ntp-keygen.1@1.104 +2 -2
+ NTP_4_2_7P102
+
+ChangeSet@1.2373, 2010-12-23 02:22:35-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.722 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.68 +2 -2
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.15 +33 -23
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.27 +2 -2
+ Documentation updates from Dave Mills
+
+ html/ntpd.html@1.54 +14 -14
+ Documentation updates from Dave Mills
+
+ html/ntpq.html@1.43 +27 -23
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2372, 2010-12-23 07:03:00+00:00, davehart@shiny.ad.hartbrothers.com
+ Allow ntpq &1 associd use without preceding association-fetching.
+
+ ChangeLog@1.721 +1 -0
+ Allow ntpq &1 associd use without preceding association-fetching.
+
+ include/ntp_calendar.h@1.6 +2 -0
+ declare months[]
+
+ libntp/ntp_calendar.c@1.4 +7 -7
+ avoid shadows declaration warning with months[]
+
+ libntp/prettydate.c@1.17 +4 -4
+ match declaration to extern
+
+ ntpd/refclock_oncore.c@1.88 +5 -5
+ use libntp's months[] instead of local array
+
+ ntpdc/ntpdc.c@1.89 +0 -57
+ remove ntp_getopt() remains from ntpdc
+
+ ntpq/libntpq_subs.c@1.6 +7 -9
+ changes reflect dogetassoc() is no longer static
+
+ ntpq/ntpq-subs.c@1.72 +8 -11
+ make dogetassoc() global so ntpq.c getargs() can use it
+
+ ntpq/ntpq.c@1.121 +64 -123
+ Allow ntpq &1 associd use without preceding association-fetching.
+ Use libntp's months[]
+
+ ntpq/ntpq.h@1.19 +6 -3
+ use const
+
+ChangeSet@1.2371, 2010-12-22 12:37:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P101
+ TAG: NTP_4_2_7P101
+
+ ChangeLog@1.720 +1 -0
+ NTP_4_2_7P101
+
+ clockstuff/clktest-opts.c@1.25 +2 -2
+ NTP_4_2_7P101
+
+ clockstuff/clktest-opts.h@1.25 +3 -3
+ NTP_4_2_7P101
+
+ ntpd/ntpd-opts.c@1.105 +2 -2
+ NTP_4_2_7P101
+
+ ntpd/ntpd-opts.h@1.105 +3 -3
+ NTP_4_2_7P101
+
+ ntpd/ntpd-opts.texi@1.103 +1 -1
+ NTP_4_2_7P101
+
+ ntpd/ntpd.1@1.103 +2 -2
+ NTP_4_2_7P101
+
+ ntpdc/ntpdc-opts.c@1.102 +2 -2
+ NTP_4_2_7P101
+
+ ntpdc/ntpdc-opts.h@1.102 +3 -3
+ NTP_4_2_7P101
+
+ ntpdc/ntpdc-opts.texi@1.102 +1 -1
+ NTP_4_2_7P101
+
+ ntpdc/ntpdc.1@1.102 +2 -2
+ NTP_4_2_7P101
+
+ ntpq/ntpq-opts.c@1.102 +2 -2
+ NTP_4_2_7P101
+
+ ntpq/ntpq-opts.h@1.102 +3 -3
+ NTP_4_2_7P101
+
+ ntpq/ntpq-opts.texi@1.102 +1 -1
+ NTP_4_2_7P101
+
+ ntpq/ntpq.1@1.102 +2 -2
+ NTP_4_2_7P101
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.102 +2 -2
+ NTP_4_2_7P101
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.102 +3 -3
+ NTP_4_2_7P101
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.102 +1 -1
+ NTP_4_2_7P101
+
+ ntpsnmpd/ntpsnmpd.1@1.102 +2 -2
+ NTP_4_2_7P101
+
+ packageinfo.sh@1.103 +1 -1
+ NTP_4_2_7P101
+
+ sntp/sntp-opts.c@1.102 +2 -2
+ NTP_4_2_7P101
+
+ sntp/sntp-opts.h@1.102 +3 -3
+ NTP_4_2_7P101
+
+ sntp/sntp-opts.texi@1.102 +1 -1
+ NTP_4_2_7P101
+
+ sntp/sntp.1@1.102 +2 -2
+ NTP_4_2_7P101
+
+ sntp/sntp.html@1.102 +1 -1
+ NTP_4_2_7P101
+
+ util/ntp-keygen-opts.c@1.100 +2 -2
+ NTP_4_2_7P101
+
+ util/ntp-keygen-opts.h@1.100 +3 -3
+ NTP_4_2_7P101
+
+ util/ntp-keygen-opts.texi@1.103 +1 -1
+ NTP_4_2_7P101
+
+ util/ntp-keygen.1@1.103 +2 -2
+ NTP_4_2_7P101
+
+ChangeSet@1.2082.4.186, 2010-12-22 08:57:41+00:00, davehart@shiny.ad.hartbrothers.com
libopts 34.0.9 from AutoGen 5.11.6pre7
Relax minimum Automake version to 1.10 with updated libopts.m4.
- ChangeLog@1.702 +2 -1
+ ChangeLog@1.496.26.135 +2 -1
libopts 34.0.9 from AutoGen 5.11.6pre7
Relax minimum Automake version to 1.10 with updated libopts.m4.
- Makefile.am@1.100 +2 -2
+ Makefile.am@1.93.2.7 +2 -2
Relax minimum Automake version to 1.10 with updated libopts.m4.
- configure.ac@1.489 +1 -1
+ configure.ac@1.465.1.24 +1 -1
libopts 34.0.9 from AutoGen 5.11.6pre7
- sntp/Makefile.am@1.35 +2 -2
+ sntp/Makefile.am@1.21.1.14 +2 -2
Relax minimum Automake version to 1.10 with updated libopts.m4.
sntp/libopts/m4/libopts.m4@1.14 +45 -17
libopts 34.0.9 from AutoGen 5.11.6pre7
-ChangeSet@1.2270.1.1, 2010-12-21 07:15:24+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2369, 2010-12-21 16:21:21-05:00, stenn@deacon.udel.edu
+ Documentation updates for sntp
+
+ ChangeLog@1.718 +2 -0
+ Documentation updates for sntp
+
+ChangeSet@1.2368, 2010-12-21 11:27:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P100
+ TAG: NTP_4_2_7P100
+
+ ChangeLog@1.717 +1 -0
+ NTP_4_2_7P100
+
+ clockstuff/clktest-opts.c@1.24 +3 -3
+ NTP_4_2_7P100
+
+ clockstuff/clktest-opts.h@1.24 +3 -3
+ NTP_4_2_7P100
+
+ ntpd/ntpd-opts.c@1.104 +3 -3
+ NTP_4_2_7P100
+
+ ntpd/ntpd-opts.h@1.104 +3 -3
+ NTP_4_2_7P100
+
+ ntpd/ntpd-opts.texi@1.102 +1 -1
+ NTP_4_2_7P100
+
+ ntpd/ntpd.1@1.102 +2 -2
+ NTP_4_2_7P100
+
+ ntpdc/ntpdc-opts.c@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpdc/ntpdc-opts.h@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpdc/ntpdc-opts.texi@1.101 +1 -1
+ NTP_4_2_7P100
+
+ ntpdc/ntpdc.1@1.101 +2 -2
+ NTP_4_2_7P100
+
+ ntpq/ntpq-opts.c@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpq/ntpq-opts.h@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpq/ntpq-opts.texi@1.101 +1 -1
+ NTP_4_2_7P100
+
+ ntpq/ntpq.1@1.101 +2 -2
+ NTP_4_2_7P100
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.101 +3 -3
+ NTP_4_2_7P100
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.101 +1 -1
+ NTP_4_2_7P100
+
+ ntpsnmpd/ntpsnmpd.1@1.101 +2 -2
+ NTP_4_2_7P100
+
+ packageinfo.sh@1.102 +1 -1
+ NTP_4_2_7P100
+
+ sntp/sntp-opts.c@1.101 +3 -3
+ NTP_4_2_7P100
+
+ sntp/sntp-opts.h@1.101 +3 -3
+ NTP_4_2_7P100
+
+ sntp/sntp-opts.texi@1.101 +5 -4
+ NTP_4_2_7P100
+
+ sntp/sntp.1@1.101 +8 -4
+ NTP_4_2_7P100
+
+ sntp/sntp.html@1.101 +5 -4
+ NTP_4_2_7P100
+
+ util/ntp-keygen-opts.c@1.99 +3 -3
+ NTP_4_2_7P100
+
+ util/ntp-keygen-opts.h@1.99 +3 -3
+ NTP_4_2_7P100
+
+ util/ntp-keygen-opts.texi@1.102 +1 -1
+ NTP_4_2_7P100
+
+ util/ntp-keygen.1@1.102 +2 -2
+ NTP_4_2_7P100
+
+ChangeSet@1.2366, 2010-12-21 09:36:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P99
+ TAG: NTP_4_2_7P99
+
+ ChangeLog@1.716 +1 -0
+ NTP_4_2_7P99
+
+ clockstuff/clktest-opts.c@1.23 +2 -2
+ NTP_4_2_7P99
+
+ clockstuff/clktest-opts.h@1.23 +3 -3
+ NTP_4_2_7P99
+
+ ntpd/ntpd-opts.c@1.103 +2 -2
+ NTP_4_2_7P99
+
+ ntpd/ntpd-opts.h@1.103 +3 -3
+ NTP_4_2_7P99
+
+ ntpd/ntpd-opts.texi@1.101 +1 -1
+ NTP_4_2_7P99
+
+ ntpd/ntpd.1@1.101 +2 -2
+ NTP_4_2_7P99
+
+ ntpdc/ntpdc-opts.c@1.100 +2 -2
+ NTP_4_2_7P99
+
+ ntpdc/ntpdc-opts.h@1.100 +3 -3
+ NTP_4_2_7P99
+
+ ntpdc/ntpdc-opts.texi@1.100 +1 -1
+ NTP_4_2_7P99
+
+ ntpdc/ntpdc.1@1.100 +2 -2
+ NTP_4_2_7P99
+
+ ntpq/ntpq-opts.c@1.100 +2 -2
+ NTP_4_2_7P99
+
+ ntpq/ntpq-opts.h@1.100 +3 -3
+ NTP_4_2_7P99
+
+ ntpq/ntpq-opts.texi@1.100 +1 -1
+ NTP_4_2_7P99
+
+ ntpq/ntpq.1@1.100 +2 -2
+ NTP_4_2_7P99
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.100 +2 -2
+ NTP_4_2_7P99
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.100 +3 -3
+ NTP_4_2_7P99
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.100 +1 -1
+ NTP_4_2_7P99
+
+ ntpsnmpd/ntpsnmpd.1@1.100 +2 -2
+ NTP_4_2_7P99
+
+ packageinfo.sh@1.101 +1 -1
+ NTP_4_2_7P99
+
+ sntp/sntp-opts.c@1.100 +2 -2
+ NTP_4_2_7P99
+
+ sntp/sntp-opts.h@1.100 +3 -3
+ NTP_4_2_7P99
+
+ sntp/sntp-opts.texi@1.100 +1 -1
+ NTP_4_2_7P99
+
+ sntp/sntp.1@1.100 +2 -2
+ NTP_4_2_7P99
+
+ sntp/sntp.html@1.100 +1 -1
+ NTP_4_2_7P99
+
+ util/ntp-keygen-opts.c@1.98 +2 -2
+ NTP_4_2_7P99
+
+ util/ntp-keygen-opts.h@1.98 +3 -3
+ NTP_4_2_7P99
+
+ util/ntp-keygen-opts.texi@1.101 +1 -1
+ NTP_4_2_7P99
+
+ util/ntp-keygen.1@1.101 +2 -2
+ NTP_4_2_7P99
+
+ChangeSet@1.2082.46.1, 2010-12-21 07:15:24+00:00, davehart@shiny.ad.hartbrothers.com
handle % at end of string correctly in format_errmsg().
do not force trailing newline in m[v]snprintf().
- libntp/msyslog.c@1.27 +54 -29
+ libntp/msyslog.c@1.24.1.3 +54 -29
handle % at end of string correctly in format_errmsg().
do not force trailing newline in m[v]snprintf().
-ChangeSet@1.2271, 2010-12-20 18:41:39-08:00, stenn@stenn.ntp.org
+ChangeSet@1.2364, 2010-12-21 06:58:01+00:00, davehart@shiny.ad.hartbrothers.com
+ Add unit tests for msnprintf().
+ move responsibility for adding newline if not present from
+ format_errmsg() to addto_syslog() so that msnprintf() does
+ not also force a trailing newline.
+ Correct corner case of "%\0" in msyslog() and friends.
+
+ ChangeLog@1.715 +1 -0
+ Add unit tests for msnprintf().
+
+ libntp/msyslog.c@1.28 +49 -29
+ Move responsibility for adding newline if not present from
+ format_errmsg() to addto_syslog() so that msnprintf() does
+ not also force a trailing newline.
+ Correct corner case of %\0 in msyslog() and friends.
+
+ tests/libntp/Makefile.am@1.25 +1 -0
+ add msyslog.cpp
+
+ tests/libntp/msyslog.cpp@1.1 +84 -0
+ unit tests for msnprintf() and format_errmsg()
+
+ tests/libntp/msyslog.cpp@1.0 +0 -0
+
+ChangeSet@1.2082.4.184, 2010-12-20 18:41:39-08:00, stenn@stenn.ntp.org
[Bug 1743] update SNTP time reporting documentation
sntp/sntp-opts.def@1.19 +10 -5
[Bug 1743] update SNTP time reporting documentation
-ChangeSet@1.2267.1.8, 2010-12-20 07:54:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2363, 2010-12-20 18:13:16-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/pic/flt8.gif@1.1 +134 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt8.gif
+
+ html/pic/flt8.gif@1.0 +0 -0
+
+ html/pic/flt9.gif@1.1 +200 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt9.gif
+
+ html/pic/flt9.gif@1.0 +0 -0
+
+ChangeSet@1.2361, 2010-12-20 09:04:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P98
+ TAG: NTP_4_2_7P98
+
+ ChangeLog@1.713 +1 -0
+ NTP_4_2_7P98
+
+ clockstuff/clktest-opts.c@1.22 +2 -2
+ NTP_4_2_7P98
+
+ clockstuff/clktest-opts.h@1.22 +3 -3
+ NTP_4_2_7P98
+
+ ntpd/ntpd-opts.c@1.102 +2 -2
+ NTP_4_2_7P98
+
+ ntpd/ntpd-opts.h@1.102 +3 -3
+ NTP_4_2_7P98
+
+ ntpd/ntpd-opts.texi@1.100 +1 -1
+ NTP_4_2_7P98
+
+ ntpd/ntpd.1@1.100 +2 -2
+ NTP_4_2_7P98
+
+ ntpdc/ntpdc-opts.c@1.99 +2 -2
+ NTP_4_2_7P98
+
+ ntpdc/ntpdc-opts.h@1.99 +3 -3
+ NTP_4_2_7P98
+
+ ntpdc/ntpdc-opts.texi@1.99 +1 -1
+ NTP_4_2_7P98
+
+ ntpdc/ntpdc.1@1.99 +2 -2
+ NTP_4_2_7P98
+
+ ntpq/ntpq-opts.c@1.99 +2 -2
+ NTP_4_2_7P98
+
+ ntpq/ntpq-opts.h@1.99 +3 -3
+ NTP_4_2_7P98
+
+ ntpq/ntpq-opts.texi@1.99 +1 -1
+ NTP_4_2_7P98
+
+ ntpq/ntpq.1@1.99 +2 -2
+ NTP_4_2_7P98
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.99 +2 -2
+ NTP_4_2_7P98
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.99 +3 -3
+ NTP_4_2_7P98
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.99 +1 -1
+ NTP_4_2_7P98
+
+ ntpsnmpd/ntpsnmpd.1@1.99 +2 -2
+ NTP_4_2_7P98
+
+ packageinfo.sh@1.100 +1 -1
+ NTP_4_2_7P98
+
+ sntp/sntp-opts.c@1.99 +2 -2
+ NTP_4_2_7P98
+
+ sntp/sntp-opts.h@1.99 +3 -3
+ NTP_4_2_7P98
+
+ sntp/sntp-opts.texi@1.99 +1 -1
+ NTP_4_2_7P98
+
+ sntp/sntp.1@1.99 +2 -2
+ NTP_4_2_7P98
+
+ sntp/sntp.html@1.99 +1 -1
+ NTP_4_2_7P98
+
+ util/ntp-keygen-opts.c@1.97 +2 -2
+ NTP_4_2_7P98
+
+ util/ntp-keygen-opts.h@1.97 +3 -3
+ NTP_4_2_7P98
+
+ util/ntp-keygen-opts.texi@1.100 +1 -1
+ NTP_4_2_7P98
+
+ util/ntp-keygen.1@1.100 +2 -2
+ NTP_4_2_7P98
+
+ChangeSet@1.2360, 2010-12-20 03:50:47-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.712 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.14 +23 -17
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2359, 2010-12-20 08:24:12+00:00, hart@psp-fb1.ntp.org
+ ntp_parser.c:
+ Bison output
+ complete.conf:
+ add top-level ident directive
+
+ ntpd/complete.conf@1.14 +1 -0
+ add top-level ident directive
+
+ ntpd/ntp_parser.c@1.74 +393 -381
+ Bison output
+
+ChangeSet@1.2358, 2010-12-20 08:12:32+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1761] clockstuff/clktest-opts.h omitted from tarball.
+
+ ChangeLog@1.711 +1 -0
+ [Bug 1761] clockstuff/clktest-opts.h omitted from tarball.
+
+ clockstuff/Makefile.am@1.14 +1 -1
+ [Bug 1761] clockstuff/clktest-opts.h omitted from tarball.
+
+ ntpd/ntp_config.c@1.279 +4 -0
+ add "ident <group>" top-level directive at DLM request.
+
+ ntpd/ntp_parser.y@1.68 +2 -1
+ add "ident <group>" top-level directive at DLM request.
+
+ChangeSet@1.2082.44.8, 2010-12-20 07:54:12+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1458] Can not compile NTP on FreeBSD 4.7.
-- applies to prior lineedit cset which overlooked ChangeLog
[Bug 1762] manycastclient solicitation responses interfere.
- ChangeLog@1.699.1.3 +2 -0
+ ChangeLog@1.496.60.3 +2 -0
[Bug 1458] Can not compile NTP on FreeBSD 4.7.
-- applies to prior lineedit cset which overlooked ChangeLog
[Bug 1762] manycastclient solicitation responses interfere.
- include/ntp.h@1.173 +1 -1
+ include/ntp.h@1.168.1.5 +1 -1
struct interface -> endpt
- include/ntpd.h@1.141 +1 -1
+ include/ntpd.h@1.137.2.4 +1 -1
[Bug 1762] manycastclient solicitation responses interfere.
- include/recvbuff.h@1.20 +1 -1
+ include/recvbuff.h@1.19.1.1 +1 -1
struct interface -> endpt
- ntpd/ntp_peer.c@1.129 +33 -13
+ ntpd/ntp_peer.c@1.126.1.3 +33 -13
[Bug 1762] manycastclient solicitation responses interfere.
- ntpd/ntp_proto.c@1.299 +1 -2
+ ntpd/ntp_proto.c@1.297.2.2 +1 -2
[Bug 1762] manycastclient solicitation responses interfere.
-ChangeSet@1.2267.1.7, 2010-12-19 00:04:39-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2356, 2010-12-19 09:38:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P97
+ TAG: NTP_4_2_7P97
+
+ ChangeLog@1.709 +1 -0
+ NTP_4_2_7P97
+
+ clockstuff/clktest-opts.c@1.21 +21 -16
+ NTP_4_2_7P97
+
+ clockstuff/clktest-opts.h@1.21 +5 -5
+ NTP_4_2_7P97
+
+ ntpd/ntpd-opts.c@1.101 +16 -11
+ NTP_4_2_7P97
+
+ ntpd/ntpd-opts.h@1.101 +5 -5
+ NTP_4_2_7P97
+
+ ntpd/ntpd-opts.texi@1.99 +1 -1
+ NTP_4_2_7P97
+
+ ntpd/ntpd.1@1.99 +2 -2
+ NTP_4_2_7P97
+
+ ntpdc/ntpdc-opts.c@1.98 +21 -16
+ NTP_4_2_7P97
+
+ ntpdc/ntpdc-opts.h@1.98 +5 -5
+ NTP_4_2_7P97
+
+ ntpdc/ntpdc-opts.texi@1.98 +1 -1
+ NTP_4_2_7P97
+
+ ntpdc/ntpdc.1@1.98 +2 -2
+ NTP_4_2_7P97
+
+ ntpq/ntpq-opts.c@1.98 +21 -16
+ NTP_4_2_7P97
+
+ ntpq/ntpq-opts.h@1.98 +5 -5
+ NTP_4_2_7P97
+
+ ntpq/ntpq-opts.texi@1.98 +1 -1
+ NTP_4_2_7P97
+
+ ntpq/ntpq.1@1.98 +2 -2
+ NTP_4_2_7P97
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.98 +20 -15
+ NTP_4_2_7P97
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.98 +5 -5
+ NTP_4_2_7P97
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.98 +1 -1
+ NTP_4_2_7P97
+
+ ntpsnmpd/ntpsnmpd.1@1.98 +2 -2
+ NTP_4_2_7P97
+
+ packageinfo.sh@1.99 +1 -1
+ NTP_4_2_7P97
+
+ sntp/sntp-opts.c@1.98 +23 -18
+ NTP_4_2_7P97
+
+ sntp/sntp-opts.h@1.98 +5 -5
+ NTP_4_2_7P97
+
+ sntp/sntp-opts.texi@1.98 +1 -1
+ NTP_4_2_7P97
+
+ sntp/sntp.1@1.98 +2 -2
+ NTP_4_2_7P97
+
+ sntp/sntp.html@1.98 +1 -1
+ NTP_4_2_7P97
+
+ util/ntp-keygen-opts.c@1.96 +21 -16
+ NTP_4_2_7P97
+
+ util/ntp-keygen-opts.h@1.96 +5 -5
+ NTP_4_2_7P97
+
+ util/ntp-keygen-opts.texi@1.99 +1 -1
+ NTP_4_2_7P97
+
+ util/ntp-keygen.1@1.99 +2 -2
+ NTP_4_2_7P97
+
+ChangeSet@1.2082.44.7, 2010-12-19 00:04:39-05:00, stenn@deacon.udel.edu
Remove unused libntp/net.c.bak file
BitKeeper/deleted/.del-net.c.bak~d1c71b19@1.3 +0 -0
Delete: libntp/net.c.bak
-ChangeSet@1.2267.1.6, 2010-12-19 03:42:39+00:00, hart@psp-os1.ntp.org
+ChangeSet@1.2355, 2010-12-19 00:00:18-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.708 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.13 +17 -29
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.44.6, 2010-12-19 03:42:39+00:00, hart@psp-os1.ntp.org
sntp AutoGen 5.11.6pre5 output
- sntp/sntp-opts.c@1.146 +29 -30
+ sntp/sntp-opts.c@1.117.29.1 +29 -30
sntp AutoGen 5.11.6pre5 output
- sntp/sntp-opts.h@1.146 +13 -4
+ sntp/sntp-opts.h@1.117.29.1 +13 -4
sntp AutoGen 5.11.6pre5 output
- sntp/sntp-opts.texi@1.146 +85 -19
+ sntp/sntp-opts.texi@1.117.29.1 +85 -19
sntp AutoGen 5.11.6pre5 output
- sntp/sntp.1@1.146 +8 -6
+ sntp/sntp.1@1.117.29.1 +8 -6
sntp AutoGen 5.11.6pre5 output
- sntp/sntp.html@1.37 +79 -16
+ sntp/sntp.html@1.7.30.1 +79 -16
sntp AutoGen 5.11.6pre5 output
-ChangeSet@1.2267.1.5, 2010-12-19 01:10:44+00:00, hart@psp-os1.ntp.org
+ChangeSet@1.2082.44.5, 2010-12-19 01:10:44+00:00, hart@psp-os1.ntp.org
AutoGen 5.11.6pre5 output
- ntpd/ntpd-opts.c@1.279 +15 -10
+ ntpd/ntpd-opts.c@1.248.31.1 +15 -10
AutoGen 5.11.6pre5 output
- ntpd/ntpd-opts.h@1.279 +3 -3
+ ntpd/ntpd-opts.h@1.248.31.1 +3 -3
AutoGen 5.11.6pre5 output
- ntpd/ntpd-opts.texi@1.277 +61 -2
+ ntpd/ntpd-opts.texi@1.246.31.1 +61 -2
AutoGen 5.11.6pre5 output
- ntpd/ntpd.1@1.277 +2 -2
+ ntpd/ntpd.1@1.246.31.1 +2 -2
AutoGen 5.11.6pre5 output
- ntpdc/ntpdc-opts.c@1.275 +20 -15
+ ntpdc/ntpdc-opts.c@1.244.31.1 +20 -15
AutoGen 5.11.6pre5 output
- ntpdc/ntpdc-opts.h@1.275 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.31.1 +3 -3
AutoGen 5.11.6pre5 output
- ntpdc/ntpdc-opts.texi@1.274 +66 -2
+ ntpdc/ntpdc-opts.texi@1.243.31.1 +66 -2
AutoGen 5.11.6pre5 output
- ntpdc/ntpdc.1@1.274 +2 -2
+ ntpdc/ntpdc.1@1.243.31.1 +2 -2
AutoGen 5.11.6pre5 output
- ntpq/ntpq-opts.c@1.276 +20 -15
+ ntpq/ntpq-opts.c@1.245.31.1 +20 -15
AutoGen 5.11.6pre5 output
- ntpq/ntpq-opts.h@1.276 +3 -3
+ ntpq/ntpq-opts.h@1.245.31.1 +3 -3
AutoGen 5.11.6pre5 output
- ntpq/ntpq-opts.texi@1.275 +51 -2
+ ntpq/ntpq-opts.texi@1.244.31.1 +51 -2
AutoGen 5.11.6pre5 output
- ntpq/ntpq.1@1.275 +2 -2
+ ntpq/ntpq.1@1.244.31.1 +2 -2
AutoGen 5.11.6pre5 output
- ntpsnmpd/ntpsnmpd-opts.c@1.155 +19 -14
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.32.1 +19 -14
AutoGen 5.11.6pre5 output
- ntpsnmpd/ntpsnmpd-opts.h@1.155 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.32.1 +3 -3
AutoGen 5.11.6pre5 output
- ntpsnmpd/ntpsnmpd-opts.texi@1.155 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.32.1 +1 -1
AutoGen 5.11.6pre5 output
- ntpsnmpd/ntpsnmpd.1@1.154 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.32.1 +2 -2
AutoGen 5.11.6pre5 output
- util/ntp-keygen-opts.c@1.278 +20 -15
+ util/ntp-keygen-opts.c@1.247.31.1 +20 -15
AutoGen 5.11.6pre5 output
- util/ntp-keygen-opts.h@1.278 +3 -3
+ util/ntp-keygen-opts.h@1.247.31.1 +3 -3
AutoGen 5.11.6pre5 output
- util/ntp-keygen-opts.texi@1.277 +45 -2
+ util/ntp-keygen-opts.texi@1.246.31.1 +45 -2
AutoGen 5.11.6pre5 output
- util/ntp-keygen.1@1.277 +2 -2
+ util/ntp-keygen.1@1.246.31.1 +2 -2
AutoGen 5.11.6pre5 output
-ChangeSet@1.2267.1.4, 2010-12-19 00:59:46+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.44.4, 2010-12-19 00:59:46+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1760] ntpd Windows interpolation cannot be disabled.
Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre5.
applies to prior cset merged from ntp-stable-libopts-upstream
- ChangeLog@1.699.1.2 +2 -1
+ ChangeLog@1.496.60.2 +2 -1
[Bug 1760] ntpd Windows interpolation cannot be disabled.
Upgrade to libopts 34.0.9 from AutoGen 5.11.6pre5.
- ports/winnt/ntpd/nt_clockstuff.c@1.42 +3 -1
+ ports/winnt/ntpd/nt_clockstuff.c@1.38.1.4 +3 -1
[Bug 1760] ntpd Windows interpolation cannot be disabled.
-ChangeSet@1.2264.2.1, 2010-12-19 00:50:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.45.1, 2010-12-19 00:50:10+00:00, davehart@shiny.ad.hartbrothers.com
libopts 34.0.9 (AutoGen 5.11.6pre5)
sntp/libopts/Makefile.am@1.8 +5 -5
@@ -2192,7 +99989,98 @@ ChangeSet@1.2264.2.1, 2010-12-19 00:50:10+00:00, davehart@shiny.ad.hartbrothers.
sntp/libopts/xat-attribute.h@1.11 +1 -1
libopts 34.0.9 (AutoGen 5.11.6pre5)
-ChangeSet@1.2267.1.2, 2010-12-18 06:57:45+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2352, 2010-12-18 11:29:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P96
+ TAG: NTP_4_2_7P96
+
+ ChangeLog@1.706 +1 -0
+ NTP_4_2_7P96
+
+ clockstuff/clktest-opts.c@1.20 +3 -3
+ NTP_4_2_7P96
+
+ clockstuff/clktest-opts.h@1.20 +5 -5
+ NTP_4_2_7P96
+
+ ntpd/ntpd-opts.c@1.100 +3 -3
+ NTP_4_2_7P96
+
+ ntpd/ntpd-opts.h@1.100 +5 -5
+ NTP_4_2_7P96
+
+ ntpd/ntpd-opts.texi@1.98 +1 -1
+ NTP_4_2_7P96
+
+ ntpd/ntpd.1@1.98 +2 -2
+ NTP_4_2_7P96
+
+ ntpdc/ntpdc-opts.c@1.97 +3 -3
+ NTP_4_2_7P96
+
+ ntpdc/ntpdc-opts.h@1.97 +5 -5
+ NTP_4_2_7P96
+
+ ntpdc/ntpdc-opts.texi@1.97 +1 -1
+ NTP_4_2_7P96
+
+ ntpdc/ntpdc.1@1.97 +2 -2
+ NTP_4_2_7P96
+
+ ntpq/ntpq-opts.c@1.97 +3 -3
+ NTP_4_2_7P96
+
+ ntpq/ntpq-opts.h@1.97 +5 -5
+ NTP_4_2_7P96
+
+ ntpq/ntpq-opts.texi@1.97 +1 -1
+ NTP_4_2_7P96
+
+ ntpq/ntpq.1@1.97 +2 -2
+ NTP_4_2_7P96
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.97 +3 -3
+ NTP_4_2_7P96
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.97 +5 -5
+ NTP_4_2_7P96
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.97 +1 -1
+ NTP_4_2_7P96
+
+ ntpsnmpd/ntpsnmpd.1@1.97 +2 -2
+ NTP_4_2_7P96
+
+ packageinfo.sh@1.98 +1 -1
+ NTP_4_2_7P96
+
+ sntp/sntp-opts.c@1.97 +3 -3
+ NTP_4_2_7P96
+
+ sntp/sntp-opts.h@1.97 +5 -5
+ NTP_4_2_7P96
+
+ sntp/sntp-opts.texi@1.97 +1 -1
+ NTP_4_2_7P96
+
+ sntp/sntp.1@1.97 +2 -2
+ NTP_4_2_7P96
+
+ sntp/sntp.html@1.97 +1 -1
+ NTP_4_2_7P96
+
+ util/ntp-keygen-opts.c@1.95 +3 -3
+ NTP_4_2_7P96
+
+ util/ntp-keygen-opts.h@1.95 +5 -5
+ NTP_4_2_7P96
+
+ util/ntp-keygen-opts.texi@1.98 +1 -1
+ NTP_4_2_7P96
+
+ util/ntp-keygen.1@1.98 +2 -2
+ NTP_4_2_7P96
+
+ChangeSet@1.2082.44.2, 2010-12-18 06:57:45+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1458] Can not compile NTP on FreeBSD 4.7
libntp/ntp_lineedit.c@1.9 +17 -10
@@ -2201,100 +100089,219 @@ ChangeSet@1.2267.1.2, 2010-12-18 06:57:45+00:00, davehart@shiny.ad.hartbrothers.
m4/ntp_lineeditlibs.m4@1.10 +26 -0
[Bug 1458] Can not compile NTP on FreeBSD 4.7
-ChangeSet@1.2267.1.1, 2010-12-18 02:38:28+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2351, 2010-12-18 01:07:11-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.705 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.12 +24 -3
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2350, 2010-12-18 03:22:45+00:00, davehart@shiny.ad.hartbrothers.com
+ Log listening address as addr:port.
+ remove assoc_number < 0 check now that it is unsigned.
+
+ ntpd/ntp_io.c@1.337 +2 -3
+ Log listening address as addr:port
+
+ ntpq/libntpq.c@1.10 +1 -1
+ remove assoc_number < 0 check now that it is unsigned.
+
+ChangeSet@1.2082.44.1, 2010-12-18 02:38:28+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1758] setsockopt IPV6_MULTICAST_IF with wrong ifindex.
- ChangeLog@1.699.1.1 +1 -0
+ ChangeLog@1.496.60.1 +1 -0
[Bug 1758] setsockopt IPV6_MULTICAST_IF with wrong ifindex.
- ntpd/ntp_io.c@1.319.1.1 +48 -72
+ ntpd/ntp_io.c@1.306.3.1 +48 -72
[Bug 1758] setsockopt IPV6_MULTICAST_IF with wrong ifindex.
-ChangeSet@1.2269, 2010-12-17 02:53:54+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2348, 2010-12-17 04:38:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P95
+ TAG: NTP_4_2_7P95
+
+ ChangeLog@1.703 +1 -0
+ NTP_4_2_7P95
+
+ clockstuff/clktest-opts.c@1.19 +3 -3
+ NTP_4_2_7P95
+
+ clockstuff/clktest-opts.h@1.19 +15 -6
+ NTP_4_2_7P95
+
+ ntpd/ntpd-opts.c@1.99 +3 -3
+ NTP_4_2_7P95
+
+ ntpd/ntpd-opts.h@1.99 +15 -6
+ NTP_4_2_7P95
+
+ ntpd/ntpd-opts.texi@1.97 +2 -75
+ NTP_4_2_7P95
+
+ ntpd/ntpd.1@1.97 +2 -2
+ NTP_4_2_7P95
+
+ ntpdc/ntpdc-opts.c@1.96 +3 -3
+ NTP_4_2_7P95
+
+ ntpdc/ntpdc-opts.h@1.96 +15 -6
+ NTP_4_2_7P95
+
+ ntpdc/ntpdc-opts.texi@1.96 +2 -66
+ NTP_4_2_7P95
+
+ ntpdc/ntpdc.1@1.96 +2 -2
+ NTP_4_2_7P95
+
+ ntpq/ntpq-opts.c@1.96 +3 -3
+ NTP_4_2_7P95
+
+ ntpq/ntpq-opts.h@1.96 +15 -6
+ NTP_4_2_7P95
+
+ ntpq/ntpq-opts.texi@1.96 +2 -51
+ NTP_4_2_7P95
+
+ ntpq/ntpq.1@1.96 +2 -2
+ NTP_4_2_7P95
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.96 +3 -3
+ NTP_4_2_7P95
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.96 +15 -6
+ NTP_4_2_7P95
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.96 +2 -24
+ NTP_4_2_7P95
+
+ ntpsnmpd/ntpsnmpd.1@1.96 +2 -2
+ NTP_4_2_7P95
+
+ packageinfo.sh@1.97 +1 -1
+ NTP_4_2_7P95
+
+ sntp/sntp-opts.c@1.96 +3 -3
+ NTP_4_2_7P95
+
+ sntp/sntp-opts.h@1.96 +15 -6
+ NTP_4_2_7P95
+
+ sntp/sntp-opts.texi@1.96 +2 -56
+ NTP_4_2_7P95
+
+ sntp/sntp.1@1.96 +2 -2
+ NTP_4_2_7P95
+
+ sntp/sntp.html@1.96 +2 -56
+ NTP_4_2_7P95
+
+ util/ntp-keygen-opts.c@1.94 +3 -3
+ NTP_4_2_7P95
+
+ util/ntp-keygen-opts.h@1.94 +15 -6
+ NTP_4_2_7P95
+
+ util/ntp-keygen-opts.texi@1.97 +2 -47
+ NTP_4_2_7P95
+
+ util/ntp-keygen.1@1.97 +2 -2
+ NTP_4_2_7P95
+
+ChangeSet@1.2346, 2010-12-16 22:02:02-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.701 +1 -0
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.54 +10 -8
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.4.182, 2010-12-17 02:53:54+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1757] oncore snprintf("%m") doesn't expand %m.
- ChangeLog@1.700 +1 -0
+ ChangeLog@1.496.26.133 +1 -0
[Bug 1757] oncore snprintf("%m") doesn't expand %m.
- include/ntp_stdlib.h@1.44 +4 -1
+ include/ntp_stdlib.h@1.40.1.4 +4 -1
add mvsnprintf(), msnprintf() clones of vsnprintf() and snprintf() which
expand %m to strerror(errno) like msyslog()
- libntp/msyslog.c@1.26 +43 -23
+ libntp/msyslog.c@1.24.1.2 +43 -23
add mvsnprintf(), msnprintf() clones of vsnprintf() and snprintf() which
expand %m to strerror(errno) like msyslog()
- ntpd/ntp_io.c@1.320 +1 -1
+ ntpd/ntp_io.c@1.306.1.14 +1 -1
silence potentially uninit warning
- ntpd/refclock_oncore.c@1.83 +5 -5
+ ntpd/refclock_oncore.c@1.82.1.1 +5 -5
[Bug 1757] oncore snprintf("%m") doesn't expand %m.
-ChangeSet@1.2264.1.3, 2010-12-17 01:59:53+00:00, hart@psp-os1.ntp.org
+ChangeSet@1.2082.42.3, 2010-12-17 01:59:53+00:00, hart@psp-os1.ntp.org
Many files:
Autogen 5.11.6pre3 output
- ntpd/ntpd-opts.c@1.276.1.1 +5 -5
+ ntpd/ntpd-opts.c@1.248.30.1 +5 -5
Autogen 5.11.6pre3 output
- ntpd/ntpd-opts.h@1.276.1.1 +13 -4
+ ntpd/ntpd-opts.h@1.248.30.1 +13 -4
Autogen 5.11.6pre3 output
- ntpd/ntpd-opts.texi@1.274.1.1 +1 -1
+ ntpd/ntpd-opts.texi@1.246.30.1 +1 -1
Autogen 5.11.6pre3 output
- ntpd/ntpd.1@1.274.1.1 +2 -2
+ ntpd/ntpd.1@1.246.30.1 +2 -2
Autogen 5.11.6pre3 output
- ntpdc/ntpdc-opts.c@1.272.1.1 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.30.1 +5 -5
Autogen 5.11.6pre3 output
- ntpdc/ntpdc-opts.h@1.272.1.1 +13 -4
+ ntpdc/ntpdc-opts.h@1.244.30.1 +13 -4
Autogen 5.11.6pre3 output
- ntpdc/ntpdc-opts.texi@1.271.1.1 +1 -1
+ ntpdc/ntpdc-opts.texi@1.243.30.1 +1 -1
Autogen 5.11.6pre3 output
- ntpdc/ntpdc.1@1.271.1.1 +2 -2
+ ntpdc/ntpdc.1@1.243.30.1 +2 -2
Autogen 5.11.6pre3 output
- ntpq/ntpq-opts.c@1.273.1.1 +5 -5
+ ntpq/ntpq-opts.c@1.245.30.1 +5 -5
Autogen 5.11.6pre3 output
- ntpq/ntpq-opts.h@1.273.1.1 +13 -4
+ ntpq/ntpq-opts.h@1.245.30.1 +13 -4
Autogen 5.11.6pre3 output
- ntpq/ntpq-opts.texi@1.272.1.1 +1 -1
+ ntpq/ntpq-opts.texi@1.244.30.1 +1 -1
Autogen 5.11.6pre3 output
- ntpq/ntpq.1@1.272.1.1 +2 -2
+ ntpq/ntpq.1@1.244.30.1 +2 -2
Autogen 5.11.6pre3 output
- ntpsnmpd/ntpsnmpd-opts.c@1.152.1.1 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.31.1 +5 -5
Autogen 5.11.6pre3 output
- ntpsnmpd/ntpsnmpd-opts.h@1.152.1.1 +13 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.31.1 +13 -4
Autogen 5.11.6pre3 output
- ntpsnmpd/ntpsnmpd-opts.texi@1.152.1.1 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.31.1 +1 -1
Autogen 5.11.6pre3 output
- ntpsnmpd/ntpsnmpd.1@1.151.1.1 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.31.1 +2 -2
Autogen 5.11.6pre3 output
- util/ntp-keygen-opts.c@1.275.1.1 +5 -5
+ util/ntp-keygen-opts.c@1.247.30.1 +5 -5
Autogen 5.11.6pre3 output
- util/ntp-keygen-opts.h@1.275.1.1 +13 -4
+ util/ntp-keygen-opts.h@1.247.30.1 +13 -4
Autogen 5.11.6pre3 output
- util/ntp-keygen-opts.texi@1.274.1.1 +1 -1
+ util/ntp-keygen-opts.texi@1.246.30.1 +1 -1
Autogen 5.11.6pre3 output
- util/ntp-keygen.1@1.274.1.1 +2 -2
+ util/ntp-keygen.1@1.246.30.1 +2 -2
Autogen 5.11.6pre3 output
-ChangeSet@1.2264.1.2, 2010-12-17 01:46:51+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.42.2, 2010-12-17 01:46:51+00:00, davehart@shiny.ad.hartbrothers.com
restore NTP local patch to LIBOPTS_CHECK to not build libopts
from the top-level configure.ac.
@@ -2302,10 +100309,10 @@ ChangeSet@1.2264.1.2, 2010-12-17 01:46:51+00:00, davehart@shiny.ad.hartbrothers.
restore NTP local patch to LIBOPTS_CHECK to not build libopts
from the top-level configure.ac.
-ChangeSet@1.2264.1.1, 2010-12-17 01:43:41+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.42.1, 2010-12-17 01:43:41+00:00, davehart@shiny.ad.hartbrothers.com
libopts 33.5.8 unmodified from AutoGen 5.11.6pre3
- ChangeLog@1.699 +1 -1
+ ChangeLog@1.496.26.132 +1 -1
libopts 33.5.8 unmodified from AutoGen 5.11.6pre3
sntp/libopts/Makefile.am@1.7 +5 -5
@@ -2347,79 +100354,79 @@ ChangeSet@1.2264.1.1, 2010-12-17 01:43:41+00:00, davehart@shiny.ad.hartbrothers.
sntp/libopts/xat-attribute.h@1.10 +1 -1
libopts 33.5.8 unmodified from AutoGen 5.11.6pre3
-ChangeSet@1.2266, 2010-12-16 20:22:36-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.179, 2010-12-16 20:22:36-05:00, stenn@deacon.udel.edu
libopts upgrade
- ntpd/ntpd-opts.c@1.277 +5 -5
+ ntpd/ntpd-opts.c@1.248.29.1 +5 -5
libopts upgrade
- ntpd/ntpd-opts.h@1.277 +13 -4
+ ntpd/ntpd-opts.h@1.248.29.1 +13 -4
libopts upgrade
- ntpd/ntpd-opts.texi@1.275 +61 -2
+ ntpd/ntpd-opts.texi@1.246.29.1 +61 -2
libopts upgrade
- ntpd/ntpd.1@1.275 +2 -2
+ ntpd/ntpd.1@1.246.29.1 +2 -2
libopts upgrade
- ntpdc/ntpdc-opts.c@1.273 +5 -5
+ ntpdc/ntpdc-opts.c@1.244.29.1 +5 -5
libopts upgrade
- ntpdc/ntpdc-opts.h@1.273 +13 -4
+ ntpdc/ntpdc-opts.h@1.244.29.1 +13 -4
libopts upgrade
- ntpdc/ntpdc-opts.texi@1.272 +66 -2
+ ntpdc/ntpdc-opts.texi@1.243.29.1 +66 -2
libopts upgrade
- ntpdc/ntpdc.1@1.272 +2 -2
+ ntpdc/ntpdc.1@1.243.29.1 +2 -2
libopts upgrade
- ntpq/ntpq-opts.c@1.274 +5 -5
+ ntpq/ntpq-opts.c@1.245.29.1 +5 -5
libopts upgrade
- ntpq/ntpq-opts.h@1.274 +13 -4
+ ntpq/ntpq-opts.h@1.245.29.1 +13 -4
libopts upgrade
- ntpq/ntpq-opts.texi@1.273 +51 -2
+ ntpq/ntpq-opts.texi@1.244.29.1 +51 -2
libopts upgrade
- ntpq/ntpq.1@1.273 +2 -2
+ ntpq/ntpq.1@1.244.29.1 +2 -2
libopts upgrade
- ntpsnmpd/ntpsnmpd-opts.c@1.153 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.30.1 +5 -5
libopts upgrade
- ntpsnmpd/ntpsnmpd-opts.h@1.153 +13 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.30.1 +13 -4
libopts upgrade
- ntpsnmpd/ntpsnmpd-opts.texi@1.153 +24 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.30.1 +24 -2
libopts upgrade
- ntpsnmpd/ntpsnmpd.1@1.152 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.30.1 +2 -2
libopts upgrade
- util/ntp-keygen-opts.c@1.276 +5 -5
+ util/ntp-keygen-opts.c@1.247.29.1 +5 -5
libopts upgrade
- util/ntp-keygen-opts.h@1.276 +13 -4
+ util/ntp-keygen-opts.h@1.247.29.1 +13 -4
libopts upgrade
- util/ntp-keygen-opts.texi@1.275 +45 -2
+ util/ntp-keygen-opts.texi@1.246.29.1 +45 -2
libopts upgrade
- util/ntp-keygen.1@1.275 +2 -2
+ util/ntp-keygen.1@1.246.29.1 +2 -2
libopts upgrade
-ChangeSet@1.2265, 2010-12-16 23:57:51+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.178, 2010-12-16 23:57:51+00:00, davehart@shiny.ad.hartbrothers.com
first verbose --version attempt caused --help to segfault.
libntp/ntp_libopts.c@1.3 +7 -6
first verbose --version attempt caused --help to segfault.
-ChangeSet@1.2264, 2010-12-16 09:07:58+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.177, 2010-12-16 09:07:58+00:00, davehart@shiny.ad.hartbrothers.com
Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1.
- ChangeLog@1.698 +1 -0
+ ChangeLog@1.496.26.131 +1 -0
Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1.
sntp/libopts/Makefile.am@1.6 +5 -5
@@ -2469,35 +100476,35 @@ ChangeSet@1.2264, 2010-12-16 09:07:58+00:00, davehart@shiny.ad.hartbrothers.com
sntp/libopts/xat-attribute.h@1.9 +1 -1
libopts 33.4.8
-ChangeSet@1.2263, 2010-12-16 06:16:02+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.176, 2010-12-16 06:16:02+00:00, davehart@shiny.ad.hartbrothers.com
#include <config.h> in new file libntp/ntp_libopts.c
add libopts includes to libntp INCLUDES = now that ntp_libopts.c
uses them.
- ChangeLog@1.697 +1 -1
+ ChangeLog@1.496.26.130 +1 -1
typo
- libntp/Makefile.am@1.53 +3 -3
+ libntp/Makefile.am@1.51.1.2 +3 -3
add libopts includes to libntp INCLUDES = now that ntp_libopts.c
uses them.
libntp/ntp_libopts.c@1.2 +4 -1
#include <config.h> in new file libntp/ntp_libopts.c
-ChangeSet@1.2262, 2010-12-16 04:42:37+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.175, 2010-12-16 04:42:37+00:00, davehart@shiny.ad.hartbrothers.com
* [Bug 1740] ntpdc treats many counters as signed. (backport)
* [Bug 1754] --version output should be more verbose.
* Suppress ntp-keygen OpenSSL version display for --help, --version,
display both build and runtime OpenSLL versions when they differ.
- ChangeLog@1.696 +4 -0
+ ChangeLog@1.496.26.129 +4 -0
* [Bug 1740] ntpdc treats many counters as signed. (backport)
* [Bug 1754] --version output should be more verbose.
* Suppress ntp-keygen OpenSSL version display for --help, --version,
display both build and runtime OpenSLL versions when they differ.
- include/Makefile.am@1.39 +1 -0
+ include/Makefile.am@1.38.1.1 +1 -0
add ntp_libopts.h
include/ntp_libopts.h@1.1 +13 -0
@@ -2505,7 +100512,7 @@ ChangeSet@1.2262, 2010-12-16 04:42:37+00:00, davehart@shiny.ad.hartbrothers.com
include/ntp_libopts.h@1.0 +0 -0
- libntp/Makefile.am@1.52 +1 -0
+ libntp/Makefile.am@1.51.1.1 +1 -0
add ntp_libopts.c
libntp/ntp_libopts.c@1.1 +50 -0
@@ -2513,170 +100520,492 @@ ChangeSet@1.2262, 2010-12-16 04:42:37+00:00, davehart@shiny.ad.hartbrothers.com
libntp/ntp_libopts.c@1.0 +0 -0
- ntpd/ntp_scanner.c@1.34 +2 -2
+ ntpd/ntp_scanner.c@1.31.1.3 +2 -2
suppress gcc4 warning about signed overflow by using
unsigned counter and index
- ntpd/ntpd.c@1.113 +2 -1
+ ntpd/ntpd.c@1.110.2.3 +2 -1
[Bug 1754] --version output should be more verbose.
- ntpdc/ntpdc.c@1.79 +2 -1
+ ntpdc/ntpdc.c@1.75.1.4 +2 -1
[Bug 1754] --version output should be more verbose.
- ntpdc/ntpdc_ops.c@1.65 +191 -197
+ ntpdc/ntpdc_ops.c@1.62.1.3 +191 -197
[Bug 1740] ntpdc treats many counters as signed. (backport)
- ntpq/ntpq.c@1.105 +2 -1
+ ntpq/ntpq.c@1.97.1.8 +2 -1
[Bug 1754] --version output should be more verbose.
- ports/winnt/vc6/libntp.dsp@1.54 +4 -0
+ ports/winnt/vc6/libntp.dsp@1.43.1.11 +4 -0
add libntp/ntp_libopts.c reference
- ports/winnt/vc6/ntpkeygen.dsp@1.22 +2 -2
+ ports/winnt/vc6/ntpkeygen.dsp@1.20.1.2 +2 -2
correct ntp-keygen Version string to mention ntp-keygen not ntpkeygen
- ports/winnt/vs2003/libntp.vcproj@1.9 +3 -0
+ ports/winnt/vs2003/libntp.vcproj@1.4.1.5 +3 -0
add libntp/ntp_libopts.c reference
- ports/winnt/vs2003/ntpkeygen.vcproj@1.5 +2 -2
+ ports/winnt/vs2003/ntpkeygen.vcproj@1.3.1.2 +2 -2
correct ntp-keygen Version string to mention ntp-keygen not ntpkeygen
- ports/winnt/vs2005/libntp.vcproj@1.9 +4 -0
+ ports/winnt/vs2005/libntp.vcproj@1.4.1.5 +4 -0
add libntp/ntp_libopts.c reference
- ports/winnt/vs2005/ntpkeygen.vcproj@1.5 +2 -2
+ ports/winnt/vs2005/ntpkeygen.vcproj@1.3.1.2 +2 -2
correct ntp-keygen Version string to mention ntp-keygen not ntpkeygen
- ports/winnt/vs2008/libntp/libntp.vcproj@1.27 +8 -0
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.3.1 +8 -0
add libntp/ntp_libopts.c reference
- ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.11 +2 -68
+ ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.9.2.1 +2 -68
correct ntp-keygen Version string to mention ntp-keygen not ntpkeygen
- ports/winnt/vs2008/ntpd/ntpd.vcproj@1.25 +4 -0
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.21.2.1 +4 -0
add include/ntp_libopts.h reference
- util/Makefile.am@1.50 +9 -1
+ util/Makefile.am@1.45.1.5 +9 -1
Generate, use version.c for verbose --version output
- util/ntp-keygen.c@1.66 +13 -2
+ util/ntp-keygen.c@1.64.1.2 +13 -2
[Bug 1754] --version output should be more verbose.
-ChangeSet@1.2261, 2010-12-15 20:23:17+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.174, 2010-12-15 20:23:17+00:00, davehart@shiny.ad.hartbrothers.com
Use LIBS not LDFLAGS for configure tests of -lcrypto, -lcrypto -lz
- m4/ntp_openssl.m4@1.8 +6 -6
+ m4/ntp_openssl.m4@1.4.1.4 +6 -6
Use LIBS not LDFLAGS for configure tests of -lcrypto, -lcrypto -lz
-ChangeSet@1.2260, 2010-12-15 08:27:35+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2338, 2010-12-15 19:01:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
+
+ ChangeLog@1.696 +1 -0
+ [Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
+
+ ntpd/ntp_peer.c@1.142 +2 -1
+ [Bug 1753] 4.2.7p94 faults on startup in newpeer(), strdup(NULL).
+
+ChangeSet@1.2337, 2010-12-15 10:12:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P94
+ TAG: NTP_4_2_7P94
+
+ ChangeLog@1.695 +1 -0
+ NTP_4_2_7P94
+
+ clockstuff/clktest-opts.c@1.18 +2 -2
+ NTP_4_2_7P94
+
+ clockstuff/clktest-opts.h@1.18 +3 -3
+ NTP_4_2_7P94
+
+ ntpd/ntpd-opts.c@1.98 +2 -2
+ NTP_4_2_7P94
+
+ ntpd/ntpd-opts.h@1.98 +3 -3
+ NTP_4_2_7P94
+
+ ntpd/ntpd-opts.texi@1.96 +2 -2
+ NTP_4_2_7P94
+
+ ntpd/ntpd.1@1.96 +2 -2
+ NTP_4_2_7P94
+
+ ntpdc/ntpdc-opts.c@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpdc/ntpdc-opts.h@1.95 +3 -3
+ NTP_4_2_7P94
+
+ ntpdc/ntpdc-opts.texi@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpdc/ntpdc.1@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpq/ntpq-opts.c@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpq/ntpq-opts.h@1.95 +3 -3
+ NTP_4_2_7P94
+
+ ntpq/ntpq-opts.texi@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpq/ntpq.1@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.95 +3 -3
+ NTP_4_2_7P94
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.95 +2 -2
+ NTP_4_2_7P94
+
+ ntpsnmpd/ntpsnmpd.1@1.95 +2 -2
+ NTP_4_2_7P94
+
+ packageinfo.sh@1.96 +1 -1
+ NTP_4_2_7P94
+
+ sntp/sntp-opts.c@1.95 +2 -2
+ NTP_4_2_7P94
+
+ sntp/sntp-opts.h@1.95 +3 -3
+ NTP_4_2_7P94
+
+ sntp/sntp-opts.texi@1.95 +2 -2
+ NTP_4_2_7P94
+
+ sntp/sntp.1@1.95 +2 -2
+ NTP_4_2_7P94
+
+ sntp/sntp.html@1.95 +4 -7
+ NTP_4_2_7P94
+
+ util/ntp-keygen-opts.c@1.93 +2 -2
+ NTP_4_2_7P94
+
+ util/ntp-keygen-opts.h@1.93 +3 -3
+ NTP_4_2_7P94
+
+ util/ntp-keygen-opts.texi@1.96 +2 -2
+ NTP_4_2_7P94
+
+ util/ntp-keygen.1@1.96 +2 -2
+ NTP_4_2_7P94
+
+ChangeSet@1.2082.4.173, 2010-12-15 08:27:35+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1618] Unreachable code in jjy_start(). (backport from ntp-dev)
(applies to -stable changes previously pulled to -dev only)
[Bug 1719] ntp-keygen -V crash. (backport)
- ChangeLog@1.695 +2 -0
+ ChangeLog@1.496.26.128 +2 -0
[Bug 1618] Unreachable code in jjy_start(). (backport from ntp-dev)
[Bug 1719] ntp-keygen -V crash. (backport)
- util/ntp-keygen.c@1.65 +0 -1
+ util/ntp-keygen.c@1.64.1.1 +0 -1
[Bug 1719] ntp-keygen -V crash. (backport)
-ChangeSet@1.2257.1.22, 2010-12-15 01:23:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2329.1.1, 2010-12-15 01:49:59-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills.
+
+ ChangeLog@1.691.1.1 +1 -0
+ Documentation updates from Dave Mills.
+
+ html/authopt.html@1.67 +13 -10
+ Documentation updates from Dave Mills.
+
+ html/autokey.html@1.11 +49 -62
+ Documentation updates from Dave Mills.
+
+ html/copyright.html@1.53 +61 -82
+ Documentation updates from Dave Mills.
+
+ html/drivers/driver8.html@1.26 +244 -278
+ Documentation updates from Dave Mills.
+
+ html/keygen.html@1.26 +9 -10
+ Documentation updates from Dave Mills.
+
+ChangeSet@1.2082.40.22, 2010-12-15 01:23:25+00:00, davehart@shiny.ad.hartbrothers.com
get along better with OpenSSL 1.0.0c headers by including
evp.h instead of rand.h in ssl_init.c and configure.ac tests.
- libntp/ssl_init.c@1.7 +1 -1
+ libntp/ssl_init.c@1.4.1.3 +1 -1
get along better with OpenSSL 1.0.0c headers by including
evp.h instead of rand.h in ssl_init.c and configure.ac tests.
- m4/ntp_openssl.m4@1.7 +2 -2
+ m4/ntp_openssl.m4@1.4.1.3 +2 -2
get along better with OpenSSL 1.0.0c headers by including
evp.h instead of rand.h in ssl_init.c and configure.ac tests.
-ChangeSet@1.2257.1.21, 2010-12-14 20:49:32+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2333, 2010-12-15 00:14:11+00:00, davehart@shiny.ad.hartbrothers.com
+ quiet gcc4 warnings
+ alloc/free peer group identity member
+
+ ntpd/ntp_control.c@1.146 +0 -1
+ remove unused local 'pkid' from ctl_error()
+
+ ntpd/ntp_io.c@1.334 +2 -1
+ use unsigned type for select_count to silence gcc signed
+ overflow warning.
+
+ ntpd/ntp_peer.c@1.141 +4 -1
+ make copy of group identity in newpeer()
+
+ ntpd/refclock_jjy.c@1.20 +15 -10
+ quiet gcc4 signed overflow warnings with unsigned use.
+
+ ntpd/refclock_mx4200.c@1.27 +1 -1
+ eliminate int compared to pointer warning
+
+ sntp/tests/packetHandling.cpp@1.6 +2 -2
+ suppress gcc4 warning of negative left shift count from use
+ of LOGTOD(), substitute ULOGTOD()
+
+ChangeSet@1.2082.40.21, 2010-12-14 20:49:32+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1751] correct -lcrypto -lz dependency test
- m4/ntp_openssl.m4@1.6 +4 -0
+ m4/ntp_openssl.m4@1.4.1.2 +4 -0
[Bug 1751] correct -lcrypto -lz dependency test
-ChangeSet@1.2257.1.20, 2010-12-14 19:40:18+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2331, 2010-12-14 20:10:12+00:00, davehart@shiny.ad.hartbrothers.com
+ cleanup merge flub
+
+ ntpq/ntpq-subs.c@1.71 +4 -2
+ cleanup merge flub
+
+ChangeSet@1.2082.40.20, 2010-12-14 19:40:18+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1751] Support for Atari FreeMiNT OS.
- ChangeLog@1.694 +1 -0
+ ChangeLog@1.496.26.127 +1 -0
[Bug 1751] Support for Atari FreeMiNT OS.
- configure.ac@1.488 +4 -1
+ configure.ac@1.465.1.23 +4 -1
[Bug 1751] Support for Atari FreeMiNT OS.
lib/isc/unix/net.c@1.15 +1 -1
[Bug 1751] Support for Atari FreeMiNT OS.
- m4/ntp_openssl.m4@1.5 +52 -0
+ m4/ntp_openssl.m4@1.4.1.1 +52 -0
[Bug 1751] Atari FreeMiNT needs -lcrypto -lz for LCRYPTO
- ntpd/ntp_config.c@1.249 +4 -5
+ ntpd/ntp_config.c@1.241.1.8 +4 -5
attempt to silence gcc4 apparently bogus warning about simplifying
conditional "if (i)" to a constant.
- ntpd/ntp_control.c@1.135 +3 -1
+ ntpd/ntp_control.c@1.129.1.6 +3 -1
quiet gcc4 signed overflow warning
- ntpd/ntp_refclock.c@1.94 +6 -32
+ ntpd/ntp_refclock.c@1.92.1.2 +6 -32
quiet gcc4 signed overflow warning
ntpd/refclock_conf.c@1.28 +1 -1
[Bug 1751] Atari FreeMiNT termios.h doesn't have TIOCMSET
- ntpd/refclock_palisade.c@1.33 +12 -6
+ ntpd/refclock_palisade.c@1.31.1.2 +12 -6
[Bug 1751] Atari FreeMiNT termios.h doesn't have TIOCMSET
- ntpdate/ntpdate.c@1.72 +32 -27
+ ntpdate/ntpdate.c@1.69.2.2 +32 -27
attempt to silence gcc4 signed wraparound/overflow warnings.
- ntpdc/ntpdc.c@1.78 +35 -55
+ ntpdc/ntpdc.c@1.75.1.3 +35 -55
4.2.6 requires ANSI C so qsort() signature is nailed down.
- ntpdc/ntpdc_ops.c@1.64 +65 -67
+ ntpdc/ntpdc_ops.c@1.62.1.2 +65 -67
Attempt to silence apparently bogus "simplifying conditional
to constant" warning from gcc4 re "if (res)"
- ntpq/libntpq.c@1.8 +62 -73
+ ntpq/libntpq.c@1.3.1.5 +62 -73
use associd_t instead of int
- ntpq/libntpq.h@1.6 +10 -12
+ ntpq/libntpq.h@1.3.1.3 +10 -12
use associd_t instead of int
- ntpq/libntpq_subs.c@1.4 +4 -10
+ ntpq/libntpq_subs.c@1.2.1.2 +4 -10
use associd_t instead of int
- ntpq/ntpq-subs.c@1.46 +99 -88
+ ntpq/ntpq-subs.c@1.39.2.5 +99 -88
use associd_t instead of int
- ntpq/ntpq.c@1.104 +119 -174
+ ntpq/ntpq.c@1.97.1.7 +119 -174
use associd_t instead of int
- ntpq/ntpq.h@1.14 +1 -1
+ ntpq/ntpq.h@1.10.1.4 +1 -1
use associd_t not int
- sntp/main.c@1.33 +5 -4
+ sntp/main.c@1.24.1.9 +5 -4
toy with gcc4 apparently spurious "simplifying conditional to constant"
warning.
util/tickadj.c@1.9 +3 -1
[Bug 1751] Support for Atari FreeMiNT OS.
-ChangeSet@1.2257.1.19, 2010-12-13 01:06:37-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2329, 2010-12-13 08:28:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P93
+ TAG: NTP_4_2_7P93
+
+ ChangeLog@1.691 +1 -0
+ NTP_4_2_7P93
+
+ clockstuff/clktest-opts.c@1.17 +2 -2
+ NTP_4_2_7P93
+
+ clockstuff/clktest-opts.h@1.17 +3 -3
+ NTP_4_2_7P93
+
+ ntpd/ntpd-opts.c@1.97 +2 -2
+ NTP_4_2_7P93
+
+ ntpd/ntpd-opts.h@1.97 +3 -3
+ NTP_4_2_7P93
+
+ ntpd/ntpd-opts.texi@1.95 +2 -2
+ NTP_4_2_7P93
+
+ ntpd/ntpd.1@1.95 +2 -2
+ NTP_4_2_7P93
+
+ ntpdc/ntpdc-opts.c@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpdc/ntpdc-opts.h@1.94 +3 -3
+ NTP_4_2_7P93
+
+ ntpdc/ntpdc-opts.texi@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpdc/ntpdc.1@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpq/ntpq-opts.c@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpq/ntpq-opts.h@1.94 +3 -3
+ NTP_4_2_7P93
+
+ ntpq/ntpq-opts.texi@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpq/ntpq.1@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.94 +3 -3
+ NTP_4_2_7P93
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.94 +2 -2
+ NTP_4_2_7P93
+
+ ntpsnmpd/ntpsnmpd.1@1.94 +2 -2
+ NTP_4_2_7P93
+
+ packageinfo.sh@1.95 +1 -1
+ NTP_4_2_7P93
+
+ sntp/sntp-opts.c@1.94 +2 -2
+ NTP_4_2_7P93
+
+ sntp/sntp-opts.h@1.94 +3 -3
+ NTP_4_2_7P93
+
+ sntp/sntp-opts.texi@1.94 +2 -2
+ NTP_4_2_7P93
+
+ sntp/sntp.1@1.94 +2 -2
+ NTP_4_2_7P93
+
+ sntp/sntp.html@1.94 +2 -2
+ NTP_4_2_7P93
+
+ util/ntp-keygen-opts.c@1.92 +2 -2
+ NTP_4_2_7P93
+
+ util/ntp-keygen-opts.h@1.92 +3 -3
+ NTP_4_2_7P93
+
+ util/ntp-keygen-opts.texi@1.95 +2 -2
+ NTP_4_2_7P93
+
+ util/ntp-keygen.1@1.95 +2 -2
+ NTP_4_2_7P93
+
+ChangeSet@1.2328, 2010-12-13 01:55:38-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills.
+
+ html/autokey.html@1.10 +47 -48
+ Documentation updates from Dave Mills.
+
+ html/keygen.html@1.25 +2 -1
+ Documentation updates from Dave Mills.
+
+ChangeSet@1.2323.2.2, 2010-12-13 01:29:30-05:00, stenn@deacon.udel.edu
+ "server ... ident <groupname>" changes from Dave Mills
+
+ ChangeLog@1.687.1.2 +1 -0
+ "server ... ident <groupname>" changes from Dave Mills
+
+ include/ntp.h@1.188.1.1 +1 -0
+ "server ... ident <groupname>" changes from Dave Mills
+
+ include/ntp_control.h@1.47.1.1 +2 -1
+ "server ... ident <groupname>" changes from Dave Mills
+
+ include/ntpd.h@1.147.1.1 +1 -1
+ "server ... ident <groupname>" changes from Dave Mills
+
+ ntpd/ntp_control.c@1.141.1.1 +12 -2
+ "server ... ident <groupname>" changes from Dave Mills
+
+ ntpd/ntp_crypto.c@1.149 +7 -29
+ "server ... ident <groupname>" changes from Dave Mills
+
+ ntpd/ntp_peer.c@1.138.1.1 +4 -2
+ "server ... ident <groupname>" changes from Dave Mills
+
+ ntpd/ntp_proto.c@1.313 +4 -4
+ "server ... ident <groupname>" changes from Dave Mills
+
+ util/ntp-keygen.c@1.70 +7 -23
+ "server ... ident <groupname>" changes from Dave Mills
+
+ChangeSet@1.2323.2.1, 2010-12-13 01:16:09-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills.
+
+ ChangeLog@1.687.1.1 +1 -0
+ Documentation updates from Dave Mills.
+
+ html/autokey.html@1.9 +23 -3
+ Documentation updates from Dave Mills.
+
+ html/keygen.html@1.24 +39 -49
+ Documentation updates from Dave Mills.
+
+ html/miscopt.html@1.63 +3 -3
+ Documentation updates from Dave Mills.
+
+ChangeSet@1.2082.40.19, 2010-12-13 01:06:37-05:00, stenn@deacon.udel.edu
SNTP documentation cleanup
- sntp/Makefile.am@1.34 +4 -0
+ sntp/Makefile.am@1.21.1.13 +4 -0
SNTP documentation cleanup
- sntp/sntp.html@1.36 +297 -11
+ sntp/sntp.html@1.7.29.1 +297 -11
SNTP documentation cleanup
sntp/sntp.texi@1.6 +2 -2
SNTP documentation cleanup
-ChangeSet@1.2257.1.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2323.1.3, 2010-12-12 08:30:28+00:00, davehart@shiny.ad.hartbrothers.com
+ Add test for socktoa(), sockporttoa() with scoped address.
+ Correct unit tests for sntp offset_calculation() arg change.
+
+ ntpd/ntp_control.c@1.143 +0 -2
+ Cleanup merge, remove redundant local maclen that triggered
+ shadow warning.
+
+ ntpd/ntpsim.c@1.30 +19 -17
+ correct ntpsim.c for peer_config group ident arg change.
+
+ sntp/tests/packetHandling.cpp@1.5 +4 -2
+ Correct unit tests for sntp offset_calculation() arg change.
+
+ sntp/tests/utilities.cpp@1.6 +3 -2
+ No stack garbage for scope ID, thanks.
+
+ tests/libntp/socktoa.cpp@1.2 +32 -5
+ Add test for socktoa(), sockporttoa() with scoped address.
+
+ChangeSet@1.2323.1.1, 2010-12-12 07:23:59+00:00, davehart@shiny.ad.hartbrothers.com
+ include non-zero scope in IPv6 stoa() output
+
+ libntp/socktoa.c@1.13 +24 -13
+ include non-zero scope in IPv6 stoa() output
+
+ChangeSet@1.2082.40.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1741] Enable multicast reception on each address (Windows).
Minimize local address flip-flopping by avoiding peer_refresh_allinterfaces()
if nothing has changed in the interface list since the last scan.
@@ -2689,7 +101018,7 @@ ChangeSet@1.2257.1.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers
Use setsockopt(IP[V6]_MULTICAST_IF) before each send to multicast to select
the local source address, using the correct socket isn't enough.
- ChangeLog@1.691.1.1 +12 -0
+ ChangeLog@1.496.59.1 +12 -0
* [Bug 1741] Enable multicast reception on each address (Windows).
* Other manycastclient repairs:
Separate handling of scope ID embedded in many in6_addr from ifindex
@@ -2707,24 +101036,24 @@ ChangeSet@1.2257.1.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers
include/isc/mem.h@1.4 +9 -8
use macro-arg-protecting () only where helpful.
- include/ntp.h@1.172 +3 -2
+ include/ntp.h@1.168.1.4 +3 -2
add INT_PRIVACY endpt.flags bit to indicate RFC 4941 privacy addresses
- include/ntp_control.h@1.39 +1 -1
+ include/ntp_control.h@1.38.1.1 +1 -1
use offsetof instead of hard_coding CTL_HEADER_LEN
- include/ntp_io.h@1.15 +4 -4
+ include/ntp_io.h@1.13.1.2 +4 -4
housekeeping (use #ifdef not #if for HAVE_*)
- include/ntp_net.h@1.6 +4 -0
+ include/ntp_net.h@1.3.1.3 +4 -0
add IS_IID_UNIV() to test for universal scope interface identifier
to differentiate embedded-MAC modified EUI-64 from static and
privacy addresses.
- include/ntp_stdlib.h@1.43 +2 -2
+ include/ntp_stdlib.h@1.40.1.3 +2 -2
mark socktoa(), socktohost() args const
- include/ntpd.h@1.140 +1 -1
+ include/ntpd.h@1.137.2.3 +1 -1
whitespace only
lib/isc/include/isc/interfaceiter.h@1.8 +2 -0
@@ -2752,17 +101081,17 @@ ChangeSet@1.2257.1.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers
Skip deprecated addresses.
nonfunctional cleanup of [Bug 1738] changes.
- libntp/socktoa.c@1.12 +1 -1
+ libntp/socktoa.c@1.11.1.1 +1 -1
socktoa() input now const
- libntp/socktohost.c@1.8 +1 -1
+ libntp/socktohost.c@1.7.1.1 +1 -1
socktohost() input now const
- ntpd/ntp_control.c@1.134 +0 -2
+ ntpd/ntp_control.c@1.129.1.5 +0 -2
eliminate gcc4 warning in rendundant code by removing it.
authencrypt() jams the keyid into the packet structure.
- ntpd/ntp_io.c@1.319 +357 -308
+ ntpd/ntp_io.c@1.306.1.13 +357 -308
[Bug 1741] Enable multicast reception on each address (Windows).
Minimize local address flip-flopping by avoiding peer_refresh_allinterfaces()
if nothing has changed in the interface list since the last scan.
@@ -2775,49 +101104,140 @@ ChangeSet@1.2257.1.17, 2010-12-12 07:11:37+00:00, davehart@shiny.ad.hartbrothers
Use setsockopt(IP[V6]_MULTICAST_IF) before each send to multicast to select
the local source address, using the correct socket isn't enough.
- ntpd/ntp_peer.c@1.128 +49 -50
+ ntpd/ntp_peer.c@1.126.1.2 +49 -50
cleanup
- ntpd/ntp_request.c@1.86 +18 -16
+ ntpd/ntp_request.c@1.82.1.4 +18 -16
scopeid member of endpt replaced with ifindex
- ntpd/ntpd.c@1.112 +1 -1
+ ntpd/ntpd.c@1.110.2.2 +1 -1
typo in msyslog text "Attemping"
-ChangeSet@1.2257.2.5, 2010-12-10 12:52:28+01:00, burnicki@pogo.udel.edu
+ChangeSet@1.2082.41.5, 2010-12-10 12:52:28+01:00, burnicki@pogo.udel.edu
Updated changelog.
- ChangeLog@1.692 +1 -0
+ ChangeLog@1.496.26.125 +1 -0
Updated changelog.
-ChangeSet@1.2257.2.4, 2010-12-10 12:47:54+01:00, burnicki@pogo.udel.edu
+ChangeSet@1.2082.41.4, 2010-12-10 12:47:54+01:00, burnicki@pogo.udel.edu
[Bug 1510] Add modes 20/21 for driver 8 to support RAWDCF @ 75 baud.
html/drivers/driver8.html@1.25 +12 -0
[Bug 1510] Add modes 20/21 for driver 8 to support RAWDCF @ 75 baud.
- ntpd/refclock_parse.c@1.53 +49 -0
+ ntpd/refclock_parse.c@1.52.1.1 +49 -0
[Bug 1510] Add modes 20/21 for driver 8 to support RAWDCF @ 75 baud.
-ChangeSet@1.2257.2.3, 2010-12-08 02:34:17-05:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2323, 2010-12-08 10:11:00+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P92
+ TAG: NTP_4_2_7P92
+
+ ChangeLog@1.687 +1 -0
+ NTP_4_2_7P92
+
+ clockstuff/clktest-opts.c@1.16 +2 -2
+ NTP_4_2_7P92
+
+ clockstuff/clktest-opts.h@1.16 +3 -3
+ NTP_4_2_7P92
+
+ ntpd/ntpd-opts.c@1.96 +2 -2
+ NTP_4_2_7P92
+
+ ntpd/ntpd-opts.h@1.96 +3 -3
+ NTP_4_2_7P92
+
+ ntpd/ntpd-opts.texi@1.94 +2 -2
+ NTP_4_2_7P92
+
+ ntpd/ntpd.1@1.94 +2 -2
+ NTP_4_2_7P92
+
+ ntpdc/ntpdc-opts.c@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpdc/ntpdc-opts.h@1.93 +3 -3
+ NTP_4_2_7P92
+
+ ntpdc/ntpdc-opts.texi@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpdc/ntpdc.1@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpq/ntpq-opts.c@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpq/ntpq-opts.h@1.93 +3 -3
+ NTP_4_2_7P92
+
+ ntpq/ntpq-opts.texi@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpq/ntpq.1@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.93 +3 -3
+ NTP_4_2_7P92
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.93 +2 -2
+ NTP_4_2_7P92
+
+ ntpsnmpd/ntpsnmpd.1@1.93 +2 -2
+ NTP_4_2_7P92
+
+ packageinfo.sh@1.94 +1 -1
+ NTP_4_2_7P92
+
+ sntp/sntp-opts.c@1.93 +3 -3
+ NTP_4_2_7P92
+
+ sntp/sntp-opts.h@1.93 +3 -3
+ NTP_4_2_7P92
+
+ sntp/sntp-opts.texi@1.93 +4 -3
+ NTP_4_2_7P92
+
+ sntp/sntp.1@1.93 +4 -2
+ NTP_4_2_7P92
+
+ sntp/sntp.html@1.93 +10 -9
+ NTP_4_2_7P92
+
+ util/ntp-keygen-opts.c@1.91 +2 -2
+ NTP_4_2_7P92
+
+ util/ntp-keygen-opts.h@1.91 +3 -3
+ NTP_4_2_7P92
+
+ util/ntp-keygen-opts.texi@1.94 +2 -2
+ NTP_4_2_7P92
+
+ util/ntp-keygen.1@1.94 +2 -2
+ NTP_4_2_7P92
+
+ChangeSet@1.2082.41.3, 2010-12-08 02:34:17-05:00, stenn@psp-deb1.ntp.org
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
- ChangeLog@1.691 +2 -0
+ ChangeLog@1.496.26.124 +2 -0
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
- sntp/configure.ac@1.40 +1 -0
+ sntp/configure.ac@1.31.1.9 +1 -0
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
- sntp/main.c@1.32 +20 -2
+ sntp/main.c@1.24.1.8 +20 -2
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
- sntp/utilities.c@1.13 +40 -26
+ sntp/utilities.c@1.10.1.3 +40 -26
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
sntp/utilities.h@1.9 +1 -1
[Bug 1743] Display timezone offset when showing time for sntp in the local timezone.
-ChangeSet@1.2257.2.2, 2010-12-08 02:28:13-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.41.2, 2010-12-08 02:28:13-05:00, stenn@deacon.udel.edu
Clean up the SNTP documentation
sntp/sntp-opts.def@1.18 +4 -0
@@ -2826,16 +101246,116 @@ ChangeSet@1.2257.2.2, 2010-12-08 02:28:13-05:00, stenn@deacon.udel.edu
sntp/sntp.texi@1.5 +3 -3
Clean up the SNTP documentation
-ChangeSet@1.2257.2.1, 2010-12-07 03:37:36-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2321, 2010-12-07 10:11:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P91
+ TAG: NTP_4_2_7P91
+
+ ChangeLog@1.685 +1 -0
+ NTP_4_2_7P91
+
+ clockstuff/clktest-opts.c@1.15 +2 -2
+ NTP_4_2_7P91
+
+ clockstuff/clktest-opts.h@1.15 +3 -3
+ NTP_4_2_7P91
+
+ ntpd/ntpd-opts.c@1.95 +2 -2
+ NTP_4_2_7P91
+
+ ntpd/ntpd-opts.h@1.95 +3 -3
+ NTP_4_2_7P91
+
+ ntpd/ntpd-opts.texi@1.93 +2 -2
+ NTP_4_2_7P91
+
+ ntpd/ntpd.1@1.93 +2 -2
+ NTP_4_2_7P91
+
+ ntpdc/ntpdc-opts.c@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpdc/ntpdc-opts.h@1.92 +3 -3
+ NTP_4_2_7P91
+
+ ntpdc/ntpdc-opts.texi@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpdc/ntpdc.1@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpq/ntpq-opts.c@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpq/ntpq-opts.h@1.92 +3 -3
+ NTP_4_2_7P91
+
+ ntpq/ntpq-opts.texi@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpq/ntpq.1@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.92 +3 -3
+ NTP_4_2_7P91
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.92 +2 -2
+ NTP_4_2_7P91
+
+ ntpsnmpd/ntpsnmpd.1@1.92 +2 -2
+ NTP_4_2_7P91
+
+ packageinfo.sh@1.93 +1 -1
+ NTP_4_2_7P91
+
+ sntp/sntp-opts.c@1.92 +2 -2
+ NTP_4_2_7P91
+
+ sntp/sntp-opts.h@1.92 +3 -3
+ NTP_4_2_7P91
+
+ sntp/sntp-opts.texi@1.92 +2 -2
+ NTP_4_2_7P91
+
+ sntp/sntp.1@1.92 +2 -2
+ NTP_4_2_7P91
+
+ sntp/sntp.html@1.92 +2 -2
+ NTP_4_2_7P91
+
+ util/ntp-keygen-opts.c@1.90 +2 -2
+ NTP_4_2_7P91
+
+ util/ntp-keygen-opts.h@1.90 +3 -3
+ NTP_4_2_7P91
+
+ util/ntp-keygen-opts.texi@1.93 +2 -2
+ NTP_4_2_7P91
+
+ util/ntp-keygen.1@1.93 +2 -2
+ NTP_4_2_7P91
+
+ChangeSet@1.2319, 2010-12-07 08:42:46+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1732] ntpd ties up CPU on disconnected USB device.
+
+ ChangeLog@1.683 +1 -0
+ [Bug 1732] ntpd ties up CPU on disconnected USB device.
+
+ ntpd/ntp_io.c@1.332 +16 -9
+ Remove closed file descriptors from I/O loop select() set.
+
+ChangeSet@1.2082.41.1, 2010-12-07 03:37:36-05:00, stenn@deacon.udel.edu
[Bug 1742] Fix a typo in an error message in the "build" script
- ChangeLog@1.690 +1 -0
+ ChangeLog@1.496.26.123 +1 -0
[Bug 1742] Fix a typo in an error message in the "build" script
build@1.38 +1 -1
[Bug 1742] Fix a typo in an error message in the "build" script
-ChangeSet@1.2257.1.14, 2010-12-06 08:01:24+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.40.14, 2010-12-06 08:01:24+00:00, davehart@shiny.ad.hartbrothers.com
correct relatively harmless retrying GetAdaptersAddresses() on errors
other than ERROR_BUFFER_OVERFLOW.
@@ -2843,7 +101363,114 @@ ChangeSet@1.2257.1.14, 2010-12-06 08:01:24+00:00, davehart@shiny.ad.hartbrothers
correct relatively harmless retrying GetAdaptersAddresses() on errors
other than ERROR_BUFFER_OVERFLOW.
-ChangeSet@1.2257.1.13, 2010-12-06 02:14:03+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2317, 2010-12-06 07:49:43+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P90
+ TAG: NTP_4_2_7P90
+
+ ChangeLog@1.682 +1 -0
+ NTP_4_2_7P90
+
+ clockstuff/clktest-opts.c@1.14 +2 -2
+ NTP_4_2_7P90
+
+ clockstuff/clktest-opts.h@1.14 +3 -3
+ NTP_4_2_7P90
+
+ ntpd/ntpd-opts.c@1.94 +2 -2
+ NTP_4_2_7P90
+
+ ntpd/ntpd-opts.h@1.94 +3 -3
+ NTP_4_2_7P90
+
+ ntpd/ntpd-opts.texi@1.92 +2 -2
+ NTP_4_2_7P90
+
+ ntpd/ntpd.1@1.92 +2 -2
+ NTP_4_2_7P90
+
+ ntpdc/ntpdc-opts.c@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpdc/ntpdc-opts.h@1.91 +3 -3
+ NTP_4_2_7P90
+
+ ntpdc/ntpdc-opts.texi@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpdc/ntpdc.1@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpq/ntpq-opts.c@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpq/ntpq-opts.h@1.91 +3 -3
+ NTP_4_2_7P90
+
+ ntpq/ntpq-opts.texi@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpq/ntpq.1@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.91 +3 -3
+ NTP_4_2_7P90
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.91 +2 -2
+ NTP_4_2_7P90
+
+ ntpsnmpd/ntpsnmpd.1@1.91 +2 -2
+ NTP_4_2_7P90
+
+ packageinfo.sh@1.92 +1 -1
+ NTP_4_2_7P90
+
+ sntp/sntp-opts.c@1.91 +2 -2
+ NTP_4_2_7P90
+
+ sntp/sntp-opts.h@1.91 +3 -3
+ NTP_4_2_7P90
+
+ sntp/sntp-opts.texi@1.91 +2 -2
+ NTP_4_2_7P90
+
+ sntp/sntp.1@1.91 +2 -2
+ NTP_4_2_7P90
+
+ sntp/sntp.html@1.91 +2 -2
+ NTP_4_2_7P90
+
+ util/ntp-keygen-opts.c@1.89 +2 -2
+ NTP_4_2_7P90
+
+ util/ntp-keygen-opts.h@1.89 +3 -3
+ NTP_4_2_7P90
+
+ util/ntp-keygen-opts.texi@1.92 +2 -2
+ NTP_4_2_7P90
+
+ util/ntp-keygen.1@1.92 +2 -2
+ NTP_4_2_7P90
+
+ChangeSet@1.2316, 2010-12-06 05:04:53+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1740] ntpdc -c reslist packet count wrongly treated as signed.
+
+ ChangeLog@1.681 +1 -0
+ [Bug 1740] ntpdc -c reslist packet count wrongly treated as signed.
+
+ ntpdc/ntpdc_ops.c@1.68 +191 -197
+ [Bug 1740] ntpdc -c reslist packet count wrongly treated as signed.
+
+ChangeSet@1.2315, 2010-12-06 02:15:22+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1738] Windows ntpd has wrong net adapter name.
+ Applies to prior cset merged from ntp-stable-1738
+
+ ChangeLog@1.680 +1 -0
+ [Bug 1738] Windows ntpd has wrong net adapter name.
+
+ChangeSet@1.2082.40.13, 2010-12-06 02:14:03+00:00, davehart@shiny.ad.hartbrothers.com
Add GetAdaptersAddress()-based interface enumeration to libisc Windows code,
runtime linked on Windows XP SP1 and later only, which provides correct
interface name with each address.
@@ -2872,10 +101499,107 @@ ChangeSet@1.2257.1.13, 2010-12-06 02:14:03+00:00, davehart@shiny.ad.hartbrothers
lib/isc/win32/stdtime.c@1.2 +1 -1
Silence type conversion warning.
-ChangeSet@1.2257.1.12, 2010-12-04 05:32:55-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2313, 2010-12-04 20:54:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P89
+ TAG: NTP_4_2_7P89
+
+ ChangeLog@1.679 +1 -0
+ NTP_4_2_7P89
+
+ clockstuff/clktest-opts.c@1.13 +65 -62
+ NTP_4_2_7P89
+
+ clockstuff/clktest-opts.h@1.13 +23 -59
+ NTP_4_2_7P89
+
+ ntpd/ntpd-opts.c@1.93 +2 -2
+ NTP_4_2_7P89
+
+ ntpd/ntpd-opts.h@1.93 +3 -3
+ NTP_4_2_7P89
+
+ ntpd/ntpd-opts.texi@1.91 +2 -2
+ NTP_4_2_7P89
+
+ ntpd/ntpd.1@1.91 +2 -2
+ NTP_4_2_7P89
+
+ ntpdc/ntpdc-opts.c@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpdc/ntpdc-opts.h@1.90 +3 -3
+ NTP_4_2_7P89
+
+ ntpdc/ntpdc-opts.texi@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpdc/ntpdc.1@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpq/ntpq-opts.c@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpq/ntpq-opts.h@1.90 +3 -3
+ NTP_4_2_7P89
+
+ ntpq/ntpq-opts.texi@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpq/ntpq.1@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.90 +3 -3
+ NTP_4_2_7P89
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.90 +2 -2
+ NTP_4_2_7P89
+
+ ntpsnmpd/ntpsnmpd.1@1.90 +2 -2
+ NTP_4_2_7P89
+
+ packageinfo.sh@1.91 +1 -1
+ NTP_4_2_7P89
+
+ sntp/sntp-opts.c@1.90 +8 -14
+ NTP_4_2_7P89
+
+ sntp/sntp-opts.h@1.90 +3 -3
+ NTP_4_2_7P89
+
+ sntp/sntp-opts.texi@1.90 +38 -31
+ NTP_4_2_7P89
+
+ sntp/sntp.1@1.90 +6 -6
+ NTP_4_2_7P89
+
+ sntp/sntp.html@1.90 +356 -5
+ NTP_4_2_7P89
+
+ util/ntp-keygen-opts.c@1.88 +2 -2
+ NTP_4_2_7P89
+
+ util/ntp-keygen-opts.h@1.88 +3 -3
+ NTP_4_2_7P89
+
+ util/ntp-keygen-opts.texi@1.91 +2 -2
+ NTP_4_2_7P89
+
+ util/ntp-keygen.1@1.91 +2 -2
+ NTP_4_2_7P89
+
+ChangeSet@1.2312, 2010-12-04 15:54:37-05:00, stenn@deacon.udel.edu
+ Add clktest-opts.[ch] to .point-changed-filelist
+
+ .point-changed-filelist@1.8 +2 -0
+ Add clktest-opts.[ch] to .point-changed-filelist
+
+ChangeSet@1.2082.40.12, 2010-12-04 05:32:55-05:00, stenn@deacon.udel.edu
Clean up the SNTP documentation
- ChangeLog@1.689 +1 -0
+ ChangeLog@1.496.26.122 +1 -0
Clean up the SNTP documentation
sntp/sntp-opts.def@1.17 +49 -27
@@ -2884,10 +101608,285 @@ ChangeSet@1.2257.1.12, 2010-12-04 05:32:55-05:00, stenn@deacon.udel.edu
sntp/sntp.texi@1.4 +2 -2
Clean up the SNTP documentation
-ChangeSet@1.2257.1.11, 2010-11-30 06:45:17+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2309, 2010-12-04 08:15:35+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1736] tos int, bool options broken in 4.2.7p66.
+
+ ChangeLog@1.675.1.1 +2 -1
+ [Bug 1736] tos int, bool options broken in 4.2.7p66.
+
+ clockstuff/Makefile.am@1.13 +2 -1
+ repair distcheck
+
+ ntpd/ntp_config.c@1.277 +3 -8
+ [Bug 1736] tos int, bool options broken in 4.2.7p66.
+
+ ntpd/ntp_parser.c@1.73 +2 -2
+ bison output
+
+ ntpd/ntp_parser.y@1.67 +2 -2
+ [Bug 1736] tos int, bool options broken in 4.2.7p66.
+
+ChangeSet@1.2308, 2010-12-04 07:42:26+00:00, davehart@shiny.ad.hartbrothers.com
+ centralize TTY header goop in ntp_tty.h.
+ move clockstuff utils closer to building cleanly.
+
+ clockstuff/Makefile.am@1.12 +2 -2
+ revive, repair bitrot
+
+ clockstuff/clktest-opts.def@1.8 +0 -32
+ remove hard-coded relative paths from #includes
+
+ clockstuff/clktest.c@1.5 +34 -0
+ include config.h
+
+ include/ntp_machine.h@1.30 +0 -35
+ move tty logic from ntp_machine.h to ntp_tty.h, include the latter
+ from ntp_refclock.h
+
+ include/ntp_refclock.h@1.26 +2 -32
+ move tty logic from ntp_machine.h to ntp_tty.h, include the latter
+ from ntp_refclock.h
+
+ include/ntp_tty.h@1.4 +57 -11
+ move tty logic from ntp_machine.h to ntp_tty.h, include the latter
+ from ntp_refclock.h
+
+ libntp/icom.c@1.13 +4 -4
+ use snprintf()
+
+ ntpd/refclock_datum.c@1.15 +1 -11
+ #include ntp_tty.h for TTY includes
+
+ChangeSet@1.2304.1.3, 2010-12-02 10:10:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P88
+ TAG: NTP_4_2_7P88
+
+ ChangeLog@1.676 +1 -0
+ NTP_4_2_7P88
+
+ ntpd/ntpd-opts.c@1.92 +2 -2
+ NTP_4_2_7P88
+
+ ntpd/ntpd-opts.h@1.92 +3 -3
+ NTP_4_2_7P88
+
+ ntpd/ntpd-opts.texi@1.90 +2 -2
+ NTP_4_2_7P88
+
+ ntpd/ntpd.1@1.90 +2 -2
+ NTP_4_2_7P88
+
+ ntpdc/ntpdc-opts.c@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpdc/ntpdc-opts.h@1.89 +3 -3
+ NTP_4_2_7P88
+
+ ntpdc/ntpdc-opts.texi@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpdc/ntpdc.1@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpq/ntpq-opts.c@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpq/ntpq-opts.h@1.89 +3 -3
+ NTP_4_2_7P88
+
+ ntpq/ntpq-opts.texi@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpq/ntpq.1@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.89 +3 -3
+ NTP_4_2_7P88
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.89 +2 -2
+ NTP_4_2_7P88
+
+ ntpsnmpd/ntpsnmpd.1@1.89 +2 -2
+ NTP_4_2_7P88
+
+ packageinfo.sh@1.90 +1 -1
+ NTP_4_2_7P88
+
+ sntp/sntp-opts.c@1.89 +2 -2
+ NTP_4_2_7P88
+
+ sntp/sntp-opts.h@1.89 +3 -3
+ NTP_4_2_7P88
+
+ sntp/sntp-opts.texi@1.89 +2 -2
+ NTP_4_2_7P88
+
+ sntp/sntp.1@1.89 +2 -2
+ NTP_4_2_7P88
+
+ sntp/sntp.html@1.89 +1 -1
+ NTP_4_2_7P88
+
+ util/ntp-keygen-opts.c@1.87 +2 -2
+ NTP_4_2_7P88
+
+ util/ntp-keygen-opts.h@1.87 +3 -3
+ NTP_4_2_7P88
+
+ util/ntp-keygen-opts.texi@1.90 +2 -2
+ NTP_4_2_7P88
+
+ util/ntp-keygen.1@1.90 +2 -2
+ NTP_4_2_7P88
+
+ChangeSet@1.2304.1.2, 2010-12-01 23:05:13+01:00, jnperlin@hydra.localnet
+ [Bug 1735] clocktime() aborts ntpd on bogus input: changed to regular error indication
+
+ ChangeLog@1.675 +1 -0
+ [Bug 1735] clocktime() aborts ntpd on bogus input: changed to regular error indication
+
+ libntp/clocktime.c@1.5 +8 -7
+ [Bug 1735] clocktime() aborts ntpd on bogus input: changed to regular error indication
+
+ChangeSet@1.2304.1.1, 2010-12-01 10:10:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P87
+ TAG: NTP_4_2_7P87
+
+ ChangeLog@1.674 +1 -0
+ NTP_4_2_7P87
+
+ ntpd/ntpd-opts.c@1.91 +2 -2
+ NTP_4_2_7P87
+
+ ntpd/ntpd-opts.h@1.91 +3 -3
+ NTP_4_2_7P87
+
+ ntpd/ntpd-opts.texi@1.89 +2 -2
+ NTP_4_2_7P87
+
+ ntpd/ntpd.1@1.89 +2 -2
+ NTP_4_2_7P87
+
+ ntpdc/ntpdc-opts.c@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpdc/ntpdc-opts.h@1.88 +3 -3
+ NTP_4_2_7P87
+
+ ntpdc/ntpdc-opts.texi@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpdc/ntpdc.1@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpq/ntpq-opts.c@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpq/ntpq-opts.h@1.88 +3 -3
+ NTP_4_2_7P87
+
+ ntpq/ntpq-opts.texi@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpq/ntpq.1@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.88 +3 -3
+ NTP_4_2_7P87
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.88 +2 -2
+ NTP_4_2_7P87
+
+ ntpsnmpd/ntpsnmpd.1@1.88 +2 -2
+ NTP_4_2_7P87
+
+ packageinfo.sh@1.89 +1 -1
+ NTP_4_2_7P87
+
+ sntp/sntp-opts.c@1.88 +2 -2
+ NTP_4_2_7P87
+
+ sntp/sntp-opts.h@1.88 +3 -3
+ NTP_4_2_7P87
+
+ sntp/sntp-opts.texi@1.88 +2 -2
+ NTP_4_2_7P87
+
+ sntp/sntp.1@1.88 +2 -2
+ NTP_4_2_7P87
+
+ sntp/sntp.html@1.88 +1 -1
+ NTP_4_2_7P87
+
+ util/ntp-keygen-opts.c@1.86 +2 -2
+ NTP_4_2_7P87
+
+ util/ntp-keygen-opts.h@1.86 +3 -3
+ NTP_4_2_7P87
+
+ util/ntp-keygen-opts.texi@1.89 +2 -2
+ NTP_4_2_7P87
+
+ util/ntp-keygen.1@1.89 +2 -2
+ NTP_4_2_7P87
+
+ChangeSet@1.2306, 2010-12-01 07:48:54+00:00, davehart@shiny.ad.hartbrothers.com
+ restore HP-UX net/if.h workaround to sntp subproj, needed by ntp.h
+ inclusion leading to isc/net.h and then net/if.h.
+
+ clockstuff/chutest.c@1.4 +18 -7
+ clean up bitrot in clockstuff
+
+ sntp/configure.ac@1.48 +71 -0
+ restore HP-UX net/if.h workaround to sntp subproj, needed by ntp.h
+ inclusion leading to isc/net.h and then net/if.h.
+
+ChangeSet@1.2305, 2010-12-01 04:50:51+00:00, davehart@shiny.ad.hartbrothers.com
+ Refine HP-UX mpinfou workaround to add predeclaration only if it helps.
+ Remove unused u_int8_t and u_int64_t tests.
+ Remove qsort type check, ANSI C nails it down.
+ Remove AC_C_CONST for similar reason.
+ Enable propdelay, chutest, clktest builds.
+
+ clockstuff/Makefile.am@1.11 +29 -13
+ revive, repair bitrot
+
+ clockstuff/chutest.c@1.3 +31 -24
+ include config.h
+
+ clockstuff/clktest.c@1.4 +3 -0
+ include config.h
+
+ clockstuff/propdelay.c@1.5 +3 -0
+ include config.h
+
+ configure.ac@1.503 +175 -197
+ Refine HP-UX mpinfou workaround to add predeclaration only if it helps.
+ Remove unused u_int8_t and u_int64_t tests.
+ Remove qsort type check, ANSI C nails it down.
+ Remove AC_C_CONST for similar reason.
+ Enable propdelay, chutest, clktest builds.
+
+ m4/ntp_openssl.m4@1.5 +1 -1
+ unset temp var
+
+ sntp/configure.ac@1.47 +2 -48
+ Remove HP-UX net/if.h workaround from sntp/configure.ac, no sntp code
+ uses net/if.h.
+
+ util/Makefile.am@1.51 +1 -2
+ remove archaic ansi2knr reference
+
+ChangeSet@1.2082.40.11, 2010-11-30 06:45:17+00:00, davehart@shiny.ad.hartbrothers.com
cleanup last changeset
- configure.ac@1.487 +2 -1
+ configure.ac@1.465.1.22 +2 -1
AS_UNSET() works on only one variable, not a list
m4/ntp_cacheversion.m4@1.10 +3 -1
@@ -2896,18 +101895,18 @@ ChangeSet@1.2257.1.11, 2010-11-30 06:45:17+00:00, davehart@shiny.ad.hartbrothers
m4/ntp_lineeditlibs.m4@1.9 +4 -1
AS_UNSET() works on only one variable, not a list
- sntp/configure.ac@1.39 +2 -1
+ sntp/configure.ac@1.31.1.8 +2 -1
AS_UNSET() works on only one variable, not a list
-ChangeSet@1.2257.1.10, 2010-11-30 05:12:51+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.40.10, 2010-11-30 05:12:51+00:00, davehart@shiny.ad.hartbrothers.com
Clean up m4 quoting in configure.ac, *.m4 files, resolving
intermittent AC_LANG_PROGRAM possibly undefined errors.
- ChangeLog@1.688 +5 -0
+ ChangeLog@1.496.26.121 +5 -0
Clean up m4 quoting in configure.ac, *.m4 files, resolving
intermittent AC_LANG_PROGRAM possibly undefined errors.
- configure.ac@1.486 +3076 -2291
+ configure.ac@1.465.1.21 +3076 -2291
M4 quoting cleanup
m4/define_dir.m4@1.2 +4 -4
@@ -2930,442 +101929,871 @@ ChangeSet@1.2257.1.10, 2010-11-30 05:12:51+00:00, davehart@shiny.ad.hartbrothers
m4/ntp_openssl.m4@1.4 +76 -39
m4 quoting cleannup
- m4/ntp_vpathhack.m4@1.3 +1 -1
+ m4/ntp_vpathhack.m4@1.2.1.1 +1 -1
m4 quoting cleannup
- sntp/configure.ac@1.38 +364 -298
+ sntp/configure.ac@1.31.1.7 +364 -298
M4 quoting cleanup, fix for 'possibly undefined AC_LANG_PROGRAM' seen
with bootstrap --force, triggered by errant getsockname() socklen type
check.
-ChangeSet@1.2257.1.9, 2010-11-28 01:03:45-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2302, 2010-11-29 09:19:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P86
+ TAG: NTP_4_2_7P86
+
+ ChangeLog@1.672 +1 -0
+ NTP_4_2_7P86
+
+ ntpd/ntpd-opts.c@1.90 +2 -2
+ NTP_4_2_7P86
+
+ ntpd/ntpd-opts.h@1.90 +3 -3
+ NTP_4_2_7P86
+
+ ntpd/ntpd-opts.texi@1.88 +2 -2
+ NTP_4_2_7P86
+
+ ntpd/ntpd.1@1.88 +2 -2
+ NTP_4_2_7P86
+
+ ntpdc/ntpdc-opts.c@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpdc/ntpdc-opts.h@1.87 +3 -3
+ NTP_4_2_7P86
+
+ ntpdc/ntpdc-opts.texi@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpdc/ntpdc.1@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpq/ntpq-opts.c@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpq/ntpq-opts.h@1.87 +3 -3
+ NTP_4_2_7P86
+
+ ntpq/ntpq-opts.texi@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpq/ntpq.1@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.87 +3 -3
+ NTP_4_2_7P86
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.87 +2 -2
+ NTP_4_2_7P86
+
+ ntpsnmpd/ntpsnmpd.1@1.87 +2 -2
+ NTP_4_2_7P86
+
+ packageinfo.sh@1.88 +1 -1
+ NTP_4_2_7P86
+
+ sntp/sntp-opts.c@1.87 +2 -2
+ NTP_4_2_7P86
+
+ sntp/sntp-opts.h@1.87 +3 -3
+ NTP_4_2_7P86
+
+ sntp/sntp-opts.texi@1.87 +2 -2
+ NTP_4_2_7P86
+
+ sntp/sntp.1@1.87 +2 -2
+ NTP_4_2_7P86
+
+ sntp/sntp.html@1.87 +1 -1
+ NTP_4_2_7P86
+
+ util/ntp-keygen-opts.c@1.85 +2 -2
+ NTP_4_2_7P86
+
+ util/ntp-keygen-opts.h@1.85 +3 -3
+ NTP_4_2_7P86
+
+ util/ntp-keygen-opts.texi@1.88 +2 -2
+ NTP_4_2_7P86
+
+ util/ntp-keygen.1@1.88 +2 -2
+ NTP_4_2_7P86
+
+ChangeSet@1.2301, 2010-11-28 19:24:29+00:00, davehart@shiny.ad.hartbrothers.com
+ implement configuration of association option ident specifying
+ the autokey group. Implementation not yet complete.
+
+ include/ntp_config.h@1.70 +1 -0
+ add group member to peer_node for ident option
+
+ include/ntpd.h@1.147 +1 -1
+ change previously unused last arg to peer_config() to group
+ for ident option.
+
+ ntpd/complete.conf@1.13 +1 -1
+ add peer ... ident test case
+
+ ntpd/ntp_config.c@1.276 +24 -19
+ add group member to peer_resolved_ctx, with group name from
+ ident option.
+
+ ntpd/ntp_parser.c@1.72 +691 -689
+ bison output
+
+ ntpd/ntp_parser.y@1.66 +12 -0
+ add ident option to association directives specifying Autokey group
+
+ ntpd/ntp_peer.c@1.138 +11 -11
+ change previously unused last arg to peer_config() to group
+ for ident option.
+
+ChangeSet@1.2082.40.9, 2010-11-28 01:03:45-05:00, stenn@deacon.udel.edu
Use A.host build directory names at ntp.org
build@1.37 +5 -1
Use A.host build directory names at ntp.org
-ChangeSet@1.2257.1.8, 2010-11-28 04:53:12+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.40.8, 2010-11-28 04:53:12+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC11
TAG: NTP_4_2_6P3_RC11
- ChangeLog@1.687 +1 -0
+ ChangeLog@1.496.26.120 +1 -0
NTP_4_2_6P3_RC11
- ntpd/ntpd-opts.c@1.276 +2 -2
+ ntpd/ntpd-opts.c@1.248.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpd/ntpd-opts.h@1.276 +3 -3
+ ntpd/ntpd-opts.h@1.248.28.1 +3 -3
NTP_4_2_6P3_RC11
- ntpd/ntpd-opts.menu@1.4 +1 -122
+ ntpd/ntpd-opts.menu@1.3.1.1 +1 -122
NTP_4_2_6P3_RC11
- ntpd/ntpd-opts.texi@1.274 +522 -0
+ ntpd/ntpd-opts.texi@1.246.28.1 +522 -0
NTP_4_2_6P3_RC11
- ntpd/ntpd.1@1.274 +2 -2
+ ntpd/ntpd.1@1.246.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpdc/ntpdc-opts.c@1.272 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpdc/ntpdc-opts.h@1.272 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.28.1 +3 -3
NTP_4_2_6P3_RC11
- ntpdc/ntpdc-opts.menu@1.4 +1 -122
+ ntpdc/ntpdc-opts.menu@1.3.1.1 +1 -122
NTP_4_2_6P3_RC11
- ntpdc/ntpdc-opts.texi@1.271 +207 -0
+ ntpdc/ntpdc-opts.texi@1.243.28.1 +207 -0
NTP_4_2_6P3_RC11
- ntpdc/ntpdc.1@1.271 +2 -2
+ ntpdc/ntpdc.1@1.243.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpq/ntpq-opts.c@1.273 +2 -2
+ ntpq/ntpq-opts.c@1.245.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpq/ntpq-opts.h@1.273 +3 -3
+ ntpq/ntpq-opts.h@1.245.28.1 +3 -3
NTP_4_2_6P3_RC11
- ntpq/ntpq-opts.menu@1.4 +1 -96
+ ntpq/ntpq-opts.menu@1.3.1.1 +1 -96
NTP_4_2_6P3_RC11
- ntpq/ntpq-opts.texi@1.272 +177 -0
+ ntpq/ntpq-opts.texi@1.244.28.1 +177 -0
NTP_4_2_6P3_RC11
- ntpq/ntpq.1@1.272 +2 -2
+ ntpq/ntpq.1@1.244.28.1 +2 -2
NTP_4_2_6P3_RC11
- ntpsnmpd/ntpsnmpd-opts.c@1.152 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.29.1 +2 -2
NTP_4_2_6P3_RC11
- ntpsnmpd/ntpsnmpd-opts.h@1.152 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.29.1 +3 -3
NTP_4_2_6P3_RC11
- ntpsnmpd/ntpsnmpd-opts.menu@1.4 +1 -56
+ ntpsnmpd/ntpsnmpd-opts.menu@1.3.1.1 +1 -56
NTP_4_2_6P3_RC11
- ntpsnmpd/ntpsnmpd-opts.texi@1.152 +55 -0
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.29.1 +55 -0
NTP_4_2_6P3_RC11
- ntpsnmpd/ntpsnmpd.1@1.151 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.29.1 +2 -2
NTP_4_2_6P3_RC11
- packageinfo.sh@1.290 +1 -1
+ packageinfo.sh@1.255.29.1 +1 -1
NTP_4_2_6P3_RC11
- sntp/sntp-opts.c@1.145 +2 -2
+ sntp/sntp-opts.c@1.117.28.1 +2 -2
NTP_4_2_6P3_RC11
- sntp/sntp-opts.h@1.145 +3 -3
+ sntp/sntp-opts.h@1.117.28.1 +3 -3
NTP_4_2_6P3_RC11
- sntp/sntp-opts.menu@1.4 +1 -56
+ sntp/sntp-opts.menu@1.3.1.1 +1 -56
NTP_4_2_6P3_RC11
- sntp/sntp-opts.texi@1.145 +213 -0
+ sntp/sntp-opts.texi@1.117.28.1 +213 -0
NTP_4_2_6P3_RC11
- sntp/sntp.1@1.145 +2 -2
+ sntp/sntp.1@1.117.28.1 +2 -2
NTP_4_2_6P3_RC11
- sntp/sntp.html@1.35 +6 -62
+ sntp/sntp.html@1.7.28.1 +6 -62
NTP_4_2_6P3_RC11
- util/ntp-keygen-opts.c@1.275 +2 -2
+ util/ntp-keygen-opts.c@1.247.28.1 +2 -2
NTP_4_2_6P3_RC11
- util/ntp-keygen-opts.h@1.275 +3 -3
+ util/ntp-keygen-opts.h@1.247.28.1 +3 -3
NTP_4_2_6P3_RC11
- util/ntp-keygen-opts.menu@1.4 +1 -94
+ util/ntp-keygen-opts.menu@1.3.1.1 +1 -94
NTP_4_2_6P3_RC11
- util/ntp-keygen-opts.texi@1.274 +314 -0
+ util/ntp-keygen-opts.texi@1.246.28.1 +314 -0
NTP_4_2_6P3_RC11
- util/ntp-keygen.1@1.274 +2 -2
+ util/ntp-keygen.1@1.246.28.1 +2 -2
NTP_4_2_6P3_RC11
-ChangeSet@1.2257.1.7, 2010-11-27 23:10:00-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.40.7, 2010-11-27 23:10:00-05:00, stenn@deacon.udel.edu
Improvements to the 'build' script
- ChangeLog@1.686 +1 -0
+ ChangeLog@1.496.26.119 +1 -0
Improvements to the 'build' script
build@1.36 +60 -18
Improvements to the 'build' script
-ChangeSet@1.2257.1.6, 2010-11-24 04:13:50-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2299, 2010-11-27 17:56:17-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.670 +1 -0
+ Documentation updates from Dave Mills
+
+ html/pic/sx5.gif@1.1 +456 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/sx5.gif
+
+ html/pic/sx5.gif@1.0 +0 -0
+
+ChangeSet@1.2298, 2010-11-27 22:30:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P85
+ TAG: NTP_4_2_7P85
+
+ ChangeLog@1.669 +1 -0
+ NTP_4_2_7P85
+
+ ntpd/ntpd-opts.c@1.89 +2 -2
+ NTP_4_2_7P85
+
+ ntpd/ntpd-opts.h@1.89 +3 -3
+ NTP_4_2_7P85
+
+ ntpd/ntpd-opts.menu@1.5 +1 -64
+ NTP_4_2_7P85
+
+ ntpd/ntpd-opts.texi@1.87 +642 -0
+ NTP_4_2_7P85
+
+ ntpd/ntpd.1@1.87 +2 -2
+ NTP_4_2_7P85
+
+ ntpdc/ntpdc-opts.c@1.86 +2 -2
+ NTP_4_2_7P85
+
+ ntpdc/ntpdc-opts.h@1.86 +3 -3
+ NTP_4_2_7P85
+
+ ntpdc/ntpdc-opts.menu@1.5 +1 -58
+ NTP_4_2_7P85
+
+ ntpdc/ntpdc-opts.texi@1.86 +271 -0
+ NTP_4_2_7P85
+
+ ntpdc/ntpdc.1@1.86 +2 -2
+ NTP_4_2_7P85
+
+ ntpq/ntpq-opts.c@1.86 +2 -2
+ NTP_4_2_7P85
+
+ ntpq/ntpq-opts.h@1.86 +3 -3
+ NTP_4_2_7P85
+
+ ntpq/ntpq-opts.menu@1.5 +1 -47
+ NTP_4_2_7P85
+
+ ntpq/ntpq-opts.texi@1.86 +226 -0
+ NTP_4_2_7P85
+
+ ntpq/ntpq.1@1.86 +2 -2
+ NTP_4_2_7P85
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.86 +2 -2
+ NTP_4_2_7P85
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.86 +3 -3
+ NTP_4_2_7P85
+
+ ntpsnmpd/ntpsnmpd-opts.menu@1.5 +1 -34
+ NTP_4_2_7P85
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.86 +77 -0
+ NTP_4_2_7P85
+
+ ntpsnmpd/ntpsnmpd.1@1.86 +2 -2
+ NTP_4_2_7P85
+
+ packageinfo.sh@1.87 +1 -1
+ NTP_4_2_7P85
+
+ sntp/sntp-opts.c@1.86 +2 -2
+ NTP_4_2_7P85
+
+ sntp/sntp-opts.h@1.86 +3 -3
+ NTP_4_2_7P85
+
+ sntp/sntp-opts.menu@1.5 +1 -56
+ NTP_4_2_7P85
+
+ sntp/sntp-opts.texi@1.86 +271 -0
+ NTP_4_2_7P85
+
+ sntp/sntp.1@1.86 +2 -2
+ NTP_4_2_7P85
+
+ sntp/sntp.html@1.86 +6 -62
+ NTP_4_2_7P85
+
+ util/ntp-keygen-opts.c@1.84 +2 -2
+ NTP_4_2_7P85
+
+ util/ntp-keygen-opts.h@1.84 +3 -3
+ NTP_4_2_7P85
+
+ util/ntp-keygen-opts.menu@1.6 +1 -51
+ NTP_4_2_7P85
+
+ util/ntp-keygen-opts.texi@1.87 +374 -0
+ NTP_4_2_7P85
+
+ util/ntp-keygen.1@1.87 +2 -2
+ NTP_4_2_7P85
+
+ChangeSet@1.2297, 2010-11-24 05:32:32-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.668 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.8 +77 -69
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.40.6, 2010-11-24 04:13:50-05:00, stenn@deacon.udel.edu
Update the NEWS file to include work done in RC11
NEWS@1.113 +6 -1
Update the NEWS file to include work done in RC11
-ChangeSet@1.2257.1.5, 2010-11-24 04:00:30-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.40.5, 2010-11-24 04:00:30-05:00, stenn@deacon.udel.edu
[Bug 1733] IRIX doesn't have 'head' (affects scripts/checkChangeLog)
- ChangeLog@1.685 +1 -0
+ ChangeLog@1.496.26.118 +1 -0
[Bug 1733] IRIX doesn't have 'head' (affects scripts/checkChangeLog)
- scripts/checkChangeLog@1.3 +2 -1
+ scripts/checkChangeLog@1.1.2.2 +2 -1
[Bug 1733] IRIX doesn't have 'head' (affects scripts/checkChangeLog)
-ChangeSet@1.2257.1.4, 2010-11-23 14:58:05+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2296, 2010-11-24 00:36:54+00:00, davehart@shiny.ad.hartbrothers.com
+ cleanup AC_LANG_PROGRAM quoting to silence autoreconf
+
+ configure.ac@1.500 +4 -4
+ cleanup AC_LANG_PROGRAM quoting to silence autoreconf
+
+ChangeSet@1.2082.40.4, 2010-11-23 14:58:05+00:00, davehart@shiny.ad.hartbrothers.com
configure.ac m4 quoting cleanup
attempt to quiet expanded before required warnings from libopts
- configure.ac@1.485 +8 -8
+ configure.ac@1.465.1.20 +8 -8
correct m4 quoting
- sntp/configure.ac@1.37 +6 -6
+ sntp/configure.ac@1.31.1.6 +6 -6
configure.ac m4 quoting cleanup
sntp/libopts/m4/libopts.m4@1.9 +6 -9
attempt to quiet expanded before required warnings from libopts
-ChangeSet@1.2257.1.3, 2010-11-23 12:26:32+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.40.3, 2010-11-23 12:26:32+00:00, davehart@shiny.ad.hartbrothers.com
workaround for HP-UX /usr/include/machine/sys/getppdp.h gcc4 break.
- configure.ac@1.484 +61 -26
+ configure.ac@1.465.1.19 +61 -26
workaround for HP-UX /usr/include/machine/sys/getppdp.h gcc4 break.
- sntp/configure.ac@1.36 +49 -1
+ sntp/configure.ac@1.31.1.5 +49 -1
workaround for HP-UX /usr/include/machine/sys/getppdp.h gcc4 break.
-ChangeSet@1.2257.1.2, 2010-11-23 09:49:49+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.40.2, 2010-11-23 09:49:49+00:00, davehart@shiny.ad.hartbrothers.com
correct m4 quoting to quiet autoreconf warnings
enable ./bootstrap --force
- bootstrap@1.35 +4 -2
+ bootstrap@1.28.1.7 +4 -2
enable ./bootstrap --force
- configure.ac@1.483 +17 -14
+ configure.ac@1.465.1.18 +17 -14
correct m4 quoting to quiet autoreconf warnings
m4/ntp_openssl.m4@1.3 +7 -7
correct m4 quoting to quiet autoreconf warnings
- sntp/configure.ac@1.35 +11 -8
+ sntp/configure.ac@1.31.1.4 +11 -8
correct m4 quoting to quiet autoreconf warnings
-ChangeSet@1.2255.1.4, 2010-11-23 03:54:56+00:00, hart@psp-fb1.ntp.org
+ChangeSet@1.2082.39.4, 2010-11-23 03:54:56+00:00, hart@psp-fb1.ntp.org
build:
Do not skip configure if it is newer than config.status
build@1.35 +7 -3
Do not skip configure if it is newer than config.status
-ChangeSet@1.2255.1.3, 2010-11-22 22:54:53+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.39.3, 2010-11-22 22:54:53+00:00, davehart@shiny.ad.hartbrothers.com
Reduce bootstrap redundancy with autoreconf --no-recursive in the
top level, followed by recursive autoreconf in sntp.
- bootstrap@1.34 +2 -1
+ bootstrap@1.28.1.6 +2 -1
Reduce bootstrap redundancy with autoreconf --no-recursive in the
top level, followed by recursive autoreconf in sntp.
-ChangeSet@1.2255.1.2, 2010-11-22 07:03:31+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.39.2, 2010-11-22 07:03:31+00:00, davehart@shiny.ad.hartbrothers.com
BBF to the rescue finding typos in #ifdef'd code
- ntpd/ntp_io.c@1.318 +1 -1
+ ntpd/ntp_io.c@1.306.1.12 +1 -1
BBF to the rescue finding typos in #ifdef'd code
- sntp/networking.c@1.40 +2 -1
+ sntp/networking.c@1.29.1.11 +2 -1
BBF to the rescue finding typos in #ifdef'd code
-ChangeSet@1.2255.1.1, 2010-11-22 03:54:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2293, 2010-11-22 05:27:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P84
+ TAG: NTP_4_2_7P84
+
+ ChangeLog@1.667 +1 -0
+ NTP_4_2_7P84
+
+ ntpd/ntpd-opts.c@1.88 +5 -5
+ NTP_4_2_7P84
+
+ ntpd/ntpd-opts.h@1.88 +4 -4
+ NTP_4_2_7P84
+
+ ntpd/ntpd-opts.menu@1.4 +3 -61
+ NTP_4_2_7P84
+
+ ntpd/ntpd-opts.texi@1.86 +0 -642
+ NTP_4_2_7P84
+
+ ntpd/ntpd.1@1.86 +4 -3
+ NTP_4_2_7P84
+
+ ntpdc/ntpdc-opts.c@1.85 +75 -72
+ NTP_4_2_7P84
+
+ ntpdc/ntpdc-opts.h@1.85 +22 -24
+ NTP_4_2_7P84
+
+ ntpdc/ntpdc-opts.menu@1.4 +2 -66
+ NTP_4_2_7P84
+
+ ntpdc/ntpdc-opts.texi@1.85 +0 -271
+ NTP_4_2_7P84
+
+ ntpdc/ntpdc.1@1.85 +2 -2
+ NTP_4_2_7P84
+
+ ntpq/ntpq-opts.c@1.85 +73 -68
+ NTP_4_2_7P84
+
+ ntpq/ntpq-opts.h@1.85 +22 -24
+ NTP_4_2_7P84
+
+ ntpq/ntpq-opts.menu@1.4 +2 -51
+ NTP_4_2_7P84
+
+ ntpq/ntpq-opts.texi@1.85 +0 -226
+ NTP_4_2_7P84
+
+ ntpq/ntpq.1@1.85 +2 -2
+ NTP_4_2_7P84
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.85 +55 -52
+ NTP_4_2_7P84
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.85 +22 -24
+ NTP_4_2_7P84
+
+ ntpsnmpd/ntpsnmpd-opts.menu@1.4 +2 -24
+ NTP_4_2_7P84
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.85 +0 -78
+ NTP_4_2_7P84
+
+ ntpsnmpd/ntpsnmpd.1@1.85 +2 -2
+ NTP_4_2_7P84
+
+ packageinfo.sh@1.86 +1 -1
+ NTP_4_2_7P84
+
+ sntp/sntp-opts.c@1.85 +81 -78
+ NTP_4_2_7P84
+
+ sntp/sntp-opts.h@1.85 +22 -24
+ NTP_4_2_7P84
+
+ sntp/sntp-opts.menu@1.4 +1 -1
+ NTP_4_2_7P84
+
+ sntp/sntp-opts.texi@1.85 +0 -213
+ NTP_4_2_7P84
+
+ sntp/sntp.1@1.85 +2 -2
+ NTP_4_2_7P84
+
+ sntp/sntp.html@1.85 +62 -6
+ NTP_4_2_7P84
+
+ util/ntp-keygen-opts.c@1.83 +5 -5
+ NTP_4_2_7P84
+
+ util/ntp-keygen-opts.h@1.83 +4 -4
+ NTP_4_2_7P84
+
+ util/ntp-keygen-opts.menu@1.5 +51 -1
+ NTP_4_2_7P84
+
+ util/ntp-keygen-opts.texi@1.86 +0 -374
+ NTP_4_2_7P84
+
+ util/ntp-keygen.1@1.86 +2 -2
+ NTP_4_2_7P84
+
+ChangeSet@1.2082.39.1, 2010-11-22 03:54:12+00:00, davehart@shiny.ad.hartbrothers.com
Bump minimum Automake version to 1.11, required for AM_COND_IF
use in LIBOPTS_CHECK.
- ChangeLog@1.684 +3 -1
+ ChangeLog@1.496.26.117 +3 -1
Bump minimum Automake version to 1.11, required for AM_COND_IF
use in LIBOPTS_CHECK.
- Makefile.am@1.99 +2 -1
+ Makefile.am@1.93.2.6 +2 -1
bump minimum Automake version to 1.11 for AM_COND_IF support
needed by local mod to libopts/m4/libopts.m4
- sntp/Makefile.am@1.31.1.1 +2 -1
+ sntp/Makefile.am@1.21.2.1 +2 -1
bump minimum Automake version to 1.11 for AM_COND_IF support
needed by local mod to libopts/m4/libopts.m4
-ChangeSet@1.2258, 2010-11-21 23:03:15+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2291, 2010-11-22 03:17:40+00:00, davehart@shiny.ad.hartbrothers.com
+ Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+
+ ChangeLog@1.665 +2 -0
+ Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+
+ include/ntp.h@1.188 +0 -1
+ "tos nonvolatile" was mistaken
+
+ ntpd/complete.conf@1.12 +3 -2
+ Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+
+ ntpd/ntp_config.c@1.275 +63 -34
+ Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+
+ ntpd/ntp_parser.c@1.71 +403 -401
+ bison output
+
+ ntpd/ntp_parser.y@1.65 +1 -1
+ Add "nonvolatile" ntp.conf directive to control how often the
+ driftfile is written.
+
+ ntpd/ntp_scanner.c@1.39 +6 -8
+ Allow doubles with exponent and without a decimal point.
+
+ChangeSet@1.2290, 2010-11-21 23:12:16+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1618] Unreachable code in jjy_start().
+ JJY driver improvements for Tristate JJY01/02, including changes
+ to its clockstats format.
+
+ applies to prior cset merged from a -stable repo
+
+ ChangeLog@1.664 +3 -0
+ [Bug 1618] Unreachable code in jjy_start().
+ JJY driver improvements for Tristate JJY01/02, including changes
+ to its clockstats format.
+
+
+ChangeSet@1.2082.4.171, 2010-11-21 23:03:15+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1618] jjy_start() unreachable code.
refclock_jjy.c Tristate JJY01/02 improvements.
- html/copyright.html@1.48 +1 -0
+ html/copyright.html@1.46.1.2 +1 -0
Credit refclock_jjy author Takao Abe
ntpd/refclock_jjy.c@1.19 +586 -348
[Bug 1618] jjy_start() unreachable code.
refclock_jjy.c Tristate JJY01/02 improvements.
-ChangeSet@1.2257, 2010-11-20 17:18:02-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2287, 2010-11-20 23:22:10+00:00, davehart@shiny.ad.hartbrothers.com
+ remove Autogen 5.10 --wait-sync workaround from ntpdbase-opts.def, ntpd.c
+
+ ntpd/ntpd-opts.c@1.87 +147 -170
+ autogen output
+
+ ntpd/ntpd-opts.h@1.87 +24 -22
+ autogen output
+
+ ntpd/ntpd.c@1.119 +1 -2
+ remove Autogen 5.10 --wait-sync workaround from ntpdbase-opts.def, ntpd.c
+
+ ntpd/ntpdbase-opts.def@1.22 +1 -6
+ remove Autogen 5.10 --wait-sync workaround from ntpdbase-opts.def, ntpd.c
+
+ChangeSet@1.2082.4.170, 2010-11-20 17:18:02-05:00, stenn@deacon.udel.edu
hack around a problem building sntp/sntp.html
- sntp/Makefile.am@1.32 +1 -1
+ sntp/Makefile.am@1.21.1.11 +1 -1
hack around a problem building sntp/sntp.html
-ChangeSet@1.2256, 2010-11-20 16:54:28-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.169, 2010-11-20 16:54:28-05:00, stenn@deacon.udel.edu
Add support for "br-flock -1"
br-flock@1.15 +14 -1
Add support for "br-flock -1"
-ChangeSet@1.2255, 2010-11-20 20:53:00+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.168, 2010-11-20 20:53:00+00:00, davehart@shiny.ad.hartbrothers.com
repair make distcheck failure with sntp/libopts/Makefile
- Makefile.am@1.98 +2 -8
+ Makefile.am@1.93.2.5 +2 -8
move sntp earlier than libopts users in SUBDIRS,
remove sntp/libopts from SUBDIRS, to repair make distcheck
with a shared libopts.
- bootstrap@1.33 +5 -1
+ bootstrap@1.28.1.5 +5 -1
once again use workaround of invoking autoreconf in sntp after the
top level, to ensure a correct sntp/libopts/Makefile.in.
- configure.ac@1.482 +1 -1
+ configure.ac@1.465.1.17 +1 -1
do not AC_CONFIG_FILES(sntp/libopts/Makefile)
- sntp/Makefile.am@1.31 +10 -11
+ sntp/Makefile.am@1.21.1.10 +10 -11
remove . from SUBDIRS
sntp/libopts/m4/libopts.m4@1.8 +12 -7
add 2nd arg to LIBOPTS_CHECK controlling AC_CONFIG_FILES(libopts/Makefile])
-ChangeSet@1.2254, 2010-11-20 02:50:43-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.167, 2010-11-20 02:50:43-05:00, stenn@deacon.udel.edu
Remove top-level libopts/
- BitKeeper/deleted/.del-COPYING.gplv3~f03d8366c675c284@1.2 +0 -0
+ BitKeeper/deleted/.del-COPYING.gplv3~f03d8366c675c284@1.1.1.1 +0 -0
Delete: libopts/COPYING.gplv3
- BitKeeper/deleted/.del-COPYING.lgplv3~40be4cbf4ae10117@1.2 +0 -0
+ BitKeeper/deleted/.del-COPYING.lgplv3~40be4cbf4ae10117@1.1.1.1 +0 -0
Delete: libopts/COPYING.lgplv3
- BitKeeper/deleted/.del-COPYING.mbsd~a5472d893521969b@1.2 +0 -0
+ BitKeeper/deleted/.del-COPYING.mbsd~a5472d893521969b@1.1.1.1 +0 -0
Delete: libopts/COPYING.mbsd
- BitKeeper/deleted/.del-MakeDefs.inc~c629403b9830e97a@1.2 +0 -0
+ BitKeeper/deleted/.del-MakeDefs.inc~c629403b9830e97a@1.1.1.1 +0 -0
Delete: libopts/MakeDefs.inc
- BitKeeper/deleted/.del-Makefile.am~b7467cbc80acbbcc@1.3 +0 -0
+ BitKeeper/deleted/.del-Makefile.am~b7467cbc80acbbcc@1.2.1.1 +0 -0
Delete: libopts/Makefile.am
- BitKeeper/deleted/.del-README~5bc90a91ec6411e6@1.3 +0 -0
+ BitKeeper/deleted/.del-README~5bc90a91ec6411e6@1.2.1.1 +0 -0
Delete: libopts/README
- BitKeeper/deleted/.del-ag-char-map.h~bedbb0c05ab02a70@1.6 +0 -0
+ BitKeeper/deleted/.del-ag-char-map.h~bedbb0c05ab02a70@1.5.1.1 +0 -0
Delete: libopts/ag-char-map.h
- BitKeeper/deleted/.del-autoopts.c~54350751ea38f4a9@1.5 +0 -0
+ BitKeeper/deleted/.del-autoopts.c~54350751ea38f4a9@1.4.1.1 +0 -0
Delete: libopts/autoopts.c
- BitKeeper/deleted/.del-autoopts.h~56d3d4b1ff6e5a32@1.5 +0 -0
+ BitKeeper/deleted/.del-autoopts.h~56d3d4b1ff6e5a32@1.4.1.1 +0 -0
Delete: libopts/autoopts.h
- BitKeeper/deleted/.del-boolean.c~8e1af2515312893c@1.5 +0 -0
+ BitKeeper/deleted/.del-boolean.c~8e1af2515312893c@1.4.1.1 +0 -0
Delete: libopts/boolean.c
- BitKeeper/deleted/.del-compat.h~7caca4e98e77c39@1.5 +0 -0
+ BitKeeper/deleted/.del-compat.h~7caca4e98e77c39@1.4.1.1 +0 -0
Delete: libopts/compat/compat.h
- BitKeeper/deleted/.del-configfile.c~edfc1b173dd4ca72@1.5 +0 -0
+ BitKeeper/deleted/.del-configfile.c~edfc1b173dd4ca72@1.4.1.1 +0 -0
Delete: libopts/configfile.c
- BitKeeper/deleted/.del-cook.c~a6052eddf9363b9@1.5 +0 -0
+ BitKeeper/deleted/.del-cook.c~a6052eddf9363b9@1.4.1.1 +0 -0
Delete: libopts/cook.c
- BitKeeper/deleted/.del-enumeration.c~95e4ac5ad1bbc51d@1.5 +0 -0
+ BitKeeper/deleted/.del-enumeration.c~95e4ac5ad1bbc51d@1.4.1.1 +0 -0
Delete: libopts/enumeration.c
- BitKeeper/deleted/.del-environment.c~3cd90226bb7b2b17@1.6 +0 -0
+ BitKeeper/deleted/.del-environment.c~3cd90226bb7b2b17@1.5.1.1 +0 -0
Delete: libopts/environment.c
- BitKeeper/deleted/.del-file.c~67e1b8b29a3953c9@1.5 +0 -0
+ BitKeeper/deleted/.del-file.c~67e1b8b29a3953c9@1.4.1.1 +0 -0
Delete: libopts/file.c
- BitKeeper/deleted/.del-genshell.c~3290a02566a5dbb7@1.6 +0 -0
+ BitKeeper/deleted/.del-genshell.c~3290a02566a5dbb7@1.5.1.1 +0 -0
Delete: libopts/genshell.c
- BitKeeper/deleted/.del-genshell.h~c39a618c8d4061cd@1.6 +0 -0
+ BitKeeper/deleted/.del-genshell.h~c39a618c8d4061cd@1.5.1.1 +0 -0
Delete: libopts/genshell.h
- BitKeeper/deleted/.del-libopts.c~3ef92daf425d2b@1.2 +0 -0
+ BitKeeper/deleted/.del-libopts.c~3ef92daf425d2b@1.1.1.1 +0 -0
Delete: libopts/libopts.c
- BitKeeper/deleted/.del-libopts.m4~93a05c922cf88420@1.6 +0 -0
+ BitKeeper/deleted/.del-libopts.m4~93a05c922cf88420@1.5.1.1 +0 -0
Delete: libopts/m4/libopts.m4
- BitKeeper/deleted/.del-liboptschk.m4~1413f38bcfcfd143@1.5 +0 -0
+ BitKeeper/deleted/.del-liboptschk.m4~1413f38bcfcfd143@1.4.1.1 +0 -0
Delete: libopts/m4/liboptschk.m4
- BitKeeper/deleted/.del-load.c~1667134a8de0561c@1.5 +0 -0
+ BitKeeper/deleted/.del-load.c~1667134a8de0561c@1.4.1.1 +0 -0
Delete: libopts/load.c
- BitKeeper/deleted/.del-makeshell.c~20cbf9416110166e@1.5 +0 -0
+ BitKeeper/deleted/.del-makeshell.c~20cbf9416110166e@1.4.1.1 +0 -0
Delete: libopts/makeshell.c
- BitKeeper/deleted/.del-nested.c~f07a7d9124c8d2aa@1.5 +0 -0
+ BitKeeper/deleted/.del-nested.c~f07a7d9124c8d2aa@1.4.1.1 +0 -0
Delete: libopts/nested.c
- BitKeeper/deleted/.del-numeric.c~2cd8f01381095e42@1.5 +0 -0
+ BitKeeper/deleted/.del-numeric.c~2cd8f01381095e42@1.4.1.1 +0 -0
Delete: libopts/numeric.c
- BitKeeper/deleted/.del-options.h~f2e0c23c8e5e59e8@1.6 +0 -0
+ BitKeeper/deleted/.del-options.h~f2e0c23c8e5e59e8@1.5.1.1 +0 -0
Delete: libopts/autoopts/options.h
- BitKeeper/deleted/.del-parse-duration.c~43baef4a99281837@1.2 +0 -0
+ BitKeeper/deleted/.del-parse-duration.c~43baef4a99281837@1.1.1.1 +0 -0
Delete: libopts/parse-duration.c
- BitKeeper/deleted/.del-parse-duration.h~17a3a3e1c22145d@1.2 +0 -0
+ BitKeeper/deleted/.del-parse-duration.h~17a3a3e1c22145d@1.1.1.1 +0 -0
Delete: libopts/parse-duration.h
- BitKeeper/deleted/.del-pathfind.c~91eee34e6931c147@1.5 +0 -0
+ BitKeeper/deleted/.del-pathfind.c~91eee34e6931c147@1.4.1.1 +0 -0
Delete: libopts/compat/pathfind.c
- BitKeeper/deleted/.del-pgusage.c~a31853764946ed10@1.5 +0 -0
+ BitKeeper/deleted/.del-pgusage.c~a31853764946ed10@1.4.1.1 +0 -0
Delete: libopts/pgusage.c
- BitKeeper/deleted/.del-proto.h~f433f2d660b72a7d@1.6 +0 -0
+ BitKeeper/deleted/.del-proto.h~f433f2d660b72a7d@1.5.1.1 +0 -0
Delete: libopts/proto.h
- BitKeeper/deleted/.del-putshell.c~1e2cc4a1ffb8fafd@1.5 +0 -0
+ BitKeeper/deleted/.del-putshell.c~1e2cc4a1ffb8fafd@1.4.1.1 +0 -0
Delete: libopts/putshell.c
- BitKeeper/deleted/.del-reset.c~676b344e8e06553d@1.5 +0 -0
+ BitKeeper/deleted/.del-reset.c~676b344e8e06553d@1.4.1.1 +0 -0
Delete: libopts/reset.c
- BitKeeper/deleted/.del-restore.c~7503fbe1eb367c27@1.5 +0 -0
+ BitKeeper/deleted/.del-restore.c~7503fbe1eb367c27@1.4.1.1 +0 -0
Delete: libopts/restore.c
- BitKeeper/deleted/.del-save.c~c7023eeab566cc5a@1.6 +0 -0
+ BitKeeper/deleted/.del-save.c~c7023eeab566cc5a@1.5.1.1 +0 -0
Delete: libopts/save.c
- BitKeeper/deleted/.del-snprintf.c~4020216a304b1fdf@1.2 +0 -0
+ BitKeeper/deleted/.del-snprintf.c~4020216a304b1fdf@1.1.1.1 +0 -0
Delete: libopts/compat/snprintf.c
- BitKeeper/deleted/.del-sort.c~a0f0aca832b2554c@1.5 +0 -0
+ BitKeeper/deleted/.del-sort.c~a0f0aca832b2554c@1.4.1.1 +0 -0
Delete: libopts/sort.c
- BitKeeper/deleted/.del-stack.c~159a2b84f1ceafab@1.5 +0 -0
+ BitKeeper/deleted/.del-stack.c~159a2b84f1ceafab@1.4.1.1 +0 -0
Delete: libopts/stack.c
- BitKeeper/deleted/.del-strchr.c~e00f88c19bec996f@1.2 +0 -0
+ BitKeeper/deleted/.del-strchr.c~e00f88c19bec996f@1.1.1.1 +0 -0
Delete: libopts/compat/strchr.c
- BitKeeper/deleted/.del-strdup.c~d58e7b55af5b3f83@1.2 +0 -0
+ BitKeeper/deleted/.del-strdup.c~d58e7b55af5b3f83@1.1.1.1 +0 -0
Delete: libopts/compat/strdup.c
- BitKeeper/deleted/.del-streqvcmp.c~59b1ce7223f3432@1.5 +0 -0
+ BitKeeper/deleted/.del-streqvcmp.c~59b1ce7223f3432@1.4.1.1 +0 -0
Delete: libopts/streqvcmp.c
- BitKeeper/deleted/.del-text_mmap.c~b601dfb63675456e@1.5 +0 -0
+ BitKeeper/deleted/.del-text_mmap.c~b601dfb63675456e@1.4.1.1 +0 -0
Delete: libopts/text_mmap.c
- BitKeeper/deleted/.del-time.c~41f39a05ffd762ac@1.5 +0 -0
+ BitKeeper/deleted/.del-time.c~41f39a05ffd762ac@1.4.1.1 +0 -0
Delete: libopts/time.c
- BitKeeper/deleted/.del-tokenize.c~c52b9718bf168782@1.3 +0 -0
+ BitKeeper/deleted/.del-tokenize.c~c52b9718bf168782@1.2.1.1 +0 -0
Delete: libopts/tokenize.c
- BitKeeper/deleted/.del-usage-txt.h~ca24f451aac51f1f@1.6 +0 -0
+ BitKeeper/deleted/.del-usage-txt.h~ca24f451aac51f1f@1.5.1.1 +0 -0
Delete: libopts/autoopts/usage-txt.h
- BitKeeper/deleted/.del-usage.c~5148c9dc95efdc1a@1.5 +0 -0
+ BitKeeper/deleted/.del-usage.c~5148c9dc95efdc1a@1.4.1.1 +0 -0
Delete: libopts/usage.c
- BitKeeper/deleted/.del-value-type.c~eab6702e458dce8d@1.3 +0 -0
+ BitKeeper/deleted/.del-value-type.c~eab6702e458dce8d@1.2.1.1 +0 -0
Delete: libopts/value-type.c
- BitKeeper/deleted/.del-value-type.h~8c9e9714f716dd59@1.6 +0 -0
+ BitKeeper/deleted/.del-value-type.h~8c9e9714f716dd59@1.5.1.1 +0 -0
Delete: libopts/value-type.h
- BitKeeper/deleted/.del-version.c~c1c141f1786ce61c@1.5 +0 -0
+ BitKeeper/deleted/.del-version.c~c1c141f1786ce61c@1.4.1.1 +0 -0
Delete: libopts/version.c
- BitKeeper/deleted/.del-windows-config.h~461ddbe1169c297b@1.5 +0 -0
+ BitKeeper/deleted/.del-windows-config.h~461ddbe1169c297b@1.4.1.1 +0 -0
Delete: libopts/compat/windows-config.h
- BitKeeper/deleted/.del-xat-attribute.c~8a808fcad835c47f@1.3 +0 -0
+ BitKeeper/deleted/.del-xat-attribute.c~8a808fcad835c47f@1.2.1.1 +0 -0
Delete: libopts/xat-attribute.c
- BitKeeper/deleted/.del-xat-attribute.h~7d19c77e5ff1a904@1.6 +0 -0
+ BitKeeper/deleted/.del-xat-attribute.h~7d19c77e5ff1a904@1.5.1.1 +0 -0
Delete: libopts/xat-attribute.h
-ChangeSet@1.2253, 2010-11-20 02:18:46-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.166, 2010-11-20 02:18:46-05:00, stenn@deacon.udel.edu
backport the html timestamp fixes for bootstrap
- bootstrap@1.32 +8 -4
+ bootstrap@1.28.1.4 +8 -4
backport the html timestamp fixes for bootstrap
-ChangeSet@1.2252, 2010-11-20 00:20:40-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2284, 2010-11-20 07:15:32+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ntp-keygen -l/--lifetime to control certificate expiry.
+
+ ChangeLog@1.663 +1 -0
+ Add ntp-keygen -l/--lifetime to control certificate expiry.
+
+ util/ntp-keygen-opts.c@1.82 +149 -126
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen-opts.def@1.13 +13 -1
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen-opts.h@1.82 +47 -38
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen-opts.menu@1.2.1.1 +1 -94
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen-opts.texi@1.85 +95 -79
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen.1@1.85 +9 -3
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ util/ntp-keygen.c@1.69 +4 -1
+ add ntp-keygen -l/--lifetime # to set days until expiration
+
+ChangeSet@1.2082.4.165, 2010-11-20 00:20:40-05:00, stenn@deacon.udel.edu
Properly quote the configure.ac LIBOPTS_CHECK argument
- configure.ac@1.481 +1 -1
+ configure.ac@1.465.1.16 +1 -1
Properly quote the configure.ac LIBOPTS_CHECK argument
-ChangeSet@1.2251, 2010-11-20 00:18:39-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.164, 2010-11-20 00:18:39-05:00, stenn@deacon.udel.edu
autogen-5.11.3 upgrade
sntp/libopts/Makefile.am@1.5 +3 -3
@@ -3392,7 +102820,7 @@ ChangeSet@1.2251, 2010-11-20 00:18:39-05:00, stenn@deacon.udel.edu
sntp/libopts/xat-attribute.h@1.8 +1 -1
autogen-5.11.3 upgrade
-ChangeSet@1.2250, 2010-11-20 00:16:33-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.163, 2010-11-20 00:16:33-05:00, stenn@deacon.udel.edu
autogen upgrade
ntpd/ntpd-opts.menu@1.3 +1 -1
@@ -3413,85 +102841,115 @@ ChangeSet@1.2250, 2010-11-20 00:16:33-05:00, stenn@deacon.udel.edu
util/ntp-keygen-opts.menu@1.3 +4 -4
autogen upgrade
-ChangeSet@1.2249, 2010-11-20 00:14:13-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.162, 2010-11-20 00:14:13-05:00, stenn@deacon.udel.edu
autogen upgrade
- ntpd/ntpd-opts.c@1.275 +142 -140
+ ntpd/ntpd-opts.c@1.248.27.1 +142 -140
autogen upgrade
- ntpd/ntpd-opts.h@1.275 +20 -22
+ ntpd/ntpd-opts.h@1.248.27.1 +20 -22
autogen upgrade
- ntpd/ntpd-opts.texi@1.273 +0 -583
+ ntpd/ntpd-opts.texi@1.246.27.1 +0 -583
autogen upgrade
- ntpd/ntpd.1@1.273 +2 -2
+ ntpd/ntpd.1@1.246.27.1 +2 -2
autogen upgrade
- ntpdc/ntpdc-opts.c@1.271 +74 -71
+ ntpdc/ntpdc-opts.c@1.244.27.1 +74 -71
autogen upgrade
- ntpdc/ntpdc-opts.h@1.271 +20 -22
+ ntpdc/ntpdc-opts.h@1.244.27.1 +20 -22
autogen upgrade
- ntpdc/ntpdc-opts.texi@1.270 +0 -271
+ ntpdc/ntpdc-opts.texi@1.243.27.1 +0 -271
autogen upgrade
- ntpdc/ntpdc.1@1.270 +2 -2
+ ntpdc/ntpdc.1@1.243.27.1 +2 -2
autogen upgrade
- ntpq/ntpq-opts.c@1.272 +72 -67
+ ntpq/ntpq-opts.c@1.245.27.1 +72 -67
autogen upgrade
- ntpq/ntpq-opts.h@1.272 +20 -22
+ ntpq/ntpq-opts.h@1.245.27.1 +20 -22
autogen upgrade
- ntpq/ntpq-opts.texi@1.271 +0 -226
+ ntpq/ntpq-opts.texi@1.244.27.1 +0 -226
autogen upgrade
- ntpq/ntpq.1@1.271 +2 -2
+ ntpq/ntpq.1@1.244.27.1 +2 -2
autogen upgrade
- ntpsnmpd/ntpsnmpd-opts.c@1.151 +54 -51
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.28.1 +54 -51
autogen upgrade
- ntpsnmpd/ntpsnmpd-opts.h@1.151 +20 -22
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.28.1 +20 -22
autogen upgrade
- ntpsnmpd/ntpsnmpd-opts.texi@1.151 +0 -78
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.28.1 +0 -78
autogen upgrade
- ntpsnmpd/ntpsnmpd.1@1.150 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.28.1 +2 -2
autogen upgrade
- sntp/sntp-opts.c@1.144 +80 -77
+ sntp/sntp-opts.c@1.117.27.1 +80 -77
autogen upgrade
- sntp/sntp-opts.h@1.144 +20 -22
+ sntp/sntp-opts.h@1.117.27.1 +20 -22
autogen upgrade
- sntp/sntp-opts.texi@1.144 +0 -213
+ sntp/sntp-opts.texi@1.117.27.1 +0 -213
autogen upgrade
- sntp/sntp.1@1.144 +2 -2
+ sntp/sntp.1@1.117.27.1 +2 -2
autogen upgrade
- sntp/sntp.html@1.34 +61 -5
+ sntp/sntp.html@1.7.27.1 +61 -5
autogen upgrade
- util/ntp-keygen-opts.c@1.274 +98 -105
+ util/ntp-keygen-opts.c@1.247.27.1 +98 -105
autogen upgrade
- util/ntp-keygen-opts.h@1.274 +20 -22
+ util/ntp-keygen-opts.h@1.247.27.1 +20 -22
autogen upgrade
- util/ntp-keygen-opts.texi@1.273 +0 -358
+ util/ntp-keygen-opts.texi@1.246.27.1 +0 -358
autogen upgrade
- util/ntp-keygen.1@1.273 +2 -2
+ util/ntp-keygen.1@1.246.27.1 +2 -2
autogen upgrade
-ChangeSet@1.2248, 2010-11-19 23:29:22-05:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2282, 2010-11-20 04:35:13+00:00, davehart@shiny.ad.hartbrothers.com
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ include/ntp.h@1.187 +1 -0
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ ntpd/complete.conf@1.11 +1 -1
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ ntpd/keyword-gen-utd@1.12 +1 -1
+ keyword-gen output
+
+ ntpd/keyword-gen.c@1.16 +1 -0
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ ntpd/ntp_config.c@1.274 +4 -0
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ ntpd/ntp_keyword.h@1.14 +512 -503
+ keyword-gen output
+
+ ntpd/ntp_parser.c@1.70 +810 -805
+ bison output
+
+ ntpd/ntp_parser.h@1.41 +149 -147
+ bison output
+
+ ntpd/ntp_parser.y@1.64 +2 -0
+ add "tos nonvolatile" to control interval between driftfile writes.
+
+ChangeSet@1.2082.4.161, 2010-11-19 23:29:22-05:00, stenn@psp-deb1.ntp.org
Update generated .menu files
ntpd/ntpd-opts.menu@1.2 +122 -1
@@ -3509,25 +102967,25 @@ ChangeSet@1.2248, 2010-11-19 23:29:22-05:00, stenn@psp-deb1.ntp.org
util/ntp-keygen-opts.menu@1.2 +94 -1
Update generated .menu files
-ChangeSet@1.2247, 2010-11-19 23:27:51-05:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.160, 2010-11-19 23:27:51-05:00, stenn@psp-deb1.ntp.org
Use the new autoopts no-misuse-usage keyword
include/copyright.def@1.12 +1 -0
Use the new autoopts no-misuse-usage keyword
-ChangeSet@1.2246, 2010-11-19 23:26:17-05:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.159, 2010-11-19 23:26:17-05:00, stenn@psp-deb1.ntp.org
Upgrade libopts to 33.3.8 and autogen to 5.11.3
- ChangeLog@1.683 +2 -0
+ ChangeLog@1.496.26.116 +2 -0
Use a single copy of libopts/, in sntp/
- Makefile.am@1.97 +11 -15
+ Makefile.am@1.93.2.4 +11 -15
Use a single copy of libopts/, in sntp/
- configure.ac@1.480 +1 -1
+ configure.ac@1.465.1.15 +1 -1
Use a single copy of libopts/, in sntp/
- deps-ver@1.2 +1 -1
+ deps-ver@1.1.1.1 +1 -1
Use a single copy of libopts/, in sntp/
sntp/libopts/COPYING.gplv3@1.3 +1 -1
@@ -3668,270 +103126,889 @@ ChangeSet@1.2246, 2010-11-19 23:26:17-05:00, stenn@psp-deb1.ntp.org
sntp/libopts/xat-attribute.h@1.7 +1 -1
libopts-33.3.8
-ChangeSet@1.2245, 2010-11-18 05:09:05+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2272.1.7, 2010-11-19 22:27:35-05:00, stenn@deacon.udel.edu
+ Initial loopfilter overhaul from Dave Mills
+
+ ChangeLog@1.655.1.7 +4 -0
+ Initial loopfilter overhaul from Dave Mills
+
+ html/keygen.html@1.23 +3 -1
+ Initial loopfilter overhaul from Dave Mills
+
+ html/miscopt.html@1.62 +16 -19
+ Initial loopfilter overhaul from Dave Mills
+
+ include/ntp.h@1.184.1.1 +4 -5
+ Initial loopfilter overhaul from Dave Mills
+
+ include/ntpd.h@1.143.1.1 +0 -3
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_config.c@1.271.1.1 +0 -8
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_loopfilter.c@1.162 +39 -53
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_proto.c@1.312 +5 -5
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_request.c@1.95.1.1 +0 -8
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_timer.c@1.62 +4 -6
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntp_util.c@1.87 +60 -73
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntpd.c@1.118 +1 -1
+ Initial loopfilter overhaul from Dave Mills
+
+ ntpd/ntpsim.c@1.29 +1 -1
+ Initial loopfilter overhaul from Dave Mills
+
+ChangeSet@1.2082.4.158, 2010-11-18 05:09:05+00:00, davehart@shiny.ad.hartbrothers.com
convert Windows build to share single sntp/libopts
- ports/winnt/vc6/libntp.dsp@1.53 +3 -3
+ ports/winnt/vc6/libntp.dsp@1.43.1.10 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vc6/ntpd.dsp@1.43 +4 -4
+ ports/winnt/vc6/ntpd.dsp@1.39.1.4 +4 -4
convert Windows build to share single sntp/libopts
- ports/winnt/vc6/ntpdc.dsp@1.29 +2 -2
+ ports/winnt/vc6/ntpdc.dsp@1.28.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vc6/ntpkeygen.dsp@1.21 +2 -2
+ ports/winnt/vc6/ntpkeygen.dsp@1.20.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vc6/ntpq.dsp@1.30 +2 -2
+ ports/winnt/vc6/ntpq.dsp@1.29.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2003/libntp.vcproj@1.8 +3 -3
+ ports/winnt/vs2003/libntp.vcproj@1.4.1.4 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vs2003/ntpd.vcproj@1.6 +3 -3
+ ports/winnt/vs2003/ntpd.vcproj@1.4.1.2 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vs2003/ntpdc.vcproj@1.5 +2 -2
+ ports/winnt/vs2003/ntpdc.vcproj@1.4.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2003/ntpkeygen.vcproj@1.4 +2 -2
+ ports/winnt/vs2003/ntpkeygen.vcproj@1.3.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2003/ntpq.vcproj@1.5 +2 -2
+ ports/winnt/vs2003/ntpq.vcproj@1.4.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2005/libntp.vcproj@1.8 +3 -3
+ ports/winnt/vs2005/libntp.vcproj@1.4.1.4 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vs2005/ntpd.vcproj@1.6 +3 -3
+ ports/winnt/vs2005/ntpd.vcproj@1.4.1.2 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vs2005/ntpdc.vcproj@1.5 +2 -2
+ ports/winnt/vs2005/ntpdc.vcproj@1.4.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2005/ntpkeygen.vcproj@1.4 +2 -2
+ ports/winnt/vs2005/ntpkeygen.vcproj@1.3.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2005/ntpq.vcproj@1.5 +2 -2
+ ports/winnt/vs2005/ntpq.vcproj@1.4.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2008/libntp/libntp.vcproj@1.26 +4 -4
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.1.6 +4 -4
convert Windows build to share single sntp/libopts
- ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.10 +2 -2
+ ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.9.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2008/ntpd/ntpd.vcproj@1.24 +3 -3
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.21.1.3 +3 -3
convert Windows build to share single sntp/libopts
- ports/winnt/vs2008/ntpdc/ntpdc.vcproj@1.13 +2 -2
+ ports/winnt/vs2008/ntpdc/ntpdc.vcproj@1.12.1.1 +2 -2
convert Windows build to share single sntp/libopts
- ports/winnt/vs2008/ntpq/ntpq.vcproj@1.12 +2 -2
+ ports/winnt/vs2008/ntpq/ntpq.vcproj@1.11.1.1 +2 -2
convert Windows build to share single sntp/libopts
-ChangeSet@1.2239.1.1, 2010-11-15 23:53:16-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2272.1.6, 2010-11-17 10:10:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P83
+ TAG: NTP_4_2_7P83
+
+ ChangeLog@1.655.1.6 +1 -0
+ NTP_4_2_7P83
+
+ ntpd/ntpd-opts.c@1.86 +2 -2
+ NTP_4_2_7P83
+
+ ntpd/ntpd-opts.h@1.86 +3 -3
+ NTP_4_2_7P83
+
+ ntpd/ntpd-opts.texi@1.85 +2 -2
+ NTP_4_2_7P83
+
+ ntpd/ntpd.1@1.85 +2 -2
+ NTP_4_2_7P83
+
+ ntpdc/ntpdc-opts.c@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpdc/ntpdc-opts.h@1.84 +3 -3
+ NTP_4_2_7P83
+
+ ntpdc/ntpdc-opts.texi@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpdc/ntpdc.1@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpq/ntpq-opts.c@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpq/ntpq-opts.h@1.84 +3 -3
+ NTP_4_2_7P83
+
+ ntpq/ntpq-opts.texi@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpq/ntpq.1@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.84 +3 -3
+ NTP_4_2_7P83
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.84 +2 -2
+ NTP_4_2_7P83
+
+ ntpsnmpd/ntpsnmpd.1@1.84 +2 -2
+ NTP_4_2_7P83
+
+ packageinfo.sh@1.85 +1 -1
+ NTP_4_2_7P83
+
+ sntp/sntp-opts.c@1.84 +2 -2
+ NTP_4_2_7P83
+
+ sntp/sntp-opts.h@1.84 +3 -3
+ NTP_4_2_7P83
+
+ sntp/sntp-opts.texi@1.84 +1 -1
+ NTP_4_2_7P83
+
+ sntp/sntp.1@1.84 +2 -2
+ NTP_4_2_7P83
+
+ sntp/sntp.html@1.84 +1 -1
+ NTP_4_2_7P83
+
+ util/ntp-keygen-opts.c@1.81 +2 -2
+ NTP_4_2_7P83
+
+ util/ntp-keygen-opts.h@1.81 +3 -3
+ NTP_4_2_7P83
+
+ util/ntp-keygen-opts.texi@1.84 +2 -2
+ NTP_4_2_7P83
+
+ util/ntp-keygen.1@1.84 +2 -2
+ NTP_4_2_7P83
+
+ChangeSet@1.2277, 2010-11-17 05:31:02+00:00, davehart@shiny.ad.hartbrothers.com
+ remove ChangeLog reference to 1727, integrated first from another branch.
+
+ ChangeLog@1.658 +0 -1
+ remove ChangeLog reference to 1727, integrated first from another branch.
+
+ChangeSet@1.2272.2.1, 2010-11-16 20:00:54-05:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.655.2.1 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.7 +2 -2
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.61 +4 -4
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2272.1.4, 2010-11-16 20:36:48+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ ChangeLog@1.655.1.4 +1 -0
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ util/ntp-keygen.c@1.66.1.1 +2 -2
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ChangeSet@1.2272.1.3, 2010-11-16 19:52:26+00:00, davehart@shiny.ad.hartbrothers.com
+ get rid of duplicate libopts copy
+
+ BitKeeper/deleted/04/README~5bc90a91ec6411e6@1.3 +0 -0
+ Rename: libopts/README -> BitKeeper/deleted/04/README~5bc90a91ec6411e6
+
+ BitKeeper/deleted/04/value-type.h~8c9e9714f716dd59@1.6 +0 -0
+ Rename: libopts/value-type.h -> BitKeeper/deleted/04/value-type.h~8c9e9714f716dd59
+
+ BitKeeper/deleted/07/usage.c~5148c9dc95efdc1a@1.5 +0 -0
+ Rename: libopts/usage.c -> BitKeeper/deleted/07/usage.c~5148c9dc95efdc1a
+
+ BitKeeper/deleted/0e/putshell.c~1e2cc4a1ffb8fafd@1.5 +0 -0
+ Rename: libopts/putshell.c -> BitKeeper/deleted/0e/putshell.c~1e2cc4a1ffb8fafd
+
+ BitKeeper/deleted/13/tokenize.c~c52b9718bf168782@1.3 +0 -0
+ Rename: libopts/tokenize.c -> BitKeeper/deleted/13/tokenize.c~c52b9718bf168782
+
+ BitKeeper/deleted/16/load.c~1667134a8de0561c@1.5 +0 -0
+ Rename: libopts/load.c -> BitKeeper/deleted/16/load.c~1667134a8de0561c
+
+ BitKeeper/deleted/18/streqvcmp.c~59b1ce7223f3432@1.5 +0 -0
+ Rename: libopts/streqvcmp.c -> BitKeeper/deleted/18/streqvcmp.c~59b1ce7223f3432
+
+ BitKeeper/deleted/1b/file.c~67e1b8b29a3953c9@1.5 +0 -0
+ Rename: libopts/file.c -> BitKeeper/deleted/1b/file.c~67e1b8b29a3953c9
+
+ BitKeeper/deleted/20/cook.c~a6052eddf9363b9@1.5 +0 -0
+ Rename: libopts/cook.c -> BitKeeper/deleted/20/cook.c~a6052eddf9363b9
+
+ BitKeeper/deleted/27/makeshell.c~20cbf9416110166e@1.5 +0 -0
+ Rename: libopts/makeshell.c -> BitKeeper/deleted/27/makeshell.c~20cbf9416110166e
+
+ BitKeeper/deleted/29/compat.h~7caca4e98e77c39@1.5 +0 -0
+ Rename: libopts/compat/compat.h -> BitKeeper/deleted/29/compat.h~7caca4e98e77c39
+
+ BitKeeper/deleted/29/enumeration.c~95e4ac5ad1bbc51d@1.5 +0 -0
+ Rename: libopts/enumeration.c -> BitKeeper/deleted/29/enumeration.c~95e4ac5ad1bbc51d
+
+ BitKeeper/deleted/2a/genshell.c~3290a02566a5dbb7@1.6 +0 -0
+ Rename: libopts/genshell.c -> BitKeeper/deleted/2a/genshell.c~3290a02566a5dbb7
+
+ BitKeeper/deleted/2b/sort.c~a0f0aca832b2554c@1.5 +0 -0
+ Rename: libopts/sort.c -> BitKeeper/deleted/2b/sort.c~a0f0aca832b2554c
+
+ BitKeeper/deleted/2c/pgusage.c~a31853764946ed10@1.5 +0 -0
+ Rename: libopts/pgusage.c -> BitKeeper/deleted/2c/pgusage.c~a31853764946ed10
+
+ BitKeeper/deleted/36/version.c~c1c141f1786ce61c@1.5 +0 -0
+ Rename: libopts/version.c -> BitKeeper/deleted/36/version.c~c1c141f1786ce61c
+
+ BitKeeper/deleted/3b/text_mmap.c~b601dfb63675456e@1.5 +0 -0
+ Rename: libopts/text_mmap.c -> BitKeeper/deleted/3b/text_mmap.c~b601dfb63675456e
+
+ BitKeeper/deleted/46/strchr.c~e00f88c19bec996f@1.2 +0 -0
+ Rename: libopts/compat/strchr.c -> BitKeeper/deleted/46/strchr.c~e00f88c19bec996f
+
+ BitKeeper/deleted/48/MakeDefs.inc~c629403b9830e97a@1.2 +0 -0
+ Rename: libopts/MakeDefs.inc -> BitKeeper/deleted/48/MakeDefs.inc~c629403b9830e97a
+
+ BitKeeper/deleted/4b/value-type.c~eab6702e458dce8d@1.3 +0 -0
+ Rename: libopts/value-type.c -> BitKeeper/deleted/4b/value-type.c~eab6702e458dce8d
+
+ BitKeeper/deleted/4c/boolean.c~8e1af2515312893c@1.5 +0 -0
+ Rename: libopts/boolean.c -> BitKeeper/deleted/4c/boolean.c~8e1af2515312893c
+
+ BitKeeper/deleted/67/environment.c~3cd90226bb7b2b17@1.6 +0 -0
+ Rename: libopts/environment.c -> BitKeeper/deleted/67/environment.c~3cd90226bb7b2b17
+
+ BitKeeper/deleted/6b/usage-txt.h~ca24f451aac51f1f@1.6 +0 -0
+ Rename: libopts/autoopts/usage-txt.h -> BitKeeper/deleted/6b/usage-txt.h~ca24f451aac51f1f
+
+ BitKeeper/deleted/6c/snprintf.c~4020216a304b1fdf@1.2 +0 -0
+ Rename: libopts/compat/snprintf.c -> BitKeeper/deleted/6c/snprintf.c~4020216a304b1fdf
+
+ BitKeeper/deleted/6c/windows-config.h~461ddbe1169c297b@1.5 +0 -0
+ Rename: libopts/compat/windows-config.h -> BitKeeper/deleted/6c/windows-config.h~461ddbe1169c297b
+
+ BitKeeper/deleted/7a/autoopts.c~54350751ea38f4a9@1.5 +0 -0
+ Rename: libopts/autoopts.c -> BitKeeper/deleted/7a/autoopts.c~54350751ea38f4a9
+
+ BitKeeper/deleted/82/xat-attribute.h~7d19c77e5ff1a904@1.6 +0 -0
+ Rename: libopts/xat-attribute.h -> BitKeeper/deleted/82/xat-attribute.h~7d19c77e5ff1a904
+
+ BitKeeper/deleted/8f/options.h~f2e0c23c8e5e59e8@1.6 +0 -0
+ Rename: libopts/autoopts/options.h -> BitKeeper/deleted/8f/options.h~f2e0c23c8e5e59e8
+
+ BitKeeper/deleted/91/parse-duration.c~43baef4a99281837@1.2 +0 -0
+ Rename: libopts/parse-duration.c -> BitKeeper/deleted/91/parse-duration.c~43baef4a99281837
+
+ BitKeeper/deleted/94/xat-attribute.c~8a808fcad835c47f@1.3 +0 -0
+ Rename: libopts/xat-attribute.c -> BitKeeper/deleted/94/xat-attribute.c~8a808fcad835c47f
+
+ BitKeeper/deleted/9b/genshell.h~c39a618c8d4061cd@1.6 +0 -0
+ Rename: libopts/genshell.h -> BitKeeper/deleted/9b/genshell.h~c39a618c8d4061cd
+
+ BitKeeper/deleted/9c/nested.c~f07a7d9124c8d2aa@1.5 +0 -0
+ Rename: libopts/nested.c -> BitKeeper/deleted/9c/nested.c~f07a7d9124c8d2aa
+
+ BitKeeper/deleted/a0/autoopts.h~56d3d4b1ff6e5a32@1.5 +0 -0
+ Rename: libopts/autoopts.h -> BitKeeper/deleted/a0/autoopts.h~56d3d4b1ff6e5a32
+
+ BitKeeper/deleted/a0/reset.c~676b344e8e06553d@1.5 +0 -0
+ Rename: libopts/reset.c -> BitKeeper/deleted/a0/reset.c~676b344e8e06553d
+
+ BitKeeper/deleted/bb/configfile.c~edfc1b173dd4ca72@1.5 +0 -0
+ Rename: libopts/configfile.c -> BitKeeper/deleted/bb/configfile.c~edfc1b173dd4ca72
+
+ BitKeeper/deleted/bc/COPYING.mbsd~a5472d893521969b@1.2 +0 -0
+ Rename: libopts/COPYING.mbsd -> BitKeeper/deleted/bc/COPYING.mbsd~a5472d893521969b
+
+ BitKeeper/deleted/c0/COPYING.lgplv3~40be4cbf4ae10117@1.2 +0 -0
+ Rename: libopts/COPYING.lgplv3 -> BitKeeper/deleted/c0/COPYING.lgplv3~40be4cbf4ae10117
+
+ BitKeeper/deleted/c4/strdup.c~d58e7b55af5b3f83@1.2 +0 -0
+ Rename: libopts/compat/strdup.c -> BitKeeper/deleted/c4/strdup.c~d58e7b55af5b3f83
+
+ BitKeeper/deleted/c6/stack.c~159a2b84f1ceafab@1.5 +0 -0
+ Rename: libopts/stack.c -> BitKeeper/deleted/c6/stack.c~159a2b84f1ceafab
+
+ BitKeeper/deleted/cd/libopts.c~3ef92daf425d2b@1.2 +0 -0
+ Rename: libopts/libopts.c -> BitKeeper/deleted/cd/libopts.c~3ef92daf425d2b
+
+ BitKeeper/deleted/ce/numeric.c~2cd8f01381095e42@1.5 +0 -0
+ Rename: libopts/numeric.c -> BitKeeper/deleted/ce/numeric.c~2cd8f01381095e42
+
+ BitKeeper/deleted/d4/pathfind.c~91eee34e6931c147@1.5 +0 -0
+ Rename: libopts/compat/pathfind.c -> BitKeeper/deleted/d4/pathfind.c~91eee34e6931c147
+
+ BitKeeper/deleted/d7/time.c~41f39a05ffd762ac@1.5 +0 -0
+ Rename: libopts/time.c -> BitKeeper/deleted/d7/time.c~41f39a05ffd762ac
+
+ BitKeeper/deleted/da/liboptschk.m4~1413f38bcfcfd143@1.5 +0 -0
+ Rename: libopts/m4/liboptschk.m4 -> BitKeeper/deleted/da/liboptschk.m4~1413f38bcfcfd143
+
+ BitKeeper/deleted/e1/Makefile.am~b7467cbc80acbbcc@1.3 +0 -0
+ Rename: libopts/Makefile.am -> BitKeeper/deleted/e1/Makefile.am~b7467cbc80acbbcc
+
+ BitKeeper/deleted/e5/ag-char-map.h~bedbb0c05ab02a70@1.6 +0 -0
+ Rename: libopts/ag-char-map.h -> BitKeeper/deleted/e5/ag-char-map.h~bedbb0c05ab02a70
+
+ BitKeeper/deleted/e8/libopts.m4~93a05c922cf88420@1.6 +0 -0
+ Rename: libopts/m4/libopts.m4 -> BitKeeper/deleted/e8/libopts.m4~93a05c922cf88420
+
+ BitKeeper/deleted/f4/proto.h~f433f2d660b72a7d@1.6 +0 -0
+ Rename: libopts/proto.h -> BitKeeper/deleted/f4/proto.h~f433f2d660b72a7d
+
+ BitKeeper/deleted/f6/COPYING.gplv3~f03d8366c675c284@1.2 +0 -0
+ Rename: libopts/COPYING.gplv3 -> BitKeeper/deleted/f6/COPYING.gplv3~f03d8366c675c284
+
+ BitKeeper/deleted/f7/parse-duration.h~17a3a3e1c22145d@1.2 +0 -0
+ Rename: libopts/parse-duration.h -> BitKeeper/deleted/f7/parse-duration.h~17a3a3e1c22145d
+
+ BitKeeper/deleted/f8/restore.c~7503fbe1eb367c27@1.5 +0 -0
+ Rename: libopts/restore.c -> BitKeeper/deleted/f8/restore.c~7503fbe1eb367c27
+
+ BitKeeper/deleted/fc/save.c~c7023eeab566cc5a@1.6 +0 -0
+ Rename: libopts/save.c -> BitKeeper/deleted/fc/save.c~c7023eeab566cc5a
+
+ ChangeLog@1.655.1.3 +1 -0
+ Remove top-level libopts, use sntp/libopts.
+
+ Makefile.am@1.99 +8 -12
+ Remove top-level libopts, use sntp/libopts.
+
+ configure.ac@1.496 +1 -1
+ Remove top-level libopts, use sntp/libopts.
+
+ deps-ver@1.2 +1 -1
+ bump deps-ver to trigger clean build with removal of top-level
+ copy of libopts
+
+ ports/winnt/vc6/libntp.dsp@1.54 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vc6/ntpd.dsp@1.50 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vc6/ntpdc.dsp@1.29 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vc6/ntpkeygen.dsp@1.21 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vc6/ntpq.dsp@1.30 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2003/libntp.vcproj@1.12 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2003/ntpd.vcproj@1.11 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2003/ntpdc.vcproj@1.5 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2003/ntpkeygen.vcproj@1.4 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2003/ntpq.vcproj@1.5 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2005/libntp.vcproj@1.10 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.11 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2005/ntpdc.vcproj@1.5 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2005/ntpkeygen.vcproj@1.4 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2005/ntpq.vcproj@1.5 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.31 +4 -4
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.11 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.33 +3 -3
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2008/ntpdc/ntpdc.vcproj@1.14 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ ports/winnt/vs2008/ntpq/ntpq.vcproj@1.13 +2 -2
+ Remove top-level libopts, use sntp/libopts.
+
+ChangeSet@1.2272.1.2, 2010-11-16 10:10:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P82
+ TAG: NTP_4_2_7P82
+
+ ChangeLog@1.655.1.2 +1 -0
+ NTP_4_2_7P82
+
+ ntpd/ntpd-opts.c@1.85 +2 -2
+ NTP_4_2_7P82
+
+ ntpd/ntpd-opts.h@1.85 +3 -3
+ NTP_4_2_7P82
+
+ ntpd/ntpd-opts.texi@1.84 +2 -2
+ NTP_4_2_7P82
+
+ ntpd/ntpd.1@1.84 +2 -2
+ NTP_4_2_7P82
+
+ ntpdc/ntpdc-opts.c@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpdc/ntpdc-opts.h@1.83 +3 -3
+ NTP_4_2_7P82
+
+ ntpdc/ntpdc-opts.texi@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpdc/ntpdc.1@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpq/ntpq-opts.c@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpq/ntpq-opts.h@1.83 +3 -3
+ NTP_4_2_7P82
+
+ ntpq/ntpq-opts.texi@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpq/ntpq.1@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.83 +3 -3
+ NTP_4_2_7P82
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.83 +2 -2
+ NTP_4_2_7P82
+
+ ntpsnmpd/ntpsnmpd.1@1.83 +2 -2
+ NTP_4_2_7P82
+
+ packageinfo.sh@1.84 +1 -1
+ NTP_4_2_7P82
+
+ sntp/sntp-opts.c@1.83 +2 -2
+ NTP_4_2_7P82
+
+ sntp/sntp-opts.h@1.83 +3 -3
+ NTP_4_2_7P82
+
+ sntp/sntp-opts.texi@1.83 +1 -1
+ NTP_4_2_7P82
+
+ sntp/sntp.1@1.83 +2 -2
+ NTP_4_2_7P82
+
+ sntp/sntp.html@1.83 +1 -1
+ NTP_4_2_7P82
+
+ util/ntp-keygen-opts.c@1.80 +2 -2
+ NTP_4_2_7P82
+
+ util/ntp-keygen-opts.h@1.80 +3 -3
+ NTP_4_2_7P82
+
+ util/ntp-keygen-opts.texi@1.83 +2 -2
+ NTP_4_2_7P82
+
+ util/ntp-keygen.1@1.83 +2 -2
+ NTP_4_2_7P82
+
+ChangeSet@1.2082.38.1, 2010-11-15 23:53:16-05:00, stenn@deacon.udel.edu
[Bug 1728] In ntp_openssl.m4, don't add -I/usr/include or -L/usr/lib to CPPFLAGS or LDFLAGS
- ChangeLog@1.679.1.1 +5 -0
+ ChangeLog@1.496.58.1 +5 -0
[Bug 1728] In ntp_openssl.m4, don't add -I/usr/include or -L/usr/lib to CPPFLAGS or LDFLAGS
m4/ntp_openssl.m4@1.2 +12 -4
[Bug 1728] In ntp_openssl.m4, don't add -I/usr/include or -L/usr/lib to CPPFLAGS or LDFLAGS
-ChangeSet@1.2243, 2010-11-16 00:53:57+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.156, 2010-11-16 00:53:57+00:00, davehart@shiny.ad.hartbrothers.com
correct tests for link-local (fe80) and site-local (fec0) unicast
IPv6 addresses in selecting default multicast source addresses.
- ntpd/ntp_io.c@1.317 +19 -18
+ ntpd/ntp_io.c@1.306.1.11 +19 -18
correct tests for link-local (fe80) and site-local (fec0) unicast
IPv6 addresses in selecting default multicast source addresses.
-ChangeSet@1.2242, 2010-11-15 22:39:31+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2275, 2010-11-16 00:07:47+00:00, davehart@shiny.ad.hartbrothers.com
+ merge repair
+
+ BitKeeper/deleted/3e/log-expected-log~2cb22a7a98bc5f12@1.3 +0 -0
+ Rename: sntp/tests/data/log-expected-log -> BitKeeper/deleted/3e/log-expected-log~2cb22a7a98bc5f12
+
+ BitKeeper/deleted/70/log-expected-debug~2e237608238fd4f0@1.3 +0 -0
+ Rename: sntp/tests/data/log-expected-debug -> BitKeeper/deleted/70/log-expected-debug~2e237608238fd4f0
+
+ BitKeeper/deleted/cc/logFile.cpp~7fc28eb9a26c17c2@1.7 +0 -0
+ Rename: sntp/tests/logFile.cpp -> BitKeeper/deleted/cc/logFile.cpp~7fc28eb9a26c17c2
+
+ include/ntpd.h@1.145 +1 -1
+ merge repair
+
+ libntp/ntp_calendar.c@1.3 +10 -10
+ silence warnings about truncation
+
+ ntpd/ntp_control.c@1.141 +2 -2
+ merge repair
+
+ ntpd/ntp_filegen.c@1.22 +1 -2
+ silence warnings
+
+ ntpd/ntp_io.c@1.329 +5 -6
+ merge repair
+
+ ntpd/ntp_peer.c@1.137 +8 -10
+ merge repair
+
+ sntp/tests/Makefile.am@1.17 +1 -4
+ remove sntp logging unit tests, as sntp uses only msyslog now.
+
+ChangeSet@1.2082.4.155, 2010-11-15 22:39:31+00:00, davehart@shiny.ad.hartbrothers.com
Remove log_msg() and debug_msg() from sntp in favor of msyslog().
- ChangeLog@1.681 +1 -0
+ ChangeLog@1.496.26.114 +1 -0
Remove log_msg() and debug_msg() from sntp in favor of msyslog().
- sntp/log.c@1.15 +0 -19
+ sntp/log.c@1.11.1.4 +0 -19
Remove log_msg() and debug_msg() from sntp in favor of msyslog().
sntp/log.h@1.10 +0 -3
Remove log_msg() and debug_msg() from sntp in favor of msyslog().
- sntp/main.c@1.31 +6 -11
+ sntp/main.c@1.24.1.7 +6 -11
Remove log_msg() and debug_msg() from sntp in favor of msyslog().
-ChangeSet@1.2241, 2010-11-15 20:09:00+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2273, 2010-11-15 22:30:55+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ ChangeLog@1.656 +1 -0
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ util/ntp-keygen.c@1.67 +2 -2
+ [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
+
+ChangeSet@1.2082.4.154, 2010-11-15 20:09:00+00:00, davehart@shiny.ad.hartbrothers.com
Do not send multicast from both link-local and global addresses on
the same underlying network interface.
- ntpd/ntp_io.c@1.316 +74 -32
+ ntpd/ntp_io.c@1.306.1.10 +74 -32
Do not send multicast from both link-local and global addresses on
the same underlying network interface.
-ChangeSet@1.2240, 2010-11-15 18:24:32+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.153, 2010-11-15 18:24:32+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1725] ntpd sends multicast from only one address.
- ChangeLog@1.680 +4 -0
+ ChangeLog@1.496.26.113 +4 -0
[Bug 1725] ntpd sends multicast from only one address.
- include/ntp.h@1.171 +29 -23
+ include/ntp.h@1.168.1.3 +29 -23
[Bug 1725] ntpd sends multicast from only one address.
begin changing internal references from "struct interface" to "endpt"
- include/ntpd.h@1.139 +9 -9
+ include/ntpd.h@1.137.2.2 +9 -9
[Bug 1725] ntpd sends multicast from only one address.
begin changing internal references from "struct interface" to "endpt"
- ntpd/ntp_config.c@1.248 +2 -3
+ ntpd/ntp_config.c@1.241.1.7 +2 -3
use ZERO_SOCK() in two places
- ntpd/ntp_io.c@1.315 +320 -283
+ ntpd/ntp_io.c@1.306.1.9 +320 -283
[Bug 1725] ntpd sends multicast from only one address.
begin changing internal references from "struct interface" to "endpt"
- ntpd/ntp_peer.c@1.127 +62 -69
+ ntpd/ntp_peer.c@1.126.1.1 +62 -69
refactor select_peerinterface() to reduce duplication, indents
reduce #ifdef WINNT clutter
- ntpd/ntp_request.c@1.85 +21 -21
+ ntpd/ntp_request.c@1.82.1.3 +21 -21
[Bug 1725] ntpd sends multicast from only one address.
begin changing internal references from "struct interface" to "endpt"
ports/winnt/include/ntp_iocompletionport.h@1.18 +1 -2
reduce sendpkt() ifdefs around sendto()
- ports/winnt/ntpd/ntp_iocompletionport.c@1.50 +34 -32
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.49.1.1 +34 -32
reduce sendpkt() ifdefs around sendto()
- ports/winnt/ntpd/ntservice.c@1.23 +3 -3
+ ports/winnt/ntpd/ntservice.c@1.22.1.1 +3 -3
reduce #ifdef WINNT clutter
-ChangeSet@1.2239, 2010-11-14 08:56:20+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2272, 2010-11-14 23:36:16+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P81
+ TAG: NTP_4_2_7P81
+
+ ChangeLog@1.655 +1 -0
+ NTP_4_2_7P81
+
+ ntpd/ntpd-opts.c@1.84 +2 -2
+ NTP_4_2_7P81
+
+ ntpd/ntpd-opts.h@1.84 +3 -3
+ NTP_4_2_7P81
+
+ ntpd/ntpd-opts.texi@1.83 +2 -2
+ NTP_4_2_7P81
+
+ ntpd/ntpd.1@1.83 +2 -2
+ NTP_4_2_7P81
+
+ ntpdc/ntpdc-opts.c@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpdc/ntpdc-opts.h@1.82 +3 -3
+ NTP_4_2_7P81
+
+ ntpdc/ntpdc-opts.texi@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpdc/ntpdc.1@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpq/ntpq-opts.c@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpq/ntpq-opts.h@1.82 +3 -3
+ NTP_4_2_7P81
+
+ ntpq/ntpq-opts.texi@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpq/ntpq.1@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.82 +3 -3
+ NTP_4_2_7P81
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.82 +2 -2
+ NTP_4_2_7P81
+
+ ntpsnmpd/ntpsnmpd.1@1.82 +2 -2
+ NTP_4_2_7P81
+
+ packageinfo.sh@1.83 +1 -1
+ NTP_4_2_7P81
+
+ sntp/sntp-opts.c@1.82 +3 -3
+ NTP_4_2_7P81
+
+ sntp/sntp-opts.h@1.82 +3 -3
+ NTP_4_2_7P81
+
+ sntp/sntp-opts.texi@1.82 +2 -2
+ NTP_4_2_7P81
+
+ sntp/sntp.1@1.82 +3 -5
+ NTP_4_2_7P81
+
+ sntp/sntp.html@1.82 +1 -1
+ NTP_4_2_7P81
+
+ util/ntp-keygen-opts.c@1.79 +2 -2
+ NTP_4_2_7P81
+
+ util/ntp-keygen-opts.h@1.79 +3 -3
+ NTP_4_2_7P81
+
+ util/ntp-keygen-opts.texi@1.82 +2 -2
+ NTP_4_2_7P81
+
+ util/ntp-keygen.1@1.82 +2 -2
+ NTP_4_2_7P81
+
+ChangeSet@1.2271, 2010-11-14 18:13:53-05:00, stenn@deacon.udel.edu
+ [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills
+
+ ChangeLog@1.654 +1 -0
+ [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills
+
+ html/autokey.html@1.6 +11 -11
+ [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills
+
+ util/ntp-keygen.c@1.66 +16 -21
+ [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills
+
+ChangeSet@1.2082.4.152, 2010-11-14 08:56:20+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC10
TAG: NTP_4_2_6P3_RC10
- ChangeLog@1.679 +1 -0
+ ChangeLog@1.496.26.112 +1 -0
NTP_4_2_6P3_RC10
- ntpd/ntpd-opts.c@1.274 +2 -2
+ ntpd/ntpd-opts.c@1.248.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpd/ntpd-opts.h@1.274 +3 -3
+ ntpd/ntpd-opts.h@1.248.26.1 +3 -3
NTP_4_2_6P3_RC10
- ntpd/ntpd-opts.texi@1.272 +2 -2
+ ntpd/ntpd-opts.texi@1.246.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpd/ntpd.1@1.272 +2 -2
+ ntpd/ntpd.1@1.246.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpdc/ntpdc-opts.c@1.270 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpdc/ntpdc-opts.h@1.270 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.26.1 +3 -3
NTP_4_2_6P3_RC10
- ntpdc/ntpdc-opts.texi@1.269 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpdc/ntpdc.1@1.269 +2 -2
+ ntpdc/ntpdc.1@1.243.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpq/ntpq-opts.c@1.271 +2 -2
+ ntpq/ntpq-opts.c@1.245.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpq/ntpq-opts.h@1.271 +3 -3
+ ntpq/ntpq-opts.h@1.245.26.1 +3 -3
NTP_4_2_6P3_RC10
- ntpq/ntpq-opts.texi@1.270 +2 -2
+ ntpq/ntpq-opts.texi@1.244.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpq/ntpq.1@1.270 +2 -2
+ ntpq/ntpq.1@1.244.26.1 +2 -2
NTP_4_2_6P3_RC10
- ntpsnmpd/ntpsnmpd-opts.c@1.150 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.27.1 +2 -2
NTP_4_2_6P3_RC10
- ntpsnmpd/ntpsnmpd-opts.h@1.150 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.27.1 +3 -3
NTP_4_2_6P3_RC10
- ntpsnmpd/ntpsnmpd-opts.texi@1.150 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.27.1 +2 -2
NTP_4_2_6P3_RC10
- ntpsnmpd/ntpsnmpd.1@1.149 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.27.1 +2 -2
NTP_4_2_6P3_RC10
- packageinfo.sh@1.289 +1 -1
+ packageinfo.sh@1.255.28.1 +1 -1
NTP_4_2_6P3_RC10
- sntp/sntp-opts.c@1.143 +3 -3
+ sntp/sntp-opts.c@1.117.26.1 +3 -3
NTP_4_2_6P3_RC10
- sntp/sntp-opts.h@1.143 +3 -3
+ sntp/sntp-opts.h@1.117.26.1 +3 -3
NTP_4_2_6P3_RC10
- sntp/sntp-opts.texi@1.143 +2 -2
+ sntp/sntp-opts.texi@1.117.26.1 +2 -2
NTP_4_2_6P3_RC10
- sntp/sntp.1@1.143 +3 -5
+ sntp/sntp.1@1.117.26.1 +3 -5
NTP_4_2_6P3_RC10
- sntp/sntp.html@1.33 +1 -1
+ sntp/sntp.html@1.7.26.1 +1 -1
NTP_4_2_6P3_RC10
- util/ntp-keygen-opts.c@1.273 +2 -2
+ util/ntp-keygen-opts.c@1.247.26.1 +2 -2
NTP_4_2_6P3_RC10
- util/ntp-keygen-opts.h@1.273 +3 -3
+ util/ntp-keygen-opts.h@1.247.26.1 +3 -3
NTP_4_2_6P3_RC10
- util/ntp-keygen-opts.texi@1.272 +2 -2
+ util/ntp-keygen-opts.texi@1.246.26.1 +2 -2
NTP_4_2_6P3_RC10
- util/ntp-keygen.1@1.272 +2 -2
+ util/ntp-keygen.1@1.246.26.1 +2 -2
NTP_4_2_6P3_RC10
-ChangeSet@1.2238, 2010-11-14 03:23:12-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.151, 2010-11-14 03:23:12-05:00, stenn@deacon.udel.edu
Update NEWS file for changes thru RC10
NEWS@1.112 +24 -15
Update NEWS file for changes thru RC10
-ChangeSet@1.2237, 2010-11-14 07:00:29+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2269, 2010-11-14 07:38:20+00:00, davehart@shiny.ad.hartbrothers.com
+ temporarily disable sntp unit tests that need rework after changes to use msyslog
+
+ sntp/tests/logFile.cpp@1.6 +2 -0
+ temporarily disable sntp unit tests that need rework after changes to use msyslog
+
+ sntp/tests/sntptest.cpp@1.3 +0 -1
+ we need the progname to match sntp to ease comparing output
+
+ChangeSet@1.2082.4.150, 2010-11-14 07:00:29+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1681] More sntp logging cleanup.
- ChangeLog@1.678 +1 -0
+ ChangeLog@1.496.26.111 +1 -0
[Bug 1681] More sntp logging cleanup.
- include/ntp_syslog.h@1.4 +3 -1
+ include/ntp_syslog.h@1.3.1.1 +3 -1
expose msyslog_term flag to duplicate msyslog() output to stdout/stderr
- libntp/msyslog.c@1.25 +52 -38
+ libntp/msyslog.c@1.24.1.1 +52 -38
expose msyslog_term flag to duplicate msyslog() output to stdout/stderr
- sntp/crypto.c@1.15 +2 -24
+ sntp/crypto.c@1.10.1.5 +2 -24
[Bug 1681] More sntp logging cleanup.
- sntp/kod_management.c@1.19 +11 -35
+ sntp/kod_management.c@1.16.1.3 +11 -35
[Bug 1681] More sntp logging cleanup.
- sntp/log.c@1.14 +39 -44
+ sntp/log.c@1.11.1.3 +39 -44
[Bug 1681] More sntp logging cleanup.
sntp/log.h@1.9 +15 -6
[Bug 1681] More sntp logging cleanup.
- sntp/main.c@1.30 +34 -39
+ sntp/main.c@1.24.1.6 +34 -39
[Bug 1681] More sntp logging cleanup.
sntp/main.h@1.2 +0 -1
move config.h include to main.c for consistency and because it has no
multiple-inclusion guard.
- sntp/networking.c@1.39 +14 -14
+ sntp/networking.c@1.29.1.10 +14 -14
[Bug 1681] More sntp logging cleanup.
sntp/sntp-opts.def@1.16 +2 -4
@@ -3940,119 +104017,234 @@ ChangeSet@1.2237, 2010-11-14 07:00:29+00:00, davehart@shiny.ad.hartbrothers.com
sntp/sntp.c@1.2 +2 -1
#include <config.h> first
-ChangeSet@1.2236, 2010-11-11 19:20:40+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2267, 2010-11-11 20:37:23+00:00, davehart@shiny.ad.hartbrothers.com
+ fix merge typo
+
+ ntpd/ntp_config.c@1.271 +2 -19
+ merge cleanup -- -dev only uses of is_ip_address()
+
+ ntpd/ntp_io.c@1.327 +1 -1
+ fix merge typo
+
+ChangeSet@1.2082.4.149, 2010-11-11 19:20:40+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1683] Non-localhost on loopback exempted from nic rules.
- ChangeLog@1.677 +4 -0
+ ChangeLog@1.496.26.110 +4 -0
[Bug 1683] Non-localhost on loopback exempted from nic rules.
- include/ntp.h@1.170 +1 -1
+ include/ntp.h@1.168.1.2 +1 -1
nail down size of struct interface.flags to 32 bits.
- include/ntp_io.h@1.14 +1 -1
+ include/ntp_io.h@1.13.1.1 +1 -1
[Bug 1683] Non-localhost on loopback exempted from nic rules.
- ntpd/ntp_config.c@1.247 +13 -11
+ ntpd/ntp_config.c@1.241.1.6 +13 -11
[Bug 1683] Non-localhost on loopback exempted from nic rules.
- ntpd/ntp_io.c@1.314 +72 -58
+ ntpd/ntp_io.c@1.306.1.8 +72 -58
[Bug 1683] Non-localhost on loopback exempted from nic rules.
- ntpd/ntpd.c@1.111 +3 -3
+ ntpd/ntpd.c@1.110.2.1 +3 -3
[Bug 1683] Non-localhost on loopback exempted from nic rules.
-ChangeSet@1.2235, 2010-11-10 03:48:21+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2254.1.2, 2010-11-10 19:29:43+01:00, jnperlin@hydra.localnet
+ fixed doc error, improved comments
+
+ html/drivers/driver20.html@1.22 +1 -1
+ fixed wrong mode bit nuber
+
+ ntpd/refclock_nmea.c@1.56 +7 -4
+ changed / moved comments for better strategic grouping
+
+ChangeSet@1.2265, 2010-11-10 05:44:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P80
+ TAG: NTP_4_2_7P80
+
+ ChangeLog@1.650 +1 -0
+ NTP_4_2_7P80
+
+ ntpd/ntpd-opts.c@1.83 +2 -2
+ NTP_4_2_7P80
+
+ ntpd/ntpd-opts.h@1.83 +3 -3
+ NTP_4_2_7P80
+
+ ntpd/ntpd-opts.texi@1.82 +2 -2
+ NTP_4_2_7P80
+
+ ntpd/ntpd.1@1.82 +2 -2
+ NTP_4_2_7P80
+
+ ntpdc/ntpdc-opts.c@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpdc/ntpdc-opts.h@1.81 +3 -3
+ NTP_4_2_7P80
+
+ ntpdc/ntpdc-opts.texi@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpdc/ntpdc.1@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpq/ntpq-opts.c@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpq/ntpq-opts.h@1.81 +3 -3
+ NTP_4_2_7P80
+
+ ntpq/ntpq-opts.texi@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpq/ntpq.1@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.81 +3 -3
+ NTP_4_2_7P80
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.81 +2 -2
+ NTP_4_2_7P80
+
+ ntpsnmpd/ntpsnmpd.1@1.81 +2 -2
+ NTP_4_2_7P80
+
+ packageinfo.sh@1.82 +1 -1
+ NTP_4_2_7P80
+
+ sntp/sntp-opts.c@1.81 +2 -2
+ NTP_4_2_7P80
+
+ sntp/sntp-opts.h@1.81 +3 -3
+ NTP_4_2_7P80
+
+ sntp/sntp-opts.texi@1.81 +1 -1
+ NTP_4_2_7P80
+
+ sntp/sntp.1@1.81 +2 -2
+ NTP_4_2_7P80
+
+ sntp/sntp.html@1.81 +1 -1
+ NTP_4_2_7P80
+
+ util/ntp-keygen-opts.c@1.78 +2 -2
+ NTP_4_2_7P80
+
+ util/ntp-keygen-opts.h@1.78 +3 -3
+ NTP_4_2_7P80
+
+ util/ntp-keygen-opts.texi@1.81 +2 -2
+ NTP_4_2_7P80
+
+ util/ntp-keygen.1@1.81 +2 -2
+ NTP_4_2_7P80
+
+ChangeSet@1.2082.4.148, 2010-11-10 03:48:21+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC9
TAG: NTP_4_2_6P3_RC9
- ChangeLog@1.676 +1 -0
+ ChangeLog@1.496.26.109 +1 -0
NTP_4_2_6P3_RC9
- ntpd/ntpd-opts.c@1.273 +2 -2
+ ntpd/ntpd-opts.c@1.248.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpd/ntpd-opts.h@1.273 +3 -3
+ ntpd/ntpd-opts.h@1.248.25.1 +3 -3
NTP_4_2_6P3_RC9
- ntpd/ntpd-opts.texi@1.271 +2 -2
+ ntpd/ntpd-opts.texi@1.246.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpd/ntpd.1@1.271 +2 -2
+ ntpd/ntpd.1@1.246.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpdc/ntpdc-opts.c@1.269 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpdc/ntpdc-opts.h@1.269 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.25.1 +3 -3
NTP_4_2_6P3_RC9
- ntpdc/ntpdc-opts.texi@1.268 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpdc/ntpdc.1@1.268 +2 -2
+ ntpdc/ntpdc.1@1.243.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpq/ntpq-opts.c@1.270 +2 -2
+ ntpq/ntpq-opts.c@1.245.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpq/ntpq-opts.h@1.270 +3 -3
+ ntpq/ntpq-opts.h@1.245.25.1 +3 -3
NTP_4_2_6P3_RC9
- ntpq/ntpq-opts.texi@1.269 +2 -2
+ ntpq/ntpq-opts.texi@1.244.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpq/ntpq.1@1.269 +2 -2
+ ntpq/ntpq.1@1.244.25.1 +2 -2
NTP_4_2_6P3_RC9
- ntpsnmpd/ntpsnmpd-opts.c@1.149 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.26.1 +2 -2
NTP_4_2_6P3_RC9
- ntpsnmpd/ntpsnmpd-opts.h@1.149 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.26.1 +3 -3
NTP_4_2_6P3_RC9
- ntpsnmpd/ntpsnmpd-opts.texi@1.149 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.26.1 +2 -2
NTP_4_2_6P3_RC9
- ntpsnmpd/ntpsnmpd.1@1.148 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.26.1 +2 -2
NTP_4_2_6P3_RC9
- packageinfo.sh@1.288 +1 -1
+ packageinfo.sh@1.255.27.1 +1 -1
NTP_4_2_6P3_RC9
- sntp/sntp-opts.c@1.142 +2 -2
+ sntp/sntp-opts.c@1.117.25.1 +2 -2
NTP_4_2_6P3_RC9
- sntp/sntp-opts.h@1.142 +3 -3
+ sntp/sntp-opts.h@1.117.25.1 +3 -3
NTP_4_2_6P3_RC9
- sntp/sntp-opts.texi@1.142 +1 -1
+ sntp/sntp-opts.texi@1.117.25.1 +1 -1
NTP_4_2_6P3_RC9
- sntp/sntp.1@1.142 +2 -2
+ sntp/sntp.1@1.117.25.1 +2 -2
NTP_4_2_6P3_RC9
- sntp/sntp.html@1.32 +1 -1
+ sntp/sntp.html@1.7.25.1 +1 -1
NTP_4_2_6P3_RC9
- util/ntp-keygen-opts.c@1.272 +2 -2
+ util/ntp-keygen-opts.c@1.247.25.1 +2 -2
NTP_4_2_6P3_RC9
- util/ntp-keygen-opts.h@1.272 +3 -3
+ util/ntp-keygen-opts.h@1.247.25.1 +3 -3
NTP_4_2_6P3_RC9
- util/ntp-keygen-opts.texi@1.271 +2 -2
+ util/ntp-keygen-opts.texi@1.246.25.1 +2 -2
NTP_4_2_6P3_RC9
- util/ntp-keygen.1@1.271 +2 -2
+ util/ntp-keygen.1@1.246.25.1 +2 -2
NTP_4_2_6P3_RC9
-ChangeSet@1.2234, 2010-11-09 22:07:27-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.147, 2010-11-09 22:07:27-05:00, stenn@deacon.udel.edu
Backport sntp from -dev
- ChangeLog@1.675 +1 -0
+ ChangeLog@1.496.26.108 +1 -0
Backport sntp from -dev
-ChangeSet@1.2233, 2010-11-10 02:29:39+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2262, 2010-11-10 02:52:31+00:00, davehart@shiny.ad.hartbrothers.com
+ pave the way for pulling -stable backport which has these as new files
+
+ BitKeeper/deleted/.del-main.h~17d37ce1cf2a5389@1.4 +0 -0
+ Delete: sntp/main.h
+
+ BitKeeper/deleted/.del-ntp_lib_m.m4~bbfbbd5c5add8c5@1.4 +0 -0
+ Delete: m4/ntp_lib_m.m4
+
+ BitKeeper/deleted/.del-sntp.c~ef953de048542b83@1.3 +0 -0
+ Delete: sntp/sntp.c
+
+ChangeSet@1.2082.4.146, 2010-11-10 02:29:39+00:00, davehart@shiny.ad.hartbrothers.com
Backport sntp changes from -dev
m4/ntp_lib_m.m4@1.1 +16 -0
@@ -4060,25 +104252,25 @@ ChangeSet@1.2233, 2010-11-10 02:29:39+00:00, davehart@shiny.ad.hartbrothers.com
m4/ntp_lib_m.m4@1.0 +0 -0
- sntp/Makefile.am@1.30 +3 -1
+ sntp/Makefile.am@1.21.1.9 +3 -1
Backport sntp changes from -dev
- sntp/configure.ac@1.34 +1 -0
+ sntp/configure.ac@1.31.1.3 +1 -0
Backport sntp changes from -dev
- sntp/crypto.c@1.14 +1 -0
+ sntp/crypto.c@1.10.1.4 +1 -0
Backport sntp changes from -dev
- sntp/header.h@1.5 +1 -1
+ sntp/header.h@1.4.1.1 +1 -1
Backport sntp changes from -dev
- sntp/kod_management.c@1.18 +2 -1
+ sntp/kod_management.c@1.16.1.2 +2 -1
Backport sntp changes from -dev
- sntp/log.c@1.13 +3 -2
+ sntp/log.c@1.11.1.2 +3 -2
Backport sntp changes from -dev
- sntp/main.c@1.29 +191 -166
+ sntp/main.c@1.24.1.5 +191 -166
Backport sntp changes from -dev
sntp/main.h@1.1 +29 -0
@@ -4086,10 +104278,10 @@ ChangeSet@1.2233, 2010-11-10 02:29:39+00:00, davehart@shiny.ad.hartbrothers.com
sntp/main.h@1.0 +0 -0
- sntp/networking.c@1.38 +22 -20
+ sntp/networking.c@1.29.1.9 +22 -20
Backport sntp changes from -dev
- sntp/networking.h@1.19 +13 -3
+ sntp/networking.h@1.18.2.1 +13 -3
Backport sntp changes from -dev
sntp/sntp.c@1.1 +13 -0
@@ -4097,298 +104289,1597 @@ ChangeSet@1.2233, 2010-11-10 02:29:39+00:00, davehart@shiny.ad.hartbrothers.com
sntp/sntp.c@1.0 +0 -0
- sntp/utilities.c@1.12 +14 -14
+ sntp/utilities.c@1.10.1.2 +14 -14
Backport sntp changes from -dev
-ChangeSet@1.2225.4.1, 2010-11-09 16:50:10-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2261, 2010-11-09 23:32:32+00:00, stenn@psp-fb1.ntp.org
+ ChangeLog:
+ [Bug 1708] "make check" fails with googletest 1.4.0
+ [Bug 1718] Improve gtest checks in configure.ac
+
+ ChangeLog@1.648 +2 -0
+ [Bug 1708] "make check" fails with googletest 1.4.0
+ [Bug 1718] Improve gtest checks in configure.ac
+ l
+
+ configure.ac@1.495 +38 -12
+
+ sntp/configure.ac@1.42 +39 -12
+
+ChangeSet@1.2082.37.1, 2010-11-09 16:50:10-05:00, stenn@deacon.udel.edu
[Bug 1692] packageinfo.sh needs to be "sourced" using ./
- ChangeLog@1.668.4.1 +4 -0
+ ChangeLog@1.496.57.1 +4 -0
[Bug 1692] packageinfo.sh needs to be "sourced" using ./
- scripts/checkChangeLog@1.2 +1 -1
+ scripts/checkChangeLog@1.1.2.1 +1 -1
[Bug 1692] packageinfo.sh needs to be "sourced" using ./
- scripts/genCommitLog@1.6 +1 -1
+ scripts/genCommitLog@1.5.1.1 +1 -1
[Bug 1692] packageinfo.sh needs to be "sourced" using ./
-ChangeSet@1.2231, 2010-11-09 06:01:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2259, 2010-11-09 20:08:29+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1715] sntp utilitiesTest.IPv6Address failed.
+
+ ChangeLog@1.646 +1 -0
+ [Bug 1715] sntp utilitiesTest.IPv6Address failed.
+
+ sntp/tests/utilities.cpp@1.5 +11 -17
+ Nonfunctional (whitespace, use SIZEOF_SOCKADDR(), declare locals first).
+
+ sntp/utilities.c@1.13 +13 -14
+ [Bug 1715] sntp utilitiesTest.IPv6Address failed.
+
+ChangeSet@1.2252.1.1, 2010-11-09 19:38:19+01:00, jnperlin@hydra.localnet
+ reformed NMEA driver implementation and doc
+
+ html/drivers/driver20.html@1.21 +341 -99
+ updated / extended doc
+
+ ntpd/refclock_nmea.c@1.55 +712 -537
+ restructured ('reformed') driver
+
+ChangeSet@1.2082.4.144, 2010-11-09 06:01:12+00:00, davehart@shiny.ad.hartbrothers.com
Correct missing leading zeros in sntp tv_usec display from tv_to_str().
- sntp/utilities.c@1.11 +1 -1
+ sntp/utilities.c@1.10.1.1 +1 -1
Correct missing leading zeros in sntp tv_usec display from tv_to_str().
-ChangeSet@1.2230, 2010-11-09 05:52:27+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.143, 2010-11-09 05:52:27+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1681] sntp logging cleanup.
- ChangeLog@1.673 +1 -0
+ ChangeLog@1.496.26.106 +1 -0
[Bug 1681] sntp logging cleanup.
- sntp/kod_management.c@1.17 +4 -4
+ sntp/kod_management.c@1.16.1.1 +4 -4
[Bug 1681] sntp logging cleanup.
- sntp/log.c@1.12 +3 -18
+ sntp/log.c@1.11.1.1 +3 -18
[Bug 1681] sntp logging cleanup.
sntp/log.h@1.8 +1 -1
[Bug 1681] sntp logging cleanup.
- sntp/main.c@1.28 +4 -4
+ sntp/main.c@1.24.1.4 +4 -4
[Bug 1681] sntp logging cleanup.
- sntp/networking.c@1.37 +1 -1
+ sntp/networking.c@1.29.1.8 +1 -1
[Bug 1681] sntp logging cleanup.
-ChangeSet@1.2227, 2010-11-09 04:40:06+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2257, 2010-11-09 05:14:53+00:00, davehart@shiny.ad.hartbrothers.com
+ merge from -stable cleanup
+
+ ntpd/ntp_io.c@1.325 +1 -2
+ repair merge from -stable -- getinterface() is no longer static in -dev
+
+ sntp/main.c@1.35 +0 -9
+ merge from -stable repair -- sntp's main() has moved to sntp.c in -dev
+
+ChangeSet@1.2082.4.140, 2010-11-09 04:40:06+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1691] Use first NMEA sentence each second.
-- applies to prior cset
- ChangeLog@1.668.3.1 +4 -0
+ ChangeLog@1.496.56.1 +4 -0
[Bug 1691] Use first NMEA sentence each second.
-ChangeSet@1.2225.3.1, 2010-11-09 04:26:03+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.36.1, 2010-11-09 04:26:03+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1709] ntpdate ignores replies with equal receive and transmit timestamps.
- ChangeLog@1.668.2.1 +5 -0
+ ChangeLog@1.496.55.1 +5 -0
[Bug 1709] ntpdate ignores replies with equal receive and transmit timestamps.
- ntpdate/ntpdate.c@1.71 +1 -2
+ ntpdate/ntpdate.c@1.69.2.1 +1 -2
[Bug 1709] ntpdate ignores replies with equal receive and transmit timestamps.
-ChangeSet@1.2225.2.1, 2010-11-09 03:52:20+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.35.1, 2010-11-09 03:52:20+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1574] sntp:set_time doesn't set tv_usec correctly.
- ChangeLog@1.668.1.1 +4 -0
+ ChangeLog@1.496.54.1 +4 -0
[Bug 1574] sntp:set_time doesn't set tv_usec correctly.
- sntp/main.c@1.27 +23 -8
+ sntp/main.c@1.24.1.3 +23 -8
[Bug 1574] sntp:set_time doesn't set tv_usec correctly.
-ChangeSet@1.2225.1.1, 2010-11-09 03:14:33+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.34.1, 2010-11-09 03:14:33+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1683] Interface binding does not seem to work as intended.
- ChangeLog@1.669 +4 -0
+ ChangeLog@1.496.26.102 +4 -0
[Bug 1683] Interface binding does not seem to work as intended.
- include/ntp_machine.h@1.27 +3 -0
+ include/ntp_machine.h@1.26.2.1 +3 -0
add socket_errno() to reduce #ifdef clutter
- ntpd/ntp_io.c@1.313 +175 -125
+ ntpd/ntp_io.c@1.306.1.7 +175 -125
[Bug 1683] Interface binding does not seem to work as intended.
-ChangeSet@1.2226, 2010-11-01 00:22:07+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.33.1, 2010-11-08 18:26:21+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1709] ntpdate ignores replies with equal receive and transmit timestamps.
+
+ ntpdate/ntpdate.c@1.69.1.2 +1 -2
+ [Bug 1709] ntpdate ignores replies with equal receive and transmit timestamps.
+
+ChangeSet@1.2254, 2010-11-07 02:15:51+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P79
+ TAG: NTP_4_2_7P79
+
+ ChangeLog@1.643 +1 -0
+ NTP_4_2_7P79
+
+ ntpd/ntpd-opts.c@1.82 +2 -2
+ NTP_4_2_7P79
+
+ ntpd/ntpd-opts.h@1.82 +3 -3
+ NTP_4_2_7P79
+
+ ntpd/ntpd-opts.texi@1.81 +2 -2
+ NTP_4_2_7P79
+
+ ntpd/ntpd.1@1.81 +2 -2
+ NTP_4_2_7P79
+
+ ntpdc/ntpdc-opts.c@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpdc/ntpdc-opts.h@1.80 +3 -3
+ NTP_4_2_7P79
+
+ ntpdc/ntpdc-opts.texi@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpdc/ntpdc.1@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpq/ntpq-opts.c@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpq/ntpq-opts.h@1.80 +3 -3
+ NTP_4_2_7P79
+
+ ntpq/ntpq-opts.texi@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpq/ntpq.1@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.80 +3 -3
+ NTP_4_2_7P79
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.80 +2 -2
+ NTP_4_2_7P79
+
+ ntpsnmpd/ntpsnmpd.1@1.80 +2 -2
+ NTP_4_2_7P79
+
+ packageinfo.sh@1.81 +1 -1
+ NTP_4_2_7P79
+
+ sntp/sntp-opts.c@1.80 +2 -2
+ NTP_4_2_7P79
+
+ sntp/sntp-opts.h@1.80 +3 -3
+ NTP_4_2_7P79
+
+ sntp/sntp-opts.texi@1.80 +1 -1
+ NTP_4_2_7P79
+
+ sntp/sntp.1@1.80 +2 -2
+ NTP_4_2_7P79
+
+ sntp/sntp.html@1.80 +1 -1
+ NTP_4_2_7P79
+
+ util/ntp-keygen-opts.c@1.77 +2 -2
+ NTP_4_2_7P79
+
+ util/ntp-keygen-opts.h@1.77 +3 -3
+ NTP_4_2_7P79
+
+ util/ntp-keygen-opts.texi@1.80 +2 -2
+ NTP_4_2_7P79
+
+ util/ntp-keygen.1@1.80 +2 -2
+ NTP_4_2_7P79
+
+ChangeSet@1.2253, 2010-11-06 22:00:48-04:00, stenn@deacon.udel.edu
+ Correct frequency estimate with no drift file, from David Mills
+
+ ChangeLog@1.642 +1 -0
+ Correct frequency estimate with no drift file, from David Mills
+
+ ntpd/ntp_loopfilter.c@1.161 +1 -1
+ Correct frequency estimate with no drift file, from David Mills
+
+ChangeSet@1.2252, 2010-11-04 10:10:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P78
+ TAG: NTP_4_2_7P78
+
+ ChangeLog@1.641 +1 -0
+ NTP_4_2_7P78
+
+ ntpd/ntpd-opts.c@1.81 +2 -2
+ NTP_4_2_7P78
+
+ ntpd/ntpd-opts.h@1.81 +3 -3
+ NTP_4_2_7P78
+
+ ntpd/ntpd-opts.texi@1.80 +2 -2
+ NTP_4_2_7P78
+
+ ntpd/ntpd.1@1.80 +2 -2
+ NTP_4_2_7P78
+
+ ntpdc/ntpdc-opts.c@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpdc/ntpdc-opts.h@1.79 +3 -3
+ NTP_4_2_7P78
+
+ ntpdc/ntpdc-opts.texi@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpdc/ntpdc.1@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpq/ntpq-opts.c@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpq/ntpq-opts.h@1.79 +3 -3
+ NTP_4_2_7P78
+
+ ntpq/ntpq-opts.texi@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpq/ntpq.1@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.79 +3 -3
+ NTP_4_2_7P78
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.79 +2 -2
+ NTP_4_2_7P78
+
+ ntpsnmpd/ntpsnmpd.1@1.79 +2 -2
+ NTP_4_2_7P78
+
+ packageinfo.sh@1.80 +1 -1
+ NTP_4_2_7P78
+
+ sntp/sntp-opts.c@1.79 +2 -2
+ NTP_4_2_7P78
+
+ sntp/sntp-opts.h@1.79 +3 -3
+ NTP_4_2_7P78
+
+ sntp/sntp-opts.texi@1.79 +1 -1
+ NTP_4_2_7P78
+
+ sntp/sntp.1@1.79 +2 -2
+ NTP_4_2_7P78
+
+ sntp/sntp.html@1.79 +1 -1
+ NTP_4_2_7P78
+
+ util/ntp-keygen-opts.c@1.76 +2 -2
+ NTP_4_2_7P78
+
+ util/ntp-keygen-opts.h@1.76 +3 -3
+ NTP_4_2_7P78
+
+ util/ntp-keygen-opts.texi@1.79 +2 -2
+ NTP_4_2_7P78
+
+ util/ntp-keygen.1@1.79 +2 -2
+ NTP_4_2_7P78
+
+ChangeSet@1.2251, 2010-11-04 03:05:07-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.640 +1 -0
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.5 +28 -4
+ Documentation updates from Dave Mills
+
+ html/pps.html@1.23 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2250, 2010-11-04 02:24:39+00:00, hart@psp-deb1.ntp.org
+ Makefile.am:
+ move test-driver from EXTRA_DIST to noinst_check_SCRIPTS
+
+ sntp/tests/Makefile.am@1.16 +3 -3
+ move test-driver from EXTRA_DIST to noinst_check_SCRIPTS
+
+ChangeSet@1.2249, 2010-11-04 00:06:45+00:00, davehart@shiny.ad.hartbrothers.com
+ fix make distcheck with gtest by distributing test pieces
+
+ sntp/Makefile.am@1.37 +1 -0
+ fix make distcheck with gtest by distributing test pieces
+
+ sntp/tests/Makefile.am@1.15 +35 -11
+ fix make distcheck with gtest by distributing test pieces.
+ get rid of most tabs in INCLUDES which show up in command lines.
+
+ tests/libntp/Makefile.am@1.24 +3 -0
+ fix make distcheck with gtest by distributing test pieces
+
+ChangeSet@1.2248, 2010-11-03 21:24:43+00:00, davehart@shiny.ad.hartbrothers.com
+ Add ChangeLog entries, Windows build tweaks to Juergen Perlinger's
+ calendar refactoring and [Bug 1697]
+
+ ChangeLog@1.639 +2 -0
+ [Bug 1697] filegen implementation should be improved.
+ Refactor calendar functions in terms of new common code.
+
+
+ configure.ac@1.494 +4 -3
+ Add sizeof(short) test since we now depend on SIZEOF_SHORT
+
+ ports/winnt/include/config.h@1.89 +1 -0
+ add SIZEOF_SHORT needed by perlinger's calendar changes
+
+ ports/winnt/vc6/libntp.dsp@1.53 +4 -0
+ add libntp/ntp_calendar.c to Windows build
+
+ ports/winnt/vs2003/libntp.vcproj@1.11 +21 -0
+ add libntp/ntp_calendar.c to Windows build
+
+ ports/winnt/vs2005/libntp.vcproj@1.9 +22 -0
+ add libntp/ntp_calendar.c to Windows build
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.30 +6 -2
+ add libntp/ntp_calendar.c to Windows build
+
+ sntp/configure.ac@1.41 +1 -0
+ Add sizeof(short) test since we now depend on SIZEOF_SHORT
+
+ sntp/tests/crypto.cpp@1.4 +4 -0
+ conditionalize tests that only work with OPENSSL
+
+ tests/libntp/a_md5encrypt.cpp@1.4 +5 -0
+ ensure NID_md5 is defined (by openssl headers or ntp_stdlib.h)
+
+ tests/libntp/authkeys.cpp@1.6 +5 -0
+ ensure NID_md5 is defined (by openssl headers or ntp_stdlib.h)
+
+ tests/libntp/refnumtoa.cpp@1.2 +4 -0
+ conditionalize tests that require REFCLOCK
+
+ tests/libntp/ssl_init.cpp@1.3 +9 -0
+ ensure NID_md5 is defined (by openssl headers or ntp_stdlib.h)
+ conditionalize tests that only work with OPENSSL
+
+ChangeSet@1.2243.1.3, 2010-11-03 19:42:16+01:00, jnperlin@hydra.localnet
+ added calendar regression tests, fixed german umlaut mixup
+
+ include/ntp_filegen.h@1.9 +1 -1
+ fixed german umlaut codepage problem
+
+ libntp/ntp_calendar.c@1.2 +11 -73
+ removed runtime assert, since regression test is available
+
+ ntpd/ntp_filegen.c@1.21 +1 -1
+ fixed german umlaut codepage problem
+
+ tests/libntp/Makefile.am@1.23 +1 -0
+ added calendar regression tests
+
+ tests/libntp/calendar.cpp@1.1 +337 -0
+ calendar module regression tests
+
+ tests/libntp/calendar.cpp@1.0 +0 -0
+
+ChangeSet@1.2246, 2010-11-03 10:10:10+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P77
+ TAG: NTP_4_2_7P77
+
+ ChangeLog@1.638 +1 -0
+ NTP_4_2_7P77
+
+ ntpd/ntpd-opts.c@1.80 +2 -2
+ NTP_4_2_7P77
+
+ ntpd/ntpd-opts.h@1.80 +3 -3
+ NTP_4_2_7P77
+
+ ntpd/ntpd-opts.texi@1.79 +2 -2
+ NTP_4_2_7P77
+
+ ntpd/ntpd.1@1.79 +2 -2
+ NTP_4_2_7P77
+
+ ntpdc/ntpdc-opts.c@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpdc/ntpdc-opts.h@1.78 +3 -3
+ NTP_4_2_7P77
+
+ ntpdc/ntpdc-opts.texi@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpdc/ntpdc.1@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpq/ntpq-opts.c@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpq/ntpq-opts.h@1.78 +3 -3
+ NTP_4_2_7P77
+
+ ntpq/ntpq-opts.texi@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpq/ntpq.1@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.78 +3 -3
+ NTP_4_2_7P77
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.78 +2 -2
+ NTP_4_2_7P77
+
+ ntpsnmpd/ntpsnmpd.1@1.78 +2 -2
+ NTP_4_2_7P77
+
+ packageinfo.sh@1.79 +1 -1
+ NTP_4_2_7P77
+
+ sntp/sntp-opts.c@1.78 +2 -2
+ NTP_4_2_7P77
+
+ sntp/sntp-opts.h@1.78 +3 -3
+ NTP_4_2_7P77
+
+ sntp/sntp-opts.texi@1.78 +1 -1
+ NTP_4_2_7P77
+
+ sntp/sntp.1@1.78 +2 -2
+ NTP_4_2_7P77
+
+ sntp/sntp.html@1.78 +1 -1
+ NTP_4_2_7P77
+
+ util/ntp-keygen-opts.c@1.75 +2 -2
+ NTP_4_2_7P77
+
+ util/ntp-keygen-opts.h@1.75 +3 -3
+ NTP_4_2_7P77
+
+ util/ntp-keygen-opts.texi@1.78 +2 -2
+ NTP_4_2_7P77
+
+ util/ntp-keygen.1@1.78 +2 -2
+ NTP_4_2_7P77
+
+ChangeSet@1.2243.3.1, 2010-11-02 21:46:55-04:00, stenn@deacon.udel.edu
+ [Bug 1692] packageinfo.sh needs to be "sourced" using ./
+
+ ChangeLog@1.635.1.1 +1 -0
+ [Bug 1692] packageinfo.sh needs to be "sourced" using ./
+
+ scripts/checkChangeLog@1.1.1.1 +1 -1
+ [Bug 1692] packageinfo.sh needs to be "sourced" using ./
+
+ scripts/genCommitLog@1.6 +1 -1
+ [Bug 1692] packageinfo.sh needs to be "sourced" using ./
+
+ChangeSet@1.2243.1.2, 2010-11-02 20:21:30+01:00, jnperlin@hydra.localnet
+ fixes for regression test
+
+ libntp/prettydate.c@1.16 +2 -2
+ changed format string back according to regression test expectation
+
+ libntp/ymd2yd.c@1.5 +13 -25
+ rewritten in terms of low-level calendar function
+
+ scripts/checkChangeLog@1.2 +1 -1
+ added path spec to '.' (source) command -- sh balked about it
+
+ tests/libntp/calyearstart.cpp@1.2 +14 -15
+ fixed testcases for new calyearstart() API
+
+ChangeSet@1.2243.2.1, 2010-11-02 18:55:37+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1695] ntpdate takes longer than necessary.
+
+ ChangeLog@1.636 +1 -0
+ [Bug 1695] ntpdate takes longer than necessary.
+
+ ntpdate/ntpdate.c@1.75 +11 -0
+ [Bug 1695] ntpdate takes longer than necessary.
+
+ChangeSet@1.2156.20.1, 2010-11-02 07:12:48+01:00, jnperlin@hydra.localnet
+ added modular calendar functions
+
+ include/ntp_calendar.h@1.5 +278 -23
+ added prototypes for modular calendar functions
+
+ include/ntp_filegen.h@1.8 +5 -4
+ fixed prototypes to use u_int32 for NTP timestamps
+
+ include/ntp_fp.h@1.22 +1 -1
+ fixed prototypes to use u_int32 for NTP timestamps
+
+ include/ntp_stdlib.h@1.48 +12 -2
+ fixed prototypes to use u_int32 for NTP timestamps; added functions for start of month/week/day
+
+ include/ntp_types.h@1.20 +92 -1
+ added 'vint64' type definition
+
+ include/ntp_unixtime.h@1.7 +5 -0
+ added multiple inclusion guard
+
+ libntp/Makefile.am@1.53 +1 -0
+ added calendar module
+
+ libntp/caljulian.c@1.13 +15 -173
+ rewritten in terms of modular calendar
+
+ libntp/caltontp.c@1.5 +19 -57
+ rewritten in terms of modular calendar
+
+ libntp/calyearstart.c@1.6 +70 -39
+ rewritten in terms of modular calendar; added month/wee/day start fuctions
+
+ libntp/clocktime.c@1.4 +128 -94
+ rewritten in terms of modular calendar; changed algorithm to *always* find the smallest difference solution for a time-of-year spec.
+
+ libntp/ntp_calendar.c@1.1 +1390 -0
+ modular calendar functions
+
+ libntp/ntp_calendar.c@1.0 +0 -0
+
+ libntp/prettydate.c@1.15 +149 -123
+ rewritten in terms of modular calendar
+
+ ntpd/ntp_filegen.c@1.20 +126 -126
+ minimise calendar calculations
+
+ ntpd/ntp_util.c@1.86 +35 -56
+ changed 'leap_month' to use modular alendar
+
+ChangeSet@1.2244, 2010-11-02 01:31:41-04:00, stenn@deacon.udel.edu
+ Distribute the test/ subdir
+
+ Makefile.am@1.98 +1 -3
+ Distribute the test/ subdir
+
+ChangeSet@1.2243, 2010-11-02 04:50:36+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P76
+ TAG: NTP_4_2_7P76
+
+ ChangeLog@1.635 +1 -0
+ NTP_4_2_7P76
+
+ ntpd/ntpd-opts.c@1.79 +2 -2
+ NTP_4_2_7P76
+
+ ntpd/ntpd-opts.h@1.79 +3 -3
+ NTP_4_2_7P76
+
+ ntpd/ntpd-opts.texi@1.78 +2 -2
+ NTP_4_2_7P76
+
+ ntpd/ntpd.1@1.78 +2 -2
+ NTP_4_2_7P76
+
+ ntpdc/ntpdc-opts.c@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpdc/ntpdc-opts.h@1.77 +3 -3
+ NTP_4_2_7P76
+
+ ntpdc/ntpdc-opts.texi@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpdc/ntpdc.1@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpq/ntpq-opts.c@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpq/ntpq-opts.h@1.77 +3 -3
+ NTP_4_2_7P76
+
+ ntpq/ntpq-opts.texi@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpq/ntpq.1@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.77 +3 -3
+ NTP_4_2_7P76
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.77 +2 -2
+ NTP_4_2_7P76
+
+ ntpsnmpd/ntpsnmpd.1@1.77 +2 -2
+ NTP_4_2_7P76
+
+ packageinfo.sh@1.78 +1 -1
+ NTP_4_2_7P76
+
+ sntp/sntp-opts.c@1.77 +2 -2
+ NTP_4_2_7P76
+
+ sntp/sntp-opts.h@1.77 +3 -3
+ NTP_4_2_7P76
+
+ sntp/sntp-opts.texi@1.77 +1 -1
+ NTP_4_2_7P76
+
+ sntp/sntp.1@1.77 +2 -2
+ NTP_4_2_7P76
+
+ sntp/sntp.html@1.77 +1 -1
+ NTP_4_2_7P76
+
+ util/ntp-keygen-opts.c@1.74 +2 -2
+ NTP_4_2_7P76
+
+ util/ntp-keygen-opts.h@1.74 +3 -3
+ NTP_4_2_7P76
+
+ util/ntp-keygen-opts.texi@1.77 +2 -2
+ NTP_4_2_7P76
+
+ util/ntp-keygen.1@1.77 +2 -2
+ NTP_4_2_7P76
+
+ChangeSet@1.2242, 2010-11-01 00:46:10-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.634 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.5 +9 -7
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.66 +16 -16
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.4 +10 -9
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.22 +9 -3
+ Documentation updates from Dave Mills
+
+ html/scripts/external.txt@1.5 +1 -0
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2240, 2010-11-01 00:29:29-04:00, stenn@deacon.udel.edu
+ [Bug 1692] in sntp/, -lrt may only be needed in tests/
+
+ sntp/configure.ac@1.40 +1 -0
+ [Bug 1692] in sntp/, -lrt may only be needed in tests/
+
+ChangeSet@1.2238.1.2, 2010-11-01 00:23:48+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog entry for [Bug 1691] -dev first
+
+ ChangeLog@1.631.1.1 +1 -0
+ [Bug 1691] Use first NMEA sentence each second.
+
+ChangeSet@1.2082.4.139, 2010-11-01 00:22:07+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1691] Use first NMEA sentence each second.
- ntpd/refclock_nmea.c@1.56 +26 -9
+ ntpd/refclock_nmea.c@1.46.1.10 +26 -9
[Bug 1691] Use first NMEA sentence each second.
-ChangeSet@1.2225, 2010-10-29 04:44:28-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2239, 2010-10-31 07:57:32-04:00, karlsson@psp-deb1.ntp.org
+ [BUG 1690] Unit tests fails to build on some systems
+
+ ChangeLog@1.632 +1 -0
+ [BUG 1690] Unit tests fails to build on some systems
+
+ sntp/configure.ac@1.39 +18 -0
+ [BUG 1690] Unit tests fails to build on some systems
+
+ChangeSet@1.2238, 2010-10-31 01:30:37-04:00, stenn@deacon.udel.edu
+ Only build/run the sntp tests if we have gtest
+
+ ChangeLog@1.631 +1 -0
+ Only build/run the sntp tests if we have gtest
+
+ sntp/Makefile.am@1.36 +3 -0
+ Only build/run the sntp tests if we have gtest
+
+ChangeSet@1.2235.1.1, 2010-10-30 20:28:54-07:00, harlan@hms-mbp.lan
+ Put the sntp tests under sntp/
+ ---
+ Put the sntp tests under sntp/
+
+ ChangeLog@1.628.1.1 +1 -0
+ Put the sntp tests under sntp/
+
+ configure.ac@1.493 +0 -1
+ Put the sntp tests under sntp/
+
+ sntp/Makefile.am@1.35 +1 -0
+ Put the sntp tests under sntp/
+
+ sntp/configure.ac@1.38 +20 -0
+ Put the sntp tests under sntp/
+
+ sntp/tests/Makefile.am@1.14 +19 -17
+ Put the sntp tests under sntp/
+
+ sntp/tests/Makefile.am@1.13 +0 -0
+ Rename: tests/sntp/Makefile.am -> sntp/tests/Makefile.am
+
+ sntp/tests/crypto.cpp@1.3 +0 -0
+ Rename: tests/sntp/crypto.cpp -> sntp/tests/crypto.cpp
+
+ sntp/tests/data/debug-input-lfp-bin@1.2 +0 -0
+ Rename: tests/sntp/data/debug-input-lfp-bin -> sntp/tests/data/debug-input-lfp-bin
+
+ sntp/tests/data/debug-input-lfp-dec@1.2 +0 -0
+ Rename: tests/sntp/data/debug-input-lfp-dec -> sntp/tests/data/debug-input-lfp-dec
+
+ sntp/tests/data/debug-input-lfp-hex@1.2 +0 -0
+ Rename: tests/sntp/data/debug-input-lfp-hex -> sntp/tests/data/debug-input-lfp-hex
+
+ sntp/tests/data/debug-input-pkt@1.2 +0 -0
+ Rename: tests/sntp/data/debug-input-pkt -> sntp/tests/data/debug-input-pkt
+
+ sntp/tests/data/key-test-ascii@1.2 +0 -0
+ Rename: tests/sntp/data/key-test-ascii -> sntp/tests/data/key-test-ascii
+
+ sntp/tests/data/key-test-comments@1.2 +0 -0
+ Rename: tests/sntp/data/key-test-comments -> sntp/tests/data/key-test-comments
+
+ sntp/tests/data/key-test-empty@1.2 +0 -0
+ Rename: tests/sntp/data/key-test-empty -> sntp/tests/data/key-test-empty
+
+ sntp/tests/data/key-test-hex@1.2 +0 -0
+ Rename: tests/sntp/data/key-test-hex -> sntp/tests/data/key-test-hex
+
+ sntp/tests/data/key-test-invalid-hex@1.2 +0 -0
+ Rename: tests/sntp/data/key-test-invalid-hex -> sntp/tests/data/key-test-invalid-hex
+
+ sntp/tests/data/kod-expected-multiple@1.2 +0 -0
+ Rename: tests/sntp/data/kod-expected-multiple -> sntp/tests/data/kod-expected-multiple
+
+ sntp/tests/data/kod-expected-single@1.2 +0 -0
+ Rename: tests/sntp/data/kod-expected-single -> sntp/tests/data/kod-expected-single
+
+ sntp/tests/data/kod-test-blanks@1.3 +0 -0
+ Rename: tests/sntp/data/kod-test-blanks -> sntp/tests/data/kod-test-blanks
+
+ sntp/tests/data/kod-test-correct@1.3 +0 -0
+ Rename: tests/sntp/data/kod-test-correct -> sntp/tests/data/kod-test-correct
+
+ sntp/tests/data/kod-test-empty@1.2 +0 -0
+ Rename: tests/sntp/data/kod-test-empty -> sntp/tests/data/kod-test-empty
+
+ sntp/tests/data/log-expected-debug@1.2 +0 -0
+ Rename: tests/sntp/data/log-expected-debug -> sntp/tests/data/log-expected-debug
+
+ sntp/tests/data/log-expected-log@1.2 +0 -0
+ Rename: tests/sntp/data/log-expected-log -> sntp/tests/data/log-expected-log
+
+ sntp/tests/fileHandlingTest.h@1.4 +0 -0
+ Rename: tests/sntp/fileHandlingTest.h -> sntp/tests/fileHandlingTest.h
+
+ sntp/tests/keyFile.cpp@1.3 +0 -0
+ Rename: tests/sntp/keyFile.cpp -> sntp/tests/keyFile.cpp
+
+ sntp/tests/kodDatabase.cpp@1.2 +0 -0
+ Rename: tests/sntp/kodDatabase.cpp -> sntp/tests/kodDatabase.cpp
+
+ sntp/tests/kodFile.cpp@1.7 +0 -0
+ Rename: tests/sntp/kodFile.cpp -> sntp/tests/kodFile.cpp
+
+ sntp/tests/logFile.cpp@1.5 +0 -0
+ Rename: tests/sntp/logFile.cpp -> sntp/tests/logFile.cpp
+
+ sntp/tests/networking.cpp@1.7 +0 -0
+ Rename: tests/sntp/networking.cpp -> sntp/tests/networking.cpp
+
+ sntp/tests/packetHandling.cpp@1.4 +0 -0
+ Rename: tests/sntp/packetHandling.cpp -> sntp/tests/packetHandling.cpp
+
+ sntp/tests/packetProcessing.cpp@1.4 +0 -0
+ Rename: tests/sntp/packetProcessing.cpp -> sntp/tests/packetProcessing.cpp
+
+ sntp/tests/sntptest.cpp@1.2 +0 -0
+ Rename: tests/sntp/sntptest.cpp -> sntp/tests/sntptest.cpp
+
+ sntp/tests/sntptest.h@1.5 +0 -0
+ Rename: tests/sntp/sntptest.h -> sntp/tests/sntptest.h
+
+ sntp/tests/test-driver@1.4 +0 -0
+ Rename: tests/sntp/test-driver -> sntp/tests/test-driver
+
+ sntp/tests/utilities.cpp@1.4 +0 -0
+ Rename: tests/sntp/utilities.cpp -> sntp/tests/utilities.cpp
+
+ sntp/tests_main.cpp@1.6 +0 -0
+ Rename: tests/tests_main.cpp -> sntp/tests_main.cpp
+
+ sntp/tests_main.h@1.6 +0 -0
+ Rename: tests/tests_main.h -> sntp/tests_main.h
+
+ tests/Makefile.am@1.4 +1 -1
+ Put the sntp tests under sntp/
+
+ tests/libntp/Makefile.am@1.22 +7 -5
+ Put the sntp tests under sntp/
+
+ChangeSet@1.2236, 2010-10-30 10:23:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P75
+ TAG: NTP_4_2_7P75
+
+ ChangeLog@1.629 +1 -0
+ NTP_4_2_7P75
+
+ ntpd/ntpd-opts.c@1.78 +2 -2
+ NTP_4_2_7P75
+
+ ntpd/ntpd-opts.h@1.78 +3 -3
+ NTP_4_2_7P75
+
+ ntpd/ntpd-opts.texi@1.77 +2 -2
+ NTP_4_2_7P75
+
+ ntpd/ntpd.1@1.77 +2 -2
+ NTP_4_2_7P75
+
+ ntpdc/ntpdc-opts.c@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpdc/ntpdc-opts.h@1.76 +3 -3
+ NTP_4_2_7P75
+
+ ntpdc/ntpdc-opts.texi@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpdc/ntpdc.1@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpq/ntpq-opts.c@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpq/ntpq-opts.h@1.76 +3 -3
+ NTP_4_2_7P75
+
+ ntpq/ntpq-opts.texi@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpq/ntpq.1@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.76 +3 -3
+ NTP_4_2_7P75
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.76 +2 -2
+ NTP_4_2_7P75
+
+ ntpsnmpd/ntpsnmpd.1@1.76 +2 -2
+ NTP_4_2_7P75
+
+ packageinfo.sh@1.77 +1 -1
+ NTP_4_2_7P75
+
+ sntp/sntp-opts.c@1.76 +2 -2
+ NTP_4_2_7P75
+
+ sntp/sntp-opts.h@1.76 +3 -3
+ NTP_4_2_7P75
+
+ sntp/sntp-opts.texi@1.76 +1 -1
+ NTP_4_2_7P75
+
+ sntp/sntp.1@1.76 +2 -2
+ NTP_4_2_7P75
+
+ sntp/sntp.html@1.76 +1 -1
+ NTP_4_2_7P75
+
+ util/ntp-keygen-opts.c@1.73 +2 -2
+ NTP_4_2_7P75
+
+ util/ntp-keygen-opts.h@1.73 +3 -3
+ NTP_4_2_7P75
+
+ util/ntp-keygen-opts.texi@1.76 +2 -2
+ NTP_4_2_7P75
+
+ util/ntp-keygen.1@1.76 +2 -2
+ NTP_4_2_7P75
+
+ChangeSet@1.2235, 2010-10-29 23:37:04-04:00, stenn@deacon.udel.edu
+ Include Linus Karlsson's GSoC 2010 testing code.
+
+ ChangeLog@1.628 +1 -0
+ Include Linus Karlsson's GSoC 2010 testing code.
+
+ChangeSet@1.2156.1.152, 2010-10-29 22:20:16-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.98 +1 -0
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.25 +13 -14
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2233, 2010-10-29 11:41:29-07:00, karlsson@psp-os1.ntp.org
+ Fixed required include on Solaris
+
+ tests/libntp/buftvtots.cpp@1.3 +3 -0
+ Fixed required include on Solaris
+
+ tests/libntp/tvtots.cpp@1.5 +3 -0
+ Fixed required include on Solaris
+
+ChangeSet@1.2232, 2010-10-29 20:13:53+02:00, linus@beam.lund.zozs.se
+ Fixed floating point test errors.
+
+ tests/libntp/buftvtots.cpp@1.2 +11 -2
+ Fixed floating point test errors.
+
+ tests/libntp/tvtots.cpp@1.4 +13 -5
+ Fixed floating point test errors.
+
+ChangeSet@1.2156.1.151, 2010-10-29 09:45:21+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P74
+ TAG: NTP_4_2_7P74
+
+ ChangeLog@1.622.1.97 +1 -0
+ NTP_4_2_7P74
+
+ ntpd/ntpd-opts.c@1.77 +2 -2
+ NTP_4_2_7P74
+
+ ntpd/ntpd-opts.h@1.77 +3 -3
+ NTP_4_2_7P74
+
+ ntpd/ntpd-opts.texi@1.76 +2 -2
+ NTP_4_2_7P74
+
+ ntpd/ntpd.1@1.76 +2 -2
+ NTP_4_2_7P74
+
+ ntpdc/ntpdc-opts.c@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpdc/ntpdc-opts.h@1.75 +3 -3
+ NTP_4_2_7P74
+
+ ntpdc/ntpdc-opts.texi@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpdc/ntpdc.1@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpq/ntpq-opts.c@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpq/ntpq-opts.h@1.75 +3 -3
+ NTP_4_2_7P74
+
+ ntpq/ntpq-opts.texi@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpq/ntpq.1@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.75 +3 -3
+ NTP_4_2_7P74
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.75 +2 -2
+ NTP_4_2_7P74
+
+ ntpsnmpd/ntpsnmpd.1@1.75 +2 -2
+ NTP_4_2_7P74
+
+ packageinfo.sh@1.76 +1 -1
+ NTP_4_2_7P74
+
+ sntp/sntp-opts.c@1.75 +2 -2
+ NTP_4_2_7P74
+
+ sntp/sntp-opts.h@1.75 +3 -3
+ NTP_4_2_7P74
+
+ sntp/sntp-opts.texi@1.75 +1 -1
+ NTP_4_2_7P74
+
+ sntp/sntp.1@1.75 +2 -2
+ NTP_4_2_7P74
+
+ sntp/sntp.html@1.75 +1 -1
+ NTP_4_2_7P74
+
+ util/ntp-keygen-opts.c@1.72 +2 -2
+ NTP_4_2_7P74
+
+ util/ntp-keygen-opts.h@1.72 +3 -3
+ NTP_4_2_7P74
+
+ util/ntp-keygen-opts.texi@1.75 +2 -2
+ NTP_4_2_7P74
+
+ util/ntp-keygen.1@1.75 +2 -2
+ NTP_4_2_7P74
+
+ChangeSet@1.2156.1.150, 2010-10-29 04:56:14-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.96 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.4 +10 -3
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.4.138, 2010-10-29 04:44:28-04:00, stenn@deacon.udel.edu
checkChangeLog fix for Makefile.am
- Makefile.am@1.96 +1 -1
+ Makefile.am@1.93.2.3 +1 -1
checkChangeLog fix for Makefile.am
-ChangeSet@1.2224, 2010-10-29 08:25:39+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.137, 2010-10-29 08:25:39+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC8
TAG: NTP_4_2_6P3_RC8
- ChangeLog@1.668 +1 -0
+ ChangeLog@1.496.26.101 +1 -0
NTP_4_2_6P3_RC8
- ntpd/ntpd-opts.c@1.272 +2 -2
+ ntpd/ntpd-opts.c@1.248.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpd/ntpd-opts.h@1.272 +3 -3
+ ntpd/ntpd-opts.h@1.248.24.1 +3 -3
NTP_4_2_6P3_RC8
- ntpd/ntpd-opts.texi@1.270 +2 -2
+ ntpd/ntpd-opts.texi@1.246.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpd/ntpd.1@1.270 +2 -2
+ ntpd/ntpd.1@1.246.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpdc/ntpdc-opts.c@1.268 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpdc/ntpdc-opts.h@1.268 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.24.1 +3 -3
NTP_4_2_6P3_RC8
- ntpdc/ntpdc-opts.texi@1.267 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpdc/ntpdc.1@1.267 +2 -2
+ ntpdc/ntpdc.1@1.243.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpq/ntpq-opts.c@1.269 +2 -2
+ ntpq/ntpq-opts.c@1.245.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpq/ntpq-opts.h@1.269 +3 -3
+ ntpq/ntpq-opts.h@1.245.24.1 +3 -3
NTP_4_2_6P3_RC8
- ntpq/ntpq-opts.texi@1.268 +2 -2
+ ntpq/ntpq-opts.texi@1.244.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpq/ntpq.1@1.268 +2 -2
+ ntpq/ntpq.1@1.244.24.1 +2 -2
NTP_4_2_6P3_RC8
- ntpsnmpd/ntpsnmpd-opts.c@1.148 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.25.1 +2 -2
NTP_4_2_6P3_RC8
- ntpsnmpd/ntpsnmpd-opts.h@1.148 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.25.1 +3 -3
NTP_4_2_6P3_RC8
- ntpsnmpd/ntpsnmpd-opts.texi@1.148 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.25.1 +2 -2
NTP_4_2_6P3_RC8
- ntpsnmpd/ntpsnmpd.1@1.147 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.25.1 +2 -2
NTP_4_2_6P3_RC8
- packageinfo.sh@1.287 +1 -1
+ packageinfo.sh@1.255.26.1 +1 -1
NTP_4_2_6P3_RC8
- sntp/sntp-opts.c@1.141 +2 -2
+ sntp/sntp-opts.c@1.117.24.1 +2 -2
NTP_4_2_6P3_RC8
- sntp/sntp-opts.h@1.141 +3 -3
+ sntp/sntp-opts.h@1.117.24.1 +3 -3
NTP_4_2_6P3_RC8
- sntp/sntp-opts.texi@1.141 +1 -1
+ sntp/sntp-opts.texi@1.117.24.1 +1 -1
NTP_4_2_6P3_RC8
- sntp/sntp.1@1.141 +2 -2
+ sntp/sntp.1@1.117.24.1 +2 -2
NTP_4_2_6P3_RC8
- sntp/sntp.html@1.31 +1 -1
+ sntp/sntp.html@1.7.24.1 +1 -1
NTP_4_2_6P3_RC8
- util/ntp-keygen-opts.c@1.271 +2 -2
+ util/ntp-keygen-opts.c@1.247.24.1 +2 -2
NTP_4_2_6P3_RC8
- util/ntp-keygen-opts.h@1.271 +3 -3
+ util/ntp-keygen-opts.h@1.247.24.1 +3 -3
NTP_4_2_6P3_RC8
- util/ntp-keygen-opts.texi@1.270 +2 -2
+ util/ntp-keygen-opts.texi@1.246.24.1 +2 -2
NTP_4_2_6P3_RC8
- util/ntp-keygen.1@1.270 +2 -2
+ util/ntp-keygen.1@1.246.24.1 +2 -2
NTP_4_2_6P3_RC8
-ChangeSet@1.2223, 2010-10-29 04:13:47-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.136, 2010-10-29 04:13:47-04:00, stenn@deacon.udel.edu
First cut at using scripts/checkChangeLog
- ChangeLog@1.667 +1 -0
+ ChangeLog@1.496.26.100 +1 -0
First cut at using scripts/checkChangeLog
- Makefile.am@1.95 +5 -0
+ Makefile.am@1.93.2.2 +5 -0
First cut at using scripts/checkChangeLog
-ChangeSet@1.2222, 2010-10-29 03:39:15-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2082.4.135, 2010-10-29 03:39:15-04:00, stenn@psp-deb1.ntp.org
typo
- ChangeLog@1.666 +1 -1
+ ChangeLog@1.496.26.99 +1 -1
typo
-ChangeSet@1.2221, 2010-10-28 18:07:23+00:00, hart@psp-os1.ntp.org
+ChangeSet@1.2082.4.134, 2010-10-28 18:07:23+00:00, hart@psp-os1.ntp.org
for perlinger, [Bug 1685]
- ChangeLog@1.665 +4 -0
+ ChangeLog@1.496.26.98 +4 -0
for perlinger, [Bug 1685]
- ntpd/refclock_nmea.c@1.55 +2 -1
+ ntpd/refclock_nmea.c@1.46.1.9 +2 -1
for perlinger, [Bug 1685]
-ChangeSet@1.2220, 2010-10-25 07:49:22+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.148, 2010-10-27 07:35:29+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P73
+ TAG: NTP_4_2_7P73
+
+ ChangeLog@1.622.1.94 +1 -0
+ NTP_4_2_7P73
+
+ ntpd/ntpd-opts.c@1.76 +2 -2
+ NTP_4_2_7P73
+
+ ntpd/ntpd-opts.h@1.76 +3 -3
+ NTP_4_2_7P73
+
+ ntpd/ntpd-opts.texi@1.75 +2 -2
+ NTP_4_2_7P73
+
+ ntpd/ntpd.1@1.75 +2 -2
+ NTP_4_2_7P73
+
+ ntpdc/ntpdc-opts.c@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpdc/ntpdc-opts.h@1.74 +3 -3
+ NTP_4_2_7P73
+
+ ntpdc/ntpdc-opts.texi@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpdc/ntpdc.1@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpq/ntpq-opts.c@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpq/ntpq-opts.h@1.74 +3 -3
+ NTP_4_2_7P73
+
+ ntpq/ntpq-opts.texi@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpq/ntpq.1@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.74 +3 -3
+ NTP_4_2_7P73
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.74 +2 -2
+ NTP_4_2_7P73
+
+ ntpsnmpd/ntpsnmpd.1@1.74 +2 -2
+ NTP_4_2_7P73
+
+ packageinfo.sh@1.75 +1 -1
+ NTP_4_2_7P73
+
+ sntp/sntp-opts.c@1.74 +2 -2
+ NTP_4_2_7P73
+
+ sntp/sntp-opts.h@1.74 +3 -3
+ NTP_4_2_7P73
+
+ sntp/sntp-opts.texi@1.74 +1 -1
+ NTP_4_2_7P73
+
+ sntp/sntp.1@1.74 +2 -2
+ NTP_4_2_7P73
+
+ sntp/sntp.html@1.74 +1 -1
+ NTP_4_2_7P73
+
+ util/ntp-keygen-opts.c@1.71 +2 -2
+ NTP_4_2_7P73
+
+ util/ntp-keygen-opts.h@1.71 +3 -3
+ NTP_4_2_7P73
+
+ util/ntp-keygen-opts.texi@1.74 +2 -2
+ NTP_4_2_7P73
+
+ util/ntp-keygen.1@1.74 +2 -2
+ NTP_4_2_7P73
+
+ChangeSet@1.2156.1.147, 2010-10-26 21:24:02+00:00, davehart@shiny.ad.hartbrothers.com
+ add test case that would have caught [Bug 1678]
+
+ ChangeLog@1.622.1.93 +1 -0
+ add test case that would have caught [Bug 1678]
+
+ ntpd/complete.conf@1.10 +2 -0
+ add test case that would have caught [Bug 1678]
+
+ChangeSet@1.2156.1.146, 2010-10-26 17:20:17-04:00, stenn@deacon.udel.edu
+ ntp_loopfilter.c, ntpd.h, ChangeLog, ntp_proto.c:
+ * [Bug 1680] Fix alignment of clock_select() arrays.
+ * refinements to new startup behavior from David Mills.
+
+ ChangeLog@1.622.1.92 +2 -0
+ * [Bug 1680] Fix alignment of clock_select() arrays.
+ * refinements to new startup behavior from David Mills.
+
+ include/ntpd.h@1.143 +1 -0
+ * [Bug 1680] Fix alignment of clock_select() arrays.
+ * refinements to new startup behavior from David Mills.
+
+ ntpd/ntp_loopfilter.c@1.160 +8 -9
+ * [Bug 1680] Fix alignment of clock_select() arrays.
+ * refinements to new startup behavior from David Mills.
+
+ ntpd/ntp_proto.c@1.311 +12 -12
+ * [Bug 1680] Fix alignment of clock_select() arrays.
+ * refinements to new startup behavior from David Mills.
+
+ChangeSet@1.2156.1.145, 2010-10-26 16:42:45-04:00, stenn@deacon.udel.edu
+ For the bootstrap script, touch .html files last
+
+ ChangeLog@1.622.1.91 +1 -0
+ For the bootstrap script, touch .html files last
+
+ bootstrap@1.33 +8 -4
+ For the bootstrap script, touch .html files last
+
+ChangeSet@1.2156.1.144, 2010-10-26 09:20:22+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P72
+ TAG: NTP_4_2_7P72
+
+ ChangeLog@1.622.1.90 +1 -0
+ NTP_4_2_7P72
+
+ ntpd/ntpd-opts.c@1.75 +2 -2
+ NTP_4_2_7P72
+
+ ntpd/ntpd-opts.h@1.75 +3 -3
+ NTP_4_2_7P72
+
+ ntpd/ntpd-opts.texi@1.74 +2 -2
+ NTP_4_2_7P72
+
+ ntpd/ntpd.1@1.74 +2 -2
+ NTP_4_2_7P72
+
+ ntpdc/ntpdc-opts.c@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpdc/ntpdc-opts.h@1.73 +3 -3
+ NTP_4_2_7P72
+
+ ntpdc/ntpdc-opts.texi@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpdc/ntpdc.1@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpq/ntpq-opts.c@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpq/ntpq-opts.h@1.73 +3 -3
+ NTP_4_2_7P72
+
+ ntpq/ntpq-opts.texi@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpq/ntpq.1@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.73 +3 -3
+ NTP_4_2_7P72
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.73 +2 -2
+ NTP_4_2_7P72
+
+ ntpsnmpd/ntpsnmpd.1@1.73 +2 -2
+ NTP_4_2_7P72
+
+ packageinfo.sh@1.74 +1 -1
+ NTP_4_2_7P72
+
+ sntp/sntp-opts.c@1.73 +2 -2
+ NTP_4_2_7P72
+
+ sntp/sntp-opts.h@1.73 +3 -3
+ NTP_4_2_7P72
+
+ sntp/sntp-opts.texi@1.73 +1 -1
+ NTP_4_2_7P72
+
+ sntp/sntp.1@1.73 +2 -2
+ NTP_4_2_7P72
+
+ sntp/sntp.html@1.73 +1 -1
+ NTP_4_2_7P72
+
+ util/ntp-keygen-opts.c@1.70 +2 -2
+ NTP_4_2_7P72
+
+ util/ntp-keygen-opts.h@1.70 +3 -3
+ NTP_4_2_7P72
+
+ util/ntp-keygen-opts.texi@1.73 +2 -2
+ NTP_4_2_7P72
+
+ util/ntp-keygen.1@1.73 +2 -2
+ NTP_4_2_7P72
+
+ChangeSet@1.2156.1.143, 2010-10-26 05:05:56-04:00, stenn@deacon.udel.edu
+ [Bug 1679] Fix test for -lsocket.
+
+ sntp/configure.ac@1.37 +5 -0
+ [Bug 1679] Fix test for -lsocket.
+
+ChangeSet@1.2156.1.142, 2010-10-26 04:49:14-04:00, stenn@deacon.udel.edu
+ configure.ac, ChangeLog:
+ * [Bug 1679] Fix test for -lsocket.
+ * Clean up missing ;; entries in configure.ac
+
+ ChangeLog@1.622.1.89 +2 -0
+ * [Bug 1679] Fix test for -lsocket.
+ * Clean up missing ;; entries in configure.ac
+
+ configure.ac@1.483.1.11 +89 -27
+ * [Bug 1679] Fix test for -lsocket.
+ * Clean up missing ;; entries in configure.ac
+
+ChangeSet@1.2156.1.141, 2010-10-25 08:33:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P71
+ TAG: NTP_4_2_7P71
+
+ ChangeLog@1.622.1.88 +1 -0
+ NTP_4_2_7P71
+
+ ntpd/ntpd-opts.c@1.74 +2 -2
+ NTP_4_2_7P71
+
+ ntpd/ntpd-opts.h@1.74 +3 -3
+ NTP_4_2_7P71
+
+ ntpd/ntpd-opts.texi@1.73 +2 -2
+ NTP_4_2_7P71
+
+ ntpd/ntpd.1@1.73 +2 -2
+ NTP_4_2_7P71
+
+ ntpdc/ntpdc-opts.c@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpdc/ntpdc-opts.h@1.72 +3 -3
+ NTP_4_2_7P71
+
+ ntpdc/ntpdc-opts.texi@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpdc/ntpdc.1@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpq/ntpq-opts.c@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpq/ntpq-opts.h@1.72 +3 -3
+ NTP_4_2_7P71
+
+ ntpq/ntpq-opts.texi@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpq/ntpq.1@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.72 +3 -3
+ NTP_4_2_7P71
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.72 +2 -2
+ NTP_4_2_7P71
+
+ ntpsnmpd/ntpsnmpd.1@1.72 +2 -2
+ NTP_4_2_7P71
+
+ packageinfo.sh@1.73 +1 -1
+ NTP_4_2_7P71
+
+ sntp/sntp-opts.c@1.72 +2 -2
+ NTP_4_2_7P71
+
+ sntp/sntp-opts.h@1.72 +3 -3
+ NTP_4_2_7P71
+
+ sntp/sntp-opts.texi@1.72 +1 -1
+ NTP_4_2_7P71
+
+ sntp/sntp.1@1.72 +2 -2
+ NTP_4_2_7P71
+
+ sntp/sntp.html@1.72 +1 -1
+ NTP_4_2_7P71
+
+ util/ntp-keygen-opts.c@1.69 +2 -2
+ NTP_4_2_7P71
+
+ util/ntp-keygen-opts.h@1.69 +3 -3
+ NTP_4_2_7P71
+
+ util/ntp-keygen-opts.texi@1.72 +2 -2
+ NTP_4_2_7P71
+
+ util/ntp-keygen.1@1.72 +2 -2
+ NTP_4_2_7P71
+
+ChangeSet@1.2156.1.139, 2010-10-25 04:06:09-04:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.622.1.86 +3 -0
+ merge cleanup
+
+ChangeSet@1.2082.4.133, 2010-10-25 07:49:22+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC7
TAG: NTP_4_2_6P3_RC7
- ChangeLog@1.664 +1 -0
+ ChangeLog@1.496.26.97 +1 -0
NTP_4_2_6P3_RC7
- ntpd/ntpd-opts.c@1.271 +2 -2
+ ntpd/ntpd-opts.c@1.248.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpd/ntpd-opts.h@1.271 +3 -3
+ ntpd/ntpd-opts.h@1.248.23.1 +3 -3
NTP_4_2_6P3_RC7
- ntpd/ntpd-opts.texi@1.269 +2 -2
+ ntpd/ntpd-opts.texi@1.246.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpd/ntpd.1@1.269 +2 -2
+ ntpd/ntpd.1@1.246.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpdc/ntpdc-opts.c@1.267 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpdc/ntpdc-opts.h@1.267 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.23.1 +3 -3
NTP_4_2_6P3_RC7
- ntpdc/ntpdc-opts.texi@1.266 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpdc/ntpdc.1@1.266 +2 -2
+ ntpdc/ntpdc.1@1.243.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpq/ntpq-opts.c@1.268 +2 -2
+ ntpq/ntpq-opts.c@1.245.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpq/ntpq-opts.h@1.268 +3 -3
+ ntpq/ntpq-opts.h@1.245.23.1 +3 -3
NTP_4_2_6P3_RC7
- ntpq/ntpq-opts.texi@1.267 +2 -2
+ ntpq/ntpq-opts.texi@1.244.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpq/ntpq.1@1.267 +2 -2
+ ntpq/ntpq.1@1.244.23.1 +2 -2
NTP_4_2_6P3_RC7
- ntpsnmpd/ntpsnmpd-opts.c@1.147 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.24.1 +2 -2
NTP_4_2_6P3_RC7
- ntpsnmpd/ntpsnmpd-opts.h@1.147 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.24.1 +3 -3
NTP_4_2_6P3_RC7
- ntpsnmpd/ntpsnmpd-opts.texi@1.147 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.24.1 +2 -2
NTP_4_2_6P3_RC7
- ntpsnmpd/ntpsnmpd.1@1.146 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.24.1 +2 -2
NTP_4_2_6P3_RC7
- packageinfo.sh@1.286 +1 -1
+ packageinfo.sh@1.255.25.1 +1 -1
NTP_4_2_6P3_RC7
- sntp/sntp-opts.c@1.140 +2 -2
+ sntp/sntp-opts.c@1.117.23.1 +2 -2
NTP_4_2_6P3_RC7
- sntp/sntp-opts.h@1.140 +3 -3
+ sntp/sntp-opts.h@1.117.23.1 +3 -3
NTP_4_2_6P3_RC7
- sntp/sntp-opts.texi@1.140 +1 -1
+ sntp/sntp-opts.texi@1.117.23.1 +1 -1
NTP_4_2_6P3_RC7
- sntp/sntp.1@1.140 +2 -2
+ sntp/sntp.1@1.117.23.1 +2 -2
NTP_4_2_6P3_RC7
- sntp/sntp.html@1.30 +1 -1
+ sntp/sntp.html@1.7.23.1 +1 -1
NTP_4_2_6P3_RC7
- util/ntp-keygen-opts.c@1.270 +2 -2
+ util/ntp-keygen-opts.c@1.247.23.1 +2 -2
NTP_4_2_6P3_RC7
- util/ntp-keygen-opts.h@1.270 +3 -3
+ util/ntp-keygen-opts.h@1.247.23.1 +3 -3
NTP_4_2_6P3_RC7
- util/ntp-keygen-opts.texi@1.269 +2 -2
+ util/ntp-keygen-opts.texi@1.246.23.1 +2 -2
NTP_4_2_6P3_RC7
- util/ntp-keygen.1@1.269 +2 -2
+ util/ntp-keygen.1@1.246.23.1 +2 -2
NTP_4_2_6P3_RC7
-ChangeSet@1.2219, 2010-10-25 03:26:31-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.138, 2010-10-25 03:34:31-04:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.622.1.85 +0 -1
+ merge cleanup
+
+ChangeSet@1.2082.4.132, 2010-10-25 03:26:31-04:00, stenn@deacon.udel.edu
Added scripts/checkChangeLog
- ChangeLog@1.663 +4 -3
+ ChangeLog@1.496.26.96 +4 -3
Added scripts/checkChangeLog
- scripts/Makefile.am@1.19 +1 -0
+ scripts/Makefile.am@1.17.1.2 +1 -0
Added scripts/checkChangeLog
scripts/checkChangeLog@1.1 +28 -0
@@ -4396,595 +105887,2050 @@ ChangeSet@1.2219, 2010-10-25 03:26:31-04:00, stenn@deacon.udel.edu
scripts/checkChangeLog@1.0 +0 -0
-ChangeSet@1.2218, 2010-10-24 06:17:47-04:00, perlinger@psp-deb1.ntp.org
+ChangeSet@1.2156.19.1, 2010-10-25 02:19:58-04:00, stenn@deacon.udel.edu
+ typo fixes
+
+ ChangeLog@1.622.9.1 +2 -2
+ typo fixes
+
+ChangeSet@1.2156.1.135, 2010-10-25 05:42:26+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1678] "restrict source" treated as "restrict default".
+
+ ChangeLog@1.622.1.82 +1 -0
+ [Bug 1678] "restrict source" treated as "restrict default".
+
+ ntpd/Makefile.am@1.95 +1 -0
+ Make complete.conf roundtrip saveconfig failures easier to see.
+
+ ntpd/ntp_parser.c@1.69 +676 -723
+ Bison output
+
+ ntpd/ntp_parser.y@1.63 +16 -36
+ [Bug 1678] "restrict source" treated as "restrict default".
+
+ChangeSet@1.2082.4.131, 2010-10-24 06:17:47-04:00, perlinger@psp-deb1.ntp.org
[Bug 1676] fixed in refclock_nmea (GPGLL did not work after fix 1571)
- ChangeLog@1.662 +4 -0
+ ChangeLog@1.496.26.95 +4 -0
[Bug 1676] fixed in refclock_nmea (GPGLL did not work after fix 1571)
- ntpd/refclock_nmea.c@1.54 +1 -1
+ ntpd/refclock_nmea.c@1.46.1.8 +1 -1
fixed cut&paste error that lead to bug 1676
-ChangeSet@1.2217, 2010-10-24 06:40:26+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.134, 2010-10-24 07:48:42+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P70
+ TAG: NTP_4_2_7P70
+
+ ChangeLog@1.622.1.81 +1 -0
+ NTP_4_2_7P70
+
+ ntpd/ntpd-opts.c@1.73 +2 -2
+ NTP_4_2_7P70
+
+ ntpd/ntpd-opts.h@1.73 +3 -3
+ NTP_4_2_7P70
+
+ ntpd/ntpd-opts.texi@1.72 +2 -2
+ NTP_4_2_7P70
+
+ ntpd/ntpd.1@1.72 +2 -2
+ NTP_4_2_7P70
+
+ ntpdc/ntpdc-opts.c@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpdc/ntpdc-opts.h@1.71 +3 -3
+ NTP_4_2_7P70
+
+ ntpdc/ntpdc-opts.texi@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpdc/ntpdc.1@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpq/ntpq-opts.c@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpq/ntpq-opts.h@1.71 +3 -3
+ NTP_4_2_7P70
+
+ ntpq/ntpq-opts.texi@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpq/ntpq.1@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.71 +3 -3
+ NTP_4_2_7P70
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.71 +2 -2
+ NTP_4_2_7P70
+
+ ntpsnmpd/ntpsnmpd.1@1.71 +2 -2
+ NTP_4_2_7P70
+
+ packageinfo.sh@1.72 +1 -1
+ NTP_4_2_7P70
+
+ sntp/sntp-opts.c@1.71 +2 -2
+ NTP_4_2_7P70
+
+ sntp/sntp-opts.h@1.71 +3 -3
+ NTP_4_2_7P70
+
+ sntp/sntp-opts.texi@1.71 +1 -1
+ NTP_4_2_7P70
+
+ sntp/sntp.1@1.71 +2 -2
+ NTP_4_2_7P70
+
+ sntp/sntp.html@1.71 +1 -1
+ NTP_4_2_7P70
+
+ util/ntp-keygen-opts.c@1.68 +2 -2
+ NTP_4_2_7P70
+
+ util/ntp-keygen-opts.h@1.68 +3 -3
+ NTP_4_2_7P70
+
+ util/ntp-keygen-opts.texi@1.71 +2 -2
+ NTP_4_2_7P70
+
+ util/ntp-keygen.1@1.71 +2 -2
+ NTP_4_2_7P70
+
+ChangeSet@1.2156.1.133, 2010-10-24 03:36:28-04:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.622.1.80 +2 -0
+ merge cleanup
+
+ChangeSet@1.2156.1.132, 2010-10-24 03:28:33-04:00, stenn@deacon.udel.edu
+ Fix from Dave Mills for a rare singularity in clock_combine()
+
+ ChangeLog@1.622.1.79 +1 -0
+ Fix from Dave Mills for a rare singularity in clock_combine()
+
+ ntpd/ntp_proto.c@1.310 +1 -1
+ Fix from Dave Mills for a rare singularity in clock_combine()
+
+ChangeSet@1.2082.4.130, 2010-10-24 06:40:26+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC6
TAG: NTP_4_2_6P3_RC6
- ChangeLog@1.661 +1 -0
+ ChangeLog@1.496.26.94 +1 -0
NTP_4_2_6P3_RC6
- ntpd/ntpd-opts.c@1.270 +2 -2
+ ntpd/ntpd-opts.c@1.248.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpd/ntpd-opts.h@1.270 +3 -3
+ ntpd/ntpd-opts.h@1.248.22.1 +3 -3
NTP_4_2_6P3_RC6
- ntpd/ntpd-opts.texi@1.268 +2 -2
+ ntpd/ntpd-opts.texi@1.246.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpd/ntpd.1@1.268 +2 -2
+ ntpd/ntpd.1@1.246.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpdc/ntpdc-opts.c@1.266 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpdc/ntpdc-opts.h@1.266 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.22.1 +3 -3
NTP_4_2_6P3_RC6
- ntpdc/ntpdc-opts.texi@1.265 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpdc/ntpdc.1@1.265 +2 -2
+ ntpdc/ntpdc.1@1.243.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpq/ntpq-opts.c@1.267 +2 -2
+ ntpq/ntpq-opts.c@1.245.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpq/ntpq-opts.h@1.267 +3 -3
+ ntpq/ntpq-opts.h@1.245.22.1 +3 -3
NTP_4_2_6P3_RC6
- ntpq/ntpq-opts.texi@1.266 +2 -2
+ ntpq/ntpq-opts.texi@1.244.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpq/ntpq.1@1.266 +2 -2
+ ntpq/ntpq.1@1.244.22.1 +2 -2
NTP_4_2_6P3_RC6
- ntpsnmpd/ntpsnmpd-opts.c@1.146 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.23.1 +2 -2
NTP_4_2_6P3_RC6
- ntpsnmpd/ntpsnmpd-opts.h@1.146 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.23.1 +3 -3
NTP_4_2_6P3_RC6
- ntpsnmpd/ntpsnmpd-opts.texi@1.146 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.23.1 +2 -2
NTP_4_2_6P3_RC6
- ntpsnmpd/ntpsnmpd.1@1.145 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.23.1 +2 -2
NTP_4_2_6P3_RC6
- packageinfo.sh@1.285 +1 -1
+ packageinfo.sh@1.255.24.1 +1 -1
NTP_4_2_6P3_RC6
- sntp/sntp-opts.c@1.139 +2 -2
+ sntp/sntp-opts.c@1.117.22.1 +2 -2
NTP_4_2_6P3_RC6
- sntp/sntp-opts.h@1.139 +3 -3
+ sntp/sntp-opts.h@1.117.22.1 +3 -3
NTP_4_2_6P3_RC6
- sntp/sntp-opts.texi@1.139 +1 -1
+ sntp/sntp-opts.texi@1.117.22.1 +1 -1
NTP_4_2_6P3_RC6
- sntp/sntp.1@1.139 +2 -2
+ sntp/sntp.1@1.117.22.1 +2 -2
NTP_4_2_6P3_RC6
- sntp/sntp.html@1.29 +1 -1
+ sntp/sntp.html@1.7.22.1 +1 -1
NTP_4_2_6P3_RC6
- util/ntp-keygen-opts.c@1.269 +2 -2
+ util/ntp-keygen-opts.c@1.247.22.1 +2 -2
NTP_4_2_6P3_RC6
- util/ntp-keygen-opts.h@1.269 +3 -3
+ util/ntp-keygen-opts.h@1.247.22.1 +3 -3
NTP_4_2_6P3_RC6
- util/ntp-keygen-opts.texi@1.268 +2 -2
+ util/ntp-keygen-opts.texi@1.246.22.1 +2 -2
NTP_4_2_6P3_RC6
- util/ntp-keygen.1@1.268 +2 -2
+ util/ntp-keygen.1@1.246.22.1 +2 -2
NTP_4_2_6P3_RC6
-ChangeSet@1.2215, 2010-10-24 02:22:00-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.17.4, 2010-10-24 06:29:15+00:00, davehart@shiny.ad.hartbrothers.com
+ revert prior overly-successful merge (ntp-dev and ntp-stable
+ tos attr_val types differ)
+
+ ntpd/ntp_parser.y@1.62 +1 -1
+ revert prior overly-successful merge (ntp-dev and ntp-stable
+ tos attr_val types differ)
+
+ChangeSet@1.2082.4.128, 2010-10-24 02:22:00-04:00, stenn@deacon.udel.edu
NEWS file update
NEWS@1.111 +3 -1
NEWS file update
-ChangeSet@1.2207.1.5, 2010-10-24 06:21:08+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.30.5, 2010-10-24 06:21:08+00:00, davehart@shiny.ad.hartbrothers.com
fix bad "tos cohort" backport from -dev
- ntpd/ntp_parser.c@1.58 +1 -1
+ ntpd/ntp_parser.c@1.52.1.6 +1 -1
fix bad "tos cohort" backport from -dev
- ntpd/ntp_parser.y@1.53 +1 -1
+ ntpd/ntp_parser.y@1.47.1.6 +1 -1
fix bad "tos cohort" backport from -dev
-ChangeSet@1.2207.1.4, 2010-10-24 03:23:09+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.30.4, 2010-10-24 03:23:09+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1675] Prohibit includefile remote config.
- ChangeLog@1.658.1.1 +4 -0
+ ChangeLog@1.496.53.1 +4 -0
[Bug 1675] Prohibit includefile remote config.
- ntpd/ntp_parser.c@1.57 +939 -1247
+ ntpd/ntp_parser.c@1.52.1.5 +939 -1247
ntp_parser.y Bison output
- ntpd/ntp_parser.y@1.52 +266 -177
+ ntpd/ntp_parser.y@1.47.1.5 +266 -177
[Bug 1675] Prohibit includefile remote config.
Collapse duplicated C snippets into common actions.
- ntpd/ntp_scanner.c@1.33 +4 -1
+ ntpd/ntp_scanner.c@1.31.1.2 +4 -1
[Bug 1675] Prohibit includefile remote config.
-ChangeSet@1.2213, 2010-10-23 18:59:27+02:00, jnperlin@hydra.localnet
+ChangeSet@1.2082.4.126, 2010-10-23 18:59:27+02:00, jnperlin@hydra.localnet
ntp_fp.h: HTONL_MFP() uses ntohl(), should use htonl() (benign error)
- include/ntp_fp.h@1.16 +16 -16
+ include/ntp_fp.h@1.15.1.1 +16 -16
HTONL_MFP() uses ntohl(), should use htonl() (benign error)
-ChangeSet@1.2212, 2010-10-23 03:07:11+02:00, jnperlin@hydra.localnet
+ChangeSet@1.2156.17.1, 2010-10-23 10:09:49+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P69
+ TAG: NTP_4_2_7P69
+
+ ChangeLog@1.622.7.1 +1 -0
+ NTP_4_2_7P69
+
+ ntpd/ntpd-opts.c@1.72 +2 -2
+ NTP_4_2_7P69
+
+ ntpd/ntpd-opts.h@1.72 +3 -3
+ NTP_4_2_7P69
+
+ ntpd/ntpd-opts.texi@1.71 +2 -2
+ NTP_4_2_7P69
+
+ ntpd/ntpd.1@1.71 +2 -2
+ NTP_4_2_7P69
+
+ ntpdc/ntpdc-opts.c@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpdc/ntpdc-opts.h@1.70 +3 -3
+ NTP_4_2_7P69
+
+ ntpdc/ntpdc-opts.texi@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpdc/ntpdc.1@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpq/ntpq-opts.c@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpq/ntpq-opts.h@1.70 +3 -3
+ NTP_4_2_7P69
+
+ ntpq/ntpq-opts.texi@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpq/ntpq.1@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.70 +3 -3
+ NTP_4_2_7P69
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.70 +2 -2
+ NTP_4_2_7P69
+
+ ntpsnmpd/ntpsnmpd.1@1.70 +2 -2
+ NTP_4_2_7P69
+
+ packageinfo.sh@1.71 +1 -1
+ NTP_4_2_7P69
+
+ sntp/sntp-opts.c@1.70 +2 -2
+ NTP_4_2_7P69
+
+ sntp/sntp-opts.h@1.70 +3 -3
+ NTP_4_2_7P69
+
+ sntp/sntp-opts.texi@1.70 +1 -1
+ NTP_4_2_7P69
+
+ sntp/sntp.1@1.70 +2 -2
+ NTP_4_2_7P69
+
+ sntp/sntp.html@1.70 +1 -1
+ NTP_4_2_7P69
+
+ util/ntp-keygen-opts.c@1.67 +2 -2
+ NTP_4_2_7P69
+
+ util/ntp-keygen-opts.h@1.67 +3 -3
+ NTP_4_2_7P69
+
+ util/ntp-keygen-opts.texi@1.70 +2 -2
+ NTP_4_2_7P69
+
+ util/ntp-keygen.1@1.70 +2 -2
+ NTP_4_2_7P69
+
+ChangeSet@1.2082.4.125, 2010-10-23 03:07:11+02:00, jnperlin@hydra.localnet
polish to NMEA driver
- ntpd/refclock_nmea.c@1.53 +55 -53
+ ntpd/refclock_nmea.c@1.46.1.7 +55 -53
formatting issues
-ChangeSet@1.2211, 2010-10-23 02:24:08+02:00, jnperlin@hydra.localnet
+ChangeSet@1.2082.4.124, 2010-10-23 02:24:08+02:00, jnperlin@hydra.localnet
final update for [Bug 1571] and [Bug 1572]
- ChangeLog@1.659 +5 -0
+ ChangeLog@1.496.26.92 +5 -0
[Bug 1571] NMEA does not relate data to PPS edge
[Bug 1572] NMEA time adjustment for GPZDG buggy
- ntpd/refclock_nmea.c@1.52 +0 -10
+ ntpd/refclock_nmea.c@1.46.1.6 +0 -10
removed tag for temporary version
-ChangeSet@1.2194.3.2, 2010-10-23 01:48:37+02:00, jnperlin@hydra.localnet
+ChangeSet@1.2082.25.2, 2010-10-23 01:48:37+02:00, jnperlin@hydra.localnet
nmea calendar cleanup
- ntpd/refclock_nmea.c@1.49.1.1 +16 -40
+ ntpd/refclock_nmea.c@1.46.3.1 +16 -40
calendar cleanup
-ChangeSet@1.2207.1.3, 2010-10-22 07:46:08+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.127, 2010-10-22 23:13:04+00:00, hart@malarky.udel.edu
+ correct POSIX file permissions in ports/winnt
+
+ ports/winnt/libntp/MSG00001.bin@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/getclock.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/messages.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/messages.rc@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/libntp/setpriority.c@1.4 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ntpd/ntservice.c@1.24 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/ppsapi/skelprov/sys/time.h@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/instsrv/instsrv.vcproj@1.5 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.29 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.10 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntp.sln@1.9 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat@1.2 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.32 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpdate/ntpdate.vcproj@1.13 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpdc/ntpdc.vcproj@1.13 +0 -0
+ Change mode to -rw-rw-r--
+
+ ports/winnt/vs2008/ntpq/ntpq.vcproj@1.12 +0 -0
+ Change mode to -rw-rw-r--
+
+ChangeSet@1.2156.1.126, 2010-10-22 21:26:52+00:00, davehart@shiny.ad.hartbrothers.com
+ Enable generating ntpd/ntp_keyword.h after ntpd/keyword-gen.c changes
+ on Windows as well as POSIX platforms.
+
+ ChangeLog@1.622.1.75 +2 -0
+ Enable generating ntpd/ntp_keyword.h after ntpd/keyword-gen.c changes
+ on Windows as well as POSIX platforms.
+
+ ntpd/keyword-gen.c@1.15 +33 -32
+ use u_short instead of int for token/state vars.
+
+ ports/winnt/vs2008/ntp.sln@1.8 +14 -4
+ add ntpd-keyword-gen project to generate ntpd/ntp_keyword.h on Windows
+ using ntpd/keyword-gen.c.
+
+ ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.1 +263 -0
+ BitKeeper file C:/ntp/ntp-dev-win-keyword/ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
+
+ ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj@1.0 +0 -0
+
+ ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat@1.1 +39 -0
+ BitKeeper file C:/ntp/ntp-dev-win-keyword/ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat
+
+ ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat@1.0 +0 -0
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.31 +28 -5
+ Add custom build rule for ntp_keyword.h invoking keyword-gen.exe
+
+ChangeSet@1.2156.1.125, 2010-10-22 14:57:46-04:00, stenn@deacon.udel.edu
+ [Bug 1671] Audoomatic delay calibration is sometimes inaccurate
+
+ ChangeLog@1.622.1.74 +1 -0
+ [Bug 1671] Audoomatic delay calibration is sometimes inaccurate
+
+ ntpd/ntp_loopfilter.c@1.159 +1 -1
+ [Bug 1671] Audoomatic delay calibration is sometimes inaccurate
+
+ ntpd/ntp_proto.c@1.309 +1 -1
+ [Bug 1671] Audoomatic delay calibration is sometimes inaccurate
+
+ChangeSet@1.2156.1.124, 2010-10-22 08:31:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P68
+ TAG: NTP_4_2_7P68
+
+ ChangeLog@1.622.1.73 +1 -0
+ NTP_4_2_7P68
+
+ ntpd/ntpd-opts.c@1.71 +2 -2
+ NTP_4_2_7P68
+
+ ntpd/ntpd-opts.h@1.71 +3 -3
+ NTP_4_2_7P68
+
+ ntpd/ntpd-opts.texi@1.70 +2 -2
+ NTP_4_2_7P68
+
+ ntpd/ntpd.1@1.70 +2 -2
+ NTP_4_2_7P68
+
+ ntpdc/ntpdc-opts.c@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpdc/ntpdc-opts.h@1.69 +3 -3
+ NTP_4_2_7P68
+
+ ntpdc/ntpdc-opts.texi@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpdc/ntpdc.1@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpq/ntpq-opts.c@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpq/ntpq-opts.h@1.69 +3 -3
+ NTP_4_2_7P68
+
+ ntpq/ntpq-opts.texi@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpq/ntpq.1@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.69 +3 -3
+ NTP_4_2_7P68
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.69 +2 -2
+ NTP_4_2_7P68
+
+ ntpsnmpd/ntpsnmpd.1@1.69 +2 -2
+ NTP_4_2_7P68
+
+ packageinfo.sh@1.70 +1 -1
+ NTP_4_2_7P68
+
+ sntp/sntp-opts.c@1.69 +2 -2
+ NTP_4_2_7P68
+
+ sntp/sntp-opts.h@1.69 +3 -3
+ NTP_4_2_7P68
+
+ sntp/sntp-opts.texi@1.69 +1 -1
+ NTP_4_2_7P68
+
+ sntp/sntp.1@1.69 +2 -2
+ NTP_4_2_7P68
+
+ sntp/sntp.html@1.69 +1 -1
+ NTP_4_2_7P68
+
+ util/ntp-keygen-opts.c@1.66 +2 -2
+ NTP_4_2_7P68
+
+ util/ntp-keygen-opts.h@1.66 +3 -3
+ NTP_4_2_7P68
+
+ util/ntp-keygen-opts.texi@1.69 +2 -2
+ NTP_4_2_7P68
+
+ util/ntp-keygen.1@1.69 +2 -2
+ NTP_4_2_7P68
+
+ChangeSet@1.2082.30.3, 2010-10-22 07:46:08+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC5
TAG: NTP_4_2_6P3_RC5
- ChangeLog@1.658 +1 -0
+ ChangeLog@1.496.26.91 +1 -0
NTP_4_2_6P3_RC5
- ntpd/ntpd-opts.c@1.269 +2 -2
+ ntpd/ntpd-opts.c@1.248.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpd/ntpd-opts.h@1.269 +3 -3
+ ntpd/ntpd-opts.h@1.248.21.1 +3 -3
NTP_4_2_6P3_RC5
- ntpd/ntpd-opts.texi@1.267 +2 -2
+ ntpd/ntpd-opts.texi@1.246.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpd/ntpd.1@1.267 +2 -2
+ ntpd/ntpd.1@1.246.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpdc/ntpdc-opts.c@1.265 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpdc/ntpdc-opts.h@1.265 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.21.1 +3 -3
NTP_4_2_6P3_RC5
- ntpdc/ntpdc-opts.texi@1.264 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpdc/ntpdc.1@1.264 +2 -2
+ ntpdc/ntpdc.1@1.243.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpq/ntpq-opts.c@1.266 +2 -2
+ ntpq/ntpq-opts.c@1.245.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpq/ntpq-opts.h@1.266 +3 -3
+ ntpq/ntpq-opts.h@1.245.21.1 +3 -3
NTP_4_2_6P3_RC5
- ntpq/ntpq-opts.texi@1.265 +2 -2
+ ntpq/ntpq-opts.texi@1.244.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpq/ntpq.1@1.265 +2 -2
+ ntpq/ntpq.1@1.244.21.1 +2 -2
NTP_4_2_6P3_RC5
- ntpsnmpd/ntpsnmpd-opts.c@1.145 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.22.1 +2 -2
NTP_4_2_6P3_RC5
- ntpsnmpd/ntpsnmpd-opts.h@1.145 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.22.1 +3 -3
NTP_4_2_6P3_RC5
- ntpsnmpd/ntpsnmpd-opts.texi@1.145 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.22.1 +2 -2
NTP_4_2_6P3_RC5
- ntpsnmpd/ntpsnmpd.1@1.144 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.22.1 +2 -2
NTP_4_2_6P3_RC5
- packageinfo.sh@1.284 +1 -1
+ packageinfo.sh@1.255.23.1 +1 -1
NTP_4_2_6P3_RC5
- sntp/sntp-opts.c@1.138 +2 -2
+ sntp/sntp-opts.c@1.117.21.1 +2 -2
NTP_4_2_6P3_RC5
- sntp/sntp-opts.h@1.138 +3 -3
+ sntp/sntp-opts.h@1.117.21.1 +3 -3
NTP_4_2_6P3_RC5
- sntp/sntp-opts.texi@1.138 +1 -1
+ sntp/sntp-opts.texi@1.117.21.1 +1 -1
NTP_4_2_6P3_RC5
- sntp/sntp.1@1.138 +2 -2
+ sntp/sntp.1@1.117.21.1 +2 -2
NTP_4_2_6P3_RC5
- sntp/sntp.html@1.28 +1 -1
+ sntp/sntp.html@1.7.21.1 +1 -1
NTP_4_2_6P3_RC5
- util/ntp-keygen-opts.c@1.268 +2 -2
+ util/ntp-keygen-opts.c@1.247.21.1 +2 -2
NTP_4_2_6P3_RC5
- util/ntp-keygen-opts.h@1.268 +3 -3
+ util/ntp-keygen-opts.h@1.247.21.1 +3 -3
NTP_4_2_6P3_RC5
- util/ntp-keygen-opts.texi@1.267 +2 -2
+ util/ntp-keygen-opts.texi@1.246.21.1 +2 -2
NTP_4_2_6P3_RC5
- util/ntp-keygen.1@1.267 +2 -2
+ util/ntp-keygen.1@1.246.21.1 +2 -2
NTP_4_2_6P3_RC5
-ChangeSet@1.2207.2.1, 2010-10-22 00:33:26+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.122, 2010-10-22 02:02:49-04:00, stenn@deacon.udel.edu
+ Documentation cleanup
+
+ BitKeeper/deleted/.del-manyopt.htm~8bee686d28f0c2b7@1.24 +0 -0
+ Delete: html/manyopt.html
+
+ChangeSet@1.2156.1.121, 2010-10-22 01:56:16-04:00, stenn@deacon.udel.edu
+ [Bug 1670] Fix peer->bias and broadcastdelay
+
+ ChangeLog@1.622.1.71 +1 -0
+ [Bug 1670] Fix peer->bias and broadcastdelay
+
+ html/miscopt.html@1.60 +4 -3
+ [Bug 1670] Fix peer->bias and broadcastdelay
+
+ include/ntp.h@1.183 +1 -1
+ [Bug 1670] Fix peer->bias and broadcastdelay
+
+ ntpd/ntp_proto.c@1.308 +2 -5
+ [Bug 1670] Fix peer->bias and broadcastdelay
+
+ChangeSet@1.2156.1.120, 2010-10-21 23:57:11-04:00, stenn@deacon.udel.edu
+ Documentation EOL cleanup
+
+ ChangeLog@1.622.1.70 +1 -0
+ Documentation EOL cleanup
+
+ html/config.html@1.24 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver16.html@1.12 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver2.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver27.html@1.16 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver29.html@1.16 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver30.html@1.20 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver31.html@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver32.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver33.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver35.html@1.15 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver37.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver38.html@1.15 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver39.html@1.14 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver42.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver43.html@1.11 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver44.html@1.14 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver5.html@1.14 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/driver9.html@1.15 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/mx4200data.html@1.2 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/oncore-shmem.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/scripts/footer.txt@1.2 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/scripts/style.css@1.2 +1 -1
+ Documentation EOL cleanup
+
+ html/drivers/tf582_4.html@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/hints/sco.html@1.11 +1 -1
+ Documentation EOL cleanup
+
+ html/hints/vxworks.html@1.10 +1 -1
+ Documentation EOL cleanup
+
+ html/parsedata.html@1.13 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/accopt.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/audio.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/authopt.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/clockopt.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/command.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/confopt.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/external.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/footer.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/hand.txt@1.2 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/install.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/manual.txt@1.4 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/misc.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/miscopt.txt@1.7 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/monopt.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/refclock.txt@1.3 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/special.txt@1.6 +1 -1
+ Documentation EOL cleanup
+
+ html/scripts/style.css@1.3 +1 -1
+ Documentation EOL cleanup
+
+ChangeSet@1.2156.1.119, 2010-10-21 23:42:06-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.69 +1 -0
+ Documentation updates from Dave Mills
+
+ html/build.html@1.25 +1 -1
+ Documentation updates from Dave Mills
+
+ html/drivers/driver1.html@1.18 +5 -5
+ Documentation updates from Dave Mills
+
+ html/scripts/config.txt@1.4 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2082.31.1, 2010-10-22 00:33:26+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3.
- ChangeLog@1.655.1.1 +4 -0
+ ChangeLog@1.496.52.1 +4 -0
[Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3.
- ntpd/ntp_util.c@1.77 +9 -8
+ ntpd/ntp_util.c@1.75.1.2 +9 -8
[Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3.
-ChangeSet@1.2207.1.1, 2010-10-19 21:10:14+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.117, 2010-10-21 10:10:05+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P67
+ TAG: NTP_4_2_7P67
+
+ ChangeLog@1.622.1.67 +1 -0
+ NTP_4_2_7P67
+
+ ntpd/ntpd-opts.c@1.70 +2 -2
+ NTP_4_2_7P67
+
+ ntpd/ntpd-opts.h@1.70 +3 -3
+ NTP_4_2_7P67
+
+ ntpd/ntpd-opts.texi@1.69 +2 -2
+ NTP_4_2_7P67
+
+ ntpd/ntpd.1@1.69 +2 -2
+ NTP_4_2_7P67
+
+ ntpdc/ntpdc-opts.c@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpdc/ntpdc-opts.h@1.68 +3 -3
+ NTP_4_2_7P67
+
+ ntpdc/ntpdc-opts.texi@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpdc/ntpdc.1@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpq/ntpq-opts.c@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpq/ntpq-opts.h@1.68 +3 -3
+ NTP_4_2_7P67
+
+ ntpq/ntpq-opts.texi@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpq/ntpq.1@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.68 +3 -3
+ NTP_4_2_7P67
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.68 +2 -2
+ NTP_4_2_7P67
+
+ ntpsnmpd/ntpsnmpd.1@1.68 +2 -2
+ NTP_4_2_7P67
+
+ packageinfo.sh@1.69 +1 -1
+ NTP_4_2_7P67
+
+ sntp/sntp-opts.c@1.68 +2 -2
+ NTP_4_2_7P67
+
+ sntp/sntp-opts.h@1.68 +3 -3
+ NTP_4_2_7P67
+
+ sntp/sntp-opts.texi@1.68 +1 -1
+ NTP_4_2_7P67
+
+ sntp/sntp.1@1.68 +2 -2
+ NTP_4_2_7P67
+
+ sntp/sntp.html@1.68 +1 -1
+ NTP_4_2_7P67
+
+ util/ntp-keygen-opts.c@1.65 +2 -2
+ NTP_4_2_7P67
+
+ util/ntp-keygen-opts.h@1.65 +3 -3
+ NTP_4_2_7P67
+
+ util/ntp-keygen-opts.texi@1.68 +2 -2
+ NTP_4_2_7P67
+
+ util/ntp-keygen.1@1.68 +2 -2
+ NTP_4_2_7P67
+
+ChangeSet@1.2156.1.116, 2010-10-19 21:30:15+00:00, davehart@shiny.ad.hartbrothers.com
+ Exclude keyword-gen.c and ntp_parser.y from release as well as
+ debug Windows builds.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.30 +16 -0
+ Exclude keyword-gen.c and ntp_parser.y from release as well as
+ debug Windows builds.
+
+ChangeSet@1.2082.30.1, 2010-10-19 21:10:14+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1649] Require NMEA checksum if $GPRMC or previously seen.
- ChangeLog@1.656 +4 -0
+ ChangeLog@1.496.26.89 +4 -0
[Bug 1649] Require NMEA checksum if $GPRMC or previously seen.
- ntpd/refclock_nmea.c@1.47.1.1 +104 -56
+ ntpd/refclock_nmea.c@1.46.2.1 +104 -56
[Bug 1649] Require NMEA checksum if $GPRMC or previously seen.
-ChangeSet@1.2207, 2010-10-16 04:24:10+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.114, 2010-10-19 10:10:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P66
+ TAG: NTP_4_2_7P66
+
+ ChangeLog@1.622.1.65 +1 -0
+ NTP_4_2_7P66
+
+ ntpd/ntpd-opts.c@1.69 +2 -2
+ NTP_4_2_7P66
+
+ ntpd/ntpd-opts.h@1.69 +3 -3
+ NTP_4_2_7P66
+
+ ntpd/ntpd-opts.texi@1.68 +2 -2
+ NTP_4_2_7P66
+
+ ntpd/ntpd.1@1.68 +2 -2
+ NTP_4_2_7P66
+
+ ntpdc/ntpdc-opts.c@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpdc/ntpdc-opts.h@1.67 +3 -3
+ NTP_4_2_7P66
+
+ ntpdc/ntpdc-opts.texi@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpdc/ntpdc.1@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpq/ntpq-opts.c@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpq/ntpq-opts.h@1.67 +3 -3
+ NTP_4_2_7P66
+
+ ntpq/ntpq-opts.texi@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpq/ntpq.1@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.67 +3 -3
+ NTP_4_2_7P66
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.67 +2 -2
+ NTP_4_2_7P66
+
+ ntpsnmpd/ntpsnmpd.1@1.67 +2 -2
+ NTP_4_2_7P66
+
+ packageinfo.sh@1.68 +1 -1
+ NTP_4_2_7P66
+
+ sntp/sntp-opts.c@1.67 +2 -2
+ NTP_4_2_7P66
+
+ sntp/sntp-opts.h@1.67 +3 -3
+ NTP_4_2_7P66
+
+ sntp/sntp-opts.texi@1.67 +1 -1
+ NTP_4_2_7P66
+
+ sntp/sntp.1@1.67 +2 -2
+ NTP_4_2_7P66
+
+ sntp/sntp.html@1.67 +1 -1
+ NTP_4_2_7P66
+
+ util/ntp-keygen-opts.c@1.64 +2 -2
+ NTP_4_2_7P66
+
+ util/ntp-keygen-opts.h@1.64 +3 -3
+ NTP_4_2_7P66
+
+ util/ntp-keygen-opts.texi@1.67 +2 -2
+ NTP_4_2_7P66
+
+ util/ntp-keygen.1@1.67 +2 -2
+ NTP_4_2_7P66
+
+ChangeSet@1.2156.1.113, 2010-10-18 20:15:32-04:00, stenn@deacon.udel.edu
+ ChangeLog:
+ * [Bug 1277] Provide and use O(1) FIFOs, esp. in the config tree code.
+ * Remove unused 'bias' configuration keyword.
+
+ ChangeLog@1.622.1.64 +2 -0
+ * [Bug 1277] Provide and use O(1) FIFOs, esp. in the config tree code.
+ * Remove unused 'bias' configuration keyword.
+
+ChangeSet@1.2156.1.112, 2010-10-18 15:42:39+00:00, davehart@shiny.ad.hartbrothers.com
+ quiet ntpdsim build warnings about unused funcs,
+
+ include/ntpd.h@1.142 +1 -2
+ quiet ntpdsim build warnings about unused funcs,
+
+ libntp/emalloc.c@1.13 +2 -0
+ warning pointed out bug
+
+ ntpd/ntp_config.c@1.269 +57 -33
+ quiet ntpdsim build warnings about unused funcs,
+
+ ntpd/ntp_scanner.h@1.17 +2 -0
+ quiet ntpdsim build warnings about unused funcs,
+
+ ntpd/ntpsim.c@1.28 +1 -1
+ do the header shuffle
+
+ChangeSet@1.2156.1.111, 2010-10-18 14:49:33+00:00, davehart@shiny.ad.hartbrothers.com
+ merge cleanup, simulator fixes, generated files from previous merge.
+
+ ntpd/keyword-gen-utd@1.11 +1 -1
+ generated from previously merged source
+
+ ntpd/ntp_keyword.h@1.13 +705 -709
+ generated from previously merged source
+
+ ntpd/ntp_parser.c@1.66 +1298 -1173
+ generated from previously merged source
+
+ ntpd/ntp_parser.h@1.40 +133 -132
+ generated from previously merged source
+
+ ntpd/ntp_parser.y@1.59 +6 -3
+ merge cleanup, simulator fix
+
+ ntpd/ntpsim.c@1.27 +5 -5
+ correct config tree walking in simulator
+
+ChangeSet@1.2156.16.1, 2010-10-18 13:35:09+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ include/Makefile.am@1.40 +1 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build
+
+ include/ntp_config.h@1.69 +204 -125
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ include/ntp_lists.h@1.8 +142 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Add FIFO (A.K.A. STAILQ) macros.
+
+ include/ntp_prio_q.h@1.7.1.2 +6 -7
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build
+
+ include/ntp_prio_q.h@1.7.1.1 +0 -0
+ Rename: include/ntp_data_structures.h -> include/ntp_prio_q.h
+
+ include/ntp_stdlib.h@1.47 +5 -3
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ add emalloc_zero()
+
+ include/ntpd.h@1.141 +2 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ include/ntpsim.h@1.15 +22 -17
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ libntp/emalloc.c@1.12 +20 -3
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ add emalloc_zero()
+
+ libntp/ntp_rfc2553.c@1.43 +2 -2
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ add emalloc_zero()
+
+ ntpd/Makefile.am@1.94 +1 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build
+
+ ntpd/complete.conf@1.9 +1 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Remove unused "bias" server option
+
+ ntpd/keyword-gen-utd@1.7.1.1 +1 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Remove unused "bias" server option
+
+ ntpd/keyword-gen.c@1.12.1.1 +0 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Remove unused "bias" server option
+
+ ntpd/ntp_config.c@1.263.1.1 +1008 -1074
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ntpd/ntp_filegen.c@1.17.1.1 +1 -1
+ whitespace only
+
+ ntpd/ntp_keyword.h@1.9.1.1 +713 -717
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Remove unused "bias" server option
+
+ ntpd/ntp_parser.c@1.59.1.1 +1508 -1373
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ntpd/ntp_parser.h@1.37.1.1 +139 -139
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ntpd/ntp_parser.y@1.54.1.1 +483 -263
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ntpd/ntp_prio_q.c@1.12.1.2 +5 -5
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build
+
+ ntpd/ntp_prio_q.c@1.12.1.1 +0 -0
+ Rename: ntpd/ntp_data_structures.c -> ntpd/ntp_prio_q.c
+
+ ntpd/ntp_scanner.h@1.16 +1 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ntpd/ntp_util.c@1.82.1.1 +1 -1
+ whitespace only
+
+ ntpd/ntpsim.c@1.24.1.1 +0 -1
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+
+ ports/winnt/vc6/ntpd.dsp@1.47.1.1 +0 -4
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build.
+
+ ports/winnt/vs2003/ntpd.vcproj@1.8.1.1 +0 -22
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.8.1.1 +0 -22
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.27.1.1 +24 -8
+ [Bug 1277] provide, use O(1) FIFOs, esp. config tree.
+ Rename ntp_data_structures.[ch] to ntp_prio_q.[ch], use
+ them only in the simulator build.
+
+ChangeSet@1.2156.1.109, 2010-10-16 05:20:17+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P65
+ TAG: NTP_4_2_7P65
+
+ ChangeLog@1.622.1.63 +1 -0
+ NTP_4_2_7P65
+
+ ntpd/ntpd-opts.c@1.68 +2 -2
+ NTP_4_2_7P65
+
+ ntpd/ntpd-opts.h@1.68 +3 -3
+ NTP_4_2_7P65
+
+ ntpd/ntpd-opts.texi@1.67 +2 -2
+ NTP_4_2_7P65
+
+ ntpd/ntpd.1@1.67 +2 -2
+ NTP_4_2_7P65
+
+ ntpdc/ntpdc-opts.c@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpdc/ntpdc-opts.h@1.66 +3 -3
+ NTP_4_2_7P65
+
+ ntpdc/ntpdc-opts.texi@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpdc/ntpdc.1@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpq/ntpq-opts.c@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpq/ntpq-opts.h@1.66 +3 -3
+ NTP_4_2_7P65
+
+ ntpq/ntpq-opts.texi@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpq/ntpq.1@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.66 +3 -3
+ NTP_4_2_7P65
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.66 +2 -2
+ NTP_4_2_7P65
+
+ ntpsnmpd/ntpsnmpd.1@1.66 +2 -2
+ NTP_4_2_7P65
+
+ packageinfo.sh@1.67 +1 -1
+ NTP_4_2_7P65
+
+ sntp/sntp-opts.c@1.66 +2 -2
+ NTP_4_2_7P65
+
+ sntp/sntp-opts.h@1.66 +3 -3
+ NTP_4_2_7P65
+
+ sntp/sntp-opts.texi@1.66 +1 -1
+ NTP_4_2_7P65
+
+ sntp/sntp.1@1.66 +2 -2
+ NTP_4_2_7P65
+
+ sntp/sntp.html@1.66 +1 -1
+ NTP_4_2_7P65
+
+ util/ntp-keygen-opts.c@1.63 +2 -2
+ NTP_4_2_7P65
+
+ util/ntp-keygen-opts.h@1.63 +3 -3
+ NTP_4_2_7P65
+
+ util/ntp-keygen-opts.texi@1.66 +2 -2
+ NTP_4_2_7P65
+
+ util/ntp-keygen.1@1.66 +2 -2
+ NTP_4_2_7P65
+
+ChangeSet@1.2082.4.120, 2010-10-16 04:24:10+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC4
TAG: NTP_4_2_6P3_RC4
- ChangeLog@1.655 +1 -0
+ ChangeLog@1.496.26.88 +1 -0
NTP_4_2_6P3_RC4
- ntpd/ntpd-opts.c@1.268 +2 -2
+ ntpd/ntpd-opts.c@1.248.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpd/ntpd-opts.h@1.268 +3 -3
+ ntpd/ntpd-opts.h@1.248.20.1 +3 -3
NTP_4_2_6P3_RC4
- ntpd/ntpd-opts.texi@1.266 +2 -2
+ ntpd/ntpd-opts.texi@1.246.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpd/ntpd.1@1.266 +2 -2
+ ntpd/ntpd.1@1.246.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpdc/ntpdc-opts.c@1.264 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpdc/ntpdc-opts.h@1.264 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.20.1 +3 -3
NTP_4_2_6P3_RC4
- ntpdc/ntpdc-opts.texi@1.263 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpdc/ntpdc.1@1.263 +2 -2
+ ntpdc/ntpdc.1@1.243.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpq/ntpq-opts.c@1.265 +2 -2
+ ntpq/ntpq-opts.c@1.245.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpq/ntpq-opts.h@1.265 +3 -3
+ ntpq/ntpq-opts.h@1.245.20.1 +3 -3
NTP_4_2_6P3_RC4
- ntpq/ntpq-opts.texi@1.264 +2 -2
+ ntpq/ntpq-opts.texi@1.244.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpq/ntpq.1@1.264 +2 -2
+ ntpq/ntpq.1@1.244.20.1 +2 -2
NTP_4_2_6P3_RC4
- ntpsnmpd/ntpsnmpd-opts.c@1.144 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.21.1 +2 -2
NTP_4_2_6P3_RC4
- ntpsnmpd/ntpsnmpd-opts.h@1.144 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.21.1 +3 -3
NTP_4_2_6P3_RC4
- ntpsnmpd/ntpsnmpd-opts.texi@1.144 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.21.1 +2 -2
NTP_4_2_6P3_RC4
- ntpsnmpd/ntpsnmpd.1@1.143 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.21.1 +2 -2
NTP_4_2_6P3_RC4
- packageinfo.sh@1.283 +1 -1
+ packageinfo.sh@1.255.22.1 +1 -1
NTP_4_2_6P3_RC4
- sntp/sntp-opts.c@1.137 +2 -2
+ sntp/sntp-opts.c@1.117.20.1 +2 -2
NTP_4_2_6P3_RC4
- sntp/sntp-opts.h@1.137 +3 -3
+ sntp/sntp-opts.h@1.117.20.1 +3 -3
NTP_4_2_6P3_RC4
- sntp/sntp-opts.texi@1.137 +1 -1
+ sntp/sntp-opts.texi@1.117.20.1 +1 -1
NTP_4_2_6P3_RC4
- sntp/sntp.1@1.137 +2 -2
+ sntp/sntp.1@1.117.20.1 +2 -2
NTP_4_2_6P3_RC4
- sntp/sntp.html@1.27 +1 -1
+ sntp/sntp.html@1.7.20.1 +1 -1
NTP_4_2_6P3_RC4
- util/ntp-keygen-opts.c@1.267 +2 -2
+ util/ntp-keygen-opts.c@1.247.20.1 +2 -2
NTP_4_2_6P3_RC4
- util/ntp-keygen-opts.h@1.267 +3 -3
+ util/ntp-keygen-opts.h@1.247.20.1 +3 -3
NTP_4_2_6P3_RC4
- util/ntp-keygen-opts.texi@1.266 +2 -2
+ util/ntp-keygen-opts.texi@1.246.20.1 +2 -2
NTP_4_2_6P3_RC4
- util/ntp-keygen.1@1.266 +2 -2
+ util/ntp-keygen.1@1.246.20.1 +2 -2
NTP_4_2_6P3_RC4
-ChangeSet@1.2204.1.1, 2010-10-16 04:02:17+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.29.1, 2010-10-16 04:02:17+00:00, davehart@shiny.ad.hartbrothers.com
min/max confusion in ntpsnmpd change
- ntpsnmpd/ntpSnmpSubagentObject.c@1.6 +4 -1
+ ntpsnmpd/ntpSnmpSubagentObject.c@1.3.1.3 +4 -1
min/max confusion
-ChangeSet@1.2205, 2010-10-15 23:52:31-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.118, 2010-10-15 23:52:31-04:00, stenn@deacon.udel.edu
Update NEWS to 4.2.6p3-RC4
NEWS@1.110 +7 -0
Update to 4.2.6p3-RC4
-ChangeSet@1.2204, 2010-10-16 00:40:13+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.106, 2010-10-16 01:18:29+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
+
+ ChangeLog@1.622.1.61 +1 -0
+ Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
+
+ ntpd/keyword-gen-utd@1.9 +1 -1
+ cascade from ntp_parser.h update
+
+ ntpd/ntp_config.c@1.267 +0 -4
+ Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
+
+ ntpd/ntp_keyword.h@1.11 +460 -462
+ cascade from ntp_parser.h update
+
+ ntpd/ntp_parser.c@1.64 +1308 -1334
+ Bison output fromm ntp_parser.y
+
+ ntpd/ntp_parser.h@1.38 +320 -325
+ Bison output fromm ntp_parser.y
+
+ ntpd/ntp_parser.y@1.57 +0 -6
+ Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
+
+ChangeSet@1.2082.4.117, 2010-10-16 00:40:13+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1584] wrong SNMP type for precision, resolution.
- ChangeLog@1.654 +1 -0
+ ChangeLog@1.496.26.87 +1 -0
[Bug 1584] wrong SNMP type for precision, resolution.
- ntpsnmpd/ntpSnmpSubagentObject.c@1.5 +160 -130
+ ntpsnmpd/ntpSnmpSubagentObject.c@1.3.1.2 +160 -130
Correct ASN type for ntp_EntTimeResolution and ntp_EntTimePrecision.
Use precision as best guess for unavailable resolution.
ntpsnmpd/ntpSnmpSubagentObject.h@1.4 +6 -6
const fun
-ChangeSet@1.2203, 2010-10-14 19:13:29+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.104, 2010-10-15 07:18:13+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P64
+ TAG: NTP_4_2_7P64
+
+ ChangeLog@1.622.1.59 +1 -0
+ NTP_4_2_7P64
+
+ ntpd/ntpd-opts.c@1.67 +2 -2
+ NTP_4_2_7P64
+
+ ntpd/ntpd-opts.h@1.67 +3 -3
+ NTP_4_2_7P64
+
+ ntpd/ntpd-opts.texi@1.66 +2 -2
+ NTP_4_2_7P64
+
+ ntpd/ntpd.1@1.66 +2 -2
+ NTP_4_2_7P64
+
+ ntpdc/ntpdc-opts.c@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpdc/ntpdc-opts.h@1.65 +3 -3
+ NTP_4_2_7P64
+
+ ntpdc/ntpdc-opts.texi@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpdc/ntpdc.1@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpq/ntpq-opts.c@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpq/ntpq-opts.h@1.65 +3 -3
+ NTP_4_2_7P64
+
+ ntpq/ntpq-opts.texi@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpq/ntpq.1@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.65 +3 -3
+ NTP_4_2_7P64
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.65 +2 -2
+ NTP_4_2_7P64
+
+ ntpsnmpd/ntpsnmpd.1@1.65 +2 -2
+ NTP_4_2_7P64
+
+ packageinfo.sh@1.66 +1 -1
+ NTP_4_2_7P64
+
+ sntp/sntp-opts.c@1.65 +2 -2
+ NTP_4_2_7P64
+
+ sntp/sntp-opts.h@1.65 +3 -3
+ NTP_4_2_7P64
+
+ sntp/sntp-opts.texi@1.65 +1 -1
+ NTP_4_2_7P64
+
+ sntp/sntp.1@1.65 +2 -2
+ NTP_4_2_7P64
+
+ sntp/sntp.html@1.65 +1 -1
+ NTP_4_2_7P64
+
+ util/ntp-keygen-opts.c@1.62 +2 -2
+ NTP_4_2_7P64
+
+ util/ntp-keygen-opts.h@1.62 +3 -3
+ NTP_4_2_7P64
+
+ util/ntp-keygen-opts.texi@1.65 +2 -2
+ NTP_4_2_7P64
+
+ util/ntp-keygen.1@1.65 +2 -2
+ NTP_4_2_7P64
+
+ChangeSet@1.2156.1.103, 2010-10-15 03:00:04-04:00, stenn@deacon.udel.edu
+ typo cleanup
+
+ ChangeLog@1.622.1.58 +2 -2
+ typo cleanup
+
+ChangeSet@1.2156.1.102, 2010-10-15 02:56:35-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.65 +4 -4
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.53 +9 -9
+ Documentation updates from Dave Mills
+
+ html/decode.html@1.17 +15 -15
+ Documentation updates from Dave Mills
+
+ html/drivers/driver16.html@1.11 +24 -24
+ Documentation updates from Dave Mills
+
+ html/drivers/driver2.html@1.12 +50 -50
+ Documentation updates from Dave Mills
+
+ html/drivers/driver5.html@1.13 +65 -65
+ Documentation updates from Dave Mills
+
+ html/pic/fig_3_1.gif@1.2 +232 -527
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.12 +3 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.101, 2010-10-15 02:24:55-04:00, stenn@deacon.udel.edu
+ Remove 'calldelay' and 'sign' keywords (Dave Mills)
+
+ ChangeLog@1.622.1.57 +1 -0
+ Remove 'calldelay' and 'sign' keywords (Dave Mills)
+
+ include/ntp_crypto.h@1.50 +3 -4
+ Remove 'calldelay' and 'sign' keywords (Dave Mills)
+
+ ntpd/ntp_config.c@1.266 +1 -5
+ Remove 'calldelay' and 'sign' keywords (Dave Mills)
+
+ChangeSet@1.2156.1.100, 2010-10-15 01:56:16+00:00, davehart@shiny.ad.hartbrothers.com
+ removed unused "calldelay" and "sign" tokens from keyword
+ scanner, yet to be removed from parser once DLM's update
+ to ntp_config.c is integrated.
+
+ ntpd/keyword-gen-utd@1.8 +1 -1
+ removed unused "calldelay" and "sign" tokens from keyword
+ scanner, yet to be removed from parser once DLM's update
+ to ntp_config.c is integrated.
+
+ ntpd/keyword-gen.c@1.13 +0 -2
+ removed unused "calldelay" and "sign" tokens from keyword
+ scanner, yet to be removed from parser once DLM's update
+ to ntp_config.c is integrated.
+
+ ntpd/ntp_keyword.h@1.10 +571 -579
+ removed unused "calldelay" and "sign" tokens from keyword
+ scanner, yet to be removed from parser once DLM's update
+ to ntp_config.c is integrated.
+
+ChangeSet@1.2156.1.99, 2010-10-15 00:23:01+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ ChangeLog@1.622.1.56 +1 -0
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ include/ntp_data_structures.h@1.8 +13 -9
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ ntpd/ntp_data_structures.c@1.13 +4 -6
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ ntpd/ntp_io.c@1.323 +4 -4
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ ntpd/ntp_timer.c@1.61 +2 -2
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ ntpd/ntpsim.c@1.25 +102 -89
+ [Bug 1663] ntpdsim should not open net sockets.
+
+ChangeSet@1.2082.4.116, 2010-10-14 19:13:29+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1659] Need CLOCK_TRUETIME not CLOCK_TRUE.
- ChangeLog@1.653 +1 -0
+ ChangeLog@1.496.26.86 +1 -0
[Bug 1659] Need CLOCK_TRUETIME not CLOCK_TRUE.
- ports/winnt/include/config.h@1.82 +1 -1
+ ports/winnt/include/config.h@1.79.1.3 +1 -1
[Bug 1659] Need CLOCK_TRUETIME not CLOCK_TRUE.
-ChangeSet@1.2202, 2010-10-14 14:47:37+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.115, 2010-10-14 14:47:37+00:00, davehart@shiny.ad.hartbrothers.com
constantly more fun
- ntpq/libntpq.c@1.7 +6 -6
+ ntpq/libntpq.c@1.3.1.4 +6 -6
constantly more fun
-ChangeSet@1.2201, 2010-10-14 14:07:21+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.96, 2010-10-14 14:32:58+00:00, davehart@shiny.ad.hartbrothers.com
+ correct prior merge of ntpq.c
+
+ ntpq/libntpq.c@1.7 +6 -6
+ more const fun
+
+ ntpq/ntpq.c@1.118 +0 -70
+ correct prior merge of ntpq.c
+
+ChangeSet@1.2082.4.114, 2010-10-14 14:07:21+00:00, davehart@shiny.ad.hartbrothers.com
const additions needed for ntp-dev
- ChangeLog@1.652 +1 -0
+ ChangeLog@1.496.26.85 +1 -0
[Bug 1665] is_anycast() u_int32_t should be u_int32.
const additions needed for ntp-dev
- ntpd/ntp_io.c@1.312 +1 -1
+ ntpd/ntp_io.c@1.306.1.6 +1 -1
[Bug 1665] is_anycast() u_int32_t should be u_int32.
- ntpq/libntpq.c@1.6 +66 -62
+ ntpq/libntpq.c@1.3.1.3 +66 -62
const additions needed for ntp-dev
- ntpq/libntpq.h@1.5 +2 -2
+ ntpq/libntpq.h@1.3.1.2 +2 -2
const additions needed for ntp-dev
- ntpq/libntpq_subs.c@1.3 +13 -3
+ ntpq/libntpq_subs.c@1.2.1.1 +13 -3
const additions needed for ntp-dev
- ntpq/ntpq-subs.c@1.45 +42 -38
+ ntpq/ntpq-subs.c@1.39.2.4 +42 -38
const additions needed for ntp-dev
- ntpq/ntpq.c@1.103 +144 -84
+ ntpq/ntpq.c@1.97.1.6 +144 -84
const additions needed for ntp-dev
- ntpq/ntpq.h@1.13 +7 -3
+ ntpq/ntpq.h@1.10.1.3 +7 -3
const additions needed for ntp-dev
-ChangeSet@1.2200, 2010-10-14 09:38:42+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.113, 2010-10-14 09:38:42+00:00, davehart@shiny.ad.hartbrothers.com
ntpsnmpd, libntpq warning cleanup.
- ChangeLog@1.651 +5 -1
+ ChangeLog@1.496.26.84 +5 -1
ntpsnmpd, libntpq warning cleanup.
- ntpq/libntpq.c@1.5 +1 -1
+ ntpq/libntpq.c@1.3.1.2 +1 -1
ntpsnmpd, libntpq warning cleanup.
- ntpsnmpd/ntpsnmpd.c@1.6 +1 -2
+ ntpsnmpd/ntpsnmpd.c@1.3.1.3 +1 -2
ntpsnmpd, libntpq warning cleanup.
-ChangeSet@1.2199, 2010-10-14 07:51:07+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.112, 2010-10-14 07:51:07+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC3
TAG: NTP_4_2_6P3_RC3
- ChangeLog@1.650 +1 -0
+ ChangeLog@1.496.26.83 +1 -0
NTP_4_2_6P3_RC3
- ntpd/ntpd-opts.c@1.267 +2 -2
+ ntpd/ntpd-opts.c@1.248.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpd/ntpd-opts.h@1.267 +3 -3
+ ntpd/ntpd-opts.h@1.248.19.1 +3 -3
NTP_4_2_6P3_RC3
- ntpd/ntpd-opts.texi@1.265 +2 -2
+ ntpd/ntpd-opts.texi@1.246.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpd/ntpd.1@1.265 +2 -2
+ ntpd/ntpd.1@1.246.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpdc/ntpdc-opts.c@1.263 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpdc/ntpdc-opts.h@1.263 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.19.1 +3 -3
NTP_4_2_6P3_RC3
- ntpdc/ntpdc-opts.texi@1.262 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpdc/ntpdc.1@1.262 +2 -2
+ ntpdc/ntpdc.1@1.243.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpq/ntpq-opts.c@1.264 +2 -2
+ ntpq/ntpq-opts.c@1.245.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpq/ntpq-opts.h@1.264 +3 -3
+ ntpq/ntpq-opts.h@1.245.19.1 +3 -3
NTP_4_2_6P3_RC3
- ntpq/ntpq-opts.texi@1.263 +2 -2
+ ntpq/ntpq-opts.texi@1.244.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpq/ntpq.1@1.263 +2 -2
+ ntpq/ntpq.1@1.244.19.1 +2 -2
NTP_4_2_6P3_RC3
- ntpsnmpd/ntpsnmpd-opts.c@1.143 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.20.1 +2 -2
NTP_4_2_6P3_RC3
- ntpsnmpd/ntpsnmpd-opts.h@1.143 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.20.1 +3 -3
NTP_4_2_6P3_RC3
- ntpsnmpd/ntpsnmpd-opts.texi@1.143 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.20.1 +2 -2
NTP_4_2_6P3_RC3
- ntpsnmpd/ntpsnmpd.1@1.142 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.20.1 +2 -2
NTP_4_2_6P3_RC3
- packageinfo.sh@1.282 +1 -1
+ packageinfo.sh@1.255.21.1 +1 -1
NTP_4_2_6P3_RC3
- sntp/sntp-opts.c@1.136 +2 -2
+ sntp/sntp-opts.c@1.117.19.1 +2 -2
NTP_4_2_6P3_RC3
- sntp/sntp-opts.h@1.136 +3 -3
+ sntp/sntp-opts.h@1.117.19.1 +3 -3
NTP_4_2_6P3_RC3
- sntp/sntp-opts.texi@1.136 +1 -1
+ sntp/sntp-opts.texi@1.117.19.1 +1 -1
NTP_4_2_6P3_RC3
- sntp/sntp.1@1.136 +2 -2
+ sntp/sntp.1@1.117.19.1 +2 -2
NTP_4_2_6P3_RC3
- sntp/sntp.html@1.26 +1 -1
+ sntp/sntp.html@1.7.19.1 +1 -1
NTP_4_2_6P3_RC3
- util/ntp-keygen-opts.c@1.266 +2 -2
+ util/ntp-keygen-opts.c@1.247.19.1 +2 -2
NTP_4_2_6P3_RC3
- util/ntp-keygen-opts.h@1.266 +3 -3
+ util/ntp-keygen-opts.h@1.247.19.1 +3 -3
NTP_4_2_6P3_RC3
- util/ntp-keygen-opts.texi@1.265 +2 -2
+ util/ntp-keygen-opts.texi@1.246.19.1 +2 -2
NTP_4_2_6P3_RC3
- util/ntp-keygen.1@1.265 +2 -2
+ util/ntp-keygen.1@1.246.19.1 +2 -2
NTP_4_2_6P3_RC3
-ChangeSet@1.2197, 2010-10-14 03:19:02-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.110, 2010-10-14 03:19:02-04:00, stenn@deacon.udel.edu
Update the NEWS file
NEWS@1.109 +5 -1
Update the NEWS file
-ChangeSet@1.2194.1.21, 2010-10-12 14:27:43+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.93, 2010-10-14 02:34:58-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.52 +1 -0
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.34 +14 -18
+ Documentation updates from Dave Mills
+
+ html/decode.html@1.16 +3 -3
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.11 +2 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.92, 2010-10-13 10:13:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P63
+ TAG: NTP_4_2_7P63
+
+ ChangeLog@1.622.1.51 +1 -0
+ NTP_4_2_7P63
+
+ ntpd/ntpd-opts.c@1.66 +2 -2
+ NTP_4_2_7P63
+
+ ntpd/ntpd-opts.h@1.66 +3 -3
+ NTP_4_2_7P63
+
+ ntpd/ntpd-opts.texi@1.65 +2 -2
+ NTP_4_2_7P63
+
+ ntpd/ntpd.1@1.65 +2 -2
+ NTP_4_2_7P63
+
+ ntpdc/ntpdc-opts.c@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpdc/ntpdc-opts.h@1.64 +3 -3
+ NTP_4_2_7P63
+
+ ntpdc/ntpdc-opts.texi@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpdc/ntpdc.1@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpq/ntpq-opts.c@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpq/ntpq-opts.h@1.64 +3 -3
+ NTP_4_2_7P63
+
+ ntpq/ntpq-opts.texi@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpq/ntpq.1@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.64 +3 -3
+ NTP_4_2_7P63
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.64 +2 -2
+ NTP_4_2_7P63
+
+ ntpsnmpd/ntpsnmpd.1@1.64 +2 -2
+ NTP_4_2_7P63
+
+ packageinfo.sh@1.65 +1 -1
+ NTP_4_2_7P63
+
+ sntp/sntp-opts.c@1.64 +2 -2
+ NTP_4_2_7P63
+
+ sntp/sntp-opts.h@1.64 +3 -3
+ NTP_4_2_7P63
+
+ sntp/sntp-opts.texi@1.64 +1 -1
+ NTP_4_2_7P63
+
+ sntp/sntp.1@1.64 +2 -2
+ NTP_4_2_7P63
+
+ sntp/sntp.html@1.64 +1 -1
+ NTP_4_2_7P63
+
+ util/ntp-keygen-opts.c@1.61 +2 -2
+ NTP_4_2_7P63
+
+ util/ntp-keygen-opts.h@1.61 +3 -3
+ NTP_4_2_7P63
+
+ util/ntp-keygen-opts.texi@1.64 +2 -2
+ NTP_4_2_7P63
+
+ util/ntp-keygen.1@1.64 +2 -2
+ NTP_4_2_7P63
+
+ChangeSet@1.2156.15.1, 2010-10-13 02:10:33-04:00, stenn@deacon.udel.edu
+ Add missing [bug 750] update to Changelog
+
+ ChangeLog@1.622.6.1 +2 -0
+ Add missing [bug 750] update to Changelog
+
+ChangeSet@1.2156.1.89, 2010-10-12 21:33:17-07:00, stenn@stenn.ntp.org
+ Documentation nit cleanup
+
+ ChangeLog@1.622.1.48 +1 -0
+ Documentation nit cleanup
+
+ html/drivers/driver38.html@1.14 +1 -1
+ Documentation nit cleanup
+
+ html/parsenew.html@1.12 +2 -2
+ Documentation nit cleanup
+
+ChangeSet@1.2156.1.88, 2010-10-13 00:19:17-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.47 +1 -0
+ Documentation updates from Dave Mills
+
+ html/poll.html@1.1 +24 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/poll.html
+
+ html/poll.html@1.0 +0 -0
+
+ChangeSet@1.2082.22.21, 2010-10-12 14:27:43+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1080] ntpd on ipv6 routers very chatty.
- ChangeLog@1.646.1.17 +1 -0
+ ChangeLog@1.496.47.17 +1 -0
[Bug 1080] ntpd on ipv6 routers very chatty.
- configure.ac@1.479 +33 -11
+ configure.ac@1.465.1.14 +33 -11
[Bug 1080] ntpd on ipv6 routers very chatty.
- include/ntp_net.h@1.5 +9 -0
+ include/ntp_net.h@1.3.1.2 +9 -0
[Bug 1080] ntpd on ipv6 routers very chatty.
- ntpd/ntp_io.c@1.311 +39 -0
+ ntpd/ntp_io.c@1.306.1.5 +39 -0
[Bug 1080] ntpd on ipv6 routers very chatty.
patch originally supplied to freebsd's head/contrib/ntp/ntpd/ntp_io.c
by ume@freebsd.org
http://www.mail-archive.com/svn-src-all@freebsd.org/msg16141.html
-ChangeSet@1.2194.1.20, 2010-10-12 01:28:24-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.87, 2010-10-12 10:13:07+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P62
+ TAG: NTP_4_2_7P62
+
+ ChangeLog@1.622.1.46 +1 -0
+ NTP_4_2_7P62
+
+ ntpd/ntpd-opts.c@1.65 +2 -2
+ NTP_4_2_7P62
+
+ ntpd/ntpd-opts.h@1.65 +3 -3
+ NTP_4_2_7P62
+
+ ntpd/ntpd-opts.texi@1.64 +2 -2
+ NTP_4_2_7P62
+
+ ntpd/ntpd.1@1.64 +2 -2
+ NTP_4_2_7P62
+
+ ntpdc/ntpdc-opts.c@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpdc/ntpdc-opts.h@1.63 +3 -3
+ NTP_4_2_7P62
+
+ ntpdc/ntpdc-opts.texi@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpdc/ntpdc.1@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpq/ntpq-opts.c@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpq/ntpq-opts.h@1.63 +3 -3
+ NTP_4_2_7P62
+
+ ntpq/ntpq-opts.texi@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpq/ntpq.1@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.63 +3 -3
+ NTP_4_2_7P62
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.63 +2 -2
+ NTP_4_2_7P62
+
+ ntpsnmpd/ntpsnmpd.1@1.63 +2 -2
+ NTP_4_2_7P62
+
+ packageinfo.sh@1.64 +1 -1
+ NTP_4_2_7P62
+
+ sntp/sntp-opts.c@1.63 +2 -2
+ NTP_4_2_7P62
+
+ sntp/sntp-opts.h@1.63 +3 -3
+ NTP_4_2_7P62
+
+ sntp/sntp-opts.texi@1.63 +1 -1
+ NTP_4_2_7P62
+
+ sntp/sntp.1@1.63 +2 -2
+ NTP_4_2_7P62
+
+ sntp/sntp.html@1.63 +1 -1
+ NTP_4_2_7P62
+
+ util/ntp-keygen-opts.c@1.60 +2 -2
+ NTP_4_2_7P62
+
+ util/ntp-keygen-opts.h@1.60 +3 -3
+ NTP_4_2_7P62
+
+ util/ntp-keygen-opts.texi@1.63 +2 -2
+ NTP_4_2_7P62
+
+ util/ntp-keygen.1@1.63 +2 -2
+ NTP_4_2_7P62
+
+ChangeSet@1.2082.22.20, 2010-10-12 01:28:24-04:00, stenn@deacon.udel.edu
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
- ChangeLog@1.646.1.16 +7 -7
+ ChangeLog@1.496.47.16 +7 -7
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
- ntpd/refclock_ripencc.c@1.12 +1 -1
+ ntpd/refclock_ripencc.c@1.7.1.5 +1 -1
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
-ChangeSet@1.2194.1.19, 2010-10-12 01:06:48-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.22.19, 2010-10-12 01:06:48-04:00, stenn@deacon.udel.edu
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
- ChangeLog@1.646.1.15 +3 -2
+ ChangeLog@1.496.47.15 +3 -2
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
- ntpd/refclock_ripencc.c@1.11 +18 -9
+ ntpd/refclock_ripencc.c@1.7.1.4 +18 -9
[Bug 750]: Non-existing device causes coredump with RIPE-NCC driver
-ChangeSet@1.2194.1.17, 2010-10-11 20:18:23-07:00, stenn@stenn.ntp.org
+ChangeSet@1.2156.1.84, 2010-10-12 00:11:52-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.43 +1 -0
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.33 +8 -9
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.52 +38 -113
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.3 +2 -8
+ Documentation updates from Dave Mills
+
+ html/ntpq.html@1.42 +2 -2
+ Documentation updates from Dave Mills
+
+ html/scripts/special.txt@1.5 +1 -0
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.10 +12 -10
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.83, 2010-10-12 00:06:48-04:00, stenn@deacon.udel.edu
+ Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills)
+
+ ChangeLog@1.622.1.42 +1 -0
+ Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills)
+
+ ntpd/ntp_peer.c@1.135 +1 -8
+ Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills)
+
+ ntpd/ntp_proto.c@1.307 +10 -5
+ Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills)
+
+ChangeSet@1.2082.22.17, 2010-10-11 20:18:23-07:00, stenn@stenn.ntp.org
[Bug 1661]: Re-indent refclock_ripencc.c
- ChangeLog@1.646.1.13 +1 -0
+ ChangeLog@1.496.47.13 +1 -0
[Bug 1661]: Re-indent refclock_ripencc.c
- ntpd/refclock_ripencc.c@1.10 +1909 -1530
+ ntpd/refclock_ripencc.c@1.7.1.3 +1909 -1530
[Bug 1661]: Re-indent refclock_ripencc.c
-ChangeSet@1.2194.6.1, 2010-10-11 22:36:49-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.28.1, 2010-10-11 22:36:49-04:00, stenn@deacon.udel.edu
[Bug 1660]: On some systems, test is in /usr/bin, not /bin
- ChangeLog@1.646.5.1 +1 -0
+ ChangeLog@1.496.51.1 +1 -0
[Bug 1660]: On some systems, test is in /usr/bin, not /bin
- Makefile.am@1.94 +1 -1
+ Makefile.am@1.93.2.1 +1 -1
[Bug 1660]: On some systems, test is in /usr/bin, not /bin
- configure.ac@1.478 +3 -1
+ configure.ac@1.465.1.13 +3 -1
[Bug 1660]: On some systems, test is in /usr/bin, not /bin
-ChangeSet@1.2194.5.1, 2010-10-12 01:16:13+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.27.1, 2010-10-12 01:16:13+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
- ChangeLog@1.646.4.1 +1 -0
+ ChangeLog@1.496.50.1 +1 -0
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
- ntpq/libntpq.c@1.4 +58 -65
+ ntpq/libntpq.c@1.3.1.1 +58 -65
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
- ntpq/libntpq.h@1.4 +5 -5
+ ntpq/libntpq.h@1.3.1.1 +5 -5
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
- ntpsnmpd/Makefile.am@1.20 +2 -2
+ ntpsnmpd/Makefile.am@1.16.1.4 +2 -2
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
- ntpsnmpd/ntpSnmpSubagentObject.c@1.4 +96 -285
+ ntpsnmpd/ntpSnmpSubagentObject.c@1.3.1.1 +96 -285
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
ntpsnmpd/ntpSnmpSubagentObject.h@1.3 +41 -35
@@ -4995,18 +107941,18 @@ ChangeSet@1.2194.5.1, 2010-10-12 01:16:13+00:00, davehart@shiny.ad.hartbrothers.
ntpsnmpd/ntp_snmp.h@1.0 +0 -0
- ntpsnmpd/ntpsnmpd.c@1.5 +1 -11
+ ntpsnmpd/ntpsnmpd.c@1.3.1.2 +1 -11
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
ntpsnmpd/ntpv4-mib.mib@1.2 +244 -357
[Bug 1584]: ntpsnmpd OID must be mib-2.197.
-ChangeSet@1.2194.4.3, 2010-10-09 10:10:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.26.3, 2010-10-09 10:10:10+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ChangeLog@1.646.3.2 +4 -2
+ ChangeLog@1.496.49.2 +4 -2
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
@@ -5015,684 +107961,4686 @@ ChangeSet@1.2194.4.3, 2010-10-09 10:10:10+00:00, davehart@shiny.ad.hartbrothers.
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
- ntpd/refclock_true.c@1.13 +15 -0
+ ntpd/refclock_true.c@1.11.1.2 +15 -0
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ports/winnt/include/config.h@1.81 +2 -0
+ ports/winnt/include/config.h@1.79.1.2 +2 -0
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ports/winnt/vc6/ntpd.dsp@1.42 +0 -2
+ ports/winnt/vc6/ntpd.dsp@1.39.1.3 +0 -2
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ports/winnt/vs2003/ntpd.vcproj@1.5 +4 -8
+ ports/winnt/vs2003/ntpd.vcproj@1.4.1.1 +4 -8
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ports/winnt/vs2005/ntpd.vcproj@1.5 +0 -4
+ ports/winnt/vs2005/ntpd.vcproj@1.4.1.1 +0 -4
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
- ports/winnt/vs2008/ntpd/ntpd.vcproj@1.23 +0 -4
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.21.1.2 +0 -4
[Bug 1567] Support Arbiter 1093C Satellite Clock on Windows.
[Bug 1659] Support Truetime Satellite Clocks on Windows.
-ChangeSet@1.2194.4.2, 2010-10-02 00:31:32-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.80, 2010-10-06 10:09:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P61
+ TAG: NTP_4_2_7P61
+
+ ChangeLog@1.622.1.39 +1 -0
+ NTP_4_2_7P61
+
+ ntpd/ntpd-opts.c@1.64 +2 -2
+ NTP_4_2_7P61
+
+ ntpd/ntpd-opts.h@1.64 +3 -3
+ NTP_4_2_7P61
+
+ ntpd/ntpd-opts.texi@1.63 +2 -2
+ NTP_4_2_7P61
+
+ ntpd/ntpd.1@1.63 +2 -2
+ NTP_4_2_7P61
+
+ ntpdc/ntpdc-opts.c@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpdc/ntpdc-opts.h@1.62 +3 -3
+ NTP_4_2_7P61
+
+ ntpdc/ntpdc-opts.texi@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpdc/ntpdc.1@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpq/ntpq-opts.c@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpq/ntpq-opts.h@1.62 +3 -3
+ NTP_4_2_7P61
+
+ ntpq/ntpq-opts.texi@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpq/ntpq.1@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.62 +3 -3
+ NTP_4_2_7P61
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.62 +2 -2
+ NTP_4_2_7P61
+
+ ntpsnmpd/ntpsnmpd.1@1.62 +2 -2
+ NTP_4_2_7P61
+
+ packageinfo.sh@1.63 +1 -1
+ NTP_4_2_7P61
+
+ sntp/sntp-opts.c@1.62 +2 -2
+ NTP_4_2_7P61
+
+ sntp/sntp-opts.h@1.62 +3 -3
+ NTP_4_2_7P61
+
+ sntp/sntp-opts.texi@1.62 +1 -1
+ NTP_4_2_7P61
+
+ sntp/sntp.1@1.62 +2 -2
+ NTP_4_2_7P61
+
+ sntp/sntp.html@1.62 +1 -1
+ NTP_4_2_7P61
+
+ util/ntp-keygen-opts.c@1.59 +2 -2
+ NTP_4_2_7P61
+
+ util/ntp-keygen-opts.h@1.59 +3 -3
+ NTP_4_2_7P61
+
+ util/ntp-keygen-opts.texi@1.62 +2 -2
+ NTP_4_2_7P61
+
+ util/ntp-keygen.1@1.62 +2 -2
+ NTP_4_2_7P61
+
+ChangeSet@1.2156.1.79, 2010-10-06 00:17:06-04:00, stenn@deacon.udel.edu
+ Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+
+ ChangeLog@1.622.1.38 +1 -0
+ Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+
+ html/cluster.html@1.2 +5 -6
+ Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+
+ include/ntp.h@1.182 +0 -1
+ Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+
+ ntpd/ntp_proto.c@1.306 +40 -63
+ Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
+
+ChangeSet@1.2156.1.78, 2010-10-04 10:13:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P60
+ TAG: NTP_4_2_7P60
+
+ ChangeLog@1.622.1.37 +1 -0
+ NTP_4_2_7P60
+
+ ntpd/ntpd-opts.c@1.63 +2 -2
+ NTP_4_2_7P60
+
+ ntpd/ntpd-opts.h@1.63 +3 -3
+ NTP_4_2_7P60
+
+ ntpd/ntpd-opts.texi@1.62 +2 -2
+ NTP_4_2_7P60
+
+ ntpd/ntpd.1@1.62 +2 -2
+ NTP_4_2_7P60
+
+ ntpdc/ntpdc-opts.c@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpdc/ntpdc-opts.h@1.61 +3 -3
+ NTP_4_2_7P60
+
+ ntpdc/ntpdc-opts.texi@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpdc/ntpdc.1@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpq/ntpq-opts.c@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpq/ntpq-opts.h@1.61 +3 -3
+ NTP_4_2_7P60
+
+ ntpq/ntpq-opts.texi@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpq/ntpq.1@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.61 +3 -3
+ NTP_4_2_7P60
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.61 +2 -2
+ NTP_4_2_7P60
+
+ ntpsnmpd/ntpsnmpd.1@1.61 +2 -2
+ NTP_4_2_7P60
+
+ packageinfo.sh@1.62 +1 -1
+ NTP_4_2_7P60
+
+ sntp/sntp-opts.c@1.61 +2 -2
+ NTP_4_2_7P60
+
+ sntp/sntp-opts.h@1.61 +3 -3
+ NTP_4_2_7P60
+
+ sntp/sntp-opts.texi@1.61 +1 -1
+ NTP_4_2_7P60
+
+ sntp/sntp.1@1.61 +2 -2
+ NTP_4_2_7P60
+
+ sntp/sntp.html@1.61 +1 -1
+ NTP_4_2_7P60
+
+ util/ntp-keygen-opts.c@1.58 +2 -2
+ NTP_4_2_7P60
+
+ util/ntp-keygen-opts.h@1.58 +3 -3
+ NTP_4_2_7P60
+
+ util/ntp-keygen-opts.texi@1.61 +2 -2
+ NTP_4_2_7P60
+
+ util/ntp-keygen.1@1.61 +2 -2
+ NTP_4_2_7P60
+
+ChangeSet@1.2156.1.77, 2010-10-04 01:30:19-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/pic/flt3.gif@1.1 +43 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt3.gif
+
+ html/pic/flt3.gif@1.0 +0 -0
+
+ html/pic/flt6.gif@1.1 +347 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt6.gif
+
+ html/pic/flt6.gif@1.0 +0 -0
+
+ html/pic/flt7.gif@1.1 +176 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt7.gif
+
+ html/pic/flt7.gif@1.0 +0 -0
+
+ChangeSet@1.2156.1.76, 2010-10-04 01:22:59-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/pic/flt4.gif@1.1 +88 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt4.gif
+
+ html/pic/flt4.gif@1.0 +0 -0
+
+ChangeSet@1.2156.1.75, 2010-10-04 01:14:16-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.36 +1 -0
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.3 +1 -1
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.64 +2 -1
+ Documentation updates from Dave Mills
+
+ html/cluster.html@1.1 +31 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/cluster.html
+
+ html/cluster.html@1.0 +0 -0
+
+ html/comdex.html@1.4 +3 -1
+ Documentation updates from Dave Mills
+
+ html/debug.html@1.31 +3 -2
+ Documentation updates from Dave Mills
+
+ html/ntp_conf.html@1.6 +2 -2
+ Documentation updates from Dave Mills
+
+ html/ntpdsim_new.html@1.6 +2 -1
+ Documentation updates from Dave Mills
+
+ html/select.html@1.1 +32 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/select.html
+
+ html/select.html@1.0 +0 -0
+
+ html/warp.html@1.9 +12 -18
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.74, 2010-10-02 08:00:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P59
+ TAG: NTP_4_2_7P59
+
+ ChangeLog@1.622.1.35 +1 -0
+ NTP_4_2_7P59
+
+ ntpd/ntpd-opts.c@1.62 +2 -2
+ NTP_4_2_7P59
+
+ ntpd/ntpd-opts.h@1.62 +3 -3
+ NTP_4_2_7P59
+
+ ntpd/ntpd-opts.texi@1.61 +2 -2
+ NTP_4_2_7P59
+
+ ntpd/ntpd.1@1.61 +2 -2
+ NTP_4_2_7P59
+
+ ntpdc/ntpdc-opts.c@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpdc/ntpdc-opts.h@1.60 +3 -3
+ NTP_4_2_7P59
+
+ ntpdc/ntpdc-opts.texi@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpdc/ntpdc.1@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpq/ntpq-opts.c@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpq/ntpq-opts.h@1.60 +3 -3
+ NTP_4_2_7P59
+
+ ntpq/ntpq-opts.texi@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpq/ntpq.1@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.60 +3 -3
+ NTP_4_2_7P59
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.60 +2 -2
+ NTP_4_2_7P59
+
+ ntpsnmpd/ntpsnmpd.1@1.60 +2 -2
+ NTP_4_2_7P59
+
+ packageinfo.sh@1.61 +1 -1
+ NTP_4_2_7P59
+
+ sntp/sntp-opts.c@1.60 +2 -2
+ NTP_4_2_7P59
+
+ sntp/sntp-opts.h@1.60 +3 -3
+ NTP_4_2_7P59
+
+ sntp/sntp-opts.texi@1.60 +1 -1
+ NTP_4_2_7P59
+
+ sntp/sntp.1@1.60 +2 -2
+ NTP_4_2_7P59
+
+ sntp/sntp.html@1.60 +1 -1
+ NTP_4_2_7P59
+
+ util/ntp-keygen-opts.c@1.57 +2 -2
+ NTP_4_2_7P59
+
+ util/ntp-keygen-opts.h@1.57 +3 -3
+ NTP_4_2_7P59
+
+ util/ntp-keygen-opts.texi@1.60 +2 -2
+ NTP_4_2_7P59
+
+ util/ntp-keygen.1@1.60 +2 -2
+ NTP_4_2_7P59
+
+ChangeSet@1.2156.1.72, 2010-10-02 03:47:56-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.34 +1 -0
+ Documentation updates from Dave Mills
+
+ html/filter.html@1.2 +7 -6
+ Documentation updates from Dave Mills
+
+ html/huffpuff.html@1.2 +8 -3
+ Documentation updates from Dave Mills
+
+ html/scripts/special.txt@1.4 +3 -0
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.8 +9 -10
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.71, 2010-10-02 03:45:18-04:00, stenn@deacon.udel.edu
+ Variable name cleanup from Dave Mills
+
+ ChangeLog@1.622.1.33 +1 -0
+ Variable name cleanup from Dave Mills
+
+ ntpd/ntp_proto.c@1.305 +4 -4
+ Variable name cleanup from Dave Mills
+
+ChangeSet@1.2156.1.70, 2010-10-02 00:36:46-07:00, harlan@hms-mbp.lan
+ [Bug 1657] darwin needs res_9_init, not res_init.
+
+ ChangeLog@1.622.1.32 +1 -0
+ [Bug 1657] darwin needs res_9_init, not res_init.
+
+ configure.ac@1.483.1.8 +5 -3
+ [Bug 1657] darwin needs res_9_init, not res_init.
+
+ChangeSet@1.2082.26.2, 2010-10-02 00:31:32-04:00, stenn@deacon.udel.edu
Update the NEWS file for 4.2.6p3
NEWS@1.108 +31 -0
Update the NEWS file for 4.2.6p3
-ChangeSet@1.2194.4.1, 2010-09-30 00:14:03-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.69, 2010-09-30 05:11:53+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P58
+ TAG: NTP_4_2_7P58
+
+ ChangeLog@1.622.1.31 +1 -0
+ NTP_4_2_7P58
+
+ ntpd/ntpd-opts.c@1.61 +2 -2
+ NTP_4_2_7P58
+
+ ntpd/ntpd-opts.h@1.61 +3 -3
+ NTP_4_2_7P58
+
+ ntpd/ntpd-opts.texi@1.60 +2 -2
+ NTP_4_2_7P58
+
+ ntpd/ntpd.1@1.60 +2 -2
+ NTP_4_2_7P58
+
+ ntpdc/ntpdc-opts.c@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpdc/ntpdc-opts.h@1.59 +3 -3
+ NTP_4_2_7P58
+
+ ntpdc/ntpdc-opts.texi@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpdc/ntpdc.1@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpq/ntpq-opts.c@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpq/ntpq-opts.h@1.59 +3 -3
+ NTP_4_2_7P58
+
+ ntpq/ntpq-opts.texi@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpq/ntpq.1@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.59 +3 -3
+ NTP_4_2_7P58
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.59 +2 -2
+ NTP_4_2_7P58
+
+ ntpsnmpd/ntpsnmpd.1@1.59 +2 -2
+ NTP_4_2_7P58
+
+ packageinfo.sh@1.60 +1 -1
+ NTP_4_2_7P58
+
+ sntp/sntp-opts.c@1.59 +2 -2
+ NTP_4_2_7P58
+
+ sntp/sntp-opts.h@1.59 +3 -3
+ NTP_4_2_7P58
+
+ sntp/sntp-opts.texi@1.59 +1 -1
+ NTP_4_2_7P58
+
+ sntp/sntp.1@1.59 +2 -2
+ NTP_4_2_7P58
+
+ sntp/sntp.html@1.59 +1 -1
+ NTP_4_2_7P58
+
+ util/ntp-keygen-opts.c@1.56 +2 -2
+ NTP_4_2_7P58
+
+ util/ntp-keygen-opts.h@1.56 +3 -3
+ NTP_4_2_7P58
+
+ util/ntp-keygen-opts.texi@1.59 +2 -2
+ NTP_4_2_7P58
+
+ util/ntp-keygen.1@1.59 +2 -2
+ NTP_4_2_7P58
+
+ChangeSet@1.2156.1.67, 2010-09-30 00:50:30-04:00, stenn@deacon.udel.edu
+ Clock select bugfix from Dave Mills.
+ [Bug 1554]: peer may stay selected as system peer after becoming
+ unreachable.
+
+ ChangeLog@1.622.1.29 +3 -0
+ Clock select bugfix from Dave Mills.
+ [Bug 155]: peer may stay selected as system peer after becoming
+ unreachable.
+
+ ntpd/ntp_proto.c@1.304 +10 -3
+ Clock select bugfix from Dave Mills.
+ [Bug 155]: peer may stay selected as system peer after becoming
+ unreachable.
+
+ChangeSet@1.2156.1.65, 2010-09-30 00:16:29-04:00, stenn@deacon.udel.edu
+ ChangeLog cleanup
+
+ ChangeLog@1.622.1.27 +1 -1
+ cleanup
+
+ChangeSet@1.2082.26.1, 2010-09-30 00:14:03-04:00, stenn@deacon.udel.edu
[Bug 1644]: cvo.sh should use lsb_release to identify linux distros.
- ChangeLog@1.646.3.1 +2 -0
+ ChangeLog@1.496.49.1 +2 -0
[Bug 1644]: cvo.sh should use lsb_release to identify linux distros.
- scripts/cvo.sh@1.3.1.1 +4 -3
+ scripts/cvo.sh@1.3.2.1 +4 -3
[Bug 1644]: cvo.sh should use lsb_release to identify linux distros.
-ChangeSet@1.2194.1.15, 2010-09-27 01:33:39-04:00, stenn@psp-deb1.ntp.org
+ChangeSet@1.2156.13.1, 2010-09-27 18:06:28+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1646] ntpd crashes with relative path to logfile.
+
+ ChangeLog@1.622.4.1 +1 -0
+ [Bug 1646] ntpd crashes with relative path to logfile.
+
+ ntpd/ntpd.c@1.116 +2 -5
+ [Bug 1646] ntpd crashes with relative path to logfile.
+
+ChangeSet@1.2156.12.1, 2010-09-27 10:11:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P57
+ TAG: NTP_4_2_7P57
+
+ ChangeLog@1.622.3.1 +1 -0
+ NTP_4_2_7P57
+
+ ntpd/ntpd-opts.c@1.60 +2 -2
+ NTP_4_2_7P57
+
+ ntpd/ntpd-opts.h@1.60 +3 -3
+ NTP_4_2_7P57
+
+ ntpd/ntpd-opts.texi@1.59 +2 -2
+ NTP_4_2_7P57
+
+ ntpd/ntpd.1@1.59 +2 -2
+ NTP_4_2_7P57
+
+ ntpdc/ntpdc-opts.c@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpdc/ntpdc-opts.h@1.58 +3 -3
+ NTP_4_2_7P57
+
+ ntpdc/ntpdc-opts.texi@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpdc/ntpdc.1@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpq/ntpq-opts.c@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpq/ntpq-opts.h@1.58 +3 -3
+ NTP_4_2_7P57
+
+ ntpq/ntpq-opts.texi@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpq/ntpq.1@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.58 +3 -3
+ NTP_4_2_7P57
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.58 +2 -2
+ NTP_4_2_7P57
+
+ ntpsnmpd/ntpsnmpd.1@1.58 +2 -2
+ NTP_4_2_7P57
+
+ packageinfo.sh@1.59 +1 -1
+ NTP_4_2_7P57
+
+ sntp/sntp-opts.c@1.58 +2 -2
+ NTP_4_2_7P57
+
+ sntp/sntp-opts.h@1.58 +3 -3
+ NTP_4_2_7P57
+
+ sntp/sntp-opts.texi@1.58 +1 -1
+ NTP_4_2_7P57
+
+ sntp/sntp.1@1.58 +2 -2
+ NTP_4_2_7P57
+
+ sntp/sntp.html@1.58 +1 -1
+ NTP_4_2_7P57
+
+ util/ntp-keygen-opts.c@1.55 +2 -2
+ NTP_4_2_7P57
+
+ util/ntp-keygen-opts.h@1.55 +3 -3
+ NTP_4_2_7P57
+
+ util/ntp-keygen-opts.texi@1.58 +2 -2
+ NTP_4_2_7P57
+
+ util/ntp-keygen.1@1.58 +2 -2
+ NTP_4_2_7P57
+
+ChangeSet@1.2082.22.15, 2010-09-27 01:33:39-04:00, stenn@psp-deb1.ntp.org
[Bug 1644]: cvo.sh doesn't handle some unstable/testing linux distros
- ChangeLog@1.646.1.11 +2 -0
+ ChangeLog@1.496.47.11 +2 -0
[Bug 1644]: cvo.sh doesn't handle some unstable/testing linux distros
- scripts/cvo.sh@1.4 +4 -3
+ scripts/cvo.sh@1.3.1.1 +4 -3
[Bug 1644]: cvo.sh doesn't handle some unstable/testing linux distros
-ChangeSet@1.2194.1.14, 2010-09-25 17:32:37-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.63, 2010-09-27 01:31:15-04:00, stenn@psp-deb1.ntp.org
+ [Bug 1644] from 4.2.6p3: cvo.sh doesn't handle some unstable/testing linux distros
+
+ ChangeLog@1.622.1.25 +2 -0
+ [Bug 1644] from 4.2.6p3: cvo.sh doesn't handle some unstable/testing linux distros
+
+ scripts/cvo.sh@1.4 +4 -3
+ [Bug 1644] from 4.2.6p3: cvo.sh doesn't handle some unstable/testing linux distros
+
+ChangeSet@1.2156.1.62, 2010-09-26 15:27:53-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/pic/flt1.gif@1.1 +202 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt1.gif
+
+ html/pic/flt1.gif@1.0 +0 -0
+
+ html/pic/flt2.gif@1.1 +71 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt2.gif
+
+ html/pic/flt2.gif@1.0 +0 -0
+
+ html/pic/flt5.gif@1.1 +237 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/flt5.gif
+
+ html/pic/flt5.gif@1.0 +0 -0
+
+ChangeSet@1.2156.1.61, 2010-09-26 15:23:27-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/filter.html@1.1 +30 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/filter.html
+
+ html/filter.html@1.0 +0 -0
+
+ChangeSet@1.2156.1.60, 2010-09-26 14:40:09-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.24 +1 -0
+ Documentation updates from Dave Mills
+
+ html/scripts/special.txt@1.3 +1 -0
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.7 +2 -5
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.59, 2010-09-25 21:45:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P56
+ TAG: NTP_4_2_7P56
+
+ ChangeLog@1.622.1.23 +1 -0
+ NTP_4_2_7P56
+
+ ntpd/ntpd-opts.c@1.59 +2 -2
+ NTP_4_2_7P56
+
+ ntpd/ntpd-opts.h@1.59 +3 -3
+ NTP_4_2_7P56
+
+ ntpd/ntpd-opts.texi@1.58 +2 -2
+ NTP_4_2_7P56
+
+ ntpd/ntpd.1@1.58 +2 -2
+ NTP_4_2_7P56
+
+ ntpdc/ntpdc-opts.c@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpdc/ntpdc-opts.h@1.57 +3 -3
+ NTP_4_2_7P56
+
+ ntpdc/ntpdc-opts.texi@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpdc/ntpdc.1@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpq/ntpq-opts.c@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpq/ntpq-opts.h@1.57 +3 -3
+ NTP_4_2_7P56
+
+ ntpq/ntpq-opts.texi@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpq/ntpq.1@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.57 +3 -3
+ NTP_4_2_7P56
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.57 +2 -2
+ NTP_4_2_7P56
+
+ ntpsnmpd/ntpsnmpd.1@1.57 +2 -2
+ NTP_4_2_7P56
+
+ packageinfo.sh@1.58 +1 -1
+ NTP_4_2_7P56
+
+ sntp/sntp-opts.c@1.57 +2 -2
+ NTP_4_2_7P56
+
+ sntp/sntp-opts.h@1.57 +3 -3
+ NTP_4_2_7P56
+
+ sntp/sntp-opts.texi@1.57 +1 -1
+ NTP_4_2_7P56
+
+ sntp/sntp.1@1.57 +2 -2
+ NTP_4_2_7P56
+
+ sntp/sntp.html@1.57 +1 -1
+ NTP_4_2_7P56
+
+ util/ntp-keygen-opts.c@1.54 +2 -2
+ NTP_4_2_7P56
+
+ util/ntp-keygen-opts.h@1.54 +3 -3
+ NTP_4_2_7P56
+
+ util/ntp-keygen-opts.texi@1.57 +2 -2
+ NTP_4_2_7P56
+
+ util/ntp-keygen.1@1.57 +2 -2
+ NTP_4_2_7P56
+
+ChangeSet@1.2082.22.14, 2010-09-25 17:32:37-04:00, stenn@deacon.udel.edu
typo fix
- ntpd/refclock_ripencc.c@1.9 +1 -1
+ ntpd/refclock_ripencc.c@1.7.1.2 +1 -1
typo fix
-ChangeSet@1.2194.1.13, 2010-09-25 21:14:57+00:00, stenn@psp-fb2.ntp.org
+ChangeSet@1.2082.22.13, 2010-09-25 21:14:57+00:00, stenn@psp-fb2.ntp.org
[Bug 1643]: Range-check the decoding of the RIPE-NCC status codes
- ChangeLog@1.646.1.10 +3 -0
+ ChangeLog@1.496.47.10 +3 -0
[Bug 1643]: Range-check the decoding of the RIPE-NCC status codes
- ntpd/refclock_ripencc.c@1.8 +11 -6
+ ntpd/refclock_ripencc.c@1.7.1.1 +11 -6
[Bug 1643]: Range-check the decoding of the RIPE-NCC status codes
-ChangeSet@1.2194.1.12, 2010-09-25 18:22:19+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.56, 2010-09-25 21:11:34+00:00, stenn@psp-fb2.ntp.org
+ [Bug 1643] from 4.2.6p3: Range-check the decoding of the RIPE-NCC status codes
+
+ ChangeLog@1.622.1.21 +2 -0
+ [Bug 1643] from 4.2.6p3: Range-check the decoding of the RIPE-NCC status codes
+
+ ntpd/refclock_ripencc.c@1.9 +8 -3
+ [Bug 1643] from 4.2.6p3: Range-check the decoding of the RIPE-NCC status codes
+
+ChangeSet@1.2082.22.12, 2010-09-25 18:22:19+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC2
TAG: NTP_4_2_6P3_RC2
- ChangeLog@1.646.1.9 +1 -0
+ ChangeLog@1.496.47.9 +1 -0
NTP_4_2_6P3_RC2
- ntpd/ntpd-opts.c@1.266 +2 -2
+ ntpd/ntpd-opts.c@1.248.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpd/ntpd-opts.h@1.266 +3 -3
+ ntpd/ntpd-opts.h@1.248.18.1 +3 -3
NTP_4_2_6P3_RC2
- ntpd/ntpd-opts.texi@1.264 +2 -2
+ ntpd/ntpd-opts.texi@1.246.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpd/ntpd.1@1.264 +2 -2
+ ntpd/ntpd.1@1.246.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpdc/ntpdc-opts.c@1.262 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpdc/ntpdc-opts.h@1.262 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.18.1 +3 -3
NTP_4_2_6P3_RC2
- ntpdc/ntpdc-opts.texi@1.261 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpdc/ntpdc.1@1.261 +2 -2
+ ntpdc/ntpdc.1@1.243.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpq/ntpq-opts.c@1.263 +2 -2
+ ntpq/ntpq-opts.c@1.245.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpq/ntpq-opts.h@1.263 +3 -3
+ ntpq/ntpq-opts.h@1.245.18.1 +3 -3
NTP_4_2_6P3_RC2
- ntpq/ntpq-opts.texi@1.262 +2 -2
+ ntpq/ntpq-opts.texi@1.244.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpq/ntpq.1@1.262 +2 -2
+ ntpq/ntpq.1@1.244.18.1 +2 -2
NTP_4_2_6P3_RC2
- ntpsnmpd/ntpsnmpd-opts.c@1.142 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.19.1 +2 -2
NTP_4_2_6P3_RC2
- ntpsnmpd/ntpsnmpd-opts.h@1.142 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.19.1 +3 -3
NTP_4_2_6P3_RC2
- ntpsnmpd/ntpsnmpd-opts.texi@1.142 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.19.1 +2 -2
NTP_4_2_6P3_RC2
- ntpsnmpd/ntpsnmpd.1@1.141 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.19.1 +2 -2
NTP_4_2_6P3_RC2
- packageinfo.sh@1.281 +1 -1
+ packageinfo.sh@1.255.20.1 +1 -1
NTP_4_2_6P3_RC2
- sntp/sntp-opts.c@1.135 +2 -2
+ sntp/sntp-opts.c@1.117.18.1 +2 -2
NTP_4_2_6P3_RC2
- sntp/sntp-opts.h@1.135 +3 -3
+ sntp/sntp-opts.h@1.117.18.1 +3 -3
NTP_4_2_6P3_RC2
- sntp/sntp-opts.texi@1.135 +1 -1
+ sntp/sntp-opts.texi@1.117.18.1 +1 -1
NTP_4_2_6P3_RC2
- sntp/sntp.1@1.135 +2 -2
+ sntp/sntp.1@1.117.18.1 +2 -2
NTP_4_2_6P3_RC2
- sntp/sntp.html@1.25 +1 -1
+ sntp/sntp.html@1.7.18.1 +1 -1
NTP_4_2_6P3_RC2
- util/ntp-keygen-opts.c@1.265 +2 -2
+ util/ntp-keygen-opts.c@1.247.18.1 +2 -2
NTP_4_2_6P3_RC2
- util/ntp-keygen-opts.h@1.265 +3 -3
+ util/ntp-keygen-opts.h@1.247.18.1 +3 -3
NTP_4_2_6P3_RC2
- util/ntp-keygen-opts.texi@1.264 +2 -2
+ util/ntp-keygen-opts.texi@1.246.18.1 +2 -2
NTP_4_2_6P3_RC2
- util/ntp-keygen.1@1.264 +2 -2
+ util/ntp-keygen.1@1.246.18.1 +2 -2
NTP_4_2_6P3_RC2
-ChangeSet@1.2183.1.1, 2010-09-22 20:14:51+02:00, jnperlin@hydra.localnet
+ChangeSet@1.2156.1.54, 2010-09-25 13:43:49-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.19 +1 -0
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.2 +11 -9
+ Documentation updates from Dave Mills
+
+ html/kern.html@1.19 +4 -3
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.24 +13 -6
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.53, 2010-09-25 13:39:59-04:00, stenn@deacon.udel.edu
+ Clock combining algorithm improvements from Dave Mills
+
+ ChangeLog@1.622.1.18 +1 -0
+ Clock combining algorithm improvements from Dave Mills
+
+ ntpd/ntp_proto.c@1.303 +7 -7
+ Clock combining algorithm improvements from Dave Mills
+
+ChangeSet@1.2156.1.52, 2010-09-25 07:44:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1642] ntpdsim can't find simulate block in config file.
+
+ ChangeLog@1.622.1.17 +1 -0
+ [Bug 1642] ntpdsim can't find simulate block in config file.
+
+ ntpd/ntp_config.c@1.265 +14 -13
+ Invert #ifdef SIM conditionalization of create_sim_script_info(),
+ create_sim_server(), and get_next_address().
+ Fix infinite loop in create_sim_script_info() caused by failing to
+ advance my_attr_val through script_queue before looping.
+
+ ntpd/ntp_scanner.c@1.37 +15 -6
+ Assumption that '=' is followed by a string (for setvar) is not
+ valid inside simulator configuration.
+ Assumption that 'server' is always followed by a string (not a
+ token) is not valid inside simulator config block.
+
+ ntpd/ntpd.c@1.115 +5 -1
+ Honor -d and -D in ntpdsim.
+
+ChangeSet@1.2082.24.1, 2010-09-22 20:14:51+02:00, jnperlin@hydra.localnet
[Bug 1571][Bug 1572] first clean-running version
- ntpd/refclock_nmea.c@1.49 +42 -27
+ ntpd/refclock_nmea.c@1.46.1.3 +42 -27
some more cleanup
- ntpd/refclock_nmea.c@1.48 +310 -70
+ ntpd/refclock_nmea.c@1.46.1.2 +310 -70
[Bug 1571][Bug 1572] first clean-running version
-ChangeSet@1.2194.1.11, 2010-09-21 16:29:51+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.51, 2010-09-22 10:10:38+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P55
+ TAG: NTP_4_2_7P55
+
+ ChangeLog@1.622.1.16 +1 -0
+ NTP_4_2_7P55
+
+ ntpd/ntpd-opts.c@1.58 +2 -2
+ NTP_4_2_7P55
+
+ ntpd/ntpd-opts.h@1.58 +3 -3
+ NTP_4_2_7P55
+
+ ntpd/ntpd-opts.texi@1.57 +2 -2
+ NTP_4_2_7P55
+
+ ntpd/ntpd.1@1.57 +2 -2
+ NTP_4_2_7P55
+
+ ntpdc/ntpdc-opts.c@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpdc/ntpdc-opts.h@1.56 +3 -3
+ NTP_4_2_7P55
+
+ ntpdc/ntpdc-opts.texi@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpdc/ntpdc.1@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpq/ntpq-opts.c@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpq/ntpq-opts.h@1.56 +3 -3
+ NTP_4_2_7P55
+
+ ntpq/ntpq-opts.texi@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpq/ntpq.1@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.56 +3 -3
+ NTP_4_2_7P55
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.56 +2 -2
+ NTP_4_2_7P55
+
+ ntpsnmpd/ntpsnmpd.1@1.56 +2 -2
+ NTP_4_2_7P55
+
+ packageinfo.sh@1.57 +1 -1
+ NTP_4_2_7P55
+
+ sntp/sntp-opts.c@1.56 +2 -2
+ NTP_4_2_7P55
+
+ sntp/sntp-opts.h@1.56 +3 -3
+ NTP_4_2_7P55
+
+ sntp/sntp-opts.texi@1.56 +1 -1
+ NTP_4_2_7P55
+
+ sntp/sntp.1@1.56 +2 -2
+ NTP_4_2_7P55
+
+ sntp/sntp.html@1.56 +1 -1
+ NTP_4_2_7P55
+
+ util/ntp-keygen-opts.c@1.53 +2 -2
+ NTP_4_2_7P55
+
+ util/ntp-keygen-opts.h@1.53 +3 -3
+ NTP_4_2_7P55
+
+ util/ntp-keygen-opts.texi@1.56 +2 -2
+ NTP_4_2_7P55
+
+ util/ntp-keygen.1@1.56 +2 -2
+ NTP_4_2_7P55
+
+ChangeSet@1.2156.1.50, 2010-09-22 01:22:45-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/pic/discipline.gif@1.1 +153 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/discipline.gif
+
+ html/pic/discipline.gif@1.0 +0 -0
+
+ChangeSet@1.2156.1.49, 2010-09-22 01:18:30-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ html/discipline.html@1.1 +45 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/discipline.html
+
+ html/discipline.html@1.0 +0 -0
+
+ChangeSet@1.2156.1.48, 2010-09-22 01:08:53-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.15 +1 -0
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.59 +2 -2
+ Documentation updates from Dave Mills
+
+ html/scripts/special.txt@1.2 +1 -0
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.6 +27 -91
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.47, 2010-09-21 17:10:47+00:00, davehart@shiny.ad.hartbrothers.com
+ correct Bison output of merged ntp_parser.y
+
+ ntpd/ntp_parser.c@1.63 +165 -155
+ correct Bison output of merged ntp_parser.y
+
+ChangeSet@1.2082.22.11, 2010-09-21 16:29:51+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1636] yyparse() segfault after denied filegen remote config.
- ChangeLog@1.646.1.8 +1 -0
+ ChangeLog@1.496.47.8 +1 -0
[Bug 1636] yyparse() segfault after denied filegen remote config.
- ntpd/ntp_parser.c@1.56 +149 -139
+ ntpd/ntp_parser.c@1.52.1.4 +149 -139
[Bug 1636] yyparse() segfault after denied filegen remote config.
- ntpd/ntp_parser.y@1.51 +13 -3
+ ntpd/ntp_parser.y@1.47.1.4 +13 -3
[Bug 1636] yyparse() segfault after denied filegen remote config.
-ChangeSet@1.2194.1.10, 2010-09-20 22:41:37+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.1.45, 2010-09-21 05:39:47+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P54
+ TAG: NTP_4_2_7P54
+
+ ChangeLog@1.622.1.13 +1 -0
+ NTP_4_2_7P54
+
+ ntpd/ntpd-opts.c@1.57 +2 -2
+ NTP_4_2_7P54
+
+ ntpd/ntpd-opts.h@1.57 +3 -3
+ NTP_4_2_7P54
+
+ ntpd/ntpd-opts.texi@1.56 +2 -2
+ NTP_4_2_7P54
+
+ ntpd/ntpd.1@1.56 +2 -2
+ NTP_4_2_7P54
+
+ ntpdc/ntpdc-opts.c@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpdc/ntpdc-opts.h@1.55 +3 -3
+ NTP_4_2_7P54
+
+ ntpdc/ntpdc-opts.texi@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpdc/ntpdc.1@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpq/ntpq-opts.c@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpq/ntpq-opts.h@1.55 +3 -3
+ NTP_4_2_7P54
+
+ ntpq/ntpq-opts.texi@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpq/ntpq.1@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.55 +3 -3
+ NTP_4_2_7P54
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.55 +2 -2
+ NTP_4_2_7P54
+
+ ntpsnmpd/ntpsnmpd.1@1.55 +2 -2
+ NTP_4_2_7P54
+
+ packageinfo.sh@1.56 +1 -1
+ NTP_4_2_7P54
+
+ sntp/sntp-opts.c@1.55 +2 -2
+ NTP_4_2_7P54
+
+ sntp/sntp-opts.h@1.55 +3 -3
+ NTP_4_2_7P54
+
+ sntp/sntp-opts.texi@1.55 +1 -1
+ NTP_4_2_7P54
+
+ sntp/sntp.1@1.55 +2 -2
+ NTP_4_2_7P54
+
+ sntp/sntp.html@1.55 +1 -1
+ NTP_4_2_7P54
+
+ util/ntp-keygen-opts.c@1.52 +2 -2
+ NTP_4_2_7P54
+
+ util/ntp-keygen-opts.h@1.52 +3 -3
+ NTP_4_2_7P54
+
+ util/ntp-keygen-opts.texi@1.55 +2 -2
+ NTP_4_2_7P54
+
+ util/ntp-keygen.1@1.55 +2 -2
+ NTP_4_2_7P54
+
+ChangeSet@1.2156.1.44, 2010-09-21 01:26:14-04:00, stenn@deacon.udel.edu
+ More initial convergence improvements from Dave Mills
+
+ ChangeLog@1.622.1.12 +1 -0
+ More initial convergence improvements from Dave Mills
+
+ ntpd/ntp_loopfilter.c@1.158 +4 -1
+ More initial convergence improvements from Dave Mills
+
+ChangeSet@1.2156.1.43, 2010-09-21 01:23:50-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.11 +1 -0
+ Documentation updates from Dave Mills
+
+ html/clock.html@1.2 +48 -15
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.58 +5 -5
+ Documentation updates from Dave Mills
+
+ html/monopt.html@1.34 +3 -3
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.5 +11 -18
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.42, 2010-09-20 23:22:02+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct skipped merge of generated file ntp_parser.c
+
+ ntpd/ntp_parser.c@1.61 +1174 -999
+ Bison output of merged ntp_parser.y
+
+ChangeSet@1.2082.22.10, 2010-09-20 22:41:37+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1635] "filegen ... enable" is not default.
- ChangeLog@1.646.1.7 +4 -0
+ ChangeLog@1.496.47.7 +4 -0
[Bug 1635] "filegen ... enable" is not default.
- ntpd/ntp_config.c@1.246 +5 -2
+ ntpd/ntp_config.c@1.241.1.5 +5 -2
[Bug 1635] "filegen ... enable" is not default.
ntpd/ntp_filegen.c@1.18 +5 -7
nonfunctional cleanup (whitespace, use estrdup()).
- ntpd/ntp_parser.c@1.55 +383 -386
+ ntpd/ntp_parser.c@1.52.1.3 +383 -386
Bison output for ntp_parser.y
- ntpd/ntp_parser.y@1.50 +4 -12
+ ntpd/ntp_parser.y@1.47.1.3 +4 -12
[Bug 1635] "filegen ... enable" is not default.
- ntpd/ntp_util.c@1.76 +2 -2
+ ntpd/ntp_util.c@1.75.1.1 +2 -2
whitespace
-ChangeSet@1.2194.1.9, 2010-09-18 05:42:06+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.40, 2010-09-20 04:27:28+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P53
+ TAG: NTP_4_2_7P53
+
+ ChangeLog@1.622.1.9 +1 -0
+ NTP_4_2_7P53
+
+ ntpd/ntpd-opts.c@1.56 +2 -2
+ NTP_4_2_7P53
+
+ ntpd/ntpd-opts.h@1.56 +3 -3
+ NTP_4_2_7P53
+
+ ntpd/ntpd-opts.texi@1.55 +2 -2
+ NTP_4_2_7P53
+
+ ntpd/ntpd.1@1.55 +2 -2
+ NTP_4_2_7P53
+
+ ntpdc/ntpdc-opts.c@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpdc/ntpdc-opts.h@1.54 +3 -3
+ NTP_4_2_7P53
+
+ ntpdc/ntpdc-opts.texi@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpdc/ntpdc.1@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpq/ntpq-opts.c@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpq/ntpq-opts.h@1.54 +3 -3
+ NTP_4_2_7P53
+
+ ntpq/ntpq-opts.texi@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpq/ntpq.1@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.54 +3 -3
+ NTP_4_2_7P53
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.54 +2 -2
+ NTP_4_2_7P53
+
+ ntpsnmpd/ntpsnmpd.1@1.54 +2 -2
+ NTP_4_2_7P53
+
+ packageinfo.sh@1.55 +1 -1
+ NTP_4_2_7P53
+
+ sntp/sntp-opts.c@1.54 +2 -2
+ NTP_4_2_7P53
+
+ sntp/sntp-opts.h@1.54 +3 -3
+ NTP_4_2_7P53
+
+ sntp/sntp-opts.texi@1.54 +1 -1
+ NTP_4_2_7P53
+
+ sntp/sntp.1@1.54 +2 -2
+ NTP_4_2_7P53
+
+ sntp/sntp.html@1.54 +1 -1
+ NTP_4_2_7P53
+
+ util/ntp-keygen-opts.c@1.51 +2 -2
+ NTP_4_2_7P53
+
+ util/ntp-keygen-opts.h@1.51 +3 -3
+ NTP_4_2_7P53
+
+ util/ntp-keygen-opts.texi@1.54 +2 -2
+ NTP_4_2_7P53
+
+ util/ntp-keygen.1@1.54 +2 -2
+ NTP_4_2_7P53
+
+ChangeSet@1.2156.1.39, 2010-09-19 23:41:49-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.622.1.8 +1 -0
+ Documentation updates from Dave Mills
+
+ html/release.html@1.39 +2 -1
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.4 +66 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.38, 2010-09-19 23:37:34-04:00, stenn@deacon.udel.edu
+ More initial convergence improvements from Dave Mills
+
+ ChangeLog@1.622.1.7 +1 -0
+ More initial convergence improvements from Dave Mills
+
+ ntpd/ntp_loopfilter.c@1.157 +15 -12
+ More initial convergence improvements from Dave Mills
+
+ChangeSet@1.2156.1.37, 2010-09-19 10:10:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P52
+ TAG: NTP_4_2_7P52
+
+ ChangeLog@1.622.1.6 +1 -0
+ NTP_4_2_7P52
+
+ ntpd/ntpd-opts.c@1.55 +2 -2
+ NTP_4_2_7P52
+
+ ntpd/ntpd-opts.h@1.55 +3 -3
+ NTP_4_2_7P52
+
+ ntpd/ntpd-opts.texi@1.54 +2 -2
+ NTP_4_2_7P52
+
+ ntpd/ntpd.1@1.54 +2 -2
+ NTP_4_2_7P52
+
+ ntpdc/ntpdc-opts.c@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpdc/ntpdc-opts.h@1.53 +3 -3
+ NTP_4_2_7P52
+
+ ntpdc/ntpdc-opts.texi@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpdc/ntpdc.1@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpq/ntpq-opts.c@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpq/ntpq-opts.h@1.53 +3 -3
+ NTP_4_2_7P52
+
+ ntpq/ntpq-opts.texi@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpq/ntpq.1@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.53 +3 -3
+ NTP_4_2_7P52
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.53 +2 -2
+ NTP_4_2_7P52
+
+ ntpsnmpd/ntpsnmpd.1@1.53 +2 -2
+ NTP_4_2_7P52
+
+ packageinfo.sh@1.54 +1 -1
+ NTP_4_2_7P52
+
+ sntp/sntp-opts.c@1.53 +2 -2
+ NTP_4_2_7P52
+
+ sntp/sntp-opts.h@1.53 +3 -3
+ NTP_4_2_7P52
+
+ sntp/sntp-opts.texi@1.53 +1 -1
+ NTP_4_2_7P52
+
+ sntp/sntp.1@1.53 +2 -2
+ NTP_4_2_7P52
+
+ sntp/sntp.html@1.53 +1 -1
+ NTP_4_2_7P52
+
+ util/ntp-keygen-opts.c@1.50 +2 -2
+ NTP_4_2_7P52
+
+ util/ntp-keygen-opts.h@1.50 +3 -3
+ NTP_4_2_7P52
+
+ util/ntp-keygen-opts.texi@1.53 +2 -2
+ NTP_4_2_7P52
+
+ util/ntp-keygen.1@1.53 +2 -2
+ NTP_4_2_7P52
+
+ChangeSet@1.2156.1.36, 2010-09-18 18:40:06-04:00, stenn@deacon.udel.edu
+ Initial convergence improvements from Dave Mills
+
+ ChangeLog@1.622.1.5 +1 -0
+ Initial convergence improvements from Dave Mills
+
+ ntpd/ntp_loopfilter.c@1.156 +52 -53
+ Initial convergence improvements from Dave Mills
+
+ChangeSet@1.2156.1.35, 2010-09-18 10:10:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P51
+ TAG: NTP_4_2_7P51
+
+ ChangeLog@1.622.1.4 +1 -0
+ NTP_4_2_7P51
+
+ ntpd/ntpd-opts.c@1.54 +2 -2
+ NTP_4_2_7P51
+
+ ntpd/ntpd-opts.h@1.54 +3 -3
+ NTP_4_2_7P51
+
+ ntpd/ntpd-opts.texi@1.53 +2 -2
+ NTP_4_2_7P51
+
+ ntpd/ntpd.1@1.53 +2 -2
+ NTP_4_2_7P51
+
+ ntpdc/ntpdc-opts.c@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpdc/ntpdc-opts.h@1.52 +3 -3
+ NTP_4_2_7P51
+
+ ntpdc/ntpdc-opts.texi@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpdc/ntpdc.1@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpq/ntpq-opts.c@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpq/ntpq-opts.h@1.52 +3 -3
+ NTP_4_2_7P51
+
+ ntpq/ntpq-opts.texi@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpq/ntpq.1@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.52 +3 -3
+ NTP_4_2_7P51
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.52 +2 -2
+ NTP_4_2_7P51
+
+ ntpsnmpd/ntpsnmpd.1@1.52 +2 -2
+ NTP_4_2_7P51
+
+ packageinfo.sh@1.53 +1 -1
+ NTP_4_2_7P51
+
+ sntp/sntp-opts.c@1.52 +2 -2
+ NTP_4_2_7P51
+
+ sntp/sntp-opts.h@1.52 +3 -3
+ NTP_4_2_7P51
+
+ sntp/sntp-opts.texi@1.52 +1 -1
+ NTP_4_2_7P51
+
+ sntp/sntp.1@1.52 +2 -2
+ NTP_4_2_7P51
+
+ sntp/sntp.html@1.52 +1 -1
+ NTP_4_2_7P51
+
+ util/ntp-keygen-opts.c@1.49 +2 -2
+ NTP_4_2_7P51
+
+ util/ntp-keygen-opts.h@1.49 +3 -3
+ NTP_4_2_7P51
+
+ util/ntp-keygen-opts.texi@1.52 +2 -2
+ NTP_4_2_7P51
+
+ util/ntp-keygen.1@1.52 +2 -2
+ NTP_4_2_7P51
+
+ChangeSet@1.2082.22.9, 2010-09-18 05:42:06+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_RC1
TAG: NTP_4_2_6P3_RC1
- ChangeLog@1.646.1.6 +1 -0
+ ChangeLog@1.496.47.6 +1 -0
NTP_4_2_6P3_RC1
- ntpd/ntpd-opts.c@1.265 +2 -2
+ ntpd/ntpd-opts.c@1.248.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpd/ntpd-opts.h@1.265 +3 -3
+ ntpd/ntpd-opts.h@1.248.17.1 +3 -3
NTP_4_2_6P3_RC1
- ntpd/ntpd-opts.texi@1.263 +2 -2
+ ntpd/ntpd-opts.texi@1.246.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpd/ntpd.1@1.263 +2 -2
+ ntpd/ntpd.1@1.246.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpdc/ntpdc-opts.c@1.261 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpdc/ntpdc-opts.h@1.261 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.17.1 +3 -3
NTP_4_2_6P3_RC1
- ntpdc/ntpdc-opts.texi@1.260 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpdc/ntpdc.1@1.260 +2 -2
+ ntpdc/ntpdc.1@1.243.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpq/ntpq-opts.c@1.262 +2 -2
+ ntpq/ntpq-opts.c@1.245.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpq/ntpq-opts.h@1.262 +3 -3
+ ntpq/ntpq-opts.h@1.245.17.1 +3 -3
NTP_4_2_6P3_RC1
- ntpq/ntpq-opts.texi@1.261 +2 -2
+ ntpq/ntpq-opts.texi@1.244.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpq/ntpq.1@1.261 +2 -2
+ ntpq/ntpq.1@1.244.17.1 +2 -2
NTP_4_2_6P3_RC1
- ntpsnmpd/ntpsnmpd-opts.c@1.141 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.18.1 +2 -2
NTP_4_2_6P3_RC1
- ntpsnmpd/ntpsnmpd-opts.h@1.141 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.18.1 +3 -3
NTP_4_2_6P3_RC1
- ntpsnmpd/ntpsnmpd-opts.texi@1.141 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.18.1 +2 -2
NTP_4_2_6P3_RC1
- ntpsnmpd/ntpsnmpd.1@1.140 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.18.1 +2 -2
NTP_4_2_6P3_RC1
- packageinfo.sh@1.280 +1 -1
+ packageinfo.sh@1.255.19.2 +1 -1
NTP_4_2_6P3_RC1
- sntp/sntp-opts.c@1.134 +2 -2
+ sntp/sntp-opts.c@1.117.17.1 +2 -2
NTP_4_2_6P3_RC1
- sntp/sntp-opts.h@1.134 +3 -3
+ sntp/sntp-opts.h@1.117.17.1 +3 -3
NTP_4_2_6P3_RC1
- sntp/sntp-opts.texi@1.134 +1 -1
+ sntp/sntp-opts.texi@1.117.17.1 +1 -1
NTP_4_2_6P3_RC1
- sntp/sntp.1@1.134 +2 -2
+ sntp/sntp.1@1.117.17.1 +2 -2
NTP_4_2_6P3_RC1
- sntp/sntp.html@1.24 +1 -1
+ sntp/sntp.html@1.7.17.1 +1 -1
NTP_4_2_6P3_RC1
- util/ntp-keygen-opts.c@1.264 +2 -2
+ util/ntp-keygen-opts.c@1.247.17.1 +2 -2
NTP_4_2_6P3_RC1
- util/ntp-keygen-opts.h@1.264 +3 -3
+ util/ntp-keygen-opts.h@1.247.17.1 +3 -3
NTP_4_2_6P3_RC1
- util/ntp-keygen-opts.texi@1.263 +2 -2
+ util/ntp-keygen-opts.texi@1.246.17.1 +2 -2
NTP_4_2_6P3_RC1
- util/ntp-keygen.1@1.263 +2 -2
+ util/ntp-keygen.1@1.246.17.1 +2 -2
NTP_4_2_6P3_RC1
-ChangeSet@1.2194.1.8, 2010-09-18 01:25:26-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.22.8, 2010-09-18 01:25:26-04:00, stenn@deacon.udel.edu
4.2.6p3-RC1
- packageinfo.sh@1.279 +1 -1
+ packageinfo.sh@1.255.19.1 +1 -1
4.2.6p3-RC1
-ChangeSet@1.2194.1.7, 2010-09-17 04:20:03+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.22.7, 2010-09-17 04:20:03+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1344] ntpd on Windows exits without logging cause.
- ChangeLog@1.646.1.5 +4 -0
+ ChangeLog@1.496.47.5 +4 -0
[Bug 1344] ntpd on Windows exits without logging cause.
- ports/winnt/ntpd/nt_clockstuff.c@1.41 +4 -2
+ ports/winnt/ntpd/nt_clockstuff.c@1.38.1.3 +4 -2
[Bug 1344] ntpd on Windows exits without logging cause.
-ChangeSet@1.2194.1.6, 2010-09-11 06:50:03+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.32, 2010-09-16 19:32:11+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
+ [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
+
+
+ ChangeLog@1.622.1.1 +2 -0
+ [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
+ [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
+
+
+ configure.ac@1.483.1.7 +34 -36
+ [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
+ [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
+
+
+ sntp/configure.ac@1.36 +27 -13
+ [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
+ [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
+
+
+ChangeSet@1.2156.1.31, 2010-09-16 06:21:34+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P50
+ TAG: NTP_4_2_7P50
+
+ ChangeLog@1.622 +1 -0
+ NTP_4_2_7P50
+
+ ntpd/ntpd-opts.c@1.53 +2 -2
+ NTP_4_2_7P50
+
+ ntpd/ntpd-opts.h@1.53 +3 -3
+ NTP_4_2_7P50
+
+ ntpd/ntpd-opts.texi@1.52 +2 -2
+ NTP_4_2_7P50
+
+ ntpd/ntpd.1@1.52 +2 -2
+ NTP_4_2_7P50
+
+ ntpdc/ntpdc-opts.c@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpdc/ntpdc-opts.h@1.51 +3 -3
+ NTP_4_2_7P50
+
+ ntpdc/ntpdc-opts.texi@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpdc/ntpdc.1@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpq/ntpq-opts.c@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpq/ntpq-opts.h@1.51 +3 -3
+ NTP_4_2_7P50
+
+ ntpq/ntpq-opts.texi@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpq/ntpq.1@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.51 +3 -3
+ NTP_4_2_7P50
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.51 +2 -2
+ NTP_4_2_7P50
+
+ ntpsnmpd/ntpsnmpd.1@1.51 +2 -2
+ NTP_4_2_7P50
+
+ packageinfo.sh@1.52 +1 -1
+ NTP_4_2_7P50
+
+ sntp/sntp-opts.c@1.51 +2 -2
+ NTP_4_2_7P50
+
+ sntp/sntp-opts.h@1.51 +3 -3
+ NTP_4_2_7P50
+
+ sntp/sntp-opts.texi@1.51 +1 -1
+ NTP_4_2_7P50
+
+ sntp/sntp.1@1.51 +2 -2
+ NTP_4_2_7P50
+
+ sntp/sntp.html@1.51 +1 -1
+ NTP_4_2_7P50
+
+ util/ntp-keygen-opts.c@1.48 +2 -2
+ NTP_4_2_7P50
+
+ util/ntp-keygen-opts.h@1.48 +3 -3
+ NTP_4_2_7P50
+
+ util/ntp-keygen-opts.texi@1.51 +2 -2
+ NTP_4_2_7P50
+
+ util/ntp-keygen.1@1.51 +2 -2
+ NTP_4_2_7P50
+
+ChangeSet@1.2156.1.30, 2010-09-16 01:59:29-04:00, stenn@deacon.udel.edu
+ Clean up NTP_LIB_M
+
+ ChangeLog@1.621 +1 -0
+ Clean up NTP_LIB_M
+
+ m4/ntp_lib_m.m4@1.3 +2 -0
+ Clean up NTP_LIB_M
+
+ChangeSet@1.2156.1.29, 2010-09-16 01:57:24-04:00, stenn@deacon.udel.edu
+ [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris
+
+ configure.ac@1.483.1.6 +14 -5
+ [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris
+
+ChangeSet@1.2156.1.28, 2010-09-15 23:49:40-04:00, stenn@deacon.udel.edu
+ [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris
+
+ ChangeLog@1.620 +1 -0
+ [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris
+
+ configure.ac@1.483.1.5 +7 -4
+ [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris
+
+ChangeSet@1.2156.1.27, 2010-09-13 05:32:06+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P49
+ TAG: NTP_4_2_7P49
+
+ ChangeLog@1.619 +1 -0
+ NTP_4_2_7P49
+
+ ntpd/ntpd-opts.c@1.52 +2 -2
+ NTP_4_2_7P49
+
+ ntpd/ntpd-opts.h@1.52 +3 -3
+ NTP_4_2_7P49
+
+ ntpd/ntpd-opts.texi@1.51 +2 -2
+ NTP_4_2_7P49
+
+ ntpd/ntpd.1@1.51 +2 -2
+ NTP_4_2_7P49
+
+ ntpdc/ntpdc-opts.c@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpdc/ntpdc-opts.h@1.50 +3 -3
+ NTP_4_2_7P49
+
+ ntpdc/ntpdc-opts.texi@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpdc/ntpdc.1@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpq/ntpq-opts.c@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpq/ntpq-opts.h@1.50 +3 -3
+ NTP_4_2_7P49
+
+ ntpq/ntpq-opts.texi@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpq/ntpq.1@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.50 +3 -3
+ NTP_4_2_7P49
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.50 +2 -2
+ NTP_4_2_7P49
+
+ ntpsnmpd/ntpsnmpd.1@1.50 +2 -2
+ NTP_4_2_7P49
+
+ packageinfo.sh@1.51 +1 -1
+ NTP_4_2_7P49
+
+ sntp/sntp-opts.c@1.50 +2 -2
+ NTP_4_2_7P49
+
+ sntp/sntp-opts.h@1.50 +3 -3
+ NTP_4_2_7P49
+
+ sntp/sntp-opts.texi@1.50 +1 -1
+ NTP_4_2_7P49
+
+ sntp/sntp.1@1.50 +2 -2
+ NTP_4_2_7P49
+
+ sntp/sntp.html@1.50 +1 -1
+ NTP_4_2_7P49
+
+ util/ntp-keygen-opts.c@1.47 +2 -2
+ NTP_4_2_7P49
+
+ util/ntp-keygen-opts.h@1.47 +3 -3
+ NTP_4_2_7P49
+
+ util/ntp-keygen-opts.texi@1.50 +2 -2
+ NTP_4_2_7P49
+
+ util/ntp-keygen.1@1.50 +2 -2
+ NTP_4_2_7P49
+
+ChangeSet@1.2156.1.26, 2010-09-13 01:21:03-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.618 +1 -0
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.32 +5 -5
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.63 +3 -3
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.3 +3 -3
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.51 +3 -3
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.21 +11 -58
+ Documentation updates from Dave Mills
+
+ html/miscopt.html@1.57 +9 -14
+ Documentation updates from Dave Mills
+
+ html/ntp_conf.html@1.5 +2 -2
+ Documentation updates from Dave Mills
+
+ html/ntpd.html@1.53 +0 -1
+ Documentation updates from Dave Mills
+
+ html/pps.html@1.22 +3 -2
+ Documentation updates from Dave Mills
+
+ html/quick.html@1.22 +3 -3
+ Documentation updates from Dave Mills
+
+ html/rate.html@1.8 +0 -2
+ Documentation updates from Dave Mills
+
+ html/release.html@1.38 +3 -3
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.3 +10 -2
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.25, 2010-09-12 10:10:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P48
+ TAG: NTP_4_2_7P48
+
+ ChangeLog@1.617 +1 -0
+ NTP_4_2_7P48
+
+ ntpd/ntpd-opts.c@1.51 +2 -2
+ NTP_4_2_7P48
+
+ ntpd/ntpd-opts.h@1.51 +3 -3
+ NTP_4_2_7P48
+
+ ntpd/ntpd-opts.texi@1.50 +2 -2
+ NTP_4_2_7P48
+
+ ntpd/ntpd.1@1.50 +2 -2
+ NTP_4_2_7P48
+
+ ntpdc/ntpdc-opts.c@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpdc/ntpdc-opts.h@1.49 +3 -3
+ NTP_4_2_7P48
+
+ ntpdc/ntpdc-opts.texi@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpdc/ntpdc.1@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpq/ntpq-opts.c@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpq/ntpq-opts.h@1.49 +3 -3
+ NTP_4_2_7P48
+
+ ntpq/ntpq-opts.texi@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpq/ntpq.1@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.49 +3 -3
+ NTP_4_2_7P48
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.49 +2 -2
+ NTP_4_2_7P48
+
+ ntpsnmpd/ntpsnmpd.1@1.49 +2 -2
+ NTP_4_2_7P48
+
+ packageinfo.sh@1.50 +1 -1
+ NTP_4_2_7P48
+
+ sntp/sntp-opts.c@1.49 +2 -2
+ NTP_4_2_7P48
+
+ sntp/sntp-opts.h@1.49 +3 -3
+ NTP_4_2_7P48
+
+ sntp/sntp-opts.texi@1.49 +1 -1
+ NTP_4_2_7P48
+
+ sntp/sntp.1@1.49 +2 -2
+ NTP_4_2_7P48
+
+ sntp/sntp.html@1.49 +1 -1
+ NTP_4_2_7P48
+
+ util/ntp-keygen-opts.c@1.46 +2 -2
+ NTP_4_2_7P48
+
+ util/ntp-keygen-opts.h@1.46 +3 -3
+ NTP_4_2_7P48
+
+ util/ntp-keygen-opts.texi@1.49 +2 -2
+ NTP_4_2_7P48
+
+ util/ntp-keygen.1@1.49 +2 -2
+ NTP_4_2_7P48
+
+ChangeSet@1.2156.1.24, 2010-09-11 17:53:59-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ ChangeLog@1.616 +1 -0
+ Documentation updates from Dave Mills
+
+ html/accopt.html@1.38 +5 -5
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.2 +10 -8
+ Documentation updates from Dave Mills
+
+ html/authopt.html@1.62 +1 -2
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.2 +3 -2
+ Documentation updates from Dave Mills
+
+ html/index.html@1.43 +8 -35
+ Documentation updates from Dave Mills
+
+ html/monopt.html@1.33 +2 -2
+ Documentation updates from Dave Mills
+
+ html/rate.html@1.7 +10 -2
+ Documentation updates from Dave Mills
+
+ html/scripts/miscopt.txt@1.6 +0 -1
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.2 +16 -7
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.10.2, 2010-09-11 10:16:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P47
+ TAG: NTP_4_2_7P47
+
+ ChangeLog@1.614 +1 -0
+ NTP_4_2_7P47
+
+ ntpd/ntpd-opts.c@1.50 +2 -2
+ NTP_4_2_7P47
+
+ ntpd/ntpd-opts.h@1.50 +3 -3
+ NTP_4_2_7P47
+
+ ntpd/ntpd-opts.texi@1.49 +2 -2
+ NTP_4_2_7P47
+
+ ntpd/ntpd.1@1.49 +2 -2
+ NTP_4_2_7P47
+
+ ntpdc/ntpdc-opts.c@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpdc/ntpdc-opts.h@1.48 +3 -3
+ NTP_4_2_7P47
+
+ ntpdc/ntpdc-opts.texi@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpdc/ntpdc.1@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpq/ntpq-opts.c@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpq/ntpq-opts.h@1.48 +3 -3
+ NTP_4_2_7P47
+
+ ntpq/ntpq-opts.texi@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpq/ntpq.1@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.48 +3 -3
+ NTP_4_2_7P47
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.48 +2 -2
+ NTP_4_2_7P47
+
+ ntpsnmpd/ntpsnmpd.1@1.48 +2 -2
+ NTP_4_2_7P47
+
+ packageinfo.sh@1.49 +1 -1
+ NTP_4_2_7P47
+
+ sntp/sntp-opts.c@1.48 +2 -2
+ NTP_4_2_7P47
+
+ sntp/sntp-opts.h@1.48 +3 -3
+ NTP_4_2_7P47
+
+ sntp/sntp-opts.texi@1.48 +1 -1
+ NTP_4_2_7P47
+
+ sntp/sntp.1@1.48 +2 -2
+ NTP_4_2_7P47
+
+ sntp/sntp.html@1.48 +1 -1
+ NTP_4_2_7P47
+
+ util/ntp-keygen-opts.c@1.45 +5 -5
+ NTP_4_2_7P47
+
+ util/ntp-keygen-opts.h@1.45 +4 -4
+ NTP_4_2_7P47
+
+ util/ntp-keygen-opts.texi@1.48 +17 -17
+ NTP_4_2_7P47
+
+ util/ntp-keygen.1@1.48 +2 -2
+ NTP_4_2_7P47
+
+ChangeSet@1.2082.22.6, 2010-09-11 06:50:03+00:00, stenn@deacon.udel.edu
NTP_4_2_6P3_BETA1
TAG: NTP_4_2_6P3_BETA1
- ChangeLog@1.646.1.4 +1 -0
+ ChangeLog@1.496.47.4 +1 -0
NTP_4_2_6P3_BETA1
- ntpd/ntpd-opts.c@1.264 +2 -2
+ ntpd/ntpd-opts.c@1.248.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpd/ntpd-opts.h@1.264 +3 -3
+ ntpd/ntpd-opts.h@1.248.16.1 +3 -3
NTP_4_2_6P3_BETA1
- ntpd/ntpd-opts.texi@1.262 +2 -2
+ ntpd/ntpd-opts.texi@1.246.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpd/ntpd.1@1.262 +2 -2
+ ntpd/ntpd.1@1.246.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpdc/ntpdc-opts.c@1.260 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpdc/ntpdc-opts.h@1.260 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.16.1 +3 -3
NTP_4_2_6P3_BETA1
- ntpdc/ntpdc-opts.texi@1.259 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpdc/ntpdc.1@1.259 +2 -2
+ ntpdc/ntpdc.1@1.243.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpq/ntpq-opts.c@1.261 +2 -2
+ ntpq/ntpq-opts.c@1.245.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpq/ntpq-opts.h@1.261 +3 -3
+ ntpq/ntpq-opts.h@1.245.16.1 +3 -3
NTP_4_2_6P3_BETA1
- ntpq/ntpq-opts.texi@1.260 +2 -2
+ ntpq/ntpq-opts.texi@1.244.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpq/ntpq.1@1.260 +2 -2
+ ntpq/ntpq.1@1.244.16.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpsnmpd/ntpsnmpd-opts.c@1.140 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.17.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpsnmpd/ntpsnmpd-opts.h@1.140 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.17.1 +3 -3
NTP_4_2_6P3_BETA1
- ntpsnmpd/ntpsnmpd-opts.texi@1.140 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.17.1 +2 -2
NTP_4_2_6P3_BETA1
- ntpsnmpd/ntpsnmpd.1@1.139 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.17.1 +2 -2
NTP_4_2_6P3_BETA1
- packageinfo.sh@1.278 +3 -3
+ packageinfo.sh@1.255.18.1 +3 -3
NTP_4_2_6P3_BETA1
- sntp/sntp-opts.c@1.133 +2 -2
+ sntp/sntp-opts.c@1.117.16.1 +2 -2
NTP_4_2_6P3_BETA1
- sntp/sntp-opts.h@1.133 +3 -3
+ sntp/sntp-opts.h@1.117.16.1 +3 -3
NTP_4_2_6P3_BETA1
- sntp/sntp-opts.texi@1.133 +1 -1
+ sntp/sntp-opts.texi@1.117.16.1 +1 -1
NTP_4_2_6P3_BETA1
- sntp/sntp.1@1.133 +2 -2
+ sntp/sntp.1@1.117.16.1 +2 -2
NTP_4_2_6P3_BETA1
- sntp/sntp.html@1.23 +1 -1
+ sntp/sntp.html@1.7.16.1 +1 -1
NTP_4_2_6P3_BETA1
- util/ntp-keygen-opts.c@1.263 +2 -2
+ util/ntp-keygen-opts.c@1.247.16.1 +2 -2
NTP_4_2_6P3_BETA1
- util/ntp-keygen-opts.h@1.263 +3 -3
+ util/ntp-keygen-opts.h@1.247.16.1 +3 -3
NTP_4_2_6P3_BETA1
- util/ntp-keygen-opts.texi@1.262 +2 -2
+ util/ntp-keygen-opts.texi@1.246.16.1 +2 -2
NTP_4_2_6P3_BETA1
- util/ntp-keygen.1@1.262 +2 -2
+ util/ntp-keygen.1@1.246.16.1 +2 -2
NTP_4_2_6P3_BETA1
-ChangeSet@1.2194.1.5, 2010-09-11 02:14:22-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.22.5, 2010-09-11 02:14:22-04:00, stenn@deacon.udel.edu
temporary mirror trigger update
BitKeeper/triggers/2mirrors@1.7 +2 -1
temporary mirror trigger update
-ChangeSet@1.2194.1.4, 2010-08-18 11:26:41+02:00, linus@beam.lund.zozs.se
+ChangeSet@1.2156.1.21, 2010-09-11 01:56:46-04:00, stenn@deacon.udel.edu
+ Documentation updates from Dave Mills
+
+ BitKeeper/deleted/.del-description.jpg~1683404a7f1dcae@1.2 +0 -0
+ Delete: html/description_files/description.jpg
+
+ BitKeeper/deleted/.del-gadget.html~155e509d29e44428@1.5 +0 -0
+ Delete: html/gadget.html
+
+ ChangeLog@1.613 +1 -0
+ Documentation updates from Dave Mills
+
+ html/access.html@1.1 +50 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/access.html
+
+ html/access.html@1.0 +0 -0
+
+ html/accopt.html@1.37 +65 -184
+ Documentation updates from Dave Mills
+
+ html/assoc.html@1.31 +83 -94
+ Documentation updates from Dave Mills
+
+ html/audio.html@1.22 +178 -179
+ Documentation updates from Dave Mills
+
+ html/authentic.html@1.1 +54 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/authentic.html
+
+ html/authentic.html@1.0 +0 -0
+
+ html/authopt.html@1.61 +68 -473
+ Documentation updates from Dave Mills
+
+ html/autokey.html@1.1 +206 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/autokey.html
+
+ html/autokey.html@1.0 +0 -0
+
+ html/bugs.html@1.6 +28 -30
+ Documentation updates from Dave Mills
+
+ html/build.html@1.24 +55 -57
+ Documentation updates from Dave Mills
+
+ html/clock.html@1.1 +31 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/clock.html
+
+ html/clock.html@1.0 +0 -0
+
+ html/clockopt.html@1.23 +55 -67
+ Documentation updates from Dave Mills
+
+ html/comdex.html@1.3 +24 -29
+ Documentation updates from Dave Mills
+
+ html/confopt.html@1.50 +13 -37
+ Documentation updates from Dave Mills
+
+ html/copyright.html@1.51 +75 -79
+ Documentation updates from Dave Mills
+
+ html/debug.html@1.30 +90 -94
+ Documentation updates from Dave Mills
+
+ html/decode.html@1.15 +628 -806
+ Documentation updates from Dave Mills
+
+ html/discover.html@1.1 +72 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/discover.html
+
+ html/discover.html@1.0 +0 -0
+
+ html/drivers/driver1.html@1.17 +48 -48
+ Documentation updates from Dave Mills
+
+ html/drivers/driver10.html@1.13 +51 -51
+ Documentation updates from Dave Mills
+
+ html/drivers/driver11.html@1.13 +60 -60
+ Documentation updates from Dave Mills
+
+ html/drivers/driver12.html@1.12 +47 -47
+ Documentation updates from Dave Mills
+
+ html/drivers/driver18.html@1.17 +80 -80
+ Documentation updates from Dave Mills
+
+ html/drivers/driver19.html@1.12 +53 -53
+ Documentation updates from Dave Mills
+
+ html/drivers/driver22.html@1.19 +81 -93
+ Documentation updates from Dave Mills
+
+ html/drivers/driver3.html@1.12 +52 -52
+ Documentation updates from Dave Mills
+
+ html/drivers/driver36.html@1.33 +148 -145
+ Documentation updates from Dave Mills
+
+ html/drivers/driver4.html@1.16 +39 -71
+ Documentation updates from Dave Mills
+
+ html/drivers/driver6.html@1.26 +79 -74
+ Documentation updates from Dave Mills
+
+ html/drivers/driver7.html@1.28 +123 -129
+ Documentation updates from Dave Mills
+
+ html/extern.html@1.16 +46 -48
+ Documentation updates from Dave Mills
+
+ html/hints.html@1.18 +20 -22
+ Documentation updates from Dave Mills
+
+ html/howto.html@1.23 +106 -114
+ Documentation updates from Dave Mills
+
+ html/huffpuff.html@1.1 +20 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/huffpuff.html
+
+ html/huffpuff.html@1.0 +0 -0
+
+ html/index.html@1.42 +97 -89
+ Documentation updates from Dave Mills
+
+ html/kern.html@1.18 +29 -31
+ Documentation updates from Dave Mills
+
+ html/kernpps.html@1.3 +46 -47
+ Documentation updates from Dave Mills
+
+ html/keygen.html@1.20 +103 -174
+ Documentation updates from Dave Mills
+
+ html/leap.html@1.1 +24 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/leap.html
+
+ html/leap.html@1.0 +0 -0
+
+ html/miscopt.html@1.56 +164 -167
+ Documentation updates from Dave Mills
+
+ html/monopt.html@1.32 +486 -487
+ Documentation updates from Dave Mills
+
+ html/msyslog.html@1.10 +127 -123
+ Documentation updates from Dave Mills
+
+ html/ntp_conf.html@1.4 +171 -171
+ Documentation updates from Dave Mills
+
+ html/ntpd.html@1.52 +166 -223
+ Documentation updates from Dave Mills
+
+ html/ntpdate.html@1.19 +67 -69
+ Documentation updates from Dave Mills
+
+ html/ntpdc.html@1.32 +170 -213
+ Documentation updates from Dave Mills
+
+ html/ntpdsim.html@1.8 +61 -63
+ Documentation updates from Dave Mills
+
+ html/ntpdsim_new.html@1.5 +55 -55
+ Documentation updates from Dave Mills
+
+ html/ntpq.html@1.41 +639 -655
+ Documentation updates from Dave Mills
+
+ html/ntptime.html@1.17 +44 -46
+ Documentation updates from Dave Mills
+
+ html/ntptrace.html@1.15 +41 -43
+ Documentation updates from Dave Mills
+
+ html/orphan.html@1.1 +36 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/orphan.html
+
+ html/orphan.html@1.0 +0 -0
+
+ html/pic/fig_3_1.gif@1.1 +528 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/fig_3_1.gif
+
+ html/pic/fig_3_1.gif@1.0 +0 -0
+
+ html/pic/group.gif@1.1 +63 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/pic/group.gif
+
+ html/pic/group.gif@1.0 +0 -0
+
+ html/pps.html@1.21 +44 -47
+ Documentation updates from Dave Mills
+
+ html/prefer.html@1.23 +61 -112
+ Documentation updates from Dave Mills
+
+ html/quick.html@1.21 +43 -44
+ Documentation updates from Dave Mills
+
+ html/rate.html@1.6 +53 -69
+ Documentation updates from Dave Mills
+
+ html/rdebug.html@1.17 +29 -29
+ Documentation updates from Dave Mills
+
+ html/refclock.html@1.35 +89 -88
+ Documentation updates from Dave Mills
+
+ html/release.html@1.37 +66 -59
+ Documentation updates from Dave Mills
+
+ html/scripts/accopt.txt@1.2 +4 -4
+ Documentation updates from Dave Mills
+
+ html/scripts/audio.txt@1.2 +6 -6
+ Documentation updates from Dave Mills
+
+ html/scripts/authopt.txt@1.3 +9 -9
+ Documentation updates from Dave Mills
+
+ html/scripts/clockopt.txt@1.2 +3 -3
+ Documentation updates from Dave Mills
+
+ html/scripts/command.txt@1.3 +9 -11
+ Documentation updates from Dave Mills
+
+ html/scripts/config.txt@1.3 +5 -7
+ Documentation updates from Dave Mills
+
+ html/scripts/confopt.txt@1.3 +11 -11
+ Documentation updates from Dave Mills
+
+ html/scripts/external.txt@1.3 +17 -15
+ Documentation updates from Dave Mills
+
+ html/scripts/hand.txt@1.1 +11 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/scripts/hand.txt
+
+ html/scripts/hand.txt@1.0 +0 -0
+
+ html/scripts/install.txt@1.3 +10 -12
+ Documentation updates from Dave Mills
+
+ html/scripts/manual.txt@1.3 +13 -13
+ Documentation updates from Dave Mills
+
+ html/scripts/misc.txt@1.2 +9 -9
+ Documentation updates from Dave Mills
+
+ html/scripts/miscopt.txt@1.5 +19 -19
+ Documentation updates from Dave Mills
+
+ html/scripts/monopt.txt@1.2 +4 -4
+ Documentation updates from Dave Mills
+
+ html/scripts/refclock.txt@1.2 +6 -6
+ Documentation updates from Dave Mills
+
+ html/scripts/special.txt@1.1 +11 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/scripts/special.txt
+
+ html/scripts/special.txt@1.0 +0 -0
+
+ html/sitemap.html@1.4 +31 -34
+ Documentation updates from Dave Mills
+
+ html/sntp.html@1.7 +52 -54
+ Documentation updates from Dave Mills
+
+ html/tickadj.html@1.16 +43 -44
+ Documentation updates from Dave Mills
+
+ html/warp.html@1.1 +51 -0
+ BitKeeper file /deacon/backroom/ntp-dev/html/warp.html
+
+ html/warp.html@1.0 +0 -0
+
+ html/xleave.html@1.5 +28 -39
+ Documentation updates from Dave Mills
+
+ChangeSet@1.2156.1.20, 2010-09-11 01:16:34-04:00, stenn@deacon.udel.edu
+ [Bug 1616] refclock_acts.c: if (pp->leap == 2) is always false.
+
+ ChangeLog@1.612 +1 -0
+ [Bug 1616] refclock_acts.c: if (pp->leap == 2) is always false.
+
+ ntpd/refclock_acts.c@1.39 +1 -1
+ [Bug 1616] refclock_acts.c: if (pp->leap == 2) is always false.
+
+ChangeSet@1.2156.1.19, 2010-09-11 01:11:46-04:00, stenn@pogo.udel.edu
+ [Bug 1620] [Backward Incompatible] "discard minimum" value should be in seconds, not log2 seconds
+
+ ChangeLog@1.611 +2 -0
+ [Bug 1620] [Backward Incompatible] "discard minimum" value should be in seconds, not log2 seconds
+
+ include/ntp.h@1.181 +1 -1
+ [Bug 1620] [Backward Incompatible] "discard minimum" value should be in seconds, not log2 seconds
+
+ ntpd/ntp_monitor.c@1.36 +1 -1
+ [Bug 1620] [Backward Incompatible] "discard minimum" value should be in seconds, not log2 seconds
+
+ ntpd/ntp_proto.c@1.302 +4 -6
+ [Bug 1620] [Backward Incompatible] "discard minimum" value should be in seconds, not log2 seconds
+
+ChangeSet@1.2156.3.15, 2010-09-10 10:12:03+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P46
+ TAG: NTP_4_2_7P46
+
+ ChangeLog@1.607.8.5 +1 -0
+ NTP_4_2_7P46
+
+ ntpd/ntpd-opts.c@1.49 +2 -2
+ NTP_4_2_7P46
+
+ ntpd/ntpd-opts.h@1.49 +3 -3
+ NTP_4_2_7P46
+
+ ntpd/ntpd-opts.texi@1.48 +2 -2
+ NTP_4_2_7P46
+
+ ntpd/ntpd.1@1.48 +2 -2
+ NTP_4_2_7P46
+
+ ntpdc/ntpdc-opts.c@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpdc/ntpdc-opts.h@1.47 +3 -3
+ NTP_4_2_7P46
+
+ ntpdc/ntpdc-opts.texi@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpdc/ntpdc.1@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpq/ntpq-opts.c@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpq/ntpq-opts.h@1.47 +3 -3
+ NTP_4_2_7P46
+
+ ntpq/ntpq-opts.texi@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpq/ntpq.1@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.47 +3 -3
+ NTP_4_2_7P46
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.47 +2 -2
+ NTP_4_2_7P46
+
+ ntpsnmpd/ntpsnmpd.1@1.47 +2 -2
+ NTP_4_2_7P46
+
+ packageinfo.sh@1.48 +1 -1
+ NTP_4_2_7P46
+
+ sntp/sntp-opts.c@1.47 +2 -2
+ NTP_4_2_7P46
+
+ sntp/sntp-opts.h@1.47 +3 -3
+ NTP_4_2_7P46
+
+ sntp/sntp-opts.texi@1.47 +1 -1
+ NTP_4_2_7P46
+
+ sntp/sntp.1@1.47 +2 -2
+ NTP_4_2_7P46
+
+ sntp/sntp.html@1.47 +1 -1
+ NTP_4_2_7P46
+
+ util/ntp-keygen-opts.c@1.41.1.6 +2 -2
+ NTP_4_2_7P46
+
+ util/ntp-keygen-opts.h@1.41.1.6 +3 -3
+ NTP_4_2_7P46
+
+ util/ntp-keygen-opts.texi@1.47 +2 -2
+ NTP_4_2_7P46
+
+ util/ntp-keygen.1@1.47 +2 -2
+ NTP_4_2_7P46
+
+ChangeSet@1.2156.3.14, 2010-09-10 00:26:46-04:00, stenn@deacon.udel.edu
+ Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for NTP_LIB_M
+
+ ChangeLog@1.607.8.4 +1 -0
+ Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for NTP_LIB_M
+
+ m4/ntp_lib_m.m4@1.2 +1 -1
+ Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for NTP_LIB_M
+
+ChangeSet@1.2156.3.13, 2010-09-05 10:11:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P45
+ TAG: NTP_4_2_7P45
+
+ ChangeLog@1.607.8.3 +1 -0
+ NTP_4_2_7P45
+
+ ntpd/ntpd-opts.c@1.48 +2 -2
+ NTP_4_2_7P45
+
+ ntpd/ntpd-opts.h@1.48 +3 -3
+ NTP_4_2_7P45
+
+ ntpd/ntpd-opts.texi@1.47 +2 -2
+ NTP_4_2_7P45
+
+ ntpd/ntpd.1@1.47 +2 -2
+ NTP_4_2_7P45
+
+ ntpdc/ntpdc-opts.c@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpdc/ntpdc-opts.h@1.46 +3 -3
+ NTP_4_2_7P45
+
+ ntpdc/ntpdc-opts.texi@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpdc/ntpdc.1@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpq/ntpq-opts.c@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpq/ntpq-opts.h@1.46 +3 -3
+ NTP_4_2_7P45
+
+ ntpq/ntpq-opts.texi@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpq/ntpq.1@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.46 +3 -3
+ NTP_4_2_7P45
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.46 +2 -2
+ NTP_4_2_7P45
+
+ ntpsnmpd/ntpsnmpd.1@1.46 +2 -2
+ NTP_4_2_7P45
+
+ packageinfo.sh@1.47 +1 -1
+ NTP_4_2_7P45
+
+ sntp/sntp-opts.c@1.46 +2 -2
+ NTP_4_2_7P45
+
+ sntp/sntp-opts.h@1.46 +3 -3
+ NTP_4_2_7P45
+
+ sntp/sntp-opts.texi@1.46 +1 -1
+ NTP_4_2_7P45
+
+ sntp/sntp.1@1.46 +2 -2
+ NTP_4_2_7P45
+
+ sntp/sntp.html@1.46 +1 -1
+ NTP_4_2_7P45
+
+ util/ntp-keygen-opts.c@1.41.1.5 +2 -2
+ NTP_4_2_7P45
+
+ util/ntp-keygen-opts.h@1.41.1.5 +3 -3
+ NTP_4_2_7P45
+
+ util/ntp-keygen-opts.texi@1.46 +2 -2
+ NTP_4_2_7P45
+
+ util/ntp-keygen.1@1.46 +2 -2
+ NTP_4_2_7P45
+
+ChangeSet@1.2156.3.12, 2010-09-05 02:41:15-04:00, stenn@deacon.udel.edu
+ [Bug 1578] Consistently use -lm when needed
+
+ ChangeLog@1.607.8.2 +1 -0
+ [Bug 1578] Consistently use -lm when needed
+
+ clockstuff/Makefile.am@1.10 +1 -2
+ [Bug 1578] Consistently use -lm when needed
+
+ configure.ac@1.483.2.1 +1 -0
+ [Bug 1578] Consistently use -lm when needed
+
+ m4/ntp_lib_m.m4@1.1 +14 -0
+ BitKeeper file /deacon/backroom/ntp-dev-1578/m4/ntp_lib_m.m4
+
+ m4/ntp_lib_m.m4@1.0 +0 -0
+
+ ntpd/Makefile.am@1.93 +2 -7
+ [Bug 1578] Consistently use -lm when needed
+
+ ntpdate/Makefile.am@1.24 +1 -1
+ [Bug 1578] Consistently use -lm when needed
+
+ ntpq/Makefile.am@1.49 +1 -1
+ [Bug 1578] Consistently use -lm when needed
+
+ sntp/Makefile.am@1.34 +1 -1
+ [Bug 1578] Consistently use -lm when needed
+
+ sntp/configure.ac@1.35 +1 -1
+ [Bug 1578] Consistently use -lm when needed
+
+ util/Makefile.am@1.50 +1 -1
+ [Bug 1578] Consistently use -lm when needed
+
+ChangeSet@1.2156.3.11, 2010-08-27 10:09:33+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P44
+ TAG: NTP_4_2_7P44
+
+ ChangeLog@1.607.8.1 +1 -0
+ NTP_4_2_7P44
+
+ ntpd/ntpd-opts.c@1.47 +2 -2
+ NTP_4_2_7P44
+
+ ntpd/ntpd-opts.h@1.47 +3 -3
+ NTP_4_2_7P44
+
+ ntpd/ntpd-opts.texi@1.46 +2 -2
+ NTP_4_2_7P44
+
+ ntpd/ntpd.1@1.46 +2 -2
+ NTP_4_2_7P44
+
+ ntpdc/ntpdc-opts.c@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpdc/ntpdc-opts.h@1.45 +3 -3
+ NTP_4_2_7P44
+
+ ntpdc/ntpdc-opts.texi@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpdc/ntpdc.1@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpq/ntpq-opts.c@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpq/ntpq-opts.h@1.45 +3 -3
+ NTP_4_2_7P44
+
+ ntpq/ntpq-opts.texi@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpq/ntpq.1@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.45 +3 -3
+ NTP_4_2_7P44
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.45 +2 -2
+ NTP_4_2_7P44
+
+ ntpsnmpd/ntpsnmpd.1@1.45 +2 -2
+ NTP_4_2_7P44
+
+ packageinfo.sh@1.46 +1 -1
+ NTP_4_2_7P44
+
+ sntp/sntp-opts.c@1.45 +2 -2
+ NTP_4_2_7P44
+
+ sntp/sntp-opts.h@1.45 +3 -3
+ NTP_4_2_7P44
+
+ sntp/sntp-opts.texi@1.45 +1 -1
+ NTP_4_2_7P44
+
+ sntp/sntp.1@1.45 +2 -2
+ NTP_4_2_7P44
+
+ sntp/sntp.html@1.45 +1 -1
+ NTP_4_2_7P44
+
+ util/ntp-keygen-opts.c@1.41.1.4 +2 -2
+ NTP_4_2_7P44
+
+ util/ntp-keygen-opts.h@1.41.1.4 +3 -3
+ NTP_4_2_7P44
+
+ util/ntp-keygen-opts.texi@1.45 +2 -2
+ NTP_4_2_7P44
+
+ util/ntp-keygen.1@1.45 +2 -2
+ NTP_4_2_7P44
+
+ChangeSet@1.2156.8.5, 2010-08-26 09:34:12+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P43
+ TAG: NTP_4_2_7P43
+
+ ChangeLog@1.607.7.3 +1 -0
+ NTP_4_2_7P43
+
+ ntpd/ntpd-opts.c@1.46 +2 -2
+ NTP_4_2_7P43
+
+ ntpd/ntpd-opts.h@1.46 +3 -3
+ NTP_4_2_7P43
+
+ ntpd/ntpd-opts.texi@1.45 +2 -2
+ NTP_4_2_7P43
+
+ ntpd/ntpd.1@1.45 +2 -2
+ NTP_4_2_7P43
+
+ ntpdc/ntpdc-opts.c@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpdc/ntpdc-opts.h@1.44 +3 -3
+ NTP_4_2_7P43
+
+ ntpdc/ntpdc-opts.texi@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpdc/ntpdc.1@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpq/ntpq-opts.c@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpq/ntpq-opts.h@1.44 +3 -3
+ NTP_4_2_7P43
+
+ ntpq/ntpq-opts.texi@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpq/ntpq.1@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.44 +3 -3
+ NTP_4_2_7P43
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.44 +2 -2
+ NTP_4_2_7P43
+
+ ntpsnmpd/ntpsnmpd.1@1.44 +2 -2
+ NTP_4_2_7P43
+
+ packageinfo.sh@1.45 +1 -1
+ NTP_4_2_7P43
+
+ sntp/sntp-opts.c@1.44 +2 -2
+ NTP_4_2_7P43
+
+ sntp/sntp-opts.h@1.44 +3 -3
+ NTP_4_2_7P43
+
+ sntp/sntp-opts.texi@1.44 +1 -1
+ NTP_4_2_7P43
+
+ sntp/sntp.1@1.44 +2 -2
+ NTP_4_2_7P43
+
+ sntp/sntp.html@1.44 +1 -1
+ NTP_4_2_7P43
+
+ util/ntp-keygen-opts.c@1.41.1.3 +2 -2
+ NTP_4_2_7P43
+
+ util/ntp-keygen-opts.h@1.41.1.3 +3 -3
+ NTP_4_2_7P43
+
+ util/ntp-keygen-opts.texi@1.44 +2 -2
+ NTP_4_2_7P43
+
+ util/ntp-keygen.1@1.44 +2 -2
+ NTP_4_2_7P43
+
+ChangeSet@1.2225, 2010-08-21 12:15:45+02:00, linus@beam.lund.zozs.se
+ Modified tests to redirect stderr themselves, instead of relying on an external variable in sntp/log.c
+
+ tests/sntp/logFile.cpp@1.4 +16 -3
+ Modified tests to redirect stderr themselves, instead of relying on an external variable in sntp/log.c
+
+ChangeSet@1.2156.9.1, 2010-08-21 12:05:58+02:00, linus@beam.lund.zozs.se
+ Reverted sntp/log.c refactoring.
+
+ sntp/log.c@1.15 +1 -2
+ Reverted sntp/log.c refactoring.
+
+ChangeSet@1.2156.8.3, 2010-08-19 06:16:56+00:00, stenn@psp-fb2.ntp.org
+ [Bug 1602] Refactor some of the sntp/ directory to facililtate testing
+
+ ChangeLog@1.607.7.2 +1 -0
+ [Bug 1602] Refactor some of the sntp/ directory to facililtate testing
+
+ChangeSet@1.2220, 2010-08-18 07:46:34-04:00, karlsson@psp-deb1.ntp.org
+ Fixed a testing bug, where key type was not null terminated
+
+ tests/sntp/crypto.cpp@1.2 +6 -6
+ Fixed a testing bug, where key type was not null terminated
+
+ChangeSet@1.2156.8.1, 2010-08-18 10:09:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P42
+ TAG: NTP_4_2_7P42
+
+ ChangeLog@1.607.7.1 +1 -0
+ NTP_4_2_7P42
+
+ ntpd/ntpd-opts.c@1.45 +2 -2
+ NTP_4_2_7P42
+
+ ntpd/ntpd-opts.h@1.45 +3 -3
+ NTP_4_2_7P42
+
+ ntpd/ntpd-opts.texi@1.44 +2 -2
+ NTP_4_2_7P42
+
+ ntpd/ntpd.1@1.44 +2 -2
+ NTP_4_2_7P42
+
+ ntpdc/ntpdc-opts.c@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpdc/ntpdc-opts.h@1.43 +3 -3
+ NTP_4_2_7P42
+
+ ntpdc/ntpdc-opts.texi@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpdc/ntpdc.1@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpq/ntpq-opts.c@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpq/ntpq-opts.h@1.43 +3 -3
+ NTP_4_2_7P42
+
+ ntpq/ntpq-opts.texi@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpq/ntpq.1@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.43 +3 -3
+ NTP_4_2_7P42
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.43 +2 -2
+ NTP_4_2_7P42
+
+ ntpsnmpd/ntpsnmpd.1@1.43 +2 -2
+ NTP_4_2_7P42
+
+ packageinfo.sh@1.44 +1 -1
+ NTP_4_2_7P42
+
+ sntp/sntp-opts.c@1.43 +2 -2
+ NTP_4_2_7P42
+
+ sntp/sntp-opts.h@1.43 +3 -3
+ NTP_4_2_7P42
+
+ sntp/sntp-opts.texi@1.43 +1 -1
+ NTP_4_2_7P42
+
+ sntp/sntp.1@1.43 +2 -2
+ NTP_4_2_7P42
+
+ sntp/sntp.html@1.43 +1 -1
+ NTP_4_2_7P42
+
+ util/ntp-keygen-opts.c@1.41.1.2 +2 -2
+ NTP_4_2_7P42
+
+ util/ntp-keygen-opts.h@1.41.1.2 +3 -3
+ NTP_4_2_7P42
+
+ util/ntp-keygen-opts.texi@1.43 +2 -2
+ NTP_4_2_7P42
+
+ util/ntp-keygen.1@1.43 +2 -2
+ NTP_4_2_7P42
+
+ChangeSet@1.2082.22.4, 2010-08-18 11:26:41+02:00, linus@beam.lund.zozs.se
[BUG 1573] Miscalculation of offset in sntp.
- ChangeLog@1.646.1.3 +1 -0
+ ChangeLog@1.496.47.3 +1 -0
[BUG 1573] Miscalculation of offset in sntp.
- sntp/main.c@1.26 +2 -2
+ sntp/main.c@1.24.1.2 +2 -2
[BUG 1573] Miscalculation of offset in sntp.
-ChangeSet@1.2194.2.1, 2010-07-31 21:59:50+02:00, linus@beam.lund.zozs.se
+ChangeSet@1.2218, 2010-08-13 17:51:26+02:00, linus@beam.lund.zozs.se
+ Added test for debug_msg()
+
+ tests/sntp/data/log-expected-debug@1.1 +4 -0
+ Added test for debug_msg()
+
+ tests/sntp/data/log-expected-debug@1.0 +0 -0
+
+ tests/sntp/logFile.cpp@1.3 +25 -6
+ Added test for debug_msg()
+
+ tests/sntp/packetProcessing.cpp@1.3 +0 -17
+ Moved common code to superclass
+
+ tests/sntp/sntptest.h@1.4 +26 -0
+ Moved common code to superclass
+
+ChangeSet@1.2156.6.11, 2010-08-13 16:54:32+02:00, linus@beam.lund.zozs.se
+ Minor refactoring to allow redirection of debug messages from unit tests.
+
+ sntp/log.c@1.14 +2 -1
+ Minor refactoring to allow redirection of debug messages from unit tests.
+
+ChangeSet@1.2216, 2010-08-12 20:26:04+02:00, linus@beam.lund.zozs.se
+ Added tests for debug functions in utilities.c
+ Minor cleanups.
+
+ tests/sntp/data/debug-input-lfp-bin@1.1 +3 -0
+ Added tests for debug functions
+
+ tests/sntp/data/debug-input-lfp-bin@1.0 +0 -0
+
+ tests/sntp/data/debug-input-lfp-dec@1.1 +3 -0
+ Added tests for debug functions
+
+ tests/sntp/data/debug-input-lfp-dec@1.0 +0 -0
+
+ tests/sntp/data/debug-input-lfp-hex@1.1 +3 -0
+ Added tests for debug functions
+
+ tests/sntp/data/debug-input-lfp-hex@1.0 +0 -0
+
+ tests/sntp/data/debug-input-pkt@1.1 +8 -0
+ Added tests for debug functions
+
+ tests/sntp/data/debug-input-pkt@1.0 +0 -0
+
+ tests/sntp/fileHandlingTest.h@1.3 +11 -0
+ Added include guard, and moved common code to base class
+
+ tests/sntp/sntptest.h@1.3 +5 -0
+ Added include guard
+
+ tests/sntp/utilities.cpp@1.3 +103 -0
+ Added tests for debug functions in utilities.c
+
+ tests/tests_main.h@1.5 +5 -0
+ Added include guard.
+
+ChangeSet@1.2215, 2010-08-11 23:39:59+02:00, linus@beam.lund.zozs.se
+ Added more tests in different areas.
+
+ tests/sntp/data/key-test-invalid-hex@1.1 +2 -0
+ Added extra tests for reading of key files.
+
+ tests/sntp/data/key-test-invalid-hex@1.0 +0 -0
+
+ tests/sntp/keyFile.cpp@1.2 +18 -0
+ Added extra tests for reading of key files.
+
+ tests/sntp/networking.cpp@1.6 +30 -0
+ Added tests when preferring IPv4/IPv6 addresses in name resolution.
+
+ tests/sntp/utilities.cpp@1.2 +27 -0
+ Added tests for set_li_vn_mode()
+
+ChangeSet@1.2156.7.3, 2010-08-11 01:40:34+02:00, linus@beam.lund.zozs.se
+ [Bug 1597] packet processing ignores RATE KoD packets.
+
+ ChangeLog@1.607.4.3 +1 -1
+ [Bug 1597] packet processing ignores RATE KoD packets.
+
+ChangeSet@1.2156.7.2, 2010-08-11 01:34:52+02:00, linus@beam.lund.zozs.se
+ [Bug 1597] packet processing ignores RATE KoD packets, because of a bug in string comparision.
+
+ ChangeLog@1.607.4.2 +7 -2
+ [Bug 1597] packet processing ignores RATE KoD packets, because of a bug in string comparision.
+
+ChangeSet@1.2156.5.4, 2010-08-11 01:31:43+02:00, linus@beam.lund.zozs.se
+ [Bug 1595] empty last line in key file causes duplicate key to be added
+
+ ChangeLog@1.607.5.1 +6 -1
+ [Bug 1595] empty last line in key file causes duplicate key to be added
+
+ChangeSet@1.2212, 2010-08-10 18:30:22+02:00, linus@beam.lund.zozs.se
+ Creates the output directory before running the tests.
+
+ tests/sntp/Makefile.am@1.12 +4 -1
+ Some cleanup.
+
+ tests/sntp/test-driver@1.3 +3 -0
+ Create the output directory before running the tests.
+
+ChangeSet@1.2211, 2010-08-10 13:14:24+02:00, linus@beam.lund.zozs.se
+ Modified tests to use the new prototype of process_pkt()
+ Added tests for reply/response check moved to process_pkt() in refactoring.
+
+ tests/sntp/packetProcessing.cpp@1.2 +57 -18
+ Modified tests to use the new prototype of process_pkt()
+ Added tests for reply/response check moved to process_pkt() in refactoring.
+
+ChangeSet@1.2156.6.10, 2010-08-10 13:04:29+02:00, linus@beam.lund.zozs.se
+ Modified evaluation order to accept NULL as argument to spkt.
+
+ sntp/networking.c@1.37.1.2 +1 -1
+ Modified evaluation order to accept NULL as argument to spkt.
+
+ChangeSet@1.2156.6.9, 2010-08-10 12:09:28+02:00, linus@beam.lund.zozs.se
+ Moved check for valid response to process_pkt() to simplify testing.
+
+ sntp/networking.c@1.37.1.1 +21 -19
+ Moved check for valid response to process_pkt() to simplify testing.
+
+ sntp/networking.h@1.18.1.2 +1 -1
+ Moved check for valid response to process_pkt() to simplify testing.
+
+ChangeSet@1.2208, 2010-08-09 17:15:14+02:00, linus@beam.lund.zozs.se
+ Moved packet processing tests to a new unit.
+ Added tests for resolve_hosts()
+
+ tests/sntp/Makefile.am@1.11 +1 -0
+ Moved packet processing tests to a separate unit.
+
+ tests/sntp/logFile.cpp@1.2 +0 -2
+ Removed multiple calls to cleanup_log to prevent segfault.
+
+ tests/sntp/networking.cpp@1.5 +97 -271
+ Moved packet processing tests to a new unit.
+ Added tests for resolve_hosts()
+
+ tests/sntp/packetProcessing.cpp@1.1 +312 -0
+ Moved packet processing tests to a new unit.
+
+ tests/sntp/packetProcessing.cpp@1.0 +0 -0
+
+ChangeSet@1.2207, 2010-08-09 12:53:37+02:00, linus@beam.lund.zozs.se
+ Added tests for log file.
+ Added test for packets signed with SHA1.
+
+ tests/sntp/Makefile.am@1.10 +1 -0
+ Added tests for log file.
+
+ tests/sntp/data/log-expected-log@1.1 +4 -0
+ Added test for log file.
+
+ tests/sntp/data/log-expected-log@1.0 +0 -0
+
+ tests/sntp/logFile.cpp@1.1 +39 -0
+ Added test for log file.
+
+ tests/sntp/logFile.cpp@1.0 +0 -0
+
+ tests/sntp/networking.cpp@1.4 +29 -3
+ Added test for correct packet signed with SHA1.
+
+ChangeSet@1.2206, 2010-08-05 22:59:12+02:00, linus@beam.lund.zozs.se
+ Added tests for authentication
+
+ tests/sntp/Makefile.am@1.9 +1 -0
+ Added tests for authentication
+
+ tests/sntp/crypto.cpp@1.1 +125 -0
+ Added tests for authentication
+
+ tests/sntp/crypto.cpp@1.0 +0 -0
+
+ChangeSet@1.2205, 2010-08-05 15:10:49+02:00, linus@beam.lund.zozs.se
+ Added tests for handle_packet() function.
+
+ tests/sntp/packetHandling.cpp@1.3 +82 -0
+ Added tests for handle_packet() function.
+
+ChangeSet@1.2204, 2010-08-04 23:40:16+02:00, linus@beam.lund.zozs.se
+ Added test for negative offset calculation.
+
+ tests/sntp/packetHandling.cpp@1.2 +41 -0
+ Added test for negative offset calculation.
+
+ChangeSet@1.2203, 2010-08-04 00:37:25+02:00, linus@beam.lund.zozs.se
+ Renamed main class for tests.
+ Added tests for packet generation and time offset calculations.
+
+ tests/libntp/Makefile.am@1.21 +1 -1
+ Renamed main file for tests.
+
+ tests/libntp/libntptest.h@1.3 +1 -1
+ Renamed main file for tests.
+
+ tests/sntp/Makefile.am@1.8 +3 -1
+ Renamed main file for tests.
+ Added tests for packet generation.
+
+ tests/sntp/packetHandling.cpp@1.1 +124 -0
+ Added new tests for packet generation and time offset calculations.
+
+ tests/sntp/packetHandling.cpp@1.0 +0 -0
+
+ tests/sntp/sntptest.h@1.2 +1 -1
+ Renamed main file for tests.
+
+ tests/tests_main.cpp@1.5 +1 -1
+ Renamed main class for tests.
+
+ tests/tests_main.cpp@1.4 +0 -0
+ Rename: tests/main.cpp -> tests/tests_main.cpp
+
+ tests/tests_main.h@1.4 +0 -0
+ Rename: tests/main.h -> tests/tests_main.h
+
+ChangeSet@1.2156.6.8, 2010-08-03 23:44:21+02:00, linus@beam.lund.zozs.se
+ Moved time dependent code out of the offset calculations.
+
+ sntp/main.c@1.32 +3 -2
+ Moved time dependent code out of the offset calculations.
+
+ChangeSet@1.2156.6.7, 2010-08-03 15:10:22+02:00, linus@beam.lund.zozs.se
+ Moved definition of progname and debug to sntp.c
+
+ sntp/main.c@1.31 +0 -3
+ Moved definition of progname and debug to sntp.c
+
+ sntp/sntp.c@1.2 +3 -0
+ Moved definition of progname and debug to sntp.c
+
+ChangeSet@1.2156.6.6, 2010-08-03 13:26:19+02:00, linus@beam.lund.zozs.se
+ Moved the time offset calculations to a separate function.
+
+ sntp/main.c@1.30 +72 -56
+ Moved the time offset calculations to a separate function.
+
+ sntp/main.h@1.3 +4 -0
+ Added prototypes for the new functions.
+
+ChangeSet@1.2156.6.5, 2010-08-02 20:36:02+02:00, linus@beam.lund.zozs.se
+ Refactoring of packet parsing for unit testing.
+ Moved packet parsing to a new function.
+
+ sntp/main.c@1.29 +142 -126
+ Refactoring of packet parsing for unit testing.
+ Moved packet parsing to a new function.
+
+ChangeSet@1.2156.6.4, 2010-08-02 17:53:13+02:00, linus@beam.lund.zozs.se
+ Factored out packet generation to a new function.
+
+ sntp/main.c@1.28 +32 -19
+ Factored out packet generation to a new function.
+
+ sntp/main.h@1.2 +7 -3
+ Factored out packet generation to a new function.
+
+ChangeSet@1.2156.6.3, 2010-08-02 14:20:12+02:00, linus@beam.lund.zozs.se
+ Moved main() function to a new file to make unit testing easier.
+
+ sntp/Makefile.am@1.33 +2 -0
+ Moved main() function to a new file to make unit testing easier.
+
+ sntp/main.c@1.27 +1 -26
+ Moved main() function to a new file to make unit testing easier.
+
+ sntp/main.h@1.1 +21 -0
+ Moved main() function to a new file to make unit testing easier.
+
+ sntp/main.h@1.0 +0 -0
+
+ sntp/sntp.c@1.1 +10 -0
+ Moved main() function to a new file to make unit testing easier.
+
+ sntp/sntp.c@1.0 +0 -0
+
+ChangeSet@1.2199, 2010-07-31 23:13:39+02:00, linus@beam.lund.zozs.se
+ * Added more tests for packet processing.
+ * Refactored the authenticated tests.
+
+ tests/sntp/networking.cpp@1.3 +18 -37
+ Added more tests for packet processing, and refactored the tests using authenticated packets.
+
+ChangeSet@1.2198, 2010-07-31 22:49:46+02:00, linus@beam.lund.zozs.se
+ Added more tests for packet processing.
+
+ tests/sntp/networking.cpp@1.2 +142 -20
+ Added more tests.
+
+ChangeSet@1.2082.23.1, 2010-07-31 21:59:50+02:00, linus@beam.lund.zozs.se
[BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.
- ChangeLog@1.646.2.1 +5 -0
+ ChangeLog@1.496.48.1 +5 -0
[BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.
- sntp/networking.c@1.36 +3 -3
+ sntp/networking.c@1.29.1.7 +3 -3
[BUG 1597] packet processing ignores RATE KoD packets because of a bug in string comparison.
-ChangeSet@1.2194.1.2, 2010-07-28 18:30:17+02:00, linus@beam.lund.zozs.se
+ChangeSet@1.2196, 2010-07-30 22:02:44+02:00, linus@beam.lund.zozs.se
+ Added tests for packet processing.
+
+ tests/sntp/Makefile.am@1.7 +2 -0
+ Added networking tests.
+
+ tests/sntp/networking.cpp@1.1 +186 -0
+ Added tests for packet processing.
+
+ tests/sntp/networking.cpp@1.0 +0 -0
+
+ChangeSet@1.2156.6.2, 2010-07-30 13:14:50+02:00, linus@beam.lund.zozs.se
+ Added prototype to header
+
+ sntp/networking.h@1.18.1.1 +2 -0
+ Added prototype to header
+
+ChangeSet@1.2156.6.1, 2010-07-30 12:37:05+02:00, linus@beam.lund.zozs.se
+ Made process_pkt() a public function to ease testing.
+
+ sntp/networking.c@1.37 +1 -1
+ Made process_pkt() a public function to ease testing.
+
+ChangeSet@1.2192, 2010-07-30 10:41:21+02:00, linus@beam.lund.zozs.se
+ Moved file handling code from test to superclass
+
+ tests/sntp/fileHandlingTest.h@1.2 +29 -0
+ Moved file handling code from test to superclass
+
+ tests/sntp/kodFile.cpp@1.6 +0 -27
+ Moved file handling code from test to superclass
+
+ChangeSet@1.2191, 2010-07-28 22:59:08+02:00, linus@beam.lund.zozs.se
+ Added tests for some utilities functions.
+
+ tests/sntp/Makefile.am@1.6 +4 -2
+ Added tests for some utilities functions.
+
+ tests/sntp/utilities.cpp@1.1 +66 -0
+ Added tests for some utilities functions.
+
+ tests/sntp/utilities.cpp@1.0 +0 -0
+
+ChangeSet@1.2082.22.2, 2010-07-28 18:30:17+02:00, linus@beam.lund.zozs.se
[Bug 1595] empty last line in key file causes duplicate key to be added
- ChangeLog@1.646.1.1 +4 -0
+ ChangeLog@1.496.47.1 +4 -0
[Bug 1595] empty last line in key file causes duplicate key to be added
-ChangeSet@1.2194.1.1, 2010-07-28 18:18:55+02:00, linus@beam.lund.zozs.se
+ChangeSet@1.2082.22.1, 2010-07-28 18:18:55+02:00, linus@beam.lund.zozs.se
[Bug 1595] empty last line in key file causes duplicate key to be added
- sntp/crypto.c@1.13 +3 -1
+ sntp/crypto.c@1.10.1.3 +3 -1
[Bug 1595] empty last line in key file causes duplicate key to be added
-ChangeSet@1.2195, 2010-07-10 18:11:54+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2189, 2010-07-28 13:38:35+02:00, linus@beam.lund.zozs.se
+ Added tests for reading of key file.
+
+ tests/sntp/Makefile.am@1.5 +4 -1
+ Added tests for reading of key file.
+
+ tests/sntp/data/key-test-ascii@1.1 +2 -0
+ Input files for key file tests
+
+ tests/sntp/data/key-test-ascii@1.0 +0 -0
+
+ tests/sntp/data/key-test-comments@1.1 +3 -0
+ Input files for key file test
+
+ tests/sntp/data/key-test-comments@1.0 +0 -0
+
+ tests/sntp/data/key-test-empty@1.1 +0 -0
+ Input file for key file test
+
+ tests/sntp/data/key-test-empty@1.0 +0 -0
+
+ tests/sntp/data/key-test-hex@1.1 +3 -0
+ Input files for key file test
+
+ tests/sntp/data/key-test-hex@1.0 +0 -0
+
+ tests/sntp/fileHandlingTest.h@1.1 +24 -0
+ Moved file handling code to superclass
+
+ tests/sntp/fileHandlingTest.h@1.0 +0 -0
+
+ tests/sntp/keyFile.cpp@1.1 +112 -0
+ Added tests for key file reading.
+
+ tests/sntp/keyFile.cpp@1.0 +0 -0
+
+ tests/sntp/kodFile.cpp@1.5 +2 -22
+ Moved file handling code to superclass.
+
+ChangeSet@1.2156.5.1, 2010-07-28 05:48:23+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P41
+ TAG: NTP_4_2_7P41
+
+ ChangeLog@1.607.3.1 +1 -0
+ NTP_4_2_7P41
+
+ ntpd/ntpd-opts.c@1.44 +2 -2
+ NTP_4_2_7P41
+
+ ntpd/ntpd-opts.h@1.44 +3 -3
+ NTP_4_2_7P41
+
+ ntpd/ntpd-opts.texi@1.43 +2 -2
+ NTP_4_2_7P41
+
+ ntpd/ntpd.1@1.43 +2 -2
+ NTP_4_2_7P41
+
+ ntpdc/ntpdc-opts.c@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpdc/ntpdc-opts.h@1.42 +3 -3
+ NTP_4_2_7P41
+
+ ntpdc/ntpdc-opts.texi@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpdc/ntpdc.1@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpq/ntpq-opts.c@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpq/ntpq-opts.h@1.42 +3 -3
+ NTP_4_2_7P41
+
+ ntpq/ntpq-opts.texi@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpq/ntpq.1@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.42 +3 -3
+ NTP_4_2_7P41
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.42 +2 -2
+ NTP_4_2_7P41
+
+ ntpsnmpd/ntpsnmpd.1@1.42 +2 -2
+ NTP_4_2_7P41
+
+ packageinfo.sh@1.43 +1 -1
+ NTP_4_2_7P41
+
+ sntp/sntp-opts.c@1.42 +2 -2
+ NTP_4_2_7P41
+
+ sntp/sntp-opts.h@1.42 +3 -3
+ NTP_4_2_7P41
+
+ sntp/sntp-opts.texi@1.42 +1 -1
+ NTP_4_2_7P41
+
+ sntp/sntp.1@1.42 +2 -2
+ NTP_4_2_7P41
+
+ sntp/sntp.html@1.42 +1 -1
+ NTP_4_2_7P41
+
+ util/ntp-keygen-opts.c@1.41.1.1 +2 -2
+ NTP_4_2_7P41
+
+ util/ntp-keygen-opts.h@1.41.1.1 +3 -3
+ NTP_4_2_7P41
+
+ util/ntp-keygen-opts.texi@1.42 +2 -2
+ NTP_4_2_7P41
+
+ util/ntp-keygen.1@1.42 +2 -2
+ NTP_4_2_7P41
+
+ChangeSet@1.2156.3.5, 2010-07-28 05:33:53+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1593] ntpd abort in free() with logconfig syntax error.
+
+ ChangeLog@1.607.1.5 +1 -0
+ [Bug 1593] ntpd abort in free() with logconfig syntax error.
+
+ ntpd/ntp_parser.c@1.59 +62 -52
+ Bison output
+
+ ntpd/ntp_parser.y@1.54 +17 -7
+ [Bug 1593] ntpd abort in free() with logconfig syntax error.
+
+ChangeSet@1.2156.3.4, 2010-07-27 23:14:28-04:00, stenn@pogo.udel.edu
+ merge cleanup
+
+ ChangeLog@1.607.1.4 +2 -0
+ merge cleanup
+
+ChangeSet@1.2156.4.1, 2010-07-27 22:59:12-04:00, stenn@deacon.udel.edu
+ orphanwait documentation changes
+
+ ChangeLog@1.607.2.1 +1 -0
+ orphanwait documentation changes
+
+ html/assoc.html@1.30 +4 -3
+ orphanwait documentation changes
+
+ html/miscopt.html@1.55 +8 -4
+ orphanwait documentation changes
+
+ChangeSet@1.2187, 2010-07-27 23:54:49+02:00, linus@beam.lund.zozs.se
+ Removed DEBUG definitions so output from Google Test more clear.
+
+ sntp/header.h@1.5 +1 -1
+ Commented out DEBUG defintion to clean up test output.
+
+ sntp/kod_management.c@1.18 +1 -1
+ Commented out DEBUG definition to clear up test output.
+
+ tests/sntp/Makefile.am@1.4 +13 -8
+ Uses the built object files from sntp, instead of compiling the sntp sources again for the tests. This is a good thing to do, since sntp has it's own configure scripts.
+
+ChangeSet@1.2186, 2010-07-27 14:53:27-04:00, karlsson@psp-deb1.ntp.org
+ Fixed integer constants so they work on 32-bit systems, which have 32-bit time_t
+
+ tests/sntp/data/kod-test-blanks@1.2 +1 -1
+ Fixed integer constants so they work on 32-bit systems which have 32-bit time_t
+
+ tests/sntp/data/kod-test-correct@1.2 +1 -1
+ Fixed integer constants so they work on 32-bit systems which have 32-bit time_t
+
+ tests/sntp/kodFile.cpp@1.4 +2 -2
+ Fixed integer constants so they work on 32-bit systems which have 32-bit time_t
+
+ChangeSet@1.2185, 2010-07-27 20:38:53+02:00, linus@beam.lund.zozs.se
+ Added tests for writing of KoD database to file.
+
+ tests/sntp/data/kod-expected-multiple@1.1 +3 -0
+ Expected output of tests.
+
+ tests/sntp/data/kod-expected-multiple@1.0 +0 -0
+
+ tests/sntp/data/kod-expected-single@1.1 +1 -0
+ Expected output of tests
+
+ tests/sntp/data/kod-expected-single@1.0 +0 -0
+
+ tests/sntp/kodFile.cpp@1.3 +101 -4
+ Added tests for writing of KoD database.
+
+ChangeSet@1.2184, 2010-07-27 18:08:05+02:00, linus@beam.lund.zozs.se
+ Modified test code to accept multiple parameters.
+
+ tests/main.cpp@1.3 +8 -6
+ Modified code to accept multiple parameters.
+
+ tests/main.h@1.3 +3 -2
+ Modified code to accept multiple parameteres.
+
+ tests/sntp/Makefile.am@1.3 +1 -1
+ Pass the path to the build dir, in addition to the source dir.
+
+ tests/sntp/kodFile.cpp@1.2 +9 -5
+ Modified code to handle multiple parameters.
+
+ tests/sntp/test-driver@1.2 +1 -1
+ Two parameters can be sent to the test executable.
+
+ChangeSet@1.2183, 2010-07-27 14:42:53+02:00, linus@beam.lund.zozs.se
+ New tests for KoD-database file reading.
+
+ tests/main.cpp@1.2 +16 -2
+ Modified test base class to accept an extra parameter.
+
+ tests/main.h@1.2 +6 -1
+ Modified test base class to accept an extra parameter.
+
+ tests/sntp/Makefile.am@1.2 +8 -4
+ Provided another test runner, that passes the data directory as a parameter to the tests.
+
+ tests/sntp/data/kod-test-blanks@1.1 +6 -0
+ Input file for KoD-reading test.
+
+ tests/sntp/data/kod-test-blanks@1.0 +0 -0
+
+ tests/sntp/data/kod-test-correct@1.1 +2 -0
+ Input file for KoD-reading test.
+
+ tests/sntp/data/kod-test-correct@1.0 +0 -0
+
+ tests/sntp/data/kod-test-empty@1.1 +0 -0
+ Input file for KoD-reading test.
+
+ tests/sntp/data/kod-test-empty@1.0 +0 -0
+
+ tests/sntp/kodFile.cpp@1.1 +92 -0
+ Added tests for reading a KoD-database file.
+
+ tests/sntp/kodFile.cpp@1.0 +0 -0
+
+ tests/sntp/test-driver@1.1 +3 -0
+ A basic TESTS_ENVIRONMENT wrapper, that provides an extra parameter to the test executable
+
+ tests/sntp/test-driver@1.0 +0 -0
+
+ChangeSet@1.2182, 2010-07-26 23:27:05+02:00, linus@beam.lund.zozs.se
+ Boilerplate for sntp tests, and tests for KoD-database.
+
+ configure.ac@1.489 +1 -0
+ Added Makefile creation for sntp tests.
+
+ tests/Makefile.am@1.3 +1 -1
+ Added sntp subdir.
+
+ tests/sntp/Makefile.am@1.1 +28 -0
+ Added Makefile.am for sntp tests.
+
+ tests/sntp/Makefile.am@1.0 +0 -0
+
+ tests/sntp/kodDatabase.cpp@1.1 +118 -0
+ Tests for KoD-database.
+
+ tests/sntp/kodDatabase.cpp@1.0 +0 -0
+
+ tests/sntp/sntptest.cpp@1.1 +9 -0
+ Base class for sntp tests.
+
+ tests/sntp/sntptest.cpp@1.0 +0 -0
+
+ tests/sntp/sntptest.h@1.1 +4 -0
+ Base class for sntp tests.
+
+ tests/sntp/sntptest.h@1.0 +0 -0
+
+ChangeSet@1.2156.3.2, 2010-07-20 18:02:12+00:00, davehart@shiny.ad.hartbrothers.com
+ Avoid race with parallel builds using same source directory in
+ scripts/genver by using build directory for temporary files.
+
+ ChangeLog@1.607.1.2 +2 -0
+ Avoid race with parallel builds using same source directory in
+ scripts/genver by using build directory for temporary files.
+
+ Makefile.am@1.93.1.1 +3 -3
+ Avoid race with parallel builds using same source directory in
+ scripts/genver by using build directory for temporary files.
+
+ scripts/genver@1.6 +23 -15
+ Avoid race with parallel builds using same source directory in
+ scripts/genver by using build directory for temporary files.
+
+ChangeSet@1.2156.3.1, 2010-07-20 15:21:33+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+ Add closelog() before closing most or all descriptors after fork().
+
+ ChangeLog@1.607.1.1 +1 -0
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+ Add closelog() before closing most or all descriptors after fork().
+
+ include/ntp_io.h@1.16 +1 -0
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+
+ ntpd/ntp_io.c@1.320 +19 -0
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+ Add closelog() before closing most or all descriptors after fork().
+ Close all descriptors (excepting waitsync_fd_to_close) not only those
+ after it. This was a merge failure.
+
+ ntpd/ntpd.c@1.114 +4 -3
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+ Add closelog() before closing most or all descriptors after fork().
+ Close all descriptors (excepting waitsync_fd_to_close) not only those
+ after it. This was a merge failure.
+
+ ntpd/work_fork.c@1.5 +2 -1
+ [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
+ Add closelog() before closing most or all descriptors after fork().
+
+ChangeSet@1.2156.1.16, 2010-07-19 16:58:15+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1588] finish configure --disable-autokey implementation,
+ add --disable-autokey to flock-build -no-refclocks flavor.
+
+ ChangeLog@1.608 +1 -0
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ configure.ac@1.483.1.3 +1 -1
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ flock-build@1.47 +3 -2
+ add --disable-autokey to -no-refclocks flavor
+
+ include/ntp.h@1.180 +6 -8
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ include/ntp_control.h@1.47 +110 -109
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ include/ntp_crypto.h@1.49 +9 -8
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ include/ntp_md5.h@1.6 +17 -11
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ include/ntpd.h@1.140 +4 -4
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ libntp/a_md5encrypt.c@1.29 +1 -5
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ libntp/authreadkeys.c@1.17 +9 -8
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ libntp/ssl_init.c@1.10 +1 -0
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ libntp/statestr.c@1.21 +4 -4
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_config.c@1.263 +9 -9
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_control.c@1.140 +124 -131
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_crypto.c@1.148 +3 -3
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_peer.c@1.134 +4 -7
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_proto.c@1.301 +51 -51
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_request.c@1.95 +4 -4
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_timer.c@1.60 +13 -13
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpd/ntp_util.c@1.82 +25 -25
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpdc/ntpdc.c@1.86 +4 -0
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ntpq/ntpq.c@1.116 +4 -0
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ ports/winnt/include/ntp_timer.h@1.6 +4 -6
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ sntp/crypto.h@1.10 +1 -5
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ sntp/networking.h@1.19 +3 -3
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ util/ntp-keygen-opts.c@1.42 +46 -46
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ util/ntp-keygen-opts.def@1.12 +15 -15
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ util/ntp-keygen-opts.h@1.42 +8 -8
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ util/ntp-keygen.c@1.65 +19 -19
+ [Bug 1588] finish configure --disable-autokey implementation.
+
+ChangeSet@1.2156.1.15, 2010-07-12 10:09:56+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P40
+ TAG: NTP_4_2_7P40
+
+ ChangeLog@1.607 +1 -0
+ NTP_4_2_7P40
+
+ ntpd/ntpd-opts.c@1.43 +5 -5
+ NTP_4_2_7P40
+
+ ntpd/ntpd-opts.h@1.43 +4 -4
+ NTP_4_2_7P40
+
+ ntpd/ntpd-opts.texi@1.42 +2 -2
+ NTP_4_2_7P40
+
+ ntpd/ntpd.1@1.42 +2 -2
+ NTP_4_2_7P40
+
+ ntpdc/ntpdc-opts.c@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpdc/ntpdc-opts.h@1.41 +3 -3
+ NTP_4_2_7P40
+
+ ntpdc/ntpdc-opts.texi@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpdc/ntpdc.1@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpq/ntpq-opts.c@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpq/ntpq-opts.h@1.41 +3 -3
+ NTP_4_2_7P40
+
+ ntpq/ntpq-opts.texi@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpq/ntpq.1@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.41 +3 -3
+ NTP_4_2_7P40
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.41 +2 -2
+ NTP_4_2_7P40
+
+ ntpsnmpd/ntpsnmpd.1@1.41 +2 -2
+ NTP_4_2_7P40
+
+ packageinfo.sh@1.42 +1 -1
+ NTP_4_2_7P40
+
+ sntp/sntp-opts.c@1.41 +2 -2
+ NTP_4_2_7P40
+
+ sntp/sntp-opts.h@1.41 +3 -3
+ NTP_4_2_7P40
+
+ sntp/sntp-opts.texi@1.41 +1 -1
+ NTP_4_2_7P40
+
+ sntp/sntp.1@1.41 +2 -2
+ NTP_4_2_7P40
+
+ sntp/sntp.html@1.41 +1 -1
+ NTP_4_2_7P40
+
+ util/ntp-keygen-opts.c@1.41 +2 -2
+ NTP_4_2_7P40
+
+ util/ntp-keygen-opts.h@1.41 +3 -3
+ NTP_4_2_7P40
+
+ util/ntp-keygen-opts.texi@1.41 +2 -2
+ NTP_4_2_7P40
+
+ util/ntp-keygen.1@1.41 +2 -2
+ NTP_4_2_7P40
+
+ChangeSet@1.2082.4.108, 2010-07-10 18:11:54+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1581] missed one previously
- ChangeLog@1.647 +4 -0
+ ChangeLog@1.496.26.80 +4 -0
[Bug 1581] missed one previously
- ntpd/ntp_intres.c@1.81 +1 -1
+ ntpd/ntp_intres.c@1.79.1.2 +1 -1
[Bug 1581] missed one previously
-ChangeSet@1.2194, 2010-07-09 02:25:58+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.14, 2010-07-09 23:35:54+00:00, davehart@shiny.ad.hartbrothers.com
+ updated output of ntpdbase-opts.def
+
+ ntpd/ntpd-opts.c@1.42 +2 -2
+ updated output of ntpdbase-opts.def
+
+ ntpd/ntpd-opts.h@1.42 +3 -3
+ updated output of ntpdbase-opts.def
+
+ ntpd/ntpd-opts.texi@1.41 +64 -5
+ updated output of ntpdbase-opts.def
+
+ ntpd/ntpd.1@1.41 +27 -5
+ updated output of ntpdbase-opts.def
+
+ChangeSet@1.2156.1.12, 2010-07-09 10:09:15+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P39
+ TAG: NTP_4_2_7P39
+
+ ChangeLog@1.605 +1 -0
+ NTP_4_2_7P39
+
+ ntpd/ntpd-opts.c@1.39.1.1 +2 -2
+ NTP_4_2_7P39
+
+ ntpd/ntpd-opts.h@1.39.1.1 +3 -3
+ NTP_4_2_7P39
+
+ ntpd/ntpd-opts.texi@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpd/ntpd.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpdc/ntpdc-opts.c@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpdc/ntpdc-opts.h@1.40 +3 -3
+ NTP_4_2_7P39
+
+ ntpdc/ntpdc-opts.texi@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpdc/ntpdc.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpq/ntpq-opts.c@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpq/ntpq-opts.h@1.40 +3 -3
+ NTP_4_2_7P39
+
+ ntpq/ntpq-opts.texi@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpq/ntpq.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.40 +3 -3
+ NTP_4_2_7P39
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.40 +2 -2
+ NTP_4_2_7P39
+
+ ntpsnmpd/ntpsnmpd.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ packageinfo.sh@1.41 +1 -1
+ NTP_4_2_7P39
+
+ sntp/sntp-opts.c@1.40 +2 -2
+ NTP_4_2_7P39
+
+ sntp/sntp-opts.h@1.40 +3 -3
+ NTP_4_2_7P39
+
+ sntp/sntp-opts.texi@1.40 +1 -1
+ NTP_4_2_7P39
+
+ sntp/sntp.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ sntp/sntp.html@1.40 +1 -1
+ NTP_4_2_7P39
+
+ util/ntp-keygen-opts.c@1.40 +2 -2
+ NTP_4_2_7P39
+
+ util/ntp-keygen-opts.h@1.40 +3 -3
+ NTP_4_2_7P39
+
+ util/ntp-keygen-opts.texi@1.40 +2 -2
+ NTP_4_2_7P39
+
+ util/ntp-keygen.1@1.40 +2 -2
+ NTP_4_2_7P39
+
+ChangeSet@1.2156.1.11, 2010-07-09 02:03:53-04:00, stenn@deacon.udel.edu
+ Fix typo in driver28.html
+
+ ChangeLog@1.604 +1 -0
+ Fix typo in driver28.html
+
+ html/drivers/driver28.html@1.13 +1 -1
+ Fix typo in driver28.html
+
+ChangeSet@1.2082.4.107, 2010-07-09 02:25:58+00:00, stenn@deacon.udel.edu
NTP_4_2_6P2
TAG: NTP_4_2_6P2
- ChangeLog@1.646 +1 -0
+ ChangeLog@1.496.26.79 +1 -0
NTP_4_2_6P2
- ntpd/ntpd-opts.c@1.263 +2 -2
+ ntpd/ntpd-opts.c@1.248.15.1 +2 -2
NTP_4_2_6P2
- ntpd/ntpd-opts.h@1.263 +3 -3
+ ntpd/ntpd-opts.h@1.248.15.1 +3 -3
NTP_4_2_6P2
- ntpd/ntpd-opts.texi@1.261 +2 -2
+ ntpd/ntpd-opts.texi@1.246.15.1 +2 -2
NTP_4_2_6P2
- ntpd/ntpd.1@1.261 +2 -2
+ ntpd/ntpd.1@1.246.15.1 +2 -2
NTP_4_2_6P2
- ntpdc/ntpdc-opts.c@1.259 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.15.1 +2 -2
NTP_4_2_6P2
- ntpdc/ntpdc-opts.h@1.259 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.15.1 +3 -3
NTP_4_2_6P2
- ntpdc/ntpdc-opts.texi@1.258 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.15.1 +2 -2
NTP_4_2_6P2
- ntpdc/ntpdc.1@1.258 +2 -2
+ ntpdc/ntpdc.1@1.243.15.1 +2 -2
NTP_4_2_6P2
- ntpq/ntpq-opts.c@1.260 +2 -2
+ ntpq/ntpq-opts.c@1.245.15.1 +2 -2
NTP_4_2_6P2
- ntpq/ntpq-opts.h@1.260 +3 -3
+ ntpq/ntpq-opts.h@1.245.15.1 +3 -3
NTP_4_2_6P2
- ntpq/ntpq-opts.texi@1.259 +2 -2
+ ntpq/ntpq-opts.texi@1.244.15.1 +2 -2
NTP_4_2_6P2
- ntpq/ntpq.1@1.259 +2 -2
+ ntpq/ntpq.1@1.244.15.1 +2 -2
NTP_4_2_6P2
- ntpsnmpd/ntpsnmpd-opts.c@1.139 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.16.1 +2 -2
NTP_4_2_6P2
- ntpsnmpd/ntpsnmpd-opts.h@1.139 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.16.1 +3 -3
NTP_4_2_6P2
- ntpsnmpd/ntpsnmpd-opts.texi@1.139 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.16.1 +2 -2
NTP_4_2_6P2
- ntpsnmpd/ntpsnmpd.1@1.138 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.16.1 +2 -2
NTP_4_2_6P2
- packageinfo.sh@1.277 +2 -2
+ packageinfo.sh@1.255.17.2 +2 -2
NTP_4_2_6P2
- sntp/sntp-opts.c@1.132 +2 -2
+ sntp/sntp-opts.c@1.117.15.1 +2 -2
NTP_4_2_6P2
- sntp/sntp-opts.h@1.132 +3 -3
+ sntp/sntp-opts.h@1.117.15.1 +3 -3
NTP_4_2_6P2
- sntp/sntp-opts.texi@1.132 +1 -1
+ sntp/sntp-opts.texi@1.117.15.1 +1 -1
NTP_4_2_6P2
- sntp/sntp.1@1.132 +2 -2
+ sntp/sntp.1@1.117.15.1 +2 -2
NTP_4_2_6P2
- sntp/sntp.html@1.22 +1 -1
+ sntp/sntp.html@1.7.15.1 +1 -1
NTP_4_2_6P2
- util/ntp-keygen-opts.c@1.262 +2 -2
+ util/ntp-keygen-opts.c@1.247.15.1 +2 -2
NTP_4_2_6P2
- util/ntp-keygen-opts.h@1.262 +3 -3
+ util/ntp-keygen-opts.h@1.247.15.1 +3 -3
NTP_4_2_6P2
- util/ntp-keygen-opts.texi@1.261 +2 -2
+ util/ntp-keygen-opts.texi@1.246.15.1 +2 -2
NTP_4_2_6P2
- util/ntp-keygen.1@1.261 +2 -2
+ util/ntp-keygen.1@1.246.15.1 +2 -2
NTP_4_2_6P2
-ChangeSet@1.2193, 2010-07-08 21:55:47-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.9, 2010-07-09 01:59:14+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct the attribution of the next -stable tarball to 4.2.6p2
+
+ ChangeLog@1.602 +3 -3
+ Correct the attribution of the next -stable tarball to 4.2.6p2
+
+ChangeSet@1.2082.4.106, 2010-07-08 21:55:47-04:00, stenn@deacon.udel.edu
release 4.2.6p2
NEWS@1.107 +39 -0
NEWS file for 4.2.6p2
- packageinfo.sh@1.276 +1 -1
+ packageinfo.sh@1.255.17.1 +1 -1
release 4.2.6p2
-ChangeSet@1.2192, 2010-07-08 21:49:08-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.105, 2010-07-08 21:49:08-04:00, stenn@deacon.udel.edu
Use the new mirror server names for the trigger mirror update script
BitKeeper/triggers/2mirrors@1.6 +2 -2
Use the new mirror server names for the trigger mirror update script
-ChangeSet@1.2191, 2010-07-02 07:43:21+01:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2156.2.3, 2010-07-06 04:18:16+00:00, davehart@shiny.ad.hartbrothers.com
+ Remove orphan mode startup workaround from ntp_proto.c, it's
+ not needed with the addition of sys_orphwait.
+ Add "tos orphanwait" to set sys_orphwait.
+
+ ntpd/complete.conf@1.8 +1 -1
+ add "tos orphanwait 300"
+
+ ntpd/keyword-gen-utd@1.7 +1 -1
+ sentinel that ntp_keyword.h is current with keyword-gen.c
+
+ ntpd/keyword-gen.c@1.12 +1 -0
+ add T_Orphanwait "orphanwait" for tos orphanwait
+
+ ntpd/ntp_config.c@1.260.1.3 +5 -0
+ tos orphanwait
+
+ ntpd/ntp_keyword.h@1.9 +498 -493
+ generated by keyword-gen.c
+
+ ntpd/ntp_parser.c@1.58 +907 -898
+ generated from ntp_parser.y
+
+ ntpd/ntp_parser.h@1.37 +131 -129
+ generated from ntp_parser.y
+
+ ntpd/ntp_parser.y@1.53 +3 -0
+ tos orphanwait
+
+ ntpd/ntp_proto.c@1.300 +1 -6
+ remove orphan mode at startup workaround, no longer needed for
+ [Bug 1395] --wait-sync with DLM's sys_orphwait change.
+
+ ntpd/ntpd.c@1.113 +0 -7
+ leftover merge cleanup, remove locals leftover from code
+ moved from ntpdmain() to close_all_beyond().
+
+ChangeSet@1.2156.2.2, 2010-07-05 14:58:16+00:00, davehart@shiny.ad.hartbrothers.com
+ merge cleanup
+
+ ntpd/ntp_config.c@1.260.1.2 +2 -2
+ correct merge for removal of default_ai_family from ntpd.
+
+ ntpd/ntpd-opts.c@1.40 +97 -20
+ Autogen output
+
+ ntpd/ntpd-opts.h@1.40 +18 -11
+ Autogen output
+
+ChangeSet@1.2180, 2010-07-04 21:56:55+02:00, linus@beam.lund.zozs.se
+ Fixed a bug that showed up when shuffling the tests, because the key cache was not emptied in test SetUp()
+
+ tests/libntp/authkeys.cpp@1.5 +12 -26
+ Fixed a bug that showed up when shuffling the tests, because the key cache was not emptied in test SetUp().
+
+ChangeSet@1.2082.4.104, 2010-07-02 07:43:21+01:00, davehart@shiny.ad.hartbrothers.com
[Bug 1581] size_t printf format string mismatches, IRIG string buffers
undersized. Mostly backported from earlier ntp-dev fixes by Jürgen
Perlinger, The exceptions are ntp_intres.c and refclock_irig.c.
- ChangeLog@1.645 +6 -0
+ ChangeLog@1.496.26.78 +6 -0
[Bug 1581] size_t printf format string mismatches, IRIG string buffers
undersized. Mostly backported from earlier ntp-dev fixes by Jürgen
Perlinger, The exceptions are ntp_intres.c and refclock_irig.c.
- libntp/ssl_init.c@1.6 +5 -4
+ libntp/ssl_init.c@1.4.1.2 +5 -4
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
- ntpd/ntp_config.c@1.245 +4 -4
+ ntpd/ntp_config.c@1.241.1.4 +4 -4
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
- ntpd/ntp_intres.c@1.80 +6 -4
+ ntpd/ntp_intres.c@1.79.1.1 +6 -4
[Bug 1581] size_t printf format string mismatches.
- ntpd/ntp_request.c@1.84 +8 -7
+ ntpd/ntp_request.c@1.82.1.2 +8 -7
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
- ntpd/ntp_scanner.c@1.32 +2 -2
+ ntpd/ntp_scanner.c@1.31.1.1 +2 -2
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
- ntpd/refclock_acts.c@1.37 +3 -3
+ ntpd/refclock_acts.c@1.36.1.1 +3 -3
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
ntpd/refclock_irig.c@1.33 +3 -3
[Bug 1581] sscanf() target buffers lack room for terminating null.
- ntpdc/ntpdc.c@1.77 +7 -7
+ ntpdc/ntpdc.c@1.75.1.2 +7 -7
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
- ntpq/ntpq.c@1.102 +6 -6
+ ntpq/ntpq.c@1.97.1.5 +6 -6
[Bug 1581] size_t printf format string mismatches (backported from ntp-dev).
-ChangeSet@1.2190, 2010-06-19 02:49:04-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2179, 2010-06-29 12:20:10+02:00, linus@beam.lund.zozs.se
+ Fixed compilation warnings.
+
+ tests/libntp/prettydate.cpp@1.3 +1 -1
+ Fixed compilation warnings.
+
+ tests/libntp/uglydate.cpp@1.2 +1 -1
+ Fixed compilation warnings.
+
+ChangeSet@1.2178, 2010-06-29 10:18:55+00:00, karlsson@psp-fb1.ntp.org
+ Fixed compilation errors and warnings under FreeBSD
+
+ tests/libntp/ssl_init.cpp@1.2 +4 -4
+ Fixed compilation errors and warnings on FreeBSD
+
+ tests/libntp/strtolfp.cpp@1.8 +12 -3
+ Fixed compilation errors and warnings on FreeBSD
+
+ChangeSet@1.2177, 2010-06-29 00:17:05+02:00, linus@beam.lund.zozs.se
+ Added more tests.
+
+ tests/libntp/caljulian.cpp@1.4 +11 -0
+ Added tests for leap year.
+
+ tests/libntp/clocktime.cpp@1.2 +72 -2
+ Added more tests.
+
+ tests/libntp/prettydate.cpp@1.2 +0 -4
+ Removed empty test stub.
+
+ChangeSet@1.2176, 2010-06-28 00:18:01+02:00, linus@beam.lund.zozs.se
+ Added tests for buftvtots and recvbuff.
+ Also cleaned up code using the lfptest superclass.
+
+ tests/libntp/Makefile.am@1.20 +2 -0
+ Added tests for buftvtots and recvbuff
+
+ tests/libntp/buftvtots.cpp@1.1 +49 -0
+ New tests
+
+ tests/libntp/buftvtots.cpp@1.0 +0 -0
+
+ tests/libntp/hextolfp.cpp@1.5 +0 -3
+ Moved constants to lfptest superclass.
+
+ tests/libntp/lfptest.h@1.3 +6 -0
+ Moved constants to lfptest superclass.
+
+ tests/libntp/recvbuff.cpp@1.1 +38 -0
+ New tests
+
+ tests/libntp/recvbuff.cpp@1.0 +0 -0
+
+ tests/libntp/strtolfp.cpp@1.7 +0 -4
+ Moved constants to lfptest superclass.
+
+ tests/libntp/tvtots.cpp@1.3 +0 -4
+ Moved constants to lfptest superclass.
+
+ChangeSet@1.2175, 2010-06-24 23:26:58+02:00, linus@beam.lund.zozs.se
+ Added tests for calyearstart and clocktime.
+
+ tests/libntp/Makefile.am@1.19 +2 -0
+ Added tests for calyearstart, and some tests for clocktime
+
+ tests/libntp/calyearstart.cpp@1.1 +34 -0
+ Added tests
+
+ tests/libntp/calyearstart.cpp@1.0 +0 -0
+
+ tests/libntp/clocktime.cpp@1.1 +65 -0
+ Added some tests
+
+ tests/libntp/clocktime.cpp@1.0 +0 -0
+
+ tests/libntp/tvtots.cpp@1.2 +1 -1
+ Disabled one test until I figure out whether it is failing or if I'm just stupid.
+
+ChangeSet@1.2174, 2010-06-24 15:36:26+02:00, linus@beam.lund.zozs.se
+ Added tests for caltontp.c
+
+ tests/libntp/Makefile.am@1.18 +1 -0
+ Added tests for caltontp()
+
+ tests/libntp/caltontp.cpp@1.1 +49 -0
+ Added tests
+
+ tests/libntp/caltontp.cpp@1.0 +0 -0
+
+ChangeSet@1.2173, 2010-06-23 14:21:42+02:00, linus@beam.lund.zozs.se
+ Added tests for statestr, tstotv and tvtots.
+
+ tests/libntp/Makefile.am@1.17 +3 -0
+ Added tests for statestr, tstotv and tvtots.
+
+ tests/libntp/lfptest.h@1.2 +3 -1
+ Added extra debugging code in comparision code.
+
+ tests/libntp/statestr.cpp@1.1 +27 -0
+ Added tests
+
+ tests/libntp/statestr.cpp@1.0 +0 -0
+
+ tests/libntp/tstotv.cpp@1.1 +57 -0
+ Added tests
+
+ tests/libntp/tstotv.cpp@1.0 +0 -0
+
+ tests/libntp/tvtots.cpp@1.1 +47 -0
+ Added tests
+
+ tests/libntp/tvtots.cpp@1.0 +0 -0
+
+ChangeSet@1.2172, 2010-06-21 22:49:41+02:00, linus@beam.lund.zozs.se
+ Added tests for modetoa() and tsftomsu(), and added more tests for authkeys.
+
+ tests/libntp/Makefile.am@1.16 +2 -0
+ Added tests for modetoa() and tsftomsu()
+
+ tests/libntp/authkeys.cpp@1.4 +30 -17
+ Added some more tests for authusekey.cpp, and removed commented code.
+
+ tests/libntp/modetoa.cpp@1.1 +16 -0
+ Added new tests
+
+ tests/libntp/modetoa.cpp@1.0 +0 -0
+
+ tests/libntp/tsftomsu.cpp@1.1 +29 -0
+ Added new tests
+
+ tests/libntp/tsftomsu.cpp@1.0 +0 -0
+
+ChangeSet@1.2156.1.7, 2010-06-20 10:10:46+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P38
+ TAG: NTP_4_2_7P38
+
+ ChangeLog@1.600 +1 -0
+ NTP_4_2_7P38
+
+ ntpd/ntpd-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpd/ntpd-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ ntpd/ntpd-opts.texi@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpd/ntpd.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpdc/ntpdc-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpdc/ntpdc-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ ntpdc/ntpdc-opts.texi@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpdc/ntpdc.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpq/ntpq-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpq/ntpq-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ ntpq/ntpq-opts.texi@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpq/ntpq.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.39 +2 -2
+ NTP_4_2_7P38
+
+ ntpsnmpd/ntpsnmpd.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ packageinfo.sh@1.40 +1 -1
+ NTP_4_2_7P38
+
+ sntp/sntp-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ sntp/sntp-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ sntp/sntp-opts.texi@1.39 +1 -1
+ NTP_4_2_7P38
+
+ sntp/sntp.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ sntp/sntp.html@1.39 +1 -1
+ NTP_4_2_7P38
+
+ util/ntp-keygen-opts.c@1.39 +2 -2
+ NTP_4_2_7P38
+
+ util/ntp-keygen-opts.h@1.39 +3 -3
+ NTP_4_2_7P38
+
+ util/ntp-keygen-opts.texi@1.39 +2 -2
+ NTP_4_2_7P38
+
+ util/ntp-keygen.1@1.39 +2 -2
+ NTP_4_2_7P38
+
+ChangeSet@1.2156.1.6, 2010-06-19 18:28:21-04:00, stenn@deacon.udel.edu
+ typo fix in comment
+
+ ChangeLog@1.599 +1 -0
+ typo fix in comment
+
+ ntpd/ntp_proto.c@1.297.1.15 +1 -1
+ typo fix in comment
+
+ChangeSet@1.2156.1.4, 2010-06-19 10:09:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P37
+ TAG: NTP_4_2_7P37
+
+ ChangeLog@1.597 +1 -0
+ NTP_4_2_7P37
+
+ ntpd/ntpd-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpd/ntpd-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ ntpd/ntpd-opts.texi@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpd/ntpd.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpdc/ntpdc-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpdc/ntpdc-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ ntpdc/ntpdc-opts.texi@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpdc/ntpdc.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpq/ntpq-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpq/ntpq-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ ntpq/ntpq-opts.texi@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpq/ntpq.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.38 +2 -2
+ NTP_4_2_7P37
+
+ ntpsnmpd/ntpsnmpd.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ packageinfo.sh@1.39 +1 -1
+ NTP_4_2_7P37
+
+ sntp/sntp-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ sntp/sntp-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ sntp/sntp-opts.texi@1.38 +1 -1
+ NTP_4_2_7P37
+
+ sntp/sntp.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ sntp/sntp.html@1.38 +1 -1
+ NTP_4_2_7P37
+
+ util/ntp-keygen-opts.c@1.38 +2 -2
+ NTP_4_2_7P37
+
+ util/ntp-keygen-opts.h@1.38 +3 -3
+ NTP_4_2_7P37
+
+ util/ntp-keygen-opts.texi@1.38 +2 -2
+ NTP_4_2_7P37
+
+ util/ntp-keygen.1@1.38 +2 -2
+ NTP_4_2_7P37
+
+ChangeSet@1.2170, 2010-06-19 10:58:13+02:00, linus@beam.lund.zozs.se
+ Missed a change in the last commit.
+
+ tests/libntp/lfptostr.cpp@1.2 +8 -1
+ Forgot to check this file in...
+
+ChangeSet@1.2169, 2010-06-19 10:57:33+02:00, linus@beam.lund.zozs.se
+ Added tests for more prettydate, refnumtoa, uflydate, uinttoa and ymd2yd.
+
+ tests/libntp/Makefile.am@1.15 +6 -1
+ Added tests for prettydate, refnumtoa, uglydate, uinttoa and ymd2yd.
+
+ tests/libntp/prettydate.cpp@1.1 +20 -0
+ Added tests
+
+ tests/libntp/prettydate.cpp@1.0 +0 -0
+
+ tests/libntp/refnumtoa.cpp@1.1 +48 -0
+ Added tests
+
+ tests/libntp/refnumtoa.cpp@1.0 +0 -0
+
+ tests/libntp/uglydate.cpp@1.1 +18 -0
+ Added tests
+
+ tests/libntp/uglydate.cpp@1.0 +0 -0
+
+ tests/libntp/ymd2yd.cpp@1.1 +23 -0
+ Added tests
+
+ tests/libntp/ymd2yd.cpp@1.0 +0 -0
+
+ChangeSet@1.2082.4.103, 2010-06-19 02:49:04-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC7
TAG: NTP_4_2_6P2_RC7
- ChangeLog@1.644 +1 -0
+ ChangeLog@1.496.26.77 +1 -0
NTP_4_2_6P2_RC7
- ntpd/ntpd-opts.c@1.262 +2 -2
+ ntpd/ntpd-opts.c@1.248.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpd/ntpd-opts.h@1.262 +3 -3
+ ntpd/ntpd-opts.h@1.248.14.1 +3 -3
NTP_4_2_6P2_RC7
- ntpd/ntpd-opts.texi@1.260 +2 -2
+ ntpd/ntpd-opts.texi@1.246.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpd/ntpd.1@1.260 +2 -2
+ ntpd/ntpd.1@1.246.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpdc/ntpdc-opts.c@1.258 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpdc/ntpdc-opts.h@1.258 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.14.1 +3 -3
NTP_4_2_6P2_RC7
- ntpdc/ntpdc-opts.texi@1.257 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpdc/ntpdc.1@1.257 +2 -2
+ ntpdc/ntpdc.1@1.243.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpq/ntpq-opts.c@1.259 +2 -2
+ ntpq/ntpq-opts.c@1.245.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpq/ntpq-opts.h@1.259 +3 -3
+ ntpq/ntpq-opts.h@1.245.14.1 +3 -3
NTP_4_2_6P2_RC7
- ntpq/ntpq-opts.texi@1.258 +2 -2
+ ntpq/ntpq-opts.texi@1.244.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpq/ntpq.1@1.258 +2 -2
+ ntpq/ntpq.1@1.244.14.1 +2 -2
NTP_4_2_6P2_RC7
- ntpsnmpd/ntpsnmpd-opts.c@1.138 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.15.1 +2 -2
NTP_4_2_6P2_RC7
- ntpsnmpd/ntpsnmpd-opts.h@1.138 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.15.1 +3 -3
NTP_4_2_6P2_RC7
- ntpsnmpd/ntpsnmpd-opts.texi@1.138 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.15.1 +2 -2
NTP_4_2_6P2_RC7
- ntpsnmpd/ntpsnmpd.1@1.137 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.15.1 +2 -2
NTP_4_2_6P2_RC7
- packageinfo.sh@1.275 +1 -1
+ packageinfo.sh@1.255.16.1 +1 -1
NTP_4_2_6P2_RC7
- sntp/sntp-opts.c@1.131 +2 -2
+ sntp/sntp-opts.c@1.117.14.1 +2 -2
NTP_4_2_6P2_RC7
- sntp/sntp-opts.h@1.131 +3 -3
+ sntp/sntp-opts.h@1.117.14.1 +3 -3
NTP_4_2_6P2_RC7
- sntp/sntp-opts.texi@1.131 +1 -1
+ sntp/sntp-opts.texi@1.117.14.1 +1 -1
NTP_4_2_6P2_RC7
- sntp/sntp.1@1.131 +2 -2
+ sntp/sntp.1@1.117.14.1 +2 -2
NTP_4_2_6P2_RC7
- sntp/sntp.html@1.21 +1 -1
+ sntp/sntp.html@1.7.14.1 +1 -1
NTP_4_2_6P2_RC7
- util/ntp-keygen-opts.c@1.261 +2 -2
+ util/ntp-keygen-opts.c@1.247.14.1 +2 -2
NTP_4_2_6P2_RC7
- util/ntp-keygen-opts.h@1.261 +3 -3
+ util/ntp-keygen-opts.h@1.247.14.1 +3 -3
NTP_4_2_6P2_RC7
- util/ntp-keygen-opts.texi@1.260 +2 -2
+ util/ntp-keygen-opts.texi@1.246.14.1 +2 -2
NTP_4_2_6P2_RC7
- util/ntp-keygen.1@1.260 +2 -2
+ util/ntp-keygen.1@1.246.14.1 +2 -2
NTP_4_2_6P2_RC7
-ChangeSet@1.2189, 2010-06-19 02:32:32-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.102, 2010-06-19 02:32:32-04:00, stenn@deacon.udel.edu
[Bug 1570] serial clock drivers get outdated input from kernel tty line buffer after startup
- ChangeLog@1.643 +2 -0
+ ChangeLog@1.496.26.76 +2 -0
[Bug 1570] serial clock drivers get outdated input from kernel tty line buffer after startup
- ntpd/ntp_refclock.c@1.93 +21 -0
+ ntpd/ntp_refclock.c@1.92.1.1 +21 -0
[Bug 1570] serial clock drivers get outdated input from kernel tty line buffer after startup
-ChangeSet@1.2188, 2010-06-19 01:59:33-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.101, 2010-06-19 01:59:33-04:00, stenn@deacon.udel.edu
merge cleanup
- ChangeLog@1.642 +2 -3
+ ChangeLog@1.496.26.75 +2 -3
merge cleanup
-ChangeSet@1.2185.1.1, 2010-06-19 01:57:32-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.21.1, 2010-06-19 01:57:32-04:00, stenn@deacon.udel.edu
+ [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
+
+ ChangeLog@1.496.46.1 +4 -0
+ [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
+
+ configure.ac@1.465.1.12 +7 -2
+ [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
+
+ChangeSet@1.2156.1.3, 2010-06-18 21:59:28-07:00, stenn@stenn.ntp.org
[Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
- ChangeLog@1.639.1.1 +4 -0
+ ChangeLog@1.596 +1 -0
[Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
- configure.ac@1.477 +7 -2
+ configure.ac@1.483.1.1 +7 -2
[Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD
-ChangeSet@1.2186, 2010-06-15 08:25:18-04:00, perlinger@psp-deb1.ntp.org
+ChangeSet@1.2167, 2010-06-17 08:33:16-04:00, karlsson@psp-deb1.ntp.org
+ Fixed C90 warnings on psp-deb1, complaining about negative integer constants.
+
+ tests/libntp/hextolfp.cpp@1.4 +1 -1
+ Fixed warnings with C90 integer constants
+
+ tests/libntp/inttoa.cpp@1.4 +1 -1
+ Fixed warnings with C90 integer constants
+
+ tests/libntp/strtolfp.cpp@1.6 +1 -1
+ Fixed warnings with C90 integer constants
+
+ChangeSet@1.2166, 2010-06-17 13:44:17+02:00, linus@beam.lund.zozs.se
+ Cleanups, fixed some warnings issued when compiling on psp-deb1.
+
+ tests/libntp/caljulian.cpp@1.3 +2 -2
+ Fixed warnings about constant only being unsigned in ISO C90.
+
+ tests/libntp/hextoint.cpp@1.3 +1 -1
+ Fixed warnings about constant only being unsigned in ISO C90.
+
+ tests/libntp/hextolfp.cpp@1.3 +5 -2
+ Gave some magic constants a name.
+
+ tests/libntp/inttoa.cpp@1.3 +1 -1
+ Fixed warnings about constant only being unsigned in ISO C90.
+
+ tests/libntp/numtoa.cpp@1.2 +3 -2
+ Fixed integer overflow.
+
+ tests/libntp/octtoint.cpp@1.2 +1 -1
+ Fixed warnings about constant only being unsigned in ISO C90.
+
+ChangeSet@1.2165, 2010-06-17 13:20:09+02:00, linus@beam.lund.zozs.se
+ Added tests for functions in ssl_init.c and uinttoa.c
+
+ tests/libntp/Makefile.am@1.14 +3 -1
+ Added more tests.
+
+ tests/libntp/ssl_init.cpp@1.1 +41 -0
+ Added tests for keytype_from_text() and keytype_name()
+
+ tests/libntp/ssl_init.cpp@1.0 +0 -0
+
+ tests/libntp/uinttoa.cpp@1.1 +12 -0
+ Added tests
+
+ tests/libntp/uinttoa.cpp@1.0 +0 -0
+
+ChangeSet@1.2164, 2010-06-15 14:10:00-04:00, karlsson@psp-deb1.ntp.org
+ Fixed formatting issue in humandate() test
+
+ tests/libntp/humandate.cpp@1.2 +4 -3
+ Fixed formatting issue
+
+ChangeSet@1.2161.1.1, 2010-06-15 19:36:59+02:00, linus@beam.lund.zozs.se
+ Added tests for a number of functions. Tests for inttoa() won't pass until bug 1575 if pulled into repo.
+
+ tests/libntp/Makefile.am@1.13 +8 -2
+ Added new tests to build.
+
+ tests/libntp/decodenetnum.cpp@1.2 +2 -37
+ Moved comparision code to a super class for all sockaddr_u-related tests.
+
+ tests/libntp/humandate.cpp@1.1 +40 -0
+ Added tests for humandate()
+
+ tests/libntp/humandate.cpp@1.0 +0 -0
+
+ tests/libntp/inttoa.cpp@1.2 +3 -1
+ Make sure it is a long.
+
+ tests/libntp/netof.cpp@1.1 +69 -0
+ Added tests for netof()
+
+ tests/libntp/netof.cpp@1.0 +0 -0
+
+ tests/libntp/numtoa.cpp@1.1 +17 -0
+ New tests
+
+ tests/libntp/numtoa.cpp@1.0 +0 -0
+
+ tests/libntp/numtohost.cpp@1.1 +15 -0
+ New tests
+
+ tests/libntp/numtohost.cpp@1.0 +0 -0
+
+ tests/libntp/octtoint.cpp@1.1 +57 -0
+ New tests
+
+ tests/libntp/octtoint.cpp@1.0 +0 -0
+
+ tests/libntp/sockaddrtest.h@1.1 +58 -0
+ Extracted common comparision code to super class.
+
+ tests/libntp/sockaddrtest.h@1.0 +0 -0
+
+ tests/libntp/socktoa.cpp@1.1 +73 -0
+ New tests
+
+ tests/libntp/socktoa.cpp@1.0 +0 -0
+
+ tests/libntp/strtolfp.cpp@1.5 +68 -13
+ Renamed from atolfpTest to strtolfpTest, and add test cases for both atolfp and mstolfp.
+
+ tests/libntp/strtolfp.cpp@1.4 +0 -0
+ Rename: tests/libntp/atolfp.cpp -> tests/libntp/strtolfp.cpp
+
+ChangeSet@1.2082.4.99, 2010-06-15 08:25:18-04:00, perlinger@psp-deb1.ntp.org
[Bug 1575] use snprintf with LIB_BUFLENGTH in inttoa.c, tvtoa.c, utvtoa.c
- ChangeLog@1.640 +3 -0
+ ChangeLog@1.496.26.73 +3 -0
[Bug 1575] use snprintf with LIB_BUFLENGTH in inttoa.c, tvtoa.c, utvtoa.c
libntp/inttoa.c@1.4 +1 -1
@@ -5704,95 +112652,425 @@ ChangeSet@1.2186, 2010-06-15 08:25:18-04:00, perlinger@psp-deb1.ntp.org
libntp/utvtoa.c@1.4 +1 -1
[Bug 1575] use snprintf with LIB_BUFLENGTH in inttoa.c, tvtoa.c, utvtoa.c
-ChangeSet@1.2185, 2010-06-12 02:21:49-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2156.1.2, 2010-06-15 10:09:41+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P36
+ TAG: NTP_4_2_7P36
+
+ ChangeLog@1.595 +1 -0
+ NTP_4_2_7P36
+
+ ntpd/ntpd-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpd/ntpd-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ ntpd/ntpd-opts.texi@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpd/ntpd.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpdc/ntpdc-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpdc/ntpdc-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ ntpdc/ntpdc-opts.texi@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpdc/ntpdc.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpq/ntpq-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpq/ntpq-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ ntpq/ntpq-opts.texi@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpq/ntpq.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.37 +2 -2
+ NTP_4_2_7P36
+
+ ntpsnmpd/ntpsnmpd.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ packageinfo.sh@1.38 +1 -1
+ NTP_4_2_7P36
+
+ sntp/sntp-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ sntp/sntp-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ sntp/sntp-opts.texi@1.37 +1 -1
+ NTP_4_2_7P36
+
+ sntp/sntp.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ sntp/sntp.html@1.37 +1 -1
+ NTP_4_2_7P36
+
+ util/ntp-keygen-opts.c@1.37 +2 -2
+ NTP_4_2_7P36
+
+ util/ntp-keygen-opts.h@1.37 +3 -3
+ NTP_4_2_7P36
+
+ util/ntp-keygen-opts.texi@1.37 +2 -2
+ NTP_4_2_7P36
+
+ util/ntp-keygen.1@1.37 +2 -2
+ NTP_4_2_7P36
+
+ChangeSet@1.2161, 2010-06-15 12:05:16+02:00, linus@beam.lund.zozs.se
+ Added inttoa tests.
+
+ tests/libntp/Makefile.am@1.12 +1 -0
+ Added inttoa
+
+ tests/libntp/inttoa.cpp@1.1 +24 -0
+ Tests for inttoa.
+
+ tests/libntp/inttoa.cpp@1.0 +0 -0
+
+ChangeSet@1.2156.1.1, 2010-06-15 00:24:37-04:00, stenn@deacon.udel.edu
+ orphanwait changes (Bug 1560) and clockfilter/reachability fixes from Dave Mills
+
+ ChangeLog@1.594 +2 -0
+ orphanwait changes (Bug 1560) and clockfilter/reachability fixes from Dave Mills
+
+ include/ntp.h@1.179 +2 -0
+ orphanwait changes from Dave Mills
+
+ include/ntpd.h@1.137.1.16 +1 -0
+ orphanwait changes from Dave Mills
+
+ ntpd/ntp_proto.c@1.297.1.14 +14 -6
+ orphanwait changes and clockfilter/reachability fixes from Dave Mills
+
+ ntpd/ntp_timer.c@1.59 +3 -1
+ orphanwait changes from Dave Mills
+
+ChangeSet@1.2160, 2010-06-14 20:20:24+02:00, linus@beam.lund.zozs.se
+ Added tests for l_fp string conversions.
+
+ tests/libntp/Makefile.am@1.11 +1 -0
+ Added tests for string conversions of l_fp.
+
+ tests/libntp/lfptostr.cpp@1.1 +96 -0
+ Added tests for mfptoa, mfptoms and dolfptoa.
+
+ tests/libntp/lfptostr.cpp@1.0 +0 -0
+
+ChangeSet@1.2159, 2010-06-14 03:26:21-07:00, karlsson@psp-os1.ntp.org
+ Corrected configure checks for google test
+
+ configure.ac@1.486 +11 -8
+ Added conditional used in automake to decide to build tests or not
+
+ tests/Makefile.am@1.2 +6 -1
+ Only recurse into libntp if we have google test installed
+
+ChangeSet@1.2158, 2010-06-14 11:11:54+02:00, linus@beam.lund.zozs.se
+ Uses configure script to check for gtest-config.
+
+ configure.ac@1.485 +11 -0
+ Uses gtest-config
+
+ tests/libntp/Makefile.am@1.10 +5 -2
+ Uses variables from configure script
+
+ tests/main.cpp@1.1 +6 -0
+ Main function.
+
+ tests/main.cpp@1.0 +0 -0
+
+ChangeSet@1.2152.2.3, 2010-06-13 16:04:31+02:00, linus@beam.lund.zozs.se
+ Fixed a serious bug when testing a_md5encrypt(), and added more tests for hextolfp
+
+ tests/libntp/a_md5encrypt.cpp@1.3 +10 -5
+ Fixed a number of embarrasing bugs (most serious taking memcmp() != 0 as a success when comparing two memory blocks...)
+
+ tests/libntp/hextolfp.cpp@1.2 +33 -0
+ Added more tests for hextolfp.
+
+ChangeSet@1.2156, 2010-06-12 04:25:31-04:00, stenn@deacon.udel.edu
+ NTP_4_2_7P35
+ TAG: NTP_4_2_7P35
+
+ ChangeLog@1.593 +1 -0
+ NTP_4_2_7P35
+
+ ntpd/ntpd-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpd/ntpd-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ ntpd/ntpd-opts.texi@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpd/ntpd.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpdc/ntpdc-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpdc/ntpdc-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ ntpdc/ntpdc-opts.texi@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpdc/ntpdc.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpq/ntpq-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpq/ntpq-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ ntpq/ntpq-opts.texi@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpq/ntpq.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.36 +2 -2
+ NTP_4_2_7P35
+
+ ntpsnmpd/ntpsnmpd.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ packageinfo.sh@1.37 +1 -1
+ NTP_4_2_7P35
+
+ sntp/sntp-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ sntp/sntp-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ sntp/sntp-opts.texi@1.36 +1 -1
+ NTP_4_2_7P35
+
+ sntp/sntp.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ sntp/sntp.html@1.36 +1 -1
+ NTP_4_2_7P35
+
+ util/ntp-keygen-opts.c@1.36 +2 -2
+ NTP_4_2_7P35
+
+ util/ntp-keygen-opts.h@1.36 +3 -3
+ NTP_4_2_7P35
+
+ util/ntp-keygen-opts.texi@1.36 +2 -2
+ NTP_4_2_7P35
+
+ util/ntp-keygen.1@1.36 +2 -2
+ NTP_4_2_7P35
+
+ChangeSet@1.2155, 2010-06-12 04:04:03-04:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.592 +0 -4
+ merge cleanup
+
+ChangeSet@1.2082.4.98, 2010-06-12 02:21:49-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC6
TAG: NTP_4_2_6P2_RC6
- ChangeLog@1.639 +1 -0
+ ChangeLog@1.496.26.72 +1 -0
NTP_4_2_6P2_RC6
- ntpd/ntpd-opts.c@1.261 +2 -2
+ ntpd/ntpd-opts.c@1.248.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpd/ntpd-opts.h@1.261 +3 -3
+ ntpd/ntpd-opts.h@1.248.13.1 +3 -3
NTP_4_2_6P2_RC6
- ntpd/ntpd-opts.texi@1.259 +2 -2
+ ntpd/ntpd-opts.texi@1.246.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpd/ntpd.1@1.259 +2 -2
+ ntpd/ntpd.1@1.246.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpdc/ntpdc-opts.c@1.257 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpdc/ntpdc-opts.h@1.257 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.13.1 +3 -3
NTP_4_2_6P2_RC6
- ntpdc/ntpdc-opts.texi@1.256 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpdc/ntpdc.1@1.256 +2 -2
+ ntpdc/ntpdc.1@1.243.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpq/ntpq-opts.c@1.258 +2 -2
+ ntpq/ntpq-opts.c@1.245.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpq/ntpq-opts.h@1.258 +3 -3
+ ntpq/ntpq-opts.h@1.245.13.1 +3 -3
NTP_4_2_6P2_RC6
- ntpq/ntpq-opts.texi@1.257 +2 -2
+ ntpq/ntpq-opts.texi@1.244.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpq/ntpq.1@1.257 +2 -2
+ ntpq/ntpq.1@1.244.13.1 +2 -2
NTP_4_2_6P2_RC6
- ntpsnmpd/ntpsnmpd-opts.c@1.137 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.14.1 +2 -2
NTP_4_2_6P2_RC6
- ntpsnmpd/ntpsnmpd-opts.h@1.137 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.14.1 +3 -3
NTP_4_2_6P2_RC6
- ntpsnmpd/ntpsnmpd-opts.texi@1.137 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.14.1 +2 -2
NTP_4_2_6P2_RC6
- ntpsnmpd/ntpsnmpd.1@1.136 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.14.1 +2 -2
NTP_4_2_6P2_RC6
- packageinfo.sh@1.274 +1 -1
+ packageinfo.sh@1.255.15.1 +1 -1
NTP_4_2_6P2_RC6
- sntp/sntp-opts.c@1.130 +2 -2
+ sntp/sntp-opts.c@1.117.13.1 +2 -2
NTP_4_2_6P2_RC6
- sntp/sntp-opts.h@1.130 +3 -3
+ sntp/sntp-opts.h@1.117.13.1 +3 -3
NTP_4_2_6P2_RC6
- sntp/sntp-opts.texi@1.130 +1 -1
+ sntp/sntp-opts.texi@1.117.13.1 +1 -1
NTP_4_2_6P2_RC6
- sntp/sntp.1@1.130 +2 -2
+ sntp/sntp.1@1.117.13.1 +2 -2
NTP_4_2_6P2_RC6
- sntp/sntp.html@1.20 +1 -1
+ sntp/sntp.html@1.7.13.1 +1 -1
NTP_4_2_6P2_RC6
- util/ntp-keygen-opts.c@1.260 +2 -2
+ util/ntp-keygen-opts.c@1.247.13.1 +2 -2
NTP_4_2_6P2_RC6
- util/ntp-keygen-opts.h@1.260 +3 -3
+ util/ntp-keygen-opts.h@1.247.13.1 +3 -3
NTP_4_2_6P2_RC6
- util/ntp-keygen-opts.texi@1.259 +2 -2
+ util/ntp-keygen-opts.texi@1.246.13.1 +2 -2
NTP_4_2_6P2_RC6
- util/ntp-keygen.1@1.259 +2 -2
+ util/ntp-keygen.1@1.246.13.1 +2 -2
NTP_4_2_6P2_RC6
-ChangeSet@1.2184, 2010-06-08 13:15:32+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2152.2.2, 2010-06-10 18:23:22+02:00, linus@beam.(none)
+ Tests for atolfp, hextoint, decodenetnum, hextolfp, fptoa and fptoms.
+
+ tests/libntp/Makefile.am@1.9 +4 -1
+ Added test source files to Makefile.am
+
+ tests/libntp/atolfp.cpp@1.3 +2 -16
+ Moved equality check to common base class.
+
+ tests/libntp/decodenetnum.cpp@1.1 +128 -0
+ Added tests for decodenetnum()
+
+ tests/libntp/decodenetnum.cpp@1.0 +0 -0
+
+ tests/libntp/hextoint.cpp@1.2 +33 -20
+ Added tests
+
+ tests/libntp/hextolfp.cpp@1.1 +25 -0
+ Tests for hextolfp()
+
+ tests/libntp/hextolfp.cpp@1.0 +0 -0
+
+ tests/libntp/lfptest.h@1.1 +23 -0
+ Extracted common code for tests that tests l_fp for equality.
+
+ tests/libntp/lfptest.h@1.0 +0 -0
+
+ tests/libntp/sfptostr.cpp@1.1 +71 -0
+ Tests for fptoa, fptoms and dofptoa.
+
+ tests/libntp/sfptostr.cpp@1.0 +0 -0
+
+ChangeSet@1.2147.1.6, 2010-06-09 22:56:19+02:00, linus@beam.(none)
+ Changes in caljulian tests.
+
+ tests/libntp/caljulian.cpp@1.2 +47 -14
+ Added comparition function for calendar structs.
+
+ChangeSet@1.2147.1.5, 2010-06-09 14:15:12+02:00, linus@beam.(none)
+ Added tests for atouint and atolfp.
+
+ tests/libntp/Makefile.am@1.8 +2 -0
+ Added atouint and caljulian to test suite.
+
+ tests/libntp/a_md5encrypt.cpp@1.2 +13 -12
+ Modified name of constants and changed comparision to memcmp instead of strcmp.
+
+ tests/libntp/atoint.cpp@1.2 +2 -6
+ Changed some assertions to ASSERT instead of EXPECT (no use to check the value if the conversion was aborted)
+
+ tests/libntp/atolfp.cpp@1.2 +48 -1
+ Added tests for atolfp
+
+ tests/libntp/atouint.cpp@1.1 +40 -0
+ Tests for atouint.
+
+ tests/libntp/atouint.cpp@1.0 +0 -0
+
+ tests/libntp/caljulian.cpp@1.1 +35 -0
+ Template for caljulian.
+
+ tests/libntp/caljulian.cpp@1.0 +0 -0
+
+ tests/libntp/libntptest.h@1.2 +4 -0
+ ntp_stdlib.h is required by all tests, put it here instead of in each separate test.
+
+ChangeSet@1.2147.1.4, 2010-06-08 17:07:07+02:00, linus@beam.(none)
+ Added tests for atoint and atolfp
+
+ tests/libntp/Makefile.am@1.7 +2 -0
+ Added atoint and atolfp files to SOURCES.
+
+ tests/libntp/atoint.cpp@1.1 +52 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/atoint.cpp
+
+ tests/libntp/atoint.cpp@1.0 +0 -0
+
+ tests/libntp/atolfp.cpp@1.1 +14 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/atolfp.cpp
+
+ tests/libntp/atolfp.cpp@1.0 +0 -0
+
+ChangeSet@1.2082.4.97, 2010-06-08 13:15:32+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 715] libisc Linux IPv6 interface iteration drops multicast flags.
- ChangeLog@1.638 +4 -0
+ ChangeLog@1.496.26.71 +4 -0
[Bug 715] libisc Linux IPv6 interface iteration drops multicast flags.
lib/isc/unix/interfaceiter.c@1.18 +32 -3
@@ -5800,382 +113078,901 @@ ChangeSet@1.2184, 2010-06-08 13:15:32+00:00, davehart@shiny.ad.hartbrothers.com
patch from joerg@dorchain.net adapted from original by
peter.pramberger@1012surf.net
-ChangeSet@1.2183, 2010-06-03 02:24:13-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2147.1.3, 2010-06-08 12:53:18+02:00, linus@beam.(none)
+ Added tests for a_md5encrypt.
+
+ tests/libntp/Makefile.am@1.6 +3 -2
+ Added tests for a_md5encrypt.
+
+ tests/libntp/a_md5encrypt.cpp@1.1 +78 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/a_md5encrypt.cpp
+
+ tests/libntp/a_md5encrypt.cpp@1.0 +0 -0
+
+ tests/libntp/authkeys.cpp@1.3 +31 -4
+ Modified some of the tests for authkeys
+
+ChangeSet@1.2147.1.2, 2010-06-08 09:44:46+02:00, linus@beam.(none)
+ Added tests for authkeys.
+
+ tests/libntp/Makefile.am@1.5 +4 -2
+ Fixed linking errors because a crypto library was needed
+
+ tests/libntp/authkeys.cpp@1.2 +48 -4
+ Added tests for both auth_havekey and authhavekey.
+
+ tests/libntp/authkeys.cpp@1.1 +29 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/authkeys.cpp
+
+ tests/libntp/authkeys.cpp@1.0 +0 -0
+
+ tests/libntp/libntptest.cpp@1.1 +9 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/libntptest.cpp
+
+ tests/libntp/libntptest.cpp@1.0 +0 -0
+
+ChangeSet@1.2153, 2010-06-08 02:24:01+02:00, jnperlin@hydra.localnet
+ Rewrite of multiprecision macros in 'ntp_fp.h' from J. Perlinger
+
+ ChangeLog@1.590 +2 -0
+ Rewrite of multiprecision macros in 'ntp_fp.h' from J. Perlinger
+
+ include/ntp_fp.h@1.20 +97 -132
+ Rewrite of M_xxx macros: cleanup in unsigned & overflow handling
+
+ChangeSet@1.2152, 2010-06-05 06:47:24+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P34
+ TAG: NTP_4_2_7P34
+
+ ChangeLog@1.589 +1 -0
+ NTP_4_2_7P34
+
+ ntpd/ntpd-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpd/ntpd-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ ntpd/ntpd-opts.texi@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpd/ntpd.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpdc/ntpdc-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpdc/ntpdc-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ ntpdc/ntpdc-opts.texi@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpdc/ntpdc.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpq/ntpq-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpq/ntpq-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ ntpq/ntpq-opts.texi@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpq/ntpq.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.35 +2 -2
+ NTP_4_2_7P34
+
+ ntpsnmpd/ntpsnmpd.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ packageinfo.sh@1.36 +1 -1
+ NTP_4_2_7P34
+
+ sntp/sntp-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ sntp/sntp-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ sntp/sntp-opts.texi@1.35 +1 -1
+ NTP_4_2_7P34
+
+ sntp/sntp.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ sntp/sntp.html@1.35 +1 -1
+ NTP_4_2_7P34
+
+ util/ntp-keygen-opts.c@1.35 +2 -2
+ NTP_4_2_7P34
+
+ util/ntp-keygen-opts.h@1.35 +3 -3
+ NTP_4_2_7P34
+
+ util/ntp-keygen-opts.texi@1.35 +2 -2
+ NTP_4_2_7P34
+
+ util/ntp-keygen.1@1.35 +2 -2
+ NTP_4_2_7P34
+
+ChangeSet@1.2150, 2010-06-04 23:12:55-07:00, stenn@stenn.ntp.org
+ fix typo
+
+ ntpd/ntp_refclock.c@1.96 +1 -1
+ fix typo
+
+ChangeSet@1.2149, 2010-06-04 19:21:26+02:00, jnperlin@hydra.localnet
+ [Bug 1570] serial line drivers get outdated data from kernel tty line buffer after startup
+
+ BitKeeper/etc/ignore@1.76 +5 -0
+ Added m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 to the ignore list
+
+ ChangeLog@1.587 +2 -2
+ [Bug 1570] serial line drivers get outdated data from kernel tty line buffer after startup
+
+ ntpd/ntp_refclock.c@1.95 +8 -9
+ [Bug 1570] flush I/O buffers and read all old data when opening a serial line
+
+ChangeSet@1.2146.1.2, 2010-06-04 03:26:47-04:00, perlinger@psp-deb1.ntp.org
+ bug 1580 fix
+
+ ChangeLog@1.584.1.1 +2 -0
+ added bug 1580
+
+ChangeSet@1.2146.1.1, 2010-06-04 08:34:03+02:00, jnperlin@hydra.localnet
+ [Bug 1580] Purge tty line buffers so serial refclocks do not get outdated data immediately after startup.
+
+ ntpd/ntp_refclock.c@1.94 +22 -0
+ [Bug 1580] Try to flush all buffers and/or read away old input data when opening a serial line for a refclock.
+
+ChangeSet@1.2147, 2010-06-04 02:10:49-04:00, stenn@deacon.udel.edu
+ NTP_4_2_7P33
+ TAG: NTP_4_2_7P33
+
+ ChangeLog@1.585 +1 -0
+ NTP_4_2_7P33
+
+ ntpd/ntpd-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpd/ntpd-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ ntpd/ntpd-opts.texi@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpd/ntpd.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpdc/ntpdc-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpdc/ntpdc-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ ntpdc/ntpdc-opts.texi@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpdc/ntpdc.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpq/ntpq-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpq/ntpq-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ ntpq/ntpq-opts.texi@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpq/ntpq.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.34 +24 -2
+ NTP_4_2_7P33
+
+ ntpsnmpd/ntpsnmpd.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ packageinfo.sh@1.35 +1 -1
+ NTP_4_2_7P33
+
+ sntp/sntp-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ sntp/sntp-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ sntp/sntp-opts.texi@1.34 +1 -1
+ NTP_4_2_7P33
+
+ sntp/sntp.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ sntp/sntp.html@1.34 +1 -1
+ NTP_4_2_7P33
+
+ util/ntp-keygen-opts.c@1.34 +2 -2
+ NTP_4_2_7P33
+
+ util/ntp-keygen-opts.h@1.34 +3 -3
+ NTP_4_2_7P33
+
+ util/ntp-keygen-opts.texi@1.34 +2 -2
+ NTP_4_2_7P33
+
+ util/ntp-keygen.1@1.34 +2 -2
+ NTP_4_2_7P33
+
+ChangeSet@1.2082.4.96, 2010-06-03 02:24:13-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC5
TAG: NTP_4_2_6P2_RC5
- ChangeLog@1.637 +1 -0
+ ChangeLog@1.496.26.70 +1 -0
NTP_4_2_6P2_RC5
- ntpd/ntpd-opts.c@1.260 +2 -2
+ ntpd/ntpd-opts.c@1.248.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpd/ntpd-opts.h@1.260 +3 -3
+ ntpd/ntpd-opts.h@1.248.12.1 +3 -3
NTP_4_2_6P2_RC5
- ntpd/ntpd-opts.texi@1.258 +2 -2
+ ntpd/ntpd-opts.texi@1.246.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpd/ntpd.1@1.258 +2 -2
+ ntpd/ntpd.1@1.246.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpdc/ntpdc-opts.c@1.256 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpdc/ntpdc-opts.h@1.256 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.12.1 +3 -3
NTP_4_2_6P2_RC5
- ntpdc/ntpdc-opts.texi@1.255 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpdc/ntpdc.1@1.255 +2 -2
+ ntpdc/ntpdc.1@1.243.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpq/ntpq-opts.c@1.257 +2 -2
+ ntpq/ntpq-opts.c@1.245.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpq/ntpq-opts.h@1.257 +3 -3
+ ntpq/ntpq-opts.h@1.245.12.1 +3 -3
NTP_4_2_6P2_RC5
- ntpq/ntpq-opts.texi@1.256 +2 -2
+ ntpq/ntpq-opts.texi@1.244.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpq/ntpq.1@1.256 +2 -2
+ ntpq/ntpq.1@1.244.12.1 +2 -2
NTP_4_2_6P2_RC5
- ntpsnmpd/ntpsnmpd-opts.c@1.136 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.13.1 +2 -2
NTP_4_2_6P2_RC5
- ntpsnmpd/ntpsnmpd-opts.h@1.136 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.13.1 +3 -3
NTP_4_2_6P2_RC5
- ntpsnmpd/ntpsnmpd-opts.texi@1.136 +24 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.13.1 +24 -2
NTP_4_2_6P2_RC5
- ntpsnmpd/ntpsnmpd.1@1.135 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.13.1 +2 -2
NTP_4_2_6P2_RC5
- packageinfo.sh@1.273 +1 -1
+ packageinfo.sh@1.255.14.1 +1 -1
NTP_4_2_6P2_RC5
- sntp/sntp-opts.c@1.129 +2 -2
+ sntp/sntp-opts.c@1.117.12.1 +2 -2
NTP_4_2_6P2_RC5
- sntp/sntp-opts.h@1.129 +3 -3
+ sntp/sntp-opts.h@1.117.12.1 +3 -3
NTP_4_2_6P2_RC5
- sntp/sntp-opts.texi@1.129 +1 -1
+ sntp/sntp-opts.texi@1.117.12.1 +1 -1
NTP_4_2_6P2_RC5
- sntp/sntp.1@1.129 +2 -2
+ sntp/sntp.1@1.117.12.1 +2 -2
NTP_4_2_6P2_RC5
- sntp/sntp.html@1.19 +1 -1
+ sntp/sntp.html@1.7.12.1 +1 -1
NTP_4_2_6P2_RC5
- util/ntp-keygen-opts.c@1.259 +2 -2
+ util/ntp-keygen-opts.c@1.247.12.1 +2 -2
NTP_4_2_6P2_RC5
- util/ntp-keygen-opts.h@1.259 +3 -3
+ util/ntp-keygen-opts.h@1.247.12.1 +3 -3
NTP_4_2_6P2_RC5
- util/ntp-keygen-opts.texi@1.258 +2 -2
+ util/ntp-keygen-opts.texi@1.246.12.1 +2 -2
NTP_4_2_6P2_RC5
- util/ntp-keygen.1@1.258 +2 -2
+ util/ntp-keygen.1@1.246.12.1 +2 -2
NTP_4_2_6P2_RC5
-ChangeSet@1.2182, 2010-05-31 18:59:05+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2144.1.5, 2010-06-01 22:25:33+02:00, linus@beam.(none)
+ Modified Makefile for conditional testing
+
+ tests/libntp/Makefile.am@1.4 +3 -1
+ Modified conditionals
+
+ChangeSet@1.2144.1.4, 2010-06-01 20:21:04+02:00, linus@beam.(none)
+ Changed so that tests are not run during a cross compilation
+
+ tests/libntp/Makefile.am@1.3 +2 -0
+ Tests are not run when cross-compiling
+
+ChangeSet@1.2082.4.95, 2010-05-31 18:59:05+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1565] sntp/crypto.c compile fails on MacOS over vsnprintf().
- ChangeLog@1.636 +1 -0
+ ChangeLog@1.496.26.69 +1 -0
[Bug 1565] sntp/crypto.c compile fails on MacOS over vsnprintf().
- sntp/configure.ac@1.33 +1 -1
+ sntp/configure.ac@1.31.1.2 +1 -1
[Bug 1565] sntp/crypto.c compile fails on MacOS over vsnprintf().
-ChangeSet@1.2181, 2010-05-24 15:46:36+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2144.1.3, 2010-05-28 15:31:29+02:00, linus@beam.(none)
+ Tuned makefile.am
+
+ tests/libntp/Makefile.am@1.2 +5 -1
+ Copied include directories from Makefile.am in libntp/
+
+ChangeSet@1.2144.1.2, 2010-05-28 14:13:18+02:00, linus@beam.(none)
+ Added base test classes and makefiles to repo
+
+ tests/Makefile.am@1.1 +1 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/Makefile.am
+
+ tests/Makefile.am@1.0 +0 -0
+
+ tests/libntp/Makefile.am@1.1 +6 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/Makefile.am
+
+ tests/libntp/Makefile.am@1.0 +0 -0
+
+ tests/libntp/hextoint.cpp@1.1 +29 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/hextoint.cpp
+
+ tests/libntp/hextoint.cpp@1.0 +0 -0
+
+ tests/libntp/libntptest.h@1.1 +5 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/libntp/libntptest.h
+
+ tests/libntp/libntptest.h@1.0 +0 -0
+
+ tests/main.h@1.1 +7 -0
+ BitKeeper file /home/linus/programming/gsoc/ntp/ntp-gsoc-testing/tests/main.h
+
+ tests/main.h@1.0 +0 -0
+
+ChangeSet@1.2144.1.1, 2010-05-28 07:59:21-04:00, karlsson@psp-deb1.ntp.org
+ Modified autotools to recurse into tests
+
+ Makefile.am@1.94 +4 -0
+ Added tests subdir
+
+ configure.ac@1.484 +4 -0
+ Added configure changes to create makefiles
+
+ChangeSet@1.2082.4.94, 2010-05-24 15:46:36+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
Windows port: do not exit in ntp_timestamp_from_counter() without
first logging the reason.
Support "passwd blah" syntax in ntpq.
- ChangeLog@1.635 +7 -0
+ ChangeLog@1.496.26.68 +7 -0
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
Windows port: do not exit in ntp_timestamp_from_counter() without
first logging the reason.
Support "passwd blah" syntax in ntpq.
- include/ntp_stdlib.h@1.42 +1 -0
+ include/ntp_stdlib.h@1.40.1.2 +1 -0
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
- libntp/ssl_init.c@1.5 +25 -0
+ libntp/ssl_init.c@1.4.1.1 +25 -0
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
- ntpdc/ntpdc.c@1.76 +2 -14
+ ntpdc/ntpdc.c@1.75.1.1 +2 -14
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
- ntpq/ntpq.c@1.101 +16 -21
+ ntpq/ntpq.c@1.97.1.4 +16 -21
[Bug 1561] ntpq, ntpdc "passwd" prompts for MD5 password w/SHA1.
Support "passwd blah" syntax in ntpq.
- ports/winnt/ntpd/nt_clockstuff.c@1.40 +6 -3
+ ports/winnt/ntpd/nt_clockstuff.c@1.38.1.2 +6 -3
Windows port: do not exit in ntp_timestamp_from_counter() without
first logging the reason.
-ChangeSet@1.2180, 2010-05-19 00:02:06-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2144, 2010-05-19 10:09:40+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P32
+ TAG: NTP_4_2_7P32
+
+ ChangeLog@1.582 +1 -0
+ NTP_4_2_7P32
+
+ ntpd/ntpd-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpd/ntpd-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ ntpd/ntpd-opts.texi@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpd/ntpd.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpdc/ntpdc-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpdc/ntpdc-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ ntpdc/ntpdc-opts.texi@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpdc/ntpdc.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpq/ntpq-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpq/ntpq-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ ntpq/ntpq-opts.texi@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpq/ntpq.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.33 +1 -1
+ NTP_4_2_7P32
+
+ ntpsnmpd/ntpsnmpd.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ packageinfo.sh@1.34 +1 -1
+ NTP_4_2_7P32
+
+ sntp/sntp-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ sntp/sntp-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ sntp/sntp-opts.texi@1.33 +1 -1
+ NTP_4_2_7P32
+
+ sntp/sntp.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ sntp/sntp.html@1.33 +1 -1
+ NTP_4_2_7P32
+
+ util/ntp-keygen-opts.c@1.33 +2 -2
+ NTP_4_2_7P32
+
+ util/ntp-keygen-opts.h@1.33 +3 -3
+ NTP_4_2_7P32
+
+ util/ntp-keygen-opts.texi@1.33 +2 -2
+ NTP_4_2_7P32
+
+ util/ntp-keygen.1@1.33 +2 -2
+ NTP_4_2_7P32
+
+ChangeSet@1.2143, 2010-05-19 00:55:54-04:00, stenn@deacon.udel.edu
+ Copyright file cleanup from Dave Mills
+
+ ChangeLog@1.581 +1 -0
+ Copyright file cleanup from Dave Mills
+
+ html/copyright.html@1.50 +4 -4
+ Copyright file cleanup from Dave Mills
+
+ChangeSet@1.2082.4.93, 2010-05-19 00:02:06-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC4
TAG: NTP_4_2_6P2_RC4
- ChangeLog@1.634 +1 -0
+ ChangeLog@1.496.26.67 +1 -0
NTP_4_2_6P2_RC4
- ntpd/ntpd-opts.c@1.259 +2 -2
+ ntpd/ntpd-opts.c@1.248.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpd/ntpd-opts.h@1.259 +3 -3
+ ntpd/ntpd-opts.h@1.248.11.1 +3 -3
NTP_4_2_6P2_RC4
- ntpd/ntpd-opts.texi@1.257 +2 -2
+ ntpd/ntpd-opts.texi@1.246.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpd/ntpd.1@1.257 +2 -2
+ ntpd/ntpd.1@1.246.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpdc/ntpdc-opts.c@1.255 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpdc/ntpdc-opts.h@1.255 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.11.1 +3 -3
NTP_4_2_6P2_RC4
- ntpdc/ntpdc-opts.texi@1.254 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpdc/ntpdc.1@1.254 +2 -2
+ ntpdc/ntpdc.1@1.243.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpq/ntpq-opts.c@1.256 +2 -2
+ ntpq/ntpq-opts.c@1.245.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpq/ntpq-opts.h@1.256 +3 -3
+ ntpq/ntpq-opts.h@1.245.11.1 +3 -3
NTP_4_2_6P2_RC4
- ntpq/ntpq-opts.texi@1.255 +2 -2
+ ntpq/ntpq-opts.texi@1.244.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpq/ntpq.1@1.255 +2 -2
+ ntpq/ntpq.1@1.244.11.1 +2 -2
NTP_4_2_6P2_RC4
- ntpsnmpd/ntpsnmpd-opts.c@1.135 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.12.1 +2 -2
NTP_4_2_6P2_RC4
- ntpsnmpd/ntpsnmpd-opts.h@1.135 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.12.1 +3 -3
NTP_4_2_6P2_RC4
- ntpsnmpd/ntpsnmpd-opts.texi@1.135 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.12.1 +1 -1
NTP_4_2_6P2_RC4
- ntpsnmpd/ntpsnmpd.1@1.134 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.12.1 +2 -2
NTP_4_2_6P2_RC4
- packageinfo.sh@1.272 +1 -1
+ packageinfo.sh@1.255.13.1 +1 -1
NTP_4_2_6P2_RC4
- sntp/sntp-opts.c@1.128 +2 -2
+ sntp/sntp-opts.c@1.117.11.1 +2 -2
NTP_4_2_6P2_RC4
- sntp/sntp-opts.h@1.128 +3 -3
+ sntp/sntp-opts.h@1.117.11.1 +3 -3
NTP_4_2_6P2_RC4
- sntp/sntp-opts.texi@1.128 +1 -1
+ sntp/sntp-opts.texi@1.117.11.1 +1 -1
NTP_4_2_6P2_RC4
- sntp/sntp.1@1.128 +2 -2
+ sntp/sntp.1@1.117.11.1 +2 -2
NTP_4_2_6P2_RC4
- sntp/sntp.html@1.18 +1 -1
+ sntp/sntp.html@1.7.11.1 +1 -1
NTP_4_2_6P2_RC4
- util/ntp-keygen-opts.c@1.258 +2 -2
+ util/ntp-keygen-opts.c@1.247.11.1 +2 -2
NTP_4_2_6P2_RC4
- util/ntp-keygen-opts.h@1.258 +3 -3
+ util/ntp-keygen-opts.h@1.247.11.1 +3 -3
NTP_4_2_6P2_RC4
- util/ntp-keygen-opts.texi@1.257 +2 -2
+ util/ntp-keygen-opts.texi@1.246.11.1 +2 -2
NTP_4_2_6P2_RC4
- util/ntp-keygen.1@1.257 +2 -2
+ util/ntp-keygen.1@1.246.11.1 +2 -2
NTP_4_2_6P2_RC4
-ChangeSet@1.2179, 2010-05-13 15:39:47+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2141, 2010-05-18 01:36:23+00:00, davehart@shiny.ad.hartbrothers.com
+ Windows port: Add msyslog() on path to exit(), relax PPS timestamp
+ within one minute of now check to be used only if debug tracing is
+ enabled.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.44 +6 -3
+ Windows port: Add msyslog() on path to exit(), relax PPS timestamp
+ within one minute of now check to be used only if debug tracing is
+ enabled.
+
+ChangeSet@1.2140, 2010-05-18 00:36:59+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr.
+
+ ChangeLog@1.579 +1 -0
+ [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr.
+
+ ntpq/ntpq-subs.c@1.68 +3 -1
+ [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr.
+
+ChangeSet@1.2139, 2010-05-17 21:32:08+00:00, davehart@shiny.ad.hartbrothers.com
+ configure.ac: add --disable-autokey, #define AUTOKEY to enable future
+ support for building without Autokey, but with OpenSSL for its digest
+ algorithms (hash functions). Code must be modified to use #ifdef
+ AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.
+ include/ntp_crypto.h: make assumption AUTOKEY implies OPENSSL explicit.
+
+ ChangeLog@1.578 +5 -0
+ configure.ac: add --disable-autokey, #define AUTOKEY to enable future
+ support for building without Autokey, but with OpenSSL for its digest
+ algorithms (hash functions). Code must be modified to use #ifdef
+ AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.
+ include/ntp_crypto.h: make assumption AUTOKEY implies OPENSSL explicit.
+
+ configure.ac@1.483 +27 -9
+ Add --disable-autokey, #define AUTOKEY to enable future
+ support for building without Autokey, but with OpenSSL for its digest
+ algorithms (hash functions). Code must be modified to use #ifdef
+ AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.
+ Remove long-dead RSAREF-related configure.ac commented code.
+
+ include/ntp_crypto.h@1.48 +5 -0
+ Ensure code can assume OPENSSL is defined if AUTOKEY is.
+
+ChangeSet@1.2082.4.92, 2010-05-13 15:39:47+00:00, davehart@shiny.ad.hartbrothers.com
* [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations).
- ChangeLog@1.633 +4 -0
+ ChangeLog@1.496.26.66 +4 -0
* [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations).
- sntp/networking.c@1.35 +5 -3
+ sntp/networking.c@1.29.1.6 +5 -3
* [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations).
-ChangeSet@1.2178, 2010-05-11 03:56:04-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2137, 2010-05-11 10:10:19+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P31
+ TAG: NTP_4_2_7P31
+
+ ChangeLog@1.576 +1 -0
+ NTP_4_2_7P31
+
+ ntpd/ntpd-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpd/ntpd-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ ntpd/ntpd-opts.texi@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpd/ntpd.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpdc/ntpdc-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpdc/ntpdc-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ ntpdc/ntpdc-opts.texi@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpdc/ntpdc.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpq/ntpq-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpq/ntpq-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ ntpq/ntpq-opts.texi@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpq/ntpq.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.32 +1 -1
+ NTP_4_2_7P31
+
+ ntpsnmpd/ntpsnmpd.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ packageinfo.sh@1.33 +1 -1
+ NTP_4_2_7P31
+
+ sntp/sntp-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ sntp/sntp-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ sntp/sntp-opts.texi@1.32 +2 -60
+ NTP_4_2_7P31
+
+ sntp/sntp.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ sntp/sntp.html@1.32 +1 -1
+ NTP_4_2_7P31
+
+ util/ntp-keygen-opts.c@1.32 +2 -2
+ NTP_4_2_7P31
+
+ util/ntp-keygen-opts.h@1.32 +3 -3
+ NTP_4_2_7P31
+
+ util/ntp-keygen-opts.texi@1.32 +2 -2
+ NTP_4_2_7P31
+
+ util/ntp-keygen.1@1.32 +2 -2
+ NTP_4_2_7P31
+
+ChangeSet@1.2082.4.91, 2010-05-11 03:56:04-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC3
TAG: NTP_4_2_6P2_RC3
- ChangeLog@1.632 +1 -0
+ ChangeLog@1.496.26.65 +1 -0
NTP_4_2_6P2_RC3
- ntpd/ntpd-opts.c@1.258 +2 -2
+ ntpd/ntpd-opts.c@1.248.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpd/ntpd-opts.h@1.258 +3 -3
+ ntpd/ntpd-opts.h@1.248.10.1 +3 -3
NTP_4_2_6P2_RC3
- ntpd/ntpd-opts.texi@1.256 +2 -2
+ ntpd/ntpd-opts.texi@1.246.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpd/ntpd.1@1.256 +2 -2
+ ntpd/ntpd.1@1.246.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpdc/ntpdc-opts.c@1.254 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpdc/ntpdc-opts.h@1.254 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.10.1 +3 -3
NTP_4_2_6P2_RC3
- ntpdc/ntpdc-opts.texi@1.253 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpdc/ntpdc.1@1.253 +2 -2
+ ntpdc/ntpdc.1@1.243.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpq/ntpq-opts.c@1.255 +2 -2
+ ntpq/ntpq-opts.c@1.245.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpq/ntpq-opts.h@1.255 +3 -3
+ ntpq/ntpq-opts.h@1.245.10.1 +3 -3
NTP_4_2_6P2_RC3
- ntpq/ntpq-opts.texi@1.254 +2 -2
+ ntpq/ntpq-opts.texi@1.244.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpq/ntpq.1@1.254 +2 -2
+ ntpq/ntpq.1@1.244.10.1 +2 -2
NTP_4_2_6P2_RC3
- ntpsnmpd/ntpsnmpd-opts.c@1.134 +5 -5
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.11.1 +5 -5
NTP_4_2_6P2_RC3
- ntpsnmpd/ntpsnmpd-opts.h@1.134 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.11.1 +4 -4
NTP_4_2_6P2_RC3
- ntpsnmpd/ntpsnmpd-opts.texi@1.134 +2 -24
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.11.1 +2 -24
NTP_4_2_6P2_RC3
- ntpsnmpd/ntpsnmpd.1@1.133 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.11.1 +2 -2
NTP_4_2_6P2_RC3
- packageinfo.sh@1.271 +1 -1
+ packageinfo.sh@1.255.12.1 +1 -1
NTP_4_2_6P2_RC3
- sntp/sntp-opts.c@1.127 +2 -2
+ sntp/sntp-opts.c@1.117.10.1 +2 -2
NTP_4_2_6P2_RC3
- sntp/sntp-opts.h@1.127 +3 -3
+ sntp/sntp-opts.h@1.117.10.1 +3 -3
NTP_4_2_6P2_RC3
- sntp/sntp-opts.texi@1.127 +2 -60
+ sntp/sntp-opts.texi@1.117.10.1 +2 -60
NTP_4_2_6P2_RC3
- sntp/sntp.1@1.127 +2 -2
+ sntp/sntp.1@1.117.10.1 +2 -2
NTP_4_2_6P2_RC3
- sntp/sntp.html@1.17 +1 -1
+ sntp/sntp.html@1.7.10.1 +1 -1
NTP_4_2_6P2_RC3
- util/ntp-keygen-opts.c@1.257 +2 -2
+ util/ntp-keygen-opts.c@1.247.10.1 +2 -2
NTP_4_2_6P2_RC3
- util/ntp-keygen-opts.h@1.257 +3 -3
+ util/ntp-keygen-opts.h@1.247.10.1 +3 -3
NTP_4_2_6P2_RC3
- util/ntp-keygen-opts.texi@1.256 +2 -2
+ util/ntp-keygen-opts.texi@1.246.10.1 +2 -2
NTP_4_2_6P2_RC3
- util/ntp-keygen.1@1.256 +2 -2
+ util/ntp-keygen.1@1.246.10.1 +2 -2
NTP_4_2_6P2_RC3
-ChangeSet@1.2171.1.1, 2010-05-11 02:31:19-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.20.1, 2010-05-11 02:31:19-04:00, stenn@deacon.udel.edu
Windows compiling hints/winnt.html update from G. Sunil Tej
- ChangeLog@1.626.1.1 +1 -0
+ ChangeLog@1.496.45.1 +1 -0
Windows compiling hints/winnt.html update from G. Sunil Tej
- html/hints/winnt.html@1.20 +13 -11
+ html/hints/winnt.html@1.19.1.1 +13 -11
Windows compiling hints/winnt.html update from G. Sunil Tej
-ChangeSet@1.2176, 2010-05-11 04:44:37+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.89, 2010-05-11 04:44:37+00:00, davehart@shiny.ad.hartbrothers.com
Add Nelson B Bolyard to html/copyright.html.
Update ChangeLog entries to reflect filing of [Bug 1552], [Bug 1553].
- ChangeLog@1.630 +2 -29
+ ChangeLog@1.496.26.63 +2 -29
Update ChangeLog entries to reflect filing of [Bug 1552], [Bug 1553].
- html/copyright.html@1.47 +4 -3
+ html/copyright.html@1.46.1.1 +4 -3
Add Nelson B Bolyard to html/copyright.html.
-ChangeSet@1.2175, 2010-05-10 13:16:18+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.88, 2010-05-10 13:16:18+00:00, davehart@shiny.ad.hartbrothers.com
Simplify hash client code by providing OpenSSL EVP_*() API when built
without OpenSSL. (from ntp-dev)
Do not depend on ASCII values for ('A' - '0'), ('a' - '0') in sntp.
- ChangeLog@1.629 +3 -0
+ ChangeLog@1.496.26.62 +3 -0
Simplify hash client code by providing OpenSSL EVP_*() API when built
without OpenSSL. (from ntp-dev)
Do not depend on ASCII values for ('A' - '0'), ('a' - '0') in sntp.
- include/ntp_md5.h@1.4 +21 -5
+ include/ntp_md5.h@1.3.1.1 +21 -5
expose OpenSSL hash API even when building without OpenSSL,
to simplify client code. Backport from ntp-dev.
- libntp/a_md5encrypt.c@1.27 +3 -38
+ libntp/a_md5encrypt.c@1.26.1.1 +3 -38
expose OpenSSL hash API even when building without OpenSSL,
to simplify client code. Backport from ntp-dev.
- sntp/crypto.c@1.12 +34 -64
+ sntp/crypto.c@1.10.1.2 +34 -64
remove s_keytype_from_text(), use similar keytype_from_text() from libntp.
sntp/crypto.h@1.9 +4 -7
bring in line with other ntp_md5.h client code
- sntp/networking.c@1.34 +15 -16
+ sntp/networking.c@1.29.1.5 +15 -16
Simplify hash client code by providing OpenSSL EVP_*() API when built
without OpenSSL. (from ntp-dev)
Do not depend on ASCII values for ('A' - '0'), ('a' - '0') in sntp.
-ChangeSet@1.2174, 2010-05-09 10:38:44+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.87, 2010-05-09 10:38:44+00:00, davehart@shiny.ad.hartbrothers.com
Correct ChangeLog spelling of Nelson Bolyard's name, add email address.
- ChangeLog@1.628 +1 -1
+ ChangeLog@1.496.26.61 +1 -1
Correct ChangeLog spelling of Nelson Bolyard's name, add email address.
-ChangeSet@1.2173, 2010-05-09 08:12:20+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.86, 2010-05-09 08:12:20+00:00, davehart@shiny.ad.hartbrothers.com
cleanup prior changeset, ease -dev merge.
- ntpq/ntpq-subs.c@1.44 +7 -7
+ ntpq/ntpq-subs.c@1.39.2.3 +7 -7
remove leftover of earlier approach, match AF_UNSPEC use to ntp-dev.
align with ntp-dev regarding empty refid= value from ntpd.
- ntpq/ntpq.c@1.100 +1 -1
+ ntpq/ntpq.c@1.97.1.3 +1 -1
use const qualifier for makeascii char *.
- ntpq/ntpq.h@1.12 +1 -1
+ ntpq/ntpq.h@1.10.1.2 +1 -1
use const qualifier for makeascii char *.
-ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.85, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1325] unreachable code in sntp recv_bcst_data().
[Bug 1459] sntp MD5 authentication does not work with ntpd.
Many sntp fixes from Nelson Boyard:
@@ -6209,7 +114006,7 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
sntp/configure.ac OpenSSL support now that sntp optionally uses it.
Escape unprintable characters in a refid in ntpq -p billboard.
- ChangeLog@1.627 +32 -0
+ ChangeLog@1.496.26.60 +32 -0
[Bug 1325] unreachable code in sntp recv_bcst_data().
[Bug 1459] sntp MD5 authentication does not work with ntpd.
Many sntp fixes from Nelson Boyard:
@@ -6243,7 +114040,7 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
sntp/configure.ac OpenSSL support now that sntp optionally uses it.
Escape unprintable characters in a refid in ntpq -p billboard.
- configure.ac@1.476 +1 -175
+ configure.ac@1.465.1.11 +1 -175
sntp/configure.ac OpenSSL support now that sntp optionally uses it.
m4/ntp_openssl.m4@1.1 +182 -0
@@ -6251,22 +114048,22 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
m4/ntp_openssl.m4@1.0 +0 -0
- ntpq/ntpq-subs.c@1.43 +9 -3
+ ntpq/ntpq-subs.c@1.39.2.2 +9 -3
Escape unprintable characters in a refid in ntpq -p billboard.
- ntpq/ntpq.c@1.99 +1 -2
+ ntpq/ntpq.c@1.97.1.2 +1 -2
Escape unprintable characters in a refid in ntpq -p billboard.
- ntpq/ntpq.h@1.11 +1 -0
+ ntpq/ntpq.h@1.10.1.1 +1 -0
Escape unprintable characters in a refid in ntpq -p billboard.
- sntp/Makefile.am@1.29 +1 -1
+ sntp/Makefile.am@1.21.1.8 +1 -1
add conditional -lcrypto to LDADD to link against OpenSSL.
- sntp/configure.ac@1.32 +3 -0
+ sntp/configure.ac@1.31.1.1 +3 -0
sntp/configure.ac OpenSSL support now that sntp optionally uses it.
- sntp/crypto.c@1.11 +134 -69
+ sntp/crypto.c@1.10.1.1 +134 -69
[Bug 1459] sntp MD5 authentication does not work with ntpd.
Many sntp fixes from Nelson Boyard:
1. sntp properly handles hex key strings in the keyfile, instead of
@@ -6330,7 +114127,7 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
12. Eliminated LOTS of blank lines.
- sntp/main.c@1.25 +110 -103
+ sntp/main.c@1.24.1.1 +110 -103
[Bug 1459] sntp MD5 authentication does not work with ntpd.
Many sntp fixes from Nelson Boyard:
1. sntp properly handles hex key strings in the keyfile, instead of
@@ -6362,7 +114159,7 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
12. Eliminated LOTS of blank lines.
- sntp/networking.c@1.33 +216 -432
+ sntp/networking.c@1.29.1.4 +216 -432
[Bug 1325] unreachable code in sntp recv_bcst_data().
[Bug 1459] sntp MD5 authentication does not work with ntpd.
Many sntp fixes from Nelson Boyard:
@@ -6427,294 +114224,895 @@ ChangeSet@1.2172, 2010-05-09 06:33:09+00:00, davehart@shiny.ad.hartbrothers.com
12. Eliminated LOTS of blank lines.
-ChangeSet@1.2171, 2010-05-03 04:35:06-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2133, 2010-05-06 10:09:32+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P30
+ TAG: NTP_4_2_7P30
+
+ ChangeLog@1.572 +1 -0
+ NTP_4_2_7P30
+
+ ntpd/ntpd-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpd/ntpd-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ ntpd/ntpd-opts.texi@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpd/ntpd.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpdc/ntpdc-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpdc/ntpdc-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ ntpdc/ntpdc-opts.texi@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpdc/ntpdc.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpq/ntpq-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpq/ntpq-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ ntpq/ntpq-opts.texi@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpq/ntpq.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.31 +1 -1
+ NTP_4_2_7P30
+
+ ntpsnmpd/ntpsnmpd.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ packageinfo.sh@1.32 +1 -1
+ NTP_4_2_7P30
+
+ sntp/sntp-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ sntp/sntp-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ sntp/sntp-opts.texi@1.31 +2 -2
+ NTP_4_2_7P30
+
+ sntp/sntp.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ sntp/sntp.html@1.31 +1 -1
+ NTP_4_2_7P30
+
+ util/ntp-keygen-opts.c@1.31 +2 -2
+ NTP_4_2_7P30
+
+ util/ntp-keygen-opts.h@1.31 +3 -3
+ NTP_4_2_7P30
+
+ util/ntp-keygen-opts.texi@1.31 +2 -2
+ NTP_4_2_7P30
+
+ util/ntp-keygen.1@1.31 +2 -2
+ NTP_4_2_7P30
+
+ChangeSet@1.2132, 2010-05-05 10:27:23+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1526] ntpd DNS pipe read EINTR with no network at startup.
+
+ ChangeLog@1.571 +1 -0
+ [Bug 1526] ntpd DNS pipe read EINTR with no network at startup.
+
+ ntpd/work_fork.c@1.4 +1 -9
+ [Bug 1526] ntpd DNS pipe read EINTR with no network at startup.
+
+ChangeSet@1.2131, 2010-05-05 03:58:07-04:00, stenn@deacon.udel.edu
+ Update the ChangeLog entries when merging items from -stable
+
+ ChangeLog@1.570 +52 -51
+ Update the ChangeLog entries when merging items from -stable
+
+ChangeSet@1.2126.1.5, 2010-05-04 22:34:37-04:00, stenn@deacon.udel.edu
+ NTP_4_2_7P29
+ TAG: NTP_4_2_7P29
+
+ ChangeLog@1.566.1.5 +1 -0
+ NTP_4_2_7P29
+
+ ntpd/ntpd-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpd/ntpd-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ ntpd/ntpd-opts.texi@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpd/ntpd.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpdc/ntpdc-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpdc/ntpdc-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ ntpdc/ntpdc-opts.texi@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpdc/ntpdc.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpq/ntpq-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpq/ntpq-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ ntpq/ntpq-opts.texi@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpq/ntpq.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.30 +1 -1
+ NTP_4_2_7P29
+
+ ntpsnmpd/ntpsnmpd.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ packageinfo.sh@1.31 +1 -1
+ NTP_4_2_7P29
+
+ sntp/sntp-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ sntp/sntp-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ sntp/sntp-opts.texi@1.30 +2 -2
+ NTP_4_2_7P29
+
+ sntp/sntp.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ sntp/sntp.html@1.30 +1 -1
+ NTP_4_2_7P29
+
+ util/ntp-keygen-opts.c@1.30 +2 -2
+ NTP_4_2_7P29
+
+ util/ntp-keygen-opts.h@1.30 +3 -3
+ NTP_4_2_7P29
+
+ util/ntp-keygen-opts.texi@1.30 +2 -2
+ NTP_4_2_7P29
+
+ util/ntp-keygen.1@1.30 +2 -2
+ NTP_4_2_7P29
+
+ChangeSet@1.2129, 2010-05-04 01:43:50-04:00, stenn@deacon.udel.edu
+ Documentation patches from Dave Mills
+
+ html/accopt.html@1.36 +1 -1
+ Documentation patches from Dave Mills
+
+ html/monopt.html@1.31 +3 -3
+ Documentation patches from Dave Mills
+
+ChangeSet@1.2126.1.4, 2010-05-03 10:15:58+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P28
+ TAG: NTP_4_2_7P28
+
+ ChangeLog@1.566.1.4 +1 -0
+ NTP_4_2_7P28
+
+ ntpd/ntpd-opts.c@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpd/ntpd-opts.h@1.29 +3 -3
+ NTP_4_2_7P28
+
+ ntpd/ntpd-opts.texi@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpd/ntpd.1@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpdc/ntpdc-opts.c@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpdc/ntpdc-opts.h@1.29 +3 -3
+ NTP_4_2_7P28
+
+ ntpdc/ntpdc-opts.texi@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpdc/ntpdc.1@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpq/ntpq-opts.c@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpq/ntpq-opts.h@1.29 +3 -3
+ NTP_4_2_7P28
+
+ ntpq/ntpq-opts.texi@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpq/ntpq.1@1.29 +2 -2
+ NTP_4_2_7P28
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.29 +27 -4
+ NTP_4_2_7P28
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.29 +18 -11
+ NTP_4_2_7P28
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.29 +10 -1
+ NTP_4_2_7P28
+
+ ntpsnmpd/ntpsnmpd.1@1.29 +11 -2
+ NTP_4_2_7P28
+
+ packageinfo.sh@1.30 +1 -1
+ NTP_4_2_7P28
+
+ sntp/sntp-opts.c@1.29 +2 -2
+ NTP_4_2_7P28
+
+ sntp/sntp-opts.h@1.29 +3 -3
+ NTP_4_2_7P28
+
+ sntp/sntp-opts.texi@1.29 +2 -2
+ NTP_4_2_7P28
+
+ sntp/sntp.1@1.29 +2 -2
+ NTP_4_2_7P28
+
+ sntp/sntp.html@1.29 +1 -1
+ NTP_4_2_7P28
+
+ util/ntp-keygen-opts.c@1.29 +2 -2
+ NTP_4_2_7P28
+
+ util/ntp-keygen-opts.h@1.29 +3 -3
+ NTP_4_2_7P28
+
+ util/ntp-keygen-opts.texi@1.29 +2 -2
+ NTP_4_2_7P28
+
+ util/ntp-keygen.1@1.29 +2 -2
+ NTP_4_2_7P28
+
+ChangeSet@1.2082.4.84, 2010-05-03 04:35:06-04:00, stenn@deacon.udel.edu
[Bug 1541] Fix wrong keyword for "maxclock".
- ChangeLog@1.626 +1 -0
+ ChangeLog@1.496.26.59 +1 -0
[Bug 1541] Fix wrong keyword for "maxclock".
- html/decode.html@1.13 +2 -2
+ html/decode.html@1.11.1.2 +2 -2
[Bug 1541] Fix wrong keyword for "maxclock".
-ChangeSet@1.2170, 2010-04-30 09:03:12+00:00, stenn@psp-fb1.ntp.org
+ChangeSet@1.2126.1.2, 2010-05-03 04:20:43-04:00, stenn@deacon.udel.edu
+ merge cleanup
+
+ ChangeLog@1.566.1.2 +5 -0
+ merge cleanup
+
+ChangeSet@1.2127, 2010-04-30 17:24:16+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1542] ntpd mrulist response may have incorrect last.older.
+ [Bug 1543] ntpq mrulist must refresh nonce when retrying.
+ [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit.
+ Windows compiling hints/winnt.html update from Sunil Tej S.
+
+ ChangeLog@1.567 +8 -2
+ [Bug 1542] ntpd mrulist response may have incorrect last.older.
+ [Bug 1543] ntpq mrulist must refresh nonce when retrying.
+ [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit.
+ Windows compiling hints/winnt.html update from Sunil Tej S.
+
+ html/hints/winnt.html@1.20 +13 -11
+ Windows compiling hints/winnt.html update from Sunil Tej S.
+
+ ntpd/ntp_control.c@1.139 +5 -2
+ [Bug 1542] ntpd mrulist response may have incorrect last.older.
+
+ ntpq/ntpq-subs.c@1.66 +145 -67
+ [Bug 1543] ntpq mrulist must refresh nonce when retrying.
+ [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit.
+
+ChangeSet@1.2082.4.83, 2010-04-30 09:03:12+00:00, stenn@psp-fb1.ntp.org
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ChangeLog@1.625 +2 -0
+ ChangeLog@1.496.26.58 +2 -0
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ntpsnmpd/ntpsnmpd-opts.c@1.133 +29 -6
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.10.1 +29 -6
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
ntpsnmpd/ntpsnmpd-opts.def@1.2 +12 -0
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ntpsnmpd/ntpsnmpd-opts.h@1.133 +17 -10
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.10.1 +17 -10
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ntpsnmpd/ntpsnmpd-opts.texi@1.133 +33 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.10.1 +33 -2
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ntpsnmpd/ntpsnmpd.1@1.132 +11 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.10.1 +11 -2
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
- ntpsnmpd/ntpsnmpd.c@1.4 +1 -1
+ ntpsnmpd/ntpsnmpd.c@1.3.1.1 +1 -1
[Bug 1512] ntpsnmpd should connect to net-snmpd via a unix-domain socket by default. Provide a command-line 'socket name' option.
-ChangeSet@1.2169, 2010-04-30 08:54:29+00:00, stenn@psp-fb1.ntp.org
+ChangeSet@1.2082.4.82, 2010-04-30 08:54:29+00:00, stenn@psp-fb1.ntp.org
[Bug 1538] update refclock_nmea.c's call to getprotobyname()
- ChangeLog@1.624 +6 -0
+ ChangeLog@1.496.26.57 +6 -0
[Bug 1538] update refclock_nmea.c's call to getprotobyname()
- ntpd/refclock_nmea.c@1.47 +1 -1
+ ntpd/refclock_nmea.c@1.46.1.1 +1 -1
[Bug 1538] update refclock_nmea.c's call to getprotobyname()
-ChangeSet@1.2168, 2010-04-27 02:53:34-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2126, 2010-04-27 10:08:54+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P27
+ TAG: NTP_4_2_7P27
+
+ ChangeLog@1.566 +1 -0
+ NTP_4_2_7P27
+
+ ntpd/ntpd-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpd/ntpd-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ ntpd/ntpd-opts.texi@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpd/ntpd.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpdc/ntpdc-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpdc/ntpdc-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ ntpdc/ntpdc-opts.texi@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpdc/ntpdc.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpq/ntpq-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpq/ntpq-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ ntpq/ntpq-opts.texi@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpq/ntpq.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.28 +1 -1
+ NTP_4_2_7P27
+
+ ntpsnmpd/ntpsnmpd.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ packageinfo.sh@1.29 +1 -1
+ NTP_4_2_7P27
+
+ sntp/sntp-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ sntp/sntp-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ sntp/sntp-opts.texi@1.28 +2 -2
+ NTP_4_2_7P27
+
+ sntp/sntp.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ sntp/sntp.html@1.28 +1 -1
+ NTP_4_2_7P27
+
+ util/ntp-keygen-opts.c@1.28 +2 -2
+ NTP_4_2_7P27
+
+ util/ntp-keygen-opts.h@1.28 +3 -3
+ NTP_4_2_7P27
+
+ util/ntp-keygen-opts.texi@1.28 +2 -2
+ NTP_4_2_7P27
+
+ util/ntp-keygen.1@1.28 +2 -2
+ NTP_4_2_7P27
+
+ChangeSet@1.2082.4.81, 2010-04-27 02:53:34-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC2
TAG: NTP_4_2_6P2_RC2
- ChangeLog@1.623 +1 -0
+ ChangeLog@1.496.26.56 +1 -0
NTP_4_2_6P2_RC2
- ntpd/ntpd-opts.c@1.257 +2 -2
+ ntpd/ntpd-opts.c@1.248.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpd/ntpd-opts.h@1.257 +3 -3
+ ntpd/ntpd-opts.h@1.248.9.1 +3 -3
NTP_4_2_6P2_RC2
- ntpd/ntpd-opts.texi@1.255 +2 -2
+ ntpd/ntpd-opts.texi@1.246.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpd/ntpd.1@1.255 +2 -2
+ ntpd/ntpd.1@1.246.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpdc/ntpdc-opts.c@1.253 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpdc/ntpdc-opts.h@1.253 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.9.1 +3 -3
NTP_4_2_6P2_RC2
- ntpdc/ntpdc-opts.texi@1.252 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpdc/ntpdc.1@1.252 +2 -2
+ ntpdc/ntpdc.1@1.243.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpq/ntpq-opts.c@1.254 +2 -2
+ ntpq/ntpq-opts.c@1.245.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpq/ntpq-opts.h@1.254 +3 -3
+ ntpq/ntpq-opts.h@1.245.9.1 +3 -3
NTP_4_2_6P2_RC2
- ntpq/ntpq-opts.texi@1.253 +2 -2
+ ntpq/ntpq-opts.texi@1.244.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpq/ntpq.1@1.253 +2 -2
+ ntpq/ntpq.1@1.244.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpsnmpd/ntpsnmpd-opts.c@1.132 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.9.1 +2 -2
NTP_4_2_6P2_RC2
- ntpsnmpd/ntpsnmpd-opts.h@1.132 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.9.1 +3 -3
NTP_4_2_6P2_RC2
- ntpsnmpd/ntpsnmpd-opts.texi@1.132 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.9.1 +1 -1
NTP_4_2_6P2_RC2
- ntpsnmpd/ntpsnmpd.1@1.131 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.9.1 +2 -2
NTP_4_2_6P2_RC2
- packageinfo.sh@1.270 +1 -1
+ packageinfo.sh@1.255.11.1 +1 -1
NTP_4_2_6P2_RC2
- sntp/sntp-opts.c@1.126 +2 -2
+ sntp/sntp-opts.c@1.117.9.1 +2 -2
NTP_4_2_6P2_RC2
- sntp/sntp-opts.h@1.126 +3 -3
+ sntp/sntp-opts.h@1.117.9.1 +3 -3
NTP_4_2_6P2_RC2
- sntp/sntp-opts.texi@1.126 +2 -2
+ sntp/sntp-opts.texi@1.117.9.1 +2 -2
NTP_4_2_6P2_RC2
- sntp/sntp.1@1.126 +2 -2
+ sntp/sntp.1@1.117.9.1 +2 -2
NTP_4_2_6P2_RC2
- sntp/sntp.html@1.16 +1 -1
+ sntp/sntp.html@1.7.9.1 +1 -1
NTP_4_2_6P2_RC2
- util/ntp-keygen-opts.c@1.256 +2 -2
+ util/ntp-keygen-opts.c@1.247.9.1 +2 -2
NTP_4_2_6P2_RC2
- util/ntp-keygen-opts.h@1.256 +3 -3
+ util/ntp-keygen-opts.h@1.247.9.1 +3 -3
NTP_4_2_6P2_RC2
- util/ntp-keygen-opts.texi@1.255 +2 -2
+ util/ntp-keygen-opts.texi@1.246.9.1 +2 -2
NTP_4_2_6P2_RC2
- util/ntp-keygen.1@1.255 +2 -2
+ util/ntp-keygen.1@1.246.9.1 +2 -2
NTP_4_2_6P2_RC2
-ChangeSet@1.2167, 2010-04-24 05:57:35+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2124, 2010-04-24 10:09:18+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P26
+ TAG: NTP_4_2_7P26
+
+ ChangeLog@1.564 +1 -0
+ NTP_4_2_7P26
+
+ ntpd/ntpd-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpd/ntpd-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ ntpd/ntpd-opts.texi@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpd/ntpd.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpdc/ntpdc-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpdc/ntpdc-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ ntpdc/ntpdc-opts.texi@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpdc/ntpdc.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpq/ntpq-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpq/ntpq-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ ntpq/ntpq-opts.texi@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpq/ntpq.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.27 +1 -1
+ NTP_4_2_7P26
+
+ ntpsnmpd/ntpsnmpd.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ packageinfo.sh@1.28 +1 -1
+ NTP_4_2_7P26
+
+ sntp/sntp-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ sntp/sntp-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ sntp/sntp-opts.texi@1.27 +2 -2
+ NTP_4_2_7P26
+
+ sntp/sntp.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ sntp/sntp.html@1.27 +1 -1
+ NTP_4_2_7P26
+
+ util/ntp-keygen-opts.c@1.27 +2 -2
+ NTP_4_2_7P26
+
+ util/ntp-keygen-opts.h@1.27 +3 -3
+ NTP_4_2_7P26
+
+ util/ntp-keygen-opts.texi@1.27 +2 -2
+ NTP_4_2_7P26
+
+ util/ntp-keygen.1@1.27 +2 -2
+ NTP_4_2_7P26
+
+ChangeSet@1.2082.4.80, 2010-04-24 05:57:35+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h.
[Bug 1535] "restrict -4 default" and "restrict -6 default" ignored.
- ChangeLog@1.622 +4 -1
+ ChangeLog@1.496.26.55 +4 -1
[Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h.
[Bug 1535] "restrict -4 default" and "restrict -6 default" ignored.
lib/isc/win32/include/isc/net.h@1.10 +30 -0
[Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h.
- ntpd/ntp_parser.c@1.54 +2 -2
+ ntpd/ntp_parser.c@1.52.1.2 +2 -2
Bison output from ntp_parser.y
- ntpd/ntp_parser.y@1.49 +2 -2
+ ntpd/ntp_parser.y@1.47.1.2 +2 -2
[Bug 1535] "restrict -4 default" and "restrict -6 default" ignored.
-ChangeSet@1.2166, 2010-04-20 01:55:16-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2119.1.1, 2010-04-22 10:06:01+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1531] Require nonce with mrulist requests.
+ [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's
+ mrulist.
+
+ ChangeLog@1.559.1.1 +3 -0
+ [Bug 1531] Require nonce with mrulist requests.
+ [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's
+ mrulist.
+
+ include/ntp_control.h@1.46 +1 -0
+ [Bug 1531] Require nonce with mrulist requests.
+
+ include/ntp_md5.h@1.4 +21 -5
+ Hide #ifdefs related to selection between OpenSSL and host/libisc MD5
+ implementations in one place, NTP code can then use the OpenSSL API
+ regardless.
+
+ include/ntpd.h@1.137.1.15 +3 -0
+ expose ntp_scanner.c's conf_file_sum
+
+ libntp/a_md5encrypt.c@1.27 +3 -38
+ Hide #ifdefs related to selection between OpenSSL and host/libisc MD5
+ implementations in one place, NTP code can then use the OpenSSL API
+ regardless.
+
+ ntpd/ntp_control.c@1.138 +150 -9
+ [Bug 1531] Require nonce with mrulist requests.
+
+ ntpd/ntp_request.c@1.93 +5 -116
+ [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's
+ mrulist.
+
+ ntpd/ntp_scanner.c@1.35 +5 -0
+ [Bug 1531] Require nonce with mrulist requests.
+
+ ntpq/ntpq-subs.c@1.65 +38 -5
+ [Bug 1531] Require nonce with mrulist requests.
+
+ChangeSet@1.2121, 2010-04-20 21:58:50+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P25
+ TAG: NTP_4_2_7P25
+
+ ChangeLog@1.561 +1 -0
+ NTP_4_2_7P25
+
+ ntpd/ntpd-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpd/ntpd-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ ntpd/ntpd-opts.texi@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpd/ntpd.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpdc/ntpdc-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpdc/ntpdc-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ ntpdc/ntpdc-opts.texi@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpdc/ntpdc.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpq/ntpq-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpq/ntpq-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ ntpq/ntpq-opts.texi@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpq/ntpq.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.26 +1 -1
+ NTP_4_2_7P25
+
+ ntpsnmpd/ntpsnmpd.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ packageinfo.sh@1.27 +1 -1
+ NTP_4_2_7P25
+
+ sntp/sntp-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ sntp/sntp-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ sntp/sntp-opts.texi@1.26 +2 -2
+ NTP_4_2_7P25
+
+ sntp/sntp.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ sntp/sntp.html@1.26 +1 -1
+ NTP_4_2_7P25
+
+ util/ntp-keygen-opts.c@1.26 +2 -2
+ NTP_4_2_7P25
+
+ util/ntp-keygen-opts.h@1.26 +3 -3
+ NTP_4_2_7P25
+
+ util/ntp-keygen-opts.texi@1.26 +2 -2
+ NTP_4_2_7P25
+
+ util/ntp-keygen.1@1.26 +2 -2
+ NTP_4_2_7P25
+
+ChangeSet@1.2082.4.79, 2010-04-20 01:55:16-04:00, stenn@deacon.udel.edu
[Bug 1465] Make sure time from TS2100 is not invalid (backport from -dev)
- ChangeLog@1.621 +1 -0
+ ChangeLog@1.496.26.54 +1 -0
[Bug 1465] Make sure time from TS2100 is not invalid (backport from -dev)
- ntpd/refclock_true.c@1.12 +2 -1
+ ntpd/refclock_true.c@1.11.1.1 +2 -1
[Bug 1465] Make sure time from TS2100 is not invalid (backport from -dev)
-ChangeSet@1.2165, 2010-04-20 01:45:17-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.78, 2010-04-20 01:45:17-04:00, stenn@deacon.udel.edu
[Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc
- ChangeLog@1.620 +1 -0
+ ChangeLog@1.496.26.53 +1 -0
[Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc
- ntpdc/Makefile.am@1.52 +2 -2
+ ntpdc/Makefile.am@1.48.1.4 +2 -2
[Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc
- ntpq/Makefile.am@1.47 +2 -2
+ ntpq/Makefile.am@1.43.1.4 +2 -2
[Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc
-ChangeSet@1.2164, 2010-04-20 01:30:11-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.77, 2010-04-20 01:30:11-04:00, stenn@deacon.udel.edu
Remove --with-arlib from br-flock
- ChangeLog@1.619 +2 -0
+ ChangeLog@1.496.26.52 +2 -0
Remove --with-arlib from br-flock
br-flock@1.14 +1 -1
Remove --with-arlib from br-flock
-ChangeSet@1.2163, 2010-04-18 04:14:33-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.76, 2010-04-18 04:14:33-04:00, stenn@deacon.udel.edu
NTP_4_2_6P2_RC1
TAG: NTP_4_2_6P2_RC1
- ChangeLog@1.618 +1 -0
+ ChangeLog@1.496.26.51 +1 -0
NTP_4_2_6P2_RC1
- ntpd/ntpd-opts.c@1.256 +2 -2
+ ntpd/ntpd-opts.c@1.248.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpd/ntpd-opts.h@1.256 +3 -3
+ ntpd/ntpd-opts.h@1.248.8.1 +3 -3
NTP_4_2_6P2_RC1
- ntpd/ntpd-opts.texi@1.254 +2 -2
+ ntpd/ntpd-opts.texi@1.246.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpd/ntpd.1@1.254 +2 -2
+ ntpd/ntpd.1@1.246.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpdc/ntpdc-opts.c@1.252 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpdc/ntpdc-opts.h@1.252 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.8.1 +3 -3
NTP_4_2_6P2_RC1
- ntpdc/ntpdc-opts.texi@1.251 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpdc/ntpdc.1@1.251 +2 -2
+ ntpdc/ntpdc.1@1.243.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpq/ntpq-opts.c@1.253 +2 -2
+ ntpq/ntpq-opts.c@1.245.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpq/ntpq-opts.h@1.253 +3 -3
+ ntpq/ntpq-opts.h@1.245.8.1 +3 -3
NTP_4_2_6P2_RC1
- ntpq/ntpq-opts.texi@1.252 +2 -2
+ ntpq/ntpq-opts.texi@1.244.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpq/ntpq.1@1.252 +2 -2
+ ntpq/ntpq.1@1.244.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpsnmpd/ntpsnmpd-opts.c@1.131 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.8.1 +2 -2
NTP_4_2_6P2_RC1
- ntpsnmpd/ntpsnmpd-opts.h@1.131 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.8.1 +3 -3
NTP_4_2_6P2_RC1
- ntpsnmpd/ntpsnmpd-opts.texi@1.131 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.8.1 +1 -1
NTP_4_2_6P2_RC1
- ntpsnmpd/ntpsnmpd.1@1.130 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.8.1 +2 -2
NTP_4_2_6P2_RC1
- packageinfo.sh@1.269 +2 -2
+ packageinfo.sh@1.255.10.2 +2 -2
NTP_4_2_6P2_RC1
- sntp/sntp-opts.c@1.125 +2 -2
+ sntp/sntp-opts.c@1.117.8.1 +2 -2
NTP_4_2_6P2_RC1
- sntp/sntp-opts.h@1.125 +3 -3
+ sntp/sntp-opts.h@1.117.8.1 +3 -3
NTP_4_2_6P2_RC1
- sntp/sntp-opts.texi@1.125 +2 -2
+ sntp/sntp-opts.texi@1.117.8.1 +2 -2
NTP_4_2_6P2_RC1
- sntp/sntp.1@1.125 +2 -2
+ sntp/sntp.1@1.117.8.1 +2 -2
NTP_4_2_6P2_RC1
- sntp/sntp.html@1.15 +1 -1
+ sntp/sntp.html@1.7.8.1 +1 -1
NTP_4_2_6P2_RC1
- util/ntp-keygen-opts.c@1.255 +2 -2
+ util/ntp-keygen-opts.c@1.247.8.1 +2 -2
NTP_4_2_6P2_RC1
- util/ntp-keygen-opts.h@1.255 +3 -3
+ util/ntp-keygen-opts.h@1.247.8.1 +3 -3
NTP_4_2_6P2_RC1
- util/ntp-keygen-opts.texi@1.254 +2 -2
+ util/ntp-keygen-opts.texi@1.246.8.1 +2 -2
NTP_4_2_6P2_RC1
- util/ntp-keygen.1@1.254 +2 -2
+ util/ntp-keygen.1@1.246.8.1 +2 -2
NTP_4_2_6P2_RC1
-ChangeSet@1.2162, 2010-04-18 03:57:37-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.75, 2010-04-18 03:57:37-04:00, stenn@deacon.udel.edu
4.2.6p2-RC1
- packageinfo.sh@1.268 +1 -1
+ packageinfo.sh@1.255.10.1 +1 -1
4.2.6p2-RC1
-ChangeSet@1.2161, 2010-04-16 13:59:44+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.74, 2010-04-16 13:59:44+00:00, davehart@shiny.ad.hartbrothers.com
fix backport (should have copied and pasted from -dev).
- sntp/networking.c@1.32 +2 -2
+ sntp/networking.c@1.29.1.3 +2 -2
fix backport (should have copied and pasted from -dev).
-ChangeSet@1.2158, 2010-04-14 21:16:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.71, 2010-04-14 21:16:25+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1518] Windows ntpd should lock to one processor more
conservatively.
- ChangeLog@1.613.2.1 +5 -0
+ ChangeLog@1.496.44.1 +5 -0
[Bug 1518] Windows ntpd should lock to one processor more
conservatively.
applies to previous changeset, deferred to ease pulling the
prior changeset into -dev ahead of -stable.
-ChangeSet@1.2156.2.2, 2010-04-14 20:55:27+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.19.2, 2010-04-14 20:55:27+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
Update html/authopt.html controlkey, requestkey, and trustedkey docs.
- ChangeLog@1.613.1.1 +5 -0
+ ChangeLog@1.496.43.1 +5 -0
[Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
Update html/authopt.html controlkey, requestkey, and trustedkey docs.
@@ -6726,298 +115124,838 @@ ChangeSet@1.2156.2.2, 2010-04-14 20:55:27+00:00, davehart@shiny.ad.hartbrothers.
add range syntax to trustedkey docs.
-ChangeSet@1.2156.1.3, 2010-04-14 04:44:52+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.18.3, 2010-04-14 04:44:52+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
[Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
"restrict ... limited" is used.
- ChangeLog@1.615 +6 -0
+ ChangeLog@1.496.26.48 +6 -0
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
[Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
"restrict ... limited" is used.
- include/ntp.h@1.169 +25 -16
+ include/ntp.h@1.168.1.1 +25 -16
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- include/ntp_lists.h@1.2 +163 -10
+ include/ntp_lists.h@1.1.1.1 +163 -10
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- include/ntp_net.h@1.4 +34 -13
+ include/ntp_net.h@1.3.1.1 +34 -13
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- include/ntpd.h@1.138 +4 -4
+ include/ntpd.h@1.137.2.1 +4 -4
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- ntpd/ntp_io.c@1.310 +2 -2
+ ntpd/ntp_io.c@1.306.1.4 +2 -2
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- ntpd/ntp_monitor.c@1.26 +4 -4
+ ntpd/ntp_monitor.c@1.25.1.1 +4 -4
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- ntpd/ntp_request.c@1.83 +72 -37
+ ntpd/ntp_request.c@1.82.1.1 +72 -37
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- ntpd/ntp_restrict.c@1.28 +448 -429
+ ntpd/ntp_restrict.c@1.27.1.1 +448 -429
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- ntpdate/ntpdate.c@1.70 +63 -55
+ ntpdate/ntpdate.c@1.69.1.1 +63 -55
[Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
"restrict ... limited" is used.
- ntpdate/ntpdate.h@1.11 +2 -1
+ ntpdate/ntpdate.h@1.10.1.1 +2 -1
[Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
"restrict ... limited" is used.
- ntpdc/ntpdc_ops.c@1.63 +3 -3
+ ntpdc/ntpdc_ops.c@1.62.1.1 +3 -3
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
- sntp/networking.c@1.31 +2 -2
+ sntp/networking.c@1.29.1.2 +2 -2
[Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
-ChangeSet@1.2156.2.1, 2010-04-10 02:26:43+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2116, 2010-04-13 21:19:19+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P24
+ TAG: NTP_4_2_7P24
+
+ ChangeLog@1.557 +1 -0
+ NTP_4_2_7P24
+
+ ntpd/ntpd-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpd/ntpd-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ ntpd/ntpd-opts.texi@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpd/ntpd.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpdc/ntpdc-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpdc/ntpdc-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ ntpdc/ntpdc-opts.texi@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpdc/ntpdc.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpq/ntpq-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpq/ntpq-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ ntpq/ntpq-opts.texi@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpq/ntpq.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.25 +1 -1
+ NTP_4_2_7P24
+
+ ntpsnmpd/ntpsnmpd.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ packageinfo.sh@1.26 +1 -1
+ NTP_4_2_7P24
+
+ sntp/sntp-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ sntp/sntp-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ sntp/sntp-opts.texi@1.25 +2 -2
+ NTP_4_2_7P24
+
+ sntp/sntp.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ sntp/sntp.html@1.25 +1 -1
+ NTP_4_2_7P24
+
+ util/ntp-keygen-opts.c@1.25 +2 -2
+ NTP_4_2_7P24
+
+ util/ntp-keygen-opts.h@1.25 +3 -3
+ NTP_4_2_7P24
+
+ util/ntp-keygen-opts.texi@1.25 +2 -2
+ NTP_4_2_7P24
+
+ util/ntp-keygen.1@1.25 +2 -2
+ NTP_4_2_7P24
+
+ChangeSet@1.2115, 2010-04-13 02:04:47-04:00, stenn@pogo.udel.edu
+ [Bug 1390] Control PPS on the Oncore M12
+
+ ChangeLog@1.556 +1 -0
+ [Bug 1390] Control PPS on the Oncore M12
+
+ChangeSet@1.2112.7.1, 2010-04-13 00:31:34-04:00, stenn@deacon.udel.edu
+ accopt.html: non-ntpport doc changes from Dave Mills
+
+ ChangeLog@1.551.2.1 +1 -0
+ accopt.html: non-ntpport doc changes from Dave Mills
+
+ html/accopt.html@1.33.1.1 +7 -8
+ accopt.html: non-ntpport doc changes from Dave Mills
+
+ChangeSet@1.2112.6.3, 2010-04-12 06:50:58+00:00, davehart@shiny.ad.hartbrothers.com
+ Hal Murray caught another html/manyopt.html typo.
+
+ html/manyopt.html@1.23 +1 -1
+ Hal Murray caught another html/manyopt.html typo.
+
+ChangeSet@1.2112.6.2, 2010-04-12 06:17:50+00:00, davehart@shiny.ad.hartbrothers.com
+ Rephrase awkward pool description, correct "descovery" typo.
+
+ html/manyopt.html@1.22 +10 -11
+ Rephrase awkward pool description, correct "descovery" typo
+ (thanks Hal Murray)
+
+ChangeSet@1.2112.6.1, 2010-04-11 23:13:44+00:00, davehart@shiny.ad.hartbrothers.com
+ Documentation updates for 4.2.7p22 changes and additions, updating
+ ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
+ miscopt.html, and miscopt.txt.
+ Modify full MRU list preemption when full to match "discard monitor"
+ documentation, by removing exception for count == 1.
+
+ ChangeLog@1.551.1.1 +5 -0
+ Documentation updates for 4.2.7p22 changes and additions, updating
+ ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
+ miscopt.html, and miscopt.txt.
+ Modify full MRU list preemption when full to match "discard monitor"
+ documentation, by removing exception for count == 1.
+
+
+ html/accopt.html@1.34 +19 -12
+ clarify "discard monitor".
+ clarify "restrict default", add "restrict source".
+ be more explicit about futility of kod restriction without limited.
+
+ html/confopt.html@1.49 +7 -6
+ correct link for automatic server discovery info from pool command.
+
+ html/manyopt.html@1.21 +20 -7
+ Document fully-formed "pool" command that act much like
+ "manycastclient".
+
+ html/miscopt.html@1.54 +37 -6
+ change "disable monitor" documentation to explain automatic
+ enabling by "restrict ... limited" and refer to ntpq's mrulist
+ instead of ntpdc's monlist.
+ correct logconfig's second example.
+ add "mru" command to set MRU list limits.
+
+ html/ntpdc.html@1.31 +2 -2
+ Note 600 row limitation of ntpdc -c monlist, refer to ntpq -c mrulist.
+
+ html/ntpq.html@1.40 +64 -1
+ add "mrulist", "monstats", "sysstats" commands.
+
+ html/scripts/miscopt.txt@1.4 +1 -0
+ add "mru" command
+
+ ntpd/ntp_monitor.c@1.34 +3 -11
+ Modify full MRU list preemption when full to match "discard monitor"
+ documentation, by removing exception for count == 1.
+
+ChangeSet@1.2112.1.20, 2010-04-10 03:55:22+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1520] '%u' formats for size_t gives warnings with 64-bit builds.
+
+ applies to prior merge
+
+ ChangeLog@1.553 +1 -0
+ [Bug 1520] '%u' formats for size_t gives warnings with 64-bit builds.
+
+ChangeSet@1.2112.1.18, 2010-04-10 03:29:56+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1518] Windows ntpd should lock to one processor more
+ conservatively.
[Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
+
+ covers previous two merges
- include/ntp_config.h@1.68 +7 -5
+ ChangeLog@1.552 +3 -0
+ [Bug 1518] Windows ntpd should lock to one processor more
+ conservatively.
+ [Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
+
+ChangeSet@1.2082.19.1, 2010-04-10 02:26:43+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
+
+ include/ntp_config.h@1.66.2.1 +7 -5
add u_int u to attr_val.value union.
- include/ntp_stdlib.h@1.41 +2 -0
+ include/ntp_stdlib.h@1.40.1.1 +2 -0
add extern ref to int cache_key from authkeys.c
- ntpd/complete.conf@1.4 +1 -1
+ ntpd/complete.conf@1.3.1.1 +1 -1
add key ranges to trustedkey
- ntpd/keyword-gen-utd@1.2 +1 -1
+ ntpd/keyword-gen-utd@1.1.1.1 +1 -1
to indicate ntp_keyword.h is current with keyword-gen.c
- ntpd/keyword-gen.c@1.6 +1 -0
+ ntpd/keyword-gen.c@1.5.1.1 +1 -0
add T_Ellipsis "..." for
trustedkey (1...65533) 65534
syntax support.
- ntpd/ntp_config.c@1.244 +45 -14
+ ntpd/ntp_config.c@1.241.1.3 +45 -14
support key ranges for trustedkey
- ntpd/ntp_keyword.h@1.4 +848 -844
+ ntpd/ntp_keyword.h@1.3.1.1 +848 -844
add "..." T_Ellipsis
- ntpd/ntp_parser.c@1.53 +918 -894
+ ntpd/ntp_parser.c@1.52.1.1 +918 -894
Bison output
- ntpd/ntp_parser.h@1.33 +265 -263
+ ntpd/ntp_parser.h@1.32.1.1 +265 -263
Bison output
- ntpd/ntp_parser.y@1.48 +23 -1
+ ntpd/ntp_parser.y@1.47.1.1 +23 -1
support key ranges for trustedkey
-ChangeSet@1.2156.1.2, 2010-04-09 08:15:04+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2112.3.2, 2010-04-09 12:33:43-04:00, perlinger@psp-deb1.ntp.org
+ fixed minor format glitch in ntpd/ntpd.c
+
+ ntpd/ntpd.c@1.110.1.7 +4 -1
+ parametric length in format strings must be 'int' -- fixed that in 'change_logfile()'
+
+ChangeSet@1.2082.18.2, 2010-04-09 08:15:04+00:00, stenn@deacon.udel.edu
NTP_4_2_6P1
TAG: NTP_4_2_6P1
- ChangeLog@1.614 +1 -0
+ ChangeLog@1.496.26.47 +1 -0
NTP_4_2_6P1
- ntpd/ntpd-opts.c@1.255 +2 -2
+ ntpd/ntpd-opts.c@1.248.7.1 +2 -2
NTP_4_2_6P1
- ntpd/ntpd-opts.h@1.255 +3 -3
+ ntpd/ntpd-opts.h@1.248.7.1 +3 -3
NTP_4_2_6P1
- ntpd/ntpd-opts.texi@1.253 +2 -2
+ ntpd/ntpd-opts.texi@1.246.7.1 +2 -2
NTP_4_2_6P1
- ntpd/ntpd.1@1.253 +2 -2
+ ntpd/ntpd.1@1.246.7.1 +2 -2
NTP_4_2_6P1
- ntpdc/ntpdc-opts.c@1.251 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.7.1 +2 -2
NTP_4_2_6P1
- ntpdc/ntpdc-opts.h@1.251 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.7.1 +3 -3
NTP_4_2_6P1
- ntpdc/ntpdc-opts.texi@1.250 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.7.1 +2 -2
NTP_4_2_6P1
- ntpdc/ntpdc.1@1.250 +2 -2
+ ntpdc/ntpdc.1@1.243.7.1 +2 -2
NTP_4_2_6P1
- ntpq/ntpq-opts.c@1.252 +2 -2
+ ntpq/ntpq-opts.c@1.245.7.1 +2 -2
NTP_4_2_6P1
- ntpq/ntpq-opts.h@1.252 +3 -3
+ ntpq/ntpq-opts.h@1.245.7.1 +3 -3
NTP_4_2_6P1
- ntpq/ntpq-opts.texi@1.251 +2 -2
+ ntpq/ntpq-opts.texi@1.244.7.1 +2 -2
NTP_4_2_6P1
- ntpq/ntpq.1@1.251 +2 -2
+ ntpq/ntpq.1@1.244.7.1 +2 -2
NTP_4_2_6P1
- ntpsnmpd/ntpsnmpd-opts.c@1.130 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.7.1 +2 -2
NTP_4_2_6P1
- ntpsnmpd/ntpsnmpd-opts.h@1.130 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.7.1 +3 -3
NTP_4_2_6P1
- ntpsnmpd/ntpsnmpd-opts.texi@1.130 +1 -1
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.7.1 +1 -1
NTP_4_2_6P1
- ntpsnmpd/ntpsnmpd.1@1.129 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.7.1 +2 -2
NTP_4_2_6P1
- packageinfo.sh@1.267 +2 -2
+ packageinfo.sh@1.255.9.2 +2 -2
NTP_4_2_6P1
- sntp/sntp-opts.c@1.124 +2 -2
+ sntp/sntp-opts.c@1.117.7.1 +2 -2
NTP_4_2_6P1
- sntp/sntp-opts.h@1.124 +3 -3
+ sntp/sntp-opts.h@1.117.7.1 +3 -3
NTP_4_2_6P1
- sntp/sntp-opts.texi@1.124 +2 -2
+ sntp/sntp-opts.texi@1.117.7.1 +2 -2
NTP_4_2_6P1
- sntp/sntp.1@1.124 +2 -2
+ sntp/sntp.1@1.117.7.1 +2 -2
NTP_4_2_6P1
- sntp/sntp.html@1.14 +1 -1
+ sntp/sntp.html@1.7.7.1 +1 -1
NTP_4_2_6P1
- util/ntp-keygen-opts.c@1.254 +2 -2
+ util/ntp-keygen-opts.c@1.247.7.1 +2 -2
NTP_4_2_6P1
- util/ntp-keygen-opts.h@1.254 +3 -3
+ util/ntp-keygen-opts.h@1.247.7.1 +3 -3
NTP_4_2_6P1
- util/ntp-keygen-opts.texi@1.253 +2 -2
+ util/ntp-keygen-opts.texi@1.246.7.1 +2 -2
NTP_4_2_6P1
- util/ntp-keygen.1@1.253 +2 -2
+ util/ntp-keygen.1@1.246.7.1 +2 -2
NTP_4_2_6P1
-ChangeSet@1.2156.1.1, 2010-04-09 03:43:19-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.18.1, 2010-04-09 03:43:19-04:00, stenn@deacon.udel.edu
Release ntp-4.2.6p1
NEWS@1.106 +14 -0
Release ntp-4.2.6p1
- packageinfo.sh@1.266 +1 -1
+ packageinfo.sh@1.255.9.1 +1 -1
Release ntp-4.2.6p1
-ChangeSet@1.2157, 2010-04-06 05:37:52+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2112.3.1, 2010-04-06 19:08:47+02:00, jnperlin@hydra.localnet
+ fix format string warnings (64-bit); avoid (m)syslog format string attacks
+
+ ntpd/ntp_config.c@1.259 +4 -4
+ format 'size_t' with '%lu' (64-bit issue)
+
+ ntpd/ntp_control.c@1.137 +2 -2
+ avoid possible format string attack to msyslog()
+
+ ntpd/ntp_intres.c@1.88 +4 -4
+ format 'size_t' with '%lu' (64-bit issue)
+
+ ntpd/ntp_request.c@1.91 +7 -7
+ format 'size_t' with '%lu' (64-bit issue)
+
+ ntpd/ntp_scanner.c@1.34 +3 -3
+ format 'size_t' with '%lu' (64-bit issue); fixed is_special() (also 64-bit trouble)
+
+ ntpd/ntpd.c@1.110.1.6 +3 -3
+ format 'size_t' with '%lu' (64-bit issue); avoid possible format string attack to msyslog()
+
+ ntpd/refclock_acts.c@1.37 +2 -2
+ format 'size_t' with '%lu' (64-bit issue)
+
+ ntpd/work_fork.c@1.3 +8 -8
+ format 'size_t' with '%lu' (64-bit issue)
+
+ ntpdc/ntpdc.c@1.83 +7 -7
+ format 'size_t' with '%lu' (64-bit issue)
+
+ sntp/log.c@1.13 +2 -2
+ avoid possible format string attack to syslog()
+
+ChangeSet@1.2082.4.70, 2010-04-06 05:37:52+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1518] Windows ntpd should lock to one processor more
conservatively.
- ports/winnt/ntpd/nt_clockstuff.c@1.39 +144 -108
+ ports/winnt/ntpd/nt_clockstuff.c@1.38.1.1 +144 -108
[Bug 1518] Windows ntpd should lock to one processor more
conservatively.
-ChangeSet@1.2156, 2010-04-01 03:33:20-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2112.1.15, 2010-04-04 10:09:44+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P23
+ TAG: NTP_4_2_7P23
+
+ ChangeLog@1.550 +1 -0
+ NTP_4_2_7P23
+
+ ntpd/ntpd-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpd/ntpd-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ ntpd/ntpd-opts.texi@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpd/ntpd.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpdc/ntpdc-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpdc/ntpdc-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ ntpdc/ntpdc-opts.texi@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpdc/ntpdc.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpq/ntpq-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpq/ntpq-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ ntpq/ntpq-opts.texi@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpq/ntpq.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.24 +1 -1
+ NTP_4_2_7P23
+
+ ntpsnmpd/ntpsnmpd.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ packageinfo.sh@1.25 +1 -1
+ NTP_4_2_7P23
+
+ sntp/sntp-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ sntp/sntp-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ sntp/sntp-opts.texi@1.24 +2 -2
+ NTP_4_2_7P23
+
+ sntp/sntp.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ sntp/sntp.html@1.24 +1 -1
+ NTP_4_2_7P23
+
+ util/ntp-keygen-opts.c@1.24 +2 -2
+ NTP_4_2_7P23
+
+ util/ntp-keygen-opts.h@1.24 +3 -3
+ NTP_4_2_7P23
+
+ util/ntp-keygen-opts.texi@1.24 +2 -2
+ NTP_4_2_7P23
+
+ util/ntp-keygen.1@1.24 +2 -2
+ NTP_4_2_7P23
+
+ChangeSet@1.2112.1.14, 2010-04-04 04:07:40+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1516] unpeer by IP address fails, DNS name works.
+ [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
+ ntpq and ntpdc now use the following format for showing purported
+ DNS names from IP address "reverse" DNS lookups when the DNS name
+ does not exist or does not include the original IP address among
+ the results: "192.168.1.2 (fake.dns.local)".
+
+ ChangeLog@1.549 +6 -0
+ [Bug 1516] unpeer by IP address fails, DNS name works.
+ [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
+ ntpq and ntpdc now use the following format for showing purported
+ DNS names from IP address "reverse" DNS lookups when the DNS name
+ does not exist or does not include the original IP address among
+ the results: "192.168.1.2 (fake.dns.local)".
+
+ libntp/socktohost.c@1.9 +66 -6
+ [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
+ ntpq and ntpdc now use the following format for showing purported
+ DNS names from IP address "reverse" DNS lookups when the DNS name
+ does not exist or does not include the original IP address among
+ the results: "192.168.1.2 (fake.dns.local)".
+
+ ntpd/ntp_config.c@1.258 +7 -14
+ * [Bug 1516] unpeer by IP address fails, DNS name works.
+
+ ntpq/ntpq.c@1.112 +7 -7
+ [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
+ ntpq and ntpdc now use the following format for showing purported
+ DNS names from IP address "reverse" DNS lookups when the DNS name
+ does not exist or does not include the original IP address among
+ the results: "192.168.1.2 (fake.dns.local)".
+
+ChangeSet@1.2112.1.13, 2010-04-02 02:08:59+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P22
+ TAG: NTP_4_2_7P22
+
+ ChangeLog@1.548 +1 -0
+ NTP_4_2_7P22
+
+ ntpd/ntpd-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpd/ntpd-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ ntpd/ntpd-opts.texi@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpd/ntpd.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpdc/ntpdc-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpdc/ntpdc-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ ntpdc/ntpdc-opts.texi@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpdc/ntpdc.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpq/ntpq-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpq/ntpq-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ ntpq/ntpq-opts.texi@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpq/ntpq.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.23 +1 -1
+ NTP_4_2_7P22
+
+ ntpsnmpd/ntpsnmpd.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ packageinfo.sh@1.24 +1 -1
+ NTP_4_2_7P22
+
+ sntp/sntp-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ sntp/sntp-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ sntp/sntp-opts.texi@1.23 +2 -2
+ NTP_4_2_7P22
+
+ sntp/sntp.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ sntp/sntp.html@1.23 +1 -1
+ NTP_4_2_7P22
+
+ util/ntp-keygen-opts.c@1.23 +2 -2
+ NTP_4_2_7P22
+
+ util/ntp-keygen-opts.h@1.23 +3 -3
+ NTP_4_2_7P22
+
+ util/ntp-keygen-opts.texi@1.23 +2 -2
+ NTP_4_2_7P22
+
+ util/ntp-keygen.1@1.23 +2 -2
+ NTP_4_2_7P22
+
+ChangeSet@1.2082.4.69, 2010-04-01 03:33:20-04:00, stenn@deacon.udel.edu
lose whimsy from br-flock
br-flock@1.13 +1 -1
lose whimsy from br-flock
-ChangeSet@1.2155, 2010-03-31 08:45:31+00:00, stenn@deacon.udel.edu
+ChangeSet@1.2112.1.11, 2010-04-01 03:20:04-04:00, stenn@deacon.udel.edu
+ [Bug 1465] Make sure time from TS2100 is not invalid
+
+ ChangeLog@1.547 +1 -0
+ [Bug 1465] Make sure time from TS2100 is not invalid
+
+ ntpd/refclock_true.c@1.12 +2 -1
+ [Bug 1465] Make sure time from TS2100 is not invalid
+
+ChangeSet@1.2112.1.10, 2010-04-01 03:13:14-04:00, stenn@deacon.udel.edu
+ [Bug 1432] Don't set inheritable flag for linux capabilities
+
+ ChangeLog@1.546 +1 -0
+ [Bug 1432] Don't set inheritable flag for linux capabilities
+
+ ntpd/ntpd.c@1.110.1.5 +2 -2
+ [Bug 1432] Don't set inheritable flag for linux capabilities
+
+ChangeSet@1.2112.2.7, 2010-03-31 09:16:48+00:00, stenn@deacon.udel.edu
+ NTP_4_2_7P21
+ TAG: NTP_4_2_7P21
+
+ ChangeLog@1.543.1.3 +1 -0
+ NTP_4_2_7P21
+
+ ntpd/ntpd-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpd/ntpd-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ ntpd/ntpd-opts.texi@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpd/ntpd.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpdc/ntpdc-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpdc/ntpdc-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ ntpdc/ntpdc-opts.texi@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpdc/ntpdc.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpq/ntpq-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpq/ntpq-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ ntpq/ntpq-opts.texi@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpq/ntpq.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.22 +2 -23
+ NTP_4_2_7P21
+
+ ntpsnmpd/ntpsnmpd.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ packageinfo.sh@1.23 +1 -1
+ NTP_4_2_7P21
+
+ sntp/sntp-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ sntp/sntp-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ sntp/sntp-opts.texi@1.22 +2 -2
+ NTP_4_2_7P21
+
+ sntp/sntp.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ sntp/sntp.html@1.22 +10 -14
+ NTP_4_2_7P21
+
+ util/ntp-keygen-opts.c@1.22 +2 -2
+ NTP_4_2_7P21
+
+ util/ntp-keygen-opts.h@1.22 +3 -3
+ NTP_4_2_7P21
+
+ util/ntp-keygen-opts.texi@1.22 +2 -2
+ NTP_4_2_7P21
+
+ util/ntp-keygen.1@1.22 +2 -2
+ NTP_4_2_7P21
+
+ChangeSet@1.2082.4.68, 2010-03-31 08:45:31+00:00, stenn@deacon.udel.edu
NTP_4_2_6P1_RC6
TAG: NTP_4_2_6P1_RC6
- ChangeLog@1.613 +1 -0
+ ChangeLog@1.496.26.46 +1 -0
NTP_4_2_6P1_RC6
- ntpd/ntpd-opts.c@1.254 +2 -2
+ ntpd/ntpd-opts.c@1.248.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpd/ntpd-opts.h@1.254 +3 -3
+ ntpd/ntpd-opts.h@1.248.6.1 +3 -3
NTP_4_2_6P1_RC6
- ntpd/ntpd-opts.texi@1.252 +2 -2
+ ntpd/ntpd-opts.texi@1.246.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpd/ntpd.1@1.252 +2 -2
+ ntpd/ntpd.1@1.246.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpdc/ntpdc-opts.c@1.250 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpdc/ntpdc-opts.h@1.250 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.6.1 +3 -3
NTP_4_2_6P1_RC6
- ntpdc/ntpdc-opts.texi@1.249 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpdc/ntpdc.1@1.249 +2 -2
+ ntpdc/ntpdc.1@1.243.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpq/ntpq-opts.c@1.251 +2 -2
+ ntpq/ntpq-opts.c@1.245.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpq/ntpq-opts.h@1.251 +3 -3
+ ntpq/ntpq-opts.h@1.245.6.1 +3 -3
NTP_4_2_6P1_RC6
- ntpq/ntpq-opts.texi@1.250 +2 -2
+ ntpq/ntpq-opts.texi@1.244.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpq/ntpq.1@1.250 +2 -2
+ ntpq/ntpq.1@1.244.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpsnmpd/ntpsnmpd-opts.c@1.129 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.6.1 +2 -2
NTP_4_2_6P1_RC6
- ntpsnmpd/ntpsnmpd-opts.h@1.129 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.6.1 +3 -3
NTP_4_2_6P1_RC6
- ntpsnmpd/ntpsnmpd-opts.texi@1.129 +2 -23
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.6.1 +2 -23
NTP_4_2_6P1_RC6
- ntpsnmpd/ntpsnmpd.1@1.128 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.6.1 +2 -2
NTP_4_2_6P1_RC6
- packageinfo.sh@1.265 +1 -1
+ packageinfo.sh@1.255.8.1 +1 -1
NTP_4_2_6P1_RC6
- sntp/sntp-opts.c@1.123 +2 -2
+ sntp/sntp-opts.c@1.117.6.1 +2 -2
NTP_4_2_6P1_RC6
- sntp/sntp-opts.h@1.123 +3 -3
+ sntp/sntp-opts.h@1.117.6.1 +3 -3
NTP_4_2_6P1_RC6
- sntp/sntp-opts.texi@1.123 +2 -2
+ sntp/sntp-opts.texi@1.117.6.1 +2 -2
NTP_4_2_6P1_RC6
- sntp/sntp.1@1.123 +2 -2
+ sntp/sntp.1@1.117.6.1 +2 -2
NTP_4_2_6P1_RC6
- sntp/sntp.html@1.13 +10 -14
+ sntp/sntp.html@1.7.6.1 +10 -14
NTP_4_2_6P1_RC6
- util/ntp-keygen-opts.c@1.253 +2 -2
+ util/ntp-keygen-opts.c@1.247.6.1 +2 -2
NTP_4_2_6P1_RC6
- util/ntp-keygen-opts.h@1.253 +3 -3
+ util/ntp-keygen-opts.h@1.247.6.1 +3 -3
NTP_4_2_6P1_RC6
- util/ntp-keygen-opts.texi@1.252 +2 -2
+ util/ntp-keygen-opts.texi@1.246.6.1 +2 -2
NTP_4_2_6P1_RC6
- util/ntp-keygen.1@1.252 +2 -2
+ util/ntp-keygen.1@1.246.6.1 +2 -2
NTP_4_2_6P1_RC6
-ChangeSet@1.2154, 2010-03-31 04:14:28-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.67, 2010-03-31 04:14:28-04:00, stenn@deacon.udel.edu
Quiet some trigger debugging
- BitKeeper/triggers/triggert@1.8 +1 -1
+ BitKeeper/triggers/triggert@1.6.1.2 +1 -1
Quiet some trigger debugging
-ChangeSet@1.2153, 2010-03-31 04:11:55-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.66, 2010-03-31 04:11:55-04:00, stenn@deacon.udel.edu
[Bug 1514] Typo in ntp_proto.c: fabs(foo < .4) should be fabs(foo) < .4
- ChangeLog@1.612 +1 -0
+ ChangeLog@1.496.26.45 +1 -0
[Bug 1514] Typo in ntp_proto.c: fabs(foo < .4) should be fabs(foo) < .4
- ntpd/ntp_proto.c@1.298 +1 -1
+ ntpd/ntp_proto.c@1.297.2.1 +1 -1
[Bug 1514] Typo in ntp_proto.c: fabs(foo < .4) should be fabs(foo) < .4
-ChangeSet@1.2152, 2010-03-31 03:17:27-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.65, 2010-03-31 03:17:27-04:00, stenn@deacon.udel.edu
+ trigger cleanup
+
+ BitKeeper/triggers/trigger.README@1.4.1.1 +5 -3
+ trigger cleanup
+
+ BitKeeper/triggers/trigger.cfg@1.12.1.1 +6 -0
+ trigger cleanup
+
+ BitKeeper/triggers/trigger.mk@1.9.1.1 +3 -1
+ trigger cleanup
+
+ BitKeeper/triggers/triggert@1.6.1.1 +17 -6
+ trigger cleanup
+
+ChangeSet@1.2112.2.3, 2010-03-31 03:13:36-04:00, stenn@deacon.udel.edu
trigger cleanup
BitKeeper/triggers/trigger.README@1.5 +5 -3
@@ -7032,13 +115970,1483 @@ ChangeSet@1.2152, 2010-03-31 03:17:27-04:00, stenn@deacon.udel.edu
BitKeeper/triggers/triggert@1.7 +17 -6
trigger cleanup
-ChangeSet@1.2151, 2010-03-29 05:16:32-04:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.64, 2010-03-29 05:16:32-04:00, stenn@deacon.udel.edu
With the new bk, the trigger push needs the -q (quiet) flag
BitKeeper/triggers/2mirrors@1.5 +3 -3
With the new bk, the trigger push needs the -q (quiet) flag
-ChangeSet@1.2150, 2010-02-15 23:19:19+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2112.2.1, 2010-03-25 23:40:34-04:00, stenn@deacon.udel.edu
+ whitespace cleanup
+
+ html/copyright.html@1.48 +1 -1
+ whitespace cleanup
+
+ChangeSet@1.2112.1.8, 2010-03-25 16:12:20+00:00, davehart@shiny.ad.hartbrothers.com
+ ntpq-subs.c:
+ Add ntpq "mrulist limited" and "mrulist kod" support, equivalent to
+ ntpq -c "mrulist resany=0x20" and ntpq -c "mrulist resany=0x400"
+ respectively.
+ Add "r" rate limiting column to mrulist output containing a period,
+ or K for KoD sent in response to last packet, or L for no response
+ to last packet due to rate limiting. These are redundant with bits
+ 0x400 and 0x20 in the rstr column and treated differently than other
+ restrict bits, reflecting not if the restriction bit is enabled for
+ the remote address, but if RES_KOD or RES_LIMITED handling was
+ triggered by the last packet from them.
+ it.
+ ntp.h, ntpdc_ops.c, ntp_proto.c, ntp_config.c:
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses).
+ ntp_intres.c:
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses), eliminating
+ conflict with RES_TIMEOUT provided by some systems DNS headers.
+
+ include/ntp.h@1.177 +2 -2
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses).
+
+ ntpd/ntp_config.c@1.257 +1 -1
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses).
+
+ ntpd/ntp_intres.c@1.87 +0 -3
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses), eliminating
+ conflict with RES_TIMEOUT provided by some systems DNS headers.
+
+ ntpd/ntp_proto.c@1.297.1.12 +1 -1
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses).
+
+ ntpdc/ntpdc_ops.c@1.66 +1 -1
+ rename RES_TIMEOUT to RES_FLAKE to reflect v4 use (as a flakeway which
+ drops 10% of incoming packets from matching addresses).
+
+ ntpq/ntpq-subs.c@1.64 +25 -5
+ Add ntpq "mrulist limited" and "mrulist kod" support, equivalent to
+ ntpq -c "mrulist resany=0x20" and ntpq -c "mrulist resany=0x400"
+ respectively.
+ Add "r" rate limiting column to mrulist output containing a period,
+ or K for KoD sent in response to last packet, or L for no response
+ to last packet due to rate limiting. These are redundant with bits
+ 0x400 and 0x20 in the rstr column and treated differently than other
+ restrict bits, reflecting not if the restriction bit is enabled for
+ the remote address, but if RES_KOD or RES_LIMITED handling was
+ triggered by the last packet from them.
+ it.
+
+ChangeSet@1.2112.1.7, 2010-03-25 13:28:10+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_control.c:
+ use ctl_putts() instead of handrolled equivalent for read_mru_list().
+
+ ntpd/ntp_control.c@1.136 +9 -23
+ use ctl_putts() instead of handrolled equivalent for read_mru_list().
+
+ChangeSet@1.2112.1.6, 2010-03-25 03:54:17+00:00, davehart@shiny.ad.hartbrothers.com
+ ssl_init.c:
+ MAX_MAC_LEN will always be > sizeof(keyid_t) so make max_digest_len
+ const u_long instead of u_long, initialize unconditionally.
+
+ libntp/ssl_init.c@1.7 +7 -8
+ MAX_MAC_LEN will always be > sizeof(keyid_t) so make max_digest_len
+ const u_long instead of u_long, initialize unconditionally.
+
+ChangeSet@1.2110.1.30, 2010-03-25 01:42:06+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog:
+ Catch up ChangeLog with several weeks' changes.
+ ntpq-subs.c, ntp_peer.c, ntp_io.c, ntp_proto.c:
+ debug message cleanup for integration with ntp-dev
+
+ ChangeLog@1.541.1.2 +64 -1
+ Catch up ChangeLog with several weeks' changes.
+
+ ntpd/ntp_io.c@1.318 +2 -2
+ debug message cleanup for integration with ntp-dev
+
+ ntpd/ntp_peer.c@1.133 +0 -3
+ debug message cleanup for integration with ntp-dev
+
+ ntpd/ntp_proto.c@1.297.1.11 +1 -2
+ debug message cleanup for integration with ntp-dev
+
+ ntpq/ntpq-subs.c@1.63 +13 -14
+ debug message cleanup for integration with ntp-dev
+
+ChangeSet@1.2112.1.4, 2010-03-24 22:46:41+01:00, jnperlin@hydra.localnet
+ ntpq.c:
+ fix printf format warnings
+
+ ntpq/ntpq.c@1.100.1.1 +6 -6
+ fix printf format warnings
+
+ChangeSet@1.2112.1.3, 2010-03-24 20:04:35+01:00, jnperlin@hydra.localnet
+ ssl_init.c:
+ cast size_t expressions to u_long in formatting
+
+ libntp/ssl_init.c@1.6 +3 -3
+ cast size_t expressions to u_long in formatting
+
+ChangeSet@1.2112.1.2, 2010-03-23 22:05:52+01:00, jnperlin@hydra.localnet
+ ssl_init.c:
+ fixed printf format warnings
+
+ libntp/ssl_init.c@1.5 +7 -5
+ fixed printf format warnings
+
+ChangeSet@1.2112.1.1, 2010-03-23 20:40:52+01:00, jnperlin@hydra.localnet
+ ntp_fp.h:
+ fix prototype for 'dolfptoa'
+ dolfptoa.c:
+ avoid pointer wrap-around warnings, fixed prototype,
+ did some rework to make the implementation cleaner.
+
+ include/ntp_fp.h@1.16.1.1 +1 -1
+ fix prototype for 'dolfptoa'
+
+ libntp/dolfptoa.c@1.8 +62 -101
+ avoid pointer wrap-around warnings, fixed prototype,
+ did some rework to make the implementation cleaner.
+
+ChangeSet@1.2110.1.29, 2010-03-19 22:26:01+00:00, davehart@shiny.ad.hartbrothers.com
+ remove unused PEVNT_TAI
+
+ include/ntp.h@1.176 +0 -1
+ remove unused PEVNT_TAI
+
+ libntp/statestr.c@1.20 +0 -1
+ remove unused PEVNT_TAI
+
+ChangeSet@1.2110.1.28, 2010-03-19 04:09:05+00:00, davehart@shiny.ad.hartbrothers.com
+ Fine-tune "ntpq -c mrulimit" row limit backoff and growth after
+ testing over WiFi and a lossy go6.net UDP tunnel.
+
+ include/ntp.h@1.175 +2 -0
+ Add MRU_ROW_LIMIT to share between ntp_control.c and ntpq-subs.c
+
+ libntp/authusekey.c@1.9 +3 -5
+ eliminate redundant strlen()
+
+ ntpd/ntp_control.c@1.133.1.14 +2 -2
+ Add MRU_ROW_LIMIT to share between ntp_control.c and ntpq-subs.c,
+ use CERR_BADVALUE for error when exceeded.
+
+ ntpq/ntpq-subs.c@1.62 +11 -4
+ Add MRU_ROW_LIMIT to share between ntp_control.c and ntpq-subs.c,
+ use CERR_BADVALUE for error when exceeded.
+ Fine-tune row limit backoff and growth after testing over WiFi
+ and a lossy go6.net UDP tunnel.
+
+ ntpq/ntpq.c@1.110 +33 -17
+ Increase timeout for 2nd and later response packets from 2s to 3s,
+ elaborate on ntpq timeout behavior in comment.
+ Improve debug output in the case of a missing packet while
+ reassembling a response, making it easier to spot the hole.
+
+ ntpq/ntpq.h@1.15 +18 -2
+ Lower MAXFRAGS from experimental (never committed) 64 to 32, still
+ an increase over the historical value 24. Add comments exploring
+ impact of adjusting MAXFRAGS.
+
+ ports/winnt/include/config.h@1.86 +1 -1
+ note HAVE_STRCHR is left in for libopts (NTP itself requires
+ ANSI C which mandates strchr()).
+
+ChangeSet@1.2110.1.27, 2010-03-12 21:25:12+00:00, davehart@shiny.ad.hartbrothers.com
+ add "ntpq -c ifstats" modeled on "ntpdc -c ifstats"
+
+ include/ntp_control.h@1.45 +2 -1
+ add "ntpq -c ifstats" modeled on "ntpdc -c ifstats"
+
+ include/ntpd.h@1.137.1.13 +2 -0
+ add "ntpq -c ifstats" modeled on "ntpdc -c ifstats"
+
+ ntpd/ntp_control.c@1.133.1.13 +224 -47
+ add "ntpq -c ifstats" modeled on "ntpdc -c ifstats"
+
+ ntpd/ntp_io.c@1.317 +14 -9
+ expose sys_ifnum to ntp_control.c for ntpq -c ifstats.
+ add code to test if reset of addr_refid is needed.
+
+ ntpd/ntp_scanner.c@1.33 +3 -3
+ Do not abort on non-ASCII character in ntp.conf, ignore it.
+
+ ntpdc/ntpdc.c@1.82 +8 -11
+ correct "passwd" to only examine arg if present.
+
+ ntpq/ntpq-subs.c@1.61 +321 -45
+ add "ntpq -c ifstats" modeled on "ntpdc -c ifstats"
+
+ ntpq/ntpq.c@1.109 +13 -10
+ allow ntpq -c "passwd MYPASS" as with ntpdc
+
+ChangeSet@1.2110.1.26, 2010-03-10 03:02:42+00:00, davehart@shiny.ad.hartbrothers.com
+ Fetch 32 rows initially in ntpq -cmrulist.
+ Tweak runtime adjustment of limit in response to errors, now
+ will grow number of rows 50% each success and cut it in
+ half each failure.
+ Sleep 0.3s instead of 1s between requests in ntpq -cmrulist
+ on platforms that have nanosleep() or similar.
+
+ configure.ac@1.481 +34 -36
+ test for nanosleep() for ntpq -c mrulist
+
+ ntpd/ntp_control.c@1.133.1.12 +2 -2
+ change row limit for read_mru_list() to 256
+
+ ntpq/ntpq-subs.c@1.60 +14 -5
+ Fetch 32 rows initially in ntpq -cmrulist.
+ Tweak runtime adjustment of limit in response to errors, now
+ will grow number of rows 50% each success and cut it in
+ half each failure.
+ Sleep 0.3s instead of 1s between requests in ntpq -cmrulist
+ on platforms that have nanosleep() or similar.
+
+ChangeSet@1.2110.1.25, 2010-03-09 15:32:25+00:00, davehart@shiny.ad.hartbrothers.com
+ add "sort=count", "sort=-count" options to ntpq -c mrulist.
+
+ ntpq/ntpq-subs.c@1.59 +43 -0
+ add "sort=count", "sort=-count" options to ntpq -c mrulist.
+
+ChangeSet@1.2110.1.24, 2010-03-09 15:11:28+00:00, davehart@shiny.ad.hartbrothers.com
+ ntpq-subs.c:
+ use "sort=lstint" and "sort=-lstint" for default and reverse
+ default sort order of "ntpq -c mrulist"
+ ntp_control.c:
+ Attempt to enforce clients ignoring unknown tag=value pairs
+ in CTL_OP_READ_MRU (ntpq -c mrulist) by including a randomly-
+ named tag in the last row.
+
+ ntpd/ntp_control.c@1.133.1.11 +36 -10
+ Attempt to enforce clients ignoring unknown tag=value pairs
+ in CTL_OP_READ_MRU (ntpq -c mrulist) by including a randomly-
+ named tag in the last row.
+
+ ntpq/ntpq-subs.c@1.58 +2 -2
+ use "sort=lstint" and "sort=-lstint" for default and reverse
+ default sort order of "ntpq -c mrulist"
+
+ChangeSet@1.2110.1.23, 2010-03-09 03:32:38+00:00, davehart@shiny.ad.hartbrothers.com
+ add reverse sorting to ntpq -c mrulist, generalize.
+
+ include/ntp_lists.h@1.6 +15 -4
+ add REV_ITER_DLIST_BEGIN/END macros
+
+ ntpd/refclock_neoclock4x.c@1.18 +10 -10
+ leftover const chasing
+
+ ntpq/ntpq-subs.c@1.57 +94 -25
+ add reverse sorting to ntpq -c mrulist, generalize.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.27 +4 -0
+ add reference to ntpd/refclock_neoclock4x.c
+
+ChangeSet@1.2110.1.22, 2010-03-09 01:53:35+00:00, davehart@shiny.ad.hartbrothers.com
+ Add "sort=avgint" option to mrulist: ntpq -c "mru sort=avgint".
+ Add "sort=addr" option to mrulist to sort by remote address.
+ Remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ configure.ac@1.480 +0 -26
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ include/ntp_net.h@1.7 +5 -0
+ add SIZEOF_INADDR(family) macro to fetch sizeof either
+ struct in_addr or struct in_addr6.
+
+ ntpd/keyword-gen.c@1.10 +10 -16
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpd/ntp_refclock.c@1.91.1.4 +1 -29
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpd/refclock_msfees.c@1.14 +3 -23
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpd/refclock_mx4200.c@1.26 +0 -4
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpdc/ntpdc.c@1.81 +22 -43
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpq/ntpq-subs.c@1.56 +164 -17
+ Add "sort=avgint" option to mrulist: ntpq -c "mru sort=avgint".
+ Add "sort=addr" option to mrulist to sort by remote address.
+ Remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ntpq/ntpq.c@1.108 +11 -53
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ ports/winnt/include/config.h@1.85 +2 -2
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ util/hist.c@1.8 +16 -19
+ remove check for qsort() using other than void *, ANSI C is
+ required and it ensures void * for qsort().
+
+ChangeSet@1.2110.1.21, 2010-03-08 21:23:01+00:00, davehart@shiny.ad.hartbrothers.com
+ add support for filtering MRU list by interface (local addr):
+ ntpq -c "mru laddr=192.168.1.1"
+
+ include/ntpd.h@1.137.1.12 +3 -2
+ expose ntp_io.c getinterface() for ntp_control.c use.
+
+ ntpd/ntp_control.c@1.133.1.10 +133 -50
+ add support for filtering MRU list by interface (local addr):
+ ntpq -c "mru laddr=192.168.1.1"
+
+ ntpd/ntp_io.c@1.316 +1 -2
+ expose ntp_io.c getinterface() for ntp_control.c use.
+
+ ntpq/ntpq-subs.c@1.55 +7 -5
+ add support for filtering MRU list by interface (local addr):
+ ntpq -c "mru laddr=192.168.1.1"
+
+ChangeSet@1.2110.1.20, 2010-03-08 10:44:22+00:00, davehart@shiny.ad.hartbrothers.com
+ add "ntpq -c sysstats" modeled on "ntpdc -c sysstats"
+
+ include/ntp_control.h@1.44 +13 -2
+ expose variables needed for "ntpq -c sysstats" similar to "ntpdc -c sysstats"
+
+ ntpd/ntp_control.c@1.133.1.9 +74 -20
+ expose variables needed for "ntpq -c sysstats" similar to "ntpdc -c sysstats"
+
+ ntpd/ntp_proto.c@1.297.1.10 +2 -1
+ reset sys_kodsent in proto_clr_stats().
+
+ ntpd/ntp_request.c@1.90 +0 -3
+ remove no longer relevant comment
+
+ ntpq/libntpq.c@1.4 +106 -95
+ const chasing
+
+ ntpq/libntpq.h@1.4 +25 -17
+ const chasing
+
+ ntpq/libntpq_subs.c@1.3 +14 -3
+ const chasing
+
+ ntpq/ntpq-subs.c@1.54 +143 -48
+ add "ntpq -c sysstats" modeled on "ntpdc -c sysstats"
+
+ ntpq/ntpq.c@1.107 +26 -23
+ const chasing
+
+ ntpq/ntpq.h@1.14 +4 -4
+ const chasing
+
+ChangeSet@1.2110.1.19, 2010-03-07 20:01:29+00:00, davehart@shiny.ad.hartbrothers.com
+ rate limit ntpdate packets to 2s interval per server to stay
+ within the "restrict ... limited" default limit set by
+ "discard minimum 1", plus 1s of enforcement slop.
+ Respect KoD rate-limiting responses from ntpd.
+
+
+ ntpdate/ntpdate.c@1.73 +39 -11
+ rate limit ntpdate packets to 2s interval per server to stay
+ within the "restrict ... limited" default limit set by
+ "discard minimum 1", plus 1s of enforcement slop.
+ Respect KoD rate-limiting responses from ntpd.
+
+
+ ntpdate/ntpdate.h@1.11 +2 -1
+ rate limit ntpdate packets to 2s interval per server to stay
+ within the "restrict ... limited" default limit set by
+ "discard minimum 1", plus 1s of enforcement slop.
+
+ChangeSet@1.2110.1.18, 2010-03-07 17:36:49+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_util.c:
+ whitespace only
+ ntpq-subs.c:
+ split mrulist() into mrulist() and collect_mru_list().
+ adjust row limit based on success/failure of individual
+ queries for collect_mru_list().
+ revert to one MRU entry per IP address regardless of port.
+ ntp_monitor.c:
+ correct MRU list preemption logic.
+ revert to one MRU entry per IP address regardless of port.
+ ntp_control.h, ntp_control.c:
+ add "kod_sent" non-default system variable for sys_kodsent.
+ config.h:
+ #undef STRINGIZE after use to avoid accidentally using on
+ Windows without noticing it's specific to Windows port.
+ ntpq.c, ntpq.h:
+ move definitions to ntpq.h needed by mrulist code in
+ ntpq-subs.h.
+
+ include/ntp_control.h@1.43 +11 -9
+ add "kod_sent" non-default system variable for sys_kodsent.
+
+ ntpd/ntp_control.c@1.133.1.8 +66 -21
+ add "kod_sent" non-default system variable for sys_kodsent.
+
+ ntpd/ntp_monitor.c@1.33 +10 -3
+ correct MRU list preemption logic.
+ revert to one MRU entry per IP address regardless of port.
+
+ ntpd/ntp_util.c@1.81 +1 -1
+ whitespace only
+
+ ntpq/ntpq-subs.c@1.53 +155 -46
+ split mrulist() into mrulist() and collect_mru_list().
+ adjust row limit based on success/failure of individual
+ queries for collect_mru_list().
+ revert to one MRU entry per IP address regardless of port.
+
+ ntpq/ntpq.c@1.106 +4 -9
+ move definitions to ntpq.h needed by mrulist code in
+ ntpq-subs.h.
+
+ ntpq/ntpq.h@1.13 +11 -1
+ move definitions to ntpq.h needed by mrulist code in
+ ntpq-subs.h.
+
+ ports/winnt/include/config.h@1.84 +2 -0
+ #undef STRINGIZE after use to avoid accidentally using on
+ Windows without noticing it's specific to Windows port.
+
+ChangeSet@1.2110.1.17, 2010-03-05 19:22:27+00:00, davehart@shiny.ad.hartbrothers.com
+ ntpq-subs.c:
+ use ========= instead of --------- to separate column headings
+ from rows in mrulist().
+ ntp_config.c:
+ unpeer by hostname, needed to unpeer pool prototype
+ assocations.
+
+ ntpd/ntp_config.c@1.256 +72 -78
+ unpeer by hostname, needed to unpeer pool prototype
+ assocations.
+
+ ntpq/ntpq-subs.c@1.52 +1 -1
+ use ========= instead of --------- to separate column headings
+ from rows in mrulist().
+
+ChangeSet@1.2110.1.16, 2010-03-04 17:17:47+00:00, davehart@shiny.ad.hartbrothers.com
+ new "ntpq -c mrulist" along lines of "ntpdc -c monlist" but
+ without being limited to a single request response, and
+ designed to work reliably even with an arbitrarily large
+ MRU list.
+
+ include/ntp_fp.h@1.18 +1 -0
+ add sptoa()/sockporttoa() similar to stoa()/socktoa().
+
+ include/ntp_lists.h@1.5 +27 -5
+ add NEXT_DLIST(), PREV_DLIST(), LINK_TAIL_DLIST() macros.
+
+ include/ntp_stdlib.h@1.44 +3 -1
+ move sock_hash from ntpd/ntp_util.c to libntp/socktoa.c so
+ ntpq can use it.
+ add sptoa()/sockporttoa() similar to stoa()/socktoa().
+
+ include/ntpd.h@1.137.1.11 +6 -2
+ move sock_hash from ntpd/ntp_util.c to libntp/socktoa.c so
+ ntpq can use it.
+ expose MON_HASH(), mon_hash[] so ntp_control.c can use them.
+
+ libntp/decodenetnum.c@1.12 +40 -8
+ support 1.2.3.4:123, [2001::1]:123 port specification in
+ decodenetnum().
+
+ libntp/socktoa.c@1.12 +72 -2
+ move sock_hash from ntpd/ntp_util.c to libntp/socktoa.c so
+ ntpq can use it.
+ add sptoa()/sockporttoa() similar to stoa()/socktoa().
+
+ ntpd/ntp_control.c@1.133.1.7 +221 -21
+ read_mru_list() for ntpq -c mrulist
+
+ ntpd/ntp_monitor.c@1.32 +2 -5
+ expose MON_HASH(), mon_hash[] so ntp_control.c can use them.
+
+ ntpd/ntp_restrict.c@1.32 +2 -1
+ correct type for restrictions() local flags to u_short.
+
+ ntpd/ntp_util.c@1.80 +4 -50
+ move sock_hash from ntpd/ntp_util.c to libntp/socktoa.c so
+ ntpq can use it.
+ use memcpy() instead of memmove() when buffers can't overlap.
+
+ ntpq/ntpq-subs.c@1.51 +430 -28
+ new "ntpq -c mrulist" along lines of "ntpdc -c monlist" but
+ without being limited to a single request response, and
+ designed to work reliably even with an arbitrarily large
+ MRU list.
+
+ ntpq/ntpq.c@1.105 +100 -51
+ bump MAXFRAGS from 24 to 64 to enable larger responses.
+ add show_error_msg(), doqueryex() for mrulist().
+
+
+ ntpq/ntpq.h@1.12 +11 -2
+ add show_error_msg(), doqueryex() for mrulist().
+
+ChangeSet@1.2110.1.15, 2010-03-02 10:00:34+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_net.h:
+ add ADDR_EQ_PORT() like SOCK_EQ() but testing port as well.
+ ntpq-subs.c, ntpq.c, ntpq.h:
+ use associd_t for association IDs instead of int.
+ systime.c, ntp_fp.h:
+ provide callback from step_systime() to allow ntpd to flush
+ the MRU list when stepping the clock.
+ ntp_proto.c:
+ use u_short for restrict_mask type in receive(), expand comment.
+ ntp_util.c:
+ Use callback from step_systime() to flush the MRU list when
+ stepping the clock. Previously the MRU timestamps were in
+ current_time units, which are monotonically increasing despite
+ any steps of the system clock. Now they are l_fp and subject
+ to steps, so flush the MRU list when the clock is stepped to
+ ensure all timestamps are comparable.
+ recvbuff.h:
+ whitespace only
+ ntp_request.c:
+ prepare for ntpq mrulist command by converting MRU entry timestamps
+ from current_time (seconds) to l_fp (32:32 NTP standard).
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int.
+ ntp_iocompletionport.c:
+ validate recv_srcadr_len against (now smaller) sockaddr_u size.
+ ntp_control.h:
+ add CTL_OP_READMRU for ntpq mrulist
+ ntpd.h:
+ add prototype for win_time_stepped(), previously called
+ time_stepped().
+ ntp_control.c:
+ add CTL_OP_READ_MRU for ntpq -c mrulist
+ layout.std, ntpdc_ops.c:
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int
+ ntp_restrict.c:
+ wrap a long line
+ ntp_monitor.c, ntp.h:
+ prepare for ntpq mrulist command by converting MRU entry timestamps
+ from current_time (seconds) to l_fp (32:32 NTP standard).
+ ntp_request.h:
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int.
+ SetSystemTime.c, nt_clockstuff.c, clockstuff.h:
+ rename time_stepped() callback to win_time_stepped(), move
+ callback registration from Windows port to portable code
+ now that ntpd/ntp_util.c is using it.
+
+ include/ntp.h@1.174 +7 -7
+ prepare for ntpq mrulist command by converting MRU entry timestamps
+ from current_time (seconds) to l_fp (32:32 NTP standard).
+
+ include/ntp_control.h@1.42 +5 -4
+ add CTL_OP_READMRU for ntpq mrulist
+
+ include/ntp_fp.h@1.17 +8 -2
+ provide callback from step_systime() to allow ntpd to flush
+ the MRU list when stepping the clock.
+
+ include/ntp_net.h@1.6 +7 -1
+ add ADDR_EQ_PORT() like SOCK_EQ() but testing port as well.
+
+ include/ntp_request.h@1.41 +5 -5
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int.
+
+ include/ntpd.h@1.137.1.10 +7 -3
+ add prototype for win_time_stepped(), previously called
+ time_stepped().
+
+ include/recvbuff.h@1.21 +1 -1
+ whitespace only
+
+ libntp/systime.c@1.50 +3 -0
+ provide callback from step_systime() to allow ntpd to flush
+ the MRU list when stepping the clock.
+
+ ntpd/ntp_control.c@1.133.1.6 +93 -3
+ add CTL_OP_READ_MRU for ntpq -c mrulist
+
+ ntpd/ntp_monitor.c@1.31 +117 -102
+ prepare for ntpq mrulist command by converting MRU entry timestamps
+ from current_time (seconds) to l_fp (32:32 NTP standard).
+
+ ntpd/ntp_proto.c@1.297.1.9 +3 -1
+ use u_short for restrict_mask type in receive(), expand comment.
+
+ ntpd/ntp_request.c@1.89 +23 -13
+ prepare for ntpq mrulist command by converting MRU entry timestamps
+ from current_time (seconds) to l_fp (32:32 NTP standard).
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int.
+
+ ntpd/ntp_restrict.c@1.31 +3 -2
+ wrap a long line
+
+ ntpd/ntp_util.c@1.79 +37 -8
+ Use callback from step_systime() to flush the MRU list when
+ stepping the clock. Previously the MRU timestamps were in
+ current_time units, which are monotonically increasing despite
+ any steps of the system clock. Now they are l_fp and subject
+ to steps, so flush the MRU list when the clock is stepped to
+ ensure all timestamps are comparable.
+
+ ntpdc/layout.std@1.10 +4 -4
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int
+
+ ntpdc/ntpdc_ops.c@1.65 +4 -4
+ rename info_monitor, info_monitor_1 fields to reflect their
+ use, lasttime -> avg_int and firsttime -> last_int
+
+ ntpq/ntpq-subs.c@1.50 +25 -22
+ use associd_t for association IDs instead of int.
+
+ ntpq/ntpq.c@1.104 +4 -4
+ use associd_t for association IDs instead of int.
+
+ ntpq/ntpq.h@1.11 +1 -1
+ use associd_t for association IDs instead of int.
+
+ ports/winnt/include/clockstuff.h@1.11 +0 -11
+ rename time_stepped() callback to win_time_stepped(), move
+ callback registration from Windows port to portable code
+ now that ntpd/ntp_util.c is using it.
+
+ ports/winnt/libntp/SetSystemTime.c@1.9 +0 -5
+ rename time_stepped() callback to win_time_stepped(), move
+ callback registration from Windows port to portable code
+ now that ntpd/ntp_util.c is using it.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.42 +3 -9
+ rename time_stepped() callback to win_time_stepped(), move
+ callback registration from Windows port to portable code
+ now that ntpd/ntp_util.c is using it.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.53 +9 -5
+ validate recv_srcadr_len against (now smaller) sockaddr_u size.
+
+ChangeSet@1.2110.1.14, 2010-03-01 12:47:33+00:00, davehart@shiny.ad.hartbrothers.com
+ determine MRU hash table size at runtime, attempting to
+ average 8 entries per bucket at mru_maxdepth capacity.
+ adjust defaults for mru_maxdepth, mru_initmem.
+
+ include/ntp.h@1.173 +1 -1
+ determine MRU hash table size at runtime, attempting to
+ average 8 entries per bucket at mru_maxdepth capacity.
+
+ ntpd/ntp_monitor.c@1.30 +32 -10
+ determine MRU hash table size at runtime, attempting to
+ average 8 entries per bucket at mru_maxdepth capacity.
+ adjust defaults for mru_maxdepth, mru_initmem.
+
+ ntpd/ntp_util.c@1.78 +2 -3
+ determine MRU hash table size at runtime, attempting to
+ average 8 entries per bucket at mru_maxdepth capacity.
+
+ChangeSet@1.2110.1.13, 2010-03-01 09:20:28+00:00, davehart@shiny.ad.hartbrothers.com
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ include/ntp_net.h@1.5 +2 -3
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ ntpd/ntp_config.c@1.255 +1 -1
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ ntpd/ntp_io.c@1.315 +3 -3
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ ntpd/ntp_monitor.c@1.29 +5 -0
+ comment about mon_age implementation
+
+ ntpd/ntp_request.c@1.88 +10 -10
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ ntpd/refclock_nmea.c@1.48 +0 -2
+ remove unused macros left over from distinct PPSAPI code
+
+ ntpdc/ntpdc_ops.c@1.64 +3 -3
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ sntp/networking.c@1.32 +2 -2
+ remove bloated (128 byte on win32) sockaddr_storage from sockaddr_u
+ union since the largest we use is sockaddr_in6 (28 bytes on win32).
+
+ChangeSet@1.2110.1.12, 2010-02-27 23:34:22+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_proto.c:
+ broadcast demobilization fix from DLM
+
+ ntpd/ntp_proto.c@1.297.1.8 +4 -4
+ broadcast demobilization fix from DLM
+
+ChangeSet@1.2110.1.11, 2010-02-27 22:48:05+00:00, davehart@shiny.ad.hartbrothers.com
+ Many files:
+ more MRU knobs
+ ntp_keyword.h, keyword-gen-utd:
+ keyword-gen.c product
+ ntp_parser.h, ntp_parser.c:
+ ntp_parser.y product
+ ntp_request.c:
+ limit 'ntpdc -c monlist' response to most recent 600 entries, to
+ be consistent with the historical maximum MRU list size.
+ ntpq-subs.c:
+ read up to three named variables at once:
+ ntpq -c "rv 0 version mru_depth mru_maxmem"
+
+ include/ntp_control.h@1.41 +17 -9
+ more MRU knobs
+
+ include/ntpd.h@1.137.1.9 +11 -7
+ more MRU knobs
+
+ ntpd/complete.conf@1.6 +1 -1
+ more MRU knobs
+
+ ntpd/keyword-gen-utd@1.5 +1 -1
+ keyword-gen.c product
+
+ ntpd/keyword-gen.c@1.9 +5 -1
+ more MRU knobs
+
+ ntpd/ntp_config.c@1.254 +48 -15
+ more MRU knobs
+
+ ntpd/ntp_control.c@1.133.1.5 +59 -9
+ more MRU knobs
+
+ ntpd/ntp_keyword.h@1.7 +679 -657
+ keyword-gen.c product
+
+ ntpd/ntp_monitor.c@1.28 +145 -96
+ more MRU knobs
+
+ ntpd/ntp_parser.c@1.55 +992 -949
+ ntp_parser.y product
+
+ ntpd/ntp_parser.h@1.35 +247 -239
+ ntp_parser.y product
+
+ ntpd/ntp_parser.y@1.50 +12 -4
+ more MRU knobs
+
+ ntpd/ntp_request.c@1.87 +8 -2
+ limit 'ntpdc -c monlist' response to most recent 600 entries, to
+ be consistent with the historical maximum MRU list size.
+
+ ntpq/ntpq-subs.c@1.49 +12 -7
+ read up to three named variables at once:
+ ntpq -c "rv 0 version mru_depth mru_maxmem"
+
+ChangeSet@1.2110.1.10, 2010-02-27 10:03:55+00:00, davehart@shiny.ad.hartbrothers.com
+ keyword-gen.c:
+ include matching keyword prefix in ntp_keyword.h state entry comment.
+
+ ntpd/keyword-gen-utd@1.4 +1 -1
+ product of keyword-gen.c
+
+ ntpd/keyword-gen.c@1.8 +70 -13
+ include matching keyword prefix in ntp_keyword.h state entry comment.
+
+ ntpd/ntp_keyword.h@1.6 +579 -579
+ product of keyword-gen.c
+
+ChangeSet@1.2110.1.9, 2010-02-27 08:47:04+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_parser.h, ntp_parser.c:
+ product of ntp_parser.y
+ keyword-gen-utd:
+ accompanies new keyword-gen.c and ntp_keyword.h
+ Many files:
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+ ntp.h, ntp_request.c:
+ remove redundant storage of port in mon_entry, rmtadr has it.
+ ntp_keyword.h:
+ product of keyword-gen.c
+
+ include/ntp.h@1.172 +0 -1
+ remove redundant storage of port in mon_entry, rmtadr has it.
+
+ include/ntp_config.h@1.66.1.5 +1 -0
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ include/ntpd.h@1.137.1.8 +4 -1
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/complete.conf@1.5 +2 -1
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/keyword-gen-utd@1.3 +1 -1
+ accompanies new keyword-gen.c and ntp_keyword.h
+
+ ntpd/keyword-gen.c@1.7 +6 -0
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/ntp_config.c@1.253 +67 -4
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/ntp_keyword.h@1.5 +534 -513
+ product of keyword-gen.c
+
+ ntpd/ntp_monitor.c@1.27 +61 -32
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/ntp_parser.c@1.54 +973 -897
+ product of ntp_parser.y
+
+ ntpd/ntp_parser.h@1.34 +191 -181
+ product of ntp_parser.y
+
+ ntpd/ntp_parser.y@1.49 +25 -0
+ add MRU sizing knobs:
+ mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096
+ entries beyond 600 which are older than 64s are reclaimed,
+ with a hard upper limit on the size of maxdepth (indirectly
+ set by maxmem).
+
+ ntpd/ntp_request.c@1.86 +2 -2
+ remove redundant storage of port in mon_entry, rmtadr has it.
+
+ChangeSet@1.2110.1.8, 2010-02-26 22:59:36+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_config.c:
+ Dr. Mills doesn't like depending on && not evaluating right side
+ if left is false.
+ ntp_proto.c:
+ timeout demobilizations don't seem to be working for preemptibles.
+
+ ntpd/ntp_config.c@1.252 +10 -6
+ Dr. Mills doesn't like depending on && not evaluating right side
+ if left is false.
+
+ ntpd/ntp_proto.c@1.297.1.7 +21 -12
+ timeout demobilizations don't seem to be working for preemptibles.
+
+ChangeSet@1.2110.1.7, 2010-02-26 15:53:49+00:00, davehart@shiny.ad.hartbrothers.com
+ ntpq-subs.c:
+ just the facts, ma'am
+ ntp_control.c:
+ DLM changes via email notes
+ ntp_proto.c:
+ DLM changes via email notes.
+ remove "unlucky" experiment to track DLM changes.
+
+ ntpd/ntp_control.c@1.133.1.4 +1 -1
+ DLM changes via email notes
+
+ ntpd/ntp_proto.c@1.297.1.6 +15 -42
+ DLM changes via email notes.
+ remove "unlucky" experiment to track DLM changes.
+
+ ntpq/ntpq-subs.c@1.48 +1 -2
+ just the facts, ma'am
+
+ChangeSet@1.2110.1.6, 2010-02-25 15:45:14+00:00, davehart@shiny.ad.hartbrothers.com
+ nt_clockstuff.c:
+ suppress reports of interpolated clock "would have" gone backward
+ for less than 10 usec.
+ ntp_proto.c:
+ experiment with turning over 50% of preemptibles daily
+
+ ntpd/ntp_proto.c@1.297.1.5 +26 -2
+ experiment with turning over 50% of preemptibles daily
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.41 +23 -19
+ suppress reports of interpolated clock "would have" gone backward
+ for less than 10 usec.
+
+ChangeSet@1.2110.1.5, 2010-02-25 06:34:58+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_proto.c:
+ cull from preemptibles randomly as well as when unreachable
+ long enough.
+ work_thread.c:
+ increase blocking_workitems max queue depth to 128 on Windows
+ ntp_control.h:
+ whitespace only
+ nt_clockstuff.c:
+ expose performance counter drift as ctr_frequency sysvar.
+ ntp_intres.c, ntpd.h, ntp_config.c:
+ add retry argument to getaddrinfo_sometime() so that pool lookups
+ can be one-shot.
+ ntp_peer.c:
+ test speer->flags not peer->flags for FLAG_PREEMPT
+
+ include/ntp_control.h@1.40 +3 -3
+ whitespace only
+
+ include/ntpd.h@1.137.1.7 +4 -2
+ add retry argument to getaddrinfo_sometime() so that pool lookups
+ can be one-shot.
+
+ ntpd/ntp_config.c@1.251 +14 -6
+ add retry argument to getaddrinfo_sometime() so that pool lookups
+ can be one-shot.
+
+ ntpd/ntp_intres.c@1.86 +2 -3
+ add retry argument to getaddrinfo_sometime() so that pool lookups
+ can be one-shot.
+
+ ntpd/ntp_peer.c@1.132 +11 -7
+ test speer->flags not peer->flags for FLAG_PREEMPT
+
+ ntpd/ntp_proto.c@1.297.1.4 +17 -11
+ cull from preemptibles randomly as well as when unreachable
+ long enough.
+
+ ntpd/work_thread.c@1.2 +1 -1
+ increase blocking_workitems max queue depth to 128 on Windows
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.40 +24 -16
+ expose performance counter drift as ctr_frequency sysvar.
+
+ChangeSet@1.2113, 2010-02-25 00:53:22-05:00, clemens@pogo.udel.edu
+ This is a group of 4 patches that
+ (1) replace blanks with tabs in the source.
+ (2) provide a cleaner solution to turning FLAG_PPS on/off in oncore_get_timestamp.
+ (3) change LOG_INFO -> LOG_DEFAULT for one message, reducing the extraneous message
+ in the messages log.
+ (4) an implementation of [Bug1390] initially provided by Russell Yount, to turn the
+ PPS signal on/off. Note that this does NOT affect timekeeping.
+
+ ntpd/refclock_oncore.c@1.86 +60 -3
+ Bug[1390] allows the user to turn PPS on/off, and determine what
+ causes it to go off (off, on always, on if tracking 1 or more satellites,
+ or controled by TRAIM).
+
+ Note that OFF is not implemented, since w/o the PPS, the oncore driver
+ will not run.
+
+ Note that we default to an initial OFF state, since this seems most
+ reasonable till the driver gets to the RUN state. Once in the RUN
+ state, we determine if we should turn the PPS signal on/off each cycle.
+
+
+ ntpd/refclock_oncore.c@1.85 +2 -2
+ Just an indent and change a LOG_INFO -> LOG_DEBUG to reduce default output.
+
+
+ ntpd/refclock_oncore.c@1.84 +3 -11
+ Cleaner solution to flipping FLAG_PPS on/off in oncore_get_timestamp.
+
+
+ ntpd/refclock_oncore.c@1.83 +12 -12
+ The source for the oncore driver uses tabs wherever possible to
+ replace strings of blanks. Replace blanks with tabs from a
+ previous patch that did not adhere to this strategy.
+
+
+ChangeSet@1.2110.1.4, 2010-02-24 06:25:27+00:00, davehart@shiny.ad.hartbrothers.com
+ new peer variable "srchost" shown instead of 0.0.0.0 srcadr in
+ ntpq peers billboard for .POOL. prototype associations.
+
+ include/ntp_control.h@1.39 +9 -8
+ new peer variable "srchost" shown instead of 0.0.0.0 srcadr in
+ ntpq peers billboard for .POOL. prototype associations.
+
+ ntpd/ntp_control.c@1.133.1.3 +16 -8
+ new peer variable "srchost" shown instead of 0.0.0.0 srcadr in
+ ntpq peers billboard for .POOL. prototype associations.
+
+ ntpd/ntp_peer.c@1.131 +8 -3
+ ignore "preempt" on manycastclient, pool prototype associations.
+
+ ntpq/ntpq-subs.c@1.47 +28 -11
+ new peer variable "srchost" shown instead of 0.0.0.0 srcadr in
+ ntpq peers billboard for .POOL. prototype associations.
+
+ ntpq/ntpq.c@1.103 +9 -8
+ new peer variable "srchost" shown instead of 0.0.0.0 srcadr in
+ ntpq peers billboard for .POOL. prototype associations.
+
+ChangeSet@1.2110.1.3, 2010-02-23 09:47:25+00:00, davehart@shiny.ad.hartbrothers.com
+ "restrict source ..." to set restrictions for peers.
+ [Bug 1497] fudge is broken by getnetnum() change
+
+ include/ntp.h@1.171 +2 -0
+ add RESM_SOURCE for "restrict source ..."
+
+ include/ntp_lists.h@1.4 +12 -0
+ add CHECK_SLIST() debugging helper macro to detect a couple of
+ ways a singly-linked list can go awry.
+
+ include/ntp_refclock.h@1.25 +11 -16
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+ remove prototypes for previously-removed functions.
+
+ include/ntpd.h@1.137.1.6 +3 -2
+ add restrict_source() to add/remove restrictions for each
+ association automatically ("restrict source ...")
+
+ ntpd/complete.conf@1.4 +2 -1
+ add "restrict source ..." test
+
+ ntpd/keyword-gen-utd@1.2 +1 -1
+ generated from ntp_keyword.c
+
+ ntpd/keyword-gen.c@1.6 +15 -1
+ add "source" as in "restrict source ..."
+
+ ntpd/ntp_config.c@1.250 +136 -105
+ "restrict source ..." to set restrictions for peers.
+ [Bug 1497] fudge is broken by getnetnum() change
+
+ ntpd/ntp_intres.c@1.85 +0 -9
+ test use of copy_addrinfo_list() no longer helpful as it has a real
+ consumer now.
+
+ ntpd/ntp_io.c@1.314 +2 -2
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/ntp_keyword.h@1.4 +421 -415
+ generated from ntp_keyword.c
+
+ ntpd/ntp_parser.c@1.53 +788 -774
+ ntp_parser.y compiled
+
+ ntpd/ntp_parser.h@1.33 +83 -81
+ ntp_parser.y compiled
+
+ ntpd/ntp_parser.y@1.48 +11 -2
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/ntp_peer.c@1.130 +17 -13
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/ntp_proto.c@1.297.1.3 +10 -0
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/ntp_refclock.c@1.91.1.3 +3 -2
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/ntp_request.c@1.85 +1 -1
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/ntp_restrict.c@1.30 +144 -32
+ "restrict source ..." to set restrictions for peers.
+
+ ntpd/refclock_datum.c@1.14 +3 -3
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_jupiter.c@1.25 +5 -5
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_leitch.c@1.12 +2 -2
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_nmea.c@1.47 +2 -2
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_parse.c@1.53 +3 -3
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_ripencc.c@1.8 +3 -3
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpd/refclock_wwvb.c@1.23.1.2 +2 -2
+ make refclock control entrypoint, refclock_control()'s input
+ struct refclockstat pointer const.
+
+ ntpdc/ntpdc_ops.c@1.63 +1 -0
+ "restrict source ..." to set restrictions for peers.
+
+ChangeSet@1.2110.1.2, 2010-02-20 17:52:58+00:00, davehart@shiny.ad.hartbrothers.com
+ new pool implementation modeled on manycastclient.
+
+ include/ntp.h@1.170 +26 -16
+ add hostname, addrs, ai members to struct peer for pool.
+ remove unused PPSREFID.
+ add MDF_POOL, rename MDF_ACLNT -> MDF_UCLNT to cover both
+ manycastclient and pool ephemeral associations.
+ add MDF_SOLICIT_MASK (MDF_ACAST | MDF_POOL).
+
+
+ include/ntp_config.h@1.66.1.4 +2 -2
+ change address_node->type (family) type from short to u_short.
+
+ include/ntpd.h@1.137.1.5 +10 -7
+ changes for pool
+
+ ntpd/ntp_config.c@1.249 +54 -53
+ changes for pool
+
+ ntpd/ntp_control.c@1.133.1.2 +1 -1
+ rename MDF_SRVCASTMASK -> MDF_TXONLY_MASK.
+
+ ntpd/ntp_peer.c@1.129 +198 -109
+ changes for pool
+
+ ntpd/ntp_proto.c@1.297.1.2 +215 -58
+ changes for pool
+
+ ntpd/ntp_refclock.c@1.91.1.2 +2 -2
+ changes for pool
+
+ ntpd/ntp_request.c@1.84 +12 -29
+ changes for pool
+
+ ntpd/ntp_worker.c@1.2 +1 -1
+ Change worker child idle timeout to 3 minutes (was 15s)
+
+ ntpd/ntpsim.c@1.24 +1 -0
+ changes for pool
+
+ ntpdc/ntpdc.c@1.80 +23 -13
+ fix sizeof() abuse in getnetnum(), incorrect assumption that ai_canonname
+ is always non-NULL
+
+ ntpq/ntpq-subs.c@1.46 +4 -2
+ correct T column comments, value for manycastclient (A -> a).
+
+ ntpq/ntpq.c@1.102 +22 -16
+ fix sizeof() abuse in getnetnum(), incorrect assumption that ai_canonname
+ is always non-NULL
+
+ChangeSet@1.2110.1.1, 2010-02-17 09:54:32+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20.
+ Maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ Remove more workarounds unneeded since we require ISO C90 AKA ANSI C:
+ - remove fallback implementations for memmove(), memset, strstr().
+ - do not test for atexit() or memcpy().
+ Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with
+ support for IPv6.
+ Correct some corner case failures in automatically enabling the MRU
+ list if any "restrict ... limited" is in effect, and in disabling MRU
+ maintenance. (ntp_monitor.c, ntp_restrict.c)
+ Reverse the internal sort order of the address restriction lists, but
+ preserve the same behavior. This allows removal of special-case code
+ related to the default restrictions and more straightforward lookups
+ of restrictions for a given address (now, stop on first match).
+ Move ntp_restrict.c MRU doubly-linked list maintenance code into
+ ntp_lists.h macros, allowing more duplicated source excision.
+ Correct Windows port's refclock_open() to return 0 on failure not -1.
+ Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from
+ refclock_open() on failure.
+ Repair ntpdate.c to handle no longer testing HAVE_TIMER_SETTIME.
+ Do not reference peer_node/unpeer_node after freeing when built with
+ --disable-saveconfig and using DNS.
+
+ BitKeeper/deleted/.del-memmove.c~3e480692@1.4 +0 -0
+ Rename: libntp/memmove.c -> BitKeeper/deleted/.del-memmove.c~3e480692
+
+ BitKeeper/deleted/.del-strstr.c~55aa8716fa42aa@1.2 +0 -0
+ Rename: libntp/strstr.c -> BitKeeper/deleted/.del-strstr.c~55aa8716fa42aa
+
+ ChangeLog@1.541.1.1 +23 -0
+ [Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20.
+ Maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ Remove more workarounds unneeded since we require ISO C90 AKA ANSI C:
+ - remove fallback implementations for memmove(), memset, strstr().
+ - do not test for atexit() or memcpy().
+ Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with
+ support for IPv6.
+ Correct some corner case failures in automatically enabling the MRU
+ list if any "restrict ... limited" is in effect, and in disabling MRU
+ maintenance. (ntp_monitor.c, ntp_restrict.c)
+ Reverse the internal sort order of the address restriction lists, but
+ preserve the same behavior. This allows removal of special-case code
+ related to the default restrictions and more straightforward lookups
+ of restrictions for a given address (now, stop on first match).
+ Move ntp_restrict.c MRU doubly-linked list maintenance code into
+ ntp_lists.h macros, allowing more duplicated source excision.
+ Correct Windows port's refclock_open() to return 0 on failure not -1.
+ Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from
+ refclock_open() on failure.
+ Repair ntpdate.c to handle no longer testing HAVE_TIMER_SETTIME.
+ Do not reference peer_node/unpeer_node after freeing when built with
+ --disable-saveconfig and using DNS.
+
+ configure.ac@1.479 +1 -2
+ Remove more workarounds unneeded since we require ISO C90 AKA ANSI C:
+ - remove fallback implementations for memmove(), memset, strstr().
+ - do not test for memcpy().
+
+
+ flock-build@1.44.1.1 +26 -21
+ fix bug with SIMUL=2 flock-build -1
+
+ include/ntp.h@1.169 +57 -46
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ rename peer link members: next -> adr_link, ass_next->aid_link.
+ add VN_MODE() for MRU list, which doesn't store LI but does now
+ combine version and mode in one octet. use VN_MODE() in
+ PKT_LI_VN_MODE.
+ add mon_entry typedef for struct mon_data.
+ move ntp_restrict.c MRU doubly-linked list maintenance code into
+ ntp_lists.h macros, allowing more duplicated source excision.
+ rename struct mon_data.interface -> mon_entry.lcladr to mirror
+ mon_entry.rmtadr.
+ note disuse of MDF_LCAST without removing it.
+ add MDF_SRVCASTMASK (MDF_MCAST | MDF_BCAST | ACAST).
+ Combine IPv4 and IPv6 restrict list entry structures into one
+ variable-size structure with a union at the end of V4 and v6
+ addresses, enabling removal of duplicated code.
+
+
+ include/ntp_config.h@1.66.1.3 +19 -18
+ add uint u to attr_val.value union.
+
+ include/ntp_crypto.h@1.47 +1 -1
+ use void * for variant pointer struct value.ptr.
+
+ include/ntp_lists.h@1.3 +119 -7
+ Add LINK_SORT_SLIST() macro to insert into a sorted list.
+ Add doubly-linked list macros wrapping existing logic from ntp_restrict.c:
+ INIT_DLIST(), HEAD_DLIST(), TAIL_DLIST(), LINK_DLIST(), UNLINK_DLIST(),
+ ITER_DLIST_BEGIN(), ITER_DLIST_END().
+
+ include/ntp_net.h@1.4 +20 -9
+ remove unhelpful (void *) cast in MEMSET_ADDR6().
+ add ADDR6_CMP(), ADDR6_EQ() helpers for in6_addr.
+
+ include/ntp_rfc2553.h@1.36 +9 -1
+ handle AI_NUMERICSERV being unavailable.
+
+ include/ntp_stdlib.h@1.43 +0 -4
+ relocate latoa(), localaddrtoa() to ntpd.h
+
+ include/ntp_string.h@1.6 +1 -15
+ NTP requires ISO C90/ANSI C, remove workarounds for missing
+ strchr(), strrchr(), memcpy().
+
+ include/ntp_types.h@1.19 +3 -1
+ add ASSOCID_MAX, KEYID_T_MAX
+
+ include/ntpd.h@1.137.1.4 +73 -59
+ Add comments clarifying and demarcing division of file into
+ two parts, with only variable extern declarations in the
+ second half.
+ rename ntp_monclearinterface() -> mon_clearinterface().
+ correct many scalar type declarations and function argument
+ types to eliminate truncation and implicit pointer cast
+ warnings, particularly int -> u_char and int -> u_short.
+ introduce mon_entry typedef (alias of struct mon_data) and
+ convert most references.
+ include hash array size in external declaration to better
+ inform compilers.
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ adds peer_list, peer_count globals.
+ rename restrictlist -> restrictlist4.
+
+ libntp/Makefile.am@1.52 +0 -2
+ NTP requires an ISO C90 (ANSI C) compiler:
+ - remove fallback memmove(), strstr()
+
+ libntp/decodenetnum.c@1.11 +1 -1
+ use Z_AI_NUMERICHOST to document it may be zero and should not
+ be used with bitwise NOT (~)
+
+ libntp/machines.c@1.22 +0 -13
+ NTP requires an ISO C90 (ANSI C) compiler:
+ - remove fallback memset()
+
+ libntp/strdup.c@1.7 +15 -14
+ minor cleanup, use memcpy() instead of strcpy()
+
+ ntpd/Makefile.am@1.91 +1 -1
+ ntp_data_structures does not need to be built in both SIM and
+ normal versions as it and its headers do not use #ifdef SIM.
+
+ ntpd/ntp_config.c@1.248 +129 -98
+ Eliminate warnings by correcting many scalar types.
+ Do not reference peer_node/unpeer_node after freeing when built with
+ --disable-saveconfig and using DNS.
+
+ ntpd/ntp_control.c@1.133.1.1 +571 -614
+ [Bug 1464] synchronization source wrong for refclocks ARCRON_MSF (27)
+ and SHM (28).
+ Use memcpy() instead of memmove() where the buffers can not overlap.
+ Re-enable "Possible 'ntpdx' exploit" message with rate-limiting to
+ 12 per hour.
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ adds peer_list, peer_count globals.
+ use erealloc() in place of free() then emalloc().
+
+ ntpd/ntp_crypto.c@1.147 +28 -25
+ eliminate warnings with casts and type corrections.
+
+ ntpd/ntp_intres.c@1.84 +3 -3
+ use \n with DPRINTF
+
+ ntpd/ntp_io.c@1.313 +12 -1
+ rename ntp_monclearinterface() -> mon_clearinterface().
+ implement localaddrtoa(), similar to socktoa().
+
+ ntpd/ntp_loopfilter.c@1.153.1.1 +0 -4
+ remove VMS-specific include that is no longer required.
+
+ ntpd/ntp_monitor.c@1.26 +98 -132
+ rename MAXMONMEM -> MAX_MONLIST
+ rename MONMEMINC -> INC_MONLIST
+ in both cases, respect the old name if defined (likely with -D).
+ change most struct mon_data references to mon_entry.
+ move doubly-linked list code to ntp_lists *_DLIST() macros.
+ use *_SLIST() macros for monitor hash lists.
+ rename ntp_monclearinterface() -> mon_clearinterface().
+ rename struct mon_data.interface -> mon_entry.lcladr to mirror
+ mon_entry.rmtadr.
+ no point in memset(p, 0, size); then memcpy(p, src, size);.
+ combine mon_entry.version and mon_entry.mode into mon_entry.vn_mode.
+
+
+ ntpd/ntp_peer.c@1.128 +184 -224
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ change initial, incremental peer allocs from 15, 5 to 8, 4.
+ do not zero variables at startup that are zero-initialized.
+
+ ntpd/ntp_proto.c@1.297.1.1 +125 -137
+ remove VMS-specific include of ntp_refclock.h, appears unneeded.
+ silence many truncation and implicit conversion warnings by changing
+ types or typecasting.
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ rename clock_select() array of peers from peer_list to peers to avoid
+ conflicting with new global listhead peers_list.
+ use erealloc() instead of free() then emalloc().
+ allocate clock_select()'s three peer-related arrays together to
+ minimize cache lines used.
+ do not reuse hpoll local in poll_update as scratch int.
+
+ ntpd/ntp_refclock.c@1.91.1.1 +3 -1
+ eliminate truncation warning for 64-bit time_t with (u_int32)
+
+ ntpd/ntp_request.c@1.83 +196 -253
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+ rename peer_list() -> list_peers() to avoid conflict with new global
+ listhead peer_list.
+ rename peer_list_sum -> list_peers_sum() to maintain consistency.
+ add list_restrict4(), list_restrict6() helpers for list_restrict()
+ which reverse the order of the returned restrictions to match
+ previous behavior and documentation, now that it's maintained in
+ a reversed sort order internally vs. previously.
+ get rid of duplicative extern references to global variables in
+ a number of functions (rely on ntpd.h).
+
+ ntpd/ntp_restrict.c@1.29 +394 -419
+ collapse a bunch of code duplication in ntpd/ntp_restrict.c added with
+ support for IPv6. Correct mistaken split of res_limited_refcount
+ code and data, one RES_LIMITED reference count should apply to both.
+ reverse the internal sort order of the address restriction lists, but
+ preserve the same behavior. This allows removal of special-case code
+ related to the default restrictions and more straightforward lookups
+ of restrictions for a given address (we can stop on the first match).
+ move ntp_restrict.c MRU doubly-linked list maintenance code into
+ ntp_lists.h macros, allowing more duplicated source excision.
+ use *_SLIST() macros for mon_hash[] lists.
+
+ ntpd/ntp_timer.c@1.58 +23 -28
+ maintain and use linked list of associations (struct peer) in ntpd,
+ avoiding walking 128 hash table entries to iterate over peers.
+
+
+ ntpd/ntp_util.c@1.77 +3 -0
+ #include <unistd.h> for getpid().
+
+ ntpd/refclock_chronolog.c@1.10 +1 -1
+ fix truncation warning with typecast.
+
+ ntpd/refclock_chu.c@1.46.1.1 +1 -1
+ refclock_open() returns 0 on failure
+
+ ntpd/refclock_dumbclock.c@1.14.1.1 +1 -1
+ refclock_open() returns 0 on failure
+
+ ntpd/refclock_jupiter.c@1.24 +7 -7
+ eliminate a raft of truncation and type conversion warnings.
+
+ ntpd/refclock_wwvb.c@1.23.1.1 +1 -1
+ refclock_open() returns 0 on failure
+
+ ntpdate/ntpdate.c@1.72 +24 -44
+ configure.ac no longer tests for timer_settime() separately fromm
+ timer_create()..
+
+ ntpdc/ntpdc.c@1.79 +12 -9
+ #include <unistd.h>, <fcntl.h> for open(), close(), and isatty().
+
+ ntpq/ntpq.c@1.101 +15 -12
+ #include <unistd.h>, <fcntl.h> for open() and close().
+
+ ports/winnt/include/config.h@1.83 +0 -1
+ HAVE_STRCHR is no longer needed.
+
+ ports/winnt/libntp/termios.c@1.21.1.1 +14 -9
+ refclock_open() returns 0 on failure
+
+ ports/winnt/vc6/libntp.dsp@1.52 +0 -4
+ remove memmove.c reference.
+
+ ports/winnt/vs2003/libntp.vcproj@1.10 +0 -21
+ remove memmove.c reference.
+
+ ports/winnt/vs2005/libntp.vcproj@1.8 +0 -22
+ remove memmove.c reference.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.28 +6 -14
+ remove memmove.c and strstr.c references.
+
+ sntp/configure.ac@1.32 +1 -1
+ NTP requires ISO C90 (ANSI C) so don't test for atexit() or memset().
+
+ChangeSet@1.2112, 2010-02-16 09:40:11+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1306] constant conditionals in audio_gain().
+
+ ChangeLog@1.543 +1 -0
+ [Bug 1306] constant conditionals in audio_gain().
+
+ libntp/audio.c@1.28 +21 -21
+ [Bug 1306] constant conditionals in audio_gain().
+
+ChangeSet@1.2082.4.63, 2010-02-15 23:19:19+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1464] synchronization source wrong for refclocks ARCRON_MSF (27)
and SHM (28).
Correct Windows port's refclock_open() to return 0 on failure not -1.
@@ -7047,7 +117455,7 @@ ChangeSet@1.2150, 2010-02-15 23:19:19+00:00, davehart@shiny.ad.hartbrothers.com
Correct "SIMUL=4 ./flock-build -1" to prioritize -1/--one.
- ChangeLog@1.611 +9 -0
+ ChangeLog@1.496.26.44 +9 -0
[Bug 1464] synchronization source wrong for refclocks ARCRON_MSF (27)
and SHM (28).
Correct Windows port's refclock_open() to return 0 on failure not -1.
@@ -7059,7 +117467,7 @@ ChangeSet@1.2150, 2010-02-15 23:19:19+00:00, davehart@shiny.ad.hartbrothers.com
flock-build@1.45 +26 -21
Correct "SIMUL=4 ./flock-build -1" to prioritize -1/--one.
- ntpd/ntp_control.c@1.133 +2 -2
+ ntpd/ntp_control.c@1.129.1.4 +2 -2
[Bug 1464] synchronization source wrong for refclocks ARCRON_MSF (27)
and SHM (28).
@@ -7083,126 +117491,346 @@ ChangeSet@1.2150, 2010-02-15 23:19:19+00:00, davehart@shiny.ad.hartbrothers.com
Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from
refclock_open() on failure.
- ports/winnt/ntpd/win32_io.c@1.20 +15 -9
+ ports/winnt/ntpd/win32_io.c@1.19.1.1 +15 -9
Correct Windows port's refclock_open() to return 0 on failure not -1.
Correct CHU, dumbclock, and WWVB drivers to check for 0 returned from
refclock_open() on failure.
-ChangeSet@1.2149, 2010-02-09 10:34:59+00:00, stenn@whimsy.udel.edu
+ChangeSet@1.2110, 2010-02-13 11:56:48+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P20
+ TAG: NTP_4_2_7P20
+
+ ChangeLog@1.541 +1 -0
+ NTP_4_2_7P20
+
+ ntpd/ntpd-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpd/ntpd-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ ntpd/ntpd-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpd/ntpd.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpdc/ntpdc-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpdc/ntpdc-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ ntpdc/ntpdc-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpdc/ntpdc.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpq/ntpq-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpq/ntpq-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ ntpq/ntpq-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpq/ntpq.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ ntpsnmpd/ntpsnmpd.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ packageinfo.sh@1.22 +1 -1
+ NTP_4_2_7P20
+
+ sntp/sntp-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ sntp/sntp-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ sntp/sntp-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ sntp/sntp.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ sntp/sntp.html@1.21 +1 -1
+ NTP_4_2_7P20
+
+ util/ntp-keygen-opts.c@1.21 +2 -2
+ NTP_4_2_7P20
+
+ util/ntp-keygen-opts.h@1.21 +3 -3
+ NTP_4_2_7P20
+
+ util/ntp-keygen-opts.texi@1.21 +2 -2
+ NTP_4_2_7P20
+
+ util/ntp-keygen.1@1.21 +2 -2
+ NTP_4_2_7P20
+
+ChangeSet@1.2102.2.1, 2010-02-09 18:19:12+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1483] hostname in ntp.conf "restrict" parameter rejected.
+ Use all addresses for each restrict by hostname.
+ Use async DNS to resolve trap directive hostnames.
+
+
+ ChangeLog@1.533.2.1 +3 -0
+ [Bug 1483] hostname in ntp.conf "restrict" parameter rejected.
+ Use all addresses for each restrict by hostname.
+ Use async DNS to resolve trap directive hostnames.
+
+
+ include/ntp_config.h@1.66.1.2 +13 -2
+ add settrap_params structure for trap_name_resolved()
+
+ include/ntp_stdlib.h@1.42 +4 -0
+ add localaddrtoa() alias latoa() macro evaluating to text of
+ a given struct interface *'s local address, or <null> in the
+ case of a NULL struct interface *.
+
+ ntpd/ntp_config.c@1.247 +177 -25
+ [Bug 1483] use blocking DNS resolution for restrict hostnames.
+ Use all addresses resolved from a restrict hostname, instead
+ of only the first.
+ Use async DNS for trap directive hostnames.
+
+ ntpd/ntp_peer.c@1.127 +4 -6
+ use latoa(peer->dstadr) instead of more verbose equivalent.
+
+ ntpd/ntp_restrict.c@1.28 +5 -5
+ DPRINTF args to hack_restrict() for v6 as well as v4 addresses.
+
+ChangeSet@1.2108, 2010-02-09 11:57:34+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P19
+ TAG: NTP_4_2_7P19
+
+ ChangeLog@1.539 +1 -0
+ NTP_4_2_7P19
+
+ ntpd/ntpd-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpd/ntpd-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ ntpd/ntpd-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpd/ntpd.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpdc/ntpdc-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpdc/ntpdc-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ ntpdc/ntpdc-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpdc/ntpdc.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpq/ntpq-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpq/ntpq-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ ntpq/ntpq-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpq/ntpq.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ ntpsnmpd/ntpsnmpd.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ packageinfo.sh@1.21 +1 -1
+ NTP_4_2_7P19
+
+ sntp/sntp-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ sntp/sntp-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ sntp/sntp-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ sntp/sntp.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ sntp/sntp.html@1.20 +1 -1
+ NTP_4_2_7P19
+
+ util/ntp-keygen-opts.c@1.20 +2 -2
+ NTP_4_2_7P19
+
+ util/ntp-keygen-opts.h@1.20 +3 -3
+ NTP_4_2_7P19
+
+ util/ntp-keygen-opts.texi@1.20 +2 -2
+ NTP_4_2_7P19
+
+ util/ntp-keygen.1@1.20 +2 -2
+ NTP_4_2_7P19
+
+ChangeSet@1.2082.4.62, 2010-02-09 10:34:59+00:00, stenn@whimsy.udel.edu
NTP_4_2_6P1_RC5
TAG: NTP_4_2_6P1_RC5
- ChangeLog@1.610 +1 -0
+ ChangeLog@1.496.26.43 +1 -0
NTP_4_2_6P1_RC5
- ntpd/ntpd-opts.c@1.253 +2 -2
+ ntpd/ntpd-opts.c@1.248.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpd/ntpd-opts.h@1.253 +3 -3
+ ntpd/ntpd-opts.h@1.248.5.1 +3 -3
NTP_4_2_6P1_RC5
- ntpd/ntpd-opts.texi@1.251 +2 -2
+ ntpd/ntpd-opts.texi@1.246.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpd/ntpd.1@1.251 +2 -2
+ ntpd/ntpd.1@1.246.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpdc/ntpdc-opts.c@1.249 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpdc/ntpdc-opts.h@1.249 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.5.1 +3 -3
NTP_4_2_6P1_RC5
- ntpdc/ntpdc-opts.texi@1.248 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpdc/ntpdc.1@1.248 +2 -2
+ ntpdc/ntpdc.1@1.243.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpq/ntpq-opts.c@1.250 +2 -2
+ ntpq/ntpq-opts.c@1.245.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpq/ntpq-opts.h@1.250 +3 -3
+ ntpq/ntpq-opts.h@1.245.5.1 +3 -3
NTP_4_2_6P1_RC5
- ntpq/ntpq-opts.texi@1.249 +2 -2
+ ntpq/ntpq-opts.texi@1.244.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpq/ntpq.1@1.249 +2 -2
+ ntpq/ntpq.1@1.244.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpsnmpd/ntpsnmpd-opts.c@1.128 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpsnmpd/ntpsnmpd-opts.h@1.128 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.5.1 +3 -3
NTP_4_2_6P1_RC5
- ntpsnmpd/ntpsnmpd-opts.texi@1.128 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.5.1 +2 -2
NTP_4_2_6P1_RC5
- ntpsnmpd/ntpsnmpd.1@1.127 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.5.1 +2 -2
NTP_4_2_6P1_RC5
- packageinfo.sh@1.264 +1 -1
+ packageinfo.sh@1.255.7.1 +1 -1
NTP_4_2_6P1_RC5
- sntp/sntp-opts.c@1.122 +2 -2
+ sntp/sntp-opts.c@1.117.5.1 +2 -2
NTP_4_2_6P1_RC5
- sntp/sntp-opts.h@1.122 +3 -3
+ sntp/sntp-opts.h@1.117.5.1 +3 -3
NTP_4_2_6P1_RC5
- sntp/sntp-opts.texi@1.122 +2 -2
+ sntp/sntp-opts.texi@1.117.5.1 +2 -2
NTP_4_2_6P1_RC5
- sntp/sntp.1@1.122 +2 -2
+ sntp/sntp.1@1.117.5.1 +2 -2
NTP_4_2_6P1_RC5
- sntp/sntp.html@1.12 +1 -1
+ sntp/sntp.html@1.7.5.1 +1 -1
NTP_4_2_6P1_RC5
- util/ntp-keygen-opts.c@1.252 +2 -2
+ util/ntp-keygen-opts.c@1.247.5.1 +2 -2
NTP_4_2_6P1_RC5
- util/ntp-keygen-opts.h@1.252 +3 -3
+ util/ntp-keygen-opts.h@1.247.5.1 +3 -3
NTP_4_2_6P1_RC5
- util/ntp-keygen-opts.texi@1.251 +2 -2
+ util/ntp-keygen-opts.texi@1.246.5.1 +2 -2
NTP_4_2_6P1_RC5
- util/ntp-keygen.1@1.251 +2 -2
+ util/ntp-keygen.1@1.246.5.1 +2 -2
NTP_4_2_6P1_RC5
-ChangeSet@1.2148, 2010-02-09 04:02:59-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.61, 2010-02-09 04:02:59-05:00, stenn@whimsy.udel.edu
[Bug 1438] Remove dead code from sntp/networking.c
- ChangeLog@1.609 +1 -0
+ ChangeLog@1.496.26.42 +1 -0
[Bug 1438] Remove dead code from sntp/networking.c
- sntp/networking.c@1.30 +0 -1
+ sntp/networking.c@1.29.1.1 +0 -1
[Bug 1438] Remove dead code from sntp/networking.c
-ChangeSet@1.2145.1.1, 2010-02-09 02:49:34-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2106, 2010-02-09 03:51:10-05:00, stenn@whimsy.udel.edu
+ [Bug 1338] Update the association type codes in ntpq.html.
+
+ ChangeLog@1.537 +1 -0
+ [Bug 1338] Update the association type codes in ntpq.html.
+
+ html/copyright.html@1.47 +1 -1
+ cleanup
+
+ html/ntpq.html@1.39 +5 -2
+ [Bug 1338] Update the association type codes in ntpq.html.
+
+ChangeSet@1.2102.1.1, 2010-02-09 03:23:58-05:00, stenn@whimsy.udel.edu
+ cleanup
+
+ ChangeLog@1.533.1.1 +2 -1
+ cleanup
+
+ChangeSet@1.2082.17.1, 2010-02-09 02:49:34-05:00, stenn@whimsy.udel.edu
[Bug 1140] Clean up debug.html, decode.html, and ntpq.html
- ChangeLog@1.606.1.1 +1 -0
+ ChangeLog@1.496.42.1 +1 -0
[Bug 1140] Clean up debug.html, decode.html, and ntpq.html
- html/debug.html@1.28 +3 -3
+ html/debug.html@1.27.1.1 +3 -3
[Bug 1140] Clean up debug.html, decode.html, and ntpq.html
- html/decode.html@1.12 +11 -7
+ html/decode.html@1.11.1.1 +11 -7
[Bug 1140] Clean up debug.html, decode.html, and ntpq.html
- html/ntpq.html@1.37 +11 -7
+ html/ntpq.html@1.36.1.1 +11 -7
[Bug 1140] Clean up debug.html, decode.html, and ntpq.html
-ChangeSet@1.2146, 2010-02-08 14:11:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.59, 2010-02-08 14:11:12+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1478] linking fails with undefined reference EVP_MD_pkey_type.
[Bug 1479] Compilation fails because of not finding readline headers.
[Bug 1484] ushort is not defined in QNX6.
- ChangeLog@1.607 +3 -0
+ ChangeLog@1.496.26.40 +3 -0
[Bug 1478] linking fails with undefined reference EVP_MD_pkey_type.
[Bug 1479] Compilation fails because of not finding readline headers.
[Bug 1484] ushort is not defined in QNX6.
@@ -7216,126 +117844,428 @@ ChangeSet@1.2146, 2010-02-08 14:11:12+00:00, davehart@shiny.ad.hartbrothers.com
m4/ntp_lineeditlibs.m4@1.7 +0 -2
[Bug 1479] Compilation fails because of not finding readline headers.
- ntpd/ntp_control.c@1.132 +1 -0
+ ntpd/ntp_control.c@1.129.1.3 +1 -0
[Bug 1478] linking fails with undefined reference EVP_MD_pkey_type.
-ChangeSet@1.2145, 2010-02-05 22:26:34+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2102, 2010-02-07 10:31:29+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P18
+ TAG: NTP_4_2_7P18
+
+ ChangeLog@1.533 +1 -0
+ NTP_4_2_7P18
+
+ ntpd/ntpd-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpd/ntpd-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ ntpd/ntpd-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpd/ntpd.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpdc/ntpdc-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpdc/ntpdc-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ ntpdc/ntpdc-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpdc/ntpdc.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpq/ntpq-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpq/ntpq-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ ntpq/ntpq-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpq/ntpq.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ ntpsnmpd/ntpsnmpd.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ packageinfo.sh@1.20 +1 -1
+ NTP_4_2_7P18
+
+ sntp/sntp-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ sntp/sntp-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ sntp/sntp-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ sntp/sntp.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ sntp/sntp.html@1.19 +1 -1
+ NTP_4_2_7P18
+
+ util/ntp-keygen-opts.c@1.19 +2 -2
+ NTP_4_2_7P18
+
+ util/ntp-keygen-opts.h@1.19 +3 -3
+ NTP_4_2_7P18
+
+ util/ntp-keygen-opts.texi@1.19 +2 -2
+ NTP_4_2_7P18
+
+ util/ntp-keygen.1@1.19 +2 -2
+ NTP_4_2_7P18
+
+ChangeSet@1.2101, 2010-02-06 05:22:44+00:00, davehart@shiny.ad.hartbrothers.com
+ Stop using getaddrinfo() to convert numeric address strings to on-wire
+ addresses in favor of is_ip_address() alone.
+
+ ChangeLog@1.532 +2 -0
+ Stop using getaddrinfo() to convert numeric address strings to on-wire
+ addresses in favor of is_ip_address() alone.
+
+ include/ntp_rfc2553.h@1.35 +10 -1
+ add copy_addrinfo_list()
+
+ include/ntpd.h@1.137.1.3 +15 -6
+ mention copy_addrinfo_list() near getaddrinfo_sometime() prototype.
+
+ libntp/ntp_rfc2553.c@1.42 +92 -0
+ add copy_addrinfo_list()
+
+ ntpd/ntp_config.c@1.246 +18 -116
+ Stop using getaddrinfo() to convert numeric address strings to on-wire
+ addresses in favor of is_ip_address() alone.
+
+ ntpd/ntp_intres.c@1.83 +10 -1
+ add DEBUG code to exercise copy_addrinfo_list() harmlessly
+
+ChangeSet@1.2082.4.58, 2010-02-05 22:26:34+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1480] snprintf() cleanup caused unterminated refclock IDs.
- ChangeLog@1.606 +1 -0
+ ChangeLog@1.496.26.39 +1 -0
[Bug 1480] snprintf() cleanup caused unterminated refclock IDs.
- ntpd/ntp_control.c@1.131 +1 -1
+ ntpd/ntp_control.c@1.129.1.2 +1 -1
[Bug 1480] snprintf() cleanup caused unterminated refclock IDs.
-ChangeSet@1.2144, 2010-02-04 23:13:52+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2099, 2010-02-05 10:31:56+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P17
+ TAG: NTP_4_2_7P17
+
+ ChangeLog@1.530 +1 -0
+ NTP_4_2_7P17
+
+ ntpd/ntpd-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpd/ntpd-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ ntpd/ntpd-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpd/ntpd.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpdc/ntpdc-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpdc/ntpdc-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ ntpdc/ntpdc-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpdc/ntpdc.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpq/ntpq-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpq/ntpq-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ ntpq/ntpq-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpq/ntpq.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ ntpsnmpd/ntpsnmpd.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ packageinfo.sh@1.19 +1 -1
+ NTP_4_2_7P17
+
+ sntp/sntp-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ sntp/sntp-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ sntp/sntp-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ sntp/sntp.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ sntp/sntp.html@1.18 +1 -1
+ NTP_4_2_7P17
+
+ util/ntp-keygen-opts.c@1.18 +2 -2
+ NTP_4_2_7P17
+
+ util/ntp-keygen-opts.h@1.18 +3 -3
+ NTP_4_2_7P17
+
+ util/ntp-keygen-opts.texi@1.18 +2 -2
+ NTP_4_2_7P17
+
+ util/ntp-keygen.1@1.18 +2 -2
+ NTP_4_2_7P17
+
+ChangeSet@1.2096.1.1, 2010-02-05 05:07:21+00:00, davehart@shiny.ad.hartbrothers.com
+ Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
+ Broaden ylwrap workaround VPATH_HACK to all non-GNU make.
+
+ ChangeLog@1.527.1.1 +6 -0
+ Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
+ Broaden ylwrap workaround VPATH_HACK to all non-GNU make.
+
+ include/ntp_debug.h@1.3 +2 -0
+ include ntp_assert.h so source files can include one less .h
+
+ m4/ntp_vpathhack.m4@1.3 +25 -11
+ ABroaden ylwrap workaround VPATH_HACK to all non-GNU make.
+
+ ntpd/Makefile.am@1.90 +3 -3
+ use $(srcdir)/ prefix for ntpd-opts.[ch] in BS_DIST
+
+ ntpd/ntp_scanner.c@1.32 +13 -6
+ Attempt to cure CID 108 TAINTED_SCALAR warning.
+
+ ntpd/work_fork.c@1.2 +10 -2
+ Attempts to cure CID 118 CID 119 TAINTED_SCALAR warnings.
+
+ChangeSet@1.2082.4.57, 2010-02-04 23:13:52+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
- ChangeLog@1.605 +4 -0
+ ChangeLog@1.496.26.38 +4 -0
[Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
Makefile.am@1.93 +3 -3
[Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
- sntp/Makefile.am@1.28 +3 -3
+ sntp/Makefile.am@1.21.1.7 +3 -3
[Bug 1477] 1st non-gmake make in clone w/VPATH can't make COPYRIGHT.
-ChangeSet@1.2143, 2010-02-04 02:57:49-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2096, 2010-02-04 10:32:08+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P16
+ TAG: NTP_4_2_7P16
+
+ ChangeLog@1.527 +1 -0
+ NTP_4_2_7P16
+
+ ntpd/ntpd-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpd/ntpd-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ ntpd/ntpd-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpd/ntpd.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpdc/ntpdc-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpdc/ntpdc-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ ntpdc/ntpdc-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpdc/ntpdc.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpq/ntpq-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpq/ntpq-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ ntpq/ntpq-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpq/ntpq.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ ntpsnmpd/ntpsnmpd.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ packageinfo.sh@1.18 +1 -1
+ NTP_4_2_7P16
+
+ sntp/sntp-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ sntp/sntp-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ sntp/sntp-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ sntp/sntp.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ sntp/sntp.html@1.17 +1 -1
+ NTP_4_2_7P16
+
+ util/ntp-keygen-opts.c@1.17 +2 -2
+ NTP_4_2_7P16
+
+ util/ntp-keygen-opts.h@1.17 +3 -3
+ NTP_4_2_7P16
+
+ util/ntp-keygen-opts.texi@1.17 +2 -2
+ NTP_4_2_7P16
+
+ util/ntp-keygen.1@1.17 +2 -2
+ NTP_4_2_7P16
+
+ChangeSet@1.2082.4.56, 2010-02-04 02:57:49-05:00, stenn@whimsy.udel.edu
NTP_4_2_6P1_RC4
TAG: NTP_4_2_6P1_RC4
- ChangeLog@1.604 +1 -0
+ ChangeLog@1.496.26.37 +1 -0
NTP_4_2_6P1_RC4
- ntpd/ntpd-opts.c@1.252 +2 -2
+ ntpd/ntpd-opts.c@1.248.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpd/ntpd-opts.h@1.252 +3 -3
+ ntpd/ntpd-opts.h@1.248.4.1 +3 -3
NTP_4_2_6P1_RC4
- ntpd/ntpd-opts.texi@1.250 +2 -2
+ ntpd/ntpd-opts.texi@1.246.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpd/ntpd.1@1.250 +2 -2
+ ntpd/ntpd.1@1.246.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpdc/ntpdc-opts.c@1.248 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpdc/ntpdc-opts.h@1.248 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.4.1 +3 -3
NTP_4_2_6P1_RC4
- ntpdc/ntpdc-opts.texi@1.247 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpdc/ntpdc.1@1.247 +2 -2
+ ntpdc/ntpdc.1@1.243.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpq/ntpq-opts.c@1.249 +2 -2
+ ntpq/ntpq-opts.c@1.245.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpq/ntpq-opts.h@1.249 +3 -3
+ ntpq/ntpq-opts.h@1.245.4.1 +3 -3
NTP_4_2_6P1_RC4
- ntpq/ntpq-opts.texi@1.248 +2 -2
+ ntpq/ntpq-opts.texi@1.244.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpq/ntpq.1@1.248 +2 -2
+ ntpq/ntpq.1@1.244.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpsnmpd/ntpsnmpd-opts.c@1.127 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpsnmpd/ntpsnmpd-opts.h@1.127 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.4.1 +3 -3
NTP_4_2_6P1_RC4
- ntpsnmpd/ntpsnmpd-opts.texi@1.127 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.4.1 +2 -2
NTP_4_2_6P1_RC4
- ntpsnmpd/ntpsnmpd.1@1.126 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.4.1 +2 -2
NTP_4_2_6P1_RC4
- packageinfo.sh@1.263 +1 -1
+ packageinfo.sh@1.255.6.1 +1 -1
NTP_4_2_6P1_RC4
- sntp/sntp-opts.c@1.121 +2 -2
+ sntp/sntp-opts.c@1.117.4.1 +2 -2
NTP_4_2_6P1_RC4
- sntp/sntp-opts.h@1.121 +3 -3
+ sntp/sntp-opts.h@1.117.4.1 +3 -3
NTP_4_2_6P1_RC4
- sntp/sntp-opts.texi@1.121 +2 -2
+ sntp/sntp-opts.texi@1.117.4.1 +2 -2
NTP_4_2_6P1_RC4
- sntp/sntp.1@1.121 +2 -2
+ sntp/sntp.1@1.117.4.1 +2 -2
NTP_4_2_6P1_RC4
- sntp/sntp.html@1.11 +1 -1
+ sntp/sntp.html@1.7.4.1 +1 -1
NTP_4_2_6P1_RC4
- util/ntp-keygen-opts.c@1.251 +2 -2
+ util/ntp-keygen-opts.c@1.247.4.1 +2 -2
NTP_4_2_6P1_RC4
- util/ntp-keygen-opts.h@1.251 +3 -3
+ util/ntp-keygen-opts.h@1.247.4.1 +3 -3
NTP_4_2_6P1_RC4
- util/ntp-keygen-opts.texi@1.250 +2 -2
+ util/ntp-keygen-opts.texi@1.246.4.1 +2 -2
NTP_4_2_6P1_RC4
- util/ntp-keygen.1@1.250 +2 -2
+ util/ntp-keygen.1@1.246.4.1 +2 -2
NTP_4_2_6P1_RC4
-ChangeSet@1.2142, 2010-02-04 03:01:42+00:00, hart@psp-fb1.ntp.org
+ChangeSet@1.2082.4.55, 2010-02-04 03:01:42+00:00, hart@psp-fb1.ntp.org
Makefile.am:
fix make distdir before make all on FreeBSD make
Makefile.am@1.92 +5 -5
fix make distdir before make all on FreeBSD make
- sntp/Makefile.am@1.27 +26 -25
+ sntp/Makefile.am@1.21.1.6 +26 -25
fix make distdir before make all on FreeBSD make
-ChangeSet@1.2141, 2010-02-03 23:51:52+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.54, 2010-02-03 23:51:52+00:00, davehart@shiny.ad.hartbrothers.com
Remove arlib.
BitKeeper/deleted/.del-COPYING~1e5c94deb8b25a03@1.3 +0 -0
@@ -7371,31 +118301,116 @@ ChangeSet@1.2141, 2010-02-03 23:51:52+00:00, davehart@shiny.ad.hartbrothers.com
BitKeeper/deleted/.del-sample.c~4c74b15f3881e611@1.2 +0 -0
Rename: arlib/sample.c -> BitKeeper/deleted/.del-sample.c~4c74b15f3881e611
- ChangeLog@1.603 +1 -0
+ ChangeLog@1.496.26.36 +1 -0
Remove arlib.
Makefile.am@1.91 +1 -4
Remove arlib.
- configure.ac@1.475 +7 -13
+ configure.ac@1.465.1.10 +7 -13
Remove arlib, replace --with-arlib handling with deprecation warning.
-ChangeSet@1.2140, 2010-02-03 05:28:18-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2091, 2010-02-03 10:36:19+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P15
+ TAG: NTP_4_2_7P15
+
+ ChangeLog@1.523 +1 -0
+ NTP_4_2_7P15
+
+ ntpd/ntpd-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpd/ntpd-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ ntpd/ntpd-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpd/ntpd.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpdc/ntpdc-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpdc/ntpdc-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ ntpdc/ntpdc-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpdc/ntpdc.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpq/ntpq-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpq/ntpq-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ ntpq/ntpq-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpq/ntpq.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ ntpsnmpd/ntpsnmpd.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ packageinfo.sh@1.17 +1 -1
+ NTP_4_2_7P15
+
+ sntp/sntp-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ sntp/sntp-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ sntp/sntp-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ sntp/sntp.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ sntp/sntp.html@1.16 +1 -1
+ NTP_4_2_7P15
+
+ util/ntp-keygen-opts.c@1.16 +2 -2
+ NTP_4_2_7P15
+
+ util/ntp-keygen-opts.h@1.16 +3 -3
+ NTP_4_2_7P15
+
+ util/ntp-keygen-opts.texi@1.16 +2 -2
+ NTP_4_2_7P15
+
+ util/ntp-keygen.1@1.16 +2 -2
+ NTP_4_2_7P15
+
+ChangeSet@1.2082.4.53, 2010-02-03 05:28:18-05:00, stenn@whimsy.udel.edu
[Bug 1474] ntp_keygen needs LCRYPTO after libntp.a
- ChangeLog@1.602 +1 -0
+ ChangeLog@1.496.26.35 +1 -0
[Bug 1474] ntp_keygen needs LCRYPTO after libntp.a
- util/Makefile.am@1.49 +1 -1
+ util/Makefile.am@1.45.1.4 +1 -1
[Bug 1474] ntp_keygen needs LCRYPTO after libntp.a
-ChangeSet@1.2139, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.52, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1455] ntpd does not try /etc/ntp.audio as documented.
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
Remove some dead code checking for emalloc() returning NULL.
- ChangeLog@1.601 +4 -0
+ ChangeLog@1.496.26.34 +4 -0
[Bug 1455] ntpd does not try /etc/ntp.audio as documented.
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
@@ -7411,22 +118426,22 @@ ChangeSet@1.2139, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
libntp/findconfig.c@1.3 +3 -3
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- libntp/humandate.c@1.8 +7 -6
+ libntp/humandate.c@1.7.1.1 +7 -6
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- libntp/modetoa.c@1.3 +2 -2
+ libntp/modetoa.c@1.2.1.1 +2 -2
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- libntp/prettydate.c@1.13 +11 -10
+ libntp/prettydate.c@1.12.1.1 +11 -10
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- libntp/uglydate.c@1.4 +5 -3
+ libntp/uglydate.c@1.3.1.1 +5 -3
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- libntp/uinttoa.c@1.3 +1 -1
+ libntp/uinttoa.c@1.2.1.1 +1 -1
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- ntpd/ntp_control.c@1.130 +35 -32
+ ntpd/ntp_control.c@1.129.1.1 +35 -32
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
ntpd/refclock_arbiter.c@1.15 +9 -9
@@ -7500,7 +118515,7 @@ ChangeSet@1.2139, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
Remove some dead code checking for emalloc() returning NULL.
- ntpd/refclock_jupiter.c@1.22 +6 -10
+ ntpd/refclock_jupiter.c@1.21.1.1 +6 -10
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
Remove some dead code checking for emalloc() returning NULL.
@@ -7516,7 +118531,7 @@ ChangeSet@1.2139, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
Remove some dead code checking for emalloc() returning NULL.
- ntpd/refclock_palisade.c@1.32 +11 -6
+ ntpd/refclock_palisade.c@1.31.1.1 +11 -6
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
@@ -7550,23 +118565,123 @@ ChangeSet@1.2139, 2010-02-03 04:58:33+00:00, davehart@shiny.ad.hartbrothers.com
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
Fix widely cut-n-pasted bug in refclock shutdown after failed start.
- ntpq/ntpq-subs.c@1.42 +28 -22
+ ntpq/ntpq-subs.c@1.39.2.1 +28 -22
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
- ntpq/ntpq.c@1.98 +23 -12
+ ntpq/ntpq.c@1.97.1.1 +23 -12
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
ports/winnt/ntpd/hopf_PCI_io.c@1.7 +173 -136
Convert many sprintf() calls to snprintf(), also strcpy(), strcat().
clean up indent mess.
- ports/winnt/vs2008/libntp/libntp.vcproj@1.25 +6 -2
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.1.5 +6 -2
add reference to libntp/audio.c
-ChangeSet@1.2138, 2010-02-02 08:09:04+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2089, 2010-02-02 10:34:20+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P14
+ TAG: NTP_4_2_7P14
+
+ ChangeLog@1.521 +1 -0
+ NTP_4_2_7P14
+
+ ntpd/ntpd-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpd/ntpd-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ ntpd/ntpd-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpd/ntpd.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpdc/ntpdc-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpdc/ntpdc-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ ntpdc/ntpdc-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpdc/ntpdc.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpq/ntpq-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpq/ntpq-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ ntpq/ntpq-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpq/ntpq.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ ntpsnmpd/ntpsnmpd.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ packageinfo.sh@1.16 +1 -1
+ NTP_4_2_7P14
+
+ sntp/sntp-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ sntp/sntp-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ sntp/sntp-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ sntp/sntp.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ sntp/sntp.html@1.15 +1 -1
+ NTP_4_2_7P14
+
+ util/ntp-keygen-opts.c@1.15 +2 -2
+ NTP_4_2_7P14
+
+ util/ntp-keygen-opts.h@1.15 +3 -3
+ NTP_4_2_7P14
+
+ util/ntp-keygen-opts.texi@1.15 +2 -2
+ NTP_4_2_7P14
+
+ util/ntp-keygen.1@1.15 +2 -2
+ NTP_4_2_7P14
+
+ChangeSet@1.2084.1.40, 2010-02-02 04:18:56-05:00, stenn@pogo.udel.edu
+ cleanup
+
+ configure.ac@1.477 +0 -1
+ cleanup
+
+ChangeSet@1.2084.1.37, 2010-02-02 08:28:17+00:00, stenn@poog.il.thewrittenword.com
+ [Bug 1469] more int32 cleanup
+
+ configure.ac@1.476 +1 -1
+ [Bug 1469] more int32 cleanup
+
+ include/ntp_types.h@1.18 +4 -3
+ [Bug 1469] more int32 cleanup
+
+ChangeSet@1.2082.4.51, 2010-02-02 08:09:04+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1473] "make distcheck" before build can't make sntp/version.m4.
- ChangeLog@1.600 +1 -0
+ ChangeLog@1.496.26.33 +1 -0
[Bug 1473] "make distcheck" before build can't make sntp/version.m4.
Makefile.am@1.90 +12 -1
@@ -7577,7 +118692,7 @@ ChangeSet@1.2138, 2010-02-02 08:09:04+00:00, davehart@shiny.ad.hartbrothers.com
add do-nothing action for rule lacking one to avoid any use
of SCCS get default.
- sntp/Makefile.am@1.26 +34 -5
+ sntp/Makefile.am@1.21.1.5 +34 -5
[Bug 1473] "make distcheck" before build can't make sntp/version.m4.
add targets for autogen-version.def, version.def, version.m4, and
version.texi which invoke a submake on the corresponding check-*
@@ -7590,23 +118705,55 @@ ChangeSet@1.2138, 2010-02-02 08:09:04+00:00, davehart@shiny.ad.hartbrothers.com
FreeBSD 6.x make which fails with "make COPYRIGHT" when
"make ./COPYRIGHT" would work.
-ChangeSet@1.2137, 2010-02-02 01:29:56+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.50, 2010-02-02 01:29:56+00:00, davehart@shiny.ad.hartbrothers.com
Makefile.am:
keyword-gen-utd is intended to have one line of content.
- ntpd/Makefile.am@1.87 +1 -1
+ ntpd/Makefile.am@1.80.1.7 +1 -1
keyword-gen-utd is intended to have one line of content.
-ChangeSet@1.2136, 2010-02-01 01:56:41+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.14.1, 2010-02-01 18:15:31+00:00, davehart@shiny.ad.hartbrothers.com
+ ntp_data_structures.h:
+ ensure size_t is available by including stddef.h
+
+ include/ntp_data_structures.h@1.7 +1 -0
+ ensure size_t is available by including stddef.h
+
+ChangeSet@1.2084.13.5, 2010-02-01 04:40:15+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+ [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+
+ ChangeLog@1.513.1.5 +2 -0
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+ [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+
+ include/ntp_io.h@1.15 +1 -1
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+ [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+
+ ntpd/ntp_config.c@1.245 +7 -9
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+
+ ntpd/ntp_intres.c@1.80.1.1 +4 -1
+ [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+
+ ntpd/ntp_io.c@1.312 +5 -3
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+
+ ntpd/ntpd.c@1.110.1.4 +7 -4
+ [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
+ [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
+
+ChangeSet@1.2082.4.49, 2010-02-01 01:56:41+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1470] "make distdir" in $srcdir builds keyword-gen, libntp.a.
- ChangeLog@1.599 +1 -0
+ ChangeLog@1.496.26.32 +1 -0
[Bug 1470] "make distdir" in $srcdir builds keyword-gen, libntp.a.
- bootstrap@1.31 +5 -6
+ bootstrap@1.28.1.3 +5 -6
add ntpd/keyword-gen.out to touch targets, at same time as ntp_parser.h.
- ntpd/Makefile.am@1.86 +41 -26
+ ntpd/Makefile.am@1.80.1.6 +41 -26
[Bug 1470] "make distdir" in $srcdir builds keyword-gen, libntp.a.
Avoid building keyword-gen if its output is up-to-date in general.
@@ -7618,155 +118765,1346 @@ ChangeSet@1.2136, 2010-02-01 01:56:41+00:00, davehart@shiny.ad.hartbrothers.com
ntpd/keyword-gen-utd@1.0 +0 -0
-ChangeSet@1.2135, 2010-01-30 18:06:35-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.13.4, 2010-01-31 10:32:07+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P13
+ TAG: NTP_4_2_7P13
+
+ ChangeLog@1.513.1.4 +1 -0
+ NTP_4_2_7P13
+
+ ntpd/ntpd-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpd/ntpd-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ ntpd/ntpd-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpd/ntpd.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpdc/ntpdc-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpdc/ntpdc-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ ntpdc/ntpdc-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpdc/ntpdc.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpq/ntpq-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpq/ntpq-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ ntpq/ntpq-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpq/ntpq.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ ntpsnmpd/ntpsnmpd.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ packageinfo.sh@1.15 +1 -1
+ NTP_4_2_7P13
+
+ sntp/sntp-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ sntp/sntp-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ sntp/sntp-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ sntp/sntp.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ sntp/sntp.html@1.14 +1 -1
+ NTP_4_2_7P13
+
+ util/ntp-keygen-opts.c@1.14 +2 -2
+ NTP_4_2_7P13
+
+ util/ntp-keygen-opts.h@1.14 +3 -3
+ NTP_4_2_7P13
+
+ util/ntp-keygen-opts.texi@1.14 +2 -2
+ NTP_4_2_7P13
+
+ util/ntp-keygen.1@1.14 +2 -2
+ NTP_4_2_7P13
+
+ChangeSet@1.2084.13.3, 2010-01-31 02:18:32-05:00, stenn@whimsy.udel.edu
+ cleanup
+
+ ChangeLog@1.513.1.3 +1 -1
+ cleanup
+
+ChangeSet@1.2082.4.48, 2010-01-30 18:06:35-05:00, stenn@whimsy.udel.edu
[Bug 1467] Fix bogus rebuild of sntp/sntp.html
- ChangeLog@1.598 +4 -0
+ ChangeLog@1.496.26.31 +4 -0
+ [Bug 1467] Fix bogus rebuild of sntp/sntp.html
+
+ bootstrap@1.28.1.2 +1 -1
[Bug 1467] Fix bogus rebuild of sntp/sntp.html
- bootstrap@1.30 +1 -1
+ChangeSet@1.2084.13.2, 2010-01-30 18:02:25-05:00, stenn@whimsy.udel.edu
+ [Bug 1467] Fix bogus rebuild of sntp/sntp.html
+
+ ChangeLog@1.513.1.2 +1 -0
[Bug 1467] Fix bogus rebuild of sntp/sntp.html
-ChangeSet@1.2134, 2010-01-24 10:31:32+00:00, stenn@whimsy.udel.edu
+ bootstrap@1.31 +1 -1
+ [Bug 1467] Fix bogus rebuild of sntp/sntp.html
+
+ChangeSet@1.2084.1.35, 2010-01-30 22:35:13+00:00, davehart@shiny.ad.hartbrothers.com
+ configure.ac:
+ reword to better fit with surrounding messages
+
+ configure.ac@1.475 +2 -2
+ reword to better fit with surrounding messages
+
+ChangeSet@1.2084.1.34, 2010-01-30 22:28:30+00:00, davehart@shiny.ad.hartbrothers.com
+ configure.ac:
+ attempt to properly quote all args to AC_LANG_PROGRAM()
+
+ configure.ac@1.474 +39 -39
+ attempt to properly quote all args to AC_LANG_PROGRAM()
+
+ChangeSet@1.2084.1.33, 2010-01-30 22:16:54+00:00, davehart@shiny.ad.hartbrothers.com
+ check for int32, u_int32 before testing result.
+
+ configure.ac@1.473 +3 -1
+ check for int32, u_int32 before testing result.
+
+ChangeSet@1.2084.1.32, 2010-01-30 17:53:03+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ ChangeLog@1.516 +1 -1
+ [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ configure.ac@1.472 +56 -22
+ [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ include/ntp_types.h@1.17 +11 -7
+ [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ ntpd/ntp_intres.c@1.81 +6 -0
+ [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ChangeSet@1.2084.13.1, 2010-01-30 10:31:55+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P12
+ TAG: NTP_4_2_7P12
+
+ ChangeLog@1.513.1.1 +1 -0
+ NTP_4_2_7P12
+
+ ntpd/ntpd-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpd/ntpd-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ ntpd/ntpd-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpd/ntpd.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpdc/ntpdc-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpdc/ntpdc-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ ntpdc/ntpdc-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpdc/ntpdc.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpq/ntpq-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpq/ntpq-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ ntpq/ntpq-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpq/ntpq.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ ntpsnmpd/ntpsnmpd.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ packageinfo.sh@1.14 +1 -1
+ NTP_4_2_7P12
+
+ sntp/sntp-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ sntp/sntp-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ sntp/sntp-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ sntp/sntp.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ sntp/sntp.html@1.13 +1 -1
+ NTP_4_2_7P12
+
+ util/ntp-keygen-opts.c@1.13 +2 -2
+ NTP_4_2_7P12
+
+ util/ntp-keygen-opts.h@1.13 +3 -3
+ NTP_4_2_7P12
+
+ util/ntp-keygen-opts.texi@1.13 +2 -2
+ NTP_4_2_7P12
+
+ util/ntp-keygen.1@1.13 +2 -2
+ NTP_4_2_7P12
+
+ChangeSet@1.2084.1.30, 2010-01-30 06:26:12+00:00, davehart@shiny.ad.hartbrothers.com
+ * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ ChangeLog@1.514 +1 -0
+ * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ include/ntp_types.h@1.16 +8 -6
+ * [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
+
+ChangeSet@1.2084.1.29, 2010-01-29 20:11:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1468] 'make install' broken for root on default NFS mount.
+
+ ChangeLog@1.513 +3 -0
+ * [Bug 1468] 'make install' broken for root on default NFS mount.
+ Add a more explicit note to 4.2.7p11 section about new DNS code.
+
+ libparse/Makefile.am@1.20 +21 -37
+ [Bug 1468] 'make install' broken for root on default NFS mount.
+ Ensure workaround to clean any stale $(builddir)/info_trimble.c
+ completes its work in "make all" so it does not fire during
+ "make install" where creating files in $(builddir) may not be
+ possible, such as root on a default NFS-mounted directory.
+
+ChangeSet@1.2084.1.28, 2010-01-28 10:35:48+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P11
+ TAG: NTP_4_2_7P11
+
+ ChangeLog@1.512 +1 -0
+ NTP_4_2_7P11
+
+ ntpd/ntpd-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpd/ntpd-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ ntpd/ntpd-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpd/ntpd.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpdc/ntpdc-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpdc/ntpdc-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ ntpdc/ntpdc-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpdc/ntpdc.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpq/ntpq-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpq/ntpq-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ ntpq/ntpq-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpq/ntpq.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ ntpsnmpd/ntpsnmpd.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ packageinfo.sh@1.13 +1 -1
+ NTP_4_2_7P11
+
+ sntp/sntp-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ sntp/sntp-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ sntp/sntp-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ sntp/sntp.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ sntp/sntp.html@1.12 +1 -1
+ NTP_4_2_7P11
+
+ util/ntp-keygen-opts.c@1.12 +2 -2
+ NTP_4_2_7P11
+
+ util/ntp-keygen-opts.h@1.12 +3 -3
+ NTP_4_2_7P11
+
+ util/ntp-keygen-opts.texi@1.12 +2 -2
+ NTP_4_2_7P11
+
+ util/ntp-keygen.1@1.12 +2 -2
+ NTP_4_2_7P11
+
+ChangeSet@1.2084.1.27, 2010-01-27 21:16:20+00:00, davehart@shiny.ad.hartbrothers.com
+ convert leftover debugging msyslog() to DPRINTF()
+ "attempting to open log %s"
+
+ ntpd/ntpd.c@1.110.1.3 +1 -1
+ convert leftover debugging msyslog() to DPRINTF()
+ "attempting to open log %s"
+
+ChangeSet@1.2084.1.26, 2010-01-27 20:21:24+00:00, davehart@shiny.ad.hartbrothers.com
+ Fix libparse build in $(srcdir)
+
+ libparse/Makefile.am@1.19 +1 -1
+ Fix libparse build in $(srcdir)
+
+ChangeSet@1.2084.1.25, 2010-01-27 18:45:33+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 47] Debugging and logging do not work after a fork.
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+ #include <config.h> from all .c files and do not include it
+ from any .h files. Previously config.h appeared a dozen times in
+ preprocessed output of some .c files.
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+ eliminate hand-crafted byte-swapping code from refclock_palisade.c in
+ preference to using htonl(), htons(). Tested by Fernando Hauscarriaga.
+
+
+ BitKeeper/etc/ignore@1.75 +4 -2
+ add *.vcproj.*.user
+ correct .buildkey to .buildkey-* to reflect changed build script,
+ add .flockbuild-* along the same lines.
+ tell BK to not attempt any operations in A.*/ dirs via -prune,
+ particularly handy when there's a broken make dist distdir,
+ which may contain copies of BK metadata (s.* files).
+
+ ChangeLog@1.511 +3 -0
+ [Bug 47] Debugging and logging do not work after a fork.
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+
+ configure.ac@1.471 +18 -18
+ add AC_FUNC_ALLOCA (used by ntp_malloc.h, ntp_intres.c).
+ add AC_CHECK_FUNCS(closefrom)
+ remove AC_CHECK_FUNCS(timer_settime) which is redundant with
+ AC_CHECK_FUNCS(timer_create).
+ add AC_CHECK_FUNCS(_exit)
+ remove --enable-force-defer-DNS switch to configure, as the intres
+ path is always taken now.
+
+ include/Makefile.am@1.39 +2 -0
+ add ntp_worker.h, ntp_workimpl.h
+
+ include/iosignal.h@1.5 +36 -8
+ Move USE_SIGIO/USE_SIGPOLL definition from iosignal.c to share with
+ ntpd/work_fork.c.
+ Stay out of system/compiler underscore-prefixed namespace.
+
+ include/l_stdlib.h@1.18 +4 -8
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Stay out of system/compiler underscore-prefixed namespace.
+
+ include/ntp_data_structures.h@1.6 +39 -13
+ Preserve callsite __FILE__ and __LINE__ for create_priority_queue()
+ and get_node() for heap leak detection when available.
+ Stay out of system/compiler underscore-prefixed namespace.
+
+ include/ntp_fp.h@1.16 +2 -2
+ whitespace cleanup (spaces -> tabs)
+
+ include/ntp_intres.h@1.3 +19 -10
+ repurpose ntp_intres.h, which used to solely be responsible for
+ defining NO_INTRES if needed. Now ntp_workimpl.h handles the
+ declaration of the opposite-sense WORKER as needed, and
+ ntp_intres.h is an internal header for intres declarations
+ used by ntp_worker.c and ntp_intres.c.
+
+ include/ntp_io.h@1.14 +13 -7
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Add close_all_beyond() and update_resp_pipe_fd() declarations.
+
+ include/ntp_lists.h@1.2 +0 -4
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ include/ntp_machine.h@1.26.1.1 +6 -170
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Remove huge blob of #if 0 code from pre-Autoconf days, our
+ transition to handling most platform differences via
+ configure is long past.
+
+ include/ntp_malloc.h@1.4 +29 -4
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Handle platform differences with alloca()
+
+ include/ntp_proto.h@1.4.1.1 +3 -7
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Stay out of system/compiler underscore-prefixed namespace.
+
+ include/ntp_rfc2553.h@1.34 +0 -5
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ include/ntp_select.h@1.5 +16 -21
+ whitespace (indent preprocessor directives)
+
+ include/ntp_stdlib.h@1.41 +1 -1
+ add humantime() declaration (libntp/humandate.c)
+ remove superfluous #include "ntp_rfc2553.h"
+
+ include/ntp_string.h@1.5 +3 -7
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ Stay out of system/compiler underscore-prefixed namespace.
+
+ include/ntp_syscall.h@1.9 +0 -4
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ include/ntp_syslog.h@1.4 +11 -9
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+
+ include/ntp_types.h@1.15 +8 -8
+ Use typedef instead of #define to declare int32, u_int32.
+
+ include/ntp_worker.h@1.1 +52 -0
+ worker internals used by ntp_worker.c, work_fork.c, work_thread.c,
+ and ntp_intres.c.
+
+ include/ntp_worker.h@1.0 +0 -0
+
+ include/ntp_workimpl.h@1.1 +25 -0
+ defines WORKER, WORK_FORK, and WORK_THREAD as appropriate (chooses
+ implementation to use).
+
+ include/ntp_workimpl.h@1.0 +0 -0
+
+ include/ntpd.h@1.137.1.2 +72 -42
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+ remove declarations from old ntp_intres.c implementation, add
+ declarations for new ntp_intres.c, ntp_worker.c, work_fork.c,
+ and work_thread.c.
+ Correct a few misplaces variable and function declarations. ntpd.h
+ declares all the functions from various files first, then all
+ the variables, so there are two spots for declarations for each
+ source file.
+
+ include/recvbuff.h@1.20 +1 -5
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/atoint.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/atolfp.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/atouint.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/authusekey.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/caljulian.c@1.12 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/caltontp.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/calyearstart.c@1.5 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/clocktime.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/clocktypes.c@1.19 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/dofptoa.c@1.7 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/dolfptoa.c@1.7 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/emalloc.c@1.11 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/fptoa.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/fptoms.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/getopt.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/hextoint.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/hextolfp.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/humandate.c@1.8 +33 -6
+ sprintf() -> snprintf()
+ add humantime() used by ntp_intres.c DPRINTF() calls.
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/icom.c@1.12 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/iosignal.c@1.15 +0 -28
+ Move USE_SIGIO/USE_SIGPOLL definition to iosignal.h to share with
+ ntpd/work_fork.c.
+
+ libntp/mfptoa.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/mfptoms.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/mktime.c@1.9 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/modetoa.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/mstolfp.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/msutotsf.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/msyslog.c@1.25 +40 -38
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+ mimic syslog() behavior adding a trailing \n if not present
+ when logging to a file.
+
+ libntp/netof.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/octtoint.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/prettydate.c@1.13 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/refnumtoa.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/socktohost.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/strdup.c@1.6 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/syssignal.c@1.10 +40 -51
+ Do not msyslog(LOG_DEBUG) about signal flags simply because SA_SIGINFO
+ flag bit is set.
+ Define SIG_ERR, Z_SA_RESTART, Z_SA_SIGINFO to reduce #ifdef nesting.
+
+ libntp/systime.c@1.49 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/tsftomsu.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/tstotv.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/tvtots.c@1.3 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/uglydate.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/uinttoa.c@1.3 +2 -1
+ sprintf() -> snprintf()
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libntp/ymd2yd.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/Makefile.am@1.18 +61 -69
+ Correct generation of info_trimble.c to create it in $(srcdir)
+ instead of $(builddir)
+ Add temporary workaround to avoid breaking existing build trees
+ with this change, which aggressively removes info_trimble.c
+ from $(builddir) where it tends to have precedence.
+ Correct k*.o rule dependencies to use $(srcdir)/ prefix.
+ Remove ansi2knr crud (such as kclk_computime_.o: clk_computime_.c
+ rule).
+ Correct workaround which generates local sys/systm.h to be able
+ to work more than once by not breaking if sys/ subdir exists.
+
+ libparse/binio.c@1.7 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/data_mbg.c@1.10 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/gpstolfp.c@1.10 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/info_trimble.c@1.5 +1 -1
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ (produced by updated mkinfo_rcmd.sed and mkinfo_scmd.sed)
+
+ libparse/mfp_mul.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/mkinfo_rcmd.sed@1.3 +4 -4
+ produce the same output using FreeBSD or GNU sed
+
+ libparse/mkinfo_scmd.sed@1.3 +5 -6
+ produce the same output using FreeBSD or GNU sed.
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/parsesolaris.c@1.9 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ libparse/trim_info.c@1.5 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpd/Makefile.am@1.87 +4 -1
+ add ntp_worker.c, work_fork.c, work_thread.c references.
+
+ ntpd/cmd_args.c@1.56.1.3 +2 -3
+ remove unused leftover global specific_interface.
+ rindex() -> strrchr()
+
+ ntpd/ntp_config.c@1.244 +359 -589
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+ include system headers before NTP ones.
+ No need to include ntpsim.h in ntp_config.c these days.
+
+ ntpd/ntp_control.c@1.130 +2 -3
+ style only
+
+ ntpd/ntp_data_structures.c@1.12 +108 -67
+ Preserve callsite __FILE__ and __LINE__ for create_priority_queue()
+ and get_node() for heap leak detection when available.
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpd/ntp_intres.c@1.80 +765 -1119
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+
+ ntpd/ntp_io.c@1.311 +134 -70
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+
+ ntpd/ntp_timer.c@1.57 +53 -46
+ add worker_idle_timer and worker_idle_timer_fired() for
+ ntp_worker.c.
+ remove references to HAVE_TIMER_SETTIME which is redundant with
+ HAVE_TIMER_CREATE.
+ define TC_ERR macro to reduce #ifdef clutter.
+ eliminate global sys_time which was referenced only by timer(),
+ replacing with a local. call get_systime() only if the
+ result will be used in timer().
+
+ ntpd/ntp_worker.c@1.1 +155 -0
+ blocking worker child process/thread cross-platform code
+
+ ntpd/ntp_worker.c@1.0 +0 -0
+
+ ntpd/ntpd.c@1.110.1.2 +231 -123
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+ remove unused leftover global specific_interface.
+ move close-all-descriptors code to ntp_io.c close_all_beyond(),
+ used by work_fork.c as well.
+ handle relative path to logfile correctly despite re-opening
+ after fork() with a different curdir.
+
+ ntpd/ntpsim.c@1.23 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpd/refclock_jupiter.c@1.22 +1 -1
+ XNTP_BIG_ENDIAN -> WORDS_BIG_ENDIAN (from config.h)
+
+ ntpd/refclock_palisade.c@1.32 +33 -58
+ eliminate hand-crafted byte-swapping code in preference
+ to using htonl(), htons(). Tested by Fernando Hauscarriaga.
+
+ ntpd/refclock_palisade.h@1.14 +8 -12
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ eliminate hand-crafted byte-swapping code in preference
+ to using htonl(), htons(). Tested by Fernando Hauscarriaga.
+ stay out of system/compiler underscore-prefixed namespace.
+
+ ntpd/work_fork.c@1.1 +460 -0
+ blocking worker child process fork()/pipe() platform code
+
+ ntpd/work_fork.c@1.0 +0 -0
+
+ ntpd/work_thread.c@1.1 +314 -0
+ blocking worker child thread platform code
+
+ ntpd/work_thread.c@1.0 +0 -0
+
+ ntpdc/ntpdc-layout.c@1.2 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpdc/ntpdc.c@1.78 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpq/ntpq-subs.c@1.39.1.3 +40 -40
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+ dump received association IDs if (debug).
+ Remove bogus sanity check (requiring all peers use port 123 or
+ be silently excluded from ntpq -p output).
+
+ ntpq/ntpq.c@1.99 +1 -1
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpsnmpd/ntpSnmpSubagentObject.c@1.4 +6 -0
+ #undef PACKAGE_* names that net-snmp-* headers often define
+ in conflict with ours.
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ntpsnmpd/ntpsnmpd.c@1.4 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ parseutil/testdcf.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ports/winnt/include/config.h@1.82 +43 -8
+ Use macros for ntohl() and friends, which are real function calls
+ by default on Windows.
+
+ ports/winnt/include/sys/time.h@1.6 +0 -2
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ports/winnt/include/win32_io.h@1.2 +2 -3
+ style
+
+ ports/winnt/libntp/SetSystemTime.c@1.8 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ ports/winnt/ntpd/nt_clockstuff.c@1.39 +1 -1
+ Now that main ntpd directory is on include path, remove path to
+ ntpd-opts.h from #include.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.52 +18 -13
+ [Bug 1010] getaddrinfo() could block and thus should not be called by
+ the main thread/process.
+
+ ports/winnt/vc6/ntpd.dsp@1.47 +23 -0
+ add ntp_worker.c, work_fork.c, work_thread.c, ntp_worker.h,
+ ntp_workimpl.h references.
+
+ ports/winnt/vs2003/ntpd.vcproj@1.8 +15 -0
+ add ntp_worker.c, work_fork.c, work_thread.c, ntp_worker.h,
+ ntp_workimpl.h references.
+
+ ports/winnt/vs2005/ntpd.vcproj@1.8 +20 -0
+ add ntp_worker.c, work_fork.c, work_thread.c, ntp_worker.h,
+ ntp_workimpl.h references.
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.26 +28 -0
+ add icom.c, strdup.c, strstr.c references.
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.26 +200 -0
+ add ntp_worker.c, work_fork.c, work_thread.c, ntp_worker.h,
+ ntp_workimpl.h, ntpsim.c, ntp_data_structures.h,
+ refclock_ripencc.c, libparse/binio.c, libparse/gsptolfp.c,
+ libparse/ieee754io.c, libparse/info_trimble.c,
+ libparse/mfp_mul.c, libparse/parsesolaris.c,
+ libparse/parsestreams.c, libparse/trim_info.c references.
+
+ sntp/crypto.c@1.11 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ sntp/kod_management.c@1.17 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ sntp/log.c@1.12 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ sntp/main.c@1.25 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ sntp/networking.c@1.30 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ sntp/utilities.c@1.11 +1 -0
+ #include <config.h> from all .c files and do not include it
+ from any .h files.
+
+ChangeSet@1.2084.1.24, 2010-01-24 11:44:49+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P10
+ TAG: NTP_4_2_7P10
+
+ ChangeLog@1.510 +1 -0
+ NTP_4_2_7P10
+
+ ntpd/ntpd-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpd/ntpd-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ ntpd/ntpd-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpd/ntpd.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpdc/ntpdc-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpdc/ntpdc-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ ntpdc/ntpdc-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpdc/ntpdc.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpq/ntpq-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpq/ntpq-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ ntpq/ntpq-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpq/ntpq.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ ntpsnmpd/ntpsnmpd.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ packageinfo.sh@1.12 +1 -1
+ NTP_4_2_7P10
+
+ sntp/sntp-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ sntp/sntp-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ sntp/sntp-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ sntp/sntp.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ sntp/sntp.html@1.11 +1 -1
+ NTP_4_2_7P10
+
+ util/ntp-keygen-opts.c@1.11 +2 -2
+ NTP_4_2_7P10
+
+ util/ntp-keygen-opts.h@1.11 +3 -3
+ NTP_4_2_7P10
+
+ util/ntp-keygen-opts.texi@1.11 +2 -2
+ NTP_4_2_7P10
+
+ util/ntp-keygen.1@1.11 +2 -2
+ NTP_4_2_7P10
+
+ChangeSet@1.2082.4.47, 2010-01-24 10:31:32+00:00, stenn@whimsy.udel.edu
NTP_4_2_6P1_RC3
TAG: NTP_4_2_6P1_RC3
- ChangeLog@1.597 +1 -0
+ ChangeLog@1.496.26.30 +1 -0
NTP_4_2_6P1_RC3
- ntpd/ntpd-opts.c@1.251 +4 -4
+ ntpd/ntpd-opts.c@1.248.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpd/ntpd-opts.h@1.251 +4 -4
+ ntpd/ntpd-opts.h@1.248.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpd/ntpd-opts.texi@1.249 +2 -2
+ ntpd/ntpd-opts.texi@1.246.3.1 +2 -2
NTP_4_2_6P1_RC3
- ntpd/ntpd.1@1.249 +2 -2
+ ntpd/ntpd.1@1.246.3.1 +2 -2
NTP_4_2_6P1_RC3
- ntpdc/ntpdc-opts.c@1.247 +4 -4
+ ntpdc/ntpdc-opts.c@1.244.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpdc/ntpdc-opts.h@1.247 +4 -4
+ ntpdc/ntpdc-opts.h@1.244.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpdc/ntpdc-opts.texi@1.246 +3 -3
+ ntpdc/ntpdc-opts.texi@1.243.3.1 +3 -3
NTP_4_2_6P1_RC3
- ntpdc/ntpdc.1@1.246 +2 -2
+ ntpdc/ntpdc.1@1.243.3.1 +2 -2
NTP_4_2_6P1_RC3
- ntpq/ntpq-opts.c@1.248 +4 -4
+ ntpq/ntpq-opts.c@1.245.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpq/ntpq-opts.h@1.248 +4 -4
+ ntpq/ntpq-opts.h@1.245.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpq/ntpq-opts.texi@1.247 +3 -3
+ ntpq/ntpq-opts.texi@1.244.3.1 +3 -3
NTP_4_2_6P1_RC3
- ntpq/ntpq.1@1.247 +2 -2
+ ntpq/ntpq.1@1.244.3.1 +2 -2
NTP_4_2_6P1_RC3
- ntpsnmpd/ntpsnmpd-opts.c@1.126 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpsnmpd/ntpsnmpd-opts.h@1.126 +4 -4
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.3.1 +4 -4
NTP_4_2_6P1_RC3
- ntpsnmpd/ntpsnmpd-opts.texi@1.126 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.3.1 +3 -3
NTP_4_2_6P1_RC3
- ntpsnmpd/ntpsnmpd.1@1.125 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.3.1 +2 -2
NTP_4_2_6P1_RC3
- packageinfo.sh@1.262 +1 -1
+ packageinfo.sh@1.255.5.1 +1 -1
NTP_4_2_6P1_RC3
- sntp/sntp-opts.c@1.120 +4 -4
+ sntp/sntp-opts.c@1.117.3.1 +4 -4
NTP_4_2_6P1_RC3
- sntp/sntp-opts.h@1.120 +4 -4
+ sntp/sntp-opts.h@1.117.3.1 +4 -4
NTP_4_2_6P1_RC3
- sntp/sntp-opts.texi@1.120 +3 -3
+ sntp/sntp-opts.texi@1.117.3.1 +3 -3
NTP_4_2_6P1_RC3
- sntp/sntp.1@1.120 +2 -2
+ sntp/sntp.1@1.117.3.1 +2 -2
NTP_4_2_6P1_RC3
- sntp/sntp.html@1.10 +1 -1
+ sntp/sntp.html@1.7.3.1 +1 -1
NTP_4_2_6P1_RC3
- util/ntp-keygen-opts.c@1.250 +4 -4
+ util/ntp-keygen-opts.c@1.247.3.1 +4 -4
NTP_4_2_6P1_RC3
- util/ntp-keygen-opts.h@1.250 +4 -4
+ util/ntp-keygen-opts.h@1.247.3.1 +4 -4
NTP_4_2_6P1_RC3
- util/ntp-keygen-opts.texi@1.249 +3 -3
+ util/ntp-keygen-opts.texi@1.246.3.1 +3 -3
NTP_4_2_6P1_RC3
- util/ntp-keygen.1@1.249 +2 -2
+ util/ntp-keygen.1@1.246.3.1 +2 -2
NTP_4_2_6P1_RC3
-ChangeSet@1.2133, 2010-01-24 03:49:59-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.1.23, 2010-01-24 04:30:32-05:00, stenn@whimsy.udel.edu
+ [Bug 1140] Clean up debug.html, decode.html, and ntpq.html
+
+ ChangeLog@1.509 +1 -0
+ [Bug 1140] Clean up debug.html, decode.html, and ntpq.html
+
+ html/debug.html@1.28 +3 -3
+ [Bug 1140] Clean up debug.html, decode.html, and ntpq.html
+
+ html/decode.html@1.12 +11 -7
+ [Bug 1140] Clean up debug.html, decode.html, and ntpq.html
+
+ html/ntpq.html@1.37 +11 -7
+ [Bug 1140] Clean up debug.html, decode.html, and ntpq.html
+
+ChangeSet@1.2082.4.46, 2010-01-24 03:49:59-05:00, stenn@whimsy.udel.edu
Use TZ=UTC instead of TZ= when calling date in scripts/mkver.in
- ChangeLog@1.596 +4 -3
+ ChangeLog@1.496.26.29 +4 -3
Use TZ=UTC instead of TZ= when calling date in scripts/mkver.in
scripts/mkver.in@1.12 +1 -1
Use TZ=UTC instead of TZ= when calling date in scripts/mkver.in
-ChangeSet@1.2132, 2010-01-24 03:44:05-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.45, 2010-01-24 03:44:05-05:00, stenn@whimsy.udel.edu
cleanup
- ChangeLog@1.595 +2 -2
+ ChangeLog@1.496.26.28 +2 -2
cleanup
-ChangeSet@1.2131, 2010-01-24 03:39:27-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.44, 2010-01-24 03:39:27-05:00, stenn@whimsy.udel.edu
[Bug 1449] SLEW is no longer needed by the simulator
- include/ntpsim.h@1.13 +0 -1
+ include/ntpsim.h@1.12.1.1 +0 -1
[Bug 1449] SLEW is no longer needed by the simulator
-ChangeSet@1.2130, 2010-01-23 23:09:00-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2084.1.21, 2010-01-24 00:16:39-05:00, mayer@pogo.udel.edu
+ Fix move results for vc6
+
+ ports/winnt/vc6/libntp.dsp@1.51 +17 -17
+ Fix move results for vc6
+
+ ports/winnt/vc6/ntpd.dsp@1.46 +3 -4
+ Fix move results for vc6
+
+ChangeSet@1.2084.1.20, 2010-01-24 00:03:42-05:00, mayer@pogo.udel.edu
+ Remerge of bugs 1448-1450
+
+ ChangeLog@1.507 +4 -0
+ Remerge of bugs 1448-1450
+
+ChangeSet@1.2082.4.43, 2010-01-23 23:09:00-05:00, mayer@pogo.udel.edu
Bad inputdir reference
- ports/winnt/vc6/libntp.dsp@1.52 +1 -1
+ ports/winnt/vc6/libntp.dsp@1.43.1.9 +1 -1
Bad inputdir reference
-ChangeSet@1.2129, 2010-01-22 11:49:48+01:00, burnicki@pogo.udel.edu
+ChangeSet@1.2082.4.42, 2010-01-22 11:49:48+01:00, burnicki@pogo.udel.edu
Create the instserv binaries in the correct directories.
ports/winnt/vc6/Instsrv.dsp@1.12 +2 -2
Create the instserv binaries in the correct directories.
-ChangeSet@1.2128, 2010-01-21 23:37:23-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2082.4.41, 2010-01-21 23:37:23-05:00, mayer@pogo.udel.edu
Remove ipv6.c as unnecessary
- ports/winnt/vc6/libntp.dsp@1.51 +0 -4
+ ports/winnt/vc6/libntp.dsp@1.43.1.8 +0 -4
Remove ipv6.c as unnecessary
-ChangeSet@1.2127, 2010-01-17 22:28:21-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2082.4.40, 2010-01-17 22:28:21-05:00, mayer@pogo.udel.edu
Temporarily include ntpsim.h unconditionally
- ntpd/ntp_config.c@1.243 +5 -2
+ ntpd/ntp_config.c@1.241.1.2 +5 -2
Temporarily include ntpsim.h unconditionally
-ChangeSet@1.2125, 2010-01-16 23:20:10-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2082.4.38, 2010-01-16 23:20:10-05:00, mayer@pogo.udel.edu
[Bug 1448] Additional fixes for Windows VC6
lib/isc/win32/net.c@1.14 +2 -2
[Bug 1448] Additional fixes for Windows VC6
- ports/winnt/vc6/libntp.dsp@1.50 +23 -15
+ ports/winnt/vc6/libntp.dsp@1.43.1.7 +23 -15
[Bug 1448] Additional fixes for Windows VC6
-ChangeSet@1.2122.2.3, 2010-01-08 19:11:53+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.1.18, 2010-01-13 10:30:51+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P9
+ TAG: NTP_4_2_7P9
+
+ ChangeLog@1.505 +1 -0
+ NTP_4_2_7P9
+
+ ntpd/ntpd-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpd/ntpd-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ ntpd/ntpd-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpd/ntpd.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpdc/ntpdc-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpdc/ntpdc-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ ntpdc/ntpdc-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpdc/ntpdc.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpq/ntpq-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpq/ntpq-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ ntpq/ntpq-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpq/ntpq.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ ntpsnmpd/ntpsnmpd.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ packageinfo.sh@1.11 +1 -1
+ NTP_4_2_7P9
+
+ sntp/sntp-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ sntp/sntp-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ sntp/sntp-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ sntp/sntp.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ sntp/sntp.html@1.10 +1 -1
+ NTP_4_2_7P9
+
+ util/ntp-keygen-opts.c@1.10 +2 -2
+ NTP_4_2_7P9
+
+ util/ntp-keygen-opts.h@1.10 +3 -3
+ NTP_4_2_7P9
+
+ util/ntp-keygen-opts.texi@1.10 +2 -2
+ NTP_4_2_7P9
+
+ util/ntp-keygen.1@1.10 +2 -2
+ NTP_4_2_7P9
+
+ChangeSet@1.2084.6.45, 2010-01-12 10:34:14+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P8
+ TAG: NTP_4_2_7P8
+
+ ChangeLog@1.501.1.37 +1 -0
+ NTP_4_2_7P8
+
+ ntpd/ntpd-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpd/ntpd-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpd/ntpd-opts.texi@1.9 +2 -2
+ NTP_4_2_7P8
+
+ ntpd/ntpd.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ ntpdc/ntpdc-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpdc/ntpdc-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpdc/ntpdc-opts.texi@1.9 +3 -3
+ NTP_4_2_7P8
+
+ ntpdc/ntpdc.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ ntpq/ntpq-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpq/ntpq-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpq/ntpq-opts.texi@1.9 +3 -3
+ NTP_4_2_7P8
+
+ ntpq/ntpq.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.9 +3 -3
+ NTP_4_2_7P8
+
+ ntpsnmpd/ntpsnmpd.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ packageinfo.sh@1.10 +1 -1
+ NTP_4_2_7P8
+
+ sntp/sntp-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ sntp/sntp-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ sntp/sntp-opts.texi@1.9 +3 -3
+ NTP_4_2_7P8
+
+ sntp/sntp.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ sntp/sntp.html@1.9 +1 -1
+ NTP_4_2_7P8
+
+ util/ntp-keygen-opts.c@1.9 +4 -4
+ NTP_4_2_7P8
+
+ util/ntp-keygen-opts.h@1.9 +4 -4
+ NTP_4_2_7P8
+
+ util/ntp-keygen-opts.texi@1.9 +3 -3
+ NTP_4_2_7P8
+
+ util/ntp-keygen.1@1.9 +2 -2
+ NTP_4_2_7P8
+
+ChangeSet@1.2084.10.4, 2010-01-11 17:06:06+01:00, burnicki@pogo.udel.edu
+ Syntax fix in ntp.dsw and ntpd.dsp for VC6.
+
+ ports/winnt/vc6/ntp.dsw@1.13 +0 -1
+ Syntax fix.
+
+ ports/winnt/vc6/ntpd.dsp@1.43.1.1 +2 -1
+ Syntax fix.
+
+ChangeSet@1.2084.12.2, 2010-01-08 20:00:10+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog: Include (4.2.6p1-RC3) - [Bug 1453] Use $CC in config.cache filename.
+
+ ChangeLog@1.501.6.2 +1 -0
+ ChangeLog: Include (4.2.6p1-RC3) - [Bug 1453] Use $CC in config.cache filename.
+
+ChangeSet@1.2082.16.3, 2010-01-08 19:11:53+00:00, davehart@shiny.ad.hartbrothers.com
Makefile.am:
add dependencies on copyright.def
correct dependencies to refer to $(srcdir)/version.def not
@@ -7774,14 +120112,14 @@ ChangeSet@1.2122.2.3, 2010-01-08 19:11:53+00:00, davehart@shiny.ad.hartbrothers.
add COPYRIGHT to BUILT_SOURCES, correct EXTRA_DIST reference to
remove unneeded $(srcdir)/ prefix
- sntp/Makefile.am@1.25 +5 -4
+ sntp/Makefile.am@1.21.1.4 +5 -4
add dependencies on copyright.def
correct dependencies to refer to $(srcdir)/version.def not
$(srcdir)/../include/version.def
add COPYRIGHT to BUILT_SOURCES, correct EXTRA_DIST reference to
remove unneeded $(srcdir)/ prefix
-ChangeSet@1.2122.2.2, 2010-01-08 17:21:14+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.16.2, 2010-01-08 17:21:14+00:00, davehart@shiny.ad.hartbrothers.com
bump copyright year to 2010
html/copyright.html@1.46 +2 -2
@@ -7790,26 +120128,32 @@ ChangeSet@1.2122.2.2, 2010-01-08 17:21:14+00:00, davehart@shiny.ad.hartbrothers.
include/copyright.def@1.11 +1 -1
bump copyright year to 2010
-ChangeSet@1.2122.2.1, 2010-01-06 18:52:49+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.16.1, 2010-01-06 18:52:49+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1453] Use $CC in config.cache filename in ./build script.
- ChangeLog@1.592.2.1 +4 -3
+ ChangeLog@1.496.41.1 +4 -3
[Bug 1453] Use $CC in config.cache filename in ./build script.
build@1.34 +26 -27
[Bug 1453] Use $CC in config.cache filename in ./build script.
-ChangeSet@1.2124, 2010-01-03 23:03:48-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2082.4.37, 2010-01-03 23:03:48-05:00, mayer@pogo.udel.edu
Undo unneeded change
lib/isc/netaddr.c@1.8 +1 -1
Undo unneeded change
-ChangeSet@1.2122.1.1, 2010-01-03 21:52:33+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.11.2, 2010-01-03 21:56:54+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct ChangeLog to reflect [Bug 1451] in -dev section as well.
+
+ ChangeLog@1.501.5.2 +1 -0
+ Correct ChangeLog to reflect [Bug 1451] in -dev section as well.
+
+ChangeSet@1.2082.15.1, 2010-01-03 21:52:33+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1451] CID 115: sntp leaks KoD entry when updating existing
entry.
- ChangeLog@1.592.1.1 +4 -3
+ ChangeLog@1.496.40.1 +4 -3
[Bug 1451] CID 115: sntp leaks KoD entry when updating existing
entry.
@@ -7817,10 +120161,16 @@ ChangeSet@1.2122.1.1, 2010-01-03 21:52:33+00:00, davehart@shiny.ad.hartbrothers.
[Bug 1451] CID 115: sntp leaks KoD entry when updating existing
entry.
-ChangeSet@1.2123, 2010-01-01 23:49:35-05:00, mayer@pogo.udel.edu
+ChangeSet@1.2084.10.2, 2010-01-02 22:47:59-05:00, mayer@pogo.udel.edu
+ Fixes for Bugs 1448-1450
+
+ ChangeLog@1.501.4.2 +4 -0
+ Fixes for Bugs 1448-1450
+
+ChangeSet@1.2082.4.36, 2010-01-01 23:49:35-05:00, mayer@pogo.udel.edu
Fixes for bugs 1448-1450
- ChangeLog@1.593 +4 -0
+ ChangeLog@1.496.26.26 +4 -0
Fixes for bug 1448-1450
lib/isc/netaddr.c@1.7 +1 -1
@@ -7832,66 +120182,446 @@ ChangeSet@1.2123, 2010-01-01 23:49:35-05:00, mayer@pogo.udel.edu
lib/isc/win32/interfaceiter.c@1.16 +2 -0
[Bug 1448] scope_id and ipv6 any address not defined on vc6 compiler
- ntpd/ntp_config.c@1.242 +3 -1
+ ntpd/ntp_config.c@1.241.1.1 +3 -1
[Bug 1449] ntpsim.h should only be conditionally included and after ntpd-opts.h
- ports/winnt/include/config.h@1.80 +2 -2
+ ports/winnt/include/config.h@1.79.1.1 +2 -2
[Bug 1448] Macros not correctly conditionally defined
- ports/winnt/vc6/libntp.dsp@1.49 +0 -4
+ ports/winnt/vc6/libntp.dsp@1.43.1.6 +0 -4
[Bug 1448] stdtime.c misspelled but not needed at all
-ChangeSet@1.2122, 2009-12-30 05:48:36+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.6.41, 2009-12-30 21:55:52+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 702] ntpd service logic should use libopts to examine cmdline.
+
+ ChangeLog@1.501.1.33 +1 -0
+ [Bug 702] ntpd service logic should use libopts to examine cmdline.
+
+ include/ntp_cmdargs.h@1.6 +1 -4
+ remove unused cruft
+
+ include/ntpd.h@1.137.1.1 +1 -0
+ expose parse_cmdline_opts() for use by ntservice.c
+
+ ntpd/cmd_args.c@1.56.1.2 +6 -3
+ comment only
+
+ ntpd/ntp_config.c@1.242 +3 -3
+ minor cleanup
+
+ ntpd/ntpd.c@1.110.1.1 +12 -10
+ [Bug 702] ntpd service logic should use libopts to examine cmdline.
+
+ ports/winnt/include/ntservice.h@1.4 +4 -9
+ [Bug 702] ntpd service logic should use libopts to examine cmdline.
+
+ ports/winnt/ntpd/ntservice.c@1.23 +40 -49
+ [Bug 702] ntpd service logic should use libopts to examine cmdline.
+
+ ports/winnt/vc6/ntpd.dsp@1.44 +2 -2
+ top-level ntpd directory needs to be in include search path
+ for ntservice.c to #include "ntpd-opts.h"
+
+ ports/winnt/vs2003/ntpd.vcproj@1.7 +2 -2
+ top-level ntpd directory needs to be in include search path
+ for ntservice.c to #include "ntpd-opts.h"
+
+ ports/winnt/vs2005/ntpd.vcproj@1.7 +2 -2
+ top-level ntpd directory needs to be in include search path
+ for ntservice.c to #include "ntpd-opts.h"
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.25 +2 -2
+ top-level ntpd directory needs to be in include search path
+ for ntservice.c to #include "ntpd-opts.h"
+
+ChangeSet@1.2084.6.40, 2009-12-30 10:27:13+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P7
+ TAG: NTP_4_2_7P7
+
+ ChangeLog@1.501.1.32 +1 -0
+ NTP_4_2_7P7
+
+ ntpd/ntpd-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpd/ntpd-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ ntpd/ntpd-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpd/ntpd.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpdc/ntpdc-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpdc/ntpdc-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ ntpdc/ntpdc-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpdc/ntpdc.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpq/ntpq-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpq/ntpq-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ ntpq/ntpq-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpq/ntpq.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ ntpsnmpd/ntpsnmpd.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ packageinfo.sh@1.9 +1 -1
+ NTP_4_2_7P7
+
+ sntp/sntp-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ sntp/sntp-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ sntp/sntp-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ sntp/sntp.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ sntp/sntp.html@1.8 +1 -1
+ NTP_4_2_7P7
+
+ util/ntp-keygen-opts.c@1.8 +2 -2
+ NTP_4_2_7P7
+
+ util/ntp-keygen-opts.h@1.8 +3 -3
+ NTP_4_2_7P7
+
+ util/ntp-keygen-opts.texi@1.8 +2 -2
+ NTP_4_2_7P7
+
+ util/ntp-keygen.1@1.8 +2 -2
+ NTP_4_2_7P7
+
+ChangeSet@1.2084.9.2, 2009-12-30 05:56:00+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu.
+ Applies to prior Makefile.am changesets pulled from ntp-stable,
+ where there is no ChangeLog entry as no tarball rolled with the bug.
+
+ ChangeLog@1.501.3.1 +1 -0
+ [Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu.
+ Applies to prior Makefile.am changesets pulled from ntp-stable,
+ where there is no ChangeLog entry as no tarball rolled with the bug.
+
+ChangeSet@1.2082.4.35, 2009-12-30 05:48:36+00:00, davehart@shiny.ad.hartbrothers.com
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html Makefile rules are not needed.
- ntpd/Makefile.am@1.85 +2 -9
+ ntpd/Makefile.am@1.80.1.5 +2 -9
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
- ntpdc/Makefile.am@1.51 +2 -9
+ ntpdc/Makefile.am@1.48.1.3 +2 -9
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
- ntpq/Makefile.am@1.46 +2 -9
+ ntpq/Makefile.am@1.43.1.3 +2 -9
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
- ntpsnmpd/Makefile.am@1.19 +2 -9
+ ntpsnmpd/Makefile.am@1.16.1.3 +2 -9
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
- sntp/Makefile.am@1.24 +3 -12
+ sntp/Makefile.am@1.21.1.3 +3 -12
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
- util/Makefile.am@1.48 +2 -9
+ util/Makefile.am@1.45.1.3 +2 -9
With EXTRA_DIST fix from [Bug 1446] read-only $(srcdir) hacks in
*.1, *.texi, and *.html rules are not needed.
-ChangeSet@1.2121, 2009-12-30 00:23:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.34, 2009-12-30 00:23:25+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1446] 4.2.7p6 requires autogen to build missing ntpd.1, *.texi, *.menu.
- ntpd/Makefile.am@1.84 +4 -1
+ ntpd/Makefile.am@1.80.1.4 +4 -1
[Bug 1446] 4.2.7p6 requires autogen to build missing ntpd.1, *.texi, *.menu.
-ChangeSet@1.2120, 2009-12-28 04:17:49-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.6.38, 2009-12-29 16:07:26+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize.
+
+ ChangeLog@1.501.1.30 +1 -0
+ [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize.
+
+ ntpdc/ntpdc.c@1.77 +1 -1
+ [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize.
+
+ChangeSet@1.2084.6.37, 2009-12-28 10:30:49+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P6
+ TAG: NTP_4_2_7P6
+
+ ChangeLog@1.501.1.29 +1 -0
+ NTP_4_2_7P6
+
+ ntpd/ntpd-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpd/ntpd-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ ntpd/ntpd-opts.texi@1.7 +61 -2
+ NTP_4_2_7P6
+
+ ntpd/ntpd.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpdc/ntpdc-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpdc/ntpdc-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ ntpdc/ntpdc-opts.texi@1.7 +66 -2
+ NTP_4_2_7P6
+
+ ntpdc/ntpdc.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpq/ntpq-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpq/ntpq-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ ntpq/ntpq-opts.texi@1.7 +51 -2
+ NTP_4_2_7P6
+
+ ntpq/ntpq.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.7 +23 -2
+ NTP_4_2_7P6
+
+ ntpsnmpd/ntpsnmpd.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ packageinfo.sh@1.8 +1 -1
+ NTP_4_2_7P6
+
+ sntp/sntp-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ sntp/sntp-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ sntp/sntp-opts.texi@1.7 +60 -2
+ NTP_4_2_7P6
+
+ sntp/sntp.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ sntp/sntp.html@1.7 +1 -1
+ NTP_4_2_7P6
+
+ util/ntp-keygen-opts.c@1.7 +2 -2
+ NTP_4_2_7P6
+
+ util/ntp-keygen-opts.h@1.7 +3 -3
+ NTP_4_2_7P6
+
+ util/ntp-keygen-opts.texi@1.7 +46 -2
+ NTP_4_2_7P6
+
+ util/ntp-keygen.1@1.7 +2 -2
+ NTP_4_2_7P6
+
+ChangeSet@1.2084.6.36, 2009-12-28 04:24:27-05:00, stenn@whimsy.udel.edu
+ cleanup
+
+ ChangeLog@1.501.1.28 +2 -0
+ cleanup
+
+ChangeSet@1.2082.4.33, 2009-12-28 04:17:49-05:00, stenn@whimsy.udel.edu
[Bug 1445] IRIX does not have -lcap or support linux capabilities
- ChangeLog@1.592 +2 -1
+ ChangeLog@1.496.26.25 +2 -1
[Bug 1445] IRIX does not have -lcap or support linux capabilities
- configure.ac@1.474 +7 -1
+ configure.ac@1.465.1.9 +7 -1
[Bug 1445] IRIX does not have -lcap or support linux capabilities
-ChangeSet@1.2115.1.1, 2009-12-27 09:16:20+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.6.33, 2009-12-28 00:57:22-05:00, stenn@whimsy.udel.edu
+ ntpdate.c still needs ntp_io.h
+
+ ntpdate/ntpdate.c@1.71 +1 -0
+ ntpdate.c still needs ntp_io.h
+
+ChangeSet@1.2084.8.7, 2009-12-28 05:24:22+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2003/libntp.vcproj@1.9 +1 -1
+ [Bug 1442] Move Windows functions into libntp files
+
+ChangeSet@1.2084.8.6, 2009-12-28 02:21:48+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vc6/libntp.dsp@1.48 +2 -2
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2003/libntp.vcproj@1.8 +2 -2
+ [Bug 1442] Move Windows functions into libntp files
+
+ChangeSet@1.2084.8.5, 2009-12-28 01:56:22+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.25 +2 -2
+ [Bug 1442] Move Windows functions into libntp files
+
+ChangeSet@1.2084.8.4, 2009-12-27 22:03:56+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/libntp/termios.c@1.21 +1 -0
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.24 +1 -1
+ [Bug 1442] Move Windows functions into libntp files
+
+ChangeSet@1.2084.8.3, 2009-12-27 21:35:25+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vc6/libntp.dsp@1.47 +12 -0
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vc6/ntp.dsw@1.12 +4 -0
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vc6/ntpd.dsp@1.43 +0 -6
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2003/libntp.vcproj@1.7 +42 -0
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2003/ntp.sln@1.2 +1 -0
+ [Bug 1442] Move Windows functions into libntp files
+
+ ports/winnt/vs2003/ntpd.vcproj@1.6 +0 -23
+ [Bug 1442] Move Windows functions into libntp files
+
+ChangeSet@1.2084.8.2, 2009-12-27 21:08:21+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] and [Bug 1443]
+
+ ChangeLog@1.501.2.1 +2 -0
+ [Bug 1442] and [Bug 1443]
+
+ChangeSet@1.2084.7.3, 2009-12-27 21:02:00+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ libntp/recvbuff.c@1.34 +0 -1
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ ntpd/ntp_io.c@1.310 +1 -37
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ ntpd/ntp_util.c@1.76 +0 -1
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ ntpdate/ntpdate.c@1.70 +0 -1
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ ntpdc/ntpdc.c@1.76 +0 -1
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ ntpq/ntpq.c@1.98 +0 -1
+ [Bug 1443] Remove unnecessary dependencies on ntp_io.h
+
+ChangeSet@1.2084.7.2, 2009-12-27 20:52:30+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/include/config.h@1.80 +0 -13
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/include/termios.h@1.13 +3 -3
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/include/win32_io.h@1.1 +8 -0
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/include/win32_io.h@1.0 +0 -0
+
+ ports/winnt/libntp/setpriority.c@1.3 +0 -30
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/libntp/win32_io.c@1.1 +80 -0
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/libntp/win32_io.c@1.0 +0 -0
+
+ ports/winnt/vs2005/Instsrv.vcproj@1.2 +2 -2
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/vs2005/libntp.vcproj@1.7 +12 -4
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/vs2005/ntp.sln@1.2 +3 -1
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/vs2005/ntpd.vcproj@1.6 +2 -24
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.23 +8 -0
+ [Bug 1442] Move functions into libntp files
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.24 +0 -22
+ [Bug 1442] Move functions into libntp files
+
+ChangeSet@1.2084.7.1, 2009-12-27 20:38:02+00:00, mayer@psp-fb1.ntp.org
+ [Bug 1442} Move some windows-specific files to linntp
+
+ BitKeeper/deleted/.del-termios.h~8b711e53@1.3 +0 -0
+ Delete: ports/winnt/include/termios.h
+
+ ports/winnt/include/termios.h@1.12 +0 -0
+ Rename: ports/winnt/include/win32_io.h -> ports/winnt/include/termios.h
+
+ ports/winnt/libntp/termios.c@1.20 +0 -0
+ Rename: ports/winnt/ntpd/win32_io.c -> ports/winnt/libntp/termios.c
+
+ChangeSet@1.2084.6.31, 2009-12-27 17:37:15+00:00, davehart@shiny.ad.hartbrothers.com
+ correct ChangeLog merge from -stable
+
+ ChangeLog@1.501.1.25 +1 -0
+ correct ChangeLog merge from -stable
+
+ChangeSet@1.2082.14.1, 2009-12-27 09:16:20+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1439] .texi generation must wait until after binary is linked.
Quiet RES_TIMEOUT redefinition warning compiling ntp_intres.c
- ChangeLog@1.587.1.1 +4 -0
+ ChangeLog@1.496.39.1 +4 -0
[Bug 1439] .texi generation must wait until after binary is linked.
- ntpd/Makefile.am@1.83 +16 -10
+ ntpd/Makefile.am@1.80.1.3 +16 -10
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
@@ -7903,169 +120633,260 @@ ChangeSet@1.2115.1.1, 2009-12-27 09:16:20+00:00, davehart@shiny.ad.hartbrothers.
of netinet/in.h
quiet RES_TIMEOUT redefinition warning (resolv.h vs. ntp.h)
- ntpdc/Makefile.am@1.50 +17 -10
+ ntpdc/Makefile.am@1.48.1.2 +17 -10
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
make distcheck R/O srcdir in .1 and ,texi rules.
separate .menu rule from .texi to avoid redundant Autogen invocation.
- ntpq/Makefile.am@1.45 +17 -10
+ ntpq/Makefile.am@1.43.1.2 +17 -10
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
make distcheck R/O srcdir in .1 and ,texi rules.
separate .menu rule from .texi to avoid redundant Autogen invocation.
- ntpsnmpd/Makefile.am@1.18 +17 -12
+ ntpsnmpd/Makefile.am@1.16.1.2 +17 -12
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
make distcheck R/O srcdir in .1 and ,texi rules.
separate .menu rule from .texi to avoid redundant Autogen invocation.
- sntp/Makefile.am@1.23 +26 -23
+ sntp/Makefile.am@1.21.1.2 +26 -23
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
make distcheck R/O srcdir in .1, .texi, and .html rules.
separate .menu rule from .texi to avoid redundant Autogen invocation.
- util/Makefile.am@1.47 +17 -9
+ util/Makefile.am@1.45.1.2 +17 -9
remove *.texi *.menu *.html *.1 from BUILT_SOURCES, add all except .1
to noinst_DATA, and remove sub-make hack to build binary [Bug 1439].
change man_MANS= reference to .1 to have $(srcdir)/ prefix, work around
make distcheck R/O srcdir in .1 and ,texi rules.
separate .menu rule from .texi to avoid redundant Autogen invocation.
-ChangeSet@1.2118, 2009-12-27 01:54:07-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.6.29, 2009-12-27 01:59:48-05:00, stenn@whimsy.udel.edu
+ merge cleanup
+
+ ChangeLog@1.501.1.23 +1 -0
+ merge cleanup
+
+ChangeSet@1.2082.4.31, 2009-12-27 01:54:07-05:00, stenn@whimsy.udel.edu
cleanup
- ChangeLog@1.590 +5 -2
+ ChangeLog@1.496.26.23 +5 -2
cleanup
-ChangeSet@1.2117, 2009-12-27 01:47:48-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.30, 2009-12-27 01:47:48-05:00, stenn@whimsy.udel.edu
[Bug 1440] Update configure.ac to support kfreebsd
- ChangeLog@1.589 +1 -0
+ ChangeLog@1.496.26.22 +1 -0
[Bug 1440] Update configure.ac to support kfreebsd
- configure.ac@1.473 +12 -0
+ configure.ac@1.465.1.8 +12 -0
[Bug 1440] Update configure.ac to support kfreebsd
-ChangeSet@1.2116, 2009-12-27 00:40:27-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.29, 2009-12-27 00:40:27-05:00, stenn@whimsy.udel.edu
[Bug 1127] Properly check the return of X590_verify() - missed one
- ChangeLog@1.588 +1 -0
+ ChangeLog@1.496.26.21 +1 -0
[Bug 1127] Properly check the return of X590_verify() - missed one
util/ntp-keygen.c@1.64 +1 -1
[Bug 1127] Properly check the return of X590_verify() - missed one
-ChangeSet@1.2115, 2009-12-25 09:31:42+00:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.6.26, 2009-12-25 10:34:17+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P5
+ TAG: NTP_4_2_7P5
+
+ ChangeLog@1.501.1.20 +1 -0
+ NTP_4_2_7P5
+
+ ntpd/ntpd-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpd/ntpd-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ ntpd/ntpd-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ ntpd/ntpd.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpdc/ntpdc-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpdc/ntpdc-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ ntpdc/ntpdc-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ ntpdc/ntpdc.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpq/ntpq-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpq/ntpq-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ ntpq/ntpq-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ ntpq/ntpq.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ ntpsnmpd/ntpsnmpd.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ packageinfo.sh@1.7 +1 -1
+ NTP_4_2_7P5
+
+ sntp/sntp-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ sntp/sntp-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ sntp/sntp-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ sntp/sntp.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ sntp/sntp.html@1.6 +1 -1
+ NTP_4_2_7P5
+
+ util/ntp-keygen-opts.c@1.6 +2 -2
+ NTP_4_2_7P5
+
+ util/ntp-keygen-opts.h@1.6 +3 -3
+ NTP_4_2_7P5
+
+ util/ntp-keygen-opts.texi@1.6 +1 -1
+ NTP_4_2_7P5
+
+ util/ntp-keygen.1@1.6 +2 -2
+ NTP_4_2_7P5
+
+ChangeSet@1.2082.4.28, 2009-12-25 09:31:42+00:00, stenn@whimsy.udel.edu
NTP_4_2_6P1_RC2
TAG: NTP_4_2_6P1_RC2
- ChangeLog@1.587 +1 -0
+ ChangeLog@1.496.26.20 +1 -0
NTP_4_2_6P1_RC2
- ntpd/ntpd-opts.c@1.250 +2 -2
+ ntpd/ntpd-opts.c@1.248.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpd/ntpd-opts.h@1.250 +3 -3
+ ntpd/ntpd-opts.h@1.248.2.1 +3 -3
NTP_4_2_6P1_RC2
- ntpd/ntpd-opts.texi@1.248 +2 -2
+ ntpd/ntpd-opts.texi@1.246.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpd/ntpd.1@1.248 +2 -2
+ ntpd/ntpd.1@1.246.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpdc/ntpdc-opts.c@1.246 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpdc/ntpdc-opts.h@1.246 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.2.1 +3 -3
NTP_4_2_6P1_RC2
- ntpdc/ntpdc-opts.texi@1.245 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpdc/ntpdc.1@1.245 +2 -2
+ ntpdc/ntpdc.1@1.243.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpq/ntpq-opts.c@1.247 +2 -2
+ ntpq/ntpq-opts.c@1.245.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpq/ntpq-opts.h@1.247 +3 -3
+ ntpq/ntpq-opts.h@1.245.2.1 +3 -3
NTP_4_2_6P1_RC2
- ntpq/ntpq-opts.texi@1.246 +2 -2
+ ntpq/ntpq-opts.texi@1.244.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpq/ntpq.1@1.246 +2 -2
+ ntpq/ntpq.1@1.244.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpsnmpd/ntpsnmpd-opts.c@1.125 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpsnmpd/ntpsnmpd-opts.h@1.125 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.2.1 +3 -3
NTP_4_2_6P1_RC2
- ntpsnmpd/ntpsnmpd-opts.texi@1.125 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.2.1 +2 -2
NTP_4_2_6P1_RC2
- ntpsnmpd/ntpsnmpd.1@1.124 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.2.1 +2 -2
NTP_4_2_6P1_RC2
- packageinfo.sh@1.261 +1 -1
+ packageinfo.sh@1.255.4.1 +1 -1
NTP_4_2_6P1_RC2
- sntp/sntp-opts.c@1.119 +2 -2
+ sntp/sntp-opts.c@1.117.2.1 +2 -2
NTP_4_2_6P1_RC2
- sntp/sntp-opts.h@1.119 +3 -3
+ sntp/sntp-opts.h@1.117.2.1 +3 -3
NTP_4_2_6P1_RC2
- sntp/sntp-opts.texi@1.119 +2 -2
+ sntp/sntp-opts.texi@1.117.2.1 +2 -2
NTP_4_2_6P1_RC2
- sntp/sntp.1@1.119 +2 -2
+ sntp/sntp.1@1.117.2.1 +2 -2
NTP_4_2_6P1_RC2
- sntp/sntp.html@1.9 +1 -1
+ sntp/sntp.html@1.7.2.1 +1 -1
NTP_4_2_6P1_RC2
- util/ntp-keygen-opts.c@1.249 +2 -2
+ util/ntp-keygen-opts.c@1.247.2.1 +2 -2
NTP_4_2_6P1_RC2
- util/ntp-keygen-opts.h@1.249 +3 -3
+ util/ntp-keygen-opts.h@1.247.2.1 +3 -3
NTP_4_2_6P1_RC2
- util/ntp-keygen-opts.texi@1.248 +2 -2
+ util/ntp-keygen-opts.texi@1.246.2.1 +2 -2
NTP_4_2_6P1_RC2
- util/ntp-keygen.1@1.248 +2 -2
+ util/ntp-keygen.1@1.246.2.1 +2 -2
NTP_4_2_6P1_RC2
-ChangeSet@1.2112.1.1, 2009-12-25 00:19:40-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.13.1, 2009-12-25 00:19:40-05:00, stenn@whimsy.udel.edu
[Bug 1435] sntp: Test for -lresolv using the same tests as in ntp
- ChangeLog@1.584.1.1 +1 -0
+ ChangeLog@1.496.38.1 +1 -0
[Bug 1435] sntp: Test for -lresolv using the same tests as in ntp
sntp/configure.ac@1.29.1.1 +3 -0
[Bug 1435] sntp: Test for -lresolv using the same tests as in ntp
-ChangeSet@1.2113, 2009-12-24 22:04:26+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.26, 2009-12-24 22:04:26+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1425] unpeer by association ID sets up for duplicate free().
[Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some.
Use HAVE_WORKING_FORK instead of HAVE_FORK to avoid broken fork().
- ChangeLog@1.585 +2 -0
+ ChangeLog@1.496.26.18 +2 -0
[Bug 1425] unpeer by association ID sets up for duplicate free().
[Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some.
- configure.ac@1.472 +50 -29
+ configure.ac@1.465.1.7 +50 -29
[Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some.
include/ntp_intres.h@1.2 +1 -1
@@ -8078,7 +120899,7 @@ ChangeSet@1.2113, 2009-12-24 22:04:26+00:00, davehart@shiny.ad.hartbrothers.com
ntpd/ntp_config.c@1.241 +0 -2
[Bug 1425] unpeer by association ID sets up for duplicate free().
- ntpsnmpd/netsnmp_daemonize.c@1.2 +2 -2
+ ntpsnmpd/netsnmp_daemonize.c@1.1.1.1 +2 -2
Use HAVE_WORKING_FORK instead of HAVE_FORK preemptively, some rare
systems have a broken fork()
@@ -8088,16 +120909,107 @@ ChangeSet@1.2113, 2009-12-24 22:04:26+00:00, davehart@shiny.ad.hartbrothers.com
sntp/networking.c@1.29 +7 -1
[Bug 1434] HP-UX 11 ip_mreq undeclared, _HPUX_SOURCE helps some.
-ChangeSet@1.2110.1.1, 2009-12-24 02:27:39-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2084.6.24, 2009-12-24 10:27:41+00:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P4
+ TAG: NTP_4_2_7P4
+
+ ChangeLog@1.501.1.18 +1 -0
+ NTP_4_2_7P4
+
+ ntpd/ntpd-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpd/ntpd-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ ntpd/ntpd-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ ntpd/ntpd.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpdc/ntpdc-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpdc/ntpdc-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ ntpdc/ntpdc-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ ntpdc/ntpdc.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpq/ntpq-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpq/ntpq-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ ntpq/ntpq-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ ntpq/ntpq.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ ntpsnmpd/ntpsnmpd.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ packageinfo.sh@1.6 +1 -1
+ NTP_4_2_7P4
+
+ sntp/sntp-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ sntp/sntp-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ sntp/sntp-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ sntp/sntp.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ sntp/sntp.html@1.5 +1 -1
+ NTP_4_2_7P4
+
+ util/ntp-keygen-opts.c@1.5 +2 -2
+ NTP_4_2_7P4
+
+ util/ntp-keygen-opts.h@1.5 +3 -3
+ NTP_4_2_7P4
+
+ util/ntp-keygen-opts.texi@1.5 +1 -1
+ NTP_4_2_7P4
+
+ util/ntp-keygen.1@1.5 +2 -2
+ NTP_4_2_7P4
+
+ChangeSet@1.2084.6.23, 2009-12-24 07:42:08+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct ChangeLog merge from stable
+
+ ChangeLog@1.501.1.17 +2 -0
+ Correct ChangeLog merge from stable
+
+ChangeSet@1.2082.12.1, 2009-12-24 02:27:39-05:00, stenn@deacon.udel.edu
System headers must come before ntp headers in ntp_intres.c
- ChangeLog@1.582.1.1 +1 -0
+ ChangeLog@1.496.37.1 +1 -0
System headers must come before ntp headers in ntp_intres.c
include/Makefile.am@1.38 +1 -0
System headers must come before ntp headers in ntp_intres.c
- include/ntp_config.h@1.67 +0 -10
+ include/ntp_config.h@1.66.1.1 +0 -10
System headers must come before ntp headers in ntp_intres.c
include/ntp_intres.h@1.1 +14 -0
@@ -8111,13 +121023,13 @@ ChangeSet@1.2110.1.1, 2009-12-24 02:27:39-05:00, stenn@deacon.udel.edu
ntpd/ntp_intres.c@1.78 +10 -8
System headers must come before ntp headers in ntp_intres.c
-ChangeSet@1.2111, 2009-12-23 11:01:44+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.24, 2009-12-23 11:01:44+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1429] -4 command line option to ntpd does not reliably force IPv4 resolution
- ChangeLog@1.583 +1 -0
+ ChangeLog@1.496.26.16 +1 -0
[Bug 1429] -4 command line option to ntpd does not reliably force IPv4 resolution
- ntpd/cmd_args.c@1.57 +12 -5
+ ntpd/cmd_args.c@1.56.1.1 +12 -5
[Bug 1429] -4 command line option to ntpd does not reliably force IPv4 resolution
ntpd/ntp_config.c@1.239 +2 -8
@@ -8126,44 +121038,136 @@ ChangeSet@1.2111, 2009-12-23 11:01:44+00:00, davehart@shiny.ad.hartbrothers.com
ntpd/ntp_scanner.h@1.15 +0 -1
[Bug 1429] -4 command line option to ntpd does not reliably force IPv4 resolution
-ChangeSet@1.2110, 2009-12-22 08:36:49+00:00, hart@psp-deb1.ntp.org
+ChangeSet@1.2084.1.16, 2009-12-22 12:10:14-05:00, murray@pogo.udel.edu
+ tg2.c:
+ Change mode to -rw-rw-r--
+
+ util/tg2.c@1.3, stenn@pogo.udel.edu +0 -0
+ Change mode to -rw-rw-r--
+
+ChangeSet@1.2084.6.20, 2009-12-22 05:29:27-05:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P3
+ TAG: NTP_4_2_7P3
+
+ ChangeLog@1.501.1.14 +1 -0
+ NTP_4_2_7P3
+
+ ntpd/ntpd-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpd/ntpd-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ ntpd/ntpd-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ ntpd/ntpd.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpdc/ntpdc-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpdc/ntpdc-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ ntpdc/ntpdc-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ ntpdc/ntpdc.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpq/ntpq-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpq/ntpq-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ ntpq/ntpq-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ ntpq/ntpq.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ ntpsnmpd/ntpsnmpd.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ packageinfo.sh@1.5 +1 -1
+ NTP_4_2_7P3
+
+ sntp/sntp-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ sntp/sntp-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ sntp/sntp-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ sntp/sntp.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ sntp/sntp.html@1.4 +1 -1
+ NTP_4_2_7P3
+
+ util/ntp-keygen-opts.c@1.4 +2 -2
+ NTP_4_2_7P3
+
+ util/ntp-keygen-opts.h@1.4 +3 -3
+ NTP_4_2_7P3
+
+ util/ntp-keygen-opts.texi@1.4 +1 -1
+ NTP_4_2_7P3
+
+ util/ntp-keygen.1@1.4 +2 -2
+ NTP_4_2_7P3
+
+ChangeSet@1.2082.4.23, 2009-12-22 08:36:49+00:00, hart@psp-deb1.ntp.org
UpdatePoint:
correct handling of beta-free stable RC bumps
scripts/UpdatePoint@1.4 +15 -7
correct handling of beta-free stable RC bumps
-ChangeSet@1.2109, 2009-12-22 03:00:22-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.22, 2009-12-22 03:00:22-05:00, stenn@whimsy.udel.edu
[Bug 1424] Fix check for rtattr (rtnetlink.h)
- ChangeLog@1.582 +1 -0
+ ChangeLog@1.496.26.15 +1 -0
[Bug 1424] Fix check for rtattr (rtnetlink.h)
- configure.ac@1.471 +1 -0
+ configure.ac@1.465.1.6 +1 -0
[Bug 1424] Fix check for rtattr (rtnetlink.h)
-ChangeSet@1.2108, 2009-12-22 02:52:08-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.21, 2009-12-22 02:52:08-05:00, stenn@whimsy.udel.edu
[Bug 1416] MAXDNAME undefined on Solaris 2.6
- ChangeLog@1.581 +1 -0
+ ChangeLog@1.496.26.14 +1 -0
[Bug 1416] MAXDNAME undefined on Solaris 2.6
-ChangeSet@1.2107, 2009-12-22 02:29:35-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.20, 2009-12-22 02:29:35-05:00, stenn@whimsy.udel.edu
Bootstrap script should also touch .html files
- bootstrap@1.29 +1 -1
+ bootstrap@1.28.1.1 +1 -1
Bootstrap script should also touch .html files
-ChangeSet@1.2106, 2009-12-22 02:26:26-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.19, 2009-12-22 02:26:26-05:00, stenn@whimsy.udel.edu
[Bug 1411] Fix status messages in refclock_oncore.c
- ChangeLog@1.580 +1 -0
+ ChangeLog@1.496.26.13 +1 -0
[Bug 1411] Fix status messages in refclock_oncore.c
ntpd/refclock_oncore.c@1.82 +31 -8
[Bug 1411] Fix status messages in refclock_oncore.c
-ChangeSet@1.2105, 2009-12-22 04:15:31+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.18, 2009-12-22 04:15:31+00:00, davehart@shiny.ad.hartbrothers.com
bring Windows mkver.bat in line with packaginfo.sh and
scripts/VersionName changes
@@ -8171,33 +121175,33 @@ ChangeSet@1.2105, 2009-12-22 04:15:31+00:00, davehart@shiny.ad.hartbrothers.com
bring Windows mkver.bat in line with packaginfo.sh and
scripts/VersionName changes
-ChangeSet@1.2100.1.1, 2009-12-22 00:55:19+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.11.1, 2009-12-22 00:55:19+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
- ChangeLog@1.575.1.1 +4 -0
+ ChangeLog@1.496.36.1 +4 -0
[Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
- configure.ac@1.469 +1 -0
+ configure.ac@1.465.1.4 +1 -0
[Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
ntpd/ntp_intres.c@1.77 +16 -3
[Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
changes include of resolv.h to match Autoconf doc suggestion
-ChangeSet@1.2102, 2009-12-21 06:26:25+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.15, 2009-12-21 06:26:25+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1427] quote missing in ./build - shows up on NetBSD.
- ChangeLog@1.577 +1 -0
+ ChangeLog@1.496.26.10 +1 -0
[Bug 1427] quote missing in ./build - shows up on NetBSD.
build@1.33 +1 -1
[Bug 1427] quote missing in ./build - shows up on NetBSD.
-ChangeSet@1.2101, 2009-12-21 05:19:15+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.14, 2009-12-21 05:19:15+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1426] scripts/VersionName needs . on the search path.
correct permissions to 0775 for scripts/UpdatePoint.
- ChangeLog@1.576 +4 -0
+ ChangeLog@1.496.26.9 +4 -0
[Bug 1426] scripts/VersionName needs . on the search path.
scripts/UpdatePoint@1.3 +2 -2
@@ -8209,95 +121213,186 @@ ChangeSet@1.2101, 2009-12-21 05:19:15+00:00, davehart@shiny.ad.hartbrothers.com
scripts/VersionName@1.6 +3 -3
[Bug 1426] scripts/VersionName needs . on the search path.
-ChangeSet@1.2100, 2009-12-20 00:52:48-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.6.13, 2009-12-20 05:29:12-05:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P2
+ TAG: NTP_4_2_7P2
+
+ ChangeLog@1.501.1.9 +1 -0
+ NTP_4_2_7P2
+
+ ntpd/ntpd-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpd/ntpd-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ ntpd/ntpd-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ ntpd/ntpd.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpdc/ntpdc-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpdc/ntpdc-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ ntpdc/ntpdc-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ ntpdc/ntpdc.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpq/ntpq-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpq/ntpq-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ ntpq/ntpq-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ ntpq/ntpq.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ ntpsnmpd/ntpsnmpd.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ packageinfo.sh@1.4 +1 -1
+ NTP_4_2_7P2
+
+ sntp/sntp-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ sntp/sntp-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ sntp/sntp-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ sntp/sntp.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ sntp/sntp.html@1.3 +1 -1
+ NTP_4_2_7P2
+
+ util/ntp-keygen-opts.c@1.3 +2 -2
+ NTP_4_2_7P2
+
+ util/ntp-keygen-opts.h@1.3 +3 -3
+ NTP_4_2_7P2
+
+ util/ntp-keygen-opts.texi@1.3 +1 -1
+ NTP_4_2_7P2
+
+ util/ntp-keygen.1@1.3 +2 -2
+ NTP_4_2_7P2
+
+ChangeSet@1.2084.6.11, 2009-12-20 01:04:33-05:00, stenn@whimsy.udel.edu
+ Touch any html file from autogen
+
+ bootstrap@1.29 +1 -1
+ Touch any html file from autogen
+
+ChangeSet@1.2082.4.13, 2009-12-20 00:52:48-05:00, stenn@whimsy.udel.edu
NTP_4_2_6P1_RC1
TAG: NTP_4_2_6P1_RC1
- ChangeLog@1.575 +1 -0
+ ChangeLog@1.496.26.8 +1 -0
NTP_4_2_6P1_RC1
- ntpd/ntpd-opts.c@1.249 +2 -2
+ ntpd/ntpd-opts.c@1.248.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpd/ntpd-opts.h@1.249 +3 -3
+ ntpd/ntpd-opts.h@1.248.1.1 +3 -3
NTP_4_2_6P1_RC1
- ntpd/ntpd-opts.texi@1.247 +2 -2
+ ntpd/ntpd-opts.texi@1.246.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpd/ntpd.1@1.247 +2 -2
+ ntpd/ntpd.1@1.246.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpdc/ntpdc-opts.c@1.245 +2 -2
+ ntpdc/ntpdc-opts.c@1.244.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpdc/ntpdc-opts.h@1.245 +3 -3
+ ntpdc/ntpdc-opts.h@1.244.1.1 +3 -3
NTP_4_2_6P1_RC1
- ntpdc/ntpdc-opts.texi@1.244 +2 -2
+ ntpdc/ntpdc-opts.texi@1.243.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpdc/ntpdc.1@1.244 +2 -2
+ ntpdc/ntpdc.1@1.243.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpq/ntpq-opts.c@1.246 +2 -2
+ ntpq/ntpq-opts.c@1.245.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpq/ntpq-opts.h@1.246 +3 -3
+ ntpq/ntpq-opts.h@1.245.1.1 +3 -3
NTP_4_2_6P1_RC1
- ntpq/ntpq-opts.texi@1.245 +2 -2
+ ntpq/ntpq-opts.texi@1.244.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpq/ntpq.1@1.245 +2 -2
+ ntpq/ntpq.1@1.244.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpsnmpd/ntpsnmpd-opts.c@1.124 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.c@1.123.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpsnmpd/ntpsnmpd-opts.h@1.124 +3 -3
+ ntpsnmpd/ntpsnmpd-opts.h@1.123.1.1 +3 -3
NTP_4_2_6P1_RC1
- ntpsnmpd/ntpsnmpd-opts.texi@1.124 +2 -2
+ ntpsnmpd/ntpsnmpd-opts.texi@1.123.1.1 +2 -2
NTP_4_2_6P1_RC1
- ntpsnmpd/ntpsnmpd.1@1.123 +2 -2
+ ntpsnmpd/ntpsnmpd.1@1.122.1.1 +2 -2
NTP_4_2_6P1_RC1
- packageinfo.sh@1.260 +2 -2
+ packageinfo.sh@1.255.3.1 +2 -2
NTP_4_2_6P1_RC1
- sntp/sntp-opts.c@1.118 +2 -2
+ sntp/sntp-opts.c@1.117.1.1 +2 -2
NTP_4_2_6P1_RC1
- sntp/sntp-opts.h@1.118 +3 -3
+ sntp/sntp-opts.h@1.117.1.1 +3 -3
NTP_4_2_6P1_RC1
- sntp/sntp-opts.texi@1.118 +2 -2
+ sntp/sntp-opts.texi@1.117.1.1 +2 -2
NTP_4_2_6P1_RC1
- sntp/sntp.1@1.118 +2 -2
+ sntp/sntp.1@1.117.1.1 +2 -2
NTP_4_2_6P1_RC1
- sntp/sntp.html@1.8 +1 -1
+ sntp/sntp.html@1.7.1.1 +1 -1
NTP_4_2_6P1_RC1
- util/ntp-keygen-opts.c@1.248 +2 -2
+ util/ntp-keygen-opts.c@1.247.1.1 +2 -2
NTP_4_2_6P1_RC1
- util/ntp-keygen-opts.h@1.248 +3 -3
+ util/ntp-keygen-opts.h@1.247.1.1 +3 -3
NTP_4_2_6P1_RC1
- util/ntp-keygen-opts.texi@1.247 +2 -2
+ util/ntp-keygen-opts.texi@1.246.1.1 +2 -2
NTP_4_2_6P1_RC1
- util/ntp-keygen.1@1.247 +2 -2
+ util/ntp-keygen.1@1.246.1.1 +2 -2
NTP_4_2_6P1_RC1
-ChangeSet@1.2099, 2009-12-19 23:55:09-05:00, stenn@pogo.udel.edu
+ChangeSet@1.2082.4.12, 2009-12-19 23:55:09-05:00, stenn@pogo.udel.edu
Put refclock_neoclock4x.c under the NTP COPYRIGHT
- ChangeLog@1.574 +4 -0
+ ChangeLog@1.496.26.7 +4 -0
Put refclock_neoclock4x.c under the NTP COPYRIGHT
html/copyright.html@1.45 +1 -0
@@ -8306,25 +121401,96 @@ ChangeSet@1.2099, 2009-12-19 23:55:09-05:00, stenn@pogo.udel.edu
ntpd/refclock_neoclock4x.c@1.17 +20 -9
Put refclock_neoclock4x.c under the NTP COPYRIGHT
-ChangeSet@1.2098, 2009-12-19 22:05:09-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.11, 2009-12-19 22:05:09-05:00, stenn@whimsy.udel.edu
Start the 4.2.6p1-RC cycle
- packageinfo.sh@1.259 +14 -1
+ packageinfo.sh@1.255.2.1 +14 -1
Start the 4.2.6p1-RC cycle
-ChangeSet@1.2097, 2009-12-19 21:47:40-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2082.4.10, 2009-12-19 21:47:40-05:00, stenn@whimsy.udel.edu
[Bug 1415] Fix Mac OS X link problem
- ChangeLog@1.573 +1 -0
+ ChangeLog@1.496.26.6 +1 -0
[Bug 1415] Fix Mac OS X link problem
- configure.ac@1.468 +5 -0
+ configure.ac@1.465.1.3 +5 -0
[Bug 1415] Fix Mac OS X link problem
ntpsnmpd/Makefile.am@1.15.1.1 +1 -1
[Bug 1415] Fix Mac OS X link problem
-ChangeSet@1.2091.1.1, 2009-12-18 05:18:12+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.25.1, 2009-12-19 03:29:38+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ ChangeLog@1.496.35.1 +2 -0
+ [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ include/ntp_config.h@1.67 +5 -1
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ include/ntp_machine.h@1.27 +0 -2
+ remove NODETACH, nptd uses HAVE_WORKING_FORK instead
+
+ include/ntp_proto.h@1.5 +3 -3
+ stay out of system/compiler underscore namespace
+
+ include/ntpd.h@1.138 +5 -1
+ add waitsync_fd_to_close from ntpd.c
+
+ include/ntpsim.h@1.13 +0 -1
+ remove no-longer-used SLEW which conflicted with autoopts over -x/--slew
+
+ ntpd/Makefile.am@1.78.1.1 +1 -1
+ cmd_args.c no longer differs between SIM and !SIM
+
+ ntpd/cmd_args.c@1.57 +18 -19
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ ntpd/ntp_config.c@1.237.1.1 +65 -22
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ ntpd/ntp_loopfilter.c@1.154 +7 -7
+ comment typo corrections, leading tabs cleanup, msyslog
+ "kernel time sync disabledx"
+ excess 'x' excised.
+
+ ntpd/ntp_proto.c@1.298 +21 -3
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ ntpd/ntpd-opts.c@1.242.1.1 +97 -20
+ Autogen output
+
+ ntpd/ntpd-opts.def@1.6 +3 -2
+ [Bug 1396] allow servers on ntpd command line like ntpdate
+
+ ntpd/ntpd-opts.h@1.242.1.1 +18 -11
+ Autogen output
+
+ ntpd/ntpd-opts.texi@1.240.1.1 +72 -8
+ Autogen output
+
+ ntpd/ntpd.1@1.240.1.1 +28 -6
+ Autogen output
+
+ ntpd/ntpd.c@1.111 +440 -309
+ [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
+
+ ntpd/ntpdbase-opts.def@1.21 +34 -2
+ [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
+
+ ntpsnmpd/netsnmp_daemonize.c@1.2 +7 -3
+ HAVE_WORKING_FORK is more appropriate than HAVE_FORK here
+
+ChangeSet@1.2084.1.15, 2009-12-18 03:39:13-05:00, murray@pogo.udel.edu
+ ChangeLog:
+ Add bug number to tg2 comment
+
+ ChangeLog@1.503 +1 -1
+ Add bug number to tg2 comment
+
+ChangeSet@1.2082.10.1, 2009-12-18 05:18:12+00:00, davehart@shiny.ad.hartbrothers.com
correct NTP_OS_CFLAGS [Bug 1412]
allow $CC to contain slash and space in build
@@ -8334,10 +121500,38 @@ ChangeSet@1.2091.1.1, 2009-12-18 05:18:12+00:00, davehart@shiny.ad.hartbrothers.
m4/os_cflags.m4@1.5 +90 -93
the name of the macro to define must be on the same line as AC_DEFUN(
-ChangeSet@1.2090.5.1, 2009-12-16 21:26:45+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.6.5, 2009-12-17 09:17:17+00:00, davehart@shiny.ad.hartbrothers.com
+ correct ChangeLog merge from ntp-stable-updatepoint
+
+ ChangeLog@1.501.1.4 +1 -3
+ correct ChangeLog merge from ntp-stable-updatepoint
+
+ChangeSet@1.2084.6.4, 2009-12-17 08:27:16+00:00, davehart@shiny.ad.hartbrothers.com
+ scripts/UpdatePoint changes to packageinfo.sh's -dev copy
+ adds support for beta releases in ntp-stable
+
+ packageinfo.sh@1.3 +68 -15
+ scripts/UpdatePoint changes to packageinfo.sh's -dev copy
+ adds support for beta releases in ntp-stable
+
+ChangeSet@1.2084.6.2, 2009-12-17 04:25:31+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog:
+ correct ChangeLog merge from ntp-stable-1419, bk remerge/fm3tool hates me
+
+ ChangeLog@1.501.1.2 +1 -3
+ correct ChangeLog merge from ntp-stable-1419, bk remerge/fm3tool hates me
+
+ChangeSet@1.2084.1.14, 2009-12-16 21:00:16-05:00, murray@malarky.udel.edu
+ tg2.c:
+ Fix warnings on Solaris.
+
+ util/tg2.c@1.2 +4 -2
+ Fix warnings on Solaris.
+
+ChangeSet@1.2082.9.1, 2009-12-16 21:26:45+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
- ChangeLog@1.567.5.1 +4 -0
+ ChangeLog@1.496.34.1 +4 -0
[Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
adjtimed/Makefile.am@1.7 +5 -1
@@ -8346,7 +121540,7 @@ ChangeSet@1.2090.5.1, 2009-12-16 21:26:45+00:00, davehart@shiny.ad.hartbrothers.
bincheck.mf@1.3 +5 -5
respect $bindir, $sbindir instead of assuming $exec_prefix/$BINSUBDIR
- configure.ac@1.465.2.1 +2 -0
+ configure.ac@1.465.3.1 +2 -0
[Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
ntpd/Makefile.am@1.79.2.1 +4 -2
@@ -8373,18 +121567,18 @@ ChangeSet@1.2090.5.1, 2009-12-16 21:26:45+00:00, davehart@shiny.ad.hartbrothers.
sntp/configure.ac@1.29 +2 -0
[Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
- util/Makefile.am@1.46 +6 -0
+ util/Makefile.am@1.45.1.1 +6 -0
[Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
-ChangeSet@1.2090.4.1, 2009-12-16 20:21:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.8.1, 2009-12-16 20:21:10+00:00, davehart@shiny.ad.hartbrothers.com
updated packageinfo.sh, VersionName, and UpdatePoint to use prerelease=
from packageinfo.sh instead of releasecandidate= and added support for
beta releases.
- ChangeLog@1.567.4.1 +4 -0
+ ChangeLog@1.496.33.1 +4 -0
Build infrastructure updates to enable beta releases of ntp-stable.
- packageinfo.sh@1.258 +69 -16
+ packageinfo.sh@1.255.1.3 +69 -16
updated to use prerelease= instead of releasecandidate=, with support
for prerelease=beta for ntp-stable pre-RC1 test releases
@@ -8401,10 +121595,101 @@ ChangeSet@1.2090.4.1, 2009-12-16 20:21:10+00:00, davehart@shiny.ad.hartbrothers.
updated to use prerelease= from packageinfo.sh instead of releasecandidate=
added support for beta releases
-ChangeSet@1.2090.3.1, 2009-12-14 21:18:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.1.12, 2009-12-15 05:28:39-05:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P1
+ TAG: NTP_4_2_7P1
+
+ ChangeLog@1.501 +1 -0
+ NTP_4_2_7P1
+
+ ntpd/ntpd-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpd/ntpd-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ ntpd/ntpd-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ ntpd/ntpd.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpdc/ntpdc-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpdc/ntpdc-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ ntpdc/ntpdc-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ ntpdc/ntpdc.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpq/ntpq-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpq/ntpq-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ ntpq/ntpq-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ ntpq/ntpq.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ ntpsnmpd/ntpsnmpd.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ packageinfo.sh@1.2 +1 -1
+ NTP_4_2_7P1
+
+ sntp/sntp-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ sntp/sntp-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ sntp/sntp-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ sntp/sntp.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ sntp/sntp.html@1.2 +1 -1
+ NTP_4_2_7P1
+
+ util/ntp-keygen-opts.c@1.2 +2 -2
+ NTP_4_2_7P1
+
+ util/ntp-keygen-opts.h@1.2 +3 -3
+ NTP_4_2_7P1
+
+ util/ntp-keygen-opts.texi@1.2 +1 -1
+ NTP_4_2_7P1
+
+ util/ntp-keygen.1@1.2 +2 -2
+ NTP_4_2_7P1
+
+ChangeSet@1.2084.5.2, 2009-12-14 21:45:36+00:00, davehart@shiny.ad.hartbrothers.com
+ Correct ChangeLog merge from ntp-stable-1418
+
+ ChangeLog@1.496.32.2 +1 -3
+ Correct ChangeLog merge from ntp-stable-1418
+
+ChangeSet@1.2082.7.1, 2009-12-14 21:18:10+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails.
- ChangeLog@1.567.3.1 +4 -0
+ ChangeLog@1.496.31.1 +4 -0
[Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails.
ntpd/Makefile.am@1.79.1.1 +2 -2
@@ -8416,21 +121701,376 @@ ChangeSet@1.2090.3.1, 2009-12-14 21:18:10+00:00, davehart@shiny.ad.hartbrothers.
ntpq/Makefile.am@1.43 +2 -2
move libntp.a ahead of @LCRYPTO@ to fix static openssl link
-ChangeSet@1.2090.2.1, 2009-12-13 19:45:56+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.1.9, 2009-12-14 02:51:13+00:00, davehart@shiny.ad.hartbrothers.com
+ correct merge of [Bug 1413] ChangeLog line from ntp-stable-1413
+
+ ChangeLog@1.496.25.7 +1 -3
+ correct merge of [Bug 1413] line from ntp-stable-1413
+
+ChangeSet@1.2084.4.2, 2009-12-14 02:32:16+00:00, davehart@shiny.ad.hartbrothers.com
+ transmitbuff.h is gone
+
+ ntpd/ntp_io.c@1.309 +0 -1
+ transmitbuff.h is gone
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.51 +0 -1
+ transmitbuff.h is gone
+
+ChangeSet@1.2084.1.8, 2009-12-13 21:05:40+00:00, davehart@shiny.ad.hartbrothers.com
+ bk rm 4.2.6 version-dependent files, bk new identical replacements
+
+ BitKeeper/deleted/.del-ntp-keygen-opts.c~d0a1ce0533b25b2@1.250 +0 -0
+ Delete: util/ntp-keygen-opts.c
+
+ BitKeeper/deleted/.del-ntp-keygen-opts.h~f0717b94e4446b26@1.250 +0 -0
+ Delete: util/ntp-keygen-opts.h
+
+ BitKeeper/deleted/.del-ntp-keygen-opts.texi~8c66011d5d8b8946@1.249 +0 -0
+ Delete: util/ntp-keygen-opts.texi
+
+ BitKeeper/deleted/.del-ntp-keygen.1~5f9bc1fd9c40085a@1.249 +0 -0
+ Delete: util/ntp-keygen.1
+
+ BitKeeper/deleted/.del-ntpd-opts.c~144b52caa1ef699c@1.251 +0 -0
+ Delete: ntpd/ntpd-opts.c
+
+ BitKeeper/deleted/.del-ntpd-opts.h~2b00d71c3cee10a7@1.251 +0 -0
+ Delete: ntpd/ntpd-opts.h
+
+ BitKeeper/deleted/.del-ntpd-opts.texi~9cb5bac4bf6450c1@1.249 +0 -0
+ Delete: ntpd/ntpd-opts.texi
+
+ BitKeeper/deleted/.del-ntpd.1~28d9b05264c45059@1.249 +0 -0
+ Delete: ntpd/ntpd.1
+
+ BitKeeper/deleted/.del-ntpdc-opts.c~58e4a492bd134fb8@1.247 +0 -0
+ Delete: ntpdc/ntpdc-opts.c
+
+ BitKeeper/deleted/.del-ntpdc-opts.h~b31c10ed4f5c2052@1.247 +0 -0
+ Delete: ntpdc/ntpdc-opts.h
+
+ BitKeeper/deleted/.del-ntpdc-opts.texi~5fe1056039fe6e4f@1.246 +0 -0
+ Delete: ntpdc/ntpdc-opts.texi
+
+ BitKeeper/deleted/.del-ntpdc.1~574c84f3f3e91d36@1.246 +0 -0
+ Delete: ntpdc/ntpdc.1
+
+ BitKeeper/deleted/.del-ntpq-opts.c~e22ebc44f822119e@1.248 +0 -0
+ Delete: ntpq/ntpq-opts.c
+
+ BitKeeper/deleted/.del-ntpq-opts.h~bebfd8975972779e@1.248 +0 -0
+ Delete: ntpq/ntpq-opts.h
+
+ BitKeeper/deleted/.del-ntpq-opts.texi~fd912c16181424e@1.247 +0 -0
+ Delete: ntpq/ntpq-opts.texi
+
+ BitKeeper/deleted/.del-ntpq.1~abfc5609a4b9cf4d@1.247 +0 -0
+ Delete: ntpq/ntpq.1
+
+ BitKeeper/deleted/.del-ntpsnmpd-opts.c~8c4453f3336dd4b7@1.126 +0 -0
+ Delete: ntpsnmpd/ntpsnmpd-opts.c
+
+ BitKeeper/deleted/.del-ntpsnmpd-opts.h~59291b93d938a895@1.126 +0 -0
+ Delete: ntpsnmpd/ntpsnmpd-opts.h
+
+ BitKeeper/deleted/.del-ntpsnmpd-opts.texi~4cc265b9fc7e692d@1.126 +0 -0
+ Delete: ntpsnmpd/ntpsnmpd-opts.texi
+
+ BitKeeper/deleted/.del-ntpsnmpd.1~489dddca797b117c@1.125 +0 -0
+ Delete: ntpsnmpd/ntpsnmpd.1
+
+ BitKeeper/deleted/.del-packageinfo.sh~ff4c82dd98fc4a4@1.260 +0 -0
+ Delete: packageinfo.sh
+
+ BitKeeper/deleted/.del-sntp-opts.c~134d906c1bc0bd88@1.120 +0 -0
+ Delete: sntp/sntp-opts.c
+
+ BitKeeper/deleted/.del-sntp-opts.h~5df6f04e80275ab3@1.120 +0 -0
+ Delete: sntp/sntp-opts.h
+
+ BitKeeper/deleted/.del-sntp-opts.texi~313e154133ec6f3c@1.120 +0 -0
+ Delete: sntp/sntp-opts.texi
+
+ BitKeeper/deleted/.del-sntp.1~4b2813589f2f7814@1.120 +0 -0
+ Delete: sntp/sntp.1
+
+ BitKeeper/deleted/.del-sntp.html~ca24a75c4b6cb914@1.10 +0 -0
+ Delete: sntp/sntp.html
+
+ ntpd/ntpd-opts.c@1.1 +1144 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpd/ntpd-opts.c
+
+ ntpd/ntpd-opts.c@1.0 +0 -0
+
+ ntpd/ntpd-opts.h@1.1 +385 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpd/ntpd-opts.h
+
+ ntpd/ntpd-opts.h@1.0 +0 -0
+
+ ntpd/ntpd-opts.texi@1.1 +529 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpd/ntpd-opts.texi
+
+ ntpd/ntpd-opts.texi@1.0 +0 -0
+
+ ntpd/ntpd.1@1.1 +338 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpd/ntpd.1
+
+ ntpd/ntpd.1@1.0 +0 -0
+
+ ntpdc/ntpdc-opts.c@1.1 +656 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpdc/ntpdc-opts.c
+
+ ntpdc/ntpdc-opts.c@1.0 +0 -0
+
+ ntpdc/ntpdc-opts.h@1.1 +235 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpdc/ntpdc-opts.h
+
+ ntpdc/ntpdc-opts.h@1.0 +0 -0
+
+ ntpdc/ntpdc-opts.texi@1.1 +212 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpdc/ntpdc-opts.texi
+
+ ntpdc/ntpdc-opts.texi@1.0 +0 -0
+
+ ntpdc/ntpdc.1@1.1 +160 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpdc/ntpdc.1
+
+ ntpdc/ntpdc.1@1.0 +0 -0
+
+ ntpq/ntpq-opts.c@1.1 +623 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpq/ntpq-opts.c
+
+ ntpq/ntpq-opts.c@1.0 +0 -0
+
+ ntpq/ntpq-opts.h@1.1 +228 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpq/ntpq-opts.h
+
+ ntpq/ntpq-opts.h@1.0 +0 -0
+
+ ntpq/ntpq-opts.texi@1.1 +182 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpq/ntpq-opts.texi
+
+ ntpq/ntpq-opts.texi@1.0 +0 -0
+
+ ntpq/ntpq.1@1.1 +398 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpq/ntpq.1
+
+ ntpq/ntpq.1@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.1 +408 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpsnmpd/ntpsnmpd-opts.c
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.1 +179 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpsnmpd/ntpsnmpd-opts.h
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.1 +52 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpsnmpd/ntpsnmpd-opts.texi
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.0 +0 -0
+
+ ntpsnmpd/ntpsnmpd.1@1.1 +77 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/ntpsnmpd/ntpsnmpd.1
+
+ ntpsnmpd/ntpsnmpd.1@1.0 +0 -0
+
+ packageinfo.sh@1.1 +28 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/packageinfo.sh
+
+ packageinfo.sh@1.0 +0 -0
+
+ sntp/sntp-opts.c@1.1 +661 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/sntp/sntp-opts.c
+
+ sntp/sntp-opts.c@1.0 +0 -0
+
+ sntp/sntp-opts.h@1.1 +253 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/sntp/sntp-opts.h
+
+ sntp/sntp-opts.h@1.0 +0 -0
+
+ sntp/sntp-opts.texi@1.1 +218 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/sntp/sntp-opts.texi
+
+ sntp/sntp-opts.texi@1.0 +0 -0
+
+ sntp/sntp.1@1.1 +214 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/sntp/sntp.1
+
+ sntp/sntp.1@1.0 +0 -0
+
+ sntp/sntp.html@1.1 +105 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/sntp/sntp.html
+
+ sntp/sntp.html@1.0 +0 -0
+
+ util/ntp-keygen-opts.c@1.1 +981 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/util/ntp-keygen-opts.c
+
+ util/ntp-keygen-opts.c@1.0 +0 -0
+
+ util/ntp-keygen-opts.h@1.1 +303 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/util/ntp-keygen-opts.h
+
+ util/ntp-keygen-opts.h@1.0 +0 -0
+
+ util/ntp-keygen-opts.texi@1.1 +319 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/util/ntp-keygen-opts.texi
+
+ util/ntp-keygen-opts.texi@1.0 +0 -0
+
+ util/ntp-keygen.1@1.1 +189 -0
+ BitKeeper file C:/ntp/ntp-dev-1413/util/ntp-keygen.1
+
+ util/ntp-keygen.1@1.0 +0 -0
+
+ChangeSet@1.2082.6.1, 2009-12-13 19:45:56+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes.
- ChangeLog@1.567.2.1 +4 -0
+ ChangeLog@1.496.30.1 +4 -0
[Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes.
- configure.ac@1.465.1.1 +52 -10
+ configure.ac@1.465.2.1 +52 -10
[Bug 1413] test OpenSSL headers to see if they trigger warnings before
enablng -Wno-strict-prototypes for gcc.
-Wall does not include -Wstrict-prototypes, so add it expclitly.
-ChangeSet@1.2090.1.1, 2009-12-12 19:55:30+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2084.1.6, 2009-12-13 05:28:33-05:00, stenn@whimsy.udel.edu
+ NTP_4_2_7P0
+ TAG: NTP_4_2_7P0
+
+ ChangeLog@1.496.25.5 +1 -0
+ NTP_4_2_7P0
+
+ ntpd/ntpd-opts.c@1.250 +2 -2
+ NTP_4_2_7P0
+
+ ntpd/ntpd-opts.h@1.250 +3 -3
+ NTP_4_2_7P0
+
+ ntpd/ntpd-opts.texi@1.248 +1 -1
+ NTP_4_2_7P0
+
+ ntpd/ntpd.1@1.248 +2 -2
+ NTP_4_2_7P0
+
+ ntpdc/ntpdc-opts.c@1.246 +2 -2
+ NTP_4_2_7P0
+
+ ntpdc/ntpdc-opts.h@1.246 +3 -3
+ NTP_4_2_7P0
+
+ ntpdc/ntpdc-opts.texi@1.245 +1 -1
+ NTP_4_2_7P0
+
+ ntpdc/ntpdc.1@1.245 +2 -2
+ NTP_4_2_7P0
+
+ ntpq/ntpq-opts.c@1.247 +2 -2
+ NTP_4_2_7P0
+
+ ntpq/ntpq-opts.h@1.247 +3 -3
+ NTP_4_2_7P0
+
+ ntpq/ntpq-opts.texi@1.246 +1 -1
+ NTP_4_2_7P0
+
+ ntpq/ntpq.1@1.246 +2 -2
+ NTP_4_2_7P0
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.125 +2 -2
+ NTP_4_2_7P0
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.125 +3 -3
+ NTP_4_2_7P0
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.125 +1 -1
+ NTP_4_2_7P0
+
+ ntpsnmpd/ntpsnmpd.1@1.124 +2 -2
+ NTP_4_2_7P0
+
+ packageinfo.sh@1.259 +1 -1
+ NTP_4_2_7P0
+
+ sntp/sntp-opts.c@1.119 +2 -2
+ NTP_4_2_7P0
+
+ sntp/sntp-opts.h@1.119 +3 -3
+ NTP_4_2_7P0
+
+ sntp/sntp-opts.texi@1.119 +1 -1
+ NTP_4_2_7P0
+
+ sntp/sntp.1@1.119 +2 -2
+ NTP_4_2_7P0
+
+ sntp/sntp.html@1.9 +1 -1
+ NTP_4_2_7P0
+
+ util/ntp-keygen-opts.c@1.249 +2 -2
+ NTP_4_2_7P0
+
+ util/ntp-keygen-opts.h@1.249 +3 -3
+ NTP_4_2_7P0
+
+ util/ntp-keygen-opts.texi@1.248 +1 -1
+ NTP_4_2_7P0
+
+ util/ntp-keygen.1@1.248 +2 -2
+ NTP_4_2_7P0
+
+ChangeSet@1.2084.3.2, 2009-12-13 04:45:48-05:00, murray@malarky.udel.edu
+ README:
+ Add a few words about tg and tg2.
+
+ util/README@1.5 +7 -0
+ Add a few words about tg and tg2.
+
+ChangeSet@1.2084.3.1, 2009-12-13 03:23:02-05:00, murray@malarky.udel.edu
+ configure.ac:
+ comment for Bug 254
+ ChangeLog:
+ Adding tg2.c
+ tg2.c:
+ BitKeeper file /m/pogo/users/murray/tg2/util/tg2.c
+ Makefile.am:
+ Adding tg2
+
+ ChangeLog@1.496.29.1 +1 -0
+ Adding tg2.c
+
+ configure.ac@1.466.1.1 +1 -1
+ comment for Bug 254
+
+ util/Makefile.am@1.46 +2 -1
+ Adding tg2
+
+ util/tg2.c@1.1 +2499 -0
+ BitKeeper file /m/pogo/users/murray/tg2/util/tg2.c
+
+ util/tg2.c@1.0 +0 -0
+
+ChangeSet@1.2084.2.2, 2009-12-13 05:10:51+00:00, davehart@shiny.ad.hartbrothers.com
+ ChangeLog:
+ correct merge from ntp-stable-1412
+
+ ChangeLog@1.496.28.2 +1 -4
+ correct merge from ntp-stable-1412
+
+ChangeSet@1.2084.1.4, 2009-12-13 04:18:43+00:00, davehart@shiny.ad.hartbrothers.com
+ correct merge from ntp-stable-1414
+
+ ChangeLog@1.496.25.3 +1 -4
+ correct merge from ntp-stable-1414
+
+ChangeSet@1.2082.5.1, 2009-12-12 19:55:30+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1414] Enable "make distcheck" success with BSD make.
- ChangeLog@1.567.1.1 +4 -0
+ ChangeLog@1.496.27.1 +4 -0
[Bug 1414] Enable "make distcheck" success with BSD make.
libparse/Makefile.am@1.17 +23 -22
@@ -8443,19 +122083,104 @@ ChangeSet@1.2090.1.1, 2009-12-12 19:55:30+00:00, davehart@shiny.ad.hartbrothers.
sntp/Makefile.am@1.21 +1 -1
reference $(srcdir)/COPYRIGHT in EXTRA_DIST not COPYRIGHT [Bug 1414]
-ChangeSet@1.2091, 2009-12-12 08:31:39+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2082.4.4, 2009-12-12 08:31:39+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
- ChangeLog@1.568 +4 -0
+ ChangeLog@1.496.26.1 +4 -0
[Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
- configure.ac@1.466 +1 -47
+ configure.ac@1.465.1.1 +1 -47
[Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
m4/os_cflags.m4@1.4 +82 -72
[Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
-ChangeSet@1.2090, 2009-12-10 05:49:19-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2084.1.1, 2009-12-10 06:24:33-05:00, stenn@whimsy.udel.edu
+ NTP_4_2_7
+ TAG: NTP_4_2_7
+
+ ChangeLog@1.496.25.1 +1 -0
+ NTP_4_2_7
+
+ ntpd/ntpd-opts.c@1.247.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpd/ntpd-opts.h@1.247.1.1 +3 -3
+ NTP_4_2_7
+
+ ntpd/ntpd-opts.texi@1.245.1.1 +2 -61
+ NTP_4_2_7
+
+ ntpd/ntpd.1@1.245.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpdc/ntpdc-opts.c@1.243.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpdc/ntpdc-opts.h@1.243.1.1 +3 -3
+ NTP_4_2_7
+
+ ntpdc/ntpdc-opts.texi@1.242.1.1 +2 -66
+ NTP_4_2_7
+
+ ntpdc/ntpdc.1@1.242.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpq/ntpq-opts.c@1.244.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpq/ntpq-opts.h@1.244.1.1 +3 -3
+ NTP_4_2_7
+
+ ntpq/ntpq-opts.texi@1.243.1.1 +2 -51
+ NTP_4_2_7
+
+ ntpq/ntpq.1@1.243.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpsnmpd/ntpsnmpd-opts.c@1.122.1.1 +2 -2
+ NTP_4_2_7
+
+ ntpsnmpd/ntpsnmpd-opts.h@1.122.1.1 +3 -3
+ NTP_4_2_7
+
+ ntpsnmpd/ntpsnmpd-opts.texi@1.122.1.1 +1 -1
+ NTP_4_2_7
+
+ ntpsnmpd/ntpsnmpd.1@1.121.1.1 +2 -2
+ NTP_4_2_7
+
+ packageinfo.sh@1.258 +1 -1
+ NTP_4_2_7
+
+ sntp/sntp-opts.c@1.116.1.1 +2 -2
+ NTP_4_2_7
+
+ sntp/sntp-opts.h@1.116.1.1 +3 -3
+ NTP_4_2_7
+
+ sntp/sntp-opts.texi@1.116.1.1 +2 -60
+ NTP_4_2_7
+
+ sntp/sntp.1@1.116.1.1 +2 -2
+ NTP_4_2_7
+
+ sntp/sntp.html@1.6.1.1 +14 -10
+ NTP_4_2_7
+
+ util/ntp-keygen-opts.c@1.246.1.1 +2 -2
+ NTP_4_2_7
+
+ util/ntp-keygen-opts.h@1.246.1.1 +3 -3
+ NTP_4_2_7
+
+ util/ntp-keygen-opts.texi@1.245.1.1 +2 -46
+ NTP_4_2_7
+
+ util/ntp-keygen.1@1.245.1.1 +2 -2
+ NTP_4_2_7
+
+ChangeSet@1.2082.4.3, 2009-12-10 05:49:19-05:00, stenn@whimsy.udel.edu
4.2.6
TAG: NTP_4_2_6
@@ -8534,10 +122259,34 @@ ChangeSet@1.2090, 2009-12-10 05:49:19-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.246 +2 -2
4.2.6
-ChangeSet@1.2089, 2009-12-09 03:46:30-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2087, 2009-12-10 04:55:00+00:00, davehart@shiny.ad.hartbrothers.com
+ use 's' for symmetric mode in billboard type column
+
+ ntpq/ntpq-subs.c@1.43 +1 -1
+ use 's' for symmetric mode in billboard type column
+
+ChangeSet@1.2086, 2009-12-10 02:30:32+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1338] ntpq displays incorrect association type codes.
+
+ ChangeLog@1.496.1.67 +1 -0
+ [Bug 1338] ntpq displays incorrect association type codes.
+
+ChangeSet@1.2050.3.2, 2009-12-10 02:09:19+00:00, davehart@shiny.ad.hartbrothers.com
+ use 'A' for manycast server to be consistent with B, M
+
+ ntpq/ntpq-subs.c@1.41 +1 -1
+ use 'A' for manycast server to be consistent with B, M
+
+ChangeSet@1.2082.1.8, 2009-12-09 03:55:07-05:00, stenn@deacon.udel.edu
+ -dev is now 4.2.7
+
+ ChangeLog@1.496.23.8 +1 -0
+ -dev is now 4.2.7
+
+ChangeSet@1.2082.4.2, 2009-12-09 03:46:30-05:00, stenn@deacon.udel.edu
cleanup
- ChangeLog@1.567 +1 -1
+ ChangeLog@1.496.23.7 +1 -1
cleanup
ntpd/ntpd-opts.c@1.247 +2 -2
@@ -8588,7 +122337,7 @@ ChangeSet@1.2089, 2009-12-09 03:46:30-05:00, stenn@deacon.udel.edu
ntpsnmpd/ntpsnmpd.1@1.121 +2 -2
cleanup
- packageinfo.sh@1.257 +1 -1
+ packageinfo.sh@1.255.1.2 +1 -1
cleanup
sntp/sntp-opts.c@1.116 +2 -2
@@ -8618,11 +122367,11 @@ ChangeSet@1.2089, 2009-12-09 03:46:30-05:00, stenn@deacon.udel.edu
util/ntp-keygen.1@1.245 +2 -2
cleanup
-ChangeSet@1.2088, 2009-12-09 02:58:13-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.4.1, 2009-12-09 02:58:13-05:00, stenn@deacon.udel.edu
NTP_4_2_6_RC
TAG: NTP_4_2_6_RC
- ChangeLog@1.566 +1 -0
+ ChangeLog@1.496.23.6 +1 -0
NTP_4_2_6_RC
ntpd/ntpd-opts.c@1.246 +2 -2
@@ -8673,7 +122422,7 @@ ChangeSet@1.2088, 2009-12-09 02:58:13-05:00, stenn@deacon.udel.edu
ntpsnmpd/ntpsnmpd.1@1.120 +2 -2
NTP_4_2_6_RC
- packageinfo.sh@1.256 +3 -3
+ packageinfo.sh@1.255.1.1 +3 -3
NTP_4_2_6_RC
sntp/sntp-opts.c@1.115 +2 -2
@@ -8703,19 +122452,25 @@ ChangeSet@1.2088, 2009-12-09 02:58:13-05:00, stenn@deacon.udel.edu
util/ntp-keygen.1@1.244 +2 -2
NTP_4_2_6_RC
-ChangeSet@1.2087, 2009-12-09 00:06:06-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.3.1, 2009-12-09 00:16:12-05:00, stenn@deacon.udel.edu
+ 4.2.7
+
+ packageinfo.sh@1.254.1.1 +4 -4
+ 4.2.7
+
+ChangeSet@1.2082.1.5, 2009-12-09 00:06:06-05:00, stenn@deacon.udel.edu
4.2.6
- ChangeLog@1.565 +1 -0
+ ChangeLog@1.496.23.5 +1 -0
4.2.6
packageinfo.sh@1.255 +5 -5
4.2.6
-ChangeSet@1.2086, 2009-12-08 10:09:30-05:00, stenn@deacon.udel.edu
+ChangeSet@1.2082.1.4, 2009-12-08 10:09:30-05:00, stenn@deacon.udel.edu
Include 4.2.4p8
- ChangeLog@1.564 +1 -0
+ ChangeLog@1.496.23.4 +1 -0
ChangeSet@1.1436.15.75, 2009-12-08 08:30:54-05:00, stenn@whimsy.udel.edu
ChangeLog:
@@ -8897,10 +122652,10 @@ ChangeSet@1.1436.15.72, 2009-12-08 05:36:47-05:00, stenn@whimsy.udel.edu
packageinfo.sh@1.65.34.1 +2 -2
[Sec 1331] DoS with mode 7 packets - CVE-2009-3563
-ChangeSet@1.2083, 2009-12-07 11:58:19+01:00, burnicki@pogo.udel.edu
+ChangeSet@1.2082.1.1, 2009-12-07 11:58:19+01:00, burnicki@pogo.udel.edu
[Bug 508] Fixed leap second handling for Windows.
- ChangeLog@1.561 +1 -0
+ ChangeLog@1.496.23.1 +1 -0
[Bug 508] Fixed leap second handling for Windows.
ntpd/ntp_timer.c@1.56 +2 -0
@@ -8909,11 +122664,21 @@ ChangeSet@1.2083, 2009-12-07 11:58:19+01:00, burnicki@pogo.udel.edu
ports/winnt/ntpd/nt_clockstuff.c@1.38 +17 -2
[Bug 508] Fixed leap second handling for Windows.
+ChangeSet@1.2083, 2009-12-06 20:46:44+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1407] configure.ac: recent GNU Make -v does not include "version".
+
+ ChangeLog@1.496.1.65 +1 -0
+ [Bug 1407] configure.ac: recent GNU Make -v does not include "version".
+
+ configure.ac@1.466 +1 -4
+ clone GNU Make test from m4/ntp_vpathhack.m4, recognize newer GNU Make
+ which does not include "version" in its -v output
+
ChangeSet@1.2082, 2009-11-30 05:29:50-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P250_RC
TAG: NTP_4_2_5P250_RC
- ChangeLog@1.560 +1 -0
+ ChangeLog@1.496.1.64 +1 -0
NTP_4_2_5P250_RC
ntpd/ntpd-opts.c@1.245 +2 -2
@@ -9009,7 +122774,7 @@ ChangeSet@1.2080, 2009-11-30 04:15:15-05:00, stenn@whimsy.udel.edu
ChangeSet@1.2079, 2009-11-30 04:06:48-05:00, stenn@whimsy.udel.edu
sntp documentation updates
- ChangeLog@1.559 +1 -0
+ ChangeLog@1.496.1.63 +1 -0
sntp documentation updates
sntp/sntp-opts.def@1.15 +21 -12
@@ -9019,7 +122784,7 @@ ChangeSet@1.2075.1.2, 2009-11-29 23:36:52-05:00, murray@malarky.udel.edu
ntp_intres.c, ChangeLog:
Fix for bug 1386: Deferred DNS doesn't work on NetBSD
- ChangeLog@1.553.1.10 +1 -0
+ ChangeLog@1.496.20.10 +1 -0
Fix for bug 1386: Deferred DNS doesn't work on NetBSD
ntpd/ntp_intres.c@1.76 +28 -12
@@ -9039,7 +122804,7 @@ ChangeSet@1.2075.1.1, 2009-11-28 21:30:09-05:00, murray@malarky.udel.edu
Bug 761: internal resolver does not seem to honor -4/-6 qualifiers
Take no_needed from ntp_config, first step on Bug 975.
- ChangeLog@1.553.1.9 +3 -0
+ ChangeLog@1.496.20.9 +3 -0
Bug 761: internal resolver does not seem to honor -4/-6 qualifiers
configure.ac@1.465 +16 -0
@@ -9058,7 +122823,7 @@ ChangeSet@1.2075.1.1, 2009-11-28 21:30:09-05:00, murray@malarky.udel.edu
ChangeSet@1.2077, 2009-11-28 23:42:10+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1391] avoid invoking autogen twice for .c and .h files.
- ChangeLog@1.557 +1 -0
+ ChangeLog@1.496.1.61 +1 -0
[Bug 1391] avoid invoking autogen twice for .c and .h files.
ntpd/Makefile.am@1.79 +6 -2
@@ -9084,7 +122849,7 @@ ChangeSet@1.2075, 2009-11-28 05:29:18-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P249_RC
TAG: NTP_4_2_5P249_RC
- ChangeLog@1.553.1.8 +1 -0
+ ChangeLog@1.496.20.8 +1 -0
NTP_4_2_5P249_RC
ntpd/ntpd-opts.c@1.244 +2 -2
@@ -9174,10 +122939,10 @@ ChangeSet@1.2074, 2009-11-28 04:25:13-05:00, stenn@whimsy.udel.edu
ChangeSet@1.2072, 2009-11-28 01:43:01-05:00, stenn@whimsy.udel.edu
sntp cleanup
- ChangeLog@1.553.1.6 +1 -0
+ ChangeLog@1.496.20.6 +1 -0
sntp documentation cleanup
- ChangeLog@1.553.1.5 +3 -0
+ ChangeLog@1.496.20.5 +3 -0
sntp: Show dispersion. Clean up error messages and offset
sntp/main.c@1.23 +33 -18
@@ -9192,7 +122957,7 @@ ChangeSet@1.2072, 2009-11-28 01:43:01-05:00, stenn@whimsy.udel.edu
ChangeSet@1.2070.1.1, 2009-11-28 06:31:50+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1400] An empty KOD DB file causes sntp to coredump.
- ChangeLog@1.553.2.1 +1 -0
+ ChangeLog@1.496.22.1 +1 -0
[Bug 1400] An empty KOD DB file causes sntp to coredump.
sntp/kod_management.c@1.15 +45 -26
@@ -9201,7 +122966,7 @@ ChangeSet@1.2070.1.1, 2009-11-28 06:31:50+00:00, davehart@shiny.ad.hartbrothers.
ChangeSet@1.2071, 2009-11-28 01:27:47-05:00, stenn@whimsy.udel.edu
Cleanup from the autoconf/automake upgrades
- ChangeLog@1.553.1.4 +1 -0
+ ChangeLog@1.496.20.4 +1 -0
Cleanup from the autoconf/automake upgrades
Makefile.am@1.89 +1 -1
@@ -9220,7 +122985,7 @@ ChangeSet@1.2070, 2009-11-26 05:39:41-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P248_RC
TAG: NTP_4_2_5P248_RC
- ChangeLog@1.553.1.3 +1 -0
+ ChangeLog@1.496.20.3 +1 -0
NTP_4_2_5P248_RC
ntpd/ntpd-opts.c@1.243 +2 -2
@@ -9350,7 +123115,7 @@ ChangeSet@1.2065, 2009-11-26 01:33:57-05:00, stenn@psp-deb1.ntp.org
BitKeeper/etc/ignore@1.69 +1 -0
added config.cache-*
- ChangeLog@1.551.2.1 +1 -0
+ ChangeLog@1.496.21.1 +1 -0
Prepare for the generation of sntp.html
include/version.texi@1.1 +3 -0
@@ -9376,10 +123141,10 @@ ChangeSet@1.2065, 2009-11-26 01:33:57-05:00, stenn@psp-deb1.ntp.org
sntp/version.texi@1.0 +0 -0
-ChangeSet@1.2060.23.1, 2009-11-26 01:16:35-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.24.1, 2009-11-26 01:16:35-05:00, stenn@whimsy.udel.edu
Documentation changes from Dave Mills
- ChangeLog@1.553.1.1 +1 -0
+ ChangeLog@1.496.20.1 +1 -0
Documentation changes from Dave Mills
html/confopt.html@1.48 +53 -60
@@ -9391,32 +123156,32 @@ ChangeSet@1.2060.23.1, 2009-11-26 01:16:35-05:00, stenn@whimsy.udel.edu
html/quick.html@1.20 +17 -4
Documentation changes from Dave Mills
-ChangeSet@1.2060.1.56, 2009-11-26 01:06:36-05:00, stenn@pogo.udel.edu
+ChangeSet@1.2060.3.52, 2009-11-26 01:06:36-05:00, stenn@pogo.udel.edu
typo nit
- ChangeLog@1.555 +1 -1
+ ChangeLog@1.496.1.59 +1 -1
-ChangeSet@1.2060.22.1, 2009-11-25 14:19:20-05:00, murray@malarky.udel.edu
+ChangeSet@1.2060.23.1, 2009-11-25 14:19:20-05:00, murray@malarky.udel.edu
refclock_shm.c, ChangeLog:
Bug-1397: shmget() failing because of file mode
- ChangeLog@1.551.1.1 +1 -0
+ ChangeLog@1.496.19.1 +1 -0
Bug-1397: shmget() failing because of file mode
ntpd/refclock_shm.c@1.20 +1 -1
Bug-1397: shmget() failing because of file mode
-ChangeSet@1.2060.1.54, 2009-11-24 22:05:54+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.50, 2009-11-24 22:05:54+00:00, davehart@shiny.ad.hartbrothers.com
One more missing free(), thanks to Hal Murray's sharp eyes
ntpd/ntp_intres.c@1.74 +2 -0
One more missing free(), thanks to Hal Murray's sharp eyes
-ChangeSet@1.2060.1.53, 2009-11-24 14:51:38+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.49, 2009-11-24 14:51:38+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1387] free() conf_entry in ntp_intres removeentry().
[Bug 1392] intres retries duplicate assocations endlessly.
- ChangeLog@1.553 +1 -0
+ ChangeLog@1.496.1.57 +1 -0
[Bug 1387] free() conf_entry in ntp_intres removeentry().
[Bug 1392] intres retries duplicate assocations endlessly.
@@ -9427,14 +123192,14 @@ ChangeSet@1.2060.1.53, 2009-11-24 14:51:38+00:00, davehart@shiny.ad.hartbrothers
ntpd/ntp_peer.c@1.126 +6 -11
use DPRINTF
-ChangeSet@1.2060.1.52, 2009-11-23 17:43:13+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.48, 2009-11-23 17:43:13+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1387] Storage leak in ntp_intres (minor).
[Bug 1389] buffer overflow in refclock_oncore.c
[Bug 1391] .texi usage text from installed, not built binaries.
Correct *-opts.h dependency so default 'get' action isn't used.
- ChangeLog@1.552 +4 -0
+ ChangeLog@1.496.1.56 +4 -0
[Bug 1387] Storage leak in ntp_intres (minor).
[Bug 1389] buffer overflow in refclock_oncore.c
[Bug 1391] .texi usage text from installed, not built binaries.
@@ -9477,11 +123242,11 @@ ChangeSet@1.2060.1.52, 2009-11-23 17:43:13+00:00, davehart@shiny.ad.hartbrothers
[Bug 1391] .texi usage text from installed, not built binaries.
Correct *-opts.h dependency so default 'get' action isn't used.
-ChangeSet@1.2060.1.51, 2009-11-20 05:36:49-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.47, 2009-11-20 05:36:49-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P247_RC
TAG: NTP_4_2_5P247_RC
- ChangeLog@1.551 +1 -0
+ ChangeLog@1.496.1.55 +1 -0
NTP_4_2_5P247_RC
ntpd/ntpd-opts.c@1.242 +5 -5
@@ -9559,10 +123324,10 @@ ChangeSet@1.2060.1.51, 2009-11-20 05:36:49-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.240 +2 -2
NTP_4_2_5P247_RC
-ChangeSet@1.2060.1.50, 2009-11-18 04:29:17+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.46, 2009-11-18 04:29:17+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1308] support systems that lack fork().
- ChangeLog@1.550 +1 -0
+ ChangeLog@1.496.1.54 +1 -0
[Bug 1308] support systems that lack fork().
configure.ac@1.459.1.13 +2 -0
@@ -9580,13 +123345,13 @@ ChangeSet@1.2060.1.50, 2009-11-18 04:29:17+00:00, davehart@shiny.ad.hartbrothers
ntpd/ntp_intres.c@1.71 +7 -0
[Bug 1308] support systems that lack fork().
-ChangeSet@1.2060.1.49, 2009-11-17 19:43:44+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.45, 2009-11-17 19:43:44+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1142] nodebug builds shed no light on -d, -D option failure.
[Bug 1179] point out the problem with -i/--jaildir and -u/--user when
they are disabled by configure.
-4/-6 are not equivalent in the libopts sense
- ChangeLog@1.549 +3 -0
+ ChangeLog@1.496.1.53 +3 -0
* [Bug 1142] nodebug builds shed no light on -d, -D option failure.
* [Bug 1179] point out the problem with -i/--jaildir and -u/--user when
they are disabled by configure.
@@ -9689,10 +123454,10 @@ ChangeSet@1.2060.1.49, 2009-11-17 19:43:44+00:00, davehart@shiny.ad.hartbrothers
util/ntp-keygen.1@1.239 +1 -1
updated Autogen output
-ChangeSet@1.2060.1.48, 2009-11-17 16:15:53+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.44, 2009-11-17 16:15:53+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1343] sntp doesn't link on Solaris 7, needs -lresolv.
- ChangeLog@1.548 +1 -0
+ ChangeLog@1.496.1.52 +1 -0
[Bug 1343] sntp doesn't link on Solaris 7, needs -lresolv.
configure.ac@1.459.1.12 +2 -1
@@ -9703,11 +123468,11 @@ ChangeSet@1.2060.1.48, 2009-11-17 16:15:53+00:00, davehart@shiny.ad.hartbrothers
Search for inet_ntop in -lresolv if not in default libs, needed
for sntp on Solaris 7
-ChangeSet@1.2060.1.47, 2009-11-17 07:34:00-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.43, 2009-11-17 07:34:00-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P246_RC
TAG: NTP_4_2_5P246_RC
- ChangeLog@1.547 +1 -0
+ ChangeLog@1.496.1.51 +1 -0
NTP_4_2_5P246_RC
ntpd/ntpd-opts.c@1.240 +32 -33
@@ -9785,7 +123550,7 @@ ChangeSet@1.2060.1.47, 2009-11-17 07:34:00-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.238 +3 -3
NTP_4_2_5P246_RC
-ChangeSet@1.2060.1.46, 2009-11-17 06:53:35-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.42, 2009-11-17 06:53:35-05:00, stenn@whimsy.udel.edu
autogen upgrade cleanup
clockstuff/clktest-opts.c@1.12 +130 -361
@@ -9824,10 +123589,10 @@ ChangeSet@1.2060.1.46, 2009-11-17 06:53:35-05:00, stenn@whimsy.udel.edu
sntp/libopts/genshell.h@1.6 +2 -2
autogen upgrade cleanup
-ChangeSet@1.2060.1.45, 2009-11-17 06:44:44-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.41, 2009-11-17 06:44:44-05:00, stenn@whimsy.udel.edu
Upgrade to autogen 5.10
- ChangeLog@1.546 +1 -0
+ ChangeLog@1.496.1.50 +1 -0
Upgrade to autogen 5.10
libopts/Makefile.am@1.2 +1 -1
@@ -10034,21 +123799,21 @@ ChangeSet@1.2060.1.45, 2009-11-17 06:44:44-05:00, stenn@whimsy.udel.edu
sntp/libopts/xat-attribute.h@1.6 +1 -1
Upgrade to autogen 5.10
-ChangeSet@1.2060.1.44, 2009-11-17 07:27:53+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.40, 2009-11-17 07:27:53+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1384] ntpq :config core dumped with a blank password.
- ChangeLog@1.545 +1 -0
+ ChangeLog@1.496.1.49 +1 -0
[Bug 1384] ntpq :config core dumped with a blank password.
- ntpq/ntpq-subs.c@1.41 +60 -41
+ ntpq/ntpq-subs.c@1.39.1.2 +60 -41
[Bug 1384] ntpq :config core dumped with a blank password.
-ChangeSet@1.2060.21.1, 2009-11-17 04:25:42+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.22.1, 2009-11-17 04:25:42+00:00, davehart@shiny.ad.hartbrothers.com
use (peer->pmode == MODE_BROADCAST) rather than
(peer->castflags & MDF_BCLNT) to detect ephemeral broadcastclient
associations to exempt from peer_clear("XFAC")
- ChangeLog@1.542.1.1 +1 -0
+ ChangeLog@1.496.18.1 +1 -0
[Bug 1378] Unnecessary resetting of peers during interface update.
ntpd/ntp_peer.c@1.125 +1 -1
@@ -10057,10 +123822,10 @@ ChangeSet@1.2060.21.1, 2009-11-17 04:25:42+00:00, davehart@shiny.ad.hartbrothers
associations to exempt from peer_clear("XFAC"), suggested
by Frank Kardel.
-ChangeSet@1.2060.1.42, 2009-11-16 05:41:46+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.38, 2009-11-16 05:41:46+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1382] p245 configure --disable-dependency-tracking won't build
- ChangeLog@1.543 +1 -0
+ ChangeLog@1.496.1.47 +1 -0
[Bug 1382] p245 configure --disable-dependency-tracking won't build
Makefile.am@1.86.1.3 +1 -0
@@ -10106,11 +123871,11 @@ ChangeSet@1.2060.1.42, 2009-11-16 05:41:46+00:00, davehart@shiny.ad.hartbrothers
util/Makefile.am@1.43 +1 -0
depsver.mf requires CLEANFILES be set even if empty
-ChangeSet@1.2060.1.41, 2009-11-14 08:29:21-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.37, 2009-11-14 08:29:21-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P245_RC
TAG: NTP_4_2_5P245_RC
- ChangeLog@1.542 +1 -0
+ ChangeLog@1.496.1.46 +1 -0
NTP_4_2_5P245_RC
ntpd/ntpd-opts.c@1.239 +2 -2
@@ -10188,10 +123953,10 @@ ChangeSet@1.2060.1.41, 2009-11-14 08:29:21-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.237 +2 -2
NTP_4_2_5P245_RC
-ChangeSet@1.2060.1.40, 2009-11-14 07:23:50-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.36, 2009-11-14 07:23:50-05:00, stenn@whimsy.udel.edu
Changes from Dave Mills
- ChangeLog@1.541 +1 -0
+ ChangeLog@1.496.1.45 +1 -0
Changes from Dave Mills
html/authopt.html@1.59 +6 -5
@@ -10212,12 +123977,12 @@ ChangeSet@1.2060.1.40, 2009-11-14 07:23:50-05:00, stenn@whimsy.udel.edu
ntpd/refclock_local.c@1.20 +0 -9
Cleanup from Dave Mills
-ChangeSet@1.2060.20.1, 2009-11-14 02:20:06+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.21.1, 2009-11-14 02:20:06+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1381] Version .deps generated include file dependencies to allow
known dependecy-breaking changes to force .deps to be cleaned,
triggered by changing the contents of deps-ver and/or sntp/deps-ver.
- ChangeLog@1.538.1.1 +3 -0
+ ChangeLog@1.496.17.1 +3 -0
[Bug 1381] Version .deps generated include file dependencies to allow
known dependecy-breaking changes to force .deps to be cleaned,
triggered by changing the contents of deps-ver and/or sntp/deps-ver.
@@ -10297,7 +124062,7 @@ ChangeSet@1.2060.20.1, 2009-11-14 02:20:06+00:00, davehart@shiny.ad.hartbrothers
util/Makefile.am@1.42 +3 -0
include depsver.mf
-ChangeSet@1.2060.1.38, 2009-11-13 13:31:39+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.34, 2009-11-13 13:31:39+00:00, davehart@shiny.ad.hartbrothers.com
configure.ac:
mirror inet_ntop(), inet_pton() tests from top configure.ac
remomve ISC_PLATFORM_NEEDATON test, no longer used by libisc
@@ -10308,13 +124073,13 @@ ChangeSet@1.2060.1.38, 2009-11-13 13:31:39+00:00, davehart@shiny.ad.hartbrothers
sntp/configure.ac@1.25 +3 -0
mirror inet_ntop(), inet_pton() tests from top configure.ac
-ChangeSet@1.2060.1.37, 2009-11-12 13:37:43+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.33, 2009-11-12 13:37:43+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1343] sntp illegal C does not compile on Solaris 7.
Windows VC9/VS2008: use generic library name libeay32.lib
instead of variants encoding build type to match what you
get building OpenSSL from source.
- ChangeLog@1.539 +1 -0
+ ChangeLog@1.496.1.43 +1 -0
[Bug 1343] sntp illegal C does not compile on Solaris 7.
ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj@1.9 +2 -2
@@ -10322,7 +124087,7 @@ ChangeSet@1.2060.1.37, 2009-11-12 13:37:43+00:00, davehart@shiny.ad.hartbrothers
encoding build type to match what you get building OpenSSL
from source.
- ports/winnt/vs2008/ntpd/ntpd.vcproj@1.22 +2 -2
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.21.1.1 +2 -2
use generic library name libeay32.lib instead of variants
encoding build type to match what you get building OpenSSL
from source.
@@ -10351,11 +124116,11 @@ ChangeSet@1.2060.1.37, 2009-11-12 13:37:43+00:00, davehart@shiny.ad.hartbrothers
sntp/networking.c@1.28 +14 -11
[Bug 1343] sntp illegal C does not compile on Solaris 7.
-ChangeSet@1.2060.1.36, 2009-11-12 06:10:27-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.32, 2009-11-12 06:10:27-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P244_RC
TAG: NTP_4_2_5P244_RC
- ChangeLog@1.538 +1 -0
+ ChangeLog@1.496.1.42 +1 -0
NTP_4_2_5P244_RC
ntpd/ntpd-opts.c@1.238 +2 -2
@@ -10433,23 +124198,23 @@ ChangeSet@1.2060.1.36, 2009-11-12 06:10:27-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.236 +2 -2
NTP_4_2_5P244_RC
-ChangeSet@1.2060.1.35, 2009-11-12 04:26:17-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.31, 2009-11-12 04:26:17-05:00, stenn@whimsy.udel.edu
keygen.html updates from Dave Mills
- ChangeLog@1.537 +1 -0
+ ChangeLog@1.496.1.41 +1 -0
keygen.html updates from Dave Mills
html/keygen.html@1.18 +46 -26
keygen.html updates from Dave Mills
-ChangeSet@1.2060.1.34, 2009-11-12 02:29:11+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.30, 2009-11-12 02:29:11+00:00, davehart@shiny.ad.hartbrothers.com
ntp-keygen.c:
21 bytes don't fit well in a 17 byte buffer
util/ntp-keygen.c@1.63 +1 -1
21 bytes don't fit well in a 17 byte buffer
-ChangeSet@1.2060.1.33, 2009-11-12 00:51:35+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.29, 2009-11-12 00:51:35+00:00, davehart@shiny.ad.hartbrothers.com
Cleanup, fix ntp_intres when requestkey type means digests
larger than 16 octets.
Add /lib to OpenSSL library search path, OpenSolaris has it there.
@@ -10493,14 +124258,14 @@ ChangeSet@1.2060.1.33, 2009-11-12 00:51:35+00:00, davehart@shiny.ad.hartbrothers
ntpdc/ntpdc.c@1.74 +4 -4
quiet shadows global warning
-ChangeSet@1.2060.19.1, 2009-11-11 12:36:24+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.20.1, 2009-11-11 12:36:24+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1003] ntpdc unconfig command doesn't prompt for keyid.
[Bug 1376] Enable authenticated ntpq and ntpdc using newly-available
digest types.
ntp-keygen, Autokey OpenSSL build vs. run version mismatch is now a
non-fatal warning.
- ChangeLog@1.532.1.1 +5 -0
+ ChangeLog@1.496.16.1 +5 -0
[Bug 1003] ntpdc unconfig command doesn't prompt for keyid.
[Bug 1376] Enable authenticated ntpq and ntpdc using newly-available
digest types.
@@ -10557,18 +124322,18 @@ ChangeSet@1.2060.19.1, 2009-11-11 12:36:24+00:00, davehart@shiny.ad.hartbrothers
ntpdc/ntpdc_ops.c@1.62 +2 -2
whitespace only
- ntpq/ntpq-subs.c@1.40 +1 -1
+ ntpq/ntpq-subs.c@1.39.1.1 +1 -1
typo pointed out by Michael Tatarinov
ntpq/ntpq.c@1.96 +93 -69
[Bug 1376] Enable authenticated ntpq and ntpdc using newly-available
digest types.
-ChangeSet@1.2060.1.31, 2009-11-11 05:46:08-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.27, 2009-11-11 05:46:08-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P243_RC
TAG: NTP_4_2_5P243_RC
- ChangeLog@1.535 +1 -0
+ ChangeLog@1.496.1.39 +1 -0
NTP_4_2_5P243_RC
ntpd/ntpd-opts.c@1.237 +2 -2
@@ -10646,16 +124411,16 @@ ChangeSet@1.2060.1.31, 2009-11-11 05:46:08-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.235 +2 -2
NTP_4_2_5P243_RC
-ChangeSet@1.2060.1.30, 2009-11-11 04:04:33-05:00, stenn@pogo.udel.edu
+ChangeSet@1.2060.3.26, 2009-11-11 04:04:33-05:00, stenn@pogo.udel.edu
[Bug 1226] Fix deferred DNS lookups
- ChangeLog@1.534 +1 -0
+ ChangeLog@1.496.1.38 +1 -0
[Bug 1226] Fix deferred DNS lookups
-ChangeSet@1.2060.18.2, 2009-11-11 03:08:32-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.19.2, 2009-11-11 03:08:32-05:00, stenn@whimsy.udel.edu
new crypto signature cleanup
- ChangeLog@1.533 +1 -0
+ ChangeLog@1.496.1.37 +1 -0
new crypto signature cleanup
html/authopt.html@1.58 +14 -5
@@ -10673,11 +124438,11 @@ ChangeSet@1.2060.18.2, 2009-11-11 03:08:32-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.c@1.62 +24 -4
new crypto signature cleanup
-ChangeSet@1.2060.18.1, 2009-11-10 05:02:56-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.19.1, 2009-11-10 05:02:56-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P242_RC
TAG: NTP_4_2_5P242_RC
- ChangeLog@1.532 +1 -0
+ ChangeLog@1.496.1.36 +1 -0
NTP_4_2_5P242_RC
ntpd/ntpd-opts.c@1.236 +2 -2
@@ -10755,7 +124520,7 @@ ChangeSet@1.2060.18.1, 2009-11-10 05:02:56-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.234 +2 -2
NTP_4_2_5P242_RC
-ChangeSet@1.2060.1.28, 2009-11-09 18:15:07-05:00, murray@malarky.udel.edu
+ChangeSet@1.2060.3.24, 2009-11-09 18:15:07-05:00, murray@malarky.udel.edu
configure.ac, ntp_intres.c:
Fix for bug-1266: reload /etc/resolv.conf on deferred DNS
ntp_config.c:
@@ -10772,10 +124537,10 @@ ChangeSet@1.2060.1.28, 2009-11-09 18:15:07-05:00, murray@malarky.udel.edu
ntpd/ntp_intres.c@1.68 +15 -7
Fix for bug-1266: reload /etc/resolv.conf on deferred DNS
-ChangeSet@1.2060.17.2, 2009-11-09 04:14:13-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.18.2, 2009-11-09 04:14:13-05:00, stenn@whimsy.udel.edu
Documentation updates from Dave Mills
- ChangeLog@1.525.3.2 +1 -0
+ ChangeLog@1.496.15.2 +1 -0
Documentation updates from Dave Mills
html/authopt.html@1.57 +5 -3
@@ -10784,54 +124549,54 @@ ChangeSet@1.2060.17.2, 2009-11-09 04:14:13-05:00, stenn@whimsy.udel.edu
html/index.html@1.41 +25 -4
Documentation updates from Dave Mills
-ChangeSet@1.2060.17.1, 2009-11-09 04:08:41-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.18.1, 2009-11-09 04:08:41-05:00, stenn@whimsy.udel.edu
authkeys.c cleanup from Dave Mills
- ChangeLog@1.525.3.1 +1 -0
+ ChangeLog@1.496.15.1 +1 -0
authkeys.c cleanup from Dave Mills
libntp/authkeys.c@1.17.1.1 +3 -4
authkeys.c cleanup from Dave Mills
-ChangeSet@1.2060.1.26, 2009-11-09 08:03:02+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.22, 2009-11-09 08:03:02+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1371] deferred DNS lookup failing with INFO_ERR_AUTH.
fixed in prior changeset with ntp_request.h modification
to REQ_LEN_NOMAC.
- ChangeLog@1.530 +1 -0
+ ChangeLog@1.496.1.34 +1 -0
[Bug 1371] deferred DNS lookup failing with INFO_ERR_AUTH.
-ChangeSet@1.2060.4.2, 2009-11-09 07:19:52+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.5.2, 2009-11-09 07:19:52+00:00, davehart@shiny.ad.hartbrothers.com
Shrink keyword scanner FSM entries from 64 to 32 bits apiece.
applies to prior changeset and this ChangeLog update
- ChangeLog@1.498.2.1 +1 -0
+ ChangeLog@1.496.14.1 +1 -0
Shrink keyword scanner FSM entries from 64 to 32 bits apiece.
-ChangeSet@1.2060.1.23, 2009-11-09 07:17:29+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.19, 2009-11-09 07:17:29+00:00, davehart@shiny.ad.hartbrothers.com
Stub out isc/mem.h, shaving 47k from a MIPS ntpd binary.
(applies to prior changeset along with this one)
- ChangeLog@1.511.3.1 +1 -0
+ ChangeLog@1.496.13.1 +1 -0
Stub out isc/mem.h, shaving 47k from a MIPS ntpd binary.
include/isc/mem.h@1.2 +1 -0
also stub out isc_mem_printallactive() to silence warning and avoid
trouble down the road, it's referenced by tasks.c
-ChangeSet@1.2060.16.1, 2009-11-08 12:32:55+00:00, kardel@pogo.udel.edu
+ChangeSet@1.2060.17.1, 2009-11-08 12:32:55+00:00, kardel@pogo.udel.edu
clk_trimtsip.c:
[Bug 1363] CID 92 clarify fallthrough case
ChangeLog:
[Bug 1363] CID 92 clarify fallthrough case in clk_trimtsip.c
- ChangeLog@1.525.2.1 +1 -0
+ ChangeLog@1.496.12.1 +1 -0
[Bug 1363] CID 92 clarify fallthrough case in clk_trimtsip.c
libparse/clk_trimtsip.c@1.10 +10 -3
[Bug 1363] CID 92 clarify fallthrough case
-ChangeSet@1.2060.8.22, 2009-11-07 23:44:10+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.9.22, 2009-11-07 23:44:10+00:00, davehart@shiny.ad.hartbrothers.com
Use Frank Kardel's suggestion to collapse 3 cases to 1 for NetBSD
USE_FSETOWNCTTY test.
@@ -10839,10 +124604,10 @@ ChangeSet@1.2060.8.22, 2009-11-07 23:44:10+00:00, davehart@shiny.ad.hartbrothers
Use Frank Kardel's suggestion to collapse 3 cases to 1 for NetBSD
USE_FSETOWNCTTY test.
-ChangeSet@1.2060.15.2, 2009-11-07 22:46:41+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.16.2, 2009-11-07 22:46:41+00:00, davehart@shiny.ad.hartbrothers.com
Fix authenticated ntpdc, broken in p240.
- ChangeLog@1.525.1.2 +1 -0
+ ChangeLog@1.496.11.2 +1 -0
Fix authenticated ntpdc, broken in p240.
include/ntp.h@1.168 +4 -4
@@ -10888,11 +124653,11 @@ ChangeSet@1.2060.15.2, 2009-11-07 22:46:41+00:00, davehart@shiny.ad.hartbrothers
util/ntp-keygen.c@1.61 +1 -1
separate OpenSSL version check from INIT_SSL()
-ChangeSet@1.2060.8.20, 2009-11-07 12:16:01-05:00, murray@pogo.udel.edu
+ChangeSet@1.2060.9.20, 2009-11-07 12:16:01-05:00, murray@pogo.udel.edu
a_md5encrypt.c, authreadkeys.c, ChangeLog:
Fix for bug 1368 - typos in --without-crypto case
- ChangeLog@1.526 +1 -0
+ ChangeLog@1.496.1.30 +1 -0
Fix for bug 1368
libntp/a_md5encrypt.c@1.24 +1 -0
@@ -10901,11 +124666,11 @@ ChangeSet@1.2060.8.20, 2009-11-07 12:16:01-05:00, murray@pogo.udel.edu
libntp/authreadkeys.c@1.11 +1 -1
Fix for bug 1368
-ChangeSet@1.2060.8.19, 2009-11-07 05:42:36-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.9.19, 2009-11-07 05:42:36-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P241_RC
TAG: NTP_4_2_5P241_RC
- ChangeLog@1.525 +1 -0
+ ChangeLog@1.496.1.29 +1 -0
NTP_4_2_5P241_RC
ntpd/ntpd-opts.c@1.235 +2 -2
@@ -10983,13 +124748,13 @@ ChangeSet@1.2060.8.19, 2009-11-07 05:42:36-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.233 +2 -2
NTP_4_2_5P241_RC
-ChangeSet@1.2060.14.1, 2009-11-07 07:57:11+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.15.1, 2009-11-07 07:57:11+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1366] ioctl(TIOCSCTTY, 0) fails on NetBSD *[0-2].* > 3.99.7.
initialize OpenSSL before first use in libntp
ntpq, ntpdc, ntpdate use OpenSSL and need applink on Windows
add crypto digest and setvar default tests to ntpd/complete.conf
- ChangeLog@1.521.1.1 +2 -0
+ ChangeLog@1.496.10.1 +2 -0
[Bug 1366] ioctl(TIOCSCTTY, 0) fails on NetBSD *[0-2].* > 3.99.7.
CID 87 dead code in ntpq.c atoascii().
@@ -11056,16 +124821,16 @@ ChangeSet@1.2060.14.1, 2009-11-07 07:57:11+00:00, davehart@shiny.ad.hartbrothers
ports/winnt/ntpd/ntservice.c@1.22 +3 -39
ntpq, ntpdc, ntpdate use OpenSSL and need applink on Windows
- ports/winnt/vc6/libntp.dsp@1.46.1.1 +4 -0
+ ports/winnt/vc6/libntp.dsp@1.43.3.1 +4 -0
add ssl_init.c
- ports/winnt/vs2003/libntp.vcproj@1.5.1.1 +4 -0
+ ports/winnt/vs2003/libntp.vcproj@1.4.2.1 +4 -0
add ssl_init.c
- ports/winnt/vs2005/libntp.vcproj@1.5.1.1 +4 -0
+ ports/winnt/vs2005/libntp.vcproj@1.4.2.1 +4 -0
add ssl_init.c
- ports/winnt/vs2008/libntp/libntp.vcproj@1.22.1.1 +6 -2
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.2.1 +6 -2
add ssl_init.c
sntp/Makefile.am@1.13.2.1 +9 -1
@@ -11077,22 +124842,22 @@ ChangeSet@1.2060.14.1, 2009-11-07 07:57:11+00:00, davehart@shiny.ad.hartbrothers
Use common OpenSSL initialization from libntp
ntpq, ntpdc, ntpdate use OpenSSL and need applink on Windows
-ChangeSet@1.2060.8.18, 2009-11-07 01:15:29-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.9.18, 2009-11-07 01:15:29-05:00, stenn@whimsy.udel.edu
authopt.html update from Dave Mills
- ChangeLog@1.524 +1 -0
+ ChangeLog@1.496.1.28 +1 -0
authopt.html update from Dave Mills
html/authopt.html@1.56 +59 -29
authopt.html update from Dave Mills
-ChangeSet@1.2060.8.17, 2009-11-07 01:09:12-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.9.17, 2009-11-07 01:09:12-05:00, stenn@whimsy.udel.edu
Remove unused file from the sntp/Makefile.am
- ChangeLog@1.523 +1 -0
+ ChangeLog@1.496.1.27 +1 -0
Remove unused file from the sntp/Makefile.am
- ChangeLog@1.522 +1 -0
+ ChangeLog@1.496.1.26 +1 -0
new crypto signature cleanup
libntp/a_md5encrypt.c@1.23 +23 -23
@@ -11107,11 +124872,11 @@ ChangeSet@1.2060.8.17, 2009-11-07 01:09:12-05:00, stenn@whimsy.udel.edu
sntp/Makefile.am@1.13.1.2 +0 -1
Remove unused file from the sntp/Makefile.am
-ChangeSet@1.2060.8.16, 2009-11-05 04:05:18-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.9.16, 2009-11-05 04:05:18-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P240_RC
TAG: NTP_4_2_5P240_RC
- ChangeLog@1.521 +1 -0
+ ChangeLog@1.496.1.25 +1 -0
NTP_4_2_5P240_RC
ntpd/ntpd-opts.c@1.234 +2 -2
@@ -11189,10 +124954,10 @@ ChangeSet@1.2060.8.16, 2009-11-05 04:05:18-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.232 +2 -2
NTP_4_2_5P240_RC
-ChangeSet@1.2060.13.2, 2009-11-05 02:04:25-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.14.2, 2009-11-05 02:04:25-05:00, stenn@whimsy.udel.edu
Provide all of OpenSSL's signature methods for ntp.keys (FIPS 140-2)
- ChangeLog@1.517.1.2 +1 -1
+ ChangeLog@1.496.9.2 +1 -1
Provide all of OpenSSL's signature methods for ntp.keys (FIPS 140-2)
html/authopt.html@1.55 +20 -17
@@ -11207,7 +124972,7 @@ ChangeSet@1.2060.13.2, 2009-11-05 02:04:25-05:00, stenn@whimsy.udel.edu
libntp/authkeys.c@1.16 +1 -2
Provide all of OpenSSL's signature methods for ntp.keys (FIPS 140-2)
-ChangeSet@1.2060.8.14, 2009-11-05 01:33:53+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.9.14, 2009-11-05 01:33:53+00:00, davehart@shiny.ad.hartbrothers.com
remove leftover RSAREF tidbit global.h no longer used
BitKeeper/deleted/.del-global.h~3aed0663@1.5 +0 -0
@@ -11216,7 +124981,7 @@ ChangeSet@1.2060.8.14, 2009-11-05 01:33:53+00:00, davehart@shiny.ad.hartbrothers
include/Makefile.am@1.35.2.1 +0 -1
remove leftover RSAREF tidbit global.h no longer used
-ChangeSet@1.2060.8.13, 2009-11-05 00:24:26+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.9.13, 2009-11-05 00:24:26+00:00, davehart@shiny.ad.hartbrothers.com
remove testing leftover #undef OPENSSL
warning cleanup
linking with libntp now requires -lcrypto / libeay32.lib
@@ -11279,10 +125044,10 @@ ChangeSet@1.2060.8.13, 2009-11-05 00:24:26+00:00, davehart@shiny.ad.hartbrothers
ports/winnt/vs2008/ntpq/ntpq.vcproj@1.10 +2 -2
add reference to libeay32.lib needed by symmetric key crypto now
-ChangeSet@1.2060.13.1, 2009-11-04 14:53:24-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.14.1, 2009-11-04 14:53:24-05:00, stenn@whimsy.udel.edu
Provide all of OpenSSL's signature methods for ntp.keys (FIPS xxx)
- ChangeLog@1.517.1.1 +1 -0
+ ChangeLog@1.496.9.1 +1 -0
Provide all of OpenSSL's signature methods for ntp.keys (FIPS xxx)
html/authopt.html@1.54 +32 -3
@@ -11348,7 +125113,7 @@ ChangeSet@1.2060.13.1, 2009-11-04 14:53:24-05:00, stenn@whimsy.udel.edu
sntp/crypto.h@1.5.1.1 +1 -0
Provide all of OpenSSL's signature methods for ntp.keys (FIPS xxx)
-ChangeSet@1.2060.8.11, 2009-11-02 19:31:57+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.9.11, 2009-11-02 19:31:57+00:00, davehart@shiny.ad.hartbrothers.com
correct linuxcaps AC_MSG_RESULT() to occur after considering
--enable-linuxcaps
@@ -11356,10 +125121,10 @@ ChangeSet@1.2060.8.11, 2009-11-02 19:31:57+00:00, davehart@shiny.ad.hartbrothers
correct linuxcaps AC_MSG_RESULT() to occur after considering
--enable-linuxcaps
-ChangeSet@1.2060.12.1, 2009-11-02 06:08:22+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.13.1, 2009-11-02 06:08:22+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1364] clock_gettime() not detected, need -lrt on Debian 5.0.3.
- ChangeLog@1.518 +1 -0
+ ChangeLog@1.496.1.22 +1 -0
[Bug 1364] clock_gettime() not detected, need -lrt on Debian 5.0.3.
configure.ac@1.459.2.1 +4 -2
@@ -11367,7 +125132,7 @@ ChangeSet@1.2060.12.1, 2009-11-02 06:08:22+00:00, davehart@shiny.ad.hartbrothers
bump cache version so previous results not finding clock_gettime() will
be tossed.
-ChangeSet@1.2060.8.9, 2009-10-31 06:38:39+09:00, Amidamaru@yumi.mxiesoft.com
+ChangeSet@1.2060.9.9, 2009-10-31 06:38:39+09:00, Amidamaru@yumi.mxiesoft.com
.del-netutils.c~1f7e234e73bebdf5:
Delete: sntp/netutils.c
.del-COPYRIGHT~cdd0795ee52aa7b5:
@@ -11416,11 +125181,11 @@ ChangeSet@1.2060.8.9, 2009-10-31 06:38:39+09:00, Amidamaru@yumi.mxiesoft.com
sntp/utilities.h@1.8 +0 -34
Removed copyright statement
-ChangeSet@1.2060.8.8, 2009-10-30 01:30:30-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.9.8, 2009-10-30 01:30:30-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P239_RC
TAG: NTP_4_2_5P239_RC
- ChangeLog@1.517 +1 -0
+ ChangeLog@1.496.1.21 +1 -0
NTP_4_2_5P239_RC
ntpd/ntpd-opts.c@1.233 +2 -2
@@ -11498,13 +125263,13 @@ ChangeSet@1.2060.8.8, 2009-10-30 01:30:30-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.231 +2 -2
NTP_4_2_5P239_RC
-ChangeSet@1.2060.11.1, 2009-10-29 02:55:07-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.12.1, 2009-10-29 02:55:07-05:00, stenn@whimsy.udel.edu
CID 101 and Bug 1359
- ChangeLog@1.514.1.2 +1 -0
+ ChangeLog@1.496.8.2 +1 -0
CID 101: more pointer/array cleanup
- ChangeLog@1.514.1.1 +1 -0
+ ChangeLog@1.496.8.1 +1 -0
CID 101: more pointer/array cleanup
ntpd/ntp_crypto.c@1.143 +2 -1
@@ -11513,40 +125278,40 @@ ChangeSet@1.2060.11.1, 2009-10-29 02:55:07-05:00, stenn@whimsy.udel.edu
ntpd/ntp_loopfilter.c@1.152 +2 -1
CID 101: more pointer/array cleanup
-ChangeSet@1.2060.8.6, 2009-10-28 15:49:51-04:00, murray@pogo.udel.edu
+ChangeSet@1.2060.9.6, 2009-10-28 15:49:51-04:00, murray@pogo.udel.edu
ChangeLog:
Bug-1357: bogus assert in refclock_shm
- ChangeLog@1.515 +1 -0
+ ChangeLog@1.496.1.19 +1 -0
Bug-1357: bogus assert in refclock_shm
-ChangeSet@1.2060.8.5, 2009-10-28 13:32:36-04:00, murray@pogo.udel.edu
+ChangeSet@1.2060.9.5, 2009-10-28 13:32:36-04:00, murray@pogo.udel.edu
refclock_shm.c:
Fix for bug-1357: bogus assert in refclock_shm
ntpd/refclock_shm.c@1.19 +4 -1
Fix for bug-1357: bogus assert in refclock_shm
-ChangeSet@1.2060.9.2, 2009-10-28 09:19:39+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.10.2, 2009-10-28 09:19:39+00:00, davehart@shiny.ad.hartbrothers.com
networking.c:
2nd half of [Bug 1158] in recv_bcast_data()
sntp/networking.c@1.26 +1 -1
2nd half of [Bug 1158] in recv_bcast_data()
-ChangeSet@1.2060.10.1, 2009-10-28 03:47:47-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.11.1, 2009-10-28 03:47:47-05:00, stenn@whimsy.udel.edu
CID 101: pointer/array cleanup
- ChangeLog@1.511.2.1 +1 -0
+ ChangeLog@1.496.7.1 +1 -0
CID 101: pointer/array cleanup
ntpd/ntp_crypto.c@1.142 +10 -10
CID 101: pointer/array cleanup
-ChangeSet@1.2060.9.1, 2009-10-28 07:35:54+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.10.1, 2009-10-28 07:35:54+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1358] AIX 4.3 sntp/networking.c IPV6_JOIN_GROUP undeclared.
- ChangeLog@1.511.1.1 +1 -0
+ ChangeLog@1.496.6.1 +1 -0
[Bug 1358] AIX 4.3 sntp/networking.c IPV6_JOIN_GROUP undeclared.
include/ntp_rfc2553.h@1.33 +17 -2
@@ -11556,7 +125321,7 @@ ChangeSet@1.2060.9.1, 2009-10-28 07:35:54+00:00, davehart@shiny.ad.hartbrothers.
provide a 0 definition for AI_NUMERICHOST for those platforms
that don't have that flag.
- ntpd/ntp_io.c@1.307.1.1 +0 -14
+ ntpd/ntp_io.c@1.306.2.1 +0 -14
move INCLUDE_IPV6_SUPPORT and INCLUDE_IPV6_MULTICAST_SUPPORT
definitions to ntp_rfc2553.h to share with sntp
@@ -11568,16 +125333,16 @@ ChangeSet@1.2060.9.1, 2009-10-28 07:35:54+00:00, davehart@shiny.ad.hartbrothers.
sntp/networking.h@1.15 +1 -0
pick up INCLUDE_IPV6_MULTICAST_SUPPORT from ntp_rfc2553.h
-ChangeSet@1.2060.8.1, 2009-10-28 03:42:47+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.9.1, 2009-10-28 03:42:47+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1356] core dump from refclock_nmea when can't open /dev/gpsU.
- ChangeLog@1.512 +1 -0
+ ChangeLog@1.496.1.16 +1 -0
[Bug 1356] core dump from refclock_nmea when can't open /dev/gpsU.
ntpd/refclock_nmea.c@1.46 +17 -8
[Bug 1356] core dump from refclock_nmea when can't open /dev/gpsU.
-ChangeSet@1.2060.1.22, 2009-10-27 21:53:59+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.18, 2009-10-27 21:53:59+00:00, davehart@shiny.ad.hartbrothers.com
stub out isc/mem.c using NTP-local /include/isc/mem.h (leaving
/lib/isc/include/isc/mem.h untouched).
@@ -11605,33 +125370,33 @@ ChangeSet@1.2060.1.22, 2009-10-27 21:53:59+00:00, davehart@shiny.ad.hartbrothers
stubs depend on it (could be implemented in mem.h, but other code may
grow a dependency being tested only on GNU malloc, so play it safe.)
- ntpd/ntp_io.c@1.308 +1 -37
+ ntpd/ntp_io.c@1.306.1.2 +1 -37
remove ntp_memalloc(), ntp_memfree(), pass dummy non-null mctx
to to libisc interface iterator.
- ports/winnt/vc6/libntp.dsp@1.47 +0 -4
+ ports/winnt/vc6/libntp.dsp@1.43.1.4 +0 -4
lib/isc/mem.c is no longer compiled
- ports/winnt/vs2003/libntp.vcproj@1.6 +1 -4
+ ports/winnt/vs2003/libntp.vcproj@1.4.1.2 +1 -4
remove change mem.h reference to NTP override copy in include/isc
lib/isc/mem.c is no longer compiled.
- ports/winnt/vs2005/libntp.vcproj@1.6 +1 -5
+ ports/winnt/vs2005/libntp.vcproj@1.4.1.2 +1 -5
remove change mem.h reference to NTP override copy in include/isc
lib/isc/mem.c is no longer compiled.
- ports/winnt/vs2008/libntp/libntp.vcproj@1.23 +1 -5
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.1.3 +1 -5
remove change mem.h reference to NTP override copy in include/isc
lib/isc/mem.c is no longer compiled.
util/ntptime.c@1.21 +1 -0
add "int debug;" global for libntp consumption
-ChangeSet@1.2060.1.21, 2009-10-27 05:47:37-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.17, 2009-10-27 05:47:37-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P238_RC
TAG: NTP_4_2_5P238_RC
- ChangeLog@1.511 +1 -0
+ ChangeLog@1.496.1.15 +1 -0
NTP_4_2_5P238_RC
ntpd/ntpd-opts.c@1.232 +2 -2
@@ -11709,10 +125474,10 @@ ChangeSet@1.2060.1.21, 2009-10-27 05:47:37-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.230 +2 -2
NTP_4_2_5P238_RC
-ChangeSet@1.2060.7.3, 2009-10-26 22:25:38-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.8.3, 2009-10-26 22:25:38-05:00, stenn@whimsy.udel.edu
Changes from Dave Mills
- ChangeLog@1.506.1.3 +1 -0
+ ChangeLog@1.496.5.3 +1 -0
Changes from Dave Mills
ntpd/ntp_refclock.c@1.91 +1 -1
@@ -11721,29 +125486,29 @@ ChangeSet@1.2060.7.3, 2009-10-26 22:25:38-05:00, stenn@whimsy.udel.edu
ntpd/refclock_wwv.c@1.73 +0 -1
Changes from Dave Mills
-ChangeSet@1.2060.7.2, 2009-10-26 22:20:49-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.8.2, 2009-10-26 22:20:49-05:00, stenn@whimsy.udel.edu
driver4.html updates from Dave Mills
- ChangeLog@1.506.1.2 +1 -0
+ ChangeLog@1.496.5.2 +1 -0
driver4.html updates from Dave Mills
html/drivers/driver4.html@1.15 +2 -2
driver4.html updates from Dave Mills
-ChangeSet@1.2060.7.1, 2009-10-26 22:16:02-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.8.1, 2009-10-26 22:16:02-05:00, stenn@whimsy.udel.edu
PPSAPI Cleanup of ntpd/refclock_wwvb.c
- ChangeLog@1.506.1.1 +1 -0
+ ChangeLog@1.496.5.1 +1 -0
PPSAPI Cleanup of ntpd/refclock_wwvb.c
ntpd/refclock_wwvb.c@1.22 +73 -23
PPSAPI Cleanup of ntpd/refclock_wwvb.c
-ChangeSet@1.2060.1.19, 2009-10-27 00:16:02+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.15, 2009-10-27 00:16:02+00:00, davehart@shiny.ad.hartbrothers.com
Get rid of configure tests for __ss_family and __ss_len when the more
common ss_family and ss_len are present.
- ChangeLog@1.509 +2 -0
+ ChangeLog@1.496.1.13 +2 -0
Get rid of configure tests for __ss_family and __ss_len when the more
common ss_family and ss_len are present.
@@ -11755,14 +125520,14 @@ ChangeSet@1.2060.1.19, 2009-10-27 00:16:02+00:00, davehart@shiny.ad.hartbrothers
Get rid of configure tests for __ss_family and __ss_len when the more
common ss_family and ss_len are present.
-ChangeSet@1.2060.1.18, 2009-10-26 20:49:30+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.14, 2009-10-26 20:49:30+00:00, davehart@shiny.ad.hartbrothers.com
CIDs 94-99 make it more clearly impossible for sock_hash() to return
a negative number.
CID 105, 106 ensure ntpdc arrays are not overrun even if callers
misbehave.
CID 113 use va_end() in refclock_true.c true_debug().
- ChangeLog@1.508 +5 -0
+ ChangeLog@1.496.1.12 +5 -0
CIDs 94-99 make it more clearly impossible for sock_hash() to return
a negative number.
CID 105, 106 ensure ntpdc arrays are not overrun even if callers
@@ -11795,11 +125560,11 @@ ChangeSet@1.2060.1.18, 2009-10-26 20:49:30+00:00, davehart@shiny.ad.hartbrothers
CID 105, 106 -- ensure array are not overrun even if callers
misbehave
-ChangeSet@1.2060.1.16, 2009-10-26 05:45:09-05:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.12, 2009-10-26 05:45:09-05:00, stenn@whimsy.udel.edu
NTP_4_2_5P237_RC
TAG: NTP_4_2_5P237_RC
- ChangeLog@1.506 +1 -0
+ ChangeLog@1.496.1.10 +1 -0
NTP_4_2_5P237_RC
ntpd/ntpd-opts.c@1.231 +2 -2
@@ -11877,7 +125642,7 @@ ChangeSet@1.2060.1.16, 2009-10-26 05:45:09-05:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.229 +2 -2
NTP_4_2_5P237_RC
-ChangeSet@1.2060.6.1, 2009-10-25 11:25:16+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.7.1, 2009-10-25 11:25:16+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1355] ntp-dev won't compile on OpenBSD 4.6.
BitKeeper/deleted/.del-in.h~29080509@1.4 +0 -0
@@ -11892,7 +125657,7 @@ ChangeSet@1.2060.6.1, 2009-10-25 11:25:16+00:00, davehart@shiny.ad.hartbrothers.
BitKeeper/deleted/.del-socket.h~29080509@1.4 +0 -0
Rename: ports/winnt/include/sys/socket.h -> BitKeeper/deleted/.del-socket.h~29080509
- ChangeLog@1.503.2.1 +1 -0
+ ChangeLog@1.496.4.1 +1 -0
[Bug 1355] ntp-dev won't compile on OpenBSD 4.6.
include/Makefile.am@1.35.1.1 +1 -0
@@ -11968,23 +125733,23 @@ ChangeSet@1.2060.6.1, 2009-10-25 11:25:16+00:00, davehart@shiny.ad.hartbrothers.
misbehaves.
- ports/winnt/vc6/libntp.dsp@1.43.1.1 +1 -1
+ ports/winnt/vc6/libntp.dsp@1.43.2.1 +1 -1
move lib_strbuf.h from libntp to include
- ports/winnt/vs2003/libntp.vcproj@1.5 +1 -1
+ ports/winnt/vs2003/libntp.vcproj@1.4.1.1 +1 -1
move lib_strbuf.h from libntp to include
- ports/winnt/vs2005/libntp.vcproj@1.5 +1 -1
+ ports/winnt/vs2005/libntp.vcproj@1.4.1.1 +1 -1
move lib_strbuf.h from libntp to include
- ports/winnt/vs2008/libntp/libntp.vcproj@1.22 +1 -1
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.1.2 +1 -1
move lib_strbuf.h from libntp to include
util/ntp-keygen.c@1.59 +1 -9
require sys/types.h
remove old #ifdef SYS_WINNT related to ntp_getopt, ntp-keygen uses libopts
-ChangeSet@1.2060.5.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.6.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1354] libtool error building after bootstrap with Autoconf 2.64.
Allow NTP_VPATH_HACK configure test to handle newer gmake versions.
@@ -11994,7 +125759,7 @@ ChangeSet@1.2060.5.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.
BitKeeper/deleted/.del-ltmain.sh~2b9d9fc0af8c0735@1.2 +0 -0
Rename: ltmain.sh -> BitKeeper/deleted/.del-ltmain.sh~2b9d9fc0af8c0735
- ChangeLog@1.503.1.1 +2 -0
+ ChangeLog@1.496.3.1 +2 -0
[Bug 1354] libtool error building after bootstrap with Autoconf 2.64.
Allow NTP_VPATH_HACK configure test to handle newer gmake versions.
@@ -12017,10 +125782,10 @@ ChangeSet@1.2060.5.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.
ports/winnt/vc6/Instsrv.dsp@1.10 +0 -0
Turn off EOLN_NATIVE flag
- ports/winnt/vc6/libntp.dsp@1.45 +0 -0
+ ports/winnt/vc6/libntp.dsp@1.43.1.2 +0 -0
Turn on EOLN_WINDOWS flag
- ports/winnt/vc6/libntp.dsp@1.44 +0 -0
+ ports/winnt/vc6/libntp.dsp@1.43.1.1 +0 -0
Turn off EOLN_NATIVE flag
ports/winnt/vc6/ntp.dsw@1.11 +0 -0
@@ -12029,10 +125794,10 @@ ChangeSet@1.2060.5.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.
ports/winnt/vc6/ntp.dsw@1.10 +0 -0
Turn off EOLN_NATIVE flag
- ports/winnt/vc6/ntpd.dsp@1.41 +0 -0
+ ports/winnt/vc6/ntpd.dsp@1.39.1.2 +0 -0
Turn on EOLN_WINDOWS flag
- ports/winnt/vc6/ntpd.dsp@1.40 +0 -0
+ ports/winnt/vc6/ntpd.dsp@1.39.1.1 +0 -0
Turn off EOLN_NATIVE flag
ports/winnt/vc6/ntpdate.dsp@1.24 +0 -0
@@ -12068,11 +125833,11 @@ ChangeSet@1.2060.5.1, 2009-10-25 03:06:29+00:00, davehart@shiny.ad.hartbrothers.
sntp/configure.ac@1.23 +2 -0
use AC_CONFIG_MACRO_DIR() to keep m4 files in m4
-ChangeSet@1.2060.1.14, 2009-10-24 05:55:49+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.10, 2009-10-24 05:55:49+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 610] NMEA support for using PPSAPI on a different device.
[Bug 1238] use only fudge time2 to offset NMEA serial timestamp.
- ChangeLog@1.504 +2 -0
+ ChangeLog@1.496.1.8 +2 -0
[Bug 610] NMEA support for using PPSAPI on a different device.
[Bug 1238] use only fudge time2 to offset NMEA serial timestamp.
@@ -12086,7 +125851,7 @@ ChangeSet@1.2060.1.14, 2009-10-24 05:55:49+00:00, davehart@shiny.ad.hartbrothers
[Bug 610] NMEA support for using PPSAPI on a different device.
[Bug 1238] use only fudge time2 to offset NMEA serial timestamp.
-ChangeSet@1.2060.4.1, 2009-10-23 16:57:07+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.5.1, 2009-10-23 16:57:07+00:00, davehart@shiny.ad.hartbrothers.com
shrink 750 keyword scanner states from 64 to 32 bits apiece
ntpd/keyword-gen.c@1.2 +133 -18
@@ -12101,11 +125866,11 @@ ChangeSet@1.2060.4.1, 2009-10-23 16:57:07+00:00, davehart@shiny.ad.hartbrothers.
ntpd/ntp_scanner.h@1.14 +37 -10
shrink 750 keyword scanner states from 64 to 32 bits apiece
-ChangeSet@1.2060.1.13, 2009-10-22 06:47:25-04:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.9, 2009-10-22 06:47:25-04:00, stenn@whimsy.udel.edu
NTP_4_2_5P236_RC
TAG: NTP_4_2_5P236_RC
- ChangeLog@1.503 +1 -0
+ ChangeLog@1.496.1.7 +1 -0
NTP_4_2_5P236_RC
ntpd/ntpd-opts.c@1.230 +2 -2
@@ -12183,10 +125948,10 @@ ChangeSet@1.2060.1.13, 2009-10-22 06:47:25-04:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.228 +2 -2
NTP_4_2_5P236_RC
-ChangeSet@1.2060.1.12, 2009-10-22 05:02:37-04:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.8, 2009-10-22 05:02:37-04:00, stenn@whimsy.udel.edu
Cleanup from Dave Mills
- ChangeLog@1.502 +1 -0
+ ChangeLog@1.496.1.6 +1 -0
Cleanup from Dave Mills
html/authopt.html@1.53 +42 -9
@@ -12198,10 +125963,10 @@ ChangeSet@1.2060.1.12, 2009-10-22 05:02:37-04:00, stenn@whimsy.udel.edu
ntpd/ntp_loopfilter.c@1.151 +4 -5
Cleanup from Dave Mills
-ChangeSet@1.2060.3.1, 2009-10-21 21:59:17+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.4.1, 2009-10-21 21:59:17+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1353] ntpq "rv 0 settimeofday" always shows UNKNOWN on unix.
- ChangeLog@1.498.1.1 +1 -0
+ ChangeLog@1.496.2.1 +1 -0
[Bug 1353] ntpq "rv 0 settimeofday" always shows UNKNOWN on unix.
include/ntp_stdlib.h@1.34 +7 -1
@@ -12219,7 +125984,7 @@ ChangeSet@1.2060.3.1, 2009-10-21 21:59:17+00:00, davehart@shiny.ad.hartbrothers.
ports/winnt/ntpd/nt_clockstuff.c@1.37 +6 -0
[Bug 1353] ntpq "rv 0 settimeofday" always shows UNKNOWN on unix.
-ChangeSet@1.2060.1.10, 2009-10-21 15:38:30+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.6, 2009-10-21 15:38:30+00:00, davehart@shiny.ad.hartbrothers.com
configure.ac:
AC_FUNC_MALLOC is unneeded, breaks cross-compile with uClibc with
undefined references to rpl_malloc
@@ -12228,21 +125993,21 @@ ChangeSet@1.2060.1.10, 2009-10-21 15:38:30+00:00, davehart@shiny.ad.hartbrothers
AC_FUNC_MALLOC is unneeded, breaks cross-compile with uClibc with
undefined references to rpl_malloc
-ChangeSet@1.2060.1.9, 2009-10-21 04:27:03+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.5, 2009-10-21 04:27:03+00:00, davehart@shiny.ad.hartbrothers.com
configure.ac:
correct sa_len test butchered recently
configure.ac@1.459.1.3 +20 -2
correct sa_len test butchered recently
-ChangeSet@1.2060.1.8, 2009-10-20 17:47:04+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.4, 2009-10-20 17:47:04+00:00, davehart@shiny.ad.hartbrothers.com
Do not attempt to execute built binaries from ntpd/Makefile when
cross-compiling (keyword-gen and ntpd --saveconfigquit).
sntp/main.c: Remove duplicate global adr_buf[] (also defined in
networking.c) which Piotr Grudzinski identified breaking his build.
Correct in6addr_any test in configure.ac to attempt link too.
- ChangeLog@1.500 +5 -0
+ ChangeLog@1.496.1.4 +5 -0
Do not attempt to execute built binaries from ntpd/Makefile when
cross-compiling (keyword-gen and ntpd --saveconfigquit).
sntp/main.c: Remove duplicate global adr_buf[] (also defined in
@@ -12264,15 +126029,15 @@ ChangeSet@1.2060.1.8, 2009-10-20 17:47:04+00:00, davehart@shiny.ad.hartbrothers.
sntp/main.c: Remove duplicate global adr_buf[] (also defined in
networking.c) which Piotr Grudzinski identified breaking his build.
-ChangeSet@1.2060.1.7, 2009-10-19 17:23:04+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.3, 2009-10-19 17:23:04+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1343] ntpd/ntp_io.c close_fd() does not compile on Solaris 7.
Also includes similar fix to sntp/crypto.c identified on same machine.
- ChangeLog@1.499 +1 -0
+ ChangeLog@1.496.1.3 +1 -0
[Bug 1343] ntpd/ntp_io.c close_fd() does not compile on Solaris 7.
Also includes similar fix to sntp/crypto.c identified on same machine.
- ntpd/ntp_io.c@1.307 +4 -2
+ ntpd/ntp_io.c@1.306.1.1 +4 -2
move code after local variable declaration in move_fd() to cure
compiling with compilers that know the difference between C and C++
@@ -12280,11 +126045,11 @@ ChangeSet@1.2060.1.7, 2009-10-19 17:23:04+00:00, davehart@shiny.ad.hartbrothers.
move digest_data variable declaration ahead of code in auth_md5() for
compatibility with ANSI C.
-ChangeSet@1.2060.1.6, 2009-10-18 06:46:43-04:00, stenn@whimsy.udel.edu
+ChangeSet@1.2060.3.2, 2009-10-18 06:46:43-04:00, stenn@whimsy.udel.edu
NTP_4_2_5P235_RC
TAG: NTP_4_2_5P235_RC
- ChangeLog@1.498 +1 -0
+ ChangeLog@1.496.1.2 +1 -0
NTP_4_2_5P235_RC
ntpd/ntpd-opts.c@1.229 +2 -2
@@ -12362,10 +126127,10 @@ ChangeSet@1.2060.1.6, 2009-10-18 06:46:43-04:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.227 +2 -2
NTP_4_2_5P235_RC
-ChangeSet@1.2060.1.5, 2009-10-18 01:54:01+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2060.3.1, 2009-10-18 01:54:01+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1343] lib/isc build breaks on systems without IPv6 headers.
- ChangeLog@1.497 +1 -0
+ ChangeLog@1.496.1.1 +1 -0
[Bug 1343] lib/isc build breaks on systems without IPv6 headers.
configure.ac@1.459.1.1 +22 -23
@@ -12399,13 +126164,55 @@ ChangeSet@1.2060.1.5, 2009-10-18 01:54:01+00:00, davehart@shiny.ad.hartbrothers.
ntpdc/ntpdc_ops.c@1.59 +2 -2
[Bug 1343] lib/isc build breaks on systems without IPv6 headers.
- ports/winnt/vs2008/libntp/libntp.vcproj@1.21 +3 -3
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.20.1.1 +3 -3
correct isc/net.h path
sntp/configure.ac@1.20 +56 -21
libisc on systems without in_port_t wasn't compiling.
cache in_port_t test.
+ChangeSet@1.2060.1.5, 2009-10-16 21:00:05+00:00, davehart@shiny.ad.hartbrothers.com
+ [Bug 1348] ntpd Windows port should wait for sendto() completion.
+
+ BitKeeper/deleted/.del-transmitbuff.c~29080509@1.10 +0 -0
+ Delete: ports/winnt/libntp/transmitbuff.c
+
+ BitKeeper/deleted/.del-transmitbuff.h~29080509@1.9 +0 -0
+ Delete: ports/winnt/include/transmitbuff.h
+
+ ChangeLog@1.497 +1 -0
+ [Bug 1348] ntpd Windows port should wait for sendto() completion.
+
+ ntpd/ntp_io.c@1.307 +4 -5
+ [Bug 1348] ntpd Windows port should wait for sendto() completion.
+
+ ports/winnt/ntpd/ntp_iocompletionport.c@1.50 +65 -162
+ [Bug 1348] ntpd Windows port should wait for sendto() completion.
+
+ ports/winnt/vc6/libntp.dsp@1.44 +0 -8
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vc6/ntpd.dsp@1.40 +0 -4
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2003/libntp.vcproj@1.5 +0 -24
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2003/ntpd.vcproj@1.5 +0 -3
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2005/libntp.vcproj@1.5 +0 -26
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2005/ntpd.vcproj@1.5 +0 -4
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2008/libntp/libntp.vcproj@1.21 +1 -9
+ remove references to transmitbuff.[ch]
+
+ ports/winnt/vs2008/ntpd/ntpd.vcproj@1.22 +0 -4
+ remove references to transmitbuff.[ch]
+
ChangeSet@1.2060.1.4, 2009-10-16 06:48:28-04:00, stenn@whimsy.udel.edu
NTP_4_2_5P234_RC
TAG: NTP_4_2_5P234_RC
@@ -12774,7 +126581,7 @@ ChangeSet@1.2057, 2009-10-14 04:22:12-04:00, stenn@whimsy.udel.edu
util/ntp-keygen.1@1.224 +2 -2
NTP_4_2_5P232_RC
-ChangeSet@1.2050.5.1, 2009-10-13 23:48:18+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2050.6.1, 2009-10-13 23:48:18+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1341] NMEA driver requires working PPSAPI #ifdef HAVE_PPSAPI.
ChangeLog@1.482.5.1 +1 -0
@@ -12790,7 +126597,7 @@ ChangeSet@1.2050.5.1, 2009-10-13 23:48:18+00:00, davehart@shiny.ad.hartbrothers.
ntpd/refclock_nmea.c@1.44 +73 -22
[Bug 1341] NMEA driver requires working PPSAPI #ifdef HAVE_PPSAPI.
-ChangeSet@1.2050.4.1, 2009-10-13 02:24:57+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2050.5.1, 2009-10-13 02:24:57+00:00, davehart@shiny.ad.hartbrothers.com
Documentation updates for ntpq --oldrv, saveconfig, saveconfigdir,
ntpd -I -L and -M switches and interface/nic directive
@@ -12816,7 +126623,7 @@ ChangeSet@1.2050.4.1, 2009-10-13 02:24:57+00:00, davehart@shiny.ad.hartbrothers.
Update -L and -I docs to match HTML updates.
Expand -M docs.
-ChangeSet@1.2050.3.1, 2009-10-12 15:24:02+00:00, davehart@shiny.ad.hartbrothers.com
+ChangeSet@1.2050.4.1, 2009-10-12 15:24:02+00:00, davehart@shiny.ad.hartbrothers.com
[Bug 1339] Fix Windows-only ntp_strerror() infinite recursion.
ChangeLog@1.482.3.1 +1 -0
@@ -12834,6 +126641,12 @@ ChangeSet@1.2050.3.1, 2009-10-12 15:24:02+00:00, davehart@shiny.ad.hartbrothers.
ports/winnt/libntp/syslog.c@1.7 +4 -10
[Bug 1339] Fix Windows-only ntp_strerror() infinite recursion.
+ChangeSet@1.2050.3.1, 2009-10-12 04:48:04+00:00, davehart@shiny.ad.hartbrothers.com
+ better t column in peers/opeers using hmode peer variable
+
+ ntpq/ntpq-subs.c@1.40 +86 -53
+ better t column in peers/opeers using hmode peer variable
+
ChangeSet@1.2050.1.2, 2009-10-12 03:40:08+00:00, kardel@pogo.udel.edu
ntp_io.c, ChangeLog:
cast address pointer to void * for bug 1337
diff --git a/FREEBSD-Xlist b/FREEBSD-Xlist
deleted file mode 100644
index 0313aa098b04..000000000000
--- a/FREEBSD-Xlist
+++ /dev/null
@@ -1,3 +0,0 @@
-*ports
-*html/pic
-*ElectricFence
diff --git a/FREEBSD-upgrade b/FREEBSD-upgrade
deleted file mode 100644
index f3386c833515..000000000000
--- a/FREEBSD-upgrade
+++ /dev/null
@@ -1,64 +0,0 @@
-# ex:ts=8
-#
-# $FreeBSD$
-
-NTP 4.2.4p5
- originals can be found on http://www.ntp.org/downloads.html
-
-Import
-------
-
-For the import of NTP the following files were removed:
-
- ports/* NT files
- html/pic/* GIF files
- ElectricFence/* Support for the ElectricFence library
- (only useful if you want to debug ntpd)
- html/build/hints/solaris.xtra.4095849 Trigger merge conflict script
-
-The stripped down version was created using FREEBSD-Xlist during extraction:
-
- tar -X FREEBSD-Xlist -xvzf ntp-4.2.4p5.tar.gz
- mv ntp-4.2.4p5 4.2.4p5
-
-Imported by:
- See procedure on http://wiki.freebsd.org/SubversionPrimer/VendorImports
-
-Updating usr.sbin/ntp
----------------------
-
-./configure --disable-all-clocks --enable-NMEA --enable-ONCORE
---enable-RAWDCF --with-crypto --disable-debugging
---enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr
-
-config.h was generated by running configure and excluding almost all clock
-drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE
-and local clocks).
-
-The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we
-need to set no parity on the serial port (needed for DCF77). All clock
-drivers are then disabled (some of them are included by default by ntpd).
-
-Note that there are two #ifdef to support other architectures (WRT to long
-size and endianness). They'll need to be redone for each upgrade to the
-vendor branch to keep config.h in sync.
-
-ntpd/ntp_control.c is now the only file that is different from the vendor
-branch for unsigned char/int fixes and removal of a DoS.
-
-Documentation in /usr/share/doc/ntp is generated from the HTML files with
-lynx (without the GIF files of course).
-
-One patch needs to be applied after that to close two buffer overflows. See
-bin/92839 for details.
-
-A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and
-filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed
-or re-apply on update.
-
-A patch to fix badhost sendto() logging was committed to head as r223626.
-The patch is not applicable to later upstream versions.
-
-A patch to fix various problems in case of fqdn resolving fails on
-startup was committed to head as r223667. The patch is not applicable
-to later upstream versions.
diff --git a/Makefile.am b/Makefile.am
index 02a66f7ac822..2908f96cd037 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,36 +1,12 @@
-## LIBOPTS_CHECK_NOBUILD works with Automake 1.10 now
-AUTOMAKE_OPTIONS = foreign 1.10
-ACLOCAL_AMFLAGS = -I m4 -I sntp/libopts/m4
+ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL =
-SUBDIRS =
-SUBDIRS += \
- scripts \
- include \
- ElectricFence \
- libntp \
- sntp \
- libparse \
- ntpd \
- ntpdate \
- ntpdc \
- ntpq \
- ntpsnmpd \
- parseutil \
- adjtimed \
- clockstuff \
- kernel \
- util \
- $(NULL)
-
-DIST_SUBDIRS = \
+SUBDIRS = \
scripts \
include \
- ElectricFence \
libntp \
libparse \
- sntp \
ntpd \
ntpdate \
ntpdc \
@@ -41,9 +17,11 @@ DIST_SUBDIRS = \
clockstuff \
kernel \
util \
+ sntp \
+ tests \
$(NULL)
-DISTCHECK_CONFIGURE_FLAGS = -C
+DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
@@ -61,13 +39,9 @@ EXTRA_DIST = \
WHERE-TO-START \
bootstrap \
build \
- config.guess \
config.h.in \
- config.sub \
dot.emacs \
- excludes \
flock-build \
- install-sh \
packageinfo.sh \
readme.y2kfixes \
results.y2kfixes \
@@ -75,33 +49,48 @@ EXTRA_DIST = \
conf \
html \
lib/isc \
+ libjsmn \
ports \
\
- bincheck.mf \
- depsver.mf \
deps-ver \
- $(srcdir)/version \
- version.m4 \
\
$(NULL)
CLEANFILES =
DISTCLEANFILES = .gcc-warning
-ETAGS_ARGS = Makefile.am configure.ac
-
# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES = \
.gcc-warning \
libtool \
+ html/.datecheck \
+ sntp/built-sources-only \
$(srcdir)/COPYRIGHT \
- $(srcdir)/version \
- $(srcdir)/version.m4 \
- $(srcdir)/include/version.def \
- $(srcdir)/include/version.texi \
$(srcdir)/.checkChangeLog \
$(NULL)
+.gcc-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 $@
+
+html/.datecheck: FRC.html
+ cd $(srcdir)/html && \
+ ../scripts/build/checkHtmlFileDates
+
+libtool: $(LIBTOOL_DEPS)
+ ./config.status --recheck
+
+sntp/built-sources-only: FRC.sntp
+ @cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
+
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
{ echo "This file is automatically generated from html/copyright.html" ; \
lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
@@ -115,61 +104,31 @@ COPYRIGHT-please: $(srcdir)/COPYRIGHT
Rather than determine our $(srcdir) from sntp/Makefile.am \
COPYRIGHT-please serves as a fixed target.
-# 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
-
-$(srcdir)/version.m4: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver version.m4
-
-$(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver include/version.def
-
-$(srcdir)/include/version.texi: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver include/version.texi
-
-$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/checkChangeLog
+$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
cd $(srcdir) && \
- ./scripts/checkChangeLog
-
-libtool: $(LIBTOOL_DEPS)
- ./config.status --recheck
+ ./scripts/build/checkChangeLog
dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
-.gcc-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 $@
+install-data-local:
+ ( cd $(srcdir) && find html -name SCCS -prune -o -type d \
+ -exec $(INSTALL) -d $(DESTDIR)$(htmldir)/{} ";" )
+ ( cd $(srcdir) && find html -name SCCS -prune -o -type f \
+ -exec $(INSTALL_DATA) {} $(DESTDIR)$(htmldir)/{} ";" )
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(htmldir)/html
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& $(PATH_TEST) -e CommitLog \
-a SCCS/s.ChangeSet -ot CommitLog \
- || scripts/genCommitLog
+ || scripts/build/genCommitLog
# HMS: The following seems to be a work-in-progress...
-CVO=`$(srcdir)/config.guess`
+CVO=`$(srcdir)/sntp/libevent/build-aux/config.guess`
.buildcvo:
echo "$(CVO)" > .buildcvo
@@ -192,7 +151,7 @@ BHOST=`(hostname || uname -n)`
echo " "; \
fi
-FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
+FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
@: do-nothing action prevents any default
# HMS: what was I trying to do with this?
diff --git a/Makefile.in b/Makefile.in
index 0fe79e359aa2..4746db9c93b3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -38,19 +38,50 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ChangeLog INSTALL NEWS TODO compile \
config.guess config.sub depcomp install-sh ltmain.sh missing \
+ sntp/libevent/build-aux/compile \
+ sntp/libevent/build-aux/config.guess \
+ sntp/libevent/build-aux/config.sub \
+ sntp/libevent/build-aux/depcomp \
+ sntp/libevent/build-aux/install-sh \
+ sntp/libevent/build-aux/ltmain.sh \
+ sntp/libevent/build-aux/missing sntp/libevent/build-aux/ylwrap \
ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -59,6 +90,12 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -75,6 +112,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -112,20 +150,32 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -137,21 +187,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -159,6 +219,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -177,14 +238,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -197,10 +312,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -208,9 +325,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -219,6 +354,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -266,19 +402,13 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign 1.10
-ACLOCAL_AMFLAGS = -I m4 -I sntp/libopts/m4
+ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL =
-SUBDIRS = scripts include ElectricFence libntp sntp libparse ntpd \
- ntpdate ntpdc ntpq ntpsnmpd parseutil adjtimed clockstuff \
- kernel util $(NULL)
-DIST_SUBDIRS = \
+SUBDIRS = \
scripts \
include \
- ElectricFence \
libntp \
libparse \
- sntp \
ntpd \
ntpdate \
ntpdc \
@@ -289,9 +419,11 @@ DIST_SUBDIRS = \
clockstuff \
kernel \
util \
+ sntp \
+ tests \
$(NULL)
-DISTCHECK_CONFIGURE_FLAGS = -C
+DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
ChangeLog \
@@ -308,13 +440,9 @@ EXTRA_DIST = \
WHERE-TO-START \
bootstrap \
build \
- config.guess \
config.h.in \
- config.sub \
dot.emacs \
- excludes \
flock-build \
- install-sh \
packageinfo.sh \
readme.y2kfixes \
results.y2kfixes \
@@ -322,35 +450,29 @@ EXTRA_DIST = \
conf \
html \
lib/isc \
+ libjsmn \
ports \
\
- bincheck.mf \
- depsver.mf \
deps-ver \
- $(srcdir)/version \
- version.m4 \
\
$(NULL)
CLEANFILES =
DISTCLEANFILES = .gcc-warning
-ETAGS_ARGS = Makefile.am configure.ac
# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES = \
.gcc-warning \
libtool \
+ html/.datecheck \
+ sntp/built-sources-only \
$(srcdir)/COPYRIGHT \
- $(srcdir)/version \
- $(srcdir)/version.m4 \
- $(srcdir)/include/version.def \
- $(srcdir)/include/version.texi \
$(srcdir)/.checkChangeLog \
$(NULL)
# HMS: The following seems to be a work-in-progress...
-CVO = `$(srcdir)/config.guess`
+CVO = `$(srcdir)/sntp/libevent/build-aux/config.guess`
BHOST = `(hostname || uname -n)`
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -787,7 +909,7 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-data-local
install-dvi: install-dvi-recursive
@@ -833,7 +955,7 @@ ps: ps-recursive
ps-am:
-uninstall-am:
+uninstall-am: uninstall-local
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
@@ -846,15 +968,38 @@ uninstall-am:
dist-zip distcheck distclean distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am tags tags-recursive uninstall uninstall-am
+ install install-am install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-local
+
+
+.gcc-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 $@
+
+html/.datecheck: FRC.html
+ cd $(srcdir)/html && \
+ ../scripts/build/checkHtmlFileDates
+
+libtool: $(LIBTOOL_DEPS)
+ ./config.status --recheck
+sntp/built-sources-only: FRC.sntp
+ @cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
{ echo "This file is automatically generated from html/copyright.html" ; \
@@ -869,57 +1014,27 @@ COPYRIGHT-please: $(srcdir)/COPYRIGHT
Rather than determine our $(srcdir) from sntp/Makefile.am \
COPYRIGHT-please serves as a fixed target.
-# 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
-
-$(srcdir)/version.m4: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver version.m4
-
-$(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver include/version.def
-
-$(srcdir)/include/version.texi: $(srcdir)/packageinfo.sh
- TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
- ./scripts/genver include/version.texi
-
-$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/checkChangeLog
+$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
cd $(srcdir) && \
- ./scripts/checkChangeLog
-
-libtool: $(LIBTOOL_DEPS)
- ./config.status --recheck
+ ./scripts/build/checkChangeLog
dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
-.gcc-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 $@
+install-data-local:
+ ( cd $(srcdir) && find html -name SCCS -prune -o -type d \
+ -exec $(INSTALL) -d $(DESTDIR)$(htmldir)/{} ";" )
+ ( cd $(srcdir) && find html -name SCCS -prune -o -type f \
+ -exec $(INSTALL_DATA) {} $(DESTDIR)$(htmldir)/{} ";" )
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(htmldir)/html
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& $(PATH_TEST) -e CommitLog \
-a SCCS/s.ChangeSet -ot CommitLog \
- || scripts/genCommitLog
+ || scripts/build/genCommitLog
.buildcvo:
echo "$(CVO)" > .buildcvo
@@ -940,7 +1055,7 @@ CommitLog: FRC.CommitLog
echo " "; \
fi
-FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
+FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
@: do-nothing action prevents any default
# HMS: what was I trying to do with this?
diff --git a/NEWS b/NEWS
index eb0a53ac621f..efd488f302b3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,187 @@
+---
+NTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
+
+Focus: Security and Bug fixes, enhancements.
+
+Severity: HIGH
+
+In addition to bug fixes and enhancements, this release fixes the
+following high-severity vulnerabilities:
+
+* Weak default key in config_auth().
+
+ References: [Sec 2665] / CVE-2014-9293 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: all releases prior to 4.2.7p11
+ Date Resolved: 28 Jan 2010
+
+ Summary: If no 'auth' key is set in the configuration file, ntpd
+ would generate a random key on the fly. There were two
+ problems with this: 1) the generated key was 31 bits in size,
+ and 2) it used the (now weak) ntp_random() function, which was
+ seeded with a 32-bit value and could only provide 32 bits of
+ entropy. This was sufficient back in the late 1990s when the
+ code was written. Not today.
+
+ Mitigation: Upgrade to 4.2.7p11 or later.
+
+ Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
+ of the Google Security Team.
+
+* Non-cryptographic random number generator with weak seed used by
+ ntp-keygen to generate symmetric keys.
+
+ References: [Sec 2666] / CVE-2014-9294 / VU#852879
+ CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
+ Vulnerable Versions: All NTP4 releases before 4.2.7p230
+ Date Resolved: Dev (4.2.7p230) 01 Nov 2011
+
+ Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
+ prepare a random number generator that was of good quality back
+ in the late 1990s. The random numbers produced was then used to
+ generate symmetric keys. In ntp-4.2.8 we use a current-technology
+ cryptographic random number generator, either RAND_bytes from
+ OpenSSL, or arc4random().
+
+ Mitigation: Upgrade to 4.2.7p230 or later.
+
+ Credit: This vulnerability was discovered in ntp-4.2.6 by
+ Stephen Roettger of the Google Security Team.
+
+* Buffer overflow in crypto_recv()
+
+ References: Sec 2667 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
+ file contains a 'crypto pw ...' directive) a remote attacker
+ can send a carefully crafted packet that can overflow a stack
+ buffer and potentially allow malicious code to be executed
+ with the privilege level of the ntpd process.
+
+ Mitigation: Upgrade to 4.2.8, or later, or
+ Disable Autokey Authentication by removing, or commenting out,
+ all configuration directives beginning with the crypto keyword
+ in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in ctl_putdata()
+
+ References: Sec 2668 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation: Upgrade to 4.2.8, or later.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* Buffer overflow in configure()
+
+ References: Sec 2669 / CVE-2014-9295 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: A remote attacker can send a carefully crafted packet that
+ can overflow a stack buffer and potentially allow malicious
+ code to be executed with the privilege level of the ntpd process.
+
+ Mitigation: Upgrade to 4.2.8, or later.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+* receive(): missing return on error
+
+ References: Sec 2670 / CVE-2014-9296 / VU#852879
+ CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
+ Versions: All NTP4 releases before 4.2.8
+ Date Resolved: Stable (4.2.8) 18 Dec 2014
+
+ Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
+ the code path where an error was detected, which meant
+ processing did not stop when a specific rare error occurred.
+ We haven't found a way for this bug to affect system integrity.
+ If there is no way to affect system integrity the base CVSS
+ score for this bug is 0. If there is one avenue through which
+ system integrity can be partially affected, the base score
+ becomes a 5. If system integrity can be partially affected
+ via all three integrity metrics, the CVSS base score become 7.5.
+
+ Mitigation:
+ Upgrade to 4.2.8, or later,
+ or Remove or comment out all configuration directives
+ beginning with the crypto keyword in your ntp.conf file.
+
+ Credit: This vulnerability was discovered by Stephen Roettger of the
+ Google Security Team.
+
+See http://support.ntp.org/security for more information.
+
+New features / changes in this release:
+
+Important Changes
+
+* Internal NTP Era counters
+
+The internal counters that track the "era" (range of years) we are in
+rolls over every 136 years'. The current "era" started at the stroke of
+midnight on 1 Jan 1900, and ends just before the stroke of midnight on
+1 Jan 2036.
+In the past, we have used the "midpoint" of the range to decide which
+era we were in. Given the longevity of some products, it became clear
+that it would be more functional to "look back" less, and "look forward"
+more. We now compile a timestamp into the ntpd executable and when we
+get a timestamp we us the "built-on" to tell us what era we are in.
+This check "looks back" 10 years, and "looks forward" 126 years.
+
+* ntpdc responses disabled by default
+
+Dave Hart writes:
+
+For a long time, ntpq and its mostly text-based mode 6 (control)
+protocol have been preferred over ntpdc and its mode 7 (private
+request) protocol for runtime queries and configuration. There has
+been a goal of deprecating ntpdc, previously held back by numerous
+capabilities exposed by ntpdc with no ntpq equivalent. I have been
+adding commands to ntpq to cover these cases, and I believe I've
+covered them all, though I've not compared command-by-command
+recently.
+
+As I've said previously, the binary mode 7 protocol involves a lot of
+hand-rolled structure layout and byte-swapping code in both ntpd and
+ntpdc which is hard to get right. As ntpd grows and changes, the
+changes are difficult to expose via ntpdc while maintaining forward
+and backward compatibility between ntpdc and ntpd. In contrast,
+ntpq's text-based, label=value approach involves more code reuse and
+allows compatible changes without extra work in most cases.
+
+Mode 7 has always been defined as vendor/implementation-specific while
+mode 6 is described in RFC 1305 and intended to be open to interoperate
+with other implementations. There is an early draft of an updated
+mode 6 description that likely will join the other NTPv4 RFCs
+eventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
+
+For these reasons, ntpd 4.2.7p230 by default disables processing of
+ntpdc queries, reducing ntpd's attack surface and functionally
+deprecating ntpdc. If you are in the habit of using ntpdc for certain
+operations, please try the ntpq equivalent. If there's no equivalent,
+please open a bug report at http://bugs.ntp.org./
+
+In addition to the above, over 1100 issues have been resolved between
+the 4.2.6 branch and 4.2.8. The ChangeLog file in the distribution
+lists these.
+
---
NTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
diff --git a/WHERE-TO-START b/WHERE-TO-START
index 1a7c317acace..74d376e43c8f 100644
--- a/WHERE-TO-START
+++ b/WHERE-TO-START
@@ -35,7 +35,8 @@ 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://huey.udel.edu/pub/ntp/testing/>.
+please visit http://support.ntp.org/downloads and look for RC and/or
+Development tarballs.
David L. Mills (mills@udel.edu)
21 June 1998
diff --git a/aclocal.m4 b/aclocal.m4
index 185471dcd0e7..c82bc094c180 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -19,6 +19,125 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# serial 9 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2010 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -406,18 +525,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# 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.
-
-# serial 8
-
-# 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 -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -853,6 +960,33 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
+# Copyright (C) 2009 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.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -997,15 +1131,36 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([sntp/libopts/m4/libopts.m4])
-m4_include([m4/define_dir.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
-m4_include([m4/ntp_cacheversion.m4])
-m4_include([m4/ntp_dir_sep.m4])
-m4_include([m4/ntp_lineeditlibs.m4])
-m4_include([m4/ntp_openssl.m4])
-m4_include([m4/ntp_vpathhack.m4])
-m4_include([m4/os_cflags.m4])
+m4_include([sntp/libopts/m4/stdnoreturn.m4])
+m4_include([sntp/libevent/m4/openldap-thread-check.m4])
+m4_include([sntp/libevent/m4/openldap.m4])
+m4_include([sntp/m4/define_dir.m4])
+m4_include([sntp/m4/hms_search_lib.m4])
+m4_include([sntp/m4/libtool.m4])
+m4_include([sntp/m4/ltoptions.m4])
+m4_include([sntp/m4/ltsugar.m4])
+m4_include([sntp/m4/ltversion.m4])
+m4_include([sntp/m4/lt~obsolete.m4])
+m4_include([sntp/m4/ntp_cacheversion.m4])
+m4_include([sntp/m4/ntp_compiler.m4])
+m4_include([sntp/m4/ntp_crosscompile.m4])
+m4_include([sntp/m4/ntp_crypto_rand.m4])
+m4_include([sntp/m4/ntp_debug.m4])
+m4_include([sntp/m4/ntp_dir_sep.m4])
+m4_include([sntp/m4/ntp_facilitynames.m4])
+m4_include([sntp/m4/ntp_googletest.m4])
+m4_include([sntp/m4/ntp_ipv6.m4])
+m4_include([sntp/m4/ntp_lib_m.m4])
+m4_include([sntp/m4/ntp_libevent.m4])
+m4_include([sntp/m4/ntp_libntp.m4])
+m4_include([sntp/m4/ntp_lineeditlibs.m4])
+m4_include([sntp/m4/ntp_locinfo.m4])
+m4_include([sntp/m4/ntp_openssl.m4])
+m4_include([sntp/m4/ntp_pkg_config.m4])
+m4_include([sntp/m4/ntp_prog_cc.m4])
+m4_include([sntp/m4/ntp_rlimit.m4])
+m4_include([sntp/m4/ntp_sntp.m4])
+m4_include([sntp/m4/ntp_ver_suffix.m4])
+m4_include([sntp/m4/ntp_vpathhack.m4])
+m4_include([sntp/m4/os_cflags.m4])
+m4_include([sntp/m4/snprintf.m4])
diff --git a/adjtimed/Makefile.am b/adjtimed/Makefile.am
index c97a08a7dfa5..b603fed92428 100644
--- a/adjtimed/Makefile.am
+++ b/adjtimed/Makefile.am
@@ -1,17 +1,21 @@
-AUTOMAKE_OPTIONS=
+## adjtimed Makefile.am
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= @MAKE_ADJTIMED@
-else
-sbin_PROGRAMS= @MAKE_ADJTIMED@
-endif
+bin_PROGRAMS = $(ADJTIMED_DB)
+libexec_PROGRAMS = $(ADJTIMED_DL)
+sbin_PROGRAMS = $(ADJTIMED_DS)
-BUILT_SOURCES=
-CLEANFILES=
-EXTRA_PROGRAMS= adjtimed
-AM_CPPFLAGS= -I$(top_srcdir)/include
-LDADD= ../libntp/libntp.a
-ETAGS_ARGS= Makefile.am
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_PROGRAMS = adjtimed
+
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/adjtimed/Makefile.in b/adjtimed/Makefile.in
index 1198743db038..b1b441721b8c 100644
--- a/adjtimed/Makefile.in
+++ b/adjtimed/Makefile.in
@@ -38,67 +38,126 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+bin_PROGRAMS =
+libexec_PROGRAMS =
+sbin_PROGRAMS =
EXTRA_PROGRAMS = adjtimed$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf
subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
adjtimed_SOURCES = adjtimed.c
adjtimed_OBJECTS = adjtimed.$(OBJEXT)
adjtimed_LDADD = $(LDADD)
-adjtimed_DEPENDENCIES = ../libntp/libntp.a
+am__DEPENDENCIES_1 =
+adjtimed_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = adjtimed.c
DIST_SOURCES = adjtimed.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -110,21 +169,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -132,6 +201,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -150,14 +220,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -170,10 +294,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -181,9 +307,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -192,6 +336,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -239,20 +384,20 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS =
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = @MAKE_ADJTIMED@
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = @MAKE_ADJTIMED@
-BUILT_SOURCES = .deps-ver
-CLEANFILES = .deps-ver
-AM_CPPFLAGS = -I$(top_srcdir)/include
-LDADD = ../libntp/libntp.a
-ETAGS_ARGS = Makefile.am
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -325,6 +470,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -370,7 +558,7 @@ clean-sbinPROGRAMS:
rm -f $$list
adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
@rm -f adjtimed$(EXEEXT)
- $(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -381,22 +569,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -494,7 +685,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -527,8 +718,8 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -554,7 +745,8 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -595,44 +787,54 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
+ uninstall-sbinPROGRAMS
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-sbinPROGRAMS
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-info install-info-am \
+ install-libexecPROGRAMS install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinPROGRAMS install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -641,17 +843,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -660,7 +855,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/bincheck.mf b/bincheck.mf
index 326b7adedf6a..67f461f8cb36 100644
--- a/bincheck.mf
+++ b/bincheck.mf
@@ -3,13 +3,15 @@
# subdir to warn folks if there is another version there.
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
diff --git a/bootstrap b/bootstrap
index 01e36d35cb8c..2368af3a6445 100755
--- a/bootstrap
+++ b/bootstrap
@@ -29,7 +29,8 @@
set -e
-scripts/genver || { echo scripts/genver failed ; exit 1; }
+(cd sntp && ../scripts/build/genver) || {
+ echo scripts/build/genver failed ; exit 1; }
# autoreconf says:
# The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
@@ -37,17 +38,17 @@ scripts/genver || { echo scripts/genver failed ; exit 1; }
AUTORECONF=${AUTORECONF:-autoreconf}
-case `hostname` in
- pogo.udel.edu)
- if fgrep -q 4.2.4 version.m4; then
- AUTOCONF=autoconf-2.59
- AUTOHEADER=autoheader-2.59
- AUTOMAKE=automake-1.9
- ACLOCAL=aclocal-1.9
- export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
- fi
- ;;
-esac
+# case `hostname` in
+# pogo.udel.edu)
+# if fgrep -q 4.2.4 sntp/m4/version.m4; then
+# AUTOCONF=autoconf-2.59
+# AUTOHEADER=autoheader-2.59
+# AUTOMAKE=automake-1.9
+# ACLOCAL=aclocal-1.9
+# export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
+# fi
+# ;;
+# esac
# 20060629: HMS: Let's try checking in libopts and the autogen-generated files
## The copy for ntp...
@@ -80,22 +81,23 @@ prog_opt_files=`grep -l '^prog.name' $def_files`
## Non-AutoGen stuff
-for i in autogen-version.def version.def version.texi
-do
- cmp -s include/$i sntp/$i || cp -fp include/$i sntp/$i
-done
-
# touch the stuff generated by the opt files
+l=
+lh=
+li=
for f in ${prog_opt_files}
do
- f=`echo $f | sed -e 's/-opts.def//'`
- l=
- lh=
- for i in `ls -1 $f*`
+ f=`echo $f | sed -e 's/-opts.def//' -e 's/.def//'`
+ dfi=`dirname $f`
+ dfi=`echo $dfi | sed -e 's:$:/invoke-*:'`
+ for i in `ls -1 $f* $dfi`
do
case "$i" in
- *.c|*.h|*.1|*.texi|*.menu)
+ *invoke-*)
+ li="$li $i"
+ ;;
+ *.c|*.h|*.[1-9]*man|*.[1-9]*mdoc|*.man.in|*.mdoc.in|*-opts|*.texi|*.menu)
l="$l $i"
;;
*.html)
@@ -103,12 +105,27 @@ do
;;
esac
done
- case "$l:$lh" in
- ':') ;;
- *) touch $l $lh
- ;;
- esac
done
+case "$l" in
+ '') ;;
+ *) touch $l
+ echo "Touching <$l>"
+ sleep 1
+ ;;
+esac
+case "$li" in
+ '') ;;
+ *) touch $li
+ echo "Touching <$li>"
+ sleep 1
+ ;;
+esac
+case "$lh" in
+ '') ;;
+ *) touch $lh
+ echo "Touching <$lh>"
+ ;;
+esac
## EOAutoGen stuff
@@ -122,8 +139,23 @@ touch ntpd/ntp_parser.[ch] ntpd/keyword-gen-utd ntpd/ntp_keyword.h
cp bincheck.mf sntp/
cp depsver.mf sntp/
-${AUTORECONF} -i -v --no-recursive "$@"
+${AUTORECONF} -i -v "$@"
+
+# Because some systems do not support 'test a -nt b'
+case `ls -1tr config.h.in aclocal.m4 | tail -1` in
+ aclocal.m4) touch config.h.in ;;
+esac
+case `ls -1tr sntp/config.h.in sntp/aclocal.m4 | tail -1` in
+ sntp/aclocal.m4) touch sntp/config.h.in ;;
+esac
+case `ls -1tr sntp/libevent/config.h.in sntp/libevent/aclocal.m4 | tail -1` in
+ sntp/libevent/aclocal.m4) touch sntp/libevent/config.h.in ;;
+esac
+# DH: 20110118: Due to our workaround for the AM_COND_IF bug that was
+# triggering the buggy recursive autoreconf, we can once again use a
+# single autoreconf invocation. See
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7860
# DH: 20101120: We are back to a single copy of libopts, and
# once again it seems we need to run autoreconf in sntp after
# the top-level run to get a correct sntp/libopts/Makefile.in.
@@ -136,4 +168,4 @@ ${AUTORECONF} -i -v --no-recursive "$@"
## we get the correct srcdir path in sntp/libopts/Makefile.in
#rm -rf sntp/autom4te.cache
#
-(cd sntp && ${AUTORECONF} -i -v "$@")
+# (cd sntp && ${AUTORECONF} -i -v "$@")
diff --git a/build b/build
index 18e223c7adf2..bfe62770803d 100755
--- a/build
+++ b/build
@@ -30,18 +30,21 @@ esac
#set -e
#set -x
-# scripts/cvo.sh invokes config.guess, and we want it to use the copy
-# in the top directory (alongside build) if there's not another
-# config.guess earlier on the path, so we invoke it using env to append
-# . to the PATH.
+if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
+ echo "Error: bootstrap required." 1>&2 && exit 1
+fi
+
+# sntp/scripts/cvo.sh invokes config.guess, and we want it to use the copy
+# in the build-aux directory if there's not another config.guess earlier
+# on the path, so we invoke it using env to append to the PATH.
-CVO=`env PATH="$PATH:." scripts/cvo.sh @cvo@`
+CVO=`env PATH="$PATH:./sntp/libevent/build-aux" sntp/scripts/cvo.sh @cvo@`
case "$CVO" in
- *-*-*-*) echo "scripts/cvo.sh returned <$CVO>, which makes no sense to me."
+ *-*-*-*) echo "sntp/scripts/cvo.sh returned <$CVO>, which makes no sense to me."
exit 1
;;
*-*-*) ;;
- *) echo "scripts/cvo.sh returned <$CVO>, which makes no sense to me."
+ *) echo "sntp/scripts/cvo.sh returned <$CVO>, which makes no sense to me."
exit 1
;;
esac
@@ -114,7 +117,7 @@ case "$CC" in
;;
esac
-BDIR="$BASEDIR$KEYSUF$CCSUF"
+ BDIR="$BASEDIR$KEYSUF$CCSUF"
[ -d "$BDIR" ] || mkdir $BDIR
[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
@@ -159,20 +162,28 @@ if [ -z "$TEST" ] ; then
fi
fi
-CONFIGURE="../configure --cache-file=../config.cache-$IAM$CCSUF $CONFIG_ARGS"
+CONFIGURE="../configure --cache-file=../config.cache-$IAM$KEYSUF$CCSUF $CONFIG_ARGS"
( # This sequence of commands is logged to make.log.
# If config.status is newer than ../configure, and the same
# is true for sntp, we do not need to re-run configure.
+ # For libevent, the twist is we may not be configuring the
+ # tearoff, so only act if its config.status exists.
# Solaris /bin/sh doesn't grok -nt.
( "$TEST" config.status -nt ../configure &&
- $TEST sntp/config.status -nt ../sntp/configure ) ||
+ "$TEST" sntp/config.status -nt ../sntp/configure &&
+ ( "$TEST" '!' -f sntp/libevent/config.status ||
+ "$TEST" sntp/libevent/config.status -nt ../sntp/libevent/configure ) ) ||
"$NICEB" -7 $CONFIGURE
- "$NICEB" -5 ./config.status &&
- ( cd sntp && "$NICEB" -5 ./config.status ) &&
- "$NICEB" -14 ${MAKE-make} &&
- "$NICEB" -11 ${MAKE-make} check
+ "$TEST" Makefile -nt config.status ||
+ "$NICEB" -5 ./config.status
+ "$TEST" sntp/Makefile -nt sntp/config.status ||
+ ( cd sntp && "$NICEB" -5 ./config.status )
+ "$TEST" '!' -f sntp/libevent/Makefile ||
+ "$TEST" sntp/libevent/Makefile -nt sntp/libevent/config.status ||
+ ( cd sntp/libevent && "$NICEB" -5 ./config.status )
+ "$NICEB" -14 ${MAKE-make} && "$NICEB" -11 ${MAKE-make} check
) > $LOGF 2>&1
EXITCODE=$?
diff --git a/check-libopts.mf b/check-libopts.mf
new file mode 100644
index 000000000000..9f9b9e075f3f
--- /dev/null
+++ b/check-libopts.mf
@@ -0,0 +1,14 @@
+## check-libopts.mf - automake fragment
+##
+## If we are not using the tearoff libopts, we won't be
+## building its libopts.la, so the submake is allowed
+## to fail.
+
+BUILT_SOURCES += check-libopts
+CLEANFILES += check-libopts
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
diff --git a/clockstuff/Makefile.am b/clockstuff/Makefile.am
index 7521678619ec..d909fbf61331 100644
--- a/clockstuff/Makefile.am
+++ b/clockstuff/Makefile.am
@@ -1,22 +1,17 @@
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
-EXTRA_PROGRAMS = propdelay chutest clktest
+noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@
+EXTRA_PROGRAMS = propdelay chutest
-INCLUDES = -I$(top_srcdir)/include
-# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
-propdelay_LDADD = -lm ../libntp/libntp.a
-chutest_LDADD = ../libntp/libntp.a
-clktest_LDADD = ../libntp/libntp.a
-ETAGS_ARGS = Makefile.am
-#EXTRA_DIST = TAGS
-BUILT_SOURCES =
-CLEANFILES =
+AM_CFLAGS = $(CFLAGS_NTP)
-# clktest-opts.def wants ../include/copyright.def ../include/homerc.def
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
-chutest$(EXEEXT): ../libntp/libntp.a
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+propdelay_LDADD = $(LDADD)
-clktest$(EXEEXT): ../libntp/libntp.a
+BUILT_SOURCES =
+CLEANFILES =
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/clockstuff/Makefile.in b/clockstuff/Makefile.in
index f7d3bfb17ca6..27f3ee748242 100644
--- a/clockstuff/Makefile.in
+++ b/clockstuff/Makefile.in
@@ -34,22 +34,47 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT) clktest$(EXEEXT)
+EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf
subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -59,46 +84,76 @@ CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
chutest_SOURCES = chutest.c
chutest_OBJECTS = chutest.$(OBJEXT)
-chutest_DEPENDENCIES = ../libntp/libntp.a
-clktest_SOURCES = clktest.c
-clktest_OBJECTS = clktest.$(OBJEXT)
-clktest_DEPENDENCIES = ../libntp/libntp.a
+chutest_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+chutest_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
propdelay_SOURCES = propdelay.c
propdelay_OBJECTS = propdelay.$(OBJEXT)
-propdelay_DEPENDENCIES = ../libntp/libntp.a
+am__DEPENDENCIES_2 = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+propdelay_DEPENDENCIES = $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = chutest.c clktest.c propdelay.c
-DIST_SOURCES = chutest.c clktest.c propdelay.c
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = chutest.c propdelay.c
+DIST_SOURCES = chutest.c propdelay.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -110,21 +165,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -132,6 +197,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -150,14 +216,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -170,10 +290,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -181,9 +303,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -192,6 +332,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -239,25 +380,22 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-noinst_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 ../libntp/libntp.a
-chutest_LDADD = ../libntp/libntp.a
-clktest_LDADD = ../libntp/libntp.a
-ETAGS_ARGS = Makefile.am
-#EXTRA_DIST = TAGS
-BUILT_SOURCES = .deps-ver
-CLEANFILES = .deps-ver
+noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+propdelay_LDADD = $(LDADD)
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -296,9 +434,12 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+chutest$(EXEEXT): $(chutest_OBJECTS) $(chutest_DEPENDENCIES)
+ @rm -f chutest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(chutest_OBJECTS) $(chutest_LDADD) $(LIBS)
propdelay$(EXEEXT): $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES)
@rm -f propdelay$(EXEEXT)
- $(LINK) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -307,26 +448,28 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clktest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -539,18 +682,18 @@ uninstall-am:
pdf pdf-am ps ps-am tags uninstall uninstall-am
-# clktest-opts.def wants ../include/copyright.def ../include/homerc.def
-
-chutest$(EXEEXT): ../libntp/libntp.a
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
-clktest$(EXEEXT): ../libntp/libntp.a
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -559,17 +702,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -578,7 +714,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/clockstuff/README b/clockstuff/README
index c7f972773aec..14089a9bb14d 100644
--- a/clockstuff/README
+++ b/clockstuff/README
@@ -1,19 +1,14 @@
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.
+support radio clocks. chutest.c is desgined to test the depredated
+chu_clk line discipline or STREAMS module and can also test a CHU
+modem in raw mode.
-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:
+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
@@ -24,8 +19,3 @@ 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/clockstuff/chutest.c b/clockstuff/chutest.c
index 785c253edbce..488a0d16e0ff 100644
--- a/clockstuff/chutest.c
+++ b/clockstuff/chutest.c
@@ -2,36 +2,48 @@
* chutest - test the CHU clock
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_STROPTS_H
+# include <stropts.h>
+#else
+# ifdef HAVE_SYS_STROPTS_H
+# include <sys/stropts.h>
+# endif
+#endif
#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>
+#ifdef HAVE_TERMIOS_H
+# include <termios.h>
+#else
+# ifdef HAVE_SGTTY_H
+# include <sgtty.h>
+# endif
+#endif
-#include "../include/ntp_fp.h"
-#include "../include/ntp.h"
-#include "../include/ntp_unixtime.h"
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "ntp_unixtime.h"
+#include "ntp_calendar.h"
#ifdef CHULDISC
-#ifdef STREAM
# ifdef HAVE_SYS_CHUDEFS_H
-#include <sys/chudefs.h>
-#endif
-#include <stropts.h>
-#endif
+# include <sys/chudefs.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 {
@@ -41,12 +53,10 @@ struct chucode {
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 */
@@ -61,9 +71,14 @@ int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
struct timeval lasttv;
struct chucode chudata;
-extern u_long ustotslo[];
-extern u_long ustotsmid[];
-extern u_long ustotshi[];
+void error(char *fmt, char *s1, char *s2);
+void init_chu(void);
+int openterm(char *dev);
+int process_raw(int s);
+int process_ldisc(int s);
+void raw_filter(unsigned int c, struct timeval *tv);
+void chufilter(struct chucode *chuc, l_fp *rtime);
+
/*
* main - parse arguments and handle options
@@ -77,8 +92,6 @@ main(
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)
@@ -261,21 +274,20 @@ process_raw(
/*
* raw_filter - run the line discipline filter over raw data
*/
-int
+void
raw_filter(
unsigned int c,
struct timeval *tv
)
{
- static struct timeval diffs[10] = { 0 };
+ static struct timeval diffs[10];
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");
+ "character %02x failed BCD test\n", c);
chudata.ncodechars = 0;
return;
}
@@ -497,14 +509,6 @@ 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
@@ -543,10 +547,6 @@ chufilter(
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
@@ -632,6 +632,7 @@ chufilter(
* work most of the time.
*/
date_ui = tmp + yearstart;
+#define CLOCK_WAYTOOBIG 1000 /* revived from ancient sources */
if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
&& date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
goto codeokay; /* looks good */
@@ -640,7 +641,7 @@ chufilter(
* 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);
+ date_ui = calyearstart(rtime->l_ui, NULL);
if (date_ui != yearstart) {
yearstart = date_ui;
date_ui += tmp;
@@ -666,7 +667,9 @@ chufilter(
* than CLOCK_WAYTOOBIG seconds into the new year.
*/
if ((rtime->l_ui - yearstart) < CLOCK_WAYTOOBIG) {
- date_ui = tmp + calyearstart(yearstart - CLOCK_WAYTOOBIG);
+ date_ui = tmp;
+ date_ui += calyearstart(yearstart - CLOCK_WAYTOOBIG,
+ NULL);
if ((rtime->l_ui - date_ui) < CLOCK_WAYTOOBIG)
goto codeokay;
}
@@ -676,7 +679,9 @@ chufilter(
* following the year the system is in. Try this one before
* giving up.
*/
- date_ui = tmp + calyearstart(yearstart + (400*24*60*60)); /* 400 days */
+ date_ui = tmp;
+ date_ui += calyearstart(yearstart + (400 * SECSPERDAY),
+ NULL);
if ((date_ui - rtime->l_ui) >= CLOCK_WAYTOOBIG) {
printf("Date hopelessly off\n");
return; /* hopeless, let it sync to other peers */
diff --git a/clockstuff/clktest.c b/clockstuff/clktest.c
deleted file mode 100644
index 04df4b9bb331..000000000000
--- a/clockstuff/clktest.c
+++ /dev/null
@@ -1,412 +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 "clktest-opts.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
-#else
-# ifdef CLKLDISC
- ONLY_ONE_CLOCK_LINE_DISCIPLINE_FOR_THIS_PROGRAM;
-# endif
-#endif
-
-/*
- * Mask for blocking SIGIO and SIGALRM
- */
-#define BLOCKSIGMASK (sigmask(SIGIO)|sigmask(SIGALRM))
-
-#define progname clktestOptions.pzProgName
-
-struct timeval timeout = { 0 };
-char *cmd = NULL;
-int cmdlen;
-
-#ifdef CLKLDISC
-u_long magic1 = DEFMAGIC;
-u_long magic2 = DEFMAGIC;
-#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[];
-
-int alarming();
-int ioready();
-
-/*
- * main - parse arguments and handle options
- */
-int
-main(
- int argc,
- char *argv[]
- )
-{
- int fd;
- struct sgttyb ttyb;
- struct itimerval itimer;
-
-#ifdef STREAM
- magic[0] = 0;
-#endif
-
- {
- int ct = optionProcess( &clktestOptions, argc, argv );
- if (HAVE_OPT(COMMAND) && (strlen(OPT_ARG(COMMAND)) == 0)) {
- fputs( "The command option string must not be empty\n", stderr );
- USAGE( EXIT_FAILURE );
- }
-
- if ((argc -= ct) != 1) {
- fputs( "Missing tty device name\n", stderr );
- USAGE( EXIT_FAILURE );
- }
- argv += ct;
- }
-#ifdef STREAM
- if (!strlen(magic))
- strcpy(magic,DEFMAGIC);
-#endif
-
- fd = open(*argv, HAVE_OPT(TIMEOUT) ? O_RDWR : O_RDONLY, 0777);
- if (fd == -1) {
- fprintf(stderr, "%s: open(%s): ", progname, *argv);
- 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 (HAVE_OPT(TIMEOUT)) {
- /*
- * 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);
- timeout.tv_sec = OPT_VALUE_TIMEOUT;
- 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 (! HAVE_OPT(COMMAND))
- 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/clockstuff/propdelay.c b/clockstuff/propdelay.c
index c8df6866bc6a..52c20320cdc4 100644
--- a/clockstuff/propdelay.c
+++ b/clockstuff/propdelay.c
@@ -47,6 +47,9 @@
* to find delays to GOES via each of the three satellites.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
@@ -115,7 +118,6 @@ int Gflag = 0;
int height;
char *progname;
-volatile int debug;
static void doit (double, double, double, double, double, char *);
static double latlong (char *, int);
@@ -142,6 +144,8 @@ main(
double lat2, long2;
double lat3, long3;
+ init_lib();
+
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "dh:CWG")) != EOF)
switch (c) {
diff --git a/config.h.in b/config.h.in
index 6f7d347b0cd4..b5084b6e4c71 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,8 +6,11 @@
/* Is adjtime() accurate? */
#undef ADJTIME_IS_ACCURATE
-/* CHU audio/decoder? */
-#undef AUDIO_CHU
+/* Support NTP Autokey protocol? */
+#undef AUTOKEY
+
+/* why not HAVE_P_S? */
+#undef CALL_PTHREAD_SETCONCURRENCY
/* ACTS modem service */
#undef CLOCK_ACTS
@@ -48,6 +51,9 @@
/* Forum Graphic GPS datating station driver? */
#undef CLOCK_FG
+/* GPSD JSON receiver */
+#undef CLOCK_GPSDJSON
+
/* TrueTime GPS receiver/VME interface? */
#undef CLOCK_GPSVME
@@ -123,6 +129,9 @@
/* Schmid DCF77 clock */
#undef CLOCK_SCHMID
+/* SEL240X protocol */
+#undef CLOCK_SEL240X
+
/* clock thru shared memory */
#undef CLOCK_SHM
@@ -141,6 +150,9 @@
/* Kinemetrics/TrueTime receivers */
#undef CLOCK_TRUETIME
+/* Spectracom TSYNC timing board */
+#undef CLOCK_TSYNCPCI
+
/* TrueTime 560 IRIG-B decoder? */
#undef CLOCK_TT560
@@ -159,7 +171,15 @@
/* Zyfer GPStarplus */
#undef CLOCK_ZYFER
-/* Enable ntpd debugging code? */
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Enable debugging code? */
#undef DEBUG
/* Enable processing time debugging? */
@@ -264,6 +284,12 @@
/* What is the fallback value for HZ? */
#undef DEFAULT_HZ
+/* Default number of megabytes for RLIMIT_MEMLOCK */
+#undef DFLT_RLIMIT_MEMLOCK
+
+/* Default number of 4k pages for RLIMIT_STACK */
+#undef DFLT_RLIMIT_STACK
+
/* Directory separator character, usually / or \\ */
#undef DIR_SEP
@@ -279,8 +305,8 @@
/* number of args to el_init() */
#undef EL_INIT_ARGS
-/* Force deferred DNS lookups? */
-#undef FORCE_DEFER_DNS
+/* nls support in libopts */
+#undef ENABLE_NLS
/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */
#undef FORCE_NTPDATE_STEP
@@ -291,6 +317,16 @@
/* Do we have a routing socket (rt_msghdr or rtattr)? */
#undef HAS_ROUTING_SOCKET
+/* via __adjtimex */
+#undef HAVE_ADJTIMEX
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
@@ -303,18 +339,31 @@
/* Define to 1 if you have the `canonicalize_file_name' function. */
#undef HAVE_CANONICALIZE_FILE_NAME
+/* Define to 1 if you have the `chmod' function. */
+#undef HAVE_CHMOD
+
/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */
#undef HAVE_CIOGETEV
+/* Define to 1 if you have the `clock_getres' function. */
+#undef HAVE_CLOCK_GETRES
+
/* 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 <cthreads.h> header file. */
+#undef HAVE_CTHREADS_H
+
/* Define to 1 if you have the `daemon' function. */
#undef HAVE_DAEMON
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR_R
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -334,15 +383,27 @@
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
/* 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 `fnmatch' function. */
+#undef HAVE_FNMATCH
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
+/* Define to 1 if you have the `fstat' function. */
+#undef HAVE_FSTAT
+
/* Define to 1 if you have the `getbootfile' function. */
#undef HAVE_GETBOOTFILE
@@ -364,15 +425,15 @@
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
+/* if you have GNU Pth */
+#undef HAVE_GNU_PTH
+
/* Define to 1 if you have the <histedit.h> header file. */
#undef HAVE_HISTEDIT_H
/* Define to 1 if you have the <history.h> header file. */
#undef HAVE_HISTORY_H
-/* Define to 1 if you have the `hstrerror' function. */
-#undef HAVE_HSTRERROR
-
/* Obvious */
#undef HAVE_HZ_IN_STRUCT_CLOCKINFO
@@ -391,21 +452,27 @@
/* Define to 1 if the system has the type `int16_t'. */
#undef HAVE_INT16_T
+/* Define to 1 if the system has the type `int32'. */
+#undef HAVE_INT32
+
+/* int32 type in DNS headers, not others. */
+#undef HAVE_INT32_ONLY_WITH_DNS
+
/* Define to 1 if the system has the type `int32_t'. */
#undef HAVE_INT32_T
/* Define to 1 if the system has the type `int8_t'. */
#undef HAVE_INT8_T
+/* Define to 1 if the system has the type `intmax_t'. */
+#undef HAVE_INTMAX_T
+
/* Define to 1 if the system has the type `intptr_t'. */
#undef HAVE_INTPTR_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Do we have IPTOS support? */
-#undef HAVE_IPTOS_SUPPORT
-
/* Define to 1 if you have the `isfinite' function. */
#undef HAVE_ISFINITE
@@ -415,32 +482,17 @@
/* Define to 1 if you have the `kvm_open' function. */
#undef HAVE_KVM_OPEN
-/* 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 <libgen.h> header file. */
#undef HAVE_LIBGEN_H
-/* 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 `mld' library (-lmld). */
-#undef HAVE_LIBMLD
+/* Define to 1 if you have the `intl' library (-lintl). */
+#undef HAVE_LIBINTL
-/* Define to 1 if you have the `posix4' library (-lposix4). */
-#undef HAVE_LIBPOSIX4
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-#undef HAVE_LIBRESOLV
-
-/* Define to 1 if you have the `rt' library (-lrt). */
-#undef HAVE_LIBRT
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
/* Define to 1 if you have the <libscf.h> header file. */
#undef HAVE_LIBSCF_H
@@ -448,14 +500,38 @@
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* using Linux pthread? */
+#undef HAVE_LINUXTHREADS
+
/* Do we have Linux capabilities? */
#undef HAVE_LINUX_CAPABILITIES
/* Define to 1 if you have the <linux/if_addr.h> header file. */
#undef HAVE_LINUX_IF_ADDR_H
-/* Define to 1 if the system has the type `long'. */
-#undef HAVE_LONG
+/* if you have LinuxThreads */
+#undef HAVE_LINUX_THREADS
+
+/* Define to 1 if you have the `localeconv' function. */
+#undef HAVE_LOCALECONV
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if the system has the type `long double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* if you have SunOS LWP package */
+#undef HAVE_LWP
+
+/* Define to 1 if you have the <lwp/lwp.h> header file. */
+#undef HAVE_LWP_LWP_H
/* Define to 1 if you have the <machine/inline.h> header file. */
#undef HAVE_MACHINE_INLINE_H
@@ -463,6 +539,12 @@
/* Define to 1 if you have the <machine/soundcard.h> header file. */
#undef HAVE_MACHINE_SOUNDCARD_H
+/* define if you have Mach Cthreads */
+#undef HAVE_MACH_CTHREADS
+
+/* Define to 1 if you have the <mach/cthreads.h> header file. */
+#undef HAVE_MACH_CTHREADS_H
+
/* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H
@@ -472,21 +554,12 @@
/* 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
@@ -499,6 +572,9 @@
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
+/* Define to 1 if you have the `nanosleep' function. */
+#undef HAVE_NANOSLEEP
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
@@ -535,30 +611,33 @@
/* Define to 1 if you have the <net/if_var.h> header file. */
#undef HAVE_NET_IF_VAR_H
-/* Define to 1 if you have the <net/netmp.h> header file. */
-#undef HAVE_NET_NETMP_H
-
/* Define to 1 if you have the <net/route.h> header file. */
#undef HAVE_NET_ROUTE_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 <nlist.h> header file. */
#undef HAVE_NLIST_H
-/* Define to 1 if you have the `ntp_adjtime' function. */
+/* via __adjtimex */
#undef HAVE_NTP_ADJTIME
-/* Define to 1 if you have the `ntp_gettime' function. */
+/* via __ntp_gettime */
#undef HAVE_NTP_GETTIME
/* Do we want support for Samba's signing daemon? */
#undef HAVE_NTP_SIGND
+/* if you have NT Event Log */
+#undef HAVE_NT_EVENT_LOG
+
+/* if you have NT Service Manager */
+#undef HAVE_NT_SERVICE_MANAGER
+
+/* if you have NT Threads */
+#undef HAVE_NT_THREADS
+
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
@@ -571,12 +650,63 @@
/* Do we have the PPS API per the Draft RFC? */
#undef HAVE_PPSAPI
+/* Define to 1 if you have the <priv.h> header file. */
+#undef HAVE_PRIV_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* define to pthreads API spec revision */
+#undef HAVE_PTHREADS
+
+/* Define to 1 if you have the `pthread_attr_getstacksize' function. */
+#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
+
+/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
+#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
+
+/* define if you have pthread_detach function */
+#undef HAVE_PTHREAD_DETACH
+
+/* Define to 1 if you have the `pthread_getconcurrency' function. */
+#undef HAVE_PTHREAD_GETCONCURRENCY
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `pthread_kill' function. */
+#undef HAVE_PTHREAD_KILL
+
+/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
+#undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP
+
+/* define if you have pthread_rwlock_destroy function */
+#undef HAVE_PTHREAD_RWLOCK_DESTROY
+
+/* Define to 1 if you have the `pthread_setconcurrency' function. */
+#undef HAVE_PTHREAD_SETCONCURRENCY
+
+/* Define to 1 if you have the `pthread_yield' function. */
+#undef HAVE_PTHREAD_YIELD
+
+/* Define to 1 if you have the <pth.h> header file. */
+#undef HAVE_PTH_H
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#undef HAVE_PTRDIFF_T
+
/* 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 `RAND_bytes' function. */
+#undef HAVE_RAND_BYTES
+
+/* Define to 1 if you have the `RAND_poll' function. */
+#undef HAVE_RAND_POLL
+
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
@@ -619,6 +749,15 @@
/* Define to 1 if you have the `sched_setscheduler' function. */
#undef HAVE_SCHED_SETSCHEDULER
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#undef HAVE_SEMAPHORE_H
+
+/* Define to 1 if you have the `sem_timedwait' function. */
+#undef HAVE_SEM_TIMEDWAIT
+
/* Define to 1 if you have the <setjmp.h> header file. */
#undef HAVE_SETJMP_H
@@ -658,24 +797,33 @@
/* 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
+/* sigwait() available? */
+#undef HAVE_SIGWAIT
+
/* Define to 1 if the system has the type `size_t'. */
#undef HAVE_SIZE_T
-/* Define to 1 if you have the `snprintf' function. */
+/* Define if C99-compliant `snprintf' is available. */
#undef HAVE_SNPRINTF
+/* Define to 1 if you have the `socketpair' function. */
+#undef HAVE_SOCKETPAIR
+
/* Are Solaris privileges available? */
#undef HAVE_SOLARIS_PRIVS
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
+/* Define to 1 if you have the <stdbool.h> header file. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -694,20 +842,38 @@
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
/* 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 `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
-/* Define to 1 if you have the `strstr' function. */
-#undef HAVE_STRSTR
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
+/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
+
+/* Define to 1 if `thousands_sep' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_THOUSANDS_SEP
/* Do we have struct ntptimeval? */
#undef HAVE_STRUCT_NTPTIMEVAL
@@ -730,24 +896,24 @@
/* Define to 1 if you have the <sun/audioio.h> header file. */
#undef HAVE_SUN_AUDIOIO_H
+/* Define to 1 if you have the <synch.h> header file. */
+#undef HAVE_SYNCH_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 <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H
+/* */
+#undef HAVE_SYSLOG_FACILITYNAMES
+
/* 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/capability.h> header file. */
#undef HAVE_SYS_CAPABILITY_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
@@ -822,9 +988,6 @@
/* 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/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
@@ -894,6 +1057,21 @@
/* Define to 1 if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
+/* if you have Solaris LWP (thr) package */
+#undef HAVE_THR
+
+/* Define to 1 if you have the <thread.h> header file. */
+#undef HAVE_THREAD_H
+
+/* Define to 1 if you have the `thr_getconcurrency' function. */
+#undef HAVE_THR_GETCONCURRENCY
+
+/* Define to 1 if you have the `thr_setconcurrency' function. */
+#undef HAVE_THR_SETCONCURRENCY
+
+/* Define to 1 if you have the `thr_yield' function. */
+#undef HAVE_THR_YIELD
+
/* Obvious */
#undef HAVE_TICKADJ_IN_STRUCT_CLOCKINFO
@@ -906,14 +1084,11 @@
/* 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
-/* Define to 1 if the system has the type `time_t'. */
-#undef HAVE_TIME_T
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
/* Do we have the TIOCGPPSEV ioctl (Solaris)? */
#undef HAVE_TIOCGPPSEV
@@ -924,12 +1099,6 @@
/* 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 the system has the type `uint16_t'. */
#undef HAVE_UINT16_T
@@ -939,6 +1108,9 @@
/* Define to 1 if the system has the type `uint8_t'. */
#undef HAVE_UINT8_T
+/* Define to 1 if the system has the type `uintmax_t'. */
+#undef HAVE_UINTMAX_T
+
/* Define to 1 if the system has the type `uintptr_t'. */
#undef HAVE_UINTPTR_T
@@ -954,6 +1126,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* deviant sigwait? */
+#undef HAVE_UNIXWARE_SIGWAIT
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
/* Define to 1 if you have the `updwtmp' function. */
#undef HAVE_UPDWTMP
@@ -969,6 +1147,12 @@
/* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H
+/* Define to 1 if the system has the type `u_int32'. */
+#undef HAVE_U_INT32
+
+/* u_int32 type in DNS headers, not others. */
+#undef HAVE_U_INT32_ONLY_WITH_DNS
+
/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
@@ -984,12 +1168,9 @@
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
-/* Define to 1 if you have the `vsnprintf' function. */
+/* Define if C99-compliant `vsnprintf' is available. */
#undef HAVE_VSNPRINTF
-/* Define to 1 if you have the `vsprintf' function. */
-#undef HAVE_VSPRINTF
-
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
@@ -1005,6 +1186,12 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
+/* define if select implicitly yields */
+#undef HAVE_YIELDING_SELECT
+
+/* Define to 1 if you have the `_exit' function. */
+#undef HAVE__EXIT
+
/* Define to 1 if you have the </sys/sync/queue.h> header file. */
#undef HAVE__SYS_SYNC_QUEUE_H
@@ -1014,6 +1201,19 @@
/* Define to 1 if you have the `__adjtimex' function. */
#undef HAVE___ADJTIMEX
+/* defined if C compiler supports __attribute__((...)) */
+#undef HAVE___ATTRIBUTE__
+
+
+ /* define away __attribute__() if unsupported */
+ #ifndef HAVE___ATTRIBUTE__
+ # define __attribute__(x) /* empty */
+ #endif
+ #define ISC_PLATFORM_NORETURN_PRE
+ #define ISC_PLATFORM_NORETURN_POST __attribute__((__noreturn__))
+
+
+
/* Define to 1 if you have the `__ntp_gettime' function. */
#undef HAVE___NTP_GETTIME
@@ -1024,23 +1224,18 @@
#undef HAVE___SS_FAMILY_IN_SS
- /* Handle sockaddr_storage.__ss_family */
- #ifdef HAVE___SS_FAMILY_IN_SS
- # define ss_family __ss_family
- #endif /* HAVE___SS_FAMILY_IN_SS */
+ /* Handle sockaddr_storage.__ss_family */
+ #ifdef HAVE___SS_FAMILY_IN_SS
+ # define ss_family __ss_family
+ #endif /* HAVE___SS_FAMILY_IN_SS */
+
+/* Define to provide `rpl_snprintf' function. */
+#undef HW_WANT_RPL_SNPRINTF
-/* Does struct sockaddr_storage have __ss_len? */
-#undef HAVE___SS_LEN_IN_SS
-
-
- /* Handle sockaddr_storage.__ss_len */
- #ifdef HAVE___SS_LEN_IN_SS
- # define ss_len __ss_len
- #endif /* HAVE___SS_LEN_IN_SS */
-
-
+/* Define to provide `rpl_vsnprintf' function. */
+#undef HW_WANT_RPL_VSNPRINTF
/* Retry queries on _any_ DNS error? */
#undef IGNORE_DNS_ERRORS
@@ -1048,6 +1243,9 @@
/* Should we use the IRIG sawtooth filter? */
#undef IRIG_SUCKS
+/* Enclose PTHREAD_ONCE_INIT in extra braces? */
+#undef ISC_PLATFORM_BRACEPTHREADONCEINIT
+
/* Do we need to fix in6isaddr? */
#undef ISC_PLATFORM_FIXIN6ISADDR
@@ -1087,12 +1285,18 @@
/* ISC: provide inet_pton() */
#undef ISC_PLATFORM_NEEDPTON
+/* enable libisc thread support? */
+#undef ISC_PLATFORM_USETHREADS
+
/* Does the kernel have an FLL bug? */
#undef KERNEL_FLL_BUG
/* Does the kernel support precision time discipline? */
#undef KERNEL_PLL
+/* Define to use libseccomp system call filtering. */
+#undef KERN_SECCOMP
+
/* What is (probably) the name of DOSYNCTODR in the kernel? */
#undef K_DOSYNCTODR_NAME
@@ -1105,6 +1309,12 @@
/* What is the name of TICK in the kernel? */
#undef K_TICK_NAME
+/* define to 1 if library is thread safe */
+#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
+
+/* Define to any value to include libseccomp sandboxing. */
+#undef LIBSECCOMP
+
/* Should we align with the NIST lockclock scheme? */
#undef LOCKCLOCK
@@ -1127,6 +1337,12 @@
/* We need to provide netsnmp_daemonize() */
#undef NEED_NETSNMP_DAEMONIZE
+/* pthread_init() required? */
+#undef NEED_PTHREAD_INIT
+
+/* use PTHREAD_SCOPE_SYSTEM? */
+#undef NEED_PTHREAD_SCOPE_SYSTEM
+
/* Do we need the qnx adjtime call? */
#undef NEED_QNX_ADJTIME
@@ -1157,6 +1373,9 @@
/* Is there a problem using PARENB and IGNPAR? */
#undef NO_PARENB_IGNPAR
+/* define if you have (or want) no threads */
+#undef NO_THREADS
+
/* Default location of crypto key info */
#undef NTP_KEYSDIR
@@ -1208,12 +1427,12 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* data dir */
+#undef PERLLIBDIR
+
/* define to a working POSIX compliant shell */
#undef POSIX_SHELL
-/* Do we have the ppsclock streams module? */
-#undef PPS
-
/* PARSE kernel PLL PPS support */
#undef PPS_SYNC
@@ -1223,18 +1442,21 @@
/* Preset a value for 'tickadj'? */
#undef PRESET_TICKADJ
-/* Does qsort expect to work on "void *" stuff? */
-#undef QSORT_USES_VOID_P
-
/* Should we not IGNPAR (Linux)? */
#undef RAWDCF_NO_IGNPAR
+/* enable thread safety */
+#undef REENTRANT
+
/* Basic refclock support? */
#undef REFCLOCK
/* Do we want the ReliantUNIX clock hacks? */
#undef RELIANTUNIX_CLOCK
+/* define if sched_yield yields the entire process */
+#undef REPLACE_BROKEN_YIELD
+
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
@@ -1253,6 +1475,12 @@
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of `pthread_t', as computed by sizeof. */
+#undef SIZEOF_PTHREAD_T
+
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
@@ -1268,8 +1496,13 @@
/* Slew always? */
#undef SLEWALWAYS
-/* *s*printf() functions are char* */
-#undef SPRINTF_CHAR
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -1277,6 +1510,9 @@
/* Step, then slew the clock? */
#undef STEP_SLEW
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
/* canonical system (cpu-vendor-os) of where we should run */
#undef STR_SYSTEM
@@ -1286,6 +1522,12 @@
/* Do we need to #define _SVID3 when we #include <termios.h>? */
#undef TERMIOS_NEEDS__SVID3
+/* enable thread safety */
+#undef THREADSAFE
+
+/* enable thread safety */
+#undef THREAD_SAFE
+
/* Is K_TICKADJ_NAME in nanoseconds? */
#undef TICKADJ_NANO
@@ -1298,9 +1540,6 @@
/* 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
-
/* Provide a typedef for uintptr_t? */
#ifndef HAVE_UINTPTR_T
typedef unsigned int uintptr_t;
@@ -1316,27 +1555,8 @@ typedef unsigned int uintptr_t;
/* Must we have a CTTY for fsetown? */
#undef USE_FSETOWNCTTY
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
+/* Use OpenSSL's crypto random functions */
+#undef USE_OPENSSL_CRYPTO_RAND
/* Can we use SIGPOLL for tty IO? */
#undef USE_TTY_SIGPOLL
@@ -1347,6 +1567,9 @@ typedef unsigned int uintptr_t;
/* Version number of package */
#undef VERSION
+/* vsnprintf expands "%m" to strerror(errno) */
+#undef VSNPRINTF_PERCENT_M
+
/* configure --enable-ipv6 */
#undef WANT_IPV6
@@ -1362,6 +1585,9 @@ typedef unsigned int uintptr_t;
# endif
#endif
+/* routine worker child proc uses to exit. */
+#undef WORKER_CHILD_EXIT
+
/* Define to 1 if on MINIX. */
#undef _MINIX
@@ -1372,6 +1598,21 @@ typedef unsigned int uintptr_t;
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
+/* enable thread safety */
+#undef _REENTRANT
+
+/* enable thread safety */
+#undef _SGI_MP_SOURCE
+
+/* enable thread safety */
+#undef _THREADSAFE
+
+/* enable thread safety */
+#undef _THREAD_SAFE
+
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
/* Are we _special_? */
#undef __APPLE_USE_RFC_3542
@@ -1380,6 +1621,31 @@ typedef unsigned int uintptr_t;
# undef __CHAR_UNSIGNED__
#endif
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* deviant */
+#undef adjtimex
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -1392,6 +1658,16 @@ typedef unsigned int uintptr_t;
#undef inline
#endif
+/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
+ not define. */
+#undef intmax_t
+
+/* deviant */
+#undef ntp_adjtime
+
+/* deviant */
+#undef ntp_gettime
+
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
@@ -1401,21 +1677,70 @@ typedef unsigned int uintptr_t;
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
+
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ /*
+ * stdio.h must be included after _GNU_SOURCE is defined
+ * but before #define snprintf rpl_snprintf
+ */
+ # include <stdio.h>
+ #endif
+
+
+/* Define to rpl_snprintf if the replacement function should be used. */
+#undef snprintf
+
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
+/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
+ do not define. */
+#undef uintmax_t
+
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
+#undef uintptr_t
+
/* Define as `fork' if `vfork' does not work. */
#undef vfork
-/* define away volatile? */
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+ code using `volatile' can become incorrect without. Disable with care. */
#undef volatile
+/* Define to rpl_vsnprintf if the replacement function should be used. */
+#undef vsnprintf
+
#ifndef MPINFOU_PREDECLARED
# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
+typedef union mpinfou {
struct pdk_mpinfo *pdkptr;
struct mpinfo *pikptr;
} mpinfou_t;
#endif
+
+
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ # if defined(HW_WANT_RPL_VSNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ # include <stdarg.h>
+ int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ # if defined(HW_WANT_RPL_SNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ int rpl_snprintf(char *, size_t, const char *, ...);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ #endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */
+
diff --git a/configure b/configure
index aae2c01abfd7..c99576e43a8a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ntp 4.2.6p5.
+# Generated by GNU Autoconf 2.68 for ntp4 4.2.8.
+#
+# Report bugs to <http://bugs.ntp.org./>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -244,10 +246,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://bugs.ntp.org./ about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
fi
exit 1
fi
@@ -565,12 +568,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME='ntp'
-PACKAGE_TARNAME='ntp'
-PACKAGE_VERSION='4.2.6p5'
-PACKAGE_STRING='ntp 4.2.6p5'
-PACKAGE_BUGREPORT=''
-PACKAGE_URL=''
+PACKAGE_NAME='ntp4'
+PACKAGE_TARNAME='ntp4'
+PACKAGE_VERSION='4.2.8'
+PACKAGE_STRING='ntp4 4.2.8'
+PACKAGE_BUGREPORT='http://bugs.ntp.org./'
+PACKAGE_URL='http://www.ntp.org./'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -608,12 +611,21 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+ac_header_list=
enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
-LIBOBJS
subdirs
+PERLLIBDIR
+NTP_KEYSDIR
+GTEST_AVAILABLE_FALSE
+GTEST_AVAILABLE_TRUE
+GTEST_CPPFLAGS
+GTEST_CXXFLAGS
+GTEST_LIBS
+GTEST_LDFLAGS
+GTEST_CONFIG
SAVECONFIG_ENABLED_FALSE
SAVECONFIG_ENABLED_TRUE
LSCF
@@ -621,35 +633,59 @@ MAKE_NTPSNMPD
SNMP_CFLAGS
SNMP_CPPFLAGS
SNMP_LIBS
+BUILD_SNTP_FALSE
+BUILD_SNTP_TRUE
+SNTP
MAKE_NTPDSIM
MAKE_LIBNTPSIM
MAKE_TIMETRIM
MAKE_TICKADJ
MAKE_NTPTIME
MAKE_ADJTIMED
-CLKTEST
CHUTEST
PROPDELAY
MAKE_PARSEKMODULE
DCFD
TESTDCF
MAKE_CHECK_LAYOUT
-EF_LIBS
-EF_PROGS
-LCRYPTO
-OPENSSL_LIB
-OPENSSL_INC
-OPENSSL
+VER_SUFFIX
+PKG_CONFIG
MAKE_CHECK_Y2K
MAKE_LIBPARSE_KERNEL
MAKE_LIBPARSE
LIBPARSE
-HAVE_INLINE
-EDITLINE_LIBS
+HAVE_RLIMIT_STACK
+HAVE_RLIMIT_MEMLOCK
+LDADD_NLIST
PATH_NET_SNMP_CONFIG
+CONFIG_SHELL
PATH_TEST
-PATH_SH
PATH_PERL
+LIBOBJS
+PTHREADS_FALSE
+PTHREADS_TRUE
+LIBISC_PTHREADS_NOTHREADS
+PTHREAD_LIBS
+HAVE_INLINE
+ALLOCA
+LIBM
+EDITLINE_LIBS
+LDADD_LIBNTP
+NTP_CROSSCOMPILE_FALSE
+NTP_CROSSCOMPILE_TRUE
+LIBOPTS_DIR
+LIBOPTS_CFLAGS
+LIBOPTS_LDADD
+NEED_LIBOPTS_FALSE
+NEED_LIBOPTS_TRUE
+INSTALL_LIBOPTS_FALSE
+INSTALL_LIBOPTS_TRUE
+POSIX_SHELL
+GL_GENERATE_STDNORETURN_H_FALSE
+GL_GENERATE_STDNORETURN_H_TRUE
+STDNORETURN_H
+LIBTOOL_DEPS
+CXXCPP
OTOOL64
OTOOL
LIPO
@@ -667,25 +703,102 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
-LIBTOOL
-NTP_BINSUBDIR_IS_BIN_FALSE
-NTP_BINSUBDIR_IS_BIN_TRUE
-BINSUBDIR
-NTP_CROSSCOMPILE_FALSE
-NTP_CROSSCOMPILE_TRUE
-LIBOPTS_DIR
-LIBOPTS_CFLAGS
-LIBOPTS_LDADD
-NEED_LIBOPTS_FALSE
-NEED_LIBOPTS_TRUE
-INSTALL_LIBOPTS_FALSE
-INSTALL_LIBOPTS_TRUE
-POSIX_SHELL
SED
+LIBTOOL
+TIMETRIM_NI
+TIMETRIM_MS
+TIMETRIM_DS
+TIMETRIM_DL
+TIMETRIM_DB
+TICKADJ_NI
+TICKADJ_MS
+TICKADJ_DS
+TICKADJ_DL
+TICKADJ_DB
+SNTP_NI
+SNTP_MS
+SNTP_DS
+SNTP_DL
+SNTP_DB
+NTP_WAIT_NI
+NTP_WAIT_MS
+NTP_WAIT_DS
+NTP_WAIT_DL
+NTP_WAIT_DB
+NTP_KEYGEN_NI
+NTP_KEYGEN_MS
+NTP_KEYGEN_DS
+NTP_KEYGEN_DL
+NTP_KEYGEN_DB
+NTPTRACE_NI
+NTPTRACE_MS
+NTPTRACE_DS
+NTPTRACE_DL
+NTPTRACE_DB
+NTPTIME_NI
+NTPTIME_MS
+NTPTIME_DS
+NTPTIME_DL
+NTPTIME_DB
+INSTALL_NTPSWEEP_FALSE
+INSTALL_NTPSWEEP_TRUE
+NTPSWEEP_NI
+NTPSWEEP_MS
+NTPSWEEP_DS
+NTPSWEEP_DL
+NTPSWEEP_DB
+NTPSNMPD_NI
+NTPSNMPD_MS
+NTPSNMPD_DS
+NTPSNMPD_DL
+NTPSNMPD_DB
+NTPQ_NI
+NTPQ_MS
+NTPQ_DS
+NTPQ_DL
+NTPQ_DB
+NTPD_NI
+NTPD_MS
+NTPD_DS
+NTPD_DL
+NTPD_DB
+NTPDSIM_NI
+NTPDSIM_MS
+NTPDSIM_DS
+NTPDSIM_DL
+NTPDSIM_DB
+NTPDC_NI
+NTPDC_MS
+NTPDC_DS
+NTPDC_DL
+NTPDC_DB
+NTPDATE_NI
+NTPDATE_MS
+NTPDATE_DS
+NTPDATE_DL
+NTPDATE_DB
+MANTAGFMT
+CALC_TICKADJ_NI
+CALC_TICKADJ_MS
+CALC_TICKADJ_DS
+CALC_TICKADJ_DL
+CALC_TICKADJ_DB
+WANT_CALC_TICKADJ_MS_FALSE
+WANT_CALC_TICKADJ_MS_TRUE
VPATH_HACK_FALSE
VPATH_HACK_TRUE
YFLAGS
YACC
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+LDFLAGS_NTP
+LDADD_NTP
+CPPFLAGS_NTP
+CFLAGS_NTP
EGREP
GREP
CPP
@@ -713,6 +826,8 @@ build_os
build_vendor
build_cpu
build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
@@ -774,31 +889,46 @@ PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
-ac_subst_files=''
+ac_subst_files='calc_tickadj_opts
+ntp_wait_opts
+ntpsweep_opts
+ntptrace_opts
+summary_opts
+plot_summary_opts'
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_dependency_tracking
+with_locfile
enable_shared
-enable_local_libopts
-enable_libopts_install
-with_autoopts_config
-with_binsubdir
-with_arlib
-with_rpath
enable_static
with_pic
enable_fast_install
with_gnu_ld
with_sysroot
enable_libtool_lock
-with_net_snmp_config
+enable_nls
+enable_local_libopts
+enable_libopts_install
+with_autoopts_config
+enable_local_libevent
with_lineeditlibs
-enable_getifaddrs
enable_debugging
+enable_thread_support
+with_threads
+with_yielding_select
+enable_c99_snprintf
+enable_clockctl
+enable_linuxcaps
+enable_solarisprivs
+with_arlib
+with_net_snmp_config
+enable_libseccomp
+with_stack_limit
+with_memlock
enable_debug_timing
enable_dst_minutes
enable_ignore_dns_errors
-enable_force_defer_DNS
enable_BANCOMM
enable_GPSVME
enable_all_clocks
@@ -825,6 +955,7 @@ enable_LOCAL_CLOCK
enable_MX4200
enable_NEOCLOCK4X
enable_NMEA
+enable_GPSD
enable_ONCORE
enable_PALISADE
enable_PCF
@@ -836,6 +967,7 @@ enable_TPRO
enable_TRUETIME
enable_TT560
enable_ULINK
+enable_TSYNCPCI
enable_WWV
enable_ZYFER
enable_parse_clocks
@@ -850,15 +982,19 @@ enable_TRIMTAIP
enable_TRIMTSIP
enable_WHARTON
enable_VARITEXT
+enable_SEL240X
+with_crypto
with_openssl_libdir
with_openssl_incdir
-with_crypto
-with_electricfence
+with_rpath
+enable_openssl_random
+enable_autokey
enable_kmem
enable_accurate_adjtime
enable_tick
enable_tickadj
enable_simulator
+with_sntp
with_ntpsnmpd
enable_slew_always
enable_step_slew
@@ -869,11 +1005,11 @@ enable_bug1243_fix
enable_irig_sawtooth
enable_nist
enable_ntp_signd
-enable_clockctl
-enable_linuxcaps
enable_ipv6
with_kame
+enable_getifaddrs
enable_saveconfig
+with_gtest
'
ac_precious_vars='build_alias
host_alias
@@ -884,8 +1020,12 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
+CXX
+CXXFLAGS
+CCC
YACC
-YFLAGS'
+YFLAGS
+CXXCPP'
ac_subdirs_all='sntp'
# Initialize some variables set by options.
@@ -1428,7 +1568,7 @@ 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 ntp 4.2.6p5 to adapt to many kinds of systems.
+\`configure' configures ntp4 4.2.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1616,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/ntp]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/ntp4]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1498,35 +1638,58 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ntp 4.2.6p5:";;
+ short | recursive ) echo "Configuration of ntp4 4.2.8:";;
esac
cat <<\_ACEOF
-Optional Features:
+Optional Features and Packages:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --with-locfile=XXX os-specific or "legacy"
--enable-shared[=PKGS] build shared libraries [default=no]
- --enable-local-libopts Force using the supplied libopts tearoff code
- --disable-libopts-install
- Do not install libopts with client installation
--enable-static[=PKGS] build static libraries [default=yes]
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-getifaddrs s Enable the use of getifaddrs() [[yes|no|glibc]].
- glibc: Use getifaddrs() in glibc if you know it
- supports IPv6.
+ --disable-nls disable nls support in libopts
+ --enable-local-libopts Use the supplied libopts tearoff code
+ --enable-libopts-install
+ Install libopts with client installation
+ --with-autoopts-config specify the config-info script
+ --enable-local-libevent Force using the supplied libevent tearoff code
+ --with-lineeditlibs edit,editline (readline may be specified if desired)
+ defaults: + yes, - no, s system-specific
--enable-debugging + include ntpd debugging code
+ --enable-thread-support s use threads (+ if available)
+ --with-threads with threads [auto]
+ --with-yielding-select with yielding select [auto]
+ --enable-c99-snprintf s force replacement
+ --enable-clockctl s Use /dev/clockctl for non-root clock control
+ --enable-linuxcaps + Use Linux capabilities for non-root clock control
+ --enable-solarisprivs + Use Solaris privileges for non-root clock control
+ --with-arlib - deprecated, arlib not distributed
+ --with-net-snmp-config + =net-snmp-config
+ --enable-libseccomp EXPERIMENTAL: enable support for libseccomp
+ sandboxing (default is no)
+ --with-stack-limit ? =50 (200 for openbsd) 4k pages
+ --with-memlock ? =32 (megabytes)
--enable-debug-timing - include processing time debugging code (costs
performance)
- --enable-dst-minutes n minutes per DST adjustment [60]
+ --enable-dst-minutes =60 minutes per DST adjustment
--enable-ignore-dns-errors
- retry DNS queries on any error
- --enable-force-defer-DNS
- - force all DNS lookups to take the deferred path
--enable-BANCOMM - Datum/Bancomm bc635/VME interface
--enable-GPSVME - TrueTime GPS receiver/VME interface
--enable-all-clocks + include all suitable non-PARSE clocks:
@@ -1553,6 +1716,7 @@ Optional Features:
--enable-MX4200 s Magnavox MX4200 GPS receiver
--enable-NEOCLOCK4X + NeoClock4X DCF77 / TDF receiver
--enable-NMEA + NMEA GPS receiver
+ --enable-GPSD + GPSD JSON receiver
--enable-ONCORE s Motorola VP/UT Oncore GPS receiver
--enable-PALISADE s Palisade clock
--enable-PCF + Conrad parallel port radio clock
@@ -1564,6 +1728,7 @@ Optional Features:
--enable-TRUETIME s Kinemetrics/TrueTime receivers
--enable-TT560 - TrueTime 560 IRIG-B decoder
--enable-ULINK + Ultralink WWVB receiver
+ --enable-TSYNCPCI s Spectracom TSYNC timing board
--enable-WWV s WWV Audio receiver
--enable-ZYFER + Zyfer GPStarplus receiver
--enable-parse-clocks - include all suitable PARSE clocks:
@@ -1578,12 +1743,26 @@ Optional Features:
--enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol
--enable-WHARTON s WHARTON 400A Series clock
--enable-VARITEXT s VARITEXT clock
+ --enable-SEL240X s SEL240X clock
+ --with-crypto + =openssl,libcrypto
+
+ --with-openssl-libdir + =/something/reasonable
+
+ --with-openssl-incdir + =/something/reasonable
+
+ --without-rpath s Disable auto-added -R linker paths
+
+ --enable-openssl-random Use OpenSSL's crypto random number functions, if
+ available (default is yes)
+ --enable-autokey + support NTP Autokey protocol
--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?
+ --without-sntp - disable building sntp and sntp/tests
+ --with-ntpsnmpd s Build ntpsnmpd MIB agent?
--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
@@ -1595,32 +1774,12 @@ Optional Features:
--enable-nist - if we should enable the NIST lockclock scheme
--enable-ntp-signd - Provide support for Samba's signing daemon,
=/var/run/ntp_signd
- --enable-clockctl s Use /dev/clockctl for non-root clock control
- --enable-linuxcaps + Use Linux capabilities for non-root clock control
--enable-ipv6 s use IPv6?
- --enable-saveconfig + saveconfig mechanism
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-autoopts-config specify the config-info script
- --with-binsubdir bin ={bin,sbin}
- --with-arlib - deprecated, arlib not distributed
- --without-rpath s Disable auto-added -R linker paths
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
- --with-net-snmp-config + =net-snmp-config
- --with-lineeditlibs edit,editline (readline may be specified if desired)
- --with-openssl-libdir + =/something/reasonable
- --with-openssl-incdir + =/something/reasonable
- --with-crypto + =openssl
- --with-electricfence - compile with ElectricFence malloc debugger
- --with-ntpsnmpd s Build ntpsnmpd MIB agent?
--with-kame - =/usr/local/v6
+ --enable-getifaddrs + Enable the use of getifaddrs() [[yes|no]].
+ --enable-saveconfig + saveconfig mechanism
+ --with-gtest Use the gtest framework (Default: if it's available)
Some influential environment variables:
CC C compiler command
@@ -1631,17 +1790,21 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc',
`yacc'.
YFLAGS The list of arguments that will be passed by default to $YACC.
This script will default YFLAGS to the empty string to avoid a
default value of `-d' given by some make applications.
+ CXXCPP 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.
-Report bugs to the package provider.
+Report bugs to <http://bugs.ntp.org./>.
+ntp4 home page: <http://www.ntp.org./>.
_ACEOF
ac_status=$?
fi
@@ -1704,7 +1867,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ntp configure 4.2.6p5
+ntp4 configure 4.2.8
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1863,6 +2026,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------ ##
+## Report this to http://bugs.ntp.org./ ##
+## ------------------------------------ ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -1999,6 +2166,194 @@ fi
} # ac_fn_c_try_link
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); 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
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -2231,72 +2586,51 @@ rm -f conftest.val
} # ac_fn_c_compute_int
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); 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
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
#ifdef __cplusplus
-extern "C"
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
#endif
-char $2 ();
-/* 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_$2 || defined __stub___$2
-choke me
#endif
-int
-main ()
-{
-return $2 ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_func
+} # ac_fn_c_check_decl
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
@@ -2358,7 +2692,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ntp $as_me 4.2.6p5, which was
+It was created by ntp4 $as_me 4.2.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2638,6 +2972,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+as_fn_append ac_header_list " stdarg.h"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2708,7 +3043,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in . "$srcdir"/.; do
+for ac_dir in sntp/libevent/build-aux "$srcdir"/sntp/libevent/build-aux; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -2724,7 +3059,7 @@ for ac_dir in . "$srcdir"/.; do
fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in sntp/libevent/build-aux \"$srcdir\"/sntp/libevent/build-aux" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2737,9 +3072,13 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Increment ntp_configure_cache_version by one for each change to
-# configure.ac or .m4 files which invalidates cached values from
-# previous versions.
+
+
+
+
+# Bump ntp_configure_cache_version for each change to configure.ac or
+# .m4 files which invalidates cached values from previous configure
+# runs.
#
# If the change affects cache variables used only by the main NTP
# configure.ac, then only its version number should be bumped, while
@@ -2749,15 +3088,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# bumping.
#
# If a change affects variables shared by all NTP configure scripts,
-# please bump the version numbers of all three. If you are not sure,
-# the safe choice is to bump all three on any cache-invalidating change.
+# please bump the version numbers of each. If you are not sure, the
+# safe choice is to bump all on any cache-invalidating change.
#
# In order to avoid the risk of version stamp collision between -stable
# and -dev branches, do not simply increment the version, instead use
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20091117
+ntp_configure_cache_version=20120806
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -2795,11 +3134,13 @@ ntp_configure_cache_version=20091117
# Parent configure just created cache from empty,
# flushing would be counterproductive.
ntp_cache_flush=0;
+ ;;
esac
esac
;;
*)
# configure cache version mismatches config.cache version
+ ;;
esac
case "$ntp_cache_flush" in
@@ -2836,7 +3177,7 @@ ntp_configure_cache_version=20091117
for c_varname in $c_varname_list
do
- { eval $c_varname=; unset $c_varname;}
+ { eval $c_varname=; unset $c_varname; }
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
@@ -3297,8 +3638,8 @@ fi
# Define the identity of the package.
- PACKAGE='ntp'
- VERSION='4.2.6p5'
+ PACKAGE='ntp4'
+ VERSION='4.2.8'
cat >>confdefs.h <<_ACEOF
@@ -3338,6 +3679,20 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -4801,6 +5156,8 @@ done
+
+
ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
if test "x$ac_cv_header_minix_config_h" = xyes; then :
MINIX=yes
@@ -4821,6 +5178,14 @@ $as_echo "#define _MINIX 1" >>confdefs.h
fi
+ case "$host_os" in
+ hpux*)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
@@ -4830,8 +5195,8 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# define __EXTENSIONS__ 1
- $ac_includes_default
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
main ()
{
@@ -4861,37 +5226,207 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int
+main ()
+{
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
-# So far, the only shared library we might use is libopts.
-# It's a small library - we might as well use a static version of it.
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- enable_shared=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+fi
@@ -5567,117 +6102,6 @@ fi
# Ralf Wildenhues: With per-target flags we need CC_C_O
# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
@@ -5693,520 +6117,306 @@ if test "$am_t" != yes; then
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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
+if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
$as_echo_n "(cached) " >&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.
+ ac_pattern="Autoconf.*'x'"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
+#include <sgtty.h>
+Autoconf TIOCGETP
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+ ac_cv_prog_gcc_traditional=yes
else
- # Broken: fails on valid input.
-continue
+ ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest*
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ac_nonexistent.h>
+#include <termio.h>
+Autoconf TCGETA
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
+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.err conftest.i conftest.$ac_ext
+rm -f conftest*
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
fi
- done
- ac_cv_prog_CPP=$CPP
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+CFLAGS_NTP=
+CPPFLAGS_NTP=
+LDADD_NTP=
+LDFLAGS_NTP=
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-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
-for ac_prog in 'bison -y' byacc
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
+
+case "$ac_cv_prog_cc_c89" in
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ version 4.2.5 and higher." >&5
+$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ version 4.2.5 and higher." >&2;}
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
+$as_echo_n "checking if $CC can handle #warning... " >&6; }
+if ${ntp_cv_cpp_warning+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_YACC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
+int
+main ()
+{
+#warning foo
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_cpp_warning=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+ ntp_cv_cpp_warning=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
+$as_echo "$ntp_cv_cpp_warning" >&6; }
+case "$ntp_cv_cpp_warning" in
+ no)
+$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
-# AC_PROG_CC_STDC has two functions. It attempts to find a compiler
-# capable of C99, or failing that, for C89. CC is set afterward with
-# the selected invocation, such as "gcc --std=gnu99". Also, the
-# ac_cv_prog_cc_stdc variable is no if the compiler selected for CC
-# does not accept C89.
+esac
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
+$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
+if ${ntp_cv_cc_attribute+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
+int
+main ()
{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
+void foo(void) __attribute__((__noreturn__));
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_cc_attribute=yes
+else
+ ntp_cv_cc_attribute=no
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-typedef const char *ccp;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
+$as_echo "$ntp_cv_cc_attribute" >&6; }
+case "$ntp_cv_cc_attribute" in
+ yes)
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
+$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
+esac
- const char *str;
- int number;
- float fnumber;
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
+case "$GCC" in
+ yes)
+ SAVED_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wstrict-overflow"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
+$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
+if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
int
main ()
{
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_gcc_Wstrict_overflow=yes
+else
+ ntp_cv_gcc_Wstrict_overflow=no
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ni.number = 58;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
+$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
+ #
+ # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
+ # flag to CFLAGS.
+ #
+ CFLAGS="$SAVED_CFLAGS -Winit-self"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
+$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
+if ${ntp_cv_gcc_Winit_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
+int
+main ()
+{
;
return 0;
}
_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_gcc_Winit_self=yes
+else
+ ntp_cv_gcc_Winit_self=no
+
fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
+$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
+ CFLAGS="$SAVED_CFLAGS"
+ { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
+ #
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
+if ${ntp_cv_gc_sections_runs+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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;
-}
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+ origCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wl,--gc-sections"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+ #include <stdlib.h>
+ #include <stdio.h>
-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];
+
+ FILE * fpC;
+ char buf[32];
+ size_t cch;
+ int read_success_once;
+
+ fpC = fopen("conftest.c", "r");
+ if (NULL == fpC)
+ exit(1);
+ do {
+ cch = fread(buf, sizeof(buf), 1, fpC);
+ read_success_once |= (0 != cch);
+ } while (0 != cch);
+ if (!read_success_once)
+ exit(2);
+ if (!feof(fpC))
+ exit(3);
+ if (0 != fclose(fpC))
+ exit(4);
+
+ exit(EXIT_SUCCESS);
+
+
;
return 0;
}
_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
+if ac_fn_c_try_link "$LINENO"; then :
+
+ if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
+ ntp_cv_gc_sections_runs=no
+ else
+ ntp_cv_gc_sections_runs=no
+ ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
+ fi
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
else
- ac_cv_prog_cc_stdc=no
-fi
+ ntp_cv_gc_sections_runs=no
fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$origCFLAGS"
+ { origCFLAGS=; unset origCFLAGS;}
-case "$ac_cv_prog_cc_stdc" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
- version 4.2.5 and higher." >&5
-$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
- version 4.2.5 and higher." >&2;}
-esac
-
-# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
-case "$host" in
- *-pc-cygwin*)
- CFLAGS="$CFLAGS -DSYS_CYGWIN32"
- ;;
- i386-sequent-sysv4)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -Wc,+abi-socket"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
+$as_echo "$ntp_cv_gc_sections_runs" >&6; }
+ case "$ntp_cv_gc_sections_runs" in
+ yes)
+ LDADD_LIBNTP="-Wl,--gc-sections"
+ CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
+ ;;
+ no)
+ LDADD_LIBNTP=
;;
esac
- ;;
- *-*-mpeix*)
- CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
- LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
- LIBS="$LIBS -lcurses"
- ;;
- *-*-solaris*)
- # see "man standards".
- # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
- # -D_XOPEN_SOURCE=600 seems OK for c99
- #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- libxnet=-lxnet
- ;;
+ CFLAGS_NTP="$CFLAGS_NTP -Wall"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
+ # CFLAGS_NTP="$CFLAGS_NTP -Werror"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
+ CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
+ CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
+ case "$ntp_cv_gcc_Winit_self" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
+ esac
+ case "$ntp_cv_gcc_Wstrict_overflow" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
+ esac
+ # -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
@@ -6217,7 +6427,7 @@ $as_echo_n "checking additional compiler flags... " >&6; }
set)
;;
*)
- ntp_os_cflags=""
+ ntp_os_cflags=
case "$host_os" in
aix[1-3]*)
;;
@@ -6231,8 +6441,13 @@ $as_echo_n "checking additional compiler flags... " >&6; }
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
;;
aix*)
+ # XXX Only verified thru AIX6.
+ # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
# avoid circular dependencies in yp headers
- ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
+ # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
+ # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
+ # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
+ ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
;;
amigaos)
@@ -6301,1703 +6516,1282 @@ $as_echo_n "checking additional compiler flags... " >&6; }
;;
*)
ntp_os_cflags_msg="$ntp_os_cflags"
- CFLAGS="$CFLAGS $ntp_os_cflags"
esac
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
$as_echo "$ntp_os_cflags_msg" >&6; }
{ ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
-$as_echo_n "checking for directory path separator... " >&6; }
-if ${ntp_cv_dir_sep+:} false; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
- case "$ntp_cv_dir_sep" in
- '')
- case "$target_os" in
- *djgpp | *mingw32* | *emx*)
- ntp_cv_dir_sep="'\\'"
- ;;
- *)
- ntp_cv_dir_sep="'/'"
- ;;
- esac
- esac
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
-$as_echo "$ntp_cv_dir_sep" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define DIR_SEP $ntp_cv_dir_sep
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need a VPATH hack" >&5
-$as_echo_n "checking to see if we need a VPATH hack... " >&6; }
-ntp_vpath_hack="no"
-case "$srcdir::$build_os::${force_ntp_vpath_hack+set}" in
- .::*::*)
- ;;
- *::*::set)
- ntp_vpath_hack="yes"
- ;;
- *::freebsd*::)
- case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
- '')
- ntp_vpath_hack="yes"
- esac
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
-$as_echo "$ntp_vpath_hack" >&6; }
- if test x$ntp_vpath_hack = xyes; then
- VPATH_HACK_TRUE=
- VPATH_HACK_FALSE='#'
-else
- VPATH_HACK_TRUE='#'
- VPATH_HACK_FALSE=
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
-
-# NTP has (so far) been relying on leading-edge autogen.
-# Therefore, by default:
-# - use the version we ship with
-# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
-case "${enable_local_libopts+set}" in
- set) ;;
- *) enable_local_libopts=yes ;;
-esac
-case "${enable_libopts_install+set}" in
- set) ;;
- *) enable_libopts_install=no ;;
-esac
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
+ ;
+ return 0;
+}
_ACEOF
-
-fi
-
-
-
- ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <$ac_hdr>
+ #include <sys/param.h>
int
main ()
{
-if ((DIR *) 0)
-return 0;
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_ac_Header=yes"
+ ac_cv_c_bigendian=yes
else
- eval "$as_ac_Header=no"
+ ac_cv_c_bigendian=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
-ac_header_dirent=$ac_hdr; break
-fi
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <limits.h>
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
int
main ()
{
-return opendir ();
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_opendir+:} false; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
else
- ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+ ac_cv_c_bigendian=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
int
main ()
{
-return opendir ();
+return use_ascii (foo) == use_ebcdic (foo);
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
- break
+if ac_fn_c_try_compile "$LINENO"; 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
fi
-done
-if ${ac_cv_search_opendir+:} false; then :
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
- # =================
- # AC_CHECK_HEADERS
- # =================
- for ac_header in \
- dlfcn.h errno.h fcntl.h libgen.h \
- memory.h netinet/in.h setjmp.h sys/mman.h \
- sys/param.h sys/poll.h sys/procset.h sys/select.h \
- sys/socket.h sys/stropts.h sys/time.h sys/un.h \
- sys/wait.h unistd.h utime.h sysexits.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
-done
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
- for ac_header in stdarg.h varargs.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- lo_have_arg_hdr=true;break
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- lo_have_arg_hdr=false
-fi
-
-done
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int
+main ()
+{
- for ac_header in string.h strings.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+ ;
+ return 0;
+}
_ACEOF
- lo_have_str_hdr=true;break
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_volatile=yes
else
- lo_have_str_hdr=false
+ ac_cv_c_volatile=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
-done
+$as_echo "#define volatile /**/" >>confdefs.h
+fi
- for ac_header in limits.h sys/limits.h values.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
- lo_have_lim_hdr=true;break
+if ac_fn_c_try_cpp "$LINENO"; then :
+
else
- lo_have_lim_hdr=false
+ # Broken: fails on valid input.
+continue
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
-done
-
-
- for ac_header in inttypes.h stdint.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
- lo_have_typ_hdr=true;break
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
else
- lo_have_typ_hdr=false
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
done
-
-
- # ----------------------------------------------------------------------
- # check for various programs used during the build.
- # On OS/X, "wchar.h" needs "runetype.h" to work properly.
- # ----------------------------------------------------------------------
- for ac_header in runetype.h wchar.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
- $ac_includes_default
- #if HAVE_RUNETYPE_H
- # include <runetype.h>
- #endif
-
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
fi
-done
-
-
- # --------------------------------------------
- # Verify certain entries from AC_CHECK_HEADERS
- # --------------------------------------------
- for f in sys_types sys_mman sys_param sys_stat sys_wait \
- string errno stdlib memory setjmp
- do eval as_ac_var=\${ac_cv_header_${f}_h+set}
- test "${as_ac_var}" = set || {
- as_fn_error $? "You must have ${f}.h on your system" "$LINENO" 5
- }
- done
-
- ${lo_have_arg_hdr} || \
- as_fn_error $? "You must have stdarg.h or varargs.h on your system" "$LINENO" 5
-
- ${lo_have_str_hdr} || \
- as_fn_error $? "You must have string.h or strings.h on your system" "$LINENO" 5
-
- ${lo_have_lim_hdr} || \
- as_fn_error $? "You must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
-
- ${lo_have_typ_hdr} || \
- as_fn_error $? "You must have inttypes.h or stdint.h on your system" "$LINENO" 5
-
- # ----------------------------------------------------------------------
- # Checks for typedefs
- # ----------------------------------------------------------------------
- ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-if test "x$ac_cv_type_wchar_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WCHAR_T 1
-_ACEOF
-
+ done
+ ac_cv_prog_CPP=$CPP
fi
-
- ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
- $ac_includes_default
- #if HAVE_RUNETYPE_H
- # include <runetype.h>
- #endif
- #if HAVE_WCHAR_H
- # include <wchar.h>
- #endif
-
-"
-if test "x$ac_cv_type_wint_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINT_T 1
-_ACEOF
-
-
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
fi
-
- ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-if test "x$ac_cv_type_int8_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
-
+else
+ # Broken: fails on valid input.
+continue
fi
-ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
+rm -f conftest.err conftest.i conftest.$ac_ext
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
-
-
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
-ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
-_ACEOF
-
-fi
-ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+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
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
-_ACEOF
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
fi
-ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
-
+else
+ # Broken: fails on valid input.
+continue
fi
-ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = xyes; then :
+rm -f conftest.err conftest.i conftest.$ac_ext
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INTPTR_T 1
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
-
-
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
-
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
fi
-ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT_T 1
-_ACEOF
+ done
+ ac_cv_prog_CPP=$CPP
fi
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PID_T 1
-_ACEOF
-
-
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
fi
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIZE_T 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
-
-
-fi
-
-
- # =====
- # sizes
- # =====
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5
-$as_echo_n "checking size of char*... " >&6; }
-if ${ac_cv_sizeof_charp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default"; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
else
- if test "$ac_cv_type_charp" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (char*)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_charp=0
- fi
-fi
-
+ # Broken: fails on valid input.
+continue
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5
-$as_echo "$ac_cv_sizeof_charp" >&6; }
-
-
+rm -f conftest.err conftest.i conftest.$ac_ext
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHARP $ac_cv_sizeof_charp
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
_ACEOF
-
-
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_int=0
- fi
-fi
-
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
+rm -f conftest.err conftest.i conftest.$ac_ext
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
+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
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
- if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_short=0
- fi
-fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
-
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
- # ----------------------------------------------------------------------
- # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
- # ----------------------------------------------------------------------
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
-$as_echo_n "checking for pathfind in -lgen... " >&6; }
-if ${ac_cv_lib_gen_pathfind+:} false; then :
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgen $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pathfind ();
-int
-main ()
-{
-return pathfind ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gen_pathfind=yes
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
- ac_cv_lib_gen_pathfind=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
-$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
-if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
-_ACEOF
-
- LIBS="-lgen $LIBS"
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
fi
-
- for ac_func in vprintf
-do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
-_ACEOF
-
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
-
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
-
fi
-
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-done
- for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
-
+ test -n "$ac_ct_CXX" && break
done
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+ fi
fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
done
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_fork_works=cross
-else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+
int
main ()
{
-
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
+#ifndef __GNUC__
+ choke me
+#endif
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_fork_works=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
else
- ac_cv_func_fork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_compiler_gnu=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
else
- ac_cv_func_fork_works=$ac_cv_func_fork
+ GXX=
fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_vfork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
int
main ()
{
- pid_t parent = getpid ();
- pid_t child;
-
- sparc_address_test (0);
- child = vfork ();
-
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
+int
+main ()
+{
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
- /* Did the child fail? (This shouldn't happen.) */
- || status
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
+int
+main ()
+{
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
+ ;
+ return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_vfork_works=yes
-else
- ac_cv_func_vfork_works=no
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
-
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
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 "x$ac_cv_func_vfork_works" = xyes; then
-
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+depcc="$CXX" am_compiler_list=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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
-$as_echo "#define vfork fork" >>confdefs.h
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
+ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
fi
- for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
fi
-done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
+
+for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_YACC+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # 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_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_YACC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
done
IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
else
- ac_cv_path_SED=$SED
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- while :
- do
- POSIX_SHELL=`which bash`
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`which dash`
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=/usr/xpg4/bin/sh
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`/bin/sh -c '
- exec 2>/dev/null
- if ! true ; then exit 1 ; fi
- echo /bin/sh'`
- test -x "$POSIX_SHELL" && break
- as_fn_error $? "Cannot locate a working POSIX shell" "$LINENO" 5
- done
+int
+main ()
+{
-cat >>confdefs.h <<_ACEOF
-#define POSIX_SHELL "${POSIX_SHELL}"
+ ;
+ return 0;
+}
_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+fi
- LIBOPTS_BUILD_BLOCKED=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
+$as_echo_n "checking to see if we need ylwrap VPATH hack... " >&6; }
+ntp_vpath_hack="no"
+case "$srcdir::${force_ntp_vpath_hack-no}" in
+ .::*)
+ ;; # VPATH_HACK path is for VPATH builds only.
+ *::yes)
+ ntp_vpath_hack="yes"
+ ;;
+ *::*)
+ case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
+ '')
+ ntp_vpath_hack="yes"
+ esac
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
+$as_echo "$ntp_vpath_hack" >&6; }
+ if test x$ntp_vpath_hack = xyes; then
+ VPATH_HACK_TRUE=
+ VPATH_HACK_FALSE='#'
+else
+ VPATH_HACK_TRUE='#'
+ VPATH_HACK_FALSE=
+fi
- NEED_LIBOPTS_DIR=''
- # Check whether --enable-local-libopts was given.
-if test "${enable_local_libopts+set}" = set; then :
- enableval=$enable_local_libopts;
- if test x$enableval = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
-$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
- LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
- LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
- NEED_LIBOPTS_DIR=true
- fi
-fi
- # Check whether --enable-libopts-install was given.
-if test "${enable_libopts_install+set}" = set; then :
- enableval=$enable_libopts_install;
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
+$as_echo_n "checking for install dir and man conventions... " >&6; }
- if test "X${enable_libopts_install}" != Xno; then
- INSTALL_LIBOPTS_TRUE=
- INSTALL_LIBOPTS_FALSE='#'
+
+# Check whether --with-locfile was given.
+if test "${with_locfile+set}" = set; then :
+ withval=$with_locfile;
else
- INSTALL_LIBOPTS_TRUE='#'
- INSTALL_LIBOPTS_FALSE=
+ with_locfile=no
+
fi
- if test -z "${NEED_LIBOPTS_DIR}" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
-$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+( \
+ SENTINEL_DIR="$PWD" && \
+ cd $srcdir/sntp && \
+ case "$with_locfile" in \
+ yes|no|'') \
+ scripts/genLocInfo -d "$SENTINEL_DIR" \
+ ;; \
+ *) \
+ scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile" \
+ ;; \
+ esac \
+) > genLocInfo.i 2> genLocInfo.err
+. ./genLocInfo.i
-# Check whether --with-autoopts-config was given.
-if test "${with_autoopts_config+set}" = set; then :
- withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
-$as_echo_n "checking whether autoopts-config is specified... " >&6; }
-if ${lo_cv_with_autoopts_config+:} false; then :
- $as_echo_n "(cached) " >&6
+case "$GENLOCINFO" in
+ OK)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
+$as_echo "in file $GENLOCINFOFILE" >&6; }
+ rm genLocInfo.err genLocInfo.i
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+$as_echo "failed." >&6; }
+ as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
+ ;;
+esac
+
+ if test "$CALC_TICKADJ_MS" ; then
+ WANT_CALC_TICKADJ_MS_TRUE=
+ WANT_CALC_TICKADJ_MS_FALSE='#'
else
- if autoopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=autoopts-config
- elif libopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=libopts-config
- else lo_cv_with_autoopts_config=no ; fi
+ WANT_CALC_TICKADJ_MS_TRUE='#'
+ WANT_CALC_TICKADJ_MS_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
-$as_echo "$lo_cv_with_autoopts_config" >&6; }
-fi
- # end of AC_ARG_WITH
- if ${lo_cv_test_autoopts+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "${lo_cv_with_autoopts_config}" \
- -o X"${lo_cv_with_autoopts_config}" = Xno
- then
- if autoopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=autoopts-config
- elif libopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=libopts-config
- else lo_cv_with_autoopts_config=false ; fi
- fi
- lo_cv_test_autoopts=`
- ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
- if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
- then lo_cv_test_autoopts=no ; fi
-fi
- # end of CACHE_VAL
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
-$as_echo "${lo_cv_test_autoopts}" >&6; }
- if test "X${lo_cv_test_autoopts}" != Xno
- then
- LIBOPTS_LDADD="${lo_cv_test_autoopts}"
- LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
- else
- LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
- LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
- NEED_LIBOPTS_DIR=true
- fi
- fi # end of if test -z "${NEED_LIBOPTS_DIR}"
- if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
- NEED_LIBOPTS_DIR=''
- fi
- if test -n "${NEED_LIBOPTS_DIR}"; then
- NEED_LIBOPTS_TRUE=
- NEED_LIBOPTS_FALSE='#'
-else
- NEED_LIBOPTS_TRUE='#'
- NEED_LIBOPTS_FALSE=
-fi
- LIBOPTS_DIR=sntp/libopts
-# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
- # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-fi
-done
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_fork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_fork_works=yes
-else
- ac_cv_func_fork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
-else
- ac_cv_func_fork_works=$ac_cv_func_fork
-fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_vfork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-int
-main ()
-{
- pid_t parent = getpid ();
- pid_t child;
- sparc_address_test (0);
- child = vfork ();
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
- /* Did the child fail? (This shouldn't happen.) */
- || status
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_vfork_works=yes
-else
- ac_cv_func_vfork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
-fi
-if test "x$ac_cv_func_vfork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
-else
-$as_echo "#define vfork fork" >>confdefs.h
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
-$as_echo_n "checking if $CC can handle #warning... " >&6; }
-if ${ntp_cv_cpp_warning+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int
-main ()
-{
-#warning foo
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_cpp_warning=yes
+ if test -z "$NTPSWEEP_NI" ; then
+ INSTALL_NTPSWEEP_TRUE=
+ INSTALL_NTPSWEEP_FALSE='#'
else
- ntp_cv_cpp_warning=no
-
+ INSTALL_NTPSWEEP_TRUE='#'
+ INSTALL_NTPSWEEP_FALSE=
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
-$as_echo "$ntp_cv_cpp_warning" >&6; }
-case "$ntp_cv_cpp_warning" in
- no)
-$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
-esac
-case "$GCC" in
- yes)
- SAVED_CFLAGS_NTP="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
-$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
-if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_gcc_Wstrict_overflow=yes
-else
- ntp_cv_gcc_Wstrict_overflow=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
-$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
- #
- # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
- # flag to CFLAGS.
- #
- CFLAGS="$SAVED_CFLAGS_NTP -Winit-self"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
-$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
-if ${ntp_cv_gcc_Winit_self+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_gcc_Winit_self=yes
-else
- ntp_cv_gcc_Winit_self=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
-$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
- CFLAGS="$SAVED_CFLAGS_NTP"
- { SAVED_CFLAGS_NTP=; unset SAVED_CFLAGS_NTP;}
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS.
- #
-esac
-# Expose a cross-compilation indicator to makefiles
- if test $build != $host; then
- NTP_CROSSCOMPILE_TRUE=
- NTP_CROSSCOMPILE_FALSE='#'
-else
- NTP_CROSSCOMPILE_TRUE='#'
- NTP_CROSSCOMPILE_FALSE=
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bin subdirectory" >&5
-$as_echo_n "checking for bin subdirectory... " >&6; }
-# Check whether --with-binsubdir was given.
-if test "${with_binsubdir+set}" = set; then :
- withval=$with_binsubdir; use_binsubdir="$withval"
-else
- use_binsubdir="bin"
-fi
-case "$use_binsubdir" in
- bin)
- ;;
- sbin)
- ;;
- *)
- as_fn_error $? "<$use_binsubdir> is illegal - must be \"bin\" or \"sbin\"" "$LINENO" 5
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_binsubdir" >&5
-$as_echo "$use_binsubdir" >&6; }
-BINSUBDIR=$use_binsubdir
- if test "bin" = "$BINSUBDIR"; then
- NTP_BINSUBDIR_IS_BIN_TRUE=
- NTP_BINSUBDIR_IS_BIN_FALSE='#'
-else
- NTP_BINSUBDIR_IS_BIN_TRUE='#'
- NTP_BINSUBDIR_IS_BIN_FALSE=
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
-$as_echo_n "checking for deprecated --with-arlib... " >&6; }
-# Check whether --with-arlib was given.
-if test "${with_arlib+set}" = set; then :
- withval=$with_arlib; ans=$withval
-else
- ans=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-case "$ans" in
- yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
-$as_echo "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
-esac
-# Check whether --with-rpath was given.
-if test "${with_rpath+set}" = set; then :
- withval=$with_rpath; ans=$withval
-else
- ans=x
-fi
-case "$ans" in
- no)
- need_dash_r=
- ;;
- yes)
- need_dash_r=1
- ;;
-esac
-# HMS: Why isn't this $build?
-# Well, that depends on if we need this for the build toolchain or
-# for info in the host executable...
-# I still have no idea which way this should go, but nobody has complained.
-case "$host" in
- *-*-netbsd*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- esac
- ;;
- *-*-solaris*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- 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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
- test -n "$AWK" && break
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "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 -Wextra"
- # CFLAGS="$CFLAGS -Wfloat-equal"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
- case "$ntp_cv_gcc_Winit_self" in
- yes)
- CFLAGS="$CFLAGS -Winit-self"
- esac
- case "$ntp_cv_gcc_Wstrict_overflow" in
- yes)
- CFLAGS="$CFLAGS -Wstrict-overflow"
+
+
+# So far, the only shared library we might use is libopts.
+# It's a small library - we might as well use a static version of it.
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
esac
- # -W[no-]strict-prototypes is added later depending on OpenSSL
-esac
+else
+ enable_shared=no
+fi
+
+
-ac_busted_vpath_in_make=no
-case "$build" in
- *-*-irix6.1*) # 64 bit only
- # busted vpath?
- ;;
- *-*-irix6*) # 6.2 (and later?)
- ac_busted_vpath_in_make=yes
- ;;
- *-*-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
- '')
- as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
- ;;
- *) ;;
- esac
- ;;
-esac
@@ -11081,6 +10875,17 @@ done
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+
+
+
+
# Set options
@@ -15011,83 +14816,533 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if ${ac_cv_prog_CXXCPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+else
+ _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
- ac_config_commands="$ac_config_commands libtool"
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-# Only expand once:
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ with_gnu_ld=no
fi
-if test $ac_cv_c_compiler_gnu = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
-if ${ac_cv_prog_gcc_traditional+:} false; then :
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_pattern="Autoconf.*'x'"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
else
- ac_cv_prog_gcc_traditional=no
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
-rm -f conftest*
-
-
- if test $ac_cv_prog_gcc_traditional = no; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if ${ac_cv_c_volatile+:} false; then :
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15097,298 +15352,2756 @@ int
main ()
{
-volatile int x;
-int * volatile y = (int *) 0;
-return !x && !y;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_volatile=yes
-else
- ac_cv_c_volatile=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
-if test $ac_cv_c_volatile = no; then
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
-$as_echo "#define volatile /**/" >>confdefs.h
+fi
+ aix_libpath=$lt_cv_aix_libpath__CXX
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
-$as_echo_n "checking for library containing strerror... " >&6; }
-if ${ac_cv_search_strerror+:} false; then :
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strerror ();
int
main ()
{
-return strerror ();
+
;
return 0;
}
_ACEOF
-for ac_lib in '' cposix; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_strerror=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_strerror+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_strerror+:} false; then :
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
-else
- ac_cv_search_strerror=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
-$as_echo "$ac_cv_search_strerror" >&6; }
-ac_res=$ac_cv_search_strerror
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ aix_libpath=$lt_cv_aix_libpath__CXX
fi
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ fi
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_PERL+:} false; then :
- $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PATH_PERL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX=' '
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=yes
+ file_list_spec_CXX='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+ enable_shared_with_static_runtimes_CXX=yes
+ # Don't use ranlib
+ old_postinstall_cmds_CXX='chmod 644 $oldlib'
+ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ whole_archive_flag_spec_CXX=''
fi
-done
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs_CXX=yes
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+ '"$old_archive_cmds_CXX"
+ reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+ '"$reload_cmds_CXX"
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
done
-IFS=$as_save_IFS
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
fi
-PATH_PERL=$ac_cv_path_PATH_PERL
-if test -n "$PATH_PERL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
-$as_echo "$PATH_PERL" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_SH+:} false; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PATH_SH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
- ;;
-esac
fi
-PATH_SH=$ac_cv_path_PATH_SH
-if test -n "$PATH_SH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_SH" >&5
-$as_echo "$PATH_SH" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ lt_prog_compiler_static_CXX=
fi
-# Extract the first word of "test", so it can be a program name with args.
-set dummy test; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_TEST+:} false; then :
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
- case $PATH_TEST in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PATH_TEST="$PATH_TEST" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PATH_TEST="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
- ;;
-esac
fi
-PATH_TEST=$ac_cv_path_PATH_TEST
-if test -n "$PATH_TEST"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
-$as_echo "$PATH_TEST" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-# Check whether --with-net-snmp-config was given.
-if test "${with_net_snmp_config+set}" = set; then :
- withval=$with_net_snmp_config; ans=$withval
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
else
- ans=yes
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*) ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ ;;
+ esac
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc_CXX=no
+ else
+ lt_cv_archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+ archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+ ;;
+ esac
+ fi
+ ;;
+esac
-case "$ans" in
- no)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
;;
- yes)
- ans=net-snmp-config
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
- /*)
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
;;
- */*)
- as_fn_error $? "--with-net-snmp-config takes either a name or an absolute path" "$LINENO" 5
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
;;
- *)
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
;;
-esac
-PROG_NET_SNMP_CONFIG=$ans
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
-$as_echo_n "checking for net-snmp-config path... " >&6; }
-case "$PROG_NET_SNMP_CONFIG" in
- no) ;;
- /*)
- PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
;;
- *)
- # Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
-set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_NET_SNMP_CONFIG+:} false; then :
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
$as_echo_n "(cached) " >&6
else
- case $PATH_NET_SNMP_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # Let the user override the test with a path.
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
;;
- *)
- 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
fi
-done
- done
-IFS=$as_save_IFS
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
;;
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
-if test -n "$PATH_NET_SNMP_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
-$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
fi
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
-$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
-case "$host" in
- *-*-vxworks*)
- ac_link="$ac_link $VX_KERNEL"
- ;;
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+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_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+# NTP has (so far) been relying on leading-edge autogen, which
+# means we need the appropriate corresponding libopts as well.
+# Therefore, by default:
+# - use the version of libopts we ship with
+# - do not install it
+# - build a static copy (AC_DISABLE_SHARED - done earlier)
+case "${enable_local_libopts+set}" in
+ set) ;;
+ *) enable_local_libopts=yes ;;
esac
+case "${enable_libopts_install+set}" in
+ set) ;;
+ *) enable_libopts_install=no ;;
+esac
+enable_nls=no
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+fi
-ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent"
-if test "x$ac_cv_func_gethostent" = xyes; then :
+ ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostent" >&5
-$as_echo_n "checking for library containing gethostent... " >&6; }
-if ${ac_cv_search_gethostent+:} false; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -15401,56 +18114,51 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char gethostent ();
+char opendir ();
int
main ()
{
-return gethostent ();
+return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' dir; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
- LIBS="-l$ac_lib $libxnet -lsocket $ac_func_search_save_LIBS"
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_gethostent=$ac_res
+ ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_gethostent+:} false; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if ${ac_cv_search_gethostent+:} false; then :
+if ${ac_cv_search_opendir+:} false; then :
else
- ac_cv_search_gethostent=no
+ ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostent" >&5
-$as_echo "$ac_cv_search_gethostent" >&6; }
-ac_res=$ac_cv_search_gethostent
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-fi
-
-ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
-if test "x$ac_cv_func_openlog" = xyes; then :
-
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -15463,16 +18171,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char openlog ();
+char opendir ();
int
main ()
{
-return openlog ();
+return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' gen; do
+for ac_lib in '' x; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -15480,95 +18188,521 @@ for ac_lib in '' gen; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_openlog=$ac_res
+ ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if ${ac_cv_search_openlog+:} false; then :
+if ${ac_cv_search_opendir+:} false; then :
else
- ac_cv_search_openlog=no
+ ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
-ac_res=$ac_cv_search_openlog
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
+
+fi
+
+
+ # =================
+ # AC_CHECK_HEADERS
+ # =================
+ for ac_header in \
+ sys/mman.h sys/param.h sys/poll.h sys/procset.h \
+ sys/select.h sys/socket.h sys/stropts.h sys/time.h \
+ sys/un.h sys/wait.h dlfcn.h errno.h \
+ fcntl.h libgen.h libintl.h memory.h \
+ netinet/in.h setjmp.h stdbool.h sysexits.h \
+ unistd.h utime.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ for ac_header in stdarg.h varargs.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_arg_hdr=true;break
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
+ lo_have_arg_hdr=false
+fi
+
+done
+
+
+ for ac_header in string.h strings.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_str_hdr=true;break
+else
+ lo_have_str_hdr=false
+fi
+
+done
+
+
+ for ac_header in limits.h sys/limits.h values.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_lim_hdr=true;break
+else
+ lo_have_lim_hdr=false
+fi
+
+done
+
+
+ for ac_header in inttypes.h stdint.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_typ_hdr=true;break
+else
+ lo_have_typ_hdr=false
+fi
+
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
+$as_echo_n "checking for working stdnoreturn.h... " >&6; }
+if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv) {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char openlog ();
int
main ()
{
-return openlog ();
+
;
return 0;
}
_ACEOF
-for ac_lib in '' syslog; do
- if test -z "$ac_lib"; then
- ac_res="none required"
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_stdnoreturn_h=yes
+else
+ gl_cv_header_working_stdnoreturn_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
+$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
+
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $libxnet -lsocket $ac_func_search_save_LIBS"
+ STDNORETURN_H='stdnoreturn.h'
fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_openlog=$ac_res
+
+
+ if test -n "$STDNORETURN_H"; then
+ GL_GENERATE_STDNORETURN_H_TRUE=
+ GL_GENERATE_STDNORETURN_H_FALSE='#'
+else
+ GL_GENERATE_STDNORETURN_H_TRUE='#'
+ GL_GENERATE_STDNORETURN_H_FALSE=
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
- break
+
+
+
+ # ----------------------------------------------------------------------
+ # check for various programs used during the build.
+ # On OS/X, "wchar.h" needs "runetype.h" to work properly.
+ # ----------------------------------------------------------------------
+ for ac_header in runetype.h wchar.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
+
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
-if ${ac_cv_search_openlog+:} false; then :
+
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls;
+fi
+
+ if test "x$enable_nls" != "xno" && \
+ test "X${ac_cv_header_libintl_h}" = Xyes; then :
+
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+fi
+
+ # --------------------------------------------
+ # Verify certain entries from AC_CHECK_HEADERS
+ # --------------------------------------------
+ ${lo_have_arg_hdr} || \
+ as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
+
+ ${lo_have_str_hdr} || \
+ as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
+
+ ${lo_have_lim_hdr} || \
+ as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
+
+ ${lo_have_typ_hdr} || \
+ as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
+
+ for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
+ do eval as_ac_var=\${ac_cv_header_${f}_h}
+ test "X${as_ac_var}" = Xyes || {
+ as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
+ }
+ done
+ test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
+ echo '#include <stdint.h>' > inttypes.h
+
+ # ----------------------------------------------------------------------
+ # Checks for typedefs
+ # ----------------------------------------------------------------------
+ ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
+if test "x$ac_cv_type_wchar_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WCHAR_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
+ #if HAVE_WCHAR_H
+ # include <wchar.h>
+ #endif
+
+"
+if test "x$ac_cv_type_wint_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
+if test "x$ac_cv_type_int8_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT8_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint8_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT8_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
+if test "x$ac_cv_type_int16_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT16_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint16_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT16_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
+if test "x$ac_cv_type_int32_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT32_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint32_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT32_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PID_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIZE_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
+
+
+fi
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5
+$as_echo_n "checking size of char*... " >&6; }
+if ${ac_cv_sizeof_charp+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_search_openlog=no
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_charp" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (char*)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_charp=0
+ fi
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
-ac_res=$ac_cv_search_openlog
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5
+$as_echo "$ac_cv_sizeof_charp" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHARP $ac_cv_sizeof_charp
+_ACEOF
+
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
-$as_echo_n "checking for library containing MD5Init... " >&6; }
-if ${ac_cv_search_MD5Init+:} false; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+
+ # ------------
+ # AC_CHECK_LIB
+ # ------------
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
+$as_echo_n "checking for pathfind in -lgen... " >&6; }
+if ${ac_cv_lib_gen_pathfind+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15578,58 +18712,1423 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char MD5Init ();
+char pathfind ();
int
main ()
{
-return MD5Init ();
+return pathfind ();
;
return 0;
}
_ACEOF
-for ac_lib in '' md5 md; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_MD5Init=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_gen_pathfind=yes
+else
+ ac_cv_lib_gen_pathfind=no
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_MD5Init+:} false; then :
- break
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
+$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
+if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGEN 1
+_ACEOF
+
+ LIBS="-lgen $LIBS"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_gettext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gettext ();
+int
+main ()
+{
+return gettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_gettext=yes
+else
+ ac_cv_lib_intl_gettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
+$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL 1
+_ACEOF
+
+ LIBS="-lintl $LIBS"
+
+fi
+
+ for ac_func in vprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
+if test "x$ac_cv_func_vprintf" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VPRINTF 1
+_ACEOF
+
+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes; then :
+
+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+
+fi
+
fi
done
-if ${ac_cv_search_MD5Init+:} false; then :
+
+ for ac_header in vfork.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in fork vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if ${ac_cv_func_fork_works+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_search_MD5Init=no
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_fork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_fork_works=yes
+else
+ ac_cv_func_fork_works=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
-$as_echo "$ac_cv_search_MD5Init" >&6; }
-ac_res=$ac_cv_search_MD5Init
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if ${ac_cv_func_vfork_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_vfork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
+int
+main ()
+{
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_vfork_works=yes
+else
+ ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
-for ac_func in MD5Init
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+ for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
+ strrchr strsignal fchmod fstat chmod
do :
- ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
-if test "x$ac_cv_func_MD5Init" = xyes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_MD5INIT 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+ while :
+ do
+ POSIX_SHELL=`which bash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which dash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=/usr/xpg4/bin/sh
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`/bin/sh -c '
+ exec 2>/dev/null
+ if ! true ; then exit 1 ; fi
+ echo /bin/sh'`
+ test -x "$POSIX_SHELL" && break
+ as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
+ done
+
+cat >>confdefs.h <<_ACEOF
+#define POSIX_SHELL "${POSIX_SHELL}"
+_ACEOF
+
+
+
+
+
+ LIBOPTS_BUILD_BLOCKED=true
+
+
+ NEED_LIBOPTS_DIR=''
+
+ # Check whether --enable-local-libopts was given.
+if test "${enable_local_libopts+set}" = set; then :
+ enableval=$enable_local_libopts;
+ if test x$enableval = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
+$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
+ LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
+ NEED_LIBOPTS_DIR=true
+ LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
+ fi
+fi
+
+
+ # Check whether --enable-libopts-install was given.
+if test "${enable_libopts_install+set}" = set; then :
+ enableval=$enable_libopts_install;
+fi
+
+ if test "X${enable_libopts_install}" = Xyes; then
+ INSTALL_LIBOPTS_TRUE=
+ INSTALL_LIBOPTS_FALSE='#'
+else
+ INSTALL_LIBOPTS_TRUE='#'
+ INSTALL_LIBOPTS_FALSE=
+fi
+
+
+ if test -z "${NEED_LIBOPTS_DIR}" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
+$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+
+# Check whether --with-autoopts-config was given.
+if test "${with_autoopts_config+set}" = set; then :
+ withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
+$as_echo_n "checking whether autoopts-config is specified... " >&6; }
+if ${lo_cv_with_autoopts_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if autoopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=autoopts-config
+ elif libopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=libopts-config
+ else lo_cv_with_autoopts_config=no ; fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
+$as_echo "$lo_cv_with_autoopts_config" >&6; }
+
+fi
+ # end of AC_ARG_WITH
+
+ if ${lo_cv_test_autoopts+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test -z "${lo_cv_with_autoopts_config}" \
+ -o X"${lo_cv_with_autoopts_config}" = Xno
+ then
+ if autoopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=autoopts-config
+ elif libopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=libopts-config
+ else lo_cv_with_autoopts_config=false ; fi
+ fi
+ lo_cv_test_autoopts=`
+ ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
+ if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
+ then lo_cv_test_autoopts=no ; fi
+
+fi
+ # end of CACHE_VAL
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
+$as_echo "${lo_cv_test_autoopts}" >&6; }
+
+ if test "X${lo_cv_test_autoopts}" != Xno
+ then
+ LIBOPTS_LDADD="${lo_cv_test_autoopts}"
+ LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
+ else
+ LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
+ LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
+ NEED_LIBOPTS_DIR=true
+ fi
+ fi # end of if test -z "${NEED_LIBOPTS_DIR}"
+ if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
+ NEED_LIBOPTS_DIR=''
+ fi
+ if test -n "${NEED_LIBOPTS_DIR}"; then
+ NEED_LIBOPTS_TRUE=
+ NEED_LIBOPTS_FALSE='#'
+else
+ NEED_LIBOPTS_TRUE='#'
+ NEED_LIBOPTS_FALSE=
+fi
+
+
+
+ LIBOPTS_DIR=sntp/libopts
+
+
+# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
+
+ # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
+
+
+
+
+# Check whether --enable-local-libevent was given.
+if test "${enable_local_libevent+set}" = set; then :
+ enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
+else
+ ntp_use_local_libevent=${ntp_use_local_libevent-detect}
+
+fi
+
+
+
+
+
+
+# Expose a cross-compilation indicator to makefiles
+ if test $build != $host; then
+ NTP_CROSSCOMPILE_TRUE=
+ NTP_CROSSCOMPILE_FALSE='#'
+else
+ NTP_CROSSCOMPILE_TRUE='#'
+ NTP_CROSSCOMPILE_FALSE=
+fi
+
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+ # Check whether --enable-c99-snprintf was given.
+if test "${enable_c99_snprintf+set}" = set; then :
+ enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
+else
+ force_c99_snprintf=no
+
+fi
+
+ case "$force_c99_snprintf" in
+ yes)
+ hw_force_rpl_snprintf=yes
+ hw_force_rpl_vsnprintf=yes
+ esac
+
+
+
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
+if test "x$ac_cv_func_vsnprintf" = xyes; then :
+ hw_cv_func_vsnprintf=yes
+else
+ hw_cv_func_vsnprintf=no
+fi
+
+ if test "$hw_cv_func_vsnprintf" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
+$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_vsnprintf_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ hw_cv_func_vsnprintf_c99=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_STDARG_H
+ #include <stdarg.h>
+ #endif
+ #include <stdio.h>
+ static int testprintf(char *buf, size_t size, const char *format, ...)
+ {
+ int result;
+ va_list ap;
+ va_start(ap, format);
+ result = vsnprintf(buf, size, format, ap);
+ va_end(ap);
+ return result;
+ }
+int
+main ()
+{
+char buf[43];
+ if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ hw_cv_func_vsnprintf_c99=yes
+else
+ hw_cv_func_vsnprintf_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
+$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
+else
+ hw_cv_func_vsnprintf_c99=no
+fi
+
+$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
+$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
+ if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
+ hw_use_rpl_vsnprintf=yes
+else
+ hw_use_rpl_vsnprintf=no
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
+$as_echo "$hw_use_rpl_vsnprintf" >&6; }
+ if test "$hw_use_rpl_vsnprintf" = yes; then :
+
+$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
+
+ if test ${hw_nodef_vsnprintf=no} = no; then :
+
+$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
+
+fi
+ for ac_header in inttypes.h locale.h stddef.h stdint.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
+_ACEOF
+
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if ${ac_cv_type_long_double+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$GCC" = yes; then
+ ac_cv_type_long_double=yes
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* The Stardent Vistra knows sizeof (long double), but does
+ not support it. */
+ long double foo = 0.0L;
+int
+main ()
+{
+static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ sizeof (double) <= sizeof (long double))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_long_double=yes
+else
+ ac_cv_type_long_double=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+$as_echo "$ac_cv_type_long_double" >&6; }
+ if test $ac_cv_type_long_double = yes; then
+
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long int' \
+ || ac_type='long int'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+fi
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintmax_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long int' \
+ || ac_type='unsigned long int'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $ac_type
+_ACEOF
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
+
+
+fi
+
+ for ac_func in localeconv
+do :
+ ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
+if test "x$ac_cv_func_localeconv" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALECONV 1
+_ACEOF
+
+fi
+done
+
+
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* 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";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 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;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+
+
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+ _hw_cv_func_xprintf_replace_done=yes
+fi
+
+fi
+
+
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes; then :
+ hw_cv_func_snprintf=yes
+else
+ hw_cv_func_snprintf=no
+fi
+
+ if test "$hw_cv_func_snprintf" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
+$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_snprintf_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ hw_cv_func_snprintf_c99=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+char buf[43];
+ if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ hw_cv_func_snprintf_c99=yes
+else
+ hw_cv_func_snprintf_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
+$as_echo "$hw_cv_func_snprintf_c99" >&6; }
+else
+ hw_cv_func_snprintf_c99=no
+fi
+
+$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
+$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
+ if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
+ hw_use_rpl_snprintf=yes
+else
+ hw_use_rpl_snprintf=no
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
+$as_echo "$hw_use_rpl_snprintf" >&6; }
+ if test "$hw_use_rpl_snprintf" = yes; then :
+
+$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
+
+ if test ${hw_nodef_snprintf=no} = no; then :
+
+$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
+
+fi
+
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* 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";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 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;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+
+
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+ _hw_cv_func_xprintf_replace_done=yes
+fi
+
+fi
+
+
+
+
+
+# HMS: Save $LIBS and empty it.
+# any LIBS we add here should go in to LDADD_LIBNTP
+
+__LIBS=$LIBS
+LIBS=
+
+
+
+# [Bug 2332] because we need to know if we are using GNU ld...
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
+$as_echo_n "checking for directory path separator... " >&6; }
+if ${ntp_cv_dir_sep+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$ntp_cv_dir_sep" in
+ '')
+ case "$host_os" in
+ *djgpp | *mingw32* | *emx*)
+ ntp_cv_dir_sep="'\\'"
+ ;;
+ *)
+ ntp_cv_dir_sep="'/'"
+ ;;
+ esac
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
+$as_echo "$ntp_cv_dir_sep" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define DIR_SEP $ntp_cv_dir_sep
+_ACEOF
+
NTP_ORIG_LIBS="$LIBS"
@@ -15885,19 +20384,18 @@ $as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
{ use_lineeditlibs=; unset use_lineeditlibs;}
-
+LIBM=
case "$host" in
- *-*-*linux*) ;;
- *-*-osf4*) ;;
- *-*-osf5*) ;;
+ *-*-darwin*)
+ ;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_setscheduler in -lrt" >&5
-$as_echo_n "checking for sched_setscheduler in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_setscheduler+:} false; then :
+ _libs=$LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
+$as_echo_n "checking for library containing cos... " >&6; }
+if ${ac_cv_search_cos+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15907,417 +20405,596 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char sched_setscheduler ();
+char cos ();
int
main ()
{
-return sched_setscheduler ();
+return cos ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_rt_sched_setscheduler=yes
-else
- ac_cv_lib_rt_sched_setscheduler=no
+for ac_lib in '' m; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_cos=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_cos+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_cos+:} false; then :
+
+else
+ ac_cv_search_cos=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
+$as_echo "$ac_cv_search_cos" >&6; }
+ac_res=$ac_cv_search_cos
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ LIBM="-lm"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_setscheduler" >&5
-$as_echo "$ac_cv_lib_rt_sched_setscheduler" >&6; }
-if test "x$ac_cv_lib_rt_sched_setscheduler" = xyes; then :
+
+ LIBS=$_libs
+ ;;
+esac
+
+{ _libs=; unset _libs;}
+
+
+for ac_header in vfork.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
+#define HAVE_VFORK_H 1
_ACEOF
- LIBS="-lrt $LIBS"
+fi
+
+done
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_setscheduler in -lposix4" >&5
-$as_echo_n "checking for sched_setscheduler in -lposix4... " >&6; }
-if ${ac_cv_lib_posix4_sched_setscheduler+:} false; then :
+for ac_func in fork vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if ${ac_cv_func_fork_works+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix4 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_fork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_setscheduler ();
+$ac_includes_default
int
main ()
{
-return sched_setscheduler ();
+
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_posix4_sched_setscheduler=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_fork_works=yes
else
- ac_cv_lib_posix4_sched_setscheduler=no
+ ac_cv_func_fork_works=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_setscheduler" >&5
-$as_echo "$ac_cv_lib_posix4_sched_setscheduler" >&6; }
-if test "x$ac_cv_lib_posix4_sched_setscheduler" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPOSIX4 1
-_ACEOF
-
- LIBS="-lposix4 $LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
fi
-
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-$as_echo_n "checking for library containing setsockopt... " >&6; }
-if ${ac_cv_search_setsockopt+:} false; then :
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if ${ac_cv_func_vfork_works+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_vfork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
#ifdef __cplusplus
-extern "C"
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
#endif
-char setsockopt ();
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
int
main ()
{
-return setsockopt ();
- ;
- return 0;
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
}
_ACEOF
-for ac_lib in '' socket xnet; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_setsockopt=$ac_res
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_vfork_works=yes
+else
+ ac_cv_func_vfork_works=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_setsockopt+:} false; then :
- break
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-done
-if ${ac_cv_search_setsockopt+:} false; then :
-else
- ac_cv_search_setsockopt=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
-$as_echo "$ac_cv_search_setsockopt" >&6; }
-ac_res=$ac_cv_search_setsockopt
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
fi
+if test "x$ac_cv_func_fork_works" = xyes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
-$as_echo_n "checking for library containing res_init... " >&6; }
-if ${ac_cv_search_res_init+:} false; then :
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_init ();
+#include <alloca.h>
int
main ()
{
-return res_init ();
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lsocket -lnsl $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_res_init=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_res_init+:} false; then :
- break
+ conftest$ac_exeext conftest.$ac_ext
fi
-done
-if ${ac_cv_search_res_init+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
-else
- ac_cv_search_res_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
-$as_echo "$ac_cv_search_res_init" >&6; }
-ac_res=$ac_cv_search_res_init
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
fi
-case "$host" in
- *-*-darwin*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_9_init in -lresolv" >&5
-$as_echo_n "checking for res_9_init in -lresolv... " >&6; }
-if ${ac_cv_lib_resolv_res_9_init+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+# endif
+# endif
+# endif
+# endif
#endif
-char res_9_init ();
+
int
main ()
{
-return res_9_init ();
+char *p = (char *) alloca (1);
+ if (p) return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_resolv_res_9_init=yes
+ ac_cv_func_alloca_works=yes
else
- ac_cv_lib_resolv_res_9_init=no
+ ac_cv_func_alloca_works=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_9_init" >&5
-$as_echo "$ac_cv_lib_resolv_res_9_init" >&6; }
-if test "x$ac_cv_lib_resolv_res_9_init" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
- LIBS="-lresolv $LIBS"
+if test $ac_cv_func_alloca_works = yes; then
-fi
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
- ;;
-esac
-for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h> /* inet_ functions / structs */
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-# include <arpa/nameser.h> /* DNS HEADER struct */
-#endif
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-#endif
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
-fi
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
-done
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
-for ac_func in res_init __res_init
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
_ACEOF
+ break
fi
-done
+ done
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
int
main ()
{
-
- ;
- return 0;
+ return find_stack_direction () < 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
else
- ac_cv_header_stdc=no
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
_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*
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
fi
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+for ac_func in strerror_r
+do :
+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
_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*
+done
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if ${ac_cv_func_strerror_r_char_p+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-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 :
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.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)))
+$ac_includes_default
+ extern char *strerror_r ();
int
main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
+ ac_cv_func_strerror_r_char_p=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+ fi
+
fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
-for ac_header in bstring.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
-if test "x$ac_cv_header_bstring_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_BSTRING_H 1
-_ACEOF
-fi
+ac_busted_vpath_in_make=no
+case "$build" in
+ *-*-irix6.1*) # 64 bit only
+ # busted vpath?
+ ;;
+ *-*-irix6*) # 6.2 (and later?)
+ ac_busted_vpath_in_make=yes
+ ;;
+ *-*-solaris2.5.1)
+ ac_busted_vpath_in_make=yes
+ ;;
+ *-*-unicosmp*)
+ ac_busted_vpath_in_make=yes
+ ;;
+esac
-done
+case "$ac_busted_vpath_in_make$srcdir" in
+ yes.|no*)
+ ;;
+ *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
+ '')
+ as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
+ esac
+ ;;
+esac
-ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
-if test "x$ac_cv_header_dns_sd_h" = xyes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNSServiceRegister in -ldns_sd" >&5
-$as_echo_n "checking for DNSServiceRegister in -ldns_sd... " >&6; }
-if ${ac_cv_lib_dns_sd_DNSServiceRegister+:} false; then :
+case "$host" in
+ *-*-aix4*)
+ # Bug 2516:
+ # Was *-*-aix[[4-9]]*
+ # XXX only verified thru AIX6. But...
+ # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
+ # that this support would be in 5.3, removed in 6, and added back.
+ #
+ # (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.
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldns_sd $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16327,100 +21004,82 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char DNSServiceRegister ();
+char clock_gettime ();
int
main ()
{
-return DNSServiceRegister ();
+return clock_gettime ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dns_sd_DNSServiceRegister=yes
-else
- ac_cv_lib_dns_sd_DNSServiceRegister=no
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dns_sd_DNSServiceRegister" >&5
-$as_echo "$ac_cv_lib_dns_sd_DNSServiceRegister" >&6; }
-if test "x$ac_cv_lib_dns_sd_DNSServiceRegister" = xyes; then :
-
-$as_echo "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
-
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+else
+ ac_cv_search_clock_gettime=no
fi
-
-
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
fi
-
-
-case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
- yes)
- LIBS="-ldns_sd $LIBS"
-esac
-for ac_header in errno.h fcntl.h ieeefp.h kvm.h math.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_clock_gettime" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
+ esac
fi
-done
-
-
-for ac_header in md5.h
+ for ac_func in clock_getres clock_gettime clock_settime
do :
- ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
-
-
-"
-if test "x$ac_cv_header_md5_h" = xyes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_MD5_H 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
-
done
-for ac_header in memory.h netdb.h poll.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
+ ;;
+esac
-for ac_header in sgtty.h stdlib.h string.h termio.h
+for ac_func in getclock stime timegm strlcpy strlcat
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
-
done
-for ac_header in termios.h timepps.h timex.h unistd.h
+
+#
+for ac_header in errno.h sys/socket.h sys/types.h time.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16433,138 +21092,83 @@ fi
done
-
-case "$host" in
- *-*-aix*)
- for ac_header in utmpx.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
-if test "x$ac_cv_header_utmpx_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UTMPX_H 1
-_ACEOF
-
-fi
-
-done
-
- case "$ac_cv_header_utmpx_h" in
- yes)
- ;;
- *)
- for ac_header in utmp.h
+for ac_header in net/if.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_utmp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UTMP_H 1
-_ACEOF
+ ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
-fi
-
-done
-
- ;;
- esac
- ;;
- *)
- for ac_header in utmp.h utmpx.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+"
+if test "x$ac_cv_header_net_if_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_NET_IF_H 1
_ACEOF
fi
done
- ;;
-esac
-
-#
-# On Suns only (so far) getpass() truncates the typed password to 8
-# characters, but getpassphrase() allows up to 257. Most systems'
-# getpass() does not truncate, at least not so as to affect ntpq and
-# ntpdc password prompts.
-#
-# So check for getpassphrase(), but only on Sun operating systems.
-#
case "$host" in
- *-*-sunos*|*-*-solaris*)
- for ac_func in getpassphrase
-do :
- ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
-if test "x$ac_cv_func_getpassphrase" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETPASSPHRASE 1
-_ACEOF
+ *-hp-hpux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
+$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
+if ${ntp_cv_predecl_mpinfou+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-fi
-done
+ np_cv_predecl_mpinfou=no
+ case "$ac_cv_header_net_if_h" in
+ no)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-esac
+ typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+ } mpinfou_t;
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #include <net/if.h>
-for ac_header in arpa/nameser.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
-if test "x$ac_cv_header_arpa_nameser_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ARPA_NAMESER_H 1
-_ACEOF
+int
+main ()
+{
-fi
-done
-for ac_header in sys/socket.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_socket_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SOCKET_H 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
-fi
-
-done
+ ntp_cv_predecl_mpinfou=yes
+ ac_cv_header_net_if_h=yes
-#
-case "$host" in
- *-hp-hpux*)
- for ac_header in net/netmp.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "net/netmp.h" "ac_cv_header_net_netmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_netmp_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_NETMP_H 1
-_ACEOF
- netmp_h_works=yes
-else
- netmp_h_works=no
-
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ esac
-done
- case "$netmp_h_works" in
- no)
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
+$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
+ case "$ntp_cv_predecl_mpinfou" in
+ yes)
cat >>confdefs.h <<_ACEOF
#ifndef MPINFOU_PREDECLARED
# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
+typedef union mpinfou {
struct pdk_mpinfo *pdkptr;
struct mpinfo *pikptr;
} mpinfou_t;
#endif
_ACEOF
- ;;
esac
- ;;
esac
case "$host" in
@@ -16588,78 +21192,90 @@ done
esac
-for ac_header in net/if.h
+for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
do :
- ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-"
-if test "x$ac_cv_header_net_if_h" = xyes; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF_H 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
-for ac_header in net/if6.h
+# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
+for ac_header in sys/sysctl.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_if6_h" = xyes; then :
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+ #if defined HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_IF6_H 1
+#define HAVE_SYS_SYSCTL_H 1
_ACEOF
fi
done
-for ac_header in net/route.h
+for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
do :
- ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-"
-if test "x$ac_cv_header_net_route_h" = xyes; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_ROUTE_H 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
-for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
+
+for ac_header in resolv.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+
+"
+if test "x$ac_cv_header_resolv_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_RESOLV_H 1
_ACEOF
fi
done
+
for ac_header in net/if_var.h
do :
- ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
+ ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
"
if test "x$ac_cv_header_net_if_var_h" = xyes; then :
@@ -16671,27 +21287,29 @@ fi
done
+
for ac_header in netinet/ip.h netinet/in_var.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NET_IF_VAR_H
-#include <net/if_var.h>
-#endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_VAR_H
+ # include <net/if_var.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
@@ -16704,1774 +21322,5620 @@ fi
done
-# Check for IPTOS_PREC
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking IPPROTO_IP IP_TOS IPTOS_LOWDELAY" >&5
-$as_echo_n "checking IPPROTO_IP IP_TOS IPTOS_LOWDELAY... " >&6; }
-if ${ntp_cv_ip_tos+:} false; then :
+# HMS: Do we need to check for -lsocket before or after these tests?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+$as_echo_n "checking for library containing inet_pton... " >&6; }
+if ${ac_cv_search_inet_pton+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_NETINET_IP_H
- # include <netinet/in.h>
- # include <netinet/ip.h>
- #endif
- #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
- yes
- #endif
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_pton ();
+int
+main ()
+{
+return inet_pton ();
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
- ntp_cv_ip_tos=yes
+for ac_lib in '' nsl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_pton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_pton+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_pton+:} false; then :
+
else
- ntp_cv_ip_tos=no
+ ac_cv_search_inet_pton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+$as_echo "$ac_cv_search_inet_pton" >&6; }
+ac_res=$ac_cv_search_inet_pton
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_inet_pton" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
+ esac
fi
-rm -f conftest*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
+$as_echo_n "checking for library containing inet_ntop... " >&6; }
+if ${ac_cv_search_inet_ntop+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_ntop=$ac_res
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ip_tos" >&5
-$as_echo "$ntp_cv_ip_tos" >&6; }
-case "$ntp_cv_ip_tos" in
- yes)
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_ntop+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_ntop+:} false; then :
-$as_echo "#define HAVE_IPTOS_SUPPORT 1" >>confdefs.h
+else
+ ac_cv_search_inet_ntop=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
+$as_echo "$ac_cv_search_inet_ntop" >&6; }
+ac_res=$ac_cv_search_inet_ntop
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_inet_ntop" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
+ esac
-esac
+fi
-for ac_header in netinfo/ni.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
-if test "x$ac_cv_header_netinfo_ni_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NETINFO_NI_H 1
+
+# [Bug 1628] On Solaris, we need -lxnet -lsocket. Generalize this to
+# avoid keying on the OS name: If we find socket functions in
+# libsocket, next try for them in libxnet without libsocket, if found,
+# list both. If we simply tested libxnet first, we would find the
+# functions there and never add libsocket. See also [Bug 660]
+# http://bugs.ntp.org/show_bug.cgi?id=660#c9
+saved_LIBS=$LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+$as_echo_n "checking for library containing setsockopt... " >&6; }
+if ${ac_cv_search_setsockopt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setsockopt ();
+int
+main ()
+{
+return setsockopt ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' socket; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_setsockopt=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_setsockopt+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_setsockopt+:} false; then :
+
+else
+ ac_cv_search_setsockopt=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
+$as_echo "$ac_cv_search_setsockopt" >&6; }
+ac_res=$ac_cv_search_setsockopt
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_setsockopt" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
+ esac
fi
+case "$ac_cv_search_setsockopt" in
+ -lsocket)
+ LIBS="$saved_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
+$as_echo_n "checking for library containing getsockopt... " >&6; }
+if ${ac_cv_search_getsockopt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getsockopt ();
+int
+main ()
+{
+return getsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' xnet; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_getsockopt=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_getsockopt+:} false; then :
+ break
+fi
done
+if ${ac_cv_search_getsockopt+:} false; then :
-case "$ac_cv_header_netinfo_ni_h" in
- yes)
+else
+ ac_cv_search_getsockopt=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
+$as_echo "$ac_cv_search_getsockopt" >&6; }
+ac_res=$ac_cv_search_getsockopt
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_getsockopt" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
+ esac
-$as_echo "#define HAVE_NETINFO 1" >>confdefs.h
+fi
+ # XXX Possible trouble here - reading the comments above and looking at the
+ # code below I wonder if we'll add -lxnet when we don't need it.
+ # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
+ # there when it is not needed?
+ case "$ac_cv_search_getsockopt" in
+ -lxnet)
+ LIBS="-lxnet -lsocket $saved_LIBS"
+ ;;
+ *) LIBS="-lsocket $saved_LIBS"
+ ;;
+ esac
+ ;;
esac
-for ac_header in sun/audioio.h sys/audioio.h
+{ saved_LIBS=; unset saved_LIBS;}
+
+# Bug 2427 - look for recvmsg here.
+for ac_func in recvmsg
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_RECVMSG 1
_ACEOF
fi
-
done
-for ac_header in sys/clkdefs.h sys/file.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
-done
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
-case "$host" in
- *-*-sunos4*)
+
+case "$ac_cv_c_inline" in
+ '')
;;
*)
- for ac_header in sys/ioctl.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_IOCTL_H 1
+
+$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_time=yes
+else
+ ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
-done
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+$as_echo_n "checking size of time_t... " >&6; }
+if ${ac_cv_sizeof_time_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
- ;;
-esac
-for ac_header in sys/ipc.h sys/lock.h sys/mman.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+else
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+$as_echo "$ac_cv_sizeof_time_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+$as_echo_n "checking whether char is unsigned... " >&6; }
+if ${ac_cv_c_char_unsigned+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((char) -1) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_char_unsigned=no
+else
+ ac_cv_c_char_unsigned=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+$as_echo "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+ $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
-done
+fi
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
+$as_echo_n "checking size of signed char... " >&6; }
+if ${ac_cv_sizeof_signed_char+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
-for ac_header in sys/modem.h sys/param.h sys/ppsclock.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+else
+ if test "$ac_cv_type_signed_char" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (signed char)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_signed_char=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
+$as_echo "$ac_cv_sizeof_signed_char" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
_ACEOF
+
+ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
+if test "x$ac_cv_type_s_char" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_S_CHAR 1
+_ACEOF
+
+
fi
+ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = xyes; then :
-done
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
-# HMS: Check sys/proc.h and sys/resource.h after some others
-for ac_header in sys/ppstime.h sched.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+
+fi
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
fi
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
-case "$ac_cv_header_sched_h" in
- yes)
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+case "$ac_cv_type_long_long" in
+ no)
;;
*)
- for ac_header in sys/sched.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sched_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SCHED_H 1
-_ACEOF
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if ${ac_cv_sizeof_long_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
fi
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
;;
esac
-case "$host" in
- *-*-sco*)
- for ac_header in sys/sio.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/sio.h" "ac_cv_header_sys_sio_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sio_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SIO_H 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.
-done
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+
+ ;;
+ no1no)
+ # We have signed chars, can say 'signed char', no s_char typedef.
+
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+
+ ;;
+ yes0no)
+ # We have unsigned chars, can't say 'signed char', no s_char typedef.
+ as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
+ ;;
+ yes1no)
+ # We have unsigned chars, can say 'signed char', no s_char typedef.
+
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
;;
esac
-# HMS: Check sys/shm.h after some others
-for ac_header in sys/select.h sys/signal.h sys/sockio.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
-done
+$as_echo "#define uid_t int" >>confdefs.h
-# HMS: Checked sys/socket.h earlier
-case "$host" in
- *-*-netbsd*)
- ;;
- *)
- for ac_header in machine/soundcard.h sys/soundcard.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+
+$as_echo "#define gid_t int" >>confdefs.h
fi
-done
- ;;
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
+$as_echo_n "checking if we're including debugging code... " >&6; }
+# Check whether --enable-debugging was given.
+if test "${enable_debugging+set}" = set; then :
+ enableval=$enable_debugging; ntp_ok=$enableval
+else
+ ntp_ok=yes
+
+fi
+
+case "$ntp_ok" in
+ yes)
+
+$as_echo "#define DEBUG 1" >>confdefs.h
+
esac
-for ac_header in sys/stat.h sys/stream.h sys/stropts.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+
+
+
+# check if we can compile with pthreads
+for ac_header in semaphore.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
+if test "x$ac_cv_header_semaphore_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_SEMAPHORE_H 1
_ACEOF
fi
done
-# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
-for ac_header in sys/sysctl.h
+for ac_func in socketpair
do :
- ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-"
-if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SYSCTL_H 1
+#define HAVE_SOCKETPAIR 1
_ACEOF
fi
-
done
-for ac_header in sys/syssgi.h sys/systune.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+# Check whether --enable-thread-support was given.
+if test "${enable_thread_support+set}" = set; then :
+ enableval=$enable_thread_support;
+else
+ enable_thread_support=yes
fi
-done
+have_pthreads=no
+case "$enable_thread_support" in
+ yes)
+ ol_found_pthreads=no
+
-for ac_header in sys/termios.h sys/time.h sys/signal.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+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
+
+# OpenLDAP --with-threads
+
+# Check whether --with-threads was given.
+if test "${with_threads+set}" = set; then :
+ withval=$with_threads;
+ ol_arg=invalid
+ for ol_val in auto nt posix mach pth lwp yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
+ fi
+ ol_with_threads="$ol_arg"
+
+else
+ ol_with_threads="auto"
fi
+# end --with-threads
+
+
+case "$ol_with_threads$host" in
+ auto*-*-solaris2.[0-6])
+ ol_with_threads=no
+ ;;
+esac
+
+
+ol_aix_threads=no
+case "$host" in
+*-*-aix*) if test -z "$CC" ; then
+ case "$ol_with_threads" in
+ auto | yes | posix) ol_aix_threads=yes ;;
+ esac
+ fi
+;;
+esac
+if test $ol_aix_threads = yes ; then
+ if test -z "${CC}" ; then
+ for ac_prog in cc_r xlc_r cc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
+IFS=$as_save_IFS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #ifdef HAVE_ERRNO_H
- # include <errno.h>
- #endif
- #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 :
- ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #ifdef HAVE_ERRNO_H
- # include <errno.h>
- #endif
+ test -n "$CC" && break
+done
-"
-if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEPPS_H 1
-_ACEOF
+ if test "$CC" = cc ; then
+ if test $ol_with_threads != auto ; then
+ as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
+$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+ fi
+ ol_with_threads=no
+ fi
+ fi
+ case ${CC} in cc_r | xlc_r)
+ ol_with_threads=posix
+ ol_cv_pthread_create=yes
+ ;;
+ esac
fi
-done
+ol_link_threads=no
+# OpenLDAP --with-yielding_select
+# Check whether --with-yielding_select was given.
+if test "${with_yielding_select+set}" = set; then :
+ withval=$with_yielding_select;
+ ol_arg=invalid
+ for ol_val in auto yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
+ fi
+ ol_with_yielding_select="$ol_arg"
+else
+ ol_with_yielding_select="auto"
fi
-rm -f conftest*
+# end --with-yielding_select
+
+
+case $ol_with_threads in auto | yes | nt)
+
+
+ ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
+if test "x$ac_cv_func__beginthread" = xyes; then :
+
+fi
+
+
+ if test $ac_cv_func__beginthread = yes ; then
-for ac_header in sys/timers.h sys/tpro.h sys/types.h sys/wait.h
+$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
+
+ ol_cv_nt_threads=yes
+ fi
+
+
+ if test "$ol_cv_nt_threads" = yes ; then
+ ol_link_threads=nt
+ ol_with_threads=found
+ ol_with_yielding_select=yes
+
+
+$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
+
+ fi
+
+ if test $ol_with_threads = nt ; then
+ as_fn_error $? "could not locate NT Threads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | posix)
+
+ for ac_header in pthread.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_PTHREAD_H 1
_ACEOF
fi
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
+
+ if test $ac_cv_header_pthread_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
+$as_echo_n "checking POSIX thread version... " >&6; }
+if ${ol_cv_pthread_version+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+
+# include <pthread.h>
int
main ()
{
-if ((struct tm *) 0)
-return 0;
+
+ int i = PTHREAD_CREATE_JOINABLE;
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_detach" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=10
else
- ac_cv_header_time=no
+ ol_cv_pthread_version=8
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+# ifdef PTHREAD_CREATE_UNDETACHED
+ draft7
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft7" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=7
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+#ifdef PTHREAD_MUTEX_INITIALIZER
+ draft5
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft5" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=5
+else
+ ol_cv_pthread_version=4
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+rm -f conftest*
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+fi
+rm -f conftest*
fi
+rm -f conftest*
-case "$host" in
-*-convex-*)
- for ac_header in /sys/sync/queue.h /sys/sync/sema.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
+$as_echo "$ol_cv_pthread_version" >&6; }
-done
- ;;
-*-*-bsdi*)
- for ac_header in machine/inline.h sys/pcl720.h sys/i8253.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ if test $ol_cv_pthread_version != 0 ; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREADS $ol_cv_pthread_version
_ACEOF
+ else
+ as_fn_error $? "unknown pthread version" "$LINENO" 5
+ fi
+
+ # consider threads found
+ ol_with_threads=found
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
+else
+ ol_cv_header_linux_threads=no
fi
+rm -f conftest*
-done
- ;;
-esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
-case "$host" in
- *-*-*linux*)
- for ac_func in __adjtimex __ntp_gettime
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
+$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
+if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+#ifdef _POSIX_THREAD_IS_GNU_PTH
+ __gnu_pth__;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
+ ol_cv_header_gnu_pth_pthread_h=yes
+else
+ ol_cv_header_gnu_pth_pthread_h=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
+$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
+
+
+ if test $ol_cv_header_gnu_pth_pthread_h = no ; then
+ for ac_header in sched.h
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SCHED_H 1
_ACEOF
fi
+
done
- ;;
-esac
-case "$ac_cv_func___adjtimex" in
- yes)
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lelf" >&5
-$as_echo_n "checking for nlist in -lelf... " >&6; }
-if ${ac_cv_lib_elf_nlist+:} false; then :
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
+$as_echo_n "checking for pthread_create in default libraries... " >&6; }
+if ${ol_cv_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lelf $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
#endif
-char nlist ();
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
int
main ()
{
-return nlist ();
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_elf_nlist=yes
+ ol_cv_pthread_create=yes
else
- ac_cv_lib_elf_nlist=no
+ ol_cv_pthread_create=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_nlist" >&5
-$as_echo "$ac_cv_lib_elf_nlist" >&6; }
-if test "x$ac_cv_lib_elf_nlist" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBELF 1
-_ACEOF
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
- LIBS="-lelf $LIBS"
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_create=yes
+else
+ ol_cv_pthread_create=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkvm" >&5
-$as_echo_n "checking for main in -lkvm... " >&6; }
-if ${ac_cv_lib_kvm_main+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
+$as_echo "$ol_cv_pthread_create" >&6; }
+
+ if test $ol_cv_pthread_create != no ; then
+ ol_link_threads=posix
+ ol_link_pthreads=""
+ fi
+
+ # Pthread try link: -kthread (ol_cv_pthread_kthread)
+if test "$ol_link_threads" = no ; then
+ # try -kthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
+$as_echo_n "checking for pthread link with -kthread... " >&6; }
+if ${ol_cv_pthread_kthread+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkvm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-kthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-return main ();
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_kvm_main=yes
+ ol_cv_pthread_kthread=yes
else
- ac_cv_lib_kvm_main=no
+ ol_cv_pthread_kthread=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_main" >&5
-$as_echo "$ac_cv_lib_kvm_main" >&6; }
-if test "x$ac_cv_lib_kvm_main" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKVM 1
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_kthread=yes
+else
+ ol_cv_pthread_kthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
- LIBS="-lkvm $LIBS"
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
+$as_echo "$ol_cv_pthread_kthread" >&6; }
+
+ if test $ol_cv_pthread_kthread = yes ; then
+ ol_link_pthreads="-kthread"
+ ol_link_threads=posix
+ fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lld" >&5
-$as_echo_n "checking for nlist in -lld... " >&6; }
-if ${ac_cv_lib_ld_nlist+:} false; then :
+
+ # Pthread try link: -pthread (ol_cv_pthread_pthread)
+if test "$ol_link_threads" = no ; then
+ # try -pthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
+$as_echo_n "checking for pthread link with -pthread... " >&6; }
+if ${ol_cv_pthread_pthread+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
#endif
-char nlist ();
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
int
main ()
{
-return nlist ();
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ld_nlist=yes
+ ol_cv_pthread_pthread=yes
else
- ac_cv_lib_ld_nlist=no
+ ol_cv_pthread_pthread=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ld_nlist" >&5
-$as_echo "$ac_cv_lib_ld_nlist" >&6; }
-if test "x$ac_cv_lib_ld_nlist" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBLD 1
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_pthread=yes
+else
+ ol_cv_pthread_pthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
- LIBS="-lld $LIBS"
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
+$as_echo "$ol_cv_pthread_pthread" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nlist in -lmld" >&5
-$as_echo_n "checking for nlist in -lmld... " >&6; }
-if ${ac_cv_lib_mld_nlist+:} false; then :
+ if test $ol_cv_pthread_pthread = yes ; then
+ ol_link_pthreads="-pthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
+if test "$ol_link_threads" = no ; then
+ # try -pthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
+$as_echo_n "checking for pthread link with -pthreads... " >&6; }
+if ${ol_cv_pthread_pthreads+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
#endif
-char nlist ();
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
int
main ()
{
-return nlist ();
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_mld_nlist=yes
+ ol_cv_pthread_pthreads=yes
else
- ac_cv_lib_mld_nlist=no
+ ol_cv_pthread_pthreads=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mld_nlist" >&5
-$as_echo "$ac_cv_lib_mld_nlist" >&6; }
-if test "x$ac_cv_lib_mld_nlist" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBMLD 1
-_ACEOF
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- LIBS="-lmld $LIBS"
-fi
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
- for ac_header in nlist.h sys/var.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_pthreads=yes
+else
+ ol_cv_pthread_pthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-done
- case "$ac_cv_header_nlist_h" in
- yes)
+ # restore the LIBS
+ LIBS="$ol_LIBS"
-$as_echo "#define NLIST_STRUCT 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
+$as_echo "$ol_cv_pthread_pthreads" >&6; }
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
-$as_echo_n "checking for n_un in struct nlist... " >&6; }
-if ${ntp_cv_struct_nlist_n_un+:} false; then :
+ if test $ol_cv_pthread_pthreads = yes ; then
+ ol_link_pthreads="-pthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
+if test "$ol_link_threads" = no ; then
+ # try -mthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
+$as_echo_n "checking for pthread link with -mthreads... " >&6; }
+if ${ol_cv_pthread_mthreads+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-mthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <nlist.h>
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
- struct nlist n;
- n.n_un.n_name = 0;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
- ntp_cv_struct_nlist_n_un=yes
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_nlist_n_un=no
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
+else
+ ol_cv_pthread_mthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
-$as_echo "$ntp_cv_struct_nlist_n_un" >&6; }
- case "$ntp_cv_struct_nlist_n_un" in
- yes)
-$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
- esac
- ;;
-esac
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-for ac_header in sys/proc.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
-"
-if test "x$ac_cv_header_sys_proc_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_PROC_H 1
-_ACEOF
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
-fi
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
-done
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
-for ac_header in sys/resource.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+ status = pthread_detach( &t );
+ if( status ) return errno;
#endif
-"
-if test "x$ac_cv_header_sys_resource_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_RESOURCE_H 1
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
+else
+ ol_cv_pthread_mthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
+$as_echo "$ol_cv_pthread_mthreads" >&6; }
-done
+ if test $ol_cv_pthread_mthreads = yes ; then
+ ol_link_pthreads="-mthreads"
+ ol_link_threads=posix
+ fi
+fi
+ # Pthread try link: -thread (ol_cv_pthread_thread)
+if test "$ol_link_threads" = no ; then
+ # try -thread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
+$as_echo_n "checking for pthread link with -thread... " >&6; }
+if ${ol_cv_pthread_thread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-for ac_header in sys/shm.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-thread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
#endif
-#ifdef HAVE_SYS_IPC_H
-# include <sys/ipc.h>
+#ifndef NULL
+#define NULL (void*)0
#endif
-"
-if test "x$ac_cv_header_sys_shm_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SHM_H 1
-_ACEOF
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-fi
+int
+main ()
+{
-done
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
-for ac_header in sys/timex.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "#if HAVE_SYS_TIME_H
-# include <sys/time.h>
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
-"
-if test "x$ac_cv_header_sys_timex_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEX_H 1
-_ACEOF
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_thread=yes
+else
+ ol_cv_pthread_thread=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-done
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-for ac_header in resolv.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
-"
-if test "x$ac_cv_header_resolv_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_RESOLV_H 1
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_thread=yes
+else
+ ol_cv_pthread_thread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
+$as_echo "$ol_cv_pthread_thread" >&6; }
-done
+ if test $ol_cv_pthread_thread = yes ; then
+ ol_link_pthreads="-thread"
+ ol_link_threads=posix
+ fi
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for basic volatile support" >&5
-$as_echo_n "checking for basic volatile support... " >&6; }
-if ${ntp_cv_c_volatile+:} false; then :
+ # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
- volatile int x;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+ return 0;
;
return 0;
}
- ntp_cv_c_volatile=yes
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_c_volatile=no
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_c_volatile" >&5
-$as_echo "$ntp_cv_c_volatile" >&6; }
-case "$ntp_cv_c_volatile" in
- yes)
- ;;
- *)
-$as_echo "#define volatile /**/" >>confdefs.h
- ;;
-esac
+ # restore the LIBS
+ LIBS="$ol_LIBS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset cs;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* 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";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
- *t++ = 0;
- if (s) return 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;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
else
- ac_cv_c_const=no
+ ol_cv_pthread_lpthread_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-$as_echo "#define const /**/" >>confdefs.h
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
+ if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -Wl,-woff,85
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
+if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_c_bigendian=unknown
- # See if we're dealing with a universal compiler.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __APPLE_CC__
- not a universal capable compiler
- #endif
- typedef int dummy;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -Wl,-woff,85 $LIBS"
- # Check for potential -arch flags. It is not universal unless
- # there are at least two -arch flags with different values.
- ac_arch=
- ac_prev=
- for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
- if test -n "$ac_prev"; then
- case $ac_word in
- i?86 | x86_64 | ppc | ppc64)
- if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
- ac_arch=$ac_word
- else
- ac_cv_c_bigendian=universal
- break
- fi
- ;;
- esac
- ac_prev=
- elif test "x$ac_word" = "x-arch"; then
- ac_prev=arch
- fi
- done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test $ac_cv_c_bigendian = unknown; then
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
- #include <sys/param.h>
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
- && LITTLE_ENDIAN)
- bogus endian macros
- #endif
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
+else
+ ol_cv_pthread_lib_lpthread_woff=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
- #include <sys/param.h>
-int
-main ()
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
- ;
- return 0;
}
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
else
- ac_cv_c_bigendian=no
+ ol_cv_pthread_lib_lpthread_woff=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
+$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
+
+ if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
+ ol_link_pthreads="-lpthread -Wl,-woff,85"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
+$as_echo_n "checking for pthread link with -lpthread... " >&6; }
+if ${ol_cv_pthread_lpthread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <limits.h>
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
- bogus endian macros
- #endif
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- # It does; now see whether it defined to _BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
+else
+ ol_cv_pthread_lpthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <limits.h>
-int
-main ()
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
{
-#ifndef _BIG_ENDIAN
- not big endian
- #endif
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
- ;
- return 0;
}
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
else
- ac_cv_c_bigendian=no
+ ol_cv_pthread_lpthread=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # Compile a test program.
- if test "$cross_compiling" = yes; then :
- # Try to guess by grepping values from an object file.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
+$as_echo "$ol_cv_pthread_lpthread" >&6; }
+
+ if test $ol_cv_pthread_lpthread = yes ; then
+ ol_link_pthreads="-lpthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
+$as_echo_n "checking for pthread link with -lc_r... " >&6; }
+if ${ol_cv_pthread_lc_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-short int ascii_mm[] =
- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] =
- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
- int use_ascii (int i) {
- return ascii_mm[i] + ascii_ii[i];
- }
- short int ebcdic_ii[] =
- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] =
- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
- int use_ebcdic (int i) {
- return ebcdic_mm[i] + ebcdic_ii[i];
- }
- extern int foo;
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-return use_ascii (foo) == use_ebcdic (foo);
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; 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
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lc_r=yes
+else
+ ol_cv_pthread_lc_r=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
{
+ return (void *) (p == NULL);
+}
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
- u.l = 1;
- return u.c[sizeof (long int) - 1] == 1;
- ;
- return 0;
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_c_bigendian=no
+ ol_cv_pthread_lc_r=yes
else
- ac_cv_c_bigendian=yes
+ ol_cv_pthread_lc_r=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- fi
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
- yes)
- $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
- no)
- ;; #(
- universal)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
+$as_echo "$ol_cv_pthread_lc_r" >&6; }
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+ if test $ol_cv_pthread_lc_r = yes ; then
+ ol_link_pthreads="-lc_r"
+ ol_link_threads=posix
+ fi
+fi
- ;; #(
- *)
- as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
+ # Pthread try link: -threads (ol_cv_pthread_threads)
+if test "$ol_link_threads" = no ; then
+ # try -threads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
+$as_echo_n "checking for pthread link with -threads... " >&6; }
+if ${ol_cv_pthread_threads+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-threads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <signal.h>
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-return *(signal (0, 0)) (0) == 1;
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_signal=int
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_threads=yes
else
- ac_cv_type_signal=void
+ ol_cv_pthread_threads=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes; then :
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-else
-cat >>confdefs.h <<_ACEOF
-#define off_t long int
-_ACEOF
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
-fi
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
-else
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
-fi
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
-ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
-if test "x$ac_cv_type_time_t" = xyes; then :
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
-cat >>confdefs.h <<_ACEOF
-#define HAVE_TIME_T 1
-_ACEOF
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+ return 0;
-fi
-ac_fn_c_check_type "$LINENO" "long" "ac_cv_type_long" "$ac_includes_default"
-if test "x$ac_cv_type_long" = xyes; then :
+}
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG 1
_ACEOF
-
-
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_threads=yes
+else
+ ol_cv_pthread_threads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
+$as_echo "$ol_cv_pthread_threads" >&6; }
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
+ if test $ol_cv_pthread_threads = yes ; then
+ ol_link_pthreads="-threads"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
else
- if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_time_t=0
- fi
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
+ if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if ${ac_cv_struct_tm+:} false; then :
+ # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <time.h>
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
-struct tm tm;
- int *p = &tm.tm_sec;
- return !p;
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_struct_tm=time.h
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
else
- ac_cv_struct_tm=sys/time.h
+ ol_cv_pthread_lpthreads_lmach_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
+ if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int8_t" >&5
-$as_echo_n "checking for u_int8_t... " >&6; }
-if ${ntp_cv_type_u_int8_t+:} false; then :
+ # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
- u_int8_t len = 42;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_type_u_int8_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
else
- ntp_cv_type_u_int8_t=no
+ ol_cv_pthread_lpthreads_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lexc=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int8_t" >&5
-$as_echo "$ntp_cv_type_u_int8_t" >&6; }
-case "$ntp_cv_type_u_int8_t" in
- yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
-$as_echo "#define HAVE_TYPE_U_INT8_T 1" >>confdefs.h
+ if test $ol_cv_pthread_lpthreads_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lexc"
+ ol_link_threads=posix
+ fi
+fi
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t" >&5
-$as_echo_n "checking for u_int64_t... " >&6; }
-if ${ntp_cv_type_u_int64_t+:} false; then :
+ # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
+$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
+if ${ol_cv_pthread_lib_lpthreads+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
int
main ()
{
- u_int64_t len = 42;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+ return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_type_u_int64_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthreads=yes
else
- ntp_cv_type_u_int64_t=no
-
+ ol_cv_pthread_lib_lpthreads=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int64_t" >&5
-$as_echo "$ntp_cv_type_u_int64_t" >&6; }
-case "$ntp_cv_type_u_int64_t" in
- yes)
-$as_echo "#define HAVE_TYPE_U_INT64_T 1" >>confdefs.h
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-esac
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
-$as_echo_n "checking for a fallback value for HZ... " >&6; }
-if ${ntp_cv_default_hz+:} false; then :
- $as_echo_n "(cached) " >&6
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lib_lpthreads=yes
else
+ ol_cv_pthread_lib_lpthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
- ntp_cv_default_hz=100
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ntp_cv_default_hz=1024
- ;;
- mips-dec-ultrix4*)
- ntp_cv_default_hz=256
- ;;
- esac
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
-$as_echo "$ntp_cv_default_hz" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
+$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_HZ $ntp_cv_default_hz
+ if test $ol_cv_pthread_lib_lpthreads = yes ; then
+ ol_link_pthreads="-lpthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ if test $ol_link_threads != no ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
+
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+
+ for ac_func in sched_yield pthread_yield thr_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+fi
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
-$as_echo_n "checking if we need to override the system's value for HZ... " >&6; }
-if ${ntp_cv_override_hz+:} false; then :
+
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test $ac_cv_func_thr_yield = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- ntp_cv_override_hz=no
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ntp_cv_override_hz=yes
- ;;
- mips-dec-ultrix4*)
- ntp_cv_override_hz=yes
- ;;
- *-*-freebsd*)
- ntp_cv_override_hz=yes
- ;;
- *-*-sunos4*)
- ntp_cv_override_hz=yes
- ;;
- *-*-kfreebsd*)
- ntp_cv_override_hz=yes
- ;;
- esac
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rt_sched_yield=yes
+else
+ ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+ LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+ ac_cv_func_sched_yield=yes
+else
+ ac_cv_func_sched_yield=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
-$as_echo "$ntp_cv_override_hz" >&6; }
-case "$ntp_cv_override_hz" in
- yes)
-$as_echo "#define OVERRIDE_HZ 1" >>confdefs.h
+ fi
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test "$ac_cv_func_thr_yield" = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
+$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+ fi
-esac
+ for ac_func in pthread_kill
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
+if test "x$ac_cv_func_pthread_kill" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL 1
+_ACEOF
+fi
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
-$as_echo_n "checking for struct rt_msghdr... " >&6; }
-if ${ntp_cv_struct_rt_msghdr+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
+$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/route.h>
+#include <pthread.h>
+pthread_rwlock_t rwlock;
int
main ()
{
+pthread_rwlock_destroy(&rwlock);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_rwlock_destroy=yes
+else
+ ol_cv_func_pthread_rwlock_destroy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
- struct rt_msghdr p;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
+$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
+ if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
+
+$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
+$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_detach+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+int
+main ()
+{
+pthread_detach(NULL);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_rt_msghdr=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_detach=yes
else
- ntp_cv_struct_rt_msghdr=no
+ ol_cv_func_pthread_detach=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
+$as_echo "$ol_cv_func_pthread_detach" >&6; }
+
+ if test $ol_cv_func_pthread_detach = no ; then
+ as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
+ fi
+
+
+$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
+
+
+ for ac_func in \
+ pthread_setconcurrency \
+ pthread_getconcurrency \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
-$as_echo "$ntp_cv_struct_rt_msghdr" >&6; }
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
-$as_echo_n "checking for struct rtattr... " >&6; }
-if ${ntp_cv_rtattr+:} false; then :
+
+
+ for ac_func in pthread_kill_other_threads_np
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
+if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
+_ACEOF
+
+fi
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
+$as_echo_n "checking for LinuxThreads implementation... " >&6; }
+if ${ol_cv_sys_linux_threads+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
+$as_echo "$ol_cv_sys_linux_threads" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
+$as_echo_n "checking for LinuxThreads consistency... " >&6; }
+if ${ol_cv_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ol_cv_header_linux_threads = yes &&
+ test $ol_cv_sys_linux_threads = yes; then
+ ol_cv_linux_threads=yes
+ elif test $ol_cv_header_linux_threads = no &&
+ test $ol_cv_sys_linux_threads = no; then
+ ol_cv_linux_threads=no
+ else
+ ol_cv_linux_threads=error
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
+$as_echo "$ol_cv_linux_threads" >&6; }
+
+
+ if test $ol_cv_linux_threads = error; then
+ as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
+$as_echo_n "checking if pthread_create() works... " >&6; }
+if ${ol_cv_pthread_create_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_create_works=yes
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <stddef.h>
- #include <sys/socket.h>
- #include <linux/rtnetlink.h>
-int
-main ()
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
{
+ return (void *) (p == NULL);
+}
- struct rtattr p;
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
- ;
- return 0;
}
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_rtattr=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_create_works=yes
else
- ntp_cv_rtattr=no
-
+ ol_cv_pthread_create_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
-$as_echo "$ntp_cv_rtattr" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
+$as_echo "$ol_cv_pthread_create_works" >&6; }
-case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
- *yes*)
+ if test $ol_cv_pthread_create_works = no ; then
+ as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
+ fi
-$as_echo "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
+ ol_replace_broken_yield=no
- case "$ntp_cv_rtattr" in
- yes)
+ if test $ol_replace_broken_yield = yes ; then
-$as_echo "#define HAVE_RTNETLINK 1" >>confdefs.h
+$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
- esac
-esac
+ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
-$as_echo_n "checking struct sigaction for sa_sigaction... " >&6; }
-if ${ntp_cv_struct_sigaction_has_sa_sigaction+:} false; then :
+ if test x$ol_with_yielding_select = xauto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
+$as_echo_n "checking if select yields when using pthreads... " >&6; }
+if ${ol_cv_pthread_select_yields+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_select_yields=cross
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <signal.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*) 0
+#endif
-int
-main ()
+static int fildes[2];
+
+static void *task(p)
+ void *p;
{
+ int i;
+ struct timeval tv;
- struct sigaction act;
- act.sa_sigaction = 0;
+ fd_set rfds;
+ tv.tv_sec=10;
+ tv.tv_usec=0;
- ;
- return 0;
+ FD_ZERO(&rfds);
+ FD_SET(fildes[0], &rfds);
+
+ /* we're not interested in any fds */
+ i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
+
+ if(i < 0) {
+ perror("select");
+ exit(10);
+ }
+
+ exit(0); /* if we exit here, the select blocked the whole process */
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t t;
+
+ /* create a pipe to select */
+ if(pipe(&fildes[0])) {
+ perror("select");
+ exit(1);
+ }
+
+#ifdef HAVE_PTHREAD_SETCONCURRENCY
+ (void) pthread_setconcurrency(2);
+#else
+#ifdef HAVE_THR_SETCONCURRENCY
+ /* Set Solaris LWP concurrency to 2 */
+ thr_setconcurrency(2);
+#endif
+#endif
+
+#if HAVE_PTHREADS < 6
+ pthread_create(&t, pthread_attr_default, task, NULL);
+#else
+ pthread_create(&t, NULL, task, NULL);
+#endif
+
+ /* make sure task runs first */
+#ifdef HAVE_THR_YIELD
+ thr_yield();
+#elif defined( HAVE_SCHED_YIELD )
+ sched_yield();
+#elif defined( HAVE_PTHREAD_YIELD )
+ pthread_yield();
+#endif
+
+ exit(2);
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_sigaction_has_sa_sigaction=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_select_yields=no
else
- ntp_cv_struct_sigaction_has_sa_sigaction=no
-
+ ol_cv_pthread_select_yields=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
-$as_echo "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
-case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
- yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
+$as_echo "$ol_cv_pthread_select_yields" >&6; }
-$as_echo "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
+ if test $ol_cv_pthread_select_yields = cross ; then
+ as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
+ fi
+ if test $ol_cv_pthread_select_yields = yes ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
+ fi
+ fi
+
+ if test $ol_with_threads = posix ; then
+ as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
+ fi
+ ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
-$as_echo_n "checking for struct ppsclockev... " >&6; }
-if ${ntp_cv_struct_ppsclockev+:} false; then :
+case $ol_with_threads in auto | yes | mach)
+
+ for ac_header in mach/cthreads.h cthreads.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_mach_cthreads_h = yes ; then
+ ol_with_threads=found
+
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
+fi
+
+
+ if test $ol_link_threads = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
+$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
+if ${ol_cv_cthread_all_load+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #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
+ save_LIBS="$LIBS"
+ LIBS="-all_load $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <mach/cthreads.h>
int
main ()
{
- extern struct ppsclockev *pce;
- return pce->serial;
-
+ cthread_fork((void *)0, (void *)0);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_ppsclockev=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_cthread_all_load=yes
else
- ntp_cv_struct_ppsclockev=no
+ ol_cv_cthread_all_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
+$as_echo "$ol_cv_cthread_all_load" >&6; }
+
+ if test $ol_cv_cthread_all_load = yes ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
+ ol_link_threads=mach
+ ol_with_threads=found
+ fi
+ fi
+
+ elif test $ac_cv_header_cthreads_h = yes ; then
+ ol_with_threads=found
+
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lthreads"
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
-$as_echo "$ntp_cv_struct_ppsclockev" >&6; }
-case "$ntp_cv_struct_ppsclockev" in
- yes)
-$as_echo "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
+ LIBS="$save_LIBS"
+
+ if test $ol_link_threads = yes ; then
+ LTHREAD_LIBS="-lthreads"
+ ol_link_threads=mach
+ ol_with_threads=found
+ else
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+
+ elif test $ol_with_threads = mach ; then
+ as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
+ fi
+
+ if test $ol_link_threads = mach ; then
+$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
+
+ elif test $ol_with_threads = found ; then
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+ ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
-$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-if ${ntp_cv_sockaddr_storage+:} false; then :
+case $ol_with_threads in auto | yes | pth)
+
+ for ac_header in pth.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTH_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_pth_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
+$as_echo_n "checking for pth_version in -lpth... " >&6; }
+if ${ac_cv_lib_pth_pth_version+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpth $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pth_version ();
int
main ()
{
-
- struct sockaddr_storage n;
-
-
+return pth_version ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_sockaddr_storage=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pth_pth_version=yes
else
- ntp_cv_sockaddr_storage=no
-
+ ac_cv_lib_pth_pth_version=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
+$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
+if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
+ have_pth=yes
+else
+ have_pth=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
-$as_echo "$ntp_cv_sockaddr_storage" >&6; }
-case "$ntp_cv_sockaddr_storage" in
- yes)
-$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
+ if test $have_pth = yes ; then
+
+$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
+ ol_link_threads=pth
+ ol_with_threads=found
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+ fi
+ ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.ss_family" >&5
-$as_echo_n "checking for sockaddr_storage.ss_family... " >&6; }
-if ${ntp_cv_have_ss_family+:} false; then :
+case $ol_with_threads in auto | yes | lwp)
+
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_thread_h = yes &&
+ test $ac_cv_header_synch_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
+$as_echo_n "checking for thr_create in -lthread... " >&6; }
+if ${ac_cv_lib_thread_thr_create+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char thr_create ();
int
main ()
{
+return thr_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_thread_thr_create=yes
+else
+ ac_cv_lib_thread_thr_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
+$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
+if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
+ have_thr=yes
+else
+ have_thr=no
+fi
+
- struct sockaddr_storage s;
- s.ss_family = 1;
+ if test $have_thr = yes ; then
+$as_echo "#define HAVE_THR 1" >>confdefs.h
+ LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
+ ol_link_threads=thr
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+
+ for ac_func in \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_lwp_lwp_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
+$as_echo_n "checking for lwp_create in -llwp... " >&6; }
+if ${ac_cv_lib_lwp_lwp_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llwp $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lwp_create ();
+int
+main ()
+{
+return lwp_create ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have_ss_family=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lwp_lwp_create=yes
+else
+ ac_cv_lib_lwp_lwp_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
+$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
+if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
+ have_lwp=yes
else
- ntp_cv_have_ss_family=no
+ have_lwp=no
+fi
+
+
+ if test $have_lwp = yes ; then
+
+$as_echo "#define HAVE_LWP 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
+ ol_link_threads=lwp
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=no
+ fi
+ fi
+ fi
+ ;;
+esac
+
+if test $ol_with_yielding_select = yes ; then
+
+$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ol_with_threads = manual ; then
+ ol_link_threads=yes
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
+$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
+
+ for ac_header in pthread.h sched.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have_ss_family" >&5
-$as_echo "$ntp_cv_have_ss_family" >&6; }
-case "$ntp_cv_have_ss_family" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
-$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
-if ${ntp_cv_have___ss_family+:} false; then :
+done
+
+ for ac_func in sched_yield pthread_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
+else
+ ol_cv_header_linux_threads=no
+fi
+rm -f conftest*
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
+
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ for ac_header in mach/cthreads.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MACH_CTHREADS_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+if test $ol_link_threads != no && test $ol_link_threads != nt ; then
+
+$as_echo "#define REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
+$as_echo_n "checking for thread specific errno... " >&6; }
+if ${ol_cv_errno_thread_specific+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
int
main ()
{
+errno = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_errno_thread_specific=yes
+else
+ ol_cv_errno_thread_specific=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
- struct sockaddr_storage s;
- s.__ss_family = 1;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
+$as_echo "$ol_cv_errno_thread_specific" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
+$as_echo_n "checking for thread specific h_errno... " >&6; }
+if ${ol_cv_h_errno_thread_specific+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netdb.h>
+int
+main ()
+{
+h_errno = 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have___ss_family=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_h_errno_thread_specific=yes
else
- ntp_cv_have___ss_family=no
+ ol_cv_h_errno_thread_specific=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
+$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
+
+ if test $ol_cv_errno_thread_specific != yes ||
+ test $ol_cv_h_errno_thread_specific != yes ; then
+ LIBS="$LTHREAD_LIBS $LIBS"
+ LTHREAD_LIBS=""
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
-$as_echo "$ntp_cv_have___ss_family" >&6; }
- case "$ntp_cv_have___ss_family" in
+
+if test $ol_link_threads = no ; then
+ if test $ol_with_threads = yes ; then
+ as_fn_error $? "no suitable thread support" "$LINENO" 5
+ fi
+
+ if test $ol_with_threads = auto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
+$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+ ol_with_threads=no
+ fi
+
+
+$as_echo "#define NO_THREADS 1" >>confdefs.h
+
+ LTHREAD_LIBS=""
+ BUILD_THREAD=no
+else
+ BUILD_THREAD=yes
+fi
+
+if test $ol_link_threads != no ; then
+
+$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+
+fi
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+case "$ol_with_threads" in
+ no)
+ ol_pthread_ok=no
+
+ ;;
+ *)
+ ol_found_pthreads=yes
+ ;;
+esac
+
+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 "$ol_found_pthreads" in
yes)
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ for ac_func in sem_timedwait
+do :
+ ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
+if test "x$ac_cv_func_sem_timedwait" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_TIMEDWAIT 1
+_ACEOF
-$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
+fi
+done
+
+ LIBS="$saved_LIBS"
+ { saved_LIBS=; unset saved_LIBS;}
+ CFLAGS="$saved_CFLAGS"
+ { saved_CFLAGS=; unset saved_CFLAGS;}
+ case "$ac_cv_func_sem_timedwait" in
+ yes)
+ PTHREAD_LIBS="$LTHREAD_LIBS"
+ have_pthreads=yes
+ # Bug 2332: With GCC we need to force a reference to libgcc_s
+ # (if libgcc_s exists) or the combination of
+ # threads + setuid + mlockall does not work on linux because
+ # thread cancellation fails to load libgcc_s with dlopen().
+ # We have to pass this all as linker options to avoid argument
+ # reordering by libtool.
+ case "$GCC$with_gnu_ld" in
+ yesyes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -lgcc_s" >&5
+$as_echo_n "checking for exit in -lgcc_s... " >&6; }
+if ${ac_cv_lib_gcc_s_exit+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcc_s $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char exit ();
+int
+main ()
+{
+return exit ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_gcc_s_exit=yes
+else
+ ac_cv_lib_gcc_s_exit=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcc_s_exit" >&5
+$as_echo "$ac_cv_lib_gcc_s_exit" >&6; }
+if test "x$ac_cv_lib_gcc_s_exit" = xyes; then :
+ PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"
+fi
+ ;;
+ esac
+ esac
esac
esac
+case "$have_pthreads" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+$as_echo_n "checking size of pthread_t... " >&6; }
+if ${ac_cv_sizeof_pthread_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
+ $ac_includes_default
+ #include <pthread.h>
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.ss_len" >&5
-$as_echo_n "checking for sockaddr_storage.ss_len... " >&6; }
-if ${ntp_cv_have_ss_len+:} false; then :
+"; then :
+
+else
+ if test "$ac_cv_type_pthread_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (pthread_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_pthread_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
+_ACEOF
+
+
+ LIBISC_PTHREADS_NOTHREADS=pthreads
+
+$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
+
+ #
+ # We'd like to use sigwait() too
+ #
+ ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
+if test "x$ac_cv_func_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
+$as_echo_n "checking for sigwait in -lc... " >&6; }
+if ${ac_cv_lib_c_sigwait+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
+int
+main ()
+{
+return sigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_sigwait=yes
+else
+ ac_cv_lib_c_sigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
+$as_echo "$ac_cv_lib_c_sigwait" >&6; }
+if test "x$ac_cv_lib_c_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
+$as_echo_n "checking for sigwait in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_sigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
int
main ()
{
+return sigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread_sigwait=yes
+else
+ ac_cv_lib_pthread_sigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
+$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
+if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
+$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread__Psigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _Psigwait ();
+int
+main ()
+{
+return _Psigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread__Psigwait=yes
+else
+ ac_cv_lib_pthread__Psigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
+$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
+if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
+ have_sigwait=yes
+else
+ have_sigwait=no
+
+fi
+
+
+fi
- struct sockaddr_storage s;
- s.ss_len = 1;
+fi
+
+
+fi
+ case "$host:$have_sigwait" in
+ *-freebsd*:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
+$as_echo_n "checking for sigwait in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_sigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
+int
+main ()
+{
+return sigwait ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have_ss_len=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_r_sigwait=yes
else
- ntp_cv_have_ss_len=no
+ ac_cv_lib_c_r_sigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
+$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
+if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
+ have_sigwait=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ esac
+ case "$have_sigwait" in
+ yes)
+ ac_cv_func_sigwait=yes
+
+$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
+
+ esac
+
+ for ac_func in pthread_attr_getstacksize
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
+if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
+_ACEOF
+
+fi
+done
+
+ for ac_func in pthread_attr_setstacksize sysconf
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have_ss_len" >&5
-$as_echo "$ntp_cv_have_ss_len" >&6; }
+done
-case "$ntp_cv_have_ss_len" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_len" >&5
-$as_echo_n "checking for sockaddr_storage.__ss_len... " >&6; }
-if ${ntp_cv_have___ss_len+:} false; then :
+
+ case "$host" in
+ *-freebsd5.[012]|*-freebsd5.[012].*)
+ ;;
+ *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
+
+$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
+
+ ;;
+ *-bsdi3.*|*-bsdi4.0*)
+
+$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
+
+ ;;
+ *-linux*)
+
+$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
+
+ ;;
+ *-solaris*)
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ for ac_func in pthread_setconcurrency
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_SETCONCURRENCY 1
+_ACEOF
+
+fi
+done
+
+ case "$ac_cv_func_pthread_setconcurrency" in
+ yes)
+
+$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+
+ esac
+ ;;
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
+
+$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
+
+ ;;
+ esac
+ hack_shutup_pthreadonceinit=no
+ case "$host" in
+ *-aix5.[123].*)
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.[89])
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.1[0-9])
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
+$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
+if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
+ #include <pthread.h>
int
main ()
{
- struct sockaddr_storage s;
- s.__ss_len = 1;
+ static pthread_once_t once_test =
+ PTHREAD_ONCE_INIT;
;
@@ -18479,134 +26943,511 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have___ss_len=yes
+ ntp_cv_braces_around_pthread_once_init=no
else
- ntp_cv_have___ss_len=no
+ ntp_cv_braces_around_pthread_once_init=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_len" >&5
-$as_echo "$ntp_cv_have___ss_len" >&6; }
- case "$ntp_cv_have___ss_len" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
+$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
+ case "$ntp_cv_braces_around_pthread_once_init" in
+ yes)
+ hack_shutup_pthreadonceinit=yes
+ esac
+ ;;
+ esac
+ case "$hack_shutup_pthreadonceinit" in
yes)
-$as_echo "#define HAVE___SS_LEN_IN_SS 1" >>confdefs.h
+$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
esac
+ LIBS="$saved_LIBS"
+ { saved_LIBS=; unset saved_LIBS;}
+ CFLAGS="$saved_CFLAGS"
+ { saved_CFLAGS=; unset saved_CFLAGS;}
+ ;;
+ *)
+ LIBISC_PTHREADS_NOTHREADS=nothreads
+ ;;
esac
+ if test "$have_pthreads" != "no"; then
+ PTHREADS_TRUE=
+ PTHREADS_FALSE='#'
+else
+ PTHREADS_TRUE='#'
+ PTHREADS_FALSE=
+fi
-#
-# Look for in_port_t.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
-$as_echo_n "checking for in_port_t... " >&6; }
-if ${isc_cv_have_in_port_t+:} false; then :
+
+
+
+
+
+case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
+ no:yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
+$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
+if ${ntp_cv_vsnprintf_percent_m+:} false; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ ntp_cv_vsnprintf_percent_m=no
+
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/types.h>
- #include <netinet/in.h>
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ );
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ )
+ {
+ va_list ap;
+ int rc;
+
+ va_start(ap, fmt);
+ rc = vsnprintf(dst, sz, fmt, ap);
+ va_end(ap);
+
+ return rc;
+ }
int
main ()
{
- in_port_t port = 25;
- return (0);
+ char sbuf[512];
+ char pbuf[512];
+ int slen;
+
+ strcpy(sbuf, strerror(ENOENT));
+ errno = ENOENT;
+ slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
+ "wrong");
+ return strcmp(sbuf, pbuf);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- isc_cv_have_in_port_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ntp_cv_vsnprintf_percent_m=yes
else
- isc_cv_have_in_port_t=no
+ ntp_cv_vsnprintf_percent_m=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
+$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
+ case "$ntp_cv_vsnprintf_percent_m" in
+ yes)
+
+$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
+
+ esac
+esac
+
+for ac_header in sys/clockctl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_CLOCKCTL_H 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
-$as_echo "$isc_cv_have_in_port_t" >&6; }
-case "$isc_cv_have_in_port_t" in
- no)
-$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
+done
+
+
+# Check whether --enable-clockctl was given.
+if test "${enable_clockctl+set}" = set; then :
+ enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
+else
+ ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
+$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
+$as_echo "$ntp_use_dev_clockctl" >&6; }
+
+for ac_header in sys/capability.h sys/prctl.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
+$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
+
+case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
+ yesyes)
+ case "$host" in
+ mips-sgi-irix*)
+ ntp_have_linuxcaps=no
+ ;;
+ *) ntp_have_linuxcaps=yes
+ ;;
+ esac
+ ;;
+ *)
+ ntp_have_linuxcaps=no
+ ;;
esac
-case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
- *yes*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
-$as_echo_n "checking for struct snd_size... " >&6; }
-if ${ntp_cv_struct_snd_size+:} false; then :
+# Check whether --enable-linuxcaps was given.
+if test "${enable_linuxcaps+set}" = set; then :
+ enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
+$as_echo "$ntp_have_linuxcaps" >&6; }
+
+case "$ntp_have_linuxcaps" in
+ yes)
+
+$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
+
+ LIBS="$LIBS -lcap"
+ ;;
+esac
+
+
+for ac_header in priv.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
+if test "x$ac_cv_header_priv_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PRIV_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
+$as_echo_n "checking if we have solaris privileges... " >&6; }
+
+case "$ac_cv_header_priv_h" in
+ yes)
+ case "$host" in
+ *-solaris*)
+ ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
+if test "x$ac_cv_func_setppriv" = xyes; then :
+ ntp_have_solarisprivs=yes
+else
+ ntp_have_solarisprivs=no
+
+fi
+
+ ;;
+ esac
+esac
+
+# Check whether --enable-solarisprivs was given.
+if test "${enable_solarisprivs+set}" = set; then :
+ enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
+
+fi
+
+
+
+case "$ntp_have_solarisprivs" in
+ yes)
+
+$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
+$as_echo "$ntp_have_solarisprivs" >&6; }
+
+case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
+ *yes*)
+
+$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
+
+esac
+
+case "$host" in
+ *-*-darwin*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
+$as_echo_n "checking for library containing res_9_init... " >&6; }
+if ${ac_cv_search_res_9_init+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_MACHINE_SOUNDCARD_H
- # include <machine/soundcard.h>
- #endif
- #ifdef HAVE_SYS_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_9_init ();
int
main ()
{
+return res_9_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_res_9_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_res_9_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_res_9_init+:} false; then :
- extern struct snd_size *ss;
- return ss->rec_size;
+else
+ ac_cv_search_res_9_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
+$as_echo "$ac_cv_search_res_9_init" >&6; }
+ac_res=$ac_cv_search_res_9_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
+ ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
+$as_echo_n "checking for library containing res_init... " >&6; }
+if ${ac_cv_search_res_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_init ();
+int
+main ()
+{
+return res_init ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_snd_size=yes
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_res_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_res_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_res_init+:} false; then :
+
else
- ntp_cv_struct_snd_size=no
+ ac_cv_search_res_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
+$as_echo "$ac_cv_search_res_init" >&6; }
+ac_res=$ac_cv_search_res_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ ;;
+esac
+for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
-$as_echo "$ntp_cv_struct_snd_size" >&6; }
- case "$ntp_cv_struct_snd_size" in
- yes)
-$as_echo "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
+done
- esac
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
-$as_echo_n "checking struct clockinfo for hz... " >&6; }
-if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
+#HMS: Why do we do this check so "early"?
+for ac_func in res_init
+do :
+ ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
+if test "x$ac_cv_func_res_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+else
+ for ac_func in __res_init
+do :
+ ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
+if test "x$ac_cv_func___res_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___RES_INIT 1
+_ACEOF
+
+fi
+done
+
+fi
+done
+
+
+# We also need -lsocket, but we have tested for that already.
+ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
+if test "x$ac_cv_func_inet_ntop" = xyes; then :
+
+else
+
+$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes; then :
+
+else
+
+$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
+if test "x$ac_cv_type_int32" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT32 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
+if test "x$ac_cv_type_u_int32" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_U_INT32 1
+_ACEOF
+
+
+fi
+
+
+
+
+case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
+$as_echo_n "checking for int32 with DNS headers included... " >&6; }
+if ${ntp_cv_type_int32_with_dns+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/time.h>
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
int
main ()
{
- extern struct clockinfo *pc;
- return pc->hz;
+ size_t cb = sizeof(int32);
;
@@ -18614,39 +27455,44 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_clockinfo_has_hz=yes
+ ntp_cv_type_int32_with_dns=yes
else
- ntp_cv_struct_clockinfo_has_hz=no
+ ntp_cv_type_int32_with_dns=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
-$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
-case "$ntp_cv_struct_clockinfo_has_hz" in
- yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
+$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
+ case "$ntp_cv_type_int32_with_dns" in
+ yes)
-$as_echo "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+ esac
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
-$as_echo_n "checking struct clockinfo for tickadj... " >&6; }
-if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
+case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
+$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
+if ${ntp_cv_type_u_int32_with_dns+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <sys/time.h>
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
int
main ()
{
- extern struct clockinfo *pc;
- return pc->tickadj;
+ size_t cb = sizeof(u_int32);
;
@@ -18654,23 +27500,46 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_struct_clockinfo_has_hz=yes
+ ntp_cv_type_u_int32_with_dns=yes
else
- ntp_cv_struct_clockinfo_has_hz=no
+ ntp_cv_type_u_int32_with_dns=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
-$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
-case "$ntp_cv_struct_clockinfo_has_hz" in
- yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
+$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
+ case "$ntp_cv_type_u_int32_with_dns" in
+ yes)
-$as_echo "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+ esac
esac
+for ac_header in sys/timepps.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_ERRNO_H
+ # include <errno.h>
+ #endif
+
+
+"
+if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEPPS_H 1
+_ACEOF
+
+fi
+
+done
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
$as_echo_n "checking for struct timespec... " >&6; }
if ${ntp_cv_struct_timespec+:} false; then :
@@ -18759,298 +27628,1087 @@ $as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
esac
-ac_fn_c_check_member "$LINENO" "struct ntptimeval" "time.tv_nsec" "ac_cv_member_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
+for ac_header in md5.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
#endif
"
-if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes; then :
+if test "x$ac_cv_header_md5_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MD5_H 1
+_ACEOF
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
+$as_echo_n "checking for library containing MD5Init... " >&6; }
+if ${ac_cv_search_MD5Init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char MD5Init ();
+int
+main ()
+{
+return MD5Init ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' md5 md; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_MD5Init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_MD5Init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_MD5Init+:} false; then :
+else
+ ac_cv_search_MD5Init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
+$as_echo "$ac_cv_search_MD5Init" >&6; }
+ac_res=$ac_cv_search_MD5Init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
+for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
+fi
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
+$as_echo_n "checking for SIGIO... " >&6; }
+if ${ntp_cv_hdr_def_sigio+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
+
+ #include <signal.h>
+
+ #ifndef SIGIO
+ # error
+ #endif
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ntp_cv_hdr_def_sigio=yes
+else
+ ntp_cv_hdr_def_sigio=no
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
+rm -f conftest.err conftest.i conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
+$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
+$as_echo_n "checking if we want to use SIGIO... " >&6; }
+ans=no
+case "$ntp_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
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ m68k-*-mint*)
+ ans=no
+ ;;
esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
;;
esac
+case "$ans" in
+ yes)
+$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
-case "$ac_cv_c_inline" in
- '')
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
+$as_echo_n "checking for SIGPOLL... " >&6; }
+if ${ntp_cv_hdr_def_sigpoll+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <signal.h>
+
+ #ifndef SIGPOLL
+ # error
+ #endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ntp_cv_hdr_def_sigpoll=yes
+else
+ ntp_cv_hdr_def_sigpoll=no
+
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
+$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
+$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
+ans=no
+case "$ntp_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[4-9]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-solaris*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
;;
- *)
+esac
+case "$ans" in
+ yes)
-$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
+$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
+ans=no
+case "$ntp_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[4-9]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
+ ;;
esac
+case "$ans" in
+ yes)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
-if ${ac_cv_c_char_unsigned+:} false; then :
+$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
+
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
+$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
+if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+
+ #include <sys/time.h>
+
int
main ()
{
-static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
+
+ gettimeofday(0, 0);
+ settimeofday(0, 0);
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_char_unsigned=no
+ ntp_cv_func_Xettimeofday_nargs=2
else
- ac_cv_c_char_unsigned=yes
+ ntp_cv_func_Xettimeofday_nargs=1
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
+$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
+case "$ntp_cv_func_Xettimeofday_nargs" in
+ 1)
+
+$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
+
+esac
+
+for ac_func in settimeofday
+do :
+ ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
+if test "x$ac_cv_func_settimeofday" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SETTIMEOFDAY 1
+_ACEOF
+
+else
+
+ case "$host" in
+ *-*-mpeix*) ac_cv_func_settimeofday=yes
+ esac
fi
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
-$as_echo_n "checking size of signed char... " >&6; }
-if ${ac_cv_sizeof_signed_char+:} false; then :
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
+$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
+ntp_warning='GRONK'
+ans=none
+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!'
+ esac
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+case "$ntp_warning" in
+ '')
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
+$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
+ ;;
+esac
+
+
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$__LIBS
+{ __LIBS=; unset __LIBS;}
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
+$as_echo_n "checking for deprecated --with-arlib... " >&6; }
+
+# Check whether --with-arlib was given.
+if test "${with_arlib+set}" = set; then :
+ withval=$with_arlib; ans=$withval
+else
+ ans=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+case "$ans" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&5
+$as_echo "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized." >&2;}
+ ;;
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
- if test "$ac_cv_type_signed_char" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (signed char)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_signed_char=0
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
+ test -n "$AWK" && break
+done
+
+{ ac_cv_prog_AWK=; unset ac_cv_prog_AWK;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
-$as_echo "$ac_cv_sizeof_signed_char" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-_ACEOF
-ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
-if test "x$ac_cv_type_s_char" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_S_CHAR 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
+$as_echo_n "checking for library containing strerror... " >&6; }
+if ${ac_cv_search_strerror+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' cposix; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_strerror=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_strerror+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_strerror+:} false; then :
+else
+ ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
+$as_echo "$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_PERL+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PATH_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+ ;;
+esac
+fi
+PATH_PERL=$ac_cv_path_PATH_PERL
+if test -n "$PATH_PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
+$as_echo "$PATH_PERL" >&6; }
else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_int=0
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
+{ ac_cv_path_PATH_PERL=; unset ac_cv_path_PATH_PERL;}
+# Extract the first word of "test", so it can be a program name with args.
+set dummy test; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_TEST+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PATH_TEST in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PATH_TEST="$PATH_TEST" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PATH_TEST="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PATH_TEST=$ac_cv_path_PATH_TEST
+if test -n "$PATH_TEST"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
+$as_echo "$PATH_TEST" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ ac_cv_path_PATH_TEST=; unset ac_cv_path_PATH_TEST;}
+test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
+
+# Check whether --with-net-snmp-config was given.
+if test "${with_net_snmp_config+set}" = set; then :
+ withval=$with_net_snmp_config; ans=$withval
+else
+ ans=yes
+
+fi
+
+case "$ans" in
+ no)
+ ;;
+ yes)
+ ans=net-snmp-config
+ ;;
+ /*)
+ ;;
+ */*)
+ as_fn_error $? "--with-net-snmp-config takes either a name or an absolute path" "$LINENO" 5
+ ;;
+ *)
+ ;;
+esac
+PROG_NET_SNMP_CONFIG=$ans
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
+$as_echo_n "checking for net-snmp-config path... " >&6; }
+case "$PROG_NET_SNMP_CONFIG" in
+ no) ;;
+ /*)
+ PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
+ ;;
+ *)
+ # Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
+set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_NET_SNMP_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PATH_NET_SNMP_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
+if test -n "$PATH_NET_SNMP_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
+$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ { ac_cv_path_PATH_NET_SNMP_CONFIG=; unset ac_cv_path_PATH_NET_SNMP_CONFIG;}
+;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
+$as_echo "$PATH_NET_SNMP_CONFIG" >&6; }
+
+case "$host" in
+ *-*-vxworks*)
+ ac_link="$ac_link $VX_KERNEL"
+ ;;
+esac
+
+# HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
+$as_echo_n "checking for library containing openlog... " >&6; }
+if ${ac_cv_search_openlog+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openlog ();
+int
+main ()
+{
+return openlog ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' gen syslog; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_openlog=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_openlog+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_openlog+:} false; then :
+
+else
+ ac_cv_search_openlog=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
+$as_echo "$ac_cv_search_openlog" >&6; }
+ac_res=$ac_cv_search_openlog
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
+# XXX library list will be in ac_cv_search_openlog
+
+# LIBSECCOMP is off by default -- needs testing with all the features
+# Please send bug reports to loganaden@gmail.com
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
+$as_echo_n "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
+# Check whether --enable-libseccomp was given.
+if test "${enable_libseccomp+set}" = set; then :
+ enableval=$enable_libseccomp; ntp_ok=$enableval
+else
+ ntp_ok=no
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+case "$ntp_ok" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
+$as_echo_n "checking for library containing seccomp_init... " >&6; }
+if ${ac_cv_search_seccomp_init+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char seccomp_init ();
+int
+main ()
+{
+return seccomp_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' seccomp; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_seccomp_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_seccomp_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_seccomp_init+:} false; then :
else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
+ ac_cv_search_seccomp_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
+$as_echo "$ac_cv_search_seccomp_init" >&6; }
+ac_res=$ac_cv_search_seccomp_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define LIBSECCOMP 1" >>confdefs.h
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <sys/prctl.h>
+ #include <linux/seccomp.h>
+
+ int main(void)
+ {
+ int ret;
+ ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
+ if (ret < 0) {
+ switch (errno) {
+ case ENOSYS:
+ return 1;
+ case EINVAL:
+ return 1;
+ default:
+ return 1;
+ }
+ }
+ ret =
+ prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
+ if (ret < 0) {
+ switch (errno) {
+ case EINVAL:
+ return 1;
+ case EFAULT:
+ return 0;
+ default:
+ return 1;
+ }
+ }
+return 1;
+}
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+$as_echo "#define KERN_SECCOMP 1" >>confdefs.h
-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...
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
;;
- no0no)
- # We have signed chars, can't say 'signed char', no s_char typedef.
+esac
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
- ;;
- no1no)
- # We have signed chars, can say 'signed char', no s_char typedef.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
+$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
+if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- ;;
- yes0no)
- # We have unsigned chars, can't say 'signed char', no s_char typedef.
- as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
- ;;
- yes1no)
- # We have unsigned chars, can say 'signed char', no s_char typedef.
+#define SYSLOG_NAMES
+#include <stdlib.h>
+#include <syslog.h>
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+int
+main ()
+{
+ void *fnames; fnames = facilitynames;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
+else
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
+$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
+case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
+ yes)
+$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
+
+ ;;
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
+$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
+ ;;
+ cross)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
+$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
+
+
+
+case "$host" in
+ *-*-*linux*) ;;
+ *-*-osf4*) ;;
+ *-*-osf5*) ;;
+ *)
+ # HMS: Make sure we check for -lrt for clock_* before this...
+ case "$ac_cv_search_clock_gettime" in
+ '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
+$as_echo_n "checking for library containing sched_setscheduler... " >&6; }
+if ${ac_cv_search_sched_setscheduler+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_setscheduler ();
+int
+main ()
+{
+return sched_setscheduler ();
+ ;
+ return 0;
+}
_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
+for ac_lib in '' rt posix4; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_sched_setscheduler=$ac_res
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_sched_setscheduler+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_sched_setscheduler+:} false; then :
+else
+ ac_cv_search_sched_setscheduler=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
+$as_echo "$ac_cv_search_sched_setscheduler" >&6; }
+ac_res=$ac_cv_search_sched_setscheduler
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-$as_echo "#define uid_t int" >>confdefs.h
+fi
+ ;;
+esac
-$as_echo "#define gid_t int" >>confdefs.h
+for ac_header in bstring.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
+if test "x$ac_cv_header_bstring_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_BSTRING_H 1
+_ACEOF
fi
+done
-case "$host" in
- *-*-aix[456]*)
- # (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.
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
+ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
+if test "x$ac_cv_header_dns_sd_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
+$as_echo_n "checking for library containing DNSServiceRegister... " >&6; }
+if ${ac_cv_search_DNSServiceRegister+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -19063,16 +28721,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char clock_gettime ();
+char DNSServiceRegister ();
int
main ()
{
-return clock_gettime ();
+return DNSServiceRegister ();
;
return 0;
}
_ACEOF
-for ac_lib in '' rt; do
+for ac_lib in '' dns_sd; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -19080,301 +28738,388 @@ for ac_lib in '' rt; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_clock_gettime=$ac_res
+ ac_cv_search_DNSServiceRegister=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
+ if ${ac_cv_search_DNSServiceRegister+:} false; then :
break
fi
done
-if ${ac_cv_search_clock_gettime+:} false; then :
+if ${ac_cv_search_DNSServiceRegister+:} false; then :
else
- ac_cv_search_clock_gettime=no
+ ac_cv_search_DNSServiceRegister=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
+$as_echo "$ac_cv_search_DNSServiceRegister" >&6; }
+ac_res=$ac_cv_search_DNSServiceRegister
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+$as_echo "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
+
+
fi
- for ac_func in clock_gettime clock_settime
+
+fi
+
+
+for ac_header in fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
+
done
- ;;
-esac
-for ac_func in daemon
+
+for ac_header in memory.h netdb.h poll.h
do :
- ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
-if test "x$ac_cv_func_daemon" = xyes; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_DAEMON 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
+
done
-for ac_func in finite
+for ac_header in sgtty.h stdlib.h string.h termio.h
do :
- ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
-if test "x$ac_cv_func_finite" = xyes; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_FINITE 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-else
- for ac_func in isfinite
+fi
+
+done
+
+for ac_header in termios.h timepps.h timex.h unistd.h
do :
- ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
-if test "x$ac_cv_func_isfinite" = xyes; then :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_ISFINITE 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-else
+fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
-$as_echo_n "checking for isfinite with <math.h>... " >&6; }
- _libs=$LIBS
- LIBS="$LIBS -lm"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+done
- #include <math.h>
-int
-main ()
-{
+case "$host" in
+ *-*-aix*)
+ for ac_header in utmpx.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmpx_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UTMPX_H 1
+_ACEOF
- float f = 0.0;
- isfinite(f);
+fi
+done
- ;
- return 0;
-}
+ case "$ac_cv_header_utmpx_h" in
+ yes)
+ ;;
+ *)
+ for ac_header in utmp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
+if test "x$ac_cv_header_utmp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UTMP_H 1
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ans=yes
-else
- ans=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS=$_libs
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
- case "$ans" in
- yes)
- $as_echo "#define HAVE_ISFINITE 1" >>confdefs.h
- esac
+done
+ ;;
+ esac
+ ;;
+ *)
+ for ac_header in utmp.h utmpx.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
+
done
+ ;;
+esac
+
+#
+# On Suns only (so far) getpass() truncates the typed password to 8
+# characters, but getpassphrase() allows up to 257. Most systems'
+# getpass() does not truncate, at least not so as to affect ntpq and
+# ntpdc password prompts.
+#
+# So check for getpassphrase(), but only on Sun operating systems.
+#
+case "$host" in
+ *-*-sunos*|*-*-solaris*)
+ for ac_func in getpassphrase
+do :
+ ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
+if test "x$ac_cv_func_getpassphrase" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPASSPHRASE 1
+_ACEOF
fi
done
+esac
+
-for ac_func in getbootfile getclock getdtablesize
+for ac_header in net/if6.h
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
+if test "x$ac_cv_header_net_if6_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_NET_IF6_H 1
_ACEOF
fi
+
done
+for ac_header in net/route.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
-# Check whether --enable-getifaddrs was given.
-if test "${enable_getifaddrs+set}" = set; then :
- enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
-else
- want_getifaddrs="yes"
+"
+if test "x$ac_cv_header_net_route_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NET_ROUTE_H 1
+_ACEOF
fi
+done
-case $want_getifaddrs in
- yes|glibc)
- #
- # Do we have getifaddrs() ?
- #
- case $host in
- *-*linux*)
- # Some recent versions of glibc support getifaddrs() which does not
- # provide AF_INET6 addresses while the function provided by the USAGI
- # project handles the AF_INET6 case correctly. We need to avoid
- # using the former but prefer the latter unless overridden by
- # --enable-getifaddrs=glibc.
- case "$want_getifaddrs" in
- glibc)
- for ac_func in getifaddrs
+
+for ac_header in netinfo/ni.h
do :
- ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
-if test "x$ac_cv_func_getifaddrs" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinfo_ni_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_GETIFADDRS 1
+#define HAVE_NETINFO_NI_H 1
_ACEOF
fi
+
done
- ;;
- *)
- save_LIBS="$LIBS"
- LIBS="-L/usr/local/v6/lib $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getifaddrs in -linet6" >&5
-$as_echo_n "checking for getifaddrs in -linet6... " >&6; }
-if ${ac_cv_lib_inet6_getifaddrs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-linet6 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+case "$ac_cv_header_netinfo_ni_h" in
+ yes)
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getifaddrs ();
-int
-main ()
-{
-return getifaddrs ();
- ;
- return 0;
-}
+$as_echo "#define HAVE_NETINFO 1" >>confdefs.h
+
+esac
+for ac_header in sun/audioio.h sys/audioio.h sys/file.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_inet6_getifaddrs=yes
-else
- ac_cv_lib_inet6_getifaddrs=no
+
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+done
+
+case "$host" in
+ *-*-sunos4*)
+ ;;
+ *)
+ for ac_header in sys/ioctl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ioctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_IOCTL_H 1
+_ACEOF
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_getifaddrs" >&5
-$as_echo "$ac_cv_lib_inet6_getifaddrs" >&6; }
-if test "x$ac_cv_lib_inet6_getifaddrs" = xyes; then :
- ans=yes
-else
- ans=no
+
+done
+
+ ;;
+esac
+for ac_header in sys/ipc.h sys/lock.h sys/mman.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
- case "$ans" in
- yes)
- LIBS="$LIBS -linet6"
- $as_echo "#define HAVE_GETIFADDRS 1" >>confdefs.h
+done
- ;;
- *)
- LIBS=${save_LIBS}
- ;;
- esac
- ;;
- esac
- ;;
- esac
+# HMS: Check sys/proc.h and sys/resource.h after some others
+for ac_header in sys/modem.h sys/ppsclock.h sys/ppstime.h sched.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+case "$ac_cv_header_sched_h" in
+ yes)
;;
*)
- for ac_func in getifaddrs
+ for ac_header in sys/sched.h
do :
- ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
-if test "x$ac_cv_func_getifaddrs" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sched_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_GETIFADDRS 1
+#define HAVE_SYS_SCHED_H 1
_ACEOF
fi
+
done
;;
esac
+# HMS: Check sys/shm.h after some others
+for ac_header in sys/select.h sys/signal.h sys/sockio.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
-$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
-if ${ntp_cv_getsockname_socklen_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
+fi
- getsockname_socklen_type_found=no
- for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
- for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+done
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
+# HMS: Checked sys/socket.h earlier
+case "$host" in
+ *-*-netbsd*)
+ ;;
+ *)
+ for ac_header in machine/soundcard.h sys/soundcard.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-int
-main ()
-{
+fi
- extern
- getsockname(int, $getsockname_arg2,
- $ntp_cv_getsockname_socklen_type *);
+done
+
+ ;;
+esac
+for ac_header in sys/stat.h sys/stream.h stropts.h sys/stropts.h sys/syssgi.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
- ;
- return 0;
-}
+done
+
+for ac_header in sys/systune.h sys/termios.h sys/tpro.h sys/wait.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- getsockname_socklen_type_found=yes ; break 2
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- done
- case "$getsockname_socklen_type_found" in
- no)
- ntp_cv_getsockname_socklen_type='socklen_t'
- esac
- { getsockname_arg2=; unset getsockname_arg2;}
- { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
+done
+
+case "$host" in
+*-convex-*)
+ for ac_header in /sys/sync/queue.h /sys/sync/sema.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
-$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
+done
+
+ ;;
+*-*-bsdi*)
+ for ac_header in machine/inline.h sys/pcl720.h sys/i8253.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
+fi
-for ac_func in getuid getrusage hstrerror
+done
+
+ ;;
+esac
+
+case "$host" in
+ *-*-solaris2.6)
+ # Broken...
+ ;;
+ *)
+ for ac_func in ntp_adjtime ntp_gettime
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19386,26 +29131,97 @@ _ACEOF
fi
done
-ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
-if test "x$ac_cv_func_gettimeofday" = xyes; then :
-
-else
-
-case "$host" in
- *-*-mpeix*) ac_cv_func_gettimeofday=yes
;;
esac
+
+case "$host" in
+ *-*-*linux*)
+ case "$ac_cv_func_ntp_gettime" in
+ yes)
+ ;;
+ *)
+ for ac_func in __ntp_gettime
+do :
+ ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
+if test "x$ac_cv_func___ntp_gettime" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___NTP_GETTIME 1
+_ACEOF
+
fi
+done
+ case "$ac_cv_func___ntp_gettime" in
+ yes)
-#
-# Check for if_nametoindex() for IPv6 scoped addresses support
-#
-case "$host" in
- *-hp-hpux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
-$as_echo_n "checking for library containing if_nametoindex... " >&6; }
-if ${ac_cv_search_if_nametoindex+:} false; then :
+$as_echo "#define ntp_gettime __ntp_gettime" >>confdefs.h
+
+
+$as_echo "#define HAVE_NTP_GETTIME 1" >>confdefs.h
+
+ esac
+ ;;
+ esac
+ for ac_func in adjtimex
+do :
+ ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
+if test "x$ac_cv_func_adjtimex" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ADJTIMEX 1
+_ACEOF
+
+fi
+done
+
+ case "$ac_cv_func_adjtimex" in
+ yes)
+
+$as_echo "#define ntp_adjtime adjtimex" >>confdefs.h
+
+
+$as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
+
+ have_adjtimex=1
+ ;;
+ *)
+ for ac_func in __adjtimex
+do :
+ ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
+if test "x$ac_cv_func___adjtimex" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___ADJTIMEX 1
+_ACEOF
+
+fi
+done
+
+ case "$ac_cv_func___adjtimex" in
+ yes)
+
+$as_echo "#define ntp_adjtime __adjtimex" >>confdefs.h
+
+
+$as_echo "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
+
+
+$as_echo "#define adjtimex __adjtimex" >>confdefs.h
+
+
+$as_echo "#define HAVE_ADJTIMEX 1" >>confdefs.h
+
+ have_adjtimex=1
+ esac
+ ;;
+ esac
+esac
+case "$have_adjtimex" in
+ '')
+ # nlist stuff is only needed for tickadj.
+ saved_LIBS="$LIBS"
+ LIBS=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
+$as_echo_n "checking for library containing nlist... " >&6; }
+if ${ac_cv_search_nlist+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -19418,16 +29234,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char if_nametoindex ();
+char nlist ();
int
main ()
{
-return if_nametoindex ();
+return nlist ();
;
return 0;
}
_ACEOF
-for ac_lib in '' ipv6; do
+for ac_lib in '' elf ld mld; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -19435,52 +29251,34 @@ for ac_lib in '' ipv6; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_if_nametoindex=$ac_res
+ ac_cv_search_nlist=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_if_nametoindex+:} false; then :
+ if ${ac_cv_search_nlist+:} false; then :
break
fi
done
-if ${ac_cv_search_if_nametoindex+:} false; then :
+if ${ac_cv_search_nlist+:} false; then :
else
- ac_cv_search_if_nametoindex=no
+ ac_cv_search_nlist=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
-$as_echo "$ac_cv_search_if_nametoindex" >&6; }
-ac_res=$ac_cv_search_if_nametoindex
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
+$as_echo "$ac_cv_search_nlist" >&6; }
+ac_res=$ac_cv_search_nlist
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-esac
-for ac_func in if_nametoindex
-do :
- ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
-if test "x$ac_cv_func_if_nametoindex" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_IF_NAMETOINDEX 1
-_ACEOF
-
-fi
-done
-
-case "$ac_cv_func_if_nametoindex" in
- yes)
-
-$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
-
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
-$as_echo_n "checking for library containing inet_ntop... " >&6; }
-if ${ac_cv_search_inet_ntop+:} false; then :
+ # XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
+$as_echo_n "checking for library containing kvm_open... " >&6; }
+if ${ac_cv_search_kvm_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -19493,83 +29291,752 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char inet_ntop ();
+char kvm_open ();
int
main ()
{
-return inet_ntop ();
+return kvm_open ();
;
return 0;
}
_ACEOF
-for ac_lib in '' resolv; do
+for ac_lib in '' kvm; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lsocket -lnsl $ac_func_search_save_LIBS"
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_inet_ntop=$ac_res
+ ac_cv_search_kvm_open=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_inet_ntop+:} false; then :
+ if ${ac_cv_search_kvm_open+:} false; then :
break
fi
done
-if ${ac_cv_search_inet_ntop+:} false; then :
+if ${ac_cv_search_kvm_open+:} false; then :
else
- ac_cv_search_inet_ntop=no
+ ac_cv_search_kvm_open=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
-$as_echo "$ac_cv_search_inet_ntop" >&6; }
-ac_res=$ac_cv_search_inet_ntop
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
+$as_echo "$ac_cv_search_kvm_open" >&6; }
+ac_res=$ac_cv_search_kvm_open
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
+ # XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
+ for ac_header in nlist.h sys/var.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-if test "x$ac_cv_func_inet_ntop" = xyes; then :
+fi
+
+done
+
+ case "$ac_cv_header_nlist_h" in
+ yes)
+
+$as_echo "#define NLIST_STRUCT 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
+$as_echo_n "checking for n_un in struct nlist... " >&6; }
+if ${ntp_cv_struct_nlist_n_un+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
+ #include <nlist.h>
+
+int
+main ()
+{
+
+ struct nlist n;
+ n.n_un.n_name = 0;
+
+
+ ;
+ return 0;
+}
+ ntp_cv_struct_nlist_n_un=yes
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_nlist_n_un=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
+$as_echo "$ntp_cv_struct_nlist_n_un" >&6; }
+ case "$ntp_cv_struct_nlist_n_un" in
+ yes)
+
+$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
+
+ esac
+ esac
+
+ LDADD_NLIST="$LIBS"
+ LIBS="$saved_LIBS"
+ { saved_LIBS=; unset saved_LIBS;}
+esac
+
+for ac_header in sys/proc.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_proc_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PROC_H 1
+_ACEOF
+
+fi
+done
+
+
+for ac_header in sys/resource.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_resource_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_RESOURCE_H 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/shm.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_IPC_H
+ # include <sys/ipc.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_shm_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SHM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/timex.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_timex_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEX_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
-$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_signal=int
+else
+ ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
-case "$ac_cv_header_kvm_h" in
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
+$as_echo_n "checking for a fallback value for HZ... " >&6; }
+if ${ntp_cv_default_hz+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ntp_cv_default_hz=100
+ case "$host" in
+ alpha*-dec-osf4*|alpha*-dec-osf5*)
+ ntp_cv_default_hz=1024
+ ;;
+ mips-dec-ultrix4*)
+ ntp_cv_default_hz=256
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
+$as_echo "$ntp_cv_default_hz" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_HZ $ntp_cv_default_hz
+_ACEOF
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
+$as_echo_n "checking if we need to override the system's value for HZ... " >&6; }
+if ${ntp_cv_override_hz+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ntp_cv_override_hz=no
+ case "$host" in
+ alpha*-dec-osf4*|alpha*-dec-osf5*)
+ ntp_cv_override_hz=yes
+ ;;
+ mips-dec-ultrix4*)
+ ntp_cv_override_hz=yes
+ ;;
+ *-*-freebsd*)
+ ntp_cv_override_hz=yes
+ ;;
+ *-*-sunos4*)
+ ntp_cv_override_hz=yes
+ ;;
+ *-*-kfreebsd*)
+ ntp_cv_override_hz=yes
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
+$as_echo "$ntp_cv_override_hz" >&6; }
+case "$ntp_cv_override_hz" in
yes)
- for ac_func in kvm_open
+
+$as_echo "#define OVERRIDE_HZ 1" >>confdefs.h
+
+esac
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
+$as_echo_n "checking for struct rt_msghdr... " >&6; }
+if ${ntp_cv_struct_rt_msghdr+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <net/route.h>
+
+int
+main ()
+{
+
+ struct rt_msghdr p;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_rt_msghdr=yes
+else
+ ntp_cv_struct_rt_msghdr=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
+$as_echo "$ntp_cv_struct_rt_msghdr" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
+$as_echo_n "checking for struct rtattr... " >&6; }
+if ${ntp_cv_rtattr+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <sys/socket.h>
+ #include <linux/rtnetlink.h>
+
+int
+main ()
+{
+
+ struct rtattr p;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_rtattr=yes
+else
+ ntp_cv_rtattr=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
+$as_echo "$ntp_cv_rtattr" >&6; }
+
+case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
+ *yes*)
+
+$as_echo "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
+
+ case "$ntp_cv_rtattr" in
+ yes)
+
+$as_echo "#define HAVE_RTNETLINK 1" >>confdefs.h
+
+ esac
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
+$as_echo_n "checking struct sigaction for sa_sigaction... " >&6; }
+if ${ntp_cv_struct_sigaction_has_sa_sigaction+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <signal.h>
+
+int
+main ()
+{
+
+ struct sigaction act;
+ act.sa_sigaction = 0;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_sigaction_has_sa_sigaction=yes
+else
+ ntp_cv_struct_sigaction_has_sa_sigaction=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
+$as_echo "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
+case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
+ yes)
+
+$as_echo "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
+$as_echo_n "checking for struct ppsclockev... " >&6; }
+if ${ntp_cv_struct_ppsclockev+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_ppsclockev=yes
+else
+ ntp_cv_struct_ppsclockev=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
+$as_echo "$ntp_cv_struct_ppsclockev" >&6; }
+case "$ntp_cv_struct_ppsclockev" in
+ yes)
+
+$as_echo "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
+
+esac
+
+case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
+ *yes*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
+$as_echo_n "checking for struct snd_size... " >&6; }
+if ${ntp_cv_struct_snd_size+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_snd_size=yes
+else
+ ntp_cv_struct_snd_size=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
+$as_echo "$ntp_cv_struct_snd_size" >&6; }
+ case "$ntp_cv_struct_snd_size" in
+ yes)
+
+$as_echo "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
+
+ esac
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
+$as_echo_n "checking struct clockinfo for hz... " >&6; }
+if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/time.h>
+
+int
+main ()
+{
+
+ extern struct clockinfo *pc;
+ return pc->hz;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_clockinfo_has_hz=yes
+else
+ ntp_cv_struct_clockinfo_has_hz=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
+$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
+case "$ntp_cv_struct_clockinfo_has_hz" in
+ yes)
+
+$as_echo "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
+$as_echo_n "checking struct clockinfo for tickadj... " >&6; }
+if ${ntp_cv_struct_clockinfo_has_hz+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/time.h>
+
+int
+main ()
+{
+
+ extern struct clockinfo *pc;
+ return pc->tickadj;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_clockinfo_has_hz=yes
+else
+ ntp_cv_struct_clockinfo_has_hz=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
+$as_echo "$ntp_cv_struct_clockinfo_has_hz" >&6; }
+case "$ntp_cv_struct_clockinfo_has_hz" in
+ yes)
+
+$as_echo "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
+
+esac
+
+case "$ntp_cv_struct_ntptimeval" in
+ yes)
+ ac_fn_c_check_member "$LINENO" "struct ntptimeval" "time.tv_nsec" "ac_cv_member_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
+
+
+"
+if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1
+_ACEOF
+
+
+fi
+
+esac
+
+####
+
+saved_LIBS="$LIBS"
+LIBS="$LIBS $LDADD_LIBNTP"
+for ac_func in daemon
do :
- ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
-if test "x$ac_cv_func_kvm_open" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
+if test "x$ac_cv_func_daemon" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_KVM_OPEN 1
+#define HAVE_DAEMON 1
_ACEOF
fi
done
- ;;
-esac
+# XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
+LIBS="$saved_LIBS"
+{ saved_LIBS=; unset saved_LIBS;}
-for ac_func in memcpy memmove memset
+for ac_func in finite
+do :
+ ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
+if test "x$ac_cv_func_finite" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FINITE 1
+_ACEOF
+
+else
+ for ac_func in isfinite
+do :
+ ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
+if test "x$ac_cv_func_isfinite" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ISFINITE 1
+_ACEOF
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
+$as_echo_n "checking for isfinite with <math.h>... " >&6; }
+ _libs=$LIBS
+ # XXX
+ LIBS="$LIBS -lm"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <math.h>
+
+int
+main ()
+{
+
+ float f = 0.0;
+ isfinite(f);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ans=yes
+else
+ ans=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$_libs
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+ case "$ans" in
+ yes)
+ $as_echo "#define HAVE_ISFINITE 1" >>confdefs.h
+
+ esac
+
+
+fi
+done
+
+
+fi
+done
+
+
+for ac_func in fnmatch getbootfile getuid getrusage nanosleep strsignal
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19581,9 +30048,27 @@ _ACEOF
fi
done
+
+# kvm_open() is only used by tickadj. Also see above.
+case "$ac_cv_header_kvm_h" in
+ yes)
+ for ac_func in kvm_open
+do :
+ ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
+if test "x$ac_cv_func_kvm_open" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KVM_OPEN 1
+_ACEOF
+
+fi
+done
+
+ ;;
+esac
+
case "$host" in
*-*-sco3.2v5.0.*)
- # Just stubs. Idiots.
+ # Just stubs. Sigh.
;;
*) for ac_func in mkstemp
do :
@@ -19610,20 +30095,22 @@ fi
done
case "$host" in
- *-*-aix[456]*)
- # Just a stub. Idiots.
+ *-*-aix[4-9]*)
+ # XXX only verified thru AIX6.
+ # Just a stub. Sigh.
;;
*-*-irix[45]*)
- # Just a stub in "old" Irix. Idiots.
- ;;
- *-*-*linux*)
- # there, but more trouble than it is worth for now (resolver problems)
+ # Just a stub in "old" Irix. Sigh.
;;
+# In the belief that the fix for bug 1223 fixes mlockall() under linux...
+# *-*-*linux*)
+# # there, but more trouble than it is worth for now (resolver problems)
+# ;;
*-*-qnx*)
- # Apparently there but not working in QNX. Idiots?
+ # Apparently there but not working in QNX. Sigh?
;;
*-*-sco3.2v5.0.*)
- # Just a stub. Idiots.
+ # Just a stub. Sigh.
;;
alpha*-dec-osf4*|alpha*-dec-osf5*)
# mlockall is there, as a #define calling memlk via <sys/mman.h>
@@ -19664,7 +30151,7 @@ done
;;
esac
-for ac_func in nice nlist
+for ac_func in nice plock pututline pututxline readlink rtprio
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19677,10 +30164,27 @@ fi
done
case "$host" in
- *-*-solaris2.6)
- # Broken...
+ *-*-aix[4-9]*)
+ # XXX only verified thru AIX6.
+ # Just a stub in AIX 4. Sigh.
+ ;;
+ *-*-solaris2.5*)
+ # Just stubs in solaris2.5. Sigh.
+ ;;
+ *) for ac_func in sched_setscheduler
+do :
+ ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
+if test "x$ac_cv_func_sched_setscheduler" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SCHED_SETSCHEDULER 1
+_ACEOF
+
+fi
+done
+
;;
- *) for ac_func in ntp_adjtime ntp_gettime
+esac
+for ac_func in setlinebuf setpgid setpriority setsid setvbuf
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19692,9 +30196,7 @@ _ACEOF
fi
done
- ;;
-esac
-for ac_func in plock pututline pututxline readlink recvmsg rtprio
+for ac_func in strdup strerror setrlimit strchr
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19707,18 +30209,26 @@ fi
done
case "$host" in
- *-*-aix[456]*)
- # Just a stub in AIX 4. Idiots.
+ *-*-aix[4-9]*)
+ # XXX only verified thru AIX6.
+ # Just stubs. Sigh.
;;
- *-*-solaris2.5*)
- # Just stubs in solaris2.5. Idiots.
+ *-*-netbsd1*)
+ # Just stubs. Sigh.
;;
- *) for ac_func in sched_setscheduler
+ *-*-netbsdelf1*)
+ # Just stubs. Sigh.
+ ;;
+ *-*-openbsd*)
+ # Just stubs. Sigh.
+ ;;
+ *)
+ for ac_func in timer_create
do :
- ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
-if test "x$ac_cv_func_sched_setscheduler" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
+if test "x$ac_cv_func_timer_create" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_SCHED_SETSCHEDULER 1
+#define HAVE_TIMER_CREATE 1
_ACEOF
fi
@@ -19726,98 +30236,195 @@ done
;;
esac
-for ac_func in setlinebuf setpgid setpriority setsid
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
-for ac_func in setrlimit
-do :
- ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
-if test "x$ac_cv_func_setrlimit" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETRLIMIT 1
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
+$as_echo_n "checking for RLIMIT_MEMLOCK... " >&6; }
+if ${ntp_cv_rlimit_memlock+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_RESOURCE_H
+ # include <sys/resource.h>
+ #endif
+
+int
+main ()
+{
+
+ getrlimit(RLIMIT_MEMLOCK, 0);
+
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_rlimit_memlock=yes
+else
+ ntp_cv_rlimit_memlock=no
fi
-done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-for ac_func in settimeofday
-do :
- ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
-if test "x$ac_cv_func_settimeofday" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SETTIMEOFDAY 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
+$as_echo "$ntp_cv_rlimit_memlock" >&6; }
+case "$ntp_cv_rlimit_memlock" in
+ yes)
+
+ HAVE_RLIMIT_MEMLOCK=" memlock 32"
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
+$as_echo_n "checking for RLIMIT_STACK... " >&6; }
+if ${ntp_cv_rlimit_stack+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-case "$host" in
- *-*-mpeix*) ac_cv_func_settimeofday=yes
- ;;
-esac
-fi
-done
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_RESOURCE_H
+ # include <sys/resource.h>
+ #endif
-for ac_func in setvbuf sigaction sigvec sigset sigsuspend stime strchr
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+int
+main ()
+{
+
+ getrlimit(RLIMIT_STACK, 0);
+
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_rlimit_stack=yes
+else
+ ntp_cv_rlimit_stack=no
fi
-done
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-for ac_func in sysconf sysctl snprintf strdup strerror strstr timegm
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
+$as_echo "$ntp_cv_rlimit_stack" >&6; }
+case "$ntp_cv_rlimit_stack" in
+ yes)
+
+ HAVE_RLIMIT_STACK=" stacksize 50"
+esac
+
+
+
+# HMS: Only if we are doing the MLOCKALL stuff...
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
+$as_echo_n "checking for the default number of 4k stack pages... " >&6; }
+
+# Check whether --with-stack-limit was given.
+if test "${with_stack_limit+set}" = set; then :
+ withval=$with_stack_limit; ans=$withval
+else
+ ans=yes
fi
-done
-case "$host" in
- *-*-aix[456]*)
- # Just stubs. Idiots.
+case "$ans" in
+ yes | no)
+ case "$host" in
+ *-*-openbsd*)
+ ans=200
+ ;;
+ *) ans=50
+ ;;
+ esac
;;
- *-*-netbsd1*)
- # Just stubs. Idiots.
+ [1-9][0-9]*)
;;
- *-*-netbsdelf1*)
- # Just stubs. Idiots.
+ *) as_fn_error $? "\"--with-stack-limit requires an integer argument.\"" "$LINENO" 5
;;
- *-*-openbsd*)
- # Just stubs. Idiots.
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define DFLT_RLIMIT_STACK $ans
+_ACEOF
+
+
+# HMS: only if we have RLIMIT_MEMLOCK
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
+$as_echo_n "checking for the default number of megabytes to MEMLOCK... " >&6; }
+
+# Check whether --with-memlock was given.
+if test "${with_memlock+set}" = set; then :
+ withval=$with_memlock; ans=$withval
+else
+ ans=yes
+
+fi
+
+case "$ans" in
+ yes | no)
+ ans=32
;;
- *) for ac_func in timer_create timer_settime
+ [1-9][0-9]*) ;;
+ *) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define DFLT_RLIMIT_MEMLOCK $ans
+_ACEOF
+
+
+
+# some OSes prefer _exit() in forked children to exit()
+for ac_func in _exit
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
+if test "x$ac_cv_func__exit" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE__EXIT 1
_ACEOF
fi
done
+ntp_worker_child_exit=exit
+case "$ac_cv_func__exit::$host_os" in
+ yes::netbsd*)
+ ntp_worker_child_exit=_exit
+ ;;
+ yes::openbsd*)
+ ntp_worker_child_exit=_exit
;;
esac
-for ac_func in umask uname updwtmp updwtmpx vsnprintf vsprintf
+
+cat >>confdefs.h <<_ACEOF
+#define WORKER_CHILD_EXIT $ntp_worker_child_exit
+_ACEOF
+
+
+for ac_func in umask uname updwtmp updwtmpx
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19899,54 +30506,6 @@ $as_echo "#define HAVE_SYS_UIO_H 1" >>confdefs.h
esac
esac
-case "$host" in
- *-*-sunos4*)
-
-$as_echo "#define SPRINTF_CHAR 1" >>confdefs.h
-
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
-$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
-if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/time.h>
-
-int
-main ()
-{
-
- gettimeofday(0, 0);
- settimeofday(0, 0);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_func_Xettimeofday_nargs=2
-else
- ntp_cv_func_Xettimeofday_nargs=1
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
-$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
-case "$ntp_cv_func_Xettimeofday_nargs" in
- 1)
-
-$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
-
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
$as_echo_n "checking number of arguments taken by setpgrp()... " >&6; }
if ${ntp_cv_func_setpgrp_nargs+:} false; then :
@@ -19991,10 +30550,6 @@ $as_echo "#define HAVE_SETPGRP_0 1" >>confdefs.h
esac
-
-$as_echo "#define QSORT_USES_VOID_P 1" >>confdefs.h
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
$as_echo_n "checking if we need to declare 'errno'... " >&6; }
if ${ntp_cv_decl_errno+:} false; then :
@@ -20444,7 +30999,7 @@ if ${ntp_cv_func_ctty_for_f_setown+:} false; then :
else
case "$host" in
- *-*-bsdi23*)
+ *-*-bsdi[23]*)
ans=yes
;;
*-*-freebsd*)
@@ -20454,10 +31009,10 @@ else
# while later versions will fail a ioctl(TIOCSCTTY, 0) call in
# some cases and so should not have USE_FSETOWNCTTY. "netbsd"
# in $host may be followed by "aout", "ecoff", or "elf".
- *-*-netbsd*a-z3.0-8*|*-*-netbsd*a-z0-2.*|*-*-netbsd*a-z3.99.0-7)
+ *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
ans=yes
;;
- *-*-netbsd3.0-8*|*-*-netbsd0-2.*|*-*-netbsd3.99.0-7)
+ *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
ans=yes
;;
*-*-openbsd*)
@@ -20539,327 +31094,6 @@ $as_echo "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
-$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
-ntp_warning='GRONK'
-ans=none
-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!'
- esac
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-case "$ntp_warning" in
- '')
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
-$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
-$as_echo_n "checking for SIGIO... " >&6; }
-if ${ntp_cv_hdr_def_sigio+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 :
- ntp_cv_hdr_def_sigio=yes
-else
- ntp_cv_hdr_def_sigio=no
-
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
-$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use signalled IO" >&5
-$as_echo_n "checking if we want to use signalled IO... " >&6; }
-if ${ntp_cv_var_signalled_io+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ans=no
- case "$ntp_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
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- m68k-*-mint*)
- ans=no
- ;;
- esac
- ;;
- esac
- ntp_cv_var_signalled_io=$ans
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_signalled_io" >&5
-$as_echo "$ntp_cv_var_signalled_io" >&6; }
-case "$ntp_cv_var_signalled_io" in
- yes)
-
-$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
-
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
-$as_echo_n "checking for SIGPOLL... " >&6; }
-if ${ntp_cv_hdr_def_sigpoll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 :
- ntp_cv_hdr_def_sigpoll=yes
-else
- ntp_cv_hdr_def_sigpoll=no
-
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
-$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGSYS" >&5
-$as_echo_n "checking for SIGSYS... " >&6; }
-if ${ntp_cv_hdr_def_sigsys+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 :
- ntp_cv_hdr_def_sigsys=yes
-else
- ntp_cv_hdr_def_sigsys=no
-
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigsys" >&5
-$as_echo "$ntp_cv_hdr_def_sigsys" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
-if ${ntp_cv_var_use_udp_sigpoll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ans=no
- case "$ntp_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[456]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-solaris*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ntp_cv_var_use_udp_sigpoll=$ans
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_use_udp_sigpoll" >&5
-$as_echo "$ntp_cv_var_use_udp_sigpoll" >&6; }
-case "$ntp_cv_var_use_udp_sigpoll" in
- yes)
-
-$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
-
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
-$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
-if ${ntp_cv_var_use_tty_sigpoll+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ans=no
- case "$ntp_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[456]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ntp_cv_var_use_tty_sigpoll=$ans
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_use_tty_sigpoll" >&5
-$as_echo "$ntp_cv_var_use_tty_sigpoll" >&6; }
-case "$ntp_cv_var_use_tty_sigpoll" in
- yes)
-
-$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
-
-esac
-
case "$host" in
*-*-aix*)
@@ -20932,25 +31166,6 @@ $as_echo "#define NO_PARENB_IGNPAR 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including ntpd debugging code" >&5
-$as_echo_n "checking if we're including ntpd debugging code... " >&6; }
-# Check whether --enable-debugging was given.
-if test "${enable_debugging+set}" = set; then :
- enableval=$enable_debugging; ntp_ok=$enableval
-else
- ntp_ok=yes
-
-fi
-
-case "$ntp_ok" in
- yes)
-
-$as_echo "#define DEBUG 1" >>confdefs.h
-
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
-$as_echo "$ntp_ok" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
$as_echo_n "checking if we're including processing time debugging code... " >&6; }
# Check whether --enable-debug-timing was given.
@@ -21007,168 +31222,6 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ntpd will use the deferred DNS lookup path" >&5
-$as_echo_n "checking if ntpd will use the deferred DNS lookup path... " >&6; }
-# Check whether --enable-force-defer-DNS was given.
-if test "${enable_force_defer_DNS+set}" = set; then :
- enableval=$enable_force_defer_DNS; ans=$enableval
-else
- ans=no
-
-fi
-
-case "$ans" in
- yes)
-
-$as_echo "#define FORCE_DEFER_DNS 1" >>confdefs.h
-
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-
-case "$ac_cv_header_sys_sio_h" in
- yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sio.h for TIOCDCDTIMESTAMP" >&5
-$as_echo_n "checking sys/sio.h for TIOCDCDTIMESTAMP... " >&6; }
-if ${ntp_cv_hdr_def_tiocdcdtimestamp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 :
- ntp_cv_hdr_def_tiocdcdtimestamp=yes
-else
- ntp_cv_hdr_def_tiocdcdtimestamp=no
-
-fi
-rm -f conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_tiocdcdtimestamp" >&5
-$as_echo "$ntp_cv_hdr_def_tiocdcdtimestamp" >&6; }
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have the tty_clk line discipline/streams module" >&5
-$as_echo_n "checking if we have the tty_clk line discipline/streams module... " >&6; }
-if ${ntp_cv_tty_clk+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$ac_cv_header_sys_clkdefs_h$ntp_cv_hdr_def_tiocdcdtimestamp" in
- *yes*)
- ntp_cv_tty_clk=yes
- ;;
- *)
- ntp_cv_tty_clk=no
- ;;
- esac
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tty_clk" >&5
-$as_echo "$ntp_cv_tty_clk" >&6; }
-case "$ntp_cv_tty_clk" in
- yes)
-
-$as_echo "#define TTYCLK 1" >>confdefs.h
-
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ppsclock streams module" >&5
-$as_echo_n "checking for the ppsclock streams module... " >&6; }
-case "$ntp_cv_struct_ppsclockev" in
- yes)
- ans=yes
-
-$as_echo "#define PPS 1" >>confdefs.h
-
- ;;
- *)
- ans=no
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
-$as_echo_n "checking for multicast IP support... " >&6; }
-if ${ntp_cv_multicast+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- ntp_cv_multicast=no
- case "$host" in
- i386-sequent-sysv4)
- ;;
- *)
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
-
-int
-main ()
-{
-
- struct ip_mreq ipmr;
- ipmr.imr_interface.s_addr = 0;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_multicast=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- esac
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
-$as_echo "$ntp_cv_multicast" >&6; }
-case "$ntp_cv_multicast" in
- yes)
-
-$as_echo "#define MCAST 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
-$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
-if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host" in
- *-*-netbsd*|*-*-*linux*)
- ntp_cv_typeof_ip_multicast_loop=u_int
- ;;
- *)
- ntp_cv_typeof_ip_multicast_loop=u_char
- esac
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
-$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
-_ACEOF
-
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
$as_echo_n "checking availability of ntp_{adj,get}time()... " >&6; }
if ${ntp_cv_var_ntp_syscalls+:} false; then :
@@ -21188,19 +31241,16 @@ else
/* end confdefs.h. */
#include <sys/syscall.h>
-
- #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
- yes
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_cv_var_ntp_syscalls=kernel
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
;;
esac
@@ -21230,21 +31280,18 @@ else
/* end confdefs.h. */
#include <sys/timex.h>
-
- #ifdef STA_FLL
- yes
+ #ifndef STA_FLL
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_cv_var_sta_fll=yes
else
ntp_cv_var_sta_fll=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
@@ -21314,21 +31361,18 @@ case "$ac_cv_header_termios_h" in
/* end confdefs.h. */
#include <termios.h>
-
- #ifdef TIOCGPPSEV
- yes
+ #ifndef TIOCGPPSEV
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_ok=yes
else
ntp_ok=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
;;
*)
ntp_ok=no
@@ -21352,21 +31396,18 @@ case "$ac_cv_header_termios_h" in
/* end confdefs.h. */
#include <termios.h>
-
- #ifdef TIOCSPPS
- yes
+ #ifndef TIOCSPPS
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_ok=yes
else
ntp_ok=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
;;
*)
ntp_ok=no
@@ -21390,21 +31431,18 @@ case "$ac_cv_header_sys_ppsclock_h" in
/* end confdefs.h. */
#include <sys/ppsclock.h>
-
- #ifdef CIOGETEV
- yes
+ #ifndef CIOGETEV
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_ok=yes
else
ntp_ok=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
;;
*)
ntp_ok=no
@@ -21464,28 +31502,30 @@ $as_echo_n "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS
#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
+ #ifndef TIOCGSERIAL
+ # error
#endif
+ #ifndef TIOCSSERIAL
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_POS
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_NEG
+ # error
#endif
+ #ifndef CIOGETEV
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_ok=yes
else
ntp_ok=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
;;
@@ -21533,12 +31573,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_BANC 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$host" in
@@ -21558,12 +31600,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_GPSVME 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$host" in
@@ -21702,12 +31746,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ACTS 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21721,12 +31767,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ARBITER 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21740,12 +31788,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21759,12 +31809,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_AS2201 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21781,12 +31833,14 @@ fi
case "$ntp_atom_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ATOM 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21800,12 +31854,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_CHRONOLOG 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21819,12 +31875,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_CHU 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
ntp_refclock_chu=$ntp_ok
@@ -21844,11 +31902,6 @@ else
fi
-if test "$ntp_ok" = "yes"; then
-
-$as_echo "#define AUDIO_CHU 1" >>confdefs.h
-
-fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
# We used to check for sunos/solaris target...
@@ -21876,12 +31929,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_DATUM 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21895,12 +31950,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21914,12 +31971,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_FG 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21934,12 +31993,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_HEATH 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21953,12 +32014,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21972,12 +32035,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_HOPF_PCI 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -21991,12 +32056,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_HPGPS 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22015,12 +32082,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_IRIG 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canaudio" in
@@ -22038,12 +32107,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_JJY 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22059,12 +32130,14 @@ fi
case "$ntp_jupiter_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_JUPITER 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22078,12 +32151,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_LEITCH 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22097,12 +32172,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_LOCAL 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22127,12 +32204,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_MX4200 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$host" in
@@ -22150,12 +32229,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22169,12 +32250,49 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_NMEA 1" >>confdefs.h
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+
+for ac_func in strtoll
+do :
+ ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOLL 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
+$as_echo_n "checking for GPSD JSON receiver... " >&6; }
+# Check whether --enable-GPSD was given.
+if test "${enable_GPSD+set}" = set; then :
+ enableval=$enable_GPSD; ntp_ok=$enableval
+else
+ case "$ac_cv_func_strtoll" in
+ yes) ntp_ok=$ntp_eac ;;
+ *) ntp_ok="no" ;;
+ esac
+
fi
+
+case "$ntp_ok" in
+ yes)
+ ntp_refclock=yes
+
+$as_echo "#define CLOCK_GPSDJSON 1" >>confdefs.h
+
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22191,12 +32309,14 @@ fi
case "$ntp_oncore_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ONCORE 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22211,12 +32331,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_PALISADE 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22230,12 +32352,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_PCF 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22249,12 +32373,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_PST 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22272,12 +32398,14 @@ fi
case "$ntp_ripe_ncc_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_RIPENCC /**/" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22298,12 +32426,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_SHM 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22317,12 +32447,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_SPECTRACOM 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22345,12 +32477,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_TPRO 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ac_cv_header_sys_tpro" in
@@ -22358,7 +32492,6 @@ case "$ntp_ok$ac_cv_header_sys_tpro" in
$as_echo "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
esac
-
# Not on a vax-dec-bsd
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
$as_echo_n "checking Kinemetrics/TrueTime receivers... " >&6; }
@@ -22379,12 +32512,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_TRUETIME 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$host" in
@@ -22402,12 +32537,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_TT560 /**/" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22421,12 +32558,43 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ULINK 1" >>confdefs.h
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
+$as_echo_n "checking Spectracom TSYNC PCI timing board... " >&6; }
+# Check whether --enable-TSYNCPCI was given.
+if test "${enable_TSYNCPCI+set}" = set; then :
+ enableval=$enable_TSYNCPCI; ntp_ok=$enableval
+else
+
+ case "$host" in
+ *-*-*linux*)
+ ntp_ok=$ntp_eac
+ ;;
+ *)
+ ntp_ok=no
+ esac
+
+
fi
+
+case "$ntp_ok" in
+ yes)
+ ntp_refclock=yes
+
+$as_echo "#define CLOCK_TSYNCPCI 1" >>confdefs.h
+
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22445,12 +32613,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_WWV 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canaudio" in
@@ -22468,12 +32638,14 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
$as_echo "#define CLOCK_ZYFER 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
@@ -22520,13 +32692,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_COMPUTIME 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22544,13 +32718,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_DCF7000 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22568,13 +32744,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_HOPF6021 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22592,13 +32770,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_MEINBERG 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22616,7 +32796,8 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_parseutil=yes
ntp_refclock=yes
@@ -22624,7 +32805,8 @@ if test "$ntp_ok" = "yes"; then
$as_echo "#define CLOCK_RAWDCF 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22670,13 +32852,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_RCC8000 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22694,13 +32878,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_SCHMID 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22718,13 +32904,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_TRIMTAIP 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22742,13 +32930,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_TRIMTSIP 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22766,13 +32956,15 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_WHARTON_400A 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
@@ -22790,18 +32982,44 @@ else
fi
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
$as_echo "#define CLOCK_VARITEXT 1" >>confdefs.h
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+case "$ntp_ok$ntp_canparse" in
+ yesno)
+ as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
+$as_echo_n "checking SEL240X clock... " >&6; }
+# Check whether --enable-SEL240X was given.
+if test "${enable_SEL240X+set}" = set; then :
+ enableval=$enable_SEL240X; ntp_ok=$enableval
+else
+ ntp_ok=$ntp_eapc
+fi
+
+if test "$ntp_ok" = "yes"; then
+ ntp_libparse=yes
+ ntp_refclock=yes
+
+$as_echo "#define CLOCK_SEL240X 1" >>confdefs.h
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
case "$ntp_ok$ntp_canparse" in
yesno)
as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
+ ;;
esac
@@ -22828,176 +33046,357 @@ $as_echo "$ans" >&6; }
+ntp_pkgconfig_min_version='0.15.0'
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
+{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
+case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+
+
+
+
+VER_SUFFIX=
+
+
+
+
+# Check whether --with-crypto was given.
+if test "${with_crypto+set}" = set; then :
+ withval=$with_crypto;
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-$as_echo_n "checking for openssl library directory... " >&6; }
# Check whether --with-openssl-libdir was given.
if test "${with_openssl_libdir+set}" = set; then :
- withval=$with_openssl_libdir; ans=$withval
-else
+ withval=$with_openssl_libdir;
+fi
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
+
+# Check whether --with-openssl-incdir was given.
+if test "${with_openssl_incdir+set}" = set; then :
+ withval=$with_openssl_incdir;
+fi
+# Check whether --with-rpath was given.
+if test "${with_rpath+set}" = set; then :
+ withval=$with_rpath;
fi
-case "$ans" in
- no)
- ;;
- yes) # Look in:
- ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib /lib"
- ;;
- *) # Look where they said
- ;;
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+with_crypto=${with_crypto:-openssl,libcrypto}
+case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+esac
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+$as_echo_n "checking pkg-config for $pkg... " >&6; }
+ if $PKG_CONFIG --exists $pkg ; then
+ CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
+ CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
+ LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
+ VER_SUFFIX=o
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+ break
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ done
esac
-case "$ans" in
- no)
- ;;
- *) # Look for libcrypto.a and libssl.a:
- for i in $ans no
- do
+case "$with_crypto:$ntp_openssl" in
+ no:*) ;;
+ *:no)
+ need_dash_r=
+ need_dash_Wlrpath=
+ case "${with_rpath-notgiven}" in
+ yes)
+ # Lame - what to do if we need -Wl... but not -R?
+ need_dash_r=1
+ ;;
+ notgiven)
case "$host" in
- *-*-darwin*)
- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ *-*-linux*)
+ # This may really only be true for gcc
+ need_dash_Wlrpath=1
+ ;;
+ *-*-netbsd*)
+ need_dash_r=1
+ ;;
+ *-*-solaris*)
+ need_dash_r=1
+ ;;
+ esac
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
+$as_echo_n "checking for openssl library directory... " >&6; }
+ with_openssl_libdir=${with_openssl_libdir-notgiven}
+ case "$with_openssl_libdir" in
+ notgiven)
+ case "$build" in
+ $host)
+ with_openssl_libdir=default
;;
*)
- test -f $i/libcrypto.so -a -f $i/libssl.so && break
- test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ with_openssl_libdir=no
;;
esac
- done
- case "$i" in
+ esac
+ case "$with_openssl_libdir" in
+ default)
+ # Look in:
+ with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
+ esac
+ case "$with_openssl_libdir" in
no)
- ans=no
- OPENSSL_LIB=
;;
- *) ans=$i
- OPENSSL_LIB=$ans
+ *) # Look for libcrypto.a and libssl.a:
+ for i in $with_openssl_libdir no
+ do
+ case "$host" in
+ *-*-darwin*)
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+ test -f $i/libcrypto.so -a -f $i/libssl.so && break
+ test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ ;;
+ esac
+ done
+ openssl_libdir=$i
;;
esac
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
+$as_echo "$openssl_libdir" >&6; }
+ case "$openssl_libdir" in
+ no)
+ openssl_libdir=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
+$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
+ esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
$as_echo_n "checking for openssl include directory... " >&6; }
-
-# Check whether --with-openssl-incdir was given.
-if test "${with_openssl_incdir+set}" = set; then :
- withval=$with_openssl_incdir; ans=$withval
-else
-
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
-
-
-fi
-
-case "$ans" in
- no)
- ;;
- yes) # look in:
- ans="/usr/include /usr/sfw/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
+ with_openssl_incdir=${with_openssl_incdir-notgiven}
+ case "$with_openssl_incdir" in
+ notgiven)
+ # Look in:
+ with_openssl_incdir="/usr/include /usr/sfw/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
+ esac
+ case "$with_openssl_incdir" in
no)
- ans=no
- OPENSSL_INC=
;;
- *) ans=$i
- OPENSSL_INC=$ans
+ *) # look for openssl/evp.h:
+ for i in $with_openssl_incdir no
+ do
+ test -f $i/openssl/evp.h && break
+ done
+ openssl_incdir=$i
;;
esac
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-$as_echo_n "checking if we will use crypto... " >&6; }
-
-# Check whether --with-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"
+ { i=; unset i;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
+$as_echo "$openssl_incdir" >&6; }
+ case "$openssl_incdir" in
+ no)
+ openssl_incdir=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
+$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
+ esac
+ if test -z "$openssl_libdir" -o -z "$openssl_incdir"
then
- ans=no
+ ntp_openssl=no
else
- ans=yes
+ ntp_openssl=yes
+ VER_SUFFIX=o
fi
+ case "$ntp_openssl" in
+ yes)
+ # We have OpenSSL inc/lib dirs - use them.
+ case "$openssl_incdir" in
+ /usr/include)
+ ;;
+ *)
+ CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
+ ;;
+ esac
+ case "$openssl_libdir" in
+ /usr/lib)
+ ;;
+ *)
+ LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
+ case "$need_dash_r" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
+ esac
+ case "$need_dash_Wlrpath" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
+ esac
+ ;;
+ esac
+ LDADD_NTP="$LDADD_NTP -lcrypto"
+ esac
esac
-ntp_openssl=$ans
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
+$as_echo_n "checking if we will use crypto... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+$as_echo "$ntp_openssl" >&6; }
case "$ntp_openssl" in
yes)
- # We have OpenSSL inc/lib - use them.
- case "$OPENSSL_INC" in
- /usr/include)
- ;;
- *)
- CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
- ;;
- esac
- case "$OPENSSL_LIB" in
- /usr/lib)
- ;;
- *)
- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
- case "$need_dash_r" in
- 1)
- LDFLAGS="$LDFLAGS -R$OPENSSL_LIB"
- esac
- ;;
- esac
- LCRYPTO=-lcrypto
+$as_echo "#define OPENSSL /**/" >>confdefs.h
-$as_echo "#define OPENSSL 1" >>confdefs.h
-
+ case "$VER_SUFFIX" in
+ *o*) ;;
+ *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
+ esac
+ ;;
esac
+NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
+NTPO_SAVED_LIBS="$LIBS"
+
#
-# check for linking with -lcrypto failure, and try -lz -lcrypto.
+# check for linking with -lcrypto failure, and try -lcrypto -lz.
# Helps m68k-atari-mint
#
-case "$ntp_openssl" in
- yes)
- NTPO_SAVED_LIBS="$LIBS"
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with $LCRYPTO alone works" >&5
-$as_echo_n "checking if linking with $LCRYPTO alone works... " >&6; }
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
+$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
if ${ntp_cv_bare_lcrypto+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23033,9 +33432,9 @@ fi
$as_echo "$ntp_cv_bare_lcrypto" >&6; }
case "$ntp_cv_bare_lcrypto" in
no)
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO -lz"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with $LCRYPTO -lz works" >&5
-$as_echo_n "checking if linking with $LCRYPTO -lz works... " >&6; }
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
+$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
if ${ntp_cv_lcrypto_lz+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23071,11 +33470,9 @@ fi
$as_echo "$ntp_cv_lcrypto_lz" >&6; }
case "$ntp_cv_lcrypto_lz" in
yes)
- LCRYPTO="$LCRYPTO -lz"
+ LDADD_NTP="$LDADD_NTP -lz"
esac
esac
- LIBS="$NTPO_SAVED_LIBS"
- { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
esac
#
@@ -23092,10 +33489,10 @@ esac
#
#
openssl_triggers_warnings=unknown
-SAVED_CFLAGS="$CFLAGS"
+NTPO_SAVED_CFLAGS="$CFLAGS"
-case "$GCC$ntp_openssl" in
- yesyes)
+case "$ntp_openssl:$GCC" in
+ yes:yes)
CFLAGS="$CFLAGS -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23159,43 +33556,102 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
case "$openssl_triggers_warnings" in
yes)
- CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
;;
*)
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
esac
;;
- yesno)
+ no:yes)
# gcc without OpenSSL
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
esac
+CFLAGS="$NTPO_SAVED_CFLAGS"
+CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
+LIBS="$NTPO_SAVED_LIBS"
+{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
+{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
+{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
+{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
+{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to compile with ElectricFence" >&5
-$as_echo_n "checking if we want to compile with ElectricFence... " >&6; }
-# Check whether --with-electricfence was given.
-if test "${with_electricfence+set}" = set; then :
- withval=$with_electricfence; ans=$withval
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
+$as_echo_n "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
+# Check whether --enable-openssl-random was given.
+if test "${enable_openssl_random+set}" = set; then :
+ enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
else
- ans=no
+ ntp_use_openssl_random=yes
fi
-case "$ans" in
- no) ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
+$as_echo "$ntp_use_openssl_random" >&6; }
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+for ac_func in RAND_bytes RAND_poll
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyes)
+
+$as_echo "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
+
+ ;;
+ *) ntp_use_openssl_random=no ;;
+esac
+
+
+
+# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
+$as_echo_n "checking if we want to include NTP Autokey protocol support... " >&6; }
+# Check whether --enable-autokey was given.
+if test "${enable_autokey+set}" = set; then :
+ enableval=$enable_autokey; ntp_autokey=$enableval
+else
+ ntp_autokey=$ntp_openssl
+
+fi
+
+case "$ntp_autokey" in
+ no)
+ ;;
*)
- LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
- EF_PROGS="eftest tstheap"
+ case "$ntp_openssl" in
+ no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
+$as_echo "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
+ ntp_autokey=no
+ ;;
+ *)
- EF_LIBS=libefence.a
+$as_echo "#define AUTOKEY 1" >>confdefs.h
- ans=yes
+ ntp_autokey=yes
+ ;;
+ esac
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
+$as_echo "$ntp_autokey" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
@@ -23217,14 +33673,16 @@ $as_echo "$ans" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
$as_echo_n "checking if we can make dcf parse utilities... " >&6; }
ans=no
-if test "$ntp_parseutil" = "yes"; then
+case "$ntp_parseutil" in
+ yes)
case "$host" in
*-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
ans="dcfd testdcf"
DCFD=dcfd
- TESTDCF=testdcf
+ TESTDCF=testdcf
esac
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
@@ -23270,14 +33728,18 @@ $as_echo "$ans" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
$as_echo_n "checking if we need basic refclock support... " >&6; }
-if test "$ntp_refclock" = "yes"; then
+case "$ntp_refclock" in
+ yes)
$as_echo "#define REFCLOCK 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
$as_echo "$ntp_refclock" >&6; }
+PROPDELAY=propdelay
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
@@ -23289,12 +33751,19 @@ case "$host" in
*) ans=no
;;
esac
-if test "$ans" = "yes"; then
+case "$ans" in
+ yes)
MAKE_ADJTIMED=adjtimed
$as_echo "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
-fi
+ ;;
+ *) ADJTIMED_DB=
+ ADJTIMED_DL=
+ ADJTIMED_DS=
+ ADJTIMED_MS=
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
@@ -23307,11 +33776,13 @@ case "$host" in
*) ans=no
;;
esac
-if test "$ans" = "yes"; then
+case "$ans" in
+ yes)
$as_echo "#define NEED_QNX_ADJTIME 1" >>confdefs.h
-fi
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
@@ -23325,6 +33796,7 @@ case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
ans=yes
;;
*) ans=no
+ ;;
esac
case "$host" in
@@ -23389,7 +33861,8 @@ case "$host" in
*-fujitsu-uxp*)
ans=yes
;;
- *-ibm-aix[456]*)
+ *-ibm-aix[4-9]*)
+ # XXX only verified thru AIX6.
ans=yes
;;
*-*-*linux*)
@@ -23405,6 +33878,7 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
# --enable-accurate-adjtime / --disable-accurate-adjtime
@@ -23448,7 +33922,8 @@ else
*-hp-hpux*)
ans=old_tick
;;
- *-ibm-aix[3456]*)
+ *-ibm-aix[3-9]*)
+ # XXX only verified thru AIX6.
ans=no
;;
*-*-mpeix*)
@@ -23789,18 +34264,21 @@ case "$host" in
case "$can_kmem" in
no)
ans=1000
+ ;;
esac
;;
*-*-domainos) # Skippy: won't be found...
case "$can_kmem" in
no)
ans=668
+ ;;
esac
;;
*-*-hpux*)
case "$adjtime_is_accurate" in
yes)
ans='tick/16'
+ ;;
esac
;;
*-*-irix*)
@@ -23817,6 +34295,7 @@ case "$host" in
;;
*-*-unicosmp*)
ans=150
+ ;;
esac
# Check whether --enable-tickadj was given.
@@ -23919,6 +34398,12 @@ case "$ac_cv_make_ntptime" in
yes)
MAKE_NTPTIME=ntptime
;;
+ *)
+ NTPTIME_DB=
+ NTPTIME_DL=
+ NTPTIME_DS=
+ NTPTIME_MS=
+ ;;
esac
@@ -23968,6 +34453,17 @@ $as_echo "$ntp_cv_make_tickadj" >&6; }
case "$ntp_cv_make_tickadj" in
yes)
MAKE_TICKADJ=tickadj
+ ;;
+ *)
+ CALC_TICKADJ_DB=
+ CALC_TICKADJ_DL=
+ CALC_TICKADJ_DS=
+ CALC_TICKADJ_MS=
+ TICKADJ_DB=
+ TICKADJ_DL=
+ TICKADJ_DS=
+ TICKADJ_MS=
+ ;;
esac
@@ -23996,6 +34492,12 @@ $as_echo "$ntp_cv_make_timetrim" >&6; }
case "$ntp_cv_make_timetrim" in
yes)
MAKE_TIMETRIM=timetrim
+ ;;
+ *) TIMETRIM_DB=
+ TIMETRIM_DL=
+ TIMETRIM_DS=
+ TIMETRIM_MS=
+ ;;
esac
@@ -24017,6 +34519,13 @@ case "$ans" in
yes)
MAKE_NTPDSIM=ntpdsim
MAKE_LIBNTPSIM=libntpsim.a
+ ;;
+ *)
+ NTPDSIM_DB=
+ NTPDSIM_DL=
+ NTPDSIM_DS=
+ NTPDSIM_MS=
+ ;;
esac
case "$build" in
@@ -24031,6 +34540,40 @@ case "$build" in
esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
+$as_echo_n "checking if sntp will be built... " >&6; }
+
+# Check whether --with-sntp was given.
+if test "${with_sntp+set}" = set; then :
+ withval=$with_sntp;
+else
+ with_sntp="${withsntp=yes}"
+
+fi
+
+case "$with_sntp" in
+ no)
+ SNTP=
+ ;;
+ *)
+ SNTP=sntp
+ ;;
+esac
+
+ if test -n "$SNTP"; then
+ BUILD_SNTP_TRUE=
+ BUILD_SNTP_FALSE='#'
+else
+ BUILD_SNTP_TRUE='#'
+ BUILD_SNTP_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
+$as_echo "$with_sntp" >&6; }
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
$as_echo_n "checking if we want to build ntpsnmpd... " >&6; }
@@ -24142,8 +34685,11 @@ $as_echo "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
esac
CFLAGS=$save_CFLAGS
+ { save_CFLAGS=; unset save_CFLAGS;}
CPPFLAGS=$save_CPPFLAGS
+ { save_CPPFLAGS=; unset save_CPPFLAGS;}
LIBS=$save_LIBS
+ { save_LIBS=; unset save_LIBS;}
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
@@ -24154,6 +34700,14 @@ $as_echo "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be fou
esac
+case "$MAKE_NTPSNMPD" in
+ '')
+ NTPSNMPD_DB=
+ NTPSNMPD_DL=
+ NTPSNMPD_DS=
+ NTPSNMPD_MS=
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
$as_echo_n "checking if we should always slew the time... " >&6; }
@@ -24247,6 +34801,7 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
# Check whether --enable-ntpdate-step was given.
@@ -24279,6 +34834,7 @@ case "$host" in
;;
*)
ans=no
+ ;;
esac
# Check whether --enable-hourly-todr-sync was given.
@@ -24321,6 +34877,7 @@ case "$host" in
;;
*)
ans=yes
+ ;;
esac
;;
*-*-solaris2.7)
@@ -24341,10 +34898,12 @@ case "$host" in
;;
*)
ans=yes
+ ;;
esac
;;
*)
ans=no
+ ;;
esac
# Check whether --enable-kernel-fll-bug was given.
@@ -24396,6 +34955,7 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
# Check whether --enable-irig-sawtooth was given.
@@ -24415,7 +34975,6 @@ $as_echo "#define IRIG_SUCKS 1" >>confdefs.h
esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
$as_echo_n "checking if we should enable NIST lockclock scheme... " >&6; }
@@ -24438,7 +34997,6 @@ $as_echo "#define LOCKCLOCK 1" >>confdefs.h
;;
esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
$as_echo_n "checking if we want support for Samba's signing daemon... " >&6; }
@@ -24477,136 +35035,223 @@ cat >>confdefs.h <<_ACEOF
#define NTP_SIGND_PATH "$ntp_signd_path"
_ACEOF
+ ;;
esac
-
-for ac_header in sys/clockctl.h
+for ac_header in libscf.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
+if test "x$ac_cv_header_libscf_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_CLOCKCTL_H 1
+#define HAVE_LIBSCF_H 1
_ACEOF
fi
done
-
-case "$host" in
- *-*-netbsd*)
- ans=yes
- ;;
- *) ans=no
- ;;
+LSCF=
+case "$ac_cv_header_libscf_h" in
+ yes)
+ LSCF='-lscf'
esac
-# Check whether --enable-clockctl was given.
-if test "${enable_clockctl+set}" = set; then :
- enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
+$as_echo_n "checking for struct sockaddr_storage... " >&6; }
+if ${ntp_cv_sockaddr_storage+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+int
+main ()
+{
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
-$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
-$as_echo "$ntp_use_dev_clockctl" >&6; }
+ struct sockaddr_storage n;
-for ac_header in sys/capability.h sys/prctl.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_sockaddr_storage=yes
+else
+ ntp_cv_sockaddr_storage=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
+$as_echo "$ntp_cv_sockaddr_storage" >&6; }
+case "$ntp_cv_sockaddr_storage" in
+ yes)
+$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
-$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
+$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
+if ${ntp_cv_have___ss_family+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
- yesyes)
- case "$host" in
- mips-sgi-irix*)
- ntp_have_linuxcaps=no
- ;;
- *) ntp_have_linuxcaps=yes
- ;;
- esac
- ;;
- *)
- ntp_have_linuxcaps=no
- ;;
-esac
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
-# Check whether --enable-linuxcaps was given.
-if test "${enable_linuxcaps+set}" = set; then :
- enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
+int
+main ()
+{
-fi
+ struct sockaddr_storage s;
+ s.__ss_family = 1;
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
-$as_echo "$ntp_have_linuxcaps" >&6; }
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_have___ss_family=yes
+else
+ ntp_cv_have___ss_family=no
-case "$ntp_have_linuxcaps" in
- yes)
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
+$as_echo "$ntp_cv_have___ss_family" >&6; }
+ case "$ntp_cv_have___ss_family" in
+ yes)
+
+$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
+
+ esac
- LIBS="$LIBS -lcap"
esac
-case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
- *yes*)
-$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
+#
+# Look for in_port_t.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
+$as_echo_n "checking for in_port_t... " >&6; }
+if ${isc_cv_have_in_port_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-esac
+ #include <sys/types.h>
+ #include <netinet/in.h>
+int
+main ()
+{
-for ac_header in libscf.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
-if test "x$ac_cv_header_libscf_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSCF_H 1
+ in_port_t port = 25;
+ return (0);
+
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ isc_cv_have_in_port_t=yes
+else
+ isc_cv_have_in_port_t=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
+$as_echo "$isc_cv_have_in_port_t" >&6; }
+case "$isc_cv_have_in_port_t" in
+ no)
-LSCF=
-case "$ac_cv_header_libscf_h" in
- yes)
- LSCF='-lscf'
-esac
+$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
+esac
-ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
-if test "x$ac_cv_func_setppriv" = xyes; then :
- ans=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
+$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
+if ${ntp_cv_getsockname_socklen_type+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ans=no
+ getsockname_socklen_type_found=no
+ for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
+ for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+
+int
+main ()
+{
+
+ extern
+ getsockname(int, $getsockname_arg2,
+ $ntp_cv_getsockname_socklen_type *);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ getsockname_socklen_type_found=yes ; break 2
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ done
+ case "$getsockname_socklen_type_found" in
+ no)
+ ntp_cv_getsockname_socklen_type='socklen_t'
+ esac
+ { getsockname_arg2=; unset getsockname_arg2;}
+ { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
-case "$ans" in
- yes)
-$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
+$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
-esac
+cat >>confdefs.h <<_ACEOF
+#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
+_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
@@ -24899,24 +35544,25 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
$as_echo_n "checking for in6addr_any... " >&6; }
-if ${isc_cv_have_in6addr_any+:} false; then :
+if ${isc_cv_in6addr_any_links+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_netinetin6_hack
+ $isc_netinet6in6_hack
int
main ()
{
- struct in6_addr in6;
- in6 = in6addr_any;
+ printf("%x", in6addr_any.s6_addr[15]);
;
@@ -24924,19 +35570,22 @@ main ()
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- isc_cv_have_in6addr_any=yes
+ isc_cv_in6addr_any_links=yes
else
- isc_cv_have_in6addr_any=no
+ isc_cv_in6addr_any_links=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+ LIBS="$SAVED_LIBS"
+ { SAVED_LIBS=; unset SAVED_LIBS;}
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6addr_any" >&5
-$as_echo "$isc_cv_have_in6addr_any" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
+$as_echo "$isc_cv_in6addr_any_links" >&6; }
-case "$isc_cv_have_in6addr_any" in
+case "$isc_cv_in6addr_any_links" in
no)
$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
@@ -25026,6 +35675,201 @@ $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
+$as_echo_n "checking for multicast IP support... " >&6; }
+if ${ntp_cv_multicast+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ntp_cv_multicast=no
+ case "$host" in
+ i386-sequent-sysv4)
+ ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+
+int
+main ()
+{
+
+ struct ip_mreq ipmr;
+ ipmr.imr_interface.s_addr = 0;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_multicast=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
+$as_echo "$ntp_cv_multicast" >&6; }
+case "$ntp_cv_multicast" in
+ yes)
+
+$as_echo "#define MCAST 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
+$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
+if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host" in
+ *-*-netbsd*|*-*-*linux*)
+ ntp_cv_typeof_ip_multicast_loop=u_int
+ ;;
+ *)
+ ntp_cv_typeof_ip_multicast_loop=u_char
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
+$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
+_ACEOF
+
+esac
+
+# Check whether --enable-getifaddrs was given.
+if test "${enable_getifaddrs+set}" = set; then :
+ enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
+else
+ want_getifaddrs="yes"
+
+fi
+
+
+case $want_getifaddrs in
+ glibc)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
+$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
+esac
+case $want_getifaddrs in
+ no)
+ ;;
+ *)
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ for ac_func in getifaddrs
+do :
+ ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETIFADDRS 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$SAVED_LIBS"
+ { SAVED_LIBS=; unset SAVED_LIBS;}
+ ;;
+esac
+
+#
+# Check for if_nametoindex() for IPv6 scoped addresses support
+#
+case "$host" in
+ *-hp-hpux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
+$as_echo_n "checking for library containing if_nametoindex... " >&6; }
+if ${ac_cv_search_if_nametoindex+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char if_nametoindex ();
+int
+main ()
+{
+return if_nametoindex ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ipv6; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_if_nametoindex=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_if_nametoindex+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_if_nametoindex+:} false; then :
+
+else
+ ac_cv_search_if_nametoindex=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
+$as_echo "$ac_cv_search_if_nametoindex" >&6; }
+ac_res=$ac_cv_search_if_nametoindex
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+esac
+SAVED_LIBS="$LIBS"
+LIBS="$LDADD_LIBNTP $LIBS"
+for ac_func in if_nametoindex
+do :
+ ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IF_NAMETOINDEX 1
+_ACEOF
+
+fi
+done
+
+LIBS="$SAVED_LIBS"
+{ SAVED_LIBS=; unset SAVED_LIBS;}
+case "$ac_cv_func_if_nametoindex" in
+ yes)
+
+$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
+
+esac
+
+
+
+
#
# Look for a sysctl call to get the list of network interfaces.
#
@@ -25040,20 +35884,18 @@ else
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
- #ifdef NET_RT_IFLIST
- found_rt_iflist
+ #ifndef NET_RT_IFLIST
+ # error
#endif
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "found_rt_iflist" >/dev/null 2>&1; then :
+if ac_fn_c_try_cpp "$LINENO"; then :
ntp_cv_iflist_sysctl=yes
else
ntp_cv_iflist_sysctl=no
fi
-rm -f conftest*
-
+rm -f conftest.err conftest.i conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
@@ -25078,12 +35920,14 @@ else
fi
ntp_saveconfig_enabled=0
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_saveconfig_enabled=1
$as_echo "#define SAVECONFIG 1" >>confdefs.h
-fi
+ ;;
+esac
if test x$ntp_saveconfig_enabled = x1; then
SAVECONFIG_ENABLED_TRUE=
SAVECONFIG_ENABLED_FALSE='#'
@@ -25095,25 +35939,128 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
$as_echo "$ntp_ok" >&6; }
+
+gta=false
+
+# Check whether --with-gtest was given.
+if test "${with_gtest+set}" = set; then :
+ withval=$with_gtest; try_gtest=$withval
+else
+ try_gtest=yes
+
+fi
+
+case "$try_gtest" in
+ yes)
+ # Extract the first word of "gtest-config", so it can be a program name with args.
+set dummy gtest-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GTEST_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GTEST_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
+if test -n "$GTEST_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
+$as_echo "$GTEST_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
+ case x${GTEST_CONFIG} in
+ x) ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
+$as_echo_n "checking gtest version... " >&6; }
+ gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
+ case "$gtest_version_test" in
+ toolow*)
+ ;;
+ *)
+ GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
+ GTEST_LIBS=`$GTEST_CONFIG --libs`
+ GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
+ GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
+
+
+
+
+ gta=true
+ ;;
+ esac
+ gtest_version=`$GTEST_CONFIG --version`
+ case "$gta" in
+ true)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
+$as_echo "($gtest_version) ok" >&6; }
+ ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
+$as_echo "($gtest_version) not ok" >&6; }
+ ;;
+ esac
+ { gtest_version_test=; unset gtest_version_test;}
+ { gtest_version=; unset gtest_version;}
+ esac
+esac
+ if $gta; then
+ GTEST_AVAILABLE_TRUE=
+ GTEST_AVAILABLE_FALSE='#'
+else
+ GTEST_AVAILABLE_TRUE='#'
+ GTEST_AVAILABLE_FALSE=
+fi
+
+
+
+
###
- ac_expanded=`(
- test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- eval echo \""$sysconfdir"\"
- )`
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ac_define_dir="\"$sysconfdir\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ NTP_KEYSDIR="$ac_define_dir"
+
cat >>confdefs.h <<_ACEOF
-#define NTP_KEYSDIR "$ac_expanded"
+#define NTP_KEYSDIR "$ac_define_dir"
_ACEOF
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
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"
@@ -25132,6 +36079,8 @@ ac_config_files="$ac_config_files libparse/Makefile"
ac_config_files="$ac_config_files ntpd/Makefile"
+ac_config_files="$ac_config_files ntpd/complete.conf"
+
ac_config_files="$ac_config_files ntpdate/Makefile"
ac_config_files="$ac_config_files ntpdc/Makefile"
@@ -25146,21 +36095,25 @@ 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/lib/Makefile"
+
+ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
-ac_config_files="$ac_config_files scripts/checktime"
+ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
-ac_config_files="$ac_config_files scripts/freq_adj"
+ac_config_files="$ac_config_files scripts/build/mkver"
-ac_config_files="$ac_config_files scripts/html2man"
+ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
-ac_config_files="$ac_config_files scripts/mkver"
+ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
-ac_config_files="$ac_config_files scripts/ntp-wait"
+ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
-ac_config_files="$ac_config_files scripts/ntpsweep"
+ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
-ac_config_files="$ac_config_files scripts/ntptrace"
+ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
+
+ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
ac_config_files="$ac_config_files scripts/ntpver"
@@ -25168,9 +36121,49 @@ ac_config_files="$ac_config_files scripts/plot_summary"
ac_config_files="$ac_config_files scripts/summary"
+ac_config_files="$ac_config_files scripts/build/Makefile"
+
+ac_config_files="$ac_config_files tests/Makefile"
+
+ac_config_files="$ac_config_files tests/libntp/Makefile"
+
+ac_config_files="$ac_config_files tests/ntpd/Makefile"
+
ac_config_files="$ac_config_files util/Makefile"
+perllibdir="${datadir}/ntp/lib"
+
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ac_define_dir="\"$perllibdir\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ PERLLIBDIR="$ac_define_dir"
+
+
+cat >>confdefs.h <<_ACEOF
+#define PERLLIBDIR "$ac_define_dir"
+_ACEOF
+
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+
+
+calc_tickadj_opts="$srcdir/scripts/calc_tickadj/calc_tickadj-opts"
+
+ntp_wait_opts="$srcdir/scripts/ntp-wait/ntp-wait-opts"
+
+ntpsweep_opts="$srcdir/scripts/ntpsweep/ntpsweep-opts"
+
+ntptrace_opts="$srcdir/scripts/ntptrace/ntptrace-opts"
+
+summary_opts="$srcdir/scripts/summary-opts"
+
+plot_summary_opts="$srcdir/scripts/plot_summary-opts"
+
+
subdirs="$subdirs sntp"
@@ -25305,10 +36298,27 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${VPATH_HACK_TRUE}" && test -z "${VPATH_HACK_FALSE}"; then
as_fn_error $? "conditional \"VPATH_HACK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
+ as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -25321,15 +36331,22 @@ if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; th
as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${NTP_BINSUBDIR_IS_BIN_TRUE}" && test -z "${NTP_BINSUBDIR_IS_BIN_FALSE}"; then
- as_fn_error $? "conditional \"NTP_BINSUBDIR_IS_BIN\" was never defined.
+if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
+ as_fn_error $? "conditional \"PTHREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-
if test -z "${SAVECONFIG_ENABLED_TRUE}" && test -z "${SAVECONFIG_ENABLED_FALSE}"; then
as_fn_error $? "conditional \"SAVECONFIG_ENABLED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
+ as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -25739,7 +36756,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ntp $as_me 4.2.6p5, which was
+This file was extended by ntp4 $as_me 4.2.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25799,13 +36816,14 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to the package provider."
+Report bugs to <http://bugs.ntp.org./>.
+ntp4 home page: <http://www.ntp.org./>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ntp config.status 4.2.6p5
+ntp4 config.status 4.2.8
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -26064,6 +37082,61 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub
enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
LTCC='$LTCC'
LTCFLAGS='$LTCFLAGS'
@@ -26142,7 +37215,39 @@ soname_spec \
install_override_mode \
finish_eval \
old_striplib \
-striplib; do
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
@@ -26172,7 +37277,18 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
+sys_lib_dlsearch_path_spec \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
@@ -26203,6 +37319,8 @@ fi
+
+
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -26215,7 +37333,6 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"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" ;;
@@ -26225,6 +37342,7 @@ do
"libntp/Makefile") CONFIG_FILES="$CONFIG_FILES libntp/Makefile" ;;
"libparse/Makefile") CONFIG_FILES="$CONFIG_FILES libparse/Makefile" ;;
"ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpd/Makefile" ;;
+ "ntpd/complete.conf") CONFIG_FILES="$CONFIG_FILES ntpd/complete.conf" ;;
"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" ;;
@@ -26232,17 +37350,23 @@ do
"ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/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/html2man") CONFIG_FILES="$CONFIG_FILES scripts/html2man" ;;
- "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/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
+ "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
+ "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
+ "scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
+ "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
+ "scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
+ "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
+ "scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
+ "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
+ "scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
"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" ;;
+ "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
+ "tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
"util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -26292,7 +37416,24 @@ ac_tmp=$tmp
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
-
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
@@ -26310,6 +37451,17 @@ fi
echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
{
echo "cat >conf$$subs.awk <<_ACEOF" &&
@@ -26386,7 +37538,7 @@ _ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
-
+ \$ac_cs_awk_pipe_init
}
{
line = $ 0
@@ -26404,10 +37556,16 @@ cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
} else
len += 1 + keylen
}
-
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
print line
}
-
+\$ac_cs_awk_pipe_fini
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -26754,7 +37912,12 @@ s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
>$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
@@ -26984,7 +38147,7 @@ $as_echo X"$file" |
# The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags="CXX "
# ### BEGIN LIBTOOL CONFIG
@@ -27372,6 +38535,20 @@ file_list_spec=$lt_file_list_spec
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
# ### END LIBTOOL CONFIG
_LT_EOF
@@ -27564,16 +38741,171 @@ fi
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
;;
+ "ntpd/complete.conf":F) sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
"ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
- "scripts/calc_tickadj":F) chmod +x scripts/calc_tickadj ;;
- "scripts/checktime":F) chmod +x scripts/checktime ;;
- "scripts/freq_adj":F) chmod +x scripts/freq_adj ;;
- "scripts/html2man":F) chmod +x scripts/html2man ;;
- "scripts/mkver":F) chmod +x scripts/mkver ;;
- "scripts/ntp-wait":F) chmod +x scripts/ntp-wait ;;
- "scripts/ntpsweep":F) chmod +x scripts/ntpsweep ;;
- "scripts/ntptrace":F) chmod +x scripts/ntptrace ;;
+ "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
+ "scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
+ "scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
+ "scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
+ "scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
"scripts/ntpver":F) chmod +x scripts/ntpver ;;
"scripts/plot_summary":F) chmod +x scripts/plot_summary ;;
"scripts/summary":F) chmod +x scripts/summary ;;
diff --git a/configure.ac b/configure.ac
index e68fdb1e5649..a7d344a21568 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,14 +1,22 @@
-dnl -*-fundamental-*-
-dnl Process this file with autoconf to produce a configure script.
-m4_include([version.m4])
+dnl NTP top-level configure.ac -*- Autoconf -*-
+dnl
+m4_include([sntp/m4/version.m4])
AC_PREREQ([2.61])
-AC_INIT([ntp], [VERSION_NUMBER])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([.])
+AC_INIT(
+ [ntp4],
+ [VERSION_NUMBER],
+ [http://bugs.ntp.org./],
+ [],
+ [http://www.ntp.org./]dnl
+)
+AC_CONFIG_MACRO_DIR([sntp/m4])
+AC_CONFIG_AUX_DIR([sntp/libevent/build-aux])
-# Increment ntp_configure_cache_version by one for each change to
-# configure.ac or .m4 files which invalidates cached values from
-# previous versions.
+AC_PRESERVE_HELP_ORDER
+
+# Bump ntp_configure_cache_version for each change to configure.ac or
+# .m4 files which invalidates cached values from previous configure
+# runs.
#
# If the change affects cache variables used only by the main NTP
# configure.ac, then only its version number should be bumped, while
@@ -18,29 +26,35 @@ AC_CONFIG_AUX_DIR([.])
# bumping.
#
# If a change affects variables shared by all NTP configure scripts,
-# please bump the version numbers of all three. If you are not sure,
-# the safe choice is to bump all three on any cache-invalidating change.
+# please bump the version numbers of each. If you are not sure, the
+# safe choice is to bump all on any cache-invalidating change.
#
# In order to avoid the risk of version stamp collision between -stable
# and -dev branches, do not simply increment the version, instead use
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-ntp_configure_cache_version=20091117
+ntp_configure_cache_version=20120806
# When the cache version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
NTP_CACHEVERSION([main], [$ntp_configure_cache_version])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([1.10 foreign -Wall -Wno-gnu])
+
+dnl AM_SILENT_RULES req. automake 1.11. [yes] defaults V=0
+m4_ifdef(
+ [AM_SILENT_RULES],
+ [AM_SILENT_RULES([yes])]
+)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
dnl the 'build' machine is where we run configure and compile
dnl the 'host' machine is where the resulting stuff runs.
AC_DEFINE_UNQUOTED([STR_SYSTEM], ["$host"],
[canonical system (cpu-vendor-os) of where we should run])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
dnl AC_ARG_PROGRAM
ntp_atom_ok=${ntp_atom_ok=no}
@@ -49,70 +63,32 @@ ntp_parse_ok=${ntp_parse_ok=no}
ntp_ripe_ncc_ok=${ntp_parse_ok=no}
ntp_jupiter_ok=${ntp_jupiter_ok=no}
-dnl check these early to avoid autoconf warnings
-AC_AIX
-AC_MINIX
-
-# So far, the only shared library we might use is libopts.
-# It's a small library - we might as well use a static version of it.
-AC_DISABLE_SHARED
-
-dnl we need to check for cross compile tools for vxWorks here
-AC_PROG_CC
-# Ralf Wildenhues: With per-target flags we need CC_C_O
-# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
-AM_PROG_CC_C_O
+NTP_PROG_CC
AC_PROG_CPP
+AC_PROG_CXX
AC_PROG_YACC
+AC_PROG_CC_C_O
-# AC_PROG_CC_STDC has two functions. It attempts to find a compiler
-# capable of C99, or failing that, for C89. CC is set afterward with
-# the selected invocation, such as "gcc --std=gnu99". Also, the
-# ac_cv_prog_cc_stdc variable is no if the compiler selected for CC
-# does not accept C89.
-
-AC_PROG_CC_STDC
+NTP_VPATH_HACK dnl used only by ntpd/Makefile.am
-case "$ac_cv_prog_cc_stdc" in
- no)
- AC_MSG_WARN([ANSI C89/ISO C90 is the minimum to compile NTP ]
- [version 4.2.5 and higher.])
-esac
+NTP_LOCINFO([sntp]) dnl takes over from NTP_BINDIR, in NTP_LIBNTP
-# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
-case "$host" in
- *-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"
- ;;
- *-*-solaris*)
- # see "man standards".
- # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
- # -D_XOPEN_SOURCE=600 seems OK for c99
- #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- libxnet=-lxnet
- ;;
-esac
+dnl AM_PROG_AR req. automake 1.12
+m4_ifdef(
+ [AM_PROG_AR],
+ [AM_PROG_AR]
+)
-NTP_OS_CFLAGS
-NTP_DIR_SEP
-NTP_VPATH_HACK
+# So far, the only shared library we might use is libopts.
+# It's a small library - we might as well use a static version of it.
+AC_DISABLE_SHARED
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
-# NTP has (so far) been relying on leading-edge autogen.
+# NTP has (so far) been relying on leading-edge autogen, which
+# means we need the appropriate corresponding libopts as well.
# Therefore, by default:
-# - use the version we ship with
+# - use the version of libopts we ship with
# - do not install it
# - build a static copy (AC_DISABLE_SHARED - done earlier)
case "${enable_local_libopts+set}" in
@@ -123,89 +99,12 @@ case "${enable_libopts_install+set}" in
set) ;;
*) enable_libopts_install=no ;;
esac
+enable_nls=no
LIBOPTS_CHECK_NOBUILD([sntp/libopts])
-AC_FUNC_FORK
+NTP_ENABLE_LOCAL_LIBEVENT
-AC_CACHE_CHECK(
- [if $CC can handle @%:@warning],
- [ntp_cv_cpp_warning],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[#warning foo]])],
- [ntp_cv_cpp_warning=yes],
- [ntp_cv_cpp_warning=no]
- )]
-)
-case "$ntp_cv_cpp_warning" in
- no)
- AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1],
- [Should we avoid @%:@warning on option name collisions?])
-esac
-
-case "$GCC" in
- yes)
- SAVED_CFLAGS_NTP="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- AC_CACHE_CHECK(
- [if $CC can handle -Wstrict-overflow],
- [ntp_cv_gcc_Wstrict_overflow],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [ntp_cv_gcc_Wstrict_overflow=yes],
- [ntp_cv_gcc_Wstrict_overflow=no]
- ) ]
- )
- #
- # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
- # flag to CFLAGS.
- #
- CFLAGS="$SAVED_CFLAGS_NTP -Winit-self"
- AC_CACHE_CHECK(
- [if $CC can handle -Winit-self],
- [ntp_cv_gcc_Winit_self],
- [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [ntp_cv_gcc_Winit_self=yes],
- [ntp_cv_gcc_Winit_self=no]
- )
- ]
- )
- CFLAGS="$SAVED_CFLAGS_NTP"
- AS_UNSET([SAVED_CFLAGS_NTP])
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS.
- #
-esac
-
-# Expose a cross-compilation indicator to makefiles
-AM_CONDITIONAL([NTP_CROSSCOMPILE], [test $build != $host])
-
-AC_MSG_CHECKING([for bin subdirectory])
-AC_ARG_WITH(
- [binsubdir],
- [AS_HELP_STRING(
- [--with-binsubdir],
- [bin ={bin,sbin}]
- )],
- [use_binsubdir="$withval"],
- [use_binsubdir="bin"]
-)
-case "$use_binsubdir" in
- bin)
- ;;
- sbin)
- ;;
- *)
- AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
- ;;
-esac
-AC_MSG_RESULT([$use_binsubdir])
-
-BINSUBDIR=$use_binsubdir
-AC_SUBST([BINSUBDIR])
-AM_CONDITIONAL([NTP_BINSUBDIR_IS_BIN], [test "bin" = "$BINSUBDIR"])
+NTP_LIBNTP
AC_MSG_CHECKING([for deprecated --with-arlib])
AC_ARG_WITH([arlib],
@@ -216,113 +115,32 @@ AC_MSG_RESULT([$ans])
case "$ans" in
yes)
AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized.])
-esac
-
-AC_ARG_WITH(rpath,
- AS_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
-[ans=$withval], [ans=x])
-case "$ans" in
- no)
- need_dash_r=
- ;;
- yes)
- need_dash_r=1
- ;;
-esac
-# HMS: Why isn't this $build?
-# Well, that depends on if we need this for the build toolchain or
-# for info in the host executable...
-# I still have no idea which way this should go, but nobody has complained.
-case "$host" in
- *-*-netbsd*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- esac
- ;;
- *-*-solaris*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- esac
;;
esac
dnl we need to check for cross compile tools for vxWorks here
AC_PROG_AWK
+AS_UNSET([ac_cv_prog_AWK])
+AC_SUBST([AWK]) dnl scripts/ntpver.in
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 -Wextra"
- # CFLAGS="$CFLAGS -Wfloat-equal"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
- case "$ntp_cv_gcc_Winit_self" in
- yes)
- CFLAGS="$CFLAGS -Winit-self"
- esac
- case "$ntp_cv_gcc_Wstrict_overflow" in
- yes)
- CFLAGS="$CFLAGS -Wstrict-overflow"
- esac
- # -W[no-]strict-prototypes is added later depending on OpenSSL
-esac
-
-ac_busted_vpath_in_make=no
-
-case "$build" in
- *-*-irix6.1*) # 64 bit only
- # busted vpath?
- ;;
- *-*-irix6*) # 6.2 (and later?)
- ac_busted_vpath_in_make=yes
- ;;
- *-*-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
- '')
- AC_MSG_ERROR([building outside of the main directory requires GNU make])
- ;;
- *) ;;
- esac
- ;;
-esac
-
AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])
-AC_PROG_LIBTOOL
-
AC_PROG_LN_S
-AC_PROG_GCC_TRADITIONAL
-AC_C_VOLATILE
AC_ISC_POSIX
+
AC_PATH_PROG([PATH_PERL], [perl])
-AC_PATH_PROG([PATH_SH], [sh])
+dnl Saving cached hardcoded paths rather than searching $PATH during a
+dnl cached configure run is an optimization not worth the the cost of
+dnl preventing newly-installed tools from being found. Short-circuit
+dnl the caching after the tests so preset overrides still work.
+AS_UNSET([ac_cv_path_PATH_PERL])
AC_PATH_PROG([PATH_TEST], [test])
+AS_UNSET([ac_cv_path_PATH_TEST])
+test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
+AC_SUBST([CONFIG_SHELL]) dnl for scripts #!/path/to/sh
AC_ARG_WITH(
[net-snmp-config],
@@ -356,7 +174,8 @@ case "$PROG_NET_SNMP_CONFIG" in
;;
*)
AC_PATH_PROG([PATH_NET_SNMP_CONFIG], [$PROG_NET_SNMP_CONFIG])
- ;;
+ AS_UNSET([ac_cv_path_PATH_NET_SNMP_CONFIG])
+;;
esac
AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG])
@@ -366,17 +185,75 @@ case "$host" in
;;
esac
-AC_PROG_INSTALL
-
-AC_CHECK_FUNC([gethostent], ,
- AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
-AC_CHECK_FUNC([openlog], ,
- AC_SEARCH_LIBS([openlog], [gen], ,
- AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
-AC_SEARCH_LIBS([MD5Init], [md5 md])
-AC_CHECK_FUNCS(MD5Init)
+# HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
+AC_SEARCH_LIBS([openlog], [gen syslog])
+# XXX library list will be in ac_cv_search_openlog
-NTP_LINEEDITLIBS
+# LIBSECCOMP is off by default -- needs testing with all the features
+# Please send bug reports to loganaden@gmail.com
+AC_MSG_CHECKING([if we want to use libseccomp sandboxing (EXPERIMENTAL)])
+AC_ARG_ENABLE(
+ [libseccomp],
+ [AS_HELP_STRING(
+ [--enable-libseccomp],
+ [EXPERIMENTAL: enable support for libseccomp sandboxing (default is no) ]
+ )],
+ [ntp_ok=$enableval],
+ [ntp_ok=no]
+)
+AC_MSG_RESULT([$ntp_ok])
+case "$ntp_ok" in
+ yes)
+ AC_SEARCH_LIBS(
+ [seccomp_init],
+ [seccomp],
+ [AC_DEFINE([LIBSECCOMP], [1],
+ [Define to any value to include libseccomp sandboxing.])]
+ )
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <sys/prctl.h>
+ #include <linux/seccomp.h>
+
+ int main(void)
+ {
+ int ret;
+ ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
+ if (ret < 0) {
+ switch (errno) {
+ case ENOSYS:
+ return 1;
+ case EINVAL:
+ return 1;
+ default:
+ return 1;
+ }
+ }
+ ret =
+ prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
+ if (ret < 0) {
+ switch (errno) {
+ case EINVAL:
+ return 1;
+ case EFAULT:
+ return 0;
+ default:
+ return 1;
+ }
+ }
+return 1;
+}
+]
+, AC_DEFINE([KERN_SECCOMP], 1,
+[Define to use libseccomp system call filtering.])
+, []
+)
+ ;;
+esac
+
+NTP_FACILITYNAMES
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,
@@ -392,48 +269,26 @@ case "$host" in
*-*-osf4*) ;;
*-*-osf5*) ;;
*)
- AC_CHECK_LIB([rt], [sched_setscheduler], [],
- [AC_CHECK_LIB([posix4], [sched_setscheduler])])
- ;;
-esac
-
-AC_SEARCH_LIBS([setsockopt], [socket xnet])
-AC_SEARCH_LIBS([res_init], [resolv], [], [], [-lsocket -lnsl])
-case "$host" in
- *-*-darwin*)
- AC_CHECK_LIB([resolv],[res_9_init])
+ # HMS: Make sure we check for -lrt for clock_* before this...
+ case "$ac_cv_search_clock_gettime" in
+ '') AC_MSG_ERROR([Internal Error: Haven't looked for clock_gettime() yet!]) ;;
+ esac
+ AC_SEARCH_LIBS([sched_setscheduler], [rt posix4])
;;
esac
-AC_HEADER_RESOLV
-AC_CHECK_FUNCS([res_init __res_init])
-AC_HEADER_STDC
AC_CHECK_HEADERS([bstring.h])
AC_CHECK_HEADER(
[dns_sd.h],
- [AC_CHECK_LIB(
- [dns_sd],
+ [AC_SEARCH_LIBS(
[DNSServiceRegister],
+ [dns_sd],
[AC_DEFINE([HAVE_DNSREGISTRATION], [1],
[Use Rendezvous/DNS-SD registration])]
)]
)
-case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
- yes)
- LIBS="-ldns_sd $LIBS"
-esac
-AC_CHECK_HEADERS([errno.h fcntl.h ieeefp.h kvm.h math.h])
+AC_CHECK_HEADERS([fcntl.h fnmatch.h ieeefp.h inttypes.h kvm.h math.h])
-AC_CHECK_HEADERS(
- [md5.h],
- [],
- [],
- [
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- ]
-)
AC_CHECK_HEADERS([memory.h netdb.h poll.h])
AC_CHECK_HEADERS([sgtty.h stdlib.h string.h termio.h])
AC_CHECK_HEADERS([termios.h timepps.h timex.h unistd.h])
@@ -449,7 +304,7 @@ case "$host" in
;;
esac
;;
- *)
+ *)
AC_CHECK_HEADERS([utmp.h utmpx.h])
;;
esac
@@ -467,217 +322,49 @@ case "$host" in
AC_CHECK_FUNCS([getpassphrase])
esac
-AC_CHECK_HEADERS([arpa/nameser.h])
-AC_CHECK_HEADERS([sys/socket.h])
-
-dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4
-dnl due to an incomplete type (a union) mpinfou used in an array. gcc3
-dnl compiles it without complaint. The mpinfou union is defined later
-dnl in the resulting preprocessed source than the spu_info array in
-dnl /usr/include/machine/sys/getppdp.h:
-dnl extern union mpinfou spu_info[];
-dnl triggering the error. Our strategy is on HP-UX only, test for
-dnl net/netmp.h, which is the file included by net/if.h that leads to
-dnl getppdp.h. If it is present but can't be compiled, try adding
-dnl a duplicate definition of mpinfou, which should then allow the
-dnl following net/if.h and net/if6.h tests to proceed normally.
-dnl Using net/netmp.h allows us to avoid polluting test results for
-dnl net/if.h.
-#
-case "$host" in
- *-hp-hpux*)
- AC_CHECK_HEADERS(
- [net/netmp.h],
- [netmp_h_works=yes],
- [netmp_h_works=no]
- )
- case "$netmp_h_works" in
- no)
- cat >>confdefs.h <<_ACEOF
-#ifndef MPINFOU_PREDECLARED
-# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
- struct pdk_mpinfo *pdkptr;
- struct mpinfo *pikptr;
-} mpinfou_t;
-#endif
-_ACEOF
- AH_BOTTOM([
-#ifndef MPINFOU_PREDECLARED
-# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
- struct pdk_mpinfo *pdkptr;
- struct mpinfo *pikptr;
-} mpinfou_t;
-#endif
-])
- ;;
- esac
- ;;
-esac
-case "$host" in
- *-linux*)
- AC_CHECK_HEADERS([linux/if_addr.h], [], [], [
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- ])
-esac
-
-AC_CHECK_HEADERS([net/if.h], [], [],
-[#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-])
AC_CHECK_HEADERS([net/if6.h])
AC_CHECK_HEADERS([net/route.h], [], [], [
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
])
-AC_CHECK_HEADERS([netinet/in_system.h netinet/in_systm.h netinet/in.h])
-AC_CHECK_HEADERS([net/if_var.h], [], [],
-[#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-])
-AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [],
-[#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NET_IF_VAR_H
-#include <net/if_var.h>
-#endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-])
-
-# Check for IPTOS_PREC
-AC_CACHE_CHECK(
- [IPPROTO_IP IP_TOS IPTOS_LOWDELAY],
- [ntp_cv_ip_tos],
- [AC_EGREP_CPP(
- [yes],
- [
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_NETINET_IP_H
- # include <netinet/in.h>
- # include <netinet/ip.h>
- #endif
- #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
- yes
- #endif
- ],
- [ntp_cv_ip_tos=yes],
- [ntp_cv_ip_tos=no]
- )]
-)
-case "$ntp_cv_ip_tos" in
- yes)
- AC_DEFINE([HAVE_IPTOS_SUPPORT], [1], [Do we have IPTOS support?])
-esac
AC_CHECK_HEADERS([netinfo/ni.h])
case "$ac_cv_header_netinfo_ni_h" in
yes)
AC_DEFINE([HAVE_NETINFO], [1], [NetInfo support?])
esac
-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])
+AC_CHECK_HEADERS([sun/audioio.h sys/audioio.h sys/file.h])
case "$host" in
*-*-sunos4*)
;;
- *)
+ *)
AC_CHECK_HEADERS([sys/ioctl.h])
;;
esac
AC_CHECK_HEADERS([sys/ipc.h sys/lock.h sys/mman.h])
-AC_CHECK_HEADERS([sys/modem.h sys/param.h sys/ppsclock.h])
# HMS: Check sys/proc.h and sys/resource.h after some others
-AC_CHECK_HEADERS([sys/ppstime.h sched.h])
+AC_CHECK_HEADERS([sys/modem.h sys/ppsclock.h sys/ppstime.h sched.h])
case "$ac_cv_header_sched_h" in
yes)
;;
- *)
+ *)
AC_CHECK_HEADERS([sys/sched.h])
;;
esac
-case "$host" in
- *-*-sco*)
- AC_CHECK_HEADERS([sys/sio.h])
- ;;
-esac
# HMS: Check sys/shm.h after some others
AC_CHECK_HEADERS([sys/select.h sys/signal.h sys/sockio.h])
# HMS: Checked sys/socket.h earlier
case "$host" in
*-*-netbsd*)
;;
- *)
+ *)
AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h])
;;
esac
-AC_CHECK_HEADERS([sys/stat.h sys/stream.h sys/stropts.h])
-# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
-AC_CHECK_HEADERS([sys/sysctl.h], [], [],
-[#if defined HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif])
-AC_CHECK_HEADERS([sys/syssgi.h sys/systune.h])
-AC_CHECK_HEADERS([sys/termios.h sys/time.h sys/signal.h])
-AC_EGREP_CPP(
- [yes],
- [
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #ifdef HAVE_ERRNO_H
- # include <errno.h>
- #endif
- #include <sys/timepps.h>
- #ifdef PPS_API_VERS_1
- yes
- #endif
- ],
- [AC_CHECK_HEADERS(
- [sys/timepps.h],
- [],
- [],
- [
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #ifdef HAVE_ERRNO_H
- # include <errno.h>
- #endif
- ]
- )]
-)
-AC_CHECK_HEADERS([sys/timers.h sys/tpro.h sys/types.h sys/wait.h])
-AC_HEADER_TIME
+AC_CHECK_HEADERS([sys/stat.h sys/stream.h stropts.h sys/stropts.h sys/syssgi.h])
+AC_CHECK_HEADERS([sys/systune.h sys/termios.h sys/tpro.h sys/wait.h])
case "$host" in
*-convex-*)
AC_CHECK_HEADERS([/sys/sync/queue.h /sys/sync/sema.h])
@@ -688,176 +375,123 @@ case "$host" in
esac
case "$host" in
- *-*-*linux*)
- AC_CHECK_FUNCS([__adjtimex __ntp_gettime])
- ;;
-esac
-case "$ac_cv_func___adjtimex" in
- yes)
+ *-*-solaris2.6)
+ # Broken...
;;
*)
- 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_FUNCS([ntp_adjtime ntp_gettime])
+ ;;
+esac
+
+case "$host" in
+ *-*-*linux*)
+ case "$ac_cv_func_ntp_gettime" in
+ yes)
+ ;;
+ *)
+ AC_CHECK_FUNCS([__ntp_gettime])
+ case "$ac_cv_func___ntp_gettime" in
+ yes)
+ AC_DEFINE([ntp_gettime], [__ntp_gettime], [deviant])
+ AC_DEFINE([HAVE_NTP_GETTIME], [1], [via __ntp_gettime])
+ esac
+ ;;
+ esac
+ AC_CHECK_FUNCS([adjtimex])
+ case "$ac_cv_func_adjtimex" in
+ yes)
+ AC_DEFINE([ntp_adjtime], [adjtimex], [deviant])
+ AC_DEFINE([HAVE_NTP_ADJTIME], [1], [via adjtimex])
+ have_adjtimex=1
+ ;;
+ *)
+ AC_CHECK_FUNCS([__adjtimex])
+ case "$ac_cv_func___adjtimex" in
+ yes)
+ AC_DEFINE([ntp_adjtime], [__adjtimex], [deviant])
+ AC_DEFINE([HAVE_NTP_ADJTIME], [1], [via __adjtimex])
+ AC_DEFINE([adjtimex], [__adjtimex], [deviant])
+ AC_DEFINE([HAVE_ADJTIMEX], [1], [via __adjtimex])
+ have_adjtimex=1
+ esac
+ ;;
+ esac
+esac
+case "$have_adjtimex" in
+ '')
+ # nlist stuff is only needed for tickadj.
+ saved_LIBS="$LIBS"
+ LIBS=
+ AC_SEARCH_LIBS([nlist], [elf ld mld])
+ # XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
+ AC_SEARCH_LIBS([kvm_open], [kvm]) dnl We already know about -lelf here...
+ # XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
AC_CHECK_HEADERS([nlist.h sys/var.h])
case "$ac_cv_header_nlist_h" in
yes)
AC_DEFINE([NLIST_STRUCT], [1], [nlist stuff])
- esac
- AC_CACHE_CHECK(
- [for n_un in struct nlist],
- [ntp_cv_struct_nlist_n_un],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <nlist.h>
- ]],
- [[
- struct nlist n;
- n.n_un.n_name = 0;
- ]]
+ AC_CACHE_CHECK(
+ [for n_un in struct nlist],
+ [ntp_cv_struct_nlist_n_un],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <nlist.h>
+ ]],
+ [[
+ struct nlist n;
+ n.n_un.n_name = 0;
+ ]]
+ )]
+ [ntp_cv_struct_nlist_n_un=yes],
+ [ntp_cv_struct_nlist_n_un=no]
)]
- [ntp_cv_struct_nlist_n_un=yes],
- [ntp_cv_struct_nlist_n_un=no]
- )]
- )
- case "$ntp_cv_struct_nlist_n_un" in
- yes)
- AC_DEFINE([NLIST_NAME_UNION], [1],
- [does struct nlist use a name union?])
+ )
+ case "$ntp_cv_struct_nlist_n_un" in
+ yes)
+ AC_DEFINE([NLIST_NAME_UNION], [1],
+ [does struct nlist use a name union?])
+ esac
esac
- ;;
-esac
-
-AC_CHECK_HEADERS([sys/proc.h], [], [],
-[#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-])
-
-AC_CHECK_HEADERS([sys/resource.h], [], [],
-[#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+ AC_SUBST([LDADD_NLIST])
+ LDADD_NLIST="$LIBS"
+ LIBS="$saved_LIBS"
+ AS_UNSET([saved_LIBS])
+esac
+
+AC_CHECK_HEADERS([sys/proc.h], [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
])
-AC_CHECK_HEADERS([sys/shm.h], [], [],
-[#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_IPC_H
-# include <sys/ipc.h>
-#endif
+AC_CHECK_HEADERS([sys/resource.h], [], [], [
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
])
-AC_CHECK_HEADERS([sys/timex.h], [], [],
-[#if HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+AC_CHECK_HEADERS([sys/shm.h], [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_IPC_H
+ # include <sys/ipc.h>
+ #endif
])
-AC_CHECK_HEADERS([resolv.h], [], [],
-[#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
+AC_CHECK_HEADERS([sys/timex.h], [], [], [
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
])
-AC_CACHE_CHECK(
- [for basic volatile support],
- [ntp_cv_c_volatile],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- ]],
- [[
- volatile int x;
- ]]
- )]
- [ntp_cv_c_volatile=yes],
- [ntp_cv_c_volatile=no]
- )]
-)
-case "$ntp_cv_c_volatile" in
- yes)
- ;;
- *)
- AC_DEFINE([volatile], [], [define away volatile?])
- ;;
-esac
-
-AC_C_CONST
-AC_C_BIGENDIAN
AC_TYPE_SIGNAL
AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_CHECK_TYPES([time_t, long, uintptr_t])
-AC_CHECK_SIZEOF([time_t])
-
-AH_VERBATIM([TYPEDEF_UINTPTR_T],
-[/* Provide a typedef for uintptr_t? */
-#ifndef HAVE_UINTPTR_T
-typedef unsigned int uintptr_t;
-#define HAVE_UINTPTR_T 1
-#endif])
-
-AC_STRUCT_TM
-
-AC_CACHE_CHECK(
- [for u_int8_t],
- [ntp_cv_type_u_int8_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- ]],
- [[
- u_int8_t len = 42;
- ]]
- )],
- [ntp_cv_type_u_int8_t=yes],
- [ntp_cv_type_u_int8_t=no]
- )]
-)
-case "$ntp_cv_type_u_int8_t" in
- yes)
- AC_DEFINE([HAVE_TYPE_U_INT8_T], [1], [Does u_int8_t exist?])
-esac
-
-AC_CACHE_CHECK(
- [for u_int64_t],
- [ntp_cv_type_u_int64_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- ]],
- [[
- u_int64_t len = 42;
- ]]
- )],
- [ntp_cv_type_u_int64_t=yes],
- [ntp_cv_type_u_int64_t=no]
- )]
-)
-case "$ntp_cv_type_u_int64_t" in
- yes)
- AC_DEFINE([HAVE_TYPE_U_INT64_T], [1], [Does u_int64_t exist?])
-esac
+AC_STRUCT_TM dnl defines TM_IN_SYS_TIME used by refclock_parse.c
AC_CACHE_CHECK(
[for a fallback value for HZ],
@@ -1035,203 +669,6 @@ case "$ntp_cv_struct_ppsclockev" in
[Does a system header define struct ppsclockev?])
esac
-AC_CACHE_CHECK(
- [for struct sockaddr_storage],
- [ntp_cv_sockaddr_storage],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage n;
- ]]
- )],
- [ntp_cv_sockaddr_storage=yes],
- [ntp_cv_sockaddr_storage=no]
- )]
-)
-case "$ntp_cv_sockaddr_storage" in
- yes)
- AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], [1],
- [Does a system header define struct sockaddr_storage?])
-esac
-
-AC_CACHE_CHECK(
- [for sockaddr_storage.ss_family],
- [ntp_cv_have_ss_family],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.ss_family = 1;
- ]]
- )],
- [ntp_cv_have_ss_family=yes],
- [ntp_cv_have_ss_family=no]
- )]
-)
-
-case "$ntp_cv_have_ss_family" in
- no)
- AC_CACHE_CHECK(
- [for sockaddr_storage.__ss_family],
- [ntp_cv_have___ss_family],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.__ss_family = 1;
- ]]
- )],
- [ntp_cv_have___ss_family=yes],
- [ntp_cv_have___ss_family=no]
- )]
- )
- case "$ntp_cv_have___ss_family" in
- yes)
- AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
- [Does struct sockaddr_storage have __ss_family?])
- esac
-esac
-
-AH_VERBATIM(
- [HAVE___SS_FAMILY_IN_SS_VERBATIM],
- [
- /* Handle sockaddr_storage.__ss_family */
- #ifdef HAVE___SS_FAMILY_IN_SS
- # define ss_family __ss_family
- #endif /* HAVE___SS_FAMILY_IN_SS */
- ]
-)
-
-AC_CACHE_CHECK(
- [for sockaddr_storage.ss_len],
- [ntp_cv_have_ss_len],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.ss_len = 1;
- ]]
- )],
- [ntp_cv_have_ss_len=yes],
- [ntp_cv_have_ss_len=no]
- )]
-)
-
-case "$ntp_cv_have_ss_len" in
- no)
- AC_CACHE_CHECK(
- [for sockaddr_storage.__ss_len],
- [ntp_cv_have___ss_len],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.__ss_len = 1;
- ]]
- )],
- [ntp_cv_have___ss_len=yes],
- [ntp_cv_have___ss_len=no]
- )]
- )
- case "$ntp_cv_have___ss_len" in
- yes)
- AC_DEFINE([HAVE___SS_LEN_IN_SS], [1],
- [Does struct sockaddr_storage have __ss_len?])
- esac
-esac
-
-AH_VERBATIM(
- [HAVE___SS_LEN_IN_SS_VERBATIM],
- [
- /* Handle sockaddr_storage.__ss_len */
- #ifdef HAVE___SS_LEN_IN_SS
- # define ss_len __ss_len
- #endif /* HAVE___SS_LEN_IN_SS */
- ]
-)
-
-#
-# Look for in_port_t.
-#
-AC_CACHE_CHECK(
- [for in_port_t],
- [isc_cv_have_in_port_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <netinet/in.h>
- ]],
- [[
- in_port_t port = 25;
- return (0);
- ]]
- )],
- [isc_cv_have_in_port_t=yes],
- [isc_cv_have_in_port_t=no]
- )]
-)
-case "$isc_cv_have_in_port_t" in
- no)
- AC_DEFINE([ISC_PLATFORM_NEEDPORTT], [1],
- [Declare in_port_t?])
-esac
-
case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
AC_CACHE_CHECK(
@@ -1307,137 +744,40 @@ case "$ntp_cv_struct_clockinfo_has_hz" in
AC_DEFINE([HAVE_TICKADJ_IN_STRUCT_CLOCKINFO], [1], [Obvious])
esac
-AC_CACHE_CHECK(
- [for struct timespec],
- [ntp_cv_struct_timespec],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #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;
- ]]
- )],
- [ntp_cv_struct_timespec=yes],
- [ntp_cv_struct_timespec=no]
- )]
-)
-case "$ntp_cv_struct_timespec" in
- yes)
- AC_DEFINE([HAVE_STRUCT_TIMESPEC], [1], [struct timespec declared?])
-esac
-
-AC_CACHE_CHECK(
- [for struct ntptimeval],
- [ntp_cv_struct_ntptimeval],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/time.h>
- #include <sys/timex.h>
- ]],
- [[
- struct ntptimeval n;
- ]]
- )],
- [ntp_cv_struct_ntptimeval=yes],
- [ntp_cv_struct_ntptimeval=no]
- )]
-)
case "$ntp_cv_struct_ntptimeval" in
yes)
- AC_DEFINE([HAVE_STRUCT_NTPTIMEVAL], [1],
- [Do we have struct ntptimeval?])
-esac
-
-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
-
-case "$ac_cv_c_inline" in
- '')
- ;;
- *)
- AC_DEFINE([HAVE_INLINE], [1], [inline keyword or macro available])
- AC_SUBST([HAVE_INLINE])
+ 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
+ ]
+ )
esac
-AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
-AC_CHECK_SIZEOF([signed char])
-AC_CHECK_TYPES([s_char])
-AC_CHECK_SIZEOF([int])
-AC_CHECK_SIZEOF([long])
+####
-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], [1],
- [Do we need an 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], [1],
- [Do we need an s_char typedef?])
- ;;
-esac
-AC_TYPE_UID_T
-
-case "$host" in
- *-*-aix[[456]]*)
- # (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_SEARCH_LIBS([clock_gettime], [rt])
- AC_CHECK_FUNCS([clock_gettime clock_settime])
- ;;
-esac
+saved_LIBS="$LIBS"
+LIBS="$LIBS $LDADD_LIBNTP"
AC_CHECK_FUNCS([daemon])
+# XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
+LIBS="$saved_LIBS"
+AS_UNSET([saved_LIBS])
+
AC_CHECK_FUNCS(
[finite],
[],
@@ -1447,6 +787,7 @@ AC_CHECK_FUNCS(
[
AC_MSG_CHECKING([for isfinite with <math.h>])
_libs=$LIBS
+ # XXX
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -1471,159 +812,40 @@ AC_CHECK_FUNCS(
)]
)
-AC_CHECK_FUNCS([getbootfile getclock getdtablesize])
-
-AC_ARG_ENABLE(
- [getifaddrs],
- [AS_HELP_STRING(
- [--enable-getifaddrs],
- [s Enable the use of getifaddrs() [[yes|no|glibc]].
-glibc: Use getifaddrs() in glibc if you know it supports IPv6.]
- )],
- [want_getifaddrs="$enableval"],
- [want_getifaddrs="yes"]
-)
-
-case $want_getifaddrs in
- yes|glibc)
- #
- # Do we have getifaddrs() ?
- #
- case $host in
- *-*linux*)
- # Some recent versions of glibc support getifaddrs() which does not
- # provide AF_INET6 addresses while the function provided by the USAGI
- # project handles the AF_INET6 case correctly. We need to avoid
- # using the former but prefer the latter unless overridden by
- # --enable-getifaddrs=glibc.
- case "$want_getifaddrs" in
- glibc)
- AC_CHECK_FUNCS([getifaddrs])
- ;;
- *)
- save_LIBS="$LIBS"
- LIBS="-L/usr/local/v6/lib $LIBS"
- AC_CHECK_LIB(
- [inet6],
- [getifaddrs],
- [ans=yes],
- [ans=no]
- )
- case "$ans" in
- yes)
- LIBS="$LIBS -linet6"
- AC_DEFINE([HAVE_GETIFADDRS], [1])
- ;;
- *)
- LIBS=${save_LIBS}
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- *)
- AC_CHECK_FUNCS([getifaddrs])
- ;;
-esac
-
-AC_CACHE_CHECK(
- [type of socklen arg for getsockname()],
- [ntp_cv_getsockname_socklen_type],
- [
- getsockname_socklen_type_found=no
- for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
- for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- ]], [[
- extern
- getsockname(int, $getsockname_arg2,
- $ntp_cv_getsockname_socklen_type *);
- ]]
- )],
- [getsockname_socklen_type_found=yes ; break 2],
- []
- )
- done
- done
- case "$getsockname_socklen_type_found" in
- no)
- ntp_cv_getsockname_socklen_type='socklen_t'
- esac
- AS_UNSET([getsockname_arg2])
- AS_UNSET([getsockname_socklen_type_found])
- ]
-)
-AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
- [$ntp_cv_getsockname_socklen_type],
- [What is getsockname()'s socklen type?])
-
-AC_CHECK_FUNCS([getuid getrusage hstrerror])
-AC_CHECK_FUNC([gettimeofday], [], [
-case "$host" in
- *-*-mpeix*) ac_cv_func_gettimeofday=yes
- ;;
-esac])
-
-#
-# Check for if_nametoindex() for IPv6 scoped addresses support
-#
-case "$host" in
- *-hp-hpux*)
- AC_SEARCH_LIBS([if_nametoindex], [ipv6])
-esac
-AC_CHECK_FUNCS([if_nametoindex])
-case "$ac_cv_func_if_nametoindex" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIFNAMETOINDEX], [1],
- [ISC: do we have if_nametoindex()?])
-esac
-
-AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lsocket -lnsl])
-AC_CHECK_FUNC([inet_ntop], [],
- [AC_DEFINE([ISC_PLATFORM_NEEDNTOP], [1], [ISC: provide inet_ntop()])])
-AC_CHECK_FUNC([inet_pton], [],
- [AC_DEFINE([ISC_PLATFORM_NEEDPTON], [1], [ISC: provide inet_pton()])])
+AC_CHECK_FUNCS([fnmatch getbootfile getuid getrusage nanosleep strsignal])
+# kvm_open() is only used by tickadj. Also see above.
case "$ac_cv_header_kvm_h" in
yes)
AC_CHECK_FUNCS([kvm_open])
;;
esac
-AC_CHECK_FUNCS([memcpy memmove memset])
case "$host" in
*-*-sco3.2v5.0.*)
- # Just stubs. Idiots.
+ # Just stubs. Sigh.
;;
*) AC_CHECK_FUNCS([mkstemp])
;;
esac
AC_CHECK_FUNCS([mktime])
case "$host" in
- *-*-aix[[456]]*)
- # Just a stub. Idiots.
+ *-*-aix[[4-9]]*)
+ # XXX only verified thru AIX6.
+ # Just a stub. Sigh.
;;
*-*-irix[[45]]*)
- # Just a stub in "old" Irix. Idiots.
- ;;
- *-*-*linux*)
- # there, but more trouble than it is worth for now (resolver problems)
+ # Just a stub in "old" Irix. Sigh.
;;
+# In the belief that the fix for bug 1223 fixes mlockall() under linux...
+# *-*-*linux*)
+# # there, but more trouble than it is worth for now (resolver problems)
+# ;;
*-*-qnx*)
- # Apparently there but not working in QNX. Idiots?
+ # Apparently there but not working in QNX. Sigh?
;;
*-*-sco3.2v5.0.*)
- # Just a stub. Idiots.
+ # Just a stub. Sigh.
;;
alpha*-dec-osf4*|alpha*-dec-osf5*)
# mlockall is there, as a #define calling memlk via <sys/mman.h>
@@ -1634,51 +856,110 @@ case "$host" in
*) AC_CHECK_FUNCS([mlockall])
;;
esac
-AC_CHECK_FUNCS([nice nlist])
-case "$host" in
- *-*-solaris2.6)
- # Broken...
- ;;
- *) AC_CHECK_FUNCS([ntp_adjtime ntp_gettime])
- ;;
-esac
-AC_CHECK_FUNCS([plock pututline pututxline readlink recvmsg rtprio])
+AC_CHECK_FUNCS([nice plock pututline pututxline readlink rtprio])
case "$host" in
- *-*-aix[[456]]*)
- # Just a stub in AIX 4. Idiots.
+ *-*-aix[[4-9]]*)
+ # XXX only verified thru AIX6.
+ # Just a stub in AIX 4. Sigh.
;;
*-*-solaris2.5*)
- # Just stubs in solaris2.5. Idiots.
+ # Just stubs in solaris2.5. Sigh.
;;
*) AC_CHECK_FUNCS([sched_setscheduler])
;;
esac
-AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid])
-AC_CHECK_FUNCS([setrlimit])
-AC_CHECK_FUNCS([settimeofday], ,[
+AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid setvbuf])
+AC_CHECK_FUNCS([strdup strerror setrlimit strchr])
case "$host" in
- *-*-mpeix*) ac_cv_func_settimeofday=yes
- ;;
-esac])
-AC_CHECK_FUNCS([setvbuf sigaction sigvec sigset sigsuspend stime strchr])
-AC_CHECK_FUNCS([sysconf sysctl snprintf strdup strerror strstr timegm])
-case "$host" in
- *-*-aix[[456]]*)
- # Just stubs. Idiots.
+ *-*-aix[[4-9]]*)
+ # XXX only verified thru AIX6.
+ # Just stubs. Sigh.
;;
*-*-netbsd1*)
- # Just stubs. Idiots.
+ # Just stubs. Sigh.
;;
*-*-netbsdelf1*)
- # Just stubs. Idiots.
+ # Just stubs. Sigh.
;;
*-*-openbsd*)
- # Just stubs. Idiots.
+ # Just stubs. Sigh.
+ ;;
+ *)
+ AC_CHECK_FUNCS([timer_create])
+ ;;
+esac
+
+NTP_RLIMIT_ITEMS
+
+# HMS: Only if we are doing the MLOCKALL stuff...
+AC_MSG_CHECKING([for the default number of 4k stack pages])
+AC_ARG_WITH(
+ [stack-limit],
+ [AS_HELP_STRING(
+ [--with-stack-limit],
+ [? =50 (200 for openbsd) 4k pages]
+ )],
+ [ans=$withval],
+ [ans=yes]
+)
+case "$ans" in
+ yes | no)
+ case "$host" in
+ *-*-openbsd*)
+ ans=200
+ ;;
+ *) ans=50
+ ;;
+ esac
+ ;;
+ [[1-9]][[0-9]]*)
+ ;;
+ *) AC_MSG_ERROR(["--with-stack-limit requires an integer argument."])
+ ;;
+esac
+AC_MSG_RESULT([$ans])
+AC_DEFINE_UNQUOTED([DFLT_RLIMIT_STACK], [$ans],
+ [Default number of 4k pages for RLIMIT_STACK])
+
+# HMS: only if we have RLIMIT_MEMLOCK
+AC_MSG_CHECKING([for the default number of megabytes to MEMLOCK])
+AC_ARG_WITH(
+ [memlock],
+ [AS_HELP_STRING(
+ [--with-memlock],
+ [? =32 (megabytes)]
+ )],
+ [ans=$withval],
+ [ans=yes]
+)
+case "$ans" in
+ yes | no)
+ ans=32
+ ;;
+ [[1-9]][[0-9]]*) ;;
+ *) AC_MSG_ERROR(["--with-memlock requires an integer argument."])
+ ;;
+esac
+AC_MSG_RESULT([$ans])
+AC_DEFINE_UNQUOTED([DFLT_RLIMIT_MEMLOCK], [$ans],
+ [Default number of megabytes for RLIMIT_MEMLOCK])
+
+
+# some OSes prefer _exit() in forked children to exit()
+AC_CHECK_FUNCS([_exit])
+ntp_worker_child_exit=exit
+case "$ac_cv_func__exit::$host_os" in
+ yes::netbsd*)
+ ntp_worker_child_exit=_exit
;;
- *) AC_CHECK_FUNCS([timer_create timer_settime])
+ yes::openbsd*)
+ ntp_worker_child_exit=_exit
;;
esac
-AC_CHECK_FUNCS([umask uname updwtmp updwtmpx vsnprintf vsprintf])
+AC_DEFINE_UNQUOTED([WORKER_CHILD_EXIT], [$ntp_worker_child_exit],
+ [routine worker child proc uses to exit.])
+
+AC_CHECK_FUNCS([umask uname updwtmp updwtmpx])
###
@@ -1735,34 +1016,6 @@ case "$ac_cv_func_recvmsg" in
esac
esac
-case "$host" in
- *-*-sunos4*)
- AC_DEFINE([SPRINTF_CHAR], [1], [*s*printf() functions are char*])
- ;;
-esac
-
-AC_CACHE_CHECK(
- [number of arguments to gettimeofday()],
- [ntp_cv_func_Xettimeofday_nargs],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/time.h>
- ]],
- [[
- gettimeofday(0, 0);
- settimeofday(0, 0);
- ]]
- )],
- [ntp_cv_func_Xettimeofday_nargs=2],
- [ntp_cv_func_Xettimeofday_nargs=1]
- )]
-)
-case "$ntp_cv_func_Xettimeofday_nargs" in
- 1)
- AC_DEFINE([SYSV_TIMEOFDAY], [1], [Does Xettimeofday take 1 arg?])
-esac
-
AC_CACHE_CHECK(
[number of arguments taken by setpgrp()],
[ntp_cv_func_setpgrp_nargs],
@@ -1790,12 +1043,6 @@ case "$ntp_cv_func_setpgrp_nargs" in
[define if setpgrp takes 0 arguments])
esac
-dnl we require ANSI C which mandates void * here
-dnl we should clean up all uses of QSORT_USES_VOID_P so
-dnl this can be removed.
-AC_DEFINE([QSORT_USES_VOID_P], [1],
- [Does qsort expect to work on "void *" stuff?])
-
AC_CACHE_CHECK(
[if we need to declare 'errno'],
[ntp_cv_decl_errno],
@@ -1853,7 +1100,7 @@ AC_CACHE_CHECK(
)]
)
case "$ntp_cv_decl_h_errno" in
- yes)
+ yes)
AC_DEFINE([DECL_H_ERRNO], [1], [Declare h_errno?])
esac
@@ -2052,7 +1299,7 @@ AC_CACHE_CHECK(
[ntp_cv_func_ctty_for_f_setown],
[
case "$host" in
- *-*-bsdi[23]*)
+ *-*-bsdi[[23]]*)
ans=yes
;;
*-*-freebsd*)
@@ -2062,10 +1309,10 @@ AC_CACHE_CHECK(
# while later versions will fail a ioctl(TIOCSCTTY, 0) call in
# some cases and so should not have USE_FSETOWNCTTY. "netbsd"
# in $host may be followed by "aout", "ecoff", or "elf".
- *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
+ *-*-netbsd*[[a-z]]3.[[0-8]]*|*-*-netbsd*[[a-z]][[0-2]].*|*-*-netbsd*[[a-z]]3.99.[[0-7]])
ans=yes
;;
- *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
+ *-*-netbsd3.[[0-8]]*|*-*-netbsd[[0-2]].*|*-*-netbsd3.99.[[0-7]])
ans=yes
;;
*-*-openbsd*)
@@ -2077,7 +1324,7 @@ AC_CACHE_CHECK(
*-*-darwin*)
ans=yes
;;
- *)
+ *)
ans=no
;;
esac
@@ -2097,7 +1344,7 @@ AC_CACHE_CHECK(
*-*-netbsd*)
ans=yes
;;
- *)
+ *)
ans=no
;;
esac
@@ -2130,269 +1377,6 @@ case "$ntp_cv_os_wildcardreuse" in
[wildcard socket needs REUSEADDR to bind interface addresses])
esac
-AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
-ntp_warning='GRONK'
-ans=none
-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!'
- esac
-esac
-AC_MSG_RESULT([$ans])
-case "$ntp_warning" in
- '')
- ;;
- *)
- AC_MSG_WARN([*** $ntp_warning ***])
- ;;
-esac
-
-AC_CACHE_CHECK(
- [for SIGIO],
- [ntp_cv_hdr_def_sigio],
- [AC_EGREP_CPP(
- [yes],
- [
- #include <signal.h>
-
- #ifdef SIGIO
- yes
- #endif
- ],
- [ntp_cv_hdr_def_sigio=yes],
- [ntp_cv_hdr_def_sigio=no]
- )]
- )
-
-dnl Override those system that have a losing SIGIO
-AC_CACHE_CHECK(
- [if we want to use signalled IO],
- [ntp_cv_var_signalled_io],
- [
- ans=no
- case "$ntp_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
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- m68k-*-mint*)
- ans=no
- ;;
- esac
- ;;
- esac
- ntp_cv_var_signalled_io=$ans
- ]
-)
-case "$ntp_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],
- [ntp_cv_hdr_def_sigpoll],
- [AC_EGREP_CPP(
- [yes],
- [
- #include <signal.h>
-
- #ifdef SIGPOLL
- yes
- #endif
- ],
- [ntp_cv_hdr_def_sigpoll=yes],
- [ntp_cv_hdr_def_sigpoll=no]
- )]
-)
-
-AC_CACHE_CHECK(
- [for SIGSYS],
- [ntp_cv_hdr_def_sigsys],
- [AC_EGREP_CPP(
- [yes],
- [
- #include <signal.h>
-
- #ifdef SIGSYS
- yes
- #endif
- ],
- [ntp_cv_hdr_def_sigsys=yes],
- [ntp_cv_hdr_def_sigsys=no]
- )]
-)
-
-AC_CACHE_CHECK(
- [if we can use SIGPOLL for UDP I/O],
- [ntp_cv_var_use_udp_sigpoll],
- [
- ans=no
- case "$ntp_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[[456]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-solaris*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ntp_cv_var_use_udp_sigpoll=$ans
- ]
-)
-case "$ntp_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],
- [ntp_cv_var_use_tty_sigpoll],
- [
- ans=no
- case "$ntp_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[[456]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *-*-kfreebsd*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ntp_cv_var_use_tty_sigpoll=$ans
- ]
-)
-case "$ntp_cv_var_use_tty_sigpoll" in
- yes)
- AC_DEFINE([USE_TTY_SIGPOLL], [1], [Can we use SIGPOLL for tty IO?])
-esac
-
case "$host" in
*-*-aix*)
AC_DEFINE([NLIST_EXTRA_INDIRECTION], [1],
@@ -2450,22 +1434,6 @@ case "$ntp_cv_no_parenb_ignpar" in
[Is there a problem using PARENB and IGNPAR?])
esac
-AC_MSG_CHECKING([if we're including ntpd debugging code])
-AC_ARG_ENABLE(
- [debugging],
- [AS_HELP_STRING(
- [--enable-debugging],
- [+ include ntpd debugging code]
- )],
- [ntp_ok=$enableval],
- [ntp_ok=yes]
-)
-case "$ntp_ok" in
- yes)
- AC_DEFINE([DEBUG], [1], [Enable ntpd debugging code?])
-esac
-AC_MSG_RESULT([$ntp_ok])
-
AC_MSG_CHECKING([if we're including processing time debugging code])
AC_ARG_ENABLE(
[debug-timing],
@@ -2487,7 +1455,7 @@ AC_ARG_ENABLE(
[dst-minutes],
[AS_HELP_STRING(
[--enable-dst-minutes],
- [n minutes per DST adjustment @<:@60@:>@]) dnl @<:@ is [, @:>@ is ]
+ [=60 minutes per DST adjustment]) dnl @<:@ is [, @:>@ is ]
],
[ans=$enableval],
[ans=60]
@@ -2500,7 +1468,7 @@ AC_MSG_CHECKING([if ntpd will retry permanent DNS failures])
AC_ARG_ENABLE(
[ignore-dns-errors],
[AS_HELP_STRING(
- [--enable-ignore-dns-errors],
+ [--enable-ignore-dns-errors],
[- retry DNS queries on any error]
)],
[ans=$enableval],
@@ -2513,122 +1481,6 @@ case "$ans" in
esac
AC_MSG_RESULT([$ans])
-AC_MSG_CHECKING([if ntpd will use the deferred DNS lookup path])
-AC_ARG_ENABLE(
- [force-defer-DNS],
- [AS_HELP_STRING(
- [--enable-force-defer-DNS],
- [- force all DNS lookups to take the deferred path]
- )],
- [ans=$enableval],
- [ans=no]
-)
-case "$ans" in
- yes)
- AC_DEFINE([FORCE_DEFER_DNS], [1], [Force deferred DNS lookups?])
-esac
-AC_MSG_RESULT([$ans])
-
-case "$ac_cv_header_sys_sio_h" in
- yes)
- AC_CACHE_CHECK(
- [sys/sio.h for TIOCDCDTIMESTAMP],
- [ntp_cv_hdr_def_tiocdcdtimestamp],
- [AC_EGREP_CPP(
- [yes],
- [
- #include <sys/sio.h>
-
- #ifdef TIOCDCDTIMESTAMP
- yes
- #endif
- ],
- [ntp_cv_hdr_def_tiocdcdtimestamp=yes],
- [ntp_cv_hdr_def_tiocdcdtimestamp=no]
- )]
- )
-esac
-
-AC_CACHE_CHECK(
- [if we have the tty_clk line discipline/streams module],
- [ntp_cv_tty_clk],
- [
- case "$ac_cv_header_sys_clkdefs_h$ntp_cv_hdr_def_tiocdcdtimestamp" in
- *yes*)
- ntp_cv_tty_clk=yes
- ;;
- *)
- ntp_cv_tty_clk=no
- ;;
- esac
- ]
-)
-case "$ntp_cv_tty_clk" in
- yes)
- AC_DEFINE([TTYCLK], [1],
- [Do we have the tty_clk line discipline/streams module?])
-esac
-
-AC_MSG_CHECKING([for the ppsclock streams module])
-case "$ntp_cv_struct_ppsclockev" in
- yes)
- ans=yes
- AC_DEFINE([PPS], [1],
- [Do we have the ppsclock streams module?])
- ;;
- *)
- ans=no
-esac
-AC_MSG_RESULT([$ans])
-
-AC_CACHE_CHECK(
- [for multicast IP support],
- [ntp_cv_multicast],
- [
- ntp_cv_multicast=no
- case "$host" in
- i386-sequent-sysv4)
- ;;
- *)
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- ]],
- [[
- struct ip_mreq ipmr;
- ipmr.imr_interface.s_addr = 0;
- ]]
- )],
- [ntp_cv_multicast=yes],
- []
- )
- esac
- ]
-)
-case "$ntp_cv_multicast" in
- yes)
- AC_DEFINE([MCAST], [1], [Does the target support multicast IP?])
- AC_CACHE_CHECK(
- [arg type needed for setsockopt() IP*_MULTICAST_LOOP],
- [ntp_cv_typeof_ip_multicast_loop],
- [
- case "$host" in
- *-*-netbsd*|*-*-*linux*)
- ntp_cv_typeof_ip_multicast_loop=u_int
- ;;
- *)
- ntp_cv_typeof_ip_multicast_loop=u_char
- esac
- ]
- )
- AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
- [$ntp_cv_typeof_ip_multicast_loop],
- [What type to use for setsockopt])
-esac
-
AC_CACHE_CHECK(
[availability of ntp_{adj,get}time()],
[ntp_cv_var_ntp_syscalls],
@@ -2641,14 +1493,12 @@ AC_CACHE_CHECK(
*yes)
ntp_cv_var_ntp_syscalls=inline
;;
- *)
- AC_EGREP_CPP(
- [yes],
+ *)
+ AC_PREPROC_IFELSE(
[
#include <sys/syscall.h>
-
- #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
- yes
+ #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+ # error
#endif
],
[ntp_cv_var_ntp_syscalls=kernel]
@@ -2671,13 +1521,11 @@ esac
AC_CACHE_CHECK(
[if sys/timex.h has STA_FLL],
[ntp_cv_var_sta_fll],
- [AC_EGREP_CPP(
- [yes],
+ [AC_PREPROC_IFELSE(
[
#include <sys/timex.h>
-
- #ifdef STA_FLL
- yes
+ #ifndef STA_FLL
+ # error
#endif
],
[ntp_cv_var_sta_fll=yes],
@@ -2733,13 +1581,11 @@ esac
AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
case "$ac_cv_header_termios_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <termios.h>
-
- #ifdef TIOCGPPSEV
- yes
+ #ifndef TIOCGPPSEV
+ # error
#endif
],
[ntp_ok=yes],
@@ -2761,13 +1607,11 @@ AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
case "$ac_cv_header_termios_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <termios.h>
-
- #ifdef TIOCSPPS
- yes
+ #ifndef TIOCSPPS
+ # error
#endif
],
[ntp_ok=yes],
@@ -2789,13 +1633,11 @@ AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
case "$ac_cv_header_sys_ppsclock_h" in
yes)
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#include <sys/ppsclock.h>
-
- #ifdef CIOGETEV
- yes
+ #ifndef CIOGETEV
+ # error
#endif
],
[ntp_ok=yes],
@@ -2842,24 +1684,27 @@ AC_CHECK_HEADER([linux/serial.h])
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
- AC_EGREP_CPP(
- [yes],
+ AC_PREPROC_IFELSE(
[
#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
+ #ifndef TIOCGSERIAL
+ # error
#endif
+ #ifndef TIOCSSERIAL
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_POS
+ # error
#endif
+ #ifndef ASYNC_PPS_CD_NEG
+ # error
#endif
+ #ifndef CIOGETEV
+ # error
#endif
],
[ntp_ok=yes],
@@ -2901,16 +1746,18 @@ AC_MSG_CHECKING([Datum/Bancomm bc635/VME interface])
AC_ARG_ENABLE(
[BANCOMM],
[AS_HELP_STRING(
- [--enable-BANCOMM],
+ [--enable-BANCOMM],
[- Datum/Bancomm bc635/VME interface]
)],
[ntp_ok=$enableval],
[ntp_ok=no]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_BANC], [1], [Datum/Bancomm bc635/VME interface?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$host" in
yes*-*-hpux*) ;;
@@ -2928,10 +1775,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=no]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_GPSVME], 1, [TrueTime GPS receiver/VME interface?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$host" in
yes*-*-hpux*) ;;
@@ -3011,7 +1860,7 @@ AC_CACHE_CHECK(
]],
[[
int dtr = TIOCM_DTR;
-
+
ioctl(1, TIOCMBIS, (char *)&dtr);
]]
)],
@@ -3039,10 +1888,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_enable_all_modem_control_clocks]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ACTS], [1], [ACTS modem service])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Arbiter 1088A/B GPS receiver])
@@ -3055,26 +1906,30 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ARBITER], [1], [Arbiter 1088A/B GPS receiver])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Arcron MSF receiver])
AC_ARG_ENABLE(
[ARCRON_MSF],
[AS_HELP_STRING(
- [--enable-ARCRON-MSF],
+ [--enable-ARCRON-MSF],
[+ Arcron MSF receiver]
)],
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ARCRON_MSF], [1], [ARCRON support?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Austron 2200A/2201A GPS receiver])
@@ -3087,10 +1942,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_AS2201], [1], [Austron 2200A/2201A GPS receiver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([ATOM PPS interface])
@@ -3106,10 +1963,12 @@ AC_ARG_ENABLE(
case "$ntp_atom_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ATOM], [1], [PPS interface?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Chrono-log K-series WWVB receiver])
@@ -3122,10 +1981,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_CHRONOLOG], [1], [Chronolog K-series WWVB receiver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([CHU modem/decoder])
@@ -3138,10 +1999,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_CHU], [1], [CHU modem/decoder])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
ntp_refclock_chu=$ntp_ok
@@ -3160,9 +2023,6 @@ AC_ARG_ENABLE(
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$ntp_refclock_chu$ntp_canaudio" in
@@ -3188,10 +2048,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_DATUM], [1], [Datum Programmable Time System?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Dumb generic hh:mm:ss local clock])
@@ -3204,10 +2066,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_DUMBCLOCK], [1], [Dumb generic hh:mm:ss local clock?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Forum Graphic GPS])
@@ -3220,10 +2084,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_FG], [1], [Forum Graphic GPS datating station driver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
# Requires modem control
@@ -3237,10 +2103,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_enable_all_modem_control_clocks]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_HEATH], [1], [Heath GC-1000 WWV/WWVH receiver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for hopf serial clock device])
@@ -3253,10 +2121,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_HOPF_SERIAL], [1], [HOPF serial clock device?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for hopf PCI clock 6039])
@@ -3269,10 +2139,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_HOPF_PCI], [1], [HOPF PCI clock device?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([HP 58503A GPS receiver])
@@ -3285,10 +2157,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_HPGPS], 1, [HP 58503A GPS receiver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([IRIG audio decoder])
@@ -3306,10 +2180,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_IRIG], [1], [IRIG audio decoder?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canaudio" in
yesno) AC_MSG_WARN([*** But the expected answer is... no ***])
@@ -3325,10 +2201,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_JJY], [1], [JJY receiver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Rockwell Jupiter GPS receiver])
@@ -3342,10 +2220,12 @@ AC_ARG_ENABLE(
case "$ntp_jupiter_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_JUPITER], [1], [Rockwell Jupiter GPS clock?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Leitch CSD 5300 Master Clock System Driver])
@@ -3358,11 +2238,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_LEITCH], [1],
[Leitch CSD 5300 Master Clock System Driver?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([local clock reference])
@@ -3375,10 +2257,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_LOCAL], [1], [local clock reference?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
dnl Bug 340: longstanding unfixed bugs
@@ -3412,10 +2296,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_MX4200], [1], [Magnavox MX4200 GPS receiver])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$host" in
yes*-*-ultrix*) AC_MSG_WARN([*** But the expected answer is... no ***])
@@ -3431,10 +2317,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_NEOCLOCK4X], [1], [NeoClock4X])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([NMEA GPS receiver])
@@ -3447,10 +2335,34 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_NMEA], [1], [NMEA GPS receiver])
-fi
+ ;;
+esac
+AC_MSG_RESULT([$ntp_ok])
+
+AC_CHECK_FUNCS([strtoll])
+AC_MSG_CHECKING([for GPSD JSON receiver])
+AC_ARG_ENABLE(
+ [GPSD],
+ [AS_HELP_STRING(
+ [--enable-GPSD],
+ [+ GPSD JSON receiver]
+ )],
+ [ntp_ok=$enableval],
+ [case "$ac_cv_func_strtoll" in
+ yes) ntp_ok=$ntp_eac ;;
+ *) ntp_ok="no" ;;
+ esac]
+)
+case "$ntp_ok" in
+ yes)
+ ntp_refclock=yes
+ AC_DEFINE([CLOCK_GPSDJSON], [1], [GPSD JSON receiver])
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for ONCORE Motorola VP/UT Oncore GPS])
@@ -3466,10 +2378,12 @@ AC_ARG_ENABLE(
case "$ntp_oncore_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ONCORE], 1, [Motorola UT Oncore GPS])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
# Requires modem control
@@ -3483,10 +2397,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_enable_all_modem_control_clocks]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_PALISADE], [1], [Palisade clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Conrad parallel port radio clock])
@@ -3499,10 +2415,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_PCF], [1], [Conrad parallel port radio clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([PST/Traconex 1020 WWV/WWVH receiver])
@@ -3515,10 +2433,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_PST], [1], [PST/Traconex 1020 WWV/WWVH receiver])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([RIPENCC specific Trimble driver])
@@ -3535,10 +2455,12 @@ AC_ARG_ENABLE(
case "$ntp_ripe_ncc_ok" in
no) ntp_ok=no ;;
esac
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_RIPENCC], [],[RIPE NCC Trimble clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
# Danny Meyer says SHM compiles (with a few warnings) under Win32.
@@ -3558,10 +2480,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_SHM], [1], [clock thru shared memory])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Spectracom 8170/Netclock/2 WWVB receiver])
@@ -3574,11 +2498,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_SPECTRACOM], [1],
[Spectracom 8170/Netclock/2 WWVB receiver])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([KSI/Odetics TPRO/S GPS receiver/IRIG interface])
@@ -3600,27 +2526,18 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_TPRO], [1],
[KSI/Odetics TPRO/S GPS receiver/IRIG interface])
-fi
+ ;;
+esac
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
-dnl Bug 342: longstanding unfixed bugs
-dnl AC_MSG_CHECKING([TRAK 8810 GPS receiver])
-dnl AC_ARG_ENABLE([TRAK],
-dnl [AS_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver])],
-dnl [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
-dnl if test "$ntp_ok" = "yes"; then
-dnl ntp_refclock=yes
-dnl AC_DEFINE([CLOCK_TRAK], [1], [TRAK 8810 GPS receiver])
-dnl fi
-dnl AC_MSG_RESULT([$ntp_ok])
-
# Not on a vax-dec-bsd
AC_MSG_CHECKING([Kinemetrics/TrueTime receivers])
AC_ARG_ENABLE(
@@ -3641,10 +2558,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_TRUETIME], [1], [Kinemetrics/TrueTime receivers])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$host" in
yesvax-dec-bsd) AC_MSG_WARN([*** But the expected answer is... no ***])
@@ -3660,10 +2579,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=no]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_TT560], [], [TrueTime 560 IRIG-B decoder?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([Ultralink M320 WWVB receiver])
@@ -3676,10 +2597,38 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ULINK], [1], [Ultralink M320 WWVB receiver?])
-fi
+ ;;
+esac
+AC_MSG_RESULT([$ntp_ok])
+
+AC_MSG_CHECKING([Spectracom TSYNC PCI timing board])
+AC_ARG_ENABLE(
+ [TSYNCPCI],
+ [AS_HELP_STRING(
+ [--enable-TSYNCPCI],
+ [s Spectracom TSYNC timing board]
+ )],
+ [ntp_ok=$enableval],
+ [
+ case "$host" in
+ *-*-*linux*)
+ ntp_ok=$ntp_eac
+ ;;
+ *)
+ ntp_ok=no
+ esac
+ ]
+)
+case "$ntp_ok" in
+ yes)
+ ntp_refclock=yes
+ AC_DEFINE([CLOCK_TSYNCPCI], [1], [Spectracom TSYNC timing board])
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([WWV receiver])
@@ -3697,10 +2646,12 @@ AC_ARG_ENABLE(
esac
]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_WWV], [1], [WWV audio driver])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canaudio" in
yesno) AC_MSG_WARN([*** But the expected answer is... no ***])
@@ -3716,10 +2667,12 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eac]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_ZYFER], [1], [Zyfer GPStarplus])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
AC_MSG_CHECKING([for default inclusion of all suitable PARSE clocks])
@@ -3764,11 +2717,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_COMPUTIME], [1], [Diems Computime Radio Clock?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3785,11 +2740,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_DCF7000], [1], [ELV/DCF7000 clock?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3806,11 +2763,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_HOPF6021], [1], [HOPF 6021 clock?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3827,11 +2786,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_MEINBERG], [1], [Meinberg clocks])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3848,13 +2809,15 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_parseutil=yes
ntp_refclock=yes
ntp_rawdcf=yes
AC_DEFINE([CLOCK_RAWDCF], [1], [DCF77 raw time code])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3892,11 +2855,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_RCC8000], [1], [RCC 8000 clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3913,11 +2878,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_SCHMID], [1], [Schmid DCF77 clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3934,12 +2901,14 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_TRIMTAIP], [1],
[Trimble GPS receiver/TAIP protocol])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3956,12 +2925,14 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_TRIMTSIP], [1],
[Trimble GPS receiver/TSIP protocol])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3978,11 +2949,13 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_WHARTON_400A], [1], [WHARTON 400A Series clock])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ntp_ok])
case "$ntp_ok$ntp_canparse" in
yesno)
@@ -3999,17 +2972,35 @@ AC_ARG_ENABLE(
[ntp_ok=$enableval],
[ntp_ok=$ntp_eapc]
)
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_libparse=yes
ntp_refclock=yes
AC_DEFINE([CLOCK_VARITEXT], [1], [VARITEXT clock])
-fi
+ ;;
+esac
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(SEL240X clock)
+AC_ARG_ENABLE(SEL240X,
+ AC_HELP_STRING([--enable-SEL240X], [s SEL240X clock]),
+ [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
+if test "$ntp_ok" = "yes"; then
+ ntp_libparse=yes
+ ntp_refclock=yes
+ AC_DEFINE(CLOCK_SEL240X, 1, [SEL240X 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])
@@ -4030,28 +3021,36 @@ AC_MSG_RESULT([$ans])
NTP_OPENSSL
-AC_MSG_CHECKING([if we want to compile with ElectricFence])
-AC_ARG_WITH(
- [electricfence],
- [AS_HELP_STRING(
- [--with-electricfence],
- [- compile with ElectricFence malloc debugger]
- )],
- [ans=$withval],
- [ans=no]
-)
-case "$ans" in
- no) ;;
+NTP_CRYPTO_RAND
+
+# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
+AC_MSG_CHECKING([if we want to include NTP Autokey protocol support])
+AC_ARG_ENABLE(
+ [autokey],
+ AS_HELP_STRING(
+ [--enable-autokey],
+ [+ support NTP Autokey protocol]
+ ),
+ [ntp_autokey=$enableval],
+ [ntp_autokey=$ntp_openssl]
+)
+case "$ntp_autokey" 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
+ case "$ntp_openssl" in
+ no)
+ AC_MSG_WARN([Disabling Autokey, --enable-autokey requires --with-crypto.])
+ ntp_autokey=no
+ ;;
+ *)
+ AC_DEFINE([AUTOKEY], [1], [Support NTP Autokey protocol?])
+ ntp_autokey=yes
+ ;;
+ esac
;;
esac
-AC_MSG_RESULT([$ans])
+AC_MSG_RESULT([$ntp_autokey])
AC_SUBST([MAKE_CHECK_LAYOUT])
AC_MSG_CHECKING([if we want to run check-layout])
@@ -4070,14 +3069,16 @@ 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 "$ntp_parseutil" in
+ yes)
case "$host" in
*-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
ans="dcfd testdcf"
DCFD=dcfd
- TESTDCF=testdcf
+ TESTDCF=testdcf
esac
-fi
+ ;;
+esac
AC_MSG_RESULT([$ans])
AC_SUBST([MAKE_PARSEKMODULE])
@@ -4106,15 +3107,16 @@ esac
AC_MSG_RESULT([$ans])
AC_MSG_CHECKING([if we need basic refclock support])
-if test "$ntp_refclock" = "yes"; then
+case "$ntp_refclock" in
+ yes)
AC_DEFINE([REFCLOCK], [1], [Basic refclock support?])
-fi
+ ;;
+esac
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"
+dnl Things that can be made in clockstuff
+AC_SUBST([PROPDELAY], [propdelay])
+AC_SUBST([CHUTEST]) dnl needs work to compile
AC_SUBST([MAKE_ADJTIMED])
AC_MSG_CHECKING([if we want HP-UX adjtimed support])
@@ -4125,11 +3127,18 @@ case "$host" in
*) ans=no
;;
esac
-if test "$ans" = "yes"; then
+case "$ans" in
+ yes)
MAKE_ADJTIMED=adjtimed
AC_DEFINE([NEED_HPUX_ADJTIME], [1],
[Do we need HPUX adjtime() library support?])
-fi
+ ;;
+ *) ADJTIMED_DB=
+ ADJTIMED_DL=
+ ADJTIMED_DS=
+ ADJTIMED_MS=
+ ;;
+esac
AC_MSG_RESULT([$ans])
AC_MSG_CHECKING([if we want QNX adjtime support])
@@ -4140,10 +3149,12 @@ case "$host" in
*) ans=no
;;
esac
-if test "$ans" = "yes"; then
+case "$ans" in
+ yes)
AC_DEFINE([NEED_QNX_ADJTIME], [1],
[Do we need the qnx adjtime call?])
-fi
+ ;;
+esac
AC_MSG_RESULT([$ans])
AC_MSG_CHECKING([if we can read kmem])
@@ -4155,6 +3166,7 @@ case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
ans=yes
;;
*) ans=no
+ ;;
esac
case "$host" in
@@ -4194,7 +3206,7 @@ case "$ans" in
yes)
can_kmem=yes
;;
- *)
+ *)
can_kmem=no
AC_DEFINE([NOKMEM], [1], [Should we NOT read /dev/kmem?])
esac
@@ -4217,7 +3229,8 @@ case "$host" in
*-fujitsu-uxp*)
ans=yes
;;
- *-ibm-aix[[456]]*)
+ *-ibm-aix[[4-9]]*)
+ # XXX only verified thru AIX6.
ans=yes
;;
*-*-*linux*)
@@ -4233,6 +3246,7 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
# --enable-accurate-adjtime / --disable-accurate-adjtime
@@ -4240,7 +3254,7 @@ esac
AC_ARG_ENABLE(
[accurate-adjtime],
[AS_HELP_STRING(
- [--enable-accurate-adjtime],
+ [--enable-accurate-adjtime],
[s the adjtime() call is accurate]
)],
[ans=$enableval]
@@ -4249,7 +3263,7 @@ AC_ARG_ENABLE(
AC_MSG_RESULT([$ans])
case "$ans" in
- yes)
+ yes)
AC_DEFINE([ADJTIME_IS_ACCURATE], [1], [Is adjtime() accurate?])
adjtime_is_accurate=yes
;;
@@ -4273,7 +3287,8 @@ AC_CACHE_CHECK(
*-hp-hpux*)
ans=old_tick
;;
- *-ibm-aix[[3456]]*)
+ *-ibm-aix[[3-9]]*)
+ # XXX only verified thru AIX6.
ans=no
;;
*-*-mpeix*)
@@ -4298,7 +3313,7 @@ AC_CACHE_CHECK(
case "$ntp_cv_nlist_tick" in
''|no)
;; # HMS: I think we can only get 'no' here...
- *)
+ *)
AC_DEFINE_UNQUOTED([K_TICK_NAME], ["$ntp_cv_nlist_tick"],
[What is the name of TICK in the kernel?])
esac
@@ -4370,7 +3385,7 @@ AC_CACHE_CHECK(
case "$ntp_cv_nlist_tickadj" in
''|no)
;; # HMS: I think we can only get 'no' here...
- *)
+ *)
AC_DEFINE_UNQUOTED([K_TICKADJ_NAME], ["$ntp_cv_nlist_tickadj"],
[What is the name of TICKADJ in the kernel?])
esac
@@ -4498,7 +3513,7 @@ 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 tick tickadj
dnl 10000 80 Unixware
dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
dnl 10000 150 sgi IRIX
@@ -4580,18 +3595,21 @@ case "$host" in
case "$can_kmem" in
no)
ans=1000
+ ;;
esac
;;
*-*-domainos) # Skippy: won't be found...
case "$can_kmem" in
no)
ans=668
+ ;;
esac
;;
*-*-hpux*)
case "$adjtime_is_accurate" in
yes)
ans='tick/16'
+ ;;
esac
;;
*-*-irix*)
@@ -4608,6 +3626,7 @@ case "$host" in
;;
*-*-unicosmp*)
ans=150
+ ;;
esac
AC_ARG_ENABLE(
@@ -4694,6 +3713,12 @@ case "$ac_cv_make_ntptime" in
yes)
MAKE_NTPTIME=ntptime
;;
+ *)
+ NTPTIME_DB=
+ NTPTIME_DL=
+ NTPTIME_DS=
+ NTPTIME_MS=
+ ;;
esac
AC_SUBST([MAKE_TICKADJ])
@@ -4738,6 +3763,17 @@ AC_CACHE_CHECK(
case "$ntp_cv_make_tickadj" in
yes)
MAKE_TICKADJ=tickadj
+ ;;
+ *)
+ CALC_TICKADJ_DB=
+ CALC_TICKADJ_DL=
+ CALC_TICKADJ_DS=
+ CALC_TICKADJ_MS=
+ TICKADJ_DB=
+ TICKADJ_DL=
+ TICKADJ_DS=
+ TICKADJ_MS=
+ ;;
esac
AC_SUBST([MAKE_TIMETRIM])
@@ -4761,6 +3797,12 @@ AC_CACHE_CHECK(
case "$ntp_cv_make_timetrim" in
yes)
MAKE_TIMETRIM=timetrim
+ ;;
+ *) TIMETRIM_DB=
+ TIMETRIM_DL=
+ TIMETRIM_DS=
+ TIMETRIM_MS=
+ ;;
esac
AC_SUBST([MAKE_LIBNTPSIM])
@@ -4773,7 +3815,7 @@ AC_ARG_ENABLE(
[--enable-simulator],
[- build/install the NTPD simulator?]
)],
- [ans=$enableval],
+ [ans=$enableval],
[ans=no]
)
AC_MSG_RESULT([$ans])
@@ -4781,6 +3823,13 @@ case "$ans" in
yes)
MAKE_NTPDSIM=ntpdsim
MAKE_LIBNTPSIM=libntpsim.a
+ ;;
+ *)
+ NTPDSIM_DB=
+ NTPDSIM_DL=
+ NTPDSIM_DS=
+ NTPDSIM_MS=
+ ;;
esac
case "$build" in
@@ -4794,6 +3843,7 @@ case "$build" in
;;
esac
+NTP_WITHSNTP
AC_MSG_CHECKING([if we want to build ntpsnmpd])
AC_ARG_WITH(
@@ -4861,8 +3911,11 @@ case "$ans" in
esac
CFLAGS=$save_CFLAGS
+ AS_UNSET([save_CFLAGS])
CPPFLAGS=$save_CPPFLAGS
+ AS_UNSET([save_CPPFLAGS])
LIBS=$save_LIBS
+ AS_UNSET([save_LIBS])
;;
*)
AC_MSG_WARN([Cannot build ntpsnmpd - net-snmp-config cannot be found])
@@ -4872,6 +3925,14 @@ case "$ans" in
esac
AC_SUBST([MAKE_NTPSNMPD])
+case "$MAKE_NTPSNMPD" in
+ '')
+ NTPSNMPD_DB=
+ NTPSNMPD_DL=
+ NTPSNMPD_DS=
+ NTPSNMPD_MS=
+ ;;
+esac
AC_MSG_CHECKING([if we should always slew the time])
@@ -4960,6 +4021,7 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
AC_ARG_ENABLE(
@@ -4991,6 +4053,7 @@ case "$host" in
;;
*)
ans=no
+ ;;
esac
AC_ARG_ENABLE(
@@ -5029,8 +4092,9 @@ case "$host" in
ans=yes
fi
;;
- *)
+ *)
ans=yes
+ ;;
esac
;;
*-*-solaris2.7)
@@ -5051,10 +4115,12 @@ case "$host" in
;;
*)
ans=yes
+ ;;
esac
;;
*)
ans=no
+ ;;
esac
AC_ARG_ENABLE(
@@ -5102,10 +4168,11 @@ case "$host" in
ans=yes
;;
*) ans=no
+ ;;
esac
AC_ARG_ENABLE(
- [irig-sawtooth],
+ [irig-sawtooth],
[AS_HELP_STRING(
[--enable-irig-sawtooth],
[s if we should enable the IRIG sawtooth filter]
@@ -5121,11 +4188,10 @@ case "$ans" in
[Should we use the IRIG sawtooth filter?])
esac
-
AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
AC_ARG_ENABLE(
- [nist],
+ [nist],
[AS_HELP_STRING(
[--enable-nist],
[- if we should enable the NIST lockclock scheme]
@@ -5142,7 +4208,6 @@ case "$ans" in
[Should we align with the NIST lockclock scheme?]) ;;
esac
-
AC_MSG_CHECKING([if we want support for Samba's signing daemon])
AC_ARG_ENABLE(
@@ -5176,77 +4241,9 @@ case "$ntp_signd_path" in
[Do we want support for Samba's signing daemon?])
AC_DEFINE_UNQUOTED([NTP_SIGND_PATH], ["$ntp_signd_path"],
[Path to sign daemon rendezvous socket])
-esac
-
-
-AC_CHECK_HEADERS([sys/clockctl.h])
-
-case "$host" in
- *-*-netbsd*)
- ans=yes
- ;;
- *) ans=no
;;
esac
-AC_ARG_ENABLE(
- [clockctl],
- [AS_HELP_STRING(
- [--enable-clockctl],
- [s Use /dev/clockctl for non-root clock control]
- )],
- [ntp_use_dev_clockctl=$enableval],
- [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
-)
-
-AC_MSG_CHECKING([[if we should use /dev/clockctl]])
-AC_MSG_RESULT([$ntp_use_dev_clockctl])
-
-
-AC_CHECK_HEADERS([sys/capability.h sys/prctl.h])
-
-AC_MSG_CHECKING([if we have linux capabilities (libcap)])
-
-case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
- yesyes)
- case "$host" in
- mips-sgi-irix*)
- ntp_have_linuxcaps=no
- ;;
- *) ntp_have_linuxcaps=yes
- ;;
- esac
- ;;
- *)
- ntp_have_linuxcaps=no
- ;;
-esac
-
-AC_ARG_ENABLE(
- [linuxcaps],
- [AS_HELP_STRING(
- [--enable-linuxcaps],
- [+ Use Linux capabilities for non-root clock control]
- )],
- [ntp_have_linuxcaps=$enableval]
-)
-
-AC_MSG_RESULT([$ntp_have_linuxcaps])
-
-case "$ntp_have_linuxcaps" in
- yes)
- AC_DEFINE([HAVE_LINUX_CAPABILITIES], [1],
- [Do we have Linux capabilities?])
- LIBS="$LIBS -lcap"
-esac
-
-case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
- *yes*)
- AC_DEFINE([HAVE_DROPROOT], [1],
- [Can we drop root privileges?])
-esac
-
-
AC_CHECK_HEADERS([libscf.h])
LSCF=
case "$ac_cv_header_libscf_h" in
@@ -5255,320 +4252,22 @@ case "$ac_cv_header_libscf_h" in
esac
AC_SUBST([LSCF])
-AC_CHECK_FUNC(
- [setppriv],
- [ans=yes],
- [ans=no]
-)
-case "$ans" in
- yes)
- AC_DEFINE([HAVE_SOLARIS_PRIVS], [1],
- [Are Solaris privileges available?])
-esac
-
-
-AC_CACHE_CHECK(
- [struct sockaddr for sa_len],
- [isc_cv_platform_havesalen],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- ]],
- [[
- extern struct sockaddr *ps;
- return ps->sa_len;
- ]]
- )],
- [isc_cv_platform_havesalen=yes],
- [isc_cv_platform_havesalen=no]
- )]
-)
-case "$isc_cv_platform_havesalen" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVESALEN], [1],
- [struct sockaddr has sa_len?])
-esac
-
-AC_ARG_ENABLE(
- [ipv6],
- [AS_HELP_STRING(
- [--enable-ipv6],
- [s use IPv6?]
- )]
-)
-
-case "$enable_ipv6" in
- yes|''|autodetect)
- case "$host" in
- powerpc-ibm-aix4*)
- ;;
- *)
- AC_DEFINE([WANT_IPV6], [1], [configure --enable-ipv6])
- ;;
- esac
- ;;
- no)
- ;;
-esac
-
-
-dnl [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion)
-case "$host" in
- *-*-darwin*)
- AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Are we _special_?])
-esac
+NTP_IPV6
-AC_CACHE_CHECK(
- [for IPv6 structures],
- [isc_cv_found_ipv6],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- ]],
- [[
- struct sockaddr_in6 sin6;
- ]]
- )],
- [isc_cv_found_ipv6=yes],
- [isc_cv_found_ipv6=no]
- )]
-)
-
-#
-# See whether IPv6 support is provided via a Kame add-on.
-# This is done before other IPv6 linking tests so LIBS is properly set.
-#
-AC_MSG_CHECKING([for Kame IPv6 support])
-AC_ARG_WITH(
- [kame],
- [AS_HELP_STRING(
- [--with-kame],
- [- =/usr/local/v6]
- )],
- [use_kame="$withval"],
- [use_kame="no"]
-)
-case "$use_kame" in
- no)
- ;;
- yes)
- kame_path=/usr/local/v6
- ;;
- *)
- kame_path="$use_kame"
- ;;
-esac
-case "$use_kame" in
- no)
- AC_MSG_RESULT([no])
- ;;
- *)
- if test -f $kame_path/lib/libinet6.a; then
- AC_MSG_RESULT([$kame_path/lib/libinet6.a])
- LIBS="-L$kame_path/lib -linet6 $LIBS"
- else
- AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
-
-Please choose the proper path with the following command:
-
- configure --with-kame=PATH
-])
- fi
- ;;
-esac
-
-#
-# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
-# Including it on Kame-using platforms is very bad, though, because
-# Kame uses #error against direct inclusion. So include it on only
-# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
-# This is done before the in6_pktinfo check because that's what
-# netinet6/in6.h is needed for.
-#
-case "$host" in
- *-bsdi4.[[01]]*)
- AC_DEFINE([ISC_PLATFORM_NEEDNETINET6IN6H], [1],
- [Do we need netinet6/in6.h?])
- isc_netinet6in6_hack="#include <netinet6/in6.h>"
- ;;
- *)
- isc_netinet6in6_hack=""
- ;;
-esac
-
-#
-# This is similar to the netinet6/in6.h issue.
-#
-case "$host" in
- *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
- AC_DEFINE([ISC_PLATFORM_FIXIN6ISADDR], [1],
- [Do we need to fix in6isaddr?])
- isc_netinetin6_hack="#include <netinet/in6.h>"
- ;;
- *)
- isc_netinetin6_hack=""
- ;;
-esac
-
-
-case "$isc_cv_found_ipv6" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIPV6], [1], [have IPv6?])
- AC_CACHE_CHECK(
- [for in6_pktinfo],
- [isc_cv_have_in6_pktinfo],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct in6_pktinfo xyzzy;
- ]]
- )],
- [isc_cv_have_in6_pktinfo=yes],
- [isc_cv_have_in6_pktinfo=no]
- )]
- )
- case "$isc_cv_have_in6_pktinfo" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIN6PKTINFO], [1],
- [have struct in6_pktinfo?])
- esac
-
-
- # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
- AC_CACHE_CHECK(
- [for sockaddr_in6.sin6_scope_id],
- [isc_cv_have_sin6_scope_id],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct sockaddr_in6 xyzzy;
- xyzzy.sin6_scope_id = 0;
- ]]
- )],
- [isc_cv_have_sin6_scope_id=yes],
- [isc_cv_have_sin6_scope_id=no]
- )]
- )
-
- case "$isc_cv_have_sin6_scope_id" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVESCOPEID], [1], [sin6_scope_id?])
- esac
-esac
-
-
-# We need this check run even without isc_cv_found_ipv6=yes
-
-AC_CACHE_CHECK(
- [for in6addr_any],
- [isc_cv_have_in6addr_any],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct in6_addr in6;
- in6 = in6addr_any;
- ]]
- )],
- [isc_cv_have_in6addr_any=yes],
- [isc_cv_have_in6addr_any=no]
- )]
-)
-
-case "$isc_cv_have_in6addr_any" in
- no)
- AC_DEFINE([ISC_PLATFORM_NEEDIN6ADDRANY], [1], [missing in6addr_any?])
-esac
-
-
-AC_CACHE_CHECK(
- [for struct if_laddrconf],
- [isc_cv_struct_if_laddrconf],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <net/if6.h>
- ]],
- [[
- struct if_laddrconf a;
- ]]
- )],
- [isc_cv_struct_if_laddrconf=yes],
- [isc_cv_struct_if_laddrconf=no]
- )]
-)
-
-case "$isc_cv_struct_if_laddrconf" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRCONF], [1],
- [have struct if_laddrconf?])
-esac
-
-AC_CACHE_CHECK(
- [for struct if_laddrreq],
- isc_cv_struct_if_laddrreq,
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <net/if6.h>
- ]],
- [[
- struct if_laddrreq a;
- ]]
- )],
- [isc_cv_struct_if_laddrreq=yes],
- [isc_cv_struct_if_laddrreq=no]
- )]
-)
-
-case "$isc_cv_struct_if_laddrreq" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
- [have struct if_laddrreq?])
-esac
-
#
# Look for a sysctl call to get the list of network interfaces.
#
AC_CACHE_CHECK(
[for interface list sysctl],
[ntp_cv_iflist_sysctl],
- [AC_EGREP_CPP(
- [found_rt_iflist],
+ [AC_PREPROC_IFELSE(
[
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
- #ifdef NET_RT_IFLIST
- found_rt_iflist
+ #ifndef NET_RT_IFLIST
+ # error
#endif
],
[ntp_cv_iflist_sysctl=yes],
@@ -5593,20 +4292,26 @@ AC_ARG_ENABLE(
[ntp_ok=yes]
)
ntp_saveconfig_enabled=0
-if test "$ntp_ok" = "yes"; then
+case "$ntp_ok" in
+ yes)
ntp_saveconfig_enabled=1
AC_DEFINE([SAVECONFIG], [1], [saveconfig mechanism])
-fi
+ ;;
+esac
AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1])
AC_MSG_RESULT([$ntp_ok])
+dnl gtest is needed for our tests subdirs. It would be nice if we could
+dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX
+dnl can't be conditionalized.
+NTP_GOOGLETEST
+
###
AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir],
[Default location of crypto key info])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([ElectricFence/Makefile])
AC_CONFIG_FILES([adjtimed/Makefile])
AC_CONFIG_FILES([clockstuff/Makefile])
AC_CONFIG_FILES([include/Makefile])
@@ -5616,6 +4321,7 @@ AC_CONFIG_FILES([kernel/sys/Makefile])
AC_CONFIG_FILES([libntp/Makefile])
AC_CONFIG_FILES([libparse/Makefile])
AC_CONFIG_FILES([ntpd/Makefile])
+AC_CONFIG_FILES([ntpd/complete.conf], [sed -e '/^rlimit$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf])
AC_CONFIG_FILES([ntpdate/Makefile])
AC_CONFIG_FILES([ntpdc/Makefile])
AC_CONFIG_FILES([ntpdc/nl.pl], [chmod +x ntpdc/nl.pl])
@@ -5623,19 +4329,41 @@ AC_CONFIG_FILES([ntpq/Makefile])
AC_CONFIG_FILES([ntpsnmpd/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/html2man], [chmod +x scripts/html2man])
-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/lib/Makefile])
+AC_CONFIG_FILES([scripts/calc_tickadj/calc_tickadj], [chmod +x scripts/calc_tickadj/calc_tickadj])
+AC_CONFIG_FILES([scripts/calc_tickadj/Makefile])
+AC_CONFIG_FILES([scripts/build/mkver], [chmod +x scripts/build/mkver])
+AC_CONFIG_FILES([scripts/ntp-wait/ntp-wait], [chmod +x scripts/ntp-wait/ntp-wait])
+AC_CONFIG_FILES([scripts/ntp-wait/Makefile])
+AC_CONFIG_FILES([scripts/ntpsweep/ntpsweep], [chmod +x scripts/ntpsweep/ntpsweep])
+AC_CONFIG_FILES([scripts/ntpsweep/Makefile])
+AC_CONFIG_FILES([scripts/ntptrace/ntptrace], [chmod +x scripts/ntptrace/ntptrace])
+AC_CONFIG_FILES([scripts/ntptrace/Makefile])
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([scripts/build/Makefile])
+AC_CONFIG_FILES([tests/Makefile])
+AC_CONFIG_FILES([tests/libntp/Makefile])
+AC_CONFIG_FILES([tests/ntpd/Makefile])
AC_CONFIG_FILES([util/Makefile])
+perllibdir="${datadir}/ntp/lib"
+AC_DEFINE_DIR([PERLLIBDIR], [perllibdir], [data dir])
+
+calc_tickadj_opts="$srcdir/scripts/calc_tickadj/calc_tickadj-opts"
+AC_SUBST_FILE([calc_tickadj_opts])
+ntp_wait_opts="$srcdir/scripts/ntp-wait/ntp-wait-opts"
+AC_SUBST_FILE([ntp_wait_opts])
+ntpsweep_opts="$srcdir/scripts/ntpsweep/ntpsweep-opts"
+AC_SUBST_FILE([ntpsweep_opts])
+ntptrace_opts="$srcdir/scripts/ntptrace/ntptrace-opts"
+AC_SUBST_FILE([ntptrace_opts])
+summary_opts="$srcdir/scripts/summary-opts"
+AC_SUBST_FILE([summary_opts])
+plot_summary_opts="$srcdir/scripts/plot_summary-opts"
+AC_SUBST_FILE([plot_summary_opts])
+
AC_CONFIG_SUBDIRS([sntp])
AC_OUTPUT
diff --git a/deps-ver b/deps-ver
index 9ad4b1451fd5..16d66a8bdb86 100644
--- a/deps-ver
+++ b/deps-ver
@@ -1 +1 @@
-Tue Nov 16 19:50:15 UTC 2010
+Fri Dec 30 11:24:57 UTC 2011
diff --git a/depsver.mf b/depsver.mf
index 3e4a6185a13c..695f7303ce31 100644
--- a/depsver.mf
+++ b/depsver.mf
@@ -4,7 +4,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -13,17 +13,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -32,7 +25,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
BUILT_SOURCES += .deps-ver
diff --git a/excludes b/excludes
deleted file mode 100644
index 36cb351e93b0..000000000000
--- a/excludes
+++ /dev/null
@@ -1 +0,0 @@
-*.obj *.pch *.bsc *.pdb *.sbr nt*.zip *.tar *.gz *.ilk beta*.zip
diff --git a/flock-build b/flock-build
index 1756cc4a0518..b537ac349175 100755
--- a/flock-build
+++ b/flock-build
@@ -52,6 +52,10 @@ esac
# * pogo sparc-sun-solaris2.10
# * rackety freebsd-6.1
+if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
+ echo "Error: bootstrap required." 1>&2 && exit 1
+fi
+
# HMS: we need $PWD because solaris produces /deacon/backroom when
# we are in /backroom and in general there is no /deacon/backroom.
c_d=${PWD:-`pwd`}
@@ -59,7 +63,7 @@ c_d=${PWD:-`pwd`}
SIG=`perl -e 'print rand'`
case "$LIST" in
- '') LIST="malarky rackety" ;;
+ '') LIST="pogo" ;;
esac
for i in $LIST
@@ -76,8 +80,9 @@ do
case "1" in
0)
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS" &
- ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" &
+ ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" &
;;
1)
cat > .flockbuild-$i-$SIG <<-ENDQUOT
@@ -104,13 +109,13 @@ do
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
- ./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS &
+ ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
- ./build $SIG $STD --disable-all-clocks $BUILD_ARGS &
+ ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
diff --git a/html/access.html b/html/access.html
new file mode 100644
index 000000000000..3489f8fbd99a
--- /dev/null
+++ b/html/access.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Access Control Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+-->
+</style>
+</head>
+<body>
+<h3>Access Control Support</h3>
+<p><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>
+<p>The skunk watches for intruders and sprays.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:53<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
+<hr>
+<h4>Access Control Support</h4>
+<p>The <tt>ntpd</tt> daemon implements a general purpose access control list (ACL) containing address/match entries sorted first by increasing address values 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.</p>
+<p>The ACL is specified as a list of <tt>restrict</tt> commands in the following format:</p>
+<p><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></p>
+<p>The <tt><i>address</i></tt> 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 name. The <tt><i>mask</i></tt> argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the <tt><i>address</i></tt> is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6 default entries. <tt>restrict source</tt> configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptable, and removed when the association is demobilized.</p>
+<p>Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server.</p>
+<p>An example may clarify how it works. Our campus has two class-B networks, 128.4 for the ECE and CIS departments and 128.175 for the rest of campus. Let's assume (not true!) that subnet 128.4.1 homes critical services like class rosters and spread sheets. A suitable ACL might look like this:</p>
+<pre>
+restrict default nopeer # deny new associations
+restrict 128.175.0.0 mask 255.255.0.0 # allow campus access
+restrict 128.4.0.0 mask 255.255.0.0 none # allow ECE and CIS access
+restrict 128.4.1.0 mask 255.255.255.0 notrust # require authentication on subnet 1
+restrict time.nist.gov # allow access
+</pre>
+<p>While this facility may be useful for keeping unwanted, 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>Default restriction list entries with the flags <tt>ignore, 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).</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
+</html>
diff --git a/html/accopt.html b/html/accopt.html
index f1f8cb37b3e5..6caff48c31b0 100644
--- a/html/accopt.html
+++ b/html/accopt.html
@@ -1,202 +1,91 @@
<!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="HTML Tidy, see www.w3.org">
-<title>Access Control Options</title>
+<title>Access Control Commands and Options</title>
+<!-- Changed by: Harlan &, 13-Nov-2014 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!--
-.style1 {
- color: #FF0000;
- font-weight: bold;
+<style1 {
+color: #FF0000;
+ font-weight: bold;
}
-->
</style>
</head>
-
<body>
-
-<h3>Access Control Options</h3>
-
+<h3>Access Control Commands and 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:
-<!-- #BeginDate format:En2m -->30-Sep-2009 17:16<!-- #EndDate -->
- UTC</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->13-Nov-2014 03:00<!-- #EndDate -->
+ UTC</p>
<br clear="left">
-
<h4>Related Links</h4>
-
<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
-
-<h4>Table of Contents</h4>
-
-<ul>
-<li class="inline"><a href="#acx">Access Control Support</a></li>
-<li class="inline"><a href="#cmd">Access Control Commands</a></li>
-</ul>
-
<hr>
-
-<h4 id="acx">Access Control Support</h4>
-
-<p>The <tt>ntpd</tt> daemon implements a general purpose access control list
- (ACL) containing address/match entries sorted first by increasing address
- values 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.</p>
-
-<p>An example may clarify how it works. Our campus has two class-B networks,
-128.4 for the ECE and CIS departments and 128.175 for the rest of campus.
-Let's assume (not true!) that subnet 128.4.1 homes critical services like class
- rosters and spread sheets. A suitable ACL might be</p>
-<pre>
-restrict default nopeer # deny new associations
-restrict 128.175.0.0 mask 255.255.0.0 # allow campus access
-restrict 128.4.0.0 mask 255.255.0.0 none # allow ECE and CIS access
-restrict 128.4.1.0 mask 255.255.255.0 notrust # require authentication on subnet 1
-restrict time.nist.gov # allow access
-</pre>
-
-<p>While this facility may be useful for keeping unwanted, 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>
-
-<h4 id="cmd">Access Control Commands</h4>
-
+<h4>Commands and Options</h4>
+<p>Unless noted otherwise, further information about these ccommands is on the <a href="accopt.html">Access Control Support</a> page.</p>
<dl>
-
-<dt id="discard"><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt></dt>
-<dd>Set the parameters of the rate control facility which protects the server
- from client abuse. If the <tt>limited</tt> flag is present in the ACL, packets
- that violate these limits are discarded. If in addition the <tt>kod</tt> restriction
- is present, a kiss-o'-death packet is returned.</dd>
-
-<dd><dl>
-
-<dt><tt>average <i>avg</i></tt></dt>
-<dd>Specify the minimum average interpacket spacing (minimum average headway
-time) in log<sub>2</sub> s with default 3.</dd>
-
-<dt><tt>minimum <i>min</i></tt></dt>
-<dd>Specify the minimum interpacket spacing (guard time) in log<sub>2</sub> s
- with default 1.</dd>
-
-<dt><tt>monitor</tt></dt>
-<dd>Specify the probability of discard for packets that overflow the rate-control
- window. This is a performance optimization for servers with aggregate arrivals
- of 1000 packets per second or more.</dd>
-
-</dl></dd>
-
-<dt id="restrict"><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></dt>
-<dd>The <tt><i>address</i></tt> 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 name. The <tt><i>mask</i></tt> argument expressed in
- dotted-quad form defaults to 255.255.255.255, meaning that the <tt><i>address</i></tt> is
- treated as the address of an individual host. A default entry (address 0.0.0.0,
- mask 0.0.0.0) is always included and is always the first entry in the list.
- Note that the text string <tt>default</tt>, with no mask option, may be used
- to indicate the default entry.</dd>
-
-<dd>Some flags have the effect to deny service, some have the effect to
- enable service and some are conditioned by other flags. The flags. are
- not orthogonal, in that more restrictive flags will often make less restrictive
- ones redundant. The flags that deny service are classed in two categories,
- those that restrict time service and those that 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>flake</tt></dt>
-<dd>Discard received NTP packets with probability 0.1; that is, on average drop
- one packet in ten. This is for testing and amusement. The name comes from Bob
- Braden's <i>flakeway</i>, which once did a similar thing for early Internet
- testing.</dd>
-
-<dt><tt>ignore</tt></dt>
-<dd>Deny packets of all kinds, including <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
-
-<dt><tt>kod</tt></dt>
-<dd>Send a kiss-o'-death (KoD) packet if the <tt>limited</tt> flag is present
- and a packet violates the rate limits established by the <tt>discard</tt> command.
- KoD packets are themselves rate limited for each source address separately.
- If this flag is not present, packets that violate the rate limits are discarded.</dd>
-
-<dt><tt>limited</tt></dt>
-<dd>Deny time service if the packet violates the rate limits established by the <tt>discard</tt> command.
- This does not apply to <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</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>mssntp</tt></dt>
-<dd>Enable Microsoft Windows MS-SNTP authentication using Active Directory services.
- <span class="style1">Note: Potential users should be aware that these services
- involve a TCP connection to another process that could potentially block,
- denying services to other users. Therefore, this flag should be used only
- for a dedicated server with no clients other than MS-SNTP.</span></dd>
-<dt><tt>nomodify</tt></dt>
-<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.</dd>
-
-<dt><tt>noquery</tt></dt>
-<dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries. Time service is not affected.</dd>
-
-<dt><tt>nopeer</tt></dt>
-<dd>Deny packets that might mobilize an association unless authenticated. This
- includes broadcast, symmetric-active and manycast server packets when a configured
- association does not exist. Note that this flag does not apply to packets
- that do not attempt to mobilize an association. </dd>
-
-<dt><tt>noserve</tt></dt>
-<dd>Deny all packets except <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</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 <tt>ntpdc</tt> control message protocol
- which is intended for use by remote event logging programs.</dd>
-
-<dt><tt>notrust</tt></dt>
-<dd>Deny packets that are not cryptographically authenticated. Note carefully
- how this flag interacts with the <tt>auth</tt> option of the <tt>enable</tt> and <tt>disable</tt> commands.
- If <tt>auth</tt> is enabled, which is the default, authentication is required
- for all packets that might mobilize an association.
- If <tt>auth</tt> is
- disabled, but the <tt>notrust</tt> flag is not present, an association can be
- mobilized whether or not authenticated. If <tt>auth</tt> is disabled, but the <tt>notrust</tt> flag
- is present, authentication is required only for the specified address/mask
- range. </dd>
-
- <dt><tt>ntpport</tt></dt>
- <dt><tt>non-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>Deny packets that do not match the current NTP version.</dd>
- </dl>
-</dd>
-<dd>Default restriction list entries with the flags <tt>ignore, 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 id="discard"><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt></dt>
+ <dd>Set the parameters of the rate control facility which protects the server from client abuse. If the <tt>limited</tt> flag is present in the ACL, packets that violate these limits are discarded. If, in addition, the <tt>kod</tt> flag is present, a kiss-o'-death packet is returned. See the <a href="rate.html">Rate Management</a> page for further information. The options are:
+ <dl>
+ <dt><tt>average <i>avg</i></tt></dt>
+ <dd>Specify the minimum average interpacket spacing (minimum average headway
+ time) in log<sub>2</sub> s with default 3.</dd>
+ <dt><tt>minimum <i>min</i></tt></dt>
+ <dd>Specify the minimum interpacket spacing (guard time) in seconds with default 2.</dd>
+ <dt><tt>monitor</tt></dt>
+ <dd>Specify the probability of being recorded for packets that overflow the MRU list size limit set by <tt>mru maxmem</tt> or <tt>mru maxdepth</tt>. This is a performance optimization for servers with aggregate arrivals of 1000 packets per second or more.</dd>
+ </dl>
+ </dd>
+ <dt id="restrict"><tt>restrict default [<i>flag</i>][...]<br>
+ restrict source [<i>flag</i>][...]<br>
+ restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></dt>
+ <dd>The <tt><i>address</i></tt> 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 name. The <tt><i>mask</i></tt> argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the <tt><i>address</i></tt> is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6 default entries. <tt>restrict source</tt> configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptible, and removed when the association is demobilized.</dd>
+ <dd>Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that 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>flake</tt></dt>
+ <dd>Discard received NTP packets with probability 0.1; that is, on average drop one packet in ten. This is for testing and amusement. The name comes from Bob Braden's <i>flakeway</i>, which once did a similar thing for early Internet testing.</dd>
+ <dt><tt>ignore</tt></dt>
+ <dd>Deny packets of all kinds, including <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
+ <dt><tt>kod</tt></dt>
+ <dd>Send a kiss-o'-death (KoD) packet if the <tt>limited</tt> flag is present and a packet violates the rate limits established by the <tt>discard</tt> command. KoD packets are themselves rate limited for each source address separately. If the <tt>kod</tt> flag is used in a restriction which does not have the <tt>limited</tt> flag, no KoD responses will result.</dd>
+ <dt id="limited"><tt>limited</tt></dt>
+ <dd>Deny time service if the packet violates the rate limits established by the <tt>discard</tt> command. This does not apply to <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</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>mssntp</tt></dt>
+ <dd>Enable Microsoft Windows MS-SNTP authentication using Active Directory services. <span class="style1"><b>Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.</b></span></dd>
+ <dt><tt>nomodify</tt></dt>
+ <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.</dd>
+ <dt><tt>noquery</tt></dt>
+ <dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries. Time service is not affected.</dd>
+ <dt><tt>nopeer</tt></dt>
+ <dd>Deny packets that might mobilize an association unless authenticated. This includes broadcast, symmetric-active and manycast server packets when a configured association does not exist. It also includes <tt>pool</tt> associations, so if you want to use servers from a <tt>pool</tt> directive and also want to use <tt>nopeer</tt> by default, you'll want a <tt>"restrict source ..."</tt> line as well that does <i>not</i> include the <tt>nopeer</tt> directive. Note that this flag does not apply to packets that do not attempt to mobilize an association. </dd>
+ <dt><tt>noserve</tt></dt>
+ <dd>Deny all packets except <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</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 <tt>ntpdc</tt> control message protocol which is intended for use by remote event logging programs.</dd>
+ <dt><tt>notrust</tt></dt>
+ <dd>Deny packets that are not cryptographically authenticated. Note carefully how this flag interacts with the <tt>auth</tt> option of the <tt>enable</tt> and <tt>disable</tt> commands. If <tt>auth</tt> is enabled, which is the default, authentication is required for all packets that might mobilize an association. If <tt>auth</tt> is disabled, but the <tt>notrust</tt> flag is not present, an association can be mobilized whether or not authenticated. If <tt>auth</tt> is disabled, but the <tt>notrust</tt> flag is present, authentication is required only for the specified address/mask range. </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). A restrict line
+ containing <tt>ntpport</tt> is considered more specific than one with the
+ same address and mask, but lacking <tt>ntpport</tt>.</dd>
+ <dt><tt>version</tt></dt>
+ <dd>Deny packets that do not match the current NTP version.</dd>
+ </dl>
+ </dd>
+ <dd>Default restriction list entries with the flags <tt>ignore, 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>
</dl>
-
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
-
</body>
-
-</html> \ No newline at end of file
+</html>
diff --git a/html/assoc.html b/html/assoc.html
index 6bd0d75adda3..8dc0b1bf9c5f 100644
--- a/html/assoc.html
+++ b/html/assoc.html
@@ -1,96 +1,81 @@
<!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="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="61">21:56</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="277">Friday, December 28, 2007</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/config.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="#many">Manycast Mode</a>
- <li class="inline"><a href="#orphan">Orphan Mode</a>
- <li class="inline"><a href="#burst">Burst Options</a>
- </ul>
- <hr>
- <h4 id="modes">Association Modes</h4>
- <p>This page describes the various modes of operation provided in NTPv4. Details about the configuration commands and options are given on the <a href="confopt.html">Configuration Options</a> page. Details about the cryptographic authentication schemes are given on the <a href="authopt.html">Authentication Options</a> page. Details about the automatic server discovery schemes are described on the <a href="manyopt.html">Automatic Server Discovery Schemes</a> page. Additional information is available in the papers, reports, memoranda and briefings on the <a href="http://www.eecis.udel.edu/~mills/ntp.html"> NTP Project</a> page.</p>
- <p>There are three types of associations in NTP: persistent, preemptable and ephemeral. Persistent associations are mobilized by a configuration command and never demobilized. Preemptable associations, which are new to NTPv4, are mobilized by a configuration command which includes the <tt>prempt</tt> option and are demobilized by a &quot;better&quot; server or by timeout, but only if the number of survivors exceeds the threshold set by the <tt>tos maxclock</tt> configuration command. Ephemeral associations are mobilized upon arrival of designated messages and demobilized by timeout.</p>
- <p>Ordinarily, successful mobilization of ephemeral associations requires the server to be cryptographically authenticated to the client. This can be done using either symmetric key or Autokey public key cryptography, as described in the <a href="authopt.html">Authentication Options</a> page.</p>
- <p>There are three principal modes of operation in NTP: client/server, symmetric active/passive and broadcast/multicast. There are three automatic server discovery schemes in NTP: broadcast/multicast, manycast and pool described on the <a href="manyopt.html">Automatic Server Discovery Schemes</a> page. In addition, the orphan mode and burst options described on this page can be used in appropriate cases.</p>
- <p>Following is a summary of the operations in each mode. Note that reference to option applies to the commands described on the <a href="confopt.html">Configuration Options</a> page. See that page for applicability and defaults.</p>
- <h4 id="client">Client/Server Mode</h4>
- <p>Client/server mode is the most common configuration in the Internet today. It operates in the classic remote-procedure-call (RPC) paradigm with stateless servers and stateful clients. In this mode a host sends a client (mode 3) request to the specified server and expects a server (mode 4) reply at some future time. In some contexts this would be described as a &quot;pull&quot; operation, in that the host pulls the time and related values from the server.</p>
- <p>A host is configured in client mode using the <tt>server</tt> (sic) command and specifying the server DNS&nbsp;name or IPv4 or IPv6 address; the server requires no prior configuration. The <tt>iburst</tt> option described later on this page is recommended for clients, as this speeds up initial synchronization from several minutes to several seconds. The <tt>burst</tt> option described later on this page can be useful to reduce jitter on very noisy dial-up or ISDN network links.</p>
- <p>Ordinarily, the program automatically manages the poll interval between the default minimum and maximum values. The <tt>minpoll</tt> and <tt>maxpoll</tt> options can be used to bracket the range. Unless noted otherwise, these options should not be used with reference clock drivers.</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 set
- of secondary (stratum, 2) servers known to be reliable and authentic. Should
- one of the peers lose all reference sources or simply cease operation, the
- other peers will automatically reconfigure so that time and related values
- can flow from the surviving peers to all hosts in the subnet. 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 related values depending on the particular
- configuration.</p>
- <p>In symmetric active mode a peer symmetric active (mode 1) message to a designated peer. If a matching configured symmetric active association is found, the designated peer returns a symmetric active message. If no matching association is found, the designated peer mobilizes a ephemeral symmetric passive association and returns a symmetric passive (mode 2) message. Since an intruder can impersonate a symmetric active peer and cause a spurious symmetric passive association to be mobilized, symmetric passive mode should always be cryptographically validated.</p>
- <p>A peer is configured in symmetric active mode using the <tt>peer</tt> command and specifying the other peer DNS name or IPv4 or IPv6 address. The <tt>burst</tt> and <tt>iburst</tt> options should not be used in symmetric modes, as this can upset the intended symmetry of the protocol and result in spurious duplicate or dropped messages.</p>
- <p>As symmetric modes are most often used as root servers for moderate to large subnets where rapid response is required, it is generally best to set the minimum and maximum poll intervals of each root server to the same value using the <tt>minpoll</tt> and <tt>maxpoll</tt> options.</p>
- <h4 id="broad">Broadcast/Multicast Modes</h4>
- <p>NTP broadcast and multicast modes are intended for configurations involving one or a few servers and a possibly very large client population. Broadcast mode can be used with Ethernet, FDDI and WiFi spans interconnected by hubs or switches. Ordinarily, broadcast packets do not extend beyond a level-3 router. Where service is intended beyond a level-3 router, multicast mode can be used. Additional information is on the <a href="manyopt.html">Automatic NTP Configuration Options</a> page.</p>
- <h4 id="many">Manycast Mode</h4>
- <p>Manycast mode 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 ephemeral 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. Additional information is on the <a href="manyopt.html">Automatic NTP Configuration Options</a> page.</p>
- <h4 id="orphan">Orphan Mode</h4>
- <p>Sometimes an NTP subnet becomes isolated from all UTC sources such as local reference clocks or Internet time servers. In such cases it may be necessary that the subnet servers and clients remain synchronized to a common timescale, not necessarily the UTC timescale. Previously, this function was provided by the local clock driver to simulate a UTC source. A server with this driver could be used to synchronize other hosts in the subnet directly or indirectly.</p>
- <p>There are many disadvantages using the local clock driver, primarily that the subnet is vulnerable to single-point failures and multiple server redundancy is not possible. Orphan mode is intended to replace the local clock driver. It provides a single simulated UTC source with multiple servers and provides seamless switching as servers fail and recover.</p>
- <p>A common configuration for private networks includes one or more core servers operating at the lowest stratum. Good practice is to configure each of these servers as backup for the others using symmetric or broadcast modes. As long as at least one core server can reach a UTC source, the entire subnet can synchronize to it.</p>
- <p>If no UTC sources are available to any core server, one of them can provide a simulated UTC source for all other hosts in the subnet. However, only one core server can simulate the UTC source and all direct dependents, called orphan children, must select the same one, called the orphan parent.</p>
- <p>A host is enabled for orphan mode using the <tt>tos orphan <i>stratum</i></tt> command, where <tt><i>stratum</i></tt> is some stratum less than 16 and greater than any anticipated stratum that might occur with configured Internet time servers. However, sufficient headroom should remain so every subnet host dependent on the orphan children has stratum less than 16. Where no associations for other servers or reference clocks are configured, the orphan stratum can be set to 1. These are the same considerations that guide the local clock driver stratum selection.</p>
- <p>A orphan parent with no sources shows reference ID <font face="Courier New, Courier, Monaco, monospace">LOOP</font>&nbsp;if
- operating at stratum 1 and 127.0.0.1 (Unix loopback address) otherwise.
- While ordinary NTP clients use a selection metric based on delay
- and dispersion, orphan children use a metric computed from the IP
- address of each core server. Each orphan child chooses the orphan
- parent as the root server with the smallest metric.</p>
- <p>For orphan mode to work well, each core server with available sources should operate at the same stratum. All core servers and orphan children should include the same <font face="Courier New, Courier, Monaco, monospace">tos</font> command in the configuration file. Each orphan child should include in the configuration file all root servers.</p>
- <div align-"center">
- <img src="pic/peer.gif" alt="gif">
- </div>
- <p>For example, consider the peer network configuration above, where two or more campus primary or secondary (stratum 2) servers are configured with reference clocks or public Internet primary servers and with each other using symmetric modes. With this configuration a server that loses all sources continues to discipline the system clock using the other servers as backup. Only the core servers and orphan children need to be enabled for orphan mode.</p>
- <div align-"center">
- <img src="pic/broad.gif" alt="gif">
- </div>
- <p>For broadcast networks each core server is configured in both broadcast server and broadcast client modes as shown above. Orphan children operate as broadcast clients of all core servers. As in peer networks, the core servers back up each other and only they and the orphan children need to be enabled for orphan mode.</p>
- <p>In normal operation subnet hosts operate below stratum 5, so the subnet is automatically configured as described in the NTP specification. If all UTC sources are lost, all core servers become orphans and the orphan children will select the same root server to become the orphan parent.</p>
- <h4 id="burst">Burst Options</h4>
- <p>There are two burst options where a single poll event triggers a burst of eight packets at 2-s intervals instead of the normal one packet. They should be used only with the <tt>server</tt> and <tt>pool</tt> commands, but not with reference clock drivers nor symmetric peers. The <tt>burst</tt> option sends a burst when the server is reachable, while the <tt>iburst</tt> option sends a burst when the server is unreachable. Each mode is independently of the other and both can be used at the same time. In either mode the client sends one packet, waits for the reply, then sends the remaining packets in the burst. This may be useful to allow a modem to complete a call.</p>
- <p>In both modes 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 adjusts the system clock as if only a single packet exchange had occurred.</p>
- <p>The <tt>iburst</tt> option is useful where the system clock must be set quickly or when the network attachment requires an initial calling or training sequence. The burst is initiated only when the server first becomes reachable. This improves accuracy with intermittent connections typical of PPP and ISDN services. Outliers due to initial dial-up delays, etc., are avoided and the client sets the clock within a few seconds after the first received packet.</p>
- <p>The <tt>burst</tt> option can be configured in cases of excessive network
- jitter or when the network attachment requires an initial calling or training
- sequence. The burst is initiated at each poll interval when the server is
- reachable. The number of packets in the burst is determined by the poll interval
- so that the average interval between packets is no less than 16. At a poll
- interval of 16 s, only one packet is sent in the burst; at 32 s, two packets
- are sent and so forth until at 128 s and above eight packets are sent.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#modes">Association Modes</a></li>
+ <li class="inline"><a href="#client">Client/Server Mode</a></li>
+ <li class="inline"><a href="#symact">Symmetric Active/Passive Mode</a></li>
+ <li class="inline"><a href="#broad">Broadcast/Multicast Modes</a></li>
+ <li class="inline"><a href="#many">Manycast Mode</a></li>
+ <li class="inline"><a href="#poll">Poll Interval Management</a></li>
+ <li class="inline"><a href="#burst">Burst Options</a></li>
+</ul>
+<hr>
+<h4 id="modes">Association Modes</h4>
+<p>This page describes the various modes of operation provided in NTPv4. There are three types of associations in NTP: <em>persistent</em>, <em>preemptable</em> and <em>ephemeral</em>. Persistent associations are mobilized by a configuration command and never demobilized. Preemptable associations, which are new to NTPv4, are mobilized by a configuration command which includes the <tt>preempt</tt> option or upon arrival of an automatic server discovery packet. They are are demobilized by timeout or when preempted by a &quot;better&quot; server, as described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. Ephemeral associations are mobilized upon arrival of broadcast or multicast server packets and demobilized by timeout.</p>
+<p>Ordinarily, successful mobilization of ephemeral associations requires the server to be cryptographically authenticated to the client. This can be done using either symmetric key or Autokey public key cryptography, as described on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>There are three principal modes of operation in NTP: client/server, symmetric active/passive and broadcast/multicast. There are three automatic server discovery schemes in NTP: broadcast/multicast, manycast and pool described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. In addition, the <a href="#burst">burst options</a> and <a href="orphan.html">orphan mode</a> can be used in appropriate cases.</p>
+<p>Following is a summary of the operations in each mode. Note that reference to option applies to the commands described on the <a href="confopt.html">Server Commands and Options</a> page. See that page for applicability and defaults.</p>
+<h4 id="client">Client/Server Mode</h4>
+<p>Client/server mode is the most common configuration in the Internet today. It operates in the classic remote-procedure-call (RPC) paradigm with stateless servers and stateful clients. In this mode a host sends a client (mode 3) request to the specified server and expects a server (mode 4) reply at some future time. In some contexts this would be described as a &quot;pull&quot; operation, in that the host pulls the time and related values from the server.</p>
+<p>A host is configured in client mode using the <tt>server</tt> (sic) command and specifying the server DNS&nbsp;name or IPv4 or IPv6 address; the server requires no prior configuration. The <tt>iburst</tt> option described later on this page is recommended for clients, as this speeds up initial synchronization from several minutes to several seconds. The <tt>burst</tt> option described later on this page can be useful to reduce jitter on very noisy dial-up or ISDN network links.</p>
+<p>Ordinarily, the program automatically manages the poll interval between the default minimum and maximum values. The <tt>minpoll</tt> and <tt>maxpoll</tt> options can be used to bracket the range. Unless noted otherwise, these options should not be used with reference clock drivers.</p>
+<h4 id="symact">Symmetric Active/Passive Mode</h4>
+<p>Symmetric active/passive mode is intended for configurations where 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 reference clock, or a set
+ of secondary (stratum, 2) servers known to be reliable and authentic. Should
+ one of the peers lose all reference sources or simply cease operation, the
+ other peers will automatically reconfigure so that time and related values
+ can flow from the surviving peers to all hosts in the subnet. 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 related values depending on the particular
+ configuration.</p>
+<p>A symmetric active peer sends a symmetric active (mode 1) message to a designated peer. If a matching configured symmetric active association is found, the designated peer returns a symmetric active message. If no matching association is found, the designated peer mobilizes a ephemeral symmetric passive association and returns a symmetric passive (mode 2) message. Since an intruder can impersonate a symmetric active peer and cause a spurious symmetric passive association to be mobilized, symmetric passive mode should always be cryptographically validated.</p>
+<p>A peer is configured in symmetric active mode using the <tt>peer</tt> command and specifying the other peer DNS name or IPv4 or IPv6 address. The <tt>burst</tt> and <tt>iburst</tt> options should not be used in symmetric modes, as this can upset the intended symmetry of the protocol and result in spurious duplicate or dropped messages.</p>
+<p>As symmetric modes are most often used as root servers for moderate to large subnets where rapid response is required, it is generally best to set the minimum and maximum poll intervals of each root server to the same value using the <tt>minpoll</tt> and <tt>maxpoll</tt> options.</p>
+<h4 id="broad">Broadcast/Multicast Modes</h4>
+<p>NTP broadcast and multicast modes are intended for configurations involving one or a few servers and a possibly very large client population. Broadcast mode can be used with Ethernet, FDDI and WiFi spans interconnected by hubs or switches. Ordinarily, broadcast packets do not extend beyond a level-3 router. Where service is intended beyond a level-3 router, multicast mode can be used. Additional information is on the <a href="discover.html">Automatic NTP Configuration Options</a> page.</p>
+<p>A server is configured to send broadcast or multicast messages using the <tt>broadcast</tt> command and specifying the subnet address for broadcast or the multicast group address for multicast. A broadcast client is enabled using the <a href="confopt.html#broadcastclient"><tt>broadcastclient</tt></a> command, while a multicast client is enabled using the <a href="confopt.html#multicastclient"><tt>multicastclient</tt></a> command and specifying the multicast group address. Multiple commands of either type can be used. However, the association is not mobilized until the first broadcast or multicast message is actually received.</p>
+<h4 id="many">Manycast and Pool Modes</h4>
+<p>Manycast and pool modes are automatic discovery and configuration paradigms new to NTPv4. They are intended as a means for a client to troll the nearby network neighborhood to find cooperating willing 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 client mobilizes ephemeral client associations with some number of the &quot;best&quot; of the nearby servers, yet automatically reconfigures to sustain this number of servers should one or another fail. Additional information is on the <a href="discover.html">Automatic Server Discovery Schemes</a> page.</p>
+<h4 id="poll">Poll Interval Management</h4>
+<p>NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When <tt>ntpd</tt> starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead. Additional information about the algorithm is on the <a href="poll.html">Poll Program</a> page.</p>
+<p>The default poll interval range is suitable for most conditions, but can be changed using options on the <a href="confopt.html">Server Commands and Options</a> and <a href="miscopt.html">Miscellaneous Options</a> pages. However, when using maximum intervals much larger than the default, the residual clock frequency error must be small enough for the discipline loop to capture and correct. The capture range is 500 PPM with a 64-s interval decreasing by a factor of two for each interval doubling. At a 36-hr interval, for example, the capture range is only 0.24 PPM.</p>
+<p>In the NTPv4 specification and reference implementation, the poll interval is expressed in log<sub>2</sub> units, properly called the <em>poll exponent.</em> It is constrained by the lower limit <tt>minpoll</tt> and upper limit <tt>maxpoll</tt> options of the <a href="confopt.html"><tt>server</tt></a> command. The limits default to 6 (64 s) and 10 (1024 s), respectively, which are appropriate for the vast majority of cases.</p>
+<p>As a rule of thumb, the expected errors increase by a factor of two as the poll interval increases by a factor of four. The poll interval algorithm slowly increases the poll interval when jitter dominates the error budget, but quickly reduces the interval when wander dominates it. More information about this algorithm is on the <a href="warp.html">How NTP Works</a> page.</p>
+<p>There is normally no need to change the poll limits, as the poll interval is managed automatically as a function of prevailing jitter and wander. The most common exceptions are the following.</p>
+<ul>
+ <li>With fast, lightly loaded LANs and modern processors, the nominal Allan intercept is about 500 s. In these cases the expected errors can be further reduced using a poll exponent of 4 (16 s). In the case of the pulse-per-second (PPS) driver, this is the recommended value.</li>
+ <li>With symmetric modes the most stable behavior results when both peers are configured in symmetric active mode with matching poll intervals of 6 (64 s).</li>
+ <li>The poll interval should not be modified for reference clocks, with the single exception the ACTS telephone modem driver. In this case the recommended minimum and maximum intervals are 12 (1.1 hr) and 17 (36 hr), respectively.</li>
+</ul>
+<h4 id="burst">Burst Options</h4>
+<p>Occasionally it is necessary to send packets temporarily at intervals less than the poll interval. For instance, with the <tt>burst</tt> and <tt>iburst</tt> options of the <a href="confopt.html"><tt>server</tt></a> command, the poll program sends a burst of several packets at 2-s intervals. In either case the poll program avoids sending needless packets if the server is not responding. The client begins a burst with a single packet. When the first packet is received from the server, the client continues with the remaining packets in the burst. If the first packet is not received within 64 s, it will be sent again for two additional retries before beginning backoff. The result is to minimize network load if the server is not responding. Additional details are on the <a href="poll.html">Poll Program</a> page.</p>
+<p>There are two burst options where a single poll event triggers a burst. They should be used only with the <tt>server</tt> and <tt>pool</tt> commands, but not with reference clock drivers nor symmetric mode peers. In both modes, 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 adjusts the system clock as if only a single packet exchange had occurred.</p>
+<p>The <tt>iburst</tt> option is useful where the system clock must be set quickly or when the network attachment requires an initial calling or training sequence, as in PPP or ISDN services. In general, this option is recommended for <tt>server</tt> and <tt>pool</tt> commands. A burst is sent only when the server is unreachable; in particular, when first starting up. Ordinarily, the clock is set within a few seconds after the first received packet. See the <a href="clock.html">Clock State Machine</a> page for further details about the startup behavior.</p>
+<p>The <tt>burst</tt> option is useful in cases of severe network
+ jitter or when the network attachment requires an initial calling or training
+ sequence. This option is recommended when the minimum poll exponent is larger than 10 (1024 s). A burst is sent only when the server is reachable. The number of packets in the burst is determined by the poll interval
+ so that the average interval between packets (headway) is no less than the minimum poll interval for the association.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/audio.html b/html/audio.html
index 76bdd566ec9c..908cac824c33 100644
--- a/html/audio.html
+++ b/html/audio.html
@@ -1,181 +1,180 @@
<!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="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="61">00:48</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Saturday, November 24, 2007</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/audio.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, modeled 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 IRIG&nbsp;and WWV 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 WWV driver. The largest error observed so far is about 60 PPM, but it is possible some sound cards or codecs may exceed that value. In any case, the configuration file command <tt>tinker codec</tt> command can be used to change the systematic offset in units of 125 PPM.</p>
- <p>The drivers include provisions to select the input port and to monitor the input signal. The <tt>fudge flag 2</tt> command 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> command 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 nighttime 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 began at the minimum in late 2006 and should reach its peak in 2012.</ul>
- <p>The best way to choose a frequency is to listen at various times over the day and determine the highest (daytime) and lowest (nighttime) frequencies that work well. Choose the frequency that works for the most number of hours in the day, usually the highest frequency. For instance, on the east coast the best compromise CHU frequency is 7335 kHz and the best WWV frequency is 15 MHz.</p>
- <h4>Autotune Modes</h4>
- <p>The shortwave drivers include support for an optional autotune function compatible with ICOM&nbsp;receivers and transceivers. 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. 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. 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>706</td>
- <td>0x4e</td>
- <td>78</td>
- <td>775</td>
- <td>0x46</td>
- <td>70</td>
- </tr>
- <tr>
- <td>706MKIIG</td>
- <td>0x58</td>
- <td>88</td>
- <td>781</td>
- <td>0x26</td>
- <td>38</td>
- </tr>
- <tr>
- <td>725</td>
- <td>0x28</td>
- <td>40</td>
- <td>970</td>
- <td>0x2e</td>
- <td>46</td>
- </tr>
- <tr>
- <td>726</td>
- <td>0x30</td>
- <td>48</td>
- <td>7000</td>
- <td>0x70</td>
- <td>113</td>
- </tr>
- <tr>
- <td>735</td>
- <td>0x04</td>
- <td>4</td>
- <td>R71</td>
- <td>0x1A</td>
- <td>26</td>
- </tr>
- <tr>
- <td>746</td>
- <td>0x66</td>
- <td>102</td>
- <td>R72</td>
- <td>0x32</td>
- <td>50</td>
- </tr>
- <tr>
- <td>751</td>
- <td>0x1c</td>
- <td>28</td>
- <td>R75</td>
- <td>0x5a</td>
- <td>90</td>
- </tr>
- <tr>
- <td>756PROII</td>
- <td>0x64</td>
- <td>100</td>
- <td>R7000</td>
- <td>0x08</td>
- <td>8</td>
- </tr>
- <tr>
- <td>761</td>
- <td>0x1e</td>
- <td>30</td>
- <td>R7100</td>
- <td>0x34</td>
- <td>52</td>
- </tr>
- <tr>
- <td>765</td>
- <td>0x2c</td>
- <td>44</td>
- <td>R8500</td>
- <td>0x4a</td>
- <td>74</td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- <td></td>
- <td>R9000</td>
- <td>0x2a</td>
- <td>42</td>
- </tr>
- </table>
- <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 microphone-level signal not affected
- by the volume control. These signals can be connected to the microphone port
- on the computer. 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 the signal is designed to
- drive a cable terminated with a 50-ohm resistor, which results in a level
- the line-in port can handle..</p>
- <p>It is very easy to underdriven 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 noise and interference. Note that the monitor
- 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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#sound">Sound Card Drivers</a></li>
+ <li class="inline"><a href="#short">Shortwave Radio Drivers</a></li>
+ <li class="inline"><a href="#setup">Setup and Debugging Aids</a></li>
+</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, modeled 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 IRIG&nbsp;and WWV 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 WWV driver. The largest error observed so far is about 60 PPM, but it is possible some sound cards or codecs may exceed that value. In any case, the configuration file command <tt>tinker codec</tt> command can be used to change the systematic offset in units of 125 PPM.</p>
+<p>The drivers include provisions to select the input port and to monitor the input signal. The <tt>fudge flag 2</tt> command 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> command 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>
+ <li>Transitions between daytime and nighttime 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 began at the minimum in late 2006 and should reach its peak in 2012.</li>
+</ul>
+<p>The best way to choose a frequency is to listen at various times over the day and determine the highest (daytime) and lowest (nighttime) frequencies that work well. Choose the frequency that works for the most number of hours in the day, usually the highest frequency. For instance, on the east coast the best compromise CHU frequency is 7335 kHz and the best WWV frequency is 15 MHz.</p>
+<h4>Autotune Modes</h4>
+<p>The shortwave drivers include support for an optional autotune function compatible with ICOM&nbsp;receivers and transceivers. 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. 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. 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>706</td>
+ <td>0x4e</td>
+ <td>78</td>
+ <td>775</td>
+ <td>0x46</td>
+ <td>70</td>
+ </tr>
+ <tr>
+ <td>706MKIIG</td>
+ <td>0x58</td>
+ <td>88</td>
+ <td>781</td>
+ <td>0x26</td>
+ <td>38</td>
+ </tr>
+ <tr>
+ <td>725</td>
+ <td>0x28</td>
+ <td>40</td>
+ <td>970</td>
+ <td>0x2e</td>
+ <td>46</td>
+ </tr>
+ <tr>
+ <td>726</td>
+ <td>0x30</td>
+ <td>48</td>
+ <td>7000</td>
+ <td>0x70</td>
+ <td>113</td>
+ </tr>
+ <tr>
+ <td>735</td>
+ <td>0x04</td>
+ <td>4</td>
+ <td>R71</td>
+ <td>0x1A</td>
+ <td>26</td>
+ </tr>
+ <tr>
+ <td>746</td>
+ <td>0x66</td>
+ <td>102</td>
+ <td>R72</td>
+ <td>0x32</td>
+ <td>50</td>
+ </tr>
+ <tr>
+ <td>751</td>
+ <td>0x1c</td>
+ <td>28</td>
+ <td>R75</td>
+ <td>0x5a</td>
+ <td>90</td>
+ </tr>
+ <tr>
+ <td>756PROII</td>
+ <td>0x64</td>
+ <td>100</td>
+ <td>R7000</td>
+ <td>0x08</td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>761</td>
+ <td>0x1e</td>
+ <td>30</td>
+ <td>R7100</td>
+ <td>0x34</td>
+ <td>52</td>
+ </tr>
+ <tr>
+ <td>765</td>
+ <td>0x2c</td>
+ <td>44</td>
+ <td>R8500</td>
+ <td>0x4a</td>
+ <td>74</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>R9000</td>
+ <td>0x2a</td>
+ <td>42</td>
+ </tr>
+</table>
+<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 microphone-level signal not affected
+ by the volume control. These signals can be connected to the microphone port
+ on the computer. 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 the signal is designed to
+ drive a cable terminated with a 50-ohm resistor, which results in a level
+ the line-in port can handle..</p>
+<p>It is very easy to underdriven 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 noise and interference. Note that the monitor
+ 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>
diff --git a/html/authentic.html b/html/authentic.html
new file mode 100644
index 000000000000..ecfb466af907
--- /dev/null
+++ b/html/authentic.html
@@ -0,0 +1,65 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Authentication Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+.style1 {color: #FF0000}
+-->
+</style>
+</head>
+<body>
+<h3>Authentication Support</h3>
+<img src="pic/alice44.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>Our resident cryptographer; now you see him, now you don't.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#auth">Introduction</a></li>
+ <li class="inline"><a href="#symm">Symmetric Key Cryptography</a></li>
+ <li class="inline"><a href="#windows">Microsoft Windows Authentication</a></li>
+ <li class="inline"><a href="#pub">Public Key Cryptography</a></li>
+</ul>
+<hr>
+<h4 id="auth">Introduction</h4>
+<p>This page describes the various cryptographic authentication provisions in NTPv4. Authentication support allows the NTP client to verify that servers are in fact known and trusted and not intruders intending accidentally or intentionally to masquerade as a legitimate server. A detailed discussion of the NTP multi-layer security model and vulnerability analysis is in the white paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP Security Analysis</a>.</p>
+<p> The NTPv3 specification (RFC-1305) defined an authentication scheme properly described as <em>symmetric key cryptography</em>. It used the Data Encryption Standard (DES) algorithm operating in cipher-block chaining (CBC) mode. Subsequently, this algorithm was replaced by the RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5. Either algorithm computes a message digest or one-way hash which can be used to verify the client has the same message digest as the server. The MD5 message digest algorithm is included in the distribution, so without further cryptographic support, the distribution can be freely exported.</p>
+<p>If the OpenSSL cryptographic library is installed prior to building the distribution, all message digest algorithms included in the library may be used, including SHA and SHA1. However, if conformance to FIPS 140-2 is required, only a limited subset of these algorithms can be used. 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>In addition to the symmetric key algorithms, this distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey Specification&quot;. This support is available only if the OpenSSL library has been installed and the <tt>--enable-autokey</tt> option is used when the distribution is built.</p>
+<p> Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on private and public values which are generated by each participant and where the private value is never revealed. Autokey uses X.509 public certificates, which can be produced by commercial services, the OpenSSL application program, or the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in the NTP software distribution.</p>
+<p>Note that according to US law, NTP binaries including OpenSSL library components, including the OpenSSL library itself, cannot be exported outside the US without license from the US Department of Commerce. Builders outside the US are advised to obtain the OpenSSL library directly from OpenSSL, which is outside the US, and build outside the US.</p>
+<p>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> option of the <tt>server</tt> configuration command, as described in the <a href="confopt.html">Server Options</a> page. The <a href="keygen.html">ntp-keygen</a> page describes the files required for the various authentication schemes. 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>
+<p>By default, the client sends non-authenticated packets and the server responds with non-authenticated packets. If the client sends authenticated packets, the server responds with authenticated packets if correct, or a crypto-NAK packet if not.. In the case of unsolicited packets which might consume significant resources, such as broadcast or symmetric mode packets, , authentication is required, unless overridden by a <tt>disable auth</tt> command. In the current climate of targeted broadcast or &quot;letterbomb&quot; attacks, defeating this requirement would be decidedly dangerous. In any case, the <tt>notrust </tt>flag, described on the <a href="authopt.html">Access Control Options</a> page, can be used to disable access to all but correctly authenticated clients..</p>
+<h4 id="symm">Symmetric Key Cryptography</h4>
+<p>The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,534 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.</p>
+<p>The message digest is a cryptographic hash computed by an algorithm such as MD5 or SHA. When authentication is specified, a message authentication code (MAC) is appended to the NTP packet header. The MAC consists of a 32-bit key identifier (key ID) followed by a 128- or 160-bit message digest. The algorithm computes the digest as the hash of a 128- or 160- bit message digest key concatenated with the NTP packet header fields with the exception of the MAC. On transmit, the message digest is computed and inserted in the MAC. On receive, the message digest is computed and compared with the MAC. The packet is accepted only if the two MACs are identical. If a discrepancy is found by the client, the client ignores the packet, but raises an alarm. If this happens at the server, the server returns a special message called a <em>crypto-NAK</em>. Since the crypto-NAK is protected by the loopback test, an intruder cannot disrupt the protocol by sending a bogus crypto-NAK.</p>
+<p>Keys and related information are specified in a keys file, 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. Ordinarily, the <tt>ntp.keys</tt> file is generated by the <tt><a href="keygen.html">ntp-keygen</a></tt> program, but it can be constructed and edited using an ordinary text editor.</p>
+<p> Each line of the keys file consists of three fields: a key ID in the range 1 to 65,534, inclusive, a key type, and a message digest key consisting of a printable ASCII string less than 40 characters, or a 40-character hex digit string. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.</p>
+<div align="center">
+ <p><img src="pic/sx5.gif" alt="gif"></p>
+ <p>Figure 1. Typical Symmetric Key File</p>
+</div>
+<p>Figure 1 shows a typical keys file used by the reference implementation when the OpenSSL library is installed. In this figure, for key IDs in he range 1-10, the key is interpreted as a printable ASCII string. For key IDs in the range 11-20, the key is a 40-character hex digit string. The key is truncated or zero-filled internally to either 128 or 160 bits, depending on the key type. The line can be edited later or new lines can be added to change any field. The key can be change to a password, such as <tt>2late4Me</tt> for key ID 10. Note that two or more keys files can be combined in any order as long as the key IDs are distinct.</p>
+<p>When <tt>ntpd</tt> is started, it reads the keys file specified by the <tt>keys</tt> command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trustedkey</tt> configuration command before use. This allows, for instance, the installation of possibly several batches of keys and then activating a key remotely using <tt>ntpq</tt> or <tt>ntpdc</tt>. The <tt>requestkey</tt> command selects the key ID used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key ID used as the password for the <tt>ntpq</tt> utility.</p>
+<h4 id="windows">Microsoft Windows Authentication</h4>
+<p>In addition to the above means, <tt>ntpd</tt> now supports Microsoft Windows MS-SNTP authentication using Active Directory services. This support was contributed by the Samba Team and is still in development. It is enabled using the <tt>mssntp</tt> flag of the <tt>restrict</tt> command described on the <a href="accopt.html#restrict">Access Control Options</a> page. <span class="style1">Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.</span></p>
+<h4 id="pub">Public Key Cryptography</h4>
+<p>See the <a href="autokey.html">Autokey Public-Key Authentication</a> page.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/authopt.html b/html/authopt.html
index dfb880c155e3..9504deb8ad69 100644
--- a/html/authopt.html
+++ b/html/authopt.html
@@ -1,493 +1,95 @@
<!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="HTML Tidy, see www.w3.org">
-<title>Authentication Options</title>
+<title>Authentication Commands and Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
-<!--
-.style1 { color: #FF0000;
+.style1 {
+ color: #FF0000;
font-weight: bold;
}
--->
</style>
</head>
-
<body>
-<h3>Authentication Options</h3>
+<h3>Authentication Commands and Options</h3>
<img src="pic/alice44.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>Our resident cryptographer; now you see him, now you don't.</p>
-
-<p>Last update:
- <!-- #BeginDate format:En2m -->14-Apr-2010 20:49<!-- #EndDate -->
-UTC</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->15-Oct-2011 01:00<!-- #EndDate -->
+ UTC</p>
<br clear="left">
-
<h4>Related Links</h4>
-
<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
-
-<h4>Table of Contents</h4>
-
-<ul>
-<li class="inline"><a href="#auth">Introduction</a></li>
-<li class="inline"><a href="#symm">Symmetric Key Cryptography</a></li>
-<li class="inline"><a href="#pub">Public Key Cryptography</a></li>
-<li class="inline"><a href="#group">NTP Secure Groups</a></li>
-<li class="inline"><a href="#ident">Identity Schemes and Cryptotypes</a></li>
-<li class="inline"><a href="#cfg">Configuration</a></li>
-<li class="inline"><a href="#exam">Examples</a></li>
-<li class="inline"><a href="#cmd">Authentication Commands</a></li>
-<li class="inline"><a href="#err">Error Codes</a></li>
-<li class="inline"><a href="#file">Files</a></li>
-</ul>
-
<hr>
-
-<h4 id="auth">Introduction</h4>
-
-<p>This page describes the various cryptographic authentication provisions in
- NTPv4. Details about the configuration commands and options are given on
- the <a href="confopt.html">Configuration
- Options</a> page. Details about the automatic server discovery schemes are described
- on the <a href="manyopt.html">Automatic Server Discovery Schemes</a> page. Additional
- information is available in the papers, reports, memoranda and briefings
- cited on the <a href="http://www.eecis.udel.edu/~mills/ntp.html"> NTP Project</a> page.
- Authentication support allows the NTP client to verify that servers are in
- fact known and trusted and not intruders intending accidentally or intentionally
- to masquerade as a legitimate server.</p>
-
-<p> The NTPv3 specification RFC-1305 defines a scheme properly described as
- symmetric key cryptography. It uses the Data Encryption Standard (DES)
- algorithm operating in cipher-block chaining (CBC) mode. Subsequently, this
- scheme was replaced by the RSA Message Digest 5 (MD5) algorithm commonly
- called keyed-MD5. Either algorithm computes a message digest or one-way hash
- which can be used to verify the client has the same key and key identifier
- as the server. If the OpenSSL cryptographic library is installed, support
- is available for all algorithms included in the library. Note however, if
- conformance to FIPS 140-2 is required, only a limited subset of these algorithms
- is available.</p>
-
-<p>NTPv4 includes the NTPv3 scheme
- and optionally a new scheme based on public key cryptography and called
- Autokey. Public key cryptography is generally considered more secure than
- symmetric key cryptography, since the security is based on private and public
- values which are generated by each participant and where the private value
- is never revealed. Autokey uses X.509 public certificates, which can be produced
- by commercial services, utility programs in the OpenSSL software library
- or the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility
- program in the NTP software distribution.</p>
-
-<p>While the algorithms for MD5 symmetric key cryptography are included in the
- NTPv4 software distribution, modern algorithms for symmetric key and public
- key cryptograpny requires the OpenSSL software library
- to be installed before building the NTP distribution. 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>Note that according to US law, NTP binaries including OpenSSL library components,
- including the OpenSSL library itself, cannot be exported outside the
- US without license from the US Department of Commerce. Builders outside the
- US are advised to obtain the OpenSSL library directly from OpenSSL, which
- is outside the US, and build outside the US.</p>
-
-<p>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> option of the <tt>server</tt> configuration command, as described in the <a href="confopt.html">Server Options</a> page, and the options described on this page. The <a href="keygen.html">ntp-keygen</a> page describes the files required for the various authentication schemes. 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>
-
-<p>The original RFC-1305 specification allows any one of possibly 65,534 keys
- (excluding zero), each distinguished by a 32-bit key ID, to authenticate
- an association. The servers and clients involved must agree on the key, key
- ID and key type to authenticate NTP packets. If an NTP packet includes a
- message authentication code (MAC), consisting of a key ID and message digest,
- it is accepted only if the key ID matches a trusted key and the message digest
- is verified with this key. Note that for historic reasons the message digest
- algorithm is not consistent with RFC-1828. The digest is computed directly
- from the concatenation of the key string followed by the packet contents
- with the exception of the MAC itself.</p>
-
-<p>Keys and related information are specified in a keys 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. Ordinarily, the <tt>ntp.keys</tt> file is generated by the <tt><a href="keygen.html">ntp-keygen</a></tt> program,
- but it can be constructed and edited using an ordinary text editor. The
- program generates pseudo-random keys, one key for each line. Each line consists
- of three fields, the key identifier as a decimal number from 1 to 65534 inclusive,
- a key type chosen from the keywords of the <tt>digest</tt> option of the <tt>crypto</tt> command,
- and a 20-character printable ASCII string or a 40-character hex string as
- the key itself.</p>
-
-<p>When <tt>ntpd</tt> is first started, it reads the key file specified by the <tt>keys</tt> command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trustedkey</tt> configuration command before use. This allows, for instance, the installation of possibly several batches of keys and then activating a key remotely using <tt>ntpdc</tt>. The <tt>requestkey</tt> command selects the key ID used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key ID used as the password for the <tt>ntpq</tt> utility.</p>
-<p>By default, the message digest algorithm is MD5 selected by the key type
- <tt>M</tt> in the keys file. However, if the OpenSSL library is installed,
- any message digest algorithm supported by that library can be used. The key
- type is selected as the algorithm name given in the OpenSSL documentation.
- The key type is associated with the key and can be different for different
- keys. The server and client
- must share the same key, key ID and key type and both must be trusted. Note
- that if conformance to FIPS 140-2 is required, the message digest algorithm
- must conform to the Secure Hash Standard (SHS), which requires an algorithm
- from the Secure Hash Algorithm (SHA) family, and the digital signature encryption
- algorithm, if used, must conform to the Digital Signature Standard (DSS),
- which requires the Digital Signature Algorithm (DSA).</p>
-<p>In addition to the above means, <tt>ntpd</tt> now supports
- Microsoft Windows MS-SNTP authentication using Active Directory services.
- This support was contributed by the Samba Team and is still in development.
- It is enabled using the <tt>mssntp</tt> flag
- of the <tt>restrict</tt> command described on
- the <a href="authopt.html">Access Control Options</a> page. <span class="style1">Note:
- Potential users should be aware that these services involve a TCP connection
- to another process that could potentially block, denying services to other
- users. Therefore, this flag should be used only for a dedicated server with
- no clients other than MS-SNTP.</span></p>
-<h4 id="pub">Public Key Cryptography</h4>
-
-<p>NTPv4 supports the Autokey security protocol, which is based on public key cryptography. The Autokey Version 2 protocol described on the <a href="http://www.eecis.udel.edu/%7emills/proto.html">Autokey Protocol</a> page verifies packet integrity using MD5 message digests and verifies the source using 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">Autokey Identity Schemes</a> page are based on cryptographic challenge/response exchanges. These schemes provide strong security against replay with or without message modification, spoofing, masquerade and most forms of clogging attacks. 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>Autokey authenticates individual packets using cookies bound to the IP source and destination addresses. The cookies must have the same addresses 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 servers are operated outside firewall perimeters.</p>
-
-<p>There are three timeouts associated with the Autokey scheme. The key list timeout, which defaults to about 1.1 h, specifies the interval between generating new key lists. The revoke timeout, which defaults to about 36 h, specifies the interval between generating new private values. The restart timeout, with default about 5 d, specifies the interval between protocol restarts to refresh public values. In general, the behavior when these timeouts expire is not affected by the issues discussed on this page.</p>
-
-<h4 id="group">NTP Secure Groups</h4>
-
-<p>NTP secure groups are used to define cryptographic compartments and security
- hierarchies. All hosts belonging to a secure group have the same group name
- but different host names. The string specified in the <tt>host</tt> option of
- the <tt>crypto</tt> command is the name of the host and the name used in the
- host key, sign key and certificate files. The string specified in the <tt>ident</tt> option
- of the <tt>crypto</tt> command is the group name of all group hosts and the
- name used in the identity files. The file naming conventions are described on
- the <a href="keygen.html">ntp-keygen</a> page.</p>
-
-<p>Each group includes one or more trusted hosts (THs) operating at the root, or lowest stratum in the group. The group name is used in the subject and issuer fields of the TH self-signed trusted certificate for these hosts. The host name is used in the subject and issuer fields of the self-signed certificates for all other hosts.</p>
-
-<p>All group hosts are configured to provide an unbroken path, called a certificate trail, from each host, possibly via intermediate hosts and ending at a TH. When a host starts up, it recursively retrieves the certificates along the trail in order to verify group membership and avoid masquerade and middleman attacks.</p>
-
-<p>Secure groups can be configured as hierarchies where a TH of one group can be a client of one or more other groups operating at a lower stratum. A certificate trail consist of a chain of hosts starting at a client, leading through secondary servers of progressively lower stratum and ending at a TH. In one scenario, groups RED and GREEN can be cryptographically distinct, but both be clients of group BLUE operating at a lower stratum. In another scenario, group CYAN can be a client of multiple groups YELLOW and MAGENTA, both operating at a lower stratum. There are many other scenarios, but all must be configured to include only acyclic certificate trails.</p>
-
-<h4 id="ident">Identity Schemes and Cryptotypes</h4>
-
-<p>All configurations include a public/private host key pair and matching certificate. Absent an identity scheme, this is a Trusted Certificate (TC) scheme. There are three identity schemes, IFF, GQ and MV described on the <a href="http://www.eecis.udel.edu/%7emills/ident.html">Identity Schemes</a> page. With these schemes all servers in the group have encrypted server identity keys, while clients have nonencrypted client identity parameters. The client parameters can be obtained from a trusted agent (TA), usually one of the THs of the lower stratum group. Further information on identity schemes is on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page.</p>
-
-<p>A specific combination of authentication and identity schemes is called a
- cryptotype, which applies to clients and servers separately. A group can be
- configured using more than one cryptotype combination, although not all combinations
- are interoperable. Note however that some cryptotype combinations may successfully
- intemperate with each other, but may not represent good security practice. The
- server and client cryptotypes are defined by the the following codes.</p>
-
+<h4>Commands and Options</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="authentic.html">Authentication Support</a> page.</p>
<dl>
-<dt>NONE</dt>
-<dd>A client or server is type NONE if authentication is not available or not configured. Packets exchanged between client and server have no MAC.</dd>
-
-<dt>AUTH</dt>
-<dd>A client or server is type AUTH&nbsp;if the <tt>key</tt> option is specified with the <tt>server</tt> configuration command and the client and server keys are compatible. Packets exchanged between clients and servers have a MAC.</dd>
-
-<dt>PC</dt>
-<dd>A client or server is type PC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and private certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
-
-<dt>TC</dt>
-<dd>A client or server is type TC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and public certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
-
-<dt>IDENT</dt>
- <dd>A client or server is type IDENT if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key, public certificate and identity scheme files are present. Packets exchanged between clients and servers have a MAC.</dd>
-
-</dl>
-
-<p>The compatible cryptotypes for clients and servers are listed in the following table.</p>
-
-<table width="100%" border="1" cellpadding="4">
-
-<tr>
-<td align="center">Client/Server</td>
-<td align="center">NONE</td>
-<td align="center">AUTH</td>
-<td align="center">PC</td>
-<td align="center">TC</td>
-<td align="center">IDENT</td>
-</tr>
-
-<tr>
-<td align="center">NONE</td>
-<td align="center">yes</td>
-<td align="center">yes*</td>
-<td align="center">yes*</td>
-<td align="center">yes*</td>
-<td align="center">yes*</td>
-</tr>
-
-<tr>
-<td align="center">AUTH</td>
-<td align="center">no</td>
-<td align="center">yes</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">no</td>
-</tr>
-
-<tr>
-<td align="center">PC</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">yes</td>
-<td align="center">no</td>
-<td align="center">no</td>
-</tr>
-
-<tr>
-<td align="center">TC</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">yes</td>
-<td align="center">yes</td>
-</tr>
-
-<tr>
-<td align="center">IDENT</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">no</td>
-<td align="center">yes</td>
-</tr>
-
-</table>
-
-<p>* These combinations are not valid if the restriction list includes the <tt>notrust</tt> option.</p>
-
-<h4 id="cfg">Configuration</h4>
-
-<p>Autokey has an intimidating number of configuration options, most of which are not necessary in typical scenarios. The simplest scenario consists of a TH where the host name of the TH is also the name of the group. For the simplest identity scheme TC, the TH generates host key and trusted certificate files using the <tt>ntp-keygen -T</tt> command, while the remaining group hosts use the same command with no options to generate the host key and public certificate files. All hosts use the <tt>crypto</tt> configuration command with no options. Configuration with passwords is described in the <a href="keygen.html">ntp-keygen</a> page. All group hosts are configured as an acyclic tree with root the TH.</p>
-
-<p>When an identity scheme is included, for example IFF, the TH generates host
- key, trusted certificate and private server identity key files using the <tt>ntp-keygen
- -T -I -i <i>group</i></tt> command, where <tt><i>group</i></tt> is the group
- name. The remaining group hosts use the same command as above. All hosts
- use the <tt>crypto ident group<i></i></tt> configuration command.</p>
-
-<p>Hosts with no dependent clients can retrieve client parameter files from an
- archive or web page. The <tt>ntp-keygen</tt> can export these data using the <tt>-e</tt> option.
- Hosts with dependent clients other than the TH must retrieve copies of the server
- key files using secure means. The <tt>ntp-keygen</tt> can export these data
- using the <tt>-q</tt> option. In either case the data are installed as a file
- and then renamed using the name given as the first line in the file, but without
- the filestamp.</p>
-
-<h4 id="exam">Examples</h4>
-
-<div align="center">
-<img src="pic/group.gif" alt="gif">
-</div>
-
-<p>Consider a scenario involving three secure groups RED, GREEN and BLUE. RED and BLUE are typical of national laboratories providing certified time to the Internet at large. As shown ion the figure, RED TH mort and BLUE TH macabre run NTP symmetric mode with each other for monitoring or backup. For the purpose of illustration, assume both THs are primary servers. GREEN is typical of a large university providing certified time to the campus community. GREEN TH howland is a broadcast client of both RED and BLUE. BLUE uses the IFF scheme, while both RED and GREEN use the GQ scheme, but with different keys. YELLOW is a client of GREEN and for purposes of illustration a TH for YELLOW.</p>
-
-<p>The BLUE TH macabre uses configuration commands</p>
-
-<p><tt>crypto pw qqsv ident blue</tt><br>
-<tt>peer mort autokey</tt><br>
-<tt>broadcast <i>address</i> autokey</tt></p>
-
-<p>where <tt>qqsv</tt> is the password for macabre files and <i>address</i> is the broadcast address for the local LAN. It generates BLUE files using the commands</p>
-
-<p><tt>ntp-keygen -p qqsv -T -G -i blue</tt><br>
-<tt>ntp-keygen -p qqsv -e &gt;ntpkey_gqpar_blue</tt></p>
-
-<p>The first line generates the host, trusted certificate and private GQ server keys file. The second generates the public GQ client parameters file, which can have any nonconflicting mnemonic name.</p>
-
-<p>The RED TH mort uses configuration commands</p>
-
-<p><tt>crypto pw xxx ident red</tt><br>
-<tt>peer macabre autokey</tt><br>
-<tt>broadcast <i>address</i> autokey</tt></p>
-
-<p>where <tt>xxx</tt> is the password for mort files. It generates RED files using the commands</p>
-
-<p><tt>ntp-keygen -p xxx -T -I -i red</tt><br>
-<tt>ntp-keygen -p xxx -e &gt;ntpkey_iffpar_red</tt></p>
-
-<p> The GREEN TH howland uses configuration commands</p>
-
-<p><tt>crypto pw yyy ident green</tt><br>
-<tt>broadcastclient</tt></p>
-
-<p>where <tt>yyy</tt> is the password for howland files. It generates GREEN files using the commands</p>
-
-<p><tt>ntp-keygen -p yyy -T -G -i green</tt><br>
-<tt>ntp-keygen -p yyy -e &gt;ntpkey_gqpar_green</tt><br>
-<tt>ntp-keygen -p yyy -q zzz &gt;zzz_ntpkey_gqkey_green</tt></p>
-
-<p>The first two lines serve the same purpose as the preceding examples. The
- third line generates a copy of the private GREEN server file for use on another
- server in the same group, say YELLOW, but encrypted with the <tt>zzz</tt> password.</p>
-
-<p>A client of GREEN, for example YELLOW, uses the configuration commands</p>
-
-<p><tt>crypto pw abc ident green</tt><br>
-<tt>server howland autokey</tt></p>
-
-<p>where <tt>abc</tt> is the password for its files. It generates files using the command</p>
-
-<p><tt>ntp-keygen -p abc</tt></p>
-
-<p>The client retrieves the client file for that group from a public archive or web page using nonsecure means. In addition, each server in a group retrieves the private server keys file from the TH of that group, but it is encrypted and so must be sent using secure means. The files are installed in the keys directory with name taken from the first line in the file, but without the filestamp.</p>
-
-<p>Note that if servers of different groups, in this case RED and BLUE, share the same broadcast media, each server must have client files for all groups other than its own, while each client must have client files for all groups. Note also that this scenario is for illustration only and probably would not be wise for practical use, as if one of the TH reference clocks fails, the certificate trail becomes cyclic. In such cases the symmetric path between RED and BLUE, each in a different group, would not be a good idea.</p>
-
-<h4 id="cmd">Authentication Commands</h4>
-
-<dl>
-
-<dt id=automax><tt>automax [<i>logsec</i>]</tt></dt>
-<dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds. Note that the size of the key list for each association depends on this interval and the current poll interval. The default interval is 12 (about 1.1 h). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent.</dd>
-
-<dt id="controlkey"><tt>controlkey <i>keyid</i></tt></dt>
-<dd>Specifies the key ID to use with the <a
+ <dt id=automax><tt>automax [<i>logsec</i>]</tt></dt>
+ <dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds. Note that the size of the key list for each association depends on this interval and the current poll interval. The default interval is 12 (about 1.1 hr). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information.</dd>
+ <dt id="controlkey"><tt>controlkey <i>keyid</i></tt></dt>
+ <dd>Specifies the key ID for the <a
href="ntpq.html"><tt>ntpq</tt></a> utility, which uses the
- standard protocol defined in RFC-1305. The <tt><i>keyid</i></tt>
- argument is the key ID for a <a href="#trustedkey">trusted
- key</a>, where the value can be in the range 1 to 65534,
- inclusive.</dd>
-
-<dt id="crypto"><tt>crypto [randfile <i>file</i>] [host <i>name</i>] [ident <i>name</i>] [pw <i>password</i>]</tt></dt>
-<dd>This command requires the OpenSSL library. It activates public key cryptography
- and loads the required host key and public certificate. If one or more files
- are left unspecified, the default names are used as described below. 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> configuration
- command or default <tt>/usr/local/etc</tt>. Following are the options.</dd>
-
-<dd><dl>
-
-<dt><tt>digest</tt> <tt>MD2</tt> | <tt>MD4</tt> | <tt>MD5</tt> | <tt>MDC2</tt> | <tt>RIPEMD160</tt> | <tt>SHA</tt> | <tt>SHA1</tt></dt>
-<dd>Specify the message digest algorithm, with default MD5. If the OpenSSL library
- is installed, <tt><i>name</i></tt> can be be any message digest algorithm supported
- by the library not exceeding 160 bits in length. However, all Autokey
- participants in an Autokey subnet must use the same algorithm. Note that
- the Autokey message digest algorithm is separate and distinct form the symmetric
- key message digest algorithms. Note: If compliance with FIPS 140-2 is required,
- the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>.</dd>
-
-<dt><tt>host <i>name</i></tt></dt>
-<dd>Specifies the string used when constructing the names for the host, sign
- and certificate files generated by the <tt>ntp-keygen</tt> program with the <tt>-s <i>name</i></tt> option.</dd>
-
-<dt><tt>ident <i>name</i></tt></dt>
-<dd>Specifies the string used in constructing the identity files generated by the <tt>ntp-keygen</tt> program with the <tt>-i <i>name</i></tt> option.</dd>
-
-<dt><tt>pw <i>password</i></tt></dt>
-<dd>Specifies the password to decrypt files previously encrypted by the <tt>ntp-keygen</tt> program with the <tt>-p</tt> option.</dd>
-
-<dt><tt>randfile <i>file</i></tt></dt>
-<dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described on the <tt>ntp-keygen</tt> page.</dd>
-
-</dl></dd>
-
-<dt id="keys"><tt>keys <i>keyfile</i></tt></dt>
-<dd>Specifies the complete path to the MD5 key file containing the keys and key IDs 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. Note that the directory path for Autokey media is specified by the <tt>keysdir</tt> command.</dd>
-
-<dt id="keysdir"><tt>keysdir <i>path</i></tt>K</dt>
-<dd>This command specifies the default directory path for Autokey cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>. Note that the path for the symmetric keys file is specified by the <tt>keys</tt> command.</dd>
-
-<dt id="requestkey"><tt>requestkey <i>keyid</i></tt></dt>
-<dd>Specifies the key ID 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>keyid</i></tt> argument is a key ID
- for a <a href="#trustedkey">trusted key</a>, in the range 1 to
- 65534, inclusive.</dd>
-
-<dt id="revoke"><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; however, updating some values is a relatively expensive operation. The default interval is 17 (about 36 h). For poll intervals above the specified interval, the values will be updated for every message sent.</dd>
-
-<dt id="trustedkey"><tt>trustedkey [<i>keyid</i> | (<i>lowid</i> ... <i>highid</i>)] [...]</tt></dt>
-<dd>Specifies the key ID(s) which are trusted for the purposes of
- authenticating peers with symmetric key cryptography. Key IDs
- used to authenticate <tt>ntpq</tt> and <tt>ntpdc</tt> operations
- must be listed here and additionally be enabled with
- <a href="#controlkey">controlkey</a> and/or
- <a href="#requestkey">requestkey</a>. The authentication
- procedure for time transfer require that both the local and
- remote NTP servers employ the same key ID and secret for this
- purpose, although different keys IDs may be used with different
- servers. Ranges of trusted key IDs may be specified:
- "<tt>trustedkey (1 ... 19) 1000 (100 ... 199)</tt>" enables the
- lowest 120 key IDs which start with the digit 1. The spaces
- surrounding the ellipsis are required when specifying a range.</dd>
-</dl>
-
-<h4 id="err">Error Codes</h4>
-
-<p>Errors can occur due to mismatched configurations, unexpected protocol restarts, expired certificates and unfriendly people. In most cases the protocol state machine recovers automatically by retransmission, timeout and restart, where necessary. Some errors are due to mismatched keys, digest schemes or identity schemes and must be corrected by installing the correct media and/or correcting the configuration file. One of the most common errors is expired certificates, which must be regenerated and signed at least once per year using the <a href="keygen.html"><tt>ntp-keygen</tt> - generate public and private keys</a> program.</p>
-
-<p>The following error codes are reported via the NTP control and monitoring protocol trap mechanism and to the <tt>cryptostats</tt> monitoring file if configured.</p>
-
-<dl>
-
-<dt>101 bad field format or length</dt>
-<dd>The packet has invalid version, length or format.</dd>
-
-<dt>102 bad timestamp</dt>
-<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.</dd>
-
-<dt>103 bad filestamp</dt>
-<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.</dd>
-
-<dt>104 bad or missing public key</dt>
-<dd>The public key is missing, has incorrect format or is an unsupported type.</dd>
-
-<dt>105 unsupported digest type</dt>
-<dd>The server requires an unsupported digest/signature scheme.</dd>
-
-<dt>106 unsupported identity type</dt>
-<dd>The client or server has requested an identity scheme the other does not support.</dd>
-
-<dt>107 bad signature length</dt>
-<dd>The signature length does not match the current public key.</dd>
-
-<dt>108 signature not verified</dt>
-<dd>The message fails the signature check. It could be bogus or signed by a different private key.</dd>
-
-<dt>109 certificate not verified</dt>
-<dd>The certificate is invalid or signed with the wrong key.</dd>
-
-<dt>110 host certificate expired</dt>
-<dd>The old server certificate has expired.</dd>
-
-<dt>111 bad or missing cookie</dt>
-<dd>The cookie is missing, corrupted or bogus.</dd>
-
-<dt>112 bad or missing leapseconds table</dt>
-<dd>The leapseconds table is missing, corrupted or bogus.</dd>
-
-<dt>113 bad or missing certificate</dt>
-<dd>The certificate is missing, corrupted or bogus.</dd>
-
-<dt>114 bad or missing group key</dt>
-<dd>The identity key is missing, corrupt or bogus.</dd>
-
-<dt>115 protocol error</dt>
-<dd>The protocol state machine has wedged due to unexpected restart.</dd>
-
+ standard protocol defined in RFC-1305. The <tt><i>keyid</i></tt> argument is the key ID for a <a href="#trustedkey">trusted
+ key</a>, where the value can be in the range 1 to 65534,
+ inclusive.</dd>
+ <dt id="crypto"><tt>crypto [digest</tt> <em><tt>digest</tt></em><tt>]</tt> <tt>[host <i>name</i>] [ident <i>name</i>] [pw <i>password</i>] [randfile <i>file</i>]</tt></dt>
+ <dd>This command activates the Autokey public key cryptography
+ and loads the required host keys and certificate. If one or more files
+ are unspecified, the default names are used. 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> configuration
+ command with default <tt>/usr/local/etc</tt>. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information. Following are the options.</dd>
+ <dd>
+ <dl>
+ <dt><tt>digest</tt> <em><tt>digest</tt></em></dt>
+ <dd>&nbsp;</dd>
+ <dd>Specify the message digest algorithm, with default MD5. If the OpenSSL library
+ is installed, <tt><i>digest</i></tt> can be be any message digest algorithm supported
+ by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5,</tt> <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>. All
+ participants in an Autokey subnet must use the same algorithm. The Autokey message digest algorithm is separate and distinct from the symmetric
+ key message digest algorithm. Note: If compliance with FIPS 140-2 is required,
+ the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>.</dd>
+ <dt><tt>host <i>name</i></tt></dt>
+ <dd>Specify the cryptographic media names for the host, sign and certificate files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
+ <dt><tt>ident <i>group</i></tt></dt>
+ <dd>Specify the cryptographic media names for the identity scheme files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
+ <dt><tt>pw <i>password</i></tt></dt>
+ <dd>Specifies the password to decrypt files previously encrypted by the <tt>ntp-keygen</tt> program with the <tt>-p</tt> option. If this option is not specified, the default password is the string returned by the Unix <tt>gethostname()</tt> routine. </dd>
+ <dt><tt>randfile <i>file</i></tt></dt>
+ <dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
+ </dl>
+ </dd>
+ <dt id="ident"><tt>ident <i>group</i></tt></dt>
+ <dd>Specifies the group name for ephemeral associations mobilized by broadcast and symmetric passive modes. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt id="keys"><tt>keys <i>path</i></tt></dt>
+ <dd>Specifies the complete directory path for the key file containing the key IDs, key types and keys used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. The format of the keyfile is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>. This is the same operation as the <tt>-k</tt> command line option. Note that the directory path for Autokey cryptographic media is specified by the <tt>keysdir</tt> command.</dd>
+ <dt id="keysdir"><tt>keysdir <i>path</i></tt></dt>
+ <dd>Specifies the complete directory path for the Autokey cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>. Note that the path for the symmetric keys file is specified by the <tt>keys</tt> command.</dd>
+ <dt id="requestkey"><tt>requestkey <i>keyid</i></tt></dt>
+ <dd>Specifies the key ID for 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>keyid</i></tt> argument is a key ID
+ for a <a href="#trustedkey">trusted key</a>, in the range 1 to
+ 65534, inclusive.</dd>
+ <dt id="revoke"><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, with default 17 (36 hr). See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt id="trustedkey"><tt>trustedkey [<i>keyid</i> | (<i>lowid</i> ... <i>highid</i>)] [...]</tt></dt>
+ <dd>Specifies the key ID(s) which are trusted for the purposes of
+ authenticating peers with symmetric key cryptography. Key IDs
+ used to authenticate <tt>ntpq</tt> and <tt>ntpdc</tt> operations
+ must be listed here and additionally be enabled with <a href="#controlkey">controlkey</a> and/or <a href="#requestkey">requestkey</a>. The authentication
+ procedure for time transfer requires that both the local and
+ remote NTP servers employ the same key ID and secret for this
+ purpose, although different keys IDs may be used with different
+ servers. Ranges of trusted key IDs may be specified: <tt>trustedkey (1 ... 19) 1000 (100 ... 199)</tt> enables the
+ lowest 120 key IDs which start with the digit 1. The spaces
+ surrounding the ellipsis are required when specifying a range.</dd>
</dl>
-
-<h4 id="file">Files</h4>
-
-<p>See the <a href="keygen.html"><tt>ntp-keygen</tt></a> page. Note that provisions to load leap second values from the NIST files have been removed. These provisions are now available whether or not the OpenSSL library is available. However, the functions that can download these values from servers remains available.</p>
-
<hr>
-
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
-
</body>
-
-</html> \ No newline at end of file
+</html>
diff --git a/html/autokey.html b/html/autokey.html
new file mode 100644
index 000000000000..ba220e6562ea
--- /dev/null
+++ b/html/autokey.html
@@ -0,0 +1,215 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Autokey Public-Key Authentication</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+.style1 {
+ color: #FF0000
+}
+-->
+</style>
+</head>
+<body>
+<h3>Autokey Public-Key Authentication</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->3-Oct-2011 21:51<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#subnet">Autokey Subnets</a></li>
+ <li class="inline"><a href="#names">Subnet Group Names's</a></li>
+ <li class="inline"><a href="#secure">Secure Groups</a></li>
+ <li class="inline"><a href="#cfg">Configuration - Authentication Schemes</a></li>
+ <li class="inline"><a href="#scfg">Configuration - Identity Schemes</a></li>
+ <li class="inline"><a href="#ident">Identity Schemes and Cryptotypes</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>This distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey Specification&quot;. This support is available only if the OpenSSL library has been installed and the <tt>--enable-autokey</tt> option is specified when the distribution is built.</p>
+<p> Public key cryptography is generally considered more secure than symmetric key cryptography. Symmetric key cryptography is based on a shared secret key which must be distributed by secure means to all participants. Public key cryptography is based on a private secret key known only to the originator and a public key known to all participants. A recipient can verify the originator has the correct private key using the public key and any of several digital signature algorithms.</p>
+<p>The Autokey Version 2 protocol described on the <a href="http://www.eecis.udel.edu/%7emills/proto.html">Autokey Protocol</a> page verifies packet integrity using message digest algorithms, such as MD5 or SHA, and verifies the source using digital signature schemes, such as RSA or DSA. As used in Autokey, message digests are exceptionally difficult to cryptanalyze, as the keys are used only once.</p>
+<p> Optional identity schemes described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page are based on cryptographic challenge/response exchanges. Optional identity schemes provide strong security against masquerade and most forms of clogging attacks. These schemes are exceptionally difficult to cryptanalyze, as the challenge/response exchange data are used only once. They 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>Autokey authenticates individual packets using cookies bound to the IP source and destination addresses. The cookies must have the same IP addresses 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 servers and clients are operated outside firewall perimeters.</p>
+<p>Autokey is designed to authenticate servers to clients, not the other way around as in SSH. An Autokey server can support an authentication scheme such as the Trusted Certificate (TC) scheme described in RFC 5906, while a client is free to choose between the various options. It is important to understand that these provisions are optional and that selection of which option is at the discretion of the client. If the client does not require authentication, it is free to ignore it, even if some other client of the same server elects to participate in either symmetric key or public key cryptography.</p>
+<p> Autokey uses industry standard X.509 public certificates, which can be produced by commercial services, utility programs in the OpenSSL software library, and the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in the NTP software distribution. A certificate includes the subject name of the client, the issuer name of the server, the public key of the client and the time period over which the the public and private keys are valid. All Autokey hosts have a self-signed certificate with the Autokey name as both the subject and issuer. During the protocol, additional certificates are produced with the Autokey host name as subject and the host that signs the certificate as issuer.</p>
+<p>There are two timeouts associated with the Autokey scheme. The <em>key list timeout</em> is set by the <tt>automax</tt> command, which specifies the interval between generating new key lists by the client or server. The default timeout of about 1.1 hr is appropriate for the majority of configurations and ordinarily should not be changed. The <em>revoke timeout</em> is set by the <tt>revoke</tt> command, which specifies the interval between generating new server private values. It is intended to reduce the vulnerability to cryptanalysis; however, new values require the server to encrypt each client cookie separately. The default timeout of about 36 hr is appropriate for most servers, but might be too short for national time servers.</p>
+<h4 id="subnet">Autokey Subnets</h4>
+<p> An Autokey subnet consists of a collection of hosts configured as an acyclic, directed tree with roots one or more trusted hosts (THs) operating at the lowest stratum of the subnet. Note that the requirement that the NTP subnet be acyclic means that, if two hosts are configured with each other in symmetric modes, each must be a TH. The THs are synchronized directly or indirectly to national time services via trusted means, such as radio, satellite or telephone modem, or one or more trusted agents (TAs) of a parent subnet. NTP subnets can be nested, with the THs of a child subnet configured for one or more TAs of a parent subnet. The TAs can serve one or more child subnets, each with its own security policy and set of THs.</p>
+<p>A certificate trail is a sequence of certificates, each signed by a host one step closer to the THs and terminating at the self-signed certificate of a TH. The requirement that the subnet be acyclic means certificate trails can never loop. NTP servers operate as certificate authorities (CAs) to sign certificates provided by their clients. The CAs include the TAs of the parent subnet and those subnet servers with dependent clients.</p>
+<p> In order for the signature to succeed, the client certificate valid period must begin within the valid period of the server certificate. If the server period begins later than the client period, the client certificate has expired; if the client period begins later than the server period, the server certificate has expired.</p>
+<p>The Autokey protocol runs for each association separately, During the protocol, the client recursively obtains the certificates on the trail to a TH, saving each in a cache ordered from most recent to oldest. If an expired certificate is found, it is invalidated and marked for later replacement. As the client certificate itself is not involved in the certificate trail, it can only be declared valid or expired when the server signs it. </p>
+<p>The certificates derived from each association are combined in the cache with duplicates suppressed. If it happens that two different associations contribute certificates to the cache, a certificate on the trail from one association could expire before any on another trail. In this case the remaining trails will survive until the expired certificate is replaced. Once saved in the cache, a certificate remains valid until it expires or is replaced by a new one.</p>
+<p> It is important to note that the certificate trail is validated only at startup when an association is mobilized. Once validated in this way, the server remains valid until it is demobilized, even if certificates on the trail to the THs expire. While the certificate trail authenticates each host on the trail to the THs, it does not validate the time values themselves. Ultimately, this is determined by the NTP on-wire protocol.</p>
+<p>Example</p>
+<div align="center"><img src="pic/flt8.gif" alt="gif">
+ <p>Figure 1. Example Configuration</p>
+</div>
+<p>Figure 1 shows an example configuration with three NTP subnets, Alice, Helen and Carol. Alice and Helen are parent groups for Carol with TA C belonging to Alice and TA S belonging to Helen. Hosts A and B are THs of Alice, host R is the TH of Helen and host X is the TH of Carol. Assume that all associations are client/server, child subnet TH X has two mobilized associations, one to Alice TA host C and the other to Carol TA host S. While not shown in the figure, Alice hosts A and B could configure symmetric mode associations between them for redundancy and backup.</p>
+<p>Note that host D certificate trail is D&rarr;C&rarr;A or D&rarr;C&rarr;B, depending on the particular order the trails are built. Host Y certificate trail is only Y&rarr;X, since X is a TH. Host X has two certificate trails X&rarr;C&rarr;A or X&rarr;C&rarr;B, and X&rarr;S&rarr;R.</p>
+<h4 id="names">Subnet Group Names</h4>
+<p>In some configurations where more than one subnet shares an Ethernet or when multiple subnets exist in a manycast or pool configuration, it is useful to isolate one subnet from another. In Autokey this can be done using group names. An Autokey host name is specified by the <tt>-s</tt><tt><em> host</em>@<em>group</em></tt> option of the <tt>ntp-keygen</tt> program, where <em><tt>host</tt></em> is the host name and <em><tt>group</tt></em> is the group name. If <em><tt>host</tt></em> is omitted, the name defaults to the string returned by the Unix <tt>gethostname()</tt> routine, ordinarily the DNS name of the host. Thus, for host <tt>beauregard.udel.edu</tt> the option <tt>-s @red</tt> specifies the Autokey host name <tt>beauegard.udel.edu@red</tt>.</p>
+<p>A subnet host with a given group name will discard ASSOC packets from all subnets with a different group name. This effectively disables the Autokey protocol without additional packet overhead. For instance, one or more manycast or pool servers will not respond to ASSOC packets from subnets with difference group names. Groups sharing an Ethernet will be filtered in the same way.</p>
+<p>However, as shown in Figure 1, there are configurations where a TH of one group needs to listen to a TA of a different group. This is accomplished using the <tt>ident <em>group</em></tt> option of the <tt>crypto</tt> command and/or the <tt>ident <em>group</em></tt> option of the <tt>server</tt> command. The former case applies to all hosts sharing a common broadcast, manycast or symmetric passive modes, while the latter case applies to each individual client/server or symmetric active mode association. In either case the host listens to the specified group name in addition to the group name specified in the <tt>-s</tt> option of the <tt>ntp-keygen</tt> program.</p>
+<h4 id="secure">Secure Groups</h4>
+<p>NTP security groups are an extension of the NTP subnets described in the previous section. They include in addition to certificate trails one or another identity schemes described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page. NTP secure groups are used to define cryptographic compartments and security
+ hierarchies. The identity scheme insures that the server is authentic and not victim of masquerade by an intruder acting as a middleman.</p>
+<p> An NTP secure group is an NTP subnet configured as an acyclic tree rooted on the THs. The THs are at the lowest stratum of the secure group. They run an identity exchange with the TAs of parent subnets All group hosts construct an unbroken certificate trail from each host, possibly via intermediate hosts, and ending at a TH of that group. The TH verifies authenticity with the TA of the parent subnet using an identity exchange.</p>
+<div align="center"><img src="pic/flt9.gif" alt="gif">
+ <p>Figure 2. Identify Scheme</p>
+</div>
+<p>The identity exchange is run between a TA acting as a server and a TH acting as a client. As shown in Figure 2, the identity exchange involves a challenge-response protocol where a client generates a nonce and sends it to the server. The server performs a mathematical operation involving a second nonce and the secret group key, and sends the result along with a hash to the client. The client performs a another mathematical operation and verifies the result with the hash.</p>
+<p> Since each exchange involves two nonces, even after repeated observations of many exchanges, an intruder cannot learn the secret group key. It is this quality that allows the secret group key to persist long after the longest period of certificate validity. In the Schnorr (Identify Friend or Foe - IFF) scheme, the secret group key is not divulged to the clients, so they cannot conspire to prove identity to other hosts.</p>
+<p>As described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page, there are five identity schemes, three of which - IFF, GQ and MV - require identity files specific to each scheme. There are two types of files for each scheme, an encrypted server keys file and a nonencrypted client keys file, also called the parameters file, which usually contains a subset of the keys file.</p>
+<p> Figure 2 shows how keys and parameters are distributed to servers and clients. A TA constructs the encrypted keys file and the nonencrypted parameters file. Hosts with no dependent clients can retrieve client parameter files from an
+ archive or web page. The <tt>ntp-keygen</tt> program can export parameter files using the <tt>-e</tt> option. By convention, the file name is the name of the secure group and must match the <tt>ident</tt> option of the <tt>crypto</tt> command or the <tt>ident</tt> option of the <tt>server</tt> command.</p>
+<p> When more than one TH Is involved in the secure group, it is convenient for the TAs and THs to use the same encrypted key files. To do this, one of the parent TAs includes the <tt>-i <em>group</em></tt> option on the <tt>ntp-keygen</tt> command line, where <em><tt>group</tt></em> is the name of the child secure group. The <tt>ntp-keygen</tt> program can export server keys files using the <tt>-q</tt> option and a chosen remote password. The files are installed on the TAs and then renamed using the name given as the first line in the file, but without the filestamp. The secure group name must match the <tt>ident</tt> option for all TAs.</p>
+<dl>
+ <dd><span class="style1">In the latest Autokey version, the host name and group name are independent of each other and the <tt>host</tt> option of the <tt>crypto</tt> command is deprecated. When compatibility with older versions is required, specify the same name for both the <tt>-s</tt> and <tt>-i</tt> options.</span></dd>
+</dl>
+<p>In special circumstances the Autokey message digest algorithm can be changed using the <tt>digest</tt> option of the <tt>crypto</tt> command. The digest algorithm is separate and distinct from the symmetric
+ key message digest algorithm. If compliance with FIPS 140-2 is required,
+ the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>. The Autokey message digest algorithm must be the same for all participants in the NTP subnet.</p>
+<p>Example</p>
+<p>Returning to the example of Figure 1, Alice, Helen and Carol run run the Trusted Certificate (TC) scheme, internally, as the environment is secure and without threat from external attack, in particular a middleman masquerade. However, TH X of Carol is vulnerable to masquerade on the links between X and C and between X and S. Therefore, both parent subnet TAs C and S run an identity exchange with child subnet TH X. Both have the same encrypted keys file and X the common parameters file.</p>
+<h4 id="cfg">Configuration - Authentication Schemes</h4>
+<p>Autokey has an intimidating number of options, most of which are not necessary in typical scenarios. However, the Trusted Certificate (TC) scheme is recommended for national NTP time services, such as those operated by NIST and USNO. Configuration for TC is very simple.</p>
+<p> Referring to Figure 1, for each TH, A, B, R and X, as root:</p>
+<p><tt># cd /usr/local/etc<br>
+ # ntp-keygen -T</tt></p>
+<p>and for the other hosts the same commands without the <tt>-T</tt> option. This generates an RSA private/public host key file and a self-signed certificate file for the RSA digital signature algorithm with the MD5 message digest algorithm. For the THs a trusted certificate is generated; for the others a nontreusted certificate is generated. Include in the <tt>ntp.conf</tt> configuration file for all hosts other than the primary servers, A, B and R, something like</p>
+<p><tt> # server <em>host</em> autokey<br>
+ # crypto<br>
+ # driftfile /etc/ntp.drift</tt></p>
+<p>where <em><tt>host</tt></em> is the selected server name as shown in the figure. Servers A, B and R are configured for local reference clocks or trusted remoter servers as required.</p>
+<p>In the above configuration examples, the default host name is the string returned by the Unix <tt>gethostname()</tt> routine, ordinarily the DNS name of the host. This name is used as the subject and issuer names on the certificate, as well as the default password for the encrypted keys file. The host name can be changed using the <tt>-s</tt> option of the <tt>ntp-keygen</tt> program. The default password can be changed using the <tt>-p</tt> option of the <tt>ntp-keygen</tt> program and the <tt>pw</tt> option of the <tt>crypto</tt> configuration command.</p>
+<p>Group names can be added to this configuration by including the <tt>-s <em>host</em>@<em>group</em></tt> option with the <tt>ntp-keygen</tt> program. For the purpose of illustration, the <tt><em>host</em></tt> string is empty, signifying the default host name. For example, @<tt>yellow</tt> can be used for the Alice group, @<tt>orange</tt> for the Helen group and @<tt>blue</tt> for the Carol group. In addition, for TH X the <tt>ident yellow</tt> option should be added to the <tt>server</tt> command for the Alice group and the <tt>ident orange</tt> option should be added to the <tt>server</tt> command for the Helen group.</p>
+<h4 id="scfg">Configuration - Identity Schemes</h4>
+<p> The example in this section uses the IFF identity scheme, but others, including GQ and MV, can be used as well. It's best to start with a functioning TC configuration and add commands as necessary. We start with the subnets of Figure 1 configured as in the previous section. Recall that the parent subnet TA for Alice is C and for Helen is S. Each of the TAs generates an encrypted server keys file and nonencrypted client parameters file for the IFF identity scheme using the <tt>-I</tt> option of the <tt>ntp-keygen</tt> program. Note the TAs are not necessarily trusted hosts, so may not need the <tt>-T</tt> option.</p>
+<p>The nonencrypted client parameters can be exported using the command</p>
+<p><tt>ntp-keygen -e &gt;<i>file</i></tt>,</p>
+<p>where the <tt>-e</tt> option redirects the client parameters to <em><tt>file</tt></em> via the standard output stream for a mail application or stored locally for later distribution to one or more THs. In a similar fashion the encrypted keys file can be exported using the command</p>
+<p><tt>ntp-keygen -q <em>passw2</em> &gt;<i>file</i></tt>,</p>
+<p>where <em><tt>passwd2</tt></em> is the read password for another TA. We won't need this file here.</p>
+<p> While the file names used for the exported files are arbitrary, it is common practice to use the name given as the first line in the file with the filestamp suppressed. Thus, the nonencryted parameters file from each TA is copied to X with this name.</p>
+<p>To complete the configuration, the TH includes the client parameters file name in the <tt>ident</tt> option of the the <tt>server</tt> command for the TA association</p>
+<p><tt>server 1.2.3.4 ident <em>group</em>,</tt></p>
+<p> where <em><tt>group</tt></em> is the file name given above. </p>
+<h4 id="ident">Identity Schemes and Cryptotypes</h4>
+<p>A specific combination of authentication and identity schemes is called a <em>cryptotype</em>, which applies to clients and servers separately. A group can be configured using more than one cryptotype combination, although not all combinations are interoperable. Note however that some cryptotype combinations may successfully intemperate with each other, but may not represent good security practice. The server and client cryptotypes are defined by the the following codes.</p>
+<dl>
+ <dt>NONE</dt>
+ <dd>A client or server is type NONE if authentication is not available or not configured. Packets exchanged between client and server have no MAC.</dd>
+ <dt>AUTH</dt>
+ <dd>A client or server is type AUTH&nbsp;if the <tt>key</tt> option is specified with the <tt>server</tt> configuration command and the client and server keys are compatible. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>PC</dt>
+ <dd>A client or server is type PC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and private certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>TC</dt>
+ <dd>A client or server is type TC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and public certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>IDENT</dt>
+ <dd>A client or server is type IDENT if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key, public certificate and identity scheme files are present. Packets exchanged between clients and servers have a MAC.</dd>
+</dl>
+<p>The compatible cryptotypes for clients and servers are listed in the following table.</p>
+<table width="100%" border="1" cellpadding="4">
+ <tr>
+ <td rowspan="2" align="center">Client</td>
+ <td colspan="5" align="center">Server</td>
+ </tr>
+ <tr>
+ <td align="center">NONE</td>
+ <td align="center">AUTH</td>
+ <td align="center">PC</td>
+ <td align="center">TC</td>
+ <td align="center">IDENT</td>
+ </tr>
+ <tr>
+ <td align="center">NONE</td>
+ <td align="center">yes</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ </tr>
+ <tr>
+ <td align="center">AUTH</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ </tr>
+ <tr>
+ <td align="center">PC</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ </tr>
+ <tr>
+ <td align="center">TC</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">yes</td>
+ </tr>
+ <tr>
+ <td align="center">IDENT</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ </tr>
+</table>
+<p>* These combinations are not valid if the restriction list includes the <tt>notrust</tt> option.</p>
+<h4 id="err">Error Codes</h4>
+<p>Errors can occur due to mismatched configurations, unexpected protocol restarts, expired certificates and unfriendly people. In most cases the protocol state machine recovers automatically by retransmission, timeout and restart, where necessary. Some errors are due to mismatched keys, digest schemes or identity schemes and must be corrected by installing the correct media and/or correcting the configuration file. One of the most common errors is expired certificates, which must be regenerated and signed at least once per year using the <a href="keygen.html"><tt>ntp-keygen</tt> - generate public and private keys</a> program.</p>
+<p>The following error codes are reported via the NTP control and monitoring protocol trap mechanism and to the <tt>cryptostats</tt> monitoring file if configured.</p>
+<dl>
+ <dt>101 bad field format or length</dt>
+ <dd>The packet has invalid version, length or format.</dd>
+ <dt>102 bad timestamp</dt>
+ <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.</dd>
+ <dt>103 bad filestamp</dt>
+ <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.</dd>
+ <dt>104 bad or missing public key</dt>
+ <dd>The public key is missing, has incorrect format or is an unsupported type.</dd>
+ <dt>105 unsupported digest type</dt>
+ <dd>The server requires an unsupported digest/signature scheme.</dd>
+ <dt>106 unsupported identity type</dt>
+ <dd>The client or server has requested an identity scheme the other does not support.</dd>
+ <dt>107 bad signature length</dt>
+ <dd>The signature length does not match the current public key.</dd>
+ <dt>108 signature not verified</dt>
+ <dd>The message fails the signature check. It could be bogus or signed by a different private key.</dd>
+ <dt>109 certificate not verified</dt>
+ <dd>The certificate is invalid or signed with the wrong key.</dd>
+ <dt>110 host certificate expired</dt>
+ <dd>The old server certificate has expired.</dd>
+ <dt>111 bad or missing cookie</dt>
+ <dd>The cookie is missing, corrupted or bogus.</dd>
+ <dt>112 bad or missing leapseconds table</dt>
+ <dd>The leapseconds table is missing, corrupted or bogus.</dd>
+ <dt>113 bad or missing certificate</dt>
+ <dd>The certificate is missing, corrupted or bogus.</dd>
+ <dt>114 bad or missing group key</dt>
+ <dd>The identity key is missing, corrupt or bogus.</dd>
+ <dt>115 protocol error</dt>
+ <dd>The protocol state machine has wedged due to unexpected restart.</dd>
+</dl>
+<h4 id="files">Files</h4>
+<p>See the <a href="keygen.html"><tt>ntp-keygen</tt></a> page. Note that provisions to load leap second values from the NIST files have been removed. These provisions are now available whether or not the OpenSSL library is available. However, the functions that can download these values from servers remains available.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/bugs.html b/html/bugs.html
index 2129db2df554..7be6a4c11118 100644
--- a/html/bugs.html
+++ b/html/bugs.html
@@ -1,32 +1,27 @@
<!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="HTML Tidy, see www.w3.org">
- <title>NTP Bug Reporting Procedures</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>NTP Bug Reporting Procedures</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="61">04:05</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- .<br clear="left">
- <hr>
- <h4> Security Bug Reporting Procedures</h4>
- <p>If you find or suspect a security related program bug in this distribution, please send a report to <a href="mailto:security@ntp.org">security@ntp.org</a>. Please do not contact developers directly.</p>
- <h4>Non-Security Bug Reporting Procedures</h4>
- <p>If you find or suspect a non-security related program bug in this distribution, please send a report to the NTP Public Service Project Bug Tracking System (Bugzilla) at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a>. Bugs reported this way are immediately forwarded to the developers. Please do not contact the developers directly.</p>
- <p>If you find or suspect an error in the program documentation pages, please
- send a report directly to the editor David Mills at <a href="mailto:mills@udel.edu">mills@udel.edu</a>.
- The master documentation pages are not controlled by the bug tracking system.
- You are invited to contribute new or revised pages in similar style and format.</p>
- <p>If you wish to send a report via electronic mail, please remember that your report will be held until one of our volunteers enters it in Bugzilla. The email address for these reports is <a href="mailto:bugs@ntp.org">bugs@ntp.org</a>. You will need to register at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a> so that you may participate directly in any e-mail discussion regarding your report.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Bug Reporting Procedures</title>
+<!-- Changed by: Harlan &, 23-Aug-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Bug Reporting Procedures</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:
+ <!-- #BeginDate format:En2m -->23-Aug-2014 05:32<!-- #EndDate -->
+UTC</p>
+.<br clear="left">
+<hr>
+<h4> Security Bug Reporting Procedures</h4>
+<p>If you find or suspect a security related program bug in this distribution, please send a report to <a href="mailto:security@ntp.org">security@ntp.org</a>. Please do not contact developers directly.</p>
+<h4>Non-Security Bug Reporting Procedures</h4>
+<p>If you find or suspect a non-security related program or documentation bug in this distribution, please send a report to the NTP Public Service Project Bug Tracking System (Bugzilla) at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a>. Bugs reported this way are immediately forwarded to the developers. Please do not contact the developers directly.</p>
+<p>If you wish to send a report via electronic mail, please remember that your report will be held until one of our volunteers enters it in Bugzilla. The email address for these reports is <a href="mailto:bugs@ntp.org">bugs@ntp.org</a>. You will need to register at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a> to participate directly in any e-mail discussion regarding your report. If you don't register and we have questions for you we won't be able to make progress on fixing your problem. Please directly register on and use our Bugzilla instance to report issues.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/build.html b/html/build.html
index d0f1fe31fc3e..9683b291f41a 100644
--- a/html/build.html
+++ b/html/build.html
@@ -1,59 +1,57 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=windows-1252">
- <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="61">16:45</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/install.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 for Unix</a>
- <li class="inline"><a href="#win">Building and Installing for Windows</a>
- <li class="inline"><a href="#conf">Configuration</a>
- <li class="inline"><a href="#prob">If You Have Problems</a>
- <li class="inline"><a href="#make">Additional <tt>make</tt> Commands</a>
- </ul>
- <hr>
- <h4 id="build">Building and Installing the Distribution</h4>
- <p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> 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> pages.</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 NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
- <p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
- <h4 id="unix">Building and Installing for Unix</h4>
- <p>This distribution uses common compilers and tools that come with most Unix distributions. 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 included as freeware in some systems. 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 configures the build process accordingly. Use the <tt>make</tt> command to compile and link the distribution and the <tt>install</tt> command to install the executables by default in <tt>/usr/local/bin</tt>.</p>
- <p>If your site supports multiple architectures and uses NFS to share files, you can use a single source tree to build executables for multiple architectures. While running on a particular architecture, change to the base directory and create a subdirectory using a command like <tt>mkdir A.machine, </tt>which will create an architecture-specific directory, then change to this directory and mumble <tt>../configure</tt>. The remaining steps are the same whether building in the base directory or in the subdirectory.</p>
- <h4 id="win">Building and Installing for Windows</h4>
- <p>NTP supports Windows Vista, XP, NT4 and 2000 systems. See the <a href="hints/winnt.html">NTP 4.x for Windows NT</a> page for directions to compile the sources and install the executables. A precompiled executable is available.</p>
- <h4 id="conf">Configuration</h4>
- <p>You are now ready to configure the daemon. You will need to create a NTP configuration file by default in <tt>/etc/ntp.conf.</tt> 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.</p>
- <h4 id="prob">If You Have Problems</h4>
- <p>If you have problems with your hardware and software environment (e.g. operating system-specific issues), browse the <a href="hints.html">Hints and Kinks</a> pages. For other problems a tutorial on debugging technique is in the <a href="debug.html">NTP Debugging Technique</a> page. A list of important system log messages is on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page.</p>
- <p>The first line of general assistance is the NTP web site <a href="http://www.ntp.org">www.ntp.org</a> and the helpful documents 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.</p>
- <p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTPáBug Reporting Procedures</a> page.</p>
- <h4 id="make">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>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<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:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 05:39<!-- #EndDate -->
+</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#build">Building and Installing the Distribution</a></li>
+ <li class="inline"><a href="#unix">Building and Installing for Unix</a></li>
+ <li class="inline"><a href="#win">Building and Installing for Windows</a></li>
+ <li class="inline"><a href="#conf">Configuration</a></li>
+ <li class="inline"><a href="#prob">If You Have Problems</a></li>
+ <li class="inline"><a href="#make">Additional <tt>make</tt> Commands</a></li>
+</ul>
+<hr>
+<h4 id="build">Building and Installing the Distribution</h4>
+<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> 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> pages.</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 NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
+<p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
+<h4 id="unix">Building and Installing for Unix</h4>
+<p>This distribution uses common compilers and tools that come with most Unix distributions. 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 included as freeware in some systems. 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 configures the build process accordingly. Use the <tt>make</tt> command to compile and link the distribution and the <tt>install</tt> command to install the executables by default in <tt>/usr/local/bin</tt>.</p>
+<p>If your site supports multiple architectures and uses NFS to share files, you can use a single source tree to build executables for multiple architectures. While running on a particular architecture, change to the base directory and create a subdirectory using a command like <tt>mkdir A.machine, </tt>which will create an architecture-specific directory, then change to this directory and mumble <tt>../configure</tt>. The remaining steps are the same whether building in the base directory or in the subdirectory.</p>
+<h4 id="win">Building and Installing for Windows</h4>
+<p>NTP supports Windows 2000 and later. See the <a href="hints/winnt.html">NTP 4.x for Windows NT</a> page for directions to compile the sources and install the executables. A precompiled executable is available.</p>
+<h4 id="conf">Configuration</h4>
+<p>You are now ready to configure the daemon. You will need to create a NTP configuration file by default in <tt>/etc/ntp.conf.</tt> 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.</p>
+<h4 id="prob">If You Have Problems</h4>
+<p>If you have problems with your hardware and software environment (e.g. operating system-specific issues), browse the <a href="hints.html">Hints and Kinks</a> pages. For other problems a tutorial on debugging technique is in the <a href="debug.html">NTP Debugging Technique</a> page. A list of important system log messages is on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page.</p>
+<p>The first line of general assistance is the NTP web site <a href="http://www.ntp.org">www.ntp.org</a> and the helpful documents 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.</p>
+<p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTP Bug Reporting Procedures</a> page.</p>
+<h4 id="make">Additional <tt>make</tt> commands</h4>
+<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>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/clock.html b/html/clock.html
new file mode 100644
index 000000000000..32f3ed8c3543
--- /dev/null
+++ b/html/clock.html
@@ -0,0 +1,65 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Clock State Machine</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock State Machine</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Aug-2011 23:40<!-- #EndDate -->
+ UTC</p>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">General Overview</a></li>
+ <li class="inline"><a href="#panic">Panic Threshold</a></li>
+ <li class="inline"><a href="#step">Step and Stepout Thresholds</a></li>
+ <li class="inline"><a href="#hold">Hold Timer</a></li>
+ <li class="inline"><a href="#inter">Operating Intervals</a></li>
+ <li class="inline"><a href="#state">State Transition Function</a></li>
+</ul>
+<hr>
+<h4 id="intro">General Overview</h4>
+<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering severe network congestion. This page describes the design and operation of the state machine in detail.</p>
+<p> The state machine is activated upon receipt of an update by the clock discipline algorithm. its primary purpose is to determines whether the clock is slewed or stepped and how the initial time and frequency are determined using three thresholds: <em>panic</em>, <em>step</em> and <em>stepout</em>, and one timer: <em>hold</em>.</p>
+<h4 id="panic">Panic Threshold</h4>
+<p>Most computers today incorporate a time-of-year (TOY) chip to maintain the time when the power is off. When the computer is restarted, the chip is used to initialize the operating system time. In case there is no TOY chip or the TOY&nbsp;time is different from NTP time by more than the panic threshold, the daemon <tt></tt> assumes something must be terribly wrong, so exits with a message to the system operator to set the time manually. With the <tt>-g</tt> option on the command line, the daemon sets the clock to NTP time at the first update, but exits if the offset exceeds the panic threshold at subsequent updates. The panic threshold default is 1000 s, but it can be changed with the <tt>panic</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<h4 id="step"> Step and Stepout Thresholds</h4>
+<p>Under ordinary conditions, the clock discipline gradually slews the clock to the correct time, so that the time is effectively continuous and never stepped forward or backward. If, due to extreme network congestion, an offset spike exceeds the step threshold, by default 128 ms, the spike is discarded. However, if offset spikes greater than the step threshold persist for an interval more than the stepout threshold, by default 300 s, the system clock is stepped to the correct time.</p>
+<p> In practice, the need for a step has been extremely rare and almost always the result of a hardware failure or operator error. The step threshold and stepout threshold can be changed using the <tt>step</tt> and <tt>stepout</tt> options of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command, respectively. If the step threshold is set to zero, the step function is entirely disabled and the clock is always slewed. The daemon sets the step threshold to 600 s using the <tt>-x</tt> option on the command line. If the <tt>-g</tt> option is used or the step threshold is set greater than 0.5 s, the precision time kernel support is disabled.</p>
+<p>Historically, the most important application of the step function was when a leap second was inserted in the Coordinated Universal Time (UTC) timescale and the kernel precision time support was not available. This also happened with older reference clocks that indicated an impending leap second, but the radio itself did not respond until it resynchronized some minutes later. Further details are on the <a href="leap.html">Leap Second Processing</a> page.</p>
+<p>In some applications the clock can never be set backward, even it accidentally set forward a week by some evil means. The issues should be carefully considered before using these options. The slew rate is fixed at 500 parts-per-million (PPM) by the Unix kernel. As a result, the clock can take 33 minutes to amortize each second the clock is outside the acceptable range. During this interval the 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>
+<h4 id="hold">Hold Timer</h4>
+<p>When the daemon is started after a considerable downtime, it could be the TOY chip clock has drifted significantly from NTP time. This can cause a transient at system startup. In the past, this has produced a phase transient and resulted in a frequency surge that could take some time, even hours, to subside. When the highest accuracy is required, some means is necessary to manage the startup process so that the the clock is quickly set correctly and the frequency is undisturbed. The hold timer is used to suppress frequency adjustments during the training and startup intervals described below. At the beginning of the interval the hold timer is set to the stepout threshold and decrements at one second intervals until reaching zero. However, the hold timer is forced to zero if the residual clock offset is less than 0.5 ms. When nonzero, the discipline algorithm uses a small time constant (equivalent to a poll exponent of 2), but does not adjust the frequency. Assuming that the frequency has been set to within 1 PPM, either from the frequency file or by the training interval described later, the clock is set to within 0.5 ms in less than 300 s.</p>
+<h4 id="inter">Operating Intervals</h4>
+<p>The state machine operates in one of four nonoverlapping intervals.</p>
+<dl>
+ <dt>Training interval</dt>
+ <dd>This interval is used at startup when the frequency file is nor present at startup. It begins when the first update is received by the discipline algorithm and ends when an update is received following the stepout threshold. The clock phase is steered to the offset presented at the beginning of the interval, but without affecting the frequency. During the interval further updates are ignored. At the end of the interval the frequency is calculated as the phase change during the interval divided by the length of the interval. This generally results in a frequency error less than 0.5 PPM. Note that, if the intrinsic oscillator frequency error is large, the offset will in general have significant error. This is corrected during the subsequent startup interval.</dd>
+ <dt>Startup interval</dt>
+ <dd> This interval is used at startup to amortize the residual offset while not affecting the frequency. If the frequency file is present, it begins when the first update is received by the discipline. If not, it begins after the training interval. It ends when the hold timer decrements to zero or when the residual offset falls below 0.5 ms.</dd>
+ <dt>Step interval</dt>
+ <dd>This interval is used as a spike blanker during periods when the offsets exceed the step threshold. The interval continues as long as offsets are received that are greater than the step threshold, but ends when either an offset is received less than the step threshold or until the time since the last valid update exceeds the stepout threshold.</dd>
+ <dt>Sync Interval</dt>
+ <dd> This interval is implicit; that is, it is used when none of the above intervals are used.</dd>
+</dl>
+<h4 id="state">State Transition Function</h4>
+<p>The state machine consists of five states. An event is created when an update is received by the discipline algorithm. Depending on the state and the the offset magnitude, the machine performs some actions and transitions to the same or another state. Following is a short description of the states.</p>
+<dl>
+ <dt>FSET - The frequency file is present</dt>
+ <dd> Load the frequency file, initialize the hold timer and continue in SYNC state.</dd>
+ <dt>NSET - The frequency file is not present</dt>
+ <dd>Initialize the hold timer and continue in FREQ state.</dd>
+ <dt>FREQ - Frequency training state</dt>
+ <dd>Disable the clock discipline until the time since the last update exceeds the stepout threshold. When this happens, calculate the frequency, initialize the hold counter and transition to SYNC state.</dd>
+ <dt>SPIK - Spike state</dt>
+ <dd>A update greater than the step threshold has occurred. Ignore the update and continue in this state as long as updates greater than the step threshold occur. If a valid update is received, continue in SYNC state. When the time since the last valid update was received exceeds the stepout threshold, step the system clock and continue in SYNC state. </dd>
+ <dt>SYNC - Ordinary clock discipline state</dt>
+ <dd>Discipline the system clock time and frequency using the hybrid phase/frequency feedback loop. However, do not discipline the frequency if the hold timer is nonzero.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/clockopt.html b/html/clockopt.html
index 779cea6c19ce..0fe4c246776b 100644
--- a/html/clockopt.html
+++ b/html/clockopt.html
@@ -1,71 +1,59 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="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">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a>
- <p>Last update:
- <!-- #BeginDate format:En2m -->04-Oct-2009 19:42<!-- #EndDate -->
- UTC</p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Reference Clock Commands and Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Reference Clock Commands and Options</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:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/clockopt.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.</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 id="server"><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, interpreted as dual logarithms (2 ^ x). For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (2^16 = 64 s). For modem reference clocks, <tt>minpoll</tt> defaults to 10 (2^10 = 1024 s = 17.1 m) and <tt>maxpoll</tt> defaults to 14 (2^14 = 16384 s = 4.5 h). The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
- </dl>
- <dt id="fudge"><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>]
- [stratum <i>int</i>] [refid <i>string</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>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>
-
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script>
+<hr>
+<h4 id="addrs">Reference Clock Adddresses</h4>
+<p>Unless noted otherwise, further information about these ccommands is on the <a href="refclock.html">Reference Clock Support</a> page.</p><p>Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from ordinary NTP peers. These addresses are of the form 127.127.<em>t</em>.<em>u</em>, where <em>t</em> is an integer denoting the clock type and <em>u</em> 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>
+<h4 id="cmd"> Commands and Options</h4>
+<dl>
+ <dt id="server"><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:
+ <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.html">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><br>
+ <tt>maxpoll <i>int</i></tt></dt>
+ <dd>These options specify the minimum and maximum polling interval for reference clock messages in log<sub>2</sub> seconds. 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> is ordinarily set to 10 (about 17 m) and <tt>maxpoll</tt> to 15 (about 9 h). The allowable range is 4 (16 s) to 17 (36 h) inclusive.</dd>
+ </dl>
+ </dd>
+ <dt id="fudge"><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>]
+ [stratum <i>int</i>] [refid <i>string</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.html">ntpdc</a></tt> program. The options are interpreted as follows:
+ <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>
+ <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 Support</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.html">Reference Clock Support</a> page.</dd>
+ <dt><tt>stratum <i>int</i></tt></dt>
+ <dd>Specifies the stratum number assigned to the driver in the range 0 to 15, inclusive. 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>flag1 flag2 flag3 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 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. Additional information on the <tt>filegen</tt> command is on the <a href="monopt.html">Monitoring Options</a> page.</dd>
+ </dl>
+ </dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
</html>
diff --git a/html/cluster.html b/html/cluster.html
new file mode 100644
index 000000000000..3132a46a5867
--- /dev/null
+++ b/html/cluster.html
@@ -0,0 +1,32 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Clock Cluster Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<em></em>
+<h3>Clock Cluster Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->15-Nov-2012 06:02<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock cluster algorithm processes the truechimers produced by the clock select algorithm to produce a list of <em>survivors</em>. These survivors are used by the mitigation algorithms to discipline the system clock. The cluster algorithm operates in a series of rounds, where at each round the truechimer furthest from the offset centroid is pruned from the population. The rounds are continued until a specified termination condition is met. This page discusses the algorithm in detail.</p>
+<p>First, the truechimer associations are saved on an unordered list with each candidate entry identified with index <em>i</em> (<em>i </em>= 1, ..., <em>n)</em>, where <em>n</em> is the number of candidates. Let &theta;(<em>i</em>), be the offset and &lambda;(<em>i</em>) be the root distance of the <em>i</em>th entry. Recall that the root distance is equal to the root dispersion plus half the root delay. For the <em>i</em>th candidate on the list, a statistic called the <em>select jitter</em> relative to the <em>i</em>th candidate is calculated as follows. Let</p>
+<div align="center">
+ <p><em>d<sub>i</sub></em>(<em>j</em>) = |&theta;(<em>j</em>) &minus; &theta;(<em>i</em>)| &lambda;(<em>i</em>),</p>
+</div>
+<p> where &theta;(<em>i)</em> is the peer offset of the <em>i</em>th entry and &theta;(<em>j</em>) is the peer offset of the <em>j</em>th entry, both produced by the clock filter algorithm. The metric used by the cluster algorithm is the select jitter &phi;<sub>S</sub>(<em>i</em>) computed as the root mean square (RMS) of the <em>d<sub>i</sub></em>(<em>j</em>) as <em>j</em> ranges from 1 to <em>n</em>. <em> </em>For the purpose of notation in the example to follow, let &phi;<sub>R</sub>(<em>i</em>) be the peer jitter computed by the clock filter algorithm for the <em>i</em>th candidate.</p>
+<p>The object at each round is to prune the entry with the largest metric until the termination condition is met. Note that the select jitter must be recomputed at each round, but the peer jitter does not change. At each round the remaining entries on the list represent the survivors of that round. If the candidate to be pruned is preemptable and the number of candidates is greater than the <em>maxclock threshold</em>, the association is demobilized. This is useful in the schemes described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. The maxclock threshold default is 10, but it can be changed using the <tt>maxclock</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. Further pruning is subject to the following termination conditions, but no associations will be automatically demobilized.</p>
+<p>The termination condition has two parts. First, if the number of survivors is not greater than the<em> </em><em>minclock threshold</em> set by the <tt>minclock</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the pruning process terminates. The<tt> minclock</tt> default is 3, but can be changed to fit special conditions, as described on the <a href="prefer.html">Mitigation Rules and the prefer Keyword</a> page.</p>
+<div align="center"><img src="pic/flt7.gif" alt="gif">
+ <p>Figure 1. Cluster Algorithm</p>
+</div>
+<p>The second termination condition is more intricate. Figure 1 shows a round where a candidate of (a) is pruned to yield the candidates of (b). Let &phi;<sub><em>max</em></sub> be the maximum select jitter and &phi;<sub><em>min</em></sub> be the minimum peer jitter over all candidates on the list. In (a), candidate 1 has the highest select jitter, so &phi;<sub><em>max</em></sub> = &phi;<sub>S</sub>(1). Candidate 4 has the lowest peer jitter, so &phi;<sub><em>min</em></sub> = &phi;<sub>R</sub>(4). Since &phi;<sub><em>max</em></sub> &gt; &phi;<sub><em>min</em></sub>, select jitter dominates peer jitter,the algorithm prunes candidate 1.&#13; In (b), &phi;<sub><em>max</em></sub> = &phi;<sub>S</sub>(3) and &phi;<sub><em>min </em></sub>=&phi;<sub>R</sub>(4). Since &phi;<sub><em>max</em></sub> &lt; &phi;<sub><em>min</em></sub>, pruning additional candidates does not reduce select jitter, the algorithm terminates with candidates 2, 3 and 4 as survivors.</p>
+<p>The survivor list is passed on to the the mitigation algorithms, which combine the survivors, select a system peer, and compute the system statistics passed on to dependent clients. Note the use of root distance &lambda; as a weight factor at each round in the clock cluster algorithm. This is to favor the survivors with the lowest root distance and thus the smallest maximum error.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/comdex.html b/html/comdex.html
index eddd5964902f..0d632f16f770 100644
--- a/html/comdex.html
+++ b/html/comdex.html
@@ -1,32 +1,29 @@
<!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="HTML Tidy, see www.w3.org">
- <title>Command Index</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Command Index</h3>
- <img src="pic/alice38.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carrol</a>
- <p>The Mad Hatter says &quot;Bring it on&quot;.</p>
- <p>Last update:
- <!-- #BeginDate format:En2m -->08-Apr-2009 2:56<!-- #EndDate -->
- UTC</p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Command Index</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Command Index</h3>
+<img src="pic/alice38.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carrol</a>
+<p>The Mad Hatter says &quot;Bring it on&quot;.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/confopt.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/monopt.txt"></script>
- <hr>
- <br>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/confopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/monopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+<!-- <hr> -->
+<!-- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> -->
+</body>
+</html>
diff --git a/html/config.html b/html/config.html
index bf10299a82b9..ae68c895693e 100644
--- a/html/config.html
+++ b/html/config.html
@@ -13,8 +13,9 @@
<h3>Build 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="61">Monday,
- December 15, 2008 20:54</csobj> UTC<csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250"></csobj></p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 04:59<!-- #EndDate -->
+ UTC</p>
<br clear="left">
<hr>
<p>Most modern software distributions include an autoconfigure utility which
@@ -36,4 +37,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/confopt.html b/html/confopt.html
index 05847c2ee59b..8c8ae372c7ed 100644
--- a/html/confopt.html
+++ b/html/confopt.html
@@ -3,195 +3,100 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>Server Options</title>
+<title>Server Commands and Options</title>
+<!-- Changed by: Harlan &, 31-Jan-2014 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
-<h3>Server Options</h3>
+<h3>Server Commands and 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:
- <!-- #BeginDate format:En2m -->25-Nov-2009 4:46<!-- #EndDate -->
-</p>
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:01<!-- #EndDate -->
+ UTC</p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/confopt.txt"></script>
<h4>Table of Contents</h4>
<ul>
- <li class="inline"><a href="#cfg">Configuration Commands</a></li>
- <li class="inline"><a href="#opt">Command Options</a></li>
- <li class="inline"><a href="#aux">Auxilliary Commands</a></li>
- <li class="inline"><a href="#bug">Bugs</a></li>
+ <li class="inline"><a href="#address">Server and Peer Addresses</a></li>
+ <li class="inline"><a href="#command">Server Commands</a></li>
+ <li class="inline"><a href="#option">Server Command Options</a></li>
</ul>
<hr>
-<p>Following is a description of the configuration commands in NTPv4. There are
- two classes of commands, configuration commands that configure an association
- with a remote server, peer or reference clock, and auxilliary commands that
- specify environmental variables that control various related operations. </p>
-<p>The various modes described on the <a href="assoc.html">Association Management</a> page
- are determined by the command keyword and the DNS name or IP address. Addresses
- are classed by type as (s) a remote server or peer (IPv4 class A, B and C),
- (b) the IP broadcast address of a local interface, (m) a multicast address (IPv4
- class D), or (r) a reference clock address (127.127.x.x). For type m addresses
- 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. </p>
+<h4 id="address">Server and Peer Addresses</h4>
+<p>Following is a description of the server configuration commands in NTPv4. There are two classes of commands, configuration commands that configure an association with a remote server, peer or reference clock, and auxiliary commands that specify environment variables that control various related operations. </p>
+<p>The various modes described on the <a href="assoc.html">Association Management</a> page are determined by the command keyword and the DNS name or IP address. Addresses are classed by type as (s) a remote server or peer (IPv4 class A, B and C or IPv6), (b) the IPv4 broadcast address of a local interface, (m) a multicast address (IPv4 class D or IPv6), or (r) a reference clock address (127.127.x.x). For type m addresses 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. </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
- IPv4 address family. 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. 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 id="cfg">Configuration Commands</h4>
-<dl>
+ support for the IPv6 address family is generated in addition to the default IPv4 address family. 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. 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 id="command">Server Commands</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="assoc.html">Association Management</a> page.</p><dl>
<dt id="server"><tt>server <i>address</i> [options ...]</tt><br>
<tt>peer <i>address</i> [options ...]</tt><br>
<tt>broadcast <i>address</i> [options ...]</tt><br>
<tt>manycastclient <i>address</i> [options ...]</tt><br>
<tt>pool <i>address</i> [options ...]</tt><br>
<tt>unpeer [<i>address</i> | <i>associd</i>]</tt></dt>
- <dd>These 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
- IPv4 or IPv6 address in standard notation. In general, multiple commands of
- each type can be used for different server and peer addresses or multicast
- groups.
+ <dd>These commands specify the remote 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 IPv4 or IPv6 address in standard notation. In general, multiple commands of each type can be used for different server and peer addresses or multicast groups.
<dl>
<dt><tt>server</tt></dt>
- <dd>For type s and r addresses (only), this command mobilizes a persistent
- client mode association with the specified remote server or local reference
- clock. If the <tt>preempt</tt> flag is specified, a preemptable client mode
- association is mobilized instead.</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.</dd>
- <dt><tt>broadcast</tt></dt>
- <dd>For type b and m addressees (only), this command mobilizes a persistent
- broadcast or multicast server mode association. Note that type
- b messages go only to the interface specified, but type m messages go to
- all interfaces.</dd>
- <dt><tt>manycastclient</tt></dt>
- <dd>For type m addresses (only), this command mobilizes a manycast client
- mode association for the multicast group address specified. In this mode
- the address must match the address specified on the <tt>manycastserver</tt> command
- of one or more designated manycast servers.</dd>
- <dt><tt>pool</tt></dt>
- <dd>For type s messages (only) this command mobilizes a client mode association
- for servers implementing the pool automatic server discovery scheme described
- on the <a href="assoc.html">Association Management</a> page. The address
- is a DNS name in the form <tt><i>area</i>.pool.ntp.org</tt>, where <tt><i>area</i></tt> is
- a qualifier designating the server geographic area such as <tt>us</tt> or <tt>europe</tt>.</dd>
- <dt><tt>unpeer</tt></dt>
- <dd>This command removes a previously configured association. An address or association ID can
- be used to identify the association. Either an IP address or DNS name can be used. This
- command is most useful when supplied via <tt><a href="ntpq.html">ntpq</a></tt> runtime
- configuration commands <tt>:config</tt> and <tt>config-from-file</tt>.</dd>
+ <dd>For type s and r addresses (only), this command mobilizes a persistent client mode association with the specified remote server or local reference clock. If the <tt>preempt</tt> flag is specified, a preemptable client mode association is mobilized instead.</dd>
+ <dt id="peer"><tt>peer</tt></dt>
+ <dd>For type s addresses (only), this command mobilizes a persistent symmetric-active mode association with the specified remote peer.</dd>
+ <dt id="broadcast"><tt>broadcast</tt></dt>
+ <dd>For type b and m addressees (only), this command mobilizes a broadcast or multicast server mode association. Note that type b messages go only to the interface specified, but type m messages go to all interfaces.</dd>
+ <dt id="manycastclient"><tt>manycastclient</tt></dt>
+ <dd>For type m addresses (only), this command mobilizes a preemptable manycast client mode association for the multicast group address specified. In this mode the address must match the address specified on the <tt>manycastserver</tt> command of one or more designated manycast servers. Additional information about this command is on the <a href="discover.html#mcst">Automatic Server Discovery</a> page.</dd>
+ <dt id="pool"><tt>pool</tt></dt>
+ <dd>For type s addresses (only) this command mobilizes a preemptable pool client mode association for the DNS name specified. The DNS name must resolve to one or more IPv4 or IPv6 addresses. Additional information about this command is on the <a href="discover.html#pool">Automatic Server Discovery</a> page. The <a href="http://www.pool.ntp.org/">www.pool.ntp.org</a> page describes a compatible pool of public NTP servers.</dd>
+ <dt id="unpeer"><tt>unpeer</tt></dt>
+ <dd>This command removes a previously configured association. An address or association ID can be used to identify the association. Either an IP address or DNS name can be used. This command is most useful when supplied via <tt><a href="ntpq.html">ntpq</a></tt> runtime configuration commands <tt>:config</tt> and <tt>config-from-file</tt>.</dd>
</dl></dd>
</dl>
-<h4 id="opt">Command Options</h4>
+<h4 id="option">Server Command Options</h4>
<dl>
<dt><tt>autokey</tt></dt>
<dd>Send and receive packets authenticated by the Autokey scheme described
- in the <a href="authopt.html">Authentication Options</a> page. This option
- is mutually exclusive with the <tt>key</tt> option.</dd>
- <dt><tt>burst</tt></dt>
- <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 <a href="miscopt.html"><tt>calldelay</tt></a> command
- to allow additional time for a modem or ISDN call to complete. This option
- is valid only with the <tt>server</tt> command and type s addressesa.
- It is a recommended option when the <tt>maxpoll</tt> option is greater than
- 10 (1024 s).</dd>
- <dt><tt>iburst</tt></dt>
- <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 and second packets can be changed with the <a href="miscopt.html"><tt>calldelay</tt></a> command
- to allow additional time for a modem or ISDN call to complete. This option
- is valid only with the <tt>server</tt> command and type s addresses. It is
- a recommended option with this command.</dd>
- <dt><tt>key</tt> <i><tt>key</tt></i></dt>
- <dd>Send and receive packets authenticated by the symmetric key scheme described
- in the <a href="authopt.html">Authentication Options</a> page.
- The <i><tt>key</tt></i> specifies the key identifier with values from 1 to
- 65534, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd>
- <dt><tt>minpoll <i>minpoll<br>
- </i></tt><tt>maxpoll <i>maxpoll</i></tt></dt>
- <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
- (1024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit
- of 17 (36 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 3 (8 s).</dd>
+ on the <a href="autokey.html">Autokey Public Key Authentication</a> page. This option is mutually exclusive with the <tt>key</tt> option.</dd>
+ <dt id="burst"><tt>burst</tt></dt>
+ <dd>When the server is reachable, send a burst of packets instead of the usual one. This option is valid only with the <tt>server</tt> command and type s addresses. It is a recommended option when the <tt>maxpoll</tt> option is greater than 10 (1024 s). Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
+ <dt><tt>iburst</tt></dt>
+ <dd>When the server is unreachable, send a burst of packets instead of the usual one. This option is valid only with the <tt>server</tt> command and type <tt>s</tt> addresses. It is a recommended option with this command. Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
+ <dt><tt>ident</tt> <em><tt>group</tt></em></dt>
+ <dd>Specify the group name for the association. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt><tt>key</tt> <i><tt>key</tt></i></dt>
+ <dd>Send and receive packets authenticated by the symmetric key scheme described in the <a href="authentic.html">Authentication Support</a> page. The <i><tt>key</tt></i> specifies the key identifier with values from 1 to 65534, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd> <dt><tt>minpoll <i>minpoll<br>
+ </i></tt><tt>maxpoll <i>maxpoll</i></tt></dt>
+ <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 (1024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36 hr). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 3 (8 s). Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
<dt><tt>mode <i>option</i></tt></dt>
- <dd>Pass the <tt><i>option</i></tt> to a reference clock driver, where <tt><i>option</i></tt> is
- an integer in the range from 0 to 255, inclusive. This option is valid
- only with type r addresses.</dd>
+ <dd>Pass the <tt><i>option</i></tt> to a reference clock driver, where <tt><i>option</i></tt> is an integer in the range from 0 to 255, inclusive. This option is valid only with type r addresses.</dd>
<dt><tt>noselect</tt></dt>
- <dd>Marks the server or peer to be ignored by the selection algorithm but visible
- to the monitoring program. This option is ignored with the <tt>broadcast</tt> command.</dd>
+ <dd>Marks the server or peer to be ignored by the selection algorithm as unreachable, but visible to the monitoring program. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
<dt><tt>preempt</tt></dt>
- <dd>Specifies the association as preemptable rather than the default persistent.
- This option is ignored with the <tt>broadcast</tt> command and is most useful
- with the <tt>manycastclient</tt> and <tt>pool</tt> commands.</dd>
+ <dd>Specifies the association as preemptable rather than the default persistent. This option is ignored with the <tt>broadcast</tt> command and is most useful with the <tt>manycastclient</tt> and <tt>pool</tt> commands.</dd>
<dt><tt>prefer</tt></dt>
- <dd>Mark 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. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
+ <dd>Mark 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. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
<dt><tt>true</tt></dt>
- <dd>Mark the association to assume truechimer status; that is, always survive
- the selection and clustering algorithms. This option can be used with any association,
- but is most useful for reference clocks with large jitter on the serial port
- and precision pulse-per-second (PPS) signals. Caution: this option defeats
- the algorithms designed to cast out falsetickers and can allow these sources
- to set the system clock. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
+ <dd>Mark the association to assume truechimer status; that is, always survive the selection and clustering algorithms. This option can be used with any association, but is most useful for reference clocks with large jitter on the serial port and precision pulse-per-second (PPS) signals. Caution: this option defeats the algorithms designed to cast out falsetickers and can allow these sources to set the system clock. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
<dt><tt>ttl <i>ttl</i></tt></dt>
- <dd>This option specifies the time-to-live <i><tt>ttl</tt></i> for the <tt>broadcast</tt> command
- and the maximum <i><tt>ttl</tt></i> for the expanding ring search used by the <tt>manycastclient</tt> command.
- Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator. This option is invalid with type r addresses.</dd>
+ <dd>This option specifies the time-to-live <i><tt>ttl</tt></i> for the <tt>broadcast</tt> command and the maximum <i><tt>ttl</tt></i> for the expanding ring search used by the <tt>manycastclient</tt> command. Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator. This option is invalid with type r addresses.</dd>
<dt><tt>version <i>version</i></tt></dt>
- <dd>Specifies the version number to be used f
-or outgoing NTP packets. Versions
- 1-4 are the choices, with version 4 the default.</dd>
+ <dd>Specifies the version number to be used for
+outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default.</dd>
<dt><tt>xleave</tt></dt>
- <dd>Operate in interleaved mode (symmetric and broadcast modes only). (see <a href="xleave.html">NTP
- Interleaved Modes</a>)</dd>
+ <dd>Operate in interleaved mode (symmetric and broadcast modes only). Further information is on the <a href="xleave.html">NTP Interleaved Modes</a> page.</dd>
</dl>
-<h4 id="aux">Auxilliary Commands</h4>
+<h4 id="aux">Auxiliary Commands</h4>
<dl>
<dt id="broadcastclient"><tt>broadcastclient</tt></dt>
- <dd>Enable reception of broadcast server messages to any local interface (type
- b address). Ordinarily, upon receiving a broadcast message for the first
- time, the broadcast client measures the nominal server propagation delay using
- a brief client/server exchange, after which it continues in listen-only mode.
- If a nonzero value is specified in the <tt>broadcastdelay</tt> command, the
- value becomes the delay and the volley is not executed. Note: the <tt>novolley</tt> option
- has been deprecated for future enhancements. 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. Note that the <tt>novolley</tt> keyword is incompatible with
- public key authentication.</dd>
- <dt id="manycastserver"><tt>manycastserver <i>address</i> [...]</tt></dt>
- <dd>Enable reception of manycast client messages (type m)to the multicast group
- address(es) (type m) specified. At least one address is required. Note that,
- in order to avoid accidental or malicious disruption, 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.</dd>
+ <dd>Enable reception of broadcast server messages to any local interface (type b address). Ordinarily, upon receiving a broadcast message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange, after which it continues in listen-only mode. If a nonzero value is specified in the <tt>broadcastdelay</tt> command, the value becomes the delay and the volley is not executed. Note: the <tt>novolley</tt> option has been deprecated for future enhancements. 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. Note that the volley is required with public key authentication in order to run the Autokey protocol..</dd>
+ <dt id="manycastserver"><tt>manycastserver <i>address</i> [...]</tt></dt>
+ <dd>Enable reception of manycast client messages (type m) to the multicasts group address(es) (type m) specified. At least one address is required. Note that, in order to avoid accidental or malicious disruption, 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.</dd>
<dt id="multicastclient"><tt>multicastclient <i>address</i> [...]</tt></dt>
- <dd>Enable 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.</dd>
+ <dd>Enable 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.</dd>
</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>
diff --git a/html/copyright.html b/html/copyright.html
index 36e028577aae..08272d4e6715 100644
--- a/html/copyright.html
+++ b/html/copyright.html
@@ -1,26 +1,25 @@
<!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>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:
- <!-- #BeginDate format:En2m -->1-Jan-2011 08:34<!-- #EndDate -->
- UTC</csobj></p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Copyright Notice</title>
+<!-- Changed by: Harlan Stenn, 10-Mar-2014 -->
+<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"> "Clone me," says Dolly sheepishly.
+<p>Last update:
+ <!-- #BeginDate format:En2m -->9-Aug-2014 07:56<!-- #EndDate -->
+ UTC</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.</p>
- <pre>
+</p>
+<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.</p>
+<pre>
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2011 *
+* Copyright (c) University of Delaware 1992-2014 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -36,67 +35,68 @@
* *
***********************************************************************
</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:%20takao_abe@xurb.jp">Takao Abe &lt;takao_abe@xurb.jp&gt;</a> Clock driver for JJY receivers
- <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:%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:%20nelson@bolyard.me">Nelson B Bolyard &lt;nelson@bolyard.me&gt;</a> update and complete broadcast and crypto features in sntp
- <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:%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:%20davehart@davehart.com">Dave Hart &lt;davehart@davehart.com&gt;</a> General maintenance, Windows port interpolation rewrite
- <li class="inline"><a href="mailto:%20neoclock4x@linum.com">Claas Hilbrecht &lt;neoclock4x@linum.com&gt;</a> NeoClock4X clock driver
- <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:%20kardel (at) ntp (dot) org">&lt;kardel (at) ntp (dot) org&gt;</a> PARSE &lt;GENERIC&gt; driver (>14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup, dynamic interface handling
- <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:%20neal@ntp.org">Rob Neal &lt;neal@ntp.org&gt;</a> Bancomm refclock and config/parse code maintenance
- <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>
-
+<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><a href="mailto:%20takao_abe@xurb.jp">Takao Abe &lt;takao_abe@xurb.jp&gt;</a> Clock driver for JJY receivers</li>
+ <li><a href="mailto:%20mark_andrews@isc.org">Mark Andrews &lt;mark_andrews@isc.org&gt;</a> Leitch atomic clock controller</li>
+ <li><a href="mailto:%20altmeier@atlsoft.de">Bernd Altmeier &lt;altmeier@atlsoft.de&gt;</a> hopf Elektronik serial line and PCI-bus devices</li>
+ <li><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>
+ <li><a href="mailto:%20michael.barone@lmco.com">Michael Barone &lt;michael,barone@lmco.com&gt;</a> GPSVME fixes</li>
+ <li><a href="mailto:%20karl@owl.HQ.ileaf.com">Karl Berry &lt;karl@owl.HQ.ileaf.com&gt;</a> syslog to file option</li>
+ <li><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>
+ <li><a href="mailto:%20Marc.Brett@westgeo.com">Marc Brett &lt;Marc.Brett@westgeo.com&gt;</a> Magnavox GPS clock driver</li>
+ <li><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>
+ <li><a href="mailto:%20nelson@bolyard.me">Nelson B Bolyard &lt;nelson@bolyard.me&gt;</a> update and complete broadcast and crypto features in sntp</li>
+ <li><a href="mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca">Jean-Francois Boudreault &lt;Jean-Francois.Boudreault@viagenie.qc.ca&gt;</a> IPv6 support</li>
+ <li><a href="mailto:%20reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)</li>
+ <li><a href="mailto:%20clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver</li>
+ <li><a href="mailto:%20casey@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:%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>
+ <li><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>
+ <li><a href="mailto:%20duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port</li>
+ <li><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>
+ <li><a href="mailto:%20jhay@icomtek.csir.co.za">John Hay &lt;jhay@icomtek.csir.co.za&gt;</a> IPv6 support and testing</li>
+ <li><a href="mailto:%20davehart@davehart.com">Dave Hart &lt;davehart@davehart.com&gt;</a> General maintenance, Windows port interpolation rewrite</li>
+ <li><a href="mailto:%20neoclock4x@linum.com">Claas Hilbrecht &lt;neoclock4x@linum.com&gt;</a> NeoClock4X clock driver</li>
+ <li><a href="mailto:%20glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver</li>
+ <li><a href="mailto:%20iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port</li>
+ <li><a href="mailto:%20jagubox.gsfc.nasa.gov">Jim Jagielski &lt;jim@jagubox.gsfc.nasa.gov&gt;</a> A/UX port</li>
+ <li><a href="mailto:%20jbj@chatham.usdesign.com">Jeff Johnson &lt;jbj@chatham.usdesign.com&gt;</a> massive prototyping overhaul</li>
+ <li><a href="mailto:%20Hans.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:%20phk@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/%7ekardel">Frank Kardel</a> <a href="mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org">&lt;kardel (at) ntp (dot) org&gt;</a> PARSE &lt;GENERIC&gt; (driver 14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup, dynamic interface handling</li>
+ <li><a href="mailto:kuehn@ntp.org">Johannes Maximilian Kuehn &lt;kuehn@ntp.org&gt;</a> Rewrote <tt>sntp</tt> to comply with NTPv4 specification, <tt>ntpq saveconfig</tt></li>
+ <li><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>
+ <li><a href="mailto:%20dkatz@cisco.com">Dave Katz &lt;dkatz@cisco.com&gt;</a> RS/6000 AIX port</li>
+ <li><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>
+ <li><a href="mailto:%20lindholm@ucs.ubc.ca">George Lindholm &lt;lindholm@ucs.ubc.ca&gt;</a> SunOS 5.1 port</li>
+ <li><a href="mailto:%20louie@ni.umd.edu">Louis A. Mamakos &lt;louie@ni.umd.edu&gt;</a> MD5-based authentication</li>
+ <li><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>
+ <li><a href="mailto:%20mayer@ntp.org">Danny Mayer &lt;mayer@ntp.org&gt;</a>Network I/O, Windows Port, Code Maintenance</li>
+ <li><a href="mailto:%20mills@udel.edu">David L. Mills &lt;mills@udel.edu&gt;</a> Version 4 foundation, precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36</li>
+ <li><a href="mailto:%20moeller@gwdgv1.dnet.gwdg.de">Wolfgang Moeller &lt;moeller@gwdgv1.dnet.gwdg.de&gt;</a> VMS port</li>
+ <li><a href="mailto:%20mogul@pa.dec.com">Jeffrey Mogul &lt;mogul@pa.dec.com&gt;</a> ntptrace utility</li>
+ <li><a href="mailto:%20tmoore@fievel.daytonoh.ncr.com">Tom Moore &lt;tmoore@fievel.daytonoh.ncr.com&gt;</a> i386 svr4 port</li>
+ <li><a href="mailto:%20kamal@whence.com">Kamal A Mostafa &lt;kamal@whence.com&gt;</a> SCO OpenServer port</li>
+ <li><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>
+ <li><a href="mailto:%20neal@ntp.org">Rob Neal &lt;neal@ntp.org&gt;</a> Bancomm refclock and config/parse code maintenance</li>
+ <li><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>
+ <li><a href="mailto:%20dirce@zk3.dec.com">Dirce Richards &lt;dirce@zk3.dec.com&gt;</a> Digital UNIX V4.0 port</li>
+ <li><a href="mailto:%20wsanchez@apple.com">Wilfredo S&aacute;nchez &lt;wsanchez@apple.com&gt;</a> added support for NetInfo</li>
+ <li><a href="mailto:%20mrapple@quack.kfu.com">Nick Sayer &lt;mrapple@quack.kfu.com&gt;</a> SunOS streams modules</li>
+ <li><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>
+ <li><a href="mailto:%20schnitz@unipress.com">Ray Schnitzler &lt;schnitz@unipress.com&gt;</a> Unixware1 port</li>
+ <li><a href="mailto:%20shields@tembel.org">Michael Shields &lt;shields@tembel.org&gt;</a> USNO clock driver</li>
+ <li><a href="mailto:%20pebbles.jpl.nasa.gov">Jeff Steinman &lt;jss@pebbles.jpl.nasa.gov&gt;</a> Datum PTS clock driver</li>
+ <li><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>
+ <li><a href="mailto:%20ken@sdd.hp.com">Kenneth Stone &lt;ken@sdd.hp.com&gt;</a> HP-UX port</li>
+ <li><a href="mailto:%20ajit@ee.udel.edu">Ajit Thyagarajan &lt;ajit@ee.udel.edu&gt;</a>IP multicast/anycast support</li>
+ <li><a href="mailto:%20tsuruoka@nc.fukuoka-u.ac.jp">Tomoaki TSURUOKA &lt;tsuruoka@nc.fukuoka-u.ac.jp&gt;</a>TRAK clock driver</li>
+ <li><a href="mailto:%20brian.utterback@oracle.com">Brian Utterback &lt;brian.utterback@oracle.com&gt;</a> General codebase, Solaris issues</li>
+ <li><a href="mailto:%20loganaden@gmail.com">Loganaden Velvindron &lt;loganaden@gmail.com&gt;</a> Sandboxing (libseccomp) support</li>
+ <li><a href="mailto:%20vixie@vix.com">Paul A Vixie &lt;vixie@vix.com&gt;</a> TrueTime GPS driver, generic TrueTime clock driver</li>
+ <li><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</li>
+</ol>
+<hr>
+</body>
</html>
diff --git a/html/debug.html b/html/debug.html
index 783472b1d95b..1a4981acd090 100644
--- a/html/debug.html
+++ b/html/debug.html
@@ -1,96 +1,93 @@
<!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="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:
- <!-- #BeginDate format:En2m -->16-Jul-2009 19:36<!-- #EndDate -->
- UTC</p>
- <h4>More Help</h4>
- <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
- <hr>
- <h4>Initial Startup</h4>
- <p>This page discusses <tt>ntpd</tt> program monitoring and debugging techniques using the <a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>, either on the local server or from a remote machine. In special circumstances the <a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>, can be useful, but its use is not covered here. 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>. It is used to read and write the variables defined in the NTP Version 4 specification now navigating the standards process. In addition, the program can be used to send remote configuration commands to the server.</p>
- <p>The <tt>ntpd</tt> daemon can operate in two modes, depending on the presence of the <tt>-d</tt> command-line option. Without the option the daemon detaches from the controlling terminal and proceeds autonomously. With one or more <tt>-d</tt> options the daemon does not detach and generates special trace 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.</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 requires port 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. Event messages at startup and during regular operation are sent to the optional <tt>protostats</tt> monitor file, as described on the <a href="decode.html">Event Messages and Status Words</a> page. These and other error messages are sent to the system log, as described on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page. 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 newsgroup are not NTP problems, but problems with the network or firewall configuration.</p>
- <h4>Verifying Correct Operation</h4>
- <p>Unless using the <tt>iburst</tt> option, the client normally takes a few
- minutes to synchronize to a server. If the client time at startup happens
- to be more than 1000 s distant from NTP time, the daemon exits with a message
- to the system log directing the operator to manually set the time within 1000
- s and restart. If the time is less than 1000 s but more than 128 s distant,
- a step correction occurs and the daemon restarts automatically.</p>
- <p>When started for the first time and a frequency file is not present, the
- daemon enters a special mode in order to calibrate the frequency. This takes
- 900 s during which the time is not disciplined. When calibration is complete,
- the daemon creates the frequency file and enters normal mode to amortize whatever
- residual offset remains.</p>
- <p>The <tt>ntpq</tt> commands <tt>pe</tt>, <tt>as</tt> and <tt>rv</tt> are
- normally sufficient to verify correct operation and assess nominal performance.
- The <a href="ntpq.html#pe"><tt>pe</tt></a> command displays a list showing
- the DNS name or IP address for each association along with selected status
- and statistics variables. The first character in each line is the tally code,
- which shows which associations are candidates to set the system clock and
- of these which one is the system peer. The encoding is shown in the <tt>select</tt>
- field of the <a href="decode.html#peer">peer status word</a>.</p>
- <p>The <a href="ntpq.html#as"><tt>as</tt></a> command displays a list of associations and association identifiers. Note the <tt>condition</tt> column, which reflects the tally code. The <a href="ntpq.html#pe"><tt>rv</tt></a> command displays the <a href="ntpq.html#system">system variables</a> billboard, including the <a href="decode.html#sys">system status word</a>. The <a href="ntpq.html#rv"><tt>rv <i>assocID</i></tt></a> command, where <tt><i>assocID</i></tt> is the association ID, displays the <a href="ntpq.html#peer">peer variables</a> billboard, including the <a href="decode.html#peer">peer status word</a>. Note that, except for explicit calendar dates, times are in milliseconds and frequencies are in parts-per-million (PPM).</p>
- <p>A detailed explanation of the system, peer and clock variables in the billboards is beyond the scope of this page; however, a comprehensive explanation for each one is in the NTPv4 protocol specification. The following observations will be useful in debugging and monitoring.</p>
- <ol>
- <li>The server has successfully synchronized to its sources if the <tt>leap</tt> peer
- variable has value other than 3 (11b) The client has successfully synchronized
- to the server when the <tt>leap</tt> system variable has value other than
- 3.
- <li>The <tt>reach</tt> peer variable is an 8-bit shift register displayed in octal format. When a valid packet is received, the rightmost bit is lit. When a packet is sent, the register is shifted left one bit with 0 replacing the rightmost bit. If the <tt>reach</tt> value is nonzero, the server is reachable; otherwise, it is unreachable. Note that, even if all servers become unreachable, the system continues to show valid time to dependent applications.
- <li>A useful indicator of miscellaneous problems is the <tt>flash</tt> peer variable, which shows the result of 13 sanity tests. It contains the <a href="decode.html#flash">flash status word</a> bits, commonly called flashers, which displays the current errors for the association. These bits should all be zero for a valid server.
- <li>The three peer variables <tt>filtdelay</tt>, <tt>filtoffset</tt> and <tt>filtdisp</tt> show the delay, offset and jitter statistics for each of the last eight measurement rounds. These statistics and their trends are valuable performance indicators for the server, client and the network. For instance, large fluctuations in delay and jitter suggest network congestion. Missing clock filter stages suggest packet losses in the network.
- <li>The synchronization distance, defined as one-half the delay plus the dispersion, represents the maximum error statistic. The jitter represents the expected error statistic. The maximum error and expected error calculated from the peer variables represents the quality metric for the server. The maximum error and expected error calculated from the system variables represents the quality metric for the client. If the root synchronization distance for any server exceeds 1.5 s, called the select threshold, the server is considered invalid.</ol>
- <h4>Large Frequency Errors</h4>
- <p>The frequency tolerance of computer clock oscillators varies widely, sometimes above 500 PPM. While the daemon can handle frequency errors up to 500 PPM, or 43 seconds per day, values much above 100 PPM reduce the headroom, especially at the lowest poll intervals. To determine the particular oscillator frequency, start <tt>ntpd</tt> using the <tt>noselect</tt> option with the <tt>server</tt> configuration command.</p>
- <p>Record the time of day and offset displayed by the <tt>ntpq</tt> <a href="ntpq.html#pe"><tt>pe</tt></a> command. Wait for an hour or so and record the time of day and offset. Calculate the frequency as the offset difference divided by the time difference. If the frequency is much above 100 PPM, the <a href="tickadj.html">tickadj</a> program might be useful to adjust the kernel clock frequency below that value. For systems that do not support this program, this might be one using a command in the system startup file.</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 information.</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 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 <tt>refid</tt> 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> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->16-Jul-2014 08:38<!-- #EndDate -->
+ UTC</p>
+ <br clear="left">
+ <h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<hr>
+<h4>Initial Startup</h4>
+<p>This page discusses <tt>ntpd</tt> program monitoring and debugging techniques using the <a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>, either on the local server or from a remote machine. In special circumstances the <a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>, can be useful, but its use is not covered here. 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>. It is used to read and write the variables defined in the NTP Version 4 specification now navigating the standards process. In addition, the program can be used to send remote configuration commands to the server.</p>
+<p>The <tt>ntpd</tt> daemon can operate in two modes, depending on the presence of the <tt>-d</tt> command-line option. Without the option the daemon detaches from the controlling terminal and proceeds autonomously. With one or more <tt>-d</tt> options the daemon does not detach and generates special trace 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.</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 requires port 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. Event messages at startup and during regular operation are sent to the optional <tt>protostats</tt> monitor file, as described on the <a href="decode.html">Event Messages and Status Words</a> page. These and other error messages are sent to the system log, as described on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page. 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 newsgroup are not NTP problems, but problems with the network or firewall configuration.</p>
+<h4>Verifying Correct Operation</h4>
+<p>Unless using the <tt>iburst</tt> option, the client normally takes a few
+ minutes to synchronize to a server. If the client time at startup happens
+ to be more than 1000 s distant from NTP time, the daemon exits with a message
+ to the system log directing the operator to manually set the time within 1000
+ s and restart. If the time is less than 1000 s but more than 128 s distant,
+ a step correction occurs and the daemon restarts automatically.</p>
+<p>When started for the first time and a frequency file is not present, the
+ daemon enters a special mode in order to calibrate the frequency. This takes
+ 900 s during which the time is not disciplined. When calibration is complete,
+ the daemon creates the frequency file and enters normal mode to amortize whatever
+ residual offset remains.</p>
+<p>The <tt>ntpq</tt> commands <tt>pe</tt>, <tt>as</tt> and <tt>rv</tt> are
+ normally sufficient to verify correct operation and assess nominal performance.
+ The <a href="ntpq.html#pe"><tt>pe</tt></a> command displays a list showing
+ the DNS name or IP address for each association along with selected status
+ and statistics variables. The first character in each line is the tally code,
+ which shows which associations are candidates to set the system clock and
+ of these which one is the system peer. The encoding is shown in the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>.</p>
+<p>The <a href="ntpq.html#as"><tt>as</tt></a> command displays a list of associations and association identifiers. Note the <tt>condition</tt> column, which reflects the tally code. The <a href="ntpq.html#pe"><tt>rv</tt></a> command displays the <a href="ntpq.html#system">system variables</a> billboard, including the <a href="decode.html#sys">system status word</a>. The <a href="ntpq.html#rv"><tt>rv <i>assocID</i></tt></a> command, where <tt><i>assocID</i></tt> is the association ID, displays the <a href="ntpq.html#peer">peer variables</a> billboard, including the <a href="decode.html#peer">peer status word</a>. Note that, except for explicit calendar dates, times are in milliseconds and frequencies are in parts-per-million (PPM).</p>
+<p>A detailed explanation of the system, peer and clock variables in the billboards is beyond the scope of this page; however, a comprehensive explanation for each one is in the NTPv4 protocol specification. The following observations will be useful in debugging and monitoring.</p>
+<ol>
+ <li>The server has successfully synchronized to its sources if the <tt>leap</tt> peer
+ variable has value other than 3 (11b) The client has successfully synchronized
+ to the server when the <tt>leap</tt> system variable has value other than
+ 3.</li>
+ <li>The <tt>reach</tt> peer variable is an 8-bit shift register displayed in octal format. When a valid packet is received, the rightmost bit is lit. When a packet is sent, the register is shifted left one bit with 0 replacing the rightmost bit. If the <tt>reach</tt> value is nonzero, the server is reachable; otherwise, it is unreachable. Note that, even if all servers become unreachable, the system continues to show valid time to dependent applications.</li>
+ <li>A useful indicator of miscellaneous problems is the <tt>flash</tt> peer variable, which shows the result of 13 sanity tests. It contains the <a href="decode.html#flash">flash status word</a> bits, commonly called flashers, which displays the current errors for the association. These bits should all be zero for a valid server.</li>
+ <li>The three peer variables <tt>filtdelay</tt>, <tt>filtoffset</tt> and <tt>filtdisp</tt> show the delay, offset and jitter statistics for each of the last eight measurement rounds. These statistics and their trends are valuable performance indicators for the server, client and the network. For instance, large fluctuations in delay and jitter suggest network congestion. Missing clock filter stages suggest packet losses in the network.</li>
+ <li>The synchronization distance, defined as one-half the delay plus the dispersion, represents the maximum error statistic. The jitter represents the expected error statistic. The maximum error and expected error calculated from the peer variables represents the quality metric for the server. The maximum error and expected error calculated from the system variables represents the quality metric for the client. If the root synchronization distance for any server exceeds 1.5 s, called the select threshold, the server is considered invalid.</li>
+</ol>
+<h4>Large Frequency Errors</h4>
+<p>The frequency tolerance of computer clock oscillators varies widely, sometimes above 500 PPM. While the daemon can handle frequency errors up to 500 PPM, or 43 seconds per day, values much above 100 PPM reduce the headroom, especially at the lowest poll intervals. To determine the particular oscillator frequency, start <tt>ntpd</tt> using the <tt>noselect</tt> option with the <tt>server</tt> configuration command.</p>
+<p>Record the time of day and offset displayed by the <tt>ntpq</tt> <a href="ntpq.html#pe"><tt>pe</tt></a> command. Wait for an hour or so and record the time of day and offset. Calculate the frequency as the offset difference divided by the time difference. If the frequency is much above 100 PPM, the <a href="tickadj.html">tickadj</a> program might be useful to adjust the kernel clock frequency below that value. For systems that do not support this program, this might be one using a command in the system startup file.</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 information.</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>
+ <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>
+ <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>Check that the remote NTP server is up and running. The usual evidence that it is not is a <tt>Connection refused</tt> message.</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>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 <tt>refid</tt> 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>
+ <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>If all else fails, see the FAQ and/or the discussion and briefings at the NTP Project page.</li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/decode.html b/html/decode.html
index 130fe8ac2626..51603ad67aae 100644
--- a/html/decode.html
+++ b/html/decode.html
@@ -1,879 +1,692 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
- <head>
+<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
-<title>ntpd Event Messages and Status Words</title>
+<title>Event Messages and Status Words</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Event Messages and Status Words</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>Caterpillar knows all the error codes, which is more than most of us do.</p>
-
<p>Last update:
-<!-- #BeginDate format:En2m -->30-Apr-2010 23:13<!-- #EndDate -->
-UTC</p>
+ <!-- #BeginDate format:En2m -->16-Jul-2014 04:48<!-- #EndDate -->
+ UTC</p>
+</p>
<br clear="left">
-
<h4>Related Links</h4>
-
-<p><script type="text/javascript" language="javascript" src="scripts/install.txt"></script></p>
-
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+</p>
<h4>Table of Contents</h4>
-
<ul>
-<li class="inline"><a href="#intro">Introduction</a></li>
-<li class="inline"><a href="#sys">System Status Word</a></li>
-<li class="inline"><a href="#peer">Peer Status Word</a></li>
-<li class="inline"><a href="#clock">Clock Status Word</a></li>
-<li class="inline"><a href="#flash">Flash Status Word</a></li>
-<li class="inline"><a href="#kiss">Kiss Codes</a></li>
-<li class="inline"><a href="#crypto">Crypto Messages</a></li>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#sys">System Status Word</a></li>
+ <li class="inline"><a href="#peer">Peer Status Word</a></li>
+ <li class="inline"><a href="#clock">Clock Status Word</a></li>
+ <li class="inline"><a href="#flash">Flash Status Word</a></li>
+ <li class="inline"><a href="#kiss">Kiss Codes</a></li>
+ <li class="inline"><a href="#crypto">Crypto Messages</a></li>
</ul>
-
<hr>
-
<h4 id="intro">Introduction</h4>
-
<p>This page lists the status words, event messages and error codes used for <tt>ntpd</tt> reporting and monitoring. Status words are used to display the current status of the running program. There is one system status word and a peer status word for each association. There is a clock status word for each association that supports a reference clock. There is a flash code for each association which shows errors found in the last packet received (pkt) and during protocol processing (peer). These are commonly viewed using the <tt>ntpq</tt> program.</p>
-
<p>Significant changes in program state are reported as events. There is one
- set of system events and a set of peer events for each association. In addition,
- there is a set of clock events for each association that supports a reference
- clock. Events are normally reported to the <tt>protostats</tt> monitoring file
- and optionally to the system log. In addition, if the trap facility is configured,
- events can be reported to a remote program that can page an administrator.</p>
-
+ set of system events and a set of peer events for each association. In addition,
+ there is a set of clock events for each association that supports a reference
+ clock. Events are normally reported to the <tt>protostats</tt> monitoring file
+ and optionally to the system log. In addition, if the trap facility is configured,
+ events can be reported to a remote program that can page an administrator.</p>
<p>This page also includes a description of the error messages produced by the Autokey protocol. These messages are normally sent to the <tt>cryptostats</tt> monitoring file.</p>
-
-<p>In the following tables the Code Field is the status or event code assigned and the Message Field a short string used for display and event reporting. The Description field contains a longer explanation of the status or event. Some messages include additional information useful for error diagnosis and performance assessment.</p>
-
+<p>In the following tables the Event Field is the status or event code assigned and the Message Field a short string used for display and event reporting. The Description field contains a longer explanation of the status or event. Some messages include additional information useful for error diagnosis and performance assessment.</p>
<h4 id="sys">System Status Word</h4>
-
-<p>The system status word consists of four fields LI (0-1), Source (2-7), Count (8-11) and Code (12-15). It is reported in the first line of the <tt>rv</tt> display produced by the <tt>ntpq</tt> program.</p>
-
+<p>The system status word consists of four fields LI (0-1), Source (2-7), Count (8-11) and Event (12-15). It is reported in the first line of the <tt>rv</tt> display produced by the <tt>ntpq</tt> program.</p>
<table width="50%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td><div align="center">Leap</div></td>
-<td><div align="center">Source</div></td>
-<td><div align="center">Count</div></td>
-<td><div align="center">Code</div></td>
-</tr>
-
+ <tr>
+ <td><div align="center">Leap</div></td>
+ <td><div align="center">Source</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Event</div></td>
+ </tr>
</table>
-
<p>The Leap Field displays the system leap indicator bits coded as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>0</tt></td>
-<td><tt>leap_none</tt></td>
-<td>normal synchronized state</td>
-</tr>
-
-<tr>
-<td><tt>1</tt></td>
-<td><tt>leap_add_sec</tt></td>
-<td>insert second after 23:59:59 of the current day</td>
-</tr>
-
-<tr>
-<td><tt>2</tt></td>
-<td><tt>leap_del_sec</tt></td>
-<td>delete second 23:59:59 of the current day</td>
-</tr>
-
-<tr>
-<td><tt>3</tt></td>
-<td><tt>leap_alarm</tt></td>
-<td>never synchronized</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>leap_none</tt></td>
+ <td>normal synchronized state</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>leap_add_sec</tt></td>
+ <td>insert second after 23:59:59 of the current day</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>leap_del_sec</tt></td>
+ <td>delete second 23:59:59 of the current day</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>leap_alarm</tt></td>
+ <td>never synchronized</td>
+ </tr>
</table>
-
-<p>The Source Field displays the current synchronization source coded as follows:.</p>
-
+<p>The Source Field displays the current synchronization source coded as follows:</p>
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>0</tt></td>
-<td><tt>sync_unspec</tt></td>
-<td>not yet synchronized</td>
-</tr>
-
-<tr>
-<td><tt>1</tt></td>
-<td><tt>sync_pps</tt></td>
-<td>pulse-per-second signal (Cs, Ru, GPS, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>2</tt></td>
-<td><tt>sync_lf_radio</tt></td>
-<td>VLF/LF radio (WWVB, DCF77, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>3</tt></td>
-<td><tt>sync_hf_radio</tt></td>
-<td>MF/HF radio (WWV, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>4</tt></td>
-<td><tt>sync_uhf_radio</tt></td>
-<td>VHF/UHF radio/satellite (GPS, Galileo, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>5</tt></td>
-<td><tt>sync_local</tt></td>
-<td>local timecode (IRIG, LOCAL driver, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>6</tt></td>
-<td><tt>sync_ntp</tt></td>
-<td>NTP</td>
-</tr>
-
-<tr>
-<td><tt>7</tt></td>
-<td><tt>sync_other</tt></td>
-<td>other (IEEE 1588, openntp, crony, etc.)</td>
-</tr>
-
-<tr>
-<td><tt>8</tt></td>
-<td><tt>sync_wristwatch</tt></td>
-<td>eyeball and wristwatch</td>
-</tr>
-
-<tr>
-<td><tt>9</tt></td>
-<td><tt>sync_telephone</tt></td>
-<td>telephone modem (ACTS, PTB, etc.)</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>sync_unspec</tt></td>
+ <td>not yet synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>sync_pps</tt></td>
+ <td>pulse-per-second signal (Cs, Ru, GPS, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>sync_lf_radio</tt></td>
+ <td>VLF/LF radio (WWVB, DCF77, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>sync_hf_radio</tt></td>
+ <td>MF/HF radio (WWV, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td><tt>sync_uhf_radio</tt></td>
+ <td>VHF/UHF radio/satellite (GPS, Galileo, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>5</tt></td>
+ <td><tt>sync_local</tt></td>
+ <td>local timecode (IRIG, LOCAL driver, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>6</tt></td>
+ <td><tt>sync_ntp</tt></td>
+ <td>NTP</td>
+ </tr>
+ <tr>
+ <td><tt>7</tt></td>
+ <td><tt>sync_other</tt></td>
+ <td>other (IEEE 1588, openntp, crony, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>8</tt></td>
+ <td><tt>sync_wristwatch</tt></td>
+ <td>eyeball and wristwatch</td>
+ </tr>
+ <tr>
+ <td><tt>9</tt></td>
+ <td><tt>sync_telephone</tt></td>
+ <td>telephone modem (ACTS, PTB, etc.)</td>
+ </tr>
</table>
-
<p>The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored.</p>
-
<p>The Event Field displays the most recent event message coded as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>00</tt></td>
-<td><tt>unspecified</tt></td>
-<td>unspecified</td>
-</tr>
-
-<tr>
-<td><tt>01</tt></td>
-<td><tt>freq_not_set</tt></td>
-<td>frequency file not available</td>
-</tr>
-
-<tr>
-<td><tt>02</tt></td>
-<td><tt>freq_set</tt></td>
-<td>frequency set from frequency file</td>
-</tr>
-
-<tr>
-<td><tt>03</tt></td>
-<td><tt>spike_detect</tt></td>
-<td>spike detected</td>
-</tr>
-
-<tr>
-<td><tt>04</tt></td>
-<td><tt>freq_mode</tt></td>
-<td>initial frequency training mode</td>
-</tr>
-
-<tr>
-<td><tt>05</tt></td>
-<td><tt>clock_sync</tt></td>
-<td>clock synchronized</td>
-</tr>
-
-<tr>
-<td><tt>06</tt></td>
-<td><tt>restart</tt></td>
-<td>program restart</td>
-</tr>
-
-<tr>
-<td><tt>07</tt></td>
-<td><tt>panic_stop</tt></td>
-<td>clock error more than 600 s</td>
-</tr>
-
-<tr>
-<td><tt>08</tt></td>
-<td><tt>no_system_peer</tt></td>
-<td>no system peer</td>
-</tr>
-
-<tr>
-<td><tt>09</tt></td>
-<td><tt>leap_armed</tt></td>
-<td>leap second armed from file or Autokey</td>
-</tr>
-
-<tr>
-<td><tt>0a</tt></td>
-<td><tt>leap_disarmed</tt></td>
-<td>leap second disarmed</td>
-</tr>
-
-<tr>
-<td><tt>0b</tt></td>
-<td><tt>leap_event</tt></td>
-<td>leap event</td>
-</tr>
-
-<tr>
-<td><tt>0c</tt></td>
-<td><tt>clock_step</tt></td>
-<td>clock stepped</td>
-</tr>
-
-<tr>
-<td><tt>0d</tt></td>
-<td><tt>kern</tt></td>
-<td>kernel information message</td>
-</tr>
-
-<tr>
-<td><tt>0e</tt></td>
-<td><tt>TAI...</tt></td>
-<td>leapsecond values update from file</td>
-</tr>
-
-<tr>
-<td><tt>0f</tt></td>
-<td><tt>stale leapsecond values</tt></td>
-<td>new NIST leapseconds file needed</td>
-</tr>
-<tr>
-<td><tt>10</tt></td>
-<td><tt>clockhop</tt></td>
-<td>spurious clock hop suppressed</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>00</tt></td>
+ <td><tt>unspecified</tt></td>
+ <td>unspecified</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>freq_not_set</tt></td>
+ <td>frequency file not available</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>freq_set</tt></td>
+ <td>frequency set from frequency file</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>spike_detect</tt></td>
+ <td>spike detected</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>freq_mode</tt></td>
+ <td>initial frequency training mode</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>clock_sync</tt></td>
+ <td>clock synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>restart</tt></td>
+ <td>program restart</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>panic_stop</tt></td>
+ <td>clock error more than 600 s</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>no_system_peer</tt></td>
+ <td>no system peer</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>leap_armed</tt></td>
+ <td>leap second armed from file or Autokey</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>leap_disarmed</tt></td>
+ <td>leap second disarmed</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>leap_event</tt></td>
+ <td>leap event</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>clock_step</tt></td>
+ <td>clock stepped</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>kern</tt></td>
+ <td>kernel information message</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>TAI...</tt></td>
+ <td>leapsecond values update from file</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>stale leapsecond values</tt></td>
+ <td>new NIST leapseconds file needed</td>
+ </tr>
</table>
-
<h4 id="peer">Peer Status Word</h4>
-
<p>The peer status word consists of four fields: Status (0-4), Select (5-7), Count (8-11) and Code (12-15). It is reported in the first line of the <tt>rv <i>associd</i></tt> display produced by the <tt>ntpq</tt> program.</p>
-
<table width="50%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td><div align="center">Status</div></td>
-<td><div align="center">Select</div></td>
-<td><div align="center">Count</div></td>
-<td><div align="center">Code</div></td>
-</tr>
-
+ <tr>
+ <td><div align="center">Status</div></td>
+ <td><div align="center">Select</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Code</div></td>
+ </tr>
</table>
-
<p>The Status Field displays the peer status code bits in hexadecimal; each bit is an independent flag. (Note this field is 5 bits wide, and combines with the the 3-bit-wide Select Field to create the first full byte of the peer status word.) The meaning of each bit in the Status Field is listed in the following table:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>08</tt></td>
-<td><tt>bcst</tt></td>
-<td>broadcast association</td>
-</tr>
-
-<tr>
-<td><tt>10</tt></td>
-<td><tt>reach</tt></td>
-<td>host reachable</td>
-</tr>
-
-<tr>
-<td><tt>20</tt></td>
-<td><tt>authenb</tt></td>
-<td>authentication enabled</td>
-</tr>
-
-<tr>
-<td><tt>40</tt></td>
-<td><tt>auth</tt></td>
-<td>authentication ok</td>
-</tr>
-
-<tr>
-<td><tt>80</tt></td>
-<td><tt>config</tt></td>
-<td>persistent association</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>bcst</tt></td>
+ <td>broadcast association</td>
+ </tr>
+ <tr>
+ <td><tt>10</tt></td>
+ <td><tt>reach</tt></td>
+ <td>host reachable</td>
+ </tr>
+ <tr>
+ <td><tt>20</tt></td>
+ <td><tt>auth</tt></td>
+ <td>authentication ok</td>
+ </tr>
+ <tr>
+ <td><tt>40</tt></td>
+ <td><tt>authenb</tt></td>
+ <td>authentication enabled</td>
+ </tr>
+ <tr>
+ <td><tt>80</tt></td>
+ <td><tt>config</tt></td>
+ <td>persistent association</td>
+ </tr>
</table>
-
<p>The Select Field displays the current selection status. (The T Field in the following table gives the corresponding tally codes used in the <tt>ntpq peers</tt> display.) The values are coded as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>T</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>0</tt></td>
-<td><tt>sel_reject</tt></td>
-<td>&nbsp;</td>
-<td>discarded as not valid (TEST10-TEST13)</td>
-</tr>
-
-<tr>
-<td><tt>1</tt></td>
-<td><tt>sel_falsetick</tt></td>
-<td><tt>x</tt></td>
-<td>discarded by intersection algorithm</td>
-</tr>
-
-<tr>
-<td><tt>2</tt></td>
-<td><tt>sel_excess</tt></td>
-<td><tt>.</tt></td>
-<td>discarded by table overflow (not used)</td>
-</tr>
-
-<tr>
-<td><tt>3</tt></td>
-<td><tt>sel_outlyer</tt></td>
-<td><tt>-</tt></td>
-<td>discarded by the cluster algorithm</td>
-</tr>
-
-<tr>
-<td><tt>4</tt></td>
-<td><tt>sel_candidate</tt></td>
-<td><tt>+</tt></td>
-<td>included by the combine algorithm</td>
-</tr>
-
-<tr>
-<td><tt>5</tt></td>
-<td><tt>sel_backup</tt></td>
-<td><tt>#</tt></td>
-<td>backup (more than <tt>tos maxclock</tt> sources)</td>
-</tr>
-
-<tr>
-<td><tt>6</tt></td>
-<td><tt>sel_sys.peer</tt></td>
-<td><tt>*</tt></td>
-<td>system peer</td>
-</tr>
-
-<tr>
-<td><tt>7</tt></td>
-<td><tt>sel_pps.peer</tt></td>
-<td><tt>o</tt></td>
-<td>PPS peer (when the prefer peer is valid)</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>T</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>sel_reject</tt></td>
+ <td>&nbsp;</td>
+ <td>discarded as not valid (TEST10-TEST13)</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>sel_falsetick</tt></td>
+ <td><tt>x</tt></td>
+ <td>discarded by intersection algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>sel_excess</tt></td>
+ <td><tt>.</tt></td>
+ <td>discarded by table overflow (not used)</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>sel_outlyer</tt></td>
+ <td><tt>-</tt></td>
+ <td>discarded by the cluster algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td><tt>sel_candidate</tt></td>
+ <td><tt>+</tt></td>
+ <td>included by the combine algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>5</tt></td>
+ <td><tt>sel_backup</tt></td>
+ <td><tt>#</tt></td>
+ <td>backup (more than <tt>tos maxclock</tt> sources)</td>
+ </tr>
+ <tr>
+ <td><tt>6</tt></td>
+ <td><tt>sel_sys.peer</tt></td>
+ <td><tt>*</tt></td>
+ <td>system peer</td>
+ </tr>
+ <tr>
+ <td><tt>7</tt></td>
+ <td><tt>sel_pps.peer</tt></td>
+ <td><tt>o</tt></td>
+ <td>PPS peer (when the prefer peer is valid)</td>
+ </tr>
</table>
-
<p>The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored. </p>
-
<p>The Event Field displays the most recent event message coded as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>01</tt></td>
-<td><tt>mobilize</tt></td>
-<td>association mobilized</td>
-</tr>
-
-<tr>
-<td><tt>02</tt></td>
-<td><tt>demobilize</tt></td>
-<td>association demobilized</td>
-</tr>
-
-<tr>
-<td><tt>03</tt></td>
-<td><tt>unreachable</tt></td>
-<td>server unreachable</td>
-</tr>
-
-<tr>
-<td><tt>04</tt></td>
-<td><tt>reachable</tt></td>
-<td>server reachable</td>
-</tr>
-
-<tr>
-<td><tt>05</tt></td>
-<td><tt>restart</tt></td>
-<td>association restart</td>
-</tr>
-
-<tr>
-<td><tt>06</tt></td>
-<td><tt>no_reply</tt></td>
-<td>no server found (<tt>ntpdate</tt> mode)</td>
-</tr>
-
-<tr>
-<td><tt>07</tt></td>
-<td><tt>rate_exceeded</tt></td>
-<td>rate exceeded (kiss code <tt>RATE</tt>)</td>
-</tr>
-
-<tr>
-<td><tt>08</tt></td>
-<td><tt>access_denied</tt></td>
-<td>access denied (kiss code <tt>DENY</tt>)</td>
-</tr>
-
-<tr>
-<td><tt>09</tt></td>
-<td><tt>leap_armed</tt></td>
-<td>leap armed from server LI code</td>
-</tr>
-
-<tr>
-<td><tt>0a</tt></td>
-<td><tt>sys_peer</tt></td>
-<td>become system peer</td>
-</tr>
-
-<tr>
-<td><tt>0b</tt></td>
-<td><tt>clock_event</tt></td>
-<td>see clock status word</td>
-</tr>
-
-<tr>
-<td><tt>0c</tt></td>
-<td><tt>bad_auth</tt></td>
-<td>authentication failure</td>
-</tr>
-
-<tr>
-<td><tt>0d</tt></td>
-<td><tt>popcorn</tt></td>
-<td>popcorn spike suppressor</td>
-</tr>
-
-<tr>
-<td><tt>0e</tt></td>
-<td><tt>interleave_mode</tt></td>
-<td>entering interleave mode</td>
-</tr>
-
-<tr>
-<td><tt>0f</tt></td>
-<td><tt>interleave_error</tt></td>
-<td>interleave error (recovered)</td>
-</tr>
-
-<tr>
-<td><tt>10</tt></td>
-<td><tt>TAI...</tt></td>
-<td>leapsecond values update from server</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>mobilize</tt></td>
+ <td>association mobilized</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>demobilize</tt></td>
+ <td>association demobilized</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>unreachable</tt></td>
+ <td>server unreachable</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>reachable</tt></td>
+ <td>server reachable</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>restart</tt></td>
+ <td>association restart</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>no_reply</tt></td>
+ <td>no server found (<tt>ntpdate</tt> mode)</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>rate_exceeded</tt></td>
+ <td>rate exceeded (kiss code <tt>RATE</tt>)</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>access_denied</tt></td>
+ <td>access denied (kiss code <tt>DENY</tt>)</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>leap_armed</tt></td>
+ <td>leap armed from server LI code</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>sys_peer</tt></td>
+ <td>become system peer</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>clock_event</tt></td>
+ <td>see clock status word</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>bad_auth</tt></td>
+ <td>authentication failure</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>popcorn</tt></td>
+ <td>popcorn spike suppressor</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>interleave_mode</tt></td>
+ <td>entering interleave mode</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>interleave_error</tt></td>
+ <td>interleave error (recovered)</td>
+ </tr>
</table>
-
<h4 id="clock">Clock Status Word</h4>
-
<p>The clock status word consists of four fields: Unused (0-7), Count (8-11) and Code (12-15). It is reported in the first line of the <tt>clockvar <i>associd</i></tt> display produced by the <tt>ntpq</tt> program.</p>
<table width="50%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td><div align="center">Unused</div></td>
-<td><div align="center">Count</div></td>
-<td><div align="center">Code</div></td>
-</tr>
-
+ <tr>
+ <td><div align="center">Unused</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Code</div></td>
+ </tr>
</table>
-
<p>The Count Field displays the number of events since the last <tt>lockvar</tt> command, while the Event Field displays the most recent event message coded as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>00</tt></td>
-<td><tt>clk_unspe</tt></td>
-<td>nominal</td>
-</tr>
-
-<tr>
-<td><tt>01</tt></td>
-<td><tt>clk_noreply</tt></td>
-<td>no reply to poll</td>
-</tr>
-
-<tr>
-<td><tt>02</tt></td>
-<td><tt>clk_badformat</tt></td>
-<td>bad timecode format</td>
-</tr>
-
-<tr>
-<td><tt>03</tt></td>
-<td><tt>clk_fault</tt></td>
-<td>hardware or software fault</td>
-</tr>
-
-<tr>
-<td><tt>04</tt></td>
-<td><tt>clk_bad_signal</tt></td>
-<td>signal loss</td>
-</tr>
-
-<tr>
-<td><tt>05</tt></td>
-<td><tt>clk_bad_date</tt></td>
-<td>bad date format</td>
-</tr>
-
-<tr>
-<td><tt>06</tt></td>
-<td><tt>clk_bad_time</tt></td>
-<td>bad time format</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>00</tt></td>
+ <td><tt>clk_unspe</tt></td>
+ <td>nominal</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>clk_noreply</tt></td>
+ <td>no reply to poll</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>clk_badformat</tt></td>
+ <td>bad timecode format</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>clk_fault</tt></td>
+ <td>hardware or software fault</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>clk_bad_signal</tt></td>
+ <td>signal loss</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>clk_bad_date</tt></td>
+ <td>bad date format</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>clk_bad_time</tt></td>
+ <td>bad time format</td>
+ </tr>
</table>
-
<p>When the clock driver sets the code to a new value, a <tt>clock_alarm</tt> (11) peer event is reported.</p>
-
<h4 id="flash">Flash Status Word</h4>
-
<p>The flash status word is displayed by the <tt>ntpq</tt> program <tt>rv</tt> command. It consists of a number of bits coded in hexadecimal as follows:</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Tag</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>0001</tt></td>
-<td>TEST1</td>
-<td><tt>pkt_dup</tt></td>
-<td>duplicate packet</td>
-</tr>
-
-<tr>
-<td><tt>0002</tt></td>
-<td>TEST2</td>
-<td><tt>pkt_bogus</tt></td>
-<td>bogus packet</td>
-</tr>
-
-<tr>
-<td><tt>0004</tt></td>
-<td>TEST3</td>
-<td><tt>pkt_unsync</tt></td>
-<td>protocol unsynchronized</td>
-</tr>
-
-<tr>
-<td><tt>0008</tt></td>
-<td>TEST4</td>
-<td><tt>pkt_denied</tt></td>
-<td>access denied</td>
-</tr>
-
-<tr>
-<td><tt>0010</tt></td>
-<td>TEST5</td>
-<td><tt>pkt_auth</tt></td>
-<td>bad authentication</td>
-</tr>
-
-<tr>
-<td><tt>0020</tt></td>
-<td>TEST6</td>
-<td><tt>pkt_stratum</tt></td>
-<td>bad synch or stratum</td>
-</tr>
-
-<tr>
-<td><tt>0040</tt></td>
-<td>TEST7</td>
-<td><tt>pkt_header</tt></td>
-<td>bad header</td>
-</tr>
-
-<tr>
-<td><tt>0080</tt></td>
-<td>TEST8</td>
-<td><tt>pkt_autokey</tt></td>
-<td>bad autokey</td>
-</tr>
-
-<tr>
-<td><tt>0100</tt></td>
-<td>TEST9</td>
-<td><tt>pkt_crypto</tt></td>
-<td>bad crypto</td>
-</tr>
-
-<tr>
-<td><tt>0200</tt></td>
-<td>TEST10</td>
-<td><tt>peer_stratum</tt></td>
-<td>peer bad synch or stratum</td>
-</tr>
-
-<tr>
-<td><tt>0400</tt></td>
-<td>TEST11</td>
-<td><tt>peer_dist</tt></td>
-<td>peer distance exceeded</td>
-</tr>
-
-<tr>
-<td><tt>0800</tt></td>
-<td>TEST12</td>
-<td><tt>peer_loop</tt></td>
-<td>peer synchronization loop</td>
-</tr>
-
-<tr>
-<td><tt>1000</tt></td>
-<td>TEST13</td>
-<td><tt>peer_unreach</tt></td>
-<td>peer unreachable</td>
-</tr>
-
+ <tr>
+ <td width="10%">Code</td>
+ <td width="15%">Tag</td>
+ <td width="20%">Message</td>
+ <td width="55%">Description</td>
+ </tr>
+ <tr>
+ <td><tt>0001</tt></td>
+ <td>TEST1</td>
+ <td><tt>pkt_dup</tt></td>
+ <td>duplicate packet</td>
+ </tr>
+ <tr>
+ <td><tt>0002</tt></td>
+ <td>TEST2</td>
+ <td><tt>pkt_bogus</tt></td>
+ <td>bogus packet</td>
+ </tr>
+ <tr>
+ <td><tt>0004</tt></td>
+ <td>TEST3</td>
+ <td><tt>pkt_unsync</tt></td>
+ <td>server not synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>0008</tt></td>
+ <td>TEST4</td>
+ <td><tt>pkt_denied</tt></td>
+ <td>access denied</td>
+ </tr>
+ <tr>
+ <td><tt>0010</tt></td>
+ <td>TEST5</td>
+ <td><tt>pkt_auth</tt></td>
+ <td> authentication failure</td>
+ </tr>
+ <tr>
+ <td><tt>0020</tt></td>
+ <td>TEST6</td>
+ <td><tt>pkt_stratum</tt></td>
+ <td>invalid leap or stratum</td>
+ </tr>
+ <tr>
+ <td><tt>0040</tt></td>
+ <td>TEST7</td>
+ <td><tt>pkt_header</tt></td>
+ <td> header distance exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>0080</tt></td>
+ <td>TEST8</td>
+ <td><tt>pkt_autokey</tt></td>
+ <td>Autokey sequence error</td>
+ </tr>
+ <tr>
+ <td><tt>0100</tt></td>
+ <td>TEST9</td>
+ <td><tt>pkt_crypto</tt></td>
+ <td>Autokey protocol error</td>
+ </tr>
+ <tr>
+ <td><tt>0200</tt></td>
+ <td>TEST10</td>
+ <td><tt>peer_stratum</tt></td>
+ <td> invalid header or stratum</td>
+ </tr>
+ <tr>
+ <td><tt>0400</tt></td>
+ <td>TEST11</td>
+ <td><tt>peer_dist</tt></td>
+ <td> distance threshold exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>0800</tt></td>
+ <td>TEST12</td>
+ <td><tt>peer_loop</tt></td>
+ <td> synchronization loop</td>
+ </tr>
+ <tr>
+ <td><tt>1000</tt></td>
+ <td>TEST13</td>
+ <td><tt>peer_unreach</tt></td>
+ <td> unreachable or nonselect</td>
+ </tr>
</table>
-
<h4 id="kiss">Kiss Codes</h4>
-
-<p>Kiss codes are used in kiss-o'-death (koD) packets, billboard displays and log messages. They consist of a string of four zero-padded ASCII charactes. In practice they are informal and tend to change with time and implementation. Some of these codes can appear in the reference identifier field in <tt>ntpq</tt> billboards. Following is the current list:</p>
-
+<p>Kiss codes are used in kiss-o'-death (KoD) packets, billboard displays and log messages. They consist of a string of four zero-padded ASCII charactes. In practice they are informal and tend to change with time and implementation. Some of these codes can appear in the reference identifier field in <tt>ntpq</tt> billboards. Following is the current list:</p>
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>ACST</tt></td>
-<td>manycast server</td>
-</tr>
-
-<tr>
-<td><tt>AUTH</tt></td>
-<td>authentication error</td>
-</tr>
-
-<tr>
-<td><tt>AUTO</tt></td>
-<td>Autokey sequence error</td>
-</tr>
-
-<tr>
-<td><tt>BCST</tt></td>
-<td>broadcast server</td>
-</tr>
-
-<tr>
-<td><tt>CRYPT</tt></td>
-<td>Autokey protocol error</td>
-</tr>
-
-<tr>
-<td><tt>DENY</tt></td>
-<td>access denied by server</td>
-</tr>
-
-<tr>
-<td><tt>INIT</tt></td>
-<td>association initialized</td>
-</tr>
-
-<tr>
-<td><tt>MCST</tt></td>
-<td>multicast server</td>
-</tr>
-
-<tr>
-<td><tt>RATE</tt></td>
-<td>rate exceeded</td>
-</tr>
-
-<tr>
-<td><tt>TIME</tt></td>
-<td>association timeout</td>
-</tr>
-
-<tr>
-<td><tt>STEP</tt></td>
-<td>step time change</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>ACST</tt></td>
+ <td>manycast server</td>
+ </tr>
+ <tr>
+ <td><tt>AUTH</tt></td>
+ <td>authentication error</td>
+ </tr>
+ <tr>
+ <td><tt>AUTO</tt></td>
+ <td>Autokey sequence error</td>
+ </tr>
+ <tr>
+ <td><tt>BCST</tt></td>
+ <td>broadcast server</td>
+ </tr>
+ <tr>
+ <td><tt>CRYPT</tt></td>
+ <td>Autokey protocol error</td>
+ </tr>
+ <tr>
+ <td><tt>DENY</tt></td>
+ <td>access denied by server</td>
+ </tr>
+ <tr>
+ <td><tt>INIT</tt></td>
+ <td>association initialized</td>
+ </tr>
+ <tr>
+ <td><tt>MCST</tt></td>
+ <td>multicast server</td>
+ </tr>
+ <tr>
+ <td><tt>RATE</tt></td>
+ <td>rate exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>TIME</tt></td>
+ <td>association timeout</td>
+ </tr>
+ <tr>
+ <td><tt>STEP</tt></td>
+ <td>step time change</td>
+ </tr>
</table>
-
<h4 id="crypto">Crypto Messages</h4>
-
<p>These messages are sent to the <tt>cryptostats</tt> file when an error is detected in the Autokey protocol.</p>
-
<table width="100%" border="1" cellspacing="2" cellpadding="2">
-
-<tr>
-<td>Code</td>
-<td>Message</td>
-<td>Description</td>
-</tr>
-
-<tr>
-<td><tt>01</tt></td>
-<td><tt>bad_format</tt></td>
-<td>bad extension field format or length</td>
-</tr>
-
-<tr>
-<td><tt>02</tt></td>
-<td><tt>bad_timestamp</tt></td>
-<td>bad timestamp</td>
-</tr>
-
-<tr>
-<td><tt>03</tt></td>
-<td><tt>bad_filestamp</tt></td>
-<td>bad filestamp</td>
-</tr>
-
-<tr>
-<td><tt>04</tt></td>
-<td><tt>bad_public_key</tt></td>
-<td>bad or missing public key</td>
-</tr>
-
-<tr>
-<td><tt>05</tt></td>
-<td><tt>bad_digest</tt></td>
-<td>unsupported digest type</td>
-</tr>
-
-<tr>
-<td><tt>06</tt></td>
-<td><tt>bad_identity</tt></td>
-<td>unsupported identity type</td>
-</tr>
-
-<tr>
-<td><tt>07</tt></td>
-<td><tt>bad_siglength</tt></td>
-<td>bad signature length</td>
-</tr>
-
-<tr>
-<td><tt>08</tt></td>
-<td><tt>bad signature</tt></td>
-<td>extension field signature not verified</td>
-</tr>
-
-<tr>
-<td><tt>09</tt></td>
-<td><tt>cert_not_verified</tt></td>
-<td>certificate signature not verified</td>
-</tr>
-
-<tr>
-<td><tt>0a</tt></td>
-<td><tt>cert_expired</tt></td>
-<td>host certificate expired</td>
-</tr>
-
-<tr>
-<td><tt>0b</tt></td>
-<td><tt>bad_cookie</tt></td>
-<td>bad or missing cookie</td>
-</tr>
-
-<tr>
-<td><tt>0c</tt></td>
-<td><tt>bad_leapseconds</tt></td>
-<td>bad or missing leapseconds values</td>
-</tr>
-
-<tr>
-<td><tt>0d</tt></td>
-<td><tt>cert_missing</tt></td>
-<td>bad or missing certificate</td>
-</tr>
-
-<tr>
-<td><tt>0e</tt></td>
-<td><tt>bad_group_key</tt></td>
-<td>bad or missing group key</td>
-</tr>
-
-<tr>
-<td><tt>0f</tt></td>
-<td><tt>proto_error</tt></td>
-<td>protocol error</td>
-</tr>
-
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>bad_format</tt></td>
+ <td>bad extension field format or length</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>bad_timestamp</tt></td>
+ <td>bad timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>bad_filestamp</tt></td>
+ <td>bad filestamp</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>bad_public_key</tt></td>
+ <td>bad or missing public key</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>bad_digest</tt></td>
+ <td>unsupported digest type</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>bad_identity</tt></td>
+ <td>unsupported identity type</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>bad_siglength</tt></td>
+ <td>bad signature length</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>bad signature</tt></td>
+ <td>extension field signature not verified</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>cert_not_verified</tt></td>
+ <td>certificate signature not verified</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>cert_expired</tt></td>
+ <td>host certificate expired</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>bad_cookie</tt></td>
+ <td>bad or missing cookie</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>bad_leapseconds</tt></td>
+ <td>bad or missing leapseconds values</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>cert_missing</tt></td>
+ <td>bad or missing certificate</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>bad_group_key</tt></td>
+ <td>bad or missing group key</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>proto_error</tt></td>
+ <td>protocol error</td>
+ </tr>
</table>
-
<hr>
-
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
-
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/discipline.html b/html/discipline.html
new file mode 100644
index 000000000000..53b60ccf8535
--- /dev/null
+++ b/html/discipline.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock Discipline Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock Discipline Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:03<!-- #EndDate -->
+ UTC</p>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">General Overview</a></li>
+ <li class="inline"><a href="#pll">Phase-Lock Loop Operations</a></li>
+ <li class="inline"><a href="#loop">Loop Dynamics</a></li>
+ <li class="inline"><a href="#house">Clock Initialization and Management</a></li>
+</ul>
+<hr>
+<h4 id="intro">General Overview</h4>
+<p>At the heart of the NTP specification and reference implementation is the clock discipline algorithm, which is best described as an adaptive parameter, hybrid phase/frequency-lock feedback loop. It is an intricately crafted algorithm that automatically adapts for optimum performance while minimizing network overhead. Operation is in two modes, phase-lock loop (PLL), which is used at poll intervals below the Allan intercept, by default 2048 s, and frequency-lock loop (FLL), which is used above that.</p>
+<div align="center"> <img src="pic/discipline.gif" alt="gif">
+ <p>Figure 1. Clock Discipline Algorithm</p>
+</div>
+<h4 id="pll">Clock Discipline Operations</h4>
+<p>A block diagram of the clock discipline is shown in Figure 1. The timestamp of a reference clock or remote server is compared with the timestamp of the system clock, represented as a variable frequency oscillator (VFO), to produce a raw offset sample <em>V<sub>d</sub></em>. Offset samples are processed by the clock filter to produce a filtered update <em>V<sub>s</sub></em>. The loop filter implements a type-2 proportional-integrator controller (PIC). The PIC can minimize errors in both time and frequency using predictors <em>x</em> and <em>y</em>, respectively. The clock adjust process samples these predictors once each second for the daemon discipline or once each tick interrupt for the kernel discipline to produce the system clock update <em>V<sub>c</sub></em>.</p>
+<p>In PLL mode the frequency predictor is an integral of the offset over past updates, while the phase predictor is the offset amortized over time in order to avoid setting the clock backward. In FLL mode the phase predictor is not used, while the frequency predictor is similar to the NIST <em>lockclock</em> algorithm. In this algorithm, the frequency predictor is computed as a fraction of the current offset divided by the time since the last update in order to minimize the offset at the next update.</p>
+<p>The discipline response in PLL mode is determined by the <em>time constant</em>, which results in a &quot;stiffness&quot; depending on the jitter of the available sources and the wander of the system clock oscillator. The scaled time constant is also used as the poll interval described on the <a href="poll.html">Poll Program</a> page. However, in NTP symmetric mode, each peer manages its own poll interval and the two might not be the same. In such cases either peer uses the minimum of its own poll interval and that of the other peer, which is included in the NTP packet header.</p>
+<h4 id="loop">Loop Dynamics</h4>
+<p> It is necessary to verify that the clock discipline algorithm is stable and satisfies the Nyquist criterion, which requires that the sampling rate be at least twice the bandwidth. In this case the bandwidth can be approximated by the reciprocal of the time constant. In the NTP specification and reference implementation, time constants and poll intervals are expressed as exponents of 2. By construction, the time constant exponent is five times the poll interval exponent. Thus, the default poll exponent of 6 corresponds to a poll interval of 64 s and a time constant of 2048 s. A change in the poll interval changes the time constant by a corresponding amount.. The Nyquist criterion requires the sample interval to be not more than half the time constant or 1024 s. The clock filter guarantees at least one sample in eight poll intervals, so the sample interval is not more than 512 s. This would be described as oversampling by a factor of two. Finally, the PLL parameters have been chosen for a damping factor of 2, which results in a much faster risetime than with critical damping, but results in modest overshoot of 6 percent.</p>
+<p> It is important to understand how the dynamics of the PLL are affected by the time constant and poll interval. At the default poll interval of 64 s and a step offset change of 100 ms, the time response crosses zero in about 50 min and overshoots about 6 ms, as per design. Ordinarily, a step correction would causes a temporary frequency surge of about 5 PPM, which along with the overshoot slowly dissipates over a few hours.</p>
+<p>However, the clock state machine used with the discipline algorithm avoids this transient at startup. It does this using a previously saved frequency file, if present, or by measuring the oscillator frequency, if not. It then quickly amortizes the residual offset at startup without affecting the oscillator frequency. In this way the offset error is less than 0.5 ms within 5 min, if the file is present, and within 10 min if not. See the <a href="clock.html">Clock State Machine</a> page for further details.</p>
+<p>Since the PLL is linear, the response with different offset step amplitudes and poll intervals has the same characteristic shape, but scaled differently in amplitude and time. The response scales exactly with step amplitude, so that the response to a 10-ms step has the same shape as at 64 s, but with amplitude compressed by one-tenth. The response scales exactly with poll interval, so that response at a poll interval of 8 s has the same shape as at 64 s, but with time compressed by one-eighth.</p>
+<p>The optimum time constant, and thus the poll interval, depends on the network time jitter and the oscillator frequency wander. Errors due to jitter decrease as the time constant increases, while errors due to wander decrease as the time constant decreases. For typical Internet paths, the two error characteristics intersect at a point called the <em>Allan intercept</em>, which represents the optimum time constant. With a compromise Allan intercept of 2048 s, the optimum poll interval is about 64 s, which corresponds to a compromise poll exponent of 6. For fast LANs with modern computers, the Allan intercept is somewhat lower at around 512 s, so a compromise poll exponent of 4 (16 s) is appropriate. An intricate, heuristic algorithm is used to manage the actual poll interval within a specified range. Details are on the <a href="poll.html">Poll Program</a> page.</p>
+<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering severe network congestion. In extreme cases not likely to be encountered in normal operation, the system time can be stepped forward or backward more than 128 ms. Further details are on the <a href="clock.html">Clock State Machine</a> page.</p>
+<h4 id="house">Clock Initialization and Management</h4>
+<p>If left running continuously, an NTP client on a fast LAN in a home or office environment can maintain synchronization nominally within one millisecond. When the ambient temperature variations are less than a degree Celsius, the clock oscillator frequency is disciplined to within one part per million (PPM), even when the clock oscillator native frequency offset is 100 PPM or more.</p>
+<p> For laptops and portable devices when the power is turned off, the battery backup clock offset error can increase as much as one second per day. When power is restored after several hours or days, the clock offset and oscillator frequency errors must be resolved by the clock discipline algorithm, but this can take several hours without specific provisions.</p>
+<p> The provisions described in this section insure that, in all but pathological situations, the startup transient is suppressed to within nominal levels in no more than five minutes after a warm start or ten minutes after a cold start. Following is a summary of these provisions. A detailed discussion of these provisions is on the <a href="clock.html">Clock State Machine</a> page.</p>
+<p> The reference implementation measures the clock oscillator frequency and updates a frequency file at intervals of one hour or more, depending on the measured frequency wander. This design is intended to minimize write cycles in NVRAM that might be used in a laptop or portable device. In a warm start, the frequency is initialized from this file, which avoids a possibly lengthy convergence time. In a cold start when no frequency file is available, the reference implementation first measures the oscillator frequency over a five-min interval. This generally results in a residual frequency error less than 1 PPM. The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>In order to reduce the clock offset error at restart, the reference implementation mext disables oscillator frequency discipline and enables clock offset discipline with a small time constant. This is designed to quickly reduce the clock offset error without causing a frequency surge. This configuration is continued for an interval of five-min, after which the clock offset error is usually no more than a millisecond. The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>Another concern at restart is the time necessary for the select and cluster algorithms to refine and validate the initial clock offset estimate. Normally, this takes several updates before setting the system clock. As the default minimum poll interval in most configurations is about one minute, it can take several minutes before setting the system clock. The <tt>iburst</tt> option of the <a href="confopt.html#burst"><tt>server</tt></a> command changes the behavior at restart and is recommended for client/server configurations. When this option is enabled, the client sends a volley of six requests at intervals of two seconds. This usually insures a reliable estimate is available in about ten seconds before setting the clock. Once this initial volley is complete, the procedures described above are executed.</p>
+<p>As a result of the above considerations, when a backup source, such as the local clock driver, ACTS modem driver or orphan mode is included in the system configuration, it may happen that one or more of them are selectable before one or more of the regular sources are selectable. When backup sources are included in the configuration, the reference implementation waits an interval of several minutes without regular sources before switching to backup sources. This is generally enough to avoid startup transients due to premature switching to backup sources. The interval can be changed using the <tt>orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/discover.html b/html/discover.html
new file mode 100644
index 000000000000..b35359c3d099
--- /dev/null
+++ b/html/discover.html
@@ -0,0 +1,75 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Automatic Server Discoveryschemes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Automatic Server Discovery Schemes</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:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:04<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#assoc">Association Management</a></li>
+ <li class="inline"><a href="#bcst">Broadcast/Multicast Scheme</a></li>
+ <li class="inline"><a href="#mcst">Manycast Scheme</a></li>
+ <li class="inline"><a href="#pool">Server Pool Scheme</a></li>
+</ul>
+<hr>
+<h4 id="modes">Introduction</h4>
+<p>This page describes the automatic server discovery schemes provided in NTPv4. There are three automatic server discovery schemes: broadcast/multicast, many cast, and server pool, which are described on this page. The broadcast/multicast and many cast schemes utilize the ubiquitous broadcast or one-to-many paradigm native to IPv4 and IPv6. The server pool scheme uses DNS to resolve addresses of multiple volunteer servers scattered throughout the world.</p>
+<p> All three schemes work in much the same way and might be described as <i>grab-n'-prune.</i> Through one means or another they grab a number of associations either directly or indirectly from the configuration file, order them from best to worst according to the NTP mitigation algorithms, and prune the surplus associations.</p>
+<h4 id="assoc">Association Management</h4>
+<p>All schemes use an iterated process to discover new preemptable client associations as long as the total number of client associations is less than the <tt>maxclock</tt> option of the <tt>tos</tt> command. The <tt>maxclock</tt> default is 10, but it should be changed in typical configuration to some lower number, usually two greater than the <tt>minclock</tt> option of the same command. </p>
+<p>All schemes use a stratum filter to select just those servers with stratum considered useful. This can avoid large numbers of clients ganging up on a small number of low-stratum servers and avoid servers below or above specified stratum levels. By default, servers of all strata are acceptable; however, the <tt>tos</tt> command can be used to restrict the acceptable range from the <tt>floor</tt> option, inclusive, to the <tt>ceiling</tt> option, exclusive. Potential servers operating at the same stratum as the client will be avoided, unless the <tt>cohort</tt> option is present. Additional filters can be supplied using the methods described on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>The pruning process uses a set of unreach counters, one for each association created by the configuration or discovery processes. At each poll interval, the counter is increased by one. If an acceptable packet arrives for a persistent (configured) or ephemeral (broadcast/multicast) association, the counter is set to zero. If an acceptable packet arrives for a preemptable (manycast, pool) association and survives the selection and clustering algorithms, the counter is set to zero. If the the counter reaches an arbitrary threshold of 10, the association becomes a candidate for pruning.</p>
+<p>The pruning algorithm is very simple. If an ephemeral or preemptable association becomes a candidate for pruning, it is immediately demobilized. If a persistent association becomes a candidate for pruning, it is not demobilized, but its poll interval is set at the maximum. The pruning algorithm design avoids needless discovery/prune cycles for associations that wander in and out of the survivor list, but otherwise have similar characteristics. </p>
+<p>Following is a summary of each scheme. Note that reference to option applies to the commands described on the <a href="confopt.html">Configuration Options</a> page. See that page for applicability and defaults.</p>
+<h4 id="bcst">Broadcast/Multicast Scheme</h4>
+<p>A broadcast server generates messages continuously at intervals by default 64 s and time-to-live by default 127. These defaults can be overridden by the <tt>minpoll</tt> and <tt>ttl</tt> options, respectively. Not all kernels support the <tt>ttl</tt> option. A broadcast client responds to the first message received by waiting a randomized interval to avoid implosion at the server. It then polls the server in client/server mode using the <tt>iburst</tt> option in order to quickly authenticate the server, calibrate the propagation delay and set the client clock. This normally results in a volley of six client/server exchanges at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently.</p>
+<p>Following the volley, the server continues in listen-only mode and sends no further messages. If for some reason the broadcast server does not respond to these messages, the client will cease transmission and continue in listen-only mode with a default propagation delay. The volley can be avoided by using the <tt>broadcastdelay</tt> command with nonzero argument.</p>
+<p>A server is configured in broadcast mode using the <tt>broadcast</tt> command and specifying the broadcast address of a local interface. If two or more local interfaces are installed with different broadcast addresses, a <tt>broadcast</tt> command is needed for each address. This provides a way to limit exposure in a firewall, for example. A broadcast client is configured using the <tt>broadcastclient</tt> command. </p>
+<p>NTP multicast mode can be used to extend the scope using IPv4 multicast or IPv6 broadcast with defined span. The IANA has assigned IPv4 multicast address 224.0.1.1 and IPv6 address 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 specifying a multicast address instead of a broadcast address. A multicast client is configured using the <tt>multicastclient</tt> command specifying a list of one or more multicast addresses. Note that there is a subtle distinction between the IPv4 and IPv6 address families. The IPv4 broadcast or mulitcast mode is determined by the IPv4 class. For IPv6 the same distinction can be made using the link-local prefix FF02 for each interface and site-local prefix FF05 for all interfaces.</p>
+<p>It is possible and frequently useful to configure a host as both broadcast client and broadcast server. A number of hosts configured this way and sharing a common broadcast address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
+<p>Since an intruder can impersonate a broadcast server and inject false time values, broadcast mode should always be cryptographically authenticated. By default, a broadcast association will not be mobilized unless cryptographically authenticated. If necessary, the <tt>auth</tt> option of the <tt>disable</tt> command will disable this feature. The feature can be selectively enabled using the <tt>notrust</tt> option of the <tt>restrict</tt> command.</p>
+<p>With symmetric key cryptography each broadcast server can use the same or different keys. In one scenario on a broadcast LAN,&nbsp;a set of broadcast clients and servers share the same key along with another set that share a different key. Only the clients with matching key will respond to a server broadcast. Further information is on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>Public key cryptography can be used with some restrictions. If multiple servers belonging to different secure groups share the same broadcast LAN, the clients on that LAN&nbsp;must have the client keys for all of them. This scenario is illustrated in the example on the <a href="autokey.html">Autokey Public Key Authentication</a> page.</p>
+<h4 id="mcst">Manycast Scheme</h4>
+<p>Manycast is an automatic server discovery and configuration paradigm new to NTPv4. It is intended as a means for a client to troll the nearby network neighborhood to find cooperating servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. It uses the grab-n'-drop paradigm with the additional feature that active means are used to grab additional servers should the number of associations fall below the <tt>maxclock</tt> option of the <tt>tos</tt> command.</p>
+<p>The manycast paradigm is not 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>A manycast client is configured using the <tt>manycastclient</tt> configuration command, which is similar to the <tt>server</tt> configuration command. It sends ordinary client mode messages, but with a broadcast address rather than a unicast address and sends only if less than <tt>maxclock</tt> associations remain and then only at the minimum feasible rate and minimum feasible time-to-live (TTL) hops. The polling strategy is designed to reduce as much as possible the volume of broadcast messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. There can be as many manycast client associations as different addresses, each one serving as a template for future unicast client/server associations.</p>
+<p>A manycast server is configured using the <tt>manycastserver</tt> command, which listens on the specified broadcast address for manycast client messages. 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 with an ordinary unicast server message.</p>
+<p>The manycast client receiving this message mobilizes a preemptable client association according to the matching manycast client template. This requires the server to be cryptographically authenticated and the server stratum to be less than or equal to the client stratum. </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 multicast group address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
+<p>The use of cryptograpic authentication is always a good idea in any server discovery scheme. Both symmetric key and public key cryptography can be used in the same scenarios as described above for the broadast/multicast scheme.</p>
+<h4 id="pool">Server Pool Scheme</h4>
+<p>The idea of targeting servers on a random basis to distribute and balance the load is not a new one; however, the NTP pool scheme puts this on steroids. At present, several thousand operators around the globe have volunteered their servers for public access. In general, NTP&nbsp;is a lightweight service and servers used for other purposes don't mind an additional small load. The trick is to randomize over the population and minimize the load on any one server while retaining the advantages of multiple servers using the NTP&nbsp;mitigation algorithms.</p>
+<p>To support this service, custom DNS software is used by pool.ntp.org and its subdomains
+ to discover a random selection of participating servers in response to a DNS query.
+ The client receiving this list mobilizes some or all of them, similar to the
+ manycast discovery scheme, and prunes the excess. Unlike <tt>manycastclient</tt>,
+ cryptographic authentication is not required. The pool scheme solicits a single
+ server at a time, compared to <tt>manycastclient</tt> which solicits all servers
+ within a multicast TTL range simultaneously. Otherwise, the pool server discovery
+ scheme operates as manycast does.</p>
+<p>The pool scheme is configured using one or more <tt>pool</tt> commands with DNS names
+ indicating the pool from which to draw. The <tt>pool</tt> command can be used more
+ than once; duplicate servers are detected and discarded. In principle, it is
+ possible to use a configuration file containing a single line <tt>pool
+ pool.ntp.org</tt>. The <a href="http://www.pool.ntp.org/en/use.html">NTP Pool
+ Project</a> offers instructions on using the pool with the <tt>server</tt> command, which is suboptimal but works with older versions of <tt>ntpd</tt> predating the <tt>pool</tt> command. With recent ntpd, consider replacing the
+ multiple <tt>server</tt> commands in their example with a single <tt>pool</tt> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver1.html b/html/drivers/driver1.html
index 9c58265c908b..4518b72d3208 100644
--- a/html/drivers/driver1.html
+++ b/html/drivers/driver1.html
@@ -1,50 +1,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="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>Not: This driver is not recommended for new installations. A much more flexible replacement is available in the form of orphan mode described on the <a href="../assoc.html">Association Management page</a>.</p>
- <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 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 usually, but not necessarily, configure this driver at a stratum greater than any other likely sources of time, such as the default 5 for this driver, to prevent this driver taking over when legitimate sources elsewher in the network are available. To further protect the Internet infrastructure from accidental or malicious exposure to this driver, the driver is desabled if another source is available and operating.</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> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->9-May-2014 08:34<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.1.<i>u</i><br>
+ Reference ID: <tt>LOCL</tt><br>
+ Driver ID: <tt>LOCAL</tt></p>
+<h4>Description</h4>
+<p>Note: <strong>We recommend against using this driver.</strong> A much more flexible replacement is described on the <a href="../orphan.html">Orphan Mode</a> page.</p>
+<p>This driver was 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 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 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 usually, but not necessarily, configure this driver at a stratum greater than any other likely sources of time, such as the default 5 for this driver, to prevent this driver taking over when legitimate sources elsewhere in the network are available. To further protect the Internet infrastructure from accidental or malicious exposure to this driver, the driver is disabled if another source is available and operating.</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></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 5.</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>LOCL</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>
+<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/html/drivers/driver10.html b/html/drivers/driver10.html
index 20391d3b780d..1dd56c102713 100644
--- a/html/drivers/driver10.html
+++ b/html/drivers/driver10.html
@@ -1,53 +1,53 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
- <title>Austron 2200A/2201A GPS Receivers</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Austron 2200A/2201A GPS Receivers</h3>
- <hr>
- <h4>Synopsis</h4>
- <p>Address: 127.127.10.<i>u</i><br>
- Reference ID: <tt>GPS</tt><br>
- Driver ID: <tt>GPS_AS2201</tt><br>
- Serial Port: <tt>/dev/gps<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
- Features: <tt>tty_clk</tt></p>
- <h4>Description</h4>
- <p>This driver supports the Austron 2200A/2201A GPS/LORAN Synchronized Clock and Timing Receiver connected via a serial port. It supports several special features of the clock, including the Input Buffer Module, Output Buffer Module, IRIG-B Interface Module and LORAN Assist Module. It requires the RS232 Buffered Serial Interface module for communication with the driver.</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
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<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.</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></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>
+<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/html/drivers/driver11.html b/html/drivers/driver11.html
index e7c370a5920c..f3c9a81e8a79 100644
--- a/html/drivers/driver11.html
+++ b/html/drivers/driver11.html
@@ -1,29 +1,30 @@
<!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>Description</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
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<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>Description</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)
@@ -32,10 +33,10 @@ 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
+<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
@@ -45,41 +46,40 @@ F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock failure, time not reliable
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
+<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
+<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></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>
+<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/html/drivers/driver12.html b/html/drivers/driver12.html
index 6d0b38ab76fa..3b6fc1565cb8 100644
--- a/html/drivers/driver12.html
+++ b/html/drivers/driver12.html
@@ -1,49 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
- <title>KSI/Odetics TPRO/S IRIG Interface</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>KSI/Odetics TPRO/S IRIG Interface</h3>
- <hr>
- <h4>Synopsis</h4>
- <p>Address: 127.127.12.<i>u</i><br>
- Reference ID: <tt>IRIG</tt><br>
- Driver ID: <tt>IRIG_TPRO</tt><br>
- TPRO Device: <tt>/dev/tpro<i>u</i></tt><br>
- Requires: KSI/Odetics device driver, <tt>/usr/include/sys/tpro.h</tt> header file</p>
- <h4>Description</h4>
- <p>This driver supports the KSI/Odetics TPRO and TPRO-SAT IRIG-B Decoder, which is a module connected directly to the SBus of a Sun workstation. The module works with the IRIG-B signal generated by several radio clocks, including those made by Arbiter, Austron, Odetics, Spectracom and TrueTime, among others, although it is generally an add- on option. In the case of the TPRO-SAT, the module is an integral part of a GPS receiver, which serves as the primary timing source.</p>
- <p>Using the TPRO interface as a NTP reference clock provides precision time only to ntpd and its clients. With suitable kernel modifications, it is possible to use the TPRO as the CPU system clock, avoiding errors introduced by the CPU clock oscillator wander. See the <a href="../kern.html">A Kernel Model for Precision Timekeeping </a>page for further details.</p>
- <h4>Fudge Factors</h4>
- <dl>
- <dt><tt>time1 <i>time</i></tt>
- <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
- <dt><tt>time2 <i>time</i></tt>
- <dd>Not used by this driver.
- <dt><tt>stratum <i>number</i></tt>
- <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
- <dt><tt>refid <i>string</i></tt>
- <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.
- <dt><tt>flag1 0 | 1</tt>
- <dd>Not used by this driver.
- <dt><tt>flag2 0 | 1</tt>
- <dd>Not used by this driver.
- <dt><tt>flag3 0 | 1</tt>
- <dd>Not used by this driver.
- <dt><tt>flag4 0 | 1</tt>
- <dd>Not used by this driver.
- </dl>
- <h4>Additional Information</h4>
- <p><a href="../refclock.html">Reference Clock Drivers</a></p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<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></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>
+<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/html/drivers/driver16.html b/html/drivers/driver16.html
index 95308ba1621a..74a3bd640db8 100644
--- a/html/drivers/driver16.html
+++ b/html/drivers/driver16.html
@@ -2,30 +2,33 @@
<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>
+ <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>
+ <body>
+ <h3>bc635VME/bc350VXI Time and Frequency Processor</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <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
+</html>
diff --git a/html/drivers/driver18.html b/html/drivers/driver18.html
index a4dc76924462..02fb5d2d8b94 100644
--- a/html/drivers/driver18.html
+++ b/html/drivers/driver18.html
@@ -1,82 +1,82 @@
<!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/USNO/PTB Modem Time Services</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>NIST/USNO/PTB Modem Time Services</h3>
- <hr>
- <h4>Synopsis</h4>
- <p>Address: 127.127.18.<i>u</i><br>
- Reference ID: <tt>NIST | USNO | PTB | WWVB</tt><br>
- Driver ID: <tt>ACTS_MODEM</tt><br>
- Serial Port: <tt>/dev/acts<i>u</i></tt>; 9600 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 and a dial-out (cua)&nbsp;device.</p>
- <h4>Description</h4>
- <p>This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS&nbsp;and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available. It can also be configured to operate full period.</p>
- <p>For best results the indicated time must be corrected for the modem and telephone circuit propagation delays, which can reach 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.</p>
- <p>This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO&nbsp;to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
- <p>There are three modes of operation selected by the <tt>mode</tt> keyword in the <tt>server</tt> configuration command. In manual mode (2) the calling program is initiated by setting fudge <tt>flag1</tt>. This can be done manually using <tt>ntpdc</tt>, or by a cron job. In auto mode (0) <tt>flag1</tt> is set at each poll event. In backup mode (1) <tt>flag1</tt> is set at each poll event, but only if no other synchronization sources are available.</p>
- <p>When <tt>flag1</tt> is set, the calling program dials the first number in the list specified by the <tt>phone</tt> command. If the call fails for any reason, the program dials the second number and so on. The phone number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The <tt>flag1</tt> is reset and the calling program terminated if (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 <tt>flag1</tt> is reset manually using <tt>ntpdc</tt>.</p>
- <p>The driver automatically recognizes the message format of each modem time service. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.</p>
- <p>Ordinarily, the serial port is connected to a modem; however, if fudge <tt>flag3</tt> is set, it can be connected directly to a Spectracom WWV or GPS radio for testing or calibration. The Spectracom radio can be connected via a modem if the radio is connfigured to send time codes continuoulsly at 1-s intervals. In principle, fudge <tt>flag2</tt> enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.</p>
- <p>The <tt>minpoll</tt> and <tt>maxpoll</tt> keywords of the server configuration command can be used to limit the intervals between calls. The recommended settings are 12 (1.1 hours) for <tt>minpoll</tt> and 17 (36 hours) for <tt>maxpoll</tt>. Ordinarily, the poll interval will start at <tt>minpoll</tt> and ramp up to <tt>maxpoll</tt> in a day or two.</p>
- <h4>US Phone Numbers and Formats</h4>
- <p>Note: Phone numbers include the entire Hayes modem command, including the <tt>ATDT</tt> and other control codes as may be necessary. For most cases only the <tt>ATDT</tt> may be necessary.</p>
- <p><a href="http://www.boulder.nist.gov/timefreq">National Institute of Science and Technology (NIST)</a></p>
- <p>Phone: (303) 494-4774 (Boulder, CO); (808) 335-4721 (Hawaii)</p>
- <p><a href="http://www.boulder.nist.gov/timefreq/service/acts.htm">Data Format</a></p>
- <p><tt>National Institute of Standards and Technology<br>
- Telephone Time Service, Generator 3B<br>
- Enter question mark &quot;?&quot; for HELP<br>
- MJD YR MO DA H M S ST S UT1 msADV &lt;OTM&gt;<br>
- 47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *<br>
- 47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) #<br>
- ...</tt></p>
- <p><tt>MJD</tt>, <tt>YR</tt>, <tt>ST</tt>, <tt>UT1</tt> and <tt>UTC(NIST)</tt> are not used by this driver. The <tt>&lt;OTM&gt;</tt> on-time character &quot;<tt>*</tt>&quot; changes to &quot;<tt>#</tt>&quot;&nbsp;when the delay correction is valid.</p>
- <p><a href="http://tycho.usno.navy.mil">US Naval Observatory (USNO)</a></p>
- <p>Phone: (202) 762-1594 (Washington, DC); (719) 567-6742 (Boulder, CO)</p>
- <p><a href="http://tycho.usno.navy.mil/modem_time.html">Data Format</a> (two lines, repeating at one-second intervals)</p>
- <p><tt>jjjjj nnn hhmmss UTC</tt></p>
- <p>* on-time character for previous timecode message<br>
- jjjjj modified Julian day number (not used)<br>
- nnn day of year<br>
- hhmmss second of day</p>
- <p><a href="tf582_4.html">European Phone Numbers and Formats</a></p>
- <p><a href="http://www.spectracomcorp.com">Spectracom GPS and WWVB Receivers</a></p>
- <p>If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a <tt>T</tt> in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.</p>
- <h4>Monitor Data</h4>
- <p>The received timecode is written as-is to the <tt>clockstats</tt> file along with the Hayes connection and hangup commands and result codes.</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>Set by the driver to (one of) <tt>NIST</tt>, <tt>USNO</tt>, <tt>PTB</tt> or <tt>WWVB</tt>.
- <dt><tt>flag1 0 | 1</tt>
- <dd>Initiate a call if 1. Automatically reset by program.
- <dt><tt>flag2 0 | 1</tt>
- <dd>Enables port locking if 1, disables if 0 (default).
- <dt><tt>flag3 0 | 1</tt>
- <dd>Enables direct connection if 1, or modem if 0 (default). If set, the driver will send a single character 'T' at every poll event.
- <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
+<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/USNO/PTB Modem Time Services</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NIST/USNO/PTB Modem Time Services</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 10:44<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.18.<i>u</i><br>
+ Reference ID: <tt>NIST | USNO | PTB | WWVB</tt><br>
+ Driver ID: <tt>ACTS_MODEM</tt><br>
+ Serial Port: <tt>/dev/acts<i>u</i></tt>; 9600 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 and a dial-out (cua)&nbsp;device.</p>
+<h4>Description</h4>
+<p>This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS&nbsp;and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available. It can also be configured to operate full period.</p>
+<p>For best results the indicated time must be corrected for the modem and telephone circuit propagation delays, which can reach 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.</p>
+<p>This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO&nbsp;to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
+<p>There are three modes of operation selected by the <tt>mode</tt> keyword in the <tt>server</tt> configuration command. In manual mode (2) the calling program is initiated by setting fudge <tt>flag1</tt>. This can be done manually using <tt>ntpq</tt>, or by a cron job. In auto mode (0) <tt>flag1</tt> is set at each poll event. In backup mode (1) <tt>flag1</tt> is set at each poll event, but only if no other synchronization sources are available.</p>
+<p>When <tt>flag1</tt> is set, the calling program dials the first number in the list specified by the <tt>phone</tt> command. If the call fails for any reason, the program dials the second number and so on. The phone number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The <tt>flag1</tt> is reset and the calling program terminated if (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 <tt>flag1</tt> is reset manually using <tt>ntpq</tt>.</p>
+<p>The driver automatically recognizes the message format of each modem time service. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.</p>
+<p>The Spectracom radio can be connected via a modem if the radio is configured to send time codes continuously at 1-s intervals. In principle, fudge <tt>flag2</tt> enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.</p>
+<p>The <tt>minpoll</tt> and <tt>maxpoll</tt> keywords of the server configuration command can be used to limit the intervals between calls. The recommended settings are 12 (1.1 hours) for <tt>minpoll</tt> and 17 (36 hours) for <tt>maxpoll</tt>. Ordinarily, the poll interval will start at <tt>minpoll</tt> and ramp up to <tt>maxpoll</tt> in a day or two.</p>
+<h4>US Phone Numbers and Formats</h4>
+<p>Note: Phone numbers include the entire Hayes modem command, including the <tt>ATDT</tt> and other control codes as may be necessary. For most cases only the <tt>ATDT</tt> may be necessary.</p>
+<p><a href="http://www.boulder.nist.gov/timefreq">National Institute of Science and Technology (NIST)</a></p>
+<p>Phone: (303) 494-4774 (Boulder, CO); (808) 335-4721 (Hawaii)</p>
+<p><a href="http://www.boulder.nist.gov/timefreq/service/acts.htm">Data Format</a></p>
+<p><tt>National Institute of Standards and Technology<br>
+ Telephone Time Service, Generator 3B<br>
+ Enter question mark &quot;?&quot; for HELP<br>
+ MJD YR MO DA H M S ST S UT1 msADV &lt;OTM&gt;<br>
+ 47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *<br>
+ 47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) #<br>
+ ...</tt></p>
+<p><tt>MJD</tt>, <tt>YR</tt>, <tt>ST</tt>, <tt>UT1</tt> and <tt>UTC(NIST)</tt> are not used by this driver. The <tt>&lt;OTM&gt;</tt> on-time character &quot;<tt>*</tt>&quot; changes to &quot;<tt>#</tt>&quot;&nbsp;when the delay correction is valid.</p>
+<p><a href="http://tycho.usno.navy.mil">US Naval Observatory (USNO)</a></p>
+<p>Phone: (202) 762-1594 (Washington, DC); (719) 567-6742 (Boulder, CO)</p>
+<p><a href="http://tycho.usno.navy.mil/modem_time.html">Data Format</a> (two lines, repeating at one-second intervals)</p>
+<p><tt>jjjjj nnn hhmmss UTC</tt></p>
+<p>* on-time character for previous timecode message<br>
+ jjjjj modified Julian day number (not used)<br>
+ nnn day of year<br>
+ hhmmss second of day</p>
+<p><a href="tf582_4.html">European Phone Numbers and Formats</a></p>
+<p><a href="http://www.spectracomcorp.com">Spectracom GPS and WWVB Receivers</a></p>
+<p>If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a <tt>T</tt> in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.</p>
+<h4>Monitor Data</h4>
+<p>The received timecode is written as-is to the <tt>clockstats</tt> file along with the Hayes connection and hang-up commands and result codes.</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>Set by the driver to (one of) <tt>NIST</tt>, <tt>USNO</tt>, <tt>PTB</tt> or <tt>WWVB</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Initiate a call if 1. Automatically reset by program.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Enables port locking if 1, disables if 0 (default).</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>
+<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>
diff --git a/html/drivers/driver19.html b/html/drivers/driver19.html
index e498969f10c9..2c8278fb03a7 100644
--- a/html/drivers/driver19.html
+++ b/html/drivers/driver19.html
@@ -1,59 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
- <title>Heath WWV/WWVH Receiver</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Heath WWV/WWVH Receiver</h3>
- <hr>
- <h4>Synopsis</h4>
- <p>Address: 127.127.19.<i>u</i><br>
- Reference ID: <tt>WWV</tt><br>
- Driver ID: <tt>WWV_HEATH</tt><br>
- Serial Port: <tt>/dev/heath<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
- Features: <tt>tty_clk</tt><br>
- Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
- <h4>Description</h4>
- <p>This driver supports the Heath GC-1000 Most Accurate Clock, with RS232C Output Accessory. This is a WWV/WWVH receiver somewhat less robust than other supported receivers. It's 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;
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<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. It's 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
+<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></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.html">Reference Clock Drivers</a>&nbsp;</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver2.html b/html/drivers/driver2.html
deleted file mode 100644
index 20bad64a259b..000000000000
--- a/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/html/drivers/driver20.html b/html/drivers/driver20.html
index 9b871a937f09..6391e869359f 100644
--- a/html/drivers/driver20.html
+++ b/html/drivers/driver20.html
@@ -1,105 +1,432 @@
<!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>Generic NMEA GPS Receiver</title>
+ <!-- Changed by: Harlan &, 31-Mar-2014 -->
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ table.dlstable { font-size:85%; }
+ td.ttf{ font-family:Courier; font-weight:bold; }
+ </style></head>
-<html>
-
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
- <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 - 115200 bps, 8-bits, no parity<br>
- Serial Port: <tt>/dev/gpspps<i>u</i></tt>; for just the PPS signal (this is tried first for PPS, before <tt>/dev/gps<i>u</i></tt>)<br>
- Serial Port: <tt>/dev/gps<i>u</i></tt>; symlink to server:port (for nmead) Features: <tt>tty_clk</tt></p>
- <h4>Description</h4>
- <p>This driver supports GPS receivers with the <tt>$GPRMC, $GPGLL, $GPGGA, $GPZDA, and $GPZDG</tt> NMEA sentences by default.&nbsp; Note that Accord's custom NMEA sentence <tt>$GPZDG</tt> reports using the GPS timescale, while the rest of the sentences report UTC.&nbsp; The difference between the two is a whole number of seconds which increases with each leap second insertion in UTC.&nbsp; To avoid problems mixing UTC and GPS timescales, the driver disables processing of UTC sentences once <tt>$GPZDG</tt> is received.</p>
- <p>The driver expects the receiver to be set up to transmit at least one supported sentence every second.</p>
- <p>The accuracy depends on the receiver used. Inexpensive 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 PPSAPI (<a href="http://www.ietf.org/rfc/rfc2783.txt">RFC 2783</a>), fudge flag1 1 enables its use.<br>&nbsp;</p>
- <p>The various GPS sentences that this driver recognises look like this:<br>
- (others quietly ignored)</p>
- <pre><tt>$GPRMC,UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CS&lt;cr&gt;&lt;lf&gt;
-$GPGLL,LAT,LAT_REF,LONG,LONG_REF,UTC,POS_STAT*CS&lt;cr&gt;&lt;lf&gt;
-$GPGGA,UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CS&lt;cr&gt;&lt;lf&gt;
-$GPZDA,UTC,DD,MM,YYYY,TH,TM,*CS&lt;cr&gt;&lt;lf&gt;
-$GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS&lt;cr&gt;&lt;lf&gt;
-
-&nbsp; UTC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Time of day on UTC timescale. 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; GPSTIME&nbsp; - Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.f])
-&nbsp; DD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Day of the month (1-31)
-&nbsp; MM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Month of the year (1-12)
-&nbsp; YYYY&nbsp;&nbsp;&nbsp;&nbsp; - Year
-&nbsp; AA.BB&nbsp;&nbsp;&nbsp; - Denotes the signal strength (should be &lt 05.00)
-&nbsp; V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - GPS sync status
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '0' =&gt INVALID time,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1' =&gt accuracy of +/- 20ms,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '2' =&gt accuracy of +/- 100ns
-&nbsp; CS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Checksum
-&nbsp; &lt;cr&gt;&lt;lf&gt; - Sentence terminator.</tt></pre>
-
-<p>Specific GPS sentences and bitrates may be selected by setting bits of the 'mode' in the server configuration line:<br>
- &nbsp;&nbsp;<tt>server 127.127.20.x mode X</tt><br>&nbsp;&nbsp;&nbsp; bit 0 - process <tt>$GPMRC</tt>&nbsp;&nbsp;&nbsp; (value = 1)<br>&nbsp;&nbsp;&nbsp; bit 1 - process <tt>$GPGGA</tt>&nbsp;&nbsp;&nbsp; (value = 2)<br>&nbsp;&nbsp;&nbsp; bit 2 - process <tt>$GPGLL</tt>&nbsp;&nbsp;&nbsp; (value = 4)<br>&nbsp;&nbsp;&nbsp; bit 4 - process <tt>$GPZDA</tt> or <tt>$GPZDG</tt>&nbsp;&nbsp;&nbsp; (value = 8)<br>
-<p>The default (mode 0) is to process all supported sentences, which results in the last received each cycle being used.&nbsp; Multiple sentences may be selected by adding their mode bit values.&nbsp; The driver uses 4800 bits per second by default.&nbsp; Faster bitrates can be selected using bits 4, 5, and 6 of the mode field:<br><br>
- &nbsp;&nbsp;&nbsp; bits 4/5/6 - select serial bitrate&nbsp;&nbsp; (0 for 4800 - the default, 16 for 9600, 32 for 19200, 48 for 38400, 64 for 57600, 80 for 115200)<br></p>
- <p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr&gt;&lt;lf&gt;</tt> command each poll interval.&nbsp; This is not needed on most GPS receivers because they automatically send <tt>$GPRMC</tt> every second, but helps a Motorola GPS receiver that is otherwise silent.&nbsp; NMEA devices ignore commands they do not understand.</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 that is used is written to the clockstats file and available with ntpq -c clockvar.</p>
- <h4>Fudge Factors</h4>
- <dl>
- <dt><tt>time1 <i>time</i></tt>
- <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.
- <dt><tt>time2 <i>time</i></tt>
- <dd>Specifies the serial end of line time offset calibration factor, 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>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>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.
- <dt><tt>flag2 0 | 1</tt>
- <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.
- <dt><tt>flag3 0 | 1</tt>
- <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.
- <dt><tt>flag4 0 | 1</tt>
- <dd>Obscures location in timecode: 0 for disable (default), 1 for enable.
- </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>
+
+
+ <body>
+ <h3>Generic NMEA GPS Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 03:55<!-- #EndDate -->
+ UTC</p>
+ <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 - 115200 bps, 8-bits, no parity<br>
+ Serial Port: <tt>/dev/gpspps<i>u</i></tt>; for just the PPS signal (this
+ is tried first for PPS, before <tt>/dev/gps<i>u</i></tt>)<br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; symlink to server:port (for nmead)<br>
+ Features: <tt>tty_clk</tt>
+ </p>
+
+ <h4>Description</h4>
+
+ <p>
+ This driver supports GPS receivers with
+ the <tt>$GPRMC</tt>, <tt>$GPGLL</tt>, <tt>$GPGGA</tt>, <tt>$GPZDA</tt>
+ and <tt>$GPZDG</tt> NMEA sentences by default.&nbsp; Note that Accord's
+ custom NMEA sentence <tt>$GPZDG</tt> reports using the GPS timescale,
+ while the rest of the sentences report UTC.&nbsp; The difference between
+ the two is a whole number of seconds which increases with each leap
+ second insertion in UTC.&nbsp; To avoid problems mixing UTC and GPS
+ timescales, the driver disables processing of UTC sentences
+ once <tt>$GPZDG</tt> is received.
+ </p>
+ <p>
+ The driver expects the receiver to be set up to transmit at least one
+ supported sentence every second.
+ </p>
+ <p>
+ The accuracy depends on the receiver used. Inexpensive GPS models are
+ available with a claimed PPS signal accuracy of
+ 1 &mu;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 PPSAPI
+ (<a href="http://www.ietf.org/rfc/rfc2783.txt">RFC 2783</a>), fudge flag1
+ 1 enables its use.
+ </p>
+ <p>
+ The various GPS sentences that this driver recognises look like this:<br>
+ (others quietly ignored)
+ </p>
+
+ <p><table class="dlstable" border="1">
+ <caption>Accepted NMEA sentences</caption>
+ <tbody><tr>
+ <th>Sentence</th>
+ <th>Vendor</th>
+ </tr><tr>
+ <td class="ttf">$GPRMC,UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPGLL,LAT,LAT_REF,LON,LON_REF,UTC,POS_STAT*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPGGA,UTC,LAT,LAT_REF,LON,LON_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPZDA,UTC,DD,MM,YYYY,TH,TM,*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS&lt;cr&gt;&lt;lf&gt;</td>
+ <td>Accord</td>
+ </tr>
+ </tbody></table></p>
+
+ <p><table class="dlstable" border="1">
+ <caption>NMEA data items</caption>
+ <tbody><tr>
+ <th>Symbol</th>
+ <th>Meaning and Format</th>
+ </tr>
+
+ <tr>
+ <td class="ttf">UTC</td>
+ <td>Time of day on UTC timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])</td>
+ </tr><tr>
+ <td class="ttf">POS_STAT</td>
+ <td>Position status. (A = Data valid, V = Data invalid)</td>
+ </tr><tr>
+ <td class="ttf">LAT</td>
+ <td>Latitude (llll.ll)</td>
+ </tr><tr>
+ <td class="ttf">LAT_REF</td>
+ <td>Latitude direction. (N = North, S = South)</td>
+ </tr><tr>
+ <td class="ttf">LON</td>
+ <td>Longitude (yyyyy.yy)</td>
+ </tr><tr>
+ <td class="ttf">LON_REF</td>
+ <td>Longitude direction (E = East, W = West)</td>
+ </tr><tr>
+ <td class="ttf">SPD</td>
+ <td>Speed over ground. (knots) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">HDG</td>
+ <td>Heading/track made good (degrees True) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">DATE</td>
+ <td>Date (ddmmyy)</td>
+ </tr><tr>
+ <td class="ttf">MAG_VAR</td>
+ <td>Magnetic variation (degrees) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">MAG_REF</td>
+ <td>Magnetic variation (E = East, W = West)</td>
+ </tr><tr>
+ <td class="ttf">FIX_MODE</td>
+ <td>Position Fix Mode (0 = Invalid, &gt;0 = Valid)</td>
+ </tr><tr>
+ <td class="ttf">SAT_USED</td>
+ <td>Number of Satellites used in solution</td>
+ </tr><tr>
+ <td class="ttf">HDOP</td>
+ <td>Horizontal Dilution of Precision</td>
+ </tr><tr>
+ <td class="ttf">ALT</td>
+ <td>Antenna Altitude</td>
+ </tr><tr>
+ <td class="ttf">ALT_UNIT</td>
+ <td>Altitude Units (Metres/Feet)</td>
+ </tr><tr>
+ <td class="ttf">GEO</td>
+ <td>Geoid/Elipsoid separation</td>
+ </tr><tr>
+ <td class="ttf">G_UNIT</td>
+ <td>Geoid units (M/F)</td>
+ </tr><tr>
+ <td class="ttf">D_AGE</td>
+ <td>Age of last DGPS Fix</td>
+ </tr><tr>
+ <td class="ttf">D_REF</td>
+ <td>Reference ID of DGPS station</td>
+ </tr><tr>
+ <td class="ttf">GPSTIME</td>
+ <td>Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.f])</td>
+ </tr><tr>
+ <td class="ttf">DD</td>
+ <td>Day of the month (1-31)</td>
+ </tr><tr>
+ <td class="ttf">MM</td>
+ <td>Month of the year (1-12)</td>
+ </tr><tr>
+ <td class="ttf">YYYY</td>
+ <td>Year</td>
+ </tr><tr>
+ <td class="ttf">AA.BB</td>
+ <td>Denotes the signal strength (should be &lt; 05.00)</td>
+ </tr><tr>
+ <td class="ttf">V</td>
+ <td>GPS sync status<br>
+ &nbsp;&nbsp;&nbsp;'0' =&gt; INVALID time,<br>
+ &nbsp;&nbsp;&nbsp;'1' =&gt; accuracy of +/- 20ms,<br>
+ &nbsp;&nbsp;&nbsp;'2' =&gt; accuracy of +/- 100ns</td>
+ </tr><tr>
+ <td class="ttf">CS</td>
+ <td> Checksum</td>
+ </tr><tr>
+ <td class="ttf">&lt;cr&gt;&lt;lf&gt;</td>
+ <td>Sentence terminator.</td>
+ </tr>
+ </tbody></table></p>
+
+
+ <h4>The 'mode' byte</h4>
+
+ <p>
+ Specific GPS sentences and bitrates may be selected by setting bits of
+ the 'mode' in the server configuration line:<br> &nbsp;&nbsp;<tt>server
+ 127.127.20.x mode X</tt>
+ </p>
+
+ <table border="1">
+ <caption>mode byte bits and bit groups</caption>
+ <tbody><tr>
+ <th align="center">Bit</th>
+ <th align="center">Decimal</th>
+ <th align="center">Hex</th>
+ <th align="left">Meaning</th>
+ </tr>
+
+ <tr>
+ <td align="center">0</td>
+ <td align="center">1</td>
+ <td align="center">1</td>
+ <td>process <tt>$GPMRC</tt></td>
+ </tr><tr>
+ <td align="center">1</td>
+ <td align="center">2</td>
+ <td align="center">2</td>
+ <td>process <tt>$GPGGA</tt></td>
+ </tr><tr>
+ <td align="center">2</td>
+ <td align="center">4</td>
+ <td align="center">4</td>
+ <td>process <tt>$GPGLL</tt></td>
+ </tr><tr>
+ <td align="center">3</td>
+ <td align="center">8</td>
+ <td align="center">8</td>
+ <td>process <tt>$GPZDA</tt> or <tt>$GPZDG</tt></td>
+ </tr><tr>
+ <td rowspan="6" align="center">4-6</td>
+ <td align="center">0</td>
+ <td align="center">0</td>
+ <td>linespeed 4800 bps</td>
+ </tr><tr>
+ <td align="center">16</td>
+ <td align="center">0x10</td>
+ <td>linespeed 9600 bps</td>
+ </tr><tr>
+ <td align="center">32</td>
+ <td align="center">0x20</td>
+ <td>linespeed 19200 bps</td>
+ </tr><tr>
+ <td align="center">48</td>
+ <td align="center">0x30</td>
+ <td>linespeed 38400 bps</td>
+ </tr><tr>
+ <td align="center">64</td>
+ <td align="center">0x40</td>
+ <td>linespeed 57600 bps</td>
+ </tr><tr>
+ <td align="center">80</td>
+ <td align="center">0x50</td>
+ <td>linespeed 115200 bps</td>
+ </tr><tr>
+ <td align="center">7</td>
+ <td align="center">128</td>
+ <td align="center">0x80</td>
+ <td>Write the sub-second fraction of the receive time stamp to the
+ clockstat file for all recognised NMEA sentences. This can be used to
+ get a useful value for fudge time2.<br><strong>Caveat:</strong> This
+ will fill your clockstat file rather fast. Use it only temporarily to
+ get the numbers for the NMEA sentence of your choice.</td>
+ </tr>
+ </tr><tr>
+ <td align="center">8</td>
+ <td align="center">256</td>
+ <td align="center">0x100</td>
+ <td>process <tt>$PGRMF</tt></td>
+ </tr><tr>
+ <td align="center">9-15</td>
+ <td align="center"></td>
+ <td align="center">0xFE00</td>
+ <td>reserved - leave 0</td>
+ </tr><tr>
+ <td align="center">16</td>
+ <td align="center">65536</td>
+ <td align="center">0x10000</td>
+ <td>Append extra statistics to the clockstats line.
+ Details below.</td>
+ </tr>
+ </tbody></table>
+
+
+ <p>
+ The default (mode 0) is to process all supported sentences at a linespeed
+ of 4800 bps, which results in the first one received and recognised in
+ each cycle being used.&nbsp; If only specific sentences should be
+ recognised, then the mode byte must be chosen to enable only the selected
+ ones.&nbsp; Multiple sentences may be selected by adding their mode bit
+ values, but of those enabled still only the first received sentence in a
+ cycle will be used.&nbsp; Using more than one sentence per cycle is
+ impossible, because
+ </p><ul>
+ <li>there is only <a href="#fudgetime2">fudge time2</a> available to
+ compensate for transmission delays but every sentence would need a
+ different one and
+ </li><li>using more than one sentence per cycle overstuffs the internal data
+ filters.
+ </li></ul>
+ The driver uses 4800 bits per second by default, but faster bitrates can
+ be selected using bits 4 to 6 of the mode field.
+ <p></p>
+
+ <p>
+ <strong>Caveat:</strong> Using higher line speeds does not necessarily
+ increase the precision of the timing device.&nbsp; Higher line speeds are
+ not necessarily helpful for the NMEA driver, either.&nbsp; They can be
+ used to accomodate for an amount of data that does not fit into a
+ 1-second cycle at 4800 bps, but high-speed high-volume NMEA data is likely
+ to cause trouble with the serial line driver since NMEA supports no
+ protocol handshake.&nbsp; Any device that is exclusively used for time
+ synchronisation purposes should be configured to transmit the relevant
+ data only, e.g. one <tt>$GPRMC</tt> or <tt>$GPZDA</tt> per second, at a
+ linespeed of 4800 bps or 9600 bps.
+ </p>
+
+ <h4>Monitor Data</h4>
+
+ <p>The last GPS sentence that is accepted or rejected is written to the
+ clockstats file and available with <code>ntpq -c clockvar</code>.
+ (Logging the rejected sentences lets you see/debug why they were rejected.)
+ Filtered sentences are not logged.</p>
+
+ <p>
+ If the 0x10000 mode bit is on and clockstats is enabled, several extra
+ counters will be appended to the NMEA sentence that gets logged.
+ For example:
+<pre>
+56299 76876.691 127.127.20.20 $GPGGA,212116.000,3726.0785,N,12212.2605,W,1,05,2.0,17.0,M,-25.7,M,,0000*5C 228 64 0 0 64 0
+</pre>
+ </p>
+
+ <table border="1">
+ <caption>Clockstats</caption>
+ <tbody><tr>
+ <th align="center">Column</th>
+ <th align="center">Sample</th>
+ <th align="left">Meaning</th>
+ </tr>
+
+ <tr>
+ <td align="center">1</td>
+ <td align="center">56299</td>
+ <td>MJD</td>
+ </tr><tr>
+ <td align="center">2</td>
+ <td align="center">76876.691</td>
+ <td>Time of day in seconds</td>
+ </tr><tr>
+ <td align="center">3</td>
+ <td align="center">127.127.20.20</td>
+ <td>IP Address from server config line</td>
+ </tr><tr>
+ <td align="center">4</td>
+ <td align="center">$GPGGA,...0*5C</td>
+ <td>NMEA Sentence</td>
+ </tr><tr>
+ <td align="center">5</td>
+ <td align="center">228</td>
+ <td>Number of sentences received</td>
+ </tr><tr>
+ <td align="center">6</td>
+ <td align="center">64</td>
+ <td>Number of sentences accepted and used for timekeeping</td>
+ </tr><tr>
+ <td align="center">7</td>
+ <td align="center">0</td>
+ <td>Number of sentences rejected because they were marked invalid (poor signal)</td>
+ </tr><tr>
+ <td align="center">8</td>
+ <td align="center">0</td>
+ <td>Number of sentences rejected because of bad checksum or invalid date/time</td>
+ </tr><tr>
+ <td align="center">9</td>
+ <td align="center">64</td>
+ <td>Number of sentences filtered by mode bits or same second</td>
+ </tr><tr>
+ <td align="center">10</td>
+ <td align="center">0</td>
+ <td>Number of PPS pulses used, overrides NMEA sentences</td>
+ </tr>
+ </tbody></table>
+
+ Sentences like $GPGSV that don't contain the time will get
+ counted in the total but otherwise ignored.
+
+ <p>
+ <a href="https://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks">Configuring
+ NMEA Refclocks</a> might give further useful hints for specific hardware
+ devices that exhibit strange or curious behaviour.
+ </p>
+
+ <p>
+ To make a specific setting, select the corresponding decimal values from
+ the mode byte table, add them all together and enter the resulting
+ decimal value into the clock configuration line.
+ </p>
+
+ <h4>Setting up the Garmin GPS-25XL</h4>
+
+ Switch off all output with by sending it the following string.
+ <pre>"$PGRMO,,2&lt;cr&gt;&lt;lf&gt;"</pre>
+ <p>Now switch only $GPRMC on by sending it the following string.</p>
+ <pre>"$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;"</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>"$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;"</pre>
+
+ <h4>Fudge Factors</h4>
+
+ <dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><a name="fudgetime2"><tt>time2 <i>time</i></tt></a></dt>
+ <dd>Specifies the serial end of line time offset calibration factor, 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>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>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the
+ falling edge if 1.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel
+ discipline if 1.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Obscures location in timecode: 0 for disable (default), 1 for enable.</dd>
+ </dl>
+
+ <p>Additional Information</p>
+ <p><tt>flag1</tt>, <tt>flag2</tt>, and <tt>flag3</tt> are ignored under Windows.</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/html/drivers/driver22.html b/html/drivers/driver22.html
index 140568f98f26..6e01a38cfe3f 100644
--- a/html/drivers/driver22.html
+++ b/html/drivers/driver22.html
@@ -1,109 +1,98 @@
<!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="HTML Tidy, see www.w3.org">
<title>PPS Clock Discipline</title>
+<!-- Changed by: Harlan &, 31-Mar-2014 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
-
<body>
-
<h3>PPS Clock Discipline</h3>
-<hr>
-
-<p>Last change:
-
-<!-- #BeginDate format:En2m -->22-Apr-2009 15:02<!-- #EndDate -->
-UTC</p>
-
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last change:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 07:46<!-- #EndDate -->
+ UTC</p>
+ <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 signal interface for PPS signal processing.</p>
-
+ 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 signal interface for PPS signal processing.</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 requires the Pulse per Second API (PPSAPI)<sup>1</sup>. 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 devices. 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 a few microseconds.</p>
-
<p>While this driver can discipline the time and frequency relative to the PPS source, it cannot number the seconds. For this purpose an 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. A serial port can be dedicated to the PPS source or shared with another device; however, if dedicated the data leads should not be connected, as noise or unexpected signals can cause <tt>ntpd</tt> to exit.</p>
- <p>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 (DB25 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 algorithm in the driver. As the result, performance
- with <tt>minpoll</tt> configured at 4 (16s) is generally
- better than the kernel PPS discipline. However, fudge flag 3 can
- be used to enable the kernel PPS discipline if necessary.</p>
- <p>This driver
- is enabled only under one of two conditions (a) a prefer peer other than
- this driver is among the survivors of the mitigation algorithms or (b)
- there are no survivors and the <tt>minsane</tt> option
- of the <tt>tos</tt> command is 0. The prefer peer designates another source
- that can reliably number the seconds when available . However, if no
- sources are available, the system clock continues to be disciplined by
- the PPS driver on an indefinite basis.</p>
- <p>A scenario where the latter behavior can be most useful is a planetary orbiter
- fleet, for instance in the vicinity of Mars, where contact between orbiters
- and Earth only one or two times per Sol (Mars day). These orbiters have a
- precise timing reference based on an Ultra Stable Oscillator (USO) with accuracy
- in the order of a Cesium oscillator. A PPS signal is derived from the USO
- and can be disciplined from Earth on rare occasion or from another orbiter
- via NTP. In the above scenario the PPS signal disciplines the spacecraft clock
- between NTP updates.</p>
- <p>In a similar scenario a PPS signal can be used to discipline the clock between
- updates produced by the modem driver. This would provide precise synchronization
- without needing the Internet at all.</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 PPS capture on the rising (assert) pulse edge if 0; falling
- (clear) edge if 1. (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>Record a timestamp once for each second if 1. Useful for constructing
- Allan deviation plots..
- </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
+<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. A serial port can be dedicated to the PPS source or shared with another device; however, if dedicated the data leads should not be connected, as noise or unexpected signals can cause <tt>ntpd</tt> to exit.</p>
+<p>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 (DB25 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 algorithm in the driver. As the result, performance
+ with <tt>minpoll</tt> configured at 4 (16s) is generally
+ better than the kernel PPS discipline. However, fudge flag 3 can
+ be used to enable the kernel PPS discipline if necessary.</p>
+<p>This driver
+ is enabled only under one of two conditions (a) a prefer peer other than
+ this driver is among the survivors of the mitigation algorithms or (b)
+ there are no survivors and the <tt>minsane</tt> option
+ of the <tt>tos</tt> command is 0. The prefer peer designates another source
+ that can reliably number the seconds when available . However, if no
+ sources are available, the system clock continues to be disciplined by
+ the PPS driver on an indefinite basis.</p>
+<p>A scenario where the latter behavior can be most useful is a planetary orbiter
+ fleet, for instance in the vicinity of Mars, where contact between orbiters
+ and Earth only one or two times per Sol (Mars day). These orbiters have a
+ precise timing reference based on an Ultra Stable Oscillator (USO) with accuracy
+ in the order of a Cesium oscillator. A PPS signal is derived from the USO
+ and can be disciplined from Earth on rare occasion or from another orbiter
+ via NTP. In the above scenario the PPS signal disciplines the spacecraft clock
+ between NTP updates.</p>
+<p>In a similar scenario a PPS signal can be used to discipline the clock between
+ updates produced by the modem driver. This would provide precise synchronization
+ without needing the Internet at all.</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>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 PPS capture on the rising (assert) pulse edge if 0 (default) or falling
+ (clear) pulse edge if 1. Not used under Windows - if the special <tt>serialpps.sys</tt> serial port driver is installed then the leading edge will <i>always</i> be used.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable. Not used under Windows - if the special <tt>serialpps.sys<\tt> serial port driver is used then kernel PPS will be available and used.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Record a timestamp once for each second if 1. Useful for constructing
+ Allan deviation plots.</dd>
+ .
+</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.</li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver26.html b/html/drivers/driver26.html
index f840a03cf828..dc84cc154cb6 100644
--- a/html/drivers/driver26.html
+++ b/html/drivers/driver26.html
@@ -11,6 +11,9 @@
<body>
<h3>Hewlett Packard 58503A GPS Receiver and HP Z3801A</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->5-Oct-2005 04:37<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.26.<i>u</i><br>
diff --git a/html/drivers/driver27.html b/html/drivers/driver27.html
index a425a9f681a1..91534ad0582a 100644
--- a/html/drivers/driver27.html
+++ b/html/drivers/driver27.html
@@ -11,6 +11,9 @@
<body>
<h3>Arcron MSF Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.27.<i>u</i><br>
@@ -242,4 +245,4 @@ May 10 12:41:34 oolong ntpd[615]: ARCRON: sync finished, signal quality 3: OK, w
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver28.html b/html/drivers/driver28.html
index 3458768a48f9..8c7fd802e623 100644
--- a/html/drivers/driver28.html
+++ b/html/drivers/driver28.html
@@ -5,12 +5,15 @@
<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>
+ <title>Shared Memory Driver</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Shared Memory Driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->8-Aug-2014 19:17<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.28.<i>u</i><br>
@@ -22,49 +25,64 @@
<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;
+ int mode; /* 0 - if valid is set:
+ * use values,
+ * clear valid
+ * 1 - if valid is set:
+ * if count before and after read of data is equal:
+ * use values
+ * clear valid
+ */
+ volatile int count;
+ time_t clockTimeStampSec;
+ int clockTimeStampUSec;
+ time_t receiveTimeStampSec;
+ int receiveTimeStampUSec;
+ int leap;
+ int precision;
+ int nsamples;
+ volatile int valid;
+ unsigned clockTimeStampNSec; /* Unsigned ns timestamps */
+ unsigned receiveTimeStampNSec; /* Unsigned ns timestamps */
+ int dummy[8];
};</pre>
<h4>Operation mode=0</h4>
- <p>Each second, 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 and a counter is bumped.</p>
- <p>If not set, a counter is bumped</p>
+ <p>Each second, the value of <code>valid</code> 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 <code>valid</code> is cleared and <code>count</code> is bumped.</p>
+ <p>If not set, <code>count</code> is bumped.</p>
<h4>Operation mode=1</h4>
- <p>Each second, 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 and a counter is bumped.</p>
- <p>If not set, a counter is bumped</p>
+ <p>Each second, <code>valid</code> in the shared memory-segment is checked:</p>
+ <p>If set, the <code>count</code> field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered <code>count</code> is compared to current value of <code>count</code> 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 <code>valid</code> flag is cleared and <code>count</code> is bumped.</p>
+ <p>If not set, <code>count</code> is bumped</p>
+<h4>Mode-independent postprocessing</h4>
+After the time stamps have been successfully plucked from the SHM
+segment, some sanity checks take place:
+<ul>
+ <li>The receive time stamp of the SHM data must be in the last 5
+ seconds before the time the data is processed. This helps in weeding
+ out stale data.
+ <li>If the absolute difference between remote and local clock
+ exceeds the limit (either <i>time2</i> or the default of 4hrs), then
+ the sample is discarded. This check is disabled when <i>flag1</i> is
+ set to 1.
+</ul>
<h4>gpsd</h4>
<a href="http://gpsd.berlios.de/"><i>gpsd</i></a>
knows how to talk to many GPS devices.
-It works with <i>ntpd</i> through the SHM driver.
+It can work with <i>ntpd</i> through the SHM driver.
<P>
The <i>gpsd</i> man page suggests setting minpoll and maxpoll to 4.
That was an attempt to reduce jitter.
The SHM driver was fixed (ntp-4.2.5p138) to collect data each second rather than
once per polling interval so that suggestion is no longer reasonable.
<P>
-
+ <b>Note:</b> The GPSD client driver (type 46) uses the <i>gpsd</i>
+ client protocol to connect and talk to <i>gpsd</i>, but using the
+ SHM driver is the ancient way to have <i>gpsd</i> talk to <i>ntpd</i>.
<h4>Clockstats</h4>
If flag4 is set when the driver is polled, a clockstats record is written.
@@ -99,13 +117,19 @@ Here is a sample showing the GPS reception fading out:
<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.
+ <dd>Maximum allowed difference between remote and local
+ clock, in seconds. Values <1.0 or >86400.0 are ignored, and the
+ default value of 4hrs (14400s) is used instead. See also flag 1.
<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.
+ <dd><i>Skip</i> the difference limit check if set. Useful
+ for systems where the RTC backup cannot keep the time over
+ long periods without power and the SHM clock must be able
+ to force long-distance initial jumps. <i>Check</i> the
+ difference limit if cleared (default).
<dt><tt>flag2 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag3 0 | 1</tt>
diff --git a/html/drivers/driver29.html b/html/drivers/driver29.html
index dde58ff68446..4939d8012ce3 100644
--- a/html/drivers/driver29.html
+++ b/html/drivers/driver29.html
@@ -10,6 +10,9 @@
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1><font size="+2">Trimble Palisade and Thunderbolt Receivers</font>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
</h1>
<table>
@@ -1087,4 +1090,4 @@ Here is a link explaining the situation:<p>
;
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver3.html b/html/drivers/driver3.html
index e5a06be55c0c..457e5a22be7e 100644
--- a/html/drivers/driver3.html
+++ b/html/drivers/driver3.html
@@ -1,28 +1,29 @@
<!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 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 DIP-switches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year. As the there are only four dipswitches to set the year and the base value of zero correspondes to 1986, years beyond 2001 recycle with the value of zero corresponding to 2002. 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>
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<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 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 DIP-switches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year. As the there are only four dipswitches to set the year and the base value of zero correspondes to 1986, years beyond 2001 recycle with the value of zero corresponding to 2002. 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;
@@ -45,32 +46,31 @@ 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
+<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>
diff --git a/html/drivers/driver30.html b/html/drivers/driver30.html
index d29dbcfc2919..ddf9b948882b 100644
--- a/html/drivers/driver30.html
+++ b/html/drivers/driver30.html
@@ -11,6 +11,9 @@
<body>
<h3>Motorola Oncore GPS receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.30.<i>u</i><br>
@@ -80,4 +83,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver31.html b/html/drivers/driver31.html
index aff093c52e33..a329faf849aa 100644
--- a/html/drivers/driver31.html
+++ b/html/drivers/driver31.html
@@ -11,6 +11,9 @@
<body>
<h3>Rockwell Jupiter GPS receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.31.<i>u</i><br>
@@ -55,4 +58,4 @@
</html>
-= \ No newline at end of file
+=
diff --git a/html/drivers/driver32.html b/html/drivers/driver32.html
index 947924841468..8cb810a6029c 100644
--- a/html/drivers/driver32.html
+++ b/html/drivers/driver32.html
@@ -10,6 +10,9 @@
<body>
<h3>Chrono-log K-series WWVB receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.32.<i>u</i><br>
@@ -30,9 +33,8 @@ 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
+</html>
diff --git a/html/drivers/driver33.html b/html/drivers/driver33.html
index f50dfb63239c..6142f53077a7 100644
--- a/html/drivers/driver33.html
+++ b/html/drivers/driver33.html
@@ -10,6 +10,9 @@
<body>
<h3>Dumb Clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.33.<i>u</i><br>
@@ -27,9 +30,7 @@ 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
+</html>
diff --git a/html/drivers/driver34.html b/html/drivers/driver34.html
index a742d42a24d3..65ce81948997 100644
--- a/html/drivers/driver34.html
+++ b/html/drivers/driver34.html
@@ -10,6 +10,9 @@
<body>
<h3>Ultralink Clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Dec-2007 19:43<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.34.<i>u</i><br>
diff --git a/html/drivers/driver35.html b/html/drivers/driver35.html
index 78a0881fcd46..3ded63febc26 100644
--- a/html/drivers/driver35.html
+++ b/html/drivers/driver35.html
@@ -10,6 +10,9 @@
<body>
<h3>Conrad parallel port radio clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.35.<i>u</i><br>
@@ -45,4 +48,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver36.html b/html/drivers/driver36.html
index e96f73048cfb..2b253245cccb 100644
--- a/html/drivers/driver36.html
+++ b/html/drivers/driver36.html
@@ -1,147 +1,150 @@
<!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="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>
- <hr>
- <h4>Synopsis</h4>
- Address: 127.127.36.<i>u</i><br>
- Reference ID: <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 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 season. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.
- <p>The driver requires an audio codec or sound card with sampling rate 8 kHz and <font face="symbol">m</font>-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 187 PPM (.0187 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
- <p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 2479 km from the transmitter, the predicted two-hop propagation delay varies from 9.3 ms in sunlight to 9.0 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
- <p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.1 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
- <p>The driver 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>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>
- <h4>Technical Overview</h4>
- <p>The driver processes 8-kHz <font face="symbol">m</font>-law companded codec samples using maximum-likelihood techniques which exploit the considerable degree of redundancy available in the broadcast signal. The WWV signal format is described in NIST Special Publication 432 (Revised 1990) and also available on the <a href="http://tf.nist.gov/stations/wwvtimecode.htm">WWV/H web site</a>. 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>
- <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 for 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 to improve performance, especially under weak signal conditions and to provide an automatic frequency and station selection feature.</p>
- <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 with 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 using a communications receiver.</p>
- <h4>Baseband Signal Processing</h4>
- <p>The 1000/1200-Hz pulses and 100-Hz subcarrier are first separated using a 600-Hz bandpass filter centered on 1100 Hz and a 150-Hz lowpass filter. The minute pulse is extracted using an 800-ms synchronous matched filter and pulse grooming logic which discriminates between WWV and WWVH signals and noise. The second pulse is extracted using a 5-ms FIR matched filter for each station and a single 8000-stage comb filter.</p>
- <p>The phase of the 100-Hz subcarrier relative to the second 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 type-1 phase-lock loop (PLL) to discipline the demodulator phase.</p>
- <p>A bipolar data signal is determined from the matched filter subcarrier envelope using a pulse-width discriminator. The discriminator samples the I channel at 15 ms (<i>n</i>), 200 ms (<i>s</i><sub>0</sub>) and 500 ms (<i>s</i><sub>1</sub>), and the envelope (RMS I and Q channels) at 200 ms (<i>e</i><sub>1</sub>) and the end of the second (<i>e</i><sub>0</sub>). The bipolar data signal is expressed 2<i>s</i><sub>1</sub> - <i>s</i><sub>0</sub> - <i>n</i>, where positive values correspond to data 1 and negative values correspond to data 0. Note that, since the signals <i>s</i><sub>0</sub> and <i>s</i><sub>1</sub> include the noise <i>n</i>, the noise component cancels out. The data bit SNR is calculated as 20 log<sub>10</sub>(<i>e</i><sub>1</sub> / <i>e</i><sub>0</sub>). If the driver has not synchronized to the minute pulse, or if the data bit amplitude <i>e</i><sub>1</sub> or SNR are below thresholds, the bit is considered invalid and the bipolar signal is forced to zero.</p>
- <p>The bipolar signal 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, are interpreted as an erasure and result in no change of indication.</p>
- <h4>Maximum-Likelihood Decoder</h4>
- <p>The BCD digit in each digit position of the timecode is represented as four data bits. The bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If any of the four bits are 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 candidate for this position and the ratio of the maximum over the next lower value represents the digit SNR.</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 most recently determined maximum-likelihood digit. If a digit likelihood exceeds the decision level and compares with previous digits 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>
- <h4>Master Clock Discipline</h4>
- <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. The maximum value of the 5-ms pulse after the comb filter represents the on-time epoch of the second. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the epoches over the interval divided by the interval itself. The sample clock frequency is then corrected by this amount divided by a time constant of 8.</p>
- <p>When first started, the frequency averaging interval is 8 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 1024 s, which results in an ultimate frequency resolution of 0.125 PPM, or about 11 ms/day.</p>
- <p>The data demodulation functions operate using the subcarrier clock, which is independent of the epoch. However, the data decoding functions are driven by the epoch. The decoder is phase-locked to the epoch in such a way that, when the clock state machine has reliably decoded the broadcast time to the second, the epoch timestamp of that second becomes a candidate to set the system clock.</p>
- <p>The comb filter can have a long memory and is vulnerable to noise and stale data, especially when coming up after a long fade. Therefore, a candidate is considered valid only if the 5-ms signal amplitude and SNR&nbsp;are above thresholds. In addition, the system clock is not set until after one complete averaging interval has passed with valid candidates.</p>
- <h4>Station Identification</h4>
- <p>It is important that the logical clock frequency is stable and accurately determined, since in many 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>Reliable station identification requires accurate discrimination between very weak signals in noise and noise alone. The driver very aggressively 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 measured in second 0 of the minute, together with the data subcarrier amplitude and SNR measured in second 1. If all four values are above defined thresholds a hit is declared, otherwise a miss. 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 number of hits declared in the last 6 minutes for each station represents the high order bits of the metric, while the current minute pulse amplitude represents the low order bits. Only if the metric is above a defined threshold is the station signal considered acceptable. The metric is also used by the autotune function described below and reported in the timecode string.</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 manual synchronization via oscilloscope and HF medium is good only to a millisecond under the best propagation conditions. The performance of the NTP daemon disciplined by this driver is clearly better than this, even under marginal conditions.</p>
- <p>The figure below shows the measured offsets over a typical day near the bottom of the sunspot cycle ending in October, 2006. Variations up to &plusmn;0.4 ms can be expected due to changing ionospheric layer height and ray geometry over the day and night.</p>
- <div align="center">
- <img src="../pic/offset1211.gif" alt="gif"></div>
- <p>The figure was constructed using a 2.4-GHz P4 running FreeBSD 6.1. For these measurements the computer clock was disciplined within a few microseconds of UTC using a PPS signal and GPS receiver and the measured offsets determined from the filegen peerstats data.</p>
- <p>The predicted propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, varies over 9.0-9.3 ms. In addition, the receiver contributes 4.7 ms and the 600-Hz bandpass filter 0.9 ms. With these values, the mean error is less than 0.1 ms and varies &plusmn;0.3 ms over the day as the result of changing ionospheric height and ray geometry.</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 synch. This may take some fits and starts, as the driver expects to see several 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 finding a station and frequency with acceptable metric.
- <p>While this is going on the the driver acquires second synch, which can take up to several minutes, depending on signal quality. When minute synch has been acquired, the driver accumulates likelihood values for the unit (seconds) digit of the nine timecode digits, plus the seven miscellaneous bits included in the WWV/H transmission format. When a good unit digit has been found, the driver accumulated likelihood values for the remaining eight digits of the timecode. When three repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals, and up to 40 minutes when buried in noise, and the second synch has been acquired, the clock is set (or verified) and is selectable to discipline the system clock.</p>
- <p>Once the clock is set, it continues to provide correct timecodes as long as the signal metric is above threshold, as described in the previous section. As long as the clock is correctly set or verified, the system clock offsets are provided once each minute to the reference clock interface, where they are processed using the same algorithms as with other reference clocks and remote servers.</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 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>Operation continues as long as the signal metric from at least one station on at least one frequency is acceptable. A consequence of this design is that, once the clock is set, the time and frequency are disciplined only by the second synch 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 resynchronize. 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>Once the system clock been set correctly it will continue to read correctly even during the holdover interval, but with increasing dispersion. Assuming the system clock frequency can be disciplined within 1 PPM, it can coast without signals for several days without exceeding the NTP step threshold of 128 ms. During such periods the root distance increases at 15 <font face="Symbol">m</font>s per second, which makes the driver appear less likely for selection as time goes on. Eventually, when the distance due all causes exceeds 1 s, it is no longer suitable for synchronization. Ordinarily, this happens after about 18 hours with no signals. The <tt>tinker maxdist</tt> configuration command can be used to change this value.</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. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</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 synch 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 is inoperative, the driver quietly gives up with no harm done.</p>
- <p>Once acquiring minute synch, 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 signal metric as described above. 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>The mitigation procedure selects the frequency and station with the highest valid metric, ties going first to the highest frequency and then to WWV in order. A station is considered valid only if the metric is above a specified threshold; if no station is above the metric, the rotating probes continue until a valid station is found.</p>
- <p>The behavior of the autotune function over a typical day is shown in the figure below.</p>
- <div align="center">
- <img src="../pic/freq1211.gif" alt="gif"></div>
- <p>As expected, the lower frequencies prevail when the ray path is in moonlight (0100-1300 UTC) and the higher frequencies when the path is in sunlight (1300-0100 UTC). Note three periods in the figure show zero frequency when signals are below the minimum for all frequencies and stations.</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>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 synch has been acquired.</p>
- <p><tt>wwv5 status agc epoch secamp/secsnr datamp/datsnr wwv wwvh</tt></p>
- <p>where the fields after the <tt>wwv5</tt> identifier are: <tt>status</tt> contains status bits, <tt>agc</tt> audio gain, <tt>epoch </tt>second epoch, <tt>secamp/secsnr </tt>second pulse amplitude/SNR, 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 minamp/minsnr</tt></p>
- <p>where <tt>ident </tt>encodes the station (<tt>WV</tt> for WWV, <tt>WH</tt> for WWVH) and frequency (2, 5, 10, 15 or 20), <tt>score</tt> 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 described above, and <tt>minamp/minsnr</tt> is the minute pulse ampliture/SNR. An example is:</p>
- <pre><tt>wwv5 000d 111 5753 3967/20.1 3523/10.2 WV20 bdeff 100 8348/30.0 WH20 0000 1 22/-12.4</tt></pre>
- <p>There are several other messages that can occur; these are documented in the source listing.</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:
- <p><tt>sq yyyy ddd hh:mm:ss l d du lset agc ident metric errs freq avg<br>
- </tt></p>
- The fields beginning with <tt>yyyy</tt> and extending through <tt>du</tt> are decoded from the received data and are in fixed-length format. The remaining fields are in variable-length format. The fields are as follows:
- <dl>
- <dt><tt>s</tt>
- <dd>The synch 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>synch alarm. The decoder is not synchronized to the station within 125 <font face="Symbol">m</font>s.
- <dt><tt>0x4</tt>
- <dd>Digit error alarm. Less than nine decimal digits were found in the last minute.<dt><tt>0x2</tt>
- <dd>Error alarm. More than 40 data bit errors were found in the last minute.<dt><tt>0x1</tt>
- <dd>Compare alarm. A maximum-likelihood digit failed to agree with the current associated clock digit in the last minute.</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 marginal condition.<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 synch 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.
- <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>du</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 should be set for a value midway in this range.
- <dt><tt>ident</tt>
- <dd>The station identifier shows the station, <tt>WV<i>f</i></tt> for WWV or <tt>WH<i>f</i></tt> for WWVH, and frequency <i><tt>f</tt></i> 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 even 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>avg</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>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> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last updage:
+ <!-- #BeginDate format:En2m -->15-Nov-2012 06:42<!-- #EndDate -->
+UTC</p>
+<hr>
+<h4>Synopsis</h4>
+Address: 127.127.36.<i>u</i><br>
+Reference ID: <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 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 season. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.
+<p>The driver requires an audio codec or sound card with sampling rate 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 187 PPM (.0187 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
+<p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 2479 km from the transmitter, the predicted two-hop propagation delay varies from 9.3 ms in sunlight to 9.0 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
+<p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.1 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
+<p>The driver 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>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>
+<h4>Technical Overview</h4>
+<p>The driver processes 8-kHz &mu;-law companded codec samples using maximum-likelihood techniques which exploit the considerable degree of redundancy available in the broadcast signal. The WWV signal format is described in NIST Special Publication 432 (Revised 1990) and also available on the <a href="http://tf.nist.gov/stations/wwvtimecode.htm">WWV/H web site</a>. 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>
+<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 for 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 to improve performance, especially under weak signal conditions and to provide an automatic frequency and station selection feature.</p>
+<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 with 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 using a communications receiver.</p>
+<h4>Baseband Signal Processing</h4>
+<p>The 1000/1200-Hz pulses and 100-Hz subcarrier are first separated using a 600-Hz bandpass filter centered on 1100 Hz and a 150-Hz lowpass filter. The minute pulse is extracted using an 800-ms synchronous matched filter and pulse grooming logic which discriminates between WWV and WWVH signals and noise. The second pulse is extracted using a 5-ms FIR matched filter for each station and a single 8000-stage comb filter.</p>
+<p>The phase of the 100-Hz subcarrier relative to the second 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 type-1 phase-lock loop (PLL) to discipline the demodulator phase.</p>
+<p>A bipolar data signal is determined from the matched filter subcarrier envelope using a pulse-width discriminator. The discriminator samples the I channel at 15 ms (<i>n</i>), 200 ms (<i>s</i><sub>0</sub>) and 500 ms (<i>s</i><sub>1</sub>), and the envelope (RMS I and Q channels) at 200 ms (<i>e</i><sub>1</sub>) and the end of the second (<i>e</i><sub>0</sub>). The bipolar data signal is expressed 2<i>s</i><sub>1</sub> - <i>s</i><sub>0</sub> - <i>n</i>, where positive values correspond to data 1 and negative values correspond to data 0. Note that, since the signals <i>s</i><sub>0</sub> and <i>s</i><sub>1</sub> include the noise <i>n</i>, the noise component cancels out. The data bit SNR is calculated as 20 log<sub>10</sub>(<i>e</i><sub>1</sub> / <i>e</i><sub>0</sub>). If the driver has not synchronized to the minute pulse, or if the data bit amplitude <i>e</i><sub>1</sub> or SNR are below thresholds, the bit is considered invalid and the bipolar signal is forced to zero.</p>
+<p>The bipolar signal 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, are interpreted as an erasure and result in no change of indication.</p>
+<h4>Maximum-Likelihood Decoder</h4>
+<p>The BCD digit in each digit position of the timecode is represented as four data bits. The bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If any of the four bits are 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 candidate for this position and the ratio of the maximum over the next lower value represents the digit SNR.</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 most recently determined maximum-likelihood digit. If a digit likelihood exceeds the decision level and compares with previous digits 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>
+<h4>Master Clock Discipline</h4>
+<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. The maximum value of the 5-ms pulse after the comb filter represents the on-time epoch of the second. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the epoches over the interval divided by the interval itself. The sample clock frequency is then corrected by this amount divided by a time constant of 8.</p>
+<p>When first started, the frequency averaging interval is 8 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 1024 s, which results in an ultimate frequency resolution of 0.125 PPM, or about 11 ms/day.</p>
+<p>The data demodulation functions operate using the subcarrier clock, which is independent of the epoch. However, the data decoding functions are driven by the epoch. The decoder is phase-locked to the epoch in such a way that, when the clock state machine has reliably decoded the broadcast time to the second, the epoch timestamp of that second becomes a candidate to set the system clock.</p>
+<p>The comb filter can have a long memory and is vulnerable to noise and stale data, especially when coming up after a long fade. Therefore, a candidate is considered valid only if the 5-ms signal amplitude and SNR&nbsp;are above thresholds. In addition, the system clock is not set until after one complete averaging interval has passed with valid candidates.</p>
+<h4>Station Identification</h4>
+<p>It is important that the logical clock frequency is stable and accurately determined, since in many 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>Reliable station identification requires accurate discrimination between very weak signals in noise and noise alone. The driver very aggressively 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 measured in second 0 of the minute, together with the data subcarrier amplitude and SNR measured in second 1. If all four values are above defined thresholds a hit is declared, otherwise a miss. 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 number of hits declared in the last 6 minutes for each station represents the high order bits of the metric, while the current minute pulse amplitude represents the low order bits. Only if the metric is above a defined threshold is the station signal considered acceptable. The metric is also used by the autotune function described below and reported in the timecode string.</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 manual synchronization via oscilloscope and HF medium is good only to a millisecond under the best propagation conditions. The performance of the NTP daemon disciplined by this driver is clearly better than this, even under marginal conditions.</p>
+<p>The figure below shows the measured offsets over a typical day near the bottom of the sunspot cycle ending in October, 2006. Variations up to &plusmn;0.4 ms can be expected due to changing ionospheric layer height and ray geometry over the day and night.</p>
+<div align="center"> <img src="../pic/offset1211.gif" alt="gif"></div>
+<p>The figure was constructed using a 2.4-GHz P4 running FreeBSD 6.1. For these measurements the computer clock was disciplined within a few microseconds of UTC using a PPS signal and GPS receiver and the measured offsets determined from the filegen peerstats data.</p>
+<p>The predicted propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, varies over 9.0-9.3 ms. In addition, the receiver contributes 4.7 ms and the 600-Hz bandpass filter 0.9 ms. With these values, the mean error is less than 0.1 ms and varies &plusmn;0.3 ms over the day as the result of changing ionospheric height and ray geometry.</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 synch. This may take some fits and starts, as the driver expects to see several 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 finding a station and frequency with acceptable metric.
+<p>While this is going on the the driver acquires second synch, which can take up to several minutes, depending on signal quality. When minute synch has been acquired, the driver accumulates likelihood values for the unit (seconds) digit of the nine timecode digits, plus the seven miscellaneous bits included in the WWV/H transmission format. When a good unit digit has been found, the driver accumulated likelihood values for the remaining eight digits of the timecode. When three repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals, and up to 40 minutes when buried in noise, and the second synch has been acquired, the clock is set (or verified) and is selectable to discipline the system clock.</p>
+<p>Once the clock is set, it continues to provide correct timecodes as long as the signal metric is above threshold, as described in the previous section. As long as the clock is correctly set or verified, the system clock offsets are provided once each minute to the reference clock interface, where they are processed using the same algorithms as with other reference clocks and remote servers.</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 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>Operation continues as long as the signal metric from at least one station on at least one frequency is acceptable. A consequence of this design is that, once the clock is set, the time and frequency are disciplined only by the second synch 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 resynchronize. 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>Once the system clock been set correctly it will continue to read correctly even during the holdover interval, but with increasing dispersion. Assuming the system clock frequency can be disciplined within 1 PPM, it can coast without signals for several days without exceeding the NTP step threshold of 128 ms. During such periods the root distance increases at 15 &mu;s per second, which makes the driver appear less likely for selection as time goes on. Eventually, when the distance due all causes exceeds 1 s, it is no longer suitable for synchronization. Ordinarily, this happens after about 18 hours with no signals. The <tt>tinker maxdist</tt> configuration command can be used to change this value.</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. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</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 synch 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 is inoperative, the driver quietly gives up with no harm done.</p>
+<p>Once acquiring minute synch, 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 signal metric as described above. 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>The mitigation procedure selects the frequency and station with the highest valid metric, ties going first to the highest frequency and then to WWV in order. A station is considered valid only if the metric is above a specified threshold; if no station is above the metric, the rotating probes continue until a valid station is found.</p>
+<p>The behavior of the autotune function over a typical day is shown in the figure below.</p>
+<div align="center"> <img src="../pic/freq1211.gif" alt="gif"></div>
+<p>As expected, the lower frequencies prevail when the ray path is in moonlight (0100-1300 UTC) and the higher frequencies when the path is in sunlight (1300-0100 UTC). Note three periods in the figure show zero frequency when signals are below the minimum for all frequencies and stations.</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>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 synch has been acquired.</p>
+<p><tt>wwv5 status agc epoch secamp/secsnr datamp/datsnr wwv wwvh</tt></p>
+<p>where the fields after the <tt>wwv5</tt> identifier are: <tt>status</tt> contains status bits, <tt>agc</tt> audio gain, <tt>epoch </tt>second epoch, <tt>secamp/secsnr </tt>second pulse amplitude/SNR, 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 minamp/minsnr</tt></p>
+<p>where <tt>ident </tt>encodes the station (<tt>WV</tt> for WWV, <tt>WH</tt> for WWVH) and frequency (2, 5, 10, 15 or 20), <tt>score</tt> 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 described above, and <tt>minamp/minsnr</tt> is the minute pulse ampliture/SNR. An example is:</p>
+<pre><tt>wwv5 000d 111 5753 3967/20.1 3523/10.2 WV20 bdeff 100 8348/30.0 WH20 0000 1 22/-12.4</tt></pre>
+<p>There are several other messages that can occur; these are documented in the source listing.</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:
+<p><tt>sq yyyy ddd hh:mm:ss l d du lset agc ident metric errs freq avg<br>
+ </tt></p>
+The fields beginning with <tt>yyyy</tt> and extending through <tt>du</tt> are decoded from the received data and are in fixed-length format. The remaining fields are in variable-length format. The fields are as follows:
+<dl>
+ <dt><tt>s</tt></dt>
+ <dd>The synch 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 &mu;s.</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>synch alarm. The decoder is not synchronized to the station within 125 &mu;s.</dd>
+ <dt><tt>0x4</tt></dt>
+ <dd>Digit error alarm. Less than nine decimal digits were found in the last minute.</dd>
+ <dt><tt>0x2</tt></dt>
+ <dd>Error alarm. More than 40 data bit errors were found in the last minute.</dd>
+ <dt><tt>0x1</tt></dt>
+ <dd>Compare alarm. A maximum-likelihood digit failed to agree with the current associated clock digit in the last 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 marginal condition.</dd>
+ <dt><tt>yyyy ddd hh:mm:ss</tt></dt>
+ <dd>The timecode format itself is self explanatory. Since the driver latches the on-time epoch directly from the second synch pulse, the seconds fraction is always zero. Although the transmitted timecode includes only the year of century, the Gregorian year is augmented by 2000.</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.</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>du</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 decoder was last synchronized to the station within 125 &mu;s.</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 should be set for a value midway in this range.</dd>
+ <dt><tt>ident</tt></dt>
+ <dd>The station identifier shows the station, <tt>WV<i>f</i></tt> for WWV or <tt>WH<i>f</i></tt> for WWVH, and frequency <i><tt>f</tt></i> being tracked. If neither station is heard on any frequency, the reference identifier shows <tt>NONE</tt>.</dd>
+ <dt><tt>metric</tt></dt>
+ <dd>The signal metric described above from 0 (no signal) to 100 (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 even 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.</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>avg</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 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>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>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver37.html b/html/drivers/driver37.html
index 3bd50857dcc3..c87a82f1e90f 100644
--- a/html/drivers/driver37.html
+++ b/html/drivers/driver37.html
@@ -10,6 +10,9 @@
<body>
<h3>Forum Graphic GPS Dating station</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.37.<i>u</i><br>
@@ -48,4 +51,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver38.html b/html/drivers/driver38.html
index 283e38f24834..445d70df2975 100644
--- a/html/drivers/driver38.html
+++ b/html/drivers/driver38.html
@@ -10,6 +10,9 @@
<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>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h2><font size="+1">Synopsis</font></h2>
<table width="100%">
@@ -110,7 +113,7 @@
<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><b><tt><font size="+1">time1 <i>time</i></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>.
@@ -123,9 +126,8 @@
<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
+</html>
diff --git a/html/drivers/driver39.html b/html/drivers/driver39.html
index 482134e0efd8..9e1605f8141b 100644
--- a/html/drivers/driver39.html
+++ b/html/drivers/driver39.html
@@ -10,6 +10,9 @@
<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>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<div align="center">
<center>
@@ -105,9 +108,8 @@
<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
+</html>
diff --git a/html/drivers/driver4.html b/html/drivers/driver4.html
index 788bc46efdca..213928940add 100644
--- a/html/drivers/driver4.html
+++ b/html/drivers/driver4.html
@@ -1,108 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Spectracom WWVB/GPS Receivers</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!--
-.style1 {font-family: Symbol}
+.style1 {
+ font-family: Symbol
+}
-->
</style>
</head>
-
<body>
-
<h3>Spectracom WWVB/GPS Receivers</h3>
-
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
<hr>
-Last update:
-
-<!-- #BeginDate format:En2m -->22-Apr-2009 15:00<!-- #EndDate -->
-UTC</p>
-
<h4>Synopsis</h4>
-
<p>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: Optional PPS signal processing, <tt>tty_clk</tt><br>
-Requires: Optional PPS signal processing requires the PPSAPI signal interface.</p>
-
+ 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: Optional PPS signal processing, <tt>tty_clk</tt><br>
+ Requires: Optional PPS signal processing requires the PPSAPI signal interface.</p>
<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 <span class="style1">m</span>s 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>
-
+ &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>
-
+ 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>
-
+ 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>
-
+ 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<PPS Signal Processing</h4>
-
+<h4>PPS Signal Processing</h4>
<p>When PPS signal processing is enabled, and when the system clock has been set by this or another driver and the PPS signal offset is within 0.4 s of the system clock offset, the PPS signal replaces the timecode for as long as the PPS signal is active. If for some reason the PPS signal fails for one or more poll intervals, the driver reverts to the timecode. If the timecode fails for one or more poll intervals, the PPS signal is disconnected.</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 day is received.</p>
-
<h4>Fudge Factors</h4>
-
<dl>
-<dt><tt>time1 <i>time</i></tt>
-<dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.
-
-<dt><tt>time2 <i>time</i></tt>
-<dd>Specifies the serial time offset calibration factor, 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>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>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.
-
-<dt><tt>flag2 0 | 1</tt>
-<dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.
-
-<dt><tt>flag3 0 | 1</tt>
-<dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.
-
-<dt><tt>flag4 0 | 1</tt>
-<dd>Enable verbose <tt>clockstats</tt> recording if set.
-
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Specifies the serial time offset calibration factor, 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>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>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
</dl>
-
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver40.html b/html/drivers/driver40.html
index 1901dcdbff74..6799f7699611 100644
--- a/html/drivers/driver40.html
+++ b/html/drivers/driver40.html
@@ -14,25 +14,40 @@
<body>
<h3>JJY Receivers</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->3-May-2011 00:20<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
Address: 127.127.40.<em>u</em><br>
Reference ID: <code>JJY</code><br>
Driver ID: <code>JJY</code><br>
- Serial Port: <code>/dev/jjy<em>u</em></code>; 9600|4800(See corresponding receiver) baud, 8-bits, no parity, 1 stop bit
+ Serial Port: <code>/dev/jjy<em>u</em></code>; See corresponding receiver
<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/">http://www.tristate.ne.jp/</a> (Japanese only)<br>
+
+ <li>
+ <p>Tristate Ltd. JJY01, JJY02 <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd>
<p>server &nbsp; 127.127.40.X &nbsp; mode 1</p>
+ <dl>
+ <dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
+ <dd>
+ <p>Flag1 has no effect for time synchronization. When a flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into a clockstats file.</p>
+ <table border="1" summary="fudge flag1">
+ <tr><td>0 (Default)</td><td>DCST and STUS commands are not issued</td></tr>
+ <tr><td>1</td><td>DCST and STUS commands are issued</td></tr>
+ </table>
+ </dd>
+ </dl>
<br>
</dd>
- <dt>RS-232C</dt>
+ <dt>Interface</dt>
<dd>
- <p>9600 Baud</p>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@@ -44,29 +59,32 @@
<td>Reply</td>
</tr>
<tr>
- <td><code>date&lt;CR&gt;&lt;LF&gt;</code></td>
+ <td><code>date{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
- <td><code>YYYY/MM/DD WWW&lt;CR&gt;&lt;LF&gt;</code></td>
+ <td><code>YYYY/MM/DD WWW{CR}{LF}</code></td>
</tr>
<tr>
- <td><code>stim&lt;CR&gt;&lt;LF&gt;</code></td>
+ <td><code>stim{CR}{LF}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
- <td><code>HH:MM:SS&lt;CR&gt;&lt;LF&gt;</code></td>
+ <td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<br>
</dd>
</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>
+ </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)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd>
<p>server &nbsp; 127.127.40.X &nbsp; mode 2</p>
<br>
</dd>
- <dt>RS-232C</dt>
+ <dt>Interface</dt>
<dd>
- <p>9600 Baud</p>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@@ -78,25 +96,27 @@
<td>Reply</td>
</tr>
<tr>
- <td><code>&lt;ENQ&gt;1J&lt;ETX&gt;</code></td>
+ <td><code>{ENQ}1J{ETX}</code></td>
<td>&nbsp;--&gt;&nbsp;</td>
- <td><code>&lt;STX&gt;JYYMMDD HHMMSSS&lt;ETX&gt;</code></td>
+ <td><code>{STX}JYYMMDD HHMMSSS{ETX}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
+ </li>
+
<li>
- <p>Echo Keisokuki Co.,Ltd. LT-2000 <a href="http://www.clock.co.jp/">http://www.clock.co.jp/</a> (Japanese only)</p>
+ <p>Echo Keisokuki Co.,Ltd. LT-2000 <a href="http://www.clock.co.jp/">http://www.clock.co.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd>
<p>server &nbsp; 127.127.40.X &nbsp; mode 3</p>
<br>
</dd>
- <dt>RS-232C</dt>
+ <dt>Interface</dt>
<dd>
- <p>9600 Baud</p>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@@ -115,7 +135,7 @@
<tr>
<td>( Every second before 0.5 second )</td>
<td></td>
- <td><code>YYMMDDWHHMMSS&lt;ST1&gt;&lt;ST2&gt;&lt;ST3&gt;&lt;ST4&gt;&lt;CR&gt;</code></td>
+ <td><code>YYMMDDWHHMMSS{ST1}{ST2}{ST3}{ST4}{CR}</code></td>
</tr>
<tr>
<td><code>#</code></td>
@@ -126,17 +146,19 @@
<br>
</dd>
</dl>
+ </li>
+
<li>
- <p>CITIZEN T.I.C. CO.,LTD. JJY-200 <a href="http://www.tic-citizen.co.jp/">http://www.tic-citizen.co.jp/</a> (Japanese only)</p>
+ <p>CITIZEN T.I.C. CO.,LTD. JJY-200 <a href="http://www.tic-citizen.co.jp/">http://www.tic-citizen.co.jp/</a> (Japanese only)</p><br>
<dl>
<dt>NTP configuration ( ntp.conf )</dt>
<dd>
<p>server &nbsp; 127.127.40.X &nbsp; mode 4</p>
<br>
</dd>
- <dt>RS-232C</dt>
+ <dt>Interface</dt>
<dd>
- <p>4800 Baud</p>
+ <p>RS-232C, 4800 baud, 8-bits, no parity, 1 stop bit</p>
<br>
</dd>
<dt>Time code format</dt>
@@ -150,16 +172,69 @@
<tr>
<td>( Every second )</td>
<td></td>
- <td><code>'XX YY/MM/DD W HH:MM:SS&lt;CR&gt;</code></td>
+ <td><code>'XX YY/MM/DD W HH:MM:SS{CR}</code></td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ <li>
+ <p>Tristate Ltd. TS-GPSclock-01 <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p>
+ <p>This driver supports the Tristate TS-GPSclock-01 in command/response mode, though it is a GPS clock, not JJY radio clock. Using the menus and the onboard switches, the TS-GPSclock-01 should be set to command/response mode and JST time zone.<br>
+ Besides this driver ( Type 40 ), <a href="driver20.html">the generic NMEA GPS driver ( Type 20 )</a> supports the TS-GPSclock-01 in NMEA mode.</p>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 5</p>
+ <dl>
+ <dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
+ <dd>
+ <p>Flag1 has no effect for time synchronization. When a flag1 is set to 1, status command is issued before DATE and TIME commands, and write a response text into a clockstats file.</p>
+ <table border="1" summary="fudge flag1">
+ <tr><td>0 (Default)</td><td>STUS command is not issued</td></tr>
+ <tr><td>1</td><td>STUS command is issued</td></tr>
+ </table>
+ </dd>
+ </dl>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>USB ( /dev/ttyACM<em>0</em> )</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><code>date{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>YYYY/MM/DD{CR}{LF}</code></td>
+ </tr>
+ <tr>
+ <td><code>time{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>HH:MM:SS{CR}{LF}</code></td>
</tr>
</table>
<br>
</dd>
</dl>
+ </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 National Institute of Information and Communications Technology. An operating announcement and some information are avaiable from <a href="http://www.nict.go.jp/">http://www.nict.go.jp/</a> (English and Japanese) and <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (English and Japanese)</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>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><code>ln -s /dev/ttyS0 /dev/jjy0</code></p>
+ <p>Using RS232C to USB converter cable, the clock can be connected to an USB port instead of a serial port. In this case, typical symbolic link command is as follows;
+ <p><code>ln -s /dev/ttyUSB0 /dev/jjy0</code></p>
<p>Windows NT does not support symbolic links to device files. COM<em>X</em>: 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 <code>clockstats</code> file.</p>
@@ -174,7 +249,7 @@
<dt><code>refid <em>string</em></code>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <code>JJY</code>.
<dt><code>flag1 0 | 1</code>
- <dd>Not used by this driver.
+ <dd>See corresponding receiver.
<dt><code>flag2 0 | 1</code>
<dd>Not used by this driver.
<dt><code>flag3 0 | 1</code>
diff --git a/html/drivers/driver42.html b/html/drivers/driver42.html
index 70820508ea88..86f676e3e1fb 100644
--- a/html/drivers/driver42.html
+++ b/html/drivers/driver42.html
@@ -10,6 +10,9 @@
<body>
<h3>Zyfer GPStarplus Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
Address: 127.127.42.<i>u</i><br>
@@ -27,4 +30,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver43.html b/html/drivers/driver43.html
index 0e1553fce832..6d04102dd81f 100644
--- a/html/drivers/driver43.html
+++ b/html/drivers/driver43.html
@@ -10,6 +10,9 @@
<body>
<h3>RIPE NCC interface for Trimble Palisade</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<img src="../pic/driver43_2.jpg" alt="Trimble Acutime 2000" align="right">
<h4>Synopsis</h4>
@@ -62,4 +65,4 @@ S1 [prn] [channel] [aqflag] [ephstat] [snr] [azinuth] [elevation]
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver44.html b/html/drivers/driver44.html
index d2cddb9c7d18..a3fac5c5a9e0 100755
--- a/html/drivers/driver44.html
+++ b/html/drivers/driver44.html
@@ -11,6 +11,9 @@
<body>
<h1>NeoClock4X - DCF77 / TDF serial line receiver<br>
</h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr size="2" width="100%">
<h2>Synopsis</h2>
<table width="100%">
@@ -85,4 +88,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/driver45.html b/html/drivers/driver45.html
new file mode 100644
index 000000000000..bef883fe87b3
--- /dev/null
+++ b/html/drivers/driver45.html
@@ -0,0 +1,32 @@
+<!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>Spectracom TSYNC PCI</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Spectracom TSYNC PCI</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->26-Mar-2012 05:10<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.45.<i>u</i><br>
+ Reference ID: one of <tt>GPS</tt>, <tt>IRIG</tt>, <tt>HVQ</tt>, <tt>FREQ</tt>, <tt>ACTS</tt>, <tt>PPS</tt>, <tt>PTP</tt>, <tt>ACT</tt>, <tt>USR</tt>, <tt>LOCL</tt><br>
+ Driver ID: <tt>Spectracom TSYNC PCI</tt><br>
+ Driver Port: <tt>/dev/tsyncpci<i>u</i></tt>
+ Features: <tt>(none)</tt>
+ <h4>Description</h4>
+ <p>This driver supports the <a
+ href="http://www.spectracomcorp.com/ProductsServices/TimingSynchronization/BuslevelTiming">Spectracom TSYNC PCI</a> receiver.</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>
diff --git a/html/drivers/driver46.html b/html/drivers/driver46.html
new file mode 100644
index 000000000000..40aded80cca1
--- /dev/null
+++ b/html/drivers/driver46.html
@@ -0,0 +1,184 @@
+<!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>GPSD-NG client driver</title>
+
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ table.dlstable { font-size:85%; }
+ td.ttf{ font-family:Courier; font-weight:bold; }
+ </style></head>
+
+
+
+ <body>
+ <h3>GPSD NG client driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Mar-2014 03:48<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+
+ <p>
+ Address: 127.127.46.<i>u</i><br>
+ Reference ID: <tt>GPSD</tt><br>
+ Driver ID: <tt>GPSD_JSON</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt> as symlink to the true
+ device (not used directly; see below)<br>
+ Features: <tt></tt>
+ </p>
+
+ <h4>Description</h4>
+
+ <p>
+ This driver is a client driver to the <i>GPSD</i> daemon, which
+ over the time became increasingly popular for UN*Xish
+ platforms. <i>GPSD</i> can manage several devices in parallel,
+ aggregate information, and acts as a data hub for client
+ applications. <i>GPSD</i> can also auto-detect and handle PPS
+ hardware signals on serial ports. Have a look
+ at <a href="http://www.catb.org/gpsd/">the
+ <i>GPSD</i> project page</a>.
+ </p>
+ <p>
+ <b>It is important to understand that this driver works best
+ using a GPS device with PPS support.</b>
+ </p>
+ <p>
+ The GPSD-NG protocol is text based, using JSON notation to
+ transfer records in form of JSON objects. The driver uses a
+ TCP/IP connection to <tt>localhost:gpsd</tt> to connect to the
+ daemon and then requests the GPS
+ device <tt>/dev/gps<i>u</i></tt> to be watched. (Different clock
+ units use different devices, and
+ <i>GPSD</i> is able to give only the relevant information to a clock
+ instance.)
+ </p>
+ <p>
+ This driver does not expect <i>GPSD</i> to be running or the
+ clock device to be present <i>a priori</i>; it will try to
+ re-establish a lost or hitherto unsuccessful connection and will
+ wait for device to come up in <i>GPSD.</i> There is an initial
+ 10 seconds delay between a connection loss or failed attempt and
+ the next reconnect attempt; this makes sure that there is no
+ thrashing on the network layer. If the connection fails again,
+ an exponential back off is used with an upper limit of
+ approximately 10 minutes.
+ </p>
+ <p>
+ The overall accuracy depends on the receiver used. The driver
+ uses the error estimations (95% probability limits) provided by
+ <i>GPSD</i> to set the clock precision dynamically according to these
+ readings.
+ </p>
+ <p>
+ The driver needs the VERSION, TPV, PPS and WATCH objects of
+ the <i>GPSD</i> protocol. (Others are quietly ignored.)
+ </p>
+
+
+ <h4>Naming a Device</h4>
+ <p>
+ The <i>GPSD</i> driver uses the same name as the NMEA driver,
+ namely <tt>/dev/gps<i>u</i></tt>. There is a simple reason for
+ that: While the NMEA driver and the <i>GPSD</i> driver can be
+ active at the same time <b>for different devices</b>,
+ they cannot access the same device at a time. Having the same
+ name helps on that. It also eases migration from using NMEA
+ directly to using <i>GPSD</i>, as no new links etc need to be
+ created.
+ </p>
+ <p>
+ <i>GPSD</i> is normally started with the device name to access;
+ it can also be instructed by hot-plug scripts to add or remove
+ devices from its device pool. Luckily, the symlinks used by the
+ NMEA driver are happily accepted and used by <i>GPSD</i>; this
+ makes it possible to use the symlink names as device
+ identification. This makes the migration from the built-in NMEA
+ driver a bit easier.
+ </p>
+ <p><b>Note:</b> <i>GPSD</i> (as of version 3.10) cannot
+ use kernel mode PPS on devices that are hot-plugged. This would
+ require to attach the PPS line discipline to the file, which is
+ not possible when running with root privileges dropped. This is
+ not likely to change in the future.
+ </p>
+
+ <h4>The 'mode' byte</h4>
+ <p>
+ A few operation modes can be selected with the mode word.
+ </p>
+ <p>
+ <table border="1" frame="box" rules="all">
+ <th colspan="3">The Mode Word</th>
+ <tr> <td>Bits</td><td>Value</td><td>Description</td>
+ </tr>
+ <tr> <td rowspan="4"align="center">0..1</td><td align="center">0</td>
+ <td>Uses TPV to get absolute time stamps for full
+ synchronization. If PPS is available , it is used to improve
+ the precision, but the clock can work without it.</td>
+ </tr>
+ <tr><td align="center">1</td>
+ <td>Require TPV <b>and</b> PPS to work.</td>
+ </tr>
+ <tr><td align="center">2</td>
+ <td>Ignore PPS data, run on TPV only. This is not a
+ recommended mode unless the serial timing is very stable
+ and GPSD provides an information element in TPV that
+ indicates the receive time of the fix data.</td>
+ </tr>
+ <tr><td align="center">3</td>
+ <td>PPS-only mode. Ignores TPV and does only the PPS phase
+ correction. This means that some other source must get NTPD
+ close to synchronisation; only after that happened and the
+ phase shift between the system clock and the PPS pulse is
+ less than 125msec the PPS lock will be engaged.</td>
+ </tr>
+ <tf colspan="3"><b>IMPORTANT: work in progress, mode
+ word ignored right now. Fixed mode '0' operation.</b></tf>
+ </table>
+ </p>
+
+ <h4>Syslog flood throttle</h4>
+ <p>This driver can create a lot of syslog messages when things go
+ wrong, and cluttering the log files is frowned upon. So we attempt
+ to log persistent or recurring errors only once per hour. On the
+ other hand, when tracking a problem the syslog flood throttle can
+ get into the way.</p>
+ <p>Therefore, fudge <i>flag3</i> can be used to <i>disable</i> the
+ flood throttle at any time; the throttle is engaged by
+ default. Running with the syslog flood throttle disabled for
+ lengthy time is not recommended unless the log files are closely
+ monitored.</p>
+
+ <h4>Fudge Factors</h4>
+
+ <dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds
+ and fraction, with default 0.0.</dd>
+ <dt><a name="fudgetime2"><tt>time2 <i>time</i></tt></a></dt>
+ <dd>Specifies the TPV time offset calibration factor, 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>Specifies the driver reference identifier, an ASCII string
+ from one to four characters, with default <tt>GPSD</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt><dd><i>(not used)</i></dd>
+ <dt><tt>flag2 0 | 1</tt></dt><dd><i>(not used)</i></dd>
+ <dt><tt>flag3 0 | 1</tt></dt><dd>If set, <i>disable</i> the
+ log throttle. Useful when tracking problems in the interaction
+ between <i>GPSD</i> and <i>NTPD</i>, since now all error
+ events are logged. Persistent/recurrent errors can easily fill
+ up the log, so this should only be enabled during bug
+ hunts.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt><dd>If set, write a clock stats
+ line on every poll cycle.</dd>
+ </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>
diff --git a/html/drivers/driver5.html b/html/drivers/driver5.html
index 1b539acaa2de..fa19764fac3e 100644
--- a/html/drivers/driver5.html
+++ b/html/drivers/driver5.html
@@ -2,71 +2,82 @@
<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>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>TrueTime GPS/GOES/OMEGA/WWV 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></p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
+ <body>
+ <h3>TrueTime GPS/GOES/OMEGA/WWV Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.5.<i>u</i><br>
+ Reference ID: <tt>GPS, OMEGA, GOES, WWV</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, the TL-3 WWV receiver, and very likely others in the same model families 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><br>
+A - control A (this is stripped before we see it) Q - Quality indication (see below) C - Carriage return L - Line feed</p><br>
+Quality codes indicate possible error of:
+ <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.
+ <dt>TL-3 WWV Receiver:
+ <dd>? receiver is unlocked<br>
+ <dd>space +/- 5 milliseconds<br>
+ </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>Notes on the TL-3 receiver:</h4>
+ <p>The mini-DIN RS-232 port uses the Apple pinout.<br>
+ Send the clock ST1 to turn on continuous (1/sec) timecodes.
+You can also enable "mode C" via the front panel. ST0 turns off this mode.<br>
+QV will return the firmware revision (and is useful in identifying this clock.)<br>
+QW will return its weekly signal log, useful if you're testing antennas. You may wish to turn the loss interval down from 4h (04) to 1h (01), so the receiver declares itself unlocked sooner. When in holdover, drift can be on the order of 10 ms/hr since there is no high quality reference oscillator.</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>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
+</html>
diff --git a/html/drivers/driver6.html b/html/drivers/driver6.html
index eb12bdd39f99..ebb3683a9a02 100644
--- a/html/drivers/driver6.html
+++ b/html/drivers/driver6.html
@@ -1,76 +1,80 @@
<!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="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>
- <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>
- <h4>Description</h4>
- <p>This driver synchronizes the computer time using the Inter-Range Instrumentation Group (IRIG) standard time distribution signal. This signal is generated by several radio clocks, including those made by Arbiter, Austron, Bancomm, Odetics, Spectracom, Symmetricom and TrueTime, among others, although it is often an add-on option. The signal is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.</p>
- <p>The driver requires an audio codec or sound card with sampling rate 8 kHz and <font face="symbol">m</font>-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation, only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 250 PPM (.025 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
- <p>For proper operation the IRIG signal source should be configured for analog signal levels, not digital TTL levels. In most radios the IRIG signal is driven &plusmn;10 V behind 50 Ohms. In such cases the cable should be terminated at the line-in port with a 50-Ohm resistor to avoid overloading the codec. 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 automatically rejects the data and declares itself unsynchronized in this case. Some devices, in particular Spectracom radio/satellite clocks, provide additional year and status indication; other devices may not.</p>
- <p>In general and without calibration, the driver is accurate within 500 <font face="symbol">m</font>s relative to the IRIG time. After calibrating relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is less than 20 <font face="symbol">m</font>s with standard deviation 10 <font face="symbol">m</font>s. Most of this is due to residuals after filtering and averaging the raw codec samples, which have an inherent jitter of 125 <font face="symbol">m</font>s. The processor load due to the driver is 0.6 percent on the P4.</p>
- <p>However, be acutely aware that the accuracy with Solaris 2.8 and beyond has been seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms P-P and period 5.5 s. This distortion is especially prevalent with Sun Blade 1000 and possibly other systems.</p>
- <p>The driver 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>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>
- <h4>Technical Overview</h4>
- <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 processor load with older workstations. Generally, the accuracy with IRIG-E is about ten times worse than IRIG-B, but the processor load is somewhat less. Technical details about the IRIG&nbsp;formats can be found in <a href="http://handle.dtic.mil/100.2/ADA346250">IRIG Standard 200-98</a>.</p>
- <p>The driver 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. An infinite impulse response (IIR) 1000-Hz bandpass filter is used for IRIG-B and an IIR 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.</p>
- <p>Cycle crossings relative to the corrected slice level determine the width of each pulse and its value - zero, one or position identifier (PI). The data encode ten characters (20 BCD digits) which determine the second, minute, hour and day of the year and with some IRIG&nbsp;generators 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.</p>
- <p>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 median filter and used to update the system clock.</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. The driver produces one line for each timecode in the following format:
- <p><tt>00 00 98 23 19:26:52 2782 143 0.694 10 0.3 66.5 3094572411.00027</tt></p>
- <p>If clockstats is enabled, the most recent line is written to the clockstats file every 64 s. If verbose recording is enabled (fudge flag 4) each line is written as generated.</p>
- <p>The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the year of century, day of year and time of day. Note that the time of day is for the previous minute, not the current time. The status indicator and year are not produced by some IRIG devices and appear as zeros. Following these fields are the carrier amplitude (0-3000), codec gain (0-255), modulation index (0-1), time constant (4-10), carrier phase error (0&plusmn;0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format.</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.
- <dt><tt>x80</tt>
- <dd>Device status error (Spectracom).
- </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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->17-Jul-2014 02:17<!-- #EndDate -->
+ UTC</p>
+<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>
+<h4>Description</h4>
+<p>This driver synchronizes the computer time using the Inter-Range Instrumentation Group (IRIG) standard time distribution signal. This signal is generated by several radio clocks, including those made by Arbiter, Austron, Bancomm, Odetics, Spectracom, Symmetricom and TrueTime, among others, although it is often an add-on option. The signal is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.</p>
+<p>The driver requires an audio codec or sound card with sampling rate 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation, only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 250 PPM (.025 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
+<p>For proper operation the IRIG signal source should be configured for analog signal levels, not digital TTL levels. In most radios the IRIG signal is driven &plusmn;10 V behind 50 Ohms. In such cases the cable should be terminated at the line-in port with a 50-Ohm resistor to avoid overloading the codec. 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 automatically rejects the data and declares itself unsynchronized in this case. Some devices, in particular Spectracom radio/satellite clocks, provide additional year and status indication; other devices may not.</p>
+<p>In general and without calibration, the driver is accurate within 500 &mu;s relative to the IRIG time. After calibrating relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is less than 20 &mu;s with standard deviation 10 &mu;s. Most of this is due to residuals after filtering and averaging the raw codec samples, which have an inherent jitter of 125 &mu;s. The processor load due to the driver is 0.6 percent on the P4.</p>
+<p>However, be acutely aware that the accuracy with Solaris 2.8 and beyond has been seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms P-P and period 5.5 s. This distortion is especially prevalent with Sun Blade 1000 and possibly other systems.</p>
+<p>The driver 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>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>
+<h4>Technical Overview</h4>
+<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 processor load with older workstations. Generally, the accuracy with IRIG-E is about ten times worse than IRIG-B, but the processor load is somewhat less. Technical details about the IRIG&nbsp;formats can be found in <a href="http://handle.dtic.mil/100.2/ADA346250">IRIG Standard 200-98</a>.</p>
+<p>The driver 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. An infinite impulse response (IIR) 1000-Hz bandpass filter is used for IRIG-B and an IIR 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.</p>
+<p>Cycle crossings relative to the corrected slice level determine the width of each pulse and its value - zero, one or position identifier (PI). The data encode ten characters (20 BCD digits) which determine the second, minute, hour and day of the year and with some IRIG&nbsp;generators 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.</p>
+<p>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 median filter and used to update the system clock.</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. The driver produces one line for each timecode in the following format:
+<p><tt>00 00 98 23 19:26:52 2782 143 0.694 10 0.3 66.5 3094572411.00027</tt></p>
+<p>If clockstats is enabled, the most recent line is written to the clockstats file every 64 s. If verbose recording is enabled (fudge flag 4) each line is written as generated.</p>
+<p>The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the year of century, day of year and time of day. Note that the time of day is for the previous minute, not the current time. The status indicator and year are not produced by some IRIG devices and appear as zeros. Following these fields are the carrier amplitude (0-3000), codec gain (0-255), modulation index (0-1), time constant (4-10), carrier phase error (0&plusmn;0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format.</p>
+<p>The error flags are defined as follows in hex:</p>
+<dl>
+ <dt><tt>x01</tt></dt>
+ <dd>Low signal. The carrier amplitude is less than 100 units. This is usually the result of no signal or wrong input port.</dd>
+ <dt><tt>x02</tt></dt>
+ <dd>Frequency error. The codec frequency error is greater than 250 PPM. This may be due to wrong signal format or (rarely) defective codec.</dd>
+ <dt><tt>x04</tt></dt>
+ <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.</dd>
+ <dt><tt>x08</tt></dt>
+ <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.</dd>
+ <dt><tt>x10</tt></dt>
+ <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.</dd>
+ <dt><tt>x20</tt></dt>
+ <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.</dd>
+ <dt><tt>x40</tt></dt>
+ <dd>Codec error (overrun). The machine is not fast enough to keep up with the codec.</dd>
+ <dt><tt>x80</tt></dt>
+ <dd>Device status error (Spectracom).</dd>
+</dl>
+<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>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver7.html b/html/drivers/driver7.html
index 6f4874117f2c..90baf61a36be 100644
--- a/html/drivers/driver7.html
+++ b/html/drivers/driver7.html
@@ -1,65 +1,67 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="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>
- <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/audio</tt> and <tt>/dev/audioctl</tt>
- <h4>Description</h4>
- <p>This driver synchronizes the computer time using shortwave radio transmissions
- from Canadian time/frequency station <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/shortwave_broadcasts_e.html">CHU</a> in
- Ottawa, Ontario. CHU transmissions are made continuously on 3.330,
- 7.850 and 14.670 MHz 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 season.</p>
- <p>The driver can be compiled to use either an audio codec or soundcard, or a 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. If compiled for a modem, the driver uses it to receive the radio signal and demodulate the data. If compiled for the audio codec, it requires a sampling rate of 8 kHz and <font face="symbol">m</font>-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC. In this implementation, only one audio driver and codec can be supported on a single machine.</p>
- <p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 625 km from the transmitter, the predicted one-hop propagation delay varies from 2.8 ms in sunlight to 2.6 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
- <p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.2 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
- <p>The driver 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>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>
- <h4>Technical Overview</h4>
- <p>The driver processes 8-kHz <font face="symbol">m</font>-law companded codec samples 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. The single format B burst is considered correct only if every character matches its repetition in the burst. For the eight format A bursts, a majority decoder requires more than half of the 16 repetitions for each digit decode to the same value. Every character in every burst provides an independent timestamp upon arrival with a potential total of 60 timestamps for each minute.</p>
- <p>The CHU timecode format is described on the <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/chu_e.html">CHU website</a>. A timecode is assembled when all bursts have been received in each minute. The timecode is considered valid and the clock set when at least one valid format B burst has been decoded and the majority decoder declares success. Once the driver has synchronized for the first time, it will appear reachable and selectable to discipline the system clock. It is normal on occasion to miss a minute or two due to signal fades or noise. If eight successive minutes are missed, the driver is considered unreachable and the system clock will free-wheel at the latest determined frequency offset. 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 with long intervals between updates, it is unlikely that the system clock will drift more than a few milliseconds during periods of signal loss.</p>
- <h4>Baseband Signal Processing</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). It consists of a 500-Hz bandpass filter centered on 2125 Hz followed by a limiter/discriminator and raised-cosine lowpass filter optimized for the 300-b/s data rate. </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 from the DSP modem is shifted into the corresponding register and the maximum and minimum over all 11 samples computed. This establishes a span (difference) and slice level (average) over all 11 stages. For each stage, a signal level above the slice is a mark (1) and below that 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 start bit (space), eight arbitrary information bits and two stop bits (mark).</p>
- <p>The shift registers are processed in round-robin order as the phases of each bit arrive. At the end of each bit all eight phases are searched for valid framing bits, sufficient span and best metric. The best candidate found in this way represents the maximum-likelihood character. The process then continues for all ten characters in the burst.</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, each block representing ten 4-bit BCD digits. The format B blocks sent in second 31 contain the year and other information in ten digits. The eight format A blocks sent in seconds 32-39 contain the timecode in ten 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 codes to correct the discrepancy, 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 burst 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>
- <h4>Majority Decoder</h4>
- <p>Each minute of transmission includes eight format A bursts containing two timecodes for each second from 32 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 burst must match and the value must be in the range 2-9 and greater than in the previous burst.</p>
- <p>As each 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 the minute, each row of the decoding matrix encodes the number of occurrences of each code found at the corresponding position.</p>
- <p>The maximum over all occurrences at each digit position is the distance for that position and the corresponding code is the maximum-likelihood digit. If the distance is not more than half the total number of occurrences, the decoder assumes a soft error and discards all information collected during the minute. The decoding distance is defined as the sum of the distances 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 timestamps accumulated over the minute. A perfect set of eight bursts could generate as many as 80 timestamps, but the maximum the interface can handle is 60. These are processed 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. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</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.331 MHz. The 1-kHz offset is useful with a narrowband SSB&nbsp;filter where the passband includes the carrier and modem signals. 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 is inoperative, the driver continues in single-frequency mode.</p>
- <p>As long as no bursts are received, the driver cycles over the three frequencies in turn, one minute for each station. When bursts are received from one or more stations, the driver operates in a five-minute cycle. During the first four minutes it tunes to the station with the highest metric. During the last minute it alternates between the other two stations in turn in order to measure the metric.</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: A single message beginning with <tt>chuB</tt> is produced for each format B burst received in second 31, while eight messages beginning with <tt>chuA</tt> are produced for each format A burst received in seconds 32 through 39 of the minute. The first four fields are</p>
- <p><tt>stat sig n b</tt></p>
- <p>where <tt>stat</tt> is the status code, <tt>sig</tt> the character span, <tt>n</tt> the number of characters in the burst (9-11) and <tt>b</tt> the burst distance (0-40). Good bursts will have spans of a 800 or more and the other numbers near the top of the range specified. See the source for the interpretation of the remaining data in the burst. Note that each character of the burst is encoded as two digits in nibble-swapped order.</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>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->17-Jul-2014 02:17<!-- #EndDate -->
+ UTC</p>
+<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/audio</tt> and <tt>/dev/audioctl</tt>
+<h4>Description</h4>
+<p>This driver synchronizes the computer time using shortwave radio transmissions
+ from Canadian time/frequency station <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/shortwave_broadcasts_e.html">CHU</a> in
+ Ottawa, Ontario. CHU transmissions are made continuously on 3.330,
+ 7.850 and 14.670 MHz 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 season.</p>
+<p>The driver can be compiled to use either an audio codec or soundcard, or a 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. If compiled for a modem, the driver uses it to receive the radio signal and demodulate the data. If compiled for the audio codec, it requires a sampling rate of 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC. In this implementation, only one audio driver and codec can be supported on a single machine.</p>
+<p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 625 km from the transmitter, the predicted one-hop propagation delay varies from 2.8 ms in sunlight to 2.6 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
+<p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.2 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
+<p>The driver 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>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>
+<h4>Technical Overview</h4>
+<p>The driver processes 8-kHz &mu;-law companded codec samples 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. The single format B burst is considered correct only if every character matches its repetition in the burst. For the eight format A bursts, a majority decoder requires more than half of the 16 repetitions for each digit decode to the same value. Every character in every burst provides an independent timestamp upon arrival with a potential total of 60 timestamps for each minute.</p>
+<p>The CHU timecode format is described on the <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/chu_e.html">CHU website</a>. A timecode is assembled when all bursts have been received in each minute. The timecode is considered valid and the clock set when at least one valid format B burst has been decoded and the majority decoder declares success. Once the driver has synchronized for the first time, it will appear reachable and selectable to discipline the system clock. It is normal on occasion to miss a minute or two due to signal fades or noise. If eight successive minutes are missed, the driver is considered unreachable and the system clock will free-wheel at the latest determined frequency offset. 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 with long intervals between updates, it is unlikely that the system clock will drift more than a few milliseconds during periods of signal loss.</p>
+<h4>Baseband Signal Processing</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). It consists of a 500-Hz bandpass filter centered on 2125 Hz followed by a limiter/discriminator and raised-cosine lowpass filter optimized for the 300-b/s data rate. </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 from the DSP modem is shifted into the corresponding register and the maximum and minimum over all 11 samples computed. This establishes a span (difference) and slice level (average) over all 11 stages. For each stage, a signal level above the slice is a mark (1) and below that 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 start bit (space), eight arbitrary information bits and two stop bits (mark).</p>
+<p>The shift registers are processed in round-robin order as the phases of each bit arrive. At the end of each bit all eight phases are searched for valid framing bits, sufficient span and best metric. The best candidate found in this way represents the maximum-likelihood character. The process then continues for all ten characters in the burst.</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, each block representing ten 4-bit BCD digits. The format B blocks sent in second 31 contain the year and other information in ten digits. The eight format A blocks sent in seconds 32-39 contain the timecode in ten 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 codes to correct the discrepancy, 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 burst 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>
+<h4>Majority Decoder</h4>
+<p>Each minute of transmission includes eight format A bursts containing two timecodes for each second from 32 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 burst must match and the value must be in the range 2-9 and greater than in the previous burst.</p>
+<p>As each 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 the minute, each row of the decoding matrix encodes the number of occurrences of each code found at the corresponding position.</p>
+<p>The maximum over all occurrences at each digit position is the distance for that position and the corresponding code is the maximum-likelihood digit. If the distance is not more than half the total number of occurrences, the decoder assumes a soft error and discards all information collected during the minute. The decoding distance is defined as the sum of the distances 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 timestamps accumulated over the minute. A perfect set of eight bursts could generate as many as 80 timestamps, but the maximum the interface can handle is 60. These are processed 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. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</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.331 MHz. The 1-kHz offset is useful with a narrowband SSB&nbsp;filter where the passband includes the carrier and modem signals. 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 is inoperative, the driver continues in single-frequency mode.</p>
+<p>As long as no bursts are received, the driver cycles over the three frequencies in turn, one minute for each station. When bursts are received from one or more stations, the driver operates in a five-minute cycle. During the first four minutes it tunes to the station with the highest metric. During the last minute it alternates between the other two stations in turn in order to measure the metric.</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: A single message beginning with <tt>chuB</tt> is produced for each format B burst received in second 31, while eight messages beginning with <tt>chuA</tt> are produced for each format A burst received in seconds 32 through 39 of the minute. The first four fields are</p>
+<p><tt>stat sig n b</tt></p>
+<p>where <tt>stat</tt> is the status code, <tt>sig</tt> the character span, <tt>n</tt> the number of characters in the burst (9-11) and <tt>b</tt> the burst distance (0-40). Good bursts will have spans of a 800 or more and the other numbers near the top of the range specified. See the source for the interpretation of the remaining data in the burst. Note that each character of the burst is encoded as two digits in nibble-swapped order.</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 lw dst du lset agc rfrq bcnt dist tsmp
s sync indicator
@@ -78,72 +80,65 @@
dist decoder 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 has been 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>Timestamp alarm. Fewer than 20 timestamps have been determined.
- <dt><tt>4</tt>
- <dd>Decoder alarm. A majority of repetitions for at least one digit of the timecode fails to agree.
- <dt><tt>2</tt>
- <dd>Format alarm. One or more bursts contained invalid data or was improperly formatted.<dt><tt>1</tt>
- <dd>Frame alarm. One or more bursts was improperly framed or contained too many repetition errors.</dl>
- <p>The timestamp and decoder alarms are fatal; the data accumulated during the minute are not used to set the clock. The format and fram alarm are nonfatal; only the data in the burst are discarded.</p>
-
-
-
- <dt><tt>yyyy ddd hh:mm:ss</tt>
- <dd>The timecode format itself is self explanatory. Note that the Gregorian year is decoded directly from the transmitted timecode.
-
- <dt><tt>lw</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.<dt><tt>dst</tt>
- <dd>The DST code for Canada encodes the state for all provinces. It is encoded as two hex characters.
- <dt><tt>dut</tt>
- <dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds. It is encoded as one digit preceeded by sign.
- <dt><tt>lset</tt>
- <dd>Before the clock is set, this is the number of minutes since the program was started; after the clock is set, this is the 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 should be set for a value midway in this range.
- <dt><tt>ident</tt>
- <dd>The CHU&nbsp;identifier <tt>CHU </tt>followed by the current radio frequency
- code, if the CI-V interface is active, or <tt>CHU</tt> if not. The radio
- frequncy is encoded as 0 for 3.330 MHz, 1 for 7.850 MHz and 2
- for 14.670 MHz.<dt><tt>dist</tt>
- <dd>The decoding distance determined during the most recent minute bursts were received. The values range from 0 to 160, with the higher values indicating better signals. The decoding algorithms require the distance at least 50; otherwise all data in the minute are discarded.<dt><tt>tsmp</tt>
- <dd>The number of timestamps determined during the most recent minute bursts were received. The values range from 0 to 60, with the higher values indicating better signals. The decoding algoriths require at least 20 timestamps in the minute; otherwise all data in the minute are discarded.
- </dl>
- <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
+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 has been 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>Timestamp alarm. Fewer than 20 timestamps have been determined.</dd>
+ <dt><tt>4</tt></dt>
+ <dd>Decoder alarm. A majority of repetitions for at least one digit of the timecode fails to agree.</dd>
+ <dt><tt>2</tt></dt>
+ <dd>Format alarm. One or more bursts contained invalid data or was improperly formatted.</dd>
+ <dt><tt>1</tt></dt>
+ <dd>Frame alarm. One or more bursts was improperly framed or contained too many repetition errors.</dd>
+ </dl>
+ The timestamp and decoder alarms are fatal; the data accumulated during the minute are not used to set the clock. The format and fram alarm are nonfatal; only the data in the burst are discarded.</dd>
+ <dt><tt>yyyy ddd hh:mm:ss</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>lw</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.</dd>
+ <dt><tt>dst</tt></dt>
+ <dd>The DST code for Canada encodes the state for all provinces. It is encoded as two hex characters.</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. It is encoded as one digit preceeded by sign.</dd>
+ <dt><tt>lset</tt></dt>
+ <dd>Before the clock is set, this is the number of minutes since the program was started; after the clock is set, this is the 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 should be set for a value midway in this range.</dd>
+ <dt><tt>ident</tt></dt>
+ <dd>The CHU&nbsp;identifier <tt>CHU </tt>followed by the current radio frequency
+ code, if the CI-V interface is active, or <tt>CHU</tt> if not. The radio
+ frequncy is encoded as 0 for 3.330 MHz, 1 for 7.850 MHz and 2
+ for 14.670 MHz.</dd>
+ <dt><tt>dist</tt></dt>
+ <dd>The decoding distance determined during the most recent minute bursts were received. The values range from 0 to 160, with the higher values indicating better signals. The decoding algorithms require the distance at least 50; otherwise all data in the minute are discarded.</dd>
+ <dt><tt>tsmp</tt></dt>
+ <dd>The number of timestamps determined during the most recent minute bursts were received. The values range from 0 to 60, with the higher values indicating better signals. The decoding algoriths require at least 20 timestamps in the minute; otherwise all data in the minute are discarded.</dd>
+</dl>
+<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>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver8.html b/html/drivers/driver8.html
index 8e81e5f57f16..ab21f0f1f840 100644
--- a/html/drivers/driver8.html
+++ b/html/drivers/driver8.html
@@ -2,299 +2,277 @@
<html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <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<br>
- PPS device: <tt>/dev/refclockpps-<i>u</i></tt>; alternate PPS device (if not available via the serial port)
- <h4>Description</h4>
- The PARSE driver supports 20 different clock types/configurations. PARSE is actually a multi-clock driver.<br>
- <br>
- <p>The actual receiver status is mapped into various synchronization states generally used by receivers. The driver is configured to interpret the time codes of Meinberg DCF77 AM receivers, DCF77 FM receivers, Meinberg GPS16x/17x receivers, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see <a href="#clocklist">list below</a>).</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 up to 4 devices, the processing of a PPS signal is also provided as a 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>
- <h4>Timecode variables listed by ntpq (8)</h4>
- <p>The ntpq program can read and display several clock variables. These hold the following information:</p>
- <dl>
- <dt><tt>refclock_format</tt></dt>
- <dd>A qualification of the decoded time code format.</dd>
- <dt><tt>refclock_states</tt></dt>
- <dd>The overall running time and the accumulated times for the clock event states.</dd>
- <dt><tt>refclock_status</tt></dt>
- <dd>Lists the currently active receiver flags. Additional feature flags for the receiver are optionally listed in parentheses.</dd>
- <dt><tt>refclock_time</tt></dt>
- <dd>The local time with the offset to UTC (format HHMM).</dd>
- <dt><tt>timecode</tt></dt>
- <dd>The actual time code.</dd>
- </dl>
- <p>If PPS information is present, additional variables are available:</p>
- <dl>
- <dt><tt>refclock_ppsskew</tt></dt>
- <dd>The difference between the RS-232-derived timestamp and the PPS timestamp.</dd>
- <dt><tt>refclock_ppstime</tt></dt>
- <dd>The PPS timestamp.</dd>
- </dl>
- <h4>Supported Devices</h4>
- <p>Currently, nineteen 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 were mainly done without actual access to the hardware, thus not all implementations provide full support. The development was done with the help of many kind souls who had the hardware and kindly lent me their time and 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="mailto:kardel <AT> ntp.org">kardel &lt;AT&gt; ntp.org</a>) are welcome as long as they work within Europe 8-).
- <p>Verified implementations are:</p>
- <ul>
- <li>RAWDCF variants
- <p>These variants have been tested for correct decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddling with cables. In particular, commercial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS-232 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 have been verified by the Meinberg people themselves and I have access to one of these clocks.</p>
- </ul>
- </ul>
- <p>The pictures below have been taken from and are linked to the vendors' web pages.</p>
- <a name="clocklist"></a>
- <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> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/TCXO / 50&mu;s)</tt></b><br>
- <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> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/OCXO / 50&mu;s)</tt></b><br>
- <a href="http://www.meinberg.de/english/products/pzf-eurocard.htm"><img src="../pic/pzf511.jpg" alt="Image PZF511" height="300" width="260" align="top" border="0"></a><br>
- <br></p>
-
- <li><a name="mode2"></a><b><tt>server 127.127.8.0-3 mode 2</tt></b>
- <p><b><tt><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver and similar</a> (AM demodulation / 4ms)</tt></b><br>
- <a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="Image C51" height="239" width="330" align="top" border="0"></a><br>
- </p>
- <p>This mode expects the Meinberg standard time string format with 9600/7E2.</p>
- <p><b>Note:</b> mode 2 must also be used for <a href="http://www.meinberg.de/english/products/formfactor.htm#slot_card">Meinberg PCI cards</a> under Linux, e.g. <a href="http://www.meinberg.de/english/products/gps-pcicard.htm">the GPS PCI card</a> or <a href="http://www.meinberg.de/english/products/dcf-pcicard.htm">the DCF77 PCI card</a>. Please note the <a href="http://www.meinberg.de/english/sw/#linux">Meinberg Linux driver</a> must be installed. That driver emulates a refclock device in order to allow ntpd to access those cards. For details, please refer to the README file that comes with the Meinberg driver package.<br>
- <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>
- <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>
- <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>
- <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>
- <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/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</tt></b><br>
- <a href="http://www.meinberg.de/english/products/gps-eurocard.htm"><img src="../pic/gps167.jpg" alt="Image GPS167" height="300" width="280" align="top" border="0"></a><br>
- </p>
- <p>This mode expects either the University of Erlangen time string format or the Meinberg standard time string format at 19200/8N1.</p>
- <p>The University of Erlangen format is preferred. Newer Meinberg GPS receivers can be configured to transmit that format; for older devices, a special firmware version may be available.</p>
- <p>In this mode some additional GPS receiver status information is also read. However, this requires a point-to-point connection. <a href="#mode18">Mode 18</a> should be used if the device is accessed by a multidrop connection.</p>
- <p><b>Note:</b> mode 7 must not be used with Meinberg PCI cards; use <a href="#mode2">mode 2</a> instead.<br>
- <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" alt="Image IGEL clock" height="174" width="200" border="0"></a><br>
- <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;1&mu;s)</tt></b><br>
- <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;1&mu;s) (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="Image SVeeSix-CM3" height="100" width="420" align="top" border="0"></a><br>
- <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Image Lassen-SK8" height="100" width="420" border="0"></a><br>
- <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>
- <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="Image DCF77 Interface Board" height="207" width="238" align="top" border="0"></a><br>
- <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>
- <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><br>
- <br></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><br>
- <br></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><br>
- <br></p>
-
- <li><b><tt>server 127.127.8.0-3 mode 17</tt></b>
- <p><b><tt>VARITEXT Receiver (MSF) </tt></b><br>
- <br></p>
-
- <li><a name="mode18"></a><b><tt>server 127.127.8.0-3 mode 18</tt></b>
- <p><b><tt><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</tt></b><br>
- </p>
- <p>This mode works without additional data communication (version, GPS status etc.) and thus should be used with multidrop, heterogeneous multiclient operation.</p>
- <p><b>Note:</b> mode 18 must not be used with Meinberg PCI cards, use mode 2 instead.<br>
- <br></p>
- <li><b><tt>server 127.127.8.0-3 mode 19</tt></b>
- <p><b><tt>Gude Analog- und Digitalsystem GmbH 'Expert mouseCLOCK USB v2.0'</tt></b><br>
- <br></p>
-
- <li><b><tt>server 127.127.8.0-3 mode 20</tt></b>
- <p><b><tt>RAWDCF receiver similar to mode 14, but operating @ 75 baud (DTR=high/RTS=low)</tt></b><br>
- </p>
- <p>Driving the DCF clocks at 75 baud may help to get them to work with a bunch of common USB serial converters, that do 75 but cannot do 50 baud at all, e.g. those based on Prolific PL2303.
- <br></p>
-
- <li><b><tt>server 127.127.8.0-3 mode 21</tt></b>
- <p><b><tt>RAWDCF receiver similar to mode 16, but operating @ 75 baud (DTR=low/RTS=high) </tt></b><br>
- </p>
- <p>See comment from mode 20 clock.
- <br></p>
-
- <li><b><tt>server 127.127.8.0-3 mode 22</tt></b>
- <p><b><tt>MEINBERG, mode 2 but with POWERUP trust </tt></b><br>
- </p>
-
- <li><b><tt>server 127.127.8.0-3 mode 23</tt></b>
- <p><b><tt>MEINBERG, mode 7 but with POWERUP trust </tt></b><br>
- </p>
-
- </ul>
-
- <p>Actual data formats and setup requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
- <h4>Operation</h4>
- <p>The reference clock support software 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 synchronization, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus is a function of clock type.</p>
- <p>Raw DCF77 pulses can be fed via a level converter to the RXD pin of an RS-232 serial port (pin 3 of a 25-pin connector or pin 2 of a 9-pin connector). The telegrams are decoded and used for synchronization. DCF77 AM receivers can be bought for as little as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) and 10ms (cheap). Synchronization ceases when reception of the DCF77 signal deteriorates, since 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. During transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
- <p>In addition to the PPS loopfilter control, a true PPS hardware signal can be utilized via the PPSAPI interface. PPS pulses are usually fed via a level converter to the DCD pin of an RS-232 serial port (pin 8 of a 25-pin connector or pin 1 of a 9-pin connector). To select PPS support, the mode parameter is the mode value as above plus 128. If 128 is not added to the mode value, PPS will be detected to be available but will not be used.
- </p>
- <h4>Hardware PPS support<br>
- </h4>
- <p>For PPS to be used, add 128 to the mode parameter.</p>
- <p>If the PPS signal is fed in from a device different from the device providing the serial communication (/dev/refclock-{0..3}), this device is configured as /dev/refclockpps-{0..3}. This allows the PPS information to be fed in e.g. via the parallel port (if supported by the underlying operation system) and the date/time telegrams to be handled via the serial port.</p>
- <h4>Monitor Data</h4>
- <p>Clock state statistics are written hourly to the syslog service. Online information can be found by examining the clock variables via the <code>ntpq cv</code> command.<br>
- Some devices have quite extensive additional information (GPS16x/GPS17x, Trimble). The driver reads out much of the internal GPS data
- and makes it accessible via clock variables. To find out about additional variable names, query for the clock_var_list variable on
- a specific clock association as shown below.
- </p>
- <p>First let <code>ntpq</code> display the table of associations:</p>
- <pre>
- ntpq&gt; as
- ind assID status conf reach auth condition last_event cnt
- ===========================================================
- 1 19556 9154 yes yes none falsetick reachable 5
- 2 19557 9435 yes yes none candidat clock expt 3
- 3 19558 9714 yes yes none pps.peer reachable 1
- </pre>
- <p>Then switch to raw output. This may be required because of display limitations in ntpq/ntpd - so large lists need to be retrieved in several queries.</p>
- <pre>
- ntpq&gt; raw
- Output set to raw
- </pre>
- <p>Use the cv command to read the list of clock variables of a selected association:</p>
- <pre>
- ntpq&gt; cv 19557 clock_var_list
- </pre>
- <p>The long output of the command above looks similar to:</p>
- <pre>
- assID=19557 status=0x0000,
- clock_var_list=&quot;type,timecode,poll,noreply,badformat,baddata,fudgetime1,
- fudgetime2,stratum,refid,flags,device,clock_var_list,refclock_time,refclock_status,
- refclock_format,refclock_states,refclock_id,refclock_iomode,refclock_driver_version,
- meinberg_gps_status,gps_utc_correction,gps_message,meinberg_antenna_status,gps_tot_51,
- gps_tot_63,gps_t0a,gps_cfg[1],gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],
- gps_health[3],gps_cfg[4],gps_health[4],gps_cfg[5]&quot;
- </pre>
- <p>Then use the cv command again to list selected clock variables. The following command must be entered as a single line:</p>
- <pre>
- ntpq&gt; cv 19557 refclock_status,refclock_format,refclock_states,refclock_id,
- refclock_iomode,refclock_driver_version,meinberg_gps_status,gps_utc_correction,
- gps_message,meinberg_antenna_status,gps_tot_51,gps_tot_63,gps_t0a,gps_cfg[1],
- gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],gps_health[3],gps_cfg[4],
- gps_health[4],gps_cfg[5]
- </pre>
- <p>The output of the command above is wrapped around depending on the screen width and looks similar to:</p>
- <pre>
- status=0x0003,
- refclock_status=&quot;UTC DISPLAY; TIME CODE; PPS; POSITION; (LEAP INDICATION;
- PPS SIGNAL; POSITION)&quot;,
- refclock_format=&quot;Meinberg GPS Extended&quot;,
- refclock_states=&quot;*NOMINAL: 21:21:36 (99.99%); FAULT: 00:00:03 (0.00%);
- running time: 21:21:39&quot;,
- refclock_id=&quot;GPS&quot;, refclock_iomode=&quot;normal&quot;,
- refclock_driver_version=&quot;refclock_parse.c,v 4.77 2006/08/05 07:44:49
- kardel RELEASE_20060805_A&quot;,
- meinberg_gps_status=&quot;[0x0000] &lt;OK&gt;&quot;,
- gps_utc_correction=&quot;current correction 14 sec, last correction
- on c7619a00.00000000 Sun, Jan 1 2006 0:00:00.000&quot;,
- gps_message=&quot;/PFU3SOP-4WG14EPU0V1KA&quot;,
- meinberg_antenna_status=&quot;RECONNECTED on 2006-07-18 08:13:20.0000000 (+0000)
- UTC CORR, LOCAL TIME, reconnect clockoffset +0.0000000 s,
- disconnect time 0000-00-00 00:00:00.0000000 (+0000) &quot;,
- gps_tot_51=&quot;week 1400 + 3 days + 42300.0000000 sec&quot;,
- gps_tot_63=&quot;week 1400 + 3 days + 42294.0000000 sec&quot;,
- gps_t0a=&quot;week 1400 + 5 days + 71808.0000000 sec&quot;,
- gps_cfg[1]=&quot;[0x9] BLOCK II&quot;, gps_health[1]=&quot;[0x0] OK;SIGNAL OK&quot;,
- gps_cfg[2]=&quot;[0x0] BLOCK I&quot;, gps_health[2]=&quot;[0x3f] PARITY;MULTIPLE ERRS&quot;,
- gps_cfg[3]=&quot;[0x9] BLOCK II&quot;, gps_health[3]=&quot;[0x0] OK;SIGNAL OK&quot;,
- gps_cfg[4]=&quot;[0x9] BLOCK II&quot;, gps_health[6]=&quot;[0x0] OK;SIGNAL OK&quot;,
- gps_cfg[5]=&quot;[0x9] BLOCK II&quot;
- </pre>
- <h4>Fudge Factors</h4>
- <dl>
- <dt><tt>time1 <i>time</i></tt>
- <dd>Specifies the time offset calibration factor, in seconds and fraction. The default value depends on the clock type.
- <dt><tt>time2 <i>time</i></tt>
- <dd>
- If flag1 is 0, time2 specifies the offset of the PPS signal from the actual time (PPS fine tuning).
- <dd>
- If flag1 is 1, time2 specifies the number of seconds a receiver with a premium local oscillator can be trusted after losing synchronisation.
- <dt><tt>stratum <i>stratum</i></tt>
- <dd>The stratum for this reference clock.
- <dt><tt>refid <i>refid</i></tt>
- <dd>The refid for this reference clock.
- </dl>
- <dl>
- <dt><tt>flag1 { 0 | 1 }</tt>
- <dd>If 0, the fudge factor <tt>time2</tt> refers to the PPS offset.
- <dd>If 1, <tt>time2</tt> refers to the TRUST TIME.
- <dt><tt>flag2 { 0 | 1 }</tt>
- <dd>If <tt>flag2</tt> is 1, sample PPS on CLEAR instead of on ASSERT.
- <dt><tt>flag3 { 0 | 1 }</tt>
- <dd>If <tt>flag3</tt> is 1, link kernel PPS tracking to this refclock instance.
- <dt><tt>flag4 { 0 | 1 }</tt>
- <dd>Delete next leap second instead of adding it. (You'll need to wait a bit for that to happen 8-)
- </dl>
- <span style="font-weight: bold;">Note about auxiliary Sun STREAMS modules (SunOS and Solaris):</span><br>
- <dl>
- <dt>The timecode of these receivers can be 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.8. It can be linked directly into the kernel or loaded via the loadable driver mechanism.) This STREAMS module can be adapted to convert different time code formats. Nowadays the PPSAPI mechanism is usually used.
- </dl>
- <h4>Making your own PARSE clocks</h4>
- <p>The parse clock mechanism deviates from the way other NTP reference clocks work. For a short description of 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>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Generic Reference Driver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+ <body>
+ <h3>Generic Reference Driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->27-Jan-2014 05:31<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.8.<em>u</em><br>
+ Reference ID: PARSE<br>
+ Driver ID: GENERIC<br>
+ Serial Port: /dev/refclock-<em>u</em>; TTY mode according to clock type<br>
+ PPS device: /dev/refclockpps-<em>u</em>; alternate PPS device (if not available via the serial port)
+ <h4>Description</h4>
+ The PARSE driver supports 20 different clock types/configurations. PARSE is actually a multi-clock driver.<br>
+ <br>
+ <p>The actual receiver status is mapped into various synchronization states generally used by receivers. The driver is configured to interpret the time codes of Meinberg DCF77 AM receivers, DCF77 FM receivers, Meinberg GPS16x/17x receivers, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#clocklist">list below</a>).</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 up to 4 devices, the processing of a PPS signal is also provided as a 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>
+ <h4>Timecode variables listed by ntpq (8)</h4>
+ <p>The ntpq program can read and display several clock variables. These hold the following information:</p>
+ <dl>
+ <dt>refclock_format</dt>
+ <dd>A qualification of the decoded time code format.</dd>
+ <dt>refclock_states</dt>
+ <dd>The overall running time and the accumulated times for the clock event states.</dd>
+ <dt>refclock_status</dt>
+ <dd>Lists the currently active receiver flags. Additional feature flags for the receiver are optionally listed in parentheses.</dd>
+ <dt>refclock_time</dt>
+ <dd>The local time with the offset to UTC (format HHMM).</dd>
+ <dt>timecode</dt>
+ <dd>The actual time code.</dd>
+ </dl>
+ <p>If PPS information is present, additional variables are available:</p>
+ <dl>
+ <dt>refclock_ppsskew</dt>
+ <dd>The difference between the RS-232-derived timestamp and the PPS timestamp.</dd>
+ <dt>refclock_ppstime</dt>
+ <dd>The PPS timestamp.</dd>
+ </dl>
+ <h4>Supported Devices</h4>
+ <p>Currently, twenty-four clock types are supported by the PARSE driver and up to four (devices /dev/refclock-0 - /dev/refclock-3) of these clocks may be operational at any one time.<br>
+ A note on the implementations:</p>
+ <ul>
+ <li>These implementations were mainly done without actual access to the hardware, thus not all implementations provide full support. The development was done with the help of many kind souls who had the hardware and kindly lent me their time and 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="mailto:kardel%20%3CAT%3E%20ntp.org">kardel &lt;AT&gt; ntp.org</a>) are welcome as long as they work within Europe 8-).
+ <p>Verified implementations are:</p>
+ <ul>
+ <li>RAWDCF variants
+ <p>These variants have been tested for correct decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddling with cables. In particular, commercial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS-232 port and to encode the DCF77 datastream. You are mainly on your own here unless I have a sample of the receiver.</p>
+ </li>
+ <li><a href="http://www.meinberg.de">Meinberg clocks</a>
+ <p>These implementations have been verified by the Meinberg people themselves and I have access to one of these clocks.</p>
+ </li>
+ <li><a href="http://www.selinc.com">Schweitzer Engineering
+ Laboratories SEL-240x clocks</a>
+ <p>This implementation was provided and verified by SEL and <a
+ href="http://networktimefoundation.org">Network Time Foundation</a>
+ has an SEL-2407 in one of its development labs.</p>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>The pictures below have been taken from and are linked to the vendors' web pages.</p>
+ <a name="clocklist"></a>
+ <ul>
+ <li><strong>server 127.127.8.0-3 mode 0</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/TCXO / 50&mu;s)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 1</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/OCXO / 50&mu;s)</strong><br>
+ <a href="http://www.meinberg.de/english/products/pzf-eurocard.htm"><img src="../pic/pzf511.jpg" alt="Image PZF511" align="top" border="0" height="300" width="260"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><a name="mode2"></a><strong>server 127.127.8.0-3 mode 2</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver and similar</a> (AM demodulation / 4ms)</strong><br>
+ <a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="Image C51" align="top" border="0" height="239" width="330"></a><br>
+ </p>
+ <p>This mode expects the Meinberg standard time string format with 9600/7E2.</p>
+ <p><strong>Note:</strong> mode 2 must also be used for <a href="http://www.meinberg.de/english/products/formfactor.htm#slot_card">Meinberg PCI cards</a> under Linux, e.g. <a href="http://www.meinberg.de/english/products/gps-pcicard.htm">the GPS PCI card</a> or <a href="http://www.meinberg.de/english/products/dcf-pcicard.htm">the DCF77 PCI card</a>. Please note the <a href="http://www.meinberg.de/english/sw/#linux">Meinberg Linux driver</a> must be installed. That driver emulates a refclock device in order to allow ntpd to access those cards. For details, please refer to the README file that comes with the Meinberg driver package.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 3</strong>
+ <p><strong><a href="http://www.elv.de">ELV</a> DCF7000 (sloppy AM demodulation / 50ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 4</strong>
+ <p><strong>Walter Schmid DCF receiver Kit (AM demodulation / 1ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 5</strong>
+ <p><strong>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module / 5ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 6</strong>
+ <p><strong>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module / 5ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 7</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</strong><br>
+ <a href="http://www.meinberg.de/english/products/gps-eurocard.htm"><img src="../pic/gps167.jpg" alt="Image GPS167" align="top" border="0" height="300" width="280"></a><br>
+ </p>
+ <p>This mode expects either the University of Erlangen time string format or the Meinberg standard time string format at 19200/8N1.</p>
+ <p>The University of Erlangen format is preferred. Newer Meinberg GPS receivers can be configured to transmit that format; for older devices, a special firmware version may be available.</p>
+ <p>In this mode some additional GPS receiver status information is also read. However, this requires a point-to-point connection. <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#mode18">Mode 18</a> should be used if the device is accessed by a multidrop connection.</p>
+ <p><strong>Note:</strong> mode 7 must not be used with Meinberg PCI cards; use <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#mode2">mode 2</a> instead.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 8</strong>
+ <p><strong><a href="http://www.igel.de">IGEL</a> <a href="http://www.igel.de/eigelmn.html">clock</a></strong><br>
+ <a href="http://www.igel.de/eigelmn.html"><img src="../pic/igclock.gif" alt="Image IGEL clock" border="0" height="174" width="200"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 9</strong>
+ <p><strong><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;1&mu;s)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 10</strong>
+ <p><strong><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;1&mu;s) (no kernel support yet)</strong><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html"><img src="../pic/pd_om011.gif" alt="Image SVeeSix-CM3" align="top" border="0" height="100" width="420"></a><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Image Lassen-SK8" border="0" height="100" width="420"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 11</strong>
+ <p><strong>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 12</strong>
+ <p><strong><a href="http://www.hopf-time.com">HOPF</a> <a href="http://www.hopf-time.com/kart6021.html">Funkuhr 6021</a></strong><br>
+ <a href="http://www.hopf-time.com/engl/kart6021.html"><img src="../pic/fg6021.gif" alt="Image DCF77 Interface Board" align="top" border="0" height="207" width="238"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 13</strong>
+ <p><strong>Diem's Computime Radio Clock</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 14</strong>
+ <p><strong>RAWDCF receiver (DTR=high/RTS=low)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 15</strong>
+ <p><strong>WHARTON 400A Series Clocks with a 404.2 Serial Interface</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 16</strong>
+ <p><strong>RAWDCF receiver (DTR=low/RTS=high) </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 17</strong>
+ <p><strong>VARITEXT Receiver (MSF) </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><a name="mode18"></a><strong>server 127.127.8.0-3 mode 18</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</strong><br>
+ </p>
+ <p>This mode works without additional data communication (version, GPS status etc.) and thus should be used with multidrop, heterogeneous multiclient operation.</p>
+ <p><strong>Note:</strong> mode 18 must not be used with Meinberg PCI cards, use mode 2 instead.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 19</strong>
+ <p><strong>Gude Analog- und Digitalsystem GmbH 'Expert mouseCLOCK USB v2.0'</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 20</strong>
+ <p><strong>RAWDCF receiver similar to mode 14, but operating @ 75 baud (DTR=high/RTS=low)</strong><br>
+ </p>
+ <p>Driving the DCF clocks at 75 baud may help to get them to work with a bunch of common USB serial converters, that do 75 but cannot do 50 baud at all, e.g. those based on Prolific PL2303. <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 21</strong>
+ <p><strong>RAWDCF receiver similar to mode 16, but operating @ 75 baud (DTR=low/RTS=high) </strong><br>
+ </p>
+ <p>See comment from mode 20 clock. <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 22</strong>
+ <p><strong>MEINBERG, mode 2 but with POWERUP trust </strong><br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 23</strong>
+ <p><strong>MEINBERG, mode 7 but with POWERUP trust </strong><br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 24</strong>
+ <p><strong><a href="http://www.selinc.com/">Schweitzer Engineering Laboratories</a></strong><br>
+ </p>
+ </li>
+ </ul>
+ <p>Actual data formats and setup requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
+ <h4>Operation</h4>
+ <p>The reference clock support software 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 synchronization, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus is a function of clock type.</p>
+ <p>Raw DCF77 pulses can be fed via a level converter to the RXD pin of an RS-232 serial port (pin 3 of a 25-pin connector or pin 2 of a 9-pin connector). The telegrams are decoded and used for synchronization. DCF77 AM receivers can be bought for as little as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) and 10ms (cheap). Synchronization ceases when reception of the DCF77 signal deteriorates, since 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. During transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
+ <p>In addition to the PPS loopfilter control, a true PPS hardware signal can be utilized via the PPSAPI interface. PPS pulses are usually fed via a level converter to the DCD pin of an RS-232 serial port (pin 8 of a 25-pin connector or pin 1 of a 9-pin connector). To select PPS support, the mode parameter is the mode value as above plus 128. If 128 is not added to the mode value, PPS will be detected to be available but will not be used. </p>
+ <h4>Hardware PPS support<br>
+ </h4>
+ <p>For PPS to be used, add 128 to the mode parameter.</p>
+ <p>If the PPS signal is fed in from a device different from the device providing the serial communication (/dev/refclock-{0..3}), this device is configured as /dev/refclockpps-{0..3}. This allows the PPS information to be fed in e.g. via the parallel port (if supported by the underlying operation system) and the date/time telegrams to be handled via the serial port.</p>
+ <h4>Monitor Data</h4>
+ <p>Clock state statistics are written hourly to the syslog service. Online information can be found by examining the clock variables via the ntpq cv command.<br>
+ Some devices have quite extensive additional information (GPS16x/GPS17x, Trimble). The driver reads out much of the internal GPS data and makes it accessible via clock variables. To find out about additional variable names, query for the clock_var_list variable on a specific clock association as shown below. </p>
+ <p>First let ntpq display the table of associations:</p>
+ <pre> ntpq&gt; as ind assID status conf reach auth condition last_event cnt =========================================================== 1 19556 9154 yes yes none falsetick reachable 5 2 19557 9435 yes yes none candidat clock expt 3 3 19558 9714 yes yes none pps.peer reachable 1 </pre>
+ <p>Then switch to raw output. This may be required because of display limitations in ntpq/ntpd - so large lists need to be retrieved in several queries.</p>
+ <pre> ntpq&gt; raw Output set to raw </pre>
+ <p>Use the cv command to read the list of clock variables of a selected association:</p>
+ <pre> ntpq&gt; cv 19557 clock_var_list </pre>
+ <p>The long output of the command above looks similar to:</p>
+ <pre> assID=19557 status=0x0000, clock_var_list="type,timecode,poll,noreply,badformat,baddata,fudgetime1, fudgetime2,stratum,refid,flags,device,clock_var_list,refclock_time,refclock_status, refclock_format,refclock_states,refclock_id,refclock_iomode,refclock_driver_version, meinberg_gps_status,gps_utc_correction,gps_message,meinberg_antenna_status,gps_tot_51, gps_tot_63,gps_t0a,gps_cfg[1],gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3], gps_health[3],gps_cfg[4],gps_health[4],gps_cfg[5]" </pre>
+ <p>Then use the cv command again to list selected clock variables. The following command must be entered as a single line:</p>
+ <pre> ntpq&gt; cv 19557 refclock_status,refclock_format,refclock_states,refclock_id, refclock_iomode,refclock_driver_version,meinberg_gps_status,gps_utc_correction, gps_message,meinberg_antenna_status,gps_tot_51,gps_tot_63,gps_t0a,gps_cfg[1], gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],gps_health[3],gps_cfg[4], gps_health[4],gps_cfg[5] </pre>
+ <p>The output of the command above is wrapped around depending on the screen width and looks similar to:</p>
+ <pre> status=0x0003, refclock_status="UTC DISPLAY; TIME CODE; PPS; POSITION; (LEAP INDICATION; PPS SIGNAL; POSITION)", refclock_format="Meinberg GPS Extended", refclock_states="*NOMINAL: 21:21:36 (99.99%); FAULT: 00:00:03 (0.00%); running time: 21:21:39", refclock_id="GPS", refclock_iomode="normal", refclock_driver_version="refclock_parse.c,v 4.77 2006/08/05 07:44:49 kardel RELEASE_20060805_A", meinberg_gps_status="[0x0000] &lt;OK&gt;", gps_utc_correction="current correction 14 sec, last correction on c7619a00.00000000 Sun, Jan 1 2006 0:00:00.000", gps_message="/PFU3SOP-4WG14EPU0V1KA", meinberg_antenna_status="RECONNECTED on 2006-07-18 08:13:20.0000000 (+0000) UTC CORR, LOCAL TIME, reconnect clockoffset +0.0000000 s, disconnect time 0000-00-00 00:00:00.0000000 (+0000) ", gps_tot_51="week 1400 + 3 days + 42300.0000000 sec", gps_tot_63="week 1400 + 3 days + 42294.0000000 sec", gps_t0a="week 1400 + 5 days + 71808.0000000 sec", gps_cfg[1]="[0x9] BLOCK II", gps_health[1]="[0x0] OK;SIGNAL OK", gps_cfg[2]="[0x0] BLOCK I", gps_health[2]="[0x3f] PARITY;MULTIPLE ERRS", gps_cfg[3]="[0x9] BLOCK II", gps_health[3]="[0x0] OK;SIGNAL OK", gps_cfg[4]="[0x9] BLOCK II", gps_health[6]="[0x0] OK;SIGNAL OK", gps_cfg[5]="[0x9] BLOCK II" </pre>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt>time1 <em>time</em> </dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction. The default value depends on the clock type. </dd>
+ <dt>time2 <em>time</em> </dt>
+ <dd> If flag1 is 0, time2 specifies the offset of the PPS signal from the actual time (PPS fine tuning). </dd>
+ <dd> If flag1 is 1, time2 specifies the number of seconds a receiver with a premium local oscillator can be trusted after losing synchronisation. </dd>
+ <dt>stratum <em>stratum</em> </dt>
+ <dd>The stratum for this reference clock. </dd>
+ <dt>refid <em>refid</em> </dt>
+ <dd>The refid for this reference clock. </dd>
+ </dl>
+ <dl>
+ <dt>flag1 { 0 | 1 } </dt>
+ <dd>If 0, the fudge factor time2 refers to the PPS offset. </dd>
+ <dd>If 1, time2 refers to the TRUST TIME. </dd>
+ <dt>flag2 { 0 | 1 } </dt>
+ <dd>If flag2 is 1, sample PPS on CLEAR instead of on ASSERT. </dd>
+ <dt>flag3 { 0 | 1 } </dt>
+ <dd>If flag3 is 1, link kernel PPS tracking to this refclock instance. </dd>
+ <dt>flag4 { 0 | 1 } </dt>
+ <dd>Delete next leap second instead of adding it. (You'll need to wait a bit for that to happen 8-) </dd>
+ </dl>
+ Note about auxiliary Sun STREAMS modules (SunOS and Solaris):<br>
+ <dl>
+ <dt>The timecode of these receivers can be 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.8. It can be linked directly into the kernel or loaded via the loadable driver mechanism.) This STREAMS module can be adapted to convert different time code formats. Nowadays the PPSAPI mechanism is usually used. </dt>
+ </dl>
+ <h4>Making your own PARSE clocks</h4>
+ <p>The parse clock mechanism deviates from the way other NTP reference clocks work. For a short description of 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/html/drivers/driver9.html b/html/drivers/driver9.html
index 812ab13b8136..2e52af8f0817 100644
--- a/html/drivers/driver9.html
+++ b/html/drivers/driver9.html
@@ -11,6 +11,9 @@
<body>
<h3>Magnavox MX4200 GPS Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
Address: 127.127.9.<i>u</i><br>
@@ -54,4 +57,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/mx4200data.html b/html/drivers/mx4200data.html
index 6f9ac30b6646..611da6a5f347 100644
--- a/html/drivers/mx4200data.html
+++ b/html/drivers/mx4200data.html
@@ -8,6 +8,9 @@
<body>
<h1>MX4200 Receiver Data Format</h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h2>Table of Contents</h2>
<ul>
@@ -1071,4 +1074,4 @@
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/oncore-shmem.html b/html/drivers/oncore-shmem.html
index 8942927b1917..ec1d97441a31 100644
--- a/html/drivers/oncore-shmem.html
+++ b/html/drivers/oncore-shmem.html
@@ -10,6 +10,9 @@
<body>
<h3>Motorola ONCORE - The Shared Memory Interface</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<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>
@@ -158,4 +161,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/drivers/scripts/footer.txt b/html/drivers/scripts/footer.txt
index 89216ce97e12..d716cbf20a94 100644
--- a/html/drivers/scripts/footer.txt
+++ b/html/drivers/scripts/footer.txt
@@ -1,7 +1,9 @@
document.write("\
<table><tr>\
-<td width='50%' ><img src='../icons/home.gif' align='middle' alt='gif'>\
+<td width='33%' align='center'><img src='../icons/home.gif' align='middle'>\
<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
+<td width='33%' ><img src='../icons/sitemap.png' align='middle'>\
+<a href='../sitemap.html'>Site Map</a></td>\
+<td width='33%' ><img src='../icons/mail2.gif' align='middle'>\
+<a href='http://www.ntp.org/contact'>Contacts</a></td>\
+</tr></table>")
diff --git a/html/drivers/scripts/style.css b/html/drivers/scripts/style.css
index 096b18a6a1d9..7b90fce0048d 100644
--- a/html/drivers/scripts/style.css
+++ b/html/drivers/scripts/style.css
@@ -61,4 +61,4 @@ th {background: #FFFFCC;
th.caption {background: #EEEEEE;
color: #006600;
- text-align: center;} \ No newline at end of file
+ text-align: center;}
diff --git a/html/drivers/tf582_4.html b/html/drivers/tf582_4.html
index 6b0ce0aaa9e3..177976cff393 100644
--- a/html/drivers/tf582_4.html
+++ b/html/drivers/tf582_4.html
@@ -11,6 +11,9 @@
<body>
<h3>European Automated Computer Time Services</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<p>Several European countries use the following message data format:</p>
<p><font size="-1" face="Courier New">Data format<br>
@@ -68,4 +71,4 @@
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/extern.html b/html/extern.html
index c0ae5c9fdbc7..764631d69020 100644
--- a/html/extern.html
+++ b/html/extern.html
@@ -1,50 +1,48 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">18:38</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</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 ntpd
- 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 constant 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 control</tt> 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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->9-May-2014 04:46<!-- #EndDate -->
+ UTC</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 ntpd
+ 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 constant 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 control</tt> 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>
diff --git a/html/filter.html b/html/filter.html
new file mode 100644
index 000000000000..5f9ed0abc5b8
--- /dev/null
+++ b/html/filter.html
@@ -0,0 +1,34 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Clock Filter Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock Filter Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:05<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock filter algorithm processes the offset and delay samples produced by the on-wire protocol for each peer process separately. It uses a sliding window of eight samples and picks out the sample with the least expected error. This page describes the algorithm design principles along with an example of typical performance.</p>
+<div align="center"><img src="pic/flt5.gif" alt="gif">
+ <p>Figure 1. Wedge Scattergram</p>
+</div>
+<p>Figure 1 shows a typical <em>wedge scattergram</em> plotting sample points of offset versus delay collected over a 24-hr period. As the delay increases, the offset variation increases, so the best samples are those at the lowest delay. There are two limb lines at slope &plusmn;0.5, representing the limits of sample variation. However, it is apparent that, if a way could be found to find the sample of lowest delay, it would have the least offset variation and would be the best candidate to synchronize the system clock.</p>
+<p>The clock filter algorithm works best when the delays are statistically identical in the reciprocal directions between the server and client. This is apparent in Figure 1, where the scattergram is symmetric about the x axis through the apex sample. In configurations where the delays are not reciprocal, or where the transmission delays on the two directions are traffic dependent, this may not be the case. A common case with DSL links is when downloading or uploading a large file. During the download or upload process, the delays may be significantly different resulting in large errrors. However, these errors can be largely eliminated using samples near the limb lines, as described on the <a href="huffpuff.html">Huff-n'-Puff Filter</a> page.</p>
+<p>In the clock filter algorithm the offset and delay samples from the on-wire protocol are inserted as the youngest stage of an eight-stage shift register, thus discarding the oldest stage. Each time an NTP packet is received from a source, a dispersion sample is initialized as the sum of the precisions of the server and client. Precision is defined by the latency to read the system clock and varies from 1000 ns to 100 ns in modern machines. The dispersion sample is inserted in the shift register along with the associated offset and delay samples. Subsequently, the dispersion sample in each stage is increased at a fixed rate of 15 &mu;s/s, representing the worst case error due to skew between the server and client clock frequencies.</p>
+<p>In each peer process the clock filter algorithm selects the stage with the smallest delay, which generally represents the most accurate data, and it and the associated offset sample become the peer variables of the same name. The peer jitter statistic is computed as the root mean square (RMS) differences between the offset samples and the offset of the selected stage.</p>
+<p> The peer dispersion statistic is determined as a weighted sum of the dispersion samples in the shift register. Initially, the dispersion of all shift register stages is set to a large number &quot;infinity&quot; equal to 16 s. The weight factor for each stage, starting from the youngest numbered <em>i</em> = 1, is 2<sup>-<em>i</em></sup>, which means the peer dispersion is approximately 16 s.</p>
+<p> As samples enter the register, the peer dispersion drops from 16 s to 8 s, 4 s, 2 s, and so forth. In practice, the synchronization distance, which is equal to one-half the delay plus the dispersion, falls below the select threshold of 1.5 s in about four updates. This gives some time for meaningful comparison between sources, if more than one are available. The dispersion continues to grow at the same rate as the sample dispersion. For additional information on statistacl principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<p> As explained elsewhere, when a source becomes unreachable, the poll process inserts a dummy infinity sample in the shift register for each poll sent. After eight polls, the register returns to its original state.</p>
+<div align="center"><img src="pic/flt1.gif" alt="gif"> &nbsp; <img src="pic/flt2.gif" alt="gif">
+ <p>Figure 2. Raw (left) and Filtered (right) Offsets</p>
+</div>
+<p>Figure 2 shows the performance of the algorithm for a typical Internet path over a 24-hr period. The graph on the left shows the raw offsets produced by the on-wired protocol, while the figure on the right shows the filtered offsets produced by the clock filter algorithm. If we consider the series formed as the absolute value of the offset samples, the mean error is defined as the mean of this series. Thus, the mean error of the raw samples is 0.724 ms, while the mean error of the filtered series is 0.192 ms. Radio engineers would interpret this as a processing gain of 11.5 dB.</p>
+<p>The reader might notice the somewhat boxy characteristic of the filtered offsets. Once a sample is selected, it remains selected until a newer sample with lower delay is available. This commonly occurs when an older selected sample is discarded from the shift register. The reason for this is to preserve causality; that is, time always moves forward, never backward. The result can be the loss of up to seven samples in the shift register, or more to the point, the output sample rate can never be less than one in eight input samples. The clock discipline algorithm is specifically designed to operate at this rate.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/gadget.html b/html/gadget.html
deleted file mode 100644
index e48cbb798240..000000000000
--- a/html/gadget.html
+++ /dev/null
@@ -1,42 +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>Gadget Box PPS Level Converter and CHU Modem</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Gadget Box PPS Level Converter and CHU Modem</h3>
- <img src="pic/gadget.jpg" alt="gif" align="left">A Gadget Box built by Chuck Hanavin
- <br clear="left">
- <h4>Related Links</h4>
- <p>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <br clear="left">
- </p>
- <h4>table of Contents</h4>
- <ul>
- <li class="inline"><a href="#intro">Introduction</a></li>
- <li class="inline"><a href="#ckt">Circuit Description</a></li>
- <li class="inline"><a href="#file">Files</a></li>
- </ul>
- <hr>
- <h4 id="intro">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 obtained via the web from ftp.udel.edu as <a href="ftp://ftp.udel.edu/pub/ntp/hardware/gadget.tar.Z">gadget.tar.Z</a>.</p>
- <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="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder</a> 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/html/hints.html b/html/hints.html
index ba4f271413b8..7749ba9a1d9a 100644
--- a/html/hints.html
+++ b/html/hints.html
@@ -1,24 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=windows-1252">
- <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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<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:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:06<!-- #EndDate -->
+ UTC</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>
diff --git a/html/hints/sco.html b/html/hints/sco.html
index 7afde8300f75..d5d1933b35c6 100644
--- a/html/hints/sco.html
+++ b/html/hints/sco.html
@@ -11,6 +11,9 @@
<body>
<h3>SCO Unix hints</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<h4>Older SCO Unix versions</h4>
<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>
<h4>Compiling NTP</h4>
@@ -23,4 +26,4 @@
<p>Kees Hendrikse, January 1999</p>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/hints/solaris.html b/html/hints/solaris.html
index 7161d5dd3b39..4b83862e7db7 100644
--- a/html/hints/solaris.html
+++ b/html/hints/solaris.html
@@ -6,9 +6,12 @@
<BODY>
Information on compiling and executing ntpd under Solaris.
<BR>
-Last Updated: Sun Jun 21 01:32:18 EDT 1998,
+<p>Last update:
+ <!-- #BeginDate format:En2m -->27-Jan-2014 05:31<!-- #EndDate -->
+ UTC,
John Hawkinson,
<! -- This is deliberately not a mailto -- > &lt;jhawk@MIT.EDU&gt;
+</p>
<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.
@@ -38,7 +41,7 @@ set dosynctodr = 0
<P>
Instead of the <I>tick</I> kernel variable, which many operating
systems use to control microseconds added to the system time every
-clock tick (c.f. <A HREF="../notes.html#frequency_tolerance">Dealing
+clock tick (c.f. <A HREF="#frequency_tolerance">Dealing
with Frequency Tolerance Violations</A>), Solaris has the variables
<I>nsec_per_tick</I> and <I>usec_per_tick</I>.
<P>
@@ -63,6 +66,95 @@ 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>.
+<a id="frequency_tolerance" />
+<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 accuracy 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>tickaj</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 source s 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>
+
<H3>Solaris 2.6</H3>
<P>
Solaris 2.6 adds support for kernel PLL timekeeping, but breaks this
diff --git a/html/hints/vxworks.html b/html/hints/vxworks.html
index f73a01ca12ef..eac9312f19ab 100644
--- a/html/hints/vxworks.html
+++ b/html/hints/vxworks.html
@@ -12,6 +12,9 @@
<body link="#00008B" vlink="#8B0000">
<h4>VxWorks port of NTP</h4>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<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 <tt>main()</tt> is not allowed, and where the configure scripts need to be altered.</p>
<h4>Configuration issues</h4>
<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>
@@ -82,4 +85,4 @@
<p>Casey Crellin, casey@csc.co.za</p>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/hints/winnt.html b/html/hints/winnt.html
index a2d277fa962e..7c41b861baf2 100644
--- a/html/hints/winnt.html
+++ b/html/hints/winnt.html
@@ -9,10 +9,10 @@
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
- <h3>NTP 4.x for Windows NT</h3>
+ <h3>NTP 4.x for Windows</h3>
<h4>Introduction</h4>
- <p>The NTP 4 distribution runs as service on Windows Vista, 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. A ready-to-run install distribution is available from Meinberg at <a href="http://www.meinberg.de/english/sw/ntp.htm">http://www.meinberg.de/english/sw/ntp.htm.</a></p>
+ <p>The NTP 4 distribution runs as service on Windows 2000 and later. It will NOT run on Windows 95, 98, ME, etc. Lately it has been run the most on Windows-7 and later. 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. A ready-to-run install distribution is available from Meinberg at <a href="http://www.meinberg.de/english/sw/ntp.htm">http://www.meinberg.de/english/sw/ntp.htm.</a></p>
<p>Users should note that the stock Windows client sends requests as mode-1 packets, which can have unintended consequences and create a security risk. The client should send requests as mode-3 (client) packets, which conform to the protocol specification. The issues and resolution are described in Microsoft KB 875424. A less desirable alternative that avoids changing registry keys is to use the <tt>--with-wintime</tt> option when building the executable.</p>
<h4>Authentication Keys</h4>
<p>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>
@@ -36,17 +36,15 @@
<h4 id="ToDo">ToDo</h4>
<p>These tasks are in no particular order of priority.</p>
<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>
<h4>Compiling Requirements</h4>
<ul>
- <li>Windows NT 4.0 Windows 2000, Windows XP,Windows Vista or Windows.NET Server 2003
- <li>Microsoft Visual C++ 2008 EE or Visual C++ 2010 EE
+ <li>Windows 7 or Windows.NET Server 2003, or later.
+ <li>Windows NT 4.0 Windows 2000, Windows XP or Windows Vista <i>may</i> still work.
+ <li>Microsoft Visual C++ 2008, 2010, or 2013 EE
<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.
@@ -58,15 +56,15 @@
<ul><li> OPENSSL_INC=C:\OpenSSL\include
<li> OPENSSL_LIB=C:\OpenSSL\lib</ul>
<li>Unpack the NTP-4.x.tar.gz using utilities such as WinZip or WinRar.
- <li>Run Microsoft Visual C++ 2008 EE. On Windows Vista and later, Run as Administrator.
+ <li>Run Microsoft Visual C++ 2008 EE.
<li>Open the ports\winnt\vs2008\ntp.sln solution file
<li>Batch build all projects (Build menu, Batch Build..., select all, build).
- <li>The built binaries can be found in the ports\winnt\v2008\bin\ directory.
+ <li>The built binaries can be found in the <tt>ports\winnt\v2008\Win32-bin\Release</tt> directory.
<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>
<h4>Configuration File</h4>
<p>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;).</p>
- <p>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. The older <tt>&lt;WINDIR&gt;\ntp.conf</tt> is still supported but you will get a log entry reporting that the first file wasn't found.
+ <p>Refer to your system environment and create your<tt> ntp.conf</tt> file in the directory corresponding to your system&nbsp; installation. The older <tt>&lt;WINDIR&gt;\ntp.conf</tt> is still supported but you will get a log entry reporting that the first file wasn't found.
<h4>Installation Instructions</h4>
<p>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.</p>
<ol>
@@ -83,105 +81,10 @@
<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>
<h4>Bug Reports</h4>
- <p>Send questions and bug reports to <a href="../bugs.html">NTP Bug Reporting Procedures</a>.</p>
- <h4>Change Log</h4>
- <h3>Last revision 2 July 2003&nbsp; Version 4.2.0</h3>
- <p>by Danny Mayer (mayer@ntp.org>)</p>
- <h4>Significant Changes:</h4>
- <p>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. <tt>ntp-keygen</tt> is now supported and builds on Win32 platforms.
- <h4>Last revision 16 February 1999 Version 4.0.99e.</h4>
- <p>by Sven Dietrich (sven_dietrich@trimble.com)</p>
- <p>pSignificant Changes:</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>
- <h4>Last revision 15 November 1999&nbsp; Version 4.0.98f.</h4>
- <p>by Sven Dietrich (sven_dietrich@trimble.com)</b>
- <p>ignificant Changes:</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>
- <h4>Known Problems / TODO:</h4>
- <ul>
- <li>MD5 and name resolution do not yet get along. If you define MD5, you cannot use DNS names, only IP numbers.
- </ul>
- <h4>Last revision 27 July 1999&nbsp; Version 4.0.95.</h4>
- <p>This version compiled under WINNT with Visual C 6.0 by Greg Brackley and Sven Dietrich. Significant changes:</p>
- <ul>
- <li>Visual Studio v6.0 support
- <li>Winsock 2.0 support
- <li>Use of I/O completion ports for sockets and comm port I/O
- <li>Removed the use of multimedia timers (from ntpd, others need removing)
- <li>Use of waitable timers (with user mode APC) and performance counters to fake getting a better time
- <li>Trimble Palisade NTP Reference Clock support
- <li>General cleanup, prototyping of functions
- <li>Moved receiver buffer code to a separate module (removed unused members from the recvbuff struct)
- <li>Moved io signal code to a separate module
- </ul>
- <h4>Last revision:&nbsp; 20-Oct-1996</h4>
- <p>This version corrects problems with building the XNTPversion 3.5-86 distribution under Windows NT. The following files were modified:</p>
- <ul>
- <li><tt>blddbg.bat</tt>
- <li><tt>bldrel.bat</tt>
- <li><tt>include\ntp_machine.h</tt>
- <li><tt>xntpd\ntp_unixclock.c</tt>
- <li><tt>xntpd\ntp_refclock.c</tt>
- <li><tt>scripts\wininstall\build.bat</tt>
- <li><tt>scripts\wininstall\setup.rul</tt>
- <li><tt>scripts\wininstall\readme.nt</tt>
- <li><tt>scripts\wininstall\distrib\ntpog.wri</tt>
- <li><tt>html\hints\winnt</tt> (this file)
- </ul>
- <p>In order to build the entire Windows NT distribution you need to modify the file scripts\wininstall\build.bat with the installation directory of the InstallShield software.&nbsp; Then, simply type &quot;bldrel&quot; for non-debug or &quot;blddbg&quot; for debug executables.</p>
- <p>Greg Schueman,
- schueman@acm.org&gt;</p>
- <h4>Last revision: 07-May-1996</h4>
- <p>This set of changes fixes all known bugs, and it includes<br>
- several major enhancements. Many changes have been made both to the build environment as well as the code.&nbsp; There is no longer an ntp.mak file, instead there is a buildntall.bat file that will build the entire release in one shot. The batch file requires Perl.&nbsp; Perl is easily available from the NT Resource Kit or on the Net.</p>
- <p>The multiple interface support was adapted from Larry Kahn's work on the BIND NT port.&nbsp; I have not been able to test it, adequately as I only have NT servers with one network interfaces on which to test.</p>
- <p>Enhancements:</p>
- <ul>
- <li>Event Logging now works correctly.
- <li>Version numbers now work (requires Perl during build)
- <li>Support for multiple network interface cards (untested)
- <li>NTP.CONF now default, but supports ntp.ini if not found
- <li>Installation procedure automated.
- <li>All paths now allow environment variables such as %windir%
- </ul>
- <p>Bug fixes</p>
- <ul>
- <li>INSTSRV replaced, works correctly
- <li>Cleaned up many warnings
- <li>Corrected use of an uninitialized variable in XNTPD
- <li>Fixed ntpdate -b option
- <li>Fixed ntpdate to accept names as well as IP addresses
- (Winsock WSAStartup was called after a gethostbyname())
- <li>Fixed problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that caused a software exception on doing a Control-C in xntpdc. A Cntrl-C now terminates the program.
- </ul>
- <p>See below for more detail</p>
- <p>Note: SIGINT is not supported for any Win32 application including; Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32 operating systems generate a new thread to specifically handle that interrupt. This can cause a single-thread application such as UNIX, to become multithreaded, resulting in unexpected behavior.</p>
- <p>Possible enhancements and things left to do:</p>
- <ul>
- <li>Reference clock drivers for NT (at least Local Clock support)
- <li>Control Panel Applet
- <li>InstallShield based installation, like NT BIND has
- <li>Integration with NT Performance Monitor
- <li>SNMP integration
- <li>Fully test multiple interface support
- </ul>
- <h4>Known problems:</h4>
- <ul>
- <li>bug in ntptrace - if no Stratum 1 servers are available, such as on an IntraNet, the application crashes.
- </ul>
- <h4>Last revision: 12-Apr-1995</h4>
- <p>This NTPv3 distribution includes a sample configuration file and the project makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0 compiler. Also included is a small routine to install the NTP daemon as a &quot;service&quot; on a WindowsNT box. Besides xntpd, the utilities that have been ported are ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using a Bancomm TimeServe2000 GPS receiver clock that acts as a stratum 1 NTP server with no authentication (it has not been tested with any refclock drivers compiled in).
- <p>Following are the known flaws in this port</p>
- <ul>
- <li>Currently, I do not know of a way in NT to get information about multiple network interface cards. The current port uses just one socket bound to INADDR_ANY address. Therefore when dealing with a multihomed NT time server, clients should point to the default address on the server (otherwise the reply is not guaranteed to come from the same interface to which the request was sent). Working with Microsoft to get this resolved.
- <li>There is some problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that causes a software exception on doing a Control-C in xntpdc. Be patient!&gt; 3) The error messages logged by xntpd currently contain only the numerical error code. Corresponding error message string has to be looked up in &quot;Books Online&quot; on Visual C++ 2.0 under the topic &quot;Numerical List of Error Codes&quot;.</ul>
- <h4>Last HTML Update: November 17, 1999</h4>
- <p>by Sven_Dietrich@Trimble.COM</p>
- </body>
-
+ <p>Please follow the <a href="../bugs.html">NTP Bug Reporting Procedures</a> to report bugs or request enhancements.</p>
+ <p>Last update:
+ <!-- #BeginDate format:En2m -->6-Apr-2014 23:27<!-- #EndDate -->
+ </p>
+
+ </body>
</html>
diff --git a/html/history.html b/html/history.html
new file mode 100644
index 000000000000..8b1ad50418e8
--- /dev/null
+++ b/html/history.html
@@ -0,0 +1,74 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Historical Notes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Historical Notes</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:07<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Historical Notes on NTP Upgrades</h4>
+<p>This is an interim report on recent upgrades to the NTPv4 reference implementation code base and documentation. This report documents the upgrade program, which began in June 2007 and continued until March 2008. It is very important to recognize that this historic document describes the upgrade status as of 2008. Additional upgrades have been implemented since then. As of mid 2011, the additional upgrades are documented on the <a href="release.html">NTP Version 4 Release Notes</a> page.</p>
+<p>The motivation for this project was the overhaul and refinement of the code, some of which dates back twenty years. Some four dozen sets of fingers have introduced sometimes incompatible &quot;improvements&quot; that to some degree enhance or burden the product. There has been a continuing effort over the years to maintain the briar patch and pluck the more flagrant weeds, but it now requires a more systematic and thorough examination of purpose, design and implementation. The project is not complete, but far enough along to present a status report and review of significant changes.</p>
+<p>Please note THE CHANGES DO NOT AFFECT THE PROTOCOL SPECIFICATION AND DO NOT AFFECT INTEROPERABILITY WITH PREVIOUS VERSIONS.</p>
+<h4>1. Transparent Design</h4>
+<p>During the project a number of minor inconsistencies in various algorithms were found and resolved. In most cases this did not result in any changes in behavior, just a more simplified, transparent and easier to maintain design. In a few cases behavior has been modified to correct deficiencies and to avoid hostile attacks, as described below.</p>
+<h4>2. Documentation</h4>
+<p>The documentation required a major upgrade. Many pages have been overhauled, some completely rewritten and new ones added. A site map has been added and sorted by page category. A comprehensive command index has been added and sorted by page category. The command index includes a brief gloss for each command. A page has been added to show the various status word and event decodes used for monitoring and event reporting. The decodes show the internal code, ASCII report and short function gloss.</p>
+<p>New pages have been added on association management, automatic server discovery and rate management. Much of the overburden on the program manual and configuration pages has been moved to these pages with the intent of the original pages to contain primarily a functional description for the commands and command line options. This is still an ongoing process.</p>
+<h4>3. Bulletproofing</h4>
+<p>In a continuing mission the code flow has been carefully adjusted to decrease vulnerability to configuration errors and possibly hostile attack. The order of restriction processing was adjusted to deflect access denials as early as possible and without consuming useless processor cycles. This is especially important in rate defense, as the MRU list should only be used for clients that could be legitimately served. In addition, the Autokey protocol was adjusted to avoid some potentially nasty disruption attacks.</p>
+<h4>4. Rate Management</h4>
+<p>Strict rate controls have been refined in both outbound and inbound traffic for both minimum headway (guard time) and minimum average headway. This is a major improvement over the original limitreject design of 1992 and upgrade circa 2003. Headway violations result in an optional <em>kiss-o'-death</em> (KoD) packet. To avoid a clogging vulnerability, the KoD packets are themselves rate controlled for each source address separately.</p>
+<p>The main feature of the revised design is that it is responsive to the server minimum headway and avoids guessing. This is done by setting the ppoll field in the server packet to the maximum of (a) the ppoll field in the client packet and (b) the server headway. The client sets the ppoll field in the association to the maximum of (a) the ppoll field in the server packet and (b) the minpoll field in the association. If this is a KoD and this value is greater than minpoll, minpoll is set to this value. The result is that the client continues sending, but only at headway at least as large as the server.</p>
+<p>The revised design makes possible a decrease in the minimum time constant/poll interval to 3 (8 s), which reduces the risetime to 250 s. This may be useful for rapid convergence when a client is first started, but should not be used for links with moderate to large jitter. This is done using the average option of the discard command, which sets the minimum poll interval and headway from the default 4 (16 s) to a value in the range 3 (8 s) to 6 (64 s). Larger values than 4 might be appropriate for very busy public servers.</p>
+<p>Rate management applies also to Autokey messages. This fixes a problem when iburst and autokey are both in play and when for some reason an association with iburst is repeatedly restarted. This may appear spooky to some folks that frequently restart a client for testing. The server remembers. Further information is in the current web documentation.</p>
+<h4>5. Frequency File</h4>
+<p>Initial frequency training has always been a problem, as it can take a very long time to trim the frequency estimate to nominal values. Once this happens and the frequency file is written, subsequent reboots will restore the frequency and frequency training is avoided. The problem is exacerbated using toll modem services such as ACTS which make a call at each poll interval. Until the training is complete the poll interval is held below the desired maximum as toll charges accrue.</p>
+<p>The problem was solved by changing the clock state machine so that, if no frequency file is available, an initial training interval of 300 s occurs, after which the frequency is directly calculated and the discipline then turned over to the feedback loop. The choice of 300 s is based on the assumption that time can be estimated within 1 ms and the resulting frequency estimate within nominal 1 PPM.</p>
+<p>Note that once the initial time offset is either stepped or slewed, no further time offsets are amortized during the training period. If the frequency error is large, the time offset at the end of the period can be moderately large, which then must be amortized by the feedback loop. While this may take up to an hour and result in a minor frequency tweak, the behavior is very much better than without the initial training. The remedy would require intricate and fragile code revisions.</p>
+<p>In the original design the frequency file was written at one-hour intervals. This apparently makes embedded systems folks nervous, since this can tire the flash NVRAM after several years. The interval between writes now depends on the ambient clock stability and normally maxes out at something over one day unless the frequency takes an unusual twitch. </p>
+<h4>6. Leapseconds</h4>
+<p>The leapsecond processing has been overhauled once again. The problem is to avoid fake leap warnings displayed by an errant server and to insure correct response in case of large time changes which might validate or invalidate arming for a subsequent leap. No leap information is used unless the client is synchronized to a proventic source. The values obtained from an Autokey server or peer are updated if newer than the current values. Server leap warning bits are disregarded if these values are available. If not, and if either a majority of the servers show leap warning bits or if one or more of the survivors are a reference clock with leap warning bit, the leap is armed. If armed by server leap warning bits and these provisions no longer prevail, the leap is disarmed. The NTPv4 protocol specifically does not speak to this issue.</p>
+<p>The leap armed condition is displayed in the host status word. Transitions between warnings and no warnings are reported to the protostats file, system log and traps.</p>
+<h4>7. Orphan Mode and Local Clock Driver</h4>
+<p>The orphan mode code has been overhauled to correct some minor bugs and to clarify operation under normal and recovery conditions. The requirement that all subnet hosts have orphan configuration has been removed. The only requirement is that the orphan clients on the DMZ network sharing the root server(s) be so configured The scheme now works if the root servers are configured with each other, either in symmetric or broadcast modes. Orphan mode is not considered in the NTPv4 protocol specification.</p>
+<p>The local clock driver can be very dangerous when used as a fallback when connectivity to Internet time servers is interrupted. Orphan mode was designed to reduce the need for the local clock driver, as it is active only if no server is available. The local clock driver has been modified to have the same characteristics, regardless of stratum. Only if the host running the local clock driver loses all servers, regardless of stratum, is the driver activated. Thus, it is possible, but not recommended, to run the driver at any stratum, including zero.</p>
+<h4>8. Poll Rate Control</h4>
+<p>One of the most persistent problems is when after long operation and then a failure and then subsequently recovery, a client can take a long time to refresh the clock filter and resynchronize. Once the client has backed off the poll interval after a lengthy outage, it sends polls at that interval until receiving a response. At that time it temporarily retries at the minimum poll interval to fill up the clock filter. If iburst is configured, this will happen after 10 seconds or so and the client then resumes its poll interval required by the discipline time constant. This avoids needless network traffic while the poll interval increases gradually to the maximum. Further information is in the current web documentation.</p>
+<p>The same thing happens on initial startup or when an association is restarted. The intent is to avoid a blast of <tt>iburst</tt> packets unless the server actually responds to the first one and to retry only while responding to the the rate controls.</p>
+<p>In order to speed response to initial startup when a reference clock is available, the clock is set on the first message received from the driver. This exposed an interesting bug, now fixed, with the ACTS modem driver, which began prematurely to ramp up the poll interval.</p>
+<h4>9. Autokey</h4>
+<p>The management of host and group names with respect to Autokey configuration and key generation has been removed and simplified. On host certificates, the subject and issuer fields carry the group name, while other certificates carry the host name, which can be an arbitrary string having nothing to do with the DNS name. This opens up a possible future plan to use the Autokey name rather than the IP address when constructing the session key. It also allows a client to easily switch from one group to another without regenerating the certificate. Further information is in the current web documentation and in the latest Autokey ID.</p>
+<p>Various protocol refinements have been done in the Autokey state machine. A bug was found in symmetric modes where the peer cookies were not EXORed. A bug was found in processing the certificate cache when a participant was a client of two or more server in the same group which themselves had certificate trails to different trusted hosts.</p>
+<p>The protocol machine is now restarted every several days in order to update certificates and leapseconds values when they are changed.</p>
+<h4> 10. Report, Log and Event Codes </h4>
+<p>The status, selection, source, event and log decodes have been adjusted for consistency. Some of the decodes were missing, some with errors and a few new ones added. Old versions of ntpq continue to work without change, but display a new code as space. Except for the new codes, this behavior is consistent with RFC 1305 and proposed for the NTPv4 protocol specification.</p>
+<p>The ntpq as command has been changed to fix some very old bugs. The display is now consistent with the system and peer billboards. The authentication state is correctly displayed for broadcast server associations.</p>
+<p>The event reporting has been cleaned up for more straightforward interpretation by a remote agent. All significant state transitions are reported, including clock state machine changes, mobilization, /demobilization, system and peer restart, system peer change, panic stop and so forth.</p>
+<p>A new protostats monitoring file facility has been added. It works just like the other monitor files. All events are recorded to this file as reported and optionally to the system log. Many reports that sometimes clog up the system log are more usefully directed to this file. The reports also trigger a trap packet that can be sent via an agent to page an administrator.</p>
+<p>When the current mode-6 monitoring protocol was designed circa 1988 the considered intent was that monitoring functions rely only on the NTP packet itself and the system, peer and clock status words provided in the mode-6 packet. While the strongly felt advice at that time was to avoid reformatting the plain ASCII text sent by the server, at various times folks have cheated and reformatted the text. In some places this is good, like displaying the filter shift register; in some places this is bad, like reformatting the timestamps. There is nothing much that can be done about this now without angry mobs rioting when forced to upgrade to a new ntpq. I will not rule this out in future.</p>
+<p>A more serious comment has to do with using other than the NTP packet, status words and events for monitoring purposes. Emphasis added: monitors should not parse such things as the flash codes, clock state or anything else not called out in the NTPv4 specification. The clock state machine is defined in the specification, but no specific numbers are assigned to the states.</p>
+<p>When the numbers were changed to align for reporting purposes, some scripts no longer worked. The scripts should be changed to use only the leap and select fields of the system status word. If the leap field is other than 0, the client has synchronized at least once; if the select field is other than 0, the client is currently synchronized to the source indicated in the decode.</p>
+<h4>11. Two-step and timestamp capture</h4>
+<p>A number of interesting ideas were found in the IEEE 1588 Precision Time Protocol specification. One of them was the two-step protocol in which the transmit timestamp is sent in a following message. However, the PTP design operates only in a master-slave configuration and is not directly usable in NTP. The protocol was adapted to the NTP symmetric design, which requires four state variables rather than two. It is described on <a href="http://www.eecis.udel.edu/~mills/stamp.html">Timestamp Capture Principles</a>. This might be an interesting project for future research.</p>
+<p>A detailed study of the timestamp capture opportunities for both hardware and software timestamping revealed that the most accurate and interoperable design involves the transmit timestamp at the beginning of the packet and then receive timestamp at the end. This makes it possible to accurately measure the offset and delay even if the ends of the synchronization path operate at different rates. It is described on the Timestamp Capture Principles page.</p>
+<h4>12. Windows client bug</h4>
+<p>The Windows XP and Vista clients send the NTP request in symmetric active mode rather than client mode. An unsuspecting server could mobilize a symmetric passive association, which is a serious security vulnerability. The NTPv4 servers, including those at NIST and USNO, discard symmetric active requests unless cryptographically authenticated, so Windows clients do not work. The Microsoft KB 875424 discusses the preferred workaround; however, an optional workaround is now available so that, if the request is not authenticated, the server responds with symmetric passive mode, but without mobilize an association. The workaround is enabled with the WINTIME build option.</p>
+<p>The spec assumes that either peer in symmetric modes can synchronize the other should a peer lose all sources. The workaround violates that assumption and some legitimate configuration might be badly misused. It should be used only with this understanding.</p>
+<h4>13. Autonomous configuration</h4>
+<p>The autonomous configuration (pool and manycast) code was refined to more reliably prune excess servers. If a truechimer is discarded by the clustering algorithm and the total number of survivors is greater than the maxclock option of the tos command, it is considered excess and shows a &quot;#&quot; tally code. If the association is ephemeral and survives the clustering algorithm, the watchdog counter is reset. If the watchdog timer expires and the total number of associations is greater than the maxclock option of the tos command, it is demobilized. This behavior is not considered in the NTPv4 protocol specification.</p>
+<h4>14. Code ornamentation</h4>
+<p>When auditing the code and figuring out its historic origin and evolution, additional commentary has been added so future generations can figure it out, too. </p>
+<p>David L. Mills<br>
+ 17 March 2008<br>
+</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/howto.html b/html/howto.html
index 49c3d92affe3..e89fa788ec70 100644
--- a/html/howto.html
+++ b/html/howto.html
@@ -1,117 +1,109 @@
<!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="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/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
- <p>You need a little magic.</p>
- <p>Last update:
- <!-- #BeginDate format:En2m -->11-Jul-2009 20:44<!-- #EndDate -->
- </p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>You need a little magic.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:08<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#desc">Description</a></li>
- <li class="inline"><a href="#file">Files Which Need to be Changed</a></li>
- <li class="inline"><a href="#intf">Interface Routine Overview</a></li>
- <li class="inline"><a href="#pps">Pulse-per-Second Interface</a></li>
- </ul>
- <hr>
- <h4 id="desc">Description</h4>
- <p>NTP reference clock support maintains the fiction that the clock is actually an ordinary server in the NTP tradition, but operating at a synthetic stratum of zero. The entire suite of algorithms filter the received data and select the best sources to correct the system clock. No packets are exchanged with a reference clock; however, the transmit, receive and packet procedures are replaced with code to simulate them.</p>
- <p>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 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 or the estimated time error.</p>
- <p>All three timescales run only in Coordinated Universal Time (UTC) 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 interface routines in the <tt>ntp_refclock.c</tt> source file call the following driver routines via a transfer vector:</p>
- <dl>
- <dt><tt>startup</tt></dt>
- <dd>The association has just been mobilized. The driver may allocate a private structure and open the device(s) required.</dd>
-
- <dt><tt>shutdown</tt></dt>
- <dd>The association is about to be demobilized. The driver should close all device(s) and free private structures.</dd>
- <dt><tt>receive</tt></dt>
- <dd>A timecode string is ready for retrieval using the <tt>refclock_gtlin()</tt> or <tt>refclock_gtraw()</tt> routines and provide clock updates.</dd>
- <dt><tt>poll</tt></dt>
- <dd>Called at poll timeout, by default 64 s. Ordinarily, the driver will send a poll sequence to the radio as required.</dd>
- <dt><tt>timer</tt></dt>
- <dd>Called once per second. This can be used for housekeeping functions. In the case with pulse-per-second (PPS) signals, this can be used to process the signals and provide clock updates.</dd>
- </dl>
- <p>The receive routine retrieves a timecode string via serial or parallel port, PPS signal or other means. It decodes the timecode in days, hours, minutes, seconds and nanoseconds and checks for errors. It provides these data along with the on-time timestamp to the <tt>refclock_process</tt> routine, which saves the computed offset in a 60-sample circular buffer. On occasion, either by timeout, sample count or call to the poll routine, the driver calls <tt>refclock_receive</tt> to process the circular buffer samples and update the system clock.</p>
- <p>The best way to understand how the clock drivers work is to study one of the drivers already implemented, such as <tt>refclock_wwvb.c</tt>. The main interface is the <tt>refclockproc</tt> structure, which contains for most drivers the decoded timecode, on-time timestamp, reference timestamp, exception reports and statistics tallies, etc. The support routines are passed a pointer to the <tt>peer</tt> structure, which 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>Radio and modem reference clocks by convention have addresses of 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>u</i></tt> to the particular hardware device.</p>
- <p>By convention, reference clock drivers are named in the form <tt>refclock_<i>xxxx</i>.c</tt>, where <tt><i>xxxx</i></tt> 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.</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.</p>
- <p>If the calibration feature has been enabled, the <tt>flag1</tt> switch is set and the PPS signal is actively disciplining the system time, the <tt>time1</tt> value is automatically adjusted to maintain a residual offset of zero. Once the its value has stabilized, the value can be inserted in the configuration file and the calibration feature disabled.</p>
- <h4 id="file">Files Which Need to be Changed</h4>
- <p>When a new reference clock driver is installed, the following files need to be edited. Note that changes are also necessary to properly integrate the driver in the configuration and makefile scripts, but these are decidedly beyond the scope of this page.</p>
- <dl>
- <dt><tt>./include/ntp.h</tt></dt>
- <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.</dd>
- <dt><tt>./libntp/clocktypes.c</tt></dt>
- <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.</dd>
- <dt><tt>./ntpd/ntp_control.c</tt></dt>
- <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.</dd>
- <dt><tt>./ntpd/refclock_conf.c</tt></dt>
- <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.</dd>
- </dl>
- <h4 id="intf">Interface Routine Overview</h4>
- <dl>
- <dt><tt>refclock_newpeer</tt> - initialize and start a reference clock.</dt>
- <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.</dd>
- <dt><tt>refclock_unpeer</tt> - shut down a clock</dt>
- <dd>This routine is used to shut down a clock and return its resources to the system.</dd>
- <dt><tt>refclock_transmit</tt> - simulate the transmit procedure</dt>
- <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.</dd>
- <dt><tt>refclock_process</tt> - insert a sample in the circular buffer</dt>
- <dd>This routine saves the offset computed from the on-time timestamp and the days, hours, minutes, seconds and nanoseconds in the circular buffer. 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.</dd>
- <dt><tt>refclock_receive</tt> - simulate the receive and packet procedures</dt>
- <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.</dd>
- <dt><tt>refclock_gtraw</tt>, <tt>refclock_gtlin</tt> - read the buffer and on-time timestamp</dt>
- <dd>These routines return the data received from the clock and the on-time timestamp. The <tt>refclock_gtraw</tt> routine returns a batch of one or more characters returned by the Unix terminal routines in raw mode. The <tt>refclock_gtlin</tt> routine removes the parity bit and control characters and returns all the characters up to and including the line terminator. Either routine returns the number of characters delivered.</dd>
- <dt><tt>refclock_open</tt> - open a serial port for reference clock</dt>
- <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.</dd>
- <dt><tt>refclock_ioctl</tt> - set serial port control functions</dt>
- <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 returns one if success and zero if failure.</dd>
- <dt><tt>refclock_ppsapi</tt></dt>
- <dd>This routine initializes the Pulse-per-Second interface (see below).</dd>
- <dt><tt>refclock_pps</tt></dt>
- <dd>This routine is called once per second to read the latest PPS offset and save it in the circular buffer (see below).</dd>
- </dl>
- <h4 id="pps">Pulse-per-Second Interface</h4>
- <p>When the Pulse-per-Second Application Interface (RFC 2783) is present, a
- compact PPS interface is available to all drivers. See the <a href="prefer.html">Mitigation
- Rules and the Prefer Peer</a> page for further information. To use this interface,
- include the <tt>timeppps.h</tt> and <tt>refclock_atom.h</tt> header files
- and define the <tt>refclock_atom</tt> structure in the driver private storage.
- The <tt>timepps.h</tt> file is specific to each operating system and may not
- be available for some systems.</p>
- <p>To use the interface, call <tt>refclock_ppsapi</tt> from the startup routine
- passing the device file descriptor and <tt>refclock_atom</tt> structure pointer.
- Then, call <tt>refclock_pps</tt> from the timer routine passing the association
- pointer and <tt>refclock_atom</tt> structure pointer. See the <tt>refclock_atom.c</tt> file
- for examples and calling sequences. If the PPS signal is valid, the offset
- sample will be save in the circular buffer and a bit set in the association
- flags word indicating the sample is valid and the driver an be selected as
- a PPS peer. If this bit is set when the poll routine is called, the driver
- calls the <tt>refclock_receive</tt> routine to process the samples in the
- circular buffer and update the system clock.</p>
-
- <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
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#desc">Description</a></li>
+ <li class="inline"><a href="#file">Files Which Need to be Changed</a></li>
+ <li class="inline"><a href="#intf">Interface Routine Overview</a></li>
+ <li class="inline"><a href="#pps">Pulse-per-Second Interface</a></li>
+</ul>
+<hr>
+<h4 id="desc">Description</h4>
+<p>NTP reference clock support maintains the fiction that the clock is actually an ordinary server in the NTP tradition, but operating at a synthetic stratum of zero. The entire suite of algorithms filter the received data and select the best sources to correct the system clock. No packets are exchanged with a reference clock; however, the transmit, receive and packet procedures are replaced with code to simulate them.</p>
+<p>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 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 or the estimated time error.</p>
+<p>All three timescales run only in Coordinated Universal Time (UTC) 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 interface routines in the <tt>ntp_refclock.c</tt> source file call the following driver routines via a transfer vector:</p>
+<dl>
+ <dt><tt>startup</tt></dt>
+ <dd>The association has just been mobilized. The driver may allocate a private structure and open the device(s) required.</dd>
+ <dt><tt>shutdown</tt></dt>
+ <dd>The association is about to be demobilized. The driver should close all device(s) and free private structures.</dd>
+ <dt><tt>receive</tt></dt>
+ <dd>A timecode string is ready for retrieval using the <tt>refclock_gtlin()</tt> or <tt>refclock_gtraw()</tt> routines and provide clock updates.</dd>
+ <dt><tt>poll</tt></dt>
+ <dd>Called at poll timeout, by default 64 s. Ordinarily, the driver will send a poll sequence to the radio as required.</dd>
+ <dt><tt>timer</tt></dt>
+ <dd>Called once per second. This can be used for housekeeping functions. In the case with pulse-per-second (PPS) signals, this can be used to process the signals and provide clock updates.</dd>
+</dl>
+<p>The receive routine retrieves a timecode string via serial or parallel port, PPS signal or other means. It decodes the timecode in days, hours, minutes, seconds and nanoseconds and checks for errors. It provides these data along with the on-time timestamp to the <tt>refclock_process</tt> routine, which saves the computed offset in a 60-sample circular buffer. On occasion, either by timeout, sample count or call to the poll routine, the driver calls <tt>refclock_receive</tt> to process the circular buffer samples and update the system clock.</p>
+<p>The best way to understand how the clock drivers work is to study one of the drivers already implemented, such as <tt>refclock_wwvb.c</tt>. The main interface is the <tt>refclockproc</tt> structure, which contains for most drivers the decoded timecode, on-time timestamp, reference timestamp, exception reports and statistics tallies, etc. The support routines are passed a pointer to the <tt>peer</tt> structure, which 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>Radio and modem reference clocks by convention have addresses of 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>u</i></tt> to the particular hardware device.</p>
+<p>By convention, reference clock drivers are named in the form <tt>refclock_<i>xxxx</i>.c</tt>, where <tt><i>xxxx</i></tt> 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.</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.</p>
+<p>If the calibration feature has been enabled, the <tt>flag1</tt> switch is set and the PPS signal is actively disciplining the system time, the <tt>time1</tt> value is automatically adjusted to maintain a residual offset of zero. Once the its value has stabilized, the value can be inserted in the configuration file and the calibration feature disabled.</p>
+<h4 id="file">Files Which Need to be Changed</h4>
+<p>When a new reference clock driver is installed, the following files need to be edited. Note that changes are also necessary to properly integrate the driver in the configuration and makefile scripts, but these are decidedly beyond the scope of this page.</p>
+<dl>
+ <dt><tt>./include/ntp.h</tt></dt>
+ <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.</dd>
+ <dt><tt>./libntp/clocktypes.c</tt></dt>
+ <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.</dd>
+ <dt><tt>./ntpd/ntp_control.c</tt></dt>
+ <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.</dd>
+ <dt><tt>./ntpd/refclock_conf.c</tt></dt>
+ <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.</dd>
+</dl>
+<h4 id="intf">Interface Routine Overview</h4>
+<dl>
+ <dt><tt>refclock_newpeer</tt> - initialize and start a reference clock.</dt>
+ <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.</dd>
+ <dt><tt>refclock_unpeer</tt> - shut down a clock</dt>
+ <dd>This routine is used to shut down a clock and return its resources to the system.</dd>
+ <dt><tt>refclock_transmit</tt> - simulate the transmit procedure</dt>
+ <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.</dd>
+ <dt><tt>refclock_process</tt> - insert a sample in the circular buffer</dt>
+ <dd>This routine saves the offset computed from the on-time timestamp and the days, hours, minutes, seconds and nanoseconds in the circular buffer. 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.</dd>
+ <dt><tt>refclock_receive</tt> - simulate the receive and packet procedures</dt>
+ <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.</dd>
+ <dt><tt>refclock_gtraw</tt>, <tt>refclock_gtlin</tt> - read the buffer and on-time timestamp</dt>
+ <dd>These routines return the data received from the clock and the on-time timestamp. The <tt>refclock_gtraw</tt> routine returns a batch of one or more characters returned by the Unix terminal routines in raw mode. The <tt>refclock_gtlin</tt> routine removes the parity bit and control characters and returns all the characters up to and including the line terminator. Either routine returns the number of characters delivered.</dd>
+ <dt><tt>refclock_open</tt> - open a serial port for reference clock</dt>
+ <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.</dd>
+ <dt><tt>refclock_ioctl</tt> - set serial port control functions</dt>
+ <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 returns one if success and zero if failure.</dd>
+ <dt><tt>refclock_ppsapi</tt></dt>
+ <dd>This routine initializes the Pulse-per-Second interface (see below).</dd>
+ <dt><tt>refclock_pps</tt></dt>
+ <dd>This routine is called once per second to read the latest PPS offset and save it in the circular buffer (see below).</dd>
+</dl>
+<h4 id="pps">Pulse-per-Second Interface</h4>
+<p>When the Pulse-per-Second Application Interface (RFC 2783) is present, a
+ compact PPS interface is available to all drivers. See the <a href="prefer.html">Mitigation
+ Rules and the Prefer Peer</a> page for further information. To use this interface,
+ include the <tt>timeppps.h</tt> and <tt>refclock_atom.h</tt> header files
+ and define the <tt>refclock_atom</tt> structure in the driver private storage.
+ The <tt>timepps.h</tt> file is specific to each operating system and may not
+ be available for some systems.</p>
+<p>To use the interface, call <tt>refclock_ppsapi</tt> from the startup routine
+ passing the device file descriptor and <tt>refclock_atom</tt> structure pointer.
+ Then, call <tt>refclock_pps</tt> from the timer routine passing the association
+ pointer and <tt>refclock_atom</tt> structure pointer. See the <tt>refclock_atom.c</tt> file
+ for examples and calling sequences. If the PPS signal is valid, the offset
+ sample will be save in the circular buffer and a bit set in the association
+ flags word indicating the sample is valid and the driver an be selected as
+ a PPS peer. If this bit is set when the poll routine is called, the driver
+ calls the <tt>refclock_receive</tt> routine to process the samples in the
+ circular buffer and update the system clock.</p>
+<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>
diff --git a/html/huffpuff.html b/html/huffpuff.html
new file mode 100644
index 000000000000..2be4d4a9b397
--- /dev/null
+++ b/html/huffpuff.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>The Huff-n'-Puff Filter</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>The Huff-n'-Puff Filter</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:09<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>In scenarios where a considerable amount of data are downloaded or uploaded using DSL or telephone modem lines, timekeeping quality can be seriously degraded. This occurs because the traffic volume, and thus the queuing delays, on the upload and download directions of transmission can be very different. 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.</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, such as during other than work hours. The filter remembers the minimum delay over the most recent interval measured usually in hours. Under conditions of large 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. The filter is activated by the <tt>tinker huffpuff</tt> command, as described in the <a href="miscopt.html">Miscellaneous Options</a> page.</p>
+<hr>
+<div align="center"><img src="pic/flt4.gif" alt="gif">
+<p>Figure 1. Huff-n'-Puff Wedge Scattergram</p>
+</div>
+<p>Figure 1 shows how the huff-n'-puff filter works. Recall from the <a href="filter.html">Clock Filter Algorithm</a> page that the wedge scattergram plots sample points (<em>x</em>, <em>y</em>) corresponding to the measured delay and offset, and that the limb lines are at slope &plusmn;0.5. Note in the figure that the samples are clustered close to the upper limb line, representing heavy traffic in the download direction. The apparent offset <i>y</i><sub>0</sub> is near zero at the minimum delay <i>x</i><sub>0</sub>, which is near 0.1s. Thus, for a point (<em>x</em>, <em>y</em>), the true offset is</p>
+<blockquote>
+ <p> &theta; = <em>y</em> <font face="symbol">-</font> (<em>x </em><font face="symbol">- </font><i>x</i><sub>0</sub>) / 2 for <em>y</em> &gt; <i>y</i><sub>0</sub> at or near the upper limb line or<br>
+ &theta; = <em>y</em> <font face="symbol">+</font> (<em>x </em><font face="symbol">- </font><i>x</i><sub>0</sub>) / 2 for <em>y</em> &lt; <i>y</i><sub>0</sub> at or near the lower limb line.</p>
+</blockquote>
+<p>In either case the associated delay is &delta; = <em>x</em>.</p>
+<p>In the interior of the wedge scattergram far from the limb lines, the corrections are less effective and can lead to significant errors if the area between the limb lines is heavily populated.</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/icons/sitemap.png b/html/icons/sitemap.png
new file mode 100644
index 000000000000..17c7c55177e4
--- /dev/null
+++ b/html/icons/sitemap.png
Binary files differ
diff --git a/html/index.html b/html/index.html
index 9ba5c6fcac20..d40983796b56 100644
--- a/html/index.html
+++ b/html/index.html
@@ -1,92 +1,73 @@
<!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="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:
- <!-- #BeginDate format:En2m -->07-Nov-2009 20:43<!-- #EndDate -->
- UTC</p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 05:41<!-- #EndDate -->
+</p>
<br clear="left">
- <h4>Related Links</h4>
- <ul>
- <li>A list of all links is on the <a href="sitemap.html">Site Map</a> page.</li>
- </ul>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#intro">Introduction</a></li>
- <li class="inline"><a href="#build">Building and Installing NTP</a></li>
- <li class="inline"><a href="#conf">Configuring Clients and Servers</a></li>
- <li class="inline"><a href="#opt">Features and Options</a></li>
- <li class="inline"><a href="#prob">Resolving Problems</a></li>
- <li class="inline"><a href="#info">Further Information</a></li>
- </ul>
- <hr>
- <h4 id="intro">Introduction</h4>
- <p>Note: The NTP Version 4 software contained in this distribution is available without charge under the conditions set forth in the <a href="copyright.html">Copyright Notice</a>.</p>
- <dl>
- <dd>It is very important that readers understand that the NTP document collection began 25 years ago and remains today a work in progress. It has evolved as new features were invented and old features retired. It has been widely copied, cached and morphed to other formats, including man pages, with varying loss of fidelity. However, these HTML pages are the ONLY authoritative and definitive reference. Readers should always use the collection that comes with the distribution they use. A copy of the online collection at <a href="http://www.ntp.org">www.ntp.org</a> is normally included in the most recent snapshot, but might not agree with an earlier snapshot or release version.</dd>
- </dl>
- <p>The Network Time Protocol (NTP) is widely used to synchronize a computer
- to Internet time servers or other sources, such as a radio or satellite
- receiver or telephone modem service. It can also be used as a server
- for dependent clients. It provides accuracies typically less than
- a millisecond on LANs and up to a few milliseconds on WANs. Typical
- NTP configurations utilize multiple redundant servers and diverse
- network paths in order to achieve high accuracy and reliability.
- Authentication is provided using symmetric key cryptography and
- the MD5 message digest algorithm included in the distribution. If
- the OpenSSL cryptographic library is installed, the SHA or SHA1 message
- digest algorithms can be used. If the OpenSSL library is installed,
- additional options based on public key cryptography are available.</p>
- <p>NTP time synchronization services are widely available in the public Internet.
- The public NTP subnet in early 2008 includes several thousand servers
- in most countries and on every continent of the globe, including Antarctica.
- These servers support a total population estimated at over 25 million computers
- in the global Internet. The NTP subnet operates with a hierarchy of levels,
- where each level is assigned a number called the stratum. Stratum 1 (primary)
- servers at the lowest level are directly synchronized to national time services.
- Stratum 2 (secondary) servers at the next higher level are synchronize to stratum
- 1 servers and so on. Normally, NTP clients and servers with a relatively small
- number of clients do not synchronize to public primary servers. There
- are several hundred public secondary servers operating at higher strata and
- are the preferred choice. </p>
- <p>Background information on computer network time synchronization is on the <a href="http://www.eecis.udel.edu/%7emills/exec.html">Executive Summary - Computer Network Time Synchronization</a> page. Discussion on new features and interoperability with previous NTP versions is on the <a href="release.html">NTP Version 4 Release Notes</a> page. Background information, bibliography and briefing slides suitable for presentations are on the <a href="http://www.eecis.udel.edu/%7emills/ntp.html">Network Time Synchronization Research Project</a> page. Additional information is at the NTP web site <a href="http://www.ntp.org">www.ntp.org</a>.</p>
- <h4 id="build">Building and Installing NTP</h4>
- <p>NTP supports Unix, VMS and Windows (Vista, XP, NT4 and 2000) systems. The <a href="build.html">Building and Installing the Distribution</a> page details the procedures for building and installing on a typical system. This distribution includes drivers for 44 radio and satellite receivers and telephone modem services in the US, Canada and Europe. A list of supported drivers is on the <a href="refclock.html">Reference Clock Drivers</a> page. The default build includes the debugging options and all drivers that run on the target machine; however, options and drivers can be included or excluded using options on the <a href="config.html">Configuration 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 for widely divergent timekeeping scenarios. The documentation on these pages attempts to cover the entire suite of configuration, operation and maintenance features which this distribution supports. However, most applications will need only a few of these features. The <a href="quick.html">Quick Start</a> page may be useful to get a simple workstation on the air with existing servers.</p>
- <p>The most important factor in providing accurate, reliable time is the selection of modes and servers in the configuration file. A discussion on the available modes is on the <a href="assoc.html">Association Management</a> page. The current public server list is maintained at the <a href="http://www.ntp.org">www.ntp.org</a> web site. In many cases the configuration can be automated using the schemes described on the <a href="manyopt.html">Automatic Server Discovery Schemes</a> page.</p>
- <h4 id="opt">Features and Options</h4>
- <p>This distribution includes a statistics data recording facility which can record performance statistics and events of various types for retrospective analysis. These include time and frequency statistics, significant events and usage statistics described on the <a href="monopt.html">Monitoring Options</a> page.</p>
- <p>Some programs included in this distribution use cryptographic algorithms to verify server authenticity. Where local security policy permits relatively weak symmetric key cryptography, the required software is included in this distribution. Where local policy requires stronger public key cryptography, the OpenSSL library available from <a href="http://www.openssl.org">http://www.openssl.org</a> is required. This library is also used by the Secure Shell facility, so is often already installed. Additional details are on the <a href="authopt.html">Authentication Options</a> page.</p>
- <p>This distribution includes features that can restrict access in various ways as described on the <a href="accopt.html">Access Control Options</a> page. This can be used to deny service if not authenticated, deny service requiring persistent resources or deny service altogether.</p>
- <p>This distribution includes a simulation framework in which substantially
- all the runtime NTP operations and most features can be tested and
- evaluated. This has been very useful in exploring in vitro response
- to unusual circumstances or over time periods impractical in vivo. Details
- are on the <a href="ntpdsim.html">Network
- Time Protocol (NTP) Simulator</a> page.</p>
- <h4 id="prob">Resolving Problems</h4>
- <p>Like other things in modern Internet life, NTP problems can be devilishly intricate. This distribution includes a number of utilities designed to identify and repair problems using an integrated management protocol supported by the <a href="ntpq.html"><tt>ntpq</tt></a> utility program In addition, the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program can be useful in some cases.</p>
- <p>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. Additional information on reference clock driver construction and debugging is in the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> page.</p>
- <p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTP Bug Reporting Procedures</a> page.</p>
- <h4 id="info">Further Information</h4>
- <p>The <a href="sitemap.html">Site Map</a> page contains a list of document collections arranged by topic. The Program Manual Pages collection may be the best place to start, followed by the <a href="comdex.html"></a>Configuration Commands and Options collection. The <a href="comdex.html">Command Index</a> collection contains a list of all configuration file commands together with a short function description. A great wealth of additional information is available via the External Links collection, including a book and numerous background papers and briefing presentations.</p>
- <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
+<h4>Related Links</h4>
+<ul>
+ <li>A list of all links is on the <a href="sitemap.html">Site Map</a> page.</li>
+</ul>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#hand">The Handbook</a></li>
+ <li class="inline"><a href="#build">Building and Installing NTP</a></li>
+ <li class="inline"><a href="#prob">Resolving Problems</a></li>
+ <li class="inline"><a href="#info">Further Information</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>Note: The NTP Version 4 software contained in this distribution is available without charge under the conditions set forth in the <a href="copyright.html">Copyright Notice</a>.</p>
+<dl>
+ <dd>It is very important that readers understand that the NTP document collection began 25 years ago and remains today a work in progress. It has evolved as new features were invented and old features retired. It has been widely copied, cached and morphed to other formats, including man pages, with varying loss of fidelity. However, these HTML pages are the ONLY authoritative and definitive reference. Readers should always use the collection that comes with the distribution they use. A copy of the online collection at <a href="http://www.ntp.org">www.ntp.org</a> is normally included in the most recent snapshot, but might not agree with an earlier snapshot or release version.</dd>
+</dl>
+<p>This distribution is an implementation of RFC-5905 &quot;Network Time Protocol Version 4: Protocol and Algorithms Specification&quot;.<br>
+ NTP is widely used to synchronize a computer to Internet time servers or other sources, such as a radio or satellite receiver or telephone modem service. It can also be used as a server for dependent clients. It provides accuracies typically less than a millisecond on LANs and up to a few milliseconds on WANs. Typical NTP configurations utilize multiple redundant servers and diverse network paths in order to achieve high accuracy and reliability.</p>
+<p>This distribution includes a simulation framework in which substantially all the runtime NTP operations and most features can be tested and evaluated. This has been very useful in exploring in vitro response to unusual circumstances or over time periods impractical in vivo. Details are on the <a href="ntpdsim.html">Network Time Protocol (NTP) Simulator</a> page.</p>
+<h4 id="hand">The Handbook</h4>
+<p>A good deal of tutorial and directive information is available on the handbook pages. These should be read in conjunction with the command and option information available on the pages listed on the sitemap page.</p>
+<dl>
+ <dt><a href="release.html">NTP Version 4 Release Notes</a></dt>
+ <dd>Lists recent changes and new features in the current distribution.</dd>
+ <dt><a href="assoc.html">Association Management</a></dt>
+ <dd>Describes how to configure servers and peers and manage the various options. Includes automatic server discovery schemes.</dd>
+ <dt><a href="discover.html">Automatic Server Discovery Schemes</a></dt>
+ <dd>Describes automatic server discovery using broadcast, multicast, manycast and server pool scheme.</dd>
+ <dt><a href="access.html">Access Control Support</a></dt>
+ <dd>Describes the access control mechanisms that can be used to limit client access to various time and management functions.</dd>
+ <dt><a href="authentic.html">Authentication Support</a></dt>
+ <dd>Describes the authentication mechanisms for symmetric-key and public-key cryptography.</dd>
+ <dt><a href="rate.html">Rate Management</a></dt>
+ <dd>Describes the principles of rate management to minimize network load and defend against DoS attacks.</dd>
+ <dt>&nbsp;</dt>
+ <dt><a href="refclock.html">Reference Clock Support</a></dt>
+ <dd>Describes the collection of radio clocks used to synchronize primary servers.</dd>
+ <dt><a href="warp.html">How NTP Works</a></dt>
+ <dd>Gives an overview of the NTP daemon architecture and how it works.</dd>
+</dl>
+<h4 id="build">Building and Installing NTP</h4>
+<p>NTP supports Unix, VMS and Windows (2000 and later) systems. The <a href="build.html">Building and Installing the Distribution</a> page details the procedures for building and installing on a typical system. This distribution includes drivers for many radio and satellite receivers and telephone modem services in the US, Canada and Europe. A list of supported drivers is on the <a href="refclock.html">Reference Clock Drivers</a> page. The default build includes the debugging options and all drivers that run on the target machine; however, options and drivers can be included or excluded using options on the <a href="config.html">Configuration Options</a> page.</p>
+<h4 id="prob">Resolving Problems</h4>
+<p>Like other things in modern Internet life, NTP problems can be devilishly intricate. This distribution includes a number of utilities designed to identify and repair problems using an integrated management protocol supported by the <a href="ntpq.html"><tt>ntpq</tt></a> utility program. </p>
+<p>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. Additional information on reference clock driver construction and debugging is in the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> page.</p>
+<p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTP Bug Reporting Procedures</a> page.</p>
+<h4 id="info">Further Information</h4>
+<p>The <a href="sitemap.html">Site Map</a> page contains a list of document collections arranged by topic. The Program Manual Pages collection may be the best place to start. The <a href="comdex.html">Command Index</a> collection contains a list of all configuration file commands together with a short function description. A great wealth of additional information is available via the External Links collection, including a book and numerous background papers and briefing presentations.</p>
+<p>Background information on computer network time synchronization is on the <a href="http://www.eecis.udel.edu/%7emills/exec.html">Executive Summary - Computer Network Time Synchronization</a> page. Discussion on new features and interoperability with previous NTP versions is on the <a href="release.html">NTP Version 4 Release Notes</a> page. Background information, bibliography and briefing slides suitable for presentations are on the <a href="http://www.eecis.udel.edu/%7emills/ntp.html">Network Time Synchronization Research Project</a> page. Additional information is at the NTP web site <a href="http://www.ntp.org">www.ntp.org</a>.</p>
+<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>
diff --git a/html/kern.html b/html/kern.html
index a5efe0578d6c..b1660451b6eb 100644
--- a/html/kern.html
+++ b/html/kern.html
@@ -1,33 +1,32 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <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 finds the kernel a house of cards.</p>
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">15:42</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <hr>
- <p>The technical report [2], which is a revision and update of an earlier report [3], describes an engineering model for a precision clock discipline function for a generic operating system. The model is the same hybrid phase/frequecy-lock feedback loop used by <tt>ntpd</tt>, but implemented in the kernel. The code described in [2] is included in Solaris and Digital/Compaq/HP Tru64. It provides 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 in FreeBSD and is an option for Linux, SunOS and Tru64; however, of the options, only the Linux implementation, which does not include licensed code, is readily available. The software and documentation, including a simulator used to verify correct behavior, but not involving licensed code, is available from <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a>.</p>
- <p>The kernel model also provides support for an external precision timing source, such as described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The new system calls are used by the <a href="kernpps.html">PPSAPI interface</a> and in turn by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) 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>
- <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>
- <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></li>
- </ol>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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 finds the kernel a house of cards.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:10<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<hr>
+<p>The technical report [2], which is a revision and update of an earlier report [3], describes an engineering model for a precision clock discipline function for a generic operating system. The model is the same hybrid phase/frequecy-lock feedback loop used by <tt>ntpd</tt>, but implemented in the kernel. The code described in [2] is included in Solaris and Digital/Compaq/HP Tru64. It provides 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 in FreeBSD, Linux and Tru64. The software and documentation, including a simulator used to verify correct behavior, but not involving licensed code, is available in the <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a> distribution</p>
+<p>Ordinarily, the kernel clock discipline function is used with the NTP daemon, but could be used for other purposes. The <a href="ntptime.html"><tt>ntptime</tt></a> utility program can be used to control it manually.</p>
+<p>The kernel model also provides support for an external precision timing source, such as described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The new system calls are used by the <a href="kernpps.html">PPSAPI interface</a> and in turn by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) to provide synchronization limited in principle only by the accuracy and stability of the external timing source. Typical results with the PPS signal from a GPS receiver and a modern computer are in the 3 &mu;s range.</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>
+ <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>
+ <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></li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/kernpps.html b/html/kernpps.html
index 43ebcb11c132..b7536bd651ee 100644
--- a/html/kernpps.html
+++ b/html/kernpps.html
@@ -1,50 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <title>PPSAPI Interface for Precision Time Signals</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>PPSAPI Interface for Precision Time Signals</h3>
- <img src="pic/tonea.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>NBS Special Publication 432, 1979</i></a> (out of print)
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">15:40</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <p>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <br clear="left">
- </p>
- <hr>
- <h4>Introduction</h4>
- <p>RFC-2783 describes the PPSAPI application programming interface for external precision time signals, such as the pulse-per-second (PPS) signal generated by some radio clocks and cesium oscillators. The PPSAPI provides a generic capability in the ubiquitous Unix kernel which can be used for a wide variety of measurement applications, including network time synchronization and related experiments. 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 such as described on the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. In some systems a parallel port can be used for the same purpose.</p>
- <p>The PPSAPI interface defined in RFC-2783 is the only PPS interface supported in NTP Version 4. The PPSAPI is supported in stock FreeBSD and, with the addition of the <tt>PPSkit</tt> kernel module, in Linux.</p>
- <p>The special header file <tt>/usr/include/sys/timepps.h</tt> implements the PPSAPI using whatever primitives are available in each archeticture and operating system. It obsoletes previous APIs based on the <tt>tty_clock</tt> and <tt>ppsclock</tt> line disciplines and streams modules, which are no longer supported.</p>
- <p>The <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) uses the PPSAPI in conjunction with a local radio clock or remote NTP&nbsp;server as a reference clock. The driver can also use the PPSAPI&nbsp;as an interface directly to the kernel PPS facility as described on the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page.</p>
- <h4>PPSAPI Application Program Interface</h4>
- <p>The PPSAPI interface provides the following functions:</p>
- <dl>
- <dt><tt>time_pps_create</tt>
- <dd>Creates a PPS interface instance and returns a handle to it.
- <dt><tt>time_pps_destroy</tt>
- <dd>Destroys a PPS interface and returns the resources used.
- <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.
- <dt><tt>time_pps_getparams</tt>
- <dd>Returns the parameters associated with a PPS interface instance.
- <dt><tt>time_pps_getcap</tt>
- <dd>Returns the capabilities of the current interface and kernel implementation.
- <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.
- <dt><tt>time_pps_kcbind</tt>
- <dd>If kernel PPS processing is supported, this binds the support to the associated PPS interface instance.
- </dl>
- <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>
-<hr> <hr>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>PPSAPI Interface for Precision Time Signals</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>PPSAPI Interface for Precision Time Signals</h3>
+<img src="pic/tonea.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>NBS Special Publication 432, 1979</i></a> (out of print)
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:10<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+ <br clear="left">
+</p>
+<hr>
+<h4>Introduction</h4>
+<p>RFC-2783 describes the PPSAPI application programming interface for external precision time signals, such as the pulse-per-second (PPS) signal generated by some radio clocks and cesium oscillators. The PPSAPI provides a generic capability in the ubiquitous Unix kernel which can be used for a wide variety of measurement applications, including network time synchronization and related experiments. 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 such as described on the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. In some systems a parallel port can be used for the same purpose.</p>
+<p>The PPSAPI interface defined in RFC-2783 is the only PPS interface supported in NTP Version 4. The PPSAPI is supported in stock FreeBSD and, with the addition of the <tt>PPSkit</tt> kernel module, in Linux.</p>
+<p>The special header file <tt>/usr/include/sys/timepps.h</tt> implements the PPSAPI using whatever primitives are available in each archeticture and operating system. It obsoletes previous APIs based on the <tt>tty_clock</tt> and <tt>ppsclock</tt> line disciplines and streams modules, which are no longer supported.</p>
+<p>The <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) uses the PPSAPI in conjunction with a local radio clock or remote NTP&nbsp;server as a reference clock. The driver can also use the PPSAPI&nbsp;as an interface directly to the kernel PPS facility as described on the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page.</p>
+<h4>PPSAPI Application Program Interface</h4>
+<p>The PPSAPI interface provides the following functions:</p>
+<dl>
+ <dt><tt>time_pps_create</tt></dt>
+ <dd>Creates a PPS interface instance and returns a handle to it.</dd>
+ <dt><tt>time_pps_destroy</tt></dt>
+ <dd>Destroys a PPS interface and returns the resources used.</dd>
+ <dt><tt>time_pps_setparams</tt></dt>
+ <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></dt>
+ <dd>Returns the parameters associated with a PPS interface instance.
+ </dd><dt><tt>time_pps_getcap</tt></dt>
+ <dd>Returns the capabilities of the current interface and kernel implementation.</dd>
+ <dt><tt>time_pps_fetch</tt></dt>
+ <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></dt>
+ <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 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>
+<hr>
+<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+</body>
+</html>
diff --git a/html/keygen.html b/html/keygen.html
index bb0589188b74..191b7147b514 100644
--- a/html/keygen.html
+++ b/html/keygen.html
@@ -1,241 +1,116 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<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>
-
<p><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>
-
<p>Alice holds the key.</p>
-
-<p>Last update:
- <!-- #BeginDate format:En2m -->13-Nov-2009 0:44<!-- #EndDate -->
-</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:11<!-- #EndDate -->
+ UTC</p>
<br clear="left">
-
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
-
<h4>Table of Contents</h4>
-
<ul>
-
-<li class="inline"><a href="#synop">Synopsis</a></li>
-<li class="inline"><a href="#descrip">Description</a></li>
-<li class="inline"><a href="#run">Running the program</a></li>
-<li class="inline"><a href="#trust">Trusted Hosts and Secure Groups</a></li>
-<li class="inline"><a href="#ident">Identity Schemes</a></li>
-<li class="inline"><a href="#cmd">Command Line Options</a></li>
-<li class="inline"><a href="#rand">Random Seed File</a></li>
-<li class="inline"><a href="#fmt">Cryptographic Data Files</a></li>
-<li class="inline"><a href="#bug">Bugs</a></li>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descrip">Description</a></li>
+ <li class="inline"><a href="#run">Running the program</a></li>
+ <li class="inline"><a href="#cmd">Command Line Options</a></li>
+ <li class="inline"><a href="#rand">Random Seed File</a></li>
+ <li class="inline"><a href="#fmt">Cryptographic Data Files</a></li>
+ <li class="inline"><a href="#bug">Bugs</a></li>
</ul>
-
<hr>
-
<h4 id="synop">Synopsis</h4>
-
-<p id="intro"><tt>ntp-keygen [ -deGHIMPT ] [ -c [RSA-MD2 | RSA-MD5 | RSA-SHA
- | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ] [
- -i <i>group</i> ]
- [ -m <i>modulus</i> ] [ -p <i>passwd2</i> ] [ -q <i>passwd1</i> ] [ -S
- [ RSA | DSA ] ] [ -s <i>host</i> ] [ -V <i>nkeys</i> ]</tt></p>
-
+<p id="intro"><tt>ntp-keygen [ -deGHIMPT ] [ -b <i>modulus</i> ] [ -c [ RSA-MD2 | RSA-MD5 | RSA-SHA
+ | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ]
+ [ -C <i>cipher</i> ] [-i <i>group</i> ] [ -l <em>days</em>]
+ [ -m <i>modulus</i> ] [ -p <i>passwd1</i> ] [ -q <i>passwd2</i> ]
+ [ -S [ RSA | DSA ] ] [ -s <i>host</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 identity schemes. It can generate message digest keys used in symmetric
- key cryptography and, if the OpenSSL software library has been installed,
- it can generate host keys, sign keys, certificates and identity keys used
- by the Autokey public key cryptography. The message digest keys file is generated
- in a format compatible with NTPv3. All other files are in PEM-encoded printable
- ASCII format so they can be embedded as MIME attachments in mail to other
- sites.</p>
-
+<p>This program generates cryptographic data files used by the NTPv4 authentication and identity schemes. It can generate message digest keys used in symmetric key cryptography and, if the OpenSSL software library has been installed, it can generate host keys, sign keys, certificates, and identity keys and parameters used by the Autokey public key cryptography. The message digest keys file is generated in a format compatible with NTPv3. All other files are in PEM-encoded printable ASCII format so they can be embedded as MIME attachments in mail to other sites.</p>
<p>When used to generate message digest keys, the program produces a file containing
- ten pseudo-random printable ASCII strings suitable for the MD5 message digest
- algorithm included in the distribution. If the OpenSSL library is installed,
- it produces an additional ten hex-encoded random bit strings suitable for
- the SHA1 and other message digest algorithms. Printable ASCII keys can have
- length from one to 20 characters, inclusive. Bit string keys have length
- 20 octets (40 hex characters). All keys are 160 bits in length.</p>
-<p> The file can be edited later with
- purpose-chosen passwords for the <tt>ntpq</tt> and <tt>ntpdc</tt> programs.
- Each line of the file contains three fields, first an integer between 1 and
- 65534, inclusive, representing the key identifier used in the <tt>server</tt> and <tt>peer</tt> configuration
- commands. Next is the key type for the message digest algorithm,
- which in the absence of the OpenSSL library should be the string <tt>MD5</tt> to
- designate the MD5 message digest algorithm.
- If the OpenSSL library is installed, the key type can be any message digest
- algorithm supported by that library. However, if compatibility with FIPS
- 140-2 is required, the key type must be either <tt>SHA</tt> or <tt>SHA1</tt>.Finally
- is the key itself as a printable ASCII string excluding the space and # characters.
- If not greater than 20 characters in length, the string is the key itself;
- otherwise, it is interpreted as a hex-encoded bit string. As is
- custom, # and the remaining characters on the line are ignored. Later, this
- file can be edited to include the passwords for the <tt>ntpq</tt> and <tt>ntpdc</tt> utilities.
- If this is the only need, run <tt>ntp-keygen</tt> with the <tt>-M</tt> option
- and disregard the remainder of this page. </p>
-<p>The remaining generated files are compatible with other OpenSSL applications and other Public Key Infrastructure (PKI) resources. Certificates generated by this program should be compatible with extant industry practice, although some users might find the interpretation of X509v3 extension fields somewhat liberal. However, the identity keys are probably not compatible with anything other than Autokey.</p>
-
-<p>Most files used by this program are encrypted using a private password. The <tt>-p</tt> option specifies the password for local files and the <tt>-q</tt> option the password for files sent to remote sites. If no local password is specified, the host name returned by the Unix <tt>gethostname()</tt> function, normally the DNS name of the host, is used. If no remote password is specified, the local password is used.</p>
-
-<p>The <tt>pw</tt> option of the <tt>crypto</tt> configuration command specifies the read password for previously encrypted files. This must match the local password used by this program. If not specified, the host name is used. Thus, if files are generated by this program without password, they can be read back by <tt>ntpd</tt> without password, but only on the same host.</p>
-
-<p>All files and links are usually installed in the directory <tt>/usr/local/etc</tt>,
- which is normally in a shared filesystem in NFS-mounted networks and cannot
- be changed by shared clients. The location of the keys directory can be changed
- by the <tt>keysdir</tt> configuration command in such cases. Normally, encrypted
- 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>This program directs commentary and error messages to the standard error stream <tt>stderr</tt> and remote files to the standard output stream <tt>stdout</tt> where they can be piped to other applications or redirected to a file. The names used for generated files and links all begin with the string <tt>ntpkey</tt> and include the file type, generating host and filestamp, as described in the <a href="#fmt">Cryptographic Data Files</a> section below</p>
-
+ ten pseudo-random printable ASCII strings suitable for the MD5 message digest algorithm included in the distribution. If the OpenSSL library is installed, it produces an additional ten hex-encoded random bit strings suitable for the SHA1 and other message digest algorithms. The message digest keys file must be distributed and stored using secure means beyond the scope of NTP itself. Besides the keys used for ordinary NTP associations, additional keys can be defined as passwords for the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.</p>
+<p>The remaining generated files are compatible with other OpenSSL applications and other Public Key Infrastructure (PKI) resources. Certificates generated by this program are compatible with extant industry practice, although some users might find the interpretation of X509v3 extension fields somewhat liberal. However, the identity keys are probably not compatible with anything other than Autokey.</p>
+<p>Some files used by this program are encrypted using a private password. The <tt>-p</tt> option specifies the password for local encrypted files and the <tt>-q</tt> option the password for encrypted files sent to remote sites. If no password is specified, the host name returned by the Unix <tt>gethostname()</tt> function, normally the DNS name of the host, is used.</p>
+<p>The <tt>pw</tt> option of the <tt>crypto</tt> configuration command specifies the read password for previously encrypted local files. This must match the local password used by this program. If not specified, the host name is used. Thus, if files are generated by this program without password, they can be read back by <tt>ntpd</tt> without password, but only on the same host.</p>
+<p>Normally, encrypted files for each host are generated by that host and used only by that host, although exceptions exist as noted later on this page. The symmetric keys file, normally called <tt>ntp.keys</tt>, is usually installed in <tt>/etc</tt>. Other files and links are usually installed in <tt>/usr/local/etc</tt>, which is normally in a shared filesystem in NFS-mounted networks and cannot be changed by shared clients. The location of the keys directory can be changed by the <tt>keysdir</tt> configuration command in such cases. Normally, this is in <tt>/etc</tt>.</p>
+<p>This program directs commentary and error messages to the standard error stream <tt>stderr</tt> and remote files to the standard output stream <tt>stdout</tt> where they can be piped to other applications or redirected to files. The names used for generated files and links all begin with the string <tt>ntpkey</tt> and include the file type, generating host and filestamp, as described in the <a href="#fmt">Cryptographic Data Files</a> section below</p>
<h4 id="run">Running the Program</h4>
-
-<p>To test and gain experience with Autokey concepts, log in as root and change to the keys directory, usually <tt>/usr/local/etc</tt>. When run for the first time, or if all files with names beginning <tt>ntpkey</tt> have been removed, use the <tt>ntp-keygen </tt>command without arguments to generate a default RSA host key and matching RSA-MD5 certificate with expiration date one year hence. If run again, the program uses the existing keys and parameters and generates only a new certificate with new expiration date one year hence; however, the certificate is not generated if the <tt>-e</tt> or <tt>-q</tt> options are present.</p>
-
+<p>To test and gain experience with Autokey concepts, log in as root and change to the keys directory, usually <tt>/usr/local/etc</tt>. When run for the first time, or if all files with names beginning <tt>ntpkey</tt> have been removed, use the <tt>ntp-keygen </tt>command without arguments to generate a default RSA host key and matching RSA-MD5 certificate with expiration date one year hence. If run again without options, the program uses the existing keys and parameters and generates only a new certificate with new expiration date one year hence.</p>
<p>Run the command on as many hosts as necessary. Designate one of them as the trusted host (TH) using <tt>ntp-keygen</tt> with the <tt>-T</tt> option and configure it to synchronize from reliable Internet servers. Then configure the other hosts to synchronize to the TH directly or indirectly. A certificate trail is created when Autokey asks the immediately ascendant host towards the TH to sign its certificate, which is then provided to the immediately descendant host on request. All group hosts should have acyclic certificate trails ending on the TH.</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. A different sign key can be assigned using the <tt>-S</tt> option and this can be either RSA or DSA type. By default, the signature message digest type is MD5, but any combination of sign key type and sign digest type supported by the OpenSSL library can be specified using the <tt>-c</tt> option. At the moment, legacy considerations require the NTP packet header digest type to be MD5.</p>
-
-<h4 id="trust">Trusted Hosts and Secure Groups</h4>
-
-<p>As described on the <a href="authopt.html">Authentication Options</a> page, an NTP secure group consists of one or more low-stratum THs as the root from which all other group hosts derive synchronization directly or indirectly. For authentication purposes all hosts in a group must have the same group name specified by the <tt>-i</tt> option and matching the <tt>ident</tt> option of the <tt>crypto</tt> configuration command. The group name is used in the subject and issuer fields of trusted, self-signed certificates and when constructing the file names for identity keys. All hosts must have different host names, either the default host name or as specified by the <tt>-s</tt> option and matching the <tt>host</tt> option of the <tt>crypto</tt> configuration command. Most installations need not specify the <tt>-i</tt> option nor the <tt>host</tt> option. Host names are used in the subject and issuer fields of self-signed, nontrusted certificates and when constructing the file names for host and sign keys and certificates. Host and group names are used only for authentication purposes and have nothing to do with DNS names.</p>
-
-<h4 id="ident">Identity Schemes</h4>
-
-<p>As described on the <a href="authopt.html">Authentication Options</a> page, there are five identity schemes, three of which - IFF, GQ and MV - require identity keys specific to each scheme. There are two types of files for each scheme, an encrypted keys file and a nonencrypted parameters file, which usually contains a subset of the keys file. In general, NTP secondary servers operating as certificate signing authorities (CSA) use the keys file and clients use the parameters file. Both files are generated by the TA operating as a certificate authority (CA) on behalf of all servers and clients in the group.</p>
-
-<p>The parameters files are public; they can be stored in a public place and
- sent in the clear. The keys files are encrypted with the local password. To
- retrieve the keys file, a host can send a mail request to the TA including its
- local password. The TA encrypts the keys file with this password and returns
- it as an attachment. The attachment is then copied intact to the keys directory
- with name given in the first line of the file, but all in lower case and with
- the filestamp deleted. Alternatively, the parameters file can be retrieved from
- a secure web site.</p>
-
-<p>For example, the TA generates default host key, IFF keys and trusted certificate using the command</p>
-
-<p><tt>ntp-keygen -p <i>local_passwd</i> -T -I -i<i>group_name</i></tt></p>
-
-<p>Each group host generates default host keys and nontrusted certificate use
- the same command line but omitting the <tt>-i</tt> option. Once these media
- have been generated, the TA can then generate the public parameters using the
- command</p>
-
-<p><tt>ntp-keygen -p local_passwd -e &gt;<i>parameters_file</i></tt></p>
-
-<p>where the <tt>-e</tt> option redirects the unencrypted parameters to the standard output stream for a mail application or stored locally for later distribution. In a similar fashion the <tt>-q</tt> option redirects the encrypted server keys to the standard output stream.</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. A different sign key can be assigned using the <tt>-S</tt> option and this can be either RSA or DSA type. By default, the signature message digest type is MD5, but any combination of sign key type and message digest type supported by the OpenSSL library can be specified using the <tt>-c</tt> option.</p>
+<dd>The rules say cryptographic media should be generated with proventic filestamps, which means the host should already be synchronized before this program is run. This of course creates a chicken-and-egg problem when the host is started for the first time. Accordingly, the host time should be set by some other means, such as eyeball-and-wristwatch, at least so that the certificate lifetime is within the current year. After that and when the host is synchronized to a proventic source, the certificate should be re-generated.</dd>
+<p>Additional information on trusted groups and identity schemes is on the <a href="autokey.html">Autokey Public-Key Authentication</a> page.</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></dt>
-<dd>Select certificate and 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>. If
- compatibility with FIPS 140-2 is required, either the <tt>DSA-SHA</tt> or <tt>DSA-SHA1</tt> scheme
- must be used.</dd>
-
-<dt><tt>-d</tt></dt>
-<dd>Enable debugging. This option displays the cryptographic data produced for eye-friendly billboards.</dd>
-
-<dt><tt>-e</tt></dt>
-<dd>Extract the IFF or GQ public parameters from the <tt>IFFkey</tt> or <tt>GQkey</tt> keys file previously specified. Send the unencrypted data to the standard output stream <tt>stdout</tt>. While the IFF parameters do not reveal the private group key, &nbsp;the GQ parameters should be used with caution, as they include the group key. Use the <tt>-q</tt> option with password instead. Note: a new certificate is not generated when this option is present. This allows multiple commands with this option but without disturbing existing media.</dd>
-
-<dt><tt>-G</tt></dt>
-<dd>Generate a new encrypted GQ key file and link for the Guillou-Quisquater
- (GQ) identity scheme.</dd>
-
-<dt><tt>-H</tt></dt>
-<dd>Generate a new encrypted RSA public/private host key file and link<tt></tt>.
- Note that if the sign key is the same as the host key, generating a new host
- key invalidates all certificates signed with the old host key.</dd>
-
-<dt><tt>-i <i>group</i></tt></dt>
-<dd>Set the group name to <tt><i>group</i></tt>. This is used in the identity file names. It must match the group name specified in the <tt>ident</tt> option of the <tt>crypto</tt> configuration command.</dd>
-
-<dt><tt>-I</tt></dt>
-<dd>Generate a new encrypted IFF key file<tt> </tt>and link<tt> </tt>for the Schnorr (IFF) identity scheme.</dd>
-
-<dt><tt>-m <i>modulus</i></tt></dt>
-<dd>Set the modulus for generating files to <i>modulus</i> bits. The modulus defaults to 512, but can be set from 256 (32 octets) to 2048 (256 octets).</dd>
-
-<dt><tt>-M</tt></dt>
-<dd>Generate a new MD5 key file containing 16, 128-bit pseudo-random keys for
- symmetric cryptography..</dd>
-
-<dt><tt>-P</tt></dt>
-<dd>Generate a new private certificate used by the PC identity scheme. By default, the program generates public certificates. Note: the PC identity scheme is not recommended for new installations.</dd>
-
-<dt><tt>-p <i>passwd</i></tt></dt>
-<dd>Set the password for reading and writing encrypted files to <tt><i>passwd</i></tt>. By default, the password is the host name.</dd>
-
-<dt><tt>-q <i>passwd</i></tt></dt>
-<dd>Extract the encrypted IFF or GQ server keys from the <tt>IFFkey</tt> or <tt>GQkey</tt> key file previously generated. The data are sent to the standard output stream <tt>stdout</tt>. Set the password for writing the data, which is also the password to read the data file in another host. By default, the password is the host name. Note: a new certificate is not generated when this option is present. This allows multiple commands with this option but without disturbing existing media.</dd>
-
-<dt><tt>-S [ RSA | DSA ]</tt></dt>
-<dd>Generate a new sign key of the specified type. By default, the sign key is
- the host key and has the same type. If compatibly with FIPS 140-2 is required,
- the sign key type must be <tt>DSA</tt>. Note that generating a new sign key
- invalidates all certificates signed with the old sign key.</dd>
-
-<dt><tt>-s <i>host</i></tt></dt>
-<dd>Set the host name to <tt><i>host</i></tt>. This is used in the host and sign key file names. It must match the host name specified in the <tt>host</tt> option of the <tt>crypto</tt> configuration command.</dd>
-
-<dt><tt>-T</tt></dt>
-<dd>Generate a trusted certificate. By default, the program generates nontrusted certificates.</dd>
-
-<dt><tt>-V <i>nkeys</i></tt></dt>
-<dd>Generate server parameters <tt>MV</tt> and <tt><i>nkeys</i></tt> client keys for the Mu-Varadharajan (MV) identity scheme. Note: support for this option should be considered a work in progress.</dd>
+ <dt><tt>-b <i>modulus</i></tt></dt>
+ <dd>Set the modulus for generating identity keys to <i>modulus</i> bits. The modulus defaults to 256, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.</dd>
+ <dt><tt>-c [ RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ]</tt></dt>
+ <dd>Select certificate digital signature and message digest scheme. Note that RSA schemes must be used with an RSA sign key and DSA schemes must be used with a DSA sign key. The default without this option is <tt>RSA-MD5</tt>. If compatibility with FIPS 140-2 is required, either the <tt>DSA-SHA</tt> or <tt>DSA-SHA1</tt> scheme must be used.</dd>
+ <dt><tt>-C <i>cipher</i></tt></dt>
+ <dd>Select the OpenSSL cipher to use for password-protected keys. The <tt>openssl -h</tt> command provided with OpenSSL displays available ciphers. The default without this option is <tt>des-ede3-cbc</tt>.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd>Enable debugging. This option displays the cryptographic data produced for eye-friendly billboards.</dd>
+ <dt><tt>-e</tt></dt>
+ <dd>Extract the IFF or GQ public parameters from the <tt>IFFkey</tt> or <tt>GQkey</tt> keys file previously specified. Send the unencrypted data to the standard output stream <tt>stdout</tt>.</dd>
+ <dt><tt>-G</tt></dt>
+ <dd>Generate a new encrypted GQ key file for the Guillou-Quisquater (GQ) identity scheme. This option is mutually exclusive with the <tt>-I</tt> and <tt>-V</tt> options.</dd>
+ <dt><tt>-H</tt></dt>
+ <dd>Generate a new encrypted RSA public/private host key file.</dd>
+ <dt><tt>-i <i>group</i></tt></dt>
+ <dd>Set the optional Autokey group name to <tt><i>group</i></tt>. This is used in the identity scheme parameter file names. In that role, the default is the host name if no group is provided. The group name, if specified using <tt>-i</tt> or using <tt>-s</tt> following an <tt>@</tt> character, is also used in certificate subject and issuer names in the form <tt><i>host</i>@<i>group</i></tt> and should match the group specified via <tt>crypto ident</tt> or <tt>server ident</tt> in ntpd's configuration file.</dd>
+ <dt><tt>-I</tt></dt>
+ <dd>Generate a new encrypted IFF key file for the Schnorr (IFF) identity scheme. This option is mutually exclusive with the <tt>-G</tt> and <tt>-V</tt> options.</dd>
+ <dt><tt>-l <i>days</i></tt></dt>
+ <dd>Set the lifetime for certificates to <tt><i>days</i></tt>. The default lifetime is one year (365 d).</dd>
+ <dt><tt>-m <i>modulus</i></tt></dt>
+ <dd>Set the modulus for generating files to <i>modulus</i> bits. The modulus defaults to 512, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.</dd>
+ <dt><tt>-M</tt></dt>
+ <dd>Generate a new keys file containing 10 MD5 keys and 10 SHA keys. An MD5 key is a string of 20 random printable ASCII characters, while a SHA key is a string of 40 random hex digits. The file can be edited using a text editor to change the key type or key content. This option is mutually exclusive with all other option.</dd>
+ <dt><tt>-P</tt></dt>
+ <dd>Generate a new private certificate used by the PC identity scheme. By default, the program generates public certificates. Note: the PC identity scheme is not recommended for new installations.</dd>
+ <dt><tt>-p <i>passwd</i></tt></dt>
+ <dd>Set the password for reading and writing encrypted files to <tt><i>passwd.</i></tt> These include the host, sign and identify key files. By default, the password is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-q <i>passwd</i></tt></dt>
+ <dd>Set the password for writing encrypted IFF, GQ and MV identity files redirected to <tt>stdout</tt> to <tt><i>passwd.</i></tt> In effect, these files are decrypted with the <tt>-p</tt> password, then encrypted with the <tt>-q</tt> password. By default, the password is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-S [ RSA | DSA ]</tt></dt>
+ <dd>Generate a new encrypted public/private sign key file of the specified type. By default, the sign key is
+ the host key and has the same type. If compatibly with FIPS 140-2 is required,
+ the sign key type must be <tt>DSA</tt>.</dd>
+ <dt><tt>-s <i>host</i>[@<i>group</i>]</tt></dt>
+ <dd>Specify the Autokey host name, where <tt><i>host</i></tt> is the host name and <tt><i>group</i></tt> is the optional group name. The host name, and if provided, group name are used in <tt><i>host</i>@<i>group</i></tt> form as certificate subject and issuer. Specifying <tt>-s @<i>group</i></tt> is allowed, and results in leaving the host name unchanged, as with <tt>-i <i>group</i></tt>. The group name, or if no group is provided, the host name are also used in the file names of IFF, GQ, and MV identity scheme parameter files. If <tt><i>host</i></tt> is not specified, the default host name is the string returned by the <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-T</tt></dt>
+ <dd>Generate a trusted certificate. By default, the program generates nontrusted certificates.</dd>
+ <dt><tt>-V <i>nkeys</i></tt></dt>
+ <dd>Generate <tt>nkeys</tt> encrypted server keys for the Mu-Varadharajan (MV) identity scheme. This option is mutually exclusive with the <tt>-I</tt> and <tt>-G</tt> options. Note: support for this option should be considered a work in progress.</dd>
</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 OpenSSL library routines. If a site supports <tt>ssh</tt>, it is very likely that means to do this are already available. 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 <tt>ntp-keygen</tt> program or <tt>ntpd</tt> daemon.</p>
-
<p>The OpenSSL library looks 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 looks for the <tt>.rnd</tt> file in the user home directory. Since both the <tt>ntp-keygen</tt> program and <tt>ntpd</tt> daemon must run as root, the logical place to put this file is in <tt>/.rnd</tt> or <tt>/root/.rnd</tt>. If the file is not available or cannot be written, the program exits with a message to the system log.</p>
-<p>On systems that provide /dev/urandom, the randomness device is used instead and the file specified by the <tt>randfile</tt> subcommand or the <tt>RANDFILE</tt> environment variable is ignored.</p>
-
-<h4 id="priv">Cryptographic Data Files</h4>
-
-<p>File and link names are in the form <tt>ntpkey_<i>key</i>_<i>name</i>.<i>fstamp</i></tt>, where <tt><i>key</i></tt> is the key or parameter type, <tt><i>name</i></tt> is the host or group name and <tt><i>fstamp</i></tt> is the filestamp (NTP seconds) when the file was created). By convention, key fields in generated file names include both upper and lower case alphanumeric characters, while key fields in generated link names include only lower case characters. The filestamp is not used in generated link names.</p>
-
-<p>The key type is a string defining the cryptographic function. Key types include public/private keys <tt>host</tt> and <tt>sign</tt>, certificate <tt>cert</tt> and several challenge/response key types. By convention, files used for challenges have a <tt>par</tt> subtype, as in the IFF challenge <tt>IFFpar</tt>, while files for responses have a <tt>key</tt> subtype, as in the GQ response <tt>GQkey</tt>.</p>
-
+<h4 id="fmt">Cryptographic Data Files</h4>
+<p>File and link names are in the form <tt>ntpkey_<i>key</i>_<i>name</i>.<i>fstamp</i></tt>, where <tt><i>key</i></tt> is the key or parameter type, <tt><i>name</i></tt> is the host or group name and <tt><i>fstamp</i></tt> is the filestamp (NTP seconds) when the file was created). By convention, <em><tt>key</tt></em> names in generated file names include both upper and lower case characters, while <em><tt>key</tt></em> names in generated link names include only lower case characters. The filestamp is not used in generated link names.</p>
+<p>The <em><tt>key</tt></em> name is a string defining the cryptographic key type. Key types include public/private keys <tt>host</tt> and <tt>sign</tt>, certificate <tt>cert</tt> and several challenge/response key types. By convention, client files used for challenges have a <tt>par</tt> subtype, as in the IFF challenge <tt>IFFpar</tt>, while server files for responses have a <tt>key</tt> subtype, as in the GQ response <tt>GQkey</tt>.</p>
<p>All files begin with two nonencrypted lines. The first line contains the file name in the format <tt>ntpkey_<i>key</i>_<i>host</i>.<i>fstamp</i></tt>. The second line contains the datestamp in conventional Unix <tt>date</tt> format. Lines beginning with <tt>#</tt> are ignored.</p>
-
-<p>The remainder of the file contains cryptographic data encoded first using ASN.1 rules, then encrypted using the DES-CBC algorithm and given password and finally written in PEM-encoded printable ASCII text 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 the header 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>The remainder of the file contains cryptographic data encoded first using ASN.1 rules, then encrypted using the DES-CBC algorithm with given password and finally written in PEM-encoded printable ASCII text preceded and followed by MIME content identifier lines.</p>
+<p>The format of the symmetric keys file, ordinarily named <tt>ntp.keys,</tt> is somewhat different than the other files in the interest of backward compatibility. Ordinarily, the file is generated by this program, but it can be constructed and edited using an ordinary text editor.</p>
+<div align="center">
+ <p><img src="pic/sx5.gif" alt="gif"></p>
+ <p>Figure 1. Typical Symmetric Key File</p>
+</div>
+<p>Figure 1 shows a typical symmetric keys file used by the reference implementation. Each line of the file contains three fields, first an integer between 1 and 65534, inclusive, representing the key identifier used in the <tt>server</tt> and <tt>peer</tt> configuration commands. Next is the key type for the message digest algorithm, which in the absence of the OpenSSL library must be <tt>MD5</tt> to designate the MD5 message digest algorithm. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by that library. However, if compatibility with FIPS 140-2 is required, the key type must be either <tt>SHA</tt> or <tt>SHA1</tt>. The key type can be changed using an ASCII text editor.</p>
+<p> An MD5 key consists of a printable ASCII string less than or equal to 16 characters and terminated by whitespace or a # character. An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which is truncated as necessary.</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="ntpq.html"><tt>ntpq</tt></a> and <a href="ntpdc.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
+</html>
diff --git a/html/leap.html b/html/leap.html
new file mode 100644
index 000000000000..8abec149ad03
--- /dev/null
+++ b/html/leap.html
@@ -0,0 +1,24 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Leap Second Processing</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Leap Second Processing</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:11<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>About every eighteen months the International Earth Rotation Service (IERS) issues a bulletin announcing the insertion of a leap second in the Universal Coordinated Time (UTC) timescale. Ordinarily, this happens at the end of the last day of June or December; but, in principle, it could happen at the end of any month. While these bulletins are available on the Internet at <a href="http://www.iers.org">www.iers.org</a>, advance notice of leap seconds is also available in signals broadcast from national time and frequency stations, in GPS signals and in telephone modem services. Many, but not all, reference clocks recognize these signals and many, but not all, drivers for them can decode the signals and set the leap bits in the timecode accordingly. This means that many, but not all, primary servers can pass on these bits in the NTP packet heard to dependent secondary servers and clients. Secondary servers can pass these bits to their dependents and so on throughout the NTP subnet.</p>
+<p> A leap second is inserted following second 59 of the last minute of the day and becomes second 60 of that day. A leap second is deleted by omitting second 59 of the last minute of the day, although this has never happened and is highly unlikely to happen in future. So far as is known, there are no provisions in the Unix or Windows libraries to account for this occasion other than to affect the conversion of an NTP datestamp or timestamp to conventional civil time.</p>
+<p>When an update is received from a reference clock or downstratum server, the leap bits are inspected for all survivors of the cluster algorithm. If the number of survivors showing a leap bit is greater than half the total number of survivors, a pending leap condition exists until the end of the current month.</p>
+<p>When no means are available to determine the leap bits from a reference clock or downstratum server, a leapseconds file can be downloaded from time.nist.gov and installed using the <a href="miscopt.html#leapfile">leapfile</a> command. The file includes a list of historic leap seconds and the NTP time of insertion. It is parsed by the <tt>ntpd</tt> daemon at startup and the latest leap time saved for future reference. Each time the clock is set, the current time is compared with the last leap time. If the current time is later than the last leap time, nothing further is done. If earlier, the leap timer is initialized with the time in seconds until the leap time and counts down from there. When the leap timer is less than one month, a pending leap condition exists until the end of the current month. If the leapseconds file is present, the leap bits for reference clocks and downstratum servers are ignored.</p>
+<p>If the precision time kernel support is available and enabled, at the beginning of the day of the leap event, the leap bits are set by the Unix <tt>ntp_adjtime()</tt> system call to arm the kernel for the leap at the end of the day. The kernel automatically inserts one second exactly at the time of the leap, after which the leap bits are turned off. If the kernel support is not availed or disabled, the leap is implemented as a crude hack by setting the clock back one second using the Unix <tt>settimeofday() </tt>system call, which effectively repeats the last second. Note however that in any case setting the time backwards by one second does not actually set the system clock backwards, but effectively stalls the clock for one second. These points are expanded in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>. If the leap timer is less than one day, the leap bits are set for dependent servers and clients.</p>
+<p>As an additional feature when the NIST leap seconds file is installed, it is possible to determine the number of leap seconds inserted in UTC since UTC began on 1 January 1972. This represents the offset between International Atomic Time (TAI) and UTC. If the precision time kernel modifications are available and enabled, the TAI offset is available to application programs using the <tt>antipasti()</tt> system call. If the Autokey public-key cryptography feature is installed, the TAI offset is automatically propagated along with other cryptographic media to dependent servers and clients.</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/manyopt.html b/html/manyopt.html
deleted file mode 100644
index a236f4fca9c8..000000000000
--- a/html/manyopt.html
+++ /dev/null
@@ -1,66 +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="HTML Tidy, see www.w3.org">
- <title>Automatic Server Discovery</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Automatic Server Discovery</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:
- <!-- #BeginDate format:En2 -->25-Nov-2009<!-- #EndDate -->
- UTC</p>
-<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#bcst">Broadcast/Multicast Scheme</a></li>
- <li class="inline"><a href="#mcst">Manycast Scheme</a></li>
- <li class="inline"><a href="#pool">Server Pool Scheme</a></li>
- </ul>
- <hr>
- <h4 id="modes">Introduction</h4>
- <p>This page describes the automatic server discovery schemes provided in NTPv4. Details about the configuration commands and options are described on the <a href="confopt.html">Configuration Options</a> page. Details about the cryptographic authentication schemes are described on the <a href="authopt.html">Authentication Options</a> page. Details about the other modes not directly involved in these schemes are described on the <a href="assoc.html">Association Management</a> page. Additional information is available in the papers, reports, memoranda and briefings on the <a href="http://www.eecis.udel.edu/%7emills/ntp.html">NTP Project</a> page.</p>
- <p>There are three automatic server discovery schemes: broadcast/multicast, manycast and server pool described on this page. The broadcast/multicast and manycast schemes utilize the ubiquitous broadcast or one-to-many paradigm native to IPv4 and IPv6. The server pool scheme uses DNS to resolve addresses of multiple volunteer servers scattered throughout the world. All three schemes work in much the same way and might be described as <i>grab-n'-prune</i>. Through one means or another they grab a number of associations either directly or indirectly from the configuration file, order them from best to worst according to a defined metric, then cast off the associations with the lowest metric until no more than the number specified by the <tt>maxclock</tt> option of the <tt>tos </tt>command remain.</p>
- <h4>Association Management</h4>
- <p>All schemes use a stratum filter to select just those servers with stratum considered useful. This can avoid large numbers of clients ganging up on a small number of low-stratum servers and avoid servers below or above specified stratum levels. By default, servers of all strata are acceptable; however, the <tt>tos</tt> command can be used to restrict the acceptable range from the <tt>floor</tt> option, inclusive, to the <tt>ceiling</tt> option, exclusive. Potential servers operating at the same stratum as the client will be avoided, unless the <tt>cohort</tt> option is present.</p>
- <p>The pruning process is handled using a set of counters, one for each preemptible association. Once each poll interval the counter is increased by one. If the association survives the selection and clustering algorithms; that is, it is a candidate for synchronization, the counter is reset to zero. If not and the counter reaches a defined threshold and the number of assocations is greater than <tt>maxclock</tt>, the association becomes a candidate for pruning. The pruning algorithm assigns to each association a metric ranging from the lowest, corresponding to no possibility of synchronization, to the highest, corresponding to a very likely possibility of synchronization. Upon reaching the threshold, an association is demobilized if it has the lowest metric of all associations. Operation continues in this way until the number of remaining associations is not greater than <tt>maxclock</tt>.</p>
- <p>Following is a summary of each scheme. Note that reference to option applies to the commands described on the <a href="confopt.html">Configuration Options</a> page. See that page for applicability and defaults.</p>
- <h4 id="bcst">Broadcast/Multicast Scheme</h4>
- <p>A broadcast server generates messages continuously at intervals by default 64 s and time-to-live by default 127. These defaults can be overriden by the <tt>minpoll</tt> and <tt>ttl</tt> options, respectively. Not all kernels support the <tt>ttl</tt> option. A broadcast client responds to the first message received by waiting a randomized interval to avoid implosion at the server. It then polls the server in client/server mode using the <tt>iburst</tt> option in order to quickly authenticate the server, calibrate the propagation delay and set the host clock. This normally results in a volley of six client/server exchanges at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently.</p>
- <p>Following the volley, the server continues in listen-only mode and sends no further messages. If for some reason the broadcast server does not respond to these messages, the client will cease transmission and continue in listen-only mode with a default propagation delay. The volley can be avoided by using the <tt>authdelay</tt> command with nonzero argument.</p>
- <p>A server is configured in broadcast mode using the <tt>broadcast</tt> command and specifying the broadcast address of a local interface. If two or more local interfaces are installed with different broadcast addresses, a <tt>broadcast</tt> command is needed for each address. This provides a way to limit exposure in a firewall, for example. A broadcast client is configured using the <tt>broadcastclient</tt> command. </p>
- <p>NTP multicast mode can be used to extend the scope using IPv4 multicast or IPv6 broadcast with defined span. The IANA has assigned IPv4 multicast address 224.0.1.1 and IPv6 address 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 specifying a multicast address instead of a broadcast address. A multicast client is configured using the <tt>multicastclient</tt> command specifying a list of one or more multicast addresses. Note that there is a subtle distinction between the IPv4 and IPv6 address families. The IPv4 broadcast or mulitcast mode is determined by the IPv4 class. For IPv6 the same distinction can be made using the link-local prefix FF02 for each interface and site-local prefix FF05 for all interfaces.</p>
- <p>It is possible and frequently useful to configure a host as both broadcast client and broadcast server. A number of hosts configured this way and sharing a common broadcast address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
- <p>Since an intruder can impersonate a broadcast server and inject false time values, broadcast mode should always be cryptographically authenticated. By default, a broadcast association will not be mobilized unless cryptographically authenticated. If necessary, the <tt>auth</tt> option of the <tt>disable</tt> command will disable this feature. The feature can be selectively enabled using the <tt>notrust</tt> option of the <tt>restrict</tt> command.</p>
- <p>With symmetric key cryptography each broadcast server can use the same or different keys. In one scenario on a broadcast LAN,&nbsp;a set of broadcast clients and servers share the same key along with another set that share a different key. Only the clients with matching key will respond to a server broadcast.</p>
- <p>Public key cryptography can be used with some restrictions. If multiple servers belonging to different secure groups share the same broadcast LAN, the clients on that LAN&nbsp;must have the client keys for all of them. This scenario is illustrated in the example on the <a href="authopt.html">Authentication Options</a> page.</p>
- <h4 id="mcst">Manycast Scheme</h4>
- <p>Manycast is a automatic server discovery and configuration paradigm new to NTPv4. It is intended as a means for a client to troll the nearby network neighborhood to find cooperating servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. It uses the grab-n'-drop paradigm with the additional feature that active means are used to grab additional servers should the number of survivors fall below the <tt>minclock</tt> option of the <tt>tos</tt> command.</p>
- <p>The manycast paradigm is not 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>A manycast clients is configured using the <tt>manycastclient</tt> configuration command, which is similar to the <tt>server</tt> configuration command. It sends ordinary client mode messages, but with a broadcast address rather than a unicast address and sends only if less than <tt>minclock</tt> associateons remain and then only at the minimum feasible rate and minimum feasible time-to-live (TTL) hops. The polling strategy is designed to reduce as much as possible the volume of broadcast messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. There can be as many manycast client associations as different addresses, each one serving as a template for a future unicast client/server association.</p>
- <p>A manycast server is configured using the <tt>manycastserver</tt> command, which listens on the specified broadcast address for manycast client messages. 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 with an ordinary unicast server message.</p>
- <p>The manycast client receiving this message mobilizes a preemptable client 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. </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 multicast group address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
- <p>The use of cryptograpic authentication is always a good idea in any server descovery scheme. Both symmetric key and public key cryptography can be used in the same scenarios as described above for the broadast/multicast scheme.</p>
- <h4 id="pool">Server Pool Scheme</h4>
- <p>The idea of targeting servers on a random basis to distribute and balance the load is not a new one; however, the NTP pool scheme puts this on steroids. At present, several hundred operators around the globe have volunteered their servers for public access. In general, NTP&nbsp;is a lightweight service and servers used for other purposes don't mind an additional small load. The trick is to randomize over the population and minimize the load on any one server while retaining the advantages of multiple servers using the NTP&nbsp;mitigation algorithms.</p>
- <p>To support this service the DNS&nbsp;for some volunteer servers as been
- modified to collect a number of other volunteer&nbsp;servers and return a
- randomized list in response to a DNS query. The client receiving this list
- mobilizes some or all of them just as in the other discovery schemes and casts
- off the excess.</p>
- <p>The pool scheme is configured using one or <tt>pool</tt> commands with the DNS name <tt><i>region</i>.pool.ntp.org</tt>, where <tt><i>region</i></tt> is a region of the world, country of the region or state of the country or even the whole world if absent. The <tt>pool</tt> command can be used more than once; duplicate servers are detected and discarded. In principle, it is possible to use a configuration file containing a single line <tt>pool pool.ntp.org</tt>.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
diff --git a/html/miscopt.html b/html/miscopt.html
index 800a4f21fc81..62f41b6c59c3 100644
--- a/html/miscopt.html
+++ b/html/miscopt.html
@@ -1,136 +1,177 @@
<!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>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:
- <!-- #BeginDate format:En2m -->13-Nov-2009 19:08<!-- #EndDate -->
- UTC</p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
- <hr>
- <dl>
- <dt id="broadcastdelay"><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.</dd>
- <dt id="driftfile"><tt>driftfile <i>driftfile</i> { <i>tolerance</i> ]</tt></dt>
- <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 or more 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.</dd>
- <dd>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.</dd>
- <dd>The parameter <tt>tolerance</tt> is the wander threshold to skip writing the new value. If the value of wander computed from recent frequency changes is greater than this threshold the file will be updated once per hour. If below the threshold, the file will not be written.</dd>
- <dt id="enable"><tt>enable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
- <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats ]</tt></dt>
- <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></dt>
- <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.</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>calibrate</tt></dt>
- <dd>Enables the calibrate feature for reference clocks. The default for this flag is disable.</dd>
- <dt><tt>kernel</tt></dt>
- <dd>Enables the kernel time discipline, if available. The default for this flag is enable if support is available, otherwise 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>ntp</tt></dt>
- <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.</dd>
- <dt><tt>stats</tt></dt>
- <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.</dd>
- </dl>
- </dd>
- <dt id="includefile"><tt>includefile <i>includefile</i></tt></dt>
- <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).</dd>
- <dt id="interface"><tt>interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard | <i>name</i> | <i>address</i>[/<i>prefixlen</i>]]</tt></dt>
- <dd>This command controls which network addresses <tt>ntpd</tt> opens, and whether input is dropped without processing. The first parameter determines the action for addresses which match the second parameter. That parameter specifies a class of addresses, or a specific interface name, or an address. In the address case, <tt><i>prefixlen</i></tt> determines how many bits must match for this rule to apply. <tt>ignore</tt> prevents opening matching addresses, <tt>drop</tt> causes <tt>ntpd</tt> to open the address and drop all received packets without examination. Multiple <tt>interface</tt> commands can be used. The last rule which matches a particular address determines the action for it. <tt>interface</tt> commands are disabled if any <a href="ntpd.html#--interface"><tt>-I</tt></a>, <a href="ntpd.html#--interface"><tt>--interface</tt></a>, <a href="ntpd.html#--novirtualips"><tt>-L</tt></a>, or <a href="ntpd.html#--novirtualips"><tt>--novirtualips</tt></a> command-line options are used. If none of those options are used and no <tt>interface</tt> actions are specified in the configuration file, all available network addresses are opened. The <tt>nic</tt> command is an alias for <tt>interface</tt>.</dd>
- <dt id="leapfile"><tt>leapfile <i>leapfile</i></tt></dt>
- <dd>This command loads the NIST leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from NIST national time servers using <tt>ftp</tt> as the ASCII file <tt>pub/leap-seconds</tt>.</dd>
- <dd>While not strictly a security function, the Autokey protocol provides means to securely retrieve the current or updated leapsecond values from a server.</dd>
- <dt id="logconfig"><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. 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>).</dd>
- <dd>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. By default, <tt>logconfig</tt> output is set to <tt>allsync</tt>.</dd>
- <dd>Thus, a minimal log configuration could look like this:</dd>
- <dd><tt>logconfig=syncstatus +sysevents</tt></dd>
- <dd>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:</dd>
- <dd><tt>logconfig allsync +allclock</tt></dd>
- <dd>This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.</dd>
- <dt id="logfile"><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. This is the same operation as the <tt>-l </tt>command line option.</dd>
- <dt id="phone"><tt>phone <i>dial</i>1 <i>dial</i>2 ...</tt></dt>
- <dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
- <dt id="saveconfigdir"><tt>saveconfigdir <i>directory_path</i></tt></dt>
- <dd>Specify the directory in which to write configuration snapshots requested with <tt>ntpq</tt>'s <a href="ntpq.html#saveconfig">saveconfig</a> command. If <tt>saveconfigdir</tt> does not appear in the configuration file, saveconfig requests are rejected by ntpd.</dd>
- <dt id="setvar"><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 id="tinker"><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></dt>
- <dd>This command alters certain system variables used by the clock discipline algorithm. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. The options are as follows:</dd>
- <dd><dl>
- <dt><tt>allan <i>allan</i></tt></dt>
- <dd>Spedifies the Allan intercept, which is a parameter of the PLL/FLL clock discipline algorithm, in seconds with default 1500 s.</dd>
- <dt><tt>dispersion <i>dispersion</i></tt></dt>
- <dd>Specifies the dispersion increase rate in parts-per-million (PPM) with default 15 PPM.</dd>
- <dt><tt>freq <i>freq</i></tt></dt>
- <dd>Spedifies the frequency offset in parts-per-million (PPM) with default the value in the frequency file.</dd>
- <dt><tt>huffpuff <i>huffpuff</i></tt></dt>
- <dd>Spedifies the 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).</dd>
- <dt><tt>panic <i>panic</i></tt></dt>
- <dd>Spedifies the panic threshold in seconds with default 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>step <i>step</i></tt></dt>
- <dd>Spedifies the step threshold in seconds. The default without this command
- is 0.128 s. If set to zero, step adjustments will never
- occur. Note: The kernel time discipline is disabled if
- the step threshold is set to zero or greater than 0.5
- s.</dd>
- <dt><tt>stepout <i>stepout</i></tt></dt>
- <dd>Specifies the stepout threshold in seconds. The default without this
- command is 900 s. If set to zero, popcorn spikes will
- not be suppressed.</dd>
- </dl></dd>
- <dt id="tos"><tt>tos [ beacon <i>beacon</i> | ceiling <i>ceiling</i> | cohort {0 | 1} | floor <i>floor</i> | maxclock <i>maxclock </i>| maxdist <i>maxdist</i> | minclock <i>minclock</i> | mindist <i>mindist </i>| minsane <i>minsane</i> | orphan <i>stratum</i> ]</tt></dt>
- <dd>This command alters certain system variables used by the the clock selection and clustering algorithms. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. It can be used to select the quality and quantity of peers used to synchronize the system clock and is most useful in dynamic server discovery schemes. The options are as follows:</dd>
- <dd><dl>
- <dt><tt>beacon <i>beacon</i></tt></dt>
- <dd>The manycast server sends packets at intervals of 64 s if less than <tt>maxclock</tt> servers are available. Otherwise, it sends packets at the <i><tt>beacon</tt></i> interval in seconds. The default is 3600 s. See the <a href="manyopt.html">Automatic Server Discovery</a> page for further details.</dd>
- <dt><tt>ceiling <i>ceiling</i></tt></dt>
- <dd>Specify the maximum stratum (exclusive) for acceptable server packets. The default is 16. See the <a href="manyopt.html">Automatic Server Discovery</a> page for further details.</dd>
- <dt><tt>cohort { 0 | 1 }</tt></dt>
- <dd>Specify whether (1) or whether not (0) a server packet will be accepted for the same stratum as the client. The default is 0. See the <a href="manyopt.html">Automatic Server Discovery</a> page for further details.</dd>
- <dt><tt>floor <i>floor</i></tt></dt>
- <dd>Specify the minimum stratum (inclusive) for acceptable server packest. The default is 1. See the <a href="manyopt.html">Automatic Server Discovery</a> page for further details.</dd>
- <dt><tt>maxclock <i>maxclock</i></tt></dt>
- <dd>Specify the maximum number of servers retained by the server discovery schemes. The default is 10. See the <a href="manyopt.html">Automatic Server Discovery</a> page for further details.</dd>
- <dt><tt>maxdist <i>maxdistance</i></tt></dt>
- <dd>Specify the synchronization distance threshold used by the clock selection algorithm. The default is 1.5 s. This determines both the minimum number of packets to set the system clock and the maximum roundtrip delay. It can be decreased to improve reliability or increased to synchronize clocks on the Moon or planets.</dd>
- <dt><tt>minclock <i>minclock</i></tt></dt>
- <dd>Specify the number of servers used by the clustering algorithm as the minimum to include on the candidate list. The default is 3. This is also the number of servers to be averaged by the combining algorithm.</dd>
- <dt><tt>mindist <i>mindistance</i></tt></dt>
- <dd>Specify the minimum distance used by the selection and anticlockhop
- algorithm. Larger values increase the tolerance for outliers;
- smaller values increase the selectivity. The default is .001 s. In some
- cases, such as reference clocks with high jitter and a PPS signal, it is
- useful to increase the value to insure the intersection interval is
- always nonempty.</dd>
- <dt><tt>minsane <i>minsane</i></tt></dt>
- <dd>Specify the number of servers used by the selection algorithm as the minimum to set the system clock. The default is 1 for legacy purposes; however, for critical applications the value should be somewhat higher but less than <tt>minclock</tt>.</dd>
- <dt><tt>orphan <i>stratum</i></tt></dt>
- <dd>Specify the orphan stratum with default 16. If less than 16 this is the stratum assumed by the root servers. See the <a href="assoc.html">Association Management</a> page for further details.</dd>
- </dl></dd>
- <dt id="trap"><tt>trap <i>host_address</i> [port <i>port_number</i>] [interface <i>interfSace_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.</dd>
- <dd>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.</dd>
- <dt id="ttl"><tt>ttl <i>hop</i> ...</tt></dt>
- <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.</dd>
- </dl>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Miscellaneous Commands and Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Miscellaneous Commands and 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:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
+<hr>
+<h4>Commands and Options</h4>
+<dl>
+ <dt id="broadcastdelay"><tt>broadcastdelay <i>delay</i></tt></dt>
+ <dd>In broadcast and multicast modes, means are required to determine the network delay between the server and client. Ordinarily, this is done automatically by the initial calibration exchanges between the client and server. In some cases, the exchange might not be possible due to network or server access controls. The value of <em><tt>delay</tt></em> is by default zero, in which case the exchange is enabled. If <em><tt>delay</tt></em> is greater than zero, it becomes the roundtrip delay (s), as measured by the Unix <tt>ping</tt> program, and the exchange is disabled. </dd>
+ <dt>&nbsp;</dt>
+ <dt id="driftfile"><tt>driftfile <i>driftfile</i></tt></dt>
+ <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 line option. This command is mutually exclusive with the <tt>freq</tt> option of the <tt>tinker</tt> command.</dd>
+ <dd> If the file exists, it is read at startup in order to set the initial frequency and then updated once per hour or more 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.</dd>
+ <dd>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.</dd>
+ <dt id="enable"><tt>enable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</tt><br>
+ <tt>disable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</tt></dt>
+ <dd>Provides a way to enable or disable various system options. Flags not mentioned are unaffected. Note that most of these flags can be modified remotely using <a href="ntpq.html"><tt>ntpq</tt></a> utility program's <tt>:config</tt> and <tt>config-from-file</tt> commands.
+ <dl>
+ <dt><tt>auth</tt></dt>
+ <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.</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>calibrate</tt></dt>
+ <dd>Enables the calibrate feature for reference clocks. The default for this flag is disable.</dd>
+ <dt><tt>kernel</tt></dt>
+ <dd>Enables the kernel time discipline, if available. The default for this flag is enable if support is available, otherwise disable.</dd>
+ <dt><tt>mode7</tt></dt>
+ <dd>Enables processing of NTP mode 7 implementation-specific requests which are used by the deprecated <tt>ntpdc</tt> program. The default for this flag is disable. This flag is excluded from runtime configuration using <tt>ntpq</tt>. The <tt>ntpq</tt> program provides the same capabilities as <tt>ntpdc</tt> using standard mode 6 requests.</dd>
+ <dt><tt>monitor</tt></dt>
+ <dd>Enables the monitoring facility. See the <a href="ntpq.html"><tt>ntpq</tt> program</a> and the <tt>monstats</tt> and <tt>mrulist</tt> commands, as well as the <a href="accopt.html#discard">Access Control Options</a> for details.
+ The monitoring facility is also enabled by the presence of <a href="accopt.html#limited"><tt>limited</tt></a> in any <tt>restrict</tt> commands. The default for this flag is enable.</dd>
+ <dt><tt>ntp</tt></dt>
+ <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.</dd>
+ <dt><tt>stats</tt></dt>
+ <dd>Enables the statistics facility. See the <a href="monopt.html">Monitoring Options</a> page for further information. The default for this flag is enabled. This flag is excluded from runtime configuration using <tt>ntpq</tt>.</dd>
+ </dl>
+ </dd>
+ <dt id="includefile"><tt>includefile <i>includefile</i></tt></dt>
+ <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).</dd>
+ <dt id="interface"><tt>interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard | <i>name</i> | <i>address</i>[/<i>prefixlen</i>]]</tt></dt>
+ <dd>This command controls which network addresses <tt>ntpd</tt> opens, and whether input is dropped without processing. The first parameter determines the action for addresses which match the second parameter. That parameter specifies a class of addresses, or a specific interface name, or an address. In the address case, <tt><i>prefixlen</i></tt> determines how many bits must match for this rule to apply. <tt>ignore</tt> prevents opening matching addresses, <tt>drop</tt> causes <tt>ntpd</tt> to open the address and drop all received packets without examination. Multiple <tt>interface</tt> commands can be used. The last rule which matches a particular address determines the action for it. <tt>interface</tt> commands are disabled if any <a href="ntpd.html#--interface"><tt>-I</tt></a>, <a href="ntpd.html#--interface"><tt>--interface</tt></a>, <a href="ntpd.html#--novirtualips"><tt>-L</tt></a>, or <a href="ntpd.html#--novirtualips"><tt>--novirtualips</tt></a> command-line options are used. If none of those options are used and no <tt>interface</tt> actions are specified in the configuration file, all available network addresses are opened. The <tt>nic</tt> command is an alias for <tt>interface</tt>.</dd>
+ <dt id="leapfile"><tt>leapfile <i>leapfile</i></tt></dt>
+ <dd>This command loads the NIST leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from NIST national time servers using <tt>ftp</tt> as the ASCII file <tt>pub/leap-seconds</tt>.</dd>
+ <dd>The <i>leapfile</i> is scanned when <tt>ntpd</tt> processes the <tt>leapfile</tt> directive or when <tt>ntpd</tt> detects that <i>leapfile</i> has changed. <tt>ntpd</tt> checks once a day to see if the <i>leapfile</i> has changed.</dd>
+ <dd>While not strictly a security function, the Autokey protocol provides means to securely retrieve the current or updated leapsecond values from a server.</dd>
+ <dt id="logconfig"><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. 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>).</dd>
+ <dd>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. By default, <tt>logconfig</tt> output is set to <tt>allsync</tt>.</dd>
+ <dd>Thus, a minimal log configuration could look like this:</dd>
+ <dd><tt>logconfig=syncstatus +sysevents</tt></dd>
+ <dd>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:</dd>
+ <dd><tt>logconfig=syncall +clockall</tt></dd>
+ <dd>This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.</dd>
+ <dt id="logfile"><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. This is the same operation as the <tt>-l </tt>command line option.</dd>
+ <dt id="mru"><tt>mru [maxdepth <i>count</i> | maxmem <i>kilobytes</i> | mindepth <i>count</i> | maxage <i>seconds</i> | initalloc <i>count</i> | initmem <i>kilobytes</i> | incalloc <i>count</i> | incmem <i>kilobytes</i>]</tt></dt>
+ <dd>Controls size limits of the monitoring facility Most Recently Used <a href="ntpq.html#mrulist">(MRU) list</a> of client addresses, which is also used by the <a href="accopt.html#discard">rate control facility</a>.
+ <dl>
+ <dt><tt>maxdepth <i>count</i><br>
+ maxmem <i>kilobytes</i></tt></dt>
+ <dd>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes. The actual limit will be up to <tt>incalloc</tt> entries or <tt>incmem</tt> kilobytes larger. As with all
+ of the <tt>mru</tt> options offered in units of entries or kilobytes, if both <tt>maxdepth</tt> and <tt>maxmem</tt> are used, the last one used controls. The default is 1024 kilobytes.</dd>
+ <dt><tt>mindepth <i>count</i></tt></dt>
+ <dd>Lower limit on the MRU list size. When the MRU list has fewer than <tt>mindepth</tt> entries, existing entries are never removed to make room for newer ones, regardless of their age.
+ The default is 600 entries.</dd>
+ <dt><tt>maxage <i>seconds</i></tt></dt>
+ <dd>Once the MRU list has <tt>mindepth</tt> entries and an additional client address is to be added to the list, if the oldest entry was updated more than <tt>maxage</tt> seconds ago, that entry
+ is removed and its storage reused. If the oldest entry was updated more recently, the MRU list
+ is grown, subject to <tt>maxdepth</tt>/<tt>maxmem</tt>. The default is 64 seconds.</dd>
+ <dt><tt>initalloc <i>count</i><br>
+ initmem <i>kilobytes</i></tt></dt>
+ <dd>Initial memory allocation at the time the monitoring facility is first enabled, in terms of entries or kilobytes. The default is 4 kilobytes.</dd>
+ <dt><tt>incalloc <i>count</i><br>
+ incmem <i>kilobytes</i></tt></dt>
+ <dd>Size of additional memory allocations when growing the MRU list, in entries or kilobytes. The default is 4 kilobytes.</dd>
+ </dl>
+ </dd>
+ <dt id="nonvolatile"><tt>nonvolatile <i>threshold</i></tt></dt>
+ <dd>Specify the <i><tt>threshold</tt></i> in PPM to write the frequency file, with default 0.1 PPM. The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
+ <dt id="phone"><tt>phone <i>dial</i> ...</tt></dt>
+ <dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
+ <dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
+ <dd>Reset one or more groups of counters maintained by ntpd and exposed by <tt>ntpq</tt> and <tt>ntpdc</tt>.</dd>
+ <dt id="saveconfigdir"><tt>saveconfigdir <i>directory_path</i></tt></dt>
+ <dd>Specify the directory in which to write configuration snapshots requested with <tt>ntpq</tt>'s <a href="ntpq.html#saveconfig">saveconfig</a> command. If <tt>saveconfigdir</tt> does not appear in the configuration file, saveconfig requests are rejected by ntpd.</dd>
+ <dt id="setvar"><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 id="tinker"><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></dt>
+ <dd>This command alters certain system variables used by the clock discipline algorithm. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. Options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>allan <i>allan</i></tt></dt>
+ <dd>Specifies the Allan intercept, which is a parameter of the PLL/FLL clock discipline algorithm, in seconds with default 1500 s.</dd>
+ <dt><tt>dispersion <i>dispersion</i></tt></dt>
+ <dd>Specifies the dispersion increase rate in parts-per-million (PPM) with default 15 PPM.</dd>
+ <dt><tt>freq <i>freq</i></tt></dt>
+ <dd>Specifies the frequency offset in parts-per-million (PPM). This option is mutually exclusive with the driftfile command.</dd>
+ <dt><tt>huffpuff <i>huffpuff</i></tt></dt>
+ <dd>Specifies the 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 min), but a more reasonable value is 7200 (2 hours).See the <a href="huffpuff.html">Huff-n'-Puff Filter</a> page for further information.</dd>
+ <dt><tt>panic <i>panic</i></tt></dt>
+ <dd>Specifies the panic threshold in seconds with default 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>step <i>step</i></tt></dt>
+ <dd>Specifies the step threshold in seconds. The default without this command is 0.128 s. If set to zero, step adjustments will never occur. Note: The kernel time discipline is disabled if the step threshold is set to zero or greater than 0.5
+ s. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
+ <dt><tt>stepout <i>stepout</i></tt></dt>
+ <dd>Specifies the stepout threshold in seconds. The default without this command is 300 s. Since this option also affects the training and startup intervals, it should not be set less than the default. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
+ </dl>
+ </dd>
+ <dt id="rlimit"><tt>rlimit [memlock <i>Nmegabytes</i> | stacksize <i>N4kPages</i> | filenum <i>Nfiledescriptors</i>]</tt></dt>
+ <dd>This command alters certain process storage allocation limits, and is only available on some operating systems. Options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>memlock <i>Nmegabytes</i></tt></dt>
+ <dd>Specify the number of megabytes of memory that can be allocated. Probably only available under Linux, this option is useful when dropping root (the <tt>-i</tt> option). The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.</dd>
+ <dt><tt>stacksize <i>N4kPages</i></tt></dt>
+ <dd>Specifies the maximum size of the process stack on systems with the <tt>mlockall()</tt> function. Defaults to 50 4k pages (200 4k pages in OpenBSD).</dd>
+ <dt><tt>filenum <i>Nfiledescriptors</i></tt></dt>
+ <dd>Specifies the maximum number of file descriptors ntp may have open at the same time. Defaults to system default.</dd>
+ </dl>
+ </dd>
+ <dt id="tos"><tt>tos [beacon <i>beacon</i> | ceiling <i>ceiling</i> | cohort {0 | 1} | floor <i>floor</i> | maxclock <i>maxclock </i>| maxdist <i>maxdist</i> | minclock <i>minclock</i> | mindist <i>mindist </i>| minsane <i>minsane</i> | orphan <i>stratum</i> | orphanwait <em>delay</em>]</tt></dt>
+ <dd>This command alters certain system variables used by the the clock selection and clustering algorithms. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. It can be used to select the quality and quantity of peers used to synchronize the system clock and is most useful in dynamic server discovery schemes. The options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>beacon <i>beacon</i></tt></dt>
+ <dd>The manycast server sends packets at intervals of 64 s if less than <tt>maxclock</tt> servers are available. Otherwise, it sends packets at the <i><tt>beacon</tt></i> interval in seconds. The default is 3600 s. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>ceiling <i>ceiling</i></tt></dt>
+ <dd>Specify the maximum stratum (exclusive) for acceptable server packets. The default is 16. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>cohort { 0 | 1 }</tt></dt>
+ <dd>Specify whether (1) or whether not (0) a server packet will be accepted for the same stratum as the client. The default is 0. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>floor <i>floor</i></tt></dt>
+ <dd>Specify the minimum stratum (inclusive) for acceptable server packets. The default is 1. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>maxclock <i>maxclock</i></tt></dt>
+ <dd>Specify the maximum number of servers retained by the server discovery schemes. The default is 10. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>maxdist <i>maxdistance</i></tt></dt>
+ <dd>Specify the synchronization distance threshold used by the clock selection algorithm. The default is 1.5 s. This determines both the minimum number of packets to set the system clock and the maximum roundtrip delay. It can be decreased to improve reliability or increased to synchronize clocks on the Moon or planets.</dd>
+ <dt><tt>minclock <i>minclock</i></tt></dt>
+ <dd>Specify the number of servers used by the clustering algorithm as the minimum to include on the candidate list. The default is 3. This is also the number of servers to be averaged by the combining algorithm.</dd>
+ <dt><tt>mindist <i>mindistance</i></tt></dt>
+ <dd>Specify the minimum distance used by the selection and anticlockhop
+ algorithm. Larger values increase the tolerance for outliers;
+ smaller values increase the selectivity. The default is .001 s. In some
+ cases, such as reference clocks with high jitter and a PPS signal, it is
+ useful to increase the value to insure the intersection interval is
+ always nonempty.</dd>
+ <dt><tt>minsane <i>minsane</i></tt></dt>
+ <dd>Specify the number of servers used by the selection algorithm as the minimum to set the system clock. The default is 1 for legacy purposes; however, for critical applications the value should be somewhat higher but less than <tt>minclock</tt>.</dd>
+ <dt><tt>orphan <i>stratum</i></tt></dt>
+ <dd>Specify the orphan stratum with default 16. If less than 16 this is the stratum assumed by the root servers. See the <a href="orphan.html">Orphan Mode</a> page for further details.</dd>
+ <dt><tt>orphanwait <em>delay</em></tt></dt>
+ <dd>Specify the delay in seconds from the time all sources are lost until orphan parent mode is enabled with default 300 s (five minutes). During this period, the local clock driver and the modem driver are not selectable, unless marked with the <tt>prefer</tt> keyword. This allows time for one or more primary sources to become reachable and selectable before using backup sources, and avoids transient use of the backup sources at startup.</dd>
+ </dl>
+ </dd>
+ <dt id="trap"><tt>trap <i>host_address</i> [port <i>port_number</i>] [interface <i>interfSace_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.</dd>
+ <dd>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.</dd>
+ <dt id="ttl"><tt>ttl <i>hop</i> ...</tt></dt>
+ <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.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
</html>
diff --git a/html/monopt.html b/html/monopt.html
index cd9f3c656a61..acf48473aa70 100644
--- a/html/monopt.html
+++ b/html/monopt.html
@@ -7,511 +7,558 @@
<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>
+<h3>Monitoring Commands and Options</h3>
+<img src="pic/pogo8.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html"></a> from <i>Pogo</i>, Walt Kelly</a>
<p>Pig was hired to watch the logs.</p>
<p>Last update:
- <!-- #BeginDate format:En2m -->10-May-2009 16:19<!-- #EndDate -->
- UTC</p>
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/monopt.txt"></script>
<h4>Table of Contents</h4>
<ul>
- <li class="inline"><a href="#intro">introduction</a></li>
- <li class="inline"><a href="#cmd">Monitoring Options</a></li>
- <li class="inline"><a href="#types">File Set Types</a></li>
+ <li class="inline"><a href="#intro">Naming Conventions</a></li>
+ <li class="inline"><a href="#cmd">Monitoring Commands and Options</a></li>
+ <li class="inline"><a href="#types">File Set Types</a></li>
</ul>
<hr>
-<h4 id="intro">Introduction</h4>
+<h4 id="intro">Naming Conventions</h4>
<p>The <tt>ntpd</tt> includes a comprehensive monitoring facility which collects
- statistical data of various types and writes the data to files associated with
- each type at defined events or intervals. The files associated with a particular
- type are collectively called the generation file set for that type. The files
- in the file set are the members of that set.</p>
+ statistical data of various types and writes the data to files associated with
+ each type at defined events or intervals. The files associated with a particular
+ type are collectively called the generation file set for that type. The files
+ in the file set are the members of that set.</p>
<p>File sets have names specific to the type and generation epoch. The names
- are constructed from three concatenated elements <i><tt>prefix</tt></i>, <i><tt>filename</tt></i> and <i><tt>suffix</tt></i>:</p>
+ are constructed from three concatenated elements <i><tt>prefix</tt></i>, <i><tt>filename</tt></i> and <i><tt>suffix</tt></i>:</p>
<dl>
- <dt><i><tt>prefix</tt></i></dt>
- <dd>The directory path specified in the <tt>statsdir</tt> command.</dd>
- <dt><i><tt>name</tt></i></dt>
- <dd>The name specified by the <tt>file</tt> option of the <tt>filegen</tt> command.</dd>
- <dt><i><tt>suffix</tt></i></dt>
- <dd>A string of elements bdginning with . (dot) followed by a number of elements
- depending on the file set type.</dd>
+ <dt><i><tt>prefix</tt></i></dt>
+ <dd>The directory path specified in the <tt>statsdir</tt> command.</dd>
+ <dt><i><tt>name</tt></i></dt>
+ <dd>The name specified by the <tt>file</tt> option of the <tt>filegen</tt> command.</dd>
+ <dt><i><tt>suffix</tt></i></dt>
+ <dd>A string of elements bdginning with . (dot) followed by a number of elements
+ depending on the file set type.</dd>
</dl>
<p>Statistics files can be managed using scripts, examples of which are in the <tt>./scripts</tt> directory.
- Using these or similar scripts and Unix <tt>cron</tt> jobs, the files can be
- automatically summarized and archived for retrospective analysis.</p>
-<h4 id="cmd">Monitoring Commands</h4>
-<dl>
- <dt id="filegen"><tt>filegen <i>name</i> file <i>filename</i> [type <i>type</i>]
- [link | nolink] [enable | disable]</tt></dt>
- <dd>
- <dl>
- <dt><i><tt>name</tt></i></dt>
- <dd>Specifies the file set type from the list in the next section.</dd>
- <dt><tt>file <i>filename</i></tt></dt>
- <dd>Specfies the file set name.</dd>
- <dt><tt>type <i>typename</i></tt></dt>
- <dd>Specifies the file set interval. The following intervals are supported
- with default <tt>day</tt>:</dd>
- <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 file set member is created for every incarnation of <tt>ntpd</tt>.
- The file name suffix is the string .<tt>n</tt>, where <tt>n</tt> is the
- process ID of the <tt>ntpd</tt> server process.</dd>
- <dt><tt>day</tt></dt>
- <dd>One file set member is created per day. A day is defined as the period
- between 00:00 and 23:59 UTC. The file name suffix is the string .<tt>yyyymmdd</tt>,
- where <tt>yyyy</tt> is the year, <tt>mm</tt> the month of the year and <tt>dd</tt> the
- day of the month. Thus, member created on 10 December 1992 would have suffix <tt>.19921210</tt>.</dd>
- <dt><tt>week</tt></dt>
- <dd>One file set member is created per week. The week is defined as the
- day of year modulo 7. The file name suffix is the string .<tt>yyyyWww</tt>,
- where <tt>yyyy</tt> is the year, <tt>W</tt> stands for itself and <tt>ww</tt> the
- week number starting from 0. For example, The member created on 10 January
- 1992 would have suffix <tt>.1992W1</tt>.</dd>
- <dt><tt>month</tt></dt>
- <dd>One file set member is created per month. The file name suffix is the
- string .<tt>yyyymm</tt>, where <tt>yyyy</tt> is the year and <tt>mm</tt> the
- month of the year starting from 1. For example, The member created on 10
- January 1992 would have suffix <tt>.199201</tt>.</dd>
- <dt><tt>year</tt></dt>
- <dd>One file set member is generated per year. The file name suffix is the
- string .<tt>yyyy</tt>, where <tt>yyyy</tt> is the year. For example, The
- member created on 1 January 1992 would have suffix <tt>.1992</tt>.</dd>
- <dt><tt>age</tt></dt>
- <dd>One file set member is generated every 24 hours of <tt>ntpd</tt> operation.
- The filename suffix is the string <tt>.adddddddd</tt>, where <tt>a</tt> stands
- for itself and <tt>dddddddd</tt> is the <tt>ntpd</tt> running time in seconds
- at the start of the corresponding 24-hour period.</dd>
- </dl>
- </dd>
- <dt><tt>link | nolink</tt></dt>
- <dd>It is convenient to be able to access the current file set members by
- file name, but without the suffix. This feature is enabled by <tt>link</tt> and
- disabled by <tt>nolink</tt>. If enabled, which is the default, a hard link
- from the current file set member to a file without suffix is created. When
- there is already a file with this name and the number of links to this file
- is one, it is renamed by 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>
- <dt><tt>enable | disable</tt></dt>
- <dd>Enable or disable the recording function, with default <tt>enable</tt>.
- These options are intended for remote configutation commands.</dd>
- </dl>
- </dd>
- <dt><tt>statsdir <i>directory_path</i></tt></dt>
- <dd>Specify the directory path prefix for statistics file names.</dd>
+ Using these or similar scripts and Unix <tt>cron</tt> jobs, the files can be
+ automatically summarized and archived for retrospective analysis.</p>
+<h4 id="cmd">Monitoring Commands and Options</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="decode.html">Event Messages and Status Codes</a> page.</p></a> page.</p><dl>
+ <dt id="filegen"><tt>filegen <i>name</i> [file <i>filename</i>] [type <i>type</i>]
+ [link | nolink] [enable | disable]</tt></dt>
+ <dd>
+ <dl>
+ <dt><i><tt>name</tt></i></dt>
+ <dd>Specifies the file set type from the list in the next section.</dd>
+ <dt><tt>file <i>filename</i></tt></dt>
+ <dd>Specifies the filename prefix. The default is the file set type, such as "loopstats".</dd>
+ <dt><tt>type <i>typename</i></tt></dt>
+ <dd>Specifies the file set interval. The following intervals are supported
+ with default <tt>day</tt>:</dd>
+ <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 file set member is created for every incarnation of <tt>ntpd</tt>.
+ The file name suffix is the string .<tt>n</tt>, where <tt>n</tt> is the
+ process ID of the <tt>ntpd</tt> server process.</dd>
+ <dt><tt>day</tt></dt>
+ <dd>One file set member is created per day. A day is defined as the period
+ between 00:00 and 23:59 UTC. The file name suffix is the string .<tt>yyyymmdd</tt>,
+ where <tt>yyyy</tt> is the year, <tt>mm</tt> the month of the year and <tt>dd</tt> the
+ day of the month. Thus, member created on 10 December 1992 would have suffix <tt>.19921210</tt>.</dd>
+ <dt><tt>week</tt></dt>
+ <dd>One file set member is created per week. The week is defined as the
+ day of year modulo 7. The file name suffix is the string .<tt>yyyyWww</tt>,
+ where <tt>yyyy</tt> is the year, <tt>W</tt> stands for itself and <tt>ww</tt> the
+ week number starting from 0. For example, The member created on 10 January
+ 1992 would have suffix <tt>.1992W1</tt>.</dd>
+ <dt><tt>month</tt></dt>
+ <dd>One file set member is created per month. The file name suffix is the
+ string .<tt>yyyymm</tt>, where <tt>yyyy</tt> is the year and <tt>mm</tt> the
+ month of the year starting from 1. For example, The member created on 10
+ January 1992 would have suffix <tt>.199201</tt>.</dd>
+ <dt><tt>year</tt></dt>
+ <dd>One file set member is generated per year. The file name suffix is the
+ string .<tt>yyyy</tt>, where <tt>yyyy</tt> is the year. For example, The
+ member created on 1 January 1992 would have suffix <tt>.1992</tt>.</dd>
+ <dt><tt>age</tt></dt>
+ <dd>One file set member is generated every 24 hours of <tt>ntpd</tt> operation.
+ The filename suffix is the string <tt>.adddddddd</tt>, where <tt>a</tt> stands
+ for itself and <tt>dddddddd</tt> is the <tt>ntpd</tt> running time in seconds
+ at the start of the corresponding 24-hour period.</dd>
+ </dl>
+ </dd>
+ <dt><tt>link | nolink</tt></dt>
+ <dd>It is convenient to be able to access the current file set members by
+ file name, but without the suffix. This feature is enabled by <tt>link</tt> and
+ disabled by <tt>nolink</tt>. If enabled, which is the default, a hard link
+ from the current file set member to a file without suffix is created. When
+ there is already a file with this name and the number of links to this file
+ is one, it is renamed by 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>
+ <dt><tt>enable | disable</tt></dt>
+ <dd>Enable or disable the recording function, with default <tt>enable</tt>.
+ These options are intended for remote configuration commands.</dd>
+ </dl>
+ </dd>
+ <dt id="statistics"><tt>statistics <i>name</i>...</tt></dt>
+ <dd>Enables writing of statistics records. Currently, eight kinds of
+ statistics are supported: <i>name</i>s specify the file set type(s) from
+ the list in the next section.</dd>
+ <dt id="statsdir"><tt>statsdir <i>directory_path</i></tt></dt>
+ <dd>Specify the directory path prefix for statistics file names.</dd>
</dl>
<h4 id="types">File Set Types</h4>
<dl>
- <dt><tt>clockstats</tt></dt>
- <dd>Record reference clock statistics. Each update received from a reference
- clock driver appends one line to the <tt>clockstats</tt> file set:</dd>
- <dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>49213</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>525.624</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>127.127.4.1</tt></td>
- <td>IP</td>
- <td>reference clock address</td>
- </tr>
- <tr>
- <td><tt><i>message</i></tt></td>
- <td>text</td>
- <td>log message</td>
- </tr>
- </table>
- </dd>
- <dd>The <tt><i>message</i></tt> field includes the last timecode received in
- decoded ASCII format, where meaningful. In some cases a good deal of additional
- information is displayed. See information specific to each reference clock
- for further details.</dd>
- <dt><tt>cryptostats</tt></dt>
- <dd>Record significant events in the Autokey protocol. This option requires
- the OpenSSL cryptographic software library. Each event appends one line to
- the <tt>cryptostats</tt> file set:</dd>
- <dd><tt>49213 525.624 128.4.1.1 <i>message</i></tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>49213</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>525.624</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>128.4.1.1</tt></td>
- <td>IP</td>
- <td>source address (<tt>0.0.0.0</tt> for system)</td>
- </tr>
- <tr>
- <td><tt><i>message</i></tt></td>
- <td>text</td>
- <td>log message</td>
- </tr>
- </table>
- </dd>
- <dd>The <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.</dd>
- <dt><tt>loopstats</tt></dt>
- <dd>Record clock discipline loop statistics. Each system clock update appends
- one line to the <tt>loopstats</tt> file set:</dd>
- <dd><tt>50935 75440.031 0.000006019 13.778 0.000351733 0.013380 6</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>50935</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>75440.031</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>0.000006019</tt></td>
- <td>s</td>
- <td>clock offset</td>
- </tr>
- <tr>
- <td><tt>13.778</tt></td>
- <td>PPM</td>
- <td>frequency offset</td>
- </tr>
- <tr>
- <td><tt>0.000351733</tt></td>
- <td>s</td>
- <td>RMS jitter</td>
- </tr>
- <tr>
- <td><tt>0.013380</tt></td>
- <td>PPM</td>
- <td>RMS&nbsp;frequency jitter (aka wander)</td>
- </tr>
- <tr>
- <td><tt>6 </tt></td>
- <td>log<sub>2</sub> s</td>
- <td>clock discipline loop time constant</td>
- </tr>
- </table>
- </dd>
- <dt><tt>peerstats</tt></dt>
- <dd>Record peer statistics. Each NTP packet or reference clock update received
- appends one line to the <tt>peerstats</tt> file set:</dd>
- <dd><tt>48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877
- 0.000958674</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>48773</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>10847.650</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>127.127.4.1</tt></td>
- <td>IP</td>
- <td>source address</td>
- </tr>
- <tr>
- <td><tt>9714</tt></td>
- <td>hex</td>
- <td>status word</td>
- </tr>
- <tr>
- <td><tt>-0.001605376</tt></td>
- <td>s</td>
- <td>clock offset</td>
- </tr>
- <tr>
- <td><tt>0.000000000 </tt></td>
- <td>s</td>
- <td>roundtrip delay</td>
- </tr>
- <tr>
- <td><tt>0.001424877</tt></td>
- <td>s</td>
- <td>dispersion</td>
- </tr>
- <tr>
- <td><tt>0.000958674</tt></td>
- <td>s</td>
- <td>RMS&nbsp;jitter</td>
- </tr>
- </table>
- </dd>
- <dd>The status field is encoded in hex format as described in Appendix B of
- the NTP specification RFC 1305.</dd>
- <dt><tt>protostats</tt></dt>
- <dd>Record significant peer, system and [rptpcp; events. Each significant event
- appends one line to the <tt>protostats</tt> file set:</dd>
- <dd><tt>49213 525.624 128.4.1.1 963a 8a <i>message</i></tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>49213</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>525.624</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>128.4.1.1</tt></td>
- <td>IP</td>
- <td>source address (<tt>0.0.0.0</tt> for system)</td>
- </tr>
- <tr>
- <td><tt>963a</tt></td>
- <td>code</td>
- <td>status word</td>
- </tr>
- <tr>
- <td><tt>8a</tt></td>
- <td>code</td>
- <td>event message code</td>
- </tr>
- <tr>
- <td><tt><i>message</i></tt></td>
- <td>text</td>
- <td>event message</td>
- </tr>
- </table>
- </dd>
- <dd>The event message code and <tt><i>message</i></tt> field are described on
- the <a href="decode.html">Event Messages and Status Words</a> page.</dd>
- <dt><tt>rawstats</tt></dt>
- <dd>Record timestamp statistics. Each NTP packet received appends one line to
- the <tt>rawstats</tt> file set:</dd>
- <dd><tt>50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031
- 02453332.540806000 3102453332.541458000</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>50928</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>2132.543</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>128.4.1.1</tt></td>
- <td>IP</td>
- <td>source address</td>
- </tr>
- <tr>
- <td><tt>128.4.1.20</tt></td>
- <td>IP</td>
- <td>destination address</td>
- </tr>
- <tr>
- <td><tt>3102453281.584327000</tt></td>
- <td>NTP&nbsp;s</td>
- <td>origin timestamp</td>
- </tr>
- <tr>
- <td><tt>3102453281.586228000</tt></td>
- <td>NTP s</td>
- <td>receive timestamp</td>
- </tr>
- <tr>
- <td><tt>3102453332.540806000 </tt></td>
- <td>NTP s</td>
- <td>transmit timestamp</td>
- </tr>
- <tr>
- <td><tt>3102453332.541458000</tt></td>
- <td>NTP&nbsp;s</td>
- <td>destination timestamp</td>
- </tr>
- </table>
- </dd>
- <dt><tt>sysstats</tt></dt>
- <dd>Record system statistics. Each hour one line is appended to the <tt>sysstats</tt> file
- set in the following format:</dd>
- <dd><tt>50928 2132.543 3600 81965 0 9546 56 512 540 10 4 147 1</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>50928</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>2132.543</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>3600</tt></td>
- <td>s</td>
- <td>time since reset</td>
- </tr>
- <tr>
- <td><tt>81965</tt></td>
- <td>#</td>
- <td>packets received</td>
- </tr>
- <tr>
- <td><tt>0</tt></td>
- <td>#</td>
- <td>packets for this host</td>
- </tr>
- <tr>
- <td><tt>9546</tt></td>
- <td>#</td>
- <td>current versions</td>
- </tr>
- <tr>
- <td><tt>56</tt></td>
- <td>#</td>
- <td>old version</td>
- </tr>
- <tr>
- <td><tt>512</tt></td>
- <td>#</td>
- <td>access denied</td>
- </tr>
- <tr>
- <td><tt>540</tt></td>
- <td>#</td>
- <td>bad length or format</td>
- </tr>
- <tr>
- <td><tt>10</tt></td>
- <td>#</td>
- <td>bad authentication</td>
- </tr>
- <tr>
- <td><tt>4</tt></td>
- <td>#</td>
- <td>declined</td>
- </tr>
- <tr>
- <td><tt>147</tt></td>
- <td>#</td>
- <td>rate exceeded</td>
- </tr>
- <tr>
- <td><tt>1</tt></td>
- <td>#</td>
- <td>kiss-o'-death packets sent</td>
- </tr>
- </table>
- </dd>
- <dt><tt>timingstats</tt></dt>
- <dd>(Only available when the deamon is compiled with process time debugging
- support (--enable-debug-timing - costs performance). Record processing time
- statistics for various selected code paths.</dd>
- <dd><tt>53876 36.920 10.0.3.5 1 0.000014592 input processing delay</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Item</td>
- <td>Units</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>53876</tt></td>
- <td>MJD</td>
- <td>date</td>
- </tr>
- <tr>
- <td><tt>36.920</tt></td>
- <td>s</td>
- <td>time past midnight</td>
- </tr>
- <tr>
- <td><tt>10.0.3.5</tt></td>
- <td>IP</td>
- <td>server address</td>
- </tr>
- <tr>
- <td><tt>1</tt></td>
- <td>#</td>
- <td>event count</td>
- </tr>
- <tr>
- <td><tt>0.000014592</tt></td>
- <td>s</td>
- <td>total time</td>
- </tr>
- <tr>
- <td><tt><i>message</i></tt></td>
- <td>text</td>
- <td>code path description (see source)</td>
- </tr>
- </table>
- </dd>
+ <dt><tt>clockstats</tt></dt>
+ <dd>Record reference clock statistics. Each update received from a reference
+ clock driver appends one line to the <tt>clockstats</tt> file set:</dd>
+ <dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>127.127.4.1</tt></td>
+ <td>IP</td>
+ <td>reference clock address</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>log message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The <tt><i>message</i></tt> field includes the last timecode received in
+ decoded ASCII format, where meaningful. In some cases a good deal of additional
+ information is displayed. See information specific to each reference clock
+ for further details.</dd>
+ <dt><tt>cryptostats</tt></dt>
+ <dd>Record significant events in the Autokey protocol. This option requires
+ the OpenSSL cryptographic software library. Each event appends one line to
+ the <tt>cryptostats</tt> file set:</dd>
+ <dd><tt>49213 525.624 128.4.1.1 <i>message</i></tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address (<tt>0.0.0.0</tt> for system)</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>log message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The <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.</dd>
+ <dt><tt>loopstats</tt></dt>
+ <dd>Record clock discipline loop statistics. Each system clock update appends
+ one line to the <tt>loopstats</tt> file set:</dd>
+ <dd><tt>50935 75440.031 0.000006019 13.778 0.000351733 0.013380 6</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>50935</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>75440.031</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>0.000006019</tt></td>
+ <td>s</td>
+ <td>clock offset</td>
+ </tr>
+ <tr>
+ <td><tt>13.778</tt></td>
+ <td>PPM</td>
+ <td>frequency offset</td>
+ </tr>
+ <tr>
+ <td><tt>0.000351733</tt></td>
+ <td>s</td>
+ <td>RMS jitter</td>
+ </tr>
+ <tr>
+ <td><tt>0.013380</tt></td>
+ <td>PPM</td>
+ <td>RMS&nbsp;frequency jitter (aka wander)</td>
+ </tr>
+ <tr>
+ <td><tt>6 </tt></td>
+ <td>log<sub>2</sub> s</td>
+ <td>clock discipline loop time constant</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>peerstats</tt></dt>
+ <dd>Record peer statistics. Each NTP packet or reference clock update received
+ appends one line to the <tt>peerstats</tt> file set:</dd>
+ <dd><tt>48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877
+ 0.000958674</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>48773</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>10847.650</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>127.127.4.1</tt></td>
+ <td>IP</td>
+ <td>source address</td>
+ </tr>
+ <tr>
+ <td><tt>9714</tt></td>
+ <td>hex</td>
+ <td>status word</td>
+ </tr>
+ <tr>
+ <td><tt>-0.001605376</tt></td>
+ <td>s</td>
+ <td>clock offset</td>
+ </tr>
+ <tr>
+ <td><tt>0.000000000 </tt></td>
+ <td>s</td>
+ <td>roundtrip delay</td>
+ </tr>
+ <tr>
+ <td><tt>0.001424877</tt></td>
+ <td>s</td>
+ <td>dispersion</td>
+ </tr>
+ <tr>
+ <td><tt>0.000958674</tt></td>
+ <td>s</td>
+ <td>RMS&nbsp;jitter</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The status field is encoded in hex format as described in Appendix B of
+ the NTP specification RFC 1305.</dd>
+ <dt><tt>protostats</tt></dt>
+ <dd>Record significant peer, system and [rptpcp; events. Each significant event
+ appends one line to the <tt>protostats</tt> file set:</dd>
+ <dd><tt>49213 525.624 128.4.1.1 963a 8a <i>message</i></tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address (<tt>0.0.0.0</tt> for system)</td>
+ </tr>
+ <tr>
+ <td><tt>963a</tt></td>
+ <td>code</td>
+ <td>status word</td>
+ </tr>
+ <tr>
+ <td><tt>8a</tt></td>
+ <td>code</td>
+ <td>event message code</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>event message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The event message code and <tt><i>message</i></tt> field are described on
+ the <a href="decode.html">Event Messages and Status Words</a> page.</dd>
+ <dt><tt>rawstats</tt></dt>
+ <dd>Record timestamp statistics. Each NTP packet received appends one line to
+ the <tt>rawstats</tt> file set:</dd>
+ <dd><tt>56285 54575.160 128.4.1.1 192.168.1.5 3565350574.400229473 3565350574.442385200 3565350574.442436000 3565350575.154505763 0 4 4 1 8 -21 0.000000 0.000320 .PPS.</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>56285</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>54575.160</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address</td>
+ </tr>
+ <tr>
+ <td><tt>192.168.1.5</tt></td>
+ <td>IP</td>
+ <td>destination address</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.400229473</tt></td>
+ <td>NTP&nbsp;s</td>
+ <td>origin timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.442385200</tt></td>
+ <td>NTP s</td>
+ <td>receive timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.442436000</tt></td>
+ <td>NTP s</td>
+ <td>transmit timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350575.154505763</tt></td>
+ <td>NTP&nbsp;s</td>
+ <td>destination timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td>0: OK, 1: insert pending,<br>2: delete pending, 3: not synced</td>
+ <td>leap warning indicator</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>4 was current in 2012</td>
+ <td>NTP version</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>3: client, 4: server, 5: broadcast</td>
+ <td>mode</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>1-15, 16: not synced</td>
+ <td>stratum</td>
+ </tr>
+ <tr>
+ <td><tt>8</tt></td>
+ <td>log<sub>2</sub> seconds</td>
+ <td>poll</td>
+ </tr>
+ <tr>
+ <td><tt>-21</tt></td>
+ <td>log<sub>2</sub> seconds</td>
+ <td>precision</td>
+ </tr>
+ <tr>
+ <td><tt>0.000000</tt></td>
+ <td>seconds</td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>0.000320</tt></td>
+ <td>seconds</td>
+ <td>total dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>PPS.</tt></td>
+ <td>IP or text</td>
+ <td>refid, association ID</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>sysstats</tt></dt>
+ <dd>Record system statistics. Each hour one line is appended to the <tt>sysstats</tt> file
+ set in the following format:</dd>
+ <dd><tt>50928 2132.543 3600 81965 0 9546 56 512 540 10 4 147 1</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>50928</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>2132.543</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>3600</tt></td>
+ <td>s</td>
+ <td>time since reset</td>
+ </tr>
+ <tr>
+ <td><tt>81965</tt></td>
+ <td>#</td>
+ <td>packets received</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td>#</td>
+ <td>packets for this host</td>
+ </tr>
+ <tr>
+ <td><tt>9546</tt></td>
+ <td>#</td>
+ <td>current versions</td>
+ </tr>
+ <tr>
+ <td><tt>56</tt></td>
+ <td>#</td>
+ <td>old version</td>
+ </tr>
+ <tr>
+ <td><tt>512</tt></td>
+ <td>#</td>
+ <td>access denied</td>
+ </tr>
+ <tr>
+ <td><tt>540</tt></td>
+ <td>#</td>
+ <td>bad length or format</td>
+ </tr>
+ <tr>
+ <td><tt>10</tt></td>
+ <td>#</td>
+ <td>bad authentication</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>#</td>
+ <td>declined</td>
+ </tr>
+ <tr>
+ <td><tt>147</tt></td>
+ <td>#</td>
+ <td>rate exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>#</td>
+ <td>kiss-o'-death packets sent</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>timingstats</tt></dt>
+ <dd>(Only available when the deamon is compiled with process time debugging
+ support (--enable-debug-timing - costs performance). Record processing time
+ statistics for various selected code paths.</dd>
+ <dd><tt>53876 36.920 10.0.3.5 1 0.000014592 input processing delay</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>53876</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>36.920</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>10.0.3.5</tt></td>
+ <td>IP</td>
+ <td>server address</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>#</td>
+ <td>event count</td>
+ </tr>
+ <tr>
+ <td><tt>0.000014592</tt></td>
+ <td>s</td>
+ <td>total time</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>code path description (see source)</td>
+ </tr>
+ </table>
+ </dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
diff --git a/html/msyslog.html b/html/msyslog.html
index 476cad27baa8..affa088a32c1 100644
--- a/html/msyslog.html
+++ b/html/msyslog.html
@@ -1,125 +1,129 @@
<!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="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/flatheads.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 log can be shrill at times.</p>
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">02:22</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="252">Monday, March 03, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <p><script type="text/javascript" language="javascript" src="scripts/install.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><tt>buffer overflow ?
- </tt>
- <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.
- <p><tt><b>LOG_INFO</b></tt></p>
- <dt><tt>proto_config: illegal item ?, value ?</tt>
- <dd>Program error. Bugs can be reported <a href="bugs.html">here</a>.
- <dt><tt>receive:&nbsp;autokey requires two-way communication</tt>
- <dd>Configuration error on the <tt>broadcastclient</tt> command.
- <dt><tt>receive: server <i>server</i> maaximum rate exceeded</tt>
- <dd>A kiss-o'death packet has been received. The transmit rate is automatically reduced.<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 encryption key is not defined or not trusted.
- <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: ?<br>
- </tt><tt>sigaction() fails to restore SIGSYS trap: ?</tt>
- <dt>Program error. Bugs can be reported <a href="bugs.html">here</a>.
- </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>
- <dl>
- <dt><tt>kernel time sync status ? </tt>
- <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 ?<br>
- </tt><tt>cert_sign ?<br>
- </tt><tt>crypto_cert ?<br>
- </tt><tt>crypto_encrypt ?<br>
- </tt><tt>crypto_gq ?<br>
- </tt><tt>crypto_iff ?<br>
- </tt><tt>crypto_key ?<br>
- </tt><tt>crypto_mv ?<br>
- </tt><tt>crypto_setup ?<br>
- </tt><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.<br>
- </tt><tt>crypto_setup: certificate ? not for this host<br>
- </tt><tt>crypto_setup: certificate file ? not found or corrupt<br>
- </tt><tt>crypto_setup: host key file ? not found or corrupt<br>
- </tt><tt>crypto_setup: host key is not RSA key type<br>
- </tt><tt>crypto_setup: random seed file ? not found<br>
- </tt><tt>rypto_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 ?<br>
- </tt><tt>cert_parse: invalid issuer ?<br>
- </tt><tt>cert_parse: invalid signature ?<br>
- </tt><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<br>
- </tt><tt>crypto_?: invalid filestamp<br>
- </tt><tt>crypto_?: missing challenge<br>
- </tt><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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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/flatheads.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 log can be shrill at times.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:12<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/install.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><tt>buffer overflow ? </tt></dt>
+ <dd>Fatal error. An input packet is too long for processing.</dd>
+</dl>
+<p><tt><b>LOG_NOTICE</b></tt></p>
+<dl>
+ <dt><tt>no reply; clock not set</tt></dt>
+ <dd>In <tt>ntpdate</tt> mode no servers have been found. The server(s) and/or network may be down. Standard debugging procedures apply.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>proto_config: illegal item ?, value ?</tt></dt>
+ <dd>Program error. Bugs can be reported <a href="bugs.html">here</a>.</dd>
+ <dt><tt>receive:&nbsp;autokey requires two-way communication</tt></dt>
+ <dd>Configuration error on the <tt>broadcastclient</tt> command.</dd>
+ <dt><tt>receive: server <i>server</i> maaximum rate exceeded</tt></dt>
+ <dd>A kiss-o'death packet has been received. The transmit rate is automatically reduced.</dd>
+ <dt><tt>pps sync enabled</tt></dt>
+ <dd>The PPS signal has been detected and enabled.</dd>
+ <dt><tt>transmit: encryption key ? not found</tt></dt>
+ <dd>The encryption key is not defined or not trusted.</dd>
+ <dt><tt>precision = ? usec </tt></dt>
+ <dd>This reports the precision measured for this machine.</dd>
+ <dt><tt>using 10ms tick adjustments</tt></dt>
+ <dd>Gotcha for some machines with dirty rotten clock hardware.</dd>
+ <dt><tt>no servers reachable</tt></dt>
+ <dd>The system clock is running on internal batteries. The server(s) and/or network may be down.</dd>
+</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>.</dt>
+ <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.</dd>
+ <dt><tt>sigaction() fails to save SIGSYS trap: ?<br>
+ </tt><tt>sigaction() fails to restore SIGSYS trap: ?</tt></dt>
+ <dt>Program error. Bugs can be reported <a href="bugs.html">here</a>.</dt>
+</dl>
+<p><tt><b>LOG_NOTICE</b></tt></p>
+<dl>
+ <dt><tt>frequency error ? exceeds tolerance 500 PPM</tt></dt>
+ <dd>The hardware clock frequency error exceeds the rate the kernel can correct. This could be a hardware or a kernel problem.</dd>
+ <dt><tt>time slew ? s</tt></dt>
+ <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.</dd>
+ <dt><tt>time reset ? s</tt></dt>
+ <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.</dd>
+ <dt><tt>kernel time sync disabled ?</tt></dt>
+ <dd>The kernel reports an error. See the codes in the <tt>timex.h</tt> file.</dd>
+ <dt><tt>pps sync disabled</tt></dt>
+ <dd>The PPS signal has died, probably due to a dead radio, broken wire or loose connector.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>kernel time sync status ? </tt></dt>
+ <dd>For information only. See the codes in the <tt>timex.h</tt> file.</dd>
+</dl>
+<h4>Cryptographic Module</h4>
+<p><tt><b>LOG_ERR</b></tt></p>
+<dl>
+ <dt><tt>cert_parse ?<br>
+ </tt><tt>cert_sign ?<br>
+ </tt><tt>crypto_cert ?<br>
+ </tt><tt>crypto_encrypt ?<br>
+ </tt><tt>crypto_gq ?<br>
+ </tt><tt>crypto_iff ?<br>
+ </tt><tt>crypto_key ?<br>
+ </tt><tt>crypto_mv ?<br>
+ </tt><tt>crypto_setup ?<br>
+ </tt><tt>make_keys ?</tt></dt>
+ <dd>Usually fatal errors. These messages display error codes returned from the OpenSSL library. See the OpenSSL documentation for explanation.</dd>
+ <dt><tt>crypto_setup: certificate ? is trusted, but not self signed.<br>
+ </tt><tt>crypto_setup: certificate ? not for this host<br>
+ </tt><tt>crypto_setup: certificate file ? not found or corrupt<br>
+ </tt><tt>crypto_setup: host key file ? not found or corrupt<br>
+ </tt><tt>crypto_setup: host key is not RSA key type<br>
+ </tt><tt>crypto_setup: random seed file ? not found<br>
+ </tt><tt>rypto_setup: random seed file not specified</tt></dt>
+ <dd>Fatal errors. These messages show problems during the initialization procedure.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>cert_parse: expired ?<br>
+ </tt><tt>cert_parse: invalid issuer ?<br>
+ </tt><tt>cert_parse: invalid signature ?<br>
+ </tt><tt>cert_parse: invalid subject ?</tt></dt>
+ <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.</dd>
+ <dt><tt>crypto_?: defective key<br>
+ </tt><tt>crypto_?: invalid filestamp<br>
+ </tt><tt>crypto_?: missing challenge<br>
+ </tt><tt>crypto_?: scheme unavailable</tt></dt>
+ <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.</dd>
+ <dt><tt>crypto_cert: wrong PEM type ?</tt></dt>
+ <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.</dd>
+ <dt><tt>crypto_ident: no compatible identity scheme found</tt></dt>
+ <dd>Configuration error. The server and client identity schemes are incompatible.</dd>
+ <dt><tt>crypto_tai: kernel TAI update failed</tt></dt>
+ <dd>The kernel does not support this function. You may need a new kernel or patch.</dd>
+ <dt><tt>crypto_tai: leapseconds file ? error ?</tt></dt>
+ <dd>The leapseconds file is corrupt. Obtain the latest file from <tt>time.nist.gov</tt>.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntp-wait.html b/html/ntp-wait.html
index ee1341daee2d..dcc6a10c8490 100644
--- a/html/ntp-wait.html
+++ b/html/ntp-wait.html
@@ -8,6 +8,9 @@
</head>
<body>
<h3><tt>ntp-wait</tt> - waits until ntpd is in synchronized state</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->12-Jul-2011 22:03<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Synopsis</h4>
<p><tt>ntp-wait [ -v ] [ -n <i>tries</i> ] [ -s <i>seconds</i> ]</tt></p>
diff --git a/html/ntp_conf.html b/html/ntp_conf.html
index 9676da1c71ed..73d26cde99ca 100644
--- a/html/ntp_conf.html
+++ b/html/ntp_conf.html
@@ -1,174 +1,174 @@
<!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="HTML Tidy, see www.w3.org">
- <title>Configuration File Definition (Advanced)</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Configuration File Definition (Advanced)</h3>
- <img src="pic/pogo7.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
- <p>Racoon is shooting configuration bugs.</p>
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">02:20</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="252">Monday, March 03, 2008</csobj></p>
- <br clear="left">
- <hr>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#synopsis">Synopsis</a><br>
- <li class="inline"><a href="#files">Files</a>
- <li class="inline"><a href="#high-level">High-Level Description</a>
- <li class="inline"><a href="#detailed">Detailed Description</a>
- <li class="inline"><a href="#guidelines">Guidelines for Adding Configuration Commands </a>
- </ul>
- <h4 id="synopsis">Synopsis</h4>
- <p>The NTP configuration process is driven by a phrase-structure grammar which is used to specify the format of the configuration commands and the actions needed to build an abstract syntax tree (AST). The grammar is fed to a parser generator (Bison) which produces a parser for the configuration file.</p>
- <p>The generated parser is used to parse an NTP configuration file and check it for syntax and semantic errors. The result of the parse is an AST, which contains a representation of the various commands and options. This AST is then traversed to set up the NTP daemon to the correct configuration.</p>
- <p>This document is intended for developers who wish to modify the configuration code and/or add configuration commands and options. It contains a description of the files used in the configuration process as well as guidelines on how to construct them.</p>
- <h4 id="files">Files</h4>
- <p>A brief description of the files used by the configuration code is given below:</p>
- <table border="1">
- <tbody>
- <tr>
- <th width="179">File</th>
- <th width="537">Description</th>
- </tr>
- <tr>
- <td valign="top"><b>ntp_config.y</b></td>
- <td>This file is a Bison source file that contains the phrase-structure grammar and the actions that need to be performed to generate an AST.</td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_config.c</b></td>
- <td>This file contains the major chunk of the configuration code. It contains all the functions that are called for building the AST as well as the functions that are needed for traversing the AST.</td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_config.h</b></td>
- <td>This file is the header file for <b>ntp_config.c</b>. It mainly contains the structure definitions needed to build the AST. </td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_scanner.c</b></td>
- <td>This file contains the code for a simple lexical analyzer. This file is directly included into the <b>ntp_config.c</b> file since this code is only used by the configuration code. The most important function in this file is <tt>yylex</tt>, which is called by the generated parser to get the next token on the input line.</td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_data_structures.c</b></td>
- <td>This file contains a generic implementation of a priority queue and a simple queue. This code can be used to create a queue for any structure.</td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_data_structures.h</b></td>
- <td>This header file contains the structure declarations and function prototypes needed to use the data structures defined in <b>ntp_data_structures.c</b>. This file forms the public interface of the data structures.</td>
- </tr>
- <tr>
- <td valign="top"><b>ntp_config.tab.c</b></td>
- <td>This file is generated by Bison from the <b>ntp_config.y</b> file. This file is also included directly into the configuration code.</td>
- </tr>
- </tbody>
- </table>
- <h4 id="high-level">High-Level Description</h4>
- <p>A high-level description of the configuration process showing where all the files fit in is given below:</p>
- <p><img src="pic/description.jpg" alt="JPEG" border="0"></p>
- <p>The scanner reads in an NTP configuration file and converts it into tokens. The Bison generated parser reads these tokens and converts them into an AST. The AST traverser consists of a set of functions that configure parts of NTP on the basis of what is on the tree. A more detailed description of these parts and the files used is given below:</p>
- <h4 id="detailed">Detailed Description</h4>
- <dl>
- <dt><b>ntp_scanner.c</b>
- <dd>This file contains the scanner. The scanner is a small program that converts an input NTP configuration file into a set of <b>tokens</b> that correspond to <b>lexemes</b> in the input. Lexemes are strings in the input, delimited by whitespace and/or special characters. Tokens are basically unique integers that represent these lexemes. A different token is generated for each reserved word and special character in the input. There are two main functions in the public interface of this file:
- <dt><tt>int yylex</tt>()
- <dd>This function is called <tt>yylex</tt> for historical reasons; <tt>lex</tt> is a program that takes a set of regular expressions and generates a scanner that returns tokens corresponding to those regular expressions. The name of the generated function is called <tt>yylex</tt>. We aren't using<b> </b><tt>lex</tt><b> </b>because it requires linking against an external library and we didn't want to increase the compile-time requirements of NTP.
- <dd>History lessons aside, this function basically checks to see if the next input character is a special character as defined in the array <tt>char special_char[]</tt>. (The function <tt>int is_special(char ch)</tt>, can be used for this.) If yes, the special character is returned as the token. If not, a set of characters is read until the next whitespace or special character is encountered. This set of characters forms the lexeme; <tt>yylex</tt> then checks whether this lexeme is an integer, a double, an IP address or a reserved word. If yes, the corresponding token is returned. If not, a token for a string is returned as the default token.
- <dt><tt>struct state *create_keyword_scanner(struct key_tok *<i>keyword_list</i>)</tt>
- <dd>This function takes a list of (<i>keyword, token</i>) pairs and converts them into a trie that can recognize the keywords (reserved words). Every time the scanner reads a lexeme, it compares it against the list of reserved words. If it finds a match, it returns the corresponding token for that keyword.
- <dt><b>ntp_data_structures.c</b>
- <dd>This file contains an implementation of a generic priority queue and FIFO queue. By generic, we mean that these queues can hold element of any type (integers, user-defined structs, etc.), provided that these elements are allocated on the heap using the function <tt>void</tt> *<tt>get_node(size_t size)</tt>. Note that the prototype for this function is exactly the same as that of <tt>malloc</tt> and that it can be used in the exact same way. Behind the scenes, <tt>get_node</tt> calls <tt>malloc</tt> to allocate <i>size</i> plus some extra memory needed for bookkeeping. The allocated memory can be freed using the function <tt>void free_node (void *<i>my_node</i>)</tt>. In addition to these two functions, the public interface of this file contains the following functions:
- <dt><tt>queue *create_priority_queue(int (*get_order)(void *, void*))</tt>
- <dd>This function creates a priority queue in which the order of the elements is determined by the <tt>get_order</tt><b> </b>function that is passed as input to the priority queue. The <tt>get_order</tt><b> </b>function should return positive if the priority of the first element is less than the priority of the second element.
- <dt><tt>queue *create_queue(void)</tt>
- <dd>This function creates a FIFO queue. It basically calls the <tt>create_priority_queue</tt> function with the <tt>get_fifo_order</tt><b> </b>function as its argument.
- <dt><tt>void destroy_queue(queue *<i>my_queue</i>)</tt>
- <dd>This function deletes <tt><i>my_queue</i></tt><b> </b>and frees up all the memory allocated to it an its elements.
- <dt><tt>int empty(queue *</tt><i><tt>my_queue</tt></i><tt>)</tt>
- <dd>This function checks to see if <i><tt>my_queue</tt></i> is empty. Returns <tt>true</tt> if <tt><i>my_queue</i></tt> does not have any elements, else it returns false.
- <dt><tt>queue *enqueue(queue *<i>my_queue</i>, void *<i>my_node</i>)</tt>
- <dd>This function adds an element, <i><tt>my_node</tt></i>, to a queue, <i><tt>my_queue</tt></i>. <i><tt>my_node</tt></i> must be allocated on the heap using the <tt>get_node</tt> function instead of <tt>malloc</tt>.
- <dt><tt>void *dequeue(queue *<i>my_queue</i>)</tt>
- <dd>This function returns the element at the front of the queue. This element will be element with the highest priority.
- <dt><tt>int get_no_of_elements(queue *<i>my_queue</i>)</tt>
- <dd>This function returns the number of elements in <tt><i>my_queue</i></tt>.
- <dt><tt>void append_queue(queue *<i>q</i>1, queue *<i>q</i>2)</tt>
- <dd>This function adds all the elements of <tt><i>q</i>2</tt> to <tt><i>q</i>1</tt>. The queue <tt><i>q</i>2</tt> is destroyed in the process.
- <dt><b>ntp_config.y</b>
- <dd>This file is structured as a standard Bison file and consists of three main parts, separated by <tt>%%</tt>:
- </dl>
- <ol>
- <li>The prologue and bison declarations: This section contains a list of the terminal symbols, the non-terminal symbols and the types of these symbols.</li>
- <li>The rules section: This section contains a description of the actual phrase-structure rules that are used to parse the configuration commands. Each rule consists of a left-hand side (LHS), a right-hand side (RHS) and an optional action. As is standard with phrase-structure grammars, the LHS consists of a single non-terminal symbol. The RHS can contain both terminal and non-terminal symbols, while the optional action can consist of any arbitrary C code.</li>
- <li>The epilogue: This section is left empty on purpose. It is traditionally used to code the support functions needed to build the ASTs Since, we have moved all the support functions to <b>ntp_config.c</b>, this section is left empty.</li>
- </ol>
- <h4>Prologue and Bison Declarations</h4>
- <p>All the terminal symbols (also known as tokens) have to be declared in the prologue section. Note that terminals and non-terminals may have values associated with them and these values have types. (More on this later). An unnamed union has to be declared with all the possible types at the start of the prologue section. For example, we declare the following union at the start of the <b>ntp_config.y</b> file:</p>
- <p class="style1"><tt>%union {<br>
- &nbsp;&nbsp;&nbsp;&nbsp;char *String;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;double Double;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;int Integer;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;void *VoidPtr;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;queue *Queue;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;struct attr_val *Attr_val;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;struct address_node *Address_node;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;struct setvar_node *Set_var;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;/* Simulation types */<br>
- &nbsp;&nbsp;&nbsp;&nbsp;server_info *Sim_server;<br>
- &nbsp;&nbsp;&nbsp;&nbsp;script_info *Sim_script;<br>
- }</tt></p>
- <p>Some tokens may not have any types. For example, tokens that correspond to reserved words do not usually have types as they simply indicate that a reserved word has been read in the input file. Such tokens have to be declared as follows:</p>
- <p><tt>%token T_Discard<br>
- %token T_Dispersion</tt></p>
- <p>Other tokens do have types. For example, a <tt>T_Double</tt> token is returned by the scanner whenever it sees a floating-point double in the configuration file. The value associated with the token is the actual number that was read in the configuration file and its type (after conversion) is double. Hence, the token <tt>T_Double</tt> will have to be declared as follows in the prologue of <b>ntp_config.y</b> file:</p>
- <p><tt>%token &lt;Double&gt; T_Double </tt></p>
- <p>Note that the declaration given in the angled brackets is not <tt>double</tt> but <tt>Double</tt>, which is the name of the variable given in the <tt>%union {}</tt> declaration above.</p>
- <p>Finally, non-terminal symbols may also have values associated with them, which have types. This is because Bison allows non-terminal symbols to have actions associated with them. Actions may be thought of as small functions which get executed whenever the RHS of a non-terminal is detected. The return values of these functions are the values associated with the non-terminals. The types of the non-terminals are specified with a <tt>%type</tt> declaration as shown below:</p>
- <p><tt>%type &lt;Queue&gt; address_list<br>
- %type &lt;Integer&gt; boolean</tt></p>
- <p>The <tt>%type</tt> declaration may be omitted for non-terminals that do not return any value and do not have type information associated with them.</p>
- <h4>The Rules Section </h4>
- <p>The rule section only consists of phrase-structure grammar rules. Each rule typically has the following format:</p>
- <p><tt>LHS : RHS [{ Actions }]<br>
- &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
- <p>where LHS consists of a single non-terminal symbol and the RHS consists of one or more terminal and non-terminal symbols. The <tt>Actions</tt> are optional and may consist of any number of arbitrary C statements. Note that Bison can only process LALR(1) grammars, which imposes additional restrictions on the kind of rules that can be specified. Examples of rules are shown below:</p>
- <p><tt>orphan_mode_command<br>
- &nbsp;&nbsp;&nbsp;&nbsp;: T_Tos tos_option_list<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ append_queue(my_config.orphan_cmds, $2); }<br>
- &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
- <p><tt>tos_option_list<br>
- &nbsp;&nbsp;&nbsp;&nbsp;: tos_option_list tos_option { $$ = enqueue($1, $2); }<br>
- &nbsp;&nbsp;&nbsp;&nbsp;| tos_option { $$ = enqueue_in_new_queue($1); }<br>
- &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
- <p>The <tt>$n</tt> notation, where <tt>n</tt> is an integer, is used to refer to the value of a terminal or non-terminal symbol. All terminals and non-terminal symbols within a particular rule are numbered (starting from 1) according to the order in which they appear within the RHS of a rule. <tt>$$</tt> is used to refer to the value of the LHS terminal symbol - it is used to return a value for the non-terminal symbol specified in the LHS of the rule.</p>
- <h4>Invoking Bison </h4>
- <p>Bison needs to be invoked in order to convert the <b>ntp_config.y</b> file into a C source file. To invoke Bison, simply enter the command:</p>
- <p><tt>bison ntp_config.y</tt></p>
- <p>at the command prompt. If no errors are detected, an <b>ntp_config.tab.c</b> file will be generated by default. This generated file can be directly included into the <b>ntp_config.c</b> file.</p>
- <p>If Bison report shift-reduce errors or reduce-reduce errors, it means that the grammar specified using the rules in not LALR(1). To debug such a grammar, invoke Bison with a <tt>-v</tt> switch, as shown below. This will generate a <b>ntp_config.output</b> file, which will contain a description of the generated state machine, together with a list of states that have shift-reduce/reduce-reduce conflicts. You can then change the rules to remove such conflicts.</p>
- <p><tt>bison -v ntp_config.y</tt></p>
- <p>For more information, refer to the <a href="http://www.gnu.org/software/bison/manual/html_mono/bison.html">Bison manual</a>.</p>
- <p><b>ntp_config.c</b></p>
- <p>This file contains the major chunk of the configuration code including all the support functions needed for building and traversing the ASTs. As such, most of the functions in this file can be divided into two groups:</p>
- <ol>
- <li>Functions that have a <tt>create_</tt> prefix. These functions are used to build a node of the AST.</li>
- <li>Functions that have a <tt>config_</tt> prefix. These functions are used to traverse the AST and configure NTP according to the nodes present on the tree.</li>
- </ol>
- <h4>Guidelines for Adding Configuration Commands</h4>
- <p>The following steps may be used to add a new configuration command to the NTP reference implementation:</p>
- <ol>
- <li>Write phrase-structure grammar rules for the syntax of the new command. Add these rules to the rules section of the <b>ntp_config.y</b> file. </li>
- <li>Write the action to be performed on recognizing the rules. These actions will be used to build the AST.</li>
- <li>If new reserved words are needed, add these to the <tt>struct key_tok keyword_list[]</tt>structure in the <b>ntp_config.c </b>file. This will allow the scanner to recognize these reserved words and generate the desired tokens on recognizing them.</li>
- <li>Specify the types of all the terminals and non-terminal symbols in the prologue section of the <b>ntp_config.c</b> file.</li>
- <li>Write a function with a <tt>config_</tt> prefix that will be executed for this new command. Make sure this function is called in the <tt>config_ntpd()</tt>function.</li>
- </ol>
- <hr>
- <address><a href="mailto:skamboj@udel.edu">Sachin Kamboj</a></address>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Configuration File Definition (Advanced)</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Configuration File Definition (Advanced)</h3>
+<img src="pic/pogo7.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>Racoon is shooting configuration bugs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Oct-2010 05:13<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synopsis">Synopsis</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+ <li class="inline"><a href="#high-level">High-Level Description</a></li>
+ <li class="inline"><a href="#detailed">Detailed Description</a></li>
+ <li class="inline"><a href="#guidelines">Guidelines for Adding Configuration Commands </a></li>
+</ul>
+<hr>
+<h4 id="synopsis">Synopsis</h4>
+<p>The NTP configuration process is driven by a phrase-structure grammar which is used to specify the format of the configuration commands and the actions needed to build an abstract syntax tree (AST). The grammar is fed to a parser generator (Bison) which produces a parser for the configuration file.</p>
+<p>The generated parser is used to parse an NTP configuration file and check it for syntax and semantic errors. The result of the parse is an AST, which contains a representation of the various commands and options. This AST is then traversed to set up the NTP daemon to the correct configuration.</p>
+<p>This document is intended for developers who wish to modify the configuration code and/or add configuration commands and options. It contains a description of the files used in the configuration process as well as guidelines on how to construct them.</p>
+<h4 id="files">Files</h4>
+<p>A brief description of the files used by the configuration code is given below:</p>
+<table border="1">
+ <tbody>
+ <tr>
+ <th width="179">File</th>
+ <th width="537">Description</th>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.y</b></td>
+ <td>This file is a Bison source file that contains the phrase-structure grammar and the actions that need to be performed to generate an AST.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.c</b></td>
+ <td>This file contains the major chunk of the configuration code. It contains all the functions that are called for building the AST as well as the functions that are needed for traversing the AST.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.h</b></td>
+ <td>This file is the header file for <b>ntp_config.c</b>. It mainly contains the structure definitions needed to build the AST. </td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_scanner.c</b></td>
+ <td>This file contains the code for a simple lexical analyzer. This file is directly included into the <b>ntp_config.c</b> file since this code is only used by the configuration code. The most important function in this file is <tt>yylex</tt>, which is called by the generated parser to get the next token on the input line.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_data_structures.c</b></td>
+ <td>This file contains a generic implementation of a priority queue and a simple queue. This code can be used to create a queue for any structure.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_data_structures.h</b></td>
+ <td>This header file contains the structure declarations and function prototypes needed to use the data structures defined in <b>ntp_data_structures.c</b>. This file forms the public interface of the data structures.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.tab.c</b></td>
+ <td>This file is generated by Bison from the <b>ntp_config.y</b> file. This file is also included directly into the configuration code.</td>
+ </tr>
+ </tbody>
+</table>
+<h4 id="high-level">High-Level Description</h4>
+<p>A high-level description of the configuration process showing where all the files fit in is given below:</p>
+<p><img src="pic/description.jpg" alt="JPEG" border="0"></p>
+<p>The scanner reads in an NTP configuration file and converts it into tokens. The Bison generated parser reads these tokens and converts them into an AST. The AST traverser consists of a set of functions that configure parts of NTP on the basis of what is on the tree. A more detailed description of these parts and the files used is given below:</p>
+<h4 id="detailed">Detailed Description</h4>
+<dl>
+ <dt><b>ntp_scanner.c</b></dt>
+ <dd>This file contains the scanner. The scanner is a small program that converts an input NTP configuration file into a set of <b>tokens</b> that correspond to <b>lexemes</b> in the input. Lexemes are strings in the input, delimited by whitespace and/or special characters. Tokens are basically unique integers that represent these lexemes. A different token is generated for each reserved word and special character in the input. There are two main functions in the public interface of this file:</dd>
+ <dt><tt>int yylex</tt>()</dt>
+ <dd>This function is called <tt>yylex</tt> for historical reasons; <tt>lex</tt> is a program that takes a set of regular expressions and generates a scanner that returns tokens corresponding to those regular expressions. The name of the generated function is called <tt>yylex</tt>. We aren't using<b> </b><tt>lex</tt><b> </b>because it requires linking against an external library and we didn't want to increase the compile-time requirements of NTP.</dd>
+ <dd>History lessons aside, this function basically checks to see if the next input character is a special character as defined in the array <tt>char special_char[]</tt>. (The function <tt>int is_special(char ch)</tt>, can be used for this.) If yes, the special character is returned as the token. If not, a set of characters is read until the next whitespace or special character is encountered. This set of characters forms the lexeme; <tt>yylex</tt> then checks whether this lexeme is an integer, a double, an IP address or a reserved word. If yes, the corresponding token is returned. If not, a token for a string is returned as the default token.</dd>
+ <dt><tt>struct state *create_keyword_scanner(struct key_tok *<i>keyword_list</i>)</tt></dt>
+ <dd>This function takes a list of (<i>keyword, token</i>) pairs and converts them into a trie that can recognize the keywords (reserved words). Every time the scanner reads a lexeme, it compares it against the list of reserved words. If it finds a match, it returns the corresponding token for that keyword.</dd>
+ <dt><b>ntp_data_structures.c</b></dt>
+ <dd>This file contains an implementation of a generic priority queue and FIFO queue. By generic, we mean that these queues can hold element of any type (integers, user-defined structs, etc.), provided that these elements are allocated on the heap using the function <tt>void</tt> *<tt>get_node(size_t size)</tt>. Note that the prototype for this function is exactly the same as that of <tt>malloc</tt> and that it can be used in the exact same way. Behind the scenes, <tt>get_node</tt> calls <tt>malloc</tt> to allocate <i>size</i> plus some extra memory needed for bookkeeping. The allocated memory can be freed using the function <tt>void free_node (void *<i>my_node</i>)</tt>. In addition to these two functions, the public interface of this file contains the following functions:</dd>
+ <dt><tt>queue *create_priority_queue(int (*get_order)(void *, void*))</tt></dt>
+ <dd>This function creates a priority queue in which the order of the elements is determined by the <tt>get_order</tt><b> </b>function that is passed as input to the priority queue. The <tt>get_order</tt><b> </b>function should return positive if the priority of the first element is less than the priority of the second element.</dd>
+ <dt><tt>queue *create_queue(void)</tt></dt>
+ <dd>This function creates a FIFO queue. It basically calls the <tt>create_priority_queue</tt> function with the <tt>get_fifo_order</tt><b> </b>function as its argument.</dd>
+ <dt><tt>void destroy_queue(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function deletes <tt><i>my_queue</i></tt><b> </b>and frees up all the memory allocated to it an its elements.</dd>
+ <dt><tt>int empty(queue *</tt><i><tt>my_queue</tt></i><tt>)</tt></dt>
+ <dd>This function checks to see if <i><tt>my_queue</tt></i> is empty. Returns <tt>true</tt> if <tt><i>my_queue</i></tt> does not have any elements, else it returns false.</dd>
+ <dt><tt>queue *enqueue(queue *<i>my_queue</i>, void *<i>my_node</i>)</tt></dt>
+ <dd>This function adds an element, <i><tt>my_node</tt></i>, to a queue, <i><tt>my_queue</tt></i>. <i><tt>my_node</tt></i> must be allocated on the heap using the <tt>get_node</tt> function instead of <tt>malloc</tt>.</dd>
+ <dt><tt>void *dequeue(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function returns the element at the front of the queue. This element will be element with the highest priority.</dd>
+ <dt><tt>int get_no_of_elements(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function returns the number of elements in <tt><i>my_queue</i></tt>.</dd>
+ <dt><tt>void append_queue(queue *<i>q</i>1, queue *<i>q</i>2)</tt></dt>
+ <dd>This function adds all the elements of <tt><i>q</i>2</tt> to <tt><i>q</i>1</tt>. The queue <tt><i>q</i>2</tt> is destroyed in the process.</dd>
+ <dt><b>ntp_config.y</b></dt>
+ <dd>This file is structured as a standard Bison file and consists of three main parts, separated by <tt>%%</tt>:</dd>
+</dl>
+<ol>
+ <li>The prologue and bison declarations: This section contains a list of the terminal symbols, the non-terminal symbols and the types of these symbols.</li>
+ <li>The rules section: This section contains a description of the actual phrase-structure rules that are used to parse the configuration commands. Each rule consists of a left-hand side (LHS), a right-hand side (RHS) and an optional action. As is standard with phrase-structure grammars, the LHS consists of a single non-terminal symbol. The RHS can contain both terminal and non-terminal symbols, while the optional action can consist of any arbitrary C code.</li>
+ <li>The epilogue: This section is left empty on purpose. It is traditionally used to code the support functions needed to build the ASTs Since, we have moved all the support functions to <b>ntp_config.c</b>, this section is left empty.</li>
+</ol>
+<h4>Prologue and Bison Declarations</h4>
+<p>All the terminal symbols (also known as tokens) have to be declared in the prologue section. Note that terminals and non-terminals may have values associated with them and these values have types. (More on this later). An unnamed union has to be declared with all the possible types at the start of the prologue section. For example, we declare the following union at the start of the <b>ntp_config.y</b> file:</p>
+<p class="style1"><tt>%union {<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;char *String;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;double Double;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;int Integer;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;void *VoidPtr;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;queue *Queue;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct attr_val *Attr_val;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct address_node *Address_node;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct setvar_node *Set_var;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;/* Simulation types */<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;server_info *Sim_server;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;script_info *Sim_script;<br>
+ }</tt></p>
+<p>Some tokens may not have any types. For example, tokens that correspond to reserved words do not usually have types as they simply indicate that a reserved word has been read in the input file. Such tokens have to be declared as follows:</p>
+<p><tt>%token T_Discard<br>
+ %token T_Dispersion</tt></p>
+<p>Other tokens do have types. For example, a <tt>T_Double</tt> token is returned by the scanner whenever it sees a floating-point double in the configuration file. The value associated with the token is the actual number that was read in the configuration file and its type (after conversion) is double. Hence, the token <tt>T_Double</tt> will have to be declared as follows in the prologue of <b>ntp_config.y</b> file:</p>
+<p><tt>%token &lt;Double&gt; T_Double </tt></p>
+<p>Note that the declaration given in the angled brackets is not <tt>double</tt> but <tt>Double</tt>, which is the name of the variable given in the <tt>%union {}</tt> declaration above.</p>
+<p>Finally, non-terminal symbols may also have values associated with them, which have types. This is because Bison allows non-terminal symbols to have actions associated with them. Actions may be thought of as small functions which get executed whenever the RHS of a non-terminal is detected. The return values of these functions are the values associated with the non-terminals. The types of the non-terminals are specified with a <tt>%type</tt> declaration as shown below:</p>
+<p><tt>%type &lt;Queue&gt; address_list<br>
+ %type &lt;Integer&gt; boolean</tt></p>
+<p>The <tt>%type</tt> declaration may be omitted for non-terminals that do not return any value and do not have type information associated with them.</p>
+<h4>The Rules Section </h4>
+<p>The rule section only consists of phrase-structure grammar rules. Each rule typically has the following format:</p>
+<p><tt>LHS : RHS [{ Actions }]<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p>where LHS consists of a single non-terminal symbol and the RHS consists of one or more terminal and non-terminal symbols. The <tt>Actions</tt> are optional and may consist of any number of arbitrary C statements. Note that Bison can only process LALR(1) grammars, which imposes additional restrictions on the kind of rules that can be specified. Examples of rules are shown below:</p>
+<p><tt>orphan_mode_command<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;: T_Tos tos_option_list<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ append_queue(my_config.orphan_cmds, $2); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p><tt>tos_option_list<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;: tos_option_list tos_option { $$ = enqueue($1, $2); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;| tos_option { $$ = enqueue_in_new_queue($1); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p>The <tt>$n</tt> notation, where <tt>n</tt> is an integer, is used to refer to the value of a terminal or non-terminal symbol. All terminals and non-terminal symbols within a particular rule are numbered (starting from 1) according to the order in which they appear within the RHS of a rule. <tt>$$</tt> is used to refer to the value of the LHS terminal symbol - it is used to return a value for the non-terminal symbol specified in the LHS of the rule.</p>
+<h4>Invoking Bison </h4>
+<p>Bison needs to be invoked in order to convert the <b>ntp_config.y</b> file into a C source file. To invoke Bison, simply enter the command:</p>
+<p><tt>bison ntp_config.y</tt></p>
+<p>at the command prompt. If no errors are detected, an <b>ntp_config.tab.c</b> file will be generated by default. This generated file can be directly included into the <b>ntp_config.c</b> file.</p>
+<p>If Bison report shift-reduce errors or reduce-reduce errors, it means that the grammar specified using the rules in not LALR(1). To debug such a grammar, invoke Bison with a <tt>-v</tt> switch, as shown below. This will generate a <b>ntp_config.output</b> file, which will contain a description of the generated state machine, together with a list of states that have shift-reduce/reduce-reduce conflicts. You can then change the rules to remove such conflicts.</p>
+<p><tt>bison -v ntp_config.y</tt></p>
+<p>For more information, refer to the <a href="http://www.gnu.org/software/bison/manual/html_mono/bison.html">Bison manual</a>.</p>
+<p><b>ntp_config.c</b></p>
+<p>This file contains the major chunk of the configuration code including all the support functions needed for building and traversing the ASTs. As such, most of the functions in this file can be divided into two groups:</p>
+<ol>
+ <li>Functions that have a <tt>create_</tt> prefix. These functions are used to build a node of the AST.</li>
+ <li>Functions that have a <tt>config_</tt> prefix. These functions are used to traverse the AST and configure NTP according to the nodes present on the tree.</li>
+</ol>
+<h4 id="guidelines">Guidelines for Adding Configuration Commands</h4>
+<p>The following steps may be used to add a new configuration command to the NTP reference implementation:</p>
+<ol>
+ <li>Write phrase-structure grammar rules for the syntax of the new command. Add these rules to the rules section of the <b>ntp_config.y</b> file. </li>
+ <li>Write the action to be performed on recognizing the rules. These actions will be used to build the AST.</li>
+ <li>If new reserved words are needed, add these to the <tt>struct key_tok keyword_list[]</tt>structure in the <b>ntp_config.c </b>file. This will allow the scanner to recognize these reserved words and generate the desired tokens on recognizing them.</li>
+ <li>Specify the types of all the terminals and non-terminal symbols in the prologue section of the <b>ntp_config.c</b> file.</li>
+ <li>Write a function with a <tt>config_</tt> prefix that will be executed for this new command. Make sure this function is called in the <tt>config_ntpd()</tt>function.</li>
+</ol>
+<hr>
+<address>
+<a href="mailto:skamboj@udel.edu">Sachin Kamboj</a>
+</address>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
</html>
diff --git a/html/ntpd.html b/html/ntpd.html
index 9a160007c142..418d199fb90e 100644
--- a/html/ntpd.html
+++ b/html/ntpd.html
@@ -1,235 +1,176 @@
<!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="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/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>You need help from the monkeys.</p>
- <p>Last update: <!-- #BeginDate format:En1m -->14-oct-09 22:23<!-- #EndDate --></p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpd - Network Time Protocol (NTP) daemon</title>
+<!-- Changed by: Harlan &, 10-Feb-2014 -->
+<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/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>You need help from the monkeys.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:14<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#synop">Synopsis</a></li>
- <li class="inline"><a href="#descr">Description</a></li>
- <li class="inline"><a href="#time">Setting the Time and Frequency</a></li>
- <li class="inline"><a href="#modes">Operating Modes</a></li>
- <li class="inline"><a href="#poll">Poll Interval Control</a></li>
- <li class="inline"><a href="#leap">Leap Second Processing</a></li>
- <li class="inline"><a href="#notes">Additional Features</a></li>
- <li class="inline"><a href="#cmd">Command Line Options</a></li>
- <li class="inline"><a href="#cfg">The Configuration File</a></li>
- <li class="inline"><a href="#files">Files</a></li>
- </ul>
- <hr>
- <h4 id="synop">Synopsis</h4>
- <tt>ntpd [ -46aAbdDgLnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>iface</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</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 that synchronises the system clock with remote NTP&nbsp;time servers or local reference clocks. 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. The program can operate in any of several modes, as described on the <a href="assoc.html">Association Management</a> page, and with both symmetric key and public key cryptography, as described on the <a href="manyopt.html">Authentication Options</a> page.</p>
- <p>The <tt>ntpd</tt> program ordinarily requires a configuration file as desccribe on the Configuration Commands and Options collection above. However a client can discover remote servers and configure them automatically. This makes it possible to deploy a fleet of workstations without specifying configuration details specific to the local environment. Further details are on the <a href="manyopt.html">Automatic Server Discovery</a> page.</p>
- <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. Once started, the daemon will begin sending and receiving messages, as specified in the configuration file.</p>
- <h4 id="time">Setting the Time and Frequency</h4>
- <p>The <tt>ntpd</tt> program operates by exchanging messages with one or more servers at designated intervals ranging from about one minute to about 17 minutes. When started, the program requires several exchanges while the algorithms accumulate and groom the data before setting the clock. The initial delay to set the clock can be reduced using options on the <a href="confopt.html">Server Options</a> page.</p>
- <p>Most compters 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. In case there is no TOY chip or the TOY&nbsp;time is more than 1000 s from the server&nbsp;time, <tt>ntpd</tt> assumes something must be terribly wrong and exits with a panic message to the system operator. With the <tt>-g</tt> option the clock will be initially set to the server time regardless of the chip time. However, once the clock has been set, an error greater than 1000 s will cause <tt>ntpd</tt> to exit anyway.</p>
- <p>Under ordinary conditions, <tt>ntpd</tt> slews the clock so that the time is effectively continuous and never runs backwards. If due to extreme network congestion an error spike exceeds the <i>step threshold</i>, by default 128 ms, the spike is discarded. However, if the error persists for more than the <i>stepout threshold</i>, by default 900 s, the system clock is stepped to the correct value. In practice the need for a step has is extremely rare and almost always the result of a hardware failure. With the <tt>-x</tt> option the step threshold is increased to 600 s. Other options are available using the <tt>tinker</tt> command on the <a href="miscopt.html">Miscellaneous Options</a> page.</p>
- <p>The issues should be carefully considered before using these options. The maximum slew rate possible is limited to 500 parts-per-million (PPM) by the Unix kernel. As a result, the clock can take 2000 s for each second the clock is outside the acceptable range. During this interval the 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>The frequency file, usually called <tt>ntp.drift</tt>, contains the latest estimate of clock frequency. If this file does not exist when <tt>ntpd</tt> is started, it enters a special mode designed to measure the particular frequency directly. The measurement takes 15 minutes, after which the frequency is set and <tt>ntpd</tt> resumes normal mode where the time and frequency are continuously adjusted. The frequency file is updated at intervals of an hour or more depending on the measured clock stability.</p>
- <h4 id="modes">Operating Modes</h4>
- <p>The <tt>ntpd</tt> program normally operates continuously while adjusting the time and frequency, but in some cases it may not be practical to run it continuously. With the <tt>-q</tt> option <tt>ntpd</tt> operates as in continous mode, but exits just after setting the clock for the first time with the configured servers. Most applications will probably want to specify the <tt>iburst</tt> option with the <tt>server</tt> command. With this option a volley of messages is exchanged to groom the data and set the clock in about 10 s. If nothing is heard after a few minutes, the daemon times out and exits.</p>
- <h4 id="poll">Poll Interval Control</h4>
- <p>NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When <tt>ntpd</tt> starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead.</p>
- <p>The default poll interval range is suitable for most conditions, but can be changed using options on the <a href="confopt.html">Server Options</a> and <a href="miscopt.html">Miscellaneous Options</a> pages. However, when using maximum intervals much larger than the default, the residual clock frequency error must be small enough for the discipline loop to capture and correct. The capture range is 500 PPM with a 64-s interval decreasing by a factor of two for each interval doubling. At a 36-hr interval, for example, the capture range is only 0.24 PPM.</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.</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, such as during other than work hours. The filter 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. The filter is activated by the <tt>tinker huffpuff</tt> command, as described in the <a href="miscopt.html">Miscellaneous Options</a> page.</p>
- <h4 id="leap">Leap Second Processing</h4>
- <p>As provided by international agreement, an extra second is sometimes inserted
- in Coordinated Universal Time (UTC) at the end of a selected month,
- usually June or December. The National Institutes of Standards and
- Technology (NIST) provides an historic leapseconds file at <tt>time.nist.gov</tt> for
- retrieval via FTP. When this file, usually called <tt>ntp-leapseconds.list</tt>,
- is copied and installed in a directory.
- The <tt>leapfile</tt> configuration command specifies the path to
- this file. At startup, <tt>ntpd</tt> reads
- it and initializes three leapsecond values: the NTP seconds
- at the next leap event, the offset of UTC relative to International
- Atomic Time (TAI) after the leap and the NTP seconds when the leapseconds
- file expires and should be retrieved again.</p>
- <p>If a host does not have the leapsecond values, they can be obtained over the net using the Autokey security protocol. Ordinarily, the leapseconds file is installed on the primary servers and the values flow from them via secondary servers to the clients. When multiple servers are involved, the values with the latest expiration time are used.</p>
- <p>If the latest leap is in the past, nothing further is done other than to install the TAI offset. If the leap is in the future less than 28 days, the leap warning bits are set. If in the future less than 23 hours, the kernel is armed to insert one second at the end of the current day. If the kernel is enabled, the leap is done automatically at that time; otherwise, the clock is effectively stopped for one second at the leap. Additional details are in the <a href='http://www.eecis.udel.edu/~mills/leap.html'>The NTP Timescale and Leap Seconds</a> white paper</p>
- <p>If none of the above provisions are available, dsependent servers and clients
- tally the leap warning bits of surviving servers and reference clocks.
- When a majority of the survivors show warning, a leap is programmed
- at the end of the current month. During the month and day of insertion,
- they operate as above. In this way the leap is is propagated at all
- dependent servers and clients.</p>
- <h4 id="notes">Additional Features</h4>
- <p>A new experimental feature called interleaved modes can be used in NTP
- symmetric or broadcast modes. It is designed to improve accuracy
- by avoiding kernel latency and queueing delay, as described on the <a href="xleave.html">NTP
- Interleaved Modes</a> page. It is activated by the <tt>xleave</tt> option
- with the <tt>peer</tt> or <tt>broadcast</tt> configuration commands. The NTP
- protocol automatically reconfigures in normal or interleaved mode
- as required. Ordinary broadcast clients can use the same servers
- as interleaved clients at the same time. Further details are in the
- white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">NTP
- Interleaved On-Wire Protocol</a> and the briefing <a href="http://www.eecis.udel.edu/~mills/database/brief/onwire/onwire.ppt">Interleaved
- Synchronization Protocols for LANs and Space Data Links</a>.</p>
- <p>If <tt>ntpd</tt>, is configured with NetInfo support, it will attempt to read its configuration from the NetInfo service if the default <tt>ntp.conf</tt> 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>
- <p>Unless the <tt>-n</tt>, <tt>-d</tt> or <tt>-D</tt> option is used, <tt>ntpd</tt> changes the current working directory to the root directory, so any options or commands specifying paths need to use an absolute path or a path relative to the root.</p>
- <h4 id="cmd">Command Line Options</h4>
- <dl>
- <dt><tt>-4</tt>
- <dd>Force DNS resolution of host names to the IPv4 namespace.
- <dt><tt>-6</tt>
- <dd>Force DNS resolution of host names to the IPv6 namespace.
- <dt><tt>-a</tt></dt>
- <dd>Require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>enable auth</tt> command and is the default.</dd>
- <dt><tt>-A</tt></dt>
- <dd>Do not require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>disable auth</tt> command and almost never a good idea.</dd>
- <dt><tt>-b</tt></dt>
- <dd>Enable the client to synchronize to broadcast servers.</dd>
- <dt><tt>-c <i>conffile</i></tt></dt>
- <dd>Specify the name and path of the configuration file, default <tt>/etc/ntp.conf</tt>.</dd>
- <dt><tt>-d</tt></dt>
- <dd>Specify debugging mode. This option may occur more than once, 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 frequency file. This is the same operation as the <tt>driftfile <i>driftfile</i></tt> command.</dd>
- <dt><tt>-g</tt></dt>
- <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.</dd>
- <dt><tt>-i <i>jaildir</i></tt></dt>
- <dd>Chroot the server to the directory <i><tt>jaildir</tt></i>. This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges. You may need to also specify a <tt>-u</tt> option.</dd>
- <dt id="--interface"><tt>-I [<i>address</i> | <i>interface name</i>]</tt></dt>
- <dd>Open the network address given, or all the addresses associated with the given interface name. This option may appear multiple times. This option also implies not opening other addresses, except wildcard and localhost. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
- <dt><tt>-k <i>keyfile</i></tt></dt>
- <dd>Specify the name and path of the symmetric key file. This is the same operation as the <tt>keys <i>keyfile</i></tt> command.</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 file. This is the same operation as the <tt>logfile <i>logfile</i></tt> command.</dd>
- <dt id="--novirtualips"><tt>-L</tt></dt>
- <dd>Do not listen to virtual interfaces, defined as those with names containing a colon. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
- <dt><tt>-M</tt></dt>
- <dd>Raise scheduler precision to its maximum (1 msec) using timeBeginPeriod. (Windows only)</dd>
- <dt><tt>-n</tt></dt>
- <dd>Don't fork.</dd>
- <dt><tt>-N</tt></dt>
- <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the highest priority.</dd>
- <dt><tt>-p <i>pidfile</i></tt></dt>
- <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> command.</dd>
- <dt><tt>-P <i>priority</i></tt></dt>
- <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the specified priority.</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. Note: The kernel time discipline is disabled with this option.</dd>
- <dt><tt>-r <i>broadcastdelay</i></tt></dt>
- <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.</dd>
- <dt><tt>-s <i>statsdir</i></tt></dt>
- <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> command.</dd>
- <dt><tt>-t <i>key</i></tt></dt>
- <dd>Add a key number to the trusted key list. This option can occur more than once. This is the same operation as the <tt>trustedkey <i>key</i></tt> command.</dd>
- <dt><tt>-u <i>user[:group]</i> </tt></dt>
- <dd>Specify a user, and optionally a group, to switch to. This option is only available if the OS supports running the server without full root privileges. Currently, this option is supported under NetBSD (configure with <tt>--enable-clockctl</tt>) and Linux (configure with --<tt>enable-linuxcaps</tt>).</dd>
- <dt><tt>-U <i>interface update interval</i></tt></dt>
- <dd>Number of seconds to wait between interface list scans to pick up new and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.</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 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: The kernel time discipline is disabled with this option.</dd>
- <dt><tt>--pccfreq <i>frequency</i></tt></dt>
- <dd>Substitute processor cycle counter for QueryPerformanceCounter unconditionally
- using the given frequency (in Hz). <tt>--pccfreq</tt> can be used on systems
- which do not use the PCC to implement QueryPerformanceCounter
- and have a fixed PCC frequency. The frequency specified must
- be accurate within 0.5 percent. <tt>--usepcc</tt> is equivalent on many systems and should
- be tried first, as it does not require determining the frequency
- of the processor cycle counter. For x86-compatible processors, the PCC is
- also referred to as <tt>RDTSC</tt>, which is the assembly-language instruction to retrieve
- the current value.&nbsp; (Windows only)</dd>
- <dt><tt>--usepcc</tt></dt>
- <dd>Substitute processor cycle counter for QueryPerformanceCounter if they
- appear equivalent. This option should be used only if the PCC
- frequency is fixed. Power-saving functionality on many laptops varies the
- PCC frequency. (Windows only)</dd>
- </dl>
- <h4 id="cfg">The Configuration File</h4>
- <p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup 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 client, with servers determined by listening to broadcasts at run time.</p>
- <p>Usually, the configuration file is installed as<tt>/etc/ntp.conf</tt>, 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 command keyword followed by a list of option keywords separated by whitespace. Commands may not be continued over multiple lines. Options 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 options pages, 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="files">Files</h4>
- <table width="100%" border="1">
- <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%">none</td>
- <td width="20%"><tt>-f</tt></td>
- <td width="20%"><tt>driftfile</tt></td>
- </tr>
- <tr>
- <td width="30%">leapseconds file</td>
- <td width="30%">none</td>
- <td width="20%"></td>
- <td width="20%"><tt>leapfile</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>
- <h4 id="codes">Exit Codes</h4>
- <p>A non-zero exit code indicates an error. Any error messages are logged to the system log by default.</p>
- <p>The exit code is 0 only when <tt>ntpd</tt> is terminated by a signal, or when the <tt>-q</tt> option is used and <tt>ntpd</tt> successfully sets the system clock.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descr">Description</a></li>
+ <li class="inline"><a href="#cmd">Command Line Options</a></li>
+ <li class="inline"><a href="#cfg">The Configuration File</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</ul>
+<hr>
+<h4 id="synop">Synopsis</h4>
+<tt>ntpd [ -46aAbdDgLmnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>InterfaceOrAddress</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</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 that synchronizes the system clock to remote NTP time servers or local reference clocks. It is a complete implementation of NTP version 4 defined by RFC-5905, but also retains compatible with version 3 defined by RFC-1305 and versions 1 and 2, defined by RFC-1059 and RFC-1119, respectively. The program can operate in any of several modes, including client/server, symmetric and broadcast modes, and with both symmetric-key and public key-cryptography</p>
+<p>The <tt>ntpd</tt> program ordinarily requires a configuration file described on this page. It contains configuration commands described on the pages listed above. However a client can discover remote servers and configure them automatically. This makes it possible to deploy a fleet of workstations without specifying configuration details specific to the local environment. Further details are on the </p>
+<p>The <tt>ntpd</tt> program normally operates continuously while adjusting the system time and frequency, but in some cases this might not be practical. With the <tt>-q</tt> option <tt>ntpd</tt> operates as in continuous mode, but exits just after setting the clock for the first time. Most applications will probably want to specify the <tt>iburst</tt> option with the <tt>server</tt> command. With this option a volley of messages is exchanged to groom the data and set the clock in about ten seconds. If nothing is heard after a few minutes, the daemon times out and exits without setting the clock.</p>
+<h4 id="cmd">Command Line Options</h4>
+<dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of host names to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of host names to the IPv6 namespace.
+ <dt><tt>-a</tt></dt>
+ <dd>Require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>enable auth</tt> command and is the default.</dd>
+ <dt><tt>-A</tt></dt>
+ <dd>Do not require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>disable auth</tt> command and almost never a good idea.</dd>
+ <dt><tt>-b</tt></dt>
+ <dd>Enable the client to synchronize to broadcast servers.</dd>
+ <dt><tt>-c <i>conffile</i></tt></dt>
+ <dd>Specify the name and path of the configuration file. Without the option the default is <tt>/etc/ntp.conf</tt>.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd> Disable switching into daemon mode, so <tt>ntpd</tt> stays attached to the starting terminal which will get all the debugging printout. Also, ^C will kill it. This option may occur more than once, with each occurrence indicating greater detail of display.</dd>
+ <dt><tt>-D <i>level</i></tt></dt>
+ <dd>Specify debugging level directly, with <tt>level</tt> corresponding to the numbe of <tt>-d</tt> options..</dd>
+ <dt><tt>-f <i>driftfile</i></tt></dt>
+ <dd>Specify the name and path of the frequency file. This is the same operation as the <tt>driftfile <i>driftfile</i></tt> configuration command.
+ <dt><tt>-g</tt></dt>
+ <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.</dd>
+ <dt><tt>-i <i>jaildir</i></tt></dt>
+ <dd>Chroot the server to the directory <i><tt>jaildir</tt></i>. This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges. You may need to also specify a <tt>-u</tt> option.</dd>
+ <dt id="--interface"><tt>-I [<i>address</i> | <i>interface name</i>]</tt></dt>
+ <dd>Open the network address given, or all the addresses associated with the given interface name. This option may appear multiple times. This option also implies not opening other addresses, except wildcard and localhost. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
+ <dt><tt>-k <i>keyfile</i></tt></dt>
+ <dd>Specify the name and path of the symmetric key file. This is the same operation as the <tt>keys <i>keyfile</i></tt> command.</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 file. This is the same operation as the <tt>logfile <i>logfile</i></tt> command.</dd>
+ <dt id="--mdns"><tt>-m</tt></dt>
+ <dd>Once the system clock is synchronized, register with mDNS as an available server.</dd>
+ <dt id="--novirtualips"><tt>-L</tt></dt>
+ <dd>Do not listen to virtual interfaces, defined as those with names containing a colon. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
+ <dt><tt>-M</tt></dt>
+ <dd>Raise scheduler precision to its maximum (1 ms) using timeBeginPeriod. (Windows only)</dd>
+ <dt><tt>-n</tt></dt>
+ <dd>Don't fork.</dd>
+ <dt><tt>-N</tt></dt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the highest priority.</dd>
+ <dt><tt>-p <i>pidfile</i></tt></dt>
+ <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> command.</dd>
+ <dt><tt>-P <i>priority</i></tt></dt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the specified priority.</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. Note: The kernel time discipline is disabled with this option.</dd>
+ <dt><tt>-r <i>broadcastdelay</i></tt></dt>
+ <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.</dd>
+ <dt><tt>-s <i>statsdir</i></tt></dt>
+ <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> command.</dd>
+ <dt><tt>-t <i>key</i></tt></dt>
+ <dd>Add a key number to the trusted key list. This option can occur more than once. This is the same operation as the <tt>trustedkey <i>key</i></tt> command.</dd>
+ <dt><tt>-u <i>user[:group]</i> </tt></dt>
+ <dd>Specify a user, and optionally a group, to switch to. This option is only available if the OS supports running the server without full root privileges. Currently, this option is supported under NetBSD (configure with <tt>--enable-clockctl</tt>) and Linux (configure with --<tt>enable-linuxcaps</tt>).</dd>
+ <dt><tt>-U <i>interface update interval</i></tt></dt>
+ <dd>Number of seconds to wait between interface list scans to pick up old and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.</dd>
+ <dt><tt>-v <i>variable</i></tt><br>
+ <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 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: The kernel time discipline is disabled with this option.</dd>
+ <dt><tt>--pccfreq <i>frequency</i></tt></dt>
+ <dd>Substitute processor cycle counter for QueryPerformanceCounter unconditionally
+ using the given frequency (in Hz). <tt>--pccfreq</tt> can be used on systems
+ which do not use the PCC to implement QueryPerformanceCounter
+ and have a fixed PCC frequency. The frequency specified must
+ be accurate within 0.5 percent. <tt>--usepcc</tt> is equivalent on many systems and should
+ be tried first, as it does not require determining the frequency
+ of the processor cycle counter. For x86-compatible processors, the PCC is
+ also referred to as <tt>RDTSC</tt>, which is the assembly-language instruction to retrieve
+ the current value.&nbsp; (Windows only)</dd>
+ <dt><tt>--usepcc</tt></dt>
+ <dd>Substitute processor cycle counter for QueryPerformanceCounter if they
+ appear equivalent. This option should be used only if the PCC
+ frequency is fixed. Power-saving functionality on many laptops varies the
+ PCC frequency. (Windows only)</dd>
+</dl>
+<h4 id="cfg">The Configuration File</h4>
+<p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup 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 client, with servers determined by listening to broadcasts at run time.</p>
+<p>Usually, the configuration file is installed as<tt>/etc/ntp.conf</tt>, 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 command keyword followed by a list of option keywords separated by whitespace. Commands may not be continued over multiple lines. Options 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 options pages, 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="files">Files</h4>
+<table width="100%" border="1">
+ <tr>
+ <td width="30%">File</td>
+ <td width="30%">Default</td>
+ <td width="20%">Option</td>
+ <td width="20%">Option</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%"><tt>conffile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">frequency file</td>
+ <td width="30%">none</td>
+ <td width="20%"><tt>-f</tt></td>
+ <td width="20%"><tt>driftfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">leapseconds file</td>
+ <td width="30%">none</td>
+ <td width="20%"></td>
+ <td width="20%"><tt>leapfile</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%">none</td>
+ <td width="20%"><tt>keysdir</tt></td>
+ </tr>
+</table>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
</html>
diff --git a/html/ntpdate.html b/html/ntpdate.html
index 01d659f40054..9216b6c0526b 100644
--- a/html/ntpdate.html
+++ b/html/ntpdate.html
@@ -1,72 +1,81 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">18:44</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</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 [ -46bBdqsuv ] [ -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>
- <p><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>
- <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>. 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 +-500 ms. The default is to step the time using settimeofday() if the offset is greater than +-500 ms. Note that, if the offset is much greater than +-500 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 4. 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 for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize 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>Diagnostics</h4>
- <tt>ntpdate</tt>'s exit status is zero if it finds a server and updates the clock, and nonzero otherwise.
- <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>
-
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->9-Feb-2014 03:34<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<p>Disclaimer: This program has known bugs and deficiencies and nobody
+has volunteered to fix them in a long time. The good news is the
+functionality originally intended for this program is available in the <tt>ntpd</tt> and
+<tt>sntp</tt> programs. See the <a
+href="http://support.ntp.org/Dev/DeprecatingNtpdate">Deprecating
+<tt>ntpdate</tt> topic</a> in the NTP Support wiki
+for a thorough discussion and analysis of the issues.
+See the <tt>-q</tt> command line option in the <a
+href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>
+page and/or the <a href="sntp.html"><tt>sntp</tt> - Simple Network Time
+Protocol (SNTP) Client</a> page. After a suitable period of mourning, the <tt>ntpdate</tt> program will be retired from this distribution.</p>
+<h4>Synopsis</h4>
+<tt>ntpdate [ -46bBdqsuv ] [ -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>
+<p><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>
+<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, if the <tt>-u</tt> flag was not specified, 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></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <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>. 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></dt>
+ <dd>Force the time to always be slewed using the adjtime() system call, even if the measured offset is greater than +-500 ms. The default is to step the time using settimeofday() if the offset is greater than +-500 ms. Note that, if the offset is much greater than +-500 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></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 and using an unprivileged port. 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 outgoing packets as the integer
+ <i>version</i>, which can be 1, 2, 3 or 4. The default is 4. 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 for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the <tt>-d</tt> option always uses unprivileged ports.
+ <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>Diagnostics</h4>
+<tt>ntpdate</tt>'s exit status is zero if it finds a server and updates the clock, and nonzero otherwise.
+<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>
diff --git a/html/ntpdc.html b/html/ntpdc.html
index 2908653de00a..7a68dd2f7906 100644
--- a/html/ntpdc.html
+++ b/html/ntpdc.html
@@ -1,218 +1,178 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">01:11</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Saturday, November 24, 2007</csobj></p>
- <br clear="left">
- <h4>More Help</h4>
- <script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
- <hr>
- <h4>Synopsis</h4>
- <tt>ntpdc [ -46dilnps ] [ -c <i>command</i> ] [ <i>host</i> ] [ ... ]</tt>
- <h4>Description</h4>
- <p><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>
- <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>-d</tt>
- <dd>Turn on debugging mode.
- <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 from ntpdc to the host(s). This must
- correspond to a key number which the host/server has
- been configured to use for this purpose (server
- options: <tt>trustedkey</tt>, and
- <tt>requestkey</tt>). If authentication is not
- enabled on the host(s) for ntpdc
- commands, the command
- <tt>"keyid 0"</tt> should be given; otherwise the
- <i>keyid</i> of the next subsequent <tt>addpeer/addserver/broadcast
- </tt> command will
- be used.
- <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>milliseconds</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 after the 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>ifstats</tt>
- <dd>List interface statistics for interfaces used by ntpd for network communication.</dd>
- <dt><tt>ifreload</tt>
- <dd>Force rescan of current system interfaces. Outputs interface statistics for interfaces that could possibly change. Marks unchanged interfaces with <b>.</b>, added interfaces with <b>+</b> and deleted interfaces with <b>-</b>.</dd>
- <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> ] [
- <tt>minpoll# | prefer | iburst | burst | minpoll
- <i>N</i> | <tt>maxpoll</tt> <i>N</i> [...] </tt> ]</tt>
- <dt><tt>addpeer <i>peer_address</i> [
- <tt>prefer | iburst | burst | minpoll
- <i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt>
- <i>N</i> | <tt>version</tt> <i>N</i> [...] </tt> ]</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 <tt>keyid</tt>
- is nonzero, 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. If ntpdc's key number has not
- yet been set (<i>e.g.,</i> by the keyid
- command), it will be set to this value.
- The <tt>version#</tt> can be 1 through 4 and defaults to 3. The remaining
- options are either a numeric value for <tt>minpoll</tt> or
- literals <tt>prefer</tt>, <tt>iburst</tt>,
- <tt>burst</tt>, <tt>minpoll </tt><i>N</i>,
- <tt>keyid </tt><i>N</i>, <tt>version </tt> <i>N</i>, or
- <tt>maxpoll </tt><i>N</i> (where <i>N</i> is a numeric value), and have the action as specified in the
- <tt>peer</tt> configuration file command of
- ntpd. See the <a href="confopt.html">Server Options</a> page for further information.
- Each flag (or its absence) replaces the
- previous setting. 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.
- The <tt>dynamic</tt> keyword allows association configuration even when no suitable network interface is found at configuration time. The dynamic interface update mechanism may complete the configuration when new interfaces appear (e.g. WLAN/PPP interfaces) at a later time and thus render the association operable.
- <dt><tt>addserver <i>peer_address</i> [
- <i>keyid</i> ] [ <i>version</i> ] [
- <tt>minpoll# | prefer | iburst | burst | minpoll
- <i>N</i> | <tt>maxpoll</tt> <i>N</i> [...] </tt> ]</tt>
- <dt><tt>addserver <i>peer_address</i> [
- <tt>prefer | iburst | burst | minpoll
- <i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt>
- <i>N</i> | <tt>version</tt> <i>N</i> [...] </tt> ]</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 non-zero 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>
-
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpdc - special NTP query program</title>
+<!-- Changed by: Harlan &, 31-Jan-2014 -->
+<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, deprecated puppy.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<hr>
+<h4>Synopsis</h4>
+<tt>ntpdc [ -46dilnps ] [ -c <i>command</i> ] [ <i>host</i> ] [ ... ]</tt>
+<h4>Description</h4>
+<p><tt>ntpdc</tt> is deprecated - please use <tt>ntpq</tt> now, as it uses a more sane interface and can provide all of the information that <tt>ntpdc</tt> used to provide.</p>
+<p><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>
+<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></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <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>-d</tt>
+ <dd>Turn on debugging mode.
+ <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>
+<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></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>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 from ntpdc to the host(s). This must
+ correspond to a key number which the host/server has
+ been configured to use for this purpose (server
+ options: <tt>trustedkey</tt>, and <tt>requestkey</tt>). If authentication is not
+ enabled on the host(s) for ntpdc
+ commands, the command <tt>&quot;keyid 0&quot;</tt> should be given; otherwise the <i>keyid</i> of the next subsequent <tt>addpeer/addserver/broadcast </tt> command will
+ be used.</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>milliseconds</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>
+<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></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 synchronization 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.</dd>
+ <dd>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.</dd>
+ <dd>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.</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>clockstat <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.</dd>
+ <dd>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.</dd>
+ <dd>Note that some directives, like <tt>enable pps</tt>, are only supported on certain versions of <tt>ntpd</tt>.</dd>
+ <dd>The <tt>stability</tt> is the residual frequency error remaining after the 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.</dd>
+ <dd>The <tt>broadcastdelay</tt> shows the default broadcast delay, as set by the <tt>broadcastdelay</tt> configuration command.</dd>
+ <dd>The <tt>authdelay</tt> shows the default authentication delay, as set by the <tt>authdelay</tt> configuration command.</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>ifstats</tt></dt>
+ <dd>List interface statistics for interfaces used by ntpd for network communication.</dd>
+ <dt><tt>ifreload</tt></dt>
+ <dd>Force rescan of current system interfaces. Outputs interface statistics for interfaces that could possibly change. Marks unchanged interfaces with <b>.</b>, added interfaces with <b>+</b> and deleted interfaces with <b>-</b>.</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. At most, 600 entries are displayed by <tt>monlist</tt>. To display the entire MRU list, use the <tt>ntpq</tt> program's <a href="ntpq.html#mrulist"><tt>mrulist</tt></a> command.</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>
+<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> ] [ <tt>minpoll# | prefer | minpoll <i>N</i> | <tt>maxpoll</tt> <i>N</i> [...] ]</tt></tt></dt>
+ <dt><tt>addpeer <i>peer_address</i> [ <tt>prefer | minpoll <i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt> <i>N</i> | <tt>version</tt> <i>N</i> [...] ]</tt></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 <tt>keyid</tt> is nonzero, 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. If ntpdc's key number has not yet been set (<i>e.g.,</i> by the keyid command), it will be set to this value. The <tt>version#</tt> can be 1 through 4 and defaults to 3. The remaining options are either a numeric value for <tt>minpoll</tt> or literals <tt>prefer</tt>, <tt>burst</tt>, <tt>minpoll </tt><i>N</i>, <tt>keyid </tt><i>N</i>, <tt>version </tt> <i>N</i>, or <tt>maxpoll </tt><i>N</i> (where <i>N</i> is a numeric value), and have the action as specified in the <tt>peer</tt> configuration file command of
+ ntpd. See the <a href="confopt.html">Server Options</a> page for further information. Each flag (or its absence) replaces the previous setting. 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. The <tt>dynamic</tt> keyword allows association configuration even when no suitable network interface is found at configuration time. The dynamic interface update mechanism may complete the configuration when new interfaces appear (e.g. WLAN/PPP interfaces) at a later time and thus render the association operable.</dd>
+ <dt><tt>addserver <i>peer_address</i> [ <i>address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ minpoll | prefer | iburst | burst | minpoll <i>N</i> | maxpoll <i>N</i> [...] ] prefer | iburst | burst | minpoll <i>N</i> | maxpoll <i>N</i> | keyid <i>N</i> | version <i>N</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 non-zero 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 [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
+ <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</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>. See the <a href="miscopt.html">Miscellaneous Options</a> page for further information.</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>
+<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/html/ntpdsim.html b/html/ntpdsim.html
index 2fcfebf5fd85..3f823dfc663c 100644
--- a/html/ntpdsim.html
+++ b/html/ntpdsim.html
@@ -1,73 +1,71 @@
<!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="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/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
- <p>All in a row.</p>
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">15:55</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/manual.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/%7emills/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/*
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>All in a row.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descr">Description</a></li>
+ <li class="inline"><a href="#cmd">Command Line Oprionts</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</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/%7emills/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
+<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>Note:&nbsp;The NTP&nbsp;development team is moving to the use of a syntax-directed configuration file design. When complete these options will be replaced by a <a href="ntpdsim_new.html">new one</a>. 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
+<h4 id="cmd">Command Line Options</h4>
+<dl>
+ <dt>Note: The NTP development team is moving to the use of a syntax-directed configuration file design. When complete these options will be replaced by a <a href="ntpdsim_new.html">new one</a>. 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>
+ <dt><tt>-B <i>bdly</i></tt></dt>
+ <dd>Specify beep delay (3600) s.</dd>
+ <dt><tt>-C <i>snse</i></tt></dt>
+ <dd>Specify network jitter parameter (0) s.</dd>
+ <dt><tt>-O <i>clk_time</i></tt></dt>
+ <dd>Specify initial time offset (0) s.</dd>
+ <dt><tt>-S <i>sim_time</i></tt></dt>
+ <dd>Specify simulation duration (86400) s.</dd>
+ <dt><tt>-T <i>ferr</i></tt></dt>
+ <dd>Specify initial frequency offset (0) PPM.</dd>
+ <dt><tt>-W <i>fnse</i></tt></dt>
+ <dd>Specify oscillator wander parameter (0) PPM/s.</dd>
+ <dt><tt>-Y <i>ndly</i></tt></dt>
+ <dd>Specify network propagation delay (.001) s.</dd>
+ <dt><tt>-Z <i>pdly</i></tt></dt>
+ <dd>Specify server processing delay (.001) s.</dd>
+</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>
diff --git a/html/ntpdsim_new.html b/html/ntpdsim_new.html
index 726ec9bb0009..54c67438ac80 100644
--- a/html/ntpdsim_new.html
+++ b/html/ntpdsim_new.html
@@ -1,54 +1,54 @@
<!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="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/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
- <p>All in a row.</p>
- <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">15:56</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li><a href="#description">Description</a><br>
- <li><a href="#configuration">Configuration</a>
- <li><a href="#sample">Sample Configuration File</a>
- </ul>
- <h4 id="description">Description</h4>
- <p>The ntpdsim program is used to simulate and study the behavior of an NTP daemon that derives its time from a number of different simulated time sources (servers). Each simulated server can be configured to have a different time offset, frequency offset, propagation delay, processing delay, network jitter and oscillator wander.</p>
- <p>The ntpdsim program runs all the same selection, mitigation, and discipline
- algorithms as the actual ntpd daemon at the client. (It actually
- uses the same code). However, the input/output routines and servers are simulated.
- That is, instead of sending the client messages over the network
- to the actual servers, the client messages are intercepted by the ntpdsim
- program, which then generates the replies to those messages. The reply messages
- are carefully &quot;inserted&quot; into the input queue of the client at the right time
- according to the specified server properties (like propagation delay).</p>
- <p>Each simulated server runs according to a specified script that describes the server properties at a particular time. Each script consists of a series of consecutive acts. Each act runs for a particular duration and specifies the frequency offset, propagation delay, processing delay, network jitter and oscillator wander of the server for that duration. Once the duration of an act expires, the simulated server reconfigures itself according to the properties specified in the next act.</p>
- <h4 id="configuration">Configuration</h4>
- <p>The ntpdsim program is configured by providing a configuration file at startup. The crux of the simulator configuration is specified using a <tt>simulate</tt> command, the syntax of which is given below. Note that all time quantities are in seconds and all frequency quantities are in parts per million (PPM):</p>
- <p>&lt;<i>simulate_command</i>&gt; ::= <tt>simulate</tt> { &lt;<i>init_statement_list</i>&gt; &lt;<i>server_list</i>&gt; }<br>
- &lt;<i>init_statement_list</i>&gt; ::= &lt;init_statement_list&gt; &lt;init_statement&gt; | &lt;init_statement&gt;<br>
- &lt;<i>init_statement</i>&gt; ::= <tt>beep_delay</tt> = &lt;number&gt; | <tt>simulation_duration</tt> = &lt;number&gt;<br>
- &lt;<i>server_list</i>&gt; ::= &lt;<i>server_list</i>&gt; &lt;server&gt; | &lt;server&gt;<br>
- &lt;<i>server_list</i>&gt; ::= <tt>server</tt> = &lt;address&gt; { <tt>server_offset</tt> = &lt;number&gt; &lt;act_list&gt; }<br>
- &lt;<i>act_list</i>&gt; ::= &lt;<i>act_list</i>&gt; &lt;<i>act</i>&gt; | &lt;<i>act</i>&gt;<br>
- &lt;<i>act</i>&gt; ::= <tt>duration</tt> = &lt;number&gt; { &lt;<i>act_stmt_list</i>&gt; }<br>
- &lt;<i>act_stmt_list</i>&gt; ::= &lt;<i>act_stmt_list</i>&gt; &lt;<i>act_stmt</i>&gt; | &lt;<i>act_stmt</i>&gt;<br>
- &lt;<i>act_stmt</i>&gt; ::= <tt>freq_offset</tt> = &lt;number&gt; | <tt>wander</tt> = &lt;number&gt; | <tt>jitter</tt> = &lt;number&gt; | <tt>prop_delay</tt> = &lt;number&gt; | <tt>proc_delay</tt> = &lt;number&gt;</p>
- <p>In addition to the simulate command, other standard NTP configuration commands can be specified. These commands have the same meaning as in the ntpd configuration. Note that newlines are <b>not</b> significant within the simulate command even though they are used to mark the end of a normal NTP configuration command.</p>
- <h4 id="sample">Sample Configuration File</h4>
- <p>A sample ntpdsim configuration file is given below. It specifies two simulated servers, each of which has two acts.</p>
- <pre>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>All in a row.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li><a href="#description">Description</a></li>
+ <li><a href="#configuration">Configuration</a></li>
+ <li><a href="#sample">Sample Configuration File</a></li>
+</ul>
+<hr>
+<h4 id="description">Description</h4>
+<p>The ntpdsim program is used to simulate and study the behavior of an NTP daemon that derives its time from a number of different simulated time sources (servers). Each simulated server can be configured to have a different time offset, frequency offset, propagation delay, processing delay, network jitter and oscillator wander.</p>
+<p>The ntpdsim program runs all the same selection, mitigation, and discipline
+ algorithms as the actual ntpd daemon at the client. (It actually
+ uses the same code). However, the input/output routines and servers are simulated.
+ That is, instead of sending the client messages over the network
+ to the actual servers, the client messages are intercepted by the ntpdsim
+ program, which then generates the replies to those messages. The reply messages
+ are carefully &quot;inserted&quot; into the input queue of the client at the right time
+ according to the specified server properties (like propagation delay).</p>
+<p>Each simulated server runs according to a specified script that describes the server properties at a particular time. Each script consists of a series of consecutive acts. Each act runs for a particular duration and specifies the frequency offset, propagation delay, processing delay, network jitter and oscillator wander of the server for that duration. Once the duration of an act expires, the simulated server reconfigures itself according to the properties specified in the next act.</p>
+<h4 id="configuration">Configuration</h4>
+<p>The ntpdsim program is configured by providing a configuration file at startup. The crux of the simulator configuration is specified using a <tt>simulate</tt> command, the syntax of which is given below. Note that all time quantities are in seconds and all frequency quantities are in parts per million (PPM):</p>
+<p>&lt;<i>simulate_command</i>&gt; ::= <tt>simulate</tt> { &lt;<i>init_statement_list</i>&gt; &lt;<i>server_list</i>&gt; }<br>
+ &lt;<i>init_statement_list</i>&gt; ::= &lt;init_statement_list&gt; &lt;init_statement&gt; ; | &lt;init_statement&gt; ;<br>
+ &lt;<i>init_statement</i>&gt; ::= <tt>beep_delay</tt> = &lt;number&gt; | <tt>simulation_duration</tt> = &lt;number&gt;<br>
+ &lt;<i>server_list</i>&gt; ::= &lt;<i>server_list</i>&gt; &lt;server&gt; | &lt;server&gt;<br>
+ &lt;<i>server_list</i>&gt; ::= <tt>server</tt> = &lt;address&gt; { <tt>server_offset</tt> = &lt;number&gt; ; &lt;act_list&gt; }<br>
+ &lt;<i>act_list</i>&gt; ::= &lt;<i>act_list</i>&gt; &lt;<i>act</i>&gt; | &lt;<i>act</i>&gt;<br>
+ &lt;<i>act</i>&gt; ::= <tt>duration</tt> = &lt;number&gt; { &lt;<i>act_stmt_list</i>&gt; }<br>
+ &lt;<i>act_stmt_list</i>&gt; ::= &lt;<i>act_stmt_list</i>&gt; &lt;<i>act_stmt</i>&gt; ; | &lt;<i>act_stmt</i>&gt; ;<br>
+ &lt;<i>act_stmt</i>&gt; ::= <tt>freq_offset</tt> = &lt;number&gt; | <tt>wander</tt> = &lt;number&gt; | <tt>jitter</tt> = &lt;number&gt; | <tt>prop_delay</tt> = &lt;number&gt; | <tt>proc_delay</tt> = &lt;number&gt;</p>
+<p>In addition to the <tt>simulate</tt> command, other standard NTP configuration commands can be specified. These commands have the same meaning as in the ntpd configuration. Note that newlines are <b>not</b> significant within the <tt>simulate</tt> command even though they are used to mark the end of a normal NTP configuration command. While a newline is an "end of command" terminator for other configuration commands, in the <tt>simulate</tt> stanza <tt>;</tt> (the semicolon) is the "end of command" terminator.</p>
+<h4 id="sample">Sample Configuration File</h4>
+<p>A sample ntpdsim configuration file is given below. It specifies two simulated servers, each of which has two acts.</p>
+<pre>
# Client configuration
disable kernel
server pogo
@@ -59,51 +59,52 @@
# Simulation configuration
simulate {
- simulation_duration = 86400
- beep_delay = 3600
+ simulation_duration = 86400;
+ beep_delay = 3600;
# Server 1
server = louie.udel.edu {
- server_offset = 0
+ server_offset = 0;
duration = 50000 {
- freq_offset = 400
- wander = 1.0
- jitter = 0.001
- prop_delay = 0.001
- proc_delay = 0.001
+ freq_offset = 400;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.001;
+ proc_delay = 0.001;
}
duration = 6400 {
- freq_offset = 200
- wander = 1.0
- jitter = 0.001
- prop_delay = 0.001
- proc_delay = 0.001
+ freq_offset = 200;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.001;
+ proc_delay = 0.001;
}
}
# Server 2
server = baldwin.udel.edu {
- server_offset = 0.02
+ server_offset = 0.02;
duration = 10000 {
- freq_offset = 400
- wander = 1.0
- jitter = 0.001
- prop_delay = 0.5
- proc_delay = 0.001
+ freq_offset = 400;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.5;
+ proc_delay = 0.001;
}
duration = 60000 {
- freq_offset = 200
- wander = 1.0
- jitter = 0.05
- prop_delay = 0.005
- proc_delay = 0.001
+ freq_offset = 200;
+ wander = 1.0;
+ jitter = 0.05;
+ prop_delay = 0.005;
+ proc_delay = 0.001;
}
}
- }
+ }
</pre>
- <hr>
- <address><a href="mailto:skamboj@udel.edu">Sachin Kamboj</a></address>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
+<hr>
+<address>
+<a href="mailto:skamboj@udel.edu">Sachin Kamboj</a>
+</address>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
</html>
diff --git a/html/ntpq.html b/html/ntpq.html
index cf0ff0602cb9..1aa8df3fcd29 100644
--- a/html/ntpq.html
+++ b/html/ntpq.html
@@ -1,594 +1,654 @@
<!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="HTML Tidy, see www.w3.org">
- <title>ntpq - standard NTP query program</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
- <!-- #BeginDate format:En2m -->04-Nov-2009 0:12<!-- #EndDate -->
- UTC</p>
+<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:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>More Help</h4>
- <script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
- <hr>
- <h4>Synopsis</h4>
- <tt>ntpq [-46dinp] [-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
- variable names 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></dt>
- <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
- <dt><tt>-6</tt></dt>
- <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
- <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>-d</tt></dt>
- <dd>Turn on debugging mode.</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>
- <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>help [<i>command_keyword</i>]</tt></dt>
- <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command.</dd>
- <dt><tt>addvars <i>name</i> [ = <i>value</i>] [...]</tt><br>
- <tt>rmvars <i>name</i> [...]</tt><br>
- <tt>clearvars</tt></dt>
- <dd>The arguments to this command consist of a list of items of the form <tt><i>name</i> = <i>value</i></tt>, where the <tt>= <i>value</i></tt> is ignored, and can be omitted in read requests. <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 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>cooked</tt></dt>
- <dd>Display server messages in prettyprint format.</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>name</i></tt></dt>
- <dd>Set the host to which future queries will be sent. The name may be either a DNS 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 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.</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 2, Note that mode-6 control messages (and modes, for that matter) didn't exist in NTP version 1.</dd>
- <dt><tt>passwd</tt></dt>
- <dd>This command prompts for a password to authenticate configuration requests. The password must correspond to the key configured for NTP server for this purpose.</dd>
- <dt><tt>quit</tt></dt>
- <dd>Exit <tt>ntpq</tt>.</dd>
- <dt><tt>raw</tt></dt>
- <dd>Display server messages as received and without reformatting.</dd>
- <dt><tt>timeout <i>milliseconds</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>
- <p>Association IDs are used to identify system, peer and clock variables. System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. Most control commands send a single mode-6 message to the server and expect a single response message. The exceptions are the <tt>peers</tt> command, which sends a series of messages, and the <tt>mreadlist</tt> and <tt>mreadvar</tt> commands, which iterate over a range of associations.</p>
- <dl>
- <dt id="as"><tt>associations</tt></dt>
- <dd>Display a list of mobilized associations in the form</dd>
- <dd><tt>ind assid status conf reach auth condition last_event cnt</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>ind</tt></td>
- <td>index on this list</td>
- </tr>
- <tr>
- <td><tt>assid</tt></td>
- <td>association ID</td>
- </tr>
- <tr>
- <td><tt>status</tt></td>
- <td><a href="decode.html#peer">peer status word</a></td>
- </tr>
- <tr>
- <td><tt>conf</tt></td>
- <td><tt>yes</tt>: persistent, <tt>no</tt>: ephemeral</td>
- </tr>
- <tr>
- <td><tt>reach</tt></td>
- <td><tt>yes</tt>: reachable, <tt>no</tt>: unreachable</td>
- </tr>
- <tr>
- <td><tt>auth</tt></td>
- <td><tt>ok</tt>, <tt>yes</tt>, <tt>bad</tt> and <tt>none</tt></td>
- </tr>
- <tr>
- <td><tt>condition</tt></td>
- <td>selection status (see the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
- </tr>
- <tr>
- <td><tt>last_event</tt></td>
- <td>event report (see the <tt>event</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
- </tr>
- <tr>
- <td><tt>cnt</tt></td>
- <td>event count (see the <tt>count</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
- </tr>
- </table>
- </dd>
- <dt><tt>clockvar <i>assocID</i> [<i>name</i> [ = <i>value</i> [...]] [...]</tt><br>
- <tt>cv <i>assocID</i> [<i>name</i> [ = <i>value</i> [...] ][...]</tt></dt>
- <dd>Display a list of <a href="#clock">clock variables</a> for those assocations supporting a reference clock.</dd>
- <dt><tt>:config [...]</tt></dt>
- <dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.</dd>
- <dt><tt>config-from-file <i>filename</i></tt></dt>
- <dd>Send the each line of <i>filename</i> to the server as run-time configuration commands in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.</dd>
- <dt><tt>keyid</tt></dt>
- <dd>Specify the key ID to use for write requests.</dd>
- <dt><tt>lassociations</tt></dt>
- <dd>Perform the same function as the associations command, execept display mobilized and unmobilized associations.</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>Perform the same function as the <tt>readvar</tt> command, except for a range of association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.</dd>
- <dt><tt>passociations</tt></dt>
- <dd>Perform the same function as the <tt>associations command</tt>, except that it uses previously stored data rather than making a new query.</dd>
- <dt><tt>passwd</tt></dt>
- <dd>Specify the password to use for write requests.</dd>
- <dt id="pe"><tt>peers</tt></dt>
- <dd>Display a list of peers in the form</dd>
- <dd><tt>[tally]remote refid st t when pool reach delay offset jitter</tt></dd>
- <dd>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>[tally]</tt></td>
- <td>single-character code indicating current value of the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a></td>
- </tr>
- <tr>
- <td><tt>remote</tt></td>
- <td>host name (or IP number) of peer</td>
- </tr>
- <tr>
- <td><tt>refid</tt></td>
- <td>association ID or <a href="decode.html#kiss">kiss code</a></td>
- </tr>
- <tr>
- <td><tt>st</tt></td>
- <td>stratum</td>
- </tr>
- <tr>
- <td><tt>t</tt></td>
- <td><tt>u</tt>: unicast, <tt>b</tt>: broadcast, <tt>l</tt>: local</td>
- </tr>
- <tr>
- <td><tt>when</tt></td>
- <td>sec/min/hr since last received packet</td>
- </tr>
- <tr>
- <td><tt>poll</tt></td>
- <td>poll interval (log<sub>2</sub> s)</td>
- </tr>
- <tr>
- <td><tt>reach</tt></td>
- <td>reach shift register (octal)</td>
- </tr>
- <tr>
- <td><tt>delay</tt></td>
- <td>roundtrip delay</td>
- </tr>
- <tr>
- <td><tt>offset</tt></td>
- <td>offset</td>
- </tr>
- <tr>
- <td><tt>jitter</tt></td>
- <td>jitter</td>
- </tr>
- </table>
- </dd>
- <dt id="rv"><tt>readvar <i>assocID</i> <i>name</i> [ = <i>value</i> ] [,...]</tt><br>
- <tt>rv <i>assocID</i> [ <i>name</i> ] [,...]</tt></dt>
- <dd>Display the specified variables. If <tt><i>assocID</i></tt> is zero, the
- variables are from the <a href="#system">system variables</a> name space,
- otherwise they are from the <a href="#peer">peer variables</a> name space.
- The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces. If no <tt><i>name</i></tt> is
- included, all operative variables in the name space are displayed.
- In this case only, if the <tt><i>assocID</i></tt> is omitted, it is assumed zero. Multiple
- names are specified with comma separators and without whitespace.
- Note that time values are represented in milliseconds and frequency
- values in parts-per-million (PPM). Some NTP timestamps are represented
- in the format YYYYMMDDTTTT, where YYYY is the year, MM the month
- of year, DD the day of month and TTTT the time of day.</dd>
- <dt id="saveconfig"><tt>saveconfig <i>filename</i></tt></dt>
- <dd>Write the current configuration, including any runtime modifications given with <tt>:config</tt> or <tt>config-from-file</tt>, to the ntpd host's file <i>filename</i>. This command will be rejected by the server unless <a href="miscopt.html#saveconfigdir">saveconfigdir</a> appears in the <tt>ntpd</tt> configuration file. <i>filename</i> can use strftime() format specifiers to substitute the current date and time, for example, <tt>saveconfig ntp-%Y%m%d-%H%M%S.conf</tt>. The filename used is stored in system variable <tt>savedconfig</tt>. Authentication is required.</dd>
- <dt><tt>writevar <i>assocID</i> <i>name</i> = <i>value</i> [,...]</tt></dt>
- <dd>Write the specified variables. If the <tt><i>assocID</i></tt> is zero, the variables
- are from the <a href="#system">system variables</a> name space, otherwise they are from the <a href="#peer">peer variables</a> name space. The <tt><i>assocID</i></tt> is required, as the same name can occur
- in both spaces.</dd>
- </dl>
- <h4 id="status">Status Words and Kiss Codes</h4>
- <p>The current state of the operating program is shown in a set of status words maintained by the system and each association separately. These words are displayed in the <tt>rv</tt> and <tt>as</tt> commands both in hexadecimal and decoded short tip strings. The codes, tips and short explanations are on the <a href="decode.html">Event Messages and Status Words</a> page. The page also includes a list of system and peer messages, the code for the latest of which is included in the status word.</p>
- <p>Information resulting from protocol machine state transitions is displayed using an informal set of ASCII strings called <a href="decode.html#kiss">kiss codes</a>. The original purpose was for kiss-o'-death (KoD) packets sent by the server to advise the client of an unusual condition. They are now displayed, when appropriate, in the reference identifier field in various billboards.</p>
- <h4 id="system">System Variables</h4>
- <p>The following system variables appear in the <tt>rv</tt> billboard. Not all variables are displayed in some configurations.</p>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>status</tt></td>
- <td><a href="decode.html#sys">system status word</a></td>
- </tr>
- <tr>
- <td><tt>version</tt></td>
- <td>NTP software version and build time</td>
- </tr>
- <tr>
- <td><tt>processor</tt></td>
- <td>hardware platform and version</td>
- </tr>
- <tr>
- <td><tt>system</tt></td>
- <td>operating system and version</td>
- </tr>
- <tr>
- <td><tt>leap</tt></td>
- <td>leap warning indicator (0-3)</td>
- </tr>
- <tr>
- <td><tt>stratum</tt></td>
- <td>stratum (1-15)</td>
- </tr>
- <tr>
- <td><tt>precision</tt></td>
- <td>precision (log<sub>2</sub> s)</td>
- </tr>
- <tr>
- <td><tt>rootdelay</tt></td>
- <td>total roundtrip delay to the primary reference clock</td>
- </tr>
- <tr>
- <td><tt>rootdisp</tt></td>
- <td>total dispersion to the primary reference clock</td>
- </tr>
- <tr>
- <td><tt>peer</tt></td>
- <td>system peer association ID</td>
- </tr>
- <tr>
- <td><tt>tc</tt></td>
- <td>time constant and poll exponent (log<sub>2</sub> s) (3-17)</td>
- </tr>
- <tr>
- <td><tt>mintc</tt></td>
- <td>minimum time constant (log<sub>2</sub> s) (3-10)</td>
- </tr>
- <tr>
- <td><tt>clock</tt></td>
- <td>date and time of day</td>
- </tr>
- <tr>
- <td><tt>refid</tt></td>
- <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
- </tr>
- <tr>
- <td><tt>reftime</tt></td>
- <td>reference time</td>
- </tr>
- <tr>
- <td><tt>offset</tt></td>
- <td>combined time offset</td>
- </tr>
- <tr>
- <td><tt>sys_jitter</tt></td>
- <td>combined system jitter</td>
- </tr>
- <tr>
- <td><tt>frequency</tt></td>
- <td>clock frequency offset (PPM)</td>
- </tr>
- <tr>
- <td><tt>clk_wander</tt></td>
- <td>clock frequency wander (PPM)</td>
- </tr>
- <tr>
- <td><tt>clk_jitter</tt></td>
- <td>clock jitter</td>
- </tr>
- <tr>
- <td><tt>tai</tt></td>
- <td>TAI-UTC offset (s)</td>
- </tr>
- <tr>
- <td><tt>leapsec</tt></td>
- <td>NTP seconds when the next leap second is/was inserted</td>
- </tr>
- <tr>
- <td><tt>expire</tt></td>
- <td>NTP seconds when the NIST leapseconds file expires</td>
- </tr>
- </table>
- <dl>
- <dt>The jitter and wander statistics are exponentially-weighted RMS averages.
- The system jitter is defined in the NTPv4 specification; the
- clock jitter statistic is computed by the clock discipline module.</dt>
- <dt>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 Autokey dance:</dt>
- </dl>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>host</tt></td>
- <td>Autokey host name</td>
- </tr>
- <tr>
- <td><tt>group</tt></td>
- <td>Autokey group name</td>
- </tr>
- <tr>
- <td><tt>flags</tt></td>
- <td>host flags (see Autokey specification)</td>
- </tr>
- <tr>
- <td><tt>digest</tt></td>
- <td>OpenSSL message digest algorithm</td>
- </tr>
- <tr>
- <td><tt>signature</tt></td>
- <td>OpenSSL digest/signature scheme</td>
- </tr>
- <tr>
- <td><tt>update</tt></td>
- <td>NTP seconds at last signature update</td>
- </tr>
- <tr>
- <td><tt>cert</tt></td>
- <td>certificate subject, issuer and certificate flags</td>
- </tr>
- <tr>
- <td><tt>until</tt></td>
- <td>NTP seconds when the certificate expires</td>
- </tr>
- </table>
- <h4 id="peer">Peer Variables</h4>
- <p>The following system variables apear in the <tt>rv</tt> billboard for each association. Not all variables are displayed in some configurations.</p>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>associd</tt></td>
- <td>association ID</td>
- </tr>
- <tr>
- <td><tt>status</tt></td>
- <td><a href="decode.html#peer">peer status word</a></td>
- </tr>
- <tr>
- <td><tt>srcadr<br>
- srcport</tt></td>
- <td>source (remote) IP address and port</td>
- </tr>
- <tr>
- <td><tt>dstadr<br>
- dstport</tt></td>
- <td>destination (local) IP address and port</td>
- </tr>
- <tr>
- <td><tt>leap</tt></td>
- <td>leap indicator (0-3)</td>
- </tr>
- <tr>
- <td><tt>stratum</tt></td>
- <td>stratum (0-15)</td>
- </tr>
- <tr>
- <td><tt>precision</tt></td>
- <td>precision (log<sub>2</sub> s)</td>
- </tr>
- <tr>
- <td><tt>rootdelay</tt></td>
- <td>total roundtrip delay to the primary reference clock</td>
- </tr>
- <tr>
- <td><tt>rootdisp</tt></td>
- <td>total root dispersion to the primary reference clock</td>
- </tr>
- <tr>
- <td><tt>refid</tt></td>
- <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
- </tr>
- <tr>
- <td><tt>reftime</tt></td>
- <td>reference time</td>
- </tr>
- <tr>
- <td><tt>reach</tt></td>
- <td>reach register (octal)</td>
- </tr>
- <tr>
- <td><tt>unreach</tt></td>
- <td>unreach counter</td>
- </tr>
- <tr>
- <td><tt>hmode</tt></td>
- <td>host mode (1-6)</td>
- </tr>
- <tr>
- <td><tt>pmode</tt></td>
- <td>peer mode (1-5)</td>
- </tr>
- <tr>
- <td><tt>hpoll</tt></td>
- <td>host poll exponent (log<sub>2</sub> s) (3-17)</td>
- </tr>
- <tr>
- <td><tt>ppoll</tt></td>
- <td>peer poll exponent (log<sub>2</sub> s) (3-17)</td>
- </tr>
- <tr>
- <td><tt>headway</tt></td>
- <td>headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet)</a></td>
- </tr>
- <tr>
- <td><tt>flash</tt></td>
- <td><a href="decode.html#flash">flash status word</a></td>
- </tr>
- <tr>
- <td><tt>offset</tt></td>
- <td>filter offset</td>
- </tr>
- <tr>
- <td><tt>delay</tt></td>
- <td>filter delay</td>
- </tr>
- <tr>
- <td><tt>dispersion</tt></td>
- <td>filter dispersion</td>
- </tr>
- <tr>
- <td><tt>jitter</tt></td>
- <td>filter jitter</td>
- </tr>
- <tr>
- <td><tt>bias</tt></td>
- <td>unicast/broadcast bias</td>
- </tr>
- <tr>
- <td><tt>xleave</tt></td>
- <td>interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td>
- </tr>
- </table>
- <p>The bias vaqriable is calculated when the first broadcast packet is received
- after the calibration volley. It represents the offset of the broadcast
- subgraph relative to the unicast subgraph. The xleave variable appears
- only the interleaved symmetric and ingterleaved modes. It represents
- the internal queueing, buffering and transmission delays for the preceeding
- packet.</p>
- <p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
+<h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<hr>
+<h4>Synopsis</h4>
+<tt>ntpq [-46dinp] [-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
+ variable names 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></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <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>-d</tt></dt>
+ <dd>Turn on debugging mode.</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>
+<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 id="help"><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 <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command.</dd>
+ <dt id="addvars"><tt>addvars <i>name</i> [ = <i>value</i>] [...]</tt><br>
+ <tt>rmvars <i>name</i> [...]</tt><br>
+ <tt>clearvars</tt></dt>
+ <dd>The arguments to this command consist of a list of items of the form <tt><i>name</i> = <i>value</i></tt>, where the <tt>= <i>value</i></tt> is ignored, and can be omitted in read requests. <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 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 id="cooked"><tt>cooked</tt></dt>
+ <dd>Display server messages in prettyprint format.</dd>
+ <dt id="debug"><tt>debug more | less | off</tt></dt>
+ <dd>Turns internal query program debugging on and off.</dd>
+ <dt id="delay"><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 id="host"><tt>host <i>name</i></tt></dt>
+ <dd>Set the host to which future queries will be sent. The name may be either a DNS name or a numeric address.</dd>
+ <dt id="hostnames"><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 id="keyid"><tt>keyid <i>keyid</i></tt></dt>
+ <dd>This command specifies the key number to be used to authenticate configuration requests. This must correspond to a key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
+ <dt id="keytype"><tt>keytype</tt></dt>
+ <dd>Specify the digest algorithm to use for authenticated requests, with default <tt>MD5</tt>. If the OpenSSL library is installed, digest can be be any message digest algorithm supported by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5</tt>, <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>.</dd>
+ <dt id="ntpversion"><tt>ntpversion 1 | 2 | 3 | 4</tt></dt>
+ <dd>Sets the NTP version number which <tt>ntpq</tt> claims in packets. Defaults to 2, Note that mode-6 control messages (and modes, for that matter) didn't exist in NTP version 1.</dd>
+ <dt id="passwd"><tt>passwd</tt></dt>
+ <dd>This command prompts for a password to authenticate requests. The password must correspond to the key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
+ <dt id="quit"><tt>quit</tt></dt>
+ <dd>Exit <tt>ntpq</tt>.</dd>
+ <dt id="raw"><tt>raw</tt></dt>
+ <dd>Display server messages as received and without reformatting.</dd>
+ <dt id="timeout"><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>
+<p>Association IDs are used to identify system, peer and clock variables. System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. Most control commands send a single mode-6 message to the server and expect a single response message. The exceptions are the <tt>peers</tt> command, which sends a series of messages, and the <tt>mreadlist</tt> and <tt>mreadvar</tt> commands, which iterate over a range of associations.</p>
+<dl>
+ <dt id="as"><tt>associations</tt></dt>
+ <dd>Display a list of mobilized associations in the form</dd>
+ <dd><tt>ind assid status conf reach auth condition last_event cnt</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>ind</tt></td>
+ <td>index on this list</td>
+ </tr>
+ <tr>
+ <td><tt>assid</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>conf</tt></td>
+ <td><tt>yes</tt>: persistent, <tt>no</tt>: ephemeral</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td><tt>yes</tt>: reachable, <tt>no</tt>: unreachable</td>
+ </tr>
+ <tr>
+ <td><tt>auth</tt></td>
+ <td><tt>ok</tt>, <tt>yes</tt>, <tt>bad</tt> and <tt>none</tt></td>
+ </tr>
+ <tr>
+ <td><tt>condition</tt></td>
+ <td>selection status (see the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ <tr>
+ <td><tt>last_event</tt></td>
+ <td>event report (see the <tt>event</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ <tr>
+ <td><tt>cnt</tt></td>
+ <td>event count (see the <tt>count</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="cv"><tt>clockvar <i>assocID</i> [<i>name</i> [ = <i>value</i> [...]] [...]</tt><br>
+ <tt>cv <i>assocID</i> [<i>name</i> [ = <i>value</i> [...] ][...]</tt></dt>
+ <dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock.</dd>
+ <dt id=":config"><tt>:config [...]</tt></dt>
+ <dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.</dd>
+ <dt id="config-from-file"><tt>config-from-file <i>filename</i></tt></dt>
+ <dd>Send the each line of <i>filename</i> to the server as run-time configuration commands in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is required.</dd>
+ <dt id="ifstats"><tt>ifstats</tt></dt>
+ <dd>Display statistics for each local network address. Authentication is required.</dd>
+ <dt id="iostats"><tt>iostats</tt></dt>
+ <dd>Display network and reference clock I/O statistics.</dd>
+ <dt id="kerninfo"><tt>kerninfo</tt></dt>
+ <dd>Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.</dd>
+ <dt id="lassoc"><tt>lassociations</tt></dt>
+ <dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.</dd>
+ <dt id="monstats"><tt>monstats</tt></dt>
+ <dd>Display monitor facility statistics.</dd>
+ <dt id="mrulist"><tt>mrulist [limited | kod | mincount=<i>count</i> | laddr=<i>localaddr</i> | sort=<i>sortorder</i> | resany=<i>hexmask</i> | resall=<i>hexmask</i>]</tt></dt>
+ <dd>Obtain and print traffic counts collected and maintained by the monitor facility. With the exception of <tt>sort=<i>sortorder</i></tt>, the options filter the list returned by <tt>ntpd</tt>. The <tt>limited</tt> and <tt>kod</tt> options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. The <tt>mincount=<i>count</i></tt> option filters entries representing less than <tt><i>count</i></tt> packets. The <tt>laddr=<i>localaddr</i></tt> option filters entries for packets received on any local address other than <tt><i>localaddr</i></tt>. <tt>resany=<i>hexmask</i></tt> and <tt>resall=<i>hexmask</i></tt> filter entries containing none or less than all, respectively, of the bits in <tt><i>hexmask</i></tt>, which must begin with <tt>0x</tt>.</dd>
+ <dd>The <tt><i>sortorder</i></tt> defaults to <tt>lstint</tt> and may be any of <tt>addr</tt>, <tt>count</tt>, <tt>avgint</tt>, <tt>lstint</tt>, or any of those preceded by a minus sign (hyphen) to reverse the sort order. The output columns are:
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Column</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>lstint</tt></td>
+ <td>Interval in s between the receipt of the most recent packet from this address and the completion of the
+ retrieval of the MRU list by <tt>ntpq</tt>.</td>
+ </tr>
+ <tr>
+ <td><tt>avgint</tt></td>
+ <td>Average interval in s between packets from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>rstr</tt></td>
+ <td>Restriction flags associated with this address. Most are copied unchanged from the matching <tt>restrict</tt> command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this
+ address triggered a rate control response.</td>
+ </tr>
+ <tr>
+ <td><tt>r</tt></td>
+ <td>Rate control indicator, either a period, <tt>L</tt> or <tt>K</tt> for no rate control response,
+ rate limiting by discarding, or rate limiting with a KoD response, respectively.</td>
+ </tr>
+ <tr>
+ <td><tt>m</tt></td>
+ <td>Packet mode.</td>
+ </tr>
+ <tr>
+ <td><tt>v</tt></td>
+ <td>Packet version number.</td>
+ </tr>
+ <tr>
+ <td><tt>count</tt></td>
+ <td>Packets received from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>rport</tt></td>
+ <td>Source port of last packet from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>remote address</tt></td>
+ <td>DNS name, numeric address, or address followed by claimed DNS name which
+ could not be verified in parentheses.</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="mreadvar"><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
+ <dt id="mrv"><tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
+ <dd>Perform the same function as the <tt>readvar</tt> command, except for a range of association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.</dd>
+ <dt id="passoc"><tt>passociations</tt></dt>
+ <dd>Perform the same function as the <tt>associations command</tt>, except that it uses previously stored data rather than making a new query.</dd>
+ <dt id="pe"><tt>peers</tt></dt>
+ <dd>Display a list of peers in the form</dd>
+ <dd><tt>[tally]remote refid st t when pool reach delay offset jitter</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>[tally]</tt></td>
+ <td>single-character code indicating current value of the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>remote</tt></td>
+ <td>host name (or IP number) of peer</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>association ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>st</tt></td>
+ <td>stratum</td>
+ </tr>
+ <tr>
+ <td><tt>t</tt></td>
+ <td><tt>u</tt>: unicast or manycast client, <tt>b</tt>:
+ broadcast or multicast client, <tt>l</tt>: local (reference clock), <tt>s</tt>: symmetric (peer), <tt>A</tt>: manycast server, <tt>B</tt>:
+ broadcast server, <tt>M</tt>: multicast server</td>
+ </tr>
+ <tr>
+ <td><tt>when</tt></td>
+ <td>sec/min/hr since last received packet</td>
+ </tr>
+ <tr>
+ <td><tt>poll</tt></td>
+ <td>poll interval (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td>reach shift register (octal)</td>
+ </tr>
+ <tr>
+ <td><tt>delay</tt></td>
+ <td>roundtrip delay</td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>offset of server relative to this host</td>
+ </tr>
+ <tr>
+ <td><tt>jitter</tt></td>
+ <td>jitter</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="rv"><tt>readvar <i>assocID</i> <i>name</i> [ = <i>value</i> ] [,...]</tt><br>
+ <tt>rv <i>assocID</i> [ <i>name</i> ] [,...]</tt></dt>
+ <dd>Display the specified variables. If <tt><i>assocID</i></tt> is zero, the
+ variables are from the <a href="#system">system variables</a> name space,
+ otherwise they are from the <a href="#peer">peer variables</a> name space.
+ The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces. If no <tt><i>name</i></tt> is
+ included, all operative variables in the name space are displayed.
+ In this case only, if the <tt><i>assocID</i></tt> is omitted, it is assumed zero. Multiple
+ names are specified with comma separators and without whitespace.
+ Note that time values are represented in milliseconds and frequency
+ values in parts-per-million (PPM). Some NTP timestamps are represented
+ in the format YYYYMMDDTTTT, where YYYY is the year, MM the month
+ of year, DD the day of month and TTTT the time of day.</dd>
+ <dt id="saveconfig"><tt>saveconfig <i>filename</i></tt></dt>
+ <dd>Write the current configuration, including any runtime modifications given with <tt>:config</tt> or <tt>config-from-file</tt>, to the ntpd host's file <i>filename</i>. This command will be rejected by the server unless <a href="miscopt.html#saveconfigdir">saveconfigdir</a> appears in the <tt>ntpd</tt> configuration file. <i>filename</i> can use strftime() format specifies to substitute the current date and time, for example, <tt>saveconfig ntp-%Y%m%d-%H%M%S.conf</tt>. The filename used is stored in system variable <tt>savedconfig</tt>. Authentication is required.</dd>
+ <dt id="writevar"><tt>writevar <i>assocID</i> <i>name</i> = <i>value</i> [,...]</tt></dt>
+ <dd>Write the specified variables. If the <tt><i>assocID</i></tt> is zero, the variables are from the <a href="#system">system variables</a> name space, otherwise they are from the <a href="#peer">peer variables</a> name space. The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces.</dd>
+ <dt id="sysinfo"><tt>sysinfo</tt></dt>
+ <dd>Display operational summary.</dd>
+ <dt id="sysstats"><tt>sysstats</tt></dt>
+ <dd>Print statistics counters maintained in the protocol module.</dd>
+</dl>
+<h4 id="status">Status Words and Kiss Codes</h4>
+<p>The current state of the operating program is shown in a set of status words maintained by the system and each association separately. These words are displayed in the <tt>rv</tt> and <tt>as</tt> commands both in hexadecimal and decoded short tip strings. The codes, tips and short explanations are on the <a href="decode.html">Event Messages and Status Words</a> page. The page also includes a list of system and peer messages, the code for the latest of which is included in the status word.</p>
+<p>Information resulting from protocol machine state transitions is displayed using an informal set of ASCII strings called <a href="decode.html#kiss">kiss codes</a>. The original purpose was for kiss-o'-death (KoD) packets sent by the server to advise the client of an unusual condition. They are now displayed, when appropriate, in the reference identifier field in various billboards.</p>
+<h4 id="system">System Variables</h4>
+<p>The following system variables appear in the <tt>rv</tt> billboard. Not all variables are displayed in some configurations.</p>
<table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>flags</tt></td>
- <td>peer flags (see Autokey specification)</td>
- </tr>
- <tr>
- <td><tt>host</tt></td>
- <td>Autokey server name</td>
- </tr>
- <tr>
- <td><tt>flags</tt></td>
- <td>peer flags (see Autokey specification)</td>
- </tr>
- <tr>
- <td><tt>signature</tt></td>
- <td>OpenSSL digest/signature shceme</td>
- </tr>
- <tr>
- <td><tt>initsequence</tt></td>
- <td>initial key ID</td>
- </tr>
- <tr>
- <td><tt>initkey</tt></td>
- <td>initial key index</td>
- </tr>
- <tr>
- <td><tt>timestamp</tt></td>
- <td>Autokey signature timestamp</td>
- </tr>
- </table>
- <h4 id="clock">Clock Variables</h4>
- <p>The following clock variables apear in the <tt>cv</tt> billboard for each association with a reference clock. Not all variables are displayed in some configurations.</p>
- <table width="100%" border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td>Variable</td>
- <td>Description</td>
- </tr>
- <tr>
- <td><tt>associd</tt></td>
- <td>association ID</td>
- </tr>
- <tr>
- <td><tt>status</tt></td>
- <td><a href="decode.html#clock">clock status word</a></td>
- </tr>
- <tr>
- <td><tt>device</tt></td>
- <td>device description</td>
- </tr>
- <tr>
- <td><tt>timecode</tt></td>
- <td>ASCII timecode string (specific to device)</td>
- </tr>
- <tr>
- <td><tt>poll</tt></td>
- <td>poll messages sent</td>
- </tr>
- <tr>
- <td><tt>noreply</tt></td>
- <td>no reply</td>
- </tr>
- <tr>
- <td><tt>badformat</tt></td>
- <td>bad format</td>
- </tr>
- <tr>
- <td><tt>baddata</tt></td>
- <td>bad date or time</td>
- </tr>
- <tr>
- <td><tt>fudgetime1</tt></td>
- <td>fudge time 1</td>
- </tr>
- <tr>
- <td><tt>fudgetime2</tt></td>
- <td>fudge time 2</td>
- </tr>
- <tr>
- <td><tt>stratum</tt></td>
- <td>driver stratum</td>
- </tr>
- <tr>
- <td><tt>refid</tt></td>
- <td>driver reference ID</td>
- </tr>
- <tr>
- <td><tt>flags</tt></td>
- <td>driver flags</td>
- </tr>
- </table>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#sys">system status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>version</tt></td>
+ <td>NTP software version and build time</td>
+ </tr>
+ <tr>
+ <td><tt>processor</tt></td>
+ <td>hardware platform and version</td>
+ </tr>
+ <tr>
+ <td><tt>system</tt></td>
+ <td>operating system and version</td>
+ </tr>
+ <tr>
+ <td><tt>leap</tt></td>
+ <td>leap warning indicator (0-3)</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>stratum (1-15)</td>
+ </tr>
+ <tr>
+ <td><tt>precision</tt></td>
+ <td>precision (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>rootdelay</tt></td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>rootdisp</tt></td>
+ <td>total dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>peer</tt></td>
+ <td>system peer association ID</td>
+ </tr>
+ <tr>
+ <td><tt>tc</tt></td>
+ <td>time constant and poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>mintc</tt></td>
+ <td>minimum time constant (log<sub>2</sub> s) (3-10)</td>
+ </tr>
+ <tr>
+ <td><tt>clock</tt></td>
+ <td>date and time of day</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>reftime</tt></td>
+ <td>reference time</td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>combined offset of server relative to this host</td>
+ </tr>
+ <tr>
+ <td><tt>sys_jitter</tt></td>
+ <td>combined system jitter</td>
+ </tr>
+ <tr>
+ <td><tt>frequency</tt></td>
+ <td> frequency offset (PPM) relative to hardware clock</td>
+ </tr>
+ <tr>
+ <td><tt>clk_wander</tt></td>
+ <td>clock frequency wander (PPM)</td>
+ </tr>
+ <tr>
+ <td><tt>clk_jitter</tt></td>
+ <td>clock jitter</td>
+ </tr>
+ <tr>
+ <td><tt>tai</tt></td>
+ <td>TAI-UTC offset (s)</td>
+ </tr>
+ <tr>
+ <td><tt>leapsec</tt></td>
+ <td>NTP seconds when the next leap second is/was inserted</td>
+ </tr>
+ <tr>
+ <td><tt>expire</tt></td>
+ <td>NTP seconds when the NIST leapseconds file expires</td>
+ </tr>
+</table>
+<dl>
+ <dt>The jitter and wander statistics are exponentially-weighted RMS averages.
+ The system jitter is defined in the NTPv4 specification; the
+ clock jitter statistic is computed by the clock discipline module.</dt>
+ <dt>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 Autokey dance:</dt>
+</dl>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>host</tt></td>
+ <td>Autokey host name for this host</td>
+ </tr>
+ <tr>
+ <td><tt>ident</tt></td>
+ <td>Autokey group name for this host</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>host flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>digest</tt></td>
+ <td>OpenSSL message digest algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>signature</tt></td>
+ <td>OpenSSL digest/signature scheme</td>
+ </tr>
+ <tr>
+ <td><tt>update</tt></td>
+ <td>NTP seconds at last signature update</td>
+ </tr>
+ <tr>
+ <td><tt>cert</tt></td>
+ <td>certificate subject, issuer and certificate flags</td>
+ </tr>
+ <tr>
+ <td><tt>until</tt></td>
+ <td>NTP seconds when the certificate expires</td>
+ </tr>
+</table>
+<h4 id="peer">Peer Variables</h4>
+<p>The following peer variables appear in the <tt>rv</tt> billboard for each association. Not all variables are displayed in some configurations.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>associd</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>srcadr<br>
+ srcport</tt></td>
+ <td>source (remote) IP address and port</td>
+ </tr>
+ <tr>
+ <td><tt>dstadr<br>
+ dstport</tt></td>
+ <td>destination (local) IP address and port</td>
+ </tr>
+ <tr>
+ <td><tt>leap</tt></td>
+ <td>leap indicator (0-3)</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>stratum (0-15)</td>
+ </tr>
+ <tr>
+ <td><tt>precision</tt></td>
+ <td>precision (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>rootdelay</tt></td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>rootdisp</tt></td>
+ <td>total root dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>reftime</tt></td>
+ <td>reference time</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td>reach register (octal)</td>
+ </tr>
+ <tr>
+ <td><tt>unreach</tt></td>
+ <td>unreach counter</td>
+ </tr>
+ <tr>
+ <td><tt>hmode</tt></td>
+ <td>host mode (1-6)</td>
+ </tr>
+ <tr>
+ <td><tt>pmode</tt></td>
+ <td>peer mode (1-5)</td>
+ </tr>
+ <tr>
+ <td><tt>hpoll</tt></td>
+ <td>host poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>ppoll</tt></td>
+ <td>peer poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>headway</tt></td>
+ <td>headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet)</a></td>
+ </tr>
+ <tr>
+ <td><tt>flash</tt></td>
+ <td><a href="decode.html#flash">flash status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>filter offset</td>
+ </tr>
+ <tr>
+ <td><tt>delay</tt></td>
+ <td>filter delay</td>
+ </tr>
+ <tr>
+ <td><tt>dispersion</tt></td>
+ <td>filter dispersion</td>
+ </tr>
+ <tr>
+ <td><tt>jitter</tt></td>
+ <td>filter jitter</td>
+ </tr>
+ <tr>
+ <td><tt>ident</tt></td>
+ <td>Autokey group name for this association</td>
+ </tr>
+ <tr>
+ <td><tt>bias</tt></td>
+ <td>unicast/broadcast bias</td>
+ </tr>
+ <tr>
+ <td><tt>xleave</tt></td>
+ <td>interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td>
+ </tr>
+</table>
+<p>The bias variable is calculated when the first broadcast packet is received
+ after the calibration volley. It represents the offset of the broadcast
+ subgraph relative to the unicast subgraph. The xleave variable appears
+ only the interleaved symmetric and interleaved modes. It represents
+ the internal queuing, buffering and transmission delays for the preceding
+ packet.</p>
+<p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>peer flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>host</tt></td>
+ <td>Autokey server name</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>peer flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>signature</tt></td>
+ <td>OpenSSL digest/signature scheme</td>
+ </tr>
+ <tr>
+ <td><tt>initsequence</tt></td>
+ <td>initial key ID</td>
+ </tr>
+ <tr>
+ <td><tt>initkey</tt></td>
+ <td>initial key index</td>
+ </tr>
+ <tr>
+ <td><tt>timestamp</tt></td>
+ <td>Autokey signature timestamp</td>
+ </tr>
+</table>
+<h4 id="clock">Clock Variables</h4>
+<p>The following clock variables appear in the <tt>cv</tt> billboard for each association with a reference clock. Not all variables are displayed in some configurations.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>associd</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#clock">clock status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>device</tt></td>
+ <td>device description</td>
+ </tr>
+ <tr>
+ <td><tt>timecode</tt></td>
+ <td>ASCII time code string (specific to device)</td>
+ </tr>
+ <tr>
+ <td><tt>poll</tt></td>
+ <td>poll messages sent</td>
+ </tr>
+ <tr>
+ <td><tt>noreply</tt></td>
+ <td>no reply</td>
+ </tr>
+ <tr>
+ <td><tt>badformat</tt></td>
+ <td>bad format</td>
+ </tr>
+ <tr>
+ <td><tt>baddata</tt></td>
+ <td>bad date or time</td>
+ </tr>
+ <tr>
+ <td><tt>fudgetime1</tt></td>
+ <td>fudge time 1</td>
+ </tr>
+ <tr>
+ <td><tt>fudgetime2</tt></td>
+ <td>fudge time 2</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>driver stratum</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>driver reference ID</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>driver flags</td>
+ </tr>
+</table>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntptime.html b/html/ntptime.html
index 11da1fbb386c..8f14761067f7 100644
--- a/html/ntptime.html
+++ b/html/ntptime.html
@@ -1,48 +1,46 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="HTML Tidy, see www.w3.org">
- <title>ntptime - read and set kernel time variables</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3><tt>ntptime</tt> - read and set 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="25" locale="00000409" region="0" t="DateTime" w="61">16:40</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="289">Wednesday, March 12, 2008</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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntptime - read and set kernel time variables</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntptime</tt> - read and set 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:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</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></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>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntptrace.html b/html/ntptrace.html
index b119664bb4b6..bd47bd977d98 100644
--- a/html/ntptrace.html
+++ b/html/ntptrace.html
@@ -1,42 +1,42 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">19:06</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Wednesday, January 16, 2008</csobj></p>
- <br clear="left">
- <hr>
- <h4>Synopsis</h4>
- <tt>ntptrace [ -n ] [ -m <i>maxhosts</i> ] [ <i>server</i> ]</tt>
- <h4>Description</h4>
- <p><tt>ntptrace</tt> is a <tt>perl</tt> script that uses the <tt>ntpq</tt> utility program to follow the chain of NTP&nbsp;servers from a given host back to the primary time source. For <tt>ntptrace</tt> to work properly, each of these servers must implement the NTP&nbsp;Control and Monitoring Protocol specified in RFC 1305 and enable NTP&nbsp;Mode 6 packets.</p>
- <p>If given no arguments, <tt>ntptrace</tt> starts with <tt>localhost</tt>. Here is an example of the output from <tt>ntptrace</tt>:</p>
- <pre>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<h4>Synopsis</h4>
+<tt>ntptrace [ -n ] [ -m <i>maxhosts</i> ] [ <i>server</i> ]</tt>
+<h4>Description</h4>
+<p><tt>ntptrace</tt> is a <tt>perl</tt> script that uses the <tt>ntpq</tt> utility program to follow the chain of NTP&nbsp;servers from a given host back to the primary time source. For <tt>ntptrace</tt> to work properly, each of these servers must implement the NTP&nbsp;Control and Monitoring Protocol specified in RFC 1305 and enable NTP&nbsp;Mode 6 packets.</p>
+<p>If given no arguments, <tt>ntptrace</tt> 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>-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.
- </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>
-
+<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>-m <i>max_hosts</i></tt></dt>
+ <dd>Sets the upper limit of the number of hosts to check (default: unlimited).</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>
+</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>
diff --git a/html/orphan.html b/html/orphan.html
new file mode 100644
index 000000000000..3174c8e29b16
--- /dev/null
+++ b/html/orphan.html
@@ -0,0 +1,42 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Orphan Mode</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Orphan Mode</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Aug-2011 23:40<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>Sometimes an NTP subnet becomes isolated from all UTC sources such as local reference clocks or Internet time servers. In such cases it may be necessary that the subnet servers and clients remain synchronized to a common timescale, not necessarily the UTC timescale. Previously, this function was provided by the local clock driver to simulate a UTC source. A server with this driver could be used to synchronize other hosts in the subnet directly or indirectly.</p>
+<p>There are many disadvantages using the local clock driver, primarily that the subnet is vulnerable to single-point failures and multiple server redundancy is not possible. Orphan mode is intended to replace the local clock driver. It provides a single simulated UTC source with multiple servers and provides seamless switching as servers fail and recover.</p>
+<p>A common configuration for private networks includes one or more core servers operating at the lowest stratum. Good practice is to configure each of these servers as backup for the others using symmetric or broadcast modes. As long as at least one core server can reach a UTC source, the entire subnet can synchronize to it.</p>
+<p>If no UTC sources are available to any core server, one of them can provide a simulated UTC source for all other hosts in the subnet. However, only one core server can simulate the UTC source and all direct dependents, called orphan children, must select the same server, called the orphan parent.</p>
+<p>Hosts sharing the same common subnet, including potential orphan parents and potential orphan children, can be enabled for orphan mode using the <tt>orphan <em>stratum</em></tt> option of the <a href="miscopt.html#tos"> <tt>tos command</tt></a>, where <tt><i>stratum</i></tt> is some stratum less than 16 and greater than any anticipated stratum that might occur with configured Internet time servers. However, sufficient headroom should remain so every subnet host dependent on the orphan children has stratum less than 16. Where no associations for other servers or reference clocks are configured, the orphan stratum can be set to 1. These are the same considerations that guide the local clock driver stratum selection.</p>
+<p>In order to avoid premature enabling orphan mode, a holdoff delay occurs when the daemon is first started and when all sources have been lost after that. The delay is intended to allow time for other sources to become reachable and selectable. Only when the delay has expired with no sources will orphan mode be enabled. By default the delay is 300 s (five minutes), but this can be changed using the <tt> orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<p>A orphan parent with no sources shows reference ID <font face="Courier New, Courier, Monaco, monospace">LOOP</font>&nbsp;if
+ operating at stratum 1 and 127.0.0.1 (IPv4 loopback address) otherwise.
+ While ordinary NTP clients use a selection metric based on delay
+ and dispersion, orphan children use a metric computed from the IP
+ address of each core server. Each orphan child chooses the orphan
+ parent as the core server with the smallest metric.</p>
+<p>For orphan mode to work well, each core server with available sources should operate at the same stratum. All core servers and orphan children should include the same <font face="Courier New, Courier, Monaco, monospace">tos</font> command in the configuration file. Each orphan child should include in the configuration file all root servers.</p>
+<div align="center"> <img src="pic/peer.gif" alt="gif">
+ <p>Figure 1. Orphan Peer Configuration</p>
+</div>
+<p>For example, consider the peer network configuration in Figure 1, where two or more campus primary or secondary (stratum 2) servers are configured with reference clocks or public Internet primary servers and with each other using symmetric modes. With this configuration a server that loses all sources continues to discipline the system clock using the other servers as backup. Only the core servers and orphan children need to be enabled for orphan mode.</p>
+<div align="center"> <img src="pic/broad.gif" alt="gif">
+ <p>Figure 2. Orphan Broadcast Configuration</p>
+</div>
+<p>For broadcast networks each core server is configured in both broadcast server and broadcast client modes as shown in Figure 2. Orphan children operate as broadcast clients of all core servers. As in peer networks, the core servers back up each other and only they and the orphan children need to be enabled for orphan mode.</p>
+<p>In normal operation subnet hosts operate below stratum 5, so the subnet is automatically configured as described in the NTP specification. If all UTC sources are lost, all core servers become orphans and the orphan children will select the same core server to become the orphan parent.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/parsedata.html b/html/parsedata.html
index 301d8e7dec04..4d3734b91678 100644
--- a/html/parsedata.html
+++ b/html/parsedata.html
@@ -12,6 +12,9 @@
<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>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
<hr>
<h4>Meinberg clocks</h4>
<pre>
@@ -346,4 +349,4 @@ Meinberg: start=&lt;STX&gt;, end=&lt;ETX&gt;, sync on start
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/parsenew.html b/html/parsenew.html
index 7e0ba5cf7117..244612f84985 100644
--- a/html/parsenew.html
+++ b/html/parsenew.html
@@ -11,6 +11,9 @@
<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>Last update:
+ <!-- #BeginDate format:En2m -->13-Oct-2010 00:33<!-- #EndDate -->
+ UTC</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)
@@ -185,7 +188,7 @@ struct clockformat
</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 <AT> acm.org">kardel@acm.org</a>.</p>
+ <p>For questions: <a href="mailto:%20kardel AT 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>
@@ -193,4 +196,4 @@ struct clockformat
<body></body>
-</html> \ No newline at end of file
+</html>
diff --git a/html/pic/9400n.jpg b/html/pic/9400n.jpg
new file mode 100644
index 000000000000..9209b90f3d0d
--- /dev/null
+++ b/html/pic/9400n.jpg
Binary files differ
diff --git a/html/pic/alice11.gif b/html/pic/alice11.gif
new file mode 100644
index 000000000000..62d0c9ba0094
--- /dev/null
+++ b/html/pic/alice11.gif
Binary files differ
diff --git a/html/pic/alice13.gif b/html/pic/alice13.gif
new file mode 100644
index 000000000000..c928ff75bb42
--- /dev/null
+++ b/html/pic/alice13.gif
Binary files differ
diff --git a/html/pic/alice15.gif b/html/pic/alice15.gif
new file mode 100644
index 000000000000..e17b5fdf11e1
--- /dev/null
+++ b/html/pic/alice15.gif
Binary files differ
diff --git a/html/pic/alice23.gif b/html/pic/alice23.gif
new file mode 100644
index 000000000000..bc258a0f7916
--- /dev/null
+++ b/html/pic/alice23.gif
Binary files differ
diff --git a/html/pic/alice31.gif b/html/pic/alice31.gif
new file mode 100644
index 000000000000..ea3d20cd9c83
--- /dev/null
+++ b/html/pic/alice31.gif
Binary files differ
diff --git a/html/pic/alice32.gif b/html/pic/alice32.gif
new file mode 100644
index 000000000000..db7cc40c655f
--- /dev/null
+++ b/html/pic/alice32.gif
Binary files differ
diff --git a/html/pic/alice35.gif b/html/pic/alice35.gif
new file mode 100644
index 000000000000..aa0ca4335db9
--- /dev/null
+++ b/html/pic/alice35.gif
Binary files differ
diff --git a/html/pic/alice38.gif b/html/pic/alice38.gif
new file mode 100644
index 000000000000..e40adba1b70c
--- /dev/null
+++ b/html/pic/alice38.gif
Binary files differ
diff --git a/html/pic/alice44.gif b/html/pic/alice44.gif
new file mode 100644
index 000000000000..953387edc444
--- /dev/null
+++ b/html/pic/alice44.gif
Binary files differ
diff --git a/html/pic/alice47.gif b/html/pic/alice47.gif
new file mode 100644
index 000000000000..6b27160454d0
--- /dev/null
+++ b/html/pic/alice47.gif
Binary files differ
diff --git a/html/pic/alice51.gif b/html/pic/alice51.gif
new file mode 100644
index 000000000000..1e9082a554b6
--- /dev/null
+++ b/html/pic/alice51.gif
Binary files differ
diff --git a/html/pic/alice61.gif b/html/pic/alice61.gif
new file mode 100644
index 000000000000..5687c38e8731
--- /dev/null
+++ b/html/pic/alice61.gif
Binary files differ
diff --git a/html/pic/barnstable.gif b/html/pic/barnstable.gif
new file mode 100644
index 000000000000..17d9cdd5de92
--- /dev/null
+++ b/html/pic/barnstable.gif
Binary files differ
diff --git a/html/pic/beaver.gif b/html/pic/beaver.gif
new file mode 100644
index 000000000000..3d0c8eb9b5c4
--- /dev/null
+++ b/html/pic/beaver.gif
Binary files differ
diff --git a/html/pic/boom3.gif b/html/pic/boom3.gif
new file mode 100644
index 000000000000..1a95d4088121
--- /dev/null
+++ b/html/pic/boom3.gif
Binary files differ
diff --git a/html/pic/boom3a.gif b/html/pic/boom3a.gif
new file mode 100644
index 000000000000..14bfe5bf8890
--- /dev/null
+++ b/html/pic/boom3a.gif
Binary files differ
diff --git a/html/pic/boom4.gif b/html/pic/boom4.gif
new file mode 100644
index 000000000000..0661ac41031f
--- /dev/null
+++ b/html/pic/boom4.gif
Binary files differ
diff --git a/html/pic/broad.gif b/html/pic/broad.gif
new file mode 100644
index 000000000000..b372bb5c14dc
--- /dev/null
+++ b/html/pic/broad.gif
Binary files differ
diff --git a/html/pic/bustardfly.gif b/html/pic/bustardfly.gif
new file mode 100644
index 000000000000..b5c6e91a75ad
--- /dev/null
+++ b/html/pic/bustardfly.gif
Binary files differ
diff --git a/html/pic/c51.jpg b/html/pic/c51.jpg
new file mode 100644
index 000000000000..d90ad551d2c6
--- /dev/null
+++ b/html/pic/c51.jpg
Binary files differ
diff --git a/html/description_files/description.jpg b/html/pic/description.jpg
index 2153180a899c..2153180a899c 100644
--- a/html/description_files/description.jpg
+++ b/html/pic/description.jpg
Binary files differ
diff --git a/html/pic/discipline.gif b/html/pic/discipline.gif
new file mode 100644
index 000000000000..3280d1460e65
--- /dev/null
+++ b/html/pic/discipline.gif
Binary files differ
diff --git a/html/pic/dogsnake.gif b/html/pic/dogsnake.gif
new file mode 100644
index 000000000000..1f9755dcd976
--- /dev/null
+++ b/html/pic/dogsnake.gif
Binary files differ
diff --git a/html/pic/driver29.gif b/html/pic/driver29.gif
new file mode 100644
index 000000000000..b0415ae41ed9
--- /dev/null
+++ b/html/pic/driver29.gif
Binary files differ
diff --git a/html/pic/driver43_1.gif b/html/pic/driver43_1.gif
new file mode 100644
index 000000000000..f1ff7c79ee63
--- /dev/null
+++ b/html/pic/driver43_1.gif
Binary files differ
diff --git a/html/pic/driver43_2.jpg b/html/pic/driver43_2.jpg
new file mode 100644
index 000000000000..c53639c5daaa
--- /dev/null
+++ b/html/pic/driver43_2.jpg
Binary files differ
diff --git a/html/pic/fg6021.gif b/html/pic/fg6021.gif
new file mode 100644
index 000000000000..e6e3071262da
--- /dev/null
+++ b/html/pic/fg6021.gif
Binary files differ
diff --git a/html/pic/fg6039.jpg b/html/pic/fg6039.jpg
new file mode 100644
index 000000000000..25fc7c421113
--- /dev/null
+++ b/html/pic/fg6039.jpg
Binary files differ
diff --git a/html/pic/fig_3_1.gif b/html/pic/fig_3_1.gif
new file mode 100644
index 000000000000..a280a89032e5
--- /dev/null
+++ b/html/pic/fig_3_1.gif
Binary files differ
diff --git a/html/pic/flatheads.gif b/html/pic/flatheads.gif
new file mode 100644
index 000000000000..707cb8cc3d4b
--- /dev/null
+++ b/html/pic/flatheads.gif
Binary files differ
diff --git a/html/pic/flt1.gif b/html/pic/flt1.gif
new file mode 100644
index 000000000000..d08c5ac74688
--- /dev/null
+++ b/html/pic/flt1.gif
Binary files differ
diff --git a/html/pic/flt2.gif b/html/pic/flt2.gif
new file mode 100644
index 000000000000..d4909cb54cef
--- /dev/null
+++ b/html/pic/flt2.gif
Binary files differ
diff --git a/html/pic/flt3.gif b/html/pic/flt3.gif
new file mode 100644
index 000000000000..1eefbe13946a
--- /dev/null
+++ b/html/pic/flt3.gif
Binary files differ
diff --git a/html/pic/flt4.gif b/html/pic/flt4.gif
new file mode 100644
index 000000000000..3f8b67134748
--- /dev/null
+++ b/html/pic/flt4.gif
Binary files differ
diff --git a/html/pic/flt5.gif b/html/pic/flt5.gif
new file mode 100644
index 000000000000..52714ac0826e
--- /dev/null
+++ b/html/pic/flt5.gif
Binary files differ
diff --git a/html/pic/flt6.gif b/html/pic/flt6.gif
new file mode 100644
index 000000000000..0451e86f6641
--- /dev/null
+++ b/html/pic/flt6.gif
Binary files differ
diff --git a/html/pic/flt7.gif b/html/pic/flt7.gif
new file mode 100644
index 000000000000..55f07d83bb9f
--- /dev/null
+++ b/html/pic/flt7.gif
Binary files differ
diff --git a/html/pic/flt8.gif b/html/pic/flt8.gif
new file mode 100644
index 000000000000..04bd32b78c41
--- /dev/null
+++ b/html/pic/flt8.gif
Binary files differ
diff --git a/html/pic/flt9.gif b/html/pic/flt9.gif
new file mode 100644
index 000000000000..e107c482a494
--- /dev/null
+++ b/html/pic/flt9.gif
Binary files differ
diff --git a/html/pic/freq1211.gif b/html/pic/freq1211.gif
new file mode 100644
index 000000000000..2a564168376d
--- /dev/null
+++ b/html/pic/freq1211.gif
Binary files differ
diff --git a/html/pic/gadget.jpg b/html/pic/gadget.jpg
new file mode 100644
index 000000000000..6289911e226f
--- /dev/null
+++ b/html/pic/gadget.jpg
Binary files differ
diff --git a/html/pic/gps167.jpg b/html/pic/gps167.jpg
new file mode 100644
index 000000000000..8a87a75f996c
--- /dev/null
+++ b/html/pic/gps167.jpg
Binary files differ
diff --git a/html/pic/group.gif b/html/pic/group.gif
new file mode 100644
index 000000000000..26aff0674136
--- /dev/null
+++ b/html/pic/group.gif
Binary files differ
diff --git a/html/pic/hornraba.gif b/html/pic/hornraba.gif
new file mode 100644
index 000000000000..3077d75ecc93
--- /dev/null
+++ b/html/pic/hornraba.gif
Binary files differ
diff --git a/html/pic/igclock.gif b/html/pic/igclock.gif
new file mode 100644
index 000000000000..940f330c7ebb
--- /dev/null
+++ b/html/pic/igclock.gif
Binary files differ
diff --git a/html/pic/neoclock4x.gif b/html/pic/neoclock4x.gif
new file mode 100755
index 000000000000..4df95af54ffe
--- /dev/null
+++ b/html/pic/neoclock4x.gif
Binary files differ
diff --git a/html/pic/offset1211.gif b/html/pic/offset1211.gif
new file mode 100644
index 000000000000..8a73287a9cb3
--- /dev/null
+++ b/html/pic/offset1211.gif
Binary files differ
diff --git a/html/pic/oncore_evalbig.gif b/html/pic/oncore_evalbig.gif
new file mode 100644
index 000000000000..931a7f14d52c
--- /dev/null
+++ b/html/pic/oncore_evalbig.gif
Binary files differ
diff --git a/html/pic/oncore_remoteant.jpg b/html/pic/oncore_remoteant.jpg
new file mode 100644
index 000000000000..0f1d04891c6f
--- /dev/null
+++ b/html/pic/oncore_remoteant.jpg
Binary files differ
diff --git a/html/pic/oncore_utplusbig.gif b/html/pic/oncore_utplusbig.gif
new file mode 100644
index 000000000000..dec7e71fd7be
--- /dev/null
+++ b/html/pic/oncore_utplusbig.gif
Binary files differ
diff --git a/html/pic/oz2.gif b/html/pic/oz2.gif
new file mode 100644
index 000000000000..d4982f02b2a8
--- /dev/null
+++ b/html/pic/oz2.gif
Binary files differ
diff --git a/html/pic/panda.gif b/html/pic/panda.gif
new file mode 100644
index 000000000000..6feb74365ee4
--- /dev/null
+++ b/html/pic/panda.gif
Binary files differ
diff --git a/html/pic/pd_om006.gif b/html/pic/pd_om006.gif
new file mode 100644
index 000000000000..3266285eac56
--- /dev/null
+++ b/html/pic/pd_om006.gif
Binary files differ
diff --git a/html/pic/pd_om011.gif b/html/pic/pd_om011.gif
new file mode 100644
index 000000000000..06566b9525d2
--- /dev/null
+++ b/html/pic/pd_om011.gif
Binary files differ
diff --git a/html/pic/peer.gif b/html/pic/peer.gif
new file mode 100644
index 000000000000..35bd36f7fb98
--- /dev/null
+++ b/html/pic/peer.gif
Binary files differ
diff --git a/html/pic/pogo.gif b/html/pic/pogo.gif
new file mode 100644
index 000000000000..68dacbe856dc
--- /dev/null
+++ b/html/pic/pogo.gif
Binary files differ
diff --git a/html/pic/pogo1a.gif b/html/pic/pogo1a.gif
new file mode 100644
index 000000000000..433e467d9194
--- /dev/null
+++ b/html/pic/pogo1a.gif
Binary files differ
diff --git a/html/pic/pogo3a.gif b/html/pic/pogo3a.gif
new file mode 100644
index 000000000000..49f1359fefaa
--- /dev/null
+++ b/html/pic/pogo3a.gif
Binary files differ
diff --git a/html/pic/pogo4.gif b/html/pic/pogo4.gif
new file mode 100644
index 000000000000..e0a3b178160b
--- /dev/null
+++ b/html/pic/pogo4.gif
Binary files differ
diff --git a/html/pic/pogo5.gif b/html/pic/pogo5.gif
new file mode 100644
index 000000000000..87ad8e490d6b
--- /dev/null
+++ b/html/pic/pogo5.gif
Binary files differ
diff --git a/html/pic/pogo6.gif b/html/pic/pogo6.gif
new file mode 100644
index 000000000000..3f98c52cdf63
--- /dev/null
+++ b/html/pic/pogo6.gif
Binary files differ
diff --git a/html/pic/pogo7.gif b/html/pic/pogo7.gif
new file mode 100644
index 000000000000..36befe7a692c
--- /dev/null
+++ b/html/pic/pogo7.gif
Binary files differ
diff --git a/html/pic/pogo8.gif b/html/pic/pogo8.gif
new file mode 100644
index 000000000000..6860efbba879
--- /dev/null
+++ b/html/pic/pogo8.gif
Binary files differ
diff --git a/html/pic/pzf509.jpg b/html/pic/pzf509.jpg
new file mode 100644
index 000000000000..b51303bfe667
--- /dev/null
+++ b/html/pic/pzf509.jpg
Binary files differ
diff --git a/html/pic/pzf511.jpg b/html/pic/pzf511.jpg
new file mode 100644
index 000000000000..c470af2f6daa
--- /dev/null
+++ b/html/pic/pzf511.jpg
Binary files differ
diff --git a/html/pic/rabbit.gif b/html/pic/rabbit.gif
new file mode 100644
index 000000000000..ab6ec5ff56fa
--- /dev/null
+++ b/html/pic/rabbit.gif
Binary files differ
diff --git a/html/pic/radio2.jpg b/html/pic/radio2.jpg
new file mode 100644
index 000000000000..ceb7c76e36fa
--- /dev/null
+++ b/html/pic/radio2.jpg
Binary files differ
diff --git a/html/pic/sheepb.jpg b/html/pic/sheepb.jpg
new file mode 100644
index 000000000000..1b3323ee4c04
--- /dev/null
+++ b/html/pic/sheepb.jpg
Binary files differ
diff --git a/html/pic/stack1a.jpg b/html/pic/stack1a.jpg
new file mode 100644
index 000000000000..1e023cb4af5c
--- /dev/null
+++ b/html/pic/stack1a.jpg
Binary files differ
diff --git a/html/pic/stats.gif b/html/pic/stats.gif
new file mode 100644
index 000000000000..b0d0aaa31e8d
--- /dev/null
+++ b/html/pic/stats.gif
Binary files differ
diff --git a/html/pic/sx5.gif b/html/pic/sx5.gif
new file mode 100644
index 000000000000..504e38b73287
--- /dev/null
+++ b/html/pic/sx5.gif
Binary files differ
diff --git a/html/pic/thunderbolt.jpg b/html/pic/thunderbolt.jpg
new file mode 100644
index 000000000000..49253ab543e8
--- /dev/null
+++ b/html/pic/thunderbolt.jpg
Binary files differ
diff --git a/html/pic/time1.gif b/html/pic/time1.gif
new file mode 100644
index 000000000000..88e70420f302
--- /dev/null
+++ b/html/pic/time1.gif
Binary files differ
diff --git a/html/pic/tonea.gif b/html/pic/tonea.gif
new file mode 100644
index 000000000000..195a3df6c4da
--- /dev/null
+++ b/html/pic/tonea.gif
Binary files differ
diff --git a/html/pic/tribeb.gif b/html/pic/tribeb.gif
new file mode 100644
index 000000000000..59e8a7c48706
--- /dev/null
+++ b/html/pic/tribeb.gif
Binary files differ
diff --git a/html/pic/wingdorothy.gif b/html/pic/wingdorothy.gif
new file mode 100644
index 000000000000..3f2e0be66330
--- /dev/null
+++ b/html/pic/wingdorothy.gif
Binary files differ
diff --git a/html/poll.html b/html/poll.html
new file mode 100644
index 000000000000..aeb9c32cd13c
--- /dev/null
+++ b/html/poll.html
@@ -0,0 +1,26 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Poll Process</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Poll Process</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:17<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The poll process sends NTP packets at intervals determined by the clock discipline algorithm. The process is designed to provide a sufficient update rate to maximize accuracy while minimizing network overhead. The process is designed to operate over a poll exponent range between 3 (8 s) and 17 (36 hr). The minimum and maximum poll exponent within this range can be set using the <tt>minpoll</tt> and <tt>maxpoll</tt> options of the <a href="confopt.html#option"><tt>server</tt></a> command, with default 6 (64 s) and 10 (1024 s), respectively.</p>
+<p> The poll interval is managed by a heuristic algorithm developed over several years of experimentation. It depends on an exponentially weighted average of clock offset differences, called <em>clock jitter</em>, and a jiggle counter, which is initially set to zero. When a clock update is received and the offset exceeds the clock jitter by a factor of 4, the jiggle counter is increased by the poll exponent; otherwise, it is decreased by twice the poll exponent. If the jiggle counter is greater than an arbitrary threshold of 30, it is reset to 0 and the the poll exponent is increased by 1. If the jiggle counter is less than -30, it is set to 0 and the poll exponent decreased by 1. In effect, the algorithm has a relatively slow reaction to good news, but a relatively fast reaction to bad news.</p>
+<p>As an option of the <a href="confopt.html#option"><tt>server</tt></a> command, instead of a single packet, the poll process can send a burst of several packets at 2-s intervals. This is designed to reduce the time to synchronize the clock at initial startup (<tt>iburst</tt>) and/or to reduce the phase noise at the longer poll intervals (<tt>burst</tt>). The <tt>iburst</tt> option is effective only when the server is unreachable, while the <tt>burst</tt> option is effective only when the server is reachable. The two options are independent of each other and both can be enabled at the same time.</p>
+<p>For the <tt>iburst</tt> option the number of packets in the burst is six, which is the number normally needed to synchronize the clock; for the <tt>burst</tt> option, the number of packets in the burst is determined by the difference between the current poll exponent and the minimum poll exponent as a power of 2. For instance, with the default minimum poll exponent of 6 (64 s), only one packet is sent for every poll, while the full number of eight packets is sent at poll exponents of 9 (512 s) or more. This insures that the average headway will never exceed the minimum headway.</p>
+<p>The burst options can result in increased load on the network if not carefully designed. Both options are affected by the provisions described on the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page. In addition, when <tt>iburst</tt> or <tt>burst</tt> are enabled, the first packet of the burst is sent, but the remaining packets sent only when the reply to the fist packet is received. If no reply has been received after a timeout set by the <tt>minpoll</tt> option, the first packet is sent again. This means that, even if a server is unreachable, the network load is no more than at the minimum poll interval.</p>
+<p>To further reduce the network load when a server is unreachable, an unreach timer is incremented by 1 at each poll interval, but is set to 0 as each packet is received. If the timer exceeds the <em>unreach threshold</em> set at 10, the poll exponent is incremented by 1 and the unreach timer set to 0. This continues until the poll exponent reaches the maximum set by the <tt>maxpoll</tt> option.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/pps.html b/html/pps.html
index b41ac77b0830..0b9bd5d494d4 100644
--- a/html/pps.html
+++ b/html/pps.html
@@ -1,49 +1,47 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">22:01</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Wednesday, January 02, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#intro">Introduction</a></li>
- <li class="inline"><a href="#gadget">Gadget Box</a></li>
- <li class="inline"><a href="#opsys">Operating System Support</a></li>
- <li class="inline"><a href="#use">Using the Pulse-per-Second (PPS) Signal</a></li>
- </ul>
- <hr>
- <h4 id="intro">Introduction</h4>
- <p>Most radio clocks are connected using a serial port operating at speeds of 9600 bps. 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 normally limited to a hundred microseconds. Using carefuly crafted averaging techniques, the NTP&nbsp;algorithms can whittle this down to a few tens of microseconds. However, some radios produce a PPS signal which can be used to improve the accuracy to few microseconds. This page describes the hardware and software necessar for NTP to use the PPS signal.</p>
- <div align="center">
- <img src="pic/gadget.jpg" alt="gif"><br>
- A Gadget Box built by Chuck Hanavin
- </div>
- <h4 id="gadget">Gadget Box</h4>
- <p>The PPS signal can be connected in either of two ways: via the DCD data carrier detect pin of a serial port or via the ACK&nbsp;acknowledge pin of a parallel port, depending on the hardware and operating system. Note that NTP no longer supports connection via the RD&nbsp;data pin of a serial port.</p>
- <p>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 id="opsys">Operating System Support</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 kernel interface described on the <a href="kernpps.html">PPSAPI Interface for Precision Time Signals</a> page 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.</p>
- <h4>PPS Driver</h4>
- <p>PPS support requires the PPS driver (described on the <a href="drivers/driver22.html">Type 22 PPS Clock Discipline</a> page. The driver operates in conjunction with a prefer peer, as described in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The prefer peer is ordinarily the radio clock that provides the PPS signal, but in principle another radio clock or remote Internet server could be designated prerred. A source is desgnated prefer using the <tt>prefer</tt> keyword, as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> keyword</a> page. Only one source can be designated preferred. PPS signals are processed by the PPS&nbsp;driver and other clock drivers which might be involved need not know or care about PPS&nbsp;capability. Note that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
- <h4 id="pps">Using the Pulse-per-Second (PPS) Signal</h4>
- <p>The PPS signal can be used in two ways, one using the NTP grooming and mitigations algorithms and the other using PPS signal support in the kernel, as described in the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page. In either case, the PPS&nbsp;signal must be present and within nominal jitter and wander tolerances. In addition, the PPS&nbsp;driver and prefer peer must survive the sanity checks and intersection algorithms. Finally, the offset of the system clock relative to the prefer peer must be less than 128 ms, or well within the 0.5-s unambiguous range. The PPS peer remains active as long as these conditions are met.</p>
- <p>The presence of PPS&nbsp;kernel support is automatically detected during the NTP configuration process and supporting code automatically compiled. When kernel PPS&nbsp;support is enabled, the PPS driver can direct the signal directly to the kernel. Note that the PPS driver does not normally enable the PPS kernel, since performance is generally better with older systems. However, the kernel can be enabled by a driver fudge flag if necessary. This is advised for newer machines in the Pentium class.</p>
- <p>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 disabled 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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:17<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#gadget">Gadget Box</a></li>
+ <li class="inline"><a href="#opsys">Operating System Support</a></li>
+ <li class="inline"><a href="#use">Using the Pulse-per-Second (PPS) Signal</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>Most radio clocks are connected using a serial port operating at speeds of 9600 bps. The accuracy using typical timecode formats, where the on-time epoch is indicated by a designated ASCII character such as carriage-return <tt>&lt;cr&gt;</tt>, is normally limited to 100 &mu;s. Using carefully crafted averaging techniques, the NTP&nbsp;algorithms can whittle this down to a few tens of microseconds. However, some radios produce a pulse-per-second (PPS) signal which can be used to improve the accuracy to a few microseconds. This page describes the hardware and software necessary for NTP to use the PPS signal.</p>
+<p> The PPS signal can be connected in either of two ways. On FreeBSD systems (with the PPS_SYNC and pps kernel options) it can be connected directly to the ACK pin of a parallel port. This is the preferred way, as it requires no additional hardware. Alternatively, it can be connected via the DCD pin of a serial port. However, the PPS signal levels are usually incompatible with the serial port interface signals. Note that NTP no longer supports connection via the RD pin of a serial port.</p>
+<div align="center">
+ <p><img src="pic/gadget.jpg" alt="gif"></p>
+ <p>A Gadget Box built by Chuck Hanavin</p>
+</div>
+<h4 id="gadget">Gadget Box</h4>
+<p>The gadget box shown above is assembled in a 5&quot;x3&quot;x2&quot; aluminum minibox containing the the circuitry, serial connector and optional 12-V power connector. A complete set of schematics, PCB artwork, drill templates can be obtained via the web from ftp.udel.edu as <a href="ftp://ftp.udel.edu/pub/ntp/hardware/gadget.tar.Z">gadget.tar.Z</a>.</p>
+<p> The gadget box 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 precision oscillator with 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="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder</a> driver.</p>
+<h4 id="opsys">Operating System Support</h4>
+<p>Both the serial and parallel port connection require operating system support, which is available in 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 kernel interface described on the <a href="kernpps.html">PPSAPI Interface for Precision Time Signals</a> page 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. The interface consists of the <tt>timepps.h</tt> header file which is specific to each system. It is included automatically when the distribution is built.</p>
+<h4>PPS Driver</h4>
+<p>PPS support requires is built into some drivers, in particular the WWVB and NMEA drivers, and may be added to other drivers in future. Alternatively, the PPS driver described on the <a href="drivers/driver22.html">Type 22 PPS Clock Discipline</a> page can be used. It operates in conjunction with another source that provides seconds numbering. The selected source is designate a prefer peer, as using the <tt>prefer</tt> option, as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The prefer peer is ordinarily the radio clock that provides the PPS signal, but in principle another radio clock or even a remote Internet server could be designated preferred Note that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
+<h4 id="use">Using the Pulse-per-Second (PPS) Signal</h4>
+<p>The PPS signal can be used in either of two ways, one using the NTP grooming and mitigation algorithms and the other using the kernel PPS signal support described in the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page. The presence of &nbsp;kernel support is automatically detected during the NTP build process and supporting code automatically compiled. In either case, the PPS&nbsp;signal must be present and within nominal jitter and wander tolerances. In addition, the prefer peer must be a truechimer; that is, survive the sanity checks and intersection algorithm. Finally, the offset of the system clock relative to the prefer peer must be within &plusmn;0.5 s. 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 disabled and operation continues as if it were not present. </p>
+<p> An option flag in the driver determines whether the NTP algorithms or kernel support is enabled (if available). For historical reasons, the NTP algorithms are selected by by default, since performance is generally better using older, slower systems. However, performance is generally better with kernl support using newer, faster systems.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/prefer.html b/html/prefer.html
index 67a6816cf3e6..0fd0b8f4b90f 100644
--- a/html/prefer.html
+++ b/html/prefer.html
@@ -6,156 +6,88 @@
<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:
- <!-- #BeginDate format:En2m -->22-Apr-2009 14:04<!-- #EndDate -->
-UTC</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:18<!-- #EndDate -->
+ UTC</p>
<br clear="left">
-
<h4>Related Links</h4>
-
<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
-
<h4>Table of Contents</h4>
-
<ul>
-
-<li class="inline"><a href="#intro">Introduction</a></li>
-<li class="inline"><a href="#peer">Peer Classification</a></li>
-<li class="inline"><a href="#prefer">The <tt>prefer</tt> Peer</a></li>
-<li class="inline"><a href="#miti">Mitigation Rules</a></li>
-<li class="inline"><a href="#mins">The <tt>minsane</tt> Option</a></li>
-
+ <li class="inline"><a href="#intro">1. Introduction and Overview</a></li>
+ <li class="inline"><a href="#combine">2. Combine Algorithm</a></li>
+ <li class="inline"><a href="#clockhop">3. Anti-Clockhop Algorithm</a></li>
+ <li class="inline"><a href="#peer">4. Peer Classification</a></li>
+ <li class="inline"><a href="#prefer">5. 5. The <tt>prefer</tt> Peer</a></li>
+ <li class="inline"><a href="#miti">6. Mitigation Rules</a></li>
+ <li class="inline"><a href="#mins">7. The <tt>minsane</tt> Option</a></li>
</ul>
-
<hr>
-
-<h4 id="intro">Introduction</h4>
-
-<p>This page summarizes the criteria for choosing from among a number of potential sources suitable contributors to the clock discipline algorithm. The criteria are very meticulous, since they have to handle many different scenarios that may be optimized for peculiar circumstances, including some scenarios designed to support planetary and deep space missions.</p>
-
-<p>Recall the suite of NTP data acquisition and grooming algorithms as these algorithms proceed in five phases. Phase one discovers the available sources and mobilizes an association for each candidate found. These candidates can result from explicit configuration, broadcast discovery or the pool and manycast autonomous configuration schemes. Phase two grooms the selectable candidates excluding those sources showing one or more of the following errors</p>
-
+<h4 id="intro">1. Introduction and Overview</h4>
+<p>This page summarizes the criteria for choosing from among the survivors of the clock cluster algorithm a set of contributors to the clock discipline algorithm. The criteria are very meticulous, since they have to handle many different scenarios that may be optimized for special circumstances, including some scenarios designed to support planetary and deep space missions. For additional information on statistical principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<p>Recall the suite of NTP data acquisition and grooming algorithms. These algorithms proceed in five phases. Phase one discovers the available <em>sources</em> and mobilizes an association for each source found. These sources can result from explicit configuration, broadcast discovery or the pool and manycast autonomous configuration schemes. See the <a href="discover.html">Automatic Server Discovery Schemes</a> page for further information.</p>
+<p> Phase two selects the <em> candidates</em> from among the sources by excluding those sources showing one or more of the errors summarized on the <a href="select.html">Clock Select Algorithm</a> page and to determine the <em>truechimers</em> from among the candidates, leaving behind the <em>falsetickers</em>. A server or peer configured with the <tt>true</tt> option is declared a truechimer independent of this algorithm. Phase four uses the algorithm described on the <a href="cluster.html">Clock Cluster Algorithm</a> page to prune the statistical outliers from the truechimers, leaving the <em>survivor list</em><em></em> as result. </p>
+<p> Phase five uses a set of algorithms and mitigation rules to combined the survivor statistics and discipline the system clock. The mitigation rules select from among the survivors a <em>system peer</em> from which a set of system statistics can be inherited and passed along to dependent clients, if any. The mitigation algorithms and rules are the main topic of this page. The clock offset developed from these algorithms can discipline the system clock, either using the <a href="discipline.html">clock discipline algorithm</a> or using the kernel to discipline the system clock directly, as described on the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. </p>
+<h4 id="combine">2. Combine Algorithm</h4>
+<p> The clock combine algorithm uses the survivor list to produce a weighted average of both offset and jitter. Absent other considerations discussed later, the <em>combined offset</em> is used to discipline the system clock, while the <em>combined jitter</em> is augmented with other components to produce the system jitter statistic inherited by dependent clients, if any.</p>
+<p> The clock combine algorithm uses a weight factor for each survivor equal to the reciprocal of the root distance. This is normalized so that the sum of the reciprocals is equal to unity. This design favors the survivors at the smallest root distance and thus the smallest maximum error.</p>
+<h4 id="clockhop">3. Anti-Clockhop Algorithm</h4>
+<p>The anti-clockhop algorithm is intended for cases where multiple servers are available on a fast LAN with modern computers. Typical offset differences between servers in such cases are less than 0.5 ms. However, changes between servers can result in unnecessary system jitter. The object of the anti-clockhop algorithm is to avoid changing the current system peer, unless it becomes stale or has significant offset relative to other candidates on the survivor list.</p>
+<p>For the purposes of the following description, call the last selected system peer the <em>old peer</em>, and the currently selected source the <em>candidate peer</em>. At each update, the candidate peer is selected as the first peer on the survivor list sorted by increasing root distance. The algorithm initializes the -<em>clockhop threshold</em> with the value of <tt>mindist</tt>, by default 1 ms. </p>
+<p>The anti-clockhop algorithm is called immediately after the combine algorithm. If there was no old peer or the old and candidate peers are the same, the candidate peer becomes the system peer. If the old peer and the candidate peer are different, the algorithm measures the difference between the offset of the old peer and the candidate peer. If the difference exceeds the clockhop threshold, the candidate peer becomes the system peer and the clockhop threshold is restored to its original value. If the difference is less than the clockhop threshold, the old peer continues as the system peer. However, at each subsequent update, the algorithm reduces the clockhop threshold by half. Should operation continue in this way, the candidate peer will eventually become the system peer.</p>
+<h4 id="peer">4. Peer Classification</h4>
+<p>The behavior of the various algorithms and mitigation rules involved depends on how the various synchronization sources are classified. This depends on whether the source is local or remote and if local, the type of source. The following classes are defined:</p>
<ol>
-
-<li>A stratum error occurs if (1) the source had never been synchronized or (2) the stratum of the source is below the <tt>floor</tt> option or not below the <tt>ceiling</tt> option specified by the <tt>tos</tt> command. The default value for these options are 0 and 16, respectively.</li>
-
-<li>A distance error occurs for a remote source if the root distance is not below the distance threshold <tt>maxdist</tt> option of the <tt>tos</tt> command. The default value for this option is 1.5 s for networks including only the Earth, but this should be increased to 2.5 s for networks including the Moon.</li>
-
-<li>A loop error occurs if the source is synchronized to the client of if the source is synchronized to the same source as the client.</li>
-
-<li>An unreachable error occurs if the source is unreachable or if the <tt>server</tt> or <tt>peer</tt> command for the source includes the <tt>noselect</tt> option.</li>
-
+ <li>A selectable association configured for a remote server or peer is classified as a <i>client association</i>. All other selectable associations are classified as <i>device driver associations</i> of one kind or another. In general, one or more sources of either type will be available in each installation.</li>
+ <li>If all sources have been lost and one or more hosts on a common DMZ network have specified the orphan stratum in the <tt>orphan</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, each of them can become an <i>orphan parent</i>. Dependent orphan children on the same DMZ network will see the orphan parents as if synchronized to a server at the orphan stratum. Note that, as described on the <a href="orphan.html">Orphan Mode</a> page, all orphan children will select the same orphan parent for synchronization.</li>
+ <li>When a device driver has been configured for pulse-per-second (PPS) signals and PPS signals are being received, it is designated the <i>PPS driver.</i> Note that the Pulse-per-Second driver (type 22) is often used as a PPS driver, but any driver can be configure as a PPS driver if the hardware facilities are available. The PPS driver provides precision clock discipline only within &plusmn;0.4 s, so it is always associated with another source or sources that provide the seconds numbering function.</li>
+ <li>When the Undisciplined Local Clock driver (type 1) is configured, it is designated the <i>local driver</i>. It can be used either as a backup source (stratum greater than zero) should all sources fail, or as the primary source (stratum zero) whether or not other sources are available if the <tt>prefer</tt> option is present. The local driver can be used when the kernel time is disciplined by some other means of synchronization, such as the NIST <tt>lock clock</tt> scheme, or another synchronization protocol such as the IEEE 1588 Precision Time Protocol (PTP) or Digital Time Synchronization Service (DTSS).</li>
+ <li>When the Automated Computer Time Service driver (type 18) is configured, it is designated the <i>modem driver</i>. It is used either as a backup source, should all other sources fail, or as the primary source if the <tt>prefer</tt> option is present.</li>
</ol>
-
-<p>Phase three uses an intersection algorithm to select the truechimers from
- among the candidates, leaving behind the falsetickers. A server or peer configured
- with the <tt>true</tt> option is ipso facto a truechimer independent of this
- algorithm. Phase four uses a clustering algorithm to cast off statistical outliers
- from the truechimers until a set of survivors not less than the number specified
- as the <tt>minclock</tt> option of the <tt>tos</tt> command, with default 3.
- Phase five uses a set of mitigation rules to select from among the survivors
- a system peer from which a set of system statistics can be inherited and passed
- along to a dependent client population. The clock offset developed from these
- algorithms can discipline the system clock either using the <tt>ntpd</tt> clock
- discipline algorithm or enable the kernel to discipline the system clock directly,
- as described on the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page.
- Phase five is the topic of this page.</p>
-
-<h4 id="peer">Peer Classification</h4>
-
-<p>The behavior of the various algorithms and mitigation rules involved depends on how the various synchronization sources are classified. This depends on whether the source is local or remote and if local the type of source. The following classes are defined:</p>
-
-<ol>
-
-<li>An association configured for a remote server or peer is classified simply as a <i>server</i>. All other associations are classified as a <i>device driver</i> of one kind or another. In general, one or more sources of either or both types will be configured in each installation.</li>
-
-<li>If all sources have been lost and the orphan stratum has been specified by the <tt>orphan</tt> option of the <tt>tos</tt> command, a pseudo-source called the <i>orphan parent</i> is created with offset and jitter both zero. Dependent orphan children will see the orphan parent as if synchronized to a server at the orphan stratum.If the only survivor is the orphan parent, it becomes the system peer and its clock offset and jitter are inherited by the corresponding system variables. Note that by design all the orphan children having the same set of orphan parents will select the same parent.</li>
-
-<li>When a device driver has been configured for pulse-per-second (PPS) signals and PPS signals are being received, it is designated the <i>PPS driver.</i> Note that the Pulse-per-Second driver (type 22) is often used as a PPS driver, but any driver can be operated as a PPS driver as well. The PPS driver provides precision clock discipline only within +-0.5 s, so is always associated with another source or sources that provide the seconds numbering function.</li>
-
-<li>When the Undisciplined Local Clock driver (type 1) is configured, it is designated the <i>local driver</i>. This driver is used either as a backup source (stratum greater than zero) should all sources fail, or as the primary 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 the Automated Computer Time Service driver (type 18) is configured, it is designated the <i>modem driver</i>. This is used either as a backup source, should all other sources fail, or as the (only) primary source.</li>
-
-</ol>
-
-<h4 id="prefer">The <tt>prefer</tt> Peer</h4>
-
-<p>The mitigation rules are designed to provide an intelligent selection of the system peer from among the survivors of different types. When used with the <tt>server</tt> or <tt>peer</tt> commands, the <tt>prefer</tt> option designates one or more survivors as preferred over all others. While the rules do not forbid it, it is usually not useful to designate more than one source as preferred; however, if more than one source is so designated, they are used in the order specified in the configuration file; that is, if the first one becomes unselectable, the second one is considered and so forth. This order of priority is also applicable to multiple PPS drivers, multiple modem drivers and even multiple local drivers, although that would not normally be useful.</p>
-
-<p>The clustering algorithm works on the set of truechimers produced by the intersection algorithms. Ordinarily, any one of them can in principle provide correct time; however, due to various latency variations, not all can provide the most accurate and stable time. The clustering algorithm, processes the truechimers in one or more rounds to cast off a statistical outlier until no more than the <tt>minclock</tt> option of the <tt>tos</tt> command are left. The default for this option is 3.</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 rounds-termination condition. However, the prefer peer can still be discarded by the intersection algorithm as a falseticker. To avoid this, it is usually wise to increase the <tt>mindist</tt> option of the <tt>tos</tt> command from the default .005 s to something like .05 s.</p>
-
-<p>Ordinarily, the combining algorithm computes a weighted average of the survivor
- offsets to produce the final synchronization source. However, if a prefer
- peer is among the survivors, the combining algorithm is not used. Instead,
- the offset of the prefer peer is used exclusively as the final synchronization
- source. In the common case involving a radio clock and a flock of remote backup
- servers, and with the radio clock designated a prefer peer, the result is that
- the radio clock normally disciplines the system clock as long as the radio itself
- remains operational. However, if the radio fails or becomes a falseticker,
- the averaged backup sources continue to discipline the system clock.</p>
-
-<h4 id="miti">Mitigation Rules</h4>
-
-<p>As the selection algorithm scans the associations for selectable candidates, the modem driver and local driver are segregated for later, but only if not designated a prefer peer. If so designated, a driver is included among the candidate population. In addition, if orphan parents are found the parent with the lowest metric is segregated for later; the others are discarded. For this purpose the metric is defined as the four-octet IPv4 address or the first four octets of the hashed IPv6 address. The resulting candidates, including any prefer peers found, are processed by the intersection to produce a possibly empty set of truechimers. The clustering algorithm ranks the truechimers first by stratum then by synchronization distance and designates the survivor with the lowest distance as the potential system peer.</p>
-
-<p>If one or more truechimers support a pulse-per-second (PPS) signal and the
- PPS signal is operating correctly, it is designated a PPS driver. If more than
- one PPS diver are found, only the first one is used. The PPS driver is not included
- in the combining algorithm and is mitigated separately.</p>
-
-<p>At this point we have the following contributors to the system clock discipline:</p>
-
+<h4 id="prefer">5. The <tt>prefer</tt> Peer</h4>
+<p>The mitigation rules are designed to provide an intelligent selection of the system peer from among the selectable sources of different types. When used with the <tt>server</tt> or <tt>peer</tt> commands, the <tt>prefer</tt> option designates one or more sources as preferred over all others. While the rules do not forbid it, it is usually not useful to designate more than one source as preferred; however, if more than one source is so designated, they are used in the order specified in the configuration file. If the first one becomes un selectable, the second one is considered and so forth. This order of priority is also applicable to multiple PPS drivers, multiple modem drivers and even multiple local drivers, although that would not normally be useful.</p>
+<p>The cluster algorithm works on the set of truechimers produced by the select algorithm. At each round the algorithm casts off the survivor least likely to influence the choice of system peer. If selectable, the prefer peer is never discarded; on the contrary, its potential removal becomes a termination condition. However, the prefer peer can still be discarded by the select algorithm as a falseticker; otherwise, the prefer peer becomes the system peer.</p>
+<p>Ordinarily, the combine algorithm computes a weighted average of the survivor
+ offset and jitter to produce the final values. However, if a prefer
+ peer is among the survivors, the combine algorithm is not used. Instead,
+ the offset and jitter of the prefer peer are used exclusively as the final values. In the common case involving a radio clock and a flock of remote backup
+ servers, and with the radio clock designated a prefer peer, the
+ the radio clock disciplines the system clock as long as the radio itself
+ remains operational. However, if the radio fails or becomes a falseticker,
+ the combined backup sources continue to discipline the system clock.</p>
+<h4 id="miti">6. Mitigation Rules</h4>
+<p>As the select algorithm scans the associations for selectable candidates, the modem driver and local driver are segregated for later, but only if not designated a prefer peer. If so designated, the driver is included among the candidate population. In addition, if orphan parents are found, the parent with the lowest metric is segregated for later; the others are discarded. For this purpose the metric is defined as the four-octet IPv4 address or the first four octets of the hashed IPv6 address. The resulting candidates, including any prefer peers found, are processed by the select algorithm to produce a possibly empty set of truechimers.</p>
+<p> As previously noted, the cluster algorithm casts out outliers, leaving the survivor list for later processing. The survivor list is then sorted by increasing root distance and the first entry temporarily designated the system peer. At this point the following contributors to the system clock discipline may be available:</p>
<ul>
-
-<li>(potential) system peer, if there are survivors;</li>
-<li>orphan parent, if present;</li>
-<li>local driver and zero offset, if present;</li>
-<li>modem driver and modem offset, if present;</li>
-<li>prefer peer and offset, if present;</li>
-<li>PPS driver and offset, if present.</li>
+ <li>(potential) system peer, if there are survivors;</li>
+ <li>orphan parent, if present;</li>
+ <li>local driver, if present;</li>
+ <li>modem driver, if present;</li>
+ <li>prefer peer, if present;</li>
+ <li>PPS driver, if present.</li>
</ul>
-
<p>The mitigation algorithm proceeds in three steps in turn.</p>
-
<ol>
-
-<li>If there are no survivors, the modem driver becomes the only survivor if there is one. If not, the local driver becomes the only survivor if there is one. If not, the orphan parent becomes the only survivor if there is one. If the number of survivors at this point is less than the <tt>minsane</tt> option of the <tt>tos</tt> command, the algorithm is terminated and the system variables remain unchanged. Note that <tt>minsane</tt> is by default 1, but can be set at any value including 0.</li>
-
-<li>If the prefer peer is among the survivors, it becomes the system peer and its clock offset and jitter are inherited by the corresponding system variables. Otherwise, the combining algorithm computes these variables from the survivor population.</li>
-
-<li>If there is a PPS driver and the system clock offset at this point is less than 0.4 s, and if there is a prefer peer among the survivors or if the PPS peer is designated as a prefer peer, the PPS driver becomes the system peer and its offset and jitter are inherited by the system variables, thus overriding any variables already computed. Note that a PPS driver is present only if PPS signals are actually being received and enabled by the associated driver.</li>
-
+ <li>If there are no survivors, the modem driver becomes the only survivor if there is one. If not, the local driver becomes the only survivor if there is one. If not, the orphan parent becomes the only survivor if there is one. If the number of survivors at this point is less than the <tt>minsane</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the algorithm is terminated and the system variables remain unchanged. Note that <tt>minsane</tt> is by default 1, but can be set at any value including 0.</li>
+ <li>If the prefer peer is among the survivors, it becomes the system peer and its offset and jitter are inherited by the corresponding system variables. Otherwise, the combine algorithm computes these variables from the survivor population.</li>
+ <li>If there is a PPS driver and the system clock offset at this point is less than 0.4 s, and if there is a prefer peer among the survivors or if the PPS peer is designated as a prefer peer, the PPS driver becomes the system peer and its offset and jitter are inherited by the system variables, thus overriding any variables already computed. Note that a PPS driver is present only if PPS signals are actually being received and enabled by the associated driver.</li>
</ol>
-
<p>If none of the above is the case, the data are disregarded and the system variables remain as they are.</p>
-
-<h4 id="mins">The <tt>minsane</tt> Option</H4>
-
-<p> The <tt>minsane</tt> option of the <tt>tos</tt> command, the <tt>prefer</tt> option of the <tt>server</tt> and <tt>peer</tt> commands and the <tt>flag</tt> options of the <tt>fudge</tt> command for the PPS driver can be used with the mitigation rules to provide many useful configurations. The <tt>minsane</tt> option specifies the minimum number of survivors required to synchronized the system clock. The <tt>prefer</tt> option designates the prefer peer. The driver-dependent <tt>flag</tt> options enable the PPS driver for various conditions.</p>
-
+<h4 id="mins">7. The <tt>minsane</tt> Option</H4>
+<p> The <tt>minsane</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the <tt>prefer</tt> option of the <tt>server</tt> and <tt>peer</tt> commands and the <tt>flag</tt> option of the <tt>fudge</tt> command for a selected driver can be used with the mitigation rules to provide many useful configurations. The <tt>minsane</tt> option specifies the minimum number of survivors required to synchronize the system clock. The <tt>prefer</tt> option operates as described in previous sections. The <tt>flag</tt> option enables the PPS signal for the selected driver.</p>
<p>A common scenario is a GPS driver with a serial timecode and PPS signal. The
- PPS signal is disabled until the system clock has been set by some means, not
- necessarily the GPS driver. If the serial timecode is within 0.4 s of the PPS
- signal, the GPS driver is designated the PPS driver and the PPS signal disciplines
- the system clock. If no GPS satellites are in view, or if the PPS signal is
- disconnected, the GPS driver stops updating the system clock and so eventually
- becomes unreachable and replaced by other sources..</p>
-
-<p>Whether or not the GPS driver disables the PPS signal when unreachable is
-at the discretion of the driver. Ordinarily, the PPS signal would be disabled in this case; however, When the GPS receiver has a precision holdover oscillator, the driver may elect to continue PPS operation. In this case the PPS signal continues to discipline the system clock.</p>
-
-<p>&nbsp;</p>
-
+ PPS signal is disabled until the system clock has been set by some means, not
+ necessarily the GPS driver. If the serial timecode is within 0.4 s of the PPS
+ signal, the GPS driver is designated the PPS driver and the PPS signal disciplines
+ the system clock. If the serial timecode becomes unreliable, or if the PPS signal is
+ disconnected, the GPS driver stops updating the system clock and so eventually
+ becomes unreachable and is replaced by other sources.</p>
+<p>Whether or not the GPS driver disables the PPS signal when the timecode becomes unreliable is
+ at the discretion of the driver. Ordinarily, the PPS signal is disabled in this case; however, when the GPS receiver has a precision holdover oscillator, the driver may elect to continue PPS discipline . In this case, <tt>minsane</tt> can be set to zero so the PPS signal continues to discipline the system clock.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+</body>
+</html>
diff --git a/html/quick.html b/html/quick.html
index 8ed31fa8a04d..9b6859baa518 100644
--- a/html/quick.html
+++ b/html/quick.html
@@ -1,46 +1,45 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=windows-1252">
- <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:
- <!-- #BeginDate format:En1m -->25-nov-09 22:13<!-- #EndDate -->
- UTC</p>
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
- <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 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. The file, called by default <tt>/etc/ntp.conf</tt>, need only contain one command 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. The simplest is to use the
- Server Pool Scheme on the <a href="manyopt.html">Automatic Server Discovery</a> page. There
- are about two dozen public time servers operated by the <a href="http://tf.nist.gov/tf-cgi/servers.cgi">National
- Institutes of Science and Technology (NIST)</a>, <a href="http://tycho.usno.navy.mil/ntp.html">US
- Naval Observatory (USNO)</a>, <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/network_time_protocol_e.html"> Canadian
- Metrology Centre (CMC)</a> and many others available on the Internet. Lists
- of public primary and secondary NTP servers maintained on the <a href="http://support.ntp.org/bin/view/Servers/WebHome">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 occasionally writes the current value to a file specified by the</p>
- <p><tt>driftfile /etc/ntp.drift</tt></p>
- <p>configuration command. If <tt>ntpd</tt> is stopped and restarted, it initializes the frequency from this file and avoids the potentially lengthy interval to relearn the correction.</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. Don't forget to check for <a href="msyslog.html"> system log messages</a>. 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 any errors found.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<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>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<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 a predecessor of NTP in regular operation. The image was widely copied and used for testing purpose throughout much of the 1980s.</p>
+<p>Last update:
+ <!-- #BeginDate format:En1m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<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 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. The file, called by default <tt>/etc/ntp.conf</tt>, need only contain one command 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. The simplest and best is to use the
+ Server Pool Scheme on the <a href="discover.html">Automatic Server Discovery</a> page. There
+ are about two dozen public time servers operated by the <a href="http://tf.nist.gov/tf-cgi/servers.cgi">National
+ Institutes of Science and Technology (NIST)</a>, <a href="http://tycho.usno.navy.mil/ntp.html">US
+ Naval Observatory (USNO)</a>, <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/network_time_protocol_e.html"> Canadian
+ Metrology Centre (CMC)</a> and many others available on the Internet. Lists
+ of public primary and secondary NTP servers maintained on the <a href="http://support.ntp.org/Servers/WebHome">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 occasionally writes the current value to a file specified by the</p>
+<p><tt>driftfile /etc/ntp.drift</tt></p>
+<p>configuration command. If <tt>ntpd</tt> is stopped and restarted, it initializes the frequency from this file and avoids the potentially lengthy interval to relearn the correction.</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. Don't forget to check for <a href="msyslog.html"> system log messages</a>. 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 any errors found.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/rate.html b/html/rate.html
index be406613be22..2b47db80ba04 100644
--- a/html/rate.html
+++ b/html/rate.html
@@ -1,72 +1,67 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <meta name="generator" content="HTML Tidy, see www.w3.org">
- <title>Rate Management and the Kiss-o'-Death</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Rate Management and the Kiss-o'-Death Packet</h3>
- <img src="pic/boom4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
- <p>Our junior managers and the administrators.</p>
- <p>Last update:
- <!-- #BeginDate format:En2m -->03-May-2009 3:34<!-- #EndDate -->
- UTC</p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Rate Management and the Kiss-o'-Death</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+-->
+</style>
+</head>
+<body>
+<h3>Rate Management and the Kiss-o'-Death Packet</h3>
+<img src="pic/boom4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>Our junior managers and the administrators.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:19<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#intro">Introduction</a></li>
- <li class="inline"><a href="#poll">Poll Rate Control</a></li>
- <li class="inline"><a href="#burst">Burst Control</a></li>
- <li class="inline"><a href="#mah">Average Headway Time</a></li>
- <li class="inline"><a href="#mgt">Guard Time</a></li>
- <li class="inline"><a href="#kiss">The Kiss-o'-Death Packet</a></li>
- </ul>
- <hr>
- <h4 id="intro">Introduction</h4>
- <p>This page describes the various rate management provisions in NTPv4. Details about the configuration commands and options are given on the <a href="confopt.html">Configuration Options</a> page. Details about the cryptographic authentication schemes are given on the <a href="authopt.html">Authentication Options</a> page. Details about the automatic server discovery schemes are described on the <a href="manyopt.html">Automatic Server Discovery Schemes</a> page. Additional information is available in the papers, reports, memoranda and briefings on the <a href="http://www.eecis.udel.edu/~mills/ntp.html"> NTP Project</a> page.</p>
- <p>Some national time metrology laboratories, including NIST and USNO, use the <tt>ntpd</tt> reference implementation in their very busy public time servers. They operate multiple servers behind load-balancing devices to support aggregate rates up to several thousand packets per second. The servers need to defend themselves against all manner of broken implementations that can clog the server and and network infrastructure. On the other hand, friendly <tt>ntpd</tt> clients need to avoid configurations that can result in unfriendly rates.</p>
- <p>There are several features in <tt>ntpd</tt> designed to defend the servers, clients and network against accidental or intentional flood attack. On the other hand these features are also used to insure <tt>ntpd</tt> is a good citizen, even if configured in unfriendly ways. The ground rules are:</p>
- <ul>
- <li>Send at the lowest rate consistent with the expected accuracy expectations.</li>
- <li>Maintain strict minimum average headway and guard times, even if multiple burst options and/or the Autokey protocol are operating.</li>
- <li>When the first packet of a burst is sent to a server, do not send further packets until the first packet has been received from the server.</li>
- <li>Upon receiving a Kiss-o'-Death packet (see below), immediately reduce the sending rate.</li>
- </ul>
- <p>Rate management involves four algorithms to manage resources: (1) poll rate control, (2) burst control, (3) average headway time and (4) guard time. These are described in following sections.</p>
- <h4 id="poll">Poll Rate Control</h4>
- <p>Control of the poll interval is an intricate balance between expected acuracy and network load. The poll interval is constrained by the lower limit <tt>minpoll</tt> and upper limit <tt>maxpoll</tt> options of the <tt>server</tt> command and represented by the poll exponent in log<sub>2</sub> s units. The limits default to 6 (64 s) and 10 (1024 s), respectively, which are appropriate for the vast majority of cases. The default limits can be changed with these options to a minimum set by the <tt>average</tt> option of the <tt>discard</tt> command (see below) to a maximum of 17 (36 h). Unless the best possible accuracy is required, the well mannered NTP client automatically increases the poll interval to the maximum when possible, whether or not the server is reachable. The current poll interval for each association is displayed by the <tt>ntpq</tt> program <a href="ntpq.html#pe"><tt>pe</tt></a> command. The global poll interval/time constant is displayed as the poll system variable by the rv command. The minimum global poll interval/time constant is displayed as the minpoll system variable by the <a href="ntpq.html#pe"><tt>rv</tt></a> command.</p>
- <p>As a rule of thumb, the expected errors increase by a factor of two as the poll interval increases by a factor of four. The <tt>ntpd</tt> poll interval algorithm slowly increases the poll interval when jitter dominates the error budget, but quickly reduces the interval when wander dominates it. The algorithm uses a jiggle counter which operates over the range from <font face="symbol">-</font>30 to +30 and is initialized at 0. If the measured offset is less than four times the measured average jitter, the counter is increased by the pollcurrent exponent; if not, it is decreased by twice the poll exponent. If the counter reaches +30, the poll exponent is incremented by 1; if the counter reaches <font face="symbol">-</font>30, the exponent is decremented by 1. In either case the counter is set to 0.</p>
- <p>The poll interval is proportional to the time constant of the feedback loop which disciplines the system clock. The optimum time constant depends on the network time jitter and the clock oscillator frequency wander. Errors due to jitter decrease as the time constant increases, while errors due to wander decrease as the time constant decreases. The two error characteristics intersect at a point called the Allan intercept, which represents the ideal time constant. With a compromise Allan intercept of 2000 s, the optimim poll interval is about 64 s, which corresponds to a poll exponent of 6.</p>
- <p>There is normally no need to change the poll limits, as the poll interval is managed automatically as a function of prevailing jitter and wander. The most common exceptions are the following.</p>
- <ul>
- <li>With fast, lightly loaded LANs and modern processors, the nominal Allan intercept is about 500 s. In these cases the expected errors can be further reduced using a poll exponent of 4 (16 s). In the case of the pulse-per-second (PPS) driver, this is the recommended value.</li>
- <li>With symmetric modes the most stable behavior results when both peers are configured in symmetric active mode with matching poll intervals of 6 (64 s).</li>
- <li>The poll interval should not be modified for reference clocks, with the single exception the ACTS telephone modem driver. In this case the recommended minimum and maximum intervals are 12 (1.1 h) and 17 (36 h), respectively.</li>
- </ul>
- <h4 id="burst">Burst Control</h4>
- <p>Occasionally it is necessary to send packets at intervals less than the poll interval. For instance, with the <tt>burst</tt> and <tt>iburst</tt> options of the <tt>server</tt> command, the poll algorithm sends a burst of several packets at 2-s intervals. The <tt>ntpd</tt> poll algorithm avoids sending needless packets if the server is not responding. The client begins a burst with a single packet. When the first packet is received from the server, the client continues with the remaining packets in the burst. If the first packet is not received within 64 s, it will be sent again for two additional retries before beginning backoff. The result is to minimize network load if the server is not responding.</p>
- <p>For the <tt>iburst</tt> option the number of packets in the burst is six, which is the number normally needed to synchronize the clock; for the <tt>burst</tt> option, the number of packets in the burst is determined by the difference between the poll interval and the minimum poll interval set by the <tt>minpoll</tt> option of the <a href="confopt.html#server"><tt>server</tt></a> command. For instance, with a poll exponent of 6 (64 s), only a single packet is sent for every poll, while the full number of eight packets is sent at poll intervals of 9 (512 s) or more.</p>
- <h4 id="mah">Average Headway Time</h4>
- <p>There are two features in <tt>ntpd</tt> to manage the interval between one packet and the next. These features make use of a set of counters: a client output counter for each association and a server input counter for each distinct client address. Each counter increments by a value called the headway when a packet is processed and decrements by one each second. The default minimum average headway in <tt>ntpd</tt> is 8 s, but this can be changed using the <tt>average</tt> option of the <a href="miscopt.html#discard"><tt>discard</tt></a> command, but not less than 3 (8 s).</p>
- <p>If the <tt>iburst</tt> or <tt>burst</tt> options are present, the poll algorithm sends a burst of packets instead of a single packet at each poll opportunity. The NTPv4 specification requires that bursts contain no more than eight packets; so, starting from an output counter value of zero, the maximum counter value or ouput ceiling can be no more than eight times the minimum poll interval set by the <tt>minpoll</tt> option of the <a href="confopt.html#server"><tt>server</tt></a> command. However, if the burst starts with a counter value other than zero, there is a potential to exceed the ceiling. The poll algorithm avoids this by computing an additional headway time so that the next packet sent will not exceed the ceiling. Additional headway time can result from Autokey protocol operations. Designs such as this are often called leaky buckets. The current headway is displayed as the headway peer variable by the <tt>ntpq</tt> <a href="ntpq.html#pe"><tt>rv</tt></a> command.</p>
- <p>The <tt>ntpd</tt> input packet routine uses a special list of entries, one for each distinct client address found. Each entry includes an IP address, input counter and interval since the last packet arrival. The entries are ordered by interval from the smallest to the largest. As each packet arrives, the IP source address is compared to the IP address in each entry in turn. If a match is found the entry is removed and inserted first on the list. If the IP source address does not match any entry, a new entry is created and inserted first, possibly discarding the last entry on the list if it is full. Observers will note this is the same algorithm used for page replacement in virtual memory systems.</p>
- <p>In the virtual memory algorithm the entry of interest is the last, whereas here the entry of interest is the first. The input counter is decreased by the interval since it was last referenced, but not below zero. If the value of the counter plus the headway is greater than the input ceiling set by the <tt>average</tt> option, the packet is discarded. Otherwise, the counter is increased by the headway and the packet is processed. The result is, if the client maintains a maximum average headway not less than the input ceiling and transmits no more than eight packets in a burst, the input counter will not exceed the ceiling.</p>
- <h4 id="mgt">Guard Time</h4>
- <p>A review of past client abuse incidence shows the most frequent scenario is a broken client that attempts to send a number of packets at rates of one per second or more. On one occasion due to a defective client design, over 750,000 clients fell into this mode. There have been occasions where this abuse has persisted for days at a time. These scenarios are the most damaging, as they can threaten not only the victim server but the network infrastructure as well.</p>
- <p>In the <tt>ntpd</tt> design the minimum headway between the last packet received and the current packet is called the guard time. If the headway is less than the guard time, the packet is discarded. The guard time defaults to 2 s, but this can be changed using the <tt>minimum</tt> option of the <a href="miscopt.html#discard"><tt>discard</tt></a> ommand.</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 to cause the client to slow down. A special packet format has been created for this purpose called the kiss-o'-death (KoD) packet. KoD packets have leap indicator 3, stratum 0 and the reference identifier set to a four-byte ASCII code. At present, only one code <tt>RATE</tt> is sent by the server if the <tt>limited</tt> and <tt>kod</tt> flags are set in the <a href="accopt.html#restrict"><tt>restrict</tt></a> command and the rate limit is exceeded.</p>
- <p>A client receiving a KoD packet is expected to slow down; however, no explicit mechanism is specified in the protocol to do this. In the current reference implementation, the server sets the packet poll to the greater of (a) minimum average headway and (b) client packet poll. The client sets the peer poll field to the maximum of (a) minimum average headway and (b) server packet poll. For KoD packets (only), the minimum peer poll is clamped not less than the peer poll and the headway temporarily increased. </p>
- <p>At present there is only one KoD packet with code <tt>RATE.</tt> In order to make sure the client notices the KoD, the receive and transmit timestamps are set to the transmit timestamp of the client packet and all other fields left as in the client packet. Thus, even if the client ignores the KoD, it cannot do any useful time computations. KoDs themselves are rate limited in the same way as arriving packets in order to deflect a flood attack.</p>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#guard">Minimum Headway Time</a></li>
+ <li class="inline"><a href="#mah">Minimum Average Headway Time</a></li>
+ <li class="inline"><a href="#kiss">The Kiss-o'-Death Packet</a></li>
+ <li class="inline"><a href="#ref">References</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>This page describes the various rate management provisions in NTPv4. Some national time metrology laboratories, including NIST and USNO, use the NTP reference implementation in their very busy public time servers. They operate multiple servers behind load-balancing devices to support aggregate rates up to ten thousand packets per second. The servers need to defend themselves against all manner of broken client implementations that can clog the server and network infrastructure. On the other hand, friendly clients need to avoid configurations that can result in unfriendly behavior.</p>
+<p>A review of past client abuse incidence shows the most frequent scenario is a broken client that attempts to send packets at rates of one per second or more. On one occasion due to a defective client design [1], over 750,000 clients demonstrated this abuse. There have been occasions where this abuse has persisted for days at a time. These scenarios are the most damaging, as they can threaten not only the victim server but the network infrastructure as well.</p>
+<p>There are several features in the reference implementation<tt></tt> designed to defend the servers and network against accidental or intentional flood attack. Other features are used to insure that the client <tt></tt> is a good citizen, even if configured in unfriendly ways. The ground rules are:</p>
+<ul>
+ <li>Send at the lowest rate consistent with the expected accuracy requirements.</li>
+ <li>Maintain strict guard time and minimum average headway time, even if multiple burst options and/or the Autokey protocol are operating.</li>
+ <li>When the first packet of a burst is sent to a server, do not send further packets until the first packet has been received from the server.</li>
+ <li>Upon receiving a Kiss-o'-Death packet (KoD, see below), immediately reduce the sending rate.</li>
+</ul>
+<p>Rate management involves four algorithms to manage resources: (1) poll rate control, (2) burst control, (3) average headway time and (4) guard time. The first two algorithms are described on the <a href="poll.html">Poll Program</a> page; the remaining two are described in following sections.</p>
+<h4 id="guard">Minimum Headway Time</h4>
+<p>The headway is defined for each source as the interval between the last packet sent or received and the next packet for that source. The minimum receive headway is defined as the guard time. In the reference implementation, if the receive headway is less than the guard time, the packet is discarded. The guard time defaults to 2 s, but this can be changed using the <tt>minimum</tt> option of the <a href="accopt.html#discard"><tt>discard</tt></a> command. By design, the minimum interval between <tt>burst</tt> and <tt>iburst</tt> packets sent by any client is 2 s, which does not violate this constraint. Packets sent by other implementations that violate this constraint will be dropped and a KoD packet returned, if enabled.</p>
+<h4 id="mah">Minimum Average Headway Time</h4>
+<p>There are two features in the reference implementation to manage the minimum average headway time between one packet and the next, and thus the maximum average rate for each source. The transmit throttle limits the rate for transmit packets, while the receive discard limits the rate for receive packets. These features make use of a pair of counters: a client output counter for each association and a server input counter for each distinct client IP address. For each packet received, the input counter increments by a value equal to the minimum average headway (MAH) and then decrements by one each second. For each packet transmitted, the output counter increments by the MAH and then decrements by one each second. The default MAH is 8 s, but this can be changed using the <tt>average</tt> option of the <a href="accopt.html#discard"><tt>discard</tt></a> command.</p>
+<p>If the <tt>iburst</tt> or <tt>burst</tt> options are present, the poll algorithm sends a burst of packets instead of a single packet at each poll opportunity. The NTPv4 specification requires that bursts contain no more than eight packets. Starting from an output counter value of zero, the maximum counter value, called the ceiling, can be no more than eight times the MAH. However, if the burst starts with a counter value other than zero, there is a potential to exceed the ceiling. This can result from protocol restarts and/or Autokey protocol operations. In these cases the poll algorithm throttles the output rate by computing an additional headway time so that the next packet sent will not exceed the ceiling. Designs such as this are often called leaky buckets.</p>
+<p>The reference implementation uses a special most-recently used (MRU) list of entries, one entry for each distinct client IP address found. Each entry includes the IP address, input counter and process time at the last packet arrival. As each packet arrives, the IP source address is compared to the IP address in each entry in turn. If a match is found the entry is removed and inserted first on the list. If the IP source address does not match any entry, a new entry is created and inserted first, possibly discarding the last entry if the list is full. Observers will note this is the same algorithm used for page replacement in virtual memory systems. However, in the virtual memory algorithm the entry of interest is the last, whereas here the entry of interest is the first.</p>
+<p> The input counter for the first entry on the MRU list, representing the current input packet, is decreased by the interval since the entry was last referenced, but not below zero. If the input counter is greater than the ceiling, the packet is discarded. Otherwise, the counter is increased by the MAH and the packet is processed. The result is, if the client maintains an average headway greater than the ceiling and transmits no more than eight packets in a burst, the input counter will not exceed the ceiling. Packets sent by other implementations that violate this constraint will be dropped and a KoD packet returned, if enabled.</p>
+<p>The reference implementation has a maximum MRU list size of a few hundred entries. The national time servers operated by NIST and USNO have an aggregate packet rate in the thousands of packets per second from many thousands of customers. Under these conditions, the list overflows after only a few seconds of traffic. However, analysis shows that the vast majority of the abusive traffic is due to a tiny minority of the customers, some of which send at over one packet per second. This means that the few seconds retained on the list is sufficient to identify and discard by far the majority of the abusive traffic.</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 to cause the client to slow down. A special packet has been created for this purpose called the kiss-o'-death (KoD) packet. KoD packets have leap indicator 3, stratum 0 and the reference identifier set to a four-octet ASCII code. At present, only one code <tt>RATE</tt> is sent by the server if the <tt>limited</tt> and <tt>kod</tt> flags of the <a href="accopt.html#restrict"><tt>restrict</tt></a> command are present and either the guard time or MAH time are violated.</p>
+<p>A client receiving a KoD packet is expected to slow down; however, no explicit mechanism is specified in the protocol to do this. In the reference implementation, the server sets the poll field of the KoD packet to the greater of (a) the server MAH and (b) client packet poll field. In response to the KoD packet, the client sets the peer poll interval to the maximum of (a) the client MAH and (b) the server packet poll field. This automatically increases the headway for following client packets. </p>
+<p> In order to make sure the client notices the KoD packet, the server sets the receive and transmit timestamps to the transmit timestamp of the client packet. Thus, even if the client ignores all except the timestamps, it cannot do any useful time computations. KoD packets themselves are rate limited to no more than one packet per guard time, in order to defend against flood attacks.</p>
+<h4 id="ref">References</h4>
+<ol>
+ <li>Mills, D.L., J. Levine, R. Schmidt and D. Plonka. Coping with overload on the Network Time Protocol public servers. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Washington DC, December 2004), 5-16. Paper: <a href="http://www.eecis.udel.edu/~mills/database/papers/ptti/ptti04a.pdf">PDF</a>, Slides:<a href="http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti04.pdf">PDF</a> | <a href="http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti04.ppt">PowerPoint</a></li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/rdebug.html b/html/rdebug.html
index 5398338fe816..f14bf43c96c5 100644
--- a/html/rdebug.html
+++ b/html/rdebug.html
@@ -1,31 +1,29 @@
<!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>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="25" locale="00000409" region="0" t="DateTime" w="61">01:24</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Saturday, November 24, 2007</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/install.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> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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 they'll sweep your bugs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:19<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/install.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/html/refclock.html b/html/refclock.html
index 951012db1231..d8969e38cbc3 100644
--- a/html/refclock.html
+++ b/html/refclock.html
@@ -1,90 +1,93 @@
<!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="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="61">20:45</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="286">Thursday, January 03, 2008</csobj></p>
- <br clear="left">
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
- <h4>Table of Contents</h4>
- <ul>
- <li class="inline"><a href="#clock">Introduction</a></li>
- <li class="inline"><a href="#cal">Driver Calibration</a></li>
- <li class="inline"><a href="#list">Comprehensive List of Clock Drivers</a></li>
- </ul>
- <hr>
- <h4 id="clock">Introduction</h4>
- <p>Drivers for most radio and modem reference clocks is included by default in the NTP distribution. Individual drivers can be activated using <tt>server</tt> commands as described in the <a href="ntpd.html"><tt>ntpd</tt> program manual page</a>. Drivers have addresses in the form 127.127.<i>t.u</i>, where <i>t</i> is the driver type and <i>u</i> is a unit number in the range 0-3 to distinguish multiple instances of the same driver. Most drivers require a serial or parallel port or special bus peripheral, but some can work directly from an audio codec or sound card when availble. The particular device is specified by adding a soft link from the name used by the driver to the device name.</p>
- <p>All radio clock drivers require that the radio be set for Coordinated Universal Time (UTC) only. Timezone and standard/daylight adjustments are performed by the kernel. There are difference in the various Unix and Windows port interfaces detected at configuration time, so it is important that the NTP daemon and utilities be compiled on the target system or clone.</p>
- <p>When a pulse-per-second (PPS)&nbsp;signal is available, the <a href="drivers/driver22.html"> PPS Clock Discipline</a> driver is can be used. It normally works in conjunction with the reference clock that produces the signal, but can work with another driver or remote server. When PPS kernel features are present, the driver can redirect the PPS signal to the kernel.</p>
- <p>In general, performance can be improved, especially when more than one 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 is used to discipline the system clock and jitter-producing &quot;clockhopping&quot; between sources is avoided. This is especially valuable when the PPS clock discipline driver is available.</p>
- <p>There are audio drivers for each of the NIST time stations WWV and WWVH, Canadian time station CHU and generic IRIG signals. Currently, support for FreeBSD, Solaris and SunOS is in the distribution. It is left to the volunteer corps to confirm this works in other systems. Further information on hookup, debugging and monitoring is given in the <a href="audio.html">Audio Drivers</a> page.</p>
- <p>The <a href="drivers/driver1.html"> Undisciplined Local Clock</a> driver can simulate a reference clock when no external synchronization sources are available. If a server with this driver is connected directly or indirectly to the public Internet, there is some danger that it can destabilize other clients. It is not recommended that the loccal clock driver be used in this way, as the orphan mode descibed on the <a href="assoc.html">Association Management</a> page provides a generic backup capability.</p>
- <p>The local clock driver can also be used when an external synchronization source such as the IEEE 1588 Precision Time Protocol or NIST&nbsp;Lockclock directly synchronizes the computer time. 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 or shortwave radio services need to know the radio propagation time from the transmitter to the receiver. 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/ntp/qth.html">Time and Frequency Standard Station Information</a> page. Receiver coordinates can be obtained locally or from Google Earth. The actual calculations are beyond the scope of this document.</p>
- <p>Depending on interface type, port speed, etc., a reference clock can have a small residual offset relative to another. 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 described on the <a href="miscopt.html">Miscellaneous Options</a> page activates a special feature which automatically calculates a correction factor for each driver relative to an association designated the prefer peer.</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. 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>
- <li class="inline"><a href="drivers/driver2.html">Type 2</a> Trak 8820 GPS Receiver (<tt>GPS_TRAK</tt>)</li>
- <li class="inline"><a href="drivers/driver3.html">Type 3</a> PSTI/Traconex 1020 WWV/WWVH Receiver (<tt>WWV_PST</tt>)</li>
- <li class="inline"><a href="drivers/driver4.html">Type 4</a> Spectracom WWVB/GPS Receivers (<tt>WWVB_SPEC</tt>)</li>
- <li class="inline"><a href="drivers/driver5.html">Type 5</a> TrueTime GPS/GOES/OMEGA Receivers (<tt>TRUETIME</tt>)</li>
- <li class="inline"><a href="drivers/driver6.html">Type 6</a> IRIG Audio Decoder (<tt>IRIG_AUDIO</tt>)</li>
- <li class="inline"><a href="drivers/driver7.html">Type 7</a> Radio CHU Audio Demodulator/Decoder (<tt>CHU</tt>)</li>
- <li class="inline"><a href="drivers/driver8.html">Type 8</a> Generic Reference Driver (<tt>PARSE</tt>)</li>
- <li class="inline"><a href="drivers/driver9.html">Type 9</a> Magnavox MX4200 GPS Receiver (<tt>GPS_MX4200</tt>)</li>
- <li class="inline"><a href="drivers/driver10.html">Type 10</a> Austron 2200A/2201A GPS Receivers (<tt>GPS_AS2201</tt>)</li>
- <li class="inline"><a href="drivers/driver11.html">Type 11</a> Arbiter 1088A/B GPS Receiver (<tt>GPS_ARBITER</tt>)</li>
- <li class="inline"><a href="drivers/driver12.html">Type 12</a> KSI/Odetics TPRO/S IRIG Interface (<tt>IRIG_TPRO</tt>)</li>
- <li class="inline">Type 13 Leitch CSD 5300 Master Clock Controller (<tt>ATOM_LEITCH</tt>)</li>
- <li class="inline">Type 14 EES M201 MSF Receiver (<tt>MSF_EES</tt>)</li>
- <li class="inline">Type 15 reserved</li>
- <li class="inline"><a href="drivers/driver16.html">Type 16</a> Bancomm GPS/IRIG Receiver (<tt>GPS_BANCOMM</tt>)</li>
- <li class="inline">Type 17 Datum Precision Time System (<tt>GPS_DATUM</tt>)</li>
- <li class="inline"><a href="drivers/driver18.html">Type 18</a> NIST/USNO/PTB Modem Time Services (<tt>ACTS_MODEM</tt>)</li>
- <li class="inline"><a href="drivers/driver19.html">Type 19</a> Heath WWV/WWVH Receiver (<tt>WWV_HEATH</tt>)</li>
- <li class="inline"><a href="drivers/driver20.html">Type 20</a> Generic NMEA GPS Receiver (<tt>NMEA</tt>)</li>
- <li class="inline">Type 21 TrueTime GPS-VME Interface (<tt>GPS_VME</tt>)</li>
- <li class="inline"><a href="drivers/driver22.html">Type 22</a> PPS Clock Discipline (<tt>PPS</tt>)</li>
- <li class="inline">Type 23 reserved</li>
- <li class="inline">Type 24 reserved</li>
- <li class="inline">Type 25 reserved</li>
- <li class="inline"><a href="drivers/driver26.html">Type 26</a> Hewlett Packard 58503A GPS Receiver (<tt>GPS_HP</tt>)</li>
- <li class="inline"><a href="drivers/driver27.html">Type 27</a> Arcron MSF Receiver (<tt>MSF_ARCRON</tt>)</li>
- <li class="inline"><a href="drivers/driver28.html">Type 28</a> Shared Memory Driver (<tt>SHM</tt>)</li>
- <li class="inline"><a href="drivers/driver29.html">Type 29</a> Trimble Navigation Palisade GPS (<tt>GPS_PALISADE</tt>)</li>
- <li class="inline"><a href="drivers/driver30.html">Type 30</a> Motorola UT Oncore GPS <tt>GPS_ONCORE</tt>)</li>
- <li class="inline"><a href="drivers/driver31.html">Type 31</a> Rockwell Jupiter GPS (<tt>GPS_JUPITER</tt>)</li>
- <li class="inline"><a href="drivers/driver32.html">Type 32</a> Chrono-log K-series WWVB receiver (<tt>CHRONOLOG</tt>)</li>
- <li class="inline"><a href="drivers/driver33.html">Type 33</a> Dumb Clock (<tt>DUMBCLOCK</tt>)</li>
- <li class="inline"><a href="drivers/driver34.html">Type 34</a> Ultralink WWVB Receivers (<tt>ULINK</tt>)</li>
- <li class="inline"><a href="drivers/driver35.html">Type 35</a> Conrad Parallel Port Radio Clock (<tt>PCF</tt>)</li>
- <li class="inline"><a href="drivers/driver36.html">Type 36</a> Radio WWV/H Audio Demodulator/Decoder (<tt>WWV</tt>)</li>
- <li class="inline"><a href="drivers/driver37.html">Type 37</a> Forum Graphic GPS Dating station (<tt>FG</tt>)</li>
- <li class="inline"><a href="drivers/driver38.html">Type 38</a> hopf GPS/DCF77 6021/komp for Serial Line (<tt>HOPF_S</tt>)</li>
- <li class="inline"><a href="drivers/driver39.html">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus (<tt>HOPF_P</tt>)</li>
- <li class="inline"><a href="drivers/driver40.html">Type 40</a> JJY Receivers (<tt>JJY</tt>)</li>
- <li class="inline">Type 41 TrueTime 560 IRIG-B Decoder</li>
- <li class="inline"><a href="drivers/driver42.html">Type 42</a> Zyfer GPStarplus Receiver</li>
- <li class="inline"><a href="drivers/driver43.html">Type 43</a> RIPE NCC interface for Trimble Palisade</li>
- <li class="inline"><a href="drivers/driver44.html">Type 44</a> NeoClock4X - DCF77 / TDF serial line</li>
- </ul>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Reference Clock Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Reference Clock Support</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:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:20<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#spec">Special Considerations</a></li>
+ <li class="inline"><a href="#list">List of Reference Clock Drivers</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>NTP Version 4 supports almost four dozen satellite, radio and telephone modem reference clocks plus several audio devices for instrumentation signals. A general description of the reference clock support is on this page. Additional information about each reference clock driver can be found via links from this page. Additional information is on 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. Information on how to support pulse-per-second (PPS) signals produced by some devices is on the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. All reference clock drivers require that the reference clock use only Coordinated Universal Time (UTC). Timezone and standard/daylight adjustments are performed by the operating system kernel.</p>
+<p>A reference clock will generally (though not always) be a radio timecode receiver synchronized to standard time as provided by NIST and USNO in the US, NRC in Canada and their counterparts elsewhere in the world. A device driver specific to each reference clock must be compiled in the distribution; however, most common radio, satellite and telephone modem clocks are included by default and are activated by configuration commands.</p>
+<p>Reference clocks are supported in the same way as ordinary NTP clients and use the same filter, select, cluster and combine algorithms. Drivers have addresses in the form 127.127.<i>t.u</i>, where <i>t</i> is the driver type and <i>u</i> is a unit number in the range 0-3 to distinguish multiple instances of the same driver. The connection to the computer is device dependent, usually a serial port, parallel port or special bus peripheral, but some can work directly from an audio codec or sound card. The particular device is specified by adding a soft link from the name used by the driver to the particular device name.</p>
+<p>The <tt>server</tt> command is used to configure a reference clock. Only the <tt>mode>,<tt>minpoll</tt>, <tt>maxpoll</tt>, and <tt>prefer</tt> options are supported for reference clocks, as described on the <a href="clockopt.html">Reference Clock Commands</a> page. The <tt>prefer</tt> option is discussed on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. Some of these options have meaning only for selected clock drivers.</p>
+<p>The <tt>fudge</tt> command can be used to provide additional information for individual drivers and normally follows immediately after the <tt>server</tt> command. The reference clock stratum is by default 0, so that the server stratum appears to clients as 1. The <tt>stratum</tt> option can be used to set the stratum to any value in the range 0 through 15. The <tt>refid</tt> option can be used to change the reference identifier, as might in the case when the driver is disciplined by a pulse-per-second (PPS) source. The device-dependent <tt>mode</tt>, <tt>time</tt> and <tt>flag</tt> options can provide additional driver customization.</p>
+<h4 id="spec">Special Considerations</h4>
+<p>The <a href="audio.html">Audio Drivers</a> page describes three software drivers that process audio signals from an audio codec or sound card. One is for the NIST time and frequency stations WWV and WWVH, another for the Canadian time and frequency station CHU. These require an external shortwave radio and antenna. A third is for the generic IRIG signal produced by some timing devices. Currently, these are supported in FreeBSD, Solaris and SunOS and likely in other system as well.</p>
+<p>The <a href="drivers/driver1.html"> Undisciplined Local Clock</a> driver can simulate a reference clock when no external synchronization sources are available. If a server with this driver is connected directly or indirectly to the public Internet, there is some danger that it can destabilize other clients. It is not recommended that the local clock driver be used in this way, as the orphan mode described on the <a href="assoc.html">Association Management</a> page provides a generic backup capability.</p>
+<p>The local clock driver can also be used when an external synchronization source such as the IEEE 1588 Precision Time Protocol or NIST Lockclock directly synchronizes the computer time. Further information is on the <a href="extern.html">External Clock Discipline and the Local Clock Driver</a> page.</p>
+<p>Several drivers make use of the pulse-per-second (PPS)&nbsp;signal discipline, which is part of the generic driver interface, so require no specific configuration. For those drivers that do not use this interface, the <a href="drivers/driver22.html"> PPS Clock Discipline</a> driver can be can provide this function. It normally works in conjunction with the reference clock that produces the timecode signal, but can work with another driver or remote server. When PPS kernel features are present, the driver can redirect the PPS signal to the kernel.</p>
+<p>Some drivers depending on longwave or shortwave radio services need to know the radio propagation time from the transmitter to the receiver. 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/ntp/qth.html">Time and Frequency Standard Station Information</a> page. Receiver coordinates can be obtained locally or from Google Earth. The actual calculations are beyond the scope of this document.</p>
+<p>Depending on interface type, port speed, etc., a reference clock can have a small residual offset relative to another. 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 described on the <a href="miscopt.html">Miscellaneous Options</a> page activates a special feature which automatically calculates a correction factor for each driver relative to an association designated the prefer peer.</p>
+<h4 id="list"> List of Reference 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. 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>
+ <li class="inline">Type 2 Deprecated: was Trak 8820 GPS Receiver</li>
+ <li class="inline"><a href="drivers/driver3.html">Type 3</a> PSTI/Traconex 1020 WWV/WWVH Receiver (<tt>WWV_PST</tt>)</li>
+ <li class="inline"><a href="drivers/driver4.html">Type 4</a> Spectracom WWVB/GPS Receivers (<tt>WWVB_SPEC</tt>)</li>
+ <li class="inline"><a href="drivers/driver5.html">Type 5</a> TrueTime GPS/GOES/OMEGA Receivers (<tt>TRUETIME</tt>)</li>
+ <li class="inline"><a href="drivers/driver6.html">Type 6</a> IRIG Audio Decoder (<tt>IRIG_AUDIO</tt>)</li>
+ <li class="inline"><a href="drivers/driver7.html">Type 7</a> Radio CHU Audio Demodulator/Decoder (<tt>CHU</tt>)</li>
+ <li class="inline"><a href="drivers/driver8.html">Type 8</a> Generic Reference Driver (<tt>PARSE</tt>)</li>
+ <li class="inline"><a href="drivers/driver9.html">Type 9</a> Magnavox MX4200 GPS Receiver (<tt>GPS_MX4200</tt>)</li>
+ <li class="inline"><a href="drivers/driver10.html">Type 10</a> Austron 2200A/2201A GPS Receivers (<tt>GPS_AS2201</tt>)</li>
+ <li class="inline"><a href="drivers/driver11.html">Type 11</a> Arbiter 1088A/B GPS Receiver (<tt>GPS_ARBITER</tt>)</li>
+ <li class="inline"><a href="drivers/driver12.html">Type 12</a> KSI/Odetics TPRO/S IRIG Interface (<tt>IRIG_TPRO</tt>)</li>
+ <li class="inline">Type 13 Leitch CSD 5300 Master Clock Controller (<tt>ATOM_LEITCH</tt>)</li>
+ <li class="inline">Type 14 EES M201 MSF Receiver (<tt>MSF_EES</tt>)</li>
+ <li class="inline">Type 15 reserved</li>
+ <li class="inline"><a href="drivers/driver16.html">Type 16</a> Bancomm GPS/IRIG Receiver (<tt>GPS_BANCOMM</tt>)</li>
+ <li class="inline">Type 17 Datum Precision Time System (<tt>GPS_DATUM</tt>)</li>
+ <li class="inline"><a href="drivers/driver18.html">Type 18</a> NIST/USNO/PTB Modem Time Services (<tt>ACTS_MODEM</tt>)</li>
+ <li class="inline"><a href="drivers/driver19.html">Type 19</a> Heath WWV/WWVH Receiver (<tt>WWV_HEATH</tt>)</li>
+ <li class="inline"><a href="drivers/driver20.html">Type 20</a> Generic NMEA GPS Receiver (<tt>NMEA</tt>)</li>
+ <li class="inline">Type 21 TrueTime GPS-VME Interface (<tt>GPS_VME</tt>)</li>
+ <li class="inline"><a href="drivers/driver22.html">Type 22</a> PPS Clock Discipline (<tt>PPS</tt>)</li>
+ <li class="inline">Type 23 reserved</li>
+ <li class="inline">Type 24 reserved</li>
+ <li class="inline">Type 25 reserved</li>
+ <li class="inline"><a href="drivers/driver26.html">Type 26</a> Hewlett Packard 58503A GPS Receiver (<tt>GPS_HP</tt>)</li>
+ <li class="inline"><a href="drivers/driver27.html">Type 27</a> Arcron MSF Receiver (<tt>MSF_ARCRON</tt>)</li>
+ <li class="inline"><a href="drivers/driver28.html">Type 28</a> Shared Memory Driver (<tt>SHM</tt>)</li>
+ <li class="inline"><a href="drivers/driver29.html">Type 29</a> Trimble Navigation Palisade GPS (<tt>GPS_PALISADE</tt>)</li>
+ <li class="inline"><a href="drivers/driver30.html">Type 30</a> Motorola UT Oncore GPS <tt>GPS_ONCORE</tt>)</li>
+ <li class="inline"><a href="drivers/driver31.html">Type 31</a> Rockwell Jupiter GPS (<tt>GPS_JUPITER</tt>)</li>
+ <li class="inline"><a href="drivers/driver32.html">Type 32</a> Chrono-log K-series WWVB receiver (<tt>CHRONOLOG</tt>)</li>
+ <li class="inline"><a href="drivers/driver33.html">Type 33</a> Dumb Clock (<tt>DUMBCLOCK</tt>)</li>
+ <li class="inline"><a href="drivers/driver34.html">Type 34</a> Ultralink WWVB Receivers (<tt>ULINK</tt>)</li>
+ <li class="inline"><a href="drivers/driver35.html">Type 35</a> Conrad Parallel Port Radio Clock (<tt>PCF</tt>)</li>
+ <li class="inline"><a href="drivers/driver36.html">Type 36</a> Radio WWV/H Audio Demodulator/Decoder (<tt>WWV</tt>)</li>
+ <li class="inline"><a href="drivers/driver37.html">Type 37</a> Forum Graphic GPS Dating station (<tt>FG</tt>)</li>
+ <li class="inline"><a href="drivers/driver38.html">Type 38</a> hopf GPS/DCF77 6021/komp for Serial Line (<tt>HOPF_S</tt>)</li>
+ <li class="inline"><a href="drivers/driver39.html">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus (<tt>HOPF_P</tt>)</li>
+ <li class="inline"><a href="drivers/driver40.html">Type 40</a> JJY Receivers (<tt>JJY</tt>)</li>
+ <li class="inline">Type 41 TrueTime 560 IRIG-B Decoder</li>
+ <li class="inline"><a href="drivers/driver42.html">Type 42</a> Zyfer GPStarplus Receiver</li>
+ <li class="inline"><a href="drivers/driver43.html">Type 43</a> RIPE NCC interface for Trimble Palisade</li>
+ <li class="inline"><a href="drivers/driver44.html">Type 44</a> NeoClock4X - DCF77 / TDF serial line</li>
+ <li class="inline"><a href="drivers/driver45.html">Type 45</a> Spectracom TSYNC PCI</li>
+ <li class="inline"><a href="drivers/driver46.html">Type 46</a> GPSD NG client protocol</li>
+</ul>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/release.html b/html/release.html
index 2307f7b99075..f940603a0947 100644
--- a/html/release.html
+++ b/html/release.html
@@ -1,61 +1,72 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html>
-
- <head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
- <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="61">16:10</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="250">Sunday, March 02, 2008</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 25 years and the paint still isn't dry.</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 Windows NT and XP. 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 other Windows versions, VMS and various reference clock drivers.</p>
- <p>This release has been compiled and tested on many systems, including SunOS 4.1.3, Solaris 2.5.1-2.10, Alpha Tru64 4.0-5.1, Ultrix 4.4, Linux 2.4.2, FreeBSD 4.5-6.2 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 developer corps looks for help elsewhere to resolve these differences.</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.</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.</li>
- <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.</li>
- <li>The clock discipline algorithm has been redesigned to improve accuracy, reduce the impact of network jitter and allow increased in poll intervals to 36 hours with only moderate sacrifice in accuracy.</li>
- <li>A new feature called &quot;huffpuff&quot; maximizes accuracy in cases of highly asymmetric network delays typical of ISDN and telephone modems.</li>
- <li>The clock selection algorithm has been redesigned to reduce &quot;clockhopping&quot; when the choice of servers changes frequently as the result of comparatively insignificant quality changes.</li>
- <li>This release includes support for the <a href="ftp://ftp.udel.edu/usa/ftp/pub/ntp/software/">nanokernel</a> precision time kernel modifications, which are now in stock FreeBSD and optional in Linux kernels. With this support the system clock can be disciplined to the order of one nanosecon. The older microtime kernel modifications in Digital/Compaq/HP Tru64, Digital Ultrix and Sun Microsystems SunOS and Solaris, continue to be supported. In either case the support eliminates sawtooth error, which can be in the hundreds of microseconds.</li>
- <li>This release includes support for Autokey public-key cryptography, which is the preferred scheme for authenticating servers to clients. Additional information about Autokey cryptography is on 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>
- <li>The OpenSSL cryptographic library has replaced the library formerly available from RSA Laboratories. All cryptographic routines except a version of the MD5 message digest routine have been removed from the base distribution.</li>
- <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>
- <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>
- <li>NTPv4 includes three new server discovery schemes, which in most applications can avoid per-host configuration altogether. Two of these are based on IP multicast technology, while the remaining one is based on crafted DNS lookups. See the <a href="manyopt.html">Automatic NTP Configuration Schemes</a> page for further information.</li>
- <li>This release includes comprehensive packet rate management tools to help reduce the level of spurious network traffic and protect the busiest servers from overload. See the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page for further information.</li>
- <li>This release includes support for the orphan mode, which replaces the local clock driver for most configurations. Orphan mode provides an automatic, subnet-wide synchronization feature with multiple sources. It can be used in isolated networks or in Internet subnets where the servers or Internet connection have failed. See the <a href="manyopt.html">Automatic NTP Configuration Options</a> page for further information.</li>
- <li>There are two new 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>
- <li>The reference clock driver interface is smaller, more rational and more accurate.</li>
- <li>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 an audio port. See the <a href="audio.html">Reference Clock Audio Drivers</a> page for further information.</li>
- <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>
- <li>In NTPv3 a large number of weeds and useless code had grown over the years since the original NTP code was implemented 25 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>
- <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 Bitkeeper using an online repository at www.ntp.org. Trouble ticket reporting is provided using Bugzilla.</li>
- <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. In particular, the <tt>tos</tt> and <tt>tos</tt> commands can be used to adjust thresholds, throw switches and change limits.</li>
- <li>The <tt>ntpd</tt> daemon can be operated 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.</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>Some configuration commands have been removed, others added and some changed in minor ways. See the Commands and Options collection on the <a href="sitemap.html">Site Map</a> page.</li>
- <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 resolves to the intended address family. Older versions of <tt>ntpdc</tt> will show only the IPv4 associations with the <tt>peers</tt> and some other commands. Older versions of <tt>ntpq</tt> will show 0.0.0.0 for IPv6 associations with the <tt>peers</tt> and some other commands.</li>
- <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 IPv6 address. All programs in the distribution have been modified to work with both address families.</li>
- <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 adopted 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>
- <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 by some SNTP clients.</li>
- </ol>
- <hr>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En1m -->3-Oct-2011 21:51<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#new">New Features Modes</a></li>
+ <li class="inline"><a href="#change">Changes and Upgrades Since the NTPv3 Version (xntp3-5)</a></li>
+ <li class="inline"><a href="#nasty">Nasty Surprises</a></li>
+</ul>
+<hr>
+<p>NTP has been under development for almost 30 years, but the paint ain't dry even now. This release of the NTP Version 4 (NTPv4) distribution for Unix, VMS and Windows incorporates new features and refinements, but retaining backwards compatibility with older versions, including NTPv3 and NTPv2, but not NTPv1. Support for NTPv1 has been discontinued because of certain security vulnerabilities.</p>
+<h4 id="new">New Features</h4>
+<ul>
+ <li>The behavior of the daemon at startup has been considerably improved. The time to measure the frequency and correct an initial offset error when started for the first time is now no more than ten minutes. Upon restart, it takes no more than five minutes to reduce the initial offset to less than one millisecond without adversely affecting the frequency. This avoids a subsequent frequency correction which could take up to several hours.</li>
+ <li>A new feature called interleaved mode can be used in NTP
+ symmetric and broadcast modes. It is designed to improve accuracy
+ by minimizing errors due to queuing and transmission delays. It is described on the <a href="xleave.html">NTP
+ Interleaved Modes</a> page.</li>
+ <li>The huff-n'-puff filter is designed to avoid large errors with DSL circuits and highly asymmetrical traffic, as when downloading large files. Details are on the <a href="huffpuff.html">The Huff-n'-Puff Filter</a> page.</li>
+ <li>A new feature called orphan mode provides an automatic, subnet-wide synchronization feature with multiple sources. It provides reliable backup in isolated networks or in pr when Internet sources have become unavailable. See the <a href="orphan.html">Orphan Mode</a> page for further information.</li>
+ <li>This release includes comprehensive packet rate management tools to help reduce the level of spurious network traffic and protect the busiest servers from overload. There is support for the optional Kiss-o'-Death (KoD) packet intended to slow down an abusive client. See the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page for further information.</li>
+ <li>There are two new 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>
+ <li>The OpenSSL cryptographic library has replaced the library formerly available from RSA Laboratories. All cryptographic routines except a version of the MD5 message digest algorithm have been removed from the base distribution. All 128-bit and 160-bit message digests algorithms are now supported for both symmetric key and public key cryptosystems. See the <a href="authentic.html">Authentication Support</a> page for further information and the <a href="authopt.html">Authentication Options</a> page for a list of supported digest algorithms.</li>
+ <li>This release includes support for Autokey public-key cryptography for authenticating public servers to clients, as described in RFC 5906. This support requires the --enable-autokey option when building the distribution, which is the default is OpenSSL is available. The deployment of Autokey subnets is now considerably simpler than in earlier versions. A subnet naming scheme is now available to filter manycast and pool configurations. Additional information about Autokey is on the <a href="autokey.html">Autokey Public Key Authentication</a> page and links from there.</li>
+ <li>The NTP descrete even simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP&nbsp;algorithms to be tested in an embedded environment with systematic and pseudo-random 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. A technical description and performance analysis is given in the white papers at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">NTP Project Page</a>.</li>
+ <li>NTPv4 includes three new server discovery schemes, which in most applications can avoid per-host configuration altogether. Two of these are based on IP multicast technology, while the remaining one is based on crafted DNS lookups. See the <a href="discover.html">Automatic NTP Configuration Schemes</a> page for further information.</li>
+ <li>The status display and event report monitoring functions have been considerably expanded, including new statistics files and event reporting to files and the system log. See the <a href="decode.html">Event Messages and Status Words</a> page for further information.</li>
+ <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. In particular, the <tt>tinker</tt> and <tt>tos</tt> commands can be used to adjust thresholds, throw switches and change limits.</li>
+ <li>The <tt>ntpd</tt> daemon can be operated 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.</li>
+ <li>A number of white papers have been added to the library on the NTP Reseatch Project Page, including:</li>
+</ul>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4 id="change">Changes and Upgrades Since the NTPv3 Version (xntp3-5) </h4>
+<p>This section summarizes general changes since the publication of RFC-1305. Specific changes made during the code upgrade of 2007-2008 are summarized in <a href="history.html">Historical Notes</a>.</p>
+<ul>
+ <li>If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected, support for the IPv6 address family is supported in addition to the default support for the IPv4 address family. 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.</li>
+ <li>Many changes have been made in the NTP algorithms to improve performance and reliability A clock state machine has been incorporated to improve behavior under transient conditions. The clock discipline algorithm has been redesigned to improve accuracy, reduce the impact of network disruptions and allow increased poll intervals to 36 hours with only moderate sacrifice in accuracy. The clock select, cluster and combine algorithms have been overhauled as the result of a thorough statistical analysis.</li>
+ <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>
+ <li>Support for the precision time kernel modifications, which are now in stock FreeBSD and optional in Linux kernels, is included. With this support the system clock can be disciplined to the order of one nanosecond. The older microtime kernel modifications in Digital/Compaq/HP Tru64, Digital Ultrix and Sun Microsystems SunOS and Solaris, continue to be supported. In either case the support eliminates sawtooth error, which can be in the hundreds of microseconds. Further information is on the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page.</li>
+ <li>New reference clock drivers have been added for several GPS receivers now on the market for a total of 44 drivers. The reference clock driver interface is smaller, more rational, more flexible and more accurate. Most of the drivers in NTPv3 have been converted to the NTPv4 interface and continue to operate as before. A summary of the supported drivers is on the <a href="refclock.html">Reference Clock Support</a> page. 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 an audio port. See the <a href="audio.html">Reference Clock Audio Drivers</a> page for further information.</li>
+ <li>Support for pulse-per-second (PPS) signals has been extended to all drivers as an intrinsic function. Further information is on the <a href="pps.html">Pulse-Per-Second (PPS) Signal Interfacing</a> page. Typical performance with the PPS interface and a fast machine are in the low microseconds.</li>
+ <li>Several small changes have been made to make administration and maintenance more convenience. The entire distribution has been converted to gnu <tt>automake</tt>, which 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 Bitkeeper using an online repository at www.ntp.org. Trouble ticket reporting is provided using Bugzilla. If <tt>ntpd</tt>, is configured with NetInfo support, it will attempt to read its configuration from the NetInfo service if the default <tt>ntp.conf</tt> file cannot be read and no file is specified by the <tt>-c</tt> option. 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>.</li>
+</ul>
+<h4 id="nasty">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>
+<ul>
+ <li>Some configuration commands have been removed, others added and some changed in minor ways. See the Commands and Options collection on the <a href="sitemap.html">Site Map</a> page.</li>
+ <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 resolves to the intended address family. Older versions of <tt>ntpdc</tt> will show only the IPv4 associations with the <tt>peers</tt> and some other commands. Older versions of <tt>ntpq</tt> will show 0.0.0.0 for IPv6 associations with the <tt>peers</tt> and some other commands.</li>
+ <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 IPv6 address. All programs in the distribution have been modified to work with both address families.</li>
+ <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 adopted 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>
+ <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 by some SNTP clients.</li>
+ <li>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 available in the OpenSSL software distribution.</li>
+</ul>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/scripts/accopt.txt b/html/scripts/accopt.txt
index 36d7333cb7ad..d8f02800bb1a 100644
--- a/html/scripts/accopt.txt
+++ b/html/scripts/accopt.txt
@@ -1,5 +1,5 @@
-document.write("<h4>Access Control Commands</h4><p><ul>\
-<li class='inline'><a href='accopt.html#discard'>discard - specify headway parameters</a><br>\
-<li class='inline'><a href='accopt.html#restrict'>restrict - specify access restrictions</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+document.write("<p>Access Control Commands and Options</p><ul>\
+<li class='inline'><a href='accopt.html#discard'>discard - specify headway parameters</a></li>\
+<li class='inline'><a href='accopt.html#restrict'>restrict - specify access restrictions</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/audio.txt b/html/scripts/audio.txt
index b5aca70a4a0f..5fb11fc979a5 100644
--- a/html/scripts/audio.txt
+++ b/html/scripts/audio.txt
@@ -1,7 +1,7 @@
-document.write("<ul><p>Reference Clock Audio Drivers<br><ul>\
-<li class='inline'><a href='audio.html'>Reference Clock Audio Drivers</a><br>\
-<li class='inline'><a href='drivers/driver7.html'>Radio CHU Audio Demodulator/Decoder</a><br>\
-<li class='inline'><a href='drivers/driver36.html'>Radio WWV/H Audio Demodulator/Decoder</a><br>\
+document.write("<p>Reference Clock Audio Drivers</p><ul>\
<li class='inline'><a href='drivers/driver6.html'>IRIG Audio Decoder</a>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+<li class='inline'><a href='drivers/driver7.html'>Radio CHU Audio Demodulator/Decoder</a></li>\
+<li class='inline'><a href='drivers/driver36.html'>Radio WWV/H Audio Demodulator/Decoder</a></li>\
+<li class='inline'><a href='audio.html'>Reference Clock Audio Drivers</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/authopt.txt b/html/scripts/authopt.txt
index be9a074e8fa5..5064b1814d7a 100644
--- a/html/scripts/authopt.txt
+++ b/html/scripts/authopt.txt
@@ -1,10 +1,12 @@
-document.write("<h4>Authentication Commands</h4><p><ul>\
-<li class='inline'><a href='authopt.html#automax'>automax - specify Autokey regeneration interval</a><br>\
-<li class='inline'><a href='authopt.html#controlkey'>controlkey - specify control key ID</a><br>\
-<li class='inline'><a href='authopt.html#crypto'>crypto - configure Autokey parameters</a><br>\
-<li class='inline'><a href='authopt.html#keysdir'>keysdir - specify Autokey key directory</a><br>\
-<li class='inline'><a href='authopt.html#requestkey'>requestkey - specify request key ID</a><br>\
-<li class='inline'><a href='authopt.html#revoke'>revoke - specify Autokey randomization interval</a><br>\
-<li class='inline'><a href='authopt.html#trustedkey'>trustedkey - specify trusted key IDs</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+document.write("<p>Authentication Commands and Options</p4><ul>\
+<li class='inline'><a href='authopt.html#automax'>automax - specify Autokey regeneration interval</a></li>\
+<li class='inline'><a href='authopt.html#controlkey'>controlkey - specify control key ID</a></li>\
+<li class='inline'><a href='authopt.html#crypto'>crypto - configure Autokey parameters</a></li>\
+<li class='inline'><a href='authopt.html#ident'>ident - specify Autokey ephemeral group name</a></li>\
+<li class='inline'><a href='authopt.html#keys'>keys - specify symmetric keys filename</a></li>\
+<li class='inline'><a href='authopt.html#keysdir'>keysdir - specify Autokey key directory</a></li>\
+<li class='inline'><a href='authopt.html#requestkey'>requestkey - specify request key ID</a></li>\
+<li class='inline'><a href='authopt.html#revoke'>revoke - specify Autokey randomization interval</a></li>\
+<li class='inline'><a href='authopt.html#trustedkey'>trustedkey - specify trusted key IDs</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/clockopt.txt b/html/scripts/clockopt.txt
index 290ad4e8d011..1c76a1ce408c 100644
--- a/html/scripts/clockopt.txt
+++ b/html/scripts/clockopt.txt
@@ -1,5 +1,5 @@
-document.write("<h4>Reference Clock Commands</h4><p><ul>\
-<li class='inline'><a href='clockopt.html#server'>server - specify reference clock server</a><br>\
+document.write("<p>Reference Clock Commands and Options</p><ul>\
<li class='inline'><a href='clockopt.html#fudge'>fudge - specify fudge parameters</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+<li class='inline'><a href='clockopt.html#server'>server - specify reference clock server</a><br>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/command.txt b/html/scripts/command.txt
index 9d5f64b2069c..ec6169e96534 100644
--- a/html/scripts/command.txt
+++ b/html/scripts/command.txt
@@ -1,11 +1,7 @@
-document.write("<ul><p>Configuration Commands and Options<br><ul>\
-<li class='inline'><a href='comdex.html'>Command Index</a><br>\
-<li class='inline'><a href='confopt.html'>Server Options</a><br>\
-<li class='inline'><a href='accopt.html'>Access Control 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>\
-<li class='inline'><a href='clockopt.html'>Reference Clock Options</a><br>\
-<li class='inline'><a href='miscopt.html'>Miscellaneous Options</a><br>\
-<li class='inline'><a href='ntp_conf.html'>Configuration File Definition (Advanced)</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+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'>Contacts</a></i></td>\
+</tr></table>")
diff --git a/html/scripts/config.txt b/html/scripts/config.txt
index 0c96ceb54a97..84c226af0b77 100644
--- a/html/scripts/config.txt
+++ b/html/scripts/config.txt
@@ -1,7 +1,5 @@
-document.write("<ul><p>Client and Server Configuration<br>\
-<ul>\
-<li class='inline'><a href='assoc.html'>Association Management</a><br>\
-<li class='inline'><a href='rate.html'>Rate Management and the Kiss-o'-Death Packet</a><br>\
-<li class='inline'><a href='manyopt.html'>Automatic Server Discovery</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>Client and Server Configuration</p><ul>\
+<li class='inline'><a href='assoc.html'>Association Management</a></li>\
+<li class='inline'><a href='discover.html'>Automatic Server Discovery Schemes</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/confopt.txt b/html/scripts/confopt.txt
index 9fb1d38910a9..c524f5998e65 100644
--- a/html/scripts/confopt.txt
+++ b/html/scripts/confopt.txt
@@ -1,12 +1,12 @@
-document.write("<h4>Server Commands</h4><p><ul>\
-<li class='inline'><a href='confopt.html#server'>server - configure client association</a><br>\
-<li class='inline'><a href='confopt.html#server'>peer - configure symmetric peer association</a><br>\
-<li class='inline'><a href='confopt.html#server'>broadcast - configure broadcast server association</a><br>\
-<li class='inline'><a href='confopt.html#server'>manycastclient - configure manycast client association</a><br>\
-<li class='inline'><a href='confopt.html#server'>pool - configure pool association</a><br>\
-<li class='inline'><a href='confopt.html#server'>unpeer - remove association</a><br>\
-<li class='inline'><a href='confopt.html#broadcastclient'>broadcastclient - enable broadcast client</a><br>\
-<li class='inline'><a href='confopt.html#manycastserver'>manycastserver - enable manycast server</a><br>\
-<li class='inline'><a href='confopt.html#multicastclient'>multicastclient - enable multicast client</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+document.write("<p>Server Commands and Options</p><ul>\
+<li class='inline'><a href='confopt.html#server'>server - configure client association</a></li>\
+<li class='inline'><a href='confopt.html#peer'>peer - configure symmetric peer association</a></li>\
+<li class='inline'><a href='confopt.html#broadcast'>broadcast - configure broadcast server association</a></li>\
+<li class='inline'><a href='confopt.html#manycastclient'>manycastclient - configure manycast client association</a></li>\
+<li class='inline'><a href='confopt.html#pool'>pool - configure pool association</a></li>\
+<li class='inline'><a href='confopt.html#unpeer'>unpeer - remove association</a></li>\
+<li class='inline'><a href='confopt.html#broadcastclient'>broadcastclient - enable broadcast client</a></li>\
+<li class='inline'><a href='confopt.html#manycastserver'>manycastserver - enable manycast server</a></li>\
+<li class='inline'><a href='confopt.html#multicastclient'>multicastclient - enable multicast client</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/external.txt b/html/scripts/external.txt
index 2cf13be6ef5f..5e7070525319 100644
--- a/html/scripts/external.txt
+++ b/html/scripts/external.txt
@@ -1,15 +1,19 @@
-document.write("<ul><p>External Links<br><ul>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/book.html'>Computer Network Time Synchronization - The Network Time Protocol (book)</a><br>\
-<li class='inline'><a href='http://www.ntp.org/index.html'>NTP Public Services Project (home page)</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ntp.html'>NTP Research Project (home page)</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/exec.html'>Executive Summary: Computer Network Time Synchronization</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/leap.html'>The NTP Timescale and Leap Seconds</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/time.html'>NTP Timestamp Calculations</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/y2k.html'>The NTP Era and Era Numbering</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/stamp.html'>Timestamp Capture Principles</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autocfg.html'>Autonomous Configuration</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autokey.html'>Autonomous Authentication</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/proto.html'>Autokey Protocol</a><br>\
-<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ident.html'>Autokey Identity Schemes</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a><\p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>External Links</p><ul>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/book.html'>Computer Network Time Synchronization - The Network Time Protocol (book)</a></li>\
+<li class='inline'><a href='http://www.ntp.org/index.html'>NTP Public Services Project (home page)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ntp.html'>NTP Research Project (home page)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/exec.html'>Executive Summary: Computer Network Time Synchronization</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/leap.html'>The NTP Timescale and Leap Seconds</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/time.html'>NTP Timestamp Calculations</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/y2k.html'>The NTP Era and Era Numbering</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/stamp.html'>Timestamp Capture Principles</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/onwire.html'>Analysis and Simulation of the NTP On-Wire Protocols</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/proximity.html'>Time Synchroization for Space Data Links</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/security.html'>NTP Security Analysis</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ptp.html'>IEEE 1588 Precision Time Protocol (PTP)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autocfg.html'>Autonomous Configuration</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autokey.html'>Autonomous Authentication</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/proto.html'>Autokey Protocol</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ident.html'>Autokey Identity Schemes</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/footer.txt b/html/scripts/footer.txt
index 7fc6dd87a922..48830e656cb3 100644
--- a/html/scripts/footer.txt
+++ b/html/scripts/footer.txt
@@ -1,7 +1,9 @@
document.write("\
<table><tr>\
-<td width='50%' ><img src='icons/home.gif' align='middle' alt='gif'>\
+<td width='33%' align='center'><img src='icons/home.gif' align='middle'>\
<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
+<td width='33%' align='center'><img src='icons/sitemap.png' align='middle'>\
+<a href='sitemap.html'>Site Map</a></td>\
+<td width='33%' align='center'><img src='icons/mail2.gif' align='middle'>\
+<a href='http://www.ntp.org/contact'>Contacts</a></td>\
+</tr></table>")
diff --git a/html/scripts/hand.txt b/html/scripts/hand.txt
new file mode 100644
index 000000000000..95da082b1354
--- /dev/null
+++ b/html/scripts/hand.txt
@@ -0,0 +1,11 @@
+document.write("<p>Handbook Pages</p><ul>\
+<li class='inline'><a href='release.html'>NTP Version 4 Release Notes</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+<li class='inline'><a href='access.html'>Access Control Support</a></li>\
+<li class='inline'><a href='assoc.html'>Association Management</a></li>\
+<li class='inline'><a href='authentic.html'>Authentication Support</a></li>\
+<li class='inline'><a href='discover.html'>Automatic Server Discovery Schemes Timekeeping</a></li>\
+<li class='inline'><a href='rate.html'>Rate Management</a></li>\
+<li class='inline'><a href='refclock.html'>Reference Clock Support</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/install.txt b/html/scripts/install.txt
index 8268f47eb88f..e8185f245b0c 100644
--- a/html/scripts/install.txt
+++ b/html/scripts/install.txt
@@ -1,12 +1,10 @@
-document.write("<ul><p>Build and Install<br><ul>\
-<li class='inline'><a href='build.html'>Building and Installing the Distribution</a><br>\
-<li class='inline'><a href='quick.html'>Quick Start</a><br>\
-<li class='inline'><a href='release.html'>Release Notes</a><br>\
-<li class='inline'><a href='config.html'>Build Options</a><br>\
-<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='decode.html'><tt>ntpd</tt> Event Messages and Status Words</a><br>\
-<li class='inline'><a href='msyslog.html'><tt>ntpd</tt> System Log Messages</a><br>\
-<li class='inline'><a href='bugs.html'>NTP Bug Reporting Procedures</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>Build and Install</p><ul>\
+<li class='inline'><a href='build.html'>Building and Installing the Distribution</a></li>\
+<li class='inline'><a href='config.html'>Build Options</a></li>\
+<li class='inline'><a href='rdebug.html'>Debugging Reference Clock Drivers</a></li>\
+<li class='inline'><a href='quick.html'>Quick Start</a></li>\
+<li class='inline'><a href='release.html'>NTP Version 4 Release Notes</a></li>\
+<li class='inline'><a href='debug.html'>NTP Debugging Techniques</a></li>\
+<li class='inline'><a href='bugs.html'>NTP Bug Reporting Procedures</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/manual.txt b/html/scripts/manual.txt
index 545b4130cd34..bad1f93e854f 100644
--- a/html/scripts/manual.txt
+++ b/html/scripts/manual.txt
@@ -1,13 +1,13 @@
-document.write("<ul><p>Program Manual Pages<br><ul>\
-<li class='inline'><a href='ntpd.html'><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a><br>\
-<li class='inline'><a href='ntpq.html'><tt>ntpq</tt> - standard NTP query program</a><br>\
-<li class='inline'><a href='ntpdc.html'><tt>ntpdc</tt> - special NTP query program</a><br>\
-<li class='inline'><a href='ntpdate.html'><tt>ntpdate</tt> - set the date and time via NTP</a><br>\
-<li class='inline'><a href='sntp.html'><tt>sntp</tt> - Simple Network Time Protocol (SNTP) client</a><br>\
-<li class='inline'><a href='ntptrace.html'><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a><br>\
-<li class='inline'><a href='tickadj.html'><tt>tickadj</tt> - set time-related kernel variables</a><br>\
-<li class='inline'><a href='ntptime.html'><tt>ntptime</tt> - read and set kernel time variables</a><br>\
-<li class='inline'><a href='keygen.html'><tt>ntp-keygen</tt> - generate public and private keys</a><br>\
-<li class='inline'><a href='ntpdsim_new.html'><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>Program Manual Pages<p><ul>\
+<li class='inline'><a href='ntpd.html'><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a></li>\
+<li class='inline'><a href='ntpq.html'><tt>ntpq</tt> - standard NTP query program</a></li>\
+<li class='inline'><a href='ntpdc.html'><tt>ntpdc</tt> - special NTP query program</a></li>\
+<li class='inline'><a href='ntpdate.html'><tt>ntpdate</tt> - set the date and time via NTP</a></li>\
+<li class='inline'><a href='sntp.html'><tt>sntp</tt> - Simple Network Time Protocol (SNTP) client</a></li>\
+<li class='inline'><a href='ntptrace.html'><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a></li>\
+<li class='inline'><a href='tickadj.html'><tt>tickadj</tt> - set time-related kernel variables</a></li>\
+<li class='inline'><a href='ntptime.html'><tt>ntptime</tt> - read and set kernel time variables</a></li>\
+<li class='inline'><a href='keygen.html'><tt>ntp-keygen</tt> - generate public and private keys</a></li>\
+<li class='inline'><a href='ntpdsim_new.html'><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/misc.txt b/html/scripts/misc.txt
index b88cf7977141..2dfb2896a44c 100644
--- a/html/scripts/misc.txt
+++ b/html/scripts/misc.txt
@@ -1,9 +1,9 @@
-document.write("<ul><p>Miscellaneous<br><ul>\
-<li class='inline'><a href='copyright.html'>Copyright Notice</a><br>\
-<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a><br>\
-<li class='inline'><a href='kern.html'>Kernel Model for Precision Timekeeping</a><br>\
-<li class='inline'><a href='kernpps.html'>PPSAPI Interface for Precision Time Signals</a><br>\
-<li class='inline'><a href='pps.html'>Pulse-per-second (PPS) Signal Interfacing</a><br>\
-<li class='inline'><a href='gadget.html'>Gadget Box PPS Level Converter and CHU Modem</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>Miscellaneous Pages</p><ul>\
+<li class='inline'><a href='copyright.html'>Copyright Notice</a></li>\
+<li class='inline'><a href='decode.html'>Event Messages and Status Words</a></li>\
+<li class='inline'><a href='kern.html'>Kernel Model for Precision Timekeeping</a></li>\
+<li class='inline'><a href='msyslog.html'><tt>ntpd</tt> System Log Messages</a></li>\
+<li class='inline'><a href='kernpps.html'>PPSAPI Interface for Precision Time Signals</a></li>\
+<li class='inline'><a href='pps.html'>Pulse-per-second (PPS) Signal Interfacing</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/miscopt.txt b/html/scripts/miscopt.txt
index 3506c4d6b1fe..64987c8b1efa 100644
--- a/html/scripts/miscopt.txt
+++ b/html/scripts/miscopt.txt
@@ -1,19 +1,21 @@
-document.write("<h4>Miscellaneous Commands</h4><p><ul>\
-<li class='inline'><a href='miscopt.html#broadcastdelay'>broadcastdelay - specify broadcast delay</a><br>\
-<li class='inline'><a href='miscopt.html#driftfile'>driftfile - specify frequency file</a><br>\
-<li class='inline'><a href='miscopt.html#enable'>enable - enable options</a><br>\
-<li class='inline'><a href='miscopt.html#enable'>disable - disable options</a><br>\
-<li class='inline'><a href='miscopt.html#includefile'>includefile - specify include file</a><br>\
-<li class='inline'><a href='miscopt.html#interface'>interface - specify which local network addresses to use</a><br>\
-<li class='inline'><a href='miscopt.html#leapfile'>leapfile - specify leapseconds file</a><br>\
-<li class='inline'><a href='miscopt.html#logconfig'>logconfig - configure log file</a><br>\
-<li class='inline'><a href='miscopt.html#interface'>nic - alias for interface</a><br>\
-<li class='inline'><a href='miscopt.html#phone'>phone - specify modem phone numbers</a><br>\
-<li class='inline'><a href='miscopt.html#saveconfigdir'>saveconfigdir - specify saveconfig directory</a><br>\
-<li class='inline'><a href='miscopt.html#setvar'>setvar - set system variables</a><br>\
-<li class='inline'><a href='miscopt.html#tinker'>tinker - modify sacred system parameters (dangerous)</a><br>\
-<li class='inline'><a href='miscopt.html#tos'>tos - modify service parameters</a><br>\
-<li class='inline'><a href='miscopt.html#trap'>trap - set trap address</a><br>\
-<li class='inline'><a href='miscopt.html#ttl'>ttl - set time to live</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+document.write("<p>Miscellaneous Commands and Options</p><ul>\
+<li class='inline'><a href='miscopt.html#broadcastdelay'>broadcastdelay - specify broadcast delay</a></li>\
+<li class='inline'><a href='miscopt.html#driftfile'>driftfile - specify frequency file</a></li>\
+<li class='inline'><a href='miscopt.html#enable'>enable - enable options</a></li>\
+<li class='inline'><a href='miscopt.html#enable'>disable - disable options</a></li>\
+<li class='inline'><a href='miscopt.html#includefile'>includefile - specify include file</a></li>\
+<li class='inline'><a href='miscopt.html#interface'>interface - specify which local network addresses to use</a></li>\
+<li class='inline'><a href='miscopt.html#leapfile'>leapfile - specify leapseconds file</a></li>\
+<li class='inline'><a href='miscopt.html#logconfig'>logconfig - configure log file</a></li>\
+<li class='inline'><a href='miscopt.html#mru'>mru - control monitor MRU list limits</a></li>\
+<li class='inline'><a href='miscopt.html#phone'>phone - specify modem phone numbers</a></li>\
+<li class='inline'><a href='miscopt.html#reset'>reset - reset groups of counters</a></li>\
+<li class='inline'><a href='miscopt.html#saveconfigdir'>saveconfigdir - specify saveconfig directory</a></li>\
+<li class='inline'><a href='miscopt.html#setvar'>setvar - set system variables</a></li>\
+<li class='inline'><a href='miscopt.html#tinker'>tinker - modify sacred system parameters (dangerous)</a></li>\
+<li class='inline'><a href='miscopt.html#rlimit'>rlimit - alters certain process storage allocation limits</a></li>\
+<li class='inline'><a href='miscopt.html#tos'>tos - modify service parameters</a></li>\
+<li class='inline'><a href='miscopt.html#trap'>trap - set trap address</a></li>\
+<li class='inline'><a href='miscopt.html#ttl'>ttl - set time to live</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/monopt.txt b/html/scripts/monopt.txt
index 857401f0fcc4..b7d5a2f32993 100644
--- a/html/scripts/monopt.txt
+++ b/html/scripts/monopt.txt
@@ -1,5 +1,6 @@
-document.write("<h4>Monitoring Commands</h4><p><ul>\
-<li class='inline'><a href='monopt.html#filegen'>filegen - specify monitor files</a><br>\
-<li class='inline'><a href='monopt.html#statsdir'>statsdir - specify monitor files directory</a><br>\
-<li class='inline'><a href='comdex.html'>Command Index</a></p>\
-</ul>") \ No newline at end of file
+document.write("<p>Monitoring Commands and Options</p><ul>\
+<li class='inline'><a href='monopt.html#filegen'>filegen - specify monitor files</a></li>\
+<li class='inline'><a href='monopt.html#statistics'>statistics - enable writing of statistics records</a></li>\
+<li class='inline'><a href='monopt.html#statsdir'>statsdir - specify monitor files directory</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/refclock.txt b/html/scripts/refclock.txt
index 4f1a6471ac69..b32e5fa346af 100644
--- a/html/scripts/refclock.txt
+++ b/html/scripts/refclock.txt
@@ -1,7 +1,7 @@
-document.write("<ul><p>Reference Clock Support<br><ul>\
-<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
-<li class='inline'><a href='extern.html'>External Clock Discipline and the Local Clock Driver</a><br>\
-<li class='inline'><a href='howto.html'>How to Write a Reference Clock Driver</a><br>\
-<li class='inline'><a href='howto.html'>How to build new PARSE clocks</a><br>\
-<li class='inline'><a href='sitemap.html'>Site Map</a></p>\
-</ul></ul>") \ No newline at end of file
+document.write("<p>Reference Clock Support</p><ul>\
+<li class='inline'><a href='extern.html'>External Clock Discipline and the Local Clock Driver</a></li>\
+<li class='inline'><a href='howto.html'>How to Write a Reference Clock Driver</a></li>\
+<li class='inline'><a href='howto.html'>How to build new PARSE clocks</a></li>\
+<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul></ul>")
diff --git a/html/scripts/special.txt b/html/scripts/special.txt
new file mode 100644
index 000000000000..b62d15e50e2a
--- /dev/null
+++ b/html/scripts/special.txt
@@ -0,0 +1,17 @@
+document.write("<p>Special Topics</p><ul>\
+<li class='inline'><a href='warp.html'>How NTP Works</a></li>\
+<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a></li>\
+<li class='inline'><a href='autokey.html'>Autokey Public-Key Authentication</a></li>\
+<li class='inline'><a href='orphan.html'>Orphan Mode</a></li>\
+<li class='inline'><a href='xleave.html'>NTP Interleaved Modes</a></li>\
+<li class='inline'><a href='huffpuff.html'>Huff-n'-Puff Filter</a></li>\
+<li class='inline'><a href='filter.html'>Clock Filter Algorithm</a></li>\
+<li class='inline'><a href='select.html'>Clock Select Algorithm</a></li>\
+<li class='inline'><a href='cluster.html'>Clock Cluster Algorithm</a></li>\
+<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a></li>\
+<li class='inline'><a href='discipline.html'>Clock Discipline Algorithm</a></li>\
+<li class='inline'><a href='poll.html'>Poll Process</a></li>\
+<li class='inline'><a href='clock.html'>Clock State Machine</a></li>\
+<li class='inline'><a href='leap.html'>Leap Second Processing</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/style.css b/html/scripts/style.css
index 7d7b27640f84..7a0cc5471898 100644
--- a/html/scripts/style.css
+++ b/html/scripts/style.css
@@ -61,4 +61,4 @@ th {background: #FFFFCC;
th.caption {background: #EEEEEE;
color: #006600;
- text-align: center;} \ No newline at end of file
+ text-align: center;}
diff --git a/html/select.html b/html/select.html
new file mode 100644
index 000000000000..6cfa186d0c42
--- /dev/null
+++ b/html/select.html
@@ -0,0 +1,41 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Clock Select Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<em></em>
+<h3>Clock Select Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:22<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock select algorithm determines from a set of sources , which are correct (<em>truechimers</em>) and which are not (<em>falsetickers</em>) according to a set of formal correctness assertions. The principles are based on the observation that the maximum error in determining the offset of a candidate cannot exceed one-half the roundtrip delay to the primary reference clock at the time of measurement. This must be increased by the maximum error that can accumulate since then. The selection metric, called the <em>root distance,</em>, is one-half the roundtrip root delay plus the root dispersion plus minor error contributions not considered here.</p>
+<p>First, a number of sanity checks is performed to sift the selectable candidate from among the source population. The sanity checks are sumarized as follows:.</p>
+<ol>
+ <li>A <em>stratum error</em> occurs if (1) the source had never been synchronized or (2) the stratum of the source is below the <tt>floor</tt> option or not below the <tt>ceiling</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. The default values for these options are 0 and 15, respectively. Note that 15 is a valid stratum, but a server operating at that stratum cannot synchronize clients.</li>
+ <li>A <em>distance error</em> occurs for a source if the root distance (also known ad synchronization distance) of the source is not below the distance threshold <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. The default value for this option is 1.5 s for networks including only the Earth, but this should be increased to 2.5 s for networks including the Moon.</li>
+ <li>A <em>loop</em> <em>error</em> occurs if the source is synchronized to the client. This can occur if two peers are configured with each other in symmetric modes.</li>
+ <li>An <em>unreachable</em> <em>error</em> occurs if the source is unreachable or if the <tt>server</tt> or <tt>peer</tt> command for the source includes the <tt>noselect</tt> option.</li>
+</ol>
+Sources showing one or more of these errors are considered nonselectable; only the selectable candidates are considered in the following algorithm. Given the measured offset &theta;<sub>0</sub> and root distance &lambda;, this defines a <em>correctness interval</em> [&theta;<sub>0</sub> &minus; &lambda;, &theta;<sub>0</sub> + &lambda;] of points where the true value of &theta; lies somewhere on the interval. The given problem is to determine from a set of correctness intervals, which represent truechimers and which represent falsetickers. The principles must be given a precise definition. The <em>intersection interval</em> is the <em>smallest interval containing points from the largest number of correctness intervals.</em> An algorithm that finds the intersection interval was devised by Keith Marzullo in his doctoral dissertation. It was first implemented in the Digital Time Synchronization Service (DTSS) for the VMS operating system for the VAX.
+<p> While the NTP algorithm is based on DTSS, it remains to establish which point in the correctness interval represents the best estimate of the offset for each candidate. The best point is at the midpoint &theta;<sub>0</sub> of the correctness interval; however, the midpoint might not be within the intersection interval. A candidate with a correctness interval that contains points in the intersection interval is a truechimer and the best offset estimate is the midpoint of its correctness interval. A candidate with a correctness interval that contains no points in the intersection interval is a falseticker.</p>
+<div align="center"><img src="pic/flt3.gif" alt="gif">
+ <p>Figure 1. Intersection Interval</p>
+</div>
+<p>Figure 1 shows correctness intervals for each of four candidates A, B, C and D. We need to find the maximum number of candidates that contain points in common. The result is the interval labeled DTSS. In the figure there are three truechimers A, B and C, and one falseticker D. In DTSS any point in the intersection interval can represent the true time; however, as shown below, this may throw away valuable statistical information. In any case, the clock is considered correct if the number of truechimers found in this way are greater than half the total number of candidates.</p>
+<p>The question remains, which is the best point to represent the true time of each correctness interval? Fortunately, we already have the maximum likelihood estimate at the midpoint of each correctness interval. But, while the midpoint of candidate C is outside the intersection interval, its correctness interval contains points in common with the intersection interval, so the candidate is a truechimer and the midpoint is chosen to represent its time.</p>
+<p>The DTSS correctness assertions do not consider how best to represent the truechimer time. To support the midpoint choice, consider the selection algorithm as a method to reject correctness intervals that cannot contribute to the final outcome; that is, they are falsetickers. The remaining correctness intervals can contribute to the final outcome; that is, they are truechimers. Samples in the intersection interval are usually of very low probability and thus poor estimates for truechimer time. On the other hand, the midpoint sample produced by the clock filter algorithm is the maximum likelihood estimate and thus best represents the truechimer time.</p>
+<div align="center"><img src="pic/flt6.gif" alt="gif">
+ <p>Figure 2. Clock Select Algorithm</p>
+</div>
+<p> The algorithm operates as shown in Figure 2. Let <em>m</em> be the number of candidates and <em>f</em> the number of falsetickers, initially zero. Move a pointer from the leftmost endpoint towards the rightmost endpoint in Figure 1 and count the number of candidates, stopping when that number reaches <em>m</em> &minus; <em>f</em>; this is the left endpoint of the intersection interval. Then, do the same, but moving from the rightmost endpoint towards the leftmost endpoint; this is the right endpoint of the intersection interval. If the left endpoint is less than the right endpoint, the intersection interval has been found. Otherwise, increase <em>f</em> by 1. If <em>f</em> is less than <em>n</em> / 2, try again; otherwise, the algorithm fails and no truechimers could be found.</p>
+<p>The clock select algorithm again scans the correctness intervals. If the right endpoint of the correctness interval for a candidate is greater than the left endpoint of the intersection interval, or if the left endpoint of the correctness interval is less than the right endpoint of the intersection interval, the candidate is a truechimer; otherwise, it is a falseticker.</p>
+<p>In practice, with fast LANs and modern computers, the correctness interval can be quite small, especially when the candidates are multiple reference clocks. In such cases the intersection interval might be empty, due to insignificant differences in the reference clock offsets. To avoid this, the size of the correctness interval is padded to the value of <tt>mindist</tt>, with default 1 ms. This value can be changed using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/sitemap.html b/html/sitemap.html
index 0dd570584180..c4b9110a163e 100644
--- a/html/sitemap.html
+++ b/html/sitemap.html
@@ -1,36 +1,33 @@
<!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="HTML Tidy, see www.w3.org">
- <title>Site Map</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>Site Map</h3>
- <img src="pic/alice15.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice in Wonderland</i>, Lewis Carroll</a>
- <p>Welcome to the tea party.</p>
- <p>Last update:
- <!-- #BeginDate format:En2m -->08-Apr-2009 2:54<!-- #EndDate -->
- UTC<br clear="left">
- </p>
- <h4>Related Links</h4>
- <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
- <script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
- <hr>
- <div align="center">
- <img src="pic/tribeb.gif" alt="gif"></div>
- <br>
- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
- </body>
-
-</html> \ No newline at end of file
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Site Map</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Site Map</h3>
+<img src="pic/alice15.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice in Wonderland</i>, Lewis Carroll</a>
+<p>Welcome to the tea party.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC<br clear="left">
+</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<hr>
+<div align="center"> <img src="pic/tribeb.gif" alt="gif"></div>
+<br>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/sntp.html b/html/sntp.html
index 93a34abe310b..fa17203f25f8 100644
--- a/html/sntp.html
+++ b/html/sntp.html
@@ -1,56 +1,79 @@
<!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><tt>sntp</tt> - Simple Network Time Protocol (SNTP) Client</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3><tt>sntp</tt> - 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="25" locale="00000409" region="0" t="DateTime" w="61">16:31</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="289">Wednesday, March 12, 2008</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-4330, 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>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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>sntp - Simple Network Time Protocol (SNTP) Client</title>
+<!-- Changed by: Harlan &, 07-Dec-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>sntp</tt> - 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:
+ <!-- #BeginDate format:En2m -->7-Dec-2014 11:09<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<h4>Synopsis</h4>
+<tt>sntp [{--help -?}][{-4 -6}][-a <i>keynum</i>][-b <i>bcaddress</i>][-B <i>bctimeout</i>][-c][-d][-D <i>debug-level</i>][-g <i>delay</i>][-K <i>kodfile</i>][-k <i>keyfile</i>][-l <i>logfile</i>][-M <i>steplimit</i>][-o <i>ntpver</i>][-r][-S][-s][-u <i>uctimeout</i>][--wait][--version][<i>address(es)</i>]</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 client protocol defined in RFC 5905, including the full on-wire protocol but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP version 4 specification, also defined in RFC 5905.</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>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26</tt></p>
+<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds.</p>
+<p>If -b <i>bcaddress</i> is not specified, the program sends a single message to each address and waits up to <i>uctimeout</i> (default 5) seconds for a unicast server response. Otherwise, it sends no message and waits up to <i>bctimeout</i> (default 68) seconds for a broadcast NTP message.</p>
+<h4>Options</h4>
+<p><tt>sntp</tt> recognizes the following options:</p>
+<dl>
+ <dt><tt>-?, --help</tt></dt>
+ <dd>displays usage information. The short form typically requires shell quoting, such as <tt>-\?</tt>, otherwise <tt>?</tt> is consumed by the shell.</dd>
+ <dt><tt>-4, --ipv4</tt></dt>
+ <dd>When resolving hostnames to IP addresses, use IPv4 addresses only.</dd>
+ <dt><tt>-6, --ipv6</tt></dt>
+ <dd>When resolving hostnames to IP addresses, use IPv6 addresses only.</dd>
+ <dt><tt>-a <i>keynum</i>, --authentication <i>keynum</i></tt></dt>
+ <dd>Enable authentication with the key ID <i>keynum</i>. <i>keynum</i> is a number specified in the keyfile along with an authentication secret (password or digest). See the <tt>-k, --keyfile</tt> option for more details.</dd>
+ <dt><tt>-b <i>bcaddress</i>, --broadcast <i>bcaddress</i></tt></dt>
+ <dd>Listen for NTP packets sent to the broadcast or multicast address <i>bcaddress</i>, which can be a DNS name or IP address. The default maximum time to listen for broadcasts/multicasts, 68 seconds, can be modified with the <tt>-B, --bctimeout</tt> option.</dd>
+ <dt><tt>-B <i>bctimeout</i>, --bctimeout <i>bctimeout</i></tt></dt>
+ <dd>Wait <i>bctimeout</i> seconds for broadcast or multicast NTP message before terminating. The default is 68 seconds, chosen because ntpd typically transmits broadcasts/multicasts every 64 seconds. Note that the short option is <tt>-B</tt>, an uppercase letter B.</dd>
+ <dt><tt>-c, --concurrent</tt></dt>
+ <dd>Concurrently query all addresses returned for hostname. Requests from an NTP client to a single server should never be sent more often than once every two seconds. By default, all addresses resolved from a single hostname are assumed to be for a single instance of ntpd, and therefore sntp will send queries to these addresses one after another, waiting two seconds between queries. This option indicates multiple addresses returned for a hostname are on different machines, so sntp can send concurrent queries. This is appropriate when using *.pool.ntp.org, for example.</dd>
+ <dt><tt>-d, --debug-level</tt></dt>
+ <dd>Increase debug verbosity level by one. May be specified multiple times. See also the <tt>-D, --set-debug-level</tt> option.</dd>
+ <dt><tt>-D <i>debug-level</i>, --set-debug-level <i>debug-level</i></tt></dt>
+ <dd>Set the debug verbosity level to <i>debug-level</i>. The default level is zero. Note that the short option is <tt>-D</tt>, an uppercase letter D. See also the <tt>-d, --debug-level</tt> option.</dd>
+ <dt><tt>-g <i>delay</i>, --gap <i>delay</i></tt></dt>
+ <dd>Specify the <i>delay</i> in milliseconds between outgoing queries, defaulting to 50. <tt>sntp</tt> sends queries to all provided hostnames/addresses in short succession, and by default terminates once the first valid response is received. With multiple time sources provided, all but one will not be used. To limit the number of queries whose responses will not be used, each query is separated from the preceding one by <i>delay</i> milliseconds, to allow time for responses to earlier queries to be received. A larger <i>delay</i> reduces the query load on the time sources, increasing the time to receive a valid response if the first source attempted is slow or unreachable.</dd>
+ <dt><tt>-K <i>kodfile</i>, --kod <i>kodfile</i></tt></dt>
+ <dd>Specifies the filename <i>kodfile</i> to be used for the persistent history of KoD (Kiss Of Death, or rate-limiting) responses received from servers. The default is <tt>/var/db/ntp-kod</tt>. If the file does not exist, a warning message will be displayed. The file will not be created. Note that the short option is <tt>-K</tt>, an uppercase letter K.</dd>
+ <dt><tt>-k <i>keyfile</i>, --keyfile <i>keyfile</i></tt></dt>
+ <dd>Specifies the filename <i>keyfile</i> used with the <tt>-a</tt>/<tt>--authentication</tt> option. The format of the file is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
+ <dt><tt>-l <i>logfile</i>, --filelog <i>logfile</i></tt></dt>
+ <dd>Specifies the filename in which to append a copy of status messages, which also appear on the terminal.</dd>
+ <dt><tt>-M <i>steplimit</i>, --steplimit <i>steplimit</i></tt></dt>
+ <dd>If both <tt>-S</tt>/<tt>--step</tt> and <tt>-s</tt>/<tt>--slew</tt> options are provided, an offset of less than <i>steplimit</i> milliseconds will be corrected by slewing the clock using adjtime(), while an offset of <i>steplimit</i> or more will be corrected by setting the clock to the corrected time. Note that the short option is <tt>-M</tt>, an uppercase letter M.</dd>
+ <dt><tt>-o <i>ntpver</i>, --ntpversion <i>ntpver</i></tt></dt>
+ <dd>Specifies the NTP protocol version number <i>ntpver</i> to include in requests, default 4. This option is rarely useful.</dd>
+ <dt><tt>-r, --usereservedport</tt></dt>
+ <dd>By default, <tt>sntp</tt> uses a UDP source port number selected by the operating system. When this option is used, the reserved NTP port 123 is used, which most often requires <tt>sntp</tt> be invoked as the superuser (commonly "root"). This can help identify connectivity failures due to port-based firewalling which affect <tt>ntpd</tt>, which always uses source port 123.</dd>
+ <dt><tt>-S, --step</tt></dt>
+ <dd>By default, <tt>sntp</tt> displays the clock offset but does not attempt to correct it. This option enables offset correction by stepping, that is, directly setting the clock to the corrected time. This typically requires <tt>sntp</tt> be invoked as the superuser ("root"). Note that the short option is <tt>-S</tt>, an uppercase letter S.</dd>
+ <dt><tt>-s, --slew</tt></dt>
+ <dd>By default, <tt>sntp</tt> displays the clock offset but does not attempt to correct it. This option enables offset correction by slewing using adjtime(), which changes the rate of the clock for a period long enough to accomplish the required offset (phase) correction. This typically requires <tt>sntp</tt> be invoked as the superuser ("root").</dd>
+ <dt><tt>-u <i>uctimeout</i>, --uctimeout <i>uctimeout</i></tt></dt>
+ <dd>Specifies the maximum time <i>uctimeout</i> in seconds to wait for a unicast response before terminating.</dd>
+ <dt><tt>--wait</tt></dt>
+ <dd>When neither <tt>-S</tt>/<tt>--step</tt> nor <tt>-s</tt>/<tt>--slew</tt> options are provided, <tt>sntp</tt> will by default terminate after the first valid response is received. This option causes <tt>sntp</tt> to instead wait for all pending queries' responses.</dd>
+ <dt><tt>--version</tt></dt>
+ <dd>Display the <tt>sntp</tt> program's version number and the date and time it was compiled.</dd>
+</dl>
+<h4>Return Value</h4>
+<p>The program returns an exit status of zero for if a valid response is received and non-zero otherwise.</p>
+<h4>Author</h4>
+<p>This <tt>sntp</tt> was originally developed by Johannes Maximilian Kuehn. Harlan Stenn and Dave Hart modified it to query more than one server at a time. See the file <tt>ChangeLog</tt> in the distribution for details.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/stats.html b/html/stats.html
new file mode 100644
index 000000000000..943851773c17
--- /dev/null
+++ b/html/stats.html
@@ -0,0 +1,70 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>Performance Metrics</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Performance Metrics</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:23<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">1. Introduction</a></li>
+ <li class="inline"><a href="#budget">2. Statistics Summary</a></li>
+ <li class="inline"><a href="#quality">3. Quality of Service</a></li>
+</ul>
+<hr>
+<h4 id="intro">1. Introduction</h4>
+
+<p>This page describes several statistics provided in the NTP specification and reference implementation and how they determine the accuracy and error measured during routine and exceptional operation. These statistics provide the following information.</p>
+<ul>
+ <li>Nominal estimate of the server clock time relative to the client clock time. This is called <em>clock offset</em> symbolized by the Greek letter &theta;.</li>
+ <li>Roundtrip system and network delay measured by the on-wire protocol. This is call <em>roundtrip delay</em> symbolized by the Greek letter &delta;.</li>
+ <li>Potential clock offset error due to the maximum uncorrected system clock frequency error. This is called <em>dispersion</em> symbolized by the Greek letter &epsilon;.</li>
+ <li>Expected error, consisting of the root mean square (RMS) nominal clock offset sample differencess in a sliding window of several samples. This is called <em>jitter</em> symbolized by the Greek letter &phi;.</li>
+</ul>
+<p> Figure 1 shows how the various measured statistics are collected and compiled to calibrate NTP performance.</p>
+<div align="center">
+<img src="pic/stats.gif" alt="gif">
+<p>Figure 1. Statistics Budget</p>
+</div>
+<p>The data represented in boxes labeled Server are contained in fields in packet received from the server. The data represented in boxes labeled Peer are computed by the on-wire protocol, as described below. The algorithms of the box labeled Selection and Combining Algorithms process the peer data to select a system peer. The System box represents summary data inherited from the system peer. These data are available to application programs and dependent downstream clients.</p>
+<h4 id="budget">2. Statistics Summary</h4>
+<p>Each NTP synchronization source is characterized by the offset &theta; and delay &delta; samples measured by the on-wire protocol, as described on the <a href="warp.html">How NTP Works</a> page. In addition, the dispersion &epsilon; sample is initialized with the sum of the source precision &rho;<sub>R</sub> and the client precision &rho; (not shown) as each source packet is received. The dispersion increases at a rate of 15 &mu;s/s after that. For this purpose, the precision is equal to the latency to read the system clock. The offset, delay and dispersion are called the sample statistics.</p>
+<blockquote>
+ <p>Note. In very fast networks where the client clock frequency is not within 1 PPM or so of the the server clock frequency, the roundtrip delay may have small negative values. This is usually a temporary condition when the client is first started. When using the roundtrip delay in calculations, negative values are assumed zero.</p>
+</blockquote>
+<p> In a window of eight (offset, delay, dispersion) samples, the algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the sample with minimum delay, which generally represents the most accurate offset statistic. The selected offset sample determines the <em>peer offset</em> and <em>peer delay </em>statistics. The <em>peer dispersion</em> is a weighted average of the dispersion samples in the window. These quantities are recalculated as each update is received from the source. Between updates, both the sample dispersion and peer dispersion continue to grow at the same rate, 15 &mu;s/s. Finally, the <em>peer jitter</em> &phi; is determined as the RMS differences between the offset samples in the window relative to the selected offset sample. The peer statistics are recorded by the <tt>peerstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. Peer variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#peer"><tt>ntpq</tt></a> program.</p>
+<p> The clock filter algorithm continues to process updates in this way until the source is no longer reachable. Reachability is determined by an eight-bit shift register, which is shifted left by one bit as each poll packet is sent, with 0 replacing the vacated rightmost bit. Each time a valid update is received, the rightmost bit is set to 1. The source is considered reachable if any bit is set to 1 in the register; otherwise, it is considered unreachable. When a source becomes unreachable, a dummy sample with &quot;infinite&quot; dispersion is inserted in the filter window at each poll, thus displacing old samples. This causes the peer dispersion to increase eventually to infinity.</p>
+<p>The composition of the source population and the system peer selection is redetermined as each update from each source is received. The system peer and system variables are determined as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The system variables &Theta;, &Delta;, &Epsilon; and &Phi; are updated from the system peer variables of the same name and the system stratum set one greater than the system peer stratum. The system statistics are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. System variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#system"><tt>ntpq</tt></a> program.</p>
+<p>Although it might seem counterintuitive, a cardinal rule in the selection process is, once a sample has been selected by the clock filter algorithm, older samples are no longer selectable. This applies also to the clock select algorithm. Once the peer variables for a source have been selected, older variables of the same or other sources are no longer selectable. The reason for these rules is to limit the time delay in the clock discipline algorithm. This is necessary to preserve the optimum impulse response and thus the risetime and overshoot.</p>
+<p>This means that not every sample can be used to update the peer variables, and up to seven samples can be ignored between selected samples. This fact has been carefully considered in the discipline algorithm design with due consideration for feedback loop delay and minimum sampling rate. In engineering terms, even if only one sample in eight survives, the resulting sample rate is twice the Nyquist rate at any time constant and poll interval.</p>
+<h4 id="quality">3. Quality of Service</h4>
+<p>This section discusses how an NTP client determines the system performance using a peer population including reference clocks and remote servers. This is determined for each peer from two statistics, <em>peer jitter</em> and <em>root distance.</em> Peer jitter is determined from various jitter components as described above. It represents the expected error in determining the clock offset estimate. Root distance represents the maximum error of the estimate due to all causes.</p>
+<p>The root distance statistic is computed as one-half the <em> root delay</em> of the primary source of time; i.e., the reference clock, plus the <em> root dispersion</em> of that source. The root variables are included in the NTP packet header received from each source. At each update the root delay is recomputed as the sum of the root delay in the packet plus the peer delay, while the root dispersion is recomputed as the sum of the root dispersion in the packet plus the peer dispersion.</p>
+<blockquote>
+ <p>Note. In order to avoid timing loops, the root distance is adjusted to the maximum of the above computation and a <em>minimum threshold.</em> The minimum threshold defaults to 1 ms, but can be changed according to client preference using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+</blockquote>
+<p>A source is considered selectable only if its root distance is less than the <em>select threshold</em>, by default 1.5 s, but can be changed according to client preference using the <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. When an upstream server loses all sources, its root distance apparent to dependent clients continues to increase. The clients are not aware of this condition and continue to accept synchronization as long as the root distance is less than the select threshold.</p>
+<p>The root distance statistic is used by the select, cluster and mitigation algorithms. In this respect, it is sometimes called the <em>synchronization distance</em> often shortened simply to <em>distance</em>. The root distance is also used in the following ways.</p>
+<ul>
+ <li>Root distance defines the maximum error of the clock offset estimate due to all causes as long as the source remains reachable..</li>
+ <li>Root distance defines the upper and lower limits of the correctness interval. This interval represents the maximum clock offset for each of possibly several sources. The clock select algorithm computes the intersection of the correctness intervals to determine the truechimers from the selectable source population.</li>
+ <li>Root distance is used by the clock cluster algorithm as a weight factor when pruning outlyers from the truechimer population.</li>
+ <li>The (normalized) reciprocal of the root distance is used as a weight factor by the combine algorithm when computing the system clock offset and system jitter.</li>
+ <li>Root distance is used by the mitigation algorithm to select the system peer from among the cluster algorithm survivors.</li>
+</ul>
+<p>The root distance thus functions as a metric in the selection and weighting of the various available sources. The strategy is to select the system peer as the source with the minimum root distance and thus the minimum maximum error. The reference implementation uses the Bellman-Ford algorithm described in the literature, where the goal is to minimize the root distance. The algorithm selects the <em>system peer</em>, from which the system root delay and system root dispersion are inherited.</p>
+<p>The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page deliver several important statistics. The <em>system offset</em> and <em>system jitter</em> are weighted averages computed by the clock combine algorithm. System offset is best interpreted as the maximum-likelihood estimate of the system clock offset, while system jitter, also called estimated error, is best interpreted as the expected error of this estimate. <em>System delay</em> is the root delay inherited from the system peer, while <em>s</em><em>ystem dispersion</em> is the root dispersion plus contributions due to jitter and the absolute value of the system offset.</p>
+<p>The maximum system error, or <em>system distance</em>, is computed as one-half the system delay plus the system dispersion. In order to simplify discussion, certain minor contributions to the maximum error statistic are ignored. If the precision time kernel support is available, both the estimated error and maximum error are reported to user programs via the <tt>ntp_adjtime()</tt> kernel system call. See the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page for further information.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/tickadj.html b/html/tickadj.html
index 7a30f534f4c5..3c38f844cea3 100644
--- a/html/tickadj.html
+++ b/html/tickadj.html
@@ -1,48 +1,45 @@
<!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="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="25" locale="00000409" region="0" t="DateTime" w="61">18:53</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="308">Wednesday, January 16, 2008</csobj></p>
- <hr>
- <h4>Synopsis</h4>
- <p><tt>tickadj [ <i>tick</i> ]</tt></p>
- <p><tt>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i> ]</tt></p>
- <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 kernel time support, including Solaris, Tru64, FreeBSD and Linux, should NOT use the program, even if it appears to work, as it will destabilize the kernel time support. Use the <a href="ntptime.html"><tt>ntptime</tt></a> program instead.</p>
- <p>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>On Linux, only the <tt>tick</tt> variable is supported and the only allowed argument is the tick value.</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 SunOS 4.x.<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>
- <tt>/vmunix<br>
- /unix<br>
- /dev/kmem<br>
- </tt>
- <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
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<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:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:24<!-- #EndDate -->
+ UTC</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 timekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel <tt>/dev/kmem</tt>. Newer machines with kernel time support, including Solaris, Tru64, FreeBSD and Linux, should NOT use the program, even if it appears to work, as it will destabilize the kernel time support. Use the <a href="ntptime.html"><tt>ntptime</tt></a> program instead.</p>
+<p>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></dt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to the value <i><tt>tickadj specified.</tt></i></dd>
+ <dt><tt>-A</tt></dt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to an internally computed &quot;optimal&quot; 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 SunOS 4.x.</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>
+<tt>/vmunix<br>
+/unix<br>
+/dev/kmem<br>
+</tt>
+<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>
diff --git a/html/warp.html b/html/warp.html
new file mode 100644
index 000000000000..1d42dd63f245
--- /dev/null
+++ b/html/warp.html
@@ -0,0 +1,60 @@
+<!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="HTML Tidy, see www.w3.org">
+<title>How NTP Works</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>How NTP Works</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:24<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">1. Introduction and Overview</a></li>
+ <li class="inline"><a href="#scale">2. NTP Timescale and Data Formats</a></li>
+ <li class="inline"><a href="#arch">3. Architecture and Algorithms</a></li>
+</ul>
+<hr>
+<h4 align="center">Abstract</h4>
+<blockquote>
+ <p align="left"> This page and its dependencies contain a technical description of the Network Time Protocol (NTP) architecture and operation. It is intended for administrators, operators and monitoring personnel. Additional information for nontechnical readers can be found in the white paper <a href="http://www.eecis.udel.edu/~mills/exec.html">Executive Summary: Computer Network Time Synchronization</a>. While this page and its dependencies are primarily concerned with NTP, additional information on related protocols can be found in the white papers <a href="http://www.eecis.udel.edu/~mills/ptp.html">IEEE 1588 Precision Time Protocol (PTP)</a> and <a href="http://www.eecis.udel.edu/~mills/proximity.html">Time Synchronization for Space Data Links</a>. Note that reference to a page in this document collection is to a page in the collection, while reference to a <em>white paper</em> is to a document at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> web site.</p>
+</blockquote>
+<h4 id="intro">1. Introduction and Overview</h4>
+
+<p>NTP time synchronization services are widely available in the public Internet. The public NTP subnet currently includes several thousand servers in most countries and on every continent of the globe, including Antarctica, and sometimes in space and on the sea floor. These servers support, directly or indirectly, a total population estimated at over 25 million computers in the global Internet.</p>
+<p> The NTP subnet operates with a hierarchy of levels, where each level is assigned a number called the stratum. Stratum 1 (primary) servers at the lowest level are directly synchronized to national time services via satellite, radio or telephone modem. Stratum 2 (secondary) servers at the next higher level are synchronized to stratum 1 servers and so on. Normally, NTP clients and servers with a relatively small number of clients do not synchronize to public primary servers. There are several hundred public secondary servers operating at higher strata and are the preferred choice.</p>
+<p>This page presents an overview of the NTP implementation included in this software distribution. We refer to this implementation as the <em>reference implementation</em> only because it was used to test and validate the NTPv4 specification RFC-5905. It is best read in conjunction with the briefings and white papers on the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> page. An executive summary suitable for management and planning purposes is in the white paper <a href="http://www.eecis.udel.edu/~mills/exec.html">Executive Summary: Computer Network Time Synchronization</a>.</p>
+<h4 id="scale">2. NTP Timescale and Data Formats</h4>
+<p>NTP clients and servers synchronize to the Coordinated Universal Time (UTC) timescale used by national laboratories and disseminated by radio, satellite and telephone modem. This is a global timescale independent of geographic position. There are no provisions to correct for local time zone or daylight savings time; however, these functions can be performed by the operating system on a per-user basis.</p>
+<p> The UT1 timescale, upon which UTC is based, is determined by the rotation of the Earth about its axis. The Earth rotation is gradually slowing down relative to International Atomic Time (TAI). In order to rationalize UTC with respect to TAI, a leap second is inserted at intervals of about 18 months, as determined by the International Earth Rotation Service (IERS). Reckoning with leap seconds in the NTP timescale is described in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>.</p>
+<p>The historic insertions are documented in the <tt>leap-seconds.list</tt> file, which can be downloaded from the NIST FTP servers. This file is updated at intervals not exceeding six months. Leap second warnings are disseminated by the national laboratories in the broadcast timecode format. These warnings are propagated from the NTP primary servers via other server to the clients by the NTP on-wire protocol. The leap second is implemented by the operating system kernel, as described in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>. Implementation details are described on the <a href="leap.html">Leap Second Processing</a> page.</p>
+<div align="center">
+<img src="pic/time1.gif" alt="gif">
+<p>Figure 1. NTP Data Formats</p>
+</div>
+<p>Figure 1 shows two NTP time formats, a 64-bit <em>timestamp</em> format and a 128-bit <em>datestamp</em> format. The datestamp format is used internally, while the timestamp format is used in packet headers exchanged between clients and servers. The timestamp format spans 136 years, called an <em>era</em>. The current era began on 1 January 1900, while the next one begins in 2036. Details on these formats and conversions between them are in the white paper <a href="http://www.eecis.udel.edu/~mills/y2k.html">The NTP Era and Era Numbering</a>. However, the NTP protocol will synchronize correctly, regardless of era, as long as the system clock is set initially within 68 years of the correct time. Further discussion on this issue is in the white paper <a href="http://www.eecis.udel.edu/~mills/time.html">NTP Timestamp Calculations</a>. Ordinarily, these formats are not seen by application programs, which convert these NTP formats to native Unix or Windows formats.</p>
+<h4 id="arch">3. Architecture and Algorithms</h4>
+<div align="center">
+ <p><img src="pic/fig_3_1.gif" alt="gif"></p>
+ <p>Figure 2. NTP Daemon Processes and Algorithms</p>
+</div>
+<p>The overall organization of the NTP architecture is shown in Figure 2. It is useful in this context to consider the implementation as both a client of upstream (lower stratum) servers and as a server for downstream (higher stratum) clients. It includes a pair of peer/poll processes for each reference clock or remote server used as a synchronization source. Packets are exchanged between the client and server using the <em>on-wire protocol</em> described in the white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">Analysis and Simulation of the NTP On-Wire Protocols</a>. The protocol is resistant to lost, replayed or spoofed packets.</p>
+<p> The poll process sends NTP packets at intervals ranging from 8 s to 36 hr. The intervals are managed as described on the <a href="poll.html">Poll Process</a> page to maximize accuracy while minimizing network load. The peer process receives NTP packets and performs the packet sanity tests described on the <a href="decode.html">Event Messages and Status Words</a> page and <a href="decode.html#flash">flash status word</a>. The flash status word reports in addition the results of various access control and security checks described in the white paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP Security Analysis</a>. A sophisticated traffic monitoring facility described on the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page protects against denial-of-service (DoS) attacks.</p>
+<p>Packets that fail one or more of these tests are summarily discarded. Otherwise, the peer process runs the on-wire protocol that uses four raw timestamps: the <em>origin timestamp</em> <em>T</em><sub>1</sub> upon departure of the client request, the <em>receive timestamp</em> <em>T</em><sub>2</sub> upon arrival at the server, the <em>transmit timestamp</em> <em>T</em><sub>3</sub> upon departure of the server reply, and the <em>destination timestamp</em> <em>T</em><sub>4</sub> upon arrival at the client. These timestamps, which are recorded by the <tt>rawstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command, are used to calculate the clock offset and roundtrip delay samples:</p>
+<div align="center">
+ <p>offset = [(<em>T</em><sub>2</sub> -<em> T</em><sub>1</sub>) + (<em>T</em><sub>3</sub> - <em>T</em><sub>4</sub>)] / 2,<br>
+ delay = (<em>T</em><sub>4</sub> - <em>T</em><sub>1</sub>) - (<em>T</em><sub>3</sub> - <em>T</em><sub>2</sub>).</p>
+</div>
+<p>In this description the transmit timestamps <em>T</em><sub>1</sub> and <em>T</em><sub>3</sub> are <em>softstamps</em> measured by the inline code. Softstamps are subject to various queuing and processing delays. A more accurate measurement uses <em>drivestamps</em>, as described on the <a href="xleave.html">NTP Interleaved Modes</a> page. These issues along with mathematical models are discussed in the white paper <a href="http://www.eecis.udel.edu/~mills/time.html">NTP Timestamp Calculations</a>.</p>
+<p>The offset and delay statistics for one or more peer processes are processed by a suite of mitigation algorithms. The algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the offset and delay samples most likely to produce accurate results. Those servers that have passed the sanity tests are declared <em>selectable</em>. From the selectable population the statistics are used by the algorithm described on the <a href="select.html">Clock Select Algorithm</a> page to determine a number of <em>truechimers</em> according to Byzantine agreement and correctness principles. From the truechimer population the algorithm described on the <a href="cluster.html">Clock Cluster Algorithm</a> page determines a number of <em>survivors</em> on the basis of statistical clustering principles.</p>
+<p> The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page combine the survivor offsets, designate one of them as the <em>system peer</em> and produces the final offset used by the algorithm described on the <a href="discipline.html">Clock Discipline Algorithm</a> page to adjust the system clock time and frequency. The clock offset and frequency, are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. For additional details about these algorithms, see the Architecture Briefing on the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> page. For additional information on statistacl principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/xleave.html b/html/xleave.html
index 7e98ca964621..417185cecb1b 100644
--- a/html/xleave.html
+++ b/html/xleave.html
@@ -1,42 +1,30 @@
<!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="HTML Tidy, see www.w3.org">
- <title>NTP Interleaved Modes</title>
- <link href="scripts/style.css" type="text/css" rel="stylesheet">
- </head>
-
- <body>
- <h3>NTP Interleaved Modes </h3>
- <img src="pic/pogo4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
- <p>You need a little magic.</p>
- <p>Last update:
- <!-- #BeginDate format:En2m -->03-May-2009 3:37<!-- #EndDate -->
- UTC</p>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Interleaved Modes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Interleaved Modes </h3>
+<img src="pic/pogo4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>You need a little magic.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:25<!-- #EndDate -->
+ UTC</p>
<br clear="left">
- <hr>
- <p>In the protocol described in the NTP specification and implemented today the transmit timestamp is captured before the MD5 digest is computed and the packet is sent, while the receive timestamp is captured after the packet is received. For enhanced accuracy it is desirable to capture the timestamps as close to the wire as possible; i.e., with hardware assist or with a modified driver.</p>
- <p> The problem is, while the receive timestamp could in principle be piggybacked in the receive buffer, the transmit timestamp cannot ordinarily be transmitted in the same packet. A solution for this problem is the two-step or interleaved protocol described on this page and included in the the current reference implementation. In this experimental variant the transmit timestamp for one packet is actually carried in the immediately following packet. The trick, however, is to implement the interleaved protocol without changing the NTP packet header format, without compromising backwards compatibility and without compromising the error recovery properties.</p>
- <p>Currently, the reference implementation uses only software timestamps (softstamps). The receive softstamp is captured at software interrupt time and before the buffer is queued for later processing. The reference implementation captures a softstamp before the message digest routine and another after the send-packet routine. In this design the latter timestamp can be considered most accurate, as it avoids the kernel latencies and queueing mechanisms. The difference, called the interleaved or output delay, varies from 16 <font face="symbol">m</font>s for a dual-core, 2.8 GHz Pentium 4 running FreeBSD 6.1 to 1100 <font face="symbol">m</font>s for a Sun Blade 1500 running Solaris 10.</p>
- <p>Performacne varies widely between machines and network interface cards on a 100-Mb switched Ethernet where the NTP packet is about 1000 bits or 10 <font face="symbol">m</font>s. On two identical Pentium 4 machines in symmetric mode, the measured output delay is 16 <font face="symbol">m</font>s and remaining one-way delay components 45-150 <font face="symbol">m</font>s. Two LAN segments account for 20 <font face="symbol">m</font>s, which leaves 25-130 <font face="symbol">m</font>s for input delay. On two identical UltraSPARC machines running Solaris 10 in symmetric mode, the measured output delay is 160 <font face="symbol">m</font>s and remaining one-way delay components 195 <font face="symbol">m</font>s. Two LAN segments account for 20 <font face="symbol">m</font>s, which leaves 175 ms for input delay.</p>
- <p>Performance with the Pentia show a residual jitter of about 20 <font face="symbol">m</font>s, which is by far the best performance so far. However, much better performance could result if the input delay could be reduced or elminated with driver or hardware timestamps. Should that be done, performance should be in the same order as the the PPS and kernel discipline, which is in the order of 2 <font face="symbol">m</font>s.</p>
- <p>Interleaved modes can be used only in NTP symmetric and broadcast modes.
- It is activated by the <tt>xleave</tt> option with the <tt>peer</tt> or <tt>broadcast</tt> configuration
- commands. The NTP protocol automatically reconfigures in normal or
- interleaved mode as required. Ordinary broadcast clients can use
- the same servers as interleaved broadcast clients at the same time.
- Further details are in the white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">NTP
- Interleaved On-Wire Protocol</a> and the briefing <a href="http://www.eecis.udel.edu/~mills/database/brief/onwire/onwire.ppt">Interleaved
- Synchronization Protocols for LANs and Space Data Links</a>.</p>
- <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
+<hr>
+<p>In the protocol described in the NTP specification and reference implementation up to now, the transmit timestamp, which is captured before the message digest is computed and the packet queued for output, is properly called as a <em>softstamp</em> The receive timestamp, which is captured after the input driver interrupt routine and before the packet is queued for input, is properly called a <em>drivestamp</em>. For enhanced accuracy it is desirable to capture the transmit timestamp as close to the wire as possible; for example, after the output driver interrupt routine.</p>
+<p> In other words, we would like to replace the transmit softstamp with a drivestamp, but the problem is the transmit drivestamp is available only after the packet has been sent. A solution for this problem is the two-step or interleaved protocol described on this page and included in the the current reference implementation. In interleaved modes the transmit drivestamp for one packet is actually carried in the immediately following packet. The trick, however, is to implement the interleaved protocol without changing the NTP packet header format, without compromising backwards compatibility and without compromising the error recovery properties.</p>
+<p> The reference implementation captures a softstamp before the message digest routine and a drivestamp after the output interrupt routine. In this design the latter timestamp can be considered most accurate, as it avoids the various queuing and transmission latencies. The difference between the two timestamps, which is called the interleaved or output delay, varies from 16 &mu;s for a dual-core Pentium running FreeBSD 6.1 to 1100 &mu;s for a Sun Blade 1500 running Solaris 10.</p>
+<p>Interleaved mode can be used only in NTP symmetric and broadcast modes.
+ It is activated by the <tt>xleave</tt> option with the <tt>peer</tt> or <tt>broadcast</tt> configuration
+commands. A broadcast server configured for interleaved mode is transparent to ordinary broadcast clients, so both ordinary and interleaved broadcast clients can use the same packets. An interleaved symmetric active peer automatically switches to ordinary symmetric mode if the other peer is not capable of operation in interleaved mode. </p>
+<p>As demonstrated in the white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">Analysis and Simulation of the NTP On-Wire Protocols</a>, the interleaved modes have the same resistance to lost packets, duplicate packets, packets crossed in flight and protocol restarts as the ordinary modes. An application of the interleaved symmetric mode in space missions is presented in the white paper <a href="http://www.eecis.udel.edu/~mills/proximity.html">Time Synchronization for Space Data Links</a>.</p>
+<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>
diff --git a/include/Makefile.am b/include/Makefile.am
index 88727ddaf4e5..5ab3e6e9d0df 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,7 +1,4 @@
NULL =
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
-EXTRA_DIST = autogen-version.def copyright.def debug-opt.def homerc.def version.def version.texi
SUBDIRS = isc
@@ -11,13 +8,16 @@ noinst_HEADERS = \
ascii.h \
audio.h \
binio.h \
+ declcond.h \
gps.h \
hopf6039.h \
icom.h \
ieee754io.h \
+ intreswork.h \
iosignal.h \
l_stdlib.h \
lib_strbuf.h \
+ libntp.h \
mbg_gps166.h \
mx4200.h \
ntif.h \
@@ -28,7 +28,7 @@ noinst_HEADERS = \
ntp_config.h \
ntp_control.h \
ntp_crypto.h \
- ntp_data_structures.h \
+ ntp_prio_q.h \
ntp_datum.h \
ntp_debug.h \
ntp_filegen.h \
@@ -49,7 +49,6 @@ noinst_HEADERS = \
ntp_request.h \
ntp_rfc2553.h \
ntp_select.h \
- ntp_sprintf.h \
ntp_stdlib.h \
ntp_string.h \
ntp_syscall.h \
@@ -57,6 +56,8 @@ noinst_HEADERS = \
ntp_tty.h \
ntp_types.h \
ntp_unixtime.h \
+ ntp_worker.h \
+ ntp_workimpl.h \
ntpd.h \
ntpsim.h \
parse.h \
@@ -67,6 +68,10 @@ noinst_HEADERS = \
timepps-SCO.h \
timepps-Solaris.h \
timepps-SunOS.h \
+ timespecops.h \
+ timetoa.h \
+ timevalops.h \
trimble.h \
+ vint64ops.h \
$(NULL)
diff --git a/include/Makefile.in b/include/Makefile.in
index 2f285def317b..0a6a65d4da3c 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -39,22 +39,52 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -100,20 +130,32 @@ am__relativize = \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -125,21 +167,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -147,6 +199,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -165,14 +218,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -185,10 +292,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -196,9 +305,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -207,6 +334,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -255,9 +383,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
-EXTRA_DIST = autogen-version.def copyright.def debug-opt.def homerc.def version.def version.texi
SUBDIRS = isc
noinst_HEADERS = \
adjtime.h \
@@ -265,13 +390,16 @@ noinst_HEADERS = \
ascii.h \
audio.h \
binio.h \
+ declcond.h \
gps.h \
hopf6039.h \
icom.h \
ieee754io.h \
+ intreswork.h \
iosignal.h \
l_stdlib.h \
lib_strbuf.h \
+ libntp.h \
mbg_gps166.h \
mx4200.h \
ntif.h \
@@ -282,7 +410,7 @@ noinst_HEADERS = \
ntp_config.h \
ntp_control.h \
ntp_crypto.h \
- ntp_data_structures.h \
+ ntp_prio_q.h \
ntp_datum.h \
ntp_debug.h \
ntp_filegen.h \
@@ -303,7 +431,6 @@ noinst_HEADERS = \
ntp_request.h \
ntp_rfc2553.h \
ntp_select.h \
- ntp_sprintf.h \
ntp_stdlib.h \
ntp_string.h \
ntp_syscall.h \
@@ -311,6 +438,8 @@ noinst_HEADERS = \
ntp_tty.h \
ntp_types.h \
ntp_unixtime.h \
+ ntp_worker.h \
+ ntp_workimpl.h \
ntpd.h \
ntpsim.h \
parse.h \
@@ -321,7 +450,11 @@ noinst_HEADERS = \
timepps-SCO.h \
timepps-Solaris.h \
timepps-SunOS.h \
+ timespecops.h \
+ timetoa.h \
+ timevalops.h \
trimble.h \
+ vint64ops.h \
$(NULL)
all: all-recursive
diff --git a/include/autogen-version.def b/include/autogen-version.def
deleted file mode 100644
index d69457ccf1e0..000000000000
--- a/include/autogen-version.def
+++ /dev/null
@@ -1,2 +0,0 @@
-#assert (version-compare >= autogen-version "5.11.9")
-guard-option-names;
diff --git a/include/copyright.def b/include/copyright.def
deleted file mode 100644
index 0f1708c5d7c5..000000000000
--- a/include/copyright.def
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: Text -*- */
-
-copyright = {
- date = "1970-2011";
- owner = "David L. Mills and/or others";
- eaddr = "http://bugs.ntp.org, bugs@ntp.org";
- type = note;
- text = <<- _EndOfDoc_
- see html/copyright.html
-
- _EndOfDoc_;
-};
-
-long-opts;
-config-header = config.h;
-environrc;
-no-misuse-usage;
-
-version = `
-eval VERSION=\`sed -e 's/.*,\\[//' -e 's/\\].*//' < ../version.m4\`
-[ -z "${VERSION}" ] && echo "Cannot determine VERSION" && kill -TERM $AG_pid
-echo $VERSION`;
-
-version-value = ''; /* Don't use -v as a shortcut for --version */
diff --git a/include/debug-opt.def b/include/debug-opt.def
deleted file mode 100644
index 783e5b0b1ff0..000000000000
--- a/include/debug-opt.def
+++ /dev/null
@@ -1,32 +0,0 @@
-
-include = <<- _EOF_
- #ifdef __windows
- extern int atoi(const char*);
- #else
- # include <stdlib.h>
- #endif
- _EOF_;
-
-flag = {
- name = debug-level;
- value = d;
- max = NOLIMIT;
- nopreset;
- descrip = "Increase output debug message level";
- doc = <<- _EndOfDoc_
- Increase the debugging message output level.
- _EndOfDoc_;
-};
-
-flag = {
- name = set-debug-level;
- value = D;
- max = NOLIMIT;
- descrip = "Set the output debug message level";
- arg-type = string;
- flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
- doc = <<- _EndOfDoc_
- Set the output debugging level. Can be supplied multiple times,
- but each overrides the previous value(s).
- _EndOfDoc_;
-};
diff --git a/include/declcond.h b/include/declcond.h
new file mode 100644
index 000000000000..751eff9d167c
--- /dev/null
+++ b/include/declcond.h
@@ -0,0 +1,21 @@
+/*
+ * declcond.h - declarations conditionalized for ntpd
+ *
+ * The NTP reference implementation distribution includes two distinct
+ * declcond.h files, one in ntpd/ used only by ntpd, and another in
+ * include/ used by libntp and utilities. This relies on the source
+ * file's directory being ahead of include/ in the include search.
+ *
+ * The ntpd variant of declcond.h declares "debug" only #ifdef DEBUG,
+ * as the --disable-debugging version of ntpd should not reference
+ * "debug". The libntp and utilities variant always declares debug,
+ * as it is used in those codebases even without DEBUG defined.
+ */
+#ifndef DECLCOND_H
+#define DECLCOND_H
+
+/* #ifdef DEBUG */ /* uncommented in ntpd/declcond.h */
+extern int debug;
+/* #endif */ /* uncommented in ntpd/declcond.h */
+
+#endif /* DECLCOND_H */
diff --git a/include/intreswork.h b/include/intreswork.h
new file mode 100644
index 000000000000..c343ac013595
--- /dev/null
+++ b/include/intreswork.h
@@ -0,0 +1,29 @@
+/*
+ * intreswork.h -- declarations private to ntp_intres.c, ntp_worker.c.
+ */
+#ifndef INTRESWORK_H
+#define INTRESWORK_H
+
+#include "ntp_worker.h"
+
+#ifdef WORKER
+
+extern int blocking_getaddrinfo(blocking_child *,
+ blocking_pipe_header *);
+extern int blocking_getnameinfo(blocking_child *,
+ blocking_pipe_header *);
+
+#ifdef TEST_BLOCKING_WORKER
+extern void gai_test_callback(int rescode, int gai_errno,
+ void *context, const char *name,
+ const char *service,
+ const struct addrinfo *hints,
+ const struct addrinfo *ai_res);
+extern void gni_test_callback(int rescode, int gni_errno,
+ sockaddr_u *psau, int flags,
+ const char *host,
+ const char *service, void *context);
+#endif /* TEST_BLOCKING_WORKER */
+#endif /* WORKER */
+
+#endif /* INTRESWORK_H */
diff --git a/include/iosignal.h b/include/iosignal.h
index 6c4052b7f049..406804e14c66 100644
--- a/include/iosignal.h
+++ b/include/iosignal.h
@@ -1,23 +1,58 @@
-#if !defined _ntp_iosignaled_h
-#define _ntp_iosignaled_h
+#ifndef IOSIGNAL_H
+#define IOSIGNAL_H
#include "ntp_refclock.h"
+ /*
+ * 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 and ntpd/work_fork.c!
+ */
+#if defined(USE_SIGPOLL)
+# undef USE_SIGPOLL
+#endif
+#if defined(USE_SIGIO)
+# undef USE_SIGIO
+#endif
+
+/* type of input handler function - only shared between iosignal.c and ntp_io.c */
+typedef void (input_handler_t)(l_fp *);
+
#if defined(HAVE_SIGNALED_IO)
+# 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
+
+# if defined(USE_SIGIO) && defined(USE_SIGPOLL)
+# if SIGIO == SIGPOLL
+# define USE_SIGIO
+# undef USE_SIGPOLL
+# endif /* SIGIO == SIGPOLL */
+# endif /* USE_SIGIO && USE_SIGPOLL */
+
+#define USING_SIGIO() using_sigio
+
+extern int using_sigio;
+
extern void block_sigio (void);
extern void unblock_sigio (void);
extern int init_clock_sig (struct refclockio *);
extern void init_socket_sig (int);
-extern void set_signal (void);
-RETSIGTYPE sigio_handler (int);
+extern void set_signal (input_handler_t *);
# define BLOCKIO() block_sigio()
# define UNBLOCKIO() unblock_sigio()
-#else
-
-# define BLOCKIO()
-# define UNBLOCKIO()
-#endif /* HAVE_SIGNALED_IO */
-
+#else /* !HAVE_SIGNALED_IO follows */
+# define BLOCKIO() do {} while (0)
+# define UNBLOCKIO() do {} while (0)
+# define USING_SIGIO() FALSE
#endif
+
+#endif /* IOSIGNAL_H */
diff --git a/include/isc/Makefile.am b/include/isc/Makefile.am
index 14aa70813e16..160203b0cdad 100644
--- a/include/isc/Makefile.am
+++ b/include/isc/Makefile.am
@@ -1,6 +1,4 @@
NULL =
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
noinst_HEADERS = \
mem.h \
diff --git a/include/isc/Makefile.in b/include/isc/Makefile.in
index b792b24eb823..cdb34ec0902b 100644
--- a/include/isc/Makefile.in
+++ b/include/isc/Makefile.in
@@ -39,22 +39,52 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
@@ -62,20 +92,32 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -87,21 +129,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -109,6 +161,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -127,14 +180,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -147,10 +254,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -158,9 +267,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -169,6 +296,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -217,8 +345,6 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
-ETAGS_ARGS = $(srcdir)/Makefile.am
noinst_HEADERS = \
mem.h \
$(NULL)
diff --git a/include/isc/mem.h b/include/isc/mem.h
index f5cf9ec57fff..ba1bfeb0e483 100644
--- a/include/isc/mem.h
+++ b/include/isc/mem.h
@@ -60,9 +60,9 @@
#define isc_mem_strdup(c, str) \
( ISC_MEM_UNUSED_ARG(c), estrdup(str) )
-#define isc_mem_attach(src, ptgt) do { *(ptgt) = (src); } while (0)
-#define isc_mem_detach(c) ISC_MEM_UNUSED_ARG(c)
-#define isc_mem_printallactive(s) fprintf((s), \
+#define isc__mem_attach(src, ptgt) do { *(ptgt) = (src); } while (0)
+#define isc__mem_detach(c) ISC_MEM_UNUSED_ARG(c)
+#define isc__mem_printallactive(s) fprintf((s), \
"isc_mem_printallactive() stubbed.\n")
#endif /* ISC_MEM_H */
diff --git a/include/l_stdlib.h b/include/l_stdlib.h
index 0213d23c1c4f..073ea4641236 100644
--- a/include/l_stdlib.h
+++ b/include/l_stdlib.h
@@ -3,12 +3,8 @@
* This is optional
*/
-#ifndef _l_stdlib_h
-#define _l_stdlib_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#ifndef L_STDLIB_H
+#define L_STDLIB_H
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
@@ -111,7 +107,7 @@ extern int rename (const char *, const char *);
#endif
#ifdef DECL_SELECT_0
-#ifdef _ntp_select_h
+#ifdef NTP_SELECT_H
extern int select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
#endif
#endif
@@ -135,16 +131,6 @@ struct sigvec;
extern int sigvec (int, struct sigvec *, struct sigvec *);
#endif
-#ifndef HAVE_SNPRINTF
-/* PRINTFLIKE3 */
-extern int snprintf (char *, size_t, const char *, ...);
-#endif
-
-/* HMS: does this need further protection? */
-#ifndef HAVE_VSNPRINTF
-extern int vsnprintf (char *, size_t, const char *, va_list);
-#endif
-
#ifdef DECL_STDIO_0
#if defined(FILE) || defined(BUFSIZ)
extern int _flsbuf (int, FILE *);
@@ -235,4 +221,4 @@ extern int errno;
extern int h_errno;
#endif
-#endif /* l_stdlib_h */
+#endif /* L_STDLIB_H */
diff --git a/include/lib_strbuf.h b/include/lib_strbuf.h
index 5aa0eb0a6d72..5ee92d6f8341 100644
--- a/include/lib_strbuf.h
+++ b/include/lib_strbuf.h
@@ -1,28 +1,32 @@
/*
* lib_strbuf.h - definitions for routines which use the common string buffers
*/
+#ifndef LIB_STRBUF_H
+#define LIB_STRBUF_H
#include <ntp_types.h>
+#include <ntp_malloc.h> /* for ZERO() */
/*
* Sizes of things
*/
-#define LIB_NUMBUFS 200
-#define LIB_BUFLENGTH 80
+#define LIB_NUMBUF 16
+#define LIB_BUFLENGTH 128
+
+typedef char libbufstr[LIB_BUFLENGTH];
+extern libbufstr lib_stringbuf[LIB_NUMBUF];
+extern int lib_nextbuf;
+extern int lib_inited;
+
/*
* 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; \
- memset(buf, 0, LIB_BUFLENGTH); \
- } while (0)
+#define LIB_GETBUF(bufp) \
+ do { \
+ ZERO(lib_stringbuf[lib_nextbuf]); \
+ (bufp) = &lib_stringbuf[lib_nextbuf++][0]; \
+ lib_nextbuf %= COUNTOF(lib_stringbuf); \
+ } while (FALSE)
-extern char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
-extern int lib_nextbuf;
-extern int lib_inited;
+#endif /* LIB_STRBUF_H */
diff --git a/include/libntp.h b/include/libntp.h
new file mode 100644
index 000000000000..8d87c024f42e
--- /dev/null
+++ b/include/libntp.h
@@ -0,0 +1,16 @@
+/* libntp.h */
+
+#if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
+#define GETDTABLESIZE() ((int)sysconf(_SC_OPEN_MAX))
+#elif defined(HAVE_GETDTABLESIZE)
+#define GETDTABLESIZE getdtablesize
+#else
+/*
+ * if we have no idea about the max fd value set up things
+ * so we will start at FOPEN_MAX
+ */
+#define GETDTABLESIZE() (FOPEN_MAX + FD_CHUNK)
+#endif
+
+extern void make_socket_nonblocking( SOCKET fd );
+extern SOCKET move_fd( SOCKET fd );
diff --git a/include/mbg_gps166.h b/include/mbg_gps166.h
index f4b82381087e..974debafae28 100644
--- a/include/mbg_gps166.h
+++ b/include/mbg_gps166.h
@@ -197,7 +197,7 @@ typedef struct {
/* by the user. The status field can be checked to see which corrections */
/* have been applied. */
-#ifndef _TM_DEFINED
+#ifndef GPS166_TM_DEFINED
typedef struct {
short year; /* 0..9999 */
char month; /* 1..12 */
@@ -221,7 +221,7 @@ typedef struct {
# define TM_LS_ANN 0x10 /* leap second will be inserted */
# define TM_LS_ENB 0x20 /* current second is leap second */
-# define _TM_DEFINED
+# define GPS166_TM_DEFINED
#endif
diff --git a/include/ntp.h b/include/ntp.h
index d7e87582d708..38343f23a705 100644
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -9,10 +9,9 @@
#include <ntp_fp.h>
#include <ntp_types.h>
+#include <ntp_lists.h>
#include <ntp_stdlib.h>
-#ifdef OPENSSL
#include <ntp_crypto.h>
-#endif /* OPENSSL */
#include <ntp_random.h>
#include <ntp_net.h>
@@ -90,12 +89,6 @@ typedef char s_char;
# 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.
@@ -113,7 +106,7 @@ typedef char s_char;
#define NTP_MAXDPOLL 10 /* log2 default max poll (~17 m) */
#define NTP_MAXPOLL 17 /* log2 max poll interval (~36 h) */
#define NTP_RETRY 3 /* max packet retries */
-#define NTP_MINPKT 1 /* log2 min interburst interval (2 s) */
+#define NTP_MINPKT 2 /* guard time (s) */
/*
* Clock filter algorithm tuning parameters
@@ -127,7 +120,6 @@ typedef char s_char;
*/
#define NTP_MINCLOCK 3 /* min survivors */
#define NTP_MAXCLOCK 10 /* max candidates */
-#define NTP_MAXASSOC 50 /* max associations */
#define MINDISPERSE .001 /* min distance */
#define MAXDISTANCE 1.5 /* max root distance (select threshold) */
#define CLOCK_SGATE 3. /* popcorn spike gate */
@@ -136,6 +128,7 @@ typedef char s_char;
#define MAX_TTL 8 /* max ttl mapping vector size */
#define BEACON 7200 /* manycast beacon interval */
#define NTP_MAXEXTEN 2048 /* max extension field size */
+#define NTP_ORPHWAIT 300 /* orphan wair (s) */
/*
* Miscellaneous stuff
@@ -145,7 +138,7 @@ typedef char s_char;
/*
* Limits of things
*/
-#define MAXFILENAME 128 /* max length of file name */
+#define MAXFILENAME 256 /* max length of file name */
#define MAXHOSTNAME 512 /* max length of host/node name */
#define NTP_MAXSTRLEN 256 /* max string length */
@@ -163,10 +156,9 @@ typedef char s_char;
#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 LOGTOD(a) ldexp(1., (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 ULOGTOD(a) ldexp(1., (int)(a)) /* ulog2 to double */
#define EVENT_TIMEOUT 0 /* one second, that is */
@@ -214,11 +206,12 @@ struct interface {
#define INT_LOOPBACK 0x004 /* the loopback interface */
#define INT_BROADCAST 0x008 /* can broadcast out this interface */
#define INT_MULTICAST 0x010 /* can multicast out this interface */
-#define INT_BCASTOPEN 0x020 /* broadcast socket is open */
+#define INT_BCASTOPEN 0x020 /* broadcast receive socket is open */
#define INT_MCASTOPEN 0x040 /* multicasting enabled */
#define INT_WILDCARD 0x080 /* wildcard interface - usually skipped */
#define INT_MCASTIF 0x100 /* bound directly to MCAST address */
#define INT_PRIVACY 0x200 /* RFC 4941 IPv6 privacy address */
+#define INT_BCASTXMIT 0x400 /* socket setup to allow broadcasts */
/*
* Define flasher bits (tests 1 through 11 in packet procedure)
@@ -254,10 +247,14 @@ struct interface {
* spec.
*/
struct peer {
- struct peer *next; /* link pointer in peer hash */
- struct peer *ass_next; /* link pointer in associd hash */
+ struct peer *p_link; /* link pointer in free & peer lists */
+ struct peer *adr_link; /* link pointer in address hash */
+ struct peer *aid_link; /* link pointer in associd hash */
struct peer *ilink; /* list of peers for interface */
sockaddr_u srcadr; /* address of remote host */
+ char * hostname; /* if non-NULL, remote name */
+ struct addrinfo *addrs; /* hostname query result */
+ struct addrinfo *ai; /* position within addrs */
endpt * dstadr; /* local address */
associd_t associd; /* association ID */
u_char version; /* version number */
@@ -269,7 +266,8 @@ struct peer {
u_char cast_flags; /* additional flags */
u_char last_event; /* last peer error code */
u_char num_events; /* number of error events */
- u_char ttl; /* ttl/refclock mode */
+ u_int32 ttl; /* ttl/refclock mode */
+ char *ident; /* group identifier name */
/*
* Variables used by reference clock support
@@ -298,7 +296,7 @@ struct peer {
* Variables used by authenticated client
*/
keyid_t keyid; /* current key ID */
-#ifdef OPENSSL
+#ifdef AUTOKEY
#define clear_to_zero opcode
u_int32 opcode; /* last request opcode */
associd_t assoc; /* peer association ID */
@@ -326,9 +324,9 @@ struct peer {
int keynumber; /* current key number */
struct value encrypt; /* send encrypt values */
struct value sndval; /* send autokey values */
-#else /* OPENSSL */
+#else /* !AUTOKEY follows */
#define clear_to_zero status
-#endif /* OPENSSL */
+#endif /* !AUTOKEY */
/*
* Ephemeral state variables
@@ -357,7 +355,7 @@ struct peer {
double jitter; /* peer jitter (squares) */
double disp; /* peer dispersion */
double xleave; /* interleave delay */
- double bias; /* bias for NIC asymmetry */
+ double bias; /* programmed offset bias */
/*
* Variables used to correct for packet length and asymmetry.
@@ -379,8 +377,6 @@ struct peer {
int throttle; /* rate control */
u_long outdate; /* send time last packet */
u_long nextdate; /* send time next packet */
- u_long nextaction; /* peer local activity timeout (refclocks) */
- void (*action) (struct peer *); /* action timeout function */
/*
* Statistic counters
@@ -413,7 +409,7 @@ struct peer {
* function. MODE_CONTROL and MODE_PRIVATE can appear in packets,
* but those never survive to the transition function.
* is a
- */
+/ */
#define MODE_UNSPEC 0 /* unspecified (old version) */
#define MODE_ACTIVE 1 /* symmetric active mode */
#define MODE_PASSIVE 2 /* symmetric passive mode */
@@ -467,19 +463,13 @@ struct peer {
*/
#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 LEN_CLEAR_TO_ZERO(p) (END_CLEAR_TO_ZERO(p) - CLEAR_TO_ZERO(p))
#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 */
@@ -526,7 +516,9 @@ struct peer {
#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 */
+#define REFCLK_TSYNCPCI 45 /* Spectracom TSYNC PCI timing board */
+#define REFCLK_GPSDJSON 46
+#define REFCLK_MAX 46
/*
@@ -564,13 +556,19 @@ struct pkt {
* response, so the maximum total extension field length is 864
* octets. But, to handle humungus certificates, the bank must
* be broke.
+ *
+ * The different definitions of the 'exten' field are here for
+ * the benefit of applications that want to send a packet from
+ * an auto variable in the stack - not using the AUTOKEY version
+ * saves 2KB of stack space. The receive buffer should ALWAYS be
+ * big enough to hold a full extended packet if the extension
+ * fields have to be parsed or skipped.
*/
-#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 */
+#ifdef AUTOKEY
+ u_int32 exten[(NTP_MAXEXTEN + MAX_MAC_LEN) / sizeof(u_int32)];
+#else /* !AUTOKEY follows */
+ u_int32 exten[(MAX_MAC_LEN) / sizeof(u_int32)];
+#endif /* !AUTOKEY */
};
/*
@@ -581,10 +579,11 @@ struct pkt {
#define PKT_LEAP(li_vn_mode) ((u_char)(((li_vn_mode) >> 6) & 0x3))
/*
- * Stuff for putting things back into li_vn_mode
+ * Stuff for putting things back into li_vn_mode in packets and vn_mode
+ * in ntp_monitor.c's mon_entry.
*/
-#define PKT_LI_VN_MODE(li, vn, md) \
- ((u_char)((((li) << 6) & 0xc0) | (((vn) << 3) & 0x38) | ((md) & 0x7)))
+#define VN_MODE(v, m) ((((v) & 7) << 3) | ((m) & 0x7))
+#define PKT_LI_VN_MODE(l, v, m) ((((l) & 3) << 6) | VN_MODE((v), (m)))
/*
@@ -622,7 +621,6 @@ struct pkt {
#define EVNT_KERN 13 /* kernel event */
#define EVNT_TAI 14 /* TAI */
#define EVNT_LEAPVAL 15 /* stale leapsecond values */
-#define EVNT_CLKHOP 16 /* clockhop */
/*
* Peer event codes
@@ -642,7 +640,6 @@ struct pkt {
#define PEVNT_POPCORN (13 | PEER_EVENT) /* popcorn */
#define PEVNT_XLEAVE (14 | PEER_EVENT) /* interleave mode */
#define PEVNT_XERR (15 | PEER_EVENT) /* interleave error */
-#define PEVNT_TAI (16 | PEER_EVENT) /* TAI */
/*
* Clock event codes
@@ -666,9 +663,9 @@ struct pkt {
* To speed lookups, peers are hashed by the low order bits of the
* remote IP address. These definitions relate to that.
*/
-#define NTP_HASH_SIZE 128
-#define NTP_HASH_MASK (NTP_HASH_SIZE-1)
-#define NTP_HASH_ADDR(src) sock_hash(src)
+#define NTP_HASH_SIZE 128
+#define NTP_HASH_MASK (NTP_HASH_SIZE-1)
+#define NTP_HASH_ADDR(src) (sock_hash(src) & NTP_HASH_MASK)
/*
* min, min3 and max. Makes it easier to transliterate the spec without
@@ -704,16 +701,18 @@ struct pkt {
#define PROTO_CALLDELAY 20
#define PROTO_MINDISP 21
#define PROTO_MAXDIST 22
-#define PROTO_ADJ 23
+ /* available 23 */
#define PROTO_MAXHOP 24
#define PROTO_BEACON 25
#define PROTO_ORPHAN 26
+#define PROTO_ORPHWAIT 27
+#define PROTO_MODE7 28
/*
* Configuration items for the loop filter
*/
-#define LOOP_DRIFTINIT 1 /* set initial frequency offset */
-#define LOOP_DRIFTCOMP 2 /* set frequency offset */
+#define LOOP_DRIFTINIT 1 /* iniitialize frequency */
+#define LOOP_KERN_CLEAR 2 /* set initial frequency offset */
#define LOOP_MAX 3 /* set step offset */
#define LOOP_PANIC 4 /* set panic offseet */
#define LOOP_PHI 5 /* set dispersion rate */
@@ -722,9 +721,9 @@ struct pkt {
#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 */
-#define LOOP_KERN_CLEAR 11 /* reset kernel pll parameters */
-#define LOOP_CODEC 12 /* set audio codec frequency */
-#define LOOP_LEAP 13 /* insert leap after second 23:59 */
+#define LOOP_CODEC 11 /* set audio codec frequency */
+#define LOOP_LEAP 12 /* insert leap after second 23:59 */
+#define LOOP_TICK 13 /* sim. low precision clock */
/*
* Configuration items for the stats printer
@@ -744,40 +743,51 @@ struct pkt {
/*
* Structure used optionally for monitoring when this is turned on.
*/
+typedef struct mon_data mon_entry;
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 */
- int flags; /* restrict flags */
- int leak; /* leaky bucket accumulator */
- int count; /* total packet count */
- u_long firsttime; /* first time found */
- u_long lasttime; /* last time found */
- sockaddr_u rmtadr; /* address of remote host */
- struct interface *interface; /* interface on which this arrived */
- u_short rmtport; /* remote port last came from */
- u_char mode; /* packet mode */
- u_char version; /* packet version */
- u_char cast_flags; /* flags MDF_?CAST */
+ mon_entry * hash_next; /* next structure in hash list */
+ DECL_DLIST_LINK(mon_entry, mru);/* MRU list link pointers */
+ struct interface * lcladr; /* address on which this arrived */
+ l_fp first; /* first time seen */
+ l_fp last; /* last time seen */
+ int leak; /* leaky bucket accumulator */
+ int count; /* total packet count */
+ u_short flags; /* restrict flags */
+ u_char vn_mode; /* packet mode & version */
+ u_char cast_flags; /* flags MDF_?CAST */
+ sockaddr_u rmtadr; /* address of remote host */
};
/*
- * Values for cast_flags
+ * Values for cast_flags in mon_entry and struct peer. mon_entry uses
+ * only the first three, MDF_UCAST, MDF_MCAST, and MDF_BCAST.
*/
-#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 */
-
+#define MDF_UCAST 0x01 /* unicast client */
+#define MDF_MCAST 0x02 /* multicast server */
+#define MDF_BCAST 0x04 /* broadcast server */
+#define MDF_POOL 0x08 /* pool client solicitor */
+#define MDF_ACAST 0x10 /* manycast client solicitor */
+#define MDF_BCLNT 0x20 /* eph. broadcast/multicast client */
+#define MDF_UCLNT 0x40 /* preemptible manycast or pool client */
+/*
+ * In the context of struct peer in ntpd, three of the cast_flags bits
+ * represent configured associations which never receive packets, and
+ * whose reach is always 0: MDF_BCAST, MDF_MCAST, and MDF_ACAST. The
+ * last can be argued as responses are received, but those responses do
+ * not affect the MDF_ACAST association's reach register, rather they
+ * (may) result in mobilizing ephemeral MDF_ACLNT associations.
+ */
+#define MDF_TXONLY_MASK (MDF_BCAST | MDF_MCAST | MDF_ACAST | MDF_POOL)
+/*
+ * manycastclient-like solicitor association cast_flags bits
+ */
+#define MDF_SOLICIT_MASK (MDF_ACAST | MDF_POOL)
/*
* 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 */
+#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
*/
@@ -797,6 +807,7 @@ struct restrict_u_tag {
u_int32 count; /* number of packets matched */
u_short flags; /* accesslist flags */
u_short mflags; /* match flags */
+ u_long expire; /* valid until time */
union { /* variant starting here */
res_addr4 v4;
res_addr6 v6;
@@ -807,7 +818,6 @@ struct restrict_u_tag {
#define V6_SIZEOF_RESTRICT_U (offsetof(restrict_u, u) \
+ sizeof(res_addr6))
-
/*
* Access flags
*/
@@ -826,20 +836,23 @@ struct restrict_u_tag {
#define RES_NOTRAP 0x0100 /* mode 6/7 set trap denied */
#define RES_LPTRAP 0x0200 /* mode 6/7 low priority trap */
-#define RES_KOD 0x0400 /* send kiss of death packet */
+#define RES_KOD 0x0400 /* send kiss of death packet */
#define RES_MSSNTP 0x0800 /* enable MS-SNTP authentication */
-#define RES_TIMEOUT 0x1000 /* timeout this entry */
+#define RES_FLAKE 0x1000 /* flakeway - drop 10% */
+#define RES_NOMRULIST 0x2000 /* mode 6 mrulist denied */
-#define RES_ALLFLAGS (RES_FLAGS | RES_NOQUERY |\
- RES_NOMODIFY | RES_NOTRAP |\
- RES_LPTRAP | RES_KOD |\
- RES_MSSNTP | RES_TIMEOUT)
+#define RES_ALLFLAGS (RES_FLAGS | RES_NOQUERY | \
+ RES_NOMODIFY | RES_NOTRAP | \
+ RES_LPTRAP | RES_KOD | \
+ RES_MSSNTP | RES_FLAKE | \
+ RES_NOMRULIST)
/*
* Match flags
*/
#define RESM_INTERFACE 0x1000 /* this is an interface */
-#define RESM_NTPONLY 0x2000 /* match ntp port only */
+#define RESM_NTPONLY 0x2000 /* match source port 123 */
+#define RESM_SOURCE 0x4000 /* from "restrict source" */
/*
* Restriction configuration ops
@@ -847,7 +860,7 @@ struct restrict_u_tag {
#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 */
-#define RESTRICT_REMOVEIF 4 /* remove an interface restrict entry */
+#define RESTRICT_REMOVEIF 4 /* remove an interface restrict entry */
/*
* Endpoint structure for the select algorithm
@@ -865,7 +878,7 @@ struct endpoint {
#define AM_PROCPKT 1 /* server/symmetric packet */
#define AM_BCST 2 /* broadcast packet */
#define AM_FXMIT 3 /* client packet */
-#define AM_MANYCAST 4 /* manycast packet */
+#define AM_MANYCAST 4 /* manycast or pool */
#define AM_NEWPASS 5 /* new passive */
#define AM_NEWBCL 6 /* new broadcast */
#define AM_POSSBCL 7 /* discard broadcast */
@@ -875,4 +888,8 @@ struct endpoint {
#define NETINFO_CONFIG_DIR "/config/ntp"
#endif
+/* ntpq -c mrulist rows per request limit in ntpd */
+#define MRU_ROW_LIMIT 256
+/* similar datagrams per response limit for ntpd */
+#define MRU_FRAGS_LIMIT 128
#endif /* NTP_H */
diff --git a/include/ntp_assert.h b/include/ntp_assert.h
index ab9b41981be6..2f3bbc8a0b9b 100644
--- a/include/ntp_assert.h
+++ b/include/ntp_assert.h
@@ -28,6 +28,7 @@
#define NTP_ASSERT_H
# ifdef CALYSTO
+/* see: http://www.domagoj-babic.com/index.php/ResearchProjects/Calysto */
extern void calysto_assume(unsigned char cnd); /* assume this always holds */
extern void calysto_assert(unsigned char cnd); /* check whether this holds */
@@ -57,7 +58,17 @@ extern void calysto_assert(unsigned char cnd); /* check whether this holds */
#define ALWAYS_ENSURE(x) assert(x)
*/
-# else /* neither Coverity nor Calysto */
+
+#elif defined(__FLEXELINT__)
+
+#include <assert.h>
+
+#define ALWAYS_REQUIRE(x) assert(x)
+#define ALWAYS_INSIST(x) assert(x)
+#define ALWAYS_INVARIANT(x) assert(x)
+#define ALWAYS_ENSURE(x) assert(x)
+
+# else /* neither Calysto, Coverity or FlexeLint */
#include "isc/assertions.h"
@@ -88,10 +99,10 @@ extern void calysto_assert(unsigned char cnd); /* check whether this holds */
#define DEBUG_INVARIANT(x) INVARIANT(x)
#define DEBUG_ENSURE(x) ENSURE(x)
# else
-#define DEBUG_REQUIRE(x) (void)(x)
-#define DEBUG_INSIST(x) (void)(x)
-#define DEBUG_INVARIANT(x) (void)(x)
-#define DEBUG_ENSURE(x) (void)(x)
+#define DEBUG_REQUIRE(x) do {} while (FALSE)
+#define DEBUG_INSIST(x) do {} while (FALSE)
+#define DEBUG_INVARIANT(x) do {} while (FALSE)
+#define DEBUG_ENSURE(x) do {} while (FALSE)
# endif
#endif /* NTP_ASSERT_H */
diff --git a/include/ntp_calendar.h b/include/ntp_calendar.h
index fbdb27c7ab4f..3ee1ff79c806 100644
--- a/include/ntp_calendar.h
+++ b/include/ntp_calendar.h
@@ -4,20 +4,62 @@
#ifndef NTP_CALENDAR_H
#define NTP_CALENDAR_H
+#include <time.h>
+
#include "ntp_types.h"
+/* gregorian calendar date */
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 */
+ uint16_t year; /* year (A.D.) */
+ uint16_t yearday; /* day of year, 1 = January 1 */
+ uint8_t month; /* month, 1 = January */
+ uint8_t monthday; /* day of month */
+ uint8_t hour; /* hour of day, midnight = 0 */
+ uint8_t minute; /* minute of hour */
+ uint8_t second; /* second of minute */
+ uint8_t weekday; /* 0..7, 0=Sunday */
+};
+
+/* ISO week calendar date */
+struct isodate {
+ uint16_t year; /* year (A.D.) */
+ uint8_t week; /* 1..53, week in year */
+ uint8_t weekday; /* 1..7, 1=Monday */
+ uint8_t hour; /* hour of day, midnight = 0 */
+ uint8_t minute; /* minute of hour */
+ uint8_t second; /* second of minute */
};
+/* general split representation */
+typedef struct {
+ int32_t hi;
+ int32_t lo;
+} ntpcal_split;
+
+typedef time_t (*systime_func_ptr)(time_t *);
+
+/*
+ * set the function for getting the system time. This is mostly used for
+ * unit testing to provide a fixed / shifted time stamp. Setting the
+ * value to NULL restores the original function, that is, 'time()',
+ * which is also the automatic default.
+ */
+extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
+
/*
- * Days in each month. 30 days hath September...
+ * days-of-week
+ */
+#define CAL_SUNDAY 0
+#define CAL_MONDAY 1
+#define CAL_TUESDAY 2
+#define CAL_WEDNESDAY 3
+#define CAL_THURSDAY 4
+#define CAL_FRIDAY 5
+#define CAL_SATURDAY 6
+#define CAL_SUNDAY7 7 /* also sunday */
+
+/*
+ * Days in each month. 30 days hath September...
*/
#define JAN 31
#define FEB 28
@@ -34,7 +76,7 @@ struct calendar {
#define DEC 31
/*
- * We deal in a 4 year cycle starting at March 1, 1900. We assume
+ * 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.
*/
@@ -43,17 +85,14 @@ struct calendar {
#define HRSPERDAY (24) /* hours per day */
#define DAYSPERYEAR (365) /* days per year */
-#define SECSPERDAY (SECSPERMIN*MINSPERHR*HRSPERDAY)
+#define SECSPERHR (SECSPERMIN * MINSPERHR)
+#define SECSPERDAY (SECSPERHR * 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
+#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
/*
- * Gross hacks. I have illicit knowlege that there won't be overflows
+ * 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 */
@@ -63,23 +102,270 @@ struct calendar {
+ ((val)<<7) + ((val)<<5) \
+ ((val)<<4) + ((val)<<2) + (val)) /* *big* hack */
+
+extern const char * const months[12];
+extern const char * const daynames[7];
+
+extern void caljulian (uint32_t, struct calendar *);
+extern uint32_t caltontp (const struct calendar *);
+
/*
- * Another big hack. Cycle 22 started on March 1, 1988. This is
- * STARTCYCLE22 seconds after the start of cycle 0.
+ * Convert between 'time_t' and 'vint64'
*/
-#define CYCLE22 (22)
-#define STARTCYCLE22 (u_long)(0xa586b500) /* 2777068800 */
-#define MAR1988 (u_long)(STARTCYCLE22 + (u_long)MAR1900)
+extern vint64 time_to_vint64(const time_t *);
+extern time_t vint64_to_time(const vint64 *);
/*
- * The length of January + February in leap and non-leap years.
+ * Get the build date & time. ATTENTION: The time zone is not specified!
+ * This depends entirely on the C compilers' capabilities to properly
+ * expand the '__TIME__' and '__DATE__' macros, as required by the C
+ * standard.
*/
-#define JANFEBNOLEAP ((JAN+FEB) * SECSPERDAY)
-#define JANFEBLEAP ((JAN+FEBLEAP) * SECSPERDAY)
+extern int
+ntpcal_get_build_date(struct calendar * /* jd */);
+/*
+ * Convert a timestamp in NTP scale to a time_t value in the UN*X
+ * scale with proper epoch unfolding around a given pivot or the
+ * current system time.
+ */
+extern vint64
+ntpcal_ntp_to_time(uint32_t /* ntp */, const time_t * /* pivot */);
+
+/*
+ * Convert a timestamp in NTP scale to a 64bit seconds value in the NTP
+ * scale with proper epoch unfolding around a given pivot or the current
+ * system time.
+ * Note: The pivot must be given in UN*X time scale!
+ */
+extern vint64
+ntpcal_ntp_to_ntp(uint32_t /* ntp */, const time_t * /* pivot */);
+
+/*
+ * Split a time stamp in seconds into elapsed days and elapsed seconds
+ * since midnight.
+ */
+extern ntpcal_split
+ntpcal_daysplit(const vint64 *);
-extern void caljulian (u_long, struct calendar *);
-extern u_long caltontp (const struct calendar *);
+/*
+ * Merge a number of days and a number of seconds into seconds,
+ * expressed in 64 bits to avoid overflow.
+ */
+extern vint64
+ntpcal_dayjoin(int32_t /* days */, int32_t /* seconds */);
+
+/*
+ * Convert elapsed years in Era into elapsed days in Era.
+ */
+extern int32_t
+ntpcal_days_in_years(int32_t /* years */);
+
+/*
+ * Convert a number of elapsed month in a year into elapsed days
+ * in year.
+ *
+ * The month will be normalized, and 'res.hi' will contain the
+ * excessive years that must be considered when converting the years,
+ * while 'res.lo' will contain the days since start of the
+ * year. (Expect the resulting days to be negative, with a positive
+ * excess! But then, we need no leap year flag, either...)
+ */
+extern ntpcal_split
+ntpcal_days_in_months(int32_t /* months */);
+
+/*
+ * Convert ELAPSED years/months/days of gregorian calendar to elapsed
+ * days in Gregorian epoch. No range checks done here!
+ */
+extern int32_t
+ntpcal_edate_to_eradays(int32_t /* years */, int32_t /* months */, int32_t /* mdays */);
+
+/*
+ * Convert a time spec to seconds. No range checks done here!
+ */
+extern int32_t
+ntpcal_etime_to_seconds(int32_t /* hours */, int32_t /* minutes */, int32_t /* seconds */);
+
+/*
+ * Convert ELAPSED years/months/days of gregorian calendar to elapsed
+ * days in year.
+ *
+ * Note: This will give the true difference to the start of the given year,
+ * even if months & days are off-scale.
+ */
+extern int32_t
+ntpcal_edate_to_yeardays(int32_t /* years */, int32_t /* months */, int32_t /* mdays */);
+
+/*
+ * Convert the date part of a 'struct tm' (that is, year, month,
+ * day-of-month) into the RataDie of that day.
+ */
+extern int32_t
+ntpcal_tm_to_rd(const struct tm * /* utm */);
+
+/*
+ * Convert the date part of a 'struct calendar' (that is, year, month,
+ * day-of-month) into the RataDie of that day.
+ */
+extern int32_t
+ntpcal_date_to_rd(const struct calendar * /* jt */);
+
+/*
+ * Given the number of elapsed days in the calendar era, split this
+ * number into the number of elapsed years in 'res.quot' and the
+ * number of elapsed days of that year in 'res.rem'.
+ *
+ * if 'isleapyear' is not NULL, it will receive an integer that is 0
+ * for regular years and a non-zero value for leap years.
+ */
+extern ntpcal_split
+ntpcal_split_eradays(int32_t /* days */, int/*BOOL*/ * /* isleapyear */);
+
+/*
+ * Given a number of elapsed days in a year and a leap year indicator,
+ * split the number of elapsed days into the number of elapsed months
+ * in 'res.quot' and the number of elapsed days of that month in
+ * 'res.rem'.
+ */
+extern ntpcal_split
+ntpcal_split_yeardays(int32_t /* eyd */, int/*BOOL*/ /* isleapyear */);
+
+/*
+ * Convert a RataDie number into the date part of a 'struct
+ * calendar'. Return 0 if the year is regular year, !0 if the year is
+ * a leap year.
+ */
+extern int/*BOOL*/
+ntpcal_rd_to_date(struct calendar * /* jt */, int32_t /* rd */);
+
+/*
+ * Convert a RataDie number into the date part of a 'struct
+ * tm'. Return 0 if the year is regular year, !0 if the year is a leap
+ * year.
+ */
+extern int/*BOOL*/
+ntpcal_rd_to_tm(struct tm * /* utm */, int32_t /* rd */);
+
+/*
+ * Take a value of seconds since midnight and split it into hhmmss in
+ * a 'struct calendar'. Return excessive days.
+ */
+extern int32_t
+ntpcal_daysec_to_date(struct calendar * /* jt */, int32_t /* secs */);
+
+/*
+ * Take the time part of a 'struct calendar' and return the seconds
+ * since midnight.
+ */
+extern int32_t
+ntpcal_date_to_daysec(const struct calendar *);
+
+/*
+ * Take a value of seconds since midnight and split it into hhmmss in
+ * a 'struct tm'. Return excessive days.
+ */
+extern int32_t
+ntpcal_daysec_to_tm(struct tm * /* utm */, int32_t /* secs */);
+
+extern int32_t
+ntpcal_tm_to_daysec(const struct tm * /* utm */);
+
+/*
+ * convert a year number to rata die of year start
+ */
+extern int32_t
+ntpcal_year_to_ystart(int32_t /* year */);
+
+/*
+ * For a given RataDie, get the RataDie of the associated year start,
+ * that is, the RataDie of the last January,1st on or before that day.
+ */
+extern int32_t
+ntpcal_rd_to_ystart(int32_t /* rd */);
+
+/*
+ * convert a RataDie to the RataDie of start of the calendar month.
+ */
+extern int32_t
+ntpcal_rd_to_mstart(int32_t /* year */);
+
+
+extern int
+ntpcal_daysplit_to_date(struct calendar * /* jt */,
+ const ntpcal_split * /* ds */, int32_t /* dof */);
+
+extern int
+ntpcal_daysplit_to_tm(struct tm * /* utm */, const ntpcal_split * /* ds */,
+ int32_t /* dof */);
+
+extern int
+ntpcal_time_to_date(struct calendar * /* jd */, const vint64 * /* ts */);
+
+extern int32_t
+ntpcal_periodic_extend(int32_t /* pivot */, int32_t /* value */,
+ int32_t /* cycle */);
+
+extern int
+ntpcal_ntp64_to_date(struct calendar * /* jd */, const vint64 * /* ntp */);
+
+extern int
+ntpcal_ntp_to_date(struct calendar * /* jd */, uint32_t /* ntp */,
+ const time_t * /* pivot */);
+
+extern vint64
+ntpcal_date_to_ntp64(const struct calendar * /* jd */);
+
+extern uint32_t
+ntpcal_date_to_ntp(const struct calendar * /* jd */);
+
+extern time_t
+ntpcal_date_to_time(const struct calendar * /* jd */);
+
+/*
+ * ISO week-calendar conversions
+ */
+extern int32_t
+isocal_weeks_in_years(int32_t /* years */);
+
+extern ntpcal_split
+isocal_split_eraweeks(int32_t /* weeks */);
+
+extern int
+isocal_ntp64_to_date(struct isodate * /* id */, const vint64 * /* ntp */);
+
+extern int
+isocal_ntp_to_date(struct isodate * /* id */, uint32_t /* ntp */,
+ const time_t * /* pivot */);
+
+extern vint64
+isocal_date_to_ntp64(const struct isodate * /* id */);
+
+extern uint32_t
+isocal_date_to_ntp(const struct isodate * /* id */);
+
+
+/*
+ * day-of-week calculations
+ *
+ * Given a RataDie and a day-of-week, calculate a RDN that is reater-than,
+ * greater-or equal, closest, less-or-equal or less-than the given RDN
+ * and denotes the given day-of-week
+ */
+extern int32_t
+ntpcal_weekday_gt(int32_t /* rdn */, int32_t /* dow */);
+
+extern int32_t
+ntpcal_weekday_ge(int32_t /* rdn */, int32_t /* dow */);
+
+extern int32_t
+ntpcal_weekday_close(int32_t /* rdn */, int32_t /* dow */);
+
+extern int32_t
+ntpcal_weekday_le(int32_t /* rdn */, int32_t /* dow */);
+
+extern int32_t
+ntpcal_weekday_lt(int32_t /* rdn */, int32_t /* dow */);
/*
* Additional support stuff for Ed Rheingold's calendrical calculations
@@ -90,22 +376,40 @@ extern u_long caltontp (const struct calendar *);
* (This is the beginning of the Christian Era, or BCE.)
*/
#define DAY_NTP_STARTS 693596
+
+/*
+ * Start day of the UNIX epoch. This is the Rata Die of 1970-01-01.
+ */
+#define DAY_UNIX_STARTS 719163
+
+/*
+ * Difference between UN*X and NTP epoch (25567).
+ */
+#define NTP_TO_UNIX_DAYS (DAY_UNIX_STARTS - DAY_NTP_STARTS)
+
+/*
+ * Days in a normal 4 year leap year calendar cycle (1461).
+ */
+#define GREGORIAN_NORMAL_LEAP_CYCLE_DAYS (3 * 365 + 366)
+
/*
- * The Gregorian calendar is based on a 400 year cycle. This is the number
- * of days in each cycle.
+ * Days in a normal 100 year leap year calendar (36524). We lose a
+ * leap day in years evenly divisible by 100 but not by 400.
*/
-#define GREGORIAN_CYCLE_DAYS 146097
+#define GREGORIAN_NORMAL_CENTURY_DAYS \
+ (25 * GREGORIAN_NORMAL_LEAP_CYCLE_DAYS - 1)
/*
- * 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.
+ * The Gregorian calendar is based on a 400 year cycle. This is the
+ * number of days in each cycle (146097). We gain a leap day in years
+ * divisible by 400 relative to the "normal" century.
*/
-#define GREGORIAN_NORMAL_CENTURY_DAYS 36524
+#define GREGORIAN_CYCLE_DAYS (4 * GREGORIAN_NORMAL_CENTURY_DAYS + 1)
/*
- * Days in a normal 4 year leap year calendar cycle.
+ * Number of weeks in 400 years (20871).
*/
-#define GREGORIAN_NORMAL_LEAP_CYCLE_DAYS 1461
+#define GREGORIAN_CYCLE_WEEKS (GREGORIAN_CYCLE_DAYS / 7)
#define is_leapyear(y) (!((y) % 4) && !(!((y) % 100) && (y) % 400))
diff --git a/include/ntp_cmdargs.h b/include/ntp_cmdargs.h
index ee41b4a56c33..de45d8d5e5fa 100644
--- a/include/ntp_cmdargs.h
+++ b/include/ntp_cmdargs.h
@@ -1,4 +1 @@
-#include "ntp_types.h"
-
-extern void getstartup (int, char **);
-extern void getCmdOpts (int, char **);
+extern void getCmdOpts(int, char **);
diff --git a/include/ntp_config.h b/include/ntp_config.h
index 037ed0733c3e..900688cef4ee 100644
--- a/include/ntp_config.h
+++ b/include/ntp_config.h
@@ -1,8 +1,11 @@
#ifndef NTP_CONFIG_H
#define NTP_CONFIG_H
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif /* HAVE_SYS_RESOURCE_H */
+
#include "ntp_machine.h"
-#include "ntp_data_structures.h"
#include "ntpsim.h"
@@ -19,28 +22,6 @@
# endif /* SYS_WINNT */
#endif /* not CONFIG_FILE */
-#ifdef HAVE_IPTOS_SUPPORT
-/*
- * "qos" modified keywords
- */
-#define CONF_QOS_LOWDELAY 1
-#define CONF_QOS_THROUGHPUT 2
-#define CONF_QOS_RELIABILITY 3
-#define CONF_QOS_MINCOST 4
-
-#ifdef IPTOS_PREC_INTERNETCONTROL
-#define CONF_QOS_CS0 5
-#define CONF_QOS_CS1 6
-#define CONF_QOS_CS2 7
-#define CONF_QOS_CS3 8
-#define CONF_QOS_CS4 9
-#define CONF_QOS_CS5 10
-#define CONF_QOS_CS6 11
-#define CONF_QOS_CS7 12
-#endif /* IPTOS_PREC_INTERNETCONTROL */
-
-#endif /* HAVE_IPTOS_SUPPORT */
-
/*
* We keep config trees around for possible saveconfig use. When
@@ -61,132 +42,203 @@
#define CONF_SOURCE_FILE 0
#define CONF_SOURCE_NTPQ 1
+/* list of servers from command line for config_peers() */
+extern int cmdline_server_count;
+extern char ** cmdline_servers;
+
+/* set to zero if admin doesn't want memory locked */
+extern int do_memlock;
+
+typedef struct int_range_tag {
+ int first;
+ int last;
+} int_range;
/* Structure for storing an attribute-value pair */
-struct attr_val {
- int attr;
- union val {
- double d;
- int i;
- u_int u;
- char * s;
- void * p;
- } value;
- int type;
+typedef struct attr_val_tag attr_val;
+struct attr_val_tag {
+ attr_val * link;
+ int attr;
+ int type; /* T_String, T_Integer, ... */
+ union val {
+ int i;
+ u_int u;
+ int_range r;
+ double d;
+ char * s;
+ } value;
};
+typedef DECL_FIFO_ANCHOR(attr_val) attr_val_fifo;
+
/* Structure for nodes on the syntax tree */
-struct address_node {
- char *address;
- int type;
+typedef struct address_node_tag address_node;
+struct address_node_tag {
+ address_node * link;
+ char * address;
+ u_short type; /* family, AF_UNSPEC (0), AF_INET[6] */
};
-struct restrict_node {
- struct address_node *addr;
- struct address_node *mask;
- queue *flags;
- int line_no;
+typedef DECL_FIFO_ANCHOR(address_node) address_fifo;
+
+typedef struct int_node_tag int_node;
+struct int_node_tag {
+ int_node * link;
+ int i;
};
-struct peer_node {
- int host_mode;
- struct address_node *addr;
- queue *peerflags;
- int minpoll;
- int maxpoll;
- int ttl;
- int peerversion;
- int peerkey;
- double bias;
+typedef DECL_FIFO_ANCHOR(int_node) int_fifo;
+
+typedef struct string_node_tag string_node;
+struct string_node_tag {
+ string_node * link;
+ char * s;
};
-struct unpeer_node {
- u_int assocID;
- struct address_node * addr;
+typedef DECL_FIFO_ANCHOR(string_node) string_fifo;
+
+typedef struct restrict_node_tag restrict_node;
+struct restrict_node_tag {
+ restrict_node * link;
+ address_node * addr;
+ address_node * mask;
+ int_fifo * flags;
+ int line_no;
};
-struct auth_node {
- int control_key;
- int cryptosw;
- queue *crypto_cmd_list;
- char *keys;
- char *keysdir;
- int request_key;
- int revoke;
- queue *trusted_key_list;
- char *ntp_signd_socket;
+typedef DECL_FIFO_ANCHOR(restrict_node) restrict_fifo;
+
+typedef struct peer_node_tag peer_node;
+struct peer_node_tag {
+ peer_node * link;
+ int host_mode;
+ address_node * addr;
+ attr_val_fifo * peerflags;
+ u_char minpoll;
+ u_char maxpoll;
+ u_int32 ttl;
+ u_char peerversion;
+ keyid_t peerkey;
+ char * group;
+};
+
+typedef DECL_FIFO_ANCHOR(peer_node) peer_fifo;
+
+typedef struct unpeer_node_tag unpeer_node;
+struct unpeer_node_tag {
+ unpeer_node * link;
+ associd_t assocID;
+ address_node * addr;
};
-struct filegen_node {
- int filegen_token;
- queue * options;
+typedef DECL_FIFO_ANCHOR(unpeer_node) unpeer_fifo;
+
+typedef struct auth_node_tag auth_node;
+struct auth_node_tag {
+ int control_key;
+ int cryptosw;
+ attr_val_fifo * crypto_cmd_list;
+ char * keys;
+ char * keysdir;
+ int request_key;
+ int revoke;
+ attr_val_fifo * trusted_key_list;
+ char * ntp_signd_socket;
};
-struct setvar_node {
- char * var;
- char * val;
- int isdefault;
+typedef struct filegen_node_tag filegen_node;
+struct filegen_node_tag {
+ filegen_node * link;
+ int filegen_token;
+ attr_val_fifo * options;
};
-typedef struct nic_rule_node_tag {
- int match_class;
- char *if_name; /* interface name or numeric address */
- int action;
-} nic_rule_node;
+typedef DECL_FIFO_ANCHOR(filegen_node) filegen_fifo;
-struct addr_opts_node {
- struct address_node *addr;
- queue *options;
+typedef struct setvar_node_tag setvar_node;
+struct setvar_node_tag {
+ setvar_node * link;
+ char * var;
+ char * val;
+ int isdefault;
};
-struct sim_node {
- queue *init_opts;
- queue *servers;
+typedef DECL_FIFO_ANCHOR(setvar_node) setvar_fifo;
+
+typedef struct nic_rule_node_tag nic_rule_node;
+struct nic_rule_node_tag {
+ nic_rule_node * link;
+ int match_class;
+ char * if_name; /* or numeric address */
+ int action;
+};
+
+typedef DECL_FIFO_ANCHOR(nic_rule_node) nic_rule_fifo;
+
+typedef struct addr_opts_node_tag addr_opts_node;
+struct addr_opts_node_tag {
+ addr_opts_node *link;
+ address_node * addr;
+ attr_val_fifo * options;
+};
+
+typedef DECL_FIFO_ANCHOR(addr_opts_node) addr_opts_fifo;
+
+typedef struct sim_node_tag sim_node;
+struct sim_node_tag {
+ sim_node * link;
+ attr_val_fifo * init_opts;
+ server_info_fifo * servers;
};
+typedef DECL_FIFO_ANCHOR(sim_node) sim_fifo;
/* The syntax tree */
-struct config_tree {
- struct config_tree *link;
-
- struct attr_val source;
- time_t timestamp;
-
- queue *peers;
- queue *unpeers;
-
- /* Other Modes */
- int broadcastclient;
- queue *manycastserver;
- queue *multicastclient;
-
- queue *orphan_cmds;
-
- /* Monitoring Configuration */
- queue *stats_list;
- char *stats_dir;
- queue *filegen_opts;
-
- /* Access Control Configuration */
- queue *discard_opts;
- queue *restrict_opts;
-
- queue *fudge;
- queue *tinker;
- queue *enable_opts;
- queue *disable_opts;
- struct auth_node auth;
-
- queue *logconfig;
- queue *qos;
- queue *phone;
- queue *setvar;
- queue *ttl;
- queue *trap;
- queue *vars;
- queue *nic_rules;
-
- struct sim_node *sim_details;
+typedef struct config_tree_tag config_tree;
+struct config_tree_tag {
+ config_tree * link;
+
+ attr_val source;
+ time_t timestamp;
+
+ peer_fifo * peers;
+ unpeer_fifo * unpeers;
+
+ /* Other Modes */
+ int broadcastclient;
+ address_fifo * manycastserver;
+ address_fifo * multicastclient;
+
+ attr_val_fifo * orphan_cmds; /* s/b renamed tos_options */
+
+ /* Monitoring Configuration */
+ int_fifo * stats_list;
+ char * stats_dir;
+ filegen_fifo * filegen_opts;
+
+ /* Access Control Configuration */
+ attr_val_fifo * discard_opts;
+ attr_val_fifo * mru_opts;
+ restrict_fifo * restrict_opts;
+
+ addr_opts_fifo *fudge;
+ attr_val_fifo * rlimit;
+ attr_val_fifo * tinker;
+ attr_val_fifo * enable_opts;
+ attr_val_fifo * disable_opts;
+
+ auth_node auth;
+
+ attr_val_fifo * logconfig;
+ string_fifo * phone;
+ setvar_fifo * setvar;
+ int_fifo * ttl;
+ addr_opts_fifo *trap;
+ attr_val_fifo * vars;
+ nic_rule_fifo * nic_rules;
+ int_fifo * reset_counters;
+
+ sim_fifo * sim_details;
};
@@ -199,47 +251,72 @@ struct REMOTE_CONFIG_INFO {
int no_errors;
};
+
+/*
+ * context for trap_name_resolved() to call ctlsettrap() once the
+ * name->address resolution completes.
+ */
+typedef struct settrap_parms_tag {
+ sockaddr_u ifaddr;
+ int ifaddr_nonnull;
+} settrap_parms;
+
+
/* get text from T_ tokens */
const char * token_name(int token);
-struct peer_node *create_peer_node(int hmode,
- struct address_node *addr,
- queue *options);
-struct unpeer_node *create_unpeer_node(struct address_node *addr);
-struct address_node *create_address_node(char *addr, int type);
-void destroy_address_node(struct address_node *my_node);
-queue *enqueue_in_new_queue(void *my_node);
-struct attr_val *create_attr_dval(int attr, double value);
-struct attr_val *create_attr_ival(int attr, int value);
-struct attr_val *create_attr_shorts(int, ntp_u_int16_t, ntp_u_int16_t);
-struct attr_val *create_attr_sval(int attr, char *s);
-struct attr_val *create_attr_pval(int attr, void *s);
-struct filegen_node *create_filegen_node(int filegen_token, queue *options);
-void **create_pval(void *val);
-struct restrict_node *create_restrict_node(struct address_node *addr,
- struct address_node *mask,
- queue *flags, int line_no);
-int *create_ival(int val);
-struct addr_opts_node *create_addr_opts_node(struct address_node *addr,
- queue *options);
-struct sim_node *create_sim_node(queue *init_opts, queue *servers);
-struct setvar_node *create_setvar_node(char *var, char *val,
- int isdefault);
+/* generic fifo routines for structs linked by 1st member */
+void* append_gen_fifo(void *fifo, void *entry);
+void * concat_gen_fifos(void *first, void *second);
+#define APPEND_G_FIFO(pf, pe) \
+ ((pf) = append_gen_fifo((pf), (pe)))
+#define CONCAT_G_FIFOS(first, second) \
+ ((first) = concat_gen_fifos((first), (second)))
+#define HEAD_PFIFO(pf) \
+ (((pf) != NULL) \
+ ? HEAD_FIFO(*(pf)) \
+ : NULL)
+
+peer_node *create_peer_node(int hmode, address_node *addr,
+ attr_val_fifo *options);
+unpeer_node *create_unpeer_node(address_node *addr);
+address_node *create_address_node(char *addr, int type);
+void destroy_address_node(address_node *my_node);
+attr_val *create_attr_dval(int attr, double value);
+attr_val *create_attr_ival(int attr, int value);
+attr_val *create_attr_uval(int attr, u_int value);
+attr_val *create_attr_rangeval(int attr, int first, int last);
+attr_val *create_attr_sval(int attr, char *s);
+filegen_node *create_filegen_node(int filegen_token,
+ attr_val_fifo *options);
+string_node *create_string_node(char *str);
+restrict_node *create_restrict_node(address_node *addr,
+ address_node *mask,
+ int_fifo *flags, int line_no);
+int_node *create_int_node(int val);
+addr_opts_node *create_addr_opts_node(address_node *addr,
+ attr_val_fifo *options);
+sim_node *create_sim_node(attr_val_fifo *init_opts,
+ server_info_fifo *servers);
+setvar_node *create_setvar_node(char *var, char *val, int isdefault);
nic_rule_node *create_nic_rule_node(int match_class, char *if_name,
int action);
script_info *create_sim_script_info(double duration,
- queue *script_queue);
-server_info *create_sim_server(struct address_node *addr,
- double server_offset, queue *script);
+ attr_val_fifo *script_queue);
+server_info *create_sim_server(address_node *addr, double server_offset,
+ script_info_fifo *script);
extern struct REMOTE_CONFIG_INFO remote_config;
void config_remotely(sockaddr_u *);
#ifdef SAVECONFIG
-int dump_config_tree(struct config_tree *ptree, FILE *df, int comment);
+int dump_config_tree(config_tree *ptree, FILE *df, int comment);
int dump_all_config_trees(FILE *df, int comment);
#endif
+#if defined(HAVE_SETRLIMIT)
+void ntp_rlimit(int, rlim_t, int, char *);
+#endif
#endif /* !defined(NTP_CONFIG_H) */
diff --git a/include/ntp_control.h b/include/ntp_control.h
index 3bca32b6e5b1..be5b16d80ead 100644
--- a/include/ntp_control.h
+++ b/include/ntp_control.h
@@ -4,6 +4,11 @@
#include "ntp_types.h"
+typedef union ctl_pkt_u_tag {
+ u_char data[480 + MAX_MAC_LEN]; /* data + auth */
+ u_int32 u32[(480 + MAX_MAC_LEN) / sizeof(u_int32)];
+} ctl_pkt_u;
+
struct ntp_control {
u_char li_vn_mode; /* leap, version, mode */
u_char r_m_e_op; /* response, more, error, opcode */
@@ -12,13 +17,13 @@ struct ntp_control {
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 */
+ ctl_pkt_u u;
};
/*
* Length of the control header, in octets
*/
-#define CTL_HEADER_LEN (offsetof(struct ntp_control, data))
+#define CTL_HEADER_LEN (offsetof(struct ntp_control, u))
#define CTL_MAX_DATA_LEN 468
@@ -37,10 +42,10 @@ struct ntp_control {
#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)
+#define CTL_ISRESPONSE(r_m_e_op) ((CTL_RESPONSE & (r_m_e_op)) != 0)
+#define CTL_ISMORE(r_m_e_op) ((CTL_MORE & (r_m_e_op)) != 0)
+#define CTL_ISERROR(r_m_e_op) ((CTL_ERROR & (r_m_e_op)) != 0)
+#define CTL_OP(r_m_e_op) (CTL_OP_MASK & (r_m_e_op))
/*
* Opcodes
@@ -55,6 +60,9 @@ struct ntp_control {
#define CTL_OP_ASYNCMSG 7 /* asynchronous message */
#define CTL_OP_CONFIGURE 8 /* runtime configuration */
#define CTL_OP_SAVECONFIG 9 /* save config to file */
+#define CTL_OP_READ_MRU 10 /* retrieve MRU (mrulist) */
+#define CTL_OP_READ_ORDLIST_A 11 /* ordered list req. auth. */
+#define CTL_OP_REQ_NONCE 12 /* request a client nonce */
#define CTL_OP_UNSETTRAP 31 /* unset trap */
/*
@@ -144,121 +152,6 @@ struct ntp_control {
/*
- * 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_OFFSET 10
-#define CS_DRIFT 11
-#define CS_JITTER 12
-#define CS_ERROR 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
-#define CS_TAI 20
-#define CS_LEAPTAB 21
-#define CS_LEAPEND 22
-#define CS_RATE 23
-#ifdef OPENSSL
-#define CS_FLAGS 24
-#define CS_HOST 25
-#define CS_PUBLIC 26
-#define CS_CERTIF 27
-#define CS_SIGNATURE 28
-#define CS_REVTIME 29
-#define CS_GROUP 30
-#define CS_DIGEST 31
-#define CS_MAXCODE CS_DIGEST
-#else
-#define CS_MAXCODE CS_RATE
-#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_UNREACH 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_VARLIST 37
-#define CP_IN 38
-#define CP_OUT 39
-#define CP_RATE 40
-#define CP_BIAS 41
-#ifdef OPENSSL
-#define CP_FLAGS 42
-#define CP_HOST 43
-#define CP_VALID 44
-#define CP_INITSEQ 45
-#define CP_INITKEY 46
-#define CP_INITTSP 47
-#define CP_SIGNATURE 48
-#define CP_MAXCODE CP_SIGNATURE
-#else
-#define CP_MAXCODE CP_BIAS
-#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.
*/
@@ -273,7 +166,7 @@ struct ctl_trap {
u_char tr_flags; /* trap flags */
u_char tr_version; /* version number of trapper */
};
-extern struct ctl_trap ctl_trap[];
+extern struct ctl_trap ctl_traps[CTL_MAXTRAPS];
/*
* Flag bits
@@ -289,3 +182,11 @@ extern struct ctl_trap ctl_trap[];
#define TYPE_SYS 1
#define TYPE_PEER 2
#define TYPE_CLOCK 3
+
+/*
+ * IFSTATS_FIELDS is the number of fields ntpd supplies for each ifstats
+ * row. Similarly RESLIST_FIELDS for reslist.
+ */
+#define IFSTATS_FIELDS 12
+#define RESLIST_FIELDS 4
+
diff --git a/include/ntp_crypto.h b/include/ntp_crypto.h
index 80e3fb11a8f1..b801006144dc 100644
--- a/include/ntp_crypto.h
+++ b/include/ntp_crypto.h
@@ -5,22 +5,28 @@
#define NTP_CRYPTO_H
/*
- * Configuration codes (also needed for parser without OPENSSL)
+ * Configuration codes (also needed for parser without AUTOKEY)
*/
#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_PRIV 1 /* host name */
+#define CRYPTO_CONF_IDENT 2 /* group name */
#define CRYPTO_CONF_CERT 3 /* certificate file name */
#define CRYPTO_CONF_RAND 4 /* random seed file name */
#define CRYPTO_CONF_IFFPAR 5 /* IFF parameters file name */
#define CRYPTO_CONF_GQPAR 6 /* GQ parameters file name */
#define CRYPTO_CONF_MVPAR 7 /* MV parameters file name */
#define CRYPTO_CONF_PW 8 /* private key password */
-#define CRYPTO_CONF_IDENT 9 /* specify identity scheme */
-#define CRYPTO_CONF_NID 10 /* specify digest name */
+#define CRYPTO_CONF_NID 9 /* specify digest name */
+
+#ifdef AUTOKEY
+#ifndef OPENSSL
+#error AUTOKEY should be defined only if OPENSSL is.
+invalidsyntax: AUTOKEY should be defined only if OPENSSL is.
+#endif
-#ifdef OPENSSL
#include "openssl/evp.h"
+#include "ntp_calendar.h" /* for fields in the cert_info structure */
+
/*
* The following bits are set by the CRYPTO_ASSOC message from
@@ -124,7 +130,7 @@ struct value { /* network byte order */
tstamp_t tstamp; /* timestamp */
tstamp_t fstamp; /* filestamp */
u_int32 vallen; /* value length */
- u_char *ptr; /* data pointer (various) */
+ void *ptr; /* data pointer (various) */
u_int32 siglen; /* signature length */
u_char *sig; /* signature */
};
@@ -142,6 +148,7 @@ struct exten {
u_int32 pkt[1]; /* start of value field */
};
+
/*
* The certificate info/value structure
*/
@@ -153,8 +160,8 @@ struct cert_info {
int nid; /* signature/digest ID */
const EVP_MD *digest; /* message digest algorithm */
u_long serial; /* serial number */
- tstamp_t first; /* not valid before */
- tstamp_t last; /* not valid after */
+ struct calendar first; /* not valid before */
+ struct calendar last; /* not valid after */
char *subject; /* subject common name */
char *issuer; /* issuer common name */
BIGNUM *grpkey; /* GQ group key */
@@ -179,5 +186,5 @@ extern int crypto_nid; /* digest nid */
extern struct value hostval; /* host name/value */
extern struct cert_info *cinfo; /* host certificate information */
extern struct value tai_leap; /* leapseconds table */
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#endif /* NTP_CRYPTO_H */
diff --git a/include/ntp_data_structures.h b/include/ntp_data_structures.h
deleted file mode 100644
index 363e0b47a4e9..000000000000
--- a/include/ntp_data_structures.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ntp_data_structures.h
- *
- * This file contains the structures and function prototypes for the data
- * structures used by the ntp configuration code and the discrete event
- * simulator.
- *
- * Written By: Sachin Kamboj
- * University of Delaware
- * Newark, DE 19711
- * Copyright (c) 2006
- */
-
-#ifndef __NTP_DATA_STRUCTURES_H__
-#define __NTP_DATA_STRUCTURES_H__
-
-
-/* Structures for storing a priority queue
- * ---------------------------------------
- */
-
-typedef struct node {
- union {
- struct node *next;
- double d;
- } nodeu;
-} node;
-#define node_next nodeu.next
-
-typedef struct Queue {
- int (*get_order)(void *, void *);
- node *front;
- int no_of_elements;
-} queue;
-
-
-/* FUNCTION PROTOTYPES
- * -------------------
- */
-queue *create_priority_queue(int (*get_order)(void *, void *));
-void destroy_queue(queue *my_queue);
-void *get_node(size_t size);
-void free_node(void *my_node);
-void *next_node(void *my_node);
-int empty(queue *my_queue);
-void *queue_head(queue *my_queue);
-queue *enqueue(queue *my_queue, void *my_node);
-void *dequeue(queue *my_queue);
-int get_no_of_elements(queue *my_queue);
-void append_queue(queue *q1, queue *q2);
-int get_fifo_order(void *el1, void *el2);
-queue *create_queue(void);
-
-#endif
diff --git a/include/ntp_debug.h b/include/ntp_debug.h
index 55b2e1a76d8e..b0e846e0b375 100644
--- a/include/ntp_debug.h
+++ b/include/ntp_debug.h
@@ -9,20 +9,19 @@
#define NTP_DEBUG_H
/*
- * macros for debugging output - cut down on #ifdef pollution in the code
+ * macro for debugging output - cut down on #ifdef pollution.
+ *
+ * TRACE() is similar to ntpd's DPRINTF() for utilities and libntp.
+ * Uses mprintf() and so supports %m, replaced by strerror(errno).
+ *
+ * The calling convention is not attractive:
+ * TRACE(debuglevel, (fmt, ...));
+ * TRACE(2, ("this will appear on stdout if debug >= %d\n", 2));
*/
-
-#ifdef DEBUG
-#define DPRINTF(_lvl_, _arg_) \
+#define TRACE(lvl, arg) \
do { \
- if (debug >= (_lvl_)) \
- printf _arg_; \
+ if (debug >= (lvl)) \
+ mprintf arg; \
} while (0)
-#else
-#define DPRINTF(_lvl_, _arg_) do {} while (0)
-#endif
-#endif
-/*
- * $Log$
- */
+#endif /* NTP_DEBUG_H */
diff --git a/include/ntp_filegen.h b/include/ntp_filegen.h
index 2b90db29dde3..f5ba8afe9ed8 100644
--- a/include/ntp_filegen.h
+++ b/include/ntp_filegen.h
@@ -5,7 +5,7 @@
*
*
* Copyright (C) 1992, 1996 by Rainer Pruy
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* This code may be modified and used freely
* provided the credits remain intact.
@@ -23,7 +23,7 @@
#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 */
+#define FILEGEN_AGE 6 /* change filegen each FG_AGE_SECS */
/*
* supported file generation flags
@@ -31,22 +31,24 @@
#define FGEN_FLAG_LINK 0x01 /* make a link to base name */
-#define FGEN_FLAG_ENABLED 0x80 /* set this to really create files */
+#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 */
- const 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 (FILEGEN *, u_long);
-extern void filegen_config (FILEGEN *, const char *, u_int, u_int);
+typedef struct filegen_tag {
+ FILE * fp; /* file referring to current generation */
+ char * dir; /* currently always statsdir */
+ char * fname; /* filename prefix of generation file */
+ /* must be malloced, will be fed to free() */
+ u_long id_lo; /* lower bound of ident value */
+ u_long id_hi; /* upper bound of ident value */
+ u_char type; /* type of file generation */
+ u_char flag; /* flags modifying processing of file generation */
+} FILEGEN;
+
+extern void filegen_setup (FILEGEN *, u_int32);
+extern void filegen_config (FILEGEN *, const char *, const char *,
+ u_int, u_int);
+extern void filegen_statsdir(void);
extern FILEGEN *filegen_get (const char *);
extern void filegen_register (const char *, const char *, FILEGEN *);
#ifdef DEBUG
diff --git a/include/ntp_fp.h b/include/ntp_fp.h
index 99d4df37025f..1b97e8b5cf72 100644
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -32,16 +32,11 @@ typedef struct {
u_int32 Xl_ui;
int32 Xl_i;
} Ul_i;
- union {
- u_int32 Xl_uf;
- int32 Xl_f;
- } Ul_f;
+ u_int32 l_uf;
} 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
@@ -78,25 +73,32 @@ typedef u_int32 u_fp;
* 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) = htonl(hi); (nf) = htonl(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)
+
+#define NTOHL_MFP(ni, nf, hi, hf) \
+ do { \
+ (hi) = ntohl(ni); \
+ (hf) = ntohl(nf); \
+ } while (FALSE)
+
+#define HTONL_MFP(hi, hf, ni, nf) \
+ do { \
+ (ni) = htonl(hi); \
+ (nf) = htonl(hf); \
+ } while (FALSE)
+
+#define HTONL_FP(h, n) \
+ HTONL_MFP((h)->l_ui, (h)->l_uf, (n)->l_ui, (n)->l_uf)
+
+#define NTOHL_FP(n, h) \
+ NTOHL_MFP((n)->l_ui, (n)->l_uf, (h)->l_ui, (h)->l_uf)
+
+/* Convert unsigned ts fraction to net order ts */
+#define HTONL_UF(uf, nts) \
+ do { \
+ (nts)->l_ui = 0; \
+ (nts)->l_uf = htonl(uf); \
+ } while (FALSE)
/*
* Conversions between the two fixed point types
@@ -104,13 +106,13 @@ typedef u_int32 u_fp;
#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 LFPTOFP(v) MFPTOFP((v)->l_i, (v)->l_uf)
#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)
+#define MAXLFP(v) ((v)->l_ui = 0x7fffffffu, (v)->l_uf = 0xffffffffu)
+#define MINLFP(v) ((v)->l_ui = 0x80000000u, (v)->l_uf = 0u)
/*
* Primitive operations on long fixed point values. If these are
@@ -120,123 +122,68 @@ typedef u_int32 u_fp;
*/
#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)
+ (v_f) = ~(v_f) + 1u; \
+ (v_i) = ~(v_i) + ((v_f) == 0); \
+ } while (FALSE)
#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)
+ (r_f) = ~(a_f) + 1u; \
+ (r_i) = ~(a_i) + ((r_f) == 0); \
+ } while (FALSE)
#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)
+ u_int32 add_t = (r_f); \
+ (r_f) += (a_f); \
+ (r_i) += (a_i) + ((u_int32)(r_f) < add_t); \
+ } while (FALSE)
-#define M_ADD3(r_ovr, r_i, r_f, a_ovr, a_i, a_f) /* r += a, three word */ \
+#define M_ADD3(r_o, r_i, r_f, a_o, 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)
+ u_int32 add_t, add_c; \
+ add_t = (r_f); \
+ (r_f) += (a_f); \
+ add_c = ((u_int32)(r_f) < add_t); \
+ (r_i) += add_c; \
+ add_c = ((u_int32)(r_i) < add_c); \
+ add_t = (r_i); \
+ (r_i) += (a_i); \
+ add_c |= ((u_int32)(r_i) < add_t); \
+ (r_o) += (a_o) + add_c; \
+ } while (FALSE)
#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)
+ u_int32 sub_t = (r_f); \
+ (r_f) -= (a_f); \
+ (r_i) -= (a_i) + ((u_int32)(r_f) > sub_t); \
+ } while (FALSE)
#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)
+ (v_f) = ((u_int32)(v_f) >> 1) | ((u_int32)(v_i) << 31); \
+ (v_i) = ((u_int32)(v_i) >> 1); \
+ } while (FALSE)
#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)
+ (v_f) = ((u_int32)(v_f) >> 1) | ((u_int32)(v_i) << 31); \
+ (v_i) = ((u_int32)(v_i) >> 1) | ((u_int32)(v_i) & 0x80000000); \
+ } while (FALSE)
#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)
+ (v_i) = ((u_int32)(v_i) << 1) | ((u_int32)(v_f) >> 31); \
+ (v_f) = ((u_int32)(v_f) << 1); \
+ } while (FALSE)
-#define M_LSHIFT3(v_ovr, v_i, v_f) /* v <<= 1, with overflow */ \
+#define M_LSHIFT3(v_o, 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)
+ (v_o) = ((u_int32)(v_o) << 1) | ((u_int32)(v_i) >> 31); \
+ (v_i) = ((u_int32)(v_i) << 1) | ((u_int32)(v_f) >> 31); \
+ (v_f) = ((u_int32)(v_f) << 1); \
+ } while (FALSE)
#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 */
@@ -246,25 +193,34 @@ typedef u_int32 u_fp;
#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));\
+ int32 add_f = (int32)(f); \
+ if (add_f >= 0) \
+ M_ADD((r_i), (r_f), 0, (uint32)( add_f)); \
+ else \
+ M_SUB((r_i), (r_f), 0, (uint32)(-add_f)); \
} while(0)
-#define M_ISNEG(v_i, v_f) /* v < 0 */ \
+#define M_ISNEG(v_i) /* v < 0 */ \
(((v_i) & 0x80000000) != 0)
+#define M_ISGT(a_i, a_f, b_i, b_f) /* a > b signed */ \
+ (((u_int32)((a_i) ^ 0x80000000) > (u_int32)((b_i) ^ 0x80000000)) || \
+ ((a_i) == (b_i) && ((u_int32)(a_f)) > ((u_int32)(b_f))))
+
+#define M_ISGTU(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_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))))
+ (((u_int32)((a_i) ^ 0x80000000) > (u_int32)((b_i) ^ 0x80000000)) || \
+ ((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))
+ ((u_int32)(a_i) == (u_int32)(b_i) && (u_int32)(a_f) == (u_int32)(b_f))
/*
* Operations on the long fp format
@@ -280,18 +236,18 @@ typedef u_int32 u_fp;
#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_ISNEG(v) M_ISNEG((v)->l_ui)
+#define L_ISZERO(v) (((v)->l_ui | (v)->l_uf) == 0)
+#define L_ISGT(a, b) M_ISGT((a)->l_i, (a)->l_uf, (b)->l_i, (b)->l_uf)
+#define L_ISGTU(a, b) M_ISGTU((a)->l_ui, (a)->l_uf, (b)->l_ui, (b)->l_uf)
+#define L_ISHIS(a, b) M_ISHIS((a)->l_ui, (a)->l_uf, (b)->l_ui, (b)->l_uf)
+#define L_ISGEQ(a, b) M_ISGEQ((a)->l_ui, (a)->l_uf, (b)->l_ui, (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 FRIC 65536.0 /* 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)
@@ -299,67 +255,121 @@ typedef u_int32 u_fp;
/*
* l_fp/double conversions
*/
-#define FRAC 4294967296. /* 2^32 as a double */
-#define M_DTOLFP(d, r_i, r_uf) /* double to l_fp */ \
+#define FRAC 4294967296.0 /* 2^32 as a double */
+
+/*
+ * Use 64 bit integers if available. Solaris on SPARC has a problem
+ * compiling parsesolaris.c if ntp_fp.h includes math.h, due to
+ * archaic gets() and printf() prototypes used in Solaris kernel
+ * headers. So far the problem has only been seen with gcc, but it
+ * may also affect Sun compilers, in which case the defined(__GNUC__)
+ * term should be removed.
+ */
+#if defined(HAVE_U_INT64) && \
+ !(defined(__SVR4) && defined(__sun) && \
+ defined(sparc) && defined(__GNUC__))
+
+#include <math.h> /* ldexp() */
+
+#define M_DTOLFP(d, r_ui, r_uf) /* double to l_fp */ \
+ do { \
+ double d_tmp; \
+ u_int64 q_tmp; \
+ int M_isneg; \
+ \
+ d_tmp = (d); \
+ M_isneg = (d_tmp < 0.); \
+ if (M_isneg) { \
+ d_tmp = -d_tmp; \
+ } \
+ q_tmp = (u_int64)ldexp(d_tmp, 32); \
+ if (M_isneg) { \
+ q_tmp = ~q_tmp + 1; \
+ } \
+ (r_uf) = (u_int32)q_tmp; \
+ (r_ui) = (u_int32)(q_tmp >> 32); \
+ } while (FALSE)
+
+#define M_LFPTOD(r_ui, r_uf, d) /* l_fp to double */ \
+ do { \
+ double d_tmp; \
+ u_int64 q_tmp; \
+ int M_isneg; \
+ \
+ q_tmp = ((u_int64)(r_ui) << 32) + (r_uf); \
+ M_isneg = M_ISNEG(r_ui); \
+ if (M_isneg) { \
+ q_tmp = ~q_tmp + 1; \
+ } \
+ d_tmp = ldexp((double)q_tmp, -32); \
+ if (M_isneg) { \
+ d_tmp = -d_tmp; \
+ } \
+ (d) = d_tmp; \
+ } while (FALSE)
+
+#else /* use only 32 bit unsigned values */
+
+#define M_DTOLFP(d, r_ui, 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)); \
+ double d_tmp; \
+ if ((d_tmp = (d)) < 0) { \
+ (r_ui) = (u_int32)(-d_tmp); \
+ (r_uf) = (u_int32)(-(d_tmp + (double)(r_ui)) * FRAC); \
+ M_NEG((r_ui), (r_uf)); \
} else { \
- (r_i) = (int32)(d_tmp); \
- (r_uf) = (u_int32)(((d_tmp) - (double)(r_i)) * FRAC); \
+ (r_ui) = (u_int32)d_tmp; \
+ (r_uf) = (u_int32)((d_tmp - (double)(r_ui)) * FRAC); \
} \
} while (0)
-#define M_LFPTOD(r_i, r_uf, d) /* l_fp to double */ \
+#define M_LFPTOD(r_ui, 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); \
+ u_int32 l_thi, l_tlo; \
+ l_thi = (r_ui); l_tlo = (r_uf); \
+ if (M_ISNEG(l_thi)) { \
+ M_NEG(l_thi, l_tlo); \
+ (d) = -((double)l_thi + (double)l_tlo / FRAC); \
} else { \
- (d) = (double)l_tmp.l_i + ((double)l_tmp.l_uf) / FRAC; \
+ (d) = (double)l_thi + (double)l_tlo / 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))
+#endif
+
+#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 (u_fp, int, short, int);
-extern char * dolfptoa (u_long, u_long, int, short, int);
+extern char * dolfptoa (u_int32, u_int32, int, short, int);
extern int atolfp (const char *, l_fp *);
extern int buftvtots (const char *, l_fp *);
extern char * fptoa (s_fp, short);
extern char * fptoms (s_fp, short);
extern int hextolfp (const char *, l_fp *);
-extern void gpstolfp (int, int, unsigned long, l_fp *);
+extern void gpstolfp (int, int, unsigned long, l_fp *);
extern int mstolfp (const char *, l_fp *);
extern char * prettydate (l_fp *);
extern char * gmprettydate (l_fp *);
extern char * uglydate (l_fp *);
-extern void mfp_mul (int32 *, u_int32 *, int32, u_int32, int32, u_int32);
+extern void mfp_mul (int32 *, u_int32 *, int32, u_int32, int32, u_int32);
+extern void set_sys_fuzz (double);
+extern void init_systime (void);
extern void get_systime (l_fp *);
extern int step_systime (double);
extern int adj_systime (double);
-extern struct tm * ntp2unix_tm (u_long ntp, int local);
+extern struct tm * ntp2unix_tm (u_int32 ntp, int local);
#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(addr) socktoa(addr)
#define ntoa(addr) stoa(addr)
+#define sptoa(addr) sockporttoa(addr)
#define stohost(addr) socktohost(addr)
#define ufptoa(fpv, ndec) dofptoa((fpv), 0, (ndec), 0)
@@ -368,4 +378,43 @@ extern struct tm * ntp2unix_tm (u_long ntp, int local);
#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)
+/*
+ * Optional callback from libntp step_systime() to ntpd. Optional
+* because other libntp clients like ntpdate don't use it.
+ */
+typedef void (*time_stepped_callback)(void);
+extern time_stepped_callback step_callback;
+
+/*
+ * Multi-thread locking for get_systime()
+ *
+ * On most systems, get_systime() is used solely by the main ntpd
+ * thread, but on Windows it's also used by the dedicated I/O thread.
+ * The [Bug 2037] changes to get_systime() have it keep state between
+ * calls to ensure time moves in only one direction, which means its
+ * use on Windows needs to be protected against simultaneous execution
+ * to avoid falsely detecting Lamport violations by ensuring only one
+ * thread at a time is in get_systime().
+ */
+#ifdef SYS_WINNT
+extern CRITICAL_SECTION get_systime_cs;
+# define INIT_GET_SYSTIME_CRITSEC() \
+ InitializeCriticalSection(&get_systime_cs)
+# define ENTER_GET_SYSTIME_CRITSEC() \
+ EnterCriticalSection(&get_systime_cs)
+# define LEAVE_GET_SYSTIME_CRITSEC() \
+ LeaveCriticalSection(&get_systime_cs)
+# define INIT_WIN_PRECISE_TIME() \
+ init_win_precise_time()
+#else /* !SYS_WINNT follows */
+# define INIT_GET_SYSTIME_CRITSEC() \
+ do {} while (FALSE)
+# define ENTER_GET_SYSTIME_CRITSEC() \
+ do {} while (FALSE)
+# define LEAVE_GET_SYSTIME_CRITSEC() \
+ do {} while (FALSE)
+# define INIT_WIN_PRECISE_TIME() \
+ do {} while (FALSE)
+#endif
+
#endif /* NTP_FP_H */
diff --git a/include/ntp_intres.h b/include/ntp_intres.h
index 53c8a63a4076..1b6bd66e0b11 100644
--- a/include/ntp_intres.h
+++ b/include/ntp_intres.h
@@ -1,14 +1,45 @@
+/*
+ * ntp_intres.h - client interface to blocking-worker name resolution.
+ */
#ifndef NTP_INTRES_H
#define NTP_INTRES_H
+#include <ntp_worker.h>
+
+#ifdef WORKER
+#define INITIAL_DNS_RETRY 2 /* seconds between queries */
+
+/*
+ * you call getaddrinfo_sometime(name, service, &hints, retry, callback_func, context);
+ * later (*callback_func)(rescode, gai_errno, context, name, service, hints, ai_result) is called.
+ */
+typedef void (*gai_sometime_callback)
+ (int, int, void *, const char *, const char *,
+ const struct addrinfo *, const struct addrinfo *);
+extern int getaddrinfo_sometime(const char *, const char *,
+ const struct addrinfo *, int,
+ gai_sometime_callback, void *);
/*
- * Some systems do not support fork() and don't have an alternate
- * threads implementation of ntp_intres. Such systems are limited
- * to using numeric IP addresses.
+ * In gai_sometime_callback routines, the resulting addrinfo list is
+ * only available until the callback returns. To hold on to the list
+ * of addresses after the callback returns, use copy_addrinfo_list():
+ *
+ * struct addrinfo *copy_addrinfo_list(const struct addrinfo *);
*/
-#if defined(VMS) || defined (SYS_VXWORKS) || \
- (!defined(HAVE_WORKING_FORK) && !defined(SYS_WINNT))
-#define NO_INTRES
-#endif
-#endif /* !defined(NTP_INTRES_H) */
+
+/*
+ * you call getnameinfo_sometime(sockaddr, namelen, servlen, flags, callback_func, context);
+ * later (*callback_func)(rescode, gni_errno, sockaddr, flags, name, service, context) is called.
+ */
+typedef void (*gni_sometime_callback)
+ (int, int, sockaddr_u *, int, const char *,
+ const char *, void *);
+extern int getnameinfo_sometime(sockaddr_u *, size_t, size_t, int,
+ gni_sometime_callback, void *);
+#endif /* WORKER */
+
+/* intres_timeout_req() is provided by the client, ntpd or sntp. */
+extern void intres_timeout_req(u_int);
+
+#endif /* NTP_INTRES_H */
diff --git a/include/ntp_io.h b/include/ntp_io.h
index 920fd0d36f70..2cdca7108737 100644
--- a/include/ntp_io.h
+++ b/include/ntp_io.h
@@ -1,13 +1,12 @@
#ifndef NTP_IO_H
#define NTP_IO_H
+
+#include "ntp_workimpl.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
-
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -39,6 +38,8 @@
# include <netinet/ip.h>
#endif
+#include "libntp.h" /* This needs Something above for GETDTABLESIZE */
+
/*
* 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
@@ -69,7 +70,6 @@ typedef enum {
MATCH_IFADDR
} nic_rule_match;
-
/*
* NIC rule actions
*/
@@ -80,10 +80,18 @@ typedef enum {
} nic_rule_action;
+SOCKET move_fd(SOCKET fd);
isc_boolean_t get_broadcastclient_flag(void);
-extern int is_ip_address(const char *, sockaddr_u *);
+extern int is_ip_address(const char *, u_short, sockaddr_u *);
extern void sau_from_netaddr(sockaddr_u *, const isc_netaddr_t *);
-extern void add_nic_rule(nic_rule_match match_type, const char *if_name,
- int prefixlen, nic_rule_action action);
+extern void add_nic_rule(nic_rule_match match_type,
+ const char *if_name, int prefixlen,
+ nic_rule_action action);
+#ifndef HAVE_IO_COMPLETION_PORT
+extern void maintain_activefds(int fd, int closing);
+#else
+#define maintain_activefds(f, c) do {} while (0)
+#endif
+
#endif /* NTP_IO_H */
diff --git a/include/ntp_libopts.h b/include/ntp_libopts.h
index c4d6e165f149..b03b2f66c612 100644
--- a/include/ntp_libopts.h
+++ b/include/ntp_libopts.h
@@ -10,4 +10,5 @@
extern int ntpOptionProcess(tOptions *pOpts, int argc,
char ** argv);
+extern void ntpOptionPrintVersion(tOptions *, tOptDesc *);
#endif
diff --git a/include/ntp_machine.h b/include/ntp_machine.h
index 69dca68170f2..c5e7248e4115 100644
--- a/include/ntp_machine.h
+++ b/include/ntp_machine.h
@@ -1,24 +1,19 @@
/*
+ * ntp_machine.h
+ *
* Collect all machine dependent idiosyncrasies in one place.
+ *
+ * The functionality formerly in this file is mostly handled by
+ * Autoconf these days.
*/
#ifndef NTP_MACHINE_H
#define NTP_MACHINE_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
+#include <time.h>
#include "ntp_proto.h"
@@ -26,9 +21,6 @@
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.
@@ -40,13 +32,6 @@
/*
-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
@@ -80,169 +65,8 @@ MISC
LOCK_PROCESS - Have plock.
*/
-#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE___ADJTIMEX)
-# define ntp_adjtime __adjtimex
-#endif
-
-#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
-typedef int SOCKET;
-# define INVALID_SOCKET -1
-# define SOCKET_ERROR -1
-# define socket_errno() (errno)
-# define closesocket(fd) close(fd)
-#else /* SYS_WINNT follows */
-# define socket_errno() (errno = WSAGetLastError())
-#endif
-
int ntp_set_tod (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
@@ -264,8 +88,6 @@ int ntp_set_tod (struct timeval *tvp, void *tzp);
#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
*/
@@ -428,7 +250,6 @@ struct servent *getservbyname (char *name, char *type);
# 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 */
@@ -468,71 +289,9 @@ extern char *strdup(const char *);
#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 (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_H */
diff --git a/include/ntp_md5.h b/include/ntp_md5.h
index 458962fdab6f..9f43378f81c5 100644
--- a/include/ntp_md5.h
+++ b/include/ntp_md5.h
@@ -3,27 +3,38 @@
*
* Use the system MD5 if available, otherwise libisc's.
*/
-#if defined HAVE_MD5_H && defined HAVE_MD5INIT
-# include <md5.h>
-#else
-# include "isc/md5.h"
- typedef isc_md5_t MD5_CTX;
-# define MD5Init(c) isc_md5_init(c)
-# define MD5Update(c, p, s) isc_md5_update(c, p, s)
-# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
-#endif
+#ifndef NTP_MD5_H
+#define NTP_MD5_H
+#ifdef OPENSSL
+# include "openssl/evp.h"
+#else /* !OPENSSL follows */
/*
* Provide OpenSSL-alike MD5 API if we're not using OpenSSL
*/
-#ifndef OPENSSL
+# if defined HAVE_MD5_H && defined HAVE_MD5INIT
+# include <md5.h>
+# else
+# include "isc/md5.h"
+ typedef isc_md5_t MD5_CTX;
+# define MD5Init(c) isc_md5_init(c)
+# define MD5Update(c, p, s) isc_md5_update(c, p, s)
+# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
+# endif
+
typedef MD5_CTX EVP_MD_CTX;
# define EVP_get_digestbynid(t) NULL
-# define EVP_DigestInit(c, dt) MD5Init(c)
-# define EVP_DigestUpdate(c, p, s) MD5Update(c, p, s)
+# define EVP_md5(v) NULL
+# define EVP_MD_CTX_init(c)
+# define EVP_MD_CTX_set_flags(c, f)
+# define EVP_DigestInit(c, dt) (MD5Init(c), 1)
+# define EVP_DigestInit_ex(c, dt, i) (MD5Init(c), 1)
+# define EVP_DigestUpdate(c, p, s) MD5Update(c, (const void *)(p), \
+ s)
# define EVP_DigestFinal(c, d, pdl) \
do { \
MD5Final((d), (c)); \
*(pdl) = 16; \
} while (0)
-#endif
+# endif /* !OPENSSL */
+#endif /* NTP_MD5_H */
diff --git a/include/ntp_net.h b/include/ntp_net.h
index d417cea4d3d7..0577402bfb2c 100644
--- a/include/ntp_net.h
+++ b/include/ntp_net.h
@@ -23,6 +23,7 @@
#endif
#include "ntp_rfc2553.h"
+#include "ntp_malloc.h"
typedef union {
struct sockaddr sa;
@@ -123,7 +124,7 @@ typedef union {
: sizeof((psau)->sa6))
#define ZERO_SOCK(psau) \
- memset((psau), 0, sizeof(*(psau)))
+ ZERO(*(psau))
/* blast a byte value across sockaddr_u v6 address */
#define MEMSET_ADDR6(psau, v) \
@@ -215,13 +216,9 @@ typedef union {
#define REFCLOCK_ADDR 0x7f7f0000 /* 127.127.0.0 */
#define REFCLOCK_MASK 0xffff0000 /* 255.255.0.0 */
-#ifdef REFCLOCK
#define ISREFCLOCKADR(srcadr) \
(IS_IPV4(srcadr) && \
(SRCADR(srcadr) & REFCLOCK_MASK) == REFCLOCK_ADDR)
-#else
-#define ISREFCLOCKADR(srcadr) (0)
-#endif
/*
* Macro for checking for invalid addresses. This is really, really
diff --git a/include/ntp_prio_q.h b/include/ntp_prio_q.h
new file mode 100644
index 000000000000..4b5ffca52812
--- /dev/null
+++ b/include/ntp_prio_q.h
@@ -0,0 +1,83 @@
+/* ntp_prio_q.h
+ *
+ * This file contains the structures and function prototypes for the
+ * priority queue implementation used by the discrete event simulator.
+ *
+ * Written By: Sachin Kamboj
+ * University of Delaware
+ * Newark, DE 19711
+ * Copyright (c) 2006
+ */
+
+#ifndef NTP_PRIO_Q_H
+#define NTP_PRIO_Q_H
+
+#include <stddef.h> /* size_t */
+
+/* Structures for storing a priority queue
+ * ---------------------------------------
+ */
+
+typedef struct node {
+ union {
+ struct node *next;
+ double d;
+ } nodeu;
+} node;
+#define node_next nodeu.next
+
+typedef int (*q_order_func)(const void *, const void *);
+
+typedef struct Queue {
+ q_order_func get_order;
+ node * front;
+ int no_of_elements;
+} queue;
+
+
+/* FUNCTION PROTOTYPES
+ * -------------------
+ */
+/* Define a function to create a FIFO queue */
+#define create_queue() create_priority_queue(&get_fifo_order)
+
+void destroy_queue(queue *my_queue);
+void free_node(void *my_node);
+void *next_node(void *my_node);
+int empty(queue *my_queue);
+void *queue_head(queue *my_queue);
+queue *enqueue(queue *my_queue, void *my_node);
+void append_queue(queue *q1, queue *q2);
+void *dequeue(queue *my_queue);
+int get_no_of_elements(queue *my_queue);
+int get_fifo_order(const void *el1, const void *el2);
+
+/*
+ * Preserve original callsite __FILE__ and __LINE__ for these
+ * malloc-like funcs when using MS C runtime debug heap.
+ */
+#ifdef _CRTDBG_MAP_ALLOC
+# define create_priority_queue(order) debug_create_priority_queue(order, __FILE__, __LINE__)
+# define get_node(size) debug_get_node(size, __FILE__, __LINE__)
+#else
+# define create_priority_queue(order) debug_create_priority_queue(order)
+# define get_node(size) debug_get_node(size)
+#endif
+
+queue *debug_create_priority_queue(
+ q_order_func get_order
+#ifdef _CRTDBG_MAP_ALLOC
+ , const char * sourcefile
+ , int line_num
+#endif
+ );
+
+void *debug_get_node(
+ size_t size
+#ifdef _CRTDBG_MAP_ALLOC
+ , const char * sourcefile
+ , int line_num
+#endif
+ );
+
+#endif /* NTP_PRIO_Q_H */
diff --git a/include/ntp_proto.h b/include/ntp_proto.h
index e6e78553305b..1d04b78ab4b2 100644
--- a/include/ntp_proto.h
+++ b/include/ntp_proto.h
@@ -1,10 +1,6 @@
-#ifndef __ntp_proto_h
-#define __ntp_proto_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#ifndef NTP_PROTO_H
+#define NTP_PROTO_H
#define NTP_MAXFREQ 500e-6
-#endif /* __ntp_proto_h */
+#endif /* NTP_PROTO_H */
diff --git a/include/ntp_random.h b/include/ntp_random.h
index 3f898312d77e..fa77f6553ec6 100644
--- a/include/ntp_random.h
+++ b/include/ntp_random.h
@@ -1,6 +1,9 @@
#include <ntp_types.h>
+void ntp_crypto_srandom(void);
+int ntp_crypto_random_buf(void *buf, size_t nbytes);
+
long ntp_random (void);
void ntp_srandom (unsigned long);
void ntp_srandomdev (void);
diff --git a/include/ntp_refclock.h b/include/ntp_refclock.h
index 9d803e4cc4d5..f92d14cdb890 100644
--- a/include/ntp_refclock.h
+++ b/include/ntp_refclock.h
@@ -5,44 +5,14 @@
#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 "ntp_types.h"
+#include "ntp_tty.h"
#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); \
@@ -128,10 +98,15 @@ struct refclockio {
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 */
+ struct peer *srcclock; /* refclock peer */
+ int datalen; /* length of data */
int fd; /* file descriptor */
u_long recvcount; /* count of receive completions */
+ int active; /* nonzero when in use */
+
+#ifdef HAVE_IO_COMPLETION_PORT
+ void * device_context; /* device-related data for i/o subsystem */
+#endif
};
/*
@@ -149,6 +124,10 @@ struct refclockbug {
l_fp times[NCLKBUGTIMES]; /* real times */
};
+#ifdef HAVE_IO_COMPLETION_PORT
+extern HANDLE WaitableIoEventHandle;
+#endif
+
/*
* Structure interface between the reference clock support
* ntp_refclock.c and the driver utility routines
@@ -159,30 +138,18 @@ struct refclockbug {
#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 0x00 /* standard */
-#define LDISC_CLK 0x01 /* tty_clk \n intercept */
-#define LDISC_CLKPPS 0x02 /* tty_clk \377 intercept */
-#define LDISC_ACTS 0x04 /* tty_clk #* intercept */
-#define LDISC_CHU 0x08 /* depredated */
-#define LDISC_PPS 0x10 /* ppsclock, ppsapi */
-#define LDISC_RAW 0x20 /* raw binary */
-#define LDISC_ECHO 0x40 /* enable echo */
-#define LDISC_REMOTE 0x80 /* remote mode */
-#define LDISC_7O1 0x100 /* 7-bit, odd parity for Z3801A */
struct refclockproc {
- struct refclockio io; /* I/O handler structure */
void * unitptr; /* pointer to unit structure */
+ struct refclock * conf; /* refclock_conf[type] */
+ struct refclockio io; /* I/O handler 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 */
+ u_long nextaction; /* local activity timeout */
+ void (*action)(struct peer *); /* timeout callback */
char a_lastcode[BMAX]; /* last timecode received */
int lencode; /* length of last timecode */
@@ -234,8 +201,8 @@ struct refclock {
int (*clock_start) (int, struct peer *);
void (*clock_shutdown) (int, struct peer *);
void (*clock_poll) (int, struct peer *);
- void (*clock_control) (int, struct refclockstat *,
- struct refclockstat *, struct peer *);
+ void (*clock_control) (int, const struct refclockstat *,
+ struct refclockstat *, struct peer *);
void (*clock_init) (void);
void (*clock_buginfo) (int, struct refclockbug *, struct peer *);
void (*clock_timer) (int, struct peer *);
@@ -244,31 +211,29 @@ struct refclock {
/*
* Function prototypes
*/
-/*
- * auxiliary PPS interface (implemented by refclock_atom())
- */
-extern int pps_sample (l_fp *);
-extern int io_addclock_simple (struct refclockio *);
extern int io_addclock (struct refclockio *);
extern void io_closeclock (struct refclockio *);
#ifdef REFCLOCK
-extern void refclock_buginfo (sockaddr_u *,
- struct refclockbug *);
-extern void refclock_control (sockaddr_u *,
- struct refclockstat *,
- struct refclockstat *);
+extern void refclock_buginfo(sockaddr_u *,
+ struct refclockbug *);
+extern void refclock_control(sockaddr_u *,
+ const struct refclockstat *,
+ struct refclockstat *);
extern int refclock_open (char *, u_int, u_int);
extern int refclock_setup (int, u_int, u_int);
extern void refclock_timer (struct peer *);
-extern void refclock_transmit (struct peer *);
-extern int refclock_ioctl (int, u_int);
-extern int refclock_process (struct refclockproc *);
-extern int refclock_process_f (struct refclockproc *, double);
-extern void refclock_process_offset (struct refclockproc *, l_fp, l_fp, double);
+extern void refclock_transmit(struct peer *);
+extern int refclock_process(struct refclockproc *);
+extern int refclock_process_f(struct refclockproc *, double);
+extern void refclock_process_offset(struct refclockproc *, l_fp,
+ l_fp, double);
extern void refclock_report (struct peer *, int);
extern int refclock_gtlin (struct recvbuf *, char *, int, l_fp *);
-extern int refclock_gtraw (struct recvbuf *, char *, int, l_fp *);
+extern int refclock_gtraw (struct recvbuf *, char *, int, l_fp *);
+extern int indicate_refclock_packet(struct refclockio *,
+ struct recvbuf *);
+extern void process_refclock_packet(struct recvbuf *);
#endif /* REFCLOCK */
#endif /* NTP_REFCLOCK_H */
diff --git a/include/ntp_request.h b/include/ntp_request.h
index 7f68894479dd..c750b7750a7a 100644
--- a/include/ntp_request.h
+++ b/include/ntp_request.h
@@ -69,7 +69,7 @@
* requested wasn't performed.
*
* 0 - no error
- * 1 - incompatable implementation number
+ * 1 - incompatible 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)
@@ -116,12 +116,18 @@
/*
* union of raw addresses to save space
*/
-union addrun
-{
+union addrun {
struct in6_addr addr6;
struct in_addr addr;
};
+#define MODE7_PAYLOAD_LIM 176
+
+typedef union req_data_u_tag {
+ u_int32 u32[MODE7_PAYLOAD_LIM / sizeof(u_int32)];
+ char data[MODE7_PAYLOAD_LIM]; /* data area (176 byte max) */
+} req_data_u; /* struct conf_peer must fit */
+
/*
* A request packet. These are almost a fixed length.
*/
@@ -132,8 +138,7 @@ struct req_pkt {
u_char request; /* request number */
u_short err_nitems; /* error code/number of data items */
u_short mbz_itemsize; /* item size */
- char data[MAXFILENAME + 48]; /* data area [32 prev](176 byte max) */
- /* struct conf_peer must fit */
+ req_data_u u; /* data area */
l_fp tstamp; /* time stamp, for authentication */
keyid_t keyid; /* (optional) encryption key */
char mac[MAX_MAC_LEN-sizeof(keyid_t)]; /* (optional) auth code */
@@ -150,7 +155,7 @@ struct req_pkt_tail {
};
/* MODE_PRIVATE request packet header length before optional items. */
-#define REQ_LEN_HDR (offsetof(struct req_pkt, data))
+#define REQ_LEN_HDR (offsetof(struct req_pkt, u))
/* MODE_PRIVATE request packet fixed length without MAC. */
#define REQ_LEN_NOMAC (offsetof(struct req_pkt, keyid))
/* MODE_PRIVATE req_pkt_tail minimum size (16 octet digest) */
@@ -162,8 +167,13 @@ struct req_pkt_tail {
* is a maximally sized one. Note that this implementation doesn't
* authenticate responses.
*/
-#define RESP_HEADER_SIZE (offsetof(struct resp_pkt, data))
-#define RESP_DATA_SIZE (500)
+#define RESP_HEADER_SIZE (offsetof(struct resp_pkt, u))
+#define RESP_DATA_SIZE 500
+
+typedef union resp_pkt_u_tag {
+ char data[RESP_DATA_SIZE];
+ u_int32 u32[RESP_DATA_SIZE / sizeof(u_int32)];
+} resp_pkt_u;
struct resp_pkt {
u_char rm_vn_mode; /* response, more, version, mode */
@@ -172,7 +182,7 @@ struct resp_pkt {
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 */
+ resp_pkt_u u; /* data area */
};
@@ -180,11 +190,12 @@ struct resp_pkt {
* Information error codes
*/
#define INFO_OKAY 0
-#define INFO_ERR_IMPL 1 /* incompatable implementation */
+#define INFO_ERR_IMPL 1 /* incompatible 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 */
+#define MAX_INFO_ERR INFO_ERR_AUTH
/*
* Maximum sequence number.
@@ -242,7 +253,7 @@ struct resp_pkt {
*/
/*
- * NTPD request codes go here.
+ * ntpdc -> 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 */
@@ -591,7 +602,7 @@ struct conf_peer {
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*/
+ char keystr[128]; /* 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 */
@@ -668,8 +679,8 @@ struct conf_restrict {
* 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 avg_int; /* avg s between packets from this host */
+ u_int32 last_int; /* s since we last received a packet */
u_int32 restr; /* restrict bits (was named lastdrop) */
u_int32 count; /* count of packets received */
u_int32 addr; /* host address V4 style */
@@ -689,8 +700,8 @@ struct info_monitor_1 {
* 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 avg_int; /* avg s between packets from this host */
+ u_int32 last_int; /* s since we last received a packet */
u_int32 restr; /* restrict bits (was named lastdrop) */
u_int32 count; /* count of packets received */
u_int32 addr; /* host address */
@@ -732,9 +743,15 @@ struct reset_flags {
#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)
+#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
@@ -890,26 +907,26 @@ struct info_kernel {
* interface statistics
*/
struct info_if_stats {
- union addrun unaddr; /* address */
- union addrun unbcast; /* broadcast */
- union addrun unmask; /* mask */
- u_int32 v6_flag; /* is this v6 */
+ union addrun unaddr; /* address */
+ union addrun unbcast; /* broadcast */
+ union addrun unmask; /* mask */
+ u_int32 v6_flag; /* is this v6 */
char name[32]; /* name of interface */
int32 flags; /* interface flags */
int32 last_ttl; /* last TTL specified */
int32 num_mcast; /* No. of IP addresses in multicast socket */
- int32 received; /* number of incoming packets */
+ int32 received; /* number of incoming packets */
int32 sent; /* number of outgoing packets */
int32 notsent; /* number of send failures */
- int32 uptime; /* number of seconds this interface was active */
+ int32 uptime; /* number of seconds this interface was active */
u_int32 scopeid; /* Scope used for Multicasting */
u_int32 ifindex; /* interface index - from system */
- u_int32 ifnum; /* sequential interface number */
- u_int32 peercnt; /* number of peers referencinf this interface - informational only */
+ u_int32 ifnum; /* sequential interface number */
+ u_int32 peercnt; /* number of peers referencinf this interface - informational only */
u_short family; /* Address family */
- u_char ignore_packets; /* Specify whether the packet should be ignored */
- u_char action; /* reason the item is listed */
- int32 _filler0; /* pad to a 64 bit size boundary */
+ u_char ignore_packets; /* Specify whether the packet should be ignored */
+ u_char action; /* reason the item is listed */
+ int32 _filler0; /* pad to a 64 bit size boundary */
};
#define IFS_EXISTS 1 /* just exists */
diff --git a/include/ntp_rfc2553.h b/include/ntp_rfc2553.h
index 8e824f4a240b..08ccbc415b21 100644
--- a/include/ntp_rfc2553.h
+++ b/include/ntp_rfc2553.h
@@ -68,16 +68,33 @@
#ifndef NTP_RFC2553_H
#define NTP_RFC2553_H
-/*
- * Ensure that we include the configuration file before we check
- * for IPV6
- */
-#include <config.h>
#include <netdb.h>
#include <isc/net.h>
#include "ntp_types.h"
+#include "ntp_malloc.h"
+struct addrinfo *copy_addrinfo_impl(const struct addrinfo *
+#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
+ ,
+ const char *, int
+#endif
+ );
+struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
+#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
+ ,
+ const char *, int
+#endif
+ );
+#ifdef EREALLOC_CALLSITE
+# define copy_addrinfo(l) \
+ copy_addrinfo_impl((l), __FILE__, __LINE__)
+# define copy_addrinfo_list(l) \
+ copy_addrinfo_list_impl((l), __FILE__, __LINE__)
+#else
+# define copy_addrinfo(l) copy_addrinfo_impl(l)
+# define copy_addrinfo_list(l) copy_addrinfo_list_impl(l)
+#endif
/*
* If various macros are not defined we need to define them
diff --git a/include/ntp_select.h b/include/ntp_select.h
index dc60f70b3ae0..2c0fbeec980f 100644
--- a/include/ntp_select.h
+++ b/include/ntp_select.h
@@ -2,39 +2,34 @@
* Not all machines define FD_SET in sys/types.h
*/
#ifndef NTP_SELECT_H
-#define NTP_SELECT_H
+#define NTP_SELECT_H /* note: tested by include/l_stdlib.h */
/* Was: (defined(RS6000)||defined(SYS_PTX))&&!defined(_BSD) */
/* Could say: !defined(FD_SET) && defined(HAVE_SYS_SELECT_H) */
+/* except FD_SET can legitimately be a typedef... */
#if defined(HAVE_SYS_SELECT_H) && !defined(_BSD)
-#ifndef SYS_VXWORKS
-#include <sys/select.h>
-#else
-#include <sockLib.h>
-extern int select (int width, fd_set *pReadFds, fd_set *pWriteFds,
- fd_set *pExceptFds, struct timeval *pTimeOut);
-
-#endif
+# ifndef SYS_VXWORKS
+# include <sys/select.h>
+# else
+# include <sockLib.h>
+extern int select(int width, fd_set *pReadFds, fd_set *pWriteFds,
+ fd_set *pExceptFds, struct timeval *pTimeOut);
+# endif
#endif
#if !defined(FD_SET)
-#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)))
+# 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((p), 0, sizeof(*(p)))
#endif
#if defined(VMS)
typedef struct {
- unsigned int fds_bits[1];
+ unsigned int fds_bits[1];
} fd_set;
#endif
-#ifdef SYS_WINNT
-/* ports/winnt/libntp/setpriority.c */
-extern void InitSockets(void);
-#endif
-
#endif /* NTP_SELECT_H */
diff --git a/include/ntp_sprintf.h b/include/ntp_sprintf.h
deleted file mode 100644
index a456a8925949..000000000000
--- a/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/include/ntp_stdlib.h b/include/ntp_stdlib.h
index 8fc237ae0351..7c884fc3274c 100644
--- a/include/ntp_stdlib.h
+++ b/include/ntp_stdlib.h
@@ -9,43 +9,34 @@
#include <sys/socket.h>
#endif
+#include "declcond.h" /* ntpd uses ntpd/declcond.h, others include/ */
#include "l_stdlib.h"
-#include "ntp_rfc2553.h"
-#include "ntp_types.h"
+#include "ntp_net.h"
+#include "ntp_debug.h"
#include "ntp_malloc.h"
#include "ntp_string.h"
-#include "ntp_net.h"
#include "ntp_syslog.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
+#ifdef __GNUC__
+#define NTP_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
+#else
+#define NTP_PRINTF(fmt, args)
#endif
-extern int mprintf(const char *, ...)
- __attribute__((__format__(__printf__, 1, 2)));
-extern int mfprintf(FILE *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
-extern int mvfprintf(FILE *, const char *, va_list)
- __attribute__((__format__(__printf__, 2, 0)));
+extern int mprintf(const char *, ...) NTP_PRINTF(1, 2);
+extern int mfprintf(FILE *, const char *, ...) NTP_PRINTF(2, 3);
+extern int mvfprintf(FILE *, const char *, va_list) NTP_PRINTF(2, 0);
extern int mvsnprintf(char *, size_t, const char *, va_list)
- __attribute__((__format__(__printf__, 3, 0)));
+ NTP_PRINTF(3, 0);
extern int msnprintf(char *, size_t, const char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
-extern void msyslog(int, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
+ NTP_PRINTF(3, 4);
+extern void msyslog(int, const char *, ...) NTP_PRINTF(2, 3);
+extern void init_logging (const char *, u_int32, int);
+extern int change_logfile (const char *, int);
+extern void setup_logfile (const char *);
+#ifndef errno_to_str
+extern void errno_to_str(int, char *, size_t);
+#endif
/*
* When building without OpenSSL, use a few macros of theirs to
@@ -57,6 +48,19 @@ extern void msyslog(int, const char *, ...)
#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
#endif
+#define SAVE_ERRNO(stmt) \
+ { \
+ int preserved_errno; \
+ \
+ preserved_errno = socket_errno(); \
+ { \
+ stmt \
+ } \
+ errno = preserved_errno; \
+ }
+
+typedef void (*ctrl_c_fn)(void);
+
/* authkeys.c */
extern void auth_delkeys (void);
extern int auth_havekey (keyid_t);
@@ -68,20 +72,31 @@ extern int authreadkeys (const char *);
extern void authtrust (keyid_t, u_long);
extern int authusekey (keyid_t, int, const u_char *);
-extern u_long calyearstart (u_long);
+/*
+ * Based on the NTP timestamp, calculate the NTP timestamp of
+ * the corresponding calendar unit. Use the pivot time to unfold
+ * the NTP timestamp properly, or the current system time if the
+ * pivot pointer is NULL.
+ */
+extern u_int32 calyearstart (u_int32 ntptime, const time_t *pivot);
+extern u_int32 calmonthstart (u_int32 ntptime, const time_t *pivot);
+extern u_int32 calweekstart (u_int32 ntptime, const time_t *pivot);
+extern u_int32 caldaystart (u_int32 ntptime, const time_t *pivot);
+
extern const char *clockname (int);
-extern int clocktime (int, int, int, int, int, u_long, u_long *, u_int32 *);
+extern int clocktime (int, int, int, int, int, u_int32, u_long *, u_int32 *);
extern int ntp_getopt (int, char **, const char *);
extern void init_auth (void);
extern void init_lib (void);
extern struct savekey *auth_findkey (keyid_t);
-extern int auth_moremem (void);
+extern void auth_moremem (int);
+extern void auth_prealloc_symkeys(int);
extern int ymd2yd (int, int, int);
/* a_md5encrypt.c */
extern int MD5authdecrypt (int, u_char *, u_int32 *, int, int);
extern int MD5authencrypt (int, u_char *, u_int32 *, int);
-extern void MD5auth_setkey (keyid_t, int, const u_char *, const int);
+extern void MD5auth_setkey (keyid_t, int, const u_char *, int);
extern u_int32 addr2refid (sockaddr_u *);
/* emalloc.c */
@@ -115,32 +130,37 @@ extern int atoint (const char *, long *);
extern int atouint (const char *, u_long *);
extern int hextoint (const char *, u_long *);
extern char * humanlogtime (void);
-extern char * inttoa (long);
-extern char * mfptoa (u_long, u_long, short);
-extern char * mfptoms (u_long, u_long, short);
+extern char * humantime (time_t);
+extern char * mfptoa (u_int32, u_int32, short);
+extern char * mfptoms (u_int32, u_int32, short);
extern const char * modetoa (int);
-extern const char * eventstr (int);
-extern const char * ceventstr (int);
+extern const char * eventstr (int);
+extern const char * ceventstr (int);
+extern const char * res_match_flags(u_short);
+extern const char * res_access_flags(u_short);
+#ifdef KERNEL_PLL
+extern const char * k_st_flags (u_int32);
+#endif
extern char * statustoa (int, int);
-extern const char * sysstatstr (int);
-extern const char * peerstatstr (int);
-extern const char * clockstatstr (int);
extern sockaddr_u * netof (sockaddr_u *);
extern char * numtoa (u_int32);
extern char * numtohost (u_int32);
-extern char * socktoa (const sockaddr_u *);
-extern char * socktohost (const sockaddr_u *);
+extern const char * socktoa (const sockaddr_u *);
+extern const char * sockporttoa(const sockaddr_u *);
+extern u_short sock_hash (const sockaddr_u *);
+extern int sockaddr_masktoprefixlen(const sockaddr_u *);
+extern const char * socktohost (const sockaddr_u *);
extern int octtoint (const char *, u_long *);
extern u_long ranp2 (int);
-extern char * refnumtoa (sockaddr_u *);
-extern int tsftomsu (u_long, int);
-extern char * uinttoa (u_long);
+extern const char *refnumtoa (sockaddr_u *);
+extern const char *refid_str (u_int32, int);
extern int decodenetnum (const char *, sockaddr_u *);
extern const char * FindConfig (const char *);
extern void signal_no_reset (int, RETSIGTYPE (*func)(int));
+extern void set_ctrl_c_hook (ctrl_c_fn);
extern void getauthkeys (const char *);
extern void auth_agekeys (void);
@@ -150,11 +170,6 @@ extern void rereadkeys (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 */
@@ -170,9 +185,10 @@ 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 int cache_type; /* key type */
-extern u_int cache_keylen; /* key length */
+extern u_char * cache_secret; /* secret */
+extern u_short cache_secretsize; /* secret octets */
+extern u_short cache_flags; /* KEY_ bit flags */
/* getopt.c */
extern char * ntp_optarg; /* global argument pointer */
@@ -203,6 +219,27 @@ extern int keytype_from_text (const char *, size_t *);
extern const char *keytype_name (int);
extern char * getpass_keytype (int);
+/* strl-obsd.c */
+#ifndef HAVE_STRLCPY /* + */
+/*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+extern size_t strlcpy(char *dst, const char *src, size_t siz);
+#endif
+#ifndef HAVE_STRLCAT /* + */
+/*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+ * full size of dst, not space left). At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
+ * If retval >= siz, truncation occurred.
+ */
+extern size_t strlcat(char *dst, const char *src, size_t siz);
+#endif
+
+
/* lib/isc/win32/strerror.c
*
@@ -219,7 +256,10 @@ extern char * ntp_strerror (int e);
#endif
/* systime.c */
-extern double sys_tick; /* adjtime() resolution */
+extern double sys_tick; /* tick size or time to read */
+extern double measured_tick; /* non-overridable sys_tick */
+extern double sys_fuzz; /* min clock read latency */
+extern int trunc_os_clock; /* sys_tick > measured_tick */
/* version.c */
extern const char *Version; /* version declaration */
diff --git a/include/ntp_string.h b/include/ntp_string.h
index aab7084b0536..9b62ec2d97e1 100644
--- a/include/ntp_string.h
+++ b/include/ntp_string.h
@@ -1,13 +1,9 @@
/*
- * Define string ops: strchr strrchr memcmp memmove memset
+ * Define string ops: strchr strrchr memcmp memmove memset
*/
-#ifndef _ntp_string_h
-#define _ntp_string_h
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#ifndef NTP_STRING_H
+#define NTP_STRING_H
#ifdef HAVE_MEMORY_H
# include <memory.h>
@@ -21,20 +17,6 @@
# 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
#ifdef HAVE_STRINGS_H
@@ -52,4 +34,4 @@ void ntp_memset (char *, int, int);
ntp_memset((char *)(a), x, c)
#endif /* NTP_NEED_BOPS */
-#endif /* _ntp_string_h */
+#endif /* NTP_STRING_H */
diff --git a/include/ntp_syscall.h b/include/ntp_syscall.h
index c255cee46b5f..d1ce03ea90a2 100644
--- a/include/ntp_syscall.h
+++ b/include/ntp_syscall.h
@@ -6,33 +6,28 @@
#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 (struct timex *);
-
-# define ntp_adjtime(t) __adjtimex((t))
-
-#ifndef HAVE_STRUCT_NTPTIMEVAL
+# 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_NTP_ADJTIME
+extern int ntp_adjtime (struct timex *);
+
+# ifndef HAVE_STRUCT_NTPTIMEVAL
struct ntptimeval
{
- struct timeval time; /* current time (ro) */
- long int maxerror; /* maximum error (us) (ro) */
- long int esterror; /* estimated error (us) (ro) */
+ struct timeval time; /* current time (ro) */
+ long int maxerror; /* maximum error (us) (ro) */
+ long int esterror; /* estimated error (us) (ro) */
};
-#endif
+# endif
+# ifndef HAVE_NTP_GETTIME
static inline int
ntp_gettime(
struct ntptimeval *ntv
@@ -41,24 +36,21 @@ ntp_gettime(
struct timex tntx;
int result;
- tntx.modes = 0;
- result = __adjtimex (&tntx);
+ ZERO(tntx);
+ result = ntp_adjtime(&tntx);
ntv->time = tntx.time;
ntv->maxerror = tntx.maxerror;
ntv->esterror = tntx.esterror;
-#ifdef NTP_API
-# if NTP_API > 3
+# ifdef NTP_API
+# if NTP_API > 3
ntv->tai = tntx.tai;
-# endif
-#endif
- return(result);
+# 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 /* !HAVE_NTP_GETTIME */
+# endif /* !HAVE_NTP_ADJTIME */
+# endif /* !NTP_SYSCALLS_STD */
+#endif /* !NTP_SYSCALLS_LIBC */
-#endif /* NTP_SYSCALL_H */
+#endif /* NTP_SYSCALL_H */
diff --git a/include/ntp_syslog.h b/include/ntp_syslog.h
index 12f78292b1ea..a0152b53d9ca 100644
--- a/include/ntp_syslog.h
+++ b/include/ntp_syslog.h
@@ -7,19 +7,23 @@
#include <ntp_types.h> /* u_int32 type */
-# ifdef VMS
+#ifdef VMS
extern void msyslog();
-# else
-# ifndef SYS_VXWORKS
-# include <syslog.h>
-# endif
-# endif /* VMS */
-# include <stdio.h>
+#else
+# ifndef SYS_VXWORKS
+# include <syslog.h>
+# endif
+#endif /* VMS */
+#include <stdio.h>
-extern int syslogit;
-extern int msyslog_term; /* duplicate to stdout/err */
-extern FILE *syslog_file; /* if syslogit is FALSE, log to
+extern int syslogit;
+extern int msyslog_term; /* duplicate to stdout/err */
+extern int msyslog_term_pid;
+extern int msyslog_include_timestamp;
+extern FILE * syslog_file; /* if syslogit is FALSE, log to
this file and not syslog */
+extern char * syslog_fname;
+extern char * syslog_abs_fname;
#if defined(VMS) || defined (SYS_VXWORKS)
#define LOG_EMERG 0 /* system is unusable */
@@ -69,6 +73,13 @@ extern FILE *syslog_file; /* if syslogit is FALSE, log to
#define NLOG_SYNCSTATIST 0x00008000 /* sync statistics output */
extern u_int32 ntp_syslogmask;
-#define NLOG(_X_) if (ntp_syslogmask & (_X_))
+
+#define NLOG(bits) if (ntp_syslogmask & (bits))
+
+#define LOGIF(nlog_suffix, msl_args) \
+do { \
+ NLOG(NLOG_##nlog_suffix) /* like "if (...) */ \
+ msyslog msl_args; \
+} while (FALSE)
#endif /* NTP_SYSLOG_H */
diff --git a/include/ntp_tty.h b/include/ntp_tty.h
index 9833119238f4..6dc48b6c71f1 100644
--- a/include/ntp_tty.h
+++ b/include/ntp_tty.h
@@ -1,10 +1,31 @@
/*
* ntp_tty.h - header file for serial lines handling
*/
-
#ifndef NTP_TTY_H
#define NTP_TTY_H
+/*
+ * 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
+ */
+
+#if defined(HAVE_TERMIOS_H) || defined(HAVE_SYS_TERMIOS_H)
+# define HAVE_TERMIOS
+#elif defined(HAVE_TERMIO_H)
+# define HAVE_SYSV_TTYS
+#elif defined(HAVE_SGTTY_H)
+# define HAVE_BSD_TTYS
+#endif
+
+#if !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 /* !VMS && !SYS_VXWORKS*/
+
#if defined(HAVE_BSD_TTYS)
#include <sgtty.h>
#define TTY struct sgttyb
@@ -34,22 +55,49 @@
#endif /* HAVE_SYSV_TTYS */
#if defined(HAVE_TERMIOS)
-# ifdef TERMIOS_NEEDS__SVID3
-# define _SVID3
-# endif
-# include <termios.h>
-# ifdef TERMIOS_NEEDS__SVID3
-# undef _SVID3
+# if defined(HAVE_TERMIOS_H)
+# ifdef TERMIOS_NEEDS__SVID3
+# define _SVID3
+# endif
+# include <termios.h>
+# ifdef TERMIOS_NEEDS__SVID3
+# undef _SVID3
+# endif
+# elif defined(HAVE_SYS_TERMIOS_H)
+# include <sys/termios.h>
# endif
-#define TTY struct termios
+# 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. The depredated ones required line discipline
+ * or streams modules to be installed/loaded in the kernel and are now
+ * ignored. Leave the LDISC_CLK and other deprecated symbols defined
+ * until 2013 or 2014 to avoid complicating the use of newer drivers on
+ * older ntpd, which is often as easy as dropping in the refclock *.c.
+ */
+#define LDISC_STD 0x000 /* standard */
+#define LDISC_CLK 0x001 /* depredated tty_clk \n */
+#define LDISC_CLKPPS 0x002 /* depredated tty_clk \377 */
+#define LDISC_ACTS 0x004 /* depredated tty_clk #* */
+#define LDISC_CHU 0x008 /* depredated */
+#define LDISC_PPS 0x010 /* depredated */
+#define LDISC_RAW 0x020 /* raw binary */
+#define LDISC_ECHO 0x040 /* enable echo */
+#define LDISC_REMOTE 0x080 /* remote mode */
+#define LDISC_7O1 0x100 /* 7-bit, odd parity for Z3801A */
+
+/* function prototypes for ntp_tty.c */
+#if !defined(SYS_VXWORKS) && !defined(SYS_WINNT)
+# if defined(HAVE_TERMIOS) || defined(HAVE_SYSV_TTYS) || \
+ defined(HAVE_BSD_TTYS)
+extern int ntp_tty_setup(int, u_int, u_int);
+extern int ntp_tty_ioctl(int, u_int);
+# endif
+#endif
#endif /* NTP_TTY_H */
diff --git a/include/ntp_types.h b/include/ntp_types.h
index c975a08163cc..1beb16647a66 100644
--- a/include/ntp_types.h
+++ b/include/ntp_types.h
@@ -1,5 +1,10 @@
/*
* ntp_types.h - defines how int32 and u_int32 are treated.
+ *
+ * New style: Make sure C99 fixed width integer types are available:
+ * intN_t and uintN_t
+
+ * Old style: 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
@@ -8,8 +13,15 @@
#define NTP_TYPES_H
#include <sys/types.h>
+#if defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+# include <stdint.h>
+#endif
+
#include "ntp_machine.h"
+
#ifndef TRUE
# define TRUE 1
#endif
@@ -33,7 +45,10 @@
* used to quiet compiler warnings
*/
#ifndef UNUSED_ARG
-#define UNUSED_ARG(arg) ((void)(arg))
+#define UNUSED_ARG(arg) ((void)(arg))
+#endif
+#ifndef UNUSED_LOCAL
+#define UNUSED_LOCAL(arg) ((void)(arg))
#endif
/*
@@ -48,15 +63,21 @@
#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
+#ifdef HAVE_UINT32_T
+# ifndef HAVE_INT32
+ typedef int32_t int32;
+# endif
+# ifndef HAVE_U_INT32
+ typedef uint32_t u_int32;
+# if defined(UINT32_MAX) && !defined(U_INT32_MAX)
+# define U_INT32_MAX UINT32_MAX
+# endif
+# endif
+#elif (SIZEOF_INT == 4)
+# if !defined(HAVE_INT32) && !defined(int32)
+ typedef int int32;
# ifndef INT32_MIN
# define INT32_MIN INT_MIN
# endif
@@ -64,16 +85,16 @@ typedef unsigned int u_int;
# define INT32_MAX INT_MAX
# endif
# endif
-# ifndef u_int32
-# define u_int32 unsigned int
-# ifndef U_INT32_MAX
+# if !defined(HAVE_U_INT32) && !defined(u_int32)
+ typedef unsigned u_int32;
+# if defined(UINT_MAX) && !defined(U_INT32_MAX)
# define U_INT32_MAX UINT_MAX
# endif
# endif
-#else /* not sizeof(int) == 4 */
+#else /* SIZEOF_INT != 4 */
# if (SIZEOF_LONG == 4)
-# ifndef int32
-# define int32 long
+# if !defined(HAVE_INT32) && !defined(int32)
+ typedef long int32;
# ifndef INT32_MIN
# define INT32_MIN LONG_MIN
# endif
@@ -81,28 +102,154 @@ typedef unsigned int u_int;
# define INT32_MAX LONG_MAX
# endif
# endif
-# ifndef u_int32
-# define u_int32 unsigned long
-# ifndef U_INT32_MAX
+# if !defined(HAVE_U_INT32) && !defined(u_int32)
+ typedef unsigned long u_int32;
+# if defined(ULONG_MAX) && !defined(U_INT32_MAX)
# define U_INT32_MAX ULONG_MAX
# endif
# endif
-# else /* not sizeof(long) == 4 */
+# else /* SIZEOF_LONG != 4 */
# include "Bletch: what's 32 bits on this machine?"
-# endif /* not sizeof(long) == 4 */
-#endif /* not sizeof(int) == 4 */
+# endif
+#endif /* !HAVE_UINT32_T && SIZEOF_INT != 4 */
+
+#ifndef U_INT32_MAX
+# define U_INT32_MAX 0xffffffff
+#endif
+
+
+/*
+ * Ugly dance to find out if we have 64bit integer type.
+ */
+#if !defined(HAVE_INT64)
+
+/* assume best for now, fix if frustrated later. */
+# define HAVE_INT64
+# define HAVE_U_INT64
+
+/* now check the cascade. Feel free to add things. */
+# ifdef INT64_MAX
+
+typedef int64_t int64;
+typedef uint64_t u_int64;
+
+# elif SIZEOF_LONG == 8
+
+typedef long int64;
+typedef unsigned long u_int64;
+
+# elif SIZEOF_LONG_LONG == 8
+
+typedef long long int64;
+typedef unsigned long long u_int64;
+
+# else
-typedef u_char ntp_u_int8_t;
-typedef u_short ntp_u_int16_t;
-typedef u_int32 ntp_u_int32_t;
+/* no 64bit scalar, give it up. */
+# undef HAVE_INT64
+# undef HAVE_U_INT64
+
+# endif
+
+#endif
+
+/*
+ * and here the trouble starts: We need a representation with more than
+ * 64 bits. If a scalar of that size is not available, we need a struct
+ * that holds the value in split representation.
+ *
+ * To ease the usage a bit, we alwys use a union that is in processor
+ * byte order and might or might not contain a 64bit scalar.
+ */
+
+#if SIZEOF_SHORT != 2
+# error short is not 2 bytes -- what is 16 bit integer on this target?
+#endif
+
+typedef union {
+# ifdef WORDS_BIGENDIAN
+ struct {
+ int16_t hh; uint16_t hl; uint16_t lh; uint16_t ll;
+ } w_s;
+ struct {
+ uint16_t hh; uint16_t hl; uint16_t lh; uint16_t ll;
+ } W_s;
+ struct {
+ int32 hi; u_int32 lo;
+ } d_s;
+ struct {
+ u_int32 hi; u_int32 lo;
+ } D_s;
+# else
+ struct {
+ uint16_t ll; uint16_t lh; uint16_t hl; int16_t hh;
+ } w_s;
+ struct {
+ uint16_t ll; uint16_t lh; uint16_t hl; uint16_t hh;
+ } W_s;
+ struct {
+ u_int32 lo; int32 hi;
+ } d_s;
+ struct {
+ u_int32 lo; u_int32 hi;
+ } D_s;
+# endif
+
+# ifdef HAVE_INT64
+ int64 q_s; /* signed quad scalar */
+ u_int64 Q_s; /* unsigned quad scalar */
+# endif
+} vint64; /* variant int 64 */
+
+
+typedef uint8_t ntp_u_int8_t;
+typedef uint16_t ntp_u_int16_t;
+typedef uint32_t ntp_u_int32_t;
typedef struct ntp_uint64_t { u_int32 val[2]; } ntp_uint64_t;
-typedef unsigned short associd_t; /* association ID */
+typedef uint16_t associd_t; /* association ID */
+#define ASSOCID_MAX USHRT_MAX
typedef u_int32 keyid_t; /* cryptographic key ID */
+#define KEYID_T_MAX (0xffffffff)
typedef u_int32 tstamp_t; /* NTP seconds timestamp */
/*
+ * Cloning malloc()'s behavior of always returning pointers suitably
+ * aligned for the strictest alignment requirement of any type is not
+ * easy to do portably, as the maximum alignment required is not
+ * exposed. Use the size of a union of the types known to represent the
+ * strictest alignment on some platform.
+ */
+typedef union max_alignment_tag {
+ double d;
+} max_alignment;
+
+#define MAXALIGN sizeof(max_alignment)
+#define ALIGN_UNITS(sz) (((sz) + MAXALIGN - 1) / MAXALIGN)
+#define ALIGNED_SIZE(sz) (MAXALIGN * ALIGN_UNITS(sz))
+#define INC_ALIGNED_PTR(b, m) ((void *)aligned_ptr((void *)(b), m))
+
+static inline
+max_alignment *
+aligned_ptr(
+ max_alignment * base,
+ size_t minsize
+ )
+{
+ return base + ALIGN_UNITS((minsize < 1) ? 1 : minsize);
+}
+
+/*
+ * Macro to use in otherwise-empty source files to comply with ANSI C
+ * requirement that each translation unit (source file) contain some
+ * declaration. This has commonly been done by declaring an unused
+ * global variable of type int or char. An extern reference to exit()
+ * serves the same purpose without bloat.
+ */
+#define NONEMPTY_TRANSLATION_UNIT extern void exit(int);
+
+/*
* On Unix struct sock_timeval is equivalent to struct timeval.
* On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
* as required by Windows' socket() interface timeout argument, while
@@ -121,10 +268,21 @@ typedef u_int32 tstamp_t; /* NTP seconds timestamp */
* instead of refclock_open(), tty_open() is equivalent to open() on
* Unix and implemented in the Windows port similarly to
* refclock_open().
+ * Similarly, the termios emulation in the Windows code needs to know
+ * about serial ports being closed, while the Posix systems do not.
*/
#ifndef SYS_WINNT
-#define tty_open(f, a, m) open(f, a, m)
+# define tty_open(f, a, m) open(f, a, m)
+# define closeserial(fd) close(fd)
+# define closesocket(fd) close(fd)
+typedef int SOCKET;
+# define INVALID_SOCKET (-1)
+# define SOCKET_ERROR (-1)
+# define socket_errno() (errno)
+#else /* SYS_WINNT follows */
+# define socket_errno() (errno = WSAGetLastError())
#endif
+
#endif /* NTP_TYPES_H */
diff --git a/include/ntp_unixtime.h b/include/ntp_unixtime.h
index 8c43f1cea037..eaa8b1ed4545 100644
--- a/include/ntp_unixtime.h
+++ b/include/ntp_unixtime.h
@@ -1,13 +1,12 @@
/*
- * ntp_unixtime.h - contains constants and macros for converting between
- * NTP time stamps (l_fp) and Unix times (struct timeval)
+ * ntp_unixtime.h - much of what was here is now in timevalops.h
*/
-#include "ntp_types.h"
+#ifndef NTP_UNIXTIME_H
+#define NTP_UNIXTIME_H
-#ifdef SIM
-#include "ntpsim.h"
-#endif
+#include "ntp_types.h" /* picks up time.h via ntp_machine.h */
+#include "ntp_calendar.h"
#ifdef SIM
# define GETTIMEOFDAY(a, b) (node_gettime(&ntp_node, a))
@@ -19,7 +18,7 @@
# 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 GETTIMEOFDAY(a, b) (gettimeofday(a, b))
# define SETTIMEOFDAY(a, b) (settimeofday(a, b))
# else /* not (HAVE_SYS_TIMERS_H && HAVE_GETCLOCK) */
# ifdef SYSV_TIMEOFDAY
@@ -39,100 +38,10 @@ int getclock (int clock_type, struct timespec *tp);
/*
* 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.
+ * Unix in 1970. The value is 1970 - 1900 in seconds, 0x83aa7e80 or
+ * 2208988800. This is larger than 32-bit INT_MAX, so unsigned
+ * type is forced.
*/
-extern u_long msutotsflo[];
-extern u_long msutotsfhi[];
+#define JAN_1970 ((u_int)NTP_TO_UNIX_DAYS * (u_int)SECSPERDAY)
-#define MSUTOTSF(msu, tsf) \
- (tsf) = msutotsfhi[((msu) >> 5) & 0x1f] + msutotsflo[(msu) & 0x1f]
+#endif /* !defined(NTP_UNIXTIME_H) */
diff --git a/include/ntp_worker.h b/include/ntp_worker.h
new file mode 100644
index 000000000000..f7e8d5be7086
--- /dev/null
+++ b/include/ntp_worker.h
@@ -0,0 +1,162 @@
+/*
+ * ntp_worker.h
+ */
+
+#ifndef NTP_WORKER_H
+#define NTP_WORKER_H
+
+#include "ntp_workimpl.h"
+
+#ifdef WORKER
+# if defined(WORK_THREAD) && defined(WORK_PIPE)
+# ifdef HAVE_SEMAPHORE_H
+# include <semaphore.h>
+# endif
+# endif
+#include "ntp_stdlib.h"
+
+/* #define TEST_BLOCKING_WORKER */ /* ntp_config.c ntp_intres.c */
+
+typedef enum blocking_work_req_tag {
+ BLOCKING_GETNAMEINFO,
+ BLOCKING_GETADDRINFO,
+} blocking_work_req;
+
+typedef void (*blocking_work_callback)(blocking_work_req, void *, size_t, void *);
+
+typedef enum blocking_magic_sig_e {
+ BLOCKING_REQ_MAGIC = 0x510c7ecf,
+ BLOCKING_RESP_MAGIC = 0x510c7e54,
+} blocking_magic_sig;
+
+/*
+ * The same header is used for both requests to and responses from
+ * the child. In the child, done_func and context are opaque.
+ */
+typedef struct blocking_pipe_header_tag {
+ size_t octets;
+ blocking_magic_sig magic_sig;
+ blocking_work_req rtype;
+ u_int child_idx;
+ blocking_work_callback done_func;
+ void * context;
+} blocking_pipe_header;
+
+# ifdef WORK_THREAD
+# ifdef WORK_PIPE
+typedef pthread_t * thr_ref;
+typedef sem_t * sem_ref;
+# else
+typedef HANDLE thr_ref;
+typedef HANDLE sem_ref;
+# endif
+# endif
+
+/*
+ *
+ */
+#ifdef WORK_FORK
+typedef struct blocking_child_tag {
+ int reusable;
+ int pid;
+ int req_write_pipe; /* parent */
+ int resp_read_pipe;
+ void * resp_read_ctx;
+ int req_read_pipe; /* child */
+ int resp_write_pipe;
+ int ispipe;
+} blocking_child;
+#elif defined(WORK_THREAD)
+typedef struct blocking_child_tag {
+/*
+ * blocking workitems and blocking_responses are dynamically-sized
+ * one-dimensional arrays of pointers to blocking worker requests and
+ * responses.
+ */
+ int reusable;
+ thr_ref thread_ref;
+ u_int thread_id;
+ blocking_pipe_header * volatile * volatile
+ workitems;
+ volatile size_t workitems_alloc;
+ size_t next_workitem; /* parent */
+ size_t next_workeritem; /* child */
+ blocking_pipe_header * volatile * volatile
+ responses;
+ volatile size_t responses_alloc;
+ size_t next_response; /* child */
+ size_t next_workresp; /* parent */
+ /* event handles / sem_t pointers */
+ /* sem_ref child_is_blocking; */
+ sem_ref blocking_req_ready;
+ sem_ref wake_scheduled_sleep;
+#ifdef WORK_PIPE
+ int resp_read_pipe; /* parent */
+ int resp_write_pipe;/* child */
+ int ispipe;
+ void * resp_read_ctx; /* child */
+#else
+ sem_ref blocking_response_ready;
+#endif
+} blocking_child;
+
+#endif /* WORK_THREAD */
+
+extern blocking_child ** blocking_children;
+extern size_t blocking_children_alloc;
+extern int worker_per_query; /* boolean */
+extern int intres_req_pending;
+
+extern u_int available_blocking_child_slot(void);
+extern int queue_blocking_request(blocking_work_req, void *,
+ size_t, blocking_work_callback,
+ void *);
+extern int queue_blocking_response(blocking_child *,
+ blocking_pipe_header *, size_t,
+ const blocking_pipe_header *);
+extern void process_blocking_resp(blocking_child *);
+extern int send_blocking_req_internal(blocking_child *,
+ blocking_pipe_header *,
+ void *);
+extern int send_blocking_resp_internal(blocking_child *,
+ blocking_pipe_header *);
+extern blocking_pipe_header *
+ receive_blocking_req_internal(blocking_child *);
+extern blocking_pipe_header *
+ receive_blocking_resp_internal(blocking_child *);
+extern int blocking_child_common(blocking_child *);
+extern void exit_worker(int)
+ __attribute__ ((__noreturn__));
+extern int worker_sleep(blocking_child *, time_t);
+extern void worker_idle_timer_fired(void);
+extern void interrupt_worker_sleep(void);
+extern int req_child_exit(blocking_child *);
+#ifndef HAVE_IO_COMPLETION_PORT
+extern int pipe_socketpair(int fds[2], int *is_pipe);
+extern void close_all_beyond(int);
+extern void close_all_except(int);
+extern void kill_asyncio (int);
+#endif
+
+# ifdef WORK_PIPE
+typedef void (*addremove_io_fd_func)(int, int, int);
+extern addremove_io_fd_func addremove_io_fd;
+# else
+extern void handle_blocking_resp_sem(void *);
+typedef void (*addremove_io_semaphore_func)(sem_ref, int);
+extern addremove_io_semaphore_func addremove_io_semaphore;
+# endif
+
+# ifdef WORK_FORK
+extern int worker_process;
+# endif
+
+#endif /* WORKER */
+
+#if defined(HAVE_DROPROOT) && defined(WORK_FORK)
+extern void fork_deferred_worker(void);
+#else
+# define fork_deferred_worker() do {} while (0)
+#endif
+
+#endif /* !NTP_WORKER_H */
diff --git a/include/ntp_workimpl.h b/include/ntp_workimpl.h
new file mode 100644
index 000000000000..a86c2cd0bff0
--- /dev/null
+++ b/include/ntp_workimpl.h
@@ -0,0 +1,30 @@
+/*
+ * ntp_workimpl.h - selects worker child implementation
+ */
+#ifndef NTP_WORKIMPL_H
+#define NTP_WORKIMPL_H
+
+/*
+ * Some systems do not support fork() and don't have an alternate
+ * threads implementation of ntp_intres. Such systems are limited
+ * to using numeric IP addresses.
+ */
+#if defined(SYS_WINNT)
+# define WORK_THREAD
+#elif defined(ISC_PLATFORM_USETHREADS) && \
+ defined(HAVE_SEM_TIMEDWAIT) && \
+ (defined(HAVE_GETCLOCK) || defined(HAVE_CLOCK_GETTIME))
+# define WORK_THREAD
+# define WORK_PIPE
+#elif defined(VMS) || defined(SYS_VXWORKS)
+ /* empty */
+#elif defined(HAVE_WORKING_FORK)
+# define WORK_FORK
+# define WORK_PIPE
+#endif
+
+#if defined(WORK_FORK) || defined(WORK_THREAD)
+# define WORKER
+#endif
+
+#endif /* !NTP_WORKIMPL_H */
diff --git a/include/ntpd.h b/include/ntpd.h
index 75e87de97a41..51d8f2accd3e 100644
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -1,17 +1,59 @@
/*
- * ntpd.h - Prototypes for ntpd.
+ * ntpd.h - Prototypes and external variables for ntpd.
+ *
+ * Note the first half is primarily function prototypes, type
+ * declarations, and preprocessor macros, with variables declared
+ * primarily in the second half.
+ *
+ * Each half is further divided into sections for each source file.
*/
#include "ntp.h"
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
#include "ntp_debug.h"
#include "ntp_syslog.h"
#include "ntp_select.h"
#include "ntp_malloc.h"
#include "ntp_refclock.h"
+#include "ntp_intres.h"
#include "recvbuff.h"
-/* ntp_config.c */
+/*
+ * First half: ntpd types, functions, macros
+ * -----------------------------------------
+ */
+
+/*
+ * macro for debugging output - cut down on #ifdef pollution.
+ *
+ * DPRINTF() is for use by ntpd only, and compiles away to nothing
+ * without DEBUG (configure --disable-debugging).
+ *
+ * TRACE() is similar for libntp and utilities, which retain full
+ * debug capability even when compiled without DEBUG.
+ *
+ * The calling convention is not attractive:
+ * DPRINTF(debuglevel, (fmt, ...));
+ * DPRINTF(2, ("shows #ifdef DEBUG and if debug >= %d\n", 2));
+ */
+#ifdef DEBUG
+# define DPRINTF(lvl, arg) \
+ do { \
+ if (debug >= (lvl)) \
+ mprintf arg; \
+ } while (0)
+#else
+# define DPRINTF(lvl, arg) do {} while (0)
+#endif
+
+
+/* nt_clockstuff.c */
+#ifdef SYS_WINNT
+extern void win_time_stepped(void);
+#endif
+/* ntp_config.c */
#define TAI_1972 10 /* initial TAI offset (s) */
extern char *keysdir; /* crypto keys and leaptable directory */
extern char * saveconfigdir; /* ntpq saveconfig output directory */
@@ -23,10 +65,10 @@ extern u_short ctlpeerstatus (struct peer *);
extern int ctlsettrap (sockaddr_u *, struct interface *, int, int);
extern u_short ctlsysstatus (void);
extern void init_control (void);
-extern void init_logging (char const *, int);
-extern void setup_logfile (void);
extern void process_control (struct recvbuf *, int);
extern void report_event (int, struct peer *, const char *);
+extern int mprintf_event (int, struct peer *, const char *, ...)
+ NTP_PRINTF(3, 4);
/* ntp_control.c */
/*
@@ -52,18 +94,11 @@ struct ctl_var {
#define WO (CAN_WRITE)
#define RW (CAN_READ|CAN_WRITE)
-extern char * add_var (struct ctl_var **, u_long, u_short);
-extern void free_varlist (struct ctl_var *);
-extern void set_var (struct ctl_var **, const char *, u_long, u_short);
-extern void set_sys_var (const char *, u_long, u_short);
-
-/* ntp_intres.c */
-extern void ntp_res_name (sockaddr_u, u_short);
-extern void ntp_res_recv (void);
-extern void ntp_intres (void);
-#ifdef SYS_WINNT
-extern unsigned WINAPI ntp_intres_thread (void *);
-#endif
+extern char * add_var (struct ctl_var **, u_long, u_short);
+extern void free_varlist (struct ctl_var *);
+extern void set_var (struct ctl_var **, const char *, u_long, u_short);
+extern void set_sys_var (const char *, u_long, u_short);
+extern const char * get_ext_sys_var(const char *tag);
/* ntp_io.c */
typedef struct interface_info {
@@ -73,27 +108,26 @@ typedef struct interface_info {
typedef void (*interface_receiver_t) (void *, interface_info_t *);
-extern int disable_dynamic_updates;
-
extern void interface_enumerate (interface_receiver_t, void *);
+extern endpt * getinterface (sockaddr_u *, u_int32);
+extern endpt * select_peerinterface (struct peer *, sockaddr_u *,
+ endpt *);
extern endpt * findinterface (sockaddr_u *);
extern endpt * findbcastinter (sockaddr_u *);
extern void enable_broadcast (endpt *, sockaddr_u *);
extern void enable_multicast_if (endpt *, sockaddr_u *);
extern void interface_update (interface_receiver_t, void *);
-
+#ifndef HAVE_IO_COMPLETION_PORT
+extern void io_handler (void);
+#endif
extern void init_io (void);
extern void io_open_sockets (void);
-extern void input_handler (l_fp *);
extern void io_clr_stats (void);
extern void io_setbclient (void);
extern void io_unsetbclient (void);
extern void io_multicast_add(sockaddr_u *);
extern void io_multicast_del(sockaddr_u *);
extern void sendpkt (sockaddr_u *, struct interface *, int, struct pkt *, int);
-#ifndef SYS_WINNT
-extern void kill_asyncio (int);
-#endif
#ifdef DEBUG
extern void collect_timing (struct recvbuf *, const char *, int, l_fp *);
#endif
@@ -101,11 +135,11 @@ extern void collect_timing (struct recvbuf *, const char *, int, l_fp *);
extern void wait_for_signal (void);
extern void unblock_io_and_alarm (void);
extern void block_io_and_alarm (void);
-#define UNBLOCK_IO_AND_ALARM() unblock_io_and_alarm()
-#define BLOCK_IO_AND_ALARM() block_io_and_alarm()
+# define UNBLOCK_IO_AND_ALARM() unblock_io_and_alarm()
+# define BLOCK_IO_AND_ALARM() block_io_and_alarm()
#else
-#define UNBLOCK_IO_AND_ALARM()
-#define BLOCK_IO_AND_ALARM()
+# define UNBLOCK_IO_AND_ALARM() do {} while (0)
+# define BLOCK_IO_AND_ALARM() do {} while (0)
#endif
#define latoa(pif) localaddrtoa(pif)
extern const char * localaddrtoa(endpt *);
@@ -115,36 +149,48 @@ extern void init_loopfilter(void);
extern int local_clock(struct peer *, double);
extern void adj_host_clock(void);
extern void loop_config(int, double);
+extern void select_loop(int);
extern void huffpuff(void);
extern u_long sys_clocktime;
extern u_int sys_tai;
+extern int freq_cnt;
/* ntp_monitor.c */
+#define MON_HASH_SIZE (1U << mon_hash_bits)
+#define MON_HASH_MASK (MON_HASH_SIZE - 1)
+#define MON_HASH(addr) (sock_hash(addr) & MON_HASH_MASK)
extern void init_mon (void);
extern void mon_start (int);
extern void mon_stop (int);
-extern int ntp_monitor (struct recvbuf *, int);
-extern void ntp_monclearinterface (struct interface *interface);
+extern u_short ntp_monitor (struct recvbuf *, u_short);
+extern void mon_clearinterface(endpt *interface);
/* ntp_peer.c */
extern void init_peer (void);
-extern struct peer *findexistingpeer (sockaddr_u *, struct peer *, int, u_char);
+extern struct peer *findexistingpeer(sockaddr_u *, const char *,
+ struct peer *, int, u_char);
extern struct peer *findpeer (struct recvbuf *, int, int *);
-extern struct peer *findpeerbyassoc (u_int);
-extern void set_peerdstadr (struct peer *peer, struct interface *interface);
-extern struct peer *newpeer (sockaddr_u *, struct interface *, int, int, int, int, u_int, u_char, int, keyid_t);
+extern struct peer *findpeerbyassoc(associd_t);
+extern void set_peerdstadr (struct peer *, endpt *);
+extern struct peer *newpeer (sockaddr_u *, const char *,
+ endpt *, u_char, u_char,
+ u_char, u_char, u_int, u_char, u_int32,
+ keyid_t, const char *);
extern void peer_all_reset (void);
extern void peer_clr_stats (void);
-extern struct peer *peer_config (sockaddr_u *, struct interface *, int, int, int, int, u_int, int, keyid_t, u_char *);
+extern struct peer *peer_config(sockaddr_u *, const char *,
+ endpt *, u_char, u_char,
+ u_char, u_char, u_int, u_int32,
+ keyid_t, const char *);
extern void peer_reset (struct peer *);
-extern void refresh_all_peerinterfaces (void);
+extern void refresh_all_peerinterfaces(void);
extern void unpeer (struct peer *);
extern void clear_all (void);
extern int score_all (struct peer *);
-extern struct peer *findmanycastpeer (struct recvbuf *);
+extern struct peer *findmanycastpeer(struct recvbuf *);
/* ntp_crypto.c */
-#ifdef OPENSSL
+#ifdef AUTOKEY
extern int crypto_recv (struct peer *, struct recvbuf *);
extern int crypto_xmit (struct peer *, struct pkt *,
struct recvbuf *, int,
@@ -167,7 +213,7 @@ extern EVP_PKEY *gqpar_pkey;
extern char *mvpar_file;
extern EVP_PKEY *mvpar_pkey;
extern struct value tai_leap;
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/* ntp_proto.c */
extern void transmit (struct peer *);
@@ -176,31 +222,24 @@ extern void peer_clear (struct peer *, char *);
extern void process_packet (struct peer *, struct pkt *, u_int);
extern void clock_select (void);
-extern int leap_tai; /* TAI at next leap */
-extern u_long leap_sec; /* next scheduled leap from file */
-extern u_long leap_peers; /* next scheduled leap from peers */
-extern u_long leapsec; /* seconds to next leap */
-extern u_long leap_expire; /* leap information expiration */
+extern u_long leapsec; /* seconds to next leap (proximity class) */
+extern int leapdif; /* TAI difference step at next leap second*/
extern int sys_orphan;
extern double sys_mindisp;
extern double sys_maxdist;
-/*
- * 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 (struct peer *, int);
+extern char *sys_ident; /* identity scheme */
+extern void poll_update (struct peer *, u_char);
extern void clear (struct peer *);
extern void clock_filter (struct peer *, double, double, double);
extern void init_proto (void);
+extern void set_sys_tick_precision(double);
extern void proto_config (int, u_long, double, sockaddr_u *);
extern void proto_clr_stats (void);
-#ifdef REFCLOCK
/* ntp_refclock.c */
+#ifdef REFCLOCK
extern int refclock_newpeer (struct peer *);
extern void refclock_unpeer (struct peer *);
extern void refclock_receive (struct peer *);
@@ -211,26 +250,30 @@ extern void init_refclock (void);
/* ntp_request.c */
extern void init_request (void);
extern void process_private (struct recvbuf *, int);
+extern void reset_auth_stats(void);
/* ntp_restrict.c */
extern void init_restrict (void);
extern u_short restrictions (sockaddr_u *);
-extern void hack_restrict (int, sockaddr_u *, sockaddr_u *, u_short, u_short);
+extern void hack_restrict (int, sockaddr_u *, sockaddr_u *,
+ u_short, u_short, u_long);
+extern void restrict_source (sockaddr_u *, int, u_long);
/* ntp_timer.c */
extern void init_timer (void);
extern void reinit_timer (void);
extern void timer (void);
extern void timer_clr_stats (void);
-extern void timer_interfacetimeout (u_long);
-extern volatile int interface_interval;
-#ifdef OPENSSL
+extern void timer_interfacetimeout (u_long);
+extern volatile int interface_interval;
+extern u_long orphwait; /* orphan wait time */
+#ifdef AUTOKEY
extern char *sys_hostname; /* host name */
extern char *sys_groupname; /* group name */
extern char *group_name; /* group name */
-extern u_long sys_revoke; /* keys revoke timeout */
-extern u_long sys_automax; /* session key timeout */
-#endif /* OPENSSL */
+extern u_long sys_revoke; /* keys revoke timeout */
+extern u_long sys_automax; /* session key timeout */
+#endif /* AUTOKEY */
/* ntp_util.c */
extern void init_util (void);
@@ -240,22 +283,39 @@ extern void record_peer_stats (sockaddr_u *, int, double, double, double, double
extern void record_proto_stats (char *);
extern void record_loop_stats (double, double, double, double, int);
extern void record_clock_stats (sockaddr_u *, const char *);
-extern void record_raw_stats (sockaddr_u *, sockaddr_u *, l_fp *, l_fp *, l_fp *, l_fp *);
-extern u_long leap_month(u_long);
+extern int mprintf_clock_stats(sockaddr_u *, const char *, ...)
+ NTP_PRINTF(2, 3);
+extern void record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int poll, int precision, double root_delay, double root_dispersion, u_int32 refid);
+extern void check_leap_file (int is_daily_check, u_int32 ntptime, const time_t * systime);
extern void record_crypto_stats (sockaddr_u *, const char *);
#ifdef DEBUG
extern void record_timing_stats (const char *);
#endif
-extern u_short sock_hash (sockaddr_u *);
extern char * fstostr(time_t); /* NTP timescale seconds */
-extern double old_drift;
-extern int drift_file_sw;
-extern double wander_threshold;
-extern double wander_resid;
+
+/* ntpd.c */
+extern void parse_cmdline_opts(int *, char ***);
+/*
+ * Signals we catch for debugging.
+ */
+#define MOREDEBUGSIG SIGUSR1
+#define LESSDEBUGSIG SIGUSR2
+/*
+ * Signals which terminate us gracefully.
+ */
+#ifndef SYS_WINNT
+# define SIGDIE1 SIGHUP
+# define SIGDIE2 SIGINT
+# define SIGDIE3 SIGQUIT
+# define SIGDIE4 SIGTERM
+#endif /* SYS_WINNT */
+
/*
- * Variable declarations for ntpd.
+ * Last half: ntpd variables
+ * -------------------------
*/
+
/* ntp_config.c */
extern char const * progname;
extern char *sys_phone[]; /* ACTS phone numbers */
@@ -264,7 +324,7 @@ extern int config_priority_override;
extern int config_priority;
#endif
extern char *ntp_signd_socket;
-extern struct config_tree *cfg_tree_history;
+extern struct config_tree_tag *cfg_tree_history;
#ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
/*
@@ -301,17 +361,6 @@ 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 int req_keytype; /* OpenSSL NID such as NID_md5 */
-extern size_t req_hashlen; /* digest size for req_keytype */
-extern char * req_file; /* name of the file with configuration info */
-#ifdef SYS_WINNT
-extern HANDLE ResolverEventHandle;
-#else
-extern int resolver_pipe_fd[2]; /* used to let the resolver process alert the parent process */
-#endif /* SYS_WINNT */
-
/*
* Other statistics of possible interest
*/
@@ -325,18 +374,13 @@ 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
- */
+/* ntp_io.c */
+extern int disable_dynamic_updates;
+extern u_int sys_ifnum; /* next .ifnum to assign */
extern endpt * any_interface; /* IPv4 wildcard */
extern endpt * any6_interface; /* IPv6 wildcard */
extern endpt * loopback_interface; /* IPv4 loopback for refclocks */
-
-/*
- * File descriptor masks etc. for call to select
- */
-extern fd_set activefds;
-extern int maxactivefd;
+extern endpt * ep_list; /* linked list */
/* ntp_loopfilter.c */
extern double drift_comp; /* clock frequency (s/s) */
@@ -356,7 +400,7 @@ extern int pll_status; /* status bits for kernel pll */
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 hardpps_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 */
@@ -377,16 +421,28 @@ extern double sys_offset; /* system offset (s) */
extern double sys_jitter; /* system jitter (s) */
/* ntp_monitor.c */
-extern struct mon_data mon_mru_list;
-extern struct mon_data mon_fifo_list;
-extern int mon_enabled;
+extern u_char mon_hash_bits; /* log2 size of hash table */
+extern mon_entry ** mon_hash; /* MRU hash table */
+extern mon_entry mon_mru_list; /* mru listhead */
+extern u_int mon_enabled; /* MON_OFF (0) or other MON_* */
+extern u_int mru_alloc; /* mru list + free list count */
+extern u_int mru_entries; /* mru list count */
+extern u_int mru_peakentries; /* highest mru_entries */
+extern u_int mru_initalloc; /* entries to preallocate */
+extern u_int mru_incalloc; /* allocation batch factor */
+extern u_int mru_mindepth; /* preempt above this */
+extern int mru_maxage; /* for entries older than */
+extern u_int mru_maxdepth; /* MRU size hard limit */
+extern int mon_age; /* preemption limit */
/* 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;
+extern struct peer *peer_hash[NTP_HASH_SIZE]; /* peer hash table */
+extern int peer_hash_count[NTP_HASH_SIZE]; /* count of in each bucket */
+extern struct peer *assoc_hash[NTP_HASH_SIZE]; /* association ID hash table */
+extern int assoc_hash_count[NTP_HASH_SIZE];/* count of in each bucket */
+extern struct peer *peer_list; /* peer structures list */
+extern int peer_count; /* count in peer_list */
+extern int peer_free_count; /* count in peer_free */
/*
* Miscellaneous statistic counters which may be queried.
@@ -399,6 +455,7 @@ 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; /* mobilized associations */
extern int peer_preempt; /* preemptable associations */
+
/* ntp_proto.c */
/*
* System variables are declared here. See Section 3.2 of the
@@ -420,6 +477,7 @@ 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 u_long sys_epoch; /* last clock update time */
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 */
@@ -445,45 +503,60 @@ extern u_long sys_declined; /* declined */
extern u_long sys_limitrejected; /* rate exceeded */
extern u_long sys_kodsent; /* KoD sent */
-/* ntp_refclock.c */
-#ifdef REFCLOCK
-#ifdef PPS
-extern int fdpps; /* pps file descriptor */
-#endif /* PPS */
-#endif
-
/* ntp_request.c */
extern keyid_t info_auth_keyid; /* keyid used to authenticate requests */
+extern u_long auth_timereset;
/* ntp_restrict.c */
extern restrict_u * restrictlist4; /* IPv4 restriction list */
extern restrict_u * restrictlist6; /* IPv6 restriction list */
-extern int ntp_minpkt;
-extern int ntp_minpoll;
-extern int mon_age; /* monitor preempt age */
+extern int ntp_minpkt;
+extern u_char ntp_minpoll;
+
+/* ntp_scanner.c */
+extern u_int32 conf_file_sum; /* Simple sum of characters */
+
+/* ntp_signd.c */
+#ifdef HAVE_NTP_SIGND
+extern void send_via_ntp_signd(struct recvbuf *, int, keyid_t, int,
+ struct pkt *);
+#endif
/* ntp_timer.c */
extern volatile int alarm_flag; /* alarm flag */
extern volatile u_long alarm_overflow;
-extern u_long current_time; /* current time (s) */
+extern u_long current_time; /* seconds since startup */
extern u_long timer_timereset;
extern u_long timer_overflows;
extern u_long timer_xmtcalls;
+#ifdef SYS_WINNT
+HANDLE WaitableTimerHandle;
+#endif
/* ntp_util.c */
-extern int stats_control; /* write stats to fileset? */
-extern int stats_write_period; /* # of seconds between writes. */
-extern double stats_write_tolerance;
+extern char statsdir[MAXFILENAME];
+extern int stats_control; /* write stats to fileset? */
+extern int stats_write_period; /* # of seconds between writes. */
+extern double stats_write_tolerance;
+extern double wander_threshold;
/* ntpd.c */
-extern volatile int debug; /* debugging flag */
-extern int nofork; /* no-fork flag */
-extern int initializing; /* initializing flag */
+extern int nofork; /* no-fork flag */
+extern int initializing; /* initializing flag */
#ifdef HAVE_DROPROOT
-extern int droproot; /* flag: try to drop root privileges after startup */
-extern char *user; /* user to switch to */
-extern char *group; /* group to switch to */
-extern const char *chrootdir; /* directory to chroot to */
+extern int droproot; /* flag: try to drop root privileges after startup */
+extern int root_dropped; /* root has been dropped */
+extern char *user; /* user to switch to */
+extern char *group; /* group to switch to */
+extern const char *chrootdir; /* directory to chroot() to */
+#endif
+#ifdef HAVE_WORKING_FORK
+extern int waitsync_fd_to_close; /* -w/--wait-sync */
+#endif
+
+/* ntservice.c */
+#ifdef SYS_WINNT
+extern int accept_wildcard_if_for_winnt;
#endif
/* refclock_conf.c */
@@ -493,14 +566,3 @@ extern struct refclock * const refclock_conf[];
extern u_char num_refclock_conf;
#endif
-/* ntp_signd.c */
-#ifdef HAVE_NTP_SIGND
-extern void
-send_via_ntp_signd(
- struct recvbuf *rbufp, /* receive packet pointer */
- int xmode,
- keyid_t xkeyid,
- int flags,
- struct pkt *xpkt
- );
-#endif
diff --git a/include/ntpsim.h b/include/ntpsim.h
index 971c7f16340c..b270ce640b18 100644
--- a/include/ntpsim.h
+++ b/include/ntpsim.h
@@ -26,8 +26,7 @@
#include "recvbuff.h"
#include "ntp_io.h"
#include "ntp_stdlib.h"
-
-#include "ntp_data_structures.h"
+#include "ntp_prio_q.h"
/* CONSTANTS */
@@ -77,26 +76,32 @@ typedef struct {
/* Server Script Information */
+typedef struct script_info_tag script_info;
+struct script_info_tag {
+ script_info * link;
+ double duration;
+ double freq_offset;
+ double wander;
+ double jitter;
+ double prop_delay;
+ double proc_delay;
+};
-typedef struct {
- double duration;
- double freq_offset;
- double wander;
- double jitter;
- double prop_delay;
- double proc_delay;
-} script_info;
-
+typedef DECL_FIFO_ANCHOR(script_info) script_info_fifo;
/* Server Structures */
-typedef struct {
- double server_time; /* Server time */
- sockaddr_u *addr; /* Server Address */
- queue *script; /* Server Script */
- script_info *curr_script; /* Current Script */
-} server_info;
+typedef struct server_info_tag server_info;
+struct server_info_tag {
+ server_info * link;
+ double server_time;
+ sockaddr_u * addr;
+ script_info_fifo * script;
+ script_info * curr_script;
+};
+
+typedef DECL_FIFO_ANCHOR(server_info) server_info_fifo;
/* Simulation control information */
@@ -114,30 +119,28 @@ typedef struct Sim_Info {
/* Local Clock (Client) Variables */
typedef struct Local_Clock_Info {
- double local_time; /* Client disciplined time */
- double adj; /* Remaining time correction */
- double slew; /* Correction Slew Rate */
- double last_read_time; /* Last time the clock was read */
+ double local_time; /* Client disciplined time */
+ double adj; /* Remaining time correction */
+ double slew; /* Correction Slew Rate */
+ double last_read_time; /* Last time the clock was read */
} local_clock_info;
-extern local_clock_info simclock; /* Local Clock Variables */
-extern sim_info simulation; /* Simulation Control Variables */
+extern local_clock_info simclock; /* Local Clock Variables */
+extern sim_info simulation; /* Simulation Control Variables */
/* Function Prototypes */
-int ntpsim (int argc, char *argv[]);
-Event *event (double t, funcTkn f);
-void sim_event_timer (Event *e);
-int simulate_server (sockaddr_u *serv_addr,
- struct interface *inter,
- struct pkt *rpkt);
-void sim_update_clocks (Event *e);
-void sim_event_recv_packet (Event *e);
-void sim_event_beep (Event *e);
-void abortsim (char *errmsg);
-double gauss (double, double);
-double poisson (double, double);
-int yyparse (void);
-void create_server_associations (void);
+int ntpsim (int argc, char *argv[]);
+Event *event (double t, funcTkn f);
+void sim_event_timer (Event *e);
+int simulate_server (sockaddr_u *serv_addr, endpt *inter,
+ struct pkt *rpkt);
+void sim_update_clocks (Event *e);
+void sim_event_recv_packet (Event *e);
+void sim_event_beep (Event *e);
+void abortsim (char *errmsg);
+double gauss (double, double);
+double poisson (double, double);
+void create_server_associations(void);
#endif /* NTPSIM_H */
diff --git a/include/recvbuff.h b/include/recvbuff.h
index 3b205452e206..92188f5990cd 100644
--- a/include/recvbuff.h
+++ b/include/recvbuff.h
@@ -1,12 +1,8 @@
#ifndef RECVBUFF_H
#define RECVBUFF_H
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include "ntp.h"
-#include "ntp_fp.h"
+#include "ntp_net.h"
#include "ntp_lists.h"
#include <isc/result.h>
@@ -21,14 +17,14 @@
#if defined HAVE_IO_COMPLETION_PORT
# include "ntp_iocompletionport.h"
-#include "ntp_timer.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 (void);
+extern HANDLE get_recv_buff_event(void);
#else
# define RECV_BLOCK_IO()
# define RECV_UNBLOCK_IO()
@@ -51,40 +47,40 @@ extern HANDLE get_recv_buff_event (void);
typedef struct recvbuf recvbuf_t;
struct recvbuf {
- ISC_LINK(recvbuf_t) link; /* next in list */
+ recvbuf_t * link; /* next in list */
union {
- sockaddr_u X_recv_srcadr;
- caddr_t X_recv_srcclock;
- struct peer *X_recv_peer;
+ sockaddr_u 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
+#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
#ifndef HAVE_IO_COMPLETION_PORT
- sockaddr_u srcadr; /* where packet came from */
+ sockaddr_u srcadr; /* where packet came from */
#else
- int recv_srcadr_len; /* filled in on completion */
+ int recv_srcadr_len;/* filled in on completion */
#endif
- endpt * dstadr; /* address pkt arrived on */
- SOCKET fd; /* fd on which it was received */
- int msg_flags; /* Flags received about the packet */
- l_fp recv_time; /* time of arrival */
- void (*receiver) (struct recvbuf *); /* routine to receive buffer */
- int recv_length; /* number of octets received */
+ endpt * dstadr; /* address pkt arrived on */
+ SOCKET fd; /* fd on which it was received */
+ int msg_flags; /* Flags received about the packet */
+ l_fp recv_time; /* time of arrival */
+ void (*receiver)(struct recvbuf *); /* callback */
+ int recv_length; /* number of octets received */
union {
- struct pkt X_recv_pkt;
- u_char X_recv_buffer[RX_BUFF_SIZE];
+ 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
- int used; /* reference count */
+#define recv_pkt recv_space.X_recv_pkt
+#define recv_buffer recv_space.X_recv_buffer
+ int used; /* reference count */
};
-extern void init_recvbuff (int);
+extern void init_recvbuff(int);
/* freerecvbuf - make a single recvbuf available for reuse
*/
-extern void freerecvbuf (struct recvbuf *);
+extern void freerecvbuf(struct recvbuf *);
/* Get a free buffer (typically used so an async
* read can directly place data into the buffer
@@ -92,29 +88,36 @@ extern void freerecvbuf (struct recvbuf *);
* The buffer is removed from the free list. Make sure
* you put it back with freerecvbuf() or
*/
-extern struct recvbuf *get_free_recv_buffer (void); /* signal safe - no malloc */
-extern struct recvbuf *get_free_recv_buffer_alloc (void); /* signal unsafe - may malloc */
+
+/* signal safe - no malloc */
+extern struct recvbuf *get_free_recv_buffer(void);
+/* signal unsafe - may malloc */
+extern struct recvbuf *get_free_recv_buffer_alloc(void);
/* Add a buffer to the full list
*/
-extern void add_full_recv_buffer (struct recvbuf *);
-
-/*extern void process_recv_buffers (void); */
+extern void add_full_recv_buffer(struct recvbuf *);
/* number of recvbufs on freelist */
-extern u_long free_recvbuffs (void);
-extern u_long full_recvbuffs (void);
-extern u_long total_recvbuffs (void);
-extern u_long lowater_additions (void);
+extern u_long free_recvbuffs(void);
+extern u_long full_recvbuffs(void);
+extern u_long total_recvbuffs(void);
+extern u_long lowater_additions(void);
/* Returns the next buffer in the full list.
*
*/
-extern struct recvbuf *get_full_recv_buffer (void);
+extern struct recvbuf *get_full_recv_buffer(void);
+
+/*
+ * purge_recv_buffers_for_fd() - purges any previously-received input
+ * from a given file descriptor.
+ */
+extern void purge_recv_buffers_for_fd(SOCKET);
/*
* Checks to see if there are buffers to process
*/
-extern isc_boolean_t has_full_recv_buffer (void);
+extern isc_boolean_t has_full_recv_buffer(void);
#endif /* RECVBUFF_H */
diff --git a/include/refclock_atom.h b/include/refclock_atom.h
index 9afce0207ff8..452e933a8d8d 100644
--- a/include/refclock_atom.h
+++ b/include/refclock_atom.h
@@ -1,8 +1,8 @@
/*
* Definitions for the atom driver and its friends
*/
+#undef NANOSECOND /* some systems define it differently */
#define NANOSECOND 1000000000 /* one second (ns) */
-#define RANGEGATE 500000 /* range gate (ns) */
struct refclock_atom {
pps_handle_t handle;
diff --git a/include/timepps-SCO.h b/include/timepps-SCO.h
index 130a153c69f0..ce9052e2461e 100644
--- a/include/timepps-SCO.h
+++ b/include/timepps-SCO.h
@@ -3,7 +3,7 @@
* Copyright (c) David L. Mills 1999-2000 *
* *
* Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and without fee is hereby *
+ * its documentation for any purpose and with or 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 *
diff --git a/include/timepps-Solaris.h b/include/timepps-Solaris.h
index 73faa5e08745..a2b1fbe3b677 100644
--- a/include/timepps-Solaris.h
+++ b/include/timepps-Solaris.h
@@ -3,7 +3,7 @@
* Copyright (c) David L. Mills 1999-2009 *
* *
* Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and without fee is hereby *
+ * its documentation for any purpose and with or 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 *
diff --git a/include/timepps-SunOS.h b/include/timepps-SunOS.h
index 6cd166e69c54..4e4c05e0fee4 100644
--- a/include/timepps-SunOS.h
+++ b/include/timepps-SunOS.h
@@ -3,7 +3,7 @@
* Copyright (c) David L. Mills 1999-2000 *
* *
* Permission to use, copy, modify, and distribute this software and *
- * its documentation for any purpose and without fee is hereby *
+ * its documentation for any purpose and with or 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 *
diff --git a/include/timespecops.h b/include/timespecops.h
new file mode 100644
index 000000000000..fa32e42a6000
--- /dev/null
+++ b/include/timespecops.h
@@ -0,0 +1,393 @@
+/*
+ * timespecops.h -- calculations on 'struct timespec' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * Rationale
+ * ---------
+ *
+ * Doing basic arithmetic on a 'struct timespec' is not exceedingly
+ * hard, but it requires tedious and repetitive code to keep the result
+ * normalised. We consider a timespec normalised when the nanosecond
+ * fraction is in the interval [0 .. 10^9[ ; there are multiple value
+ * pairs of seconds and nanoseconds that denote the same time interval,
+ * but the normalised representation is unique. No two different
+ * intervals can have the same normalised representation.
+ *
+ * Another topic is the representation of negative time intervals.
+ * There's more than one way to this, since both the seconds and the
+ * nanoseconds of a timespec are signed values. IMHO, the easiest way is
+ * to use a complement representation where the nanoseconds are still
+ * normalised, no matter what the sign of the seconds value. This makes
+ * normalisation easier, since the sign of the integer part is
+ * irrelevant, and it removes several sign decision cases during the
+ * calculations.
+ *
+ * As long as no signed integer overflow can occur with the nanosecond
+ * part of the operands, all operations work as expected and produce a
+ * normalised result.
+ *
+ * The exception to this are functions fix a '_fast' suffix, which do no
+ * normalisation on input data and therefore expect the input data to be
+ * normalised.
+ *
+ * Input and output operands may overlap; all input is consumed before
+ * the output is written to.
+ */
+#ifndef TIMESPECOPS_H
+#define TIMESPECOPS_H
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <math.h>
+
+#include "ntp.h"
+#include "timetoa.h"
+
+
+/* nanoseconds per second */
+#define NANOSECONDS 1000000000
+
+/* predicate: returns TRUE if the nanoseconds are in nominal range */
+#define timespec_isnormal(x) \
+ ((x)->tv_nsec >= 0 && (x)->tv_nsec < NANOSECONDS)
+
+/* predicate: returns TRUE if the nanoseconds are out-of-bounds */
+#define timespec_isdenormal(x) (!timespec_isnormal(x))
+
+/* conversion between l_fp fractions and nanoseconds */
+#ifdef HAVE_U_INT64
+# define FTOTVN(tsf) \
+ ((int32) \
+ (((u_int64)(tsf) * NANOSECONDS + 0x80000000) >> 32))
+# define TVNTOF(tvu) \
+ ((u_int32) \
+ ((((u_int64)(tvu) << 32) + NANOSECONDS / 2) / \
+ NANOSECONDS))
+#else
+# define NSECFRAC (FRAC / NANOSECONDS)
+# define FTOTVN(tsf) \
+ ((int32)((tsf) / NSECFRAC + 0.5))
+# define TVNTOF(tvu) \
+ ((u_int32)((tvu) * NSECFRAC + 0.5))
+#endif
+
+
+
+/* make sure nanoseconds are in nominal range */
+static inline struct timespec
+normalize_tspec(
+ struct timespec x
+ )
+{
+#if SIZEOF_LONG > 4
+ long z;
+
+ /*
+ * tv_nsec is of type 'long', and on a 64-bit machine using only
+ * loops becomes prohibitive once the upper 32 bits get
+ * involved. On the other hand, division by constant should be
+ * fast enough; so we do a division of the nanoseconds in that
+ * case. The floor adjustment step follows with the standard
+ * normalisation loops. And labs() is intentionally not used
+ * here: it has implementation-defined behaviour when applied
+ * to LONG_MIN.
+ */
+ if (x.tv_nsec < -3l * NANOSECONDS ||
+ x.tv_nsec > 3l * NANOSECONDS) {
+ z = x.tv_nsec / NANOSECONDS;
+ x.tv_nsec -= z * NANOSECONDS;
+ x.tv_sec += z;
+ }
+#endif
+ /* since 10**9 is close to 2**32, we don't divide but do a
+ * normalisation in a loop; this takes 3 steps max, and should
+ * outperform a division even if the mul-by-inverse trick is
+ * employed. */
+ if (x.tv_nsec < 0)
+ do {
+ x.tv_nsec += NANOSECONDS;
+ x.tv_sec--;
+ } while (x.tv_nsec < 0);
+ else if (x.tv_nsec >= NANOSECONDS)
+ do {
+ x.tv_nsec -= NANOSECONDS;
+ x.tv_sec++;
+ } while (x.tv_nsec >= NANOSECONDS);
+
+ return x;
+}
+
+/* x = a + b */
+static inline struct timespec
+add_tspec(
+ struct timespec a,
+ struct timespec b
+ )
+{
+ struct timespec x;
+
+ x = a;
+ x.tv_sec += b.tv_sec;
+ x.tv_nsec += b.tv_nsec;
+
+ return normalize_tspec(x);
+}
+
+/* x = a + b, b is fraction only */
+static inline struct timespec
+add_tspec_ns(
+ struct timespec a,
+ long b
+ )
+{
+ struct timespec x;
+
+ x = a;
+ x.tv_nsec += b;
+
+ return normalize_tspec(x);
+}
+
+/* x = a - b */
+static inline struct timespec
+sub_tspec(
+ struct timespec a,
+ struct timespec b
+ )
+{
+ struct timespec x;
+
+ x = a;
+ x.tv_sec -= b.tv_sec;
+ x.tv_nsec -= b.tv_nsec;
+
+ return normalize_tspec(x);
+}
+
+/* x = a - b, b is fraction only */
+static inline struct timespec
+sub_tspec_ns(
+ struct timespec a,
+ long b
+ )
+{
+ struct timespec x;
+
+ x = a;
+ x.tv_nsec -= b;
+
+ return normalize_tspec(x);
+}
+
+/* x = -a */
+static inline struct timespec
+neg_tspec(
+ struct timespec a
+ )
+{
+ struct timespec x;
+
+ x.tv_sec = -a.tv_sec;
+ x.tv_nsec = -a.tv_nsec;
+
+ return normalize_tspec(x);
+}
+
+/* x = abs(a) */
+static inline struct timespec
+abs_tspec(
+ struct timespec a
+ )
+{
+ struct timespec c;
+
+ c = normalize_tspec(a);
+ if (c.tv_sec < 0) {
+ if (c.tv_nsec != 0) {
+ c.tv_sec = -c.tv_sec - 1;
+ c.tv_nsec = NANOSECONDS - c.tv_nsec;
+ } else {
+ c.tv_sec = -c.tv_sec;
+ }
+ }
+
+ return c;
+}
+
+/*
+ * compare previously-normalised a and b
+ * return 1 / 0 / -1 if a < / == / > b
+ */
+static inline int
+cmp_tspec(
+ struct timespec a,
+ struct timespec b
+ )
+{
+ int r;
+
+ r = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec);
+ if (0 == r)
+ r = (a.tv_nsec > b.tv_nsec) -
+ (a.tv_nsec < b.tv_nsec);
+
+ return r;
+}
+
+/*
+ * compare possibly-denormal a and b
+ * return 1 / 0 / -1 if a < / == / > b
+ */
+static inline int
+cmp_tspec_denorm(
+ struct timespec a,
+ struct timespec b
+ )
+{
+ return cmp_tspec(normalize_tspec(a), normalize_tspec(b));
+}
+
+/*
+ * test previously-normalised a
+ * return 1 / 0 / -1 if a < / == / > 0
+ */
+static inline int
+test_tspec(
+ struct timespec a
+ )
+{
+ int r;
+
+ r = (a.tv_sec > 0) - (a.tv_sec < 0);
+ if (r == 0)
+ r = (a.tv_nsec > 0);
+
+ return r;
+}
+
+/*
+ * test possibly-denormal a
+ * return 1 / 0 / -1 if a < / == / > 0
+ */
+static inline int
+test_tspec_denorm(
+ struct timespec a
+ )
+{
+ return test_tspec(normalize_tspec(a));
+}
+
+/* return LIB buffer ptr to string rep */
+static inline const char *
+tspectoa(
+ struct timespec x
+ )
+{
+ return format_time_fraction(x.tv_sec, x.tv_nsec, 9);
+}
+
+/*
+ * convert to l_fp type, relative and absolute
+ */
+
+/* convert from timespec duration to l_fp duration */
+static inline l_fp
+tspec_intv_to_lfp(
+ struct timespec x
+ )
+{
+ struct timespec v;
+ l_fp y;
+
+ v = normalize_tspec(x);
+ y.l_uf = TVNTOF(v.tv_nsec);
+ y.l_i = (int32)v.tv_sec;
+
+ return y;
+}
+
+/* x must be UN*X epoch, output will be in NTP epoch */
+static inline l_fp
+tspec_stamp_to_lfp(
+ struct timespec x
+ )
+{
+ l_fp y;
+
+ y = tspec_intv_to_lfp(x);
+ y.l_ui += JAN_1970;
+
+ return y;
+}
+
+/* convert from l_fp type, relative signed/unsigned and absolute */
+static inline struct timespec
+lfp_intv_to_tspec(
+ l_fp x
+ )
+{
+ struct timespec out;
+ l_fp absx;
+ int neg;
+
+ neg = L_ISNEG(&x);
+ absx = x;
+ if (neg) {
+ L_NEG(&absx);
+ }
+ out.tv_nsec = FTOTVN(absx.l_uf);
+ out.tv_sec = absx.l_i;
+ if (neg) {
+ out.tv_sec = -out.tv_sec;
+ out.tv_nsec = -out.tv_nsec;
+ out = normalize_tspec(out);
+ }
+
+ return out;
+}
+
+static inline struct timespec
+lfp_uintv_to_tspec(
+ l_fp x
+ )
+{
+ struct timespec out;
+
+ out.tv_nsec = FTOTVN(x.l_uf);
+ out.tv_sec = x.l_ui;
+
+ return out;
+}
+
+/*
+ * absolute (timestamp) conversion. Input is time in NTP epoch, output
+ * is in UN*X epoch. The NTP time stamp will be expanded around the
+ * pivot time *p or the current time, if p is NULL.
+ */
+static inline struct timespec
+lfp_stamp_to_tspec(
+ l_fp x,
+ const time_t * p
+ )
+{
+ struct timespec out;
+ vint64 sec;
+
+ sec = ntpcal_ntp_to_time(x.l_ui, p);
+ out.tv_nsec = FTOTVN(x.l_uf);
+
+ /* copying a vint64 to a time_t needs some care... */
+#if SIZEOF_TIME_T <= 4
+ out.tv_sec = (time_t)sec.d_s.lo;
+#elif defined(HAVE_INT64)
+ out.tv_sec = (time_t)sec.q_s;
+#else
+ out.tv_sec = ((time_t)sec.d_s.hi << 32) | sec.d_s.lo;
+#endif
+
+ return out;
+}
+
+#endif /* TIMESPECOPS_H */
diff --git a/include/timetoa.h b/include/timetoa.h
new file mode 100644
index 000000000000..259944907741
--- /dev/null
+++ b/include/timetoa.h
@@ -0,0 +1,83 @@
+/*
+ * timetoa.h -- time_t related string formatting
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * Printing a 'time_t' has some portability pitfalls, due to it's opaque
+ * base type. The only requirement imposed by the standard is that it
+ * must be a numeric type. For all practical purposes it's a signed int,
+ * and 32 bits are common.
+ *
+ * Since the UN*X time epoch will cause a signed integer overflow for
+ * 32-bit signed int values in the year 2038, implementations slowly
+ * move to 64bit base types for time_t, even in 32-bit environments. In
+ * such an environment sizeof(time_t) could be bigger than sizeof(long)
+ * and the commonly used idiom of casting to long leads to truncation.
+ *
+ * As the printf() family has no standardised type specifier for time_t,
+ * guessing the right output format specifier is a bit troublesome and
+ * best done with the help of the preprocessor and "config.h".
+ */
+#ifndef TIMETOA_H
+#define TIMETOA_H
+
+#include "ntp_fp.h"
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+
+/*
+ * Given the size of time_t, guess what can be used as an unsigned value
+ * to hold a time_t and the printf() format specifcation.
+ *
+ * These should be used with the string constant concatenation feature
+ * of the compiler like this:
+ *
+ * printf("a time stamp: %" TIME_FORMAT " and more\n", a_time_t_value);
+ *
+ * It's not exactly nice, but there's not much leeway once we want to
+ * use the printf() family on time_t values.
+ */
+
+#if SIZEOF_TIME_T <= SIZEOF_INT
+
+typedef unsigned int u_time;
+#define TIME_FORMAT "d"
+#define UTIME_FORMAT "u"
+
+#elif SIZEOF_TIME_T <= SIZEOF_LONG
+
+typedef unsigned long u_time;
+#define TIME_FORMAT "ld"
+#define UTIME_FORMAT "lu"
+
+#elif defined(SIZEOF_LONG_LONG) && SIZEOF_TIME_T <= SIZEOF_LONG_LONG
+
+typedef unsigned long long u_time;
+#define TIME_FORMAT "lld"
+#define UTIME_FORMAT "llu"
+
+#else
+#include "GRONK: what size has a time_t here?"
+#endif
+
+/*
+ * general fractional time stamp formatting.
+ *
+ * secs - integral seconds of time stamp
+ * frac - fractional units
+ * prec - log10 of units per second (3=milliseconds, 6=microseconds,..)
+ * or in other words: the count of decimal digits required.
+ * If prec is < 0, abs(prec) is taken for the precision and secs
+ * is treated as an unsigned value.
+ *
+ * The function will eventually normalise the fraction and adjust the
+ * seconds accordingly.
+ *
+ * This function uses the string buffer library for the return value,
+ * so do not keep the resulting pointers around.
+ */
+extern const char *
+format_time_fraction(time_t secs, long frac, int prec);
+
+#endif /* !defined(TIMETOA_H) */
diff --git a/include/timevalops.h b/include/timevalops.h
new file mode 100644
index 000000000000..e873b8b8006e
--- /dev/null
+++ b/include/timevalops.h
@@ -0,0 +1,446 @@
+/*
+ * timevalops.h -- calculations on 'struct timeval' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * For a rationale look at 'timespecops.h'; we do the same here, but the
+ * normalisation keeps the microseconds in [0 .. 10^6[, of course.
+ */
+#ifndef TIMEVALOPS_H
+#define TIMEVALOPS_H
+
+#include <sys/types.h>
+#include <stdio.h>
+
+#include "ntp.h"
+#include "timetoa.h"
+
+
+/* microseconds per second */
+#define MICROSECONDS 1000000
+
+#ifndef HAVE_U_INT64
+# define USE_TSF_USEC_TABLES
+#endif
+
+/*
+ * Convert usec to a time stamp fraction.
+ */
+#ifdef USE_TSF_USEC_TABLES
+extern const u_int32 ustotslo[];
+extern const u_int32 ustotsmid[];
+extern const u_int32 ustotshi[];
+
+# define TVUTOTSF(tvu, tsf) \
+ ((tsf) = ustotslo[(tvu) & 0xff] \
+ + ustotsmid[((tvu) >> 8) & 0xff] \
+ + ustotshi[((tvu) >> 16) & 0xf])
+#else
+# define TVUTOTSF(tvu, tsf) \
+ ((tsf) = (u_int32) \
+ ((((u_int64)(tvu) << 32) + MICROSECONDS / 2) / \
+ MICROSECONDS))
+#endif
+
+/*
+ * Convert a time stamp fraction to microseconds. The time stamp
+ * fraction is assumed to be unsigned.
+ */
+#ifdef USE_TSF_USEC_TABLES
+extern const u_int32 tstouslo[256];
+extern const u_int32 tstousmid[256];
+extern const u_int32 tstoushi[128];
+
+/*
+ * 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
+
+# define TSFTOTVU(tsf, tvu) \
+ ((tvu) = (tstoushi[((tsf) >> 24) & 0xff] \
+ + tstousmid[((tsf) >> 16) & 0xff] \
+ + tstouslo[((tsf) >> 9) & 0x7f] \
+ + TV_ROUNDBIT) >> TV_SHIFT)
+#else
+# define TSFTOTVU(tsf, tvu) \
+ ((tvu) = (int32) \
+ (((u_int64)(tsf) * MICROSECONDS + 0x80000000) >> 32))
+#endif
+
+/*
+ * 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 (FALSE)
+
+#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 (FALSE)
+
+/*
+ * 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 (FALSE)
+
+
+/*
+ * predicate: returns TRUE if the microseconds are in nominal range
+ * use like: int timeval_isnormal(const struct timeval *x)
+ */
+#define timeval_isnormal(x) \
+ ((x)->tv_usec >= 0 && (x)->tv_usec < MICROSECONDS)
+
+/*
+ * Convert milliseconds to a time stamp fraction. Unused except for
+ * refclock_leitch.c, so accompanying lookup tables were removed in
+ * favor of reusing the microseconds conversion tables.
+ */
+#define MSUTOTSF(msu, tsf) TVUTOTSF((msu) * 1000, tsf)
+
+/*
+ * predicate: returns TRUE if the microseconds are out-of-bounds
+ * use like: int timeval_isdenormal(const struct timeval *x)
+ */
+#define timeval_isdenormal(x) (!timeval_isnormal(x))
+
+/* make sure microseconds are in nominal range */
+static inline struct timeval
+normalize_tval(
+ struct timeval x
+ )
+{
+ long z;
+
+ /*
+ * If the fraction becomes excessive denormal, we use division
+ * to do first partial normalisation. The normalisation loops
+ * following will do the remaining cleanup. Since the size of
+ * tv_usec has a peculiar definition by the standard the range
+ * check is coded manually. And labs() is intentionally not used
+ * here: it has implementation-defined behaviour when applied
+ * to LONG_MIN.
+ */
+ if (x.tv_usec < -3l * MICROSECONDS ||
+ x.tv_usec > 3l * MICROSECONDS ) {
+ z = x.tv_usec / MICROSECONDS;
+ x.tv_usec -= z * MICROSECONDS;
+ x.tv_sec += z;
+ }
+
+ /*
+ * Do any remaining normalisation steps in loops. This takes 3
+ * steps max, and should outperform a division even if the
+ * mul-by-inverse trick is employed. (It also does the floor
+ * division adjustment if the above division was executed.)
+ */
+ if (x.tv_usec < 0)
+ do {
+ x.tv_usec += MICROSECONDS;
+ x.tv_sec--;
+ } while (x.tv_usec < 0);
+ else if (x.tv_usec >= MICROSECONDS)
+ do {
+ x.tv_usec -= MICROSECONDS;
+ x.tv_sec++;
+ } while (x.tv_usec >= MICROSECONDS);
+
+ return x;
+}
+
+/* x = a + b */
+static inline struct timeval
+add_tval(
+ struct timeval a,
+ struct timeval b
+ )
+{
+ struct timeval x;
+
+ x = a;
+ x.tv_sec += b.tv_sec;
+ x.tv_usec += b.tv_usec;
+
+ return normalize_tval(x);
+}
+
+/* x = a + b, b is fraction only */
+static inline struct timeval
+add_tval_us(
+ struct timeval a,
+ long b
+ )
+{
+ struct timeval x;
+
+ x = a;
+ x.tv_usec += b;
+
+ return normalize_tval(x);
+}
+
+/* x = a - b */
+static inline struct timeval
+sub_tval(
+ struct timeval a,
+ struct timeval b
+ )
+{
+ struct timeval x;
+
+ x = a;
+ x.tv_sec -= b.tv_sec;
+ x.tv_usec -= b.tv_usec;
+
+ return normalize_tval(x);
+}
+
+/* x = a - b, b is fraction only */
+static inline struct timeval
+sub_tval_us(
+ struct timeval a,
+ long b
+ )
+{
+ struct timeval x;
+
+ x = a;
+ x.tv_usec -= b;
+
+ return normalize_tval(x);
+}
+
+/* x = -a */
+static inline struct timeval
+neg_tval(
+ struct timeval a
+ )
+{
+ struct timeval x;
+
+ x.tv_sec = -a.tv_sec;
+ x.tv_usec = -a.tv_usec;
+
+ return normalize_tval(x);
+}
+
+/* x = abs(a) */
+static inline struct timeval
+abs_tval(
+ struct timeval a
+ )
+{
+ struct timeval c;
+
+ c = normalize_tval(a);
+ if (c.tv_sec < 0) {
+ if (c.tv_usec != 0) {
+ c.tv_sec = -c.tv_sec - 1;
+ c.tv_usec = MICROSECONDS - c.tv_usec;
+ } else {
+ c.tv_sec = -c.tv_sec;
+ }
+ }
+
+ return c;
+}
+
+/*
+ * compare previously-normalised a and b
+ * return 1 / 0 / -1 if a < / == / > b
+ */
+static inline int
+cmp_tval(
+ struct timeval a,
+ struct timeval b
+ )
+{
+ int r;
+
+ r = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec);
+ if (0 == r)
+ r = (a.tv_usec > b.tv_usec) -
+ (a.tv_usec < b.tv_usec);
+
+ return r;
+}
+
+/*
+ * compare possibly-denormal a and b
+ * return 1 / 0 / -1 if a < / == / > b
+ */
+static inline int
+cmp_tval_denorm(
+ struct timeval a,
+ struct timeval b
+ )
+{
+ return cmp_tval(normalize_tval(a), normalize_tval(b));
+}
+
+/*
+ * test previously-normalised a
+ * return 1 / 0 / -1 if a < / == / > 0
+ */
+static inline int
+test_tval(
+ struct timeval a
+ )
+{
+ int r;
+
+ r = (a.tv_sec > 0) - (a.tv_sec < 0);
+ if (r == 0)
+ r = (a.tv_usec > 0);
+
+ return r;
+}
+
+/*
+ * test possibly-denormal a
+ * return 1 / 0 / -1 if a < / == / > 0
+ */
+static inline int
+test_tval_denorm(
+ struct timeval a
+ )
+{
+ return test_tval(normalize_tval(a));
+}
+
+/* return LIB buffer ptr to string rep */
+static inline const char *
+tvaltoa(
+ struct timeval x
+ )
+{
+ return format_time_fraction(x.tv_sec, x.tv_usec, 6);
+}
+
+/* convert from timeval duration to l_fp duration */
+static inline l_fp
+tval_intv_to_lfp(
+ struct timeval x
+ )
+{
+ struct timeval v;
+ l_fp y;
+
+ v = normalize_tval(x);
+ TVUTOTSF(v.tv_usec, y.l_uf);
+ y.l_i = (int32)v.tv_sec;
+
+ return y;
+}
+
+/* x must be UN*X epoch, output *y will be in NTP epoch */
+static inline l_fp
+tval_stamp_to_lfp(
+ struct timeval x
+ )
+{
+ l_fp y;
+
+ y = tval_intv_to_lfp(x);
+ y.l_ui += JAN_1970;
+
+ return y;
+}
+
+/* convert to l_fp type, relative signed/unsigned and absolute */
+static inline struct timeval
+lfp_intv_to_tval(
+ l_fp x
+ )
+{
+ struct timeval out;
+ l_fp absx;
+ int neg;
+
+ neg = L_ISNEG(&x);
+ absx = x;
+ if (neg) {
+ L_NEG(&absx);
+ }
+ TSFTOTVU(absx.l_uf, out.tv_usec);
+ out.tv_sec = absx.l_i;
+ if (neg) {
+ out.tv_sec = -out.tv_sec;
+ out.tv_usec = -out.tv_usec;
+ out = normalize_tval(out);
+ }
+
+ return out;
+}
+
+static inline struct timeval
+lfp_uintv_to_tval(
+ l_fp x
+ )
+{
+ struct timeval out;
+
+ TSFTOTVU(x.l_uf, out.tv_usec);
+ out.tv_sec = x.l_ui;
+
+ return out;
+}
+
+/*
+ * absolute (timestamp) conversion. Input is time in NTP epoch, output
+ * is in UN*X epoch. The NTP time stamp will be expanded around the
+ * pivot time *p or the current time, if p is NULL.
+ */
+static inline struct timeval
+lfp_stamp_to_tval(
+ l_fp x,
+ const time_t * p
+ )
+{
+ struct timeval out;
+ vint64 sec;
+
+ sec = ntpcal_ntp_to_time(x.l_ui, p);
+ TSFTOTVU(x.l_uf, out.tv_usec);
+
+ /* copying a vint64 to a time_t needs some care... */
+#if SIZEOF_TIME_T <= 4
+ out.tv_sec = (time_t)sec.d_s.lo;
+#elif defined(HAVE_INT64)
+ out.tv_sec = (time_t)sec.q_s;
+#else
+ out.tv_sec = ((time_t)sec.d_s.hi << 32) | sec.d_s.lo;
+#endif
+ out = normalize_tval(out);
+
+ return out;
+}
+
+#endif /* TIMEVALOPS_H */
diff --git a/include/version.def b/include/version.def
deleted file mode 100644
index 706bf967cac2..000000000000
--- a/include/version.def
+++ /dev/null
@@ -1 +0,0 @@
-version = '4.2.6p5';
diff --git a/include/version.texi b/include/version.texi
deleted file mode 100644
index 1d549577f406..000000000000
--- a/include/version.texi
+++ /dev/null
@@ -1,3 +0,0 @@
-@set UPDATED 24 December 2011
-@set EDITION 4.2.6p5
-@set VERSION 4.2.6p5
diff --git a/include/vint64ops.h b/include/vint64ops.h
new file mode 100644
index 000000000000..2c3deffb3813
--- /dev/null
+++ b/include/vint64ops.h
@@ -0,0 +1,28 @@
+/*
+ * vint64ops.h - operations on 'vint64' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ----------------------------------------------------------------------
+ * This is an attempt to get the vint64 calculations stuff centralised.
+ */
+#ifndef VINT64OPS_H
+#define VINT64OPS_H
+
+/* signed/unsigned compare. returns 1/0/-1 if lhs >/=/< rhs */
+extern int icmpv64(const vint64 * lhs, const vint64 * rhs);
+extern int ucmpv64(const vint64 * lhs, const vint64 * rhs);
+
+/* add / subtract */
+extern vint64 addv64(const vint64 *lhs, const vint64 *rhs);
+extern vint64 addv64i32(const vint64 * lhs, int32_t rhs);
+extern vint64 addv64u32(const vint64 * lhs, uint32_t rhs);
+
+extern vint64 subv64(const vint64 *lhs, const vint64 *rhs);
+extern vint64 subv64i32(const vint64 * lhs, int32_t rhs);
+extern vint64 subv64u32(const vint64 * lhs, uint32_t rhs);
+
+/* parsing. works like strtoul() or strtoull() */
+extern vint64 strtouv64(const char * begp, char ** endp, int base);
+
+#endif /*!defined(VINT64OPS_H)*/
diff --git a/includes.mf b/includes.mf
new file mode 100644
index 000000000000..e868ba470b75
--- /dev/null
+++ b/includes.mf
@@ -0,0 +1,6 @@
+## includes.mf - automake fragment
+
+NTP_INCS = -I$(top_srcdir)/include
+NTP_INCS += -I$(top_srcdir)/lib/isc/include
+NTP_INCS += -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
+NTP_INCS += -I$(top_srcdir)/lib/isc/unix/include
diff --git a/kernel/Makefile.am b/kernel/Makefile.am
index 8508029cd587..081839c48c8f 100644
--- a/kernel/Makefile.am
+++ b/kernel/Makefile.am
@@ -1,5 +1 @@
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
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/kernel/Makefile.in b/kernel/Makefile.in
index fe2b494dbafc..0fce65b1e0b3 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -34,25 +34,55 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = kernel
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -97,20 +127,32 @@ am__relativize = \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -122,21 +164,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -144,6 +196,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -162,14 +215,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -182,10 +289,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -193,9 +302,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -204,6 +331,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -251,12 +379,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
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
all: all-recursive
.SUFFIXES:
diff --git a/kernel/README b/kernel/README
deleted file mode 100644
index 253d04e4e8d5..000000000000
--- a/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/kernel/chuinit.c b/kernel/chuinit.c
deleted file mode 100644
index 270c3d55f281..000000000000
--- a/kernel/chuinit.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-** dynamically loadable chu driver
-**
-** 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/kernel/clkinit.c b/kernel/clkinit.c
deleted file mode 100644
index 716ca815ed9d..000000000000
--- a/kernel/clkinit.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-** dynamically loadable clk driver
-**
-** 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/kernel/sys/Makefile.am b/kernel/sys/Makefile.am
index 417111406a02..72923448af22 100644
--- a/kernel/sys/Makefile.am
+++ b/kernel/sys/Makefile.am
@@ -1,8 +1,2 @@
-#AUTOMAKE_OPTIONS = ../../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-noinst_HEADERS = bsd_audioirig.h chudefs.h clkdefs.h i8253.h parsestreams.h \
+noinst_HEADERS = bsd_audioirig.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/kernel/sys/Makefile.in b/kernel/sys/Makefile.in
index 95e32d82e9f4..2260c858fa5a 100644
--- a/kernel/sys/Makefile.in
+++ b/kernel/sys/Makefile.in
@@ -39,22 +39,52 @@ DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
SOURCES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
@@ -62,20 +92,32 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -87,21 +129,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -109,6 +161,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -127,14 +180,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -147,10 +254,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -158,9 +267,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -169,6 +296,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -216,16 +344,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-
-#AUTOMAKE_OPTIONS = ../../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-noinst_HEADERS = bsd_audioirig.h chudefs.h clkdefs.h i8253.h parsestreams.h \
+noinst_HEADERS = bsd_audioirig.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
all: all-am
.SUFFIXES:
diff --git a/kernel/sys/chudefs.h b/kernel/sys/chudefs.h
deleted file mode 100644
index f5549f58b828..000000000000
--- a/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/kernel/sys/clkdefs.h b/kernel/sys/clkdefs.h
deleted file mode 100644
index afbc77a8f1ac..000000000000
--- a/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/kernel/tty_chu.c b/kernel/tty_chu.c
deleted file mode 100644
index 4615875e77e0..000000000000
--- a/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/kernel/tty_chu_STREAMS.c b/kernel/tty_chu_STREAMS.c
deleted file mode 100644
index f46e25d2ab51..000000000000
--- a/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/kernel/tty_clk.c b/kernel/tty_clk.c
deleted file mode 100644
index 072061039bf3..000000000000
--- a/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/kernel/tty_clk_STREAMS.c b/kernel/tty_clk_STREAMS.c
deleted file mode 100644
index 13b0a25f1d89..000000000000
--- a/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/lib/isc/Atffile b/lib/isc/Atffile
new file mode 100644
index 000000000000..1edb838c66cc
--- /dev/null
+++ b/lib/isc/Atffile
@@ -0,0 +1,5 @@
+Content-Type: application/X-atf-atffile; version="1"
+
+prop: test-suite = bind9
+
+tp: tests
diff --git a/lib/isc/alpha/include/isc/atomic.h b/lib/isc/alpha/include/isc/atomic.h
index f60f9fdc174a..a6232ada6fc7 100644
--- a/lib/isc/alpha/include/isc/atomic.h
+++ b/lib/isc/alpha/include/isc/atomic.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: atomic.h,v 1.5.332.2 2009/04/08 06:47:32 tbox Exp $ */
+/* $Id: atomic.h,v 1.7 2009/04/08 06:48:23 tbox Exp $ */
/*
* This code was written based on FreeBSD's kernel source whose copyright
@@ -46,7 +46,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: src/sys/alpha/include/atomic.h,v 1.18.6.1 2004/09/13 21:52:04 wilko Exp $
*/
#ifndef ISC_ATOMIC_H
diff --git a/lib/isc/api b/lib/isc/api
index 5ef8dc035a3e..ed4b69f8b8f7 100644
--- a/lib/isc/api
+++ b/lib/isc/api
@@ -1,3 +1,8 @@
-LIBINTERFACE = 51
+# LIBINTERFACE ranges
+# 9.6: 50-59, 110-119
+# 9.7: 60-79
+# 9.8: 80-89
+# 9.9: 90-109
+LIBINTERFACE = 91
LIBREVISION = 1
LIBAGE = 1
diff --git a/lib/isc/app_api.c b/lib/isc/app_api.c
new file mode 100644
index 000000000000..ce767d175053
--- /dev/null
+++ b/lib/isc/app_api.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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_api.c,v 1.5 2009/09/02 23:48:02 tbox Exp $ */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <isc/app.h>
+#include <isc/magic.h>
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/util.h>
+
+static isc_mutex_t createlock;
+static isc_once_t once = ISC_ONCE_INIT;
+static isc_appctxcreatefunc_t appctx_createfunc = NULL;
+
+#define ISCAPI_APPMETHODS_VALID(m) ISC_MAGIC_VALID(m, ISCAPI_APPMETHODS_MAGIC)
+
+static void
+initialize(void) {
+ RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_app_register(isc_appctxcreatefunc_t createfunc) {
+ isc_result_t result = ISC_R_SUCCESS;
+
+ RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
+
+ LOCK(&createlock);
+ if (appctx_createfunc == NULL)
+ appctx_createfunc = createfunc;
+ else
+ result = ISC_R_EXISTS;
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp) {
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(appctx_createfunc != NULL);
+ result = (*appctx_createfunc)(mctx, ctxp);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+void
+isc_appctx_destroy(isc_appctx_t **ctxp) {
+ REQUIRE(ctxp != NULL && ISCAPI_APPCTX_VALID(*ctxp));
+
+ (*ctxp)->methods->ctxdestroy(ctxp);
+
+ ENSURE(*ctxp == NULL);
+}
+
+isc_result_t
+isc_app_ctxstart(isc_appctx_t *ctx) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+
+ return (ctx->methods->ctxstart(ctx));
+}
+
+isc_result_t
+isc_app_ctxrun(isc_appctx_t *ctx) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+
+ return (ctx->methods->ctxrun(ctx));
+}
+
+isc_result_t
+isc_app_ctxsuspend(isc_appctx_t *ctx) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+
+ return (ctx->methods->ctxsuspend(ctx));
+}
+
+isc_result_t
+isc_app_ctxshutdown(isc_appctx_t *ctx) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+
+ return (ctx->methods->ctxshutdown(ctx));
+}
+
+void
+isc_app_ctxfinish(isc_appctx_t *ctx) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+
+ ctx->methods->ctxfinish(ctx);
+}
+
+void
+isc_appctx_settaskmgr(isc_appctx_t *ctx, isc_taskmgr_t *taskmgr) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+ REQUIRE(taskmgr != NULL);
+
+ ctx->methods->settaskmgr(ctx, taskmgr);
+}
+
+void
+isc_appctx_setsocketmgr(isc_appctx_t *ctx, isc_socketmgr_t *socketmgr) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+ REQUIRE(socketmgr != NULL);
+
+ ctx->methods->setsocketmgr(ctx, socketmgr);
+}
+
+void
+isc_appctx_settimermgr(isc_appctx_t *ctx, isc_timermgr_t *timermgr) {
+ REQUIRE(ISCAPI_APPCTX_VALID(ctx));
+ REQUIRE(timermgr != NULL);
+
+ ctx->methods->settimermgr(ctx, timermgr);
+}
diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c
index 4c9251bdcf25..31c4fe7c9f27 100644
--- a/lib/isc/assertions.c
+++ b/lib/isc/assertions.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: assertions.c,v 1.23 2008/10/15 23:47:31 tbox Exp $ */
+/* $Id: assertions.c,v 1.26 2009/09/29 15:06:07 fdupont Exp $ */
/*! \file */
@@ -25,29 +25,47 @@
#include <stdlib.h>
#include <isc/assertions.h>
+#include <isc/backtrace.h>
#include <isc/msgs.h>
+#include <isc/result.h>
+
+/*
+ * The maximum number of stack frames to dump on assertion failure.
+ */
+#ifndef BACKTRACE_MAXFRAME
+#define BACKTRACE_MAXFRAME 128
+#endif
/*%
* Forward.
*/
-/* coverity[+kill] */
static void
default_callback(const char *, int, isc_assertiontype_t, const char *);
+static isc_assertioncallback_t isc_assertion_failed_cb = default_callback;
+
/*%
* Public.
*/
-LIBISC_EXTERNAL_DATA isc_assertioncallback_t isc_assertion_failed =
- default_callback;
+/*% assertion failed handler */
+/* coverity[+kill] */
+void
+isc_assertion_failed(const char *file, int line, isc_assertiontype_t type,
+ const char *cond)
+{
+ isc_assertion_failed_cb(file, line, type, cond);
+ abort();
+ /* NOTREACHED */
+}
/*% Set callback. */
void
isc_assertion_setcallback(isc_assertioncallback_t cb) {
if (cb == NULL)
- isc_assertion_failed = default_callback;
+ isc_assertion_failed_cb = default_callback;
else
- isc_assertion_failed = cb;
+ isc_assertion_failed_cb = cb;
}
/*% Type to Text */
@@ -87,11 +105,35 @@ static void
default_callback(const char *file, int line, isc_assertiontype_t type,
const char *cond)
{
- fprintf(stderr, "%s:%d: %s(%s) %s.\n",
+ void *tracebuf[BACKTRACE_MAXFRAME];
+ int i, nframes;
+ const char *logsuffix = ".";
+ const char *fname;
+ isc_result_t result;
+
+ result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
+ if (result == ISC_R_SUCCESS && nframes > 0)
+ logsuffix = ", back trace";
+
+ fprintf(stderr, "%s:%d: %s(%s) %s%s\n",
file, line, isc_assertion_typetotext(type), cond,
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
- ISC_MSG_FAILED, "failed"));
+ ISC_MSG_FAILED, "failed"), logsuffix);
+ if (result == ISC_R_SUCCESS) {
+ for (i = 0; i < nframes; i++) {
+ unsigned long offset;
+
+ fname = NULL;
+ result = isc_backtrace_getsymbol(tracebuf[i], &fname,
+ &offset);
+ if (result == ISC_R_SUCCESS) {
+ fprintf(stderr, "#%d %p in %s()+0x%lx\n", i,
+ tracebuf[i], fname, offset);
+ } else {
+ fprintf(stderr, "#%d %p in ??\n", i,
+ tracebuf[i]);
+ }
+ }
+ }
fflush(stderr);
- abort();
- /* NOTREACHED */
}
diff --git a/lib/isc/backtrace-emptytbl.c b/lib/isc/backtrace-emptytbl.c
new file mode 100644
index 000000000000..bd534d60c8e2
--- /dev/null
+++ b/lib/isc/backtrace-emptytbl.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: backtrace-emptytbl.c,v 1.3 2009/09/01 20:13:44 each Exp $ */
+
+/*! \file */
+
+/*
+ * This file defines an empty (default) symbol table used in backtrace.c
+ * If the application wants to have a complete symbol table, it should redefine
+ * isc__backtrace_symtable with the complete table in some way, and link the
+ * version of the library not including this definition
+ * (e.g. libisc-nosymbol.a).
+ */
+
+#include <config.h>
+
+#include <isc/backtrace.h>
+
+const int isc__backtrace_nsymbols = 0;
+const isc_backtrace_symmap_t isc__backtrace_symtable[] = { { NULL, "" } };
diff --git a/lib/isc/backtrace.c b/lib/isc/backtrace.c
new file mode 100644
index 000000000000..d2f044cb8c4c
--- /dev/null
+++ b/lib/isc/backtrace.c
@@ -0,0 +1,285 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: backtrace.c,v 1.3 2009/09/02 23:48:02 tbox Exp $ */
+
+/*! \file */
+
+#include "config.h"
+
+#include <string.h>
+#include <stdlib.h>
+#ifdef HAVE_LIBCTRACE
+#include <execinfo.h>
+#endif
+
+#include <isc/backtrace.h>
+#include <isc/result.h>
+#include <isc/util.h>
+
+#ifdef ISC_PLATFORM_USEBACKTRACE
+/*
+ * Getting a back trace of a running process is tricky and highly platform
+ * dependent. Our current approach is as follows:
+ * 1. If the system library supports the "backtrace()" function, use it.
+ * 2. Otherwise, if the compiler is gcc and the architecture is x86_64 or IA64,
+ * then use gcc's (hidden) Unwind_Backtrace() function. Note that this
+ * function doesn't work for C programs on many other architectures.
+ * 3. Otherwise, if the architecture x86 or x86_64, try to unwind the stack
+ * frame following frame pointers. This assumes the executable binary
+ * compiled with frame pointers; this is not always true for x86_64 (rather,
+ * compiler optimizations often disable frame pointers). The validation
+ * checks in getnextframeptr() hopefully rejects bogus values stored in
+ * the RBP register in such a case. If the backtrace function itself crashes
+ * due to this problem, the whole package should be rebuilt with
+ * --disable-backtrace.
+ */
+#ifdef HAVE_LIBCTRACE
+#define BACKTRACE_LIBC
+#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__ia64__))
+#define BACKTRACE_GCC
+#elif defined(__x86_64__) || defined(__i386__)
+#define BACKTRACE_X86STACK
+#else
+#define BACKTRACE_DISABLED
+#endif /* HAVE_LIBCTRACE */
+#else /* !ISC_PLATFORM_USEBACKTRACE */
+#define BACKTRACE_DISABLED
+#endif /* ISC_PLATFORM_USEBACKTRACE */
+
+#ifdef BACKTRACE_LIBC
+isc_result_t
+isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
+ int n;
+
+ /*
+ * Validate the arguments: intentionally avoid using REQUIRE().
+ * See notes in backtrace.h.
+ */
+ if (addrs == NULL || nframes == NULL)
+ return (ISC_R_FAILURE);
+
+ /*
+ * backtrace(3) includes this function itself in the address array,
+ * which should be eliminated from the returned sequence.
+ */
+ n = backtrace(addrs, maxaddrs);
+ if (n < 2)
+ return (ISC_R_NOTFOUND);
+ n--;
+ memmove(addrs, &addrs[1], sizeof(void *) * n);
+ *nframes = n;
+ return (ISC_R_SUCCESS);
+}
+#elif defined(BACKTRACE_GCC)
+extern int _Unwind_Backtrace(void* fn, void* a);
+extern void* _Unwind_GetIP(void* ctx);
+
+typedef struct {
+ void **result;
+ int max_depth;
+ int skip_count;
+ int count;
+} trace_arg_t;
+
+static int
+btcallback(void *uc, void *opq) {
+ trace_arg_t *arg = (trace_arg_t *)opq;
+
+ if (arg->skip_count > 0)
+ arg->skip_count--;
+ else
+ arg->result[arg->count++] = (void *)_Unwind_GetIP(uc);
+ if (arg->count == arg->max_depth)
+ return (5); /* _URC_END_OF_STACK */
+
+ return (0); /* _URC_NO_REASON */
+}
+
+isc_result_t
+isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
+ trace_arg_t arg;
+
+ /* Argument validation: see above. */
+ if (addrs == NULL || nframes == NULL)
+ return (ISC_R_FAILURE);
+
+ arg.skip_count = 1;
+ arg.result = addrs;
+ arg.max_depth = maxaddrs;
+ arg.count = 0;
+ _Unwind_Backtrace(btcallback, &arg);
+
+ *nframes = arg.count;
+
+ return (ISC_R_SUCCESS);
+}
+#elif defined(BACKTRACE_X86STACK)
+#ifdef __x86_64__
+static unsigned long
+getrbp() {
+ __asm("movq %rbp, %rax\n");
+}
+#endif
+
+static void **
+getnextframeptr(void **sp) {
+ void **newsp = (void **)*sp;
+
+ /*
+ * Perform sanity check for the new frame pointer, derived from
+ * google glog. This can actually be bogus depending on compiler.
+ */
+
+ /* prohibit the stack frames from growing downwards */
+ if (newsp <= sp)
+ return (NULL);
+
+ /* A heuristics to reject "too large" frame: this actually happened. */
+ if ((char *)newsp - (char *)sp > 100000)
+ return (NULL);
+
+ /*
+ * Not sure if other checks used in glog are needed at this moment.
+ * For our purposes we don't have to consider non-contiguous frames,
+ * for example.
+ */
+
+ return (newsp);
+}
+
+isc_result_t
+isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
+ int i = 0;
+ void **sp;
+
+ /* Argument validation: see above. */
+ if (addrs == NULL || nframes == NULL)
+ return (ISC_R_FAILURE);
+
+#ifdef __x86_64__
+ sp = (void **)getrbp();
+ if (sp == NULL)
+ return (ISC_R_NOTFOUND);
+ /*
+ * sp is the frame ptr of this function itself due to the call to
+ * getrbp(), so need to unwind one frame for consistency.
+ */
+ sp = getnextframeptr(sp);
+#else
+ /*
+ * i386: the frame pointer is stored 2 words below the address for the
+ * first argument. Note that the body of this function cannot be
+ * inlined since it depends on the address of the function argument.
+ */
+ sp = (void **)&addrs - 2;
+#endif
+
+ while (sp != NULL && i < maxaddrs) {
+ addrs[i++] = *(sp + 1);
+ sp = getnextframeptr(sp);
+ }
+
+ *nframes = i;
+
+ return (ISC_R_SUCCESS);
+}
+#elif defined(BACKTRACE_DISABLED)
+isc_result_t
+isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
+ /* Argument validation: see above. */
+ if (addrs == NULL || nframes == NULL)
+ return (ISC_R_FAILURE);
+
+ UNUSED(maxaddrs);
+
+ return (ISC_R_NOTIMPLEMENTED);
+}
+#endif
+
+isc_result_t
+isc_backtrace_getsymbolfromindex(int index, const void **addrp,
+ const char **symbolp)
+{
+ REQUIRE(addrp != NULL && *addrp == NULL);
+ REQUIRE(symbolp != NULL && *symbolp == NULL);
+
+ if (index < 0 || index >= isc__backtrace_nsymbols)
+ return (ISC_R_RANGE);
+
+ *addrp = isc__backtrace_symtable[index].addr;
+ *symbolp = isc__backtrace_symtable[index].symbol;
+ return (ISC_R_SUCCESS);
+}
+
+static int
+symtbl_compare(const void *addr, const void *entryarg) {
+ const isc_backtrace_symmap_t *entry = entryarg;
+ const isc_backtrace_symmap_t *end =
+ &isc__backtrace_symtable[isc__backtrace_nsymbols - 1];
+
+ if (isc__backtrace_nsymbols == 1 || entry == end) {
+ if (addr >= entry->addr) {
+ /*
+ * If addr is equal to or larger than that of the last
+ * entry of the table, we cannot be sure if this is
+ * within a valid range so we consider it valid.
+ */
+ return (0);
+ }
+ return (-1);
+ }
+
+ /* entry + 1 is a valid entry from now on. */
+ if (addr < entry->addr)
+ return (-1);
+ else if (addr >= (entry + 1)->addr)
+ return (1);
+ return (0);
+}
+
+isc_result_t
+isc_backtrace_getsymbol(const void *addr, const char **symbolp,
+ unsigned long *offsetp)
+{
+ isc_result_t result = ISC_R_SUCCESS;
+ isc_backtrace_symmap_t *found;
+
+ /*
+ * Validate the arguments: intentionally avoid using REQUIRE().
+ * See notes in backtrace.h.
+ */
+ if (symbolp == NULL || *symbolp != NULL || offsetp == NULL)
+ return (ISC_R_FAILURE);
+
+ if (isc__backtrace_nsymbols < 1)
+ return (ISC_R_NOTFOUND);
+
+ /*
+ * Search the table for the entry that meets:
+ * entry.addr <= addr < next_entry.addr.
+ */
+ found = bsearch(addr, isc__backtrace_symtable, isc__backtrace_nsymbols,
+ sizeof(isc__backtrace_symtable[0]), symtbl_compare);
+ if (found == NULL)
+ result = ISC_R_NOTFOUND;
+ else {
+ *symbolp = found->symbol;
+ *offsetp = (const char *)addr - (char *)found->addr;
+ }
+
+ return (result);
+}
diff --git a/lib/isc/base32.c b/lib/isc/base32.c
index 3000a84f2da1..d25e3c4716bb 100644
--- a/lib/isc/base32.c
+++ b/lib/isc/base32.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: base32.c,v 1.3.116.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: base32.c,v 1.6 2009/10/21 01:22:29 each Exp $ */
/*! \file */
@@ -112,6 +112,8 @@ base32_totext(isc_region_t *source, int wordlength, const char *wordbreak,
RETERR(str_totext(wordbreak, target));
}
}
+ if (source->length > 0)
+ isc_region_consume(source, source->length);
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/base64.c b/lib/isc/base64.c
index 13ed6b5c5c17..bad1565bea7b 100644
--- a/lib/isc/base64.c
+++ b/lib/isc/base64.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: base64.c,v 1.32 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: base64.c,v 1.34 2009/10/21 23:48:05 tbox Exp $ */
/*! \file */
@@ -85,11 +85,13 @@ isc_base64_totext(isc_region_t *source, int wordlength,
buf[2] = base64[((source->base[1]<<2)&0x3c)];
buf[3] = '=';
RETERR(str_totext(buf, target));
+ isc_region_consume(source, 2);
} else if (source->length == 1) {
buf[0] = base64[(source->base[0]>>2)&0x3f];
buf[1] = base64[((source->base[0]<<4)&0x30)];
buf[2] = buf[3] = '=';
RETERR(str_totext(buf, target));
+ isc_region_consume(source, 1);
}
return (ISC_R_SUCCESS);
}
@@ -217,7 +219,7 @@ isc_base64_decodestring(const char *cstr, isc_buffer_t *target) {
continue;
RETERR(base64_decode_char(&ctx, c));
}
- RETERR(base64_decode_finish(&ctx));
+ RETERR(base64_decode_finish(&ctx));
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/entropy.c b/lib/isc/entropy.c
index 25ab00218956..da9e81fb3129 100644
--- a/lib/isc/entropy.c
+++ b/lib/isc/entropy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.18.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: entropy.c,v 1.22 2010/08/10 23:48:19 tbox Exp $ */
/*! \file
* \brief
@@ -283,8 +283,11 @@ entropypool_add_word(isc_entropypool_t *rp, isc_uint32_t val) {
val ^= rp->pool[(rp->cursor + TAP3) & (RND_POOLWORDS - 1)];
val ^= rp->pool[(rp->cursor + TAP4) & (RND_POOLWORDS - 1)];
val ^= rp->pool[(rp->cursor + TAP5) & (RND_POOLWORDS - 1)];
- rp->pool[rp->cursor++] ^=
- ((val << rp->rotate) | (val >> (32 - rp->rotate)));
+ if (rp->rotate == 0)
+ rp->pool[rp->cursor++] ^= val;
+ else
+ rp->pool[rp->cursor++] ^=
+ ((val << rp->rotate) | (val >> (32 - rp->rotate)));
/*
* If we have looped around the pool, increment the rotate
diff --git a/lib/isc/hash.c b/lib/isc/hash.c
index 9911bdee8fe2..f1d68c7700f5 100644
--- a/lib/isc/hash.c
+++ b/lib/isc/hash.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hash.c,v 1.13.332.3 2009/05/07 23:47:12 tbox Exp $ */
+/* $Id: hash.c,v 1.16 2009/09/01 00:22:28 jinmei Exp $ */
/*! \file
* Some portion of this code was derived from universal hash function
@@ -194,8 +194,12 @@ isc_hash_ctxcreate(isc_mem_t *mctx, isc_entropy_t *entropy,
hctx->vectorlen = vlen;
hctx->rndvector = rv;
+#ifdef BIND9
if (entropy != NULL)
isc_entropy_attach(entropy, &hctx->entropy);
+#else
+ UNUSED(entropy);
+#endif
*hctxp = hctx;
return (ISC_R_SUCCESS);
@@ -236,18 +240,22 @@ isc_hash_create(isc_mem_t *mctx, isc_entropy_t *entropy, size_t limit) {
void
isc_hash_ctxinit(isc_hash_t *hctx) {
- isc_result_t result;
-
LOCK(&hctx->lock);
if (hctx->initialized == ISC_TRUE)
goto out;
if (hctx->entropy) {
+#ifdef BIND9
+ isc_result_t result;
+
result = isc_entropy_getdata(hctx->entropy,
hctx->rndvector, hctx->vectorlen,
NULL, 0);
INSIST(result == ISC_R_SUCCESS);
+#else
+ INSIST(0);
+#endif
} else {
isc_uint32_t pr;
unsigned int i, copylen;
@@ -293,6 +301,7 @@ static void
destroy(isc_hash_t **hctxp) {
isc_hash_t *hctx;
isc_mem_t *mctx;
+ unsigned char canary0[4], canary1[4];
REQUIRE(hctxp != NULL && *hctxp != NULL);
hctx = *hctxp;
@@ -303,8 +312,10 @@ destroy(isc_hash_t **hctxp) {
isc_refcount_destroy(&hctx->refcnt);
mctx = hctx->mctx;
+#ifdef BIND9
if (hctx->entropy != NULL)
isc_entropy_detach(&hctx->entropy);
+#endif
if (hctx->rndvector != NULL)
isc_mem_put(mctx, hctx->rndvector, hctx->vectorlen);
@@ -312,7 +323,10 @@ destroy(isc_hash_t **hctxp) {
DESTROYLOCK(&hctx->lock);
+ memcpy(canary0, hctx + 1, sizeof(canary0));
memset(hctx, 0, sizeof(isc_hash_t));
+ memcpy(canary1, hctx + 1, sizeof(canary1));
+ INSIST(memcmp(canary0, canary1, sizeof(canary0)) == 0);
isc_mem_put(mctx, hctx, sizeof(isc_hash_t));
isc_mem_detach(&mctx);
}
diff --git a/lib/isc/heap.c b/lib/isc/heap.c
index 91d78c06d468..ebadd2fd807c 100644
--- a/lib/isc/heap.c
+++ b/lib/isc/heap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.c,v 1.37 2007/10/19 17:15:53 explorer Exp $ */
+/* $Id$ */
/*! \file
* Heap implementation of priority queues adapted from the following:
@@ -86,8 +86,9 @@ isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
if (heap == NULL)
return (ISC_R_NOMEMORY);
heap->magic = HEAP_MAGIC;
- heap->mctx = mctx;
heap->size = 0;
+ heap->mctx = NULL;
+ isc_mem_attach(mctx, &heap->mctx);
if (size_increment == 0)
heap->size_increment = SIZE_INCREMENT;
else
@@ -114,7 +115,7 @@ isc_heap_destroy(isc_heap_t **heapp) {
isc_mem_put(heap->mctx, heap->array,
heap->size * sizeof(void *));
heap->magic = 0;
- isc_mem_put(heap->mctx, heap, sizeof(*heap));
+ isc_mem_putanddetach(&heap->mctx, heap, sizeof(*heap));
*heapp = NULL;
}
@@ -186,15 +187,17 @@ sink_down(isc_heap_t *heap, unsigned int i, void *elt) {
isc_result_t
isc_heap_insert(isc_heap_t *heap, void *elt) {
- unsigned int i;
+ unsigned int new_last;
REQUIRE(VALID_HEAP(heap));
- i = ++heap->last;
- if (heap->last >= heap->size && !resize(heap))
+ new_last = heap->last + 1;
+ RUNTIME_CHECK(new_last > 0); /* overflow check */
+ if (new_last >= heap->size && !resize(heap))
return (ISC_R_NOMEMORY);
+ heap->last = new_last;
- float_up(heap, i, elt);
+ float_up(heap, new_last, elt);
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c
index 63853dcd4191..6abe6e27df8e 100644
--- a/lib/isc/hmacmd5.c
+++ b/lib/isc/hmacmd5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.c,v 1.14 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: hmacmd5.c,v 1.16 2009/02/06 23:47:42 tbox Exp $ */
/*! \file
* This code implements the HMAC-MD5 keyed hash algorithm
@@ -27,10 +27,40 @@
#include <isc/assertions.h>
#include <isc/hmacmd5.h>
#include <isc/md5.h>
+#include <isc/platform.h>
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
+#ifdef ISC_PLATFORM_OPENSSLHASH
+
+void
+isc_hmacmd5_init(isc_hmacmd5_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_md5());
+}
+
+void
+isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacmd5_update(isc_hmacmd5_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) {
+ HMAC_Final(ctx, digest, NULL);
+ HMAC_CTX_cleanup(ctx);
+}
+
+#else
+
#define PADLEN 64
#define IPAD 0x36
#define OPAD 0x5C
@@ -98,6 +128,7 @@ isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) {
isc_md5_final(&ctx->md5ctx, digest);
isc_hmacmd5_invalidate(ctx);
}
+#endif /* !ISC_PLATFORM_OPENSSLHASH */
/*!
* Verify signature - finalize MD5 operation and reapply MD5, then
diff --git a/lib/isc/hmacsha.c b/lib/isc/hmacsha.c
index dfcd8bf5a9f0..d7b9f1897eb0 100644
--- a/lib/isc/hmacsha.c
+++ b/lib/isc/hmacsha.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacsha.c,v 1.8 2007/08/27 03:27:53 marka Exp $ */
+/* $Id$ */
/*
* This code implements the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256, HMAC-SHA384
@@ -26,12 +26,172 @@
#include <isc/assertions.h>
#include <isc/hmacsha.h>
+#include <isc/platform.h>
#include <isc/sha1.h>
#include <isc/sha2.h>
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
+#ifdef ISC_PLATFORM_OPENSSLHASH
+
+void
+isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha1());
+}
+
+void
+isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
+
+ HMAC_Final(ctx, newdigest, NULL);
+ HMAC_CTX_cleanup(ctx);
+ memcpy(digest, newdigest, len);
+ memset(newdigest, 0, sizeof(newdigest));
+}
+
+void
+isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha224());
+}
+
+void
+isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
+
+ HMAC_Final(ctx, newdigest, NULL);
+ HMAC_CTX_cleanup(ctx);
+ memcpy(digest, newdigest, len);
+ memset(newdigest, 0, sizeof(newdigest));
+}
+
+void
+isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha256());
+}
+
+void
+isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
+
+ HMAC_Final(ctx, newdigest, NULL);
+ HMAC_CTX_cleanup(ctx);
+ memcpy(digest, newdigest, len);
+ memset(newdigest, 0, sizeof(newdigest));
+}
+
+void
+isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha384());
+}
+
+void
+isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
+
+ HMAC_Final(ctx, newdigest, NULL);
+ HMAC_CTX_cleanup(ctx);
+ memcpy(digest, newdigest, len);
+ memset(newdigest, 0, sizeof(newdigest));
+}
+
+void
+isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
+ unsigned int len)
+{
+ HMAC_Init(ctx, (const void *) key, (int) len, EVP_sha512());
+}
+
+void
+isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx) {
+ HMAC_CTX_cleanup(ctx);
+}
+
+void
+isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
+ unsigned int len)
+{
+ HMAC_Update(ctx, buf, (int) len);
+}
+
+void
+isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA512_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA512_DIGESTLENGTH);
+
+ HMAC_Final(ctx, newdigest, NULL);
+ HMAC_CTX_cleanup(ctx);
+ memcpy(digest, newdigest, len);
+ memset(newdigest, 0, sizeof(newdigest));
+}
+
+#else
+
#define IPAD 0x36
#define OPAD 0x5C
@@ -64,8 +224,7 @@ isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
void
isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx) {
isc_sha1_invalidate(&ctx->sha1ctx);
- memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}
/*
@@ -105,19 +264,6 @@ isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
}
/*
- * Verify signature - finalize SHA1 operation and reapply SHA1, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
- isc_hmacsha1_sign(ctx, newdigest, ISC_SHA1_DIGESTLENGTH);
- return (ISC_TF(memcmp(digest, newdigest, len) == 0));
-}
-
-/*
* Start HMAC-SHA224 process. Initialize an sha224 context and digest the key.
*/
void
@@ -145,8 +291,7 @@ isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
void
isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx) {
- memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}
/*
@@ -185,19 +330,6 @@ isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
}
/*
- * Verify signature - finalize SHA224 operation and reapply SHA224, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
- isc_hmacsha224_sign(ctx, newdigest, ISC_SHA224_DIGESTLENGTH);
- return (ISC_TF(memcmp(digest, newdigest, len) == 0));
-}
-
-/*
* Start HMAC-SHA256 process. Initialize an sha256 context and digest the key.
*/
void
@@ -225,8 +357,7 @@ isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
void
isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx) {
- memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}
/*
@@ -265,19 +396,6 @@ isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
}
/*
- * Verify signature - finalize SHA256 operation and reapply SHA256, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
- isc_hmacsha256_sign(ctx, newdigest, ISC_SHA256_DIGESTLENGTH);
- return (ISC_TF(memcmp(digest, newdigest, len) == 0));
-}
-
-/*
* Start HMAC-SHA384 process. Initialize an sha384 context and digest the key.
*/
void
@@ -305,8 +423,7 @@ isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
void
isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx) {
- memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}
/*
@@ -345,19 +462,6 @@ isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
}
/*
- * Verify signature - finalize SHA384 operation and reapply SHA384, then
- * compare to the supplied digest.
- */
-isc_boolean_t
-isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
- unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
-
- REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
- isc_hmacsha384_sign(ctx, newdigest, ISC_SHA384_DIGESTLENGTH);
- return (ISC_TF(memcmp(digest, newdigest, len) == 0));
-}
-
-/*
* Start HMAC-SHA512 process. Initialize an sha512 context and digest the key.
*/
void
@@ -385,8 +489,7 @@ isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
void
isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx) {
- memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
+ memset(ctx, 0, sizeof(*ctx));
}
/*
@@ -423,6 +526,59 @@ isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
memcpy(digest, newdigest, len);
memset(newdigest, 0, sizeof(newdigest));
}
+#endif /* !ISC_PLATFORM_OPENSSLHASH */
+
+/*
+ * Verify signature - finalize SHA1 operation and reapply SHA1, then
+ * compare to the supplied digest.
+ */
+isc_boolean_t
+isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA1_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA1_DIGESTLENGTH);
+ isc_hmacsha1_sign(ctx, newdigest, ISC_SHA1_DIGESTLENGTH);
+ return (ISC_TF(memcmp(digest, newdigest, len) == 0));
+}
+
+/*
+ * Verify signature - finalize SHA224 operation and reapply SHA224, then
+ * compare to the supplied digest.
+ */
+isc_boolean_t
+isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA224_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA224_DIGESTLENGTH);
+ isc_hmacsha224_sign(ctx, newdigest, ISC_SHA224_DIGESTLENGTH);
+ return (ISC_TF(memcmp(digest, newdigest, len) == 0));
+}
+
+/*
+ * Verify signature - finalize SHA256 operation and reapply SHA256, then
+ * compare to the supplied digest.
+ */
+isc_boolean_t
+isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA256_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA256_DIGESTLENGTH);
+ isc_hmacsha256_sign(ctx, newdigest, ISC_SHA256_DIGESTLENGTH);
+ return (ISC_TF(memcmp(digest, newdigest, len) == 0));
+}
+
+/*
+ * Verify signature - finalize SHA384 operation and reapply SHA384, then
+ * compare to the supplied digest.
+ */
+isc_boolean_t
+isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
+ unsigned char newdigest[ISC_SHA384_DIGESTLENGTH];
+
+ REQUIRE(len <= ISC_SHA384_DIGESTLENGTH);
+ isc_hmacsha384_sign(ctx, newdigest, ISC_SHA384_DIGESTLENGTH);
+ return (ISC_TF(memcmp(digest, newdigest, len) == 0));
+}
/*
* Verify signature - finalize SHA512 operation and reapply SHA512, then
diff --git a/lib/isc/httpd.c b/lib/isc/httpd.c
index fa313253b3e9..16a8c9fe142b 100644
--- a/lib/isc/httpd.c
+++ b/lib/isc/httpd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006-2008, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: httpd.c,v 1.16 2008/08/08 05:06:49 marka Exp $ */
+/* $Id$ */
/*! \file */
@@ -151,6 +151,7 @@ struct isc_httpdmgr {
ISC_LIST(isc_httpdurl_t) urls; /*%< urls we manage */
isc_httpdaction_t *render_404;
+ isc_httpdaction_t *render_500;
};
/*%
@@ -221,6 +222,11 @@ static isc_result_t render_404(const char *, const char *,
unsigned int *, const char **,
const char **, isc_buffer_t *,
isc_httpdfree_t **, void **);
+static isc_result_t render_500(const char *, const char *,
+ void *,
+ unsigned int *, const char **,
+ const char **, isc_buffer_t *,
+ isc_httpdfree_t **, void **);
static void
destroy_client(isc_httpd_t **httpdp)
@@ -300,6 +306,7 @@ isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
goto cleanup;
httpd->render_404 = render_404;
+ httpd->render_500 = render_500;
*httpdp = httpd;
return (ISC_R_SUCCESS);
@@ -308,7 +315,7 @@ isc_httpdmgr_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
isc_task_detach(&httpd->task);
isc_socket_detach(&httpd->sock);
isc_mem_detach(&httpd->mctx);
- isc_mutex_destroy(&httpd->lock);
+ (void)isc_mutex_destroy(&httpd->lock);
isc_mem_put(mctx, httpd, sizeof(isc_httpdmgr_t));
return (result);
}
@@ -357,7 +364,7 @@ httpdmgr_destroy(isc_httpdmgr_t *httpdmgr)
}
UNLOCK(&httpdmgr->lock);
- isc_mutex_destroy(&httpdmgr->lock);
+ (void)isc_mutex_destroy(&httpdmgr->lock);
if (httpdmgr->ondestroy != NULL)
(httpdmgr->ondestroy)(httpdmgr->cb_arg);
@@ -579,6 +586,8 @@ isc_httpd_accept(isc_task_t *task, isc_event_t *ev)
r.length = HTTP_RECVLEN - 1;
result = isc_socket_recv(httpd->sock, &r, 1, task, isc_httpd_recvdone,
httpd);
+ /* FIXME!!! */
+ POST(result);
NOTICE("accept queued recv on socket");
requeue:
@@ -623,6 +632,30 @@ render_404(const char *url, const char *querystring,
return (ISC_R_SUCCESS);
}
+static isc_result_t
+render_500(const char *url, const char *querystring,
+ void *arg,
+ unsigned int *retcode, const char **retmsg,
+ const char **mimetype, isc_buffer_t *b,
+ isc_httpdfree_t **freecb, void **freecb_args)
+{
+ static char msg[] = "Internal server failure.";
+
+ UNUSED(url);
+ UNUSED(querystring);
+ UNUSED(arg);
+
+ *retcode = 500;
+ *retmsg = "Internal server failure";
+ *mimetype = "text/plain";
+ isc_buffer_reinit(b, msg, strlen(msg));
+ isc_buffer_add(b, strlen(msg));
+ *freecb = NULL;
+ *freecb_args = NULL;
+
+ return (ISC_R_SUCCESS);
+}
+
static void
isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
{
@@ -652,8 +685,9 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
}
r.base = (unsigned char *)httpd->recvbuf + httpd->recvlen;
r.length = HTTP_RECVLEN - httpd->recvlen - 1;
- result = isc_socket_recv(httpd->sock, &r, 1, task,
- isc_httpd_recvdone, httpd);
+ /* check return code? */
+ (void)isc_socket_recv(httpd->sock, &r, 1, task,
+ isc_httpd_recvdone, httpd);
goto out;
} else if (result != ISC_R_SUCCESS) {
destroy_client(&httpd);
@@ -691,8 +725,14 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
&httpd->mimetype, &httpd->bodybuffer,
&httpd->freecb, &httpd->freecb_arg);
if (result != ISC_R_SUCCESS) {
- destroy_client(&httpd);
- goto out;
+ result = httpd->mgr->render_500(httpd->url, httpd->querystring,
+ NULL, &httpd->retcode,
+ &httpd->retmsg,
+ &httpd->mimetype,
+ &httpd->bodybuffer,
+ &httpd->freecb,
+ &httpd->freecb_arg);
+ RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
isc_httpd_response(httpd);
@@ -716,8 +756,9 @@ isc_httpd_recvdone(isc_task_t *task, isc_event_t *ev)
if (isc_buffer_length(&httpd->bodybuffer) > 0)
ISC_LIST_APPEND(httpd->bufflist, &httpd->bodybuffer, link);
- result = isc_socket_sendv(httpd->sock, &httpd->bufflist, task,
- isc_httpd_senddone, httpd);
+ /* check return code? */
+ (void)isc_socket_sendv(httpd->sock, &httpd->bufflist, task,
+ isc_httpd_senddone, httpd);
out:
isc_event_free(&ev);
@@ -784,7 +825,7 @@ isc_httpd_response(isc_httpd_t *httpd)
needlen += 3 + 1; /* room for response code, always 3 bytes */
needlen += strlen(httpd->retmsg) + 2; /* return msg + CRLF */
- if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
+ while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
result = grow_headerspace(httpd);
if (result != ISC_R_SUCCESS)
return (result);
@@ -809,7 +850,7 @@ isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
needlen += 2 + strlen(val); /* :<space> and val */
needlen += 2; /* CRLF */
- if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
+ while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
result = grow_headerspace(httpd);
if (result != ISC_R_SUCCESS)
return (result);
@@ -832,7 +873,7 @@ isc_httpd_endheaders(isc_httpd_t *httpd)
{
isc_result_t result;
- if (isc_buffer_availablelength(&httpd->headerbuffer) < 2) {
+ while (isc_buffer_availablelength(&httpd->headerbuffer) < 2) {
result = grow_headerspace(httpd);
if (result != ISC_R_SUCCESS)
return (result);
@@ -856,7 +897,7 @@ isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val) {
needlen += 2 + strlen(buf); /* :<space> and val */
needlen += 2; /* CRLF */
- if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
+ while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
result = grow_headerspace(httpd);
if (result != ISC_R_SUCCESS)
return (result);
@@ -875,7 +916,6 @@ isc_httpd_senddone(isc_task_t *task, isc_event_t *ev)
{
isc_httpd_t *httpd = ev->ev_arg;
isc_region_t r;
- isc_result_t result;
isc_socketevent_t *sev = (isc_socketevent_t *)ev;
ENTER("senddone");
@@ -926,8 +966,9 @@ isc_httpd_senddone(isc_task_t *task, isc_event_t *ev)
r.base = (unsigned char *)httpd->recvbuf;
r.length = HTTP_RECVLEN - 1;
- result = isc_socket_recv(httpd->sock, &r, 1, task, isc_httpd_recvdone,
- httpd);
+ /* check return code? */
+ (void)isc_socket_recv(httpd->sock, &r, 1, task,
+ isc_httpd_recvdone, httpd);
out:
isc_event_free(&ev);
diff --git a/lib/isc/ia64/include/isc/atomic.h b/lib/isc/ia64/include/isc/atomic.h
index 4c4679772044..6c22f2a53e28 100644
--- a/lib/isc/ia64/include/isc/atomic.h
+++ b/lib/isc/ia64/include/isc/atomic.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: atomic.h,v 1.4.326.2 2009/02/06 23:47:11 tbox Exp $ */
+/* $Id: atomic.h,v 1.7 2009/06/24 02:22:50 marka Exp $ */
#ifndef ISC_ATOMIC_H
#define ISC_ATOMIC_H 1
@@ -31,10 +31,10 @@
* (e.g., 1 and -1)?
*/
static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
#ifdef __GNUC__
__attribute__ ((unused))
#endif
+isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
{
isc_int32_t prev, swapped;
@@ -57,10 +57,10 @@ __attribute__ ((unused))
* This routine atomically stores the value 'val' in 'p'.
*/
static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val)
#ifdef __GNUC__
__attribute__ ((unused))
#endif
+isc_atomic_store(isc_int32_t *p, isc_int32_t val)
{
__asm__ volatile(
"st4.rel %0=%1"
@@ -76,10 +76,10 @@ __attribute__ ((unused))
* case.
*/
static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
#ifdef __GNUC__
__attribute__ ((unused))
#endif
+isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
{
isc_int32_t ret;
diff --git a/lib/isc/include/isc/app.h b/lib/isc/include/isc/app.h
index c4d54cbe44d9..e0be79063709 100644
--- a/lib/isc/include/isc/app.h
+++ b/lib/isc/include/isc/app.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: app.h,v 1.8 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: app.h,v 1.11 2009/09/02 23:48:03 tbox Exp $ */
#ifndef ISC_APP_H
#define ISC_APP_H 1
@@ -54,12 +54,23 @@
* Use of this module is not required. In particular, isc_app_start() is
* NOT an ISC library initialization routine.
*
+ * This module also supports per-thread 'application contexts'. With this
+ * mode, a thread-based application will have a separate context, in which
+ * it uses other ISC library services such as tasks or timers. Signals are
+ * not caught in this mode, so that the application can handle the signals
+ * in its preferred way.
+ *
* \li 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).
*
+ * The same note applies to isc_app_ctxXXX() functions, but in this case
+ * it's a per-thread restriction. For example, a thread with an
+ * application context must ensure that isc_app_ctxstart() with the
+ * context is called at most once.
+ *
* \li Reliability:
* No anticipated impact.
*
@@ -75,17 +86,64 @@
#include <isc/eventclass.h>
#include <isc/lang.h>
+#include <isc/magic.h>
#include <isc/result.h>
+/***
+ *** Types
+ ***/
+
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)
+/*%
+ * app module methods. Only app driver implementations use this structure.
+ * Other clients should use the top-level interfaces (i.e., isc_app_xxx
+ * functions). magic must be ISCAPI_APPMETHODS_MAGIC.
+ */
+typedef struct isc_appmethods {
+ void (*ctxdestroy)(isc_appctx_t **ctxp);
+ isc_result_t (*ctxstart)(isc_appctx_t *ctx);
+ isc_result_t (*ctxrun)(isc_appctx_t *ctx);
+ isc_result_t (*ctxsuspend)(isc_appctx_t *ctx);
+ isc_result_t (*ctxshutdown)(isc_appctx_t *ctx);
+ void (*ctxfinish)(isc_appctx_t *ctx);
+ void (*settaskmgr)(isc_appctx_t *ctx,
+ isc_taskmgr_t *timermgr);
+ void (*setsocketmgr)(isc_appctx_t *ctx,
+ isc_socketmgr_t *timermgr);
+ void (*settimermgr)(isc_appctx_t *ctx,
+ isc_timermgr_t *timermgr);
+} isc_appmethods_t;
+
+/*%
+ * This structure is actually just the common prefix of an application context
+ * implementation's version of an isc_appctx_t.
+ * \brief
+ * Direct use of this structure by clients is forbidden. app implementations
+ * may change the structure. 'magic' must be ISCAPI_APPCTX_MAGIC for any
+ * of the isc_app_ routines to work. app implementations must maintain
+ * all app context invariants.
+ */
+struct isc_appctx {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_appmethods_t *methods;
+};
+
+#define ISCAPI_APPCTX_MAGIC ISC_MAGIC('A','a','p','c')
+#define ISCAPI_APPCTX_VALID(c) ((c) != NULL && \
+ (c)->magic == ISCAPI_APPCTX_MAGIC)
+
ISC_LANG_BEGINDECLS
isc_result_t
+isc_app_ctxstart(isc_appctx_t *ctx);
+
+isc_result_t
isc_app_start(void);
/*!<
* \brief Start an ISC library application.
@@ -93,6 +151,9 @@ isc_app_start(void);
* Notes:
* This call should be made before any other ISC library call, and as
* close to the beginning of the application as possible.
+ *
+ * Requires:
+ * 'ctx' is a valid application context (for app_ctxstart()).
*/
isc_result_t
@@ -102,7 +163,7 @@ isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
* \brief Request delivery of an event when the application is run.
*
* Requires:
- * isc_app_start() has been called.
+ *\li isc_app_start() has been called.
*
* Returns:
* ISC_R_SUCCESS
@@ -110,6 +171,9 @@ isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
*/
isc_result_t
+isc_app_ctxrun(isc_appctx_t *ctx);
+
+isc_result_t
isc_app_run(void);
/*!<
* \brief Run an ISC library application.
@@ -120,11 +184,12 @@ isc_app_run(void);
* caller should start shutting down the application.
*
* Requires:
- *\li isc_app_start() has been called.
+ *\li isc_app_[ctx]start() has been called.
*
* Ensures:
*\li Any events requested via isc_app_onrun() will have been posted (in
* FIFO order) before isc_app_run() blocks.
+ *\li 'ctx' is a valid application context (for app_ctxrun()).
*
* Returns:
*\li ISC_R_SUCCESS Shutdown has been requested.
@@ -132,6 +197,9 @@ isc_app_run(void);
*/
isc_result_t
+isc_app_ctxshutdown(isc_appctx_t *ctx);
+
+isc_result_t
isc_app_shutdown(void);
/*!<
* \brief Request application shutdown.
@@ -141,7 +209,8 @@ isc_app_shutdown(void);
* only be triggered once.
*
* Requires:
- *\li isc_app_run() has been called.
+ *\li isc_app_[ctx]run() has been called.
+ *\li 'ctx' is a valid application context (for app_ctxshutdown()).
*
* Returns:
*\li ISC_R_SUCCESS
@@ -149,6 +218,12 @@ isc_app_shutdown(void);
*/
isc_result_t
+isc_app_ctxsuspend(isc_appctx_t *ctx);
+/*!<
+ * \brief This has the same behavior as isc_app_ctxsuspend().
+ */
+
+isc_result_t
isc_app_reload(void);
/*!<
* \brief Request application reload.
@@ -162,6 +237,9 @@ isc_app_reload(void);
*/
void
+isc_app_ctxfinish(isc_appctx_t *ctx);
+
+void
isc_app_finish(void);
/*!<
* \brief Finish an ISC library application.
@@ -171,6 +249,7 @@ isc_app_finish(void);
*
* Requires:
*\li isc_app_start() has been called.
+ *\li 'ctx' is a valid application context (for app_ctxfinish()).
*
* Ensures:
*\li Any resources allocated by isc_app_start() have been released.
@@ -206,6 +285,90 @@ isc_app_unblock(void);
* \li isc_app_block() has been called by the same thread.
*/
+isc_result_t
+isc_appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp);
+/*!<
+ * \brief Create an application context.
+ *
+ * Requires:
+ *\li 'mctx' is a valid memory context.
+ *\li 'ctxp' != NULL && *ctxp == NULL.
+ */
+
+void
+isc_appctx_destroy(isc_appctx_t **ctxp);
+/*!<
+ * \brief Destroy an application context.
+ *
+ * Requires:
+ *\li '*ctxp' is a valid application context.
+ *
+ * Ensures:
+ *\li *ctxp == NULL.
+ */
+
+void
+isc_appctx_settaskmgr(isc_appctx_t *ctx, isc_taskmgr_t *taskmgr);
+/*!<
+ * \brief Associate a task manager with an application context.
+ *
+ * This must be done before running tasks within the application context.
+ *
+ * Requires:
+ *\li 'ctx' is a valid application context.
+ *\li 'taskmgr' is a valid task manager.
+ */
+
+void
+isc_appctx_setsocketmgr(isc_appctx_t *ctx, isc_socketmgr_t *socketmgr);
+/*!<
+ * \brief Associate a socket manager with an application context.
+ *
+ * This must be done before handling socket events within the application
+ * context.
+ *
+ * Requires:
+ *\li 'ctx' is a valid application context.
+ *\li 'socketmgr' is a valid socket manager.
+ */
+
+void
+isc_appctx_settimermgr(isc_appctx_t *ctx, isc_timermgr_t *timermgr);
+/*!<
+ * \brief Associate a socket timer with an application context.
+ *
+ * This must be done before handling timer events within the application
+ * context.
+ *
+ * Requires:
+ *\li 'ctx' is a valid application context.
+ *\li 'timermgr' is a valid timer manager.
+ */
+
+#ifdef USE_APPIMPREGISTER
+/*%<
+ * See isc_appctx_create() above.
+ */
+typedef isc_result_t
+(*isc_appctxcreatefunc_t)(isc_mem_t *mctx, isc_appctx_t **ctxp);
+
+isc_result_t
+isc_app_register(isc_appctxcreatefunc_t createfunc);
+/*%<
+ * Register a new application implementation and add it to the list of
+ * supported implementations. This function must be called when a different
+ * event library is used than the one contained in the ISC library.
+ */
+
+isc_result_t
+isc__app_register(void);
+/*%<
+ * A short cut function that specifies the application module in the ISC
+ * library for isc_app_register(). An application that uses the ISC library
+ * usually do not have to care about this function: it would call
+ * isc_lib_register(), which internally calls this function.
+ */
+#endif /* USE_APPIMPREGISTER */
ISC_LANG_ENDDECLS
diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h
index b03115216909..2c81b1ae9880 100644
--- a/lib/isc/include/isc/assertions.h
+++ b/lib/isc/include/isc/assertions.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -16,7 +16,7 @@
*/
/*
- * $Id: assertions.h,v 1.26 2008/10/15 23:47:31 tbox Exp $
+ * $Id: assertions.h,v 1.28 2009/09/29 23:48:04 tbox Exp $
*/
/*! \file isc/assertions.h
*/
@@ -41,7 +41,9 @@ typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t,
const char *);
/* coverity[+kill] */
-LIBISC_EXTERNAL_DATA extern isc_assertioncallback_t isc_assertion_failed;
+ISC_PLATFORM_NORETURN_PRE
+void isc_assertion_failed(const char *, int, isc_assertiontype_t,
+ const char *) ISC_PLATFORM_NORETURN_POST;
void
isc_assertion_setcallback(isc_assertioncallback_t);
diff --git a/lib/isc/include/isc/backtrace.h b/lib/isc/include/isc/backtrace.h
new file mode 100644
index 000000000000..c0e98c0b7530
--- /dev/null
+++ b/lib/isc/include/isc/backtrace.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: backtrace.h,v 1.2 2009/09/01 18:40:25 jinmei Exp $ */
+
+/*! \file isc/backtrace.h
+ * \brief provide a back trace of the running process to help debug problems.
+ *
+ * This module tries to get a back trace of the process using some platform
+ * dependent way when available. It also manages an internal symbol table
+ * that maps function addresses used in the process to their textual symbols.
+ * This module is expected to be used to help debug when some fatal error
+ * happens.
+ *
+ * IMPORTANT NOTE: since the (major) intended use case of this module is
+ * dumping a back trace on a fatal error, normally followed by self termination,
+ * functions defined in this module generally doesn't employ assertion checks
+ * (if it did, a program bug could cause infinite recursive calls to a
+ * backtrace function). These functions still perform minimal checks and return
+ * ISC_R_FAILURE if they detect an error, but the caller should therefore be
+ * very careful about the use of these functions, and generally discouraged to
+ * use them except in an exit path. The exception is
+ * isc_backtrace_getsymbolfromindex(), which is expected to be used in a
+ * non-error-handling context and validates arguments with assertion checks.
+ */
+
+#ifndef ISC_BACKTRACE_H
+#define ISC_BACKTRACE_H 1
+
+/***
+ *** Imports
+ ***/
+
+#include <isc/types.h>
+
+/***
+ *** Types
+ ***/
+struct isc_backtrace_symmap {
+ void *addr;
+ const char *symbol;
+};
+
+extern const int isc__backtrace_nsymbols;
+extern const isc_backtrace_symmap_t isc__backtrace_symtable[];
+
+/***
+ *** Functions
+ ***/
+
+ISC_LANG_BEGINDECLS
+isc_result_t
+isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes);
+/*%<
+ * Get a back trace of the running process above this function itself. On
+ * success, addrs[i] will store the address of the call point of the i-th
+ * stack frame (addrs[0] is the caller of this function). *nframes will store
+ * the total number of frames.
+ *
+ * Requires (note that these are not ensured by assertion checks, see above):
+ *
+ *\li 'addrs' is a valid array containing at least 'maxaddrs' void * entries.
+ *
+ *\li 'nframes' must be non NULL.
+ *
+ * Returns:
+ *
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_FAILURE
+ *\li #ISC_R_NOTFOUND
+ *\li #ISC_R_NOTIMPLEMENTED
+ */
+
+isc_result_t
+isc_backtrace_getsymbolfromindex(int index, const void **addrp,
+ const char **symbolp);
+/*%<
+ * Returns the content of the internal symbol table of the given index.
+ * On success, *addrsp and *symbolp point to the address and the symbol of
+ * the 'index'th entry of the table, respectively. If 'index' is not in the
+ * range of the symbol table, ISC_R_RANGE will be returned.
+ *
+ * Requires
+ *
+ *\li 'addrp' must be non NULL && '*addrp' == NULL.
+ *
+ *\li 'symbolp' must be non NULL && '*symbolp' == NULL.
+ *
+ * Returns:
+ *
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_RANGE
+ */
+
+isc_result_t
+isc_backtrace_getsymbol(const void *addr, const char **symbolp,
+ unsigned long *offsetp);
+/*%<
+ * Searches the internal symbol table for the symbol that most matches the
+ * given 'addr'. On success, '*symbolp' will point to the name of function
+ * to which the address 'addr' belong, and '*offsetp' will store the offset
+ * from the function's entry address to 'addr'.
+ *
+ * Requires (note that these are not ensured by assertion checks, see above):
+ *
+ *\li 'symbolp' must be non NULL && '*symbolp' == NULL.
+ *
+ *\li 'offsetp' must be non NULL.
+ *
+ * Returns:
+ *
+ *\li #ISC_R_SUCCESS
+ *\li #ISC_R_FAILURE
+ *\li #ISC_R_NOTFOUND
+ */
+ISC_LANG_ENDDECLS
+
+#endif /* ISC_BACKTRACE_H */
diff --git a/lib/isc/include/isc/bind9.h b/lib/isc/include/isc/bind9.h
new file mode 100644
index 000000000000..00bcb24c4a9b
--- /dev/null
+++ b/lib/isc/include/isc/bind9.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: bind9.h,v 1.2 2009/12/05 23:31:41 each Exp $ */
+
+#ifndef ISC_BIND9_H
+#define ISC_BIND9_H 1
+
+/*
+ * This determines whether we are building BIND9 or using the exported
+ * libisc/libdns libraries. The version of this file included in the
+ * standard BIND9 build defines BIND9; the version included with the
+ * exportable libraries does not.
+ */
+#define BIND9 1
+
+#endif /* ISC_BIND9_H */
diff --git a/lib/isc/include/isc/buffer.h b/lib/isc/include/isc/buffer.h
index 2a02d88e4e8e..ae7e4c3dfc34 100644
--- a/lib/isc/include/isc/buffer.h
+++ b/lib/isc/include/isc/buffer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: buffer.h,v 1.53 2008/09/25 04:02:39 tbox Exp $ */
+/* $Id: buffer.h,v 1.55 2010/12/20 23:47:21 tbox Exp $ */
#ifndef ISC_BUFFER_H
#define ISC_BUFFER_H 1
diff --git a/lib/isc/include/isc/entropy.h b/lib/isc/include/isc/entropy.h
index e9e59c495141..d28f29a56ecf 100644
--- a/lib/isc/include/isc/entropy.h
+++ b/lib/isc/include/isc/entropy.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.h,v 1.32.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: entropy.h,v 1.35 2009/10/19 02:37:08 marka Exp $ */
#ifndef ISC_ENTROPY_H
#define ISC_ENTROPY_H 1
@@ -182,8 +182,8 @@ isc_result_t
isc_entropy_createsamplesource(isc_entropy_t *ent,
isc_entropysource_t **sourcep);
/*!<
- * \brief Create an entropy source that consists of samples. Each sample is added
- * to the source via isc_entropy_addsamples(), below.
+ * \brief Create an entropy source that consists of samples. Each sample is
+ * added to the source via isc_entropy_addsamples(), below.
*/
isc_result_t
@@ -254,11 +254,11 @@ void
isc_entropy_putdata(isc_entropy_t *ent, void *data, unsigned int length,
isc_uint32_t entropy);
/*!<
- * \brief Add "length" bytes in "data" to the entropy pool, incrementing the pool's
- * entropy count by "entropy."
+ * \brief Add "length" bytes in "data" to the entropy pool, incrementing the
+ * pool's entropy count by "entropy."
*
- * These bytes will prime the pseudorandom portion even no entropy is actually
- * added.
+ * These bytes will prime the pseudorandom portion even if no entropy is
+ * actually added.
*/
void
diff --git a/lib/isc/include/isc/error.h b/lib/isc/include/isc/error.h
index efb9b5f3a11c..e0cdfa83e7cb 100644
--- a/lib/isc/include/isc/error.h
+++ b/lib/isc/include/isc/error.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: error.h,v 1.20 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: error.h,v 1.22 2009/09/29 23:48:04 tbox Exp $ */
#ifndef ISC_ERROR_H
#define ISC_ERROR_H 1
@@ -26,6 +26,7 @@
#include <isc/formatcheck.h>
#include <isc/lang.h>
+#include <isc/platform.h>
ISC_LANG_BEGINDECLS
@@ -45,9 +46,9 @@ isc_error_unexpected(const char *, int, const char *, ...)
ISC_FORMAT_PRINTF(3, 4);
/*% fatal error */
-void
+ISC_PLATFORM_NORETURN_PRE void
isc_error_fatal(const char *, int, const char *, ...)
- ISC_FORMAT_PRINTF(3, 4);
+ISC_FORMAT_PRINTF(3, 4) ISC_PLATFORM_NORETURN_POST;
/*% runtimecheck error */
void
diff --git a/lib/isc/include/isc/file.h b/lib/isc/include/isc/file.h
index c9457343e055..5db506a389a4 100644
--- a/lib/isc/include/isc/file.h
+++ b/lib/isc/include/isc/file.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: file.h,v 1.33.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_FILE_H
#define ISC_FILE_H 1
@@ -30,10 +30,10 @@
ISC_LANG_BEGINDECLS
isc_result_t
-isc_file_settime(const char *file, isc_time_t *time);
+isc_file_settime(const char *file, isc_time_t *itime);
isc_result_t
-isc_file_getmodtime(const char *file, isc_time_t *time);
+isc_file_getmodtime(const char *file, isc_time_t *itime);
/*!<
* \brief Get the time of last modification of a file.
*
@@ -100,6 +100,10 @@ isc_file_mktemplate(const char *path, char *buf, size_t buflen);
isc_result_t
isc_file_openunique(char *templet, FILE **fp);
+isc_result_t
+isc_file_openuniqueprivate(char *templet, FILE **fp);
+isc_result_t
+isc_file_openuniquemode(char *templet, int mode, FILE **fp);
/*!<
* \brief Create and open a file with a unique name based on 'templet'.
*
@@ -181,6 +185,27 @@ isc_file_isabsolute(const char *filename);
* \brief Return #ISC_TRUE if the given file name is absolute.
*/
+isc_result_t
+isc_file_isplainfile(const char *name);
+/*!<
+ * \brief Check that the file is a plain file
+ *
+ * Returns:
+ *\li #ISC_R_SUCCESS
+ * Success. The file is a plain file.
+ *\li #ISC_R_INVALIDFILE
+ * The path specified was not usable by the operating system.
+ *\li #ISC_R_FILENOTFOUND
+ * The file does not exist. This return code comes from
+ * errno=ENOENT when stat returns -1. This code is mentioned
+ * here, because in logconf.c, it is the one rcode that is
+ * permitted in addition to ISC_R_SUCCESS. This is done since
+ * the next call in logconf.c is to isc_stdio_open(), which
+ * will create the file if it can.
+ *\li #other ISC_R_* errors translated from errno
+ * These occur when stat returns -1 and an errno.
+ */
+
isc_boolean_t
isc_file_iscurrentdir(const char *filename);
/*!<
@@ -251,6 +276,29 @@ isc_file_truncate(const char *filename, isc_offset_t size);
* Truncate/extend the file specified to 'size' bytes.
*/
+isc_result_t
+isc_file_safecreate(const char *filename, FILE **fp);
+/*%<
+ * Open 'filename' for writing, truncating if necessary. Ensure that
+ * if it existed it was a normal file. If creating the file, ensure
+ * that only the owner can read/write it.
+ */
+
+isc_result_t
+isc_file_splitpath(isc_mem_t *mctx, char *path,
+ char **dirname, char **basename);
+/*%<
+ * Split a path into dirname and basename. If 'path' contains no slash
+ * (or, on windows, backslash), then '*dirname' is set to ".".
+ *
+ * Allocates memory for '*dirname', which can be freed with isc_mem_free().
+ *
+ * Returns:
+ * - ISC_R_SUCCESS on success
+ * - ISC_R_INVALIDFILE if 'path' is empty or ends with '/'
+ * - ISC_R_NOMEMORY if unable to allocate memory
+ */
+
ISC_LANG_ENDDECLS
#endif /* ISC_FILE_H */
diff --git a/lib/isc/include/isc/fsaccess.h b/lib/isc/include/isc/fsaccess.h
index 3b455e5d56be..7962bbe21ab1 100644
--- a/lib/isc/include/isc/fsaccess.h
+++ b/lib/isc/include/isc/fsaccess.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: fsaccess.h,v 1.14.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: fsaccess.h,v 1.16 2009/01/17 23:47:43 tbox Exp $ */
#ifndef ISC_FSACCESS_H
#define ISC_FSACCESS_H 1
diff --git a/lib/isc/include/isc/hash.h b/lib/isc/include/isc/hash.h
index da30a19cdbc4..ca04b4e43c75 100644
--- a/lib/isc/include/isc/hash.h
+++ b/lib/isc/include/isc/hash.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hash.h,v 1.10.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: hash.h,v 1.12 2009/01/17 23:47:43 tbox Exp $ */
#ifndef ISC_HASH_H
#define ISC_HASH_H 1
diff --git a/lib/isc/include/isc/heap.h b/lib/isc/include/isc/heap.h
index 82c59826db45..77bf07c34498 100644
--- a/lib/isc/include/isc/heap.h
+++ b/lib/isc/include/isc/heap.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: heap.h,v 1.24.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: heap.h,v 1.26 2009/01/17 23:47:43 tbox Exp $ */
#ifndef ISC_HEAP_H
#define ISC_HEAP_H 1
diff --git a/lib/isc/include/isc/hmacmd5.h b/lib/isc/include/isc/hmacmd5.h
index fab9c580c5d9..9ecad453dfa5 100644
--- a/lib/isc/include/isc/hmacmd5.h
+++ b/lib/isc/include/isc/hmacmd5.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.h,v 1.12 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: hmacmd5.h,v 1.14 2009/02/06 23:47:42 tbox Exp $ */
/*! \file isc/hmacmd5.h
* \brief This is the header file for the HMAC-MD5 keyed hash algorithm
@@ -27,14 +27,23 @@
#include <isc/lang.h>
#include <isc/md5.h>
+#include <isc/platform.h>
#include <isc/types.h>
#define ISC_HMACMD5_KEYLENGTH 64
+#ifdef ISC_PLATFORM_OPENSSLHASH
+#include <openssl/hmac.h>
+
+typedef HMAC_CTX isc_hmacmd5_t;
+
+#else
+
typedef struct {
isc_md5_t md5ctx;
unsigned char key[ISC_HMACMD5_KEYLENGTH];
} isc_hmacmd5_t;
+#endif
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/include/isc/hmacsha.h b/lib/isc/include/isc/hmacsha.h
index 362b37f81acd..1d0e18409536 100644
--- a/lib/isc/include/isc/hmacsha.h
+++ b/lib/isc/include/isc/hmacsha.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacsha.h,v 1.7 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: hmacsha.h,v 1.9 2009/02/06 23:47:42 tbox Exp $ */
/*! \file isc/hmacsha.h
* This is the header file for the HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
@@ -25,6 +25,7 @@
#define ISC_HMACSHA_H 1
#include <isc/lang.h>
+#include <isc/platform.h>
#include <isc/sha1.h>
#include <isc/sha2.h>
#include <isc/types.h>
@@ -35,6 +36,17 @@
#define ISC_HMACSHA384_KEYLENGTH ISC_SHA384_BLOCK_LENGTH
#define ISC_HMACSHA512_KEYLENGTH ISC_SHA512_BLOCK_LENGTH
+#ifdef ISC_PLATFORM_OPENSSLHASH
+#include <openssl/hmac.h>
+
+typedef HMAC_CTX isc_hmacsha1_t;
+typedef HMAC_CTX isc_hmacsha224_t;
+typedef HMAC_CTX isc_hmacsha256_t;
+typedef HMAC_CTX isc_hmacsha384_t;
+typedef HMAC_CTX isc_hmacsha512_t;
+
+#else
+
typedef struct {
isc_sha1_t sha1ctx;
unsigned char key[ISC_HMACSHA1_KEYLENGTH];
@@ -59,6 +71,7 @@ typedef struct {
isc_sha512_t sha512ctx;
unsigned char key[ISC_HMACSHA512_KEYLENGTH];
} isc_hmacsha512_t;
+#endif
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/include/isc/lib.h b/lib/isc/include/isc/lib.h
index 765cdfaa1996..f24fef850169 100644
--- a/lib/isc/include/isc/lib.h
+++ b/lib/isc/include/isc/lib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.h,v 1.14 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: lib.h,v 1.16 2009/09/02 23:48:03 tbox Exp $ */
#ifndef ISC_LIB_H
#define ISC_LIB_H 1
@@ -36,6 +36,15 @@ isc_lib_initmsgcat(void);
* has not already been initialized.
*/
+void
+isc_lib_register(void);
+/*!<
+ * \brief Register the ISC library implementations for some base services
+ * such as memory or event management and handling socket or timer events.
+ * An external application that wants to use the ISC library must call this
+ * function very early in main().
+ */
+
ISC_LANG_ENDDECLS
#endif /* ISC_LIB_H */
diff --git a/lib/isc/include/isc/list.h b/lib/isc/include/isc/list.h
index 9338275c940a..c9bdfc7ad6bc 100644
--- a/lib/isc/include/isc/list.h
+++ b/lib/isc/include/isc/list.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: list.h,v 1.24 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_LIST_H
#define ISC_LIST_H 1
@@ -169,6 +169,19 @@
(list2).tail = NULL; \
} while (0)
+#define ISC_LIST_PREPENDLIST(list1, list2, link) \
+ do { \
+ if (ISC_LIST_EMPTY(list1)) \
+ (list1) = (list2); \
+ else if (!ISC_LIST_EMPTY(list2)) { \
+ (list2).tail->link.next = (list1).head; \
+ (list1).head->link.prev = (list2).tail; \
+ (list1).head = (list2).head; \
+ } \
+ (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)
diff --git a/lib/isc/include/isc/log.h b/lib/isc/include/isc/log.h
index c9ba8082e52c..741c5324290c 100644
--- a/lib/isc/include/isc/log.h
+++ b/lib/isc/include/isc/log.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.54.332.5 2009/02/16 02:04:05 marka Exp $ */
+/* $Id: log.h,v 1.59 2009/02/16 02:01:16 marka Exp $ */
#ifndef ISC_LOG_H
#define ISC_LOG_H 1
diff --git a/lib/isc/include/isc/md5.h b/lib/isc/include/isc/md5.h
index 5b0d785cd1c4..dfa586d0a3b0 100644
--- a/lib/isc/include/isc/md5.h
+++ b/lib/isc/include/isc/md5.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: md5.h,v 1.16 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: md5.h,v 1.20 2010/01/07 23:48:54 tbox Exp $ */
/*! \file isc/md5.h
* \brief This is the header file for the MD5 message-digest algorithm.
@@ -44,15 +44,25 @@
#define ISC_MD5_H 1
#include <isc/lang.h>
+#include <isc/platform.h>
#include <isc/types.h>
#define ISC_MD5_DIGESTLENGTH 16U
+#define ISC_MD5_BLOCK_LENGTH 64U
+
+#ifdef ISC_PLATFORM_OPENSSLHASH
+#include <openssl/evp.h>
+
+typedef EVP_MD_CTX isc_md5_t;
+
+#else
typedef struct {
isc_uint32_t buf[4];
isc_uint32_t bytes[2];
isc_uint32_t in[16];
} isc_md5_t;
+#endif
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h
index 480a934078ed..5101ea3fed1c 100644
--- a/lib/isc/include/isc/mem.h
+++ b/lib/isc/include/isc/mem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.h,v 1.78.120.3 2009/02/11 03:07:01 jinmei Exp $ */
+/* $Id$ */
#ifndef ISC_MEM_H
#define ISC_MEM_H 1
@@ -121,7 +121,7 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging;
#if ISC_MEM_TRACKLINES
#define _ISC_MEM_FILELINE , __FILE__, __LINE__
-#define _ISC_MEM_FLARG , const char *, int
+#define _ISC_MEM_FLARG , const char *, unsigned int
#else
#define _ISC_MEM_FILELINE
#define _ISC_MEM_FLARG
@@ -152,11 +152,29 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging;
#endif
-#define isc_mem_get(c, s) isc__mem_get((c), (s) _ISC_MEM_FILELINE)
-#define isc_mem_allocate(c, s) isc__mem_allocate((c), (s) _ISC_MEM_FILELINE)
-#define isc_mem_reallocate(c, p, s) isc__mem_reallocate((c), (p), (s) _ISC_MEM_FILELINE)
-#define isc_mem_strdup(c, p) isc__mem_strdup((c), (p) _ISC_MEM_FILELINE)
-#define isc_mempool_get(c) isc__mempool_get((c) _ISC_MEM_FILELINE)
+/*%<
+ * We use either isc___mem (three underscores) or isc__mem (two) depending on
+ * whether it's for BIND9's internal purpose (with -DBIND9) or generic export
+ * library. This condition is generally handled in isc/namespace.h, but for
+ * Windows it doesn't work if it involves multiple times of macro expansion
+ * (such as isc_mem to isc__mem then to isc___mem). The following definitions
+ * are used to work around this portability issue. Right now, we don't support
+ * the export library for Windows, so we always use the three-underscore
+ * version.
+ */
+#ifdef WIN32
+#define ISCMEMFUNC(sfx) isc___mem_ ## sfx
+#define ISCMEMPOOLFUNC(sfx) isc___mempool_ ## sfx
+#else
+#define ISCMEMFUNC(sfx) isc__mem_ ## sfx
+#define ISCMEMPOOLFUNC(sfx) isc__mempool_ ## sfx
+#endif
+
+#define isc_mem_get(c, s) ISCMEMFUNC(get)((c), (s) _ISC_MEM_FILELINE)
+#define isc_mem_allocate(c, s) ISCMEMFUNC(allocate)((c), (s) _ISC_MEM_FILELINE)
+#define isc_mem_reallocate(c, p, s) ISCMEMFUNC(reallocate)((c), (p), (s) _ISC_MEM_FILELINE)
+#define isc_mem_strdup(c, p) ISCMEMFUNC(strdup)((c), (p) _ISC_MEM_FILELINE)
+#define isc_mempool_get(c) ISCMEMPOOLFUNC(get)((c) _ISC_MEM_FILELINE)
/*%
* isc_mem_putanddetach() is a convenience function for use where you
@@ -187,33 +205,102 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_debugging;
* \endcode
*/
+/*% memory and memory pool methods */
+typedef struct isc_memmethods {
+ void (*attach)(isc_mem_t *source, isc_mem_t **targetp);
+ void (*detach)(isc_mem_t **mctxp);
+ void (*destroy)(isc_mem_t **mctxp);
+ void *(*memget)(isc_mem_t *mctx, size_t size _ISC_MEM_FLARG);
+ void (*memput)(isc_mem_t *mctx, void *ptr, size_t size _ISC_MEM_FLARG);
+ void (*memputanddetach)(isc_mem_t **mctxp, void *ptr,
+ size_t size _ISC_MEM_FLARG);
+ void *(*memallocate)(isc_mem_t *mctx, size_t size _ISC_MEM_FLARG);
+ void *(*memreallocate)(isc_mem_t *mctx, void *ptr,
+ size_t size _ISC_MEM_FLARG);
+ char *(*memstrdup)(isc_mem_t *mctx, const char *s _ISC_MEM_FLARG);
+ void (*memfree)(isc_mem_t *mctx, void *ptr _ISC_MEM_FLARG);
+ void (*setdestroycheck)(isc_mem_t *mctx, isc_boolean_t flag);
+ void (*setwater)(isc_mem_t *ctx, isc_mem_water_t water,
+ void *water_arg, size_t hiwater, size_t lowater);
+ void (*waterack)(isc_mem_t *ctx, int flag);
+ size_t (*inuse)(isc_mem_t *mctx);
+ isc_boolean_t (*isovermem)(isc_mem_t *mctx);
+ isc_result_t (*mpcreate)(isc_mem_t *mctx, size_t size,
+ isc_mempool_t **mpctxp);
+} isc_memmethods_t;
+
+typedef struct isc_mempoolmethods {
+ void (*destroy)(isc_mempool_t **mpctxp);
+ void *(*get)(isc_mempool_t *mpctx _ISC_MEM_FLARG);
+ void (*put)(isc_mempool_t *mpctx, void *mem _ISC_MEM_FLARG);
+ unsigned int (*getallocated)(isc_mempool_t *mpctx);
+ void (*setmaxalloc)(isc_mempool_t *mpctx, unsigned int limit);
+ void (*setfreemax)(isc_mempool_t *mpctx, unsigned int limit);
+ void (*setname)(isc_mempool_t *mpctx, const char *name);
+ void (*associatelock)(isc_mempool_t *mpctx, isc_mutex_t *lock);
+ void (*setfillcount)(isc_mempool_t *mpctx, unsigned int limit);
+} isc_mempoolmethods_t;
+
+/*%
+ * This structure is actually just the common prefix of a memory context
+ * implementation's version of an isc_mem_t.
+ * \brief
+ * Direct use of this structure by clients is forbidden. mctx implementations
+ * may change the structure. 'magic' must be ISCAPI_MCTX_MAGIC for any of the
+ * isc_mem_ routines to work. mctx implementations must maintain all mctx
+ * invariants.
+ */
+struct isc_mem {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_memmethods_t *methods;
+};
+
+#define ISCAPI_MCTX_MAGIC ISC_MAGIC('A','m','c','x')
+#define ISCAPI_MCTX_VALID(m) ((m) != NULL && \
+ (m)->magic == ISCAPI_MCTX_MAGIC)
+
+/*%
+ * This is the common prefix of a memory pool context. The same note as
+ * that for the mem structure applies.
+ */
+struct isc_mempool {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_mempoolmethods_t *methods;
+};
+
+#define ISCAPI_MPOOL_MAGIC ISC_MAGIC('A','m','p','l')
+#define ISCAPI_MPOOL_VALID(mp) ((mp) != NULL && \
+ (mp)->magic == ISCAPI_MPOOL_MAGIC)
+
#if ISC_MEM_DEBUG
#define isc_mem_put(c, p, s) \
do { \
- isc__mem_put((c), (p), (s) _ISC_MEM_FILELINE); \
+ ISCMEMFUNC(put)((c), (p), (s) _ISC_MEM_FILELINE); \
(p) = NULL; \
} while (0)
#define isc_mem_putanddetach(c, p, s) \
do { \
- isc__mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE); \
+ ISCMEMFUNC(putanddetach)((c), (p), (s) _ISC_MEM_FILELINE); \
(p) = NULL; \
} while (0)
#define isc_mem_free(c, p) \
do { \
- isc__mem_free((c), (p) _ISC_MEM_FILELINE); \
+ ISCMEMFUNC(free)((c), (p) _ISC_MEM_FILELINE); \
(p) = NULL; \
} while (0)
#define isc_mempool_put(c, p) \
do { \
- isc__mempool_put((c), (p) _ISC_MEM_FILELINE); \
+ ISCMEMPOOLFUNC(put)((c), (p) _ISC_MEM_FILELINE); \
(p) = NULL; \
} while (0)
#else
-#define isc_mem_put(c, p, s) isc__mem_put((c), (p), (s) _ISC_MEM_FILELINE)
+#define isc_mem_put(c, p, s) ISCMEMFUNC(put)((c), (p), (s) _ISC_MEM_FILELINE)
#define isc_mem_putanddetach(c, p, s) \
- isc__mem_putanddetach((c), (p), (s) _ISC_MEM_FILELINE)
-#define isc_mem_free(c, p) isc__mem_free((c), (p) _ISC_MEM_FILELINE)
-#define isc_mempool_put(c, p) isc__mempool_put((c), (p) _ISC_MEM_FILELINE)
+ ISCMEMFUNC(putanddetach)((c), (p), (s) _ISC_MEM_FILELINE)
+#define isc_mem_free(c, p) ISCMEMFUNC(free)((c), (p) _ISC_MEM_FILELINE)
+#define isc_mempool_put(c, p) ISCMEMPOOLFUNC(put)((c), (p) _ISC_MEM_FILELINE)
#endif
/*@{*/
@@ -247,7 +334,7 @@ isc_mem_createx2(size_t max_size, size_t target_size,
* ISC_MEMFLAG_INTERNAL is not set, 'target_size' is ignored.
*
* 'max_size' is also used to size the statistics arrays and the array
- * used to record active memory when ISC_MEM_DEBUGRECORD is set. Settin
+ * used to record active memory when ISC_MEM_DEBUGRECORD is set. Setting
* 'max_size' too low can have detrimental effects on performance.
*
* A memory context created using isc_mem_createx() will obtain
@@ -334,6 +421,14 @@ isc_mem_inuse(isc_mem_t *mctx);
* allocated from the system but not yet used.
*/
+isc_boolean_t
+isc_mem_isovermem(isc_mem_t *mctx);
+/*%<
+ * Return true iff the memory context is in "over memory" state, i.e.,
+ * a hiwater mark has been set and the used amount of memory has exceeds
+ * the mark.
+ */
+
void
isc_mem_setwater(isc_mem_t *mctx, isc_mem_water_t water, void *water_arg,
size_t hiwater, size_t lowater);
@@ -605,24 +700,50 @@ isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit);
* Pseudo-private functions for use via macros. Do not call directly.
*/
void *
-isc__mem_get(isc_mem_t *, size_t _ISC_MEM_FLARG);
+ISCMEMFUNC(get)(isc_mem_t *, size_t _ISC_MEM_FLARG);
void
-isc__mem_putanddetach(isc_mem_t **, void *,
- size_t _ISC_MEM_FLARG);
+ISCMEMFUNC(putanddetach)(isc_mem_t **, void *, size_t _ISC_MEM_FLARG);
void
-isc__mem_put(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
+ISCMEMFUNC(put)(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
void *
-isc__mem_allocate(isc_mem_t *, size_t _ISC_MEM_FLARG);
+ISCMEMFUNC(allocate)(isc_mem_t *, size_t _ISC_MEM_FLARG);
void *
-isc__mem_reallocate(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
+ISCMEMFUNC(reallocate)(isc_mem_t *, void *, size_t _ISC_MEM_FLARG);
void
-isc__mem_free(isc_mem_t *, void * _ISC_MEM_FLARG);
+ISCMEMFUNC(free)(isc_mem_t *, void * _ISC_MEM_FLARG);
char *
-isc__mem_strdup(isc_mem_t *, const char *_ISC_MEM_FLARG);
+ISCMEMFUNC(strdup)(isc_mem_t *, const char *_ISC_MEM_FLARG);
void *
-isc__mempool_get(isc_mempool_t * _ISC_MEM_FLARG);
+ISCMEMPOOLFUNC(get)(isc_mempool_t * _ISC_MEM_FLARG);
void
-isc__mempool_put(isc_mempool_t *, void * _ISC_MEM_FLARG);
+ISCMEMPOOLFUNC(put)(isc_mempool_t *, void * _ISC_MEM_FLARG);
+
+#ifdef USE_MEMIMPREGISTER
+
+/*%<
+ * See isc_mem_create2() above.
+ */
+typedef isc_result_t
+(*isc_memcreatefunc_t)(size_t init_max_size, size_t target_size,
+ isc_mem_t **ctxp, unsigned int flags);
+
+isc_result_t
+isc_mem_register(isc_memcreatefunc_t createfunc);
+/*%<
+ * Register a new memory management implementation and add it to the list of
+ * supported implementations. This function must be called when a different
+ * memory management library is used than the one contained in the ISC library.
+ */
+
+isc_result_t
+isc__mem_register(void);
+/*%<
+ * A short cut function that specifies the memory management module in the ISC
+ * library for isc_mem_register(). An application that uses the ISC library
+ * usually do not have to care about this function: it would call
+ * isc_lib_register(), which internally calls this function.
+ */
+#endif /* USE_MEMIMPREGISTER */
ISC_LANG_ENDDECLS
diff --git a/lib/isc/include/isc/msgs.h b/lib/isc/include/isc/msgs.h
index 4b4d8ab4de63..60c5c7caf882 100644
--- a/lib/isc/include/isc/msgs.h
+++ b/lib/isc/include/isc/msgs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: msgs.h,v 1.17 2008/08/08 06:28:59 tbox Exp $ */
+/* $Id: msgs.h,v 1.19 2009/10/01 23:48:08 tbox Exp $ */
#ifndef ISC_MSGS_H
#define ISC_MSGS_H 1
@@ -157,7 +157,7 @@
#define ISC_MSG_FILTER 1421 /*%< setsockopt(SO_ACCEPTFILTER): %s */
#define ISC_MSG_TOOMANYHANDLES 1422 /*%< %s: too many open WSA event handles: %s */
-
+#define ISC_MSG_POKED 1423 /*%< "poked flags: %d" */
#define ISC_MSG_AWAKE 1502 /*%< "awake" */
#define ISC_MSG_WORKING 1503 /*%< "working" */
diff --git a/lib/isc/include/isc/namespace.h b/lib/isc/include/isc/namespace.h
new file mode 100644
index 000000000000..cd4ec9ad1689
--- /dev/null
+++ b/lib/isc/include/isc/namespace.h
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+#ifndef ISCAPI_NAMESPACE_H
+#define ISCAPI_NAMESPACE_H 1
+
+/*%
+ * name space conversions
+ */
+
+#ifdef BIND9
+
+#define isc_app_start isc__app_start
+#define isc_app_ctxstart isc__app_ctxstart
+#define isc_app_onrun isc__app_onrun
+#define isc_app_run isc__app_run
+#define isc_app_ctxrun isc__app_ctxrun
+#define isc_app_shutdown isc__app_shutdown
+#define isc_app_ctxfinish isc__app_ctxfinish
+#define isc_app_ctxshutdown isc__app_ctxshutdown
+#define isc_app_ctxsuspend isc__app_ctxsuspend
+#define isc_app_reload isc__app_reload
+#define isc_app_finish isc__app_finish
+#define isc_app_block isc__app_block
+#define isc_app_unblock isc__app_unblock
+#define isc_appctx_create isc__appctx_create
+#define isc_appctx_destroy isc__appctx_destroy
+#define isc_appctx_settaskmgr isc__appctx_settaskmgr
+#define isc_appctx_setsocketmgr isc__appctx_setsocketmgr
+#define isc_appctx_settimermgr isc__appctx_settimermgr
+
+#define isc_mem_checkdestroyed isc__mem_checkdestroyed
+#define isc_mem_createx isc__mem_createx
+#define isc_mem_createx2 isc__mem_createx2
+#define isc_mem_create isc__mem_create
+#define isc_mem_create2 isc__mem_create2
+#define isc_mem_attach isc__mem_attach
+#define isc_mem_detach isc__mem_detach
+#define isc__mem_putanddetach isc___mem_putanddetach
+#define isc_mem_destroy isc__mem_destroy
+#define isc_mem_ondestroy isc__mem_ondestroy
+#define isc__mem_get isc___mem_get
+#define isc__mem_put isc___mem_put
+#define isc_mem_stats isc__mem_stats
+#define isc__mem_allocate isc___mem_allocate
+#define isc__mem_free isc___mem_free
+#define isc__mem_strdup isc___mem_strdup
+#define isc__mem_reallocate isc___mem_reallocate
+#define isc_mem_references isc__mem_references
+#define isc_mem_setdestroycheck isc__mem_setdestroycheck
+#define isc_mem_setquota isc__mem_setquota
+#define isc_mem_getname isc__mem_getname
+#define isc_mem_getquota isc__mem_getquota
+#define isc_mem_gettag isc__mem_gettag
+#define isc_mem_inuse isc__mem_inuse
+#define isc_mem_isovermem isc__mem_isovermem
+#define isc_mem_setname isc__mem_setname
+#define isc_mem_setwater isc__mem_setwater
+#define isc_mem_printallactive isc__mem_printallactive
+#define isc_mem_waterack isc__mem_waterack
+#define isc_mempool_create isc__mempool_create
+#define isc_mempool_setname isc__mempool_setname
+#define isc_mempool_destroy isc__mempool_destroy
+#define isc_mempool_associatelock isc__mempool_associatelock
+#define isc__mempool_get isc___mempool_get
+#define isc__mempool_put isc___mempool_put
+#define isc_mempool_setfreemax isc__mempool_setfreemax
+#define isc_mempool_getfreemax isc__mempool_getfreemax
+#define isc_mempool_getfreecount isc__mempool_getfreecount
+#define isc_mempool_setmaxalloc isc__mempool_setmaxalloc
+#define isc_mempool_getmaxalloc isc__mempool_getmaxalloc
+#define isc_mempool_getallocated isc__mempool_getallocated
+#define isc_mempool_setfillcount isc__mempool_setfillcount
+#define isc_mempool_getfillcount isc__mempool_getfillcount
+
+#define isc_socket_create isc__socket_create
+#define isc_socket_dup isc__socket_dup
+#define isc_socket_attach isc__socket_attach
+#define isc_socket_detach isc__socket_detach
+#define isc_socketmgr_create isc__socketmgr_create
+#define isc_socketmgr_create2 isc__socketmgr_create2
+#define isc_socketmgr_destroy isc__socketmgr_destroy
+#define isc_socket_open isc__socket_open
+#define isc_socket_close isc__socket_close
+#define isc_socket_recvv isc__socket_recvv
+#define isc_socket_recv isc__socket_recv
+#define isc_socket_recv2 isc__socket_recv2
+#define isc_socket_send isc__socket_send
+#define isc_socket_sendto isc__socket_sendto
+#define isc_socket_sendv isc__socket_sendv
+#define isc_socket_sendtov isc__socket_sendtov
+#define isc_socket_sendto2 isc__socket_sendto2
+#define isc_socket_cleanunix isc__socket_cleanunix
+#define isc_socket_permunix isc__socket_permunix
+#define isc_socket_bind isc__socket_bind
+#define isc_socket_filter isc__socket_filter
+#define isc_socket_listen isc__socket_listen
+#define isc_socket_accept isc__socket_accept
+#define isc_socket_connect isc__socket_connect
+#define isc_socket_getfd isc__socket_getfd
+#define isc_socket_getname isc__socket_getname
+#define isc_socket_gettag isc__socket_gettag
+#define isc_socket_getpeername isc__socket_getpeername
+#define isc_socket_getsockname isc__socket_getsockname
+#define isc_socket_cancel isc__socket_cancel
+#define isc_socket_gettype isc__socket_gettype
+#define isc_socket_isbound isc__socket_isbound
+#define isc_socket_ipv6only isc__socket_ipv6only
+#define isc_socket_setname isc__socket_setname
+#define isc_socketmgr_getmaxsockets isc__socketmgr_getmaxsockets
+#define isc_socketmgr_setstats isc__socketmgr_setstats
+#define isc_socketmgr_setreserved isc__socketmgr_setreserved
+#define isc__socketmgr_maxudp isc___socketmgr_maxudp
+#define isc_socket_fdwatchcreate isc__socket_fdwatchcreate
+#define isc_socket_fdwatchpoke isc__socket_fdwatchpoke
+
+#define isc_task_create isc__task_create
+#define isc_task_attach isc__task_attach
+#define isc_task_detach isc__task_detach
+/* #define isc_task_exiting isc__task_exiting XXXMPA */
+#define isc_task_send isc__task_send
+#define isc_task_sendanddetach isc__task_sendanddetach
+#define isc_task_purgerange isc__task_purgerange
+#define isc_task_purge isc__task_purge
+#define isc_task_purgeevent isc__task_purgeevent
+#define isc_task_unsendrange isc__task_unsendrange
+#define isc_task_unsend isc__task_unsend
+#define isc_task_onshutdown isc__task_onshutdown
+#define isc_task_shutdown isc__task_shutdown
+#define isc_task_destroy isc__task_destroy
+#define isc_task_setname isc__task_setname
+#define isc_task_getname isc__task_getname
+#define isc_task_gettag isc__task_gettag
+#define isc_task_getcurrenttime isc__task_getcurrenttime
+#define isc_taskmgr_create isc__taskmgr_create
+#define isc_taskmgr_setmode isc__taskmgr_setmode
+#define isc_taskmgr_mode isc__taskmgr_mode
+#define isc_taskmgr_destroy isc__taskmgr_destroy
+#define isc_task_beginexclusive isc__task_beginexclusive
+#define isc_task_endexclusive isc__task_endexclusive
+#define isc_task_setprivilege isc__task_setprivilege
+#define isc_task_privilege isc__task_privilege
+
+#define isc_timer_create isc__timer_create
+#define isc_timer_reset isc__timer_reset
+#define isc_timer_gettype isc__timer_gettype
+#define isc_timer_touch isc__timer_touch
+#define isc_timer_attach isc__timer_attach
+#define isc_timer_detach isc__timer_detach
+#define isc_timermgr_create isc__timermgr_create
+#define isc_timermgr_poke isc__timermgr_poke
+#define isc_timermgr_destroy isc__timermgr_destroy
+
+#endif /* BIND9 */
+
+#endif /* ISCAPI_NAMESPACE_H */
diff --git a/lib/isc/include/isc/netaddr.h b/lib/isc/include/isc/netaddr.h
index 8bfdbce20c12..954d77019b69 100644
--- a/lib/isc/include/isc/netaddr.h
+++ b/lib/isc/include/isc/netaddr.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.h,v 1.35.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: netaddr.h,v 1.37 2009/01/17 23:47:43 tbox Exp $ */
#ifndef ISC_NETADDR_H
#define ISC_NETADDR_H 1
diff --git a/lib/isc/include/isc/netscope.h b/lib/isc/include/isc/netscope.h
index ba4e792a40a4..163a08ca2ea7 100644
--- a/lib/isc/include/isc/netscope.h
+++ b/lib/isc/include/isc/netscope.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netscope.h,v 1.11 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: netscope.h,v 1.13 2009/06/25 23:48:02 tbox Exp $ */
#ifndef ISC_NETSCOPE_H
#define ISC_NETSCOPE_H 1
@@ -40,4 +40,4 @@ isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid);
ISC_LANG_ENDDECLS
-#endif /* ISC_NETADDR_H */
+#endif /* ISC_NETSCOPE_H */
diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in
index 1ed76b855618..03c2710bac35 100644
--- a/lib/isc/include/isc/platform.h.in
+++ b/lib/isc/include/isc/platform.h.in
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: platform.h.in,v 1.48.84.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: platform.h.in,v 1.56 2010/12/18 01:56:23 each Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
@@ -146,6 +146,11 @@
*/
@ISC_PLATFORM_HAVEDEVPOLL@
+/*! \brief
+ * Define if we want to log backtrace
+ */
+@ISC_PLATFORM_USEBACKTRACE@
+
/*
*** Printing.
***/
@@ -215,6 +220,18 @@
@ISC_PLATFORM_GSSAPIHEADER@
/*
+ * Defined to <gssapi_krb5.h> or <gssapi/gssapi_krb5.h> for how to
+ * include the GSSAPI KRB5 header.
+ */
+@ISC_PLATFORM_GSSAPI_KRB5_HEADER@
+
+/*
+ * Defined to <krb5.h> or <krb5/krb5.h> for how to include
+ * the KRB5 header.
+ */
+@ISC_PLATFORM_KRB5HEADER@
+
+/*
* Type used for resource limits.
*/
@ISC_PLATFORM_RLIMITTYPE@
@@ -284,6 +301,17 @@
*/
@ISC_PLATFORM_HAVESTRINGSH@
+/*
+ * Define if the hash functions must be provided by OpenSSL.
+ */
+@ISC_PLATFORM_OPENSSLHASH@
+
+/*
+ * Defines for the noreturn attribute.
+ */
+@ISC_PLATFORM_NORETURN_PRE@
+@ISC_PLATFORM_NORETURN_POST@
+
/***
*** Windows dll support.
***/
diff --git a/lib/isc/include/isc/portset.h b/lib/isc/include/isc/portset.h
index dc1f85616eab..774d6bb18cbd 100644
--- a/lib/isc/include/isc/portset.h
+++ b/lib/isc/include/isc/portset.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: portset.h,v 1.3.90.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: portset.h,v 1.6 2009/06/25 05:28:34 marka Exp $ */
/*! \file isc/portset.h
* \brief Transport Protocol Port Manipulation Module
@@ -138,4 +138,4 @@ isc_portset_removerange(isc_portset_t *portset, in_port_t port_lo,
ISC_LANG_ENDDECLS
-#endif /* ISC_NETADDR_H */
+#endif /* ISC_PORTSET_H */
diff --git a/lib/isc/include/isc/queue.h b/lib/isc/include/isc/queue.h
new file mode 100644
index 000000000000..5bf84c527c13
--- /dev/null
+++ b/lib/isc/include/isc/queue.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*
+ * This is a generic implementation of a two-lock concurrent queue.
+ * There are built-in mutex locks for the head and tail of the queue,
+ * allowing elements to be safely added and removed at the same time.
+ */
+
+#ifndef ISC_QUEUE_H
+#define ISC_QUEUE_H 1
+#include <isc/assertions.h>
+#include <isc/boolean.h>
+#include <isc/mutex.h>
+
+#ifdef ISC_QUEUE_CHECKINIT
+#define ISC_QLINK_INSIST(x) ISC_INSIST(x)
+#else
+#define ISC_QLINK_INSIST(x) (void)0
+#endif
+
+#define ISC_QLINK(type) struct { void *next; isc_boolean_t linked; }
+#define ISC_QLINK_INIT(elt, link) \
+ do { \
+ (elt)->link.next = (void *)(-1); \
+ (elt)->link.linked = ISC_FALSE; \
+ } while (0)
+#define ISC_QLINK_LINKED(elt, link) ((elt)->link.linked)
+
+#define ISC_QUEUE(type) struct { \
+ type headnode; \
+ type *head, *tail; \
+ isc_mutex_t headlock, taillock; \
+}
+
+#define ISC_QUEUE_INIT(queue, link) \
+ do { \
+ isc_mutex_init(&(queue).headlock); \
+ isc_mutex_init(&(queue).taillock); \
+ (queue).head = (void *) &((queue).headnode); \
+ (queue).tail = (void *) &((queue).headnode); \
+ ISC_QLINK_INIT((queue).head, link); \
+ } while (0)
+
+#define ISC_QUEUE_EMPTY(queue) ISC_TF((queue).head == (queue).tail)
+
+#define ISC_QUEUE_DESTROY(queue) \
+ do { \
+ ISC_QLINK_INSIST(ISC_QUEUE_EMPTY(queue)); \
+ isc_mutex_destroy(&(queue).headlock); \
+ isc_mutex_destroy(&(queue).taillock); \
+ } while (0)
+
+#define ISC_QUEUE_PUSH(queue, elt, link) \
+ do { \
+ ISC_QLINK_INSIST(!ISC_QLINK_LINKED(elt, link)); \
+ (elt)->link.next = (void *)(-1); \
+ LOCK(&(queue).taillock); \
+ (queue).tail->link.next = elt; \
+ (queue).tail = elt; \
+ UNLOCK(&(queue).taillock); \
+ (elt)->link.linked = ISC_TRUE; \
+ } while (0)
+
+#define ISC_QUEUE_POP(queue, link, ret) \
+ do { \
+ LOCK(&(queue).headlock); \
+ ret = (queue).head->link.next; \
+ if (ret == (void *)(-1)) { \
+ UNLOCK(&(queue).headlock); \
+ ret = NULL; \
+ } else { \
+ (queue).head->link.next = ret->link.next; \
+ if (ret->link.next == (void *)(-1)) { \
+ LOCK(&(queue).taillock); \
+ (queue).tail = (queue).head; \
+ UNLOCK(&(queue).taillock); \
+ } \
+ UNLOCK(&(queue).headlock); \
+ ret->link.next = (void *)(-1); \
+ ret->link.linked = ISC_FALSE; \
+ } \
+ } while (0)
+
+#endif /* ISC_QUEUE_H */
diff --git a/lib/isc/include/isc/radix.h b/lib/isc/include/isc/radix.h
index fbb1893d489f..6b413a23b909 100644
--- a/lib/isc/include/isc/radix.h
+++ b/lib/isc/include/isc/radix.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: radix.h,v 1.11.44.2 2008/12/24 23:47:02 tbox Exp $ */
+/* $Id: radix.h,v 1.13 2008/12/01 23:47:45 tbox Exp $ */
/*
* This source was adapted from MRT's RCS Ids:
diff --git a/lib/isc/include/isc/random.h b/lib/isc/include/isc/random.h
index 9b6ca64e022c..1f9572d30ebf 100644
--- a/lib/isc/include/isc/random.h
+++ b/lib/isc/include/isc/random.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: random.h,v 1.18.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: random.h,v 1.20 2009/01/17 23:47:43 tbox Exp $ */
#ifndef ISC_RANDOM_H
#define ISC_RANDOM_H 1
diff --git a/lib/isc/include/isc/ratelimiter.h b/lib/isc/include/isc/ratelimiter.h
index d18cf25b746d..00a7209758bb 100644
--- a/lib/isc/include/isc/ratelimiter.h
+++ b/lib/isc/include/isc/ratelimiter.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ratelimiter.h,v 1.21.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: ratelimiter.h,v 1.23 2009/01/18 23:48:14 tbox Exp $ */
#ifndef ISC_RATELIMITER_H
#define ISC_RATELIMITER_H 1
diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h
index 6ab14ae732c3..b72b1585be39 100644
--- a/lib/isc/include/isc/refcount.h
+++ b/lib/isc/include/isc/refcount.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: refcount.h,v 1.15 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: refcount.h,v 1.17 2009/09/29 23:48:04 tbox Exp $ */
#ifndef ISC_REFCOUNT_H
#define ISC_REFCOUNT_H 1
@@ -28,7 +28,7 @@
#include <isc/util.h>
/*! \file isc/refcount.h
- * \brief Implements a locked reference counter.
+ * \brief Implements a locked reference counter.
*
* These functions may actually be
* implemented using macros, and implementations of these macros are below.
@@ -42,7 +42,7 @@ ISC_LANG_BEGINDECLS
* Function prototypes
*/
-/*
+/*
* isc_result_t
* isc_refcount_init(isc_refcount_t *ref, unsigned int n);
*
@@ -103,7 +103,7 @@ typedef struct isc_refcount {
isc_int32_t refs;
} isc_refcount_t;
-#define isc_refcount_destroy(rp) (REQUIRE((rp)->refs == 0))
+#define isc_refcount_destroy(rp) REQUIRE((rp)->refs == 0)
#define isc_refcount_current(rp) ((unsigned int)((rp)->refs))
#define isc_refcount_increment0(rp, tp) \
@@ -192,7 +192,7 @@ typedef struct isc_refcount {
int refs;
} isc_refcount_t;
-#define isc_refcount_destroy(rp) (REQUIRE((rp)->refs == 0))
+#define isc_refcount_destroy(rp) REQUIRE((rp)->refs == 0)
#define isc_refcount_current(rp) ((unsigned int)((rp)->refs))
#define isc_refcount_increment0(rp, tp) \
diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h
index 56b4ca6d691a..dcd457b3d1b0 100644
--- a/lib/isc/include/isc/result.h
+++ b/lib/isc/include/isc/result.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.71 2008/09/25 04:02:39 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_RESULT_H
#define ISC_RESULT_H 1
@@ -42,6 +42,7 @@
#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_SUSPEND ISC_R_RELOAD /*%< alias of 'reload' */
#define ISC_R_LOCKBUSY 17 /*%< lock busy */
#define ISC_R_EXISTS 18 /*%< already exists */
#define ISC_R_NOSPACE 19 /*%< ran out of space */
@@ -86,9 +87,10 @@
#define ISC_R_MAXSIZE 58 /*%< max size */
#define ISC_R_BADADDRESSFORM 59 /*%< invalid address format */
#define ISC_R_BADBASE32 60 /*%< bad base32 encoding */
+#define ISC_R_UNSET 61 /*%< unset */
/*% Not a result code: the number of results. */
-#define ISC_R_NRESULTS 61
+#define ISC_R_NRESULTS 62
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/include/isc/resultclass.h b/lib/isc/include/isc/resultclass.h
index b32426fee283..d91e800e063c 100644
--- a/lib/isc/include/isc/resultclass.h
+++ b/lib/isc/include/isc/resultclass.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resultclass.h,v 1.18 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: resultclass.h,v 1.20 2009/09/02 23:48:03 tbox Exp $ */
#ifndef ISC_RESULTCLASS_H
#define ISC_RESULTCLASS_H 1
@@ -45,6 +45,7 @@
#define ISC_RESULTCLASS_DNSRCODE ISC_RESULTCLASS_FROMNUM(3)
#define ISC_RESULTCLASS_OMAPI ISC_RESULTCLASS_FROMNUM(4)
#define ISC_RESULTCLASS_ISCCC ISC_RESULTCLASS_FROMNUM(5)
+#define ISC_RESULTCLASS_DHCP ISC_RESULTCLASS_FROMNUM(6)
#endif /* ISC_RESULTCLASS_H */
diff --git a/lib/isc/include/isc/serial.h b/lib/isc/include/isc/serial.h
index f7e3049e026e..a5e03970c3e6 100644
--- a/lib/isc/include/isc/serial.h
+++ b/lib/isc/include/isc/serial.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: serial.h,v 1.16.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: serial.h,v 1.18 2009/01/18 23:48:14 tbox Exp $ */
#ifndef ISC_SERIAL_H
#define ISC_SERIAL_H 1
diff --git a/lib/isc/include/isc/sha1.h b/lib/isc/include/isc/sha1.h
index 63f12bb1e0c7..313ff96391b2 100644
--- a/lib/isc/include/isc/sha1.h
+++ b/lib/isc/include/isc/sha1.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -18,7 +18,7 @@
#ifndef ISC_SHA1_H
#define ISC_SHA1_H 1
-/* $Id: sha1.h,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: sha1.h,v 1.19 2009/02/06 23:47:42 tbox Exp $ */
/* $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */
@@ -29,16 +29,25 @@
*/
#include <isc/lang.h>
+#include <isc/platform.h>
#include <isc/types.h>
#define ISC_SHA1_DIGESTLENGTH 20U
#define ISC_SHA1_BLOCK_LENGTH 64U
+#ifdef ISC_PLATFORM_OPENSSLHASH
+#include <openssl/evp.h>
+
+typedef EVP_MD_CTX isc_sha1_t;
+
+#else
+
typedef struct {
isc_uint32_t state[5];
isc_uint32_t count[2];
unsigned char buffer[ISC_SHA1_BLOCK_LENGTH];
} isc_sha1_t;
+#endif
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/include/isc/sha2.h b/lib/isc/include/isc/sha2.h
index 211e25505a95..439bbb948e4e 100644
--- a/lib/isc/include/isc/sha2.h
+++ b/lib/isc/include/isc/sha2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,9 +14,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sha2.h,v 1.9 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: sha2.h,v 1.12 2009/10/22 02:21:31 each Exp $ */
-/* $FreeBSD$ */
+/* $FreeBSD: src/sys/crypto/sha2/sha2.h,v 1.1.2.1 2001/07/03 11:01:36 ume Exp $ */
/* $KAME: sha2.h,v 1.3 2001/03/12 08:27:48 itojun Exp $ */
/*
@@ -39,7 +39,7 @@
* 3. Neither the name of the copyright holder nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -58,6 +58,7 @@
#define ISC_SHA2_H
#include <isc/lang.h>
+#include <isc/platform.h>
#include <isc/types.h>
/*** SHA-224/256/384/512 Various Length Definitions ***********************/
@@ -75,10 +76,15 @@
#define ISC_SHA512_DIGESTLENGTH 64U
#define ISC_SHA512_DIGESTSTRINGLENGTH (ISC_SHA512_DIGESTLENGTH * 2 + 1)
+/*** SHA-256/384/512 Context Structures *******************************/
-ISC_LANG_BEGINDECLS
+#ifdef ISC_PLATFORM_OPENSSLHASH
+#include <openssl/evp.h>
-/*** SHA-256/384/512 Context Structures *******************************/
+typedef EVP_MD_CTX isc_sha256_t;
+typedef EVP_MD_CTX isc_sha512_t;
+
+#else
/*
* Keep buffer immediately after bitcount to preserve alignment.
@@ -97,31 +103,38 @@ typedef struct {
isc_uint64_t bitcount[2];
isc_uint8_t buffer[ISC_SHA512_BLOCK_LENGTH];
} isc_sha512_t;
+#endif
typedef isc_sha256_t isc_sha224_t;
typedef isc_sha512_t isc_sha384_t;
+ISC_LANG_BEGINDECLS
+
/*** SHA-224/256/384/512 Function Prototypes ******************************/
void isc_sha224_init (isc_sha224_t *);
+void isc_sha224_invalidate (isc_sha224_t *);
void isc_sha224_update (isc_sha224_t *, const isc_uint8_t *, size_t);
void isc_sha224_final (isc_uint8_t[ISC_SHA224_DIGESTLENGTH], isc_sha224_t *);
char *isc_sha224_end (isc_sha224_t *, char[ISC_SHA224_DIGESTSTRINGLENGTH]);
char *isc_sha224_data (const isc_uint8_t *, size_t, char[ISC_SHA224_DIGESTSTRINGLENGTH]);
void isc_sha256_init (isc_sha256_t *);
+void isc_sha256_invalidate (isc_sha256_t *);
void isc_sha256_update (isc_sha256_t *, const isc_uint8_t *, size_t);
void isc_sha256_final (isc_uint8_t[ISC_SHA256_DIGESTLENGTH], isc_sha256_t *);
char *isc_sha256_end (isc_sha256_t *, char[ISC_SHA256_DIGESTSTRINGLENGTH]);
char *isc_sha256_data (const isc_uint8_t *, size_t, char[ISC_SHA256_DIGESTSTRINGLENGTH]);
void isc_sha384_init (isc_sha384_t *);
+void isc_sha384_invalidate (isc_sha384_t *);
void isc_sha384_update (isc_sha384_t *, const isc_uint8_t *, size_t);
void isc_sha384_final (isc_uint8_t[ISC_SHA384_DIGESTLENGTH], isc_sha384_t *);
char *isc_sha384_end (isc_sha384_t *, char[ISC_SHA384_DIGESTSTRINGLENGTH]);
char *isc_sha384_data (const isc_uint8_t *, size_t, char[ISC_SHA384_DIGESTSTRINGLENGTH]);
void isc_sha512_init (isc_sha512_t *);
+void isc_sha512_invalidate (isc_sha512_t *);
void isc_sha512_update (isc_sha512_t *, const isc_uint8_t *, size_t);
void isc_sha512_final (isc_uint8_t[ISC_SHA512_DIGESTLENGTH], isc_sha512_t *);
char *isc_sha512_end (isc_sha512_t *, char[ISC_SHA512_DIGESTSTRINGLENGTH]);
diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h
index 62cc77397a09..1e6914222c1b 100644
--- a/lib/isc/include/isc/sockaddr.h
+++ b/lib/isc/include/isc/sockaddr.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.h,v 1.55.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: sockaddr.h,v 1.57 2009/01/18 23:48:14 tbox Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h
index 035c99485084..38f6f78025df 100644
--- a/lib/isc/include/isc/socket.h
+++ b/lib/isc/include/isc/socket.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.h,v 1.85.58.3 2009/01/29 22:40:35 jinmei Exp $ */
+/* $Id$ */
#ifndef ISC_SOCKET_H
#define ISC_SOCKET_H 1
@@ -260,6 +260,88 @@ typedef enum {
#define ISC_SOCKFDWATCH_WRITE 0x00000002 /*%< watch for writable */
/*@}*/
+/*% Socket and socket manager methods */
+typedef struct isc_socketmgrmethods {
+ void (*destroy)(isc_socketmgr_t **managerp);
+ isc_result_t (*socketcreate)(isc_socketmgr_t *manager, int pf,
+ isc_sockettype_t type,
+ isc_socket_t **socketp);
+ isc_result_t (*fdwatchcreate)(isc_socketmgr_t *manager, int fd,
+ int flags,
+ isc_sockfdwatch_t callback,
+ void *cbarg, isc_task_t *task,
+ isc_socket_t **socketp);
+} isc_socketmgrmethods_t;
+
+typedef struct isc_socketmethods {
+ void (*attach)(isc_socket_t *socket,
+ isc_socket_t **socketp);
+ void (*detach)(isc_socket_t **socketp);
+ isc_result_t (*bind)(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
+ unsigned int options);
+ isc_result_t (*sendto)(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action,
+ const void *arg, isc_sockaddr_t *address,
+ struct in6_pktinfo *pktinfo);
+ isc_result_t (*connect)(isc_socket_t *sock, isc_sockaddr_t *addr,
+ isc_task_t *task, isc_taskaction_t action,
+ const void *arg);
+ isc_result_t (*recv)(isc_socket_t *sock, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg);
+ void (*cancel)(isc_socket_t *sock, isc_task_t *task,
+ unsigned int how);
+ isc_result_t (*getsockname)(isc_socket_t *sock,
+ isc_sockaddr_t *addressp);
+ isc_sockettype_t (*gettype)(isc_socket_t *sock);
+ void (*ipv6only)(isc_socket_t *sock, isc_boolean_t yes);
+ isc_result_t (*fdwatchpoke)(isc_socket_t *sock, int flags);
+ isc_result_t (*dup)(isc_socket_t *socket,
+ isc_socket_t **socketp);
+ int (*getfd)(isc_socket_t *socket);
+} isc_socketmethods_t;
+
+/*%
+ * This structure is actually just the common prefix of a socket manager
+ * object implementation's version of an isc_socketmgr_t.
+ * \brief
+ * Direct use of this structure by clients is forbidden. socket implementations
+ * may change the structure. 'magic' must be ISCAPI_SOCKETMGR_MAGIC for any
+ * of the isc_socket_ routines to work. socket implementations must maintain
+ * all socket invariants.
+ * In effect, this definition is used only for non-BIND9 version ("export")
+ * of the library, and the export version does not work for win32. So, to avoid
+ * the definition conflict with win32/socket.c, we enable this definition only
+ * for non-Win32 (i.e. Unix) platforms.
+ */
+#ifndef WIN32
+struct isc_socketmgr {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_socketmgrmethods_t *methods;
+};
+#endif
+
+#define ISCAPI_SOCKETMGR_MAGIC ISC_MAGIC('A','s','m','g')
+#define ISCAPI_SOCKETMGR_VALID(m) ((m) != NULL && \
+ (m)->magic == ISCAPI_SOCKETMGR_MAGIC)
+
+/*%
+ * This is the common prefix of a socket object. The same note as
+ * that for the socketmgr structure applies.
+ */
+#ifndef WIN32
+struct isc_socket {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_socketmethods_t *methods;
+};
+#endif
+
+#define ISCAPI_SOCKET_MAGIC ISC_MAGIC('A','s','c','t')
+#define ISCAPI_SOCKET_VALID(s) ((s) != NULL && \
+ (s)->magic == ISCAPI_SOCKET_MAGIC)
+
/***
*** Socket and Socket Manager Functions
***
@@ -307,6 +389,35 @@ isc_socket_fdwatchcreate(isc_socketmgr_t *manager,
*/
isc_result_t
+isc_socket_fdwatchpoke(isc_socket_t *sock,
+ int flags);
+/*%<
+ * Poke a file descriptor watch socket informing the manager that it
+ * should restart watching the socket
+ *
+ * Note:
+ *
+ *\li 'sock' is the socket returned by isc_socket_fdwatchcreate
+ *
+ *\li 'flags' indicates what the manager should watch for on the socket
+ * in addition to what it may already be watching. It can be one or
+ * both of ISC_SOCKFDWATCH_READ and ISC_SOCKFDWATCH_WRITE. To
+ * temporarily disable watching on a socket the value indicating
+ * no more data should be returned from the call back routine.
+ *
+ *\li This function is not available on Windows.
+ *
+ * Requires:
+ *
+ *\li 'sock' is a valid isc socket
+ *
+ *
+ * Returns:
+ *
+ *\li #ISC_R_SUCCESS
+ */
+
+isc_result_t
isc_socket_create(isc_socketmgr_t *manager,
int pf,
isc_sockettype_t type,
@@ -341,6 +452,12 @@ isc_socket_create(isc_socketmgr_t *manager,
*\li #ISC_R_UNEXPECTED
*/
+isc_result_t
+isc_socket_dup(isc_socket_t *sock0, isc_socket_t **socketp);
+/*%<
+ * Duplicate an existing socket, reusing its file descriptor.
+ */
+
void
isc_socket_cancel(isc_socket_t *sock, isc_task_t *task,
unsigned int how);
@@ -821,6 +938,10 @@ isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
/*@}*/
isc_result_t
+isc_socketmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ isc_socketmgr_t **managerp);
+
+isc_result_t
isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp);
isc_result_t
@@ -831,6 +952,8 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
* maximum number of sockets that the created manager should handle.
* isc_socketmgr_create() is equivalent of isc_socketmgr_create2() with
* "maxsocks" being zero.
+ * isc_socketmgr_createinctx() also associates the new manager with the
+ * specified application context.
*
* Notes:
*
@@ -842,6 +965,8 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
*
*\li 'managerp' points to a NULL isc_socketmgr_t.
*
+ *\li 'actx' is a valid application context (for createinctx()).
+ *
* Ensures:
*
*\li '*managerp' is a valid isc_socketmgr_t.
@@ -986,12 +1111,23 @@ void *isc_socket_gettag(isc_socket_t *socket);
* Get the tag associated with a socket, if any.
*/
+int isc_socket_getfd(isc_socket_t *socket);
+/*%<
+ * Get the file descriptor associated with a socket
+ */
+
void
isc__socketmgr_setreserved(isc_socketmgr_t *mgr, isc_uint32_t);
/*%<
* Temporary. For use by named only.
*/
+void
+isc__socketmgr_maxudp(isc_socketmgr_t *mgr, int maxudp);
+/*%<
+ * Test interface. Drop UDP packet > 'maxudp'.
+ */
+
#ifdef HAVE_LIBXML2
void
@@ -1002,6 +1138,31 @@ isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer);
#endif /* HAVE_LIBXML2 */
+#ifdef USE_SOCKETIMPREGISTER
+/*%<
+ * See isc_socketmgr_create() above.
+ */
+typedef isc_result_t
+(*isc_socketmgrcreatefunc_t)(isc_mem_t *mctx, isc_socketmgr_t **managerp);
+
+isc_result_t
+isc_socket_register(isc_socketmgrcreatefunc_t createfunc);
+/*%<
+ * Register a new socket I/O implementation and add it to the list of
+ * supported implementations. This function must be called when a different
+ * event library is used than the one contained in the ISC library.
+ */
+
+isc_result_t
+isc__socket_register(void);
+/*%<
+ * A short cut function that specifies the socket I/O module in the ISC
+ * library for isc_socket_register(). An application that uses the ISC library
+ * usually do not have to care about this function: it would call
+ * isc_lib_register(), which internally calls this function.
+ */
+#endif /* USE_SOCKETIMPREGISTER */
+
ISC_LANG_ENDDECLS
#endif /* ISC_SOCKET_H */
diff --git a/lib/isc/include/isc/stats.h b/lib/isc/include/isc/stats.h
index a6156d861a3e..682eefdedf13 100644
--- a/lib/isc/include/isc/stats.h
+++ b/lib/isc/include/isc/stats.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stats.h,v 1.4.2.2 2009/01/29 23:47:44 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_STATS_H
#define ISC_STATS_H 1
diff --git a/lib/isc/include/isc/symtab.h b/lib/isc/include/isc/symtab.h
index 396d64539607..9d0e5e2f23f0 100644
--- a/lib/isc/include/isc/symtab.h
+++ b/lib/isc/include/isc/symtab.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.h,v 1.24.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -57,6 +57,14 @@
* undefined. It can be used to free memory associated with keys and/or
* values.
*
+ * A symbol table is implemented as a hash table of lists; the size of the
+ * hash table is set by the 'size' parameter to isc_symtbl_create(). When
+ * the number of entries in the symbol table reaches three quarters of this
+ * value, the hash table is reallocated with size doubled, in order to
+ * optimize lookup performance. This has a negative effect on insertion
+ * performance, which can be mitigated by sizing the table appropriately
+ * when creating it.
+ *
* \li MP:
* The callers of this module must ensure any required synchronization.
*
diff --git a/lib/isc/include/isc/task.h b/lib/isc/include/isc/task.h
index 8106571c761e..594d80f34510 100644
--- a/lib/isc/include/isc/task.h
+++ b/lib/isc/include/isc/task.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: task.h,v 1.61.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_TASK_H
#define ISC_TASK_H 1
@@ -88,6 +88,7 @@
#define ISC_TASKEVENT_FIRSTEVENT (ISC_EVENTCLASS_TASK + 0)
#define ISC_TASKEVENT_SHUTDOWN (ISC_EVENTCLASS_TASK + 1)
+#define ISC_TASKEVENT_TEST (ISC_EVENTCLASS_TASK + 1)
#define ISC_TASKEVENT_LASTEVENT (ISC_EVENTCLASS_TASK + 65535)
/*****
@@ -96,6 +97,82 @@
ISC_LANG_BEGINDECLS
+/***
+ *** Types
+ ***/
+
+typedef enum {
+ isc_taskmgrmode_normal = 0,
+ isc_taskmgrmode_privileged
+} isc_taskmgrmode_t;
+
+/*% Task and task manager methods */
+typedef struct isc_taskmgrmethods {
+ void (*destroy)(isc_taskmgr_t **managerp);
+ void (*setmode)(isc_taskmgr_t *manager,
+ isc_taskmgrmode_t mode);
+ isc_taskmgrmode_t (*mode)(isc_taskmgr_t *manager);
+ isc_result_t (*taskcreate)(isc_taskmgr_t *manager,
+ unsigned int quantum,
+ isc_task_t **taskp);
+} isc_taskmgrmethods_t;
+
+typedef struct isc_taskmethods {
+ void (*attach)(isc_task_t *source, isc_task_t **targetp);
+ void (*detach)(isc_task_t **taskp);
+ void (*destroy)(isc_task_t **taskp);
+ void (*send)(isc_task_t *task, isc_event_t **eventp);
+ void (*sendanddetach)(isc_task_t **taskp, isc_event_t **eventp);
+ unsigned int (*unsend)(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag, isc_eventlist_t *events);
+ isc_result_t (*onshutdown)(isc_task_t *task, isc_taskaction_t action,
+ const void *arg);
+ void (*shutdown)(isc_task_t *task);
+ void (*setname)(isc_task_t *task, const char *name, void *tag);
+ unsigned int (*purgeevents)(isc_task_t *task, void *sender,
+ isc_eventtype_t type, void *tag);
+ unsigned int (*purgerange)(isc_task_t *task, void *sender,
+ isc_eventtype_t first, isc_eventtype_t last,
+ void *tag);
+ isc_result_t (*beginexclusive)(isc_task_t *task);
+ void (*endexclusive)(isc_task_t *task);
+ void (*setprivilege)(isc_task_t *task, isc_boolean_t priv);
+ isc_boolean_t (*privilege)(isc_task_t *task);
+} isc_taskmethods_t;
+
+/*%
+ * This structure is actually just the common prefix of a task manager
+ * object implementation's version of an isc_taskmgr_t.
+ * \brief
+ * Direct use of this structure by clients is forbidden. task implementations
+ * may change the structure. 'magic' must be ISCAPI_TASKMGR_MAGIC for any
+ * of the isc_task_ routines to work. task implementations must maintain
+ * all task invariants.
+ */
+struct isc_taskmgr {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_taskmgrmethods_t *methods;
+};
+
+#define ISCAPI_TASKMGR_MAGIC ISC_MAGIC('A','t','m','g')
+#define ISCAPI_TASKMGR_VALID(m) ((m) != NULL && \
+ (m)->magic == ISCAPI_TASKMGR_MAGIC)
+
+/*%
+ * This is the common prefix of a task object. The same note as
+ * that for the taskmgr structure applies.
+ */
+struct isc_task {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_taskmethods_t *methods;
+};
+
+#define ISCAPI_TASK_MAGIC ISC_MAGIC('A','t','s','t')
+#define ISCAPI_TASK_VALID(s) ((s) != NULL && \
+ (s)->magic == ISCAPI_TASK_MAGIC)
+
isc_result_t
isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
isc_task_t **taskp);
@@ -535,15 +612,56 @@ isc_task_getcurrenttime(isc_task_t *task, isc_stdtime_t *t);
*\li '*t' has the "current time".
*/
+isc_boolean_t
+isc_task_exiting(isc_task_t *t);
+/*%<
+ * Returns ISC_TRUE if the task is in the process of shutting down,
+ * ISC_FALSE otherwise.
+ *
+ * Requires:
+ *\li 'task' is a valid task.
+ */
+
+void
+isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv);
+/*%<
+ * Set or unset the task's "privileged" flag depending on the value of
+ * 'priv'.
+ *
+ * Under normal circumstances this flag has no effect on the task behavior,
+ * but when the task manager has been set to privileged exeuction mode via
+ * isc_taskmgr_setmode(), only tasks with the flag set will be executed,
+ * and all other tasks will wait until they're done. Once all privileged
+ * tasks have finished executing, the task manager will automatically
+ * return to normal execution mode and nonprivileged task can resume.
+ *
+ * Requires:
+ *\li 'task' is a valid task.
+ */
+
+isc_boolean_t
+isc_task_privilege(isc_task_t *task);
+/*%<
+ * Returns the current value of the task's privilege flag.
+ *
+ * Requires:
+ *\li 'task' is a valid task.
+ */
+
/*****
***** Task Manager.
*****/
isc_result_t
+isc_taskmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ unsigned int workers, unsigned int default_quantum,
+ isc_taskmgr_t **managerp);
+isc_result_t
isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
unsigned int default_quantum, isc_taskmgr_t **managerp);
/*%<
- * Create a new task manager.
+ * Create a new task manager. isc_taskmgr_createinctx() also associates
+ * the new manager with the specified application context.
*
* Notes:
*
@@ -565,6 +683,8 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
*
*\li managerp != NULL && *managerp == NULL
*
+ *\li 'actx' is a valid application context (for createinctx()).
+ *
* Ensures:
*
*\li On success, '*managerp' will be attached to the newly created task
@@ -574,8 +694,35 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
*
*\li #ISC_R_SUCCESS
*\li #ISC_R_NOMEMORY
- *\li #ISC_R_NOTHREADS No threads could be created.
+ *\li #ISC_R_NOTHREADS No threads could be created.
*\li #ISC_R_UNEXPECTED An unexpected error occurred.
+ *\li #ISC_R_SHUTTINGDOWN The non-threaded, shared, task
+ * manager shutting down.
+ */
+
+void
+isc_taskmgr_setmode(isc_taskmgr_t *manager, isc_taskmgrmode_t mode);
+
+isc_taskmgrmode_t
+isc_taskmgr_mode(isc_taskmgr_t *manager);
+/*%<
+ * Set/get the current operating mode of the task manager. Valid modes are:
+ *
+ *\li isc_taskmgrmode_normal
+ *\li isc_taskmgrmode_privileged
+ *
+ * In privileged execution mode, only tasks that have had the "privilege"
+ * flag set via isc_task_setprivilege() can be executed. When all such
+ * tasks are complete, the manager automatically returns to normal mode
+ * and proceeds with running non-privileged ready tasks. This means it is
+ * necessary to have at least one privileged task waiting on the ready
+ * queue *before* setting the manager into privileged execution mode,
+ * which in turn means the task which calls this function should be in
+ * task-exclusive mode when it does so.
+ *
+ * Requires:
+ *
+ *\li 'manager' is a valid task manager.
*/
void
@@ -619,6 +766,31 @@ isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer);
#endif
+/*%<
+ * See isc_taskmgr_create() above.
+ */
+typedef isc_result_t
+(*isc_taskmgrcreatefunc_t)(isc_mem_t *mctx, unsigned int workers,
+ unsigned int default_quantum,
+ isc_taskmgr_t **managerp);
+
+isc_result_t
+isc_task_register(isc_taskmgrcreatefunc_t createfunc);
+/*%<
+ * Register a new task management implementation and add it to the list of
+ * supported implementations. This function must be called when a different
+ * event library is used than the one contained in the ISC library.
+ */
+
+isc_result_t
+isc__task_register(void);
+/*%<
+ * A short cut function that specifies the task management module in the ISC
+ * library for isc_task_register(). An application that uses the ISC library
+ * usually do not have to care about this function: it would call
+ * isc_lib_register(), which internally calls this function.
+ */
+
ISC_LANG_ENDDECLS
#endif /* ISC_TASK_H */
diff --git a/lib/isc/include/isc/taskpool.h b/lib/isc/include/isc/taskpool.h
index fd07bfd5b126..46f395ea246f 100644
--- a/lib/isc/include/isc/taskpool.h
+++ b/lib/isc/include/isc/taskpool.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: taskpool.h,v 1.15 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_TASKPOOL_H
#define ISC_TASKPOOL_H 1
@@ -83,11 +83,50 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
*\li #ISC_R_UNEXPECTED
*/
-void
-isc_taskpool_gettask(isc_taskpool_t *pool, unsigned int hash,
- isc_task_t **targetp);
+void
+isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp);
+/*%<
+ * Attach to a task from the pool. Currently the next task is chosen
+ * from the pool at random. (This may be changed in the future to
+ * something that guaratees balance.)
+ */
+
+int
+isc_taskpool_size(isc_taskpool_t *pool);
/*%<
- * Attach to the task corresponding to the hash value "hash".
+ * Returns the number of tasks in the task pool 'pool'.
+ */
+
+isc_result_t
+isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size,
+ isc_taskpool_t **targetp);
+
+/*%<
+ * If 'size' is larger than the number of tasks in the pool pointed to by
+ * 'sourcep', then a new taskpool of size 'size' is allocated, the existing
+ * tasks from are moved into it, additional tasks are created to bring the
+ * total number up to 'size', and the resulting pool is attached to
+ * 'targetp'.
+ *
+ * If 'size' is less than or equal to the tasks in pool 'source', then
+ * 'sourcep' is attached to 'targetp' without any other action being taken.
+ *
+ * In either case, 'sourcep' is detached.
+ *
+ * Requires:
+ *
+ * \li 'sourcep' is not NULL and '*source' is not NULL
+ * \li 'targetp' is not NULL and '*source' is NULL
+ *
+ * Ensures:
+ *
+ * \li On success, '*targetp' points to a valid task pool.
+ * \li On success, '*sourcep' points to NULL.
+ *
+ * Returns:
+ *
+ * \li #ISC_R_SUCCESS
+ * \li #ISC_R_NOMEMORY
*/
void
@@ -100,6 +139,19 @@ isc_taskpool_destroy(isc_taskpool_t **poolp);
* \li '*poolp' is a valid task pool.
*/
+void
+isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv);
+/*%<
+ * Set the privilege flag on all tasks in 'pool' to 'priv'. If 'priv' is
+ * true, then when the task manager is set into privileged mode, only
+ * tasks wihin this pool will be able to execute. (Note: It is important
+ * to turn the pool tasks' privilege back off before the last task finishes
+ * executing.)
+ *
+ * Requires:
+ * \li 'pool' is a valid task pool.
+ */
+
ISC_LANG_ENDDECLS
#endif /* ISC_TASKPOOL_H */
diff --git a/lib/isc/include/isc/timer.h b/lib/isc/include/isc/timer.h
index a4b2df7a54b0..fa9abb16aa9d 100644
--- a/lib/isc/include/isc/timer.h
+++ b/lib/isc/include/isc/timer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.h,v 1.40 2008/06/23 23:47:11 tbox Exp $ */
+/* $Id: timer.h,v 1.43 2009/09/02 23:48:03 tbox Exp $ */
#ifndef ISC_TIMER_H
#define ISC_TIMER_H 1
@@ -103,6 +103,61 @@ typedef struct isc_timerevent {
#define ISC_TIMEREVENT_LIFE (ISC_EVENTCLASS_TIMER + 3)
#define ISC_TIMEREVENT_LASTEVENT (ISC_EVENTCLASS_TIMER + 65535)
+/*% Timer and timer manager methods */
+typedef struct {
+ void (*destroy)(isc_timermgr_t **managerp);
+ isc_result_t (*timercreate)(isc_timermgr_t *manager,
+ isc_timertype_t type,
+ isc_time_t *expires,
+ isc_interval_t *interval,
+ isc_task_t *task,
+ isc_taskaction_t action,
+ const void *arg,
+ isc_timer_t **timerp);
+} isc_timermgrmethods_t;
+
+typedef struct {
+ void (*attach)(isc_timer_t *timer, isc_timer_t **timerp);
+ void (*detach)(isc_timer_t **timerp);
+ isc_result_t (*reset)(isc_timer_t *timer, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_boolean_t purge);
+ isc_result_t (*touch)(isc_timer_t *timer);
+} isc_timermethods_t;
+
+/*%
+ * This structure is actually just the common prefix of a timer manager
+ * object implementation's version of an isc_timermgr_t.
+ * \brief
+ * Direct use of this structure by clients is forbidden. timer implementations
+ * may change the structure. 'magic' must be ISCAPI_TIMERMGR_MAGIC for any
+ * of the isc_timer_ routines to work. timer implementations must maintain
+ * all timer invariants.
+ */
+struct isc_timermgr {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_timermgrmethods_t *methods;
+};
+
+#define ISCAPI_TIMERMGR_MAGIC ISC_MAGIC('A','t','m','g')
+#define ISCAPI_TIMERMGR_VALID(m) ((m) != NULL && \
+ (m)->magic == ISCAPI_TIMERMGR_MAGIC)
+
+/*%
+ * This is the common prefix of a timer object. The same note as
+ * that for the timermgr structure applies.
+ */
+struct isc_timer {
+ unsigned int impmagic;
+ unsigned int magic;
+ isc_timermethods_t *methods;
+};
+
+#define ISCAPI_TIMER_MAGIC ISC_MAGIC('A','t','m','r')
+#define ISCAPI_TIMER_VALID(s) ((s) != NULL && \
+ (s)->magic == ISCAPI_TIMER_MAGIC)
+
/***
*** Timer and Timer Manager Functions
***
@@ -289,9 +344,14 @@ isc_timer_gettype(isc_timer_t *timer);
*/
isc_result_t
+isc_timermgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ isc_timermgr_t **managerp);
+
+isc_result_t
isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp);
/*%<
- * Create a timer manager.
+ * Create a timer manager. isc_timermgr_createinctx() also associates
+ * the new manager with the specified application context.
*
* Notes:
*
@@ -303,6 +363,8 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp);
*
*\li 'managerp' points to a NULL isc_timermgr_t.
*
+ *\li 'actx' is a valid application context (for createinctx()).
+ *
* Ensures:
*
*\li '*managerp' is a valid isc_timermgr_t.
@@ -339,6 +401,31 @@ isc_timermgr_destroy(isc_timermgr_t **managerp);
void isc_timermgr_poke(isc_timermgr_t *m);
+#ifdef USE_TIMERIMPREGISTER
+/*%<
+ * See isc_timermgr_create() above.
+ */
+typedef isc_result_t
+(*isc_timermgrcreatefunc_t)(isc_mem_t *mctx, isc_timermgr_t **managerp);
+
+isc_result_t
+isc__timer_register(void);
+/*%<
+ * Register a new timer management implementation and add it to the list of
+ * supported implementations. This function must be called when a different
+ * event library is used than the one contained in the ISC library.
+ */
+
+isc_result_t
+isc_timer_register(isc_timermgrcreatefunc_t createfunc);
+/*%<
+ * A short cut function that specifies the timer management module in the ISC
+ * library for isc_timer_register(). An application that uses the ISC library
+ * usually do not have to care about this function: it would call
+ * isc_lib_register(), which internally calls this function.
+ */
+#endif /* USE_TIMERIMPREGISTER */
+
ISC_LANG_ENDDECLS
#endif /* ISC_TIMER_H */
diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h
index 4dccbf981569..8dbf67ed109e 100644
--- a/lib/isc/include/isc/types.h
+++ b/lib/isc/include/isc/types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,11 +15,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.46.84.2 2009/01/29 23:47:44 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_TYPES_H
#define ISC_TYPES_H 1
+#include <isc/bind9.h>
+#include <isc/namespace.h>
+
/*! \file isc/types.h
* \brief
* OS-specific types, from the OS-specific include directories.
@@ -40,6 +43,8 @@
/* Core Types. Alphabetized by defined type. */
+typedef struct isc_appctx isc_appctx_t; /*%< Application context */
+typedef struct isc_backtrace_symmap isc_backtrace_symmap_t; /*%< Symbol Table Entry */
typedef struct isc_bitstring isc_bitstring_t; /*%< Bitstring */
typedef struct isc_buffer isc_buffer_t; /*%< Buffer */
typedef ISC_LIST(isc_buffer_t) isc_bufferlist_t; /*%< Buffer List */
@@ -94,7 +99,7 @@ typedef struct isc_timer isc_timer_t; /*%< Timer */
typedef struct isc_timermgr isc_timermgr_t; /*%< Timer Manager */
typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
-typedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *);
+typedef int (*isc_sockfdwatch_t)(isc_task_t *, isc_socket_t *, void *, int);
/* The following cannot be listed alphabetically due to forward reference */
typedef isc_result_t (isc_httpdaction_t)(const char *url,
diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h
index 8a3b95d9da36..670b28bc4c01 100644
--- a/lib/isc/include/isc/util.h
+++ b/lib/isc/include/isc/util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: util.h,v 1.30 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_UTIL_H
#define ISC_UTIL_H 1
@@ -48,6 +48,11 @@
*/
#define UNUSED(x) (void)(x)
+/*%
+ * The opposite: silent warnings about stored values which are never read.
+ */
+#define POST(x) (void)(x)
+
#define ISC_MAX(a, b) ((a) > (b) ? (a) : (b))
#define ISC_MIN(a, b) ((a) < (b) ? (a) : (b))
@@ -70,7 +75,7 @@
* 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(); }
+#define EMPTY_TRANSLATION_UNIT extern void exit(int);
/*%
* We use macros instead of calling the routines directly because
diff --git a/lib/isc/inet_aton.c b/lib/isc/inet_aton.c
index ad9401f696f0..14b4887f4f16 100644
--- a/lib/isc/inet_aton.c
+++ b/lib/isc/inet_aton.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -71,7 +71,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id: inet_aton.c,v 1.21.332.2 2009/03/05 23:47:03 tbox Exp $";
+static char rcsid[] = "$Id: inet_aton.c,v 1.23 2008/12/01 23:47:45 tbox Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
diff --git a/lib/isc/inet_ntop.c b/lib/isc/inet_ntop.c
index 997bfd9bfa8c..26d5dcad1f0a 100644
--- a/lib/isc/inet_ntop.c
+++ b/lib/isc/inet_ntop.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -19,7 +19,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
- "$Id: inet_ntop.c,v 1.19 2007/06/19 23:47:17 tbox Exp $";
+ "$Id: inet_ntop.c,v 1.21 2009/07/17 23:47:41 tbox Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@@ -31,8 +31,6 @@ static char rcsid[] =
#include <isc/net.h>
#include <isc/print.h>
-#include "ntp_sprintf.h" /* NTP local change, helps SunOS 4 */
-
#define NS_INT16SZ 2
#define NS_IN6ADDRSZ 16
@@ -48,13 +46,14 @@ static const char *inet_ntop4(const unsigned char *src, char *dst,
static const char *inet_ntop6(const unsigned char *src, char *dst,
size_t size);
#endif
+const char *isc_net_ntop(int af, const void *src, char *dst, size_t size);
/*! 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
+ * \author
* Paul Vixie, 1996.
*/
const char *
@@ -91,15 +90,15 @@ 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")];
+ int len;
- /* NTP local change to use SNPRINTF() macro for SunOS4 compat */
- if (SNPRINTF((tmp, sizeof(tmp), fmt, src[0], src[1], src[2],
- src[3])) >= size)
+ len = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]);
+ if (len < 0 || (size_t)len >= size)
{
errno = ENOSPC;
return (NULL);
}
- strcpy(dst, tmp);
+ memcpy(dst, tmp, 1 + len);
return (dst);
}
@@ -173,15 +172,16 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
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 (i == 6 && best.base == 0 && (best.len == 6 ||
+ (best.len == 7 && words[7] != 0x0001) ||
+ (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])); /* NTP local change */
+ tp += snprintf(tp, sizeof(tmp) - (tp - tmp), "%x", words[i]);
}
/* Was it a trailing run of 0x00's? */
if (best.base != -1 && (best.base + best.len) ==
@@ -196,7 +196,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
errno = ENOSPC;
return (NULL);
}
- strcpy(dst, tmp);
+ memcpy(dst, tmp, (size_t)(tp - tmp));
return (dst);
}
#endif /* AF_INET6 */
diff --git a/lib/isc/inet_pton.c b/lib/isc/inet_pton.c
index cd5bb79b53ba..66b5de0bf4d2 100644
--- a/lib/isc/inet_pton.c
+++ b/lib/isc/inet_pton.c
@@ -43,6 +43,7 @@ static char rcsid[] =
static int inet_pton4(const char *src, unsigned char *dst);
static int inet_pton6(const char *src, unsigned char *dst);
+int isc_net_pton(int af, const char *src, void *dst);
/*%
* convert from presentation format (which usually means ASCII printable)
diff --git a/lib/isc/iterated_hash.c b/lib/isc/iterated_hash.c
index 16743143faea..86dedde2880c 100644
--- a/lib/isc/iterated_hash.c
+++ b/lib/isc/iterated_hash.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: iterated_hash.c,v 1.4.48.2 2009/02/18 23:47:12 tbox Exp $ */
+/* $Id: iterated_hash.c,v 1.6 2009/02/18 23:47:48 tbox Exp $ */
#include "config.h"
diff --git a/lib/isc/lib.c b/lib/isc/lib.c
index f3a2c2dc790e..a50542551df3 100644
--- a/lib/isc/lib.c
+++ b/lib/isc/lib.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.c,v 1.14 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: lib.c,v 1.16 2009/09/02 23:48:02 tbox Exp $ */
/*! \file */
@@ -24,9 +24,15 @@
#include <stdio.h>
#include <stdlib.h>
-#include <isc/once.h>
-#include <isc/msgs.h>
+#include <isc/app.h>
#include <isc/lib.h>
+#include <isc/mem.h>
+#include <isc/msgs.h>
+#include <isc/once.h>
+#include <isc/socket.h>
+#include <isc/task.h>
+#include <isc/timer.h>
+#include <isc/util.h>
/***
*** Globals
@@ -41,7 +47,6 @@ LIBISC_EXTERNAL_DATA isc_msgcat_t * isc_msgcat = NULL;
static isc_once_t msgcat_once = ISC_ONCE_INIT;
-
/***
*** Functions
***/
@@ -77,3 +82,22 @@ isc_lib_initmsgcat(void) {
abort();
}
}
+
+#ifndef BIND9
+static isc_once_t register_once = ISC_ONCE_INIT;
+
+static void
+do_register(void) {
+ RUNTIME_CHECK(isc__mem_register() == ISC_R_SUCCESS);
+ RUNTIME_CHECK(isc__app_register() == ISC_R_SUCCESS);
+ RUNTIME_CHECK(isc__task_register() == ISC_R_SUCCESS);
+ RUNTIME_CHECK(isc__socket_register() == ISC_R_SUCCESS);
+ RUNTIME_CHECK(isc__timer_register() == ISC_R_SUCCESS);
+}
+
+void
+isc_lib_register() {
+ RUNTIME_CHECK(isc_once_do(&register_once, do_register)
+ == ISC_R_SUCCESS);
+}
+#endif
diff --git a/lib/isc/log.c b/lib/isc/log.c
index e19c9ba98eaa..0c142ce7707a 100644
--- a/lib/isc/log.c
+++ b/lib/isc/log.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.c,v 1.94.332.5 2009/02/16 02:04:05 marka Exp $ */
+/* $Id$ */
/*! \file
* \author Principal Authors: DCL */
@@ -41,6 +41,7 @@
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
+#include "ntp_stdlib.h" /* NTP change for strlcpy, strlcat */
#define LCTX_MAGIC ISC_MAGIC('L', 'c', 't', 'x')
#define VALID_CONTEXT(lctx) ISC_MAGIC_VALID(lctx, LCTX_MAGIC)
@@ -1342,9 +1343,10 @@ isc_log_open(isc_logchannel_t *channel) {
(FILE_MAXSIZE(channel) > 0 &&
statbuf.st_size >= FILE_MAXSIZE(channel)))
roll = regular_file;
- } else if (errno == ENOENT)
+ } else if (errno == ENOENT) {
regular_file = ISC_TRUE;
- else
+ POST(regular_file);
+ } else
result = ISC_R_INVALIDFILE;
/*
@@ -1408,6 +1410,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
int syslog_level;
char time_string[64];
char level_string[24];
+ size_t octets;
const char *iformat;
struct stat statbuf;
isc_boolean_t matched = ISC_FALSE;
@@ -1618,16 +1621,17 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
* It wasn't in the duplicate interval,
* so add it to the message list.
*/
+ octets = strlen(lctx->buffer) + 1;
new = isc_mem_get(lctx->mctx,
sizeof(isc_logmessage_t) +
- strlen(lctx->buffer) + 1);
+ octets);
if (new != NULL) {
/*
* Put the text immediately after
* the struct. The strcpy is safe.
*/
new->text = (char *)(new + 1);
- strcpy(new->text, lctx->buffer);
+ strlcpy(new->text, lctx->buffer, octets);
TIME_NOW(&new->time);
diff --git a/lib/isc/md5.c b/lib/isc/md5.c
index 5004c3e4db46..7c6419b2a9c7 100644
--- a/lib/isc/md5.c
+++ b/lib/isc/md5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: md5.c,v 1.14 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: md5.c,v 1.16 2009/02/06 23:47:42 tbox Exp $ */
/*! \file
* This code implements the MD5 message-digest algorithm.
@@ -38,10 +38,35 @@
#include <isc/assertions.h>
#include <isc/md5.h>
+#include <isc/platform.h>
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
+#ifdef ISC_PLATFORM_OPENSSLHASH
+
+void
+isc_md5_init(isc_md5_t *ctx) {
+ EVP_DigestInit(ctx, EVP_md5());
+}
+
+void
+isc_md5_invalidate(isc_md5_t *ctx) {
+ EVP_MD_CTX_cleanup(ctx);
+}
+
+void
+isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
+ EVP_DigestUpdate(ctx, (const void *) buf, (size_t) len);
+}
+
+void
+isc_md5_final(isc_md5_t *ctx, unsigned char *digest) {
+ EVP_DigestFinal(ctx, digest, NULL);
+}
+
+#else
+
static void
byteSwap(isc_uint32_t *buf, unsigned words)
{
@@ -249,3 +274,4 @@ isc_md5_final(isc_md5_t *ctx, unsigned char *digest) {
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(isc_md5_t)); /* In case it's sensitive */
}
+#endif
diff --git a/lib/isc/mem.c b/lib/isc/mem.c
index 9c37d7478bdb..5b4b16c570f6 100644
--- a/lib/isc/mem.c
+++ b/lib/isc/mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1997-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.c,v 1.145.120.4 2009/02/16 03:17:05 marka Exp $ */
+/* $Id$ */
/*! \file */
@@ -60,6 +60,9 @@ LIBISC_EXTERNAL_DATA unsigned int isc_mem_debugging = ISC_MEM_DEBUGGING;
/*
* Types.
*/
+typedef struct isc__mem isc__mem_t;
+typedef struct isc__mempool isc__mempool_t;
+
#if ISC_MEM_TRACKLINES
typedef struct debuglink debuglink_t;
struct debuglink {
@@ -72,7 +75,7 @@ struct debuglink {
};
#define FLARG_PASS , file, line
-#define FLARG , const char *file, int line
+#define FLARG , const char *file, unsigned int line
#else
#define FLARG_PASS
#define FLARG
@@ -89,7 +92,7 @@ typedef struct {
*/
union {
size_t size;
- isc_mem_t *ctx;
+ isc__mem_t *ctx;
char bytes[ALIGNMENT_SIZE];
} u;
} size_info;
@@ -110,7 +113,7 @@ typedef ISC_LIST(debuglink_t) debuglist_t;
/* List of all active memory contexts. */
-static ISC_LIST(isc_mem_t) contexts;
+static ISC_LIST(isc__mem_t) contexts;
static isc_once_t once = ISC_ONCE_INIT;
static isc_mutex_t lock;
@@ -120,8 +123,8 @@ static isc_mutex_t lock;
*/
static isc_uint64_t totallost;
-struct isc_mem {
- unsigned int magic;
+struct isc__mem {
+ isc_mem_t common;
isc_ondestroy_t ondestroy;
unsigned int flags;
isc_mutex_t lock;
@@ -141,9 +144,10 @@ struct isc_mem {
size_t hi_water;
size_t lo_water;
isc_boolean_t hi_called;
+ isc_boolean_t is_overmem;
isc_mem_water_t water;
void * water_arg;
- ISC_LIST(isc_mempool_t) pools;
+ ISC_LIST(isc__mempool_t) pools;
unsigned int poolcnt;
/* ISC_MEMFLAG_INTERNAL */
@@ -162,19 +166,19 @@ struct isc_mem {
#endif
unsigned int memalloc_failures;
- ISC_LINK(isc_mem_t) link;
+ ISC_LINK(isc__mem_t) link;
};
#define MEMPOOL_MAGIC ISC_MAGIC('M', 'E', 'M', 'p')
#define VALID_MEMPOOL(c) ISC_MAGIC_VALID(c, MEMPOOL_MAGIC)
-struct isc_mempool {
+struct isc__mempool {
/* always unlocked */
- unsigned int magic; /*%< magic number */
+ isc_mempool_t common; /*%< common header of mempool's */
isc_mutex_t *lock; /*%< optional lock */
- isc_mem_t *mctx; /*%< our memory context */
+ isc__mem_t *mctx; /*%< our memory context */
/*%< locked via the memory context's lock */
- ISC_LINK(isc_mempool_t) link; /*%< next pool in this mem context */
+ ISC_LINK(isc__mempool_t) link; /*%< next pool in this mem context */
/*%< optionally locked from here down */
element *items; /*%< low water item list */
size_t size; /*%< size of each item on this pool */
@@ -209,17 +213,192 @@ struct isc_mempool {
#define DELETE_TRACE(a, b, c, d, e) delete_trace_entry(a, b, c, d, e)
static void
-print_active(isc_mem_t *ctx, FILE *out);
+print_active(isc__mem_t *ctx, FILE *out);
+
+/*%
+ * The following can be either static or public, depending on build environment.
+ */
+
+#ifdef BIND9
+#define ISC_MEMFUNC_SCOPE
+#else
+#define ISC_MEMFUNC_SCOPE static
+#endif
+
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_createx(size_t init_max_size, size_t target_size,
+ isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
+ isc_mem_t **ctxp);
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_createx2(size_t init_max_size, size_t target_size,
+ isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
+ isc_mem_t **ctxp, unsigned int flags);
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_create(size_t init_max_size, size_t target_size, isc_mem_t **ctxp);
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_create2(size_t init_max_size, size_t target_size,
+ isc_mem_t **ctxp, unsigned int flags);
+ISC_MEMFUNC_SCOPE void
+isc__mem_attach(isc_mem_t *source, isc_mem_t **targetp);
+ISC_MEMFUNC_SCOPE void
+isc__mem_detach(isc_mem_t **ctxp);
+ISC_MEMFUNC_SCOPE void
+isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG);
+ISC_MEMFUNC_SCOPE void
+isc__mem_destroy(isc_mem_t **ctxp);
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_ondestroy(isc_mem_t *ctx, isc_task_t *task, isc_event_t **event);
+ISC_MEMFUNC_SCOPE void *
+isc___mem_get(isc_mem_t *ctx, size_t size FLARG);
+ISC_MEMFUNC_SCOPE void
+isc___mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG);
+ISC_MEMFUNC_SCOPE void
+isc__mem_stats(isc_mem_t *ctx, FILE *out);
+ISC_MEMFUNC_SCOPE void *
+isc___mem_allocate(isc_mem_t *ctx, size_t size FLARG);
+ISC_MEMFUNC_SCOPE void *
+isc___mem_reallocate(isc_mem_t *ctx, void *ptr, size_t size FLARG);
+ISC_MEMFUNC_SCOPE void
+isc___mem_free(isc_mem_t *ctx, void *ptr FLARG);
+ISC_MEMFUNC_SCOPE char *
+isc___mem_strdup(isc_mem_t *mctx, const char *s FLARG);
+ISC_MEMFUNC_SCOPE void
+isc__mem_setdestroycheck(isc_mem_t *ctx, isc_boolean_t flag);
+ISC_MEMFUNC_SCOPE void
+isc__mem_setquota(isc_mem_t *ctx, size_t quota);
+ISC_MEMFUNC_SCOPE size_t
+isc__mem_getquota(isc_mem_t *ctx);
+ISC_MEMFUNC_SCOPE size_t
+isc__mem_inuse(isc_mem_t *ctx);
+ISC_MEMFUNC_SCOPE isc_boolean_t
+isc__mem_isovermem(isc_mem_t *ctx);
+ISC_MEMFUNC_SCOPE void
+isc__mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
+ size_t hiwater, size_t lowater);
+ISC_MEMFUNC_SCOPE void
+isc__mem_waterack(isc_mem_t *ctx0, int flag);
+ISC_MEMFUNC_SCOPE void
+isc__mem_setname(isc_mem_t *ctx, const char *name, void *tag);
+ISC_MEMFUNC_SCOPE const char *
+isc__mem_getname(isc_mem_t *ctx);
+ISC_MEMFUNC_SCOPE void *
+isc__mem_gettag(isc_mem_t *ctx);
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setname(isc_mempool_t *mpctx, const char *name);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_destroy(isc_mempool_t **mpctxp);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock);
+ISC_MEMFUNC_SCOPE void *
+isc___mempool_get(isc_mempool_t *mpctx FLARG);
+ISC_MEMFUNC_SCOPE void
+isc___mempool_put(isc_mempool_t *mpctx, void *mem FLARG);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfreemax(isc_mempool_t *mpctx);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfreecount(isc_mempool_t *mpctx);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getmaxalloc(isc_mempool_t *mpctx);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getallocated(isc_mempool_t *mpctx);
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfillcount(isc_mempool_t *mpctx);
+#ifdef BIND9
+ISC_MEMFUNC_SCOPE void
+isc__mem_printactive(isc_mem_t *ctx0, FILE *file);
+ISC_MEMFUNC_SCOPE void
+isc__mem_printallactive(FILE *file);
+ISC_MEMFUNC_SCOPE void
+isc__mem_checkdestroyed(FILE *file);
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mem_references(isc_mem_t *ctx0);
+#endif
+
+static struct isc__memmethods {
+ isc_memmethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *createx, *create, *create2, *ondestroy, *stats,
+ *setquota, *getquota, *setname, *getname, *gettag;
+#endif
+} memmethods = {
+ {
+ isc__mem_attach,
+ isc__mem_detach,
+ isc__mem_destroy,
+ isc___mem_get,
+ isc___mem_put,
+ isc___mem_putanddetach,
+ isc___mem_allocate,
+ isc___mem_reallocate,
+ isc___mem_strdup,
+ isc___mem_free,
+ isc__mem_setdestroycheck,
+ isc__mem_setwater,
+ isc__mem_waterack,
+ isc__mem_inuse,
+ isc__mem_isovermem,
+ isc__mempool_create
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__mem_createx, (void *)isc__mem_create,
+ (void *)isc__mem_create2, (void *)isc__mem_ondestroy,
+ (void *)isc__mem_stats, (void *)isc__mem_setquota,
+ (void *)isc__mem_getquota, (void *)isc__mem_setname,
+ (void *)isc__mem_getname, (void *)isc__mem_gettag
+#endif
+};
+
+static struct isc__mempoolmethods {
+ isc_mempoolmethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *getfreemax, *getfreecount, *getmaxalloc, *getfillcount;
+#endif
+} mempoolmethods = {
+ {
+ isc__mempool_destroy,
+ isc___mempool_get,
+ isc___mempool_put,
+ isc__mempool_getallocated,
+ isc__mempool_setmaxalloc,
+ isc__mempool_setfreemax,
+ isc__mempool_setname,
+ isc__mempool_associatelock,
+ isc__mempool_setfillcount
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__mempool_getfreemax, (void *)isc__mempool_getfreecount,
+ (void *)isc__mempool_getmaxalloc, (void *)isc__mempool_getfillcount
+#endif
+};
/*!
* mctx must be locked.
*/
static inline void
-add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
+add_trace_entry(isc__mem_t *mctx, const void *ptr, unsigned int size
FLARG)
{
debuglink_t *dl;
unsigned int i;
+ unsigned int mysize = size;
if ((isc_mem_debugging & ISC_MEM_DEBUGTRACE) != 0)
fprintf(stderr, isc_msgcat_get(isc_msgcat, ISC_MSGSET_MEM,
@@ -231,10 +410,10 @@ add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
if (mctx->debuglist == NULL)
return;
- if (size > mctx->max_size)
- size = mctx->max_size;
+ if (mysize > mctx->max_size)
+ mysize = mctx->max_size;
- dl = ISC_LIST_HEAD(mctx->debuglist[size]);
+ dl = ISC_LIST_HEAD(mctx->debuglist[mysize]);
while (dl != NULL) {
if (dl->count == DEBUGLIST_COUNT)
goto next;
@@ -269,12 +448,12 @@ add_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size
dl->line[0] = line;
dl->count = 1;
- ISC_LIST_PREPEND(mctx->debuglist[size], dl, link);
+ ISC_LIST_PREPEND(mctx->debuglist[mysize], dl, link);
mctx->debuglistcnt++;
}
static inline void
-delete_trace_entry(isc_mem_t *mctx, const void *ptr, unsigned int size,
+delete_trace_entry(isc__mem_t *mctx, const void *ptr, unsigned int size,
const char *file, unsigned int line)
{
debuglink_t *dl;
@@ -345,7 +524,7 @@ quantize(size_t size) {
}
static inline isc_boolean_t
-more_basic_blocks(isc_mem_t *ctx) {
+more_basic_blocks(isc__mem_t *ctx) {
void *new;
unsigned char *curr, *next;
unsigned char *first, *last;
@@ -415,7 +594,7 @@ more_basic_blocks(isc_mem_t *ctx) {
}
static inline isc_boolean_t
-more_frags(isc_mem_t *ctx, size_t new_size) {
+more_frags(isc__mem_t *ctx, size_t new_size) {
int i, frags;
size_t total_size;
void *new;
@@ -477,7 +656,7 @@ more_frags(isc_mem_t *ctx, size_t new_size) {
}
static inline void *
-mem_getunlocked(isc_mem_t *ctx, size_t size) {
+mem_getunlocked(isc__mem_t *ctx, size_t size) {
size_t new_size = quantize(size);
void *ret;
@@ -558,7 +737,7 @@ check_overrun(void *mem, size_t size, size_t new_size) {
#endif
static inline void
-mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) {
+mem_putunlocked(isc__mem_t *ctx, void *mem, size_t size) {
size_t new_size = quantize(size);
if (size == ctx->max_size || new_size >= ctx->max_size) {
@@ -606,7 +785,7 @@ mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) {
* Perform a malloc, doing memory filling and overrun detection as necessary.
*/
static inline void *
-mem_get(isc_mem_t *ctx, size_t size) {
+mem_get(isc__mem_t *ctx, size_t size) {
char *ret;
#if ISC_MEM_CHECKOVERRUN
@@ -634,7 +813,7 @@ mem_get(isc_mem_t *ctx, size_t size) {
* Perform a free, doing memory filling and overrun detection as necessary.
*/
static inline void
-mem_put(isc_mem_t *ctx, void *mem, size_t size) {
+mem_put(isc__mem_t *ctx, void *mem, size_t size) {
#if ISC_MEM_CHECKOVERRUN
INSIST(((unsigned char *)mem)[size] == 0xbe);
#endif
@@ -650,7 +829,7 @@ mem_put(isc_mem_t *ctx, void *mem, size_t size) {
* Update internal counters after a memory get.
*/
static inline void
-mem_getstats(isc_mem_t *ctx, size_t size) {
+mem_getstats(isc__mem_t *ctx, size_t size) {
ctx->total += size;
ctx->inuse += size;
@@ -667,7 +846,7 @@ mem_getstats(isc_mem_t *ctx, size_t size) {
* Update internal counters after a memory put.
*/
static inline void
-mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) {
+mem_putstats(isc__mem_t *ctx, void *ptr, size_t size) {
UNUSED(ptr);
INSIST(ctx->inuse >= size);
@@ -711,22 +890,22 @@ initialize_action(void) {
* Public.
*/
-isc_result_t
-isc_mem_createx(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp)
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_createx(size_t init_max_size, size_t target_size,
+ isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
+ isc_mem_t **ctxp)
{
- return (isc_mem_createx2(init_max_size, target_size, memalloc, memfree,
- arg, ctxp, ISC_MEMFLAG_DEFAULT));
+ return (isc__mem_createx2(init_max_size, target_size, memalloc, memfree,
+ arg, ctxp, ISC_MEMFLAG_DEFAULT));
}
-isc_result_t
-isc_mem_createx2(size_t init_max_size, size_t target_size,
- isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
- isc_mem_t **ctxp, unsigned int flags)
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_createx2(size_t init_max_size, size_t target_size,
+ isc_memalloc_t memalloc, isc_memfree_t memfree, void *arg,
+ isc_mem_t **ctxp, unsigned int flags)
{
- isc_mem_t *ctx;
+ isc__mem_t *ctx;
isc_result_t result;
REQUIRE(ctxp != NULL && *ctxp == NULL);
@@ -764,9 +943,12 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
ctx->hi_water = 0;
ctx->lo_water = 0;
ctx->hi_called = ISC_FALSE;
+ ctx->is_overmem = ISC_FALSE;
ctx->water = NULL;
ctx->water_arg = NULL;
- ctx->magic = MEM_MAGIC;
+ ctx->common.impmagic = MEM_MAGIC;
+ ctx->common.magic = ISCAPI_MCTX_MAGIC;
+ ctx->common.methods = (isc_memmethods_t *)&memmethods;
isc_ondestroy_init(&ctx->ondestroy);
ctx->memalloc = memalloc;
ctx->memfree = memfree;
@@ -831,7 +1013,7 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
ISC_LIST_INITANDAPPEND(contexts, ctx, link);
UNLOCK(&lock);
- *ctxp = ctx;
+ *ctxp = (isc_mem_t *)ctx;
return (ISC_R_SUCCESS);
error:
@@ -852,36 +1034,35 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
return (result);
}
-isc_result_t
-isc_mem_create(size_t init_max_size, size_t target_size,
- isc_mem_t **ctxp)
-{
- return (isc_mem_createx2(init_max_size, target_size,
- default_memalloc, default_memfree, NULL,
- ctxp, ISC_MEMFLAG_DEFAULT));
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_create(size_t init_max_size, size_t target_size, isc_mem_t **ctxp) {
+ return (isc__mem_createx2(init_max_size, target_size,
+ default_memalloc, default_memfree, NULL,
+ ctxp, ISC_MEMFLAG_DEFAULT));
}
-isc_result_t
-isc_mem_create2(size_t init_max_size, size_t target_size,
- isc_mem_t **ctxp, unsigned int flags)
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_create2(size_t init_max_size, size_t target_size,
+ isc_mem_t **ctxp, unsigned int flags)
{
- return (isc_mem_createx2(init_max_size, target_size,
- default_memalloc, default_memfree, NULL,
- ctxp, flags));
+ return (isc__mem_createx2(init_max_size, target_size,
+ default_memalloc, default_memfree, NULL,
+ ctxp, flags));
}
static void
-destroy(isc_mem_t *ctx) {
+destroy(isc__mem_t *ctx) {
unsigned int i;
isc_ondestroy_t ondest;
- ctx->magic = 0;
-
LOCK(&lock);
ISC_LIST_UNLINK(contexts, ctx, link);
totallost += ctx->inuse;
UNLOCK(&lock);
+ ctx->common.impmagic = 0;
+ ctx->common.magic = 0;
+
INSIST(ISC_LIST_EMPTY(ctx->pools));
#if ISC_MEM_TRACKLINES
@@ -938,8 +1119,10 @@ destroy(isc_mem_t *ctx) {
isc_ondestroy_notify(&ondest, ctx);
}
-void
-isc_mem_attach(isc_mem_t *source, isc_mem_t **targetp) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_attach(isc_mem_t *source0, isc_mem_t **targetp) {
+ isc__mem_t *source = (isc__mem_t *)source0;
+
REQUIRE(VALID_CONTEXT(source));
REQUIRE(targetp != NULL && *targetp == NULL);
@@ -947,16 +1130,16 @@ isc_mem_attach(isc_mem_t *source, isc_mem_t **targetp) {
source->references++;
MCTXUNLOCK(source, &source->lock);
- *targetp = source;
+ *targetp = (isc_mem_t *)source;
}
-void
-isc_mem_detach(isc_mem_t **ctxp) {
- isc_mem_t *ctx;
+ISC_MEMFUNC_SCOPE void
+isc__mem_detach(isc_mem_t **ctxp) {
+ isc__mem_t *ctx;
isc_boolean_t want_destroy = ISC_FALSE;
REQUIRE(ctxp != NULL);
- ctx = *ctxp;
+ ctx = (isc__mem_t *)*ctxp;
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -982,15 +1165,15 @@ isc_mem_detach(isc_mem_t **ctxp) {
* isc_mem_detach(&mctx);
*/
-void
-isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
- isc_mem_t *ctx;
+ISC_MEMFUNC_SCOPE void
+isc___mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
+ isc__mem_t *ctx;
isc_boolean_t want_destroy = ISC_FALSE;
size_info *si;
size_t oldsize;
REQUIRE(ctxp != NULL);
- ctx = *ctxp;
+ ctx = (isc__mem_t *)*ctxp;
REQUIRE(VALID_CONTEXT(ctx));
REQUIRE(ptr != NULL);
@@ -1008,7 +1191,7 @@ isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
oldsize -= ALIGNMENT_SIZE;
INSIST(oldsize == size);
}
- isc__mem_free(ctx, ptr FLARG_PASS);
+ isc_mem_free((isc_mem_t *)ctx, ptr);
MCTXLOCK(ctx, &ctx->lock);
ctx->references--;
@@ -1042,9 +1225,9 @@ isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
destroy(ctx);
}
-void
-isc_mem_destroy(isc_mem_t **ctxp) {
- isc_mem_t *ctx;
+ISC_MEMFUNC_SCOPE void
+isc__mem_destroy(isc_mem_t **ctxp) {
+ isc__mem_t *ctx;
/*
* This routine provides legacy support for callers who use mctxs
@@ -1052,7 +1235,7 @@ isc_mem_destroy(isc_mem_t **ctxp) {
*/
REQUIRE(ctxp != NULL);
- ctx = *ctxp;
+ ctx = (isc__mem_t *)*ctxp;
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -1069,8 +1252,9 @@ isc_mem_destroy(isc_mem_t **ctxp) {
*ctxp = NULL;
}
-isc_result_t
-isc_mem_ondestroy(isc_mem_t *ctx, isc_task_t *task, isc_event_t **event) {
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mem_ondestroy(isc_mem_t *ctx0, isc_task_t *task, isc_event_t **event) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
isc_result_t res;
MCTXLOCK(ctx, &ctx->lock);
@@ -1080,16 +1264,16 @@ isc_mem_ondestroy(isc_mem_t *ctx, isc_task_t *task, isc_event_t **event) {
return (res);
}
-
-void *
-isc__mem_get(isc_mem_t *ctx, size_t size FLARG) {
+ISC_MEMFUNC_SCOPE void *
+isc___mem_get(isc_mem_t *ctx0, size_t size FLARG) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
void *ptr;
isc_boolean_t call_water = ISC_FALSE;
REQUIRE(VALID_CONTEXT(ctx));
if ((isc_mem_debugging & (ISC_MEM_DEBUGSIZE|ISC_MEM_DEBUGCTX)) != 0)
- return (isc__mem_allocate(ctx, size FLARG_PASS));
+ return (isc__mem_allocate(ctx0, size FLARG_PASS));
if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
MCTXLOCK(ctx, &ctx->lock);
@@ -1102,6 +1286,10 @@ isc__mem_get(isc_mem_t *ctx, size_t size FLARG) {
}
ADD_TRACE(ctx, ptr, size, file, line);
+ if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
+ !ctx->is_overmem) {
+ ctx->is_overmem = ISC_TRUE;
+ }
if (ctx->hi_water != 0U && !ctx->hi_called &&
ctx->inuse > ctx->hi_water) {
call_water = ISC_TRUE;
@@ -1121,9 +1309,9 @@ isc__mem_get(isc_mem_t *ctx, size_t size FLARG) {
return (ptr);
}
-void
-isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG)
-{
+ISC_MEMFUNC_SCOPE void
+isc___mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
isc_boolean_t call_water = ISC_FALSE;
size_info *si;
size_t oldsize;
@@ -1139,7 +1327,7 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG)
oldsize -= ALIGNMENT_SIZE;
INSIST(oldsize == size);
}
- isc__mem_free(ctx, ptr FLARG_PASS);
+ isc_mem_free((isc_mem_t *)ctx, ptr);
return;
}
@@ -1159,6 +1347,10 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG)
* when the context was pushed over hi_water but then had
* isc_mem_setwater() called with 0 for hi_water and lo_water.
*/
+ if (ctx->is_overmem &&
+ (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
+ ctx->is_overmem = ISC_FALSE;
+ }
if (ctx->hi_called &&
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
if (ctx->water != NULL)
@@ -1170,8 +1362,10 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG)
(ctx->water)(ctx->water_arg, ISC_MEM_LOWATER);
}
-void
-isc_mem_waterack(isc_mem_t *ctx, int flag) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_waterack(isc_mem_t *ctx0, int flag) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -1184,7 +1378,7 @@ isc_mem_waterack(isc_mem_t *ctx, int flag) {
#if ISC_MEM_TRACKLINES
static void
-print_active(isc_mem_t *mctx, FILE *out) {
+print_active(isc__mem_t *mctx, FILE *out) {
if (mctx->debuglist != NULL) {
debuglink_t *dl;
unsigned int i, j;
@@ -1226,11 +1420,12 @@ print_active(isc_mem_t *mctx, FILE *out) {
/*
* Print the stats[] on the stream "out" with suitable formatting.
*/
-void
-isc_mem_stats(isc_mem_t *ctx, FILE *out) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_stats(isc_mem_t *ctx0, FILE *out) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_t i;
const struct stats *s;
- const isc_mempool_t *pool;
+ const isc__mempool_t *pool;
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -1303,7 +1498,8 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) {
*/
static void *
-isc__mem_allocateunlocked(isc_mem_t *ctx, size_t size) {
+isc__mem_allocateunlocked(isc_mem_t *ctx0, size_t size) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_info *si;
size += ALIGNMENT_SIZE;
@@ -1325,8 +1521,9 @@ isc__mem_allocateunlocked(isc_mem_t *ctx, size_t size) {
return (&si[1]);
}
-void *
-isc__mem_allocate(isc_mem_t *ctx, size_t size FLARG) {
+ISC_MEMFUNC_SCOPE void *
+isc___mem_allocate(isc_mem_t *ctx0, size_t size FLARG) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_info *si;
isc_boolean_t call_water = ISC_FALSE;
@@ -1334,9 +1531,9 @@ isc__mem_allocate(isc_mem_t *ctx, size_t size FLARG) {
if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0) {
MCTXLOCK(ctx, &ctx->lock);
- si = isc__mem_allocateunlocked(ctx, size);
+ si = isc__mem_allocateunlocked((isc_mem_t *)ctx, size);
} else {
- si = isc__mem_allocateunlocked(ctx, size);
+ si = isc__mem_allocateunlocked((isc_mem_t *)ctx, size);
MCTXLOCK(ctx, &ctx->lock);
if (si != NULL)
mem_getstats(ctx, si[-1].u.size);
@@ -1345,6 +1542,11 @@ isc__mem_allocate(isc_mem_t *ctx, size_t size FLARG) {
#if ISC_MEM_TRACKLINES
ADD_TRACE(ctx, si, si[-1].u.size, file, line);
#endif
+ if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water &&
+ !ctx->is_overmem) {
+ ctx->is_overmem = ISC_TRUE;
+ }
+
if (ctx->hi_water != 0U && !ctx->hi_called &&
ctx->inuse > ctx->hi_water) {
ctx->hi_called = ISC_TRUE;
@@ -1365,8 +1567,9 @@ isc__mem_allocate(isc_mem_t *ctx, size_t size FLARG) {
return (si);
}
-void *
-isc__mem_reallocate(isc_mem_t *ctx, void *ptr, size_t size FLARG) {
+ISC_MEMFUNC_SCOPE void *
+isc___mem_reallocate(isc_mem_t *ctx0, void *ptr, size_t size FLARG) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
void *new_ptr = NULL;
size_t oldsize, copysize;
@@ -1384,23 +1587,24 @@ isc__mem_reallocate(isc_mem_t *ctx, void *ptr, size_t size FLARG) {
* NULL if allocation fails or doesn't happen.
*/
if (size > 0U) {
- new_ptr = isc__mem_allocate(ctx, size FLARG_PASS);
+ new_ptr = isc__mem_allocate(ctx0, size FLARG_PASS);
if (new_ptr != NULL && ptr != NULL) {
oldsize = (((size_info *)ptr)[-1]).u.size;
INSIST(oldsize >= ALIGNMENT_SIZE);
oldsize -= ALIGNMENT_SIZE;
copysize = oldsize > size ? size : oldsize;
memcpy(new_ptr, ptr, copysize);
- isc__mem_free(ctx, ptr FLARG_PASS);
+ isc__mem_free(ctx0, ptr FLARG_PASS);
}
} else if (ptr != NULL)
- isc__mem_free(ctx, ptr FLARG_PASS);
+ isc__mem_free(ctx0, ptr FLARG_PASS);
return (new_ptr);
}
-void
-isc__mem_free(isc_mem_t *ctx, void *ptr FLARG) {
+ISC_MEMFUNC_SCOPE void
+isc___mem_free(isc_mem_t *ctx0, void *ptr FLARG) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_info *si;
size_t size;
isc_boolean_t call_water= ISC_FALSE;
@@ -1433,6 +1637,11 @@ isc__mem_free(isc_mem_t *ctx, void *ptr FLARG) {
* when the context was pushed over hi_water but then had
* isc_mem_setwater() called with 0 for hi_water and lo_water.
*/
+ if (ctx->is_overmem &&
+ (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
+ ctx->is_overmem = ISC_FALSE;
+ }
+
if (ctx->hi_called &&
(ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) {
ctx->hi_called = ISC_FALSE;
@@ -1451,8 +1660,9 @@ isc__mem_free(isc_mem_t *ctx, void *ptr FLARG) {
* Other useful things.
*/
-char *
-isc__mem_strdup(isc_mem_t *mctx, const char *s FLARG) {
+ISC_MEMFUNC_SCOPE char *
+isc___mem_strdup(isc_mem_t *mctx0, const char *s FLARG) {
+ isc__mem_t *mctx = (isc__mem_t *)mctx0;
size_t len;
char *ns;
@@ -1461,7 +1671,7 @@ isc__mem_strdup(isc_mem_t *mctx, const char *s FLARG) {
len = strlen(s);
- ns = isc__mem_allocate(mctx, len + 1 FLARG_PASS);
+ ns = isc___mem_allocate((isc_mem_t *)mctx, len + 1 FLARG_PASS);
if (ns != NULL)
strncpy(ns, s, len + 1);
@@ -1469,8 +1679,10 @@ isc__mem_strdup(isc_mem_t *mctx, const char *s FLARG) {
return (ns);
}
-void
-isc_mem_setdestroycheck(isc_mem_t *ctx, isc_boolean_t flag) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_setdestroycheck(isc_mem_t *ctx0, isc_boolean_t flag) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -1483,8 +1695,10 @@ isc_mem_setdestroycheck(isc_mem_t *ctx, isc_boolean_t flag) {
* Quotas
*/
-void
-isc_mem_setquota(isc_mem_t *ctx, size_t quota) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_setquota(isc_mem_t *ctx0, size_t quota) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -1493,8 +1707,9 @@ isc_mem_setquota(isc_mem_t *ctx, size_t quota) {
MCTXUNLOCK(ctx, &ctx->lock);
}
-size_t
-isc_mem_getquota(isc_mem_t *ctx) {
+ISC_MEMFUNC_SCOPE size_t
+isc__mem_getquota(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_t quota;
REQUIRE(VALID_CONTEXT(ctx));
@@ -1507,8 +1722,9 @@ isc_mem_getquota(isc_mem_t *ctx) {
return (quota);
}
-size_t
-isc_mem_inuse(isc_mem_t *ctx) {
+ISC_MEMFUNC_SCOPE size_t
+isc__mem_inuse(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
size_t inuse;
REQUIRE(VALID_CONTEXT(ctx));
@@ -1521,10 +1737,11 @@ isc_mem_inuse(isc_mem_t *ctx) {
return (inuse);
}
-void
-isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
+ISC_MEMFUNC_SCOPE void
+isc__mem_setwater(isc_mem_t *ctx0, isc_mem_water_t water, void *water_arg,
size_t hiwater, size_t lowater)
{
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
isc_boolean_t callwater = ISC_FALSE;
isc_mem_water_t oldwater;
void *oldwater_arg;
@@ -1559,8 +1776,24 @@ isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
(oldwater)(oldwater_arg, ISC_MEM_LOWATER);
}
-void
-isc_mem_setname(isc_mem_t *ctx, const char *name, void *tag) {
+ISC_MEMFUNC_SCOPE isc_boolean_t
+isc__mem_isovermem(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
+ REQUIRE(VALID_CONTEXT(ctx));
+
+ /*
+ * We don't bother to lock the context because 100% accuracy isn't
+ * necessary (and even if we locked the context the returned value
+ * could be different from the actual state when it's used anyway)
+ */
+ return (ctx->is_overmem);
+}
+
+ISC_MEMFUNC_SCOPE void
+isc__mem_setname(isc_mem_t *ctx0, const char *name, void *tag) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
LOCK(&ctx->lock);
@@ -1570,15 +1803,19 @@ isc_mem_setname(isc_mem_t *ctx, const char *name, void *tag) {
UNLOCK(&ctx->lock);
}
-const char *
-isc_mem_getname(isc_mem_t *ctx) {
+ISC_MEMFUNC_SCOPE const char *
+isc__mem_getname(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
return (ctx->name);
}
-void *
-isc_mem_gettag(isc_mem_t *ctx) {
+ISC_MEMFUNC_SCOPE void *
+isc__mem_gettag(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
+
REQUIRE(VALID_CONTEXT(ctx));
return (ctx->tag);
@@ -1588,9 +1825,10 @@ isc_mem_gettag(isc_mem_t *ctx) {
* Memory pool stuff
*/
-isc_result_t
-isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
- isc_mempool_t *mpctx;
+ISC_MEMFUNC_SCOPE isc_result_t
+isc__mempool_create(isc_mem_t *mctx0, size_t size, isc_mempool_t **mpctxp) {
+ isc__mem_t *mctx = (isc__mem_t *)mctx0;
+ isc__mempool_t *mpctx;
REQUIRE(VALID_CONTEXT(mctx));
REQUIRE(size > 0U);
@@ -1600,11 +1838,13 @@ isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
* Allocate space for this pool, initialize values, and if all works
* well, attach to the memory context.
*/
- mpctx = isc_mem_get(mctx, sizeof(isc_mempool_t));
+ mpctx = isc_mem_get((isc_mem_t *)mctx, sizeof(isc__mempool_t));
if (mpctx == NULL)
return (ISC_R_NOMEMORY);
- mpctx->magic = MEMPOOL_MAGIC;
+ mpctx->common.methods = (isc_mempoolmethods_t *)&mempoolmethods;
+ mpctx->common.impmagic = MEMPOOL_MAGIC;
+ mpctx->common.magic = ISCAPI_MPOOL_MAGIC;
mpctx->lock = NULL;
mpctx->mctx = mctx;
mpctx->size = size;
@@ -1619,7 +1859,7 @@ isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
#endif
mpctx->items = NULL;
- *mpctxp = mpctx;
+ *mpctxp = (isc_mempool_t *)mpctx;
MCTXLOCK(mctx, &mctx->lock);
ISC_LIST_INITANDAPPEND(mctx->pools, mpctx, link);
@@ -1629,9 +1869,12 @@ isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
return (ISC_R_SUCCESS);
}
-void
-isc_mempool_setname(isc_mempool_t *mpctx, const char *name) {
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setname(isc_mempool_t *mpctx0, const char *name) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
REQUIRE(name != NULL);
+ REQUIRE(VALID_MEMPOOL(mpctx));
#if ISC_MEMPOOL_NAMES
if (mpctx->lock != NULL)
@@ -1648,20 +1891,20 @@ isc_mempool_setname(isc_mempool_t *mpctx, const char *name) {
#endif
}
-void
-isc_mempool_destroy(isc_mempool_t **mpctxp) {
- isc_mempool_t *mpctx;
- isc_mem_t *mctx;
+ISC_MEMFUNC_SCOPE void
+isc__mempool_destroy(isc_mempool_t **mpctxp) {
+ isc__mempool_t *mpctx;
+ isc__mem_t *mctx;
isc_mutex_t *lock;
element *item;
REQUIRE(mpctxp != NULL);
- mpctx = *mpctxp;
+ mpctx = (isc__mempool_t *)*mpctxp;
REQUIRE(VALID_MEMPOOL(mpctx));
#if ISC_MEMPOOL_NAMES
if (mpctx->allocated > 0)
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_mempool_destroy(): mempool %s "
+ "isc__mempool_destroy(): mempool %s "
"leaked memory",
mpctx->name);
#endif
@@ -1701,9 +1944,10 @@ isc_mempool_destroy(isc_mempool_t **mpctxp) {
mctx->poolcnt--;
MCTXUNLOCK(mctx, &mctx->lock);
- mpctx->magic = 0;
+ mpctx->common.impmagic = 0;
+ mpctx->common.magic = 0;
- isc_mem_put(mpctx->mctx, mpctx, sizeof(isc_mempool_t));
+ isc_mem_put((isc_mem_t *)mpctx->mctx, mpctx, sizeof(isc__mempool_t));
if (lock != NULL)
UNLOCK(lock);
@@ -1711,8 +1955,10 @@ isc_mempool_destroy(isc_mempool_t **mpctxp) {
*mpctxp = NULL;
}
-void
-isc_mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock) {
+ISC_MEMFUNC_SCOPE void
+isc__mempool_associatelock(isc_mempool_t *mpctx0, isc_mutex_t *lock) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
REQUIRE(VALID_MEMPOOL(mpctx));
REQUIRE(mpctx->lock == NULL);
REQUIRE(lock != NULL);
@@ -1720,10 +1966,11 @@ isc_mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock) {
mpctx->lock = lock;
}
-void *
-isc__mempool_get(isc_mempool_t *mpctx FLARG) {
+ISC_MEMFUNC_SCOPE void *
+isc___mempool_get(isc_mempool_t *mpctx0 FLARG) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
element *item;
- isc_mem_t *mctx;
+ isc__mem_t *mctx;
unsigned int i;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1802,9 +2049,10 @@ isc__mempool_get(isc_mempool_t *mpctx FLARG) {
return (item);
}
-void
-isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
- isc_mem_t *mctx;
+ISC_MEMFUNC_SCOPE void
+isc___mempool_put(isc_mempool_t *mpctx0, void *mem FLARG) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+ isc__mem_t *mctx;
element *item;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1859,8 +2107,10 @@ isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
* Quotas
*/
-void
-isc_mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit) {
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setfreemax(isc_mempool_t *mpctx0, unsigned int limit) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
REQUIRE(VALID_MEMPOOL(mpctx));
if (mpctx->lock != NULL)
@@ -1872,8 +2122,9 @@ isc_mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit) {
UNLOCK(mpctx->lock);
}
-unsigned int
-isc_mempool_getfreemax(isc_mempool_t *mpctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfreemax(isc_mempool_t *mpctx0) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
unsigned int freemax;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1889,8 +2140,9 @@ isc_mempool_getfreemax(isc_mempool_t *mpctx) {
return (freemax);
}
-unsigned int
-isc_mempool_getfreecount(isc_mempool_t *mpctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfreecount(isc_mempool_t *mpctx0) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
unsigned int freecount;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1906,8 +2158,10 @@ isc_mempool_getfreecount(isc_mempool_t *mpctx) {
return (freecount);
}
-void
-isc_mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit) {
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setmaxalloc(isc_mempool_t *mpctx0, unsigned int limit) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
REQUIRE(limit > 0);
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1921,8 +2175,9 @@ isc_mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit) {
UNLOCK(mpctx->lock);
}
-unsigned int
-isc_mempool_getmaxalloc(isc_mempool_t *mpctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getmaxalloc(isc_mempool_t *mpctx0) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
unsigned int maxalloc;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1938,8 +2193,9 @@ isc_mempool_getmaxalloc(isc_mempool_t *mpctx) {
return (maxalloc);
}
-unsigned int
-isc_mempool_getallocated(isc_mempool_t *mpctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getallocated(isc_mempool_t *mpctx0) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
unsigned int allocated;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1955,8 +2211,10 @@ isc_mempool_getallocated(isc_mempool_t *mpctx) {
return (allocated);
}
-void
-isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit) {
+ISC_MEMFUNC_SCOPE void
+isc__mempool_setfillcount(isc_mempool_t *mpctx0, unsigned int limit) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
REQUIRE(limit > 0);
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1969,8 +2227,10 @@ isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit) {
UNLOCK(mpctx->lock);
}
-unsigned int
-isc_mempool_getfillcount(isc_mempool_t *mpctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc__mempool_getfillcount(isc_mempool_t *mpctx0) {
+ isc__mempool_t *mpctx = (isc__mempool_t *)mpctx0;
+
unsigned int fillcount;
REQUIRE(VALID_MEMPOOL(mpctx));
@@ -1986,8 +2246,17 @@ isc_mempool_getfillcount(isc_mempool_t *mpctx) {
return (fillcount);
}
-void
-isc_mem_printactive(isc_mem_t *ctx, FILE *file) {
+#ifdef USE_MEMIMPREGISTER
+isc_result_t
+isc__mem_register() {
+ return (isc_mem_register(isc__mem_create2));
+}
+#endif
+
+#ifdef BIND9
+ISC_MEMFUNC_SCOPE void
+isc__mem_printactive(isc_mem_t *ctx0, FILE *file) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
REQUIRE(VALID_CONTEXT(ctx));
REQUIRE(file != NULL);
@@ -2000,12 +2269,12 @@ isc_mem_printactive(isc_mem_t *ctx, FILE *file) {
#endif
}
-void
-isc_mem_printallactive(FILE *file) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_printallactive(FILE *file) {
#if !ISC_MEM_TRACKLINES
UNUSED(file);
#else
- isc_mem_t *ctx;
+ isc__mem_t *ctx;
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
@@ -2020,15 +2289,15 @@ isc_mem_printallactive(FILE *file) {
#endif
}
-void
-isc_mem_checkdestroyed(FILE *file) {
+ISC_MEMFUNC_SCOPE void
+isc__mem_checkdestroyed(FILE *file) {
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
LOCK(&lock);
if (!ISC_LIST_EMPTY(contexts)) {
#if ISC_MEM_TRACKLINES
- isc_mem_t *ctx;
+ isc__mem_t *ctx;
for (ctx = ISC_LIST_HEAD(contexts);
ctx != NULL;
@@ -2043,9 +2312,11 @@ isc_mem_checkdestroyed(FILE *file) {
UNLOCK(&lock);
}
-unsigned int
-isc_mem_references(isc_mem_t *ctx) {
+ISC_MEMFUNC_SCOPE unsigned int
+isc_mem_references(isc_mem_t *ctx0) {
+ isc__mem_t *ctx = (isc__mem_t *)ctx0;
unsigned int references;
+
REQUIRE(VALID_CONTEXT(ctx));
MCTXLOCK(ctx, &ctx->lock);
@@ -2065,7 +2336,7 @@ typedef struct summarystat {
} summarystat_t;
static void
-renderctx(isc_mem_t *ctx, summarystat_t *summary, xmlTextWriterPtr writer) {
+renderctx(isc__mem_t *ctx, summarystat_t *summary, xmlTextWriterPtr writer) {
REQUIRE(VALID_CONTEXT(ctx));
xmlTextWriterStartElement(writer, ISC_XMLCHAR "context");
@@ -2151,7 +2422,7 @@ renderctx(isc_mem_t *ctx, summarystat_t *summary, xmlTextWriterPtr writer) {
void
isc_mem_renderxml(xmlTextWriterPtr writer) {
- isc_mem_t *ctx;
+ isc__mem_t *ctx;
summarystat_t summary;
isc_uint64_t lost;
@@ -2203,3 +2474,4 @@ isc_mem_renderxml(xmlTextWriterPtr writer) {
}
#endif /* HAVE_LIBXML2 */
+#endif /* BIND9 */
diff --git a/lib/isc/mem_api.c b/lib/isc/mem_api.c
new file mode 100644
index 000000000000..85abb9b4507c
--- /dev/null
+++ b/lib/isc/mem_api.c
@@ -0,0 +1,303 @@
+/*
+ * Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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_api.c,v 1.8 2010/08/12 21:30:26 jinmei Exp $ */
+
+#include <config.h>
+
+#include <isc/magic.h>
+#include <isc/mem.h>
+#include <isc/once.h>
+#include <isc/util.h>
+
+#if ISC_MEM_TRACKLINES
+#define FLARG_PASS , file, line
+#define FLARG , const char *file, unsigned int line
+#else
+#define FLARG_PASS
+#define FLARG
+#endif
+
+static isc_mutex_t createlock;
+static isc_once_t once = ISC_ONCE_INIT;
+static isc_memcreatefunc_t mem_createfunc = NULL;
+
+static void
+initialize(void) {
+ RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_mem_register(isc_memcreatefunc_t createfunc) {
+ isc_result_t result = ISC_R_SUCCESS;
+
+ RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
+
+ LOCK(&createlock);
+ if (mem_createfunc == NULL)
+ mem_createfunc = createfunc;
+ else
+ result = ISC_R_EXISTS;
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_mem_create(size_t init_max_size, size_t target_size, isc_mem_t **mctxp) {
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(mem_createfunc != NULL);
+ result = (*mem_createfunc)(init_max_size, target_size, mctxp,
+ ISC_MEMFLAG_DEFAULT);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_mem_create2(size_t init_max_size, size_t target_size, isc_mem_t **mctxp,
+ unsigned int flags)
+{
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(mem_createfunc != NULL);
+ result = (*mem_createfunc)(init_max_size, target_size, mctxp, flags);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+void
+isc_mem_attach(isc_mem_t *source, isc_mem_t **targetp) {
+ REQUIRE(ISCAPI_MCTX_VALID(source));
+ REQUIRE(targetp != NULL && *targetp == NULL);
+
+ source->methods->attach(source, targetp);
+
+ ENSURE(*targetp == source);
+}
+
+void
+isc_mem_detach(isc_mem_t **mctxp) {
+ REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
+
+ (*mctxp)->methods->detach(mctxp);
+
+ ENSURE(*mctxp == NULL);
+}
+
+void
+isc_mem_destroy(isc_mem_t **mctxp) {
+ REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
+
+ (*mctxp)->methods->destroy(mctxp);
+
+ ENSURE(*mctxp == NULL);
+}
+
+void *
+isc__mem_get(isc_mem_t *mctx, size_t size FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->memget(mctx, size FLARG_PASS));
+}
+
+void
+isc__mem_put(isc_mem_t *mctx, void *ptr, size_t size FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ mctx->methods->memput(mctx, ptr, size FLARG_PASS);
+}
+
+void
+isc__mem_putanddetach(isc_mem_t **mctxp, void *ptr, size_t size FLARG) {
+ REQUIRE(mctxp != NULL && ISCAPI_MCTX_VALID(*mctxp));
+
+ (*mctxp)->methods->memputanddetach(mctxp, ptr, size FLARG_PASS);
+
+ /*
+ * XXX: We cannot always ensure *mctxp == NULL here
+ * (see lib/isc/mem.c).
+ */
+}
+
+void *
+isc__mem_allocate(isc_mem_t *mctx, size_t size FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->memallocate(mctx, size FLARG_PASS));
+}
+
+void *
+isc__mem_reallocate(isc_mem_t *mctx, void *ptr, size_t size FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->memreallocate(mctx, ptr, size FLARG_PASS));
+}
+
+char *
+isc__mem_strdup(isc_mem_t *mctx, const char *s FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->memstrdup(mctx, s FLARG_PASS));
+}
+
+void
+isc__mem_free(isc_mem_t *mctx, void *ptr FLARG) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ mctx->methods->memfree(mctx, ptr FLARG_PASS);
+}
+
+void
+isc_mem_setdestroycheck(isc_mem_t *mctx, isc_boolean_t flag) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ mctx->methods->setdestroycheck(mctx, flag);
+}
+
+void
+isc_mem_setwater(isc_mem_t *ctx, isc_mem_water_t water, void *water_arg,
+ size_t hiwater, size_t lowater)
+{
+ REQUIRE(ISCAPI_MCTX_VALID(ctx));
+
+ ctx->methods->setwater(ctx, water, water_arg, hiwater, lowater);
+}
+
+void
+isc_mem_waterack(isc_mem_t *ctx, int flag) {
+ REQUIRE(ISCAPI_MCTX_VALID(ctx));
+
+ ctx->methods->waterack(ctx, flag);
+}
+
+size_t
+isc_mem_inuse(isc_mem_t *mctx) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->inuse(mctx));
+}
+
+isc_boolean_t
+isc_mem_isovermem(isc_mem_t *mctx) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->isovermem(mctx));
+}
+
+void
+isc_mem_setname(isc_mem_t *mctx, const char *name, void *tag) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ UNUSED(name);
+ UNUSED(tag);
+
+ return;
+}
+
+const char *
+isc_mem_getname(isc_mem_t *mctx) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return ("");
+}
+
+void *
+isc_mem_gettag(isc_mem_t *mctx) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (NULL);
+}
+
+isc_result_t
+isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) {
+ REQUIRE(ISCAPI_MCTX_VALID(mctx));
+
+ return (mctx->methods->mpcreate(mctx, size, mpctxp));
+}
+
+void
+isc_mempool_destroy(isc_mempool_t **mpctxp) {
+ REQUIRE(mpctxp != NULL && ISCAPI_MPOOL_VALID(*mpctxp));
+
+ (*mpctxp)->methods->destroy(mpctxp);
+
+ ENSURE(*mpctxp == NULL);
+}
+
+void *
+isc__mempool_get(isc_mempool_t *mpctx FLARG) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ return (mpctx->methods->get(mpctx FLARG_PASS));
+}
+
+void
+isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->put(mpctx, mem FLARG_PASS);
+}
+
+unsigned int
+isc_mempool_getallocated(isc_mempool_t *mpctx) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ return (mpctx->methods->getallocated(mpctx));
+}
+
+void
+isc_mempool_setmaxalloc(isc_mempool_t *mpctx, unsigned int limit) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->setmaxalloc(mpctx, limit);
+}
+
+void
+isc_mempool_setfreemax(isc_mempool_t *mpctx, unsigned int limit) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->setfreemax(mpctx, limit);
+}
+
+void
+isc_mempool_setname(isc_mempool_t *mpctx, const char *name) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->setname(mpctx, name);
+}
+
+void
+isc_mempool_associatelock(isc_mempool_t *mpctx, isc_mutex_t *lock) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->associatelock(mpctx, lock);
+}
+
+void
+isc_mempool_setfillcount(isc_mempool_t *mpctx, unsigned int limit) {
+ REQUIRE(ISCAPI_MPOOL_VALID(mpctx));
+
+ mpctx->methods->setfillcount(mpctx, limit);
+}
diff --git a/lib/isc/mutexblock.c b/lib/isc/mutexblock.c
index d45ad0e1e485..d41e9d28d86d 100644
--- a/lib/isc/mutexblock.c
+++ b/lib/isc/mutexblock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutexblock.c,v 1.20 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -32,10 +32,9 @@ isc_mutexblock_init(isc_mutex_t *block, unsigned int count) {
for (i = 0; i < count; i++) {
result = isc_mutex_init(&block[i]);
if (result != ISC_R_SUCCESS) {
- i--;
- while (i > 0) {
- DESTROYLOCK(&block[i]);
+ while (i > 0U) {
i--;
+ DESTROYLOCK(&block[i]);
}
return (result);
}
diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c
index 2d745feb82a2..d6928c10df8b 100644
--- a/lib/isc/netaddr.c
+++ b/lib/isc/netaddr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.c,v 1.38 2007/06/18 23:47:44 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -31,6 +31,7 @@
#include <isc/sockaddr.h>
#include <isc/string.h>
#include <isc/util.h>
+#include "ntp_stdlib.h" /* NTP change for strlcpy, strlcat */
isc_boolean_t
isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) {
@@ -69,10 +70,10 @@ isc_boolean_t
isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
unsigned int prefixlen)
{
- const unsigned char *pa, *pb;
- unsigned int ipabytes; /* Length of whole IP address in bytes */
- unsigned int nbytes; /* Number of significant whole bytes */
- unsigned int nbits; /* Number of significant leftover bits */
+ const unsigned char *pa = NULL, *pb = NULL;
+ unsigned int ipabytes = 0; /* Length of whole IP address in bytes */
+ unsigned int nbytes; /* Number of significant whole bytes */
+ unsigned int nbits; /* Number of significant leftover bits */
REQUIRE(a != NULL && b != NULL);
@@ -94,8 +95,6 @@ isc_netaddr_eqprefix(const isc_netaddr_t *a, const isc_netaddr_t *b,
ipabytes = 16;
break;
default:
- pa = pb = NULL; /* Avoid silly compiler warning. */
- ipabytes = 0; /* Ditto. */
return (ISC_FALSE);
}
@@ -188,6 +187,9 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
isc_buffer_init(&buf, array, size);
result = isc_netaddr_totext(na, &buf);
+ if (size == 0)
+ return;
+
/*
* Null terminate.
*/
@@ -212,7 +214,7 @@ isc_netaddr_format(const isc_netaddr_t *na, char *array, unsigned int size) {
isc_result_t
isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
static const unsigned char zeros[16] = { 0 };
- unsigned int nbits, nbytes, ipbytes;
+ unsigned int nbits, nbytes, ipbytes = 0;
const unsigned char *p;
switch (na->family) {
@@ -229,7 +231,6 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
return (ISC_R_RANGE);
break;
default:
- ipbytes = 0;
return (ISC_R_NOTIMPLEMENTED);
}
nbytes = prefixlen / 8;
@@ -246,7 +247,7 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
isc_result_t
isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
- unsigned int nbits, nbytes, ipbytes, i;
+ unsigned int nbits = 0, nbytes = 0, ipbytes = 0, i;
const unsigned char *p;
switch (s->family) {
@@ -259,10 +260,8 @@ isc_netaddr_masktoprefixlen(const isc_netaddr_t *s, unsigned int *lenp) {
ipbytes = 16;
break;
default:
- ipbytes = 0;
return (ISC_R_NOTIMPLEMENTED);
}
- nbytes = nbits = 0;
for (i = 0; i < ipbytes; i++) {
if (p[i] != 0xFF)
break;
@@ -303,18 +302,18 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) {
isc_result_t
isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) {
#ifdef ISC_PLATFORM_HAVESYSUNH
- if (strlen(path) > sizeof(netaddr->type.un) - 1)
- return (ISC_R_NOSPACE);
+ if (strlen(path) > sizeof(netaddr->type.un) - 1)
+ return (ISC_R_NOSPACE);
memset(netaddr, 0, sizeof(*netaddr));
netaddr->family = AF_UNIX;
- strcpy(netaddr->type.un, path);
+ strlcpy(netaddr->type.un, path, sizeof(netaddr->type.un));
netaddr->zone = 0;
return (ISC_R_SUCCESS);
#else
UNUSED(netaddr);
UNUSED(path);
- return (ISC_R_NOTIMPLEMENTED);
+ return (ISC_R_NOTIMPLEMENTED);
#endif
}
diff --git a/lib/isc/powerpc/include/isc/atomic.h b/lib/isc/powerpc/include/isc/atomic.h
index 765cb6d72a8c..030007f34ed7 100644
--- a/lib/isc/powerpc/include/isc/atomic.h
+++ b/lib/isc/powerpc/include/isc/atomic.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: atomic.h,v 1.6 2007/06/18 23:47:47 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_ATOMIC_H
#define ISC_ATOMIC_H 1
@@ -46,25 +46,56 @@
#include <sys/atomic_op.h>
-#define isc_atomic_xadd(p, v) fetch_and_add(p, v)
#define isc_atomic_store(p, v) _clear_lock(p, v)
#ifdef __GNUC__
+static inline isc_int32_t
+#else
+static isc_int32_t
+#endif
+isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
+ int ret;
+
+#ifdef __GNUC__
+ asm("ics");
+#else
+ __isync();
+#endif
+
+ ret = fetch_and_add((atomic_p)p, (int)val);
+
+#ifdef __GNUC__
+ asm("ics");
+#else
+ __isync();
+#endif
+
+ return (ret);
+}
+
+#ifdef __GNUC__
static inline int
#else
static int
#endif
isc_atomic_cmpxchg(atomic_p p, int old, int new) {
- int orig = old;
+ int orig = old;
+
+#ifdef __GNUC__
+ asm("ics");
+#else
+ __isync();
+#endif
+ if (compare_and_swap(p, &orig, new))
+ orig = old;
#ifdef __GNUC__
- asm("ics");
+ asm("ics");
#else
- __isync();
+ __isync();
#endif
- if (compare_and_swap(p, &orig, new))
- return (old);
- return (orig);
+
+ return (orig);
}
#elif defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM)
@@ -76,17 +107,19 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
#ifdef ISC_PLATFORM_USEMACASM
"1:"
"lwarx r6, 0, %1\n"
- "mr %0, r6\n"
+ "mr %0, r6\n"
"add r6, r6, %2\n"
"stwcx. r6, 0, %1\n"
- "bne- 1b"
+ "bne- 1b\n"
+ "sync"
#else
"1:"
"lwarx 6, 0, %1\n"
- "mr %0, 6\n"
+ "mr %0, 6\n"
"add 6, 6, %2\n"
"stwcx. 6, 0, %1\n"
- "bne- 1b"
+ "bne- 1b\n"
+ "sync"
#endif
: "=&r"(orig)
: "r"(p), "r"(val)
@@ -104,13 +137,15 @@ isc_atomic_store(void *p, isc_int32_t val) {
"lwarx r6, 0, %0\n"
"lwz r6, %1\n"
"stwcx. r6, 0, %0\n"
- "bne- 1b"
+ "bne- 1b\n"
+ "sync"
#else
"1:"
"lwarx 6, 0, %0\n"
"lwz 6, %1\n"
"stwcx. 6, 0, %0\n"
- "bne- 1b"
+ "bne- 1b\n"
+ "sync"
#endif
:
: "r"(p), "m"(val)
@@ -132,7 +167,8 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
"mr r6, %3\n"
"stwcx. r6, 0, %1\n"
"bne- 1b\n"
- "2:"
+ "2:\n"
+ "sync"
#else
"1:"
"lwarx 6, 0, %1\n"
@@ -142,7 +178,8 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
"mr 6, %3\n"
"stwcx. 6, 0, %1\n"
"bne- 1b\n"
- "2:"
+ "2:\n"
+ "sync"
#endif
: "=&r" (orig)
: "r"(p), "r"(cmpval), "r"(val)
diff --git a/lib/isc/print.c b/lib/isc/print.c
index b892e3a2ed09..a5e5ba6699d6 100644
--- a/lib/isc/print.c
+++ b/lib/isc/print.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2010 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: print.c,v 1.35 2008/02/18 23:46:59 tbox Exp $ */
+/* $Id: print.c,v 1.37 2010/10/18 23:47:08 tbox Exp $ */
/*! \file */
@@ -468,7 +468,7 @@ isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
if (width > 0) {
count += width;
width--;
- if (left) {
+ if (left && size > 1) {
*str++ = c;
size--;
}
diff --git a/lib/isc/pthreads/mutex.c b/lib/isc/pthreads/mutex.c
index b57d9eee8daa..62ad540a7e17 100644
--- a/lib/isc/pthreads/mutex.c
+++ b/lib/isc/pthreads/mutex.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutex.c,v 1.16 2008/04/04 23:47:01 tbox Exp $ */
+/* $Id: mutex.c,v 1.18 2011/01/04 23:47:14 tbox Exp $ */
/*! \file */
@@ -30,6 +30,15 @@
#include <isc/util.h>
#include <isc/strerror.h>
+#if HAVE_PTHREADS < 5 /* HP-UX 10.20 has 4, needs this */
+# define pthread_mutex_init(m, a) \
+ pthread_mutex_init(m, (a) \
+ ? *(const pthread_mutexattr_t *)(a) \
+ : pthread_mutexattr_default)
+# define PTHREAD_MUTEX_RECURSIVE MUTEX_RECURSIVE_NP
+# define pthread_mutexattr_settype pthread_mutexattr_setkind_np
+#endif
+
#if ISC_MUTEX_PROFILE
/*@{*/
@@ -78,7 +87,7 @@ struct isc_mutexstats {
};
#ifndef ISC_MUTEX_PROFTABLESIZE
-#define ISC_MUTEX_PROFTABLESIZE (16 * 1024)
+#define ISC_MUTEX_PROFTABLESIZE (1024 * 1024)
#endif
static isc_mutexstats_t stats[ISC_MUTEX_PROFTABLESIZE];
static int stats_next = 0;
@@ -200,24 +209,24 @@ isc_mutex_statsprofile(FILE *fp) {
fprintf(fp, "Mutex stats (in us)\n");
for (i = 0; i < stats_next; i++) {
- fprintf(fp, "%-12s %4d: %10u %lu.%06lu %lu.%06lu\n",
+ fprintf(fp, "%-12s %4d: %10u %lu.%06lu %lu.%06lu %5d\n",
stats[i].file, stats[i].line, stats[i].count,
stats[i].locked_total.tv_sec,
stats[i].locked_total.tv_usec,
stats[i].wait_total.tv_sec,
- stats[i].wait_total.tv_usec
- );
+ stats[i].wait_total.tv_usec,
+ i);
for (j = 0; j < ISC_MUTEX_MAX_LOCKERS; j++) {
locker = &stats[i].lockers[j];
if (locker->file == NULL)
continue;
- fprintf(fp, " %-11s %4d: %10u %lu.%06lu %lu.%06lu\n",
+ fprintf(fp, " %-11s %4d: %10u %lu.%06lu %lu.%06lu %5d\n",
locker->file, locker->line, locker->count,
locker->locked_total.tv_sec,
locker->locked_total.tv_usec,
locker->wait_total.tv_sec,
- locker->wait_total.tv_usec
- );
+ locker->wait_total.tv_usec,
+ i);
}
}
}
@@ -234,10 +243,13 @@ isc_mutex_init_errcheck(isc_mutex_t *mp)
if (pthread_mutexattr_init(&attr) != 0)
return (ISC_R_UNEXPECTED);
- if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK) != 0)
+ if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK) != 0) {
+ pthread_mutexattr_destroy(&attr);
return (ISC_R_UNEXPECTED);
+ }
err = pthread_mutex_init(mp, &attr) != 0)
+ pthread_mutexattr_destroy(&attr);
if (err == ENOMEM)
return (ISC_R_NOMEMORY);
return ((err == 0) ? ISC_R_SUCCESS : ISC_R_UNEXPECTED);
diff --git a/lib/isc/radix.c b/lib/isc/radix.c
index 7786984169a2..ac211efb6a87 100644
--- a/lib/isc/radix.c
+++ b/lib/isc/radix.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: radix.c,v 1.20.36.3 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
/*
* This source was adapted from MRT's RCS Ids:
@@ -275,7 +275,7 @@ isc_radix_search(isc_radix_tree_t *radix, isc_radix_node_t **target,
if (node && node->prefix)
stack[cnt++] = node;
- while (--cnt >= 0) {
+ while (cnt-- > 0) {
node = stack[cnt];
if (_comp_with_mask(isc_prefix_tochar(node->prefix),
diff --git a/lib/isc/random.c b/lib/isc/random.c
index 0329abde72b2..8b73ed56927d 100644
--- a/lib/isc/random.c
+++ b/lib/isc/random.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: random.c,v 1.25 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: random.c,v 1.28 2009/07/16 05:52:46 marka Exp $ */
/*! \file */
@@ -43,7 +43,7 @@ initialize_rand(void)
{
#ifndef HAVE_ARC4RANDOM
unsigned int pid = getpid();
-
+
/*
* The low bits of pid generally change faster.
* Xor them with the high bits of time which change slowly.
@@ -84,7 +84,16 @@ isc_random_get(isc_uint32_t *val)
* rand()'s lower bits are not random.
* rand()'s upper bit is zero.
*/
+#if RAND_MAX >= 0xfffff
+ /* We have at least 20 bits. Use lower 16 excluding lower most 4 */
*val = ((rand() >> 4) & 0xffff) | ((rand() << 12) & 0xffff0000);
+#elif RAND_MAX >= 0x7fff
+ /* We have at least 15 bits. Use lower 10/11 excluding lower most 4 */
+ *val = ((rand() >> 4) & 0x000007ff) | ((rand() << 7) & 0x003ff800) |
+ ((rand() << 18) & 0xffc00000);
+#else
+#error RAND_MAX is too small
+#endif
#else
*val = arc4random();
#endif
@@ -92,13 +101,13 @@ isc_random_get(isc_uint32_t *val)
isc_uint32_t
isc_random_jitter(isc_uint32_t max, isc_uint32_t jitter) {
- REQUIRE(jitter < max);
+ isc_uint32_t rnd;
+
+ REQUIRE(jitter < max || (jitter == 0 && max == 0));
+
if (jitter == 0)
return (max);
- else
-#ifndef HAVE_ARC4RANDOM
- return (max - rand() % jitter);
-#else
- return (max - arc4random() % jitter);
-#endif
+
+ isc_random_get(&rnd);
+ return (max - rnd % jitter);
}
diff --git a/lib/isc/result.c b/lib/isc/result.c
index 571358054e8f..520f1613acd1 100644
--- a/lib/isc/result.c
+++ b/lib/isc/result.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.71 2008/09/25 04:02:39 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -102,6 +102,7 @@ static const char *text[ISC_R_NRESULTS] = {
"max size", /*%< 58 */
"invalid address format", /*%< 59 */
"bad base32 encoding", /*%< 60 */
+ "unset", /*%< 61 */
};
#define ISC_RESULT_RESULTSET 2
@@ -112,14 +113,14 @@ static ISC_LIST(resulttable) tables;
static isc_mutex_t lock;
static isc_result_t
-register_table(unsigned int base, unsigned int nresults, const char **text,
+register_table(unsigned int base, unsigned int nresults, const char **txt,
isc_msgcat_t *msgcat, int set)
{
resulttable *table;
REQUIRE(base % ISC_RESULTCLASS_SIZE == 0);
REQUIRE(nresults <= ISC_RESULTCLASS_SIZE);
- REQUIRE(text != NULL);
+ REQUIRE(txt != NULL);
/*
* We use malloc() here because we we want to be able to use
@@ -130,7 +131,7 @@ register_table(unsigned int base, unsigned int nresults, const char **text,
return (ISC_R_NOMEMORY);
table->base = base;
table->last = base + nresults - 1;
- table->text = text;
+ table->text = txt;
table->msgcat = msgcat;
table->set = set;
ISC_LINK_INIT(table, link);
@@ -170,14 +171,14 @@ initialize(void) {
const char *
isc_result_totext(isc_result_t result) {
resulttable *table;
- const char *text, *default_text;
+ const char *txt, *default_text;
int index;
initialize();
LOCK(&lock);
- text = NULL;
+ txt = NULL;
for (table = ISC_LIST_HEAD(tables);
table != NULL;
table = ISC_LIST_NEXT(table, link)) {
@@ -189,25 +190,25 @@ isc_result_totext(isc_result_t result) {
* instead of index because isc_msgcat_get() requires
* the message number to be > 0.
*/
- text = isc_msgcat_get(table->msgcat, table->set,
- index + 1, default_text);
+ txt = isc_msgcat_get(table->msgcat, table->set,
+ index + 1, default_text);
break;
}
}
- if (text == NULL)
- text = isc_msgcat_get(isc_msgcat, ISC_RESULT_UNAVAILABLESET,
- 1, "(result code text not available)");
+ if (txt == NULL)
+ txt = isc_msgcat_get(isc_msgcat, ISC_RESULT_UNAVAILABLESET,
+ 1, "(result code text not available)");
UNLOCK(&lock);
- return (text);
+ return (txt);
}
isc_result_t
isc_result_register(unsigned int base, unsigned int nresults,
- const char **text, isc_msgcat_t *msgcat, int set)
+ const char **txt, isc_msgcat_t *msgcat, int set)
{
initialize();
- return (register_table(base, nresults, text, msgcat, set));
+ return (register_table(base, nresults, txt, msgcat, set));
}
diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c
index ca8e83dfc13f..9c84c258a28b 100644
--- a/lib/isc/rwlock.c
+++ b/lib/isc/rwlock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rwlock.c,v 1.44.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -261,6 +261,7 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
}
cntflag = isc_atomic_xadd(&rwl->cnt_and_flag, READER_INCR);
+ POST(cntflag);
while (1) {
if ((rwl->cnt_and_flag & WRITER_ACTIVE) == 0)
break;
diff --git a/lib/isc/sha1.c b/lib/isc/sha1.c
index 3575288481eb..cce96036045f 100644
--- a/lib/isc/sha1.c
+++ b/lib/isc/sha1.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sha1.c,v 1.18 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
/* $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
@@ -38,11 +38,47 @@
#include "config.h"
#include <isc/assertions.h>
+#include <isc/platform.h>
#include <isc/sha1.h>
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
+#ifdef ISC_PLATFORM_OPENSSLHASH
+
+void
+isc_sha1_init(isc_sha1_t *context)
+{
+ INSIST(context != NULL);
+
+ EVP_DigestInit(context, EVP_sha1());
+}
+
+void
+isc_sha1_invalidate(isc_sha1_t *context) {
+ EVP_MD_CTX_cleanup(context);
+}
+
+void
+isc_sha1_update(isc_sha1_t *context, const unsigned char *data,
+ unsigned int len)
+{
+ INSIST(context != 0);
+ INSIST(data != 0);
+
+ EVP_DigestUpdate(context, (const void *) data, (size_t) len);
+}
+
+void
+isc_sha1_final(isc_sha1_t *context, unsigned char *digest) {
+ INSIST(digest != 0);
+ INSIST(context != 0);
+
+ EVP_DigestFinal(context, digest, NULL);
+}
+
+#else
+
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/*@{*/
@@ -220,6 +256,8 @@ transform(isc_uint32_t state[5], const unsigned char buffer[64]) {
/* Wipe variables */
a = b = c = d = e = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e);
}
@@ -313,3 +351,4 @@ isc_sha1_final(isc_sha1_t *context, unsigned char *digest) {
memset(context, 0, sizeof(isc_sha1_t));
}
+#endif
diff --git a/lib/isc/sha2.c b/lib/isc/sha2.c
index 70eea4f96700..db2e3496c454 100644
--- a/lib/isc/sha2.c
+++ b/lib/isc/sha2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,9 +14,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sha2.c,v 1.13.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
-/* $FreeBSD$ */
+/* $FreeBSD: src/sys/crypto/sha2/sha2.c,v 1.2.2.2 2002/03/05 08:36:47 ume Exp $ */
/* $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $ */
/*
@@ -58,10 +58,169 @@
#include <config.h>
#include <isc/assertions.h>
+#include <isc/platform.h>
#include <isc/sha2.h>
#include <isc/string.h>
#include <isc/util.h>
+#ifdef ISC_PLATFORM_OPENSSLHASH
+
+void
+isc_sha224_init(isc_sha224_t *context) {
+ if (context == (isc_sha224_t *)0) {
+ return;
+ }
+ EVP_DigestInit(context, EVP_sha224());
+}
+
+void
+isc_sha224_invalidate(isc_sha224_t *context) {
+ EVP_MD_CTX_cleanup(context);
+}
+
+void
+isc_sha224_update(isc_sha224_t *context, const isc_uint8_t* data, size_t len) {
+ if (len == 0U) {
+ /* Calling with no data is valid - we do nothing */
+ return;
+ }
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha224_t *)0 && data != (isc_uint8_t*)0);
+
+ EVP_DigestUpdate(context, (const void *) data, len);
+}
+
+void
+isc_sha224_final(isc_uint8_t digest[], isc_sha224_t *context) {
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha224_t *)0);
+
+ /* If no digest buffer is passed, we don't bother doing this: */
+ if (digest != (isc_uint8_t*)0) {
+ EVP_DigestFinal(context, digest, NULL);
+ } else {
+ EVP_MD_CTX_cleanup(context);
+ }
+}
+
+void
+isc_sha256_init(isc_sha256_t *context) {
+ if (context == (isc_sha256_t *)0) {
+ return;
+ }
+ EVP_DigestInit(context, EVP_sha256());
+}
+
+void
+isc_sha256_invalidate(isc_sha256_t *context) {
+ EVP_MD_CTX_cleanup(context);
+}
+
+void
+isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
+ if (len == 0U) {
+ /* Calling with no data is valid - we do nothing */
+ return;
+ }
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha256_t *)0 && data != (isc_uint8_t*)0);
+
+ EVP_DigestUpdate(context, (const void *) data, len);
+}
+
+void
+isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha256_t *)0);
+
+ /* If no digest buffer is passed, we don't bother doing this: */
+ if (digest != (isc_uint8_t*)0) {
+ EVP_DigestFinal(context, digest, NULL);
+ } else {
+ EVP_MD_CTX_cleanup(context);
+ }
+}
+
+void
+isc_sha512_init(isc_sha512_t *context) {
+ if (context == (isc_sha512_t *)0) {
+ return;
+ }
+ EVP_DigestInit(context, EVP_sha512());
+}
+
+void
+isc_sha512_invalidate(isc_sha512_t *context) {
+ EVP_MD_CTX_cleanup(context);
+}
+
+void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t len) {
+ if (len == 0U) {
+ /* Calling with no data is valid - we do nothing */
+ return;
+ }
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha512_t *)0 && data != (isc_uint8_t*)0);
+
+ EVP_DigestUpdate(context, (const void *) data, len);
+}
+
+void isc_sha512_final(isc_uint8_t digest[], isc_sha512_t *context) {
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha512_t *)0);
+
+ /* If no digest buffer is passed, we don't bother doing this: */
+ if (digest != (isc_uint8_t*)0) {
+ EVP_DigestFinal(context, digest, NULL);
+ } else {
+ EVP_MD_CTX_cleanup(context);
+ }
+}
+
+void
+isc_sha384_init(isc_sha384_t *context) {
+ if (context == (isc_sha384_t *)0) {
+ return;
+ }
+ EVP_DigestInit(context, EVP_sha384());
+}
+
+void
+isc_sha384_invalidate(isc_sha384_t *context) {
+ EVP_MD_CTX_cleanup(context);
+}
+
+void
+isc_sha384_update(isc_sha384_t *context, const isc_uint8_t* data, size_t len) {
+ if (len == 0U) {
+ /* Calling with no data is valid - we do nothing */
+ return;
+ }
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha512_t *)0 && data != (isc_uint8_t*)0);
+
+ EVP_DigestUpdate(context, (const void *) data, len);
+}
+
+void
+isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) {
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha384_t *)0);
+
+ /* If no digest buffer is passed, we don't bother doing this: */
+ if (digest != (isc_uint8_t*)0) {
+ EVP_DigestFinal(context, digest, NULL);
+ } else {
+ EVP_MD_CTX_cleanup(context);
+ }
+}
+
+#else
+
/*
* UNROLLED TRANSFORM LOOP NOTE:
* You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
@@ -394,13 +553,6 @@ static const isc_uint64_t sha512_initial_hash_value[8] = {
};
#endif
-/*
- * Constant used by SHA256/384/512_End() functions for converting the
- * digest to a readable hexadecimal character string:
- */
-static const char *sha2_hex_digits = "0123456789abcdef";
-
-
/*** SHA-224: *********************************************************/
void
@@ -415,6 +567,11 @@ isc_sha224_init(isc_sha224_t *context) {
}
void
+isc_sha224_invalidate(isc_sha224_t *context) {
+ memset(context, 0, sizeof(isc_sha224_t));
+}
+
+void
isc_sha224_update(isc_sha224_t *context, const isc_uint8_t* data, size_t len) {
isc_sha256_update((isc_sha256_t *)context, data, len);
}
@@ -427,41 +584,6 @@ isc_sha224_final(isc_uint8_t digest[], isc_sha224_t *context) {
memset(sha256_digest, 0, ISC_SHA256_DIGESTLENGTH);
}
-char *
-isc_sha224_end(isc_sha224_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA224_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha224_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha224_final(digest, context);
-
- for (i = 0; i < ISC_SHA224_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
- memset(context, 0, sizeof(context));
- }
- memset(digest, 0, ISC_SHA224_DIGESTLENGTH);
- return buffer;
-}
-
-char*
-isc_sha224_data(const isc_uint8_t *data, size_t len,
- char digest[ISC_SHA224_DIGESTSTRINGLENGTH])
-{
- isc_sha224_t context;
-
- isc_sha224_init(&context);
- isc_sha224_update(&context, data, len);
- return (isc_sha224_end(&context, digest));
-}
-
/*** SHA-256: *********************************************************/
void
isc_sha256_init(isc_sha256_t *context) {
@@ -474,6 +596,11 @@ isc_sha256_init(isc_sha256_t *context) {
context->bitcount = 0;
}
+void
+isc_sha256_invalidate(isc_sha256_t *context) {
+ memset(context, 0, sizeof(isc_sha256_t));
+}
+
#ifdef ISC_SHA2_UNROLL_TRANSFORM
/* Unrolled SHA-256 round macros: */
@@ -565,6 +692,9 @@ void isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
/* Clean up */
a = b = c = d = e = f = g = h = T1 = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+ POST(g); POST(h); POST(T1);
}
#else /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -646,6 +776,9 @@ isc_sha256_transform(isc_sha256_t *context, const isc_uint32_t* data) {
/* Clean up */
a = b = c = d = e = f = g = h = T1 = T2 = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+ POST(g); POST(h); POST(T1); POST(T2);
}
#endif /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -682,6 +815,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
context->bitcount += len << 3;
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
return;
}
}
@@ -700,6 +835,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
}
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
}
void
@@ -768,46 +905,11 @@ isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
}
/* Clean up state data: */
- memset(context, 0, sizeof(context));
+ memset(context, 0, sizeof(*context));
usedspace = 0;
+ POST(usedspace);
}
-char *
-isc_sha256_end(isc_sha256_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA256_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha256_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha256_final(digest, context);
-
- for (i = 0; i < ISC_SHA256_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
- memset(context, 0, sizeof(context));
- }
- memset(digest, 0, ISC_SHA256_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha256_data(const isc_uint8_t* data, size_t len,
- char digest[ISC_SHA256_DIGESTSTRINGLENGTH])
-{
- isc_sha256_t context;
-
- isc_sha256_init(&context);
- isc_sha256_update(&context, data, len);
- return (isc_sha256_end(&context, digest));
-}
-
-
/*** SHA-512: *********************************************************/
void
isc_sha512_init(isc_sha512_t *context) {
@@ -820,6 +922,11 @@ isc_sha512_init(isc_sha512_t *context) {
context->bitcount[0] = context->bitcount[1] = 0;
}
+void
+isc_sha512_invalidate(isc_sha512_t *context) {
+ memset(context, 0, sizeof(isc_sha512_t));
+}
+
#ifdef ISC_SHA2_UNROLL_TRANSFORM
/* Unrolled SHA-512 round macros: */
@@ -907,6 +1014,9 @@ void isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
/* Clean up */
a = b = c = d = e = f = g = h = T1 = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+ POST(g); POST(h); POST(T1);
}
#else /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -986,6 +1096,9 @@ isc_sha512_transform(isc_sha512_t *context, const isc_uint64_t* data) {
/* Clean up */
a = b = c = d = e = f = g = h = T1 = T2 = 0;
+ /* Avoid compiler warnings */
+ POST(a); POST(b); POST(c); POST(d); POST(e); POST(f);
+ POST(g); POST(h); POST(T1); POST(T2);
}
#endif /* ISC_SHA2_UNROLL_TRANSFORM */
@@ -1021,6 +1134,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
ADDINC128(context->bitcount, len << 3);
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
return;
}
}
@@ -1039,6 +1154,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
}
/* Clean up: */
usedspace = freespace = 0;
+ /* Avoid compiler warnings: */
+ POST(usedspace); POST(freespace);
}
void isc_sha512_last(isc_sha512_t *context) {
@@ -1112,42 +1229,7 @@ void isc_sha512_final(isc_uint8_t digest[], isc_sha512_t *context) {
}
/* Zero out state data */
- memset(context, 0, sizeof(context));
-}
-
-char *
-isc_sha512_end(isc_sha512_t *context, char buffer[]) {
- isc_uint8_t digest[ISC_SHA512_DIGESTLENGTH], *d = digest;
- unsigned int i;
-
- /* Sanity check: */
- REQUIRE(context != (isc_sha512_t *)0);
-
- if (buffer != (char*)0) {
- isc_sha512_final(digest, context);
-
- for (i = 0; i < ISC_SHA512_DIGESTLENGTH; i++) {
- *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
- *buffer++ = sha2_hex_digits[*d & 0x0f];
- d++;
- }
- *buffer = (char)0;
- } else {
- memset(context, 0, sizeof(context));
- }
- memset(digest, 0, ISC_SHA512_DIGESTLENGTH);
- return buffer;
-}
-
-char *
-isc_sha512_data(const isc_uint8_t *data, size_t len,
- char digest[ISC_SHA512_DIGESTSTRINGLENGTH])
-{
- isc_sha512_t context;
-
- isc_sha512_init(&context);
- isc_sha512_update(&context, data, len);
- return (isc_sha512_end(&context, digest));
+ memset(context, 0, sizeof(*context));
}
@@ -1164,6 +1246,11 @@ isc_sha384_init(isc_sha384_t *context) {
}
void
+isc_sha384_invalidate(isc_sha384_t *context) {
+ memset(context, 0, sizeof(isc_sha384_t));
+}
+
+void
isc_sha384_update(isc_sha384_t *context, const isc_uint8_t* data, size_t len) {
isc_sha512_update((isc_sha512_t *)context, data, len);
}
@@ -1195,7 +1282,131 @@ isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) {
}
/* Zero out state data */
- memset(context, 0, sizeof(context));
+ memset(context, 0, sizeof(*context));
+}
+#endif /* !ISC_PLATFORM_OPENSSLHASH */
+
+/*
+ * Constant used by SHA256/384/512_End() functions for converting the
+ * digest to a readable hexadecimal character string:
+ */
+static const char *sha2_hex_digits = "0123456789abcdef";
+
+char *
+isc_sha224_end(isc_sha224_t *context, char buffer[]) {
+ isc_uint8_t digest[ISC_SHA224_DIGESTLENGTH], *d = digest;
+ unsigned int i;
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha224_t *)0);
+
+ if (buffer != (char*)0) {
+ isc_sha224_final(digest, context);
+
+ for (i = 0; i < ISC_SHA224_DIGESTLENGTH; i++) {
+ *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+ *buffer++ = sha2_hex_digits[*d & 0x0f];
+ d++;
+ }
+ *buffer = (char)0;
+ } else {
+#ifdef ISC_PLATFORM_OPENSSLHASH
+ EVP_MD_CTX_cleanup(context);
+#else
+ memset(context, 0, sizeof(*context));
+#endif
+ }
+ memset(digest, 0, ISC_SHA224_DIGESTLENGTH);
+ return buffer;
+}
+
+char *
+isc_sha224_data(const isc_uint8_t *data, size_t len,
+ char digest[ISC_SHA224_DIGESTSTRINGLENGTH])
+{
+ isc_sha224_t context;
+
+ isc_sha224_init(&context);
+ isc_sha224_update(&context, data, len);
+ return (isc_sha224_end(&context, digest));
+}
+
+char *
+isc_sha256_end(isc_sha256_t *context, char buffer[]) {
+ isc_uint8_t digest[ISC_SHA256_DIGESTLENGTH], *d = digest;
+ unsigned int i;
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha256_t *)0);
+
+ if (buffer != (char*)0) {
+ isc_sha256_final(digest, context);
+
+ for (i = 0; i < ISC_SHA256_DIGESTLENGTH; i++) {
+ *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+ *buffer++ = sha2_hex_digits[*d & 0x0f];
+ d++;
+ }
+ *buffer = (char)0;
+ } else {
+#ifdef ISC_PLATFORM_OPENSSLHASH
+ EVP_MD_CTX_cleanup(context);
+#else
+ memset(context, 0, sizeof(*context));
+#endif
+ }
+ memset(digest, 0, ISC_SHA256_DIGESTLENGTH);
+ return buffer;
+}
+
+char *
+isc_sha256_data(const isc_uint8_t* data, size_t len,
+ char digest[ISC_SHA256_DIGESTSTRINGLENGTH])
+{
+ isc_sha256_t context;
+
+ isc_sha256_init(&context);
+ isc_sha256_update(&context, data, len);
+ return (isc_sha256_end(&context, digest));
+}
+
+char *
+isc_sha512_end(isc_sha512_t *context, char buffer[]) {
+ isc_uint8_t digest[ISC_SHA512_DIGESTLENGTH], *d = digest;
+ unsigned int i;
+
+ /* Sanity check: */
+ REQUIRE(context != (isc_sha512_t *)0);
+
+ if (buffer != (char*)0) {
+ isc_sha512_final(digest, context);
+
+ for (i = 0; i < ISC_SHA512_DIGESTLENGTH; i++) {
+ *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
+ *buffer++ = sha2_hex_digits[*d & 0x0f];
+ d++;
+ }
+ *buffer = (char)0;
+ } else {
+#ifdef ISC_PLATFORM_OPENSSLHASH
+ EVP_MD_CTX_cleanup(context);
+#else
+ memset(context, 0, sizeof(*context));
+#endif
+ }
+ memset(digest, 0, ISC_SHA512_DIGESTLENGTH);
+ return buffer;
+}
+
+char *
+isc_sha512_data(const isc_uint8_t *data, size_t len,
+ char digest[ISC_SHA512_DIGESTSTRINGLENGTH])
+{
+ isc_sha512_t context;
+
+ isc_sha512_init(&context);
+ isc_sha512_update(&context, data, len);
+ return (isc_sha512_end(&context, digest));
}
char *
@@ -1216,13 +1427,17 @@ isc_sha384_end(isc_sha384_t *context, char buffer[]) {
}
*buffer = (char)0;
} else {
- memset(context, 0, sizeof(context));
+#ifdef ISC_PLATFORM_OPENSSLHASH
+ EVP_MD_CTX_cleanup(context);
+#else
+ memset(context, 0, sizeof(*context));
+#endif
}
memset(digest, 0, ISC_SHA384_DIGESTLENGTH);
return buffer;
}
-char*
+char *
isc_sha384_data(const isc_uint8_t *data, size_t len,
char digest[ISC_SHA384_DIGESTSTRINGLENGTH])
{
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index a0578a0d4bf1..2a7268f96131 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2010-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.70 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -182,6 +182,9 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
isc_result_t result;
isc_buffer_t buf;
+ if (size == 0U)
+ return;
+
isc_buffer_init(&buf, array, size);
result = isc_sockaddr_totext(sa, &buf);
if (result != ISC_R_SUCCESS) {
@@ -217,7 +220,7 @@ isc_sockaddr_hash(const isc_sockaddr_t *sockaddr, isc_boolean_t address_only) {
case AF_INET6:
in6 = &sockaddr->type.sin6.sin6_addr;
if (IN6_IS_ADDR_V4MAPPED(in6)) {
- s = (const unsigned char *)&in6[12];
+ s = (const unsigned char *)&in6 + 12;
length = sizeof(sockaddr->type.sin.sin_addr.s_addr);
} else {
s = (const unsigned char *)in6;
@@ -390,8 +393,8 @@ isc_sockaddr_fromnetaddr(isc_sockaddr_t *sockaddr, const isc_netaddr_t *na,
#endif
sockaddr->type.sin6.sin6_port = htons(port);
break;
- default:
- INSIST(0);
+ default:
+ INSIST(0);
}
ISC_LINK_INIT(sockaddr, link);
}
diff --git a/lib/isc/socket_api.c b/lib/isc/socket_api.c
new file mode 100644
index 000000000000..3394ce059b50
--- /dev/null
+++ b/lib/isc/socket_api.c
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+#include <config.h>
+
+#include <isc/app.h>
+#include <isc/magic.h>
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/socket.h>
+#include <isc/util.h>
+
+static isc_mutex_t createlock;
+static isc_once_t once = ISC_ONCE_INIT;
+static isc_socketmgrcreatefunc_t socketmgr_createfunc = NULL;
+
+static void
+initialize(void) {
+ RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_socket_register(isc_socketmgrcreatefunc_t createfunc) {
+ isc_result_t result = ISC_R_SUCCESS;
+
+ RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
+
+ LOCK(&createlock);
+ if (socketmgr_createfunc == NULL)
+ socketmgr_createfunc = createfunc;
+ else
+ result = ISC_R_EXISTS;
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_socketmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ isc_socketmgr_t **managerp)
+{
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(socketmgr_createfunc != NULL);
+ result = (*socketmgr_createfunc)(mctx, managerp);
+
+ UNLOCK(&createlock);
+
+ if (result == ISC_R_SUCCESS)
+ isc_appctx_setsocketmgr(actx, *managerp);
+
+ return (result);
+}
+
+isc_result_t
+isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(socketmgr_createfunc != NULL);
+ result = (*socketmgr_createfunc)(mctx, managerp);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+void
+isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
+ REQUIRE(managerp != NULL && ISCAPI_SOCKETMGR_VALID(*managerp));
+
+ (*managerp)->methods->destroy(managerp);
+
+ ENSURE(*managerp == NULL);
+}
+
+isc_result_t
+isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp)
+{
+ REQUIRE(ISCAPI_SOCKETMGR_VALID(manager));
+
+ return (manager->methods->socketcreate(manager, pf, type, socketp));
+}
+
+void
+isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+ REQUIRE(socketp != NULL && *socketp == NULL);
+
+ sock->methods->attach(sock, socketp);
+
+ ENSURE(*socketp == sock);
+}
+
+void
+isc_socket_detach(isc_socket_t **socketp) {
+ REQUIRE(socketp != NULL && ISCAPI_SOCKET_VALID(*socketp));
+
+ (*socketp)->methods->detach(socketp);
+
+ ENSURE(*socketp == NULL);
+}
+
+isc_result_t
+isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
+ unsigned int options)
+{
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->bind(sock, sockaddr, options));
+}
+
+isc_result_t
+isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task,
+ isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
+{
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->sendto(sock, region, task, action, arg, address,
+ pktinfo));
+}
+
+isc_result_t
+isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task,
+ isc_taskaction_t action, const void *arg)
+{
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->connect(sock, addr, task, action, arg));
+}
+
+isc_result_t
+isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
+{
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->recv(sock, region, minimum, task, action, arg));
+}
+
+void
+isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ sock->methods->cancel(sock, task, how);
+}
+
+isc_result_t
+isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->getsockname(sock, addressp));
+}
+
+void
+isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ sock->methods->ipv6only(sock, yes);
+}
+
+isc_sockettype_t
+isc_socket_gettype(isc_socket_t *sock) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return (sock->methods->gettype(sock));
+}
+
+void
+isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
+ REQUIRE(ISCAPI_SOCKET_VALID(socket));
+
+ UNUSED(socket); /* in case REQUIRE() is empty */
+ UNUSED(name);
+ UNUSED(tag);
+}
+
+isc_result_t
+isc_socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
+ isc_sockfdwatch_t callback, void *cbarg,
+ isc_task_t *task, isc_socket_t **socketp)
+{
+ REQUIRE(ISCAPI_SOCKETMGR_VALID(manager));
+
+ return (manager->methods->fdwatchcreate(manager, fd, flags,
+ callback, cbarg, task,
+ socketp));
+}
+
+isc_result_t
+isc_socket_fdwatchpoke(isc_socket_t *sock, int flags)
+{
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return(sock->methods->fdwatchpoke(sock, flags));
+}
+
+isc_result_t
+isc_socket_dup(isc_socket_t *sock, isc_socket_t **socketp) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+ REQUIRE(socketp != NULL && *socketp == NULL);
+
+ return(sock->methods->dup(sock, socketp));
+}
+
+int
+isc_socket_getfd(isc_socket_t *sock) {
+ REQUIRE(ISCAPI_SOCKET_VALID(sock));
+
+ return(sock->methods->getfd(sock));
+}
diff --git a/lib/isc/sparc64/include/isc/atomic.h b/lib/isc/sparc64/include/isc/atomic.h
index b92009561593..5533ddb0cc6f 100644
--- a/lib/isc/sparc64/include/isc/atomic.h
+++ b/lib/isc/sparc64/include/isc/atomic.h
@@ -48,7 +48,7 @@
* SUCH DAMAGE.
*
* from: FreeBSD: src/sys/i386/include/atomic.h,v 1.20 2001/02/11
- * $FreeBSD$
+ * $FreeBSD: src/sys/sparc64/include/atomic.h,v 1.8 2004/05/22 00:52:16 marius Exp $
*/
#ifndef ISC_ATOMIC_H
diff --git a/lib/isc/stats.c b/lib/isc/stats.c
index 9e4e089b527d..8b624b2d478d 100644
--- a/lib/isc/stats.c
+++ b/lib/isc/stats.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stats.c,v 1.3.6.2 2009/01/29 23:47:44 tbox Exp $ */
+/* $Id$ */
/*! \file */
diff --git a/lib/isc/string.c b/lib/isc/string.c
index b9c43e7bb150..cba517c568f9 100644
--- a/lib/isc/string.c
+++ b/lib/isc/string.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: string.c,v 1.20 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -165,14 +165,15 @@ isc_string_printf(char *target, size_t size, const char *format, ...) {
}
void
-isc_string_printf_truncate(char *target, size_t size, const char *format, ...) {
+isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
+{
va_list args;
- size_t n;
REQUIRE(size > 0U);
va_start(args, format);
- n = vsnprintf(target, size, format, args);
+ /* check return code? */
+ (void)vsnprintf(target, size, format, args);
va_end(args);
ENSURE(strlen(target) < size);
diff --git a/lib/isc/symtab.c b/lib/isc/symtab.c
index 9f8e798df368..d4c1dccf0ad9 100644
--- a/lib/isc/symtab.c
+++ b/lib/isc/symtab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.c,v 1.30 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -46,6 +46,8 @@ struct isc_symtab {
unsigned int magic;
isc_mem_t * mctx;
unsigned int size;
+ unsigned int count;
+ unsigned int maxload;
eltlist_t * table;
isc_symtabaction_t undefine_action;
void * undefine_arg;
@@ -79,6 +81,8 @@ isc_symtab_create(isc_mem_t *mctx, unsigned int size,
INIT_LIST(symtab->table[i]);
symtab->mctx = mctx;
symtab->size = size;
+ symtab->count = 0;
+ symtab->maxload = size * 3 / 4;
symtab->undefine_action = undefine_action;
symtab->undefine_arg = undefine_arg;
symtab->case_sensitive = case_sensitive;
@@ -181,6 +185,46 @@ isc_symtab_lookup(isc_symtab_t *symtab, const char *key, unsigned int type,
return (ISC_R_SUCCESS);
}
+static void
+grow_table(isc_symtab_t *symtab) {
+ eltlist_t *newtable;
+ unsigned int i, newsize, newmax;
+
+ REQUIRE(symtab != NULL);
+
+ newsize = symtab->size * 2;
+ newmax = newsize * 3 / 4;
+ INSIST(newsize > 0U && newmax > 0U);
+
+ newtable = isc_mem_get(symtab->mctx, newsize * sizeof(eltlist_t));
+ if (newtable == NULL)
+ return;
+
+ for (i = 0; i < newsize; i++)
+ INIT_LIST(newtable[i]);
+
+ for (i = 0; i < symtab->size; i++) {
+ elt_t *elt, *nelt;
+
+ for (elt = HEAD(symtab->table[i]); elt != NULL; elt = nelt) {
+ unsigned int hv;
+
+ nelt = NEXT(elt, link);
+
+ UNLINK(symtab->table[i], elt, link);
+ hv = hash(elt->key, symtab->case_sensitive);
+ APPEND(newtable[hv % newsize], elt, link);
+ }
+ }
+
+ isc_mem_put(symtab->mctx, symtab->table,
+ symtab->size * sizeof(eltlist_t));
+
+ symtab->table = newtable;
+ symtab->size = newsize;
+ symtab->maxload = newmax;
+}
+
isc_result_t
isc_symtab_define(isc_symtab_t *symtab, const char *key, unsigned int type,
isc_symvalue_t value, isc_symexists_t exists_policy)
@@ -208,6 +252,7 @@ isc_symtab_define(isc_symtab_t *symtab, const char *key, unsigned int type,
if (elt == NULL)
return (ISC_R_NOMEMORY);
ISC_LINK_INIT(elt, link);
+ symtab->count++;
}
/*
@@ -226,6 +271,9 @@ isc_symtab_define(isc_symtab_t *symtab, const char *key, unsigned int type,
*/
PREPEND(symtab->table[bucket], elt, link);
+ if (symtab->count > symtab->maxload)
+ grow_table(symtab);
+
return (ISC_R_SUCCESS);
}
@@ -247,6 +295,7 @@ isc_symtab_undefine(isc_symtab_t *symtab, const char *key, unsigned int type) {
elt->value, symtab->undefine_arg);
UNLINK(symtab->table[bucket], elt, link);
isc_mem_put(symtab->mctx, elt, sizeof(*elt));
+ symtab->count--;
return (ISC_R_SUCCESS);
}
diff --git a/lib/isc/task.c b/lib/isc/task.c
index a630173d9405..cd19d2d5270b 100644
--- a/lib/isc/task.c
+++ b/lib/isc/task.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: task.c,v 1.107 2008/03/27 23:46:57 tbox Exp $ */
+/* $Id$ */
/*! \file
* \author Principal Author: Bob Halley
@@ -40,9 +40,31 @@
#include <isc/util.h>
#include <isc/xml.h>
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef OPENSSL_LEAKS
+#include <openssl/err.h>
+#endif
+
+/*%
+ * For BIND9 internal applications:
+ * when built with threads we use multiple worker threads shared by the whole
+ * application.
+ * when built without threads we share a single global task manager and use
+ * an integrated event loop for socket, timer, and other generic task events.
+ * For generic library:
+ * we don't use either of them: an application can have multiple task managers
+ * whether or not it's threaded, and if the application is threaded each thread
+ * is expected to have a separate manager; no "worker threads" are shared by
+ * the application threads.
+ */
+#ifdef BIND9
+#ifdef ISC_PLATFORM_USETHREADS
+#define USE_WORKER_THREADS
+#else
+#define USE_SHARED_MANAGER
+#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* BIND9 */
+
#include "task_p.h"
-#endif /* ISC_PLATFORM_USETHREADS */
#ifdef ISC_TASK_TRACE
#define XTRACE(m) fprintf(stderr, "task %p thread %lu: %s\n", \
@@ -66,7 +88,7 @@ typedef enum {
task_state_done
} task_state_t;
-#ifdef HAVE_LIBXML2
+#if defined(HAVE_LIBXML2) && defined(BIND9)
static const char *statenames[] = {
"idle", "ready", "running", "done",
};
@@ -75,10 +97,13 @@ static const char *statenames[] = {
#define TASK_MAGIC ISC_MAGIC('T', 'A', 'S', 'K')
#define VALID_TASK(t) ISC_MAGIC_VALID(t, TASK_MAGIC)
-struct isc_task {
+typedef struct isc__task isc__task_t;
+typedef struct isc__taskmgr isc__taskmgr_t;
+
+struct isc__task {
/* Not locked. */
- unsigned int magic;
- isc_taskmgr_t * manager;
+ isc_task_t common;
+ isc__taskmgr_t * manager;
isc_mutex_t lock;
/* Locked by task lock. */
task_state_t state;
@@ -91,11 +116,13 @@ struct isc_task {
char name[16];
void * tag;
/* Locked by task manager lock. */
- LINK(isc_task_t) link;
- LINK(isc_task_t) ready_link;
+ LINK(isc__task_t) link;
+ LINK(isc__task_t) ready_link;
+ LINK(isc__task_t) ready_priority_link;
};
#define TASK_F_SHUTTINGDOWN 0x01
+#define TASK_F_PRIVILEGED 0x02
#define TASK_SHUTTINGDOWN(t) (((t)->flags & TASK_F_SHUTTINGDOWN) \
!= 0)
@@ -103,9 +130,11 @@ struct isc_task {
#define TASK_MANAGER_MAGIC ISC_MAGIC('T', 'S', 'K', 'M')
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, TASK_MANAGER_MAGIC)
-struct isc_taskmgr {
+typedef ISC_LIST(isc__task_t) isc__tasklist_t;
+
+struct isc__taskmgr {
/* Not locked. */
- unsigned int magic;
+ isc_taskmgr_t common;
isc_mem_t * mctx;
isc_mutex_t lock;
#ifdef ISC_PLATFORM_USETHREADS
@@ -114,16 +143,20 @@ struct isc_taskmgr {
#endif /* ISC_PLATFORM_USETHREADS */
/* Locked by task manager lock. */
unsigned int default_quantum;
- LIST(isc_task_t) tasks;
- isc_tasklist_t ready_tasks;
+ LIST(isc__task_t) tasks;
+ isc__tasklist_t ready_tasks;
+ isc__tasklist_t ready_priority_tasks;
+ isc_taskmgrmode_t mode;
#ifdef ISC_PLATFORM_USETHREADS
isc_condition_t work_available;
isc_condition_t exclusive_granted;
+ isc_condition_t paused;
#endif /* ISC_PLATFORM_USETHREADS */
unsigned int tasks_running;
+ isc_boolean_t pause_requested;
isc_boolean_t exclusive_requested;
isc_boolean_t exiting;
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef USE_SHARED_MANAGER
unsigned int refs;
#endif /* ISC_PLATFORM_USETHREADS */
};
@@ -132,17 +165,137 @@ struct isc_taskmgr {
#define DEFAULT_DEFAULT_QUANTUM 5
#define FINISHED(m) ((m)->exiting && EMPTY((m)->tasks))
-#ifndef ISC_PLATFORM_USETHREADS
-static isc_taskmgr_t *taskmgr = NULL;
-#endif /* ISC_PLATFORM_USETHREADS */
+#ifdef USE_SHARED_MANAGER
+static isc__taskmgr_t *taskmgr = NULL;
+#endif /* USE_SHARED_MANAGER */
+
+/*%
+ * The following can be either static or public, depending on build environment.
+ */
+
+#ifdef BIND9
+#define ISC_TASKFUNC_SCOPE
+#else
+#define ISC_TASKFUNC_SCOPE static
+#endif
+
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_create(isc_taskmgr_t *manager0, unsigned int quantum,
+ isc_task_t **taskp);
+ISC_TASKFUNC_SCOPE void
+isc__task_attach(isc_task_t *source0, isc_task_t **targetp);
+ISC_TASKFUNC_SCOPE void
+isc__task_detach(isc_task_t **taskp);
+ISC_TASKFUNC_SCOPE void
+isc__task_send(isc_task_t *task0, isc_event_t **eventp);
+ISC_TASKFUNC_SCOPE void
+isc__task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp);
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
+ isc_eventtype_t last, void *tag);
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag);
+ISC_TASKFUNC_SCOPE isc_boolean_t
+isc__task_purgeevent(isc_task_t *task0, isc_event_t *event);
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
+ isc_eventtype_t last, void *tag,
+ isc_eventlist_t *events);
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag, isc_eventlist_t *events);
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
+ const void *arg);
+ISC_TASKFUNC_SCOPE void
+isc__task_shutdown(isc_task_t *task0);
+ISC_TASKFUNC_SCOPE void
+isc__task_destroy(isc_task_t **taskp);
+ISC_TASKFUNC_SCOPE void
+isc__task_setname(isc_task_t *task0, const char *name, void *tag);
+ISC_TASKFUNC_SCOPE const char *
+isc__task_getname(isc_task_t *task0);
+ISC_TASKFUNC_SCOPE void *
+isc__task_gettag(isc_task_t *task0);
+ISC_TASKFUNC_SCOPE void
+isc__task_getcurrenttime(isc_task_t *task0, isc_stdtime_t *t);
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
+ unsigned int default_quantum, isc_taskmgr_t **managerp);
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_destroy(isc_taskmgr_t **managerp);
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_beginexclusive(isc_task_t *task);
+ISC_TASKFUNC_SCOPE void
+isc__task_endexclusive(isc_task_t *task0);
+ISC_TASKFUNC_SCOPE void
+isc__task_setprivilege(isc_task_t *task0, isc_boolean_t priv);
+ISC_TASKFUNC_SCOPE isc_boolean_t
+isc__task_privilege(isc_task_t *task0);
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_setmode(isc_taskmgr_t *manager0, isc_taskmgrmode_t mode);
+ISC_TASKFUNC_SCOPE isc_taskmgrmode_t
+isc__taskmgr_mode(isc_taskmgr_t *manager0);
+
+static inline isc_boolean_t
+empty_readyq(isc__taskmgr_t *manager);
+
+static inline isc__task_t *
+pop_readyq(isc__taskmgr_t *manager);
+
+static inline void
+push_readyq(isc__taskmgr_t *manager, isc__task_t *task);
+
+static struct isc__taskmethods {
+ isc_taskmethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *purgeevent, *unsendrange, *getname, *gettag, *getcurrenttime;
+#endif
+} taskmethods = {
+ {
+ isc__task_attach,
+ isc__task_detach,
+ isc__task_destroy,
+ isc__task_send,
+ isc__task_sendanddetach,
+ isc__task_unsend,
+ isc__task_onshutdown,
+ isc__task_shutdown,
+ isc__task_setname,
+ isc__task_purge,
+ isc__task_purgerange,
+ isc__task_beginexclusive,
+ isc__task_endexclusive,
+ isc__task_setprivilege,
+ isc__task_privilege
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__task_purgeevent, (void *)isc__task_unsendrange,
+ (void *)isc__task_getname, (void *)isc__task_gettag,
+ (void *)isc__task_getcurrenttime
+#endif
+};
+
+static isc_taskmgrmethods_t taskmgrmethods = {
+ isc__taskmgr_destroy,
+ isc__taskmgr_setmode,
+ isc__taskmgr_mode,
+ isc__task_create
+};
/***
*** Tasks.
***/
static void
-task_finished(isc_task_t *task) {
- isc_taskmgr_t *manager = task->manager;
+task_finished(isc__task_t *task) {
+ isc__taskmgr_t *manager = task->manager;
REQUIRE(EMPTY(task->events));
REQUIRE(EMPTY(task->on_shutdown));
@@ -153,7 +306,7 @@ task_finished(isc_task_t *task) {
LOCK(&manager->lock);
UNLINK(manager->tasks, task, link);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
if (FINISHED(manager)) {
/*
* All tasks have completed and the
@@ -163,19 +316,21 @@ task_finished(isc_task_t *task) {
*/
BROADCAST(&manager->work_available);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
UNLOCK(&manager->lock);
DESTROYLOCK(&task->lock);
- task->magic = 0;
+ task->common.impmagic = 0;
+ task->common.magic = 0;
isc_mem_put(manager->mctx, task, sizeof(*task));
}
-isc_result_t
-isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
- isc_task_t **taskp)
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_create(isc_taskmgr_t *manager0, unsigned int quantum,
+ isc_task_t **taskp)
{
- isc_task_t *task;
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+ isc__task_t *task;
isc_boolean_t exiting;
isc_result_t result;
@@ -186,12 +341,14 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
if (task == NULL)
return (ISC_R_NOMEMORY);
XTRACE("isc_task_create");
- task->manager = manager;
result = isc_mutex_init(&task->lock);
if (result != ISC_R_SUCCESS) {
isc_mem_put(manager->mctx, task, sizeof(*task));
return (result);
}
+ LOCK(&manager->lock);
+ LOCK(&task->lock); /* helps coverity analysis noise ratio */
+ task->manager = manager;
task->state = task_state_idle;
task->references = 1;
INIT_LIST(task->events);
@@ -203,6 +360,9 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
task->tag = NULL;
INIT_LINK(task, link);
INIT_LINK(task, ready_link);
+ INIT_LINK(task, ready_priority_link);
+ UNLOCK(&task->lock);
+ UNLOCK(&manager->lock);
exiting = ISC_FALSE;
LOCK(&manager->lock);
@@ -220,14 +380,17 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
return (ISC_R_SHUTTINGDOWN);
}
- task->magic = TASK_MAGIC;
- *taskp = task;
+ task->common.methods = (isc_taskmethods_t *)&taskmethods;
+ task->common.magic = ISCAPI_TASK_MAGIC;
+ task->common.impmagic = TASK_MAGIC;
+ *taskp = (isc_task_t *)task;
return (ISC_R_SUCCESS);
}
-void
-isc_task_attach(isc_task_t *source, isc_task_t **targetp) {
+ISC_TASKFUNC_SCOPE void
+isc__task_attach(isc_task_t *source0, isc_task_t **targetp) {
+ isc__task_t *source = (isc__task_t *)source0;
/*
* Attach *targetp to source.
@@ -242,11 +405,11 @@ isc_task_attach(isc_task_t *source, isc_task_t **targetp) {
source->references++;
UNLOCK(&source->lock);
- *targetp = source;
+ *targetp = (isc_task_t *)source;
}
static inline isc_boolean_t
-task_shutdown(isc_task_t *task) {
+task_shutdown(isc__task_t *task) {
isc_boolean_t was_idle = ISC_FALSE;
isc_event_t *event, *prev;
@@ -267,6 +430,7 @@ task_shutdown(isc_task_t *task) {
}
INSIST(task->state == task_state_ready ||
task->state == task_state_running);
+
/*
* Note that we post shutdown events LIFO.
*/
@@ -282,9 +446,17 @@ task_shutdown(isc_task_t *task) {
return (was_idle);
}
+/*
+ * Moves a task onto the appropriate run queue.
+ *
+ * Caller must NOT hold manager lock.
+ */
static inline void
-task_ready(isc_task_t *task) {
- isc_taskmgr_t *manager = task->manager;
+task_ready(isc__task_t *task) {
+ isc__taskmgr_t *manager = task->manager;
+#ifdef USE_WORKER_THREADS
+ isc_boolean_t has_privilege = isc__task_privilege((isc_task_t *) task);
+#endif /* USE_WORKER_THREADS */
REQUIRE(VALID_MANAGER(manager));
REQUIRE(task->state == task_state_ready);
@@ -292,17 +464,16 @@ task_ready(isc_task_t *task) {
XTRACE("task_ready");
LOCK(&manager->lock);
-
- ENQUEUE(manager->ready_tasks, task, ready_link);
-#ifdef ISC_PLATFORM_USETHREADS
- SIGNAL(&manager->work_available);
-#endif /* ISC_PLATFORM_USETHREADS */
-
+ push_readyq(manager, task);
+#ifdef USE_WORKER_THREADS
+ if (manager->mode == isc_taskmgrmode_normal || has_privilege)
+ SIGNAL(&manager->work_available);
+#endif /* USE_WORKER_THREADS */
UNLOCK(&manager->lock);
}
static inline isc_boolean_t
-task_detach(isc_task_t *task) {
+task_detach(isc__task_t *task) {
/*
* Caller must be holding the task lock.
@@ -330,9 +501,9 @@ task_detach(isc_task_t *task) {
return (ISC_FALSE);
}
-void
-isc_task_detach(isc_task_t **taskp) {
- isc_task_t *task;
+ISC_TASKFUNC_SCOPE void
+isc__task_detach(isc_task_t **taskp) {
+ isc__task_t *task;
isc_boolean_t was_idle;
/*
@@ -340,7 +511,7 @@ isc_task_detach(isc_task_t **taskp) {
*/
REQUIRE(taskp != NULL);
- task = *taskp;
+ task = (isc__task_t *)*taskp;
REQUIRE(VALID_TASK(task));
XTRACE("isc_task_detach");
@@ -356,7 +527,7 @@ isc_task_detach(isc_task_t **taskp) {
}
static inline isc_boolean_t
-task_send(isc_task_t *task, isc_event_t **eventp) {
+task_send(isc__task_t *task, isc_event_t **eventp) {
isc_boolean_t was_idle = ISC_FALSE;
isc_event_t *event;
@@ -385,8 +556,9 @@ task_send(isc_task_t *task, isc_event_t **eventp) {
return (was_idle);
}
-void
-isc_task_send(isc_task_t *task, isc_event_t **eventp) {
+ISC_TASKFUNC_SCOPE void
+isc__task_send(isc_task_t *task0, isc_event_t **eventp) {
+ isc__task_t *task = (isc__task_t *)task0;
isc_boolean_t was_idle;
/*
@@ -426,10 +598,10 @@ isc_task_send(isc_task_t *task, isc_event_t **eventp) {
}
}
-void
-isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
+ISC_TASKFUNC_SCOPE void
+isc__task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
isc_boolean_t idle1, idle2;
- isc_task_t *task;
+ isc__task_t *task;
/*
* Send '*event' to '*taskp' and then detach '*taskp' from its
@@ -437,7 +609,7 @@ isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
*/
REQUIRE(taskp != NULL);
- task = *taskp;
+ task = (isc__task_t *)*taskp;
REQUIRE(VALID_TASK(task));
XTRACE("isc_task_sendanddetach");
@@ -463,7 +635,7 @@ isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
#define PURGE_OK(event) (((event)->ev_attributes & ISC_EVENTATTR_NOPURGE) == 0)
static unsigned int
-dequeue_events(isc_task_t *task, void *sender, isc_eventtype_t first,
+dequeue_events(isc__task_t *task, void *sender, isc_eventtype_t first,
isc_eventtype_t last, void *tag,
isc_eventlist_t *events, isc_boolean_t purging)
{
@@ -502,10 +674,11 @@ dequeue_events(isc_task_t *task, void *sender, isc_eventtype_t first,
return (count);
}
-unsigned int
-isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
- isc_eventtype_t last, void *tag)
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
+ isc_eventtype_t last, void *tag)
{
+ isc__task_t *task = (isc__task_t *)task0;
unsigned int count;
isc_eventlist_t events;
isc_event_t *event, *next_event;
@@ -533,9 +706,9 @@ isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
return (count);
}
-unsigned int
-isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
- void *tag)
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag)
{
/*
* Purge events from a task's event queue.
@@ -543,11 +716,12 @@ isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type,
XTRACE("isc_task_purge");
- return (isc_task_purgerange(task, sender, type, type, tag));
+ return (isc__task_purgerange(task, sender, type, type, tag));
}
-isc_boolean_t
-isc_task_purgeevent(isc_task_t *task, isc_event_t *event) {
+ISC_TASKFUNC_SCOPE isc_boolean_t
+isc__task_purgeevent(isc_task_t *task0, isc_event_t *event) {
+ isc__task_t *task = (isc__task_t *)task0;
isc_event_t *curr_event, *next_event;
/*
@@ -588,10 +762,10 @@ isc_task_purgeevent(isc_task_t *task, isc_event_t *event) {
return (ISC_TRUE);
}
-unsigned int
-isc_task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
- isc_eventtype_t last, void *tag,
- isc_eventlist_t *events)
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
+ isc_eventtype_t last, void *tag,
+ isc_eventlist_t *events)
{
/*
* Remove events from a task's event queue.
@@ -599,13 +773,13 @@ isc_task_unsendrange(isc_task_t *task, void *sender, isc_eventtype_t first,
XTRACE("isc_task_unsendrange");
- return (dequeue_events(task, sender, first, last, tag, events,
- ISC_FALSE));
+ return (dequeue_events((isc__task_t *)task, sender, first,
+ last, tag, events, ISC_FALSE));
}
-unsigned int
-isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
- void *tag, isc_eventlist_t *events)
+ISC_TASKFUNC_SCOPE unsigned int
+isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag, isc_eventlist_t *events)
{
/*
* Remove events from a task's event queue.
@@ -613,13 +787,15 @@ isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
XTRACE("isc_task_unsend");
- return (dequeue_events(task, sender, type, type, tag, events,
- ISC_FALSE));
+ return (dequeue_events((isc__task_t *)task, sender, type,
+ type, tag, events, ISC_FALSE));
}
-isc_result_t
-isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, const void *arg)
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
+ const void *arg)
{
+ isc__task_t *task = (isc__task_t *)task0;
isc_boolean_t disallowed = ISC_FALSE;
isc_result_t result = ISC_R_SUCCESS;
isc_event_t *event;
@@ -655,8 +831,9 @@ isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, const void *arg)
return (result);
}
-void
-isc_task_shutdown(isc_task_t *task) {
+ISC_TASKFUNC_SCOPE void
+isc__task_shutdown(isc_task_t *task0) {
+ isc__task_t *task = (isc__task_t *)task0;
isc_boolean_t was_idle;
/*
@@ -673,8 +850,8 @@ isc_task_shutdown(isc_task_t *task) {
task_ready(task);
}
-void
-isc_task_destroy(isc_task_t **taskp) {
+ISC_TASKFUNC_SCOPE void
+isc__task_destroy(isc_task_t **taskp) {
/*
* Destroy '*taskp'.
@@ -686,8 +863,9 @@ isc_task_destroy(isc_task_t **taskp) {
isc_task_detach(taskp);
}
-void
-isc_task_setname(isc_task_t *task, const char *name, void *tag) {
+ISC_TASKFUNC_SCOPE void
+isc__task_setname(isc_task_t *task0, const char *name, void *tag) {
+ isc__task_t *task = (isc__task_t *)task0;
/*
* Name 'task'.
@@ -702,38 +880,108 @@ isc_task_setname(isc_task_t *task, const char *name, void *tag) {
UNLOCK(&task->lock);
}
-const char *
-isc_task_getname(isc_task_t *task) {
+ISC_TASKFUNC_SCOPE const char *
+isc__task_getname(isc_task_t *task0) {
+ isc__task_t *task = (isc__task_t *)task0;
+
+ REQUIRE(VALID_TASK(task));
+
return (task->name);
}
-void *
-isc_task_gettag(isc_task_t *task) {
+ISC_TASKFUNC_SCOPE void *
+isc__task_gettag(isc_task_t *task0) {
+ isc__task_t *task = (isc__task_t *)task0;
+
+ REQUIRE(VALID_TASK(task));
+
return (task->tag);
}
-void
-isc_task_getcurrenttime(isc_task_t *task, isc_stdtime_t *t) {
+ISC_TASKFUNC_SCOPE void
+isc__task_getcurrenttime(isc_task_t *task0, isc_stdtime_t *t) {
+ isc__task_t *task = (isc__task_t *)task0;
+
REQUIRE(VALID_TASK(task));
REQUIRE(t != NULL);
LOCK(&task->lock);
-
*t = task->now;
-
UNLOCK(&task->lock);
}
/***
*** Task Manager.
***/
+
+/*
+ * Return ISC_TRUE if the current ready list for the manager, which is
+ * either ready_tasks or the ready_priority_tasks, depending on whether
+ * the manager is currently in normal or privileged execution mode.
+ *
+ * Caller must hold the task manager lock.
+ */
+static inline isc_boolean_t
+empty_readyq(isc__taskmgr_t *manager) {
+ isc__tasklist_t queue;
+
+ if (manager->mode == isc_taskmgrmode_normal)
+ queue = manager->ready_tasks;
+ else
+ queue = manager->ready_priority_tasks;
+
+ return (ISC_TF(EMPTY(queue)));
+}
+
+/*
+ * Dequeue and return a pointer to the first task on the current ready
+ * list for the manager.
+ * If the task is privileged, dequeue it from the other ready list
+ * as well.
+ *
+ * Caller must hold the task manager lock.
+ */
+static inline isc__task_t *
+pop_readyq(isc__taskmgr_t *manager) {
+ isc__task_t *task;
+
+ if (manager->mode == isc_taskmgrmode_normal)
+ task = HEAD(manager->ready_tasks);
+ else
+ task = HEAD(manager->ready_priority_tasks);
+
+ if (task != NULL) {
+ DEQUEUE(manager->ready_tasks, task, ready_link);
+ if (ISC_LINK_LINKED(task, ready_priority_link))
+ DEQUEUE(manager->ready_priority_tasks, task,
+ ready_priority_link);
+ }
+
+ return (task);
+}
+
+/*
+ * Push 'task' onto the ready_tasks queue. If 'task' has the privilege
+ * flag set, then also push it onto the ready_priority_tasks queue.
+ *
+ * Caller must hold the task manager lock.
+ */
+static inline void
+push_readyq(isc__taskmgr_t *manager, isc__task_t *task) {
+ ENQUEUE(manager->ready_tasks, task, ready_link);
+ if ((task->flags & TASK_F_PRIVILEGED) != 0)
+ ENQUEUE(manager->ready_priority_tasks, task,
+ ready_priority_link);
+}
+
static void
-dispatch(isc_taskmgr_t *manager) {
- isc_task_t *task;
-#ifndef ISC_PLATFORM_USETHREADS
+dispatch(isc__taskmgr_t *manager) {
+ isc__task_t *task;
+#ifndef USE_WORKER_THREADS
unsigned int total_dispatch_count = 0;
- isc_tasklist_t ready_tasks;
-#endif /* ISC_PLATFORM_USETHREADS */
+ isc__tasklist_t new_ready_tasks;
+ isc__tasklist_t new_priority_tasks;
+#endif /* USE_WORKER_THREADS */
REQUIRE(VALID_MANAGER(manager));
@@ -787,22 +1035,26 @@ dispatch(isc_taskmgr_t *manager) {
* unlocks. The while expression is always protected by the lock.
*/
-#ifndef ISC_PLATFORM_USETHREADS
- ISC_LIST_INIT(ready_tasks);
+#ifndef USE_WORKER_THREADS
+ ISC_LIST_INIT(new_ready_tasks);
+ ISC_LIST_INIT(new_priority_tasks);
#endif
LOCK(&manager->lock);
+
while (!FINISHED(manager)) {
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
/*
* For reasons similar to those given in the comment in
* isc_task_send() above, it is safe for us to dequeue
* the task while only holding the manager lock, and then
* change the task to running state while only holding the
* task lock.
+ *
+ * If a pause has been requested, don't do any work
+ * until it's been released.
*/
- while ((EMPTY(manager->ready_tasks) ||
- manager->exclusive_requested) &&
- !FINISHED(manager))
+ while ((empty_readyq(manager) || manager->pause_requested ||
+ manager->exclusive_requested) && !FINISHED(manager))
{
XTHREADTRACE(isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
@@ -812,15 +1064,15 @@ dispatch(isc_taskmgr_t *manager) {
ISC_MSGSET_TASK,
ISC_MSG_AWAKE, "awake"));
}
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_WORKER_THREADS */
if (total_dispatch_count >= DEFAULT_TASKMGR_QUANTUM ||
- EMPTY(manager->ready_tasks))
+ empty_readyq(manager))
break;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TASK,
ISC_MSG_WORKING, "working"));
- task = HEAD(manager->ready_tasks);
+ task = pop_readyq(manager);
if (task != NULL) {
unsigned int dispatch_count = 0;
isc_boolean_t done = ISC_FALSE;
@@ -835,7 +1087,6 @@ dispatch(isc_taskmgr_t *manager) {
* have a task to do. We must reacquire the manager
* lock before exiting the 'if (task != NULL)' block.
*/
- DEQUEUE(manager->ready_tasks, task, ready_link);
manager->tasks_running++;
UNLOCK(&manager->lock);
@@ -859,13 +1110,15 @@ dispatch(isc_taskmgr_t *manager) {
"execute action"));
if (event->ev_action != NULL) {
UNLOCK(&task->lock);
- (event->ev_action)(task,event);
+ (event->ev_action)(
+ (isc_task_t *)task,
+ event);
LOCK(&task->lock);
}
dispatch_count++;
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_WORKER_THREADS
total_dispatch_count++;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
}
if (task->references == 0 &&
@@ -950,12 +1203,15 @@ dispatch(isc_taskmgr_t *manager) {
LOCK(&manager->lock);
manager->tasks_running--;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
if (manager->exclusive_requested &&
manager->tasks_running == 1) {
SIGNAL(&manager->exclusive_granted);
+ } else if (manager->pause_requested &&
+ manager->tasks_running == 0) {
+ SIGNAL(&manager->paused);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
if (requeue) {
/*
* We know we're awake, so we don't have
@@ -976,28 +1232,50 @@ dispatch(isc_taskmgr_t *manager) {
* were usually nonempty, the 'optimization'
* might even hurt rather than help.
*/
-#ifdef ISC_PLATFORM_USETHREADS
- ENQUEUE(manager->ready_tasks, task,
- ready_link);
+#ifdef USE_WORKER_THREADS
+ push_readyq(manager, task);
#else
- ENQUEUE(ready_tasks, task, ready_link);
+ ENQUEUE(new_ready_tasks, task, ready_link);
+ if ((task->flags & TASK_F_PRIVILEGED) != 0)
+ ENQUEUE(new_priority_tasks, task,
+ ready_priority_link);
#endif
}
}
+
+#ifdef USE_WORKER_THREADS
+ /*
+ * If we are in privileged execution mode and there are no
+ * tasks remaining on the current ready queue, then
+ * we're stuck. Automatically drop privileges at that
+ * point and continue with the regular ready queue.
+ */
+ if (manager->tasks_running == 0 && empty_readyq(manager)) {
+ manager->mode = isc_taskmgrmode_normal;
+ if (!empty_readyq(manager))
+ BROADCAST(&manager->work_available);
+ }
+#endif
}
-#ifndef ISC_PLATFORM_USETHREADS
- ISC_LIST_APPENDLIST(manager->ready_tasks, ready_tasks, ready_link);
+
+#ifndef USE_WORKER_THREADS
+ ISC_LIST_APPENDLIST(manager->ready_tasks, new_ready_tasks, ready_link);
+ ISC_LIST_APPENDLIST(manager->ready_priority_tasks, new_priority_tasks,
+ ready_priority_link);
+ if (empty_readyq(manager))
+ manager->mode = isc_taskmgrmode_normal;
#endif
+
UNLOCK(&manager->lock);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
static isc_threadresult_t
#ifdef _WIN32
WINAPI
#endif
run(void *uap) {
- isc_taskmgr_t *manager = uap;
+ isc__taskmgr_t *manager = uap;
XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_STARTING, "starting"));
@@ -1007,33 +1285,45 @@ run(void *uap) {
XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_EXITING, "exiting"));
+#ifdef OPENSSL_LEAKS
+ ERR_remove_state(0);
+#endif
+
return ((isc_threadresult_t)0);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
static void
-manager_free(isc_taskmgr_t *manager) {
+manager_free(isc__taskmgr_t *manager) {
isc_mem_t *mctx;
-#ifdef ISC_PLATFORM_USETHREADS
+ LOCK(&manager->lock);
+#ifdef USE_WORKER_THREADS
(void)isc_condition_destroy(&manager->exclusive_granted);
(void)isc_condition_destroy(&manager->work_available);
+ (void)isc_condition_destroy(&manager->paused);
isc_mem_free(manager->mctx, manager->threads);
-#endif /* ISC_PLATFORM_USETHREADS */
- DESTROYLOCK(&manager->lock);
- manager->magic = 0;
+#endif /* USE_WORKER_THREADS */
+ manager->common.impmagic = 0;
+ manager->common.magic = 0;
mctx = manager->mctx;
+ UNLOCK(&manager->lock);
+ DESTROYLOCK(&manager->lock);
isc_mem_put(mctx, manager, sizeof(*manager));
isc_mem_detach(&mctx);
+
+#ifdef USE_SHARED_MANAGER
+ taskmgr = NULL;
+#endif /* USE_SHARED_MANAGER */
}
-isc_result_t
-isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
- unsigned int default_quantum, isc_taskmgr_t **managerp)
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
+ unsigned int default_quantum, isc_taskmgr_t **managerp)
{
isc_result_t result;
unsigned int i, started = 0;
- isc_taskmgr_t *manager;
+ isc__taskmgr_t *manager;
/*
* Create a new task manager.
@@ -1042,28 +1332,35 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
REQUIRE(workers > 0);
REQUIRE(managerp != NULL && *managerp == NULL);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_WORKER_THREADS
UNUSED(i);
UNUSED(started);
- UNUSED(workers);
+#endif
+#ifdef USE_SHARED_MANAGER
if (taskmgr != NULL) {
+ if (taskmgr->refs == 0)
+ return (ISC_R_SHUTTINGDOWN);
taskmgr->refs++;
- *managerp = taskmgr;
+ *managerp = (isc_taskmgr_t *)taskmgr;
return (ISC_R_SUCCESS);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
manager = isc_mem_get(mctx, sizeof(*manager));
if (manager == NULL)
return (ISC_R_NOMEMORY);
- manager->magic = TASK_MANAGER_MAGIC;
+ manager->common.methods = &taskmgrmethods;
+ manager->common.impmagic = TASK_MANAGER_MAGIC;
+ manager->common.magic = ISCAPI_TASKMGR_MAGIC;
+ manager->mode = isc_taskmgrmode_normal;
manager->mctx = NULL;
result = isc_mutex_init(&manager->lock);
if (result != ISC_R_SUCCESS)
goto cleanup_mgr;
+ LOCK(&manager->lock);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
manager->workers = 0;
manager->threads = isc_mem_allocate(mctx,
workers * sizeof(isc_thread_t));
@@ -1087,20 +1384,29 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
result = ISC_R_UNEXPECTED;
goto cleanup_workavailable;
}
-#endif /* ISC_PLATFORM_USETHREADS */
+ if (isc_condition_init(&manager->paused) != ISC_R_SUCCESS) {
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_condition_init() %s",
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"));
+ result = ISC_R_UNEXPECTED;
+ goto cleanup_exclusivegranted;
+ }
+#endif /* USE_WORKER_THREADS */
if (default_quantum == 0)
default_quantum = DEFAULT_DEFAULT_QUANTUM;
manager->default_quantum = default_quantum;
INIT_LIST(manager->tasks);
INIT_LIST(manager->ready_tasks);
+ INIT_LIST(manager->ready_priority_tasks);
manager->tasks_running = 0;
manager->exclusive_requested = ISC_FALSE;
+ manager->pause_requested = ISC_FALSE;
manager->exiting = ISC_FALSE;
isc_mem_attach(mctx, &manager->mctx);
-#ifdef ISC_PLATFORM_USETHREADS
- LOCK(&manager->lock);
+#ifdef USE_WORKER_THREADS
/*
* Start workers.
*/
@@ -1119,21 +1425,26 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
return (ISC_R_NOTHREADS);
}
isc_thread_setconcurrency(workers);
-#else /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WORKER_THREADS */
+#ifdef USE_SHARED_MANAGER
manager->refs = 1;
+ UNLOCK(&manager->lock);
taskmgr = manager;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
- *managerp = manager;
+ *managerp = (isc_taskmgr_t *)manager;
return (ISC_R_SUCCESS);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
+ cleanup_exclusivegranted:
+ (void)isc_condition_destroy(&manager->exclusive_granted);
cleanup_workavailable:
(void)isc_condition_destroy(&manager->work_available);
cleanup_threads:
isc_mem_free(mctx, manager->threads);
cleanup_lock:
+ UNLOCK(&manager->lock);
DESTROYLOCK(&manager->lock);
#endif
cleanup_mgr:
@@ -1141,10 +1452,10 @@ isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
return (result);
}
-void
-isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
- isc_taskmgr_t *manager;
- isc_task_t *task;
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_destroy(isc_taskmgr_t **managerp) {
+ isc__taskmgr_t *manager;
+ isc__task_t *task;
unsigned int i;
/*
@@ -1152,18 +1463,20 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
*/
REQUIRE(managerp != NULL);
- manager = *managerp;
+ manager = (isc__taskmgr_t *)*managerp;
REQUIRE(VALID_MANAGER(manager));
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_WORKER_THREADS
UNUSED(i);
+#endif /* USE_WORKER_THREADS */
- if (manager->refs > 1) {
- manager->refs--;
+#ifdef USE_SHARED_MANAGER
+ manager->refs--;
+ if (manager->refs > 0) {
*managerp = NULL;
return;
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif
XTHREADTRACE("isc_taskmgr_destroy");
/*
@@ -1192,6 +1505,11 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
manager->exiting = ISC_TRUE;
/*
+ * If privileged mode was on, turn it off.
+ */
+ manager->mode = isc_taskmgrmode_normal;
+
+ /*
* Post shutdown event(s) to every task (if they haven't already been
* posted).
*/
@@ -1200,10 +1518,10 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
task = NEXT(task, link)) {
LOCK(&task->lock);
if (task_shutdown(task))
- ENQUEUE(manager->ready_tasks, task, ready_link);
+ push_readyq(manager, task);
UNLOCK(&task->lock);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WORKER_THREADS
/*
* Wake up any sleeping workers. This ensures we get work done if
* there's work left to do, and if there are already no tasks left
@@ -1217,36 +1535,76 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
*/
for (i = 0; i < manager->workers; i++)
(void)isc_thread_join(manager->threads[i], NULL);
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_WORKER_THREADS */
/*
* Dispatch the shutdown events.
*/
UNLOCK(&manager->lock);
- while (isc__taskmgr_ready())
- (void)isc__taskmgr_dispatch();
+ while (isc__taskmgr_ready((isc_taskmgr_t *)manager))
+ (void)isc__taskmgr_dispatch((isc_taskmgr_t *)manager);
+#ifdef BIND9
if (!ISC_LIST_EMPTY(manager->tasks))
isc_mem_printallactive(stderr);
+#endif
INSIST(ISC_LIST_EMPTY(manager->tasks));
-#endif /* ISC_PLATFORM_USETHREADS */
+#ifdef USE_SHARED_MANAGER
+ taskmgr = NULL;
+#endif
+#endif /* USE_WORKER_THREADS */
manager_free(manager);
*managerp = NULL;
}
-#ifndef ISC_PLATFORM_USETHREADS
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_setmode(isc_taskmgr_t *manager0, isc_taskmgrmode_t mode) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+
+ LOCK(&manager->lock);
+ manager->mode = mode;
+ UNLOCK(&manager->lock);
+}
+
+ISC_TASKFUNC_SCOPE isc_taskmgrmode_t
+isc__taskmgr_mode(isc_taskmgr_t *manager0) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+ isc_taskmgrmode_t mode;
+ LOCK(&manager->lock);
+ mode = manager->mode;
+ UNLOCK(&manager->lock);
+ return (mode);
+}
+
+#ifndef USE_WORKER_THREADS
isc_boolean_t
-isc__taskmgr_ready(void) {
- if (taskmgr == NULL)
+isc__taskmgr_ready(isc_taskmgr_t *manager0) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+ isc_boolean_t is_ready;
+
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = taskmgr;
+#endif
+ if (manager == NULL)
return (ISC_FALSE);
- return (ISC_TF(!ISC_LIST_EMPTY(taskmgr->ready_tasks)));
+
+ LOCK(&manager->lock);
+ is_ready = !empty_readyq(manager);
+ UNLOCK(&manager->lock);
+
+ return (is_ready);
}
isc_result_t
-isc__taskmgr_dispatch(void) {
- isc_taskmgr_t *manager = taskmgr;
+isc__taskmgr_dispatch(isc_taskmgr_t *manager0) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
- if (taskmgr == NULL)
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = taskmgr;
+#endif
+ if (manager == NULL)
return (ISC_R_NOTFOUND);
dispatch(manager);
@@ -1254,12 +1612,36 @@ isc__taskmgr_dispatch(void) {
return (ISC_R_SUCCESS);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#else
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_pause(isc_taskmgr_t *manager0) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+ LOCK(&manager->lock);
+ while (manager->tasks_running > 0) {
+ WAIT(&manager->paused, &manager->lock);
+ }
+ manager->pause_requested = ISC_TRUE;
+ UNLOCK(&manager->lock);
+}
-isc_result_t
-isc_task_beginexclusive(isc_task_t *task) {
-#ifdef ISC_PLATFORM_USETHREADS
- isc_taskmgr_t *manager = task->manager;
+ISC_TASKFUNC_SCOPE void
+isc__taskmgr_resume(isc_taskmgr_t *manager0) {
+ isc__taskmgr_t *manager = (isc__taskmgr_t *)manager0;
+
+ LOCK(&manager->lock);
+ if (manager->pause_requested) {
+ manager->pause_requested = ISC_FALSE;
+ BROADCAST(&manager->work_available);
+ }
+ UNLOCK(&manager->lock);
+}
+#endif /* USE_WORKER_THREADS */
+
+ISC_TASKFUNC_SCOPE isc_result_t
+isc__task_beginexclusive(isc_task_t *task0) {
+#ifdef USE_WORKER_THREADS
+ isc__task_t *task = (isc__task_t *)task0;
+ isc__taskmgr_t *manager = task->manager;
REQUIRE(task->state == task_state_running);
LOCK(&manager->lock);
if (manager->exclusive_requested) {
@@ -1272,15 +1654,17 @@ isc_task_beginexclusive(isc_task_t *task) {
}
UNLOCK(&manager->lock);
#else
- UNUSED(task);
+ UNUSED(task0);
#endif
return (ISC_R_SUCCESS);
}
-void
-isc_task_endexclusive(isc_task_t *task) {
-#ifdef ISC_PLATFORM_USETHREADS
- isc_taskmgr_t *manager = task->manager;
+ISC_TASKFUNC_SCOPE void
+isc__task_endexclusive(isc_task_t *task0) {
+#ifdef USE_WORKER_THREADS
+ isc__task_t *task = (isc__task_t *)task0;
+ isc__taskmgr_t *manager = task->manager;
+
REQUIRE(task->state == task_state_running);
LOCK(&manager->lock);
REQUIRE(manager->exclusive_requested);
@@ -1288,16 +1672,69 @@ isc_task_endexclusive(isc_task_t *task) {
BROADCAST(&manager->work_available);
UNLOCK(&manager->lock);
#else
- UNUSED(task);
+ UNUSED(task0);
+#endif
+}
+
+ISC_TASKFUNC_SCOPE void
+isc__task_setprivilege(isc_task_t *task0, isc_boolean_t priv) {
+ isc__task_t *task = (isc__task_t *)task0;
+ isc__taskmgr_t *manager = task->manager;
+ isc_boolean_t oldpriv;
+
+ LOCK(&task->lock);
+ oldpriv = ISC_TF((task->flags & TASK_F_PRIVILEGED) != 0);
+ if (priv)
+ task->flags |= TASK_F_PRIVILEGED;
+ else
+ task->flags &= ~TASK_F_PRIVILEGED;
+ UNLOCK(&task->lock);
+
+ if (priv == oldpriv)
+ return;
+
+ LOCK(&manager->lock);
+ if (priv && ISC_LINK_LINKED(task, ready_link))
+ ENQUEUE(manager->ready_priority_tasks, task,
+ ready_priority_link);
+ else if (!priv && ISC_LINK_LINKED(task, ready_priority_link))
+ DEQUEUE(manager->ready_priority_tasks, task,
+ ready_priority_link);
+ UNLOCK(&manager->lock);
+}
+
+ISC_TASKFUNC_SCOPE isc_boolean_t
+isc__task_privilege(isc_task_t *task0) {
+ isc__task_t *task = (isc__task_t *)task0;
+ isc_boolean_t priv;
+
+ LOCK(&task->lock);
+ priv = ISC_TF((task->flags & TASK_F_PRIVILEGED) != 0);
+ UNLOCK(&task->lock);
+ return (priv);
+}
+
+#ifdef USE_SOCKETIMPREGISTER
+isc_result_t
+isc__task_register() {
+ return (isc_task_register(isc__taskmgr_create));
+}
#endif
+
+isc_boolean_t
+isc_task_exiting(isc_task_t *t) {
+ isc__task_t *task = (isc__task_t *)t;
+
+ REQUIRE(VALID_TASK(task));
+ return (TASK_SHUTTINGDOWN(task));
}
-#ifdef HAVE_LIBXML2
+#if defined(HAVE_LIBXML2) && defined(BIND9)
void
-isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer)
-{
- isc_task_t *task;
+isc_taskmgr_renderxml(isc_taskmgr_t *mgr0, xmlTextWriterPtr writer) {
+ isc__taskmgr_t *mgr = (isc__taskmgr_t *)mgr0;
+ isc__task_t *task;
LOCK(&mgr->lock);
@@ -1373,4 +1810,4 @@ isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer)
UNLOCK(&mgr->lock);
}
-#endif /* HAVE_LIBXML2 */
+#endif /* HAVE_LIBXML2 && BIND9 */
diff --git a/lib/isc/task_api.c b/lib/isc/task_api.c
new file mode 100644
index 000000000000..34510ff64c47
--- /dev/null
+++ b/lib/isc/task_api.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <isc/app.h>
+#include <isc/magic.h>
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/task.h>
+#include <isc/util.h>
+
+static isc_mutex_t createlock;
+static isc_once_t once = ISC_ONCE_INIT;
+static isc_taskmgrcreatefunc_t taskmgr_createfunc = NULL;
+
+static void
+initialize(void) {
+ RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_task_register(isc_taskmgrcreatefunc_t createfunc) {
+ isc_result_t result = ISC_R_SUCCESS;
+
+ RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
+
+ LOCK(&createlock);
+ if (taskmgr_createfunc == NULL)
+ taskmgr_createfunc = createfunc;
+ else
+ result = ISC_R_EXISTS;
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_taskmgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ unsigned int workers, unsigned int default_quantum,
+ isc_taskmgr_t **managerp)
+{
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(taskmgr_createfunc != NULL);
+ result = (*taskmgr_createfunc)(mctx, workers, default_quantum,
+ managerp);
+
+ UNLOCK(&createlock);
+
+ if (result == ISC_R_SUCCESS)
+ isc_appctx_settaskmgr(actx, *managerp);
+
+ return (result);
+}
+
+isc_result_t
+isc_taskmgr_create(isc_mem_t *mctx, unsigned int workers,
+ unsigned int default_quantum, isc_taskmgr_t **managerp)
+{
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(taskmgr_createfunc != NULL);
+ result = (*taskmgr_createfunc)(mctx, workers, default_quantum,
+ managerp);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+void
+isc_taskmgr_destroy(isc_taskmgr_t **managerp) {
+ REQUIRE(managerp != NULL && ISCAPI_TASKMGR_VALID(*managerp));
+
+ (*managerp)->methods->destroy(managerp);
+
+ ENSURE(*managerp == NULL);
+}
+
+void
+isc_taskmgr_setmode(isc_taskmgr_t *manager, isc_taskmgrmode_t mode) {
+ REQUIRE(ISCAPI_TASKMGR_VALID(manager));
+
+ manager->methods->setmode(manager, mode);
+}
+
+isc_taskmgrmode_t
+isc_taskmgr_mode(isc_taskmgr_t *manager) {
+ REQUIRE(ISCAPI_TASKMGR_VALID(manager));
+
+ return (manager->methods->mode(manager));
+}
+
+isc_result_t
+isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
+ isc_task_t **taskp)
+{
+ REQUIRE(ISCAPI_TASKMGR_VALID(manager));
+ REQUIRE(taskp != NULL && *taskp == NULL);
+
+ return (manager->methods->taskcreate(manager, quantum, taskp));
+}
+
+void
+isc_task_attach(isc_task_t *source, isc_task_t **targetp) {
+ REQUIRE(ISCAPI_TASK_VALID(source));
+ REQUIRE(targetp != NULL && *targetp == NULL);
+
+ source->methods->attach(source, targetp);
+
+ ENSURE(*targetp == source);
+}
+
+void
+isc_task_detach(isc_task_t **taskp) {
+ REQUIRE(taskp != NULL && ISCAPI_TASK_VALID(*taskp));
+
+ (*taskp)->methods->detach(taskp);
+
+ ENSURE(*taskp == NULL);
+}
+
+void
+isc_task_send(isc_task_t *task, isc_event_t **eventp) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+ REQUIRE(eventp != NULL && *eventp != NULL);
+
+ task->methods->send(task, eventp);
+
+ ENSURE(*eventp == NULL);
+}
+
+void
+isc_task_sendanddetach(isc_task_t **taskp, isc_event_t **eventp) {
+ REQUIRE(taskp != NULL && ISCAPI_TASK_VALID(*taskp));
+ REQUIRE(eventp != NULL && *eventp != NULL);
+
+ (*taskp)->methods->sendanddetach(taskp, eventp);
+
+ ENSURE(*taskp == NULL && *eventp == NULL);
+}
+
+unsigned int
+isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type,
+ void *tag, isc_eventlist_t *events)
+{
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->unsend(task, sender, type, tag, events));
+}
+
+isc_result_t
+isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, const void *arg)
+{
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->onshutdown(task, action, arg));
+}
+
+void
+isc_task_shutdown(isc_task_t *task) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ task->methods->shutdown(task);
+}
+
+void
+isc_task_setname(isc_task_t *task, const char *name, void *tag) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ task->methods->setname(task, name, tag);
+}
+
+unsigned int
+isc_task_purge(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag)
+{
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->purgeevents(task, sender, type, tag));
+}
+
+isc_result_t
+isc_task_beginexclusive(isc_task_t *task) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->beginexclusive(task));
+}
+
+void
+isc_task_endexclusive(isc_task_t *task) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ task->methods->endexclusive(task);
+}
+
+void
+isc_task_setprivilege(isc_task_t *task, isc_boolean_t priv) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ task->methods->setprivilege(task, priv);
+}
+
+isc_boolean_t
+isc_task_privilege(isc_task_t *task) {
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->privilege(task));
+}
+
+
+/*%
+ * This is necessary for libisc's internal timer implementation. Other
+ * implementation might skip implementing this.
+ */
+unsigned int
+isc_task_purgerange(isc_task_t *task, void *sender, isc_eventtype_t first,
+ isc_eventtype_t last, void *tag)
+{
+ REQUIRE(ISCAPI_TASK_VALID(task));
+
+ return (task->methods->purgerange(task, sender, first, last, tag));
+}
diff --git a/lib/isc/task_p.h b/lib/isc/task_p.h
index c88810390890..8c1e4c52fa4c 100644
--- a/lib/isc/task_p.h
+++ b/lib/isc/task_p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,17 +15,25 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: task_p.h,v 1.11 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_TASK_P_H
#define ISC_TASK_P_H
/*! \file */
+#if defined(BIND9) && defined(ISC_PLATFORM_USETHREADS)
+void
+isc__taskmgr_pause(isc_taskmgr_t *taskmgr);
+
+void
+isc__taskmgr_resume(isc_taskmgr_t *taskmgr);
+#else
isc_boolean_t
-isc__taskmgr_ready(void);
+isc__taskmgr_ready(isc_taskmgr_t *taskmgr);
isc_result_t
-isc__taskmgr_dispatch(void);
+isc__taskmgr_dispatch(isc_taskmgr_t *taskmgr);
+#endif /* !BIND9 || !ISC_PLATFORM_USETHREADS */
#endif /* ISC_TASK_P_H */
diff --git a/lib/isc/taskpool.c b/lib/isc/taskpool.c
index d9c2fbe2f31a..25d951682889 100644
--- a/lib/isc/taskpool.c
+++ b/lib/isc/taskpool.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,13 +15,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: taskpool.c,v 1.18 2007/06/18 23:47:44 tbox Exp $ */
+/* $Id$ */
/*! \file */
#include <config.h>
#include <isc/mem.h>
+#include <isc/random.h>
#include <isc/taskpool.h>
#include <isc/util.h>
@@ -31,28 +32,30 @@
struct isc_taskpool {
isc_mem_t * mctx;
+ isc_taskmgr_t * tmgr;
unsigned int ntasks;
+ unsigned int quantum;
isc_task_t ** tasks;
};
+
/***
*** Functions.
***/
-isc_result_t
-isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
- unsigned int ntasks, unsigned int quantum,
- isc_taskpool_t **poolp)
+static isc_result_t
+alloc_pool(isc_taskmgr_t *tmgr, isc_mem_t *mctx, unsigned int ntasks,
+ unsigned int quantum, isc_taskpool_t **poolp)
{
- unsigned int i;
isc_taskpool_t *pool;
- isc_result_t result;
+ unsigned int i;
- INSIST(ntasks > 0);
pool = isc_mem_get(mctx, sizeof(*pool));
if (pool == NULL)
return (ISC_R_NOMEMORY);
pool->mctx = mctx;
pool->ntasks = ntasks;
+ pool->quantum = quantum;
+ pool->tmgr = tmgr;
pool->tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *));
if (pool->tasks == NULL) {
isc_mem_put(mctx, pool, sizeof(*pool));
@@ -60,6 +63,28 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
}
for (i = 0; i < ntasks; i++)
pool->tasks[i] = NULL;
+
+ *poolp = pool;
+ return (ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
+ unsigned int ntasks, unsigned int quantum,
+ isc_taskpool_t **poolp)
+{
+ unsigned int i;
+ isc_taskpool_t *pool = NULL;
+ isc_result_t result;
+
+ INSIST(ntasks > 0);
+
+ /* Allocate the pool structure */
+ result = alloc_pool(tmgr, mctx, ntasks, quantum, &pool);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+
+ /* Create the tasks */
for (i = 0; i < ntasks; i++) {
result = isc_task_create(tmgr, quantum, &pool->tasks[i]);
if (result != ISC_R_SUCCESS) {
@@ -68,14 +93,69 @@ isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx,
}
isc_task_setname(pool->tasks[i], "taskpool", NULL);
}
+
*poolp = pool;
return (ISC_R_SUCCESS);
}
-void isc_taskpool_gettask(isc_taskpool_t *pool, unsigned int hash,
- isc_task_t **targetp)
+void
+isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp) {
+ isc_uint32_t i;
+ isc_random_get(&i);
+ isc_task_attach(pool->tasks[i % pool->ntasks], targetp);
+}
+
+int
+isc_taskpool_size(isc_taskpool_t *pool) {
+ REQUIRE(pool != NULL);
+ return (pool->ntasks);
+}
+
+isc_result_t
+isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size,
+ isc_taskpool_t **targetp)
{
- isc_task_attach(pool->tasks[hash % pool->ntasks], targetp);
+ isc_result_t result;
+ isc_taskpool_t *pool;
+
+ REQUIRE(sourcep != NULL && *sourcep != NULL);
+ REQUIRE(targetp != NULL && *targetp == NULL);
+
+ pool = *sourcep;
+ if (size > pool->ntasks) {
+ isc_taskpool_t *newpool = NULL;
+ unsigned int i;
+
+ /* Allocate a new pool structure */
+ result = alloc_pool(pool->tmgr, pool->mctx, size,
+ pool->quantum, &newpool);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+
+ /* Copy over the tasks from the old pool */
+ for (i = 0; i < pool->ntasks; i++) {
+ newpool->tasks[i] = pool->tasks[i];
+ pool->tasks[i] = NULL;
+ }
+
+ /* Create new tasks */
+ for (i = pool->ntasks; i < size; i++) {
+ result = isc_task_create(pool->tmgr, pool->quantum,
+ &newpool->tasks[i]);
+ if (result != ISC_R_SUCCESS) {
+ isc_taskpool_destroy(&newpool);
+ return (result);
+ }
+ isc_task_setname(newpool->tasks[i], "taskpool", NULL);
+ }
+
+ isc_taskpool_destroy(&pool);
+ pool = newpool;
+ }
+
+ *sourcep = NULL;
+ *targetp = pool;
+ return (ISC_R_SUCCESS);
}
void
@@ -83,9 +163,8 @@ isc_taskpool_destroy(isc_taskpool_t **poolp) {
unsigned int i;
isc_taskpool_t *pool = *poolp;
for (i = 0; i < pool->ntasks; i++) {
- if (pool->tasks[i] != NULL) {
+ if (pool->tasks[i] != NULL)
isc_task_detach(&pool->tasks[i]);
- }
}
isc_mem_put(pool->mctx, pool->tasks,
pool->ntasks * sizeof(isc_task_t *));
@@ -93,4 +172,14 @@ isc_taskpool_destroy(isc_taskpool_t **poolp) {
*poolp = NULL;
}
+void
+isc_taskpool_setprivilege(isc_taskpool_t *pool, isc_boolean_t priv) {
+ unsigned int i;
+
+ REQUIRE(pool != NULL);
+ for (i = 0; i < pool->ntasks; i++) {
+ if (pool->tasks[i] != NULL)
+ isc_task_setprivilege(pool->tasks[i], priv);
+ }
+}
diff --git a/lib/isc/tests/Atffile b/lib/isc/tests/Atffile
new file mode 100644
index 000000000000..c3e044f41a84
--- /dev/null
+++ b/lib/isc/tests/Atffile
@@ -0,0 +1,5 @@
+Content-Type: application/X-atf-atffile; version="1"
+
+prop: test-suite = bind9
+
+tp-glob: *_test
diff --git a/lib/isc/tests/hash_test.c b/lib/isc/tests/hash_test.c
new file mode 100644
index 000000000000..836d7b67abc7
--- /dev/null
+++ b/lib/isc/tests/hash_test.c
@@ -0,0 +1,1805 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/* ! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <isc/hmacmd5.h>
+#include <isc/hmacsha.h>
+#include <isc/md5.h>
+#include <isc/sha1.h>
+#include <isc/util.h>
+#include <isc/string.h>
+
+/*
+ * Test data from RFC6234
+ */
+
+unsigned char digest[ISC_SHA512_DIGESTLENGTH];
+unsigned char buffer[1024];
+const char *s;
+char str[ISC_SHA512_DIGESTLENGTH];
+unsigned char key[20];
+int i = 0;
+
+isc_result_t
+tohexstr(unsigned char *d, unsigned int len, char *out);
+/*
+ * Precondition: a hexadecimal number in *d, the length of that number in len,
+ * and a pointer to a character array to put the output (*out).
+ * Postcondition: A String representation of the given hexadecimal number is
+ * placed into the array *out
+ *
+ * 'out' MUST point to an array of at least len / 2 + 1
+ *
+ * Return values: ISC_R_SUCCESS if the operation is sucessful
+ */
+
+isc_result_t
+tohexstr(unsigned char *d, unsigned int len, char *out) {
+
+ out[0]='\0';
+ char c_ret[] = "AA";
+ unsigned int i;
+ strcat(out, "0x");
+ for (i = 0; i < len; i++) {
+ sprintf(c_ret, "%02X", d[i]);
+ strcat(out, c_ret);
+ }
+ strcat(out, "\0");
+ return (ISC_R_SUCCESS);
+}
+
+
+#define TEST_INPUT(x) (x), sizeof(x)-1
+
+typedef struct hash_testcase {
+ const char *input;
+ size_t input_len;
+ const char *result;
+ int repeats;
+} hash_testcase_t;
+
+typedef struct hash_test_key {
+ const char *key;
+ const int len;
+} hash_test_key_t;
+
+/* non-hmac tests */
+
+ATF_TC(isc_sha1);
+ATF_TC_HEAD(isc_sha1, tc) {
+ atf_tc_set_md_var(tc, "descr", "sha1 examples from RFC4634");
+}
+ATF_TC_BODY(isc_sha1, tc) {
+ isc_sha1_t sha1;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("abc"),
+ "0xA9993E364706816ABA3E25717850C26C9CD0D89D",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijk"
+ "ljklmklmnlmnomnopnopq"),
+ "0x84983E441C3BD26EBAAE4AA1F95129E5E54670F1",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("a") /* times 1000000 */,
+ "0x34AA973CD4C4DAA4F61EEB2BDBAD27316534016F",
+ 1000000
+ },
+ /* Test 4 -- exact multiple of 512 bits */
+ {
+ TEST_INPUT("01234567012345670123456701234567"),
+ "0xDEA356A2CDDD90C7A7ECEDC5EBB563934F460452",
+ 20 /* 20 times */
+ },
+#if 0
+ /* Test 5 -- optional feature, not implemented */
+ {
+ TEST_INPUT(""),
+ /* "extrabits": 0x98 , "numberextrabits": 5 */
+ "0x29826B003B906E660EFF4027CE98AF3531AC75BA",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("\x5e"),
+ "0x5E6F80A34A9798CAFC6A5DB96CC57BA4C4DB59C2",
+ 1
+ },
+#if 0
+ /* Test 7 -- optional feature, not implemented */
+ {
+ TEST_INPUT("\x49\xb2\xae\xc2\x59\x4b\xbe\x3a"
+ "\x3b\x11\x75\x42\xd9\x4a\xc8"),
+ /* "extrabits": 0x80, "numberextrabits": 3 */
+ "0x6239781E03729919C01955B3FFA8ACB60B988340", 1 },
+#endif
+ /* Test 8 */
+ {
+ TEST_INPUT("\x9a\x7d\xfd\xf1\xec\xea\xd0\x6e\xd6\x46"
+ "\xaa\x55\xfe\x75\x71\x46"),
+ "0x82ABFF6605DBE1C17DEF12A394FA22A82B544A35",
+ 1
+ },
+#if 0
+ /* Test 9 -- optional feature, not implemented */
+ {
+ TEST_INPUT("\x65\xf9\x32\x99\x5b\xa4\xce\x2c\xb1\xb4"
+ "\xa2\xe7\x1a\xe7\x02\x20\xaa\xce\xc8\x96"
+ "\x2d\xd4\x49\x9c\xbd\x7c\x88\x7a\x94\xea"
+ "\xaa\x10\x1e\xa5\xaa\xbc\x52\x9b\x4e\x7e"
+ "\x43\x66\x5a\x5a\xf2\xcd\x03\xfe\x67\x8e"
+ "\xa6\xa5\x00\x5b\xba\x3b\x08\x22\x04\xc2"
+ "\x8b\x91\x09\xf4\x69\xda\xc9\x2a\xaa\xb3"
+ "\xaa\x7c\x11\xa1\xb3\x2a"),
+ /* "extrabits": 0xE0 , "numberextrabits": 3 */
+ "0x8C5B2A5DDAE5A97FC7F9D85661C672ADBF7933D4",
+ 1
+ },
+#endif
+ /* Test 10 */
+ {
+ TEST_INPUT("\xf7\x8f\x92\x14\x1b\xcd\x17\x0a\xe8\x9b"
+ "\x4f\xba\x15\xa1\xd5\x9f\x3f\xd8\x4d\x22"
+ "\x3c\x92\x51\xbd\xac\xbb\xae\x61\xd0\x5e"
+ "\xd1\x15\xa0\x6a\x7c\xe1\x17\xb7\xbe\xea"
+ "\xd2\x44\x21\xde\xd9\xc3\x25\x92\xbd\x57"
+ "\xed\xea\xe3\x9c\x39\xfa\x1f\xe8\x94\x6a"
+ "\x84\xd0\xcf\x1f\x7b\xee\xad\x17\x13\xe2"
+ "\xe0\x95\x98\x97\x34\x7f\x67\xc8\x0b\x04"
+ "\x00\xc2\x09\x81\x5d\x6b\x10\xa6\x83\x83"
+ "\x6f\xd5\x56\x2a\x56\xca\xb1\xa2\x8e\x81"
+ "\xb6\x57\x66\x54\x63\x1c\xf1\x65\x66\xb8"
+ "\x6e\x3b\x33\xa1\x08\xb0\x53\x07\xc0\x0a"
+ "\xff\x14\xa7\x68\xed\x73\x50\x60\x6a\x0f"
+ "\x85\xe6\xa9\x1d\x39\x6f\x5b\x5c\xbe\x57"
+ "\x7f\x9b\x38\x80\x7c\x7d\x52\x3d\x6d\x79"
+ "\x2f\x6e\xbc\x24\xa4\xec\xf2\xb3\xa4\x27"
+ "\xcd\xbb\xfb"),
+ "0xCB0082C8F197D260991BA6A460E76E202BAD27B3",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_sha1_init(&sha1);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_sha1_update(&sha1,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_sha1_final(&sha1, digest);
+ tohexstr(digest, ISC_SHA1_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+}
+
+
+ATF_TC(isc_sha224);
+ATF_TC_HEAD(isc_sha224, tc) {
+ atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
+}
+ATF_TC_BODY(isc_sha224, tc) {
+ isc_sha224_t sha224;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("abc"),
+ "0x23097D223405D8228642A477BDA255B32AADBCE4BDA0B3F7"
+ "E36C9DA7",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijklj"
+ "klmklmnlmnomnopnopq"),
+ "0x75388B16512776CC5DBA5DA1FD890150B0C6455CB4F58B"
+ "1952522525",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("a"),
+ "0x20794655980C91D8BBB4C1EA97618A4BF03F42581948B2"
+ "EE4EE7AD67",
+ 1000000
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("01234567012345670123456701234567"),
+ "0x567F69F168CD7844E65259CE658FE7AADFA25216E68ECA"
+ "0EB7AB8262",
+ 20
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("\x07"),
+ "0x00ECD5F138422B8AD74C9799FD826C531BAD2FCABC7450"
+ "BEE2AA8C2A",
+ 1
+ },
+#if 0
+ /* Test 7 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 8 */
+ {
+ TEST_INPUT("\x18\x80\x40\x05\xdd\x4f\xbd\x15\x56\x29"
+ "\x9d\x6f\x9d\x93\xdf\x62"),
+ "0xDF90D78AA78821C99B40BA4C966921ACCD8FFB1E98AC38"
+ "8E56191DB1",
+ 1
+ },
+#if 0
+ /* Test 9 */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 10 */
+ {
+ TEST_INPUT("\x55\xb2\x10\x07\x9c\x61\xb5\x3a\xdd\x52"
+ "\x06\x22\xd1\xac\x97\xd5\xcd\xbe\x8c\xb3"
+ "\x3a\xa0\xae\x34\x45\x17\xbe\xe4\xd7\xba"
+ "\x09\xab\xc8\x53\x3c\x52\x50\x88\x7a\x43"
+ "\xbe\xbb\xac\x90\x6c\x2e\x18\x37\xf2\x6b"
+ "\x36\xa5\x9a\xe3\xbe\x78\x14\xd5\x06\x89"
+ "\x6b\x71\x8b\x2a\x38\x3e\xcd\xac\x16\xb9"
+ "\x61\x25\x55\x3f\x41\x6f\xf3\x2c\x66\x74"
+ "\xc7\x45\x99\xa9\x00\x53\x86\xd9\xce\x11"
+ "\x12\x24\x5f\x48\xee\x47\x0d\x39\x6c\x1e"
+ "\xd6\x3b\x92\x67\x0c\xa5\x6e\xc8\x4d\xee"
+ "\xa8\x14\xb6\x13\x5e\xca\x54\x39\x2b\xde"
+ "\xdb\x94\x89\xbc\x9b\x87\x5a\x8b\xaf\x0d"
+ "\xc1\xae\x78\x57\x36\x91\x4a\xb7\xda\xa2"
+ "\x64\xbc\x07\x9d\x26\x9f\x2c\x0d\x7e\xdd"
+ "\xd8\x10\xa4\x26\x14\x5a\x07\x76\xf6\x7c"
+ "\x87\x82\x73"),
+ "0x0B31894EC8937AD9B91BDFBCBA294D9ADEFAA18E09305E"
+ "9F20D5C3A4",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_sha224_init(&sha224);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_sha224_update(&sha224,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_sha224_final(digest, &sha224);
+ /*
+ *API inconsistency BUG HERE
+ * in order to be consistant with the other isc_hash_final
+ * functions the call should be
+ * isc_sha224_final(&sha224, digest);
+ */
+ tohexstr(digest, ISC_SHA224_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+
+}
+
+ATF_TC(isc_sha256);
+ATF_TC_HEAD(isc_sha256, tc) {
+ atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
+}
+ATF_TC_BODY(isc_sha256, tc) {
+ isc_sha256_t sha256;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("abc"),
+ "0xBA7816BF8F01CFEA414140DE5DAE2223B00361A396177A"
+ "9CB410FF61F20015AD",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("abcdbcdecdefdefgefghfghighijhijkijkljk"
+ "lmklmnlmnomnopnopq"),
+ "0x248D6A61D20638B8E5C026930C3E6039A33CE45964FF21"
+ "67F6ECEDD419DB06C1",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("a"),
+ "0xCDC76E5C9914FB9281A1C7E284D73E67F1809A48A49720"
+ "0E046D39CCC7112CD0",
+ 1000000 },
+ /* Test 4 */
+ {
+ TEST_INPUT("01234567012345670123456701234567"),
+ "0x594847328451BDFA85056225462CC1D867D877FB388DF0"
+ "CE35F25AB5562BFBB5",
+ 20
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("\x19"),
+ "0x68AA2E2EE5DFF96E3355E6C7EE373E3D6A4E17F75F9518"
+ "D843709C0C9BC3E3D4",
+ 1
+ },
+#if 0
+ /* Test 7 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 8 */
+ {
+ TEST_INPUT("\xe3\xd7\x25\x70\xdc\xdd\x78\x7c\xe3"
+ "\x88\x7a\xb2\xcd\x68\x46\x52"),
+ "0x175EE69B02BA9B58E2B0A5FD13819CEA573F3940A94F82"
+ "5128CF4209BEABB4E8",
+ 1
+ },
+#if 0
+ /* Test 9 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 10 */
+ {
+ TEST_INPUT("\x83\x26\x75\x4e\x22\x77\x37\x2f\x4f\xc1"
+ "\x2b\x20\x52\x7a\xfe\xf0\x4d\x8a\x05\x69"
+ "\x71\xb1\x1a\xd5\x71\x23\xa7\xc1\x37\x76"
+ "\x00\x00\xd7\xbe\xf6\xf3\xc1\xf7\xa9\x08"
+ "\x3a\xa3\x9d\x81\x0d\xb3\x10\x77\x7d\xab"
+ "\x8b\x1e\x7f\x02\xb8\x4a\x26\xc7\x73\x32"
+ "\x5f\x8b\x23\x74\xde\x7a\x4b\x5a\x58\xcb"
+ "\x5c\x5c\xf3\x5b\xce\xe6\xfb\x94\x6e\x5b"
+ "\xd6\x94\xfa\x59\x3a\x8b\xeb\x3f\x9d\x65"
+ "\x92\xec\xed\xaa\x66\xca\x82\xa2\x9d\x0c"
+ "\x51\xbc\xf9\x33\x62\x30\xe5\xd7\x84\xe4"
+ "\xc0\xa4\x3f\x8d\x79\xa3\x0a\x16\x5c\xba"
+ "\xbe\x45\x2b\x77\x4b\x9c\x71\x09\xa9\x7d"
+ "\x13\x8f\x12\x92\x28\x96\x6f\x6c\x0a\xdc"
+ "\x10\x6a\xad\x5a\x9f\xdd\x30\x82\x57\x69"
+ "\xb2\xc6\x71\xaf\x67\x59\xdf\x28\xeb\x39"
+ "\x3d\x54\xd6"),
+ "0x97DBCA7DF46D62C8A422C941DD7E835B8AD3361763F7E9"
+ "B2D95F4F0DA6E1CCBC",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_sha256_init(&sha256);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_sha256_update(&sha256,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_sha256_final(digest, &sha256);
+ /*
+ *API inconsistency BUG HERE
+ * in order to be consistant with the other isc_hash_final
+ * functions the call should be
+ * isc_sha224_final(&sha224, digest);
+ */
+ tohexstr(digest, ISC_SHA256_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+
+}
+
+ATF_TC(isc_sha384);
+ATF_TC_HEAD(isc_sha384, tc) {
+ atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
+}
+ATF_TC_BODY(isc_sha384, tc) {
+ isc_sha384_t sha384;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("abc"),
+ "0xCB00753F45A35E8BB5A03D699AC65007272C32AB0EDED1"
+ "631A8B605A43FF5BED8086072BA1E7CC2358BAEC"
+ "A134C825A7",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("abcdefghbcdefghicdefghijdefghijkefghijkl"
+ "fghijklmghijklmnhijklmnoijklmnopjklmnopq"
+ "klmnopqrlmnopqrsmnopqrstnopqrstu"),
+ "0x09330C33F71147E83D192FC782CD1B4753111B173B3B05"
+ "D22FA08086E3B0F712FCC7C71A557E2DB966C3E9"
+ "FA91746039",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("a"),
+ "0x9D0E1809716474CB086E834E310A4A1CED149E9C00F248"
+ "527972CEC5704C2A5B07B8B3DC38ECC4EBAE97DD"
+ "D87F3D8985",
+ 1000000
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("01234567012345670123456701234567"),
+ "0x2FC64A4F500DDB6828F6A3430B8DD72A368EB7F3A8322A"
+ "70BC84275B9C0B3AB00D27A5CC3C2D224AA6B61A"
+ "0D79FB4596",
+ 20
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 6 */
+ { TEST_INPUT("\xb9"),
+ "0xBC8089A19007C0B14195F4ECC74094FEC64F01F9092928"
+ "2C2FB392881578208AD466828B1C6C283D2722CF"
+ "0AD1AB6938",
+ 1
+ },
+#if 0
+ /* Test 7 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 8 */
+ {
+ TEST_INPUT("\xa4\x1c\x49\x77\x79\xc0\x37\x5f\xf1"
+ "\x0a\x7f\x4e\x08\x59\x17\x39"),
+ "0xC9A68443A005812256B8EC76B00516F0DBB74FAB26D665"
+ "913F194B6FFB0E91EA9967566B58109CBC675CC2"
+ "08E4C823F7",
+ 1
+ },
+#if 0
+ /* Test 9 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 10 */
+ {
+ TEST_INPUT("\x39\x96\x69\xe2\x8f\x6b\x9c\x6d\xbc\xbb"
+ "\x69\x12\xec\x10\xff\xcf\x74\x79\x03\x49"
+ "\xb7\xdc\x8f\xbe\x4a\x8e\x7b\x3b\x56\x21"
+ "\xdb\x0f\x3e\x7d\xc8\x7f\x82\x32\x64\xbb"
+ "\xe4\x0d\x18\x11\xc9\xea\x20\x61\xe1\xc8"
+ "\x4a\xd1\x0a\x23\xfa\xc1\x72\x7e\x72\x02"
+ "\xfc\x3f\x50\x42\xe6\xbf\x58\xcb\xa8\xa2"
+ "\x74\x6e\x1f\x64\xf9\xb9\xea\x35\x2c\x71"
+ "\x15\x07\x05\x3c\xf4\xe5\x33\x9d\x52\x86"
+ "\x5f\x25\xcc\x22\xb5\xe8\x77\x84\xa1\x2f"
+ "\xc9\x61\xd6\x6c\xb6\xe8\x95\x73\x19\x9a"
+ "\x2c\xe6\x56\x5c\xbd\xf1\x3d\xca\x40\x38"
+ "\x32\xcf\xcb\x0e\x8b\x72\x11\xe8\x3a\xf3"
+ "\x2a\x11\xac\x17\x92\x9f\xf1\xc0\x73\xa5"
+ "\x1c\xc0\x27\xaa\xed\xef\xf8\x5a\xad\x7c"
+ "\x2b\x7c\x5a\x80\x3e\x24\x04\xd9\x6d\x2a"
+ "\x77\x35\x7b\xda\x1a\x6d\xae\xed\x17\x15"
+ "\x1c\xb9\xbc\x51\x25\xa4\x22\xe9\x41\xde"
+ "\x0c\xa0\xfc\x50\x11\xc2\x3e\xcf\xfe\xfd"
+ "\xd0\x96\x76\x71\x1c\xf3\xdb\x0a\x34\x40"
+ "\x72\x0e\x16\x15\xc1\xf2\x2f\xbc\x3c\x72"
+ "\x1d\xe5\x21\xe1\xb9\x9b\xa1\xbd\x55\x77"
+ "\x40\x86\x42\x14\x7e\xd0\x96"),
+ "0x4F440DB1E6EDD2899FA335F09515AA025EE177A79F4B4A"
+ "AF38E42B5C4DE660F5DE8FB2A5B2FBD2A3CBFFD2"
+ "0CFF1288C0",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_sha384_init(&sha384);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_sha384_update(&sha384,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_sha384_final(digest, &sha384);
+ /*
+ *API inconsistency BUG HERE
+ * in order to be consistant with the other isc_hash_final
+ * functions the call should be
+ * isc_sha224_final(&sha224, digest);
+ */
+ tohexstr(digest, ISC_SHA384_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+
+}
+
+ATF_TC(isc_sha512);
+ATF_TC_HEAD(isc_sha512, tc) {
+ atf_tc_set_md_var(tc, "descr", "sha224 examples from RFC4634");
+}
+ATF_TC_BODY(isc_sha512, tc) {
+ isc_sha512_t sha512;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("abc"),
+ "0xDDAF35A193617ABACC417349AE20413112E6FA4E89A97E"
+ "A20A9EEEE64B55D39A2192992A274FC1A836BA3C"
+ "23A3FEEBBD454D4423643CE80E2A9AC94FA54CA49F",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("abcdefghbcdefghicdefghijdefghijkefghijkl"
+ "fghijklmghijklmnhijklmnoijklmnopjklmnopq"
+ "klmnopqrlmnopqrsmnopqrstnopqrstu"),
+ "0x8E959B75DAE313DA8CF4F72814FC143F8F7779C6EB9F7F"
+ "A17299AEADB6889018501D289E4900F7E4331B99"
+ "DEC4B5433AC7D329EEB6DD26545E96E55B874BE909",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("a"),
+ "0xE718483D0CE769644E2E42C7BC15B4638E1F98B13B2044"
+ "285632A803AFA973EBDE0FF244877EA60A4CB043"
+ "2CE577C31BEB009C5C2C49AA2E4EADB217AD8CC09B",
+ 1000000
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("01234567012345670123456701234567"),
+ "0x89D05BA632C699C31231DED4FFC127D5A894DAD412C0E0"
+ "24DB872D1ABD2BA8141A0F85072A9BE1E2AA04CF"
+ "33C765CB510813A39CD5A84C4ACAA64D3F3FB7BAE9",
+ 20
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("\xD0"),
+ "0x9992202938E882E73E20F6B69E68A0A7149090423D93C8"
+ "1BAB3F21678D4ACEEEE50E4E8CAFADA4C85A54EA"
+ "8306826C4AD6E74CECE9631BFA8A549B4AB3FBBA15",
+ 1
+ },
+#if 0
+ /* Test 7 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 8 */
+ {
+ TEST_INPUT("\x8d\x4e\x3c\x0e\x38\x89\x19\x14\x91\x81"
+ "\x6e\x9d\x98\xbf\xf0\xa0"),
+ "0xCB0B67A4B8712CD73C9AABC0B199E9269B20844AFB75AC"
+ "BDD1C153C9828924C3DDEDAAFE669C5FDD0BC66F"
+ "630F6773988213EB1B16F517AD0DE4B2F0C95C90F8",
+ 1
+ },
+#if 0
+ /* Test 9 -- unimplemented optional functionality */
+ {
+ TEST_INPUT(""),
+ "0xXXX",
+ 1
+ },
+#endif
+ /* Test 10 */
+ {
+ TEST_INPUT("\xa5\x5f\x20\xc4\x11\xaa\xd1\x32\x80\x7a"
+ "\x50\x2d\x65\x82\x4e\x31\xa2\x30\x54\x32"
+ "\xaa\x3d\x06\xd3\xe2\x82\xa8\xd8\x4e\x0d"
+ "\xe1\xde\x69\x74\xbf\x49\x54\x69\xfc\x7f"
+ "\x33\x8f\x80\x54\xd5\x8c\x26\xc4\x93\x60"
+ "\xc3\xe8\x7a\xf5\x65\x23\xac\xf6\xd8\x9d"
+ "\x03\xe5\x6f\xf2\xf8\x68\x00\x2b\xc3\xe4"
+ "\x31\xed\xc4\x4d\xf2\xf0\x22\x3d\x4b\xb3"
+ "\xb2\x43\x58\x6e\x1a\x7d\x92\x49\x36\x69"
+ "\x4f\xcb\xba\xf8\x8d\x95\x19\xe4\xeb\x50"
+ "\xa6\x44\xf8\xe4\xf9\x5e\xb0\xea\x95\xbc"
+ "\x44\x65\xc8\x82\x1a\xac\xd2\xfe\x15\xab"
+ "\x49\x81\x16\x4b\xbb\x6d\xc3\x2f\x96\x90"
+ "\x87\xa1\x45\xb0\xd9\xcc\x9c\x67\xc2\x2b"
+ "\x76\x32\x99\x41\x9c\xc4\x12\x8b\xe9\xa0"
+ "\x77\xb3\xac\xe6\x34\x06\x4e\x6d\x99\x28"
+ "\x35\x13\xdc\x06\xe7\x51\x5d\x0d\x73\x13"
+ "\x2e\x9a\x0d\xc6\xd3\xb1\xf8\xb2\x46\xf1"
+ "\xa9\x8a\x3f\xc7\x29\x41\xb1\xe3\xbb\x20"
+ "\x98\xe8\xbf\x16\xf2\x68\xd6\x4f\x0b\x0f"
+ "\x47\x07\xfe\x1e\xa1\xa1\x79\x1b\xa2\xf3"
+ "\xc0\xc7\x58\xe5\xf5\x51\x86\x3a\x96\xc9"
+ "\x49\xad\x47\xd7\xfb\x40\xd2"),
+ "0xC665BEFB36DA189D78822D10528CBF3B12B3EEF7260399"
+ "09C1A16A270D48719377966B957A878E72058477"
+ "9A62825C18DA26415E49A7176A894E7510FD1451F5",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_sha512_init(&sha512);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_sha512_update(&sha512,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_sha512_final(digest, &sha512);
+ /*
+ *API inconsistency BUG HERE
+ * in order to be consistant with the other isc_hash_final
+ * functions the call should be
+ * isc_sha224_final(&sha224, digest);
+ */
+ tohexstr(digest, ISC_SHA512_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+
+}
+
+ATF_TC(isc_md5);
+ATF_TC_HEAD(isc_md5, tc) {
+ atf_tc_set_md_var(tc, "descr", "md5 example from RFC1321");
+}
+ATF_TC_BODY(isc_md5, tc) {
+ isc_md5_t md5;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ {
+ TEST_INPUT(""),
+ "0xD41D8CD98F00B204E9800998ECF8427E",
+ 1
+ },
+ {
+ TEST_INPUT("a"),
+ "0x0CC175B9C0F1B6A831C399E269772661",
+ 1
+ },
+ {
+ TEST_INPUT("abc"),
+ "0x900150983CD24FB0D6963F7D28E17F72",
+ 1
+ },
+ {
+ TEST_INPUT("message digest"),
+ "0xF96B697D7CB7938D525A2F31AAF161D0",
+ 1
+ },
+ {
+ TEST_INPUT("abcdefghijklmnopqrstuvwxyz"),
+ "0xC3FCD3D76192E4007DFB496CCA67E13B",
+ 1
+ },
+ {
+ TEST_INPUT("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"
+ "nopqrstuvwxyz0123456789"),
+ "0xD174AB98D277D9F5A5611C2C9F419D9F",
+ 1
+ },
+ {
+ TEST_INPUT("123456789012345678901234567890123456789"
+ "01234567890123456789012345678901234567890"),
+ "0x57EDF4A22BE3C955AC49DA2E2107B67A",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ isc_md5_init(&md5);
+ for(i = 0; i < testcase->repeats; i++) {
+ isc_md5_update(&md5,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ }
+ isc_md5_final(&md5, digest);
+ tohexstr(digest, ISC_MD5_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ }
+}
+
+/* HMAC-SHA1 test */
+ATF_TC(isc_hmacsha1);
+ATF_TC_HEAD(isc_hmacsha1, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-SHA1 examples from RFC2104");
+}
+ATF_TC_BODY(isc_hmacsha1, tc) {
+ isc_hmacsha1_t hmacsha1;
+
+ UNUSED(tc);
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0xB617318655057264E28BC0B6FB378C8EF146BE00",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
+ "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
+ "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0xEFFCDF6AE5EB2FA2D27416D5F184DF9C259A7C79",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0x125D7342B9AC11CD91A39AF48AA17B4F63F175D3",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0x4C9007F4026250C6BC8414F9BF50C86C2D7235DA",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0xAA4AE5E15272D00E95705637CE8A3B55ED402112", 1 },
+ /* Test 7 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key and "
+ "Larger Than One Block-Size Data"),
+ "0xE8E99D0F45237D786D6BBAA7965C7808BBFF1A91",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+#endif
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 80 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 80 },
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacsha1_init(&hmacsha1, buffer, test_key->len);
+ isc_hmacsha1_update(&hmacsha1,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH);
+ tohexstr(digest, ISC_SHA1_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+/* HMAC-SHA224 test */
+ATF_TC(isc_hmacsha224);
+ATF_TC_HEAD(isc_hmacsha224, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-SHA224 examples from RFC4634");
+}
+ATF_TC_BODY(isc_hmacsha224, tc) {
+ isc_hmacsha224_t hmacsha224;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0x896FB1128ABBDF196832107CD49DF33F47B4B1169912BA"
+ "4F53684B22",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
+ "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
+ "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0xA30E01098BC6DBBF45690F3A7E9E6D0F8BBEA2A39E61480"
+ "08FD05E44",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0x7FB3CB3588C6C1F6FFA9694D7D6AD2649365B0C1F65D69"
+ "D1EC8333EA",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0x6C11506874013CAC6A2ABC1BB382627CEC6A90D86EFC01"
+ "2DE7AFEC5A",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0x95E9A0DB962095ADAEBE9B2D6F0DBCE2D499F112F2D2B7"
+ "273FA6870E",
+ 1
+ },
+ /* Test 7 */
+ {
+ TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
+ "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
+ "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
+ "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
+ "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
+ "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
+ "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
+ "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
+ "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
+ "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
+ "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
+ "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
+ "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
+ "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
+ "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
+ "\x6d\x2e"),
+ "0x3A854166AC5D9F023F54D517D0B39DBD946770DB9C2B95"
+ "C9F6F565D1",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+#endif
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacsha224_init(&hmacsha224, buffer, test_key->len);
+ isc_hmacsha224_update(&hmacsha224,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH);
+ tohexstr(digest, ISC_SHA224_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+/* HMAC-SHA256 test */
+ATF_TC(isc_hmacsha256);
+ATF_TC_HEAD(isc_hmacsha256, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-SHA256 examples from RFC4634");
+}
+ATF_TC_BODY(isc_hmacsha256, tc) {
+ isc_hmacsha256_t hmacsha256;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0xB0344C61D8DB38535CA8AFCEAF0BF12B881DC200C9833D"
+ "A726E9376C2E32CFF7",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
+ "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
+ "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0x5BDCC146BF60754E6A042426089575C75A003F089D2739"
+ "839DEC58B964EC3843",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0x773EA91E36800E46854DB8EBD09181A72959098B3EF8C1"
+ "22D9635514CED565FE",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0x82558A389A443C0EA4CC819899F2083A85F0FAA3E578F8"
+ "077A2E3FF46729665B",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0x60E431591EE0B67F0D8A26AACBF5B77F8E0BC6213728C5"
+ "140546040F0EE37F54",
+ 1
+ },
+ /* Test 7 */
+ {
+ TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
+ "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
+ "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
+ "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
+ "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
+ "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
+ "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
+ "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
+ "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
+ "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
+ "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
+ "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
+ "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
+ "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
+ "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
+ "\x6d\x2e"),
+ "0x9B09FFA71B942FCB27635FBCD5B0E944BFDC63644F0713"
+ "938A7F51535C3A35E2",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+#endif
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacsha256_init(&hmacsha256, buffer, test_key->len);
+ isc_hmacsha256_update(&hmacsha256,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH);
+ tohexstr(digest, ISC_SHA256_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+/* HMAC-SHA384 test */
+ATF_TC(isc_hmacsha384);
+ATF_TC_HEAD(isc_hmacsha384, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-SHA384 examples from RFC4634");
+}
+ATF_TC_BODY(isc_hmacsha384, tc) {
+ isc_hmacsha384_t hmacsha384;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0xAFD03944D84895626B0825F4AB46907F15F9DADBE4101E"
+ "C682AA034C7CEBC59CFAEA9EA9076EDE7F4AF152"
+ "E8B2FA9CB6",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
+ "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
+ "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0xAF45D2E376484031617F78D2B58A6B1B9C7EF464F5A01B"
+ "47E42EC3736322445E8E2240CA5E69E2C78B3239"
+ "ECFAB21649",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0x88062608D3E6AD8A0AA2ACE014C8A86F0AA635D947AC9F"
+ "EBE83EF4E55966144B2A5AB39DC13814B94E3AB6"
+ "E101A34F27",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0x3E8A69B7783C25851933AB6290AF6CA77A998148085000"
+ "9CC5577C6E1F573B4E6801DD23C4A7D679CCF8A3"
+ "86C674CFFB",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0x4ECE084485813E9088D2C63A041BC5B44F9EF1012A2B58"
+ "8F3CD11F05033AC4C60C2EF6AB4030FE8296248D"
+ "F163F44952",
+ 1
+ },
+ /* Test 7 */
+ {
+ TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
+ "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
+ "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
+ "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
+ "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
+ "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
+ "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
+ "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
+ "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
+ "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
+ "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
+ "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
+ "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
+ "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
+ "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
+ "\x6d\x2e"),
+ "0x6617178E941F020D351E2F254E8FD32C602420FEB0B8FB"
+ "9ADCCEBB82461E99C5A678CC31E799176D3860E6"
+ "110C46523E",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+#endif
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacsha384_init(&hmacsha384, buffer, test_key->len);
+ isc_hmacsha384_update(&hmacsha384,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH);
+ tohexstr(digest, ISC_SHA384_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+/* HMAC-SHA512 test */
+ATF_TC(isc_hmacsha512);
+ATF_TC_HEAD(isc_hmacsha512, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-SHA512 examples from RFC4634");
+}
+ATF_TC_BODY(isc_hmacsha512, tc) {
+ isc_hmacsha512_t hmacsha512;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0x87AA7CDEA5EF619D4FF0B4241A1D6CB02379F4E2CE4EC2"
+ "787AD0B30545E17CDEDAA833B7D6B8A702038B27"
+ "4EAEA3F4E4BE9D914EEB61F1702E696C203A126854",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79\x61"
+ "\x20\x77\x61\x6e\x74\x20\x66\x6f\x72\x20"
+ "\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0x164B7A7BFCF819E2E395FBE73B56E0A387BD64222E831F"
+ "D610270CD7EA2505549758BF75C05A994A6D034F"
+ "65F8F0E6FDCAEAB1A34D4A6B4B636E070A38BCE737",
+ 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0xFA73B0089D56A284EFB0F0756C890BE9B1B5DBDD8EE81A"
+ "3655F83E33B2279D39BF3E848279A722C806B485"
+ "A47E67C807B946A337BEE8942674278859E13292FB",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0xB0BA465637458C6990E5A8C5F61D4AF7E576D97FF94B87"
+ "2DE76F8050361EE3DBA91CA5C11AA25EB4D67927"
+ "5CC5788063A5F19741120C4F2DE2ADEBEB10A298DD",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+#endif
+ /* Test 6 */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0x80B24263C7C1A3EBB71493C1DD7BE8B49B46D1F41B4AEE"
+ "C1121B013783F8F3526B56D037E05F2598BD0FD2"
+ "215D6A1E5295E64F73F63F0AEC8B915A985D786598",
+ 1
+ },
+ /* Test 7 */
+ {
+ TEST_INPUT("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20"
+ "\x74\x65\x73\x74\x20\x75\x73\x69\x6e\x67"
+ "\x20\x61\x20\x6c\x61\x72\x67\x65\x72\x20"
+ "\x74\x68\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
+ "\x2d\x73\x69\x7a\x65\x20\x6b\x65\x79\x20"
+ "\x61\x6e\x64\x20\x61\x20\x6c\x61\x72\x67"
+ "\x65\x72\x20\x74\x68\x61\x6e\x20\x62\x6c"
+ "\x6f\x63\x6b\x2d\x73\x69\x7a\x65\x20\x64"
+ "\x61\x74\x61\x2e\x20\x54\x68\x65\x20\x6b"
+ "\x65\x79\x20\x6e\x65\x65\x64\x73\x20\x74"
+ "\x6f\x20\x62\x65\x20\x68\x61\x73\x68\x65"
+ "\x64\x20\x62\x65\x66\x6f\x72\x65\x20\x62"
+ "\x65\x69\x6e\x67\x20\x75\x73\x65\x64\x20"
+ "\x62\x79\x20\x74\x68\x65\x20\x48\x4d\x41"
+ "\x43\x20\x61\x6c\x67\x6f\x72\x69\x74\x68"
+ "\x6d\x2e"),
+ "0xE37B6A775DC87DBAA4DFA9F96E5E3FFDDEBD71F8867289"
+ "865DF5A32D20CDC944B6022CAC3C4982B10D5EEB"
+ "55C3E4DE15134676FB6DE0446065C97440FA8C6A58",
+ 1
+ },
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", 20 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 20 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+#endif
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacsha512_init(&hmacsha512, buffer, test_key->len);
+ isc_hmacsha512_update(&hmacsha512,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH);
+ tohexstr(digest, ISC_SHA512_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+
+/* HMAC-MD5 Test */
+ATF_TC(isc_hmacmd5);
+ATF_TC_HEAD(isc_hmacmd5, tc) {
+ atf_tc_set_md_var(tc, "descr", "HMAC-MD5 examples from RFC2104");
+}
+ATF_TC_BODY(isc_hmacmd5, tc) {
+ isc_hmacmd5_t hmacmd5;
+
+ UNUSED(tc);
+
+ /*
+ * These are the various test vectors. All of these are passed
+ * through the hash function and the results are compared to the
+ * result specified here.
+ */
+ hash_testcase_t testcases[] = {
+ /* Test 1 */
+ {
+ TEST_INPUT("\x48\x69\x20\x54\x68\x65\x72\x65"),
+ "0x9294727A3638BB1C13F48EF8158BFC9D",
+ 1
+ },
+ /* Test 2 */
+ {
+ TEST_INPUT("\x77\x68\x61\x74\x20\x64\x6f\x20\x79"
+ "\x61\x20\x77\x61\x6e\x74\x20\x66\x6f"
+ "\x72\x20\x6e\x6f\x74\x68\x69\x6e\x67\x3f"),
+ "0x750C783E6AB0B503EAA86E310A5DB738", 1
+ },
+ /* Test 3 */
+ {
+ TEST_INPUT("\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"
+ "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"),
+ "0x56BE34521D144C88DBB8C733F0E8B3F6",
+ 1
+ },
+ /* Test 4 */
+ {
+ TEST_INPUT("\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+ "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"),
+ "0x697EAF0ACA3A3AEA3A75164746FFAA79",
+ 1
+ },
+#if 0
+ /* Test 5 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test With Truncation"),
+ "0x4C1A03424B55E07FE7F27BE1",
+ 1
+ },
+ /* Test 6 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key - "
+ "Hash Key First"),
+ "0xAA4AE5E15272D00E95705637CE8A3B55ED402112",
+ 1
+ },
+ /* Test 7 -- unimplemented optional functionality */
+ {
+ TEST_INPUT("Test Using Larger Than Block-Size Key and "
+ "Larger Than One Block-Size Data"),
+ "0xE8E99D0F45237D786D6BBAA7965C7808BBFF1A91",
+ 1
+ },
+#endif
+ { NULL, 0, NULL, 1 }
+ };
+
+ hash_testcase_t *testcase = testcases;
+
+ hash_test_key_t test_keys[] = {
+ /* Key 1 */
+ { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+ "\x0b\x0b\x0b\x0b\x0b\x0b", 16 },
+ /* Key 2 */
+ { "Jefe", 4 },
+ /* Key 3 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa", 16 },
+ /* Key 4 */
+ { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a"
+ "\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14"
+ "\x15\x16\x17\x18\x19", 25 },
+#if 0
+ /* Key 5 */
+ { "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+ "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c", 20 },
+ /* Key 6 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+ /* Key 7 */
+ { "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+ "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", 131 },
+#endif
+ { "", 0 }
+ };
+
+ hash_test_key_t *test_key = test_keys;
+
+ while (testcase->input != NULL && testcase->result != NULL) {
+ memcpy(buffer, test_key->key, test_key->len);
+ isc_hmacmd5_init(&hmacmd5, buffer, test_key->len);
+ isc_hmacmd5_update(&hmacmd5,
+ (const isc_uint8_t *) testcase->input,
+ testcase->input_len);
+ isc_hmacmd5_sign(&hmacmd5, digest);
+ tohexstr(digest, ISC_MD5_DIGESTLENGTH, str);
+ ATF_CHECK_STREQ(str, testcase->result);
+
+ testcase++;
+ test_key++;
+ }
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, isc_hmacmd5);
+ ATF_TP_ADD_TC(tp, isc_hmacsha1);
+ ATF_TP_ADD_TC(tp, isc_hmacsha224);
+ ATF_TP_ADD_TC(tp, isc_hmacsha256);
+ ATF_TP_ADD_TC(tp, isc_hmacsha384);
+ ATF_TP_ADD_TC(tp, isc_hmacsha512);
+ ATF_TP_ADD_TC(tp, isc_md5);
+ ATF_TP_ADD_TC(tp, isc_sha1);
+ ATF_TP_ADD_TC(tp, isc_sha224);
+ ATF_TP_ADD_TC(tp, isc_sha256);
+ ATF_TP_ADD_TC(tp, isc_sha384);
+ ATF_TP_ADD_TC(tp, isc_sha512);
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/tests/isctest.c b/lib/isc/tests/isctest.c
new file mode 100644
index 000000000000..e118bbf2ad9e
--- /dev/null
+++ b/lib/isc/tests/isctest.c
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <time.h>
+
+#include <isc/app.h>
+#include <isc/buffer.h>
+#include <isc/entropy.h>
+#include <isc/hash.h>
+#include <isc/mem.h>
+#include <isc/os.h>
+#include <isc/socket.h>
+#include <isc/string.h>
+#include <isc/task.h>
+#include <isc/timer.h>
+#include <isc/util.h>
+
+#include "isctest.h"
+
+isc_mem_t *mctx = NULL;
+isc_entropy_t *ectx = NULL;
+isc_log_t *lctx = NULL;
+isc_taskmgr_t *taskmgr = NULL;
+isc_timermgr_t *timermgr = NULL;
+isc_socketmgr_t *socketmgr = NULL;
+int ncpus;
+
+static isc_boolean_t hash_active = ISC_FALSE;
+
+/*
+ * Logging categories: this needs to match the list in bin/named/log.c.
+ */
+static isc_logcategory_t categories[] = {
+ { "", 0 },
+ { "client", 0 },
+ { "network", 0 },
+ { "update", 0 },
+ { "queries", 0 },
+ { "unmatched", 0 },
+ { "update-security", 0 },
+ { "query-errors", 0 },
+ { NULL, 0 }
+};
+
+static void
+cleanup_managers() {
+ if (socketmgr != NULL)
+ isc_socketmgr_destroy(&socketmgr);
+ if (taskmgr != NULL)
+ isc_taskmgr_destroy(&taskmgr);
+ if (timermgr != NULL)
+ isc_timermgr_destroy(&timermgr);
+}
+
+static isc_result_t
+create_managers() {
+ isc_result_t result;
+#ifdef ISC_PLATFORM_USETHREADS
+ ncpus = isc_os_ncpus();
+#else
+ ncpus = 1;
+#endif
+
+ CHECK(isc_taskmgr_create(mctx, ncpus, 0, &taskmgr));
+ CHECK(isc_timermgr_create(mctx, &timermgr));
+ CHECK(isc_socketmgr_create(mctx, &socketmgr));
+ return (ISC_R_SUCCESS);
+
+ cleanup:
+ cleanup_managers();
+ return (result);
+}
+
+isc_result_t
+isc_test_begin(FILE *logfile, isc_boolean_t start_managers) {
+ isc_result_t result;
+
+ isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
+ CHECK(isc_mem_create(0, 0, &mctx));
+ CHECK(isc_entropy_create(mctx, &ectx));
+
+ CHECK(isc_hash_create(mctx, ectx, 255));
+ hash_active = ISC_TRUE;
+
+ if (logfile != NULL) {
+ isc_logdestination_t destination;
+ isc_logconfig_t *logconfig = NULL;
+
+ CHECK(isc_log_create(mctx, &lctx, &logconfig));
+ isc_log_registercategories(lctx, categories);
+ isc_log_setcontext(lctx);
+
+ destination.file.stream = logfile;
+ destination.file.name = NULL;
+ destination.file.versions = ISC_LOG_ROLLNEVER;
+ destination.file.maximum_size = 0;
+ CHECK(isc_log_createchannel(logconfig, "stderr",
+ ISC_LOG_TOFILEDESC,
+ ISC_LOG_DYNAMIC,
+ &destination, 0));
+ CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL));
+ }
+
+#ifdef ISC_PLATFORM_USETHREADS
+ ncpus = isc_os_ncpus();
+#else
+ ncpus = 1;
+#endif
+
+ if (start_managers)
+ CHECK(create_managers());
+
+ return (ISC_R_SUCCESS);
+
+ cleanup:
+ isc_test_end();
+ return (result);
+}
+
+void
+isc_test_end() {
+ if (taskmgr != NULL)
+ isc_taskmgr_destroy(&taskmgr);
+ if (lctx != NULL)
+ isc_log_destroy(&lctx);
+ if (hash_active) {
+ isc_hash_destroy();
+ hash_active = ISC_FALSE;
+ }
+ if (ectx != NULL)
+ isc_entropy_detach(&ectx);
+
+ cleanup_managers();
+
+ if (mctx != NULL)
+ isc_mem_destroy(&mctx);
+}
+
+/*
+ * Sleep for 'usec' microseconds.
+ */
+void
+isc_test_nap(isc_uint32_t usec) {
+#ifdef HAVE_NANOSLEEP
+ struct timespec ts;
+
+ ts.tv_sec = usec / 1000000;
+ ts.tv_nsec = (usec % 1000000) * 1000;
+ nanosleep(&ts, NULL);
+#elif HAVE_USLEEP
+ usleep(usec);
+#else
+ /*
+ * No fractional-second sleep function is available, so we
+ * round up to the nearest second and sleep instead
+ */
+ sleep((usec / 1000000) + 1);
+#endif
+}
diff --git a/lib/isc/tests/isctest.h b/lib/isc/tests/isctest.h
new file mode 100644
index 000000000000..03423c807bb7
--- /dev/null
+++ b/lib/isc/tests/isctest.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <isc/buffer.h>
+#include <isc/entropy.h>
+#include <isc/hash.h>
+#include <isc/log.h>
+#include <isc/mem.h>
+#include <isc/print.h>
+#include <isc/result.h>
+#include <isc/string.h>
+#include <isc/task.h>
+#include <isc/timer.h>
+#include <isc/util.h>
+
+#define CHECK(r) \
+ do { \
+ result = (r); \
+ if (result != ISC_R_SUCCESS) \
+ goto cleanup; \
+ } while (0)
+
+extern isc_mem_t *mctx;
+extern isc_entropy_t *ectx;
+extern isc_log_t *lctx;
+extern isc_taskmgr_t *taskmgr;
+isc_timermgr_t *timermgr;
+isc_socketmgr_t *socketmgr;
+extern int ncpus;
+
+isc_result_t
+isc_test_begin(FILE *logfile, isc_boolean_t start_managers);
+
+void
+isc_test_end(void);
+
+void
+isc_test_nap(isc_uint32_t usec);
diff --git a/lib/isc/tests/queue_test.c b/lib/isc/tests/queue_test.c
new file mode 100644
index 000000000000..74620fef42aa
--- /dev/null
+++ b/lib/isc/tests/queue_test.c
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <unistd.h>
+#include <time.h>
+
+#include <isc/queue.h>
+
+#include "isctest.h"
+
+typedef struct item {
+ int value;
+ ISC_QLINK(item_t) qlink;
+} item_t;
+
+typedef ISC_QUEUE(item_t) item_queue_t;
+
+static void
+item_init(item_t *item, int value) {
+ item->value = value;
+ ISC_QLINK_INIT(item, qlink);
+}
+
+/*
+ * Individual unit tests
+ */
+
+/* Test UDP sendto/recv (IPv4) */
+ATF_TC(queue_valid);
+ATF_TC_HEAD(queue_valid, tc) {
+ atf_tc_set_md_var(tc, "descr", "Check queue validity");
+}
+ATF_TC_BODY(queue_valid, tc) {
+ isc_result_t result;
+ item_queue_t queue;
+ item_t one, two, three, four, five;
+ item_t *p;
+
+ UNUSED(tc);
+
+ ISC_QUEUE_INIT(queue, qlink);
+
+ item_init(&one, 1);
+ item_init(&two, 2);
+ item_init(&three, 3);
+ item_init(&four, 4);
+ item_init(&five, 5);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ ATF_CHECK(ISC_QUEUE_EMPTY(queue));
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_CHECK(p == NULL);
+
+ ATF_CHECK(! ISC_QLINK_LINKED(&one, qlink));
+ ISC_QUEUE_PUSH(queue, &one, qlink);
+ ATF_CHECK(ISC_QLINK_LINKED(&one, qlink));
+
+ ATF_CHECK(! ISC_QUEUE_EMPTY(queue));
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 1);
+ ATF_CHECK(ISC_QUEUE_EMPTY(queue));
+ ATF_CHECK(! ISC_QLINK_LINKED(p, qlink));
+
+ ISC_QUEUE_PUSH(queue, p, qlink);
+ ATF_CHECK(! ISC_QUEUE_EMPTY(queue));
+ ATF_CHECK(ISC_QLINK_LINKED(p, qlink));
+
+ ATF_CHECK(! ISC_QLINK_LINKED(&two, qlink));
+ ISC_QUEUE_PUSH(queue, &two, qlink);
+ ATF_CHECK(ISC_QLINK_LINKED(&two, qlink));
+
+ ATF_CHECK(! ISC_QLINK_LINKED(&three, qlink));
+ ISC_QUEUE_PUSH(queue, &three, qlink);
+ ATF_CHECK(ISC_QLINK_LINKED(&three, qlink));
+
+ ATF_CHECK(! ISC_QLINK_LINKED(&four, qlink));
+ ISC_QUEUE_PUSH(queue, &four, qlink);
+ ATF_CHECK(ISC_QLINK_LINKED(&four, qlink));
+
+ ATF_CHECK(! ISC_QLINK_LINKED(&five, qlink));
+ ISC_QUEUE_PUSH(queue, &five, qlink);
+ ATF_CHECK(ISC_QLINK_LINKED(&five, qlink));
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 1);
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 2);
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 3);
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 4);
+
+ ISC_QUEUE_POP(queue, qlink, p);
+ ATF_REQUIRE(p != NULL);
+ ATF_CHECK_EQ(p->value, 5);
+
+ ATF_CHECK(ISC_QUEUE_EMPTY(queue));
+
+ ISC_QUEUE_DESTROY(queue);
+ isc_test_end();
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, queue_valid);
+
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/tests/socket_test.c b/lib/isc/tests/socket_test.c
new file mode 100644
index 000000000000..724d79df2bd1
--- /dev/null
+++ b/lib/isc/tests/socket_test.c
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <unistd.h>
+#include <time.h>
+
+#include <isc/socket.h>
+
+#include "../task_p.h"
+#include "isctest.h"
+
+/*
+ * Helper functions
+ */
+typedef struct {
+ isc_boolean_t done;
+ isc_result_t result;
+} completion_t;
+
+static void
+completion_init(completion_t *completion) {
+ completion->done = ISC_FALSE;
+}
+
+static void
+event_done(isc_task_t *task, isc_event_t *event) {
+ isc_socketevent_t *dev;
+ completion_t *completion = event->ev_arg;
+
+ UNUSED(task);
+
+ dev = (isc_socketevent_t *) event;
+ completion->result = dev->result;
+ completion->done = ISC_TRUE;
+ isc_event_free(&event);
+}
+
+static isc_result_t
+waitfor(completion_t *completion) {
+ int i = 0;
+ while (!completion->done && i++ < 5000) {
+#ifndef ISC_PLATFORM_USETHREADS
+ while (isc__taskmgr_ready(taskmgr))
+ isc__taskmgr_dispatch(taskmgr);
+#endif
+ isc_test_nap(1000);
+ }
+ if (completion->done)
+ return (ISC_R_SUCCESS);
+ return (ISC_R_FAILURE);
+}
+
+/*
+ * Individual unit tests
+ */
+
+/* Test UDP sendto/recv (IPv4) */
+ATF_TC(udp_sendto);
+ATF_TC_HEAD(udp_sendto, tc) {
+ atf_tc_set_md_var(tc, "descr", "UDP sendto/recv");
+}
+ATF_TC_BODY(udp_sendto, tc) {
+ isc_result_t result;
+ isc_sockaddr_t addr1, addr2;
+ struct in_addr in;
+ isc_socket_t *s1 = NULL, *s2 = NULL;
+ isc_task_t *task = NULL;
+ char sendbuf[BUFSIZ], recvbuf[BUFSIZ];
+ completion_t completion;
+ isc_region_t r;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ /*
+ * Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
+ * each other.
+ */
+ in.s_addr = inet_addr("127.0.0.1");
+ isc_sockaddr_fromin(&addr1, &in, 5444);
+ isc_sockaddr_fromin(&addr2, &in, 5445);
+
+ result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s1);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ result = isc_socket_bind(s1, &addr1, ISC_SOCKET_REUSEADDRESS);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ result = isc_socket_bind(s2, &addr2, ISC_SOCKET_REUSEADDRESS);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_task_create(taskmgr, 0, &task);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ strcpy(sendbuf, "Hello");
+ r.base = (void *) sendbuf;
+ r.length = strlen(sendbuf) + 1;
+
+ completion_init(&completion);
+ result = isc_socket_sendto(s1, &r, task, event_done, &completion,
+ &addr2, NULL);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+
+ r.base = (void *) recvbuf;
+ r.length = BUFSIZ;
+ completion_init(&completion);
+ result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+ ATF_CHECK_STREQ(recvbuf, "Hello");
+
+ isc_task_detach(&task);
+
+ isc_socket_detach(&s1);
+ isc_socket_detach(&s2);
+
+ isc_test_end();
+}
+
+/* Test UDP sendto/recv with duplicated socket */
+ATF_TC(udp_dup);
+ATF_TC_HEAD(udp_dup, tc) {
+ atf_tc_set_md_var(tc, "descr", "duplicated socket sendto/recv");
+}
+ATF_TC_BODY(udp_dup, tc) {
+ isc_result_t result;
+ isc_sockaddr_t addr1, addr2;
+ struct in_addr in;
+ isc_socket_t *s1 = NULL, *s2 = NULL, *s3 = NULL;
+ isc_task_t *task = NULL;
+ char sendbuf[BUFSIZ], recvbuf[BUFSIZ];
+ completion_t completion;
+ isc_region_t r;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ /*
+ * Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
+ * each other.
+ */
+ in.s_addr = inet_addr("127.0.0.1");
+ isc_sockaddr_fromin(&addr1, &in, 5444);
+ isc_sockaddr_fromin(&addr2, &in, 5445);
+
+ result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s1);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ result = isc_socket_bind(s1, &addr1, ISC_SOCKET_REUSEADDRESS);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp, &s2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ result = isc_socket_bind(s2, &addr2, ISC_SOCKET_REUSEADDRESS);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_socket_dup(s2, &s3);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_task_create(taskmgr, 0, &task);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ strcpy(sendbuf, "Hello");
+ r.base = (void *) sendbuf;
+ r.length = strlen(sendbuf) + 1;
+
+ completion_init(&completion);
+ result = isc_socket_sendto(s1, &r, task, event_done, &completion,
+ &addr2, NULL);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+
+ strcpy(sendbuf, "World");
+ r.base = (void *) sendbuf;
+ r.length = strlen(sendbuf) + 1;
+
+ completion_init(&completion);
+ result = isc_socket_sendto(s1, &r, task, event_done, &completion,
+ &addr2, NULL);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+
+ r.base = (void *) recvbuf;
+ r.length = BUFSIZ;
+ completion_init(&completion);
+ result = isc_socket_recv(s2, &r, 1, task, event_done, &completion);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+ ATF_CHECK_STREQ(recvbuf, "Hello");
+
+ r.base = (void *) recvbuf;
+ r.length = BUFSIZ;
+ completion_init(&completion);
+ result = isc_socket_recv(s3, &r, 1, task, event_done, &completion);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ waitfor(&completion);
+ ATF_CHECK(completion.done);
+ ATF_CHECK_EQ(completion.result, ISC_R_SUCCESS);
+ ATF_CHECK_STREQ(recvbuf, "World");
+
+ isc_task_detach(&task);
+
+ isc_socket_detach(&s1);
+ isc_socket_detach(&s2);
+ isc_socket_detach(&s3);
+
+ isc_test_end();
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, udp_sendto);
+ ATF_TP_ADD_TC(tp, udp_dup);
+
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/tests/symtab_test.c b/lib/isc/tests/symtab_test.c
new file mode 100644
index 000000000000..21444b4c48ec
--- /dev/null
+++ b/lib/isc/tests/symtab_test.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <unistd.h>
+
+#include <isc/symtab.h>
+#include <isc/print.h>
+
+#include "isctest.h"
+
+static void
+undefine(char *key, unsigned int type, isc_symvalue_t value, void *arg) {
+ UNUSED(arg);
+
+ ATF_REQUIRE_EQ(type, 1);
+ isc_mem_free(mctx, key);
+ isc_mem_free(mctx, value.as_pointer);
+}
+
+/*
+ * Individual unit tests
+ */
+
+ATF_TC(symtab_grow);
+ATF_TC_HEAD(symtab_grow, tc) {
+ atf_tc_set_md_var(tc, "descr", "symbol table growth");
+}
+ATF_TC_BODY(symtab_grow, tc) {
+ isc_result_t result;
+ isc_symtab_t *st = NULL;
+ isc_symvalue_t value;
+ isc_symexists_t policy = isc_symexists_reject;
+ int i;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_symtab_create(mctx, 3, undefine, NULL, ISC_FALSE, &st);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE(st != NULL);
+
+ /* Nothing should be in the table yet */
+
+ /*
+ * Put 1024 entries in the table (this should necessate
+ * regrowing the hash table several times
+ */
+ for (i = 0; i < 1024; i++) {
+ char str[16], *key;
+
+ snprintf(str, sizeof(str), "%04x", i);
+ key = isc_mem_strdup(mctx, str);
+ ATF_REQUIRE(key != NULL);
+ value.as_pointer = isc_mem_strdup(mctx, str);
+ ATF_REQUIRE(value.as_pointer != NULL);
+ result = isc_symtab_define(st, key, 1, value, policy);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ if (result != ISC_R_SUCCESS)
+ undefine(key, 1, value, NULL);
+ }
+
+ /*
+ * Try to put them in again; this should fail
+ */
+ for (i = 0; i < 1024; i++) {
+ char str[16], *key;
+
+ snprintf(str, sizeof(str), "%04x", i);
+ key = isc_mem_strdup(mctx, str);
+ ATF_REQUIRE(key != NULL);
+ value.as_pointer = isc_mem_strdup(mctx, str);
+ ATF_REQUIRE(value.as_pointer != NULL);
+ result = isc_symtab_define(st, key, 1, value, policy);
+ ATF_CHECK_EQ(result, ISC_R_EXISTS);
+ undefine(key, 1, value, NULL);
+ }
+
+ /*
+ * Retrieve them; this should succeed
+ */
+ for (i = 0; i < 1024; i++) {
+ char str[16];
+
+ snprintf(str, sizeof(str), "%04x", i);
+ result = isc_symtab_lookup(st, str, 0, &value);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ ATF_CHECK_STREQ(str, value.as_pointer);
+ }
+
+ /*
+ * Undefine them
+ */
+ for (i = 0; i < 1024; i++) {
+ char str[16];
+
+ snprintf(str, sizeof(str), "%04x", i);
+ result = isc_symtab_undefine(st, str, 1);
+ ATF_CHECK_EQ(result, ISC_R_SUCCESS);
+ }
+
+ /*
+ * Retrieve them again; this should fail
+ */
+ for (i = 0; i < 1024; i++) {
+ char str[16];
+
+ snprintf(str, sizeof(str), "%04x", i);
+ result = isc_symtab_lookup(st, str, 0, &value);
+ ATF_CHECK_EQ(result, ISC_R_NOTFOUND);
+ }
+
+ isc_symtab_destroy(&st);
+ isc_test_end();
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, symtab_grow);
+
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/tests/task_test.c b/lib/isc/tests/task_test.c
new file mode 100644
index 000000000000..7294d861d38a
--- /dev/null
+++ b/lib/isc/tests/task_test.c
@@ -0,0 +1,416 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <unistd.h>
+
+#include <isc/task.h>
+#include <isc/util.h>
+
+#include "../task_p.h"
+#include "isctest.h"
+
+/*
+ * Helper functions
+ */
+
+/* task event handler, sets a boolean to true */
+int counter = 0;
+isc_mutex_t set_lock;
+
+static void
+set(isc_task_t *task, isc_event_t *event) {
+ int *value = (int *) event->ev_arg;
+
+ UNUSED(task);
+
+ isc_event_free(&event);
+ LOCK(&set_lock);
+ *value = counter++;
+ UNLOCK(&set_lock);
+}
+
+static void
+set_and_drop(isc_task_t *task, isc_event_t *event) {
+ int *value = (int *) event->ev_arg;
+
+ UNUSED(task);
+
+ isc_event_free(&event);
+ LOCK(&set_lock);
+ *value = (int) isc_taskmgr_mode(taskmgr);
+ counter++;
+ UNLOCK(&set_lock);
+ isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_normal);
+}
+
+/*
+ * Individual unit tests
+ */
+
+/* Create a task */
+ATF_TC(create_task);
+ATF_TC_HEAD(create_task, tc) {
+ atf_tc_set_md_var(tc, "descr", "create and destroy a task");
+}
+ATF_TC_BODY(create_task, tc) {
+ isc_result_t result;
+ isc_task_t *task = NULL;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_task_create(taskmgr, 0, &task);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ isc_task_destroy(&task);
+ ATF_REQUIRE_EQ(task, NULL);
+
+ isc_test_end();
+}
+
+/* Process events */
+ATF_TC(all_events);
+ATF_TC_HEAD(all_events, tc) {
+ atf_tc_set_md_var(tc, "descr", "process task events");
+}
+ATF_TC_BODY(all_events, tc) {
+ isc_result_t result;
+ isc_task_t *task = NULL;
+ isc_event_t *event;
+ int a = 0, b = 0;
+ int i = 0;
+
+ UNUSED(tc);
+
+ counter = 1;
+
+ result = isc_mutex_init(&set_lock);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_task_create(taskmgr, 0, &task);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ /* First event */
+ event = isc_event_allocate(mctx, task, ISC_TASKEVENT_TEST,
+ set, &a, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(a, 0);
+ isc_task_send(task, &event);
+
+ event = isc_event_allocate(mctx, task, ISC_TASKEVENT_TEST,
+ set, &b, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(b, 0);
+ isc_task_send(task, &event);
+
+ while ((a == 0 || b == 0) && i++ < 5000) {
+#ifndef ISC_PLATFORM_USETHREADS
+ while (isc__taskmgr_ready(taskmgr))
+ isc__taskmgr_dispatch(taskmgr);
+#endif
+ isc_test_nap(1000);
+ }
+
+ ATF_CHECK(a != 0);
+ ATF_CHECK(b != 0);
+
+ isc_task_destroy(&task);
+ ATF_REQUIRE_EQ(task, NULL);
+
+ isc_test_end();
+}
+
+/* Privileged events */
+ATF_TC(privileged_events);
+ATF_TC_HEAD(privileged_events, tc) {
+ atf_tc_set_md_var(tc, "descr", "process privileged events");
+}
+ATF_TC_BODY(privileged_events, tc) {
+ isc_result_t result;
+ isc_task_t *task1 = NULL, *task2 = NULL;
+ isc_event_t *event;
+ int a = 0, b = 0, c = 0, d = 0, e = 0;
+ int i = 0;
+
+ UNUSED(tc);
+
+ counter = 1;
+ result = isc_mutex_init(&set_lock);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+#ifdef ISC_PLATFORM_USETHREADS
+ /*
+ * Pause the task manager so we can fill up the work queue
+ * without things happening while we do it.
+ */
+ isc__taskmgr_pause(taskmgr);
+#endif
+
+ result = isc_task_create(taskmgr, 0, &task1);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ isc_task_setname(task1, "privileged", NULL);
+ ATF_CHECK(!isc_task_privilege(task1));
+ isc_task_setprivilege(task1, ISC_TRUE);
+ ATF_CHECK(isc_task_privilege(task1));
+
+ result = isc_task_create(taskmgr, 0, &task2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ isc_task_setname(task2, "normal", NULL);
+ ATF_CHECK(!isc_task_privilege(task2));
+
+ /* First event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set, &a, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(a, 0);
+ isc_task_send(task1, &event);
+
+ /* Second event: not privileged */
+ event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
+ set, &b, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(b, 0);
+ isc_task_send(task2, &event);
+
+ /* Third event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set, &c, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(c, 0);
+ isc_task_send(task1, &event);
+
+ /* Fourth event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set, &d, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(d, 0);
+ isc_task_send(task1, &event);
+
+ /* Fifth event: not privileged */
+ event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
+ set, &e, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(e, 0);
+ isc_task_send(task2, &event);
+
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
+ isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_privileged);
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_privileged);
+
+#ifdef ISC_PLATFORM_USETHREADS
+ isc__taskmgr_resume(taskmgr);
+#endif
+
+ /* We're waiting for *all* variables to be set */
+ while ((a == 0 || b == 0 || c == 0 || d == 0 || e == 0) && i++ < 5000) {
+#ifndef ISC_PLATFORM_USETHREADS
+ while (isc__taskmgr_ready(taskmgr))
+ isc__taskmgr_dispatch(taskmgr);
+#endif
+ isc_test_nap(1000);
+ }
+
+ /*
+ * We can't guarantee what order the events fire, but
+ * we do know the privileged tasks that set a, c, and d
+ * would have fired first.
+ */
+ ATF_CHECK(a <= 3);
+ ATF_CHECK(c <= 3);
+ ATF_CHECK(d <= 3);
+
+ /* ...and the non-privileged tasks that set b and e, last */
+ ATF_CHECK(b >= 4);
+ ATF_CHECK(e >= 4);
+
+ ATF_CHECK_EQ(counter, 6);
+
+ isc_task_setprivilege(task1, ISC_FALSE);
+ ATF_CHECK(!isc_task_privilege(task1));
+
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
+
+ isc_task_destroy(&task1);
+ ATF_REQUIRE_EQ(task1, NULL);
+ isc_task_destroy(&task2);
+ ATF_REQUIRE_EQ(task2, NULL);
+
+ isc_test_end();
+}
+
+/*
+ * Edge case: this tests that the task manager behaves as expected when
+ * we explicitly set it into normal mode *while* running privileged.
+ */
+ATF_TC(privilege_drop);
+ATF_TC_HEAD(privilege_drop, tc) {
+ atf_tc_set_md_var(tc, "descr", "process privileged events");
+}
+ATF_TC_BODY(privilege_drop, tc) {
+ isc_result_t result;
+ isc_task_t *task1 = NULL, *task2 = NULL;
+ isc_event_t *event;
+ int a = -1, b = -1, c = -1, d = -1, e = -1; /* non valid states */
+ int i = 0;
+
+ UNUSED(tc);
+
+ counter = 1;
+ result = isc_mutex_init(&set_lock);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+#ifdef ISC_PLATFORM_USETHREADS
+ /*
+ * Pause the task manager so we can fill up the work queue
+ * without things happening while we do it.
+ */
+ isc__taskmgr_pause(taskmgr);
+#endif
+
+ result = isc_task_create(taskmgr, 0, &task1);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ isc_task_setname(task1, "privileged", NULL);
+ ATF_CHECK(!isc_task_privilege(task1));
+ isc_task_setprivilege(task1, ISC_TRUE);
+ ATF_CHECK(isc_task_privilege(task1));
+
+ result = isc_task_create(taskmgr, 0, &task2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ isc_task_setname(task2, "normal", NULL);
+ ATF_CHECK(!isc_task_privilege(task2));
+
+ /* First event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set_and_drop, &a, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(a, -1);
+ isc_task_send(task1, &event);
+
+ /* Second event: not privileged */
+ event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
+ set_and_drop, &b, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(b, -1);
+ isc_task_send(task2, &event);
+
+ /* Third event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set_and_drop, &c, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(c, -1);
+ isc_task_send(task1, &event);
+
+ /* Fourth event: privileged */
+ event = isc_event_allocate(mctx, task1, ISC_TASKEVENT_TEST,
+ set_and_drop, &d, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(d, -1);
+ isc_task_send(task1, &event);
+
+ /* Fifth event: not privileged */
+ event = isc_event_allocate(mctx, task2, ISC_TASKEVENT_TEST,
+ set_and_drop, &e, sizeof (isc_event_t));
+ ATF_REQUIRE(event != NULL);
+
+ ATF_CHECK_EQ(e, -1);
+ isc_task_send(task2, &event);
+
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
+ isc_taskmgr_setmode(taskmgr, isc_taskmgrmode_privileged);
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_privileged);
+
+#ifdef ISC_PLATFORM_USETHREADS
+ isc__taskmgr_resume(taskmgr);
+#endif
+
+ /* We're waiting for all variables to be set. */
+ while ((a == -1 || b == -1 || c == -1 || d == -1 || e == -1) &&
+ i++ < 5000) {
+#ifndef ISC_PLATFORM_USETHREADS
+ while (isc__taskmgr_ready(taskmgr))
+ isc__taskmgr_dispatch(taskmgr);
+#endif
+ isc_test_nap(1000);
+ }
+
+ /*
+ * We can't guarantee what order the events fire, but
+ * we do know *exactly one* of the privileged tasks will
+ * have run in privileged mode...
+ */
+ ATF_CHECK(a == isc_taskmgrmode_privileged ||
+ c == isc_taskmgrmode_privileged ||
+ d == isc_taskmgrmode_privileged);
+ ATF_CHECK(a + c + d == isc_taskmgrmode_privileged);
+
+ /* ...and neither of the non-privileged tasks did... */
+ ATF_CHECK(b == isc_taskmgrmode_normal || e == isc_taskmgrmode_normal);
+
+ /* ...but all five of them did run. */
+ ATF_CHECK_EQ(counter, 6);
+
+ ATF_CHECK_EQ(isc_taskmgr_mode(taskmgr), isc_taskmgrmode_normal);
+
+ isc_task_destroy(&task1);
+ ATF_REQUIRE_EQ(task1, NULL);
+ isc_task_destroy(&task2);
+ ATF_REQUIRE_EQ(task2, NULL);
+
+ isc_test_end();
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, create_task);
+ ATF_TP_ADD_TC(tp, all_events);
+ ATF_TP_ADD_TC(tp, privileged_events);
+ ATF_TP_ADD_TC(tp, privilege_drop);
+
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/tests/taskpool_test.c b/lib/isc/tests/taskpool_test.c
new file mode 100644
index 000000000000..aecb694f2f3f
--- /dev/null
+++ b/lib/isc/tests/taskpool_test.c
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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$ */
+
+/*! \file */
+
+#include <config.h>
+
+#include <atf-c.h>
+
+#include <unistd.h>
+
+#include <isc/task.h>
+#include <isc/taskpool.h>
+
+#include "isctest.h"
+
+/*
+ * Individual unit tests
+ */
+
+/* Create a taskpool */
+ATF_TC(create_pool);
+ATF_TC_HEAD(create_pool, tc) {
+ atf_tc_set_md_var(tc, "descr", "create a taskpool");
+}
+ATF_TC_BODY(create_pool, tc) {
+ isc_result_t result;
+ isc_taskpool_t *pool = NULL;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_taskpool_create(taskmgr, mctx, 8, 2, &pool);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool), 8);
+
+ isc_taskpool_destroy(&pool);
+ ATF_REQUIRE_EQ(pool, NULL);
+
+ isc_test_end();
+}
+
+/* Resize a taskpool */
+ATF_TC(expand_pool);
+ATF_TC_HEAD(expand_pool, tc) {
+ atf_tc_set_md_var(tc, "descr", "expand a taskpool");
+}
+ATF_TC_BODY(expand_pool, tc) {
+ isc_result_t result;
+ isc_taskpool_t *pool1 = NULL, *pool2 = NULL, *hold = NULL;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_taskpool_create(taskmgr, mctx, 10, 2, &pool1);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool1), 10);
+
+ /* resizing to a smaller size should have no effect */
+ hold = pool1;
+ result = isc_taskpool_expand(&pool1, 5, &pool2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 10);
+ ATF_REQUIRE_EQ(pool2, hold);
+ ATF_REQUIRE_EQ(pool1, NULL);
+ pool1 = pool2;
+ pool2 = NULL;
+
+ /* resizing to the same size should have no effect */
+ hold = pool1;
+ result = isc_taskpool_expand(&pool1, 10, &pool2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 10);
+ ATF_REQUIRE_EQ(pool2, hold);
+ ATF_REQUIRE_EQ(pool1, NULL);
+ pool1 = pool2;
+ pool2 = NULL;
+
+ /* resizing to larger size should make a new pool */
+ hold = pool1;
+ result = isc_taskpool_expand(&pool1, 20, &pool2);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool2), 20);
+ ATF_REQUIRE(pool2 != hold);
+ ATF_REQUIRE_EQ(pool1, NULL);
+
+ isc_taskpool_destroy(&pool2);
+ ATF_REQUIRE_EQ(pool2, NULL);
+
+ isc_test_end();
+}
+
+/* Get tasks */
+ATF_TC(get_tasks);
+ATF_TC_HEAD(get_tasks, tc) {
+ atf_tc_set_md_var(tc, "descr", "create a taskpool");
+}
+ATF_TC_BODY(get_tasks, tc) {
+ isc_result_t result;
+ isc_taskpool_t *pool = NULL;
+ isc_task_t *task1 = NULL, *task2 = NULL, *task3 = NULL;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool), 2);
+
+ /* two tasks in pool; make sure we can access them more than twice */
+ isc_taskpool_gettask(pool, &task1);
+ ATF_REQUIRE(ISCAPI_TASK_VALID(task1));
+
+ isc_taskpool_gettask(pool, &task2);
+ ATF_REQUIRE(ISCAPI_TASK_VALID(task2));
+
+ isc_taskpool_gettask(pool, &task3);
+ ATF_REQUIRE(ISCAPI_TASK_VALID(task3));
+
+ isc_task_destroy(&task1);
+ isc_task_destroy(&task2);
+ isc_task_destroy(&task3);
+
+ isc_taskpool_destroy(&pool);
+ ATF_REQUIRE_EQ(pool, NULL);
+
+ isc_test_end();
+}
+
+/* Get tasks */
+ATF_TC(set_privilege);
+ATF_TC_HEAD(set_privilege, tc) {
+ atf_tc_set_md_var(tc, "descr", "create a taskpool");
+}
+ATF_TC_BODY(set_privilege, tc) {
+ isc_result_t result;
+ isc_taskpool_t *pool = NULL;
+ isc_task_t *task1 = NULL, *task2 = NULL, *task3 = NULL;
+
+ UNUSED(tc);
+
+ result = isc_test_begin(NULL, ISC_TRUE);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+ result = isc_taskpool_create(taskmgr, mctx, 2, 2, &pool);
+ ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+ ATF_REQUIRE_EQ(isc_taskpool_size(pool), 2);
+
+ isc_taskpool_setprivilege(pool, ISC_TRUE);
+
+ isc_taskpool_gettask(pool, &task1);
+ isc_taskpool_gettask(pool, &task2);
+ isc_taskpool_gettask(pool, &task3);
+
+ ATF_CHECK(ISCAPI_TASK_VALID(task1));
+ ATF_CHECK(ISCAPI_TASK_VALID(task2));
+ ATF_CHECK(ISCAPI_TASK_VALID(task3));
+
+ ATF_CHECK(isc_task_privilege(task1));
+ ATF_CHECK(isc_task_privilege(task2));
+ ATF_CHECK(isc_task_privilege(task3));
+
+ isc_taskpool_setprivilege(pool, ISC_FALSE);
+
+ ATF_CHECK(!isc_task_privilege(task1));
+ ATF_CHECK(!isc_task_privilege(task2));
+ ATF_CHECK(!isc_task_privilege(task3));
+
+ isc_task_destroy(&task1);
+ isc_task_destroy(&task2);
+ isc_task_destroy(&task3);
+
+ isc_taskpool_destroy(&pool);
+ ATF_REQUIRE_EQ(pool, NULL);
+
+ isc_test_end();
+}
+
+/*
+ * Main
+ */
+ATF_TP_ADD_TCS(tp) {
+ ATF_TP_ADD_TC(tp, create_pool);
+ ATF_TP_ADD_TC(tp, expand_pool);
+ ATF_TP_ADD_TC(tp, get_tasks);
+ ATF_TP_ADD_TC(tp, set_privilege);
+
+ return (atf_no_error());
+}
+
diff --git a/lib/isc/timer.c b/lib/isc/timer.c
index 21fcd694eff1..0da251f4c31b 100644
--- a/lib/isc/timer.c
+++ b/lib/isc/timer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.c,v 1.84.58.4 2009/01/23 23:47:21 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -34,9 +34,22 @@
#include <isc/timer.h>
#include <isc/util.h>
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef OPENSSL_LEAKS
+#include <openssl/err.h>
+#endif
+
+/* See task.c about the following definition: */
+#ifdef BIND9
+#ifdef ISC_PLATFORM_USETHREADS
+#define USE_TIMER_THREAD
+#else
+#define USE_SHARED_MANAGER
+#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* BIND9 */
+
+#ifndef USE_TIMER_THREAD
#include "timer_p.h"
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
#ifdef ISC_TIMER_TRACE
#define XTRACE(s) fprintf(stderr, "%s\n", (s))
@@ -58,10 +71,13 @@
#define TIMER_MAGIC ISC_MAGIC('T', 'I', 'M', 'R')
#define VALID_TIMER(t) ISC_MAGIC_VALID(t, TIMER_MAGIC)
-struct isc_timer {
+typedef struct isc__timer isc__timer_t;
+typedef struct isc__timermgr isc__timermgr_t;
+
+struct isc__timer {
/*! Not locked. */
- unsigned int magic;
- isc_timermgr_t * manager;
+ isc_timer_t common;
+ isc__timermgr_t * manager;
isc_mutex_t lock;
/*! Locked by timer lock. */
unsigned int references;
@@ -75,45 +91,119 @@ struct isc_timer {
void * arg;
unsigned int index;
isc_time_t due;
- LINK(isc_timer_t) link;
+ LINK(isc__timer_t) link;
};
#define TIMER_MANAGER_MAGIC ISC_MAGIC('T', 'I', 'M', 'M')
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, TIMER_MANAGER_MAGIC)
-struct isc_timermgr {
+struct isc__timermgr {
/* Not locked. */
- unsigned int magic;
+ isc_timermgr_t common;
isc_mem_t * mctx;
isc_mutex_t lock;
/* Locked by manager lock. */
isc_boolean_t done;
- LIST(isc_timer_t) timers;
+ LIST(isc__timer_t) timers;
unsigned int nscheduled;
isc_time_t due;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
isc_condition_t wakeup;
isc_thread_t thread;
-#else /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
+#ifdef USE_SHARED_MANAGER
unsigned int refs;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
isc_heap_t * heap;
};
-#ifndef ISC_PLATFORM_USETHREADS
+/*%
+ * The followings can be either static or public, depending on build
+ * environment.
+ */
+
+#ifdef BIND9
+#define ISC_TIMERFUNC_SCOPE
+#else
+#define ISC_TIMERFUNC_SCOPE static
+#endif
+
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_create(isc_timermgr_t *manager, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_timer_t **timerp);
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_reset(isc_timer_t *timer, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_boolean_t purge);
+ISC_TIMERFUNC_SCOPE isc_timertype_t
+isc__timer_gettype(isc_timer_t *timer);
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_touch(isc_timer_t *timer);
+ISC_TIMERFUNC_SCOPE void
+isc__timer_attach(isc_timer_t *timer0, isc_timer_t **timerp);
+ISC_TIMERFUNC_SCOPE void
+isc__timer_detach(isc_timer_t **timerp);
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp);
+ISC_TIMERFUNC_SCOPE void
+isc__timermgr_poke(isc_timermgr_t *manager0);
+ISC_TIMERFUNC_SCOPE void
+isc__timermgr_destroy(isc_timermgr_t **managerp);
+
+static struct isc__timermethods {
+ isc_timermethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *gettype;
+#endif
+} timermethods = {
+ {
+ isc__timer_attach,
+ isc__timer_detach,
+ isc__timer_reset,
+ isc__timer_touch
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__timer_gettype
+#endif
+};
+
+static struct isc__timermgrmethods {
+ isc_timermgrmethods_t methods;
+#ifndef BIND9
+ void *poke; /* see above */
+#endif
+} timermgrmethods = {
+ {
+ isc__timermgr_destroy,
+ isc__timer_create
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__timermgr_poke
+#endif
+};
+
+#ifdef USE_SHARED_MANAGER
/*!
- * If threads are not in use, there can be only one.
+ * If the manager is supposed to be shared, there can be only one.
*/
-static isc_timermgr_t *timermgr = NULL;
-#endif /* ISC_PLATFORM_USETHREADS */
+static isc__timermgr_t *timermgr = NULL;
+#endif /* USE_SHARED_MANAGER */
static inline isc_result_t
-schedule(isc_timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
+schedule(isc__timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
isc_result_t result;
- isc_timermgr_t *manager;
+ isc__timermgr_t *manager;
isc_time_t due;
int cmp;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
isc_boolean_t timedwait;
#endif
@@ -123,13 +213,13 @@ schedule(isc_timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
REQUIRE(timer->type != isc_timertype_inactive);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_TIMER_THREAD
UNUSED(signal_ok);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
manager = timer->manager;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
/*!
* If the manager was timed wait, we may need to signal the
* manager to force a wakeup.
@@ -199,7 +289,7 @@ schedule(isc_timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
* the current "next" timer. We do this either by waking up the
* run thread, or explicitly setting the value in the manager.
*/
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
/*
* This is a temporary (probably) hack to fix a bug on tru64 5.1
@@ -232,19 +322,21 @@ schedule(isc_timer_t *timer, isc_time_t *now, isc_boolean_t signal_ok) {
"signal (schedule)"));
SIGNAL(&manager->wakeup);
}
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_TIMER_THREAD */
if (timer->index == 1 &&
isc_time_compare(&timer->due, &manager->due) < 0)
manager->due = timer->due;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
return (ISC_R_SUCCESS);
}
static inline void
-deschedule(isc_timer_t *timer) {
+deschedule(isc__timer_t *timer) {
+#ifdef USE_TIMER_THREAD
isc_boolean_t need_wakeup = ISC_FALSE;
- isc_timermgr_t *manager;
+#endif
+ isc__timermgr_t *manager;
/*
* The caller must ensure locking.
@@ -252,26 +344,28 @@ deschedule(isc_timer_t *timer) {
manager = timer->manager;
if (timer->index > 0) {
+#ifdef USE_TIMER_THREAD
if (timer->index == 1)
need_wakeup = ISC_TRUE;
+#endif
isc_heap_delete(manager->heap, timer->index);
timer->index = 0;
INSIST(manager->nscheduled > 0);
manager->nscheduled--;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
if (need_wakeup) {
XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
ISC_MSG_SIGNALDESCHED,
"signal (deschedule)"));
SIGNAL(&manager->wakeup);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
}
}
static void
-destroy(isc_timer_t *timer) {
- isc_timermgr_t *manager = timer->manager;
+destroy(isc__timer_t *timer) {
+ isc__timermgr_t *manager = timer->manager;
/*
* The caller must ensure it is safe to destroy the timer.
@@ -291,17 +385,19 @@ destroy(isc_timer_t *timer) {
isc_task_detach(&timer->task);
DESTROYLOCK(&timer->lock);
- timer->magic = 0;
+ timer->common.impmagic = 0;
+ timer->common.magic = 0;
isc_mem_put(manager->mctx, timer, sizeof(*timer));
}
-isc_result_t
-isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_timer_t **timerp)
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_create(isc_timermgr_t *manager0, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_timer_t **timerp)
{
- isc_timer_t *timer;
+ isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
+ isc__timer_t *timer;
isc_result_t result;
isc_time_t now;
@@ -382,7 +478,9 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
return (result);
}
ISC_LINK_INIT(timer, link);
- timer->magic = TIMER_MAGIC;
+ timer->common.impmagic = TIMER_MAGIC;
+ timer->common.magic = ISCAPI_TIMER_MAGIC;
+ timer->common.methods = (isc_timermethods_t *)&timermethods;
LOCK(&manager->lock);
@@ -401,25 +499,27 @@ isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
UNLOCK(&manager->lock);
if (result != ISC_R_SUCCESS) {
- timer->magic = 0;
+ timer->common.impmagic = 0;
+ timer->common.magic = 0;
DESTROYLOCK(&timer->lock);
isc_task_detach(&timer->task);
isc_mem_put(manager->mctx, timer, sizeof(*timer));
return (result);
}
- *timerp = timer;
+ *timerp = (isc_timer_t *)timer;
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
- isc_time_t *expires, isc_interval_t *interval,
- isc_boolean_t purge)
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_reset(isc_timer_t *timer0, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_boolean_t purge)
{
+ isc__timer_t *timer = (isc__timer_t *)timer0;
isc_time_t now;
- isc_timermgr_t *manager;
+ isc__timermgr_t *manager;
isc_result_t result;
/*
@@ -431,6 +531,7 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
REQUIRE(VALID_TIMER(timer));
manager = timer->manager;
REQUIRE(VALID_MANAGER(manager));
+
if (expires == NULL)
expires = isc_time_epoch;
if (interval == NULL)
@@ -454,8 +555,6 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
isc_time_settoepoch(&now);
}
- manager = timer->manager;
-
LOCK(&manager->lock);
LOCK(&timer->lock);
@@ -489,8 +588,9 @@ isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
return (result);
}
-isc_timertype_t
-isc_timer_gettype(isc_timer_t *timer) {
+ISC_TIMERFUNC_SCOPE isc_timertype_t
+isc__timer_gettype(isc_timer_t *timer0) {
+ isc__timer_t *timer = (isc__timer_t *)timer0;
isc_timertype_t t;
REQUIRE(VALID_TIMER(timer));
@@ -502,8 +602,9 @@ isc_timer_gettype(isc_timer_t *timer) {
return (t);
}
-isc_result_t
-isc_timer_touch(isc_timer_t *timer) {
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timer_touch(isc_timer_t *timer0) {
+ isc__timer_t *timer = (isc__timer_t *)timer0;
isc_result_t result;
isc_time_t now;
@@ -532,8 +633,10 @@ isc_timer_touch(isc_timer_t *timer) {
return (result);
}
-void
-isc_timer_attach(isc_timer_t *timer, isc_timer_t **timerp) {
+ISC_TIMERFUNC_SCOPE void
+isc__timer_attach(isc_timer_t *timer0, isc_timer_t **timerp) {
+ isc__timer_t *timer = (isc__timer_t *)timer0;
+
/*
* Attach *timerp to timer.
*/
@@ -545,12 +648,12 @@ isc_timer_attach(isc_timer_t *timer, isc_timer_t **timerp) {
timer->references++;
UNLOCK(&timer->lock);
- *timerp = timer;
+ *timerp = (isc_timer_t *)timer;
}
-void
-isc_timer_detach(isc_timer_t **timerp) {
- isc_timer_t *timer;
+ISC_TIMERFUNC_SCOPE void
+isc__timer_detach(isc_timer_t **timerp) {
+ isc__timer_t *timer;
isc_boolean_t free_timer = ISC_FALSE;
/*
@@ -558,7 +661,7 @@ isc_timer_detach(isc_timer_t **timerp) {
*/
REQUIRE(timerp != NULL);
- timer = *timerp;
+ timer = (isc__timer_t *)*timerp;
REQUIRE(VALID_TIMER(timer));
LOCK(&timer->lock);
@@ -575,11 +678,11 @@ isc_timer_detach(isc_timer_t **timerp) {
}
static void
-dispatch(isc_timermgr_t *manager, isc_time_t *now) {
+dispatch(isc__timermgr_t *manager, isc_time_t *now) {
isc_boolean_t done = ISC_FALSE, post_event, need_schedule;
isc_timerevent_t *event;
isc_eventtype_t type = 0;
- isc_timer_t *timer;
+ isc__timer_t *timer;
isc_result_t result;
isc_boolean_t idle;
@@ -693,13 +796,13 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
}
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
static isc_threadresult_t
#ifdef _WIN32 /* XXXDCL */
WINAPI
#endif
run(void *uap) {
- isc_timermgr_t *manager = uap;
+ isc__timermgr_t *manager = uap;
isc_time_t now;
isc_result_t result;
@@ -732,13 +835,17 @@ run(void *uap) {
}
UNLOCK(&manager->lock);
+#ifdef OPENSSL_LEAKS
+ ERR_remove_state(0);
+#endif
+
return ((isc_threadresult_t)0);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
static isc_boolean_t
sooner(void *v1, void *v2) {
- isc_timer_t *t1, *t2;
+ isc__timer_t *t1, *t2;
t1 = v1;
t2 = v2;
@@ -752,7 +859,7 @@ sooner(void *v1, void *v2) {
static void
set_index(void *what, unsigned int index) {
- isc_timer_t *timer;
+ isc__timer_t *timer;
timer = what;
REQUIRE(VALID_TIMER(timer));
@@ -760,9 +867,9 @@ set_index(void *what, unsigned int index) {
timer->index = index;
}
-isc_result_t
-isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
- isc_timermgr_t *manager;
+ISC_TIMERFUNC_SCOPE isc_result_t
+isc__timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
+ isc__timermgr_t *manager;
isc_result_t result;
/*
@@ -771,19 +878,21 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
REQUIRE(managerp != NULL && *managerp == NULL);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef USE_SHARED_MANAGER
if (timermgr != NULL) {
timermgr->refs++;
- *managerp = timermgr;
+ *managerp = (isc_timermgr_t *)timermgr;
return (ISC_R_SUCCESS);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
manager = isc_mem_get(mctx, sizeof(*manager));
if (manager == NULL)
return (ISC_R_NOMEMORY);
- manager->magic = TIMER_MANAGER_MAGIC;
+ manager->common.impmagic = TIMER_MANAGER_MAGIC;
+ manager->common.magic = ISCAPI_TIMERMGR_MAGIC;
+ manager->common.methods = (isc_timermgrmethods_t *)&timermgrmethods;
manager->mctx = NULL;
manager->done = ISC_FALSE;
INIT_LIST(manager->timers);
@@ -803,7 +912,7 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
return (result);
}
isc_mem_attach(mctx, &manager->mctx);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
if (isc_condition_init(&manager->wakeup) != ISC_R_SUCCESS) {
isc_mem_detach(&manager->mctx);
DESTROYLOCK(&manager->lock);
@@ -828,30 +937,33 @@ isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
ISC_MSG_FAILED, "failed"));
return (ISC_R_UNEXPECTED);
}
-#else /* ISC_PLATFORM_USETHREADS */
+#endif
+#ifdef USE_SHARED_MANAGER
manager->refs = 1;
timermgr = manager;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
- *managerp = manager;
+ *managerp = (isc_timermgr_t *)manager;
return (ISC_R_SUCCESS);
}
-void
-isc_timermgr_poke(isc_timermgr_t *manager) {
-#ifdef ISC_PLATFORM_USETHREADS
+ISC_TIMERFUNC_SCOPE void
+isc__timermgr_poke(isc_timermgr_t *manager0) {
+#ifdef USE_TIMER_THREAD
+ isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
+
REQUIRE(VALID_MANAGER(manager));
SIGNAL(&manager->wakeup);
#else
- UNUSED(manager);
+ UNUSED(manager0);
#endif
}
-void
-isc_timermgr_destroy(isc_timermgr_t **managerp) {
- isc_timermgr_t *manager;
+ISC_TIMERFUNC_SCOPE void
+isc__timermgr_destroy(isc_timermgr_t **managerp) {
+ isc__timermgr_t *manager;
isc_mem_t *mctx;
/*
@@ -859,34 +971,37 @@ isc_timermgr_destroy(isc_timermgr_t **managerp) {
*/
REQUIRE(managerp != NULL);
- manager = *managerp;
+ manager = (isc__timermgr_t *)*managerp;
REQUIRE(VALID_MANAGER(manager));
LOCK(&manager->lock);
-#ifndef ISC_PLATFORM_USETHREADS
- if (manager->refs > 1) {
- manager->refs--;
+#ifdef USE_SHARED_MANAGER
+ manager->refs--;
+ if (manager->refs > 0) {
UNLOCK(&manager->lock);
*managerp = NULL;
return;
}
+ timermgr = NULL;
+#endif /* USE_SHARED_MANAGER */
- isc__timermgr_dispatch();
-#endif /* ISC_PLATFORM_USETHREADS */
+#ifndef USE_TIMER_THREAD
+ isc__timermgr_dispatch((isc_timermgr_t *)manager);
+#endif
REQUIRE(EMPTY(manager->timers));
manager->done = ISC_TRUE;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
XTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_TIMER,
ISC_MSG_SIGNALDESTROY, "signal (destroy)"));
SIGNAL(&manager->wakeup);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
UNLOCK(&manager->lock);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
/*
* Wait for thread to exit.
*/
@@ -895,39 +1010,63 @@ isc_timermgr_destroy(isc_timermgr_t **managerp) {
"isc_thread_join() %s",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"));
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
/*
* Clean up.
*/
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_TIMER_THREAD
(void)isc_condition_destroy(&manager->wakeup);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
DESTROYLOCK(&manager->lock);
isc_heap_destroy(&manager->heap);
- manager->magic = 0;
+ manager->common.impmagic = 0;
+ manager->common.magic = 0;
mctx = manager->mctx;
isc_mem_put(mctx, manager, sizeof(*manager));
isc_mem_detach(&mctx);
*managerp = NULL;
+
+#ifdef USE_SHARED_MANAGER
+ timermgr = NULL;
+#endif
}
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_TIMER_THREAD
isc_result_t
-isc__timermgr_nextevent(isc_time_t *when) {
- if (timermgr == NULL || timermgr->nscheduled == 0)
+isc__timermgr_nextevent(isc_timermgr_t *manager0, isc_time_t *when) {
+ isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
+
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = timermgr;
+#endif
+ if (manager == NULL || manager->nscheduled == 0)
return (ISC_R_NOTFOUND);
- *when = timermgr->due;
+ *when = manager->due;
return (ISC_R_SUCCESS);
}
void
-isc__timermgr_dispatch(void) {
+isc__timermgr_dispatch(isc_timermgr_t *manager0) {
+ isc__timermgr_t *manager = (isc__timermgr_t *)manager0;
isc_time_t now;
- if (timermgr == NULL)
+
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = timermgr;
+#endif
+ if (manager == NULL)
return;
TIME_NOW(&now);
- dispatch(timermgr, &now);
+ dispatch(manager, &now);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_TIMER_THREAD */
+
+#ifdef USE_TIMERIMPREGISTER
+isc_result_t
+isc__timer_register() {
+ return (isc_timer_register(isc__timermgr_create));
+}
+#endif
diff --git a/lib/isc/timer_api.c b/lib/isc/timer_api.c
new file mode 100644
index 000000000000..97e62b3f0ec4
--- /dev/null
+++ b/lib/isc/timer_api.c
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: timer_api.c,v 1.4 2009/09/02 23:48:02 tbox Exp $ */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <isc/app.h>
+#include <isc/magic.h>
+#include <isc/mutex.h>
+#include <isc/once.h>
+#include <isc/timer.h>
+#include <isc/util.h>
+
+static isc_mutex_t createlock;
+static isc_once_t once = ISC_ONCE_INIT;
+static isc_timermgrcreatefunc_t timermgr_createfunc = NULL;
+
+static void
+initialize(void) {
+ RUNTIME_CHECK(isc_mutex_init(&createlock) == ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_timer_register(isc_timermgrcreatefunc_t createfunc) {
+ isc_result_t result = ISC_R_SUCCESS;
+
+ RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
+
+ LOCK(&createlock);
+ if (timermgr_createfunc == NULL)
+ timermgr_createfunc = createfunc;
+ else
+ result = ISC_R_EXISTS;
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+isc_result_t
+isc_timermgr_createinctx(isc_mem_t *mctx, isc_appctx_t *actx,
+ isc_timermgr_t **managerp)
+{
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(timermgr_createfunc != NULL);
+ result = (*timermgr_createfunc)(mctx, managerp);
+
+ UNLOCK(&createlock);
+
+ if (result == ISC_R_SUCCESS)
+ isc_appctx_settimermgr(actx, *managerp);
+
+ return (result);
+}
+
+isc_result_t
+isc_timermgr_create(isc_mem_t *mctx, isc_timermgr_t **managerp) {
+ isc_result_t result;
+
+ LOCK(&createlock);
+
+ REQUIRE(timermgr_createfunc != NULL);
+ result = (*timermgr_createfunc)(mctx, managerp);
+
+ UNLOCK(&createlock);
+
+ return (result);
+}
+
+void
+isc_timermgr_destroy(isc_timermgr_t **managerp) {
+ REQUIRE(*managerp != NULL && ISCAPI_TIMERMGR_VALID(*managerp));
+
+ (*managerp)->methods->destroy(managerp);
+
+ ENSURE(*managerp == NULL);
+}
+
+isc_result_t
+isc_timer_create(isc_timermgr_t *manager, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_timer_t **timerp)
+{
+ REQUIRE(ISCAPI_TIMERMGR_VALID(manager));
+
+ return (manager->methods->timercreate(manager, type, expires,
+ interval, task, action, arg,
+ timerp));
+}
+
+void
+isc_timer_attach(isc_timer_t *timer, isc_timer_t **timerp) {
+ REQUIRE(ISCAPI_TIMER_VALID(timer));
+ REQUIRE(timerp != NULL && *timerp == NULL);
+
+ timer->methods->attach(timer, timerp);
+
+ ENSURE(*timerp == timer);
+}
+
+void
+isc_timer_detach(isc_timer_t **timerp) {
+ REQUIRE(timerp != NULL && ISCAPI_TIMER_VALID(*timerp));
+
+ (*timerp)->methods->detach(timerp);
+
+ ENSURE(*timerp == NULL);
+}
+
+isc_result_t
+isc_timer_reset(isc_timer_t *timer, isc_timertype_t type,
+ isc_time_t *expires, isc_interval_t *interval,
+ isc_boolean_t purge)
+{
+ REQUIRE(ISCAPI_TIMER_VALID(timer));
+
+ return (timer->methods->reset(timer, type, expires, interval, purge));
+}
+
+isc_result_t
+isc_timer_touch(isc_timer_t *timer) {
+ REQUIRE(ISCAPI_TIMER_VALID(timer));
+
+ return (timer->methods->touch(timer));
+}
diff --git a/lib/isc/timer_p.h b/lib/isc/timer_p.h
index ec8e2e0b7884..d6f7c996c7e2 100644
--- a/lib/isc/timer_p.h
+++ b/lib/isc/timer_p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer_p.h,v 1.10 2007/06/19 23:47:17 tbox Exp $ */
+/* $Id: timer_p.h,v 1.12 2009/09/02 23:48:02 tbox Exp $ */
#ifndef ISC_TIMER_P_H
#define ISC_TIMER_P_H
@@ -23,9 +23,9 @@
/*! \file */
isc_result_t
-isc__timermgr_nextevent(isc_time_t *when);
+isc__timermgr_nextevent(isc_timermgr_t *timermgr, isc_time_t *when);
void
-isc__timermgr_dispatch(void);
+isc__timermgr_dispatch(isc_timermgr_t *timermgr);
#endif /* ISC_TIMER_P_H */
diff --git a/lib/isc/unix/app.c b/lib/isc/unix/app.c
index 660b438678d6..5393be942504 100644
--- a/lib/isc/unix/app.c
+++ b/lib/isc/unix/app.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: app.c,v 1.60 2008/10/15 03:41:17 marka Exp $ */
+/* $Id: app.c,v 1.64 2009/11/04 05:58:46 marka Exp $ */
/*! \file */
@@ -37,6 +37,7 @@
#include <isc/app.h>
#include <isc/boolean.h>
#include <isc/condition.h>
+#include <isc/mem.h>
#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/event.h>
@@ -47,31 +48,129 @@
#include <isc/time.h>
#include <isc/util.h>
+/*%
+ * For BIND9 internal applications built with threads, we use a single app
+ * context and let multiple worker, I/O, timer threads do actual jobs.
+ * For other cases (including BIND9 built without threads) an app context acts
+ * as an event loop dispatching various events.
+ */
+#if defined(ISC_PLATFORM_USETHREADS) && defined(BIND9)
+#define USE_THREADS_SINGLECTX
+#endif
+
#ifdef ISC_PLATFORM_USETHREADS
#include <pthread.h>
-#else /* ISC_PLATFORM_USETHREADS */
+#endif
+
+#ifndef USE_THREADS_SINGLECTX
#include "../timer_p.h"
#include "../task_p.h"
#include "socket_p.h"
+#endif /* USE_THREADS_SINGLECTX */
+
+#ifdef ISC_PLATFORM_USETHREADS
+static pthread_t blockedthread;
#endif /* ISC_PLATFORM_USETHREADS */
-static isc_eventlist_t on_run;
-static isc_mutex_t lock;
-static isc_boolean_t shutdown_requested = ISC_FALSE;
-static isc_boolean_t running = ISC_FALSE;
-/*!
- * We assume that 'want_shutdown' can be read and written atomically.
+/*%
+ * The following can be either static or public, depending on build environment.
*/
-static volatile isc_boolean_t want_shutdown = ISC_FALSE;
+
+#ifdef BIND9
+#define ISC_APPFUNC_SCOPE
+#else
+#define ISC_APPFUNC_SCOPE static
+#endif
+
+ISC_APPFUNC_SCOPE isc_result_t isc__app_start(void);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxstart(isc_appctx_t *ctx);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_onrun(isc_mem_t *mctx,
+ isc_task_t *task,
+ isc_taskaction_t action,
+ void *arg);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxrun(isc_appctx_t *ctx);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_run(void);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxshutdown(isc_appctx_t *ctx);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_shutdown(void);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_reload(void);
+ISC_APPFUNC_SCOPE isc_result_t isc__app_ctxsuspend(isc_appctx_t *ctx);
+ISC_APPFUNC_SCOPE void isc__app_ctxfinish(isc_appctx_t *ctx);
+ISC_APPFUNC_SCOPE void isc__app_finish(void);
+ISC_APPFUNC_SCOPE void isc__app_block(void);
+ISC_APPFUNC_SCOPE void isc__app_unblock(void);
+ISC_APPFUNC_SCOPE isc_result_t isc__appctx_create(isc_mem_t *mctx,
+ isc_appctx_t **ctxp);
+ISC_APPFUNC_SCOPE void isc__appctx_destroy(isc_appctx_t **ctxp);
+ISC_APPFUNC_SCOPE void isc__appctx_settaskmgr(isc_appctx_t *ctx,
+ isc_taskmgr_t *taskmgr);
+ISC_APPFUNC_SCOPE void isc__appctx_setsocketmgr(isc_appctx_t *ctx,
+ isc_socketmgr_t *socketmgr);
+ISC_APPFUNC_SCOPE void isc__appctx_settimermgr(isc_appctx_t *ctx,
+ isc_timermgr_t *timermgr);
+
/*
- * We assume that 'want_reload' can be read and written atomically.
+ * The application context of this module. This implementation actually
+ * doesn't use it. (This may change in the future).
*/
-static volatile isc_boolean_t want_reload = ISC_FALSE;
+#define APPCTX_MAGIC ISC_MAGIC('A', 'p', 'c', 'x')
+#define VALID_APPCTX(c) ISC_MAGIC_VALID(c, APPCTX_MAGIC)
+
+typedef struct isc__appctx {
+ isc_appctx_t common;
+ isc_mem_t *mctx;
+ isc_mutex_t lock;
+ isc_eventlist_t on_run;
+ isc_boolean_t shutdown_requested;
+ isc_boolean_t running;
+
+ /*!
+ * We assume that 'want_shutdown' can be read and written atomically.
+ */
+ isc_boolean_t want_shutdown;
+ /*
+ * We assume that 'want_reload' can be read and written atomically.
+ */
+ isc_boolean_t want_reload;
-static isc_boolean_t blocked = ISC_FALSE;
-#ifdef ISC_PLATFORM_USETHREADS
-static pthread_t blockedthread;
-#endif /* ISC_PLATFORM_USETHREADS */
+ isc_boolean_t blocked;
+
+ isc_taskmgr_t *taskmgr;
+ isc_socketmgr_t *socketmgr;
+ isc_timermgr_t *timermgr;
+} isc__appctx_t;
+
+static isc__appctx_t isc_g_appctx;
+
+static struct {
+ isc_appmethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *run, *shutdown, *start, *onrun, *reload, *finish,
+ *block, *unblock;
+#endif
+} appmethods = {
+ {
+ isc__appctx_destroy,
+ isc__app_ctxstart,
+ isc__app_ctxrun,
+ isc__app_ctxsuspend,
+ isc__app_ctxshutdown,
+ isc__app_ctxfinish,
+ isc__appctx_settaskmgr,
+ isc__appctx_setsocketmgr,
+ isc__appctx_settimermgr
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__app_run, (void *)isc__app_shutdown,
+ (void *)isc__app_start, (void *)isc__app_onrun, (void *)isc__app_reload,
+ (void *)isc__app_finish, (void *)isc__app_block,
+ (void *)isc__app_unblock
+#endif
+};
#ifdef HAVE_LINUXTHREADS
/*!
@@ -91,13 +190,13 @@ static pthread_t main_thread;
static void
exit_action(int arg) {
UNUSED(arg);
- want_shutdown = ISC_TRUE;
+ isc_g_appctx.want_shutdown = ISC_TRUE;
}
static void
reload_action(int arg) {
UNUSED(arg);
- want_reload = ISC_TRUE;
+ isc_g_appctx.want_reload = ISC_TRUE;
}
#endif
@@ -123,12 +222,12 @@ handle_signal(int sig, void (*handler)(int)) {
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_app_start(void) {
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_ctxstart(isc_appctx_t *ctx0) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
isc_result_t result;
- int presult;
- sigset_t sset;
- char strbuf[ISC_STRERRORSIZE];
+
+ REQUIRE(VALID_APPCTX(ctx));
/*
* Start an ISC library application.
@@ -151,7 +250,35 @@ isc_app_start(void) {
main_thread = pthread_self();
#endif
- result = isc_mutex_init(&lock);
+ result = isc_mutex_init(&ctx->lock);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+
+ ISC_LIST_INIT(ctx->on_run);
+
+ ctx->shutdown_requested = ISC_FALSE;
+ ctx->running = ISC_FALSE;
+ ctx->want_shutdown = ISC_FALSE;
+ ctx->want_reload = ISC_FALSE;
+ ctx->blocked = ISC_FALSE;
+
+ return (ISC_R_SUCCESS);
+}
+
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_start(void) {
+ isc_result_t result;
+ int presult;
+ sigset_t sset;
+ char strbuf[ISC_STRERRORSIZE];
+
+ isc_g_appctx.common.impmagic = APPCTX_MAGIC;
+ isc_g_appctx.common.magic = ISCAPI_APPCTX_MAGIC;
+ isc_g_appctx.common.methods = &appmethods.methods;
+ isc_g_appctx.mctx = NULL;
+ /* The remaining members will be initialized in ctxstart() */
+
+ result = isc__app_ctxstart((isc_appctx_t *)&isc_g_appctx);
if (result != ISC_R_SUCCESS)
return (result);
@@ -253,22 +380,20 @@ isc_app_start(void) {
}
#endif /* ISC_PLATFORM_USETHREADS */
- ISC_LIST_INIT(on_run);
-
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
void *arg)
{
isc_event_t *event;
isc_task_t *cloned_task = NULL;
isc_result_t result;
- LOCK(&lock);
+ LOCK(&isc_g_appctx.lock);
- if (running) {
+ if (isc_g_appctx.running) {
result = ISC_R_ALREADYRUNNING;
goto unlock;
}
@@ -285,24 +410,25 @@ isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
goto unlock;
}
- ISC_LIST_APPEND(on_run, event, ev_link);
+ ISC_LIST_APPEND(isc_g_appctx.on_run, event, ev_link);
result = ISC_R_SUCCESS;
unlock:
- UNLOCK(&lock);
+ UNLOCK(&isc_g_appctx.lock);
return (result);
}
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_THREADS_SINGLECTX
/*!
* Event loop for nonthreaded programs.
*/
static isc_result_t
-evloop(void) {
+evloop(isc__appctx_t *ctx) {
isc_result_t result;
- while (!want_shutdown) {
+
+ while (!ctx->want_shutdown) {
int n;
isc_time_t when, now;
struct timeval tv, *tvp;
@@ -310,14 +436,27 @@ evloop(void) {
isc_boolean_t readytasks;
isc_boolean_t call_timer_dispatch = ISC_FALSE;
- readytasks = isc__taskmgr_ready();
+ /*
+ * Check the reload (or suspend) case first for exiting the
+ * loop as fast as possible in case:
+ * - the direct call to isc__taskmgr_dispatch() in
+ * isc__app_ctxrun() completes all the tasks so far,
+ * - there is thus currently no active task, and
+ * - there is a timer event
+ */
+ if (ctx->want_reload) {
+ ctx->want_reload = ISC_FALSE;
+ return (ISC_R_RELOAD);
+ }
+
+ readytasks = isc__taskmgr_ready(ctx->taskmgr);
if (readytasks) {
tv.tv_sec = 0;
tv.tv_usec = 0;
tvp = &tv;
call_timer_dispatch = ISC_TRUE;
} else {
- result = isc__timermgr_nextevent(&when);
+ result = isc__timermgr_nextevent(ctx->timermgr, &when);
if (result != ISC_R_SUCCESS)
tvp = NULL;
else {
@@ -334,7 +473,7 @@ evloop(void) {
}
swait = NULL;
- n = isc__socketmgr_waitevents(tvp, &swait);
+ n = isc__socketmgr_waitevents(ctx->socketmgr, tvp, &swait);
if (n == 0 || call_timer_dispatch) {
/*
@@ -351,20 +490,17 @@ evloop(void) {
* call, since this loop only runs in the non-thread
* mode.
*/
- isc__timermgr_dispatch();
+ isc__timermgr_dispatch(ctx->timermgr);
}
if (n > 0)
- (void)isc__socketmgr_dispatch(swait);
- (void)isc__taskmgr_dispatch();
-
- if (want_reload) {
- want_reload = ISC_FALSE;
- return (ISC_R_RELOAD);
- }
+ (void)isc__socketmgr_dispatch(ctx->socketmgr, swait);
+ (void)isc__taskmgr_dispatch(ctx->taskmgr);
}
return (ISC_R_SUCCESS);
}
+#endif /* USE_THREADS_SINGLECTX */
+#ifndef ISC_PLATFORM_USETHREADS
/*
* This is a gross hack to support waiting for condition
* variables in nonthreaded programs in a limited way;
@@ -400,11 +536,11 @@ isc__nothread_wait_hack(isc_condition_t *cp, isc_mutex_t *mp) {
INSIST(*mp == 1); /* Mutex must be locked on entry. */
--*mp;
- result = evloop();
+ result = evloop(&isc_g_appctx);
if (result == ISC_R_RELOAD)
- want_reload = ISC_TRUE;
+ isc_g_appctx.want_reload = ISC_TRUE;
if (signalled) {
- want_shutdown = ISC_FALSE;
+ isc_g_appctx.want_shutdown = ISC_FALSE;
signalled = ISC_FALSE;
}
@@ -420,43 +556,46 @@ isc__nothread_signal_hack(isc_condition_t *cp) {
INSIST(in_recursive_evloop);
- want_shutdown = ISC_TRUE;
+ isc_g_appctx.want_shutdown = ISC_TRUE;
signalled = ISC_TRUE;
return (ISC_R_SUCCESS);
}
#endif /* ISC_PLATFORM_USETHREADS */
-isc_result_t
-isc_app_run(void) {
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_ctxrun(isc_appctx_t *ctx0) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
int result;
isc_event_t *event, *next_event;
isc_task_t *task;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_THREADS_SINGLECTX
sigset_t sset;
char strbuf[ISC_STRERRORSIZE];
#ifdef HAVE_SIGWAIT
int sig;
#endif
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_THREADS_SINGLECTX */
+
+ REQUIRE(VALID_APPCTX(ctx));
#ifdef HAVE_LINUXTHREADS
REQUIRE(main_thread == pthread_self());
#endif
- LOCK(&lock);
+ LOCK(&ctx->lock);
- if (!running) {
- running = ISC_TRUE;
+ if (!ctx->running) {
+ ctx->running = ISC_TRUE;
/*
* Post any on-run events (in FIFO order).
*/
- for (event = ISC_LIST_HEAD(on_run);
+ for (event = ISC_LIST_HEAD(ctx->on_run);
event != NULL;
event = next_event) {
next_event = ISC_LIST_NEXT(event, ev_link);
- ISC_LIST_UNLINK(on_run, event, ev_link);
+ ISC_LIST_UNLINK(ctx->on_run, event, ev_link);
task = event->ev_sender;
event->ev_sender = NULL;
isc_task_sendanddetach(&task, &event);
@@ -464,7 +603,7 @@ isc_app_run(void) {
}
- UNLOCK(&lock);
+ UNLOCK(&ctx->lock);
#ifndef HAVE_SIGWAIT
/*
@@ -473,19 +612,27 @@ isc_app_run(void) {
* We do this here to ensure that the signal handler is installed
* (i.e. that it wasn't a "one-shot" handler).
*/
- result = handle_signal(SIGHUP, reload_action);
- if (result != ISC_R_SUCCESS)
- return (ISC_R_SUCCESS);
+ if (ctx == &isc_g_appctx) {
+ result = handle_signal(SIGHUP, reload_action);
+ if (result != ISC_R_SUCCESS)
+ return (ISC_R_SUCCESS);
+ }
#endif
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_THREADS_SINGLECTX
+ /*
+ * When we are using multiple contexts, we don't rely on signals.
+ */
+ if (ctx != &isc_g_appctx)
+ return (ISC_R_SUCCESS);
+
/*
* There is no danger if isc_app_shutdown() is called before we wait
* for signals. Signals are blocked, so any such signal will simply
* be made pending and we will get it when we call sigwait().
*/
- while (!want_shutdown) {
+ while (!ctx->want_shutdown) {
#ifdef HAVE_SIGWAIT
/*
* Wait for SIGHUP, SIGINT, or SIGTERM.
@@ -503,21 +650,19 @@ isc_app_run(void) {
#ifndef HAVE_UNIXWARE_SIGWAIT
result = sigwait(&sset, &sig);
if (result == 0) {
- if (sig == SIGINT ||
- sig == SIGTERM)
- want_shutdown = ISC_TRUE;
+ if (sig == SIGINT || sig == SIGTERM)
+ ctx->want_shutdown = ISC_TRUE;
else if (sig == SIGHUP)
- want_reload = ISC_TRUE;
+ ctx->want_reload = ISC_TRUE;
}
#else /* Using UnixWare sigwait semantics. */
sig = sigwait(&sset);
if (sig >= 0) {
- if (sig == SIGINT ||
- sig == SIGTERM)
- want_shutdown = ISC_TRUE;
+ if (sig == SIGINT || sig == SIGTERM)
+ ctx->want_shutdown = ISC_TRUE;
else if (sig == SIGHUP)
- want_reload = ISC_TRUE;
+ ctx->want_reload = ISC_TRUE;
}
#endif /* HAVE_UNIXWARE_SIGWAIT */
@@ -528,131 +673,174 @@ isc_app_run(void) {
if (sigemptyset(&sset) != 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_run() sigsetops: %s", strbuf);
+ "isc_app_run() sigsetops: %s",
+ strbuf);
return (ISC_R_UNEXPECTED);
}
result = sigsuspend(&sset);
#endif /* HAVE_SIGWAIT */
- if (want_reload) {
- want_reload = ISC_FALSE;
+ if (ctx->want_reload) {
+ ctx->want_reload = ISC_FALSE;
return (ISC_R_RELOAD);
}
- if (want_shutdown && blocked)
+ if (ctx->want_shutdown && ctx->blocked)
exit(1);
}
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_THREADS_SINGLECTX */
- (void)isc__taskmgr_dispatch();
+ (void)isc__taskmgr_dispatch(ctx->taskmgr);
- result = evloop();
+ result = evloop(ctx);
if (result != ISC_R_SUCCESS)
return (result);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_THREADS_SINGLECTX */
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_app_shutdown(void) {
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_run() {
+ return (isc__app_ctxrun((isc_appctx_t *)&isc_g_appctx));
+}
+
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_ctxshutdown(isc_appctx_t *ctx0) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
isc_boolean_t want_kill = ISC_TRUE;
char strbuf[ISC_STRERRORSIZE];
- LOCK(&lock);
+ REQUIRE(VALID_APPCTX(ctx));
- REQUIRE(running);
+ LOCK(&ctx->lock);
- if (shutdown_requested)
+ REQUIRE(ctx->running);
+
+ if (ctx->shutdown_requested)
want_kill = ISC_FALSE;
else
- shutdown_requested = ISC_TRUE;
+ ctx->shutdown_requested = ISC_TRUE;
- UNLOCK(&lock);
+ UNLOCK(&ctx->lock);
if (want_kill) {
+ if (ctx != &isc_g_appctx)
+ ctx->want_shutdown = ISC_TRUE;
+ else {
#ifdef HAVE_LINUXTHREADS
- int result;
-
- result = pthread_kill(main_thread, SIGTERM);
- if (result != 0) {
- isc__strerror(result, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_shutdown() pthread_kill: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
+ int result;
+
+ result = pthread_kill(main_thread, SIGTERM);
+ if (result != 0) {
+ isc__strerror(result, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_app_shutdown() "
+ "pthread_kill: %s",
+ strbuf);
+ return (ISC_R_UNEXPECTED);
+ }
#else
- if (kill(getpid(), SIGTERM) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_shutdown() kill: %s", strbuf);
- return (ISC_R_UNEXPECTED);
+ if (kill(getpid(), SIGTERM) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_app_shutdown() "
+ "kill: %s", strbuf);
+ return (ISC_R_UNEXPECTED);
+ }
+#endif /* HAVE_LINUXTHREADS */
}
-#endif
}
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_app_reload(void) {
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_shutdown() {
+ return (isc__app_ctxshutdown((isc_appctx_t *)&isc_g_appctx));
+}
+
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_ctxsuspend(isc_appctx_t *ctx0) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
isc_boolean_t want_kill = ISC_TRUE;
char strbuf[ISC_STRERRORSIZE];
- LOCK(&lock);
+ REQUIRE(VALID_APPCTX(ctx));
+
+ LOCK(&ctx->lock);
- REQUIRE(running);
+ REQUIRE(ctx->running);
/*
* Don't send the reload signal if we're shutting down.
*/
- if (shutdown_requested)
+ if (ctx->shutdown_requested)
want_kill = ISC_FALSE;
- UNLOCK(&lock);
+ UNLOCK(&ctx->lock);
if (want_kill) {
+ if (ctx != &isc_g_appctx)
+ ctx->want_reload = ISC_TRUE;
+ else {
#ifdef HAVE_LINUXTHREADS
- int result;
-
- result = pthread_kill(main_thread, SIGHUP);
- if (result != 0) {
- isc__strerror(result, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_reload() pthread_kill: %s",
- strbuf);
- return (ISC_R_UNEXPECTED);
- }
+ int result;
+
+ result = pthread_kill(main_thread, SIGHUP);
+ if (result != 0) {
+ isc__strerror(result, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_app_reload() "
+ "pthread_kill: %s",
+ strbuf);
+ return (ISC_R_UNEXPECTED);
+ }
#else
- if (kill(getpid(), SIGHUP) < 0) {
- isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_app_reload() kill: %s", strbuf);
- return (ISC_R_UNEXPECTED);
- }
+ if (kill(getpid(), SIGHUP) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "isc_app_reload() "
+ "kill: %s", strbuf);
+ return (ISC_R_UNEXPECTED);
+ }
#endif
+ }
}
return (ISC_R_SUCCESS);
}
-void
-isc_app_finish(void) {
- DESTROYLOCK(&lock);
+ISC_APPFUNC_SCOPE isc_result_t
+isc__app_reload(void) {
+ return (isc__app_ctxsuspend((isc_appctx_t *)&isc_g_appctx));
+}
+
+ISC_APPFUNC_SCOPE void
+isc__app_ctxfinish(isc_appctx_t *ctx0) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
+
+ REQUIRE(VALID_APPCTX(ctx));
+
+ DESTROYLOCK(&ctx->lock);
+}
+
+ISC_APPFUNC_SCOPE void
+isc__app_finish(void) {
+ isc__app_ctxfinish((isc_appctx_t *)&isc_g_appctx);
}
-void
-isc_app_block(void) {
+ISC_APPFUNC_SCOPE void
+isc__app_block(void) {
#ifdef ISC_PLATFORM_USETHREADS
sigset_t sset;
#endif /* ISC_PLATFORM_USETHREADS */
- REQUIRE(running);
- REQUIRE(!blocked);
+ REQUIRE(isc_g_appctx.running);
+ REQUIRE(!isc_g_appctx.blocked);
- blocked = ISC_TRUE;
+ isc_g_appctx.blocked = ISC_TRUE;
#ifdef ISC_PLATFORM_USETHREADS
blockedthread = pthread_self();
RUNTIME_CHECK(sigemptyset(&sset) == 0 &&
@@ -662,16 +850,16 @@ isc_app_block(void) {
#endif /* ISC_PLATFORM_USETHREADS */
}
-void
-isc_app_unblock(void) {
+ISC_APPFUNC_SCOPE void
+isc__app_unblock(void) {
#ifdef ISC_PLATFORM_USETHREADS
sigset_t sset;
#endif /* ISC_PLATFORM_USETHREADS */
- REQUIRE(running);
- REQUIRE(blocked);
+ REQUIRE(isc_g_appctx.running);
+ REQUIRE(isc_g_appctx.blocked);
- blocked = ISC_FALSE;
+ isc_g_appctx.blocked = ISC_FALSE;
#ifdef ISC_PLATFORM_USETHREADS
REQUIRE(blockedthread == pthread_self());
@@ -682,3 +870,77 @@ isc_app_unblock(void) {
RUNTIME_CHECK(pthread_sigmask(SIG_BLOCK, &sset, NULL) == 0);
#endif /* ISC_PLATFORM_USETHREADS */
}
+
+ISC_APPFUNC_SCOPE isc_result_t
+isc__appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp) {
+ isc__appctx_t *ctx;
+
+ REQUIRE(mctx != NULL);
+ REQUIRE(ctxp != NULL && *ctxp == NULL);
+
+ ctx = isc_mem_get(mctx, sizeof(*ctx));
+ if (ctx == NULL)
+ return (ISC_R_NOMEMORY);
+
+ ctx->common.impmagic = APPCTX_MAGIC;
+ ctx->common.magic = ISCAPI_APPCTX_MAGIC;
+ ctx->common.methods = &appmethods.methods;
+
+ ctx->mctx = NULL;
+ isc_mem_attach(mctx, &ctx->mctx);
+
+ ctx->taskmgr = NULL;
+ ctx->socketmgr = NULL;
+ ctx->timermgr = NULL;
+
+ *ctxp = (isc_appctx_t *)ctx;
+
+ return (ISC_R_SUCCESS);
+}
+
+ISC_APPFUNC_SCOPE void
+isc__appctx_destroy(isc_appctx_t **ctxp) {
+ isc__appctx_t *ctx;
+
+ REQUIRE(ctxp != NULL);
+ ctx = (isc__appctx_t *)*ctxp;
+ REQUIRE(VALID_APPCTX(ctx));
+
+ isc_mem_putanddetach(&ctx->mctx, ctx, sizeof(*ctx));
+
+ *ctxp = NULL;
+}
+
+ISC_APPFUNC_SCOPE void
+isc__appctx_settaskmgr(isc_appctx_t *ctx0, isc_taskmgr_t *taskmgr) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
+
+ REQUIRE(VALID_APPCTX(ctx));
+
+ ctx->taskmgr = taskmgr;
+}
+
+ISC_APPFUNC_SCOPE void
+isc__appctx_setsocketmgr(isc_appctx_t *ctx0, isc_socketmgr_t *socketmgr) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
+
+ REQUIRE(VALID_APPCTX(ctx));
+
+ ctx->socketmgr = socketmgr;
+}
+
+ISC_APPFUNC_SCOPE void
+isc__appctx_settimermgr(isc_appctx_t *ctx0, isc_timermgr_t *timermgr) {
+ isc__appctx_t *ctx = (isc__appctx_t *)ctx0;
+
+ REQUIRE(VALID_APPCTX(ctx));
+
+ ctx->timermgr = timermgr;
+}
+
+#ifdef USE_APPIMPREGISTER
+isc_result_t
+isc__app_register() {
+ return (isc_app_register(isc__appctx_create));
+}
+#endif
diff --git a/lib/isc/unix/dir.c b/lib/isc/unix/dir.c
index 924414759d06..613ee5630d65 100644
--- a/lib/isc/unix/dir.c
+++ b/lib/isc/unix/dir.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dir.c,v 1.25.332.3 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id$ */
/*! \file
* \author Principal Authors: DCL */
@@ -35,6 +35,7 @@
#include <isc/util.h>
#include "errno2result.h"
+#include "ntp_stdlib.h" /* NTP change for strlcpy, strlcat */
#define ISC_DIR_MAGIC ISC_MAGIC('D', 'I', 'R', '*')
#define VALID_DIR(dir) ISC_MAGIC_VALID(dir, ISC_DIR_MAGIC)
@@ -58,6 +59,7 @@ isc_dir_init(isc_dir_t *dir) {
isc_result_t
isc_dir_open(isc_dir_t *dir, const char *dirname) {
char *p;
+ size_t octets;
isc_result_t result = ISC_R_SUCCESS;
REQUIRE(VALID_DIR(dir));
@@ -67,10 +69,11 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
* Copy directory name. Need to have enough space for the name,
* a possible path separator, the wildcard, and the final NUL.
*/
- if (strlen(dirname) + 3 > sizeof(dir->dirname))
+ octets = strlen(dirname) + 1;
+ if (octets + 2 > sizeof(dir->dirname))
/* XXXDCL ? */
return (ISC_R_NOSPACE);
- strcpy(dir->dirname, dirname);
+ strlcpy(dir->dirname, dirname, octets);
/*
* Append path separator, if needed, and "*".
@@ -79,7 +82,7 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
if (dir->dirname < p && *(p - 1) != '/')
*p++ = '/';
*p++ = '*';
- *p++ = '\0';
+ *p = '\0';
/*
* Open stream.
@@ -102,6 +105,7 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
isc_result_t
isc_dir_read(isc_dir_t *dir) {
struct dirent *entry;
+ size_t octets;
REQUIRE(VALID_DIR(dir) && dir->handle != NULL);
@@ -116,10 +120,11 @@ isc_dir_read(isc_dir_t *dir) {
/*
* Make sure that the space for the name is long enough.
*/
- if (sizeof(dir->entry.name) <= strlen(entry->d_name))
- return (ISC_R_UNEXPECTED);
+ octets = strlen(entry->d_name) + 1;
+ if (sizeof(dir->entry.name) < octets)
+ return (ISC_R_UNEXPECTED);
- strcpy(dir->entry.name, entry->d_name);
+ strlcpy(dir->entry.name, entry->d_name, octets);
/*
* Some dirents have d_namlen, but it is not portable.
diff --git a/lib/isc/unix/entropy.c b/lib/isc/unix/entropy.c
index 0e9e2979e306..ab53faf6754e 100644
--- a/lib/isc/unix/entropy.c
+++ b/lib/isc/unix/entropy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.80.332.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: entropy.c,v 1.82 2008/12/01 23:47:45 tbox Exp $ */
/* \file unix/entropy.c
* \brief
diff --git a/lib/isc/unix/errno2result.c b/lib/isc/unix/errno2result.c
index 606c5600c2f8..f20aa295ca9c 100644
--- a/lib/isc/unix/errno2result.c
+++ b/lib/isc/unix/errno2result.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: errno2result.c,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -34,7 +34,7 @@
* not already there.
*/
isc_result_t
-isc__errno2result(int posixerrno) {
+isc___errno2result(int posixerrno, const char *file, unsigned int line) {
char strbuf[ISC_STRERRORSIZE];
switch (posixerrno) {
@@ -55,7 +55,7 @@ isc__errno2result(int posixerrno) {
return (ISC_R_IOERROR);
case ENOMEM:
return (ISC_R_NOMEMORY);
- case ENFILE:
+ case ENFILE:
case EMFILE:
return (ISC_R_TOOMANYOPENFILES);
case EPIPE:
@@ -108,8 +108,7 @@ isc__errno2result(int posixerrno) {
return (ISC_R_CONNREFUSED);
default:
isc__strerror(posixerrno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "unable to convert errno "
+ UNEXPECTED_ERROR(file, line, "unable to convert errno "
"to isc_result: %d: %s",
posixerrno, strbuf);
/*
diff --git a/lib/isc/unix/errno2result.h b/lib/isc/unix/errno2result.h
index b5b658d500cd..1e49ed1d6c89 100644
--- a/lib/isc/unix/errno2result.h
+++ b/lib/isc/unix/errno2result.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: errno2result.h,v 1.12 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
#ifndef UNIX_ERRNO2RESULT_H
#define UNIX_ERRNO2RESULT_H 1
@@ -31,8 +31,10 @@
ISC_LANG_BEGINDECLS
+#define isc__errno2result(x) isc___errno2result(x, __FILE__, __LINE__)
+
isc_result_t
-isc__errno2result(int posixerrno);
+isc___errno2result(int posixerrno, const char *file, unsigned int line);
ISC_LANG_ENDDECLS
diff --git a/lib/isc/unix/file.c b/lib/isc/unix/file.c
index 748aee889c11..3b59e86b0755 100644
--- a/lib/isc/unix/file.c
+++ b/lib/isc/unix/file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -48,7 +48,7 @@
* SUCH DAMAGE.
*/
-/* $Id: file.c,v 1.51.332.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -68,12 +68,14 @@
#include <isc/dir.h>
#include <isc/file.h>
#include <isc/log.h>
+#include <isc/mem.h>
#include <isc/random.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
#include "errno2result.h"
+#include "ntp_stdlib.h" /* NTP change for strlcpy, strlcat */
/*
* XXXDCL As the API for accessing file statistics undoubtedly gets expanded,
@@ -97,12 +99,12 @@ file_stats(const char *file, struct stat *stats) {
}
isc_result_t
-isc_file_getmodtime(const char *file, isc_time_t *time) {
+isc_file_getmodtime(const char *file, isc_time_t *itime) {
isc_result_t result;
struct stat stats;
REQUIRE(file != NULL);
- REQUIRE(time != NULL);
+ REQUIRE(itime != NULL);
result = file_stats(file, &stats);
@@ -111,16 +113,16 @@ isc_file_getmodtime(const char *file, isc_time_t *time) {
* XXXDCL some operating systems provide nanoseconds, too,
* such as BSD/OS via st_mtimespec.
*/
- isc_time_set(time, stats.st_mtime, 0);
+ isc_time_set(itime, stats.st_mtime, 0);
return (result);
}
isc_result_t
-isc_file_settime(const char *file, isc_time_t *time) {
+isc_file_settime(const char *file, isc_time_t *itime) {
struct timeval times[2];
- REQUIRE(file != NULL && time != NULL);
+ REQUIRE(file != NULL && itime != NULL);
/*
* tv_sec is at least a 32 bit quantity on all platforms we're
@@ -132,7 +134,7 @@ isc_file_settime(const char *file, isc_time_t *time) {
* * isc_time_seconds is changed to be > 32 bits but long is 32 bits
* and isc_time_seconds has at least 33 significant bits.
*/
- times[0].tv_sec = times[1].tv_sec = (long)isc_time_seconds(time);
+ times[0].tv_sec = times[1].tv_sec = (long)isc_time_seconds(itime);
/*
* Here is the real check for the high bit being set.
@@ -148,7 +150,7 @@ isc_file_settime(const char *file, isc_time_t *time) {
* we can at least cast to signed so the IRIX compiler shuts up.
*/
times[0].tv_usec = times[1].tv_usec =
- (isc_int32_t)(isc_time_nanoseconds(time) / 1000);
+ (isc_int32_t)(isc_time_nanoseconds(itime) / 1000);
if (utimes(file, times) < 0)
return (isc__errno2result(errno));
@@ -183,14 +185,14 @@ isc_file_template(const char *path, const char *templet, char *buf,
if ((s - path + 1 + strlen(templet) + 1) > buflen)
return (ISC_R_NOSPACE);
- strncpy(buf, path, s - path + 1);
+ strlcpy(buf, path, buflen);
buf[s - path + 1] = '\0';
- strcat(buf, templet);
+ strlcat(buf, templet, buflen);
} else {
if ((strlen(templet) + 1) > buflen)
return (ISC_R_NOSPACE);
- strcpy(buf, templet);
+ strlcpy(buf, templet, buflen);
}
return (ISC_R_SUCCESS);
@@ -242,16 +244,26 @@ isc_file_renameunique(const char *file, char *templet) {
return (ISC_R_SUCCESS);
}
-
isc_result_t
isc_file_openunique(char *templet, FILE **fp) {
+ int mode = S_IWUSR|S_IRUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
+isc_file_openuniqueprivate(char *templet, FILE **fp) {
+ int mode = S_IWUSR|S_IRUSR;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
+isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
int fd;
FILE *f;
isc_result_t result = ISC_R_SUCCESS;
char *x;
char *cp;
isc_uint32_t which;
- int mode;
REQUIRE(templet != NULL);
REQUIRE(fp != NULL && *fp == NULL);
@@ -269,7 +281,6 @@ isc_file_openunique(char *templet, FILE **fp) {
x = cp--;
}
- mode = S_IWUSR|S_IRUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
while ((fd = open(templet, O_RDWR|O_CREAT|O_EXCL, mode)) == -1) {
if (errno != EEXIST)
@@ -338,6 +349,23 @@ isc_file_exists(const char *pathname) {
return (ISC_TF(file_stats(pathname, &stats) == ISC_R_SUCCESS));
}
+isc_result_t
+isc_file_isplainfile(const char *filename) {
+ /*
+ * This function returns success if filename is a plain file.
+ */
+ struct stat filestat;
+ memset(&filestat,0,sizeof(struct stat));
+
+ if ((stat(filename, &filestat)) == -1)
+ return(isc__errno2result(errno));
+
+ if(! S_ISREG(filestat.st_mode))
+ return(ISC_R_INVALIDFILE);
+
+ return(ISC_R_SUCCESS);
+}
+
isc_boolean_t
isc_file_isabsolute(const char *filename) {
REQUIRE(filename != NULL);
@@ -416,7 +444,7 @@ dir_current(char *dirname, size_t length) {
if (strlen(dirname) + 1 == length)
result = ISC_R_NOSPACE;
else if (dirname[1] != '\0')
- strcat(dirname, "/");
+ strlcat(dirname, "/", length);
}
return (result);
@@ -430,7 +458,7 @@ isc_file_absolutepath(const char *filename, char *path, size_t pathlen) {
return (result);
if (strlen(path) + strlen(filename) + 1 > pathlen)
return (ISC_R_NOSPACE);
- strcat(path, filename);
+ strlcat(path, filename, pathlen);
return (ISC_R_SUCCESS);
}
@@ -442,3 +470,75 @@ isc_file_truncate(const char *filename, isc_offset_t size) {
result = isc__errno2result(errno);
return (result);
}
+
+isc_result_t
+isc_file_safecreate(const char *filename, FILE **fp) {
+ isc_result_t result;
+ int flags;
+ struct stat sb;
+ FILE *f;
+ int fd;
+
+ REQUIRE(filename != NULL);
+ REQUIRE(fp != NULL && *fp == NULL);
+
+ result = file_stats(filename, &sb);
+ if (result == ISC_R_SUCCESS) {
+ if ((sb.st_mode & S_IFREG) == 0)
+ return (ISC_R_INVALIDFILE);
+ flags = O_WRONLY | O_TRUNC;
+ } else if (result == ISC_R_FILENOTFOUND) {
+ flags = O_WRONLY | O_CREAT | O_EXCL;
+ } else
+ return (result);
+
+ fd = open(filename, flags, S_IRUSR | S_IWUSR);
+ if (fd == -1)
+ return (isc__errno2result(errno));
+
+ f = fdopen(fd, "w");
+ if (f == NULL) {
+ result = isc__errno2result(errno);
+ close(fd);
+ return (result);
+ }
+
+ *fp = f;
+ return (ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
+{
+ char *dir, *file, *slash;
+
+ REQUIRE(path != NULL);
+
+ slash = strrchr(path, '/');
+
+ if (slash == path) {
+ file = ++slash;
+ dir = isc_mem_strdup(mctx, "/");
+ } else if (slash != NULL) {
+ file = ++slash;
+ dir = isc_mem_allocate(mctx, slash - path);
+ if (dir != NULL)
+ strlcpy(dir, path, slash - path);
+ } else {
+ file = path;
+ dir = isc_mem_strdup(mctx, ".");
+ }
+
+ if (dir == NULL)
+ return (ISC_R_NOMEMORY);
+
+ if (*file == '\0') {
+ isc_mem_free(mctx, dir);
+ return (ISC_R_INVALIDFILE);
+ }
+
+ *dirname = dir;
+ *basename = file;
+
+ return (ISC_R_SUCCESS);
+}
diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c
index ba04b447efe3..547a83f07937 100644
--- a/lib/isc/unix/ifiter_getifaddrs.c
+++ b/lib/isc/unix/ifiter_getifaddrs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_getifaddrs.c,v 1.11 2008/03/20 23:47:00 tbox Exp $ */
+/* $Id: ifiter_getifaddrs.c,v 1.13 2009/09/24 23:48:13 tbox Exp $ */
/*! \file
* \brief
@@ -55,6 +55,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
isc_interfaceiter_t *iter;
isc_result_t result;
char strbuf[ISC_STRERRORSIZE];
+ int trys, ret;
REQUIRE(mctx != NULL);
REQUIRE(iterp != NULL);
@@ -73,22 +74,31 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
* Only open "/proc/net/if_inet6" if we have never seen a IPv6
* address returned by getifaddrs().
*/
- if (!seenv6)
+ if (!seenv6) {
iter->proc = fopen("/proc/net/if_inet6", "r");
- else
+ if (iter->proc == NULL) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+ ISC_LOGMODULE_SOCKET, ISC_LOG_WARNING,
+ "failed to open /proc/net/if_inet6");
+ }
+ } else
iter->proc = NULL;
iter->valid = ISC_R_FAILURE;
#endif
- if (getifaddrs(&iter->ifaddrs) < 0) {
+ /* If interrupted, try again */
+ for (trys = 0; trys < 3; trys++) {
+ if ((ret = getifaddrs(&iter->ifaddrs)) >= 0)
+ break;
+ if (errno != EINTR)
+ break;
+ }
+ if (ret < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- isc_msgcat_get(isc_msgcat,
- ISC_MSGSET_IFITERGETIFADDRS,
- ISC_MSG_GETIFADDRS,
- "getting interface "
- "addresses: getifaddrs: %s"),
- strbuf);
+ UNEXPECTED_ERROR(__FILE__, __LINE__, isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERGETIFADDRS, ISC_MSG_GETIFADDRS,
+ "getting interface addresses: getifaddrs: %s"), strbuf);
result = ISC_R_UNEXPECTED;
goto failure;
}
diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c
index a69979326883..a684867ce71f 100644
--- a/lib/isc/unix/ifiter_ioctl.c
+++ b/lib/isc/unix/ifiter_ioctl.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_ioctl.c,v 1.60.120.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.62 2009/01/18 23:48:14 tbox Exp $ */
/*! \file
* \brief
@@ -109,6 +109,21 @@ struct isc_interfaceiter {
#endif
#endif
+int
+isc_ioctl(int fildes, int req, char *arg) {
+ int trys;
+ int ret;
+
+ for (trys = 0; trys < 3; trys++) {
+ if ((ret = ioctl(fildes, req, arg)) < 0) {
+ if (errno == EINTR)
+ continue;
+ }
+ break;
+ }
+ return (ret);
+}
+
static isc_result_t
getbuf4(isc_interfaceiter_t *iter) {
char strbuf[ISC_STRERRORSIZE];
@@ -128,7 +143,7 @@ getbuf4(isc_interfaceiter_t *iter) {
* conversion". It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGIFCONF, (char *)&iter->ifc)
+ if (isc_ioctl(iter->socket, SIOCGIFCONF, (char *)&iter->ifc)
== -1) {
if (errno != EINVAL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
@@ -208,7 +223,7 @@ getbuf6(isc_interfaceiter_t *iter) {
* conversion". It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket6, SIOCGLIFCONF, (char *)&iter->lifc)
+ if (isc_ioctl(iter->socket6, SIOCGLIFCONF, (char *)&iter->lifc)
== -1) {
#ifdef __hpux
/*
@@ -453,7 +468,7 @@ internal_current4(isc_interfaceiter_t *iter) {
INSIST( iter->pos < (unsigned int) iter->ifc.ifc_len);
- ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos);
+ ifrp = (void *)((char *) iter->ifc.ifc_req + iter->pos);
memset(&ifreq, 0, sizeof(ifreq));
memcpy(&ifreq, ifrp, sizeof(ifreq));
@@ -502,7 +517,7 @@ internal_current4(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGIFFLAGS, (char *) &ifreq) < 0) {
+ if (isc_ioctl(iter->socket, SIOCGIFFLAGS, (char *) &ifreq) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"%s: getting interface flags: %s",
@@ -538,7 +553,7 @@ internal_current4(isc_interfaceiter_t *iter) {
memcpy(&lifreq.lifr_addr, &iter->current.address.type.in6,
sizeof(iter->current.address.type.in6));
- if (ioctl(iter->socket, SIOCGLIFADDR, &lifreq) < 0) {
+ if (isc_ioctl(iter->socket, SIOCGLIFADDR, &lifreq) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"%s: getting interface address: %s",
@@ -588,7 +603,7 @@ internal_current4(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGIFDSTADDR, (char *)&ifreq)
+ if (isc_ioctl(iter->socket, SIOCGIFDSTADDR, (char *)&ifreq)
< 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -611,7 +626,7 @@ internal_current4(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGIFBRDADDR, (char *)&ifreq)
+ if (isc_ioctl(iter->socket, SIOCGIFBRDADDR, (char *)&ifreq)
< 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -637,7 +652,7 @@ internal_current4(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
+ if (isc_ioctl(iter->socket, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
isc_msgcat_get(isc_msgcat,
@@ -666,7 +681,7 @@ internal_current6(isc_interfaceiter_t *iter) {
return (iter->result6);
REQUIRE(iter->pos6 < (unsigned int) iter->lifc.lifc_len);
- ifrp = (struct LIFREQ *)((char *) iter->lifc.lifc_req + iter->pos6);
+ ifrp = (void *)((char *)iter->lifc.lifc_req + iter->pos6);
memset(&lifreq, 0, sizeof(lifreq));
memcpy(&lifreq, ifrp, sizeof(lifreq));
@@ -725,7 +740,7 @@ internal_current6(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(fd, SIOCGLIFFLAGS, (char *) &lifreq) < 0) {
+ if (isc_ioctl(fd, SIOCGLIFFLAGS, (char *) &lifreq) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"%s: getting interface flags: %s",
@@ -764,7 +779,7 @@ internal_current6(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(fd, SIOCGLIFDSTADDR, (char *)&lifreq)
+ if (isc_ioctl(fd, SIOCGLIFDSTADDR, (char *)&lifreq)
< 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -789,7 +804,7 @@ internal_current6(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(iter->socket, SIOCGLIFBRDADDR, (char *)&lifreq)
+ if (isc_ioctl(iter->socket, SIOCGLIFBRDADDR, (char *)&lifreq)
< 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -839,7 +854,7 @@ internal_current6(isc_interfaceiter_t *iter) {
* conversion. It comes from its own macro definition,
* and is really hard to shut up.
*/
- if (ioctl(fd, SIOCGLIFNETMASK, (char *)&lifreq) < 0) {
+ if (isc_ioctl(fd, SIOCGLIFNETMASK, (char *)&lifreq) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
isc_msgcat_get(isc_msgcat,
diff --git a/lib/isc/unix/ifiter_sysctl.c b/lib/isc/unix/ifiter_sysctl.c
index 072e3494f756..0fbb3778e73a 100644
--- a/lib/isc/unix/ifiter_sysctl.c
+++ b/lib/isc/unix/ifiter_sysctl.c
@@ -159,6 +159,10 @@ internal_current(isc_interfaceiter_t *iter) {
ifam = (struct ifa_msghdr *) ((char *) iter->buf + iter->pos);
ifam_end = (struct ifa_msghdr *) ((char *) iter->buf + iter->bufused);
+ // Skip wrong RTM version headers
+ if (ifam->ifam_version != RTM_VERSION)
+ return (ISC_R_IGNORE);
+
if (ifam->ifam_type == RTM_IFINFO) {
struct if_msghdr *ifm = (struct if_msghdr *) ifam;
struct sockaddr_dl *sdl = (struct sockaddr_dl *) (ifm + 1);
@@ -272,10 +276,11 @@ internal_current(isc_interfaceiter_t *iter) {
return (ISC_R_SUCCESS);
} else {
- printf(isc_msgcat_get(isc_msgcat, ISC_MSGSET_IFITERSYSCTL,
- ISC_MSG_UNEXPECTEDTYPE,
- "warning: unexpected interface list "
- "message type\n"));
+ printf("%s", isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_IFITERSYSCTL,
+ ISC_MSG_UNEXPECTEDTYPE,
+ "warning: unexpected interface "
+ "list message type\n"));
return (ISC_R_IGNORE);
}
}
diff --git a/lib/isc/unix/include/isc/net.h b/lib/isc/unix/include/isc/net.h
index 7d478833c9a9..37a0f3b81fe8 100644
--- a/lib/isc/unix/include/isc/net.h
+++ b/lib/isc/unix/include/isc/net.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: net.h,v 1.48.84.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
diff --git a/lib/isc/unix/include/isc/offset.h b/lib/isc/unix/include/isc/offset.h
index 0e484becddf6..8bf3779997cd 100644
--- a/lib/isc/unix/include/isc/offset.h
+++ b/lib/isc/unix/include/isc/offset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: offset.h,v 1.15.332.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: offset.h,v 1.17 2008/12/01 23:47:45 tbox Exp $ */
#ifndef ISC_OFFSET_H
#define ISC_OFFSET_H 1
diff --git a/lib/isc/unix/include/isc/stdtime.h b/lib/isc/unix/include/isc/stdtime.h
index 4cb9e81fa60c..c4931bfe6362 100644
--- a/lib/isc/unix/include/isc/stdtime.h
+++ b/lib/isc/unix/include/isc/stdtime.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stdtime.h,v 1.14 2007/06/19 23:47:19 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_STDTIME_H
#define ISC_STDTIME_H 1
@@ -31,6 +31,10 @@
* about its size.
*/
typedef isc_uint32_t isc_stdtime_t;
+
+/* but this flag helps... */
+#define STDTIME_ON_32BITS 1
+
/*
* isc_stdtime32_t is a 32-bit version of isc_stdtime_t. A variable of this
* type should only be used as an opaque integer (e.g.,) to compare two
diff --git a/lib/isc/unix/include/isc/strerror.h b/lib/isc/unix/include/isc/strerror.h
index 2953f71c6dac..899043bbffdd 100644
--- a/lib/isc/unix/include/isc/strerror.h
+++ b/lib/isc/unix/include/isc/strerror.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: strerror.h,v 1.8.332.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: strerror.h,v 1.10 2008/12/01 23:47:45 tbox Exp $ */
#ifndef ISC_STRERROR_H
#define ISC_STRERROR_H
diff --git a/lib/isc/unix/include/isc/time.h b/lib/isc/unix/include/isc/time.h
index 45c4510e7603..dc1cef9ad3f2 100644
--- a/lib/isc/unix/include/isc/time.h
+++ b/lib/isc/unix/include/isc/time.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.h,v 1.38.56.2 2009/01/05 23:47:23 tbox Exp $ */
+/* $Id: time.h,v 1.40 2009/01/05 23:47:54 tbox Exp $ */
#ifndef ISC_TIME_H
#define ISC_TIME_H 1
diff --git a/lib/isc/unix/interfaceiter.c b/lib/isc/unix/interfaceiter.c
index 996669fc91e0..c42fa685c920 100644
--- a/lib/isc/unix/interfaceiter.c
+++ b/lib/isc/unix/interfaceiter.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: interfaceiter.c,v 1.44.120.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: interfaceiter.c,v 1.45 2008/12/01 03:51:47 marka Exp $ */
/*! \file */
@@ -189,11 +189,9 @@ static isc_result_t
linux_if_inet6_current(isc_interfaceiter_t *iter) {
char address[33];
char name[IF_NAMESIZE+1];
- char strbuf[ISC_STRERRORSIZE];
struct in6_addr addr6;
unsigned int ifindex;
int prefix, scope, flags;
- struct ifreq ifreq;
int res;
unsigned int i;
@@ -238,34 +236,7 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
addr6.s6_addr[i] = byte;
}
iter->current.af = AF_INET6;
- iter->current.flags = 0;
- memset(&ifreq, 0, sizeof(ifreq));
- INSIST(sizeof(ifreq.ifr_name) <= sizeof(iter->current.name));
- strncpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name));
-
- 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;
-#ifdef IFF_POINTOPOINT
- if ((ifreq.ifr_flags & IFF_POINTOPOINT) != 0)
- iter->current.flags |= INTERFACE_F_POINTTOPOINT;
-#endif
- 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
-
+ iter->current.flags = INTERFACE_F_UP;
isc_netaddr_fromin6(&iter->current.address, &addr6);
iter->current.ifindex = ifindex;
if (isc_netaddr_islinklocal(&iter->current.address)) {
diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c
index 669a5be897ca..2ba17d165067 100644
--- a/lib/isc/unix/net.c
+++ b/lib/isc/unix/net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: net.c,v 1.40 2008/07/04 05:52:31 each Exp $ */
+/* $Id$ */
#include <config.h>
@@ -302,8 +302,6 @@ try_ipv6only(void) {
goto close;
}
- close(s);
-
ipv6only_result = ISC_R_SUCCESS;
close:
@@ -358,7 +356,6 @@ try_ipv6pktinfo(void) {
goto close;
}
- close(s);
ipv6pktinfo_result = ISC_R_SUCCESS;
close:
diff --git a/lib/isc/unix/resource.c b/lib/isc/unix/resource.c
index 8bd8885bee8b..29596e2aa6a1 100644
--- a/lib/isc/unix/resource.c
+++ b/lib/isc/unix/resource.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resource.c,v 1.21.66.2 2009/02/13 23:47:39 tbox Exp $ */
+/* $Id: resource.c,v 1.23 2009/02/13 23:48:14 tbox Exp $ */
#include <config.h>
diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c
index d09fe51ab57c..5fed888a11ae 100644
--- a/lib/isc/unix/socket.c
+++ b/lib/isc/unix/socket.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.308.12.8 2009/04/18 01:29:26 jinmei Exp $ */
+/* $Id$ */
/*! \file */
@@ -67,14 +67,28 @@
#include <sys/epoll.h>
#endif
#ifdef ISC_PLATFORM_HAVEDEVPOLL
+#if defined(HAVE_SYS_DEVPOLL_H)
#include <sys/devpoll.h>
+#elif defined(HAVE_DEVPOLL_H)
+#include <devpoll.h>
+#endif
#endif
#include "errno2result.h"
-#ifndef ISC_PLATFORM_USETHREADS
+/* See task.c about the following definition: */
+#ifdef BIND9
+#ifdef ISC_PLATFORM_USETHREADS
+#define USE_WATCHER_THREAD
+#else
+#define USE_SHARED_MANAGER
+#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* BIND9 */
+
+#ifndef USE_WATCHER_THREAD
#include "socket_p.h"
-#endif /* ISC_PLATFORM_USETHREADS */
+#include "../task_p.h"
+#endif /* USE_WATCHER_THREAD */
#if defined(SO_BSDCOMPAT) && defined(__linux__)
#include <sys/utsname.h>
@@ -97,7 +111,7 @@ typedef struct {
#define USE_SELECT
#endif /* ISC_PLATFORM_HAVEKQUEUE */
-#ifndef ISC_PLATFORM_USETHREADS
+#ifndef USE_WATCHER_THREAD
#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
struct isc_socketwait {
int nevents;
@@ -110,7 +124,7 @@ struct isc_socketwait {
int maxfd;
};
#endif /* USE_KQUEUE */
-#endif /* !ISC_PLATFORM_USETHREADS */
+#endif /* !USE_WATCHER_THREAD */
/*%
* Maximum number of allowable open sockets. This is also the maximum
@@ -244,7 +258,7 @@ typedef enum { poll_idle, poll_active, poll_checking } pollstate_t;
typedef isc_event_t intev_t;
#define SOCKET_MAGIC ISC_MAGIC('I', 'O', 'i', 'o')
-#define VALID_SOCKET(t) ISC_MAGIC_VALID(t, SOCKET_MAGIC)
+#define VALID_SOCKET(s) ISC_MAGIC_VALID(s, SOCKET_MAGIC)
/*!
* IPv6 control information. If the socket is an IPv6 socket we want
@@ -278,16 +292,21 @@ typedef isc_event_t intev_t;
*/
#define NRETRIES 10
-struct isc_socket {
+typedef struct isc__socket isc__socket_t;
+typedef struct isc__socketmgr isc__socketmgr_t;
+
+#define NEWCONNSOCK(ev) ((isc__socket_t *)(ev)->newsocket)
+
+struct isc__socket {
/* Not locked. */
- unsigned int magic;
- isc_socketmgr_t *manager;
+ isc_socket_t common;
+ isc__socketmgr_t *manager;
isc_mutex_t lock;
isc_sockettype_t type;
const isc_statscounter_t *statsindex;
/* Locked by socket lock. */
- ISC_LINK(isc_socket_t) link;
+ ISC_LINK(isc__socket_t) link;
unsigned int references;
int fd;
int pf;
@@ -315,7 +334,8 @@ struct isc_socket {
listener : 1, /* listener socket */
connected : 1,
connecting : 1, /* connect pending */
- bound : 1; /* bound to local addr */
+ bound : 1, /* bound to local addr */
+ dupped : 1;
#ifdef ISC_NET_RECVOVERFLOW
unsigned char overflow; /* used for MSG_TRUNC fake */
@@ -335,9 +355,9 @@ struct isc_socket {
#define SOCKET_MANAGER_MAGIC ISC_MAGIC('I', 'O', 'm', 'g')
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, SOCKET_MANAGER_MAGIC)
-struct isc_socketmgr {
+struct isc__socketmgr {
/* Not locked. */
- unsigned int magic;
+ isc_socketmgr_t common;
isc_mem_t *mctx;
isc_mutex_t lock;
isc_mutex_t *fdlock;
@@ -366,14 +386,14 @@ struct isc_socketmgr {
#endif
/* Locked by fdlock. */
- isc_socket_t **fds;
+ isc__socket_t **fds;
int *fdstate;
#ifdef USE_DEVPOLL
pollinfo_t *fdpollinfo;
#endif
/* Locked by manager lock. */
- ISC_LIST(isc_socket_t) socklist;
+ ISC_LIST(isc__socket_t) socklist;
#ifdef USE_SELECT
fd_set *read_fds;
fd_set *read_fds_copy;
@@ -382,17 +402,18 @@ struct isc_socketmgr {
int maxfd;
#endif /* USE_SELECT */
int reserved; /* unlocked */
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
isc_thread_t watcher;
isc_condition_t shutdown_ok;
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_WATCHER_THREAD */
unsigned int refs;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
+ int maxudp;
};
-#ifndef ISC_PLATFORM_USETHREADS
-static isc_socketmgr_t *socketmgr = NULL;
-#endif /* ISC_PLATFORM_USETHREADS */
+#ifdef USE_SHARED_MANAGER
+static isc__socketmgr_t *socketmgr = NULL;
+#endif /* USE_SHARED_MANAGER */
#define CLOSED 0 /* this one must be zero */
#define MANAGED 1
@@ -408,27 +429,176 @@ static isc_socketmgr_t *socketmgr = NULL;
# define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
#endif
-static void send_recvdone_event(isc_socket_t *, isc_socketevent_t **);
-static void send_senddone_event(isc_socket_t *, isc_socketevent_t **);
-static void free_socket(isc_socket_t **);
-static isc_result_t allocate_socket(isc_socketmgr_t *, isc_sockettype_t,
- isc_socket_t **);
-static void destroy(isc_socket_t **);
+static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
+ isc_sockettype_t type,
+ isc_socket_t **socketp,
+ isc_socket_t *dup_socket);
+static void send_recvdone_event(isc__socket_t *, isc_socketevent_t **);
+static void send_senddone_event(isc__socket_t *, isc_socketevent_t **);
+static void free_socket(isc__socket_t **);
+static isc_result_t allocate_socket(isc__socketmgr_t *, isc_sockettype_t,
+ isc__socket_t **);
+static void destroy(isc__socket_t **);
static void internal_accept(isc_task_t *, isc_event_t *);
static void internal_connect(isc_task_t *, isc_event_t *);
static void internal_recv(isc_task_t *, isc_event_t *);
static void internal_send(isc_task_t *, isc_event_t *);
static void internal_fdwatch_write(isc_task_t *, isc_event_t *);
static void internal_fdwatch_read(isc_task_t *, isc_event_t *);
-static void process_cmsg(isc_socket_t *, struct msghdr *, isc_socketevent_t *);
-static void build_msghdr_send(isc_socket_t *, isc_socketevent_t *,
+static void process_cmsg(isc__socket_t *, struct msghdr *, isc_socketevent_t *);
+static void build_msghdr_send(isc__socket_t *, isc_socketevent_t *,
struct msghdr *, struct iovec *, size_t *);
-static void build_msghdr_recv(isc_socket_t *, isc_socketevent_t *,
+static void build_msghdr_recv(isc__socket_t *, isc_socketevent_t *,
struct msghdr *, struct iovec *, size_t *);
-#ifdef ISC_PLATFORM_USETHREADS
-static isc_boolean_t process_ctlfd(isc_socketmgr_t *manager);
+#ifdef USE_WATCHER_THREAD
+static isc_boolean_t process_ctlfd(isc__socketmgr_t *manager);
+#endif
+
+/*%
+ * The following can be either static or public, depending on build environment.
+ */
+
+#ifdef BIND9
+#define ISC_SOCKETFUNC_SCOPE
+#else
+#define ISC_SOCKETFUNC_SCOPE static
+#endif
+
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp);
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_attach(isc_socket_t *sock, isc_socket_t **socketp);
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_detach(isc_socket_t **socketp);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
+ unsigned int maxsocks);
+ISC_SOCKETFUNC_SCOPE void
+isc__socketmgr_destroy(isc_socketmgr_t **managerp);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recv(isc_socket_t *sock, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recv2(isc_socket_t *sock, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_socketevent_t *event, unsigned int flags);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_send(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendto(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
+ isc_socketevent_t *event, unsigned int flags);
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
+ isc_uint32_t owner, isc_uint32_t group);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
+ unsigned int options);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_filter(isc_socket_t *sock, const char *filter);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_listen(isc_socket_t *sock, unsigned int backlog);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_accept(isc_socket_t *sock,
+ isc_task_t *task, isc_taskaction_t action, const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
+ isc_task_t *task, isc_taskaction_t action,
+ const void *arg);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp);
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how);
+ISC_SOCKETFUNC_SCOPE isc_sockettype_t
+isc__socket_gettype(isc_socket_t *sock);
+ISC_SOCKETFUNC_SCOPE isc_boolean_t
+isc__socket_isbound(isc_socket_t *sock);
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes);
+#if defined(HAVE_LIBXML2) && defined(BIND9)
+ISC_SOCKETFUNC_SCOPE void
+isc__socketmgr_renderxml(isc_socketmgr_t *mgr0, xmlTextWriterPtr writer);
#endif
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
+ isc_sockfdwatch_t callback, void *cbarg,
+ isc_task_t *task, isc_socket_t **socketp);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_fdwatchpoke(isc_socket_t *sock, int flags);
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp);
+ISC_SOCKETFUNC_SCOPE int
+isc__socket_getfd(isc_socket_t *sock);
+
+static struct {
+ isc_socketmethods_t methods;
+
+ /*%
+ * The following are defined just for avoiding unused static functions.
+ */
+#ifndef BIND9
+ void *recvv, *send, *sendv, *sendto2, *cleanunix, *permunix, *filter,
+ *listen, *accept, *getpeername, *isbound;
+#endif
+} socketmethods = {
+ {
+ isc__socket_attach,
+ isc__socket_detach,
+ isc__socket_bind,
+ isc__socket_sendto,
+ isc__socket_connect,
+ isc__socket_recv,
+ isc__socket_cancel,
+ isc__socket_getsockname,
+ isc__socket_gettype,
+ isc__socket_ipv6only,
+ isc__socket_fdwatchpoke,
+ isc__socket_dup,
+ isc__socket_getfd
+ }
+#ifndef BIND9
+ ,
+ (void *)isc__socket_recvv, (void *)isc__socket_send,
+ (void *)isc__socket_sendv, (void *)isc__socket_sendto2,
+ (void *)isc__socket_cleanunix, (void *)isc__socket_permunix,
+ (void *)isc__socket_filter, (void *)isc__socket_listen,
+ (void *)isc__socket_accept, (void *)isc__socket_getpeername,
+ (void *)isc__socket_isbound
+#endif
+};
+
+static isc_socketmgrmethods_t socketmgrmethods = {
+ isc__socketmgr_destroy,
+ isc__socket_create,
+ isc__socket_fdwatchcreate
+};
+
#define SELECT_POKE_SHUTDOWN (-1)
#define SELECT_POKE_NOTHING (-2)
#define SELECT_POKE_READ (-3)
@@ -527,12 +697,14 @@ static const isc_statscounter_t fdwatchstatsindex[] = {
isc_sockstatscounter_fdwatchrecvfail
};
+#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL) || \
+ defined(USE_WATCHER_THREAD)
static void
-manager_log(isc_socketmgr_t *sockmgr,
+manager_log(isc__socketmgr_t *sockmgr,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
static void
-manager_log(isc_socketmgr_t *sockmgr,
+manager_log(isc__socketmgr_t *sockmgr,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
const char *fmt, ...)
{
@@ -549,14 +721,15 @@ manager_log(isc_socketmgr_t *sockmgr,
isc_log_write(isc_lctx, category, module, level,
"sockmgr %p: %s", sockmgr, msgbuf);
}
+#endif
static void
-socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
+socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
static void
-socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
+socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...)
@@ -591,7 +764,7 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
* setting IPV6_V6ONLY.
*/
static void
-FIX_IPV6_RECVPKTINFO(isc_socket_t *sock)
+FIX_IPV6_RECVPKTINFO(isc__socket_t *sock)
{
char strbuf[ISC_STRERRORSIZE];
int on = 1;
@@ -602,6 +775,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock)
if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
(void *)&on, sizeof(on)) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_RECVPKTINFO) "
"%s: %s", sock->fd,
@@ -628,7 +802,7 @@ inc_stats(isc_stats_t *stats, isc_statscounter_t counterid) {
}
static inline isc_result_t
-watch_fd(isc_socketmgr_t *manager, int fd, int msg) {
+watch_fd(isc__socketmgr_t *manager, int fd, int msg) {
isc_result_t result = ISC_R_SUCCESS;
#ifdef USE_KQUEUE
@@ -652,6 +826,7 @@ watch_fd(isc_socketmgr_t *manager, int fd, int msg) {
event.events = EPOLLIN;
else
event.events = EPOLLOUT;
+ memset(&event.data, 0, sizeof(event.data));
event.data.fd = fd;
if (epoll_ctl(manager->epoll_fd, EPOLL_CTL_ADD, fd, &event) == -1 &&
errno != EEXIST) {
@@ -695,7 +870,7 @@ watch_fd(isc_socketmgr_t *manager, int fd, int msg) {
}
static inline isc_result_t
-unwatch_fd(isc_socketmgr_t *manager, int fd, int msg) {
+unwatch_fd(isc__socketmgr_t *manager, int fd, int msg) {
isc_result_t result = ISC_R_SUCCESS;
#ifdef USE_KQUEUE
@@ -719,6 +894,7 @@ unwatch_fd(isc_socketmgr_t *manager, int fd, int msg) {
event.events = EPOLLIN;
else
event.events = EPOLLOUT;
+ memset(&event.data, 0, sizeof(event.data));
event.data.fd = fd;
if (epoll_ctl(manager->epoll_fd, EPOLL_CTL_DEL, fd, &event) == -1 &&
errno != ENOENT) {
@@ -781,7 +957,7 @@ unwatch_fd(isc_socketmgr_t *manager, int fd, int msg) {
}
static void
-wakeup_socket(isc_socketmgr_t *manager, int fd, int msg) {
+wakeup_socket(isc__socketmgr_t *manager, int fd, int msg) {
isc_result_t result;
int lockid = FDLOCK_ID(fd);
@@ -842,14 +1018,14 @@ wakeup_socket(isc_socketmgr_t *manager, int fd, int msg) {
}
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
/*
* Poke the select loop when there is something for us to do.
* The write is required (by POSIX) to complete. That is, we
* will not get partial writes.
*/
static void
-select_poke(isc_socketmgr_t *mgr, int fd, int msg) {
+select_poke(isc__socketmgr_t *mgr, int fd, int msg) {
int cc;
int buf[2];
char strbuf[ISC_STRERRORSIZE];
@@ -888,7 +1064,7 @@ select_poke(isc_socketmgr_t *mgr, int fd, int msg) {
* Read a message on the internal fd.
*/
static void
-select_readmsg(isc_socketmgr_t *mgr, int *fd, int *msg) {
+select_readmsg(isc__socketmgr_t *mgr, int *fd, int *msg) {
int buf[2];
int cc;
char strbuf[ISC_STRERRORSIZE];
@@ -915,19 +1091,19 @@ select_readmsg(isc_socketmgr_t *mgr, int *fd, int *msg) {
*fd = buf[0];
*msg = buf[1];
}
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_WATCHER_THREAD */
/*
* Update the state of the socketmgr when something changes.
*/
static void
-select_poke(isc_socketmgr_t *manager, int fd, int msg) {
+select_poke(isc__socketmgr_t *manager, int fd, int msg) {
if (msg == SELECT_POKE_SHUTDOWN)
return;
else if (fd >= 0)
wakeup_socket(manager, fd, msg);
return;
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
/*
* Make a fd non-blocking.
@@ -1020,7 +1196,7 @@ cmsg_space(ISC_SOCKADDR_LEN_T len) {
* Process control messages received on a socket.
*/
static void
-process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
+process_cmsg(isc__socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
#ifdef USE_CMSG
struct cmsghdr *cmsgp;
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
@@ -1123,7 +1299,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
* this transaction can send.
*/
static void
-build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
+build_msghdr_send(isc__socket_t *sock, isc_socketevent_t *dev,
struct msghdr *msg, struct iovec *iov, size_t *write_countp)
{
unsigned int iovcount;
@@ -1200,6 +1376,9 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
if ((sock->type == isc_sockettype_udp)
&& ((dev->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0)) {
+#if defined(IPV6_USE_MIN_MTU)
+ int use_min_mtu = 1; /* -1, 0, 1 */
+#endif
struct cmsghdr *cmsgp;
struct in6_pktinfo *pktinfop;
@@ -1218,6 +1397,22 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
cmsgp->cmsg_len = cmsg_len(sizeof(struct in6_pktinfo));
pktinfop = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
memcpy(pktinfop, &dev->pktinfo, sizeof(struct in6_pktinfo));
+#if defined(IPV6_USE_MIN_MTU)
+ /*
+ * Set IPV6_USE_MIN_MTU as a per packet option as FreeBSD
+ * ignores setsockopt(IPV6_USE_MIN_MTU) when IPV6_PKTINFO
+ * is used.
+ */
+ cmsgp = (struct cmsghdr *)(sock->sendcmsgbuf +
+ msg->msg_controllen);
+ msg->msg_controllen += cmsg_space(sizeof(use_min_mtu));
+ INSIST(msg->msg_controllen <= sock->sendcmsgbuflen);
+
+ cmsgp->cmsg_level = IPPROTO_IPV6;
+ cmsgp->cmsg_type = IPV6_USE_MIN_MTU;
+ cmsgp->cmsg_len = cmsg_len(sizeof(use_min_mtu));
+ memcpy(CMSG_DATA(cmsgp), &use_min_mtu, sizeof(use_min_mtu));
+#endif
}
#endif /* USE_CMSG && ISC_PLATFORM_HAVEIPV6 */
#else /* ISC_NET_BSD44MSGHDR */
@@ -1242,7 +1437,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
* this transaction can receive.
*/
static void
-build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
+build_msghdr_recv(isc__socket_t *sock, isc_socketevent_t *dev,
struct msghdr *msg, struct iovec *iov, size_t *read_countp)
{
unsigned int iovcount;
@@ -1363,7 +1558,7 @@ build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
}
static void
-set_dev_address(isc_sockaddr_t *address, isc_socket_t *sock,
+set_dev_address(isc_sockaddr_t *address, isc__socket_t *sock,
isc_socketevent_t *dev)
{
if (sock->type == isc_sockettype_udp) {
@@ -1387,7 +1582,7 @@ destroy_socketevent(isc_event_t *event) {
}
static isc_socketevent_t *
-allocate_socketevent(isc_socket_t *sock, isc_eventtype_t eventtype,
+allocate_socketevent(isc__socket_t *sock, isc_eventtype_t eventtype,
isc_taskaction_t action, const void *arg)
{
isc_socketevent_t *ev;
@@ -1400,7 +1595,7 @@ allocate_socketevent(isc_socket_t *sock, isc_eventtype_t eventtype,
if (ev == NULL)
return (NULL);
- ev->result = ISC_R_UNEXPECTED;
+ ev->result = ISC_R_UNSET;
ISC_LINK_INIT(ev, ev_link);
ISC_LIST_INIT(ev->bufferlist);
ev->region.base = NULL;
@@ -1440,7 +1635,7 @@ dump_msg(struct msghdr *msg) {
#define DOIO_EOF 3 /* EOF, no event sent */
static int
-doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
+doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
int cc;
struct iovec iov[MAXSCATTERGATHER_RECV];
size_t read_count;
@@ -1520,12 +1715,22 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
}
/*
- * On TCP, zero length reads indicate EOF, while on
- * UDP, zero length reads are perfectly valid, although
- * strange.
+ * On TCP and UNIX sockets, zero length reads indicate EOF,
+ * while on UDP sockets, zero length reads are perfectly valid,
+ * although strange.
*/
- if ((sock->type == isc_sockettype_tcp) && (cc == 0))
- return (DOIO_EOF);
+ switch (sock->type) {
+ case isc_sockettype_tcp:
+ case isc_sockettype_unix:
+ if (cc == 0)
+ return (DOIO_EOF);
+ break;
+ case isc_sockettype_udp:
+ break;
+ case isc_sockettype_fdwatch:
+ default:
+ INSIST(0);
+ }
if (sock->type == isc_sockettype_udp) {
dev->address.length = msghdr.msg_namelen;
@@ -1538,6 +1743,12 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
}
return (DOIO_SOFT);
}
+ /*
+ * Simulate a firewall blocking UDP responses bigger than
+ * 512 bytes.
+ */
+ if (sock->manager->maxudp != 0 && cc > sock->manager->maxudp)
+ return (DOIO_SOFT);
}
socket_log(sock, &dev->address, IOEVENT,
@@ -1578,6 +1789,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
} else {
isc_buffer_add(buffer, actual_count);
actual_count = 0;
+ POST(actual_count);
break;
}
buffer = ISC_LIST_NEXT(buffer, link);
@@ -1614,7 +1826,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
* No other return values are possible.
*/
static int
-doio_send(isc_socket_t *sock, isc_socketevent_t *dev) {
+doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
int cc;
struct iovec iov[MAXSCATTERGATHER_SEND];
size_t write_count;
@@ -1725,7 +1937,7 @@ doio_send(isc_socket_t *sock, isc_socketevent_t *dev) {
* references exist.
*/
static void
-closesocket(isc_socketmgr_t *manager, isc_socket_t *sock, int fd) {
+closesocket(isc__socketmgr_t *manager, isc__socket_t *sock, int fd) {
isc_sockettype_t type = sock->type;
int lockid = FDLOCK_ID(fd);
@@ -1788,10 +2000,10 @@ closesocket(isc_socketmgr_t *manager, isc_socket_t *sock, int fd) {
}
static void
-destroy(isc_socket_t **sockp) {
+destroy(isc__socket_t **sockp) {
int fd;
- isc_socket_t *sock = *sockp;
- isc_socketmgr_t *manager = sock->manager;
+ isc__socket_t *sock = *sockp;
+ isc__socketmgr_t *manager = sock->manager;
socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_DESTROYING, "destroying");
@@ -1812,21 +2024,22 @@ destroy(isc_socket_t **sockp) {
ISC_LIST_UNLINK(manager->socklist, sock, link);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (ISC_LIST_EMPTY(manager->socklist))
SIGNAL(&manager->shutdown_ok);
-#endif /* ISC_PLATFORM_USETHREADS */
-
- UNLOCK(&manager->lock);
+#endif /* USE_WATCHER_THREAD */
+ /* can't unlock manager as its memory context is still used */
free_socket(sockp);
+
+ UNLOCK(&manager->lock);
}
static isc_result_t
-allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
- isc_socket_t **socketp)
+allocate_socket(isc__socketmgr_t *manager, isc_sockettype_t type,
+ isc__socket_t **socketp)
{
- isc_socket_t *sock;
+ isc__socket_t *sock;
isc_result_t result;
ISC_SOCKADDR_LEN_T cmsgbuflen;
@@ -1835,14 +2048,14 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
if (sock == NULL)
return (ISC_R_NOMEMORY);
- result = ISC_R_UNEXPECTED;
-
- sock->magic = 0;
+ sock->common.magic = 0;
+ sock->common.impmagic = 0;
sock->references = 0;
sock->manager = manager;
sock->type = type;
sock->fd = -1;
+ sock->dupped = 0;
sock->statsindex = NULL;
ISC_LINK_INIT(sock, link);
@@ -1855,7 +2068,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
*/
cmsgbuflen = 0;
#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
- cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo));
+ cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
#endif
#if defined(USE_CMSG) && defined(SO_TIMESTAMP)
cmsgbuflen += cmsg_space(sizeof(struct timeval));
@@ -1863,19 +2076,30 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
sock->recvcmsgbuflen = cmsgbuflen;
if (sock->recvcmsgbuflen != 0U) {
sock->recvcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
- if (sock->recvcmsgbuf == NULL)
+ if (sock->recvcmsgbuf == NULL) {
+ result = ISC_R_NOMEMORY;
goto error;
+ }
}
cmsgbuflen = 0;
#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
- cmsgbuflen = cmsg_space(sizeof(struct in6_pktinfo));
+ cmsgbuflen += cmsg_space(sizeof(struct in6_pktinfo));
+#if defined(IPV6_USE_MIN_MTU)
+ /*
+ * Provide space for working around FreeBSD's broken IPV6_USE_MIN_MTU
+ * support.
+ */
+ cmsgbuflen += cmsg_space(sizeof(int));
+#endif
#endif
sock->sendcmsgbuflen = cmsgbuflen;
if (sock->sendcmsgbuflen != 0U) {
sock->sendcmsgbuf = isc_mem_get(manager->mctx, cmsgbuflen);
- if (sock->sendcmsgbuf == NULL)
+ if (sock->sendcmsgbuf == NULL) {
+ result = ISC_R_NOMEMORY;
goto error;
+ }
}
memset(sock->name, 0, sizeof(sock->name));
@@ -1901,7 +2125,8 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
*/
result = isc_mutex_init(&sock->lock);
if (result != ISC_R_SUCCESS) {
- sock->magic = 0;
+ sock->common.magic = 0;
+ sock->common.impmagic = 0;
goto error;
}
@@ -1915,7 +2140,8 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
ISC_EVENTATTR_NOPURGE, NULL, ISC_SOCKEVENT_INTW,
NULL, sock, sock, NULL, NULL);
- sock->magic = SOCKET_MAGIC;
+ sock->common.magic = ISCAPI_SOCKET_MAGIC;
+ sock->common.impmagic = SOCKET_MAGIC;
*socketp = sock;
return (ISC_R_SUCCESS);
@@ -1940,8 +2166,8 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
* also close the socket.
*/
static void
-free_socket(isc_socket_t **socketp) {
- isc_socket_t *sock = *socketp;
+free_socket(isc__socket_t **socketp) {
+ isc__socket_t *sock = *socketp;
INSIST(sock->references == 0);
INSIST(VALID_SOCKET(sock));
@@ -1961,7 +2187,8 @@ free_socket(isc_socket_t **socketp) {
isc_mem_put(sock->manager->mctx, sock->sendcmsgbuf,
sock->sendcmsgbuflen);
- sock->magic = 0;
+ sock->common.magic = 0;
+ sock->common.impmagic = 0;
DESTROYLOCK(&sock->lock);
@@ -2009,7 +2236,10 @@ clear_bsdcompat(void) {
#endif
static isc_result_t
-opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
+opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
+ isc__socket_t *dup_socket)
+{
+ isc_result_t result;
char strbuf[ISC_STRERRORSIZE];
const char *err = "socket";
int tries = 0;
@@ -2022,22 +2252,29 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
#endif
again:
- switch (sock->type) {
- case isc_sockettype_udp:
- sock->fd = socket(sock->pf, SOCK_DGRAM, IPPROTO_UDP);
- break;
- case isc_sockettype_tcp:
- sock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
- break;
- case isc_sockettype_unix:
- sock->fd = socket(sock->pf, SOCK_STREAM, 0);
- break;
- case isc_sockettype_fdwatch:
- /*
- * We should not be called for isc_sockettype_fdwatch sockets.
- */
- INSIST(0);
- break;
+ if (dup_socket == NULL) {
+ switch (sock->type) {
+ case isc_sockettype_udp:
+ sock->fd = socket(sock->pf, SOCK_DGRAM, IPPROTO_UDP);
+ break;
+ case isc_sockettype_tcp:
+ sock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP);
+ break;
+ case isc_sockettype_unix:
+ sock->fd = socket(sock->pf, SOCK_STREAM, 0);
+ break;
+ case isc_sockettype_fdwatch:
+ /*
+ * We should not be called for isc_sockettype_fdwatch
+ * sockets.
+ */
+ INSIST(0);
+ break;
+ }
+ } else {
+ sock->fd = dup(dup_socket->fd);
+ sock->dupped = 1;
+ sock->bound = dup_socket->bound;
}
if (sock->fd == -1 && errno == EINTR && tries++ < 42)
goto again;
@@ -2114,9 +2351,13 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
}
}
- if (make_nonblock(sock->fd) != ISC_R_SUCCESS) {
+ if (dup_socket != NULL)
+ goto setup_done;
+
+ result = make_nonblock(sock->fd);
+ if (result != ISC_R_SUCCESS) {
(void)close(sock->fd);
- return (ISC_R_UNEXPECTED);
+ return (result);
}
#ifdef SO_BSDCOMPAT
@@ -2216,10 +2457,39 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
#ifdef IPV6_USE_MIN_MTU /* RFC 3542, not too common yet*/
/* use minimum MTU */
+ if (sock->pf == AF_INET6 &&
+ setsockopt(sock->fd, IPPROTO_IPV6, IPV6_USE_MIN_MTU,
+ (void *)&on, sizeof(on)) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__,
+ "setsockopt(%d, IPV6_USE_MIN_MTU) "
+ "%s: %s", sock->fd,
+ isc_msgcat_get(isc_msgcat,
+ ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED,
+ "failed"),
+ strbuf);
+ }
+#endif
+#if defined(IPV6_MTU)
+ /*
+ * Use minimum MTU on IPv6 sockets.
+ */
+ if (sock->pf == AF_INET6) {
+ int mtu = 1280;
+ (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_MTU,
+ &mtu, sizeof(mtu));
+ }
+#endif
+#if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DONT)
+ /*
+ * Turn off Path MTU discovery on IPv6/UDP sockets.
+ */
if (sock->pf == AF_INET6) {
+ int action = IPV6_PMTUDISC_DONT;
(void)setsockopt(sock->fd, IPPROTO_IPV6,
- IPV6_USE_MIN_MTU,
- (void *)&on, sizeof(on));
+ IPV6_MTU_DISCOVER, &action,
+ sizeof(action));
}
#endif
#endif /* ISC_PLATFORM_HAVEIPV6 */
@@ -2269,22 +2539,24 @@ opensocket(isc_socketmgr_t *manager, isc_socket_t *sock) {
}
#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
+setup_done:
inc_stats(manager->stats, sock->statsindex[STATID_OPEN]);
return (ISC_R_SUCCESS);
}
-/*%
- * Create a new 'type' socket managed by 'manager'. Events
- * will be posted to 'task' and when dispatched 'action' will be
- * called with 'arg' as the arg value. The new socket is returned
- * in 'socketp'.
+/*
+ * Create a 'type' socket or duplicate an existing socket, managed
+ * by 'manager'. Events will be posted to 'task' and when dispatched
+ * 'action' will be called with 'arg' as the arg value. The new
+ * socket is returned in 'socketp'.
*/
-isc_result_t
-isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp)
+static isc_result_t
+socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp, isc_socket_t *dup_socket)
{
- isc_socket_t *sock = NULL;
+ isc__socket_t *sock = NULL;
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
isc_result_t result;
int lockid;
@@ -2313,15 +2585,17 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
}
sock->pf = pf;
- result = opensocket(manager, sock);
+
+ result = opensocket(manager, sock, (isc__socket_t *)dup_socket);
if (result != ISC_R_SUCCESS) {
inc_stats(manager->stats, sock->statsindex[STATID_OPENFAIL]);
free_socket(&sock);
return (result);
}
+ sock->common.methods = (isc_socketmethods_t *)&socketmethods;
sock->references = 1;
- *socketp = sock;
+ *socketp = (isc_socket_t *)sock;
/*
* Note we don't have to lock the socket like we normally would because
@@ -2347,14 +2621,45 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
UNLOCK(&manager->lock);
socket_log(sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_CREATED, "created");
+ ISC_MSG_CREATED, dup_socket == NULL ? "dupped" : "created");
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_socket_open(isc_socket_t *sock) {
+/*%
+ * Create a new 'type' socket managed by 'manager'. Events
+ * will be posted to 'task' and when dispatched 'action' will be
+ * called with 'arg' as the arg value. The new socket is returned
+ * in 'socketp'.
+ */
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp)
+{
+ return (socket_create(manager0, pf, type, socketp, NULL));
+}
+
+/*%
+ * Duplicate an existing socket. The new socket is returned
+ * in 'socketp'.
+ */
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_dup(isc_socket_t *sock0, isc_socket_t **socketp) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
+ REQUIRE(VALID_SOCKET(sock));
+ REQUIRE(socketp != NULL && *socketp == NULL);
+
+ return (socket_create((isc_socketmgr_t *) sock->manager,
+ sock->pf, sock->type, socketp,
+ sock0));
+}
+
+#ifdef BIND9
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_open(isc_socket_t *sock0) {
isc_result_t result;
+ isc__socket_t *sock = (isc__socket_t *)sock0;
REQUIRE(VALID_SOCKET(sock));
@@ -2368,7 +2673,7 @@ isc_socket_open(isc_socket_t *sock) {
*/
REQUIRE(sock->fd == -1);
- result = opensocket(sock->manager, sock);
+ result = opensocket(sock->manager, sock, NULL);
if (result != ISC_R_SUCCESS)
sock->fd = -1;
@@ -2394,6 +2699,7 @@ isc_socket_open(isc_socket_t *sock) {
return (result);
}
+#endif /* BIND9 */
/*
* Create a new 'type' socket managed by 'manager'. Events
@@ -2401,12 +2707,13 @@ isc_socket_open(isc_socket_t *sock) {
* called with 'arg' as the arg value. The new socket is returned
* in 'socketp'.
*/
-isc_result_t
-isc_socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
- isc_sockfdwatch_t callback, void *cbarg,
- isc_task_t *task, isc_socket_t **socketp)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_fdwatchcreate(isc_socketmgr_t *manager0, int fd, int flags,
+ isc_sockfdwatch_t callback, void *cbarg,
+ isc_task_t *task, isc_socket_t **socketp)
{
- isc_socket_t *sock = NULL;
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
+ isc__socket_t *sock = NULL;
isc_result_t result;
int lockid;
@@ -2424,8 +2731,9 @@ isc_socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
sock->fdwatchtask = task;
sock->statsindex = fdwatchstatsindex;
+ sock->common.methods = (isc_socketmethods_t *)&socketmethods;
sock->references = 1;
- *socketp = sock;
+ *socketp = (isc_socket_t *)sock;
/*
* Note we don't have to lock the socket like we normally would because
@@ -2458,10 +2766,50 @@ isc_socket_fdwatchcreate(isc_socketmgr_t *manager, int fd, int flags,
}
/*
+ * Indicate to the manager that it should watch the socket again.
+ * This can be used to restart watching if the previous event handler
+ * didn't indicate there was more data to be processed. Primarily
+ * it is for writing but could be used for reading if desired
+ */
+
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_fdwatchpoke(isc_socket_t *sock0, int flags)
+{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
+ REQUIRE(VALID_SOCKET(sock));
+
+ /*
+ * We check both flags first to allow us to get the lock
+ * once but only if we need it.
+ */
+
+ if ((flags & (ISC_SOCKFDWATCH_READ | ISC_SOCKFDWATCH_WRITE)) != 0) {
+ LOCK(&sock->lock);
+ if (((flags & ISC_SOCKFDWATCH_READ) != 0) &&
+ !sock->pending_recv)
+ select_poke(sock->manager, sock->fd,
+ SELECT_POKE_READ);
+ if (((flags & ISC_SOCKFDWATCH_WRITE) != 0) &&
+ !sock->pending_send)
+ select_poke(sock->manager, sock->fd,
+ SELECT_POKE_WRITE);
+ UNLOCK(&sock->lock);
+ }
+
+ socket_log(sock, NULL, TRACE, isc_msgcat, ISC_MSGSET_SOCKET,
+ ISC_MSG_POKED, "fdwatch-poked flags: %d", flags);
+
+ return (ISC_R_SUCCESS);
+}
+
+/*
* Attach to a socket. Caller must explicitly detach when it is done.
*/
-void
-isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_attach(isc_socket_t *sock0, isc_socket_t **socketp) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
REQUIRE(VALID_SOCKET(sock));
REQUIRE(socketp != NULL && *socketp == NULL);
@@ -2469,20 +2817,20 @@ isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
sock->references++;
UNLOCK(&sock->lock);
- *socketp = sock;
+ *socketp = (isc_socket_t *)sock;
}
/*
* Dereference a socket. If this is the last reference to it, clean things
* up by destroying the socket.
*/
-void
-isc_socket_detach(isc_socket_t **socketp) {
- isc_socket_t *sock;
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_detach(isc_socket_t **socketp) {
+ isc__socket_t *sock;
isc_boolean_t kill_socket = ISC_FALSE;
REQUIRE(socketp != NULL);
- sock = *socketp;
+ sock = (isc__socket_t *)*socketp;
REQUIRE(VALID_SOCKET(sock));
LOCK(&sock->lock);
@@ -2498,12 +2846,14 @@ isc_socket_detach(isc_socket_t **socketp) {
*socketp = NULL;
}
-isc_result_t
-isc_socket_close(isc_socket_t *sock) {
+#ifdef BIND9
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_close(isc_socket_t *sock0) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
int fd;
- isc_socketmgr_t *manager;
- isc_sockettype_t type;
+ isc__socketmgr_t *manager;
+ fflush(stdout);
REQUIRE(VALID_SOCKET(sock));
LOCK(&sock->lock);
@@ -2522,9 +2872,9 @@ isc_socket_close(isc_socket_t *sock) {
INSIST(sock->connect_ev == NULL);
manager = sock->manager;
- type = sock->type;
fd = sock->fd;
sock->fd = -1;
+ sock->dupped = 0;
memset(sock->name, 0, sizeof(sock->name));
sock->tag = NULL;
sock->listener = 0;
@@ -2539,6 +2889,7 @@ isc_socket_close(isc_socket_t *sock) {
return (ISC_R_SUCCESS);
}
+#endif /* BIND9 */
/*
* I/O is possible on a given socket. Schedule an event to this task that
@@ -2549,7 +2900,7 @@ isc_socket_close(isc_socket_t *sock) {
* The socket and manager must be locked before calling this function.
*/
static void
-dispatch_recv(isc_socket_t *sock) {
+dispatch_recv(isc__socket_t *sock) {
intev_t *iev;
isc_socketevent_t *ev;
isc_task_t *sender;
@@ -2583,7 +2934,7 @@ dispatch_recv(isc_socket_t *sock) {
}
static void
-dispatch_send(isc_socket_t *sock) {
+dispatch_send(isc__socket_t *sock) {
intev_t *iev;
isc_socketevent_t *ev;
isc_task_t *sender;
@@ -2620,7 +2971,7 @@ dispatch_send(isc_socket_t *sock) {
* Dispatch an internal accept event.
*/
static void
-dispatch_accept(isc_socket_t *sock) {
+dispatch_accept(isc__socket_t *sock) {
intev_t *iev;
isc_socket_newconnev_t *ev;
@@ -2646,7 +2997,7 @@ dispatch_accept(isc_socket_t *sock) {
}
static void
-dispatch_connect(isc_socket_t *sock) {
+dispatch_connect(isc__socket_t *sock) {
intev_t *iev;
isc_socket_connev_t *ev;
@@ -2676,7 +3027,7 @@ dispatch_connect(isc_socket_t *sock) {
* Caller must have the socket locked if the event is attached to the socket.
*/
static void
-send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
+send_recvdone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
isc_task_t *task;
task = (*dev)->ev_sender;
@@ -2699,7 +3050,7 @@ send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
* Caller must have the socket locked if the event is attached to the socket.
*/
static void
-send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
+send_senddone_event(isc__socket_t *sock, isc_socketevent_t **dev) {
isc_task_t *task;
INSIST(dev != NULL && *dev != NULL);
@@ -2730,8 +3081,8 @@ send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev) {
*/
static void
internal_accept(isc_task_t *me, isc_event_t *ev) {
- isc_socket_t *sock;
- isc_socketmgr_t *manager;
+ isc__socket_t *sock;
+ isc__socketmgr_t *manager;
isc_socket_newconnev_t *dev;
isc_task_t *task;
ISC_SOCKADDR_LEN_T addrlen;
@@ -2786,9 +3137,9 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
* daemons such as BIND 8 and Apache.
*/
- addrlen = sizeof(dev->newsocket->peer_address.type);
- memset(&dev->newsocket->peer_address.type, 0, addrlen);
- fd = accept(sock->fd, &dev->newsocket->peer_address.type.sa,
+ addrlen = sizeof(NEWCONNSOCK(dev)->peer_address.type);
+ memset(&NEWCONNSOCK(dev)->peer_address.type, 0, addrlen);
+ fd = accept(sock->fd, &NEWCONNSOCK(dev)->peer_address.type.sa,
(void *)&addrlen);
#ifdef F_DUPFD
@@ -2858,14 +3209,14 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
(void)close(fd);
goto soft_error;
- } else if (dev->newsocket->peer_address.type.sa.sa_family !=
+ } else if (NEWCONNSOCK(dev)->peer_address.type.sa.sa_family !=
sock->pf)
{
UNEXPECTED_ERROR(__FILE__, __LINE__,
"internal_accept(): "
"accept() returned peer address "
"family %u (expected %u)",
- dev->newsocket->peer_address.
+ NEWCONNSOCK(dev)->peer_address.
type.sa.sa_family,
sock->pf);
(void)close(fd);
@@ -2884,8 +3235,8 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
}
if (fd != -1) {
- dev->newsocket->peer_address.length = addrlen;
- dev->newsocket->pf = sock->pf;
+ NEWCONNSOCK(dev)->peer_address.length = addrlen;
+ NEWCONNSOCK(dev)->pf = sock->pf;
}
/*
@@ -2901,10 +3252,12 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
UNLOCK(&sock->lock);
- if (fd != -1 && (make_nonblock(fd) != ISC_R_SUCCESS)) {
- (void)close(fd);
- fd = -1;
- result = ISC_R_UNEXPECTED;
+ if (fd != -1) {
+ result = make_nonblock(fd);
+ if (result != ISC_R_SUCCESS) {
+ (void)close(fd);
+ fd = -1;
+ }
}
/*
@@ -2914,28 +3267,28 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
int lockid = FDLOCK_ID(fd);
LOCK(&manager->fdlock[lockid]);
- manager->fds[fd] = dev->newsocket;
+ manager->fds[fd] = NEWCONNSOCK(dev);
manager->fdstate[fd] = MANAGED;
UNLOCK(&manager->fdlock[lockid]);
LOCK(&manager->lock);
- ISC_LIST_APPEND(manager->socklist, dev->newsocket, link);
+ ISC_LIST_APPEND(manager->socklist, NEWCONNSOCK(dev), link);
- dev->newsocket->fd = fd;
- dev->newsocket->bound = 1;
- dev->newsocket->connected = 1;
+ NEWCONNSOCK(dev)->fd = fd;
+ NEWCONNSOCK(dev)->bound = 1;
+ NEWCONNSOCK(dev)->connected = 1;
/*
* Save away the remote address
*/
- dev->address = dev->newsocket->peer_address;
+ dev->address = NEWCONNSOCK(dev)->peer_address;
#ifdef USE_SELECT
if (manager->maxfd < fd)
manager->maxfd = fd;
#endif
- socket_log(sock, &dev->newsocket->peer_address, CREATION,
+ socket_log(sock, &NEWCONNSOCK(dev)->peer_address, CREATION,
isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_ACCEPTEDCXN,
"accepted connection, new socket %p",
dev->newsocket);
@@ -2945,8 +3298,8 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
inc_stats(manager->stats, sock->statsindex[STATID_ACCEPT]);
} else {
inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]);
- dev->newsocket->references--;
- free_socket(&dev->newsocket);
+ NEWCONNSOCK(dev)->references--;
+ free_socket((isc__socket_t **)&dev->newsocket);
}
/*
@@ -2970,7 +3323,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
static void
internal_recv(isc_task_t *me, isc_event_t *ev) {
isc_socketevent_t *dev;
- isc_socket_t *sock;
+ isc__socket_t *sock;
INSIST(ev->ev_type == ISC_SOCKEVENT_INTR);
@@ -3035,14 +3388,14 @@ internal_recv(isc_task_t *me, isc_event_t *ev) {
static void
internal_send(isc_task_t *me, isc_event_t *ev) {
isc_socketevent_t *dev;
- isc_socket_t *sock;
+ isc__socket_t *sock;
INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
/*
* Find out what socket this is and lock it.
*/
- sock = (isc_socket_t *)ev->ev_sender;
+ sock = (isc__socket_t *)ev->ev_sender;
INSIST(VALID_SOCKET(sock));
LOCK(&sock->lock);
@@ -3089,7 +3442,7 @@ internal_send(isc_task_t *me, isc_event_t *ev) {
static void
internal_fdwatch_write(isc_task_t *me, isc_event_t *ev) {
- isc_socket_t *sock;
+ isc__socket_t *sock;
int more_data;
INSIST(ev->ev_type == ISC_SOCKEVENT_INTW);
@@ -3097,7 +3450,7 @@ internal_fdwatch_write(isc_task_t *me, isc_event_t *ev) {
/*
* Find out what socket this is and lock it.
*/
- sock = (isc_socket_t *)ev->ev_sender;
+ sock = (isc__socket_t *)ev->ev_sender;
INSIST(VALID_SOCKET(sock));
LOCK(&sock->lock);
@@ -3108,7 +3461,8 @@ internal_fdwatch_write(isc_task_t *me, isc_event_t *ev) {
INSIST(sock->pending_send == 1);
UNLOCK(&sock->lock);
- more_data = (sock->fdwatchcb)(me, sock, sock->fdwatcharg);
+ more_data = (sock->fdwatchcb)(me, (isc_socket_t *)sock,
+ sock->fdwatcharg, ISC_SOCKFDWATCH_WRITE);
LOCK(&sock->lock);
sock->pending_send = 0;
@@ -3129,7 +3483,7 @@ internal_fdwatch_write(isc_task_t *me, isc_event_t *ev) {
static void
internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
- isc_socket_t *sock;
+ isc__socket_t *sock;
int more_data;
INSIST(ev->ev_type == ISC_SOCKEVENT_INTR);
@@ -3137,7 +3491,7 @@ internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
/*
* Find out what socket this is and lock it.
*/
- sock = (isc_socket_t *)ev->ev_sender;
+ sock = (isc__socket_t *)ev->ev_sender;
INSIST(VALID_SOCKET(sock));
LOCK(&sock->lock);
@@ -3148,7 +3502,8 @@ internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
INSIST(sock->pending_recv == 1);
UNLOCK(&sock->lock);
- more_data = (sock->fdwatchcb)(me, sock, sock->fdwatcharg);
+ more_data = (sock->fdwatchcb)(me, (isc_socket_t *)sock,
+ sock->fdwatcharg, ISC_SOCKFDWATCH_READ);
LOCK(&sock->lock);
sock->pending_recv = 0;
@@ -3172,10 +3527,10 @@ internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) {
* and unlocking twice if both reads and writes are possible.
*/
static void
-process_fd(isc_socketmgr_t *manager, int fd, isc_boolean_t readable,
+process_fd(isc__socketmgr_t *manager, int fd, isc_boolean_t readable,
isc_boolean_t writeable)
{
- isc_socket_t *sock;
+ isc__socket_t *sock;
isc_boolean_t unlock_sock;
isc_boolean_t unwatch_read = ISC_FALSE, unwatch_write = ISC_FALSE;
int lockid = FDLOCK_ID(fd);
@@ -3241,11 +3596,11 @@ check_write:
#ifdef USE_KQUEUE
static isc_boolean_t
-process_fds(isc_socketmgr_t *manager, struct kevent *events, int nevents) {
+process_fds(isc__socketmgr_t *manager, struct kevent *events, int nevents) {
int i;
isc_boolean_t readable, writable;
isc_boolean_t done = ISC_FALSE;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
isc_boolean_t have_ctlevent = ISC_FALSE;
#endif
@@ -3263,7 +3618,7 @@ process_fds(isc_socketmgr_t *manager, struct kevent *events, int nevents) {
for (i = 0; i < nevents; i++) {
REQUIRE(events[i].ident < manager->maxsocks);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (events[i].ident == (uintptr_t)manager->pipe_fds[0]) {
have_ctlevent = ISC_TRUE;
continue;
@@ -3274,7 +3629,7 @@ process_fds(isc_socketmgr_t *manager, struct kevent *events, int nevents) {
process_fd(manager, events[i].ident, readable, writable);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (have_ctlevent)
done = process_ctlfd(manager);
#endif
@@ -3283,10 +3638,11 @@ process_fds(isc_socketmgr_t *manager, struct kevent *events, int nevents) {
}
#elif defined(USE_EPOLL)
static isc_boolean_t
-process_fds(isc_socketmgr_t *manager, struct epoll_event *events, int nevents) {
+process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents)
+{
int i;
isc_boolean_t done = ISC_FALSE;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
isc_boolean_t have_ctlevent = ISC_FALSE;
#endif
@@ -3299,7 +3655,7 @@ process_fds(isc_socketmgr_t *manager, struct epoll_event *events, int nevents) {
for (i = 0; i < nevents; i++) {
REQUIRE(events[i].data.fd < (int)manager->maxsocks);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (events[i].data.fd == manager->pipe_fds[0]) {
have_ctlevent = ISC_TRUE;
continue;
@@ -3321,7 +3677,7 @@ process_fds(isc_socketmgr_t *manager, struct epoll_event *events, int nevents) {
(events[i].events & EPOLLOUT) != 0);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (have_ctlevent)
done = process_ctlfd(manager);
#endif
@@ -3330,10 +3686,10 @@ process_fds(isc_socketmgr_t *manager, struct epoll_event *events, int nevents) {
}
#elif defined(USE_DEVPOLL)
static isc_boolean_t
-process_fds(isc_socketmgr_t *manager, struct pollfd *events, int nevents) {
+process_fds(isc__socketmgr_t *manager, struct pollfd *events, int nevents) {
int i;
isc_boolean_t done = ISC_FALSE;
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
isc_boolean_t have_ctlevent = ISC_FALSE;
#endif
@@ -3346,7 +3702,7 @@ process_fds(isc_socketmgr_t *manager, struct pollfd *events, int nevents) {
for (i = 0; i < nevents; i++) {
REQUIRE(events[i].fd < (int)manager->maxsocks);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (events[i].fd == manager->pipe_fds[0]) {
have_ctlevent = ISC_TRUE;
continue;
@@ -3357,7 +3713,7 @@ process_fds(isc_socketmgr_t *manager, struct pollfd *events, int nevents) {
(events[i].events & POLLOUT) != 0);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (have_ctlevent)
done = process_ctlfd(manager);
#endif
@@ -3366,27 +3722,27 @@ process_fds(isc_socketmgr_t *manager, struct pollfd *events, int nevents) {
}
#elif defined(USE_SELECT)
static void
-process_fds(isc_socketmgr_t *manager, int maxfd,
- fd_set *readfds, fd_set *writefds)
+process_fds(isc__socketmgr_t *manager, int maxfd, fd_set *readfds,
+ fd_set *writefds)
{
int i;
REQUIRE(maxfd <= (int)manager->maxsocks);
for (i = 0; i < maxfd; i++) {
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (i == manager->pipe_fds[0] || i == manager->pipe_fds[1])
continue;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
process_fd(manager, i, FD_ISSET(i, readfds),
FD_ISSET(i, writefds));
}
}
#endif
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
static isc_boolean_t
-process_ctlfd(isc_socketmgr_t *manager) {
+process_ctlfd(isc__socketmgr_t *manager) {
int msg, fd;
for (;;) {
@@ -3434,9 +3790,8 @@ process_ctlfd(isc_socketmgr_t *manager) {
*/
static isc_threadresult_t
watcher(void *uap) {
- isc_socketmgr_t *manager = uap;
+ isc__socketmgr_t *manager = uap;
isc_boolean_t done;
- int ctlfd;
int cc;
#ifdef USE_KQUEUE
const char *fnname = "kevent()";
@@ -3448,16 +3803,19 @@ watcher(void *uap) {
#elif defined (USE_SELECT)
const char *fnname = "select()";
int maxfd;
+ int ctlfd;
#endif
char strbuf[ISC_STRERRORSIZE];
#ifdef ISC_SOCKET_USE_POLLWATCH
pollstate_t pollstate = poll_idle;
#endif
+#if defined (USE_SELECT)
/*
* Get the control fd here. This will never change.
*/
ctlfd = manager->pipe_fds[0];
+#endif
done = ISC_FALSE;
while (!done) {
do {
@@ -3549,22 +3907,34 @@ watcher(void *uap) {
return ((isc_threadresult_t)0);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
-void
-isc__socketmgr_setreserved(isc_socketmgr_t *manager, isc_uint32_t reserved) {
+#ifdef BIND9
+ISC_SOCKETFUNC_SCOPE void
+isc__socketmgr_setreserved(isc_socketmgr_t *manager0, isc_uint32_t reserved) {
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
REQUIRE(VALID_MANAGER(manager));
manager->reserved = reserved;
}
+ISC_SOCKETFUNC_SCOPE void
+isc___socketmgr_maxudp(isc_socketmgr_t *manager0, int maxudp) {
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
+
+ REQUIRE(VALID_MANAGER(manager));
+
+ manager->maxudp = maxudp;
+}
+#endif /* BIND9 */
+
/*
* Create a new socket manager.
*/
static isc_result_t
-setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
+setup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
isc_result_t result;
#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
char strbuf[ISC_STRERRORSIZE];
@@ -3590,7 +3960,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
return (result);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
if (result != ISC_R_SUCCESS) {
close(manager->kqueue_fd);
@@ -3598,7 +3968,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
sizeof(struct kevent) * manager->nevents);
return (result);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
#elif defined(USE_EPOLL)
manager->nevents = ISC_SOCKET_MAXEVENTS;
manager->events = isc_mem_get(mctx, sizeof(struct epoll_event) *
@@ -3618,7 +3988,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
sizeof(struct epoll_event) * manager->nevents);
return (result);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
if (result != ISC_R_SUCCESS) {
close(manager->epoll_fd);
@@ -3626,7 +3996,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
sizeof(struct epoll_event) * manager->nevents);
return (result);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
#elif defined(USE_DEVPOLL)
/*
* XXXJT: /dev/poll seems to reject large numbers of events,
@@ -3645,7 +4015,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
manager->maxsocks);
if (manager->fdpollinfo == NULL) {
isc_mem_put(mctx, manager->events,
- sizeof(pollinfo_t) * manager->maxsocks);
+ sizeof(struct pollfd) * manager->nevents);
return (ISC_R_NOMEMORY);
}
memset(manager->fdpollinfo, 0, sizeof(pollinfo_t) * manager->maxsocks);
@@ -3664,7 +4034,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
sizeof(pollinfo_t) * manager->maxsocks);
return (result);
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
result = watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
if (result != ISC_R_SUCCESS) {
close(manager->devpoll_fd);
@@ -3674,7 +4044,7 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
sizeof(pollinfo_t) * manager->maxsocks);
return (result);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
#elif defined(USE_SELECT)
UNUSED(result);
@@ -3722,20 +4092,20 @@ setup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
memset(manager->read_fds, 0, manager->fd_bufsize);
memset(manager->write_fds, 0, manager->fd_bufsize);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
(void)watch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
manager->maxfd = manager->pipe_fds[0];
-#else /* ISC_PLATFORM_USETHREADS */
+#else /* USE_WATCHER_THREAD */
manager->maxfd = 0;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
#endif /* USE_KQUEUE */
return (ISC_R_SUCCESS);
}
static void
-cleanup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
-#ifdef ISC_PLATFORM_USETHREADS
+cleanup_watcher(isc_mem_t *mctx, isc__socketmgr_t *manager) {
+#ifdef USE_WATCHER_THREAD
isc_result_t result;
result = unwatch_fd(manager, manager->pipe_fds[0], SELECT_POKE_READ);
@@ -3745,7 +4115,7 @@ cleanup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"));
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
#ifdef USE_KQUEUE
close(manager->kqueue_fd);
@@ -3773,35 +4143,35 @@ cleanup_watcher(isc_mem_t *mctx, isc_socketmgr_t *manager) {
#endif /* USE_KQUEUE */
}
-isc_result_t
-isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
- return (isc_socketmgr_create2(mctx, managerp, 0));
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
+ return (isc__socketmgr_create2(mctx, managerp, 0));
}
-isc_result_t
-isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
- unsigned int maxsocks)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
+ unsigned int maxsocks)
{
int i;
- isc_socketmgr_t *manager;
-#ifdef ISC_PLATFORM_USETHREADS
+ isc__socketmgr_t *manager;
+#ifdef USE_WATCHER_THREAD
char strbuf[ISC_STRERRORSIZE];
#endif
isc_result_t result;
REQUIRE(managerp != NULL && *managerp == NULL);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef USE_SHARED_MANAGER
if (socketmgr != NULL) {
/* Don't allow maxsocks to be updated */
if (maxsocks > 0 && socketmgr->maxsocks != maxsocks)
return (ISC_R_EXISTS);
socketmgr->refs++;
- *managerp = socketmgr;
+ *managerp = (isc_socketmgr_t *)socketmgr;
return (ISC_R_SUCCESS);
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
if (maxsocks == 0)
maxsocks = ISC_SOCKET_MAXSOCKETS;
@@ -3814,8 +4184,9 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
memset(manager, 0, sizeof(*manager));
manager->maxsocks = maxsocks;
manager->reserved = 0;
+ manager->maxudp = 0;
manager->fds = isc_mem_get(mctx,
- manager->maxsocks * sizeof(isc_socket_t *));
+ manager->maxsocks * sizeof(isc__socket_t *));
if (manager->fds == NULL) {
result = ISC_R_NOMEMORY;
goto free_manager;
@@ -3827,7 +4198,9 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
}
manager->stats = NULL;
- manager->magic = SOCKET_MANAGER_MAGIC;
+ manager->common.methods = &socketmgrmethods;
+ manager->common.magic = ISCAPI_SOCKETMGR_MAGIC;
+ manager->common.impmagic = SOCKET_MANAGER_MAGIC;
manager->mctx = NULL;
memset(manager->fds, 0, manager->maxsocks * sizeof(isc_socket_t *));
ISC_LIST_INIT(manager->socklist);
@@ -3851,7 +4224,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
}
}
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
if (isc_condition_init(&manager->shutdown_ok) != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_condition_init() %s",
@@ -3880,9 +4253,11 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
#if 0
RUNTIME_CHECK(make_nonblock(manager->pipe_fds[1]) == ISC_R_SUCCESS);
#endif
-#else /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
+
+#ifdef USE_SHARED_MANAGER
manager->refs = 1;
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_SHARED_MANAGER */
/*
* Set up initial state for the select loop
@@ -3891,7 +4266,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
if (result != ISC_R_SUCCESS)
goto cleanup;
memset(manager->fdstate, 0, manager->maxsocks * sizeof(int));
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
/*
* Start up the select/poll thread.
*/
@@ -3905,26 +4280,26 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
result = ISC_R_UNEXPECTED;
goto cleanup;
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
isc_mem_attach(mctx, &manager->mctx);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef USE_SHARED_MANAGER
socketmgr = manager;
-#endif /* ISC_PLATFORM_USETHREADS */
- *managerp = manager;
+#endif /* USE_SHARED_MANAGER */
+ *managerp = (isc_socketmgr_t *)manager;
return (ISC_R_SUCCESS);
cleanup:
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
(void)close(manager->pipe_fds[0]);
(void)close(manager->pipe_fds[1]);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
cleanup_condition:
(void)isc_condition_destroy(&manager->shutdown_ok);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
cleanup_lock:
@@ -3952,8 +4327,10 @@ free_manager:
return (result);
}
+#ifdef BIND9
isc_result_t
-isc_socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
+isc__socketmgr_getmaxsockets(isc_socketmgr_t *manager0, unsigned int *nsockp) {
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
REQUIRE(VALID_MANAGER(manager));
REQUIRE(nsockp != NULL);
@@ -3963,7 +4340,9 @@ isc_socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
}
void
-isc_socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
+isc__socketmgr_setstats(isc_socketmgr_t *manager0, isc_stats_t *stats) {
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
+
REQUIRE(VALID_MANAGER(manager));
REQUIRE(ISC_LIST_EMPTY(manager->socklist));
REQUIRE(manager->stats == NULL);
@@ -3971,10 +4350,11 @@ isc_socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
isc_stats_attach(stats, &manager->stats);
}
+#endif
-void
-isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
- isc_socketmgr_t *manager;
+ISC_SOCKETFUNC_SCOPE void
+isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
+ isc__socketmgr_t *manager;
int i;
isc_mem_t *mctx;
@@ -3983,42 +4363,36 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
*/
REQUIRE(managerp != NULL);
- manager = *managerp;
+ manager = (isc__socketmgr_t *)*managerp;
REQUIRE(VALID_MANAGER(manager));
-#ifndef ISC_PLATFORM_USETHREADS
- if (manager->refs > 1) {
- manager->refs--;
+#ifdef USE_SHARED_MANAGER
+ manager->refs--;
+ if (manager->refs > 0) {
*managerp = NULL;
return;
}
-#endif /* ISC_PLATFORM_USETHREADS */
+ socketmgr = NULL;
+#endif /* USE_SHARED_MANAGER */
LOCK(&manager->lock);
-#ifdef ISC_PLATFORM_USETHREADS
/*
* Wait for all sockets to be destroyed.
*/
while (!ISC_LIST_EMPTY(manager->socklist)) {
+#ifdef USE_WATCHER_THREAD
manager_log(manager, CREATION, "%s",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_SOCKETSREMAIN,
"sockets exist"));
WAIT(&manager->shutdown_ok, &manager->lock);
+#else /* USE_WATCHER_THREAD */
+ UNLOCK(&manager->lock);
+ isc__taskmgr_dispatch(NULL);
+ LOCK(&manager->lock);
+#endif /* USE_WATCHER_THREAD */
}
-#else /* ISC_PLATFORM_USETHREADS */
- /*
- * Hope all sockets have been destroyed.
- */
- if (!ISC_LIST_EMPTY(manager->socklist)) {
- manager_log(manager, CREATION, "%s",
- isc_msgcat_get(isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_SOCKETSREMAIN,
- "sockets exist"));
- INSIST(0);
- }
-#endif /* ISC_PLATFORM_USETHREADS */
UNLOCK(&manager->lock);
@@ -4029,7 +4403,7 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
*/
select_poke(manager, 0, SELECT_POKE_SHUTDOWN);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
/*
* Wait for thread to exit.
*/
@@ -4038,25 +4412,25 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
"isc_thread_join() %s",
isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
ISC_MSG_FAILED, "failed"));
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
/*
* Clean up.
*/
cleanup_watcher(manager->mctx, manager);
-#ifdef ISC_PLATFORM_USETHREADS
+#ifdef USE_WATCHER_THREAD
(void)close(manager->pipe_fds[0]);
(void)close(manager->pipe_fds[1]);
(void)isc_condition_destroy(&manager->shutdown_ok);
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
for (i = 0; i < (int)manager->maxsocks; i++)
if (manager->fdstate[i] == CLOSE_PENDING) /* no need to lock */
(void)close(i);
isc_mem_put(manager->mctx, manager->fds,
- manager->maxsocks * sizeof(isc_socket_t *));
+ manager->maxsocks * sizeof(isc__socket_t *));
isc_mem_put(manager->mctx, manager->fdstate,
manager->maxsocks * sizeof(int));
@@ -4070,17 +4444,22 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
FDLOCK_COUNT * sizeof(isc_mutex_t));
}
DESTROYLOCK(&manager->lock);
- manager->magic = 0;
+ manager->common.magic = 0;
+ manager->common.impmagic = 0;
mctx= manager->mctx;
isc_mem_put(mctx, manager, sizeof(*manager));
isc_mem_detach(&mctx);
*managerp = NULL;
+
+#ifdef USE_SHARED_MANAGER
+ socketmgr = NULL;
+#endif
}
static isc_result_t
-socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
+socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
unsigned int flags)
{
int io_state;
@@ -4151,13 +4530,14 @@ socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
return (result);
}
-isc_result_t
-isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- unsigned int minimum, isc_task_t *task,
- isc_taskaction_t action, const void *arg)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recvv(isc_socket_t *sock0, isc_bufferlist_t *buflist,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
unsigned int iocount;
isc_buffer_t *buffer;
@@ -4176,9 +4556,8 @@ isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
INSIST(sock->bound);
dev = allocate_socketevent(sock, ISC_SOCKEVENT_RECVDONE, action, arg);
- if (dev == NULL) {
+ if (dev == NULL)
return (ISC_R_NOMEMORY);
- }
/*
* UDP sockets are always partial read
@@ -4205,12 +4584,14 @@ isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
return (socket_recv(sock, dev, task, 0));
}
-isc_result_t
-isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recv(isc_socket_t *sock0, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
REQUIRE(VALID_SOCKET(sock));
REQUIRE(action != NULL);
@@ -4224,16 +4605,18 @@ isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
if (dev == NULL)
return (ISC_R_NOMEMORY);
- return (isc_socket_recv2(sock, region, minimum, task, dev, 0));
+ return (isc__socket_recv2(sock0, region, minimum, task, dev, 0));
}
-isc_result_t
-isc_socket_recv2(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_socketevent_t *event, unsigned int flags)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_recv2(isc_socket_t *sock0, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_socketevent_t *event, unsigned int flags)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
event->ev_sender = sock;
- event->result = ISC_R_UNEXPECTED;
+ event->result = ISC_R_UNSET;
ISC_LIST_INIT(event->bufferlist);
event->region = *region;
event->n = 0;
@@ -4256,7 +4639,7 @@ isc_socket_recv2(isc_socket_t *sock, isc_region_t *region,
}
static isc_result_t
-socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
+socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
unsigned int flags)
{
@@ -4347,24 +4730,25 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
return (result);
}
-isc_result_t
-isc_socket_send(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_send(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
/*
* REQUIRE() checking is performed in isc_socket_sendto().
*/
- return (isc_socket_sendto(sock, region, task, action, arg, NULL,
- NULL));
+ return (isc__socket_sendto(sock, region, task, action, arg, NULL,
+ NULL));
}
-isc_result_t
-isc_socket_sendto(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendto(isc_socket_t *sock0, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
REQUIRE(VALID_SOCKET(sock));
REQUIRE(region != NULL);
@@ -4377,30 +4761,30 @@ isc_socket_sendto(isc_socket_t *sock, isc_region_t *region,
INSIST(sock->bound);
dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL) {
+ if (dev == NULL)
return (ISC_R_NOMEMORY);
- }
dev->region = *region;
return (socket_send(sock, dev, task, address, pktinfo, 0));
}
-isc_result_t
-isc_socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
- return (isc_socket_sendtov(sock, buflist, task, action, arg, NULL,
- NULL));
+ return (isc__socket_sendtov(sock, buflist, task, action, arg, NULL,
+ NULL));
}
-isc_result_t
-isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendtov(isc_socket_t *sock0, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socketevent_t *dev;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
unsigned int iocount;
isc_buffer_t *buffer;
@@ -4417,9 +4801,8 @@ isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
REQUIRE(iocount > 0);
dev = allocate_socketevent(sock, ISC_SOCKEVENT_SENDDONE, action, arg);
- if (dev == NULL) {
+ if (dev == NULL)
return (ISC_R_NOMEMORY);
- }
/*
* Move each buffer from the passed in list to our internal one.
@@ -4434,17 +4817,20 @@ isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
return (socket_send(sock, dev, task, address, pktinfo, 0));
}
-isc_result_t
-isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- isc_socketevent_t *event, unsigned int flags)
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_sendto2(isc_socket_t *sock0, isc_region_t *region,
+ isc_task_t *task,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
+ isc_socketevent_t *event, unsigned int flags)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
+ REQUIRE(VALID_SOCKET(sock));
REQUIRE((flags & ~(ISC_SOCKFLAG_IMMEDIATE|ISC_SOCKFLAG_NORETRY)) == 0);
if ((flags & ISC_SOCKFLAG_NORETRY) != 0)
REQUIRE(sock->type == isc_sockettype_udp);
event->ev_sender = sock;
- event->result = ISC_R_UNEXPECTED;
+ event->result = ISC_R_UNSET;
ISC_LIST_INIT(event->bufferlist);
event->region = *region;
event->n = 0;
@@ -4454,8 +4840,8 @@ isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
return (socket_send(sock, event, task, address, pktinfo, flags));
}
-void
-isc_socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
#ifdef ISC_PLATFORM_HAVESYSUNH
int s;
struct stat sb;
@@ -4584,8 +4970,8 @@ isc_socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active) {
#endif
}
-isc_result_t
-isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
isc_uint32_t owner, isc_uint32_t group)
{
#ifdef ISC_PLATFORM_HAVESYSUNH
@@ -4638,20 +5024,25 @@ isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
#endif
}
-isc_result_t
-isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
- unsigned int options) {
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_bind(isc_socket_t *sock0, isc_sockaddr_t *sockaddr,
+ unsigned int options) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
char strbuf[ISC_STRERRORSIZE];
int on = 1;
+ REQUIRE(VALID_SOCKET(sock));
+
LOCK(&sock->lock);
INSIST(!sock->bound);
+ INSIST(!sock->dupped);
if (sock->pf != sockaddr->type.sa.sa_family) {
UNLOCK(&sock->lock);
return (ISC_R_FAMILYMISMATCH);
}
+
/*
* Only set SO_REUSEADDR when we want a specific port.
*/
@@ -4702,9 +5093,17 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_socket_filter(isc_socket_t *sock, const char *filter) {
-#ifdef SO_ACCEPTFILTER
+/*
+ * Enable this only for specific OS versions, and only when they have repaired
+ * their problems with it. Until then, this is is broken and needs to be
+ * diabled by default. See RT22589 for details.
+ */
+#undef ENABLE_ACCEPTFILTER
+
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_filter(isc_socket_t *sock0, const char *filter) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+#if defined(SO_ACCEPTFILTER) && defined(ENABLE_ACCEPTFILTER)
char strbuf[ISC_STRERRORSIZE];
struct accept_filter_arg afa;
#else
@@ -4714,7 +5113,7 @@ isc_socket_filter(isc_socket_t *sock, const char *filter) {
REQUIRE(VALID_SOCKET(sock));
-#ifdef SO_ACCEPTFILTER
+#if defined(SO_ACCEPTFILTER) && defined(ENABLE_ACCEPTFILTER)
bzero(&afa, sizeof(afa));
strncpy(afa.af_name, filter, sizeof(afa.af_name));
if (setsockopt(sock->fd, SOL_SOCKET, SO_ACCEPTFILTER,
@@ -4741,8 +5140,9 @@ isc_socket_filter(isc_socket_t *sock, const char *filter) {
* is a new connection we'll have to allocate a new one anyway, so we might
* as well keep things simple rather than having to track them.
*/
-isc_result_t
-isc_socket_listen(isc_socket_t *sock, unsigned int backlog) {
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_listen(isc_socket_t *sock0, unsigned int backlog) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
char strbuf[ISC_STRERRORSIZE];
REQUIRE(VALID_SOCKET(sock));
@@ -4775,14 +5175,15 @@ isc_socket_listen(isc_socket_t *sock, unsigned int backlog) {
/*
* This should try to do aggressive accept() XXXMLG
*/
-isc_result_t
-isc_socket_accept(isc_socket_t *sock,
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_accept(isc_socket_t *sock0,
isc_task_t *task, isc_taskaction_t action, const void *arg)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socket_newconnev_t *dev;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
isc_task_t *ntask = NULL;
- isc_socket_t *nsock;
+ isc__socket_t *nsock;
isc_result_t result;
isc_boolean_t do_poke = ISC_FALSE;
@@ -4819,11 +5220,18 @@ isc_socket_accept(isc_socket_t *sock,
* Attach to socket and to task.
*/
isc_task_attach(task, &ntask);
+ if (isc_task_exiting(ntask)) {
+ free_socket(&nsock);
+ isc_task_detach(&ntask);
+ isc_event_free(ISC_EVENT_PTR(&dev));
+ UNLOCK(&sock->lock);
+ return (ISC_R_SHUTTINGDOWN);
+ }
nsock->references++;
nsock->statsindex = sock->statsindex;
dev->ev_sender = ntask;
- dev->newsocket = nsock;
+ dev->newsocket = (isc_socket_t *)nsock;
/*
* Poke watcher here. We still have the socket locked, so there
@@ -4842,15 +5250,17 @@ isc_socket_accept(isc_socket_t *sock,
return (ISC_R_SUCCESS);
}
-isc_result_t
-isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_connect(isc_socket_t *sock0, isc_sockaddr_t *addr,
isc_task_t *task, isc_taskaction_t action, const void *arg)
{
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_socket_connev_t *dev;
isc_task_t *ntask = NULL;
- isc_socketmgr_t *manager;
+ isc__socketmgr_t *manager;
int cc;
char strbuf[ISC_STRERRORSIZE];
+ char addrbuf[ISC_SOCKADDR_FORMATSIZE];
REQUIRE(VALID_SOCKET(sock));
REQUIRE(addr != NULL);
@@ -4919,7 +5329,9 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
sock->connected = 0;
isc__strerror(errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__, "%d/%s", errno, strbuf);
+ isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf));
+ UNEXPECTED_ERROR(__FILE__, __LINE__, "connect(%s) %d/%s",
+ addrbuf, errno, strbuf);
UNLOCK(&sock->lock);
inc_stats(sock->manager->stats,
@@ -4985,7 +5397,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
*/
static void
internal_connect(isc_task_t *me, isc_event_t *ev) {
- isc_socket_t *sock;
+ isc__socket_t *sock;
isc_socket_connev_t *dev;
isc_task_t *task;
int cc;
@@ -5099,8 +5511,9 @@ internal_connect(isc_task_t *me, isc_event_t *ev) {
isc_task_sendanddetach(&task, ISC_EVENT_PTR(&dev));
}
-isc_result_t
-isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_getpeername(isc_socket_t *sock0, isc_sockaddr_t *addressp) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_result_t result;
REQUIRE(VALID_SOCKET(sock));
@@ -5120,8 +5533,9 @@ isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
return (result);
}
-isc_result_t
-isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
+ISC_SOCKETFUNC_SCOPE isc_result_t
+isc__socket_getsockname(isc_socket_t *sock0, isc_sockaddr_t *addressp) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
ISC_SOCKADDR_LEN_T len;
isc_result_t result;
char strbuf[ISC_STRERRORSIZE];
@@ -5158,8 +5572,9 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
* Run through the list of events on this socket, and cancel the ones
* queued for task "task" of type "how". "how" is a bitmask.
*/
-void
-isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_cancel(isc_socket_t *sock0, isc_task_t *task, unsigned int how) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
REQUIRE(VALID_SOCKET(sock));
@@ -5238,8 +5653,8 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
ISC_LIST_UNLINK(sock->accept_list, dev,
ev_link);
- dev->newsocket->references--;
- free_socket(&dev->newsocket);
+ NEWCONNSOCK(dev)->references--;
+ free_socket((isc__socket_t **)&dev->newsocket);
dev->result = ISC_R_CANCELED;
dev->ev_sender = sock;
@@ -5278,17 +5693,22 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
UNLOCK(&sock->lock);
}
-isc_sockettype_t
-isc_socket_gettype(isc_socket_t *sock) {
+ISC_SOCKETFUNC_SCOPE isc_sockettype_t
+isc__socket_gettype(isc_socket_t *sock0) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
+
REQUIRE(VALID_SOCKET(sock));
return (sock->type);
}
-isc_boolean_t
-isc_socket_isbound(isc_socket_t *sock) {
+ISC_SOCKETFUNC_SCOPE isc_boolean_t
+isc__socket_isbound(isc_socket_t *sock0) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
isc_boolean_t val;
+ REQUIRE(VALID_SOCKET(sock));
+
LOCK(&sock->lock);
val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
UNLOCK(&sock->lock);
@@ -5296,8 +5716,9 @@ isc_socket_isbound(isc_socket_t *sock) {
return (val);
}
-void
-isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
+ISC_SOCKETFUNC_SCOPE void
+isc__socket_ipv6only(isc_socket_t *sock0, isc_boolean_t yes) {
+ isc__socket_t *sock = (isc__socket_t *)sock0;
#if defined(IPV6_V6ONLY)
int onoff = yes ? 1 : 0;
#else
@@ -5306,13 +5727,14 @@ isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
#endif
REQUIRE(VALID_SOCKET(sock));
+ INSIST(!sock->dupped);
#ifdef IPV6_V6ONLY
if (sock->pf == AF_INET6) {
if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
(void *)&onoff, sizeof(int)) < 0) {
char strbuf[ISC_STRERRORSIZE];
-
+ isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_V6ONLY) "
"%s: %s", sock->fd,
@@ -5327,12 +5749,21 @@ isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
#endif
}
-#ifndef ISC_PLATFORM_USETHREADS
-/* In our assumed scenario, we can simply use a single static object. */
+#ifndef USE_WATCHER_THREAD
+/*
+ * In our assumed scenario, we can simply use a single static object.
+ * XXX: this is not true if the application uses multiple threads with
+ * 'multi-context' mode. Fixing this is a future TODO item.
+ */
static isc_socketwait_t swait_private;
int
-isc__socketmgr_waitevents(struct timeval *tvp, isc_socketwait_t **swaitp) {
+isc__socketmgr_waitevents(isc_socketmgr_t *manager0, struct timeval *tvp,
+ isc_socketwait_t **swaitp)
+{
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
+
+
int n;
#ifdef USE_KQUEUE
struct timespec ts, *tsp;
@@ -5346,7 +5777,11 @@ isc__socketmgr_waitevents(struct timeval *tvp, isc_socketwait_t **swaitp) {
REQUIRE(swaitp != NULL && *swaitp == NULL);
- if (socketmgr == NULL)
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = socketmgr;
+#endif
+ if (manager == NULL)
return (0);
#ifdef USE_KQUEUE
@@ -5356,8 +5791,8 @@ isc__socketmgr_waitevents(struct timeval *tvp, isc_socketwait_t **swaitp) {
tsp = &ts;
} else
tsp = NULL;
- swait_private.nevents = kevent(socketmgr->kqueue_fd, NULL, 0,
- socketmgr->events, socketmgr->nevents,
+ swait_private.nevents = kevent(manager->kqueue_fd, NULL, 0,
+ manager->events, manager->nevents,
tsp);
n = swait_private.nevents;
#elif defined(USE_EPOLL)
@@ -5365,29 +5800,28 @@ isc__socketmgr_waitevents(struct timeval *tvp, isc_socketwait_t **swaitp) {
timeout = tvp->tv_sec * 1000 + (tvp->tv_usec + 999) / 1000;
else
timeout = -1;
- swait_private.nevents = epoll_wait(socketmgr->epoll_fd,
- socketmgr->events,
- socketmgr->nevents, timeout);
+ swait_private.nevents = epoll_wait(manager->epoll_fd,
+ manager->events,
+ manager->nevents, timeout);
n = swait_private.nevents;
#elif defined(USE_DEVPOLL)
- dvp.dp_fds = socketmgr->events;
- dvp.dp_nfds = socketmgr->nevents;
+ dvp.dp_fds = manager->events;
+ dvp.dp_nfds = manager->nevents;
if (tvp != NULL) {
dvp.dp_timeout = tvp->tv_sec * 1000 +
(tvp->tv_usec + 999) / 1000;
} else
dvp.dp_timeout = -1;
- swait_private.nevents = ioctl(socketmgr->devpoll_fd, DP_POLL, &dvp);
+ swait_private.nevents = ioctl(manager->devpoll_fd, DP_POLL, &dvp);
n = swait_private.nevents;
#elif defined(USE_SELECT)
- memcpy(socketmgr->read_fds_copy, socketmgr->read_fds,
- socketmgr->fd_bufsize);
- memcpy(socketmgr->write_fds_copy, socketmgr->write_fds,
- socketmgr->fd_bufsize);
+ memcpy(manager->read_fds_copy, manager->read_fds, manager->fd_bufsize);
+ memcpy(manager->write_fds_copy, manager->write_fds,
+ manager->fd_bufsize);
- swait_private.readset = socketmgr->read_fds_copy;
- swait_private.writeset = socketmgr->write_fds_copy;
- swait_private.maxfd = socketmgr->maxfd + 1;
+ swait_private.readset = manager->read_fds_copy;
+ swait_private.writeset = manager->write_fds_copy;
+ swait_private.maxfd = manager->maxfd + 1;
n = select(swait_private.maxfd, swait_private.readset,
swait_private.writeset, NULL, tvp);
@@ -5398,24 +5832,32 @@ isc__socketmgr_waitevents(struct timeval *tvp, isc_socketwait_t **swaitp) {
}
isc_result_t
-isc__socketmgr_dispatch(isc_socketwait_t *swait) {
+isc__socketmgr_dispatch(isc_socketmgr_t *manager0, isc_socketwait_t *swait) {
+ isc__socketmgr_t *manager = (isc__socketmgr_t *)manager0;
+
REQUIRE(swait == &swait_private);
- if (socketmgr == NULL)
+#ifdef USE_SHARED_MANAGER
+ if (manager == NULL)
+ manager = socketmgr;
+#endif
+ if (manager == NULL)
return (ISC_R_NOTFOUND);
#if defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
- (void)process_fds(socketmgr, socketmgr->events, swait->nevents);
+ (void)process_fds(manager, manager->events, swait->nevents);
return (ISC_R_SUCCESS);
#elif defined(USE_SELECT)
- process_fds(socketmgr, swait->maxfd, swait->readset, swait->writeset);
+ process_fds(manager, swait->maxfd, swait->readset, swait->writeset);
return (ISC_R_SUCCESS);
#endif
}
-#endif /* ISC_PLATFORM_USETHREADS */
+#endif /* USE_WATCHER_THREAD */
+#ifdef BIND9
void
-isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
+isc__socket_setname(isc_socket_t *socket0, const char *name, void *tag) {
+ isc__socket_t *socket = (isc__socket_t *)socket0;
/*
* Name 'socket'.
@@ -5430,17 +5872,36 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
UNLOCK(&socket->lock);
}
-const char *
-isc_socket_getname(isc_socket_t *socket) {
+ISC_SOCKETFUNC_SCOPE const char *
+isc__socket_getname(isc_socket_t *socket0) {
+ isc__socket_t *socket = (isc__socket_t *)socket0;
+
return (socket->name);
}
void *
-isc_socket_gettag(isc_socket_t *socket) {
+isc__socket_gettag(isc_socket_t *socket0) {
+ isc__socket_t *socket = (isc__socket_t *)socket0;
+
return (socket->tag);
}
+#endif /* BIND9 */
-#ifdef HAVE_LIBXML2
+#ifdef USE_SOCKETIMPREGISTER
+isc_result_t
+isc__socket_register() {
+ return (isc_socket_register(isc__socketmgr_create));
+}
+#endif
+
+ISC_SOCKETFUNC_SCOPE int
+isc__socket_getfd(isc_socket_t *socket0) {
+ isc__socket_t *socket = (isc__socket_t *)socket0;
+
+ return ((short) socket->fd);
+}
+
+#if defined(HAVE_LIBXML2) && defined(BIND9)
static const char *
_socktype(isc_sockettype_t type)
@@ -5457,21 +5918,21 @@ _socktype(isc_sockettype_t type)
return ("not-initialized");
}
-void
-isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer)
-{
- isc_socket_t *sock;
+ISC_SOCKETFUNC_SCOPE void
+isc_socketmgr_renderxml(isc_socketmgr_t *mgr0, xmlTextWriterPtr writer) {
+ isc__socketmgr_t *mgr = (isc__socketmgr_t *)mgr0;
+ isc__socket_t *sock;
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_t addr;
ISC_SOCKADDR_LEN_T len;
LOCK(&mgr->lock);
-#ifndef ISC_PLATFORM_USETHREADS
+#ifdef USE_SHARED_MANAGER
xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
xmlTextWriterEndElement(writer);
-#endif
+#endif /* USE_SHARED_MANAGER */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets");
sock = ISC_LIST_HEAD(mgr->socklist);
diff --git a/lib/isc/unix/socket_p.h b/lib/isc/unix/socket_p.h
index fc044e58b294..13160117391f 100644
--- a/lib/isc/unix/socket_p.h
+++ b/lib/isc/unix/socket_p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket_p.h,v 1.13 2008/06/23 23:47:11 tbox Exp $ */
+/* $Id: socket_p.h,v 1.15 2009/09/02 23:48:03 tbox Exp $ */
#ifndef ISC_SOCKET_P_H
#define ISC_SOCKET_P_H
@@ -27,6 +27,7 @@
#endif
typedef struct isc_socketwait isc_socketwait_t;
-int isc__socketmgr_waitevents(struct timeval *, isc_socketwait_t **);
-isc_result_t isc__socketmgr_dispatch(isc_socketwait_t *);
+int isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *,
+ isc_socketwait_t **);
+isc_result_t isc__socketmgr_dispatch(isc_socketmgr_t *, isc_socketwait_t *);
#endif /* ISC_SOCKET_P_H */
diff --git a/lib/isc/unix/stdio.c b/lib/isc/unix/stdio.c
index 4e294dbc2fee..360c8c644afc 100644
--- a/lib/isc/unix/stdio.c
+++ b/lib/isc/unix/stdio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stdio.c,v 1.8 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id$ */
#include <config.h>
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <isc/stdio.h>
+#include <isc/stat.h>
#include "errno2result.h"
@@ -104,12 +105,23 @@ isc_stdio_flush(FILE *f) {
return (isc__errno2result(errno));
}
+/*
+ * OpenBSD has deprecated ENOTSUP in favor of EOPNOTSUPP.
+ */
+#if defined(EOPNOTSUPP) && !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
isc_result_t
isc_stdio_sync(FILE *f) {
int r;
r = fsync(fileno(f));
- if (r == 0)
+ /*
+ * fsync is not supported on sockets and pipes which
+ * result in EINVAL / ENOTSUP.
+ */
+ if (r == 0 || errno == EINVAL || errno == ENOTSUP)
return (ISC_R_SUCCESS);
else
return (isc__errno2result(errno));
diff --git a/lib/isc/unix/strerror.c b/lib/isc/unix/strerror.c
index 0353e12e5f22..22780095b546 100644
--- a/lib/isc/unix/strerror.c
+++ b/lib/isc/unix/strerror.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: strerror.c,v 1.8.332.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: strerror.c,v 1.10 2009/02/16 23:48:04 tbox Exp $ */
/*! \file */
diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c
index 59428d3ca776..ac23ae092804 100644
--- a/lib/isc/unix/time.c
+++ b/lib/isc/unix/time.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.56 2008/02/15 23:46:51 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -319,7 +319,7 @@ isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) {
/*
* Convert to microseconds.
*/
- i3 = (i1 - i2) / NS_PER_US;
+ i3 /= NS_PER_US;
return (i3);
}
@@ -334,7 +334,6 @@ isc_time_seconds(const isc_time_t *t) {
isc_result_t
isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) {
- isc_uint64_t i;
time_t seconds;
REQUIRE(t != NULL);
@@ -354,33 +353,16 @@ isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) {
* pretty much only true if time_t is a signed integer of the same
* size as the return value of isc_time_seconds.
*
- * The use of the 64 bit integer ``i'' takes advantage of C's
- * conversion rules to either zero fill or sign extend the widened
- * type.
- *
- * Solaris 5.6 gives this warning about the left shift:
- * warning: integer overflow detected: op "<<"
- * if the U(nsigned) qualifier is not on the 1.
+ * If the paradox in the if clause below is true, t->seconds is out
+ * of range for time_t.
*/
seconds = (time_t)t->seconds;
INSIST(sizeof(unsigned int) == sizeof(isc_uint32_t));
INSIST(sizeof(time_t) >= sizeof(isc_uint32_t));
- if (sizeof(time_t) == sizeof(isc_uint32_t) && /* Same size. */
- (time_t)0.5 != 0.5 && /* Not a floating point type. */
- (i = (time_t)-1) != 4294967295u && /* Is signed. */
- (seconds &
- (1U << (sizeof(time_t) * CHAR_BIT - 1))) != 0U) { /* Negative. */
- /*
- * This UNUSED() is here to shut up the IRIX compiler:
- * variable "i" was set but never used
- * when the value of i *was* used in the third test.
- * (Let's hope the compiler got the actual test right.)
- */
- UNUSED(i);
+ if (t->seconds > (~0U>>1) && seconds <= (time_t)(~0U>>1))
return (ISC_R_RANGE);
- }
*secondsp = seconds;
diff --git a/lib/isc/win32/app.c b/lib/isc/win32/app.c
index b0db90d410bd..04b1638783eb 100644
--- a/lib/isc/win32/app.c
+++ b/lib/isc/win32/app.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: app.c,v 1.7 2007/06/19 23:47:19 tbox Exp $ */
+/* $Id: app.c,v 1.9 2009/09/02 23:48:03 tbox Exp $ */
#include <config.h>
@@ -75,7 +75,7 @@ DWORD dwWaitResult;
static isc_thread_t main_thread;
isc_result_t
-isc_app_start(void) {
+isc__app_start(void) {
isc_result_t result;
/*
@@ -99,7 +99,7 @@ isc_app_start(void) {
}
isc_result_t
-isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
+isc__app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
void *arg) {
isc_event_t *event;
isc_task_t *cloned_task = NULL;
@@ -133,7 +133,7 @@ isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action,
}
isc_result_t
-isc_app_run(void) {
+isc__app_run(void) {
isc_event_t *event, *next_event;
isc_task_t *task;
HANDLE *pHandles = NULL;
@@ -170,7 +170,7 @@ isc_app_run(void) {
FALSE, INFINITE);
/* See why we returned */
-
+
if (WaitSucceeded(dwWaitResult, NUM_EVENTS)) {
/*
* The return was due to one of the events
@@ -199,7 +199,7 @@ isc_app_run(void) {
}
isc_result_t
-isc_app_shutdown(void) {
+isc__app_shutdown(void) {
isc_boolean_t want_kill = ISC_TRUE;
LOCK(&lock);
@@ -218,7 +218,7 @@ isc_app_shutdown(void) {
}
isc_result_t
-isc_app_reload(void) {
+isc__app_reload(void) {
isc_boolean_t want_reload = ISC_TRUE;
LOCK(&lock);
@@ -238,12 +238,12 @@ isc_app_reload(void) {
}
void
-isc_app_finish(void) {
+isc__app_finish(void) {
DESTROYLOCK(&lock);
}
void
-isc_app_block(void) {
+isc__app_block(void) {
REQUIRE(running);
REQUIRE(!blocked);
@@ -252,7 +252,7 @@ isc_app_block(void) {
}
void
-isc_app_unblock(void) {
+isc__app_unblock(void) {
REQUIRE(running);
REQUIRE(blocked);
blocked = ISC_FALSE;
diff --git a/lib/isc/win32/dir.c b/lib/isc/win32/dir.c
index cbeacbaafaba..14fadde46af3 100644
--- a/lib/isc/win32/dir.c
+++ b/lib/isc/win32/dir.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dir.c,v 1.16.22.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
/* Principal Authors: DCL */
@@ -85,7 +85,7 @@ isc_dir_open(isc_dir_t *dir, const char *dirname) {
if (dir->dirname < p && *(p - 1) != '\\' && *(p - 1) != ':')
*p++ = '\\';
*p++ = '*';
- *p++ = '\0';
+ *p = '\0';
/*
* Open stream.
diff --git a/lib/isc/win32/entropy.c b/lib/isc/win32/entropy.c
index 7f4bb3fb39cf..5a316e6e5cff 100644
--- a/lib/isc/win32/entropy.c
+++ b/lib/isc/win32/entropy.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.8.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: entropy.c,v 1.10 2009/01/18 23:48:14 tbox Exp $ */
/*
* This is the system dependent part of the ISC entropy API.
diff --git a/lib/isc/win32/file.c b/lib/isc/win32/file.c
index baf7953a00ec..c6b9e4f56f1f 100644
--- a/lib/isc/win32/file.c
+++ b/lib/isc/win32/file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: file.c,v 1.31 2007/06/19 23:47:19 tbox Exp $ */
+/* $Id$ */
#include <config.h>
@@ -31,10 +31,12 @@
#include <sys/utime.h>
#include <isc/file.h>
+#include <isc/mem.h>
#include <isc/result.h>
#include <isc/time.h>
#include <isc/util.h>
#include <isc/stat.h>
+#include <isc/string.h>
#include "errno2result.h"
@@ -213,9 +215,9 @@ isc_file_getmodtime(const char *file, isc_time_t *time) {
&time->absolute))
{
close(fh);
- errno = EINVAL;
- return (isc__errno2result(errno));
- }
+ errno = EINVAL;
+ return (isc__errno2result(errno));
+ }
close(fh);
return (ISC_R_SUCCESS);
}
@@ -229,23 +231,23 @@ isc_file_settime(const char *file, isc_time_t *time) {
if ((fh = open(file, _O_RDWR | _O_BINARY)) < 0)
return (isc__errno2result(errno));
- /*
+ /*
* Set the date via the filedate system call and return. Failing
- * this call implies the new file times are not supported by the
- * underlying file system.
- */
+ * this call implies the new file times are not supported by the
+ * underlying file system.
+ */
if (!SetFileTime((HANDLE) _get_osfhandle(fh),
NULL,
&time->absolute,
&time->absolute))
{
close(fh);
- errno = EINVAL;
- return (isc__errno2result(errno));
- }
+ errno = EINVAL;
+ return (isc__errno2result(errno));
+ }
close(fh);
- return (ISC_R_SUCCESS);
+ return (ISC_R_SUCCESS);
}
@@ -315,7 +317,19 @@ isc_file_renameunique(const char *file, char *templet) {
}
isc_result_t
+isc_file_openuniqueprivate(char *templet, FILE **fp) {
+ int mode = _S_IREAD | _S_IWRITE;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
isc_file_openunique(char *templet, FILE **fp) {
+ int mode = _S_IREAD | _S_IWRITE;
+ return (isc_file_openuniquemode(templet, mode, fp));
+}
+
+isc_result_t
+isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
int fd;
FILE *f;
isc_result_t result = ISC_R_SUCCESS;
@@ -331,6 +345,11 @@ isc_file_openunique(char *templet, FILE **fp) {
if (fd == -1)
result = isc__errno2result(errno);
if (result == ISC_R_SUCCESS) {
+#if 1
+ UNUSED(mode);
+#else
+ (void)fchmod(fd, mode);
+#endif
f = fdopen(fd, "w+");
if (f == NULL) {
result = isc__errno2result(errno);
@@ -379,6 +398,23 @@ isc_file_exists(const char *pathname) {
return (ISC_TF(file_stats(pathname, &stats) == ISC_R_SUCCESS));
}
+isc_result_t
+isc_file_isplainfile(const char *filename) {
+ /*
+ * This function returns success if filename is a plain file.
+ */
+ struct stat filestat;
+ memset(&filestat,0,sizeof(struct stat));
+
+ if ((stat(filename, &filestat)) == -1)
+ return(isc__errno2result(errno));
+
+ if(! S_ISREG(filestat.st_mode))
+ return(ISC_R_INVALIDFILE);
+
+ return(ISC_R_SUCCESS);
+}
+
isc_boolean_t
isc_file_isabsolute(const char *filename) {
REQUIRE(filename != NULL);
@@ -457,7 +493,7 @@ isc_file_progname(const char *filename, char *progname, size_t namelen) {
return (ISC_R_SUCCESS);
}
- /*
+ /*
* Copy the result to the buffer
*/
len = p - s;
@@ -505,3 +541,79 @@ isc_file_truncate(const char *filename, isc_offset_t size) {
return (ISC_R_SUCCESS);
}
+
+isc_result_t
+isc_file_safecreate(const char *filename, FILE **fp) {
+ isc_result_t result;
+ int flags;
+ struct stat sb;
+ FILE *f;
+ int fd;
+
+ REQUIRE(filename != NULL);
+ REQUIRE(fp != NULL && *fp == NULL);
+
+ result = file_stats(filename, &sb);
+ if (result == ISC_R_SUCCESS) {
+ if ((sb.st_mode & S_IFREG) == 0)
+ return (ISC_R_INVALIDFILE);
+ flags = O_WRONLY | O_TRUNC;
+ } else if (result == ISC_R_FILENOTFOUND) {
+ flags = O_WRONLY | O_CREAT | O_EXCL;
+ } else
+ return (result);
+
+ fd = open(filename, flags, S_IRUSR | S_IWUSR);
+ if (fd == -1)
+ return (isc__errno2result(errno));
+
+ f = fdopen(fd, "w");
+ if (f == NULL) {
+ result = isc__errno2result(errno);
+ close(fd);
+ return (result);
+ }
+
+ *fp = f;
+ return (ISC_R_SUCCESS);
+}
+
+isc_result_t
+isc_file_splitpath(isc_mem_t *mctx, char *path, char **dirname, char **basename)
+{
+ char *dir, *file, *slash;
+ char *backslash;
+
+ slash = strrchr(path, '/');
+
+ backslash = strrchr(path, '\\');
+ if ((slash != NULL && backslash != NULL && backslash > slash) ||
+ (slash == NULL && backslash != NULL))
+ slash = backslash;
+
+ if (slash == path) {
+ file = ++slash;
+ dir = isc_mem_strdup(mctx, "/");
+ } else if (slash != NULL) {
+ file = ++slash;
+ dir = isc_mem_allocate(mctx, slash - path);
+ if (dir != NULL)
+ strlcpy(dir, path, slash - path);
+ } else {
+ file = path;
+ dir = isc_mem_strdup(mctx, ".");
+ }
+
+ if (dir == NULL)
+ return (ISC_R_NOMEMORY);
+
+ if (*file == '\0') {
+ isc_mem_free(mctx, dir);
+ return (ISC_R_INVALIDFILE);
+ }
+
+ *dirname = dir;
+ *basename = file;
+
+ return (ISC_R_SUCCESS);
+}
diff --git a/lib/isc/win32/include/isc/ipv6.h b/lib/isc/win32/include/isc/ipv6.h
index 51a6090715bb..27384a3557f7 100644
--- a/lib/isc/win32/include/isc/ipv6.h
+++ b/lib/isc/win32/include/isc/ipv6.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ipv6.h,v 1.19 2007/06/18 23:47:49 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_IPV6_H
#define ISC_IPV6_H 1
diff --git a/lib/isc/win32/include/isc/mutex.h b/lib/isc/win32/include/isc/mutex.h
index 921c1e9380b1..5cf1bae1ba60 100644
--- a/lib/isc/win32/include/isc/mutex.h
+++ b/lib/isc/win32/include/isc/mutex.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mutex.h,v 1.20.56.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: mutex.h,v 1.22 2009/01/18 23:48:14 tbox Exp $ */
#ifndef ISC_MUTEX_H
#define ISC_MUTEX_H 1
diff --git a/lib/isc/win32/include/isc/net.h b/lib/isc/win32/include/isc/net.h
index 33e688238cac..10be85b44408 100644
--- a/lib/isc/win32/include/isc/net.h
+++ b/lib/isc/win32/include/isc/net.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: net.h,v 1.30.82.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_NET_H
#define ISC_NET_H 1
diff --git a/lib/isc/win32/include/isc/ntpaths.h b/lib/isc/win32/include/isc/ntpaths.h
index 7cd185a031d4..39bcb6276f6c 100644
--- a/lib/isc/win32/include/isc/ntpaths.h
+++ b/lib/isc/win32/include/isc/ntpaths.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ntpaths.h,v 1.16 2007/06/19 23:47:20 tbox Exp $ */
+/* $Id: ntpaths.h,v 1.20 2009/07/14 22:54:57 each Exp $ */
/*
* Windows-specific path definitions
@@ -40,7 +40,8 @@ enum NtPaths {
LWRESD_PID_PATH,
LOCAL_STATE_DIR,
SYS_CONF_DIR,
- RNDC_KEY_PATH
+ RNDC_KEY_PATH,
+ SESSION_KEY_PATH
};
/*
@@ -49,9 +50,9 @@ enum NtPaths {
#define NAMED_CONFFILE isc_ntpaths_get(NAMED_CONF_PATH)
#define RNDC_CONFFILE isc_ntpaths_get(RNDC_CONF_PATH)
#define RNDC_KEYFILE isc_ntpaths_get(RNDC_KEY_PATH)
+#define SESSION_KEYFILE isc_ntpaths_get(SESSION_KEY_PATH)
#define RESOLV_CONF isc_ntpaths_get(RESOLV_CONF_PATH)
-
/*
* Information about where the files are on disk
*/
diff --git a/lib/isc/win32/include/isc/platform.h b/lib/isc/win32/include/isc/platform.h
index d74fc76b0598..94b8ba508141 100644
--- a/lib/isc/win32/include/isc/platform.h
+++ b/lib/isc/win32/include/isc/platform.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: platform.h,v 1.16.118.2 2009/02/16 23:47:15 tbox Exp $ */
+/* $Id: platform.h,v 1.19 2009/09/29 23:48:04 tbox Exp $ */
#ifndef ISC_PLATFORM_H
#define ISC_PLATFORM_H 1
@@ -40,7 +40,9 @@
#define ISC_PLATFORM_NEEDNTOP
#define ISC_PLATFORM_NEEDPTON
+#ifndef ISC_PLATFORM_QUADFORMAT
#define ISC_PLATFORM_QUADFORMAT "I64"
+#endif
#define ISC_PLATFORM_NEEDSTRSEP
#define ISC_PLATFORM_NEEDSTRLCPY
@@ -64,6 +66,12 @@
#undef ISC_PLATFORM_HAVESYSUNH
/*
+ * Defines for the noreturn attribute.
+ */
+#define ISC_PLATFORM_NORETURN_PRE __declspec(noreturn)
+#define ISC_PLATFORM_NORETURN_POST
+
+/*
* Set up a macro for importing and exporting from the DLL
*
* To build static libraries on win32, #define ISC_STATIC_WIN
diff --git a/lib/isc/win32/include/isc/stat.h b/lib/isc/win32/include/isc/stat.h
index 5fd411b91620..f95e3b0dd99c 100644
--- a/lib/isc/win32/include/isc/stat.h
+++ b/lib/isc/win32/include/isc/stat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stat.h,v 1.7 2007/06/19 23:47:20 tbox Exp $ */
+/* $Id: stat.h,v 1.9 2009/10/01 23:48:08 tbox Exp $ */
#ifndef ISC_STAT_H
#define ISC_STAT_H 1
@@ -24,7 +24,7 @@
/* open() under unix allows setting of read/write permissions
* at the owner, group and other levels. These don't exist in NT
- * We'll just map them all to the NT equivalent
+ * We'll just map them all to the NT equivalent
*/
#define S_IREAD _S_IREAD /* read permission, owner */
@@ -37,11 +37,18 @@
#define S_IROTH _S_IREAD /* Other read permission */
#define S_IWOTH _S_IWRITE /* Other write permission */
-#define S_IFMT _S_IFMT /* file type mask */
-#define S_IFDIR _S_IFDIR /* directory */
-#define S_IFCHR _S_IFCHR /* character special */
-#define S_IFIFO _S_IFIFO /* pipe */
-#define S_IFREG _S_IFREG /* regular */
+#ifndef S_IFMT
+# define S_IFMT _S_IFMT
+#endif
+#ifndef S_IFDIR
+# define S_IFDIR _S_IFDIR
+#endif
+#ifndef S_IFCHR
+# define S_IFCHR _S_IFCHR
+#endif
+#ifndef S_IFREG
+# define S_IFREG _S_IFREG
+#endif
#ifndef S_ISDIR
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
diff --git a/lib/isc/win32/include/isc/stdtime.h b/lib/isc/win32/include/isc/stdtime.h
index 4f9eb74c54b6..abbbc16c1d69 100644
--- a/lib/isc/win32/include/isc/stdtime.h
+++ b/lib/isc/win32/include/isc/stdtime.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stdtime.h,v 1.12 2007/06/19 23:47:20 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_STDTIME_H
#define ISC_STDTIME_H 1
@@ -29,6 +29,10 @@
* about its size.
*/
typedef isc_uint32_t isc_stdtime_t;
+
+/* but this flag helps... */
+#define STDTIME_ON_32BITS 1
+
/*
* isc_stdtime32_t is a 32-bit version of isc_stdtime_t. A variable of this
* type should only be used as an opaque integer (e.g.,) to compare two
diff --git a/lib/isc/win32/include/isc/thread.h b/lib/isc/win32/include/isc/thread.h
index b75a028f9230..2eb923b2e61b 100644
--- a/lib/isc/win32/include/isc/thread.h
+++ b/lib/isc/win32/include/isc/thread.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: thread.h,v 1.22 2007/06/19 23:47:20 tbox Exp $ */
+/* $Id: thread.h,v 1.25 2009/09/29 04:37:08 marka Exp $ */
#ifndef ISC_THREAD_H
#define ISC_THREAD_H 1
@@ -37,18 +37,18 @@ inline BOOL IsValidHandle( HANDLE hHandle) {
/* validate wait return codes... */
inline BOOL WaitSucceeded( DWORD dwWaitResult, DWORD dwHandleCount) {
return ((dwWaitResult >= WAIT_OBJECT_0) &&
- (dwWaitResult < WAIT_OBJECT_0 + dwHandleCount));
+ (dwWaitResult < WAIT_OBJECT_0 + dwHandleCount));
}
inline BOOL WaitAbandoned( DWORD dwWaitResult, DWORD dwHandleCount) {
return ((dwWaitResult >= WAIT_ABANDONED_0) &&
- (dwWaitResult < WAIT_ABANDONED_0 + dwHandleCount));
+ (dwWaitResult < WAIT_ABANDONED_0 + dwHandleCount));
}
inline BOOL WaitTimeout( DWORD dwWaitResult) {
return (dwWaitResult == WAIT_TIMEOUT);
}
-
+
inline BOOL WaitFailed( DWORD dwWaitResult) {
return (dwWaitResult == WAIT_FAILED);
}
@@ -65,7 +65,7 @@ inline DWORD WaitAbandonedIndex( DWORD dwWaitResult) {
typedef HANDLE isc_thread_t;
-typedef unsigned int isc_threadresult_t;
+typedef DWORD isc_threadresult_t;
typedef void * isc_threadarg_t;
typedef isc_threadresult_t (WINAPI *isc_threadfunc_t)(isc_threadarg_t);
typedef DWORD isc_thread_key_t;
diff --git a/lib/isc/win32/include/isc/time.h b/lib/isc/win32/include/isc/time.h
index ce3c4c6a27a2..8ffb24b11428 100644
--- a/lib/isc/win32/include/isc/time.h
+++ b/lib/isc/win32/include/isc/time.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.h,v 1.33.56.2 2009/01/05 23:47:23 tbox Exp $ */
+/* $Id: time.h,v 1.35 2009/01/05 23:47:54 tbox Exp $ */
#ifndef ISC_TIME_H
#define ISC_TIME_H 1
diff --git a/lib/isc/win32/include/isc/win32os.h b/lib/isc/win32/include/isc/win32os.h
index d86820532c35..bd4039361913 100644
--- a/lib/isc/win32/include/isc/win32os.h
+++ b/lib/isc/win32/include/isc/win32os.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: win32os.h,v 1.5 2007/06/19 23:47:20 tbox Exp $ */
+/* $Id: win32os.h,v 1.7 2009/06/25 23:48:02 tbox Exp $ */
#ifndef ISC_WIN32OS_H
#define ISC_WIN32OS_H 1
@@ -68,4 +68,4 @@ isc_win32os_versioncheck(unsigned int major, unsigned int minor,
ISC_LANG_ENDDECLS
-#endif /* ISC_OS_H */
+#endif /* ISC_WIN32OS_H */
diff --git a/lib/isc/win32/interfaceiter.c b/lib/isc/win32/interfaceiter.c
index 34c9428bcb5f..8753aa8a9977 100644
--- a/lib/isc/win32/interfaceiter.c
+++ b/lib/isc/win32/interfaceiter.c
@@ -15,17 +15,17 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: interfaceiter.c,v 1.13.110.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: interfaceiter.c,v 1.15 2009/01/18 23:48:14 tbox Exp $ */
#include <config.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <iphlpapi.h>
-#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <sys/types.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <gaa_compat.h>
#include <isc/interfaceiter.h>
#include <isc/mem.h>
diff --git a/lib/isc/win32/libgen.h b/lib/isc/win32/libgen.h
new file mode 100644
index 000000000000..1c58a9569a0e
--- /dev/null
+++ b/lib/isc/win32/libgen.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or 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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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: libgen.h,v 1.3 2009/07/17 23:47:41 tbox Exp $ */
+
+#ifndef LIBGEN_H
+#define LIBGEN_H 1
+
+char *basename(const char *);
+char *dirname(const char *);
+
+#endif
diff --git a/lib/isc/win32/libisc.def b/lib/isc/win32/libisc.def
index 19a2fef6613d..fb084103da53 100644
--- a/lib/isc/win32/libisc.def
+++ b/lib/isc/win32/libisc.def
@@ -5,6 +5,26 @@ EXPORTS
NTReportError
closelog
+isc___mem_allocate
+isc___mem_free
+isc___mem_get
+isc___mem_put
+isc___mem_putanddetach
+isc___mem_reallocate
+isc___mem_strdup
+isc___mempool_get
+isc___mempool_put
+isc___socketmgr_maxudp
+isc__app_block
+isc__app_finish
+isc__app_onrun
+isc__app_reload
+isc__app_run
+isc__app_shutdown
+isc__app_start
+isc__app_unblock
+isc__backtrace_nsymbols
+isc__backtrace_symtable
isc__buffer_activeregion
isc__buffer_add
isc__buffer_availableregion
@@ -26,27 +46,116 @@ isc__buffer_remainingregion
isc__buffer_setactive
isc__buffer_subtract
isc__buffer_usedregion
-isc__mem_allocate
-isc__mem_free
-isc__mem_get
-isc__mem_put
-isc__mem_putanddetach
-isc__mem_reallocate
-isc__mem_strdup
-isc__mempool_get
-isc__mempool_put
+isc__mem_attach
+isc__mem_checkdestroyed
+isc__mem_create
+isc__mem_create2
+isc__mem_createx
+isc__mem_createx2
+isc__mem_destroy
+isc__mem_detach
+isc__mem_getname
+isc__mem_getquota
+isc__mem_gettag
+isc__mem_inuse
+isc__mem_isovermem
+isc__mem_ondestroy
+isc__mem_references
+isc__mem_setdestroycheck
+isc__mem_setname
+isc__mem_setquota
+isc__mem_setwater
+isc__mem_stats
+isc__mem_waterack
+isc__mempool_associatelock
+isc__mempool_create
+isc__mempool_destroy
+isc__mempool_getallocated
+isc__mempool_getfillcount
+isc__mempool_getfreecount
+isc__mempool_getfreemax
+isc__mempool_getmaxalloc
+isc__mempool_setfillcount
+isc__mempool_setfreemax
+isc__mempool_setmaxalloc
+isc__mempool_setname
+isc__socket_accept
+isc__socket_attach
+isc__socket_bind
+isc__socket_cancel
+isc__socket_cleanunix
+isc__socket_close
+isc__socket_connect
+isc__socket_create
+isc__socket_detach
+isc__socket_dup
+isc__socket_filter
+isc__socket_getfd
+isc__socket_getname
+isc__socket_getpeername
+isc__socket_getsockname
+isc__socket_gettag
+isc__socket_gettype
+isc__socket_ipv6only
+isc__socket_isbound
+isc__socket_listen
+isc__socket_open
+isc__socket_permunix
+isc__socket_recv
+isc__socket_recv2
+isc__socket_recvv
+isc__socket_send
+isc__socket_sendto
+isc__socket_sendto2
+isc__socket_sendtov
+isc__socket_sendv
+isc__socket_setname
+isc__socketmgr_create
+isc__socketmgr_create2
+isc__socketmgr_destroy
+isc__socketmgr_getmaxsockets
isc__socketmgr_setreserved
+isc__socketmgr_setstats
isc__strerror
-isc_app_block
-isc_app_finish
-isc_app_onrun
-isc_app_reload
-isc_app_run
-isc_app_shutdown
-isc_app_start
-isc_app_unblock
+isc__task_attach
+isc__task_beginexclusive
+isc__task_create
+isc__task_destroy
+isc__task_detach
+isc__task_endexclusive
+isc__task_getcurrenttime
+isc__task_getname
+isc__task_gettag
+isc__task_onshutdown
+isc__task_privilege
+isc__task_purge
+isc__task_purgeevent
+isc__task_purgerange
+isc__task_send
+isc__task_sendanddetach
+isc__task_setname
+isc__task_setprivilege
+isc__task_shutdown
+isc__task_unsend
+isc__task_unsendrange
+isc__taskmgr_create
+isc__taskmgr_destroy
+isc__taskmgr_mode
+isc__taskmgr_setmode
+isc__timer_attach
+isc__timer_create
+isc__timer_detach
+isc__timer_reset
+isc__timer_touch
+isc__timermgr_create
+isc__timermgr_destroy
+isc__timermgr_poke
+isc_assertion_failed
isc_assertion_setcallback
isc_assertion_typetotext
+isc_backtrace_getsymbol
+isc_backtrace_getsymbolfromindex
+isc_backtrace_gettrace
isc_base32_decoderegion
isc_base32_decodestring
isc_base32_tobuffer
@@ -114,14 +223,19 @@ isc_file_getmodtime
isc_file_isabsolute
isc_file_ischdiridempotent
isc_file_iscurrentdir
+isc_file_isplainfile
isc_file_mktemplate
isc_file_openunique
+isc_file_openuniquemode
+isc_file_openuniqueprivate
isc_file_progname
isc_file_remove
isc_file_rename
isc_file_renameunique
+isc_file_safecreate
isc_file_safemovefile
isc_file_settime
+isc_file_splitpath
isc_file_template
isc_file_truncate
isc_fsaccess_add
@@ -250,38 +364,7 @@ isc_md5_final
isc_md5_init
isc_md5_invalidate
isc_md5_update
-isc_mem_attach
-isc_mem_checkdestroyed
-isc_mem_create
-isc_mem_create2
-isc_mem_createx
-isc_mem_createx2
-isc_mem_destroy
-isc_mem_detach
-isc_mem_getname
-isc_mem_getquota
-isc_mem_gettag
-isc_mem_inuse
-isc_mem_ondestroy
-isc_mem_references
-isc_mem_setdestroycheck
-isc_mem_setname
-isc_mem_setquota
-isc_mem_setwater
-isc_mem_stats
-isc_mem_waterack
-isc_mempool_associatelock
-isc_mempool_create
-isc_mempool_destroy
-isc_mempool_getallocated
-isc_mempool_getfillcount
-isc_mempool_getfreecount
-isc_mempool_getfreemax
-isc_mempool_getmaxalloc
-isc_mempool_setfillcount
-isc_mempool_setfreemax
-isc_mempool_setmaxalloc
-isc_mempool_setname
+isc_mem_renderxml
isc_msgcat_close
isc_msgcat_get
isc_msgcat_open
@@ -308,6 +391,7 @@ isc_netaddr_fromin6
isc_netaddr_frompath
isc_netaddr_fromsockaddr
isc_netaddr_fromv4mapped
+isc_netaddr_getzone
isc_netaddr_ismulticast
isc_netaddr_masktoprefixlen
isc_netaddr_prefixok
@@ -382,15 +466,20 @@ isc_sha1_invalidate
isc_sha1_update
isc_sha224_final
isc_sha224_init
+isc_sha224_invalidate
isc_sha224_update
+isc_sha256_data
isc_sha256_final
isc_sha256_init
+isc_sha256_invalidate
isc_sha256_update
isc_sha384_final
isc_sha384_init
+isc_sha384_invalidate
isc_sha384_update
isc_sha512_final
isc_sha512_init
+isc_sha512_invalidate
isc_sha512_update
isc_sockaddr_any
isc_sockaddr_any6
@@ -412,47 +501,14 @@ isc_sockaddr_pf
isc_sockaddr_setport
isc_sockaddr_totext
isc_sockaddr_v6fromin
-isc_socket_accept
-isc_socket_attach
-isc_socket_bind
-isc_socket_cancel
-isc_socket_cleanunix
-isc_socket_close
-isc_socket_connect
-isc_socket_create
-isc_socket_detach
-isc_socket_filter
-isc_socket_getname
-isc_socket_getpeername
-isc_socket_getsockname
-isc_socket_gettag
-isc_socket_gettype
-isc_socket_ipv6only
-isc_socket_isbound
-isc_socket_listen
-isc_socket_open
-isc_socket_permunix
-isc_socket_recv
-isc_socket_recv2
-isc_socket_recvv
-isc_socket_send
-isc_socket_sendto
-isc_socket_sendto2
-isc_socket_sendtov
-isc_socket_sendv
-isc_socket_setname
-isc_socketmgr_create
-isc_socketmgr_create2
-isc_socketmgr_destroy
-isc_socketmgr_getmaxsockets
-isc_socketmgr_setstats
-isc_stats_create
+isc_socketmgr_renderxml
isc_stats_attach
-isc_stats_detach
-isc_stats_ncounters
-isc_stats_increment
+isc_stats_create
isc_stats_decrement
+isc_stats_detach
isc_stats_dump
+isc_stats_increment
+isc_stats_ncounters
isc_stdio_close
isc_stdio_flush
isc_stdio_open
@@ -478,30 +534,13 @@ isc_symtab_destroy
isc_symtab_lookup
isc_symtab_undefine
isc_syslog_facilityfromstring
-isc_task_attach
-isc_task_beginexclusive
-isc_task_create
-isc_task_destroy
-isc_task_detach
-isc_task_endexclusive
-isc_task_getcurrenttime
-isc_task_getname
-isc_task_gettag
-isc_task_onshutdown
-isc_task_purge
-isc_task_purgeevent
-isc_task_purgerange
-isc_task_send
-isc_task_sendanddetach
-isc_task_setname
-isc_task_shutdown
-isc_task_unsend
-isc_task_unsendrange
-isc_taskmgr_create
-isc_taskmgr_destroy
+isc_taskmgr_renderxml
isc_taskpool_create
isc_taskpool_destroy
+isc_taskpool_expand
isc_taskpool_gettask
+isc_taskpool_setprivilege
+isc_taskpool_size
isc_thread_create
isc_thread_join
isc_thread_key_create
@@ -511,6 +550,8 @@ isc_thread_key_setspecific
isc_thread_setconcurrency
isc_time_add
isc_time_compare
+isc_time_formatISO8601
+isc_time_formattimestamp
isc_time_isepoch
isc_time_microdiff
isc_time_nanoseconds
@@ -520,14 +561,6 @@ isc_time_seconds
isc_time_set
isc_time_settoepoch
isc_time_subtract
-isc_timer_attach
-isc_timer_create
-isc_timer_detach
-isc_timer_reset
-isc_timer_touch
-isc_timermgr_create
-isc_timermgr_destroy
-isc_timermgr_poke
isc_win32os_majorversion
isc_win32os_minorversion
isc_win32os_servicepackmajor
@@ -540,7 +573,6 @@ syslog
EXPORTS
-isc_assertion_failed DATA
isc_commandline_argument DATA
isc_commandline_errprint DATA
isc_commandline_index DATA
diff --git a/lib/isc/win32/libisc.dsp b/lib/isc/win32/libisc.dsp
index c0ffb713cf48..8e4441c39fab 100644
--- a/lib/isc/win32/libisc.dsp
+++ b/lib/isc/win32/libisc.dsp
@@ -42,8 +42,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "BIND9" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../../libxml2-2.7.3/include" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "BIND9" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -53,6 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 ../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /machine:I386 /out:"../../../Build/Release/libisc.dll"
# SUBTRACT LINK32 /pdb:none
@@ -69,8 +70,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../../libxml2-2.7.3/include" /I "include" /I "../include" /I "../noatomic/include" /I "win32" /I "../../isccfg/include" /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -80,6 +81,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /map /debug /machine:I386 /out:"../../../Build/Debug/libisc.dll" /pdbtype:sept
!ENDIF
@@ -205,6 +207,14 @@ SOURCE=..\include\isc\assertions.h
# End Source File
# Begin Source File
+SOURCE=..\include\isc\backtrace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\isc\backtrace-emptytbl.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\isc\base32.h
# End Source File
# Begin Source File
@@ -577,6 +587,14 @@ SOURCE=..\assertions.c
# End Source File
# Begin Source File
+SOURCE=..\backtrace.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\backtrace-emptytbl.c
+# End Source File
+# Begin Source File
+
SOURCE=..\base32.c
# End Source File
# Begin Source File
diff --git a/lib/isc/win32/libisc.mak b/lib/isc/win32/libisc.mak
index 47d7b9707263..e15b46b3f862 100644
--- a/lib/isc/win32/libisc.mak
+++ b/lib/isc/win32/libisc.mak
@@ -28,6 +28,7 @@ NULL=nul
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
+LIBXML=../../../../libxml2-2.7.3/win32/bin.msvc/libxml2.lib
!IF "$(CFG)" == "libisc - Win32 Release"
_VC_MANIFEST_INC=0
@@ -115,6 +116,8 @@ ALL : "..\..\..\Build\Release\libisc.dll"
CLEAN :
-@erase "$(INTDIR)\app.obj"
-@erase "$(INTDIR)\assertions.obj"
+ -@erase "$(INTDIR)\backtrace.obj"
+ -@erase "$(INTDIR)\backtrace-emptytbl.obj"
-@erase "$(INTDIR)\base32.obj"
-@erase "$(INTDIR)\base64.obj"
-@erase "$(INTDIR)\bitstring.obj"
@@ -197,14 +200,14 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /I "../../../../libxml2-2.7.3/include" /D "BIND9" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libisc.bsc"
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libisc.pdb" /machine:I386 /def:".\libisc.def" /out:"../../../Build/Release/libisc.dll" /implib:"$(OUTDIR)\libisc.lib"
+LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib $(LIBXML) /nologo /dll /incremental:no /pdb:"$(OUTDIR)\libisc.pdb" /machine:I386 /def:".\libisc.def" /out:"../../../Build/Release/libisc.dll" /implib:"$(OUTDIR)\libisc.lib"
DEF_FILE= \
".\libisc.def"
LINK32_OBJS= \
@@ -235,6 +238,8 @@ LINK32_OBJS= \
"$(INTDIR)\version.obj" \
"$(INTDIR)\win32os.obj" \
"$(INTDIR)\assertions.obj" \
+ "$(INTDIR)\backtrace.obj" \
+ "$(INTDIR)\backtrace-emptytbl.obj" \
"$(INTDIR)\base32.obj" \
"$(INTDIR)\base64.obj" \
"$(INTDIR)\bitstring.obj" \
@@ -306,6 +311,10 @@ CLEAN :
-@erase "$(INTDIR)\app.sbr"
-@erase "$(INTDIR)\assertions.obj"
-@erase "$(INTDIR)\assertions.sbr"
+ -@erase "$(INTDIR)\backtrace.obj"
+ -@erase "$(INTDIR)\backtrace-emptytbl.obj"
+ -@erase "$(INTDIR)\backtrace.sbr"
+ -@erase "$(INTDIR)\backtrace-emptytbl.sbr"
-@erase "$(INTDIR)\base32.obj"
-@erase "$(INTDIR)\base32.sbr"
-@erase "$(INTDIR)\base64.obj"
@@ -466,7 +475,7 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "include" /I "../include" /I "../../../lib/isc/noatomic/include" /I "win32" /I "../../isccfg/include" /I "../../../../libxml2-2.7.3/include" /D "BIND9" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /D "_USRDLL" /D "LIBISC_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\libisc.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\libisc.bsc"
@@ -498,6 +507,8 @@ BSC32_SBRS= \
"$(INTDIR)\version.sbr" \
"$(INTDIR)\win32os.sbr" \
"$(INTDIR)\assertions.sbr" \
+ "$(INTDIR)\backtrace.sbr" \
+ "$(INTDIR)\backtrace-emptytbl.sbr" \
"$(INTDIR)\base32.sbr" \
"$(INTDIR)\base64.sbr" \
"$(INTDIR)\bitstring.sbr" \
@@ -553,7 +564,7 @@ BSC32_SBRS= \
<<
LINK32=link.exe
-LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libisc.pdb" /map:"$(INTDIR)\libisc.map" /debug /machine:I386 /def:".\libisc.def" /out:"../../../Build/Debug/libisc.dll" /implib:"$(OUTDIR)\libisc.lib" /pdbtype:sept
+LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib $(LIBXML) /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\libisc.pdb" /map:"$(INTDIR)\libisc.map" /debug /machine:I386 /def:".\libisc.def" /out:"../../../Build/Debug/libisc.dll" /implib:"$(OUTDIR)\libisc.lib" /pdbtype:sept
DEF_FILE= \
".\libisc.def"
LINK32_OBJS= \
@@ -584,6 +595,8 @@ LINK32_OBJS= \
"$(INTDIR)\version.obj" \
"$(INTDIR)\win32os.obj" \
"$(INTDIR)\assertions.obj" \
+ "$(INTDIR)\backtrace.obj" \
+ "$(INTDIR)\backtrace-emptytbl.obj" \
"$(INTDIR)\base32.obj" \
"$(INTDIR)\base64.obj" \
"$(INTDIR)\bitstring.obj" \
@@ -1101,6 +1114,42 @@ SOURCE=..\assertions.c
!ENDIF
+SOURCE=..\backtrace.c
+
+!IF "$(CFG)" == "libisc - Win32 Release"
+
+
+"$(INTDIR)\backtrace.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
+
+
+"$(INTDIR)\backtrace.obj" "$(INTDIR)\backtrace.sbr" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF
+
+SOURCE=..\backtrace-emptytbl.c
+
+!IF "$(CFG)" == "libisc - Win32 Release"
+
+
+"$(INTDIR)\backtrace-emptytbl.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ELSEIF "$(CFG)" == "libisc - Win32 Debug"
+
+
+"$(INTDIR)\backtrace-emptytbl.obj" "$(INTDIR)\backtrace-emptytbl.sbr" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+!ENDIF
+
SOURCE=..\base32.c
!IF "$(CFG)" == "libisc - Win32 Release"
diff --git a/lib/isc/win32/net.c b/lib/isc/win32/net.c
index 240c78336c07..12876da2b880 100644
--- a/lib/isc/win32/net.c
+++ b/lib/isc/win32/net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: net.c,v 1.18 2008/08/08 05:06:49 marka Exp $ */
+/* $Id$ */
#include <config.h>
@@ -170,7 +170,8 @@ try_ipv6only(void) {
}
on = 1;
- if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&on, sizeof(on)) < 0) {
+ if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&on,
+ sizeof(on)) < 0) {
ipv6only_result = ISC_R_NOTFOUND;
goto close;
}
@@ -193,7 +194,8 @@ try_ipv6only(void) {
}
on = 1;
- if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&on, sizeof(on)) < 0) {
+ if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&on,
+ sizeof(on)) < 0) {
ipv6only_result = ISC_R_NOTFOUND;
goto close;
}
diff --git a/lib/isc/win32/netdb.h b/lib/isc/win32/netdb.h
index fa941800484f..f8d936a99f35 100644
--- a/lib/isc/win32/netdb.h
+++ b/lib/isc/win32/netdb.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netdb.h,v 1.7.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: netdb.h,v 1.9 2009/01/18 23:48:14 tbox Exp $ */
#ifndef NETDB_H
#define NETDB_H 1
diff --git a/lib/isc/win32/ntgroups.c b/lib/isc/win32/ntgroups.c
index 351adc5e74b9..729cf07e74f0 100644
--- a/lib/isc/win32/ntgroups.c
+++ b/lib/isc/win32/ntgroups.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ntgroups.c,v 1.10 2007/06/19 23:47:19 tbox Exp $ */
+/* $Id: ntgroups.c,v 1.12 2009/09/29 23:48:04 tbox Exp $ */
/*
* The NT Groups have two groups that are not well documented and are
@@ -63,28 +63,28 @@ isc_ntsecurity_getaccountgroups(char *username, char **GroupList,
DWORD dwTotalEntries = 0;
NET_API_STATUS nStatus;
DWORD dwTotalCount = 0;
- int retlen;
+ size_t retlen;
wchar_t user[MAX_NAME_LENGTH];
retlen = mbstowcs(user, username, MAX_NAME_LENGTH);
*totalGroups = 0;
/*
- * Call the NetUserGetLocalGroups function
+ * Call the NetUserGetLocalGroups function
* specifying information level 0.
*
- * The LG_INCLUDE_INDIRECT flag specifies that the
- * function should also return the names of the local
+ * The LG_INCLUDE_INDIRECT flag specifies that the
+ * function should also return the names of the local
* groups in which the user is indirectly a member.
*/
nStatus = NetUserGetLocalGroups(NULL,
- user,
- dwLevel,
- dwFlags,
- (LPBYTE *) &pBuf,
- dwPrefMaxLen,
- &dwEntriesRead,
- &dwTotalEntries);
+ user,
+ dwLevel,
+ dwFlags,
+ (LPBYTE *) &pBuf,
+ dwPrefMaxLen,
+ &dwEntriesRead,
+ &dwTotalEntries);
/*
* See if the call succeeds,
*/
@@ -103,7 +103,7 @@ isc_ntsecurity_getaccountgroups(char *username, char **GroupList,
/*
* Loop through the entries
*/
- for (i = 0;
+ for (i = 0;
(i < dwEntriesRead && *totalGroups < maxgroups); i++) {
assert(pTmpLBuf != NULL);
if (pTmpLBuf == NULL)
@@ -127,17 +127,17 @@ isc_ntsecurity_getaccountgroups(char *username, char **GroupList,
if (pBuf != NULL)
NetApiBufferFree(pBuf);
-
+
/*
* Call the NetUserGetGroups function, specifying level 0.
*/
nStatus = NetUserGetGroups(NULL,
- user,
- dwLevel,
- (LPBYTE*)&pgrpBuf,
- dwPrefMaxLen,
- &dwEntriesRead,
- &dwTotalEntries);
+ user,
+ dwLevel,
+ (LPBYTE*)&pgrpBuf,
+ dwPrefMaxLen,
+ &dwEntriesRead,
+ &dwTotalEntries);
/*
* See if the call succeeds,
*/
@@ -149,13 +149,13 @@ isc_ntsecurity_getaccountgroups(char *username, char **GroupList,
if (nStatus == NERR_UserNotFound)
dwEntriesRead = 0;
}
-
+
if (pgrpBuf != NULL) {
pTmpBuf = pgrpBuf;
/*
* Loop through the entries
*/
- for (i = 0;
+ for (i = 0;
(i < dwEntriesRead && *totalGroups < maxgroups); i++) {
assert(pTmpBuf != NULL);
diff --git a/lib/isc/win32/ntpaths.c b/lib/isc/win32/ntpaths.c
index d1c622fa9574..1ff8c5a9b5c3 100644
--- a/lib/isc/win32/ntpaths.c
+++ b/lib/isc/win32/ntpaths.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ntpaths.c,v 1.11 2007/06/18 23:47:49 tbox Exp $ */
+/* $Id: ntpaths.c,v 1.15 2009/07/14 22:54:57 each Exp $ */
/*
* This module fetches the required path information that is specific
@@ -44,6 +44,7 @@ static char lwresd_defaultpidfile[MAX_PATH];
static char local_state_dir[MAX_PATH];
static char sys_conf_dir[MAX_PATH];
static char rndc_keyFile[MAX_PATH];
+static char session_keyFile[MAX_PATH];
static DWORD baseLen = MAX_PATH;
static BOOL Initialized = FALSE;
@@ -57,7 +58,7 @@ isc_ntpaths_init() {
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SUBKEY, 0, KEY_READ, &hKey)
!= ERROR_SUCCESS)
keyFound = FALSE;
-
+
if (keyFound == TRUE) {
/* Get the named directory */
if (RegQueryValueEx(hKey, "InstallDir", NULL, NULL,
@@ -84,6 +85,9 @@ isc_ntpaths_init() {
strcpy(rndc_keyFile, namedBase);
strcat(rndc_keyFile, "\\etc\\rndc.key");
+ strcpy(session_keyFile, namedBase);
+ strcat(session_keyFile, "\\etc\\session.key");
+
strcpy(rndc_confFile, namedBase);
strcat(rndc_confFile, "\\etc\\rndc.conf");
strcpy(ns_defaultpidfile, namedBase);
@@ -97,7 +101,7 @@ isc_ntpaths_init() {
strcpy(sys_conf_dir, namedBase);
strcat(sys_conf_dir, "\\etc");
-
+
Initialized = TRUE;
}
@@ -134,6 +138,9 @@ isc_ntpaths_get(int ind) {
case RNDC_KEY_PATH:
return (rndc_keyFile);
break;
+ case SESSION_KEY_PATH:
+ return (session_keyFile);
+ break;
default:
return (NULL);
}
diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c
index 7c4068fbdc2b..ffcefb0606c8 100644
--- a/lib/isc/win32/socket.c
+++ b/lib/isc/win32/socket.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.70.54.4 2009/01/29 22:40:36 jinmei Exp $ */
+/* $Id$ */
/* This code uses functions which are only available on Server 2003 and
* higher, and Windows XP and higher.
@@ -265,7 +265,8 @@ struct isc_socket {
unsigned int listener : 1, /* listener socket */
connected : 1,
pending_connect : 1, /* connect pending */
- bound : 1; /* bound to local addr */
+ bound : 1, /* bound to local addr */
+ dupped : 1; /* created by isc_socket_dup() */
unsigned int pending_iocp; /* Should equal the counters below. Debug. */
unsigned int pending_recv; /* Number of outstanding recv() calls. */
unsigned int pending_send; /* Number of outstanding send() calls. */
@@ -351,6 +352,10 @@ enum {
#define MAXSCATTERGATHER_SEND (ISC_SOCKET_MAXSCATTERGATHER)
#define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER)
+static isc_result_t socket_create(isc_socketmgr_t *manager0, int pf,
+ isc_sockettype_t type,
+ isc_socket_t **socketp,
+ isc_socket_t *dup_socket);
static isc_threadresult_t WINAPI SocketIoThread(LPVOID ThreadContext);
static void maybe_free_socket(isc_socket_t **, int);
static void free_socket(isc_socket_t **, int);
@@ -716,21 +721,31 @@ queue_receive_request(isc_socket_t *sock) {
int total_bytes = 0;
int Result;
int Error;
+ int need_retry;
WSABUF iov[1];
- IoCompletionInfo *lpo;
+ IoCompletionInfo *lpo = NULL;
isc_result_t isc_result;
+ retry:
+ need_retry = ISC_FALSE;
+
/*
* If we already have a receive pending, do nothing.
*/
- if (sock->pending_recv > 0)
+ if (sock->pending_recv > 0) {
+ if (lpo != NULL)
+ HeapFree(hHeapHandle, 0, lpo);
return;
+ }
/*
* If no one is waiting, do nothing.
*/
- if (ISC_LIST_EMPTY(sock->recv_list))
+ if (ISC_LIST_EMPTY(sock->recv_list)) {
+ if (lpo != NULL)
+ HeapFree(hHeapHandle, 0, lpo);
return;
+ }
INSIST(sock->recvbuf.remaining == 0);
INSIST(sock->fd != INVALID_SOCKET);
@@ -738,10 +753,13 @@ queue_receive_request(isc_socket_t *sock) {
iov[0].len = sock->recvbuf.len;
iov[0].buf = sock->recvbuf.base;
- lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY,
- sizeof(IoCompletionInfo));
- RUNTIME_CHECK(lpo != NULL);
+ if (lpo == NULL) {
+ lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle,
+ HEAP_ZERO_MEMORY,
+ sizeof(IoCompletionInfo));
+ RUNTIME_CHECK(lpo != NULL);
+ } else
+ ZeroMemory(lpo, sizeof(IoCompletionInfo));
lpo->request_type = SOCKET_RECV;
sock->recvbuf.from_addr_len = sizeof(sock->recvbuf.from_addr);
@@ -763,6 +781,17 @@ queue_receive_request(isc_socket_t *sock) {
sock->pending_recv++;
break;
+ /* direct error: no completion event */
+ case ERROR_HOST_UNREACHABLE:
+ case WSAENETRESET:
+ case WSAECONNRESET:
+ if (!sock->connected) {
+ /* soft error */
+ need_retry = ISC_TRUE;
+ break;
+ }
+ /* FALLTHROUGH */
+
default:
isc_result = isc__errno2result(Error);
if (isc_result == ISC_R_UNEXPECTED)
@@ -770,6 +799,8 @@ queue_receive_request(isc_socket_t *sock) {
"WSARecvFrom: Windows error code: %d, isc result %d",
Error, isc_result);
send_recvdone_abort(sock, isc_result);
+ HeapFree(hHeapHandle, 0, lpo);
+ lpo = NULL;
break;
}
} else {
@@ -789,6 +820,9 @@ queue_receive_request(isc_socket_t *sock) {
sock->fd, Result, Error);
CONSISTENT(sock);
+
+ if (need_retry)
+ goto retry;
}
static void
@@ -866,7 +900,7 @@ make_nonblock(SOCKET fd) {
}
/*
- * Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom
+ * Windows 2000 systems incorrectly cause UDP sockets using WSARecvFrom
* 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.
@@ -1318,7 +1352,7 @@ completeio_send(isc_socket_t *sock, isc_socketevent_t *dev,
UNEXPECTED_ERROR(__FILE__, __LINE__, "completeio_send: %s: %s",
addrbuf, strbuf);
dev->result = isc__errno2result(send_errno);
- return (DOIO_HARD);
+ return (DOIO_HARD);
}
/*
@@ -1387,6 +1421,7 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
"bytes, err %d/%s",
sock->fd, *nbytes, *send_errno, strbuf);
}
+ status = DOIO_HARD;
goto done;
}
dev->result = ISC_R_SUCCESS;
@@ -1431,6 +1466,7 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
sock->connected = 0;
sock->pending_connect = 0;
sock->bound = 0;
+ sock->dupped = 0;
memset(sock->name, 0, sizeof(sock->name)); // zero the name field
_set_state(sock, SOCK_INITIALIZED);
@@ -1593,9 +1629,10 @@ free_socket(isc_socket_t **sockp, int lineno) {
* called with 'arg' as the arg value. The new socket is returned
* in 'socketp'.
*/
-isc_result_t
-isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
- isc_socket_t **socketp) {
+static isc_result_t
+socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp, isc_socket_t *dup_socket)
+{
isc_socket_t *sock = NULL;
isc_result_t result;
#if defined(USE_CMSG)
@@ -1612,33 +1649,54 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
REQUIRE(socketp != NULL && *socketp == NULL);
REQUIRE(type != isc_sockettype_fdwatch);
+ if (dup_socket != NULL)
+ return (ISC_R_NOTIMPLEMENTED);
+
result = allocate_socket(manager, type, &sock);
if (result != ISC_R_SUCCESS)
return (result);
sock->pf = pf;
- switch (type) {
- case isc_sockettype_udp:
- sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
- if (sock->fd != INVALID_SOCKET) {
- result = connection_reset_fix(sock->fd);
- if (result != ISC_R_SUCCESS) {
- socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
- "closed %d %d %d con_reset_fix_failed",
- sock->pending_recv, sock->pending_send,
- sock->references);
- closesocket(sock->fd);
- _set_state(sock, SOCK_CLOSED);
- sock->fd = INVALID_SOCKET;
- free_socket(&sock, __LINE__);
- return (result);
+#if 0
+ if (dup_socket == NULL) {
+#endif
+ switch (type) {
+ case isc_sockettype_udp:
+ sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
+ if (sock->fd != INVALID_SOCKET) {
+ result = connection_reset_fix(sock->fd);
+ if (result != ISC_R_SUCCESS) {
+ socket_log(__LINE__, sock,
+ NULL, EVENT, NULL, 0, 0,
+ "closed %d %d %d "
+ "con_reset_fix_failed",
+ sock->pending_recv,
+ sock->pending_send,
+ sock->references);
+ closesocket(sock->fd);
+ _set_state(sock, SOCK_CLOSED);
+ sock->fd = INVALID_SOCKET;
+ free_socket(&sock, __LINE__);
+ return (result);
+ }
}
+ break;
+ case isc_sockettype_tcp:
+ sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
+ break;
}
- break;
- case isc_sockettype_tcp:
- sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP);
- break;
+#if 0
+ } else {
+ /*
+ * XXX: dup() is deprecated in windows, use _dup()
+ * instead. In future we may want to investigate
+ * WSADuplicateSocket().
+ */
+ sock->fd = _dup(dup_socket->fd);
+ sock->dupped = 1;
+ sock->bound = dup_socket->bound;
}
+#endif
if (sock->fd == INVALID_SOCKET) {
socket_errno = WSAGetLastError();
@@ -1689,7 +1747,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
/* 2292bis */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
- (void *)&on, sizeof(on)) < 0)) {
+ (char *)&on, sizeof(on)) < 0)) {
isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_RECVPKTINFO) "
@@ -1704,7 +1762,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
/* 2292 */
if ((pf == AF_INET6)
&& (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO,
- (void *)&on, sizeof(on)) < 0)) {
+ (char *)&on, sizeof(on)) < 0)) {
isc__strerror(WSAGetLastError(), strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d, IPV6_PKTINFO) %s: %s",
@@ -1721,7 +1779,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
if (pf == AF_INET6) {
(void)setsockopt(sock->fd, IPPROTO_IPV6,
IPV6_USE_MIN_MTU,
- (void *)&on, sizeof(on));
+ (char *)&on, sizeof(on));
}
#endif
#endif /* ISC_PLATFORM_HAVEIPV6 */
@@ -1730,11 +1788,11 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
#if defined(SO_RCVBUF)
optlen = sizeof(size);
if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (void *)&size, &optlen) >= 0 &&
+ (char *)&size, &optlen) >= 0 &&
size < RCVBUFSIZE) {
size = RCVBUFSIZE;
(void)setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF,
- (void *)&size, sizeof(size));
+ (char *)&size, sizeof(size));
}
#endif
@@ -1756,13 +1814,34 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
InterlockedIncrement(&manager->totalSockets);
UNLOCK(&manager->lock);
- socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat, ISC_MSGSET_SOCKET,
- ISC_MSG_CREATED, "created %u type %u", sock->fd, type);
+ socket_log(__LINE__, sock, NULL, CREATION, isc_msgcat,
+ ISC_MSGSET_SOCKET, ISC_MSG_CREATED,
+ "created %u type %u", sock->fd, type);
return (ISC_R_SUCCESS);
}
isc_result_t
+isc__socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
+ isc_socket_t **socketp)
+{
+ return (socket_create(manager, pf, type, socketp, NULL));
+}
+
+isc_result_t
+isc__socket_dup(isc_socket_t *sock, isc_socket_t **socketp) {
+ REQUIRE(VALID_SOCKET(sock));
+ REQUIRE(socketp != NULL && *socketp == NULL);
+
+#if 1
+ return (ISC_R_NOTIMPLEMENTED);
+#else
+ return (socket_create(sock->manager, sock->pf, sock->type,
+ socketp, sock));
+#endif
+}
+
+isc_result_t
isc_socket_open(isc_socket_t *sock) {
REQUIRE(VALID_SOCKET(sock));
REQUIRE(sock->type != isc_sockettype_fdwatch);
@@ -1774,7 +1853,7 @@ isc_socket_open(isc_socket_t *sock) {
* Attach to a socket. Caller must explicitly detach when it is done.
*/
void
-isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
+isc__socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
REQUIRE(VALID_SOCKET(sock));
REQUIRE(socketp != NULL && *socketp == NULL);
@@ -1791,7 +1870,7 @@ isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) {
* up by destroying the socket.
*/
void
-isc_socket_detach(isc_socket_t **socketp) {
+isc__socket_detach(isc_socket_t **socketp) {
isc_socket_t *sock;
isc_boolean_t kill_socket = ISC_FALSE;
@@ -1990,7 +2069,7 @@ internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) {
INSIST(result == ISC_R_SUCCESS);
INSIST(setsockopt(nsock->fd, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
- (char *)&sock->fd, sizeof(sock->fd)) == 0);
+ (char *)&sock->fd, sizeof(sock->fd)) == 0);
/*
* Hook it up into the manager.
@@ -2096,7 +2175,8 @@ internal_connect(isc_socket_t *sock, IoCompletionInfo *lpo, int connect_errno) {
strbuf);
}
} else {
- INSIST(setsockopt(sock->fd, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == 0);
+ INSIST(setsockopt(sock->fd, SOL_SOCKET,
+ SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == 0);
cdev->result = ISC_R_SUCCESS;
sock->connected = 1;
socket_log(__LINE__, sock, &sock->address, IOEVENT,
@@ -2273,6 +2353,63 @@ connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev)
return (sock->connect_ev == dev ? ISC_TRUE : ISC_FALSE);
}
+//
+// The Windows network stack seems to have two very distinct paths depending
+// on what is installed. Specifically, if something is looking at network
+// connections (like an anti-virus or anti-malware application, such as
+// McAfee products) Windows may return additional error conditions which
+// were not previously returned.
+//
+// One specific one is when a TCP SYN scan is used. In this situation,
+// Windows responds with the SYN-ACK, but the scanner never responds with
+// the 3rd packet, the ACK. Windows consiers this a partially open connection.
+// Most Unix networking stacks, and Windows without McAfee installed, will
+// not return this to the caller. However, with this product installed,
+// Windows returns this as a failed status on the Accept() call. Here, we
+// will just re-issue the ISCAcceptEx() call as if nothing had happened.
+//
+// This code should only be called when the listening socket has received
+// such an error. Additionally, the "parent" socket must be locked.
+// Additionally, the lpo argument is re-used here, and must not be freed
+// by the caller.
+//
+static isc_result_t
+restart_accept(isc_socket_t *parent, IoCompletionInfo *lpo)
+{
+ isc_socket_t *nsock = lpo->adev->newsocket;
+ SOCKET new_fd;
+
+ /*
+ * AcceptEx() requires we pass in a socket. Note that we carefully
+ * do not close the previous socket in case of an error message returned by
+ * our new socket() call. If we return an error here, our caller will
+ * clean up.
+ */
+ new_fd = socket(parent->pf, SOCK_STREAM, IPPROTO_TCP);
+ if (nsock->fd == INVALID_SOCKET) {
+ return (ISC_R_FAILURE); // parent will ask windows for error message
+ }
+ closesocket(nsock->fd);
+ nsock->fd = new_fd;
+
+ memset(&lpo->overlapped, 0, sizeof(lpo->overlapped));
+
+ ISCAcceptEx(parent->fd,
+ nsock->fd, /* Accepted Socket */
+ lpo->acceptbuffer, /* Buffer for initial Recv */
+ 0, /* Length of Buffer */
+ sizeof(SOCKADDR_STORAGE) + 16, /* Local address length + 16 */
+ sizeof(SOCKADDR_STORAGE) + 16, /* Remote address lengh + 16 */
+ (LPDWORD)&lpo->received_bytes, /* Bytes Recved */
+ (LPOVERLAPPED)lpo /* Overlapped structure */
+ );
+
+ InterlockedDecrement(&nsock->manager->iocp_total);
+ iocompletionport_update(nsock);
+
+ return (ISC_R_SUCCESS);
+}
+
/*
* This is the I/O Completion Port Worker Function. It loops forever
* waiting for I/O to complete and then forwards them for further
@@ -2313,6 +2450,7 @@ SocketIoThread(LPVOID ThreadContext) {
* Loop forever waiting on I/O Completions and then processing them
*/
while (TRUE) {
+ wait_again:
bSuccess = GetQueuedCompletionStatus(manager->hIoCompletionPort,
&nbytes, (LPDWORD)&sock,
(LPWSAOVERLAPPED *)&lpo,
@@ -2331,7 +2469,7 @@ SocketIoThread(LPVOID ThreadContext) {
/*
* Did the I/O operation complete?
*/
- errstatus = WSAGetLastError();
+ errstatus = GetLastError();
isc_result = isc__errno2resultx(errstatus, __FILE__, __LINE__);
LOCK(&sock->lock);
@@ -2342,6 +2480,14 @@ SocketIoThread(LPVOID ThreadContext) {
sock->pending_iocp--;
INSIST(sock->pending_recv > 0);
sock->pending_recv--;
+ if (!sock->connected &&
+ ((errstatus == ERROR_HOST_UNREACHABLE) ||
+ (errstatus == WSAENETRESET) ||
+ (errstatus == WSAECONNRESET))) {
+ /* ignore soft errors */
+ queue_receive_request(sock);
+ break;
+ }
send_recvdone_abort(sock, isc_result);
if (isc_result == ISC_R_UNEXPECTED) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -2365,8 +2511,25 @@ SocketIoThread(LPVOID ThreadContext) {
case SOCKET_ACCEPT:
INSIST(sock->pending_iocp > 0);
- sock->pending_iocp--;
INSIST(sock->pending_accept > 0);
+
+ socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ "Accept: errstatus=%d isc_result=%d", errstatus, isc_result);
+
+ if (acceptdone_is_active(sock, lpo->adev)) {
+ if (restart_accept(sock, lpo) == ISC_R_SUCCESS) {
+ UNLOCK(&sock->lock);
+ goto wait_again;
+ } else {
+ errstatus = GetLastError();
+ isc_result = isc__errno2resultx(errstatus, __FILE__, __LINE__);
+ socket_log(__LINE__, sock, NULL, EVENT, NULL, 0, 0,
+ "restart_accept() failed: errstatus=%d isc_result=%d",
+ errstatus, isc_result);
+ }
+ }
+
+ sock->pending_iocp--;
sock->pending_accept--;
if (acceptdone_is_active(sock, lpo->adev)) {
closesocket(lpo->adev->newsocket->fd);
@@ -2434,13 +2597,13 @@ SocketIoThread(LPVOID ThreadContext) {
* Create a new socket manager.
*/
isc_result_t
-isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
+isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) {
return (isc_socketmgr_create2(mctx, managerp, 0));
}
isc_result_t
-isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
- unsigned int maxsocks)
+isc__socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
+ unsigned int maxsocks)
{
isc_socketmgr_t *manager;
isc_result_t result;
@@ -2489,7 +2652,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp,
}
isc_result_t
-isc_socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
+isc__socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
REQUIRE(VALID_MANAGER(manager));
REQUIRE(nsockp != NULL);
@@ -2497,7 +2660,7 @@ isc_socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) {
}
void
-isc_socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
+isc__socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
REQUIRE(VALID_MANAGER(manager));
REQUIRE(ISC_LIST_EMPTY(manager->socklist));
REQUIRE(manager->stats == NULL);
@@ -2507,7 +2670,7 @@ isc_socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) {
}
void
-isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
+isc__socketmgr_destroy(isc_socketmgr_t **managerp) {
isc_socketmgr_t *manager;
int i;
isc_mem_t *mctx;
@@ -2635,7 +2798,7 @@ socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
}
isc_result_t
-isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
+isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
unsigned int minimum, isc_task_t *task,
isc_taskaction_t action, const void *arg)
{
@@ -2705,8 +2868,9 @@ isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist,
}
isc_result_t
-isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+isc__socket_recv(isc_socket_t *sock, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_taskaction_t action, const void *arg)
{
isc_socketevent_t *dev;
isc_socketmgr_t *manager;
@@ -2742,9 +2906,9 @@ isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum,
}
isc_result_t
-isc_socket_recv2(isc_socket_t *sock, isc_region_t *region,
- unsigned int minimum, isc_task_t *task,
- isc_socketevent_t *event, unsigned int flags)
+isc__socket_recv2(isc_socket_t *sock, isc_region_t *region,
+ unsigned int minimum, isc_task_t *task,
+ isc_socketevent_t *event, unsigned int flags)
{
isc_result_t ret;
@@ -2852,8 +3016,8 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
}
isc_result_t
-isc_socket_send(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+isc__socket_send(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
/*
* REQUIRE() checking is performed in isc_socket_sendto().
@@ -2863,9 +3027,9 @@ isc_socket_send(isc_socket_t *sock, isc_region_t *region,
}
isc_result_t
-isc_socket_sendto(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
+isc__socket_sendto(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
{
isc_socketevent_t *dev;
isc_socketmgr_t *manager;
@@ -2906,17 +3070,17 @@ isc_socket_sendto(isc_socket_t *sock, isc_region_t *region,
}
isc_result_t
-isc_socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
return (isc_socket_sendtov(sock, buflist, task, action, arg, NULL,
NULL));
}
isc_result_t
-isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
- isc_task_t *task, isc_taskaction_t action, const void *arg,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
+isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
+ isc_task_t *task, isc_taskaction_t action, const void *arg,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo)
{
isc_socketevent_t *dev;
isc_socketmgr_t *manager;
@@ -2969,10 +3133,10 @@ isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist,
}
isc_result_t
-isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
- isc_task_t *task,
- isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
- isc_socketevent_t *event, unsigned int flags)
+isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region,
+ isc_task_t *task,
+ isc_sockaddr_t *address, struct in6_pktinfo *pktinfo,
+ isc_socketevent_t *event, unsigned int flags)
{
isc_result_t ret;
@@ -3004,8 +3168,8 @@ isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region,
}
isc_result_t
-isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
- unsigned int options) {
+isc__socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
+ unsigned int options) {
int bind_errno;
char strbuf[ISC_STRERRORSIZE];
int on = 1;
@@ -3023,6 +3187,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
}
INSIST(!sock->bound);
+ INSIST(!sock->dupped);
if (sock->pf != sockaddr->type.sa.sa_family) {
UNLOCK(&sock->lock);
@@ -3033,7 +3198,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
*/
if ((options & ISC_SOCKET_REUSEADDRESS) != 0 &&
isc_sockaddr_getport(sockaddr) != (in_port_t)0 &&
- setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&on,
+ setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
sizeof(on)) < 0) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"setsockopt(%d) %s", sock->fd,
@@ -3070,7 +3235,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr,
}
isc_result_t
-isc_socket_filter(isc_socket_t *sock, const char *filter) {
+isc__socket_filter(isc_socket_t *sock, const char *filter) {
UNUSED(sock);
UNUSED(filter);
@@ -3089,7 +3254,7 @@ isc_socket_filter(isc_socket_t *sock, const char *filter) {
* as well keep things simple rather than having to track them.
*/
isc_result_t
-isc_socket_listen(isc_socket_t *sock, unsigned int backlog) {
+isc__socket_listen(isc_socket_t *sock, unsigned int backlog) {
char strbuf[ISC_STRERRORSIZE];
REQUIRE(VALID_SOCKET(sock));
@@ -3134,8 +3299,8 @@ isc_socket_listen(isc_socket_t *sock, unsigned int backlog) {
* This should try to do aggressive accept() XXXMLG
*/
isc_result_t
-isc_socket_accept(isc_socket_t *sock,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+isc__socket_accept(isc_socket_t *sock,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
isc_socket_newconnev_t *adev;
isc_socketmgr_t *manager;
@@ -3198,6 +3363,13 @@ isc_socket_accept(isc_socket_t *sock,
* Attach to socket and to task.
*/
isc_task_attach(task, &ntask);
+ if (isc_task_exiting(ntask)) {
+ free_socket(&nsock, __LINE__);
+ isc_task_detach(&ntask);
+ isc_event_free(ISC_EVENT_PTR(&adev));
+ UNLOCK(&sock->lock);
+ return (ISC_R_SHUTTINGDOWN);
+ }
nsock->references++;
adev->ev_sender = ntask;
@@ -3245,8 +3417,8 @@ isc_socket_accept(isc_socket_t *sock,
}
isc_result_t
-isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
- isc_task_t *task, isc_taskaction_t action, const void *arg)
+isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
+ isc_task_t *task, isc_taskaction_t action, const void *arg)
{
char strbuf[ISC_STRERRORSIZE];
isc_socket_connev_t *cdev;
@@ -3360,7 +3532,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
}
isc_result_t
-isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
+isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
isc_result_t result;
REQUIRE(VALID_SOCKET(sock));
@@ -3390,7 +3562,7 @@ isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) {
}
isc_result_t
-isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
+isc__socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
ISC_SOCKADDR_LEN_T len;
isc_result_t result;
char strbuf[ISC_STRERRORSIZE];
@@ -3437,7 +3609,7 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) {
* queued for task "task" of type "how". "how" is a bitmask.
*/
void
-isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
+isc__socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
REQUIRE(VALID_SOCKET(sock));
@@ -3563,7 +3735,7 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
}
isc_sockettype_t
-isc_socket_gettype(isc_socket_t *sock) {
+isc__socket_gettype(isc_socket_t *sock) {
isc_sockettype_t type;
REQUIRE(VALID_SOCKET(sock));
@@ -3584,7 +3756,7 @@ isc_socket_gettype(isc_socket_t *sock) {
}
isc_boolean_t
-isc_socket_isbound(isc_socket_t *sock) {
+isc__socket_isbound(isc_socket_t *sock) {
isc_boolean_t val;
REQUIRE(VALID_SOCKET(sock));
@@ -3607,7 +3779,7 @@ isc_socket_isbound(isc_socket_t *sock) {
}
void
-isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
+isc__socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
#if defined(IPV6_V6ONLY)
int onoff = yes ? 1 : 0;
#else
@@ -3619,20 +3791,20 @@ isc_socket_ipv6only(isc_socket_t *sock, isc_boolean_t yes) {
#ifdef IPV6_V6ONLY
if (sock->pf == AF_INET6) {
(void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
- (void *)&onoff, sizeof(onoff));
+ (char *)&onoff, sizeof(onoff));
}
#endif
}
void
-isc_socket_cleanunix(isc_sockaddr_t *addr, isc_boolean_t active) {
+isc__socket_cleanunix(isc_sockaddr_t *addr, isc_boolean_t active) {
UNUSED(addr);
UNUSED(active);
}
isc_result_t
-isc_socket_permunix(isc_sockaddr_t *addr, isc_uint32_t perm,
- isc_uint32_t owner, isc_uint32_t group)
+isc__socket_permunix(isc_sockaddr_t *addr, isc_uint32_t perm,
+ isc_uint32_t owner, isc_uint32_t group)
{
UNUSED(addr);
UNUSED(perm);
@@ -3642,7 +3814,7 @@ isc_socket_permunix(isc_sockaddr_t *addr, isc_uint32_t perm,
}
void
-isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
+isc__socket_setname(isc_socket_t *socket, const char *name, void *tag) {
/*
* Name 'socket'.
@@ -3658,17 +3830,138 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
}
const char *
-isc_socket_getname(isc_socket_t *socket) {
+isc__socket_getname(isc_socket_t *socket) {
return (socket->name);
}
void *
-isc_socket_gettag(isc_socket_t *socket) {
+isc__socket_gettag(isc_socket_t *socket) {
return (socket->tag);
}
+int
+isc__socket_getfd(isc_socket_t *socket) {
+ return ((short) socket->fd);
+}
+
void
isc__socketmgr_setreserved(isc_socketmgr_t *manager, isc_uint32_t reserved) {
UNUSED(manager);
UNUSED(reserved);
}
+
+void
+isc___socketmgr_maxudp(isc_socketmgr_t *manager, int maxudp) {
+
+ UNUSED(manager);
+ UNUSED(maxudp);
+}
+
+#ifdef HAVE_LIBXML2
+
+static const char *
+_socktype(isc_sockettype_t type)
+{
+ if (type == isc_sockettype_udp)
+ return ("udp");
+ else if (type == isc_sockettype_tcp)
+ return ("tcp");
+ else if (type == isc_sockettype_unix)
+ return ("unix");
+ else if (type == isc_sockettype_fdwatch)
+ return ("fdwatch");
+ else
+ return ("not-initialized");
+}
+
+void
+isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer)
+{
+ isc_socket_t *sock;
+ char peerbuf[ISC_SOCKADDR_FORMATSIZE];
+ isc_sockaddr_t addr;
+ ISC_SOCKADDR_LEN_T len;
+
+ LOCK(&mgr->lock);
+
+#ifndef ISC_PLATFORM_USETHREADS
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
+ xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
+ xmlTextWriterEndElement(writer);
+#endif
+
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets");
+ sock = ISC_LIST_HEAD(mgr->socklist);
+ while (sock != NULL) {
+ LOCK(&sock->lock);
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "socket");
+
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "id");
+ xmlTextWriterWriteFormatString(writer, "%p", sock);
+ xmlTextWriterEndElement(writer);
+
+ if (sock->name[0] != 0) {
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "name");
+ xmlTextWriterWriteFormatString(writer, "%s",
+ sock->name);
+ xmlTextWriterEndElement(writer); /* name */
+ }
+
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
+ xmlTextWriterWriteFormatString(writer, "%d", sock->references);
+ xmlTextWriterEndElement(writer);
+
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "type",
+ ISC_XMLCHAR _socktype(sock->type));
+
+ if (sock->connected) {
+ isc_sockaddr_format(&sock->address, peerbuf,
+ sizeof(peerbuf));
+ xmlTextWriterWriteElement(writer,
+ ISC_XMLCHAR "peer-address",
+ ISC_XMLCHAR peerbuf);
+ }
+
+ len = sizeof(addr);
+ if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) {
+ isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf));
+ xmlTextWriterWriteElement(writer,
+ ISC_XMLCHAR "local-address",
+ ISC_XMLCHAR peerbuf);
+ }
+
+ xmlTextWriterStartElement(writer, ISC_XMLCHAR "states");
+ if (sock->pending_recv)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "pending-receive");
+ if (sock->pending_send)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "pending-send");
+ if (sock->pending_accept)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "pending_accept");
+ if (sock->listener)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "listener");
+ if (sock->connected)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "connected");
+ if (sock->pending_connect)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "connecting");
+ if (sock->bound)
+ xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
+ ISC_XMLCHAR "bound");
+
+ xmlTextWriterEndElement(writer); /* states */
+
+ xmlTextWriterEndElement(writer); /* socket */
+
+ UNLOCK(&sock->lock);
+ sock = ISC_LIST_NEXT(sock, link);
+ }
+ xmlTextWriterEndElement(writer); /* sockets */
+
+ UNLOCK(&mgr->lock);
+}
+#endif /* HAVE_LIBXML2 */
diff --git a/lib/isc/win32/time.c b/lib/isc/win32/time.c
index aebf73d3121c..aafd70b124de 100644
--- a/lib/isc/win32/time.c
+++ b/lib/isc/win32/time.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006-2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.48 2008/09/08 23:47:10 tbox Exp $ */
+/* $Id: time.c,v 1.52 2009/08/14 07:51:08 marka Exp $ */
#include <config.h>
@@ -226,28 +226,30 @@ isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) {
isc_uint32_t
isc_time_seconds(const isc_time_t *t) {
- SYSTEMTIME st;
+ SYSTEMTIME epoch = { 1970, 1, 4, 1, 0, 0, 0, 0 };
+ FILETIME temp;
+ ULARGE_INTEGER i1, i2;
+ LONGLONG i3;
- /*
- * Convert the time to a SYSTEMTIME structure and the grab the
- * milliseconds
- */
- FileTimeToSystemTime(&t->absolute, &st);
+ SystemTimeToFileTime(&epoch, &temp);
- return ((isc_uint32_t)(st.wMilliseconds / 1000));
+ i1.LowPart = t->absolute.dwLowDateTime;
+ i1.HighPart = t->absolute.dwHighDateTime;
+ i2.LowPart = temp.dwLowDateTime;
+ i2.HighPart = temp.dwHighDateTime;
+
+ i3 = (i1.QuadPart - i2.QuadPart) / 10000000;
+
+ return ((isc_uint32_t)i3);
}
isc_uint32_t
isc_time_nanoseconds(const isc_time_t *t) {
- SYSTEMTIME st;
-
- /*
- * Convert the time to a SYSTEMTIME structure and the grab the
- * milliseconds
- */
- FileTimeToSystemTime(&t->absolute, &st);
+ ULARGE_INTEGER i;
- return ((isc_uint32_t)(st.wMilliseconds * 1000000));
+ i.LowPart = t->absolute.dwLowDateTime;
+ i.HighPart = t->absolute.dwHighDateTime;
+ return ((isc_uint32_t)(i.QuadPart % 10000000) * 100);
}
void
@@ -280,10 +282,12 @@ isc_time_formathttptimestamp(const isc_time_t *t, char *buf, unsigned int len) {
char DateBuf[50];
char TimeBuf[50];
+/* strftime() format: "%a, %d %b %Y %H:%M:%S GMT" */
+
REQUIRE(len > 0);
if (FileTimeToSystemTime(&t->absolute, &st)) {
- GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "ddd',', dd-MMM-yyyy",
- DateBuf, 50);
+ GetDateFormat(LOCALE_USER_DEFAULT, 0, &st,
+ "ddd',', dd-MMM-yyyy", DateBuf, 50);
GetTimeFormat(LOCALE_USER_DEFAULT,
TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT,
&st, "hh':'mm':'ss", TimeBuf, 50);
@@ -293,3 +297,24 @@ isc_time_formathttptimestamp(const isc_time_t *t, char *buf, unsigned int len) {
buf[0] = 0;
}
}
+
+void
+isc_time_formatISO8601(const isc_time_t *t, char *buf, unsigned int len) {
+ SYSTEMTIME st;
+ char DateBuf[50];
+ char TimeBuf[50];
+
+/* strtime() format: "%Y-%m-%dT%H:%M:%SZ" */
+
+ REQUIRE(len > 0);
+ if (FileTimeToSystemTime(&t->absolute, &st)) {
+ GetDateFormat(LOCALE_NEUTRAL, 0, &st, "yyyy-MM-dd",
+ DateBuf, 50);
+ GetTimeFormat(LOCALE_NEUTRAL,
+ TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT,
+ &st, "hh':'mm':'ss", TimeBuf, 50);
+ snprintf(buf, len, "%s%sZ", DateBuf, TimeBuf);
+ } else {
+ buf[0] = 0;
+ }
+}
diff --git a/lib/isc/win32/unistd.h b/lib/isc/win32/unistd.h
index 889f0b8c59fa..bcb3b256da27 100644
--- a/lib/isc/win32/unistd.h
+++ b/lib/isc/win32/unistd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: unistd.h,v 1.8 2008/01/23 03:22:43 tbox Exp $ */
+/* $Id: unistd.h,v 1.10 2009/07/17 23:47:41 tbox Exp $ */
/* None of these are defined in NT, so define them for our use */
#define O_NONBLOCK 1
@@ -39,6 +39,13 @@ int fcntl(int, int, ...);
* access() related definitions for winXP
*/
#include <io.h>
+#ifndef F_OK
+#define F_OK 0
+#endif
+
+#ifndef X_OK
+#define X_OK 1
+#endif
#ifndef W_OK
#define W_OK 2
diff --git a/libjsmn/LICENSE b/libjsmn/LICENSE
new file mode 100644
index 000000000000..c84fb2e973dd
--- /dev/null
+++ b/libjsmn/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Serge A. Zaitsev
+
+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
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/libjsmn/Makefile b/libjsmn/Makefile
new file mode 100644
index 000000000000..ac947a3af8eb
--- /dev/null
+++ b/libjsmn/Makefile
@@ -0,0 +1,27 @@
+# You can put your build options here
+-include config.mk
+
+all: libjsmn.a
+
+libjsmn.a: jsmn.o
+ $(AR) rc $@ $^
+
+%.o: %.c jsmn.h
+ $(CC) -c $(CFLAGS) $< -o $@
+
+test: jsmn_test
+ ./jsmn_test
+
+jsmn_test: jsmn_test.o
+ $(CC) -L. -ljsmn $< -o $@
+
+jsmn_test.o: jsmn_test.c libjsmn.a
+
+clean:
+ rm -f jsmn.o jsmn_test.o
+ rm -f jsmn_test
+ rm -f jsmn_test.exe
+ rm -f libjsmn.a
+
+.PHONY: all clean test
+
diff --git a/libjsmn/README.md b/libjsmn/README.md
new file mode 100644
index 000000000000..abccffa43247
--- /dev/null
+++ b/libjsmn/README.md
@@ -0,0 +1,161 @@
+
+JSMN
+====
+
+jsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can be
+easily integrated into resource-limited or embedded projects.
+
+You can find more information about JSON format at [json.org][1]
+
+Library sources are available at [bitbucket.org/zserge/jsmn][2]
+
+The web page with some information about jsmn can be found at
+[http://zserge.com/jsmn.html][3]
+
+Philosophy
+----------
+
+Most JSON parsers offer you a bunch of functions to load JSON data, parse it
+and extract any value by its name. jsmn proves that checking the correctness of
+every JSON packet or allocating temporary objects to store parsed JSON fields
+often is an overkill.
+
+JSON format itself is extremely simple, so why should we complicate it?
+
+jsmn is designed to be **robust** (it should work fine even with erroneous
+data), **fast** (it should parse data on the fly), **portable** (no superfluous
+dependencies or non-standard C extensions). An of course, **simplicity** is a
+key feature - simple code style, simple algorithm, simple integration into
+other projects.
+
+Features
+--------
+
+* compatible with C89
+* no dependencies (even libc!)
+* highly portable (tested on x86/amd64, ARM, AVR)
+* about 200 lines of code
+* extremely small code footprint
+* API contains only 2 functions
+* no dynamic memory allocation
+* incremental single-pass parsing
+* library code is covered with unit-tests
+
+Design
+------
+
+The rudimentary jsmn object is a **token**. Let's consider a JSON string:
+
+ '{ "name" : "Jack", "age" : 27 }'
+
+It holds the following tokens:
+
+* Object: `{ "name" : "Jack", "age" : 27}` (the whole object)
+* Strings: `"name"`, `"Jack"`, `"age"` (keys and some values)
+* Number: `27`
+
+In jsmn, tokens do not hold any data, but point to token boundaries in JSON
+string instead. In the example above jsmn will create tokens like: Object
+[0..31], String [3..7], String [12..16], String [20..23], Number [27..29].
+
+Every jsmn token has a type, which indicates the type of corresponding JSON
+token. jsmn supports the following token types:
+
+* Object - a container of key-value pairs, e.g.:
+ `{ "foo":"bar", "x":0.3 }`
+* Array - a sequence of values, e.g.:
+ `[ 1, 2, 3 ]`
+* String - a quoted sequence of chars, e.g.: `"foo"`
+* Primitive - a number, a boolean (`true`, `false`) or `null`
+
+Besides start/end positions, jsmn tokens for complex types (like arrays
+or objects) also contain a number of child items, so you can easily follow
+object hierarchy.
+
+This approach provides enough information for parsing any JSON data and makes
+it possible to use zero-copy techniques.
+
+Install
+-------
+
+To clone the repository you should have mercurial installed. Just run:
+
+ $ hg clone http://bitbucket.org/zserge/jsmn jsmn
+
+Repository layout is simple: jsmn.c and jsmn.h are library files; demo.c is an
+example of how to use jsmn (it is also used in unit tests); test.sh is a test
+script. You will also find README, LICENSE and Makefile files inside.
+
+To build the library, run `make`. It is also recommended to run `make test`.
+Let me know, if some tests fail.
+
+If build was successful, you should get a `libjsmn.a` library.
+The header file you should include is called `"jsmn.h"`.
+
+API
+---
+
+Token types are described by `jsmntype_t`:
+
+ typedef enum {
+ JSMN_PRIMITIVE = 0,
+ JSMN_OBJECT = 1,
+ JSMN_ARRAY = 2,
+ JSMN_STRING = 3
+ } jsmntype_t;
+
+**Note:** Unlike JSON data types, primitive tokens are not divided into
+numbers, booleans and null, because one can easily tell the type using the
+first character:
+
+* <code>'t', 'f'</code> - boolean
+* <code>'n'</code> - null
+* <code>'-', '0'..'9'</code> - number
+
+Token is an object of `jsmntok_t` type:
+
+ typedef struct {
+ jsmntype_t type; // Token type
+ int start; // Token start position
+ int end; // Token end position
+ int size; // Number of child (nested) tokens
+ } jsmntok_t;
+
+**Note:** string tokens point to the first character after
+the opening quote and the previous symbol before final quote. This was made
+to simplify string extraction from JSON data.
+
+All job is done by `jsmn_parser` object. You can initialize a new parser using:
+
+ struct jsmn_parser parser;
+ jsmntok_t tokens[10];
+
+ // js - pointer to JSON string
+ // tokens - an array of tokens available
+ // 10 - number of tokens available
+ jsmn_init_parser(&parser, js, tokens, 10);
+
+This will create a parser, that can parse up to 10 JSON tokens from `js` string.
+
+Later, you can use `jsmn_parse(&parser)` function to process JSON string with the parser.
+If something goes wrong, you will get an error. Error will be one of these:
+
+* `JSMN_SUCCESS` - everything went fine. String was parsed
+* `JSMN_ERROR_INVAL` - bad token, JSON string is corrupted
+* `JSMN_ERROR_NOMEM` - not enough tokens, JSON string is too large
+* `JSMN_ERROR_PART` - JSON string is too short, expecting more JSON data
+
+If you get `JSON_ERROR_NOMEM`, you can re-allocate more tokens and call
+`jsmn_parse` once more. If you read json data from the stream, you can
+periodically call `jsmn_parse` and check if return value is `JSON_ERROR_PART`.
+You will get this error until you reach the end of JSON data.
+
+Other info
+----------
+
+This software is distributed under [MIT license](http://www.opensource.org/licenses/mit-license.php),
+ so feel free to integrate it in your commercial products.
+
+[1]: http://www.json.org/
+[2]: https://bitbucket.org/zserge/jsmn/wiki/Home
+[3]: http://zserge.com/jsmn.html
diff --git a/libjsmn/jsmn.c b/libjsmn/jsmn.c
new file mode 100644
index 000000000000..4f70adb0db24
--- /dev/null
+++ b/libjsmn/jsmn.c
@@ -0,0 +1,268 @@
+#include <stdlib.h>
+#include <string.h>
+
+#include "jsmn.h"
+
+/**
+ * Allocates a fresh unused token from the token pull.
+ */
+static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser,
+ jsmntok_t *tokens, size_t num_tokens) {
+ jsmntok_t *tok;
+ if (parser->toknext >= num_tokens) {
+ return NULL;
+ }
+ tok = &tokens[parser->toknext++];
+ tok->start = tok->end = -1;
+ tok->size = 0;
+#ifdef JSMN_PARENT_LINKS
+ tok->parent = -1;
+#endif
+ return tok;
+}
+
+/**
+ * Fills token type and boundaries.
+ */
+static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type,
+ int start, int end) {
+ token->type = type;
+ token->start = start;
+ token->end = end;
+ token->size = 0;
+}
+
+/**
+ * Fills next available token with JSON primitive.
+ */
+static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js,
+ jsmntok_t *tokens, size_t num_tokens) {
+ jsmntok_t *token;
+ int start;
+
+ start = parser->pos;
+
+ for (; js[parser->pos] != '\0'; parser->pos++) {
+ switch (js[parser->pos]) {
+#ifndef JSMN_STRICT
+ /* In strict mode primitive must be followed by "," or "}" or "]" */
+ case ':':
+#endif
+ case '\t' : case '\r' : case '\n' : case ' ' :
+ case ',' : case ']' : case '}' :
+ goto found;
+ }
+ if (js[parser->pos] < 32 || js[parser->pos] >= 127) {
+ parser->pos = start;
+ return JSMN_ERROR_INVAL;
+ }
+ }
+#ifdef JSMN_STRICT
+ /* In strict mode primitive must be followed by a comma/object/array */
+ parser->pos = start;
+ return JSMN_ERROR_PART;
+#endif
+
+found:
+ token = jsmn_alloc_token(parser, tokens, num_tokens);
+ if (token == NULL) {
+ parser->pos = start;
+ return JSMN_ERROR_NOMEM;
+ }
+ jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos);
+#ifdef JSMN_PARENT_LINKS
+ token->parent = parser->toksuper;
+#endif
+ parser->pos--;
+ return JSMN_SUCCESS;
+}
+
+/**
+ * Filsl next token with JSON string.
+ */
+static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
+ jsmntok_t *tokens, size_t num_tokens) {
+ jsmntok_t *token;
+
+ int start = parser->pos;
+
+ parser->pos++;
+
+ /* Skip starting quote */
+ for (; js[parser->pos] != '\0'; parser->pos++) {
+ char c = js[parser->pos];
+
+ /* Quote: end of string */
+ if (c == '\"') {
+ token = jsmn_alloc_token(parser, tokens, num_tokens);
+ if (token == NULL) {
+ parser->pos = start;
+ return JSMN_ERROR_NOMEM;
+ }
+ jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos);
+#ifdef JSMN_PARENT_LINKS
+ token->parent = parser->toksuper;
+#endif
+ return JSMN_SUCCESS;
+ }
+
+ /* Backslash: Quoted symbol expected */
+ if (c == '\\') {
+ parser->pos++;
+ switch (js[parser->pos]) {
+ /* Allowed escaped symbols */
+ case '\"': case '/' : case '\\' : case 'b' :
+ case 'f' : case 'r' : case 'n' : case 't' :
+ break;
+ /* Allows escaped symbol \uXXXX */
+ case 'u':
+ parser->pos++;
+ int i = 0;
+ for(; i < 4 && js[parser->pos] != '\0'; i++) {
+ /* If it isn't a hex character we have an error */
+ if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
+ (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */
+ (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */
+ parser->pos = start;
+ return JSMN_ERROR_INVAL;
+ }
+ parser->pos++;
+ }
+ parser->pos--;
+ break;
+ /* Unexpected symbol */
+ default:
+ parser->pos = start;
+ return JSMN_ERROR_INVAL;
+ }
+ }
+ }
+ parser->pos = start;
+ return JSMN_ERROR_PART;
+}
+
+/**
+ * Parse JSON string and fill tokens.
+ */
+jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens,
+ unsigned int num_tokens) {
+ jsmnerr_t r;
+ int i;
+ jsmntok_t *token;
+
+ for (; js[parser->pos] != '\0'; parser->pos++) {
+ char c;
+ jsmntype_t type;
+
+ c = js[parser->pos];
+ switch (c) {
+ case '{': case '[':
+ token = jsmn_alloc_token(parser, tokens, num_tokens);
+ if (token == NULL)
+ return JSMN_ERROR_NOMEM;
+ if (parser->toksuper != -1) {
+ tokens[parser->toksuper].size++;
+#ifdef JSMN_PARENT_LINKS
+ token->parent = parser->toksuper;
+#endif
+ }
+ token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY);
+ token->start = parser->pos;
+ parser->toksuper = parser->toknext - 1;
+ break;
+ case '}': case ']':
+ type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
+#ifdef JSMN_PARENT_LINKS
+ if (parser->toknext < 1) {
+ return JSMN_ERROR_INVAL;
+ }
+ token = &tokens[parser->toknext - 1];
+ for (;;) {
+ if (token->start != -1 && token->end == -1) {
+ if (token->type != type) {
+ return JSMN_ERROR_INVAL;
+ }
+ token->end = parser->pos + 1;
+ parser->toksuper = token->parent;
+ break;
+ }
+ if (token->parent == -1) {
+ break;
+ }
+ token = &tokens[token->parent];
+ }
+#else
+ for (i = parser->toknext - 1; i >= 0; i--) {
+ token = &tokens[i];
+ if (token->start != -1 && token->end == -1) {
+ if (token->type != type) {
+ return JSMN_ERROR_INVAL;
+ }
+ parser->toksuper = -1;
+ token->end = parser->pos + 1;
+ break;
+ }
+ }
+ /* Error if unmatched closing bracket */
+ if (i == -1) return JSMN_ERROR_INVAL;
+ for (; i >= 0; i--) {
+ token = &tokens[i];
+ if (token->start != -1 && token->end == -1) {
+ parser->toksuper = i;
+ break;
+ }
+ }
+#endif
+ break;
+ case '\"':
+ r = jsmn_parse_string(parser, js, tokens, num_tokens);
+ if (r < 0) return r;
+ if (parser->toksuper != -1)
+ tokens[parser->toksuper].size++;
+ break;
+ case '\t' : case '\r' : case '\n' : case ':' : case ',': case ' ':
+ break;
+#ifdef JSMN_STRICT
+ /* In strict mode primitives are: numbers and booleans */
+ case '-': case '0': case '1' : case '2': case '3' : case '4':
+ case '5': case '6': case '7' : case '8': case '9':
+ case 't': case 'f': case 'n' :
+#else
+ /* In non-strict mode every unquoted value is a primitive */
+ default:
+#endif
+ r = jsmn_parse_primitive(parser, js, tokens, num_tokens);
+ if (r < 0) return r;
+ if (parser->toksuper != -1)
+ tokens[parser->toksuper].size++;
+ break;
+
+#ifdef JSMN_STRICT
+ /* Unexpected char in strict mode */
+ default:
+ return JSMN_ERROR_INVAL;
+#endif
+
+ }
+ }
+
+ for (i = parser->toknext - 1; i >= 0; i--) {
+ /* Unmatched opened object or array */
+ if (tokens[i].start != -1 && tokens[i].end == -1) {
+ return JSMN_ERROR_PART;
+ }
+ }
+
+ return JSMN_SUCCESS;
+}
+
+/**
+ * Creates a new parser based over a given buffer with an array of tokens
+ * available.
+ */
+void jsmn_init(jsmn_parser *parser) {
+ parser->pos = 0;
+ parser->toknext = 0;
+ parser->toksuper = -1;
+}
+
diff --git a/libjsmn/jsmn.h b/libjsmn/jsmn.h
new file mode 100644
index 000000000000..03b2c1aa4e48
--- /dev/null
+++ b/libjsmn/jsmn.h
@@ -0,0 +1,67 @@
+#ifndef __JSMN_H_
+#define __JSMN_H_
+
+/**
+ * JSON type identifier. Basic types are:
+ * o Object
+ * o Array
+ * o String
+ * o Other primitive: number, boolean (true/false) or null
+ */
+typedef enum {
+ JSMN_PRIMITIVE = 0,
+ JSMN_OBJECT = 1,
+ JSMN_ARRAY = 2,
+ JSMN_STRING = 3
+} jsmntype_t;
+
+typedef enum {
+ /* Not enough tokens were provided */
+ JSMN_ERROR_NOMEM = -1,
+ /* Invalid character inside JSON string */
+ JSMN_ERROR_INVAL = -2,
+ /* The string is not a full JSON packet, more bytes expected */
+ JSMN_ERROR_PART = -3,
+ /* Everything was fine */
+ JSMN_SUCCESS = 0
+} jsmnerr_t;
+
+/**
+ * JSON token description.
+ * @param type type (object, array, string etc.)
+ * @param start start position in JSON data string
+ * @param end end position in JSON data string
+ */
+typedef struct {
+ jsmntype_t type;
+ int start;
+ int end;
+ int size;
+#ifdef JSMN_PARENT_LINKS
+ int parent;
+#endif
+} jsmntok_t;
+
+/**
+ * JSON parser. Contains an array of token blocks available. Also stores
+ * the string being parsed now and current position in that string
+ */
+typedef struct {
+ unsigned int pos; /* offset in the JSON string */
+ int toknext; /* next token to allocate */
+ int toksuper; /* superior token node, e.g parent object or array */
+} jsmn_parser;
+
+/**
+ * Create JSON parser over an array of tokens
+ */
+void jsmn_init(jsmn_parser *parser);
+
+/**
+ * Run JSON parser. It parses a JSON data string into and array of tokens, each describing
+ * a single JSON object.
+ */
+jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js,
+ jsmntok_t *tokens, unsigned int num_tokens);
+
+#endif /* __JSMN_H_ */
diff --git a/libjsmn/jsmn_test.c b/libjsmn/jsmn_test.c
new file mode 100644
index 000000000000..fe5f0004555b
--- /dev/null
+++ b/libjsmn/jsmn_test.c
@@ -0,0 +1,409 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "jsmn.c"
+
+static int test_passed = 0;
+static int test_failed = 0;
+
+/* Terminate current test with error */
+#define fail() return __LINE__
+
+/* Successfull end of the test case */
+#define done() return 0
+
+/* Check single condition */
+#define check(cond) do { if (!(cond)) fail(); } while (0)
+
+/* Test runner */
+static void test(int (*func)(void), const char *name) {
+ int r = func();
+ if (r == 0) {
+ test_passed++;
+ } else {
+ test_failed++;
+ printf("FAILED: %s (at line %d)\n", name, r);
+ }
+}
+
+#define TOKEN_EQ(t, tok_start, tok_end, tok_type) \
+ ((t).start == tok_start \
+ && (t).end == tok_end \
+ && (t).type == (tok_type))
+
+#define TOKEN_STRING(js, t, s) \
+ (strncmp(js+(t).start, s, (t).end - (t).start) == 0 \
+ && strlen(s) == (t).end - (t).start)
+
+#define TOKEN_PRINT(t) \
+ printf("start: %d, end: %d, type: %d, size: %d\n", \
+ (t).start, (t).end, (t).type, (t).size)
+
+int test_empty() {
+ const char *js;
+ int r;
+ jsmn_parser p;
+ jsmntok_t t[10];
+
+ js = "{}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, t, 10);
+ check(r == JSMN_SUCCESS);
+ check(t[0].type == JSMN_OBJECT);
+ check(t[0].start == 0 && t[0].end == 2);
+
+ js = "[]";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, t, 10);
+ check(r == JSMN_SUCCESS);
+ check(t[0].type == JSMN_ARRAY);
+ check(t[0].start == 0 && t[0].end == 2);
+
+ js = "{\"a\":[]}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, t, 10);
+ check(r == JSMN_SUCCESS);
+ check(t[0].type == JSMN_OBJECT && t[0].start == 0 && t[0].end == 8);
+ check(t[1].type == JSMN_STRING && t[1].start == 2 && t[1].end == 3);
+ check(t[2].type == JSMN_ARRAY && t[2].start == 5 && t[2].end == 7);
+
+ js = "[{},{}]";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, t, 10);
+ check(r == JSMN_SUCCESS);
+ check(t[0].type == JSMN_ARRAY && t[0].start == 0 && t[0].end == 7);
+ check(t[1].type == JSMN_OBJECT && t[1].start == 1 && t[1].end == 3);
+ check(t[2].type == JSMN_OBJECT && t[2].start == 4 && t[2].end == 6);
+ return 0;
+}
+
+int test_simple() {
+ const char *js;
+ int r;
+ jsmn_parser p;
+ jsmntok_t tokens[10];
+
+ js = "{\"a\": 0}";
+
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+ check(TOKEN_EQ(tokens[0], 0, 8, JSMN_OBJECT));
+ check(TOKEN_EQ(tokens[1], 2, 3, JSMN_STRING));
+ check(TOKEN_EQ(tokens[2], 6, 7, JSMN_PRIMITIVE));
+
+ check(TOKEN_STRING(js, tokens[0], js));
+ check(TOKEN_STRING(js, tokens[1], "a"));
+ check(TOKEN_STRING(js, tokens[2], "0"));
+
+ jsmn_init(&p);
+ js = "[\"a\":{},\"b\":{}]";
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ jsmn_init(&p);
+ js = "{\n \"Day\": 26,\n \"Month\": 9,\n \"Year\": 12\n }";
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ return 0;
+}
+
+int test_primitive() {
+ int r;
+ jsmn_parser p;
+ jsmntok_t tok[10];
+ const char *js;
+#ifndef JSMN_STRICT
+ js = "\"boolVar\" : true";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "boolVar"));
+ check(TOKEN_STRING(js, tok[1], "true"));
+
+ js = "\"boolVar\" : false";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "boolVar"));
+ check(TOKEN_STRING(js, tok[1], "false"));
+
+ js = "\"intVar\" : 12345";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "intVar"));
+ check(TOKEN_STRING(js, tok[1], "12345"));
+
+ js = "\"floatVar\" : 12.345";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "floatVar"));
+ check(TOKEN_STRING(js, tok[1], "12.345"));
+
+ js = "\"nullVar\" : null";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "nullVar"));
+ check(TOKEN_STRING(js, tok[1], "null"));
+#endif
+ return 0;
+}
+
+int test_string() {
+ int r;
+ jsmn_parser p;
+ jsmntok_t tok[10];
+ const char *js;
+
+ js = "\"strVar\" : \"hello world\"";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "strVar"));
+ check(TOKEN_STRING(js, tok[1], "hello world"));
+
+ js = "\"strVar\" : \"escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\\"";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "strVar"));
+ check(TOKEN_STRING(js, tok[1], "escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\"));
+
+ js = "\"strVar\" : \"\"";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "strVar"));
+ check(TOKEN_STRING(js, tok[1], ""));
+
+ return 0;
+}
+
+int test_partial_string() {
+ int r;
+ jsmn_parser p;
+ jsmntok_t tok[10];
+ const char *js;
+
+ jsmn_init(&p);
+ js = "\"x\": \"va";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "x"));
+ check(p.toknext == 1);
+
+ js = "\"x\": \"valu";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "x"));
+ check(p.toknext == 1);
+
+ js = "\"x\": \"value\"";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "x"));
+ check(TOKEN_STRING(js, tok[1], "value"));
+
+ js = "\"x\": \"value\", \"y\": \"value y\"";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_STRING
+ && tok[1].type == JSMN_STRING && tok[2].type == JSMN_STRING
+ && tok[3].type == JSMN_STRING);
+ check(TOKEN_STRING(js, tok[0], "x"));
+ check(TOKEN_STRING(js, tok[1], "value"));
+ check(TOKEN_STRING(js, tok[2], "y"));
+ check(TOKEN_STRING(js, tok[3], "value y"));
+
+ return 0;
+}
+
+int test_unquoted_keys() {
+#ifndef JSMN_STRICT
+ int r;
+ jsmn_parser p;
+ jsmntok_t tok[10];
+ const char *js;
+
+ jsmn_init(&p);
+ js = "key1: \"value\"\nkey2 : 123";
+
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_PRIMITIVE
+ && tok[1].type == JSMN_STRING && tok[2].type == JSMN_PRIMITIVE
+ && tok[3].type == JSMN_PRIMITIVE);
+ check(TOKEN_STRING(js, tok[0], "key1"));
+ check(TOKEN_STRING(js, tok[1], "value"));
+ check(TOKEN_STRING(js, tok[2], "key2"));
+ check(TOKEN_STRING(js, tok[3], "123"));
+#endif
+ return 0;
+}
+
+int test_partial_array() {
+ int r;
+ jsmn_parser p;
+ jsmntok_t tok[10];
+ const char *js;
+
+ jsmn_init(&p);
+ js = " [ 1, true, ";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY
+ && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE);
+
+ js = " [ 1, true, [123, \"hello";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY
+ && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE
+ && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE);
+
+ js = " [ 1, true, [123, \"hello\"]";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY
+ && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE
+ && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE
+ && tok[5].type == JSMN_STRING);
+ /* check child nodes of the 2nd array */
+ check(tok[3].size == 2);
+
+ js = " [ 1, true, [123, \"hello\"]]";
+ r = jsmn_parse(&p, js, tok, 10);
+ check(r == JSMN_SUCCESS && tok[0].type == JSMN_ARRAY
+ && tok[1].type == JSMN_PRIMITIVE && tok[2].type == JSMN_PRIMITIVE
+ && tok[3].type == JSMN_ARRAY && tok[4].type == JSMN_PRIMITIVE
+ && tok[5].type == JSMN_STRING);
+ check(tok[3].size == 2);
+ check(tok[0].size == 3);
+ return 0;
+}
+
+int test_array_nomem() {
+ int i;
+ int r;
+ jsmn_parser p;
+ jsmntok_t toksmall[10], toklarge[10];
+ const char *js;
+
+ js = " [ 1, true, [123, \"hello\"]]";
+
+ for (i = 0; i < 6; i++) {
+ jsmn_init(&p);
+ memset(toksmall, 0, sizeof(toksmall));
+ memset(toklarge, 0, sizeof(toklarge));
+ r = jsmn_parse(&p, js, toksmall, i);
+ check(r == JSMN_ERROR_NOMEM);
+
+ memcpy(toklarge, toksmall, sizeof(toksmall));
+
+ r = jsmn_parse(&p, js, toklarge, 10);
+ check(r == JSMN_SUCCESS);
+
+ check(toklarge[0].type == JSMN_ARRAY && toklarge[0].size == 3);
+ check(toklarge[3].type == JSMN_ARRAY && toklarge[3].size == 2);
+ }
+ return 0;
+}
+
+int test_objects_arrays() {
+ int i;
+ int r;
+ jsmn_parser p;
+ jsmntok_t tokens[10];
+ const char *js;
+
+ js = "[10}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_ERROR_INVAL);
+
+ js = "[10]";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ js = "{\"a\": 1]";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_ERROR_INVAL);
+
+ js = "{\"a\": 1}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ return 0;
+}
+
+int test_unicode_characters() {
+ jsmn_parser p;
+ jsmntok_t tokens[10];
+ const char *js;
+
+ int r;
+ js = "{\"a\":\"\\uAbcD\"}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ js = "{\"a\":\"str\\u0000\"}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ js = "{\"a\":\"\\uFFFFstr\"}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ js = "{\"a\":\"str\\uFFGFstr\"}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_ERROR_INVAL);
+
+ js = "{\"a\":\"str\\u@FfF\"}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_ERROR_INVAL);
+
+ js = "{\"a\":[\"\\u028\"]}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_ERROR_INVAL);
+
+ js = "{\"a\":[\"\\u0280\"]}";
+ jsmn_init(&p);
+ r = jsmn_parse(&p, js, tokens, 10);
+ check(r == JSMN_SUCCESS);
+
+ return 0;
+}
+
+int main() {
+ test(test_empty, "general test for a empty JSON objects/arrays");
+ test(test_simple, "general test for a simple JSON string");
+ test(test_primitive, "test primitive JSON data types");
+ test(test_string, "test string JSON data types");
+ test(test_partial_string, "test partial JSON string parsing");
+ test(test_partial_array, "test partial array reading");
+ test(test_array_nomem, "test array reading with a smaller number of tokens");
+ test(test_unquoted_keys, "test unquoted keys (like in JavaScript)");
+ test(test_objects_arrays, "test objects and arrays");
+ test(test_unicode_characters, "test unicode characters");
+ printf("\nPASSED: %d\nFAILED: %d\n", test_passed, test_failed);
+ return 0;
+}
+
diff --git a/libntp/Makefile.am b/libntp/Makefile.am
index 3e7373ae3f3c..c12658f5a18e 100644
--- a/libntp/Makefile.am
+++ b/libntp/Makefile.am
@@ -1,10 +1,47 @@
NULL=
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
BUILT_SOURCES =
CLEANFILES =
noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
EXTRA_LIBRARIES = libntpsim.a
+
+libisc_SRCS = \
+ $(srcdir)/../lib/isc/assertions.c \
+ $(srcdir)/../lib/isc/buffer.c \
+ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
+ $(srcdir)/../lib/isc/backtrace.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
+ $(srcdir)/../lib/isc/unix/dir.c \
+ $(srcdir)/../lib/isc/error.c \
+ $(srcdir)/../lib/isc/unix/errno2result.c \
+ $(srcdir)/../lib/isc/event.c \
+ $(srcdir)/../lib/isc/unix/file.c \
+ $(srcdir)/../lib/isc/inet_ntop.c \
+ $(srcdir)/../lib/isc/inet_pton.c \
+ $(srcdir)/../lib/isc/unix/interfaceiter.c \
+ $(srcdir)/../lib/isc/lib.c \
+ $(srcdir)/../lib/isc/log.c \
+ $(srcdir)/../lib/isc/md5.c \
+ $(srcdir)/../lib/isc/nls/msgcat.c \
+ $(srcdir)/../lib/isc/unix/net.c \
+ $(srcdir)/../lib/isc/netaddr.c \
+ $(srcdir)/../lib/isc/netscope.c \
+ $(srcdir)/../lib/isc/ondestroy.c \
+ $(srcdir)/../lib/isc/random.c \
+ $(srcdir)/../lib/isc/result.c \
+ $(srcdir)/../lib/isc/unix/stdio.c \
+ $(srcdir)/../lib/isc/unix/stdtime.c \
+ $(srcdir)/../lib/isc/unix/strerror.c \
+ $(srcdir)/../lib/isc/task.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
+ $(srcdir)/../lib/isc/unix/time.c \
+ $(srcdir)/../lib/isc/sha1.c \
+ $(srcdir)/../lib/isc/sockaddr.c \
+ $(NULL)
+
+if PTHREADS
+libisc_SRCS += $(srcdir)/../lib/isc/pthreads/mutex.c
+endif
+
libntp_a_SRCS = \
a_md5encrypt.c \
adjtime.c \
@@ -27,87 +64,63 @@ libntp_a_SRCS = \
dolfptoa.c \
emalloc.c \
findconfig.c \
- fptoa.c \
- fptoms.c \
getopt.c \
hextoint.c \
hextolfp.c \
humandate.c \
icom.c \
- inttoa.c \
iosignal.c \
lib_strbuf.c \
machines.c \
- memmove.c \
- mfptoa.c \
- ntp_lineedit.c \
- mfptoms.c \
mktime.c \
modetoa.c \
mstolfp.c \
- msutotsf.c \
msyslog.c \
netof.c \
+ ntp_calendar.c \
+ ntp_crypto_rnd.c \
+ ntp_intres.c \
ntp_libopts.c \
+ ntp_lineedit.c \
+ ntp_random.c \
ntp_rfc2553.c \
+ ntp_worker.c \
numtoa.c \
numtohost.c \
octtoint.c \
prettydate.c \
- ntp_random.c \
recvbuff.c \
refnumtoa.c \
snprintf.c \
+ socket.c \
socktoa.c \
socktohost.c \
ssl_init.c \
statestr.c \
strdup.c \
- strstr.c \
+ strl_obsd.c \
syssignal.c \
- tsftomsu.c \
- tstotv.c \
- tvtots.c \
+ timetoa.c \
+ timevalops.c \
uglydate.c \
- uinttoa.c \
+ vint64ops.c \
+ work_fork.c \
+ work_thread.c \
ymd2yd.c \
- $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/nothreads/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c \
- $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c \
- $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c \
- $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c \
- $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c \
- $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c \
- $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/nothreads/thread.c \
- $(srcdir)/../lib/isc/unix/time.c \
- $(srcdir)/../lib/isc/sockaddr.c \
+ $(libisc_SRCS) \
$(NULL)
+
libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
EXTRA_libntp_a_SOURCES = adjtimex.c
-ETAGS_ARGS = Makefile.am
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
EXTRA_DIST = README
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/libntp/Makefile.in b/libntp/Makefile.in
index 62d53f905352..39f287521e15 100644
--- a/libntp/Makefile.in
+++ b/libntp/Makefile.in
@@ -34,21 +34,46 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@PTHREADS_TRUE@am__append_1 = $(srcdir)/../lib/isc/pthreads/mutex.c
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf
subdir = libntp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -57,10 +82,68 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
libntp_a_AR = $(AR) $(ARFLAGS)
libntp_a_LIBADD =
+am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \
+ atoint.c atolfp.c atouint.c audio.c authkeys.c authreadkeys.c \
+ authusekey.c bsd_strerror.c buftvtots.c caljulian.c caltontp.c \
+ calyearstart.c clocktime.c clocktypes.c decodenetnum.c \
+ dofptoa.c dolfptoa.c emalloc.c findconfig.c getopt.c \
+ hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
+ lib_strbuf.c machines.c mktime.c modetoa.c mstolfp.c msyslog.c \
+ netof.c ntp_calendar.c ntp_crypto_rnd.c ntp_intres.c \
+ ntp_libopts.c ntp_lineedit.c ntp_random.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timetoa.c timevalops.c uglydate.c vint64ops.c \
+ work_fork.c work_thread.c ymd2yd.c \
+ $(srcdir)/../lib/isc/assertions.c \
+ $(srcdir)/../lib/isc/buffer.c \
+ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
+ $(srcdir)/../lib/isc/backtrace.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
+ $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
+ $(srcdir)/../lib/isc/unix/errno2result.c \
+ $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
+ $(srcdir)/../lib/isc/inet_ntop.c \
+ $(srcdir)/../lib/isc/inet_pton.c \
+ $(srcdir)/../lib/isc/unix/interfaceiter.c \
+ $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
+ $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
+ $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
+ $(srcdir)/../lib/isc/netscope.c \
+ $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
+ $(srcdir)/../lib/isc/result.c \
+ $(srcdir)/../lib/isc/unix/stdio.c \
+ $(srcdir)/../lib/isc/unix/stdtime.c \
+ $(srcdir)/../lib/isc/unix/strerror.c \
+ $(srcdir)/../lib/isc/task.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
+ $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
+ $(srcdir)/../lib/isc/sockaddr.c \
+ $(srcdir)/../lib/isc/pthreads/mutex.c
am__objects_1 =
-am__objects_2 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
+@PTHREADS_TRUE@am__objects_2 = mutex.$(OBJEXT)
+am__objects_3 = assertions.$(OBJEXT) buffer.$(OBJEXT) \
+ backtrace-emptytbl.$(OBJEXT) backtrace.$(OBJEXT) \
+ condition.$(OBJEXT) dir.$(OBJEXT) error.$(OBJEXT) \
+ errno2result.$(OBJEXT) event.$(OBJEXT) file.$(OBJEXT) \
+ inet_ntop.$(OBJEXT) inet_pton.$(OBJEXT) \
+ interfaceiter.$(OBJEXT) lib.$(OBJEXT) log.$(OBJEXT) \
+ md5.$(OBJEXT) msgcat.$(OBJEXT) net.$(OBJEXT) netaddr.$(OBJEXT) \
+ netscope.$(OBJEXT) ondestroy.$(OBJEXT) random.$(OBJEXT) \
+ result.$(OBJEXT) stdio.$(OBJEXT) stdtime.$(OBJEXT) \
+ strerror.$(OBJEXT) task.$(OBJEXT) thread.$(OBJEXT) \
+ time.$(OBJEXT) sha1.$(OBJEXT) sockaddr.$(OBJEXT) \
+ $(am__objects_1) $(am__objects_2)
+am__objects_4 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
atoint.$(OBJEXT) atolfp.$(OBJEXT) atouint.$(OBJEXT) \
audio.$(OBJEXT) authkeys.$(OBJEXT) authreadkeys.$(OBJEXT) \
authusekey.$(OBJEXT) bsd_strerror.$(OBJEXT) \
@@ -68,71 +151,128 @@ am__objects_2 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
calyearstart.$(OBJEXT) clocktime.$(OBJEXT) \
clocktypes.$(OBJEXT) decodenetnum.$(OBJEXT) dofptoa.$(OBJEXT) \
dolfptoa.$(OBJEXT) emalloc.$(OBJEXT) findconfig.$(OBJEXT) \
- fptoa.$(OBJEXT) fptoms.$(OBJEXT) getopt.$(OBJEXT) \
- hextoint.$(OBJEXT) hextolfp.$(OBJEXT) humandate.$(OBJEXT) \
- icom.$(OBJEXT) inttoa.$(OBJEXT) iosignal.$(OBJEXT) \
- lib_strbuf.$(OBJEXT) machines.$(OBJEXT) memmove.$(OBJEXT) \
- mfptoa.$(OBJEXT) ntp_lineedit.$(OBJEXT) mfptoms.$(OBJEXT) \
- mktime.$(OBJEXT) modetoa.$(OBJEXT) mstolfp.$(OBJEXT) \
- msutotsf.$(OBJEXT) msyslog.$(OBJEXT) netof.$(OBJEXT) \
- ntp_libopts.$(OBJEXT) ntp_rfc2553.$(OBJEXT) numtoa.$(OBJEXT) \
- numtohost.$(OBJEXT) octtoint.$(OBJEXT) prettydate.$(OBJEXT) \
- ntp_random.$(OBJEXT) recvbuff.$(OBJEXT) refnumtoa.$(OBJEXT) \
- snprintf.$(OBJEXT) socktoa.$(OBJEXT) socktohost.$(OBJEXT) \
- ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \
- strstr.$(OBJEXT) syssignal.$(OBJEXT) tsftomsu.$(OBJEXT) \
- tstotv.$(OBJEXT) tvtots.$(OBJEXT) uglydate.$(OBJEXT) \
- uinttoa.$(OBJEXT) ymd2yd.$(OBJEXT) assertions.$(OBJEXT) \
- buffer.$(OBJEXT) condition.$(OBJEXT) dir.$(OBJEXT) \
- error.$(OBJEXT) errno2result.$(OBJEXT) event.$(OBJEXT) \
- file.$(OBJEXT) inet_ntop.$(OBJEXT) inet_pton.$(OBJEXT) \
- interfaceiter.$(OBJEXT) lib.$(OBJEXT) log.$(OBJEXT) \
- md5.$(OBJEXT) msgcat.$(OBJEXT) net.$(OBJEXT) netaddr.$(OBJEXT) \
- netscope.$(OBJEXT) ondestroy.$(OBJEXT) random.$(OBJEXT) \
- result.$(OBJEXT) stdio.$(OBJEXT) stdtime.$(OBJEXT) \
- strerror.$(OBJEXT) task.$(OBJEXT) thread.$(OBJEXT) \
- time.$(OBJEXT) sockaddr.$(OBJEXT) $(am__objects_1)
-am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_2)
+ getopt.$(OBJEXT) hextoint.$(OBJEXT) hextolfp.$(OBJEXT) \
+ humandate.$(OBJEXT) icom.$(OBJEXT) iosignal.$(OBJEXT) \
+ lib_strbuf.$(OBJEXT) machines.$(OBJEXT) mktime.$(OBJEXT) \
+ modetoa.$(OBJEXT) mstolfp.$(OBJEXT) msyslog.$(OBJEXT) \
+ netof.$(OBJEXT) ntp_calendar.$(OBJEXT) \
+ ntp_crypto_rnd.$(OBJEXT) ntp_intres.$(OBJEXT) \
+ ntp_libopts.$(OBJEXT) ntp_lineedit.$(OBJEXT) \
+ ntp_random.$(OBJEXT) ntp_rfc2553.$(OBJEXT) \
+ ntp_worker.$(OBJEXT) numtoa.$(OBJEXT) numtohost.$(OBJEXT) \
+ octtoint.$(OBJEXT) prettydate.$(OBJEXT) recvbuff.$(OBJEXT) \
+ refnumtoa.$(OBJEXT) snprintf.$(OBJEXT) socket.$(OBJEXT) \
+ socktoa.$(OBJEXT) socktohost.$(OBJEXT) ssl_init.$(OBJEXT) \
+ statestr.$(OBJEXT) strdup.$(OBJEXT) strl_obsd.$(OBJEXT) \
+ syssignal.$(OBJEXT) timetoa.$(OBJEXT) timevalops.$(OBJEXT) \
+ uglydate.$(OBJEXT) vint64ops.$(OBJEXT) work_fork.$(OBJEXT) \
+ work_thread.$(OBJEXT) ymd2yd.$(OBJEXT) $(am__objects_3) \
+ $(am__objects_1)
+am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
libntpsim_a_AR = $(AR) $(ARFLAGS)
libntpsim_a_LIBADD =
-am_libntpsim_a_OBJECTS = systime_s.$(OBJEXT) $(am__objects_2)
+am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \
+ atoint.c atolfp.c atouint.c audio.c authkeys.c authreadkeys.c \
+ authusekey.c bsd_strerror.c buftvtots.c caljulian.c caltontp.c \
+ calyearstart.c clocktime.c clocktypes.c decodenetnum.c \
+ dofptoa.c dolfptoa.c emalloc.c findconfig.c getopt.c \
+ hextoint.c hextolfp.c humandate.c icom.c iosignal.c \
+ lib_strbuf.c machines.c mktime.c modetoa.c mstolfp.c msyslog.c \
+ netof.c ntp_calendar.c ntp_crypto_rnd.c ntp_intres.c \
+ ntp_libopts.c ntp_lineedit.c ntp_random.c ntp_rfc2553.c \
+ ntp_worker.c numtoa.c numtohost.c octtoint.c prettydate.c \
+ recvbuff.c refnumtoa.c snprintf.c socket.c socktoa.c \
+ socktohost.c ssl_init.c statestr.c strdup.c strl_obsd.c \
+ syssignal.c timetoa.c timevalops.c uglydate.c vint64ops.c \
+ work_fork.c work_thread.c ymd2yd.c \
+ $(srcdir)/../lib/isc/assertions.c \
+ $(srcdir)/../lib/isc/buffer.c \
+ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
+ $(srcdir)/../lib/isc/backtrace.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
+ $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
+ $(srcdir)/../lib/isc/unix/errno2result.c \
+ $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
+ $(srcdir)/../lib/isc/inet_ntop.c \
+ $(srcdir)/../lib/isc/inet_pton.c \
+ $(srcdir)/../lib/isc/unix/interfaceiter.c \
+ $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
+ $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
+ $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
+ $(srcdir)/../lib/isc/netscope.c \
+ $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
+ $(srcdir)/../lib/isc/result.c \
+ $(srcdir)/../lib/isc/unix/stdio.c \
+ $(srcdir)/../lib/isc/unix/stdtime.c \
+ $(srcdir)/../lib/isc/unix/strerror.c \
+ $(srcdir)/../lib/isc/task.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
+ $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
+ $(srcdir)/../lib/isc/sockaddr.c \
+ $(srcdir)/../lib/isc/pthreads/mutex.c
+am_libntpsim_a_OBJECTS = systime_s.$(OBJEXT) $(am__objects_4)
libntpsim_a_OBJECTS = $(am_libntpsim_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES) \
$(libntpsim_a_SOURCES)
-DIST_SOURCES = $(libntp_a_SOURCES) $(EXTRA_libntp_a_SOURCES) \
- $(libntpsim_a_SOURCES)
+DIST_SOURCES = $(am__libntp_a_SOURCES_DIST) $(EXTRA_libntp_a_SOURCES) \
+ $(am__libntpsim_a_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -144,21 +284,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -166,6 +316,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -184,14 +335,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -204,10 +409,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -215,9 +422,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -226,6 +451,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -274,12 +500,34 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
BUILT_SOURCES = .deps-ver
CLEANFILES = .deps-ver
noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@
EXTRA_LIBRARIES = libntpsim.a
+libisc_SRCS = $(srcdir)/../lib/isc/assertions.c \
+ $(srcdir)/../lib/isc/buffer.c \
+ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
+ $(srcdir)/../lib/isc/backtrace.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c \
+ $(srcdir)/../lib/isc/unix/dir.c $(srcdir)/../lib/isc/error.c \
+ $(srcdir)/../lib/isc/unix/errno2result.c \
+ $(srcdir)/../lib/isc/event.c $(srcdir)/../lib/isc/unix/file.c \
+ $(srcdir)/../lib/isc/inet_ntop.c \
+ $(srcdir)/../lib/isc/inet_pton.c \
+ $(srcdir)/../lib/isc/unix/interfaceiter.c \
+ $(srcdir)/../lib/isc/lib.c $(srcdir)/../lib/isc/log.c \
+ $(srcdir)/../lib/isc/md5.c $(srcdir)/../lib/isc/nls/msgcat.c \
+ $(srcdir)/../lib/isc/unix/net.c $(srcdir)/../lib/isc/netaddr.c \
+ $(srcdir)/../lib/isc/netscope.c \
+ $(srcdir)/../lib/isc/ondestroy.c $(srcdir)/../lib/isc/random.c \
+ $(srcdir)/../lib/isc/result.c \
+ $(srcdir)/../lib/isc/unix/stdio.c \
+ $(srcdir)/../lib/isc/unix/stdtime.c \
+ $(srcdir)/../lib/isc/unix/strerror.c \
+ $(srcdir)/../lib/isc/task.c \
+ $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c \
+ $(srcdir)/../lib/isc/unix/time.c $(srcdir)/../lib/isc/sha1.c \
+ $(srcdir)/../lib/isc/sockaddr.c $(NULL) $(am__append_1)
libntp_a_SRCS = \
a_md5encrypt.c \
adjtime.c \
@@ -302,95 +550,67 @@ libntp_a_SRCS = \
dolfptoa.c \
emalloc.c \
findconfig.c \
- fptoa.c \
- fptoms.c \
getopt.c \
hextoint.c \
hextolfp.c \
humandate.c \
icom.c \
- inttoa.c \
iosignal.c \
lib_strbuf.c \
machines.c \
- memmove.c \
- mfptoa.c \
- ntp_lineedit.c \
- mfptoms.c \
mktime.c \
modetoa.c \
mstolfp.c \
- msutotsf.c \
msyslog.c \
netof.c \
+ ntp_calendar.c \
+ ntp_crypto_rnd.c \
+ ntp_intres.c \
ntp_libopts.c \
+ ntp_lineedit.c \
+ ntp_random.c \
ntp_rfc2553.c \
+ ntp_worker.c \
numtoa.c \
numtohost.c \
octtoint.c \
prettydate.c \
- ntp_random.c \
recvbuff.c \
refnumtoa.c \
snprintf.c \
+ socket.c \
socktoa.c \
socktohost.c \
ssl_init.c \
statestr.c \
strdup.c \
- strstr.c \
+ strl_obsd.c \
syssignal.c \
- tsftomsu.c \
- tstotv.c \
- tvtots.c \
+ timetoa.c \
+ timevalops.c \
uglydate.c \
- uinttoa.c \
+ vint64ops.c \
+ work_fork.c \
+ work_thread.c \
ymd2yd.c \
- $(srcdir)/../lib/isc/assertions.c \
- $(srcdir)/../lib/isc/buffer.c \
- $(srcdir)/../lib/isc/nothreads/condition.c \
- $(srcdir)/../lib/isc/unix/dir.c \
- $(srcdir)/../lib/isc/error.c \
- $(srcdir)/../lib/isc/unix/errno2result.c \
- $(srcdir)/../lib/isc/event.c \
- $(srcdir)/../lib/isc/unix/file.c \
- $(srcdir)/../lib/isc/inet_ntop.c \
- $(srcdir)/../lib/isc/inet_pton.c \
- $(srcdir)/../lib/isc/unix/interfaceiter.c \
- $(srcdir)/../lib/isc/lib.c \
- $(srcdir)/../lib/isc/log.c \
- $(srcdir)/../lib/isc/md5.c \
- $(srcdir)/../lib/isc/nls/msgcat.c \
- $(srcdir)/../lib/isc/unix/net.c \
- $(srcdir)/../lib/isc/netaddr.c \
- $(srcdir)/../lib/isc/netscope.c \
- $(srcdir)/../lib/isc/ondestroy.c \
- $(srcdir)/../lib/isc/random.c \
- $(srcdir)/../lib/isc/result.c \
- $(srcdir)/../lib/isc/unix/stdio.c \
- $(srcdir)/../lib/isc/unix/stdtime.c \
- $(srcdir)/../lib/isc/unix/strerror.c \
- $(srcdir)/../lib/isc/task.c \
- $(srcdir)/../lib/isc/nothreads/thread.c \
- $(srcdir)/../lib/isc/unix/time.c \
- $(srcdir)/../lib/isc/sockaddr.c \
+ $(libisc_SRCS) \
$(NULL)
libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
EXTRA_libntp_a_SOURCES = adjtimex.c
-ETAGS_ARGS = Makefile.am
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
-
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
EXTRA_DIST = README
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -424,13 +644,13 @@ $(am__aclocal_m4_deps):
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
+ $(AM_V_at)-rm -f libntp.a
+ $(AM_V_AR)$(libntp_a_AR) libntp.a $(libntp_a_OBJECTS) $(libntp_a_LIBADD)
+ $(AM_V_at)$(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
+ $(AM_V_at)-rm -f libntpsim.a
+ $(AM_V_AR)$(libntpsim_a_AR) libntpsim.a $(libntpsim_a_OBJECTS) $(libntpsim_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libntpsim.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -449,6 +669,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authreadkeys.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authusekey.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace-emptytbl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_strerror.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots.Po@am__quote@
@@ -468,8 +690,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findconfig.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fptoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fptoms.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp.Po@am__quote@
@@ -478,30 +698,30 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interfaceiter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttoa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iosignal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_strbuf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machines.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmove.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfptoa.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfptoms.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgcat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mstolfp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msutotsf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netaddr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netscope.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto_rnd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_libopts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_lineedit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_random.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_rfc2553.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_worker.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@
@@ -511,8 +731,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockaddr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktohost.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl_init.Po@am__quote@
@@ -521,433 +743,557 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdtime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strl_obsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syssignal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systime_s.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsftomsu.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstotv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_fork.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_thread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
assertions.o: $(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.o -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.o `test -f '$(srcdir)/../lib/isc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.o -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.o `test -f '$(srcdir)/../lib/isc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/assertions.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/assertions.c' object='assertions.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o assertions.o `test -f '$(srcdir)/../lib/isc/assertions.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/assertions.c
assertions.obj: $(srcdir)/../lib/isc/assertions.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.obj -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.obj `if test -f '$(srcdir)/../lib/isc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/assertions.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT assertions.obj -MD -MP -MF $(DEPDIR)/assertions.Tpo -c -o assertions.obj `if test -f '$(srcdir)/../lib/isc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/assertions.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/assertions.Tpo $(DEPDIR)/assertions.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/assertions.c' object='assertions.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/assertions.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/assertions.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/assertions.c'; fi`
buffer.o: $(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.o -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.o `test -f '$(srcdir)/../lib/isc/buffer.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.o -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.o `test -f '$(srcdir)/../lib/isc/buffer.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/buffer.c' object='buffer.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buffer.o `test -f '$(srcdir)/../lib/isc/buffer.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/buffer.c
buffer.obj: $(srcdir)/../lib/isc/buffer.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.obj -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.obj `if test -f '$(srcdir)/../lib/isc/buffer.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/buffer.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/buffer.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT buffer.obj -MD -MP -MF $(DEPDIR)/buffer.Tpo -c -o buffer.obj `if test -f '$(srcdir)/../lib/isc/buffer.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/buffer.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/buffer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/buffer.Tpo $(DEPDIR)/buffer.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/buffer.c' object='buffer.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o buffer.obj `if test -f '$(srcdir)/../lib/isc/buffer.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/buffer.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/buffer.c'; fi`
-condition.o: $(srcdir)/../lib/isc/nothreads/condition.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.o -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.o `test -f '$(srcdir)/../lib/isc/nothreads/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nothreads/condition.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nothreads/condition.c' object='condition.o' libtool=no @AMDEPBACKSLASH@
+backtrace-emptytbl.o: $(srcdir)/../lib/isc/backtrace-emptytbl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace-emptytbl.o -MD -MP -MF $(DEPDIR)/backtrace-emptytbl.Tpo -c -o backtrace-emptytbl.o `test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace-emptytbl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace-emptytbl.Tpo $(DEPDIR)/backtrace-emptytbl.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/backtrace-emptytbl.c' object='backtrace-emptytbl.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.o `test -f '$(srcdir)/../lib/isc/nothreads/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nothreads/condition.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace-emptytbl.o `test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace-emptytbl.c
-condition.obj: $(srcdir)/../lib/isc/nothreads/condition.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.obj -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/nothreads/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nothreads/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nothreads/condition.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nothreads/condition.c' object='condition.obj' libtool=no @AMDEPBACKSLASH@
+backtrace-emptytbl.obj: $(srcdir)/../lib/isc/backtrace-emptytbl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace-emptytbl.obj -MD -MP -MF $(DEPDIR)/backtrace-emptytbl.Tpo -c -o backtrace-emptytbl.obj `if test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace-emptytbl.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace-emptytbl.Tpo $(DEPDIR)/backtrace-emptytbl.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/backtrace-emptytbl.c' object='backtrace-emptytbl.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/nothreads/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nothreads/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nothreads/condition.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace-emptytbl.obj `if test -f '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace-emptytbl.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace-emptytbl.c'; fi`
+
+backtrace.o: $(srcdir)/../lib/isc/backtrace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace.o -MD -MP -MF $(DEPDIR)/backtrace.Tpo -c -o backtrace.o `test -f '$(srcdir)/../lib/isc/backtrace.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace.Tpo $(DEPDIR)/backtrace.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/backtrace.c' object='backtrace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace.o `test -f '$(srcdir)/../lib/isc/backtrace.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/backtrace.c
+
+backtrace.obj: $(srcdir)/../lib/isc/backtrace.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT backtrace.obj -MD -MP -MF $(DEPDIR)/backtrace.Tpo -c -o backtrace.obj `if test -f '$(srcdir)/../lib/isc/backtrace.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/backtrace.Tpo $(DEPDIR)/backtrace.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/backtrace.c' object='backtrace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o backtrace.obj `if test -f '$(srcdir)/../lib/isc/backtrace.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/backtrace.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/backtrace.c'; fi`
+
+condition.o: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.o -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' object='condition.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
+
+condition.obj: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT condition.obj -MD -MP -MF $(DEPDIR)/condition.Tpo -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/condition.Tpo $(DEPDIR)/condition.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c' object='condition.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o condition.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/condition.c'; fi`
dir.o: $(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.o -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.o `test -f '$(srcdir)/../lib/isc/unix/dir.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.o -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.o `test -f '$(srcdir)/../lib/isc/unix/dir.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/dir.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/dir.c' object='dir.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dir.o `test -f '$(srcdir)/../lib/isc/unix/dir.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/dir.c
dir.obj: $(srcdir)/../lib/isc/unix/dir.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.obj -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.obj `if test -f '$(srcdir)/../lib/isc/unix/dir.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/dir.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/dir.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dir.obj -MD -MP -MF $(DEPDIR)/dir.Tpo -c -o dir.obj `if test -f '$(srcdir)/../lib/isc/unix/dir.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/dir.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/dir.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dir.Tpo $(DEPDIR)/dir.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/dir.c' object='dir.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dir.obj `if test -f '$(srcdir)/../lib/isc/unix/dir.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/dir.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/dir.c'; fi`
error.o: $(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.o -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.o `test -f '$(srcdir)/../lib/isc/error.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.o -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.o `test -f '$(srcdir)/../lib/isc/error.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/error.c' object='error.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o error.o `test -f '$(srcdir)/../lib/isc/error.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/error.c
error.obj: $(srcdir)/../lib/isc/error.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.obj -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.obj `if test -f '$(srcdir)/../lib/isc/error.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/error.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT error.obj -MD -MP -MF $(DEPDIR)/error.Tpo -c -o error.obj `if test -f '$(srcdir)/../lib/isc/error.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/error.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/error.Tpo $(DEPDIR)/error.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/error.c' object='error.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/error.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/error.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/error.c'; fi`
errno2result.o: $(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.o -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.o `test -f '$(srcdir)/../lib/isc/unix/errno2result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.o -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.o `test -f '$(srcdir)/../lib/isc/unix/errno2result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/errno2result.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/errno2result.c' object='errno2result.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o errno2result.o `test -f '$(srcdir)/../lib/isc/unix/errno2result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/errno2result.c
errno2result.obj: $(srcdir)/../lib/isc/unix/errno2result.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.obj -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.obj `if test -f '$(srcdir)/../lib/isc/unix/errno2result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/errno2result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/errno2result.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT errno2result.obj -MD -MP -MF $(DEPDIR)/errno2result.Tpo -c -o errno2result.obj `if test -f '$(srcdir)/../lib/isc/unix/errno2result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/errno2result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/errno2result.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/errno2result.Tpo $(DEPDIR)/errno2result.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/errno2result.c' object='errno2result.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o errno2result.obj `if test -f '$(srcdir)/../lib/isc/unix/errno2result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/errno2result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/errno2result.c'; fi`
event.o: $(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.o -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.o `test -f '$(srcdir)/../lib/isc/event.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.o -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.o `test -f '$(srcdir)/../lib/isc/event.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/event.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/event.c' object='event.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o event.o `test -f '$(srcdir)/../lib/isc/event.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/event.c
event.obj: $(srcdir)/../lib/isc/event.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.obj -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.obj `if test -f '$(srcdir)/../lib/isc/event.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/event.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/event.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT event.obj -MD -MP -MF $(DEPDIR)/event.Tpo -c -o event.obj `if test -f '$(srcdir)/../lib/isc/event.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/event.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/event.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/event.Tpo $(DEPDIR)/event.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/event.c' object='event.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o event.obj `if test -f '$(srcdir)/../lib/isc/event.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/event.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/event.c'; fi`
file.o: $(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.o -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.o `test -f '$(srcdir)/../lib/isc/unix/file.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.o -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.o `test -f '$(srcdir)/../lib/isc/unix/file.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/file.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/file.c' object='file.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o file.o `test -f '$(srcdir)/../lib/isc/unix/file.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/file.c
file.obj: $(srcdir)/../lib/isc/unix/file.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.obj -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.obj `if test -f '$(srcdir)/../lib/isc/unix/file.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/file.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/file.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT file.obj -MD -MP -MF $(DEPDIR)/file.Tpo -c -o file.obj `if test -f '$(srcdir)/../lib/isc/unix/file.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/file.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/file.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/file.Tpo $(DEPDIR)/file.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/file.c' object='file.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o file.obj `if test -f '$(srcdir)/../lib/isc/unix/file.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/file.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/file.c'; fi`
inet_ntop.o: $(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.o -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.o `test -f '$(srcdir)/../lib/isc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.o -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.o `test -f '$(srcdir)/../lib/isc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_ntop.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/inet_ntop.c' object='inet_ntop.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/inet_ntop.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_ntop.c
inet_ntop.obj: $(srcdir)/../lib/isc/inet_ntop.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.obj -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.obj `if test -f '$(srcdir)/../lib/isc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_ntop.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_ntop.obj -MD -MP -MF $(DEPDIR)/inet_ntop.Tpo -c -o inet_ntop.obj `if test -f '$(srcdir)/../lib/isc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_ntop.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_ntop.Tpo $(DEPDIR)/inet_ntop.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/inet_ntop.c' object='inet_ntop.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/inet_ntop.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_ntop.c'; fi`
inet_pton.o: $(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.o -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.o `test -f '$(srcdir)/../lib/isc/inet_pton.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.o -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.o `test -f '$(srcdir)/../lib/isc/inet_pton.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_pton.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/inet_pton.c' object='inet_pton.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_pton.o `test -f '$(srcdir)/../lib/isc/inet_pton.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/inet_pton.c
inet_pton.obj: $(srcdir)/../lib/isc/inet_pton.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.obj -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.obj `if test -f '$(srcdir)/../lib/isc/inet_pton.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_pton.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT inet_pton.obj -MD -MP -MF $(DEPDIR)/inet_pton.Tpo -c -o inet_pton.obj `if test -f '$(srcdir)/../lib/isc/inet_pton.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_pton.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/inet_pton.Tpo $(DEPDIR)/inet_pton.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/inet_pton.c' object='inet_pton.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o inet_pton.obj `if test -f '$(srcdir)/../lib/isc/inet_pton.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/inet_pton.c'; fi`
interfaceiter.o: $(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.o -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.o `test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.o -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.o `test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/interfaceiter.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/interfaceiter.c' object='interfaceiter.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interfaceiter.o `test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/interfaceiter.c
interfaceiter.obj: $(srcdir)/../lib/isc/unix/interfaceiter.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.obj -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.obj `if test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/interfaceiter.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interfaceiter.obj -MD -MP -MF $(DEPDIR)/interfaceiter.Tpo -c -o interfaceiter.obj `if test -f '$(srcdir)/../lib/isc/unix/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/interfaceiter.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/interfaceiter.Tpo $(DEPDIR)/interfaceiter.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/interfaceiter.c' object='interfaceiter.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/unix/interfaceiter.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/interfaceiter.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/interfaceiter.c'; fi`
lib.o: $(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.o -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.o `test -f '$(srcdir)/../lib/isc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.o -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.o `test -f '$(srcdir)/../lib/isc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/lib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/lib.c' object='lib.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib.o `test -f '$(srcdir)/../lib/isc/lib.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/lib.c
lib.obj: $(srcdir)/../lib/isc/lib.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.obj -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.obj `if test -f '$(srcdir)/../lib/isc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/lib.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib.obj -MD -MP -MF $(DEPDIR)/lib.Tpo -c -o lib.obj `if test -f '$(srcdir)/../lib/isc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/lib.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lib.Tpo $(DEPDIR)/lib.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/lib.c' object='lib.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/lib.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/lib.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/lib.c'; fi`
log.o: $(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.o -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.o `test -f '$(srcdir)/../lib/isc/log.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.o -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.o `test -f '$(srcdir)/../lib/isc/log.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/log.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/log.c' object='log.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.o `test -f '$(srcdir)/../lib/isc/log.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/log.c
log.obj: $(srcdir)/../lib/isc/log.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.obj -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.obj `if test -f '$(srcdir)/../lib/isc/log.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/log.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/log.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT log.obj -MD -MP -MF $(DEPDIR)/log.Tpo -c -o log.obj `if test -f '$(srcdir)/../lib/isc/log.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/log.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/log.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/log.Tpo $(DEPDIR)/log.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/log.c' object='log.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.obj `if test -f '$(srcdir)/../lib/isc/log.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/log.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/log.c'; fi`
md5.o: $(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.o -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.o `test -f '$(srcdir)/../lib/isc/md5.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.o -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.o `test -f '$(srcdir)/../lib/isc/md5.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/md5.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/md5.c' object='md5.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.o `test -f '$(srcdir)/../lib/isc/md5.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/md5.c
md5.obj: $(srcdir)/../lib/isc/md5.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.obj -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.obj `if test -f '$(srcdir)/../lib/isc/md5.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/md5.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5.obj -MD -MP -MF $(DEPDIR)/md5.Tpo -c -o md5.obj `if test -f '$(srcdir)/../lib/isc/md5.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/md5.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/md5.Tpo $(DEPDIR)/md5.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/md5.c' object='md5.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5.obj `if test -f '$(srcdir)/../lib/isc/md5.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/md5.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/md5.c'; fi`
msgcat.o: $(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.o -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.o `test -f '$(srcdir)/../lib/isc/nls/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.o -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.o `test -f '$(srcdir)/../lib/isc/nls/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nls/msgcat.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nls/msgcat.c' object='msgcat.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msgcat.o `test -f '$(srcdir)/../lib/isc/nls/msgcat.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nls/msgcat.c
msgcat.obj: $(srcdir)/../lib/isc/nls/msgcat.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.obj -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.obj `if test -f '$(srcdir)/../lib/isc/nls/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nls/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nls/msgcat.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT msgcat.obj -MD -MP -MF $(DEPDIR)/msgcat.Tpo -c -o msgcat.obj `if test -f '$(srcdir)/../lib/isc/nls/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nls/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nls/msgcat.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/msgcat.Tpo $(DEPDIR)/msgcat.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nls/msgcat.c' object='msgcat.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/nls/msgcat.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nls/msgcat.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nls/msgcat.c'; fi`
net.o: $(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.o -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.o `test -f '$(srcdir)/../lib/isc/unix/net.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.o -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.o `test -f '$(srcdir)/../lib/isc/unix/net.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/net.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/net.c' object='net.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o net.o `test -f '$(srcdir)/../lib/isc/unix/net.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/net.c
net.obj: $(srcdir)/../lib/isc/unix/net.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.obj -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.obj `if test -f '$(srcdir)/../lib/isc/unix/net.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/net.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT net.obj -MD -MP -MF $(DEPDIR)/net.Tpo -c -o net.obj `if test -f '$(srcdir)/../lib/isc/unix/net.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/net.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/net.Tpo $(DEPDIR)/net.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/net.c' object='net.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(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)/../lib/isc/unix/net.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/net.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/net.c'; fi`
netaddr.o: $(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.o -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.o `test -f '$(srcdir)/../lib/isc/netaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.o -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.o `test -f '$(srcdir)/../lib/isc/netaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netaddr.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/netaddr.c' object='netaddr.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netaddr.o `test -f '$(srcdir)/../lib/isc/netaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netaddr.c
netaddr.obj: $(srcdir)/../lib/isc/netaddr.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.obj -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.obj `if test -f '$(srcdir)/../lib/isc/netaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netaddr.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netaddr.obj -MD -MP -MF $(DEPDIR)/netaddr.Tpo -c -o netaddr.obj `if test -f '$(srcdir)/../lib/isc/netaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netaddr.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netaddr.Tpo $(DEPDIR)/netaddr.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/netaddr.c' object='netaddr.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netaddr.obj `if test -f '$(srcdir)/../lib/isc/netaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netaddr.c'; fi`
netscope.o: $(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.o -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.o `test -f '$(srcdir)/../lib/isc/netscope.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.o -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.o `test -f '$(srcdir)/../lib/isc/netscope.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netscope.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/netscope.c' object='netscope.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netscope.o `test -f '$(srcdir)/../lib/isc/netscope.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/netscope.c
netscope.obj: $(srcdir)/../lib/isc/netscope.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.obj -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.obj `if test -f '$(srcdir)/../lib/isc/netscope.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netscope.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netscope.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT netscope.obj -MD -MP -MF $(DEPDIR)/netscope.Tpo -c -o netscope.obj `if test -f '$(srcdir)/../lib/isc/netscope.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netscope.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netscope.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/netscope.Tpo $(DEPDIR)/netscope.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/netscope.c' object='netscope.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o netscope.obj `if test -f '$(srcdir)/../lib/isc/netscope.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/netscope.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/netscope.c'; fi`
ondestroy.o: $(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.o -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.o `test -f '$(srcdir)/../lib/isc/ondestroy.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.o -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.o `test -f '$(srcdir)/../lib/isc/ondestroy.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/ondestroy.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/ondestroy.c' object='ondestroy.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ondestroy.o `test -f '$(srcdir)/../lib/isc/ondestroy.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/ondestroy.c
ondestroy.obj: $(srcdir)/../lib/isc/ondestroy.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.obj -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.obj `if test -f '$(srcdir)/../lib/isc/ondestroy.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/ondestroy.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/ondestroy.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ondestroy.obj -MD -MP -MF $(DEPDIR)/ondestroy.Tpo -c -o ondestroy.obj `if test -f '$(srcdir)/../lib/isc/ondestroy.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/ondestroy.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/ondestroy.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ondestroy.Tpo $(DEPDIR)/ondestroy.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/ondestroy.c' object='ondestroy.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ondestroy.obj `if test -f '$(srcdir)/../lib/isc/ondestroy.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/ondestroy.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/ondestroy.c'; fi`
random.o: $(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.o -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.o `test -f '$(srcdir)/../lib/isc/random.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.o -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.o `test -f '$(srcdir)/../lib/isc/random.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/random.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/random.c' object='random.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.o `test -f '$(srcdir)/../lib/isc/random.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/random.c
random.obj: $(srcdir)/../lib/isc/random.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.obj -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.obj `if test -f '$(srcdir)/../lib/isc/random.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/random.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/random.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT random.obj -MD -MP -MF $(DEPDIR)/random.Tpo -c -o random.obj `if test -f '$(srcdir)/../lib/isc/random.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/random.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/random.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/random.Tpo $(DEPDIR)/random.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/random.c' object='random.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.obj `if test -f '$(srcdir)/../lib/isc/random.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/random.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/random.c'; fi`
result.o: $(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.o -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.o `test -f '$(srcdir)/../lib/isc/result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.o -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.o `test -f '$(srcdir)/../lib/isc/result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/result.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/result.c' object='result.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o result.o `test -f '$(srcdir)/../lib/isc/result.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/result.c
result.obj: $(srcdir)/../lib/isc/result.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.obj -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.obj `if test -f '$(srcdir)/../lib/isc/result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/result.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT result.obj -MD -MP -MF $(DEPDIR)/result.Tpo -c -o result.obj `if test -f '$(srcdir)/../lib/isc/result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/result.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/result.Tpo $(DEPDIR)/result.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/result.c' object='result.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o result.obj `if test -f '$(srcdir)/../lib/isc/result.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/result.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/result.c'; fi`
stdio.o: $(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.o -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.o `test -f '$(srcdir)/../lib/isc/unix/stdio.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.o -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.o `test -f '$(srcdir)/../lib/isc/unix/stdio.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdio.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/stdio.c' object='stdio.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio.o `test -f '$(srcdir)/../lib/isc/unix/stdio.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdio.c
stdio.obj: $(srcdir)/../lib/isc/unix/stdio.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.obj -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.obj `if test -f '$(srcdir)/../lib/isc/unix/stdio.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdio.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdio.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio.obj -MD -MP -MF $(DEPDIR)/stdio.Tpo -c -o stdio.obj `if test -f '$(srcdir)/../lib/isc/unix/stdio.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdio.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdio.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdio.Tpo $(DEPDIR)/stdio.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/stdio.c' object='stdio.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio.obj `if test -f '$(srcdir)/../lib/isc/unix/stdio.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdio.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdio.c'; fi`
stdtime.o: $(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.o -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.o `test -f '$(srcdir)/../lib/isc/unix/stdtime.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.o -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.o `test -f '$(srcdir)/../lib/isc/unix/stdtime.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdtime.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/stdtime.c' object='stdtime.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdtime.o `test -f '$(srcdir)/../lib/isc/unix/stdtime.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/stdtime.c
stdtime.obj: $(srcdir)/../lib/isc/unix/stdtime.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.obj -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.obj `if test -f '$(srcdir)/../lib/isc/unix/stdtime.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdtime.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdtime.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdtime.obj -MD -MP -MF $(DEPDIR)/stdtime.Tpo -c -o stdtime.obj `if test -f '$(srcdir)/../lib/isc/unix/stdtime.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdtime.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdtime.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stdtime.Tpo $(DEPDIR)/stdtime.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/stdtime.c' object='stdtime.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdtime.obj `if test -f '$(srcdir)/../lib/isc/unix/stdtime.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/stdtime.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/stdtime.c'; fi`
strerror.o: $(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.o -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.o `test -f '$(srcdir)/../lib/isc/unix/strerror.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.o -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.o `test -f '$(srcdir)/../lib/isc/unix/strerror.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/strerror.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/strerror.c' object='strerror.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strerror.o `test -f '$(srcdir)/../lib/isc/unix/strerror.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/strerror.c
strerror.obj: $(srcdir)/../lib/isc/unix/strerror.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.obj -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.obj `if test -f '$(srcdir)/../lib/isc/unix/strerror.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/strerror.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT strerror.obj -MD -MP -MF $(DEPDIR)/strerror.Tpo -c -o strerror.obj `if test -f '$(srcdir)/../lib/isc/unix/strerror.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/strerror.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strerror.Tpo $(DEPDIR)/strerror.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/strerror.c' object='strerror.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strerror.obj `if test -f '$(srcdir)/../lib/isc/unix/strerror.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/strerror.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/strerror.c'; fi`
task.o: $(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.o -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.o `test -f '$(srcdir)/../lib/isc/task.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.o -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.o `test -f '$(srcdir)/../lib/isc/task.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/task.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/task.c' object='task.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task.o `test -f '$(srcdir)/../lib/isc/task.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/task.c
task.obj: $(srcdir)/../lib/isc/task.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.obj -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.obj `if test -f '$(srcdir)/../lib/isc/task.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/task.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/task.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task.obj -MD -MP -MF $(DEPDIR)/task.Tpo -c -o task.obj `if test -f '$(srcdir)/../lib/isc/task.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/task.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/task.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/task.Tpo $(DEPDIR)/task.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/task.c' object='task.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task.obj `if test -f '$(srcdir)/../lib/isc/task.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/task.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/task.c'; fi`
-thread.o: $(srcdir)/../lib/isc/nothreads/thread.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.o -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.o `test -f '$(srcdir)/../lib/isc/nothreads/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nothreads/thread.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nothreads/thread.c' object='thread.o' libtool=no @AMDEPBACKSLASH@
+thread.o: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.o -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' object='thread.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.o `test -f '$(srcdir)/../lib/isc/nothreads/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/nothreads/thread.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.o `test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
-thread.obj: $(srcdir)/../lib/isc/nothreads/thread.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.obj -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/nothreads/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nothreads/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nothreads/thread.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/nothreads/thread.c' object='thread.obj' libtool=no @AMDEPBACKSLASH@
+thread.obj: $(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT thread.obj -MD -MP -MF $(DEPDIR)/thread.Tpo -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/thread.Tpo $(DEPDIR)/thread.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c' object='thread.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/nothreads/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/nothreads/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/nothreads/thread.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o thread.obj `if test -f '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/thread.c'; fi`
time.o: $(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.o -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.o `test -f '$(srcdir)/../lib/isc/unix/time.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.o -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.o `test -f '$(srcdir)/../lib/isc/unix/time.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/time.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/time.c' object='time.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.o `test -f '$(srcdir)/../lib/isc/unix/time.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/unix/time.c
time.obj: $(srcdir)/../lib/isc/unix/time.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.obj -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.obj `if test -f '$(srcdir)/../lib/isc/unix/time.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/time.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/time.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT time.obj -MD -MP -MF $(DEPDIR)/time.Tpo -c -o time.obj `if test -f '$(srcdir)/../lib/isc/unix/time.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/time.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/time.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/time.Tpo $(DEPDIR)/time.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/unix/time.c' object='time.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.obj `if test -f '$(srcdir)/../lib/isc/unix/time.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/unix/time.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/unix/time.c'; fi`
+sha1.o: $(srcdir)/../lib/isc/sha1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.o -MD -MP -MF $(DEPDIR)/sha1.Tpo -c -o sha1.o `test -f '$(srcdir)/../lib/isc/sha1.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sha1.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/sha1.c' object='sha1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.o `test -f '$(srcdir)/../lib/isc/sha1.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sha1.c
+
+sha1.obj: $(srcdir)/../lib/isc/sha1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.obj -MD -MP -MF $(DEPDIR)/sha1.Tpo -c -o sha1.obj `if test -f '$(srcdir)/../lib/isc/sha1.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sha1.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sha1.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/sha1.c' object='sha1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.obj `if test -f '$(srcdir)/../lib/isc/sha1.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sha1.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sha1.c'; fi`
+
sockaddr.o: $(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.o -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.o `test -f '$(srcdir)/../lib/isc/sockaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.o -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.o `test -f '$(srcdir)/../lib/isc/sockaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sockaddr.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/sockaddr.c' object='sockaddr.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sockaddr.o `test -f '$(srcdir)/../lib/isc/sockaddr.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/sockaddr.c
sockaddr.obj: $(srcdir)/../lib/isc/sockaddr.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.obj -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.obj `if test -f '$(srcdir)/../lib/isc/sockaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sockaddr.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sockaddr.obj -MD -MP -MF $(DEPDIR)/sockaddr.Tpo -c -o sockaddr.obj `if test -f '$(srcdir)/../lib/isc/sockaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sockaddr.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sockaddr.Tpo $(DEPDIR)/sockaddr.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/sockaddr.c' object='sockaddr.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sockaddr.obj `if test -f '$(srcdir)/../lib/isc/sockaddr.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/sockaddr.c'; fi`
+mutex.o: $(srcdir)/../lib/isc/pthreads/mutex.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mutex.o -MD -MP -MF $(DEPDIR)/mutex.Tpo -c -o mutex.o `test -f '$(srcdir)/../lib/isc/pthreads/mutex.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/pthreads/mutex.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mutex.Tpo $(DEPDIR)/mutex.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/pthreads/mutex.c' object='mutex.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mutex.o `test -f '$(srcdir)/../lib/isc/pthreads/mutex.c' || echo '$(srcdir)/'`$(srcdir)/../lib/isc/pthreads/mutex.c
+
+mutex.obj: $(srcdir)/../lib/isc/pthreads/mutex.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mutex.obj -MD -MP -MF $(DEPDIR)/mutex.Tpo -c -o mutex.obj `if test -f '$(srcdir)/../lib/isc/pthreads/mutex.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/pthreads/mutex.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/pthreads/mutex.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mutex.Tpo $(DEPDIR)/mutex.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../lib/isc/pthreads/mutex.c' object='mutex.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mutex.obj `if test -f '$(srcdir)/../lib/isc/pthreads/mutex.c'; then $(CYGPATH_W) '$(srcdir)/../lib/isc/pthreads/mutex.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../lib/isc/pthreads/mutex.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1161,7 +1507,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1170,17 +1516,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -1189,7 +1528,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/libntp/a_md5encrypt.c b/libntp/a_md5encrypt.c
index fe5dbb0d464a..ffabc47c7d09 100644
--- a/libntp/a_md5encrypt.c
+++ b/libntp/a_md5encrypt.c
@@ -9,11 +9,7 @@
#include "ntp_string.h"
#include "ntp_stdlib.h"
#include "ntp.h"
-#ifdef OPENSSL
-# include "openssl/evp.h"
-#else
-# include "ntp_md5.h" /* provides clone of OpenSSL MD5 API */
-#endif
+#include "ntp_md5.h" /* provides OpenSSL digest API */
/*
* MD5authencrypt - generate message digest
@@ -38,8 +34,16 @@ MD5authencrypt(
* was creaded.
*/
INIT_SSL();
+#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x0090700fL
+ if (!EVP_DigestInit(&ctx, EVP_get_digestbynid(type))) {
+ msyslog(LOG_ERR,
+ "MAC encrypt: digest init failed");
+ return (0);
+ }
+#else
EVP_DigestInit(&ctx, EVP_get_digestbynid(type));
- EVP_DigestUpdate(&ctx, key, (u_int)cache_keylen);
+#endif
+ EVP_DigestUpdate(&ctx, key, cache_secretsize);
EVP_DigestUpdate(&ctx, (u_char *)pkt, (u_int)length);
EVP_DigestFinal(&ctx, digest, &len);
memmove((u_char *)pkt + length + 4, digest, len);
@@ -71,8 +75,16 @@ MD5authdecrypt(
* was created.
*/
INIT_SSL();
+#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x0090700fL
+ if (!EVP_DigestInit(&ctx, EVP_get_digestbynid(type))) {
+ msyslog(LOG_ERR,
+ "MAC decrypt: digest init failed");
+ return (0);
+ }
+#else
EVP_DigestInit(&ctx, EVP_get_digestbynid(type));
- EVP_DigestUpdate(&ctx, key, (u_int)cache_keylen);
+#endif
+ EVP_DigestUpdate(&ctx, key, cache_secretsize);
EVP_DigestUpdate(&ctx, (u_char *)pkt, (u_int)length);
EVP_DigestFinal(&ctx, digest, &len);
if ((u_int)size != len + 4) {
@@ -80,7 +92,7 @@ MD5authdecrypt(
"MAC decrypt: MAC length error");
return (0);
}
- return (!memcmp(digest, (char *)pkt + length + 4, len));
+ return !memcmp(digest, (char *)pkt + length + 4, len);
}
/*
@@ -101,10 +113,25 @@ addr2refid(sockaddr_u *addr)
return (NSRCADR(addr));
INIT_SSL();
- EVP_DigestInit(&ctx, EVP_get_digestbynid(NID_md5));
+
+#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x0090700fL
+ EVP_MD_CTX_init(&ctx);
+#ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW
+ /* MD5 is not used as a crypto hash here. */
+ EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
+#endif
+ if (!EVP_DigestInit_ex(&ctx, EVP_md5(), NULL)) {
+ msyslog(LOG_ERR,
+ "MD5 init failed");
+ exit(1);
+ }
+#else
+ EVP_DigestInit(&ctx, EVP_md5());
+#endif
+
EVP_DigestUpdate(&ctx, (u_char *)PSOCK_ADDR6(addr),
sizeof(struct in6_addr));
EVP_DigestFinal(&ctx, digest, &len);
- memcpy(&addr_refid, digest, 4);
+ memcpy(&addr_refid, digest, sizeof(addr_refid));
return (addr_refid);
}
diff --git a/libntp/atoint.c b/libntp/atoint.c
index 46cd96d19cf7..1064b366af16 100644
--- a/libntp/atoint.c
+++ b/libntp/atoint.c
@@ -1,6 +1,7 @@
/*
* atoint - convert an ascii string to a signed long, with error checking
*/
+#include <config.h>
#include <sys/types.h>
#include <ctype.h>
diff --git a/libntp/atolfp.c b/libntp/atolfp.c
index adb67936fe44..4afeb23d33aa 100644
--- a/libntp/atolfp.c
+++ b/libntp/atolfp.c
@@ -1,6 +1,7 @@
/*
* atolfp - convert an ascii string to an l_fp number
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libntp/atouint.c b/libntp/atouint.c
index c25e3a0c51a7..ab86130dfcdc 100644
--- a/libntp/atouint.c
+++ b/libntp/atouint.c
@@ -1,33 +1,40 @@
-/*
- * atouint - convert an ascii string to an unsigned long, with error checking
- */
+#include <config.h>
#include <sys/types.h>
#include <ctype.h>
#include "ntp_types.h"
#include "ntp_stdlib.h"
+/*
+ * atouint() - convert an ascii string representing a whole base 10
+ * number to u_long *uval, returning TRUE if successful.
+ * Does not modify *uval and returns FALSE if str is not
+ * a positive base10 integer or is too large for a u_int32.
+ * this function uses u_long but should use u_int32, and
+ * probably be renamed.
+ */
int
atouint(
const char *str,
u_long *uval
)
{
- register u_long u;
- register const char *cp;
+ u_long u;
+ const char *cp;
cp = str;
- if (*cp == '\0')
- return 0;
+ if ('\0' == *cp)
+ return 0;
u = 0;
- while (*cp != '\0') {
- if (!isdigit((int)*cp))
- return 0;
+ while ('\0' != *cp) {
+ if (!isdigit(*cp))
+ return 0;
if (u > 429496729 || (u == 429496729 && *cp >= '6'))
- return 0; /* overflow */
+ return 0; /* overflow */
+ /* hand-optimized u *= 10; */
u = (u << 3) + (u << 1);
- u += *cp++ - '0'; /* ascii dependent */
+ u += *cp++ - '0'; /* not '\0' */
}
*uval = u;
diff --git a/libntp/audio.c b/libntp/audio.c
index d9af6b51f3bc..2a56619827f4 100644
--- a/libntp/audio.c
+++ b/libntp/audio.c
@@ -176,19 +176,19 @@ audio_config_read(
if (!strncmp(cc, "IDEV", 4) &&
1 == sscanf(ca, "%99s", ab)) {
- strncpy(cf_i_dev, ab, sizeof(cf_i_dev));
+ strlcpy(cf_i_dev, ab, sizeof(cf_i_dev));
printf("idev <%s>\n", ab);
} else if (!strncmp(cc, "CDEV", 4) &&
1 == sscanf(ca, "%99s", ab)) {
- strncpy(cf_c_dev, ab, sizeof(cf_c_dev));
+ strlcpy(cf_c_dev, ab, sizeof(cf_c_dev));
printf("cdev <%s>\n", ab);
} else if (!strncmp(cc, "AGC", 3) &&
1 == sscanf(ca, "%99s", ab)) {
- strncpy(cf_agc, ab, sizeof(cf_agc));
+ strlcpy(cf_agc, ab, sizeof(cf_agc));
printf("agc <%s> %d\n", ab, i);
} else if (!strncmp(cc, "MONITOR", 7) &&
1 == sscanf(ca, "%99s", ab)) {
- strncpy(cf_monitor, ab, sizeof(cf_monitor));
+ strlcpy(cf_monitor, ab, sizeof(cf_monitor));
printf("monitor <%s> %d\n", ab, mixer_name(ab, -1));
}
}
@@ -251,7 +251,7 @@ audio_init(
*/
fd = open(dname, O_RDWR | O_NONBLOCK, 0777);
if (fd < 0) {
- msyslog(LOG_ERR, "audio_init: %s %m\n", dname);
+ msyslog(LOG_ERR, "audio_init: %s %m", dname);
return (fd);
}
@@ -260,7 +260,7 @@ audio_init(
*/
ctl_fd = open(actl, O_RDWR);
if (ctl_fd < 0) {
- msyslog(LOG_ERR, "audio_init: invalid control device <%s>\n",
+ msyslog(LOG_ERR, "audio_init: invalid control device <%s>",
actl);
close(fd);
return(ctl_fd);
@@ -319,7 +319,8 @@ audio_init(
if (cf_agc[0] != '\0') {
int i;
- i = mixer_name(cf_agc, devmask);
+ /* recmask */
+ i = mixer_name(cf_agc, recmask);
if (i >= 0)
agc = MIXER_WRITE(i);
else
@@ -348,7 +349,7 @@ audio_init(
# 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");
+ msyslog(LOG_ERR, "audio: invalid control device parameters");
close(ctl_fd);
close(fd);
return(rval);
diff --git a/libntp/authkeys.c b/libntp/authkeys.c
index b9b76d9e6bcf..7b4427cd2f40 100644
--- a/libntp/authkeys.c
+++ b/libntp/authkeys.c
@@ -5,12 +5,13 @@
# include <config.h>
#endif
+#include <math.h>
#include <stdio.h>
-#include "ntp_types.h"
-#include "ntp_fp.h"
#include "ntp.h"
+#include "ntp_fp.h"
#include "ntpd.h"
+#include "ntp_lists.h"
#include "ntp_string.h"
#include "ntp_malloc.h"
#include "ntp_stdlib.h"
@@ -18,29 +19,57 @@
/*
* Structure to store keys in in the hash table.
*/
+typedef struct savekey symkey;
+
struct savekey {
- struct savekey *next;
- union {
- u_char MD5_key[64]; /* for keys up to to 512 bits */
- } k;
- keyid_t keyid; /* key identifier */
- int type; /* key type */
- u_short flags; /* flags that wave */
- u_long lifetime; /* remaining lifetime */
- int keylen; /* key length */
+ symkey * hlink; /* next in hash bucket */
+ DECL_DLIST_LINK(symkey, llink); /* for overall & free lists */
+ u_char * secret; /* shared secret */
+ u_long lifetime; /* remaining lifetime */
+ keyid_t keyid; /* key identifier */
+ u_short type; /* OpenSSL digest NID */
+ u_short secretsize; /* secret octets */
+ u_short flags; /* KEY_ flags that wave */
};
+/* define the payload region of symkey beyond the list pointers */
+#define symkey_payload secret
+
#define KEY_TRUSTED 0x001 /* this key is trusted */
+#ifdef DEBUG
+typedef struct symkey_alloc_tag symkey_alloc;
+
+struct symkey_alloc_tag {
+ symkey_alloc * link;
+ void * mem; /* enable free() atexit */
+};
+
+symkey_alloc * authallocs;
+#endif /* DEBUG */
+
+static inline u_short auth_log2(double x);
+static void auth_resize_hashtable(void);
+static void allocsymkey(symkey **, keyid_t, u_short,
+ u_short, u_long, u_short, u_char *);
+static void freesymkey(symkey *, symkey **);
+#ifdef DEBUG
+static void free_auth_mem(void);
+#endif
+
+symkey key_listhead; /* list of all in-use keys */;
/*
* 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)
+#define DEF_AUTHHASHSIZE 64
+//#define HASHMASK ((HASHSIZE)-1)
+#define KEYHASH(keyid) ((keyid) & authhashmask)
-struct savekey *key_hash[HASHSIZE];
+int authhashdisabled;
+u_short authhashbuckets = DEF_AUTHHASHSIZE;
+u_short authhashmask = DEF_AUTHHASHSIZE - 1;
+symkey **key_hash;
u_long authkeynotfound; /* keys not found */
u_long authkeylookups; /* calls to lookup keys */
@@ -52,21 +81,21 @@ u_long authencryptions; /* calls to encrypt */
u_long authdecryptions; /* calls to decrypt */
/*
- * Storage for free key structures. We malloc() such things but
+ * Storage for free symkey structures. We malloc() such things but
* never free them.
*/
-struct savekey *authfreekeys;
+symkey *authfreekeys;
int authnumfreekeys;
-#define MEMINC 12 /* number of new free ones to get */
+#define MEMINC 16 /* 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 */
-int cache_type; /* key type */
+u_char *cache_secret; /* secret */
+u_short cache_secretsize; /* secret length */
+int cache_type; /* OpenSSL digest NID */
u_short cache_flags; /* flags that wave */
@@ -76,10 +105,213 @@ u_short cache_flags; /* flags that wave */
void
init_auth(void)
{
+ size_t newalloc;
+
/*
* Initialize hash table and free list
*/
- memset((char *)key_hash, 0, sizeof key_hash);
+ newalloc = authhashbuckets * sizeof(key_hash[0]);
+
+ key_hash = erealloc(key_hash, newalloc);
+ memset(key_hash, '\0', newalloc);
+
+ INIT_DLIST(key_listhead, llink);
+
+#ifdef DEBUG
+ atexit(&free_auth_mem);
+#endif
+}
+
+
+/*
+ * free_auth_mem - assist in leak detection by freeing all dynamic
+ * allocations from this module.
+ */
+#ifdef DEBUG
+static void
+free_auth_mem(void)
+{
+ symkey * sk;
+ symkey_alloc * alloc;
+ symkey_alloc * next_alloc;
+
+ while (NULL != (sk = HEAD_DLIST(key_listhead, llink))) {
+ freesymkey(sk, &key_hash[KEYHASH(sk->keyid)]);
+ }
+ free(key_hash);
+ key_hash = NULL;
+ cache_keyid = 0;
+ cache_flags = 0;
+ for (alloc = authallocs; alloc != NULL; alloc = next_alloc) {
+ next_alloc = alloc->link;
+ free(alloc->mem);
+ }
+ authfreekeys = NULL;
+ authnumfreekeys = 0;
+}
+#endif /* DEBUG */
+
+
+/*
+ * auth_moremem - get some more free key structures
+ */
+void
+auth_moremem(
+ int keycount
+ )
+{
+ symkey * sk;
+ int i;
+#ifdef DEBUG
+ void * base;
+ symkey_alloc * allocrec;
+# define MOREMEM_EXTRA_ALLOC (sizeof(*allocrec))
+#else
+# define MOREMEM_EXTRA_ALLOC (0)
+#endif
+
+ i = (keycount > 0)
+ ? keycount
+ : MEMINC;
+ sk = emalloc_zero(i * sizeof(*sk) + MOREMEM_EXTRA_ALLOC);
+#ifdef DEBUG
+ base = sk;
+#endif
+ authnumfreekeys += i;
+
+ for (; i > 0; i--, sk++) {
+ LINK_SLIST(authfreekeys, sk, llink.f);
+ }
+
+#ifdef DEBUG
+ allocrec = (void *)sk;
+ allocrec->mem = base;
+ LINK_SLIST(authallocs, allocrec, link);
+#endif
+}
+
+
+/*
+ * auth_prealloc_symkeys
+ */
+void
+auth_prealloc_symkeys(
+ int keycount
+ )
+{
+ int allocated;
+ int additional;
+
+ allocated = authnumkeys + authnumfreekeys;
+ additional = keycount - allocated;
+ if (additional > 0)
+ auth_moremem(additional);
+ auth_resize_hashtable();
+}
+
+
+static inline u_short
+auth_log2(double x)
+{
+ return (u_short)(log10(x) / log10(2));
+}
+
+
+/*
+ * auth_resize_hashtable
+ *
+ * Size hash table to average 4 or fewer entries per bucket initially,
+ * within the bounds of at least 4 and no more than 15 bits for the hash
+ * table index. Populate the hash table.
+ */
+static void
+auth_resize_hashtable(void)
+{
+ u_long totalkeys;
+ u_short hashbits;
+ u_short hash;
+ size_t newalloc;
+ symkey * sk;
+
+ totalkeys = authnumkeys + authnumfreekeys;
+ hashbits = auth_log2(totalkeys / 4.0) + 1;
+ hashbits = max(4, hashbits);
+ hashbits = min(15, hashbits);
+
+ authhashbuckets = 1 << hashbits;
+ authhashmask = authhashbuckets - 1;
+ newalloc = authhashbuckets * sizeof(key_hash[0]);
+
+ key_hash = erealloc(key_hash, newalloc);
+ memset(key_hash, '\0', newalloc);
+
+ ITER_DLIST_BEGIN(key_listhead, sk, llink, symkey)
+ hash = KEYHASH(sk->keyid);
+ LINK_SLIST(key_hash[hash], sk, hlink);
+ ITER_DLIST_END()
+}
+
+
+/*
+ * allocsymkey - common code to allocate and link in symkey
+ *
+ * secret must be allocated with a free-compatible allocator. It is
+ * owned by the referring symkey structure, and will be free()d by
+ * freesymkey().
+ */
+static void
+allocsymkey(
+ symkey ** bucket,
+ keyid_t id,
+ u_short flags,
+ u_short type,
+ u_long lifetime,
+ u_short secretsize,
+ u_char * secret
+ )
+{
+ symkey * sk;
+
+ if (authnumfreekeys < 1)
+ auth_moremem(-1);
+ UNLINK_HEAD_SLIST(sk, authfreekeys, llink.f);
+ DEBUG_ENSURE(sk != NULL);
+ sk->keyid = id;
+ sk->flags = flags;
+ sk->type = type;
+ sk->secretsize = secretsize;
+ sk->secret = secret;
+ sk->lifetime = lifetime;
+ LINK_SLIST(*bucket, sk, hlink);
+ LINK_TAIL_DLIST(key_listhead, sk, llink);
+ authnumfreekeys--;
+ authnumkeys++;
+}
+
+
+/*
+ * freesymkey - common code to remove a symkey and recycle its entry.
+ */
+static void
+freesymkey(
+ symkey * sk,
+ symkey ** bucket
+ )
+{
+ symkey * unlinked;
+
+ if (sk->secret != NULL) {
+ memset(sk->secret, '\0', sk->secretsize);
+ free(sk->secret);
+ }
+ UNLINK_SLIST(unlinked, *bucket, sk, hlink, symkey);
+ DEBUG_ENSURE(sk == unlinked);
+ UNLINK_DLIST(sk, llink);
+ memset((char *)sk + offsetof(symkey, symkey_payload), '\0',
+ sizeof(*sk) - offsetof(symkey, symkey_payload));
+ LINK_SLIST(authfreekeys, sk, llink.f);
+ authnumkeys--;
+ authnumfreekeys++;
}
@@ -88,59 +320,60 @@ init_auth(void)
*/
struct savekey *
auth_findkey(
- keyid_t keyno
+ keyid_t id
)
{
- struct savekey *sk;
-
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- return (sk);
+ symkey * sk;
- sk = sk->next;
+ for (sk = key_hash[KEYHASH(id)]; sk != NULL; sk = sk->hlink) {
+ if (id == sk->keyid) {
+ return sk;
+ }
}
- return (0);
+
+ return NULL;
}
/*
- * auth_havekey - return one if the key is known
+ * auth_havekey - return TRUE if the key id is zero or known
*/
int
auth_havekey(
- keyid_t keyno
+ keyid_t id
)
{
- struct savekey *sk;
+ symkey * sk;
- if (keyno == 0 || (keyno == cache_keyid))
- return (1);
-
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- return (1);
+ if (0 == id || cache_keyid == id) {
+ return TRUE;
+ }
- sk = sk->next;
+ for (sk = key_hash[KEYHASH(id)]; sk != NULL; sk = sk->hlink) {
+ if (id == sk->keyid) {
+ return TRUE;
+ }
}
- return (0);
+
+ return FALSE;
}
/*
- * authhavekey - return one and cache the key, if known and trusted.
+ * authhavekey - return TRUE and cache the key, if zero or both known
+ * and trusted.
*/
int
authhavekey(
- keyid_t keyno
+ keyid_t id
)
{
- struct savekey *sk;
+ symkey * sk;
authkeylookups++;
- if (keyno == 0 || keyno == cache_keyid)
- return (1);
+ if (0 == id || cache_keyid == id) {
+ return TRUE;
+ }
/*
* Seach the bin for the key. If found and the key type
@@ -148,30 +381,27 @@ authhavekey(
* a key or key type. In this case consider the key missing.
*/
authkeyuncached++;
- sk = key_hash[KEYHASH(keyno)];
- while (sk != NULL) {
- if (keyno == sk->keyid) {
- if (sk->type == 0) {
+ for (sk = key_hash[KEYHASH(id)]; sk != NULL; sk = sk->hlink) {
+ if (id == sk->keyid) {
+ if (0 == sk->type) {
authkeynotfound++;
- return (0);
+ return FALSE;
}
break;
}
- sk = sk->next;
}
/*
* If the key is not found, or if it is found but not trusted,
* the key is not considered found.
*/
- if (sk == NULL) {
+ if (NULL == sk) {
authkeynotfound++;
- return (0);
-
+ return FALSE;
}
- if (!(sk->flags & KEY_TRUSTED)) {
+ if (!(KEY_TRUSTED & sk->flags)) {
authnokey++;
- return (0);
+ return FALSE;
}
/*
@@ -180,31 +410,10 @@ authhavekey(
cache_keyid = sk->keyid;
cache_type = sk->type;
cache_flags = sk->flags;
- cache_key = sk->k.MD5_key;
- cache_keylen = sk->keylen;
- return (1);
-}
-
-
-/*
- * auth_moremem - get some more free key structures
- */
-int
-auth_moremem(void)
-{
- struct savekey *sk;
- int i;
+ cache_secret = sk->secret;
+ cache_secretsize = sk->secretsize;
- 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);
+ return TRUE;
}
@@ -213,24 +422,24 @@ auth_moremem(void)
*/
void
authtrust(
- keyid_t keyno,
- u_long trust
+ keyid_t id,
+ u_long trust
)
{
- struct savekey *sk;
+ symkey ** bucket;
+ symkey * sk;
+ u_long lifetime;
/*
* Search bin for key; if it does not exist and is untrusted,
* forget it.
*/
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
- if (keyno == sk->keyid)
- break;
-
- sk = sk->next;
+ bucket = &key_hash[KEYHASH(id)];
+ for (sk = *bucket; sk != NULL; sk = sk->hlink) {
+ if (id == sk->keyid)
+ break;
}
- if (sk == 0 && !trust)
+ if (!trust && NULL == sk)
return;
/*
@@ -238,16 +447,15 @@ authtrust(
* exist and is to be trusted or it does exist and is or is
* not to be trusted.
*/
- if (sk != 0) {
- if (cache_keyid == keyno) {
+ if (sk != NULL) {
+ if (cache_keyid == id) {
cache_flags = 0;
cache_keyid = 0;
}
/*
* Key exists. If it is to be trusted, say so and
- * update its lifetime. If not, return it to the
- * free list.
+ * update its lifetime.
*/
if (trust > 0) {
sk->flags |= KEY_TRUSTED;
@@ -257,46 +465,22 @@ authtrust(
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++;
- }
+ /* No longer trusted, return it to the free list. */
+ freesymkey(sk, bucket);
return;
}
/*
- * Here there is not key, but the key is to be trusted. There
- * seems to be a disconnect here. Here we allocate a new key,
- * but do not specify a key type, key or key length.
- */
- if (authnumfreekeys == 0)
- if (auth_moremem() == 0)
- return;
-
- sk = authfreekeys;
- authfreekeys = sk->next;
- authnumfreekeys--;
- sk->keyid = keyno;
- sk->type = 0;
- sk->keylen = 0;
- sk->flags = KEY_TRUSTED;
- sk->next = key_hash[KEYHASH(keyno)];
- key_hash[KEYHASH(keyno)] = sk;
- authnumkeys++;
- return;
+ * keyid is not present, but the is to be trusted. We allocate
+ * a new key, but do not specify a key type or secret.
+ */
+ if (trust > 1) {
+ lifetime = current_time + trust;
+ } else {
+ lifetime = 0;
+ }
+ allocsymkey(bucket, id, KEY_TRUSTED, 0, lifetime, 0, NULL);
}
@@ -305,30 +489,26 @@ authtrust(
*/
int
authistrusted(
- keyid_t keyno
+ keyid_t keyno
)
{
- struct savekey *sk;
+ symkey * sk;
+ symkey ** bucket;
if (keyno == cache_keyid)
- return ((cache_flags & KEY_TRUSTED) != 0);
+ return !!(KEY_TRUSTED & cache_flags);
authkeyuncached++;
- sk = key_hash[KEYHASH(keyno)];
- while (sk != 0) {
+ bucket = &key_hash[KEYHASH(keyno)];
+ for (sk = *bucket; sk != NULL; sk = sk->hlink) {
if (keyno == sk->keyid)
- break;
- sk = sk->next;
+ break;
}
- if (sk == 0) {
+ if (NULL == sk || !(KEY_TRUSTED & sk->flags)) {
authkeynotfound++;
- return (0);
-
- } else if (!(sk->flags & KEY_TRUSTED)) {
- authkeynotfound++;
- return (0);
+ return FALSE;
}
- return (1);
+ return TRUE;
}
@@ -337,25 +517,32 @@ MD5auth_setkey(
keyid_t keyno,
int keytype,
const u_char *key,
- const int len
+ int len
)
{
- struct savekey *sk;
+ symkey * sk;
+ symkey ** bucket;
+ u_char * secret;
+ size_t secretsize;
+ DEBUG_ENSURE(keytype <= USHRT_MAX);
+ DEBUG_ENSURE(len < 4 * 1024);
+ len = max(0, len);
/*
* See if we already have the key. If so just stick in the
* new value.
*/
- sk = key_hash[KEYHASH(keyno)];
- while (sk != NULL) {
+ bucket = &key_hash[KEYHASH(keyno)];
+ for (sk = *bucket; sk != NULL; sk = sk->hlink) {
if (keyno == sk->keyid) {
- sk->type = keytype;
- sk->keylen = min(len, sizeof(sk->k.MD5_key));
+ sk->type = (u_short)keytype;
+ secretsize = len;
+ sk->secretsize = (u_short)secretsize;
#ifndef DISABLE_BUG1243_FIX
- memcpy(sk->k.MD5_key, key, sk->keylen);
+ memcpy(sk->secret, key, secretsize);
#else
- strncpy((char *)sk->k.MD5_key, (const char *)key,
- sizeof(sk->k.MD5_key));
+ strlcpy((char *)sk->secret, (const char *)key,
+ secretsize);
#endif
if (cache_keyid == keyno) {
cache_flags = 0;
@@ -363,117 +550,85 @@ MD5auth_setkey(
}
return;
}
- sk = sk->next;
}
/*
* Need to allocate new structure. Do it.
*/
- if (0 == authnumfreekeys && !auth_moremem())
- return;
-
- sk = authfreekeys;
- authfreekeys = sk->next;
- authnumfreekeys--;
-
- sk->keyid = keyno;
- sk->type = keytype;
- sk->flags = 0;
- sk->lifetime = 0;
- sk->keylen = min(len, sizeof(sk->k.MD5_key));
+ secretsize = len;
+ secret = emalloc(secretsize);
#ifndef DISABLE_BUG1243_FIX
- memcpy(sk->k.MD5_key, key, sk->keylen);
+ memcpy(secret, key, secretsize);
#else
- strncpy((char *)sk->k.MD5_key, (const char *)key,
- sizeof(sk->k.MD5_key));
+ strlcpy((char *)secret, (const char *)key, secretsize);
#endif
- sk->next = key_hash[KEYHASH(keyno)];
- key_hash[KEYHASH(keyno)] = sk;
+ allocsymkey(bucket, keyno, 0, (u_short)keytype, 0,
+ (u_short)secretsize, secret);
#ifdef DEBUG
- if (debug > 1) {
- char hex[] = "0123456789abcdef";
- int j;
-
- printf("auth_setkey: key %d type %d len %d ", sk->keyid,
- sk->type, sk->keylen);
- for (j = 0; j < sk->keylen; j++)
- printf("%c%c", hex[key[j] >> 4],
- hex[key[j] & 0xf]);
+ if (debug >= 4) {
+ size_t j;
+
+ printf("auth_setkey: key %d type %d len %d ", (int)keyno,
+ keytype, (int)secretsize);
+ for (j = 0; j < secretsize; j++)
+ printf("%02x", secret[j]);
printf("\n");
}
#endif
- authnumkeys++;
}
/*
- * auth_delkeys - delete all known keys, in preparation for rereading
- * the keys file (presumably)
+ * auth_delkeys - delete non-autokey untrusted keys, and clear all info
+ * except the trusted bit of non-autokey trusted keys, in
+ * preparation for rereading the keys file.
*/
void
auth_delkeys(void)
{
- struct savekey *sk;
- struct savekey **skp;
- int i;
+ symkey * sk;
+
+ ITER_DLIST_BEGIN(key_listhead, sk, llink, symkey)
+ if (sk->keyid > NTP_MAXKEY) { /* autokey */
+ continue;
+ }
- for (i = 0; i < HASHSIZE; i++) {
- skp = &(key_hash[i]);
- sk = key_hash[i];
/*
- * Leave autokey keys alone.
+ * Don't lose info as to which keys are trusted.
*/
- 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;
+ if (KEY_TRUSTED & sk->flags) {
+ if (sk->secret != NULL) {
+ memset(sk->secret, '\0', sk->secretsize);
+ free(sk->secret);
}
+ sk->secretsize = 0;
+ sk->lifetime = 0;
+ } else {
+ freesymkey(sk, &key_hash[KEYHASH(sk->keyid)]);
}
- }
+ ITER_DLIST_END()
}
+
/*
* 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;
+ symkey * sk;
+
+ ITER_DLIST_BEGIN(key_listhead, sk, llink, symkey)
+ if (sk->lifetime > 0 && current_time > sk->lifetime) {
+ freesymkey(sk, &key_hash[KEYHASH(sk->keyid)]);
+ authkeyexpired++;
}
- }
-#ifdef DEBUG
- if (debug)
- printf("auth_agekeys: at %lu keys %lu expired %lu\n",
- current_time, authnumkeys, authkeyexpired);
-#endif
+ ITER_DLIST_END()
+ DPRINTF(1, ("auth_agekeys: at %lu keys %lu expired %lu\n",
+ current_time, authnumkeys, authkeyexpired));
}
+
/*
* authencrypt - generate message authenticator
*
@@ -481,12 +636,11 @@ auth_agekeys(void)
*/
int
authencrypt(
- keyid_t keyno,
- u_int32 *pkt,
- int length
+ 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
@@ -494,41 +648,40 @@ authencrypt(
*/
authencryptions++;
pkt[length / 4] = htonl(keyno);
- if (keyno == 0) {
- return (4);
+ if (0 == keyno) {
+ return 4;
+ }
+ if (!authhavekey(keyno)) {
+ return 0;
}
- if (!authhavekey(keyno))
- return (0);
- return (MD5authencrypt(cache_type, cache_key, pkt, length));
+ return MD5authencrypt(cache_type, cache_secret, pkt, length);
}
+
/*
* authdecrypt - verify message authenticator
*
- * Returns one if authenticator valid, zero if invalid or key not found.
+ * Returns TRUE if authenticator valid, FALSE if invalid or not found.
*/
int
authdecrypt(
- keyid_t keyno,
- u_int32 *pkt,
- int length,
- int size
+ 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.
+ * the last message was correctly authenticated. For our
+ * purpose this is an invalid authenticator.
*/
authdecryptions++;
- if (keyno == 0)
- return (0);
-
- if (!authhavekey(keyno) || size < 4)
- return (0);
+ if (0 == keyno || !authhavekey(keyno) || size < 4) {
+ return FALSE;
+ }
- return (MD5authdecrypt(cache_type, cache_key, pkt, length,
- size));
+ return MD5authdecrypt(cache_type, cache_secret, pkt, length,
+ size);
}
diff --git a/libntp/authreadkeys.c b/libntp/authreadkeys.c
index 063515ee02c7..9b02119d169a 100644
--- a/libntp/authreadkeys.c
+++ b/libntp/authreadkeys.c
@@ -12,7 +12,8 @@
#ifdef OPENSSL
#include "openssl/objects.h"
-#endif /* OPENSSL */
+#include "openssl/evp.h"
+#endif /* OPENSSL */
/* Forwards */
static char *nexttok (char **);
@@ -34,7 +35,7 @@ nexttok(
* Space past white space
*/
while (*cp == ' ' || *cp == '\t')
- cp++;
+ cp++;
/*
* Save this and space to end of token
@@ -42,19 +43,19 @@ nexttok(
starttok = cp;
while (*cp != '\0' && *cp != '\n' && *cp != ' '
&& *cp != '\t' && *cp != '#')
- cp++;
+ cp++;
/*
* If token length is zero return an error, else set end of
* token to zero and return start.
*/
if (starttok == cp)
- return (NULL);
+ return NULL;
if (*cp == ' ' || *cp == '\t')
- *cp++ = '\0';
+ *cp++ = '\0';
else
- *cp = '\0';
+ *cp = '\0';
*str = cp;
return starttok;
@@ -75,7 +76,7 @@ authreadkeys(
keyid_t keyno;
int keytype;
char buf[512]; /* lots of room for line */
- u_char keystr[20];
+ u_char keystr[32]; /* Bug 2537 */
int len;
int j;
@@ -147,7 +148,7 @@ authreadkeys(
"authreadkeys: no algorithm for key %d", keyno);
continue;
}
-#else /* OPENSSL */
+#else /* !OPENSSL follows */
/*
* The key type is unused, but is required to be 'M' or
@@ -159,7 +160,7 @@ authreadkeys(
continue;
}
keytype = KEY_TYPE_MD5;
-#endif /* OPENSSL */
+#endif /* !OPENSSL */
/*
* Finally, get key and insert it. If it is longer than 20
@@ -174,7 +175,7 @@ authreadkeys(
continue;
}
len = strlen(token);
- if (len <= 20) {
+ if (len <= 20) { /* Bug 2537 */
MD5auth_setkey(keyno, keytype, (u_char *)token, len);
} else {
char hex[] = "0123456789abcdef";
@@ -185,17 +186,19 @@ authreadkeys(
jlim = min(len, 2 * sizeof(keystr));
for (j = 0; j < jlim; j++) {
ptr = strchr(hex, tolower(token[j]));
- if (ptr == NULL) {
- msyslog(LOG_ERR,
- "authreadkeys: invalid hex digit for key %d", keyno);
- continue;
- }
+ if (ptr == NULL)
+ break; /* abort decoding */
temp = (u_char)(ptr - hex);
if (j & 1)
keystr[j / 2] |= temp;
else
keystr[j / 2] = temp << 4;
}
+ if (j < jlim) {
+ msyslog(LOG_ERR,
+ "authreadkeys: invalid hex digit for key %d", keyno);
+ continue;
+ }
MD5auth_setkey(keyno, keytype, keystr, jlim / 2);
}
}
diff --git a/libntp/authusekey.c b/libntp/authusekey.c
index bef7b8473248..c1d08132c318 100644
--- a/libntp/authusekey.c
+++ b/libntp/authusekey.c
@@ -1,6 +1,7 @@
/*
* authusekey - decode a key from ascii and use it
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
@@ -22,14 +23,12 @@ authusekey(
const u_char *str
)
{
- const u_char *cp;
int len;
- cp = str;
- len = strlen((const char *)cp);
- if (len == 0)
+ len = strlen((const char *)str);
+ if (0 == len)
return 0;
- MD5auth_setkey(keyno, keytype, str, (int)strlen((const char *)str));
+ MD5auth_setkey(keyno, keytype, str, len);
return 1;
}
diff --git a/libntp/bsd_strerror.c b/libntp/bsd_strerror.c
index 9d8ae8e4f483..5ace9aa48542 100644
--- a/libntp/bsd_strerror.c
+++ b/libntp/bsd_strerror.c
@@ -39,9 +39,10 @@ strerror(
static char ebuf[20];
if ((unsigned int)errnum < sys_nerr)
- return(sys_errlist[errnum]);
- (void)sprintf(ebuf, "Unknown error: %d", errnum);
- return(ebuf);
+ return sys_errlist[errnum];
+ snprintf(ebuf, sizeof(ebuf), "Unknown error: %d", errnum);
+
+ return ebuf;
}
#else
int strerror_bs;
diff --git a/libntp/buftvtots.c b/libntp/buftvtots.c
index d6d9300f1241..a77e9f7c9ba2 100644
--- a/libntp/buftvtots.c
+++ b/libntp/buftvtots.c
@@ -9,7 +9,7 @@
#endif
#include "ntp_fp.h"
#include "ntp_string.h"
-#include "ntp_unixtime.h"
+#include "timevalops.h"
#ifndef SYS_WINNT
int
@@ -28,26 +28,11 @@ buftvtots(
/*
* and use it
*/
- ts->l_ui = tv.tv_sec + (u_long)JAN_1970;
- if (tv.tv_usec > 999999)
- return 0;
- TVUTOTSF(tv.tv_usec, ts->l_uf);
- return 1;
-}
-#else /* SYS_WINNT */
-/*
- * Windows doesn't have the tty_clock line discipline, so
- * don't look for a timestamp where there is none.
- */
-int
-buftvtots(
- const char *bufp,
- l_fp *ts
- )
-{
- UNUSED_ARG(bufp);
- UNUSED_ARG(ts);
+ if (tv.tv_usec > MICROSECONDS - 1)
+ return FALSE;
+
+ *ts = tval_stamp_to_lfp(tv);
- return 0;
+ return TRUE;
}
-#endif /* SYS_WINNT */
+#endif /* !SYS_WINNT */
diff --git a/libntp/caljulian.c b/libntp/caljulian.c
index 7673061b57ce..6463699b152a 100644
--- a/libntp/caljulian.c
+++ b/libntp/caljulian.c
@@ -1,13 +1,14 @@
/*
* caljulian - determine the Julian date from an NTP time.
+ *
+ * (Note: since we use the GREGORIAN calendar, this should be renamed to
+ * 'calgregorian' eventually...)
*/
+#include <config.h>
#include <sys/types.h>
#include "ntp_types.h"
#include "ntp_calendar.h"
-#include "ntp_stdlib.h"
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
#if !(defined(ISC_CHECK_ALL) || defined(ISC_CHECK_NONE) || \
defined(ISC_CHECK_ENSURE) || defined(ISC_CHECK_INSIST) || \
@@ -17,181 +18,24 @@
#include "ntp_assert.h"
-#if 1
-
-/* Updated 2008-11-10 Juergen Perlinger <juergen.perlinger@t-online.de>
- *
- * Make the conversion 2038-proof with proper NTP epoch unfolding and extended
- * precision calculations. Though we should really get a 'time_t' with more
- * than 32 bits at least until 2037, because the unfolding cannot work after
- * the wrap of the 32-bit 'time_t'.
- */
-
void
caljulian(
- u_long ntptime,
- register struct calendar *jt
+ uint32_t ntp,
+ struct calendar * jt
)
{
- u_long saved_time = ntptime;
- u_long ntp_day; /* days (since christian era or in year) */
- 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 */
- u_long sclday; /* scaled days for month conversion */
- int leaps; /* # of leaps days in year */
- time_t now; /* current system time */
- u_int32 tmplo; /* double precision tmp value / lo part */
- int32 tmphi; /* double precision tmp value / hi part */
-
- NTP_INSIST(NULL != jt);
-
- /*
- * First we have to unfold the ntp time stamp around the current time
- * to make sure we are in the right epoch. Also we we do *NOT* fold
- * before the begin of the first NTP epoch, so we WILL have a
- * non-negative time stamp afterwards. Though at the time of this
- * writing (2008 A.D.) it would be really strange to have systems
- * running with clock set to he 1960's or before...
- *
- * But's important to use a 32 bit max signed value -- LONG_MAX is 64
- * bit on a 64-bit system, and it will give wrong results.
- */
- now = time(NULL);
- tmplo = (u_int32)now;
-#if ( SIZEOF_TIME_T > 4 )
- tmphi = (int32)(now >> 16 >> 16);
-#else
- /*
- * Get the correct sign extension in the high part.
- * (now >> 32) may not work correctly on every 32 bit
- * system, e.g. it yields garbage under Win32/VC6.
- */
- tmphi = (int32)(now >> 31);
-#endif
+ vint64 vlong;
+ ntpcal_split split;
- M_ADD(tmphi, tmplo, 0, ((1UL << 31)-1)); /* 32-bit max signed */
- M_ADD(tmphi, tmplo, 0, JAN_1970);
- if ((ntptime > tmplo) && (tmphi > 0))
- --tmphi;
- tmplo = ntptime;
- /*
- * Now split into days and seconds-of-day, using the fact that
- * SECSPERDAY (86400) == 675 * 128; we can get roughly 17000 years of
- * time scale, using only 32-bit calculations. Some magic numbers here,
- * sorry for that. (This could be streamlined for 64 bit machines, but
- * is worth the trouble?)
- */
- ntptime = tmplo & 127; /* save remainder bits */
- tmplo = (tmplo >> 7) | (tmphi << 25);
- ntp_day = (u_int32)tmplo / 675;
- ntptime += ((u_int32)tmplo % 675) << 7;
-
- /* some checks for the algorithm
- * There's some 64-bit trouble out there: the original NTP time stamp
- * had only 32 bits, so our calculation invariant only holds in 32 bits!
- */
- NTP_ENSURE(ntptime < SECSPERDAY);
- NTP_INVARIANT((u_int32)(ntptime + ntp_day * SECSPERDAY) == (u_int32)saved_time);
-
- /*
- * Do the easy stuff first: take care of hh:mm:ss, ignoring leap
- * seconds
- */
- jt->second = (u_char)(ntptime % SECSPERMIN);
- ntptime /= SECSPERMIN;
- jt->minute = (u_char)(ntptime % MINSPERHR);
- ntptime /= MINSPERHR;
- jt->hour = (u_char)(ntptime);
-
- /* check time invariants */
- NTP_ENSURE(jt->second < SECSPERMIN);
- NTP_ENSURE(jt->minute < MINSPERHR);
- NTP_ENSURE(jt->hour < HRSPERDAY);
-
- /*
- * Find the day past 1900/01/01 00:00 UTC
- */
- ntp_day += DAY_NTP_STARTS - 1; /* convert to days in CE */
- n400 = ntp_day / GREGORIAN_CYCLE_DAYS; /* split off cycles */
- ntp_day %= GREGORIAN_CYCLE_DAYS;
- n100 = ntp_day / GREGORIAN_NORMAL_CENTURY_DAYS;
- ntp_day %= GREGORIAN_NORMAL_CENTURY_DAYS;
- n4 = ntp_day / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
- ntp_day %= GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
- n1 = ntp_day / DAYSPERYEAR;
- ntp_day %= DAYSPERYEAR; /* now zero-based day-of-year */
-
- NTP_ENSURE(ntp_day < 366);
+ NTP_INSIST(NULL != jt);
/*
- * Calculate the year and day-of-year
+ * Unfold ntp time around current time into NTP domain. Split
+ * into days and seconds, shift days into CE domain and
+ * process the parts.
*/
- jt->year = (u_short)(400*n400 + 100*n100 + 4*n4 + n1);
-
- if ((n100 | n1) > 3) {
- /*
- * 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 {
- /*
- * The following code is according to the excellent book
- * 'Calendrical Calculations' by Nachum Dershowitz and Edward
- * Reingold. It converts the day-of-year into month and
- * day-of-month, using a linear transformation with integer
- * truncation. Magic numbers again, but they will not be used
- * anywhere else.
- */
- sclday = ntp_day * 7 + 217;
- leaps = ((n1 == 3) && ((n4 != 24) || (n100 == 3))) ? 1 : 0;
- if (ntp_day >= (u_long)(JAN + FEB + leaps))
- sclday += (2 - leaps) * 7;
- ++jt->year;
- jt->month = (u_char)(sclday / 214);
- jt->monthday = (u_char)((sclday % 214) / 7 + 1);
- jt->yearday = (u_short)(1 + ntp_day);
- }
-
- /* check date invariants */
- NTP_ENSURE(1 <= jt->month && jt->month <= 12);
- NTP_ENSURE(1 <= jt->monthday && jt->monthday <= 31);
- NTP_ENSURE(1 <= jt->yearday && jt->yearday <= 366);
-}
-
-#else
-
-/* Updated 2003-12-30 TMa
-
- Uses common code with the *prettydate functions to convert an ntp
- seconds count into a calendar date.
- Will handle ntp epoch wraparound as long as the underlying os/library
- does so for the unix epoch, i.e. works after 2038.
-*/
-
-void
-caljulian(
- u_long ntptime,
- register struct calendar *jt
- )
-{
- struct tm *tm;
- NTP_REQUIRE(jt != NULL);
-
- tm = ntp2unix_tm(ntptime, 0);
- NTP_INSIST(tm != NULL);
-
- jt->hour = (u_char) tm->tm_hour;
- jt->minute = (u_char) tm->tm_min;
- jt->month = (u_char) (tm->tm_mon + 1);
- jt->monthday = (u_char) tm->tm_mday;
- jt->second = (u_char) tm->tm_sec;
- jt->year = (u_short) (tm->tm_year + 1900);
- jt->yearday = (u_short) (tm->tm_yday + 1); /* Assumes tm_yday starts with day 0! */
+ vlong = ntpcal_ntp_to_ntp(ntp, NULL);
+ split = ntpcal_daysplit(&vlong);
+ ntpcal_daysplit_to_date(jt, &split, DAY_NTP_STARTS);
}
-#endif
diff --git a/libntp/caltontp.c b/libntp/caltontp.c
index 9c4136842d9d..4246a6a5431c 100644
--- a/libntp/caltontp.c
+++ b/libntp/caltontp.c
@@ -1,12 +1,14 @@
/*
* caltontp - convert a date to an NTP time
*/
+#include <config.h>
#include <sys/types.h>
#include "ntp_types.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
+#include "ntp_unixtime.h"
/*
* Juergen Perlinger, 2008-11-12
@@ -29,15 +31,15 @@
* *not* necessarily reproduce the input, especially if the time spec is more
* than 68 years off from the current time...
*/
-u_long
+
+uint32_t
caltontp(
const struct calendar *jt
)
{
- ntp_u_int32_t days; /* full days in NTP epoch */
- ntp_u_int32_t years; /* complete ACE years before date */
- ntp_u_int32_t month; /* adjusted month for calendar */
-
+ int32_t eraday; /* CE Rata Die number */
+ vint64 ntptime;/* resulting NTP time */
+
NTP_INSIST(jt != NULL);
NTP_REQUIRE(jt->month <= 13); /* permit month 0..13! */
@@ -48,58 +50,19 @@ caltontp(
NTP_REQUIRE(jt->second <= SECSPERMIN);
/*
- * First convert the date to fully elapsed days since NTP epoch. The
- * expressions used here give us initially days since 0001-01-01, the
- * beginning of the christian era in the proleptic gregorian calendar;
- * they are rebased on-the-fly into days since beginning of the NTP
- * epoch, 1900-01-01.
+ * First convert the date to he corresponding RataDie
+ * number. If yearday is not zero, assume that it contains a
+ * useable value and avoid all calculations involving month
+ * and day-of-month. Do a full evaluation otherwise.
*/
- if (jt->yearday) {
- /*
- * Assume that the day-of-year contains a useable value and
- * avoid all calculations involving month and day-of-month.
- */
- years = jt->year - 1;
- days = years * DAYSPERYEAR /* days in previous years */
- + years / 4 /* plus prior years's leap days */
- - years / 100 /* minus leapless century years */
- + years / 400 /* plus leapful Gregorian yrs */
- + jt->yearday /* days this year */
- - DAY_NTP_STARTS; /* rebase to NTP epoch */
- } else {
- /*
- * The following code is according to the excellent book
- * 'Calendrical Calculations' by Nachum Dershowitz and Edward
- * Reingold. It does a full calendar evaluation, using one of
- * the alternate algorithms: Shift to a hypothetical year
- * starting on the previous march,1st; merge years, month and
- * days; undo the the 9 month shift (which is 306 days). The
- * advantage is that we do NOT need to now whether a year is a
- * leap year or not, because the leap day is the LAST day of
- * the year.
- */
- month = (ntp_u_int32_t)jt->month + 9;
- years = jt->year - 1 + month / 12;
- month %= 12;
- days = years * DAYSPERYEAR /* days in previous years */
- + years / 4 /* plus prior years's leap days */
- - years / 100 /* minus leapless century years */
- + years / 400 /* plus leapful Gregorian yrs */
- + (month * 153 + 2) / 5 /* plus days before month */
- + jt->monthday /* plus day-of-month */
- - 306 /* minus 9 months */
- - DAY_NTP_STARTS; /* rebase to NTP epoch */
- }
+ if (jt->yearday)
+ eraday = ntpcal_year_to_ystart(jt->year)
+ + jt->yearday - 1;
+ else
+ eraday = ntpcal_date_to_rd(jt);
- /*
- * Do the obvious: Merge everything together, making sure integer
- * promotion doesn't play dirty tricks on us; there is probably some
- * redundancy in the casts, but this drives it home with force. All
- * arithmetic is done modulo 2**32, because the result is truncated
- * anyway.
- */
- return days * SECSPERDAY
- + (ntp_u_int32_t)jt->hour * MINSPERHR*SECSPERMIN
- + (ntp_u_int32_t)jt->minute * SECSPERMIN
- + (ntp_u_int32_t)jt->second;
+ ntptime = ntpcal_dayjoin(eraday - DAY_NTP_STARTS,
+ ntpcal_etime_to_seconds(jt->hour, jt->minute,
+ jt->second));
+ return ntptime.d_s.lo;
}
diff --git a/libntp/calyearstart.c b/libntp/calyearstart.c
index c5a63f729b39..9e3f58fb393d 100644
--- a/libntp/calyearstart.c
+++ b/libntp/calyearstart.c
@@ -2,6 +2,7 @@
* calyearstart - determine the NTP time at midnight of January 1 in
* the year of the given date.
*/
+#include <config.h>
#include <sys/types.h>
#include "ntp_types.h"
@@ -10,47 +11,78 @@
#include "ntp_assert.h"
/*
- * Juergen Perlinger, 2008-11-12
- * Use the result of 'caljulian' to get the delta from the time stamp to the
- * beginning of the year. Do not make a second trip through 'caltontp' after
- * fixing the date, apart for invariant tests.
+ * Juergen Perlinger, 2010-05-02
+ *
+ * Redone in terms of the calendar functions. It's rather simple:
+ * - expand the NTP time stamp
+ * - split into days and seconds since midnight, dropping the partial day
+ * - get full number of days before year start in NTP epoch
+ * - convert to seconds, truncated to 32 bits.
*/
-u_long
-calyearstart(u_long ntp_time)
+u_int32
+calyearstart(u_int32 ntptime, const time_t *pivot)
{
- struct calendar jt;
- ntp_u_int32_t delta;
+ u_int32 ndays; /* elapsed days since NTP starts */
+ vint64 vlong;
+ ntpcal_split split;
- caljulian(ntp_time,&jt);
+ vlong = ntpcal_ntp_to_ntp(ntptime, pivot);
+ split = ntpcal_daysplit(&vlong);
+ ndays = ntpcal_rd_to_ystart(split.hi + DAY_NTP_STARTS)
+ - DAY_NTP_STARTS;
+
+ return (u_int32)(ndays * SECSPERDAY);
+}
+
+/*
+ * calmonthstart - get NTP time at midnight of the first day of the
+ * current month.
+ */
+u_int32
+calmonthstart(u_int32 ntptime, const time_t *pivot)
+{
+ u_int32 ndays; /* elapsed days since NTP starts */
+ vint64 vlong;
+ ntpcal_split split;
+
+ vlong = ntpcal_ntp_to_ntp(ntptime, pivot);
+ split = ntpcal_daysplit(&vlong);
+ ndays = ntpcal_rd_to_mstart(split.hi + DAY_NTP_STARTS)
+ - DAY_NTP_STARTS;
+
+ return (u_int32)(ndays * SECSPERDAY);
+}
+
+/*
+ * calweekstart - get NTP time at midnight of the last monday on or
+ * before the current date.
+ */
+u_int32
+calweekstart(u_int32 ntptime, const time_t *pivot)
+{
+ u_int32 ndays; /* elapsed days since NTP starts */
+ vint64 vlong;
+ ntpcal_split split;
+
+ vlong = ntpcal_ntp_to_ntp(ntptime, pivot);
+ split = ntpcal_daysplit(&vlong);
+ ndays = ntpcal_weekday_le(split.hi + DAY_NTP_STARTS, CAL_MONDAY)
+ - DAY_NTP_STARTS;
+
+ return (u_int32)(ndays * SECSPERDAY);
+}
+
+/*
+ * caldaystart - get NTP time at midnight of the current day.
+ */
+u_int32
+caldaystart(u_int32 ntptime, const time_t *pivot)
+{
+ vint64 vlong;
+ ntpcal_split split;
+
+ vlong = ntpcal_ntp_to_ntp(ntptime, pivot);
+ split = ntpcal_daysplit(&vlong);
- /*
- * Now we have days since yearstart (unity-based) and the time in that
- * day. Simply merge these together to seconds and subtract that from
- * input time. That's faster than going through the calendar stuff
- * again...
- */
- delta = (ntp_u_int32_t)jt.yearday * SECSPERDAY
- + (ntp_u_int32_t)jt.hour * MINSPERHR * SECSPERMIN
- + (ntp_u_int32_t)jt.minute * SECSPERMIN
- + (ntp_u_int32_t)jt.second
- - SECSPERDAY; /* yearday is unity-based... */
-
-# if ISC_CHECK_INVARIANT
- /*
- * check that this computes properly: do a roundtrip! That's the only
- * sensible test here, but it's a rather expensive invariant...
- */
- jt.yearday = 0;
- jt.month = 1;
- jt.monthday = 1;
- jt.hour = 0;
- jt.minute = 0;
- jt.second = 0;
- NTP_INVARIANT((ntp_u_int32_t)(caltontp(&jt) + delta) == (ntp_u_int32_t)ntp_time);
-# endif
-
- /* The NTP time stamps (l_fp) count seconds unsigned mod 2**32, so we
- * have to calculate this in the proper way!
- */
- return (ntp_u_int32_t)(ntp_time - delta);
+ return ntptime - split.lo;
}
diff --git a/libntp/clocktime.c b/libntp/clocktime.c
index 371859cda21c..c1a3ba09c0af 100644
--- a/libntp/clocktime.c
+++ b/libntp/clocktime.c
@@ -2,131 +2,148 @@
* clocktime - compute the NTP date from a day of year, hour, minute
* and second.
*/
+#include <config.h>
#include "ntp_fp.h"
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
/*
- * Hacks to avoid excercising the multiplier. I have no pride.
+ * We check 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 MULBY10(x) (((x)<<3) + ((x)<<1))
-#define MULBY60(x) (((x)<<6) - ((x)<<2)) /* watch overflow */
-#define MULBY24(x) (((x)<<4) + ((x)<<3))
+#define CLOSETIME (4u*60u*60u)
/*
- * Two days, in seconds.
+ * Since we try to match years, the result of a full search will not
+ * change when we are already less than a half year from the receive
+ * time stamp. Since the length of a year is variable we use a
+ * slightly narrower limit; this might require a full evaluation near
+ * the edge, but will make sure we always get the correct result.
*/
-#define TWODAYS (2*24*60*60)
+#define NEARTIME (182u * SECSPERDAY)
/*
- * 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.
+ * local calendar helpers
*/
-#define CLOSETIME (4*60*60)
-
+static int32 ntp_to_year(u_int32);
+static u_int32 year_to_ntp(int32);
+/*
+ * Take a time spec given as day-of-year, hour, minute and second as
+ * well as a GMT offset in hours and convert it to a NTP time stamp in
+ * '*ts_ui'. The value will be in the range (rec_ui-0.5yrs) to
+ * (rec_ui+0.5yrs). A hint for the current start-of-year will be
+ * read from '*yearstart'.
+ *
+ * On return '*ts_ui' will always the best matching solution, and
+ * '*yearstart' will receive the associated start-of-year.
+ *
+ * The function will tell if the result in 'ts_ui' is in CLOSETIME
+ * (+/-4hrs) around the receive time by returning a non-zero value.
+ *
+ * Note: The function puts no constraints on the value ranges for the
+ * time specification, but evaluates the effective seconds in
+ * 32-bit arithmetic.
+ */
int
clocktime(
- int yday,
- int hour,
- int minute,
- int second,
- int tzoff,
- u_long rec_ui,
- u_long *yearstart,
- u_int32 *ts_ui
- )
+ int yday , /* day-of-year */
+ int hour , /* hour of day */
+ int minute , /* minute of hour */
+ int second , /* second of minute */
+ int tzoff , /* hours west of GMT */
+ u_int32 rec_ui , /* pivot value */
+ u_long *yearstart, /* cached start-of-year, should be fixed to u_int32 */
+ u_int32 *ts_ui ) /* effective time stamp */
{
- register long tmp;
- register u_long date;
- register u_long yst;
-
+ u_int32 ystt[3]; /* year start */
+ u_int32 test[3]; /* result time stamp */
+ u_int32 diff[3]; /* abs difference to receive */
+ int32 y, tmp, idx, min;
+
/*
- * Compute the offset into the year in seconds. Note that
+ * 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;
-
+ tmp = ((int32)second +
+ SECSPERMIN * ((int32)minute +
+ MINSPERHR * ((int32)hour + (int32)tzoff +
+ HRSPERDAY * ((int32)yday - 1))));
/*
- * Initialize yearstart, if necessary.
+ * Based on the cached year start, do a first attempt. Be
+ * happy and return if this gets us better than NEARTIME to
+ * the receive time stamp. Do this only if the cached year
+ * start is not zero, which will not happen after 1900 for the
+ * next few thousand years.
*/
- yst = *yearstart;
- if (yst == 0) {
- yst = calyearstart(rec_ui);
- *yearstart = yst;
+ if (*yearstart) {
+ /* -- get time stamp of potential solution */
+ test[0] = (u_int32)(*yearstart) + tmp;
+ /* -- calc absolute difference to receive time */
+ diff[0] = test[0] - rec_ui;
+ if (diff[0] >= 0x80000000u)
+ diff[0] = ~diff[0] + 1;
+ /* -- can't get closer if diff < NEARTIME */
+ if (diff[0] < NEARTIME) {
+ *ts_ui = test[0];
+ return diff[0] < CLOSETIME;
+ }
}
/*
- * 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.
+ * Now the dance begins. Based on the receive time stamp and
+ * the seconds offset in 'tmp', we make an educated guess
+ * about the year to start with. This takes us on the spot
+ * with a fuzz of +/-1 year.
+ *
+ * We calculate the effective timestamps for the three years
+ * around the guess and select the entry with the minimum
+ * absolute difference to the receive time stamp.
*/
- date = (u_long)(tmp + (long)yst);
- if (date < (rec_ui + CLOSETIME) &&
- date > (rec_ui - CLOSETIME)) {
- *ts_ui = date;
- return 1;
+ y = ntp_to_year(rec_ui - tmp);
+ for (idx = 0; idx < 3; idx++) {
+ /* -- get year start of potential solution */
+ ystt[idx] = year_to_ntp(y + idx - 1);
+ /* -- get time stamp of potential solution */
+ test[idx] = ystt[idx] + tmp;
+ /* -- calc absolute difference to receive time */
+ diff[idx] = test[idx] - rec_ui;
+ if (diff[idx] >= 0x80000000u)
+ diff[idx] = ~diff[idx] + 1;
}
+ /* -*- assume current year fits best, then search best fit */
+ for (min = 1, idx = 0; idx < 3; idx++)
+ if (diff[idx] < diff[min])
+ min = idx;
+ /* -*- store results and update year start */
+ *ts_ui = test[min];
+ *yearstart = ystt[min];
- /*
- * 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;
- }
- }
+ /* -*- tell if we could get into CLOSETIME*/
+ return diff[min] < CLOSETIME;
+}
- /*
- * 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;
- }
- }
- }
+static int32
+ntp_to_year(
+ u_int32 ntp)
+{
+ vint64 t;
+ ntpcal_split s;
- /*
- * 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;
- }
- }
+ t = ntpcal_ntp_to_ntp(ntp, NULL);
+ s = ntpcal_daysplit(&t);
+ s = ntpcal_split_eradays(s.hi + DAY_NTP_STARTS - 1, NULL);
+ return s.hi + 1;
+}
- /*
- * Give it up.
- */
- return 0;
+static u_int32
+year_to_ntp(
+ int32 year)
+{
+ u_int32 days;
+ days = ntpcal_days_in_years(year-1) - DAY_NTP_STARTS + 1;
+ return days * SECSPERDAY;
}
diff --git a/libntp/clocktypes.c b/libntp/clocktypes.c
index 4459830ed19d..de7f6b4f3854 100644
--- a/libntp/clocktypes.c
+++ b/libntp/clocktypes.c
@@ -1,6 +1,7 @@
/*
* Data for pretty printing clock types
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_fp.h"
@@ -100,6 +101,10 @@ struct clktype clktypes[] = {
"GPS_RIPENCC" },
{ REFCLK_NEOCLOCK4X, "NeoClock4X DCF77 / TDF receiver (44)",
"NEOCLK4X"},
+ { REFCLK_TSYNCPCI, "Spectracom TSYNC PCI timing board (45)",
+ "PCI_TSYNC"},
+ { REFCLK_GPSDJSON, "GPSD JSON socket (46)",
+ "GPSD_JSON"},
{ -1, "", "" }
};
diff --git a/libntp/decodenetnum.c b/libntp/decodenetnum.c
index f265daebf9c6..187d5cae7e5b 100644
--- a/libntp/decodenetnum.c
+++ b/libntp/decodenetnum.c
@@ -51,8 +51,7 @@ decodenetnum(
else if (NULL != strchr(pp + 1, ':'))
cp = num; /* two or more colons */
else { /* one colon */
- strncpy(name, num, sizeof(name));
- name[sizeof(name) - 1] = '\0';
+ strlcpy(name, num, sizeof(name));
cp = name;
pp = strchr(cp, ':');
*pp = '\0';
@@ -74,6 +73,7 @@ decodenetnum(
if (err != 0)
return 0;
NTP_INSIST(ai->ai_addrlen <= sizeof(*netnum));
+ ZERO(*netnum);
memcpy(netnum, ai->ai_addr, ai->ai_addrlen);
freeaddrinfo(ai);
if (NULL == port_str || 1 != sscanf(port_str, "%hu", &port))
diff --git a/libntp/dofptoa.c b/libntp/dofptoa.c
index 0f96909f1175..758af2fd7f9f 100644
--- a/libntp/dofptoa.c
+++ b/libntp/dofptoa.c
@@ -1,6 +1,7 @@
/*
* dofptoa - do the grunge work to convert an fp number to ascii
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_fp.h"
@@ -32,7 +33,7 @@ dofptoa(
/*
* Zero out the buffer
*/
- memset((char *)cbuf, 0, sizeof cbuf);
+ ZERO(cbuf);
/*
* Set the pointers to point at the first
@@ -116,3 +117,43 @@ dofptoa(
*bp = '\0';
return buf;
}
+
+
+char *
+fptoa(
+ s_fp fpv,
+ short ndec
+ )
+{
+ u_fp plusfp;
+ int neg;
+
+ neg = (fpv < 0);
+ if (neg) {
+ plusfp = (u_fp)(-fpv);
+ } else {
+ plusfp = (u_fp)fpv;
+ }
+
+ return dofptoa(plusfp, neg, ndec, FALSE);
+}
+
+
+char *
+fptoms(
+ s_fp fpv,
+ short ndec
+ )
+{
+ u_fp plusfp;
+ int neg;
+
+ neg = (fpv < 0);
+ if (neg) {
+ plusfp = (u_fp)(-fpv);
+ } else {
+ plusfp = (u_fp)fpv;
+ }
+
+ return dofptoa(plusfp, neg, ndec, TRUE);
+}
diff --git a/libntp/dolfptoa.c b/libntp/dolfptoa.c
index f68679cf000b..07ead950f455 100644
--- a/libntp/dolfptoa.c
+++ b/libntp/dolfptoa.c
@@ -1,6 +1,7 @@
/*
* dolfptoa - do the grunge work of converting an l_fp number to decimal
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_fp.h"
@@ -10,20 +11,17 @@
char *
dolfptoa(
- u_long fpi,
- u_long fpv,
+ u_int32 fpi,
+ u_int32 fpv,
int neg,
short ndec,
int msec
)
{
- register u_char *cp, *cpend;
- register u_long lwork;
- register int dec;
+ u_char *cp, *cpend, *cpdec;
+ int dec;
u_char cbuf[24];
- u_char *cpdec;
- char *buf;
- char *bp;
+ char *buf, *bp;
/*
* Get a string buffer before starting
@@ -33,113 +31,81 @@ dolfptoa(
/*
* Zero the character buffer
*/
- memset((char *) cbuf, 0, sizeof(cbuf));
+ ZERO(cbuf);
/*
- * safeguard against sign extensions and other mishaps on 64 bit platforms
- * the code following is designed for and only for 32-bit inputs and
- * only 32-bit worth of input are supplied.
- */
- fpi &= 0xffffffff;
- fpv &= 0xffffffff;
-
- /*
- * Work on the integral part. This is biased by what I know
- * compiles fairly well for a 68000.
+ * Work on the integral part. This should work reasonable on
+ * all machines with 32 bit arithmetic. Please note that 32 bits
+ * can *always* be represented with at most 10 decimal digits,
+ * including a possible rounding from the fractional part.
*/
- 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);
- if (cp < cbuf) abort(); /* rather die a horrible death than trash the memory */
- *--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)));
- if (cp < cbuf) abort(); /* rather die a horrible death than trash the memory */
- *--cp = (u_char)stmp;
- } while (swork != 0);
+ cp = cpend = cpdec = &cbuf[10];
+ for (dec = cp - cbuf; dec > 0 && fpi != 0; dec--) {
+ /* can add another digit */
+ u_int32 digit;
+
+ digit = fpi;
+ fpi /= 10U;
+ digit -= (fpi << 3) + (fpi << 1); /* i*10 */
+ *--cp = (u_char)digit;
}
/*
* Done that, now deal with the problem of the fraction. First
* determine the number of decimal places.
*/
+ dec = ndec;
+ if (dec < 0)
+ dec = 0;
if (msec) {
- dec = ndec + 3;
- if (dec < 3)
- dec = 3;
- cpdec = &cbuf[13];
- } else {
- dec = ndec;
- if (dec < 0)
- dec = 0;
- cpdec = &cbuf[10];
+ dec += 3;
+ cpdec += 3;
}
- if (dec > 12)
- dec = 12;
+ if ((size_t)dec > sizeof(cbuf) - (cpend - cbuf))
+ dec = sizeof(cbuf) - (cpend - cbuf);
/*
* 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;
- if (cpend > (cbuf + sizeof(cbuf))) abort(); /* rather die a horrible death than trash the memory */
- }
-
+ for (/*NOP*/; dec > 0 && fpv != 0; dec--) {
+ u_int32 digit, tmph, tmpl;
+
/*
- * Rounding is rotten
+ * 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.
+ * multiply by shift/add in two dwords.
*/
- if (work.l_uf & 0x80000000) {
- register u_char *tp = cpend;
+ digit = 0;
+ M_LSHIFT(digit, fpv);
+ tmph = digit;
+ tmpl = fpv;
+ M_LSHIFT(digit, fpv);
+ M_LSHIFT(digit, fpv);
+ M_ADD(digit, fpv, tmph, tmpl);
+ *cpend++ = (u_char)digit;
+ }
+
+ /* decide whether to round or simply extend by zeros */
+ if (dec > 0) {
+ /* only '0' digits left -- just reposition end */
+ cpend += dec;
+ } else {
+ /* some bits remain in 'fpv'; do round */
+ u_char *tp = cpend;
+ int carry = ((fpv & 0x80000000) != 0);
- *(--tp) += 1;
- while (*tp >= 10) {
+ for (dec = tp - cbuf; carry && dec > 0; dec--) {
+ *--tp += 1;
+ if (*tp == 10)
*tp = 0;
- *(--tp) += 1;
- };
- if (tp < cp)
- cp = tp;
+ else
+ carry = FALSE;
}
- }
- cpend += dec;
+ if (tp < cp) /* rounding from 999 to 1000 or similiar? */
+ cp = tp;
+ }
/*
* We've now got the fraction in cbuf[], with cp pointing at
@@ -148,21 +114,18 @@ dolfptoa(
* Remove leading zeros, then format the number into the
* buffer.
*/
- while (cp < cpdec) {
- if (*cp != 0)
- break;
+ while (cp < cpdec && *cp == 0)
cp++;
- }
- if (cp == cpdec)
- --cp;
+ if (cp >= cpdec)
+ cp = cpdec - 1;
bp = buf;
if (neg)
- *bp++ = '-';
+ *bp++ = '-';
while (cp < cpend) {
if (cp == cpdec)
- *bp++ = '.';
- *bp++ = (char)(*cp++ + '0'); /* ascii dependent? */
+ *bp++ = '.';
+ *bp++ = (char)(*cp++) + '0';
}
*bp = '\0';
@@ -171,3 +134,41 @@ dolfptoa(
*/
return buf;
}
+
+
+char *
+mfptoa(
+ u_int32 fpi,
+ u_int32 fpf,
+ short ndec
+ )
+{
+ int isneg;
+
+ isneg = M_ISNEG(fpi);
+ if (isneg) {
+ M_NEG(fpi, fpf);
+ }
+
+ return dolfptoa(fpi, fpf, isneg, ndec, FALSE);
+}
+
+
+char *
+mfptoms(
+ u_int32 fpi,
+ u_int32 fpf,
+ short ndec
+ )
+{
+ int isneg;
+
+ isneg = M_ISNEG(fpi);
+ if (isneg) {
+ M_NEG(fpi, fpf);
+ }
+
+ return dolfptoa(fpi, fpf, isneg, ndec, TRUE);
+}
+
+
diff --git a/libntp/findconfig.c b/libntp/findconfig.c
index 562c01764c3c..1785ff700395 100644
--- a/libntp/findconfig.c
+++ b/libntp/findconfig.c
@@ -22,7 +22,7 @@ FindConfig(
struct utsname unamebuf;
/* All keyed by initial target being a directory */
- (void) strcpy(result, base);
+ strlcpy(result, base, sizeof(result));
if (stat(result, &sbuf) == 0) {
if (S_ISDIR(sbuf.st_mode)) {
@@ -49,7 +49,9 @@ FindConfig(
if (stat(result, &sbuf) == 0) {
goto outahere;
} else {
- (void) strcpy(result, "/not/found");
+ strlcpy(result,
+ "/not/found",
+ sizeof(result));
}
}
}
diff --git a/libntp/fptoa.c b/libntp/fptoa.c
deleted file mode 100644
index 025ad21e55b4..000000000000
--- a/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/libntp/fptoms.c b/libntp/fptoms.c
deleted file mode 100644
index 0bfca5556160..000000000000
--- a/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/libntp/getopt.c b/libntp/getopt.c
index 7b344f0dc6f4..63c82faa6f77 100644
--- a/libntp/getopt.c
+++ b/libntp/getopt.c
@@ -13,6 +13,7 @@
/*LINTLIBRARY*/
+#include <config.h>
#include <stdio.h>
#include "ntp_stdlib.h"
diff --git a/libntp/hextoint.c b/libntp/hextoint.c
index a2e8c043fb35..d24b5a0bf8a5 100644
--- a/libntp/hextoint.c
+++ b/libntp/hextoint.c
@@ -2,6 +2,7 @@
* hextoint - convert an ascii string in hex to an unsigned
* long, with error checking
*/
+#include <config.h>
#include <ctype.h>
#include "ntp_stdlib.h"
diff --git a/libntp/hextolfp.c b/libntp/hextolfp.c
index d0b624340d93..8fbce2e5b863 100644
--- a/libntp/hextolfp.c
+++ b/libntp/hextolfp.c
@@ -1,6 +1,7 @@
/*
* hextolfp - convert an ascii hex string to an l_fp number
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libntp/humandate.c b/libntp/humandate.c
index 36510c529380..f88d8d24cb4d 100644
--- a/libntp/humandate.c
+++ b/libntp/humandate.c
@@ -1,13 +1,14 @@
/*
- * humandate - convert an NTP (or the current) time to something readable
+ * humandate.c - convert an NTP (or the current) time to something readable
*/
+#include <config.h>
#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"
-extern const char *months[]; /* prettydate.c */
/* 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. */
@@ -32,3 +33,28 @@ humanlogtime(void)
return bp;
}
+
+
+/*
+ * humantime() -- like humanlogtime() but without date, and with the
+ * time to display given as an argument.
+ */
+char *
+humantime(
+ time_t cursec
+ )
+{
+ char * bp;
+ struct tm * tm;
+
+ tm = localtime(&cursec);
+ if (!tm)
+ return "--:--:--";
+
+ LIB_GETBUF(bp);
+
+ snprintf(bp, LIB_BUFLENGTH, "%02d:%02d:%02d",
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+ return bp;
+}
diff --git a/libntp/inttoa.c b/libntp/inttoa.c
deleted file mode 100644
index f34710e1c808..000000000000
--- a/libntp/inttoa.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * inttoa - return an asciized signed integer
- */
-#include <config.h>
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-inttoa(
- long val
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
- snprintf(buf, LIB_BUFLENGTH, "%ld", val);
-
- return buf;
-}
diff --git a/libntp/iosignal.c b/libntp/iosignal.c
index 5859e40e0e78..8749a23b8e81 100644
--- a/libntp/iosignal.c
+++ b/libntp/iosignal.c
@@ -45,7 +45,14 @@
#include "iosignal.h"
#if defined(HAVE_SIGNALED_IO)
+static RETSIGTYPE sigio_handler (int);
+
+/* consistency safegurad to catch BLOCK/UNBLOCK oversights */
static int sigio_block_count = 0;
+
+/* main inputhandler to be called on SIGIO */
+static input_handler_t *input_handler_callback = NULL;
+
# if defined(HAVE_SIGACTION)
/*
* If sigaction() is used for signal handling and a signal is
@@ -59,40 +66,11 @@ static int sigio_block_count = 0;
*/
static int sigio_handler_active = 0;
# endif
-extern void input_handler (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
-
-# if defined(USE_SIGIO) && defined(USE_SIGPOLL)
-# if SIGIO == SIGPOLL
-# define USE_SIGIO
-# undef USE_SIGPOLL
-# endif /* SIGIO == SIGPOLL */
-# endif /* USE_SIGIO && USE_SIGIO */
/*
@@ -128,7 +106,7 @@ init_clock_sig(
pgrp = getpid();
if (ioctl(rio->fd, FIOSSAIOOWN, (char *)&pgrp) == -1)
{
- msyslog(LOG_ERR, "ioctl(FIOSSAIOOWN) fails for clock I/O: %m");
+ msyslog(LOG_ERR, "ioctl(FIOSSAIOOWN) fails for clock I/O: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
@@ -138,14 +116,14 @@ init_clock_sig(
*/
if (ioctl(rio->fd, FIOSNBIO, (char *)&on) == -1)
{
- msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails for clock I/O: %m");
+ msyslog(LOG_ERR, "ioctl(FIOSNBIO) fails for clock I/O: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
if (ioctl(rio->fd, FIOSSAIOSTAT, (char *)&on) == -1)
{
- msyslog(LOG_ERR, "ioctl(FIOSSAIOSTAT) fails for clock I/O: %m");
+ msyslog(LOG_ERR, "ioctl(FIOSSAIOSTAT) fails for clock I/O: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
@@ -232,7 +210,7 @@ init_socket_sig(
if (ioctl(fd, I_SETSIG, S_INPUT) < 0)
{
msyslog(LOG_ERR,
- "init_socket_sig: ioctl(I_SETSIG, S_INPUT) failed: %m");
+ "init_socket_sig: ioctl(I_SETSIG, S_INPUT) failed: %m - EXITING");
exit(1);
}
}
@@ -246,7 +224,7 @@ init_socket_sig(
# if defined(FIOASYNC)
if (ioctl(fd, FIOASYNC, (char *)&on) == -1)
{
- msyslog(LOG_ERR, "ioctl(FIOASYNC) fails: %m");
+ msyslog(LOG_ERR, "ioctl(FIOASYNC) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
@@ -256,13 +234,13 @@ init_socket_sig(
if ((flags = fcntl(fd, F_GETFL, 0)) == -1)
{
- msyslog(LOG_ERR, "fcntl(F_GETFL) fails: %m");
+ msyslog(LOG_ERR, "fcntl(F_GETFL) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
if (fcntl(fd, F_SETFL, flags|FASYNC) < 0)
{
- msyslog(LOG_ERR, "fcntl(...|FASYNC) fails: %m");
+ msyslog(LOG_ERR, "fcntl(...|FASYNC) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
@@ -280,21 +258,21 @@ init_socket_sig(
# if defined(SIOCSPGRP)
if (ioctl(fd, SIOCSPGRP, (char *)&pgrp) == -1)
{
- msyslog(LOG_ERR, "ioctl(SIOCSPGRP) fails: %m");
+ msyslog(LOG_ERR, "ioctl(SIOCSPGRP) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
# elif defined(FIOSETOWN)
if (ioctl(fd, FIOSETOWN, (char*)&pgrp) == -1)
{
- msyslog(LOG_ERR, "ioctl(FIOSETOWN) fails: %m");
+ msyslog(LOG_ERR, "ioctl(FIOSETOWN) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
# elif defined(F_SETOWN)
if (fcntl(fd, F_SETOWN, pgrp) == -1)
{
- msyslog(LOG_ERR, "fcntl(F_SETOWN) fails: %m");
+ msyslog(LOG_ERR, "fcntl(F_SETOWN) fails: %m - EXITING");
exit(1);
/*NOTREACHED*/
}
@@ -305,7 +283,7 @@ init_socket_sig(
# endif /* USE_UDP_SIGPOLL */
}
-RETSIGTYPE
+static RETSIGTYPE
sigio_handler(
int sig
)
@@ -321,7 +299,8 @@ sigio_handler(
msyslog(LOG_ERR, "sigio_handler: sigio_handler_active != 1");
# endif
- (void)input_handler(&ts);
+ INSIST(input_handler_callback != NULL);
+ (*input_handler_callback)(&ts);
# if defined(HAVE_SIGACTION)
sigio_handler_active--;
@@ -337,8 +316,13 @@ sigio_handler(
*/
# ifdef HAVE_SIGACTION
void
-set_signal(void)
+set_signal(input_handler_t *input)
{
+ INSIST(input != NULL);
+
+ input_handler_callback = input;
+
+ using_sigio = TRUE;
# ifdef USE_SIGIO
(void) signal_no_reset(SIGIO, sigio_handler);
# endif
@@ -507,8 +491,13 @@ block_sigio(void)
}
void
-set_signal(void)
+set_signal(input_handler_t *input)
{
+ INSIST(input != NULL);
+
+ input_handler_callback = input;
+
+ using_sigio = TRUE;
(void) signal_no_reset(SIGIO, sigio_handler);
}
diff --git a/libntp/lib_strbuf.c b/libntp/lib_strbuf.c
index e0becbcbc405..76f70163de98 100644
--- a/libntp/lib_strbuf.c
+++ b/libntp/lib_strbuf.c
@@ -7,17 +7,22 @@
#include <isc/net.h>
#include <isc/result.h>
+
+#include "ntp_fp.h"
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
+
/*
* Storage declarations
*/
-char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
-int lib_nextbuf;
-int ipv4_works;
-int ipv6_works;
-int lib_inited = 0;
+int debug;
+libbufstr lib_stringbuf[LIB_NUMBUF];
+int lib_nextbuf;
+int ipv4_works;
+int ipv6_works;
+int lib_inited;
+
/*
* initialization routine. Might be needed if the code is ROMized.
@@ -25,8 +30,10 @@ int lib_inited = 0;
void
init_lib(void)
{
- lib_nextbuf = 0;
+ if (lib_inited)
+ return;
ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
- lib_inited = 1;
+ init_systime();
+ lib_inited = TRUE;
}
diff --git a/libntp/machines.c b/libntp/machines.c
index 7b3201d4203e..43944f9edb3f 100644
--- a/libntp/machines.c
+++ b/libntp/machines.c
@@ -14,6 +14,7 @@
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "lib_strbuf.h"
+#include "ntp_debug.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -432,14 +433,13 @@ ntp_set_tod(
void *tzp
)
{
- static int tod;
- int rc = -1;
- int saved_errno = 0;
+ static int tod;
+ int rc;
+ int saved_errno;
-#ifdef DEBUG
- if (debug)
- printf("In ntp_set_tod\n");
-#endif
+ TRACE(1, ("In ntp_set_tod\n"));
+ rc = -1;
+ saved_errno = 0;
#ifdef HAVE_CLOCK_SETTIME
if (rc && (SET_TOD_CLOCK_SETTIME == tod || !tod)) {
@@ -452,12 +452,7 @@ ntp_set_tod(
errno = 0;
rc = clock_settime(CLOCK_REALTIME, &ts);
saved_errno = errno;
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: clock_settime: %d: %s\n",
- rc, strerror(saved_errno));
- }
-#endif
+ TRACE(1, ("ntp_set_tod: clock_settime: %d %m\n", rc));
if (!tod && !rc)
tod = SET_TOD_CLOCK_SETTIME;
@@ -476,12 +471,7 @@ ntp_set_tod(
errno = 0;
rc = SETTIMEOFDAY(tvp, tzp);
saved_errno = errno;
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: settimeofday: %d: %s\n",
- rc, strerror(saved_errno));
- }
-#endif
+ TRACE(1, ("ntp_set_tod: settimeofday: %d %m\n", rc));
if (!tod && !rc)
tod = SET_TOD_SETTIMEOFDAY;
}
@@ -493,23 +483,15 @@ ntp_set_tod(
errno = 0;
rc = stime(&tp); /* lie as bad as SysVR4 */
saved_errno = errno;
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: stime: %d: %s\n",
- rc, strerror(saved_errno));
- }
-#endif
+ TRACE(1, ("ntp_set_tod: stime: %d %m\n", rc));
if (!tod && !rc)
tod = SET_TOD_STIME;
}
#endif /* HAVE_STIME */
-#ifdef DEBUG
- if (debug) {
- printf("ntp_set_tod: Final result: %s: %d: %s\n",
- set_tod_used[tod], rc, strerror(saved_errno));
- }
-#endif
+ errno = saved_errno; /* for %m below */
+ TRACE(1, ("ntp_set_tod: Final result: %s: %d %m\n",
+ set_tod_used[tod], rc));
/*
* Say how we're setting the time of day
*/
@@ -549,16 +531,3 @@ getpass(const char * prompt)
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/libntp/memmove.c b/libntp/memmove.c
deleted file mode 100644
index 8ccc4b1bb3c4..000000000000
--- a/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/libntp/mfptoa.c b/libntp/mfptoa.c
deleted file mode 100644
index 6450b2c136be..000000000000
--- a/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/libntp/mfptoms.c b/libntp/mfptoms.c
deleted file mode 100644
index d2bfd71eecee..000000000000
--- a/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/libntp/mktime.c b/libntp/mktime.c
index f5590d1c0d61..50d2a0810408 100644
--- a/libntp/mktime.c
+++ b/libntp/mktime.c
@@ -59,9 +59,10 @@
* by hand. Sorry about that.
*/
+#include <config.h>
#include "ntp_machine.h"
-#if !defined(HAVE_MKTIME) || !defined(HAVE_TIMEGM)
+#if !defined(HAVE_MKTIME) || ( !defined(HAVE_TIMEGM) && defined(WANT_TIMEGM) )
#if SIZEOF_TIME_T >= 8
#error libntp supplied mktime()/timegm() do not support 64-bit time_t
@@ -288,6 +289,7 @@ mktime(
}
#endif /* !HAVE_MKTIME */
+#ifdef WANT_TIMEGM
#ifndef HAVE_TIMEGM
time_t
timegm(
@@ -305,3 +307,4 @@ timegm(
return WRONG;
}
#endif /* !HAVE_TIMEGM */
+#endif /* WANT_TIMEGM */
diff --git a/libntp/modetoa.c b/libntp/modetoa.c
index 9daf1bb1239f..b476bc9e90f2 100644
--- a/libntp/modetoa.c
+++ b/libntp/modetoa.c
@@ -1,6 +1,7 @@
/*
* modetoa - return an asciized mode
*/
+#include <config.h>
#include <stdio.h>
#include "lib_strbuf.h"
@@ -12,7 +13,7 @@ modetoa(
)
{
char *bp;
- static const char *modestrings[] = {
+ static const char * const modestrings[] = {
"unspec",
"sym_active",
"sym_passive",
diff --git a/libntp/mstolfp.c b/libntp/mstolfp.c
index e4e909df7dbe..1a1a02b5fc46 100644
--- a/libntp/mstolfp.c
+++ b/libntp/mstolfp.c
@@ -1,6 +1,7 @@
/*
* mstolfp - convert an ascii string in milliseconds to an l_fp number
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libntp/msutotsf.c b/libntp/msutotsf.c
deleted file mode 100644
index eb3babe9cd1a..000000000000
--- a/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/libntp/msyslog.c b/libntp/msyslog.c
index 60f8a1309e86..283414d74423 100644
--- a/libntp/msyslog.c
+++ b/libntp/msyslog.c
@@ -15,8 +15,9 @@
#endif
#include <stdio.h>
-#include "ntp.h"
#include "ntp_string.h"
+#include "ntp.h"
+#include "ntp_debug.h"
#include "ntp_syslog.h"
#ifdef SYS_WINNT
@@ -25,20 +26,116 @@
#endif
-int syslogit = 1;
+int syslogit = TRUE;
int msyslog_term = FALSE; /* duplicate to stdout/err */
+int msyslog_term_pid = TRUE;
+int msyslog_include_timestamp = TRUE;
FILE * syslog_file;
+char * syslog_fname;
+char * syslog_abs_fname;
-u_int32 ntp_syslogmask = ~(u_int32)0; /* libntp default is all lit */
+/* libntp default ntp_syslogmask is all bits lit */
+#define INIT_NTP_SYSLOGMASK ~(u_int32)0
+u_int32 ntp_syslogmask = INIT_NTP_SYSLOGMASK;
extern char * progname;
/* Declare the local functions */
void addto_syslog (int, const char *);
+#ifndef VSNPRINTF_PERCENT_M
void format_errmsg (char *, size_t, const char *, int);
+/* format_errmsg() is under #ifndef VSNPRINTF_PERCENT_M above */
+void
+format_errmsg(
+ char * nfmt,
+ size_t lennfmt,
+ const char * fmt,
+ int errval
+ )
+{
+ char errmsg[256];
+ char c;
+ char *n;
+ const char *f;
+ size_t len;
+
+ n = nfmt;
+ f = fmt;
+ while ((c = *f++) != '\0' && n < (nfmt + lennfmt - 1)) {
+ if (c != '%') {
+ *n++ = c;
+ continue;
+ }
+ if ((c = *f++) != 'm') {
+ *n++ = '%';
+ if ('\0' == c)
+ break;
+ *n++ = c;
+ continue;
+ }
+ errno_to_str(errval, errmsg, sizeof(errmsg));
+ len = strlen(errmsg);
+
+ /* Make sure we have enough space for the error message */
+ if ((n + len) < (nfmt + lennfmt - 1)) {
+ memcpy(n, errmsg, len);
+ n += len;
+ }
+ }
+ *n = '\0';
+}
+#endif /* VSNPRINTF_PERCENT_M */
+
/*
+ * errno_to_str() - a thread-safe strerror() replacement.
+ * Hides the varied signatures of strerror_r().
+ * For Windows, we have:
+ * #define errno_to_str isc_strerror
+ */
+#ifndef errno_to_str
+void
+errno_to_str(
+ int err,
+ char * buf,
+ size_t bufsiz
+ )
+{
+# if defined(STRERROR_R_CHAR_P) || !HAVE_DECL_STRERROR_R
+ char * pstatic;
+
+ buf[0] = '\0';
+# ifdef STRERROR_R_CHAR_P
+ pstatic = strerror_r(err, buf, bufsiz);
+# else
+ pstatic = strerror(err);
+# endif
+ if (NULL == pstatic && '\0' == buf[0])
+ snprintf(buf, bufsiz, "%s(%d): errno %d",
+# ifdef STRERROR_R_CHAR_P
+ "strerror_r",
+# else
+ "strerror",
+# endif
+ err, errno);
+ /* protect against believing an int return is a pointer */
+ else if (pstatic != buf && pstatic > (char *)bufsiz)
+ strlcpy(buf, pstatic, bufsiz);
+# else
+ int rc;
+
+ rc = strerror_r(err, buf, bufsiz);
+ if (rc < 0)
+ snprintf(buf, bufsiz, "strerror_r(%d): errno %d",
+ err, errno);
+# endif
+}
+#endif /* errno_to_str */
+
+
+/*
+ * addto_syslog()
* This routine adds the contents of a buffer to the syslog or an
* application-specific logfile.
*/
@@ -55,6 +152,7 @@ addto_syslog(
FILE * term_file;
int log_to_term;
int log_to_file;
+ int pid;
const char * nl_or_empty;
const char * human_time;
@@ -87,7 +185,14 @@ addto_syslog(
return;
/* syslog() adds the timestamp, name, and pid */
- human_time = humanlogtime();
+ if (msyslog_include_timestamp)
+ human_time = humanlogtime();
+ else /* suppress gcc pot. uninit. warning */
+ human_time = NULL;
+ if (msyslog_term_pid || log_to_file)
+ pid = getpid();
+ else /* suppress gcc pot. uninit. warning */
+ pid = -1;
/* syslog() adds trailing \n if not present */
if ('\n' != msg[strlen(msg) - 1])
@@ -99,60 +204,24 @@ addto_syslog(
term_file = (level <= LOG_ERR)
? stderr
: stdout;
- fprintf(term_file, "%s %s[%d]: %s%s", human_time, prog,
- (int)getpid(), msg, nl_or_empty);
+ if (msyslog_include_timestamp)
+ fprintf(term_file, "%s ", human_time);
+ if (msyslog_term_pid)
+ fprintf(term_file, "%s[%d]: ", prog, pid);
+ fprintf(term_file, "%s%s", msg, nl_or_empty);
fflush(term_file);
}
if (log_to_file) {
- fprintf(syslog_file, "%s %s[%d]: %s%s", human_time,
- prog, (int)getpid(), msg, nl_or_empty);
+ if (msyslog_include_timestamp)
+ fprintf(syslog_file, "%s ", human_time);
+ fprintf(syslog_file, "%s[%d]: %s%s", prog, pid, msg,
+ nl_or_empty);
fflush(syslog_file);
}
}
-void
-format_errmsg(
- char * nfmt,
- size_t lennfmt,
- const char * fmt,
- int errval
- )
-{
- char c;
- char *n;
- const char *f;
- size_t len;
- char *err;
-
- n = nfmt;
- f = fmt;
- while ((c = *f++) != '\0' && n < (nfmt + lennfmt - 1)) {
- if (c != '%') {
- *n++ = c;
- continue;
- }
- if ((c = *f++) != 'm') {
- *n++ = '%';
- if ('\0' == c)
- break;
- *n++ = c;
- continue;
- }
- err = strerror(errval);
- len = strlen(err);
-
- /* Make sure we have enough space for the error message */
- if ((n + len) < (nfmt + lennfmt - 1)) {
- memcpy(n, err, len);
- n += len;
- }
- }
- *n = '\0';
-}
-
-
int
mvsnprintf(
char * buf,
@@ -287,3 +356,217 @@ msyslog(
va_end(ap);
addto_syslog(level, buf);
}
+
+
+/*
+ * Initialize the logging
+ *
+ * Called once per process, including forked children.
+ */
+void
+init_logging(
+ const char * name,
+ u_int32 def_syslogmask,
+ int is_daemon
+ )
+{
+ static int was_daemon;
+ const char * cp;
+ const char * pname;
+
+ /*
+ * ntpd defaults to only logging sync-category events, when
+ * NLOG() is used to conditionalize. Other libntp clients
+ * leave it alone so that all NLOG() conditionals will fire.
+ * This presumes all bits lit in ntp_syslogmask can't be
+ * configured via logconfig and all lit is thereby a sentinel
+ * that ntp_syslogmask is still at its default from libntp,
+ * keeping in mind this function is called in forked children
+ * where it has already been called in the parent earlier.
+ * Forked children pass 0 for def_syslogmask.
+ */
+ if (INIT_NTP_SYSLOGMASK == ntp_syslogmask &&
+ 0 != def_syslogmask)
+ ntp_syslogmask = def_syslogmask; /* set more via logconfig */
+
+ /*
+ * Logging. This may actually work on the gizmo board. Find a name
+ * to log with by using the basename
+ */
+ cp = strrchr(name, DIR_SEP);
+ if (NULL == cp)
+ pname = name;
+ else
+ pname = 1 + cp; /* skip DIR_SEP */
+ progname = estrdup(pname);
+#ifdef SYS_WINNT /* strip ".exe" */
+ cp = strrchr(progname, '.');
+ if (NULL != cp && !strcasecmp(cp, ".exe"))
+ progname[cp - progname] = '\0';
+#endif
+
+#if !defined(VMS)
+
+ if (is_daemon)
+ was_daemon = TRUE;
+# ifndef LOG_DAEMON
+ openlog(progname, LOG_PID);
+# else /* LOG_DAEMON */
+
+# ifndef LOG_NTP
+# define LOG_NTP LOG_DAEMON
+# endif
+ openlog(progname, LOG_PID | LOG_NDELAY, (was_daemon)
+ ? LOG_NTP
+ : 0);
+# ifdef DEBUG
+ if (debug)
+ setlogmask(LOG_UPTO(LOG_DEBUG));
+ else
+# endif /* DEBUG */
+ setlogmask(LOG_UPTO(LOG_DEBUG)); /* @@@ was INFO */
+# endif /* LOG_DAEMON */
+#endif /* !VMS */
+}
+
+
+/*
+ * change_logfile()
+ *
+ * Used to change from syslog to a logfile, or from one logfile to
+ * another, and to reopen logfiles after forking. On systems where
+ * ntpd forks, deals with converting relative logfile paths to
+ * absolute (root-based) because we reopen logfiles after the current
+ * directory has changed.
+ */
+int
+change_logfile(
+ const char * fname,
+ int leave_crumbs
+ )
+{
+ FILE * new_file;
+ const char * log_fname;
+ char * abs_fname;
+#if !defined(SYS_WINNT) && !defined(SYS_VXWORKS) && !defined(VMS)
+ char curdir[512];
+ size_t cd_octets;
+ size_t octets;
+#endif /* POSIX */
+
+ NTP_REQUIRE(fname != NULL);
+ log_fname = fname;
+
+ /*
+ * In a forked child of a parent which is logging to a file
+ * instead of syslog, syslog_file will be NULL and both
+ * syslog_fname and syslog_abs_fname will be non-NULL.
+ * If we are given the same filename previously opened
+ * and it's still open, there's nothing to do here.
+ */
+ if (syslog_file != NULL && syslog_fname != NULL &&
+ 0 == strcmp(syslog_fname, log_fname))
+ return 0;
+
+ if (0 == strcmp(log_fname, "stderr")) {
+ new_file = stderr;
+ abs_fname = estrdup(log_fname);
+ } else if (0 == strcmp(log_fname, "stdout")) {
+ new_file = stdout;
+ abs_fname = estrdup(log_fname);
+ } else {
+ if (syslog_fname != NULL &&
+ 0 == strcmp(log_fname, syslog_fname))
+ log_fname = syslog_abs_fname;
+#if !defined(SYS_WINNT) && !defined(SYS_VXWORKS) && !defined(VMS)
+ if (log_fname != syslog_abs_fname &&
+ DIR_SEP != log_fname[0] &&
+ 0 != strcmp(log_fname, "stderr") &&
+ 0 != strcmp(log_fname, "stdout") &&
+ NULL != getcwd(curdir, sizeof(curdir))) {
+ cd_octets = strlen(curdir);
+ /* trim any trailing '/' */
+ if (cd_octets > 1 &&
+ DIR_SEP == curdir[cd_octets - 1])
+ cd_octets--;
+ octets = cd_octets;
+ octets += 1; /* separator '/' */
+ octets += strlen(log_fname);
+ octets += 1; /* NUL terminator */
+ abs_fname = emalloc(octets);
+ snprintf(abs_fname, octets, "%.*s%c%s",
+ (int)cd_octets, curdir, DIR_SEP,
+ log_fname);
+ } else
+#endif
+ abs_fname = estrdup(log_fname);
+ TRACE(1, ("attempting to open log %s\n", abs_fname));
+ new_file = fopen(abs_fname, "a");
+ }
+
+ if (NULL == new_file) {
+ free(abs_fname);
+ return -1;
+ }
+
+ /* leave a pointer in the old log */
+ if (leave_crumbs && (syslogit || log_fname != syslog_abs_fname))
+ msyslog(LOG_NOTICE, "switching logging to file %s",
+ abs_fname);
+
+ if (syslog_file != NULL &&
+ syslog_file != stderr && syslog_file != stdout &&
+ fileno(syslog_file) != fileno(new_file))
+ fclose(syslog_file);
+ syslog_file = new_file;
+ if (log_fname == syslog_abs_fname) {
+ free(abs_fname);
+ } else {
+ if (syslog_abs_fname != NULL &&
+ syslog_abs_fname != syslog_fname)
+ free(syslog_abs_fname);
+ if (syslog_fname != NULL)
+ free(syslog_fname);
+ syslog_fname = estrdup(log_fname);
+ syslog_abs_fname = abs_fname;
+ }
+ syslogit = FALSE;
+
+ return 0;
+}
+
+
+/*
+ * setup_logfile()
+ *
+ * Redirect logging to a file if requested with -l/--logfile or via
+ * ntp.conf logfile directive.
+ *
+ * This routine is invoked three different times in the sequence of a
+ * typical daemon ntpd with DNS lookups to do. First it is invoked in
+ * the original ntpd process, then again in the daemon after closing
+ * all descriptors. In both of those cases, ntp.conf has not been
+ * processed, so only -l/--logfile will trigger logfile redirection in
+ * those invocations. Finally, if DNS names are resolved, the worker
+ * child invokes this routine after its fork and close of all
+ * descriptors. In this case, ntp.conf has been processed and any
+ * "logfile" directive needs to be honored in the child as well.
+ */
+void
+setup_logfile(
+ const char * name
+ )
+{
+ if (NULL == syslog_fname && NULL != name) {
+ if (-1 == change_logfile(name, TRUE))
+ msyslog(LOG_ERR, "Cannot open log file %s, %m",
+ name);
+ return ;
+ }
+ if (NULL == syslog_fname)
+ return;
+
+ if (-1 == change_logfile(syslog_fname, FALSE))
+ msyslog(LOG_ERR, "Cannot reopen log file %s, %m",
+ syslog_fname);
+}
diff --git a/libntp/netof.c b/libntp/netof.c
index 55a4092befe1..c8831c3dd9cd 100644
--- a/libntp/netof.c
+++ b/libntp/netof.c
@@ -2,6 +2,7 @@
* netof - return the net address part of an ip address in a sockaddr_storage structure
* (zero out host part)
*/
+#include <config.h>
#include <stdio.h>
#include <syslog.h>
@@ -42,7 +43,7 @@ netof(
} else if (IS_IPV6(netaddr))
/* assume the typical /64 subnet size */
- memset(&NSRCADR6(netaddr)[8], 0, 8);
+ zero_mem(&NSRCADR6(netaddr)[8], 8);
#ifdef DEBUG
else {
msyslog(LOG_ERR, "netof unknown AF %d", AF(netaddr));
diff --git a/libntp/ntp_calendar.c b/libntp/ntp_calendar.c
new file mode 100644
index 000000000000..e557f4ec682e
--- /dev/null
+++ b/libntp/ntp_calendar.c
@@ -0,0 +1,1615 @@
+/*
+ * ntp_calendar.c - calendar and helper functions
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ */
+#include <config.h>
+#include <sys/types.h>
+
+#include "ntp_types.h"
+#include "ntp_calendar.h"
+#include "ntp_stdlib.h"
+#include "ntp_fp.h"
+#include "ntp_unixtime.h"
+
+/*
+ *---------------------------------------------------------------------
+ * replacing the 'time()' function
+ * --------------------------------------------------------------------
+ */
+
+static systime_func_ptr systime_func = &time;
+static inline time_t now(void);
+
+
+systime_func_ptr
+ntpcal_set_timefunc(
+ systime_func_ptr nfunc
+ )
+{
+ systime_func_ptr res;
+
+ res = systime_func;
+ if (NULL == nfunc)
+ nfunc = &time;
+ systime_func = nfunc;
+
+ return res;
+}
+
+
+static inline time_t
+now(void)
+{
+ return (*systime_func)(NULL);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert between 'time_t' and 'vint64'
+ *---------------------------------------------------------------------
+ */
+vint64
+time_to_vint64(
+ const time_t * ptt
+ )
+{
+ vint64 res;
+ time_t tt;
+
+ tt = *ptt;
+
+#if SIZEOF_TIME_T <= 4
+
+ res.D_s.hi = 0;
+ if (tt < 0) {
+ res.D_s.lo = (uint32_t)-tt;
+ M_NEG(res.D_s.hi, res.D_s.lo);
+ } else {
+ res.D_s.lo = (uint32_t)tt;
+ }
+
+#elif defined(HAVE_INT64)
+
+ res.q_s = tt;
+
+#else
+ /*
+ * shifting negative signed quantities is compiler-dependent, so
+ * we better avoid it and do it all manually. And shifting more
+ * than the width of a quantity is undefined. Also a don't do!
+ */
+ if (tt < 0) {
+ tt = -tt;
+ res.D_s.lo = (uint32_t)tt;
+ res.D_s.hi = (uint32_t)(tt >> 32);
+ M_NEG(res.D_s.hi, res.D_s.lo);
+ } else {
+ res.D_s.lo = (uint32_t)tt;
+ res.D_s.hi = (uint32_t)(tt >> 32);
+ }
+
+#endif
+
+ return res;
+}
+
+
+time_t
+vint64_to_time(
+ const vint64 *tv
+ )
+{
+ time_t res;
+
+#if SIZEOF_TIME_T <= 4
+
+ res = (time_t)tv->D_s.lo;
+
+#elif defined(HAVE_INT64)
+
+ res = (time_t)tv->q_s;
+
+#else
+
+ res = ((time_t)tv->d_s.hi << 32) | tv->D_s.lo;
+
+#endif
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Get the build date & time
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_get_build_date(
+ struct calendar * jd
+ )
+{
+ /* The C standard tells us the format of '__DATE__':
+ *
+ * __DATE__ The date of translation of the preprocessing
+ * translation unit: a character string literal of the form "Mmm
+ * dd yyyy", where the names of the months are the same as those
+ * generated by the asctime function, and the first character of
+ * dd is a space character if the value is less than 10. If the
+ * date of translation is not available, an
+ * implementation-defined valid date shall be supplied.
+ *
+ * __TIME__ The time of translation of the preprocessing
+ * translation unit: a character string literal of the form
+ * "hh:mm:ss" as in the time generated by the asctime
+ * function. If the time of translation is not available, an
+ * implementation-defined valid time shall be supplied.
+ *
+ * Note that MSVC declares DATE and TIME to be in the local time
+ * zone, while neither the C standard nor the GCC docs make any
+ * statement about this. As a result, we may be +/-12hrs off
+ * UTC. But for practical purposes, this should not be a
+ * problem.
+ *
+ */
+ static const char build[] = __TIME__ "/" __DATE__;
+ static const char mlist[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
+
+ char monstr[4];
+ const char * cp;
+ unsigned short hour, minute, second, day, year;
+ /* Note: The above quantities are used for sscanf 'hu' format,
+ * so using 'uint16_t' is contra-indicated!
+ */
+
+#ifdef DEBUG
+ static int ignore = 0;
+#endif
+
+ ZERO(*jd);
+ jd->year = 1970;
+ jd->month = 1;
+ jd->monthday = 1;
+
+#ifdef DEBUG
+ /* check environment if build date should be ignored */
+ if (0 == ignore) {
+ const char * envstr;
+ envstr = getenv("NTPD_IGNORE_BUILD_DATE");
+ ignore = 1 + (envstr && (!*envstr || !strcasecmp(envstr, "yes")));
+ }
+ if (ignore > 1)
+ return FALSE;
+#endif
+
+ if (6 == sscanf(build, "%hu:%hu:%hu/%3s %hu %hu",
+ &hour, &minute, &second, monstr, &day, &year)) {
+ cp = strstr(mlist, monstr);
+ if (NULL != cp) {
+ jd->year = year;
+ jd->month = (uint8_t)((cp - mlist) / 3 + 1);
+ jd->monthday = (uint8_t)day;
+ jd->hour = (uint8_t)hour;
+ jd->minute = (uint8_t)minute;
+ jd->second = (uint8_t)second;
+
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+
+/*
+ *---------------------------------------------------------------------
+ * basic calendar stuff
+ * --------------------------------------------------------------------
+ */
+
+/* month table for a year starting with March,1st */
+static const uint16_t shift_month_table[13] = {
+ 0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337, 366
+};
+
+/* month tables for years starting with January,1st; regular & leap */
+static const uint16_t real_month_table[2][13] = {
+ /* -*- table for regular years -*- */
+ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+ /* -*- table for leap years -*- */
+ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
+};
+
+/*
+ * Some notes on the terminology:
+ *
+ * We use the proleptic Gregorian calendar, which is the Gregorian
+ * calendar extended in both directions ad infinitum. This totally
+ * disregards the fact that this calendar was invented in 1582, and
+ * was adopted at various dates over the world; sometimes even after
+ * the start of the NTP epoch.
+ *
+ * Normally date parts are given as current cycles, while time parts
+ * are given as elapsed cycles:
+ *
+ * 1970-01-01/03:04:05 means 'IN the 1970st. year, IN the first month,
+ * ON the first day, with 3hrs, 4minutes and 5 seconds elapsed.
+ *
+ * The basic calculations for this calendar implementation deal with
+ * ELAPSED date units, which is the number of full years, full months
+ * and full days before a date: 1970-01-01 would be (1969, 0, 0) in
+ * that notation.
+ *
+ * To ease the numeric computations, month and day values outside the
+ * normal range are acceptable: 2001-03-00 will be treated as the day
+ * before 2001-03-01, 2000-13-32 will give the same result as
+ * 2001-02-01 and so on.
+ *
+ * 'rd' or 'RD' is used as an abbreviation for the latin 'rata die'
+ * (day number). This is the number of days elapsed since 0000-12-31
+ * in the proleptic Gregorian calendar. The begin of the Christian Era
+ * (0001-01-01) is RD(1).
+ *
+ *
+ * Some notes on the implementation:
+ *
+ * Calendar algorithms thrive on the division operation, which is one of
+ * the slowest numerical operations in any CPU. What saves us here from
+ * abysmal performance is the fact that all divisions are divisions by
+ * constant numbers, and most compilers can do this by a multiplication
+ * operation. But this might not work when using the div/ldiv/lldiv
+ * function family, because many compilers are not able to do inline
+ * expansion of the code with following optimisation for the
+ * constant-divider case.
+ *
+ * Also div/ldiv/lldiv are defined in terms of int/long/longlong, which
+ * are inherently target dependent. Nothing that could not be cured with
+ * autoconf, but still a mess...
+ *
+ * Furthermore, we need floor division while C demands truncation to
+ * zero, so additional steps are required to make sure the algorithms
+ * work.
+ *
+ * For all this, all divisions by constant are coded manually, even when
+ * there is a joined div/mod operation: The optimiser should sort that
+ * out, if possible.
+ *
+ * Finally, the functions do not check for overflow conditions. This
+ * is a sacrifice made for execution speed; since a 32-bit day counter
+ * covers +/- 5,879,610 years, this should not pose a problem here.
+ */
+
+
+/*
+ * ==================================================================
+ *
+ * General algorithmic stuff
+ *
+ * ==================================================================
+ */
+
+/*
+ *---------------------------------------------------------------------
+ * Do a periodic extension of 'value' around 'pivot' with a period of
+ * 'cycle'.
+ *
+ * The result 'res' is a number that holds to the following properties:
+ *
+ * 1) res MOD cycle == value MOD cycle
+ * 2) pivot <= res < pivot + cycle
+ * (replace </<= with >/>= for negative cycles)
+ *
+ * where 'MOD' denotes the modulo operator for FLOOR DIVISION, which
+ * is not the same as the '%' operator in C: C requires division to be
+ * a truncated division, where remainder and dividend have the same
+ * sign if the remainder is not zero, whereas floor division requires
+ * divider and modulus to have the same sign for a non-zero modulus.
+ *
+ * This function has some useful applications:
+ *
+ * + let Y be a calendar year and V a truncated 2-digit year: then
+ * periodic_extend(Y-50, V, 100)
+ * is the closest expansion of the truncated year with respect to
+ * the full year, that is a 4-digit year with a difference of less
+ * than 50 years to the year Y. ("century unfolding")
+ *
+ * + let T be a UN*X time stamp and V be seconds-of-day: then
+ * perodic_extend(T-43200, V, 86400)
+ * is a time stamp that has the same seconds-of-day as the input
+ * value, with an absolute difference to T of <= 12hrs. ("day
+ * unfolding")
+ *
+ * + Wherever you have a truncated periodic value and a non-truncated
+ * base value and you want to match them somehow...
+ *
+ * Basically, the function delivers 'pivot + (value - pivot) % cycle',
+ * but the implementation takes some pains to avoid internal signed
+ * integer overflows in the '(value - pivot) % cycle' part and adheres
+ * to the floor division convention.
+ *
+ * If 64bit scalars where available on all intended platforms, writing a
+ * version that uses 64 bit ops would be easy; writing a general
+ * division routine for 64bit ops on a platform that can only do
+ * 32/16bit divisions and is still performant is a bit more
+ * difficult. Since most usecases can be coded in a way that does only
+ * require the 32-bit version a 64bit version is NOT provided here.
+ * ---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_periodic_extend(
+ int32_t pivot,
+ int32_t value,
+ int32_t cycle
+ )
+{
+ uint32_t diff;
+ char cpl = 0; /* modulo complement flag */
+ char neg = 0; /* sign change flag */
+
+ /* make the cycle positive and adjust the flags */
+ if (cycle < 0) {
+ cycle = - cycle;
+ neg ^= 1;
+ cpl ^= 1;
+ }
+ /* guard against div by zero or one */
+ if (cycle > 1) {
+ /*
+ * Get absolute difference as unsigned quantity and
+ * the complement flag. This is done by always
+ * subtracting the smaller value from the bigger
+ * one. This implementation works only on a two's
+ * complement machine!
+ */
+ if (value >= pivot) {
+ diff = (uint32_t)value - (uint32_t)pivot;
+ } else {
+ diff = (uint32_t)pivot - (uint32_t)value;
+ cpl ^= 1;
+ }
+ diff %= (uint32_t)cycle;
+ if (diff) {
+ if (cpl)
+ diff = cycle - diff;
+ if (neg)
+ diff = ~diff + 1;
+ pivot += diff;
+ }
+ }
+ return pivot;
+}
+
+/*
+ *-------------------------------------------------------------------
+ * Convert a timestamp in NTP scale to a 64bit seconds value in the UN*X
+ * scale with proper epoch unfolding around a given pivot or the current
+ * system time. This function happily accepts negative pivot values as
+ * timestamps befor 1970-01-01, so be aware of possible trouble on
+ * platforms with 32bit 'time_t'!
+ *
+ * This is also a periodic extension, but since the cycle is 2^32 and
+ * the shift is 2^31, we can do some *very* fast math without explicit
+ * divisions.
+ *-------------------------------------------------------------------
+ */
+vint64
+ntpcal_ntp_to_time(
+ uint32_t ntp,
+ const time_t * pivot
+ )
+{
+ vint64 res;
+
+#ifdef HAVE_INT64
+
+ res.q_s = (pivot != NULL)
+ ? *pivot
+ : now();
+ res.Q_s -= 0x80000000; /* unshift of half range */
+ ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
+ ntp -= res.D_s.lo; /* cycle difference */
+ res.Q_s += (uint64_t)ntp; /* get expanded time */
+
+#else /* no 64bit scalars */
+
+ time_t tmp;
+
+ tmp = (pivot != NULL)
+ ? *pivot
+ : now();
+ res = time_to_vint64(&tmp);
+ M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000);
+ ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
+ ntp -= res.D_s.lo; /* cycle difference */
+ M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
+
+#endif /* no 64bit scalars */
+
+ return res;
+}
+
+/*
+ *-------------------------------------------------------------------
+ * Convert a timestamp in NTP scale to a 64bit seconds value in the NTP
+ * scale with proper epoch unfolding around a given pivot or the current
+ * system time.
+ *
+ * Note: The pivot must be given in the UN*X time domain!
+ *
+ * This is also a periodic extension, but since the cycle is 2^32 and
+ * the shift is 2^31, we can do some *very* fast math without explicit
+ * divisions.
+ *-------------------------------------------------------------------
+ */
+vint64
+ntpcal_ntp_to_ntp(
+ uint32_t ntp,
+ const time_t *pivot
+ )
+{
+ vint64 res;
+
+#ifdef HAVE_INT64
+
+ res.q_s = (pivot)
+ ? *pivot
+ : now();
+ res.Q_s -= 0x80000000; /* unshift of half range */
+ res.Q_s += (uint32_t)JAN_1970; /* warp into NTP domain */
+ ntp -= res.D_s.lo; /* cycle difference */
+ res.Q_s += (uint64_t)ntp; /* get expanded time */
+
+#else /* no 64bit scalars */
+
+ time_t tmp;
+
+ tmp = (pivot)
+ ? *pivot
+ : now();
+ res = time_to_vint64(&tmp);
+ M_SUB(res.D_s.hi, res.D_s.lo, 0, 0x80000000u);
+ M_ADD(res.D_s.hi, res.D_s.lo, 0, (uint32_t)JAN_1970);/*into NTP */
+ ntp -= res.D_s.lo; /* cycle difference */
+ M_ADD(res.D_s.hi, res.D_s.lo, 0, ntp);
+
+#endif /* no 64bit scalars */
+
+ return res;
+}
+
+
+/*
+ * ==================================================================
+ *
+ * Splitting values to composite entities
+ *
+ * ==================================================================
+ */
+
+/*
+ *-------------------------------------------------------------------
+ * Split a 64bit seconds value into elapsed days in 'res.hi' and
+ * elapsed seconds since midnight in 'res.lo' using explicit floor
+ * division. This function happily accepts negative time values as
+ * timestamps before the respective epoch start.
+ * -------------------------------------------------------------------
+ */
+ntpcal_split
+ntpcal_daysplit(
+ const vint64 *ts
+ )
+{
+ ntpcal_split res;
+
+#ifdef HAVE_INT64
+
+ /* manual floor division by SECSPERDAY */
+ res.hi = (int32_t)(ts->q_s / SECSPERDAY);
+ res.lo = (int32_t)(ts->q_s % SECSPERDAY);
+ if (res.lo < 0) {
+ res.hi -= 1;
+ res.lo += SECSPERDAY;
+ }
+
+#else
+
+ /*
+ * since we do not have 64bit ops, we have to this by hand.
+ * Luckily SECSPERDAY is 86400 is 675*128, so we do the division
+ * using chained 32/16 bit divisions and shifts.
+ */
+ vint64 op;
+ uint32_t q, r, a;
+ int isneg;
+
+ memcpy(&op, ts, sizeof(op));
+ /* fix sign */
+ isneg = M_ISNEG(op.D_s.hi);
+ if (isneg)
+ M_NEG(op.D_s.hi, op.D_s.lo);
+
+ /* save remainder of DIV 128, shift for divide */
+ r = op.D_s.lo & 127; /* save remainder bits */
+ op.D_s.lo = (op.D_s.lo >> 7) | (op.D_s.hi << 25);
+ op.D_s.hi = (op.D_s.hi >> 7);
+
+ /* now do a mnual division, trying to remove as many ops as
+ * possible -- division is always slow! An since we do not have
+ * the advantage of a specific 64/32 bit or even a specific 32/16
+ * bit division op, but must use the general 32/32bit division
+ * even if we *know* the divider fits into unsigned 16 bits, the
+ * exra code pathes should pay off.
+ */
+ a = op.D_s.hi;
+ if (a > 675u)
+ a = a % 675u;
+ if (a) {
+ a = (a << 16) | op.W_s.lh;
+ q = a / 675u;
+ a = a % 675u;
+
+ a = (a << 16) | op.W_s.ll;
+ q = (q << 16) | (a / 675u);
+ } else {
+ a = op.D_s.lo;
+ q = a / 675u;
+ }
+ a = a % 675u;
+
+ /* assemble remainder */
+ r |= a << 7;
+
+ /* fix sign of result */
+ if (isneg) {
+ if (r) {
+ r = SECSPERDAY - r;
+ q = ~q;
+ } else
+ q = ~q + 1;
+ }
+
+ res.hi = q;
+ res.lo = r;
+
+#endif
+ return res;
+}
+
+/*
+ *-------------------------------------------------------------------
+ * Split a 32bit seconds value into h/m/s and excessive days. This
+ * function happily accepts negative time values as timestamps before
+ * midnight.
+ * -------------------------------------------------------------------
+ */
+static int32_t
+priv_timesplit(
+ int32_t split[3],
+ int32_t ts
+ )
+{
+ int32_t days = 0;
+
+ /* make sure we have a positive offset into a day */
+ if (ts < 0 || ts >= SECSPERDAY) {
+ days = ts / SECSPERDAY;
+ ts = ts % SECSPERDAY;
+ if (ts < 0) {
+ days -= 1;
+ ts += SECSPERDAY;
+ }
+ }
+
+ /* get secs, mins, hours */
+ split[2] = (uint8_t)(ts % SECSPERMIN);
+ ts /= SECSPERMIN;
+ split[1] = (uint8_t)(ts % MINSPERHR);
+ split[0] = (uint8_t)(ts / MINSPERHR);
+
+ return days;
+}
+
+/*
+ * ---------------------------------------------------------------------
+ * Given the number of elapsed days in the calendar era, split this
+ * number into the number of elapsed years in 'res.hi' and the number
+ * of elapsed days of that year in 'res.lo'.
+ *
+ * if 'isleapyear' is not NULL, it will receive an integer that is 0 for
+ * regular years and a non-zero value for leap years.
+ *---------------------------------------------------------------------
+ */
+ntpcal_split
+ntpcal_split_eradays(
+ int32_t days,
+ int *isleapyear
+ )
+{
+ ntpcal_split res;
+ int32_t n400, n100, n004, n001, yday; /* calendar year cycles */
+
+ /*
+ * Split off calendar cycles, using floor division in the first
+ * step. After that first step, simple division does it because
+ * all operands are positive; alas, we have to be aware of the
+ * possibe cycle overflows for 100 years and 1 year, caused by
+ * the additional leap day.
+ */
+ n400 = days / GREGORIAN_CYCLE_DAYS;
+ yday = days % GREGORIAN_CYCLE_DAYS;
+ if (yday < 0) {
+ n400 -= 1;
+ yday += GREGORIAN_CYCLE_DAYS;
+ }
+ n100 = yday / GREGORIAN_NORMAL_CENTURY_DAYS;
+ yday = yday % GREGORIAN_NORMAL_CENTURY_DAYS;
+ n004 = yday / GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+ yday = yday % GREGORIAN_NORMAL_LEAP_CYCLE_DAYS;
+ n001 = yday / DAYSPERYEAR;
+ yday = yday % DAYSPERYEAR;
+
+ /*
+ * check for leap cycle overflows and calculate the leap flag
+ * if needed
+ */
+ if ((n001 | n100) > 3) {
+ /* hit last day of leap year */
+ n001 -= 1;
+ yday += DAYSPERYEAR;
+ if (isleapyear)
+ *isleapyear = 1;
+ } else if (isleapyear)
+ *isleapyear = (n001 == 3) && ((n004 != 24) || (n100 == 3));
+
+ /* now merge the cycles to elapsed years, using horner scheme */
+ res.hi = ((4*n400 + n100)*25 + n004)*4 + n001;
+ res.lo = yday;
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Given a number of elapsed days in a year and a leap year indicator,
+ * split the number of elapsed days into the number of elapsed months in
+ * 'res.hi' and the number of elapsed days of that month in 'res.lo'.
+ *
+ * This function will fail and return {-1,-1} if the number of elapsed
+ * days is not in the valid range!
+ *---------------------------------------------------------------------
+ */
+ntpcal_split
+ntpcal_split_yeardays(
+ int32_t eyd,
+ int isleapyear
+ )
+{
+ ntpcal_split res;
+ const uint16_t *lt; /* month length table */
+
+ /* check leap year flag and select proper table */
+ lt = real_month_table[(isleapyear != 0)];
+ if (0 <= eyd && eyd < lt[12]) {
+ /* get zero-based month by approximation & correction step */
+ res.hi = eyd >> 5; /* approx month; might be 1 too low */
+ if (lt[res.hi + 1] <= eyd) /* fixup approximative month value */
+ res.hi += 1;
+ res.lo = eyd - lt[res.hi];
+ } else {
+ res.lo = res.hi = -1;
+ }
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert a RD into the date part of a 'struct calendar'.
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_rd_to_date(
+ struct calendar *jd,
+ int32_t rd
+ )
+{
+ ntpcal_split split;
+ int leaps;
+ int retv;
+
+ leaps = 0;
+ retv = 0;
+ /* get day-of-week first */
+ jd->weekday = rd % 7;
+ if (jd->weekday >= 7) /* unsigned! */
+ jd->weekday += 7;
+
+ split = ntpcal_split_eradays(rd - 1, &leaps);
+ retv = leaps;
+ /* get year and day-of-year */
+ jd->year = (uint16_t)split.hi + 1;
+ if (jd->year != split.hi + 1) {
+ jd->year = 0;
+ retv = -1; /* bletch. overflow trouble. */
+ }
+ jd->yearday = (uint16_t)split.lo + 1;
+
+ /* convert to month and mday */
+ split = ntpcal_split_yeardays(split.lo, leaps);
+ jd->month = (uint8_t)split.hi + 1;
+ jd->monthday = (uint8_t)split.lo + 1;
+
+ return retv ? retv : leaps;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert a RD into the date part of a 'struct tm'.
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_rd_to_tm(
+ struct tm *utm,
+ int32_t rd
+ )
+{
+ ntpcal_split split;
+ int leaps;
+
+ leaps = 0;
+ /* get day-of-week first */
+ utm->tm_wday = rd % 7;
+ if (utm->tm_wday < 0)
+ utm->tm_wday += 7;
+
+ /* get year and day-of-year */
+ split = ntpcal_split_eradays(rd - 1, &leaps);
+ utm->tm_year = split.hi - 1899;
+ utm->tm_yday = split.lo; /* 0-based */
+
+ /* convert to month and mday */
+ split = ntpcal_split_yeardays(split.lo, leaps);
+ utm->tm_mon = split.hi; /* 0-based */
+ utm->tm_mday = split.lo + 1; /* 1-based */
+
+ return leaps;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Take a value of seconds since midnight and split it into hhmmss in a
+ * 'struct calendar'.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_daysec_to_date(
+ struct calendar *jd,
+ int32_t sec
+ )
+{
+ int32_t days;
+ int ts[3];
+
+ days = priv_timesplit(ts, sec);
+ jd->hour = (uint8_t)ts[0];
+ jd->minute = (uint8_t)ts[1];
+ jd->second = (uint8_t)ts[2];
+
+ return days;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Take a value of seconds since midnight and split it into hhmmss in a
+ * 'struct tm'.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_daysec_to_tm(
+ struct tm *utm,
+ int32_t sec
+ )
+{
+ int32_t days;
+ int32_t ts[3];
+
+ days = priv_timesplit(ts, sec);
+ utm->tm_hour = ts[0];
+ utm->tm_min = ts[1];
+ utm->tm_sec = ts[2];
+
+ return days;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * take a split representation for day/second-of-day and day offset
+ * and convert it to a 'struct calendar'. The seconds will be normalised
+ * into the range of a day, and the day will be adjusted accordingly.
+ *
+ * returns >0 if the result is in a leap year, 0 if in a regular
+ * year and <0 if the result did not fit into the calendar struct.
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_daysplit_to_date(
+ struct calendar *jd,
+ const ntpcal_split *ds,
+ int32_t dof
+ )
+{
+ dof += ntpcal_daysec_to_date(jd, ds->lo);
+ return ntpcal_rd_to_date(jd, ds->hi + dof);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * take a split representation for day/second-of-day and day offset
+ * and convert it to a 'struct tm'. The seconds will be normalised
+ * into the range of a day, and the day will be adjusted accordingly.
+ *
+ * returns 1 if the result is in a leap year and zero if in a regular
+ * year.
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_daysplit_to_tm(
+ struct tm *utm,
+ const ntpcal_split *ds ,
+ int32_t dof
+ )
+{
+ dof += ntpcal_daysec_to_tm(utm, ds->lo);
+
+ return ntpcal_rd_to_tm(utm, ds->hi + dof);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Take a UN*X time and convert to a calendar structure.
+ *---------------------------------------------------------------------
+ */
+int
+ntpcal_time_to_date(
+ struct calendar *jd,
+ const vint64 *ts
+ )
+{
+ ntpcal_split ds;
+
+ ds = ntpcal_daysplit(ts);
+ ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
+ ds.hi += DAY_UNIX_STARTS;
+
+ return ntpcal_rd_to_date(jd, ds.hi);
+}
+
+
+/*
+ * ==================================================================
+ *
+ * merging composite entities
+ *
+ * ==================================================================
+ */
+
+/*
+ *---------------------------------------------------------------------
+ * Merge a number of days and a number of seconds into seconds,
+ * expressed in 64 bits to avoid overflow.
+ *---------------------------------------------------------------------
+ */
+vint64
+ntpcal_dayjoin(
+ int32_t days,
+ int32_t secs
+ )
+{
+ vint64 res;
+
+#ifdef HAVE_INT64
+
+ res.q_s = days;
+ res.q_s *= SECSPERDAY;
+ res.q_s += secs;
+
+#else
+
+ uint32_t p1, p2;
+ int isneg;
+
+ /*
+ * res = days *86400 + secs, using manual 16/32 bit
+ * multiplications and shifts.
+ */
+ isneg = (days < 0);
+ if (isneg)
+ days = -days;
+
+ /* assemble days * 675 */
+ res.D_s.lo = (days & 0xFFFF) * 675u;
+ res.D_s.hi = 0;
+ p1 = (days >> 16) * 675u;
+ p2 = p1 >> 16;
+ p1 = p1 << 16;
+ M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+
+ /* mul by 128, using shift */
+ res.D_s.hi = (res.D_s.hi << 7) | (res.D_s.lo >> 25);
+ res.D_s.lo = (res.D_s.lo << 7);
+
+ /* fix sign */
+ if (isneg)
+ M_NEG(res.D_s.hi, res.D_s.lo);
+
+ /* properly add seconds */
+ p2 = 0;
+ if (secs < 0) {
+ p1 = (uint32_t)-secs;
+ M_NEG(p2, p1);
+ } else {
+ p1 = (uint32_t)secs;
+ }
+ M_ADD(res.D_s.hi, res.D_s.lo, p2, p1);
+
+#endif
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert elapsed years in Era into elapsed days in Era.
+ *
+ * To accomodate for negative values of years, floor division would be
+ * required for all division operations. This can be eased by first
+ * splitting the years into full 400-year cycles and years in the
+ * cycle. Only this operation must be coded as a full floor division; as
+ * the years in the cycle is a non-negative number, all other divisions
+ * can be regular truncated divisions.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_days_in_years(
+ int32_t years
+ )
+{
+ int32_t cycle; /* full gregorian cycle */
+
+ /* split off full calendar cycles, using floor division */
+ cycle = years / 400;
+ years = years % 400;
+ if (years < 0) {
+ cycle -= 1;
+ years += 400;
+ }
+
+ /*
+ * Calculate days in cycle. years now is a non-negative number,
+ * holding the number of years in the 400-year cycle.
+ */
+ return cycle * GREGORIAN_CYCLE_DAYS
+ + years * DAYSPERYEAR /* days inregular years */
+ + years / 4 /* 4 year leap rule */
+ - years / 100; /* 100 year leap rule */
+ /* the 400-year rule does not apply due to full-cycle split-off */
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert a number of elapsed month in a year into elapsed days in year.
+ *
+ * The month will be normalized, and 'res.hi' will contain the
+ * excessive years that must be considered when converting the years,
+ * while 'res.lo' will contain the number of elapsed days since start
+ * of the year.
+ *
+ * This code uses the shifted-month-approach to convert month to days,
+ * because then there is no need to have explicit leap year
+ * information. The slight disadvantage is that for most month values
+ * the result is a negative value, and the year excess is one; the
+ * conversion is then simply based on the start of the following year.
+ *---------------------------------------------------------------------
+ */
+ntpcal_split
+ntpcal_days_in_months(
+ int32_t m
+ )
+{
+ ntpcal_split res;
+
+ /* normalize month into range */
+ res.hi = 0;
+ res.lo = m;
+ if (res.lo < 0 || res.lo >= 12) {
+ res.hi = res.lo / 12;
+ res.lo = res.lo % 12;
+ if (res.lo < 0) {
+ res.hi -= 1;
+ res.lo += 12;
+ }
+ }
+
+ /* add 10 month for year starting with march */
+ if (res.lo < 2)
+ res.lo += 10;
+ else {
+ res.hi += 1;
+ res.lo -= 2;
+ }
+
+ /* get cummulated days in year with unshift */
+ res.lo = shift_month_table[res.lo] - 306;
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert ELAPSED years/months/days of gregorian calendar to elapsed
+ * days in Gregorian epoch.
+ *
+ * If you want to convert years and days-of-year, just give a month of
+ * zero.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_edate_to_eradays(
+ int32_t years,
+ int32_t mons,
+ int32_t mdays
+ )
+{
+ ntpcal_split tmp;
+ int32_t res;
+
+ if (mons) {
+ tmp = ntpcal_days_in_months(mons);
+ res = ntpcal_days_in_years(years + tmp.hi) + tmp.lo;
+ } else
+ res = ntpcal_days_in_years(years);
+ res += mdays;
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert ELAPSED years/months/days of gregorian calendar to elapsed
+ * days in year.
+ *
+ * Note: This will give the true difference to the start of the given year,
+ * even if months & days are off-scale.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_edate_to_yeardays(
+ int32_t years,
+ int32_t mons,
+ int32_t mdays
+ )
+{
+ ntpcal_split tmp;
+
+ if (0 <= mons && mons < 12) {
+ years += 1;
+ mdays += real_month_table[is_leapyear(years)][mons];
+ } else {
+ tmp = ntpcal_days_in_months(mons);
+ mdays += tmp.lo
+ + ntpcal_days_in_years(years + tmp.hi)
+ - ntpcal_days_in_years(years);
+ }
+
+ return mdays;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert elapsed days and the hour/minute/second information into
+ * total seconds.
+ *
+ * If 'isvalid' is not NULL, do a range check on the time specification
+ * and tell if the time input is in the normal range, permitting for a
+ * single leapsecond.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_etime_to_seconds(
+ int32_t hours,
+ int32_t minutes,
+ int32_t seconds
+ )
+{
+ int32_t res;
+
+ res = (hours * MINSPERHR + minutes) * SECSPERMIN + seconds;
+
+ return res;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert the date part of a 'struct tm' (that is, year, month,
+ * day-of-month) into the RD of that day.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_tm_to_rd(
+ const struct tm *utm
+ )
+{
+ return ntpcal_edate_to_eradays(utm->tm_year + 1899,
+ utm->tm_mon,
+ utm->tm_mday - 1) + 1;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * Convert the date part of a 'struct calendar' (that is, year, month,
+ * day-of-month) into the RD of that day.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_date_to_rd(
+ const struct calendar *jd
+ )
+{
+ return ntpcal_edate_to_eradays((int32_t)jd->year - 1,
+ (int32_t)jd->month - 1,
+ (int32_t)jd->monthday - 1) + 1;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * convert a year number to rata die of year start
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_year_to_ystart(
+ int32_t year
+ )
+{
+ return ntpcal_days_in_years(year - 1) + 1;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * For a given RD, get the RD of the associated year start,
+ * that is, the RD of the last January,1st on or before that day.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_rd_to_ystart(
+ int32_t rd
+ )
+{
+ /*
+ * Rather simple exercise: split the day number into elapsed
+ * years and elapsed days, then remove the elapsed days from the
+ * input value. Nice'n sweet...
+ */
+ return rd - ntpcal_split_eradays(rd - 1, NULL).lo;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * For a given RD, get the RD of the associated month start.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_rd_to_mstart(
+ int32_t rd
+ )
+{
+ ntpcal_split split;
+ int leaps;
+
+ split = ntpcal_split_eradays(rd - 1, &leaps);
+ split = ntpcal_split_yeardays(split.lo, leaps);
+
+ return rd - split.lo;
+}
+
+/*
+ *---------------------------------------------------------------------
+ * take a 'struct calendar' and get the seconds-of-day from it.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_date_to_daysec(
+ const struct calendar *jd
+ )
+{
+ return ntpcal_etime_to_seconds(jd->hour, jd->minute,
+ jd->second);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * take a 'struct tm' and get the seconds-of-day from it.
+ *---------------------------------------------------------------------
+ */
+int32_t
+ntpcal_tm_to_daysec(
+ const struct tm *utm
+ )
+{
+ return ntpcal_etime_to_seconds(utm->tm_hour, utm->tm_min,
+ utm->tm_sec);
+}
+
+/*
+ *---------------------------------------------------------------------
+ * take a 'struct calendar' and convert it to a 'time_t'
+ *---------------------------------------------------------------------
+ */
+time_t
+ntpcal_date_to_time(
+ const struct calendar *jd
+ )
+{
+ vint64 join;
+ int32_t days, secs;
+
+ days = ntpcal_date_to_rd(jd) - DAY_UNIX_STARTS;
+ secs = ntpcal_date_to_daysec(jd);
+ join = ntpcal_dayjoin(days, secs);
+
+ return vint64_to_time(&join);
+}
+
+
+/*
+ * ==================================================================
+ *
+ * extended and unchecked variants of caljulian/caltontp
+ *
+ * ==================================================================
+ */
+int
+ntpcal_ntp64_to_date(
+ struct calendar *jd,
+ const vint64 *ntp
+ )
+{
+ ntpcal_split ds;
+
+ ds = ntpcal_daysplit(ntp);
+ ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
+
+ return ntpcal_rd_to_date(jd, ds.hi + DAY_NTP_STARTS);
+}
+
+int
+ntpcal_ntp_to_date(
+ struct calendar *jd,
+ uint32_t ntp,
+ const time_t *piv
+ )
+{
+ vint64 ntp64;
+
+ /*
+ * Unfold ntp time around current time into NTP domain. Split
+ * into days and seconds, shift days into CE domain and
+ * process the parts.
+ */
+ ntp64 = ntpcal_ntp_to_ntp(ntp, piv);
+ return ntpcal_ntp64_to_date(jd, &ntp64);
+}
+
+
+vint64
+ntpcal_date_to_ntp64(
+ const struct calendar *jd
+ )
+{
+ /*
+ * Convert date to NTP. Ignore yearday, use d/m/y only.
+ */
+ return ntpcal_dayjoin(ntpcal_date_to_rd(jd) - DAY_NTP_STARTS,
+ ntpcal_date_to_daysec(jd));
+}
+
+
+uint32_t
+ntpcal_date_to_ntp(
+ const struct calendar *jd
+ )
+{
+ /*
+ * Get lower half of 64-bit NTP timestamp from date/time.
+ */
+ return ntpcal_date_to_ntp64(jd).d_s.lo;
+}
+
+
+
+/*
+ * ==================================================================
+ *
+ * day-of-week calculations
+ *
+ * ==================================================================
+ */
+/*
+ * Given a RataDie and a day-of-week, calculate a RDN that is reater-than,
+ * greater-or equal, closest, less-or-equal or less-than the given RDN
+ * and denotes the given day-of-week
+ */
+int32_t
+ntpcal_weekday_gt(
+ int32_t rdn,
+ int32_t dow
+ )
+{
+ return ntpcal_periodic_extend(rdn+1, dow, 7);
+}
+
+int32_t
+ntpcal_weekday_ge(
+ int32_t rdn,
+ int32_t dow
+ )
+{
+ return ntpcal_periodic_extend(rdn, dow, 7);
+}
+
+int32_t
+ntpcal_weekday_close(
+ int32_t rdn,
+ int32_t dow
+ )
+{
+ return ntpcal_periodic_extend(rdn-3, dow, 7);
+}
+
+int32_t
+ntpcal_weekday_le(
+ int32_t rdn,
+ int32_t dow
+ )
+{
+ return ntpcal_periodic_extend(rdn, dow, -7);
+}
+
+int32_t
+ntpcal_weekday_lt(
+ int32_t rdn,
+ int32_t dow
+ )
+{
+ return ntpcal_periodic_extend(rdn-1, dow, -7);
+}
+
+/*
+ * ==================================================================
+ *
+ * ISO week-calendar conversions
+ *
+ * The ISO8601 calendar defines a calendar of years, weeks and weekdays.
+ * It is related to the Gregorian calendar, and a ISO year starts at the
+ * Monday closest to Jan,1st of the corresponding Gregorian year. A ISO
+ * calendar year has always 52 or 53 weeks, and like the Grogrian
+ * calendar the ISO8601 calendar repeats itself every 400 years, or
+ * 146097 days, or 20871 weeks.
+ *
+ * While it is possible to write ISO calendar functions based on the
+ * Gregorian calendar functions, the following implementation takes a
+ * different approach, based directly on years and weeks.
+ *
+ * Analysis of the tabulated data shows that it is not possible to
+ * interpolate from years to weeks over a full 400 year range; cyclic
+ * shifts over 400 years do not provide a solution here. But it *is*
+ * possible to interpolate over every single century of the 400-year
+ * cycle. (The centennial leap year rule seems to be the culprit here.)
+ *
+ * It can be shown that a conversion from years to weeks can be done
+ * using a linear transformation of the form
+ *
+ * w = floor( y * a + b )
+ *
+ * where the slope a must hold to
+ *
+ * 52.1780821918 <= a < 52.1791044776
+ *
+ * and b must be chosen according to the selected slope and the number
+ * of the century in a 400-year period.
+ *
+ * The inverse calculation can also be done in this way. Careful scaling
+ * provides an unlimited set of integer coefficients a,k,b that enable
+ * us to write the calulation in the form
+ *
+ * w = (y * a + b ) / k
+ * y = (w * a' + b') / k'
+ *
+ * In this implementation the values of k and k' are chosen to be
+ * smallest possible powers of two, so the division can be implemented
+ * as shifts if the optimiser chooses to do so.
+ *
+ * ==================================================================
+ */
+
+/*
+ * Given a number of elapsed (ISO-)years since the begin of the
+ * christian era, return the number of elapsed weeks corresponding to
+ * the number of years.
+ */
+int32_t
+isocal_weeks_in_years(
+ int32_t years
+ )
+{
+ /*
+ * use: w = (y * 53431 + b[c]) / 1024 as interpolation
+ */
+ static const int32_t bctab[4] = { 449, 157, 889, 597 };
+ int32_t cycle; /* full gregorian cycle */
+ int32_t cents; /* full centuries */
+ int32_t weeks; /* accumulated weeks */
+
+ /* split off full calendar cycles, using floor division */
+ cycle = years / 400;
+ years = years % 400;
+ if (years < 0) {
+ cycle -= 1;
+ years += 400;
+ }
+
+ /* split off full centuries */
+ cents = years / 100;
+ years = years % 100;
+
+ /*
+ * calculate elapsed weeks, taking into account that the
+ * first, third and fourth century have 5218 weeks but the
+ * second century falls short by one week.
+ */
+ weeks = (years * 53431 + bctab[cents]) / 1024;
+
+ return cycle * GREGORIAN_CYCLE_WEEKS
+ + cents * 5218 - (cents > 1)
+ + weeks;
+}
+
+/*
+ * Given a number of elapsed weeks since the begin of the christian
+ * era, split this number into the number of elapsed years in res.hi
+ * and the excessive number of weeks in res.lo. (That is, res.lo is
+ * the number of elapsed weeks in the remaining partial year.)
+ */
+ntpcal_split
+isocal_split_eraweeks(
+ int32_t weeks
+ )
+{
+ /*
+ * use: y = (w * 157 + b[c]) / 8192 as interpolation
+ */
+ static const int32_t bctab[4] = { 85, 131, 17, 62 };
+ ntpcal_split res;
+ int32_t cents;
+
+ /*
+ * split off 400-year cycles, using the fact that a 400-year
+ * cycle has 146097 days, which is exactly 20871 weeks.
+ */
+ res.hi = weeks / GREGORIAN_CYCLE_WEEKS;
+ res.lo = weeks % GREGORIAN_CYCLE_WEEKS;
+ if (res.lo < 0) {
+ res.hi -= 1;
+ res.lo += GREGORIAN_CYCLE_WEEKS;
+ }
+ res.hi *= 400;
+
+ /*
+ * split off centuries, taking into account that the first,
+ * third and fourth century have 5218 weeks but that the
+ * second century falls short by one week.
+ */
+ res.lo += (res.lo >= 10435);
+ cents = res.lo / 5218;
+ res.lo %= 5218; /* res.lo is weeks in century now */
+
+ /* convert elapsed weeks in century to elapsed years and weeks */
+ res.lo = res.lo * 157 + bctab[cents];
+ res.hi += cents * 100 + res.lo / 8192;
+ res.lo = (res.lo % 8192) / 157;
+
+ return res;
+}
+
+/*
+ * Given a second in the NTP time scale and a pivot, expand the NTP
+ * time stamp around the pivot and convert into an ISO calendar time
+ * stamp.
+ */
+int
+isocal_ntp64_to_date(
+ struct isodate *id,
+ const vint64 *ntp
+ )
+{
+ ntpcal_split ds;
+ int32_t ts[3];
+
+ /*
+ * Split NTP time into days and seconds, shift days into CE
+ * domain and process the parts.
+ */
+ ds = ntpcal_daysplit(ntp);
+
+ /* split time part */
+ ds.hi += priv_timesplit(ts, ds.lo);
+ id->hour = (uint8_t)ts[0];
+ id->minute = (uint8_t)ts[1];
+ id->second = (uint8_t)ts[2];
+
+ /* split date part */
+ ds.lo = ds.hi + DAY_NTP_STARTS - 1; /* elapsed era days */
+ ds.hi = ds.lo / 7; /* elapsed era weeks */
+ ds.lo = ds.lo % 7; /* elapsed week days */
+ if (ds.lo < 0) { /* floor division! */
+ ds.hi -= 1;
+ ds.lo += 7;
+ }
+ id->weekday = (uint8_t)ds.lo + 1; /* weekday result */
+
+ ds = isocal_split_eraweeks(ds.hi); /* elapsed years&week*/
+ id->year = (uint16_t)ds.hi + 1; /* shift to current */
+ id->week = (uint8_t )ds.lo + 1;
+
+ return (ds.hi >= 0 && ds.hi < 0xFFFFU);
+}
+
+int
+isocal_ntp_to_date(
+ struct isodate *id,
+ uint32_t ntp,
+ const time_t *piv
+ )
+{
+ vint64 ntp64;
+
+ /*
+ * Unfold ntp time around current time into NTP domain, then
+ * convert the full time stamp.
+ */
+ ntp64 = ntpcal_ntp_to_ntp(ntp, piv);
+ return isocal_ntp64_to_date(id, &ntp64);
+}
+
+/*
+ * Convert a ISO date spec into a second in the NTP time scale,
+ * properly truncated to 32 bit.
+ */
+vint64
+isocal_date_to_ntp64(
+ const struct isodate *id
+ )
+{
+ int32_t weeks, days, secs;
+
+ weeks = isocal_weeks_in_years((int32_t)id->year - 1)
+ + (int32_t)id->week - 1;
+ days = weeks * 7 + (int32_t)id->weekday;
+ /* days is RDN of ISO date now */
+ secs = ntpcal_etime_to_seconds(id->hour, id->minute, id->second);
+
+ return ntpcal_dayjoin(days - DAY_NTP_STARTS, secs);
+}
+
+uint32_t
+isocal_date_to_ntp(
+ const struct isodate *id
+ )
+{
+ /*
+ * Get lower half of 64-bit NTP timestamp from date/time.
+ */
+ return isocal_date_to_ntp64(id).d_s.lo;
+}
+
+/* -*-EOF-*- */
diff --git a/libntp/ntp_crypto_rnd.c b/libntp/ntp_crypto_rnd.c
new file mode 100644
index 000000000000..62a808db3447
--- /dev/null
+++ b/libntp/ntp_crypto_rnd.c
@@ -0,0 +1,96 @@
+/*
+ * Crypto-quality random number functions
+ *
+ * Author: Harlan Stenn, 2014
+ *
+ * This file is Copyright (c) 2014 by Network Time Foundation.
+ * BSD terms apply: see the file COPYRIGHT in the distribution root for details.
+ */
+
+#include "config.h"
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+
+#include <l_stdlib.h>
+#include <ntp_random.h>
+
+#ifdef USE_OPENSSL_CRYPTO_RAND
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+int crypto_rand_init = 0;
+#endif
+
+/*
+ * As of late 2014, here's how we plan to provide cryptographic-quality
+ * random numbers:
+ *
+ * - If we are building with OpenSSL, use RAND_poll() and RAND_bytes().
+ * - Otherwise, use arc4random().
+ *
+ * Use of arc4random() can be forced using configure --disable-openssl-random
+ *
+ * We can count on arc4random existing, thru the OS or thru libevent.
+ * The quality of arc4random depends on the implementor.
+ *
+ * RAND_poll() doesn't show up until XXX. If it's not present, we
+ * need to either provide our own or use arc4random().
+ */
+
+/*
+ * ntp_crypto_srandom:
+ *
+ * Initialize the random number generator, if needed by the underlying
+ * crypto random number generation mechanism.
+ */
+
+void
+ntp_crypto_srandom(
+ void
+ )
+{
+#ifdef USE_OPENSSL_CRYPTO_RAND
+ if (!crypto_rand_init) {
+ RAND_poll();
+ crypto_rand_init = 1;
+ }
+#else
+ /* No initialization needed for arc4random() */
+#endif
+}
+
+
+/*
+ * ntp_crypto_random_buf:
+ *
+ * Returns 0 on success, -1 on error.
+ */
+int
+ntp_crypto_random_buf(
+ void *buf,
+ size_t nbytes
+ )
+{
+#ifdef USE_OPENSSL_CRYPTO_RAND
+ int rc;
+
+ rc = RAND_bytes(buf, nbytes);
+ if (1 != rc) {
+ unsigned long err;
+ char *err_str;
+
+ err = ERR_get_error();
+ err_str = ERR_error_string(err, NULL);
+ /* XXX: Log the error */
+
+ return -1;
+ }
+ return 0;
+#else
+ arc4random_buf(buf, nbytes);
+ return 0;
+#endif
+}
diff --git a/libntp/ntp_intres.c b/libntp/ntp_intres.c
new file mode 100644
index 000000000000..2ac70c1a416d
--- /dev/null
+++ b/libntp/ntp_intres.c
@@ -0,0 +1,1143 @@
+/*
+ * ntp_intres.c - Implements a generic blocking worker child or thread,
+ * initially to provide a nonblocking solution for DNS
+ * name to address lookups available with getaddrinfo().
+ *
+ * This is a new implementation as of 2009 sharing the filename and
+ * very little else with the prior implementation, which used a
+ * temporary file to receive a single set of requests from the parent,
+ * and a NTP mode 7 authenticated request to push back responses.
+ *
+ * A primary goal in rewriting this code was the need to support the
+ * pool configuration directive's requirement to retrieve multiple
+ * addresses resolving a single name, which has previously been
+ * satisfied with blocking resolver calls from the ntpd mainline code.
+ *
+ * A secondary goal is to provide a generic mechanism for other
+ * blocking operations to be delegated to a worker using a common
+ * model for both Unix and Windows ntpd. ntp_worker.c, work_fork.c,
+ * and work_thread.c implement the generic mechanism. This file
+ * implements the two current consumers, getaddrinfo_sometime() and the
+ * presently unused getnameinfo_sometime().
+ *
+ * Both routines deliver results to a callback and manage memory
+ * allocation, meaning there is no freeaddrinfo_sometime().
+ *
+ * The initial implementation for Unix uses a pair of unidirectional
+ * pipes, one each for requests and responses, connecting the forked
+ * blocking child worker with the ntpd mainline. The threaded code
+ * uses arrays of pointers to queue requests and responses.
+ *
+ * The parent drives the process, including scheduling sleeps between
+ * retries.
+ *
+ * Memory is managed differently for a child process, which mallocs
+ * request buffers to read from the pipe into, whereas the threaded
+ * code mallocs a copy of the request to hand off to the worker via
+ * the queueing array. The resulting request buffer is free()d by
+ * platform-independent code. A wrinkle is the request needs to be
+ * available to the requestor during response processing.
+ *
+ * Response memory allocation is also platform-dependent. With a
+ * separate process and pipes, the response is free()d after being
+ * written to the pipe. With threads, the same memory is handed
+ * over and the requestor frees it after processing is completed.
+ *
+ * The code should be generalized to support threads on Unix using
+ * much of the same code used for Windows initially.
+ *
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "ntp_workimpl.h"
+
+#ifdef WORKER
+
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+
+/**/
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#include <arpa/inet.h>
+/**/
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT)
+# define HAVE_RES_INIT
+#endif
+
+#if defined(HAVE_RESOLV_H) && defined(HAVE_RES_INIT)
+# ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+# endif
+# ifdef HAVE_NETDB_H
+# include <netdb.h>
+# endif
+# include <resolv.h>
+# ifdef HAVE_INT32_ONLY_WITH_DNS
+# define HAVE_INT32
+# endif
+# ifdef HAVE_U_INT32_ONLY_WITH_DNS
+# define HAVE_U_INT32
+# endif
+#endif
+
+#include "ntp.h"
+#include "ntp_debug.h"
+#include "ntp_malloc.h"
+#include "ntp_syslog.h"
+#include "ntp_unixtime.h"
+#include "ntp_intres.h"
+#include "intreswork.h"
+
+
+/*
+ * Following are implementations of getaddrinfo_sometime() and
+ * getnameinfo_sometime(). Each is implemented in three routines:
+ *
+ * getaddrinfo_sometime() getnameinfo_sometime()
+ * blocking_getaddrinfo() blocking_getnameinfo()
+ * getaddrinfo_sometime_complete() getnameinfo_sometime_complete()
+ *
+ * The first runs in the parent and marshalls (or serializes) request
+ * parameters into a request blob which is processed in the child by
+ * the second routine, blocking_*(), which serializes the results into
+ * a response blob unpacked by the third routine, *_complete(), which
+ * calls the callback routine provided with the request and frees
+ * _request_ memory allocated by the first routine. Response memory
+ * is managed by the code which calls the *_complete routines.
+ */
+
+/* === typedefs === */
+typedef struct blocking_gai_req_tag { /* marshalled args */
+ size_t octets;
+ u_int dns_idx;
+ time_t scheduled;
+ time_t earliest;
+ struct addrinfo hints;
+ int retry;
+ gai_sometime_callback callback;
+ void * context;
+ size_t nodesize;
+ size_t servsize;
+} blocking_gai_req;
+
+typedef struct blocking_gai_resp_tag {
+ size_t octets;
+ int retcode;
+ int retry;
+ int gai_errno; /* for EAI_SYSTEM case */
+ int ai_count;
+ /*
+ * Followed by ai_count struct addrinfo and then ai_count
+ * sockaddr_u and finally the canonical name strings.
+ */
+} blocking_gai_resp;
+
+typedef struct blocking_gni_req_tag {
+ size_t octets;
+ u_int dns_idx;
+ time_t scheduled;
+ time_t earliest;
+ int retry;
+ size_t hostoctets;
+ size_t servoctets;
+ int flags;
+ gni_sometime_callback callback;
+ void * context;
+ sockaddr_u socku;
+} blocking_gni_req;
+
+typedef struct blocking_gni_resp_tag {
+ size_t octets;
+ int retcode;
+ int gni_errno; /* for EAI_SYSTEM case */
+ int retry;
+ size_t hostoctets;
+ size_t servoctets;
+ /*
+ * Followed by hostoctets bytes of null-terminated host,
+ * then servoctets bytes of null-terminated service.
+ */
+} blocking_gni_resp;
+
+/* per-DNS-worker state in parent */
+typedef struct dnschild_ctx_tag {
+ u_int index;
+ time_t next_dns_timeslot;
+} dnschild_ctx;
+
+/* per-DNS-worker state in worker */
+typedef struct dnsworker_ctx_tag {
+ blocking_child * c;
+ time_t ignore_scheduled_before;
+#ifdef HAVE_RES_INIT
+ time_t next_res_init;
+#endif
+} dnsworker_ctx;
+
+
+/* === variables === */
+dnschild_ctx ** dnschild_contexts; /* parent */
+u_int dnschild_contexts_alloc;
+dnsworker_ctx ** dnsworker_contexts; /* child */
+u_int dnsworker_contexts_alloc;
+
+#ifdef HAVE_RES_INIT
+static time_t next_res_init;
+#endif
+
+
+/* === forward declarations === */
+static u_int reserve_dnschild_ctx(void);
+static u_int get_dnschild_ctx(void);
+static void alloc_dnsworker_context(u_int);
+/* static void free_dnsworker_context(u_int); */
+static dnsworker_ctx * get_worker_context(blocking_child *, u_int);
+static void scheduled_sleep(time_t, time_t,
+ dnsworker_ctx *);
+static void manage_dns_retry_interval(time_t *, time_t *,
+ int *,
+ time_t *);
+static int should_retry_dns(int, int);
+#ifdef HAVE_RES_INIT
+static void reload_resolv_conf(dnsworker_ctx *);
+#else
+# define reload_resolv_conf(wc) \
+ do { \
+ (void)(wc); \
+ } while (FALSE)
+#endif
+static void getaddrinfo_sometime_complete(blocking_work_req,
+ void *, size_t,
+ void *);
+static void getnameinfo_sometime_complete(blocking_work_req,
+ void *, size_t,
+ void *);
+
+
+/* === functions === */
+/*
+ * getaddrinfo_sometime - uses blocking child to call getaddrinfo then
+ * invokes provided callback completion function.
+ */
+int
+getaddrinfo_sometime(
+ const char * node,
+ const char * service,
+ const struct addrinfo * hints,
+ int retry,
+ gai_sometime_callback callback,
+ void * context
+ )
+{
+ blocking_gai_req * gai_req;
+ u_int idx;
+ dnschild_ctx * child_ctx;
+ size_t req_size;
+ size_t nodesize;
+ size_t servsize;
+ time_t now;
+
+ NTP_REQUIRE(NULL != node);
+ if (NULL != hints) {
+ NTP_REQUIRE(0 == hints->ai_addrlen);
+ NTP_REQUIRE(NULL == hints->ai_addr);
+ NTP_REQUIRE(NULL == hints->ai_canonname);
+ NTP_REQUIRE(NULL == hints->ai_next);
+ }
+
+ idx = get_dnschild_ctx();
+ child_ctx = dnschild_contexts[idx];
+
+ nodesize = strlen(node) + 1;
+ servsize = strlen(service) + 1;
+ req_size = sizeof(*gai_req) + nodesize + servsize;
+
+ gai_req = emalloc_zero(req_size);
+
+ gai_req->octets = req_size;
+ gai_req->dns_idx = idx;
+ now = time(NULL);
+ gai_req->scheduled = now;
+ gai_req->earliest = max(now, child_ctx->next_dns_timeslot);
+ child_ctx->next_dns_timeslot = gai_req->earliest;
+ if (hints != NULL)
+ gai_req->hints = *hints;
+ gai_req->retry = retry;
+ gai_req->callback = callback;
+ gai_req->context = context;
+ gai_req->nodesize = nodesize;
+ gai_req->servsize = servsize;
+
+ memcpy((char *)gai_req + sizeof(*gai_req), node, nodesize);
+ memcpy((char *)gai_req + sizeof(*gai_req) + nodesize, service,
+ servsize);
+
+ if (queue_blocking_request(
+ BLOCKING_GETADDRINFO,
+ gai_req,
+ req_size,
+ &getaddrinfo_sometime_complete,
+ gai_req)) {
+
+ msyslog(LOG_ERR, "unable to queue getaddrinfo request");
+ errno = EFAULT;
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+blocking_getaddrinfo(
+ blocking_child * c,
+ blocking_pipe_header * req
+ )
+{
+ blocking_gai_req * gai_req;
+ dnsworker_ctx * worker_ctx;
+ blocking_pipe_header * resp;
+ blocking_gai_resp * gai_resp;
+ char * node;
+ char * service;
+ struct addrinfo * ai_res;
+ struct addrinfo * ai;
+ struct addrinfo * serialized_ai;
+ size_t canons_octets;
+ size_t this_octets;
+ size_t resp_octets;
+ char * cp;
+ time_t time_now;
+
+ gai_req = (void *)((char *)req + sizeof(*req));
+ node = (char *)gai_req + sizeof(*gai_req);
+ service = node + gai_req->nodesize;
+
+ worker_ctx = get_worker_context(c, gai_req->dns_idx);
+ scheduled_sleep(gai_req->scheduled, gai_req->earliest,
+ worker_ctx);
+ reload_resolv_conf(worker_ctx);
+
+ /*
+ * Take a shot at the final size, better to overestimate
+ * at first and then realloc to a smaller size.
+ */
+
+ resp_octets = sizeof(*resp) + sizeof(*gai_resp) +
+ 16 * (sizeof(struct addrinfo) +
+ sizeof(sockaddr_u)) +
+ 256;
+ resp = emalloc_zero(resp_octets);
+ gai_resp = (void *)(resp + 1);
+
+ TRACE(2, ("blocking_getaddrinfo given node %s serv %s fam %d flags %x\n",
+ node, service, gai_req->hints.ai_family,
+ gai_req->hints.ai_flags));
+#ifdef DEBUG
+ if (debug >= 2)
+ fflush(stdout);
+#endif
+ ai_res = NULL;
+ gai_resp->retcode = getaddrinfo(node, service, &gai_req->hints,
+ &ai_res);
+ gai_resp->retry = gai_req->retry;
+#ifdef EAI_SYSTEM
+ if (EAI_SYSTEM == gai_resp->retcode)
+ gai_resp->gai_errno = errno;
+#endif
+ canons_octets = 0;
+
+ if (0 == gai_resp->retcode) {
+ ai = ai_res;
+ while (NULL != ai) {
+ gai_resp->ai_count++;
+ if (ai->ai_canonname)
+ canons_octets += strlen(ai->ai_canonname) + 1;
+ ai = ai->ai_next;
+ }
+ /*
+ * If this query succeeded only after retrying, DNS may have
+ * just become responsive. Ignore previously-scheduled
+ * retry sleeps once for each pending request, similar to
+ * the way scheduled_sleep() does when its worker_sleep()
+ * is interrupted.
+ */
+ if (gai_resp->retry > INITIAL_DNS_RETRY) {
+ time_now = time(NULL);
+ worker_ctx->ignore_scheduled_before = time_now;
+ TRACE(1, ("DNS success after retry, ignoring sleeps scheduled before now (%s)\n",
+ humantime(time_now)));
+ }
+ }
+
+ /*
+ * Our response consists of a header, followed by ai_count
+ * addrinfo structs followed by ai_count sockaddr_storage
+ * structs followed by the canonical names.
+ */
+ gai_resp->octets = sizeof(*gai_resp)
+ + gai_resp->ai_count
+ * (sizeof(gai_req->hints)
+ + sizeof(sockaddr_u))
+ + canons_octets;
+
+ resp_octets = sizeof(*resp) + gai_resp->octets;
+ resp = erealloc(resp, resp_octets);
+ gai_resp = (void *)(resp + 1);
+
+ /* cp serves as our current pointer while serializing */
+ cp = (void *)(gai_resp + 1);
+ canons_octets = 0;
+
+ if (0 == gai_resp->retcode) {
+ ai = ai_res;
+ while (NULL != ai) {
+ memcpy(cp, ai, sizeof(*ai));
+ serialized_ai = (void *)cp;
+ cp += sizeof(*ai);
+
+ /* transform ai_canonname into offset */
+ if (NULL != serialized_ai->ai_canonname) {
+ serialized_ai->ai_canonname = (char *)canons_octets;
+ canons_octets += strlen(ai->ai_canonname) + 1;
+ }
+
+ /* leave fixup of ai_addr pointer for receiver */
+
+ ai = ai->ai_next;
+ }
+
+ ai = ai_res;
+ while (NULL != ai) {
+ NTP_INSIST(ai->ai_addrlen <= sizeof(sockaddr_u));
+ memcpy(cp, ai->ai_addr, ai->ai_addrlen);
+ cp += sizeof(sockaddr_u);
+
+ ai = ai->ai_next;
+ }
+
+ ai = ai_res;
+ while (NULL != ai) {
+ if (NULL != ai->ai_canonname) {
+ this_octets = strlen(ai->ai_canonname) + 1;
+ memcpy(cp, ai->ai_canonname, this_octets);
+ cp += this_octets;
+ }
+
+ ai = ai->ai_next;
+ }
+ freeaddrinfo(ai_res);
+ }
+
+ /*
+ * make sure our walk and earlier calc match
+ */
+ DEBUG_INSIST((size_t)(cp - (char *)resp) == resp_octets);
+
+ if (queue_blocking_response(c, resp, resp_octets, req)) {
+ msyslog(LOG_ERR, "blocking_getaddrinfo can not queue response");
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static void
+getaddrinfo_sometime_complete(
+ blocking_work_req rtype,
+ void * context,
+ size_t respsize,
+ void * resp
+ )
+{
+ blocking_gai_req * gai_req;
+ blocking_gai_resp * gai_resp;
+ dnschild_ctx * child_ctx;
+ struct addrinfo * ai;
+ struct addrinfo * next_ai;
+ sockaddr_u * psau;
+ char * node;
+ char * service;
+ char * canon_start;
+ time_t time_now;
+ int again;
+ int af;
+ const char * fam_spec;
+ int i;
+
+ gai_req = context;
+ gai_resp = resp;
+
+ DEBUG_REQUIRE(BLOCKING_GETADDRINFO == rtype);
+ DEBUG_REQUIRE(respsize == gai_resp->octets);
+
+ node = (char *)gai_req + sizeof(*gai_req);
+ service = node + gai_req->nodesize;
+
+ child_ctx = dnschild_contexts[gai_req->dns_idx];
+
+ if (0 == gai_resp->retcode) {
+ /*
+ * If this query succeeded only after retrying, DNS may have
+ * just become responsive.
+ */
+ if (gai_resp->retry > INITIAL_DNS_RETRY) {
+ time_now = time(NULL);
+ child_ctx->next_dns_timeslot = time_now;
+ TRACE(1, ("DNS success after retry, %u next_dns_timeslot reset (%s)\n",
+ gai_req->dns_idx, humantime(time_now)));
+ }
+ } else {
+ again = should_retry_dns(gai_resp->retcode,
+ gai_resp->gai_errno);
+ /*
+ * exponential backoff of DNS retries to 64s
+ */
+ if (gai_req->retry > 0 && again) {
+ /* log the first retry only */
+ if (INITIAL_DNS_RETRY == gai_req->retry)
+ NLOG(NLOG_SYSINFO) {
+ af = gai_req->hints.ai_family;
+ fam_spec = (AF_INET6 == af)
+ ? " (AAAA)"
+ : (AF_INET == af)
+ ? " (A)"
+ : "";
+#ifdef EAI_SYSTEM
+ if (EAI_SYSTEM == gai_resp->retcode) {
+ errno = gai_resp->gai_errno;
+ msyslog(LOG_INFO,
+ "retrying DNS %s%s: EAI_SYSTEM %d: %m",
+ node, fam_spec,
+ gai_resp->gai_errno);
+ } else
+#endif
+ msyslog(LOG_INFO,
+ "retrying DNS %s%s: %s (%d)",
+ node, fam_spec,
+ gai_strerror(gai_resp->retcode),
+ gai_resp->retcode);
+ }
+ manage_dns_retry_interval(&gai_req->scheduled,
+ &gai_req->earliest, &gai_req->retry,
+ &child_ctx->next_dns_timeslot);
+ if (!queue_blocking_request(
+ BLOCKING_GETADDRINFO,
+ gai_req,
+ gai_req->octets,
+ &getaddrinfo_sometime_complete,
+ gai_req))
+ return;
+ else
+ msyslog(LOG_ERR,
+ "unable to retry hostname %s",
+ node);
+ }
+ }
+
+ /*
+ * fixup pointers in returned addrinfo array
+ */
+ ai = (void *)((char *)gai_resp + sizeof(*gai_resp));
+ next_ai = NULL;
+ for (i = gai_resp->ai_count - 1; i >= 0; i--) {
+ ai[i].ai_next = next_ai;
+ next_ai = &ai[i];
+ }
+
+ psau = (void *)((char *)ai + gai_resp->ai_count * sizeof(*ai));
+ canon_start = (char *)psau + gai_resp->ai_count * sizeof(*psau);
+
+ for (i = 0; i < gai_resp->ai_count; i++) {
+ if (NULL != ai[i].ai_addr)
+ ai[i].ai_addr = &psau->sa;
+ psau++;
+ if (NULL != ai[i].ai_canonname)
+ ai[i].ai_canonname += (size_t)canon_start;
+ }
+
+ NTP_ENSURE((char *)psau == canon_start);
+
+ if (!gai_resp->ai_count)
+ ai = NULL;
+
+ (*gai_req->callback)(gai_resp->retcode, gai_resp->gai_errno,
+ gai_req->context, node, service,
+ &gai_req->hints, ai);
+
+ free(gai_req);
+ /* gai_resp is part of block freed by process_blocking_resp() */
+}
+
+
+#ifdef TEST_BLOCKING_WORKER
+void gai_test_callback(int rescode, int gai_errno, void *context, const char *name, const char *service, const struct addrinfo *hints, const struct addrinfo *ai_res)
+{
+ sockaddr_u addr;
+
+ if (rescode) {
+ TRACE(1, ("gai_test_callback context %p error rescode %d %s serv %s\n",
+ context, rescode, name, service));
+ return;
+ }
+ while (!rescode && NULL != ai_res) {
+ ZERO_SOCK(&addr);
+ memcpy(&addr, ai_res->ai_addr, ai_res->ai_addrlen);
+ TRACE(1, ("ctx %p fam %d addr %s canon '%s' type %s at %p ai_addr %p ai_next %p\n",
+ context,
+ AF(&addr),
+ stoa(&addr),
+ (ai_res->ai_canonname)
+ ? ai_res->ai_canonname
+ : "",
+ (SOCK_DGRAM == ai_res->ai_socktype)
+ ? "DGRAM"
+ : (SOCK_STREAM == ai_res->ai_socktype)
+ ? "STREAM"
+ : "(other)",
+ ai_res,
+ ai_res->ai_addr,
+ ai_res->ai_next));
+
+ getnameinfo_sometime((sockaddr_u *)ai_res->ai_addr, 128, 32, 0, gni_test_callback, context);
+
+ ai_res = ai_res->ai_next;
+ }
+}
+#endif /* TEST_BLOCKING_WORKER */
+
+
+int
+getnameinfo_sometime(
+ sockaddr_u * psau,
+ size_t hostoctets,
+ size_t servoctets,
+ int flags,
+ gni_sometime_callback callback,
+ void * context
+ )
+{
+ blocking_gni_req * gni_req;
+ u_int idx;
+ dnschild_ctx * child_ctx;
+ time_t time_now;
+
+ NTP_REQUIRE(hostoctets);
+ NTP_REQUIRE(hostoctets + servoctets < 1024);
+
+ idx = get_dnschild_ctx();
+ child_ctx = dnschild_contexts[idx];
+
+ gni_req = emalloc_zero(sizeof(*gni_req));
+
+ gni_req->octets = sizeof(*gni_req);
+ gni_req->dns_idx = idx;
+ time_now = time(NULL);
+ gni_req->scheduled = time_now;
+ gni_req->earliest = max(time_now, child_ctx->next_dns_timeslot);
+ child_ctx->next_dns_timeslot = gni_req->earliest;
+ memcpy(&gni_req->socku, psau, SOCKLEN(psau));
+ gni_req->hostoctets = hostoctets;
+ gni_req->servoctets = servoctets;
+ gni_req->flags = flags;
+ gni_req->retry = INITIAL_DNS_RETRY;
+ gni_req->callback = callback;
+ gni_req->context = context;
+
+ if (queue_blocking_request(
+ BLOCKING_GETNAMEINFO,
+ gni_req,
+ sizeof(*gni_req),
+ &getnameinfo_sometime_complete,
+ gni_req)) {
+
+ msyslog(LOG_ERR, "unable to queue getnameinfo request");
+ errno = EFAULT;
+ return -1;
+ }
+
+ return 0;
+}
+
+
+int
+blocking_getnameinfo(
+ blocking_child * c,
+ blocking_pipe_header * req
+ )
+{
+ blocking_gni_req * gni_req;
+ dnsworker_ctx * worker_ctx;
+ blocking_pipe_header * resp;
+ blocking_gni_resp * gni_resp;
+ size_t octets;
+ size_t resp_octets;
+ char * host;
+ char * service;
+ char * cp;
+ int rc;
+ time_t time_now;
+
+ gni_req = (void *)((char *)req + sizeof(*req));
+
+ octets = gni_req->hostoctets + gni_req->servoctets;
+
+ /*
+ * Some alloca() implementations are fragile regarding
+ * large allocations. We only need room for the host
+ * and service names.
+ */
+ NTP_REQUIRE(octets < 1024);
+
+#ifndef HAVE_ALLOCA
+ host = emalloc(octets);
+#else
+ host = alloca(octets);
+ if (NULL == host) {
+ msyslog(LOG_ERR,
+ "blocking_getnameinfo unable to allocate %lu octets on stack",
+ (u_long)octets);
+ exit(1);
+ }
+#endif
+ service = host + gni_req->hostoctets;
+
+ worker_ctx = get_worker_context(c, gni_req->dns_idx);
+ scheduled_sleep(gni_req->scheduled, gni_req->earliest,
+ worker_ctx);
+ reload_resolv_conf(worker_ctx);
+
+ /*
+ * Take a shot at the final size, better to overestimate
+ * then realloc to a smaller size.
+ */
+
+ resp_octets = sizeof(*resp) + sizeof(*gni_resp) + octets;
+ resp = emalloc_zero(resp_octets);
+ gni_resp = (void *)((char *)resp + sizeof(*resp));
+
+ TRACE(2, ("blocking_getnameinfo given addr %s flags 0x%x hostlen %lu servlen %lu\n",
+ stoa(&gni_req->socku), gni_req->flags,
+ (u_long)gni_req->hostoctets, (u_long)gni_req->servoctets));
+
+ gni_resp->retcode = getnameinfo(&gni_req->socku.sa,
+ SOCKLEN(&gni_req->socku),
+ host,
+ gni_req->hostoctets,
+ service,
+ gni_req->servoctets,
+ gni_req->flags);
+ gni_resp->retry = gni_req->retry;
+#ifdef EAI_SYSTEM
+ if (EAI_SYSTEM == gni_resp->retcode)
+ gni_resp->gni_errno = errno;
+#endif
+
+ if (0 != gni_resp->retcode) {
+ gni_resp->hostoctets = 0;
+ gni_resp->servoctets = 0;
+ } else {
+ gni_resp->hostoctets = strlen(host) + 1;
+ gni_resp->servoctets = strlen(service) + 1;
+ /*
+ * If this query succeeded only after retrying, DNS may have
+ * just become responsive. Ignore previously-scheduled
+ * retry sleeps once for each pending request, similar to
+ * the way scheduled_sleep() does when its worker_sleep()
+ * is interrupted.
+ */
+ if (gni_req->retry > INITIAL_DNS_RETRY) {
+ time_now = time(NULL);
+ worker_ctx->ignore_scheduled_before = time_now;
+ TRACE(1, ("DNS success after retrying, ignoring sleeps scheduled before now (%s)\n",
+ humantime(time_now)));
+ }
+ }
+ octets = gni_resp->hostoctets + gni_resp->servoctets;
+ /*
+ * Our response consists of a header, followed by the host and
+ * service strings, each null-terminated.
+ */
+ resp_octets = sizeof(*resp) + sizeof(*gni_resp) + octets;
+
+ resp = erealloc(resp, resp_octets);
+ gni_resp = (void *)(resp + 1);
+
+ gni_resp->octets = sizeof(*gni_resp) + octets;
+
+ /* cp serves as our current pointer while serializing */
+ cp = (void *)(gni_resp + 1);
+
+ if (0 == gni_resp->retcode) {
+ memcpy(cp, host, gni_resp->hostoctets);
+ cp += gni_resp->hostoctets;
+ memcpy(cp, service, gni_resp->servoctets);
+ cp += gni_resp->servoctets;
+ }
+
+ NTP_INSIST((size_t)(cp - (char *)resp) == resp_octets);
+ NTP_INSIST(resp_octets - sizeof(*resp) == gni_resp->octets);
+
+ rc = queue_blocking_response(c, resp, resp_octets, req);
+ if (rc)
+ msyslog(LOG_ERR, "blocking_getnameinfo unable to queue response");
+#ifndef HAVE_ALLOCA
+ free(host);
+#endif
+ return rc;
+}
+
+
+static void
+getnameinfo_sometime_complete(
+ blocking_work_req rtype,
+ void * context,
+ size_t respsize,
+ void * resp
+ )
+{
+ blocking_gni_req * gni_req;
+ blocking_gni_resp * gni_resp;
+ dnschild_ctx * child_ctx;
+ char * host;
+ char * service;
+ time_t time_now;
+ int again;
+
+ gni_req = context;
+ gni_resp = resp;
+
+ DEBUG_REQUIRE(BLOCKING_GETNAMEINFO == rtype);
+ DEBUG_REQUIRE(respsize == gni_resp->octets);
+
+ child_ctx = dnschild_contexts[gni_req->dns_idx];
+
+ if (0 == gni_resp->retcode) {
+ /*
+ * If this query succeeded only after retrying, DNS may have
+ * just become responsive.
+ */
+ if (gni_resp->retry > INITIAL_DNS_RETRY) {
+ time_now = time(NULL);
+ child_ctx->next_dns_timeslot = time_now;
+ TRACE(1, ("DNS success after retry, %u next_dns_timeslot reset (%s)\n",
+ gni_req->dns_idx, humantime(time_now)));
+ }
+ } else {
+ again = should_retry_dns(gni_resp->retcode, gni_resp->gni_errno);
+ /*
+ * exponential backoff of DNS retries to 64s
+ */
+ if (gni_req->retry > 0)
+ manage_dns_retry_interval(&gni_req->scheduled,
+ &gni_req->earliest, &gni_req->retry,
+ &child_ctx->next_dns_timeslot);
+
+ if (gni_req->retry > 0 && again) {
+ if (!queue_blocking_request(
+ BLOCKING_GETNAMEINFO,
+ gni_req,
+ gni_req->octets,
+ &getnameinfo_sometime_complete,
+ gni_req))
+ return;
+
+ msyslog(LOG_ERR, "unable to retry reverse lookup of %s", stoa(&gni_req->socku));
+ }
+ }
+
+ if (!gni_resp->hostoctets) {
+ host = NULL;
+ service = NULL;
+ } else {
+ host = (char *)gni_resp + sizeof(*gni_resp);
+ service = (gni_resp->servoctets)
+ ? host + gni_resp->hostoctets
+ : NULL;
+ }
+
+ (*gni_req->callback)(gni_resp->retcode, gni_resp->gni_errno,
+ &gni_req->socku, gni_req->flags, host,
+ service, gni_req->context);
+
+ free(gni_req);
+ /* gni_resp is part of block freed by process_blocking_resp() */
+}
+
+
+#ifdef TEST_BLOCKING_WORKER
+void gni_test_callback(int rescode, int gni_errno, sockaddr_u *psau, int flags, const char *host, const char *service, void *context)
+{
+ if (!rescode)
+ TRACE(1, ("gni_test_callback got host '%s' serv '%s' for addr %s context %p\n",
+ host, service, stoa(psau), context));
+ else
+ TRACE(1, ("gni_test_callback context %p rescode %d gni_errno %d flags 0x%x addr %s\n",
+ context, rescode, gni_errno, flags, stoa(psau)));
+}
+#endif /* TEST_BLOCKING_WORKER */
+
+
+#ifdef HAVE_RES_INIT
+static void
+reload_resolv_conf(
+ dnsworker_ctx * worker_ctx
+ )
+{
+ time_t time_now;
+
+ /*
+ * This is ad-hoc. Reload /etc/resolv.conf once per minute
+ * to pick up on changes from the DHCP client. [Bug 1226]
+ * When using threads for the workers, this needs to happen
+ * only once per minute process-wide.
+ */
+ time_now = time(NULL);
+# ifdef WORK_THREAD
+ worker_ctx->next_res_init = next_res_init;
+# endif
+ if (worker_ctx->next_res_init <= time_now) {
+ if (worker_ctx->next_res_init != 0)
+ res_init();
+ worker_ctx->next_res_init = time_now + 60;
+# ifdef WORK_THREAD
+ next_res_init = worker_ctx->next_res_init;
+# endif
+ }
+}
+#endif /* HAVE_RES_INIT */
+
+
+static u_int
+reserve_dnschild_ctx(void)
+{
+ const size_t ps = sizeof(dnschild_contexts[0]);
+ const size_t cs = sizeof(*dnschild_contexts[0]);
+ u_int c;
+ u_int new_alloc;
+ size_t octets;
+ size_t new_octets;
+
+ c = 0;
+ while (TRUE) {
+ for ( ; c < dnschild_contexts_alloc; c++) {
+ if (NULL == dnschild_contexts[c]) {
+ dnschild_contexts[c] = emalloc_zero(cs);
+
+ return c;
+ }
+ }
+ new_alloc = dnschild_contexts_alloc + 20;
+ new_octets = new_alloc * ps;
+ octets = dnschild_contexts_alloc * ps;
+ dnschild_contexts = erealloc_zero(dnschild_contexts,
+ new_octets, octets);
+ dnschild_contexts_alloc = new_alloc;
+ }
+}
+
+
+static u_int
+get_dnschild_ctx(void)
+{
+ static u_int shared_ctx = UINT_MAX;
+
+ if (worker_per_query)
+ return reserve_dnschild_ctx();
+
+ if (UINT_MAX == shared_ctx)
+ shared_ctx = reserve_dnschild_ctx();
+
+ return shared_ctx;
+}
+
+
+static void
+alloc_dnsworker_context(
+ u_int idx
+ )
+{
+ const size_t worker_context_sz = sizeof(*dnsworker_contexts[0]);
+
+ REQUIRE(NULL == dnsworker_contexts[idx]);
+ dnsworker_contexts[idx] = emalloc_zero(worker_context_sz);
+}
+
+
+static dnsworker_ctx *
+get_worker_context(
+ blocking_child * c,
+ u_int idx
+ )
+{
+ static size_t ps = sizeof(dnsworker_contexts[0]);
+ u_int min_new_alloc;
+ u_int new_alloc;
+ size_t octets;
+ size_t new_octets;
+
+ if (dnsworker_contexts_alloc <= idx) {
+ min_new_alloc = 1 + idx;
+ /* round new_alloc up to nearest multiple of 4 */
+ new_alloc = (min_new_alloc + 4) & ~(4 - 1);
+ new_octets = new_alloc * ps;
+ octets = dnsworker_contexts_alloc * ps;
+ dnsworker_contexts = erealloc_zero(dnsworker_contexts,
+ new_octets, octets);
+ dnsworker_contexts_alloc = new_alloc;
+ }
+
+ if (NULL == dnsworker_contexts[idx])
+ alloc_dnsworker_context(idx);
+ ZERO(*dnsworker_contexts[idx]);
+ dnsworker_contexts[idx]->c = c;
+
+ return dnsworker_contexts[idx];
+}
+
+
+static void
+scheduled_sleep(
+ time_t scheduled,
+ time_t earliest,
+ dnsworker_ctx * worker_ctx
+ )
+{
+ time_t now;
+
+ if (scheduled < worker_ctx->ignore_scheduled_before) {
+ TRACE(1, ("ignoring sleep until %s scheduled at %s (before %s)\n",
+ humantime(earliest), humantime(scheduled),
+ humantime(worker_ctx->ignore_scheduled_before)));
+ return;
+ }
+
+ now = time(NULL);
+
+ if (now < earliest) {
+ TRACE(1, ("sleep until %s scheduled at %s (>= %s)\n",
+ humantime(earliest), humantime(scheduled),
+ humantime(worker_ctx->ignore_scheduled_before)));
+ if (-1 == worker_sleep(worker_ctx->c, earliest - now)) {
+ /* our sleep was interrupted */
+ now = time(NULL);
+ worker_ctx->ignore_scheduled_before = now;
+#ifdef HAVE_RES_INIT
+ worker_ctx->next_res_init = now + 60;
+ next_res_init = worker_ctx->next_res_init;
+ res_init();
+#endif
+ TRACE(1, ("sleep interrupted by daemon, ignoring sleeps scheduled before now (%s)\n",
+ humantime(worker_ctx->ignore_scheduled_before)));
+ }
+ }
+}
+
+
+/*
+ * manage_dns_retry_interval is a helper used by
+ * getaddrinfo_sometime_complete and getnameinfo_sometime_complete
+ * to calculate the new retry interval and schedule the next query.
+ */
+static void
+manage_dns_retry_interval(
+ time_t * pscheduled,
+ time_t * pwhen,
+ int * pretry,
+ time_t * pnext_timeslot
+ )
+{
+ time_t now;
+ time_t when;
+ int retry;
+
+ now = time(NULL);
+ retry = *pretry;
+ when = max(now + retry, *pnext_timeslot);
+ *pnext_timeslot = when;
+ retry = min(64, retry << 1);
+
+ *pscheduled = now;
+ *pwhen = when;
+ *pretry = retry;
+}
+
+/*
+ * should_retry_dns is a helper used by getaddrinfo_sometime_complete
+ * and getnameinfo_sometime_complete which implements ntpd's DNS retry
+ * policy.
+ */
+static int
+should_retry_dns(
+ int rescode,
+ int res_errno
+ )
+{
+ static int eai_again_seen;
+ int again;
+#if defined (EAI_SYSTEM) && defined(DEBUG)
+ char msg[256];
+#endif
+
+ /*
+ * If the resolver failed, see if the failure is
+ * temporary. If so, return success.
+ */
+ again = 0;
+
+ switch (rescode) {
+
+ case EAI_FAIL:
+ again = 1;
+ break;
+
+ case EAI_AGAIN:
+ again = 1;
+ eai_again_seen = 1; /* [Bug 1178] */
+ break;
+
+ case EAI_NONAME:
+#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
+ case EAI_NODATA:
+#endif
+ again = !eai_again_seen; /* [Bug 1178] */
+ break;
+
+#ifdef EAI_SYSTEM
+ case EAI_SYSTEM:
+ /*
+ * EAI_SYSTEM means the real error is in errno. We should be more
+ * discriminating about which errno values require retrying, but
+ * this matches existing behavior.
+ */
+ again = 1;
+# ifdef DEBUG
+ errno_to_str(res_errno, msg, sizeof(msg));
+ TRACE(1, ("intres: EAI_SYSTEM errno %d (%s) means try again, right?\n",
+ res_errno, msg));
+# endif
+ break;
+#endif
+ }
+
+ TRACE(2, ("intres: resolver returned: %s (%d), %sretrying\n",
+ gai_strerror(rescode), rescode, again ? "" : "not "));
+
+ return again;
+}
+
+#else /* !WORKER follows */
+int ntp_intres_nonempty_compilation_unit;
+#endif
diff --git a/libntp/ntp_libopts.c b/libntp/ntp_libopts.c
index f15597001994..c504f8bf18cc 100644
--- a/libntp/ntp_libopts.c
+++ b/libntp/ntp_libopts.c
@@ -17,9 +17,11 @@ extern const char *Version; /* version.c for each program */
/*
- * ntpOptionProcess() is a clone of libopts' optionProcess which
- * overrides the --version output, appending detail from version.c
- * which was not available at Autogen time.
+ * ntpOptionProcess() was a clone of libopts' optionProcess which
+ * overrode the --version output, appending detail from version.c
+ * which was not available at Autogen time. This is now done via
+ * AutoOpts' version-proc = override in copyright.def, so this
+ * routine is a straightforward wrapper of optionProcess().
*/
int
ntpOptionProcess(
@@ -28,27 +30,29 @@ ntpOptionProcess(
char ** argv
)
{
- char * pchOpts;
- char ** ppzFullVersion;
- char * pzNewFV;
- char * pzAutogenFV;
- size_t octets;
- int rc;
+ return optionProcess(pOpts, argc, argv);
+}
+
- pchOpts = (void *)pOpts;
- ppzFullVersion = (char **)(pchOpts + offsetof(tOptions,
- pzFullVersion));
- pzAutogenFV = *ppzFullVersion;
- octets = strlen(pzAutogenFV) +
- 1 + /* '\n' */
- strlen(Version) +
- 1; /* '\0' */
- pzNewFV = emalloc(octets);
- snprintf(pzNewFV, octets, "%s\n%s", pzAutogenFV, Version);
- *ppzFullVersion = pzNewFV;
- rc = optionProcess(pOpts, argc, argv);
- *ppzFullVersion = pzAutogenFV;
- free(pzNewFV);
+/*
+ * ntpOptionPrintVersion() replaces the stock optionPrintVersion() via
+ * version-proc = ntpOptionPrintVersion; in copyright.def. It differs
+ * from the stock function by displaying the complete version string,
+ * including compile time which was unknown when Autogen ran.
+ *
+ * Like optionPrintVersion() this function must exit(0) rather than
+ * return.
+ */
+void
+ntpOptionPrintVersion(
+ tOptions * pOpts,
+ tOptDesc * pOD
+ )
+{
+ UNUSED_ARG(pOpts);
+ UNUSED_ARG(pOD);
- return rc;
+ printf("%s\n", Version);
+ fflush(stdout);
+ exit(EXIT_SUCCESS);
}
diff --git a/libntp/ntp_lineedit.c b/libntp/ntp_lineedit.c
index 55fdf0430ee8..c5aad3108614 100644
--- a/libntp/ntp_lineedit.c
+++ b/libntp/ntp_lineedit.c
@@ -93,8 +93,7 @@ ntp_readline_init(
if (NULL == ntp_hist) {
- fprintf(stderr, "history_init(): %s\n",
- strerror(errno));
+ mfprintf(stderr, "history_init(): %m\n");
fflush(stderr);
el_end(ntp_el);
@@ -103,7 +102,7 @@ ntp_readline_init(
success = 0;
} else {
- memset(&hev, 0, sizeof(hev));
+ ZERO(hev);
#ifdef H_SETSIZE
history(ntp_hist, &hev, H_SETSIZE, 128);
#endif
diff --git a/libntp/ntp_random.c b/libntp/ntp_random.c
index c982a0d0ac1a..0ada44f256b0 100644
--- a/libntp/ntp_random.c
+++ b/libntp/ntp_random.c
@@ -45,7 +45,7 @@ static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
#endif
#include <stdio.h>
-#include <ntp_types.h>
+#include <l_stdlib.h>
#include <ntp_random.h>
#include <ntp_unixtime.h>
@@ -140,15 +140,8 @@ static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
#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:
*
@@ -163,7 +156,7 @@ static long seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
* MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
*/
-static long randtbl[DEG_3 + 1] = {
+static unsigned long randtbl[DEG_3 + 1] = {
TYPE_3,
#ifdef USE_WEAK_SEEDING
/* Historic implementation compatibility */
@@ -198,8 +191,8 @@ static long randtbl[DEG_3 + 1] = {
* 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];
+static unsigned long *fptr = &randtbl[SEP_3 + 1];
+static unsigned long *rptr = &randtbl[1];
/*
* The following things are the pointer to the state information table, the
@@ -211,11 +204,11 @@ static long *rptr = &randtbl[1];
* 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 unsigned 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 unsigned long *end_ptr = &randtbl[DEG_3 + 1];
static inline long good_rand (long);
@@ -268,19 +261,22 @@ ntp_srandom(
unsigned long x
)
{
- register long i;
+ long i;
- if (rand_type == TYPE_0)
+ if (rand_type == TYPE_0) {
state[0] = x;
- else {
+ } 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)ntp_random();
+ x = ntp_random();
}
+
+ /* seed the likely faster (and poorer) rand() as well */
+ srand((u_int)x);
}
/*
@@ -307,6 +303,24 @@ ntp_srandomdev( void )
}
#endif
+
+/*
+ * ntp_initstate() and ntp_setstate() are unused in our codebase and
+ * trigger warnings due to casting to a more-strictly-aligned pointer
+ * on alignment-sensitive platforms. #ifdef them away to save noise,
+ * build time, and binary space, but retain the code in case we find a
+ * use.
+ */
+#ifdef COMPILE_UNUSED_FUNCTIONS
+/*
+ * 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 };
+
/*
* initstate:
*
@@ -370,7 +384,7 @@ ntp_initstate(
rand_deg = DEG_4;
rand_sep = SEP_4;
}
- state = (long *) (long_arg_state + 1); /* first location */
+ state = (unsigned long *) (long_arg_state + 1); /* first location */
end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */
ntp_srandom(seed);
if (rand_type == TYPE_0)
@@ -404,7 +418,7 @@ ntp_setstate(
char *arg_state /* pointer to state array */
)
{
- register long *new_state = (long *) arg_state;
+ register unsigned long *new_state = (unsigned long *) arg_state;
register long type = new_state[0] % MAX_TYPES;
register long rear = new_state[0] / MAX_TYPES;
char *ostate = (char *)(&state[-1]);
@@ -427,7 +441,7 @@ ntp_setstate(
(void)fprintf(stderr,
"random: state info corrupted; not changed.\n");
}
- state = (long *) (new_state + 1);
+ state = (new_state + 1);
if (rand_type != TYPE_0) {
rptr = &state[rear];
fptr = &state[(rear + rand_sep) % rand_deg];
@@ -435,6 +449,8 @@ ntp_setstate(
end_ptr = &state[rand_deg]; /* set end_ptr too */
return(ostate);
}
+#endif /* COMPILE_UNUSED_FUNCTIONS */
+
/*
* random:
@@ -457,7 +473,7 @@ long
ntp_random( void )
{
register long i;
- register long *f, *r;
+ register unsigned long *f, *r;
if (rand_type == TYPE_0) {
i = state[0];
diff --git a/libntp/ntp_rfc2553.c b/libntp/ntp_rfc2553.c
index 03af593cf71e..f267999c5e3f 100644
--- a/libntp/ntp_rfc2553.c
+++ b/libntp/ntp_rfc2553.c
@@ -80,8 +80,152 @@
#include "ntpd.h"
#include "ntp_malloc.h"
-#include "ntp_stdlib.h"
#include "ntp_string.h"
+#include "ntp_debug.h"
+
+
+/*
+ * copy_addrinfo() - copy a single addrinfo to malloc()'d block.
+ * copy_addrinfo_list() - copy an addrinfo list to malloc()'d block.
+ *
+ * Copies an addrinfo list and its associated data to a contiguous block
+ * of storage from emalloc(). Callback routines invoked via
+ * getaddrinfo_sometime() have access to the resulting addrinfo list
+ * only until they return. This routine provides an easy way to make a
+ * persistent copy. Although the list provided to gai_sometime_callback
+ * routines is similarly contiguous, to keep this code usable in any
+ * context where we might want to duplicate an addrinfo list, it does
+ * not require the input list be contiguous.
+ *
+ * The returned list head pointer is passed to free() to release the
+ * entire list.
+ *
+ * In keeping with the rest of the NTP distribution, sockaddr_u is used
+ * in preference to struct sockaddr_storage, which is a member of the
+ * former union and so compatible.
+ *
+ * The rest of ntp_rfc2553.c is conditioned on ISC_PLATFORM_HAVEIPV6
+ * not being defined, copy_addrinfo_*() are exceptions.
+ */
+struct addrinfo * copy_addrinfo_common(const struct addrinfo *, int
+#ifdef EREALLOC_CALLSITE
+ ,
+ const char *, int
+#endif
+ );
+
+
+struct addrinfo *
+copy_addrinfo_impl(
+ const struct addrinfo * src
+#ifdef EREALLOC_CALLSITE
+ ,
+ const char * caller_file,
+ int caller_line
+#endif
+ )
+{
+ return copy_addrinfo_common(src, TRUE
+#ifdef EREALLOC_CALLSITE
+ ,
+ caller_file, caller_line
+#endif
+ );
+}
+
+
+struct addrinfo *
+copy_addrinfo_list_impl(
+ const struct addrinfo * src
+#ifdef EREALLOC_CALLSITE
+ ,
+ const char * caller_file,
+ int caller_line
+#endif
+ )
+{
+ return copy_addrinfo_common(src, FALSE
+#ifdef EREALLOC_CALLSITE
+ ,
+ caller_file, caller_line
+#endif
+ );
+}
+
+
+struct addrinfo *
+copy_addrinfo_common(
+ const struct addrinfo * src,
+ int just_one
+#ifdef EREALLOC_CALLSITE
+ ,
+ const char * caller_file,
+ int caller_line
+#endif
+ )
+{
+ const struct addrinfo * ai_src;
+ const struct addrinfo * ai_nxt;
+ struct addrinfo * ai_cpy;
+ struct addrinfo * dst;
+ sockaddr_u * psau;
+ char * pcanon;
+ u_int elements;
+ size_t octets;
+ size_t canons_octets;
+ size_t str_octets;
+
+ elements = 0;
+ canons_octets = 0;
+
+ for (ai_src = src; NULL != ai_src; ai_src = ai_nxt) {
+ if (just_one)
+ ai_nxt = NULL;
+ else
+ ai_nxt = ai_src->ai_next;
+ ++elements;
+ if (NULL != ai_src->ai_canonname)
+ canons_octets += 1 + strlen(ai_src->ai_canonname);
+ }
+
+ octets = elements * (sizeof(*ai_cpy) + sizeof(*psau));
+ octets += canons_octets;
+
+ dst = erealloczsite(NULL, octets, 0, TRUE, caller_file,
+ caller_line);
+ ai_cpy = dst;
+ psau = (void *)(ai_cpy + elements);
+ pcanon = (void *)(psau + elements);
+
+ for (ai_src = src; NULL != ai_src; ai_src = ai_nxt) {
+ if (just_one)
+ ai_nxt = NULL;
+ else
+ ai_nxt = ai_src->ai_next;
+ *ai_cpy = *ai_src;
+ REQUIRE(ai_src->ai_addrlen <= sizeof(sockaddr_u));
+ memcpy(psau, ai_src->ai_addr, ai_src->ai_addrlen);
+ ai_cpy->ai_addr = &psau->sa;
+ ++psau;
+ if (NULL != ai_cpy->ai_canonname) {
+ ai_cpy->ai_canonname = pcanon;
+ str_octets = 1 + strlen(ai_src->ai_canonname);
+ memcpy(pcanon, ai_src->ai_canonname, str_octets);
+ pcanon += str_octets;
+ }
+ if (NULL != ai_cpy->ai_next) {
+ if (just_one)
+ ai_cpy->ai_next = NULL;
+ else
+ ai_cpy->ai_next = ai_cpy + 1;
+ }
+ ++ai_cpy;
+ }
+ NTP_ENSURE(pcanon == ((char *)dst + octets));
+
+ return dst;
+}
+
#ifndef ISC_PLATFORM_HAVEIPV6
@@ -290,7 +434,6 @@ getnameinfo (const struct sockaddr *sa, u_int salen, char *host,
size_t hostlen, char *serv, size_t servlen, int flags)
{
struct hostent *hp;
- int namelen;
if (sa->sa_family != AF_INET)
return (EAI_FAMILY);
@@ -303,16 +446,8 @@ getnameinfo (const struct sockaddr *sa, u_int salen, char *host,
else
return (EAI_FAIL);
}
- if (host != NULL && hostlen > 0) {
- /*
- * Don't exceed buffer
- */
- namelen = min(strlen(hp->h_name), hostlen - 1);
- if (namelen > 0) {
- strncpy(host, hp->h_name, namelen);
- host[namelen] = '\0';
- }
- }
+ if (host != NULL && hostlen > 0)
+ strlcpy(host, hp->h_name, hostlen);
return (0);
}
@@ -433,7 +568,7 @@ do_nodename(
#ifdef ISC_PLATFORM_HAVESALEN
ai->ai_addr->sa_len = sizeof(struct sockaddr);
#endif
- if (hints != NULL && hints->ai_flags & AI_CANONNAME)
+ if (hints != NULL && (hints->ai_flags & AI_CANONNAME))
ai->ai_canonname = estrdup(hp->h_name);
return (0);
}
diff --git a/libntp/ntp_worker.c b/libntp/ntp_worker.c
new file mode 100644
index 000000000000..bb1cb87e44a0
--- /dev/null
+++ b/libntp/ntp_worker.c
@@ -0,0 +1,340 @@
+/*
+ * ntp_worker.c
+ */
+#include <config.h>
+#include "ntp_workimpl.h"
+
+#ifdef WORKER
+
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+
+#include "iosignal.h"
+#include "ntp_stdlib.h"
+#include "ntp_malloc.h"
+#include "ntp_syslog.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_assert.h"
+#include "ntp_unixtime.h"
+#include "intreswork.h"
+
+
+#define CHILD_MAX_IDLE (3 * 60) /* seconds, idle worker limit */
+
+blocking_child ** blocking_children;
+size_t blocking_children_alloc;
+int worker_per_query; /* boolean */
+int intres_req_pending;
+
+
+#ifndef HAVE_IO_COMPLETION_PORT
+/*
+ * pipe_socketpair()
+ *
+ * Provides an AF_UNIX socketpair on systems which have them, otherwise
+ * pair of unidirectional pipes.
+ */
+int
+pipe_socketpair(
+ int caller_fds[2],
+ int * is_pipe
+ )
+{
+ int rc;
+ int fds[2];
+ int called_pipe;
+
+#ifdef HAVE_SOCKETPAIR
+ rc = socketpair(AF_UNIX, SOCK_STREAM, 0, &fds[0]);
+#else
+ rc = -1;
+#endif
+
+ if (-1 == rc) {
+ rc = pipe(&fds[0]);
+ called_pipe = TRUE;
+ } else {
+ called_pipe = FALSE;
+ }
+
+ if (-1 == rc)
+ return rc;
+
+ caller_fds[0] = fds[0];
+ caller_fds[1] = fds[1];
+ if (is_pipe != NULL)
+ *is_pipe = called_pipe;
+
+ return 0;
+}
+
+
+/*
+ * close_all_except()
+ *
+ * Close all file descriptors except the given keep_fd.
+ */
+void
+close_all_except(
+ int keep_fd
+ )
+{
+ int fd;
+
+ for (fd = 0; fd < keep_fd; fd++)
+ close(fd);
+
+ close_all_beyond(keep_fd);
+}
+
+
+/*
+ * close_all_beyond()
+ *
+ * Close all file descriptors after the given keep_fd, which is the
+ * highest fd to keep open.
+ */
+void
+close_all_beyond(
+ int keep_fd
+ )
+{
+# ifdef HAVE_CLOSEFROM
+ closefrom(keep_fd + 1);
+# elif defined(F_CLOSEM)
+ /*
+ * From 'Writing Reliable AIX Daemons,' SG24-4946-00,
+ * by Eric Agar (saves us from doing 32767 system
+ * calls)
+ */
+ if (fcntl(keep_fd + 1, F_CLOSEM, 0) == -1)
+ msyslog(LOG_ERR, "F_CLOSEM(%d): %m", keep_fd + 1);
+# else /* !HAVE_CLOSEFROM && !F_CLOSEM follows */
+ int fd;
+ int max_fd;
+
+ max_fd = GETDTABLESIZE();
+ for (fd = keep_fd + 1; fd < max_fd; fd++)
+ close(fd);
+# endif /* !HAVE_CLOSEFROM && !F_CLOSEM */
+}
+#endif /* HAVE_IO_COMPLETION_PORT */
+
+
+u_int
+available_blocking_child_slot(void)
+{
+ const size_t each = sizeof(blocking_children[0]);
+ u_int slot;
+ size_t prev_alloc;
+ size_t new_alloc;
+ size_t prev_octets;
+ size_t octets;
+
+ for (slot = 0; slot < blocking_children_alloc; slot++) {
+ if (NULL == blocking_children[slot])
+ return slot;
+ if (blocking_children[slot]->reusable) {
+ blocking_children[slot]->reusable = FALSE;
+ return slot;
+ }
+ }
+
+ prev_alloc = blocking_children_alloc;
+ prev_octets = prev_alloc * each;
+ new_alloc = blocking_children_alloc + 4;
+ octets = new_alloc * each;
+ blocking_children = erealloc_zero(blocking_children, octets,
+ prev_octets);
+ blocking_children_alloc = new_alloc;
+
+ return prev_alloc;
+}
+
+
+int
+queue_blocking_request(
+ blocking_work_req rtype,
+ void * req,
+ size_t reqsize,
+ blocking_work_callback done_func,
+ void * context
+ )
+{
+ static u_int intres_slot = UINT_MAX;
+ u_int child_slot;
+ blocking_child * c;
+ blocking_pipe_header req_hdr;
+
+ req_hdr.octets = sizeof(req_hdr) + reqsize;
+ req_hdr.magic_sig = BLOCKING_REQ_MAGIC;
+ req_hdr.rtype = rtype;
+ req_hdr.done_func = done_func;
+ req_hdr.context = context;
+
+ child_slot = UINT_MAX;
+ if (worker_per_query || UINT_MAX == intres_slot ||
+ blocking_children[intres_slot]->reusable)
+ child_slot = available_blocking_child_slot();
+ if (!worker_per_query) {
+ if (UINT_MAX == intres_slot)
+ intres_slot = child_slot;
+ else
+ child_slot = intres_slot;
+ if (0 == intres_req_pending)
+ intres_timeout_req(0);
+ }
+ intres_req_pending++;
+ INSIST(UINT_MAX != child_slot);
+ c = blocking_children[child_slot];
+ if (NULL == c) {
+ c = emalloc_zero(sizeof(*c));
+#ifdef WORK_FORK
+ c->req_read_pipe = -1;
+ c->req_write_pipe = -1;
+#endif
+#ifdef WORK_PIPE
+ c->resp_read_pipe = -1;
+ c->resp_write_pipe = -1;
+#endif
+ blocking_children[child_slot] = c;
+ }
+ req_hdr.child_idx = child_slot;
+
+ return send_blocking_req_internal(c, &req_hdr, req);
+}
+
+
+int queue_blocking_response(
+ blocking_child * c,
+ blocking_pipe_header * resp,
+ size_t respsize,
+ const blocking_pipe_header * req
+ )
+{
+ resp->octets = respsize;
+ resp->magic_sig = BLOCKING_RESP_MAGIC;
+ resp->rtype = req->rtype;
+ resp->context = req->context;
+ resp->done_func = req->done_func;
+
+ return send_blocking_resp_internal(c, resp);
+}
+
+
+void
+process_blocking_resp(
+ blocking_child * c
+ )
+{
+ blocking_pipe_header * resp;
+ void * data;
+
+ /*
+ * On Windows send_blocking_resp_internal() may signal the
+ * blocking_response_ready event multiple times while we're
+ * processing a response, so always consume all available
+ * responses before returning to test the event again.
+ */
+#ifdef WORK_THREAD
+ do {
+#endif
+ resp = receive_blocking_resp_internal(c);
+ if (NULL != resp) {
+ DEBUG_REQUIRE(BLOCKING_RESP_MAGIC ==
+ resp->magic_sig);
+ data = (char *)resp + sizeof(*resp);
+ intres_req_pending--;
+ (*resp->done_func)(resp->rtype, resp->context,
+ resp->octets - sizeof(*resp),
+ data);
+ free(resp);
+ }
+#ifdef WORK_THREAD
+ } while (NULL != resp);
+#endif
+ if (!worker_per_query && 0 == intres_req_pending)
+ intres_timeout_req(CHILD_MAX_IDLE);
+ else if (worker_per_query)
+ req_child_exit(c);
+}
+
+
+/*
+ * blocking_child_common runs as a forked child or a thread
+ */
+int
+blocking_child_common(
+ blocking_child *c
+ )
+{
+ int say_bye;
+ blocking_pipe_header *req;
+
+ say_bye = FALSE;
+ while (!say_bye) {
+ req = receive_blocking_req_internal(c);
+ if (NULL == req) {
+ say_bye = TRUE;
+ break;
+ }
+
+ DEBUG_REQUIRE(BLOCKING_REQ_MAGIC == req->magic_sig);
+
+ switch (req->rtype) {
+ case BLOCKING_GETADDRINFO:
+ if (blocking_getaddrinfo(c, req))
+ say_bye = TRUE;
+ break;
+
+ case BLOCKING_GETNAMEINFO:
+ if (blocking_getnameinfo(c, req))
+ say_bye = TRUE;
+ break;
+
+ default:
+ msyslog(LOG_ERR, "unknown req %d to blocking worker", req->rtype);
+ say_bye = TRUE;
+ }
+
+ free(req);
+ }
+
+ return 0;
+}
+
+
+/*
+ * worker_idle_timer_fired()
+ *
+ * The parent starts this timer when the last pending response has been
+ * received from the child, making it idle, and clears the timer when a
+ * request is dispatched to the child. Once the timer expires, the
+ * child is sent packing.
+ *
+ * This is called when worker_idle_timer is nonzero and less than or
+ * equal to current_time.
+ */
+void
+worker_idle_timer_fired(void)
+{
+ u_int idx;
+ blocking_child * c;
+
+ DEBUG_REQUIRE(0 == intres_req_pending);
+
+ intres_timeout_req(0);
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c)
+ continue;
+ req_child_exit(c);
+ }
+}
+
+
+#else /* !WORKER follows */
+int ntp_worker_nonempty_compilation_unit;
+#endif
diff --git a/libntp/numtoa.c b/libntp/numtoa.c
index 36a7c5819a4c..5efbe942e3b4 100644
--- a/libntp/numtoa.c
+++ b/libntp/numtoa.c
@@ -31,3 +31,29 @@ numtoa(
(u_long)netnum & 0xff);
return buf;
}
+
+
+/* Convert a refid & stratum to a string */
+const char *
+refid_str(
+ u_int32 refid,
+ int stratum
+ )
+{
+ char * text;
+ size_t tlen;
+
+ if (stratum > 1)
+ return numtoa(refid);
+
+ LIB_GETBUF(text);
+ text[0] = '.';
+ memcpy(&text[1], &refid, sizeof(refid));
+ text[1 + sizeof(refid)] = '\0';
+ tlen = strlen(text);
+ text[tlen] = '.';
+ text[tlen + 1] = '\0';
+
+ return text;
+}
+
diff --git a/libntp/numtohost.c b/libntp/numtohost.c
index b3d458ee0613..6b250d602de0 100644
--- a/libntp/numtohost.c
+++ b/libntp/numtohost.c
@@ -37,8 +37,7 @@ numtohost(
return numtoa(netnum);
LIB_GETBUF(bp);
-
- bp[LIB_BUFLENGTH-1] = '\0';
- (void) strncpy(bp, hp->h_name, LIB_BUFLENGTH-1);
+ strlcpy(bp, hp->h_name, LIB_BUFLENGTH);
+
return bp;
}
diff --git a/libntp/octtoint.c b/libntp/octtoint.c
index f792b2bd6184..d189e40c494d 100644
--- a/libntp/octtoint.c
+++ b/libntp/octtoint.c
@@ -2,6 +2,7 @@
* octtoint - convert an ascii string in octal to an unsigned
* long, with error checking
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/libntp/prettydate.c b/libntp/prettydate.c
index 1503a2ce87e3..f12129716199 100644
--- a/libntp/prettydate.c
+++ b/libntp/prettydate.c
@@ -1,6 +1,7 @@
/*
* prettydate - convert a time stamp to something readable
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_fp.h"
@@ -8,180 +9,194 @@
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
+#include "ntp_calendar.h"
+
+#if SIZEOF_TIME_T < 4
+# error sizeof(time_t) < 4 -- this will not work!
+#endif
static char *common_prettydate(l_fp *, int);
-const char *months[] = {
+const char * const months[12] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-static const char *days[] = {
+const char * const daynames[7] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
/* Helper function to handle possible wraparound of the ntp epoch.
+ *
+ * Works by periodic extension of the ntp time stamp in the UN*X epoch.
+ * If the 'time_t' is 32 bit, use solar cycle warping to get the value
+ * in a suitable range. Also uses solar cycle warping to work around
+ * really buggy implementations of 'gmtime()' / 'localtime()' that
+ * cannot work with a negative time value, that is, times before
+ * 1970-01-01. (MSVCRT...)
+ *
+ * Apart from that we're assuming that the localtime/gmtime library
+ * functions have been updated so that they work...
+ *
+ * An explanation: The julian calendar repeats ever 28 years, because
+ * it's the LCM of 7 and 1461, the week and leap year cycles. This is
+ * called a 'solar cycle'. The gregorian calendar does the same as
+ * long as no centennial year (divisible by 100, but not 400) goes in
+ * the way. So between 1901 and 2099 (inclusive) we can warp time
+ * stamps by 28 years to make them suitable for localtime() and
+ * gmtime() if we have trouble. Of course this will play hubbubb with
+ * the DST zone switches, so we should do it only if necessary; but as
+ * we NEED a proper conversion to dates via gmtime() we should try to
+ * cope with as many idiosyncrasies as possible.
+ *
+ */
- Works by periodic extension of the ntp time stamp in the NTP epoch. If the
- 'time_t' is 32 bit, use solar cycle warping to get the value in a suitable
- range. Also uses solar cycle warping to work around really buggy
- implementations of 'gmtime()' / 'localtime()' that cannot work with a
- negative time value, that is, times before 1970-01-01. (MSVCRT...)
-
- Apart from that we're assuming that the localtime/gmtime library functions
- have been updated so that they work...
-*/
-
-
-/* solar cycle in secs, unsigned secs and years. And the cycle limits.
-**
-** And an explanation. The julian calendar repeats ever 28 years, because it's
-** the LCM of 7 and 4, the week and leap year cycles. This is called a 'solar
-** cycle'. The gregorian calendar does the same as long as no centennial year
-** (divisible by 100, but not 400) goes in the way. So between 1901 and 2099
-** (inclusive) we can warp time stamps by 28 years to make them suitable for
-** localtime() and gmtime() if we have trouble. Of course this will play
-** hubbubb with the DST zone switches, so we should do it only if necessary;
-** but as we NEED a proper conversion to dates via gmtime() we should try to
-** cope with as many idiosyncrasies as possible.
-*/
+/*
+ * solar cycle in unsigned secs and years, and the cycle limits.
+ */
#define SOLAR_CYCLE_SECS 0x34AADC80UL /* 7*1461*86400*/
#define SOLAR_CYCLE_YEARS 28
#define MINFOLD -3
-#define MAXFOLD 3
+#define MAXFOLD 3
-struct tm *
-ntp2unix_tm(
- u_long ntp, int local
- )
+static struct tm *
+get_struct_tm(
+ const vint64 *stamp,
+ int local)
{
- struct tm *tm;
- int32 folds = 0;
- time_t t = time(NULL);
- u_int32 dwlo = (int32)t; /* might expand for SIZEOF_TIME_T < 4 */
-#if ( SIZEOF_TIME_T > 4 )
- int32 dwhi = (int32)(t >> 16 >> 16);/* double shift: avoid warnings */
-#else
- /*
- * Get the correct sign extension in the high part.
- * (now >> 32) may not work correctly on every 32 bit
- * system, e.g. it yields garbage under Win32/VC6.
- */
- int32 dwhi = (int32)(t >> 31);
-#endif
-
- /* Shift NTP to UN*X epoch, then unfold around currrent time. It's
- * important to use a 32 bit max signed value -- LONG_MAX is 64 bit on
- * a 64-bit system, and it will give wrong results.
- */
- M_ADD(dwhi, dwlo, 0, ((1UL << 31)-1)); /* 32-bit max signed */
- if ((ntp -= JAN_1970) > dwlo)
- --dwhi;
- dwlo = ntp;
-
-# if SIZEOF_TIME_T < 4
-# error sizeof(time_t) < 4 -- this will not work!
-# elif SIZEOF_TIME_T == 4
+ struct tm *tm = NULL;
+ int32 folds = 0;
+ time_t ts;
+
+#ifdef HAVE_INT64
+
+ int64 tl;
+ ts = tl = stamp->q_s;
/*
- ** If the result will not fit into a 'time_t' we have to warp solar
- ** cycles. That's implemented by looped addition / subtraction with
- ** M_ADD and M_SUB to avoid implicit 64 bit operations, especially
- ** division. As he number of warps is rather limited there's no big
- ** performance loss here.
- **
- ** note: unless the high word doesn't match the sign-extended low word,
- ** the combination will not fit into time_t. That's what we use for
- ** loop control here...
- */
- while (dwhi != ((int32)dwlo >> 31)) {
- if (dwhi < 0 && --folds >= MINFOLD)
- M_ADD(dwhi, dwlo, 0, SOLAR_CYCLE_SECS);
- else if (dwhi >= 0 && ++folds <= MAXFOLD)
- M_SUB(dwhi, dwlo, 0, SOLAR_CYCLE_SECS);
- else
- return NULL;
+ * If there is chance of truncation, try to fix it. Let the
+ * compiler find out if this can happen at all.
+ */
+ while (ts != tl) { /* truncation? */
+ if (tl < 0) {
+ if (--folds < MINFOLD)
+ return NULL;
+ tl += SOLAR_CYCLE_SECS;
+ } else {
+ if (++folds > MAXFOLD)
+ return NULL;
+ tl -= SOLAR_CYCLE_SECS;
+ }
+ ts = tl; /* next try... */
}
+#else
-# else
-
- /* everything fine -- no reduction needed for the next thousand years */
+ /*
+ * since we do not have 64-bit scalars, it's not likely we have
+ * 64-bit time_t. Assume 32 bits and properly reduce the value.
+ */
+ u_int32 hi, lo;
-# endif
+ hi = stamp->D_s.hi;
+ lo = stamp->D_s.lo;
- /* combine hi/lo to make time stamp */
- t = ((time_t)dwhi << 16 << 16) | dwlo; /* double shift: avoid warnings */
+ while ((hi && ~hi) || ((hi ^ lo) & 0x80000000u)) {
+ if (M_ISNEG(hi, lo)) {
+ if (--folds < MINFOLD)
+ return NULL;
+ M_ADD(hi, lo, 0, SOLAR_CYCLE_SECS);
+ } else {
+ if (++folds > MAXFOLD)
+ return NULL;
+ M_SUB(hi, lo, 0, SOLAR_CYCLE_SECS);
+ }
+ }
+ ts = (int32)lo;
-# ifdef _MSC_VER /* make this an autoconf option? */
+#endif
/*
- ** The MSDN says that the (Microsoft) Windoze versions of 'gmtime()'
- ** and 'localtime()' will bark on time stamps < 0. Better to fix it
- ** immediately.
- */
- while (t < 0) {
- if (--folds < MINFOLD)
- return NULL;
- t += SOLAR_CYCLE_SECS;
- }
-
-# endif /* Microsoft specific */
-
- /* 't' should be a suitable value by now. Just go ahead. */
- while ( (tm = (*(local ? localtime : gmtime))(&t)) == 0)
- /* seems there are some other pathological implementations of
- ** 'gmtime()' and 'localtime()' somewhere out there. No matter
- ** if we have 32-bit or 64-bit 'time_t', try to fix this by
- ** solar cycle warping again...
- */
- if (t < 0) {
+ * 'ts' should be a suitable value by now. Just go ahead, but
+ * with care:
+ *
+ * There are some pathological implementations of 'gmtime()'
+ * and 'localtime()' out there. No matter if we have 32-bit or
+ * 64-bit 'time_t', try to fix this by solar cycle warping
+ * again...
+ *
+ * At least the MSDN says that the (Microsoft) Windoze
+ * versions of 'gmtime()' and 'localtime()' will bark on time
+ * stamps < 0.
+ */
+ while ((tm = (*(local ? localtime : gmtime))(&ts)) == NULL)
+ if (ts < 0) {
if (--folds < MINFOLD)
return NULL;
- t += SOLAR_CYCLE_SECS;
- } else {
- if ((++folds > MAXFOLD) || ((t -= SOLAR_CYCLE_SECS) < 0))
- return NULL; /* That's truely pathological! */
- }
- /* 'tm' surely not NULL here... */
+ ts += SOLAR_CYCLE_SECS;
+ } else if (ts >= SOLAR_CYCLE_SECS) {
+ if (++folds > MAXFOLD)
+ return NULL;
+ ts -= SOLAR_CYCLE_SECS;
+ } else
+ return NULL; /* That's truly pathological! */
+
+ /* 'tm' surely not NULL here! */
NTP_INSIST(tm != NULL);
if (folds != 0) {
tm->tm_year += folds * SOLAR_CYCLE_YEARS;
if (tm->tm_year <= 0 || tm->tm_year >= 200)
return NULL; /* left warp range... can't help here! */
}
+
return tm;
}
-
static char *
common_prettydate(
l_fp *ts,
int local
)
{
- char *bp;
- struct tm *tm;
- u_long sec;
- u_long msec;
+ static const char* pfmt[2] = {
+ "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03u",
+ "%08lx.%08lx [%s, %s %2d %4d %2d:%02d:%02d.%03u UTC]"
+ };
+
+ char *bp;
+ struct tm *tm;
+ u_int msec;
+ u_int32 ntps;
+ vint64 sec;
LIB_GETBUF(bp);
-
- sec = ts->l_ui;
- msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
- tm = ntp2unix_tm(sec, local);
- if (!tm)
- snprintf(bp, LIB_BUFLENGTH,
- "%08lx.%08lx --- --- -- ---- --:--:--",
- (u_long)ts->l_ui, (u_long)ts->l_uf);
- else
- snprintf(bp, LIB_BUFLENGTH,
- "%08lx.%08lx %s, %s %2d %4d %2d:%02d:%02d.%03lu",
+ /* get & fix milliseconds */
+ ntps = ts->l_ui;
+ msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
+ if (msec >= 1000u) {
+ msec -= 1000u;
+ ntps++;
+ }
+ sec = ntpcal_ntp_to_time(ntps, NULL);
+ tm = get_struct_tm(&sec, local);
+ if (!tm) {
+ /*
+ * get a replacement, but always in UTC, using
+ * ntpcal_time_to_date()
+ */
+ struct calendar jd;
+ ntpcal_time_to_date(&jd, &sec);
+ snprintf(bp, LIB_BUFLENGTH, pfmt[local != 0],
(u_long)ts->l_ui, (u_long)ts->l_uf,
- days[tm->tm_wday], months[tm->tm_mon],
+ daynames[jd.weekday], months[jd.month-1],
+ jd.monthday, jd.year, jd.hour,
+ jd.minute, jd.second, msec);
+ } else
+ snprintf(bp, LIB_BUFLENGTH, pfmt[0],
+ (u_long)ts->l_ui, (u_long)ts->l_uf,
+ daynames[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;
}
@@ -202,3 +217,15 @@ gmprettydate(
{
return common_prettydate(ts, 0);
}
+
+
+struct tm *
+ntp2unix_tm(
+ u_int32 ntp, int local
+ )
+{
+ vint64 vl;
+ vl = ntpcal_ntp_to_time(ntp, NULL);
+ return get_struct_tm(&vl, local);
+}
+
diff --git a/libntp/recvbuff.c b/libntp/recvbuff.c
index 9a7d6caf4333..83a9ee193a3b 100644
--- a/libntp/recvbuff.c
+++ b/libntp/recvbuff.c
@@ -3,34 +3,27 @@
#endif
#include <stdio.h>
-#include "ntp_machine.h"
+
#include "ntp_assert.h"
-#include "ntp_fp.h"
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
-#include "ntp_io.h"
#include "ntp_lists.h"
#include "recvbuff.h"
#include "iosignal.h"
-
-#ifdef DEBUG
-static void uninit_recvbuff(void);
-#endif
-
/*
* 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 full_recvbufs; /* recvbufs on full_recv_fifo */
+static u_long volatile free_recvbufs; /* recvbufs on free_recv_list */
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 u_long volatile buffer_shortfall;/* number of missed free receive buffers
between replenishments */
-static ISC_LIST(recvbuf_t) full_recv_list; /* Currently used recv buffers */
-static recvbuf_t * free_recv_list; /* Currently unused buffers */
+static DECL_FIFO_ANCHOR(recvbuf_t) full_recv_fifo;
+static recvbuf_t * free_recv_list;
#if defined(SYS_WINNT)
@@ -43,10 +36,15 @@ static CRITICAL_SECTION RecvLock;
# define LOCK() EnterCriticalSection(&RecvLock)
# define UNLOCK() LeaveCriticalSection(&RecvLock)
#else
-# define LOCK()
-# define UNLOCK()
+# define LOCK() do {} while (FALSE)
+# define UNLOCK() do {} while (FALSE)
#endif
+#ifdef DEBUG
+static void uninit_recvbuff(void);
+#endif
+
+
u_long
free_recvbuffs (void)
{
@@ -74,7 +72,7 @@ lowater_additions(void)
static inline void
initialise_buffer(recvbuf_t *buff)
{
- memset(buff, 0, sizeof(*buff));
+ ZERO(*buff);
}
static void
@@ -87,7 +85,7 @@ create_buffers(int nbufs)
buffer_shortfall = 0;
#ifndef DEBUG
- bufp = emalloc(abuf * sizeof(*bufp));
+ bufp = emalloc_zero(abuf * sizeof(*bufp));
#endif
for (i = 0; i < abuf; i++) {
@@ -97,10 +95,9 @@ create_buffers(int nbufs)
* free()d during ntpd shutdown on DEBUG builds to
* keep them out of heap leak reports.
*/
- bufp = emalloc(sizeof(*bufp));
+ bufp = emalloc_zero(sizeof(*bufp));
#endif
- memset(bufp, 0, sizeof(*bufp));
- LINK_SLIST(free_recv_list, bufp, link.next);
+ LINK_SLIST(free_recv_list, bufp, link);
bufp++;
free_recvbufs++;
total_recvbufs++;
@@ -115,7 +112,6 @@ init_recvbuff(int nbufs)
/*
* Init buffer free list and stat counters
*/
- ISC_LIST_INIT(full_recv_list);
free_recvbufs = total_recvbufs = 0;
full_recvbufs = lowater_adds = 0;
@@ -137,16 +133,19 @@ uninit_recvbuff(void)
{
recvbuf_t *rbunlinked;
- while ((rbunlinked = ISC_LIST_HEAD(full_recv_list)) != NULL) {
- ISC_LIST_DEQUEUE_TYPE(full_recv_list, rbunlinked, link, recvbuf_t);
+ for (;;) {
+ UNLINK_FIFO(rbunlinked, full_recv_fifo, link);
+ if (rbunlinked == NULL)
+ break;
free(rbunlinked);
}
- do {
- UNLINK_HEAD_SLIST(rbunlinked, free_recv_list, link.next);
- if (rbunlinked != NULL)
- free(rbunlinked);
- } while (rbunlinked != NULL);
+ for (;;) {
+ UNLINK_HEAD_SLIST(rbunlinked, free_recv_list, link);
+ if (rbunlinked == NULL)
+ break;
+ free(rbunlinked);
+ }
}
#endif /* DEBUG */
@@ -163,10 +162,10 @@ freerecvbuf(recvbuf_t *rb)
}
LOCK();
- (rb->used)--;
+ rb->used--;
if (rb->used != 0)
msyslog(LOG_ERR, "******** freerecvbuff non-zero usage: %d *******", rb->used);
- LINK_SLIST(free_recv_list, rb, link.next);
+ LINK_SLIST(free_recv_list, rb, link);
free_recvbufs++;
UNLOCK();
}
@@ -180,29 +179,32 @@ add_full_recv_buffer(recvbuf_t *rb)
return;
}
LOCK();
- ISC_LINK_INIT(rb, link);
- ISC_LIST_APPEND(full_recv_list, rb, link);
+ LINK_FIFO(full_recv_fifo, rb, link);
full_recvbufs++;
UNLOCK();
}
+
recvbuf_t *
get_free_recv_buffer(void)
{
recvbuf_t *buffer;
LOCK();
- UNLINK_HEAD_SLIST(buffer, free_recv_list, link.next);
+ UNLINK_HEAD_SLIST(buffer, free_recv_list, link);
if (buffer != NULL) {
free_recvbufs--;
initialise_buffer(buffer);
- (buffer->used)++;
- } else
+ buffer->used++;
+ } else {
buffer_shortfall++;
+ }
UNLOCK();
- return (buffer);
+
+ return buffer;
}
+
#ifdef HAVE_IO_COMPLETION_PORT
recvbuf_t *
get_free_recv_buffer_alloc(void)
@@ -219,10 +221,12 @@ get_free_recv_buffer_alloc(void)
}
#endif
+
recvbuf_t *
get_full_recv_buffer(void)
{
- recvbuf_t *rbuf;
+ recvbuf_t * rbuf;
+
LOCK();
#ifdef HAVE_SIGNALED_IO
@@ -245,26 +249,78 @@ get_full_recv_buffer(void)
/*
* try to grab a full buffer
*/
- rbuf = ISC_LIST_HEAD(full_recv_list);
- if (rbuf != NULL) {
- ISC_LIST_DEQUEUE_TYPE(full_recv_list, rbuf, link, recvbuf_t);
- --full_recvbufs;
- } else
- /*
- * Make sure we reset the full count to 0
- */
- full_recvbufs = 0;
+ UNLINK_FIFO(rbuf, full_recv_fifo, link);
+ if (rbuf != NULL)
+ full_recvbufs--;
UNLOCK();
- return (rbuf);
+
+ return rbuf;
}
+
+/*
+ * purge_recv_buffers_for_fd() - purges any previously-received input
+ * from a given file descriptor.
+ */
+void
+purge_recv_buffers_for_fd(
+ SOCKET fd
+ )
+{
+ recvbuf_t *rbufp;
+ recvbuf_t *next;
+ recvbuf_t *punlinked;
+
+ LOCK();
+
+ for (rbufp = HEAD_FIFO(full_recv_fifo);
+ rbufp != NULL;
+ rbufp = next) {
+ next = rbufp->link;
+ if (rbufp->fd == fd) {
+ UNLINK_MID_FIFO(punlinked, full_recv_fifo,
+ rbufp, link, recvbuf_t);
+ INSIST(punlinked == rbufp);
+ full_recvbufs--;
+ freerecvbuf(rbufp);
+ }
+ }
+
+ UNLOCK();
+}
+
+
/*
* Checks to see if there are buffers to process
*/
isc_boolean_t has_full_recv_buffer(void)
{
- if (ISC_LIST_HEAD(full_recv_list) != NULL)
+ if (HEAD_FIFO(full_recv_fifo) != NULL)
return (ISC_TRUE);
else
return (ISC_FALSE);
}
+
+
+#ifdef NTP_DEBUG_LISTS_H
+void
+check_gen_fifo_consistency(void *fifo)
+{
+ gen_fifo *pf;
+ gen_node *pthis;
+ gen_node **pptail;
+
+ pf = fifo;
+ REQUIRE((NULL == pf->phead && NULL == pf->pptail) ||
+ (NULL != pf->phead && NULL != pf->pptail));
+
+ pptail = &pf->phead;
+ for (pthis = pf->phead;
+ pthis != NULL;
+ pthis = pthis->link)
+ if (NULL != pthis->link)
+ pptail = &pthis->link;
+
+ REQUIRE(NULL == pf->pptail || pptail == pf->pptail);
+}
+#endif /* NTP_DEBUG_LISTS_H */
diff --git a/libntp/refnumtoa.c b/libntp/refnumtoa.c
index c52bc28b6389..e6ca55aef868 100644
--- a/libntp/refnumtoa.c
+++ b/libntp/refnumtoa.c
@@ -1,36 +1,36 @@
/*
* refnumtoa - return asciized refclock addresses stored in local array space
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_net.h"
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
-char *
+const char *
refnumtoa(
sockaddr_u *num
)
{
- register u_int32 netnum;
- register char *buf;
- register const char *rclock;
+ u_int32 netnum;
+ char *buf;
+ const char *rclock;
- LIB_GETBUF(buf);
-
- if (ISREFCLOCKADR(num)) {
- netnum = SRCADR(num);
- rclock = clockname((int)((u_long)netnum >> 8) & 0xff);
+ if (!ISREFCLOCKADR(num))
+ return socktoa(num);
- if (rclock != NULL)
- snprintf(buf, LIB_BUFLENGTH, "%s(%lu)",
- rclock, (u_long)netnum & 0xff);
- else
- snprintf(buf, LIB_BUFLENGTH, "REFCLK(%lu,%lu)",
- ((u_long)netnum >> 8) & 0xff,
- (u_long)netnum & 0xff);
+ LIB_GETBUF(buf);
+ netnum = SRCADR(num);
+ rclock = clockname((int)((u_long)netnum >> 8) & 0xff);
- }
+ if (rclock != NULL)
+ snprintf(buf, LIB_BUFLENGTH, "%s(%lu)",
+ rclock, (u_long)netnum & 0xff);
+ else
+ snprintf(buf, LIB_BUFLENGTH, "REFCLK(%lu,%lu)",
+ ((u_long)netnum >> 8) & 0xff,
+ (u_long)netnum & 0xff);
return buf;
}
diff --git a/libntp/snprintf.c b/libntp/snprintf.c
index 7588b8483a0a..2b6a37473e1f 100644
--- a/libntp/snprintf.c
+++ b/libntp/snprintf.c
@@ -1,62 +1,2132 @@
+/*
+ * Modified by Dave Hart for integration into NTP 4.2.7 <hart@ntp.org>
+ *
+ * Changed in a backwards-incompatible way to separate HAVE_SNPRINTF
+ * from HW_WANT_RPL_SNPRINTF, etc. for each of the four replaced
+ * functions.
+ *
+ * Changed to honor hw_force_rpl_snprintf=yes, etc. This is used by NTP
+ * to test rpl_snprintf() and rpl_vsnprintf() on platforms which provide
+ * C99-compliant implementations.
+ */
+
+/* $Id: snprintf.c,v 1.9 2008/01/20 14:02:00 holger Exp $ */
+
+/*
+ * Copyright (c) 1995 Patrick Powell.
+ *
+ * This code is based on code written by Patrick Powell <papowell@astart.com>.
+ * It may be used for any purpose as long as this notice remains intact on all
+ * source code distributions.
+ */
+
+/*
+ * Copyright (c) 2008 Holger Weiss.
+ *
+ * This version of the code is maintained by Holger Weiss <holger@jhweiss.de>.
+ * My changes to the code may freely be used, modified and/or redistributed for
+ * any purpose. It would be nice if additions and fixes to this file (including
+ * trivial code cleanups) would be sent back in order to let me include them in
+ * the version available at <http://www.jhweiss.de/software/snprintf.html>.
+ * However, this is not a requirement for using or redistributing (possibly
+ * modified) versions of this file, nor is leaving this notice intact mandatory.
+ */
+
+/*
+ * History
+ *
+ * 2008-01-20 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.1:
+ *
+ * Fixed the detection of infinite floating point values on IRIX (and
+ * possibly other systems) and applied another few minor cleanups.
+ *
+ * 2008-01-06 Holger Weiss <holger@jhweiss.de> for C99-snprintf 1.0:
+ *
+ * Added a lot of new features, fixed many bugs, and incorporated various
+ * improvements done by Andrew Tridgell <tridge@samba.org>, Russ Allbery
+ * <rra@stanford.edu>, Hrvoje Niksic <hniksic@xemacs.org>, Damien Miller
+ * <djm@mindrot.org>, and others for the Samba, INN, Wget, and OpenSSH
+ * projects. The additions include: support the "e", "E", "g", "G", and
+ * "F" conversion specifiers (and use conversion style "f" or "F" for the
+ * still unsupported "a" and "A" specifiers); support the "hh", "ll", "j",
+ * "t", and "z" length modifiers; support the "#" flag and the (non-C99)
+ * "'" flag; use localeconv(3) (if available) to get both the current
+ * locale's decimal point character and the separator between groups of
+ * digits; fix the handling of various corner cases of field width and
+ * precision specifications; fix various floating point conversion bugs;
+ * handle infinite and NaN floating point values; don't attempt to write to
+ * the output buffer (which may be NULL) if a size of zero was specified;
+ * check for integer overflow of the field width, precision, and return
+ * values and during the floating point conversion; use the OUTCHAR() macro
+ * instead of a function for better performance; provide asprintf(3) and
+ * vasprintf(3) functions; add new test cases. The replacement functions
+ * have been renamed to use an "rpl_" prefix, the function calls in the
+ * main project (and in this file) must be redefined accordingly for each
+ * replacement function which is needed (by using Autoconf or other means).
+ * Various other minor improvements have been applied and the coding style
+ * was cleaned up for consistency.
+ *
+ * 2007-07-23 Holger Weiss <holger@jhweiss.de> for Mutt 1.5.13:
+ *
+ * C99 compliant snprintf(3) and vsnprintf(3) functions return the number
+ * of characters that would have been written to a sufficiently sized
+ * buffer (excluding the '\0'). The original code simply returned the
+ * length of the resulting output string, so that's been fixed.
+ *
+ * 1998-03-05 Michael Elkins <me@mutt.org> for Mutt 0.90.8:
+ *
+ * The original code assumed that both snprintf(3) and vsnprintf(3) were
+ * missing. Some systems only have snprintf(3) but not vsnprintf(3), so
+ * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
+ *
+ * 1998-01-27 Thomas Roessler <roessler@does-not-exist.org> for Mutt 0.89i:
+ *
+ * The PGP code was using unsigned hexadecimal formats. Unfortunately,
+ * unsigned formats simply didn't work.
+ *
+ * 1997-10-22 Brandon Long <blong@fiction.net> for Mutt 0.87.1:
+ *
+ * Ok, added some minimal floating point support, which means this probably
+ * requires libm on most operating systems. Don't yet support the exponent
+ * (e,E) and sigfig (g,G). Also, fmtint() was pretty badly broken, it just
+ * wasn't being exercised in ways which showed it, so that's been fixed.
+ * Also, formatted the code to Mutt conventions, and removed dead code left
+ * over from the original. Also, there is now a builtin-test, run with:
+ * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm && ./snprintf
+ *
+ * 2996-09-15 Brandon Long <blong@fiction.net> for Mutt 0.43:
+ *
+ * This was ugly. It is still ugly. I opted out of floating point
+ * numbers, but the formatter understands just about everything from the
+ * normal C string format, at least as far as I can tell from the Solaris
+ * 2.5 printf(3S) man page.
+ */
+
+/*
+ * ToDo
+ *
+ * - Add wide character support.
+ * - Add support for "%a" and "%A" conversions.
+ * - Create test routines which predefine the expected results. Our test cases
+ * usually expose bugs in system implementations rather than in ours :-)
+ */
+
+/*
+ * Usage
+ *
+ * 1) The following preprocessor macros should be defined to 1 if the feature or
+ * file in question is available on the target system (by using Autoconf or
+ * other means), though basic functionality should be available as long as
+ * HAVE_STDARG_H and HAVE_STDLIB_H are defined correctly:
+ *
+ * HW_WANT_RPL_VSNPRINTF
+ * HW_WANT_RPL_SNPRINTF
+ * HW_WANT_RPL_VASPRINTF
+ * HW_WANT_RPL_ASPRINTF
+ * HAVE_VSNPRINTF // define to 1 #if HW_WANT_RPL_VSNPRINTF
+ * HAVE_SNPRINTF // define to 1 #if HW_WANT_RPL_SNPRINTF
+ * HAVE_VASPRINTF // define to 1 #if HW_WANT_RPL_VASPRINTF
+ * HAVE_ASPRINTF // define to 1 #if HW_WANT_RPL_ASPRINTF
+ * HAVE_STDARG_H
+ * HAVE_STDDEF_H
+ * HAVE_STDINT_H
+ * HAVE_STDLIB_H
+ * HAVE_INTTYPES_H
+ * HAVE_LOCALE_H
+ * HAVE_LOCALECONV
+ * HAVE_LCONV_DECIMAL_POINT
+ * HAVE_LCONV_THOUSANDS_SEP
+ * HAVE_LONG_DOUBLE
+ * HAVE_LONG_LONG_INT
+ * HAVE_UNSIGNED_LONG_LONG_INT
+ * HAVE_INTMAX_T
+ * HAVE_UINTMAX_T
+ * HAVE_UINTPTR_T
+ * HAVE_PTRDIFF_T
+ * HAVE_VA_COPY
+ * HAVE___VA_COPY
+ *
+ * 2) The calls to the functions which should be replaced must be redefined
+ * throughout the project files (by using Autoconf or other means):
+ *
+ * #if HW_WANT_RPL_VSNPRINTF
+ * #define vsnprintf rpl_vsnprintf
+ * #endif
+ * #if HW_WANT_RPL_SNPRINTF
+ * #define snprintf rpl_snprintf
+ * #endif
+ * #if HW_WANT_RPL_VASPRINTF
+ * #define vasprintf rpl_vasprintf
+ * #endif
+ * #if HW_WANT_RPL_ASPRINTF
+ * #define asprintf rpl_asprintf
+ * #endif
+ *
+ * 3) The required replacement functions should be declared in some header file
+ * included throughout the project files:
+ *
+ * #if HAVE_CONFIG_H
+ * #include <config.h>
+ * #endif
+ * #if HAVE_STDARG_H
+ * #include <stdarg.h>
+ * #if HW_WANT_RPL_VSNPRINTF
+ * int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ * #endif
+ * #if HW_WANT_RPL_SNPRINTF
+ * int rpl_snprintf(char *, size_t, const char *, ...);
+ * #endif
+ * #if HW_WANT_RPL_VASPRINTF
+ * int rpl_vasprintf(char **, const char *, va_list);
+ * #endif
+ * #if HW_WANT_RPL_ASPRINTF
+ * int rpl_asprintf(char **, const char *, ...);
+ * #endif
+ * #endif
+ *
+ * Autoconf macros for handling step 1 and step 2 are available at
+ * <http://www.jhweiss.de/software/snprintf.html>.
+ */
+
+#if HAVE_CONFIG_H
#include <config.h>
+#endif /* HAVE_CONFIG_H */
-#if !HAVE_SNPRINTF
-#include <sys/types.h>
+#if TEST_SNPRINTF
+#include <math.h> /* For pow(3), NAN, and INFINITY. */
+#include <string.h> /* For strcmp(3). */
+#if defined(__NetBSD__) || \
+ defined(__FreeBSD__) || \
+ defined(__OpenBSD__) || \
+ defined(__NeXT__) || \
+ defined(__bsd__)
+#define OS_BSD 1
+#elif defined(sgi) || defined(__sgi)
+#ifndef __c99
+#define __c99 /* Force C99 mode to get <stdint.h> included on IRIX 6.5.30. */
+#endif /* !defined(__c99) */
+#define OS_IRIX 1
+#define OS_SYSV 1
+#elif defined(__svr4__)
+#define OS_SYSV 1
+#elif defined(__linux__)
+#define OS_LINUX 1
+#endif /* defined(__NetBSD__) || defined(__FreeBSD__) || [...] */
+#if HAVE_CONFIG_H /* Undefine definitions possibly done in config.h. */
+#ifdef HAVE_SNPRINTF
+#undef HAVE_SNPRINTF
+#endif /* defined(HAVE_SNPRINTF) */
+#ifdef HAVE_VSNPRINTF
+#undef HAVE_VSNPRINTF
+#endif /* defined(HAVE_VSNPRINTF) */
+#ifdef HAVE_ASPRINTF
+#undef HAVE_ASPRINTF
+#endif /* defined(HAVE_ASPRINTF) */
+#ifdef HAVE_VASPRINTF
+#undef HAVE_VASPRINTF
+#endif /* defined(HAVE_VASPRINTF) */
+#ifdef snprintf
+#undef snprintf
+#endif /* defined(snprintf) */
+#ifdef vsnprintf
+#undef vsnprintf
+#endif /* defined(vsnprintf) */
+#ifdef asprintf
+#undef asprintf
+#endif /* defined(asprintf) */
+#ifdef vasprintf
+#undef vasprintf
+#endif /* defined(vasprintf) */
+#else /* By default, we assume a modern system for testing. */
+#ifndef HAVE_STDARG_H
+#define HAVE_STDARG_H 1
+#endif /* HAVE_STDARG_H */
+#ifndef HAVE_STDDEF_H
+#define HAVE_STDDEF_H 1
+#endif /* HAVE_STDDEF_H */
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H 1
+#endif /* HAVE_STDINT_H */
+#ifndef HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
+#endif /* HAVE_STDLIB_H */
+#ifndef HAVE_INTTYPES_H
+#define HAVE_INTTYPES_H 1
+#endif /* HAVE_INTTYPES_H */
+#ifndef HAVE_LOCALE_H
+#define HAVE_LOCALE_H 1
+#endif /* HAVE_LOCALE_H */
+#ifndef HAVE_LOCALECONV
+#define HAVE_LOCALECONV 1
+#endif /* !defined(HAVE_LOCALECONV) */
+#ifndef HAVE_LCONV_DECIMAL_POINT
+#define HAVE_LCONV_DECIMAL_POINT 1
+#endif /* HAVE_LCONV_DECIMAL_POINT */
+#ifndef HAVE_LCONV_THOUSANDS_SEP
+#define HAVE_LCONV_THOUSANDS_SEP 1
+#endif /* HAVE_LCONV_THOUSANDS_SEP */
+#ifndef HAVE_LONG_DOUBLE
+#define HAVE_LONG_DOUBLE 1
+#endif /* !defined(HAVE_LONG_DOUBLE) */
+#ifndef HAVE_LONG_LONG_INT
+#define HAVE_LONG_LONG_INT 1
+#endif /* !defined(HAVE_LONG_LONG_INT) */
+#ifndef HAVE_UNSIGNED_LONG_LONG_INT
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+#endif /* !defined(HAVE_UNSIGNED_LONG_LONG_INT) */
+#ifndef HAVE_INTMAX_T
+#define HAVE_INTMAX_T 1
+#endif /* !defined(HAVE_INTMAX_T) */
+#ifndef HAVE_UINTMAX_T
+#define HAVE_UINTMAX_T 1
+#endif /* !defined(HAVE_UINTMAX_T) */
+#ifndef HAVE_UINTPTR_T
+#define HAVE_UINTPTR_T 1
+#endif /* !defined(HAVE_UINTPTR_T) */
+#ifndef HAVE_PTRDIFF_T
+#define HAVE_PTRDIFF_T 1
+#endif /* !defined(HAVE_PTRDIFF_T) */
+#ifndef HAVE_VA_COPY
+#define HAVE_VA_COPY 1
+#endif /* !defined(HAVE_VA_COPY) */
+#ifndef HAVE___VA_COPY
+#define HAVE___VA_COPY 1
+#endif /* !defined(HAVE___VA_COPY) */
+#endif /* HAVE_CONFIG_H */
+#define snprintf rpl_snprintf
+#define vsnprintf rpl_vsnprintf
+#define asprintf rpl_asprintf
+#define vasprintf rpl_vasprintf
+#endif /* TEST_SNPRINTF */
-#ifdef __STDC__
+#if HW_WANT_RPL_SNPRINTF || HW_WANT_RPL_VSNPRINTF || HW_WANT_RPL_ASPRINTF || HW_WANT_RPL_VASPRINTF
+#include <stdio.h> /* For NULL, size_t, vsnprintf(3), and vasprintf(3). */
+#ifdef VA_START
+#undef VA_START
+#endif /* defined(VA_START) */
+#ifdef VA_SHIFT
+#undef VA_SHIFT
+#endif /* defined(VA_SHIFT) */
+#if HAVE_STDARG_H
#include <stdarg.h>
-#else
+#define VA_START(ap, last) va_start(ap, last)
+#define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */
+#else /* Assume <varargs.h> is available. */
#include <varargs.h>
-#endif
-#include <stdio.h>
+#define VA_START(ap, last) va_start(ap) /* "last" is ignored. */
+#define VA_SHIFT(ap, value, type) value = va_arg(ap, type)
+#endif /* HAVE_STDARG_H */
+
+#if HW_WANT_RPL_VASPRINTF
+#if HAVE_STDLIB_H
+#include <stdlib.h> /* For malloc(3). */
+#endif /* HAVE_STDLIB_H */
+#ifdef VA_COPY
+#undef VA_COPY
+#endif /* defined(VA_COPY) */
+#ifdef VA_END_COPY
+#undef VA_END_COPY
+#endif /* defined(VA_END_COPY) */
+#if HAVE_VA_COPY
+#define VA_COPY(dest, src) va_copy(dest, src)
+#define VA_END_COPY(ap) va_end(ap)
+#elif HAVE___VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#define VA_END_COPY(ap) va_end(ap)
+#else
+#define VA_COPY(dest, src) (void)mymemcpy(&dest, &src, sizeof(va_list))
+#define VA_END_COPY(ap) /* No-op. */
+#define NEED_MYMEMCPY 1
+static void *mymemcpy(void *, void *, size_t);
+#endif /* HAVE_VA_COPY */
+#endif /* HW_WANT_RPL_VASPRINTF */
-#include "l_stdlib.h"
+#if HW_WANT_RPL_VSNPRINTF
+#include <errno.h> /* For ERANGE and errno. */
+#include <limits.h> /* For *_MAX. */
+#if HAVE_INTTYPES_H
+#include <inttypes.h> /* For intmax_t (if not defined in <stdint.h>). */
+#endif /* HAVE_INTTYPES_H */
+#if HAVE_LOCALE_H
+#include <locale.h> /* For localeconv(3). */
+#endif /* HAVE_LOCALE_H */
+#if HAVE_STDDEF_H
+#include <stddef.h> /* For ptrdiff_t. */
+#endif /* HAVE_STDDEF_H */
+#if HAVE_STDINT_H
+#include <stdint.h> /* For intmax_t. */
+#endif /* HAVE_STDINT_H */
-#ifdef __STDC__
-int snprintf(char *str, size_t n, const char *fmt, ...)
+/* Support for unsigned long long int. We may also need ULLONG_MAX. */
+#ifndef ULONG_MAX /* We may need ULONG_MAX as a fallback. */
+#ifdef UINT_MAX
+#define ULONG_MAX UINT_MAX
#else
-int snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- const char *fmt;
- va_dcl
-#endif
+#define ULONG_MAX INT_MAX
+#endif /* defined(UINT_MAX) */
+#endif /* !defined(ULONG_MAX) */
+#ifdef ULLONG
+#undef ULLONG
+#endif /* defined(ULLONG) */
+#if HAVE_UNSIGNED_LONG_LONG_INT
+#define ULLONG unsigned long long int
+#ifndef ULLONG_MAX
+#define ULLONG_MAX ULONG_MAX
+#endif /* !defined(ULLONG_MAX) */
+#else
+#define ULLONG unsigned long int
+#ifdef ULLONG_MAX
+#undef ULLONG_MAX
+#endif /* defined(ULLONG_MAX) */
+#define ULLONG_MAX ULONG_MAX
+#endif /* HAVE_LONG_LONG_INT */
+
+/* Support for uintmax_t. We also need UINTMAX_MAX. */
+#ifdef UINTMAX_T
+#undef UINTMAX_T
+#endif /* defined(UINTMAX_T) */
+#if HAVE_UINTMAX_T || defined(uintmax_t)
+#define UINTMAX_T uintmax_t
+#ifndef UINTMAX_MAX
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* !defined(UINTMAX_MAX) */
+#else
+#define UINTMAX_T ULLONG
+#ifdef UINTMAX_MAX
+#undef UINTMAX_MAX
+#endif /* defined(UINTMAX_MAX) */
+#define UINTMAX_MAX ULLONG_MAX
+#endif /* HAVE_UINTMAX_T || defined(uintmax_t) */
+
+/* Support for long double. */
+#ifndef LDOUBLE
+#if HAVE_LONG_DOUBLE
+#define LDOUBLE long double
+#else
+#define LDOUBLE double
+#endif /* HAVE_LONG_DOUBLE */
+#endif /* !defined(LDOUBLE) */
+
+/* Support for long long int. */
+#ifndef LLONG
+#if HAVE_LONG_LONG_INT
+#define LLONG long long int
+#else
+#define LLONG long int
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !defined(LLONG) */
+
+/* Support for intmax_t. */
+#ifndef INTMAX_T
+#if HAVE_INTMAX_T || defined(intmax_t)
+#define INTMAX_T intmax_t
+#else
+#define INTMAX_T LLONG
+#endif /* HAVE_INTMAX_T || defined(intmax_t) */
+#endif /* !defined(INTMAX_T) */
+
+/* Support for uintptr_t. */
+#ifndef UINTPTR_T
+#if HAVE_UINTPTR_T || defined(uintptr_t)
+#define UINTPTR_T uintptr_t
+#else
+#define UINTPTR_T unsigned long int
+#endif /* HAVE_UINTPTR_T || defined(uintptr_t) */
+#endif /* !defined(UINTPTR_T) */
+
+/* Support for ptrdiff_t. */
+#ifndef PTRDIFF_T
+#if HAVE_PTRDIFF_T || defined(ptrdiff_t)
+#define PTRDIFF_T ptrdiff_t
+#else
+#define PTRDIFF_T long int
+#endif /* HAVE_PTRDIFF_T || defined(ptrdiff_t) */
+#endif /* !defined(PTRDIFF_T) */
+
+/*
+ * We need an unsigned integer type corresponding to ptrdiff_t (cf. C99:
+ * 7.19.6.1, 7). However, we'll simply use PTRDIFF_T and convert it to an
+ * unsigned type if necessary. This should work just fine in practice.
+ */
+#ifndef UPTRDIFF_T
+#define UPTRDIFF_T PTRDIFF_T
+#endif /* !defined(UPTRDIFF_T) */
+
+/*
+ * We need a signed integer type corresponding to size_t (cf. C99: 7.19.6.1, 7).
+ * However, we'll simply use size_t and convert it to a signed type if
+ * necessary. This should work just fine in practice.
+ */
+#ifndef SSIZE_T
+#define SSIZE_T size_t
+#endif /* !defined(SSIZE_T) */
+
+/* Either ERANGE or E2BIG should be available everywhere. */
+#ifndef ERANGE
+#define ERANGE E2BIG
+#endif /* !defined(ERANGE) */
+#ifndef EOVERFLOW
+#define EOVERFLOW ERANGE
+#endif /* !defined(EOVERFLOW) */
+
+/*
+ * Buffer size to hold the octal string representation of UINT128_MAX without
+ * nul-termination ("3777777777777777777777777777777777777777777").
+ */
+#ifdef MAX_CONVERT_LENGTH
+#undef MAX_CONVERT_LENGTH
+#endif /* defined(MAX_CONVERT_LENGTH) */
+#define MAX_CONVERT_LENGTH 43
+
+/* Format read states. */
+#define PRINT_S_DEFAULT 0
+#define PRINT_S_FLAGS 1
+#define PRINT_S_WIDTH 2
+#define PRINT_S_DOT 3
+#define PRINT_S_PRECISION 4
+#define PRINT_S_MOD 5
+#define PRINT_S_CONV 6
+
+/* Format flags. */
+#define PRINT_F_MINUS (1 << 0)
+#define PRINT_F_PLUS (1 << 1)
+#define PRINT_F_SPACE (1 << 2)
+#define PRINT_F_NUM (1 << 3)
+#define PRINT_F_ZERO (1 << 4)
+#define PRINT_F_QUOTE (1 << 5)
+#define PRINT_F_UP (1 << 6)
+#define PRINT_F_UNSIGNED (1 << 7)
+#define PRINT_F_TYPE_G (1 << 8)
+#define PRINT_F_TYPE_E (1 << 9)
+
+/* Conversion flags. */
+#define PRINT_C_CHAR 1
+#define PRINT_C_SHORT 2
+#define PRINT_C_LONG 3
+#define PRINT_C_LLONG 4
+#define PRINT_C_LDOUBLE 5
+#define PRINT_C_SIZE 6
+#define PRINT_C_PTRDIFF 7
+#define PRINT_C_INTMAX 8
+
+#ifndef MAX
+#define MAX(x, y) ((x >= y) ? x : y)
+#endif /* !defined(MAX) */
+#ifndef CHARTOINT
+#define CHARTOINT(ch) (ch - '0')
+#endif /* !defined(CHARTOINT) */
+#ifndef ISDIGIT
+#define ISDIGIT(ch) ('0' <= (unsigned char)ch && (unsigned char)ch <= '9')
+#endif /* !defined(ISDIGIT) */
+#ifndef ISNAN
+#define ISNAN(x) (x != x)
+#endif /* !defined(ISNAN) */
+#ifndef ISINF
+#define ISINF(x) (x != 0.0 && x + x == x)
+#endif /* !defined(ISINF) */
+
+#ifdef OUTCHAR
+#undef OUTCHAR
+#endif /* defined(OUTCHAR) */
+#define OUTCHAR(str, len, size, ch) \
+do { \
+ if (len + 1 < size) \
+ str[len] = ch; \
+ (len)++; \
+} while (/* CONSTCOND */ 0)
+
+static void fmtstr(char *, size_t *, size_t, const char *, int, int, int);
+static void fmtint(char *, size_t *, size_t, INTMAX_T, int, int, int, int);
+static void fmtflt(char *, size_t *, size_t, LDOUBLE, int, int, int, int *);
+static void printsep(char *, size_t *, size_t);
+static int getnumsep(int);
+static int getexponent(LDOUBLE);
+static int convert(UINTMAX_T, char *, size_t, int, int);
+static UINTMAX_T cast(LDOUBLE);
+static UINTMAX_T myround(LDOUBLE);
+static LDOUBLE mypow10(int);
+
+int
+rpl_vsnprintf(char *str, size_t size, const char *format, va_list args);
+
+int
+rpl_vsnprintf(char *str, size_t size, const char *format, va_list args)
+{
+ LDOUBLE fvalue;
+ INTMAX_T value;
+ unsigned char cvalue;
+ const char *strvalue;
+ INTMAX_T *intmaxptr;
+ PTRDIFF_T *ptrdiffptr;
+ SSIZE_T *sizeptr;
+ LLONG *llongptr;
+ long int *longptr;
+ int *intptr;
+ short int *shortptr;
+ signed char *charptr;
+ size_t len = 0;
+ int overflow = 0;
+ int base = 0;
+ int cflags = 0;
+ int flags = 0;
+ int width = 0;
+ int precision = -1;
+ int state = PRINT_S_DEFAULT;
+ char ch = *format++;
+
+ /*
+ * C99 says: "If `n' is zero, nothing is written, and `s' may be a null
+ * pointer." (7.19.6.5, 2) We're forgiving and allow a NULL pointer
+ * even if a size larger than zero was specified. At least NetBSD's
+ * snprintf(3) does the same, as well as other versions of this file.
+ * (Though some of these versions will write to a non-NULL buffer even
+ * if a size of zero was specified, which violates the standard.)
+ */
+ if (str == NULL && size != 0)
+ size = 0;
+
+ while (ch != '\0')
+ switch (state) {
+ case PRINT_S_DEFAULT:
+ if (ch == '%')
+ state = PRINT_S_FLAGS;
+ else
+ OUTCHAR(str, len, size, ch);
+ ch = *format++;
+ break;
+ case PRINT_S_FLAGS:
+ switch (ch) {
+ case '-':
+ flags |= PRINT_F_MINUS;
+ ch = *format++;
+ break;
+ case '+':
+ flags |= PRINT_F_PLUS;
+ ch = *format++;
+ break;
+ case ' ':
+ flags |= PRINT_F_SPACE;
+ ch = *format++;
+ break;
+ case '#':
+ flags |= PRINT_F_NUM;
+ ch = *format++;
+ break;
+ case '0':
+ flags |= PRINT_F_ZERO;
+ ch = *format++;
+ break;
+ case '\'': /* SUSv2 flag (not in C99). */
+ flags |= PRINT_F_QUOTE;
+ ch = *format++;
+ break;
+ default:
+ state = PRINT_S_WIDTH;
+ break;
+ }
+ break;
+ case PRINT_S_WIDTH:
+ if (ISDIGIT(ch)) {
+ ch = CHARTOINT(ch);
+ if (width > (INT_MAX - ch) / 10) {
+ overflow = 1;
+ goto out;
+ }
+ width = 10 * width + ch;
+ ch = *format++;
+ } else if (ch == '*') {
+ /*
+ * C99 says: "A negative field width argument is
+ * taken as a `-' flag followed by a positive
+ * field width." (7.19.6.1, 5)
+ */
+ if ((width = va_arg(args, int)) < 0) {
+ flags |= PRINT_F_MINUS;
+ width = -width;
+ }
+ ch = *format++;
+ state = PRINT_S_DOT;
+ } else
+ state = PRINT_S_DOT;
+ break;
+ case PRINT_S_DOT:
+ if (ch == '.') {
+ state = PRINT_S_PRECISION;
+ ch = *format++;
+ } else
+ state = PRINT_S_MOD;
+ break;
+ case PRINT_S_PRECISION:
+ if (precision == -1)
+ precision = 0;
+ if (ISDIGIT(ch)) {
+ ch = CHARTOINT(ch);
+ if (precision > (INT_MAX - ch) / 10) {
+ overflow = 1;
+ goto out;
+ }
+ precision = 10 * precision + ch;
+ ch = *format++;
+ } else if (ch == '*') {
+ /*
+ * C99 says: "A negative precision argument is
+ * taken as if the precision were omitted."
+ * (7.19.6.1, 5)
+ */
+ if ((precision = va_arg(args, int)) < 0)
+ precision = -1;
+ ch = *format++;
+ state = PRINT_S_MOD;
+ } else
+ state = PRINT_S_MOD;
+ break;
+ case PRINT_S_MOD:
+ switch (ch) {
+ case 'h':
+ ch = *format++;
+ if (ch == 'h') { /* It's a char. */
+ ch = *format++;
+ cflags = PRINT_C_CHAR;
+ } else
+ cflags = PRINT_C_SHORT;
+ break;
+ case 'l':
+ ch = *format++;
+ if (ch == 'l') { /* It's a long long. */
+ ch = *format++;
+ cflags = PRINT_C_LLONG;
+ } else
+ cflags = PRINT_C_LONG;
+ break;
+ case 'L':
+ cflags = PRINT_C_LDOUBLE;
+ ch = *format++;
+ break;
+ case 'j':
+ cflags = PRINT_C_INTMAX;
+ ch = *format++;
+ break;
+ case 't':
+ cflags = PRINT_C_PTRDIFF;
+ ch = *format++;
+ break;
+ case 'z':
+ cflags = PRINT_C_SIZE;
+ ch = *format++;
+ break;
+ }
+ state = PRINT_S_CONV;
+ break;
+ case PRINT_S_CONV:
+ switch (ch) {
+ case 'd':
+ /* FALLTHROUGH */
+ case 'i':
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ value = (signed char)va_arg(args, int);
+ break;
+ case PRINT_C_SHORT:
+ value = (short int)va_arg(args, int);
+ break;
+ case PRINT_C_LONG:
+ value = va_arg(args, long int);
+ break;
+ case PRINT_C_LLONG:
+ value = va_arg(args, LLONG);
+ break;
+ case PRINT_C_SIZE:
+ value = va_arg(args, SSIZE_T);
+ break;
+ case PRINT_C_INTMAX:
+ value = va_arg(args, INTMAX_T);
+ break;
+ case PRINT_C_PTRDIFF:
+ value = va_arg(args, PTRDIFF_T);
+ break;
+ default:
+ value = va_arg(args, int);
+ break;
+ }
+ fmtint(str, &len, size, value, 10, width,
+ precision, flags);
+ break;
+ case 'X':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'x':
+ base = 16;
+ /* FALLTHROUGH */
+ case 'o':
+ if (base == 0)
+ base = 8;
+ /* FALLTHROUGH */
+ case 'u':
+ if (base == 0)
+ base = 10;
+ flags |= PRINT_F_UNSIGNED;
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ value = (unsigned char)va_arg(args,
+ unsigned int);
+ break;
+ case PRINT_C_SHORT:
+ value = (unsigned short int)va_arg(args,
+ unsigned int);
+ break;
+ case PRINT_C_LONG:
+ value = va_arg(args, unsigned long int);
+ break;
+ case PRINT_C_LLONG:
+ value = va_arg(args, ULLONG);
+ break;
+ case PRINT_C_SIZE:
+ value = va_arg(args, size_t);
+ break;
+ case PRINT_C_INTMAX:
+ value = va_arg(args, UINTMAX_T);
+ break;
+ case PRINT_C_PTRDIFF:
+ value = va_arg(args, UPTRDIFF_T);
+ break;
+ default:
+ value = va_arg(args, unsigned int);
+ break;
+ }
+ fmtint(str, &len, size, value, base, width,
+ precision, flags);
+ break;
+ case 'A':
+ /* Not yet supported, we'll use "%F". */
+ /* FALLTHROUGH */
+ case 'F':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'a':
+ /* Not yet supported, we'll use "%f". */
+ /* FALLTHROUGH */
+ case 'f':
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'E':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'e':
+ flags |= PRINT_F_TYPE_E;
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'G':
+ flags |= PRINT_F_UP;
+ /* FALLTHROUGH */
+ case 'g':
+ flags |= PRINT_F_TYPE_G;
+ if (cflags == PRINT_C_LDOUBLE)
+ fvalue = va_arg(args, LDOUBLE);
+ else
+ fvalue = va_arg(args, double);
+ /*
+ * If the precision is zero, it is treated as
+ * one (cf. C99: 7.19.6.1, 8).
+ */
+ if (precision == 0)
+ precision = 1;
+ fmtflt(str, &len, size, fvalue, width,
+ precision, flags, &overflow);
+ if (overflow)
+ goto out;
+ break;
+ case 'c':
+ cvalue = va_arg(args, int);
+ OUTCHAR(str, len, size, cvalue);
+ break;
+ case 's':
+ strvalue = va_arg(args, char *);
+ fmtstr(str, &len, size, strvalue, width,
+ precision, flags);
+ break;
+ case 'p':
+ /*
+ * C99 says: "The value of the pointer is
+ * converted to a sequence of printing
+ * characters, in an implementation-defined
+ * manner." (C99: 7.19.6.1, 8)
+ */
+ if ((strvalue = va_arg(args, void *)) == NULL)
+ /*
+ * We use the glibc format. BSD prints
+ * "0x0", SysV "0".
+ */
+ fmtstr(str, &len, size, "(nil)", width,
+ -1, flags);
+ else {
+ /*
+ * We use the BSD/glibc format. SysV
+ * omits the "0x" prefix (which we emit
+ * using the PRINT_F_NUM flag).
+ */
+ flags |= PRINT_F_NUM;
+ flags |= PRINT_F_UNSIGNED;
+ fmtint(str, &len, size,
+ (UINTPTR_T)strvalue, 16, width,
+ precision, flags);
+ }
+ break;
+ case 'n':
+ switch (cflags) {
+ case PRINT_C_CHAR:
+ charptr = va_arg(args, signed char *);
+ *charptr = len;
+ break;
+ case PRINT_C_SHORT:
+ shortptr = va_arg(args, short int *);
+ *shortptr = len;
+ break;
+ case PRINT_C_LONG:
+ longptr = va_arg(args, long int *);
+ *longptr = len;
+ break;
+ case PRINT_C_LLONG:
+ llongptr = va_arg(args, LLONG *);
+ *llongptr = len;
+ break;
+ case PRINT_C_SIZE:
+ /*
+ * C99 says that with the "z" length
+ * modifier, "a following `n' conversion
+ * specifier applies to a pointer to a
+ * signed integer type corresponding to
+ * size_t argument." (7.19.6.1, 7)
+ */
+ sizeptr = va_arg(args, SSIZE_T *);
+ *sizeptr = len;
+ break;
+ case PRINT_C_INTMAX:
+ intmaxptr = va_arg(args, INTMAX_T *);
+ *intmaxptr = len;
+ break;
+ case PRINT_C_PTRDIFF:
+ ptrdiffptr = va_arg(args, PTRDIFF_T *);
+ *ptrdiffptr = len;
+ break;
+ default:
+ intptr = va_arg(args, int *);
+ *intptr = len;
+ break;
+ }
+ break;
+ case '%': /* Print a "%" character verbatim. */
+ OUTCHAR(str, len, size, ch);
+ break;
+ default: /* Skip other characters. */
+ break;
+ }
+ ch = *format++;
+ state = PRINT_S_DEFAULT;
+ base = cflags = flags = width = 0;
+ precision = -1;
+ break;
+ }
+out:
+ if (len < size)
+ str[len] = '\0';
+ else if (size > 0)
+ str[size - 1] = '\0';
+
+ if (overflow || len >= INT_MAX) {
+ errno = overflow ? EOVERFLOW : ERANGE;
+ return -1;
+ }
+ return (int)len;
+}
+
+static void
+fmtstr(char *str, size_t *len, size_t size, const char *value, int width,
+ int precision, int flags)
+{
+ int padlen, strln; /* Amount to pad. */
+ int noprecision = (precision == -1);
+
+ if (value == NULL) /* We're forgiving. */
+ value = "(null)";
+
+ /* If a precision was specified, don't read the string past it. */
+ for (strln = 0; value[strln] != '\0' &&
+ (noprecision || strln < precision); strln++)
+ continue;
+
+ if ((padlen = width - strln) < 0)
+ padlen = 0;
+ if (flags & PRINT_F_MINUS) /* Left justify. */
+ padlen = -padlen;
+
+ while (padlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen--;
+ }
+ while (*value != '\0' && (noprecision || precision-- > 0)) {
+ OUTCHAR(str, *len, size, *value);
+ value++;
+ }
+ while (padlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen++;
+ }
+}
+
+static void
+fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base, int width,
+ int precision, int flags)
+{
+ UINTMAX_T uvalue;
+ char iconvert[MAX_CONVERT_LENGTH];
+ char sign = 0;
+ char hexprefix = 0;
+ int spadlen = 0; /* Amount to space pad. */
+ int zpadlen = 0; /* Amount to zero pad. */
+ int pos;
+ int separators = (flags & PRINT_F_QUOTE);
+ int noprecision = (precision == -1);
+
+ if (flags & PRINT_F_UNSIGNED)
+ uvalue = value;
+ else {
+ uvalue = (value >= 0) ? value : -value;
+ if (value < 0)
+ sign = '-';
+ else if (flags & PRINT_F_PLUS) /* Do a sign. */
+ sign = '+';
+ else if (flags & PRINT_F_SPACE)
+ sign = ' ';
+ }
+
+ pos = convert(uvalue, iconvert, sizeof(iconvert), base,
+ flags & PRINT_F_UP);
+
+ if (flags & PRINT_F_NUM && uvalue != 0) {
+ /*
+ * C99 says: "The result is converted to an `alternative form'.
+ * For `o' conversion, it increases the precision, if and only
+ * if necessary, to force the first digit of the result to be a
+ * zero (if the value and precision are both 0, a single 0 is
+ * printed). For `x' (or `X') conversion, a nonzero result has
+ * `0x' (or `0X') prefixed to it." (7.19.6.1, 6)
+ */
+ switch (base) {
+ case 8:
+ if (precision <= pos)
+ precision = pos + 1;
+ break;
+ case 16:
+ hexprefix = (flags & PRINT_F_UP) ? 'X' : 'x';
+ break;
+ }
+ }
+
+ if (separators) /* Get the number of group separators we'll print. */
+ separators = getnumsep(pos);
+
+ zpadlen = precision - pos - separators;
+ spadlen = width /* Minimum field width. */
+ - separators /* Number of separators. */
+ - MAX(precision, pos) /* Number of integer digits. */
+ - ((sign != 0) ? 1 : 0) /* Will we print a sign? */
+ - ((hexprefix != 0) ? 2 : 0); /* Will we print a prefix? */
+
+ if (zpadlen < 0)
+ zpadlen = 0;
+ if (spadlen < 0)
+ spadlen = 0;
+
+ /*
+ * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+ * ignored. For `d', `i', `o', `u', `x', and `X' conversions, if a
+ * precision is specified, the `0' flag is ignored." (7.19.6.1, 6)
+ */
+ if (flags & PRINT_F_MINUS) /* Left justify. */
+ spadlen = -spadlen;
+ else if (flags & PRINT_F_ZERO && noprecision) {
+ zpadlen += spadlen;
+ spadlen = 0;
+ }
+ while (spadlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ spadlen--;
+ }
+ if (sign != 0) /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ if (hexprefix != 0) { /* A "0x" or "0X" prefix. */
+ OUTCHAR(str, *len, size, '0');
+ OUTCHAR(str, *len, size, hexprefix);
+ }
+ while (zpadlen > 0) { /* Leading zeros. */
+ OUTCHAR(str, *len, size, '0');
+ zpadlen--;
+ }
+ while (pos > 0) { /* The actual digits. */
+ pos--;
+ OUTCHAR(str, *len, size, iconvert[pos]);
+ if (separators > 0 && pos > 0 && pos % 3 == 0)
+ printsep(str, len, size);
+ }
+ while (spadlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ spadlen++;
+ }
+}
+
+static void
+fmtflt(char *str, size_t *len, size_t size, LDOUBLE fvalue, int width,
+ int precision, int flags, int *overflow)
+{
+ LDOUBLE ufvalue;
+ UINTMAX_T intpart;
+ UINTMAX_T fracpart;
+ UINTMAX_T mask;
+ const char *infnan = NULL;
+ char iconvert[MAX_CONVERT_LENGTH];
+ char fconvert[MAX_CONVERT_LENGTH];
+ char econvert[4]; /* "e-12" (without nul-termination). */
+ char esign = 0;
+ char sign = 0;
+ int leadfraczeros = 0;
+ int exponent = 0;
+ int emitpoint = 0;
+ int omitzeros = 0;
+ int omitcount = 0;
+ int padlen = 0;
+ int epos = 0;
+ int fpos = 0;
+ int ipos = 0;
+ int separators = (flags & PRINT_F_QUOTE);
+ int estyle = (flags & PRINT_F_TYPE_E);
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+ struct lconv *lc = localeconv();
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+
+ /*
+ * AIX' man page says the default is 0, but C99 and at least Solaris'
+ * and NetBSD's man pages say the default is 6, and sprintf(3) on AIX
+ * defaults to 6.
+ */
+ if (precision == -1)
+ precision = 6;
+
+ if (fvalue < 0.0)
+ sign = '-';
+ else if (flags & PRINT_F_PLUS) /* Do a sign. */
+ sign = '+';
+ else if (flags & PRINT_F_SPACE)
+ sign = ' ';
+
+ if (ISNAN(fvalue))
+ infnan = (flags & PRINT_F_UP) ? "NAN" : "nan";
+ else if (ISINF(fvalue))
+ infnan = (flags & PRINT_F_UP) ? "INF" : "inf";
+
+ if (infnan != NULL) {
+ if (sign != 0)
+ iconvert[ipos++] = sign;
+ while (*infnan != '\0')
+ iconvert[ipos++] = *infnan++;
+ fmtstr(str, len, size, iconvert, width, ipos, flags);
+ return;
+ }
+
+ /* "%e" (or "%E") or "%g" (or "%G") conversion. */
+ if (flags & PRINT_F_TYPE_E || flags & PRINT_F_TYPE_G) {
+ if (flags & PRINT_F_TYPE_G) {
+ /*
+ * For "%g" (and "%G") conversions, the precision
+ * specifies the number of significant digits, which
+ * includes the digits in the integer part. The
+ * conversion will or will not be using "e-style" (like
+ * "%e" or "%E" conversions) depending on the precision
+ * and on the exponent. However, the exponent can be
+ * affected by rounding the converted value, so we'll
+ * leave this decision for later. Until then, we'll
+ * assume that we're going to do an "e-style" conversion
+ * (in order to get the exponent calculated). For
+ * "e-style", the precision must be decremented by one.
+ */
+ precision--;
+ /*
+ * For "%g" (and "%G") conversions, trailing zeros are
+ * removed from the fractional portion of the result
+ * unless the "#" flag was specified.
+ */
+ if (!(flags & PRINT_F_NUM))
+ omitzeros = 1;
+ }
+ exponent = getexponent(fvalue);
+ estyle = 1;
+ }
+
+again:
+ /*
+ * Sorry, we only support 9, 19, or 38 digits (that is, the number of
+ * digits of the 32-bit, the 64-bit, or the 128-bit UINTMAX_MAX value
+ * minus one) past the decimal point due to our conversion method.
+ */
+ switch (sizeof(UINTMAX_T)) {
+ case 16:
+ if (precision > 38)
+ precision = 38;
+ break;
+ case 8:
+ if (precision > 19)
+ precision = 19;
+ break;
+ default:
+ if (precision > 9)
+ precision = 9;
+ break;
+ }
+
+ ufvalue = (fvalue >= 0.0) ? fvalue : -fvalue;
+ if (estyle) /* We want exactly one integer digit. */
+ ufvalue /= mypow10(exponent);
+
+ if ((intpart = cast(ufvalue)) == UINTMAX_MAX) {
+ *overflow = 1;
+ return;
+ }
+
+ /*
+ * Factor of ten with the number of digits needed for the fractional
+ * part. For example, if the precision is 3, the mask will be 1000.
+ */
+ mask = mypow10(precision);
+ /*
+ * We "cheat" by converting the fractional part to integer by
+ * multiplying by a factor of ten.
+ */
+ if ((fracpart = myround(mask * (ufvalue - intpart))) >= mask) {
+ /*
+ * For example, ufvalue = 2.99962, intpart = 2, and mask = 1000
+ * (because precision = 3). Now, myround(1000 * 0.99962) will
+ * return 1000. So, the integer part must be incremented by one
+ * and the fractional part must be set to zero.
+ */
+ intpart++;
+ fracpart = 0;
+ if (estyle && intpart == 10) {
+ /*
+ * The value was rounded up to ten, but we only want one
+ * integer digit if using "e-style". So, the integer
+ * part must be set to one and the exponent must be
+ * incremented by one.
+ */
+ intpart = 1;
+ exponent++;
+ }
+ }
+
+ /*
+ * Now that we know the real exponent, we can check whether or not to
+ * use "e-style" for "%g" (and "%G") conversions. If we don't need
+ * "e-style", the precision must be adjusted and the integer and
+ * fractional parts must be recalculated from the original value.
+ *
+ * C99 says: "Let P equal the precision if nonzero, 6 if the precision
+ * is omitted, or 1 if the precision is zero. Then, if a conversion
+ * with style `E' would have an exponent of X:
+ *
+ * - if P > X >= -4, the conversion is with style `f' (or `F') and
+ * precision P - (X + 1).
+ *
+ * - otherwise, the conversion is with style `e' (or `E') and precision
+ * P - 1." (7.19.6.1, 8)
+ *
+ * Note that we had decremented the precision by one.
+ */
+ if (flags & PRINT_F_TYPE_G && estyle &&
+ precision + 1 > exponent && exponent >= -4) {
+ precision -= exponent;
+ estyle = 0;
+ goto again;
+ }
+
+ if (estyle) {
+ if (exponent < 0) {
+ exponent = -exponent;
+ esign = '-';
+ } else
+ esign = '+';
+
+ /*
+ * Convert the exponent. The sizeof(econvert) is 4. So, the
+ * econvert buffer can hold e.g. "e+99" and "e-99". We don't
+ * support an exponent which contains more than two digits.
+ * Therefore, the following stores are safe.
+ */
+ epos = convert(exponent, econvert, 2, 10, 0);
+ /*
+ * C99 says: "The exponent always contains at least two digits,
+ * and only as many more digits as necessary to represent the
+ * exponent." (7.19.6.1, 8)
+ */
+ if (epos == 1)
+ econvert[epos++] = '0';
+ econvert[epos++] = esign;
+ econvert[epos++] = (flags & PRINT_F_UP) ? 'E' : 'e';
+ }
+
+ /* Convert the integer part and the fractional part. */
+ ipos = convert(intpart, iconvert, sizeof(iconvert), 10, 0);
+ if (fracpart != 0) /* convert() would return 1 if fracpart == 0. */
+ fpos = convert(fracpart, fconvert, sizeof(fconvert), 10, 0);
+
+ leadfraczeros = precision - fpos;
+
+ if (omitzeros) {
+ if (fpos > 0) /* Omit trailing fractional part zeros. */
+ while (omitcount < fpos && fconvert[omitcount] == '0')
+ omitcount++;
+ else { /* The fractional part is zero, omit it completely. */
+ omitcount = precision;
+ leadfraczeros = 0;
+ }
+ precision -= omitcount;
+ }
+
+ /*
+ * Print a decimal point if either the fractional part is non-zero
+ * and/or the "#" flag was specified.
+ */
+ if (precision > 0 || flags & PRINT_F_NUM)
+ emitpoint = 1;
+ if (separators) /* Get the number of group separators we'll print. */
+ separators = getnumsep(ipos);
+
+ padlen = width /* Minimum field width. */
+ - ipos /* Number of integer digits. */
+ - epos /* Number of exponent characters. */
+ - precision /* Number of fractional digits. */
+ - separators /* Number of group separators. */
+ - (emitpoint ? 1 : 0) /* Will we print a decimal point? */
+ - ((sign != 0) ? 1 : 0); /* Will we print a sign character? */
+
+ if (padlen < 0)
+ padlen = 0;
+
+ /*
+ * C99 says: "If the `0' and `-' flags both appear, the `0' flag is
+ * ignored." (7.19.6.1, 6)
+ */
+ if (flags & PRINT_F_MINUS) /* Left justifty. */
+ padlen = -padlen;
+ else if (flags & PRINT_F_ZERO && padlen > 0) {
+ if (sign != 0) { /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ sign = 0;
+ }
+ while (padlen > 0) { /* Leading zeros. */
+ OUTCHAR(str, *len, size, '0');
+ padlen--;
+ }
+ }
+ while (padlen > 0) { /* Leading spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen--;
+ }
+ if (sign != 0) /* Sign. */
+ OUTCHAR(str, *len, size, sign);
+ while (ipos > 0) { /* Integer part. */
+ ipos--;
+ OUTCHAR(str, *len, size, iconvert[ipos]);
+ if (separators > 0 && ipos > 0 && ipos % 3 == 0)
+ printsep(str, len, size);
+ }
+ if (emitpoint) { /* Decimal point. */
+#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT
+ if (lc->decimal_point != NULL && *lc->decimal_point != '\0')
+ OUTCHAR(str, *len, size, *lc->decimal_point);
+ else /* We'll always print some decimal point character. */
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */
+ OUTCHAR(str, *len, size, '.');
+ }
+ while (leadfraczeros > 0) { /* Leading fractional part zeros. */
+ OUTCHAR(str, *len, size, '0');
+ leadfraczeros--;
+ }
+ while (fpos > omitcount) { /* The remaining fractional part. */
+ fpos--;
+ OUTCHAR(str, *len, size, fconvert[fpos]);
+ }
+ while (epos > 0) { /* Exponent. */
+ epos--;
+ OUTCHAR(str, *len, size, econvert[epos]);
+ }
+ while (padlen < 0) { /* Trailing spaces. */
+ OUTCHAR(str, *len, size, ' ');
+ padlen++;
+ }
+}
+
+static void
+printsep(char *str, size_t *len, size_t size)
+{
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+ struct lconv *lc = localeconv();
+ int i;
+
+ if (lc->thousands_sep != NULL)
+ for (i = 0; lc->thousands_sep[i] != '\0'; i++)
+ OUTCHAR(str, *len, size, lc->thousands_sep[i]);
+ else
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+ OUTCHAR(str, *len, size, ',');
+}
+
+static int
+getnumsep(int digits)
+{
+ int separators = (digits - ((digits % 3 == 0) ? 1 : 0)) / 3;
+#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP
+ int strln;
+ struct lconv *lc = localeconv();
+
+ /* We support an arbitrary separator length (including zero). */
+ if (lc->thousands_sep != NULL) {
+ for (strln = 0; lc->thousands_sep[strln] != '\0'; strln++)
+ continue;
+ separators *= strln;
+ }
+#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */
+ return separators;
+}
+
+static int
+getexponent(LDOUBLE value)
+{
+ LDOUBLE tmp = (value >= 0.0) ? value : -value;
+ int exponent = 0;
+
+ /*
+ * We check for 99 > exponent > -99 in order to work around possible
+ * endless loops which could happen (at least) in the second loop (at
+ * least) if we're called with an infinite value. However, we checked
+ * for infinity before calling this function using our ISINF() macro, so
+ * this might be somewhat paranoid.
+ */
+ while (tmp < 1.0 && tmp > 0.0 && --exponent > -99)
+ tmp *= 10;
+ while (tmp >= 10.0 && ++exponent < 99)
+ tmp /= 10;
+
+ return exponent;
+}
+
+static int
+convert(UINTMAX_T value, char *buf, size_t size, int base, int caps)
+{
+ const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef";
+ size_t pos = 0;
+
+ /* We return an unterminated buffer with the digits in reverse order. */
+ do {
+ buf[pos++] = digits[value % base];
+ value /= base;
+ } while (value != 0 && pos < size);
+
+ return (int)pos;
+}
+
+static UINTMAX_T
+cast(LDOUBLE value)
+{
+ UINTMAX_T result;
+
+ /*
+ * We check for ">=" and not for ">" because if UINTMAX_MAX cannot be
+ * represented exactly as an LDOUBLE value (but is less than LDBL_MAX),
+ * it may be increased to the nearest higher representable value for the
+ * comparison (cf. C99: 6.3.1.4, 2). It might then equal the LDOUBLE
+ * value although converting the latter to UINTMAX_T would overflow.
+ */
+ if (value >= UINTMAX_MAX)
+ return UINTMAX_MAX;
+
+ result = value;
+ /*
+ * At least on NetBSD/sparc64 3.0.2 and 4.99.30, casting long double to
+ * an integer type converts e.g. 1.9 to 2 instead of 1 (which violates
+ * the standard). Sigh.
+ */
+ return (result <= value) ? result : result - 1;
+}
+
+static UINTMAX_T
+myround(LDOUBLE value)
+{
+ UINTMAX_T intpart = cast(value);
+
+ return ((value -= intpart) < 0.5) ? intpart : intpart + 1;
+}
+
+static LDOUBLE
+mypow10(int exponent)
+{
+ LDOUBLE result = 1;
+
+ while (exponent > 0) {
+ result *= 10;
+ exponent--;
+ }
+ while (exponent < 0) {
+ result /= 10;
+ exponent++;
+ }
+ return result;
+}
+#endif /* HW_WANT_RPL_VSNPRINTF */
+
+#if HW_WANT_RPL_VASPRINTF
+#if NEED_MYMEMCPY
+void *
+mymemcpy(void *dst, void *src, size_t len)
+{
+ const char *from = src;
+ char *to = dst;
+
+ /* No need for optimization, we use this only to replace va_copy(3). */
+ while (len-- > 0)
+ *to++ = *from++;
+ return dst;
+}
+#endif /* NEED_MYMEMCPY */
+
+int
+rpl_vasprintf(char **ret, const char *format, va_list ap);
+
+int
+rpl_vasprintf(char **ret, const char *format, va_list ap)
+{
+ size_t size;
+ int len;
+ va_list aq;
+
+ VA_COPY(aq, ap);
+ len = vsnprintf(NULL, 0, format, aq);
+ VA_END_COPY(aq);
+ if (len < 0 || (*ret = malloc(size = len + 1)) == NULL)
+ return -1;
+ return vsnprintf(*ret, size, format, ap);
+}
+#endif /* HW_WANT_RPL_VASPRINTF */
+
+#if HW_WANT_RPL_SNPRINTF
+#if HAVE_STDARG_H
+int
+rpl_snprintf(char *str, size_t size, const char *format, ...);
+
+int
+rpl_snprintf(char *str, size_t size, const char *format, ...)
+#else
+int
+rpl_snprintf(va_alist) va_dcl
+#endif /* HAVE_STDARG_H */
{
+#if !HAVE_STDARG_H
+ char *str;
+ size_t size;
+ char *format;
+#endif /* HAVE_STDARG_H */
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);
+ int len;
+
+ VA_START(ap, format);
+ VA_SHIFT(ap, str, char *);
+ VA_SHIFT(ap, size, size_t);
+ VA_SHIFT(ap, format, const char *);
+ len = vsnprintf(str, size, format, ap);
va_end(ap);
- return (strlen(rp));
+ return len;
+}
+#endif /* HW_WANT_RPL_SNPRINTF */
+
+#if HW_WANT_RPL_ASPRINTF
+#if HAVE_STDARG_H
+int
+rpl_asprintf(char **ret, const char *format, ...);
+
+int
+rpl_asprintf(char **ret, const char *format, ...)
#else
- rval = vsprintf(str, fmt, ap);
+int
+rpl_asprintf(va_alist) va_dcl
+#endif /* HAVE_STDARG_H */
+{
+#if !HAVE_STDARG_H
+ char **ret;
+ char *format;
+#endif /* HAVE_STDARG_H */
+ va_list ap;
+ int len;
+
+ VA_START(ap, format);
+ VA_SHIFT(ap, ret, char **);
+ VA_SHIFT(ap, format, const char *);
+ len = vasprintf(ret, format, ap);
va_end(ap);
- return (rval);
-#endif
+ return len;
}
+#endif /* HW_WANT_RPL_ASPRINTF */
+#else /* Dummy declaration to avoid empty translation unit warnings. */
+int main(void);
+#endif /* HW_WANT_RPL_SNPRINTF || HW_WANT_RPL_VSNPRINTF || HW_WANT_RPL_ASPRINTF || [...] */
+#if TEST_SNPRINTF
int
-vsnprintf(
- char *str,
- size_t n,
- const char *fmt,
- va_list ap
- )
+main(void)
{
-#ifdef VSPRINTF_CHARSTAR
- return (strlen(vsprintf(str, fmt, ap)));
-#else
- return (vsprintf(str, fmt, ap));
-#endif
+ const char *float_fmt[] = {
+ /* "%E" and "%e" formats. */
+#if HAVE_LONG_LONG_INT && !OS_BSD && !OS_IRIX
+ "%.16e",
+ "%22.16e",
+ "%022.16e",
+ "%-22.16e",
+ "%#+'022.16e",
+#endif /* HAVE_LONG_LONG_INT && !OS_BSD && !OS_IRIX */
+ "foo|%#+0123.9E|bar",
+ "%-123.9e",
+ "%123.9e",
+ "%+23.9e",
+ "%+05.8e",
+ "%-05.8e",
+ "%05.8e",
+ "%+5.8e",
+ "%-5.8e",
+ "% 5.8e",
+ "%5.8e",
+ "%+4.9e",
+#if !OS_LINUX /* glibc sometimes gets these wrong. */
+ "%+#010.0e",
+ "%#10.1e",
+ "%10.5e",
+ "% 10.5e",
+ "%5.0e",
+ "%5.e",
+ "%#5.0e",
+ "%#5.e",
+ "%3.2e",
+ "%3.1e",
+ "%-1.5e",
+ "%1.5e",
+ "%01.3e",
+ "%1.e",
+ "%.1e",
+ "%#.0e",
+ "%+.0e",
+ "% .0e",
+ "%.0e",
+ "%#.e",
+ "%+.e",
+ "% .e",
+ "%.e",
+ "%4e",
+ "%e",
+ "%E",
+#endif /* !OS_LINUX */
+ /* "%F" and "%f" formats. */
+#if !OS_BSD && !OS_IRIX
+ "% '022f",
+ "%+'022f",
+ "%-'22f",
+ "%'22f",
+#if HAVE_LONG_LONG_INT
+ "%.16f",
+ "%22.16f",
+ "%022.16f",
+ "%-22.16f",
+ "%#+'022.16f",
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !OS_BSD && !OS_IRIX */
+ "foo|%#+0123.9F|bar",
+ "%-123.9f",
+ "%123.9f",
+ "%+23.9f",
+ "%+#010.0f",
+ "%#10.1f",
+ "%10.5f",
+ "% 10.5f",
+ "%+05.8f",
+ "%-05.8f",
+ "%05.8f",
+ "%+5.8f",
+ "%-5.8f",
+ "% 5.8f",
+ "%5.8f",
+ "%5.0f",
+ "%5.f",
+ "%#5.0f",
+ "%#5.f",
+ "%+4.9f",
+ "%3.2f",
+ "%3.1f",
+ "%-1.5f",
+ "%1.5f",
+ "%01.3f",
+ "%1.f",
+ "%.1f",
+ "%#.0f",
+ "%+.0f",
+ "% .0f",
+ "%.0f",
+ "%#.f",
+ "%+.f",
+ "% .f",
+ "%.f",
+ "%4f",
+ "%f",
+ "%F",
+ /* "%G" and "%g" formats. */
+#if !OS_BSD && !OS_IRIX && !OS_LINUX
+ "% '022g",
+ "%+'022g",
+ "%-'22g",
+ "%'22g",
+#if HAVE_LONG_LONG_INT
+ "%.16g",
+ "%22.16g",
+ "%022.16g",
+ "%-22.16g",
+ "%#+'022.16g",
+#endif /* HAVE_LONG_LONG_INT */
+#endif /* !OS_BSD && !OS_IRIX && !OS_LINUX */
+ "foo|%#+0123.9G|bar",
+ "%-123.9g",
+ "%123.9g",
+ "%+23.9g",
+ "%+05.8g",
+ "%-05.8g",
+ "%05.8g",
+ "%+5.8g",
+ "%-5.8g",
+ "% 5.8g",
+ "%5.8g",
+ "%+4.9g",
+#if !OS_LINUX /* glibc sometimes gets these wrong. */
+ "%+#010.0g",
+ "%#10.1g",
+ "%10.5g",
+ "% 10.5g",
+ "%5.0g",
+ "%5.g",
+ "%#5.0g",
+ "%#5.g",
+ "%3.2g",
+ "%3.1g",
+ "%-1.5g",
+ "%1.5g",
+ "%01.3g",
+ "%1.g",
+ "%.1g",
+ "%#.0g",
+ "%+.0g",
+ "% .0g",
+ "%.0g",
+ "%#.g",
+ "%+.g",
+ "% .g",
+ "%.g",
+ "%4g",
+ "%g",
+ "%G",
+#endif /* !OS_LINUX */
+ NULL
+ };
+ double float_val[] = {
+ -4.136,
+ -134.52,
+ -5.04030201,
+ -3410.01234,
+ -999999.999999,
+ -913450.29876,
+ -913450.2,
+ -91345.2,
+ -9134.2,
+ -913.2,
+ -91.2,
+ -9.2,
+ -9.9,
+ 4.136,
+ 134.52,
+ 5.04030201,
+ 3410.01234,
+ 999999.999999,
+ 913450.29876,
+ 913450.2,
+ 91345.2,
+ 9134.2,
+ 913.2,
+ 91.2,
+ 9.2,
+ 9.9,
+ 9.96,
+ 9.996,
+ 9.9996,
+ 9.99996,
+ 9.999996,
+ 9.9999996,
+ 9.99999996,
+ 0.99999996,
+ 0.99999999,
+ 0.09999999,
+ 0.00999999,
+ 0.00099999,
+ 0.00009999,
+ 0.00000999,
+ 0.00000099,
+ 0.00000009,
+ 0.00000001,
+ 0.0000001,
+ 0.000001,
+ 0.00001,
+ 0.0001,
+ 0.001,
+ 0.01,
+ 0.1,
+ 1.0,
+ 1.5,
+ -1.5,
+ -1.0,
+ -0.1,
+#if !OS_BSD /* BSD sometimes gets these wrong. */
+#ifdef INFINITY
+ INFINITY,
+ -INFINITY,
+#endif /* defined(INFINITY) */
+#ifdef NAN
+ NAN,
+#endif /* defined(NAN) */
+#endif /* !OS_BSD */
+ 0
+ };
+ const char *long_fmt[] = {
+ "foo|%0123ld|bar",
+#if !OS_IRIX
+ "% '0123ld",
+ "%+'0123ld",
+ "%-'123ld",
+ "%'123ld",
+#endif /* !OS_IRiX */
+ "%123.9ld",
+ "% 123.9ld",
+ "%+123.9ld",
+ "%-123.9ld",
+ "%0123ld",
+ "% 0123ld",
+ "%+0123ld",
+ "%-0123ld",
+ "%10.5ld",
+ "% 10.5ld",
+ "%+10.5ld",
+ "%-10.5ld",
+ "%010ld",
+ "% 010ld",
+ "%+010ld",
+ "%-010ld",
+ "%4.2ld",
+ "% 4.2ld",
+ "%+4.2ld",
+ "%-4.2ld",
+ "%04ld",
+ "% 04ld",
+ "%+04ld",
+ "%-04ld",
+ "%5.5ld",
+ "%+22.33ld",
+ "%01.3ld",
+ "%1.5ld",
+ "%-1.5ld",
+ "%44ld",
+ "%4ld",
+ "%4.0ld",
+ "%4.ld",
+ "%.44ld",
+ "%.4ld",
+ "%.0ld",
+ "%.ld",
+ "%ld",
+ NULL
+ };
+ long int long_val[] = {
+#ifdef LONG_MAX
+ LONG_MAX,
+#endif /* LONG_MAX */
+#ifdef LONG_MIN
+ LONG_MIN,
+#endif /* LONG_MIN */
+ -91340,
+ 91340,
+ 341,
+ 134,
+ 0203,
+ -1,
+ 1,
+ 0
+ };
+ const char *ulong_fmt[] = {
+ /* "%u" formats. */
+ "foo|%0123lu|bar",
+#if !OS_IRIX
+ "% '0123lu",
+ "%+'0123lu",
+ "%-'123lu",
+ "%'123lu",
+#endif /* !OS_IRiX */
+ "%123.9lu",
+ "% 123.9lu",
+ "%+123.9lu",
+ "%-123.9lu",
+ "%0123lu",
+ "% 0123lu",
+ "%+0123lu",
+ "%-0123lu",
+ "%5.5lu",
+ "%+22.33lu",
+ "%01.3lu",
+ "%1.5lu",
+ "%-1.5lu",
+ "%44lu",
+ "%lu",
+ /* "%o" formats. */
+ "foo|%#0123lo|bar",
+ "%#123.9lo",
+ "%# 123.9lo",
+ "%#+123.9lo",
+ "%#-123.9lo",
+ "%#0123lo",
+ "%# 0123lo",
+ "%#+0123lo",
+ "%#-0123lo",
+ "%#5.5lo",
+ "%#+22.33lo",
+ "%#01.3lo",
+ "%#1.5lo",
+ "%#-1.5lo",
+ "%#44lo",
+ "%#lo",
+ "%123.9lo",
+ "% 123.9lo",
+ "%+123.9lo",
+ "%-123.9lo",
+ "%0123lo",
+ "% 0123lo",
+ "%+0123lo",
+ "%-0123lo",
+ "%5.5lo",
+ "%+22.33lo",
+ "%01.3lo",
+ "%1.5lo",
+ "%-1.5lo",
+ "%44lo",
+ "%lo",
+ /* "%X" and "%x" formats. */
+ "foo|%#0123lX|bar",
+ "%#123.9lx",
+ "%# 123.9lx",
+ "%#+123.9lx",
+ "%#-123.9lx",
+ "%#0123lx",
+ "%# 0123lx",
+ "%#+0123lx",
+ "%#-0123lx",
+ "%#5.5lx",
+ "%#+22.33lx",
+ "%#01.3lx",
+ "%#1.5lx",
+ "%#-1.5lx",
+ "%#44lx",
+ "%#lx",
+ "%#lX",
+ "%123.9lx",
+ "% 123.9lx",
+ "%+123.9lx",
+ "%-123.9lx",
+ "%0123lx",
+ "% 0123lx",
+ "%+0123lx",
+ "%-0123lx",
+ "%5.5lx",
+ "%+22.33lx",
+ "%01.3lx",
+ "%1.5lx",
+ "%-1.5lx",
+ "%44lx",
+ "%lx",
+ "%lX",
+ NULL
+ };
+ unsigned long int ulong_val[] = {
+#ifdef ULONG_MAX
+ ULONG_MAX,
+#endif /* ULONG_MAX */
+ 91340,
+ 341,
+ 134,
+ 0203,
+ 1,
+ 0
+ };
+ const char *llong_fmt[] = {
+ "foo|%0123lld|bar",
+ "%123.9lld",
+ "% 123.9lld",
+ "%+123.9lld",
+ "%-123.9lld",
+ "%0123lld",
+ "% 0123lld",
+ "%+0123lld",
+ "%-0123lld",
+ "%5.5lld",
+ "%+22.33lld",
+ "%01.3lld",
+ "%1.5lld",
+ "%-1.5lld",
+ "%44lld",
+ "%lld",
+ NULL
+ };
+ LLONG llong_val[] = {
+#ifdef LLONG_MAX
+ LLONG_MAX,
+#endif /* LLONG_MAX */
+#ifdef LLONG_MIN
+ LLONG_MIN,
+#endif /* LLONG_MIN */
+ -91340,
+ 91340,
+ 341,
+ 134,
+ 0203,
+ -1,
+ 1,
+ 0
+ };
+ const char *string_fmt[] = {
+ "foo|%10.10s|bar",
+ "%-10.10s",
+ "%10.10s",
+ "%10.5s",
+ "%5.10s",
+ "%10.1s",
+ "%1.10s",
+ "%10.0s",
+ "%0.10s",
+ "%-42.5s",
+ "%2.s",
+ "%.10s",
+ "%.1s",
+ "%.0s",
+ "%.s",
+ "%4s",
+ "%s",
+ NULL
+ };
+ const char *string_val[] = {
+ "Hello",
+ "Hello, world!",
+ "Sound check: One, two, three.",
+ "This string is a little longer than the other strings.",
+ "1",
+ "",
+ NULL
+ };
+#if !OS_SYSV /* SysV uses a different format than we do. */
+ const char *pointer_fmt[] = {
+ "foo|%p|bar",
+ "%42p",
+ "%p",
+ NULL
+ };
+ const char *pointer_val[] = {
+ *pointer_fmt,
+ *string_fmt,
+ *string_val,
+ NULL
+ };
+#endif /* !OS_SYSV */
+ char buf1[1024], buf2[1024];
+ double value, digits = 9.123456789012345678901234567890123456789;
+ int i, j, r1, r2, failed = 0, num = 0;
+
+/*
+ * Use -DTEST_NILS in order to also test the conversion of nil values. Might
+ * segfault on systems which don't support converting a NULL pointer with "%s"
+ * and lets some test cases fail against BSD and glibc due to bugs in their
+ * implementations.
+ */
+#ifndef TEST_NILS
+#define TEST_NILS 0
+#elif TEST_NILS
+#undef TEST_NILS
+#define TEST_NILS 1
+#endif /* !defined(TEST_NILS) */
+#ifdef TEST
+#undef TEST
+#endif /* defined(TEST) */
+#define TEST(fmt, val) \
+do { \
+ for (i = 0; fmt[i] != NULL; i++) \
+ for (j = 0; j == 0 || val[j - TEST_NILS] != 0; j++) { \
+ r1 = sprintf(buf1, fmt[i], val[j]); \
+ r2 = snprintf(buf2, sizeof(buf2), fmt[i], val[j]); \
+ if (strcmp(buf1, buf2) != 0 || r1 != r2) { \
+ (void)printf("Results don't match, " \
+ "format string: %s\n" \
+ "\t sprintf(3): [%s] (%d)\n" \
+ "\tsnprintf(3): [%s] (%d)\n", \
+ fmt[i], buf1, r1, buf2, r2); \
+ failed++; \
+ } \
+ num++; \
+ } \
+} while (/* CONSTCOND */ 0)
+
+#if HAVE_LOCALE_H
+ (void)setlocale(LC_ALL, "");
+#endif /* HAVE_LOCALE_H */
+
+ (void)puts("Testing our snprintf(3) against your system's sprintf(3).");
+ TEST(float_fmt, float_val);
+ TEST(long_fmt, long_val);
+ TEST(ulong_fmt, ulong_val);
+ TEST(llong_fmt, llong_val);
+ TEST(string_fmt, string_val);
+#if !OS_SYSV /* SysV uses a different format than we do. */
+ TEST(pointer_fmt, pointer_val);
+#endif /* !OS_SYSV */
+ (void)printf("Result: %d out of %d tests failed.\n", failed, num);
+
+ (void)fputs("Checking how many digits we support: ", stdout);
+ for (i = 0; i < 100; i++) {
+ value = pow(10, i) * digits;
+ (void)sprintf(buf1, "%.1f", value);
+ (void)snprintf(buf2, sizeof(buf2), "%.1f", value);
+ if (strcmp(buf1, buf2) != 0) {
+ (void)printf("apparently %d.\n", i);
+ break;
+ }
+ }
+ return (failed == 0) ? 0 : 1;
}
-#else
-int snprintf_bs;
-#endif
+#endif /* TEST_SNPRINTF */
+
+/* vim: set joinspaces textwidth=80: */
diff --git a/libntp/socket.c b/libntp/socket.c
new file mode 100644
index 000000000000..de678c6340b4
--- /dev/null
+++ b/libntp/socket.c
@@ -0,0 +1,218 @@
+/*
+ * socket.c - low-level socket operations
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "ntp.h"
+#include "ntp_io.h"
+#include "ntp_net.h"
+#include "ntp_debug.h"
+
+/*
+ * Windows C runtime ioctl() can't deal properly with sockets,
+ * map to ioctlsocket for this source file.
+ */
+#ifdef SYS_WINNT
+#define ioctl(fd, opt, val) ioctlsocket(fd, opt, (u_long *)(val))
+#endif
+
+/*
+ * on Unix systems the stdio library typically
+ * makes use of file descriptors in the lower
+ * integer range. stdio usually will make use
+ * of the file descriptors in the range of
+ * [0..FOPEN_MAX)
+ * in order to keep this range clean, for socket
+ * file descriptors we attempt to move them above
+ * FOPEN_MAX. This is not as easy as it sounds as
+ * FOPEN_MAX changes from implementation to implementation
+ * and may exceed to current file decriptor limits.
+ * We are using following strategy:
+ * - keep a current socket fd boundary initialized with
+ * max(0, min(GETDTABLESIZE() - FD_CHUNK, FOPEN_MAX))
+ * - attempt to move the descriptor to the boundary or
+ * above.
+ * - if that fails and boundary > 0 set boundary
+ * to min(0, socket_fd_boundary - FD_CHUNK)
+ * -> retry
+ * if failure and boundary == 0 return old fd
+ * - on success close old fd return new fd
+ *
+ * effects:
+ * - fds will be moved above the socket fd boundary
+ * if at all possible.
+ * - the socket boundary will be reduced until
+ * allocation is possible or 0 is reached - at this
+ * point the algrithm will be disabled
+ */
+SOCKET
+move_fd(
+ SOCKET fd
+ )
+{
+#if !defined(SYS_WINNT) && defined(F_DUPFD)
+#ifndef FD_CHUNK
+#define FD_CHUNK 10
+#endif
+#ifndef FOPEN_MAX
+#define FOPEN_MAX 20
+#endif
+/*
+ * number of fds we would like to have for
+ * stdio FILE* available.
+ * we can pick a "low" number as our use of
+ * FILE* is limited to log files and temporarily
+ * to data and config files. Except for log files
+ * we don't keep the other FILE* open beyond the
+ * scope of the function that opened it.
+ */
+#ifndef FD_PREFERRED_SOCKBOUNDARY
+#define FD_PREFERRED_SOCKBOUNDARY 48
+#endif
+
+ static SOCKET socket_boundary = -1;
+ SOCKET newfd;
+
+ NTP_REQUIRE((int)fd >= 0);
+
+ /*
+ * check whether boundary has be set up
+ * already
+ */
+ if (socket_boundary == -1) {
+ socket_boundary = max(0, min(GETDTABLESIZE() - FD_CHUNK,
+ min(FOPEN_MAX, FD_PREFERRED_SOCKBOUNDARY)));
+ TRACE(1, ("move_fd: estimated max descriptors: %d, "
+ "initial socket boundary: %d\n",
+ GETDTABLESIZE(), socket_boundary));
+ }
+
+ /*
+ * Leave a space for stdio to work in. potentially moving the
+ * socket_boundary lower until allocation succeeds.
+ */
+ do {
+ if (fd >= 0 && fd < socket_boundary) {
+ /* inside reserved range: attempt to move fd */
+ newfd = fcntl(fd, F_DUPFD, socket_boundary);
+
+ if (newfd != -1) {
+ /* success: drop the old one - return the new one */
+ close(fd);
+ return newfd;
+ }
+ } else {
+ /* outside reserved range: no work - return the original one */
+ return fd;
+ }
+ socket_boundary = max(0, socket_boundary - FD_CHUNK);
+ TRACE(1, ("move_fd: selecting new socket boundary: %d\n",
+ socket_boundary));
+ } while (socket_boundary > 0);
+#else
+ NTP_REQUIRE((int)fd >= 0);
+#endif /* !defined(SYS_WINNT) && defined(F_DUPFD) */
+ return fd;
+}
+
+
+/*
+ * make_socket_nonblocking() - set up descriptor to be non blocking
+ */
+void
+make_socket_nonblocking(
+ SOCKET 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) {
+ msyslog(LOG_ERR,
+ "fcntl(O_NONBLOCK) fails on fd #%d: %m", fd);
+ exit(1);
+ }
+#elif defined(FNDELAY)
+ if (fcntl(fd, F_SETFL, FNDELAY) < 0) {
+ msyslog(LOG_ERR, "fcntl(FNDELAY) fails on fd #%d: %m",
+ fd);
+ exit(1);
+ }
+#elif defined(O_NDELAY) /* generally the same as FNDELAY */
+ if (fcntl(fd, F_SETFL, O_NDELAY) < 0) {
+ msyslog(LOG_ERR, "fcntl(O_NDELAY) fails on fd #%d: %m",
+ fd);
+ exit(1);
+ }
+#elif defined(FIONBIO)
+ {
+ int on = 1;
+
+ if (ioctl(fd, FIONBIO, &on) < 0) {
+ msyslog(LOG_ERR,
+ "ioctl(FIONBIO) fails on fd #%d: %m",
+ fd);
+ exit(1);
+ }
+ }
+#elif defined(FIOSNBIO)
+ if (ioctl(fd, FIOSNBIO, &on) < 0) {
+ msyslog(LOG_ERR,
+ "ioctl(FIOSNBIO) fails on fd #%d: %m", fd);
+ exit(1);
+ }
+#else
+# include "Bletch: Need non-blocking I/O!"
+#endif
+}
+
+#if 0
+
+/* The following subroutines should probably be moved here */
+
+static SOCKET
+open_socket(
+ sockaddr_u * addr,
+ int bcast,
+ int turn_off_reuse,
+ endpt * interf
+ )
+void
+sendpkt(
+ sockaddr_u * dest,
+ struct interface * ep,
+ int ttl,
+ struct pkt * pkt,
+ int len
+ )
+
+static inline int
+read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts)
+
+static inline int
+read_network_packet(
+ SOCKET fd,
+ struct interface * itf,
+ l_fp ts
+ )
+
+void
+kill_asyncio(int startfd)
+
+#endif /* 0 */
diff --git a/libntp/socktoa.c b/libntp/socktoa.c
index 62e4537266f0..98abe7c42036 100644
--- a/libntp/socktoa.c
+++ b/libntp/socktoa.c
@@ -1,5 +1,5 @@
/*
- * socktoa - return a numeric host name from a sockaddr_storage structure
+ * socktoa.c socktoa(), sockporttoa(), and sock_hash()
*/
#ifdef HAVE_CONFIG_H
@@ -14,49 +14,157 @@
#include <netinet/in.h>
#endif
-#include <arpa/inet.h>
-
-#ifdef ISC_PLATFORM_NEEDNTOP
-#include <isc/net.h>
-#endif
-
#include <stdio.h>
+#include <arpa/inet.h>
+#include <isc/result.h>
+#include <isc/netaddr.h>
+#include <isc/sockaddr.h>
#include "ntp_fp.h"
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp.h"
-char *
+/*
+ * socktoa - return a numeric host name from a sockaddr_storage structure
+ */
+const char *
socktoa(
const sockaddr_u *sock
)
{
- register char *buffer;
+ int saved_errno;
+ char * res;
+ char * addr;
+ u_long scope;
- LIB_GETBUF(buffer);
+ saved_errno = socket_errno();
+ LIB_GETBUF(res);
- if (NULL == sock)
- strncpy(buffer, "(null)", LIB_BUFLENGTH);
- else {
+ if (NULL == sock) {
+ strlcpy(res, "(null)", LIB_BUFLENGTH);
+ } else {
switch(AF(sock)) {
case AF_INET:
case AF_UNSPEC:
- inet_ntop(AF_INET, PSOCK_ADDR4(sock), buffer,
+ inet_ntop(AF_INET, PSOCK_ADDR4(sock), res,
LIB_BUFLENGTH);
break;
case AF_INET6:
- inet_ntop(AF_INET6, PSOCK_ADDR6(sock), buffer,
+ inet_ntop(AF_INET6, PSOCK_ADDR6(sock), res,
LIB_BUFLENGTH);
+ scope = SCOPE_VAR(sock);
+ if (0 != scope && !strchr(res, '%')) {
+ addr = res;
+ LIB_GETBUF(res);
+ snprintf(res, LIB_BUFLENGTH, "%s%%%lu",
+ addr, scope);
+ res[LIB_BUFLENGTH - 1] = '\0';
+ }
break;
default:
- snprintf(buffer, LIB_BUFLENGTH,
+ snprintf(res, LIB_BUFLENGTH,
"(socktoa unknown family %d)",
AF(sock));
}
}
- return buffer;
+ errno = saved_errno;
+
+ return res;
+}
+
+
+const char *
+sockporttoa(
+ const sockaddr_u *sock
+ )
+{
+ int saved_errno;
+ const char * atext;
+ char * buf;
+
+ saved_errno = socket_errno();
+ atext = socktoa(sock);
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH,
+ (IS_IPV6(sock))
+ ? "[%s]:%hu"
+ : "%s:%hu",
+ atext, SRCPORT(sock));
+ errno = saved_errno;
+
+ return buf;
+}
+
+
+/*
+ * sock_hash - hash a sockaddr_u structure
+ */
+u_short
+sock_hash(
+ const sockaddr_u *addr
+ )
+{
+ u_int hashVal;
+ u_int j;
+ size_t len;
+ const u_char *pch;
+
+ 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.
+ */
+ pch = (const void *)&AF(addr);
+ hashVal = 37 * hashVal + *pch;
+ if (sizeof(AF(addr)) > 1) {
+ pch++;
+ hashVal = 37 * hashVal + *pch;
+ }
+ switch(AF(addr)) {
+ case AF_INET:
+ pch = (const void *)&SOCK_ADDR4(addr);
+ len = sizeof(SOCK_ADDR4(addr));
+ break;
+
+ case AF_INET6:
+ pch = (const void *)&SOCK_ADDR6(addr);
+ len = sizeof(SOCK_ADDR6(addr));
+ break;
+ }
+
+ for (j = 0; j < len ; j++)
+ hashVal = 37 * hashVal + pch[j];
+
+ return (u_short)(hashVal & USHRT_MAX);
+}
+
+
+int
+sockaddr_masktoprefixlen(
+ const sockaddr_u * psa
+ )
+{
+ isc_netaddr_t isc_na;
+ isc_sockaddr_t isc_sa;
+ u_int pfxlen;
+ isc_result_t result;
+ int rc;
+
+ ZERO(isc_sa);
+ memcpy(&isc_sa.type, psa,
+ min(sizeof(isc_sa.type), sizeof(*psa)));
+ isc_netaddr_fromsockaddr(&isc_na, &isc_sa);
+ result = isc_netaddr_masktoprefixlen(&isc_na, &pfxlen);
+ rc = (ISC_R_SUCCESS == result)
+ ? (int)pfxlen
+ : -1;
+
+ return rc;
}
diff --git a/libntp/socktohost.c b/libntp/socktohost.c
index 05bbdd64344c..c61e57148a65 100644
--- a/libntp/socktohost.c
+++ b/libntp/socktohost.c
@@ -1,6 +1,7 @@
/*
* socktoa - return a numeric host name from a sockaddr_storage structure
*/
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -17,19 +18,93 @@
#include "lib_strbuf.h"
#include "ntp_stdlib.h"
#include "ntp.h"
+#include "ntp_debug.h"
-char *
+const char *
socktohost(
const sockaddr_u *sock
)
{
- register char *buffer;
+ const char svc[] = "ntp";
+ char * pbuf;
+ char * pliar;
+ int gni_flags;
+ struct addrinfo hints;
+ struct addrinfo * alist;
+ struct addrinfo * ai;
+ sockaddr_u addr;
+ size_t octets;
+ int a_info;
- LIB_GETBUF(buffer);
- if (getnameinfo(&sock->sa, SOCKLEN(sock), buffer,
- LIB_BUFLENGTH, NULL, 0, 0))
- return stoa(sock);
+ /* reverse the address to purported DNS name */
+ LIB_GETBUF(pbuf);
+ gni_flags = NI_DGRAM | NI_NAMEREQD;
+ if (getnameinfo(&sock->sa, SOCKLEN(sock), pbuf, LIB_BUFLENGTH,
+ NULL, 0, gni_flags))
+ return stoa(sock); /* use address */
- return buffer;
+ TRACE(1, ("%s reversed to %s\n", stoa(sock), pbuf));
+
+ /*
+ * Resolve the reversed name and make sure the reversed address
+ * is among the results.
+ */
+ ZERO(hints);
+ hints.ai_family = AF(sock);
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = 0;
+ alist = NULL;
+
+ a_info = getaddrinfo(pbuf, svc, &hints, &alist);
+ if (a_info == EAI_NONAME
+#ifdef EAI_NODATA
+ || a_info == EAI_NODATA
+#endif
+ ) {
+ hints.ai_flags = AI_CANONNAME;
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+ a_info = getaddrinfo(pbuf, svc, &hints, &alist);
+ }
+#ifdef AI_ADDRCONFIG
+ /* Some older implementations don't like AI_ADDRCONFIG. */
+ if (a_info == EAI_BADFLAGS) {
+ hints.ai_flags &= ~AI_ADDRCONFIG;
+ a_info = getaddrinfo(pbuf, svc, &hints, &alist);
+ }
+#endif
+ if (a_info)
+ goto forward_fail;
+
+ NTP_INSIST(alist != NULL);
+
+ for (ai = alist; ai != NULL; ai = ai->ai_next) {
+ /*
+ * Make a convenience sockaddr_u copy from ai->ai_addr
+ * because casting from sockaddr * to sockaddr_u * is
+ * risking alignment problems on platforms where
+ * sockaddr_u has stricter alignment than sockaddr,
+ * such as sparc.
+ */
+ ZERO_SOCK(&addr);
+ octets = min(sizeof(addr), ai->ai_addrlen);
+ memcpy(&addr, ai->ai_addr, octets);
+ if (SOCK_EQ(sock, &addr))
+ break;
+ }
+ freeaddrinfo(alist);
+
+ if (ai != NULL)
+ return pbuf; /* forward check passed */
+
+ forward_fail:
+ TRACE(1, ("%s forward check lookup fail: %s\n", pbuf,
+ gai_strerror(a_info)));
+ LIB_GETBUF(pliar);
+ snprintf(pliar, LIB_BUFLENGTH, "%s (%s)", stoa(sock), pbuf);
+
+ return pliar;
}
diff --git a/libntp/ssl_init.c b/libntp/ssl_init.c
index 9e11e5f2cc61..7f1e9a096b20 100644
--- a/libntp/ssl_init.c
+++ b/libntp/ssl_init.c
@@ -16,19 +16,35 @@
#include "openssl/err.h"
#include "openssl/evp.h"
+void atexit_ssl_cleanup(void);
int ssl_init_done;
void
ssl_init(void)
{
+ init_lib();
+
if (ssl_init_done)
return;
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
+ atexit(&atexit_ssl_cleanup);
- ssl_init_done = 1;
+ ssl_init_done = TRUE;
+}
+
+
+void
+atexit_ssl_cleanup(void)
+{
+ if (!ssl_init_done)
+ return;
+
+ ssl_init_done = FALSE;
+ EVP_cleanup();
+ ERR_free_strings();
}
@@ -38,10 +54,10 @@ ssl_check_version(void)
if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) {
msyslog(LOG_WARNING,
"OpenSSL version mismatch. Built against %lx, you have %lx",
- OPENSSL_VERSION_NUMBER, SSLeay());
+ (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
fprintf(stderr,
"OpenSSL version mismatch. Built against %lx, you have %lx\n",
- OPENSSL_VERSION_NUMBER, SSLeay());
+ (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
}
INIT_SSL();
@@ -61,10 +77,10 @@ keytype_from_text(
size_t *pdigest_len
)
{
- const u_long max_digest_len = MAX_MAC_LEN - sizeof(keyid_t);
int key_type;
u_int digest_len;
#ifdef OPENSSL
+ const u_long max_digest_len = MAX_MAC_LEN - sizeof(keyid_t);
u_char digest[EVP_MAX_MD_SIZE];
char * upcased;
char * pch;
@@ -78,7 +94,7 @@ keytype_from_text(
*/
INIT_SSL();
LIB_GETBUF(upcased);
- strncpy(upcased, text, LIB_BUFLENGTH);
+ strlcpy(upcased, text, LIB_BUFLENGTH);
for (pch = upcased; '\0' != *pch; pch++)
*pch = (char)toupper(*pch);
key_type = OBJ_sn2nid(upcased);
@@ -96,13 +112,13 @@ keytype_from_text(
#ifdef OPENSSL
EVP_DigestInit(&ctx, EVP_get_digestbynid(key_type));
EVP_DigestFinal(&ctx, digest, &digest_len);
- if (digest_len + sizeof(keyid_t) > MAX_MAC_LEN) {
+ if (digest_len > max_digest_len) {
fprintf(stderr,
"key type %s %u octet digests are too big, max %lu\n",
keytype_name(key_type), digest_len,
max_digest_len);
msyslog(LOG_ERR,
- "key type %s %u octet digests are too big, max %lu\n",
+ "key type %s %u octet digests are too big, max %lu",
keytype_name(key_type), digest_len,
max_digest_len);
return 0;
diff --git a/libntp/statestr.c b/libntp/statestr.c
index a143fcd3fc9c..cd98eb3951a3 100644
--- a/libntp/statestr.c
+++ b/libntp/statestr.c
@@ -12,20 +12,23 @@
#include "ntp_refclock.h"
#include "ntp_control.h"
#include "ntp_string.h"
+#ifdef KERNEL_PLL
+# include "ntp_syscall.h"
+#endif
+
/*
* Structure for turning various constants into a readable string.
*/
struct codestring {
int code;
- const char *string;
+ const char * const string;
};
/*
* Leap status (leap)
*/
-static
-struct codestring leap_codes[] = {
+static const struct codestring leap_codes[] = {
{ LEAP_NOWARNING, "leap_none" },
{ LEAP_ADDSECOND, "leap_add_sec" },
{ LEAP_DELSECOND, "leap_del_sec" },
@@ -36,8 +39,7 @@ struct codestring leap_codes[] = {
/*
* Clock source status (sync)
*/
-static
-struct codestring sync_codes[] = {
+static const struct codestring sync_codes[] = {
{ CTL_SST_TS_UNSPEC, "sync_unspec" },
{ CTL_SST_TS_ATOM, "sync_pps" },
{ CTL_SST_TS_LF, "sync_lf_radio" },
@@ -54,8 +56,7 @@ struct codestring sync_codes[] = {
/*
* Peer selection status (sel)
*/
-static
-struct codestring select_codes[] = {
+static const struct codestring select_codes[] = {
{ CTL_PST_SEL_REJECT, "sel_reject" },
{ CTL_PST_SEL_SANE, "sel_falsetick" },
{ CTL_PST_SEL_CORRECT, "sel_excess" },
@@ -70,8 +71,7 @@ struct codestring select_codes[] = {
/*
* Clock status (clk)
*/
-static
-struct codestring clock_codes[] = {
+static const struct codestring clock_codes[] = {
{ CTL_CLK_OKAY, "clk_unspec" },
{ CTL_CLK_NOREPLY, "clk_no_reply" },
{ CTL_CLK_BADFORMAT, "clk_bad_format" },
@@ -87,8 +87,7 @@ struct codestring clock_codes[] = {
/*
* Flash bits -- see ntpq.c tstflags & tstflagnames
*/
-static
-struct codestring flash_codes[] = {
+static const struct codestring flash_codes[] = {
{ TEST1, "pkt_dup" },
{ TEST2, "pkt_bogus" },
{ TEST3, "pkt_unsync" },
@@ -110,8 +109,7 @@ struct codestring flash_codes[] = {
/*
* System events (sys)
*/
-static
-struct codestring sys_codes[] = {
+static const struct codestring sys_codes[] = {
{ EVNT_UNSPEC, "unspecified" },
{ EVNT_NSET, "freq_not_set" },
{ EVNT_FSET, "freq_set" },
@@ -128,15 +126,13 @@ struct codestring sys_codes[] = {
{ EVNT_KERN, "kern" },
{ EVNT_TAI, "TAI" },
{ EVNT_LEAPVAL, "stale_leapsecond_values" },
- { EVNT_CLKHOP, "clockhop" },
{ -1, "" }
};
/*
* Peer events (peer)
*/
-static
-struct codestring peer_codes[] = {
+static const struct codestring peer_codes[] = {
{ PEVNT_MOBIL & ~PEER_EVENT, "mobilize" },
{ PEVNT_DEMOBIL & ~PEER_EVENT, "demobilize" },
{ PEVNT_UNREACH & ~PEER_EVENT, "unreachable" },
@@ -152,16 +148,55 @@ struct codestring peer_codes[] = {
{ PEVNT_POPCORN & ~PEER_EVENT, "popcorn" },
{ PEVNT_XLEAVE & ~PEER_EVENT, "interleave_mode" },
{ PEVNT_XERR & ~PEER_EVENT, "interleave_error" },
- { PEVNT_TAI & ~PEER_EVENT, "TAI" },
{ -1, "" }
};
-#ifdef OPENSSL
+/*
+ * Peer status bits
+ */
+static const struct codestring peer_st_bits[] = {
+ { CTL_PST_CONFIG, "conf" },
+ { CTL_PST_AUTHENABLE, "authenb" },
+ { CTL_PST_AUTHENTIC, "auth" },
+ { CTL_PST_REACH, "reach" },
+ { CTL_PST_BCAST, "bcast" },
+ /* not used with getcode(), no terminating entry needed */
+};
+
+/*
+ * Restriction match bits
+ */
+static const struct codestring res_match_bits[] = {
+ { RESM_NTPONLY, "ntpport" },
+ { RESM_INTERFACE, "interface" },
+ { RESM_SOURCE, "source" },
+ /* not used with getcode(), no terminating entry needed */
+};
+
+/*
+ * Restriction access bits
+ */
+static const struct codestring res_access_bits[] = {
+ { RES_IGNORE, "ignore" },
+ { RES_DONTSERVE, "noserve" },
+ { RES_DONTTRUST, "notrust" },
+ { RES_NOQUERY, "noquery" },
+ { RES_NOMODIFY, "nomodify" },
+ { RES_NOPEER, "nopeer" },
+ { RES_NOTRAP, "notrap" },
+ { RES_LPTRAP, "lptrap" },
+ { RES_LIMITED, "limited" },
+ { RES_VERSION, "version" },
+ { RES_KOD, "kod" },
+ { RES_FLAKE, "flake" },
+ /* not used with getcode(), no terminating entry needed */
+};
+
+#ifdef AUTOKEY
/*
* Crypto events (cryp)
*/
-static
-struct codestring crypto_codes[] = {
+static const struct codestring crypto_codes[] = {
{ XEVNT_OK & ~CRPT_EVENT, "success" },
{ XEVNT_LEN & ~CRPT_EVENT, "bad_field_format_or_length" },
{ XEVNT_TSP & ~CRPT_EVENT, "bad_timestamp" },
@@ -180,29 +215,90 @@ struct codestring crypto_codes[] = {
{ XEVNT_ERR & ~CRPT_EVENT, "protocol_error" },
{ -1, "" }
};
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+
+#ifdef KERNEL_PLL
+/*
+ * kernel discipline status bits
+ */
+static const struct codestring k_st_bits[] = {
+# ifdef STA_PLL
+ { STA_PLL, "pll" },
+# endif
+# ifdef STA_PPSFREQ
+ { STA_PPSFREQ, "ppsfreq" },
+# endif
+# ifdef STA_PPSTIME
+ { STA_PPSTIME, "ppstime" },
+# endif
+# ifdef STA_FLL
+ { STA_FLL, "fll" },
+# endif
+# ifdef STA_INS
+ { STA_INS, "ins" },
+# endif
+# ifdef STA_DEL
+ { STA_DEL, "del" },
+# endif
+# ifdef STA_UNSYNC
+ { STA_UNSYNC, "unsync" },
+# endif
+# ifdef STA_FREQHOLD
+ { STA_FREQHOLD, "freqhold" },
+# endif
+# ifdef STA_PPSSIGNAL
+ { STA_PPSSIGNAL, "ppssignal" },
+# endif
+# ifdef STA_PPSJITTER
+ { STA_PPSJITTER, "ppsjitter" },
+# endif
+# ifdef STA_PPSWANDER
+ { STA_PPSWANDER, "ppswander" },
+# endif
+# ifdef STA_PPSERROR
+ { STA_PPSERROR, "ppserror" },
+# endif
+# ifdef STA_CLOCKERR
+ { STA_CLOCKERR, "clockerr" },
+# endif
+# ifdef STA_NANO
+ { STA_NANO, "nano" },
+# endif
+# ifdef STA_MODE
+ { STA_MODE, "mode=fll" },
+# endif
+# ifdef STA_CLK
+ { STA_CLK, "src=B" },
+# endif
+ /* not used with getcode(), no terminating entry needed */
+};
+#endif /* KERNEL_PLL */
/* Forwards */
-static const char *getcode (int, struct codestring *);
-static const char *getevents (int);
+static const char * getcode(int, const struct codestring *);
+static const char * getevents(int);
+static const char * peer_st_flags(u_char pst);
/*
* getcode - return string corresponding to code
*/
static const char *
getcode(
- int code,
- struct codestring *codetab
+ int code,
+ const struct codestring * codetab
)
{
- static char buf[30];
+ char * buf;
while (codetab->code != -1) {
if (codetab->code == code)
return codetab->string;
codetab++;
}
- snprintf(buf, sizeof(buf), "%s_%d", codetab->string, code);
+
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%s_%d", codetab->string, code);
+
return buf;
}
@@ -214,14 +310,123 @@ getevents(
int cnt
)
{
- static char buf[20];
+ char * buf;
if (cnt == 0)
return "no events";
- snprintf(buf, sizeof(buf), "%d event%s", cnt, (cnt==1) ? "" :
- "s");
+
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%d event%s", cnt,
+ (1 == cnt)
+ ? ""
+ : "s");
+
+ return buf;
+}
+
+
+/*
+ * decode_bitflags()
+ *
+ * returns a human-readable string with a keyword from tab for each bit
+ * set in bits, separating multiple entries with text of sep2.
+ */
+static const char *
+decode_bitflags(
+ int bits,
+ const char * sep2,
+ const struct codestring * tab,
+ size_t tab_ct
+ )
+{
+ const char * sep;
+ char * buf;
+ char * pch;
+ char * lim;
+ size_t b;
+ int rc;
+ int saved_errno; /* for use in DPRINTF with %m */
+
+ saved_errno = errno;
+ LIB_GETBUF(buf);
+ pch = buf;
+ lim = buf + LIB_BUFLENGTH;
+ sep = "";
+
+ for (b = 0; b < tab_ct; b++) {
+ if (tab[b].code & bits) {
+ rc = snprintf(pch, (lim - pch), "%s%s", sep,
+ tab[b].string);
+ if (rc < 0)
+ goto toosmall;
+ pch += (u_int)rc;
+ if (pch >= lim)
+ goto toosmall;
+ sep = sep2;
+ }
+ }
+
return buf;
+
+ toosmall:
+ snprintf(buf, LIB_BUFLENGTH,
+ "decode_bitflags(%s) can't decode 0x%x in %d bytes",
+ (tab == peer_st_bits)
+ ? "peer_st"
+ :
+#ifdef KERNEL_PLL
+ (tab == k_st_bits)
+ ? "kern_st"
+ :
+#endif
+ "",
+ bits, (int)LIB_BUFLENGTH);
+ errno = saved_errno;
+
+ return buf;
+}
+
+
+static const char *
+peer_st_flags(
+ u_char pst
+ )
+{
+ return decode_bitflags(pst, ", ", peer_st_bits,
+ COUNTOF(peer_st_bits));
+}
+
+
+const char *
+res_match_flags(
+ u_short mf
+ )
+{
+ return decode_bitflags(mf, " ", res_match_bits,
+ COUNTOF(res_match_bits));
+}
+
+
+const char *
+res_access_flags(
+ u_short af
+ )
+{
+ return decode_bitflags(af, " ", res_access_bits,
+ COUNTOF(res_access_bits));
+}
+
+
+#ifdef KERNEL_PLL
+const char *
+k_st_flags(
+ u_int32 st
+ )
+{
+ return decode_bitflags(st, " ", k_st_bits, COUNTOF(k_st_bits));
}
+#endif /* KERNEL_PLL */
+
/*
* statustoa - return a descriptive string for a peer status
@@ -232,78 +437,43 @@ statustoa(
int st
)
{
- char *cb;
- u_char pst;
+ char * cb;
+ char * cc;
+ u_char pst;
LIB_GETBUF(cb);
switch (type) {
- case TYPE_SYS:
- strcpy(cb, getcode(CTL_SYS_LI(st), leap_codes));
- strcat(cb, ", ");
- strcat(cb, getcode(CTL_SYS_SOURCE(st), sync_codes));
- strcat(cb, ", ");
- strcat(cb, getevents(CTL_SYS_NEVNT(st)));
- strcat(cb, ", ");
- strcat(cb, getcode(CTL_SYS_EVENT(st), sys_codes));
+
+ case TYPE_SYS:
+ snprintf(cb, LIB_BUFLENGTH, "%s, %s, %s, %s",
+ getcode(CTL_SYS_LI(st), leap_codes),
+ getcode(CTL_SYS_SOURCE(st), sync_codes),
+ getevents(CTL_SYS_NEVNT(st)),
+ 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_CONFIG)
- strcpy(cb, "conf");
- if (pst & CTL_PST_AUTHENABLE) {
- if (pst & CTL_PST_CONFIG)
- strcat(cb, ", authenb");
- else
- strcat(cb, "authenb");
- }
- if (pst & CTL_PST_AUTHENTIC) {
- if (pst & (CTL_PST_CONFIG | CTL_PST_AUTHENABLE))
- strcat(cb, ", auth");
- else
- strcat(cb, "auth");
- }
- if (pst & CTL_PST_REACH) {
- if (pst & (CTL_PST_CONFIG | CTL_PST_AUTHENABLE |
- CTL_PST_AUTHENTIC))
- strcat(cb, ", reach");
- else
- strcat(cb, "reach");
- }
- if (pst & CTL_PST_BCAST) {
- if (pst & (CTL_PST_CONFIG | CTL_PST_AUTHENABLE |
- CTL_PST_AUTHENTIC | CTL_PST_REACH))
- strcat(cb, ", bcst");
- else
- strcat(cb, "bcst");
- }
-
- /*
- * Now the codes
- */
- strcat(cb, ", ");
- strcat(cb, getcode(pst & 0x7, select_codes));
- strcat(cb, ", ");
- strcat(cb, getevents(CTL_PEER_NEVNT(st)));
+ case TYPE_PEER:
+ pst = (u_char)CTL_PEER_STATVAL(st);
+ snprintf(cb, LIB_BUFLENGTH, "%s, %s, %s",
+ peer_st_flags(pst),
+ getcode(pst & 0x7, select_codes),
+ getevents(CTL_PEER_NEVNT(st)));
if (CTL_PEER_EVENT(st) != EVNT_UNSPEC) {
- strcat(cb, ", ");
- strcat(cb, getcode(CTL_PEER_EVENT(st),
- peer_codes));
+ cc = cb + strlen(cb);
+ snprintf(cc, LIB_BUFLENGTH - (cc - cb), ", %s",
+ getcode(CTL_PEER_EVENT(st),
+ peer_codes));
}
break;
- case TYPE_CLOCK:
- strcat(cb, ", ");
- strcat(cb, getevents(CTL_SYS_NEVNT(st)));
- strcat(cb, ", ");
- strcat(cb, getcode((st) & 0xf, clock_codes));
+ case TYPE_CLOCK:
+ snprintf(cb, LIB_BUFLENGTH, "%s, %s",
+ getevents(CTL_SYS_NEVNT(st)),
+ getcode((st) & 0xf, clock_codes));
break;
}
+
return cb;
}
@@ -314,10 +484,10 @@ eventstr(
{
if (num & PEER_EVENT)
return (getcode(num & ~PEER_EVENT, peer_codes));
-#ifdef OPENSSL
+#ifdef AUTOKEY
else if (num & CRPT_EVENT)
return (getcode(num & ~CRPT_EVENT, crypto_codes));
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
else
return (getcode(num, sys_codes));
}
diff --git a/libntp/strl_obsd.c b/libntp/strl_obsd.c
new file mode 100644
index 000000000000..cb8d4f35981f
--- /dev/null
+++ b/libntp/strl_obsd.c
@@ -0,0 +1,123 @@
+/*
+ * Why use strlcpy()/strlcat() instead of standard strncpy()/strncat()?
+ * To reduce likelihood of bugs and avoid wasteful zero fills. See:
+ * http://www.gratisoft.us/todd/papers/strlcpy.html
+ */
+
+/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+#include <config.h> /* + marks local changes */
+#ifdef HAVE_SYS_TYPES_H /* + */
+#include <sys/types.h>
+#endif /* + */
+#include <string.h>
+
+#include "ntp_stdlib.h" /* + strlcpy, strlcat prototypes */
+
+#ifndef HAVE_STRLCPY /* + */
+/*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+strlcpy(char *dst, const char *src, size_t siz)
+{
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
+
+ /* Copy as many bytes as will fit */
+ if (n != 0) {
+ while (--n != 0) {
+ if ((*d++ = *s++) == '\0')
+ break;
+ }
+ }
+
+ /* Not enough room in dst, add NUL and traverse rest of src */
+ if (n == 0) {
+ if (siz != 0)
+ *d = '\0'; /* NUL-terminate dst */
+ while (*s++)
+ ;
+ }
+
+ return(s - src - 1); /* count does not include NUL */
+}
+#endif /* + */
+
+
+/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/* #include <sys/types.h> */ /* + */
+/* #include <string.h> */ /* + */
+
+#ifndef HAVE_STRLCAT /* + */
+/*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+ * full size of dst, not space left). At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
+ * If retval >= siz, truncation occurred.
+ */
+size_t
+strlcat(char *dst, const char *src, size_t siz)
+{
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
+ size_t dlen;
+
+ /* Find the end of dst and adjust bytes left but don't go past end */
+ while (n-- != 0 && *d != '\0')
+ d++;
+ dlen = d - dst;
+ n = siz - dlen;
+
+ if (n == 0)
+ return(dlen + strlen(s));
+ while (*s != '\0') {
+ if (n != 1) {
+ *d++ = *s;
+ n--;
+ }
+ s++;
+ }
+ *d = '\0';
+
+ return(dlen + (s - src)); /* count does not include NUL */
+}
+#endif /* + */
diff --git a/libntp/strstr.c b/libntp/strstr.c
deleted file mode 100644
index a4deb8701d6c..000000000000
--- a/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/libntp/syssignal.c b/libntp/syssignal.c
index 68099f5fb3f2..5e496a95f26d 100644
--- a/libntp/syssignal.c
+++ b/libntp/syssignal.c
@@ -9,64 +9,50 @@
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
+static ctrl_c_fn ctrl_c_hook;
+#ifndef SYS_WINNT
+RETSIGTYPE sigint_handler(int);
+#else
+BOOL WINAPI console_event_handler(DWORD);
+#endif
+
+
#ifdef HAVE_SIGACTION
+# ifdef SA_RESTART
+# define Z_SA_RESTART SA_RESTART
+# else
+# define Z_SA_RESTART 0
+# endif
+
void
signal_no_reset(
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
int sig,
- void (*func) (int)
-#else
- sig, func
-#endif
+ void (*func)(int)
)
-#if defined(__STDC__) || defined(HAVE_STDARG_H)
-#else
- int sig;
- void (*func) (int);
-#endif
{
int n;
struct sigaction vec;
+ struct sigaction ovec;
- vec.sa_handler = func;
+ ZERO(vec);
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
+ vec.sa_handler = func;
-#ifdef SA_RESTART
-/* Added for PPS clocks on Solaris 7 which get EINTR errors */
+ /* Added for PPS clocks on Solaris 7 which get EINTR errors */
# ifdef SIGPOLL
- if (sig == SIGPOLL) vec.sa_flags = SA_RESTART;
+ if (SIGPOLL == sig)
+ vec.sa_flags = Z_SA_RESTART;
# endif
# ifdef SIGIO
- if (sig == SIGIO) vec.sa_flags = SA_RESTART;
+ if (SIGIO == sig)
+ vec.sa_flags = Z_SA_RESTART;
# endif
-#endif
-
- while (1)
- {
- struct sigaction ovec;
+ do
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) {
+ while (-1 == n && EINTR == errno);
+ if (-1 == n) {
perror("sigaction");
exit(1);
}
@@ -77,16 +63,16 @@ signal_no_reset(
void
signal_no_reset(
int sig,
- RETSIGTYPE (*func) (int)
+ RETSIGTYPE (*func)(int)
)
{
struct sigvec sv;
int n;
- bzero((char *) &sv, sizeof(sv));
+ ZERO(sv);
sv.sv_handler = func;
n = sigvec(sig, &sv, (struct sigvec *)NULL);
- if (n == -1) {
+ if (-1 == n) {
perror("sigvec");
exit(1);
}
@@ -97,13 +83,13 @@ signal_no_reset(
void
signal_no_reset(
int sig,
- RETSIGTYPE (*func) (int)
+ RETSIGTYPE (*func)(int)
)
{
int n;
n = sigset(sig, func);
- if (n == -1) {
+ if (-1 == n) {
perror("sigset");
exit(1);
}
@@ -115,19 +101,88 @@ signal_no_reset(
void
signal_no_reset(
int sig,
- RETSIGTYPE (*func) (int)
+ RETSIGTYPE (*func)(int)
)
{
-#ifdef SIG_ERR
- if (SIG_ERR == signal(sig, func)) {
-#else
- int n;
- n = signal(sig, func);
- if (n == -1) {
+#ifndef SIG_ERR
+# define SIG_ERR (-1)
#endif
+ if (SIG_ERR == signal(sig, func)) {
perror("signal");
exit(1);
}
}
#endif
+
+#ifndef SYS_WINNT
+/*
+ * POSIX implementation of set_ctrl_c_hook()
+ */
+RETSIGTYPE
+sigint_handler(
+ int signum
+ )
+{
+ UNUSED_ARG(signum);
+ if (ctrl_c_hook != NULL)
+ (*ctrl_c_hook)();
+}
+
+void
+set_ctrl_c_hook(
+ ctrl_c_fn c_hook
+ )
+{
+ RETSIGTYPE (*handler)(int);
+
+ if (NULL == c_hook) {
+ handler = SIG_DFL;
+ ctrl_c_hook = NULL;
+ } else {
+ handler = &sigint_handler;
+ ctrl_c_hook = c_hook;
+ }
+ signal_no_reset(SIGINT, handler);
+}
+#else /* SYS_WINNT follows */
+/*
+ * Windows implementation of set_ctrl_c_hook()
+ */
+BOOL WINAPI
+console_event_handler(
+ DWORD dwCtrlType
+ )
+{
+ BOOL handled;
+
+ if (CTRL_C_EVENT == dwCtrlType && ctrl_c_hook != NULL) {
+ (*ctrl_c_hook)();
+ handled = TRUE;
+ } else {
+ handled = FALSE;
+ }
+
+ return handled;
+}
+void
+set_ctrl_c_hook(
+ ctrl_c_fn c_hook
+ )
+{
+ BOOL install;
+
+ if (NULL == c_hook) {
+ ctrl_c_hook = NULL;
+ install = FALSE;
+ } else {
+ ctrl_c_hook = c_hook;
+ install = TRUE;
+ }
+ if (!SetConsoleCtrlHandler(&console_event_handler, install))
+ msyslog(LOG_ERR, "Can't %s console control handler: %m",
+ (install)
+ ? "add"
+ : "remove");
+}
+#endif /* SYS_WINNT */
diff --git a/libntp/systime.c b/libntp/systime.c
index 0dbf38968c72..f5eabcd1c9fd 100644
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -4,13 +4,16 @@
* ATTENTION: Get approval from Dave Mills on all changes to this file!
*
*/
-#include "ntp_machine.h"
-#include "ntp_fp.h"
+#include <config.h>
+
+#include "ntp.h"
#include "ntp_syslog.h"
-#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
#include "ntp_random.h"
-#include "ntpd.h" /* for sys_precision */
+#include "iosignal.h"
+#include "timevalops.h"
+#include "timespecops.h"
+#include "ntp_calendar.h"
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
@@ -23,7 +26,9 @@
#endif /* HAVE_UTMPX_H */
-#define FUZZ 500e-6 /* fuzz pivot */
+#ifndef USE_COMPILETIME_PIVOT
+# define USE_COMPILETIME_PIVOT 1
+#endif
/*
* These routines (get_systime, step_systime, adj_systime) implement an
@@ -34,24 +39,121 @@
* residues.
*
* In order to improve the apparent resolution, provide unbiased
- * rounding and insure that the readings cannot be predicted, the low-
- * order unused portion of the time below the resolution limit is filled
- * with an unbiased random fuzz.
+ * rounding and most importantly ensure that the readings cannot be
+ * predicted, the low-order unused portion of the time below the minimum
+ * time to read the clock is filled with an unbiased random fuzz.
+ *
+ * The sys_tick variable specifies the system clock tick interval in
+ * seconds, for stepping clocks, defined as those which return times
+ * less than MINSTEP greater than the previous reading. For systems that
+ * use a high-resolution counter such that each clock reading is always
+ * at least MINSTEP greater than the prior, sys_tick is the time to read
+ * the system clock.
*
- * The sys_tick variable secifies the system clock tick interval in
- * seconds. For systems that can interpolate between timer interrupts,
- * the resolution is presumed much less than the time to read the system
- * clock, which is the value of sys_tick after the precision has been
- * determined. For those systems that cannot interpolate between timer
- * interrupts, sys_tick will be much larger in the order of 10 ms, so the
- * fuzz should be that value. For Sunses the tick is not interpolated, but
- * the system clock is derived from a 2-MHz oscillator, so the resolution
- * is 500 ns and sys_tick is 500 ns.
+ * The sys_fuzz variable measures the minimum time to read the system
+ * clock, regardless of its precision. When reading the system clock
+ * using get_systime() after sys_tick and sys_fuzz have been determined,
+ * ntpd ensures each unprocessed clock reading is no less than sys_fuzz
+ * later than the prior unprocessed reading, and then fuzzes the bits
+ * below sys_fuzz in the timestamp returned, ensuring each of its
+ * resulting readings is strictly later than the previous.
+ *
+ * When slewing the system clock using adj_systime() (with the kernel
+ * loop discipline unavailable or disabled), adjtime() offsets are
+ * quantized to sys_tick, if sys_tick is greater than sys_fuzz, which
+ * is to say if the OS presents a stepping clock. Otherwise, offsets
+ * are quantized to the microsecond resolution of adjtime()'s timeval
+ * input. The remaining correction sys_residual is carried into the
+ * next adjtime() and meanwhile is also factored into get_systime()
+ * readings.
*/
-double sys_tick = 0; /* precision (time to read the clock) */
+double sys_tick = 0; /* tick size or time to read (s) */
+double sys_fuzz = 0; /* min. time to read the clock (s) */
+long sys_fuzz_nsec = 0; /* min. time to read the clock (ns) */
+double measured_tick; /* non-overridable sys_tick (s) */
double sys_residual = 0; /* adjustment residue (s) */
+int trunc_os_clock; /* sys_tick > measured_tick */
+time_stepped_callback step_callback;
#ifndef SIM
+/* perlinger@ntp.org: As 'get_sysime()' does it's own check for clock
+ * backstepping, this could probably become a local variable in
+ * 'get_systime()' and the cruft associated with communicating via a
+ * static value could be removed after the v4.2.8 release.
+ */
+static int lamport_violated; /* clock was stepped back */
+#endif /* !SIM */
+
+#ifdef DEBUG
+static int systime_init_done;
+# define DONE_SYSTIME_INIT() systime_init_done = TRUE
+#else
+# define DONE_SYSTIME_INIT() do {} while (FALSE)
+#endif
+
+#ifdef HAVE_SIGNALED_IO
+int using_sigio;
+#endif
+
+#ifdef SYS_WINNT
+CRITICAL_SECTION get_systime_cs;
+#endif
+
+
+void
+set_sys_fuzz(
+ double fuzz_val
+ )
+{
+ sys_fuzz = fuzz_val;
+ INSIST(sys_fuzz >= 0);
+ INSIST(sys_fuzz <= 1.0);
+ sys_fuzz_nsec = (long)(sys_fuzz * 1e9 + 0.5);
+}
+
+
+void
+init_systime(void)
+{
+ INIT_GET_SYSTIME_CRITSEC();
+ INIT_WIN_PRECISE_TIME();
+ DONE_SYSTIME_INIT();
+}
+
+
+#ifndef SIM /* ntpsim.c has get_systime() and friends for sim */
+
+static inline void
+get_ostime(
+ struct timespec * tsp
+ )
+{
+ int rc;
+ long ticks;
+
+#if defined(HAVE_CLOCK_GETTIME)
+ rc = clock_gettime(CLOCK_REALTIME, tsp);
+#elif defined(HAVE_GETCLOCK)
+ rc = getclock(TIMEOFDAY, tsp);
+#else
+ struct timeval tv;
+
+ rc = GETTIMEOFDAY(&tv, NULL);
+ tsp->tv_sec = tv.tv_sec;
+ tsp->tv_nsec = tv.tv_usec * 1000;
+#endif
+ if (rc < 0) {
+ msyslog(LOG_ERR, "read system clock failed: %m (%d)",
+ errno);
+ exit(1);
+ }
+
+ if (trunc_os_clock) {
+ ticks = (long)((tsp->tv_nsec * 1e-9) / sys_tick);
+ tsp->tv_nsec = (long)(ticks * 1e9 * sys_tick);
+ }
+}
+
/*
* get_systime - return system time in NTP timestamp format.
@@ -61,61 +163,110 @@ get_systime(
l_fp *now /* system time */
)
{
- double dtemp;
-
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
+ static struct timespec ts_last; /* last sampled os time */
+ static struct timespec ts_prev; /* prior os time */
+ static l_fp lfp_prev; /* prior result */
+ static double dfuzz_prev; /* prior fuzz */
struct timespec ts; /* seconds and nanoseconds */
+ struct timespec ts_min; /* earliest permissible */
+ struct timespec ts_lam; /* lamport fictional increment */
+ struct timespec ts_prev_log; /* for msyslog only */
+ double dfuzz;
+ double ddelta;
+ l_fp result;
+ l_fp lfpfuzz;
+ l_fp lfpdelta;
+
+ get_ostime(&ts);
+ DEBUG_REQUIRE(systime_init_done);
+ ENTER_GET_SYSTIME_CRITSEC();
+
+ /* First check if here was a Lamport violation, that is, two
+ * successive calls to 'get_ostime()' resulted in negative
+ * time difference. Use a few milliseconds of permissible
+ * tolerance -- being too sharp can hurt here. (This is intented
+ * for the Win32 target, where the HPC interpolation might
+ * introduce small steps backward. It should not be an issue on
+ * systems where get_ostime() results in a true syscall.)
+ */
+ if (cmp_tspec(add_tspec_ns(ts, 50000000), ts_last) < 0)
+ lamport_violated = 1;
+ ts_last = ts;
/*
- * Convert Unix timespec from seconds and nanoseconds to NTP
- * seconds and fraction.
+ * After default_get_precision() has set a nonzero sys_fuzz,
+ * ensure every reading of the OS clock advances by at least
+ * sys_fuzz over the prior reading, thereby assuring each
+ * fuzzed result is strictly later than the prior. Limit the
+ * necessary fiction to 1 second.
*/
-# ifdef HAVE_CLOCK_GETTIME
- clock_gettime(CLOCK_REALTIME, &ts);
-# else
- getclock(TIMEOFDAY, &ts);
-# endif
- now->l_i = (int32)ts.tv_sec + JAN_1970;
- dtemp = 0;
- if (sys_tick > FUZZ)
- dtemp = ntp_random() * 2. / FRAC * sys_tick * 1e9;
- else if (sys_tick > 0)
- dtemp = ntp_random() * 2. / FRAC;
- dtemp = (ts.tv_nsec + dtemp) * 1e-9;
- if (dtemp >= 1.) {
- dtemp -= 1.;
- now->l_i++;
- } else if (dtemp < 0) {
- dtemp += 1.;
- now->l_i--;
+ if (!USING_SIGIO()) {
+ ts_min = add_tspec_ns(ts_prev, sys_fuzz_nsec);
+ if (cmp_tspec(ts, ts_min) < 0) {
+ ts_lam = sub_tspec(ts_min, ts);
+ if (ts_lam.tv_sec > 0 && !lamport_violated) {
+ msyslog(LOG_ERR,
+ "get_systime Lamport advance exceeds one second (%.9f)",
+ ts_lam.tv_sec +
+ 1e-9 * ts_lam.tv_nsec);
+ exit(1);
+ }
+ if (!lamport_violated)
+ ts = ts_min;
+ }
+ ts_prev_log = ts_prev;
+ ts_prev = ts;
+ } else {
+ /*
+ * Quiet "ts_prev_log.tv_sec may be used uninitialized"
+ * warning from x86 gcc 4.5.2.
+ */
+ ZERO(ts_prev_log);
}
- now->l_uf = (u_int32)(dtemp * FRAC);
-#else /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
- struct timeval tv; /* seconds and microseconds */
+ /* convert from timespec to l_fp fixed-point */
+ result = tspec_stamp_to_lfp(ts);
/*
- * Convert Unix timeval from seconds and microseconds to NTP
- * seconds and fraction.
+ * Add in the fuzz.
*/
- GETTIMEOFDAY(&tv, NULL);
- now->l_i = tv.tv_sec + JAN_1970;
- dtemp = 0;
- if (sys_tick > FUZZ)
- dtemp = ntp_random() * 2. / FRAC * sys_tick * 1e6;
- else if (sys_tick > 0)
- dtemp = ntp_random() * 2. / FRAC;
- dtemp = (tv.tv_usec + dtemp) * 1e-6;
- if (dtemp >= 1.) {
- dtemp -= 1.;
- now->l_i++;
- } else if (dtemp < 0) {
- dtemp += 1.;
- now->l_i--;
- }
- now->l_uf = (u_int32)(dtemp * FRAC);
+ dfuzz = ntp_random() * 2. / FRAC * sys_fuzz;
+ DTOLFP(dfuzz, &lfpfuzz);
+ L_ADD(&result, &lfpfuzz);
-#endif /* HAVE_CLOCK_GETTIME || HAVE_GETCLOCK */
+ /*
+ * Ensure result is strictly greater than prior result (ignoring
+ * sys_residual's effect for now) once sys_fuzz has been
+ * determined.
+ */
+ if (!USING_SIGIO()) {
+ if (!L_ISZERO(&lfp_prev) && !lamport_violated) {
+ if (!L_ISGTU(&result, &lfp_prev) &&
+ sys_fuzz > 0.) {
+ msyslog(LOG_ERR, "ts_prev %s ts_min %s",
+ tspectoa(ts_prev_log),
+ tspectoa(ts_min));
+ msyslog(LOG_ERR, "ts %s", tspectoa(ts));
+ msyslog(LOG_ERR, "sys_fuzz %ld nsec, prior fuzz %.9f",
+ sys_fuzz_nsec, dfuzz_prev);
+ msyslog(LOG_ERR, "this fuzz %.9f",
+ dfuzz);
+ lfpdelta = lfp_prev;
+ L_SUB(&lfpdelta, &result);
+ LFPTOD(&lfpdelta, ddelta);
+ msyslog(LOG_ERR,
+ "prev get_systime 0x%x.%08x is %.9f later than 0x%x.%08x",
+ lfp_prev.l_ui, lfp_prev.l_uf,
+ ddelta, result.l_ui, result.l_uf);
+ }
+ }
+ lfp_prev = result;
+ dfuzz_prev = dfuzz;
+ if (lamport_violated)
+ lamport_violated = FALSE;
+ }
+ LEAVE_GET_SYSTIME_CRITSEC();
+ *now = result;
}
@@ -130,11 +281,24 @@ adj_systime(
{
struct timeval adjtv; /* new adjustment */
struct timeval oadjtv; /* residual adjustment */
+ double quant; /* quantize to multiples of */
double dtemp;
long ticks;
int isneg = 0;
/*
+ * The Windows port adj_systime() depends on being called each
+ * second even when there's no additional correction, to allow
+ * emulation of adjtime() behavior on top of an API that simply
+ * sets the current rate. This POSIX implementation needs to
+ * ignore invocations with zero correction, otherwise ongoing
+ * EVNT_NSET adjtime() can be aborted by a tiny adjtime()
+ * triggered by sys_residual.
+ */
+ if (0. == now)
+ return TRUE;
+
+ /*
* 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
@@ -147,8 +311,12 @@ adj_systime(
}
adjtv.tv_sec = (long)dtemp;
dtemp -= adjtv.tv_sec;
- ticks = (long)(dtemp / sys_tick + .5);
- adjtv.tv_usec = (long)(ticks * sys_tick * 1e6);
+ if (sys_tick > sys_fuzz)
+ quant = sys_tick;
+ else
+ quant = 1e-6;
+ ticks = (long)(dtemp / quant + .5);
+ adjtv.tv_usec = (long)(ticks * quant * 1e6);
dtemp -= adjtv.tv_usec / 1e6;
sys_residual = dtemp;
@@ -165,10 +333,10 @@ adj_systime(
if (adjtv.tv_sec != 0 || adjtv.tv_usec != 0) {
if (adjtime(&adjtv, &oadjtv) < 0) {
msyslog(LOG_ERR, "adj_systime: %m");
- return (0);
+ return FALSE;
}
}
- return (1);
+ return TRUE;
}
#endif
@@ -176,68 +344,90 @@ adj_systime(
/*
* step_systime - step the system clock.
*/
+
int
step_systime(
- double now
+ double step
)
{
- struct timeval timetv, adjtv, oldtimetv;
- int isneg = 0;
- double dtemp;
-#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_GETCLOCK)
- struct timespec ts;
-#endif
+ time_t pivot; /* for ntp era unfolding */
+ struct timeval timetv, tvlast, tvdiff;
+ struct timespec timets;
+ struct calendar jd;
+ l_fp fp_ofs, fp_sys; /* offset and target system time in FP */
- 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);
+ /*
+ * Get pivot time for NTP era unfolding. Since we don't step
+ * very often, we can afford to do the whole calculation from
+ * scratch. And we're not in the time-critical path yet.
+ */
+#if SIZEOF_TIME_T > 4
+ /*
+ * This code makes sure the resulting time stamp for the new
+ * system time is in the 2^32 seconds starting at 1970-01-01,
+ * 00:00:00 UTC.
+ */
+ pivot = 0x80000000;
+#if USE_COMPILETIME_PIVOT
+ /*
+ * Add the compile time minus 10 years to get a possible target
+ * area of (compile time - 10 years) to (compile time + 126
+ * years). This should be sufficient for a given binary of
+ * NTPD.
+ */
+ if (ntpcal_get_build_date(&jd)) {
+ jd.year -= 10;
+ pivot += ntpcal_date_to_time(&jd);
} else {
- adjtv.tv_sec = (int32)dtemp;
- adjtv.tv_usec = (u_int32)((dtemp -
- (double)adjtv.tv_sec) * 1e6 + .5);
+ msyslog(LOG_ERR,
+ "step-systime: assume 1970-01-01 as build date");
}
-#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);
+#else
+ UNUSED_LOCAL(jd);
+#endif /* USE_COMPILETIME_PIVOT */
+#else
+ UNUSED_LOCAL(jd);
+ /* This makes sure the resulting time stamp is on or after
+ * 1969-12-31/23:59:59 UTC and gives us additional two years,
+ * from the change of NTP era in 2036 to the UNIX rollover in
+ * 2038. (Minus one second, but that won't hurt.) We *really*
+ * need a longer 'time_t' after that! Or a different baseline,
+ * but that would cause other serious trouble, too.
+ */
+ pivot = 0x7FFFFFFF;
#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;
- }
- }
+
+ /* get the complete jump distance as l_fp */
+ DTOLFP(sys_residual, &fp_sys);
+ DTOLFP(step, &fp_ofs);
+ L_ADD(&fp_ofs, &fp_sys);
+
+ /* ---> time-critical path starts ---> */
+
+ /* get the current time as l_fp (without fuzz) and as struct timeval */
+ get_ostime(&timets);
+ fp_sys = tspec_stamp_to_lfp(timets);
+ tvlast.tv_sec = timets.tv_sec;
+ tvlast.tv_usec = (timets.tv_nsec + 500) / 1000;
+
+ /* get the target time as l_fp */
+ L_ADD(&fp_sys, &fp_ofs);
+
+ /* unfold the new system time */
+ timetv = lfp_stamp_to_tval(fp_sys, &pivot);
+
+ /* now set new system time */
if (ntp_set_tod(&timetv, NULL) != 0) {
msyslog(LOG_ERR, "step-systime: %m");
- return (0);
+ return FALSE;
}
+
+ /* <--- time-critical path ended with 'ntp_set_tod()' <--- */
+
sys_residual = 0;
+ lamport_violated = (step < 0);
+ if (step_callback)
+ (*step_callback)();
#ifdef NEED_HPUX_ADJTIME
/*
@@ -267,8 +457,8 @@ step_systime(
*
* This might become even Uglier...
*/
- if (oldtimetv.tv_sec != timetv.tv_sec)
- {
+ tvdiff = abs_tval(sub_tval(timetv, tvlast));
+ if (tvdiff.tv_sec > 0) {
#ifdef HAVE_UTMP_H
struct utmp ut;
#endif
@@ -277,24 +467,29 @@ step_systime(
#endif
#ifdef HAVE_UTMP_H
- memset((char *)&ut, 0, sizeof(ut));
+ ZERO(ut);
#endif
#ifdef HAVE_UTMPX_H
- memset((char *)&utx, 0, sizeof(utx));
+ ZERO(utx);
#endif
/* UTMP */
#ifdef UPDATE_UTMP
# ifdef HAVE_PUTUTLINE
+# ifndef _PATH_UTMP
+# define _PATH_UTMP UTMP_FILE
+# endif
+ utmpname(_PATH_UTMP);
ut.ut_type = OLD_TIME;
- (void)strcpy(ut.ut_line, OTIME_MSG);
- ut.ut_time = oldtimetv.tv_sec;
- pututline(&ut);
+ strlcpy(ut.ut_line, OTIME_MSG, sizeof(ut.ut_line));
+ ut.ut_time = tvlast.tv_sec;
setutent();
+ pututline(&ut);
ut.ut_type = NEW_TIME;
- (void)strcpy(ut.ut_line, NTIME_MSG);
+ strlcpy(ut.ut_line, NTIME_MSG, sizeof(ut.ut_line));
ut.ut_time = timetv.tv_sec;
+ setutent();
pututline(&ut);
endutent();
# else /* not HAVE_PUTUTLINE */
@@ -306,13 +501,14 @@ step_systime(
#ifdef UPDATE_UTMPX
# ifdef HAVE_PUTUTXLINE
utx.ut_type = OLD_TIME;
- (void)strcpy(utx.ut_line, OTIME_MSG);
- utx.ut_tv = oldtimetv;
- pututxline(&utx);
+ strlcpy(utx.ut_line, OTIME_MSG, sizeof(utx.ut_line));
+ utx.ut_tv = tvlast;
setutxent();
+ pututxline(&utx);
utx.ut_type = NEW_TIME;
- (void)strcpy(utx.ut_line, NTIME_MSG);
+ strlcpy(utx.ut_line, NTIME_MSG, sizeof(utx.ut_line));
utx.ut_tv = timetv;
+ setutxent();
pututxline(&utx);
endutxent();
# else /* not HAVE_PUTUTXLINE */
@@ -323,14 +519,19 @@ step_systime(
#ifdef UPDATE_WTMP
# ifdef HAVE_PUTUTLINE
- utmpname(WTMP_FILE);
+# ifndef _PATH_WTMP
+# define _PATH_WTMP WTMP_FILE
+# endif
+ utmpname(_PATH_WTMP);
ut.ut_type = OLD_TIME;
- (void)strcpy(ut.ut_line, OTIME_MSG);
- ut.ut_time = oldtimetv.tv_sec;
+ strlcpy(ut.ut_line, OTIME_MSG, sizeof(ut.ut_line));
+ ut.ut_time = tvlast.tv_sec;
+ setutent();
pututline(&ut);
ut.ut_type = NEW_TIME;
- (void)strcpy(ut.ut_line, NTIME_MSG);
+ strlcpy(ut.ut_line, NTIME_MSG, sizeof(ut.ut_line));
ut.ut_time = timetv.tv_sec;
+ setutent();
pututline(&ut);
endutent();
# else /* not HAVE_PUTUTLINE */
@@ -342,8 +543,8 @@ step_systime(
#ifdef UPDATE_WTMPX
# ifdef HAVE_PUTUTXLINE
utx.ut_type = OLD_TIME;
- utx.ut_tv = oldtimetv;
- (void)strcpy(utx.ut_line, OTIME_MSG);
+ utx.ut_tv = tvlast;
+ strlcpy(utx.ut_line, OTIME_MSG, sizeof(utx.ut_line));
# ifdef HAVE_UPDWTMPX
updwtmpx(WTMPX_FILE, &utx);
# else /* not HAVE_UPDWTMPX */
@@ -353,7 +554,7 @@ step_systime(
# ifdef HAVE_PUTUTXLINE
utx.ut_type = NEW_TIME;
utx.ut_tv = timetv;
- (void)strcpy(utx.ut_line, NTIME_MSG);
+ strlcpy(utx.ut_line, NTIME_MSG, sizeof(utx.ut_line));
# ifdef HAVE_UPDWTMPX
updwtmpx(WTMPX_FILE, &utx);
# else /* not HAVE_UPDWTMPX */
@@ -363,18 +564,7 @@ step_systime(
#endif /* UPDATE_WTMPX */
}
- return (1);
+ return TRUE;
}
-#else /* SIM */
-/*
- * Clock routines for the simulator - Harish Nair, with help
- */
-
-
-/* SK:
- * The code that used to be here has been moved to ntpsim.c,
- * where, IMHO, it rightfully belonged.
- */
-
-#endif
+#endif /* !SIM */
diff --git a/libntp/timetoa.c b/libntp/timetoa.c
new file mode 100644
index 000000000000..c04d34ea0639
--- /dev/null
+++ b/libntp/timetoa.c
@@ -0,0 +1,109 @@
+/*
+ * timetoa.c -- time_t related string formatting
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * Printing a 'time_t' has a lot of portability pitfalls, due to it's
+ * opaque base type. The only requirement imposed by the standard is
+ * that it must be a numeric type. For all practical purposes it's a
+ * signed int, and 32 bits are common.
+ *
+ * Since the UN*X time epoch will cause a signed integer overflow for
+ * 32-bit signed int in the year 2038, implementations slowly move to
+ * 64bit base types for time_t, even in 32-bit environments.
+ *
+ * As the printf() family has no standardised type specifier for time_t,
+ * guessing the right output format specifier is a bit troublesome and
+ * best done with the help of the preprocessor and "config.h".
+ */
+
+#include "config.h"
+
+#include <math.h>
+#include <stdio.h>
+
+#include "timetoa.h"
+#include "ntp_assert.h"
+#include "lib_strbuf.h"
+
+/*
+ * Formatting to string needs at max 40 bytes (even with 64 bit time_t),
+ * so we check LIB_BUFLENGTH is big enough for our purpose.
+ */
+#if LIB_BUFLENGTH < 40
+# include "GRONK: LIB_BUFLENGTH is not sufficient"
+#endif
+
+/*
+ * general fractional timestamp formatting
+ *
+ * Many pieces of ntpd require a machine with two's complement
+ * representation of signed integers, so we don't go through the whole
+ * rigamarole of creating fully portable code here. But we have to stay
+ * away from signed integer overflow, as this might cause trouble even
+ * with two's complement representation.
+ */
+const char *
+format_time_fraction(
+ time_t secs,
+ long frac,
+ int prec
+ )
+{
+ char * cp;
+ u_int prec_u;
+ u_time secs_u;
+ u_int u;
+ long fraclimit;
+ int notneg; /* flag for non-negative value */
+ const char * fmt;
+ ldiv_t qr;
+
+ DEBUG_REQUIRE(prec != 0);
+
+ LIB_GETBUF(cp);
+ secs_u = (u_time)secs;
+ fmt = "-%" UTIME_FORMAT ".%0*ld";
+
+ /* check if we need signed or unsigned mode */
+ notneg = (prec < 0);
+ prec_u = abs(prec);
+ /* fraclimit = (long)pow(10, prec_u); */
+ for (fraclimit = 10, u = 1; u < prec_u; u++) {
+ DEBUG_INSIST(fraclimit < fraclimit * 10);
+ fraclimit *= 10;
+ }
+
+ /*
+ * Since conversion to string uses lots of divisions anyway,
+ * there's no big extra penalty for normalisation. We do it for
+ * consistency.
+ */
+ if (frac < 0 || frac >= fraclimit) {
+ qr = ldiv(frac, fraclimit);
+ if (qr.rem < 0) {
+ qr.quot--;
+ qr.rem += fraclimit;
+ }
+ secs_u += (time_t)qr.quot;
+ frac = qr.rem;
+ }
+
+ /* Get the absolute value of the split representation time. */
+ notneg = notneg || ((time_t)secs_u >= 0);
+ if (notneg) {
+ fmt++; /* skip '-' */
+ } else {
+ secs_u = ~secs_u;
+ if (0 == frac)
+ secs_u++;
+ else
+ frac = fraclimit - frac;
+ }
+
+ /* finally format the data and return the result */
+ snprintf(cp, LIB_BUFLENGTH, fmt, secs_u, prec_u, frac);
+
+ return cp;
+}
diff --git a/libntp/timevalops.c b/libntp/timevalops.c
new file mode 100644
index 000000000000..55f7bb57312b
--- /dev/null
+++ b/libntp/timevalops.c
@@ -0,0 +1,297 @@
+/*
+ * timevalops.c -- calculations on 'struct timeval' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ */
+
+#include <config.h>
+
+#include "timevalops.h"
+
+#ifdef USE_TSF_USEC_TABLES
+/*
+ * 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.
+ */
+
+const u_int32 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, 0x0007032a,
+ 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,
+ 0x000b0293, 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, 0x000f01fc, 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
+};
+
+const u_int32 ustotsmid[256] = {
+ 0x00000000, 0x0010c6f8, 0x00218def, 0x003254e7,
+ 0x00431bdf, 0x0053e2d6, 0x0064a9ce, 0x007570c5,
+ 0x008637bd, 0x0096feb5, 0x00a7c5ac, 0x00b88ca4,
+ 0x00c9539c, 0x00da1a93, 0x00eae18b, 0x00fba882,
+ 0x010c6f7a, 0x011d3672, 0x012dfd69, 0x013ec461,
+ 0x014f8b59, 0x01605250, 0x01711948, 0x0181e03f,
+ 0x0192a737, 0x01a36e2f, 0x01b43526, 0x01c4fc1e,
+ 0x01d5c316, 0x01e68a0d, 0x01f75105, 0x020817fc,
+ 0x0218def4, 0x0229a5ec, 0x023a6ce3, 0x024b33db,
+ 0x025bfad3, 0x026cc1ca, 0x027d88c2, 0x028e4fb9,
+ 0x029f16b1, 0x02afdda9, 0x02c0a4a0, 0x02d16b98,
+ 0x02e23290, 0x02f2f987, 0x0303c07f, 0x03148777,
+ 0x03254e6e, 0x03361566, 0x0346dc5d, 0x0357a355,
+ 0x03686a4d, 0x03793144, 0x0389f83c, 0x039abf34,
+ 0x03ab862b, 0x03bc4d23, 0x03cd141a, 0x03dddb12,
+ 0x03eea20a, 0x03ff6901, 0x04102ff9, 0x0420f6f1,
+ 0x0431bde8, 0x044284e0, 0x04534bd7, 0x046412cf,
+ 0x0474d9c7, 0x0485a0be, 0x049667b6, 0x04a72eae,
+ 0x04b7f5a5, 0x04c8bc9d, 0x04d98394, 0x04ea4a8c,
+ 0x04fb1184, 0x050bd87b, 0x051c9f73, 0x052d666b,
+ 0x053e2d62, 0x054ef45a, 0x055fbb51, 0x05708249,
+ 0x05814941, 0x05921038, 0x05a2d730, 0x05b39e28,
+ 0x05c4651f, 0x05d52c17, 0x05e5f30e, 0x05f6ba06,
+ 0x060780fe, 0x061847f5, 0x06290eed, 0x0639d5e5,
+ 0x064a9cdc, 0x065b63d4, 0x066c2acc, 0x067cf1c3,
+ 0x068db8bb, 0x069e7fb2, 0x06af46aa, 0x06c00da2,
+ 0x06d0d499, 0x06e19b91, 0x06f26289, 0x07032980,
+ 0x0713f078, 0x0724b76f, 0x07357e67, 0x0746455f,
+ 0x07570c56, 0x0767d34e, 0x07789a46, 0x0789613d,
+ 0x079a2835, 0x07aaef2c, 0x07bbb624, 0x07cc7d1c,
+ 0x07dd4413, 0x07ee0b0b, 0x07fed203, 0x080f98fa,
+ 0x08205ff2, 0x083126e9, 0x0841ede1, 0x0852b4d9,
+ 0x08637bd0, 0x087442c8, 0x088509c0, 0x0895d0b7,
+ 0x08a697af, 0x08b75ea6, 0x08c8259e, 0x08d8ec96,
+ 0x08e9b38d, 0x08fa7a85, 0x090b417d, 0x091c0874,
+ 0x092ccf6c, 0x093d9664, 0x094e5d5b, 0x095f2453,
+ 0x096feb4a, 0x0980b242, 0x0991793a, 0x09a24031,
+ 0x09b30729, 0x09c3ce21, 0x09d49518, 0x09e55c10,
+ 0x09f62307, 0x0a06e9ff, 0x0a17b0f7, 0x0a2877ee,
+ 0x0a393ee6, 0x0a4a05de, 0x0a5accd5, 0x0a6b93cd,
+ 0x0a7c5ac4, 0x0a8d21bc, 0x0a9de8b4, 0x0aaeafab,
+ 0x0abf76a3, 0x0ad03d9b, 0x0ae10492, 0x0af1cb8a,
+ 0x0b029281, 0x0b135979, 0x0b242071, 0x0b34e768,
+ 0x0b45ae60, 0x0b567558, 0x0b673c4f, 0x0b780347,
+ 0x0b88ca3e, 0x0b999136, 0x0baa582e, 0x0bbb1f25,
+ 0x0bcbe61d, 0x0bdcad15, 0x0bed740c, 0x0bfe3b04,
+ 0x0c0f01fc, 0x0c1fc8f3, 0x0c308feb, 0x0c4156e2,
+ 0x0c521dda, 0x0c62e4d2, 0x0c73abc9, 0x0c8472c1,
+ 0x0c9539b9, 0x0ca600b0, 0x0cb6c7a8, 0x0cc78e9f,
+ 0x0cd85597, 0x0ce91c8f, 0x0cf9e386, 0x0d0aaa7e,
+ 0x0d1b7176, 0x0d2c386d, 0x0d3cff65, 0x0d4dc65c,
+ 0x0d5e8d54, 0x0d6f544c, 0x0d801b43, 0x0d90e23b,
+ 0x0da1a933, 0x0db2702a, 0x0dc33722, 0x0dd3fe19,
+ 0x0de4c511, 0x0df58c09, 0x0e065300, 0x0e1719f8,
+ 0x0e27e0f0, 0x0e38a7e7, 0x0e496edf, 0x0e5a35d6,
+ 0x0e6afcce, 0x0e7bc3c6, 0x0e8c8abd, 0x0e9d51b5,
+ 0x0eae18ad, 0x0ebedfa4, 0x0ecfa69c, 0x0ee06d94,
+ 0x0ef1348b, 0x0f01fb83, 0x0f12c27a, 0x0f238972,
+ 0x0f34506a, 0x0f451761, 0x0f55de59, 0x0f66a551,
+ 0x0f776c48, 0x0f883340, 0x0f98fa37, 0x0fa9c12f,
+ 0x0fba8827, 0x0fcb4f1e, 0x0fdc1616, 0x0fecdd0e,
+ 0x0ffda405, 0x100e6afd, 0x101f31f4, 0x102ff8ec,
+ 0x1040bfe4, 0x105186db, 0x10624dd3, 0x107314cb,
+ 0x1083dbc2, 0x1094a2ba, 0x10a569b1, 0x10b630a9
+};
+
+const u_int32 ustotshi[16] = {
+ 0x00000000, 0x10c6f7a1, 0x218def41, 0x3254e6e2,
+ 0x431bde83, 0x53e2d624, 0x64a9cdc4, 0x7570c565,
+ 0x8637bd06, 0x96feb4a6, 0xa7c5ac47, 0xb88ca3e8,
+ 0xc9539b89, 0xda1a9329, 0xeae18aca, 0xfba8826b
+};
+
+/*
+ * 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.
+ */
+
+const u_int32 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
+};
+
+const u_int32 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
+};
+
+const u_int32 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
+};
+#else /* !USE_TSF_USEC_TABLES follows */
+NONEMPTY_TRANSLATION_UNIT
+#endif /* !USE_TSF_USEC_TABLES */
+/* -*- EOF -*- */
diff --git a/libntp/tsftomsu.c b/libntp/tsftomsu.c
deleted file mode 100644
index 5926aabc77a6..000000000000
--- a/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/libntp/tstotv.c b/libntp/tstotv.c
deleted file mode 100644
index be4bdd44155d..000000000000
--- a/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/libntp/tvtots.c b/libntp/tvtots.c
deleted file mode 100644
index 0bd2b6911472..000000000000
--- a/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/libntp/uglydate.c b/libntp/uglydate.c
index b2da9c0a6c39..66b5139096b4 100644
--- a/libntp/uglydate.c
+++ b/libntp/uglydate.c
@@ -2,6 +2,7 @@
* uglydate - convert a time stamp to something barely readable
* The string returned is 37 characters long.
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_fp.h"
diff --git a/libntp/uinttoa.c b/libntp/uinttoa.c
deleted file mode 100644
index ab63926cdc79..000000000000
--- a/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);
- snprintf(buf, LIB_BUFLENGTH, "%lu", uval);
-
- return buf;
-}
diff --git a/libntp/vint64ops.c b/libntp/vint64ops.c
new file mode 100644
index 000000000000..5adbebbb51d4
--- /dev/null
+++ b/libntp/vint64ops.c
@@ -0,0 +1,284 @@
+/*
+ * vint64ops.c - operations on 'vint64' values
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ----------------------------------------------------------------------
+ * This is an attempt to get the vint64 calculations stuff centralised.
+ */
+
+#include <config.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "vint64ops.h"
+
+/* ---------------------------------------------------------------------
+ * GCC is rather sticky with its 'const' attribute. We have to do it more
+ * explicit than with a cast if we want to get rid of a CONST qualifier.
+ * Greetings from the PASCAL world, where casting was only possible via
+ * untagged unions...
+ */
+static inline void*
+noconst(
+ const void* ptr
+ )
+{
+ union {
+ const void * cp;
+ void * vp;
+ } tmp;
+ tmp.cp = ptr;
+ return tmp.vp;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+strtouv64(
+ const char * begp,
+ char ** endp,
+ int base
+ )
+{
+ vint64 res;
+ u_char digit;
+ int sig, num;
+ const u_char *src;
+
+ num = sig = 0;
+ src = (const u_char*)begp;
+ while (isspace(*src))
+ src++;
+
+ if (*src == '-') {
+ src++;
+ sig = 1;
+ } else if (*src == '+') {
+ src++;
+ }
+
+ if (base == 0) {
+ base = 10;
+ if (*src == '0') {
+ base = 8;
+ if (toupper(*++src) == 'X') {
+ src++;
+ base = 16;
+ }
+ }
+ } else if (base == 16) { /* remove optional leading '0x' or '0X' */
+ if (src[0] == '0' && toupper(src[1]) == 'X')
+ src += 2;
+ } else if (base <= 2 || base > 36) {
+ memset(&res, 0xFF, sizeof(res));
+ errno = ERANGE;
+ return res;
+ }
+
+ memset(&res, 0, sizeof(res));
+ while (*src) {
+ if (isdigit(*src))
+ digit = *src - '0';
+ else if (isupper(*src))
+ digit = *src - 'A' + 10;
+ else if (islower(*src))
+ digit = *src - 'a' + 10;
+ else
+ break;
+ if (digit >= base)
+ break;
+ num = 1;
+#if defined(HAVE_INT64)
+ res.Q_s = res.Q_s * base + digit;
+#else
+ /* res *= base, using 16x16->32 bit
+ * multiplication. Slow but portable.
+ */
+ {
+ uint32_t accu;
+ accu = (uint32_t)res.W_s.ll * base;
+ res.W_s.ll = (uint16_t)accu;
+ accu = (accu >> 16)
+ + (uint32_t)res.W_s.lh * base;
+ res.W_s.lh = (uint16_t)accu;
+ /* the upper bits can be done in one step: */
+ res.D_s.hi = res.D_s.hi * base + (accu >> 16);
+ }
+ M_ADD(res.D_s.hi, res.D_s.lo, 0, digit);
+#endif
+ src++;
+ }
+ if (!num)
+ errno = EINVAL;
+ if (endp)
+ *endp = (char*)noconst(src);
+ if (sig)
+ M_NEG(res.D_s.hi, res.D_s.lo);
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+int
+icmpv64(
+ const vint64 * lhs,
+ const vint64 * rhs
+ )
+{
+ int res;
+
+#if defined(HAVE_INT64)
+ res = (lhs->q_s > rhs->q_s)
+ - (lhs->q_s < rhs->q_s);
+#else
+ res = (lhs->d_s.hi > rhs->d_s.hi)
+ - (lhs->d_s.hi < rhs->d_s.hi);
+ if ( ! res )
+ res = (lhs->D_s.lo > rhs->D_s.lo)
+ - (lhs->D_s.lo < rhs->D_s.lo);
+#endif
+
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+int
+ucmpv64(
+ const vint64 * lhs,
+ const vint64 * rhs
+ )
+{
+ int res;
+
+#if defined(HAVE_INT64)
+ res = (lhs->Q_s > rhs->Q_s)
+ - (lhs->Q_s < rhs->Q_s);
+#else
+ res = (lhs->D_s.hi > rhs->D_s.hi)
+ - (lhs->D_s.hi < rhs->D_s.hi);
+ if ( ! res )
+ res = (lhs->D_s.lo > rhs->D_s.lo)
+ - (lhs->D_s.lo < rhs->D_s.lo);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+addv64(
+ const vint64 *lhs,
+ const vint64 *rhs
+ )
+{
+ vint64 res;
+
+#if defined(HAVE_INT64)
+ res.Q_s = lhs->Q_s + rhs->Q_s;
+#else
+ res = *lhs;
+ M_ADD(res.D_s.hi, res.D_s.lo, rhs->D_s.hi, rhs->D_s.lo);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+subv64(
+ const vint64 *lhs,
+ const vint64 *rhs
+ )
+{
+ vint64 res;
+
+#if defined(HAVE_INT64)
+ res.Q_s = lhs->Q_s - rhs->Q_s;
+#else
+ res = *lhs;
+ M_SUB(res.D_s.hi, res.D_s.lo, rhs->D_s.hi, rhs->D_s.lo);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+addv64i32(
+ const vint64 * lhs,
+ int32_t rhs
+ )
+{
+ vint64 res;
+
+ res = *lhs;
+#if defined(HAVE_INT64)
+ res.q_s += rhs;
+#else
+ M_ADD(res.D_s.hi, res.D_s.lo, -(rhs < 0), rhs);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+subv64i32(
+ const vint64 * lhs,
+ int32_t rhs
+ )
+{
+ vint64 res;
+
+ res = *lhs;
+#if defined(HAVE_INT64)
+ res.q_s -= rhs;
+#else
+ M_SUB(res.D_s.hi, res.D_s.lo, -(rhs < 0), rhs);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+addv64u32(
+ const vint64 * lhs,
+ uint32_t rhs
+ )
+{
+ vint64 res;
+
+ res = *lhs;
+#if defined(HAVE_INT64)
+ res.Q_s += rhs;
+#else
+ M_ADD(res.D_s.hi, res.D_s.lo, 0, rhs);
+#endif
+ return res;
+}
+
+/* -------------------------------------------------------------------------*/
+
+vint64
+subv64u32(
+ const vint64 * lhs,
+ uint32_t rhs
+ )
+{
+ vint64 res;
+
+ res = *lhs;
+#if defined(HAVE_INT64)
+ res.Q_s -= rhs;
+#else
+ M_SUB(res.D_s.hi, res.D_s.lo, 0, rhs);
+#endif
+ return res;
+}
diff --git a/libntp/work_fork.c b/libntp/work_fork.c
new file mode 100644
index 000000000000..10329e70be8f
--- /dev/null
+++ b/libntp/work_fork.c
@@ -0,0 +1,526 @@
+/*
+ * work_fork.c - fork implementation for blocking worker child.
+ */
+#include <config.h>
+#include "ntp_workimpl.h"
+
+#ifdef WORK_FORK
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+
+#include "iosignal.h"
+#include "ntp_stdlib.h"
+#include "ntp_malloc.h"
+#include "ntp_syslog.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_assert.h"
+#include "ntp_unixtime.h"
+#include "ntp_worker.h"
+
+/* === variables === */
+ int worker_process;
+ addremove_io_fd_func addremove_io_fd;
+static volatile int worker_sighup_received;
+
+/* === function prototypes === */
+static void fork_blocking_child(blocking_child *);
+static RETSIGTYPE worker_sighup(int);
+static void send_worker_home_atexit(void);
+static void cleanup_after_child(blocking_child *);
+
+/* === functions === */
+/*
+ * exit_worker()
+ *
+ * On some systems _exit() is preferred to exit() for forked children.
+ * For example, http://netbsd.gw.com/cgi-bin/man-cgi?fork++NetBSD-5.0
+ * recommends _exit() to avoid double-flushing C runtime stream buffers
+ * and also to avoid calling the parent's atexit() routines in the
+ * child. On those systems WORKER_CHILD_EXIT is _exit. Since _exit
+ * bypasses CRT cleanup, fflush() files we know might have output
+ * buffered.
+ */
+void
+exit_worker(
+ int exitcode
+ )
+{
+ if (syslog_file != NULL)
+ fflush(syslog_file);
+ fflush(stdout);
+ fflush(stderr);
+ WORKER_CHILD_EXIT (exitcode); /* space before ( required */
+}
+
+
+static RETSIGTYPE
+worker_sighup(
+ int sig
+ )
+{
+ if (SIGHUP == sig)
+ worker_sighup_received = 1;
+}
+
+
+int
+worker_sleep(
+ blocking_child * c,
+ time_t seconds
+ )
+{
+ u_int sleep_remain;
+
+ sleep_remain = (u_int)seconds;
+ do {
+ if (!worker_sighup_received)
+ sleep_remain = sleep(sleep_remain);
+ if (worker_sighup_received) {
+ TRACE(1, ("worker SIGHUP with %us left to sleep",
+ sleep_remain));
+ worker_sighup_received = 0;
+ return -1;
+ }
+ } while (sleep_remain);
+
+ return 0;
+}
+
+
+void
+interrupt_worker_sleep(void)
+{
+ u_int idx;
+ blocking_child * c;
+ int rc;
+
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+
+ if (NULL == c || c->reusable == TRUE)
+ continue;
+
+ rc = kill(c->pid, SIGHUP);
+ if (rc < 0)
+ msyslog(LOG_ERR,
+ "Unable to signal HUP to wake child pid %d: %m",
+ c->pid);
+ }
+}
+
+
+/*
+ * req_child_exit() runs in the parent.
+ */
+int
+req_child_exit(
+ blocking_child * c
+ )
+{
+ if (-1 != c->req_write_pipe) {
+ close(c->req_write_pipe);
+ c->req_write_pipe = -1;
+ return 0;
+ }
+ return -1;
+}
+
+
+/*
+ * cleanup_after_child() runs in parent.
+ */
+static void
+cleanup_after_child(
+ blocking_child * c
+ )
+{
+ if (-1 != c->req_write_pipe) {
+ close(c->req_write_pipe);
+ c->req_write_pipe = -1;
+ }
+ if (-1 != c->resp_read_pipe) {
+ (*addremove_io_fd)(c->resp_read_pipe, c->ispipe, TRUE);
+ close(c->resp_read_pipe);
+ c->resp_read_pipe = -1;
+ }
+ c->pid = 0;
+ c->resp_read_ctx = NULL;
+ DEBUG_INSIST(-1 == c->req_read_pipe);
+ DEBUG_INSIST(-1 == c->resp_write_pipe);
+ c->reusable = TRUE;
+}
+
+
+static void
+send_worker_home_atexit(void)
+{
+ u_int idx;
+ blocking_child * c;
+
+ if (worker_process)
+ return;
+
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c)
+ continue;
+ req_child_exit(c);
+ }
+}
+
+
+int
+send_blocking_req_internal(
+ blocking_child * c,
+ blocking_pipe_header * hdr,
+ void * data
+ )
+{
+ int octets;
+ int rc;
+
+ DEBUG_REQUIRE(hdr != NULL);
+ DEBUG_REQUIRE(data != NULL);
+ DEBUG_REQUIRE(BLOCKING_REQ_MAGIC == hdr->magic_sig);
+
+ if (-1 == c->req_write_pipe) {
+ fork_blocking_child(c);
+ DEBUG_INSIST(-1 != c->req_write_pipe);
+ }
+
+ octets = sizeof(*hdr);
+ rc = write(c->req_write_pipe, hdr, octets);
+
+ if (rc == octets) {
+ octets = hdr->octets - sizeof(*hdr);
+ rc = write(c->req_write_pipe, data, octets);
+
+ if (rc == octets)
+ return 0;
+ }
+
+ if (rc < 0)
+ msyslog(LOG_ERR,
+ "send_blocking_req_internal: pipe write: %m");
+ else
+ msyslog(LOG_ERR,
+ "send_blocking_req_internal: short write %d of %d",
+ rc, octets);
+
+ exit(1); /* otherwise would be return -1 */
+}
+
+
+blocking_pipe_header *
+receive_blocking_req_internal(
+ blocking_child * c
+ )
+{
+ blocking_pipe_header hdr;
+ blocking_pipe_header * req;
+ int rc;
+ long octets;
+
+ DEBUG_REQUIRE(-1 != c->req_read_pipe);
+
+ req = NULL;
+
+ do {
+ rc = read(c->req_read_pipe, &hdr, sizeof(hdr));
+ } while (rc < 0 && EINTR == errno);
+
+ if (rc < 0) {
+ msyslog(LOG_ERR,
+ "receive_blocking_req_internal: pipe read %m");
+ } else if (0 == rc) {
+ TRACE(4, ("parent closed request pipe, child %d terminating\n",
+ c->pid));
+ } else if (rc != sizeof(hdr)) {
+ msyslog(LOG_ERR,
+ "receive_blocking_req_internal: short header read %d of %lu",
+ rc, (u_long)sizeof(hdr));
+ } else {
+ INSIST(sizeof(hdr) < hdr.octets && hdr.octets < 4 * 1024);
+ req = emalloc(hdr.octets);
+ memcpy(req, &hdr, sizeof(*req));
+ octets = hdr.octets - sizeof(hdr);
+ rc = read(c->req_read_pipe, (char *)req + sizeof(*req),
+ octets);
+
+ if (rc < 0)
+ msyslog(LOG_ERR,
+ "receive_blocking_req_internal: pipe data read %m");
+ else if (rc != octets)
+ msyslog(LOG_ERR,
+ "receive_blocking_req_internal: short read %d of %ld",
+ rc, octets);
+ else if (BLOCKING_REQ_MAGIC != req->magic_sig)
+ msyslog(LOG_ERR,
+ "receive_blocking_req_internal: packet header mismatch (0x%x)",
+ req->magic_sig);
+ else
+ return req;
+ }
+
+ if (req != NULL)
+ free(req);
+
+ return NULL;
+}
+
+
+int
+send_blocking_resp_internal(
+ blocking_child * c,
+ blocking_pipe_header * resp
+ )
+{
+ long octets;
+ int rc;
+
+ DEBUG_REQUIRE(-1 != c->resp_write_pipe);
+
+ octets = resp->octets;
+ rc = write(c->resp_write_pipe, resp, octets);
+ free(resp);
+
+ if (octets == rc)
+ return 0;
+
+ if (rc < 0)
+ TRACE(1, ("send_blocking_resp_internal: pipe write %m\n"));
+ else
+ TRACE(1, ("send_blocking_resp_internal: short write %d of %ld\n",
+ rc, octets));
+
+ return -1;
+}
+
+
+blocking_pipe_header *
+receive_blocking_resp_internal(
+ blocking_child * c
+ )
+{
+ blocking_pipe_header hdr;
+ blocking_pipe_header * resp;
+ int rc;
+ long octets;
+
+ DEBUG_REQUIRE(c->resp_read_pipe != -1);
+
+ resp = NULL;
+ rc = read(c->resp_read_pipe, &hdr, sizeof(hdr));
+
+ if (rc < 0) {
+ TRACE(1, ("receive_blocking_resp_internal: pipe read %m\n"));
+ } else if (0 == rc) {
+ /* this is the normal child exited indication */
+ } else if (rc != sizeof(hdr)) {
+ TRACE(1, ("receive_blocking_resp_internal: short header read %d of %lu\n",
+ rc, (u_long)sizeof(hdr)));
+ } else if (BLOCKING_RESP_MAGIC != hdr.magic_sig) {
+ TRACE(1, ("receive_blocking_resp_internal: header mismatch (0x%x)\n",
+ hdr.magic_sig));
+ } else {
+ INSIST(sizeof(hdr) < hdr.octets &&
+ hdr.octets < 16 * 1024);
+ resp = emalloc(hdr.octets);
+ memcpy(resp, &hdr, sizeof(*resp));
+ octets = hdr.octets - sizeof(hdr);
+ rc = read(c->resp_read_pipe,
+ (char *)resp + sizeof(*resp),
+ octets);
+
+ if (rc < 0)
+ TRACE(1, ("receive_blocking_resp_internal: pipe data read %m\n"));
+ else if (rc < octets)
+ TRACE(1, ("receive_blocking_resp_internal: short read %d of %ld\n",
+ rc, octets));
+ else
+ return resp;
+ }
+
+ cleanup_after_child(c);
+
+ if (resp != NULL)
+ free(resp);
+
+ return NULL;
+}
+
+
+#if defined(HAVE_DROPROOT) && defined(WORK_FORK)
+void
+fork_deferred_worker(void)
+{
+ u_int idx;
+ blocking_child * c;
+
+ REQUIRE(droproot && root_dropped);
+
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c)
+ continue;
+ if (-1 != c->req_write_pipe && 0 == c->pid)
+ fork_blocking_child(c);
+ }
+}
+#endif
+
+
+static void
+fork_blocking_child(
+ blocking_child * c
+ )
+{
+ static int atexit_installed;
+ static int blocking_pipes[4] = { -1, -1, -1, -1 };
+ int rc;
+ int was_pipe;
+ int is_pipe;
+ int saved_errno;
+ int childpid;
+ int keep_fd;
+ int fd;
+
+ /*
+ * parent and child communicate via a pair of pipes.
+ *
+ * 0 child read request
+ * 1 parent write request
+ * 2 parent read response
+ * 3 child write response
+ */
+ if (-1 == c->req_write_pipe) {
+ rc = pipe_socketpair(&blocking_pipes[0], &was_pipe);
+ if (0 != rc) {
+ saved_errno = errno;
+ } else {
+ rc = pipe_socketpair(&blocking_pipes[2], &is_pipe);
+ if (0 != rc) {
+ saved_errno = errno;
+ close(blocking_pipes[0]);
+ close(blocking_pipes[1]);
+ } else {
+ INSIST(was_pipe == is_pipe);
+ }
+ }
+ if (0 != rc) {
+ errno = saved_errno;
+ msyslog(LOG_ERR, "unable to create worker pipes: %m");
+ exit(1);
+ }
+
+ /*
+ * Move the descriptors the parent will keep open out of the
+ * low descriptors preferred by C runtime buffered FILE *.
+ */
+ c->req_write_pipe = move_fd(blocking_pipes[1]);
+ c->resp_read_pipe = move_fd(blocking_pipes[2]);
+ /*
+ * wake any worker child on orderly shutdown of the
+ * daemon so that it can notice the broken pipes and
+ * go away promptly.
+ */
+ if (!atexit_installed) {
+ atexit(&send_worker_home_atexit);
+ atexit_installed = TRUE;
+ }
+ }
+
+#ifdef HAVE_DROPROOT
+ /* defer the fork until after root is dropped */
+ if (droproot && !root_dropped)
+ return;
+#endif
+ if (syslog_file != NULL)
+ fflush(syslog_file);
+ fflush(stdout);
+ fflush(stderr);
+
+ signal_no_reset(SIGCHLD, SIG_IGN);
+
+ childpid = fork();
+ if (-1 == childpid) {
+ msyslog(LOG_ERR, "unable to fork worker: %m");
+ exit(1);
+ }
+
+ if (childpid) {
+ /* this is the parent */
+ TRACE(1, ("forked worker child (pid %d)\n", childpid));
+ c->pid = childpid;
+ c->ispipe = is_pipe;
+
+ /* close the child's pipe descriptors. */
+ close(blocking_pipes[0]);
+ close(blocking_pipes[3]);
+
+ memset(blocking_pipes, -1, sizeof(blocking_pipes));
+
+ /* wire into I/O loop */
+ (*addremove_io_fd)(c->resp_read_pipe, is_pipe, FALSE);
+
+ return; /* parent returns */
+ }
+
+ /*
+ * The parent gets the child pid as the return value of fork().
+ * The child must work for it.
+ */
+ c->pid = getpid();
+ worker_process = TRUE;
+
+ /*
+ * In the child, close all files except stdin, stdout, stderr,
+ * and the two child ends of the pipes.
+ */
+ DEBUG_INSIST(-1 == c->req_read_pipe);
+ DEBUG_INSIST(-1 == c->resp_write_pipe);
+ c->req_read_pipe = blocking_pipes[0];
+ c->resp_write_pipe = blocking_pipes[3];
+
+ kill_asyncio(0);
+ closelog();
+ if (syslog_file != NULL) {
+ fclose(syslog_file);
+ syslog_file = NULL;
+ syslogit = TRUE;
+ }
+ keep_fd = max(c->req_read_pipe, c->resp_write_pipe);
+ for (fd = 3; fd < keep_fd; fd++)
+ if (fd != c->req_read_pipe &&
+ fd != c->resp_write_pipe)
+ close(fd);
+ close_all_beyond(keep_fd);
+ /*
+ * We get signals from refclock serial I/O on NetBSD in the
+ * worker if we do not reset SIGIO's handler to the default.
+ * It is not conditionalized for NetBSD alone because on
+ * systems where it is not needed, it is harmless, and that
+ * allows us to handle unknown others with NetBSD behavior.
+ * [Bug 1386]
+ */
+#if defined(USE_SIGIO)
+ signal_no_reset(SIGIO, SIG_DFL);
+#elif defined(USE_SIGPOLL)
+ signal_no_reset(SIGPOLL, SIG_DFL);
+#endif
+ signal_no_reset(SIGHUP, worker_sighup);
+ init_logging("ntp_intres", 0, FALSE);
+ setup_logfile(NULL);
+
+ /*
+ * And now back to the portable code
+ */
+ exit_worker(blocking_child_common(c));
+}
+
+
+#else /* !WORK_FORK follows */
+char work_fork_nonempty_compilation_unit;
+#endif
diff --git a/libntp/work_thread.c b/libntp/work_thread.c
new file mode 100644
index 000000000000..38d87470f01a
--- /dev/null
+++ b/libntp/work_thread.c
@@ -0,0 +1,726 @@
+/*
+ * work_thread.c - threads implementation for blocking worker child.
+ */
+#include <config.h>
+#include "ntp_workimpl.h"
+
+#ifdef WORK_THREAD
+
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+#ifndef SYS_WINNT
+#include <pthread.h>
+#endif
+
+#include "ntp_stdlib.h"
+#include "ntp_malloc.h"
+#include "ntp_syslog.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_assert.h"
+#include "ntp_unixtime.h"
+#include "timespecops.h"
+#include "ntp_worker.h"
+
+#define CHILD_EXIT_REQ ((blocking_pipe_header *)(intptr_t)-1)
+#define CHILD_GONE_RESP CHILD_EXIT_REQ
+#define WORKITEMS_ALLOC_INC 16
+#define RESPONSES_ALLOC_INC 4
+
+#ifndef THREAD_MINSTACKSIZE
+#define THREAD_MINSTACKSIZE (64U * 1024)
+#endif
+
+#ifndef DEVOLATILE
+#define DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var))
+#endif
+
+#ifdef SYS_WINNT
+# define thread_exit(c) _endthreadex(c)
+# define tickle_sem SetEvent
+#else
+# define thread_exit(c) pthread_exit((void*)(size_t)(c))
+# define tickle_sem sem_post
+#endif
+
+#ifdef WORK_PIPE
+addremove_io_fd_func addremove_io_fd;
+#else
+addremove_io_semaphore_func addremove_io_semaphore;
+#endif
+
+static void start_blocking_thread(blocking_child *);
+static void start_blocking_thread_internal(blocking_child *);
+static void prepare_child_sems(blocking_child *);
+static int wait_for_sem(sem_ref, struct timespec *);
+static void ensure_workitems_empty_slot(blocking_child *);
+static void ensure_workresp_empty_slot(blocking_child *);
+static int queue_req_pointer(blocking_child *, blocking_pipe_header *);
+static void cleanup_after_child(blocking_child *);
+#ifdef SYS_WINNT
+u_int WINAPI blocking_thread(void *);
+#else
+void * blocking_thread(void *);
+#endif
+#ifndef SYS_WINNT
+static void block_thread_signals(sigset_t *);
+#endif
+
+
+void
+exit_worker(
+ int exitcode
+ )
+{
+ thread_exit(exitcode); /* see #define thread_exit */
+}
+
+
+int
+worker_sleep(
+ blocking_child * c,
+ time_t seconds
+ )
+{
+ struct timespec until;
+ int rc;
+
+# ifdef HAVE_CLOCK_GETTIME
+ if (0 != clock_gettime(CLOCK_REALTIME, &until)) {
+ msyslog(LOG_ERR, "worker_sleep: clock_gettime() failed: %m");
+ return -1;
+ }
+# else
+ if (0 != getclock(TIMEOFDAY, &until)) {
+ msyslog(LOG_ERR, "worker_sleep: getclock() failed: %m");
+ return -1;
+ }
+# endif
+ until.tv_sec += seconds;
+ do {
+ rc = wait_for_sem(c->wake_scheduled_sleep, &until);
+ } while (-1 == rc && EINTR == errno);
+ if (0 == rc)
+ return -1;
+ if (-1 == rc && ETIMEDOUT == errno)
+ return 0;
+ msyslog(LOG_ERR, "worker_sleep: sem_timedwait: %m");
+ return -1;
+}
+
+
+void
+interrupt_worker_sleep(void)
+{
+ u_int idx;
+ blocking_child * c;
+
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c || NULL == c->wake_scheduled_sleep)
+ continue;
+ tickle_sem(c->wake_scheduled_sleep);
+ }
+}
+
+
+static void
+ensure_workitems_empty_slot(
+ blocking_child *c
+ )
+{
+ const size_t each = sizeof(blocking_children[0]->workitems[0]);
+ size_t new_alloc;
+ size_t old_octets;
+ size_t new_octets;
+ void * nonvol_workitems;
+
+
+ if (c->workitems != NULL &&
+ NULL == c->workitems[c->next_workitem])
+ return;
+
+ new_alloc = c->workitems_alloc + WORKITEMS_ALLOC_INC;
+ old_octets = c->workitems_alloc * each;
+ new_octets = new_alloc * each;
+ nonvol_workitems = DEVOLATILE(void *, c->workitems);
+ c->workitems = erealloc_zero(nonvol_workitems, new_octets,
+ old_octets);
+ if (0 == c->next_workitem)
+ c->next_workitem = c->workitems_alloc;
+ c->workitems_alloc = new_alloc;
+}
+
+
+static void
+ensure_workresp_empty_slot(
+ blocking_child *c
+ )
+{
+ const size_t each = sizeof(blocking_children[0]->responses[0]);
+ size_t new_alloc;
+ size_t old_octets;
+ size_t new_octets;
+ void * nonvol_responses;
+
+ if (c->responses != NULL &&
+ NULL == c->responses[c->next_response])
+ return;
+
+ new_alloc = c->responses_alloc + RESPONSES_ALLOC_INC;
+ old_octets = c->responses_alloc * each;
+ new_octets = new_alloc * each;
+ nonvol_responses = DEVOLATILE(void *, c->responses);
+ c->responses = erealloc_zero(nonvol_responses, new_octets,
+ old_octets);
+ if (0 == c->next_response)
+ c->next_response = c->responses_alloc;
+ c->responses_alloc = new_alloc;
+}
+
+
+/*
+ * queue_req_pointer() - append a work item or idle exit request to
+ * blocking_workitems[].
+ */
+static int
+queue_req_pointer(
+ blocking_child * c,
+ blocking_pipe_header * hdr
+ )
+{
+ c->workitems[c->next_workitem] = hdr;
+ c->next_workitem = (1 + c->next_workitem) % c->workitems_alloc;
+
+ /*
+ * We only want to signal the wakeup event if the child is
+ * blocking on it, which is indicated by setting the blocking
+ * event. Wait with zero timeout to test.
+ */
+ /* !!!! if (WAIT_OBJECT_0 == WaitForSingleObject(c->child_is_blocking, 0)) */
+ tickle_sem(c->blocking_req_ready);
+
+ return 0;
+}
+
+
+int
+send_blocking_req_internal(
+ blocking_child * c,
+ blocking_pipe_header * hdr,
+ void * data
+ )
+{
+ blocking_pipe_header * threadcopy;
+ size_t payload_octets;
+
+ REQUIRE(hdr != NULL);
+ REQUIRE(data != NULL);
+ DEBUG_REQUIRE(BLOCKING_REQ_MAGIC == hdr->magic_sig);
+
+ if (hdr->octets <= sizeof(*hdr))
+ return 1; /* failure */
+ payload_octets = hdr->octets - sizeof(*hdr);
+
+ ensure_workitems_empty_slot(c);
+ if (NULL == c->thread_ref) {
+ ensure_workresp_empty_slot(c);
+ start_blocking_thread(c);
+ }
+
+ threadcopy = emalloc(hdr->octets);
+ memcpy(threadcopy, hdr, sizeof(*hdr));
+ memcpy((char *)threadcopy + sizeof(*hdr), data, payload_octets);
+
+ return queue_req_pointer(c, threadcopy);
+}
+
+
+blocking_pipe_header *
+receive_blocking_req_internal(
+ blocking_child * c
+ )
+{
+ blocking_pipe_header * req;
+ int rc;
+
+ /*
+ * Child blocks here when idle. SysV semaphores maintain a
+ * count and release from sem_wait() only when it reaches 0.
+ * Windows auto-reset events are simpler, and multiple SetEvent
+ * calls before any thread waits result in a single wakeup.
+ * On Windows, the child drains all workitems each wakeup, while
+ * with SysV semaphores wait_sem() is used before each item.
+ */
+#ifdef SYS_WINNT
+ while (NULL == c->workitems[c->next_workeritem]) {
+ /* !!!! SetEvent(c->child_is_blocking); */
+ rc = wait_for_sem(c->blocking_req_ready, NULL);
+ INSIST(0 == rc);
+ /* !!!! ResetEvent(c->child_is_blocking); */
+ }
+#else
+ do {
+ rc = wait_for_sem(c->blocking_req_ready, NULL);
+ } while (-1 == rc && EINTR == errno);
+ INSIST(0 == rc);
+#endif
+
+ req = c->workitems[c->next_workeritem];
+ INSIST(NULL != req);
+ c->workitems[c->next_workeritem] = NULL;
+ c->next_workeritem = (1 + c->next_workeritem) %
+ c->workitems_alloc;
+
+ if (CHILD_EXIT_REQ == req) { /* idled out */
+ send_blocking_resp_internal(c, CHILD_GONE_RESP);
+ req = NULL;
+ }
+
+ return req;
+}
+
+
+int
+send_blocking_resp_internal(
+ blocking_child * c,
+ blocking_pipe_header * resp
+ )
+{
+ ensure_workresp_empty_slot(c);
+
+ c->responses[c->next_response] = resp;
+ c->next_response = (1 + c->next_response) % c->responses_alloc;
+
+#ifdef WORK_PIPE
+ write(c->resp_write_pipe, "", 1);
+#else
+ tickle_sem(c->blocking_response_ready);
+#endif
+
+ return 0;
+}
+
+
+#ifndef WORK_PIPE
+void
+handle_blocking_resp_sem(
+ void * context
+ )
+{
+ HANDLE ready;
+ blocking_child * c;
+ u_int idx;
+
+ ready = (HANDLE)context;
+ c = NULL;
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (c != NULL && c->thread_ref != NULL &&
+ ready == c->blocking_response_ready)
+ break;
+ }
+ if (idx < blocking_children_alloc)
+ process_blocking_resp(c);
+}
+#endif /* !WORK_PIPE */
+
+
+blocking_pipe_header *
+receive_blocking_resp_internal(
+ blocking_child * c
+ )
+{
+ blocking_pipe_header * removed;
+#ifdef WORK_PIPE
+ int rc;
+ char scratch[32];
+
+ do {
+ rc = read(c->resp_read_pipe, scratch, sizeof(scratch));
+ } while (-1 == rc && EINTR == errno);
+#endif
+ removed = c->responses[c->next_workresp];
+ if (NULL != removed) {
+ c->responses[c->next_workresp] = NULL;
+ c->next_workresp = (1 + c->next_workresp) %
+ c->responses_alloc;
+ DEBUG_ENSURE(CHILD_GONE_RESP == removed ||
+ BLOCKING_RESP_MAGIC == removed->magic_sig);
+ }
+ if (CHILD_GONE_RESP == removed) {
+ cleanup_after_child(c);
+ removed = NULL;
+ }
+
+ return removed;
+}
+
+
+static void
+start_blocking_thread(
+ blocking_child * c
+ )
+{
+
+ DEBUG_INSIST(!c->reusable);
+
+ prepare_child_sems(c);
+ start_blocking_thread_internal(c);
+}
+
+
+static void
+start_blocking_thread_internal(
+ blocking_child * c
+ )
+#ifdef SYS_WINNT
+{
+ thr_ref blocking_child_thread;
+ u_int blocking_thread_id;
+ BOOL resumed;
+
+ (*addremove_io_semaphore)(c->blocking_response_ready, FALSE);
+ blocking_child_thread =
+ (HANDLE)_beginthreadex(
+ NULL,
+ 0,
+ &blocking_thread,
+ c,
+ CREATE_SUSPENDED,
+ &blocking_thread_id);
+
+ if (NULL == blocking_child_thread) {
+ msyslog(LOG_ERR, "start blocking thread failed: %m");
+ exit(-1);
+ }
+ c->thread_id = blocking_thread_id;
+ c->thread_ref = blocking_child_thread;
+ /* remember the thread priority is only within the process class */
+ if (!SetThreadPriority(blocking_child_thread,
+ THREAD_PRIORITY_BELOW_NORMAL))
+ msyslog(LOG_ERR, "Error lowering blocking thread priority: %m");
+
+ resumed = ResumeThread(blocking_child_thread);
+ DEBUG_INSIST(resumed);
+}
+#else /* pthreads start_blocking_thread_internal() follows */
+{
+# ifdef NEED_PTHREAD_INIT
+ static int pthread_init_called;
+# endif
+ pthread_attr_t thr_attr;
+ int rc;
+ int saved_errno;
+ int pipe_ends[2]; /* read then write */
+ int is_pipe;
+ int flags;
+ size_t stacksize;
+ sigset_t saved_sig_mask;
+
+# ifdef NEED_PTHREAD_INIT
+ /*
+ * from lib/isc/unix/app.c:
+ * BSDI 3.1 seg faults in pthread_sigmask() if we don't do this.
+ */
+ if (!pthread_init_called) {
+ pthread_init();
+ pthread_init_called = TRUE;
+ }
+# endif
+
+ rc = pipe_socketpair(&pipe_ends[0], &is_pipe);
+ if (0 != rc) {
+ msyslog(LOG_ERR, "start_blocking_thread: pipe_socketpair() %m");
+ exit(1);
+ }
+ c->resp_read_pipe = move_fd(pipe_ends[0]);
+ c->resp_write_pipe = move_fd(pipe_ends[1]);
+ c->ispipe = is_pipe;
+ flags = fcntl(c->resp_read_pipe, F_GETFL, 0);
+ if (-1 == flags) {
+ msyslog(LOG_ERR, "start_blocking_thread: fcntl(F_GETFL) %m");
+ exit(1);
+ }
+ rc = fcntl(c->resp_read_pipe, F_SETFL, O_NONBLOCK | flags);
+ if (-1 == rc) {
+ msyslog(LOG_ERR,
+ "start_blocking_thread: fcntl(F_SETFL, O_NONBLOCK) %m");
+ exit(1);
+ }
+ (*addremove_io_fd)(c->resp_read_pipe, c->ispipe, FALSE);
+ pthread_attr_init(&thr_attr);
+ pthread_attr_setdetachstate(&thr_attr, PTHREAD_CREATE_DETACHED);
+#if defined(HAVE_PTHREAD_ATTR_GETSTACKSIZE) && \
+ defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE)
+ rc = pthread_attr_getstacksize(&thr_attr, &stacksize);
+ if (-1 == rc) {
+ msyslog(LOG_ERR,
+ "start_blocking_thread: pthread_attr_getstacksize %m");
+ } else if (stacksize < THREAD_MINSTACKSIZE) {
+ rc = pthread_attr_setstacksize(&thr_attr,
+ THREAD_MINSTACKSIZE);
+ if (-1 == rc)
+ msyslog(LOG_ERR,
+ "start_blocking_thread: pthread_attr_setstacksize(0x%lx -> 0x%lx) %m",
+ (u_long)stacksize,
+ (u_long)THREAD_MINSTACKSIZE);
+ }
+#else
+ UNUSED_ARG(stacksize);
+#endif
+#if defined(PTHREAD_SCOPE_SYSTEM) && defined(NEED_PTHREAD_SCOPE_SYSTEM)
+ pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM);
+#endif
+ c->thread_ref = emalloc_zero(sizeof(*c->thread_ref));
+ block_thread_signals(&saved_sig_mask);
+ rc = pthread_create(c->thread_ref, &thr_attr,
+ &blocking_thread, c);
+ saved_errno = errno;
+ pthread_sigmask(SIG_SETMASK, &saved_sig_mask, NULL);
+ pthread_attr_destroy(&thr_attr);
+ if (0 != rc) {
+ errno = saved_errno;
+ msyslog(LOG_ERR, "pthread_create() blocking child: %m");
+ exit(1);
+ }
+}
+#endif
+
+
+/*
+ * block_thread_signals()
+ *
+ * Temporarily block signals used by ntpd main thread, so that signal
+ * mask inherited by child threads leaves them blocked. Returns prior
+ * active signal mask via pmask, to be restored by the main thread
+ * after pthread_create().
+ */
+#ifndef SYS_WINNT
+void
+block_thread_signals(
+ sigset_t * pmask
+ )
+{
+ sigset_t block;
+
+ sigemptyset(&block);
+# ifdef HAVE_SIGNALED_IO
+# ifdef SIGIO
+ sigaddset(&block, SIGIO);
+# endif
+# ifdef SIGPOLL
+ sigaddset(&block, SIGPOLL);
+# endif
+# endif /* HAVE_SIGNALED_IO */
+ sigaddset(&block, SIGALRM);
+ sigaddset(&block, MOREDEBUGSIG);
+ sigaddset(&block, LESSDEBUGSIG);
+# ifdef SIGDIE1
+ sigaddset(&block, SIGDIE1);
+# endif
+# ifdef SIGDIE2
+ sigaddset(&block, SIGDIE2);
+# endif
+# ifdef SIGDIE3
+ sigaddset(&block, SIGDIE3);
+# endif
+# ifdef SIGDIE4
+ sigaddset(&block, SIGDIE4);
+# endif
+# ifdef SIGBUS
+ sigaddset(&block, SIGBUS);
+# endif
+ sigemptyset(pmask);
+ pthread_sigmask(SIG_BLOCK, &block, pmask);
+}
+#endif /* !SYS_WINNT */
+
+
+/*
+ * prepare_child_sems()
+ *
+ * create sync events (semaphores)
+ * child_is_blocking initially unset
+ * blocking_req_ready initially unset
+ *
+ * Child waits for blocking_req_ready to be set after
+ * setting child_is_blocking. blocking_req_ready and
+ * blocking_response_ready are auto-reset, so wake one
+ * waiter and become unset (unsignalled) in one operation.
+ */
+static void
+prepare_child_sems(
+ blocking_child *c
+ )
+#ifdef SYS_WINNT
+{
+ if (NULL == c->blocking_req_ready) {
+ /* manual reset using ResetEvent() */
+ /* !!!! c->child_is_blocking = CreateEvent(NULL, TRUE, FALSE, NULL); */
+ /* auto reset - one thread released from wait each set */
+ c->blocking_req_ready = CreateEvent(NULL, FALSE, FALSE, NULL);
+ c->blocking_response_ready = CreateEvent(NULL, FALSE, FALSE, NULL);
+ c->wake_scheduled_sleep = CreateEvent(NULL, FALSE, FALSE, NULL);
+ } else {
+ /* !!!! ResetEvent(c->child_is_blocking); */
+ /* ResetEvent(c->blocking_req_ready); */
+ /* ResetEvent(c->blocking_response_ready); */
+ /* ResetEvent(c->wake_scheduled_sleep); */
+ }
+}
+#else /* pthreads prepare_child_sems() follows */
+{
+ size_t octets;
+
+ if (NULL == c->blocking_req_ready) {
+ octets = sizeof(*c->blocking_req_ready);
+ octets += sizeof(*c->wake_scheduled_sleep);
+ /* !!!! octets += sizeof(*c->child_is_blocking); */
+ c->blocking_req_ready = emalloc_zero(octets);;
+ c->wake_scheduled_sleep = 1 + c->blocking_req_ready;
+ /* !!!! c->child_is_blocking = 1 + c->wake_scheduled_sleep; */
+ } else {
+ sem_destroy(c->blocking_req_ready);
+ sem_destroy(c->wake_scheduled_sleep);
+ /* !!!! sem_destroy(c->child_is_blocking); */
+ }
+ sem_init(c->blocking_req_ready, FALSE, 0);
+ sem_init(c->wake_scheduled_sleep, FALSE, 0);
+ /* !!!! sem_init(c->child_is_blocking, FALSE, 0); */
+}
+#endif
+
+
+static int
+wait_for_sem(
+ sem_ref sem,
+ struct timespec * timeout /* wall-clock */
+ )
+#ifdef SYS_WINNT
+{
+ struct timespec now;
+ struct timespec delta;
+ DWORD msec;
+ DWORD rc;
+
+ if (NULL == timeout) {
+ msec = INFINITE;
+ } else {
+ getclock(TIMEOFDAY, &now);
+ delta = sub_tspec(*timeout, now);
+ if (delta.tv_sec < 0) {
+ msec = 0;
+ } else if ((delta.tv_sec + 1) >= (MAXDWORD / 1000)) {
+ msec = INFINITE;
+ } else {
+ msec = 1000 * (DWORD)delta.tv_sec;
+ msec += delta.tv_nsec / (1000 * 1000);
+ }
+ }
+ rc = WaitForSingleObject(sem, msec);
+ if (WAIT_OBJECT_0 == rc)
+ return 0;
+ if (WAIT_TIMEOUT == rc) {
+ errno = ETIMEDOUT;
+ return -1;
+ }
+ msyslog(LOG_ERR, "WaitForSingleObject unexpected 0x%x", rc);
+ errno = EFAULT;
+ return -1;
+}
+#else /* pthreads wait_for_sem() follows */
+{
+ int rc;
+
+ if (NULL == timeout)
+ rc = sem_wait(sem);
+ else
+ rc = sem_timedwait(sem, timeout);
+
+ return rc;
+}
+#endif
+
+
+/*
+ * blocking_thread - thread functions have WINAPI calling convention
+ */
+#ifdef SYS_WINNT
+u_int
+WINAPI
+#else
+void *
+#endif
+blocking_thread(
+ void * ThreadArg
+ )
+{
+ blocking_child *c;
+
+ c = ThreadArg;
+ exit_worker(blocking_child_common(c));
+
+ /* NOTREACHED */
+ return 0;
+}
+
+
+/*
+ * req_child_exit() runs in the parent.
+ */
+int
+req_child_exit(
+ blocking_child *c
+ )
+{
+ return queue_req_pointer(c, CHILD_EXIT_REQ);
+}
+
+
+/*
+ * cleanup_after_child() runs in parent.
+ */
+static void
+cleanup_after_child(
+ blocking_child * c
+ )
+{
+ u_int idx;
+
+ DEBUG_INSIST(!c->reusable);
+#ifdef SYS_WINNT
+ INSIST(CloseHandle(c->thread_ref));
+#else
+ free(c->thread_ref);
+#endif
+ c->thread_ref = NULL;
+ c->thread_id = 0;
+#ifdef WORK_PIPE
+ DEBUG_INSIST(-1 != c->resp_read_pipe);
+ DEBUG_INSIST(-1 != c->resp_write_pipe);
+ (*addremove_io_fd)(c->resp_read_pipe, c->ispipe, TRUE);
+ close(c->resp_write_pipe);
+ close(c->resp_read_pipe);
+ c->resp_write_pipe = -1;
+ c->resp_read_pipe = -1;
+#else
+ DEBUG_INSIST(NULL != c->blocking_response_ready);
+ (*addremove_io_semaphore)(c->blocking_response_ready, TRUE);
+#endif
+ for (idx = 0; idx < c->workitems_alloc; idx++)
+ c->workitems[idx] = NULL;
+ c->next_workitem = 0;
+ c->next_workeritem = 0;
+ for (idx = 0; idx < c->responses_alloc; idx++)
+ c->responses[idx] = NULL;
+ c->next_response = 0;
+ c->next_workresp = 0;
+ c->reusable = TRUE;
+}
+
+
+#else /* !WORK_THREAD follows */
+char work_thread_nonempty_compilation_unit;
+#endif
diff --git a/libntp/ymd2yd.c b/libntp/ymd2yd.c
index 796ce40948bd..c6b3a0cad7dc 100644
--- a/libntp/ymd2yd.c
+++ b/libntp/ymd2yd.c
@@ -1,37 +1,26 @@
/*
* ymd2yd - compute the date in the year from y/m/d
+ *
+ * A thin wrapper around a more general calendar function.
*/
-#include "ntp_fp.h"
-#include "ntp_unixtime.h"
+#include <config.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};
+#include "ntp_calendar.h"
int
ymd2yd(
int y,
int m,
- int d
- )
+ 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;
+ /*
+ * convert y/m/d to elapsed calendar units, convert that to
+ * elapsed days since the start of the given year and convert
+ * back to unity-based day in year.
+ *
+ * This does no further error checking, since the underlying
+ * function is assumed to work out how to handle the data.
+ */
+ return ntpcal_edate_to_yeardays(y-1, m-1, d-1) + 1;
}
diff --git a/libparse/Makefile.am b/libparse/Makefile.am
index 12b47967de75..a92db1546cbf 100644
--- a/libparse/Makefile.am
+++ b/libparse/Makefile.am
@@ -1,15 +1,17 @@
NULL=
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
BUILT_SOURCES =
+CLEANFILES =
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 info_trimble.c
K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
+# info_trimble.c was mistakenly created in the build directory
+# previously. It is located in $(srcdir) and any updates must
+# end up there.
+
libparse_a_SOURCES = parse.c \
parse_conf.c \
clk_meinberg.c \
@@ -23,6 +25,7 @@ libparse_a_SOURCES = parse.c \
clk_computime.c \
clk_wharton.c \
clk_varitext.c \
+ clk_sel240x.c \
data_mbg.c \
info_trimble.c \
trim_info.c \
@@ -47,132 +50,96 @@ libparse_kernel_a_LIBADD = \
kclk_trimtsip.o \
kclk_varitext.o \
kclk_wharton.o \
+ kclk_sel240x.o \
kbinio.o \
kieee754io.o \
kmfp_mul.o \
kgpstolfp.o \
$(NULL)
+AM_CFLAGS = $(CFLAGS_NTP)
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include -I$(top_srcdir)/kernel
-
-ETAGS_ARGS = Makefile.am
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += -I$(top_srcdir)/kernel
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
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 $@
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > $@ || rm -f $@
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> $@ || rm -f $@
+$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+ sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+ sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+ mv -f info_trimble.new $@
-kieee754io.o: ieee754io.c
+kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
-kmfp_mul.o: mfp_mul.c
+kmfp_mul.o: $(srcdir)/mfp_mul.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/mfp_mul.c -o $@
-kgpstolfp.o: gpstolfp.c
+kgpstolfp.o: $(srcdir)/gpstolfp.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/gpstolfp.c -o $@
-kbinio.o: binio.c
+kbinio.o: $(srcdir)/binio.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/binio.c -o $@
-kclk_computime.o: clk_computime.c
+kclk_computime.o: $(srcdir)/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
+kclk_dcf7000.o: $(srcdir)/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
+kclk_hopf6021.o: $(srcdir)/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
+kclk_meinberg.o: $(srcdir)/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
+kclk_rawdcf.o: $(srcdir)/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
+kclk_rcc8000.o: $(srcdir)/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
+kclk_schmid.o: $(srcdir)/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
+kclk_trimtaip.o: $(srcdir)/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
+kclk_trimtsip.o: $(srcdir)/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
+kclk_varitext.o: $(srcdir)/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
+kclk_wharton.o: $(srcdir)/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 $@
+kclk_sel240x.o: $(srcdir)/clk_sel240x.c
+ $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_sel240x.c -o $@
-kparse.o: parse.c
+kparse.o: $(srcdir)/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
+kparse_conf.o: $(srcdir)/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 && \
+ -mkdir sys
sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+## check-libparse is invoked by ntpd/Makefile.am
+check-libparse: $(noinst_LIBRARIES)
+ @: do-nothing action to avoid default SCCS get
+
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/libparse/Makefile.in b/libparse/Makefile.in
index fcbf5131423c..606763edf963 100644
--- a/libparse/Makefile.in
+++ b/libparse/Makefile.in
@@ -37,20 +37,45 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = parsestreams$(EXEEXT) parsesolaris$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf
subdir = libparse
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -59,6 +84,12 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
libparse_a_AR = $(AR) $(ARFLAGS)
libparse_a_LIBADD =
am__objects_1 =
@@ -68,10 +99,10 @@ am_libparse_a_OBJECTS = parse.$(OBJEXT) parse_conf.$(OBJEXT) \
clk_dcf7000.$(OBJEXT) clk_trimtaip.$(OBJEXT) \
clk_rcc8000.$(OBJEXT) clk_hopf6021.$(OBJEXT) \
clk_computime.$(OBJEXT) clk_wharton.$(OBJEXT) \
- clk_varitext.$(OBJEXT) data_mbg.$(OBJEXT) \
- info_trimble.$(OBJEXT) trim_info.$(OBJEXT) binio.$(OBJEXT) \
- ieee754io.$(OBJEXT) mfp_mul.$(OBJEXT) gpstolfp.$(OBJEXT) \
- $(am__objects_1)
+ clk_varitext.$(OBJEXT) clk_sel240x.$(OBJEXT) \
+ data_mbg.$(OBJEXT) info_trimble.$(OBJEXT) trim_info.$(OBJEXT) \
+ binio.$(OBJEXT) ieee754io.$(OBJEXT) mfp_mul.$(OBJEXT) \
+ gpstolfp.$(OBJEXT) $(am__objects_1)
libparse_a_OBJECTS = $(am_libparse_a_OBJECTS)
libparse_kernel_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
@@ -79,7 +110,7 @@ libparse_kernel_a_DEPENDENCIES = kparse.o kparse_conf.o \
kclk_computime.o kclk_dcf7000.o kclk_hopf6021.o \
kclk_meinberg.o kclk_rawdcf.o kclk_rcc8000.o kclk_schmid.o \
kclk_trimtaip.o kclk_trimtsip.o kclk_varitext.o kclk_wharton.o \
- kbinio.o kieee754io.o kmfp_mul.o kgpstolfp.o \
+ kclk_sel240x.o kbinio.o kieee754io.o kmfp_mul.o kgpstolfp.o \
$(am__DEPENDENCIES_1)
am_libparse_kernel_a_OBJECTS =
libparse_kernel_a_OBJECTS = $(am_libparse_kernel_a_OBJECTS)
@@ -87,22 +118,35 @@ PROGRAMS = $(noinst_PROGRAMS)
parsesolaris_SOURCES = parsesolaris.c
parsesolaris_OBJECTS = parsesolaris.$(OBJEXT)
parsesolaris_LDADD = $(LDADD)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
parsestreams_SOURCES = parsestreams.c
parsestreams_OBJECTS = parsestreams.$(OBJEXT)
parsestreams_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \
parsesolaris.c parsestreams.c
DIST_SOURCES = $(libparse_a_SOURCES) $(libparse_kernel_a_SOURCES) \
@@ -111,20 +155,32 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -136,21 +192,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -158,6 +224,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -176,14 +243,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -196,10 +317,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -207,9 +330,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -218,6 +359,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -266,14 +408,16 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-BUILT_SOURCES = .deps-ver
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
noinst_LIBRARIES = @MAKE_LIBPARSE@ @MAKE_LIBPARSE_KERNEL@
EXTRA_LIBRARIES = libparse.a libparse_kernel.a
noinst_PROGRAMS = @MAKE_PARSEKMODULE@
-CLEANFILES = libparse.a libparse_kernel.a info_trimble.c .deps-ver
K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
+
+# info_trimble.c was mistakenly created in the build directory
+# previously. It is located in $(srcdir) and any updates must
+# end up there.
libparse_a_SOURCES = parse.c \
parse_conf.c \
clk_meinberg.c \
@@ -287,6 +431,7 @@ libparse_a_SOURCES = parse.c \
clk_computime.c \
clk_wharton.c \
clk_varitext.c \
+ clk_sel240x.c \
data_mbg.c \
info_trimble.c \
trim_info.c \
@@ -311,24 +456,25 @@ libparse_kernel_a_LIBADD = \
kclk_trimtsip.o \
kclk_varitext.o \
kclk_wharton.o \
+ kclk_sel240x.o \
kbinio.o \
kieee754io.o \
kmfp_mul.o \
kgpstolfp.o \
$(NULL)
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include -I$(top_srcdir)/kernel
-
-ETAGS_ARGS = Makefile.am
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/kernel $(CPPFLAGS_NTP)
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -362,13 +508,13 @@ $(am__aclocal_m4_deps):
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
+ $(AM_V_at)-rm -f libparse.a
+ $(AM_V_AR)$(libparse_a_AR) libparse.a $(libparse_a_OBJECTS) $(libparse_a_LIBADD)
+ $(AM_V_at)$(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
+ $(AM_V_at)-rm -f libparse_kernel.a
+ $(AM_V_AR)$(libparse_kernel_a_AR) libparse_kernel.a $(libparse_kernel_a_OBJECTS) $(libparse_kernel_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libparse_kernel.a
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
@@ -380,10 +526,10 @@ clean-noinstPROGRAMS:
rm -f $$list
parsesolaris$(EXEEXT): $(parsesolaris_OBJECTS) $(parsesolaris_DEPENDENCIES)
@rm -f parsesolaris$(EXEEXT)
- $(LINK) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(parsesolaris_OBJECTS) $(parsesolaris_LDADD) $(LIBS)
parsestreams$(EXEEXT): $(parsestreams_OBJECTS) $(parsestreams_DEPENDENCIES)
@rm -f parsestreams$(EXEEXT)
- $(LINK) $(parsestreams_OBJECTS) $(parsestreams_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(parsestreams_OBJECTS) $(parsestreams_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -399,6 +545,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rawdcf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_rcc8000.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_schmid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_sel240x.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtaip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_trimtsip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clk_varitext.Po@am__quote@
@@ -415,22 +562,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim_info.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -644,125 +794,92 @@ uninstall-am:
tags uninstall uninstall-am
-#
-# create info_trimble.c
-#
-info_trimble.c: $(top_srcdir)/include/trimble.h mkinfo_rcmd.sed mkinfo_scmd.sed
- @rm -f $@
- sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > $@ || rm -f $@
- sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> $@ || rm -f $@
+$(srcdir)/info_trimble.c: $(top_srcdir)/include/trimble.h $(srcdir)/Makefile.am $(srcdir)/mkinfo_scmd.sed $(srcdir)/mkinfo_rcmd.sed
+ sed -n -f $(srcdir)/mkinfo_scmd.sed $(top_srcdir)/include/trimble.h > info_trimble.new
+ sed -n -f $(srcdir)/mkinfo_rcmd.sed $(top_srcdir)/include/trimble.h >> info_trimble.new
+ mv -f info_trimble.new $@
-kieee754io.o: ieee754io.c
+kieee754io.o: $(srcdir)/ieee754io.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/ieee754io.c -o $@
-kmfp_mul.o: mfp_mul.c
+kmfp_mul.o: $(srcdir)/mfp_mul.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/mfp_mul.c -o $@
-kgpstolfp.o: gpstolfp.c
+kgpstolfp.o: $(srcdir)/gpstolfp.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/gpstolfp.c -o $@
-kbinio.o: binio.c
+kbinio.o: $(srcdir)/binio.c
$(COMPILE) $(K_CFLAGS) -c $(srcdir)/binio.c -o $@
-kclk_computime.o: clk_computime.c
+kclk_computime.o: $(srcdir)/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
+kclk_dcf7000.o: $(srcdir)/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
+kclk_hopf6021.o: $(srcdir)/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
+kclk_meinberg.o: $(srcdir)/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
+kclk_rawdcf.o: $(srcdir)/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
+kclk_rcc8000.o: $(srcdir)/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
+kclk_schmid.o: $(srcdir)/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
+kclk_trimtaip.o: $(srcdir)/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
+kclk_trimtsip.o: $(srcdir)/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
+kclk_varitext.o: $(srcdir)/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
+kclk_wharton.o: $(srcdir)/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 $@
+kclk_sel240x.o: $(srcdir)/clk_sel240x.c
+ $(COMPILE) $(K_CFLAGS) -c $(srcdir)/clk_sel240x.c -o $@
-kparse.o: parse.c
+kparse.o: $(srcdir)/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
+kparse_conf.o: $(srcdir)/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 && \
+ -mkdir sys
sed -e '/ffs(.*)/d' < /usr/include/sys/systm.h > sys/systm.h
+
+check-libparse: $(noinst_LIBRARIES)
+ @: do-nothing action to avoid default SCCS get
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -771,17 +888,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -790,7 +900,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/libparse/binio.c b/libparse/binio.c
index 2f8546b4adbe..24aa28687b1e 100644
--- a/libparse/binio.c
+++ b/libparse/binio.c
@@ -33,6 +33,7 @@
*
*/
+#include <config.h>
#include "binio.h"
long
@@ -68,7 +69,7 @@ get_lsb_long(
retval = *((*bufpp)++);
retval |= *((*bufpp)++) << 8;
retval |= *((*bufpp)++) << 16;
- retval |= *((*bufpp)++) << 24;
+ retval |= (u_long)*((*bufpp)++) << 24;
return retval;
}
@@ -115,7 +116,7 @@ get_msb_long(
{
long retval;
- retval = *((*bufpp)++) << 24;
+ retval = (u_long)*((*bufpp)++) << 24;
retval |= *((*bufpp)++) << 16;
retval |= *((*bufpp)++) << 8;
retval |= *((*bufpp)++);
diff --git a/libparse/clk_rawdcf.c b/libparse/clk_rawdcf.c
index 20b3bf281b73..98848bee8fb0 100644
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -234,7 +234,7 @@ convert_rawdcf(
if (size < 57)
{
#ifndef PARSEKERNEL
- msyslog(LOG_ERR, "parse: convert_rawdcf: INCOMPLETE DATA - time code only has %d bits\n", size);
+ msyslog(LOG_ERR, "parse: convert_rawdcf: INCOMPLETE DATA - time code only has %d bits", size);
#endif
return CVT_NONE;
}
@@ -320,7 +320,7 @@ convert_rawdcf(
* bad format - not for us
*/
#ifndef PARSEKERNEL
- msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%s\"\n", buffer);
+ msyslog(LOG_ERR, "parse: convert_rawdcf: parity check FAILED for \"%s\"", buffer);
#endif
return CVT_FAIL|CVT_BADFMT;
}
diff --git a/libparse/clk_sel240x.c b/libparse/clk_sel240x.c
new file mode 100644
index 000000000000..a09d3478dbf6
--- /dev/null
+++ b/libparse/clk_sel240x.c
@@ -0,0 +1,178 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2009,2012 -
+// Schweitzer Engineering Laboratories, Inc. <opensource@selinc.com>
+//////////////////////////////////////////////////////////////////////////////
+
+// Need to have _XOPEN_SOURCE defined for time.h to give the
+// correct strptime signature. As per feature_test_macros(7),
+// define this before including any header files.
+
+// #ifndef _XOPEN_SOURCE
+// #define _XOPEN_SOURCE
+// #endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_SEL240X)
+
+#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 <time.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// The B8 output has the following format B8 = '\x01YYYY:ddd:hh:mm:ssq\r\n'
+// where q = ' ' locked
+// '.' <1 us
+// '*' <10 us
+// '#' <100 us
+// '?' >100 us
+//
+// Based on this we need to recored the stime when we receive the <SOH>
+// character and end it when we see the \n.
+//
+// The q or quality character indicates satellite lock and sync. For the
+// purposes of NTP we are going to call it valid when we receive anything but
+// a '?'. But we are only going to call it synced when we receive a ' '
+//////////////////////////////////////////////////////////////////////////////
+
+static unsigned long inp_sel240x( parse_t *parseio,
+ unsigned int ch,
+ timestamp_t *tstamp);
+static unsigned long cvt_sel240x( unsigned char *buffer,
+ int size,
+ struct format *format,
+ clocktime_t *clock_time,
+ void *local );
+
+// Parse clock format structure describing the message above
+static struct format sel240x_fmt =
+{ { { 6, 3 },
+ { 0, 0 },
+ { 1, 4 },
+ { 10, 2 },
+ { 13, 2 },
+ { 16, 2 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 }
+ },
+ (const unsigned char *)"\x01 : : : : \x0d\x0a",
+ 0
+};
+
+// Structure desctibing the parser
+clockformat_t clock_sel240x =
+{
+ inp_sel240x,
+ cvt_sel240x,
+ pps_one,
+ (void*)&sel240x_fmt,
+ "SEL B8",
+ 25,
+ 0
+};
+
+//////////////////////////////////////////////////////////////////////////////
+static unsigned long
+inp_sel240x( parse_t *parseio,
+ unsigned int ch,
+ timestamp_t *tstamp
+ )
+{
+ unsigned long rc;
+
+ parseprintf( DD_PARSE,
+ ("inp_sel240x(0x%lx, 0x%x, ...)\n",(long)parseio, ch));
+
+ switch( ch )
+ {
+ case '\x01':
+ parseio->parse_index = 1;
+ parseio->parse_data[0] = ch;
+ parseio->parse_dtime.parse_stime = *tstamp;
+ rc = PARSE_INP_SKIP;
+ break;
+ case '\n':
+ if( (rc = parse_addchar(parseio, ch)) == PARSE_INP_SKIP )
+ {
+ rc = parse_end( parseio );
+ }
+ break;
+ default:
+ rc = parse_addchar( parseio, ch );
+ }
+
+ return rc;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+static unsigned long
+cvt_sel240x( unsigned char *buffer,
+ int size,
+ struct format *format,
+ clocktime_t *clock_time,
+ void *local
+ )
+{
+ unsigned long rc = CVT_NONE;
+
+ if( Strok(buffer, format->fixed_string) )
+ {
+ struct tm ptime;
+ buffer++;
+ buffer = (unsigned char *) strptime(
+ (const char *)buffer, "%Y:%j:%H:%M:%S", &ptime );
+ if( *(buffer+1) != '\x0d' )
+ {
+ rc = CVT_FAIL | CVT_BADFMT;
+ }
+ else
+ {
+ clock_time->day = ptime.tm_mday;
+ clock_time->month = ptime.tm_mon + 1;
+ clock_time->year = ptime.tm_year + 1900;
+ clock_time->hour = ptime.tm_hour;
+ clock_time->minute = ptime.tm_min;
+ clock_time->second = ptime.tm_sec;
+ clock_time->usecond = 0;
+ clock_time->utcoffset = 0;
+ clock_time->flags = PARSEB_UTC;
+
+ if( *buffer == '?' )
+ {
+ clock_time->flags |= PARSEB_POWERUP;
+ }
+ else if( *buffer != ' ' )
+ {
+ clock_time->flags |= PARSEB_NOSYNC;
+ }
+
+ rc = CVT_OK;
+ }
+ }
+
+ return rc;
+}
+
+#else /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
+int clk_sel240x_bs;
+#endif /* not (REFCLOCK && CLOCK_PARSE && CLOCK_SEL240X) */
diff --git a/libparse/clk_trimtsip.c b/libparse/clk_trimtsip.c
index 58b0f87e3503..743e39c3bc74 100644
--- a/libparse/clk_trimtsip.c
+++ b/libparse/clk_trimtsip.c
@@ -44,7 +44,7 @@
#include "ntp_syslog.h"
#include "ntp_types.h"
#include "ntp_fp.h"
-#include "ntp_unixtime.h"
+#include "timevalops.h"
#include "ntp_calendar.h"
#include "ntp_machine.h"
#include "ntp_stdlib.h"
diff --git a/libparse/clk_wharton.c b/libparse/clk_wharton.c
index 0a1ee0b03a47..55ab43a9b574 100644
--- a/libparse/clk_wharton.c
+++ b/libparse/clk_wharton.c
@@ -91,7 +91,7 @@ cvt_wharton_400a(
int i;
/* The given `size' includes a terminating null-character. */
- if (size != 16 || buffer[0] != STX || buffer[14] != ETX
+ if (size != 15 || buffer[0] != STX || buffer[14] != ETX
|| buffer[13] < '0' || buffer[13] > ('0' + 0xf))
return CVT_NONE;
for (i = 1; i < 13; i += 1)
diff --git a/libparse/data_mbg.c b/libparse/data_mbg.c
index 991f1e90e2b4..97bef35c4479 100644
--- a/libparse/data_mbg.c
+++ b/libparse/data_mbg.c
@@ -33,6 +33,7 @@
*
*/
+#include <config.h>
#ifdef PARSESTREAM
#define NEED_BOPS
#include "ntp_string.h"
@@ -176,7 +177,7 @@ get_mbg_tzname(
char *tznamep
)
{
- strncpy(tznamep, (char *)*buffpp, sizeof(TZ_NAME));
+ strlcpy(tznamep, (char *)*buffpp, sizeof(TZ_NAME));
*buffpp += sizeof(TZ_NAME);
}
@@ -241,10 +242,10 @@ mbg_time_status_str(
{
if (p != *buffpp)
{
- strncpy(p, ", ", size - (p - start));
+ strlcpy(p, ", ", size - (p - start));
p += 2;
}
- strncpy(p, s->string, size - (p - start));
+ strlcpy(p, s->string, size - (p - start));
p += strlen(p);
}
}
diff --git a/libparse/gpstolfp.c b/libparse/gpstolfp.c
index 9f1a9bfd601d..5354dd3223aa 100644
--- a/libparse/gpstolfp.c
+++ b/libparse/gpstolfp.c
@@ -32,6 +32,7 @@
* SUCH DAMAGE.
*
*/
+#include <config.h>
#include "ntp_fp.h"
#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
diff --git a/libparse/ieee754io.c b/libparse/ieee754io.c
index 1c203d7bcdde..61bc8533b0d7 100644
--- a/libparse/ieee754io.c
+++ b/libparse/ieee754io.c
@@ -89,14 +89,15 @@ fmt_flt(
unsigned long ch
)
{
- char *buf;
+ 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;
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%c %s %s %s", sign ? '-' : '+',
+ fmt_blong(ch, 11),
+ fmt_blong(mh, 20),
+ fmt_blong(ml, 32));
+
+ return buf;
}
static char *
@@ -105,15 +106,18 @@ fmt_hex(
int length
)
{
- char *buf;
- int i;
+ char * buf;
+ char hex[4];
+ int i;
+
+ LIB_GETBUF(buf);
+ buf[0] = '\0';
+ for (i = 0; i < length; i++) {
+ snprintf(hex, sizeof(hex), "%02x", bufp[i]);
+ strlcat(buf, hex, LIB_BUFLENGTH);
+ }
- LIB_GETBUF(buf);
- for (i = 0; i < length; i++)
- {
- sprintf(buf+i*2, "%02x", bufp[i]);
- }
- return buf;
+ return buf;
}
#endif
@@ -217,7 +221,7 @@ fetch_ieee754(
mantissa_high = 0;
mantissa_low = (val &0x7F) << 16;
- mantissa_low |= get_byte(bufp, offsets, &fieldindex) << 8;
+ mantissa_low |= (u_long)get_byte(bufp, offsets, &fieldindex) << 8;
mantissa_low |= get_byte(bufp, offsets, &fieldindex);
break;
@@ -226,12 +230,12 @@ fetch_ieee754(
characteristic |= (val & 0xF0) >> 4; /* grab lower characteristic bits */
mantissa_high = (val & 0x0F) << 16;
- mantissa_high |= get_byte(bufp, offsets, &fieldindex) << 8;
+ mantissa_high |= (u_long)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 = (u_long)get_byte(bufp, offsets, &fieldindex) << 24;
+ mantissa_low |= (u_long)get_byte(bufp, offsets, &fieldindex) << 16;
+ mantissa_low |= (u_long)get_byte(bufp, offsets, &fieldindex) << 8;
mantissa_low |= get_byte(bufp, offsets, &fieldindex);
break;
diff --git a/libparse/mfp_mul.c b/libparse/mfp_mul.c
index 677ed181fc8b..43c1e39faa3f 100644
--- a/libparse/mfp_mul.c
+++ b/libparse/mfp_mul.c
@@ -32,6 +32,7 @@
* SUCH DAMAGE.
*
*/
+#include <config.h>
#include <stdio.h>
#include "ntp_stdlib.h"
#include "ntp_types.h"
diff --git a/libparse/mkinfo_rcmd.sed b/libparse/mkinfo_rcmd.sed
index 570c7a0b81e2..5238d5c4eb13 100644
--- a/libparse/mkinfo_rcmd.sed
+++ b/libparse/mkinfo_rcmd.sed
@@ -1,8 +1,8 @@
1i\
\
+\
cmd_info_t trimble_rcmds[] = {
-s!^#define[ ][ ]*\(CMD_R[^ ]*\)[ ][ ]*\([^ ]*\)[ ][ ]*/\*[ ][ ]*\(.*\)[ ]*:\([^:]*\):\([^:]*\)[ ][ ]*\*/! { \1, "\1", "\3 (\2)", "\4", \5 },!p
+s!^#define[ \ ][ \ ]*\(CMD_R[^ \ ]*\)[ \ ][ \ ]*\([^ \ ]*\)[ \ ][ \ ]*/\*[ \ ][ \ ]*\(.*\)[ \ ]*:\([^:]*\):\([^:]*\)[ \ ][ \ ]*\*/!\ { \1, "\1", "\3 (\2)", "\4", \5 },!p
$a\
- { 0xFF, "", "" }\
-};\
-
+\ { 0xFF, "", "" }\
+};
diff --git a/libparse/mkinfo_scmd.sed b/libparse/mkinfo_scmd.sed
index cabe0654588d..9c17f39ed703 100644
--- a/libparse/mkinfo_scmd.sed
+++ b/libparse/mkinfo_scmd.sed
@@ -1,8 +1,9 @@
1i\
/*\
- * Automatically generated - do not modify\
- */\
+\ * Automatically generated - do not modify\
+\ */\
\
+#include <config.h>\
#include "ntp_types.h"\
#include "ntpd.h"\
#include "trimble.h"\
@@ -10,7 +11,5 @@
cmd_info_t trimble_scmds[] = {
s!^#define[ ][ ]*\(CMD_C[^ ]*\)[ ][ ]*\([^ ]*\)[ ][ ]*/\*[ ][ ]*\(.*\)[ ][ ]*\*/! { \1, "\1", "\3 (\2)", "", 0 },!p
$a\
- { 0xFF, "", "" }\
-};\
-
-
+\ { 0xFF, "", "" }\
+};
diff --git a/libparse/parse.c b/libparse/parse.c
index 83e560aff0c6..85e5299cb195 100644
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -51,7 +51,7 @@ static char rcsid[] = "parse.c,v 4.20 2005/08/06 17:39:40 kardel RELEASE_2005080
#endif
#include "ntp_fp.h"
-#include "ntp_unixtime.h"
+#include "timevalops.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
#include "ntp_machine.h"
@@ -128,10 +128,6 @@ parse_timedout(
delta.tv_usec += 1000000;
}
#else
- extern long tstouslo[];
- extern long tstousmid[];
- extern long tstoushi[];
-
l_fp delt;
delt = tstamp->fp;
@@ -719,7 +715,7 @@ timepacket(
default:
/* shouldn't happen */
#ifndef PARSEKERNEL
- msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"\n", clockformats[format]->name);
+ msyslog(LOG_WARNING, "parse: INTERNAL error: bad return code of convert routine \"%s\"", clockformats[format]->name);
#endif
return CVT_FAIL|cvtrtc;
}
diff --git a/libparse/parse_conf.c b/libparse/parse_conf.c
index b5451cff1028..b7234dd419b7 100644
--- a/libparse/parse_conf.c
+++ b/libparse/parse_conf.c
@@ -96,6 +96,10 @@ extern clockformat_t clock_wharton_400a;
extern clockformat_t clock_varitext;
#endif
+#ifdef CLOCK_SEL240X
+extern clockformat_t clock_sel240x;
+#endif
+
/*
* format definitions
*/
@@ -136,6 +140,9 @@ clockformat_t *clockformats[] =
#ifdef CLOCK_VARITEXT
&clock_varitext,
#endif
+#ifdef CLOCK_SEL240X
+ &clock_sel240x,
+#endif
0};
unsigned short nformats = sizeof(clockformats) / sizeof(clockformats[0]) - 1;
diff --git a/libparse/parsesolaris.c b/libparse/parsesolaris.c
index 2d499f0f68ce..d3756af882a3 100644
--- a/libparse/parsesolaris.c
+++ b/libparse/parsesolaris.c
@@ -40,6 +40,7 @@
static char rcsid[] = "parsesolaris.c,v 4.11 2005/04/16 17:32:10 kardel RELEASE_20050508_A";
#endif
+#include <config.h>
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/errno.h>
@@ -142,7 +143,7 @@ _init(
{
if (strlen(t) >= (S - s))
{
- (void) strncpy(t, s, (unsigned)(S - s));
+ strlcpy(t, s, (unsigned)(S - s));
}
}
return (mod_install(&modlinkage));
@@ -291,7 +292,7 @@ setup_stream(
mp = allocb(sizeof(struct stroptions), BPRI_MED);
if (mp)
{
- struct stroptions *str = (struct stroptions *)mp->b_wptr;
+ struct stroptions *str = (void *)mp->b_wptr;
str->so_flags = SO_READOPT|SO_HIWAT|SO_LOWAT|SO_ISNTTY;
str->so_readopt = (mode == M_PARSE) ? RMSGD : RNORM;
@@ -486,7 +487,7 @@ parsewput(
break;
case M_IOCTL:
- iocp = (struct iocblk *)mp->b_rptr;
+ iocp = (void *)mp->b_rptr;
switch (iocp->ioc_cmd)
{
default:
@@ -510,7 +511,8 @@ parsewput(
}
mp->b_cont = datap;
- *(struct ppsclockev *)datap->b_wptr = parse->parse_ppsclockev;
+ /* (void *) quiets cast alignment warning */
+ *(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;
@@ -543,7 +545,7 @@ parsewput(
case PARSEIOC_SETCS:
if (iocp->ioc_count == sizeof(parsectl_t))
{
- parsectl_t *dct = (parsectl_t *)mp->b_cont->b_rptr;
+ parsectl_t *dct = (void *)mp->b_cont->b_rptr;
switch (iocp->ioc_cmd)
{
@@ -986,7 +988,7 @@ zs_xsisr(
struct zscom *zs
)
{
- register struct asyncline *za = (struct asyncline *)zs->zs_priv;
+ register struct asyncline *za = (void *)zs->zs_priv;
register queue_t *q;
register unsigned char zsstatus;
register int loopcheck;
diff --git a/libparse/trim_info.c b/libparse/trim_info.c
index 8fdc4f61e21c..619e23861aef 100644
--- a/libparse/trim_info.c
+++ b/libparse/trim_info.c
@@ -33,6 +33,7 @@
* SUCH DAMAGE.
*
*/
+#include <config.h>
#include "ntp_types.h"
#include "trimble.h"
diff --git a/m4/define_dir.m4 b/m4/define_dir.m4
deleted file mode 100644
index 1fd0c1e2c4e2..000000000000
--- a/m4/define_dir.m4
+++ /dev/null
@@ -1,26 +0,0 @@
-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/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4
deleted file mode 100644
index 7d9f477bfbf2..000000000000
--- a/m4/ntp_openssl.m4
+++ /dev/null
@@ -1,283 +0,0 @@
-dnl ######################################################################
-dnl OpenSSL support shared by top-level and sntp/configure.ac
-AC_DEFUN([NTP_OPENSSL], [
-
-AC_SUBST([OPENSSL])
-AC_SUBST([OPENSSL_INC])
-AC_SUBST([OPENSSL_LIB])
-
-AC_MSG_CHECKING([for openssl library directory])
-AC_ARG_WITH(
- [openssl-libdir],
- [AS_HELP_STRING(
- [--with-openssl-libdir],
- [+ =/something/reasonable]
- )],
- [ans=$withval],
- [
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
- ]
-)
-case "$ans" in
- no)
- ;;
- yes) # Look in:
- ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib /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.so -a -f $i/libssl.so && 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],
- [AS_HELP_STRING(
- [--with-openssl-incdir],
- [+ =/something/reasonable]
- )],
- [ans=$withval],
- [
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
- ]
-)
-case "$ans" in
- no)
- ;;
- yes) # look in:
- ans="/usr/include /usr/sfw/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_MSG_CHECKING([if we will use crypto])
-AC_ARG_WITH(
- [crypto],
- [AS_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
- ans=yes
- fi
-esac
-ntp_openssl=$ans
-AC_MSG_RESULT([$ans])
-
-case "$ntp_openssl" in
- yes)
- # We have OpenSSL inc/lib - use them.
- case "$OPENSSL_INC" in
- /usr/include)
- ;;
- *)
- CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
- ;;
- esac
- case "$OPENSSL_LIB" in
- /usr/lib)
- ;;
- *)
- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
- case "$need_dash_r" in
- 1)
- LDFLAGS="$LDFLAGS -R$OPENSSL_LIB"
- esac
- ;;
- esac
- AC_SUBST([LCRYPTO], [-lcrypto])
- AC_DEFINE([OPENSSL], [1], [Use OpenSSL?])
-esac
-
-#
-# check for linking with -lcrypto failure, and try -lz -lcrypto.
-# Helps m68k-atari-mint
-#
-case "$ntp_openssl" in
- yes)
- NTPO_SAVED_LIBS="$LIBS"
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO"
- AC_CACHE_CHECK(
- [if linking with $LCRYPTO alone works],
- [ntp_cv_bare_lcrypto],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include "openssl/err.h"
- #include "openssl/evp.h"
- ]],
- [[
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
- ]]
- )],
- [ntp_cv_bare_lcrypto=yes],
- [ntp_cv_bare_lcrypto=no]
- )]
- )
- case "$ntp_cv_bare_lcrypto" in
- no)
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO -lz"
- AC_CACHE_CHECK(
- [if linking with $LCRYPTO -lz works],
- [ntp_cv_lcrypto_lz],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include "openssl/err.h"
- #include "openssl/evp.h"
- ]],
- [[
- ERR_load_crypto_strings();
- OpenSSL_add_all_algorithms();
- ]]
- )],
- [ntp_cv_lcrypto_lz=yes],
- [ntp_cv_lcrypto_lz=no]
- )]
- )
- case "$ntp_cv_lcrypto_lz" in
- yes)
- LCRYPTO="$LCRYPTO -lz"
- esac
- esac
- LIBS="$NTPO_SAVED_LIBS"
- AS_UNSET([NTPO_SAVED_LIBS])
-esac
-
-#
-# Older OpenSSL headers have a number of callback prototypes inside
-# other function prototypes which trigger copious warnings with gcc's
-# -Wstrict-prototypes, which is included in -Wall.
-#
-# An example:
-#
-# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
-# int (*cb)(), int sgckey);
-# ^^^^^^^^^^^
-#
-#
-#
-openssl_triggers_warnings=unknown
-SAVED_CFLAGS="$CFLAGS"
-
-case "$GCC$ntp_openssl" in
- yesyes)
- CFLAGS="$CFLAGS -Werror"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- ]],
- [[
- /* see if -Werror breaks gcc */
- ]]
- )],
- [gcc_handles_Werror=yes],
- [gcc_handles_Werror=no]
- )
- case "$gcc_handles_Werror" in
- no)
- # if this gcc doesn't do -Werror go ahead and use
- # -Wstrict-prototypes.
- openssl_triggers_warnings=yes
- ;;
- yes)
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #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"
- ]],
- [[
- /* empty body */
- ]]
- )],
- [openssl_triggers_warnings=no],
- [openssl_triggers_warnings=yes]
- )
- esac
- case "$openssl_triggers_warnings" in
- yes)
- CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
- ;;
- *)
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
- esac
- ;;
- yesno)
- # gcc without OpenSSL
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
-esac
-
-])
-dnl ======================================================================
diff --git a/m4/ntp_vpathhack.m4 b/m4/ntp_vpathhack.m4
deleted file mode 100644
index f4561b3b9c9c..000000000000
--- a/m4/ntp_vpathhack.m4
+++ /dev/null
@@ -1,29 +0,0 @@
-dnl ######################################################################
-dnl NTP_VPATH_HACK
-dnl
-dnl Are we using FreeBSD's make?
-dnl if we are building outside the srcdir and either
-dnl force_ntp_vpath_hack is set
-dnl or
-dnl we're on freebsd and not using GNU make
-dnl then we want VPATH_HACK to be true in automake tests
-dnl
-AC_DEFUN([NTP_VPATH_HACK], [
-AC_MSG_CHECKING([to see if we need a VPATH hack])
-ntp_vpath_hack="no"
-case "$srcdir::$build_os::${force_ntp_vpath_hack+set}" in
- .::*::*)
- ;;
- *::*::set)
- ntp_vpath_hack="yes"
- ;;
- *::freebsd*::)
- case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
- '')
- ntp_vpath_hack="yes"
- esac
-esac
-AC_MSG_RESULT([$ntp_vpath_hack])
-AM_CONDITIONAL([VPATH_HACK], [test x$ntp_vpath_hack = xyes])
-])
-dnl ======================================================================
diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am
index 144371aaa8fa..b3af52738c12 100644
--- a/ntpd/Makefile.am
+++ b/ntpd/Makefile.am
@@ -1,21 +1,22 @@
NULL=
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= ntpd @MAKE_NTPDSIM@
-else
-sbin_PROGRAMS= ntpd @MAKE_NTPDSIM@
-endif
+bin_PROGRAMS= $(NTPD_DB) $(NTPDSIM_DB)
+libexec_PROGRAMS= $(NTPD_DL) $(NTPDSIM_DL)
+sbin_PROGRAMS= $(NTPD_DS) $(NTPDSIM_DS)
noinst_LIBRARIES= libntpd.a
-AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB.
-LDADD= version.o libntpd.a @LIBPARSE@
-AM_YFLAGS= -d -t -r all
+LDADD = version.o libntpd.a $(LIBPARSE)
+AM_YFLAGS = -d -t -r all
if SAVECONFIG_ENABLED
if NTP_CROSSCOMPILE
@@ -28,15 +29,15 @@ CHECK_SAVECONFIG=
endif
#
-# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
+# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
# BSD make) to work around issues specific to compiling
-# ntp_parser.y into ntp_parser.h and ntp_parser.c in a vPATH
+# ntp_parser.y into ntp_parser.h and ntp_parser.c in a VPATH
# configuration where we would like (for a change) the output
# files ntp_parser.[ch] to be placed in the source directory,
# as opposed to the build directory. This allows a single
# host of a flock configured with Bison to update ntp_parser.[ch]
# used by the rest.
-#
+#
if VPATH_HACK
VPHACK= vphack
@@ -53,7 +54,7 @@ vphack:
#
# ylwrap script which invokes Bison replaces ntp_parser.h
# symlink with the updated file, when ntp_parser.h changes.
-# vphack_after detects this and copies the updated file to srcdir
+# vphack_after detects this and copies the updated file to srcdir
# and re-creates the ntp_parser.h symlink in its place.
#
@@ -64,79 +65,137 @@ vphack_after:
)
# BUILT_SOURCES which should also be in EXTRA_DIST
-B_S_DIST= \
- ntpd-opts.c \
- ntpd-opts.h \
+B_S_DIST= \
+ $(srcdir)/ntpd-opts.c \
+ $(srcdir)/ntpd-opts.h \
$(NULL)
BUILT_SOURCES= \
- $(VPHACK) \
- ntp_parser.c \
- ntp_parser.h \
+ $(VPHACK) \
+ $(LIBPARSE) \
+ ntp_parser.c \
+ ntp_parser.h \
$(VPHACK_AFTER) \
$(B_S_DIST) \
$(NULL)
-man_MANS= $(srcdir)/ntpd.1
+man1_MANS=
+man5_MANS= ntp.conf.5 ntp.keys.5
+man8_MANS=
+man_MANS= ntpd.$(NTPD_MS)
# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
# simulator currently uses ntpd-opts.[ch]. This also means there is no
# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
-# ntpd may need:
-# log10 refclock_wwv.o
-# sqrt ntp_control.o
-# floor refclock_wwv.o
-# which are (usually) provided by -lm.
-ntpd_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntp.a -lm @LCRYPTO@ @LSCF@
-ntpdsim_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@ @LSCF@
-ntpdsim_CFLAGS = $(CFLAGS) -DSIM
-check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
-keyword_gen_LDADD = ../libntp/libntp.a # we don't want $(LDADD) here
+LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
+LDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
+ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
+check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
+## we don't want $(LDADD) in keyword_gen_LDADD
+keyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
DISTCLEANFILES = \
keyword-gen \
.version \
version.c \
+ config.log \
+ $(man5_MANS) \
+ $(man_MANS) \
$(NULL)
CLEANFILES = \
check-saveconfig \
compsave.conf \
k-g-u-submake \
+ $(EXTRA_PROGRAMS) \
$(NULL)
EXTRA_DIST = \
- complete.conf \
+ complete.conf.in \
+ invoke-ntp.conf.menu \
+ invoke-ntp.conf.texi \
+ invoke-ntp.keys.menu \
+ invoke-ntp.keys.texi \
+ invoke-ntpd.menu \
+ invoke-ntpd.texi \
keyword-gen-utd \
- ntpd.1 \
+ ntp.conf.5man \
+ ntp.conf.5mdoc \
+ ntp.conf.def \
+ ntp.conf.man.in \
+ ntp.conf.mdoc.in \
+ ntp.conf.html \
+ ntp.conf.texi \
+ ntp.keys.5man \
+ ntp.keys.5mdoc \
+ ntp.keys.def \
+ ntp.keys.man.in \
+ ntp.keys.mdoc.in \
+ ntp.keys.html \
+ ntp.keys.texi \
ntpd-opts.def \
- ntpd-opts.menu \
- ntpd-opts.texi \
+ ntpd.1ntpdman \
+ ntpd.1ntpdmdoc \
+ ntpd.man.in \
+ ntpd.mdoc.in \
+ ntpd.html \
+ ntpd.texi \
ntpdbase-opts.def \
refclock_msfees.c \
- refclock_trak.c \
$(B_S_DIST) \
$(NULL)
-ETAGS_ARGS = Makefile.am
### Y2Kfixes
check_PROGRAMS = @MAKE_CHECK_Y2K@
-EXTRA_PROGRAMS = check_y2k ntpdsim keyword-gen
-noinst_DATA = $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/version.def
+EXTRA_PROGRAMS = check_y2k keyword-gen ntpd ntpdsim
+
+html_DATA= \
+ $(srcdir)/ntp.conf.html \
+ $(srcdir)/ntp.keys.html \
+ $(srcdir)/ntpd.html \
+ $(NULL)
-check-local: @MAKE_CHECK_Y2K@ $(CHECK_SAVECONFIG)
- test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+noinst_DATA = \
+ $(srcdir)/invoke-ntp.conf.menu \
+ $(srcdir)/invoke-ntp.conf.texi \
+ $(srcdir)/invoke-ntp.keys.menu \
+ $(srcdir)/invoke-ntp.keys.texi \
+ $(srcdir)/invoke-ntpd.menu \
+ $(srcdir)/invoke-ntpd.texi \
+ $(srcdir)/ntp.conf.man.in \
+ $(srcdir)/ntp.conf.mdoc.in \
+ $(srcdir)/ntp.keys.man.in \
+ $(srcdir)/ntp.keys.mdoc.in \
+ $(srcdir)/ntpd.man.in \
+ $(srcdir)/ntpd.mdoc.in \
+ $(NULL)
+
+noinst_HEADERS = \
+ declcond.h \
+ ntp_leapsec.h \
+ $(NULL)
+
+install-data-local: install-html
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
+ test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
ntpd_SOURCES = \
- cmd_args.c \
ntp_config.c \
- ntp_data_structures.c \
ntp_keyword.h \
ntp_io.c \
ntp_parser.y \
@@ -146,20 +205,22 @@ ntpd_SOURCES = \
ntpd-opts.c \
ntpd-opts.h \
$(NULL)
-
+
ntpdsim_SOURCES = \
$(ntpd_SOURCES) \
+ ntp_prio_q.c \
ntpsim.c \
$(NULL)
# libntpd_a_SOURCES do not use #ifdef SIM
libntpd_a_SOURCES = \
+ cmd_args.c \
jupiter.h \
ntp_control.c \
ntp_crypto.c \
ntp_filegen.c \
- ntp_intres.c \
+ ntp_leapsec.c \
ntp_loopfilter.c \
ntp_monitor.c \
ntp_peer.c \
@@ -183,6 +244,7 @@ libntpd_a_SOURCES = \
refclock_datum.c \
refclock_dumbclock.c \
refclock_fg.c \
+ refclock_gpsdjson.c \
refclock_gpsvme.c \
refclock_heath.c \
refclock_hopfser.c \
@@ -211,6 +273,7 @@ libntpd_a_SOURCES = \
refclock_wwv.c \
refclock_wwvb.c \
refclock_zyfer.c \
+ refclock_tsyncpci.c \
$(NULL)
k-g-u-submake: keyword-gen
@@ -226,53 +289,150 @@ k-g-u-submake: keyword-gen
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
- $(MAKE) k-g-u-submake # avoid explicit dependency
+ $(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
mv -f k-g-u $@
-
+
$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
@: do-nothing action to avoid default SCCS get
@: .h updated if needed by k-g-u-submake rule
$(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
-
+
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
$(run_ag) ntpd-opts.def
-$(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def
+###
+
+$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
+
+$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
+ mv $(srcdir)/ntpd.man.in+ $(srcdir)/ntpd.man.in
+
+###
-$(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.texi
+$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
+
+$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
+ mv $(srcdir)/ntpd.mdoc.in+ $(srcdir)/ntpd.mdoc.in
+
+###
+
+ntpd.$(NTPD_MS): $(srcdir)/ntpd.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpd.$(NTPD_MS)+:$(srcdir)/ntpd.$(MANTAGFMT).in
+ mv ntpd.$(NTPD_MS)+ ntpd.$(NTPD_MS)
+
+###
+
+$(srcdir)/invoke-ntp.conf.menu: $(srcdir)/invoke-ntp.conf.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-
-$(srcdir)/ntpd-opts.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def
- $(top_srcdir)/scripts/check--help $@
-$(PROGRAMS): $(LDADD)
+$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
-compsave.conf: ntpd $(srcdir)/complete.conf
- ./ntpd --configfile $(srcdir)/complete.conf --saveconfigquit $@
+$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
-check-saveconfig: $(srcdir)/complete.conf compsave.conf
- cmp $(srcdir)/complete.conf compsave.conf && echo stamp > $@
+$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
-../libopts/libopts.la:
- cd ../libopts && $(MAKE) libopts.la
+$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) libntp.a
+$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.keys.html ntp.keys.texi || true )
+
+$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpd.html ntpd.texi || true )
+
+###
+
+$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
+
+$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
+ mv $(srcdir)/ntp.conf.man.in+ $(srcdir)/ntp.conf.man.in
+
+###
+
+$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
+
+$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
+ mv $(srcdir)/ntp.conf.mdoc.in+ $(srcdir)/ntp.conf.mdoc.in
+
+###
+
+ntp.conf.5: $(srcdir)/ntp.conf.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp.conf.5+:$(srcdir)/ntp.conf.$(MANTAGFMT).in
+ mv ntp.conf.5+ ntp.conf.5
+
+###
+
+$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
+
+$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
+ mv $(srcdir)/ntp.keys.man.in+ $(srcdir)/ntp.keys.man.in
+
+###
+
+$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
+
+$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
+ mv $(srcdir)/ntp.keys.mdoc.in+ $(srcdir)/ntp.keys.mdoc.in
+
+###
+
+ntp.keys.5: $(srcdir)/ntp.keys.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp.keys.5+:$(srcdir)/ntp.keys.$(MANTAGFMT).in
+ mv ntp.keys.5+ ntp.keys.5
+
+###
+
+$(srcdir)/invoke-ntpd.menu: $(srcdir)/invoke-ntpd.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(PROGRAMS): $(LDADD)
+
+compsave.conf: ntpd complete.conf
+ ./ntpd --configfile complete.conf --saveconfigquit $@
+
+check-saveconfig: complete.conf compsave.conf
+ -diff -u complete.conf compsave.conf
+ cmp complete.conf compsave.conf && echo stamp > $@
+
+../libntp/libntpsim.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntpsim.a
../libparse/libparse.a:
- cd ../libparse && $(MAKE) libparse.a
+ cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
+
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version:
- cd $(top_srcdir) && $(MAKE) version
+version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
-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
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in
index 1a5c03bf64a1..ae050114fd53 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -21,6 +21,7 @@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -40,50 +41,80 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = ntpd$(EXEEXT) @MAKE_NTPDSIM@
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = ntpd$(EXEEXT) \
-@NTP_BINSUBDIR_IS_BIN_FALSE@ @MAKE_NTPDSIM@ $(am__empty)
-EXTRA_PROGRAMS = check_y2k$(EXEEXT) ntpdsim$(EXEEXT) \
- keyword-gen$(EXEEXT)
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf \
- ntp_parser.c ntp_parser.h
+EXTRA_PROGRAMS = check_y2k$(EXEEXT) keyword-gen$(EXEEXT) ntpd$(EXEEXT) \
+ ntpdsim$(EXEEXT)
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/complete.conf.in \
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf ntp_parser.c ntp_parser.h
subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = complete.conf
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
libntpd_a_AR = $(AR) $(ARFLAGS)
libntpd_a_LIBADD =
am__objects_1 =
-am_libntpd_a_OBJECTS = ntp_control.$(OBJEXT) ntp_crypto.$(OBJEXT) \
- ntp_filegen.$(OBJEXT) ntp_intres.$(OBJEXT) \
- ntp_loopfilter.$(OBJEXT) ntp_monitor.$(OBJEXT) \
- ntp_peer.$(OBJEXT) ntp_proto.$(OBJEXT) ntp_refclock.$(OBJEXT) \
- ntp_request.$(OBJEXT) ntp_restrict.$(OBJEXT) \
- ntp_signd.$(OBJEXT) ntp_timer.$(OBJEXT) ntp_util.$(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) \
+am_libntpd_a_OBJECTS = cmd_args.$(OBJEXT) ntp_control.$(OBJEXT) \
+ ntp_crypto.$(OBJEXT) ntp_filegen.$(OBJEXT) \
+ ntp_leapsec.$(OBJEXT) ntp_loopfilter.$(OBJEXT) \
+ ntp_monitor.$(OBJEXT) ntp_peer.$(OBJEXT) ntp_proto.$(OBJEXT) \
+ ntp_refclock.$(OBJEXT) ntp_request.$(OBJEXT) \
+ ntp_restrict.$(OBJEXT) ntp_signd.$(OBJEXT) ntp_timer.$(OBJEXT) \
+ ntp_util.$(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_gpsdjson.$(OBJEXT) \
refclock_gpsvme.$(OBJEXT) refclock_heath.$(OBJEXT) \
refclock_hopfser.$(OBJEXT) refclock_hopfpci.$(OBJEXT) \
refclock_hpgps.$(OBJEXT) refclock_irig.$(OBJEXT) \
@@ -97,57 +128,77 @@ am_libntpd_a_OBJECTS = ntp_control.$(OBJEXT) ntp_crypto.$(OBJEXT) \
refclock_tpro.$(OBJEXT) refclock_true.$(OBJEXT) \
refclock_tt560.$(OBJEXT) refclock_ulink.$(OBJEXT) \
refclock_wwv.$(OBJEXT) refclock_wwvb.$(OBJEXT) \
- refclock_zyfer.$(OBJEXT) $(am__objects_1)
+ refclock_zyfer.$(OBJEXT) refclock_tsyncpci.$(OBJEXT) \
+ $(am__objects_1)
libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" \
+ "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
check_y2k_SOURCES = check_y2k.c
check_y2k_OBJECTS = check_y2k.$(OBJEXT)
-am__DEPENDENCIES_1 = version.o libntpd.a
-check_y2k_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libntp/libntp.a
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = version.o libntpd.a $(am__DEPENDENCIES_1)
+check_y2k_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
keyword_gen_SOURCES = keyword-gen.c
keyword_gen_OBJECTS = keyword-gen.$(OBJEXT)
-keyword_gen_DEPENDENCIES = ../libntp/libntp.a
-am_ntpd_OBJECTS = cmd_args.$(OBJEXT) ntp_config.$(OBJEXT) \
- ntp_data_structures.$(OBJEXT) ntp_io.$(OBJEXT) \
+keyword_gen_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_ntpd_OBJECTS = ntp_config.$(OBJEXT) ntp_io.$(OBJEXT) \
ntp_parser.$(OBJEXT) ntp_scanner.$(OBJEXT) ntpd.$(OBJEXT) \
ntpd-opts.$(OBJEXT) $(am__objects_1)
ntpd_OBJECTS = $(am_ntpd_OBJECTS)
-am__DEPENDENCIES_2 =
-ntpd_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- ../libntp/libntp.a
-am__objects_2 = ntpdsim-cmd_args.$(OBJEXT) \
- ntpdsim-ntp_config.$(OBJEXT) \
- ntpdsim-ntp_data_structures.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
+am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ntpd_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_3)
+am__objects_2 = ntpdsim-ntp_config.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
ntpdsim-ntp_parser.$(OBJEXT) ntpdsim-ntp_scanner.$(OBJEXT) \
ntpdsim-ntpd.$(OBJEXT) ntpdsim-ntpd-opts.$(OBJEXT) \
$(am__objects_1)
-am_ntpdsim_OBJECTS = $(am__objects_2) ntpdsim-ntpsim.$(OBJEXT) \
- $(am__objects_1)
+am_ntpdsim_OBJECTS = $(am__objects_2) ntpdsim-ntp_prio_q.$(OBJEXT) \
+ ntpdsim-ntpsim.$(OBJEXT) $(am__objects_1)
ntpdsim_OBJECTS = $(am_ntpdsim_OBJECTS)
-ntpdsim_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- ../libntp/libntpsim.a
-ntpdsim_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(ntpdsim_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+ntpdsim_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntpsim.a \
+ $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
-YLWRAP = $(top_srcdir)/ylwrap
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
+AM_V_YACC = $(am__v_YACC_$(V))
+am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY))
+am__v_YACC_0 = @echo " YACC " $@;
+YLWRAP = $(top_srcdir)/sntp/libevent/build-aux/ylwrap
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libntpd_a_SOURCES) check_y2k.c keyword-gen.c \
$(ntpd_SOURCES) $(ntpdsim_SOURCES)
DIST_SOURCES = $(libntpd_a_SOURCES) check_y2k.c keyword-gen.c \
@@ -174,27 +225,42 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man5_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -206,21 +272,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -228,6 +304,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -246,14 +323,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -266,10 +397,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -277,9 +410,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -288,6 +439,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -336,15 +488,16 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
+bin_PROGRAMS = $(NTPD_DB) $(NTPDSIM_DB)
+libexec_PROGRAMS = $(NTPD_DL) $(NTPDSIM_DL)
+sbin_PROGRAMS = $(NTPD_DS) $(NTPDSIM_DS)
noinst_LIBRARIES = libntpd.a
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
-
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB.
-LDADD = version.o libntpd.a @LIBPARSE@
+LDADD = version.o libntpd.a $(LIBPARSE)
AM_YFLAGS = -d -t -r all
@NTP_CROSSCOMPILE_FALSE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = check-saveconfig
@NTP_CROSSCOMPILE_TRUE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG =
@@ -352,79 +505,132 @@ AM_YFLAGS = -d -t -r all
@VPATH_HACK_FALSE@VPHACK =
#
-# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
+# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
# BSD make) to work around issues specific to compiling
-# ntp_parser.y into ntp_parser.h and ntp_parser.c in a vPATH
+# ntp_parser.y into ntp_parser.h and ntp_parser.c in a VPATH
# configuration where we would like (for a change) the output
# files ntp_parser.[ch] to be placed in the source directory,
# as opposed to the build directory. This allows a single
# host of a flock configured with Bison to update ntp_parser.[ch]
# used by the rest.
-#
+#
@VPATH_HACK_TRUE@VPHACK = vphack
@VPATH_HACK_FALSE@VPHACK_AFTER =
@VPATH_HACK_TRUE@VPHACK_AFTER = vphack_after
# BUILT_SOURCES which should also be in EXTRA_DIST
B_S_DIST = \
- ntpd-opts.c \
- ntpd-opts.h \
+ $(srcdir)/ntpd-opts.c \
+ $(srcdir)/ntpd-opts.h \
$(NULL)
-BUILT_SOURCES = $(VPHACK) ntp_parser.c ntp_parser.h $(VPHACK_AFTER) \
- $(B_S_DIST) $(NULL) .deps-ver
-man_MANS = $(srcdir)/ntpd.1
+BUILT_SOURCES = $(VPHACK) $(LIBPARSE) ntp_parser.c ntp_parser.h \
+ $(VPHACK_AFTER) $(B_S_DIST) $(NULL) check-libopts check-libntp \
+ .deps-ver
+man1_MANS =
+man5_MANS = ntp.conf.5 ntp.keys.5
+man8_MANS =
+man_MANS = ntpd.$(NTPD_MS)
# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
# simulator currently uses ntpd-opts.[ch]. This also means there is no
# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
-
-# ntpd may need:
-# log10 refclock_wwv.o
-# sqrt ntp_control.o
-# floor refclock_wwv.o
-# which are (usually) provided by -lm.
-ntpd_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntp.a -lm @LCRYPTO@ @LSCF@
-ntpdsim_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@ @LSCF@
-ntpdsim_CFLAGS = $(CFLAGS) -DSIM
-check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
-keyword_gen_LDADD = ../libntp/libntp.a # we don't want $(LDADD) here
+LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS) \
+ $(LIBM) $(LDADD_NTP) $(LSCF)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
+ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
+check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
+keyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
DISTCLEANFILES = \
keyword-gen \
.version \
version.c \
+ config.log \
+ $(man5_MANS) \
+ $(man_MANS) \
$(NULL)
-CLEANFILES = check-saveconfig compsave.conf k-g-u-submake $(NULL) \
- .deps-ver
+CLEANFILES = check-saveconfig compsave.conf k-g-u-submake \
+ $(EXTRA_PROGRAMS) $(NULL) check-libopts check-libntp .deps-ver
EXTRA_DIST = \
- complete.conf \
+ complete.conf.in \
+ invoke-ntp.conf.menu \
+ invoke-ntp.conf.texi \
+ invoke-ntp.keys.menu \
+ invoke-ntp.keys.texi \
+ invoke-ntpd.menu \
+ invoke-ntpd.texi \
keyword-gen-utd \
- ntpd.1 \
+ ntp.conf.5man \
+ ntp.conf.5mdoc \
+ ntp.conf.def \
+ ntp.conf.man.in \
+ ntp.conf.mdoc.in \
+ ntp.conf.html \
+ ntp.conf.texi \
+ ntp.keys.5man \
+ ntp.keys.5mdoc \
+ ntp.keys.def \
+ ntp.keys.man.in \
+ ntp.keys.mdoc.in \
+ ntp.keys.html \
+ ntp.keys.texi \
ntpd-opts.def \
- ntpd-opts.menu \
- ntpd-opts.texi \
+ ntpd.1ntpdman \
+ ntpd.1ntpdmdoc \
+ ntpd.man.in \
+ ntpd.mdoc.in \
+ ntpd.html \
+ ntpd.texi \
ntpdbase-opts.def \
refclock_msfees.c \
- refclock_trak.c \
$(B_S_DIST) \
$(NULL)
-ETAGS_ARGS = Makefile.am
+
### Y2Kfixes
check_PROGRAMS = @MAKE_CHECK_Y2K@
-noinst_DATA = $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
+html_DATA = \
+ $(srcdir)/ntp.conf.html \
+ $(srcdir)/ntp.keys.html \
+ $(srcdir)/ntpd.html \
+ $(NULL)
-std_def_list = $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/version.def
+noinst_DATA = \
+ $(srcdir)/invoke-ntp.conf.menu \
+ $(srcdir)/invoke-ntp.conf.texi \
+ $(srcdir)/invoke-ntp.keys.menu \
+ $(srcdir)/invoke-ntp.keys.texi \
+ $(srcdir)/invoke-ntpd.menu \
+ $(srcdir)/invoke-ntpd.texi \
+ $(srcdir)/ntp.conf.man.in \
+ $(srcdir)/ntp.conf.mdoc.in \
+ $(srcdir)/ntp.keys.man.in \
+ $(srcdir)/ntp.keys.mdoc.in \
+ $(srcdir)/ntpd.man.in \
+ $(srcdir)/ntpd.mdoc.in \
+ $(NULL)
+
+noinst_HEADERS = \
+ declcond.h \
+ ntp_leapsec.h \
+ $(NULL)
+
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
ntpd_SOURCES = \
- cmd_args.c \
ntp_config.c \
- ntp_data_structures.c \
ntp_keyword.h \
ntp_io.c \
ntp_parser.y \
@@ -437,17 +643,19 @@ ntpd_SOURCES = \
ntpdsim_SOURCES = \
$(ntpd_SOURCES) \
+ ntp_prio_q.c \
ntpsim.c \
$(NULL)
# libntpd_a_SOURCES do not use #ifdef SIM
libntpd_a_SOURCES = \
+ cmd_args.c \
jupiter.h \
ntp_control.c \
ntp_crypto.c \
ntp_filegen.c \
- ntp_intres.c \
+ ntp_leapsec.c \
ntp_loopfilter.c \
ntp_monitor.c \
ntp_peer.c \
@@ -471,6 +679,7 @@ libntpd_a_SOURCES = \
refclock_datum.c \
refclock_dumbclock.c \
refclock_fg.c \
+ refclock_gpsdjson.c \
refclock_gpsvme.c \
refclock_heath.c \
refclock_hopfser.c \
@@ -499,14 +708,18 @@ libntpd_a_SOURCES = \
refclock_wwv.c \
refclock_wwvb.c \
refclock_zyfer.c \
+ refclock_tsyncpci.c \
$(NULL)
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj .y
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -536,13 +749,15 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+complete.conf: $(top_builddir)/config.status $(srcdir)/complete.conf.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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
+ $(AM_V_at)-rm -f libntpd.a
+ $(AM_V_AR)$(libntpd_a_AR) libntpd.a $(libntpd_a_OBJECTS) $(libntpd_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libntpd.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -595,6 +810,49 @@ clean-checkPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -640,10 +898,10 @@ clean-sbinPROGRAMS:
rm -f $$list
check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
@rm -f check_y2k$(EXEEXT)
- $(LINK) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
keyword-gen$(EXEEXT): $(keyword_gen_OBJECTS) $(keyword_gen_DEPENDENCIES)
@rm -f keyword-gen$(EXEEXT)
- $(LINK) $(keyword_gen_OBJECTS) $(keyword_gen_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(keyword_gen_OBJECTS) $(keyword_gen_LDADD) $(LIBS)
ntp_parser.h: ntp_parser.c
@if test ! -f $@; then \
rm -f ntp_parser.c; \
@@ -651,10 +909,10 @@ ntp_parser.h: ntp_parser.c
else :; fi
ntpd$(EXEEXT): $(ntpd_OBJECTS) $(ntpd_DEPENDENCIES)
@rm -f ntpd$(EXEEXT)
- $(LINK) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpd_OBJECTS) $(ntpd_LDADD) $(LIBS)
ntpdsim$(EXEEXT): $(ntpdsim_OBJECTS) $(ntpdsim_DEPENDENCIES)
@rm -f ntpdsim$(EXEEXT)
- $(ntpdsim_LINK) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpdsim_OBJECTS) $(ntpdsim_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -668,10 +926,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_config.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_control.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_crypto.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_data_structures.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_filegen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_intres.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_io.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_leapsec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_loopfilter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_monitor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_parser.Po@am__quote@
@@ -686,11 +943,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_util.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd-opts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-cmd_args.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_config.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_data_structures.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_io.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_prio_q.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntp_scanner.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd-opts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdsim-ntpd.Po@am__quote@
@@ -707,6 +963,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_datum.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_dumbclock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_fg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsdjson.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_gpsvme.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_heath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_hopfpci.Po@am__quote@
@@ -729,6 +986,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_shm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tpro.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_true.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tsyncpci.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_tt560.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_ulink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_wwv.Po@am__quote@
@@ -736,164 +994,169 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refclock_zyfer.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-ntpdsim-cmd_args.o: cmd_args.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args.o -MD -MP -MF $(DEPDIR)/ntpdsim-cmd_args.Tpo -c -o ntpdsim-cmd_args.o `test -f 'cmd_args.c' || echo '$(srcdir)/'`cmd_args.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-cmd_args.Tpo $(DEPDIR)/ntpdsim-cmd_args.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args.c' object='ntpdsim-cmd_args.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args.o `test -f 'cmd_args.c' || echo '$(srcdir)/'`cmd_args.c
-
-ntpdsim-cmd_args.obj: cmd_args.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-cmd_args.obj -MD -MP -MF $(DEPDIR)/ntpdsim-cmd_args.Tpo -c -o ntpdsim-cmd_args.obj `if test -f 'cmd_args.c'; then $(CYGPATH_W) 'cmd_args.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-cmd_args.Tpo $(DEPDIR)/ntpdsim-cmd_args.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmd_args.c' object='ntpdsim-cmd_args.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-cmd_args.obj `if test -f 'cmd_args.c'; then $(CYGPATH_W) 'cmd_args.c'; else $(CYGPATH_W) '$(srcdir)/cmd_args.c'; fi`
-
ntpdsim-ntp_config.o: ntp_config.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config.Tpo -c -o ntpdsim-ntp_config.o `test -f 'ntp_config.c' || echo '$(srcdir)/'`ntp_config.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_config.Tpo $(DEPDIR)/ntpdsim-ntp_config.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config.Tpo -c -o ntpdsim-ntp_config.o `test -f 'ntp_config.c' || echo '$(srcdir)/'`ntp_config.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_config.Tpo $(DEPDIR)/ntpdsim-ntp_config.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config.c' object='ntpdsim-ntp_config.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config.o `test -f 'ntp_config.c' || echo '$(srcdir)/'`ntp_config.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config.o `test -f 'ntp_config.c' || echo '$(srcdir)/'`ntp_config.c
ntpdsim-ntp_config.obj: ntp_config.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config.Tpo -c -o ntpdsim-ntp_config.obj `if test -f 'ntp_config.c'; then $(CYGPATH_W) 'ntp_config.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_config.Tpo $(DEPDIR)/ntpdsim-ntp_config.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_config.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_config.Tpo -c -o ntpdsim-ntp_config.obj `if test -f 'ntp_config.c'; then $(CYGPATH_W) 'ntp_config.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_config.Tpo $(DEPDIR)/ntpdsim-ntp_config.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_config.c' object='ntpdsim-ntp_config.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config.obj `if test -f 'ntp_config.c'; then $(CYGPATH_W) 'ntp_config.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config.c'; fi`
-
-ntpdsim-ntp_data_structures.o: ntp_data_structures.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_data_structures.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_data_structures.Tpo -c -o ntpdsim-ntp_data_structures.o `test -f 'ntp_data_structures.c' || echo '$(srcdir)/'`ntp_data_structures.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_data_structures.Tpo $(DEPDIR)/ntpdsim-ntp_data_structures.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_data_structures.c' object='ntpdsim-ntp_data_structures.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_data_structures.o `test -f 'ntp_data_structures.c' || echo '$(srcdir)/'`ntp_data_structures.c
-
-ntpdsim-ntp_data_structures.obj: ntp_data_structures.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_data_structures.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_data_structures.Tpo -c -o ntpdsim-ntp_data_structures.obj `if test -f 'ntp_data_structures.c'; then $(CYGPATH_W) 'ntp_data_structures.c'; else $(CYGPATH_W) '$(srcdir)/ntp_data_structures.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_data_structures.Tpo $(DEPDIR)/ntpdsim-ntp_data_structures.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_data_structures.c' object='ntpdsim-ntp_data_structures.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_data_structures.obj `if test -f 'ntp_data_structures.c'; then $(CYGPATH_W) 'ntp_data_structures.c'; else $(CYGPATH_W) '$(srcdir)/ntp_data_structures.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_config.obj `if test -f 'ntp_config.c'; then $(CYGPATH_W) 'ntp_config.c'; else $(CYGPATH_W) '$(srcdir)/ntp_config.c'; fi`
ntpdsim-ntp_io.o: ntp_io.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io.Tpo -c -o ntpdsim-ntp_io.o `test -f 'ntp_io.c' || echo '$(srcdir)/'`ntp_io.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_io.Tpo $(DEPDIR)/ntpdsim-ntp_io.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io.Tpo -c -o ntpdsim-ntp_io.o `test -f 'ntp_io.c' || echo '$(srcdir)/'`ntp_io.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_io.Tpo $(DEPDIR)/ntpdsim-ntp_io.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io.c' object='ntpdsim-ntp_io.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io.o `test -f 'ntp_io.c' || echo '$(srcdir)/'`ntp_io.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io.o `test -f 'ntp_io.c' || echo '$(srcdir)/'`ntp_io.c
ntpdsim-ntp_io.obj: ntp_io.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io.Tpo -c -o ntpdsim-ntp_io.obj `if test -f 'ntp_io.c'; then $(CYGPATH_W) 'ntp_io.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_io.Tpo $(DEPDIR)/ntpdsim-ntp_io.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_io.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_io.Tpo -c -o ntpdsim-ntp_io.obj `if test -f 'ntp_io.c'; then $(CYGPATH_W) 'ntp_io.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_io.Tpo $(DEPDIR)/ntpdsim-ntp_io.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_io.c' object='ntpdsim-ntp_io.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io.obj `if test -f 'ntp_io.c'; then $(CYGPATH_W) 'ntp_io.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_io.obj `if test -f 'ntp_io.c'; then $(CYGPATH_W) 'ntp_io.c'; else $(CYGPATH_W) '$(srcdir)/ntp_io.c'; fi`
ntpdsim-ntp_parser.o: ntp_parser.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_parser.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_parser.Tpo -c -o ntpdsim-ntp_parser.o `test -f 'ntp_parser.c' || echo '$(srcdir)/'`ntp_parser.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_parser.Tpo $(DEPDIR)/ntpdsim-ntp_parser.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_parser.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_parser.Tpo -c -o ntpdsim-ntp_parser.o `test -f 'ntp_parser.c' || echo '$(srcdir)/'`ntp_parser.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_parser.Tpo $(DEPDIR)/ntpdsim-ntp_parser.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_parser.c' object='ntpdsim-ntp_parser.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_parser.o `test -f 'ntp_parser.c' || echo '$(srcdir)/'`ntp_parser.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_parser.o `test -f 'ntp_parser.c' || echo '$(srcdir)/'`ntp_parser.c
ntpdsim-ntp_parser.obj: ntp_parser.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_parser.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_parser.Tpo -c -o ntpdsim-ntp_parser.obj `if test -f 'ntp_parser.c'; then $(CYGPATH_W) 'ntp_parser.c'; else $(CYGPATH_W) '$(srcdir)/ntp_parser.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_parser.Tpo $(DEPDIR)/ntpdsim-ntp_parser.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_parser.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_parser.Tpo -c -o ntpdsim-ntp_parser.obj `if test -f 'ntp_parser.c'; then $(CYGPATH_W) 'ntp_parser.c'; else $(CYGPATH_W) '$(srcdir)/ntp_parser.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_parser.Tpo $(DEPDIR)/ntpdsim-ntp_parser.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_parser.c' object='ntpdsim-ntp_parser.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_parser.obj `if test -f 'ntp_parser.c'; then $(CYGPATH_W) 'ntp_parser.c'; else $(CYGPATH_W) '$(srcdir)/ntp_parser.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_parser.obj `if test -f 'ntp_parser.c'; then $(CYGPATH_W) 'ntp_parser.c'; else $(CYGPATH_W) '$(srcdir)/ntp_parser.c'; fi`
ntpdsim-ntp_scanner.o: ntp_scanner.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_scanner.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_scanner.Tpo -c -o ntpdsim-ntp_scanner.o `test -f 'ntp_scanner.c' || echo '$(srcdir)/'`ntp_scanner.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_scanner.Tpo $(DEPDIR)/ntpdsim-ntp_scanner.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_scanner.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_scanner.Tpo -c -o ntpdsim-ntp_scanner.o `test -f 'ntp_scanner.c' || echo '$(srcdir)/'`ntp_scanner.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_scanner.Tpo $(DEPDIR)/ntpdsim-ntp_scanner.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_scanner.c' object='ntpdsim-ntp_scanner.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_scanner.o `test -f 'ntp_scanner.c' || echo '$(srcdir)/'`ntp_scanner.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_scanner.o `test -f 'ntp_scanner.c' || echo '$(srcdir)/'`ntp_scanner.c
ntpdsim-ntp_scanner.obj: ntp_scanner.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_scanner.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_scanner.Tpo -c -o ntpdsim-ntp_scanner.obj `if test -f 'ntp_scanner.c'; then $(CYGPATH_W) 'ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/ntp_scanner.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntp_scanner.Tpo $(DEPDIR)/ntpdsim-ntp_scanner.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_scanner.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_scanner.Tpo -c -o ntpdsim-ntp_scanner.obj `if test -f 'ntp_scanner.c'; then $(CYGPATH_W) 'ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/ntp_scanner.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_scanner.Tpo $(DEPDIR)/ntpdsim-ntp_scanner.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_scanner.c' object='ntpdsim-ntp_scanner.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_scanner.obj `if test -f 'ntp_scanner.c'; then $(CYGPATH_W) 'ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/ntp_scanner.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_scanner.obj `if test -f 'ntp_scanner.c'; then $(CYGPATH_W) 'ntp_scanner.c'; else $(CYGPATH_W) '$(srcdir)/ntp_scanner.c'; fi`
ntpdsim-ntpd.o: ntpd.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd.Tpo -c -o ntpdsim-ntpd.o `test -f 'ntpd.c' || echo '$(srcdir)/'`ntpd.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd.Tpo $(DEPDIR)/ntpdsim-ntpd.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd.Tpo -c -o ntpdsim-ntpd.o `test -f 'ntpd.c' || echo '$(srcdir)/'`ntpd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpd.Tpo $(DEPDIR)/ntpdsim-ntpd.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd.c' object='ntpdsim-ntpd.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd.o `test -f 'ntpd.c' || echo '$(srcdir)/'`ntpd.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd.o `test -f 'ntpd.c' || echo '$(srcdir)/'`ntpd.c
ntpdsim-ntpd.obj: ntpd.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd.Tpo -c -o ntpdsim-ntpd.obj `if test -f 'ntpd.c'; then $(CYGPATH_W) 'ntpd.c'; else $(CYGPATH_W) '$(srcdir)/ntpd.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd.Tpo $(DEPDIR)/ntpdsim-ntpd.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd.Tpo -c -o ntpdsim-ntpd.obj `if test -f 'ntpd.c'; then $(CYGPATH_W) 'ntpd.c'; else $(CYGPATH_W) '$(srcdir)/ntpd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpd.Tpo $(DEPDIR)/ntpdsim-ntpd.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd.c' object='ntpdsim-ntpd.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd.obj `if test -f 'ntpd.c'; then $(CYGPATH_W) 'ntpd.c'; else $(CYGPATH_W) '$(srcdir)/ntpd.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd.obj `if test -f 'ntpd.c'; then $(CYGPATH_W) 'ntpd.c'; else $(CYGPATH_W) '$(srcdir)/ntpd.c'; fi`
ntpdsim-ntpd-opts.o: ntpd-opts.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts.Tpo -c -o ntpdsim-ntpd-opts.o `test -f 'ntpd-opts.c' || echo '$(srcdir)/'`ntpd-opts.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts.Tpo $(DEPDIR)/ntpdsim-ntpd-opts.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts.Tpo -c -o ntpdsim-ntpd-opts.o `test -f 'ntpd-opts.c' || echo '$(srcdir)/'`ntpd-opts.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts.Tpo $(DEPDIR)/ntpdsim-ntpd-opts.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd-opts.c' object='ntpdsim-ntpd-opts.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts.o `test -f 'ntpd-opts.c' || echo '$(srcdir)/'`ntpd-opts.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts.o `test -f 'ntpd-opts.c' || echo '$(srcdir)/'`ntpd-opts.c
ntpdsim-ntpd-opts.obj: ntpd-opts.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts.Tpo -c -o ntpdsim-ntpd-opts.obj `if test -f 'ntpd-opts.c'; then $(CYGPATH_W) 'ntpd-opts.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts.Tpo $(DEPDIR)/ntpdsim-ntpd-opts.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpd-opts.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpd-opts.Tpo -c -o ntpdsim-ntpd-opts.obj `if test -f 'ntpd-opts.c'; then $(CYGPATH_W) 'ntpd-opts.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpd-opts.Tpo $(DEPDIR)/ntpdsim-ntpd-opts.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpd-opts.c' object='ntpdsim-ntpd-opts.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts.obj `if test -f 'ntpd-opts.c'; then $(CYGPATH_W) 'ntpd-opts.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpd-opts.obj `if test -f 'ntpd-opts.c'; then $(CYGPATH_W) 'ntpd-opts.c'; else $(CYGPATH_W) '$(srcdir)/ntpd-opts.c'; fi`
+
+ntpdsim-ntp_prio_q.o: ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_prio_q.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_prio_q.Tpo -c -o ntpdsim-ntp_prio_q.o `test -f 'ntp_prio_q.c' || echo '$(srcdir)/'`ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_prio_q.Tpo $(DEPDIR)/ntpdsim-ntp_prio_q.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_prio_q.c' object='ntpdsim-ntp_prio_q.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_prio_q.o `test -f 'ntp_prio_q.c' || echo '$(srcdir)/'`ntp_prio_q.c
+
+ntpdsim-ntp_prio_q.obj: ntp_prio_q.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntp_prio_q.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntp_prio_q.Tpo -c -o ntpdsim-ntp_prio_q.obj `if test -f 'ntp_prio_q.c'; then $(CYGPATH_W) 'ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/ntp_prio_q.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntp_prio_q.Tpo $(DEPDIR)/ntpdsim-ntp_prio_q.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntp_prio_q.c' object='ntpdsim-ntp_prio_q.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntp_prio_q.obj `if test -f 'ntp_prio_q.c'; then $(CYGPATH_W) 'ntp_prio_q.c'; else $(CYGPATH_W) '$(srcdir)/ntp_prio_q.c'; fi`
ntpdsim-ntpsim.o: ntpsim.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim.Tpo -c -o ntpdsim-ntpsim.o `test -f 'ntpsim.c' || echo '$(srcdir)/'`ntpsim.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpsim.Tpo $(DEPDIR)/ntpdsim-ntpsim.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim.o -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim.Tpo -c -o ntpdsim-ntpsim.o `test -f 'ntpsim.c' || echo '$(srcdir)/'`ntpsim.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpsim.Tpo $(DEPDIR)/ntpdsim-ntpsim.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim.c' object='ntpdsim-ntpsim.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.o `test -f 'ntpsim.c' || echo '$(srcdir)/'`ntpsim.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.o `test -f 'ntpsim.c' || echo '$(srcdir)/'`ntpsim.c
ntpdsim-ntpsim.obj: ntpsim.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim.Tpo -c -o ntpdsim-ntpsim.obj `if test -f 'ntpsim.c'; then $(CYGPATH_W) 'ntpsim.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ntpdsim-ntpsim.Tpo $(DEPDIR)/ntpdsim-ntpsim.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntpdsim-ntpsim.obj -MD -MP -MF $(DEPDIR)/ntpdsim-ntpsim.Tpo -c -o ntpdsim-ntpsim.obj `if test -f 'ntpsim.c'; then $(CYGPATH_W) 'ntpsim.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntpdsim-ntpsim.Tpo $(DEPDIR)/ntpdsim-ntpsim.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntpsim.c' object='ntpdsim-ntpsim.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ntpdsim_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.obj `if test -f 'ntpsim.c'; then $(CYGPATH_W) 'ntpsim.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ntpdsim_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntpdsim-ntpsim.obj `if test -f 'ntpsim.c'; then $(CYGPATH_W) 'ntpsim.c'; else $(CYGPATH_W) '$(srcdir)/ntpsim.c'; fi`
.y.c:
- $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
+ $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -919,7 +1182,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -928,6 +1191,102 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man5: $(man5_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
+ @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man5:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1029,9 +1388,9 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA)
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -1068,8 +1427,8 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS \
- mostlyclean-am
+ clean-libexecPROGRAMS clean-libtool clean-noinstLIBRARIES \
+ clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -1089,13 +1448,14 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-data-local install-htmlDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -1106,7 +1466,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man5 install-man8
install-pdf: install-pdf-am
@@ -1136,30 +1496,34 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
.MAKE: all check check-am install install-am install-exec-am \
install-strip
.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-exec-hook install-html \
- install-html-am install-info install-info-am install-man \
- install-man1 install-pdf install-pdf-am install-ps \
+ clean-libexecPROGRAMS clean-libtool clean-noinstLIBRARIES \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-htmlDATA install-info install-info-am \
+ install-libexecPROGRAMS install-man install-man1 install-man5 \
+ install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
+ uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
+ uninstall-man1 uninstall-man5 uninstall-man8 \
+ uninstall-sbinPROGRAMS
vphack:
@@ -1169,7 +1533,7 @@ vphack:
#
# ylwrap script which invokes Bison replaces ntp_parser.h
# symlink with the updated file, when ntp_parser.h changes.
-# vphack_after detects this and copies the updated file to srcdir
+# vphack_after detects this and copies the updated file to srcdir
# and re-creates the ntp_parser.h symlink in its place.
#
@@ -1179,8 +1543,10 @@ vphack_after:
ln -s $(srcdir)/ntp_parser.h . \
)
-check-local: @MAKE_CHECK_Y2K@ $(CHECK_SAVECONFIG)
- test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+install-data-local: install-html
+
+check-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
+ test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
k-g-u-submake: keyword-gen
./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
@@ -1195,7 +1561,7 @@ k-g-u-submake: keyword-gen
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
- $(MAKE) k-g-u-submake # avoid explicit dependency
+ $(MAKE) $(AM_MAKEFLAGS) k-g-u-submake # avoid explicit dependency
grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
mv -f k-g-u $@
@@ -1209,58 +1575,166 @@ $(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
$(run_ag) ntpd-opts.def
-$(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def
+###
+
+$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
+
+$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
+ mv $(srcdir)/ntpd.man.in+ $(srcdir)/ntpd.man.in
+
+###
+
+$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
-$(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.texi
+$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
+ mv $(srcdir)/ntpd.mdoc.in+ $(srcdir)/ntpd.mdoc.in
+
+###
+
+ntpd.$(NTPD_MS): $(srcdir)/ntpd.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpd.$(NTPD_MS)+:$(srcdir)/ntpd.$(MANTAGFMT).in
+ mv ntpd.$(NTPD_MS)+ ntpd.$(NTPD_MS)
+
+###
+
+$(srcdir)/invoke-ntp.conf.menu: $(srcdir)/invoke-ntp.conf.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpd-opts.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
-$(PROGRAMS): $(LDADD)
+$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
-compsave.conf: ntpd $(srcdir)/complete.conf
- ./ntpd --configfile $(srcdir)/complete.conf --saveconfigquit $@
+$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
-check-saveconfig: $(srcdir)/complete.conf compsave.conf
- cmp $(srcdir)/complete.conf compsave.conf && echo stamp > $@
+$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
-../libopts/libopts.la:
- cd ../libopts && $(MAKE) libopts.la
+$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.keys.html ntp.keys.texi || true )
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) libntp.a
+$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpd.html ntpd.texi || true )
+
+###
+
+$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
+
+$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
+ mv $(srcdir)/ntp.conf.man.in+ $(srcdir)/ntp.conf.man.in
+
+###
+
+$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
+
+$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
+ mv $(srcdir)/ntp.conf.mdoc.in+ $(srcdir)/ntp.conf.mdoc.in
+
+###
+
+ntp.conf.5: $(srcdir)/ntp.conf.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp.conf.5+:$(srcdir)/ntp.conf.$(MANTAGFMT).in
+ mv ntp.conf.5+ ntp.conf.5
+
+###
+
+$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
+
+$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
+ mv $(srcdir)/ntp.keys.man.in+ $(srcdir)/ntp.keys.man.in
+
+###
+
+$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
+
+$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
+ mv $(srcdir)/ntp.keys.mdoc.in+ $(srcdir)/ntp.keys.mdoc.in
+
+###
+
+ntp.keys.5: $(srcdir)/ntp.keys.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp.keys.5+:$(srcdir)/ntp.keys.$(MANTAGFMT).in
+ mv ntp.keys.5+ ntp.keys.5
+
+###
+
+$(srcdir)/invoke-ntpd.menu: $(srcdir)/invoke-ntpd.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(PROGRAMS): $(LDADD)
+
+compsave.conf: ntpd complete.conf
+ ./ntpd --configfile complete.conf --saveconfigquit $@
+
+check-saveconfig: complete.conf compsave.conf
+ -diff -u complete.conf compsave.conf
+ cmp complete.conf compsave.conf && echo stamp > $@
+
+../libntp/libntpsim.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntpsim.a
../libparse/libparse.a:
- cd ../libparse && $(MAKE) libparse.a
+ cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
+
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version:
- cd $(top_srcdir) && $(MAKE) version
+version.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
-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
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1269,17 +1743,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -1288,7 +1755,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/ntpd/check_y2k.c b/ntpd/check_y2k.c
index 6b8311502940..12d1a592bd49 100644
--- a/ntpd/check_y2k.c
+++ b/ntpd/check_y2k.c
@@ -104,7 +104,6 @@
#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
diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c
index 49a9b465269e..045c0a98e233 100644
--- a/ntpd/cmd_args.c
+++ b/ntpd/cmd_args.c
@@ -7,6 +7,7 @@
#include "ntpd.h"
#include "ntp_stdlib.h"
+#include "ntp_config.h"
#include "ntp_cmdargs.h"
#include "ntpd-opts.h"
@@ -15,7 +16,6 @@
* Definitions of things either imported from or exported to outside
*/
extern char const *progname;
-extern const char *specific_interface;
#ifdef HAVE_NETINFO
extern int check_netinfo;
@@ -23,17 +23,19 @@ extern int check_netinfo;
/*
- * getCmdOpts - get command line options
+ * getCmdOpts - apply most command line options
+ *
+ * A few options are examined earlier in ntpd.c ntpdmain() and
+ * ports/winnt/ntpd/ntservice.c main().
*/
void
getCmdOpts(
- int argc,
- char *argv[]
+ int argc,
+ char ** argv
)
{
extern const char *config_file;
int errflg;
- tOptions *myOptions = &ntpdOptions;
/*
* Initialize, initialize
@@ -130,21 +132,29 @@ getCmdOpts(
if (HAVE_OPT( USER )) {
droproot = 1;
user = estrdup(OPT_ARG( USER ));
- group = rindex(user, ':');
- if (group)
+ group = strrchr(user, ':');
+ if (group != NULL) {
+ size_t len;
+
*group++ = '\0'; /* get rid of the ':' */
+ len = group - user;
+ group = estrdup(group);
+ user = erealloc(user, len);
+ }
}
#endif
if (HAVE_OPT( VAR )) {
- int ct = STACKCT_OPT( VAR );
- const char** pp = STACKLST_OPT( VAR );
+ int ct;
+ const char ** pp;
+ const char * v_assign;
- do {
- const char* my_ntp_optarg = *pp++;
+ ct = STACKCT_OPT( VAR );
+ pp = STACKLST_OPT( VAR );
- set_sys_var(my_ntp_optarg, strlen(my_ntp_optarg)+1,
- (u_short) (RW));
+ do {
+ v_assign = *pp++;
+ set_sys_var(v_assign, strlen(v_assign) + 1, RW);
} while (--ct > 0);
}
@@ -160,10 +170,9 @@ getCmdOpts(
} while (--ct > 0);
}
- if (HAVE_OPT( SLEW )) {
- clock_max = 600;
- kern_enable = 0;
- }
+ if (HAVE_OPT( SLEW ))
+ loop_config(LOOP_MAX, 600);
+
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
@@ -179,19 +188,15 @@ getCmdOpts(
errflg++;
}
}
-#ifdef SIM
- /* SK:
- * The simulator no longer takes any command line arguments. Hence,
- * all the code that was here has been removed.
- */
-#endif /* SIM */
-
- if (errflg || argc) {
- if (argc)
- fprintf(stderr, "argc after processing is <%d>\n", argc);
- optionUsage(myOptions, 2);
+ /* save list of servers from cmd line for config_peers() use */
+ if (argc > 0) {
+ cmdline_server_count = argc;
+ cmdline_servers = argv;
}
- return;
+
+ /* display usage & exit with any option processing errors */
+ if (errflg)
+ optionUsage(&ntpdOptions, 2); /* does not return */
}
diff --git a/ntpd/complete.conf b/ntpd/complete.conf.in
index 5a390c4d90f7..a820094abb74 100644
--- a/ntpd/complete.conf
+++ b/ntpd/complete.conf.in
@@ -1,9 +1,12 @@
saveconfigdir "/etc/ntp/conf"
-driftfile "/etc/ntp.drift"
+driftfile "/etc/ntp.drift" 1e-7
logfile "/var/log/ntp.log"
+leapfile "/etc/ntp.leapseconds"
+nonvolatile 1e-7
+ident "udent"
logconfig =allall -allinfo -allevents -allstatistics -allstatus +allall -clockinfo -clockevents -clockstatistics -clockstatus +clockall -syncinfo -syncevents -syncstatistics -syncstatus +syncall -sysinfo -sysevents -sysstatistics -sysstatus +sysall
statsdir "/etc/ntp/stats"
-statistics loopstats peerstats
+statistics clockstats cryptostats loopstats peerstats protostats rawstats sysstats timingstats
filegen clockstats file clockstats type none enable
filegen cryptostats file cryptostats type pid link disable
filegen loopstats file loopstats type day nolink enable
@@ -19,26 +22,32 @@ keys "/etc/ntp.keys"
trustedkey 1 2 3 4 5 6 7 8 9 10 11 12 (14 ... 16) 18 (32768 ... 65534)
controlkey 12
requestkey 12
-enable auth ntp monitor
-disable bclient calibrate kernel
-tos beacon 3600 ceiling 16 cohort 0 floor 1 maxclock 10 maxdist 1.5 minclock 3 mindist 0.001 minsane 1 orphan 16
-tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepout 900
+enable auth ntp monitor stats
+disable bclient calibrate kernel mode7
+tos beacon 3600 ceiling 16 cohort 0 floor 1 maxclock 10 maxdist 1.5 minclock 3 mindist 0.001 minsane 1 orphan 16 orphanwait 300
+rlimit@HAVE_RLIMIT_MEMLOCK@@HAVE_RLIMIT_STACK@
+tinker allan 1500 dispersion 15 freq 0 huffpuff 7200 panic 1000 step 0.128 stepout 900 tick 0.01
broadcastclient
-server 127.127.1.0 mode 64 prefer true
+server 127.127.1.0 mode 4294967295 prefer true
fudge 127.127.1.0 time1 0 time2 1.1 stratum 7 refid Abcd
pool 0.north-america.pool.ntp.org. iburst preempt
server 1.north-america.pool.ntp.org. iburst
server -4 2.north-america.pool.ntp.org. minpoll 6 maxpoll 10 iburst
server -6 ntp.davehart.net. minpoll 6 maxpoll 10 version 5 burst iburst
-peer -6 davehart.broker.freenet6.net. xleave autokey
-peer -4 192.168.192.168 key 1 bias 3.1416 noselect
+peer -6 davehart.broker.freenet6.net. ident "autokey-group" xleave autokey
+peer -4 192.168.192.168 key 1 noselect
+server [fe80::123%1]
broadcast 192.168.192.255
manycastclient 224.0.1.1
manycastclient ff05::101
manycastserver 224.0.1.1 ff05::101
multicastclient 224.0.1.1 ff05::101
-discard minimum 1 average 3 monitor 1
-restrict default nomodify limited kod
+mru maxage 64 mindepth 600 initalloc 600 initmem 16 incalloc 99 incmem 4 maxdepth 1024 maxmem 4096
+discard minimum 1 average 3 monitor 3000
+restrict default
+restrict default nomodify limited kod noserve nomrulist
+restrict source
+restrict source nomodify limited kod
restrict trusted.host.name.example.com. nomodify
restrict [fe80::1] mask [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]
restrict 127.0.0.1 mask 255.255.255.255
@@ -50,7 +59,9 @@ interface listen eth0
interface listen ipv6
interface listen 192.168.192.0/24
interface listen 192.168.193.1
+phone "ATDT13034944774" "ATDT12027621594"
setvar varnondef = "this variable does not have default after the value"
setvar vanity = "name plate" default
trap 127.0.0.1 interface 127.0.0.1 port 1234
trap 127.0.0.2
+reset allpeers auth ctl io mem sys timer
diff --git a/ntpd/declcond.h b/ntpd/declcond.h
new file mode 100644
index 000000000000..870e5a729b5d
--- /dev/null
+++ b/ntpd/declcond.h
@@ -0,0 +1,21 @@
+/*
+ * declcond.h - declarations conditionalized for ntpd
+ *
+ * The NTP reference implementation distribution includes two distinct
+ * declcond.h files, one in ntpd/ used only by ntpd, and another in
+ * include/ used by libntp and utilities. This relies on the source
+ * file's directory being ahead of include/ in the include search.
+ *
+ * The ntpd variant of declcond.h declares "debug" only #ifdef DEBUG,
+ * as the --disable-debugging version of ntpd should not reference
+ * "debug". The libntp and utilities variant always declares debug,
+ * as it is used in those codebases even without DEBUG defined.
+ */
+#ifndef DECLCOND_H
+#define DECLCOND_H
+
+#ifdef DEBUG /* uncommented in ntpd/declcond.h */
+extern int debug;
+#endif /* uncommented in ntpd/declcond.h */
+
+#endif /* DECLCOND_H */
diff --git a/ntpd/invoke-ntp.conf.menu b/ntpd/invoke-ntp.conf.menu
new file mode 100644
index 000000000000..e5c6ef353b0b
--- /dev/null
+++ b/ntpd/invoke-ntp.conf.menu
@@ -0,0 +1 @@
+* ntp.conf Notes:: Notes about ntp.conf
diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
new file mode 100644
index 000000000000..2678c189270e
--- /dev/null
+++ b/ntpd/invoke-ntp.conf.texi
@@ -0,0 +1,2634 @@
+@node ntp.conf Notes
+@section Notes about ntp.conf
+@pindex ntp.conf
+@cindex Network Time Protocol (NTP) daemon configuration file format
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:49:02 AM by AutoGen 5.18.5pre4
+# From the definitions ntp.conf.def
+# and the template file agtexi-file.tpl
+@end ignore
+
+
+
+The
+@code{ntp.conf}
+configuration file is read at initial startup by the
+@code{ntpd(1ntpdmdoc)}
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+@file{/etc}
+directory,
+but could be installed elsewhere
+(see the daemon's
+@code{-c}
+command line option).
+
+The file format is similar to other
+@sc{unix}
+configuration files.
+Comments begin with a
+@quoteleft{}#@quoteright{}
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+
+The rest of this page describes the configuration and control options.
+The
+"Notes on Configuring NTP and Setting up an NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp})
+contains an extended discussion of these options.
+In addition to the discussion of general
+@ref{Configuration Options},
+there are sections describing the following supported functionality
+and the options used to control it:
+@itemize @bullet
+@item
+@ref{Authentication Support}
+@item
+@ref{Monitoring Support}
+@item
+@ref{Access Control Support}
+@item
+@ref{Automatic NTP Configuration Options}
+@item
+@ref{Reference Clock Support}
+@item
+@ref{Miscellaneous Options}
+@end itemize
+
+Following these is a section describing
+@ref{Miscellaneous Options}.
+While there is a rich set of options available,
+the only required option is one or more
+@code{pool},
+@code{server},
+@code{peer},
+@code{broadcast}
+or
+@code{manycastclient}
+commands.
+@node Configuration Support
+@subsection Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+@subsubsection Configuration Commands
+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.
+
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+@quotedblleft{}:@quotedblright{}
+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.
+
+Note that in contexts where a host name is expected, a
+@code{-4}
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+@code{-6}
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+@table @asis
+@item @code{pool} @kbd{address} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]}
+@item @code{server} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]}
+@item @code{peer} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]}
+@item @code{broadcast} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{ttl} @kbd{ttl}]}
+@item @code{manycastclient} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{ttl} @kbd{ttl}]}
+@end table
+
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+@kbd{address}
+can be
+either a DNS name or an IP address in dotted-quad notation.
+Additional information on association behavior can be found in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+@table @asis
+@item @code{pool}
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+@item @code{server}
+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
+@emph{not}
+be used for type
+b or m addresses.
+@item @code{peer}
+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
+b, m or r addresses.
+@item @code{broadcast}
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+@kbd{address}
+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
+@code{broadcastclient}
+or
+@code{multicastclient}
+commands
+below.
+@item @code{manycastclient}
+For type m 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
+@code{manycastserver}
+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.
+The
+@code{manycastserver}
+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
+@kbd{address}
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+@code{server}
+command.
+The remaining servers are discarded as if never
+heard.
+@end table
+
+Options:
+@table @asis
+@item @code{autokey}
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+@ref{Authentication Options}.
+@item @code{burst}
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+@code{server}
+command and s addresses.
+@item @code{iburst}
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+@code{server}
+command and s addresses and when
+@code{ntpd(1ntpdmdoc)}
+is started with the
+@code{-q}
+option.
+@item @code{key} @kbd{key}
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+@kbd{key}
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+@item @code{minpoll} @kbd{minpoll}
+@item @code{maxpoll} @kbd{maxpoll}
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+@code{maxpoll}
+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
+@code{minpoll}
+option to a lower limit of 4 (16 s).
+@item @code{noselect}
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+@item @code{prefer}
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp})
+for further information.
+@item @code{ttl} @kbd{ttl}
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time-to-live
+@kbd{ttl}
+to
+use on broadcast server and multicast server and the maximum
+@kbd{ttl}
+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.
+@item @code{version} @kbd{version}
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1-4 are the choices, with version 4 the
+default.
+@end table
+@subsubsection Auxiliary Commands
+@table @asis
+@item @code{broadcastclient}
+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
+@ref{Authentication Options}.
+@item @code{manycastserver} @kbd{address} @kbd{...}
+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
+@ref{Authentication Options}.
+@item @code{multicastclient} @kbd{address} @kbd{...}
+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
+@ref{Authentication Options}.
+@end table
+@node Authentication Support
+@subsection Authentication Support
+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.
+
+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.
+
+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 Building and Installing the Distribution page.
+
+Authentication is configured separately for each association
+using the
+@code{key}
+or
+@code{autokey}
+subcommand on the
+@code{peer},
+@code{server},
+@code{broadcast}
+and
+@code{manycastclient}
+configuration commands as described in
+@ref{Configuration Options}
+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.
+
+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
+
+The
+@code{auth}
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+@code{enable}
+and
+@code{disable}
+commands and also by remote
+configuration commands sent by a
+@code{ntpdc(1ntpdcmdoc)}
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+@code{auth}
+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.
+
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+@ref{Automatic NTP Configuration Options}
+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.
+
+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
+@code{http://www.ntp.org/}.
+@subsubsection Symmetric-Key Cryptography
+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
+@file{ntp.keys},
+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
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+utility programs.
+
+When
+@code{ntpd(1ntpdmdoc)}
+is first started, it reads the key file specified in the
+@code{keys}
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+@code{trusted}
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+@code{ntpdc(1ntpdcmdoc)}.
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+@code{requestkey}
+command selects the key used as the password for the
+@code{ntpdc(1ntpdcmdoc)}
+utility, while the
+@code{controlkey}
+command selects the key used as the password for the
+@code{ntpq(1ntpqmdoc)}
+utility.
+@subsubsection Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+
+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
+@ref{Autonomous Authentication}
+page.
+
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+@code{ntp-keygen(1ntpkeygenmdoc)}
+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
+@code{md5WithRSAEncryption},
+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.
+
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+@subsubsection Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+
+By convention, the name of an Autokey host is the name returned
+by the Unix
+@code{gethostname(2)}
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+
+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 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 servers are operated outside firewall perimeters.
+@subsubsection Operation
+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.
+
+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
+@code{server}
+or
+@code{peer}
+configuration command and no
+@code{key}
+or
+@code{autokey}
+subcommands are present, the association is not
+authenticated; if the
+@code{key}
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+@code{autokey}
+subcommand is present, the association is authenticated
+using Autokey.
+
+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.
+
+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.
+
+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
+@code{ntpq(1ntpqmdoc)}
+program.
+
+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.
+
+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.
+@subsubsection Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+@code{ntp-keygen(1ntpkeygenmdoc)}
+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
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+
+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 (CN) 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
+@code{trustRoot};.
+Other extension fields are ignored.
+@subsubsection Authentication Commands
+@table @asis
+@item @code{autokey} @code{[@kbd{logsec}]}
+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.
+@item @code{controlkey} @kbd{key}
+Specifies the key identifier to use with the
+@code{ntpq(1ntpqmdoc)}
+utility, which uses the standard
+protocol defined in RFC-1305.
+The
+@kbd{key}
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
+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
+@code{keysdir}
+command or default
+@file{/usr/local/etc}.
+Following are the subcommands:
+@table @asis
+@item @code{cert} @kbd{file}
+Specifies the location of the required host public certificate file.
+This overrides the link
+@file{ntpkey_cert_}@kbd{hostname}
+in the keys directory.
+@item @code{gqpar} @kbd{file}
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+@file{ntpkey_gq_}@kbd{hostname}
+in the keys directory.
+@item @code{host} @kbd{file}
+Specifies the location of the required host key file.
+This overrides
+the link
+@file{ntpkey_key_}@kbd{hostname}
+in the keys directory.
+@item @code{iffpar} @kbd{file}
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+@file{ntpkey_iff_}@kbd{hostname}
+in the keys directory.
+@item @code{leap} @kbd{file}
+Specifies the location of the optional leapsecond file.
+This overrides the link
+@file{ntpkey_leap}
+in the keys directory.
+@item @code{mvpar} @kbd{file}
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+@file{ntpkey_mv_}@kbd{hostname}
+in the keys directory.
+@item @code{pw} @kbd{password}
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+@item @code{randfile} @kbd{file}
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+@item @code{sign} @kbd{file}
+Specifies the location of the optional sign key file.
+This overrides
+the link
+@file{ntpkey_sign_}@kbd{hostname}
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+@end table
+@item @code{keys} @kbd{keyfile}
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+@code{ntpd(1ntpdmdoc)},
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+when operating with symmetric key cryptography.
+This is the same operation as the
+@code{-k}
+command line option.
+@item @code{keysdir} @kbd{path}
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+@file{/usr/local/etc/}.
+@item @code{requestkey} @kbd{key}
+Specifies the key identifier to use with the
+@code{ntpdc(1ntpdcmdoc)}
+utility program, which uses a
+proprietary protocol specific to this implementation of
+@code{ntpd(1ntpdmdoc)}.
+The
+@kbd{key}
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+@item @code{revoke} @kbd{logsec}
+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.
+@item @code{trustedkey} @kbd{key} @kbd{...}
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+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
+@kbd{key}
+arguments are 32-bit unsigned
+integers with values from 1 to 65,534.
+@end table
+@subsubsection Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+@table @asis
+@item 101
+(bad field format or length)
+The packet has invalid version, length or format.
+@item 102
+(bad timestamp)
+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.
+@item 103
+(bad filestamp)
+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.
+@item 104
+(bad or missing public key)
+The public key is missing, has incorrect format or is an unsupported type.
+@item 105
+(unsupported digest type)
+The server requires an unsupported digest/signature scheme.
+@item 106
+(mismatched digest types)
+Not used.
+@item 107
+(bad signature length)
+The signature length does not match the current public key.
+@item 108
+(signature not verified)
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+@item 109
+(certificate not verified)
+The certificate is invalid or signed with the wrong key.
+@item 110
+(certificate not verified)
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+@item 111
+(bad or missing cookie)
+The cookie is missing, corrupted or bogus.
+@item 112
+(bad or missing leapseconds table)
+The leapseconds table is missing, corrupted or bogus.
+@item 113
+(bad or missing certificate)
+The certificate is missing, corrupted or bogus.
+@item 114
+(bad or missing identity)
+The identity key is missing, corrupt or bogus.
+@end table
+@node Monitoring Support
+@subsection Monitoring Support
+@code{ntpd(1ntpdmdoc)}
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+@code{statistics}
+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
+@file{./scripts}
+directory of this distribution.
+Using
+these facilities and
+@sc{unix}
+@code{cron(8)}
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+@subsubsection Monitoring Commands
+@table @asis
+@item @code{statistics} @kbd{name} @kbd{...}
+Enables writing of statistics records.
+Currently, eight kinds of
+@kbd{name}
+statistics are supported.
+@table @asis
+@item @code{clockstats}
+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
+@code{clockstats}:
+@verbatim
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+@end verbatim
+
+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.
+@item @code{cryptostats}
+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
+@code{cryptostats}:
+@verbatim
+49213 525.624 127.127.4.1 message
+@end verbatim
+
+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 message field includes the
+message type and certain ancillary information.
+See the
+@ref{Authentication Options}
+section for further information.
+@item @code{loopstats}
+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
+@code{loopstats}:
+@verbatim
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+@end verbatim
+
+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.
+@item @code{peerstats}
+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
+@code{peerstats}:
+@verbatim
+48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
+@end verbatim
+
+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.
+@item @code{rawstats}
+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
+@code{rawstats}:
+@verbatim
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+@end verbatim
+
+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.
+@item @code{sysstats}
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+@code{sysstats}:
+@verbatim
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+@end verbatim
+
+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.
+@table @asis
+@item Time since restart @code{36000}
+Time in hours since the system was last rebooted.
+@item Packets received @code{81965}
+Total number of packets received.
+@item Packets processed @code{0}
+Number of packets received in response to previous packets sent
+@item Current version @code{9546}
+Number of packets matching the current NTP version.
+@item Previous version @code{56}
+Number of packets matching the previous NTP version.
+@item Bad version @code{71793}
+Number of packets matching neither NTP version.
+@item Access denied @code{512}
+Number of packets denied access for any reason.
+@item Bad length or format @code{540}
+Number of packets with invalid length, format or port number.
+@item Bad authentication @code{10}
+Number of packets not verified as authentic.
+@item Rate exceeded @code{147}
+Number of packets discarded due to rate limitation.
+@end table
+@item @code{statsdir} @kbd{directory_path}
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+@code{filegen}
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+@item @code{filegen} @kbd{name} @code{[@code{file} @kbd{filename}]} @code{[@code{type} @kbd{typename}]} @code{[@code{link} | @code{nolink}]} @code{[@code{enable} | @code{disable}]}
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+
+Note that this command can be sent from the
+@code{ntpdc(1ntpdcmdoc)}
+program running at a remote location.
+@table @asis
+@item @code{name}
+This is the type of the statistics records, as shown in the
+@code{statistics}
+command.
+@item @code{file} @kbd{filename}
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+@code{prefix},
+@code{filename}
+and
+@code{suffix}:
+@table @asis
+@item @code{prefix}
+This is a constant filename path.
+It is not subject to
+modifications via the
+@kbd{filegen}
+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
+@kbd{loopstats}
+and
+@kbd{peerstats}
+generation can be configured using the
+@kbd{statsdir}
+option explained above.
+@item @code{filename}
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+@quoteleft{}/@quoteright{}).
+This can be modified using
+the file argument to the
+@kbd{filegen}
+statement.
+No
+@file{..}
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+@kbd{prefix}.
+@item @code{suffix}
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+@end table
+@item @code{type} @kbd{typename}
+A file generation set is characterized by its type.
+The following
+types are supported:
+@table @asis
+@item @code{none}
+The file set is actually a single plain file.
+@item @code{pid}
+One element of file set is used per incarnation of a ntpd
+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
+@code{ntpd(1ntpdmdoc)}
+server incarnations.
+The set member filename is built by appending a
+@quoteleft{}.@quoteright{}
+to concatenated
+@kbd{prefix}
+and
+@kbd{filename}
+strings, and
+appending the decimal representation of the process ID of the
+@code{ntpd(1ntpdmdoc)}
+server process.
+@item @code{day}
+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
+@quoteleft{}.@quoteright{}
+and a day specification in
+the form
+@code{YYYYMMdd}.
+@code{YYYY}
+is a 4-digit year number (e.g., 1992).
+@code{MM}
+is a two digit month number.
+@code{dd}
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+@kbd{prefix}
+@kbd{filename}.19921210.
+@item @code{week}
+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
+@code{W},
+and a 2-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.No . Ns Ar 1992W1 .
+@item @code{month}
+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.
+@item @code{year}
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+@item @code{age}
+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
+@code{a},
+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
+@code{enable};
+output is prevented by specifying
+@code{disable}.
+@end table
+@item @code{link} | @code{nolink}
+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
+@code{link}
+and disabled using
+@code{nolink}.
+If link 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
+@code{C},
+and the pid of the ntpd 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.
+@item @code{enable} @code{|} @code{disable}
+Enables or disables the recording function.
+@end table
+@end table
+@end table
+@node Access Control Support
+@subsection Access Control Support
+The
+@code{ntpd(1ntpdmdoc)}
+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
+"Notes on Configuring NTP and Setting up a NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+
+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.
+
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+@subsubsection The Kiss-of-Death Packet
+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" (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
+@code{noserve}
+or
+@code{notrust}
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+@code{limited}
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+
+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.
+@subsubsection Access Control Commands
+@table @asis
+@item @code{discard} @code{[@code{average} @kbd{avg}]} @code{[@code{minimum} @kbd{min}]} @code{[@code{monitor} @kbd{prob}]}
+Set the parameters of the
+@code{limited}
+facility which protects the server from
+client abuse.
+The
+@code{average}
+subcommand specifies the minimum average packet
+spacing, while the
+@code{minimum}
+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.
+@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@kbd{flag} @kbd{...}]}
+The
+@kbd{address}
+argument expressed in
+dotted-quad form is the address of a host or network.
+Alternatively, the
+@kbd{address}
+argument can be a valid host DNS name.
+The
+@kbd{mask}
+argument expressed in dotted-quad form defaults to
+@code{255.255.255.255},
+meaning that the
+@kbd{address}
+is treated as the address of an individual host.
+A default entry (address
+@code{0.0.0.0},
+mask
+@code{0.0.0.0})
+is always included and is always the first entry in the list.
+Note that text string
+@code{default},
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+@code{flag}
+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
+categories, 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:
+@table @asis
+@item @code{ignore}
+Deny packets of all kinds, including
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+queries.
+@item @code{kod}
+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.
+@item @code{limited}
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+@code{ntpd(1ntpdmdoc)}.
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+@code{limited}
+flag.
+@item @code{lowpriotrap}
+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.
+@item @code{nomodify}
+Deny
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+@item @code{noquery}
+Deny
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+queries.
+Time service is not affected.
+@item @code{nopeer}
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+@code{pool}
+associations, so if you want to use servers from a
+@code{pool}
+directive and also want to use
+@code{nopeer}
+by default, you'll want a
+@code{restrict source ...} @code{line} @code{as} @code{well} @code{that} @code{does}
+@item not
+include the
+@code{nopeer}
+directive.
+@item @code{noserve}
+Deny all packets except
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+queries.
+@item @code{notrap}
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+@item @code{notrust}
+Deny service unless the packet is cryptographically authenticated.
+@item @code{ntpport}
+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
+@code{ntpport}
+and
+@code{non-ntpport}
+may
+be specified.
+The
+@code{ntpport}
+is considered more specific and
+is sorted later in the list.
+@item @code{version}
+Deny packets that do not match the current NTP version.
+@end table
+
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+@end table
+@node Automatic NTP Configuration Options
+@subsection Automatic NTP Configuration Options
+@subsubsection Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+
+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.
+
+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
+@code{http://www.openssl.org/}.
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+@code{D}
+or IPv6 prefix
+@code{FF})
+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.
+
+Manycast servers configured with the
+@code{manycastserver}
+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.
+
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+
+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
+@code{manycastclient},
+@code{tos}
+and
+@code{ttl}
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+@code{minpoll}
+value specified in the
+@code{manycastclient},
+command and, under normal circumstances, increments to the
+@code{maxpolll}
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+@code{minclock}
+and
+@code{minsane}
+values specified in the
+@code{tos}
+configuration command.
+At least
+@code{minsane}
+candidate servers must be available and the mitigation
+algorithms produce at least
+@code{minclock}
+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,
+@code{minsane}
+defaults to 1 and
+@code{minclock}
+defaults to 3.
+For manycast service
+@code{minsane}
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+
+If at least
+@code{minclock}
+servers are found, the manycast poll interval is immediately
+set to eight times
+@code{maxpoll}.
+If less than
+@code{minclock}
+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
+@code{maxpoll}.
+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.
+
+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
+@code{ttl}
+configuration command can be
+used to modify the values to match the scope rules.
+
+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
+@code{tos}
+command can be used to modify this behavior.
+Servers with stratum below
+@code{floor}
+or above
+@code{ceiling}
+specified in the
+@code{tos}
+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
+@code{minclock}.
+
+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
+@code{minclock},
+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
+@code{maxpoll}
+is 12 (4,096 s).
+
+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
+@code{multicastclient}
+and
+@code{multicastserver}
+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.
+
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+@code{tos}
+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
+@code{floor}
+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.
+
+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.
+
+Some administrators prefer to avoid running
+@code{ntpd(1ntpdmdoc)}
+continuously and run either
+@code{ntpdate(8)}
+or
+@code{ntpd(1ntpdmdoc)}
+@code{-q}
+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
+@code{ntpd(1ntpdmdoc)}
+@code{-q}.
+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.
+@subsubsection Manycast Interactions with Autokey
+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.
+
+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.
+@subsubsection Manycast Options
+@table @asis
+@item @code{tos} @code{[@code{ceiling} @kbd{ceiling} | @code{cohort} @code{@{} @code{0} | @code{1} @code{@}} | @code{floor} @kbd{floor} | @code{minclock} @kbd{minclock} | @code{minsane} @kbd{minsane}]}
+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:
+@table @asis
+@item @code{ceiling} @kbd{ceiling}
+Peers with strata above
+@code{ceiling}
+will be discarded if there are at least
+@code{minclock}
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+@item @code{cohort} @code{@{0 | 1@}}
+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.
+@item @code{floor} @kbd{floor}
+Peers with strata below
+@code{floor}
+will be discarded if there are at least
+@code{minclock}
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+@item @code{minclock} @kbd{minclock}
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+@code{minclock}
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+@item @code{minsane} @kbd{minsane}
+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,
+@code{minsane}
+should be at least 4 in order to detect and discard
+a single falseticker.
+@end table
+@item @code{ttl} @kbd{hop} @kbd{...}
+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.
+@end table
+@node Reference Clock Support
+@subsection Reference Clock Support
+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
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+Additional information can be found in the pages linked
+there, including the
+"Debugging Hints for Reference Clock Drivers"
+and
+"How To Write a Reference Clock Driver"
+pages
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+In addition, support for a PPS
+signal is available as described in the
+"Pulse-per-second (PPS) Signal Interfacing"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+"Line Disciplines and Streams Drivers"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+
+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.
+
+For the purposes of configuration,
+@code{ntpd(1ntpdmdoc)}
+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
+@code{127.127.}@kbd{t}.@kbd{u},
+where
+@kbd{t}
+is an integer
+denoting the clock type and
+@kbd{u}
+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.
+
+The
+@code{server}
+command is used to configure a reference
+clock, where the
+@kbd{address}
+argument in that command
+is the clock address.
+The
+@code{key},
+@code{version}
+and
+@code{ttl}
+options are not used for reference clock support.
+The
+@code{mode}
+option is added for reference clock support, as
+described below.
+The
+@code{prefer}
+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
+"Mitigation Rules and the prefer Keyword"
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp})
+page.
+The
+@code{minpoll}
+and
+@code{maxpoll}
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+
+The
+@code{fudge}
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+@code{server}
+command.
+The
+@kbd{address}
+argument specifies the clock address.
+The
+@code{refid}
+and
+@code{stratum}
+options 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
+@code{fudge}
+command as well.
+
+The stratum number of a reference clock is by default zero.
+Since the
+@code{ntpd(1ntpdmdoc)}
+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
+@code{stratum}
+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
+@code{refid}
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+@subsubsection Reference Clock Commands
+@table @asis
+@item @code{server} @code{127.127.}@kbd{t}.@kbd{u} @code{[@code{prefer}]} @code{[@code{mode} @kbd{int}]} @code{[@code{minpoll} @kbd{int}]} @code{[@code{maxpoll} @kbd{int}]}
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+@table @asis
+@item @code{prefer}
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp})
+for further information.
+@item @code{mode} @kbd{int}
+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
+parse
+drivers.
+@item @code{minpoll} @kbd{int}
+@item @code{maxpoll} @kbd{int}
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+@code{minpoll}
+and
+@code{maxpoll}
+default to 6 (64 s).
+For modem reference clocks,
+@code{minpoll}
+defaults to 10 (17.1 m) and
+@code{maxpoll}
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+@end table
+@item @code{fudge} @code{127.127.}@kbd{t}.@kbd{u} @code{[@code{time1} @kbd{sec}]} @code{[@code{time2} @kbd{sec}]} @code{[@code{stratum} @kbd{int}]} @code{[@code{refid} @kbd{string}]} @code{[@code{mode} @kbd{int}]} @code{[@code{flag1} @code{0} @code{|} @code{1}]} @code{[@code{flag2} @code{0} @code{|} @code{1}]} @code{[@code{flag3} @code{0} @code{|} @code{1}]} @code{[@code{flag4} @code{0} @code{|} @code{1}]}
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+@code{server}
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+@code{ntpdc(1ntpdcmdoc)}
+program.
+The options are interpreted as
+follows:
+@table @asis
+@item @code{time1} @kbd{sec}
+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.
+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
+@code{enable}
+command described in
+@ref{Miscellaneous Options}
+page and operates as described in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+@item @code{time2} @kbd{secs}
+Specifies a fixed-point decimal number in seconds, which is
+interpreted in a driver-dependent way.
+See the descriptions of
+specific drivers in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+@file{/usr/share/doc/ntp}).
+@item @code{stratum} @kbd{int}
+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.
+@item @code{refid} @kbd{string}
+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.
+@item @code{mode} @kbd{int}
+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
+parse
+drivers.
+@item @code{flag1} @code{0} @code{|} @code{1}
+@item @code{flag2} @code{0} @code{|} @code{1}
+@item @code{flag3} @code{0} @code{|} @code{1}
+@item @code{flag4} @code{0} @code{|} @code{1}
+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
+@code{flag4}
+is used to enable recording monitoring
+data to the
+@code{clockstats}
+file configured with the
+@code{filegen}
+command.
+Further information on the
+@code{filegen}
+command can be found in
+@ref{Monitoring Options}.
+@end table
+@end table
+@node Miscellaneous Options
+@subsection Miscellaneous Options
+@table @asis
+@item @code{broadcastdelay} @kbd{seconds}
+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.
+@item @code{calldelay} @kbd{delay}
+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.
+@item @code{driftfile} @kbd{driftfile}
+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
+@code{-f}
+command line 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.
+
+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
+@code{ntpd(1ntpdmdoc)}
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+@item @code{enable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats}]}
+@item @code{disable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats}]}
+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
+@code{ntpdc(1ntpdcmdoc)}
+utility program.
+@table @asis
+@item @code{auth}
+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
+@code{enable}.
+@item @code{bclient}
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+@code{multicastclient}
+command with default
+address.
+The default for this flag is
+@code{disable}.
+@item @code{calibrate}
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+@code{disable}.
+@item @code{kernel}
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+@code{enable}
+if support is available, otherwise
+@code{disable}.
+@item @code{mode7}
+Enables processing of NTP mode 7 implementation-specific requests
+which are used by the deprecated
+@code{ntpdc(1ntpdcmdoc)}
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+@code{ntpq(1ntpqmdoc)}.
+The
+@code{ntpq(1ntpqmdoc)}
+program provides the same capabilities as
+@code{ntpdc(1ntpdcmdoc)}
+using standard mode 6 requests.
+@item @code{monitor}
+Enables the monitoring facility.
+See the
+@code{ntpdc(1ntpdcmdoc)}
+program
+and the
+@code{monlist}
+command or further information.
+The
+default for this flag is
+@code{enable}.
+@item @code{ntp}
+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
+@code{enable}.
+@item @code{stats}
+Enables the statistics facility.
+See the
+@ref{Monitoring Options}
+section for further information.
+The default for this flag is
+@code{disable}.
+@end table
+@item @code{includefile} @kbd{includefile}
+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
+@code{ntpd(1ntpdmdoc)}
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+@item @code{logconfig} @kbd{configkeyword}
+This command controls the amount and type of output written to
+the system
+@code{syslog(3)}
+facility or the alternate
+@code{logfile}
+log file.
+By default, all output is turned on.
+All
+@kbd{configkeyword}
+keywords can be prefixed with
+@quoteleft{}=@quoteright{},
+@quoteleft{}+@quoteright{}
+and
+@quoteleft{}-@quoteright{},
+where
+@quoteleft{}=@quoteright{}
+sets the
+@code{syslog(3)}
+priority mask,
+@quoteleft{}+@quoteright{}
+adds and
+@quoteleft{}-@quoteright{}
+removes
+messages.
+@code{syslog(3)}
+messages can be controlled in four
+classes
+(@code{clock}, @code{peer}, @code{sys} and @code{sync}).
+Within these classes four types of messages can be
+controlled: informational messages
+(@code{info}),
+event messages
+(@code{events}),
+statistics messages
+(@code{statistics})
+and
+status messages
+(@code{status}).
+
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+@code{all}
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+@code{all}
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+@verbatim
+logconfig =syncstatus +sysevents
+@end verbatim
+
+This would just list the synchronizations state of
+@code{ntpd(1ntpdmdoc)}
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+@verbatim
+logconfig =syncall +clockall
+@end verbatim
+
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+@item @code{logfile} @kbd{logfile}
+This command specifies the location of an alternate log file to
+be used instead of the default system
+@code{syslog(3)}
+facility.
+This is the same operation as the -l command line option.
+@item @code{setvar} @kbd{variable} @code{[@code{default}]}
+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
+@code{name}@code{=}@kbd{value}
+is followed by the
+@code{default}
+keyword, the
+variable will be listed as part of the default system variables
+(@code{rv} 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
+@code{setvar}
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+@code{sys_var_list}
+holds
+the names of all system variables.
+The
+@code{peer_var_list}
+holds
+the names of all peer variables and the
+@code{clock_var_list}
+holds the names of the reference clock variables.
+@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{srep} | @code{stepout} @kbd{stepout}]}
+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 cannot 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.
+
+The variables operate as follows:
+@table @asis
+@item @code{allan} @kbd{allan}
+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.
+@item @code{dispersion} @kbd{dispersion}
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+@item @code{freq} @kbd{freq}
+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.
+@item @code{huffpuff} @kbd{huffpuff}
+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.
+@item @code{panic} @kbd{panic}
+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.
+@item @code{step} @kbd{step}
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+@item @code{stepout} @kbd{stepout}
+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.
+@end table
+@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
+@table @asis
+@item @code{memlock} @kbd{Nmegabytes}
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+@code{-i}
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+@item @code{stacksize} @kbd{N4kPages}
+Specifies the maximum size of the process stack on systems with the
+@item @code{filenum} @kbd{Nfiledescriptors}
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+@code{mlockall()}
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+@end table
+@item @code{trap} @kbd{host_address} @code{[@code{port} @kbd{port_number}]} @code{[@code{interface} @kbd{interface_address}]}
+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.
+
+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.
+@item @code{hop} @kbd{...}
+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.
+@end table
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp.conf} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntp.conf Files:: Files
+* ntp.conf See Also:: See Also
+* ntp.conf Bugs:: Bugs
+* ntp.conf Notes:: Notes
+@end menu
+
+@node ntp.conf Files
+@subsection ntp.conf Files
+@table @asis
+@item @file{/etc/ntp.conf}
+the default name of the configuration file
+@item @file{ntp.keys}
+private MD5 keys
+@item @file{ntpkey}
+RSA private key
+@item @file{ntpkey_}@kbd{host}
+RSA public key
+@item @file{ntp_dh}
+Diffie-Hellman agreement parameters
+@end table
+@node ntp.conf See Also
+@subsection ntp.conf See Also
+@code{ntpd(1ntpdmdoc)},
+@code{ntpdc(1ntpdcmdoc)},
+@code{ntpq(1ntpqmdoc)}
+
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+@code{http://www.ntp.org/}.
+A snapshot of this documentation is available in HTML format in
+@file{/usr/share/doc/ntp}.
+@*
+
+@*
+David L. Mills, @emph{Network Time Protocol (Version 4)}, RFC5905
+@node ntp.conf Bugs
+@subsection ntp.conf Bugs
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+
+The
+@file{ntpkey_}@kbd{host}
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+@node ntp.conf Notes
+@subsection ntp.conf Notes
+This document was derived from FreeBSD.
diff --git a/ntpd/invoke-ntp.keys.menu b/ntpd/invoke-ntp.keys.menu
new file mode 100644
index 000000000000..2185e4bd5bff
--- /dev/null
+++ b/ntpd/invoke-ntp.keys.menu
@@ -0,0 +1 @@
+* ntp.keys Notes:: Notes about ntp.keys
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
new file mode 100644
index 000000000000..c8dc904d122a
--- /dev/null
+++ b/ntpd/invoke-ntp.keys.texi
@@ -0,0 +1,125 @@
+@node ntp.keys Notes
+@section Notes about ntp.keys
+@pindex ntp.keys
+@cindex NTP symmetric key file format
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:49:05 AM by AutoGen 5.18.5pre4
+# From the definitions ntp.keys.def
+# and the template file agtexi-file.tpl
+@end ignore
+
+
+
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+"Authentication Support"
+section of the
+@code{ntp.conf(5)}
+page.
+
+@code{ntpd(8)}
+reads its keys from a file specified using the
+@code{-k}
+command line option or the
+@code{keys}
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+
+@example
+@kbd{keyno} @kbd{type} @kbd{key}
+@end example
+
+where
+@kbd{keyno}
+is a positive integer (between 1 and 65534),
+@kbd{type}
+is the message digest algorithm,
+and
+@kbd{key}
+is the key itself.
+
+The
+@kbd{key}
+may be given in a format
+controlled by the
+@kbd{type}
+field.
+The
+@kbd{type}
+@code{MD5}
+is always supported.
+If
+@code{ntpd}
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140-2 is required the
+@kbd{type}
+must be either
+@code{SHA}
+or
+@code{SHA1}.
+
+What follows are some key types, and corresponding formats:
+
+@table @asis
+@item @code{MD5}
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+@code{#}
+(which is the "start of comment" character).
+
+@item @code{SHA}
+@item @code{SHA1}
+@item @code{RMD160}
+The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+@end table
+
+Note that the keys used by the
+@code{ntpq(8)}
+and
+@code{ntpdc(8)}
+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.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp.keys} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntp.keys Files:: Files
+* ntp.keys See Also:: See Also
+* ntp.keys Notes:: Notes
+@end menu
+
+@node ntp.keys Files
+@subsection ntp.keys Files
+@table @asis
+@item @file{/etc/ntp.keys}
+the default name of the configuration file
+@end table
+@node ntp.keys See Also
+@subsection ntp.keys See Also
+@code{ntp.conf(5)},
+@code{ntpd(1ntpdmdoc)},
+@code{ntpdate(1ntpdatemdoc)},
+@code{ntpdc(1ntpdcmdoc)},
+@code{sntp(1sntpmdoc)}
+@node ntp.keys Notes
+@subsection ntp.keys Notes
+This document was derived from FreeBSD.
diff --git a/ntpd/ntpd-opts.menu b/ntpd/invoke-ntpd.menu
index 3425d8220f67..3425d8220f67 100644
--- a/ntpd/ntpd-opts.menu
+++ b/ntpd/invoke-ntpd.menu
diff --git a/ntpd/ntpd-opts.texi b/ntpd/invoke-ntpd.texi
index 7ea8f3bfea5b..e59b72f785eb 100644
--- a/ntpd/ntpd-opts.texi
+++ b/ntpd/invoke-ntpd.texi
@@ -3,152 +3,254 @@
@pindex ntpd
@cindex NTP daemon program
@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpd-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:12 PM by AutoGen 5.12
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:49:06 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
-# and the template file aginfo.tpl
+# and the template file agtexi-cmd.tpl
@end ignore
-This program has no explanation.
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpd} program. It documents the @command{ntpd} usage text and option meanings.
+The
+@code{ntpd}
+utility 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, as defined by RFC-5905,
+but also retains compatibility with
+version 3, as defined by RFC-1305, and versions 1
+and 2, as defined by RFC-1059 and RFC-1119, respectively.
+
+The
+@code{ntpd}
+utility 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.
+
+Ordinarily,
+@code{ntpd}
+reads the
+@code{ntp.conf(5)}
+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.
+
+If NetInfo support is built into
+@code{ntpd}
+then
+@code{ntpd}
+will attempt to read its configuration from the
+NetInfo if the default
+@code{ntp.conf(5)}
+file cannot be read and no file is
+specified by the
+@code{-c}
+option.
-This software is released under a specialized copyright license.
+Various internal
+@code{ntpd}
+variables can be displayed and
+configuration options altered while the
+@code{ntpd}
+is running
+using the
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+utility programs.
+
+When
+@code{ntpd}
+starts it looks at the value of
+@code{umask(2)},
+and if zero
+@code{ntpd}
+will set the
+@code{umask(2)}
+to 022.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpd} program.
+This software is released under the NTP license, <http://ntp.org/license>.
@menu
-* ntpd usage:: ntpd usage help (-?)
-* ntpd authnoreq:: authnoreq option (-A)
-* ntpd authreq:: authreq option (-a)
-* ntpd bcastsync:: bcastsync option (-b)
-* ntpd configfile:: configfile option (-c)
-* ntpd debug-level:: debug-level option (-d)
-* ntpd driftfile:: driftfile option (-f)
-* ntpd dvar:: dvar option
-* ntpd interface:: interface option (-I)
-* ntpd ipv4:: ipv4 option (-4)
-* ntpd ipv6:: ipv6 option (-6)
-* ntpd jaildir:: jaildir option (-i)
-* ntpd keyfile:: keyfile option (-k)
-* ntpd logfile:: logfile option (-l)
-* ntpd modifymmtimer:: modifymmtimer option (-M)
-* ntpd nice:: nice option (-N)
-* ntpd nofork:: nofork option (-n)
-* ntpd novirtualips:: novirtualips option (-L)
-* ntpd panicgate:: panicgate option (-g)
-* ntpd pccfreq:: pccfreq option
-* ntpd pidfile:: pidfile option (-p)
-* ntpd priority:: priority option (-P)
-* ntpd propagationdelay:: propagationdelay option (-r)
-* ntpd quit:: quit option (-q)
-* ntpd saveconfigquit:: saveconfigquit option
-* ntpd set-debug-level:: set-debug-level option (-D)
-* ntpd slew:: slew option (-x)
-* ntpd statsdir:: statsdir option (-s)
-* ntpd trustedkey:: trustedkey option (-t)
-* ntpd updateinterval:: updateinterval option (-U)
-* ntpd usepcc:: usepcc option
-* ntpd user:: user option (-u)
-* ntpd var:: var option
+* ntpd usage:: ntpd help/usage (@option{--help})
+* ntpd ipv4:: ipv4 option (-4)
+* ntpd ipv6:: ipv6 option (-6)
+* ntpd authreq:: authreq option (-a)
+* ntpd authnoreq:: authnoreq option (-A)
+* ntpd configfile:: configfile option (-c)
+* ntpd driftfile:: driftfile option (-f)
+* ntpd panicgate:: panicgate option (-g)
+* ntpd jaildir:: jaildir option (-i)
+* ntpd interface:: interface option (-I)
+* ntpd keyfile:: keyfile option (-k)
+* ntpd logfile:: logfile option (-l)
+* ntpd novirtualips:: novirtualips option (-L)
+* ntpd modifymmtimer:: modifymmtimer option (-M)
+* ntpd nice:: nice option (-N)
+* ntpd pidfile:: pidfile option (-p)
+* ntpd priority:: priority option (-P)
+* ntpd quit:: quit option (-q)
+* ntpd propagationdelay:: propagationdelay option (-r)
+* ntpd saveconfigquit:: saveconfigquit option
+* ntpd statsdir:: statsdir option (-s)
+* ntpd trustedkey:: trustedkey option (-t)
+* ntpd user:: user option (-u)
+* ntpd updateinterval:: updateinterval option (-U)
+* ntpd wait-sync:: wait-sync option (-w)
+* ntpd slew:: slew option (-x)
+* ntpd usepcc:: usepcc option
+* ntpd pccfreq:: pccfreq option
+* ntpd mdns:: mdns option (-m)
+* ntpd config:: presetting/configuring ntpd
+* ntpd exit status:: exit status
+* ntpd Usage:: Usage
+* ntpd Files:: Files
+* ntpd See Also:: See Also
+* ntpd Bugs:: Bugs
+* ntpd Notes:: Notes
@end menu
@node ntpd usage
-@subsection ntpd usage help (-?)
-@cindex ntpd usage
+@subsection ntpd help/usage (@option{--help})
+@cindex ntpd help
-This is the automatically generated usage text for ntpd:
+This is the automatically generated usage text for ntpd.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.6p5
-USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+ntpd - NTP daemon program - Ver. 4.2.8
+Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
+ [ <server1> ... <serverN> ]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
+ - prohibits the option 'ipv6'
-6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
+ - prohibits the option 'ipv4'
-a no authreq Require crypto authentication
- - prohibits these options:
- authnoreq
+ - prohibits the option 'authnoreq'
-A no authnoreq Do not require crypto authentication
- - prohibits these options:
- authreq
+ - prohibits the option 'authreq'
-b no bcastsync Allow us to sync to broadcast servers
-c Str configfile configuration file name
- -d no debug-level Increase output debug message level
+ -d no debug-level Increase debug verbosity level
- may appear multiple times
- -D Str set-debug-level Set the output debug message level
+ -D Num set-debug-level Set the debug verbosity level
- may appear multiple times
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
- -i --- jaildir built without --enable-clockctl or --enable-linuxcaps
+ -i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
-k Str keyfile path to symmetric keys
-l Str logfile path to the log file
-L no novirtualips Do not listen to virtual interfaces
-n no nofork Do not fork
+ - prohibits the option 'wait-sync'
-N no nice Run at high priority
-p Str pidfile path to the PID file
-P Num priority Process priority
-q no quit Set the time and quit
+ - prohibits these options:
+ saveconfigquit
+ wait-sync
-r Str propagationdelay Broadcast/propagation delay
Str saveconfigquit Save parsed configuration and quit
+ - prohibits these options:
+ quit
+ wait-sync
-s Str statsdir Statistics file location
-t Str trustedkey Trusted key number
- may appear multiple times
- -u --- user built without --enable-clockctl or --enable-linuxcaps
+ -u Str user Run as userid (or userid:groupid)
-U Num updateinterval interval in seconds between scans for new or dropped interfaces
Str var make ARG an ntp variable (RW)
- may appear multiple times
Str dvar make ARG an ntp variable (RW|DEF)
- may appear multiple times
+ -w Num wait-sync Seconds to wait for first clock sync
+ - prohibits these options:
+ nofork
+ quit
+ saveconfigquit
-x no slew Slew up to 600 seconds
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
+
The following option preset mechanisms are supported:
- examining environment variables named NTPD_*
-
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4
-@node ntpd authnoreq
-@subsection authnoreq option (-A)
-@cindex ntpd-authnoreq
+@node ntpd ipv4
+@subsection ipv4 option (-4)
+@cindex ntpd-ipv4
-This is the ``do not require crypto authentication'' option.
+This is the ``force ipv4 dns name resolution'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
-authreq.
+ipv6.
@end itemize
-Do not require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is almost never a good idea.
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+@node ntpd ipv6
+@subsection ipv6 option (-6)
+@cindex ntpd-ipv6
+
+This is the ``force ipv6 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv4.
+@end itemize
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
@node ntpd authreq
@subsection authreq option (-a)
@cindex ntpd-authreq
This is the ``require crypto authentication'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
@@ -159,123 +261,79 @@ authnoreq.
Require cryptographic authentication for broadcast client,
multicast client and symmetric passive associations.
This is the default.
+@node ntpd authnoreq
+@subsection authnoreq option (-A)
+@cindex ntpd-authnoreq
-@node ntpd bcastsync
-@subsection bcastsync option (-b)
-@cindex ntpd-bcastsync
-
-This is the ``allow us to sync to broadcast servers'' option.
+This is the ``do not require crypto authentication'' option.
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+authreq.
+@end itemize
+Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
@node ntpd configfile
@subsection configfile option (-c)
@cindex ntpd-configfile
This is the ``configuration file name'' option.
+This option takes a string argument.
The name and path of the configuration file,
-/etc/ntp.conf
+@file{/etc/ntp.conf}
by default.
-
-@node ntpd debug-level
-@subsection debug-level option (-d)
-@cindex ntpd-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
-@end itemize
-
-Increase the debugging message output level.
-
@node ntpd driftfile
@subsection driftfile option (-f)
@cindex ntpd-driftfile
This is the ``frequency drift file name'' option.
+This option takes a string argument.
The name and path of the frequency file,
-/etc/ntp.drift
+@file{/etc/ntp.drift}
by default.
This is the same operation as the
-driftfile driftfile
+@code{driftfile} @kbd{driftfile}
configuration specification in the
-/etc/ntp.conf
+@file{/etc/ntp.conf}
file.
+@node ntpd panicgate
+@subsection panicgate option (-g)
+@cindex ntpd-panicgate
-@node ntpd dvar
-@subsection dvar option
-@cindex ntpd-dvar
-
-This is the ``make arg an ntp variable (rw|def)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-
-
-@node ntpd interface
-@subsection interface option (-I)
-@cindex ntpd-interface
-
-This is the ``listen on an interface name or address'' option.
+This is the ``allow the first adjustment to be big'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
may appear an unlimited number of times.
@end itemize
-Open the network address given, or all the addresses associated with the
-given interface name. This option may appear multiple times. This option
-also implies not opening other addresses, except wildcard and localhost.
-This option is deprecated. Please consider using the configuration file
-interface command, which is more versatile.
-
-@node ntpd ipv4
-@subsection ipv4 option (-4)
-@cindex ntpd-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpd ipv6
-@subsection ipv6 option (-6)
-@cindex ntpd-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
+Normally,
+@code{ntpd}
+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,
+@code{ntpd}
+will exit with a message to the system log. This option can be used with the
+@code{-q}
+and
+@code{-x}
+options.
+See the
+@code{tinker}
+configuration file directive for other options.
@node ntpd jaildir
@subsection jaildir option (-i)
@cindex ntpd-jaildir
This is the ``jail directory'' option.
+This option takes a string argument.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
@@ -283,49 +341,75 @@ must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
@end itemize
Chroot the server to the directory
-jaildir
+@kbd{jaildir}
.
This option also implies that the server attempts to drop root privileges at startup.
You may need to also specify a
--u
+@code{-u}
option.
This option is only available if the OS supports adjusting the clock
without full root privileges.
This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
+@code{--enable-clockctl}) or Linux (configure with
+@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
+@node ntpd interface
+@subsection interface option (-I)
+@cindex ntpd-interface
+This is the ``listen on an interface name or address'' option.
+This option takes a string argument @file{iface}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+@code{interface} command, which is more versatile.
@node ntpd keyfile
@subsection keyfile option (-k)
@cindex ntpd-keyfile
This is the ``path to symmetric keys'' option.
+This option takes a string argument.
Specify the name and path of the symmetric key file.
-/etc/ntp.keys
+@file{/etc/ntp.keys}
is the default.
This is the same operation as the
-keys keyfile
+@code{keys} @kbd{keyfile}
configuration file directive.
-
@node ntpd logfile
@subsection logfile option (-l)
@cindex ntpd-logfile
This is the ``path to the log file'' option.
+This option takes a string argument.
Specify the name and path of the log file.
The default is the system log file.
This is the same operation as the
-logfile logfile
+@code{logfile} @kbd{logfile}
configuration file directive.
+@node ntpd novirtualips
+@subsection novirtualips option (-L)
+@cindex ntpd-novirtualips
+This is the ``do not listen to virtual interfaces'' option.
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file @code{interface} command, which
+is more versatile.
@node ntpd modifymmtimer
@subsection modifymmtimer option (-M)
@cindex ntpd-modifymmtimer
This is the ``modify multimedia timer (windows only)'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
@@ -335,252 +419,284 @@ must be compiled in by defining @code{SYS_WINNT} during the compilation.
Set the Windows Multimedia Timer to highest resolution. This
ensures the resolution does not change while ntpd is running,
avoiding timekeeping glitches associated with changes.
-
@node ntpd nice
@subsection nice option (-N)
@cindex ntpd-nice
This is the ``run at high priority'' option.
To the extent permitted by the operating system, run
-ntpd
+@code{ntpd}
at the highest priority.
-
-@node ntpd nofork
-@subsection nofork option (-n)
-@cindex ntpd-nofork
-
-This is the ``do not fork'' option.
-
-
-@node ntpd novirtualips
-@subsection novirtualips option (-L)
-@cindex ntpd-novirtualips
-
-This is the ``do not listen to virtual interfaces'' option.
-Do not listen to virtual interfaces, defined as those with
-names containing a colon. This option is deprecated. Please
-consider using the configuration file interface command, which
-is more versatile.
-
-@node ntpd panicgate
-@subsection panicgate option (-g)
-@cindex ntpd-panicgate
-
-This is the ``allow the first adjustment to be big'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Normally,
-ntpd
-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,
-ntpd
-will exit with a message to the system log. This option can be used with the
--q
-and
--x
-options.
-See the
-tinker
-configuration file directive for other options.
-
-@node ntpd pccfreq
-@subsection pccfreq option
-@cindex ntpd-pccfreq
-
-This is the ``force cpu cycle counter use (windows only)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{SYS_WINNT} during the compilation.
-@end itemize
-
-Force substitution the CPU counter for QueryPerformanceCounter.
-The CPU counter (RDTSC on x86) is used unconditionally with the
-given frequency (in Hz).
-
@node ntpd pidfile
@subsection pidfile option (-p)
@cindex ntpd-pidfile
This is the ``path to the pid file'' option.
+This option takes a string argument.
Specify the name and path of the file used to record
-ntpd's
+@code{ntpd}'s
process ID.
This is the same operation as the
-pidfile pidfile
+@code{pidfile} @kbd{pidfile}
configuration file directive.
-
@node ntpd priority
@subsection priority option (-P)
@cindex ntpd-priority
This is the ``process priority'' option.
+This option takes a number argument.
To the extent permitted by the operating system, run
-ntpd
+@code{ntpd}
at the specified
-sched_setscheduler(SCHED_FIFO)
+@code{sched_setscheduler(SCHED_FIFO)}
priority.
-
-@node ntpd propagationdelay
-@subsection propagationdelay option (-r)
-@cindex ntpd-propagationdelay
-
-This is the ``broadcast/propagation delay'' option.
-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.
-
@node ntpd quit
@subsection quit option (-q)
@cindex ntpd-quit
This is the ``set the time and quit'' option.
-ntpd
-will exit just after the first time the clock is set. This behavior mimics that of the
-ntpdate
-program, which is to be retired.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+saveconfigquit, wait-sync.
+@end itemize
+
+@code{ntpd}
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+@code{ntpdate}
+program, which will soon be replaced with a shell script.
The
--g
+@code{-g}
and
--x
+@code{-x}
options can be used with this option.
Note: The kernel time discipline is disabled with this option.
+@node ntpd propagationdelay
+@subsection propagationdelay option (-r)
+@cindex ntpd-propagationdelay
+This is the ``broadcast/propagation delay'' option.
+This option takes a string argument.
+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.
@node ntpd saveconfigquit
@subsection saveconfigquit option
@cindex ntpd-saveconfigquit
This is the ``save parsed configuration and quit'' option.
+This option takes a string argument.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
must be compiled in by defining @code{SAVECONFIG} during the compilation.
+@item
+must not appear in combination with any of the following options:
+quit, wait-sync.
@end itemize
-Cause ntpd to parse its startup configuration file and save an
+Cause @code{ntpd} to parse its startup configuration file and save an
equivalent to the given filename and exit. This option was
designed for automated testing.
-
-@node ntpd set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpd-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntpd slew
-@subsection slew option (-x)
-@cindex ntpd-slew
-
-This is the ``slew up to 600 seconds'' option.
-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
--g
-and
--q
-options.
-See the
-tinker
-configuration file directive for other options.
-Note: The kernel time discipline is disabled with this option.
-
@node ntpd statsdir
@subsection statsdir option (-s)
@cindex ntpd-statsdir
This is the ``statistics file location'' option.
+This option takes a string argument.
Specify the directory path for files created by the statistics facility.
This is the same operation as the
-statsdir statsdir
+@code{statsdir} @kbd{statsdir}
configuration file directive.
-
@node ntpd trustedkey
@subsection trustedkey option (-t)
@cindex ntpd-trustedkey
This is the ``trusted key number'' option.
+This option takes a string argument @file{tkey}.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
may appear an unlimited number of times.
@end itemize
-Add a key number to the trusted key list.
+Add the specified key number to the trusted key list.
+@node ntpd user
+@subsection user option (-u)
+@cindex ntpd-user
+
+This is the ``run as userid (or userid:groupid)'' option.
+This option takes a string argument.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
+@end itemize
+Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+@code{--enable-clockctl}) or Linux (configure with
+@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
@node ntpd updateinterval
@subsection updateinterval option (-U)
@cindex ntpd-updateinterval
This is the ``interval in seconds between scans for new or dropped interfaces'' option.
+This option takes a number argument.
Give the time in seconds between two scans for new or dropped interfaces.
For systems with routing socket support the scans will be performed shortly after the interface change
has been detected by the system.
Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+@node ntpd wait-sync
+@subsection wait-sync option (-w)
+@cindex ntpd-wait-sync
+
+This is the ``seconds to wait for first clock sync'' option.
+This option takes a number argument.
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{HAVE_WORKING_FORK} during the compilation.
+@item
+must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+@end itemize
+
+If greater than zero, alters @code{ntpd}'s behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is @code{ETIMEDOUT}.
+This provides the option for a script starting @code{ntpd} to easily
+wait for the first set of the clock before proceeding.
+@node ntpd slew
+@subsection slew option (-x)
+@cindex ntpd-slew
+
+This is the ``slew up to 600 seconds'' option.
+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
+@code{-g}
+and
+@code{-q}
+options.
+See the
+@code{tinker}
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
@node ntpd usepcc
@subsection usepcc option
@cindex ntpd-usepcc
This is the ``use cpu cycle counter (windows only)'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
must be compiled in by defining @code{SYS_WINNT} during the compilation.
@end itemize
-Attempt to substitute the CPU counter for QueryPerformanceCounter.
-The CPU counter and QueryPerformanceCounter are compared, and if
+Attempt to substitute the CPU counter for @code{QueryPerformanceCounter}.
+The CPU counter and @code{QueryPerformanceCounter} are compared, and if
they have the same frequency, the CPU counter (RDTSC on x86) is
used directly, saving the overhead of a system call.
+@node ntpd pccfreq
+@subsection pccfreq option
+@cindex ntpd-pccfreq
-@node ntpd user
-@subsection user option (-u)
-@cindex ntpd-user
-
-This is the ``run as userid (or userid:groupid)'' option.
+This is the ``force cpu cycle counter use (windows only)'' option.
+This option takes a string argument.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
-must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
+must be compiled in by defining @code{SYS_WINNT} during the compilation.
@end itemize
-Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
-
-@node ntpd var
-@subsection var option
-@cindex ntpd-var
+Force substitution the CPU counter for @code{QueryPerformanceCounter}.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+@node ntpd mdns
+@subsection mdns option (-m)
+@cindex ntpd-mdns
-This is the ``make arg an ntp variable (rw)'' option.
+This is the ``register with mdns as a ntp server'' option.
+@noindent
This option has some usage constraints. It:
@itemize @bullet
@item
-may appear an unlimited number of times.
+must be compiled in by defining @code{HAVE_DNSREGISTRATION} during the compilation.
@end itemize
+
+Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+
+
+@node ntpd config
+@subsection presetting/configuring ntpd
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from environment variables named @code{NTPD} and @code{NTPD_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{NTPD} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node ntpd exit status
+@subsection ntpd exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
+@node ntpd Usage
+@subsection ntpd Usage
+@node ntpd Files
+@subsection ntpd Files
+@node ntpd See Also
+@subsection ntpd See Also
+@node ntpd Bugs
+@subsection ntpd Bugs
+@node ntpd Notes
+@subsection ntpd Notes
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 539a48f56f06..7474a56ed7b6 100644
--- a/ntpd/keyword-gen-utd
+++ b/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2010-04-06 04:38:11 UTC diff_ignore_line
+ * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index e1b747d03b30..d4f77588d60c 100644
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -1,7 +1,20 @@
/*
* keyword-gen.c -- generate keyword scanner finite state machine and
* keyword_text array.
- * This program is run to generate ntp_keyword.h
+ *
+ * This program is run to generate ntp_keyword.h
+ * After making a change here, two output files should be committed at
+ * the same time as keyword-gen.c:
+ * ntp_keyword.h
+ * keyword-gen-utd
+ *
+ * keyword-gen-utd is a sentinel used by Makefile.am to avoid compiling
+ * keyword_gen.c and generating ntp_keyword.h if the input keyword-gen.c
+ * has not changed. This is not solely an optimization, it also breaks
+ * a dependency chain that otherwise would cause programs to be compiled
+ * when running "make dist" or "make distdir". We want these to package
+ * the existing source without building anything but a tarball. See
+ * [Bug 1470].
*/
#include <config.h>
#include <stdio.h>
@@ -15,51 +28,52 @@
#include "ntp_parser.h"
-#ifdef QSORT_USES_VOID_P
-typedef const void * QSORTP;
-#else
-typedef char * QSORTP;
-#endif
-
/* Define a structure to hold a (keyword, token) pair */
struct key_tok {
char * key; /* Keyword */
- int token; /* Associated Token */
+ u_short token; /* Associated Token */
follby followedby; /* nonzero indicates the next token(s)
forced to be string(s) */
};
struct key_tok ntp_keywords[] = {
{ "...", T_Ellipsis, FOLLBY_TOKEN },
+{ "allpeers", T_Allpeers, FOLLBY_TOKEN },
{ "automax", T_Automax, FOLLBY_TOKEN },
{ "broadcast", T_Broadcast, FOLLBY_STRING },
{ "broadcastclient", T_Broadcastclient, FOLLBY_TOKEN },
{ "broadcastdelay", T_Broadcastdelay, FOLLBY_TOKEN },
-{ "calldelay", T_Calldelay, FOLLBY_TOKEN },
+{ "ctl", T_Ctl, FOLLBY_TOKEN },
{ "disable", T_Disable, FOLLBY_TOKEN },
{ "driftfile", T_Driftfile, FOLLBY_STRING },
{ "enable", T_Enable, FOLLBY_TOKEN },
{ "end", T_End, FOLLBY_TOKEN },
{ "filegen", T_Filegen, FOLLBY_TOKEN },
{ "fudge", T_Fudge, FOLLBY_STRING },
+{ "io", T_Io, FOLLBY_TOKEN },
{ "includefile", T_Includefile, FOLLBY_STRING },
{ "leapfile", T_Leapfile, FOLLBY_STRING },
{ "logconfig", T_Logconfig, FOLLBY_STRINGS_TO_EOC },
{ "logfile", T_Logfile, FOLLBY_STRING },
{ "manycastclient", T_Manycastclient, FOLLBY_STRING },
{ "manycastserver", T_Manycastserver, FOLLBY_STRINGS_TO_EOC },
+{ "mem", T_Mem, FOLLBY_TOKEN },
{ "multicastclient", T_Multicastclient, FOLLBY_STRINGS_TO_EOC },
{ "peer", T_Peer, FOLLBY_STRING },
{ "phone", T_Phone, FOLLBY_STRINGS_TO_EOC },
{ "pidfile", T_Pidfile, FOLLBY_STRING },
{ "pool", T_Pool, FOLLBY_STRING },
{ "discard", T_Discard, FOLLBY_TOKEN },
+{ "reset", T_Reset, FOLLBY_TOKEN },
{ "restrict", T_Restrict, FOLLBY_TOKEN },
+{ "rlimit", T_Rlimit, FOLLBY_TOKEN },
{ "server", T_Server, FOLLBY_STRING },
{ "setvar", T_Setvar, FOLLBY_STRING },
{ "statistics", T_Statistics, FOLLBY_TOKEN },
{ "statsdir", T_Statsdir, FOLLBY_STRING },
+{ "sys", T_Sys, FOLLBY_TOKEN },
{ "tick", T_Tick, FOLLBY_TOKEN },
+{ "timer", T_Timer, FOLLBY_TOKEN },
{ "tinker", T_Tinker, FOLLBY_TOKEN },
{ "tos", T_Tos, FOLLBY_TOKEN },
{ "trap", T_Trap, FOLLBY_STRING },
@@ -79,7 +93,6 @@ struct key_tok ntp_keywords[] = {
{ "-6", T_Ipv6_flag, FOLLBY_TOKEN },
/* option */
{ "autokey", T_Autokey, FOLLBY_TOKEN },
-{ "bias", T_Bias, FOLLBY_TOKEN },
{ "burst", T_Burst, FOLLBY_TOKEN },
{ "iburst", T_Iburst, FOLLBY_TOKEN },
{ "key", T_Key, FOLLBY_TOKEN },
@@ -98,7 +111,6 @@ struct key_tok ntp_keywords[] = {
{ "ident", T_Ident, FOLLBY_STRING },
{ "pw", T_Pw, FOLLBY_STRING },
{ "randfile", T_Randfile, FOLLBY_STRING },
-{ "sign", T_Sign, FOLLBY_STRING },
{ "digest", T_Digest, FOLLBY_STRING },
/*** MONITORING COMMANDS ***/
/* stat */
@@ -135,8 +147,11 @@ struct key_tok ntp_keywords[] = {
{ "maxdist", T_Maxdist, FOLLBY_TOKEN },
{ "beacon", T_Beacon, FOLLBY_TOKEN },
{ "orphan", T_Orphan, FOLLBY_TOKEN },
+{ "orphanwait", T_Orphanwait, FOLLBY_TOKEN },
+{ "nonvolatile", T_Nonvolatile, FOLLBY_TOKEN },
/* access_control_flag */
{ "default", T_Default, FOLLBY_TOKEN },
+{ "source", T_Source, FOLLBY_TOKEN },
{ "flake", T_Flake, FOLLBY_TOKEN },
{ "ignore", T_Ignore, FOLLBY_TOKEN },
{ "limited", T_Limited, FOLLBY_TOKEN },
@@ -145,6 +160,7 @@ struct key_tok ntp_keywords[] = {
{ "lowpriotrap", T_Lowpriotrap, FOLLBY_TOKEN },
{ "mask", T_Mask, FOLLBY_TOKEN },
{ "nomodify", T_Nomodify, FOLLBY_TOKEN },
+{ "nomrulist", T_Nomrulist, FOLLBY_TOKEN },
{ "nopeer", T_Nopeer, FOLLBY_TOKEN },
{ "noquery", T_Noquery, FOLLBY_TOKEN },
{ "noserve", T_Noserve, FOLLBY_TOKEN },
@@ -155,7 +171,18 @@ struct key_tok ntp_keywords[] = {
{ "average", T_Average, FOLLBY_TOKEN },
{ "minimum", T_Minimum, FOLLBY_TOKEN },
{ "monitor", T_Monitor, FOLLBY_TOKEN },
+/* mru_option */
+{ "incalloc", T_Incalloc, FOLLBY_TOKEN },
+{ "incmem", T_Incmem, FOLLBY_TOKEN },
+{ "initalloc", T_Initalloc, FOLLBY_TOKEN },
+{ "initmem", T_Initmem, FOLLBY_TOKEN },
+{ "mindepth", T_Mindepth, FOLLBY_TOKEN },
+{ "maxage", T_Maxage, FOLLBY_TOKEN },
+{ "maxdepth", T_Maxdepth, FOLLBY_TOKEN },
+{ "maxmem", T_Maxmem, FOLLBY_TOKEN },
+{ "mru", T_Mru, FOLLBY_TOKEN },
/* fudge_factor */
+{ "abbrev", T_Abbrev, FOLLBY_STRING },
{ "flag1", T_Flag1, FOLLBY_TOKEN },
{ "flag2", T_Flag2, FOLLBY_TOKEN },
{ "flag3", T_Flag3, FOLLBY_TOKEN },
@@ -170,7 +197,12 @@ struct key_tok ntp_keywords[] = {
{ "calibrate", T_Calibrate, FOLLBY_TOKEN },
{ "kernel", T_Kernel, FOLLBY_TOKEN },
{ "ntp", T_Ntp, FOLLBY_TOKEN },
+{ "mode7", T_Mode7, FOLLBY_TOKEN },
{ "stats", T_Stats, FOLLBY_TOKEN },
+/* rlimit_option */
+{ "memlock", T_Memlock, FOLLBY_TOKEN },
+{ "stacksize", T_Stacksize, FOLLBY_TOKEN },
+{ "filenum", T_Filenum, FOLLBY_TOKEN },
/* tinker_option */
{ "step", T_Step, FOLLBY_TOKEN },
{ "panic", T_Panic, FOLLBY_TOKEN },
@@ -182,7 +214,6 @@ struct key_tok ntp_keywords[] = {
/* miscellaneous_command */
{ "port", T_Port, FOLLBY_TOKEN },
{ "interface", T_Interface, FOLLBY_TOKEN },
-{ "qos", T_Qos, FOLLBY_TOKEN },
{ "saveconfigdir", T_Saveconfigdir, FOLLBY_STRING },
/* interface_command (ignore and interface already defined) */
{ "nic", T_Nic, FOLLBY_TOKEN },
@@ -205,7 +236,6 @@ struct key_tok ntp_keywords[] = {
{ "proc_delay", T_Proc_Delay, FOLLBY_TOKEN },
};
-
typedef struct big_scan_state_tag {
char ch; /* Character this state matches on */
char followedby; /* Forces next token(s) to T_String */
@@ -222,27 +252,27 @@ typedef struct big_scan_state_tag {
* 7 bits to free a bit for accepting/non-accepting. More than 4096
* states will require expanding scan_state beyond 32 bits each.
*/
-#define MAXSTATES 2048
+#define MAXSTATES 2048
+#define MAX_TOK_LEN 63
const char * current_keyword;/* for error reporting */
big_scan_state sst[MAXSTATES]; /* scanner FSM state entries */
-int sst_highwater; /* next entry index to consider */
+u_short sst_highwater; /* next entry index to consider */
char * symb[1024]; /* map token ID to symbolic name */
/* for libntp */
const char * progname = "keyword-gen";
-volatile int debug = 1;
int main (int, char **);
static void generate_preamble (void);
static void generate_fsm (void);
static void generate_token_text (void);
-static int create_keyword_scanner (void);
-static int create_scan_states (char *, int, follby, int);
-int compare_key_tok_id (QSORTP, QSORTP);
-int compare_key_tok_text (QSORTP, QSORTP);
+static u_short create_keyword_scanner (void);
+static u_short create_scan_states (char *, u_short, follby, u_short);
+int compare_key_tok_id (const void *, const void *);
+int compare_key_tok_text (const void *, const void *);
void populate_symb (char *);
-const char * symbname (int);
+const char * symbname (u_short);
int main(int argc, char **argv)
@@ -251,6 +281,8 @@ int main(int argc, char **argv)
fprintf(stderr, "Usage:\n%s t_header.h\n", argv[0]);
exit(1);
}
+ debug = 1;
+
populate_symb(argv[1]);
generate_preamble();
@@ -290,10 +322,18 @@ generate_preamble(void)
static void
generate_fsm(void)
{
- char token_id_comment[128];
- int initial_state;
- int i;
- int token;
+ char rprefix[MAX_TOK_LEN + 1];
+ char prefix[MAX_TOK_LEN + 1];
+ char token_id_comment[16 + MAX_TOK_LEN + 1];
+ size_t prefix_len;
+ char *p;
+ char *r;
+ u_short initial_state;
+ u_short this_state;
+ u_short prev_state;
+ u_short state;
+ u_short i;
+ u_short token;
/*
* Sort ntp_keywords in alphabetical keyword order. This is
@@ -370,13 +410,7 @@ generate_fsm(void)
exit(9);
}
- if (!sst[i].finishes_token)
- snprintf(token_id_comment,
- sizeof(token_id_comment), "%5d %-17s",
- i, (initial_state == i)
- ? "initial state"
- : "");
- else {
+ if (sst[i].finishes_token) {
snprintf(token_id_comment,
sizeof(token_id_comment), "%5d %-17s",
i, symbname(sst[i].finishes_token));
@@ -387,6 +421,53 @@ generate_fsm(void)
i, sst[i].finishes_token);
exit(5);
}
+ } else {
+ /*
+ * Determine the keyword prefix that leads to this
+ * state. This is expensive but keyword-gen is run
+ * only when it changes. Distributing keyword-gen-utd
+ * achieves that, which is why it must be committed
+ * at the same time as keyword-gen.c and ntp_keyword.h.
+ *
+ * Scan the state array iteratively looking for a state
+ * which leads to the current one, collecting matching
+ * characters along the way. There is only one such
+ * path back to the starting state given the way our
+ * scanner state machine is built and the practice of
+ * using the spelling of the keyword as its T_* token
+ * identifier, which results in never having two
+ * spellings result in the same T_* value.
+ */
+ prefix_len = 0;
+ prev_state = 0;
+ this_state = i;
+ do {
+ for (state = 1; state < sst_highwater; state++)
+ if (sst[state].other_next_s == this_state) {
+ this_state = state;
+ break;
+ } else if (sst[state].match_next_s == this_state) {
+ this_state = state;
+ rprefix[prefix_len] = sst[state].ch;
+ prefix_len++;
+ break;
+ }
+ } while (this_state != initial_state);
+
+ if (prefix_len) {
+ /* reverse rprefix into prefix */
+ p = prefix + prefix_len;
+ r = rprefix;
+ while (r < rprefix + prefix_len)
+ *--p = *r++;
+ }
+ prefix[prefix_len] = '\0';
+
+ snprintf(token_id_comment,
+ sizeof(token_id_comment), "%5d %-17s",
+ i, (initial_state == i)
+ ? "[initial state]"
+ : prefix);
}
printf(" S_ST( '%c',\t%d, %5u, %5u )%s /* %s */\n",
@@ -411,18 +492,18 @@ generate_fsm(void)
* recognizing the complete keyword, and any pre-existing state that exists
* for some other keyword that has the same prefix as the current one.
*/
-static int
+static u_short
create_scan_states(
char * text,
- int token,
+ u_short token,
follby followedby,
- int prev_state
+ u_short prev_state
)
{
- int my_state;
- int return_state;
- int prev_char_s;
- int curr_char_s;
+ u_short my_state;
+ u_short return_state;
+ u_short prev_char_s;
+ u_short curr_char_s;
return_state = prev_state;
curr_char_s = prev_state;
@@ -492,8 +573,7 @@ create_scan_states(
/* relocate so token id is sst[] index */
if (my_state != token) {
sst[token] = sst[my_state];
- memset(&sst[my_state], 0,
- sizeof(sst[my_state]));
+ ZERO(sst[my_state]);
do
sst_highwater--;
while (sst[sst_highwater].finishes_token);
@@ -519,11 +599,11 @@ create_scan_states(
* creates a keywords scanner out of it.
*/
-static int
+static u_short
create_keyword_scanner(void)
{
- int scanner;
- int i;
+ u_short scanner;
+ u_short i;
sst_highwater = 1; /* index 0 invalid, unused */
scanner = 0;
@@ -545,11 +625,11 @@ create_keyword_scanner(void)
static void
generate_token_text(void)
{
- int lowest_id;
- int highest_id;
- int id_count;
- int id;
- int i;
+ u_short lowest_id;
+ u_short highest_id;
+ u_short id_count;
+ u_short id;
+ u_short i;
/* sort ntp_keywords in token ID order */
qsort(ntp_keywords, COUNTOF(ntp_keywords),
@@ -586,12 +666,12 @@ generate_token_text(void)
int
compare_key_tok_id(
- QSORTP a1,
- QSORTP a2
+ const void *a1,
+ const void *a2
)
{
- const struct key_tok *p1 = (const void *)a1;
- const struct key_tok *p2 = (const void *)a2;
+ const struct key_tok *p1 = a1;
+ const struct key_tok *p2 = a2;
if (p1->token == p2->token)
return 0;
@@ -605,12 +685,12 @@ compare_key_tok_id(
int
compare_key_tok_text(
- QSORTP a1,
- QSORTP a2
+ const void *a1,
+ const void *a2
)
{
- const struct key_tok *p1 = (const void *)a1;
- const struct key_tok *p2 = (const void *)a2;
+ const struct key_tok *p1 = a1;
+ const struct key_tok *p2 = a2;
return strcmp(p1->key, p2->key);
}
@@ -626,8 +706,8 @@ populate_symb(
)
{
FILE * yh;
- char line[128];
- char name[128];
+ char line[2 * MAX_TOK_LEN];
+ char name[2 * MAX_TOK_LEN];
int token;
yh = fopen(header_file, "r");
@@ -639,25 +719,34 @@ populate_symb(
while (NULL != fgets(line, sizeof(line), yh))
if (2 == sscanf(line, "#define %s %d", name, &token)
&& 'T' == name[0] && '_' == name[1] && token >= 0
- && token < COUNTOF(symb))
+ && token < COUNTOF(symb)) {
symb[token] = estrdup(name);
-
+ if (strlen(name) > MAX_TOK_LEN) {
+ fprintf(stderr,
+ "MAX_TOK_LEN %d too small for '%s'\n"
+ "Edit keyword-gen.c to raise.\n",
+ MAX_TOK_LEN, name);
+ exit(10);
+ }
+ }
fclose(yh);
}
const char *
symbname(
- int token
+ u_short token
)
{
char *name;
- if (token >= 0 && token < COUNTOF(symb) && symb[token] != NULL)
- return symb[token];
+ if (token < COUNTOF(symb) && symb[token] != NULL) {
+ name = symb[token];
+ } else {
+ LIB_GETBUF(name);
+ snprintf(name, LIB_BUFLENGTH, "%d", token);
+ }
- LIB_GETBUF(name);
- snprintf(name, LIB_BUFLENGTH, "%d", token);
return name;
}
diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man
new file mode 100644
index 000000000000..95e9348cc55b
--- /dev/null
+++ b/ntpd/ntp.conf.5man
@@ -0,0 +1,3004 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp.conf 5man "19 Dec 2014" "4.2.8" "File Formats"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eCaa6b/ag-rCai4b)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:49 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.conf.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp.conf\fP
+\- Network Time Protocol (NTP) daemon configuration file format
+.SH SYNOPSIS
+\f\*[B-Font]ntp.conf\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntp.conf\fP
+configuration file is read at initial startup by the
+\fCntpd\fR(1ntpdmdoc)\f[]
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+\fI/etc\f[]
+directory,
+but could be installed elsewhere
+(see the daemon's
+\f\*[B-Font]\-c\f[]
+command line option).
+.sp \n(Ppu
+.ne 2
+
+The file format is similar to other
+UNIX
+configuration files.
+Comments begin with a
+\[oq]#\[cq]
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+.sp \n(Ppu
+.ne 2
+
+The rest of this page describes the configuration and control options.
+The
+"Notes on Configuring NTP and Setting up an NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+contains an extended discussion of these options.
+In addition to the discussion of general
+\fIConfiguration\f[] \fIOptions\f[],
+there are sections describing the following supported functionality
+and the options used to control it:
+.IP \fB\(bu\fP 2
+\fIAuthentication\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIMonitoring\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIAccess\f[] \fIControl\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+.IP \fB\(bu\fP 2
+\fIReference\f[] \fIClock\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIMiscellaneous\f[] \fIOptions\f[]
+.PP
+.sp \n(Ppu
+.ne 2
+
+Following these is a section describing
+\fIMiscellaneous\f[] \fIOptions\f[].
+While there is a rich set of options available,
+the only required option is one or more
+\f\*[B-Font]pool\f[],
+\f\*[B-Font]server\f[],
+\f\*[B-Font]peer\f[],
+\f\*[B-Font]broadcast\f[]
+or
+\f\*[B-Font]manycastclient\f[]
+commands.
+.SH Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+.SS Configuration Commands
+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.
+.sp \n(Ppu
+.ne 2
+
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+\*[Lq]\&:\*[Rq]
+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.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+\f\*[B-Font]\-6\f[]
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+.TP 7
+.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]peer\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]]
+.TP 7
+.NOP \f\*[B-Font]manycastclient\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]]
+.PP
+.sp \n(Ppu
+.ne 2
+
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+\f\*[I-Font]address\f[]
+can be
+either a DNS name or an IP address in dotted-quad notation.
+Additional information on association behavior can be found in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]pool\f[]
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+.TP 7
+.NOP \f\*[B-Font]server\f[]
+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
+\fInot\f[]
+be used for type
+b or m addresses.
+.TP 7
+.NOP \f\*[B-Font]peer\f[]
+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
+b, m or r addresses.
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[]
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+\f\*[I-Font]address\f[]
+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
+\f\*[B-Font]broadcastclient\f[]
+or
+\f\*[B-Font]multicastclient\f[]
+commands
+below.
+.TP 7
+.NOP \f\*[B-Font]manycastclient\f[]
+For type m 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
+\f\*[B-Font]manycastserver\f[]
+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.
+The
+\f\*[B-Font]manycastserver\f[]
+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
+\f\*[I-Font]address\f[]
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+\f\*[B-Font]server\f[]
+command.
+The remaining servers are discarded as if never
+heard.
+.PP
+.sp \n(Ppu
+.ne 2
+
+Options:
+.TP 7
+.NOP \f\*[B-Font]autokey\f[]
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]burst\f[]
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+\f\*[B-Font]server\f[]
+command and s addresses.
+.TP 7
+.NOP \f\*[B-Font]iburst\f[]
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+\f\*[B-Font]server\f[]
+command and s addresses and when
+\fCntpd\fR(1ntpdmdoc)\f[]
+is started with the
+\f\*[B-Font]\-q\f[]
+option.
+.TP 7
+.NOP \f\*[B-Font]key\f[] \f\*[I-Font]key\f[]
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+\f\*[I-Font]key\f[]
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+.TP 7
+.NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]
+.TP 7
+.NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+\f\*[B-Font]maxpoll\f[]
+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
+\f\*[B-Font]minpoll\f[]
+option to a lower limit of 4 (16 s).
+.TP 7
+.NOP \f\*[B-Font]noselect\f[]
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+.TP 7
+.NOP \f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+for further information.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time-to-live
+\f\*[I-Font]ttl\f[]
+to
+use on broadcast server and multicast server and the maximum
+\f\*[I-Font]ttl\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]version\f[] \f\*[I-Font]version\f[]
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1-4 are the choices, with version 4 the
+default.
+.PP
+.SS Auxiliary Commands
+.TP 7
+.NOP \f\*[B-Font]broadcastclient\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]manycastserver\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]multicastclient\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.PP
+.SH Authentication Support
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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 Building and Installing the Distribution page.
+.sp \n(Ppu
+.ne 2
+
+Authentication is configured separately for each association
+using the
+\f\*[B-Font]key\f[]
+or
+\f\*[B-Font]autokey\f[]
+subcommand on the
+\f\*[B-Font]peer\f[],
+\f\*[B-Font]server\f[],
+\f\*[B-Font]broadcast\f[]
+and
+\f\*[B-Font]manycastclient\f[]
+configuration commands as described in
+\fIConfiguration\f[] \fIOptions\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]auth\f[]
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+commands and also by remote
+configuration commands sent by a
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+\f\*[B-Font]auth\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f[C]http://www.ntp.org/\f[].
+.SS Symmetric-Key Cryptography
+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
+\fIntp.keys\f[],
+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
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+When
+\fCntpd\fR(1ntpdmdoc)\f[]
+is first started, it reads the key file specified in the
+\f\*[B-Font]keys\f[]
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+\f\*[B-Font]trusted\f[]
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+\fCntpdc\fR(1ntpdcmdoc)\f[].
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+\f\*[B-Font]requestkey\f[]
+command selects the key used as the password for the
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility, while the
+\f\*[B-Font]controlkey\f[]
+command selects the key used as the password for the
+\fCntpq\fR(1ntpqmdoc)\f[]
+utility.
+.SS Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+.\" .Pp
+.\" The cryptographic means necessary for all Autokey operations
+.\" is provided by the OpenSSL software library.
+.\" This library is available from http://www.openssl.org/
+.\" and can be installed using the procedures outlined
+.\" in the Building and Installing the Distribution page.
+.\" Once installed,
+.\" the configure and build
+.\" process automatically detects the library and links
+.\" the library routines required.
+.sp \n(Ppu
+.ne 2
+
+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
+\fIAutonomous\f[] \fIAuthentication\f[]
+page.
+.sp \n(Ppu
+.ne 2
+
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+\fCntp-keygen\fR(1ntpkeygenmdoc)\f[]
+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
+\f\*[B-Font]md5WithRSAEncryption\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+.SS Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+.sp \n(Ppu
+.ne 2
+
+By convention, the name of an Autokey host is the name returned
+by the Unix
+\fCgethostname\fR(2)\f[]
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+.sp \n(Ppu
+.ne 2
+
+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 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 servers are operated outside firewall perimeters.
+.SS Operation
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]server\f[]
+or
+\f\*[B-Font]peer\f[]
+configuration command and no
+\f\*[B-Font]key\f[]
+or
+\f\*[B-Font]autokey\f[]
+subcommands are present, the association is not
+authenticated; if the
+\f\*[B-Font]key\f[]
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+\f\*[B-Font]autokey\f[]
+subcommand is present, the association is authenticated
+using Autokey.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\fCntpq\fR(1ntpqmdoc)\f[]
+program.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+\fCntp-keygen\fR(1ntpkeygenmdoc)\f[]
+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
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+.sp \n(Ppu
+.ne 2
+
+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 (CN) 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
+\f\*[B-Font]trustRoot\f[];.
+Other extension fields are ignored.
+.SS Authentication Commands
+.TP 7
+.NOP \f\*[B-Font]autokey\f[] [\f\*[I-Font]logsec\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]controlkey\f[] \f\*[I-Font]key\f[]
+Specifies the key identifier to use with the
+\fCntpq\fR(1ntpqmdoc)\f[]
+utility, which uses the standard
+protocol defined in RFC-1305.
+The
+\f\*[I-Font]key\f[]
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+.TP 7
+.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
+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
+\f\*[B-Font]keysdir\f[]
+command or default
+\fI/usr/local/etc\f[].
+Following are the subcommands:
+.RS
+.TP 7
+.NOP \f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]
+Specifies the location of the required host public certificate file.
+This overrides the link
+\fIntpkey_cert_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+\fIntpkey_gq_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]file\f[]
+Specifies the location of the required host key file.
+This overrides
+the link
+\fIntpkey_key_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+\fIntpkey_iff_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional leapsecond file.
+This overrides the link
+\fIntpkey_leap\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+\fIntpkey_mv_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+.TP 7
+.NOP \f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+.TP 7
+.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional sign key file.
+This overrides
+the link
+\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+.RE
+.TP 7
+.NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[]
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+\fCntpd\fR(1ntpdmdoc)\f[],
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+when operating with symmetric key cryptography.
+This is the same operation as the
+\f\*[B-Font]\-k\f[]
+command line option.
+.TP 7
+.NOP \f\*[B-Font]keysdir\f[] \f\*[I-Font]path\f[]
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+\fI/usr/local/etc/\f[].
+.TP 7
+.NOP \f\*[B-Font]requestkey\f[] \f\*[I-Font]key\f[]
+Specifies the key identifier to use with the
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility program, which uses a
+proprietary protocol specific to this implementation of
+\fCntpd\fR(1ntpdmdoc)\f[].
+The
+\f\*[I-Font]key\f[]
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+.TP 7
+.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]key\f[] \f\*[I-Font]...\f[]
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+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
+\f\*[I-Font]key\f[]
+arguments are 32-bit unsigned
+integers with values from 1 to 65,534.
+.PP
+.SS Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+.TP 7
+.NOP 101
+(bad field format or length)
+The packet has invalid version, length or format.
+.TP 7
+.NOP 102
+(bad timestamp)
+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.
+.TP 7
+.NOP 103
+(bad filestamp)
+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.
+.TP 7
+.NOP 104
+(bad or missing public key)
+The public key is missing, has incorrect format or is an unsupported type.
+.TP 7
+.NOP 105
+(unsupported digest type)
+The server requires an unsupported digest/signature scheme.
+.TP 7
+.NOP 106
+(mismatched digest types)
+Not used.
+.TP 7
+.NOP 107
+(bad signature length)
+The signature length does not match the current public key.
+.TP 7
+.NOP 108
+(signature not verified)
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+.TP 7
+.NOP 109
+(certificate not verified)
+The certificate is invalid or signed with the wrong key.
+.TP 7
+.NOP 110
+(certificate not verified)
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+.TP 7
+.NOP 111
+(bad or missing cookie)
+The cookie is missing, corrupted or bogus.
+.TP 7
+.NOP 112
+(bad or missing leapseconds table)
+The leapseconds table is missing, corrupted or bogus.
+.TP 7
+.NOP 113
+(bad or missing certificate)
+The certificate is missing, corrupted or bogus.
+.TP 7
+.NOP 114
+(bad or missing identity)
+The identity key is missing, corrupt or bogus.
+.PP
+.SH Monitoring Support
+\fCntpd\fR(1ntpdmdoc)\f[]
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+\f\*[B-Font]statistics\f[]
+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
+\fI./scripts\f[]
+directory of this distribution.
+Using
+these facilities and
+UNIX
+\fCcron\fR(8)\f[]
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+.SS Monitoring Commands
+.TP 7
+.NOP \f\*[B-Font]statistics\f[] \f\*[I-Font]name\f[] \f\*[I-Font]...\f[]
+Enables writing of statistics records.
+Currently, eight kinds of
+\f\*[I-Font]name\f[]
+statistics are supported.
+.RS
+.TP 7
+.NOP \f\*[B-Font]clockstats\f[]
+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
+\f\*[B-Font]clockstats\f[]:
+.br
+.in +4
+.nf
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]cryptostats\f[]
+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
+\f\*[B-Font]cryptostats\f[]:
+.br
+.in +4
+.nf
+49213 525.624 127.127.4.1 message
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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 message field includes the
+message type and certain ancillary information.
+See the
+\fIAuthentication\f[] \fIOptions\f[]
+section for further information.
+.TP 7
+.NOP \f\*[B-Font]loopstats\f[]
+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
+\f\*[B-Font]loopstats\f[]:
+.br
+.in +4
+.nf
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]peerstats\f[]
+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
+\f\*[B-Font]peerstats\f[]:
+.br
+.in +4
+.nf
+48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]rawstats\f[]
+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
+\f\*[B-Font]rawstats\f[]:
+.br
+.in +4
+.nf
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+\f\*[B-Font]sysstats\f[]:
+.br
+.in +4
+.nf
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.RS
+.TP 7
+.NOP Time since restart \f\*[B-Font]36000\f[]
+Time in hours since the system was last rebooted.
+.TP 7
+.NOP Packets received \f\*[B-Font]81965\f[]
+Total number of packets received.
+.TP 7
+.NOP Packets processed \f\*[B-Font]0\f[]
+Number of packets received in response to previous packets sent
+.TP 7
+.NOP Current version \f\*[B-Font]9546\f[]
+Number of packets matching the current NTP version.
+.TP 7
+.NOP Previous version \f\*[B-Font]56\f[]
+Number of packets matching the previous NTP version.
+.TP 7
+.NOP Bad version \f\*[B-Font]71793\f[]
+Number of packets matching neither NTP version.
+.TP 7
+.NOP Access denied \f\*[B-Font]512\f[]
+Number of packets denied access for any reason.
+.TP 7
+.NOP Bad length or format \f\*[B-Font]540\f[]
+Number of packets with invalid length, format or port number.
+.TP 7
+.NOP Bad authentication \f\*[B-Font]10\f[]
+Number of packets not verified as authentic.
+.TP 7
+.NOP Rate exceeded \f\*[B-Font]147\f[]
+Number of packets discarded due to rate limitation.
+.RE
+.TP 7
+.NOP \f\*[B-Font]statsdir\f[] \f\*[I-Font]directory_path\f[]
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+\f\*[B-Font]filegen\f[]
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+.TP 7
+.NOP \f\*[B-Font]filegen\f[] \f\*[I-Font]name\f[] [\f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]] [\f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]] [\f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]] [\f\*[B-Font]enable\f[] | \f\*[B-Font]disable\f[]]
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+.sp \n(Ppu
+.ne 2
+
+Note that this command can be sent from the
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+program running at a remote location.
+.RS
+.TP 7
+.NOP \f\*[B-Font]name\f[]
+This is the type of the statistics records, as shown in the
+\f\*[B-Font]statistics\f[]
+command.
+.TP 7
+.NOP \f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+\f\*[B-Font]prefix\f[],
+\f\*[B-Font]filename\f[]
+and
+\f\*[B-Font]suffix\f[]:
+.RS
+.TP 7
+.NOP \f\*[B-Font]prefix\f[]
+This is a constant filename path.
+It is not subject to
+modifications via the
+\f\*[I-Font]filegen\f[]
+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
+\f\*[I-Font]loopstats\f[]
+and
+\f\*[I-Font]peerstats\f[]
+generation can be configured using the
+\f\*[I-Font]statsdir\f[]
+option explained above.
+.TP 7
+.NOP \f\*[B-Font]filename\f[]
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+\[oq]/\[cq]).
+This can be modified using
+the file argument to the
+\f\*[I-Font]filegen\f[]
+statement.
+No
+\fI..\f[]
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+\f\*[I-Font]prefix\f[].
+.TP 7
+.NOP \f\*[B-Font]suffix\f[]
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+.RE
+.TP 7
+.NOP \f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]
+A file generation set is characterized by its type.
+The following
+types are supported:
+.RS
+.TP 7
+.NOP \f\*[B-Font]none\f[]
+The file set is actually a single plain file.
+.TP 7
+.NOP \f\*[B-Font]pid\f[]
+One element of file set is used per incarnation of a ntpd
+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
+\fCntpd\fR(1ntpdmdoc)\f[]
+server incarnations.
+The set member filename is built by appending a
+\[oq]\&.\[cq]
+to concatenated
+\f\*[I-Font]prefix\f[]
+and
+\f\*[I-Font]filename\f[]
+strings, and
+appending the decimal representation of the process ID of the
+\fCntpd\fR(1ntpdmdoc)\f[]
+server process.
+.TP 7
+.NOP \f\*[B-Font]day\f[]
+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
+\[oq]\&.\[cq]
+and a day specification in
+the form
+\f\*[B-Font]YYYYMMdd\f[].
+\f\*[B-Font]YYYY\f[]
+is a 4-digit year number (e.g., 1992).
+\f\*[B-Font]MM\f[]
+is a two digit month number.
+\f\*[B-Font]dd\f[]
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+\f\*[I-Font]prefix\f[]
+\f\*[I-Font]filename\f[].19921210.
+.TP 7
+.NOP \f\*[B-Font]week\f[]
+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
+\f\*[B-Font]W\f[],
+and a 2-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.NOP. \f\*[I-Font]1992W1\f[].
+.TP 7
+.NOP \f\*[B-Font]month\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]year\f[]
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+.TP 7
+.NOP \f\*[B-Font]age\f[]
+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
+\f\*[B-Font]a\f[],
+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
+\f\*[B-Font]enable\f[];
+output is prevented by specifying
+\f\*[B-Font]disable\f[].
+.RE
+.TP 7
+.NOP \f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]
+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
+\f\*[B-Font]link\f[]
+and disabled using
+\f\*[B-Font]nolink\f[].
+If link 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
+\f\*[B-Font]C\f[],
+and the pid of the ntpd 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.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]disable\f[]
+Enables or disables the recording function.
+.RE
+.RE
+.PP
+.SH Access Control Support
+The
+\fCntpd\fR(1ntpdmdoc)\f[]
+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
+"Notes on Configuring NTP and Setting up a NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+.SS The Kiss-of-Death Packet
+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" (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
+\f\*[B-Font]noserve\f[]
+or
+\f\*[B-Font]notrust\f[]
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+\f\*[B-Font]limited\f[]
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Access Control Commands
+.TP 7
+.NOP \f\*[B-Font]discard\f[] [\f\*[B-Font]average\f[] \f\*[I-Font]avg\f[]] [\f\*[B-Font]minimum\f[] \f\*[I-Font]min\f[]] [\f\*[B-Font]monitor\f[] \f\*[I-Font]prob\f[]]
+Set the parameters of the
+\f\*[B-Font]limited\f[]
+facility which protects the server from
+client abuse.
+The
+\f\*[B-Font]average\f[]
+subcommand specifies the minimum average packet
+spacing, while the
+\f\*[B-Font]minimum\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+The
+\f\*[I-Font]address\f[]
+argument expressed in
+dotted-quad form is the address of a host or network.
+Alternatively, the
+\f\*[I-Font]address\f[]
+argument can be a valid host DNS name.
+The
+\f\*[I-Font]mask\f[]
+argument expressed in dotted-quad form defaults to
+\f\*[B-Font]255.255.255.255\f[],
+meaning that the
+\f\*[I-Font]address\f[]
+is treated as the address of an individual host.
+A default entry (address
+\f\*[B-Font]0.0.0.0\f[],
+mask
+\f\*[B-Font]0.0.0.0\f[])
+is always included and is always the first entry in the list.
+Note that text string
+\f\*[B-Font]default\f[],
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+\f\*[B-Font]flag\f[]
+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
+categories, 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:
+.RS
+.TP 7
+.NOP \f\*[B-Font]ignore\f[]
+Deny packets of all kinds, including
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+queries.
+.TP 7
+.NOP \f\*[B-Font]kod\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]limited\f[]
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+\fCntpd\fR(1ntpdmdoc)\f[].
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+\f\*[B-Font]limited\f[]
+flag.
+.TP 7
+.NOP \f\*[B-Font]lowpriotrap\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]nomodify\f[]
+Deny
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+.TP 7
+.NOP \f\*[B-Font]noquery\f[]
+Deny
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+queries.
+Time service is not affected.
+.TP 7
+.NOP \f\*[B-Font]nopeer\f[]
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+\f\*[B-Font]pool\f[]
+associations, so if you want to use servers from a
+\f\*[B-Font]pool\f[]
+directive and also want to use
+\f\*[B-Font]nopeer\f[]
+by default, you'll want a
+\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
+.TP 7
+.NOP not
+include the
+\f\*[B-Font]nopeer\f[]
+directive.
+.TP 7
+.NOP \f\*[B-Font]noserve\f[]
+Deny all packets except
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+queries.
+.TP 7
+.NOP \f\*[B-Font]notrap\f[]
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+.TP 7
+.NOP \f\*[B-Font]notrust\f[]
+Deny service unless the packet is cryptographically authenticated.
+.TP 7
+.NOP \f\*[B-Font]ntpport\f[]
+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
+\f\*[B-Font]ntpport\f[]
+and
+\f\*[B-Font]non-ntpport\f[]
+may
+be specified.
+The
+\f\*[B-Font]ntpport\f[]
+is considered more specific and
+is sorted later in the list.
+.TP 7
+.NOP \f\*[B-Font]version\f[]
+Deny packets that do not match the current NTP version.
+.RE
+.sp \n(Ppu
+.ne 2
+
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+.PP
+.SH Automatic NTP Configuration Options
+.SS Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f[C]http://www.openssl.org/\f[].
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+.sp \n(Ppu
+.ne 2
+
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+\f\*[B-Font]D\f[]
+or IPv6 prefix
+\f\*[B-Font]FF\f[])
+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.
+.sp \n(Ppu
+.ne 2
+
+Manycast servers configured with the
+\f\*[B-Font]manycastserver\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]manycastclient\f[],
+\f\*[B-Font]tos\f[]
+and
+\f\*[B-Font]ttl\f[]
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+\f\*[B-Font]minpoll\f[]
+value specified in the
+\f\*[B-Font]manycastclient\f[],
+command and, under normal circumstances, increments to the
+\f\*[B-Font]maxpolll\f[]
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+.sp \n(Ppu
+.ne 2
+
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+\f\*[B-Font]minclock\f[]
+and
+\f\*[B-Font]minsane\f[]
+values specified in the
+\f\*[B-Font]tos\f[]
+configuration command.
+At least
+\f\*[B-Font]minsane\f[]
+candidate servers must be available and the mitigation
+algorithms produce at least
+\f\*[B-Font]minclock\f[]
+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,
+\f\*[B-Font]minsane\f[]
+defaults to 1 and
+\f\*[B-Font]minclock\f[]
+defaults to 3.
+For manycast service
+\f\*[B-Font]minsane\f[]
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+.sp \n(Ppu
+.ne 2
+
+If at least
+\f\*[B-Font]minclock\f[]
+servers are found, the manycast poll interval is immediately
+set to eight times
+\f\*[B-Font]maxpoll\f[].
+If less than
+\f\*[B-Font]minclock\f[]
+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
+\f\*[B-Font]maxpoll\f[].
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]ttl\f[]
+configuration command can be
+used to modify the values to match the scope rules.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]tos\f[]
+command can be used to modify this behavior.
+Servers with stratum below
+\f\*[B-Font]floor\f[]
+or above
+\f\*[B-Font]ceiling\f[]
+specified in the
+\f\*[B-Font]tos\f[]
+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
+\f\*[B-Font]minclock\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]minclock\f[],
+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
+\f\*[B-Font]maxpoll\f[]
+is 12 (4,096 s).
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]multicastclient\f[]
+and
+\f\*[B-Font]multicastserver\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+\f\*[B-Font]tos\f[]
+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
+\f\*[B-Font]floor\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Some administrators prefer to avoid running
+\fCntpd\fR(1ntpdmdoc)\f[]
+continuously and run either
+\fCntpdate\fR(8)\f[]
+or
+\fCntpd\fR(1ntpdmdoc)\f[]
+\f\*[B-Font]\-q\f[]
+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
+\fCntpd\fR(1ntpdmdoc)\f[]
+\f\*[B-Font]\-q\f[].
+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.
+.SS Manycast Interactions with Autokey
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Manycast Options
+.TP 7
+.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
+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:
+.RS
+.TP 7
+.NOP \f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[]
+Peers with strata above
+\f\*[B-Font]ceiling\f[]
+will be discarded if there are at least
+\f\*[B-Font]minclock\f[]
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+.TP 7
+.NOP \f\*[B-Font]cohort\f[] {0 | 1 }
+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.
+.TP 7
+.NOP \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[]
+Peers with strata below
+\f\*[B-Font]floor\f[]
+will be discarded if there are at least
+\f\*[B-Font]minclock\f[]
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+.TP 7
+.NOP \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[]
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+\f\*[B-Font]minclock\f[]
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+.TP 7
+.NOP \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]
+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,
+\f\*[B-Font]minsane\f[]
+should be at least 4 in order to detect and discard
+a single falseticker.
+.RE
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+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.
+.PP
+.SH Reference Clock Support
+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
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+Additional information can be found in the pages linked
+there, including the
+"Debugging Hints for Reference Clock Drivers"
+and
+"How To Write a Reference Clock Driver"
+pages
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+In addition, support for a PPS
+signal is available as described in the
+"Pulse-per-second (PPS) Signal Interfacing"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+"Line Disciplines and Streams Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+For the purposes of configuration,
+\fCntpd\fR(1ntpdmdoc)\f[]
+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
+\f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[],
+where
+\f\*[I-Font]t\f[]
+is an integer
+denoting the clock type and
+\f\*[I-Font]u\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]server\f[]
+command is used to configure a reference
+clock, where the
+\f\*[I-Font]address\f[]
+argument in that command
+is the clock address.
+The
+\f\*[B-Font]key\f[],
+\f\*[B-Font]version\f[]
+and
+\f\*[B-Font]ttl\f[]
+options are not used for reference clock support.
+The
+\f\*[B-Font]mode\f[]
+option is added for reference clock support, as
+described below.
+The
+\f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+page.
+The
+\f\*[B-Font]minpoll\f[]
+and
+\f\*[B-Font]maxpoll\f[]
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]fudge\f[]
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+\f\*[B-Font]server\f[]
+command.
+The
+\f\*[I-Font]address\f[]
+argument specifies the clock address.
+The
+\f\*[B-Font]refid\f[]
+and
+\f\*[B-Font]stratum\f[]
+options 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
+\f\*[B-Font]fudge\f[]
+command as well.
+.sp \n(Ppu
+.ne 2
+
+The stratum number of a reference clock is by default zero.
+Since the
+\fCntpd\fR(1ntpdmdoc)\f[]
+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
+\f\*[B-Font]stratum\f[]
+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
+\f\*[B-Font]refid\f[]
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+.SS Reference Clock Commands
+.TP 7
+.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+for further information.
+.TP 7
+.NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
+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
+parse
+drivers.
+.TP 7
+.NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]
+.TP 7
+.NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+\f\*[B-Font]minpoll\f[]
+and
+\f\*[B-Font]maxpoll\f[]
+default to 6 (64 s).
+For modem reference clocks,
+\f\*[B-Font]minpoll\f[]
+defaults to 10 (17.1 m) and
+\f\*[B-Font]maxpoll\f[]
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+.RE
+.TP 7
+.NOP \f\*[B-Font]fudge\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]time2\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]]
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+\f\*[B-Font]server\f[]
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+program.
+The options are interpreted as
+follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]
+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.
+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
+\f\*[B-Font]enable\f[]
+command described in
+\fIMiscellaneous\f[] \fIOptions\f[]
+page and operates as described in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]time2\f[] \f\*[I-Font]secs\f[]
+Specifies a fixed-point decimal number in seconds, which is
+interpreted in a driver-dependent way.
+See the descriptions of
+specific drivers in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
+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
+parse
+drivers.
+.TP 7
+.NOP \f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+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
+\f\*[B-Font]flag4\f[]
+is used to enable recording monitoring
+data to the
+\f\*[B-Font]clockstats\f[]
+file configured with the
+\f\*[B-Font]filegen\f[]
+command.
+Further information on the
+\f\*[B-Font]filegen\f[]
+command can be found in
+\fIMonitoring\f[] \fIOptions\f[].
+.RE
+.PP
+.SH Miscellaneous Options
+.TP 7
+.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[]
+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
+\f\*[B-Font]\-f\f[]
+command line 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.
+.sp \n(Ppu
+.ne 2
+
+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
+\fCntpd\fR(1ntpdmdoc)\f[]
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[]]
+.TP 7
+.NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[]]
+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
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility program.
+.RS
+.TP 7
+.NOP \f\*[B-Font]auth\f[]
+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
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]bclient\f[]
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+\f\*[B-Font]multicastclient\f[]
+command with default
+address.
+The default for this flag is
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]calibrate\f[]
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]kernel\f[]
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+\f\*[B-Font]enable\f[]
+if support is available, otherwise
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]mode7\f[]
+Enables processing of NTP mode 7 implementation-specific requests
+which are used by the deprecated
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+\fCntpq\fR(1ntpqmdoc)\f[].
+The
+\fCntpq\fR(1ntpqmdoc)\f[]
+program provides the same capabilities as
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+using standard mode 6 requests.
+.TP 7
+.NOP \f\*[B-Font]monitor\f[]
+Enables the monitoring facility.
+See the
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+program
+and the
+\f\*[B-Font]monlist\f[]
+command or further information.
+The
+default for this flag is
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]ntp\f[]
+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
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]stats\f[]
+Enables the statistics facility.
+See the
+\fIMonitoring\f[] \fIOptions\f[]
+section for further information.
+The default for this flag is
+\f\*[B-Font]disable\f[].
+.RE
+.TP 7
+.NOP \f\*[B-Font]includefile\f[] \f\*[I-Font]includefile\f[]
+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
+\fCntpd\fR(1ntpdmdoc)\f[]
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+.TP 7
+.NOP \f\*[B-Font]logconfig\f[] \f\*[I-Font]configkeyword\f[]
+This command controls the amount and type of output written to
+the system
+\fCsyslog\fR(3)\f[]
+facility or the alternate
+\f\*[B-Font]logfile\f[]
+log file.
+By default, all output is turned on.
+All
+\f\*[I-Font]configkeyword\f[]
+keywords can be prefixed with
+\[oq]=\[cq],
+\[oq]+\[cq]
+and
+\[oq]\-\[cq],
+where
+\[oq]=\[cq]
+sets the
+\fCsyslog\fR(3)\f[]
+priority mask,
+\[oq]+\[cq]
+adds and
+\[oq]\-\[cq]
+removes
+messages.
+\fCsyslog\fR(3)\f[]
+messages can be controlled in four
+classes
+(\f\*[B-Font]clock\f[], \f\*[B-Font]peer\f[], \f\*[B-Font]sys\f[] and \f\*[B-Font]sync\f[]).
+Within these classes four types of messages can be
+controlled: informational messages
+(\f\*[B-Font]info\f[]),
+event messages
+(\f\*[B-Font]events\f[]),
+statistics messages
+(\f\*[B-Font]statistics\f[])
+and
+status messages
+(\f\*[B-Font]status\f[]).
+.sp \n(Ppu
+.ne 2
+
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+\f\*[B-Font]all\f[]
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+\f\*[B-Font]all\f[]
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+.br
+.in +4
+.nf
+logconfig =syncstatus +sysevents
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+This would just list the synchronizations state of
+\fCntpd\fR(1ntpdmdoc)\f[]
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+.br
+.in +4
+.nf
+logconfig =syncall +clockall
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+.TP 7
+.NOP \f\*[B-Font]logfile\f[] \f\*[I-Font]logfile\f[]
+This command specifies the location of an alternate log file to
+be used instead of the default system
+\fCsyslog\fR(3)\f[]
+facility.
+This is the same operation as the \-l command line option.
+.TP 7
+.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
+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
+\fIname\f[]\fI=\f[]\f\*[I-Font]value\f[]
+is followed by the
+\f\*[B-Font]default\f[]
+keyword, the
+variable will be listed as part of the default system variables
+(\fCntpq\fR(1ntpqmdoc)\f[] \f\*[B-Font]rv\f[] 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
+\f\*[B-Font]setvar\f[]
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+\fIsys_var_list\f[]
+holds
+the names of all system variables.
+The
+\fIpeer_var_list\f[]
+holds
+the names of all peer variables and the
+\fIclock_var_list\f[]
+holds the names of the reference clock variables.
+.TP 7
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+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 cannot 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.
+.sp \n(Ppu
+.ne 2
+
+The variables operate as follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[]
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+.TP 7
+.NOP \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]step\f[] \f\*[I-Font]step\f[]
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+.TP 7
+.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
+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.
+.RE
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+\f\*[B-Font]\-i\f[]
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+\fBmlockall\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.RE
+.TP 7
+.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]hop\f[] \f\*[I-Font]...\f[]
+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.
+.PP
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_CONF_<option-name>\fP or \fBNTP_CONF\fP
+.fi
+.ad
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH FILES
+.TP 15
+.NOP \fI/etc/ntp.conf\f[]
+the default name of the configuration file
+.br
+.ns
+.TP 15
+.NOP \fIntp.keys\f[]
+private MD5 keys
+.br
+.ns
+.TP 15
+.NOP \fIntpkey\f[]
+RSA private key
+.br
+.ns
+.TP 15
+.NOP \fIntpkey_\f[]\f\*[I-Font]host\f[]
+RSA public key
+.br
+.ns
+.TP 15
+.NOP \fIntp_dh\f[]
+Diffie-Hellman agreement parameters
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntpd\fR(1ntpdmdoc)\f[],
+\fCntpdc\fR(1ntpdcmdoc)\f[],
+\fCntpq\fR(1ntpqmdoc)\f[]
+.sp \n(Ppu
+.ne 2
+
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+\f[C]http://www.ntp.org/\f[].
+A snapshot of this documentation is available in HTML format in
+\fI/usr/share/doc/ntp\f[].
+David L. Mills,
+\fINetwork Time Protocol (Version 4)\fR,
+RFC5905
+.PP
+
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+.sp \n(Ppu
+.ne 2
+
+The
+\fIntpkey_\f[]\f\*[I-Font]host\f[]
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+This document was derived from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp.conf\fP
+option definitions.
diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc
new file mode 100644
index 000000000000..3358d0c0b066
--- /dev/null
+++ b/ntpd/ntp.conf.5mdoc
@@ -0,0 +1,2808 @@
+.Dd December 19 2014
+.Dt NTP_CONF 5mdoc File Formats
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.conf.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp.conf
+.Nd Network Time Protocol (NTP) daemon configuration file format
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+configuration file is read at initial startup by the
+.Xr ntpd 1ntpdmdoc
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+.Pa /etc
+directory,
+but could be installed elsewhere
+(see the daemon's
+.Fl c
+command line option).
+.Pp
+The file format is similar to other
+.Ux
+configuration files.
+Comments begin with a
+.Ql #
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+.Pp
+The rest of this page describes the configuration and control options.
+The
+.Qq Notes on Configuring NTP and Setting up an NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+contains an extended discussion of these options.
+In addition to the discussion of general
+.Sx Configuration Options ,
+there are sections describing the following supported functionality
+and the options used to control it:
+.Bl -bullet -offset indent
+.It
+.Sx Authentication Support
+.It
+.Sx Monitoring Support
+.It
+.Sx Access Control Support
+.It
+.Sx Automatic NTP Configuration Options
+.It
+.Sx Reference Clock Support
+.It
+.Sx Miscellaneous Options
+.El
+.Pp
+Following these is a section describing
+.Sx Miscellaneous Options .
+While there is a rich set of options available,
+the only required option is one or more
+.Ic pool ,
+.Ic server ,
+.Ic peer ,
+.Ic broadcast
+or
+.Ic manycastclient
+commands.
+.Sh Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+.Ss Configuration Commands
+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.
+.Pp
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+.Dq \&:
+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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+.Bl -tag -width indent
+.It Xo Ic pool Ar address
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic server Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic peer Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic broadcast Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm ttl Ar ttl
+.Xc
+.It Xo Ic manycastclient Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Op Cm ttl Ar ttl
+.Xc
+.El
+.Pp
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+.Ar address
+can be
+either a DNS name or an IP address in dotted\-quad notation.
+Additional information on association behavior can be found in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Bl -tag -width indent
+.It Ic pool
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+.It Ic server
+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
+.Em not
+be used for type
+b or m addresses.
+.It Ic peer
+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
+b, m or r addresses.
+.It Ic broadcast
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+.Ar address
+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
+.Ic broadcastclient
+or
+.Ic multicastclient
+commands
+below.
+.It Ic manycastclient
+For type m 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
+.Ic manycastserver
+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.
+The
+.Ic manycastserver
+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
+.Ar address
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+.Ic server
+command.
+The remaining servers are discarded as if never
+heard.
+.El
+.Pp
+Options:
+.Bl -tag -width indent
+.It Cm autokey
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+.Sx Authentication Options .
+.It Cm burst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+.Ic server
+command and s addresses.
+.It Cm iburst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+.Ic server
+command and s addresses and when
+.Xr ntpd 1ntpdmdoc
+is started with the
+.Fl q
+option.
+.It Cm key Ar key
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+.Ar key
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+.It Cm minpoll Ar minpoll
+.It Cm maxpoll Ar maxpoll
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+.Cm maxpoll
+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
+.Cm minpoll
+option to a lower limit of 4 (16 s).
+.It Cm noselect
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm ttl Ar ttl
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time\-to\-live
+.Ar ttl
+to
+use on broadcast server and multicast server and the maximum
+.Ar ttl
+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.
+.It Cm version Ar version
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1\-4 are the choices, with version 4 the
+default.
+.El
+.Ss Auxiliary Commands
+.Bl -tag -width indent
+.It Ic broadcastclient
+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
+.Sx Authentication Options .
+.It Ic manycastserver Ar address ...
+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
+.Sx Authentication Options .
+.It Ic multicastclient Ar address ...
+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
+.Sx Authentication Options .
+.El
+.Sh Authentication Support
+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.
+.Pp
+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.
+.Pp
+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 Building and Installing the Distribution page.
+.Pp
+Authentication is configured separately for each association
+using the
+.Cm key
+or
+.Cm autokey
+subcommand on the
+.Ic peer ,
+.Ic server ,
+.Ic broadcast
+and
+.Ic manycastclient
+configuration commands as described in
+.Sx Configuration Options
+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.
+.Pp
+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
+.Pp
+The
+.Cm auth
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+.Ic enable
+and
+.Ic disable
+commands and also by remote
+configuration commands sent by a
+.Xr ntpdc 1ntpdcmdoc
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+.Ic auth
+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.
+.Pp
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+.Sx Automatic NTP Configuration Options
+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.
+.Pp
+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
+.Li http://www.ntp.org/ .
+.Ss Symmetric\-Key Cryptography
+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
+.Pa ntp.keys ,
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+When
+.Xr ntpd 1ntpdmdoc
+is first started, it reads the key file specified in the
+.Ic keys
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+.Ic trusted
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+.Xr ntpdc 1ntpdcmdoc .
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+.Ic requestkey
+command selects the key used as the password for the
+.Xr ntpdc 1ntpdcmdoc
+utility, while the
+.Ic controlkey
+command selects the key used as the password for the
+.Xr ntpq 1ntpqmdoc
+utility.
+.Ss Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+.\" .Pp
+.\" The cryptographic means necessary for all Autokey operations
+.\" is provided by the OpenSSL software library.
+.\" This library is available from http://www.openssl.org/
+.\" and can be installed using the procedures outlined
+.\" in the Building and Installing the Distribution page.
+.\" Once installed,
+.\" the configure and build
+.\" process automatically detects the library and links
+.\" the library routines required.
+.Pp
+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
+.Sx Autonomous Authentication
+page.
+.Pp
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+.Xr ntp\-keygen 1ntpkeygenmdoc
+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
+.Cm md5WithRSAEncryption ,
+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.
+.Pp
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+.Ss Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+.Pp
+By convention, the name of an Autokey host is the name returned
+by the Unix
+.Xr gethostname 2
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+.Pp
+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 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 servers are operated outside firewall perimeters.
+.Ss Operation
+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.
+.Pp
+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
+.Ic server
+or
+.Ic peer
+configuration command and no
+.Ic key
+or
+.Ic autokey
+subcommands are present, the association is not
+authenticated; if the
+.Ic key
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+.Ic autokey
+subcommand is present, the association is authenticated
+using Autokey.
+.Pp
+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.
+.Pp
+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.
+.Pp
+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
+.Xr ntpq 1ntpqmdoc
+program.
+.Pp
+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.
+.Pp
+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.
+.Ss Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+.Xr ntp\-keygen 1ntpkeygenmdoc
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+.Pp
+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 (CN) 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
+.Cm trustRoot ; .
+Other extension fields are ignored.
+.Ss Authentication Commands
+.Bl -tag -width indent
+.It Ic autokey Op Ar logsec
+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.
+.It Ic controlkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpq 1ntpqmdoc
+utility, which uses the standard
+protocol defined in RFC\-1305.
+The
+.Ar key
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+.It Xo Ic crypto
+.Op Cm cert Ar file
+.Op Cm leap Ar file
+.Op Cm randfile Ar file
+.Op Cm host Ar file
+.Op Cm sign Ar file
+.Op Cm gq Ar file
+.Op Cm gqpar Ar file
+.Op Cm iffpar Ar file
+.Op Cm mvpar Ar file
+.Op Cm pw Ar password
+.Xc
+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
+.Ic keysdir
+command or default
+.Pa /usr/local/etc .
+Following are the subcommands:
+.Bl -tag -width indent
+.It Cm cert Ar file
+Specifies the location of the required host public certificate file.
+This overrides the link
+.Pa ntpkey_cert_ Ns Ar hostname
+in the keys directory.
+.It Cm gqpar Ar file
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+.Pa ntpkey_gq_ Ns Ar hostname
+in the keys directory.
+.It Cm host Ar file
+Specifies the location of the required host key file.
+This overrides
+the link
+.Pa ntpkey_key_ Ns Ar hostname
+in the keys directory.
+.It Cm iffpar Ar file
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+.Pa ntpkey_iff_ Ns Ar hostname
+in the keys directory.
+.It Cm leap Ar file
+Specifies the location of the optional leapsecond file.
+This overrides the link
+.Pa ntpkey_leap
+in the keys directory.
+.It Cm mvpar Ar file
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+.Pa ntpkey_mv_ Ns Ar hostname
+in the keys directory.
+.It Cm pw Ar password
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+.It Cm randfile Ar file
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+.It Cm sign Ar file
+Specifies the location of the optional sign key file.
+This overrides
+the link
+.Pa ntpkey_sign_ Ns Ar hostname
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+.El
+.It Ic keys Ar keyfile
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+when operating with symmetric key cryptography.
+This is the same operation as the
+.Fl k
+command line option.
+.It Ic keysdir Ar path
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+.Pa /usr/local/etc/ .
+.It Ic requestkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpdc 1ntpdcmdoc
+utility program, which uses a
+proprietary protocol specific to this implementation of
+.Xr ntpd 1ntpdmdoc .
+The
+.Ar key
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+.It Ic revoke Ar logsec
+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.
+.It Ic trustedkey Ar key ...
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+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
+.Ar key
+arguments are 32\-bit unsigned
+integers with values from 1 to 65,534.
+.El
+.Ss Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+.Bl -tag -width indent
+.It 101
+.Pq bad field format or length
+The packet has invalid version, length or format.
+.It 102
+.Pq bad timestamp
+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.
+.It 103
+.Pq bad filestamp
+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.
+.It 104
+.Pq bad or missing public key
+The public key is missing, has incorrect format or is an unsupported type.
+.It 105
+.Pq unsupported digest type
+The server requires an unsupported digest/signature scheme.
+.It 106
+.Pq mismatched digest types
+Not used.
+.It 107
+.Pq bad signature length
+The signature length does not match the current public key.
+.It 108
+.Pq signature not verified
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+.It 109
+.Pq certificate not verified
+The certificate is invalid or signed with the wrong key.
+.It 110
+.Pq certificate not verified
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+.It 111
+.Pq bad or missing cookie
+The cookie is missing, corrupted or bogus.
+.It 112
+.Pq bad or missing leapseconds table
+The leapseconds table is missing, corrupted or bogus.
+.It 113
+.Pq bad or missing certificate
+The certificate is missing, corrupted or bogus.
+.It 114
+.Pq bad or missing identity
+The identity key is missing, corrupt or bogus.
+.El
+.Sh Monitoring Support
+.Xr ntpd 1ntpdmdoc
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+.Ic statistics
+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
+.Pa ./scripts
+directory of this distribution.
+Using
+these facilities and
+.Ux
+.Xr cron 8
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+.Ss Monitoring Commands
+.Bl -tag -width indent
+.It Ic statistics Ar name ...
+Enables writing of statistics records.
+Currently, eight kinds of
+.Ar name
+statistics are supported.
+.Bl -tag -width indent
+.It Cm clockstats
+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
+.Cm clockstats :
+.Bd -literal
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+.Ed
+.Pp
+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.
+.It Cm cryptostats
+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
+.Cm cryptostats :
+.Bd -literal
+49213 525.624 127.127.4.1 message
+.Ed
+.Pp
+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 message field includes the
+message type and certain ancillary information.
+See the
+.Sx Authentication Options
+section for further information.
+.It Cm loopstats
+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
+.Cm loopstats :
+.Bd -literal
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+.Ed
+.Pp
+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.
+.It Cm peerstats
+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
+.Cm peerstats :
+.Bd -literal
+48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
+.Ed
+.Pp
+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.
+.It Cm rawstats
+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
+.Cm rawstats :
+.Bd -literal
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+.Ed
+.Pp
+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.
+.It Cm sysstats
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+.Cm sysstats :
+.Bd -literal
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+.Ed
+.Pp
+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.
+.Bl -tag -width indent
+.It Time since restart Cm 36000
+Time in hours since the system was last rebooted.
+.It Packets received Cm 81965
+Total number of packets received.
+.It Packets processed Cm 0
+Number of packets received in response to previous packets sent
+.It Current version Cm 9546
+Number of packets matching the current NTP version.
+.It Previous version Cm 56
+Number of packets matching the previous NTP version.
+.It Bad version Cm 71793
+Number of packets matching neither NTP version.
+.It Access denied Cm 512
+Number of packets denied access for any reason.
+.It Bad length or format Cm 540
+Number of packets with invalid length, format or port number.
+.It Bad authentication Cm 10
+Number of packets not verified as authentic.
+.It Rate exceeded Cm 147
+Number of packets discarded due to rate limitation.
+.El
+.It Cm statsdir Ar directory_path
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+.Cm filegen
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+.It Cm filegen Ar name Xo
+.Op Cm file Ar filename
+.Op Cm type Ar typename
+.Op Cm link | nolink
+.Op Cm enable | disable
+.Xc
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+.Pp
+Note that this command can be sent from the
+.Xr ntpdc 1ntpdcmdoc
+program running at a remote location.
+.Bl -tag -width indent
+.It Cm name
+This is the type of the statistics records, as shown in the
+.Cm statistics
+command.
+.It Cm file Ar filename
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+.Ar Cm prefix ,
+.Ar Cm filename
+and
+.Ar Cm suffix :
+.Bl -tag -width indent
+.It Cm prefix
+This is a constant filename path.
+It is not subject to
+modifications via the
+.Ar filegen
+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
+.Ar loopstats
+and
+.Ar peerstats
+generation can be configured using the
+.Ar statsdir
+option explained above.
+.It Cm filename
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+.Ql / ) .
+This can be modified using
+the file argument to the
+.Ar filegen
+statement.
+No
+.Pa ..
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+.Ar prefix .
+.It Cm suffix
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+.El
+.It Cm type Ar typename
+A file generation set is characterized by its type.
+The following
+types are supported:
+.Bl -tag -width indent
+.It Cm none
+The file set is actually a single plain file.
+.It Cm pid
+One element of file set is used per incarnation of a ntpd
+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
+.Xr ntpd 1ntpdmdoc
+server incarnations.
+The set member filename is built by appending a
+.Ql \&.
+to concatenated
+.Ar prefix
+and
+.Ar filename
+strings, and
+appending the decimal representation of the process ID of the
+.Xr ntpd 1ntpdmdoc
+server process.
+.It Cm day
+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
+.Ql \&.
+and a day specification in
+the form
+.Cm YYYYMMdd .
+.Cm YYYY
+is a 4\-digit year number (e.g., 1992).
+.Cm MM
+is a two digit month number.
+.Cm dd
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+.Ar prefix
+.Ar filename Ns .19921210 .
+.It Cm week
+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
+.Cm W ,
+and a 2\-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.No . Ns Ar 1992W1 .
+.It Cm month
+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.
+.It Cm year
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+.It Cm age
+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
+.Cm a ,
+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
+.Cm enable ;
+output is prevented by specifying
+.Cm disable .
+.El
+.It Cm link | nolink
+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
+.Cm link
+and disabled using
+.Cm nolink .
+If link 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
+.Cm C ,
+and the pid of the ntpd 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.
+.It Cm enable \&| Cm disable
+Enables or disables the recording function.
+.El
+.El
+.El
+.Sh Access Control Support
+The
+.Xr ntpd 1ntpdmdoc
+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
+.Qq Notes on Configuring NTP and Setting up a NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+.Ss The Kiss\-of\-Death Packet
+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" (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
+.Cm noserve
+or
+.Cm notrust
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+.Cm limited
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+.Pp
+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.
+.Ss Access Control Commands
+.Bl -tag -width indent
+.It Xo Ic discard
+.Op Cm average Ar avg
+.Op Cm minimum Ar min
+.Op Cm monitor Ar prob
+.Xc
+Set the parameters of the
+.Cm limited
+facility which protects the server from
+client abuse.
+The
+.Cm average
+subcommand specifies the minimum average packet
+spacing, while the
+.Cm minimum
+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.
+.It Xo Ic restrict address
+.Op Cm mask Ar mask
+.Op Ar flag ...
+.Xc
+The
+.Ar address
+argument expressed in
+dotted\-quad form is the address of a host or network.
+Alternatively, the
+.Ar address
+argument can be a valid host DNS name.
+The
+.Ar mask
+argument expressed in dotted\-quad form defaults to
+.Cm 255.255.255.255 ,
+meaning that the
+.Ar address
+is treated as the address of an individual host.
+A default entry (address
+.Cm 0.0.0.0 ,
+mask
+.Cm 0.0.0.0 )
+is always included and is always the first entry in the list.
+Note that text string
+.Cm default ,
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+.Cm flag
+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
+categories, 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:
+.Bl -tag -width indent
+.It Cm ignore
+Deny packets of all kinds, including
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+.It Cm kod
+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.
+.It Cm limited
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+.Xr ntpd 1ntpdmdoc .
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+.Cm limited
+flag.
+.It Cm lowpriotrap
+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.
+.It Cm nomodify
+Deny
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+.It Cm noquery
+Deny
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+Time service is not affected.
+.It Cm nopeer
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+.Cm pool
+associations, so if you want to use servers from a
+.Cm pool
+directive and also want to use
+.Cm nopeer
+by default, you'll want a
+.Cm "restrict source ..." line as well that does
+.It not
+include the
+.Cm nopeer
+directive.
+.It Cm noserve
+Deny all packets except
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+.It Cm notrap
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+.It Cm notrust
+Deny service unless the packet is cryptographically authenticated.
+.It Cm ntpport
+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
+.Cm ntpport
+and
+.Cm non\-ntpport
+may
+be specified.
+The
+.Cm ntpport
+is considered more specific and
+is sorted later in the list.
+.It Cm version
+Deny packets that do not match the current NTP version.
+.El
+.Pp
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+.El
+.Sh Automatic NTP Configuration Options
+.Ss Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+.Pp
+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.
+.Pp
+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
+.Li http://www.openssl.org/ .
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+.Pp
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+.Cm D
+or IPv6 prefix
+.Cm FF )
+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.
+.Pp
+Manycast servers configured with the
+.Ic manycastserver
+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.
+.Pp
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+.Pp
+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
+.Ic manycastclient ,
+.Ic tos
+and
+.Ic ttl
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+.Cm minpoll
+value specified in the
+.Ic manycastclient ,
+command and, under normal circumstances, increments to the
+.Cm maxpolll
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+.Pp
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+.Cm minclock
+and
+.Cm minsane
+values specified in the
+.Ic tos
+configuration command.
+At least
+.Cm minsane
+candidate servers must be available and the mitigation
+algorithms produce at least
+.Cm minclock
+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,
+.Cm minsane
+defaults to 1 and
+.Cm minclock
+defaults to 3.
+For manycast service
+.Cm minsane
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+.Pp
+If at least
+.Cm minclock
+servers are found, the manycast poll interval is immediately
+set to eight times
+.Cm maxpoll .
+If less than
+.Cm minclock
+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
+.Cm maxpoll .
+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.
+.Pp
+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
+.Ic ttl
+configuration command can be
+used to modify the values to match the scope rules.
+.Pp
+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
+.Ic tos
+command can be used to modify this behavior.
+Servers with stratum below
+.Cm floor
+or above
+.Cm ceiling
+specified in the
+.Ic tos
+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
+.Cm minclock .
+.Pp
+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
+.Cm minclock ,
+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
+.Cm maxpoll
+is 12 (4,096 s).
+.Pp
+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
+.Ic multicastclient
+and
+.Ic multicastserver
+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.
+.Pp
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+.Ic tos
+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
+.Cm floor
+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.
+.Pp
+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.
+.Pp
+Some administrators prefer to avoid running
+.Xr ntpd 1ntpdmdoc
+continuously and run either
+.Xr ntpdate 8
+or
+.Xr ntpd 1ntpdmdoc
+.Fl q
+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
+.Xr ntpd 1ntpdmdoc
+.Fl q .
+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.
+.Ss Manycast Interactions with Autokey
+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.
+.Pp
+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.
+.Ss Manycast Options
+.Bl -tag -width indent
+.It Xo Ic tos
+.Oo
+.Cm ceiling Ar ceiling |
+.Cm cohort { 0 | 1 } |
+.Cm floor Ar floor |
+.Cm minclock Ar minclock |
+.Cm minsane Ar minsane
+.Oc
+.Xc
+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:
+.Bl -tag -width indent
+.It Cm ceiling Ar ceiling
+Peers with strata above
+.Cm ceiling
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+.It Cm cohort Bro 0 | 1 Brc
+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.
+.It Cm floor Ar floor
+Peers with strata below
+.Cm floor
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+.It Cm minclock Ar minclock
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+.Cm minclock
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+.It Cm minsane Ar minsane
+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,
+.Cm minsane
+should be at least 4 in order to detect and discard
+a single falseticker.
+.El
+.It Cm ttl Ar hop ...
+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.
+.El
+.Sh Reference Clock Support
+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
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Additional information can be found in the pages linked
+there, including the
+.Qq Debugging Hints for Reference Clock Drivers
+and
+.Qq How To Write a Reference Clock Driver
+pages
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+In addition, support for a PPS
+signal is available as described in the
+.Qq Pulse\-per\-second (PPS) Signal Interfacing
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+.Qq Line Disciplines and Streams Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+For the purposes of configuration,
+.Xr ntpd 1ntpdmdoc
+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
+.Sm off
+.Li 127.127. Ar t . Ar u ,
+.Sm on
+where
+.Ar t
+is an integer
+denoting the clock type and
+.Ar u
+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.
+.Pp
+The
+.Ic server
+command is used to configure a reference
+clock, where the
+.Ar address
+argument in that command
+is the clock address.
+The
+.Cm key ,
+.Cm version
+and
+.Cm ttl
+options are not used for reference clock support.
+The
+.Cm mode
+option is added for reference clock support, as
+described below.
+The
+.Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page.
+The
+.Cm minpoll
+and
+.Cm maxpoll
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+.Pp
+The
+.Ic fudge
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+.Ic server
+command.
+The
+.Ar address
+argument specifies the clock address.
+The
+.Cm refid
+and
+.Cm stratum
+options 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
+.Ic fudge
+command as well.
+.Pp
+The stratum number of a reference clock is by default zero.
+Since the
+.Xr ntpd 1ntpdmdoc
+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
+.Cm stratum
+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
+.Cm refid
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+.Ss Reference Clock Commands
+.Bl -tag -width indent
+.It Xo Ic server
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm prefer
+.Op Cm mode Ar int
+.Op Cm minpoll Ar int
+.Op Cm maxpoll Ar int
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+.Bl -tag -width indent
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm minpoll Ar int
+.It Cm maxpoll Ar int
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+.Cm minpoll
+and
+.Cm maxpoll
+default to 6 (64 s).
+For modem reference clocks,
+.Cm minpoll
+defaults to 10 (17.1 m) and
+.Cm maxpoll
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+.El
+.It Xo Ic fudge
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm time1 Ar sec
+.Op Cm time2 Ar sec
+.Op Cm stratum Ar int
+.Op Cm refid Ar string
+.Op Cm mode Ar int
+.Op Cm flag1 Cm 0 \&| Cm 1
+.Op Cm flag2 Cm 0 \&| Cm 1
+.Op Cm flag3 Cm 0 \&| Cm 1
+.Op Cm flag4 Cm 0 \&| Cm 1
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+.Ic server
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+.Xr ntpdc 1ntpdcmdoc
+program.
+The options are interpreted as
+follows:
+.Bl -tag -width indent
+.It Cm time1 Ar sec
+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.
+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
+.Ic enable
+command described in
+.Sx Miscellaneous Options
+page and operates as described in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm time2 Ar secs
+Specifies a fixed\-point decimal number in seconds, which is
+interpreted in a driver\-dependent way.
+See the descriptions of
+specific drivers in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm stratum Ar int
+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.
+.It Cm refid Ar string
+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.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm flag1 Cm 0 \&| Cm 1
+.It Cm flag2 Cm 0 \&| Cm 1
+.It Cm flag3 Cm 0 \&| Cm 1
+.It Cm flag4 Cm 0 \&| Cm 1
+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
+.Cm flag4
+is used to enable recording monitoring
+data to the
+.Cm clockstats
+file configured with the
+.Ic filegen
+command.
+Further information on the
+.Ic filegen
+command can be found in
+.Sx Monitoring Options .
+.El
+.El
+.Sh Miscellaneous Options
+.Bl -tag -width indent
+.It Ic broadcastdelay Ar seconds
+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.
+.It Ic calldelay Ar delay
+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.
+.It Ic driftfile Ar driftfile
+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
+.Fl f
+command line 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.
+.Pp
+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
+.Xr ntpd 1ntpdmdoc
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+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
+.Xr ntpdc 1ntpdcmdoc
+utility program.
+.Bl -tag -width indent
+.It Cm auth
+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
+.Ic enable .
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+.Ic multicastclient
+command with default
+address.
+The default for this flag is
+.Ic disable .
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+.Ic disable .
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+.Ic enable
+if support is available, otherwise
+.Ic disable .
+.It Cm mode7
+Enables processing of NTP mode 7 implementation\-specific requests
+which are used by the deprecated
+.Xr ntpdc 1ntpdcmdoc
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+.Xr ntpq 1ntpqmdoc .
+The
+.Xr ntpq 1ntpqmdoc
+program provides the same capabilities as
+.Xr ntpdc 1ntpdcmdoc
+using standard mode 6 requests.
+.It Cm monitor
+Enables the monitoring facility.
+See the
+.Xr ntpdc 1ntpdcmdoc
+program
+and the
+.Ic monlist
+command or further information.
+The
+default for this flag is
+.Ic enable .
+.It Cm ntp
+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
+.Ic enable .
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section for further information.
+The default for this flag is
+.Ic disable .
+.El
+.It Ic includefile Ar includefile
+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
+.Xr ntpd 1ntpdmdoc
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+.It Ic logconfig Ar configkeyword
+This command controls the amount and type of output written to
+the system
+.Xr syslog 3
+facility or the alternate
+.Ic logfile
+log file.
+By default, all output is turned on.
+All
+.Ar configkeyword
+keywords can be prefixed with
+.Ql = ,
+.Ql +
+and
+.Ql \- ,
+where
+.Ql =
+sets the
+.Xr syslog 3
+priority mask,
+.Ql +
+adds and
+.Ql \-
+removes
+messages.
+.Xr syslog 3
+messages can be controlled in four
+classes
+.Po
+.Cm clock ,
+.Cm peer ,
+.Cm sys
+and
+.Cm sync
+.Pc .
+Within these classes four types of messages can be
+controlled: informational messages
+.Po
+.Cm info
+.Pc ,
+event messages
+.Po
+.Cm events
+.Pc ,
+statistics messages
+.Po
+.Cm statistics
+.Pc
+and
+status messages
+.Po
+.Cm status
+.Pc .
+.Pp
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+.Cm all
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+.Cm all
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+.Bd -literal
+logconfig =syncstatus +sysevents
+.Ed
+.Pp
+This would just list the synchronizations state of
+.Xr ntpd 1ntpdmdoc
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+.Bd -literal
+logconfig =syncall +clockall
+.Ed
+.Pp
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+.It Ic logfile Ar logfile
+This command specifies the location of an alternate log file to
+be used instead of the default system
+.Xr syslog 3
+facility.
+This is the same operation as the \-l command line option.
+.It Ic setvar Ar variable Op Cm default
+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
+.Sm off
+.Va name = Ar value
+.Sm on
+is followed by the
+.Cm default
+keyword, the
+variable will be listed as part of the default system variables
+.Po
+.Xr ntpq 1ntpqmdoc
+.Ic rv
+command
+.Pc ) .
+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
+.Ic setvar
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+.Va sys_var_list
+holds
+the names of all system variables.
+The
+.Va peer_var_list
+holds
+the names of all peer variables and the
+.Va clock_var_list
+holds the names of the reference clock variables.
+.It Xo Ic tinker
+.Oo
+.Cm allan Ar allan |
+.Cm dispersion Ar dispersion |
+.Cm freq Ar freq |
+.Cm huffpuff Ar huffpuff |
+.Cm panic Ar panic |
+.Cm step Ar srep |
+.Cm stepout Ar stepout
+.Oc
+.Xc
+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 cannot 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.
+.Pp
+The variables operate as follows:
+.Bl -tag -width indent
+.It Cm allan Ar allan
+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.
+.It Cm dispersion Ar dispersion
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+.It Cm freq Ar freq
+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.
+.It Cm huffpuff Ar huffpuff
+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.
+.It Cm panic Ar panic
+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.
+.It Cm step Ar step
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+.It Cm stepout Ar stepout
+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.
+.El
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.El
+.It Xo Ic trap Ar host_address
+.Op Cm port Ar port_number
+.Op Cm interface Ar interface_address
+.Xc
+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.
+.Pp
+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.
+.It Cm hop Ar ...
+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.
+.El
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_CONF_<option\-name>\fP or \fBNTP_CONF\fP
+.fi
+.ad
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa ntp.keys
+private MD5 keys
+.It Pa ntpkey
+RSA private key
+.It Pa ntpkey_ Ns Ar host
+RSA public key
+.It Pa ntp_dh
+Diffie\-Hellman agreement parameters
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr ntpq 1ntpqmdoc
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 4)
+.%O RFC5905
+.Re
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+.Pp
+The
+.Pa ntpkey_ Ns Ar host
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+This document was derived from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.conf\fP
+option definitions.
diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def
new file mode 100644
index 000000000000..5a5af21f21d0
--- /dev/null
+++ b/ntpd/ntp.conf.def
@@ -0,0 +1,2795 @@
+/* -*- Mode: Text -*- */
+
+autogen definitions options;
+
+#include copyright.def
+
+// We want the synopsis to be "/etc/ntp.conf" but we need the prog-name
+// to be ntp.conf - the latter is also how autogen produces the output
+// file name.
+prog-name = "ntp.conf";
+file-path = "/etc/ntp.conf";
+prog-title = "Network Time Protocol (NTP) daemon configuration file format";
+
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+The
+.Nm
+configuration file is read at initial startup by the
+.Xr ntpd 1ntpdmdoc
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+.Pa /etc
+directory,
+but could be installed elsewhere
+(see the daemon's
+.Fl c
+command line option).
+.Pp
+The file format is similar to other
+.Ux
+configuration files.
+Comments begin with a
+.Ql #
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+.Pp
+The rest of this page describes the configuration and control options.
+The
+.Qq Notes on Configuring NTP and Setting up an NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+contains an extended discussion of these options.
+In addition to the discussion of general
+.Sx Configuration Options ,
+there are sections describing the following supported functionality
+and the options used to control it:
+.Bl -bullet -offset indent
+.It
+.Sx Authentication Support
+.It
+.Sx Monitoring Support
+.It
+.Sx Access Control Support
+.It
+.Sx Automatic NTP Configuration Options
+.It
+.Sx Reference Clock Support
+.It
+.Sx Miscellaneous Options
+.El
+.Pp
+Following these is a section describing
+.Sx Miscellaneous Options .
+While there is a rich set of options available,
+the only required option is one or more
+.Ic pool ,
+.Ic server ,
+.Ic peer ,
+.Ic broadcast
+or
+.Ic manycastclient
+commands.
+.Sh Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+.Ss Configuration Commands
+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.
+.Pp
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+.Dq \&:
+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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+.Bl -tag -width indent
+.It Xo Ic pool Ar address
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic server Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic peer Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic broadcast Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm ttl Ar ttl
+.Xc
+.It Xo Ic manycastclient Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Op Cm ttl Ar ttl
+.Xc
+.El
+.Pp
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+.Ar address
+can be
+either a DNS name or an IP address in dotted-quad notation.
+Additional information on association behavior can be found in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Bl -tag -width indent
+.It Ic pool
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+.It Ic server
+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
+.Em not
+be used for type
+b or m addresses.
+.It Ic peer
+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
+b, m or r addresses.
+.It Ic broadcast
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+.Ar address
+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
+.Ic broadcastclient
+or
+.Ic multicastclient
+commands
+below.
+.It Ic manycastclient
+For type m 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
+.Ic manycastserver
+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.
+The
+.Ic manycastserver
+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
+.Ar address
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+.Ic server
+command.
+The remaining servers are discarded as if never
+heard.
+.El
+.Pp
+Options:
+.Bl -tag -width indent
+.It Cm autokey
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+.Sx Authentication Options .
+.It Cm burst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+.Ic server
+command and s addresses.
+.It Cm iburst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+.Ic server
+command and s addresses and when
+.Xr ntpd 1ntpdmdoc
+is started with the
+.Fl q
+option.
+.It Cm key Ar key
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+.Ar key
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+.It Cm minpoll Ar minpoll
+.It Cm maxpoll Ar maxpoll
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+.Cm maxpoll
+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
+.Cm minpoll
+option to a lower limit of 4 (16 s).
+.It Cm noselect
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm ttl Ar ttl
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time-to-live
+.Ar ttl
+to
+use on broadcast server and multicast server and the maximum
+.Ar ttl
+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.
+.It Cm version Ar version
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1-4 are the choices, with version 4 the
+default.
+.El
+.Ss Auxiliary Commands
+.Bl -tag -width indent
+.It Ic broadcastclient
+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
+.Sx Authentication Options .
+.It Ic manycastserver Ar address ...
+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
+.Sx Authentication Options .
+.It Ic multicastclient Ar address ...
+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
+.Sx Authentication Options .
+.El
+.Sh Authentication Support
+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.
+.Pp
+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.
+.Pp
+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 Building and Installing the Distribution page.
+.Pp
+Authentication is configured separately for each association
+using the
+.Cm key
+or
+.Cm autokey
+subcommand on the
+.Ic peer ,
+.Ic server ,
+.Ic broadcast
+and
+.Ic manycastclient
+configuration commands as described in
+.Sx Configuration Options
+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.
+.Pp
+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
+.Pp
+The
+.Cm auth
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+.Ic enable
+and
+.Ic disable
+commands and also by remote
+configuration commands sent by a
+.Xr ntpdc 1ntpdcmdoc
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+.Ic auth
+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.
+.Pp
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+.Sx Automatic NTP Configuration Options
+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.
+.Pp
+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
+.Li http://www.ntp.org/ .
+.Ss Symmetric-Key Cryptography
+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
+.Pa ntp.keys ,
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+When
+.Xr ntpd 1ntpdmdoc
+is first started, it reads the key file specified in the
+.Ic keys
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+.Ic trusted
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+.Xr ntpdc 1ntpdcmdoc .
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+.Ic requestkey
+command selects the key used as the password for the
+.Xr ntpdc 1ntpdcmdoc
+utility, while the
+.Ic controlkey
+command selects the key used as the password for the
+.Xr ntpq 1ntpqmdoc
+utility.
+.Ss Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+.\" .Pp
+.\" The cryptographic means necessary for all Autokey operations
+.\" is provided by the OpenSSL software library.
+.\" This library is available from http://www.openssl.org/
+.\" and can be installed using the procedures outlined
+.\" in the Building and Installing the Distribution page.
+.\" Once installed,
+.\" the configure and build
+.\" process automatically detects the library and links
+.\" the library routines required.
+.Pp
+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
+.Sx Autonomous Authentication
+page.
+.Pp
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+.Xr ntp-keygen 1ntpkeygenmdoc
+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
+.Cm md5WithRSAEncryption ,
+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.
+.Pp
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+.Ss Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+.Pp
+By convention, the name of an Autokey host is the name returned
+by the Unix
+.Xr gethostname 2
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+.Pp
+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 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 servers are operated outside firewall perimeters.
+.Ss Operation
+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.
+.Pp
+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
+.Ic server
+or
+.Ic peer
+configuration command and no
+.Ic key
+or
+.Ic autokey
+subcommands are present, the association is not
+authenticated; if the
+.Ic key
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+.Ic autokey
+subcommand is present, the association is authenticated
+using Autokey.
+.Pp
+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.
+.Pp
+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.
+.Pp
+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
+.Xr ntpq 1ntpqmdoc
+program.
+.Pp
+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.
+.Pp
+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.
+.Ss Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+.Xr ntp-keygen 1ntpkeygenmdoc
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+.Pp
+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 (CN) 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
+.Cm trustRoot ; .
+Other extension fields are ignored.
+.Ss Authentication Commands
+.Bl -tag -width indent
+.It Ic autokey Op Ar logsec
+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.
+.It Ic controlkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpq 1ntpqmdoc
+utility, which uses the standard
+protocol defined in RFC-1305.
+The
+.Ar key
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+.It Xo Ic crypto
+.Op Cm cert Ar file
+.Op Cm leap Ar file
+.Op Cm randfile Ar file
+.Op Cm host Ar file
+.Op Cm sign Ar file
+.Op Cm gq Ar file
+.Op Cm gqpar Ar file
+.Op Cm iffpar Ar file
+.Op Cm mvpar Ar file
+.Op Cm pw Ar password
+.Xc
+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
+.Ic keysdir
+command or default
+.Pa /usr/local/etc .
+Following are the subcommands:
+.Bl -tag -width indent
+.It Cm cert Ar file
+Specifies the location of the required host public certificate file.
+This overrides the link
+.Pa ntpkey_cert_ Ns Ar hostname
+in the keys directory.
+.It Cm gqpar Ar file
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+.Pa ntpkey_gq_ Ns Ar hostname
+in the keys directory.
+.It Cm host Ar file
+Specifies the location of the required host key file.
+This overrides
+the link
+.Pa ntpkey_key_ Ns Ar hostname
+in the keys directory.
+.It Cm iffpar Ar file
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+.Pa ntpkey_iff_ Ns Ar hostname
+in the keys directory.
+.It Cm leap Ar file
+Specifies the location of the optional leapsecond file.
+This overrides the link
+.Pa ntpkey_leap
+in the keys directory.
+.It Cm mvpar Ar file
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+.Pa ntpkey_mv_ Ns Ar hostname
+in the keys directory.
+.It Cm pw Ar password
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+.It Cm randfile Ar file
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+.It Cm sign Ar file
+Specifies the location of the optional sign key file.
+This overrides
+the link
+.Pa ntpkey_sign_ Ns Ar hostname
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+.El
+.It Ic keys Ar keyfile
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+when operating with symmetric key cryptography.
+This is the same operation as the
+.Fl k
+command line option.
+.It Ic keysdir Ar path
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+.Pa /usr/local/etc/ .
+.It Ic requestkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpdc 1ntpdcmdoc
+utility program, which uses a
+proprietary protocol specific to this implementation of
+.Xr ntpd 1ntpdmdoc .
+The
+.Ar key
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+.It Ic revoke Ar logsec
+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.
+.It Ic trustedkey Ar key ...
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+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
+.Ar key
+arguments are 32-bit unsigned
+integers with values from 1 to 65,534.
+.El
+.Ss Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+.Bl -tag -width indent
+.It 101
+.Pq bad field format or length
+The packet has invalid version, length or format.
+.It 102
+.Pq bad timestamp
+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.
+.It 103
+.Pq bad filestamp
+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.
+.It 104
+.Pq bad or missing public key
+The public key is missing, has incorrect format or is an unsupported type.
+.It 105
+.Pq unsupported digest type
+The server requires an unsupported digest/signature scheme.
+.It 106
+.Pq mismatched digest types
+Not used.
+.It 107
+.Pq bad signature length
+The signature length does not match the current public key.
+.It 108
+.Pq signature not verified
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+.It 109
+.Pq certificate not verified
+The certificate is invalid or signed with the wrong key.
+.It 110
+.Pq certificate not verified
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+.It 111
+.Pq bad or missing cookie
+The cookie is missing, corrupted or bogus.
+.It 112
+.Pq bad or missing leapseconds table
+The leapseconds table is missing, corrupted or bogus.
+.It 113
+.Pq bad or missing certificate
+The certificate is missing, corrupted or bogus.
+.It 114
+.Pq bad or missing identity
+The identity key is missing, corrupt or bogus.
+.El
+.Sh Monitoring Support
+.Xr ntpd 1ntpdmdoc
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+.Ic statistics
+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
+.Pa ./scripts
+directory of this distribution.
+Using
+these facilities and
+.Ux
+.Xr cron 8
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+.Ss Monitoring Commands
+.Bl -tag -width indent
+.It Ic statistics Ar name ...
+Enables writing of statistics records.
+Currently, eight kinds of
+.Ar name
+statistics are supported.
+.Bl -tag -width indent
+.It Cm clockstats
+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
+.Cm clockstats :
+.Bd -literal
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+.Ed
+.Pp
+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.
+.It Cm cryptostats
+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
+.Cm cryptostats :
+.Bd -literal
+49213 525.624 127.127.4.1 message
+.Ed
+.Pp
+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 message field includes the
+message type and certain ancillary information.
+See the
+.Sx Authentication Options
+section for further information.
+.It Cm loopstats
+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
+.Cm loopstats :
+.Bd -literal
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+.Ed
+.Pp
+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.
+.It Cm peerstats
+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
+.Cm peerstats :
+.Bd -literal
+48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
+.Ed
+.Pp
+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.
+.It Cm rawstats
+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
+.Cm rawstats :
+.Bd -literal
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+.Ed
+.Pp
+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.
+.It Cm sysstats
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+.Cm sysstats :
+.Bd -literal
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+.Ed
+.Pp
+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.
+.Bl -tag -width indent
+.It Time since restart Cm 36000
+Time in hours since the system was last rebooted.
+.It Packets received Cm 81965
+Total number of packets received.
+.It Packets processed Cm 0
+Number of packets received in response to previous packets sent
+.It Current version Cm 9546
+Number of packets matching the current NTP version.
+.It Previous version Cm 56
+Number of packets matching the previous NTP version.
+.It Bad version Cm 71793
+Number of packets matching neither NTP version.
+.It Access denied Cm 512
+Number of packets denied access for any reason.
+.It Bad length or format Cm 540
+Number of packets with invalid length, format or port number.
+.It Bad authentication Cm 10
+Number of packets not verified as authentic.
+.It Rate exceeded Cm 147
+Number of packets discarded due to rate limitation.
+.El
+.It Cm statsdir Ar directory_path
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+.Cm filegen
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+.It Cm filegen Ar name Xo
+.Op Cm file Ar filename
+.Op Cm type Ar typename
+.Op Cm link | nolink
+.Op Cm enable | disable
+.Xc
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+.Pp
+Note that this command can be sent from the
+.Xr ntpdc 1ntpdcmdoc
+program running at a remote location.
+.Bl -tag -width indent
+.It Cm name
+This is the type of the statistics records, as shown in the
+.Cm statistics
+command.
+.It Cm file Ar filename
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+.Ar Cm prefix ,
+.Ar Cm filename
+and
+.Ar Cm suffix :
+.Bl -tag -width indent
+.It Cm prefix
+This is a constant filename path.
+It is not subject to
+modifications via the
+.Ar filegen
+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
+.Ar loopstats
+and
+.Ar peerstats
+generation can be configured using the
+.Ar statsdir
+option explained above.
+.It Cm filename
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+.Ql / ) .
+This can be modified using
+the file argument to the
+.Ar filegen
+statement.
+No
+.Pa ..
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+.Ar prefix .
+.It Cm suffix
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+.El
+.It Cm type Ar typename
+A file generation set is characterized by its type.
+The following
+types are supported:
+.Bl -tag -width indent
+.It Cm none
+The file set is actually a single plain file.
+.It Cm pid
+One element of file set is used per incarnation of a ntpd
+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
+.Xr ntpd 1ntpdmdoc
+server incarnations.
+The set member filename is built by appending a
+.Ql \&.
+to concatenated
+.Ar prefix
+and
+.Ar filename
+strings, and
+appending the decimal representation of the process ID of the
+.Xr ntpd 1ntpdmdoc
+server process.
+.It Cm day
+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
+.Ql \&.
+and a day specification in
+the form
+.Cm YYYYMMdd .
+.Cm YYYY
+is a 4-digit year number (e.g., 1992).
+.Cm MM
+is a two digit month number.
+.Cm dd
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+.Ar prefix
+.Ar filename Ns .19921210 .
+.It Cm week
+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
+.Cm W ,
+and a 2-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.No . Ns Ar 1992W1 .
+.It Cm month
+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.
+.It Cm year
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+.It Cm age
+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
+.Cm a ,
+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
+.Cm enable ;
+output is prevented by specifying
+.Cm disable .
+.El
+.It Cm link | nolink
+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
+.Cm link
+and disabled using
+.Cm nolink .
+If link 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
+.Cm C ,
+and the pid of the ntpd 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.
+.It Cm enable \&| Cm disable
+Enables or disables the recording function.
+.El
+.El
+.El
+.Sh Access Control Support
+The
+.Xr ntpd 1ntpdmdoc
+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
+.Qq Notes on Configuring NTP and Setting up a NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+.Ss The Kiss-of-Death Packet
+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" (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
+.Cm noserve
+or
+.Cm notrust
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+.Cm limited
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+.Pp
+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.
+.Ss Access Control Commands
+.Bl -tag -width indent
+.It Xo Ic discard
+.Op Cm average Ar avg
+.Op Cm minimum Ar min
+.Op Cm monitor Ar prob
+.Xc
+Set the parameters of the
+.Cm limited
+facility which protects the server from
+client abuse.
+The
+.Cm average
+subcommand specifies the minimum average packet
+spacing, while the
+.Cm minimum
+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.
+.It Xo Ic restrict address
+.Op Cm mask Ar mask
+.Op Ar flag ...
+.Xc
+The
+.Ar address
+argument expressed in
+dotted-quad form is the address of a host or network.
+Alternatively, the
+.Ar address
+argument can be a valid host DNS name.
+The
+.Ar mask
+argument expressed in dotted-quad form defaults to
+.Cm 255.255.255.255 ,
+meaning that the
+.Ar address
+is treated as the address of an individual host.
+A default entry (address
+.Cm 0.0.0.0 ,
+mask
+.Cm 0.0.0.0 )
+is always included and is always the first entry in the list.
+Note that text string
+.Cm default ,
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+.Cm flag
+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
+categories, 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:
+.Bl -tag -width indent
+.It Cm ignore
+Deny packets of all kinds, including
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+.It Cm kod
+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.
+.It Cm limited
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+.Xr ntpd 1ntpdmdoc .
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+.Cm limited
+flag.
+.It Cm lowpriotrap
+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.
+.It Cm nomodify
+Deny
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+.It Cm noquery
+Deny
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+Time service is not affected.
+.It Cm nopeer
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+.Cm pool
+associations, so if you want to use servers from a
+.Cm pool
+directive and also want to use
+.Cm nopeer
+by default, you'll want a
+.Cm "restrict source ..." line as well that does
+.It not
+include the
+.Cm nopeer
+directive.
+.It Cm noserve
+Deny all packets except
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+queries.
+.It Cm notrap
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+.It Cm notrust
+Deny service unless the packet is cryptographically authenticated.
+.It Cm ntpport
+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
+.Cm ntpport
+and
+.Cm non-ntpport
+may
+be specified.
+The
+.Cm ntpport
+is considered more specific and
+is sorted later in the list.
+.It Cm version
+Deny packets that do not match the current NTP version.
+.El
+.Pp
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+.El
+.Sh Automatic NTP Configuration Options
+.Ss Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+.Pp
+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.
+.Pp
+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
+.Li http://www.openssl.org/ .
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+.Pp
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+.Cm D
+or IPv6 prefix
+.Cm FF )
+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.
+.Pp
+Manycast servers configured with the
+.Ic manycastserver
+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.
+.Pp
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+.Pp
+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
+.Ic manycastclient ,
+.Ic tos
+and
+.Ic ttl
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+.Cm minpoll
+value specified in the
+.Ic manycastclient ,
+command and, under normal circumstances, increments to the
+.Cm maxpolll
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+.Pp
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+.Cm minclock
+and
+.Cm minsane
+values specified in the
+.Ic tos
+configuration command.
+At least
+.Cm minsane
+candidate servers must be available and the mitigation
+algorithms produce at least
+.Cm minclock
+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,
+.Cm minsane
+defaults to 1 and
+.Cm minclock
+defaults to 3.
+For manycast service
+.Cm minsane
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+.Pp
+If at least
+.Cm minclock
+servers are found, the manycast poll interval is immediately
+set to eight times
+.Cm maxpoll .
+If less than
+.Cm minclock
+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
+.Cm maxpoll .
+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.
+.Pp
+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
+.Ic ttl
+configuration command can be
+used to modify the values to match the scope rules.
+.Pp
+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
+.Ic tos
+command can be used to modify this behavior.
+Servers with stratum below
+.Cm floor
+or above
+.Cm ceiling
+specified in the
+.Ic tos
+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
+.Cm minclock .
+.Pp
+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
+.Cm minclock ,
+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
+.Cm maxpoll
+is 12 (4,096 s).
+.Pp
+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
+.Ic multicastclient
+and
+.Ic multicastserver
+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.
+.Pp
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+.Ic tos
+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
+.Cm floor
+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.
+.Pp
+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.
+.Pp
+Some administrators prefer to avoid running
+.Xr ntpd 1ntpdmdoc
+continuously and run either
+.Xr ntpdate 8
+or
+.Xr ntpd 1ntpdmdoc
+.Fl q
+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
+.Xr ntpd 1ntpdmdoc
+.Fl q .
+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.
+.Ss Manycast Interactions with Autokey
+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.
+.Pp
+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.
+.Ss Manycast Options
+.Bl -tag -width indent
+.It Xo Ic tos
+.Oo
+.Cm ceiling Ar ceiling |
+.Cm cohort { 0 | 1 } |
+.Cm floor Ar floor |
+.Cm minclock Ar minclock |
+.Cm minsane Ar minsane
+.Oc
+.Xc
+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:
+.Bl -tag -width indent
+.It Cm ceiling Ar ceiling
+Peers with strata above
+.Cm ceiling
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+.It Cm cohort Bro 0 | 1 Brc
+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.
+.It Cm floor Ar floor
+Peers with strata below
+.Cm floor
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+.It Cm minclock Ar minclock
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+.Cm minclock
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+.It Cm minsane Ar minsane
+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,
+.Cm minsane
+should be at least 4 in order to detect and discard
+a single falseticker.
+.El
+.It Cm ttl Ar hop ...
+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.
+.El
+.Sh Reference Clock Support
+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
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Additional information can be found in the pages linked
+there, including the
+.Qq Debugging Hints for Reference Clock Drivers
+and
+.Qq How To Write a Reference Clock Driver
+pages
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+In addition, support for a PPS
+signal is available as described in the
+.Qq Pulse-per-second (PPS) Signal Interfacing
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+.Qq Line Disciplines and Streams Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+For the purposes of configuration,
+.Xr ntpd 1ntpdmdoc
+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
+.Sm off
+.Li 127.127. Ar t . Ar u ,
+.Sm on
+where
+.Ar t
+is an integer
+denoting the clock type and
+.Ar u
+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.
+.Pp
+The
+.Ic server
+command is used to configure a reference
+clock, where the
+.Ar address
+argument in that command
+is the clock address.
+The
+.Cm key ,
+.Cm version
+and
+.Cm ttl
+options are not used for reference clock support.
+The
+.Cm mode
+option is added for reference clock support, as
+described below.
+The
+.Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page.
+The
+.Cm minpoll
+and
+.Cm maxpoll
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+.Pp
+The
+.Ic fudge
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+.Ic server
+command.
+The
+.Ar address
+argument specifies the clock address.
+The
+.Cm refid
+and
+.Cm stratum
+options 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
+.Ic fudge
+command as well.
+.Pp
+The stratum number of a reference clock is by default zero.
+Since the
+.Xr ntpd 1ntpdmdoc
+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
+.Cm stratum
+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
+.Cm refid
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+.Ss Reference Clock Commands
+.Bl -tag -width indent
+.It Xo Ic server
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm prefer
+.Op Cm mode Ar int
+.Op Cm minpoll Ar int
+.Op Cm maxpoll Ar int
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+.Bl -tag -width indent
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm minpoll Ar int
+.It Cm maxpoll Ar int
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+.Cm minpoll
+and
+.Cm maxpoll
+default to 6 (64 s).
+For modem reference clocks,
+.Cm minpoll
+defaults to 10 (17.1 m) and
+.Cm maxpoll
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+.El
+.It Xo Ic fudge
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm time1 Ar sec
+.Op Cm time2 Ar sec
+.Op Cm stratum Ar int
+.Op Cm refid Ar string
+.Op Cm mode Ar int
+.Op Cm flag1 Cm 0 \&| Cm 1
+.Op Cm flag2 Cm 0 \&| Cm 1
+.Op Cm flag3 Cm 0 \&| Cm 1
+.Op Cm flag4 Cm 0 \&| Cm 1
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+.Ic server
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+.Xr ntpdc 1ntpdcmdoc
+program.
+The options are interpreted as
+follows:
+.Bl -tag -width indent
+.It Cm time1 Ar sec
+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.
+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
+.Ic enable
+command described in
+.Sx Miscellaneous Options
+page and operates as described in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm time2 Ar secs
+Specifies a fixed-point decimal number in seconds, which is
+interpreted in a driver-dependent way.
+See the descriptions of
+specific drivers in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm stratum Ar int
+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.
+.It Cm refid Ar string
+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.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm flag1 Cm 0 \&| Cm 1
+.It Cm flag2 Cm 0 \&| Cm 1
+.It Cm flag3 Cm 0 \&| Cm 1
+.It Cm flag4 Cm 0 \&| Cm 1
+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
+.Cm flag4
+is used to enable recording monitoring
+data to the
+.Cm clockstats
+file configured with the
+.Ic filegen
+command.
+Further information on the
+.Ic filegen
+command can be found in
+.Sx Monitoring Options .
+.El
+.El
+.Sh Miscellaneous Options
+.Bl -tag -width indent
+.It Ic broadcastdelay Ar seconds
+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.
+.It Ic calldelay Ar delay
+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.
+.It Ic driftfile Ar driftfile
+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
+.Fl f
+command line 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.
+.Pp
+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
+.Xr ntpd 1ntpdmdoc
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+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
+.Xr ntpdc 1ntpdcmdoc
+utility program.
+.Bl -tag -width indent
+.It Cm auth
+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
+.Ic enable .
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+.Ic multicastclient
+command with default
+address.
+The default for this flag is
+.Ic disable .
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+.Ic disable .
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+.Ic enable
+if support is available, otherwise
+.Ic disable .
+.It Cm mode7
+Enables processing of NTP mode 7 implementation-specific requests
+which are used by the deprecated
+.Xr ntpdc 1ntpdcmdoc
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+.Xr ntpq 1ntpqmdoc .
+The
+.Xr ntpq 1ntpqmdoc
+program provides the same capabilities as
+.Xr ntpdc 1ntpdcmdoc
+using standard mode 6 requests.
+.It Cm monitor
+Enables the monitoring facility.
+See the
+.Xr ntpdc 1ntpdcmdoc
+program
+and the
+.Ic monlist
+command or further information.
+The
+default for this flag is
+.Ic enable .
+.It Cm ntp
+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
+.Ic enable .
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section for further information.
+The default for this flag is
+.Ic disable .
+.El
+.It Ic includefile Ar includefile
+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
+.Xr ntpd 1ntpdmdoc
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+.It Ic logconfig Ar configkeyword
+This command controls the amount and type of output written to
+the system
+.Xr syslog 3
+facility or the alternate
+.Ic logfile
+log file.
+By default, all output is turned on.
+All
+.Ar configkeyword
+keywords can be prefixed with
+.Ql = ,
+.Ql +
+and
+.Ql - ,
+where
+.Ql =
+sets the
+.Xr syslog 3
+priority mask,
+.Ql +
+adds and
+.Ql -
+removes
+messages.
+.Xr syslog 3
+messages can be controlled in four
+classes
+.Po
+.Cm clock ,
+.Cm peer ,
+.Cm sys
+and
+.Cm sync
+.Pc .
+Within these classes four types of messages can be
+controlled: informational messages
+.Po
+.Cm info
+.Pc ,
+event messages
+.Po
+.Cm events
+.Pc ,
+statistics messages
+.Po
+.Cm statistics
+.Pc
+and
+status messages
+.Po
+.Cm status
+.Pc .
+.Pp
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+.Cm all
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+.Cm all
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+.Bd -literal
+logconfig =syncstatus +sysevents
+.Ed
+.Pp
+This would just list the synchronizations state of
+.Xr ntpd 1ntpdmdoc
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+.Bd -literal
+logconfig =syncall +clockall
+.Ed
+.Pp
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+.It Ic logfile Ar logfile
+This command specifies the location of an alternate log file to
+be used instead of the default system
+.Xr syslog 3
+facility.
+This is the same operation as the -l command line option.
+.It Ic setvar Ar variable Op Cm default
+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
+.Sm off
+.Va name = Ar value
+.Sm on
+is followed by the
+.Cm default
+keyword, the
+variable will be listed as part of the default system variables
+.Po
+.Xr ntpq 1ntpqmdoc
+.Ic rv
+command
+.Pc ) .
+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
+.Ic setvar
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+.Va sys_var_list
+holds
+the names of all system variables.
+The
+.Va peer_var_list
+holds
+the names of all peer variables and the
+.Va clock_var_list
+holds the names of the reference clock variables.
+.It Xo Ic tinker
+.Oo
+.Cm allan Ar allan |
+.Cm dispersion Ar dispersion |
+.Cm freq Ar freq |
+.Cm huffpuff Ar huffpuff |
+.Cm panic Ar panic |
+.Cm step Ar srep |
+.Cm stepout Ar stepout
+.Oc
+.Xc
+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 cannot 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.
+.Pp
+The variables operate as follows:
+.Bl -tag -width indent
+.It Cm allan Ar allan
+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.
+.It Cm dispersion Ar dispersion
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+.It Cm freq Ar freq
+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.
+.It Cm huffpuff Ar huffpuff
+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.
+.It Cm panic Ar panic
+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.
+.It Cm step Ar step
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+.It Cm stepout Ar stepout
+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.
+.El
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.El
+.It Xo Ic trap Ar host_address
+.Op Cm port Ar port_number
+.Op Cm interface Ar interface_address
+.Xc
+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.
+.Pp
+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.
+.It Cm hop Ar ...
+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.
+.El
+ _END_PROG_MDOC_DESCRIP;
+};
+
+doc-section = {
+ ds-type = 'FILES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa ntp.keys
+private MD5 keys
+.It Pa ntpkey
+RSA private key
+.It Pa ntpkey_ Ns Ar host
+RSA public key
+.It Pa ntp_dh
+Diffie-Hellman agreement parameters
+.El
+ _END_MDOC_FILES;
+};
+
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_SEE_ALSO
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr ntpq 1ntpqmdoc
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 4)
+.%O RFC5905
+.Re
+ _END_MDOC_SEE_ALSO;
+};
+
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+.Pp
+The
+.Pa ntpkey_ Ns Ar host
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+ _END_MDOC_BUGS;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+This document was derived from FreeBSD.
+ _END_MDOC_NOTES;
+};
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
new file mode 100644
index 000000000000..a57560a9a21e
--- /dev/null
+++ b/ntpd/ntp.conf.html
@@ -0,0 +1,2625 @@
+<html lang="en">
+<head>
+<title>NTP Configuration File User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="NTP Configuration File User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">NTP Configuration File User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002econf-Description">ntp.conf Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">NTP's Configuration File User Manual</h2>
+
+<p>This document describes the configuration file for the NTP Project's
+<code>ntpd</code> program.
+
+ <p>This document applies to version 4.2.8 of <code>ntp.conf</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">NTP's Configuration File User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002econf-Description">ntp.conf Description</a>
+<li><a accesskey="2" href="#ntp_002econf-Notes">ntp.conf Notes</a>
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>The behavior of <code>ntpd</code> can be changed by a configuration file,
+by default <code>ntp.conf</code>.
+
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-Notes"></a>
+<br>
+</div>
+
+<h3 class="section">Notes about ntp.conf</h3>
+
+<p><a name="index-ntp_002econf-1"></a><a name="index-Network-Time-Protocol-_0028NTP_0029-daemon-configuration-file-format-2"></a>
+
+ <p>The
+<code>ntp.conf</code>
+configuration file is read at initial startup by the
+<code>ntpd(1ntpdmdoc)</code>
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+<span class="file">/etc</span>
+directory,
+but could be installed elsewhere
+(see the daemon's
+<code>-c</code>
+command line option).
+
+ <p>The file format is similar to other
+<span class="sc">unix</span>
+configuration files.
+Comments begin with a
+#
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+
+ <p>The rest of this page describes the configuration and control options.
+The
+"Notes on Configuring NTP and Setting up an NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>)
+contains an extended discussion of these options.
+In addition to the discussion of general
+<a href="#Configuration-Options">Configuration Options</a>,
+there are sections describing the following supported functionality
+and the options used to control it:
+ <ul>
+<li><a href="#Authentication-Support">Authentication Support</a>
+<li><a href="#Monitoring-Support">Monitoring Support</a>
+<li><a href="#Access-Control-Support">Access Control Support</a>
+<li><a href="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
+<li><a href="#Reference-Clock-Support">Reference Clock Support</a>
+<li><a href="#Miscellaneous-Options">Miscellaneous Options</a>
+</ul>
+
+ <p>Following these is a section describing
+<a href="#Miscellaneous-Options">Miscellaneous Options</a>.
+While there is a rich set of options available,
+the only required option is one or more
+<code>pool</code>,
+<code>server</code>,
+<code>peer</code>,
+<code>broadcast</code>
+or
+<code>manycastclient</code>
+commands.
+<div class="node">
+<p><hr>
+<a name="Configuration-Support"></a>
+<br>
+</div>
+
+<h4 class="subsection">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 auxiliary commands that specify environmental variables
+that control various related operations.
+
+<h5 class="subsubsection">Configuration Commands</h5>
+
+<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>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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+:
+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>Note that in contexts where a host name is expected, a
+<code>-4</code>
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+<code>-6</code>
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+ <dl>
+<dt><code>pool</code> <kbd>address</kbd> <code>[burst]</code> <code>[iburst]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code><br><dt><code>server</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[burst]</code> <code>[iburst]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code><br><dt><code>peer</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code><br><dt><code>broadcast</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[ttl </code><kbd>ttl</kbd><code>]</code><br><dt><code>manycastclient</code> <kbd>address</kbd> <code>[key </code><kbd>key</kbd> <kbd>|</kbd><code> autokey]</code> <code>[version </code><kbd>version</kbd><code>]</code> <code>[prefer]</code> <code>[minpoll </code><kbd>minpoll</kbd><code>]</code> <code>[maxpoll </code><kbd>maxpoll</kbd><code>]</code> <code>[ttl </code><kbd>ttl</kbd><code>]</code><dd></dl>
+
+ <p>These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+<kbd>address</kbd>
+can be
+either a DNS name or an IP address in dotted-quad notation.
+Additional information on association behavior can be found in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+ <dl>
+<dt><code>pool</code><dd>For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+<br><dt><code>server</code><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
+<em>not</em>
+be used for type
+b or m addresses.
+<br><dt><code>peer</code><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
+b, m or r addresses.
+<br><dt><code>broadcast</code><dd>For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+<kbd>address</kbd>
+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
+<code>broadcastclient</code>
+or
+<code>multicastclient</code>
+commands
+below.
+<br><dt><code>manycastclient</code><dd>For type m 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
+<code>manycastserver</code>
+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.
+The
+<code>manycastserver</code>
+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
+<kbd>address</kbd>
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+<code>server</code>
+command.
+The remaining servers are discarded as if never
+heard.
+</dl>
+
+ <p>Options:
+ <dl>
+<dt><code>autokey</code><dd>All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+<a href="#Authentication-Options">Authentication Options</a>.
+<br><dt><code>burst</code><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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+<code>server</code>
+command and s addresses.
+<br><dt><code>iburst</code><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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+<code>server</code>
+command and s addresses and when
+<code>ntpd(1ntpdmdoc)</code>
+is started with the
+<code>-q</code>
+option.
+<br><dt><code>key</code> <kbd>key</kbd><dd>All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+<kbd>key</kbd>
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+<br><dt><code>minpoll</code> <kbd>minpoll</kbd><br><dt><code>maxpoll</code> <kbd>maxpoll</kbd><dd>These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+<code>maxpoll</code>
+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
+<code>minpoll</code>
+option to a lower limit of 4 (16 s).
+<br><dt><code>noselect</code><dd>Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+<br><dt><code>prefer</code><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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>)
+for further information.
+<br><dt><code>ttl</code> <kbd>ttl</kbd><dd>This option is used only with broadcast server and manycast
+client modes.
+It specifies the time-to-live
+<kbd>ttl</kbd>
+to
+use on broadcast server and multicast server and the maximum
+<kbd>ttl</kbd>
+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.
+<br><dt><code>version</code> <kbd>version</kbd><dd>Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1-4 are the choices, with version 4 the
+default.
+</dl>
+
+<h5 class="subsubsection">Auxiliary Commands</h5>
+
+ <dl>
+<dt><code>broadcastclient</code><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
+<a href="#Authentication-Options">Authentication Options</a>.
+<br><dt><code>manycastserver</code> <kbd>address</kbd> <kbd>...</kbd><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
+<a href="#Authentication-Options">Authentication Options</a>.
+<br><dt><code>multicastclient</code> <kbd>address</kbd> <kbd>...</kbd><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
+<a href="#Authentication-Options">Authentication Options</a>.
+</dl>
+<div class="node">
+<p><hr>
+<a name="Authentication-Support"></a>
+<br>
+</div>
+
+<h4 class="subsection">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>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>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 Building and Installing the Distribution page.
+
+ <p>Authentication is configured separately for each association
+using the
+<code>key</code>
+or
+<code>autokey</code>
+subcommand on the
+<code>peer</code>,
+<code>server</code>,
+<code>broadcast</code>
+and
+<code>manycastclient</code>
+configuration commands as described in
+<a href="#Configuration-Options">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>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>The
+<code>auth</code>
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+<code>enable</code>
+and
+<code>disable</code>
+commands and also by remote
+configuration commands sent by a
+<code>ntpdc(1ntpdcmdoc)</code>
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+<code>auth</code>
+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>An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+<a href="#Automatic-NTP-Configuration-Options">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>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
+<code>http://www.ntp.org/</code>.
+
+<h5 class="subsubsection">Symmetric-Key Cryptography</h5>
+
+<p>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
+<span class="file">ntp.keys</span>,
+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
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+utility programs.
+
+ <p>When
+<code>ntpd(1ntpdmdoc)</code>
+is first started, it reads the key file specified in the
+<code>keys</code>
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+<code>trusted</code>
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+<code>ntpdc(1ntpdcmdoc)</code>.
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+<code>requestkey</code>
+command selects the key used as the password for the
+<code>ntpdc(1ntpdcmdoc)</code>
+utility, while the
+<code>controlkey</code>
+command selects the key used as the password for the
+<code>ntpq(1ntpqmdoc)</code>
+utility.
+
+<h5 class="subsubsection">Public Key Cryptography</h5>
+
+<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 Autokey Protocol
+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 Identity Schemes
+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>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="#Autonomous-Authentication">Autonomous Authentication</a>
+page.
+
+ <p>The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+<code>ntp-keygen(1ntpkeygenmdoc)</code>
+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
+<code>md5WithRSAEncryption</code>,
+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>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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+
+<h5 class="subsubsection">Naming and Addressing</h5>
+
+<p>It is important to note that Autokey does not use DNS 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 compromise is essential.
+
+ <p>By convention, the name of an Autokey host is the name returned
+by the Unix
+<code>gethostname(2)</code>
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+
+ <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 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 servers are operated outside firewall perimeters.
+
+<h5 class="subsubsection">Operation</h5>
+
+<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>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
+<code>server</code>
+or
+<code>peer</code>
+configuration command and no
+<code>key</code>
+or
+<code>autokey</code>
+subcommands are present, the association is not
+authenticated; if the
+<code>key</code>
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+<code>autokey</code>
+subcommand is present, the association is authenticated
+using Autokey.
+
+ <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>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>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
+<code>ntpq(1ntpqmdoc)</code>
+program.
+
+ <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>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.
+
+<h5 class="subsubsection">Key Management</h5>
+
+<p>The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+<code>ntp-keygen(1ntpkeygenmdoc)</code>
+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
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+
+ <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 (CN) 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
+<code>trustRoot</code>;.
+Other extension fields are ignored.
+
+<h5 class="subsubsection">Authentication Commands</h5>
+
+ <dl>
+<dt><code>autokey</code> <code>[</code><kbd>logsec</kbd><code>]</code><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.
+<br><dt><code>controlkey</code> <kbd>key</kbd><dd>Specifies the key identifier to use with the
+<code>ntpq(1ntpqmdoc)</code>
+utility, which uses the standard
+protocol defined in RFC-1305.
+The
+<kbd>key</kbd>
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+<br><dt><code>crypto</code> <code>[cert </code><kbd>file</kbd><code>]</code> <code>[leap </code><kbd>file</kbd><code>]</code> <code>[randfile </code><kbd>file</kbd><code>]</code> <code>[host </code><kbd>file</kbd><code>]</code> <code>[sign </code><kbd>file</kbd><code>]</code> <code>[gq </code><kbd>file</kbd><code>]</code> <code>[gqpar </code><kbd>file</kbd><code>]</code> <code>[iffpar </code><kbd>file</kbd><code>]</code> <code>[mvpar </code><kbd>file</kbd><code>]</code> <code>[pw </code><kbd>password</kbd><code>]</code><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
+<code>keysdir</code>
+command or default
+<span class="file">/usr/local/etc</span>.
+Following are the subcommands:
+ <dl>
+<dt><code>cert</code> <kbd>file</kbd><dd>Specifies the location of the required host public certificate file.
+This overrides the link
+<span class="file">ntpkey_cert_</span><kbd>hostname</kbd>
+in the keys directory.
+<br><dt><code>gqpar</code> <kbd>file</kbd><dd>Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+<span class="file">ntpkey_gq_</span><kbd>hostname</kbd>
+in the keys directory.
+<br><dt><code>host</code> <kbd>file</kbd><dd>Specifies the location of the required host key file.
+This overrides
+the link
+<span class="file">ntpkey_key_</span><kbd>hostname</kbd>
+in the keys directory.
+<br><dt><code>iffpar</code> <kbd>file</kbd><dd>Specifies the location of the optional IFF parameters file.This
+overrides the link
+<span class="file">ntpkey_iff_</span><kbd>hostname</kbd>
+in the keys directory.
+<br><dt><code>leap</code> <kbd>file</kbd><dd>Specifies the location of the optional leapsecond file.
+This overrides the link
+<span class="file">ntpkey_leap</span>
+in the keys directory.
+<br><dt><code>mvpar</code> <kbd>file</kbd><dd>Specifies the location of the optional MV parameters file.
+This
+overrides the link
+<span class="file">ntpkey_mv_</span><kbd>hostname</kbd>
+in the keys directory.
+<br><dt><code>pw</code> <kbd>password</kbd><dd>Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+<br><dt><code>randfile</code> <kbd>file</kbd><dd>Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+<br><dt><code>sign</code> <kbd>file</kbd><dd>Specifies the location of the optional sign key file.
+This overrides
+the link
+<span class="file">ntpkey_sign_</span><kbd>hostname</kbd>
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+</dl>
+ <br><dt><code>keys</code> <kbd>keyfile</kbd><dd>Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+<code>ntpd(1ntpdmdoc)</code>,
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+when operating with symmetric key cryptography.
+This is the same operation as the
+<code>-k</code>
+command line option.
+<br><dt><code>keysdir</code> <kbd>path</kbd><dd>This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+<span class="file">/usr/local/etc/</span>.
+<br><dt><code>requestkey</code> <kbd>key</kbd><dd>Specifies the key identifier to use with the
+<code>ntpdc(1ntpdcmdoc)</code>
+utility program, which uses a
+proprietary protocol specific to this implementation of
+<code>ntpd(1ntpdmdoc)</code>.
+The
+<kbd>key</kbd>
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+<br><dt><code>revoke</code> <kbd>logsec</kbd><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.
+<br><dt><code>trustedkey</code> <kbd>key</kbd> <kbd>...</kbd><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
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+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
+<kbd>key</kbd>
+arguments are 32-bit unsigned
+integers with values from 1 to 65,534.
+</dl>
+
+<h5 class="subsubsection">Error Codes</h5>
+
+<p>The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+ <dl>
+<dt>101<dd>(bad field format or length)
+The packet has invalid version, length or format.
+<br><dt>102<dd>(bad timestamp)
+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.
+<br><dt>103<dd>(bad filestamp)
+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.
+<br><dt>104<dd>(bad or missing public key)
+The public key is missing, has incorrect format or is an unsupported type.
+<br><dt>105<dd>(unsupported digest type)
+The server requires an unsupported digest/signature scheme.
+<br><dt>106<dd>(mismatched digest types)
+Not used.
+<br><dt>107<dd>(bad signature length)
+The signature length does not match the current public key.
+<br><dt>108<dd>(signature not verified)
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+<br><dt>109<dd>(certificate not verified)
+The certificate is invalid or signed with the wrong key.
+<br><dt>110<dd>(certificate not verified)
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+<br><dt>111<dd>(bad or missing cookie)
+The cookie is missing, corrupted or bogus.
+<br><dt>112<dd>(bad or missing leapseconds table)
+The leapseconds table is missing, corrupted or bogus.
+<br><dt>113<dd>(bad or missing certificate)
+The certificate is missing, corrupted or bogus.
+<br><dt>114<dd>(bad or missing identity)
+The identity key is missing, corrupt or bogus.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="Monitoring-Support"></a>
+<br>
+</div>
+
+<h4 class="subsection">Monitoring Support</h4>
+
+<p><code>ntpd(1ntpdmdoc)</code>
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+<code>statistics</code>
+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
+<span class="file">./scripts</span>
+directory of this distribution.
+Using
+these facilities and
+<span class="sc">unix</span>
+<code>cron(8)</code>
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+
+<h5 class="subsubsection">Monitoring Commands</h5>
+
+ <dl>
+<dt><code>statistics</code> <kbd>name</kbd> <kbd>...</kbd><dd>Enables writing of statistics records.
+Currently, eight kinds of
+<kbd>name</kbd>
+statistics are supported.
+ <dl>
+<dt><code>clockstats</code><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
+<code>clockstats</code>:
+<pre class="verbatim">
+ 49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+ </pre>
+
+ <p>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.
+<br><dt><code>cryptostats</code><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
+<code>cryptostats</code>:
+<pre class="verbatim">
+ 49213 525.624 127.127.4.1 message
+ </pre>
+
+ <p>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 message field includes the
+message type and certain ancillary information.
+See the
+<a href="#Authentication-Options">Authentication Options</a>
+section for further information.
+<br><dt><code>loopstats</code><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
+<code>loopstats</code>:
+<pre class="verbatim">
+ 50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+ </pre>
+
+ <p>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.
+<br><dt><code>peerstats</code><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
+<code>peerstats</code>:
+<pre class="verbatim">
+ 48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
+ </pre>
+
+ <p>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.
+<br><dt><code>rawstats</code><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
+<code>rawstats</code>:
+<pre class="verbatim">
+ 50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+ </pre>
+
+ <p>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.
+<br><dt><code>sysstats</code><dd>Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+<code>sysstats</code>:
+<pre class="verbatim">
+ 50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+ </pre>
+
+ <p>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 <code>36000</code><dd>Time in hours since the system was last rebooted.
+<br><dt>Packets received <code>81965</code><dd>Total number of packets received.
+<br><dt>Packets processed <code>0</code><dd>Number of packets received in response to previous packets sent
+<br><dt>Current version <code>9546</code><dd>Number of packets matching the current NTP version.
+<br><dt>Previous version <code>56</code><dd>Number of packets matching the previous NTP version.
+<br><dt>Bad version <code>71793</code><dd>Number of packets matching neither NTP version.
+<br><dt>Access denied <code>512</code><dd>Number of packets denied access for any reason.
+<br><dt>Bad length or format <code>540</code><dd>Number of packets with invalid length, format or port number.
+<br><dt>Bad authentication <code>10</code><dd>Number of packets not verified as authentic.
+<br><dt>Rate exceeded <code>147</code><dd>Number of packets discarded due to rate limitation.
+</dl>
+ <br><dt><code>statsdir</code> <kbd>directory_path</kbd><dd>Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+<code>filegen</code>
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+<br><dt><code>filegen</code> <kbd>name</kbd> <code>[file </code><kbd>filename</kbd><code>]</code> <code>[type </code><kbd>typename</kbd><code>]</code> <code>[link | nolink]</code> <code>[enable | disable]</code><dd>Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+
+ <p>Note that this command can be sent from the
+<code>ntpdc(1ntpdcmdoc)</code>
+program running at a remote location.
+ <dl>
+<dt><code>name</code><dd>This is the type of the statistics records, as shown in the
+<code>statistics</code>
+command.
+<br><dt><code>file</code> <kbd>filename</kbd><dd>This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+<code>prefix</code>,
+<code>filename</code>
+and
+<code>suffix</code>:
+ <dl>
+<dt><code>prefix</code><dd>This is a constant filename path.
+It is not subject to
+modifications via the
+<kbd>filegen</kbd>
+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
+<kbd>loopstats</kbd>
+and
+<kbd>peerstats</kbd>
+generation can be configured using the
+<kbd>statsdir</kbd>
+option explained above.
+<br><dt><code>filename</code><dd>This string is directly concatenated to the prefix mentioned
+above (no intervening
+/).
+This can be modified using
+the file argument to the
+<kbd>filegen</kbd>
+statement.
+No
+<span class="file">..</span>
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+<kbd>prefix</kbd>.
+<br><dt><code>suffix</code><dd>This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+</dl>
+ <br><dt><code>type</code> <kbd>typename</kbd><dd>A file generation set is characterized by its type.
+The following
+types are supported:
+ <dl>
+<dt><code>none</code><dd>The file set is actually a single plain file.
+<br><dt><code>pid</code><dd>One element of file set is used per incarnation of a ntpd
+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
+<code>ntpd(1ntpdmdoc)</code>
+server incarnations.
+The set member filename is built by appending a
+.
+to concatenated
+<kbd>prefix</kbd>
+and
+<kbd>filename</kbd>
+strings, and
+appending the decimal representation of the process ID of the
+<code>ntpd(1ntpdmdoc)</code>
+server process.
+<br><dt><code>day</code><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
+.
+and a day specification in
+the form
+<code>YYYYMMdd</code>.
+<code>YYYY</code>
+is a 4-digit year number (e.g., 1992).
+<code>MM</code>
+is a two digit month number.
+<code>dd</code>
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+<kbd>prefix</kbd>
+<kbd>filename</kbd>.19921210.
+<br><dt><code>week</code><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
+<code>W</code>,
+and a 2-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.No . Ns Ar 1992W1 .
+<br><dt><code>month</code><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.
+<br><dt><code>year</code><dd>One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+<br><dt><code>age</code><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
+<code>a</code>,
+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
+<code>enable</code>;
+output is prevented by specifying
+<code>disable</code>.
+</dl>
+ <br><dt><code>link</code> | <code>nolink</code><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
+<code>link</code>
+and disabled using
+<code>nolink</code>.
+If link 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
+<code>C</code>,
+and the pid of the ntpd 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.
+<br><dt><code>enable</code> <code>|</code> <code>disable</code><dd>Enables or disables the recording function.
+</dl>
+ </dl>
+ </dl>
+<div class="node">
+<p><hr>
+<a name="Access-Control-Support"></a>
+<br>
+</div>
+
+<h4 class="subsection">Access Control Support</h4>
+
+<p>The
+<code>ntpd(1ntpdmdoc)</code>
+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
+"Notes on Configuring NTP and Setting up a NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+
+ <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>Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+
+<h5 class="subsubsection">The Kiss-of-Death Packet</h5>
+
+<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" (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
+<code>noserve</code>
+or
+<code>notrust</code>
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+<code>limited</code>
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+
+ <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.
+
+<h5 class="subsubsection">Access Control Commands</h5>
+
+ <dl>
+<dt><code>discard</code> <code>[average </code><kbd>avg</kbd><code>]</code> <code>[minimum </code><kbd>min</kbd><code>]</code> <code>[monitor </code><kbd>prob</kbd><code>]</code><dd>Set the parameters of the
+<code>limited</code>
+facility which protects the server from
+client abuse.
+The
+<code>average</code>
+subcommand specifies the minimum average packet
+spacing, while the
+<code>minimum</code>
+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.
+<br><dt><code>restrict</code> <code>address</code> <code>[mask </code><kbd>mask</kbd><code>]</code> <code>[</code><kbd>flag</kbd> <kbd>...</kbd><code>]</code><dd>The
+<kbd>address</kbd>
+argument expressed in
+dotted-quad form is the address of a host or network.
+Alternatively, the
+<kbd>address</kbd>
+argument can be a valid host DNS name.
+The
+<kbd>mask</kbd>
+argument expressed in dotted-quad form defaults to
+<code>255.255.255.255</code>,
+meaning that the
+<kbd>address</kbd>
+is treated as the address of an individual host.
+A default entry (address
+<code>0.0.0.0</code>,
+mask
+<code>0.0.0.0</code>)
+is always included and is always the first entry in the list.
+Note that text string
+<code>default</code>,
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+<code>flag</code>
+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
+categories, 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><code>ignore</code><dd>Deny packets of all kinds, including
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+queries.
+<br><dt><code>kod</code><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.
+<br><dt><code>limited</code><dd>Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+<code>ntpd(1ntpdmdoc)</code>.
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+<code>limited</code>
+flag.
+<br><dt><code>lowpriotrap</code><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.
+<br><dt><code>nomodify</code><dd>Deny
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+<br><dt><code>noquery</code><dd>Deny
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+queries.
+Time service is not affected.
+<br><dt><code>nopeer</code><dd>Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+<code>pool</code>
+associations, so if you want to use servers from a
+<code>pool</code>
+directive and also want to use
+<code>nopeer</code>
+by default, you'll want a
+<code>restrict source ...</code> <code>line</code> <code>as</code> <code>well</code> <code>that</code> <code>does</code>
+<br><dt>not<dd>include the
+<code>nopeer</code>
+directive.
+<br><dt><code>noserve</code><dd>Deny all packets except
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+queries.
+<br><dt><code>notrap</code><dd>Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+<br><dt><code>notrust</code><dd>Deny service unless the packet is cryptographically authenticated.
+<br><dt><code>ntpport</code><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
+<code>ntpport</code>
+and
+<code>non-ntpport</code>
+may
+be specified.
+The
+<code>ntpport</code>
+is considered more specific and
+is sorted later in the list.
+<br><dt><code>version</code><dd>Deny packets that do not match the current NTP version.
+</dl>
+
+ <p>Default restriction list entries with the flags ignore, interface,
+ntpport, 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>
+<div class="node">
+<p><hr>
+<a name="Automatic-NTP-Configuration-Options"></a>
+<br>
+</div>
+
+<h4 class="subsection">Automatic NTP Configuration Options</h4>
+
+<h5 class="subsubsection">Manycasting</h5>
+
+<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 "best"
+of the nearby 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 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>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
+<code>http://www.openssl.org/</code>.
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+
+ <p>A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+<code>D</code>
+or IPv6 prefix
+<code>FF</code>)
+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>Manycast servers configured with the
+<code>manycastserver</code>
+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>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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+
+ <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
+<code>manycastclient</code>,
+<code>tos</code>
+and
+<code>ttl</code>
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+<code>minpoll</code>
+value specified in the
+<code>manycastclient</code>,
+command and, under normal circumstances, increments to the
+<code>maxpolll</code>
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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>The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+<code>minclock</code>
+and
+<code>minsane</code>
+values specified in the
+<code>tos</code>
+configuration command.
+At least
+<code>minsane</code>
+candidate servers must be available and the mitigation
+algorithms produce at least
+<code>minclock</code>
+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,
+<code>minsane</code>
+defaults to 1 and
+<code>minclock</code>
+defaults to 3.
+For manycast service
+<code>minsane</code>
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+
+ <p>If at least
+<code>minclock</code>
+servers are found, the manycast poll interval is immediately
+set to eight times
+<code>maxpoll</code>.
+If less than
+<code>minclock</code>
+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
+<code>maxpoll</code>.
+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>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
+<code>ttl</code>
+configuration command can be
+used to modify the values to match the scope rules.
+
+ <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
+<code>tos</code>
+command can be used to modify this behavior.
+Servers with stratum below
+<code>floor</code>
+or above
+<code>ceiling</code>
+specified in the
+<code>tos</code>
+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
+<code>minclock</code>.
+
+ <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
+<code>minclock</code>,
+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
+<code>maxpoll</code>
+is 12 (4,096 s).
+
+ <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
+<code>multicastclient</code>
+and
+<code>multicastserver</code>
+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>The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+<code>tos</code>
+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
+<code>floor</code>
+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>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>Some administrators prefer to avoid running
+<code>ntpd(1ntpdmdoc)</code>
+continuously and run either
+<code>ntpdate(8)</code>
+or
+<code>ntpd(1ntpdmdoc)</code>
+<code>-q</code>
+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
+<code>ntpd(1ntpdmdoc)</code>
+<code>-q</code>.
+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.
+
+<h5 class="subsubsection">Manycast Interactions with Autokey</h5>
+
+<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>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.
+
+<h5 class="subsubsection">Manycast Options</h5>
+
+ <dl>
+<dt><code>tos</code> <code>[ceiling </code><kbd>ceiling</kbd><code> | cohort { 0 | 1 } | floor </code><kbd>floor</kbd><code> | minclock </code><kbd>minclock</kbd><code> | minsane </code><kbd>minsane</kbd><code>]</code><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><code>ceiling</code> <kbd>ceiling</kbd><dd>Peers with strata above
+<code>ceiling</code>
+will be discarded if there are at least
+<code>minclock</code>
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+<br><dt><code>cohort</code> <code>{0 | 1}</code><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.
+<br><dt><code>floor</code> <kbd>floor</kbd><dd>Peers with strata below
+<code>floor</code>
+will be discarded if there are at least
+<code>minclock</code>
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+<br><dt><code>minclock</code> <kbd>minclock</kbd><dd>The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+<code>minclock</code>
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+<br><dt><code>minsane</code> <kbd>minsane</kbd><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,
+<code>minsane</code>
+should be at least 4 in order to detect and discard
+a single falseticker.
+</dl>
+ <br><dt><code>ttl</code> <kbd>hop</kbd> <kbd>...</kbd><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>
+<div class="node">
+<p><hr>
+<a name="Reference-Clock-Support"></a>
+<br>
+</div>
+
+<h4 class="subsection">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
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+Additional information can be found in the pages linked
+there, including the
+"Debugging Hints for Reference Clock Drivers"
+and
+"How To Write a Reference Clock Driver"
+pages
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+In addition, support for a PPS
+signal is available as described in the
+"Pulse-per-second (PPS) Signal Interfacing"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+"Line Disciplines and Streams Drivers"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+
+ <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,
+<code>ntpd(1ntpdmdoc)</code>
+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
+<code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd>,
+where
+<kbd>t</kbd>
+is an integer
+denoting the clock type and
+<kbd>u</kbd>
+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
+<code>server</code>
+command is used to configure a reference
+clock, where the
+<kbd>address</kbd>
+argument in that command
+is the clock address.
+The
+<code>key</code>,
+<code>version</code>
+and
+<code>ttl</code>
+options are not used for reference clock support.
+The
+<code>mode</code>
+option is added for reference clock support, as
+described below.
+The
+<code>prefer</code>
+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
+"Mitigation Rules and the prefer Keyword"
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>)
+page.
+The
+<code>minpoll</code>
+and
+<code>maxpoll</code>
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+
+ <p>The
+<code>fudge</code>
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+<code>server</code>
+command.
+The
+<kbd>address</kbd>
+argument specifies the clock address.
+The
+<code>refid</code>
+and
+<code>stratum</code>
+options 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
+<code>fudge</code>
+command as well.
+
+ <p>The stratum number of a reference clock is by default zero.
+Since the
+<code>ntpd(1ntpdmdoc)</code>
+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
+<code>stratum</code>
+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
+<code>refid</code>
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+
+<h5 class="subsubsection">Reference Clock Commands</h5>
+
+ <dl>
+<dt><code>server</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[prefer]</code> <code>[mode </code><kbd>int</kbd><code>]</code> <code>[minpoll </code><kbd>int</kbd><code>]</code> <code>[maxpoll </code><kbd>int</kbd><code>]</code><dd>This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+ <dl>
+<dt><code>prefer</code><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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>)
+for further information.
+<br><dt><code>mode</code> <kbd>int</kbd><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
+parse
+drivers.
+<br><dt><code>minpoll</code> <kbd>int</kbd><br><dt><code>maxpoll</code> <kbd>int</kbd><dd>These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+<code>minpoll</code>
+and
+<code>maxpoll</code>
+default to 6 (64 s).
+For modem reference clocks,
+<code>minpoll</code>
+defaults to 10 (17.1 m) and
+<code>maxpoll</code>
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+</dl>
+ <br><dt><code>fudge</code> <code>127.127.</code><kbd>t</kbd>.<kbd>u</kbd> <code>[time1 </code><kbd>sec</kbd><code>]</code> <code>[time2 </code><kbd>sec</kbd><code>]</code> <code>[stratum </code><kbd>int</kbd><code>]</code> <code>[refid </code><kbd>string</kbd><code>]</code> <code>[mode </code><kbd>int</kbd><code>]</code> <code>[flag1 0 | 1]</code> <code>[flag2 0 | 1]</code> <code>[flag3 0 | 1]</code> <code>[flag4 0 | 1]</code><dd>This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+<code>server</code>
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+<code>ntpdc(1ntpdcmdoc)</code>
+program.
+The options are interpreted as
+follows:
+ <dl>
+<dt><code>time1</code> <kbd>sec</kbd><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.
+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
+<code>enable</code>
+command described in
+<a href="#Miscellaneous-Options">Miscellaneous Options</a>
+page and operates as described in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+<br><dt><code>time2</code> <kbd>secs</kbd><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
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+<span class="file">/usr/share/doc/ntp</span>).
+<br><dt><code>stratum</code> <kbd>int</kbd><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.
+<br><dt><code>refid</code> <kbd>string</kbd><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.
+<br><dt><code>mode</code> <kbd>int</kbd><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
+parse
+drivers.
+<br><dt><code>flag1</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag2</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag3</code> <code>0</code> <code>|</code> <code>1</code><br><dt><code>flag4</code> <code>0</code> <code>|</code> <code>1</code><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
+<code>flag4</code>
+is used to enable recording monitoring
+data to the
+<code>clockstats</code>
+file configured with the
+<code>filegen</code>
+command.
+Further information on the
+<code>filegen</code>
+command can be found in
+<a href="#Monitoring-Options">Monitoring Options</a>.
+</dl>
+ </dl>
+<div class="node">
+<p><hr>
+<a name="Miscellaneous-Options"></a>
+<br>
+</div>
+
+<h4 class="subsection">Miscellaneous Options</h4>
+
+ <dl>
+<dt><code>broadcastdelay</code> <kbd>seconds</kbd><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.
+<br><dt><code>calldelay</code> <kbd>delay</kbd><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.
+<br><dt><code>driftfile</code> <kbd>driftfile</kbd><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
+<code>-f</code>
+command line 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
+<code>ntpd(1ntpdmdoc)</code>
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+<br><dt><code>enable</code> <code>[auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</code><br><dt><code>disable</code> <code>[auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</code><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
+<code>ntpdc(1ntpdcmdoc)</code>
+utility program.
+ <dl>
+<dt><code>auth</code><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
+<code>enable</code>.
+<br><dt><code>bclient</code><dd>Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+<code>multicastclient</code>
+command with default
+address.
+The default for this flag is
+<code>disable</code>.
+<br><dt><code>calibrate</code><dd>Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+<code>disable</code>.
+<br><dt><code>kernel</code><dd>Enables the kernel time discipline, if available.
+The default for this
+flag is
+<code>enable</code>
+if support is available, otherwise
+<code>disable</code>.
+<br><dt><code>mode7</code><dd>Enables processing of NTP mode 7 implementation-specific requests
+which are used by the deprecated
+<code>ntpdc(1ntpdcmdoc)</code>
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+<code>ntpq(1ntpqmdoc)</code>.
+The
+<code>ntpq(1ntpqmdoc)</code>
+program provides the same capabilities as
+<code>ntpdc(1ntpdcmdoc)</code>
+using standard mode 6 requests.
+<br><dt><code>monitor</code><dd>Enables the monitoring facility.
+See the
+<code>ntpdc(1ntpdcmdoc)</code>
+program
+and the
+<code>monlist</code>
+command or further information.
+The
+default for this flag is
+<code>enable</code>.
+<br><dt><code>ntp</code><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
+<code>enable</code>.
+<br><dt><code>stats</code><dd>Enables the statistics facility.
+See the
+<a href="#Monitoring-Options">Monitoring Options</a>
+section for further information.
+The default for this flag is
+<code>disable</code>.
+</dl>
+ <br><dt><code>includefile</code> <kbd>includefile</kbd><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
+<code>ntpd(1ntpdmdoc)</code>
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+<br><dt><code>logconfig</code> <kbd>configkeyword</kbd><dd>This command controls the amount and type of output written to
+the system
+<code>syslog(3)</code>
+facility or the alternate
+<code>logfile</code>
+log file.
+By default, all output is turned on.
+All
+<kbd>configkeyword</kbd>
+keywords can be prefixed with
+=,
++
+and
+-,
+where
+=
+sets the
+<code>syslog(3)</code>
+priority mask,
++
+adds and
+-
+removes
+messages.
+<code>syslog(3)</code>
+messages can be controlled in four
+classes
+(<code>clock</code>, <code>peer</code>, <code>sys</code> and <code>sync</code>).
+Within these classes four types of messages can be
+controlled: informational messages
+(<code>info</code>),
+event messages
+(<code>events</code>),
+statistics messages
+(<code>statistics</code>)
+and
+status messages
+(<code>status</code>).
+
+ <p>Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+<code>all</code>
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+<code>all</code>
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+<pre class="verbatim">
+ logconfig =syncstatus +sysevents
+</pre>
+
+ <p>This would just list the synchronizations state of
+<code>ntpd(1ntpdmdoc)</code>
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+<pre class="verbatim">
+ logconfig =syncall +clockall
+</pre>
+
+ <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.
+<br><dt><code>logfile</code> <kbd>logfile</kbd><dd>This command specifies the location of an alternate log file to
+be used instead of the default system
+<code>syslog(3)</code>
+facility.
+This is the same operation as the -l command line option.
+<br><dt><code>setvar</code> <kbd>variable</kbd> <code>[default]</code><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
+<code>name</code><code>=</code><kbd>value</kbd>
+is followed by the
+<code>default</code>
+keyword, the
+variable will be listed as part of the default system variables
+(<code>rv</code> 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
+<code>setvar</code>
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+<code>sys_var_list</code>
+holds
+the names of all system variables.
+The
+<code>peer_var_list</code>
+holds
+the names of all peer variables and the
+<code>clock_var_list</code>
+holds the names of the reference clock variables.
+<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>srep</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><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 cannot 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:
+ <dl>
+<dt><code>allan</code> <kbd>allan</kbd><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.
+<br><dt><code>dispersion</code> <kbd>dispersion</kbd><dd>The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+<br><dt><code>freq</code> <kbd>freq</kbd><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.
+<br><dt><code>huffpuff</code> <kbd>huffpuff</kbd><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.
+<br><dt><code>panic</code> <kbd>panic</kbd><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.
+<br><dt><code>step</code> <kbd>step</kbd><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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+<br><dt><code>stepout</code> <kbd>stepout</kbd><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>
+ <br><dt><code>rlimit</code> <code>[memlock </code><kbd>Nmegabytes</kbd><code> | stacksize </code><kbd>N4kPages</kbd><code> filenum </code><kbd>Nfiledescriptors</kbd><code>]</code><dd>
+ <dl>
+<dt><code>memlock</code> <kbd>Nmegabytes</kbd><dd>Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+<code>-i</code>
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+<br><dt><code>stacksize</code> <kbd>N4kPages</kbd><dd>Specifies the maximum size of the process stack on systems with the
+<br><dt><code>filenum</code> <kbd>Nfiledescriptors</kbd><dd>Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+<code>mlockall()</code>
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+</dl>
+ <br><dt><code>trap</code> <kbd>host_address</kbd> <code>[port </code><kbd>port_number</kbd><code>]</code> <code>[interface </code><kbd>interface_address</kbd><code>]</code><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.
+<br><dt><code>hop</code> <kbd>...</kbd><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>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.conf</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002econf-Files">ntp.conf Files</a>: Files
+<li><a accesskey="2" href="#ntp_002econf-See-Also">ntp.conf See Also</a>: See Also
+<li><a accesskey="3" href="#ntp_002econf-Bugs">ntp.conf Bugs</a>: Bugs
+<li><a accesskey="4" href="#ntp_002econf-Notes">ntp.conf Notes</a>: Notes
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-Files"></a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.conf Files</h4>
+
+ <dl>
+<dt><span class="file">/etc/ntp.conf</span><dd>the default name of the configuration file
+<br><dt><span class="file">ntp.keys</span><dd>private MD5 keys
+<br><dt><span class="file">ntpkey</span><dd>RSA private key
+<br><dt><span class="file">ntpkey_</span><kbd>host</kbd><dd>RSA public key
+<br><dt><span class="file">ntp_dh</span><dd>Diffie-Hellman agreement parameters
+</dl>
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-See-Also"></a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.conf See Also</h4>
+
+<p><code>ntpd(1ntpdmdoc)</code>,
+<code>ntpdc(1ntpdcmdoc)</code>,
+<code>ntpq(1ntpqmdoc)</code>
+
+ <p>In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+<code>http://www.ntp.org/</code>.
+A snapshot of this documentation is available in HTML format in
+<span class="file">/usr/share/doc/ntp</span>.
+<br>
+
+ <p><br>
+David L. Mills, <em>Network Time Protocol (Version 4)</em>, RFC5905
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-Bugs"></a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.conf Bugs</h4>
+
+<p>The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+
+ <p>The
+<span class="file">ntpkey_</span><kbd>host</kbd>
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+<div class="node">
+<p><hr>
+<a name="ntp_002econf-Notes"></a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.conf Notes</h4>
+
+<p>This document was derived from FreeBSD.
+
+</body></html>
+
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
new file mode 100644
index 000000000000..eff1e4347ce6
--- /dev/null
+++ b/ntpd/ntp.conf.man.in
@@ -0,0 +1,3004 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp.conf 5 "19 Dec 2014" "4.2.8" "File Formats"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eCaa6b/ag-rCai4b)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:49 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.conf.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp.conf\fP
+\- Network Time Protocol (NTP) daemon configuration file format
+.SH SYNOPSIS
+\f\*[B-Font]ntp.conf\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntp.conf\fP
+configuration file is read at initial startup by the
+\fCntpd\fR(@NTPD_MS@)\f[]
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+\fI/etc\f[]
+directory,
+but could be installed elsewhere
+(see the daemon's
+\f\*[B-Font]\-c\f[]
+command line option).
+.sp \n(Ppu
+.ne 2
+
+The file format is similar to other
+UNIX
+configuration files.
+Comments begin with a
+\[oq]#\[cq]
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+.sp \n(Ppu
+.ne 2
+
+The rest of this page describes the configuration and control options.
+The
+"Notes on Configuring NTP and Setting up an NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+contains an extended discussion of these options.
+In addition to the discussion of general
+\fIConfiguration\f[] \fIOptions\f[],
+there are sections describing the following supported functionality
+and the options used to control it:
+.IP \fB\(bu\fP 2
+\fIAuthentication\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIMonitoring\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIAccess\f[] \fIControl\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+.IP \fB\(bu\fP 2
+\fIReference\f[] \fIClock\f[] \fISupport\f[]
+.IP \fB\(bu\fP 2
+\fIMiscellaneous\f[] \fIOptions\f[]
+.PP
+.sp \n(Ppu
+.ne 2
+
+Following these is a section describing
+\fIMiscellaneous\f[] \fIOptions\f[].
+While there is a rich set of options available,
+the only required option is one or more
+\f\*[B-Font]pool\f[],
+\f\*[B-Font]server\f[],
+\f\*[B-Font]peer\f[],
+\f\*[B-Font]broadcast\f[]
+or
+\f\*[B-Font]manycastclient\f[]
+commands.
+.SH Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+.SS Configuration Commands
+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.
+.sp \n(Ppu
+.ne 2
+
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+\*[Lq]\&:\*[Rq]
+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.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+\f\*[B-Font]\-6\f[]
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+.TP 7
+.NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]peer\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]]
+.TP 7
+.NOP \f\*[B-Font]manycastclient\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]]
+.PP
+.sp \n(Ppu
+.ne 2
+
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+\f\*[I-Font]address\f[]
+can be
+either a DNS name or an IP address in dotted-quad notation.
+Additional information on association behavior can be found in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]pool\f[]
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+.TP 7
+.NOP \f\*[B-Font]server\f[]
+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
+\fInot\f[]
+be used for type
+b or m addresses.
+.TP 7
+.NOP \f\*[B-Font]peer\f[]
+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
+b, m or r addresses.
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[]
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+\f\*[I-Font]address\f[]
+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
+\f\*[B-Font]broadcastclient\f[]
+or
+\f\*[B-Font]multicastclient\f[]
+commands
+below.
+.TP 7
+.NOP \f\*[B-Font]manycastclient\f[]
+For type m 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
+\f\*[B-Font]manycastserver\f[]
+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.
+The
+\f\*[B-Font]manycastserver\f[]
+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
+\f\*[I-Font]address\f[]
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+\f\*[B-Font]server\f[]
+command.
+The remaining servers are discarded as if never
+heard.
+.PP
+.sp \n(Ppu
+.ne 2
+
+Options:
+.TP 7
+.NOP \f\*[B-Font]autokey\f[]
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]burst\f[]
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+\f\*[B-Font]server\f[]
+command and s addresses.
+.TP 7
+.NOP \f\*[B-Font]iburst\f[]
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+\f\*[B-Font]server\f[]
+command and s addresses and when
+\fCntpd\fR(@NTPD_MS@)\f[]
+is started with the
+\f\*[B-Font]\-q\f[]
+option.
+.TP 7
+.NOP \f\*[B-Font]key\f[] \f\*[I-Font]key\f[]
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+\f\*[I-Font]key\f[]
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+.TP 7
+.NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]
+.TP 7
+.NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+\f\*[B-Font]maxpoll\f[]
+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
+\f\*[B-Font]minpoll\f[]
+option to a lower limit of 4 (16 s).
+.TP 7
+.NOP \f\*[B-Font]noselect\f[]
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+.TP 7
+.NOP \f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+for further information.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time-to-live
+\f\*[I-Font]ttl\f[]
+to
+use on broadcast server and multicast server and the maximum
+\f\*[I-Font]ttl\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]version\f[] \f\*[I-Font]version\f[]
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1-4 are the choices, with version 4 the
+default.
+.PP
+.SS Auxiliary Commands
+.TP 7
+.NOP \f\*[B-Font]broadcastclient\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]manycastserver\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]multicastclient\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
+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
+\fIAuthentication\f[] \fIOptions\f[].
+.PP
+.SH Authentication Support
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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 Building and Installing the Distribution page.
+.sp \n(Ppu
+.ne 2
+
+Authentication is configured separately for each association
+using the
+\f\*[B-Font]key\f[]
+or
+\f\*[B-Font]autokey\f[]
+subcommand on the
+\f\*[B-Font]peer\f[],
+\f\*[B-Font]server\f[],
+\f\*[B-Font]broadcast\f[]
+and
+\f\*[B-Font]manycastclient\f[]
+configuration commands as described in
+\fIConfiguration\f[] \fIOptions\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]auth\f[]
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+commands and also by remote
+configuration commands sent by a
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+\f\*[B-Font]auth\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f[C]http://www.ntp.org/\f[].
+.SS Symmetric-Key Cryptography
+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
+\fIntp.keys\f[],
+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
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+When
+\fCntpd\fR(@NTPD_MS@)\f[]
+is first started, it reads the key file specified in the
+\f\*[B-Font]keys\f[]
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+\f\*[B-Font]trusted\f[]
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+\fCntpdc\fR(@NTPDC_MS@)\f[].
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+\f\*[B-Font]requestkey\f[]
+command selects the key used as the password for the
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility, while the
+\f\*[B-Font]controlkey\f[]
+command selects the key used as the password for the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+utility.
+.SS Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+.\" .Pp
+.\" The cryptographic means necessary for all Autokey operations
+.\" is provided by the OpenSSL software library.
+.\" This library is available from http://www.openssl.org/
+.\" and can be installed using the procedures outlined
+.\" in the Building and Installing the Distribution page.
+.\" Once installed,
+.\" the configure and build
+.\" process automatically detects the library and links
+.\" the library routines required.
+.sp \n(Ppu
+.ne 2
+
+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
+\fIAutonomous\f[] \fIAuthentication\f[]
+page.
+.sp \n(Ppu
+.ne 2
+
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+\fCntp-keygen\fR(1ntpkeygenmdoc)\f[]
+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
+\f\*[B-Font]md5WithRSAEncryption\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+.SS Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+.sp \n(Ppu
+.ne 2
+
+By convention, the name of an Autokey host is the name returned
+by the Unix
+\fCgethostname\fR(2)\f[]
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+.sp \n(Ppu
+.ne 2
+
+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 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 servers are operated outside firewall perimeters.
+.SS Operation
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]server\f[]
+or
+\f\*[B-Font]peer\f[]
+configuration command and no
+\f\*[B-Font]key\f[]
+or
+\f\*[B-Font]autokey\f[]
+subcommands are present, the association is not
+authenticated; if the
+\f\*[B-Font]key\f[]
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+\f\*[B-Font]autokey\f[]
+subcommand is present, the association is authenticated
+using Autokey.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\fCntpq\fR(@NTPQ_MS@)\f[]
+program.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+\fCntp-keygen\fR(1ntpkeygenmdoc)\f[]
+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
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+.sp \n(Ppu
+.ne 2
+
+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 (CN) 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
+\f\*[B-Font]trustRoot\f[];.
+Other extension fields are ignored.
+.SS Authentication Commands
+.TP 7
+.NOP \f\*[B-Font]autokey\f[] [\f\*[I-Font]logsec\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]controlkey\f[] \f\*[I-Font]key\f[]
+Specifies the key identifier to use with the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+utility, which uses the standard
+protocol defined in RFC-1305.
+The
+\f\*[I-Font]key\f[]
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+.TP 7
+.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
+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
+\f\*[B-Font]keysdir\f[]
+command or default
+\fI/usr/local/etc\f[].
+Following are the subcommands:
+.RS
+.TP 7
+.NOP \f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]
+Specifies the location of the required host public certificate file.
+This overrides the link
+\fIntpkey_cert_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+\fIntpkey_gq_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]file\f[]
+Specifies the location of the required host key file.
+This overrides
+the link
+\fIntpkey_key_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+\fIntpkey_iff_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional leapsecond file.
+This overrides the link
+\fIntpkey_leap\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+\fIntpkey_mv_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+.TP 7
+.NOP \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+.TP 7
+.NOP \f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+.TP 7
+.NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]
+Specifies the location of the optional sign key file.
+This overrides
+the link
+\fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[]
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+.RE
+.TP 7
+.NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[]
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+\fCntpd\fR(@NTPD_MS@)\f[],
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+when operating with symmetric key cryptography.
+This is the same operation as the
+\f\*[B-Font]\-k\f[]
+command line option.
+.TP 7
+.NOP \f\*[B-Font]keysdir\f[] \f\*[I-Font]path\f[]
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+\fI/usr/local/etc/\f[].
+.TP 7
+.NOP \f\*[B-Font]requestkey\f[] \f\*[I-Font]key\f[]
+Specifies the key identifier to use with the
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility program, which uses a
+proprietary protocol specific to this implementation of
+\fCntpd\fR(@NTPD_MS@)\f[].
+The
+\f\*[I-Font]key\f[]
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+.TP 7
+.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]key\f[] \f\*[I-Font]...\f[]
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+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
+\f\*[I-Font]key\f[]
+arguments are 32-bit unsigned
+integers with values from 1 to 65,534.
+.PP
+.SS Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+.TP 7
+.NOP 101
+(bad field format or length)
+The packet has invalid version, length or format.
+.TP 7
+.NOP 102
+(bad timestamp)
+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.
+.TP 7
+.NOP 103
+(bad filestamp)
+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.
+.TP 7
+.NOP 104
+(bad or missing public key)
+The public key is missing, has incorrect format or is an unsupported type.
+.TP 7
+.NOP 105
+(unsupported digest type)
+The server requires an unsupported digest/signature scheme.
+.TP 7
+.NOP 106
+(mismatched digest types)
+Not used.
+.TP 7
+.NOP 107
+(bad signature length)
+The signature length does not match the current public key.
+.TP 7
+.NOP 108
+(signature not verified)
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+.TP 7
+.NOP 109
+(certificate not verified)
+The certificate is invalid or signed with the wrong key.
+.TP 7
+.NOP 110
+(certificate not verified)
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+.TP 7
+.NOP 111
+(bad or missing cookie)
+The cookie is missing, corrupted or bogus.
+.TP 7
+.NOP 112
+(bad or missing leapseconds table)
+The leapseconds table is missing, corrupted or bogus.
+.TP 7
+.NOP 113
+(bad or missing certificate)
+The certificate is missing, corrupted or bogus.
+.TP 7
+.NOP 114
+(bad or missing identity)
+The identity key is missing, corrupt or bogus.
+.PP
+.SH Monitoring Support
+\fCntpd\fR(@NTPD_MS@)\f[]
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+\f\*[B-Font]statistics\f[]
+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
+\fI./scripts\f[]
+directory of this distribution.
+Using
+these facilities and
+UNIX
+\fCcron\fR(8)\f[]
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+.SS Monitoring Commands
+.TP 7
+.NOP \f\*[B-Font]statistics\f[] \f\*[I-Font]name\f[] \f\*[I-Font]...\f[]
+Enables writing of statistics records.
+Currently, eight kinds of
+\f\*[I-Font]name\f[]
+statistics are supported.
+.RS
+.TP 7
+.NOP \f\*[B-Font]clockstats\f[]
+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
+\f\*[B-Font]clockstats\f[]:
+.br
+.in +4
+.nf
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]cryptostats\f[]
+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
+\f\*[B-Font]cryptostats\f[]:
+.br
+.in +4
+.nf
+49213 525.624 127.127.4.1 message
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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 message field includes the
+message type and certain ancillary information.
+See the
+\fIAuthentication\f[] \fIOptions\f[]
+section for further information.
+.TP 7
+.NOP \f\*[B-Font]loopstats\f[]
+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
+\f\*[B-Font]loopstats\f[]:
+.br
+.in +4
+.nf
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]peerstats\f[]
+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
+\f\*[B-Font]peerstats\f[]:
+.br
+.in +4
+.nf
+48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]rawstats\f[]
+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
+\f\*[B-Font]rawstats\f[]:
+.br
+.in +4
+.nf
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+\f\*[B-Font]sysstats\f[]:
+.br
+.in +4
+.nf
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+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.
+.RS
+.TP 7
+.NOP Time since restart \f\*[B-Font]36000\f[]
+Time in hours since the system was last rebooted.
+.TP 7
+.NOP Packets received \f\*[B-Font]81965\f[]
+Total number of packets received.
+.TP 7
+.NOP Packets processed \f\*[B-Font]0\f[]
+Number of packets received in response to previous packets sent
+.TP 7
+.NOP Current version \f\*[B-Font]9546\f[]
+Number of packets matching the current NTP version.
+.TP 7
+.NOP Previous version \f\*[B-Font]56\f[]
+Number of packets matching the previous NTP version.
+.TP 7
+.NOP Bad version \f\*[B-Font]71793\f[]
+Number of packets matching neither NTP version.
+.TP 7
+.NOP Access denied \f\*[B-Font]512\f[]
+Number of packets denied access for any reason.
+.TP 7
+.NOP Bad length or format \f\*[B-Font]540\f[]
+Number of packets with invalid length, format or port number.
+.TP 7
+.NOP Bad authentication \f\*[B-Font]10\f[]
+Number of packets not verified as authentic.
+.TP 7
+.NOP Rate exceeded \f\*[B-Font]147\f[]
+Number of packets discarded due to rate limitation.
+.RE
+.TP 7
+.NOP \f\*[B-Font]statsdir\f[] \f\*[I-Font]directory_path\f[]
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+\f\*[B-Font]filegen\f[]
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+.TP 7
+.NOP \f\*[B-Font]filegen\f[] \f\*[I-Font]name\f[] [\f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]] [\f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]] [\f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]] [\f\*[B-Font]enable\f[] | \f\*[B-Font]disable\f[]]
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+.sp \n(Ppu
+.ne 2
+
+Note that this command can be sent from the
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+program running at a remote location.
+.RS
+.TP 7
+.NOP \f\*[B-Font]name\f[]
+This is the type of the statistics records, as shown in the
+\f\*[B-Font]statistics\f[]
+command.
+.TP 7
+.NOP \f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+\f\*[B-Font]prefix\f[],
+\f\*[B-Font]filename\f[]
+and
+\f\*[B-Font]suffix\f[]:
+.RS
+.TP 7
+.NOP \f\*[B-Font]prefix\f[]
+This is a constant filename path.
+It is not subject to
+modifications via the
+\f\*[I-Font]filegen\f[]
+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
+\f\*[I-Font]loopstats\f[]
+and
+\f\*[I-Font]peerstats\f[]
+generation can be configured using the
+\f\*[I-Font]statsdir\f[]
+option explained above.
+.TP 7
+.NOP \f\*[B-Font]filename\f[]
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+\[oq]/\[cq]).
+This can be modified using
+the file argument to the
+\f\*[I-Font]filegen\f[]
+statement.
+No
+\fI..\f[]
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+\f\*[I-Font]prefix\f[].
+.TP 7
+.NOP \f\*[B-Font]suffix\f[]
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+.RE
+.TP 7
+.NOP \f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]
+A file generation set is characterized by its type.
+The following
+types are supported:
+.RS
+.TP 7
+.NOP \f\*[B-Font]none\f[]
+The file set is actually a single plain file.
+.TP 7
+.NOP \f\*[B-Font]pid\f[]
+One element of file set is used per incarnation of a ntpd
+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
+\fCntpd\fR(@NTPD_MS@)\f[]
+server incarnations.
+The set member filename is built by appending a
+\[oq]\&.\[cq]
+to concatenated
+\f\*[I-Font]prefix\f[]
+and
+\f\*[I-Font]filename\f[]
+strings, and
+appending the decimal representation of the process ID of the
+\fCntpd\fR(@NTPD_MS@)\f[]
+server process.
+.TP 7
+.NOP \f\*[B-Font]day\f[]
+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
+\[oq]\&.\[cq]
+and a day specification in
+the form
+\f\*[B-Font]YYYYMMdd\f[].
+\f\*[B-Font]YYYY\f[]
+is a 4-digit year number (e.g., 1992).
+\f\*[B-Font]MM\f[]
+is a two digit month number.
+\f\*[B-Font]dd\f[]
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+\f\*[I-Font]prefix\f[]
+\f\*[I-Font]filename\f[].19921210.
+.TP 7
+.NOP \f\*[B-Font]week\f[]
+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
+\f\*[B-Font]W\f[],
+and a 2-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.NOP. \f\*[I-Font]1992W1\f[].
+.TP 7
+.NOP \f\*[B-Font]month\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]year\f[]
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+.TP 7
+.NOP \f\*[B-Font]age\f[]
+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
+\f\*[B-Font]a\f[],
+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
+\f\*[B-Font]enable\f[];
+output is prevented by specifying
+\f\*[B-Font]disable\f[].
+.RE
+.TP 7
+.NOP \f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]
+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
+\f\*[B-Font]link\f[]
+and disabled using
+\f\*[B-Font]nolink\f[].
+If link 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
+\f\*[B-Font]C\f[],
+and the pid of the ntpd 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.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]disable\f[]
+Enables or disables the recording function.
+.RE
+.RE
+.PP
+.SH Access Control Support
+The
+\fCntpd\fR(@NTPD_MS@)\f[]
+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
+"Notes on Configuring NTP and Setting up a NTP Subnet"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+.SS The Kiss-of-Death Packet
+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" (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
+\f\*[B-Font]noserve\f[]
+or
+\f\*[B-Font]notrust\f[]
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+\f\*[B-Font]limited\f[]
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Access Control Commands
+.TP 7
+.NOP \f\*[B-Font]discard\f[] [\f\*[B-Font]average\f[] \f\*[I-Font]avg\f[]] [\f\*[B-Font]minimum\f[] \f\*[I-Font]min\f[]] [\f\*[B-Font]monitor\f[] \f\*[I-Font]prob\f[]]
+Set the parameters of the
+\f\*[B-Font]limited\f[]
+facility which protects the server from
+client abuse.
+The
+\f\*[B-Font]average\f[]
+subcommand specifies the minimum average packet
+spacing, while the
+\f\*[B-Font]minimum\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+The
+\f\*[I-Font]address\f[]
+argument expressed in
+dotted-quad form is the address of a host or network.
+Alternatively, the
+\f\*[I-Font]address\f[]
+argument can be a valid host DNS name.
+The
+\f\*[I-Font]mask\f[]
+argument expressed in dotted-quad form defaults to
+\f\*[B-Font]255.255.255.255\f[],
+meaning that the
+\f\*[I-Font]address\f[]
+is treated as the address of an individual host.
+A default entry (address
+\f\*[B-Font]0.0.0.0\f[],
+mask
+\f\*[B-Font]0.0.0.0\f[])
+is always included and is always the first entry in the list.
+Note that text string
+\f\*[B-Font]default\f[],
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+\f\*[B-Font]flag\f[]
+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
+categories, 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:
+.RS
+.TP 7
+.NOP \f\*[B-Font]ignore\f[]
+Deny packets of all kinds, including
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+queries.
+.TP 7
+.NOP \f\*[B-Font]kod\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]limited\f[]
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+\fCntpd\fR(@NTPD_MS@)\f[].
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+\f\*[B-Font]limited\f[]
+flag.
+.TP 7
+.NOP \f\*[B-Font]lowpriotrap\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]nomodify\f[]
+Deny
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+.TP 7
+.NOP \f\*[B-Font]noquery\f[]
+Deny
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+queries.
+Time service is not affected.
+.TP 7
+.NOP \f\*[B-Font]nopeer\f[]
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+\f\*[B-Font]pool\f[]
+associations, so if you want to use servers from a
+\f\*[B-Font]pool\f[]
+directive and also want to use
+\f\*[B-Font]nopeer\f[]
+by default, you'll want a
+\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
+.TP 7
+.NOP not
+include the
+\f\*[B-Font]nopeer\f[]
+directive.
+.TP 7
+.NOP \f\*[B-Font]noserve\f[]
+Deny all packets except
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+queries.
+.TP 7
+.NOP \f\*[B-Font]notrap\f[]
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+.TP 7
+.NOP \f\*[B-Font]notrust\f[]
+Deny service unless the packet is cryptographically authenticated.
+.TP 7
+.NOP \f\*[B-Font]ntpport\f[]
+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
+\f\*[B-Font]ntpport\f[]
+and
+\f\*[B-Font]non-ntpport\f[]
+may
+be specified.
+The
+\f\*[B-Font]ntpport\f[]
+is considered more specific and
+is sorted later in the list.
+.TP 7
+.NOP \f\*[B-Font]version\f[]
+Deny packets that do not match the current NTP version.
+.RE
+.sp \n(Ppu
+.ne 2
+
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+.PP
+.SH Automatic NTP Configuration Options
+.SS Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f[C]http://www.openssl.org/\f[].
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+.sp \n(Ppu
+.ne 2
+
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+\f\*[B-Font]D\f[]
+or IPv6 prefix
+\f\*[B-Font]FF\f[])
+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.
+.sp \n(Ppu
+.ne 2
+
+Manycast servers configured with the
+\f\*[B-Font]manycastserver\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]manycastclient\f[],
+\f\*[B-Font]tos\f[]
+and
+\f\*[B-Font]ttl\f[]
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+\f\*[B-Font]minpoll\f[]
+value specified in the
+\f\*[B-Font]manycastclient\f[],
+command and, under normal circumstances, increments to the
+\f\*[B-Font]maxpolll\f[]
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+.sp \n(Ppu
+.ne 2
+
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+\f\*[B-Font]minclock\f[]
+and
+\f\*[B-Font]minsane\f[]
+values specified in the
+\f\*[B-Font]tos\f[]
+configuration command.
+At least
+\f\*[B-Font]minsane\f[]
+candidate servers must be available and the mitigation
+algorithms produce at least
+\f\*[B-Font]minclock\f[]
+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,
+\f\*[B-Font]minsane\f[]
+defaults to 1 and
+\f\*[B-Font]minclock\f[]
+defaults to 3.
+For manycast service
+\f\*[B-Font]minsane\f[]
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+.sp \n(Ppu
+.ne 2
+
+If at least
+\f\*[B-Font]minclock\f[]
+servers are found, the manycast poll interval is immediately
+set to eight times
+\f\*[B-Font]maxpoll\f[].
+If less than
+\f\*[B-Font]minclock\f[]
+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
+\f\*[B-Font]maxpoll\f[].
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]ttl\f[]
+configuration command can be
+used to modify the values to match the scope rules.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]tos\f[]
+command can be used to modify this behavior.
+Servers with stratum below
+\f\*[B-Font]floor\f[]
+or above
+\f\*[B-Font]ceiling\f[]
+specified in the
+\f\*[B-Font]tos\f[]
+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
+\f\*[B-Font]minclock\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]minclock\f[],
+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
+\f\*[B-Font]maxpoll\f[]
+is 12 (4,096 s).
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]multicastclient\f[]
+and
+\f\*[B-Font]multicastserver\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+\f\*[B-Font]tos\f[]
+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
+\f\*[B-Font]floor\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Some administrators prefer to avoid running
+\fCntpd\fR(@NTPD_MS@)\f[]
+continuously and run either
+\fCntpdate\fR(8)\f[]
+or
+\fCntpd\fR(@NTPD_MS@)\f[]
+\f\*[B-Font]\-q\f[]
+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
+\fCntpd\fR(@NTPD_MS@)\f[]
+\f\*[B-Font]\-q\f[].
+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.
+.SS Manycast Interactions with Autokey
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.SS Manycast Options
+.TP 7
+.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
+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:
+.RS
+.TP 7
+.NOP \f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[]
+Peers with strata above
+\f\*[B-Font]ceiling\f[]
+will be discarded if there are at least
+\f\*[B-Font]minclock\f[]
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+.TP 7
+.NOP \f\*[B-Font]cohort\f[] {0 | 1 }
+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.
+.TP 7
+.NOP \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[]
+Peers with strata below
+\f\*[B-Font]floor\f[]
+will be discarded if there are at least
+\f\*[B-Font]minclock\f[]
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+.TP 7
+.NOP \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[]
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+\f\*[B-Font]minclock\f[]
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+.TP 7
+.NOP \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]
+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,
+\f\*[B-Font]minsane\f[]
+should be at least 4 in order to detect and discard
+a single falseticker.
+.RE
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+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.
+.PP
+.SH Reference Clock Support
+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
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+Additional information can be found in the pages linked
+there, including the
+"Debugging Hints for Reference Clock Drivers"
+and
+"How To Write a Reference Clock Driver"
+pages
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+In addition, support for a PPS
+signal is available as described in the
+"Pulse-per-second (PPS) Signal Interfacing"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+"Line Disciplines and Streams Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+For the purposes of configuration,
+\fCntpd\fR(@NTPD_MS@)\f[]
+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
+\f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[],
+where
+\f\*[I-Font]t\f[]
+is an integer
+denoting the clock type and
+\f\*[I-Font]u\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]server\f[]
+command is used to configure a reference
+clock, where the
+\f\*[I-Font]address\f[]
+argument in that command
+is the clock address.
+The
+\f\*[B-Font]key\f[],
+\f\*[B-Font]version\f[]
+and
+\f\*[B-Font]ttl\f[]
+options are not used for reference clock support.
+The
+\f\*[B-Font]mode\f[]
+option is added for reference clock support, as
+described below.
+The
+\f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+page.
+The
+\f\*[B-Font]minpoll\f[]
+and
+\f\*[B-Font]maxpoll\f[]
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]fudge\f[]
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+\f\*[B-Font]server\f[]
+command.
+The
+\f\*[I-Font]address\f[]
+argument specifies the clock address.
+The
+\f\*[B-Font]refid\f[]
+and
+\f\*[B-Font]stratum\f[]
+options 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
+\f\*[B-Font]fudge\f[]
+command as well.
+.sp \n(Ppu
+.ne 2
+
+The stratum number of a reference clock is by default zero.
+Since the
+\fCntpd\fR(@NTPD_MS@)\f[]
+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
+\f\*[B-Font]stratum\f[]
+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
+\f\*[B-Font]refid\f[]
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+.SS Reference Clock Commands
+.TP 7
+.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]prefer\f[]
+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
+"Mitigation Rules and the prefer Keyword"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+for further information.
+.TP 7
+.NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
+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
+parse
+drivers.
+.TP 7
+.NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]
+.TP 7
+.NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+\f\*[B-Font]minpoll\f[]
+and
+\f\*[B-Font]maxpoll\f[]
+default to 6 (64 s).
+For modem reference clocks,
+\f\*[B-Font]minpoll\f[]
+defaults to 10 (17.1 m) and
+\f\*[B-Font]maxpoll\f[]
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+.RE
+.TP 7
+.NOP \f\*[B-Font]fudge\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]time2\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]]
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+\f\*[B-Font]server\f[]
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+program.
+The options are interpreted as
+follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]
+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.
+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
+\f\*[B-Font]enable\f[]
+command described in
+\fIMiscellaneous\f[] \fIOptions\f[]
+page and operates as described in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]time2\f[] \f\*[I-Font]secs\f[]
+Specifies a fixed-point decimal number in seconds, which is
+interpreted in a driver-dependent way.
+See the descriptions of
+specific drivers in the
+"Reference Clock Drivers"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+.TP 7
+.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
+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
+parse
+drivers.
+.TP 7
+.NOP \f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+.TP 7
+.NOP \f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
+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
+\f\*[B-Font]flag4\f[]
+is used to enable recording monitoring
+data to the
+\f\*[B-Font]clockstats\f[]
+file configured with the
+\f\*[B-Font]filegen\f[]
+command.
+Further information on the
+\f\*[B-Font]filegen\f[]
+command can be found in
+\fIMonitoring\f[] \fIOptions\f[].
+.RE
+.PP
+.SH Miscellaneous Options
+.TP 7
+.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[]
+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
+\f\*[B-Font]\-f\f[]
+command line 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.
+.sp \n(Ppu
+.ne 2
+
+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
+\fCntpd\fR(@NTPD_MS@)\f[]
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[]]
+.TP 7
+.NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[]]
+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
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility program.
+.RS
+.TP 7
+.NOP \f\*[B-Font]auth\f[]
+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
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]bclient\f[]
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+\f\*[B-Font]multicastclient\f[]
+command with default
+address.
+The default for this flag is
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]calibrate\f[]
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]kernel\f[]
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+\f\*[B-Font]enable\f[]
+if support is available, otherwise
+\f\*[B-Font]disable\f[].
+.TP 7
+.NOP \f\*[B-Font]mode7\f[]
+Enables processing of NTP mode 7 implementation-specific requests
+which are used by the deprecated
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+\fCntpq\fR(@NTPQ_MS@)\f[].
+The
+\fCntpq\fR(@NTPQ_MS@)\f[]
+program provides the same capabilities as
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+using standard mode 6 requests.
+.TP 7
+.NOP \f\*[B-Font]monitor\f[]
+Enables the monitoring facility.
+See the
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+program
+and the
+\f\*[B-Font]monlist\f[]
+command or further information.
+The
+default for this flag is
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]ntp\f[]
+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
+\f\*[B-Font]enable\f[].
+.TP 7
+.NOP \f\*[B-Font]stats\f[]
+Enables the statistics facility.
+See the
+\fIMonitoring\f[] \fIOptions\f[]
+section for further information.
+The default for this flag is
+\f\*[B-Font]disable\f[].
+.RE
+.TP 7
+.NOP \f\*[B-Font]includefile\f[] \f\*[I-Font]includefile\f[]
+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
+\fCntpd\fR(@NTPD_MS@)\f[]
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+.TP 7
+.NOP \f\*[B-Font]logconfig\f[] \f\*[I-Font]configkeyword\f[]
+This command controls the amount and type of output written to
+the system
+\fCsyslog\fR(3)\f[]
+facility or the alternate
+\f\*[B-Font]logfile\f[]
+log file.
+By default, all output is turned on.
+All
+\f\*[I-Font]configkeyword\f[]
+keywords can be prefixed with
+\[oq]=\[cq],
+\[oq]+\[cq]
+and
+\[oq]\-\[cq],
+where
+\[oq]=\[cq]
+sets the
+\fCsyslog\fR(3)\f[]
+priority mask,
+\[oq]+\[cq]
+adds and
+\[oq]\-\[cq]
+removes
+messages.
+\fCsyslog\fR(3)\f[]
+messages can be controlled in four
+classes
+(\f\*[B-Font]clock\f[], \f\*[B-Font]peer\f[], \f\*[B-Font]sys\f[] and \f\*[B-Font]sync\f[]).
+Within these classes four types of messages can be
+controlled: informational messages
+(\f\*[B-Font]info\f[]),
+event messages
+(\f\*[B-Font]events\f[]),
+statistics messages
+(\f\*[B-Font]statistics\f[])
+and
+status messages
+(\f\*[B-Font]status\f[]).
+.sp \n(Ppu
+.ne 2
+
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+\f\*[B-Font]all\f[]
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+\f\*[B-Font]all\f[]
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+.br
+.in +4
+.nf
+logconfig =syncstatus +sysevents
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+This would just list the synchronizations state of
+\fCntpd\fR(@NTPD_MS@)\f[]
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+.br
+.in +4
+.nf
+logconfig =syncall +clockall
+.in -4
+.fi
+.sp \n(Ppu
+.ne 2
+
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+.TP 7
+.NOP \f\*[B-Font]logfile\f[] \f\*[I-Font]logfile\f[]
+This command specifies the location of an alternate log file to
+be used instead of the default system
+\fCsyslog\fR(3)\f[]
+facility.
+This is the same operation as the \-l command line option.
+.TP 7
+.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
+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
+\fIname\f[]\fI=\f[]\f\*[I-Font]value\f[]
+is followed by the
+\f\*[B-Font]default\f[]
+keyword, the
+variable will be listed as part of the default system variables
+(\fCntpq\fR(@NTPQ_MS@)\f[] \f\*[B-Font]rv\f[] 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
+\f\*[B-Font]setvar\f[]
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+\fIsys_var_list\f[]
+holds
+the names of all system variables.
+The
+\fIpeer_var_list\f[]
+holds
+the names of all peer variables and the
+\fIclock_var_list\f[]
+holds the names of the reference clock variables.
+.TP 7
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+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 cannot 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.
+.sp \n(Ppu
+.ne 2
+
+The variables operate as follows:
+.RS
+.TP 7
+.NOP \f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[]
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+.TP 7
+.NOP \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]step\f[] \f\*[I-Font]step\f[]
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+.TP 7
+.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
+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.
+.RE
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+\f\*[B-Font]\-i\f[]
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+\fBmlockall\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.RE
+.TP 7
+.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.TP 7
+.NOP \f\*[B-Font]hop\f[] \f\*[I-Font]...\f[]
+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.
+.PP
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_CONF_<option-name>\fP or \fBNTP_CONF\fP
+.fi
+.ad
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH FILES
+.TP 15
+.NOP \fI/etc/ntp.conf\f[]
+the default name of the configuration file
+.br
+.ns
+.TP 15
+.NOP \fIntp.keys\f[]
+private MD5 keys
+.br
+.ns
+.TP 15
+.NOP \fIntpkey\f[]
+RSA private key
+.br
+.ns
+.TP 15
+.NOP \fIntpkey_\f[]\f\*[I-Font]host\f[]
+RSA public key
+.br
+.ns
+.TP 15
+.NOP \fIntp_dh\f[]
+Diffie-Hellman agreement parameters
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntpd\fR(@NTPD_MS@)\f[],
+\fCntpdc\fR(@NTPDC_MS@)\f[],
+\fCntpq\fR(@NTPQ_MS@)\f[]
+.sp \n(Ppu
+.ne 2
+
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+\f[C]http://www.ntp.org/\f[].
+A snapshot of this documentation is available in HTML format in
+\fI/usr/share/doc/ntp\f[].
+David L. Mills,
+\fINetwork Time Protocol (Version 4)\fR,
+RFC5905
+.PP
+
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+.sp \n(Ppu
+.ne 2
+
+The
+\fIntpkey_\f[]\f\*[I-Font]host\f[]
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+This document was derived from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp.conf\fP
+option definitions.
diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in
new file mode 100644
index 000000000000..01e5901b321c
--- /dev/null
+++ b/ntpd/ntp.conf.mdoc.in
@@ -0,0 +1,2808 @@
+.Dd December 19 2014
+.Dt NTP_CONF 5 File Formats
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.conf.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp.conf
+.Nd Network Time Protocol (NTP) daemon configuration file format
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+configuration file is read at initial startup by the
+.Xr ntpd @NTPD_MS@
+daemon in order to specify the synchronization sources,
+modes and other related information.
+Usually, it is installed in the
+.Pa /etc
+directory,
+but could be installed elsewhere
+(see the daemon's
+.Fl c
+command line option).
+.Pp
+The file format is similar to other
+.Ux
+configuration files.
+Comments begin with a
+.Ql #
+character and extend to the end of the line;
+blank lines are ignored.
+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.
+.Pp
+The rest of this page describes the configuration and control options.
+The
+.Qq Notes on Configuring NTP and Setting up an NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+contains an extended discussion of these options.
+In addition to the discussion of general
+.Sx Configuration Options ,
+there are sections describing the following supported functionality
+and the options used to control it:
+.Bl -bullet -offset indent
+.It
+.Sx Authentication Support
+.It
+.Sx Monitoring Support
+.It
+.Sx Access Control Support
+.It
+.Sx Automatic NTP Configuration Options
+.It
+.Sx Reference Clock Support
+.It
+.Sx Miscellaneous Options
+.El
+.Pp
+Following these is a section describing
+.Sx Miscellaneous Options .
+While there is a rich set of options available,
+the only required option is one or more
+.Ic pool ,
+.Ic server ,
+.Ic peer ,
+.Ic broadcast
+or
+.Ic manycastclient
+commands.
+.Sh Configuration Support
+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 auxiliary commands that specify environmental variables
+that control various related operations.
+.Ss Configuration Commands
+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.
+.Pp
+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 reslist billboard generated
+by ntpdc, IPv6 addresses are automatically generated.
+IPv6 addresses can be identified by the presence of colons
+.Dq \&:
+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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding
+the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+See IPv6 references for the
+equivalent classes for that address family.
+.Bl -tag -width indent
+.It Xo Ic pool Ar address
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic server Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm burst
+.Op Cm iburst
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic peer Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Xc
+.It Xo Ic broadcast Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm ttl Ar ttl
+.Xc
+.It Xo Ic manycastclient Ar address
+.Op Cm key Ar key \&| Cm autokey
+.Op Cm version Ar version
+.Op Cm prefer
+.Op Cm minpoll Ar minpoll
+.Op Cm maxpoll Ar maxpoll
+.Op Cm ttl Ar ttl
+.Xc
+.El
+.Pp
+These five commands specify the time server name or address to
+be used and the mode in which to operate.
+The
+.Ar address
+can be
+either a DNS name or an IP address in dotted\-quad notation.
+Additional information on association behavior can be found in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Bl -tag -width indent
+.It Ic pool
+For type s addresses, this command mobilizes a persistent
+client mode association with a number of remote servers.
+In this mode the local clock can synchronized to the
+remote server, but the remote server can never be synchronized to
+the local clock.
+.It Ic server
+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
+.Em not
+be used for type
+b or m addresses.
+.It Ic peer
+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
+b, m or r addresses.
+.It Ic broadcast
+For type b and m 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.
+In broadcast mode the local server sends periodic broadcast
+messages to a client population at the
+.Ar address
+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
+.Ic broadcastclient
+or
+.Ic multicastclient
+commands
+below.
+.It Ic manycastclient
+For type m 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
+.Ic manycastserver
+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.
+The
+.Ic manycastserver
+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
+.Ar address
+and specifically enabled
+servers respond to these messages.
+The client selects the servers
+providing the best time and continues as with the
+.Ic server
+command.
+The remaining servers are discarded as if never
+heard.
+.El
+.Pp
+Options:
+.Bl -tag -width indent
+.It Cm autokey
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the autokey scheme
+described in
+.Sx Authentication Options .
+.It Cm burst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to improve timekeeping quality
+with the
+.Ic server
+command and s addresses.
+.It Cm iburst
+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 calldelay command to allow
+additional time for a modem or ISDN call to complete.
+This is designed to speed the initial synchronization
+acquisition with the
+.Ic server
+command and s addresses and when
+.Xr ntpd @NTPD_MS@
+is started with the
+.Fl q
+option.
+.It Cm key Ar key
+All packets sent to and received from the server or peer are to
+include authentication fields encrypted using the specified
+.Ar key
+identifier with values from 1 to 65534, inclusive.
+The
+default is to include no encryption field.
+.It Cm minpoll Ar minpoll
+.It Cm maxpoll Ar maxpoll
+These options specify the minimum and maximum poll intervals
+for NTP messages, as a power of 2 in seconds
+The maximum poll
+interval defaults to 10 (1,024 s), but can be increased by the
+.Cm maxpoll
+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
+.Cm minpoll
+option to a lower limit of 4 (16 s).
+.It Cm noselect
+Marks the server as unused, except for display purposes.
+The server is discarded by the selection algroithm.
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm ttl Ar ttl
+This option is used only with broadcast server and manycast
+client modes.
+It specifies the time\-to\-live
+.Ar ttl
+to
+use on broadcast server and multicast server and the maximum
+.Ar ttl
+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.
+.It Cm version Ar version
+Specifies the version number to be used for outgoing NTP
+packets.
+Versions 1\-4 are the choices, with version 4 the
+default.
+.El
+.Ss Auxiliary Commands
+.Bl -tag -width indent
+.It Ic broadcastclient
+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
+.Sx Authentication Options .
+.It Ic manycastserver Ar address ...
+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
+.Sx Authentication Options .
+.It Ic multicastclient Ar address ...
+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
+.Sx Authentication Options .
+.El
+.Sh Authentication Support
+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.
+.Pp
+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.
+.Pp
+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 Building and Installing the Distribution page.
+.Pp
+Authentication is configured separately for each association
+using the
+.Cm key
+or
+.Cm autokey
+subcommand on the
+.Ic peer ,
+.Ic server ,
+.Ic broadcast
+and
+.Ic manycastclient
+configuration commands as described in
+.Sx Configuration Options
+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.
+.Pp
+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
+.Pp
+The
+.Cm auth
+flag controls whether new associations or
+remote configuration commands require cryptographic authentication.
+This flag can be set or reset by the
+.Ic enable
+and
+.Ic disable
+commands and also by remote
+configuration commands sent by a
+.Xr ntpdc @NTPDC_MS@
+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 cryptography.
+If this
+flag is disabled, these operations are effective
+even if not cryptographic
+authenticated.
+It should be understood
+that operating with the
+.Ic auth
+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.
+.Pp
+An attractive alternative where multicast support is available
+is manycast mode, in which clients periodically troll
+for servers as described in the
+.Sx Automatic NTP Configuration Options
+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.
+.Pp
+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
+.Li http://www.ntp.org/ .
+.Ss Symmetric\-Key Cryptography
+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
+.Pa ntp.keys ,
+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
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+utility programs.
+.Pp
+When
+.Xr ntpd @NTPD_MS@
+is first started, it reads the key file specified in the
+.Ic keys
+configuration command and installs the keys
+in the key cache.
+However,
+individual keys must be activated with the
+.Ic trusted
+command before use.
+This
+allows, for instance, the installation of possibly
+several batches of keys and
+then activating or deactivating each batch
+remotely using
+.Xr ntpdc @NTPDC_MS@ .
+This also provides a revocation capability that can be used
+if a key becomes compromised.
+The
+.Ic requestkey
+command selects the key used as the password for the
+.Xr ntpdc @NTPDC_MS@
+utility, while the
+.Ic controlkey
+command selects the key used as the password for the
+.Xr ntpq @NTPQ_MS@
+utility.
+.Ss Public Key Cryptography
+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 Autokey Protocol
+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 Identity Schemes
+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.
+.\" .Pp
+.\" The cryptographic means necessary for all Autokey operations
+.\" is provided by the OpenSSL software library.
+.\" This library is available from http://www.openssl.org/
+.\" and can be installed using the procedures outlined
+.\" in the Building and Installing the Distribution page.
+.\" Once installed,
+.\" the configure and build
+.\" process automatically detects the library and links
+.\" the library routines required.
+.Pp
+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
+.Sx Autonomous Authentication
+page.
+.Pp
+The specific cryptographic environment used by Autokey servers
+and clients is determined by a set of files
+and soft links generated by the
+.Xr ntp\-keygen 1ntpkeygenmdoc
+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
+.Cm md5WithRSAEncryption ,
+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.
+.Pp
+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 subnet will form such that every group host can find
+a trail to at least one trusted host.
+.Ss Naming and Addressing
+It is important to note that Autokey does not use DNS 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 compromise is essential.
+.Pp
+By convention, the name of an Autokey host is the name returned
+by the Unix
+.Xr gethostname 2
+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 aliases, different names
+for each interface, etc., are constrained in any way.
+.Pp
+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 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 servers are operated outside firewall perimeters.
+.Ss Operation
+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.
+.Pp
+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
+.Ic server
+or
+.Ic peer
+configuration command and no
+.Ic key
+or
+.Ic autokey
+subcommands are present, the association is not
+authenticated; if the
+.Ic key
+subcommand is present, the association is authenticated
+using the symmetric key ID specified; if the
+.Ic autokey
+subcommand is present, the association is authenticated
+using Autokey.
+.Pp
+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.
+.Pp
+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.
+.Pp
+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
+.Xr ntpq @NTPQ_MS@
+program.
+.Pp
+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.
+.Pp
+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.
+.Ss Key Management
+The cryptographic values used by the Autokey protocol are
+incorporated as a set of files generated by the
+.Xr ntp\-keygen 1ntpkeygenmdoc
+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
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+utility programs.
+The remaining files are necessary only for the
+Autokey protocol.
+.Pp
+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 (CN) 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
+.Cm trustRoot ; .
+Other extension fields are ignored.
+.Ss Authentication Commands
+.Bl -tag -width indent
+.It Ic autokey Op Ar logsec
+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.
+.It Ic controlkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpq @NTPQ_MS@
+utility, which uses the standard
+protocol defined in RFC\-1305.
+The
+.Ar key
+argument is
+the key identifier for a trusted key, where the value can be in the
+range 1 to 65,534, inclusive.
+.It Xo Ic crypto
+.Op Cm cert Ar file
+.Op Cm leap Ar file
+.Op Cm randfile Ar file
+.Op Cm host Ar file
+.Op Cm sign Ar file
+.Op Cm gq Ar file
+.Op Cm gqpar Ar file
+.Op Cm iffpar Ar file
+.Op Cm mvpar Ar file
+.Op Cm pw Ar password
+.Xc
+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
+.Ic keysdir
+command or default
+.Pa /usr/local/etc .
+Following are the subcommands:
+.Bl -tag -width indent
+.It Cm cert Ar file
+Specifies the location of the required host public certificate file.
+This overrides the link
+.Pa ntpkey_cert_ Ns Ar hostname
+in the keys directory.
+.It Cm gqpar Ar file
+Specifies the location of the optional GQ parameters file.
+This
+overrides the link
+.Pa ntpkey_gq_ Ns Ar hostname
+in the keys directory.
+.It Cm host Ar file
+Specifies the location of the required host key file.
+This overrides
+the link
+.Pa ntpkey_key_ Ns Ar hostname
+in the keys directory.
+.It Cm iffpar Ar file
+Specifies the location of the optional IFF parameters file.This
+overrides the link
+.Pa ntpkey_iff_ Ns Ar hostname
+in the keys directory.
+.It Cm leap Ar file
+Specifies the location of the optional leapsecond file.
+This overrides the link
+.Pa ntpkey_leap
+in the keys directory.
+.It Cm mvpar Ar file
+Specifies the location of the optional MV parameters file.
+This
+overrides the link
+.Pa ntpkey_mv_ Ns Ar hostname
+in the keys directory.
+.It Cm pw Ar password
+Specifies the password to decrypt files containing private keys and
+identity parameters.
+This is required only if these files have been
+encrypted.
+.It Cm randfile Ar file
+Specifies the location of the random seed file used by the OpenSSL
+library.
+The defaults are described in the main text above.
+.It Cm sign Ar file
+Specifies the location of the optional sign key file.
+This overrides
+the link
+.Pa ntpkey_sign_ Ns Ar hostname
+in the keys directory.
+If this file is
+not found, the host key is also the sign key.
+.El
+.It Ic keys Ar keyfile
+Specifies the complete path and location of the MD5 key file
+containing the keys and key identifiers used by
+.Xr ntpd @NTPD_MS@ ,
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+when operating with symmetric key cryptography.
+This is the same operation as the
+.Fl k
+command line option.
+.It Ic keysdir Ar path
+This command specifies the default directory path for
+cryptographic keys, parameters and certificates.
+The default is
+.Pa /usr/local/etc/ .
+.It Ic requestkey Ar key
+Specifies the key identifier to use with the
+.Xr ntpdc @NTPDC_MS@
+utility program, which uses a
+proprietary protocol specific to this implementation of
+.Xr ntpd @NTPD_MS@ .
+The
+.Ar key
+argument is a key identifier
+for the trusted key, where the value can be in the range 1 to
+65,534, inclusive.
+.It Ic revoke Ar logsec
+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.
+.It Ic trustedkey Ar key ...
+Specifies the key identifiers which are trusted for the
+purposes of authenticating peers with symmetric key cryptography,
+as well as keys used by the
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+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
+.Ar key
+arguments are 32\-bit unsigned
+integers with values from 1 to 65,534.
+.El
+.Ss Error Codes
+The following error codes are reported via the NTP control
+and monitoring protocol trap mechanism.
+.Bl -tag -width indent
+.It 101
+.Pq bad field format or length
+The packet has invalid version, length or format.
+.It 102
+.Pq bad timestamp
+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.
+.It 103
+.Pq bad filestamp
+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.
+.It 104
+.Pq bad or missing public key
+The public key is missing, has incorrect format or is an unsupported type.
+.It 105
+.Pq unsupported digest type
+The server requires an unsupported digest/signature scheme.
+.It 106
+.Pq mismatched digest types
+Not used.
+.It 107
+.Pq bad signature length
+The signature length does not match the current public key.
+.It 108
+.Pq signature not verified
+The message fails the signature check.
+It could be bogus or signed by a
+different private key.
+.It 109
+.Pq certificate not verified
+The certificate is invalid or signed with the wrong key.
+.It 110
+.Pq certificate not verified
+The certificate is not yet valid or has expired or the signature could not
+be verified.
+.It 111
+.Pq bad or missing cookie
+The cookie is missing, corrupted or bogus.
+.It 112
+.Pq bad or missing leapseconds table
+The leapseconds table is missing, corrupted or bogus.
+.It 113
+.Pq bad or missing certificate
+The certificate is missing, corrupted or bogus.
+.It 114
+.Pq bad or missing identity
+The identity key is missing, corrupt or bogus.
+.El
+.Sh Monitoring Support
+.Xr ntpd @NTPD_MS@
+includes a comprehensive monitoring facility suitable
+for continuous, long term recording of server and client
+timekeeping performance.
+See the
+.Ic statistics
+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
+.Pa ./scripts
+directory of this distribution.
+Using
+these facilities and
+.Ux
+.Xr cron 8
+jobs, the data can be
+automatically summarized and archived for retrospective analysis.
+.Ss Monitoring Commands
+.Bl -tag -width indent
+.It Ic statistics Ar name ...
+Enables writing of statistics records.
+Currently, eight kinds of
+.Ar name
+statistics are supported.
+.Bl -tag -width indent
+.It Cm clockstats
+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
+.Cm clockstats :
+.Bd -literal
+49213 525.624 127.127.4.1 93 226 00:08:29.606 D
+.Ed
+.Pp
+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.
+.It Cm cryptostats
+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
+.Cm cryptostats :
+.Bd -literal
+49213 525.624 127.127.4.1 message
+.Ed
+.Pp
+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 message field includes the
+message type and certain ancillary information.
+See the
+.Sx Authentication Options
+section for further information.
+.It Cm loopstats
+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
+.Cm loopstats :
+.Bd -literal
+50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
+.Ed
+.Pp
+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.
+.It Cm peerstats
+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
+.Cm peerstats :
+.Bd -literal
+48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
+.Ed
+.Pp
+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.
+.It Cm rawstats
+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
+.Cm rawstats :
+.Bd -literal
+50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
+.Ed
+.Pp
+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.
+.It Cm sysstats
+Enables recording of ntpd statistics counters on a periodic basis.
+Each
+hour a line of the following form is appended to the file generation
+set named
+.Cm sysstats :
+.Bd -literal
+50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
+.Ed
+.Pp
+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.
+.Bl -tag -width indent
+.It Time since restart Cm 36000
+Time in hours since the system was last rebooted.
+.It Packets received Cm 81965
+Total number of packets received.
+.It Packets processed Cm 0
+Number of packets received in response to previous packets sent
+.It Current version Cm 9546
+Number of packets matching the current NTP version.
+.It Previous version Cm 56
+Number of packets matching the previous NTP version.
+.It Bad version Cm 71793
+Number of packets matching neither NTP version.
+.It Access denied Cm 512
+Number of packets denied access for any reason.
+.It Bad length or format Cm 540
+Number of packets with invalid length, format or port number.
+.It Bad authentication Cm 10
+Number of packets not verified as authentic.
+.It Rate exceeded Cm 147
+Number of packets discarded due to rate limitation.
+.El
+.It Cm statsdir Ar directory_path
+Indicates the full path of a directory where statistics files
+should be created (see below).
+This keyword allows
+the (otherwise constant)
+.Cm filegen
+filename prefix to be modified for file generation sets, which
+is useful for handling statistics logs.
+.It Cm filegen Ar name Xo
+.Op Cm file Ar filename
+.Op Cm type Ar typename
+.Op Cm link | nolink
+.Op Cm enable | disable
+.Xc
+Configures setting of generation file set name.
+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 ntpd.
+(Most important: they can be removed to free space for new data
+produced.)
+.Pp
+Note that this command can be sent from the
+.Xr ntpdc @NTPDC_MS@
+program running at a remote location.
+.Bl -tag -width indent
+.It Cm name
+This is the type of the statistics records, as shown in the
+.Cm statistics
+command.
+.It Cm file Ar filename
+This is the file name for the statistics records.
+Filenames of set
+members are built from three concatenated elements
+.Ar Cm prefix ,
+.Ar Cm filename
+and
+.Ar Cm suffix :
+.Bl -tag -width indent
+.It Cm prefix
+This is a constant filename path.
+It is not subject to
+modifications via the
+.Ar filegen
+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
+.Ar loopstats
+and
+.Ar peerstats
+generation can be configured using the
+.Ar statsdir
+option explained above.
+.It Cm filename
+This string is directly concatenated to the prefix mentioned
+above (no intervening
+.Ql / ) .
+This can be modified using
+the file argument to the
+.Ar filegen
+statement.
+No
+.Pa ..
+elements are
+allowed in this component to prevent filenames referring to
+parts outside the filesystem hierarchy denoted by
+.Ar prefix .
+.It Cm suffix
+This part is reflects individual elements of a file set.
+It is
+generated according to the type of a file set.
+.El
+.It Cm type Ar typename
+A file generation set is characterized by its type.
+The following
+types are supported:
+.Bl -tag -width indent
+.It Cm none
+The file set is actually a single plain file.
+.It Cm pid
+One element of file set is used per incarnation of a ntpd
+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
+.Xr ntpd @NTPD_MS@
+server incarnations.
+The set member filename is built by appending a
+.Ql \&.
+to concatenated
+.Ar prefix
+and
+.Ar filename
+strings, and
+appending the decimal representation of the process ID of the
+.Xr ntpd @NTPD_MS@
+server process.
+.It Cm day
+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
+.Ql \&.
+and a day specification in
+the form
+.Cm YYYYMMdd .
+.Cm YYYY
+is a 4\-digit year number (e.g., 1992).
+.Cm MM
+is a two digit month number.
+.Cm dd
+is a two digit day number.
+Thus, all information written at 10 December 1992 would end up
+in a file named
+.Ar prefix
+.Ar filename Ns .19921210 .
+.It Cm week
+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
+.Cm W ,
+and a 2\-digit week number.
+For example, information from January,
+10th 1992 would end up in a file with suffix
+.No . Ns Ar 1992W1 .
+.It Cm month
+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.
+.It Cm year
+One generation file element is generated per year.
+The filename
+suffix consists of a dot and a 4 digit year number.
+.It Cm age
+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
+.Cm a ,
+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
+.Cm enable ;
+output is prevented by specifying
+.Cm disable .
+.El
+.It Cm link | nolink
+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
+.Cm link
+and disabled using
+.Cm nolink .
+If link 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
+.Cm C ,
+and the pid of the ntpd 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.
+.It Cm enable \&| Cm disable
+Enables or disables the recording function.
+.El
+.El
+.El
+.Sh Access Control Support
+The
+.Xr ntpd @NTPD_MS@
+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
+.Qq Notes on Configuring NTP and Setting up a NTP Subnet
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+Clients can be denied service because they are explicitly
+included in the restrict list created by the restrict 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 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.
+.Ss The Kiss\-of\-Death Packet
+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" (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
+.Cm noserve
+or
+.Cm notrust
+flag of the matching restrict list entry is set,
+the code is "DENY"; if the
+.Cm limited
+flag is set and the rate limit
+is exceeded, the code is "RATE".
+Finally, if a cryptographic violation occurs, the code is "CRYP".
+.Pp
+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.
+.Ss Access Control Commands
+.Bl -tag -width indent
+.It Xo Ic discard
+.Op Cm average Ar avg
+.Op Cm minimum Ar min
+.Op Cm monitor Ar prob
+.Xc
+Set the parameters of the
+.Cm limited
+facility which protects the server from
+client abuse.
+The
+.Cm average
+subcommand specifies the minimum average packet
+spacing, while the
+.Cm minimum
+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.
+.It Xo Ic restrict address
+.Op Cm mask Ar mask
+.Op Ar flag ...
+.Xc
+The
+.Ar address
+argument expressed in
+dotted\-quad form is the address of a host or network.
+Alternatively, the
+.Ar address
+argument can be a valid host DNS name.
+The
+.Ar mask
+argument expressed in dotted\-quad form defaults to
+.Cm 255.255.255.255 ,
+meaning that the
+.Ar address
+is treated as the address of an individual host.
+A default entry (address
+.Cm 0.0.0.0 ,
+mask
+.Cm 0.0.0.0 )
+is always included and is always the first entry in the list.
+Note that text string
+.Cm default ,
+with no mask option, may
+be used to indicate the default entry.
+In the current implementation,
+.Cm flag
+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
+categories, 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:
+.Bl -tag -width indent
+.It Cm ignore
+Deny packets of all kinds, including
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+queries.
+.It Cm kod
+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.
+.It Cm limited
+Deny service if the packet spacing violates the lower limits specified
+in the discard command.
+A history of clients is kept using the
+monitoring capability of
+.Xr ntpd @NTPD_MS@ .
+Thus, monitoring is always active as
+long as there is a restriction entry with the
+.Cm limited
+flag.
+.It Cm lowpriotrap
+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.
+.It Cm nomodify
+Deny
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+queries which attempt to modify the state of the
+server (i.e., run time reconfiguration).
+Queries which return
+information are permitted.
+.It Cm noquery
+Deny
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+queries.
+Time service is not affected.
+.It Cm nopeer
+Deny packets which would result in mobilizing a new association.
+This
+includes broadcast and symmetric active packets when a configured
+association does not exist.
+It also includes
+.Cm pool
+associations, so if you want to use servers from a
+.Cm pool
+directive and also want to use
+.Cm nopeer
+by default, you'll want a
+.Cm "restrict source ..." line as well that does
+.It not
+include the
+.Cm nopeer
+directive.
+.It Cm noserve
+Deny all packets except
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+queries.
+.It Cm notrap
+Decline to provide mode 6 control message trap service to matching
+hosts.
+The trap service is a subsystem of the ntpdq control message
+protocol which is intended for use by remote event logging programs.
+.It Cm notrust
+Deny service unless the packet is cryptographically authenticated.
+.It Cm ntpport
+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
+.Cm ntpport
+and
+.Cm non\-ntpport
+may
+be specified.
+The
+.Cm ntpport
+is considered more specific and
+is sorted later in the list.
+.It Cm version
+Deny packets that do not match the current NTP version.
+.El
+.Pp
+Default restriction list entries with the flags ignore, interface,
+ntpport, 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).
+.El
+.Sh Automatic NTP Configuration Options
+.Ss Manycasting
+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 "best"
+of the nearby manycast servers, yet automatically reconfigures
+to sustain this number of servers should one or another fail.
+.Pp
+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.
+.Pp
+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
+.Li http://www.openssl.org/ .
+The library can also be used with other NTPv4 modes
+as well and is highly recommended, especially for broadcast modes.
+.Pp
+A persistent manycast client association is configured
+using the manycastclient command, which is similar to the
+server command but with a multicast (IPv4 class
+.Cm D
+or IPv6 prefix
+.Cm FF )
+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.
+.Pp
+Manycast servers configured with the
+.Ic manycastserver
+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.
+.Pp
+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 "best"
+associations according to stratum and synchronization
+distance.
+The surviving associations then continue
+in ordinary client/server mode.
+.Pp
+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
+.Ic manycastclient ,
+.Ic tos
+and
+.Ic ttl
+configuration commands.
+The manycast poll interval is
+normally eight times the system poll interval,
+which starts out at the
+.Cm minpoll
+value specified in the
+.Ic manycastclient ,
+command and, under normal circumstances, increments to the
+.Cm maxpolll
+value specified in this command.
+Initially, the TTL is
+set at the minimum hops specified by the ttl 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.
+.Pp
+The quality and reliability of the suite of associations
+discovered by the manycast client is determined by the NTP
+mitigation algorithms and the
+.Cm minclock
+and
+.Cm minsane
+values specified in the
+.Ic tos
+configuration command.
+At least
+.Cm minsane
+candidate servers must be available and the mitigation
+algorithms produce at least
+.Cm minclock
+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,
+.Cm minsane
+defaults to 1 and
+.Cm minclock
+defaults to 3.
+For manycast service
+.Cm minsane
+should be explicitly set to 4, assuming at least that
+number of servers are available.
+.Pp
+If at least
+.Cm minclock
+servers are found, the manycast poll interval is immediately
+set to eight times
+.Cm maxpoll .
+If less than
+.Cm minclock
+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
+.Cm maxpoll .
+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.
+.Pp
+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
+.Ic ttl
+configuration command can be
+used to modify the values to match the scope rules.
+.Pp
+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
+.Ic tos
+command can be used to modify this behavior.
+Servers with stratum below
+.Cm floor
+or above
+.Cm ceiling
+specified in the
+.Ic tos
+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
+.Cm minclock .
+.Pp
+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
+.Cm minclock ,
+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
+.Cm maxpoll
+is 12 (4,096 s).
+.Pp
+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
+.Ic multicastclient
+and
+.Ic multicastserver
+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.
+.Pp
+The remaining configuration files for all secondary
+servers and clients have the same contents, except for the
+.Ic tos
+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
+.Cm floor
+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.
+.Pp
+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.
+.Pp
+Some administrators prefer to avoid running
+.Xr ntpd @NTPD_MS@
+continuously and run either
+.Xr ntpdate 8
+or
+.Xr ntpd @NTPD_MS@
+.Fl q
+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
+.Xr ntpd @NTPD_MS@
+.Fl q .
+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.
+.Ss Manycast Interactions with Autokey
+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.
+.Pp
+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.
+.Ss Manycast Options
+.Bl -tag -width indent
+.It Xo Ic tos
+.Oo
+.Cm ceiling Ar ceiling |
+.Cm cohort { 0 | 1 } |
+.Cm floor Ar floor |
+.Cm minclock Ar minclock |
+.Cm minsane Ar minsane
+.Oc
+.Xc
+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:
+.Bl -tag -width indent
+.It Cm ceiling Ar ceiling
+Peers with strata above
+.Cm ceiling
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 15, but can be changed
+to any number from 1 to 15.
+.It Cm cohort Bro 0 | 1 Brc
+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.
+.It Cm floor Ar floor
+Peers with strata below
+.Cm floor
+will be discarded if there are at least
+.Cm minclock
+peers remaining.
+This value defaults to 1, but can be changed
+to any number from 1 to 15.
+.It Cm minclock Ar minclock
+The clustering algorithm repeatedly casts out outlyer
+associations until no more than
+.Cm minclock
+associations remain.
+This value defaults to 3,
+but can be changed to any number from 1 to the number of
+configured sources.
+.It Cm minsane Ar minsane
+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,
+.Cm minsane
+should be at least 4 in order to detect and discard
+a single falseticker.
+.El
+.It Cm ttl Ar hop ...
+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.
+.El
+.Sh Reference Clock Support
+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
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Additional information can be found in the pages linked
+there, including the
+.Qq Debugging Hints for Reference Clock Drivers
+and
+.Qq How To Write a Reference Clock Driver
+pages
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+In addition, support for a PPS
+signal is available as described in the
+.Qq Pulse\-per\-second (PPS) Signal Interfacing
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+Many
+drivers support special line discipline/streams modules which can
+significantly improve the accuracy using the driver.
+These are
+described in the
+.Qq Line Disciplines and Streams Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.Pp
+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.
+.Pp
+For the purposes of configuration,
+.Xr ntpd @NTPD_MS@
+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
+.Sm off
+.Li 127.127. Ar t . Ar u ,
+.Sm on
+where
+.Ar t
+is an integer
+denoting the clock type and
+.Ar u
+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.
+.Pp
+The
+.Ic server
+command is used to configure a reference
+clock, where the
+.Ar address
+argument in that command
+is the clock address.
+The
+.Cm key ,
+.Cm version
+and
+.Cm ttl
+options are not used for reference clock support.
+The
+.Cm mode
+option is added for reference clock support, as
+described below.
+The
+.Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page.
+The
+.Cm minpoll
+and
+.Cm maxpoll
+options have
+meaning only for selected clock drivers.
+See the individual clock
+driver document pages for additional information.
+.Pp
+The
+.Ic fudge
+command is used to provide additional
+information for individual clock drivers and normally follows
+immediately after the
+.Ic server
+command.
+The
+.Ar address
+argument specifies the clock address.
+The
+.Cm refid
+and
+.Cm stratum
+options 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
+.Ic fudge
+command as well.
+.Pp
+The stratum number of a reference clock is by default zero.
+Since the
+.Xr ntpd @NTPD_MS@
+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
+.Cm stratum
+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
+.Cm refid
+option is used for this purpose.
+Except where noted,
+these options apply to all clock drivers.
+.Ss Reference Clock Commands
+.Bl -tag -width indent
+.It Xo Ic server
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm prefer
+.Op Cm mode Ar int
+.Op Cm minpoll Ar int
+.Op Cm maxpoll Ar int
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+The options are interpreted as follows:
+.Bl -tag -width indent
+.It Cm prefer
+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
+.Qq Mitigation Rules and the prefer Keyword
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+for further information.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm minpoll Ar int
+.It Cm maxpoll Ar int
+These options specify the minimum and maximum polling interval
+for reference clock messages, as a power of 2 in seconds
+For
+most directly connected reference clocks, both
+.Cm minpoll
+and
+.Cm maxpoll
+default to 6 (64 s).
+For modem reference clocks,
+.Cm minpoll
+defaults to 10 (17.1 m) and
+.Cm maxpoll
+defaults to 14 (4.5 h).
+The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
+.El
+.It Xo Ic fudge
+.Sm off
+.Li 127.127. Ar t . Ar u
+.Sm on
+.Op Cm time1 Ar sec
+.Op Cm time2 Ar sec
+.Op Cm stratum Ar int
+.Op Cm refid Ar string
+.Op Cm mode Ar int
+.Op Cm flag1 Cm 0 \&| Cm 1
+.Op Cm flag2 Cm 0 \&| Cm 1
+.Op Cm flag3 Cm 0 \&| Cm 1
+.Op Cm flag4 Cm 0 \&| Cm 1
+.Xc
+This command can be used to configure reference clocks in
+special ways.
+It must immediately follow the
+.Ic server
+command which configures the driver.
+Note that the same capability
+is possible at run time using the
+.Xr ntpdc @NTPDC_MS@
+program.
+The options are interpreted as
+follows:
+.Bl -tag -width indent
+.It Cm time1 Ar sec
+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.
+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
+.Ic enable
+command described in
+.Sx Miscellaneous Options
+page and operates as described in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm time2 Ar secs
+Specifies a fixed\-point decimal number in seconds, which is
+interpreted in a driver\-dependent way.
+See the descriptions of
+specific drivers in the
+.Qq Reference Clock Drivers
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+.It Cm stratum Ar int
+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.
+.It Cm refid Ar string
+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.
+.It Cm mode Ar int
+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
+parse
+drivers.
+.It Cm flag1 Cm 0 \&| Cm 1
+.It Cm flag2 Cm 0 \&| Cm 1
+.It Cm flag3 Cm 0 \&| Cm 1
+.It Cm flag4 Cm 0 \&| Cm 1
+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
+.Cm flag4
+is used to enable recording monitoring
+data to the
+.Cm clockstats
+file configured with the
+.Ic filegen
+command.
+Further information on the
+.Ic filegen
+command can be found in
+.Sx Monitoring Options .
+.El
+.El
+.Sh Miscellaneous Options
+.Bl -tag -width indent
+.It Ic broadcastdelay Ar seconds
+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.
+.It Ic calldelay Ar delay
+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.
+.It Ic driftfile Ar driftfile
+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
+.Fl f
+command line 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.
+.Pp
+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
+.Xr ntpd @NTPD_MS@
+must have write permission for the directory the
+drift file is located in, and that file system links, symbolic or
+otherwise, should be avoided.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm mode7 | monitor |
+.Cm ntp | Cm stats
+.Oc
+.Xc
+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
+.Xr ntpdc @NTPDC_MS@
+utility program.
+.Bl -tag -width indent
+.It Cm auth
+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
+.Ic enable .
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the
+.Ic multicastclient
+command with default
+address.
+The default for this flag is
+.Ic disable .
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for
+this flag is
+.Ic disable .
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this
+flag is
+.Ic enable
+if support is available, otherwise
+.Ic disable .
+.It Cm mode7
+Enables processing of NTP mode 7 implementation\-specific requests
+which are used by the deprecated
+.Xr ntpdc @NTPDC_MS@
+program.
+The default for this flag is disable.
+This flag is excluded from runtime configuration using
+.Xr ntpq @NTPQ_MS@ .
+The
+.Xr ntpq @NTPQ_MS@
+program provides the same capabilities as
+.Xr ntpdc @NTPDC_MS@
+using standard mode 6 requests.
+.It Cm monitor
+Enables the monitoring facility.
+See the
+.Xr ntpdc @NTPDC_MS@
+program
+and the
+.Ic monlist
+command or further information.
+The
+default for this flag is
+.Ic enable .
+.It Cm ntp
+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
+.Ic enable .
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section for further information.
+The default for this flag is
+.Ic disable .
+.El
+.It Ic includefile Ar includefile
+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
+.Xr ntpd @NTPD_MS@
+on multiple hosts, with (mostly) common options (e.g., a
+restriction list).
+.It Ic logconfig Ar configkeyword
+This command controls the amount and type of output written to
+the system
+.Xr syslog 3
+facility or the alternate
+.Ic logfile
+log file.
+By default, all output is turned on.
+All
+.Ar configkeyword
+keywords can be prefixed with
+.Ql = ,
+.Ql +
+and
+.Ql \- ,
+where
+.Ql =
+sets the
+.Xr syslog 3
+priority mask,
+.Ql +
+adds and
+.Ql \-
+removes
+messages.
+.Xr syslog 3
+messages can be controlled in four
+classes
+.Po
+.Cm clock ,
+.Cm peer ,
+.Cm sys
+and
+.Cm sync
+.Pc .
+Within these classes four types of messages can be
+controlled: informational messages
+.Po
+.Cm info
+.Pc ,
+event messages
+.Po
+.Cm events
+.Pc ,
+statistics messages
+.Po
+.Cm statistics
+.Pc
+and
+status messages
+.Po
+.Cm status
+.Pc .
+.Pp
+Configuration keywords are formed by concatenating the message class with
+the event class.
+The
+.Cm all
+prefix can be used instead of a message class.
+A
+message class may also be followed by the
+.Cm all
+keyword to enable/disable all
+messages of the respective message class.Thus, a minimal log configuration
+could look like this:
+.Bd -literal
+logconfig =syncstatus +sysevents
+.Ed
+.Pp
+This would just list the synchronizations state of
+.Xr ntpd @NTPD_MS@
+and the major system events.
+For a simple reference server, the
+following minimum message configuration could be useful:
+.Bd -literal
+logconfig =syncall +clockall
+.Ed
+.Pp
+This configuration will list all clock information and
+synchronization information.
+All other events and messages about
+peers, system events and so on is suppressed.
+.It Ic logfile Ar logfile
+This command specifies the location of an alternate log file to
+be used instead of the default system
+.Xr syslog 3
+facility.
+This is the same operation as the \-l command line option.
+.It Ic setvar Ar variable Op Cm default
+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
+.Sm off
+.Va name = Ar value
+.Sm on
+is followed by the
+.Cm default
+keyword, the
+variable will be listed as part of the default system variables
+.Po
+.Xr ntpq @NTPQ_MS@
+.Ic rv
+command
+.Pc ) .
+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
+.Ic setvar
+mechanism.
+There are three special variables that contain the names
+of all variable of the same group.
+The
+.Va sys_var_list
+holds
+the names of all system variables.
+The
+.Va peer_var_list
+holds
+the names of all peer variables and the
+.Va clock_var_list
+holds the names of the reference clock variables.
+.It Xo Ic tinker
+.Oo
+.Cm allan Ar allan |
+.Cm dispersion Ar dispersion |
+.Cm freq Ar freq |
+.Cm huffpuff Ar huffpuff |
+.Cm panic Ar panic |
+.Cm step Ar srep |
+.Cm stepout Ar stepout
+.Oc
+.Xc
+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 cannot 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.
+.Pp
+The variables operate as follows:
+.Bl -tag -width indent
+.It Cm allan Ar allan
+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.
+.It Cm dispersion Ar dispersion
+The argument becomes the new value for the dispersion increase rate,
+normally .000015 s/s.
+.It Cm freq Ar freq
+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.
+.It Cm huffpuff Ar huffpuff
+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.
+.It Cm panic Ar panic
+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.
+.It Cm step Ar step
+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: The kernel time discipline is
+disabled if the step threshold is set to zero or greater than the
+default.
+.It Cm stepout Ar stepout
+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.
+.El
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that can be allocated.
+Probably only available under Linux, this option is useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.El
+.It Xo Ic trap Ar host_address
+.Op Cm port Ar port_number
+.Op Cm interface Ar interface_address
+.Xc
+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.
+.Pp
+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.
+.It Cm hop Ar ...
+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.
+.El
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_CONF_<option\-name>\fP or \fBNTP_CONF\fP
+.fi
+.ad
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa ntp.keys
+private MD5 keys
+.It Pa ntpkey
+RSA private key
+.It Pa ntpkey_ Ns Ar host
+RSA public key
+.It Pa ntp_dh
+Diffie\-Hellman agreement parameters
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntpd @NTPD_MS@ ,
+.Xr ntpdc @NTPDC_MS@ ,
+.Xr ntpq @NTPQ_MS@
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 4)
+.%O RFC5905
+.Re
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The syntax checking is not picky; some combinations of
+ridiculous and even hilarious options and modes may not be
+detected.
+.Pp
+The
+.Pa ntpkey_ Ns Ar host
+files are really digital
+certificates.
+These should be obtained via secure directory
+services when they become universally available.
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+This document was derived from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.conf\fP
+option definitions.
diff --git a/ntpd/ntp.conf.texi b/ntpd/ntp.conf.texi
new file mode 100644
index 000000000000..fb1a7ab0f74c
--- /dev/null
+++ b/ntpd/ntp.conf.texi
@@ -0,0 +1,49 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntp.conf.info
+@settitle NTP Configuration File User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's NTP configuration file,
+version @value{VERSION}, @value{UPDATED}.
+@end ifinfo
+
+@direntry
+* ntp.conf: (ntp.conf). NTP's configuration file
+@end direntry
+
+@titlepage
+@title NTP's Configuration File User's Manual
+@subtitle ntp.conf, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntp.conf Description, (dir), (dir)
+@top NTP's Configuration File User Manual
+
+This document describes the configuration file for the NTP Project's
+@code{ntpd} program.
+
+This document applies to version @value{VERSION} of @code{ntp.conf}.
+
+@shortcontents
+
+@menu
+* ntp.conf Description::
+* ntp.conf Notes::
+@end menu
+
+@node ntp.conf Description, , Top, Top
+@comment node-name, next, previous, up
+@section Description
+
+The behavior of @code{ntpd} can be changed by a configuration file,
+by default @code{ntp.conf}.
+
+@include invoke-ntp.conf.texi
diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man
new file mode 100644
index 000000000000..e6e57f7f0205
--- /dev/null
+++ b/ntpd/ntp.keys.5man
@@ -0,0 +1,173 @@
+.TH ntp.keys 5man "19 Dec 2014" "4.2.8" "File Formats"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (ntp.man)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:54 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.keys.def
+.\" and the template file agman-file.tpl
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.\"
+.SH NAME
+ntp.keys \- NTP symmetric key file format configuration file
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.SH SYNOPSIS
+\f\*[B-Font]\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+"Authentication Support"
+section of the
+\fCntp.conf\fR(5)\f[]
+page.
+.sp \n(Ppu
+.ne 2
+
+\fCntpd\fR(8)\f[]
+reads its keys from a file specified using the
+\f\*[B-Font]\-k\f[]
+command line option or the
+\f\*[B-Font]keys\f[]
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+.sp \n(Ppu
+.ne 2
+
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+.sp \n(Ppu
+.ne 2
+
+.in +4
+\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
+.in -4
+.sp \n(Ppu
+.ne 2
+
+where
+\f\*[I-Font]keyno\f[]
+is a positive integer (between 1 and 65534),
+\f\*[I-Font]type\f[]
+is the message digest algorithm,
+and
+\f\*[I-Font]key\f[]
+is the key itself.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[I-Font]key\f[]
+may be given in a format
+controlled by the
+\f\*[I-Font]type\f[]
+field.
+The
+\f\*[I-Font]type\f[]
+\f[C]MD5\f[]
+is always supported.
+If
+\f[C]ntpd\f[]
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140-2 is required the
+\f\*[I-Font]type\f[]
+must be either
+\f[C]SHA\f[]
+or
+\f[C]SHA1\f[].
+.sp \n(Ppu
+.ne 2
+
+What follows are some key types, and corresponding formats:
+.sp \n(Ppu
+.ne 2
+
+.TP 7
+.NOP \f[C]MD5\f[]
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+\f[C]#\f[]
+(which is the "start of comment" character).
+.sp \n(Ppu
+.ne 2
+
+.br
+.ns
+.TP 7
+.NOP \f[C]SHA\f[]
+.br
+.ns
+.TP 7
+.NOP \f[C]SHA1\f[]
+.br
+.ns
+.TP 7
+.NOP \f[C]RMD160\f[]
+The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+.PP
+.sp \n(Ppu
+.ne 2
+
+Note that the keys used by the
+\fCntpq\fR(8)\f[]
+and
+\fCntpdc\fR(8)\f[]
+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.
+.SH FILES
+.TP 14
+.NOP \fI/etc/ntp.keys\f[]
+the default name of the configuration file
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpd\fR(1ntpdmdoc)\f[],
+\fCntpdate\fR(1ntpdatemdoc)\f[],
+\fCntpdc\fR(1ntpdcmdoc)\f[],
+\fCsntp\fR(1sntpmdoc)\f[]
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+This document was derived from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp.keys\fP
+option definitions.
diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc
new file mode 100644
index 000000000000..f67c3198f2f6
--- /dev/null
+++ b/ntpd/ntp.keys.5mdoc
@@ -0,0 +1,158 @@
+.Dd December 19 2014
+.Dt NTP_KEYS 5mdoc File Formats
+.Os SunOS 5.10
+.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:12 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.keys.def
+.\" and the template file agmdoc-file.tpl
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+.Qq Authentication Support
+section of the
+.Xr ntp.conf 5
+page.
+.Pp
+.Xr ntpd 8
+reads its keys from a file specified using the
+.Fl k
+command line option or the
+.Ic keys
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+.Pp
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+.Pp
+.D1 Ar keyno type key
+.Pp
+where
+.Ar keyno
+is a positive integer (between 1 and 65534),
+.Ar type
+is the message digest algorithm,
+and
+.Ar key
+is the key itself.
+.Pp
+The
+.Ar key
+may be given in a format
+controlled by the
+.Ar type
+field.
+The
+.Ar type
+.Li MD5
+is always supported.
+If
+.Li ntpd
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140\-2 is required the
+.Ar type
+must be either
+.Li SHA
+or
+.Li SHA1 .
+.Pp
+What follows are some key types, and corresponding formats:
+.Pp
+.Bl -tag -width RMD160 -compact
+.It Li MD5
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+.Li #
+(which is the "start of comment" character).
+.Pp
+.It Li SHA
+.It Li SHA1
+.It Li RMD160
+The key is a hex\-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+.El
+.Pp
+Note that the keys used by the
+.Xr ntpq 8
+and
+.Xr ntpdc 8
+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.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_KEYS_<option\-name>\fP or \fBNTP_KEYS\fP
+.fi
+.ad
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.keys -compact
+.It Pa /etc/ntp.keys
+the default name of the configuration file
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpdate 1ntpdatemdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr sntp 1sntpmdoc
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+This document was derived from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.keys\fP
+option definitions.
diff --git a/ntpd/ntp.keys.def b/ntpd/ntp.keys.def
new file mode 100644
index 000000000000..dcb3d55ead9a
--- /dev/null
+++ b/ntpd/ntp.keys.def
@@ -0,0 +1,152 @@
+/* -*- Mode: Text -*- */
+
+autogen definitions options;
+
+#include copyright.def
+#include version.def
+
+// We want the synopsis to be "/etc/ntp.keys" but we need the prog-name
+// to be ntp.keys - the latter is also how autogen produces the output
+// file name.
+prog-name = "ntp.keys";
+file-path = "/etc/ntp.keys";
+prog-title = "NTP symmetric key file format";
+
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+.Qq Authentication Support
+section of the
+.Xr ntp.conf 5
+page.
+.Pp
+.Xr ntpd 8
+reads its keys from a file specified using the
+.Fl k
+command line option or the
+.Ic keys
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+.Pp
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+.Pp
+.D1 Ar keyno type key
+.Pp
+where
+.Ar keyno
+is a positive integer (between 1 and 65534),
+.Ar type
+is the message digest algorithm,
+and
+.Ar key
+is the key itself.
+.Pp
+The
+.Ar key
+may be given in a format
+controlled by the
+.Ar type
+field.
+The
+.Ar type
+.Li MD5
+is always supported.
+If
+.Li ntpd
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140-2 is required the
+.Ar type
+must be either
+.Li SHA
+or
+.Li SHA1 .
+.Pp
+What follows are some key types, and corresponding formats:
+.Pp
+.Bl -tag -width RMD160 -compact
+.It Li MD5
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+.Li #
+(which is the "start of comment" character).
+.Pp
+.It Li SHA
+.It Li SHA1
+.It Li RMD160
+The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+.El
+.Pp
+Note that the keys used by the
+.Xr ntpq 8
+and
+.Xr ntpdc 8
+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.
+ _END_PROG_MDOC_DESCRIP;
+};
+
+doc-section = {
+ ds-type = 'FILES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_FILES
+.Bl -tag -width /etc/ntp.keys -compact
+.It Pa /etc/ntp.keys
+the default name of the configuration file
+.El
+ _END_MDOC_FILES;
+};
+
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_SEE_ALSO
+.Xr ntp.conf 5 ,
+.Xr ntpd 1ntpdmdoc ,
+.Xr ntpdate 1ntpdatemdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr sntp 1sntpmdoc
+ _END_MDOC_SEE_ALSO;
+};
+
+/*
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+.Xr ntpd 8
+has gotten rather fat.
+While not huge, it has gotten larger than might
+be desirable for an elevated-priority daemon 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.
+ _END_MDOC_BUGS;
+};
+*/
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+This document was derived from FreeBSD.
+ _END_MDOC_NOTES;
+};
diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html
new file mode 100644
index 000000000000..cbeee1961053
--- /dev/null
+++ b/ntpd/ntp.keys.html
@@ -0,0 +1,200 @@
+<html lang="en">
+<head>
+<title>NTP Symmetric Key</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="NTP Symmetric Key">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">NTP Symmetric Key</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Description">ntp.keys Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">NTP's Symmetric Key File User Manual</h2>
+
+<p>This document describes the symmetric key file for the NTP Project's
+<code>ntpd</code> program.
+
+ <p>This document applies to version 4.2.8 of <code>ntp.keys</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">NTP's Symmetric Key File User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002ekeys-Description">ntp.keys Description</a>
+<li><a accesskey="2" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002ekeys-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>The name and location of the symmetric key file for <code>ntpd</code> can
+be specified in a configuration file, by default <code>/etc/ntp.keys</code>.
+
+<div class="node">
+<p><hr>
+<a name="ntp_002ekeys-Notes"></a>
+<br>
+</div>
+
+<h3 class="section">Notes about ntp.keys</h3>
+
+<p><a name="index-ntp_002ekeys-1"></a><a name="index-NTP-symmetric-key-file-format-2"></a>
+
+ <p>This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+"Authentication Support"
+section of the
+<code>ntp.conf(5)</code>
+page.
+
+ <p><code>ntpd(8)</code>
+reads its keys from a file specified using the
+<code>-k</code>
+command line option or the
+<code>keys</code>
+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 keys numbered between 1 and 65534
+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
+
+<pre class="example"> <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd>
+</pre>
+ <p>where
+<kbd>keyno</kbd>
+is a positive integer (between 1 and 65534),
+<kbd>type</kbd>
+is the message digest algorithm,
+and
+<kbd>key</kbd>
+is the key itself.
+
+ <p>The
+<kbd>key</kbd>
+may be given in a format
+controlled by the
+<kbd>type</kbd>
+field.
+The
+<kbd>type</kbd>
+<code>MD5</code>
+is always supported.
+If
+<code>ntpd</code>
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140-2 is required the
+<kbd>type</kbd>
+must be either
+<code>SHA</code>
+or
+<code>SHA1</code>.
+
+ <p>What follows are some key types, and corresponding formats:
+
+ <dl>
+<dt><code>MD5</code><dd>The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+<code>#</code>
+(which is the "start of comment" character).
+
+ <br><dt><code>SHA</code><br><dt><code>SHA1</code><br><dt><code>RMD160</code><dd>The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+</dl>
+
+ <p>Note that the keys used by the
+<code>ntpq(8)</code>
+and
+<code>ntpdc(8)</code>
+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>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002ekeys-Files">ntp.keys Files</a>: Files
+<li><a accesskey="2" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>: See Also
+<li><a accesskey="3" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>: Notes
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002ekeys-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.keys Files</h4>
+
+ <dl>
+<dt><span class="file">/etc/ntp.keys</span><dd>the default name of the configuration file
+</dl>
+<div class="node">
+<p><hr>
+<a name="ntp_002ekeys-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-Files">ntp.keys Files</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.keys See Also</h4>
+
+<p><code>ntp.conf(5)</code>,
+<code>ntpd(1ntpdmdoc)</code>,
+<code>ntpdate(1ntpdatemdoc)</code>,
+<code>ntpdc(1ntpdcmdoc)</code>,
+<code>sntp(1sntpmdoc)</code>
+<div class="node">
+<p><hr>
+<a name="ntp_002ekeys-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp.keys Notes</h4>
+
+<p>This document was derived from FreeBSD.
+
+</body></html>
+
diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in
new file mode 100644
index 000000000000..6df8dff45f00
--- /dev/null
+++ b/ntpd/ntp.keys.man.in
@@ -0,0 +1,173 @@
+.TH ntp.keys 5 "19 Dec 2014" "4.2.8" "File Formats"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (ntp.man)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:54 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.keys.def
+.\" and the template file agman-file.tpl
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.\"
+.SH NAME
+ntp.keys \- NTP symmetric key file format configuration file
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.SH SYNOPSIS
+\f\*[B-Font]\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+"Authentication Support"
+section of the
+\fCntp.conf\fR(5)\f[]
+page.
+.sp \n(Ppu
+.ne 2
+
+\fCntpd\fR(8)\f[]
+reads its keys from a file specified using the
+\f\*[B-Font]\-k\f[]
+command line option or the
+\f\*[B-Font]keys\f[]
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+.sp \n(Ppu
+.ne 2
+
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+.sp \n(Ppu
+.ne 2
+
+.in +4
+\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
+.in -4
+.sp \n(Ppu
+.ne 2
+
+where
+\f\*[I-Font]keyno\f[]
+is a positive integer (between 1 and 65534),
+\f\*[I-Font]type\f[]
+is the message digest algorithm,
+and
+\f\*[I-Font]key\f[]
+is the key itself.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[I-Font]key\f[]
+may be given in a format
+controlled by the
+\f\*[I-Font]type\f[]
+field.
+The
+\f\*[I-Font]type\f[]
+\f[C]MD5\f[]
+is always supported.
+If
+\f[C]ntpd\f[]
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140-2 is required the
+\f\*[I-Font]type\f[]
+must be either
+\f[C]SHA\f[]
+or
+\f[C]SHA1\f[].
+.sp \n(Ppu
+.ne 2
+
+What follows are some key types, and corresponding formats:
+.sp \n(Ppu
+.ne 2
+
+.TP 7
+.NOP \f[C]MD5\f[]
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+\f[C]#\f[]
+(which is the "start of comment" character).
+.sp \n(Ppu
+.ne 2
+
+.br
+.ns
+.TP 7
+.NOP \f[C]SHA\f[]
+.br
+.ns
+.TP 7
+.NOP \f[C]SHA1\f[]
+.br
+.ns
+.TP 7
+.NOP \f[C]RMD160\f[]
+The key is a hex-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+.PP
+.sp \n(Ppu
+.ne 2
+
+Note that the keys used by the
+\fCntpq\fR(8)\f[]
+and
+\fCntpdc\fR(8)\f[]
+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.
+.SH FILES
+.TP 14
+.NOP \fI/etc/ntp.keys\f[]
+the default name of the configuration file
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpd\fR(@NTPD_MS@)\f[],
+\fCntpdate\fR(@NTPDATE_MS@)\f[],
+\fCntpdc\fR(@NTPDC_MS@)\f[],
+\fCsntp\fR(@SNTP_MS@)\f[]
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+This document was derived from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp.keys\fP
+option definitions.
diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in
new file mode 100644
index 000000000000..b2906fb96941
--- /dev/null
+++ b/ntpd/ntp.keys.mdoc.in
@@ -0,0 +1,158 @@
+.Dd December 19 2014
+.Dt NTP_KEYS 5 File Formats
+.Os SunOS 5.10
+.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:12 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp.keys.def
+.\" and the template file agmdoc-file.tpl
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+.Qq Authentication Support
+section of the
+.Xr ntp.conf 5
+page.
+.Pp
+.Xr ntpd 8
+reads its keys from a file specified using the
+.Fl k
+command line option or the
+.Ic keys
+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 keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
+.Pp
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
+.Pp
+.D1 Ar keyno type key
+.Pp
+where
+.Ar keyno
+is a positive integer (between 1 and 65534),
+.Ar type
+is the message digest algorithm,
+and
+.Ar key
+is the key itself.
+.Pp
+The
+.Ar key
+may be given in a format
+controlled by the
+.Ar type
+field.
+The
+.Ar type
+.Li MD5
+is always supported.
+If
+.Li ntpd
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140\-2 is required the
+.Ar type
+must be either
+.Li SHA
+or
+.Li SHA1 .
+.Pp
+What follows are some key types, and corresponding formats:
+.Pp
+.Bl -tag -width RMD160 -compact
+.It Li MD5
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
+or
+a
+.Li #
+(which is the "start of comment" character).
+.Pp
+.It Li SHA
+.It Li SHA1
+.It Li RMD160
+The key is a hex\-encoded ASCII string of 40 characters,
+which is truncated as necessary.
+.El
+.Pp
+Note that the keys used by the
+.Xr ntpq 8
+and
+.Xr ntpdc 8
+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.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTP_KEYS_<option\-name>\fP or \fBNTP_KEYS\fP
+.fi
+.ad
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.keys -compact
+.It Pa /etc/ntp.keys
+the default name of the configuration file
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpd @NTPD_MS@ ,
+.Xr ntpdate @NTPDATE_MS@ ,
+.Xr ntpdc @NTPDC_MS@ ,
+.Xr sntp @SNTP_MS@
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+This document was derived from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.keys\fP
+option definitions.
diff --git a/ntpd/ntp.keys.texi b/ntpd/ntp.keys.texi
new file mode 100644
index 000000000000..1fc7b5c51801
--- /dev/null
+++ b/ntpd/ntp.keys.texi
@@ -0,0 +1,49 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntp.keys.info
+@settitle NTP Symmetric Key
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the NTP Project's NTP Symmetric Key file,
+version @value{VERSION}, @value{UPDATED}.
+@end ifinfo
+
+@direntry
+* ntp.keys: (ntp.keys). NTP's Symmetric Key file
+@end direntry
+
+@titlepage
+@title NTP's Symmetric Key File User's Manual
+@subtitle ntp.keys, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntp.keys Description, (dir), (dir)
+@top NTP's Symmetric Key File User Manual
+
+This document describes the symmetric key file for the NTP Project's
+@code{ntpd} program.
+
+This document applies to version @value{VERSION} of @code{ntp.keys}.
+
+@shortcontents
+
+@menu
+* ntp.keys Description::
+* ntp.keys Notes::
+@end menu
+
+@node ntp.keys Description, , Top, Top
+@comment node-name, next, previous, up
+@section Description
+
+The name and location of the symmetric key file for @code{ntpd} can
+be specified in a configuration file, by default @code{/etc/ntp.keys}.
+
+@include invoke-ntp.keys.texi
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index db9682a74cbd..0f48983f82e5 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -17,26 +17,6 @@
# include <netinfo/ni.h>
#endif
-#include "ntp.h"
-#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_assert.h"
-#include "ntpd-opts.h"
-/*
- * Sim header. Currently unconditionally included
- * PDMXXX This needs to be a conditional include
- */
-#include "ntpsim.h"
-
-#include <ntp_random.h>
-#include "ntp_intres.h"
-#include <isc/net.h>
-#include <isc/result.h>
-
#include <stdio.h>
#include <ctype.h>
#ifdef HAVE_SYS_PARAM_H
@@ -46,31 +26,43 @@
#ifndef SIGCHLD
# define SIGCHLD SIGCLD
#endif
-#if !defined(VMS)
-# ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-# endif
-#endif /* VMS */
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
-#ifdef SYS_WINNT
-# include <io.h>
-HANDLE ResolverEventHandle;
-#else
-int resolver_pipe_fd[2]; /* used to let the resolver process alert the parent process */
-#endif /* SYS_WINNT */
+#include <isc/net.h>
+#include <isc/result.h>
+#include "ntp.h"
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_refclock.h"
+#include "ntp_filegen.h"
+#include "ntp_stdlib.h"
+#include "lib_strbuf.h"
+#include "ntp_assert.h"
+#include "ntp_random.h"
/*
* [Bug 467]: Some linux headers collide with CONFIG_PHONE and CONFIG_KEYS
* so #include these later.
*/
-
#include "ntp_config.h"
#include "ntp_cmdargs.h"
-
#include "ntp_scanner.h"
#include "ntp_parser.h"
-#include "ntp_data_structures.h"
+#include "ntpd-opts.h"
+
+
+/* Bison still(!) does not emit usable prototypes for the calling code */
+int yyparse (struct FILE_INFO *ip_file);
+
+/* list of servers from command line for config_peers() */
+int cmdline_server_count;
+char ** cmdline_servers;
+/* set to zero if admin doesn't want memory locked */
+int do_memlock = 1;
/*
* "logconfig" building blocks
@@ -113,6 +105,19 @@ static struct masks logcfg_class_items[] = {
{ NULL, 0 }
};
+typedef struct peer_resolved_ctx_tag {
+ int flags;
+ int host_mode; /* T_* token identifier */
+ u_short family;
+ keyid_t keyid;
+ u_char hmode; /* MODE_* */
+ u_char version;
+ u_char minpoll;
+ u_char maxpoll;
+ u_int32 ttl;
+ const char * group;
+} peer_resolved_ctx;
+
/* Limits */
#define MAXPHONE 10 /* maximum number of phone strings */
#define MAXPPS 20 /* maximum length of PPS device string */
@@ -120,22 +125,8 @@ static struct masks logcfg_class_items[] = {
/*
* 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)
-
-/*
- * File descriptor used by the resolver save routines, and temporary file
- * name.
- */
-int call_resolver = 1; /* ntp-genkeys sets this to 0, for example */
-#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
@@ -143,9 +134,8 @@ static char res_file[MAX_PATH];
extern int yydebug; /* ntp_parser.c (.y) */
int curr_include_level; /* The current include level */
struct FILE_INFO *fp[MAXINCLUDELEVEL+1];
-FILE *res_fp;
-struct config_tree cfgt; /* Parser output stored here */
-struct config_tree *cfg_tree_history = NULL; /* History of configs */
+config_tree cfgt; /* Parser output stored here */
+struct config_tree_tag *cfg_tree_history; /* History of configs */
char *sys_phone[MAXPHONE] = {NULL}; /* ACTS phone numbers */
char default_keysdir[] = NTP_KEYSDIR;
char *keysdir = default_keysdir; /* crypto keys directory */
@@ -156,7 +146,7 @@ int config_priority;
#endif
const char *config_file;
-char default_ntp_signd_socket[] =
+static char default_ntp_signd_socket[] =
#ifdef NTP_SIGND_PATH
NTP_SIGND_PATH;
#else
@@ -183,7 +173,7 @@ struct netinfo_config_state {
ni_id config_dir; /* ID config dir */
int prop_index; /* current property */
int val_index; /* current value */
- char **val_list; /* value list */
+ char **val_list; /* value list */
};
#endif
@@ -201,12 +191,7 @@ int old_config_style = 1; /* A boolean flag, which when set,
*/
int cryptosw; /* crypto command called */
-extern int sys_maxclock;
extern char *stats_drift_file; /* name of the driftfile */
-extern char *leapseconds_file_name; /*name of the leapseconds file */
-#ifdef HAVE_IPTOS_SUPPORT
-extern unsigned int qos; /* QoS setting */
-#endif /* HAVE_IPTOS_SUPPORT */
#ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
/*
@@ -228,72 +213,132 @@ int *p_bcXXXX_enabled = &bc_list[0].enabled;
/* FUNCTION PROTOTYPES */
-static void apply_enable_disable(queue *q, int enable);
-static void init_syntax_tree(struct config_tree *);
+static void init_syntax_tree(config_tree *);
+static void apply_enable_disable(attr_val_fifo *q, int enable);
#ifdef FREE_CFG_T
-static void free_auth_node(struct config_tree *);
-
-static void free_config_other_modes(struct config_tree *);
-static void free_config_auth(struct config_tree *);
-static void free_config_tos(struct config_tree *);
-static void free_config_monitor(struct config_tree *);
-static void free_config_access(struct config_tree *);
-static void free_config_tinker(struct config_tree *);
-static void free_config_system_opts(struct config_tree *);
-static void free_config_logconfig(struct config_tree *);
-static void free_config_phone(struct config_tree *);
-static void free_config_qos(struct config_tree *);
-static void free_config_setvar(struct config_tree *);
-static void free_config_ttl(struct config_tree *);
-static void free_config_trap(struct config_tree *);
-static void free_config_fudge(struct config_tree *);
-static void free_config_vars(struct config_tree *);
-static void free_config_peers(struct config_tree *);
-static void free_config_unpeers(struct config_tree *);
-static void free_config_nic_rules(struct config_tree *);
+static void free_auth_node(config_tree *);
+static void free_all_config_trees(void);
+
+static void free_config_access(config_tree *);
+static void free_config_auth(config_tree *);
+static void free_config_fudge(config_tree *);
+static void free_config_logconfig(config_tree *);
+static void free_config_monitor(config_tree *);
+static void free_config_nic_rules(config_tree *);
+static void free_config_other_modes(config_tree *);
+static void free_config_peers(config_tree *);
+static void free_config_phone(config_tree *);
+static void free_config_reset_counters(config_tree *);
+static void free_config_rlimit(config_tree *);
+static void free_config_setvar(config_tree *);
+static void free_config_system_opts(config_tree *);
+static void free_config_tinker(config_tree *);
+static void free_config_tos(config_tree *);
+static void free_config_trap(config_tree *);
+static void free_config_ttl(config_tree *);
+static void free_config_unpeers(config_tree *);
+static void free_config_vars(config_tree *);
+
#ifdef SIM
-static void free_config_sim(struct config_tree *);
+static void free_config_sim(config_tree *);
#endif
-
+static void destroy_address_fifo(address_fifo *);
+#define FREE_ADDRESS_FIFO(pf) \
+ do { \
+ destroy_address_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
void free_all_config_trees(void); /* atexit() */
-static void free_config_tree(struct config_tree *ptree);
+static void free_config_tree(config_tree *ptree);
#endif /* FREE_CFG_T */
-double *create_dval(double val);
-void destroy_restrict_node(struct restrict_node *my_node);
+static void destroy_restrict_node(restrict_node *my_node);
static int is_sane_resolved_address(sockaddr_u *peeraddr, int hmode);
-static int get_correct_host_mode(int hmode);
static void save_and_apply_config_tree(void);
-void getconfig(int argc,char *argv[]);
-#if !defined(SIM)
-static sockaddr_u *get_next_address(struct address_node *addr);
-#endif
-
-static void config_other_modes(struct config_tree *);
-static void config_auth(struct config_tree *);
-static void config_tos(struct config_tree *);
-static void config_monitor(struct config_tree *);
-static void config_access(struct config_tree *);
-static void config_tinker(struct config_tree *);
-static void config_system_opts(struct config_tree *);
-static void config_logconfig(struct config_tree *);
-static void config_phone(struct config_tree *);
-static void config_qos(struct config_tree *);
-static void config_setvar(struct config_tree *);
-static void config_ttl(struct config_tree *);
-static void config_trap(struct config_tree *);
-static void config_fudge(struct config_tree *);
-static void config_vars(struct config_tree *);
-static void config_peers(struct config_tree *);
-static void config_unpeers(struct config_tree *);
-static void config_nic_rules(struct config_tree *);
+static void destroy_int_fifo(int_fifo *);
+#define FREE_INT_FIFO(pf) \
+ do { \
+ destroy_int_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_string_fifo(string_fifo *);
+#define FREE_STRING_FIFO(pf) \
+ do { \
+ destroy_string_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_attr_val_fifo(attr_val_fifo *);
+#define FREE_ATTR_VAL_FIFO(pf) \
+ do { \
+ destroy_attr_val_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_filegen_fifo(filegen_fifo *);
+#define FREE_FILEGEN_FIFO(pf) \
+ do { \
+ destroy_filegen_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_restrict_fifo(restrict_fifo *);
+#define FREE_RESTRICT_FIFO(pf) \
+ do { \
+ destroy_restrict_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_setvar_fifo(setvar_fifo *);
+#define FREE_SETVAR_FIFO(pf) \
+ do { \
+ destroy_setvar_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+static void destroy_addr_opts_fifo(addr_opts_fifo *);
+#define FREE_ADDR_OPTS_FIFO(pf) \
+ do { \
+ destroy_addr_opts_fifo(pf); \
+ (pf) = NULL; \
+ } while (0)
+
+static void config_logconfig(config_tree *);
+static void config_monitor(config_tree *);
+static void config_rlimit(config_tree *);
+static void config_system_opts(config_tree *);
+static void config_tinker(config_tree *);
+static void config_tos(config_tree *);
+static void config_vars(config_tree *);
#ifdef SIM
-static void config_sim(struct config_tree *);
-static void config_ntpdsim(struct config_tree *);
-#else
-static void config_ntpd(struct config_tree *);
+static sockaddr_u *get_next_address(address_node *addr);
+static void config_sim(config_tree *);
+static void config_ntpdsim(config_tree *);
+#else /* !SIM follows */
+static void config_ntpd(config_tree *);
+static void config_other_modes(config_tree *);
+static void config_auth(config_tree *);
+static void config_access(config_tree *);
+static void config_phone(config_tree *);
+static void config_setvar(config_tree *);
+static void config_ttl(config_tree *);
+static void config_trap(config_tree *);
+static void config_fudge(config_tree *);
+static void config_peers(config_tree *);
+static void config_unpeers(config_tree *);
+static void config_nic_rules(config_tree *);
+static void config_reset_counters(config_tree *);
+static u_char get_correct_host_mode(int token);
+static int peerflag_bits(peer_node *);
+#endif /* !SIM */
+
+#ifdef WORKER
+static void peer_name_resolved(int, int, void *, const char *, const char *,
+ const struct addrinfo *,
+ const struct addrinfo *);
+static void unpeer_name_resolved(int, int, void *, const char *, const char *,
+ const struct addrinfo *,
+ const struct addrinfo *);
+static void trap_name_resolved(int, int, void *, const char *, const char *,
+ const struct addrinfo *,
+ const struct addrinfo *);
#endif
enum gnn_type {
@@ -302,29 +347,15 @@ enum gnn_type {
t_MSK /* Network Mask */
};
-#define DESTROY_QUEUE(q) \
-do { \
- if (q) { \
- destroy_queue(q); \
- (q) = NULL; \
- } \
-} while (0)
-
-void ntpd_set_tod_using(const char *);
+static void ntpd_set_tod_using(const char *);
+static char * normal_dtoa(double);
static u_int32 get_pfxmatch(const char **, struct masks *);
static u_int32 get_match(const char *, struct masks *);
static u_int32 get_logmask(const char *);
-static int getnetnum(const char *num,sockaddr_u *addr, int complain,
+#ifndef SIM
+static int getnetnum(const char *num, sockaddr_u *addr, int complain,
enum gnn_type a_type);
-static int get_multiple_netnums(const char *num, sockaddr_u *addr,
- struct addrinfo **res, int complain,
- enum gnn_type a_type);
-static void save_resolve(char *name, int no_needed, int type,
- int mode, int version, int minpoll, int maxpoll,
- u_int flags, int ttl, keyid_t keyid, u_char *keystr);
-static void abort_resolve(void);
-static void do_resolve_internal(void);
-
+#endif
/* FUNCTIONS FOR INITIALIZATION
@@ -334,7 +365,7 @@ static void do_resolve_internal(void);
#ifdef FREE_CFG_T
static void
free_auth_node(
- struct config_tree *ptree
+ config_tree *ptree
)
{
if (ptree->auth.keys) {
@@ -357,43 +388,19 @@ free_auth_node(
static void
init_syntax_tree(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- memset(ptree, 0, sizeof(*ptree));
-
- ptree->peers = create_queue();
- ptree->unpeers = create_queue();
- ptree->orphan_cmds = create_queue();
- ptree->manycastserver = create_queue();
- ptree->multicastclient = create_queue();
- ptree->stats_list = create_queue();
- ptree->filegen_opts = create_queue();
- ptree->discard_opts = create_queue();
- ptree->restrict_opts = create_queue();
- ptree->enable_opts = create_queue();
- ptree->disable_opts = create_queue();
- ptree->tinker = create_queue();
- ptree->fudge = create_queue();
- ptree->logconfig = create_queue();
- ptree->phone = create_queue();
- ptree->qos = create_queue();
- ptree->setvar = create_queue();
- ptree->ttl = create_queue();
- ptree->trap = create_queue();
- ptree->vars = create_queue();
- ptree->nic_rules = create_queue();
- ptree->auth.crypto_cmd_list = create_queue();
- ptree->auth.trusted_key_list = create_queue();
+ ZERO(*ptree);
}
#ifdef FREE_CFG_T
-void
+static void
free_all_config_trees(void)
{
- struct config_tree *ptree;
- struct config_tree *pnext;
+ config_tree *ptree;
+ config_tree *pnext;
ptree = cfg_tree_history;
@@ -407,7 +414,7 @@ free_all_config_trees(void)
static void
free_config_tree(
- struct config_tree *ptree
+ config_tree *ptree
)
{
#if defined(_MSC_VER) && defined (_DEBUG)
@@ -423,10 +430,10 @@ free_config_tree(
free_config_monitor(ptree);
free_config_access(ptree);
free_config_tinker(ptree);
+ free_config_rlimit(ptree);
free_config_system_opts(ptree);
free_config_logconfig(ptree);
free_config_phone(ptree);
- free_config_qos(ptree);
free_config_setvar(ptree);
free_config_ttl(ptree);
free_config_trap(ptree);
@@ -435,36 +442,10 @@ free_config_tree(
free_config_peers(ptree);
free_config_unpeers(ptree);
free_config_nic_rules(ptree);
+ free_config_reset_counters(ptree);
#ifdef SIM
free_config_sim(ptree);
#endif
- /*
- * Most of these DESTROY_QUEUE()s are handled already by the
- * free_config_*() routines above but it's safe to use twice.
- * Please feel free to remove ones you verified are handled
- * in a free_config_*() routine.
- */
- DESTROY_QUEUE(ptree->peers);
- DESTROY_QUEUE(ptree->unpeers);
- DESTROY_QUEUE(ptree->orphan_cmds);
- DESTROY_QUEUE(ptree->manycastserver);
- DESTROY_QUEUE(ptree->multicastclient);
- DESTROY_QUEUE(ptree->stats_list);
- DESTROY_QUEUE(ptree->filegen_opts);
- DESTROY_QUEUE(ptree->discard_opts);
- DESTROY_QUEUE(ptree->restrict_opts);
- DESTROY_QUEUE(ptree->enable_opts);
- DESTROY_QUEUE(ptree->disable_opts);
- DESTROY_QUEUE(ptree->tinker);
- DESTROY_QUEUE(ptree->fudge);
- DESTROY_QUEUE(ptree->logconfig);
- DESTROY_QUEUE(ptree->phone);
- DESTROY_QUEUE(ptree->qos);
- DESTROY_QUEUE(ptree->setvar);
- DESTROY_QUEUE(ptree->ttl);
- DESTROY_QUEUE(ptree->trap);
- DESTROY_QUEUE(ptree->vars);
-
free_auth_node(ptree);
free(ptree);
@@ -482,14 +463,15 @@ int
dump_all_config_trees(
FILE *df,
int comment
- )
+ )
{
- struct config_tree *cfg_ptr = cfg_tree_history;
- int return_value = 0;
+ config_tree * cfg_ptr;
+ int return_value;
+ return_value = 0;
for (cfg_ptr = cfg_tree_history;
- cfg_ptr != NULL;
- cfg_ptr = cfg_ptr->link)
+ cfg_ptr != NULL;
+ cfg_ptr = cfg_ptr->link)
return_value |= dump_config_tree(cfg_ptr, df, comment);
return return_value;
@@ -499,33 +481,30 @@ dump_all_config_trees(
/* The config dumper */
int
dump_config_tree(
- struct config_tree *ptree,
+ config_tree *ptree,
FILE *df,
int comment
)
{
- struct peer_node *peer = NULL;
- struct unpeer_node *unpeers = NULL;
- struct attr_val *atrv = NULL;
- struct address_node *addr = NULL;
- struct address_node *peer_addr;
- struct address_node *fudge_addr;
- struct filegen_node *fgen_node = NULL;
- struct restrict_node *rest_node = NULL;
- struct addr_opts_node *addr_opts = NULL;
- struct setvar_node *setv_node = NULL;
+ peer_node *peern;
+ unpeer_node *unpeern;
+ attr_val *atrv;
+ address_node *addr;
+ address_node *peer_addr;
+ address_node *fudge_addr;
+ filegen_node *fgen_node;
+ restrict_node *rest_node;
+ addr_opts_node *addr_opts;
+ setvar_node *setv_node;
nic_rule_node *rule_node;
+ int_node *i_n;
+ int_node *flags;
+ int_node *counter_set;
+ string_node *str_node;
- char **pstr = NULL;
+ const char *s;
char *s1;
char *s2;
- int *intp = NULL;
- void *fudge_ptr;
- void *list_ptr = NULL;
- void *options = NULL;
- void *opt_ptr = NULL;
- int *flags = NULL;
- void *opts = NULL;
char timestamp[80];
int enable;
@@ -546,139 +525,103 @@ dump_config_tree(
}
/* For options I didn't find documentation I'll just output its name and the cor. value */
- list_ptr = queue_head(ptree->vars);
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = (struct attr_val *) list_ptr;
-
- switch (atrv->attr) {
-
+ atrv = HEAD_PFIFO(ptree->vars);
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ switch (atrv->type) {
+#ifdef DEBUG
default:
fprintf(df, "\n# dump error:\n"
- "# unknown vars token %s\n",
+ "# unknown vars type %d (%s) for %s\n",
+ atrv->type, token_name(atrv->type),
token_name(atrv->attr));
break;
-
- /* doubles */
- case T_Broadcastdelay:
- case T_Tick:
- case T_WanderThreshold:
- fprintf(df, "%s %g\n",
- keyword(atrv->attr),
- atrv->value.d);
- break;
-
- /* ints */
- case T_Calldelay:
-#ifdef OPENSSL
- case T_Automax:
#endif
- fprintf(df, "%s %d\n",
- keyword(atrv->attr),
+ case T_Double:
+ fprintf(df, "%s %s\n", keyword(atrv->attr),
+ normal_dtoa(atrv->value.d));
+ break;
+
+ case T_Integer:
+ fprintf(df, "%s %d\n", keyword(atrv->attr),
atrv->value.i);
break;
- /* strings */
- case T_Driftfile:
- case T_Leapfile:
- case T_Logfile:
- case T_Pidfile:
- case T_Saveconfigdir:
- fprintf(df, "%s \"%s\"\n",
- keyword(atrv->attr),
+ case T_String:
+ fprintf(df, "%s \"%s\"", keyword(atrv->attr),
atrv->value.s);
+ if (T_Driftfile == atrv->attr &&
+ atrv->link != NULL &&
+ T_WanderThreshold == atrv->link->attr) {
+ atrv = atrv->link;
+ fprintf(df, " %s\n",
+ normal_dtoa(atrv->value.d));
+ } else {
+ fprintf(df, "\n");
+ }
break;
}
}
- list_ptr = queue_head(ptree->logconfig);
- if (list_ptr != NULL) {
-
+ atrv = HEAD_PFIFO(ptree->logconfig);
+ if (atrv != NULL) {
fprintf(df, "logconfig");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = list_ptr;
+ for ( ; atrv != NULL; atrv = atrv->link)
fprintf(df, " %c%s", atrv->attr, atrv->value.s);
- }
fprintf(df, "\n");
}
if (ptree->stats_dir)
fprintf(df, "statsdir \"%s\"\n", ptree->stats_dir);
- list_ptr = queue_head(ptree->stats_list);
- if (list_ptr != NULL) {
-
+ i_n = HEAD_PFIFO(ptree->stats_list);
+ if (i_n != NULL) {
fprintf(df, "statistics");
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- intp = list_ptr;
-
- fprintf(df, " %s", keyword(*intp));
- }
-
+ for ( ; i_n != NULL; i_n = i_n->link)
+ fprintf(df, " %s", keyword(i_n->i));
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->filegen_opts);
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- fgen_node = list_ptr;
- opt_ptr = queue_head(fgen_node->options);
-
- if (opt_ptr != NULL)
- fprintf(df, "filegen %s",
+ fgen_node = HEAD_PFIFO(ptree->filegen_opts);
+ for ( ; fgen_node != NULL; fgen_node = fgen_node->link) {
+ atrv = HEAD_PFIFO(fgen_node->options);
+ if (atrv != NULL) {
+ fprintf(df, "filegen %s",
keyword(fgen_node->filegen_token));
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ switch (atrv->attr) {
+#ifdef DEBUG
+ default:
+ fprintf(df, "\n# dump error:\n"
+ "# unknown filegen option token %s\n"
+ "filegen %s",
+ token_name(atrv->attr),
+ keyword(fgen_node->filegen_token));
+ break;
+#endif
+ case T_File:
+ fprintf(df, " file %s",
+ atrv->value.s);
+ break;
- for(; opt_ptr != NULL;
- opt_ptr = next_node(opt_ptr)) {
-
- atrv = opt_ptr;
-
- switch (atrv->attr) {
-
- default:
- fprintf(df, "\n# dump error:\n"
- "# unknown filegen option token %s\n"
- "filegen %s",
- token_name(atrv->attr),
- keyword(fgen_node->filegen_token));
- break;
-
- case T_File:
- fprintf(df, " file %s",
- atrv->value.s);
- break;
-
- case T_Type:
- fprintf(df, " type %s",
- keyword(atrv->value.i));
- break;
+ case T_Type:
+ fprintf(df, " type %s",
+ keyword(atrv->value.i));
+ break;
- case T_Flag:
- fprintf(df, " %s",
- keyword(atrv->value.i));
- break;
+ case T_Flag:
+ fprintf(df, " %s",
+ keyword(atrv->value.i));
+ break;
+ }
}
-
+ fprintf(df, "\n");
}
-
- fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->auth.crypto_cmd_list);
- if (list_ptr != NULL) {
+ atrv = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
+ if (atrv != NULL) {
fprintf(df, "crypto");
-
- for (; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = list_ptr;
+ for ( ; atrv != NULL; atrv = atrv->link) {
fprintf(df, " %s %s", keyword(atrv->attr),
atrv->value.s);
}
@@ -688,27 +631,29 @@ dump_config_tree(
if (ptree->auth.revoke != 0)
fprintf(df, "revoke %d\n", ptree->auth.revoke);
- if (NULL != ptree->auth.keysdir)
+ if (ptree->auth.keysdir != NULL)
fprintf(df, "keysdir \"%s\"\n", ptree->auth.keysdir);
- if (NULL != ptree->auth.keys)
+ if (ptree->auth.keys != NULL)
fprintf(df, "keys \"%s\"\n", ptree->auth.keys);
- atrv = queue_head(ptree->auth.trusted_key_list);
+ atrv = HEAD_PFIFO(ptree->auth.trusted_key_list);
if (atrv != NULL) {
fprintf(df, "trustedkey");
- do {
- if ('i' == atrv->attr)
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ if (T_Integer == atrv->type)
fprintf(df, " %d", atrv->value.i);
- else if ('-' == atrv->attr)
- fprintf(df, " (%u ... %u)",
- atrv->value.u >> 16,
- atrv->value.u & 0xffff);
+ else if (T_Intrange == atrv->type)
+ fprintf(df, " (%d ... %d)",
+ atrv->value.r.first,
+ atrv->value.r.last);
+#ifdef DEBUG
else
fprintf(df, "\n# dump error:\n"
- "# unknown trustedkey attr %d\n"
- "trustedkey", atrv->attr);
- } while (NULL != (atrv = next_node(atrv)));
+ "# unknown trustedkey attr type %d\n"
+ "trustedkey", atrv->type);
+#endif
+ }
fprintf(df, "\n");
}
@@ -720,104 +665,81 @@ dump_config_tree(
/* dump enable list, then disable list */
for (enable = 1; enable >= 0; enable--) {
-
- list_ptr = (enable)
- ? queue_head(ptree->enable_opts)
- : queue_head(ptree->disable_opts);
-
- if (list_ptr != NULL) {
- fprintf(df, (enable)
+ atrv = (enable)
+ ? HEAD_PFIFO(ptree->enable_opts)
+ : HEAD_PFIFO(ptree->disable_opts);
+ if (atrv != NULL) {
+ fprintf(df, "%s", (enable)
? "enable"
: "disable");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = (struct attr_val *) list_ptr;
-
+ for ( ; atrv != NULL; atrv = atrv->link)
fprintf(df, " %s",
keyword(atrv->value.i));
- }
fprintf(df, "\n");
}
}
- list_ptr = queue_head(ptree->orphan_cmds);
- if (list_ptr != NULL)
+ atrv = HEAD_PFIFO(ptree->orphan_cmds);
+ if (atrv != NULL) {
fprintf(df, "tos");
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ switch (atrv->type) {
+#ifdef DEBUG
+ default:
+ fprintf(df, "\n# dump error:\n"
+ "# unknown tos attr type %d %s\n"
+ "tos", atrv->type,
+ token_name(atrv->type));
+ break;
+#endif
+ case T_Double:
+ fprintf(df, " %s %s",
+ keyword(atrv->attr),
+ normal_dtoa(atrv->value.d));
+ break;
+ }
+ }
+ fprintf(df, "\n");
+ }
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = list_ptr;
-
- switch (atrv->attr) {
-
- default:
- fprintf(df, "\n# dump error:\n"
- "# unknown tos token %s\n"
- "tos", token_name(atrv->attr));
- break;
-
- /* ints */
- case T_Ceiling:
- case T_Floor:
- case T_Cohort:
- case T_Orphan:
- case T_Minclock:
- case T_Maxclock:
- case T_Minsane:
- case T_Beacon:
+ atrv = HEAD_PFIFO(ptree->rlimit);
+ if (atrv != NULL) {
+ fprintf(df, "rlimit");
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ INSIST(T_Integer == atrv->type);
fprintf(df, " %s %d", keyword(atrv->attr),
- (int)atrv->value.d);
- break;
-
- /* doubles */
- case T_Mindist:
- case T_Maxdist:
- fprintf(df, " %s %g", keyword(atrv->attr),
- atrv->value.d);
- break;
+ atrv->value.i);
}
- }
- if (queue_head(ptree->orphan_cmds) != NULL)
fprintf(df, "\n");
+ }
- list_ptr = queue_head(ptree->tinker);
- if (list_ptr != NULL) {
-
+ atrv = HEAD_PFIFO(ptree->tinker);
+ if (atrv != NULL) {
fprintf(df, "tinker");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = list_ptr;
- fprintf(df, " %s %g", keyword(atrv->attr),
- atrv->value.d);
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ INSIST(T_Double == atrv->type);
+ fprintf(df, " %s %s", keyword(atrv->attr),
+ normal_dtoa(atrv->value.d));
}
-
fprintf(df, "\n");
}
if (ptree->broadcastclient)
fprintf(df, "broadcastclient\n");
- list_ptr = queue_head(ptree->peers);
- for (; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- peer = list_ptr;
- addr = peer->addr;
- fprintf(df, "%s", keyword(peer->host_mode));
-
+ peern = HEAD_PFIFO(ptree->peers);
+ for ( ; peern != NULL; peern = peern->link) {
+ addr = peern->addr;
+ fprintf(df, "%s", keyword(peern->host_mode));
switch (addr->type) {
-
+#ifdef DEBUG
default:
fprintf(df, "# dump error:\n"
"# unknown peer family %d for:\n"
- "peer", addr->type);
+ "%s", addr->type,
+ keyword(peern->host_mode));
break;
-
+#endif
case AF_UNSPEC:
break;
@@ -830,179 +752,157 @@ dump_config_tree(
break;
}
fprintf(df, " %s", addr->address);
-
- if (peer->minpoll != 0)
- fprintf(df, " minpoll %d", peer->minpoll);
- if (peer->maxpoll != 0)
- fprintf(df, " maxpoll %d", peer->maxpoll);
+ if (peern->minpoll != 0)
+ fprintf(df, " minpoll %u", peern->minpoll);
+
+ if (peern->maxpoll != 0)
+ fprintf(df, " maxpoll %u", peern->maxpoll);
- if (peer->ttl != 0) {
+ if (peern->ttl != 0) {
if (strlen(addr->address) > 8
&& !memcmp(addr->address, "127.127.", 8))
- fprintf(df, " mode %d", peer->ttl);
+ fprintf(df, " mode %u", peern->ttl);
else
- fprintf(df, " ttl %d", peer->ttl);
+ fprintf(df, " ttl %u", peern->ttl);
}
- if (peer->peerversion != NTP_VERSION)
- fprintf(df, " version %d", peer->peerversion);
+ if (peern->peerversion != NTP_VERSION)
+ fprintf(df, " version %u", peern->peerversion);
- if (peer->peerkey != 0)
- fprintf(df, " key %d", peer->peerkey);
+ if (peern->peerkey != 0)
+ fprintf(df, " key %u", peern->peerkey);
- if (peer->bias != 0.)
- fprintf(df, " bias %g", peer->bias);
-
- for (atrv = queue_head(peer->peerflags);
- atrv != NULL;
- atrv = next_node(atrv)) {
-
- NTP_INSIST(T_Flag == atrv->attr);
- NTP_INSIST(T_Integer == atrv->type);
+ if (peern->group != NULL)
+ fprintf(df, " ident \"%s\"", peern->group);
+ atrv = HEAD_PFIFO(peern->peerflags);
+ for ( ; atrv != NULL; atrv = atrv->link) {
+ INSIST(T_Flag == atrv->attr);
+ INSIST(T_Integer == atrv->type);
fprintf(df, " %s", keyword(atrv->value.i));
}
fprintf(df, "\n");
- fudge_ptr = queue_head(ptree->fudge);
- for(; fudge_ptr != NULL;
- fudge_ptr = next_node(fudge_ptr)) {
-
-
- addr_opts = (struct addr_opts_node *) fudge_ptr;
- peer_addr = peer->addr;
+ addr_opts = HEAD_PFIFO(ptree->fudge);
+ for ( ; addr_opts != NULL; addr_opts = addr_opts->link) {
+ peer_addr = peern->addr;
fudge_addr = addr_opts->addr;
s1 = peer_addr->address;
s2 = fudge_addr->address;
- if (!strcmp(s1, s2)) {
-
- fprintf(df, "fudge %s", addr_opts->addr->address);
-
- opts = queue_head(addr_opts->options);
-
- for(; opts != NULL; opts = next_node(opts)) {
- atrv = (struct attr_val *) opts;
-
- switch (atrv->attr) {
-
- default:
- fprintf(df, "\n# dump error:\n"
- "# unknown fudge option %s\n"
- "fudge %s",
- token_name(atrv->attr),
- addr_opts->addr->address);
- break;
-
- /* doubles */
- case T_Time1:
- case T_Time2:
- fprintf(df, " %s %g",
- keyword(atrv->attr),
- atrv->value.d);
- break;
-
- /* ints */
- case T_Stratum:
- case T_Flag1:
- case T_Flag2:
- case T_Flag3:
- case T_Flag4:
- fprintf(df, " %s %d",
- keyword(atrv->attr),
- atrv->value.i);
- break;
-
- /* strings */
- case T_Refid:
- fprintf(df, " %s %s",
- keyword(atrv->attr),
- atrv->value.s);
- break;
- }
+ if (strcmp(s1, s2))
+ continue;
+
+ fprintf(df, "fudge %s", s1);
+
+ for (atrv = HEAD_PFIFO(addr_opts->options);
+ atrv != NULL;
+ atrv = atrv->link) {
+
+ switch (atrv->type) {
+#ifdef DEBUG
+ default:
+ fprintf(df, "\n# dump error:\n"
+ "# unknown fudge atrv->type %d\n"
+ "fudge %s", atrv->type,
+ s1);
+ break;
+#endif
+ case T_Double:
+ fprintf(df, " %s %s",
+ keyword(atrv->attr),
+ normal_dtoa(atrv->value.d));
+ break;
+
+ case T_Integer:
+ fprintf(df, " %s %d",
+ keyword(atrv->attr),
+ atrv->value.i);
+ break;
+
+ case T_String:
+ fprintf(df, " %s %s",
+ keyword(atrv->attr),
+ atrv->value.s);
+ break;
}
- fprintf(df, "\n");
}
+ fprintf(df, "\n");
}
}
- list_ptr = queue_head(ptree->manycastserver);
- if (list_ptr != NULL) {
- addr = list_ptr;
- fprintf(df, "manycastserver %s", addr->address);
- for (addr = next_node(addr);
- addr != NULL;
- addr = next_node(addr))
+ addr = HEAD_PFIFO(ptree->manycastserver);
+ if (addr != NULL) {
+ fprintf(df, "manycastserver");
+ for ( ; addr != NULL; addr = addr->link)
fprintf(df, " %s", addr->address);
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->multicastclient);
- if (list_ptr != NULL) {
- addr = list_ptr;
- fprintf(df, "multicastclient %s", addr->address);
- for (addr = next_node(addr);
- addr != NULL;
- addr = next_node(addr))
+ addr = HEAD_PFIFO(ptree->multicastclient);
+ if (addr != NULL) {
+ fprintf(df, "multicastclient");
+ for ( ; addr != NULL; addr = addr->link)
fprintf(df, " %s", addr->address);
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->unpeers);
- for (; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- unpeers = (struct unpeer_node *) list_ptr;
-
- fprintf(df, "unpeer %s\n", (unpeers->addr)->address);
- }
-
- list_ptr = queue_head(ptree->discard_opts);
- if (list_ptr != NULL) {
-
- fprintf(df, "discard");
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
+ for (unpeern = HEAD_PFIFO(ptree->unpeers);
+ unpeern != NULL;
+ unpeern = unpeern->link)
+ fprintf(df, "unpeer %s\n", unpeern->addr->address);
- atrv = list_ptr;
+ atrv = HEAD_PFIFO(ptree->mru_opts);
+ if (atrv != NULL) {
+ fprintf(df, "mru");
+ for ( ; atrv != NULL; atrv = atrv->link)
fprintf(df, " %s %d", keyword(atrv->attr),
atrv->value.i);
- }
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->restrict_opts);
- for (; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
+ atrv = HEAD_PFIFO(ptree->discard_opts);
+ if (atrv != NULL) {
+ fprintf(df, "discard");
+ for ( ; atrv != NULL; atrv = atrv->link)
+ fprintf(df, " %s %d", keyword(atrv->attr),
+ atrv->value.i);
+ fprintf(df, "\n");
+ }
- rest_node = list_ptr;
- if (NULL == rest_node->addr)
- s1 = "default";
- else
- s1 = rest_node->addr->address;
- fprintf(df, "restrict %s", s1);
+ for (rest_node = HEAD_PFIFO(ptree->restrict_opts);
+ rest_node != NULL;
+ rest_node = rest_node->link) {
+ if (NULL == rest_node->addr) {
+ s = "default";
+ flags = HEAD_PFIFO(rest_node->flags);
+ for ( ; flags != NULL; flags = flags->link)
+ if (T_Source == flags->i) {
+ s = "source";
+ break;
+ }
+ } else {
+ s = rest_node->addr->address;
+ }
+ fprintf(df, "restrict %s", s);
if (rest_node->mask != NULL)
fprintf(df, " mask %s",
rest_node->mask->address);
-
- flags = queue_head(rest_node->flags);
- for (; flags != NULL; flags = next_node(flags))
- fprintf(df, " %s", keyword(*flags));
-
+ flags = HEAD_PFIFO(rest_node->flags);
+ for ( ; flags != NULL; flags = flags->link)
+ if (T_Source != flags->i)
+ fprintf(df, " %s", keyword(flags->i));
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->nic_rules);
- for (; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- rule_node = list_ptr;
+ rule_node = HEAD_PFIFO(ptree->nic_rules);
+ for ( ; rule_node != NULL; rule_node = rule_node->link) {
fprintf(df, "interface %s %s\n",
keyword(rule_node->action),
(rule_node->match_class)
@@ -1010,253 +910,259 @@ dump_config_tree(
: rule_node->if_name);
}
- list_ptr = queue_head(ptree->phone);
- if (list_ptr != NULL) {
-
+ str_node = HEAD_PFIFO(ptree->phone);
+ if (str_node != NULL) {
fprintf(df, "phone");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- pstr = list_ptr;
- fprintf(df, " %s", *pstr);
- }
-
- fprintf(df, "\n");
- }
-
- list_ptr = queue_head(ptree->qos);
- if (list_ptr != NULL) {
-
- fprintf(df, "qos");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- atrv = list_ptr;
- fprintf(df, " %s", atrv->value.s);
- }
-
+ for ( ; str_node != NULL; str_node = str_node->link)
+ fprintf(df, " \"%s\"", str_node->s);
fprintf(df, "\n");
}
- list_ptr = queue_head(ptree->setvar);
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- setv_node = list_ptr;
+ setv_node = HEAD_PFIFO(ptree->setvar);
+ for ( ; setv_node != NULL; setv_node = setv_node->link) {
s1 = quote_if_needed(setv_node->var);
s2 = quote_if_needed(setv_node->val);
fprintf(df, "setvar %s = %s", s1, s2);
free(s1);
free(s2);
-
if (setv_node->isdefault)
fprintf(df, " default");
-
fprintf(df, "\n");
}
-
- list_ptr = queue_head(ptree->ttl);
- if (list_ptr != NULL) {
-
+ i_n = HEAD_PFIFO(ptree->ttl);
+ if (i_n != NULL) {
fprintf(df, "ttl");
-
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
-
- intp = list_ptr;
- fprintf(df, " %d", *intp);
- }
-
+ for( ; i_n != NULL; i_n = i_n->link)
+ fprintf(df, " %d", i_n->i);
fprintf(df, "\n");
}
-
- list_ptr = queue_head(ptree->trap);
- for(; list_ptr != NULL;
- list_ptr = next_node(list_ptr)) {
- addr_opts = list_ptr;
+ addr_opts = HEAD_PFIFO(ptree->trap);
+ for ( ; addr_opts != NULL; addr_opts = addr_opts->link) {
addr = addr_opts->addr;
-
fprintf(df, "trap %s", addr->address);
-
- options = queue_head(addr_opts->options);
-
- for(; options != NULL;
- options = next_node(options)) {
-
- atrv = options;
-
+ atrv = HEAD_PFIFO(addr_opts->options);
+ for ( ; atrv != NULL; atrv = atrv->link) {
switch (atrv->attr) {
-
+#ifdef DEBUG
default:
fprintf(df, "\n# dump error:\n"
"# unknown trap token %d\n"
"trap %s", atrv->attr,
addr->address);
break;
-
+#endif
case T_Port:
fprintf(df, " port %d", atrv->value.i);
break;
case T_Interface:
- addr = (struct address_node *) atrv->value.p;
- fprintf(df, " interface %s", addr->address);
+ fprintf(df, " interface %s",
+ atrv->value.s);
break;
}
}
+ fprintf(df, "\n");
+ }
+ counter_set = HEAD_PFIFO(ptree->reset_counters);
+ if (counter_set != NULL) {
+ fprintf(df, "reset");
+ for ( ; counter_set != NULL;
+ counter_set = counter_set->link)
+ fprintf(df, " %s", keyword(counter_set->i));
fprintf(df, "\n");
}
return 0;
}
#endif /* SAVECONFIG */
-
-/* FUNCTIONS FOR CREATING NODES ON THE SYNTAX TREE
- * -----------------------------------------------
- */
-queue *
-enqueue_in_new_queue(
- void *my_node
+
+/* generic fifo routines for structs linked by 1st member */
+void *
+append_gen_fifo(
+ void *fifo,
+ void *entry
+ )
+{
+ gen_fifo *pf;
+ gen_node *pe;
+
+ pf = fifo;
+ pe = entry;
+ if (NULL == pf)
+ pf = emalloc_zero(sizeof(*pf));
+ else
+ CHECK_FIFO_CONSISTENCY(*pf);
+ if (pe != NULL)
+ LINK_FIFO(*pf, pe, link);
+ CHECK_FIFO_CONSISTENCY(*pf);
+
+ return pf;
+}
+
+
+void *
+concat_gen_fifos(
+ void *first,
+ void *second
)
{
- queue *my_queue = create_queue();
+ gen_fifo *pf1;
+ gen_fifo *pf2;
+
+ pf1 = first;
+ pf2 = second;
+ if (NULL == pf1)
+ return pf2;
+ if (NULL == pf2)
+ return pf1;
- enqueue(my_queue, my_node);
- return my_queue;
+ CONCAT_FIFO(*pf1, *pf2, link);
+ free(pf2);
+
+ return pf1;
}
-struct attr_val *
+
+/* FUNCTIONS FOR CREATING NODES ON THE SYNTAX TREE
+ * -----------------------------------------------
+ */
+
+attr_val *
create_attr_dval(
int attr,
double value
)
{
- struct attr_val *my_val;
+ attr_val *my_val;
- my_val = get_node(sizeof *my_val);
+ my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
my_val->value.d = value;
my_val->type = T_Double;
+
return my_val;
}
-struct attr_val *
+
+attr_val *
create_attr_ival(
int attr,
int value
)
{
- struct attr_val *my_val;
+ attr_val *my_val;
- my_val = get_node(sizeof *my_val);
+ my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
my_val->value.i = value;
my_val->type = T_Integer;
+
return my_val;
}
-struct attr_val *
-create_attr_shorts(
- int attr,
- ntp_u_int16_t val1,
- ntp_u_int16_t val2
+
+attr_val *
+create_attr_uval(
+ int attr,
+ u_int value
)
{
- struct attr_val *my_val;
+ attr_val *my_val;
- my_val = get_node(sizeof *my_val);
+ my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
- my_val->value.u = (val1 << 16) | val2;
- my_val->type = T_Integer;
+ my_val->value.u = value;
+ my_val->type = T_U_int;
+
return my_val;
}
-struct attr_val *
-create_attr_sval(
- int attr,
- char *s
+
+attr_val *
+create_attr_rangeval(
+ int attr,
+ int first,
+ int last
)
{
- struct attr_val *my_val;
+ attr_val *my_val;
- my_val = get_node(sizeof *my_val);
+ my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
- if (NULL == s) /* free() hates NULL */
- s = estrdup("");
- my_val->value.s = s;
- my_val->type = T_String;
+ my_val->value.r.first = first;
+ my_val->value.r.last = last;
+ my_val->type = T_Intrange;
+
return my_val;
}
-struct attr_val *
-create_attr_pval(
+
+attr_val *
+create_attr_sval(
int attr,
- void *p
+ char *s
)
{
- struct attr_val *my_val;
+ attr_val *my_val;
- my_val = get_node(sizeof *my_val);
+ my_val = emalloc_zero(sizeof(*my_val));
my_val->attr = attr;
- my_val->value.p = p;
- my_val->type = T_Void;
+ if (NULL == s) /* free() hates NULL */
+ s = estrdup("");
+ my_val->value.s = s;
+ my_val->type = T_String;
+
return my_val;
}
-int *
-create_ival(
+
+int_node *
+create_int_node(
int val
)
{
- int *p = get_node(sizeof *p);
-
- *p = val;
- return p;
-}
+ int_node *i_n;
-double *
-create_dval(
- double val
- )
-{
- double *p = get_node(sizeof *p);
+ i_n = emalloc_zero(sizeof(*i_n));
+ i_n->i = val;
- *p = val;
- return p;
+ return i_n;
}
-void **
-create_pval(
- void *val
+
+string_node *
+create_string_node(
+ char *str
)
{
- void **p = get_node(sizeof *p);
+ string_node *sn;
- *p = val;
- return p;
+ sn = emalloc_zero(sizeof(*sn));
+ sn->s = str;
+
+ return sn;
}
-struct address_node *
+
+address_node *
create_address_node(
- char *addr,
- int type
+ char * addr,
+ int type
)
{
- struct address_node *my_node;
+ address_node *my_node;
NTP_REQUIRE(NULL != addr);
-
- my_node = get_node(sizeof *my_node);
-
+ NTP_REQUIRE(AF_INET == type ||
+ AF_INET6 == type || AF_UNSPEC == type);
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->address = addr;
- my_node->type = type;
+ my_node->type = (u_short)type;
return my_node;
}
@@ -1264,139 +1170,158 @@ create_address_node(
void
destroy_address_node(
- struct address_node *my_node
+ address_node *my_node
)
{
- NTP_REQUIRE(NULL != my_node);
+ if (NULL == my_node)
+ return;
NTP_REQUIRE(NULL != my_node->address);
free(my_node->address);
- free_node(my_node);
+ free(my_node);
}
-struct peer_node *
+peer_node *
create_peer_node(
- int hmode,
- struct address_node *addr,
- queue *options
+ int hmode,
+ address_node * addr,
+ attr_val_fifo * options
)
{
- struct peer_node *my_node;
- struct attr_val *option;
+ peer_node *my_node;
+ attr_val *option;
int freenode;
int errflag = 0;
- my_node = get_node(sizeof(*my_node));
+ my_node = emalloc_zero(sizeof(*my_node));
/* Initialize node values to default */
- my_node->minpoll = 0;
- my_node->maxpoll = 0;
- my_node->ttl = 0;
my_node->peerversion = NTP_VERSION;
- my_node->peerkey = 0;
- my_node->bias = 0;
- my_node->peerflags = create_queue();
/* Now set the node to the read values */
my_node->host_mode = hmode;
my_node->addr = addr;
/*
- * the options list mixes items that will be saved in the
+ * the options FIFO mixes items that will be saved in the
* peer_node as explicit members, such as minpoll, and
- * those that are moved from the options queue intact
- * to the peer_node's peerflags queue. The options
- * queue is consumed and destroyed here.
+ * those that are moved intact to the peer_node's peerflags
+ * FIFO. The options FIFO is consumed and reclaimed here.
*/
- while (options && NULL != (option = dequeue(options))) {
+ if (options != NULL)
+ CHECK_FIFO_CONSISTENCY(*options);
+ while (options != NULL) {
+ UNLINK_FIFO(option, *options, link);
+ if (NULL == option) {
+ free(options);
+ break;
+ }
freenode = 1;
/* Check the kind of option being set */
switch (option->attr) {
case T_Flag:
- enqueue(my_node->peerflags, option);
+ APPEND_G_FIFO(my_node->peerflags, option);
freenode = 0;
break;
case T_Minpoll:
- if (option->value.i < NTP_MINPOLL) {
+ if (option->value.i < NTP_MINPOLL ||
+ option->value.i > UCHAR_MAX) {
msyslog(LOG_INFO,
- "minpoll: provided value (%d) is below minimum (%d)",
- option->value.i, NTP_MINPOLL);
+ "minpoll: provided value (%d) is out of range [%d-%d])",
+ option->value.i, NTP_MINPOLL,
+ UCHAR_MAX);
my_node->minpoll = NTP_MINPOLL;
+ } else {
+ my_node->minpoll =
+ (u_char)option->value.u;
}
- else
- my_node->minpoll = option->value.i;
break;
case T_Maxpoll:
- if (option->value.i > NTP_MAXPOLL) {
+ if (option->value.i < 0 ||
+ option->value.i > NTP_MAXPOLL) {
msyslog(LOG_INFO,
- "maxpoll: provided value (%d) is above maximum (%d)",
+ "maxpoll: provided value (%d) is out of range [0-%d])",
option->value.i, NTP_MAXPOLL);
my_node->maxpoll = NTP_MAXPOLL;
+ } else {
+ my_node->maxpoll =
+ (u_char)option->value.u;
}
- else
- my_node->maxpoll = option->value.i;
break;
case T_Ttl:
- if (my_node->ttl >= MAX_TTL) {
+ if (option->value.u >= MAX_TTL) {
msyslog(LOG_ERR, "ttl: invalid argument");
errflag = 1;
+ } else {
+ my_node->ttl = (u_char)option->value.u;
}
- else
- my_node->ttl = option->value.i;
break;
case T_Mode:
- my_node->ttl = option->value.i;
+ my_node->ttl = option->value.u;
break;
case T_Key:
- my_node->peerkey = option->value.i;
+ if (option->value.u >= KEYID_T_MAX) {
+ msyslog(LOG_ERR, "key: invalid argument");
+ errflag = 1;
+ } else {
+ my_node->peerkey =
+ (keyid_t)option->value.u;
+ }
break;
case T_Version:
- my_node->peerversion = option->value.i;
+ if (option->value.u >= UCHAR_MAX) {
+ msyslog(LOG_ERR, "version: invalid argument");
+ errflag = 1;
+ } else {
+ my_node->peerversion =
+ (u_char)option->value.u;
+ }
break;
- case T_Bias:
- my_node->bias = option->value.d;
+ case T_Ident:
+ my_node->group = option->value.s;
break;
default:
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"Unknown peer/server option token %s",
token_name(option->attr));
errflag = 1;
}
if (freenode)
- free_node(option);
+ free(option);
}
- DESTROY_QUEUE(options);
/* Check if errors were reported. If yes, ignore the node */
if (errflag) {
- free_node(my_node);
+ free(my_node);
my_node = NULL;
}
+
return my_node;
}
-struct unpeer_node *
+unpeer_node *
create_unpeer_node(
- struct address_node *addr
+ address_node *addr
)
{
- struct unpeer_node * my_node;
- char * pch;
+ unpeer_node * my_node;
+ u_int u;
+ char * pch;
- my_node = get_node(sizeof(*my_node));
+ my_node = emalloc_zero(sizeof(*my_node));
/*
* From the parser's perspective an association ID fits into
@@ -1407,10 +1332,10 @@ create_unpeer_node(
while (*pch && isdigit(*pch))
pch++;
- if (!*pch
- && 1 == sscanf(addr->address, "%u", &my_node->assocID)
- && my_node->assocID <= USHRT_MAX) {
-
+ if (!*pch
+ && 1 == sscanf(addr->address, "%u", &u)
+ && u <= ASSOCID_MAX) {
+ my_node->assocID = (associd_t)u;
destroy_address_node(addr);
my_node->addr = NULL;
} else {
@@ -1421,15 +1346,15 @@ create_unpeer_node(
return my_node;
}
-struct filegen_node *
+filegen_node *
create_filegen_node(
- int filegen_token,
- queue * options
+ int filegen_token,
+ attr_val_fifo * options
)
{
- struct filegen_node *my_node;
-
- my_node = get_node(sizeof *my_node);
+ filegen_node *my_node;
+
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->filegen_token = filegen_token;
my_node->options = options;
@@ -1437,18 +1362,17 @@ create_filegen_node(
}
-struct restrict_node *
+restrict_node *
create_restrict_node(
- struct address_node *addr,
- struct address_node *mask,
- queue *flags,
- int line_no
+ address_node * addr,
+ address_node * mask,
+ int_fifo * flags,
+ int line_no
)
{
- struct restrict_node *my_node;
-
- my_node = get_node(sizeof *my_node);
+ restrict_node *my_node;
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->addr = addr;
my_node->mask = mask;
my_node->flags = flags;
@@ -1457,39 +1381,180 @@ create_restrict_node(
return my_node;
}
-void
+
+static void
destroy_restrict_node(
- struct restrict_node *my_node
+ restrict_node *my_node
)
{
/* With great care, free all the memory occupied by
* the restrict node
*/
- if (my_node->addr)
- destroy_address_node(my_node->addr);
- if (my_node->mask)
- destroy_address_node(my_node->mask);
- DESTROY_QUEUE(my_node->flags);
- free_node(my_node);
+ destroy_address_node(my_node->addr);
+ destroy_address_node(my_node->mask);
+ destroy_int_fifo(my_node->flags);
+ free(my_node);
+}
+
+
+static void
+destroy_int_fifo(
+ int_fifo * fifo
+ )
+{
+ int_node * i_n;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(i_n, *fifo, link);
+ if (i_n == NULL)
+ break;
+ free(i_n);
+ }
+ free(fifo);
+ }
+}
+
+
+static void
+destroy_string_fifo(
+ string_fifo * fifo
+ )
+{
+ string_node * sn;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(sn, *fifo, link);
+ if (sn == NULL)
+ break;
+ free(sn->s);
+ free(sn);
+ }
+ free(fifo);
+ }
+}
+
+
+static void
+destroy_attr_val_fifo(
+ attr_val_fifo * av_fifo
+ )
+{
+ attr_val * av;
+
+ if (av_fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(av, *av_fifo, link);
+ if (av == NULL)
+ break;
+ if (T_String == av->type)
+ free(av->value.s);
+ free(av);
+ }
+ free(av_fifo);
+ }
}
-struct setvar_node *
+static void
+destroy_filegen_fifo(
+ filegen_fifo * fifo
+ )
+{
+ filegen_node * fg;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(fg, *fifo, link);
+ if (fg == NULL)
+ break;
+ destroy_attr_val_fifo(fg->options);
+ free(fg);
+ }
+ free(fifo);
+ }
+}
+
+
+static void
+destroy_restrict_fifo(
+ restrict_fifo * fifo
+ )
+{
+ restrict_node * rn;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(rn, *fifo, link);
+ if (rn == NULL)
+ break;
+ destroy_restrict_node(rn);
+ }
+ free(fifo);
+ }
+}
+
+
+static void
+destroy_setvar_fifo(
+ setvar_fifo * fifo
+ )
+{
+ setvar_node * sv;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(sv, *fifo, link);
+ if (sv == NULL)
+ break;
+ free(sv->var);
+ free(sv->val);
+ free(sv);
+ }
+ free(fifo);
+ }
+}
+
+
+static void
+destroy_addr_opts_fifo(
+ addr_opts_fifo * fifo
+ )
+{
+ addr_opts_node * aon;
+
+ if (fifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(aon, *fifo, link);
+ if (aon == NULL)
+ break;
+ destroy_address_node(aon->addr);
+ destroy_attr_val_fifo(aon->options);
+ free(aon);
+ }
+ free(fifo);
+ }
+}
+
+
+setvar_node *
create_setvar_node(
char * var,
char * val,
int isdefault
)
{
- char * pch;
- struct setvar_node *my_node;
+ setvar_node * my_node;
+ char * pch;
/* do not allow = in the variable name */
- if (NULL != (pch = strchr(var, '=')))
+ pch = strchr(var, '=');
+ if (NULL != pch)
*pch = '\0';
/* Now store the string into a setvar_node */
- my_node = get_node(sizeof *my_node);
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->var = var;
my_node->val = val;
my_node->isdefault = isdefault;
@@ -1506,10 +1571,10 @@ create_nic_rule_node(
)
{
nic_rule_node *my_node;
-
+
NTP_REQUIRE(match_class != 0 || if_name != NULL);
- my_node = get_node(sizeof(*my_node));
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->match_class = match_class;
my_node->if_name = if_name;
my_node->action = action;
@@ -1518,45 +1583,45 @@ create_nic_rule_node(
}
-struct addr_opts_node *
+addr_opts_node *
create_addr_opts_node(
- struct address_node *addr,
- queue *options
+ address_node * addr,
+ attr_val_fifo * options
)
{
- struct addr_opts_node *my_node;
+ addr_opts_node *my_node;
- my_node = get_node(sizeof *my_node);
+ my_node = emalloc_zero(sizeof(*my_node));
my_node->addr = addr;
my_node->options = options;
+
return my_node;
}
+
+#ifdef SIM
script_info *
create_sim_script_info(
- double duration,
- queue *script_queue
+ double duration,
+ attr_val_fifo * script_queue
)
{
-#ifdef SIM
- return NULL;
-#else
script_info *my_info;
- struct attr_val *my_attr_val;
+ attr_val *my_attr_val;
- my_info = get_node(sizeof *my_info);
+ my_info = emalloc_zero(sizeof(*my_info));
/* Initialize Script Info with default values*/
my_info->duration = duration;
- my_info->freq_offset = 0;
- my_info->wander = 0;
- my_info->jitter = 0;
my_info->prop_delay = NET_DLY;
my_info->proc_delay = PROC_DLY;
/* Traverse the script_queue and fill out non-default values */
- my_attr_val = queue_head(script_queue);
- while (my_attr_val != NULL) {
+
+ for (my_attr_val = HEAD_PFIFO(script_queue);
+ my_attr_val != NULL;
+ my_attr_val = my_attr_val->link) {
+
/* Set the desired value */
switch (my_attr_val->attr) {
@@ -1581,89 +1646,88 @@ create_sim_script_info(
break;
default:
- msyslog(LOG_ERR,
- "Unknown script token %d",
+ msyslog(LOG_ERR, "Unknown script token %d",
my_attr_val->attr);
}
}
- return (my_info);
-#endif
-}
+ return my_info;
+}
+#endif /* SIM */
-#if !defined(SIM)
-
-#define ADDR_LENGTH 16 + 1
+#ifdef SIM
static sockaddr_u *
get_next_address(
- struct address_node *addr
+ address_node *addr
)
{
const char addr_prefix[] = "192.168.0.";
- static int curr_addr_no = 1;
+ static int curr_addr_num = 1;
+#define ADDR_LENGTH 16 + 1 /* room for 192.168.1.255 */
char addr_string[ADDR_LENGTH];
sockaddr_u *final_addr;
struct addrinfo *ptr;
- int retval;
-
- final_addr = emalloc(sizeof *final_addr);
+ int gai_err;
- if (addr->type == T_String) {
- snprintf(addr_string, ADDR_LENGTH, "%s%d", addr_prefix, curr_addr_no++);
- printf("Selecting ip address %s for hostname %s\n", addr_string, addr->address);
- retval = getaddrinfo(addr_string, "ntp", NULL, &ptr);
- } else
- retval = getaddrinfo(addr->address, "ntp", NULL, &ptr);
+ final_addr = emalloc(sizeof(*final_addr));
- if (!retval) {
- memcpy(final_addr, ptr->ai_addr, ptr->ai_addrlen);
- fprintf(stderr, "Successful in setting ip address of simulated server to: %s\n", stoa(final_addr));
+ if (addr->type == T_String) {
+ snprintf(addr_string, sizeof(addr_string), "%s%d",
+ addr_prefix, curr_addr_num++);
+ printf("Selecting ip address %s for hostname %s\n",
+ addr_string, addr->address);
+ gai_err = getaddrinfo(addr_string, "ntp", NULL, &ptr);
+ } else {
+ gai_err = getaddrinfo(addr->address, "ntp", NULL, &ptr);
}
- else {
+
+ if (gai_err) {
fprintf(stderr, "ERROR!! Could not get a new address\n");
exit(1);
}
+ memcpy(final_addr, ptr->ai_addr, ptr->ai_addrlen);
+ fprintf(stderr, "Successful in setting ip address of simulated server to: %s\n",
+ stoa(final_addr));
freeaddrinfo(ptr);
+
return final_addr;
}
-#endif /* !SIM */
+#endif /* SIM */
+#ifdef SIM
server_info *
create_sim_server(
- struct address_node *addr,
- double server_offset,
- queue *script
+ address_node * addr,
+ double server_offset,
+ script_info_fifo * script
)
{
-#ifdef SIM
- return NULL;
-#else
server_info *my_info;
- my_info = get_node(sizeof *my_info);
-
+ my_info = emalloc_zero(sizeof(*my_info));
my_info->server_time = server_offset;
my_info->addr = get_next_address(addr);
my_info->script = script;
- my_info->curr_script = dequeue(my_info->script);
+ UNLINK_FIFO(my_info->curr_script, *my_info->script, link);
+
return my_info;
-#endif /* SIM */
}
+#endif /* SIM */
-struct sim_node *
+sim_node *
create_sim_node(
- queue *init_opts,
- queue *servers
+ attr_val_fifo * init_opts,
+ server_info_fifo * servers
)
{
- struct sim_node *my_node;
-
- my_node = get_node(sizeof *my_node);
+ sim_node *my_node;
+ my_node = emalloc(sizeof(*my_node));
my_node->init_opts = init_opts;
my_node->servers = servers;
+
return my_node;
}
@@ -1674,93 +1738,106 @@ create_sim_node(
* ------------------------------------------
*/
+#ifndef SIM
static void
config_other_modes(
- struct config_tree *ptree
+ config_tree * ptree
)
{
- sockaddr_u addr_sock;
- struct address_node *addr_node;
+ sockaddr_u addr_sock;
+ address_node * addr_node;
if (ptree->broadcastclient)
- proto_config(PROTO_BROADCLIENT, ptree->broadcastclient, 0., NULL);
-
- /* Configure the many-cast servers */
- addr_node = queue_head(ptree->manycastserver);
- if (addr_node != NULL) {
- do {
- ZERO_SOCK(&addr_sock);
- AF(&addr_sock) = (u_short)addr_node->type;
+ proto_config(PROTO_BROADCLIENT, ptree->broadcastclient,
+ 0., NULL);
- if (getnetnum(addr_node->address, &addr_sock, 1, t_UNK) == 1)
- proto_config(PROTO_MULTICAST_ADD, 0, 0., &addr_sock);
-
- addr_node = next_node(addr_node);
- } while (addr_node != NULL);
- sys_manycastserver = 1;
+ addr_node = HEAD_PFIFO(ptree->manycastserver);
+ while (addr_node != NULL) {
+ ZERO_SOCK(&addr_sock);
+ AF(&addr_sock) = addr_node->type;
+ if (1 == getnetnum(addr_node->address, &addr_sock, 1,
+ t_UNK)) {
+ proto_config(PROTO_MULTICAST_ADD,
+ 0, 0., &addr_sock);
+ sys_manycastserver = 1;
+ }
+ addr_node = addr_node->link;
}
/* Configure the multicast clients */
- addr_node = queue_head(ptree->multicastclient);
+ addr_node = HEAD_PFIFO(ptree->multicastclient);
if (addr_node != NULL) {
do {
ZERO_SOCK(&addr_sock);
- AF(&addr_sock) = (u_short)addr_node->type;
-
- if (getnetnum(addr_node->address, &addr_sock, 1, t_UNK) == 1)
- proto_config(PROTO_MULTICAST_ADD, 0, 0., &addr_sock);
-
- addr_node = next_node(addr_node);
+ AF(&addr_sock) = addr_node->type;
+ if (1 == getnetnum(addr_node->address,
+ &addr_sock, 1, t_UNK)) {
+ proto_config(PROTO_MULTICAST_ADD, 0, 0.,
+ &addr_sock);
+ }
+ addr_node = addr_node->link;
} while (addr_node != NULL);
proto_config(PROTO_MULTICAST_ADD, 1, 0., NULL);
}
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
-free_config_other_modes(
- struct config_tree *ptree
+destroy_address_fifo(
+ address_fifo * pfifo
)
{
- struct address_node *addr_node;
+ address_node * addr_node;
+
+ if (pfifo != NULL) {
+ for (;;) {
+ UNLINK_FIFO(addr_node, *pfifo, link);
+ if (addr_node == NULL)
+ break;
+ destroy_address_node(addr_node);
+ }
+ free(pfifo);
+ }
+}
- while (NULL != (addr_node = dequeue(ptree->manycastserver)))
- destroy_address_node(addr_node);
- while (NULL != (addr_node = dequeue(ptree->multicastclient)))
- destroy_address_node(addr_node);
+static void
+free_config_other_modes(
+ config_tree *ptree
+ )
+{
+ FREE_ADDRESS_FIFO(ptree->manycastserver);
+ FREE_ADDRESS_FIFO(ptree->multicastclient);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_auth(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- ntp_u_int16_t ufirst;
- ntp_u_int16_t ulast;
- ntp_u_int16_t u;
- struct attr_val *my_val;
-#ifdef OPENSSL
-#ifndef NO_INTRES
- u_char digest[EVP_MAX_MD_SIZE];
- u_int digest_len;
- EVP_MD_CTX ctx;
-#endif
+ attr_val * my_val;
+ int first;
+ int last;
+ int i;
+ int count;
+#ifdef AUTOKEY
int item;
#endif
/* Crypto Command */
-#ifdef OPENSSL
+#ifdef AUTOKEY
item = -1; /* quiet warning */
- my_val = queue_head(ptree->auth.crypto_cmd_list);
- while (my_val != NULL) {
+ my_val = HEAD_PFIFO(ptree->auth.crypto_cmd_list);
+ for (; my_val != NULL; my_val = my_val->link) {
switch (my_val->attr) {
default:
- NTP_INSIST(0);
+ INSIST(0);
break;
case T_Host:
@@ -1779,18 +1856,13 @@ config_auth(
item = CRYPTO_CONF_RAND;
break;
- case T_Sign:
- item = CRYPTO_CONF_SIGN;
- break;
-
case T_Digest:
item = CRYPTO_CONF_NID;
break;
}
crypto_config(item, my_val->value.s);
- my_val = next_node(my_val);
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/* Keysdir Command */
if (ptree->auth.keysdir) {
@@ -1807,12 +1879,35 @@ config_auth(
ntp_signd_socket = estrdup(ptree->auth.ntp_signd_socket);
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (ptree->auth.cryptosw && !cryptosw) {
crypto_setup();
cryptosw = 1;
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+
+ /*
+ * Count the number of trusted keys to preallocate storage and
+ * size the hash table.
+ */
+ count = 0;
+ my_val = HEAD_PFIFO(ptree->auth.trusted_key_list);
+ for (; my_val != NULL; my_val = my_val->link) {
+ if (T_Integer == my_val->type) {
+ first = my_val->value.i;
+ if (first > 1 && first <= NTP_MAXKEY)
+ count++;
+ } else {
+ REQUIRE(T_Intrange == my_val->type);
+ first = my_val->value.r.first;
+ last = my_val->value.r.last;
+ if (!(first > last || first < 1 ||
+ last > NTP_MAXKEY)) {
+ count += 1 + last - first;
+ }
+ }
+ }
+ auth_prealloc_symkeys(count);
/* Keys Command */
if (ptree->auth.keys)
@@ -1830,98 +1925,82 @@ config_auth(
}
/* Trusted Key Command */
- my_val = queue_head(ptree->auth.trusted_key_list);
- for (; my_val != NULL; my_val = next_node(my_val)) {
- if ('i' == my_val->attr)
- authtrust(my_val->value.i, 1);
- else if ('-' == my_val->attr) {
- ufirst = my_val->value.u >> 16;
- ulast = my_val->value.u & 0xffff;
- for (u = ufirst; u <= ulast; u++)
- authtrust(u, 1);
+ my_val = HEAD_PFIFO(ptree->auth.trusted_key_list);
+ for (; my_val != NULL; my_val = my_val->link) {
+ if (T_Integer == my_val->type) {
+ first = my_val->value.i;
+ if (first >= 1 && first <= NTP_MAXKEY) {
+ authtrust(first, TRUE);
+ } else {
+ msyslog(LOG_NOTICE,
+ "Ignoring invalid trustedkey %d, min 1 max %d.",
+ first, NTP_MAXKEY);
+ }
+ } else {
+ first = my_val->value.r.first;
+ last = my_val->value.r.last;
+ if (first > last || first < 1 ||
+ last > NTP_MAXKEY) {
+ msyslog(LOG_NOTICE,
+ "Ignoring invalid trustedkey range %d ... %d, min 1 max %d.",
+ first, last, NTP_MAXKEY);
+ } else {
+ for (i = first; i <= last; i++) {
+ authtrust(i, TRUE);
+ }
+ }
}
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/* crypto revoke command */
if (ptree->auth.revoke)
- sys_revoke = ptree->auth.revoke;
-#endif /* OPENSSL */
-
-#ifndef NO_INTRES
- /* 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)) {
- req_keytype = cache_type;
-#ifndef OPENSSL
- req_hashlen = 16;
-#else /* OPENSSL follows */
- EVP_DigestInit(&ctx, EVP_get_digestbynid(req_keytype));
- EVP_DigestFinal(&ctx, digest, &digest_len);
- req_hashlen = digest_len;
-#endif
- } else {
- int rankey;
-
- rankey = ntp_random();
- req_keytype = NID_md5;
- req_hashlen = 16;
- MD5auth_setkey(req_keyid, req_keytype,
- (u_char *)&rankey, sizeof(rankey));
- authtrust(req_keyid, 1);
- }
-
- /* save keyid so we will accept config requests with it */
- info_auth_keyid = req_keyid;
-#endif /* !NO_INTRES */
-
+ sys_revoke = 1UL << ptree->auth.revoke;
+#endif /* AUTOKEY */
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_auth(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *my_val;
-
- while (NULL !=
- (my_val = dequeue(ptree->auth.crypto_cmd_list))) {
-
- free(my_val->value.s);
- free_node(my_val);
- }
- DESTROY_QUEUE(ptree->auth.crypto_cmd_list);
-
- DESTROY_QUEUE(ptree->auth.trusted_key_list);
+ destroy_attr_val_fifo(ptree->auth.crypto_cmd_list);
+ ptree->auth.crypto_cmd_list = NULL;
+ destroy_attr_val_fifo(ptree->auth.trusted_key_list);
+ ptree->auth.trusted_key_list = NULL;
}
#endif /* FREE_CFG_T */
static void
config_tos(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *tos;
- int item;
+ attr_val * tos;
+ int item;
+ double val;
item = -1; /* quiet warning */
- tos = queue_head(ptree->orphan_cmds);
- while (tos != NULL) {
+ tos = HEAD_PFIFO(ptree->orphan_cmds);
+ for (; tos != NULL; tos = tos->link) {
+ val = tos->value.d;
switch(tos->attr) {
default:
- NTP_INSIST(0);
+ INSIST(0);
break;
case T_Ceiling:
+ if (val > STRATUM_UNSPEC - 1) {
+ msyslog(LOG_WARNING,
+ "Using maximum tos ceiling %d, %g requested",
+ STRATUM_UNSPEC - 1, val);
+ val = STRATUM_UNSPEC - 1;
+ }
item = PROTO_CEILING;
break;
@@ -1937,6 +2016,10 @@ config_tos(
item = PROTO_ORPHAN;
break;
+ case T_Orphanwait:
+ item = PROTO_ORPHWAIT;
+ break;
+
case T_Mindist:
item = PROTO_MINDISP;
break;
@@ -1961,8 +2044,7 @@ config_tos(
item = PROTO_BEACON;
break;
}
- proto_config(item, 0, tos->value.d, NULL);
- tos = next_node(tos);
+ proto_config(item, 0, val, NULL);
}
}
@@ -1970,30 +2052,25 @@ config_tos(
#ifdef FREE_CFG_T
static void
free_config_tos(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *tos;
-
- while (!empty(ptree->orphan_cmds)) {
- tos = dequeue(ptree->orphan_cmds);
- free_node(tos);
- }
+ FREE_ATTR_VAL_FIFO(ptree->orphan_cmds);
}
#endif /* FREE_CFG_T */
static void
config_monitor(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- int *pfilegen_token;
+ int_node *pfilegen_token;
const char *filegen_string;
const char *filegen_file;
FILEGEN *filegen;
- struct filegen_node *my_node;
- struct attr_val *my_opts;
+ filegen_node *my_node;
+ attr_val *my_opts;
int filegen_type;
int filegen_flag;
@@ -2015,45 +2092,58 @@ config_monitor(
*/
/* Turn on the specified statistics */
- pfilegen_token = queue_head(ptree->stats_list);
- while (pfilegen_token != NULL) {
- filegen_string = keyword(*pfilegen_token);
+ pfilegen_token = HEAD_PFIFO(ptree->stats_list);
+ for (; pfilegen_token != NULL; pfilegen_token = pfilegen_token->link) {
+ filegen_string = keyword(pfilegen_token->i);
filegen = filegen_get(filegen_string);
-
+ if (NULL == filegen) {
+ msyslog(LOG_ERR,
+ "stats %s unrecognized",
+ filegen_string);
+ continue;
+ }
DPRINTF(4, ("enabling filegen for %s statistics '%s%s'\n",
- filegen_string, filegen->prefix,
- filegen->basename));
- filegen->flag |= FGEN_FLAG_ENABLED;
- pfilegen_token = next_node(pfilegen_token);
+ filegen_string, filegen->dir,
+ filegen->fname));
+ filegen_flag = filegen->flag;
+ filegen_flag |= FGEN_FLAG_ENABLED;
+ filegen_config(filegen, statsdir, filegen_string,
+ filegen->type, filegen_flag);
}
/* Configure the statistics with the options */
- my_node = queue_head(ptree->filegen_opts);
- while (my_node != NULL) {
- filegen_file = keyword(my_node->filegen_token);
- filegen = filegen_get(filegen_file);
+ my_node = HEAD_PFIFO(ptree->filegen_opts);
+ for (; my_node != NULL; my_node = my_node->link) {
+ filegen_string = keyword(my_node->filegen_token);
+ filegen = filegen_get(filegen_string);
+ if (NULL == filegen) {
+ msyslog(LOG_ERR,
+ "filegen category '%s' unrecognized",
+ filegen_string);
+ continue;
+ }
+ filegen_file = filegen_string;
- /* Initialize the filegen variables to their pre-configurtion states */
+ /* Initialize the filegen variables to their pre-configuration states */
filegen_flag = filegen->flag;
filegen_type = filegen->type;
/* "filegen ... enabled" is the default (when filegen is used) */
filegen_flag |= FGEN_FLAG_ENABLED;
- my_opts = queue_head(my_node->options);
- while (my_opts != NULL) {
-
+ my_opts = HEAD_PFIFO(my_node->options);
+ for (; my_opts != NULL; my_opts = my_opts->link) {
switch (my_opts->attr) {
case T_File:
- filegen_file = my_opts->value.p;
+ filegen_file = my_opts->value.s;
break;
case T_Type:
switch (my_opts->value.i) {
default:
- NTP_INSIST(0);
+ INSIST(0);
break;
case T_None:
@@ -2106,23 +2196,22 @@ config_monitor(
break;
default:
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"Unknown filegen flag token %d",
my_opts->value.i);
exit(1);
}
break;
+
default:
msyslog(LOG_ERR,
"Unknown filegen option token %d",
my_opts->attr);
exit(1);
}
- my_opts = next_node(my_opts);
}
- filegen_config(filegen, filegen_file, filegen_type,
- filegen_flag);
- my_node = next_node(my_node);
+ filegen_config(filegen, statsdir, filegen_file,
+ filegen_type, filegen_flag);
}
}
@@ -2130,46 +2219,40 @@ config_monitor(
#ifdef FREE_CFG_T
static void
free_config_monitor(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- char **filegen_string;
- struct filegen_node *my_node;
- struct attr_val *my_opts;
-
if (ptree->stats_dir) {
free(ptree->stats_dir);
ptree->stats_dir = NULL;
}
- while (NULL != (filegen_string = dequeue(ptree->stats_list)))
- free_node(filegen_string);
-
- while (NULL != (my_node = dequeue(ptree->filegen_opts))) {
-
- while (NULL != (my_opts = dequeue(my_node->options)))
- free_node(my_opts);
-
- free_node(my_node);
- }
+ FREE_INT_FIFO(ptree->stats_list);
+ FREE_FILEGEN_FIFO(ptree->filegen_opts);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_access(
- struct config_tree *ptree
+ config_tree *ptree
)
{
static int warned_signd;
- struct attr_val * my_opt;
- struct restrict_node * my_node;
- int * curr_flag;
- sockaddr_u addr_sock;
- sockaddr_u addr_mask;
+ attr_val * my_opt;
+ restrict_node * my_node;
+ int_node * curr_flag;
+ sockaddr_u addr;
+ sockaddr_u mask;
+ struct addrinfo hints;
+ struct addrinfo * ai_list;
+ struct addrinfo * pai;
+ int rc;
+ int restrict_default;
u_short flags;
u_short mflags;
- int restrict_default;
+ int range_err;
const char * signd_warning =
#ifdef HAVE_NTP_SIGND
"MS-SNTP signd operations currently block ntpd degrading service to all clients.";
@@ -2177,95 +2260,139 @@ config_access(
"mssntp restrict bit ignored, this ntpd was configured without --enable-ntp-signd.";
#endif
- /* Configure the discard options */
- my_opt = queue_head(ptree->discard_opts);
- while (my_opt != NULL) {
+ /* Configure the mru options */
+ my_opt = HEAD_PFIFO(ptree->mru_opts);
+ for (; my_opt != NULL; my_opt = my_opt->link) {
- switch(my_opt->attr) {
+ range_err = FALSE;
- case T_Average:
- ntp_minpoll = my_opt->value.i;
+ switch (my_opt->attr) {
+
+ case T_Incalloc:
+ if (0 <= my_opt->value.i)
+ mru_incalloc = my_opt->value.u;
+ else
+ range_err = TRUE;
break;
- case T_Minimum:
- ntp_minpkt = my_opt->value.i;
+ case T_Incmem:
+ if (0 <= my_opt->value.i)
+ mru_incalloc = (my_opt->value.u * 1024U)
+ / sizeof(mon_entry);
+ else
+ range_err = TRUE;
break;
- case T_Monitor:
- mon_age = my_opt->value.i;
+ case T_Initalloc:
+ if (0 <= my_opt->value.i)
+ mru_initalloc = my_opt->value.u;
+ else
+ range_err = TRUE;
+ break;
+
+ case T_Initmem:
+ if (0 <= my_opt->value.i)
+ mru_initalloc = (my_opt->value.u * 1024U)
+ / sizeof(mon_entry);
+ else
+ range_err = TRUE;
+ break;
+
+ case T_Mindepth:
+ if (0 <= my_opt->value.i)
+ mru_mindepth = my_opt->value.u;
+ else
+ range_err = TRUE;
+ break;
+
+ case T_Maxage:
+ mru_maxage = my_opt->value.i;
+ break;
+
+ case T_Maxdepth:
+ if (0 <= my_opt->value.i)
+ mru_maxdepth = my_opt->value.u;
+ else
+ mru_maxdepth = UINT_MAX;
+ break;
+
+ case T_Maxmem:
+ if (0 <= my_opt->value.i)
+ mru_maxdepth = (my_opt->value.u * 1024U) /
+ sizeof(mon_entry);
+ else
+ mru_maxdepth = UINT_MAX;
break;
default:
msyslog(LOG_ERR,
- "Unknown discard option token %d",
- my_opt->attr);
+ "Unknown mru option %s (%d)",
+ keyword(my_opt->attr), my_opt->attr);
exit(1);
}
- my_opt = next_node(my_opt);
+ if (range_err)
+ msyslog(LOG_ERR,
+ "mru %s %d out of range, ignored.",
+ keyword(my_opt->attr), my_opt->value.i);
}
- /* Configure the restrict options */
- for (my_node = queue_head(ptree->restrict_opts);
- my_node != NULL;
- my_node = next_node(my_node)) {
-
- ZERO_SOCK(&addr_sock);
-
- if (NULL == my_node->addr) {
- /*
- * The user specified a default rule without a
- * -4 / -6 qualifier, add to both lists
- */
- restrict_default = 1;
- ZERO_SOCK(&addr_mask);
- } else {
- restrict_default = 0;
- /* Resolve the specified address */
- AF(&addr_sock) = (u_short)my_node->addr->type;
+ /* Configure the discard options */
+ my_opt = HEAD_PFIFO(ptree->discard_opts);
+ for (; my_opt != NULL; my_opt = my_opt->link) {
- if (getnetnum(my_node->addr->address,
- &addr_sock, 1, t_UNK) != 1) {
+ switch (my_opt->attr) {
+ case T_Average:
+ if (0 <= my_opt->value.i &&
+ my_opt->value.i <= UCHAR_MAX)
+ ntp_minpoll = (u_char)my_opt->value.u;
+ else
msyslog(LOG_ERR,
- "restrict: error in address '%s' on line %d. Ignoring...",
- my_node->addr->address, my_node->line_no);
- continue;
- }
+ "discard average %d out of range, ignored.",
+ my_opt->value.i);
+ break;
- SET_HOSTMASK(&addr_mask, AF(&addr_sock));
+ case T_Minimum:
+ ntp_minpkt = my_opt->value.i;
+ break;
- /* Resolve the mask */
- if (my_node->mask) {
- ZERO_SOCK(&addr_mask);
- AF(&addr_mask) = (u_short)my_node->mask->type;
- if (getnetnum(my_node->mask->address, &addr_mask, 1, t_MSK) != 1) {
+ case T_Monitor:
+ mon_age = my_opt->value.i;
+ break;
- msyslog(LOG_ERR,
- "restrict: error in mask '%s' on line %d. Ignoring...",
- my_node->mask->address, my_node->line_no);
- continue;
- }
- }
+ default:
+ msyslog(LOG_ERR,
+ "Unknown discard option %s (%d)",
+ keyword(my_opt->attr), my_opt->attr);
+ exit(1);
}
+ }
+ /* Configure the restrict options */
+ my_node = HEAD_PFIFO(ptree->restrict_opts);
+ for (; my_node != NULL; my_node = my_node->link) {
/* Parse the flags */
flags = 0;
mflags = 0;
- curr_flag = queue_head(my_node->flags);
- while (curr_flag != NULL) {
- switch (*curr_flag) {
+ curr_flag = HEAD_PFIFO(my_node->flags);
+ for (; curr_flag != NULL; curr_flag = curr_flag->link) {
+ switch (curr_flag->i) {
default:
- NTP_INSIST(0);
+ INSIST(0);
break;
case T_Ntpport:
mflags |= RESM_NTPONLY;
break;
+ case T_Source:
+ mflags |= RESM_SOURCE;
+ break;
+
case T_Flake:
- flags |= RES_TIMEOUT;
+ flags |= RES_FLAKE;
break;
case T_Ignore:
@@ -2292,6 +2419,10 @@ config_access(
flags |= RES_NOMODIFY;
break;
+ case T_Nomrulist:
+ flags |= RES_NOMRULIST;
+ break;
+
case T_Nopeer:
flags |= RES_NOPEER;
break;
@@ -2316,68 +2447,233 @@ config_access(
flags |= RES_VERSION;
break;
}
- curr_flag = next_node(curr_flag);
}
- /* Set the flags */
- if (restrict_default) {
- AF(&addr_sock) = AF_INET;
- hack_restrict(RESTRICT_FLAGS, &addr_sock, &addr_mask,
- mflags, flags);
+ if ((RES_MSSNTP & flags) && !warned_signd) {
+ warned_signd = 1;
+ fprintf(stderr, "%s\n", signd_warning);
+ msyslog(LOG_WARNING, "%s", signd_warning);
+ }
- AF(&addr_sock) = AF_INET6;
+ /* It would be swell if we could identify the line number */
+ if ((RES_KOD & flags) && !(RES_LIMITED & flags)) {
+ char *kod_where = (my_node->addr)
+ ? my_node->addr->address
+ : (mflags & RESM_SOURCE)
+ ? "source"
+ : "default";
+ char *kod_warn = "KOD does nothing without LIMITED.";
+
+ fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn);
+ msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn);
}
- hack_restrict(RESTRICT_FLAGS, &addr_sock, &addr_mask,
- mflags, flags);
+ ZERO_SOCK(&addr);
+ ai_list = NULL;
+ pai = NULL;
+ restrict_default = 0;
- if ((RES_MSSNTP & flags) && !warned_signd) {
- warned_signd = 1;
- fprintf(stderr, "%s\n", signd_warning);
- msyslog(LOG_WARNING, signd_warning);
+ if (NULL == my_node->addr) {
+ ZERO_SOCK(&mask);
+ if (!(RESM_SOURCE & mflags)) {
+ /*
+ * The user specified a default rule
+ * without a -4 / -6 qualifier, add to
+ * both lists
+ */
+ restrict_default = 1;
+ } else {
+ /* apply "restrict source ..." */
+ DPRINTF(1, ("restrict source template mflags %x flags %x\n",
+ mflags, flags));
+ hack_restrict(RESTRICT_FLAGS, NULL,
+ NULL, mflags, flags, 0);
+ continue;
+ }
+ } else {
+ /* Resolve the specified address */
+ AF(&addr) = (u_short)my_node->addr->type;
+
+ if (getnetnum(my_node->addr->address,
+ &addr, 1, t_UNK) != 1) {
+ /*
+ * Attempt a blocking lookup. This
+ * is in violation of the nonblocking
+ * design of ntpd's mainline code. The
+ * alternative of running without the
+ * restriction until the name resolved
+ * seems worse.
+ * Ideally some scheme could be used for
+ * restrict directives in the startup
+ * ntp.conf to delay starting up the
+ * protocol machinery until after all
+ * restrict hosts have been resolved.
+ */
+ ai_list = NULL;
+ ZERO(hints);
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_family = my_node->addr->type;
+ rc = getaddrinfo(my_node->addr->address,
+ "ntp", &hints,
+ &ai_list);
+ if (rc) {
+ msyslog(LOG_ERR,
+ "restrict: ignoring line %d, address/host '%s' unusable.",
+ my_node->line_no,
+ my_node->addr->address);
+ continue;
+ }
+ INSIST(ai_list != NULL);
+ pai = ai_list;
+ INSIST(pai->ai_addr != NULL);
+ INSIST(sizeof(addr) >=
+ pai->ai_addrlen);
+ memcpy(&addr, pai->ai_addr,
+ pai->ai_addrlen);
+ INSIST(AF_INET == AF(&addr) ||
+ AF_INET6 == AF(&addr));
+ }
+
+ SET_HOSTMASK(&mask, AF(&addr));
+
+ /* Resolve the mask */
+ if (my_node->mask) {
+ ZERO_SOCK(&mask);
+ AF(&mask) = my_node->mask->type;
+ if (getnetnum(my_node->mask->address,
+ &mask, 1, t_MSK) != 1) {
+ msyslog(LOG_ERR,
+ "restrict: ignoring line %d, mask '%s' unusable.",
+ my_node->line_no,
+ my_node->mask->address);
+ continue;
+ }
+ }
}
+
+ /* Set the flags */
+ if (restrict_default) {
+ AF(&addr) = AF_INET;
+ AF(&mask) = AF_INET;
+ hack_restrict(RESTRICT_FLAGS, &addr,
+ &mask, mflags, flags, 0);
+ AF(&addr) = AF_INET6;
+ AF(&mask) = AF_INET6;
+ }
+
+ do {
+ hack_restrict(RESTRICT_FLAGS, &addr,
+ &mask, mflags, flags, 0);
+ if (pai != NULL &&
+ NULL != (pai = pai->ai_next)) {
+ INSIST(pai->ai_addr != NULL);
+ INSIST(sizeof(addr) >=
+ pai->ai_addrlen);
+ ZERO_SOCK(&addr);
+ memcpy(&addr, pai->ai_addr,
+ pai->ai_addrlen);
+ INSIST(AF_INET == AF(&addr) ||
+ AF_INET6 == AF(&addr));
+ SET_HOSTMASK(&mask, AF(&addr));
+ }
+ } while (pai != NULL);
+
+ if (ai_list != NULL)
+ freeaddrinfo(ai_list);
}
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_access(
- struct config_tree *ptree
+ config_tree *ptree
+ )
+{
+ FREE_ATTR_VAL_FIFO(ptree->mru_opts);
+ FREE_ATTR_VAL_FIFO(ptree->discard_opts);
+ FREE_RESTRICT_FIFO(ptree->restrict_opts);
+}
+#endif /* FREE_CFG_T */
+
+
+static void
+config_rlimit(
+ config_tree *ptree
)
{
- struct attr_val * my_opt;
- struct restrict_node * my_node;
- int * curr_flag;
+ attr_val * rlimit_av;
+
+ rlimit_av = HEAD_PFIFO(ptree->rlimit);
+ for (; rlimit_av != NULL; rlimit_av = rlimit_av->link) {
+ switch (rlimit_av->attr) {
+
+ default:
+ INSIST(0);
+ break;
+
+ case T_Memlock:
+ if (rlimit_av->value.i != 0) {
+#if defined(RLIMIT_MEMLOCK)
+ ntp_rlimit(RLIMIT_MEMLOCK,
+ (rlim_t)(rlimit_av->value.i * 1024 * 1024),
+ 1024 * 1024,
+ "MB");
+#else
+ /* STDERR as well would be fine... */
+ msyslog(LOG_WARNING, "'rlimit memlock' specified but is not available on this system.");
+#endif /* RLIMIT_MEMLOCK */
+ } else {
+ do_memlock = 0;
+ }
+ break;
- while (NULL != (my_opt = dequeue(ptree->discard_opts)))
- free_node(my_opt);
+ case T_Stacksize:
+#if defined(RLIMIT_STACK)
+ ntp_rlimit(RLIMIT_STACK,
+ (rlim_t)(rlimit_av->value.i * 4096),
+ 4096,
+ "4k");
+#else
+ /* STDERR as well would be fine... */
+ msyslog(LOG_WARNING, "'rlimit stacksize' specified but is not available on this system.");
+#endif /* RLIMIT_STACK */
+ break;
- while (NULL != (my_node = dequeue(ptree->restrict_opts))) {
- while (NULL != (curr_flag = dequeue(my_node->flags)))
- free_node(curr_flag);
+ case T_Filenum:
+#if defined(RLIMIT_NOFILE)
+ ntp_rlimit(RLIMIT_NOFILE,
+ (rlim_t)(rlimit_av->value.i),
+ 1,
+ "");
+#else
+ /* STDERR as well would be fine... */
+ msyslog(LOG_WARNING, "'rlimit filenum' specified but is not available on this system.");
+#endif /* RLIMIT_NOFILE */
+ break;
- destroy_restrict_node(my_node);
+ }
}
}
-#endif /* FREE_CFG_T */
static void
config_tinker(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *tinker;
- int item;
+ attr_val * tinker;
+ int item;
item = -1; /* quiet warning */
- tinker = queue_head(ptree->tinker);
- while (tinker != NULL) {
+ tinker = HEAD_PFIFO(ptree->tinker);
+ for (; tinker != NULL; tinker = tinker->link) {
switch (tinker->attr) {
default:
- NTP_INSIST(0);
+ INSIST(0);
break;
case T_Allan:
@@ -2407,23 +2703,31 @@ config_tinker(
case T_Stepout:
item = LOOP_MINSTEP;
break;
+
+ case T_Tick:
+ item = LOOP_TICK;
+ break;
}
loop_config(item, tinker->value.d);
- tinker = next_node(tinker);
}
}
#ifdef FREE_CFG_T
static void
-free_config_tinker(
- struct config_tree *ptree
+free_config_rlimit(
+ config_tree *ptree
)
{
- struct attr_val *tinker;
+ FREE_ATTR_VAL_FIFO(ptree->rlimit);
+}
- while (NULL != (tinker = dequeue(ptree->tinker)))
- free_node(tinker);
+static void
+free_config_tinker(
+ config_tree *ptree
+ )
+{
+ FREE_ATTR_VAL_FIFO(ptree->tinker);
}
#endif /* FREE_CFG_T */
@@ -2431,9 +2735,10 @@ free_config_tinker(
/*
* config_nic_rules - apply interface listen/ignore/drop items
*/
-void
+#ifndef SIM
+static void
config_nic_rules(
- struct config_tree *ptree
+ config_tree *ptree
)
{
nic_rule_node * curr_node;
@@ -2445,7 +2750,7 @@ config_nic_rules(
int prefixlen;
int addrbits;
- curr_node = queue_head(ptree->nic_rules);
+ curr_node = HEAD_PFIFO(ptree->nic_rules);
if (curr_node != NULL
&& (HAVE_OPT( NOVIRTUALIPS ) || HAVE_OPT( INTERFACE ))) {
@@ -2458,10 +2763,7 @@ config_nic_rules(
return;
}
- for (;
- curr_node != NULL;
- curr_node = next_node(curr_node)) {
-
+ for (; curr_node != NULL; curr_node = curr_node->link) {
prefixlen = -1;
if_name = curr_node->if_name;
if (if_name != NULL)
@@ -2476,7 +2778,7 @@ config_nic_rules(
* other reason.
*/
match_type = MATCH_ALL;
- NTP_INSIST(0);
+ INSIST(FALSE);
break;
case 0:
@@ -2486,15 +2788,15 @@ config_nic_rules(
* interface descriptor is either a name or
* address, stored in if_name in either case.
*/
- NTP_INSIST(if_name != NULL);
+ INSIST(if_name != NULL);
pchSlash = strchr(if_name, '/');
if (pchSlash != NULL)
*pchSlash = '\0';
- if (is_ip_address(if_name, &addr)) {
+ if (is_ip_address(if_name, AF_UNSPEC, &addr)) {
match_type = MATCH_IFADDR;
- if (pchSlash != NULL) {
- sscanf(pchSlash + 1, "%d",
- &prefixlen);
+ if (pchSlash != NULL
+ && 1 == sscanf(pchSlash + 1, "%d",
+ &prefixlen)) {
addrbits = 8 *
SIZEOF_INADDR(AF(&addr));
prefixlen = max(-1, prefixlen);
@@ -2534,7 +2836,7 @@ config_nic_rules(
* other reason.
*/
action = ACTION_LISTEN;
- NTP_INSIST(0);
+ INSIST(FALSE);
break;
case T_Listen:
@@ -2557,41 +2859,47 @@ config_nic_rules(
free(if_name);
}
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_nic_rules(
- struct config_tree *ptree
+ config_tree *ptree
)
{
nic_rule_node *curr_node;
- while (NULL != (curr_node = dequeue(ptree->nic_rules))) {
- if (curr_node->if_name != NULL)
+ if (ptree->nic_rules != NULL) {
+ for (;;) {
+ UNLINK_FIFO(curr_node, *ptree->nic_rules, link);
+ if (NULL == curr_node)
+ break;
free(curr_node->if_name);
- free_node(curr_node);
+ free(curr_node);
+ }
+ free(ptree->nic_rules);
+ ptree->nic_rules = NULL;
}
- DESTROY_QUEUE(ptree->nic_rules);
}
#endif /* FREE_CFG_T */
static void
apply_enable_disable(
- queue * q,
- int enable
+ attr_val_fifo * fifo,
+ int enable
)
{
- struct attr_val *curr_flag;
+ attr_val *curr_flag;
int option;
#ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
bc_entry *pentry;
#endif
- for (curr_flag = queue_head(q);
+ for (curr_flag = HEAD_PFIFO(fifo);
curr_flag != NULL;
- curr_flag = next_node(curr_flag)) {
+ curr_flag = curr_flag->link) {
option = curr_flag->value.i;
switch (option) {
@@ -2626,6 +2934,10 @@ apply_enable_disable(
proto_config(PROTO_NTP, enable, 0., NULL);
break;
+ case T_Mode7:
+ proto_config(PROTO_MODE7, enable, 0., NULL);
+ break;
+
case T_Stats:
proto_config(PROTO_FILEGEN, enable, 0., NULL);
break;
@@ -2639,7 +2951,7 @@ apply_enable_disable(
pentry++;
}
if (!pentry->token) {
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"compat token %d not in bc_list[]",
option);
continue;
@@ -2654,7 +2966,7 @@ apply_enable_disable(
static void
config_system_opts(
- struct config_tree *ptree
+ config_tree *ptree
)
{
apply_enable_disable(ptree->enable_opts, 1);
@@ -2665,42 +2977,41 @@ config_system_opts(
#ifdef FREE_CFG_T
static void
free_config_system_opts(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *flag;
-
- while (NULL != (flag = dequeue(ptree->enable_opts)))
- free_node(flag);
-
- while (NULL != (flag = dequeue(ptree->disable_opts)))
- free_node(flag);
+ FREE_ATTR_VAL_FIFO(ptree->enable_opts);
+ FREE_ATTR_VAL_FIFO(ptree->disable_opts);
}
#endif /* FREE_CFG_T */
static void
config_logconfig(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *my_logconfig;
+ attr_val * my_lc;
- my_logconfig = queue_head(ptree->logconfig);
- while (my_logconfig != NULL) {
+ my_lc = HEAD_PFIFO(ptree->logconfig);
+ for (; my_lc != NULL; my_lc = my_lc->link) {
+ switch (my_lc->attr) {
- switch (my_logconfig->attr) {
case '+':
- ntp_syslogmask |= get_logmask(my_logconfig->value.s);
+ ntp_syslogmask |= get_logmask(my_lc->value.s);
break;
+
case '-':
- ntp_syslogmask &= ~get_logmask(my_logconfig->value.s);
+ ntp_syslogmask &= ~get_logmask(my_lc->value.s);
break;
+
case '=':
- ntp_syslogmask = get_logmask(my_logconfig->value.s);
+ ntp_syslogmask = get_logmask(my_lc->value.s);
+ break;
+ default:
+ INSIST(0);
break;
}
- my_logconfig = next_node(my_logconfig);
}
}
@@ -2708,143 +3019,64 @@ config_logconfig(
#ifdef FREE_CFG_T
static void
free_config_logconfig(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *my_logconfig;
-
- while (NULL != (my_logconfig = dequeue(ptree->logconfig))) {
- free(my_logconfig->value.s);
- free_node(my_logconfig);
- }
+ FREE_ATTR_VAL_FIFO(ptree->logconfig);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_phone(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- int i = 0;
- char **s;
+ int i;
+ string_node * sn;
- s = queue_head(ptree->phone);
- while (s != NULL) {
+ i = 0;
+ sn = HEAD_PFIFO(ptree->phone);
+ for (; sn != NULL; sn = sn->link) {
+ /* need to leave array entry for NULL terminator */
if (i < COUNTOF(sys_phone) - 1) {
- sys_phone[i++] = estrdup(*s);
+ sys_phone[i++] = estrdup(sn->s);
sys_phone[i] = NULL;
} else {
msyslog(LOG_INFO,
"phone: Number of phone entries exceeds %lu. Ignoring phone %s...",
- (u_long)(COUNTOF(sys_phone) - 1), *s);
+ (u_long)(COUNTOF(sys_phone) - 1), sn->s);
}
- s = next_node(s);
}
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_phone(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- char **s;
-
- while (NULL != (s = dequeue(ptree->phone))) {
- free(*s);
- free_node(s);
- }
-}
-#endif /* FREE_CFG_T */
-
-
-static void
-config_qos(
- struct config_tree *ptree
- )
-{
- struct attr_val *my_qosconfig;
- char *s;
-#ifdef HAVE_IPTOS_SUPPORT
- unsigned int qtos = 0;
-#endif
-
- my_qosconfig = queue_head(ptree->qos);
- while (my_qosconfig != NULL) {
- s = my_qosconfig->value.s;
-#ifdef HAVE_IPTOS_SUPPORT
- if (!strcmp(s, "lowdelay"))
- qtos = CONF_QOS_LOWDELAY;
- else if (!strcmp(s, "throughput"))
- qtos = CONF_QOS_THROUGHPUT;
- else if (!strcmp(s, "reliability"))
- qtos = CONF_QOS_RELIABILITY;
- else if (!strcmp(s, "mincost"))
- qtos = CONF_QOS_MINCOST;
-#ifdef IPTOS_PREC_INTERNETCONTROL
- else if (!strcmp(s, "routine") || !strcmp(s, "cs0"))
- qtos = CONF_QOS_CS0;
- else if (!strcmp(s, "priority") || !strcmp(s, "cs1"))
- qtos = CONF_QOS_CS1;
- else if (!strcmp(s, "immediate") || !strcmp(s, "cs2"))
- qtos = CONF_QOS_CS2;
- else if (!strcmp(s, "flash") || !strcmp(s, "cs3"))
- qtos = CONF_QOS_CS3; /* overlapping prefix on keyword */
- if (!strcmp(s, "flashoverride") || !strcmp(s, "cs4"))
- qtos = CONF_QOS_CS4;
- else if (!strcmp(s, "critical") || !strcmp(s, "cs5"))
- qtos = CONF_QOS_CS5;
- else if(!strcmp(s, "internetcontrol") || !strcmp(s, "cs6"))
- qtos = CONF_QOS_CS6;
- else if (!strcmp(s, "netcontrol") || !strcmp(s, "cs7"))
- qtos = CONF_QOS_CS7;
-#endif /* IPTOS_PREC_INTERNETCONTROL */
- if (qtos == 0)
- msyslog(LOG_ERR, "parse error, qos %s not accepted\n", s);
- else
- qos = qtos;
-#endif /* HAVE IPTOS_SUPPORT */
- /*
- * value is set, but not being effective. Need code to
- * change the current connections to notice. Might
- * also consider logging a message about the action.
- * XXX msyslog(LOG_INFO, "QoS %s requested by config\n", s);
- */
- my_qosconfig = next_node(my_qosconfig);
- }
-}
-
-
-#ifdef FREE_CFG_T
-static void
-free_config_qos(
- struct config_tree *ptree
- )
-{
- struct attr_val *my_qosconfig;
-
- while (NULL != (my_qosconfig = dequeue(ptree->qos))) {
- free(my_qosconfig->value.s);
- free_node(my_qosconfig);
- }
+ FREE_STRING_FIFO(ptree->phone);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_setvar(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct setvar_node *my_node;
+ setvar_node *my_node;
size_t varlen, vallen, octets;
char * str;
str = NULL;
- my_node = queue_head(ptree->setvar);
- while (my_node != NULL) {
+ my_node = HEAD_PFIFO(ptree->setvar);
+ for (; my_node != NULL; my_node = my_node->link) {
varlen = strlen(my_node->var);
vallen = strlen(my_node->val);
octets = varlen + vallen + 1 + 1;
@@ -2852,112 +3084,104 @@ config_setvar(
snprintf(str, octets, "%s=%s", my_node->var,
my_node->val);
set_sys_var(str, octets, (my_node->isdefault)
- ? DEF
+ ? DEF
: 0);
- my_node = next_node(my_node);
}
if (str != NULL)
free(str);
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_setvar(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct setvar_node *my_node;
-
- while (NULL != (my_node = dequeue(ptree->setvar))) {
- free(my_node->var);
- free(my_node->val);
- free_node(my_node);
- }
+ FREE_SETVAR_FIFO(ptree->setvar);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_ttl(
- struct config_tree *ptree
+ config_tree *ptree
)
{
int i = 0;
- int *curr_ttl;
+ int_node *curr_ttl;
- curr_ttl = queue_head(ptree->ttl);
- while (curr_ttl != NULL) {
+ curr_ttl = HEAD_PFIFO(ptree->ttl);
+ for (; curr_ttl != NULL; curr_ttl = curr_ttl->link) {
if (i < COUNTOF(sys_ttl))
- sys_ttl[i++] = (u_char)*curr_ttl;
+ sys_ttl[i++] = (u_char)curr_ttl->i;
else
msyslog(LOG_INFO,
"ttl: Number of TTL entries exceeds %lu. Ignoring TTL %d...",
- (u_long)COUNTOF(sys_ttl), *curr_ttl);
-
- curr_ttl = next_node(curr_ttl);
+ (u_long)COUNTOF(sys_ttl), curr_ttl->i);
}
sys_ttlmax = i - 1;
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_ttl(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- /* coming DESTROY_QUEUE(ptree->ttl) is enough */
+ FREE_INT_FIFO(ptree->ttl);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_trap(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct addr_opts_node *curr_trap;
- struct attr_val *curr_opt;
+ addr_opts_node *curr_trap;
+ attr_val *curr_opt;
sockaddr_u addr_sock;
sockaddr_u peeraddr;
- struct address_node *addr_node;
struct interface *localaddr;
- u_short port_no;
+ struct addrinfo hints;
+ char port_text[8];
+ settrap_parms *pstp;
+ u_short port;
int err_flag;
+ int rc;
/* silence warning about addr_sock potentially uninitialized */
AF(&addr_sock) = AF_UNSPEC;
- for (curr_trap = queue_head(ptree->trap);
- curr_trap != NULL;
- curr_trap = next_node(curr_trap)) {
-
+ curr_trap = HEAD_PFIFO(ptree->trap);
+ for (; curr_trap != NULL; curr_trap = curr_trap->link) {
err_flag = 0;
- port_no = 0;
+ port = 0;
localaddr = NULL;
- curr_opt = queue_head(curr_trap->options);
- while (curr_opt != NULL) {
+ curr_opt = HEAD_PFIFO(curr_trap->options);
+ for (; curr_opt != NULL; curr_opt = curr_opt->link) {
if (T_Port == curr_opt->attr) {
- if (curr_opt->value.i < 1
+ if (curr_opt->value.i < 1
|| curr_opt->value.i > USHRT_MAX) {
msyslog(LOG_ERR,
"invalid port number "
- "%d, trap ignored",
+ "%d, trap ignored",
curr_opt->value.i);
err_flag = 1;
}
- port_no = (u_short)curr_opt->value.i;
+ port = (u_short)curr_opt->value.i;
}
else if (T_Interface == curr_opt->attr) {
- addr_node = curr_opt->value.p;
-
/* Resolve the interface address */
ZERO_SOCK(&addr_sock);
- AF(&addr_sock) = (u_short)addr_node->type;
-
- if (getnetnum(addr_node->address,
+ if (getnetnum(curr_opt->value.s,
&addr_sock, 1, t_UNK) != 1) {
err_flag = 1;
break;
@@ -2972,20 +3196,57 @@ config_trap(
err_flag = 1;
}
}
- curr_opt = next_node(curr_opt);
}
/* Now process the trap for the specified interface
* and port number
*/
if (!err_flag) {
+ if (!port)
+ port = TRAPPORT;
ZERO_SOCK(&peeraddr);
- if (1 != getnetnum(curr_trap->addr->address,
- &peeraddr, 1, t_UNK))
+ rc = getnetnum(curr_trap->addr->address,
+ &peeraddr, 1, t_UNK);
+ if (1 != rc) {
+#ifndef WORKER
+ msyslog(LOG_ERR,
+ "trap: unable to use IP address %s.",
+ curr_trap->addr->address);
+#else /* WORKER follows */
+ /*
+ * save context and hand it off
+ * for name resolution.
+ */
+ ZERO(hints);
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_socktype = SOCK_DGRAM;
+ snprintf(port_text, sizeof(port_text),
+ "%u", port);
+ hints.ai_flags = Z_AI_NUMERICSERV;
+ pstp = emalloc_zero(sizeof(*pstp));
+ if (localaddr != NULL) {
+ hints.ai_family = localaddr->family;
+ pstp->ifaddr_nonnull = 1;
+ memcpy(&pstp->ifaddr,
+ &localaddr->sin,
+ sizeof(pstp->ifaddr));
+ }
+ rc = getaddrinfo_sometime(
+ curr_trap->addr->address,
+ port_text, &hints,
+ INITIAL_DNS_RETRY,
+ &trap_name_resolved,
+ pstp);
+ if (!rc)
+ msyslog(LOG_ERR,
+ "config_trap: getaddrinfo_sometime(%s,%s): %m",
+ curr_trap->addr->address,
+ port_text);
+#endif /* WORKER */
continue;
-
+ }
/* port is at same location for v4 and v6 */
- SET_PORT(&peeraddr, port_no ? port_no : TRAPPORT);
+ SET_PORT(&peeraddr, port);
if (NULL == localaddr)
localaddr = ANY_INTERFACE_CHOOSE(&peeraddr);
@@ -2995,54 +3256,89 @@ config_trap(
if (!ctlsettrap(&peeraddr, localaddr, 0,
NTP_VERSION))
msyslog(LOG_ERR,
- "can't set trap for %s",
+ "set trap %s -> %s failed.",
+ latoa(localaddr),
stoa(&peeraddr));
}
}
}
-#ifdef FREE_CFG_T
+/*
+ * trap_name_resolved()
+ *
+ * Callback invoked when config_trap()'s DNS lookup completes.
+ */
+# ifdef WORKER
static void
-free_config_trap(
- struct config_tree *ptree
+trap_name_resolved(
+ int rescode,
+ int gai_errno,
+ void * context,
+ const char * name,
+ const char * service,
+ const struct addrinfo * hints,
+ const struct addrinfo * res
)
{
- struct addr_opts_node *curr_trap;
- struct attr_val *curr_opt;
- struct address_node *addr_node;
-
- while (NULL != (curr_trap = dequeue(ptree->trap))) {
- while (curr_trap->options != NULL && NULL !=
- (curr_opt = dequeue(curr_trap->options))) {
+ settrap_parms *pstp;
+ struct interface *localaddr;
+ sockaddr_u peeraddr;
- if (T_Interface == curr_opt->attr) {
- addr_node = curr_opt->value.p;
- destroy_address_node(addr_node);
- }
- free_node(curr_opt);
- }
- DESTROY_QUEUE(curr_trap->options);
- free_node(curr_trap);
+ (void)gai_errno;
+ (void)service;
+ (void)hints;
+ pstp = context;
+ if (rescode) {
+ msyslog(LOG_ERR,
+ "giving up resolving trap host %s: %s (%d)",
+ name, gai_strerror(rescode), rescode);
+ free(pstp);
+ return;
}
+ INSIST(sizeof(peeraddr) >= res->ai_addrlen);
+ ZERO(peeraddr);
+ memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
+ localaddr = NULL;
+ if (pstp->ifaddr_nonnull)
+ localaddr = findinterface(&pstp->ifaddr);
+ if (NULL == localaddr)
+ localaddr = ANY_INTERFACE_CHOOSE(&peeraddr);
+ if (!ctlsettrap(&peeraddr, localaddr, 0, NTP_VERSION))
+ msyslog(LOG_ERR, "set trap %s -> %s failed.",
+ latoa(localaddr), stoa(&peeraddr));
+ free(pstp);
+}
+# endif /* WORKER */
+#endif /* !SIM */
+
+
+#ifdef FREE_CFG_T
+static void
+free_config_trap(
+ config_tree *ptree
+ )
+{
+ FREE_ADDR_OPTS_FIFO(ptree->trap);
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_fudge(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct addr_opts_node *curr_fudge;
- struct attr_val *curr_opt;
+ addr_opts_node *curr_fudge;
+ attr_val *curr_opt;
sockaddr_u addr_sock;
- struct address_node *addr_node;
+ address_node *addr_node;
struct refclockstat clock_stat;
int err_flag;
- curr_fudge = queue_head(ptree->fudge);
- while (curr_fudge != NULL) {
+ curr_fudge = HEAD_PFIFO(ptree->fudge);
+ for (; curr_fudge != NULL; curr_fudge = curr_fudge->link) {
err_flag = 0;
/* Get the reference clock address and
@@ -3051,33 +3347,41 @@ config_fudge(
addr_node = curr_fudge->addr;
ZERO_SOCK(&addr_sock);
if (getnetnum(addr_node->address, &addr_sock, 1, t_REF)
- != 1)
+ != 1) {
err_flag = 1;
+ msyslog(LOG_ERR,
+ "unrecognized fudge reference clock address %s, line ignored",
+ stoa(&addr_sock));
+ }
if (!ISREFCLOCKADR(&addr_sock)) {
+ err_flag = 1;
msyslog(LOG_ERR,
"inappropriate address %s for the fudge command, line ignored",
stoa(&addr_sock));
- err_flag = 1;
}
/* Parse all the options to the fudge command */
- memset(&clock_stat, 0, sizeof(clock_stat));
- curr_opt = queue_head(curr_fudge->options);
- while (curr_opt != NULL) {
+ ZERO(clock_stat);
+ curr_opt = HEAD_PFIFO(curr_fudge->options);
+ for (; curr_opt != NULL; curr_opt = curr_opt->link) {
switch (curr_opt->attr) {
+
case T_Time1:
clock_stat.haveflags |= CLK_HAVETIME1;
clock_stat.fudgetime1 = curr_opt->value.d;
break;
+
case T_Time2:
clock_stat.haveflags |= CLK_HAVETIME2;
clock_stat.fudgetime2 = curr_opt->value.d;
break;
+
case T_Stratum:
clock_stat.haveflags |= CLK_HAVEVAL1;
clock_stat.fudgeval1 = curr_opt->value.i;
break;
+
case T_Refid:
clock_stat.haveflags |= CLK_HAVEVAL2;
clock_stat.fudgeval2 = 0;
@@ -3085,6 +3389,7 @@ config_fudge(
curr_opt->value.s,
min(strlen(curr_opt->value.s), 4));
break;
+
case T_Flag1:
clock_stat.haveflags |= CLK_HAVEFLAG1;
if (curr_opt->value.i)
@@ -3092,6 +3397,7 @@ config_fudge(
else
clock_stat.flags &= ~CLK_FLAG1;
break;
+
case T_Flag2:
clock_stat.haveflags |= CLK_HAVEFLAG2;
if (curr_opt->value.i)
@@ -3099,6 +3405,7 @@ config_fudge(
else
clock_stat.flags &= ~CLK_FLAG2;
break;
+
case T_Flag3:
clock_stat.haveflags |= CLK_HAVEFLAG3;
if (curr_opt->value.i)
@@ -3106,6 +3413,7 @@ config_fudge(
else
clock_stat.flags &= ~CLK_FLAG3;
break;
+
case T_Flag4:
clock_stat.haveflags |= CLK_HAVEFLAG4;
if (curr_opt->value.i)
@@ -3113,107 +3421,85 @@ config_fudge(
else
clock_stat.flags &= ~CLK_FLAG4;
break;
+
default:
msyslog(LOG_ERR,
- "Unexpected fudge internal flag 0x%x for %s\n",
+ "Unexpected fudge flag %s (%d) for %s",
+ token_name(curr_opt->attr),
curr_opt->attr, stoa(&addr_sock));
exit(curr_opt->attr ? curr_opt->attr : 1);
}
-
- curr_opt = next_node(curr_opt);
}
-
-#ifdef REFCLOCK
+# ifdef REFCLOCK
if (!err_flag)
- refclock_control(&addr_sock, &clock_stat,
- (struct refclockstat *)0);
-#endif
-
- curr_fudge = next_node(curr_fudge);
+ refclock_control(&addr_sock, &clock_stat, NULL);
+# endif
}
}
+#endif /* !SIM */
#ifdef FREE_CFG_T
static void
free_config_fudge(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct addr_opts_node *curr_fudge;
- struct attr_val *curr_opt;
-
- while (NULL != (curr_fudge = dequeue(ptree->fudge))) {
- while (NULL != (curr_opt = dequeue(curr_fudge->options))) {
-
- switch (curr_opt->attr) {
- case CLK_HAVEVAL2:
- free(curr_opt->value.s);
- }
-
- free_node(curr_opt);
- }
-
- DESTROY_QUEUE(curr_fudge->options);
- free_node(curr_fudge);
- }
+ FREE_ADDR_OPTS_FIFO(ptree->fudge);
}
#endif /* FREE_CFG_T */
static void
config_vars(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *curr_var;
- FILE *new_file;
+ attr_val *curr_var;
int len;
- curr_var = queue_head(ptree->vars);
- while (curr_var != NULL) {
+ curr_var = HEAD_PFIFO(ptree->vars);
+ for (; curr_var != NULL; curr_var = curr_var->link) {
/* Determine which variable to set and set it */
switch (curr_var->attr) {
+
case T_Broadcastdelay:
proto_config(PROTO_BROADDELAY, 0, curr_var->value.d, NULL);
break;
- case T_Calldelay:
- proto_config(PROTO_CALLDELAY, curr_var->value.i, 0, NULL);
- break;
+
case T_Tick:
- proto_config(PROTO_ADJ, 0, curr_var->value.d, NULL);
+ loop_config(LOOP_TICK, curr_var->value.d);
break;
+
case T_Driftfile:
if ('\0' == curr_var->value.s[0]) {
stats_drift_file = 0;
- msyslog(LOG_INFO, "config: driftfile disabled\n");
+ msyslog(LOG_INFO, "config: driftfile disabled");
} else
stats_config(STATS_FREQ_FILE, curr_var->value.s);
break;
- case T_WanderThreshold:
+
+ case T_Ident:
+ sys_ident = curr_var->value.s;
+ break;
+
+ case T_WanderThreshold: /* FALLTHROUGH */
+ case T_Nonvolatile:
wander_threshold = curr_var->value.d;
break;
+
case T_Leapfile:
stats_config(STATS_LEAP_FILE, curr_var->value.s);
break;
+
case T_Pidfile:
stats_config(STATS_PID_FILE, curr_var->value.s);
break;
+
case T_Logfile:
- new_file = fopen(curr_var->value.s, "a");
- if (new_file != NULL) {
- NLOG(NLOG_SYSINFO) /* conditional if clause for conditional syslog */
- msyslog(LOG_NOTICE, "logging to file %s", curr_var->value.s);
- if (syslog_file != NULL &&
- fileno(syslog_file) != fileno(new_file))
- (void)fclose(syslog_file);
-
- syslog_file = new_file;
- syslogit = 0;
- }
- else
+ if (-1 == change_logfile(curr_var->value.s, TRUE))
msyslog(LOG_ERR,
- "Cannot open log file %s",
+ "Cannot open logfile %s: %m",
curr_var->value.s);
break;
@@ -3221,26 +3507,27 @@ config_vars(
if (saveconfigdir != NULL)
free(saveconfigdir);
len = strlen(curr_var->value.s);
- if (0 == len)
+ if (0 == len) {
saveconfigdir = NULL;
- else if (DIR_SEP != curr_var->value.s[len - 1]
+ } else if (DIR_SEP != curr_var->value.s[len - 1]
#ifdef SYS_WINNT /* slash is also a dir. sep. on Windows */
- && '/' != curr_var->value.s[len - 1]
+ && '/' != curr_var->value.s[len - 1]
#endif
- ) {
+ ) {
len++;
saveconfigdir = emalloc(len + 1);
snprintf(saveconfigdir, len + 1,
"%s%c",
curr_var->value.s,
DIR_SEP);
- } else
+ } else {
saveconfigdir = estrdup(
curr_var->value.s);
+ }
break;
case T_Automax:
-#ifdef OPENSSL
+#ifdef AUTOKEY
sys_automax = curr_var->value.i;
#endif
break;
@@ -3250,7 +3537,6 @@ config_vars(
"config_vars(): unexpected token %d",
curr_var->attr);
}
- curr_var = next_node(curr_var);
}
}
@@ -3258,22 +3544,10 @@ config_vars(
#ifdef FREE_CFG_T
static void
free_config_vars(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct attr_val *curr_var;
-
- while (NULL != (curr_var = dequeue(ptree->vars))) {
- /* Determine which variable to set and set it */
- switch (curr_var->attr) {
- case T_Driftfile:
- case T_Leapfile:
- case T_Pidfile:
- case T_Logfile:
- free(curr_var->value.s);
- }
- free_node(curr_var);
- }
+ FREE_ATTR_VAL_FIFO(ptree->vars);
}
#endif /* FREE_CFG_T */
@@ -3319,326 +3593,579 @@ is_sane_resolved_address(
return 1;
}
-static int
+
+#ifndef SIM
+static u_char
get_correct_host_mode(
- int hmode
+ int token
)
{
- switch (hmode) {
- case T_Server:
- case T_Pool:
- case T_Manycastclient:
+ switch (token) {
+
+ case T_Server:
+ case T_Pool:
+ case T_Manycastclient:
return MODE_CLIENT;
- break;
- case T_Peer:
+
+ case T_Peer:
return MODE_ACTIVE;
- break;
- case T_Broadcast:
+
+ case T_Broadcast:
return MODE_BROADCAST;
- break;
- default:
- return -1;
+
+ default:
+ return 0;
}
}
-static void
-config_peers(
- struct config_tree *ptree
+
+/*
+ * peerflag_bits() get config_peers() peerflags value from a
+ * peer_node's queue of flag attr_val entries.
+ */
+static int
+peerflag_bits(
+ peer_node *pn
)
{
- struct addrinfo *res, *res_bak;
- sockaddr_u peeraddr;
- struct peer_node *curr_peer;
- struct attr_val *option;
- int hmode;
int peerflags;
- int status;
- int no_needed;
- int i;
+ attr_val *option;
- curr_peer = queue_head(ptree->peers);
- while (curr_peer != NULL) {
- /* Find the number of associations needed.
- * If a pool coomand is specified, then sys_maxclock needed
- * else, only one is needed
- */
- no_needed = (T_Pool == curr_peer->host_mode)
- ? sys_maxclock
- : 1;
+ /* translate peerflags options to bits */
+ peerflags = 0;
+ option = HEAD_PFIFO(pn->peerflags);
+ for (; option != NULL; option = option->link) {
+ switch (option->value.i) {
- /* Find the correct host-mode */
- hmode = get_correct_host_mode(curr_peer->host_mode);
- NTP_INSIST(hmode != -1);
+ default:
+ INSIST(0);
+ break;
- /* translate peerflags options to bits */
- peerflags = 0;
- option = queue_head(curr_peer->peerflags);
- for (; option != NULL; option = next_node(option))
- switch (option->value.i) {
+ case T_Autokey:
+ peerflags |= FLAG_SKEY;
+ break;
- default:
- NTP_INSIST(0);
- break;
+ case T_Burst:
+ peerflags |= FLAG_BURST;
+ break;
- case T_Autokey:
- peerflags |= FLAG_SKEY;
- break;
+ case T_Iburst:
+ peerflags |= FLAG_IBURST;
+ break;
- case T_Burst:
- peerflags |= FLAG_BURST;
- break;
+ case T_Noselect:
+ peerflags |= FLAG_NOSELECT;
+ break;
- case T_Iburst:
- peerflags |= FLAG_IBURST;
- break;
+ case T_Preempt:
+ peerflags |= FLAG_PREEMPT;
+ break;
- case T_Noselect:
- peerflags |= FLAG_NOSELECT;
- break;
+ case T_Prefer:
+ peerflags |= FLAG_PREFER;
+ break;
- case T_Preempt:
- peerflags |= FLAG_PREEMPT;
- break;
+ case T_True:
+ peerflags |= FLAG_TRUE;
+ break;
- case T_Prefer:
- peerflags |= FLAG_PREFER;
- break;
+ case T_Xleave:
+ peerflags |= FLAG_XLEAVE;
+ break;
+ }
+ }
- case T_True:
- peerflags |= FLAG_TRUE;
- break;
+ return peerflags;
+}
- case T_Xleave:
- peerflags |= FLAG_XLEAVE;
- break;
- }
- /* Attempt to resolve the address */
- ZERO_SOCK(&peeraddr);
- AF(&peeraddr) = (u_short)curr_peer->addr->type;
+static void
+config_peers(
+ config_tree *ptree
+ )
+{
+ sockaddr_u peeraddr;
+ struct addrinfo hints;
+ peer_node * curr_peer;
+ peer_resolved_ctx * ctx;
+ u_char hmode;
- status = get_multiple_netnums(curr_peer->addr->address,
- &peeraddr, &res, 0, t_UNK);
+ /* add servers named on the command line with iburst implied */
+ for (;
+ cmdline_server_count > 0;
+ cmdline_server_count--, cmdline_servers++) {
-#ifdef FORCE_DEFER_DNS
- /* Hack for debugging Deferred DNS
- * Pretend working names didn't work.
+ ZERO_SOCK(&peeraddr);
+ /*
+ * If we have a numeric address, we can safely
+ * proceed in the mainline with it. Otherwise, hand
+ * the hostname off to the blocking child.
*/
- if (status == 1) {
- /* Deferring everything breaks refclocks. */
- memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
- if (!ISREFCLOCKADR(&peeraddr)) {
- status = 0; /* force deferred DNS path */
- msyslog(LOG_INFO, "Forcing Deferred DNS for %s, %s",
- curr_peer->addr->address, stoa(&peeraddr));
- } else {
- msyslog(LOG_INFO, "NOT Deferring DNS for %s, %s",
- curr_peer->addr->address, stoa(&peeraddr));
- }
- }
-#endif
+ if (is_ip_address(*cmdline_servers, AF_UNSPEC,
+ &peeraddr)) {
- /* I don't know why getnetnum would return -1.
- * The old code had this test, so I guess it must be
- * useful
- */
- if (status == -1) {
- /* Do nothing, apparently we found an IPv6
- * address and can't do anything about it */
- }
- /* Check if name resolution failed. If yes, store the
- * peer information in a file for asynchronous
- * resolution later
- */
- else if (status != 1) {
- msyslog(LOG_INFO, "Deferring DNS for %s %d", curr_peer->addr->address, no_needed);
- save_resolve(curr_peer->addr->address,
- no_needed,
- curr_peer->addr->type,
- hmode,
- curr_peer->peerversion,
- curr_peer->minpoll,
- curr_peer->maxpoll,
- peerflags,
- curr_peer->ttl,
- curr_peer->peerkey,
- (u_char *)"*");
+ SET_PORT(&peeraddr, NTP_PORT);
+ if (is_sane_resolved_address(&peeraddr,
+ T_Server))
+ peer_config(
+ &peeraddr,
+ NULL,
+ NULL,
+ MODE_CLIENT,
+ NTP_VERSION,
+ 0,
+ 0,
+ FLAG_IBURST,
+ 0,
+ 0,
+ NULL);
+ } else {
+ /* we have a hostname to resolve */
+# ifdef WORKER
+ ctx = emalloc_zero(sizeof(*ctx));
+ ctx->family = AF_UNSPEC;
+ ctx->host_mode = T_Server;
+ ctx->hmode = MODE_CLIENT;
+ ctx->version = NTP_VERSION;
+ ctx->flags = FLAG_IBURST;
+
+ ZERO(hints);
+ hints.ai_family = (u_short)ctx->family;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+
+ getaddrinfo_sometime(*cmdline_servers,
+ "ntp", &hints,
+ INITIAL_DNS_RETRY,
+ &peer_name_resolved,
+ (void *)ctx);
+# else /* !WORKER follows */
+ msyslog(LOG_ERR,
+ "hostname %s can not be used, please use IP address instead.",
+ curr_peer->addr->address);
+# endif
}
- /* Yippie!! Name resolution has succeeded!!!
- * Now we can proceed to some more sanity checks on
- * the resolved address before we start to configure
- * the peer
+ }
+
+ /* add associations from the configuration file */
+ curr_peer = HEAD_PFIFO(ptree->peers);
+ for (; curr_peer != NULL; curr_peer = curr_peer->link) {
+ ZERO_SOCK(&peeraddr);
+ /* Find the correct host-mode */
+ hmode = get_correct_host_mode(curr_peer->host_mode);
+ INSIST(hmode != 0);
+
+ if (T_Pool == curr_peer->host_mode) {
+ AF(&peeraddr) = curr_peer->addr->type;
+ peer_config(
+ &peeraddr,
+ curr_peer->addr->address,
+ NULL,
+ hmode,
+ curr_peer->peerversion,
+ curr_peer->minpoll,
+ curr_peer->maxpoll,
+ peerflag_bits(curr_peer),
+ curr_peer->ttl,
+ curr_peer->peerkey,
+ curr_peer->group);
+ /*
+ * If we have a numeric address, we can safely
+ * proceed in the mainline with it. Otherwise, hand
+ * the hostname off to the blocking child.
*/
- else {
- res_bak = res;
+ } else if (is_ip_address(curr_peer->addr->address,
+ curr_peer->addr->type, &peeraddr)) {
- /*
- * Loop to configure the desired number of
- * associations
- */
- for (i = 0; (i < no_needed) && res; res =
- res->ai_next) {
- ++i;
- memcpy(&peeraddr, res->ai_addr,
- res->ai_addrlen);
- if (is_sane_resolved_address(
+ SET_PORT(&peeraddr, NTP_PORT);
+ if (is_sane_resolved_address(&peeraddr,
+ curr_peer->host_mode))
+ peer_config(
&peeraddr,
- curr_peer->host_mode))
-
- peer_config(&peeraddr,
- NULL,
- hmode,
- curr_peer->peerversion,
- curr_peer->minpoll,
- curr_peer->maxpoll,
- peerflags,
- curr_peer->ttl,
- curr_peer->peerkey,
- (u_char *)"*");
+ NULL,
+ NULL,
+ hmode,
+ curr_peer->peerversion,
+ curr_peer->minpoll,
+ curr_peer->maxpoll,
+ peerflag_bits(curr_peer),
+ curr_peer->ttl,
+ curr_peer->peerkey,
+ curr_peer->group);
+ } else {
+ /* we have a hostname to resolve */
+# ifdef WORKER
+ ctx = emalloc_zero(sizeof(*ctx));
+ ctx->family = curr_peer->addr->type;
+ ctx->host_mode = curr_peer->host_mode;
+ ctx->hmode = hmode;
+ ctx->version = curr_peer->peerversion;
+ ctx->minpoll = curr_peer->minpoll;
+ ctx->maxpoll = curr_peer->maxpoll;
+ ctx->flags = peerflag_bits(curr_peer);
+ ctx->ttl = curr_peer->ttl;
+ ctx->keyid = curr_peer->peerkey;
+ ctx->group = curr_peer->group;
+
+ ZERO(hints);
+ hints.ai_family = ctx->family;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+
+ getaddrinfo_sometime(curr_peer->addr->address,
+ "ntp", &hints,
+ INITIAL_DNS_RETRY,
+ &peer_name_resolved, ctx);
+# else /* !WORKER follows */
+ msyslog(LOG_ERR,
+ "hostname %s can not be used, please use IP address instead.",
+ curr_peer->addr->address);
+# endif
+ }
+ }
+}
+#endif /* !SIM */
+
+/*
+ * peer_name_resolved()
+ *
+ * Callback invoked when config_peers()'s DNS lookup completes.
+ */
+#ifdef WORKER
+static void
+peer_name_resolved(
+ int rescode,
+ int gai_errno,
+ void * context,
+ const char * name,
+ const char * service,
+ const struct addrinfo * hints,
+ const struct addrinfo * res
+ )
+{
+ sockaddr_u peeraddr;
+ peer_resolved_ctx * ctx;
+ u_short af;
+ const char * fam_spec;
+
+ (void)gai_errno;
+ (void)service;
+ (void)hints;
+ ctx = context;
+
+ DPRINTF(1, ("peer_name_resolved(%s) rescode %d\n", name, rescode));
+
+ if (rescode) {
+#ifndef IGNORE_DNS_ERRORS
+ free(ctx);
+ msyslog(LOG_ERR,
+ "giving up resolving host %s: %s (%d)",
+ name, gai_strerror(rescode), rescode);
+#else /* IGNORE_DNS_ERRORS follows */
+ getaddrinfo_sometime(name, service, hints,
+ INITIAL_DNS_RETRY,
+ &peer_name_resolved, context);
+#endif
+ return;
+ }
+
+ /* Loop to configure a single association */
+ for (; res != NULL; res = res->ai_next) {
+ memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
+ if (is_sane_resolved_address(&peeraddr,
+ ctx->host_mode)) {
+ NLOG(NLOG_SYSINFO) {
+ af = ctx->family;
+ fam_spec = (AF_INET6 == af)
+ ? "(AAAA) "
+ : (AF_INET == af)
+ ? "(A) "
+ : "";
+ msyslog(LOG_INFO, "DNS %s %s-> %s",
+ name, fam_spec,
+ stoa(&peeraddr));
}
- freeaddrinfo(res_bak);
+ peer_config(
+ &peeraddr,
+ NULL,
+ NULL,
+ ctx->hmode,
+ ctx->version,
+ ctx->minpoll,
+ ctx->maxpoll,
+ ctx->flags,
+ ctx->ttl,
+ ctx->keyid,
+ ctx->group);
+ break;
}
- curr_peer = next_node(curr_peer);
}
+ free(ctx);
}
+#endif /* WORKER */
#ifdef FREE_CFG_T
static void
free_config_peers(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct peer_node *curr_peer;
+ peer_node *curr_peer;
- while (NULL != (curr_peer = dequeue(ptree->peers))) {
- destroy_address_node(curr_peer->addr);
- DESTROY_QUEUE(curr_peer->peerflags);
- free_node(curr_peer);
+ if (ptree->peers != NULL) {
+ for (;;) {
+ UNLINK_FIFO(curr_peer, *ptree->peers, link);
+ if (NULL == curr_peer)
+ break;
+ destroy_address_node(curr_peer->addr);
+ destroy_attr_val_fifo(curr_peer->peerflags);
+ free(curr_peer);
+ }
+ free(ptree->peers);
+ ptree->peers = NULL;
}
}
#endif /* FREE_CFG_T */
+#ifndef SIM
static void
config_unpeers(
- struct config_tree *ptree
+ config_tree *ptree
)
{
- struct addrinfo *res, *res_bak;
- sockaddr_u peeraddr;
- struct unpeer_node *curr_unpeer;
- struct peer *peer;
- int status;
- int found;
-
- for (curr_unpeer = queue_head(ptree->unpeers);
- curr_unpeer != NULL;
- curr_unpeer = next_node(curr_unpeer)) {
-
+ sockaddr_u peeraddr;
+ struct addrinfo hints;
+ unpeer_node * curr_unpeer;
+ struct peer * p;
+ const char * name;
+ int rc;
+
+ curr_unpeer = HEAD_PFIFO(ptree->unpeers);
+ for (; curr_unpeer != NULL; curr_unpeer = curr_unpeer->link) {
/*
* Either AssocID will be zero, and we unpeer by name/
* address addr, or it is nonzero and addr NULL.
*/
if (curr_unpeer->assocID) {
- peer = findpeerbyassoc((u_int)curr_unpeer->assocID);
- if (peer != NULL) {
- peer_clear(peer, "GONE");
- unpeer(peer);
- }
+ p = findpeerbyassoc(curr_unpeer->assocID);
+ if (p != NULL) {
+ msyslog(LOG_NOTICE, "unpeered %s",
+ stoa(&p->srcadr));
+ peer_clear(p, "GONE");
+ unpeer(p);
+ }
continue;
}
- /* Attempt to resolve the name or address */
- ZERO_SOCK(&peeraddr);
- AF(&peeraddr) = (u_short)curr_unpeer->addr->type;
-
- status = get_multiple_netnums(
- curr_unpeer->addr->address, &peeraddr, &res, 0,
- t_UNK);
+ ZERO(peeraddr);
+ AF(&peeraddr) = curr_unpeer->addr->type;
+ name = curr_unpeer->addr->address;
+ rc = getnetnum(name, &peeraddr, 0, t_UNK);
+ /* Do we have a numeric address? */
+ if (rc > 0) {
+ DPRINTF(1, ("unpeer: searching for %s\n",
+ stoa(&peeraddr)));
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ if (p != NULL) {
+ msyslog(LOG_NOTICE, "unpeered %s",
+ stoa(&peeraddr));
+ peer_clear(p, "GONE");
+ unpeer(p);
+ }
- /* I don't know why getnetnum would return -1.
- * The old code had this test, so I guess it must be
- * useful
- */
- if (status == -1) {
- /* Do nothing, apparently we found an IPv6
- * address and can't do anything about it */
+ continue;
}
- /* Check if name resolution failed. If yes, throw
- * up our hands.
+ /*
+ * It's not a numeric IP address, it's a hostname.
+ * Check for associations with a matching hostname.
*/
- else if (status != 1) {
- /* Do nothing */
+ for (p = peer_list; p != NULL; p = p->p_link)
+ if (p->hostname != NULL)
+ if (!strcasecmp(p->hostname, name))
+ break;
+ if (p != NULL) {
+ msyslog(LOG_NOTICE, "unpeered %s", name);
+ peer_clear(p, "GONE");
+ unpeer(p);
}
- /* Yippie!! Name resolution has succeeded!!!
- */
- else {
- res_bak = res;
-
- /*
- * Loop through the addresses found
- */
- while (res) {
- memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
+ /* Resolve the hostname to address(es). */
+# ifdef WORKER
+ ZERO(hints);
+ hints.ai_family = curr_unpeer->addr->type;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+ getaddrinfo_sometime(name, "ntp", &hints,
+ INITIAL_DNS_RETRY,
+ &unpeer_name_resolved, NULL);
+# else /* !WORKER follows */
+ msyslog(LOG_ERR,
+ "hostname %s can not be used, please use IP address instead.",
+ name);
+# endif
+ }
+}
+#endif /* !SIM */
- found = 0;
- peer = NULL;
- DPRINTF(1, ("searching for %s\n", stoa(&peeraddr)));
+/*
+ * unpeer_name_resolved()
+ *
+ * Callback invoked when config_unpeers()'s DNS lookup completes.
+ */
+#ifdef WORKER
+static void
+unpeer_name_resolved(
+ int rescode,
+ int gai_errno,
+ void * context,
+ const char * name,
+ const char * service,
+ const struct addrinfo * hints,
+ const struct addrinfo * res
+ )
+{
+ sockaddr_u peeraddr;
+ struct peer * peer;
+ u_short af;
+ const char * fam_spec;
+
+ (void)context;
+ (void)hints;
+ DPRINTF(1, ("unpeer_name_resolved(%s) rescode %d\n", name, rescode));
+
+ if (rescode) {
+ msyslog(LOG_ERR, "giving up resolving unpeer %s: %s (%d)",
+ name, gai_strerror(rescode), rescode);
+ return;
+ }
+ /*
+ * Loop through the addresses found
+ */
+ for (; res != NULL; res = res->ai_next) {
+ INSIST(res->ai_addrlen <= sizeof(peeraddr));
+ memcpy(&peeraddr, res->ai_addr, res->ai_addrlen);
+ DPRINTF(1, ("unpeer: searching for peer %s\n",
+ stoa(&peeraddr)));
+ peer = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ if (peer != NULL) {
+ af = AF(&peeraddr);
+ fam_spec = (AF_INET6 == af)
+ ? "(AAAA) "
+ : (AF_INET == af)
+ ? "(A) "
+ : "";
+ msyslog(LOG_NOTICE, "unpeered %s %s-> %s", name,
+ fam_spec, stoa(&peeraddr));
+ peer_clear(peer, "GONE");
+ unpeer(peer);
+ }
+ }
+}
+#endif /* WORKER */
- while (!found) {
- peer = findexistingpeer(&peeraddr, peer, -1, 0);
- if (!peer)
- break;
- if (peer->flags & FLAG_CONFIG)
- found = 1;
- }
- if (found) {
- peer_clear(peer, "GONE");
- unpeer(peer);
- }
+#ifdef FREE_CFG_T
+static void
+free_config_unpeers(
+ config_tree *ptree
+ )
+{
+ unpeer_node *curr_unpeer;
- res = res->ai_next;
- }
- freeaddrinfo(res_bak);
+ if (ptree->unpeers != NULL) {
+ for (;;) {
+ UNLINK_FIFO(curr_unpeer, *ptree->unpeers, link);
+ if (NULL == curr_unpeer)
+ break;
+ destroy_address_node(curr_unpeer->addr);
+ free(curr_unpeer);
}
+ free(ptree->unpeers);
}
}
+#endif /* FREE_CFG_T */
-#ifdef FREE_CFG_T
+#ifndef SIM
static void
-free_config_unpeers(
- struct config_tree *ptree
+config_reset_counters(
+ config_tree *ptree
)
{
- struct unpeer_node *curr_unpeer;
+ int_node *counter_set;
+
+ for (counter_set = HEAD_PFIFO(ptree->reset_counters);
+ counter_set != NULL;
+ counter_set = counter_set->link) {
+ switch (counter_set->i) {
+ default:
+ DPRINTF(1, ("config_reset_counters %s (%d) invalid\n",
+ keyword(counter_set->i), counter_set->i));
+ break;
+
+ case T_Allpeers:
+ peer_all_reset();
+ break;
+
+ case T_Auth:
+ reset_auth_stats();
+ break;
+
+ case T_Ctl:
+ ctl_clr_stats();
+ break;
- while (NULL != (curr_unpeer = dequeue(ptree->unpeers))) {
- destroy_address_node(curr_unpeer->addr);
- free_node(curr_unpeer);
+ case T_Io:
+ io_clr_stats();
+ break;
+
+ case T_Mem:
+ peer_clr_stats();
+ break;
+
+ case T_Sys:
+ proto_clr_stats();
+ break;
+
+ case T_Timer:
+ timer_clr_stats();
+ break;
+ }
}
}
+#endif /* !SIM */
+
+
+#ifdef FREE_CFG_T
+static void
+free_config_reset_counters(
+ config_tree *ptree
+ )
+{
+ FREE_INT_FIFO(ptree->reset_counters);
+}
#endif /* FREE_CFG_T */
#ifdef SIM
static void
config_sim(
- struct config_tree *ptree
+ config_tree *ptree
)
{
int i;
server_info *serv_info;
- struct attr_val *init_stmt;
+ attr_val *init_stmt;
+ sim_node *sim_n;
/* Check if a simulate block was found in the configuration code.
* If not, return an error and exit
*/
- if (NULL == ptree->sim_details) {
+ sim_n = HEAD_PFIFO(ptree->sim_details);
+ if (NULL == sim_n) {
fprintf(stderr, "ERROR!! I couldn't find a \"simulate\" block for configuring the simulator.\n");
fprintf(stderr, "\tCheck your configuration file.\n");
exit(1);
@@ -3647,9 +4174,8 @@ config_sim(
/* Process the initialization statements
* -------------------------------------
*/
- init_stmt = queue_head(ptree->sim_details->init_opts);
- while (init_stmt != NULL) {
-
+ init_stmt = HEAD_PFIFO(sim_n->init_opts);
+ for (; init_stmt != NULL; init_stmt = init_stmt->link) {
switch(init_stmt->attr) {
case T_Beep_Delay:
@@ -3666,29 +4192,31 @@ config_sim(
init_stmt->attr);
exit(1);
}
- init_stmt = next_node(init_stmt);
}
-
/* Process the server list
* -----------------------
*/
- simulation.num_of_servers =
- get_no_of_elements(ptree->sim_details->servers);
- simulation.servers = emalloc(simulation.num_of_servers
- * sizeof(server_info));
-
- serv_info = queue_head(ptree->sim_details->servers);
- for (i = 0;i < simulation.num_of_servers; i++) {
+ simulation.num_of_servers = 0;
+ serv_info = HEAD_PFIFO(sim_n->servers);
+ for (; serv_info != NULL; serv_info = serv_info->link)
+ simulation.num_of_servers++;
+ simulation.servers = emalloc(simulation.num_of_servers *
+ sizeof(simulation.servers[0]));
+
+ i = 0;
+ serv_info = HEAD_PFIFO(sim_n->servers);
+ for (; serv_info != NULL; serv_info = serv_info->link) {
if (NULL == serv_info) {
fprintf(stderr, "Simulator server list is corrupt\n");
exit(1);
- } else
- memcpy(&simulation.servers[i], serv_info, sizeof(server_info));
- serv_info = next_node(serv_info);
+ } else {
+ simulation.servers[i] = *serv_info;
+ simulation.servers[i].link = NULL;
+ i++;
+ }
}
- /* Create server associations */
printf("Creating server associations\n");
create_server_associations();
fprintf(stderr,"\tServer associations successfully created!!\n");
@@ -3698,18 +4226,40 @@ config_sim(
#ifdef FREE_CFG_T
static void
free_config_sim(
- struct config_tree *ptree
+ config_tree *ptree
)
{
+ sim_node *sim_n;
+ server_info *serv_n;
+ script_info *script_n;
+
if (NULL == ptree->sim_details)
return;
-
- DESTROY_QUEUE(ptree->sim_details->init_opts);
- DESTROY_QUEUE(ptree->sim_details->servers);
-
- /* Free the sim_node memory and set the sim_details as NULL */
- free_node(ptree->sim_details);
+ sim_n = HEAD_PFIFO(ptree->sim_details);
+ free(ptree->sim_details);
ptree->sim_details = NULL;
+ if (NULL == sim_n)
+ return;
+
+ FREE_ATTR_VAL_FIFO(sim_n->init_opts);
+ for (;;) {
+ UNLINK_FIFO(serv_n, *sim_n->servers, link);
+ if (NULL == serv_n)
+ break;
+ free(serv_n->curr_script);
+ if (serv_n->script != NULL) {
+ for (;;) {
+ UNLINK_FIFO(script_n, *serv_n->script,
+ link);
+ if (script_n == NULL)
+ break;
+ free(script_n);
+ }
+ free(serv_n->script);
+ }
+ free(serv_n);
+ }
+ free(sim_n);
}
#endif /* FREE_CFG_T */
#endif /* SIM */
@@ -3722,7 +4272,7 @@ free_config_sim(
#ifndef SIM
static void
config_ntpd(
- struct config_tree *ptree
+ config_tree *ptree
)
{
config_nic_rules(ptree);
@@ -3732,6 +4282,7 @@ config_ntpd(
config_tos(ptree);
config_access(ptree);
config_tinker(ptree);
+ config_rlimit(ptree);
config_system_opts(ptree);
config_logconfig(ptree);
config_phone(ptree);
@@ -3743,7 +4294,24 @@ config_ntpd(
config_peers(ptree);
config_unpeers(ptree);
config_fudge(ptree);
- config_qos(ptree);
+ config_reset_counters(ptree);
+
+#ifdef TEST_BLOCKING_WORKER
+ {
+ struct addrinfo hints;
+
+ ZERO(hints);
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
+ getaddrinfo_sometime("www.cnn.com", "ntp", &hints,
+ INITIAL_DNS_RETRY,
+ gai_test_callback, (void *)1);
+ hints.ai_family = AF_INET6;
+ getaddrinfo_sometime("ipv6.google.com", "ntp", &hints,
+ INITIAL_DNS_RETRY,
+ gai_test_callback, (void *)0x600);
+ }
+#endif
}
#endif /* !SIM */
@@ -3751,7 +4319,7 @@ config_ntpd(
#ifdef SIM
static void
config_ntpdsim(
- struct config_tree *ptree
+ config_tree *ptree
)
{
printf("Configuring Simulator...\n");
@@ -3760,6 +4328,8 @@ config_ntpdsim(
config_tos(ptree);
config_monitor(ptree);
config_tinker(ptree);
+ if (0)
+ config_rlimit(ptree); /* not needed for the simulator */
config_system_opts(ptree);
config_logconfig(ptree);
config_vars(ptree);
@@ -3781,15 +4351,14 @@ config_remotely(
snprintf(origin, sizeof(origin), "remote config from %s",
stoa(remote_addr));
- memset(&remote_cuckoo, 0, sizeof(remote_cuckoo));
+ ZERO(remote_cuckoo);
remote_cuckoo.fname = origin;
remote_cuckoo.line_no = 1;
remote_cuckoo.col_no = 1;
- ip_file = &remote_cuckoo;
input_from_file = 0;
init_syntax_tree(&cfgt);
- yyparse();
+ yyparse(&remote_cuckoo);
cfgt.source.attr = CONF_SOURCE_NTPQ;
cfgt.timestamp = time(NULL);
cfgt.source.value.s = estrdup(stoa(remote_addr));
@@ -3807,11 +4376,11 @@ config_remotely(
*/
void
getconfig(
- int argc,
- char *argv[]
+ int argc,
+ char ** argv
)
{
- char line[MAXLINE];
+ char line[256];
#ifdef DEBUG
atexit(free_all_config_trees);
@@ -3820,28 +4389,27 @@ getconfig(
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");
+ if (!ExpandEnvironmentStringsA(temp, config_file_storage,
+ sizeof(config_file_storage))) {
+ msyslog(LOG_ERR, "ExpandEnvironmentStrings CONFIG_FILE failed: %m");
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");
+ if (!ExpandEnvironmentStringsA(temp, alt_config_file_storage,
+ sizeof(alt_config_file_storage))) {
+ msyslog(LOG_ERR, "ExpandEnvironmentStrings ALT_CONFIG_FILE failed: %m");
exit(1);
}
alt_config_file = alt_config_file_storage;
-
#endif /* SYS_WINNT */
- res_fp = NULL;
- ntp_syslogmask = NLOG_SYNCMASK; /* set more via logconfig */
/*
* install a non default variable with this daemon version
*/
snprintf(line, sizeof(line), "daemon_version=\"%s\"", Version);
- set_sys_var(line, strlen(line)+1, RO);
+ set_sys_var(line, strlen(line) + 1, RO);
/*
* Set up for the first time step to install a variable showing
@@ -3849,24 +4417,8 @@ getconfig(
*/
set_tod_using = &ntpd_set_tod_using;
- /*
- * On Windows, the variable has already been set, on the rest,
- * initialize it to "UNKNOWN".
- */
-#ifndef SYS_WINNT
- strncpy(line, "settimeofday=\"UNKNOWN\"", sizeof(line));
- set_sys_var(line, strlen(line) + 1, RO);
-#endif
-
- /*
- * Initialize the loop.
- */
- loop_config(LOOP_DRIFTINIT, 0.);
-
getCmdOpts(argc, argv);
-
init_syntax_tree(&cfgt);
-
curr_include_level = 0;
if (
(fp[curr_include_level] = F_OPEN(FindConfig(config_file), "r")) == NULL
@@ -3904,12 +4456,11 @@ getconfig(
#ifdef DEBUG
yydebug = !!(debug >= 5);
#endif
- ip_file = fp[curr_include_level];
- yyparse();
-
+ yyparse(fp[curr_include_level]);
+
DPRINTF(1, ("Finished Parsing!!\n"));
- cfgt.source.attr = CONF_SOURCE_FILE;
+ cfgt.source.attr = CONF_SOURCE_FILE;
cfgt.timestamp = time(NULL);
save_and_apply_config_tree();
@@ -3921,28 +4472,15 @@ getconfig(
if (config_netinfo)
free_netinfo_config(config_netinfo);
#endif /* HAVE_NETINFO */
-
- /*
- printf("getconfig: res_fp <%p> call_resolver: %d", res_fp, call_resolver);
- */
-
- if (res_fp != NULL) {
- if (call_resolver) {
- /*
- * Need name resolution
- */
- do_resolve_internal();
- }
- }
}
void
save_and_apply_config_tree(void)
{
- struct config_tree *ptree;
+ config_tree *ptree;
#ifndef SAVECONFIG
- struct config_tree *punlinked;
+ config_tree *punlinked;
#endif
/*
@@ -3952,10 +4490,9 @@ save_and_apply_config_tree(void)
*/
ptree = emalloc(sizeof(*ptree));
memcpy(ptree, &cfgt, sizeof(*ptree));
- memset(&cfgt, 0, sizeof(cfgt));
-
- LINK_TAIL_SLIST(cfg_tree_history, ptree, link,
- struct config_tree);
+ ZERO(cfgt);
+
+ LINK_TAIL_SLIST(cfg_tree_history, ptree, link, config_tree);
#ifdef SAVECONFIG
if (HAVE_OPT( SAVECONFIGQUIT )) {
@@ -3966,13 +4503,12 @@ save_and_apply_config_tree(void)
dumpfile = fopen(OPT_ARG( SAVECONFIGQUIT ), "w");
if (NULL == dumpfile) {
err = errno;
- fprintf(stderr,
- "can not create save file %s, error %d %s\n",
- OPT_ARG( SAVECONFIGQUIT ), err,
- strerror(err));
+ mfprintf(stderr,
+ "can not create save file %s, error %d %m\n",
+ OPT_ARG(SAVECONFIGQUIT), err);
exit(err);
}
-
+
dumpfailed = dump_all_config_trees(dumpfile, 0);
if (dumpfailed)
fprintf(stderr,
@@ -4005,14 +4541,14 @@ save_and_apply_config_tree(void)
*/
#ifndef SAVECONFIG
UNLINK_SLIST(punlinked, cfg_tree_history, ptree, link,
- struct config_tree);
- NTP_INSIST(punlinked == ptree);
+ config_tree);
+ INSIST(punlinked == ptree);
free_config_tree(ptree);
#endif
}
-void
+static void
ntpd_set_tod_using(
const char *which
)
@@ -4024,6 +4560,40 @@ ntpd_set_tod_using(
}
+static char *
+normal_dtoa(
+ double d
+ )
+{
+ char * buf;
+ char * pch_e;
+ char * pch_nz;
+
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%g", d);
+
+ /* use lowercase 'e', strip any leading zeroes in exponent */
+ pch_e = strchr(buf, 'e');
+ if (NULL == pch_e) {
+ pch_e = strchr(buf, 'E');
+ if (NULL == pch_e)
+ return buf;
+ *pch_e = 'e';
+ }
+ pch_e++;
+ if ('-' == *pch_e)
+ pch_e++;
+ pch_nz = pch_e;
+ while ('0' == *pch_nz)
+ pch_nz++;
+ if (pch_nz == pch_e)
+ return buf;
+ strlcpy(pch_e, pch_nz, LIB_BUFLENGTH - (pch_e - buf));
+
+ return buf;
+}
+
+
/* FUNCTIONS COPIED FROM THE OLDER ntp_config.c
* --------------------------------------------
*/
@@ -4139,7 +4709,6 @@ get_netinfo_config(void)
}
-
/*
* free_netinfo_config - release NetInfo configuration state
*/
@@ -4153,7 +4722,6 @@ free_netinfo_config(
}
-
/*
* gettokens_netinfo - return tokens from NetInfo
*/
@@ -4192,7 +4760,7 @@ gettokens_netinfo (
/* Found the property, but it has no values */
if (namelist.ni_namelist_len == 0) continue;
- config->val_list =
+ config->val_list =
emalloc(sizeof(char*) *
(namelist.ni_namelist_len + 1));
val_list = config->val_list;
@@ -4201,7 +4769,7 @@ gettokens_netinfo (
index < namelist.ni_namelist_len;
index++) {
char *value;
-
+
value = namelist.ni_namelist_val[index];
val_list[index] = estrdup(value);
}
@@ -4273,422 +4841,117 @@ gettokens_netinfo (
goto again;
}
-
#endif /* HAVE_NETINFO */
+
/*
* getnetnum - return a net number (this is crude, but careful)
*
- * returns 1 for success, and mysteriously, 0 or -1 for failure
+ * returns 1 for success, and mysteriously, 0 for most failures, and
+ * -1 if the address found is IPv6 and we believe IPv6 isn't working.
*/
+#ifndef SIM
static int
getnetnum(
const char *num,
sockaddr_u *addr,
int complain,
- enum gnn_type a_type
- )
-{
- int retval;
- struct addrinfo *res;
-
- /* Get all the addresses that resolve to this name */
- retval = get_multiple_netnums(num, addr, &res, complain, a_type);
-
- if (retval != 1) {
- /* Name resolution failed */
- return retval;
- }
-
- memcpy(addr, res->ai_addr, res->ai_addrlen);
-
- DPRINTF(2, ("getnetnum given %s, got %s\n", num, stoa(addr)));
-
- freeaddrinfo(res);
- return 1;
-}
-
-
-/*
- * get_multiple_netnums
- *
- * returns 1 for success, and mysteriously, 0 or -1 for failure
- */
-static int
-get_multiple_netnums(
- const char *nameornum,
- sockaddr_u *addr,
- struct addrinfo **res,
- int complain,
- enum gnn_type a_type
+ enum gnn_type a_type /* ignored */
)
{
- char lookbuf[1024];
- const char *lookup;
- char *pch;
- struct addrinfo hints;
- struct addrinfo *ptr;
- int retval;
- sockaddr_u ipaddr;
-
- memset(&hints, 0, sizeof(hints));
-
- if (strlen(nameornum) >= sizeof(lookbuf)) {
- NTP_INSIST(strlen(nameornum) < sizeof(lookbuf));
- return 0;
- }
+ NTP_REQUIRE(AF_UNSPEC == AF(addr) ||
+ AF_INET == AF(addr) ||
+ AF_INET6 == AF(addr));
- lookup = nameornum;
- if (is_ip_address(nameornum, &ipaddr)) {
- hints.ai_flags = AI_NUMERICHOST;
- hints.ai_family = AF(&ipaddr);
- if ('[' == nameornum[0]) {
- lookup = lookbuf;
- strncpy(lookbuf, &nameornum[1],
- sizeof(lookbuf));
- pch = strchr(lookbuf, ']');
- if (pch != NULL)
- *pch = '\0';
- }
- pch = strchr(lookup, '%');
- if (pch != NULL) {
- if (lookup != lookbuf) {
- lookup = lookbuf;
- strncpy(lookbuf, nameornum,
- sizeof(lookbuf));
- pch = strchr(lookup, '%');
- }
- *pch = '\0';
- }
- }
-
- if (AF_INET6 == hints.ai_family && !ipv6_works)
+ if (!is_ip_address(num, AF(addr), addr))
return 0;
- if (AF_UNSPEC == hints.ai_family) {
- if (!ipv6_works)
- hints.ai_family = AF_INET;
- else if (!ipv4_works)
- hints.ai_family = AF_INET6;
- else if (IS_IPV4(addr) || IS_IPV6(addr))
- hints.ai_family = AF(addr);
- }
-
- /* Get host address. Looking for UDP datagram connection */
- hints.ai_socktype = SOCK_DGRAM;
-
- DPRINTF(4, ("getaddrinfo %s%s\n",
- (AF_UNSPEC == hints.ai_family)
- ? ""
- : (AF_INET == hints.ai_family)
- ? "v4 "
- : "v6 ",
- lookup));
-
- retval = getaddrinfo(lookup, "ntp", &hints, &ptr);
+ if (IS_IPV6(addr) && !ipv6_works)
+ return -1;
- if (retval || (AF_INET6 == ptr->ai_family && !ipv6_works)) {
- if (complain)
- msyslog(LOG_ERR,
- "getaddrinfo: \"%s\" invalid host address, ignored",
- lookup);
- else
- DPRINTF(1, ("getaddrinfo: \"%s\" invalid host address.\n",
- lookup));
+# ifdef ISC_PLATFORM_HAVESALEN
+ addr->sa.sa_len = SIZEOF_SOCKADDR(AF(addr));
+# endif
+ SET_PORT(addr, NTP_PORT);
- if (!retval) {
- freeaddrinfo(ptr);
- return -1;
- } else {
- return 0;
- }
- }
- *res = ptr;
+ DPRINTF(2, ("getnetnum given %s, got %s\n", num, stoa(addr)));
return 1;
}
+#endif /* !SIM */
-
-#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 no_needed,
- int type,
- int mode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t keyid,
- u_char *keystr
+#if defined(HAVE_SETRLIMIT)
+void
+ntp_rlimit(
+ int rl_what,
+ rlim_t rl_value,
+ int rl_scale,
+ char * rl_sstr
)
{
-#ifndef SYS_VXWORKS
- if (res_fp == NULL) {
-#ifndef SYS_WINNT
- strcpy(res_file, RES_TEMPFILE);
-#else
- int len;
-
- /* no /tmp directory under NT */
- if (!GetTempPath(sizeof res_file, res_file)) {
- msyslog(LOG_ERR, "can not get temp dir: %m");
- exit(1);
- }
-
- len = strlen(res_file);
- if (sizeof res_file < len + sizeof "ntpdXXXXXX") {
- msyslog(LOG_ERR,
- "temporary directory path %s too long",
- res_file);
- exit(1);
- }
+ struct rlimit rl;
- memmove(res_file + len, "ntpdXXXXXX",
- sizeof "ntpdXXXXXX");
-#endif /* SYS_WINNT */
-#ifdef HAVE_MKSTEMP
- {
- int fd;
-
- res_fp = NULL;
- if ((fd = mkstemp(res_file)) != -1)
- res_fp = fdopen(fd, "r+");
- }
-#else
- 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 %d %d %u %s\n",
- name, no_needed, type,
- mode, version, minpoll, maxpoll, flags, ttl, keyid, keystr);
-#ifdef DEBUG
- if (debug > 1)
- printf("config: %s %d %d %d %d %d %d %x %d %u %s\n",
- name, no_needed, type,
- 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)
- if (unlink(res_file))
- msyslog(LOG_WARNING,
- "Unable to remove temporary resolver file %s, %m",
- res_file);
-#else
- (void) delete(res_file);
-#endif /* VMS */
-#endif /* SYS_VXWORKS */
-}
-
-
-/*
- * do_resolve_internal - start up the resolver function (not program)
- *
- * On VMS, VxWorks, and Unix-like systems lacking fork(), 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)
-{
-#ifndef SYS_WINNT
- int i;
-#endif
-
- 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;
-
-#ifndef NO_INTRES
- req_file = res_file; /* set up pointer to res file */
-#ifndef SYS_WINNT
- (void) signal_no_reset(SIGCHLD, catchchild);
-
- /* the parent process will write to the pipe
- * in order to wake up to child process
- * which may be waiting in a select() call
- * on the read fd */
- if (pipe(resolver_pipe_fd) < 0) {
- msyslog(LOG_ERR,
- "unable to open resolver pipe");
- exit(1);
- }
-
- i = fork();
- /* Shouldn't the code below be re-ordered?
- * I.e. first check if the fork() returned an error, then
- * check whether we're parent or child.
- * Martin Burnicki
- */
- if (i == 0) {
- /*
- * this used to close everything
- * I don't think this is necessary
- */
+ switch (rl_what) {
+# ifdef RLIMIT_MEMLOCK
+ case RLIMIT_MEMLOCK:
/*
- * 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:
+ * The default RLIMIT_MEMLOCK is very low on Linux systems.
+ * Unless we increase this limit malloc calls are likely to
+ * fail if we drop root privilege. To be useful the value
+ * has to be larger than the largest ntpd resident set size.
*/
+ DPRINTF(2, ("ntp_rlimit: MEMLOCK: %d %s\n",
+ (int)(rl_value / rl_scale), rl_sstr));
+ rl.rlim_cur = rl.rlim_max = rl_value;
+ if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1)
+ msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
+ break;
+# endif /* RLIMIT_MEMLOCK */
+# ifdef RLIMIT_NOFILE
+ case RLIMIT_NOFILE:
/*
- msyslog(LOG_INFO, "do_resolve_internal: pre-closelog");
- */
- closelog();
- kill_asyncio(0);
-
- (void) signal_no_reset(SIGCHLD, SIG_DFL);
-
- init_logging("ntpd_intres", 0);
- setup_logfile();
- /*
- msyslog(LOG_INFO, "do_resolve_internal: post-closelog");
- */
-
- ntp_intres();
+ * For large systems the default file descriptor limit may
+ * not be enough.
+ */
+ DPRINTF(2, ("ntp_rlimit: NOFILE: %d %s\n",
+ (int)(rl_value / rl_scale), rl_sstr));
+ rl.rlim_cur = rl.rlim_max = rl_value;
+ if (setrlimit(RLIMIT_NOFILE, &rl) == -1)
+ msyslog(LOG_ERR, "Cannot set RLIMIT_NOFILE: %m");
+ break;
+# endif /* RLIMIT_NOFILE */
+# ifdef RLIMIT_STACK
+ case RLIMIT_STACK:
/*
- * If we got here, the intres code screwed up.
- * Print something so we don't die without complaint
+ * Provide a way to set the stack limit to something
+ * smaller, so that we don't lock a lot of unused
+ * stack memory.
*/
- msyslog(LOG_ERR, "call to ntp_intres lost");
- abort_resolve();
- exit(1);
- }
- if (i == -1) {
- msyslog(LOG_ERR, "fork() failed, can't start ntp_intres: %m");
- (void) signal_no_reset(SIGCHLD, SIG_DFL);
- abort_resolve();
- } else
- /* This is the parent process who will write to the pipe,
- * so we close the read fd */
- close(resolver_pipe_fd[0]);
-#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.
- */
- unsigned thread_id;
- uintptr_t res_thd_handle;
-
- fflush(stdout);
- ResolverEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
- if (ResolverEventHandle == NULL) {
- msyslog(LOG_ERR, "Unable to create resolver event object, can't start ntp_intres");
- abort_resolve();
- }
- res_thd_handle = _beginthreadex(
- NULL, /* no security attributes */
- 0, /* use default stack size */
- ntp_intres_thread, /* thread function */
- NULL, /* argument to thread function */
- 0, /* use default creation flags */
- &thread_id); /* receives thread identifier */
- if (!res_thd_handle) {
- msyslog(LOG_ERR, "_beginthreadex ntp_intres_thread failed %m");
- CloseHandle(ResolverEventHandle);
- ResolverEventHandle = NULL;
- abort_resolve();
+ DPRINTF(2, ("ntp_rlimit: STACK: %d %s pages\n",
+ (int)(rl_value / rl_scale), rl_sstr));
+ if (-1 == getrlimit(RLIMIT_STACK, &rl)) {
+ msyslog(LOG_ERR, "getrlimit() failed: %m");
+ } else {
+ if (rl_value > rl.rlim_max) {
+ msyslog(LOG_WARNING,
+ "ntp_rlimit: using maximum allowed stack limit %lu instead of %lu.",
+ (u_long)rl.rlim_max,
+ (u_long)rl_value);
+ rl_value = rl.rlim_max;
+ }
+ if (-1 == setrlimit(RLIMIT_STACK, &rl)) {
+ msyslog(LOG_ERR,
+ "ntp_rlimit: Cannot adjust stack limit: %m");
+ }
}
+ break;
+# endif /* RLIMIT_STACK */
+
+ default:
+ INSIST(!"Unexpected setrlimit() case!");
+ break;
}
-#endif /* SYS_WINNT */
-#else /* NO_INTRES follows */
- msyslog(LOG_ERR,
- "Deferred DNS not implemented - use numeric addresses");
- abort_resolve();
-#endif
}
+#endif /* HAVE_SETRLIMIT */
diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c
index a2abf0716868..f5f326ca4811 100644
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -1,11 +1,21 @@
/*
- * ntp_control.c - respond to control messages and send async traps
+ * ntp_control.c - respond to mode 6 control messages and send async
+ * traps. Provides service to ntpq and others.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+#include <sys/stat.h>
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#include <arpa/inet.h>
+
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
@@ -15,16 +25,13 @@
#include "ntp_config.h"
#include "ntp_crypto.h"
#include "ntp_assert.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
+#include "ntp_leapsec.h"
+#include "ntp_md5.h" /* provides OpenSSL digest API */
+#include "lib_strbuf.h"
+#ifdef KERNEL_PLL
+# include "ntp_syscall.h"
#endif
-#include <arpa/inet.h>
+
/*
* Structure to hold request procedure information
@@ -44,15 +51,21 @@ struct ctl_proc {
/*
* Request processing routines
*/
-static void ctl_error (int);
+static void ctl_error (u_char);
#ifdef REFCLOCK
static u_short ctlclkstatus (struct refclockstat *);
#endif
-static void ctl_flushpkt (int);
+static void ctl_flushpkt (u_char);
static void ctl_putdata (const char *, unsigned int, int);
-static void ctl_putstr (const char *, const char *,
- unsigned int);
-static void ctl_putdbl (const char *, double);
+static void ctl_putstr (const char *, const char *, size_t);
+static void ctl_putdblf (const char *, const char *, double);
+const char ctl_def_dbl_fmt[] = "%.3f";
+#define ctl_putdbl(tag, d) ctl_putdblf(tag, ctl_def_dbl_fmt, d)
+const char ctl_def_dbl6_fmt[] = "%.6f";
+#define ctl_putdbl6(tag, d) ctl_putdblf(tag, ctl_def_dbl6_fmt, d)
+const char ctl_def_sfp_fmt[] = "%g";
+#define ctl_putsfp(tag, sfp) ctl_putdblf(tag, ctl_def_sfp_fmt, \
+ FPTOD(sfp))
static void ctl_putuint (const char *, u_long);
static void ctl_puthex (const char *, u_long);
static void ctl_putint (const char *, long);
@@ -67,40 +80,255 @@ static void ctl_putfs (const char *, tstamp_t);
#ifdef REFCLOCK
static void ctl_putclock (int, struct refclockstat *, int);
#endif /* REFCLOCK */
-static struct ctl_var *ctl_getitem (struct ctl_var *, char **);
-static u_long count_var (struct ctl_var *);
+static const struct ctl_var *ctl_getitem(const struct ctl_var *,
+ char **);
+static u_short count_var (const struct ctl_var *);
static void control_unspec (struct recvbuf *, int);
static void read_status (struct recvbuf *, int);
+static void read_sysvars (void);
+static void read_peervars (void);
static void read_variables (struct recvbuf *, int);
static void write_variables (struct recvbuf *, int);
-static void read_clock_status (struct recvbuf *, int);
-static void write_clock_status (struct recvbuf *, int);
+static void read_clockstatus(struct recvbuf *, int);
+static void write_clockstatus(struct recvbuf *, int);
static void set_trap (struct recvbuf *, int);
-static void unset_trap (struct recvbuf *, int);
-static void configure (struct recvbuf *, int);
static void save_config (struct recvbuf *, int);
-static struct ctl_trap *ctlfindtrap (sockaddr_u *,
- 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 },
- { CTL_OP_SAVECONFIG, AUTH, save_config },
- { CTL_OP_CONFIGURE, AUTH, configure },
- { NO_REQUEST, 0 }
+static void configure (struct recvbuf *, int);
+static void send_mru_entry (mon_entry *, int);
+static void send_random_tag_value(int);
+static void read_mru_list (struct recvbuf *, int);
+static void send_ifstats_entry(endpt *, u_int);
+static void read_ifstats (struct recvbuf *);
+static void sockaddrs_from_restrict_u(sockaddr_u *, sockaddr_u *,
+ restrict_u *, int);
+static void send_restrict_entry(restrict_u *, int, u_int);
+static void send_restrict_list(restrict_u *, int, u_int *);
+static void read_addr_restrictions(struct recvbuf *);
+static void read_ordlist (struct recvbuf *, int);
+static u_int32 derive_nonce (sockaddr_u *, u_int32, u_int32);
+static void generate_nonce (struct recvbuf *, char *, size_t);
+static int validate_nonce (const char *, struct recvbuf *);
+static void req_nonce (struct recvbuf *, int);
+static void unset_trap (struct recvbuf *, int);
+static struct ctl_trap *ctlfindtrap(sockaddr_u *,
+ struct interface *);
+
+static const 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_clockstatus },
+ { CTL_OP_WRITECLOCK, NOAUTH, write_clockstatus },
+ { CTL_OP_SETTRAP, NOAUTH, set_trap },
+ { CTL_OP_CONFIGURE, AUTH, configure },
+ { CTL_OP_SAVECONFIG, AUTH, save_config },
+ { CTL_OP_READ_MRU, NOAUTH, read_mru_list },
+ { CTL_OP_READ_ORDLIST_A, AUTH, read_ordlist },
+ { CTL_OP_REQ_NONCE, NOAUTH, req_nonce },
+ { CTL_OP_UNSETTRAP, NOAUTH, unset_trap },
+ { NO_REQUEST, 0, NULL }
};
/*
+ * 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_OFFSET 10
+#define CS_DRIFT 11
+#define CS_JITTER 12
+#define CS_ERROR 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
+#define CS_TAI 20
+#define CS_LEAPTAB 21
+#define CS_LEAPEND 22
+#define CS_RATE 23
+#define CS_MRU_ENABLED 24
+#define CS_MRU_DEPTH 25
+#define CS_MRU_DEEPEST 26
+#define CS_MRU_MINDEPTH 27
+#define CS_MRU_MAXAGE 28
+#define CS_MRU_MAXDEPTH 29
+#define CS_MRU_MEM 30
+#define CS_MRU_MAXMEM 31
+#define CS_SS_UPTIME 32
+#define CS_SS_RESET 33
+#define CS_SS_RECEIVED 34
+#define CS_SS_THISVER 35
+#define CS_SS_OLDVER 36
+#define CS_SS_BADFORMAT 37
+#define CS_SS_BADAUTH 38
+#define CS_SS_DECLINED 39
+#define CS_SS_RESTRICTED 40
+#define CS_SS_LIMITED 41
+#define CS_SS_KODSENT 42
+#define CS_SS_PROCESSED 43
+#define CS_PEERADR 44
+#define CS_PEERMODE 45
+#define CS_BCASTDELAY 46
+#define CS_AUTHDELAY 47
+#define CS_AUTHKEYS 48
+#define CS_AUTHFREEK 49
+#define CS_AUTHKLOOKUPS 50
+#define CS_AUTHKNOTFOUND 51
+#define CS_AUTHKUNCACHED 52
+#define CS_AUTHKEXPIRED 53
+#define CS_AUTHENCRYPTS 54
+#define CS_AUTHDECRYPTS 55
+#define CS_AUTHRESET 56
+#define CS_K_OFFSET 57
+#define CS_K_FREQ 58
+#define CS_K_MAXERR 59
+#define CS_K_ESTERR 60
+#define CS_K_STFLAGS 61
+#define CS_K_TIMECONST 62
+#define CS_K_PRECISION 63
+#define CS_K_FREQTOL 64
+#define CS_K_PPS_FREQ 65
+#define CS_K_PPS_STABIL 66
+#define CS_K_PPS_JITTER 67
+#define CS_K_PPS_CALIBDUR 68
+#define CS_K_PPS_CALIBS 69
+#define CS_K_PPS_CALIBERRS 70
+#define CS_K_PPS_JITEXC 71
+#define CS_K_PPS_STBEXC 72
+#define CS_KERN_FIRST CS_K_OFFSET
+#define CS_KERN_LAST CS_K_PPS_STBEXC
+#define CS_IOSTATS_RESET 73
+#define CS_TOTAL_RBUF 74
+#define CS_FREE_RBUF 75
+#define CS_USED_RBUF 76
+#define CS_RBUF_LOWATER 77
+#define CS_IO_DROPPED 78
+#define CS_IO_IGNORED 79
+#define CS_IO_RECEIVED 80
+#define CS_IO_SENT 81
+#define CS_IO_SENDFAILED 82
+#define CS_IO_WAKEUPS 83
+#define CS_IO_GOODWAKEUPS 84
+#define CS_TIMERSTATS_RESET 85
+#define CS_TIMER_OVERRUNS 86
+#define CS_TIMER_XMTS 87
+#define CS_FUZZ 88
+#define CS_MAX_NOAUTOKEY CS_FUZZ
+#ifdef AUTOKEY
+#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
+#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
+#define CS_PUBLIC (3 + CS_MAX_NOAUTOKEY)
+#define CS_CERTIF (4 + CS_MAX_NOAUTOKEY)
+#define CS_SIGNATURE (5 + CS_MAX_NOAUTOKEY)
+#define CS_REVTIME (6 + CS_MAX_NOAUTOKEY)
+#define CS_IDENT (7 + CS_MAX_NOAUTOKEY)
+#define CS_DIGEST (8 + CS_MAX_NOAUTOKEY)
+#define CS_MAXCODE CS_DIGEST
+#else /* !AUTOKEY follows */
+#define CS_MAXCODE CS_MAX_NOAUTOKEY
+#endif /* !AUTOKEY */
+
+/*
+ * 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_UNREACH 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_VARLIST 37
+#define CP_IN 38
+#define CP_OUT 39
+#define CP_RATE 40
+#define CP_BIAS 41
+#define CP_SRCHOST 42
+#define CP_TIMEREC 43
+#define CP_TIMEREACH 44
+#define CP_BADAUTH 45
+#define CP_BOGUSORG 46
+#define CP_OLDPKT 47
+#define CP_SELDISP 48
+#define CP_SELBROKEN 49
+#define CP_CANDIDATE 50
+#define CP_MAX_NOAUTOKEY CP_CANDIDATE
+#ifdef AUTOKEY
+#define CP_FLAGS (1 + CP_MAX_NOAUTOKEY)
+#define CP_HOST (2 + CP_MAX_NOAUTOKEY)
+#define CP_VALID (3 + CP_MAX_NOAUTOKEY)
+#define CP_INITSEQ (4 + CP_MAX_NOAUTOKEY)
+#define CP_INITKEY (5 + CP_MAX_NOAUTOKEY)
+#define CP_INITTSP (6 + CP_MAX_NOAUTOKEY)
+#define CP_SIGNATURE (7 + CP_MAX_NOAUTOKEY)
+#define CP_IDENT (8 + CP_MAX_NOAUTOKEY)
+#define CP_MAXCODE CP_IDENT
+#else /* !AUTOKEY follows */
+#define CP_MAXCODE CP_MAX_NOAUTOKEY
+#endif /* !AUTOKEY */
+
+/*
+ * 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
+
+/*
* System variable values. The array can be indexed by the variable
* index to find the textual name.
*/
-static struct ctl_var sys_var[] = {
+static const struct ctl_var sys_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CS_LEAP, RW, "leap" }, /* 1 */
{ CS_STRATUM, RO, "stratum" }, /* 2 */
@@ -125,26 +353,91 @@ static struct ctl_var sys_var[] = {
{ CS_LEAPTAB, RO, "leapsec" }, /* 21 */
{ CS_LEAPEND, RO, "expire" }, /* 22 */
{ CS_RATE, RO, "mintc" }, /* 23 */
-#ifdef OPENSSL
- { CS_FLAGS, RO, "flags" }, /* 24 */
- { CS_HOST, RO, "host" }, /* 25 */
- { CS_PUBLIC, RO, "update" }, /* 26 */
- { CS_CERTIF, RO, "cert" }, /* 27 */
- { CS_SIGNATURE, RO, "signature" }, /* 28 */
- { CS_REVTIME, RO, "until" }, /* 29 */
- { CS_GROUP, RO, "group" }, /* 30 */
- { CS_DIGEST, RO, "digest" }, /* 31 */
-#endif /* OPENSSL */
- { 0, EOV, "" } /* 24/3 2*/
+ { CS_MRU_ENABLED, RO, "mru_enabled" }, /* 24 */
+ { CS_MRU_DEPTH, RO, "mru_depth" }, /* 25 */
+ { CS_MRU_DEEPEST, RO, "mru_deepest" }, /* 26 */
+ { CS_MRU_MINDEPTH, RO, "mru_mindepth" }, /* 27 */
+ { CS_MRU_MAXAGE, RO, "mru_maxage" }, /* 28 */
+ { CS_MRU_MAXDEPTH, RO, "mru_maxdepth" }, /* 29 */
+ { CS_MRU_MEM, RO, "mru_mem" }, /* 30 */
+ { CS_MRU_MAXMEM, RO, "mru_maxmem" }, /* 31 */
+ { CS_SS_UPTIME, RO, "ss_uptime" }, /* 32 */
+ { CS_SS_RESET, RO, "ss_reset" }, /* 33 */
+ { CS_SS_RECEIVED, RO, "ss_received" }, /* 34 */
+ { CS_SS_THISVER, RO, "ss_thisver" }, /* 35 */
+ { CS_SS_OLDVER, RO, "ss_oldver" }, /* 36 */
+ { CS_SS_BADFORMAT, RO, "ss_badformat" }, /* 37 */
+ { CS_SS_BADAUTH, RO, "ss_badauth" }, /* 38 */
+ { CS_SS_DECLINED, RO, "ss_declined" }, /* 39 */
+ { CS_SS_RESTRICTED, RO, "ss_restricted" }, /* 40 */
+ { CS_SS_LIMITED, RO, "ss_limited" }, /* 41 */
+ { CS_SS_KODSENT, RO, "ss_kodsent" }, /* 42 */
+ { CS_SS_PROCESSED, RO, "ss_processed" }, /* 43 */
+ { CS_PEERADR, RO, "peeradr" }, /* 44 */
+ { CS_PEERMODE, RO, "peermode" }, /* 45 */
+ { CS_BCASTDELAY, RO, "bcastdelay" }, /* 46 */
+ { CS_AUTHDELAY, RO, "authdelay" }, /* 47 */
+ { CS_AUTHKEYS, RO, "authkeys" }, /* 48 */
+ { CS_AUTHFREEK, RO, "authfreek" }, /* 49 */
+ { CS_AUTHKLOOKUPS, RO, "authklookups" }, /* 50 */
+ { CS_AUTHKNOTFOUND, RO, "authknotfound" }, /* 51 */
+ { CS_AUTHKUNCACHED, RO, "authkuncached" }, /* 52 */
+ { CS_AUTHKEXPIRED, RO, "authkexpired" }, /* 53 */
+ { CS_AUTHENCRYPTS, RO, "authencrypts" }, /* 54 */
+ { CS_AUTHDECRYPTS, RO, "authdecrypts" }, /* 55 */
+ { CS_AUTHRESET, RO, "authreset" }, /* 56 */
+ { CS_K_OFFSET, RO, "koffset" }, /* 57 */
+ { CS_K_FREQ, RO, "kfreq" }, /* 58 */
+ { CS_K_MAXERR, RO, "kmaxerr" }, /* 59 */
+ { CS_K_ESTERR, RO, "kesterr" }, /* 60 */
+ { CS_K_STFLAGS, RO, "kstflags" }, /* 61 */
+ { CS_K_TIMECONST, RO, "ktimeconst" }, /* 62 */
+ { CS_K_PRECISION, RO, "kprecis" }, /* 63 */
+ { CS_K_FREQTOL, RO, "kfreqtol" }, /* 64 */
+ { CS_K_PPS_FREQ, RO, "kppsfreq" }, /* 65 */
+ { CS_K_PPS_STABIL, RO, "kppsstab" }, /* 66 */
+ { CS_K_PPS_JITTER, RO, "kppsjitter" }, /* 67 */
+ { CS_K_PPS_CALIBDUR, RO, "kppscalibdur" }, /* 68 */
+ { CS_K_PPS_CALIBS, RO, "kppscalibs" }, /* 69 */
+ { CS_K_PPS_CALIBERRS, RO, "kppscaliberrs" }, /* 70 */
+ { CS_K_PPS_JITEXC, RO, "kppsjitexc" }, /* 71 */
+ { CS_K_PPS_STBEXC, RO, "kppsstbexc" }, /* 72 */
+ { CS_IOSTATS_RESET, RO, "iostats_reset" }, /* 73 */
+ { CS_TOTAL_RBUF, RO, "total_rbuf" }, /* 74 */
+ { CS_FREE_RBUF, RO, "free_rbuf" }, /* 75 */
+ { CS_USED_RBUF, RO, "used_rbuf" }, /* 76 */
+ { CS_RBUF_LOWATER, RO, "rbuf_lowater" }, /* 77 */
+ { CS_IO_DROPPED, RO, "io_dropped" }, /* 78 */
+ { CS_IO_IGNORED, RO, "io_ignored" }, /* 79 */
+ { CS_IO_RECEIVED, RO, "io_received" }, /* 80 */
+ { CS_IO_SENT, RO, "io_sent" }, /* 81 */
+ { CS_IO_SENDFAILED, RO, "io_sendfailed" }, /* 82 */
+ { CS_IO_WAKEUPS, RO, "io_wakeups" }, /* 83 */
+ { CS_IO_GOODWAKEUPS, RO, "io_goodwakeups" }, /* 84 */
+ { CS_TIMERSTATS_RESET, RO, "timerstats_reset" },/* 85 */
+ { CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
+ { CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
+ { CS_FUZZ, RO, "fuzz" }, /* 88 */
+#ifdef AUTOKEY
+ { CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
+ { CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
+ { CS_PUBLIC, RO, "update" }, /* 3 + CS_MAX_NOAUTOKEY */
+ { CS_CERTIF, RO, "cert" }, /* 4 + CS_MAX_NOAUTOKEY */
+ { CS_SIGNATURE, RO, "signature" }, /* 5 + CS_MAX_NOAUTOKEY */
+ { CS_REVTIME, RO, "until" }, /* 6 + CS_MAX_NOAUTOKEY */
+ { CS_IDENT, RO, "ident" }, /* 7 + CS_MAX_NOAUTOKEY */
+ { CS_DIGEST, RO, "digest" }, /* 8 + CS_MAX_NOAUTOKEY */
+#endif /* AUTOKEY */
+ { 0, EOV, "" } /* 87/95 */
};
-static struct ctl_var *ext_sys_var = (struct ctl_var *)0;
+static struct ctl_var *ext_sys_var = NULL;
/*
* System variables we print by default (in fuzzball order,
* more-or-less)
*/
-static u_char def_sys_var[] = {
+static const u_char def_sys_var[] = {
CS_VERSION,
CS_PROCESSOR,
CS_SYSTEM,
@@ -167,15 +460,15 @@ static u_char def_sys_var[] = {
CS_TAI,
CS_LEAPTAB,
CS_LEAPEND,
-#ifdef OPENSSL
+#ifdef AUTOKEY
CS_HOST,
- CS_GROUP,
+ CS_IDENT,
CS_FLAGS,
CS_DIGEST,
CS_SIGNATURE,
CS_PUBLIC,
CS_CERTIF,
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
0
};
@@ -183,7 +476,7 @@ static u_char def_sys_var[] = {
/*
* Peer variable list
*/
-static struct ctl_var peer_var[] = {
+static const struct ctl_var peer_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CP_CONFIG, RO, "config" }, /* 1 */
{ CP_AUTHENABLE, RO, "authenable" }, /* 2 */
@@ -213,12 +506,12 @@ static struct ctl_var peer_var[] = {
{ 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_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_FILTERROR, RO, "filtdisp" }, /* 34 */
{ CP_FLASH, RO, "flash" }, /* 35 */
{ CP_TTL, RO, "ttl" }, /* 36 */
{ CP_VARLIST, RO, "peer_var_list" }, /* 37 */
@@ -226,25 +519,36 @@ static struct ctl_var peer_var[] = {
{ CP_OUT, RO, "out" }, /* 39 */
{ CP_RATE, RO, "headway" }, /* 40 */
{ CP_BIAS, RO, "bias" }, /* 41 */
-#ifdef OPENSSL
- { CP_FLAGS, RO, "flags" }, /* 42 */
- { CP_HOST, RO, "host" }, /* 43 */
- { CP_VALID, RO, "valid" }, /* 44 */
- { CP_INITSEQ, RO, "initsequence" }, /* 45 */
- { CP_INITKEY, RO, "initkey" }, /* 46 */
- { CP_INITTSP, RO, "timestamp" }, /* 47 */
- { CP_SIGNATURE, RO, "signature" }, /* 48 */
-#endif /* OPENSSL */
- { 0, EOV, "" } /* 42/49 */
+ { CP_SRCHOST, RO, "srchost" }, /* 42 */
+ { CP_TIMEREC, RO, "timerec" }, /* 43 */
+ { CP_TIMEREACH, RO, "timereach" }, /* 44 */
+ { CP_BADAUTH, RO, "badauth" }, /* 45 */
+ { CP_BOGUSORG, RO, "bogusorg" }, /* 46 */
+ { CP_OLDPKT, RO, "oldpkt" }, /* 47 */
+ { CP_SELDISP, RO, "seldisp" }, /* 48 */
+ { CP_SELBROKEN, RO, "selbroken" }, /* 49 */
+ { CP_CANDIDATE, RO, "candidate" }, /* 50 */
+#ifdef AUTOKEY
+ { CP_FLAGS, RO, "flags" }, /* 1 + CP_MAX_NOAUTOKEY */
+ { CP_HOST, RO, "host" }, /* 2 + CP_MAX_NOAUTOKEY */
+ { CP_VALID, RO, "valid" }, /* 3 + CP_MAX_NOAUTOKEY */
+ { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
+ { CP_INITKEY, RO, "initkey" }, /* 5 + CP_MAX_NOAUTOKEY */
+ { CP_INITTSP, RO, "timestamp" }, /* 6 + CP_MAX_NOAUTOKEY */
+ { CP_SIGNATURE, RO, "signature" }, /* 7 + CP_MAX_NOAUTOKEY */
+ { CP_IDENT, RO, "ident" }, /* 8 + CP_MAX_NOAUTOKEY */
+#endif /* AUTOKEY */
+ { 0, EOV, "" } /* 50/58 */
};
/*
* Peer variables we print by default
*/
-static u_char def_peer_var[] = {
+static const u_char def_peer_var[] = {
CP_SRCADR,
CP_SRCPORT,
+ CP_SRCHOST,
CP_DSTADR,
CP_DSTPORT,
CP_OUT,
@@ -276,13 +580,14 @@ static u_char def_peer_var[] = {
CP_FILTDELAY,
CP_FILTOFFSET,
CP_FILTERROR,
-#ifdef OPENSSL
+#ifdef AUTOKEY
CP_HOST,
CP_FLAGS,
CP_SIGNATURE,
CP_VALID,
CP_INITSEQ,
-#endif /* OPENSSL */
+ CP_IDENT,
+#endif /* AUTOKEY */
0
};
@@ -291,7 +596,7 @@ static u_char def_peer_var[] = {
/*
* Clock variable list
*/
-static struct ctl_var clock_var[] = {
+static const struct ctl_var clock_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CC_TYPE, RO, "type" }, /* 1 */
{ CC_TIMECODE, RO, "timecode" }, /* 2 */
@@ -313,7 +618,7 @@ static struct ctl_var clock_var[] = {
/*
* Clock variables printed by default
*/
-static u_char def_clock_var[] = {
+static const u_char def_clock_var[] = {
CC_DEVICE,
CC_TYPE, /* won't be output if device = known */
CC_TIMECODE,
@@ -330,6 +635,11 @@ static u_char def_clock_var[] = {
};
#endif
+/*
+ * MRU string constants shared by send_mru_entry() and read_mru_list().
+ */
+static const char addr_fmt[] = "addr.%d";
+static const char last_fmt[] = "last.%d";
/*
* System and processor definitions.
@@ -342,8 +652,8 @@ static u_char def_clock_var[] = {
# define STR_PROCESSOR "unknown"
# endif
-static char str_system[] = STR_SYSTEM;
-static char str_processor[] = STR_PROCESSOR;
+static const char str_system[] = STR_SYSTEM;
+static const char str_processor[] = STR_PROCESSOR;
#else
# include <sys/utsname.h>
static struct utsname utsnamebuf;
@@ -356,7 +666,7 @@ static struct utsname utsnamebuf;
* timed out.
*/
/* ntp_request.c */
-struct ctl_trap ctl_trap[CTL_MAXTRAPS];
+struct ctl_trap ctl_traps[CTL_MAXTRAPS];
int num_ctl_traps;
/*
@@ -373,14 +683,15 @@ int num_ctl_traps;
* the reference clock driver doesn't set peer->sstclktype to something
* different than CTL_SST_TS_UNSPEC.
*/
-static u_char clocktypes[] = {
+#ifdef REFCLOCK
+static const u_char clocktypes[] = {
CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
CTL_SST_TS_UHF, /* deprecated 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) IRIG_AUDIO? */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_HF, /* REFCLK_CHU (7) */
CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
@@ -419,7 +730,10 @@ static u_char clocktypes[] = {
CTL_SST_TS_UHF, /* REFCLK_ZYFER (42) */
CTL_SST_TS_UHF, /* REFCLK_RIPENCC (43) */
CTL_SST_TS_UHF, /* REFCLK_NEOCLOCK4X (44) */
+ CTL_SST_TS_UHF, /* REFCLK_TSYNCPCI (45) */
+ CTL_SST_TS_UHF /* REFCLK_GPSDJSON (46) */
};
+#endif /* REFCLOCK */
/*
@@ -464,7 +778,8 @@ 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_short res_frags; /* datagrams in this response */
+static int res_offset; /* offset of payload in response */
static u_char * datapt;
static u_char * dataend;
static int datalinelen;
@@ -478,7 +793,7 @@ static keyid_t res_keyid;
#define MAXDATALINELEN (72)
-static u_char res_async; /* set to 1 if this is async trap response */
+static u_char res_async; /* sending async trap response? */
/*
* Pointers for saving state when decoding request packets
@@ -486,6 +801,10 @@ static u_char res_async; /* set to 1 if this is async trap response */
static char *reqpt;
static char *reqend;
+#ifndef MIN
+#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
+#endif
+
/*
* init_control - initialize request data
*/
@@ -505,8 +824,8 @@ init_control(void)
ctl_sys_num_events = 0;
num_ctl_traps = 0;
- for (i = 0; i < CTL_MAXTRAPS; i++)
- ctl_trap[i].tr_flags = 0;
+ for (i = 0; i < COUNTOF(ctl_traps); i++)
+ ctl_traps[i].tr_flags = 0;
}
@@ -515,35 +834,34 @@ init_control(void)
*/
static void
ctl_error(
- int errcode
+ u_char errcode
)
{
- DPRINTF(3, ("sending control error %d\n", errcode));
+ int maclen;
+
+ numctlerrors++;
+ DPRINTF(3, ("sending control error %u\n", errcode));
/*
* 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.r_m_e_op = CTL_RESPONSE | CTL_ERROR |
+ (res_opcode & CTL_OP_MASK);
+ rpkt.status = htons((errcode << 8) & 0xff00);
rpkt.count = 0;
/*
* send packet and bump counters
*/
if (res_authenticate && sys_authenticate) {
- int maclen;
-
maclen = authencrypt(res_keyid, (u_int32 *)&rpkt,
CTL_HEADER_LEN);
- sendpkt(rmt_addr, lcl_inter, -2, (struct pkt *)&rpkt,
+ sendpkt(rmt_addr, lcl_inter, -2, (void *)&rpkt,
CTL_HEADER_LEN + maclen);
- } else {
- sendpkt(rmt_addr, lcl_inter, -3, (struct pkt *)&rpkt,
+ } else
+ sendpkt(rmt_addr, lcl_inter, -3, (void *)&rpkt,
CTL_HEADER_LEN);
- }
- numctlerrors++;
}
/*
@@ -569,14 +887,16 @@ save_config(
FILE *fptr;
#endif
- if (restrict_mask & RES_NOMODIFY) {
+ if (RES_NOMODIFY & restrict_mask) {
snprintf(reply, sizeof(reply),
"saveconfig prohibited by restrict ... nomodify");
ctl_putdata(reply, strlen(reply), 0);
ctl_flushpkt(0);
- msyslog(LOG_NOTICE,
- "saveconfig from %s rejected due to nomodify restriction",
- stoa(&rbufp->recv_srcadr));
+ NLOG(NLOG_SYSINFO)
+ msyslog(LOG_NOTICE,
+ "saveconfig from %s rejected due to nomodify restriction",
+ stoa(&rbufp->recv_srcadr));
+ sys_restricted++;
return;
}
@@ -586,18 +906,17 @@ save_config(
"saveconfig prohibited, no saveconfigdir configured");
ctl_putdata(reply, strlen(reply), 0);
ctl_flushpkt(0);
- msyslog(LOG_NOTICE,
- "saveconfig from %s rejected, no saveconfigdir",
- stoa(&rbufp->recv_srcadr));
+ NLOG(NLOG_SYSINFO)
+ msyslog(LOG_NOTICE,
+ "saveconfig from %s rejected, no saveconfigdir",
+ stoa(&rbufp->recv_srcadr));
return;
}
if (0 == reqend - reqpt)
return;
- strncpy(filespec, reqpt, sizeof(filespec));
- filespec[sizeof(filespec) - 1] = '\0';
-
+ strlcpy(filespec, reqpt, sizeof(filespec));
time(&now);
/*
@@ -607,10 +926,16 @@ save_config(
*/
if (0 == strftime(filename, sizeof(filename), filespec,
localtime(&now)))
- strncpy(filename, filespec, sizeof(filename));
-
- filename[sizeof(filename) - 1] = '\0';
+ strlcpy(filename, filespec, sizeof(filename));
+ /*
+ * Conceptually we should be searching for DIRSEP in filename,
+ * however Windows actually recognizes both forward and
+ * backslashes as equivalent directory separators at the API
+ * level. On POSIX systems we could allow '\\' but such
+ * filenames are tricky to manipulate from a shell, so just
+ * reject both types of slashes on all platforms.
+ */
if (strchr(filename, '\\') || strchr(filename, '/')) {
snprintf(reply, sizeof(reply),
"saveconfig does not allow directory in filename");
@@ -676,10 +1001,11 @@ process_control(
int restrict_mask
)
{
- register struct ntp_control *pkt;
- register int req_count;
- register int req_data;
- register struct ctl_proc *cc;
+ struct ntp_control *pkt;
+ int req_count;
+ int req_data;
+ const struct ctl_proc *cc;
+ keyid_t *pkid;
int properlen;
int maclen;
@@ -698,16 +1024,16 @@ process_control(
* 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)
+ || (CTL_RESPONSE | CTL_MORE | CTL_ERROR) & pkt->r_m_e_op
|| pkt->offset != 0) {
DPRINTF(1, ("invalid format in control packet\n"));
if (rbufp->recv_length < CTL_HEADER_LEN)
numctltooshort++;
- if (pkt->r_m_e_op & CTL_RESPONSE)
+ if (CTL_RESPONSE & pkt->r_m_e_op)
numctlinputresp++;
- if (pkt->r_m_e_op & CTL_MORE)
+ if (CTL_MORE & pkt->r_m_e_op)
numctlinputfrag++;
- if (pkt->r_m_e_op & CTL_ERROR)
+ if (CTL_ERROR & pkt->r_m_e_op)
numctlinputerr++;
if (pkt->offset != 0)
numctlbadoffset++;
@@ -731,17 +1057,18 @@ process_control(
rpkt.sequence = pkt->sequence;
rpkt.associd = pkt->associd;
rpkt.status = 0;
+ res_frags = 1;
res_offset = 0;
res_associd = htons(pkt->associd);
- res_async = 0;
- res_authenticate = 0;
+ res_async = FALSE;
+ res_authenticate = FALSE;
res_keyid = 0;
- res_authokay = 0;
+ res_authokay = FALSE;
req_count = (int)ntohs(pkt->count);
- datanotbinflag = 0;
+ datanotbinflag = FALSE;
datalinelen = 0;
- datapt = rpkt.data;
- dataend = &(rpkt.data[CTL_MAX_DATA_LEN]);
+ datapt = rpkt.u.data;
+ dataend = &rpkt.u.data[CTL_MAX_DATA_LEN];
if ((rbufp->recv_length & 0x3) != 0)
DPRINTF(3, ("Control packet length %d unrounded\n",
@@ -766,10 +1093,9 @@ process_control(
if ((rbufp->recv_length & 3) == 0 &&
maclen >= MIN_MAC_LEN && maclen <= MAX_MAC_LEN &&
sys_authenticate) {
- res_authenticate = 1;
- res_keyid = ntohl(*(u_int32 *)((u_char *)pkt +
- properlen));
-
+ res_authenticate = TRUE;
+ pkid = (void *)((char *)pkt + properlen);
+ res_keyid = ntohl(*pkid);
DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n",
rbufp->recv_length, properlen, res_keyid,
maclen));
@@ -779,18 +1105,18 @@ process_control(
else if (authdecrypt(res_keyid, (u_int32 *)pkt,
rbufp->recv_length - maclen,
maclen)) {
+ res_authokay = TRUE;
DPRINTF(3, ("authenticated okay\n"));
- res_authokay = 1;
} else {
- DPRINTF(3, ("authentication failed\n"));
res_keyid = 0;
+ DPRINTF(3, ("authentication failed\n"));
}
}
/*
* Set up translate pointers
*/
- reqpt = (char *)pkt->data;
+ reqpt = (char *)pkt->u.data;
reqend = reqpt + req_count;
/*
@@ -825,24 +1151,24 @@ process_control(
*/
u_short
ctlpeerstatus(
- register struct peer *peer
+ register struct peer *p
)
{
u_short status;
- status = peer->status;
- if (!(peer->flags & FLAG_PREEMPT))
+ status = p->status;
+ if (FLAG_CONFIG & p->flags)
status |= CTL_PST_CONFIG;
- if (peer->keyid != 0)
+ if (p->keyid)
status |= CTL_PST_AUTHENABLE;
- if (peer->flags & FLAG_AUTHENTIC)
+ if (FLAG_AUTHENTIC & p->flags)
status |= CTL_PST_AUTHENTIC;
- if (peer->reach != 0)
+ if (p->reach)
status |= CTL_PST_REACH;
- if (peer->cast_flags & (MDF_BCAST | MDF_MCAST | MDF_ACAST))
+ if (MDF_TXONLY_MASK & p->cast_flags)
status |= CTL_PST_BCAST;
- return (u_short)CTL_PEER_STATUS(status, peer->num_events,
- peer->last_event);
+
+ return CTL_PEER_STATUS(status, p->num_events, p->last_event);
}
@@ -852,11 +1178,10 @@ ctlpeerstatus(
#ifdef REFCLOCK
static u_short
ctlclkstatus(
- struct refclockstat *this_clock
+ struct refclockstat *pcs
)
{
- return (u_short)CTL_PEER_STATUS(0, this_clock->lastevent,
- this_clock->currentstatus);
+ return CTL_PEER_STATUS(0, pcs->lastevent, pcs->currentstatus);
}
#endif
@@ -871,21 +1196,18 @@ ctlsysstatus(void)
this_clock = CTL_SST_TS_UNSPEC;
#ifdef REFCLOCK
- if (sys_peer != 0) {
- if (sys_peer->sstclktype != CTL_SST_TS_UNSPEC) {
+ if (sys_peer != NULL) {
+ if (CTL_SST_TS_UNSPEC != sys_peer->sstclktype)
this_clock = sys_peer->sstclktype;
- } else {
- if (sys_peer->refclktype < sizeof(clocktypes))
- this_clock =
- clocktypes[sys_peer->refclktype];
- }
+ else if (sys_peer->refclktype < COUNTOF(clocktypes))
+ this_clock = clocktypes[sys_peer->refclktype];
}
#else /* REFCLOCK */
if (sys_peer != 0)
this_clock = CTL_SST_TS_NTP;
#endif /* REFCLOCK */
- return (u_short)CTL_SYS_STATUS(sys_leap, this_clock,
- ctl_sys_num_events, ctl_sys_last_event);
+ return CTL_SYS_STATUS(sys_leap, this_clock, ctl_sys_num_events,
+ ctl_sys_last_event);
}
@@ -895,20 +1217,25 @@ ctlsysstatus(void)
*/
static void
ctl_flushpkt(
- int more
+ u_char more
)
{
+ int i;
int dlen;
int sendlen;
+ int maclen;
+ int totlen;
+ keyid_t keyid;
- if (!more && datanotbinflag) {
+ dlen = datapt - rpkt.u.data;
+ if (!more && datanotbinflag && dlen + 2 < CTL_MAX_DATA_LEN) {
/*
* Big hack, output a trailing \r\n
*/
*datapt++ = '\r';
*datapt++ = '\n';
+ dlen += 2;
}
- dlen = datapt - (u_char *)rpkt.data;
sendlen = dlen + CTL_HEADER_LEN;
/*
@@ -922,35 +1249,31 @@ ctl_flushpkt(
/*
* 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);
+ rpkt.r_m_e_op = 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) {
+ for (i = 0; i < COUNTOF(ctl_traps); i++) {
+ if (TRAP_INUSE & ctl_traps[i].tr_flags) {
rpkt.li_vn_mode =
- PKT_LI_VN_MODE(sys_leap,
- ctl_trap[i].tr_version,
- MODE_CONTROL);
+ PKT_LI_VN_MODE(
+ sys_leap,
+ ctl_traps[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,
+ htons(ctl_traps[i].tr_sequence);
+ sendpkt(&ctl_traps[i].tr_addr,
+ ctl_traps[i].tr_localaddr, -4,
(struct pkt *)&rpkt, sendlen);
if (!more)
- ctl_trap[i].tr_sequence++;
+ ctl_traps[i].tr_sequence++;
numasyncmsgs++;
}
}
} else {
if (res_authenticate && sys_authenticate) {
- int maclen;
- int totlen = sendlen;
- keyid_t keyid = htonl(res_keyid);
-
+ totlen = sendlen;
/*
* If we are going to authenticate, then there
* is an additional requirement that the MAC
@@ -960,7 +1283,8 @@ ctl_flushpkt(
*datapt++ = '\0';
totlen++;
}
- memcpy(datapt, &keyid, sizeof keyid);
+ keyid = htonl(res_keyid);
+ memcpy(datapt, &keyid, sizeof(keyid));
maclen = authencrypt(res_keyid,
(u_int32 *)&rpkt, totlen);
sendpkt(rmt_addr, lcl_inter, -5,
@@ -978,8 +1302,9 @@ ctl_flushpkt(
/*
* Set us up for another go around.
*/
+ res_frags++;
res_offset += dlen;
- datapt = (u_char *)rpkt.data;
+ datapt = rpkt.u.data;
}
@@ -995,16 +1320,16 @@ ctl_putdata(
)
{
int overhead;
+ unsigned int currentlen;
overhead = 0;
if (!bin) {
- datanotbinflag = 1;
+ datanotbinflag = TRUE;
overhead = 3;
- if (datapt != rpkt.data) {
+ if (datapt != rpkt.u.data) {
*datapt++ = ',';
datalinelen++;
- if ((dlen + datalinelen + 1) >= MAXDATALINELEN)
- {
+ if ((dlen + datalinelen + 1) >= MAXDATALINELEN) {
*datapt++ = '\r';
*datapt++ = '\n';
datalinelen = 0;
@@ -1018,13 +1343,23 @@ ctl_putdata(
/*
* Save room for trailing junk
*/
- if (dlen + overhead + datapt > dataend) {
+ while (dlen + overhead + datapt > dataend) {
/*
* Not enough room in this one, flush it out.
*/
+ currentlen = MIN(dlen, dataend - datapt);
+
+ memcpy(datapt, dp, currentlen);
+
+ datapt += currentlen;
+ dp += currentlen;
+ dlen -= currentlen;
+ datalinelen += currentlen;
+
ctl_flushpkt(CTL_MORE);
}
- memmove((char *)datapt, dp, (unsigned)dlen);
+
+ memcpy(datapt, dp, dlen);
datapt += dlen;
datalinelen += dlen;
}
@@ -1032,46 +1367,84 @@ ctl_putdata(
/*
* ctl_putstr - write a tagged string into the response packet
+ * in the form:
+ *
+ * tag="data"
+ *
+ * len is the data length excluding the NUL terminator,
+ * as in ctl_putstr("var", "value", strlen("value"));
*/
static void
ctl_putstr(
- const char *tag,
- const char *data,
- unsigned int len
+ const char * tag,
+ const char * data,
+ size_t len
)
{
- register char *cp;
- register const char *cq;
- char buffer[400];
+ char buffer[512];
+ char *cp;
+ size_t tl;
- cp = buffer;
- cq = tag;
- while (*cq != '\0')
- *cp++ = *cq++;
+ tl = strlen(tag);
+ memcpy(buffer, tag, tl);
+ cp = buffer + tl;
if (len > 0) {
+ NTP_INSIST(tl + 3 + len <= sizeof(buffer));
*cp++ = '=';
*cp++ = '"';
- if (len > (int) (sizeof(buffer) - (cp - buffer) - 1))
- len = sizeof(buffer) - (cp - buffer) - 1;
- memmove(cp, data, (unsigned)len);
+ memcpy(cp, data, len);
cp += len;
*cp++ = '"';
}
- ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
+ ctl_putdata(buffer, (u_int)(cp - buffer), 0);
}
/*
- * ctl_putdbl - write a tagged, signed double into the response packet
+ * ctl_putunqstr - write a tagged string into the response packet
+ * in the form:
+ *
+ * tag=data
+ *
+ * len is the data length excluding the NUL terminator.
+ * data must not contain a comma or whitespace.
*/
static void
-ctl_putdbl(
- const char *tag,
- double ts
+ctl_putunqstr(
+ const char * tag,
+ const char * data,
+ size_t len
)
{
- register char *cp;
- register const char *cq;
+ char buffer[512];
+ char *cp;
+ size_t tl;
+
+ tl = strlen(tag);
+ memcpy(buffer, tag, tl);
+ cp = buffer + tl;
+ if (len > 0) {
+ NTP_INSIST(tl + 1 + len <= sizeof(buffer));
+ *cp++ = '=';
+ memcpy(cp, data, len);
+ cp += len;
+ }
+ ctl_putdata(buffer, (u_int)(cp - buffer), 0);
+}
+
+
+/*
+ * ctl_putdblf - write a tagged, signed double into the response packet
+ */
+static void
+ctl_putdblf(
+ const char * tag,
+ const char * fmt,
+ double d
+ )
+{
+ char *cp;
+ const char *cq;
char buffer[200];
cp = buffer;
@@ -1080,7 +1453,7 @@ ctl_putdbl(
*cp++ = *cq++;
*cp++ = '=';
NTP_INSIST((cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "%.3f", ts);
+ snprintf(cp, sizeof(buffer) - (cp - buffer), fmt, d);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
}
@@ -1217,8 +1590,8 @@ ctl_putts(
*cp++ = '=';
NTP_INSIST((cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%08lx.%08lx",
- ts->l_ui & 0xffffffffUL, ts->l_uf & 0xffffffffUL);
+ snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%08x.%08x",
+ (u_int)ts->l_ui, (u_int)ts->l_uf);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
}
@@ -1313,6 +1686,7 @@ ctl_putarray(
cq = tag;
while (*cq != '\0')
*cp++ = *cq++;
+ *cp++ = '=';
i = start;
do {
if (i == 0)
@@ -1322,7 +1696,7 @@ ctl_putarray(
snprintf(cp, sizeof(buffer) - (cp - buffer),
" %.2f", arr[i] * 1e3);
cp += strlen(cp);
- } while(i != start);
+ } while (i != start);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
}
@@ -1337,51 +1711,80 @@ ctl_putsys(
{
l_fp tmp;
char str[256];
-#ifdef OPENSSL
+ u_int u;
+ double kb;
+ double dtemp;
+ const char *ss;
+ size_t len;
+ int firstvarname;
+ const struct ctl_var *k;
+#ifdef AUTOKEY
struct cert_info *cp;
- char cbuf[256];
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+#ifdef KERNEL_PLL
+ static struct timex ntx;
+ static u_long ntp_adjtime_time;
+
+ static const double to_ms =
+# ifdef STA_NANO
+ 1.0e-6; /* nsec to msec */
+# else
+ 1.0e-3; /* usec to msec */
+# endif
+
+ /*
+ * CS_K_* variables depend on up-to-date output of ntp_adjtime()
+ */
+ if (CS_KERN_FIRST <= varid && varid <= CS_KERN_LAST &&
+ current_time != ntp_adjtime_time) {
+ ZERO(ntx);
+ if (ntp_adjtime(&ntx) < 0)
+ msyslog(LOG_ERR, "ntp_adjtime() for mode 6 query failed: %m");
+ else
+ ntp_adjtime_time = current_time;
+ }
+#endif /* KERNEL_PLL */
switch (varid) {
- case CS_LEAP:
+ case CS_LEAP:
ctl_putuint(sys_var[CS_LEAP].text, sys_leap);
break;
- case CS_STRATUM:
+ case CS_STRATUM:
ctl_putuint(sys_var[CS_STRATUM].text, sys_stratum);
break;
- case CS_PRECISION:
+ case CS_PRECISION:
ctl_putint(sys_var[CS_PRECISION].text, sys_precision);
break;
- case CS_ROOTDELAY:
+ case CS_ROOTDELAY:
ctl_putdbl(sys_var[CS_ROOTDELAY].text, sys_rootdelay *
1e3);
break;
- case CS_ROOTDISPERSION:
+ case CS_ROOTDISPERSION:
ctl_putdbl(sys_var[CS_ROOTDISPERSION].text,
sys_rootdisp * 1e3);
break;
- case CS_REFID:
+ case CS_REFID:
if (sys_stratum > 1 && sys_stratum < STRATUM_UNSPEC)
ctl_putadr(sys_var[varid].text, sys_refid, NULL);
else
ctl_putrefid(sys_var[varid].text, sys_refid);
break;
- case CS_REFTIME:
+ case CS_REFTIME:
ctl_putts(sys_var[CS_REFTIME].text, &sys_reftime);
break;
- case CS_POLL:
+ case CS_POLL:
ctl_putuint(sys_var[CS_POLL].text, sys_poll);
break;
- case CS_PEERID:
+ case CS_PEERID:
if (sys_peer == NULL)
ctl_putuint(sys_var[CS_PEERID].text, 0);
else
@@ -1389,28 +1792,43 @@ ctl_putsys(
sys_peer->associd);
break;
- case CS_OFFSET:
- ctl_putdbl(sys_var[CS_OFFSET].text, last_offset * 1e3);
+ case CS_PEERADR:
+ if (sys_peer != NULL && sys_peer->dstadr != NULL)
+ ss = sptoa(&sys_peer->srcadr);
+ else
+ ss = "0.0.0.0:0";
+ ctl_putunqstr(sys_var[CS_PEERADR].text, ss, strlen(ss));
+ break;
+
+ case CS_PEERMODE:
+ u = (sys_peer != NULL)
+ ? sys_peer->hmode
+ : MODE_UNSPEC;
+ ctl_putuint(sys_var[CS_PEERMODE].text, u);
+ break;
+
+ case CS_OFFSET:
+ ctl_putdbl6(sys_var[CS_OFFSET].text, last_offset * 1e3);
break;
- case CS_DRIFT:
+ 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);
+ case CS_JITTER:
+ ctl_putdbl6(sys_var[CS_JITTER].text, sys_jitter * 1e3);
break;
- case CS_ERROR:
+ case CS_ERROR:
ctl_putdbl(sys_var[CS_ERROR].text, clock_jitter * 1e3);
break;
- case CS_CLOCK:
+ case CS_CLOCK:
get_systime(&tmp);
ctl_putts(sys_var[CS_CLOCK].text, &tmp);
break;
- case CS_PROCESSOR:
+ case CS_PROCESSOR:
#ifndef HAVE_UNAME
ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
sizeof(str_processor) - 1);
@@ -1420,7 +1838,7 @@ ctl_putsys(
#endif /* HAVE_UNAME */
break;
- case CS_SYSTEM:
+ case CS_SYSTEM:
#ifndef HAVE_UNAME
ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
sizeof(str_system) - 1);
@@ -1431,153 +1849,508 @@ ctl_putsys(
#endif /* HAVE_UNAME */
break;
- case CS_VERSION:
+ case CS_VERSION:
ctl_putstr(sys_var[CS_VERSION].text, Version,
strlen(Version));
break;
- case CS_STABIL:
+ 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);
- if (s + strlen(sys_var[CS_VARLIST].text) + 4 > be)
- break; /* really long var name */
-
- snprintf(s, sizeof(buf), "%s=\"",
- sys_var[CS_VARLIST].text);
- 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++ = ',';
- memcpy(s, k->text, i);
- 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++ = ',';
- memcpy(s, k->text,
- (unsigned)i);
- s += i;
- }
- if (s+2 >= be)
- break;
-
- *s++ = '"';
- *s = '\0';
-
- ctl_putdata(buf, (unsigned)( s - buf ),
- 0);
- }
- break;
-
- case CS_TAI:
+ case CS_VARLIST:
+ {
+ char buf[CTL_MAX_DATA_LEN];
+ //buffPointer, firstElementPointer, buffEndPointer
+ register char *buffp, *buffend;
+ register int firstVarName;
+ register const char *ss;
+ register int len;
+ register struct ctl_var *k;
+
+ buffp = buf;
+ buffend = buf + sizeof(buf);
+ if (buffp + strlen(sys_var[CS_VARLIST].text) + 4 > buffend)
+ break; /* really long var name */
+
+ snprintf(buffp, sizeof(buf), "%s=\"",sys_var[CS_VARLIST].text);
+ buffp += strlen(buffp);
+ firstVarName = TRUE;
+ for (k = sys_var; !(k->flags & EOV); k++) {
+ if (k->flags & PADDING)
+ continue;
+ len = strlen(k->text);
+ if (buffp + len + 1 >= buffend)
+ break;
+ if (!firstVarName)
+ *buffp++ = ',';
+ else
+ firstVarName = FALSE;
+ memcpy(buffp, k->text, len);
+ buffp += len;
+ }
+
+ for (k = ext_sys_var; k && !(k->flags & EOV); k++) {
+ if (k->flags & PADDING)
+ continue;
+ if (NULL == k->text)
+ continue;
+ ss = strchr(k->text, '=');
+ if (NULL == ss)
+ len = strlen(k->text);
+ else
+ len = ss - k->text;
+ if (buffp + len + 1 >= buffend)
+ break;
+ if (firstVarName) {
+ *buffp++ = ',';
+ firstVarName = FALSE;
+ }
+ memcpy(buffp, k->text,(unsigned)len);
+ buffp += len;
+ }
+ if (buffp + 2 >= buffend)
+ break;
+
+ *buffp++ = '"';
+ *buffp = '\0';
+
+ ctl_putdata(buf, (unsigned)( buffp - buf ), 0);
+ break;
+ }
+
+ case CS_TAI:
if (sys_tai > 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
+
+ case CS_LEAPTAB:
+ {
+ leap_signature_t lsig;
+ leapsec_getsig(&lsig);
+ if (lsig.ttime > 0)
+ ctl_putfs(sys_var[CS_LEAPTAB].text, lsig.ttime);
+ break;
+ }
+
+ case CS_LEAPEND:
+ {
+ leap_signature_t lsig;
+ leapsec_getsig(&lsig);
+ if (lsig.etime > 0)
+ ctl_putfs(sys_var[CS_LEAPEND].text, lsig.etime);
+ break;
+ }
+
+ case CS_RATE:
+ ctl_putuint(sys_var[CS_RATE].text, ntp_minpoll);
+ break;
- case CS_LEAPTAB:
- if (leap_sec > 0)
- ctl_putfs(sys_var[CS_LEAPTAB].text,
- leap_sec);
+ case CS_MRU_ENABLED:
+ ctl_puthex(sys_var[varid].text, mon_enabled);
break;
- case CS_LEAPEND:
- if (leap_expire > 0)
- ctl_putfs(sys_var[CS_LEAPEND].text,
- leap_expire);
+ case CS_MRU_DEPTH:
+ ctl_putuint(sys_var[varid].text, mru_entries);
break;
- case CS_RATE:
- ctl_putuint(sys_var[CS_RATE].text, ntp_minpoll);
+ case CS_MRU_MEM:
+ kb = mru_entries * (sizeof(mon_entry) / 1024.);
+ u = (u_int)kb;
+ if (kb - u >= 0.5)
+ u++;
+ ctl_putuint(sys_var[varid].text, u);
+ break;
+
+ case CS_MRU_DEEPEST:
+ ctl_putuint(sys_var[varid].text, mru_peakentries);
+ break;
+
+ case CS_MRU_MINDEPTH:
+ ctl_putuint(sys_var[varid].text, mru_mindepth);
+ break;
+
+ case CS_MRU_MAXAGE:
+ ctl_putint(sys_var[varid].text, mru_maxage);
+ break;
+
+ case CS_MRU_MAXDEPTH:
+ ctl_putuint(sys_var[varid].text, mru_maxdepth);
+ break;
+
+ case CS_MRU_MAXMEM:
+ kb = mru_maxdepth * (sizeof(mon_entry) / 1024.);
+ u = (u_int)kb;
+ if (kb - u >= 0.5)
+ u++;
+ ctl_putuint(sys_var[varid].text, u);
+ break;
+
+ case CS_SS_UPTIME:
+ ctl_putuint(sys_var[varid].text, current_time);
+ break;
+
+ case CS_SS_RESET:
+ ctl_putuint(sys_var[varid].text,
+ current_time - sys_stattime);
+ break;
+
+ case CS_SS_RECEIVED:
+ ctl_putuint(sys_var[varid].text, sys_received);
+ break;
+
+ case CS_SS_THISVER:
+ ctl_putuint(sys_var[varid].text, sys_newversion);
+ break;
+
+ case CS_SS_OLDVER:
+ ctl_putuint(sys_var[varid].text, sys_oldversion);
+ break;
+
+ case CS_SS_BADFORMAT:
+ ctl_putuint(sys_var[varid].text, sys_badlength);
+ break;
+
+ case CS_SS_BADAUTH:
+ ctl_putuint(sys_var[varid].text, sys_badauth);
+ break;
+
+ case CS_SS_DECLINED:
+ ctl_putuint(sys_var[varid].text, sys_declined);
+ break;
+
+ case CS_SS_RESTRICTED:
+ ctl_putuint(sys_var[varid].text, sys_restricted);
+ break;
+
+ case CS_SS_LIMITED:
+ ctl_putuint(sys_var[varid].text, sys_limitrejected);
+ break;
+
+ case CS_SS_KODSENT:
+ ctl_putuint(sys_var[varid].text, sys_kodsent);
+ break;
+
+ case CS_SS_PROCESSED:
+ ctl_putuint(sys_var[varid].text, sys_processed);
+ break;
+
+ case CS_BCASTDELAY:
+ ctl_putdbl(sys_var[varid].text, sys_bdelay * 1e3);
+ break;
+
+ case CS_AUTHDELAY:
+ LFPTOD(&sys_authdelay, dtemp);
+ ctl_putdbl(sys_var[varid].text, dtemp * 1e3);
+ break;
+
+ case CS_AUTHKEYS:
+ ctl_putuint(sys_var[varid].text, authnumkeys);
+ break;
+
+ case CS_AUTHFREEK:
+ ctl_putuint(sys_var[varid].text, authnumfreekeys);
+ break;
+
+ case CS_AUTHKLOOKUPS:
+ ctl_putuint(sys_var[varid].text, authkeylookups);
+ break;
+
+ case CS_AUTHKNOTFOUND:
+ ctl_putuint(sys_var[varid].text, authkeynotfound);
+ break;
+
+ case CS_AUTHKUNCACHED:
+ ctl_putuint(sys_var[varid].text, authkeyuncached);
+ break;
+
+ case CS_AUTHKEXPIRED:
+ ctl_putuint(sys_var[varid].text, authkeyexpired);
+ break;
+
+ case CS_AUTHENCRYPTS:
+ ctl_putuint(sys_var[varid].text, authencryptions);
+ break;
+
+ case CS_AUTHDECRYPTS:
+ ctl_putuint(sys_var[varid].text, authdecryptions);
+ break;
+
+ case CS_AUTHRESET:
+ ctl_putuint(sys_var[varid].text,
+ current_time - auth_timereset);
+ break;
+
+ /*
+ * CTL_IF_KERNLOOP() puts a zero if the kernel loop is
+ * unavailable, otherwise calls putfunc with args.
+ */
+#ifndef KERNEL_PLL
+# define CTL_IF_KERNLOOP(putfunc, args) \
+ ctl_putint(sys_var[varid].text, 0)
+#else
+# define CTL_IF_KERNLOOP(putfunc, args) \
+ putfunc args
+#endif
+
+ /*
+ * CTL_IF_KERNPPS() puts a zero if either the kernel
+ * loop is unavailable, or kernel hard PPS is not
+ * active, otherwise calls putfunc with args.
+ */
+#ifndef KERNEL_PLL
+# define CTL_IF_KERNPPS(putfunc, args) \
+ ctl_putint(sys_var[varid].text, 0)
+#else
+# define CTL_IF_KERNPPS(putfunc, args) \
+ if (0 == ntx.shift) \
+ ctl_putint(sys_var[varid].text, 0); \
+ else \
+ putfunc args /* no trailing ; */
+#endif
+
+ case CS_K_OFFSET:
+ CTL_IF_KERNLOOP(
+ ctl_putdblf,
+ (sys_var[varid].text, "%g", to_ms * ntx.offset)
+ );
+ break;
+
+ case CS_K_FREQ:
+ CTL_IF_KERNLOOP(
+ ctl_putsfp,
+ (sys_var[varid].text, ntx.freq)
+ );
break;
-#ifdef OPENSSL
- case CS_FLAGS:
+ case CS_K_MAXERR:
+ CTL_IF_KERNLOOP(
+ ctl_putdblf,
+ (sys_var[varid].text, "%.6g",
+ to_ms * ntx.maxerror)
+ );
+ break;
+
+ case CS_K_ESTERR:
+ CTL_IF_KERNLOOP(
+ ctl_putdblf,
+ (sys_var[varid].text, "%.6g",
+ to_ms * ntx.esterror)
+ );
+ break;
+
+ case CS_K_STFLAGS:
+#ifndef KERNEL_PLL
+ ss = "";
+#else
+ ss = k_st_flags(ntx.status);
+#endif
+ ctl_putstr(sys_var[varid].text, ss, strlen(ss));
+ break;
+
+ case CS_K_TIMECONST:
+ CTL_IF_KERNLOOP(
+ ctl_putint,
+ (sys_var[varid].text, ntx.constant)
+ );
+ break;
+
+ case CS_K_PRECISION:
+ CTL_IF_KERNLOOP(
+ ctl_putdblf,
+ (sys_var[varid].text, "%.6g",
+ to_ms * ntx.precision)
+ );
+ break;
+
+ case CS_K_FREQTOL:
+ CTL_IF_KERNLOOP(
+ ctl_putsfp,
+ (sys_var[varid].text, ntx.tolerance)
+ );
+ break;
+
+ case CS_K_PPS_FREQ:
+ CTL_IF_KERNPPS(
+ ctl_putsfp,
+ (sys_var[varid].text, ntx.ppsfreq)
+ );
+ break;
+
+ case CS_K_PPS_STABIL:
+ CTL_IF_KERNPPS(
+ ctl_putsfp,
+ (sys_var[varid].text, ntx.stabil)
+ );
+ break;
+
+ case CS_K_PPS_JITTER:
+ CTL_IF_KERNPPS(
+ ctl_putdbl,
+ (sys_var[varid].text, to_ms * ntx.jitter)
+ );
+ break;
+
+ case CS_K_PPS_CALIBDUR:
+ CTL_IF_KERNPPS(
+ ctl_putint,
+ (sys_var[varid].text, 1 << ntx.shift)
+ );
+ break;
+
+ case CS_K_PPS_CALIBS:
+ CTL_IF_KERNPPS(
+ ctl_putint,
+ (sys_var[varid].text, ntx.calcnt)
+ );
+ break;
+
+ case CS_K_PPS_CALIBERRS:
+ CTL_IF_KERNPPS(
+ ctl_putint,
+ (sys_var[varid].text, ntx.errcnt)
+ );
+ break;
+
+ case CS_K_PPS_JITEXC:
+ CTL_IF_KERNPPS(
+ ctl_putint,
+ (sys_var[varid].text, ntx.jitcnt)
+ );
+ break;
+
+ case CS_K_PPS_STBEXC:
+ CTL_IF_KERNPPS(
+ ctl_putint,
+ (sys_var[varid].text, ntx.stbcnt)
+ );
+ break;
+
+ case CS_IOSTATS_RESET:
+ ctl_putuint(sys_var[varid].text,
+ current_time - io_timereset);
+ break;
+
+ case CS_TOTAL_RBUF:
+ ctl_putuint(sys_var[varid].text, total_recvbuffs());
+ break;
+
+ case CS_FREE_RBUF:
+ ctl_putuint(sys_var[varid].text, free_recvbuffs());
+ break;
+
+ case CS_USED_RBUF:
+ ctl_putuint(sys_var[varid].text, full_recvbuffs());
+ break;
+
+ case CS_RBUF_LOWATER:
+ ctl_putuint(sys_var[varid].text, lowater_additions());
+ break;
+
+ case CS_IO_DROPPED:
+ ctl_putuint(sys_var[varid].text, packets_dropped);
+ break;
+
+ case CS_IO_IGNORED:
+ ctl_putuint(sys_var[varid].text, packets_ignored);
+ break;
+
+ case CS_IO_RECEIVED:
+ ctl_putuint(sys_var[varid].text, packets_received);
+ break;
+
+ case CS_IO_SENT:
+ ctl_putuint(sys_var[varid].text, packets_sent);
+ break;
+
+ case CS_IO_SENDFAILED:
+ ctl_putuint(sys_var[varid].text, packets_notsent);
+ break;
+
+ case CS_IO_WAKEUPS:
+ ctl_putuint(sys_var[varid].text, handler_calls);
+ break;
+
+ case CS_IO_GOODWAKEUPS:
+ ctl_putuint(sys_var[varid].text, handler_pkts);
+ break;
+
+ case CS_TIMERSTATS_RESET:
+ ctl_putuint(sys_var[varid].text,
+ current_time - timer_timereset);
+ break;
+
+ case CS_TIMER_OVERRUNS:
+ ctl_putuint(sys_var[varid].text, alarm_overflow);
+ break;
+
+ case CS_TIMER_XMTS:
+ ctl_putuint(sys_var[varid].text, timer_xmtcalls);
+ break;
+
+ case CS_FUZZ:
+ ctl_putdbl(sys_var[varid].text, sys_fuzz * 1e3);
+ break;
+#ifdef AUTOKEY
+ case CS_FLAGS:
if (crypto_flags)
ctl_puthex(sys_var[CS_FLAGS].text,
crypto_flags);
break;
- case CS_DIGEST:
+ case CS_DIGEST:
if (crypto_flags) {
- strcpy(str, OBJ_nid2ln(crypto_nid));
+ strlcpy(str, OBJ_nid2ln(crypto_nid),
+ COUNTOF(str));
ctl_putstr(sys_var[CS_DIGEST].text, str,
strlen(str));
}
break;
- case CS_SIGNATURE:
+ case CS_SIGNATURE:
if (crypto_flags) {
const EVP_MD *dp;
dp = EVP_get_digestbynid(crypto_flags >> 16);
- strcpy(str, OBJ_nid2ln(EVP_MD_pkey_type(dp)));
+ strlcpy(str, OBJ_nid2ln(EVP_MD_pkey_type(dp)),
+ COUNTOF(str));
ctl_putstr(sys_var[CS_SIGNATURE].text, str,
strlen(str));
}
break;
- case CS_HOST:
- if (sys_hostname != NULL)
- ctl_putstr(sys_var[CS_HOST].text, sys_hostname,
- strlen(sys_hostname));
+ case CS_HOST:
+ if (hostval.ptr != NULL)
+ ctl_putstr(sys_var[CS_HOST].text, hostval.ptr,
+ strlen(hostval.ptr));
break;
- case CS_GROUP:
- if (sys_groupname != NULL)
- ctl_putstr(sys_var[CS_GROUP].text, sys_groupname,
- strlen(sys_groupname));
+ case CS_IDENT:
+ if (sys_ident != NULL)
+ ctl_putstr(sys_var[CS_IDENT].text, sys_ident,
+ strlen(sys_ident));
break;
- case CS_CERTIF:
+ case CS_CERTIF:
for (cp = cinfo; cp != NULL; cp = cp->link) {
- snprintf(cbuf, sizeof(cbuf), "%s %s 0x%x",
+ tstamp_t tstamp;
+
+ snprintf(str, sizeof(str), "%s %s 0x%x",
cp->subject, cp->issuer, cp->flags);
- ctl_putstr(sys_var[CS_CERTIF].text, cbuf,
- strlen(cbuf));
- ctl_putfs(sys_var[CS_REVTIME].text, cp->last);
+ ctl_putstr(sys_var[CS_CERTIF].text, str,
+ strlen(str));
+ tstamp = caltontp(&(cp->last)); /* XXX too small to hold some values, but that's what ctl_putfs requires */
+ ctl_putfs(sys_var[CS_REVTIME].text, tstamp);
}
break;
- case CS_PUBLIC:
+ case CS_PUBLIC:
if (hostval.tstamp != 0)
ctl_putfs(sys_var[CS_PUBLIC].text,
ntohl(hostval.tstamp));
break;
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
}
}
@@ -1587,300 +2360,328 @@ ctl_putsys(
*/
static void
ctl_putpeer(
- int varid,
- struct peer *peer
+ int id,
+ struct peer *p
)
{
- int temp;
-#ifdef OPENSSL
- char str[256];
+ char buf[CTL_MAX_DATA_LEN];
+ char *s;
+ char *t;
+ char *be;
+ int i;
+ const struct ctl_var *k;
+#ifdef AUTOKEY
struct autokey *ap;
-#endif /* OPENSSL */
+ const EVP_MD *dp;
+ const char *str;
+#endif /* AUTOKEY */
- switch (varid) {
+ switch (id) {
- case CP_CONFIG:
- ctl_putuint(peer_var[CP_CONFIG].text,
- (unsigned)((peer->flags & FLAG_PREEMPT) == 0));
+ case CP_CONFIG:
+ ctl_putuint(peer_var[id].text,
+ !(FLAG_PREEMPT & p->flags));
break;
- case CP_AUTHENABLE:
- ctl_putuint(peer_var[CP_AUTHENABLE].text,
- (unsigned)(peer->keyid != 0));
+ case CP_AUTHENABLE:
+ ctl_putuint(peer_var[id].text, !(p->keyid));
break;
- case CP_AUTHENTIC:
- ctl_putuint(peer_var[CP_AUTHENTIC].text,
- (unsigned)((peer->flags & FLAG_AUTHENTIC) != 0));
+ case CP_AUTHENTIC:
+ ctl_putuint(peer_var[id].text,
+ !!(FLAG_AUTHENTIC & p->flags));
break;
- case CP_SRCADR:
- ctl_putadr(peer_var[CP_SRCADR].text, 0,
- &peer->srcadr);
+ case CP_SRCADR:
+ ctl_putadr(peer_var[id].text, 0, &p->srcadr);
break;
- case CP_SRCPORT:
- ctl_putuint(peer_var[CP_SRCPORT].text,
- ntohs(((struct sockaddr_in*)&peer->srcadr)->sin_port));
+ case CP_SRCPORT:
+ ctl_putuint(peer_var[id].text, SRCPORT(&p->srcadr));
break;
- case CP_DSTADR:
- if (peer->dstadr) {
- ctl_putadr(peer_var[CP_DSTADR].text, 0,
- &(peer->dstadr->sin));
- } else {
- ctl_putadr(peer_var[CP_DSTADR].text, 0,
- NULL);
- }
+ case CP_SRCHOST:
+ if (p->hostname != NULL)
+ ctl_putstr(peer_var[id].text, p->hostname,
+ strlen(p->hostname));
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));
+ case CP_DSTADR:
+ ctl_putadr(peer_var[id].text, 0,
+ (p->dstadr != NULL)
+ ? &p->dstadr->sin
+ : NULL);
break;
- case CP_IN:
- if (peer->r21 > 0)
- ctl_putdbl(peer_var[CP_IN].text,
- peer->r21 / 1e3);
+ case CP_DSTPORT:
+ ctl_putuint(peer_var[id].text,
+ (p->dstadr != NULL)
+ ? SRCPORT(&p->dstadr->sin)
+ : 0);
break;
- case CP_OUT:
- if (peer->r34 >0)
- ctl_putdbl(peer_var[CP_OUT].text,
- peer->r34 / 1e3);
+ case CP_IN:
+ if (p->r21 > 0.)
+ ctl_putdbl(peer_var[id].text, p->r21 / 1e3);
break;
- case CP_RATE:
- ctl_putuint(peer_var[CP_RATE].text, peer->throttle);
+ case CP_OUT:
+ if (p->r34 > 0.)
+ ctl_putdbl(peer_var[id].text, p->r34 / 1e3);
break;
- case CP_LEAP:
- ctl_putuint(peer_var[CP_LEAP].text, peer->leap);
+ case CP_RATE:
+ ctl_putuint(peer_var[id].text, p->throttle);
break;
- case CP_HMODE:
- ctl_putuint(peer_var[CP_HMODE].text, peer->hmode);
+ case CP_LEAP:
+ ctl_putuint(peer_var[id].text, p->leap);
break;
- case CP_STRATUM:
- ctl_putuint(peer_var[CP_STRATUM].text, peer->stratum);
+ case CP_HMODE:
+ ctl_putuint(peer_var[id].text, p->hmode);
break;
- case CP_PPOLL:
- ctl_putuint(peer_var[CP_PPOLL].text, peer->ppoll);
+ case CP_STRATUM:
+ ctl_putuint(peer_var[id].text, p->stratum);
break;
- case CP_HPOLL:
- ctl_putuint(peer_var[CP_HPOLL].text, peer->hpoll);
+ case CP_PPOLL:
+ ctl_putuint(peer_var[id].text, p->ppoll);
break;
- case CP_PRECISION:
- ctl_putint(peer_var[CP_PRECISION].text,
- peer->precision);
+ case CP_HPOLL:
+ ctl_putuint(peer_var[id].text, p->hpoll);
break;
- case CP_ROOTDELAY:
- ctl_putdbl(peer_var[CP_ROOTDELAY].text,
- peer->rootdelay * 1e3);
+ case CP_PRECISION:
+ ctl_putint(peer_var[id].text, p->precision);
break;
- case CP_ROOTDISPERSION:
- ctl_putdbl(peer_var[CP_ROOTDISPERSION].text,
- peer->rootdisp * 1e3);
+ case CP_ROOTDELAY:
+ ctl_putdbl(peer_var[id].text, p->rootdelay * 1e3);
break;
- case CP_REFID:
+ case CP_ROOTDISPERSION:
+ ctl_putdbl(peer_var[id].text, p->rootdisp * 1e3);
+ break;
+
+ case CP_REFID:
#ifdef REFCLOCK
- if (peer->flags & FLAG_REFCLOCK) {
- ctl_putrefid(peer_var[varid].text, peer->refid);
+ if (p->flags & FLAG_REFCLOCK) {
+ ctl_putrefid(peer_var[id].text, p->refid);
break;
}
#endif
- if (peer->stratum > 1 && peer->stratum < STRATUM_UNSPEC)
- ctl_putadr(peer_var[varid].text, peer->refid,
+ if (p->stratum > 1 && p->stratum < STRATUM_UNSPEC)
+ ctl_putadr(peer_var[id].text, p->refid,
NULL);
else
- ctl_putrefid(peer_var[varid].text, peer->refid);
+ ctl_putrefid(peer_var[id].text, p->refid);
break;
- case CP_REFTIME:
- ctl_putts(peer_var[CP_REFTIME].text, &peer->reftime);
+ case CP_REFTIME:
+ ctl_putts(peer_var[id].text, &p->reftime);
break;
- case CP_ORG:
- ctl_putts(peer_var[CP_ORG].text, &peer->aorg);
+ case CP_ORG:
+ ctl_putts(peer_var[id].text, &p->aorg);
break;
- case CP_REC:
- ctl_putts(peer_var[CP_REC].text, &peer->dst);
+ case CP_REC:
+ ctl_putts(peer_var[id].text, &p->dst);
break;
- case CP_XMT:
- if (peer->xleave != 0)
- ctl_putdbl(peer_var[CP_XMT].text, peer->xleave *
- 1e3);
+ case CP_XMT:
+ if (p->xleave)
+ ctl_putdbl(peer_var[id].text, p->xleave * 1e3);
break;
- case CP_BIAS:
- if (peer->bias != 0)
- ctl_putdbl(peer_var[CP_BIAS].text, peer->bias *
- 1e3);
+ case CP_BIAS:
+ if (p->bias != 0.)
+ ctl_putdbl(peer_var[id].text, p->bias * 1e3);
break;
- case CP_REACH:
- ctl_puthex(peer_var[CP_REACH].text, peer->reach);
+ case CP_REACH:
+ ctl_puthex(peer_var[id].text, p->reach);
break;
- case CP_FLASH:
- temp = peer->flash;
- ctl_puthex(peer_var[CP_FLASH].text, temp);
+ case CP_FLASH:
+ ctl_puthex(peer_var[id].text, p->flash);
break;
- case CP_TTL:
- if (peer->ttl > 0)
- ctl_putint(peer_var[CP_TTL].text,
- sys_ttl[peer->ttl]);
+ case CP_TTL:
+#ifdef REFCLOCK
+ if (p->flags & FLAG_REFCLOCK) {
+ ctl_putuint(peer_var[id].text, p->ttl);
+ break;
+ }
+#endif
+ if (p->ttl > 0 && p->ttl < COUNTOF(sys_ttl))
+ ctl_putint(peer_var[id].text,
+ sys_ttl[p->ttl]);
break;
- case CP_UNREACH:
- ctl_putuint(peer_var[CP_UNREACH].text, peer->unreach);
+ case CP_UNREACH:
+ ctl_putuint(peer_var[id].text, p->unreach);
break;
- case CP_TIMER:
- ctl_putuint(peer_var[CP_TIMER].text,
- peer->nextdate - current_time);
+ case CP_TIMER:
+ ctl_putuint(peer_var[id].text,
+ p->nextdate - current_time);
break;
- case CP_DELAY:
- ctl_putdbl(peer_var[CP_DELAY].text, peer->delay * 1e3);
+ case CP_DELAY:
+ ctl_putdbl(peer_var[id].text, p->delay * 1e3);
break;
- case CP_OFFSET:
- ctl_putdbl(peer_var[CP_OFFSET].text, peer->offset *
- 1e3);
+ case CP_OFFSET:
+ ctl_putdbl(peer_var[id].text, p->offset * 1e3);
break;
- case CP_JITTER:
- ctl_putdbl(peer_var[CP_JITTER].text, peer->jitter *
- 1e3);
+ case CP_JITTER:
+ ctl_putdbl(peer_var[id].text, p->jitter * 1e3);
break;
- case CP_DISPERSION:
- ctl_putdbl(peer_var[CP_DISPERSION].text, peer->disp *
- 1e3);
+ case CP_DISPERSION:
+ ctl_putdbl(peer_var[id].text, p->disp * 1e3);
break;
- case CP_KEYID:
- if (peer->keyid > NTP_MAXKEY)
- ctl_puthex(peer_var[CP_KEYID].text,
- peer->keyid);
+ case CP_KEYID:
+ if (p->keyid > NTP_MAXKEY)
+ ctl_puthex(peer_var[id].text, p->keyid);
else
- ctl_putuint(peer_var[CP_KEYID].text,
- peer->keyid);
+ ctl_putuint(peer_var[id].text, p->keyid);
break;
- case CP_FILTDELAY:
- ctl_putarray(peer_var[CP_FILTDELAY].text,
- peer->filter_delay, (int)peer->filter_nextpt);
+ case CP_FILTDELAY:
+ ctl_putarray(peer_var[id].text, p->filter_delay,
+ p->filter_nextpt);
break;
- case CP_FILTOFFSET:
- ctl_putarray(peer_var[CP_FILTOFFSET].text,
- peer->filter_offset, (int)peer->filter_nextpt);
+ case CP_FILTOFFSET:
+ ctl_putarray(peer_var[id].text, p->filter_offset,
+ p->filter_nextpt);
break;
- case CP_FILTERROR:
- ctl_putarray(peer_var[CP_FILTERROR].text,
- peer->filter_disp, (int)peer->filter_nextpt);
+ case CP_FILTERROR:
+ ctl_putarray(peer_var[id].text, p->filter_disp,
+ p->filter_nextpt);
break;
- case CP_PMODE:
- ctl_putuint(peer_var[CP_PMODE].text, peer->pmode);
+ case CP_PMODE:
+ ctl_putuint(peer_var[id].text, p->pmode);
break;
- case CP_RECEIVED:
- ctl_putuint(peer_var[CP_RECEIVED].text, peer->received);
+ case CP_RECEIVED:
+ ctl_putuint(peer_var[id].text, p->received);
+ break;
+
+ case CP_SENT:
+ ctl_putuint(peer_var[id].text, p->sent);
+ break;
+
+ case CP_VARLIST:
+ s = buf;
+ be = buf + sizeof(buf);
+ if (strlen(peer_var[id].text) + 4 > sizeof(buf))
+ break; /* really long var name */
+
+ snprintf(s, sizeof(buf), "%s=\"", peer_var[id].text);
+ s += strlen(s);
+ t = s;
+ for (k = peer_var; !(EOV & k->flags); k++) {
+ if (PADDING & k->flags)
+ continue;
+ i = strlen(k->text);
+ if (s + i + 1 >= be)
+ break;
+ if (s != t)
+ *s++ = ',';
+ memcpy(s, k->text, i);
+ s += i;
+ }
+ if (s + 2 < be) {
+ *s++ = '"';
+ *s = '\0';
+ ctl_putdata(buf, (u_int)(s - buf), 0);
+ }
break;
- case CP_SENT:
- ctl_putuint(peer_var[CP_SENT].text, peer->sent);
+ case CP_TIMEREC:
+ ctl_putuint(peer_var[id].text,
+ current_time - p->timereceived);
break;
- case CP_VARLIST:
- {
- char buf[CTL_MAX_DATA_LEN];
- register char *s, *t, *be;
- register int i;
- register struct ctl_var *k;
+ case CP_TIMEREACH:
+ ctl_putuint(peer_var[id].text,
+ current_time - p->timereachable);
+ break;
- s = buf;
- be = buf + sizeof(buf);
- if (s + strlen(peer_var[CP_VARLIST].text) + 4 > be)
- break; /* really long var name */
+ case CP_BADAUTH:
+ ctl_putuint(peer_var[id].text, p->badauth);
+ break;
- snprintf(s, sizeof(buf), "%s=\"",
- peer_var[CP_VARLIST].text);
- s += strlen(s);
- t = s;
- for (k = peer_var; !(k->flags & EOV); k++) {
- if (k->flags & PADDING)
- continue;
+ case CP_BOGUSORG:
+ ctl_putuint(peer_var[id].text, p->bogusorg);
+ break;
- i = strlen(k->text);
- if (s + i + 1 >= be)
- break;
+ case CP_OLDPKT:
+ ctl_putuint(peer_var[id].text, p->oldpkt);
+ break;
- if (s != t)
- *s++ = ',';
- memcpy(s, k->text, i);
- s += i;
- }
- if (s+2 >= be)
- break;
+ case CP_SELDISP:
+ ctl_putuint(peer_var[id].text, p->seldisptoolarge);
+ 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);
+ case CP_SELBROKEN:
+ ctl_putuint(peer_var[id].text, p->selbroken);
break;
- case CP_SIGNATURE:
- if (peer->crypto) {
- const EVP_MD *dp;
+ case CP_CANDIDATE:
+ ctl_putuint(peer_var[id].text, p->status);
+ break;
+#ifdef AUTOKEY
+ case CP_FLAGS:
+ if (p->crypto)
+ ctl_puthex(peer_var[id].text, p->crypto);
+ break;
- dp = EVP_get_digestbynid(peer->crypto >> 16);
- strcpy(str, OBJ_nid2ln(EVP_MD_pkey_type(dp)));
- ctl_putstr(peer_var[CP_SIGNATURE].text, str,
- strlen(str));
+ case CP_SIGNATURE:
+ if (p->crypto) {
+ dp = EVP_get_digestbynid(p->crypto >> 16);
+ str = OBJ_nid2ln(EVP_MD_pkey_type(dp));
+ ctl_putstr(peer_var[id].text, str, strlen(str));
}
break;
- case CP_HOST:
- if (peer->subject != NULL)
- ctl_putstr(peer_var[CP_HOST].text,
- peer->subject, strlen(peer->subject));
+ case CP_HOST:
+ if (p->subject != NULL)
+ ctl_putstr(peer_var[id].text, p->subject,
+ strlen(p->subject));
break;
- case CP_VALID: /* not used */
+ case CP_VALID: /* not used */
break;
- case CP_INITSEQ:
- if ((ap = (struct autokey *)peer->recval.ptr) == NULL)
+ case CP_INITSEQ:
+ if (NULL == (ap = p->recval.ptr))
break;
ctl_putint(peer_var[CP_INITSEQ].text, ap->seq);
ctl_puthex(peer_var[CP_INITKEY].text, ap->key);
ctl_putfs(peer_var[CP_INITTSP].text,
- ntohl(peer->recval.tstamp));
+ ntohl(p->recval.tstamp));
+ break;
+
+ case CP_IDENT:
+ if (p->ident != NULL)
+ ctl_putstr(peer_var[id].text, p->ident,
+ strlen(p->ident));
break;
-#endif /* OPENSSL */
+
+
+#endif /* AUTOKEY */
}
}
@@ -1891,155 +2692,149 @@ ctl_putpeer(
*/
static void
ctl_putclock(
- int varid,
- struct refclockstat *clock_stat,
+ int id,
+ struct refclockstat *pcs,
int mustput
)
{
- switch(varid) {
+ char buf[CTL_MAX_DATA_LEN];
+ char *s, *t, *be;
+ const char *ss;
+ int i;
+ const struct ctl_var *k;
+
+ switch (id) {
- case CC_TYPE:
- if (mustput || clock_stat->clockdesc == NULL
- || *(clock_stat->clockdesc) == '\0') {
- ctl_putuint(clock_var[CC_TYPE].text, clock_stat->type);
+ case CC_TYPE:
+ if (mustput || pcs->clockdesc == NULL
+ || *(pcs->clockdesc) == '\0') {
+ ctl_putuint(clock_var[id].text, pcs->type);
}
break;
- case CC_TIMECODE:
- ctl_putstr(clock_var[CC_TIMECODE].text,
- clock_stat->p_lastcode,
- (unsigned)clock_stat->lencode);
+ case CC_TIMECODE:
+ ctl_putstr(clock_var[id].text,
+ pcs->p_lastcode,
+ (unsigned)pcs->lencode);
break;
- case CC_POLL:
- ctl_putuint(clock_var[CC_POLL].text, clock_stat->polls);
+ case CC_POLL:
+ ctl_putuint(clock_var[id].text, pcs->polls);
break;
- case CC_NOREPLY:
- ctl_putuint(clock_var[CC_NOREPLY].text,
- clock_stat->noresponse);
+ case CC_NOREPLY:
+ ctl_putuint(clock_var[id].text,
+ pcs->noresponse);
break;
- case CC_BADFORMAT:
- ctl_putuint(clock_var[CC_BADFORMAT].text,
- clock_stat->badformat);
+ case CC_BADFORMAT:
+ ctl_putuint(clock_var[id].text,
+ pcs->badformat);
break;
- case CC_BADDATA:
- ctl_putuint(clock_var[CC_BADDATA].text,
- clock_stat->baddata);
+ case CC_BADDATA:
+ ctl_putuint(clock_var[id].text,
+ pcs->baddata);
break;
- case CC_FUDGETIME1:
- if (mustput || (clock_stat->haveflags & CLK_HAVETIME1))
- ctl_putdbl(clock_var[CC_FUDGETIME1].text,
- clock_stat->fudgetime1 * 1e3);
+ case CC_FUDGETIME1:
+ if (mustput || (pcs->haveflags & CLK_HAVETIME1))
+ ctl_putdbl(clock_var[id].text,
+ pcs->fudgetime1 * 1e3);
break;
- case CC_FUDGETIME2:
- if (mustput || (clock_stat->haveflags & CLK_HAVETIME2))
- ctl_putdbl(clock_var[CC_FUDGETIME2].text,
- clock_stat->fudgetime2 * 1e3);
+ case CC_FUDGETIME2:
+ if (mustput || (pcs->haveflags & CLK_HAVETIME2))
+ ctl_putdbl(clock_var[id].text,
+ pcs->fudgetime2 * 1e3);
break;
- case CC_FUDGEVAL1:
- if (mustput || (clock_stat->haveflags & CLK_HAVEVAL1))
- ctl_putint(clock_var[CC_FUDGEVAL1].text,
- clock_stat->fudgeval1);
+ case CC_FUDGEVAL1:
+ if (mustput || (pcs->haveflags & CLK_HAVEVAL1))
+ ctl_putint(clock_var[id].text,
+ pcs->fudgeval1);
break;
- case CC_FUDGEVAL2:
- if (mustput || (clock_stat->haveflags & CLK_HAVEVAL2)) {
- if (clock_stat->fudgeval1 > 1)
- ctl_putadr(clock_var[CC_FUDGEVAL2].text,
- clock_stat->fudgeval2, NULL);
+ case CC_FUDGEVAL2:
+ if (mustput || (pcs->haveflags & CLK_HAVEVAL2)) {
+ if (pcs->fudgeval1 > 1)
+ ctl_putadr(clock_var[id].text,
+ pcs->fudgeval2, NULL);
else
- ctl_putrefid(clock_var[CC_FUDGEVAL2].text,
- clock_stat->fudgeval2);
+ ctl_putrefid(clock_var[id].text,
+ pcs->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);
+ case CC_FLAGS:
+ ctl_putuint(clock_var[id].text, pcs->flags);
break;
- case CC_DEVICE:
- if (clock_stat->clockdesc == NULL ||
- *(clock_stat->clockdesc) == '\0') {
+ case CC_DEVICE:
+ if (pcs->clockdesc == NULL ||
+ *(pcs->clockdesc) == '\0') {
if (mustput)
- ctl_putstr(clock_var[CC_DEVICE].text,
+ ctl_putstr(clock_var[id].text,
"", 0);
} else {
- ctl_putstr(clock_var[CC_DEVICE].text,
- clock_stat->clockdesc,
- strlen(clock_stat->clockdesc));
+ ctl_putstr(clock_var[id].text,
+ pcs->clockdesc,
+ strlen(pcs->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 */
-
- snprintf(s, sizeof(buf), "%s=\"",
- clock_var[CC_VARLIST].text);
- 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++ = ',';
- memcpy(s, k->text, i);
- 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++ = ',';
- memcpy(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;
+ case CC_VARLIST:
+ s = buf;
+ be = buf + sizeof(buf);
+ if (strlen(clock_var[CC_VARLIST].text) + 4 >
+ sizeof(buf))
+ break; /* really long var name */
+
+ snprintf(s, sizeof(buf), "%s=\"",
+ clock_var[CC_VARLIST].text);
+ s += strlen(s);
+ t = s;
+
+ for (k = clock_var; !(EOV & k->flags); k++) {
+ if (PADDING & k->flags)
+ continue;
+
+ i = strlen(k->text);
+ if (s + i + 1 >= be)
+ break;
+
+ if (s != t)
+ *s++ = ',';
+ memcpy(s, k->text, i);
+ s += i;
+ }
+
+ for (k = pcs->kv_list; k && !(EOV & k->flags); k++) {
+ if (PADDING & k->flags)
+ continue;
+
+ ss = k->text;
+ if (NULL == ss)
+ continue;
+
+ while (*ss && *ss != '=')
+ ss++;
+ i = ss - k->text;
+ if (s + i + 1 >= be)
+ break;
+
+ if (s != t)
+ *s++ = ',';
+ memcpy(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
@@ -2049,17 +2844,19 @@ ctl_putclock(
/*
* ctl_getitem - get the next data item from the incoming packet
*/
-static struct ctl_var *
+static const struct ctl_var *
ctl_getitem(
- struct ctl_var *var_list,
+ const 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 const struct ctl_var eol = { 0, EOV, NULL };
static char buf[128];
+ static u_long quiet_until;
+ const struct ctl_var *v;
+ const char *pch;
+ char *cp;
+ char *tp;
/*
* Delete leading commas and white space
@@ -2068,10 +2865,10 @@ ctl_getitem(
isspace((unsigned char)*reqpt)))
reqpt++;
if (reqpt >= reqend)
- return (0);
+ return NULL;
- if (var_list == (struct ctl_var *)0)
- return (&eol);
+ if (NULL == var_list)
+ return &eol;
/*
* Look for a first character match on the tag. If we find
@@ -2079,18 +2876,18 @@ ctl_getitem(
*/
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) {
+ for (v = var_list; !(EOV & v->flags); v++) {
+ if (!(PADDING & v->flags) && *cp == *(v->text)) {
+ pch = v->text;
+ while ('\0' != *pch && '=' != *pch && cp < reqend
+ && *cp == *pch) {
cp++;
- tp++;
+ pch++;
}
- if ((*tp == '\0') || (*tp == '=')) {
- while (cp < reqend && isspace((unsigned char)*cp))
+ if ('\0' == *pch || '=' == *pch) {
+ while (cp < reqend && isspace((u_char)*cp))
cp++;
- if (cp == reqend || *cp == ',') {
+ if (cp == reqend || ',' == *cp) {
buf[0] = '\0';
*data = buf;
if (cp < reqend)
@@ -2098,42 +2895,37 @@ ctl_getitem(
reqpt = cp;
return v;
}
- if (*cp == '=') {
+ if ('=' == *cp) {
cp++;
tp = buf;
- while (cp < reqend && isspace((unsigned char)*cp))
+ while (cp < reqend && isspace((u_char)*cp))
cp++;
while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
- if (tp >= buf + sizeof(buf)) {
+ if (tp - buf >= sizeof(buf)) {
ctl_error(CERR_BADFMT);
numctlbadpkts++;
-#if 0 /* Avoid possible DOS attack */
-/* If we get a smarter msyslog we can re-enable this */
- msyslog(LOG_WARNING,
- "Possible 'ntpdx' exploit from %s:%d (possibly spoofed)\n",
- stoa(rmt_addr), SRCPORT(rmt_addr)
- );
-#endif
- return (0);
+ NLOG(NLOG_SYSEVENT)
+ if (quiet_until <= current_time) {
+ quiet_until = current_time + 300;
+ msyslog(LOG_WARNING,
+"Possible 'ntpdx' exploit from %s#%u (possibly spoofed)", stoa(rmt_addr), SRCPORT(rmt_addr));
+ }
+ return NULL;
}
}
if (cp < reqend)
cp++;
*tp-- = '\0';
- while (tp >= buf) {
- if (!isspace((unsigned int)(*tp)))
- break;
+ while (tp >= buf && isspace((u_char)*tp))
*tp-- = '\0';
- }
reqpt = cp;
*data = buf;
- return (v);
+ return v;
}
}
cp = reqpt;
}
- v++;
}
return v;
}
@@ -2156,15 +2948,15 @@ control_unspec(
* I return no errors and no data, unless a specified assocation
* doesn't exist.
*/
- if (res_associd != 0) {
- if ((peer = findpeerbyassoc(res_associd)) == 0) {
+ if (res_associd) {
+ peer = findpeerbyassoc(res_associd);
+ if (NULL == peer) {
ctl_error(CERR_BADASSOC);
return;
}
rpkt.status = htons(ctlpeerstatus(peer));
- } else {
+ } else
rpkt.status = htons(ctlsysstatus());
- }
ctl_flushpkt(0);
}
@@ -2180,9 +2972,11 @@ read_status(
int restrict_mask
)
{
- register int i;
- register struct peer *peer;
- u_short ass_stat[CTL_MAX_DATA_LEN / sizeof(u_short)];
+ struct peer *peer;
+ const u_char *cp;
+ int n;
+ /* a_st holds association ID, status pairs alternating */
+ u_short a_st[CTL_MAX_DATA_LEN / sizeof(u_short)];
#ifdef DEBUG
if (debug > 2)
@@ -2193,167 +2987,175 @@ read_status(
* 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 < NTP_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 {
+ if (res_associd) {
peer = findpeerbyassoc(res_associd);
- if (peer == 0) {
+ if (NULL == peer) {
ctl_error(CERR_BADASSOC);
- } else {
- register u_char *cp;
+ return;
+ }
+ 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);
+ return;
+ }
+ n = 0;
+ rpkt.status = htons(ctlsysstatus());
+ for (peer = peer_list; peer != NULL; peer = peer->p_link) {
+ a_st[n++] = htons(peer->associd);
+ a_st[n++] = htons(ctlpeerstatus(peer));
+ /* two entries each loop iteration, so n + 1 */
+ if (n + 1 >= COUNTOF(a_st)) {
+ ctl_putdata((void *)a_st, n * sizeof(a_st[0]),
+ 1);
+ n = 0;
+ }
+ }
+ if (n)
+ ctl_putdata((void *)a_st, n * sizeof(a_st[0]), 1);
+ ctl_flushpkt(0);
+}
- 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_peervars - half of read_variables() implementation
+ */
+static void
+read_peervars(void)
+{
+ const struct ctl_var *v;
+ struct peer *peer;
+ const u_char *cp;
+ int i;
+ char * valuep;
+ u_char wants[CP_MAXCODE + 1];
+ u_int gotvar;
+
+ /*
+ * Wants info for a particular peer. See if we know
+ * the guy.
+ */
+ peer = findpeerbyassoc(res_associd);
+ if (NULL == peer) {
+ ctl_error(CERR_BADASSOC);
+ return;
+ }
+ rpkt.status = htons(ctlpeerstatus(peer));
+ if (res_authokay)
+ peer->num_events = 0;
+ ZERO(wants);
+ gotvar = 0;
+ while (NULL != (v = ctl_getitem(peer_var, &valuep))) {
+ if (v->flags & EOV) {
+ ctl_error(CERR_UNKNOWNVAR);
+ return;
}
+ NTP_INSIST(v->code < COUNTOF(wants));
+ wants[v->code] = 1;
+ gotvar = 1;
}
+ if (gotvar) {
+ for (i = 1; i < COUNTOF(wants); i++)
+ if (wants[i])
+ ctl_putpeer(i, peer);
+ } else
+ 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
+ * read_sysvars - half of read_variables() implementation
*/
-/*ARGSUSED*/
static void
-read_variables(
- struct recvbuf *rbufp,
- int restrict_mask
- )
+read_sysvars(void)
{
- register struct ctl_var *v;
- register int i;
- char *valuep;
+ const struct ctl_var *v;
+ struct ctl_var *kv;
+ u_int n;
+ u_int gotvar;
+ const u_char *cs;
+ char * valuep;
+ const char * pch;
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 ! */
- }
- }
+ size_t wants_count;
+
+ /*
+ * 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;
+ wants_count = CS_MAXCODE + 1 + count_var(ext_sys_var);
+ wants = emalloc_zero(wants_count);
+ gotvar = 0;
+ while (NULL != (v = ctl_getitem(sys_var, &valuep))) {
+ if (!(EOV & v->flags)) {
+ NTP_INSIST(v->code < wants_count);
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) {
+ v = ctl_getitem(ext_sys_var, &valuep);
+ NTP_INSIST(v != NULL);
+ if (EOV & v->flags) {
ctl_error(CERR_UNKNOWNVAR);
- free((char *)wants);
+ free(wants);
return;
}
- wants[v->code] = 1;
+ n = v->code + CS_MAXCODE + 1;
+ NTP_INSIST(n < wants_count);
+ wants[n] = 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);
}
+ if (gotvar) {
+ for (n = 1; n <= CS_MAXCODE; n++)
+ if (wants[n])
+ ctl_putsys(n);
+ for (n = 0; n + CS_MAXCODE + 1 < wants_count; n++)
+ if (wants[n + CS_MAXCODE + 1]) {
+ pch = ext_sys_var[n].text;
+ ctl_putdata(pch, strlen(pch), 0);
+ }
+ } else {
+ for (cs = def_sys_var; *cs != 0; cs++)
+ ctl_putsys((int)*cs);
+ for (kv = ext_sys_var; kv && !(EOV & kv->flags); kv++)
+ if (DEF & kv->flags)
+ ctl_putdata(kv->text, strlen(kv->text),
+ 0);
+ }
+ free(wants);
ctl_flushpkt(0);
}
/*
+ * read_variables - return the variables the caller asks for
+ */
+/*ARGSUSED*/
+static void
+read_variables(
+ struct recvbuf *rbufp,
+ int restrict_mask
+ )
+{
+ if (res_associd)
+ read_peervars();
+ else
+ read_sysvars();
+}
+
+
+/*
* write_variables - write into variables. We only allow leap bit
* writing this way.
*/
@@ -2364,11 +3166,16 @@ write_variables(
int restrict_mask
)
{
- register struct ctl_var *v;
- register int ext_var;
+ const struct ctl_var *v;
+ int ext_var;
char *valuep;
- long val = 0;
+ long val;
+ size_t octets;
+ char *vareqv;
+ const char *t;
+ char *tt;
+ val = 0;
/*
* If he's trying to write into a peer tell him no way
*/
@@ -2415,30 +3222,19 @@ write_variables(
}
if (ext_var) {
- char *s = (char *)emalloc(strlen(v->text) +
- strlen(valuep) + 2);
- const char *t;
- char *tt = s;
-
+ octets = strlen(v->text) + strlen(valuep) + 2;
+ vareqv = emalloc(octets);
+ tt = vareqv;
t = v->text;
while (*t && *t != '=')
*tt++ = *t++;
-
*tt++ = '=';
- strcat(tt, valuep);
- set_sys_var(s, strlen(s)+1, v->flags);
- free(s);
+ memcpy(tt, valuep, 1 + strlen(valuep));
+ set_sys_var(vareqv, 1 + strlen(vareqv), v->flags);
+ free(vareqv);
} else {
- /*
- * This one seems sane. Save it.
- */
- switch(v->code) {
-
- case CS_LEAP:
- default:
- ctl_error(CERR_UNSPEC); /* really */
- return;
- }
+ ctl_error(CERR_UNSPEC); /* really */
+ return;
}
}
@@ -2477,21 +3273,37 @@ static void configure(
return;
}
- if (restrict_mask & RES_NOMODIFY) {
+ if (RES_NOMODIFY & restrict_mask) {
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration prohibited by restrict ... nomodify");
ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
- msyslog(LOG_NOTICE,
- "runtime config from %s rejected due to nomodify restriction",
- stoa(&rbufp->recv_srcadr));
+ NLOG(NLOG_SYSINFO)
+ msyslog(LOG_NOTICE,
+ "runtime config from %s rejected due to nomodify restriction",
+ stoa(&rbufp->recv_srcadr));
+ sys_restricted++;
return;
}
/* Initialize the remote config buffer */
data_count = reqend - reqpt;
+
+ if (data_count > sizeof(remote_config.buffer) - 2) {
+ snprintf(remote_config.err_msg,
+ sizeof(remote_config.err_msg),
+ "runtime configuration failed: request too long");
+ ctl_putdata(remote_config.err_msg,
+ strlen(remote_config.err_msg), 0);
+ ctl_flushpkt(0);
+ msyslog(LOG_NOTICE,
+ "runtime config from %s rejected: request too long",
+ stoa(&rbufp->recv_srcadr));
+ return;
+ }
+
memcpy(remote_config.buffer, reqpt, data_count);
if (data_count > 0
&& '\n' != remote_config.buffer[data_count - 1])
@@ -2505,9 +3317,10 @@ static void configure(
if (data_count > 0
&& '\n' == remote_config.buffer[data_count - 1]) {
remote_config.buffer[data_count - 1] = '\0';
- replace_nl = 1;
- } else
- replace_nl = 0;
+ replace_nl = TRUE;
+ } else {
+ replace_nl = FALSE;
+ }
DPRINTF(1, ("Got Remote Configuration Command: %s\n",
remote_config.buffer));
@@ -2546,11 +3359,922 @@ static void configure(
/*
- * read_clock_status - return clock radio status
+ * derive_nonce - generate client-address-specific nonce value
+ * associated with a given timestamp.
+ */
+static u_int32 derive_nonce(
+ sockaddr_u * addr,
+ u_int32 ts_i,
+ u_int32 ts_f
+ )
+{
+ static u_int32 salt[4];
+ static u_long last_salt_update;
+ union d_tag {
+ u_char digest[EVP_MAX_MD_SIZE];
+ u_int32 extract;
+ } d;
+ EVP_MD_CTX ctx;
+ u_int len;
+
+ while (!salt[0] || current_time - last_salt_update >= 3600) {
+ salt[0] = ntp_random();
+ salt[1] = ntp_random();
+ salt[2] = ntp_random();
+ salt[3] = ntp_random();
+ last_salt_update = current_time;
+ }
+
+ EVP_DigestInit(&ctx, EVP_get_digestbynid(NID_md5));
+ EVP_DigestUpdate(&ctx, salt, sizeof(salt));
+ EVP_DigestUpdate(&ctx, &ts_i, sizeof(ts_i));
+ EVP_DigestUpdate(&ctx, &ts_f, sizeof(ts_f));
+ if (IS_IPV4(addr))
+ EVP_DigestUpdate(&ctx, &SOCK_ADDR4(addr),
+ sizeof(SOCK_ADDR4(addr)));
+ else
+ EVP_DigestUpdate(&ctx, &SOCK_ADDR6(addr),
+ sizeof(SOCK_ADDR6(addr)));
+ EVP_DigestUpdate(&ctx, &NSRCPORT(addr), sizeof(NSRCPORT(addr)));
+ EVP_DigestUpdate(&ctx, salt, sizeof(salt));
+ EVP_DigestFinal(&ctx, d.digest, &len);
+
+ return d.extract;
+}
+
+
+/*
+ * generate_nonce - generate client-address-specific nonce string.
+ */
+static void generate_nonce(
+ struct recvbuf * rbufp,
+ char * nonce,
+ size_t nonce_octets
+ )
+{
+ u_int32 derived;
+
+ derived = derive_nonce(&rbufp->recv_srcadr,
+ rbufp->recv_time.l_ui,
+ rbufp->recv_time.l_uf);
+ snprintf(nonce, nonce_octets, "%08x%08x%08x",
+ rbufp->recv_time.l_ui, rbufp->recv_time.l_uf, derived);
+}
+
+
+/*
+ * validate_nonce - validate client-address-specific nonce string.
+ *
+ * Returns TRUE if the local calculation of the nonce matches the
+ * client-provided value and the timestamp is recent enough.
+ */
+static int validate_nonce(
+ const char * pnonce,
+ struct recvbuf * rbufp
+ )
+{
+ u_int ts_i;
+ u_int ts_f;
+ l_fp ts;
+ l_fp now_delta;
+ u_int supposed;
+ u_int derived;
+
+ if (3 != sscanf(pnonce, "%08x%08x%08x", &ts_i, &ts_f, &supposed))
+ return FALSE;
+
+ ts.l_ui = (u_int32)ts_i;
+ ts.l_uf = (u_int32)ts_f;
+ derived = derive_nonce(&rbufp->recv_srcadr, ts.l_ui, ts.l_uf);
+ get_systime(&now_delta);
+ L_SUB(&now_delta, &ts);
+
+ return (supposed == derived && now_delta.l_ui < 16);
+}
+
+
+/*
+ * send_random_tag_value - send a randomly-generated three character
+ * tag prefix, a '.', an index, a '=' and a
+ * random integer value.
+ *
+ * To try to force clients to ignore unrecognized tags in mrulist,
+ * reslist, and ifstats responses, the first and last rows are spiced
+ * with randomly-generated tag names with correct .# index. Make it
+ * three characters knowing that none of the currently-used subscripted
+ * tags have that length, avoiding the need to test for
+ * tag collision.
+ */
+static void
+send_random_tag_value(
+ int indx
+ )
+{
+ int noise;
+ char buf[32];
+
+ noise = rand() ^ (rand() << 16);
+ buf[0] = 'a' + noise % 26;
+ noise >>= 5;
+ buf[1] = 'a' + noise % 26;
+ noise >>= 5;
+ buf[2] = 'a' + noise % 26;
+ noise >>= 5;
+ buf[3] = '.';
+ snprintf(&buf[4], sizeof(buf) - 4, "%d", indx);
+ ctl_putuint(buf, noise);
+}
+
+
+/*
+ * Send a MRU list entry in response to a "ntpq -c mrulist" operation.
+ *
+ * To keep clients honest about not depending on the order of values,
+ * and thereby avoid being locked into ugly workarounds to maintain
+ * backward compatibility later as new fields are added to the response,
+ * the order is random.
+ */
+static void
+send_mru_entry(
+ mon_entry * mon,
+ int count
+ )
+{
+ const char first_fmt[] = "first.%d";
+ const char ct_fmt[] = "ct.%d";
+ const char mv_fmt[] = "mv.%d";
+ const char rs_fmt[] = "rs.%d";
+ char tag[32];
+ u_char sent[6]; /* 6 tag=value pairs */
+ u_int32 noise;
+ u_int which;
+ u_int remaining;
+ const char * pch;
+
+ remaining = COUNTOF(sent);
+ ZERO(sent);
+ noise = (u_int32)(rand() ^ (rand() << 16));
+ while (remaining > 0) {
+ which = (noise & 7) % COUNTOF(sent);
+ noise >>= 3;
+ while (sent[which])
+ which = (which + 1) % COUNTOF(sent);
+
+ switch (which) {
+
+ case 0:
+ snprintf(tag, sizeof(tag), addr_fmt, count);
+ pch = sptoa(&mon->rmtadr);
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+
+ case 1:
+ snprintf(tag, sizeof(tag), last_fmt, count);
+ ctl_putts(tag, &mon->last);
+ break;
+
+ case 2:
+ snprintf(tag, sizeof(tag), first_fmt, count);
+ ctl_putts(tag, &mon->first);
+ break;
+
+ case 3:
+ snprintf(tag, sizeof(tag), ct_fmt, count);
+ ctl_putint(tag, mon->count);
+ break;
+
+ case 4:
+ snprintf(tag, sizeof(tag), mv_fmt, count);
+ ctl_putuint(tag, mon->vn_mode);
+ break;
+
+ case 5:
+ snprintf(tag, sizeof(tag), rs_fmt, count);
+ ctl_puthex(tag, mon->flags);
+ break;
+ }
+ sent[which] = TRUE;
+ remaining--;
+ }
+}
+
+
+/*
+ * read_mru_list - supports ntpq's mrulist command.
+ *
+ * The challenge here is to match ntpdc's monlist functionality without
+ * being limited to hundreds of entries returned total, and without
+ * requiring state on the server. If state were required, ntpq's
+ * mrulist command would require authentication.
+ *
+ * The approach was suggested by Ry Jones. A finite and variable number
+ * of entries are retrieved per request, to avoid having responses with
+ * such large numbers of packets that socket buffers are overflowed and
+ * packets lost. The entries are retrieved oldest-first, taking into
+ * account that the MRU list will be changing between each request. We
+ * can expect to see duplicate entries for addresses updated in the MRU
+ * list during the fetch operation. In the end, the client can assemble
+ * a close approximation of the MRU list at the point in time the last
+ * response was sent by ntpd. The only difference is it may be longer,
+ * containing some number of oldest entries which have since been
+ * reclaimed. If necessary, the protocol could be extended to zap those
+ * from the client snapshot at the end, but so far that doesn't seem
+ * useful.
+ *
+ * To accomodate the changing MRU list, the starting point for requests
+ * after the first request is supplied as a series of last seen
+ * timestamps and associated addresses, the newest ones the client has
+ * received. As long as at least one of those entries hasn't been
+ * bumped to the head of the MRU list, ntpd can pick up at that point.
+ * Otherwise, the request is failed and it is up to ntpq to back up and
+ * provide the next newest entry's timestamps and addresses, conceivably
+ * backing up all the way to the starting point.
+ *
+ * input parameters:
+ * nonce= Regurgitated nonce retrieved by the client
+ * previously using CTL_OP_REQ_NONCE, demonstrating
+ * ability to receive traffic sent to its address.
+ * frags= Limit on datagrams (fragments) in response. Used
+ * by newer ntpq versions instead of limit= when
+ * retrieving multiple entries.
+ * limit= Limit on MRU entries returned. One of frags= or
+ * limit= must be provided.
+ * limit=1 is a special case: Instead of fetching
+ * beginning with the supplied starting point's
+ * newer neighbor, fetch the supplied entry, and
+ * in that case the #.last timestamp can be zero.
+ * This enables fetching a single entry by IP
+ * address. When limit is not one and frags= is
+ * provided, the fragment limit controls.
+ * mincount= (decimal) Return entries with count >= mincount.
+ * laddr= Return entries associated with the server's IP
+ * address given. No port specification is needed,
+ * and any supplied is ignored.
+ * resall= 0x-prefixed hex restrict bits which must all be
+ * lit for an MRU entry to be included.
+ * Has precedence over any resany=.
+ * resany= 0x-prefixed hex restrict bits, at least one of
+ * which must be list for an MRU entry to be
+ * included.
+ * last.0= 0x-prefixed hex l_fp timestamp of newest entry
+ * which client previously received.
+ * addr.0= text of newest entry's IP address and port,
+ * IPv6 addresses in bracketed form: [::]:123
+ * last.1= timestamp of 2nd newest entry client has.
+ * addr.1= address of 2nd newest entry.
+ * [...]
+ *
+ * ntpq provides as many last/addr pairs as will fit in a single request
+ * packet, except for the first request in a MRU fetch operation.
+ *
+ * The response begins with a new nonce value to be used for any
+ * followup request. Following the nonce is the next newer entry than
+ * referred to by last.0 and addr.0, if the "0" entry has not been
+ * bumped to the front. If it has, the first entry returned will be the
+ * next entry newer than referred to by last.1 and addr.1, and so on.
+ * If none of the referenced entries remain unchanged, the request fails
+ * and ntpq backs up to the next earlier set of entries to resync.
+ *
+ * Except for the first response, the response begins with confirmation
+ * of the entry that precedes the first additional entry provided:
+ *
+ * last.older= hex l_fp timestamp matching one of the input
+ * .last timestamps, which entry now precedes the
+ * response 0. entry in the MRU list.
+ * addr.older= text of address corresponding to older.last.
+ *
+ * And in any case, a successful response contains sets of values
+ * comprising entries, with the oldest numbered 0 and incrementing from
+ * there:
+ *
+ * addr.# text of IPv4 or IPv6 address and port
+ * last.# hex l_fp timestamp of last receipt
+ * first.# hex l_fp timestamp of first receipt
+ * ct.# count of packets received
+ * mv.# mode and version
+ * rs.# restriction mask (RES_* bits)
+ *
+ * Note the code currently assumes there are no valid three letter
+ * tags sent with each row, and needs to be adjusted if that changes.
+ *
+ * The client should accept the values in any order, and ignore .#
+ * values which it does not understand, to allow a smooth path to
+ * future changes without requiring a new opcode. Clients can rely
+ * on all *.0 values preceding any *.1 values, that is all values for
+ * a given index number are together in the response.
+ *
+ * The end of the response list is noted with one or two tag=value
+ * pairs. Unconditionally:
+ *
+ * now= 0x-prefixed l_fp timestamp at the server marking
+ * the end of the operation.
+ *
+ * If any entries were returned, now= is followed by:
+ *
+ * last.newest= hex l_fp identical to last.# of the prior
+ * entry.
+ */
+static void read_mru_list(
+ struct recvbuf *rbufp,
+ int restrict_mask
+ )
+{
+ const char nonce_text[] = "nonce";
+ const char frags_text[] = "frags";
+ const char limit_text[] = "limit";
+ const char mincount_text[] = "mincount";
+ const char resall_text[] = "resall";
+ const char resany_text[] = "resany";
+ const char maxlstint_text[] = "maxlstint";
+ const char laddr_text[] = "laddr";
+ const char resaxx_fmt[] = "0x%hx";
+ u_int limit;
+ u_short frags;
+ u_short resall;
+ u_short resany;
+ int mincount;
+ u_int maxlstint;
+ sockaddr_u laddr;
+ struct interface * lcladr;
+ u_int count;
+ u_int ui;
+ u_int uf;
+ l_fp last[16];
+ sockaddr_u addr[COUNTOF(last)];
+ char buf[128];
+ struct ctl_var * in_parms;
+ const struct ctl_var * v;
+ char * val;
+ const char * pch;
+ char * pnonce;
+ int nonce_valid;
+ int i;
+ int priors;
+ u_short hash;
+ mon_entry * mon;
+ mon_entry * prior_mon;
+ l_fp now;
+
+ if (RES_NOMRULIST & restrict_mask) {
+ ctl_error(CERR_PERMISSION);
+ NLOG(NLOG_SYSINFO)
+ msyslog(LOG_NOTICE,
+ "mrulist from %s rejected due to nomrulist restriction",
+ stoa(&rbufp->recv_srcadr));
+ sys_restricted++;
+ return;
+ }
+ /*
+ * fill in_parms var list with all possible input parameters.
+ */
+ in_parms = NULL;
+ set_var(&in_parms, nonce_text, sizeof(nonce_text), 0);
+ set_var(&in_parms, frags_text, sizeof(frags_text), 0);
+ set_var(&in_parms, limit_text, sizeof(limit_text), 0);
+ set_var(&in_parms, mincount_text, sizeof(mincount_text), 0);
+ set_var(&in_parms, resall_text, sizeof(resall_text), 0);
+ set_var(&in_parms, resany_text, sizeof(resany_text), 0);
+ set_var(&in_parms, maxlstint_text, sizeof(maxlstint_text), 0);
+ set_var(&in_parms, laddr_text, sizeof(laddr_text), 0);
+ for (i = 0; i < COUNTOF(last); i++) {
+ snprintf(buf, sizeof(buf), last_fmt, i);
+ set_var(&in_parms, buf, strlen(buf) + 1, 0);
+ snprintf(buf, sizeof(buf), addr_fmt, i);
+ set_var(&in_parms, buf, strlen(buf) + 1, 0);
+ }
+
+ /* decode input parms */
+ pnonce = NULL;
+ frags = 0;
+ limit = 0;
+ mincount = 0;
+ resall = 0;
+ resany = 0;
+ maxlstint = 0;
+ lcladr = NULL;
+ priors = 0;
+ ZERO(last);
+ ZERO(addr);
+
+ while (NULL != (v = ctl_getitem(in_parms, &val)) &&
+ !(EOV & v->flags)) {
+
+ if (!strcmp(nonce_text, v->text)) {
+ if (NULL != pnonce)
+ free(pnonce);
+ pnonce = estrdup(val);
+ } else if (!strcmp(frags_text, v->text)) {
+ sscanf(val, "%hu", &frags);
+ } else if (!strcmp(limit_text, v->text)) {
+ sscanf(val, "%u", &limit);
+ } else if (!strcmp(mincount_text, v->text)) {
+ if (1 != sscanf(val, "%d", &mincount) ||
+ mincount < 0)
+ mincount = 0;
+ } else if (!strcmp(resall_text, v->text)) {
+ sscanf(val, resaxx_fmt, &resall);
+ } else if (!strcmp(resany_text, v->text)) {
+ sscanf(val, resaxx_fmt, &resany);
+ } else if (!strcmp(maxlstint_text, v->text)) {
+ sscanf(val, "%u", &maxlstint);
+ } else if (!strcmp(laddr_text, v->text)) {
+ if (decodenetnum(val, &laddr))
+ lcladr = getinterface(&laddr, 0);
+ } else if (1 == sscanf(v->text, last_fmt, &i) &&
+ i < COUNTOF(last)) {
+ if (2 == sscanf(val, "0x%08x.%08x", &ui, &uf)) {
+ last[i].l_ui = ui;
+ last[i].l_uf = uf;
+ if (!SOCK_UNSPEC(&addr[i]) &&
+ i == priors)
+ priors++;
+ }
+ } else if (1 == sscanf(v->text, addr_fmt, &i) &&
+ i < COUNTOF(addr)) {
+ if (decodenetnum(val, &addr[i])
+ && last[i].l_ui && last[i].l_uf &&
+ i == priors)
+ priors++;
+ }
+ }
+ free_varlist(in_parms);
+ in_parms = NULL;
+
+ /* return no responses until the nonce is validated */
+ if (NULL == pnonce)
+ return;
+
+ nonce_valid = validate_nonce(pnonce, rbufp);
+ free(pnonce);
+ if (!nonce_valid)
+ return;
+
+ if ((0 == frags && !(0 < limit && limit <= MRU_ROW_LIMIT)) ||
+ frags > MRU_FRAGS_LIMIT) {
+ ctl_error(CERR_BADVALUE);
+ return;
+ }
+
+ /*
+ * If either frags or limit is not given, use the max.
+ */
+ if (0 != frags && 0 == limit)
+ limit = UINT_MAX;
+ else if (0 != limit && 0 == frags)
+ frags = MRU_FRAGS_LIMIT;
+
+ /*
+ * Find the starting point if one was provided.
+ */
+ mon = NULL;
+ for (i = 0; i < priors; i++) {
+ hash = MON_HASH(&addr[i]);
+ for (mon = mon_hash[hash];
+ mon != NULL;
+ mon = mon->hash_next)
+ if (ADDR_PORT_EQ(&mon->rmtadr, &addr[i]))
+ break;
+ if (mon != NULL) {
+ if (L_ISEQU(&mon->last, &last[i]))
+ break;
+ mon = NULL;
+ }
+ }
+
+ /* If a starting point was provided... */
+ if (priors) {
+ /* and none could be found unmodified... */
+ if (NULL == mon) {
+ /* tell ntpq to try again with older entries */
+ ctl_error(CERR_UNKNOWNVAR);
+ return;
+ }
+ /* confirm the prior entry used as starting point */
+ ctl_putts("last.older", &mon->last);
+ pch = sptoa(&mon->rmtadr);
+ ctl_putunqstr("addr.older", pch, strlen(pch));
+
+ /*
+ * Move on to the first entry the client doesn't have,
+ * except in the special case of a limit of one. In
+ * that case return the starting point entry.
+ */
+ if (limit > 1)
+ mon = PREV_DLIST(mon_mru_list, mon, mru);
+ } else { /* start with the oldest */
+ mon = TAIL_DLIST(mon_mru_list, mru);
+ }
+
+ /*
+ * send up to limit= entries in up to frags= datagrams
+ */
+ get_systime(&now);
+ generate_nonce(rbufp, buf, sizeof(buf));
+ ctl_putunqstr("nonce", buf, strlen(buf));
+ prior_mon = NULL;
+ for (count = 0;
+ mon != NULL && res_frags < frags && count < limit;
+ mon = PREV_DLIST(mon_mru_list, mon, mru)) {
+
+ if (mon->count < mincount)
+ continue;
+ if (resall && resall != (resall & mon->flags))
+ continue;
+ if (resany && !(resany & mon->flags))
+ continue;
+ if (maxlstint > 0 && now.l_ui - mon->last.l_ui >
+ maxlstint)
+ continue;
+ if (lcladr != NULL && mon->lcladr != lcladr)
+ continue;
+
+ send_mru_entry(mon, count);
+ if (!count)
+ send_random_tag_value(0);
+ count++;
+ prior_mon = mon;
+ }
+
+ /*
+ * If this batch completes the MRU list, say so explicitly with
+ * a now= l_fp timestamp.
+ */
+ if (NULL == mon) {
+ if (count > 1)
+ send_random_tag_value(count - 1);
+ ctl_putts("now", &now);
+ /* if any entries were returned confirm the last */
+ if (prior_mon != NULL)
+ ctl_putts("last.newest", &prior_mon->last);
+ }
+ ctl_flushpkt(0);
+}
+
+
+/*
+ * Send a ifstats entry in response to a "ntpq -c ifstats" request.
+ *
+ * To keep clients honest about not depending on the order of values,
+ * and thereby avoid being locked into ugly workarounds to maintain
+ * backward compatibility later as new fields are added to the response,
+ * the order is random.
+ */
+static void
+send_ifstats_entry(
+ endpt * la,
+ u_int ifnum
+ )
+{
+ const char addr_fmtu[] = "addr.%u";
+ const char bcast_fmt[] = "bcast.%u";
+ const char en_fmt[] = "en.%u"; /* enabled */
+ const char name_fmt[] = "name.%u";
+ const char flags_fmt[] = "flags.%u";
+ const char tl_fmt[] = "tl.%u"; /* ttl */
+ const char mc_fmt[] = "mc.%u"; /* mcast count */
+ const char rx_fmt[] = "rx.%u";
+ const char tx_fmt[] = "tx.%u";
+ const char txerr_fmt[] = "txerr.%u";
+ const char pc_fmt[] = "pc.%u"; /* peer count */
+ const char up_fmt[] = "up.%u"; /* uptime */
+ char tag[32];
+ u_char sent[IFSTATS_FIELDS]; /* 12 tag=value pairs */
+ int noisebits;
+ u_int32 noise;
+ u_int which;
+ u_int remaining;
+ const char *pch;
+
+ remaining = COUNTOF(sent);
+ ZERO(sent);
+ noise = 0;
+ noisebits = 0;
+ while (remaining > 0) {
+ if (noisebits < 4) {
+ noise = rand() ^ (rand() << 16);
+ noisebits = 31;
+ }
+ which = (noise & 0xf) % COUNTOF(sent);
+ noise >>= 4;
+ noisebits -= 4;
+
+ while (sent[which])
+ which = (which + 1) % COUNTOF(sent);
+
+ switch (which) {
+
+ case 0:
+ snprintf(tag, sizeof(tag), addr_fmtu, ifnum);
+ pch = sptoa(&la->sin);
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+
+ case 1:
+ snprintf(tag, sizeof(tag), bcast_fmt, ifnum);
+ if (INT_BCASTOPEN & la->flags)
+ pch = sptoa(&la->bcast);
+ else
+ pch = "";
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+
+ case 2:
+ snprintf(tag, sizeof(tag), en_fmt, ifnum);
+ ctl_putint(tag, !la->ignore_packets);
+ break;
+
+ case 3:
+ snprintf(tag, sizeof(tag), name_fmt, ifnum);
+ ctl_putstr(tag, la->name, strlen(la->name));
+ break;
+
+ case 4:
+ snprintf(tag, sizeof(tag), flags_fmt, ifnum);
+ ctl_puthex(tag, (u_int)la->flags);
+ break;
+
+ case 5:
+ snprintf(tag, sizeof(tag), tl_fmt, ifnum);
+ ctl_putint(tag, la->last_ttl);
+ break;
+
+ case 6:
+ snprintf(tag, sizeof(tag), mc_fmt, ifnum);
+ ctl_putint(tag, la->num_mcast);
+ break;
+
+ case 7:
+ snprintf(tag, sizeof(tag), rx_fmt, ifnum);
+ ctl_putint(tag, la->received);
+ break;
+
+ case 8:
+ snprintf(tag, sizeof(tag), tx_fmt, ifnum);
+ ctl_putint(tag, la->sent);
+ break;
+
+ case 9:
+ snprintf(tag, sizeof(tag), txerr_fmt, ifnum);
+ ctl_putint(tag, la->notsent);
+ break;
+
+ case 10:
+ snprintf(tag, sizeof(tag), pc_fmt, ifnum);
+ ctl_putuint(tag, la->peercnt);
+ break;
+
+ case 11:
+ snprintf(tag, sizeof(tag), up_fmt, ifnum);
+ ctl_putuint(tag, current_time - la->starttime);
+ break;
+ }
+ sent[which] = TRUE;
+ remaining--;
+ }
+ send_random_tag_value((int)ifnum);
+}
+
+
+/*
+ * read_ifstats - send statistics for each local address, exposed by
+ * ntpq -c ifstats
+ */
+static void
+read_ifstats(
+ struct recvbuf * rbufp
+ )
+{
+ u_int ifidx;
+ endpt * la;
+
+ /*
+ * loop over [0..sys_ifnum] searching ep_list for each
+ * ifnum in turn.
+ */
+ for (ifidx = 0; ifidx < sys_ifnum; ifidx++) {
+ for (la = ep_list; la != NULL; la = la->elink)
+ if (ifidx == la->ifnum)
+ break;
+ if (NULL == la)
+ continue;
+ /* return stats for one local address */
+ send_ifstats_entry(la, ifidx);
+ }
+ ctl_flushpkt(0);
+}
+
+static void
+sockaddrs_from_restrict_u(
+ sockaddr_u * psaA,
+ sockaddr_u * psaM,
+ restrict_u * pres,
+ int ipv6
+ )
+{
+ ZERO(*psaA);
+ ZERO(*psaM);
+ if (!ipv6) {
+ psaA->sa.sa_family = AF_INET;
+ psaA->sa4.sin_addr.s_addr = htonl(pres->u.v4.addr);
+ psaM->sa.sa_family = AF_INET;
+ psaM->sa4.sin_addr.s_addr = htonl(pres->u.v4.mask);
+ } else {
+ psaA->sa.sa_family = AF_INET6;
+ memcpy(&psaA->sa6.sin6_addr, &pres->u.v6.addr,
+ sizeof(psaA->sa6.sin6_addr));
+ psaM->sa.sa_family = AF_INET6;
+ memcpy(&psaM->sa6.sin6_addr, &pres->u.v6.mask,
+ sizeof(psaA->sa6.sin6_addr));
+ }
+}
+
+
+/*
+ * Send a restrict entry in response to a "ntpq -c reslist" request.
+ *
+ * To keep clients honest about not depending on the order of values,
+ * and thereby avoid being locked into ugly workarounds to maintain
+ * backward compatibility later as new fields are added to the response,
+ * the order is random.
+ */
+static void
+send_restrict_entry(
+ restrict_u * pres,
+ int ipv6,
+ u_int idx
+ )
+{
+ const char addr_fmtu[] = "addr.%u";
+ const char mask_fmtu[] = "mask.%u";
+ const char hits_fmt[] = "hits.%u";
+ const char flags_fmt[] = "flags.%u";
+ char tag[32];
+ u_char sent[RESLIST_FIELDS]; /* 4 tag=value pairs */
+ int noisebits;
+ u_int32 noise;
+ u_int which;
+ u_int remaining;
+ sockaddr_u addr;
+ sockaddr_u mask;
+ const char * pch;
+ char * buf;
+ const char * match_str;
+ const char * access_str;
+
+ sockaddrs_from_restrict_u(&addr, &mask, pres, ipv6);
+ remaining = COUNTOF(sent);
+ ZERO(sent);
+ noise = 0;
+ noisebits = 0;
+ while (remaining > 0) {
+ if (noisebits < 2) {
+ noise = rand() ^ (rand() << 16);
+ noisebits = 31;
+ }
+ which = (noise & 0x3) % COUNTOF(sent);
+ noise >>= 2;
+ noisebits -= 2;
+
+ while (sent[which])
+ which = (which + 1) % COUNTOF(sent);
+
+ switch (which) {
+
+ case 0:
+ snprintf(tag, sizeof(tag), addr_fmtu, idx);
+ pch = stoa(&addr);
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+
+ case 1:
+ snprintf(tag, sizeof(tag), mask_fmtu, idx);
+ pch = stoa(&mask);
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+
+ case 2:
+ snprintf(tag, sizeof(tag), hits_fmt, idx);
+ ctl_putuint(tag, pres->count);
+ break;
+
+ case 3:
+ snprintf(tag, sizeof(tag), flags_fmt, idx);
+ match_str = res_match_flags(pres->mflags);
+ access_str = res_access_flags(pres->flags);
+ if ('\0' == match_str[0]) {
+ pch = access_str;
+ } else {
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%s %s",
+ match_str, access_str);
+ pch = buf;
+ }
+ ctl_putunqstr(tag, pch, strlen(pch));
+ break;
+ }
+ sent[which] = TRUE;
+ remaining--;
+ }
+ send_random_tag_value((int)idx);
+}
+
+
+static void
+send_restrict_list(
+ restrict_u * pres,
+ int ipv6,
+ u_int * pidx
+ )
+{
+ for ( ; pres != NULL; pres = pres->link) {
+ send_restrict_entry(pres, ipv6, *pidx);
+ (*pidx)++;
+ }
+}
+
+
+/*
+ * read_addr_restrictions - returns IPv4 and IPv6 access control lists
+ */
+static void
+read_addr_restrictions(
+ struct recvbuf * rbufp
+)
+{
+ u_int idx;
+
+ idx = 0;
+ send_restrict_list(restrictlist4, FALSE, &idx);
+ send_restrict_list(restrictlist6, TRUE, &idx);
+ ctl_flushpkt(0);
+}
+
+
+/*
+ * read_ordlist - CTL_OP_READ_ORDLIST_A for ntpq -c ifstats & reslist
+ */
+static void
+read_ordlist(
+ struct recvbuf * rbufp,
+ int restrict_mask
+ )
+{
+ const char ifstats_s[] = "ifstats";
+ const size_t ifstats_chars = COUNTOF(ifstats_s) - 1;
+ const char addr_rst_s[] = "addr_restrictions";
+ const size_t a_r_chars = COUNTOF(addr_rst_s) - 1;
+ struct ntp_control * cpkt;
+ u_short qdata_octets;
+
+ /*
+ * CTL_OP_READ_ORDLIST_A was first named CTL_OP_READ_IFSTATS and
+ * used only for ntpq -c ifstats. With the addition of reslist
+ * the same opcode was generalized to retrieve ordered lists
+ * which require authentication. The request data is empty or
+ * contains "ifstats" (not null terminated) to retrieve local
+ * addresses and associated stats. It is "addr_restrictions"
+ * to retrieve the IPv4 then IPv6 remote address restrictions,
+ * which are access control lists. Other request data return
+ * CERR_UNKNOWNVAR.
+ */
+ cpkt = (struct ntp_control *)&rbufp->recv_pkt;
+ qdata_octets = ntohs(cpkt->count);
+ if (0 == qdata_octets || (ifstats_chars == qdata_octets &&
+ !memcmp(ifstats_s, cpkt->u.data, ifstats_chars))) {
+ read_ifstats(rbufp);
+ return;
+ }
+ if (a_r_chars == qdata_octets &&
+ !memcmp(addr_rst_s, cpkt->u.data, a_r_chars)) {
+ read_addr_restrictions(rbufp);
+ return;
+ }
+ ctl_error(CERR_UNKNOWNVAR);
+}
+
+
+/*
+ * req_nonce - CTL_OP_REQ_NONCE for ntpq -c mrulist prerequisite.
+ */
+static void req_nonce(
+ struct recvbuf * rbufp,
+ int restrict_mask
+ )
+{
+ char buf[64];
+
+ generate_nonce(rbufp, buf, sizeof(buf));
+ ctl_putunqstr("nonce", buf, strlen(buf));
+ ctl_flushpkt(0);
+}
+
+
+/*
+ * read_clockstatus - return clock radio status
*/
/*ARGSUSED*/
static void
-read_clock_status(
+read_clockstatus(
struct recvbuf *rbufp,
int restrict_mask
)
@@ -2561,108 +4285,91 @@ read_clock_status(
*/
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) {
+ const struct ctl_var * v;
+ int i;
+ struct peer * peer;
+ char * valuep;
+ u_char * wants;
+ size_t wants_alloc;
+ int gotvar;
+ const u_char * cc;
+ struct ctl_var * kv;
+ struct refclockstat cs;
+ if (res_associd != 0) {
+ peer = findpeerbyassoc(res_associd);
+ } else {
/*
* Find a clock for this jerk. If the system peer
- * is a clock use it, else search the hash tables
- * for one.
+ * is a clock use it, else search peer_list for one.
*/
- if (sys_peer != 0 && (sys_peer->flags & FLAG_REFCLOCK))
- {
+ if (sys_peer != NULL && (FLAG_REFCLOCK &
+ sys_peer->flags))
peer = sys_peer;
- } else {
- peer = 0;
- for (i = 0; peer == 0 && i < NTP_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;
- }
+ else
+ for (peer = peer_list;
+ peer != NULL;
+ peer = peer->p_link)
+ if (FLAG_REFCLOCK & peer->flags)
+ break;
+ }
+ if (NULL == peer || !(FLAG_REFCLOCK & peer->flags)) {
+ 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);
-
+ cs.kv_list = NULL;
+ refclock_control(&peer->srcadr, NULL, &cs);
+ kv = cs.kv_list;
/*
* 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 ! */
+ rpkt.status = htons(ctlclkstatus(&cs));
+ wants_alloc = CC_MAXCODE + 1 + count_var(kv);
+ wants = emalloc_zero(wants_alloc);
+ gotvar = FALSE;
+ while (NULL != (v = ctl_getitem(clock_var, &valuep))) {
+ if (!(EOV & v->flags)) {
+ wants[v->code] = TRUE;
+ gotvar = TRUE;
+ } else {
+ v = ctl_getitem(kv, &valuep);
+ NTP_INSIST(NULL != v);
+ if (EOV & v->flags) {
+ ctl_error(CERR_UNKNOWNVAR);
+ free(wants);
+ free_varlist(cs.kv_list);
+ return;
}
+ wants[CC_MAXCODE + 1 + v->code] = TRUE;
+ gotvar = TRUE;
}
- 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);
+ ctl_putclock(i, &cs, TRUE);
+ if (kv != NULL)
+ for (i = 0; !(EOV & kv[i].flags); i++)
+ if (wants[i + CC_MAXCODE + 1])
+ ctl_putdata(kv[i].text,
+ strlen(kv[i].text),
+ FALSE);
} 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_putclock((int)*cc, &cs, FALSE);
+ for ( ; kv != NULL && !(EOV & kv->flags); kv++)
+ if (DEF & kv->flags)
ctl_putdata(kv->text, strlen(kv->text),
- 0);
+ FALSE);
}
- free((char*)wants);
- free_varlist(clock_stat.kv_list);
+ free(wants);
+ free_varlist(cs.kv_list);
ctl_flushpkt(0);
#endif
@@ -2670,11 +4377,11 @@ read_clock_status(
/*
- * write_clock_status - we don't do this
+ * write_clockstatus - we don't do this
*/
/*ARGSUSED*/
static void
-write_clock_status(
+write_clockstatus(
struct recvbuf *rbufp,
int restrict_mask
)
@@ -2765,8 +4472,9 @@ ctlsettrap(
int version
)
{
- register struct ctl_trap *tp;
- register struct ctl_trap *tptouse;
+ size_t n;
+ struct ctl_trap *tp;
+ struct ctl_trap *tptouse;
/*
* See if we can find this trap. If so, we only need update
@@ -2775,17 +4483,17 @@ ctlsettrap(
if ((tp = ctlfindtrap(raddr, linter)) != NULL) {
switch (traptype) {
- case TRAP_TYPE_CONFIG:
+ case TRAP_TYPE_CONFIG:
tp->tr_flags = TRAP_INUSE|TRAP_CONFIGURED;
break;
- case TRAP_TYPE_PRIO:
+ 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:
+ case TRAP_TYPE_NONPRIO:
if (tp->tr_flags & TRAP_CONFIGURED)
return (1); /* don't change anything */
tp->tr_flags = TRAP_INUSE|TRAP_NONPRIO;
@@ -2802,29 +4510,30 @@ ctlsettrap(
* 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) &&
+ for (n = 0; n < COUNTOF(ctl_traps); n++) {
+ tp = &ctl_traps[n];
+ if ((TRAP_INUSE & tp->tr_flags) &&
+ !(TRAP_CONFIGURED & tp->tr_flags) &&
((tp->tr_settime + CTL_TRAPTIME) > current_time)) {
tp->tr_flags = 0;
num_ctl_traps--;
}
- if (!(tp->tr_flags & TRAP_INUSE)) {
+ if (!(TRAP_INUSE & tp->tr_flags)) {
tptouse = tp;
- } else if (!(tp->tr_flags & TRAP_CONFIGURED)) {
+ } else if (!(TRAP_CONFIGURED & tp->tr_flags)) {
switch (traptype) {
- case TRAP_TYPE_CONFIG:
+ case TRAP_TYPE_CONFIG:
if (tptouse == NULL) {
tptouse = tp;
break;
}
- if (tptouse->tr_flags & TRAP_NONPRIO &&
- !(tp->tr_flags & TRAP_NONPRIO))
+ if ((TRAP_NONPRIO & tptouse->tr_flags) &&
+ !(TRAP_NONPRIO & tp->tr_flags))
break;
- if (!(tptouse->tr_flags & TRAP_NONPRIO)
- && tp->tr_flags & TRAP_NONPRIO) {
+ if (!(TRAP_NONPRIO & tptouse->tr_flags)
+ && (TRAP_NONPRIO & tp->tr_flags)) {
tptouse = tp;
break;
}
@@ -2833,18 +4542,18 @@ ctlsettrap(
tptouse = tp;
break;
- case TRAP_TYPE_PRIO:
- if (tp->tr_flags & TRAP_NONPRIO) {
+ case TRAP_TYPE_PRIO:
+ if ( TRAP_NONPRIO & tp->tr_flags) {
if (tptouse == NULL ||
- (tptouse->tr_flags &
- TRAP_INUSE &&
+ ((TRAP_INUSE &
+ tptouse->tr_flags) &&
tptouse->tr_origtime <
tp->tr_origtime))
tptouse = tp;
}
break;
- case TRAP_TYPE_NONPRIO:
+ case TRAP_TYPE_NONPRIO:
break;
}
}
@@ -2909,16 +4618,15 @@ ctlfindtrap(
struct interface *linter
)
{
- register struct ctl_trap *tp;
+ size_t n;
- for (tp = ctl_trap; tp < &ctl_trap[CTL_MAXTRAPS]; tp++) {
- if ((tp->tr_flags & TRAP_INUSE)
- && (NSRCPORT(raddr) == NSRCPORT(&tp->tr_addr))
- && SOCK_EQ(raddr, &tp->tr_addr)
- && (linter == tp->tr_localaddr) )
- return (tp);
- }
- return (struct ctl_trap *)NULL;
+ for (n = 0; n < COUNTOF(ctl_traps); n++)
+ if ((ctl_traps[n].tr_flags & TRAP_INUSE)
+ && ADDR_PORT_EQ(raddr, &ctl_traps[n].tr_addr)
+ && (linter == ctl_traps[n].tr_localaddr))
+ return &ctl_traps[n];
+
+ return NULL;
}
@@ -2953,7 +4661,7 @@ report_event(
ctl_sys_last_event = (u_char)err;
ctl_sys_num_events++;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"0.0.0.0 %04x %02x %s",
ctlsysstatus(), err, eventstr(err));
if (str != NULL) {
@@ -2962,15 +4670,15 @@ report_event(
" %s", str);
}
NLOG(NLOG_SYSEVENT)
- msyslog(LOG_INFO, statstr);
+ msyslog(LOG_INFO, "%s", statstr);
} else {
/*
* Discard a peer report if the number of reports of
* the same type exceeds the maximum for that peer.
*/
- char *src;
- u_char errlast;
+ const char * src;
+ u_char errlast;
errlast = (u_char)err & ~PEER_EVENT;
if (peer->last_event == errlast)
@@ -2985,7 +4693,7 @@ report_event(
else
src = stoa(&peer->srcadr);
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"%s %04x %02x %s", src,
ctlpeerstatus(peer), err, eventstr(err));
if (str != NULL) {
@@ -2994,7 +4702,7 @@ report_event(
" %s", str);
}
NLOG(NLOG_PEEREVENT)
- msyslog(LOG_INFO, statstr);
+ msyslog(LOG_INFO, "%s", statstr);
}
record_proto_stats(statstr);
#if DEBUG
@@ -3013,64 +4721,50 @@ report_event(
*/
res_opcode = CTL_OP_ASYNCMSG;
res_offset = 0;
- res_async = 1;
- res_authenticate = 0;
- datapt = rpkt.data;
- dataend = &(rpkt.data[CTL_MAX_DATA_LEN]);
+ res_async = TRUE;
+ res_authenticate = FALSE;
+ datapt = rpkt.u.data;
+ dataend = &rpkt.u.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 */
+ /* Include the core system variables and the list. */
+ for (i = 1; i <= CS_VARLIST; i++)
ctl_putsys(i);
- }
} else {
NTP_INSIST(peer != NULL);
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 */
+ /* Dump it all. Later, maybe less. */
+ for (i = 1; i <= CP_MAX_NOAUTOKEY; i++)
ctl_putpeer(i, peer);
- }
#ifdef REFCLOCK
/*
* for clock exception events: add clock variables to
* reflect info on exception
*/
if (err == PEVNT_CLOCK) {
- struct refclockstat clock_stat;
+ struct refclockstat cs;
struct ctl_var *kv;
- clock_stat.kv_list = (struct ctl_var *)0;
- refclock_control(&peer->srcadr,
- (struct refclockstat *)0, &clock_stat);
+ cs.kv_list = NULL;
+ refclock_control(&peer->srcadr, NULL, &cs);
ctl_puthex("refclockstatus",
- ctlclkstatus(&clock_stat));
+ ctlclkstatus(&cs));
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_putclock(i, &cs, FALSE);
+ for (kv = cs.kv_list;
+ kv != NULL && !(EOV & kv->flags);
+ kv++)
+ if (DEF & kv->flags)
ctl_putdata(kv->text,
- strlen(kv->text), 0);
- free_varlist(clock_stat.kv_list);
+ strlen(kv->text),
+ FALSE);
+ free_varlist(cs.kv_list);
}
#endif /* REFCLOCK */
}
@@ -3083,6 +4777,30 @@ report_event(
/*
+ * mprintf_event - printf-style varargs variant of report_event()
+ */
+int
+mprintf_event(
+ int evcode, /* event code */
+ struct peer * p, /* may be NULL */
+ const char * fmt, /* msnprintf format */
+ ...
+ )
+{
+ va_list ap;
+ int rc;
+ char msg[512];
+
+ va_start(ap, fmt);
+ rc = mvsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+ report_event(evcode, p, msg);
+
+ return rc;
+}
+
+
+/*
* ctl_clr_stats - clear stat counters
*/
void
@@ -3106,22 +4824,25 @@ ctl_clr_stats(void)
numasyncmsgs = 0;
}
-static u_long
+static u_short
count_var(
- struct ctl_var *k
+ const struct ctl_var *k
)
{
- register u_long c;
+ u_int c;
- if (!k)
- return (0);
+ if (NULL == k)
+ return 0;
c = 0;
- while (!(k++->flags & EOV))
+ while (!(EOV & (k++)->flags))
c++;
- return (c);
+
+ NTP_ENSURE(c <= USHRT_MAX);
+ return (u_short)c;
}
+
char *
add_var(
struct ctl_var **kv,
@@ -3129,27 +4850,25 @@ add_var(
u_short def
)
{
- register u_long c;
- register struct ctl_var *k;
+ u_short c;
+ struct ctl_var *k;
+ char * buf;
c = count_var(*kv);
-
+ *kv = erealloc(*kv, (c + 2) * sizeof(**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;
+ buf = emalloc(size);
+ k[c].code = c;
+ k[c].text = buf;
+ k[c].flags = def;
+ k[c + 1].code = 0;
+ k[c + 1].text = NULL;
+ k[c + 1].flags = EOV;
+
+ return buf;
}
+
void
set_var(
struct ctl_var **kv,
@@ -3158,46 +4877,46 @@ set_var(
u_short def
)
{
- register struct ctl_var *k;
- register const char *s;
- register const char *t;
+ struct ctl_var *k;
+ const char *s;
+ const char *t;
char *td;
- if (!data || !size)
+ if (NULL == data || !size)
return;
k = *kv;
if (k != NULL) {
- while (!(k->flags & EOV)) {
- s = data;
- t = k->text;
- if (t) {
- while (*t != '=' && *s - *t == 0) {
+ while (!(EOV & k->flags)) {
+ if (NULL == k->text) {
+ td = emalloc(size);
+ memcpy(td, data, size);
+ k->text = td;
+ k->flags = def;
+ return;
+ } else {
+ s = data;
+ t = k->text;
+ while (*t != '=' && *s == *t) {
s++;
t++;
}
if (*s == *t && ((*t == '=') || !*t)) {
- free((void *)k->text);
- td = (char *)emalloc(size);
- memmove(td, data, size);
- k->text =td;
+ td = erealloc(k->text, size);
+ memcpy(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);
+ memcpy(td, data, size);
}
+
void
set_sys_var(
const char *data,
@@ -3208,6 +4927,36 @@ set_sys_var(
set_var(&ext_sys_var, data, size, def);
}
+
+/*
+ * get_ext_sys_var() retrieves the value of a user-defined variable or
+ * NULL if the variable has not been setvar'd.
+ */
+const char *
+get_ext_sys_var(const char *tag)
+{
+ struct ctl_var * v;
+ size_t c;
+ const char * val;
+
+ val = NULL;
+ c = strlen(tag);
+ for (v = ext_sys_var; !(EOV & v->flags); v++) {
+ if (NULL != v->text && !memcmp(tag, v->text, c)) {
+ if ('=' == v->text[c]) {
+ val = v->text + c + 1;
+ break;
+ } else if ('\0' == v->text[c]) {
+ val = "";
+ break;
+ }
+ }
+ }
+
+ return val;
+}
+
+
void
free_varlist(
struct ctl_var *kv
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index 38f38a1d3533..0dc5e3269dad 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -5,8 +5,9 @@
#include <config.h>
#endif
-#ifdef OPENSSL
+#ifdef AUTOKEY
#include <stdio.h>
+#include <stdlib.h> /* strtoul */
#include <sys/types.h>
#include <sys/param.h>
#include <unistd.h>
@@ -18,6 +19,8 @@
#include "ntp_string.h"
#include "ntp_random.h"
#include "ntp_assert.h"
+#include "ntp_calendar.h"
+#include "ntp_leapsec.h"
#include "openssl/asn1_mac.h"
#include "openssl/bn.h"
@@ -32,6 +35,33 @@
#endif /* KERNEL_PLL */
/*
+ * calcomp - compare two calendar structures, ignoring yearday and weekday; like strcmp
+ * No, it's not a plotter. If you don't understand that, you're too young.
+ */
+static int calcomp(struct calendar *pjd1, struct calendar *pjd2)
+{
+ int32_t diff; /* large enough to hold the signed difference between two uint16_t values */
+
+ diff = pjd1->year - pjd2->year;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ /* same year; compare months */
+ diff = pjd1->month - pjd2->month;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ /* same year and month; compare monthday */
+ diff = pjd1->monthday - pjd2->monthday;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ /* same year and month and monthday; compare time */
+ diff = pjd1->hour - pjd2->hour;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ diff = pjd1->minute - pjd2->minute;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ diff = pjd1->second - pjd2->second;
+ if (diff < 0) return -1; else if (diff > 0) return 1;
+ /* identical */
+ return 0;
+}
+
+/*
* Extension field message format
*
* These are always signed and saved before sending in network byte
@@ -116,8 +146,10 @@
*/
u_int32 crypto_flags = 0x0; /* status word */
int crypto_nid = KEY_TYPE_MD5; /* digest nid */
-char *sys_hostname = NULL; /* host name */
-char *sys_groupname = NULL; /* group name */
+char *sys_hostname = NULL;
+char *sys_groupname = NULL;
+static char *host_filename = NULL; /* host file name */
+static char *ident_filename = NULL; /* group file name */
/*
* Global cryptodata in network byte order
@@ -160,8 +192,8 @@ static int crypto_gq (struct exten *, struct peer *);
static int crypto_mv (struct exten *, struct peer *);
static int crypto_send (struct exten *, struct value *, int);
static tstamp_t crypto_time (void);
-static u_long asn2ntp (ASN1_TIME *);
-static struct cert_info *cert_parse (u_char *, long, tstamp_t);
+static void asn_to_calendar (ASN1_TIME *, struct calendar*);
+static struct cert_info *cert_parse (const u_char *, long, tstamp_t);
static int cert_sign (struct exten *, struct value *);
static struct cert_info *cert_install (struct exten *, struct peer *);
static int cert_hike (struct peer *, struct cert_info *);
@@ -308,7 +340,7 @@ make_keylist(
* cookie if client mode or the host cookie if symmetric modes.
*/
mpoll = 1 << min(peer->ppoll, peer->hpoll);
- lifetime = min(1 << sys_automax, NTP_MAXSESSION * mpoll);
+ lifetime = min(1U << sys_automax, NTP_MAXSESSION * mpoll);
if (peer->hmode == MODE_BROADCAST)
cookie = 0;
else
@@ -401,7 +433,7 @@ crypto_recv(
keyid_t cookie; /* crumbles */
int hismode; /* packet mode */
int rval = XEVNT_OK;
- u_char *ptr;
+ const u_char *puch;
u_int32 temp32;
/*
@@ -421,6 +453,7 @@ crypto_recv(
ep = (struct exten *)pkt;
code = ntohl(ep->opcode) & 0xffff0000;
len = ntohl(ep->opcode) & 0x0000ffff;
+ // HMS: Why pkt[1] instead of ep->associd ?
associd = (associd_t)ntohl(pkt[1]);
rval = XEVNT_OK;
#ifdef DEBUG
@@ -572,9 +605,8 @@ crypto_recv(
peer->subject[vallen] = '\0';
if (peer->issuer != NULL)
free(peer->issuer);
- peer->issuer = emalloc(vallen + 1);
- strcpy(peer->issuer, peer->subject);
- snprintf(statstr, NTP_MAXSTRLEN,
+ peer->issuer = estrdup(peer->subject);
+ snprintf(statstr, sizeof(statstr),
"assoc %d %d host %s %s", peer->associd,
peer->assoc, peer->subject,
OBJ_nid2ln(temp32));
@@ -626,15 +658,15 @@ crypto_recv(
* signature/digest NID.
*/
if (peer->pkey == NULL) {
- ptr = (u_char *)xinfo->cert.ptr;
- cert = d2i_X509(NULL, &ptr,
+ puch = xinfo->cert.ptr;
+ cert = d2i_X509(NULL, &puch,
ntohl(xinfo->cert.vallen));
peer->pkey = X509_get_pubkey(cert);
X509_free(cert);
}
peer->flash &= ~TEST8;
temp32 = xinfo->nid;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"cert %s %s 0x%x %s (%u) fs %u",
xinfo->subject, xinfo->issuer, xinfo->flags,
OBJ_nid2ln(temp32), temp32,
@@ -677,7 +709,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN, "iff %s fs %u",
+ snprintf(statstr, sizeof(statstr), "iff %s fs %u",
peer->issuer, ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -718,7 +750,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN, "gq %s fs %u",
+ snprintf(statstr, sizeof(statstr), "gq %s fs %u",
peer->issuer, ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -758,7 +790,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_VRFY;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN, "mv %s fs %u",
+ snprintf(statstr, sizeof(statstr), "mv %s fs %u",
peer->issuer, ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
#ifdef DEBUG
@@ -789,15 +821,24 @@ crypto_recv(
* errors.
*/
if (vallen == (u_int)EVP_PKEY_size(host_pkey)) {
+ u_int32 *cookiebuf = malloc(
+ RSA_size(host_pkey->pkey.rsa));
+ if (!cookiebuf) {
+ rval = XEVNT_CKY;
+ break;
+ }
+
if (RSA_private_decrypt(vallen,
(u_char *)ep->pkt,
- (u_char *)&temp32,
+ (u_char *)cookiebuf,
host_pkey->pkey.rsa,
- RSA_PKCS1_OAEP_PADDING) <= 0) {
+ RSA_PKCS1_OAEP_PADDING) != 4) {
rval = XEVNT_CKY;
+ free(cookiebuf);
break;
} else {
- cookie = ntohl(temp32);
+ cookie = ntohl(*cookiebuf);
+ free(cookiebuf);
}
} else {
rval = XEVNT_CKY;
@@ -817,7 +858,7 @@ crypto_recv(
peer->pcookie = cookie;
peer->crypto |= CRYPTO_FLAG_COOK;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"cook %x ts %u fs %u", peer->pcookie,
ntohl(ep->tstamp), ntohl(ep->fstamp));
record_crypto_stats(&peer->srcadr, statstr);
@@ -878,7 +919,7 @@ crypto_recv(
peer->pkeyid = bp->key;
peer->crypto |= CRYPTO_FLAG_AUTO;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"auto seq %d key %x ts %u fs %u", bp->seq,
bp->key, ntohl(ep->tstamp),
ntohl(ep->fstamp));
@@ -917,7 +958,7 @@ crypto_recv(
peer->crypto |= CRYPTO_FLAG_SIGN;
peer->flash &= ~TEST8;
temp32 = xinfo->nid;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"sign %s %s 0x%x %s (%u) fs %u",
xinfo->subject, xinfo->issuer, xinfo->flags,
OBJ_nid2ln(temp32), temp32,
@@ -936,7 +977,6 @@ crypto_recv(
* via the kernel to other applications.
*/
case CRYPTO_LEAP | CRYPTO_RESP:
-
/*
* Discard the message if invalid. We can't
* compare the value timestamps here, as they
@@ -951,26 +991,26 @@ crypto_recv(
* than the stored ones, install the new leap
* values and recompute the signatures.
*/
- if (ntohl(ep->pkt[2]) > leap_expire) {
- char tbuf[80], str1 [20], str2[20];
-
+ if (leapsec_add_fix(ntohl(ep->pkt[0]),
+ ntohl(ep->pkt[1]),
+ ntohl(ep->pkt[2]),
+ NULL))
+ {
+ leap_signature_t lsig;
+
+ leapsec_getsig(&lsig);
tai_leap.tstamp = ep->tstamp;
tai_leap.fstamp = ep->fstamp;
tai_leap.vallen = ep->vallen;
- leap_tai = ntohl(ep->pkt[0]);
- leap_sec = ntohl(ep->pkt[1]);
- leap_expire = ntohl(ep->pkt[2]);
crypto_update();
- strcpy(str1, fstostr(leap_sec));
- strcpy(str2, fstostr(leap_expire));
- snprintf(tbuf, sizeof(tbuf),
- "%d leap %s expire %s", leap_tai, str1,
- str2);
- report_event(EVNT_TAI, peer, tbuf);
+ mprintf_event(EVNT_TAI, peer,
+ "%d leap %s expire %s", lsig.taiof,
+ fstostr(lsig.ttime),
+ fstostr(lsig.etime));
}
peer->crypto |= CRYPTO_FLAG_LEAP;
peer->flash &= ~TEST8;
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"leap TAI offset %d at %u expire %u fs %u",
ntohl(ep->pkt[0]), ntohl(ep->pkt[1]),
ntohl(ep->pkt[2]), ntohl(ep->fstamp));
@@ -1023,7 +1063,7 @@ crypto_recv(
* scan and we return the laundry to the caller.
*/
if (rval != XEVNT_OK) {
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"%04x %d %02x %s", htonl(ep->opcode),
associd, rval, eventstr(rval));
record_crypto_stats(&peer->srcadr, statstr);
@@ -1074,6 +1114,7 @@ crypto_xmit(
char certname[MAXHOSTNAME + 1]; /* subject name buffer */
char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
tstamp_t tstamp;
+ struct calendar tscal;
u_int vallen;
struct value vtemp;
associd_t associd;
@@ -1133,8 +1174,9 @@ crypto_xmit(
* signed and may or may not be trusted.
*/
case CRYPTO_SIGN:
- if (tstamp < cert_host->first || tstamp >
- cert_host->last)
+ (void)ntpcal_ntp_to_date(&tscal, tstamp, NULL);
+ if ((calcomp(&tscal, &(cert_host->first)) < 0)
+ || (calcomp(&tscal, &(cert_host->last)) > 0))
rval = XEVNT_PER;
else
len = crypto_send(fp, &cert_host->cert, start);
@@ -1157,10 +1199,6 @@ crypto_xmit(
if (vallen == 0 || vallen > MAXHOSTNAME) {
rval = XEVNT_LEN;
break;
-
- } else {
- memcpy(certname, ep->pkt, vallen);
- certname[vallen] = '\0';
}
/*
@@ -1169,6 +1207,8 @@ crypto_xmit(
* found, use that certificate. If not, use the last non
* self-signed certificate.
*/
+ memcpy(certname, ep->pkt, vallen);
+ certname[vallen] = '\0';
xp = yp = NULL;
for (cp = cinfo; cp != NULL; cp = cp->link) {
if (cp->flags & (CERT_PRIV | CERT_ERROR))
@@ -1367,7 +1407,7 @@ crypto_xmit(
uint32 = CRYPTO_ERROR;
opcode |= uint32;
fp->opcode |= htonl(uint32);
- snprintf(statstr, NTP_MAXSTRLEN,
+ snprintf(statstr, sizeof(statstr),
"%04x %d %02x %s", opcode, associd, rval,
eventstr(rval));
record_crypto_stats(srcadr_sin, statstr);
@@ -1551,13 +1591,14 @@ crypto_encrypt(
tstamp_t tstamp; /* NTP timestamp */
u_int32 temp32;
u_int len;
- u_char *ptr;
+ const u_char *ptr;
+ u_char *puch;
/*
* Extract the public key from the request.
*/
len = ntohl(ep->vallen);
- ptr = (u_char *)ep->pkt;
+ ptr = (void *)ep->pkt;
pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len);
if (pkey == NULL) {
msyslog(LOG_ERR, "crypto_encrypt: %s",
@@ -1575,9 +1616,9 @@ crypto_encrypt(
len = EVP_PKEY_size(pkey);
vp->vallen = htonl(len);
vp->ptr = emalloc(len);
- ptr = vp->ptr;
+ puch = vp->ptr;
temp32 = htonl(*cookie);
- if (RSA_public_encrypt(4, (u_char *)&temp32, ptr,
+ if (RSA_public_encrypt(4, (u_char *)&temp32, puch,
pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING) <= 0) {
msyslog(LOG_ERR, "crypto_encrypt: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -1616,7 +1657,9 @@ crypto_ident(
struct peer *peer /* peer structure pointer */
)
{
- char filename[MAXFILENAME];
+ char filename[MAXFILENAME];
+ const char * scheme_name;
+ u_int scheme_id;
/*
* We come here after the group trusted host has been found; its
@@ -1624,34 +1667,32 @@ crypto_ident(
* keys matching the same group name in order IFF, GQ and MV.
* Use the first one available.
*/
+ scheme_name = NULL;
if (peer->crypto & CRYPTO_FLAG_IFF) {
- snprintf(filename, MAXFILENAME, "ntpkey_iffpar_%s",
- peer->issuer);
- peer->ident_pkey = crypto_key(filename, NULL,
- &peer->srcadr);
- if (peer->ident_pkey != NULL)
- return (CRYPTO_IFF);
- }
- if (peer->crypto & CRYPTO_FLAG_GQ) {
- snprintf(filename, MAXFILENAME, "ntpkey_gqpar_%s",
- peer->issuer);
+ scheme_name = "iff";
+ scheme_id = CRYPTO_IFF;
+ } else if (peer->crypto & CRYPTO_FLAG_GQ) {
+ scheme_name = "gq";
+ scheme_id = CRYPTO_GQ;
+ } else if (peer->crypto & CRYPTO_FLAG_MV) {
+ scheme_name = "mv";
+ scheme_id = CRYPTO_MV;
+ }
+
+ if (scheme_name != NULL) {
+ snprintf(filename, sizeof(filename), "ntpkey_%spar_%s",
+ scheme_name, peer->ident);
peer->ident_pkey = crypto_key(filename, NULL,
&peer->srcadr);
if (peer->ident_pkey != NULL)
- return (CRYPTO_GQ);
- }
- if (peer->crypto & CRYPTO_FLAG_MV) {
- snprintf(filename, MAXFILENAME, "ntpkey_mvpar_%s",
- peer->issuer);
- peer->ident_pkey = crypto_key(filename, NULL,
- &peer->srcadr);
- if (peer->ident_pkey != NULL)
- return (CRYPTO_MV);
+ return scheme_id;
}
+
msyslog(LOG_NOTICE,
"crypto_ident: no identity parameters found for group %s",
- peer->issuer);
- return (CRYPTO_NULL);
+ peer->ident);
+
+ return CRYPTO_NULL;
}
@@ -1681,8 +1722,7 @@ crypto_args(
len = sizeof(struct exten);
if (str != NULL)
len += strlen(str);
- ep = emalloc(len);
- memset(ep, 0, len);
+ ep = emalloc_zero(len);
if (opcode == 0)
return (ep);
@@ -1743,7 +1783,7 @@ crypto_send(
i = 0;
if (vallen > 0 && vp->ptr != NULL) {
j = vallen / 4;
- if (j * 4 < vallen)
+ if (j * 4 < (int)vallen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->ptr, vallen);
i += j;
@@ -1755,8 +1795,8 @@ crypto_send(
*/
ep->pkt[i++] = vp->siglen;
if (siglen > 0 && vp->sig != NULL) {
- j = vallen / 4;
- if (j * 4 < siglen)
+ j = siglen / 4;
+ if (j * 4 < (int)siglen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->sig, siglen);
i += j;
@@ -1793,6 +1833,7 @@ crypto_update(void)
char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
u_int32 *ptr;
u_int len;
+ leap_signature_t lsig;
hostval.tstamp = htonl(crypto_time());
if (hostval.tstamp == 0)
@@ -1846,9 +1887,10 @@ crypto_update(void)
tai_leap.ptr = emalloc(len);
tai_leap.vallen = htonl(len);
ptr = (u_int32 *)tai_leap.ptr;
- ptr[0] = htonl(leap_tai);
- ptr[1] = htonl(leap_sec);
- ptr[2] = htonl(leap_expire);
+ leapsec_getsig(&lsig);
+ ptr[0] = htonl(lsig.taiof);
+ ptr[1] = htonl(lsig.ttime);
+ ptr[2] = htonl(lsig.etime);
if (tai_leap.sig == NULL)
tai_leap.sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
@@ -1856,9 +1898,9 @@ crypto_update(void)
EVP_SignUpdate(&ctx, tai_leap.ptr, len);
if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey))
tai_leap.siglen = htonl(sign_siglen);
- if (leap_sec > 0)
+ if (lsig.ttime > 0)
crypto_flags |= CRYPTO_FLAG_TAI;
- snprintf(statstr, NTP_MAXSTRLEN, "signature update ts %u",
+ snprintf(statstr, sizeof(statstr), "signature update ts %u",
ntohl(hostval.tstamp));
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
@@ -1904,38 +1946,62 @@ crypto_time()
/*
- * asn2ntp - convert ASN1_TIME time structure to NTP time.
+ * asn_to_calendar - convert ASN1_TIME time structure to struct calendar.
*
- * Returns NTP seconds (no errors)
*/
-u_long
-asn2ntp (
- ASN1_TIME *asn1time /* pointer to ASN1_TIME structure */
+static
+void
+asn_to_calendar (
+ ASN1_TIME *asn1time, /* pointer to ASN1_TIME structure */
+ struct calendar *pjd /* pointer to result */
)
{
- char *v; /* pointer to ASN1_TIME string */
- struct tm tm; /* used to convert to NTP time */
+ int len; /* length of ASN1_TIME string */
+ char v[24]; /* writable copy of ASN1_TIME string */
+ unsigned long temp; /* result from strtoul */
/*
* Extract time string YYMMDDHHMMSSZ from ASN1 time structure.
+ * Or YYYYMMDDHHMMSSZ.
* Note that the YY, MM, DD fields start with one, the HH, MM,
- * SS fiels start with zero and the Z character is ignored.
- * Also note that years less than 50 map to years greater than
+ * SS fields start with zero and the Z character is ignored.
+ * Also note that two-digit years less than 50 map to years greater than
* 100. Dontcha love ASN.1? Better than MIL-188.
*/
- 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 ((u_long)timegm(&tm) + JAN_1970);
+ len = asn1time->length;
+ NTP_REQUIRE(len < sizeof(v));
+ (void)strncpy(v, (char *)(asn1time->data), len);
+ NTP_REQUIRE(len >= 13);
+ temp = strtoul(v+len-3, NULL, 10);
+ pjd->second = temp;
+ v[len-3] = '\0';
+
+ temp = strtoul(v+len-5, NULL, 10);
+ pjd->minute = temp;
+ v[len-5] = '\0';
+
+ temp = strtoul(v+len-7, NULL, 10);
+ pjd->hour = temp;
+ v[len-7] = '\0';
+
+ temp = strtoul(v+len-9, NULL, 10);
+ pjd->monthday = temp;
+ v[len-9] = '\0';
+
+ temp = strtoul(v+len-11, NULL, 10);
+ pjd->month = temp;
+ v[len-11] = '\0';
+
+ temp = strtoul(v, NULL, 10);
+ /* handle two-digit years */
+ if (temp < 50UL)
+ temp += 100UL;
+ if (temp < 150UL)
+ temp += 1900UL;
+ pjd->year = temp;
+
+ pjd->yearday = pjd->weekday = 0;
+ return;
}
@@ -2035,8 +2101,10 @@ crypto_alice(
/*
* The identity parameters must have correct format and content.
*/
- if (peer->ident_pkey == NULL)
+ if (peer->ident_pkey == NULL) {
+ msyslog(LOG_NOTICE, "crypto_alice: scheme unavailable");
return (XEVNT_ID);
+ }
if ((dsa = peer->ident_pkey->pkey->pkey.dsa) == NULL) {
msyslog(LOG_NOTICE, "crypto_alice: defective key");
@@ -2402,6 +2470,7 @@ crypto_bob2(
BIGNUM *r, *k, *g, *y;
u_char *ptr;
u_int len;
+ int s_len;
/*
* If the GQ parameters are not valid, something awful
@@ -2448,8 +2517,8 @@ crypto_bob2(
* Encode the values in ASN.1 and sign. The filestamp is from
* the local file.
*/
- len = i2d_DSA_SIG(sdsa, NULL);
- if (len <= 0) {
+ len = s_len = i2d_DSA_SIG(sdsa, NULL);
+ if (s_len <= 0) {
msyslog(LOG_ERR, "crypto_bob2: %s",
ERR_error_string(ERR_get_error(), NULL));
DSA_SIG_free(sdsa);
@@ -2943,8 +3012,10 @@ cert_sign(
EVP_PKEY *pkey; /* public key */
EVP_MD_CTX ctx; /* message digest context */
tstamp_t tstamp; /* NTP timestamp */
+ struct calendar tscal;
u_int len;
- u_char *ptr;
+ const u_char *cptr;
+ u_char *ptr;
int i, temp;
/*
@@ -2956,8 +3027,8 @@ cert_sign(
if (tstamp == 0)
return (XEVNT_TSP);
- ptr = (u_char *)ep->pkt;
- if ((req = d2i_X509(NULL, &ptr, ntohl(ep->vallen))) == NULL) {
+ cptr = (void *)ep->pkt;
+ if ((req = d2i_X509(NULL, &cptr, ntohl(ep->vallen))) == NULL) {
msyslog(LOG_ERR, "cert_sign: %s",
ERR_error_string(ERR_get_error(), NULL));
return (XEVNT_CRT);
@@ -2991,11 +3062,10 @@ cert_sign(
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);
+ INSIST(X509_add_ext(cert, ext, -1));
}
X509_free(req);
@@ -3003,7 +3073,9 @@ cert_sign(
* Sign and verify the client certificate, but only if the host
* certificate has not expired.
*/
- if (tstamp < cert_host->first || tstamp > cert_host->last) {
+ (void)ntpcal_ntp_to_date(&tscal, tstamp, NULL);
+ if ((calcomp(&tscal, &(cert_host->first)) < 0)
+ || (calcomp(&tscal, &(cert_host->last)) > 0)) {
X509_free(cert);
return (XEVNT_PER);
}
@@ -3130,7 +3202,7 @@ cert_hike(
{
struct cert_info *xp; /* subject certificate */
X509 *cert; /* X509 certificate */
- u_char *ptr;
+ const u_char *ptr;
/*
* Save the issuer on the new certificate, but remember the old
@@ -3138,8 +3210,7 @@ cert_hike(
*/
if (peer->issuer != NULL)
free(peer->issuer);
- peer->issuer = emalloc(strlen(yp->issuer) + 1);
- strcpy(peer->issuer, yp->issuer);
+ peer->issuer = estrdup(yp->issuer);
xp = peer->xinfo;
peer->xinfo = yp;
@@ -3155,20 +3226,16 @@ cert_hike(
if (!(yp->flags & CERT_TRUST))
return (XEVNT_OK);
- peer->grpkey = yp->grpkey;
- peer->crypto |= CRYPTO_FLAG_CERT;
- if (!(peer->crypto & CRYPTO_FLAG_MASK))
- peer->crypto |= CRYPTO_FLAG_VRFY |
- CRYPTO_FLAG_PROV;
-
/*
* 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_MASK) ||
- sys_groupname == NULL)
+ peer->crypto |= CRYPTO_FLAG_CERT;
+ peer->grpkey = yp->grpkey;
+ if (peer->ident == NULL || !(peer->crypto &
+ CRYPTO_FLAG_MASK))
peer->crypto |= CRYPTO_FLAG_VRFY;
}
@@ -3195,7 +3262,8 @@ cert_hike(
* Signature X is valid only if it begins during the
* lifetime of Y.
*/
- if (xp->first < yp->first || xp->first > yp->last) {
+ if ((calcomp(&(xp->first), &(yp->first)) < 0)
+ || (calcomp(&(xp->first), &(yp->last)) > 0)) {
xp->flags |= CERT_ERROR;
return (XEVNT_PER);
}
@@ -3219,7 +3287,7 @@ cert_hike(
*/
struct cert_info * /* certificate information structure */
cert_parse(
- u_char *asn1cert, /* X509 certificate */
+ const u_char *asn1cert, /* X509 certificate */
long len, /* certificate length */
tstamp_t fstamp /* filestamp */
)
@@ -3229,8 +3297,10 @@ cert_parse(
struct cert_info *ret; /* certificate info/value */
BIO *bp;
char pathbuf[MAXFILENAME];
- u_char *ptr;
+ const u_char *ptr;
+ char *pch;
int temp, cnt, i;
+ struct calendar fscal;
/*
* Decode ASN.1 objects and construct certificate structure.
@@ -3249,8 +3319,7 @@ cert_parse(
/*
* Extract version, subject name and public key.
*/
- ret = emalloc(sizeof(struct cert_info));
- memset(ret, 0, sizeof(struct cert_info));
+ ret = emalloc_zero(sizeof(*ret));
if ((ret->pkey = X509_get_pubkey(cert)) == NULL) {
msyslog(LOG_ERR, "cert_parse: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -3260,16 +3329,16 @@ cert_parse(
}
ret->version = X509_get_version(cert);
X509_NAME_oneline(X509_get_subject_name(cert), pathbuf,
- MAXFILENAME);
- ptr = strstr(pathbuf, "CN=");
- if (ptr == NULL) {
+ sizeof(pathbuf));
+ pch = strstr(pathbuf, "CN=");
+ if (NULL == pch) {
msyslog(LOG_NOTICE, "cert_parse: invalid subject %s",
pathbuf);
cert_free(ret);
X509_free(cert);
return (NULL);
}
- ret->subject = estrdup(ptr + 3);
+ ret->subject = estrdup(pch + 3);
/*
* Extract remaining objects. Note that the NTP serial number is
@@ -3283,17 +3352,17 @@ cert_parse(
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) {
+ sizeof(pathbuf));
+ if ((pch = strstr(pathbuf, "CN=")) == NULL) {
msyslog(LOG_NOTICE, "cert_parse: invalid issuer %s",
pathbuf);
cert_free(ret);
X509_free(cert);
return (NULL);
}
- ret->issuer = estrdup(ptr + 3);
- ret->first = asn2ntp(X509_get_notBefore(cert));
- ret->last = asn2ntp(X509_get_notAfter(cert));
+ ret->issuer = estrdup(pch + 3);
+ asn_to_calendar(X509_get_notBefore(cert), &(ret->first));
+ asn_to_calendar(X509_get_notAfter(cert), &(ret->last));
/*
* Extract extension fields. These are ad hoc ripoffs of
@@ -3315,7 +3384,7 @@ cert_parse(
case NID_ext_key_usage:
bp = BIO_new(BIO_s_mem());
X509V3_EXT_print(bp, ext, 0, 0);
- BIO_gets(bp, pathbuf, MAXFILENAME);
+ BIO_gets(bp, pathbuf, sizeof(pathbuf));
BIO_free(bp);
if (strcmp(pathbuf, "Trust Root") == 0)
ret->flags |= CERT_TRUST;
@@ -3376,10 +3445,18 @@ cert_parse(
* Verify certificate valid times. Note that certificates cannot
* be retroactive.
*/
- if (ret->first > ret->last || ret->first < fstamp) {
+ (void)ntpcal_ntp_to_date(&fscal, fstamp, NULL);
+ if ((calcomp(&(ret->first), &(ret->last)) > 0)
+ || (calcomp(&(ret->first), &fscal) < 0)) {
msyslog(LOG_NOTICE,
- "cert_parse: invalid times %s first %u last %u fstamp %u",
- ret->subject, ret->first, ret->last, fstamp);
+ "cert_parse: invalid times %s first %u-%02u-%02uT%02u:%02u:%02u last %u-%02u-%02uT%02u:%02u:%02u fstamp %u-%02u-%02uT%02u:%02u:%02u",
+ ret->subject,
+ ret->first.year, ret->first.month, ret->first.monthday,
+ ret->first.hour, ret->first.minute, ret->first.second,
+ ret->last.year, ret->last.month, ret->last.monthday,
+ ret->last.hour, ret->last.minute, ret->last.second,
+ fscal.year, fscal.month, fscal.monthday,
+ fscal.hour, fscal.minute, fscal.second);
cert_free(ret);
X509_free(cert);
return (NULL);
@@ -3458,9 +3535,10 @@ crypto_key(
* wrong, abandon ship.
*/
if (*cp == '/')
- strcpy(filename, cp);
+ strlcpy(filename, cp, sizeof(filename));
else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
+ snprintf(filename, sizeof(filename), "%s/%s", keysdir,
+ cp);
str = fopen(filename, "r");
if (str == NULL)
return (NULL);
@@ -3468,7 +3546,7 @@ crypto_key(
/*
* Read the filestamp, which is contained in the first line.
*/
- if ((ptr = fgets(linkname, MAXFILENAME, str)) == NULL) {
+ if ((ptr = fgets(linkname, sizeof(linkname), str)) == NULL) {
msyslog(LOG_ERR, "crypto_key: empty file %s",
filename);
fclose(str);
@@ -3506,16 +3584,15 @@ crypto_key(
pkp->link = pkinfo;
pkinfo = pkp;
pkp->pkey = pkey;
- pkp->name = emalloc(strlen(cp) + 1);
+ pkp->name = estrdup(cp);
pkp->fstamp = fstamp;
- strcpy(pkp->name, cp);
/*
* Leave tracks in the cryptostats.
*/
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
- snprintf(statstr, NTP_MAXSTRLEN, "%s mod %d", &linkname[2],
+ snprintf(statstr, sizeof(statstr), "%s mod %d", &linkname[2],
EVP_PKEY_size(pkey) * 8);
record_crypto_stats(addr, statstr);
#ifdef DEBUG
@@ -3571,9 +3648,10 @@ crypto_cert(
* something goes wrong, abandon ship.
*/
if (*cp == '/')
- strcpy(filename, cp);
+ strlcpy(filename, cp, sizeof(filename));
else
- snprintf(filename, MAXFILENAME, "%s/%s", keysdir, cp);
+ snprintf(filename, sizeof(filename), "%s/%s", keysdir,
+ cp);
str = fopen(filename, "r");
if (str == NULL)
return (NULL);
@@ -3581,20 +3659,20 @@ crypto_cert(
/*
* Read the filestamp, which is contained in the first line.
*/
- if ((ptr = fgets(linkname, MAXFILENAME, str)) == NULL) {
+ if ((ptr = fgets(linkname, sizeof(linkname), str)) == NULL) {
msyslog(LOG_ERR, "crypto_cert: empty file %s",
filename);
fclose(str);
return (NULL);
}
if ((ptr = strrchr(ptr, '.')) == NULL) {
- msyslog(LOG_ERR, "crypto_cert: no filestamp %s\n",
+ msyslog(LOG_ERR, "crypto_cert: no filestamp %s",
filename);
fclose(str);
return (NULL);
}
if (sscanf(++ptr, "%u", &fstamp) != 1) {
- msyslog(LOG_ERR, "crypto_cert: invalid filestamp %s\n",
+ msyslog(LOG_ERR, "crypto_cert: invalid filestamp %s",
filename);
fclose(str);
return (NULL);
@@ -3604,7 +3682,7 @@ crypto_cert(
* Read PEM-encoded certificate and install.
*/
if (!PEM_read(str, &name, &header, &data, &len)) {
- msyslog(LOG_ERR, "crypto_cert: %s\n",
+ msyslog(LOG_ERR, "crypto_cert: %s",
ERR_error_string(ERR_get_error(), NULL));
fclose(str);
return (NULL);
@@ -3631,7 +3709,7 @@ crypto_cert(
if ((ptr = strrchr(linkname, '\n')) != NULL)
*ptr = '\0';
- snprintf(statstr, NTP_MAXSTRLEN, "%s 0x%x len %lu",
+ snprintf(statstr, sizeof(statstr), "%s 0x%x len %lu",
&linkname[2], ret->flags, len);
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
@@ -3661,7 +3739,8 @@ crypto_setup(void)
{
struct pkey_info *pinfo; /* private/public key */
char filename[MAXFILENAME]; /* file name buffer */
- char * randfile;
+ char hostname[MAXFILENAME]; /* host name buffer */
+ char *randfile;
char statstr[NTP_MAXSTRLEN]; /* statistics for filegen */
l_fp seed; /* crypto PRNG seed as NTP timestamp */
u_int len;
@@ -3717,13 +3796,11 @@ crypto_setup(void)
/*
* Initialize structures.
*/
- if (sys_hostname == NULL) {
- gethostname(filename, MAXFILENAME);
- sys_hostname = emalloc(strlen(filename) + 1);
- strcpy(sys_hostname, filename);
- }
+ gethostname(hostname, sizeof(hostname));
+ if (host_filename != NULL)
+ strlcpy(hostname, host_filename, sizeof(hostname));
if (passwd == NULL)
- passwd = sys_hostname;
+ passwd = estrdup(hostname);
memset(&hostval, 0, sizeof(hostval));
memset(&pubkey, 0, sizeof(pubkey));
memset(&tai_leap, 0, sizeof(tai_leap));
@@ -3734,7 +3811,7 @@ crypto_setup(void)
* as we know it ends. The host key also becomes the default
* sign key.
*/
- snprintf(filename, MAXFILENAME, "ntpkey_host_%s", sys_hostname);
+ snprintf(filename, sizeof(filename), "ntpkey_host_%s", hostname);
pinfo = crypto_key(filename, passwd, NULL);
if (pinfo == NULL) {
msyslog(LOG_ERR,
@@ -3765,14 +3842,15 @@ crypto_setup(void)
* Load optional sign key from file "ntpkey_sign_<hostname>". If
* available, it becomes the sign key.
*/
- snprintf(filename, MAXFILENAME, "ntpkey_sign_%s", sys_hostname);
- pinfo = crypto_key(filename, passwd, NULL); if (pinfo != NULL)
- sign_pkey = pinfo->pkey;
+ snprintf(filename, sizeof(filename), "ntpkey_sign_%s", hostname);
+ pinfo = crypto_key(filename, passwd, NULL);
+ if (pinfo != NULL)
+ sign_pkey = pinfo->pkey;
/*
* Load required certificate from file "ntpkey_cert_<hostname>".
*/
- snprintf(filename, MAXFILENAME, "ntpkey_cert_%s", sys_hostname);
+ snprintf(filename, sizeof(filename), "ntpkey_cert_%s", hostname);
cinfo = crypto_cert(filename);
if (cinfo == NULL) {
msyslog(LOG_ERR,
@@ -3795,63 +3873,51 @@ crypto_setup(void)
filename);
exit (-1);
}
+ hostval.ptr = estrdup(cinfo->subject);
hostval.vallen = htonl(strlen(cinfo->subject));
- hostval.ptr = cinfo->subject;
+ sys_hostname = hostval.ptr;
+ ptr = (u_char *)strchr(sys_hostname, '@');
+ if (ptr != NULL)
+ sys_groupname = estrdup((char *)++ptr);
+ if (ident_filename != NULL)
+ strlcpy(hostname, ident_filename, sizeof(hostname));
/*
- * If trusted certificate, the subject name must match the group
- * name.
+ * Load optional IFF parameters from file
+ * "ntpkey_iffkey_<hostname>".
*/
- if (cinfo->flags & CERT_TRUST) {
- if (sys_groupname == NULL) {
- sys_groupname = hostval.ptr;
- } else if (strcmp(hostval.ptr, sys_groupname) != 0) {
- msyslog(LOG_ERR,
- "crypto_setup: trusted certificate name %s does not match group name %s",
- hostval.ptr, sys_groupname);
- exit (-1);
- }
- }
- if (sys_groupname != NULL) {
-
- /*
- * Load optional IFF parameters from file
- * "ntpkey_iffkey_<groupname>".
- */
- snprintf(filename, MAXFILENAME, "ntpkey_iffkey_%s",
- sys_groupname);
- iffkey_info = crypto_key(filename, passwd, NULL);
- if (iffkey_info != NULL)
- crypto_flags |= CRYPTO_FLAG_IFF;
+ snprintf(filename, sizeof(filename), "ntpkey_iffkey_%s",
+ hostname);
+ iffkey_info = crypto_key(filename, passwd, NULL);
+ if (iffkey_info != NULL)
+ crypto_flags |= CRYPTO_FLAG_IFF;
- /*
- * Load optional GQ parameters from file
- * "ntpkey_gqkey_<groupname>".
- */
- snprintf(filename, MAXFILENAME, "ntpkey_gqkey_%s",
- sys_groupname);
- gqkey_info = crypto_key(filename, passwd, NULL);
- if (gqkey_info != NULL)
- crypto_flags |= CRYPTO_FLAG_GQ;
+ /*
+ * Load optional GQ parameters from file
+ * "ntpkey_gqkey_<hostname>".
+ */
+ snprintf(filename, sizeof(filename), "ntpkey_gqkey_%s",
+ hostname);
+ gqkey_info = crypto_key(filename, passwd, NULL);
+ if (gqkey_info != NULL)
+ crypto_flags |= CRYPTO_FLAG_GQ;
- /*
- * Load optional MV parameters from file
- * "ntpkey_mvkey_<groupname>".
- */
- snprintf(filename, MAXFILENAME, "ntpkey_mvkey_%s",
- sys_groupname);
- mvkey_info = crypto_key(filename, passwd, NULL);
- if (mvkey_info != NULL)
- crypto_flags |= CRYPTO_FLAG_MV;
- }
+ /*
+ * Load optional MV parameters from file
+ * "ntpkey_mvkey_<hostname>".
+ */
+ snprintf(filename, sizeof(filename), "ntpkey_mvkey_%s",
+ hostname);
+ mvkey_info = crypto_key(filename, passwd, NULL);
+ if (mvkey_info != NULL)
+ crypto_flags |= CRYPTO_FLAG_MV;
/*
* We met the enemy and he is us. Now strike up the dance.
*/
crypto_flags |= CRYPTO_FLAG_ENAB | (cinfo->nid << 16);
- snprintf(statstr, NTP_MAXSTRLEN,
- "setup 0x%x host %s %s", crypto_flags, sys_hostname,
- OBJ_nid2ln(cinfo->nid));
+ snprintf(statstr, sizeof(statstr), "setup 0x%x host %s %s",
+ crypto_flags, hostname, OBJ_nid2ln(cinfo->nid));
record_crypto_stats(NULL, statstr);
#ifdef DEBUG
if (debug)
@@ -3881,32 +3947,36 @@ crypto_config(
* Set host name (host).
*/
case CRYPTO_CONF_PRIV:
- sys_hostname = emalloc(strlen(cp) + 1);
- strcpy(sys_hostname, cp);
+ if (NULL != host_filename)
+ free(host_filename);
+ host_filename = estrdup(cp);
break;
/*
* Set group name (ident).
*/
case CRYPTO_CONF_IDENT:
- sys_groupname = emalloc(strlen(cp) + 1);
- strcpy(sys_groupname, cp);
+ if (NULL != ident_filename)
+ free(ident_filename);
+ ident_filename = estrdup(cp);
break;
/*
* Set private key password (pw).
*/
case CRYPTO_CONF_PW:
- passwd = emalloc(strlen(cp) + 1);
- strcpy(passwd, cp);
+ if (NULL != passwd)
+ free(passwd);
+ passwd = estrdup(cp);
break;
/*
* Set random seed file name (randfile).
*/
case CRYPTO_CONF_RAND:
- rand_file = emalloc(strlen(cp) + 1);
- strcpy(rand_file, cp);
+ if (NULL != rand_file)
+ free(rand_file);
+ rand_file = estrdup(cp);
break;
/*
@@ -3922,6 +3992,6 @@ crypto_config(
break;
}
}
-# else
+# else /* !AUTOKEY follows */
int ntp_crypto_bs_pubkey;
-# endif /* OPENSSL */
+# endif /* !AUTOKEY */
diff --git a/ntpd/ntp_data_structures.c b/ntpd/ntp_data_structures.c
deleted file mode 100644
index fb21529be56b..000000000000
--- a/ntpd/ntp_data_structures.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* ntp_data_structures.c
- *
- * This file contains the data structures used by the ntp configuration
- * code and the discrete event simulator.
- *
- * Written By: Sachin Kamboj
- * University of Delaware
- * Newark, DE 19711
- * Copyright (c) 2006
- */
-
-
-#include <stdlib.h> /* Needed for malloc */
-#include "ntp_data_structures.h"
-#include "ntp_stdlib.h"
-
-/* Priority Queue
- * --------------
- * Define a priority queue in which the relative priority of the elements
- * is determined by a function 'get_order' which is supplied to the
- * priority_queue
- */
-
-
-queue *create_priority_queue(int (*get_order)(void *, void *))
-{
- queue *my_queue = (queue *) emalloc(sizeof(queue));
- my_queue->get_order = get_order;
- my_queue->front = NULL;
- my_queue->no_of_elements = 0;
- return my_queue;
-}
-
-
-/* Define a function to "destroy" a priority queue, freeing-up
- * all the allocated resources in the process
- */
-
-void destroy_queue(queue *my_queue)
-{
- node *temp = NULL;
-
- /* Empty out the queue elements if they are not already empty */
- while (my_queue->front != NULL) {
- temp = my_queue->front;
- my_queue->front = my_queue->front->node_next;
- free(temp);
- }
-
- /* Now free the queue */
- free(my_queue);
-}
-
-
-/* Define a function to allocate memory for one element
- * of the queue. The allocated memory consists of size
- * bytes plus the number of bytes needed for bookkeeping
- */
-
-void *get_node(size_t size)
-{
- node *new_node = emalloc(sizeof(*new_node) + size);
- new_node->node_next = NULL;
- return new_node + 1;
-}
-
-/* Define a function to free the allocated memory for a queue node */
-void free_node(void *my_node)
-{
- node *old_node = my_node;
- free(old_node - 1);
-}
-
-
-void *
-next_node(
- void *pv
- )
-{
- node *pn;
-
- pn = pv;
- pn--;
-
- if (pn->node_next == NULL)
- return NULL;
-
- return pn->node_next + 1;
-}
-
-
-/* Define a function to check if the queue is empty. */
-int empty(queue *my_queue)
-{
- return (!my_queue || !my_queue->front);
-}
-
-
-void *
-queue_head(
- queue *q
- )
-{
- if (NULL == q || NULL == q->front)
- return NULL;
-
- return q->front + 1;
-}
-
-
-/* Define a function to add an element to the priority queue.
- * The element is added according to its priority -
- * relative priority is given by the get_order function
- */
-queue *enqueue(queue *my_queue, void *my_node)
-{
- node *new_node = ((node *) my_node) - 1;
- node *i = NULL;
- node *j = my_queue->front;
-
- while (j != NULL && ((*my_queue->get_order)(new_node + 1, j + 1) > 0)) {
- i = j;
- j = j->node_next;
- }
-
- if (i == NULL) { /* Insert at beginning of the queue */
- new_node->node_next = my_queue->front;
- my_queue->front = new_node;
- }
- else { /* Insert Elsewhere, including the end */
- new_node->node_next = i->node_next;
- i->node_next = new_node;
- }
-
- ++my_queue->no_of_elements;
- return my_queue;
-}
-
-
-/* Define a function to dequeue the first element from the priority
- * queue and return it
- */
-
-void *dequeue(queue *my_queue)
-{
- node *my_node = my_queue->front;
- if (my_node != NULL) {
- my_queue->front = my_node->node_next;
- --my_queue->no_of_elements;
- return (void *)(my_node + 1);
- }
- else
- return NULL;
-}
-
-/* Define a function that returns the number of elements in the
- * priority queue
- */
-int get_no_of_elements(queue *my_queue)
-{
- return my_queue->no_of_elements;
-}
-
-/* Define a function to append a queue onto another.
- * Note: there is a faster way (O(1) as opposed to O(n))
- * to do this for simple (FIFO) queues, but we can't rely on
- * that for priority queues. (Given the current representation)
- *
- * I don't anticipate this to be a problem. If it does turn
- * out to be a bottleneck, I will consider replacing the
- * current implementation with a binomial or fibonacci heap.
- */
-
-void append_queue(queue *q1, queue *q2)
-{
- while (!empty(q2))
- enqueue(q1, dequeue(q2));
- destroy_queue(q2);
-}
-
-/* FIFO Queue
- * ----------
- * Use the priority queue to create a traditional FIFO queue.
- * The only extra function needed is the create_queue
- */
-
-/* C is not Lisp and does not allow anonymous lambda functions :-(.
- * So define a get_fifo_order function here
- */
-
-int get_fifo_order(void *el1, void *el2)
-{ return 1;
-}
-
-/* Define a function to create a FIFO queue */
-
-queue *create_queue()
-{ return create_priority_queue(get_fifo_order);
-}
diff --git a/ntpd/ntp_filegen.c b/ntpd/ntp_filegen.c
index b7b04bdbab6d..a1703a9d13a3 100644
--- a/ntpd/ntp_filegen.c
+++ b/ntpd/ntp_filegen.c
@@ -6,7 +6,7 @@
*
*
* Copyright (C) 1992, 1996 by Rainer Pruy
- * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* This code may be modified and used freely
* provided credits remain intact.
@@ -44,7 +44,7 @@
*/
#define SUFFIX_SEP '.'
-static void filegen_open (FILEGEN *, u_long);
+static void filegen_open (FILEGEN *, u_int32, const time_t*);
static int valid_fileref (const char *, const char *);
static void filegen_init (const char *, const char *, FILEGEN *);
#ifdef DEBUG
@@ -58,17 +58,18 @@ static void filegen_uninit (FILEGEN *);
static void
filegen_init(
- const char * prefix,
- const char * basename,
+ const char * dir,
+ const char * fname,
FILEGEN * fgp
)
{
- fgp->fp = NULL;
- fgp->prefix = prefix; /* Yes, this is TOTALLY lame! */
- fgp->basename = estrdup(basename);
- fgp->id = 0;
- fgp->type = FILEGEN_DAY;
- fgp->flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
+ fgp->fp = NULL;
+ fgp->dir = estrdup(dir);
+ fgp->fname = estrdup(fname);
+ fgp->id_lo = 0;
+ fgp->id_hi = 0;
+ fgp->type = FILEGEN_DAY;
+ fgp->flag = FGEN_FLAG_LINK; /* not yet enabled !!*/
}
@@ -78,10 +79,11 @@ filegen_init(
#ifdef DEBUG
static void
filegen_uninit(
- FILEGEN * fgp
+ FILEGEN *fgp
)
{
- free(fgp->basename);
+ free(fgp->dir);
+ free(fgp->fname);
}
#endif
@@ -94,38 +96,53 @@ filegen_uninit(
static void
filegen_open(
FILEGEN * gen,
- u_long newid
+ u_int32 stamp,
+ const time_t * pivot
)
{
- char *filename;
- char *basename;
- u_int len;
+ char *savename; /* temp store for name collision handling */
+ char *fullname; /* name with any designation extension */
+ char *filename; /* name without designation extension */
+ char *suffix; /* where to print suffix extension */
+ u_int len, suflen;
FILE *fp;
struct calendar cal;
+ struct isodate iso;
+
+ /* get basic filename in buffer, leave room for extensions */
+ len = strlen(gen->dir) + strlen(gen->fname) + 65;
+ filename = emalloc(len);
+ fullname = emalloc(len);
+ savename = NULL;
+ snprintf(filename, len, "%s%s", gen->dir, gen->fname);
+
+ /* where to place suffix */
+ suflen = strlcpy(fullname, filename, len);
+ suffix = fullname + suflen;
+ suflen = len - suflen;
+
+ /* last octet of fullname set to '\0' for truncation check */
+ fullname[len - 1] = '\0';
- len = strlen(gen->prefix) + strlen(gen->basename) + 1;
- basename = emalloc(len);
- snprintf(basename, len, "%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, filename);
gen->type = FILEGEN_NONE;
- /* fall through to FILEGEN_NONE */
+ break;
case FILEGEN_NONE:
- filename = estrdup(basename);
+ /* no suffix, all set */
break;
case FILEGEN_PID:
- filename = emalloc(len + 1 + 1 + 10);
- snprintf(filename, len + 1 + 1 + 10,
- "%s%c#%ld",
- basename, SUFFIX_SEP, newid);
+ gen->id_lo = getpid();
+ gen->id_hi = 0;
+ snprintf(suffix, suflen, "%c#%ld",
+ SUFFIX_SEP, gen->id_lo);
break;
case FILEGEN_DAY:
@@ -134,52 +151,60 @@ filegen_open(
* 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 = emalloc(len + 1 + 4 + 2 + 2);
- snprintf(filename, len + 1 + 4 + 2 + 2,
- "%s%c%04d%02d%02d",
- basename, SUFFIX_SEP,
- cal.year, cal.month, cal.monthday);
+ ntpcal_ntp_to_date(&cal, stamp, pivot);
+ snprintf(suffix, suflen, "%c%04d%02d%02d",
+ SUFFIX_SEP, cal.year, cal.month, cal.monthday);
+ cal.hour = cal.minute = cal.second = 0;
+ gen->id_lo = ntpcal_date_to_ntp(&cal);
+ gen->id_hi = (u_int32)(gen->id_lo + SECSPERDAY);
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 = emalloc(len + 1 + 4 + 1 + 2);
- snprintf(filename, len + 1 + 4 + 1 + 2,
- "%s%c%04dw%02d",
- basename, SUFFIX_SEP,
- cal.year, cal.yearday / 7);
+ isocal_ntp_to_date(&iso, stamp, pivot);
+ snprintf(suffix, suflen, "%c%04dw%02d",
+ SUFFIX_SEP, iso.year, iso.week);
+ iso.hour = iso.minute = iso.second = 0;
+ iso.weekday = 1;
+ gen->id_lo = isocal_date_to_ntp(&iso);
+ gen->id_hi = (u_int32)(gen->id_lo + 7 * SECSPERDAY);
break;
case FILEGEN_MONTH:
- caljulian(newid, &cal);
- filename = emalloc(len + 1 + 4 + 2);
- snprintf(filename, len + 1 + 4 + 2,
- "%s%c%04d%02d",
- basename, SUFFIX_SEP, cal.year, cal.month);
+ ntpcal_ntp_to_date(&cal, stamp, pivot);
+ snprintf(suffix, suflen, "%c%04d%02d",
+ SUFFIX_SEP, cal.year, cal.month);
+ cal.hour = cal.minute = cal.second = 0;
+ cal.monthday = 1;
+ gen->id_lo = ntpcal_date_to_ntp(&cal);
+ cal.month++;
+ gen->id_hi = ntpcal_date_to_ntp(&cal);
break;
case FILEGEN_YEAR:
- caljulian(newid, &cal);
- filename = emalloc(len + 1 + 4);
- snprintf(filename, len + 1 + 4,
- "%s%c%04d",
- basename, SUFFIX_SEP, cal.year);
+ ntpcal_ntp_to_date(&cal, stamp, pivot);
+ snprintf(suffix, suflen, "%c%04d",
+ SUFFIX_SEP, cal.year);
+ cal.hour = cal.minute = cal.second = 0;
+ cal.month = cal.monthday = 1;
+ gen->id_lo = ntpcal_date_to_ntp(&cal);
+ cal.year++;
+ gen->id_hi = ntpcal_date_to_ntp(&cal);
break;
case FILEGEN_AGE:
- filename = emalloc(len + 1 + 2 + 10);
- snprintf(filename, len + 1 + 2 + 10,
- "%s%ca%08ld",
- basename, SUFFIX_SEP, newid);
+ gen->id_lo = current_time - (current_time % SECSPERDAY);
+ gen->id_hi = gen->id_lo + SECSPERDAY;
+ snprintf(suffix, suflen, "%ca%08ld",
+ SUFFIX_SEP, gen->id_lo);
}
+ /* check possible truncation */
+ if ('\0' != fullname[len - 1]) {
+ fullname[len - 1] = '\0';
+ msyslog(LOG_ERR, "logfile name truncated: \"%s\"",
+ fullname);
+ }
+
if (FILEGEN_NONE != gen->type) {
/*
* check for existence of a file with name 'basename'
@@ -195,25 +220,23 @@ filegen_open(
#ifndef S_ISREG
#define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
#endif
- if (stat(basename, &stats) == 0) {
+ if (stat(filename, &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;
-
- savename = emalloc(len + 1 + 1 + 10 + 10);
- snprintf(savename, len + 1 + 1 + 10 + 10,
+ savename = emalloc(len);
+ snprintf(savename, len,
"%s%c%dC%lu",
- basename, SUFFIX_SEP,
+ filename, SUFFIX_SEP,
(int)getpid(), conflicts++);
- if (rename(basename, savename) != 0)
+ if (rename(filename, savename) != 0)
msyslog(LOG_ERR,
"couldn't save %s: %m",
- basename);
+ filename);
free(savename);
} else {
/*
@@ -223,14 +246,14 @@ filegen_open(
*/
if (
#if !defined(VMS)
- unlink(basename) != 0
+ unlink(filename) != 0
#else
- delete(basename) != 0
+ delete(filename) != 0
#endif
)
msyslog(LOG_ERR,
"couldn't unlink %s: %m",
- basename);
+ filename);
}
} else {
/*
@@ -239,7 +262,7 @@ filegen_open(
msyslog(LOG_ERR,
"expected regular file for %s "
"(found mode 0%lo)",
- basename,
+ filename,
(unsigned long)stats.st_mode);
}
} else {
@@ -249,18 +272,18 @@ filegen_open(
*/
if (ENOENT != errno)
msyslog(LOG_ERR, "stat(%s) failed: %m",
- basename);
+ filename);
}
}
/*
* now, try to open new file generation...
*/
- fp = fopen(filename, "a");
-
- DPRINTF(4, ("opening filegen (type=%d/id=%lu) \"%s\"\n",
- gen->type, newid, filename));
+ DPRINTF(4, ("opening filegen (type=%d/stamp=%u) \"%s\"\n",
+ gen->type, stamp, fullname));
+ fp = fopen(fullname, "a");
+
if (NULL == fp) {
/* open failed -- keep previous state
*
@@ -272,14 +295,13 @@ filegen_open(
*/
if (ENOENT != errno)
- msyslog(LOG_ERR, "can't open %s: %m", filename);
+ msyslog(LOG_ERR, "can't open %s: %m", fullname);
} else {
if (NULL != gen->fp) {
fclose(gen->fp);
gen->fp = NULL;
}
gen->fp = fp;
- gen->id = newid;
if (gen->flag & FGEN_FLAG_LINK) {
/*
@@ -287,7 +309,7 @@ filegen_open(
* 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
+ * fullname for symlink
*
* Ok, it would just mean taking the part following
* the last '/' in the name.... Should add it later....
@@ -295,22 +317,22 @@ filegen_open(
/* Windows NT does not support file links -Greg Schueman 1/18/97 */
-#if defined SYS_WINNT || defined SYS_VXWORKS
+#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 (link(fullname, filename) != 0)
if (EEXIST != errno)
msyslog(LOG_ERR,
"can't link(%s, %s): %m",
- filename, basename);
+ fullname, filename);
#endif /* SYS_WINNT || VXWORKS */
} /* flags & FGEN_FLAG_LINK */
} /* else fp == NULL */
- free(basename);
free(filename);
+ free(fullname);
return;
}
@@ -325,11 +347,11 @@ filegen_open(
void
filegen_setup(
FILEGEN * gen,
- u_long now
+ u_int32 now
)
{
- u_long new_gen = ~ (u_long) 0;
- struct calendar cal;
+ int current;
+ time_t pivot;
if (!(gen->flag & FGEN_FLAG_ENABLED)) {
if (NULL != gen->fp) {
@@ -338,67 +360,39 @@ filegen_setup(
}
return;
}
-
+
switch (gen->type) {
+ default:
case FILEGEN_NONE:
- if (NULL != gen->fp)
- return; /* file already open */
+ current = TRUE;
break;
case FILEGEN_PID:
- new_gen = getpid();
+ current = ((int)gen->id_lo == getpid());
break;
- case FILEGEN_DAY:
- caljulian(now, &cal);
- cal.hour = cal.minute = cal.second = 0;
- new_gen = caltontp(&cal);
+ case FILEGEN_AGE:
+ current = (gen->id_lo <= current_time) &&
+ (gen->id_hi > current_time);
break;
+ case FILEGEN_DAY:
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 % SECSPERDAY);
+ current = (gen->id_lo <= now) &&
+ (gen->id_hi > now);
break;
}
/*
* try to open file if not yet open
* reopen new file generation file on change of generation id
*/
- if (NULL == gen->fp || gen->id != new_gen) {
-
- DPRINTF(1, ("filegen %0x %lu %lu %lu\n",
- gen->type, now, gen->id, new_gen));
-
- filegen_open(gen, new_gen);
+ if (NULL == gen->fp || !current) {
+ DPRINTF(1, ("filegen %0x %u\n", gen->type, now));
+ pivot = time(NULL);
+ filegen_open(gen, now, &pivot);
}
}
@@ -409,45 +403,55 @@ filegen_setup(
void
filegen_config(
FILEGEN * gen,
- const char * basename,
+ const char * dir,
+ const char * fname,
u_int type,
u_int flag
)
{
- int file_existed = 0;
+ int file_existed;
+ l_fp now;
+
/*
* if nothing would be changed...
*/
- if ((strcmp(basename, gen->basename) == 0) && type == gen->type
- && flag == gen->flag)
+ if (strcmp(dir, gen->dir) == 0 && strcmp(fname, gen->fname) == 0
+ && type == gen->type && flag == gen->flag)
return;
-
+
/*
* validate parameters
*/
- if (!valid_fileref(gen->prefix, basename))
+ if (!valid_fileref(dir, fname))
return;
if (NULL != gen->fp) {
fclose(gen->fp);
gen->fp = NULL;
- file_existed = 1;
+ file_existed = TRUE;
+ } else {
+ file_existed = FALSE;
}
DPRINTF(3, ("configuring filegen:\n"
- "\tprefix:\t%s\n"
- "\tbasename:\t%s -> %s\n"
+ "\tdir:\t%s -> %s\n"
+ "\tfname:\t%s -> %s\n"
"\ttype:\t%d -> %d\n"
"\tflag: %x -> %x\n",
- gen->prefix,
- gen->basename, basename,
+ gen->dir, dir,
+ gen->fname, fname,
gen->type, type,
gen->flag, flag));
- if (strcmp(gen->basename, basename) != 0) {
- free(gen->basename);
- gen->basename = estrdup(basename);
+ if (strcmp(gen->dir, dir) != 0) {
+ free(gen->dir);
+ gen->dir = estrdup(dir);
+ }
+
+ if (strcmp(gen->fname, fname) != 0) {
+ free(gen->fname);
+ gen->fname = estrdup(fname);
}
gen->type = (u_char)type;
gen->flag = (u_char)flag;
@@ -459,8 +463,6 @@ filegen_config(
* otherwise the new settings will be used anyway at the next open
*/
if (file_existed) {
- l_fp now;
-
get_systime(&now);
filegen_setup(gen, now.l_ui);
}
@@ -473,41 +475,54 @@ filegen_config(
*/
static int
valid_fileref(
- const char * prefix,
- const char * basename
+ const char * dir,
+ const char * fname
)
{
/*
- * prefix cannot be changed dynamically
+ * dir cannot be changed dynamically
* (within the context of filegen)
* so just reject basenames containing '..'
*
* ASSUMPTION:
- * file system parts 'below' prefix may be
+ * file system parts 'below' dir may be
* specified without infringement of security
*
- * restricting prefix to legal values
+ * restricting dir to legal values
* has to be ensured by other means
* (however, it would be possible to perform some checks here...)
*/
- register const char *p = basename;
-
+ const char *p;
+
/*
* Just to catch, dumb errors opening up the world...
*/
- if (NULL == prefix || '\0' == *prefix)
- return 0;
+ if (NULL == dir || '\0' == dir[0])
+ return FALSE;
- if (NULL == basename)
- return 0;
-
- for (p = basename; p; p = strchr(p, DIR_SEP)) {
+ if (NULL == fname)
+ return FALSE;
+
+#ifdef SYS_WINNT
+ /*
+ * Windows treats / equivalent to \, reject any / to ensure
+ * check below for DIR_SEP (\ on windows) are adequate.
+ */
+ if (strchr(fname, '/')) {
+ msyslog(LOG_ERR,
+ "filegen filenames must not contain '/': %s",
+ fname);
+ return FALSE;
+ }
+#endif
+
+ for (p = fname; p != NULL; p = strchr(p, DIR_SEP)) {
if ('.' == p[0] && '.' == p[1]
&& ('\0' == p[2] || DIR_SEP == p[2]))
- return 0;
+ return FALSE;
}
-
- return 1;
+
+ return TRUE;
}
@@ -544,7 +559,7 @@ filegen_get(
void
filegen_register(
- const char * prefix,
+ const char * dir,
const char * name,
FILEGEN * filegen
)
@@ -553,7 +568,7 @@ filegen_register(
DPRINTF(4, ("filegen_register(%s, %p)\n", name, filegen));
- filegen_init(prefix, name, filegen);
+ filegen_init(dir, name, filegen);
ppfe = &filegen_registry;
while (NULL != *ppfe) {
@@ -582,6 +597,20 @@ filegen_register(
/*
+ * filegen_statsdir() - reset each filegen entry's dir to statsdir.
+ */
+void
+filegen_statsdir(void)
+{
+ struct filegen_entry *f;
+
+ for (f = filegen_registry; f != NULL; f = f->next)
+ filegen_config(f->filegen, statsdir, f->filegen->fname,
+ f->filegen->type, f->filegen->flag);
+}
+
+
+/*
* filegen_unregister frees memory allocated by filegen_register for
* name.
*/
diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c
deleted file mode 100644
index 58f54954b7f2..000000000000
--- a/ntpd/ntp_intres.c
+++ /dev/null
@@ -1,1301 +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_intres.h"
-
-#ifndef NO_INTRES
-
-#include <stdio.h>
-#include <ctype.h>
-#include <signal.h>
-
-/**/
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#include <arpa/inet.h>
-/**/
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h> /* MAXHOSTNAMELEN (often) */
-#endif
-
-#if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT)
-# define HAVE_RES_INIT
-#endif
-
-#if defined(HAVE_RESOLV_H) && defined(HAVE_RES_INIT)
-# ifdef HAVE_ARPA_NAMESER_H
-# include <arpa/nameser.h> /* DNS HEADER struct */
-# endif
-# ifdef HAVE_NETDB_H
-# include <netdb.h>
-# endif
-# include <resolv.h>
-#endif
-
-#ifdef RES_TIMEOUT
-#undef RES_TIMEOUT /* resolv.h has one, we want ours */
-#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 "ntp_config.h"
-
-#include <isc/net.h>
-#include <isc/result.h>
-
-#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 to resolve */
- struct conf_peer ce_config; /* config info for peer */
- int no_needed; /* number of addresses needed (pool) */
- /* no_needed isn't used yet: It's needed to fix bug-975 */
- int type; /* -4 and -6 flags */
- sockaddr_u 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 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_NEEDED 1
-#define TOK_TYPE 2
-#define TOK_HMODE 3
-#define TOK_VERSION 4
-#define TOK_MINPOLL 5
-#define TOK_MAXPOLL 6
-#define TOK_FLAGS 7
-#define TOK_TTL 8
-#define TOK_KEYID 9
-#define TOK_KEYSTR 10
-#define NUMTOK 11
-
-#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 */
-int req_keytype; /* OpenSSL NID such as NID_md5 */
-size_t req_hashlen; /* digest size for req_keytype */
-char *req_file; /* name of the file with configuration info */
-
-/* end stuff to be filled in */
-
-
-static void checkparent (void);
-static struct conf_entry *
- removeentry (struct conf_entry *);
-static void addentry (char *, int, int, int, int, int, int, u_int,
- int, keyid_t, char *);
-static int findhostaddr (struct conf_entry *);
-static void openntp (void);
-static int request (struct conf_peer *);
-static char * nexttoken (char **);
-static void readconf (FILE *, char *);
-static void doconfigure (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];
-};
-
-
-static void resolver_exit (int);
-
-/*
- * Call here instead of just exiting
- */
-
-static void resolver_exit (int code)
-{
-#ifdef SYS_WINNT
- CloseHandle(ResolverEventHandle);
- ResolverEventHandle = NULL;
- _endthreadex(code); /* Just to kill the thread not the process */
-#else
- exit(code); /* kill the forked process */
-#endif
-}
-
-/*
- * 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 SYS_WINNT
- DWORD rc;
-#else
- int rc;
- struct timeval tv;
- fd_set fdset;
- int time_left;
-#endif
-
-#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 );
- resolver_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);
- resolver_exit(1);
- }
- readconf(in, req_file);
- (void) fclose(in);
-
-#ifdef DEBUG
- if (!debug)
-#endif
- if (unlink(req_file))
- msyslog(LOG_WARNING,
- "unable to remove intres request file %s, %m",
- req_file);
-
- /*
- * Set up the timers to do first shot immediately.
- */
- resolve_timer = 0;
- resolve_value = MINRESOLVE;
- config_timer = CONFIG_TIME;
-
- for (;;) {
- checkparent();
-
- if (resolve_timer == 0) {
- /*
- * Sleep a little to make sure the network is completely up
- */
- sleep(SLEEPTIME);
- doconfigure(1);
-
- /* prepare retry, in case there's more work to do */
- resolve_timer = resolve_value;
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "resolve_timer: 0->%d", resolve_timer);
-#endif
- if (resolve_value < MAXRESOLVE)
- resolve_value <<= 1;
-
- config_timer = CONFIG_TIME;
- } else if (config_timer == 0) { /* MB: in which case would this be required ? */
- doconfigure(0);
- /* MB: should we check now if we could exit, similar to the code above? */
- config_timer = CONFIG_TIME;
-#ifdef DEBUG
- if (debug > 2)
- msyslog(LOG_INFO, "config_timer: 0->%d", config_timer);
-#endif
- }
-
- if (confentries == NULL)
- resolver_exit(0); /* done */
-
-#ifdef SYS_WINNT
- rc = WaitForSingleObject(ResolverEventHandle, 1000 * ALARM_TIME); /* in milliseconds */
-
- if ( rc == WAIT_OBJECT_0 ) { /* signaled by the main thread */
- resolve_timer = 0; /* retry resolving immediately */
- continue;
- }
-
- if ( rc != WAIT_TIMEOUT ) /* not timeout: error */
- resolver_exit(1);
-
-#else /* not SYS_WINNT */
- /* Bug 1386: fork() in NetBSD leaves timers running. */
- /* So we need to retry select on EINTR */
- time_left = ALARM_TIME;
- while (time_left > 0) {
- tv.tv_sec = time_left;
- tv.tv_usec = 0;
- FD_ZERO(&fdset);
- FD_SET(resolver_pipe_fd[0], &fdset);
- rc = select(resolver_pipe_fd[0] + 1, &fdset, (fd_set *)0, (fd_set *)0, &tv);
-
- if (rc == 0) /* normal timeout */
- break;
-
- if (rc > 0) { /* parent process has written to the pipe */
- read(resolver_pipe_fd[0], (char *)&rc, sizeof(rc)); /* make pipe empty */
- resolve_timer = 0; /* retry resolving immediately */
- break;
- }
-
- if ( rc < 0 ) { /* select() returned error */
- if (errno == EINTR) { /* Timer went off */
- time_left -= (1<<EVENT_TIMEOUT);
- continue; /* try again */
- }
- msyslog(LOG_ERR, "ntp_intres: Error from select: %s",
- strerror(errno));
- resolver_exit(1);
- }
- }
-#endif
-
- /* normal timeout, keep on waiting */
- if (config_timer > 0)
- config_timer--;
- if (resolve_timer > 0)
- resolve_timer--;
- }
-}
-
-
-#ifdef SYS_WINNT
-/*
- * ntp_intres_thread wraps the slightly different interface of Windows
- * thread functions and ntp_intres
- */
-unsigned WINAPI
-ntp_intres_thread(void *UnusedThreadArg)
-{
- UNUSED_ARG(UnusedThreadArg);
-
- ntp_intres();
- return 0;
-}
-#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");
- resolver_exit(0);
- }
-#endif /* SYS_WINNT && SYS_VXWORKS*/
-}
-
-
-
-/*
- * removeentry - we are done with an entry, remove it from the list
- */
-static struct conf_entry *
-removeentry(
- struct conf_entry *entry
- )
-{
- register struct conf_entry *ce;
- struct conf_entry *next_ce;
-
- ce = confentries;
- if (ce == entry)
- confentries = ce->ce_next;
- else
- while (ce != NULL) {
- if (ce->ce_next == entry) {
- ce->ce_next = entry->ce_next;
- break;
- }
- ce = ce->ce_next;
- }
-
- next_ce = entry->ce_next;
- if (entry->ce_name != NULL)
- free(entry->ce_name);
- free(entry);
-
- return next_ce;
-}
-
-
-/*
- * addentry - add an entry to the configuration list
- */
-static void
-addentry(
- char *name,
- int no_needed,
- int type,
- int mode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t keyid,
- char *keystr
- )
-{
- register struct conf_entry *ce;
-
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO,
- "intres: <%s> %d %d %d %d %d %d %x %d %x %s",
- name, no_needed, type, mode, version,
- minpoll, maxpoll, flags, ttl, keyid, keystr);
-#endif
- ce = emalloc(sizeof(*ce));
- ce->ce_name = estrdup(name);
- ce->ce_peeraddr = 0;
-#ifdef ISC_PLATFORM_HAVEIPV6
- ce->ce_peeraddr6 = in6addr_any;
-#endif
- ZERO_SOCK(&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->no_needed = no_needed; /* Not used after here. */
- /* Start of fixing bug-975 */
- ce->type = type;
- ce->ce_flags = (u_char)flags;
- ce->ce_ttl = (u_char)ttl;
- ce->ce_keyid = keyid;
- strncpy(ce->ce_keystr, keystr, sizeof(ce->ce_keystr) - 1);
- ce->ce_keystr[sizeof(ce->ce_keystr) - 1] = 0;
- 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
- )
-{
- static int eai_again_seen = 0;
- struct addrinfo *addr;
- struct addrinfo hints;
- int again;
- int error;
-
- checkparent(); /* make sure our guy is still running */
-
- if (entry->ce_name != NULL && !SOCK_UNSPEC(&entry->peer_store)) {
- /* HMS: Squawk? */
- msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are defined...");
- return 1;
- }
-
- if (entry->ce_name == NULL && SOCK_UNSPEC(&entry->peer_store)) {
- msyslog(LOG_ERR, "findhostaddr: both ce_name and ce_peeraddr are undefined!");
- return 0;
- }
-
- if (entry->ce_name) {
- DPRINTF(2, ("findhostaddr: Resolving <%s>\n",
- entry->ce_name));
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = entry->type;
- hints.ai_socktype = SOCK_DGRAM;
- hints.ai_protocol = IPPROTO_UDP;
- /*
- * If IPv6 is not available look only for v4 addresses
- */
- if (!ipv6_works)
- hints.ai_family = AF_INET;
- error = getaddrinfo(entry->ce_name, NULL, &hints, &addr);
- if (error == 0) {
- entry->peer_store = *((sockaddr_u *)(addr->ai_addr));
- if (IS_IPV4(&entry->peer_store)) {
- entry->ce_peeraddr =
- NSRCADR(&entry->peer_store);
- entry->ce_config.v6_flag = 0;
- } else {
- entry->ce_peeraddr6 =
- SOCK_ADDR6(&entry->peer_store);
- entry->ce_config.v6_flag = 1;
- }
- freeaddrinfo(addr);
- }
- } else {
- DPRINTF(2, ("findhostaddr: Resolving <%s>\n",
- stoa(&entry->peer_store)));
-
- 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 (0 == error) {
-
- /* again is our return value, for success it is 1 */
- again = 1;
-
- DPRINTF(2, ("findhostaddr: %s resolved.\n",
- (entry->ce_name) ? "name" : "address"));
- } else {
- /*
- * If the resolver failed, see if the failure is
- * temporary. If so, return success.
- */
- again = 0;
-
- switch (error) {
-
- case EAI_FAIL:
- again = 1;
- break;
-
- case EAI_AGAIN:
- again = 1;
- eai_again_seen = 1;
- break;
-
- case EAI_NONAME:
-#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
- case EAI_NODATA:
-#endif
- msyslog(LOG_ERR, "host name not found%s%s: %s",
- (EAI_NONAME == error) ? "" : " EAI_NODATA",
- (eai_again_seen) ? " (permanent)" : "",
- entry->ce_name);
- again = !eai_again_seen;
- break;
-
-#ifdef EAI_SYSTEM
- case EAI_SYSTEM:
- /*
- * EAI_SYSTEM means the real error is in errno. We should be more
- * discriminating about which errno values require retrying, but
- * this matches existing behavior.
- */
- again = 1;
- DPRINTF(1, ("intres: EAI_SYSTEM errno %d (%s) means try again, right?\n",
- errno, strerror(errno)));
- break;
-#endif
- }
-
- /* do this here to avoid perturbing errno earlier */
- DPRINTF(2, ("intres: got error status of: %d\n", error));
- }
-
- return again;
-}
-
-
-/*
- * openntp - open a socket to the ntp server
- */
-static void
-openntp(void)
-{
- const char *localhost = "127.0.0.1"; /* Use IPv4 loopback */
- struct addrinfo hints;
- struct addrinfo *addr;
- u_long on;
- int err;
-
- if (sockfd != INVALID_SOCKET)
- return;
-
- memset(&hints, 0, sizeof(hints));
-
- /*
- * For now only bother with IPv4
- */
- hints.ai_family = AF_INET;
- hints.ai_socktype = SOCK_DGRAM;
-
- err = getaddrinfo(localhost, "ntp", &hints, &addr);
-
- if (err) {
-#ifdef EAI_SYSTEM
- if (EAI_SYSTEM == err)
- msyslog(LOG_ERR, "getaddrinfo(%s) failed: %m",
- localhost);
- else
-#endif
- msyslog(LOG_ERR, "getaddrinfo(%s) failed: %s",
- localhost, gai_strerror(err));
- resolver_exit(1);
- }
-
- sockfd = socket(addr->ai_family, addr->ai_socktype, 0);
-
- if (INVALID_SOCKET == sockfd) {
- msyslog(LOG_ERR, "socket() failed: %m");
- resolver_exit(1);
- }
-
-#ifndef SYS_WINNT
- /*
- * On Windows only the count of sockets must be less than
- * FD_SETSIZE. On Unix each descriptor's value must be less
- * than FD_SETSIZE, as fd_set is a bit array.
- */
- if (sockfd >= FD_SETSIZE) {
- msyslog(LOG_ERR, "socket fd %d too large, FD_SETSIZE %d",
- (int)sockfd, FD_SETSIZE);
- resolver_exit(1);
- }
-
- /*
- * Make the socket non-blocking. We'll wait with select()
- * Unix: fcntl(O_NONBLOCK) or fcntl(FNDELAY)
- */
-# ifdef O_NONBLOCK
- if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) {
- msyslog(LOG_ERR, "fcntl(O_NONBLOCK) failed: %m");
- resolver_exit(1);
- }
-# else
-# ifdef FNDELAY
- if (fcntl(sockfd, F_SETFL, FNDELAY) == -1) {
- msyslog(LOG_ERR, "fcntl(FNDELAY) failed: %m");
- resolver_exit(1);
- }
-# else
-# include "Bletch: NEED NON BLOCKING IO"
-# endif /* FNDDELAY */
-# endif /* O_NONBLOCK */
- (void)on; /* quiet unused warning */
-#else /* !SYS_WINNT above */
- /*
- * Make the socket non-blocking. We'll wait with select()
- * Windows: ioctlsocket(FIONBIO)
- */
- on = 1;
- err = ioctlsocket(sockfd, FIONBIO, &on);
- if (SOCKET_ERROR == err) {
- msyslog(LOG_ERR, "ioctlsocket(FIONBIO) fails: %m");
- resolver_exit(1);
- }
-#endif /* SYS_WINNT */
-
- err = connect(sockfd, addr->ai_addr, addr->ai_addrlen);
- if (SOCKET_ERROR == err) {
- msyslog(LOG_ERR, "openntp: connect() failed: %m");
- resolver_exit(1);
- }
-
- freeaddrinfo(addr);
-}
-
-
-/*
- * request - send a configuration request to the server, wait for a response
- */
-static int
-request(
- struct conf_peer *conf
- )
-{
- struct sock_timeval tvout;
- struct req_pkt reqpkt;
- size_t req_len;
- size_t total_len; /* req_len plus keyid & digest */
- fd_set fdset;
- l_fp ts;
- char * pch;
- char * pchEnd;
- l_fp * pts;
- keyid_t *pkeyid;
- 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 == INVALID_SOCKET)
- 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, sizeof(reqpkt), 0);
- FD_ZERO(&fdset);
- FD_SET(sockfd, &fdset);
- }
-
- /*
- * Make up a request packet with the configuration info
- */
- memset(&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(*conf));
- /* Make sure mbz_itemsize <= sizeof reqpkt.data */
- if (sizeof(*conf) > sizeof(reqpkt.data)) {
- msyslog(LOG_ERR,
- "Bletch: conf_peer is too big for reqpkt.data!");
- resolver_exit(1);
- }
- memcpy(reqpkt.data, conf, sizeof(*conf));
-
- if (sys_authenticate && req_hashlen > 16) {
- pch = reqpkt.data;
- /* 32-bit alignment */
- pch += (sizeof(*conf) + 3) & ~3;
- pts = (void *)pch;
- pkeyid = (void *)(pts + 1);
- pchEnd = (void *)pkeyid;
- req_len = pchEnd - (char *)&reqpkt;
- pchEnd = (void *)(pkeyid + 1);
- pchEnd += req_hashlen;
- total_len = pchEnd - (char *)&reqpkt;
- if (total_len > sizeof(reqpkt)) {
- msyslog(LOG_ERR,
- "intres total_len %lu limit is %lu (%lu octet digest)\n",
- (u_long)total_len,
- (u_long)sizeof(reqpkt),
- (u_long)req_hashlen);
- resolver_exit(1);
- }
- } else {
- pts = &reqpkt.tstamp;
- pkeyid = &reqpkt.keyid;
- req_len = REQ_LEN_NOMAC;
- }
-
- *pkeyid = htonl(req_keyid);
- get_systime(&ts);
- L_ADDUF(&ts, SKEWTIME);
- HTONL_FP(&ts, pts);
- if (sys_authenticate) {
- n = authencrypt(req_keyid, (void *)&reqpkt, req_len);
- if ((size_t)n != req_hashlen + sizeof(reqpkt.keyid)) {
- msyslog(LOG_ERR,
- "intres maclen %d expected %lu\n",
- n, (u_long)(req_hashlen +
- sizeof(reqpkt.keyid)));
- resolver_exit(1);
- }
- req_len += n;
- }
-
- /*
- * Done. Send it.
- */
-#ifndef SYS_WINNT
- n = send(sockfd, (char *)&reqpkt, req_len, 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,
- NULL, (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;
- }
- if (!GetOverlappedResult((HANDLE)sockfd, (LPOVERLAPPED)&overlap,
- (LPDWORD)&NumberOfBytesWritten, FALSE)) {
- msyslog(LOG_ERR, "GetOverlappedResult for WriteFile fails: %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) {
-#ifdef DEBUG
- if (debug)
- msyslog(LOG_INFO, "ntp_intres select() returned 0.");
-#endif
- return 0;
- }
-
-#ifndef SYS_WINNT
- n = recv(sockfd, (char *)&reqpkt, sizeof(reqpkt), 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, sizeof(reqpkt),
- NULL, (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 for ReadFile fails: %m");
- return 0;
- }
- continue;
- }
- if (!GetOverlappedResult((HANDLE)sockfd, (LPOVERLAPPED)&overlap,
- (LPDWORD)&NumberOfBytesRead, FALSE)) {
- msyslog(LOG_ERR, "GetOverlappedResult fails: %m");
- return 0;
- }
- 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_NODATA:
- /*
- * newpeer() refused duplicate association, no
- * point in retrying so call it success.
- */
- return 1;
-
- case INFO_ERR_IMPL:
- msyslog(LOG_ERR,
- "ntp_intres.request: implementation mismatch");
- return 0;
-
- case INFO_ERR_REQ:
- msyslog(LOG_ERR,
- "ntp_intres.request: request unknown");
- return 0;
-
- case INFO_ERR_FMT:
- msyslog(LOG_ERR,
- "ntp_intres.request: format error");
- return 0;
-
- case INFO_ERR_AUTH:
- msyslog(LOG_ERR,
- "ntp_intres.request: permission denied");
- return 0;
-
- default:
- msyslog(LOG_ERR,
- "ntp_intres.request: 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);
- resolver_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);
- resolver_exit(1);
- }
- }
-
-#if 0 /* paranoid checking - these are done in newpeer() */
- 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);
- resolver_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);
- resolver_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);
- resolver_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);
- resolver_exit(1);
- }
-
- if ((intval[TOK_FLAGS] & ~(FLAG_PREFER | FLAG_NOSELECT |
- FLAG_BURST | FLAG_IBURST | FLAG_SKEY)) != 0) {
- msyslog(LOG_ERR, "invalid flags (%ld) in file %s",
- intval[TOK_FLAGS], name);
- resolver_exit(1);
- }
-#endif /* end paranoid checking */
-
- flags = 0;
- 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;
-
-#ifdef OPENSSL
- if (intval[TOK_FLAGS] & FLAG_SKEY)
- flags |= CONF_FLAG_SKEY;
-#endif /* OPENSSL */
-
- /*
- * This is as good as we can check it. Add it in.
- */
- addentry(token[TOK_HOSTNAME],
- (int)intval[TOK_NEEDED], (int)intval[TOK_TYPE],
- (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;
-
-#ifdef DEBUG
- if (debug > 1)
- msyslog(LOG_INFO, "Running doconfigure %s DNS",
- dores ? "with" : "without" );
-#endif
-
-#if defined(HAVE_RES_INIT)
- if (dores) /* Reload /etc/resolv.conf - bug 1226 */
- res_init();
-#endif
- 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 && SOCK_UNSPEC(&ce->peer_store)) {
- if (!findhostaddr(ce)) {
-#ifndef IGNORE_DNS_ERRORS
- msyslog(LOG_ERR,
- "couldn't resolve `%s', giving up on it",
- ce->ce_name);
- ce = removeentry(ce);
- continue;
-#endif
- } else if (!SOCK_UNSPEC(&ce->peer_store))
- msyslog(LOG_INFO,
- "DNS %s -> %s", ce->ce_name,
- stoa(&ce->peer_store));
- }
-
- if (!SOCK_UNSPEC(&ce->peer_store)) {
- if (request(&ce->ce_config)) {
- ce = removeentry(ce);
- continue;
- }
- /*
- * Failed case. Should bump counter and give
- * up.
- */
-#ifdef DEBUG
- if (debug > 1) {
- msyslog(LOG_INFO,
- "doconfigure: request() FAILED, maybe next time.");
- }
-#endif
- }
- ce = ce->ce_next;
- }
-}
-
-#else /* NO_INTRES follows */
-int ntp_intres_nonempty_compilation_unit;
-#endif
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index f5584462732f..ae00e55d1d86 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -9,6 +9,12 @@
#include <stdio.h>
#include <signal.h>
+#ifdef HAVE_FNMATCH_H
+# include <fnmatch.h>
+# if !defined(FNM_CASEFOLD) && defined(FNM_IGNORECASE)
+# define FNM_CASEFOLD FNM_IGNORECASE
+# endif
+#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
@@ -29,10 +35,11 @@
#include "ntp_lists.h"
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
+#include "ntp_worker.h"
#include "ntp_request.h"
-#include "ntp.h"
-#include "ntp_unixtime.h"
#include "ntp_assert.h"
+#include "timevalops.h"
+#include "timespecops.h"
#include "ntpd-opts.h"
/* Don't include ISC's version of IPv6 variables and structures */
@@ -87,27 +94,38 @@ struct nic_rule_tag {
nic_rule *nic_rule_list;
-#if defined(SO_TIMESTAMP) && defined(SCM_TIMESTAMP)
-#if defined(CMSG_FIRSTHDR)
-#define HAVE_TIMESTAMP
-#define USE_TIMESTAMP_CMSG
-#ifndef TIMESTAMP_CTLMSGBUF_SIZE
-#define TIMESTAMP_CTLMSGBUF_SIZE 1536 /* moderate default */
-#endif
+#if defined(SO_BINTIME) && defined(SCM_BINTIME) && defined(CMSG_FIRSTHDR)
+# define HAVE_PACKET_TIMESTAMP
+# define HAVE_BINTIME
+# ifdef BINTIME_CTLMSGBUF_SIZE
+# define CMSG_BUFSIZE BINTIME_CTLMSGBUF_SIZE
+# else
+# define CMSG_BUFSIZE 1536 /* moderate default */
+# endif
+#elif defined(SO_TIMESTAMPNS) && defined(SCM_TIMESTAMPNS) && defined(CMSG_FIRSTHDR)
+# define HAVE_PACKET_TIMESTAMP
+# define HAVE_TIMESTAMPNS
+# ifdef TIMESTAMPNS_CTLMSGBUF_SIZE
+# define CMSG_BUFSIZE TIMESTAMPNS_CTLMSGBUF_SIZE
+# else
+# define CMSG_BUFSIZE 1536 /* moderate default */
+# endif
+#elif defined(SO_TIMESTAMP) && defined(SCM_TIMESTAMP) && defined(CMSG_FIRSTHDR)
+# define HAVE_PACKET_TIMESTAMP
+# define HAVE_TIMESTAMP
+# ifdef TIMESTAMP_CTLMSGBUF_SIZE
+# define CMSG_BUFSIZE TIMESTAMP_CTLMSGBUF_SIZE
+# else
+# define CMSG_BUFSIZE 1536 /* moderate default */
+# endif
#else
/* fill in for old/other timestamp interfaces */
#endif
-#endif
#if defined(SYS_WINNT)
-#include <transmitbuff.h>
+#include "win32_io.h"
#include <isc/win32os.h>
-/*
- * Windows C runtime ioctl() can't deal properly with sockets,
- * map to ioctlsocket for this source file.
- */
-#define ioctl(fd, opt, val) ioctlsocket((fd), (opt), (u_long *)(val))
-#endif /* SYS_WINNT */
+#endif
/*
* We do asynchronous input using the SIGIO facility. A number of
@@ -147,6 +165,7 @@ endpt * any6_interface; /* wildcard ipv6 interface */
endpt * loopback_interface; /* loopback ipv4 interface */
isc_boolean_t broadcast_client_enabled; /* is broadcast client enabled */
+u_int sys_ifnum; /* next .ifnum to assign */
int ninterfaces; /* Total number of interfaces */
int disable_dynamic_updates; /* scan interfaces once only */
@@ -159,21 +178,13 @@ int disable_dynamic_updates; /* scan interfaces once only */
static struct refclockio *refio;
#endif /* REFCLOCK */
-#if defined(HAVE_IPTOS_SUPPORT)
-/* set IP_TOS to minimize packet delay */
-# if defined(IPTOS_PREC_INTERNETCONTROL)
- unsigned int qos = IPTOS_PREC_INTERNETCONTROL;
-# else
- unsigned int qos = IPTOS_LOWDELAY;
-# endif
-#endif
-
/*
* File descriptor masks etc. for call to select
- * Not needed for I/O Completion Ports
+ * Not needed for I/O Completion Ports or anything outside this file
*/
-fd_set activefds;
-int maxactivefd;
+static fd_set activefds;
+static int maxactivefd;
+
/*
* bit alternating value to detect verified interfaces during an update cycle
*/
@@ -186,7 +197,6 @@ static int update_interfaces(u_short, interface_receiver_t,
static void remove_interface(endpt *);
static endpt * create_interface(u_short, endpt *);
-static int move_fd (SOCKET);
static int is_wildcard_addr (const sockaddr_u *);
/*
@@ -259,7 +269,9 @@ static SOCKET open_socket (sockaddr_u *, int, int, endpt *);
static char * fdbits (int, fd_set *);
static void set_reuseaddr (int);
static isc_boolean_t socket_broadcast_enable (struct interface *, SOCKET, sockaddr_u *);
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
static isc_boolean_t socket_broadcast_disable (struct interface *, sockaddr_u *);
+#endif
typedef struct remaddr remaddr_t;
@@ -277,6 +289,12 @@ endpt * mc6_list; /* IPv6 mcast-capable unicast endpts */
static endpt * wildipv4;
static endpt * wildipv6;
+#ifdef SYS_WINNT
+int accept_wildcard_if_for_winnt;
+#else
+const int accept_wildcard_if_for_winnt = FALSE;
+#endif
+
static void add_fd_to_list (SOCKET, enum desc_type);
static endpt * find_addr_in_list (sockaddr_u *);
static endpt * find_flagged_addr_in_list(sockaddr_u *, u_int32);
@@ -285,7 +303,6 @@ static void delete_interface_from_list(endpt *);
static void close_and_delete_fd_from_list(SOCKET);
static void add_addr_to_list (sockaddr_u *, endpt *);
static void create_wildcards (u_short);
-static endpt * getinterface (sockaddr_u *, u_int32);
static endpt * findlocalinterface (sockaddr_u *, int, int);
static endpt * findclosestinterface (sockaddr_u *, int);
#ifdef DEBUG
@@ -304,164 +321,54 @@ static int cmp_addr_distance(const sockaddr_u *,
* Routines to read the ntp packets
*/
#if !defined(HAVE_IO_COMPLETION_PORT)
-static inline int read_network_packet (SOCKET, struct interface *, l_fp);
-static inline int read_refclock_packet (SOCKET, struct refclockio *, l_fp);
+static inline int read_network_packet (SOCKET, struct interface *, l_fp);
+static void ntpd_addremove_io_fd (int, int, int);
+static input_handler_t input_handler;
+#ifdef REFCLOCK
+static inline int read_refclock_packet (SOCKET, struct refclockio *, l_fp);
+#endif
#endif
-#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.
- */
-void
-connection_reset_fix(
- SOCKET fd,
- sockaddr_u * addr
- )
-{
- DWORD dw;
- BOOL bNewBehavior = FALSE;
- DWORD status;
- /*
- * disable bad behavior using IOCTL: SIO_UDP_CONNRESET
- * NT 4.0 has no problem
- */
- if (isc_win32os_majorversion() >= 5) {
- status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
- sizeof(bNewBehavior), NULL, 0,
- &dw, NULL, NULL);
- if (SOCKET_ERROR == status)
- msyslog(LOG_ERR,
- "connection_reset_fix() failed for address %s: %m",
- stoa(addr));
- }
-}
-#endif
-
-/*
- * on Unix systems the stdio library typically
- * makes use of file descriptors in the lower
- * integer range. stdio usually will make use
- * of the file descriptors in the range of
- * [0..FOPEN_MAX)
- * in order to keep this range clean, for socket
- * file descriptors we attempt to move them above
- * FOPEN_MAX. This is not as easy as it sounds as
- * FOPEN_MAX changes from implementation to implementation
- * and may exceed to current file decriptor limits.
- * We are using following strategy:
- * - keep a current socket fd boundary initialized with
- * max(0, min(getdtablesize() - FD_CHUNK, FOPEN_MAX))
- * - attempt to move the descriptor to the boundary or
- * above.
- * - if that fails and boundary > 0 set boundary
- * to min(0, socket_fd_boundary - FD_CHUNK)
- * -> retry
- * if failure and boundary == 0 return old fd
- * - on success close old fd return new fd
- *
- * effects:
- * - fds will be moved above the socket fd boundary
- * if at all possible.
- * - the socket boundary will be reduced until
- * allocation is possible or 0 is reached - at this
- * point the algrithm will be disabled
- */
-static int
-move_fd(
- SOCKET fd
+#ifndef HAVE_IO_COMPLETION_PORT
+void
+maintain_activefds(
+ int fd,
+ int closing
)
{
-#if !defined(SYS_WINNT) && defined(F_DUPFD)
-#ifndef FD_CHUNK
-#define FD_CHUNK 10
-#endif
-/*
- * number of fds we would like to have for
- * stdio FILE* available.
- * we can pick a "low" number as our use of
- * FILE* is limited to log files and temporarily
- * to data and config files. Except for log files
- * we don't keep the other FILE* open beyond the
- * scope of the function that opened it.
- */
-#ifndef FD_PREFERRED_SOCKBOUNDARY
-#define FD_PREFERRED_SOCKBOUNDARY 48
-#endif
-
-#ifndef HAVE_GETDTABLESIZE
-/*
- * if we have no idea about the max fd value set up things
- * so we will start at FOPEN_MAX
- */
-#define getdtablesize() (FOPEN_MAX+FD_CHUNK)
-#endif
-
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20 /* assume that for the lack of anything better */
-#endif
- static SOCKET socket_boundary = -1;
- SOCKET newfd;
-
- NTP_REQUIRE((int)fd >= 0);
+ int i;
- /*
- * check whether boundary has be set up
- * already
- */
- if (socket_boundary == -1) {
- socket_boundary = max(0, min(getdtablesize() - FD_CHUNK,
- min(FOPEN_MAX, FD_PREFERRED_SOCKBOUNDARY)));
-#ifdef DEBUG
- msyslog(LOG_DEBUG,
- "ntp_io: estimated max descriptors: %d, initial socket boundary: %d",
- getdtablesize(), socket_boundary);
-#endif
+ if (fd < 0 || fd >= FD_SETSIZE) {
+ msyslog(LOG_ERR,
+ "Too many sockets in use, FD_SETSIZE %d exceeded by fd %d",
+ FD_SETSIZE, fd);
+ exit(1);
}
- /*
- * Leave a space for stdio to work in. potentially moving the
- * socket_boundary lower until allocation succeeds.
- */
- do {
- if (fd >= 0 && fd < socket_boundary) {
- /* inside reserved range: attempt to move fd */
- newfd = fcntl(fd, F_DUPFD, socket_boundary);
-
- if (newfd != -1) {
- /* success: drop the old one - return the new one */
- close(fd);
- return newfd;
- }
- } else {
- /* outside reserved range: no work - return the original one */
- return fd;
+ if (!closing) {
+ FD_SET(fd, &activefds);
+ maxactivefd = max(fd, maxactivefd);
+ } else {
+ FD_CLR(fd, &activefds);
+ if (maxactivefd && fd == maxactivefd) {
+ for (i = maxactivefd - 1; i >= 0; i--)
+ if (FD_ISSET(i, &activefds)) {
+ maxactivefd = i;
+ break;
+ }
+ NTP_INSIST(fd != maxactivefd);
}
- socket_boundary = max(0, socket_boundary - FD_CHUNK);
-#ifdef DEBUG
- msyslog(LOG_DEBUG,
- "ntp_io: selecting new socket boundary: %d",
- socket_boundary);
-#endif
- } while (socket_boundary > 0);
-#else
- NTP_REQUIRE((int)fd >= 0);
-#endif /* !defined(SYS_WINNT) && defined(F_DUPFD) */
- return fd;
+ }
}
+#endif /* !HAVE_IO_COMPLETION_PORT */
+
#ifdef DEBUG_TIMING
/*
* collect timing information for various processing
- * paths. currently we only pass then on to the file
+ * paths. currently we only pass them on to the file
* for later processing. this could also do histogram
* based analysis in other to reduce the load (and skew)
* dur to the file output
@@ -471,7 +378,7 @@ collect_timing(struct recvbuf *rb, const char *tag, int count, l_fp *dts)
{
char buf[256];
- snprintf(buf, sizeof(buf), "%s %d %s %s",
+ snprintf(buf, sizeof(buf), "%s %d %s %s",
(rb != NULL)
? ((rb->dstadr != NULL)
? stoa(&rb->recv_srcadr)
@@ -491,7 +398,7 @@ collect_timing(struct recvbuf *rb, const char *tag, int count, l_fp *dts)
* to bind to to the interface address on NTP_PORT so that
* all wild and specific bindings for NTP_PORT are taken by ntpd
* to avoid other daemons messing with the time or sockets.
- * - all interfaces keep a list of peers that are referencing
+ * - all interfaces keep a list of peers that are referencing
* the interface in order to quickly re-assign the peers to
* new interface in case an interface is deleted (=> gone from system or
* down)
@@ -515,31 +422,52 @@ collect_timing(struct recvbuf *rb, const char *tag, int count, l_fp *dts)
* but a list of interfaces that represent a unique address as determined by the kernel
* by the procedure in findlocalinterface. Thus it is perfectly legal to see only
* one representative of a group of real interfaces if they share the same address.
- *
+ *
* Frank Kardel 20050910
*/
/*
- * init_io - initialize I/O data structures and call socket creation routine
+ * init_io - initialize I/O module.
*/
void
init_io(void)
{
- /*
- * Init buffer free list and stat counters
- */
+ /* Init buffer free list and stat counters */
init_recvbuff(RECV_INIT);
+ /* update interface every 5 minutes as default */
+ interface_interval = 300;
+
+#ifdef WORK_PIPE
+ addremove_io_fd = &ntpd_addremove_io_fd;
+#endif
#ifdef SYS_WINNT
init_io_completion_port();
-#endif /* SYS_WINNT */
+#endif
#if defined(HAVE_SIGNALED_IO)
- (void) set_signal();
+ (void) set_signal(input_handler);
#endif
}
+static void
+ntpd_addremove_io_fd(
+ int fd,
+ int is_pipe,
+ int remove_it
+ )
+{
+ UNUSED_ARG(is_pipe);
+
+#ifdef HAVE_SIGNALED_IO
+ init_socket_sig(fd);
+#endif /* not HAVE_SIGNALED_IO */
+
+ maintain_activefds(fd, remove_it);
+}
+
+
/*
* io_open_sockets - call socket creation routine
*/
@@ -602,12 +530,13 @@ interface_dump(const endpt *itf)
static void
sockaddr_dump(const sockaddr_u *psau)
{
- /* Limit the size of the sockaddr_storage hex dump */
+ /* Limit the size of the sockaddr_in6 hex dump */
const int maxsize = min(32, sizeof(psau->sa6));
const u_char * cp;
int i;
- cp = (const void *)&psau->sa;
+ /* XXX: Should we limit maxsize based on psau->saX.sin_family? */
+ cp = (const void *)&psau->sa6;
for(i = 0; i < maxsize; i++) {
printf("%02x", *cp++);
@@ -638,7 +567,7 @@ print_interface(const endpt *iface, char *pfx, char *sfx)
printf(", mask=%s", stoa(&iface->mask));
}
printf(", %s:%s",
- (iface->ignore_packets)
+ (iface->ignore_packets)
? "Disabled"
: "Enabled",
sfx);
@@ -656,10 +585,9 @@ new_asyncio_reader(void)
{
struct asyncio_reader *reader;
- reader = emalloc(sizeof(*reader));
-
- memset(reader, 0, sizeof(*reader));
+ reader = emalloc_zero(sizeof(*reader));
reader->fd = INVALID_SOCKET;
+
return reader;
}
@@ -679,13 +607,13 @@ delete_asyncio_reader(
*/
static void
add_asyncio_reader(
- struct asyncio_reader * reader,
+ struct asyncio_reader * reader,
enum desc_type type)
{
LINK_SLIST(asyncio_reader_list, reader, link);
add_fd_to_list(reader->fd, type);
}
-
+
/*
* remove asynchio_reader
*/
@@ -719,14 +647,12 @@ addr_eqprefix(
isc_netaddr_t isc_b;
isc_sockaddr_t isc_sa;
- memset(&isc_sa, 0, sizeof(isc_sa));
- memcpy(&isc_sa.type.sa, &a->sa,
- min(sizeof(isc_sa.type), sizeof(*a)));
+ ZERO(isc_sa);
+ memcpy(&isc_sa.type, a, min(sizeof(isc_sa.type), sizeof(*a)));
isc_netaddr_fromsockaddr(&isc_a, &isc_sa);
- memset(&isc_sa, 0, sizeof(isc_sa));
- memcpy(&isc_sa.type.sa, &b->sa,
- min(sizeof(isc_sa.type), sizeof(*b)));
+ ZERO(isc_sa);
+ memcpy(&isc_sa.type, b, min(sizeof(isc_sa.type), sizeof(*b)));
isc_netaddr_fromsockaddr(&isc_b, &isc_sa);
return (int)isc_netaddr_eqprefix(&isc_a, &isc_b,
@@ -785,18 +711,21 @@ addr_samesubnet(
int
is_ip_address(
const char * host,
+ u_short af,
sockaddr_u * addr
)
{
struct in_addr in4;
- struct in6_addr in6;
+ struct addrinfo hints;
+ struct addrinfo *result;
+ struct sockaddr_in6 *resaddr6;
char tmpbuf[128];
char *pch;
NTP_REQUIRE(host != NULL);
NTP_REQUIRE(addr != NULL);
- memset(addr, 0, sizeof(*addr));
+ ZERO_SOCK(addr);
/*
* Try IPv4, then IPv6. In order to handle the extended format
@@ -807,30 +736,37 @@ is_ip_address(
* addresses (up to 46 bytes), the delimiter character and the
* terminating NULL character.
*/
- if (inet_pton(AF_INET, host, &in4) == 1) {
- AF(addr) = AF_INET;
- SET_ADDR4N(addr, in4.s_addr);
-
- return TRUE;
- } else if (sizeof(tmpbuf) > strlen(host)) {
- if ('[' == host[0]) {
- strncpy(tmpbuf, &host[1], sizeof(tmpbuf));
- pch = strchr(tmpbuf, ']');
- if (pch != NULL)
- *pch = '\0';
- } else
- strncpy(tmpbuf, host, sizeof(tmpbuf));
- pch = strchr(tmpbuf, '%');
- if (pch != NULL)
- *pch = '\0';
-
- if (inet_pton(AF_INET6, tmpbuf, &in6) == 1) {
- AF(addr) = AF_INET6;
- SET_ADDR6N(addr, in6);
+ if (AF_UNSPEC == af || AF_INET == af)
+ if (inet_pton(AF_INET, host, &in4) == 1) {
+ AF(addr) = AF_INET;
+ SET_ADDR4N(addr, in4.s_addr);
return TRUE;
}
- }
+
+ if (AF_UNSPEC == af || AF_INET6 == af)
+ if (sizeof(tmpbuf) > strlen(host)) {
+ if ('[' == host[0]) {
+ strlcpy(tmpbuf, &host[1], sizeof(tmpbuf));
+ pch = strchr(tmpbuf, ']');
+ if (pch != NULL)
+ *pch = '\0';
+ } else {
+ strlcpy(tmpbuf, host, sizeof(tmpbuf));
+ }
+ ZERO(hints);
+ hints.ai_family = AF_INET6;
+ hints.ai_flags |= AI_NUMERICHOST;
+ if (getaddrinfo(tmpbuf, NULL, &hints, &result) == 0) {
+ AF(addr) = AF_INET6;
+ resaddr6 = (struct sockaddr_in6 *)result->ai_addr;
+ SET_ADDR6N(addr, resaddr6->sin6_addr);
+ SET_SCOPE(addr, resaddr6->sin6_scope_id);
+
+ freeaddrinfo(result);
+ return TRUE;
+ }
+ }
/*
* If we got here it was not an IP address
*/
@@ -843,7 +779,7 @@ is_ip_address(
*/
void
interface_enumerate(
- interface_receiver_t receiver,
+ interface_receiver_t receiver,
void * data
)
{
@@ -862,7 +798,7 @@ init_interface(
endpt *ep
)
{
- memset(ep, 0, sizeof(*ep));
+ ZERO(*ep);
ep->fd = INVALID_SOCKET;
ep->bfd = INVALID_SOCKET;
ep->phase = sys_interphase;
@@ -879,7 +815,6 @@ new_interface(
struct interface *interface
)
{
- static u_int sys_ifnum = 0;
struct interface * iface;
iface = emalloc(sizeof(*iface));
@@ -931,12 +866,10 @@ add_interface(
int scan_privacy; /* see RFC 4941 */
int rc;
- /*
- * Calculate the address hash
- */
+ /* Calculate the refid */
ep->addr_refid = addr2refid(&ep->sin);
-
- LINK_SLIST(ep_list, ep, elink);
+ /* link at tail so ntpdc -c ifstats index increases each row */
+ LINK_TAIL_SLIST(ep_list, ep, elink, endpt);
ninterfaces++;
#ifdef MCAST
/* the rest is for enabled multicast-capable addresses only */
@@ -1004,7 +937,7 @@ add_interface(
(scan_local) ? " link/scope-local" : "",
(scan_univ_iid) ? " univ-IID" : "",
(scan_privacy) ? " privacy" : ""));
- if ((ep_local && !scan_local) || (same_subnet &&
+ if ((ep_local && !scan_local) || (same_subnet &&
((ep_privacy && !scan_privacy) ||
(!ep_univ_iid && scan_univ_iid)))) {
DPRINTF(4, ("did not add %s to %s of IPv6 multicast-capable list which already has %s\n",
@@ -1046,10 +979,14 @@ add_interface(
? "4"
: "6"));
+ if (INVALID_SOCKET == ep->fd)
+ return;
+
/*
* select the local address from which to send to multicast.
*/
switch (AF(&ep->sin)) {
+
case AF_INET :
rc = setsockopt(ep->fd, IPPROTO_IP,
IP_MULTICAST_IF,
@@ -1060,13 +997,15 @@ add_interface(
"setsockopt IP_MULTICAST_IF %s fails: %m",
stoa(&ep->sin));
break;
+
# ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
case AF_INET6 :
rc = setsockopt(ep->fd, IPPROTO_IPV6,
IPV6_MULTICAST_IF,
(void *)&ep->ifindex,
sizeof(ep->ifindex));
- if (rc)
+ /* do not complain if bound addr scope is ifindex */
+ if (rc && ep->ifindex != SCOPE(&ep->sin))
msyslog(LOG_ERR,
"setsockopt IPV6_MULTICAST_IF %u for %s fails: %m",
ep->ifindex, stoa(&ep->sin));
@@ -1106,7 +1045,7 @@ remove_interface(
: "6"));
}
delete_interface_from_list(ep);
-
+
if (ep->fd != INVALID_SOCKET) {
msyslog(LOG_INFO,
"Deleting interface #%d %s, %s#%d, interface stats: received=%ld, sent=%ld, dropped=%ld, active_time=%ld secs",
@@ -1119,23 +1058,25 @@ remove_interface(
ep->notsent,
current_time - ep->starttime);
close_and_delete_fd_from_list(ep->fd);
+ ep->fd = INVALID_SOCKET;
}
if (ep->bfd != INVALID_SOCKET) {
msyslog(LOG_INFO,
- "Deleting broadcast address %s#%d from interface #%d %s",
- stoa(&ep->bcast), SRCPORT(&ep->bcast),
- ep->ifnum, ep->name);
+ "stop listening for broadcasts to %s on interface #%d %s",
+ stoa(&ep->bcast), ep->ifnum, ep->name);
close_and_delete_fd_from_list(ep->bfd);
+ ep->bfd = INVALID_SOCKET;
+ ep->flags &= ~INT_BCASTOPEN;
}
ninterfaces--;
- ntp_monclearinterface(ep);
+ mon_clearinterface(ep);
/* remove restrict interface entry */
SET_HOSTMASK(&resmask, AF(&ep->sin));
hack_restrict(RESTRICT_REMOVEIF, &ep->sin, &resmask,
- RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE);
+ RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
}
@@ -1144,14 +1085,13 @@ log_listen_address(
endpt * ep
)
{
- msyslog(LOG_INFO, "%s on %d %s %s UDP %d",
- (ep->ignore_packets)
+ msyslog(LOG_INFO, "%s on %d %s %s",
+ (ep->ignore_packets)
? "Listen and drop"
: "Listen normally",
ep->ifnum,
ep->name,
- stoa(&ep->sin),
- SRCPORT(&ep->sin));
+ sptoa(&ep->sin));
}
@@ -1160,7 +1100,10 @@ create_wildcards(
u_short port
)
{
- int v4wild, v6wild;
+ int v4wild;
+#ifdef INCLUDE_IPV6_SUPPORT
+ int v6wild;
+#endif
sockaddr_u wildaddr;
nic_rule_action action;
struct interface * wildif;
@@ -1172,93 +1115,94 @@ create_wildcards(
* the first if (v4wild).
*/
action = ACTION_LISTEN;
- memset(&wildaddr, 0, sizeof(wildaddr));
-
+ ZERO(wildaddr);
+
+#ifdef INCLUDE_IPV6_SUPPORT
/*
- * create pseudo-interface with wildcard IPv4 address
+ * create pseudo-interface with wildcard IPv6 address
*/
- v4wild = ipv4_works;
- if (v4wild) {
- /* set wildaddr to the v4 wildcard address 0.0.0.0 */
- AF(&wildaddr) = AF_INET;
- SET_ADDR4(&wildaddr, INADDR_ANY);
+ v6wild = ipv6_works;
+ if (v6wild) {
+ /* set wildaddr to the v6 wildcard address :: */
+ ZERO(wildaddr);
+ AF(&wildaddr) = AF_INET6;
+ SET_ADDR6N(&wildaddr, in6addr_any);
SET_PORT(&wildaddr, port);
+ SET_SCOPE(&wildaddr, 0);
/* check for interface/nic rules affecting the wildcard */
action = interface_action(NULL, &wildaddr, 0);
- v4wild = (ACTION_IGNORE != action);
+ v6wild = (ACTION_IGNORE != action);
}
- if (v4wild) {
+ if (v6wild) {
wildif = new_interface(NULL);
- strncpy(wildif->name, "v4wildcard", sizeof(wildif->name));
+ strlcpy(wildif->name, "v6wildcard", sizeof(wildif->name));
memcpy(&wildif->sin, &wildaddr, sizeof(wildif->sin));
- wildif->family = AF_INET;
- AF(&wildif->mask) = AF_INET;
+ wildif->family = AF_INET6;
+ AF(&wildif->mask) = AF_INET6;
SET_ONESMASK(&wildif->mask);
- wildif->flags = INT_BROADCAST | INT_UP | INT_WILDCARD;
+ wildif->flags = INT_UP | INT_WILDCARD;
wildif->ignore_packets = (ACTION_DROP == action);
-#if defined(MCAST)
- /*
- * enable multicast reception on the broadcast socket
- */
- AF(&wildif->bcast) = AF_INET;
- SET_ADDR4(&wildif->bcast, INADDR_ANY);
- SET_PORT(&wildif->bcast, port);
-#endif /* MCAST */
+
wildif->fd = open_socket(&wildif->sin, 0, 1, wildif);
if (wildif->fd != INVALID_SOCKET) {
- wildipv4 = wildif;
- any_interface = wildif;
-
+ wildipv6 = wildif;
+ any6_interface = wildif;
add_addr_to_list(&wildif->sin, wildif);
add_interface(wildif);
log_listen_address(wildif);
} else {
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"unable to bind to wildcard address %s - another process may be running - EXITING",
stoa(&wildif->sin));
exit(1);
}
DPRINT_INTERFACE(2, (wildif, "created ", "\n"));
}
+#endif
-#ifdef INCLUDE_IPV6_SUPPORT
/*
- * create pseudo-interface with wildcard IPv6 address
+ * create pseudo-interface with wildcard IPv4 address
*/
- v6wild = ipv6_works;
- if (v6wild) {
- /* set wildaddr to the v6 wildcard address :: */
- memset(&wildaddr, 0, sizeof(wildaddr));
- AF(&wildaddr) = AF_INET6;
- SET_ADDR6N(&wildaddr, in6addr_any);
+ v4wild = ipv4_works;
+ if (v4wild) {
+ /* set wildaddr to the v4 wildcard address 0.0.0.0 */
+ AF(&wildaddr) = AF_INET;
+ SET_ADDR4N(&wildaddr, INADDR_ANY);
SET_PORT(&wildaddr, port);
- SET_SCOPE(&wildaddr, 0);
/* check for interface/nic rules affecting the wildcard */
action = interface_action(NULL, &wildaddr, 0);
- v6wild = (ACTION_IGNORE != action);
+ v4wild = (ACTION_IGNORE != action);
}
- if (v6wild) {
+ if (v4wild) {
wildif = new_interface(NULL);
- strncpy(wildif->name, "v6wildcard", sizeof(wildif->name));
+ strlcpy(wildif->name, "v4wildcard", sizeof(wildif->name));
memcpy(&wildif->sin, &wildaddr, sizeof(wildif->sin));
- wildif->family = AF_INET6;
- AF(&wildif->mask) = AF_INET6;
+ wildif->family = AF_INET;
+ AF(&wildif->mask) = AF_INET;
SET_ONESMASK(&wildif->mask);
- wildif->flags = INT_UP | INT_WILDCARD;
+ wildif->flags = INT_BROADCAST | INT_UP | INT_WILDCARD;
wildif->ignore_packets = (ACTION_DROP == action);
-
+#if defined(MCAST)
+ /*
+ * enable multicast reception on the broadcast socket
+ */
+ AF(&wildif->bcast) = AF_INET;
+ SET_ADDR4N(&wildif->bcast, INADDR_ANY);
+ SET_PORT(&wildif->bcast, port);
+#endif /* MCAST */
wildif->fd = open_socket(&wildif->sin, 0, 1, wildif);
if (wildif->fd != INVALID_SOCKET) {
- wildipv6 = wildif;
- any6_interface = wildif;
+ wildipv4 = wildif;
+ any_interface = wildif;
+
add_addr_to_list(&wildif->sin, wildif);
add_interface(wildif);
log_listen_address(wildif);
@@ -1270,7 +1214,6 @@ create_wildcards(
}
DPRINT_INTERFACE(2, (wildif, "created ", "\n"));
}
-#endif
}
@@ -1288,19 +1231,18 @@ add_nic_rule(
nic_rule * rule;
isc_boolean_t is_ip;
- rule = emalloc(sizeof(*rule));
- memset(rule, 0, sizeof(*rule));
+ rule = emalloc_zero(sizeof(*rule));
rule->match_type = match_type;
rule->prefixlen = prefixlen;
rule->action = action;
-
+
if (MATCH_IFNAME == match_type) {
NTP_REQUIRE(NULL != if_name);
rule->if_name = estrdup(if_name);
} else if (MATCH_IFADDR == match_type) {
NTP_REQUIRE(NULL != if_name);
/* set rule->addr */
- is_ip = is_ip_address(if_name, &rule->addr);
+ is_ip = is_ip_address(if_name, AF_UNSPEC, &rule->addr);
NTP_REQUIRE(is_ip);
} else
NTP_REQUIRE(NULL == if_name);
@@ -1355,26 +1297,11 @@ interface_action(
int isloopback;
int iswildcard;
- DPRINTF(4, ("interface_action: %s %s ",
- (if_name != NULL)
- ? if_name
- : "wildcard",
- stoa(if_addr)));
+ DPRINTF(4, ("interface_action: interface %s ",
+ (if_name != NULL) ? if_name : "wildcard"));
iswildcard = is_wildcard_addr(if_addr);
-
- /*
- * Always listen on 127.0.0.1 - required by ntp_intres
- */
- if (INT_LOOPBACK & if_flags) {
- isloopback = TRUE;
- if (IS_IPV4(if_addr)) {
- DPRINTF(4, ("IPv4 loopback - listen\n"));
- return ACTION_LISTEN;
- }
- } else {
- isloopback = FALSE;
- }
+ isloopback = !!(INT_LOOPBACK & if_flags);
/*
* Find any matching NIC rule from --interface / -I or ntp.conf
@@ -1436,7 +1363,12 @@ interface_action(
case MATCH_IFNAME:
if (if_name != NULL
- && !strcasecmp(if_name, rule->if_name)) {
+#if defined(HAVE_FNMATCH) && defined(FNM_CASEFOLD)
+ && !fnmatch(rule->if_name, if_name, FNM_CASEFOLD)
+#else
+ && !strcasecmp(if_name, rule->if_name)
+#endif
+ ) {
DPRINTF(4, ("interface name match - %s\n",
action_text(rule->action)));
@@ -1508,8 +1440,7 @@ convert_isc_if(
const u_char v6loop[16] = {0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1};
- strncpy(itf->name, isc_if->name, sizeof(itf->name));
- itf->name[sizeof(itf->name) - 1] = 0; /* strncpy may not */
+ strlcpy(itf->name, isc_if->name, sizeof(itf->name));
itf->ifindex = isc_if->ifindex;
itf->family = (u_short)isc_if->af;
AF(&itf->sin) = itf->family;
@@ -1525,7 +1456,7 @@ convert_isc_if(
if (isc_if->flags & INTERFACE_F_BROADCAST) {
itf->flags |= INT_BROADCAST;
- NSRCADR(&itf->bcast) =
+ NSRCADR(&itf->bcast) =
isc_if->broadcast.type.in.s_addr;
}
}
@@ -1544,11 +1475,11 @@ convert_isc_if(
itf->flags |=
((INTERFACE_F_UP & isc_if->flags)
? INT_UP : 0)
- | ((INTERFACE_F_LOOPBACK & isc_if->flags)
+ | ((INTERFACE_F_LOOPBACK & isc_if->flags)
? INT_LOOPBACK : 0)
- | ((INTERFACE_F_POINTTOPOINT & isc_if->flags)
+ | ((INTERFACE_F_POINTTOPOINT & isc_if->flags)
? INT_PPP : 0)
- | ((INTERFACE_F_MULTICAST & isc_if->flags)
+ | ((INTERFACE_F_MULTICAST & isc_if->flags)
? INT_MULTICAST : 0)
| ((INTERFACE_F_PRIVACY & isc_if->flags)
? INT_PRIVACY : 0)
@@ -1587,11 +1518,20 @@ refresh_interface(
{
#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
if (interface->fd != INVALID_SOCKET) {
+ int bcast = (interface->flags & INT_BCASTXMIT) != 0;
+ /* as we forcibly close() the socket remove the
+ broadcast permission indication */
+ if (bcast)
+ socket_broadcast_disable(interface, &interface->sin);
+
close_and_delete_fd_from_list(interface->fd);
+
+ /* create new socket picking up a new first hop binding
+ at connect() time */
interface->fd = open_socket(&interface->sin,
- 0, 0, interface);
+ bcast, 0, interface);
/*
- * reset TTL indication so TTL is is set again
+ * reset TTL indication so TTL is is set again
* next time around
*/
interface->last_ttl = 0;
@@ -1626,14 +1566,7 @@ interface_update(
#ifdef DEBUG
msyslog(LOG_DEBUG, "new interface(s) found: waking up resolver");
#endif
-#ifdef SYS_WINNT
- /* wake up the resolver thread */
- if (ResolverEventHandle != NULL)
- SetEvent(ResolverEventHandle);
-#else
- /* write any single byte to the pipe to wake up the resolver process */
- write( resolver_pipe_fd[1], &new_interface_found, 1 );
-#endif
+ interrupt_worker_sleep();
}
@@ -1647,7 +1580,7 @@ sau_from_netaddr(
const isc_netaddr_t *pna
)
{
- memset(psau, 0, sizeof(*psau));
+ ZERO_SOCK(psau);
AF(psau) = (u_short)pna->family;
switch (pna->family) {
@@ -1705,7 +1638,7 @@ set_wildcard_reuse(
"set_wildcard_reuse: setsockopt(SO_REUSEADDR, %s) failed: %m",
on ? "on" : "off");
- DPRINTF(4, ("set SO_REUSEADDR to %s on %s\n",
+ DPRINTF(4, ("set SO_REUSEADDR to %s on %s\n",
on ? "on" : "off",
stoa(&any->sin)));
}
@@ -1729,9 +1662,9 @@ is_anycast(
return ISC_FALSE;
if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
return ISC_FALSE;
- memset(&ifr6, 0, sizeof(ifr6));
+ ZERO(ifr6);
memcpy(&ifr6.ifr_addr, &psau->sa6, sizeof(ifr6.ifr_addr));
- strncpy(ifr6.ifr_name, name, sizeof(ifr6.ifr_name));
+ strlcpy(ifr6.ifr_name, name, sizeof(ifr6.ifr_name));
if (ioctl(fd, SIOCGIFAFLAG_IN6, &ifr6) < 0) {
close(fd);
return ISC_FALSE;
@@ -1783,7 +1716,6 @@ update_interfaces(
isc_result_t result;
isc_interface_t isc_if;
int new_interface_found;
- int refresh_peers;
unsigned int family;
endpt enumep;
endpt * ep;
@@ -1798,19 +1730,18 @@ update_interfaces(
*/
new_interface_found = FALSE;
- refresh_peers = FALSE;
iter = NULL;
result = isc_interfaceiter_create(mctx, &iter);
if (result != ISC_R_SUCCESS)
return 0;
- /*
+ /*
* Toggle system interface scan phase to find untouched
* interfaces to be deleted.
*/
sys_interphase ^= 0x1;
-
+
for (result = isc_interfaceiter_first(iter);
ISC_R_SUCCESS == result;
result = isc_interfaceiter_next(iter)) {
@@ -1834,26 +1765,32 @@ update_interfaces(
convert_isc_if(&isc_if, &enumep, port);
- /*
+ DPRINT_INTERFACE(4, (&enumep, "examining ", "\n"));
+
+ /*
* Check if and how we are going to use the interface.
*/
switch (interface_action(enumep.name, &enumep.sin,
enumep.flags)) {
case ACTION_IGNORE:
+ DPRINTF(4, ("ignoring interface %s (%s) - by nic rules\n",
+ enumep.name, stoa(&enumep.sin)));
continue;
case ACTION_LISTEN:
+ DPRINTF(4, ("listen interface %s (%s) - by nic rules\n",
+ enumep.name, stoa(&enumep.sin)));
enumep.ignore_packets = ISC_FALSE;
break;
case ACTION_DROP:
+ DPRINTF(4, ("drop on interface %s (%s) - by nic rules\n",
+ enumep.name, stoa(&enumep.sin)));
enumep.ignore_packets = ISC_TRUE;
break;
}
- DPRINT_INTERFACE(4, (&enumep, "examining ", "\n"));
-
/* interfaces must be UP to be usable */
if (!(enumep.flags & INT_UP)) {
DPRINTF(4, ("skipping interface %s (%s) - DOWN\n",
@@ -1879,7 +1816,7 @@ update_interfaces(
* (interface name, ip-address).
*/
ep = getinterface(&enumep.sin, INT_WILDCARD);
-
+
if (ep != NULL && refresh_interface(ep)) {
/*
* found existing and up to date interface -
@@ -1894,24 +1831,17 @@ update_interfaces(
* new prototype to respect any runtime
* changes to the nic rules.
*/
- strncpy(ep->name, enumep.name,
+ strlcpy(ep->name, enumep.name,
sizeof(ep->name));
- if (ep->ignore_packets !=
- enumep.ignore_packets) {
- ep->ignore_packets =
+ ep->ignore_packets =
enumep.ignore_packets;
- refresh_peers = TRUE;
- DPRINTF(4, ("refreshing peers due to %s ignore_packets change to %d\n",
- stoa(&ep->sin),
- ep->ignore_packets));
- }
} else {
/* name collision - rename interface */
- strncpy(ep->name, "*multiple*",
+ strlcpy(ep->name, "*multiple*",
sizeof(ep->name));
}
- DPRINT_INTERFACE(4, (ep, "updating ",
+ DPRINT_INTERFACE(4, (ep, "updating ",
" present\n"));
if (ep->ignore_packets !=
@@ -1920,7 +1850,7 @@ update_interfaces(
* We have conflicting configurations
* for the interface address. This is
* caused by using -I <interfacename>
- * for an interface that shares its
+ * for an interface that shares its
* address with other interfaces. We
* can not disambiguate incoming
* packets delivered to this socket
@@ -1942,7 +1872,7 @@ update_interfaces(
enumep.name, ep->name,
stoa(&enumep.sin));
- ep->ignore_packets = ISC_TRUE;
+ ep->ignore_packets = ISC_TRUE;
}
ep->phase = sys_interphase;
@@ -1969,19 +1899,16 @@ update_interfaces(
(*receiver)(data, &ifi);
new_interface_found = TRUE;
- refresh_peers = TRUE;
- DPRINTF(4, ("refreshing peers due to new addr %s\n",
- stoa(&ep->sin)));
DPRINT_INTERFACE(3,
(ep, "updating ",
" new - created\n"));
} else {
- DPRINT_INTERFACE(3,
+ DPRINT_INTERFACE(3,
(&enumep, "updating ",
" new - creation FAILED"));
-
+
msyslog(LOG_INFO,
- "failed to init interface for address %s",
+ "failed to init interface for address %s",
stoa(&enumep.sin));
continue;
}
@@ -1996,7 +1923,7 @@ update_interfaces(
*/
for (ep = ep_list; ep != NULL; ep = next_ep) {
next_ep = ep->elink;
-
+
/*
* if phase does not match sys_phase this interface was
* not enumerated during the last interface scan - so it
@@ -2011,9 +1938,6 @@ update_interfaces(
DPRINT_INTERFACE(3, (ep, "updating ",
"GONE - deleting\n"));
remove_interface(ep);
- refresh_peers = TRUE;
- DPRINTF(4, ("refreshing peers due to deleted addr %s",
- stoa(&ep->sin)));
ifi.action = IFS_DELETED;
ifi.ep = ep;
@@ -2025,7 +1949,7 @@ update_interfaces(
set_peerdstadr(ep->peers, NULL);
/*
- * update globals in case we lose
+ * update globals in case we lose
* a loopback interface
*/
if (ep == loopback_interface)
@@ -2035,12 +1959,15 @@ update_interfaces(
}
/*
- * phase 3 - re-configure as the world has changed if necessary
+ * phase 3 - re-configure as the world has possibly changed
+ *
+ * never ever make this conditional again - it is needed to track
+ * routing updates. see bug #2506
*/
- if (refresh_peers) {
- refresh_all_peerinterfaces();
- msyslog(LOG_INFO, "peers refreshed");
- }
+ refresh_all_peerinterfaces();
+
+ if (broadcast_client_enabled)
+ io_setbclient();
return new_interface_found;
}
@@ -2068,7 +1995,7 @@ create_sockets(
create_wildcards(port);
update_interfaces(port, NULL, NULL);
-
+
/*
* Now that we have opened all the sockets, turn off the reuse
* flag for security.
@@ -2101,7 +2028,7 @@ create_interface(
/* build an interface */
iface = new_interface(protot);
-
+
/*
* create socket
*/
@@ -2125,14 +2052,14 @@ create_interface(
delete_interface(iface);
return NULL;
}
-
+
/*
* Blacklist our own addresses, no use talking to ourself
*/
SET_HOSTMASK(&resmask, AF(&iface->sin));
hack_restrict(RESTRICT_FLAGS, &iface->sin, &resmask,
- RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE);
-
+ RESM_NTPONLY | RESM_INTERFACE, RES_IGNORE, 0);
+
/*
* set globals with the first found
* loopback interface of the appropriate class
@@ -2163,7 +2090,7 @@ create_interface(
continue;
if (socket_multicast_enable(iface,
&entry->addr))
- msyslog(LOG_INFO,
+ msyslog(LOG_INFO,
"Joined %s socket to multicast group %s",
stoa(&iface->sin),
stoa(&entry->addr));
@@ -2203,7 +2130,7 @@ set_excladdruse(
/*
* Prior to Windows XP setting SO_EXCLUSIVEADDRUSE can fail with
* error WSAINVAL depending on service pack level and whether
- * the user account is in the Administrators group. Do not
+ * the user account is in the Administrators group. Do not
* complain if it fails that way on versions prior to XP (5.1).
*/
err = GetLastError();
@@ -2214,7 +2141,7 @@ set_excladdruse(
SetLastError(err);
#endif
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"setsockopt(%d, SO_EXCLUSIVEADDRUSE, on): %m",
(int)fd);
}
@@ -2237,7 +2164,7 @@ set_reuseaddr(
for (ep = ep_list; ep != NULL; ep = ep->elink) {
if (ep->flags & INT_WILDCARD)
continue;
-
+
/*
* if ep->fd is INVALID_SOCKET, we might have a adapter
* configured but not present
@@ -2245,7 +2172,7 @@ set_reuseaddr(
DPRINTF(4, ("setting SO_REUSEADDR on %.16s@%s to %s\n",
ep->name, stoa(&ep->sin),
flag ? "on" : "off"));
-
+
if (ep->fd != INVALID_SOCKET) {
if (setsockopt(ep->fd, SOL_SOCKET, SO_REUSEADDR,
(char *)&flag, sizeof(flag))) {
@@ -2263,25 +2190,25 @@ set_reuseaddr(
*/
void
enable_broadcast(
- struct interface * iface,
+ struct interface * iface,
sockaddr_u * baddr
)
{
-#ifdef OPEN_BCAST_SOCKET
+#ifdef OPEN_BCAST_SOCKET
socket_broadcast_enable(iface, iface->fd, baddr);
#endif
}
-#ifdef OPEN_BCAST_SOCKET
+#ifdef OPEN_BCAST_SOCKET
/*
* Enable a broadcast address to a given socket
- * The socket is in the inter_list all we need to do is enable
+ * The socket is in the ep_list all we need to do is enable
* broadcasting. It is not this function's job to select the socket
*/
static isc_boolean_t
socket_broadcast_enable(
- struct interface * iface,
- SOCKET fd,
+ struct interface * iface,
+ SOCKET fd,
sockaddr_u * baddr
)
{
@@ -2299,22 +2226,22 @@ socket_broadcast_enable(
DPRINTF(2, ("Broadcast enabled on socket %d for address %s\n",
fd, stoa(baddr)));
}
- iface->flags |= INT_BCASTOPEN;
- broadcast_client_enabled = ISC_TRUE;
+ iface->flags |= INT_BCASTXMIT;
return ISC_TRUE;
#else
return ISC_FALSE;
#endif /* SO_BROADCAST */
}
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
/*
* Remove a broadcast address from a given socket
- * The socket is in the inter_list all we need to do is disable
+ * The socket is in the ep_list all we need to do is disable
* broadcasting. It is not this function's job to select the socket
*/
static isc_boolean_t
socket_broadcast_disable(
- struct interface * iface,
+ struct interface * iface,
sockaddr_u * baddr
)
{
@@ -2327,13 +2254,13 @@ socket_broadcast_disable(
"setsockopt(SO_BROADCAST) disable failure on address %s: %m",
stoa(baddr));
- iface->flags &= ~INT_BCASTOPEN;
- broadcast_client_enabled = ISC_FALSE;
+ iface->flags &= ~INT_BCASTXMIT;
return ISC_TRUE;
#else
return ISC_FALSE;
#endif /* SO_BROADCAST */
}
+#endif /* OS_MISSES_SPECIFIC_ROUTE_UPDATES */
#endif /* OPEN_BCAST_SOCKET */
@@ -2384,7 +2311,12 @@ enable_multicast_if(
)
{
#ifdef MCAST
+#ifdef IP_MULTICAST_LOOP
TYPEOF_IP_MULTICAST_LOOP off = 0;
+#endif
+#ifdef IPV6_MULTICAST_LOOP
+ u_int off6 = 0;
+#endif
NTP_REQUIRE(AF(maddr) == AF(&iface->sin));
@@ -2402,7 +2334,7 @@ enable_multicast_if(
msyslog(LOG_ERR,
"setsockopt IP_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s",
- iface->fd, stoa(&iface->sin),
+ iface->fd, stoa(&iface->sin),
stoa(maddr));
}
#endif
@@ -2416,10 +2348,10 @@ enable_multicast_if(
*/
if (setsockopt(iface->fd, IPPROTO_IPV6,
IPV6_MULTICAST_LOOP,
- (char *) &off, sizeof(off))) {
+ (char *) &off6, sizeof(off6))) {
msyslog(LOG_ERR,
- "setsockopt IP_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s",
+ "setsockopt IPV6_MULTICAST_LOOP failed: %m on socket %d, addr %s for multicast address %s",
iface->fd, stoa(&iface->sin),
stoa(maddr));
}
@@ -2435,7 +2367,7 @@ enable_multicast_if(
/*
* Add a multicast address to a given socket
- * The socket is in the inter_list all we need to do is enable
+ * The socket is in the ep_list all we need to do is enable
* multicasting. It is not this function's job to select the socket
*/
#if defined(MCAST)
@@ -2452,13 +2384,13 @@ socket_multicast_enable(
switch (AF(maddr)) {
case AF_INET:
- memset(&mreq, 0, sizeof(mreq));
+ ZERO(mreq);
mreq.imr_multiaddr = SOCK_ADDR4(maddr);
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
if (setsockopt(iface->fd,
IPPROTO_IP,
IP_ADD_MEMBERSHIP,
- (char *)&mreq,
+ (char *)&mreq,
sizeof(mreq))) {
msyslog(LOG_ERR,
"setsockopt IP_ADD_MEMBERSHIP failed: %m on socket %d, addr %s for %x / %x (%s)",
@@ -2483,12 +2415,12 @@ socket_multicast_enable(
* for other types of multicast addresses. For now let
* the kernel figure it out.
*/
- memset(&mreq6, 0, sizeof(mreq6));
+ ZERO(mreq6);
mreq6.ipv6mr_multiaddr = SOCK_ADDR6(maddr);
mreq6.ipv6mr_interface = iface->ifindex;
if (setsockopt(iface->fd, IPPROTO_IPV6,
- IPV6_JOIN_GROUP, (char *)&mreq6,
+ IPV6_JOIN_GROUP, (char *)&mreq6,
sizeof(mreq6))) {
msyslog(LOG_ERR,
"setsockopt IPV6_JOIN_GROUP failed: %m on socket %d, addr %s for interface %u (%s)",
@@ -2513,7 +2445,7 @@ socket_multicast_enable(
/*
* Remove a multicast address from a given socket
- * The socket is in the inter_list all we need to do is disable
+ * The socket is in the ep_list all we need to do is disable
* multicasting. It is not this function's job to select the socket
*/
#ifdef MCAST
@@ -2528,10 +2460,10 @@ socket_multicast_disable(
#endif
struct ip_mreq mreq;
- memset(&mreq, 0, sizeof(mreq));
+ ZERO(mreq);
if (find_addr_in_list(maddr) == NULL) {
- DPRINTF(4, ("socket_multicast_disable(%s): not found\n",
+ DPRINTF(4, ("socket_multicast_disable(%s): not found\n",
stoa(maddr)));
return ISC_TRUE;
}
@@ -2595,11 +2527,9 @@ socket_multicast_disable(
void
io_setbclient(void)
{
-#ifdef OPEN_BCAST_SOCKET
+#ifdef OPEN_BCAST_SOCKET
struct interface * interf;
int nif;
- isc_boolean_t jstatus;
- SOCKET fd;
nif = 0;
set_reuseaddr(1);
@@ -2610,12 +2540,11 @@ io_setbclient(void)
if (interf->flags & (INT_WILDCARD | INT_LOOPBACK))
continue;
-
+
/* use only allowed addresses */
if (interf->ignore_packets)
continue;
-
/* Need a broadcast-capable interface */
if (!(interf->flags & INT_BROADCAST))
continue;
@@ -2625,9 +2554,9 @@ io_setbclient(void)
/* Do we already have the broadcast address open? */
if (interf->flags & INT_BCASTOPEN) {
- /*
+ /*
* account for already open interfaces to avoid
- * misleading warning below
+ * misleading warning below
*/
nif++;
continue;
@@ -2644,29 +2573,30 @@ io_setbclient(void)
* broadcast on the interface address
*/
if (interf->bfd != INVALID_SOCKET) {
- fd = interf->bfd;
- jstatus = ISC_TRUE;
- } else {
- fd = interf->fd;
- jstatus = socket_broadcast_enable(interf, fd,
- &interf->sin);
- }
-
- /* Enable Broadcast on socket */
- if (jstatus) {
nif++;
+ interf->flags |= INT_BCASTOPEN;
msyslog(LOG_INFO,
- "io_setbclient: Opened broadcast client on interface #%d %s",
- interf->ifnum, interf->name);
- interf->addr_refid = addr2refid(&interf->sin);
+ "Listen for broadcasts to %s on interface #%d %s",
+ stoa(&interf->bcast), interf->ifnum, interf->name);
+ } else {
+ /* silently ignore EADDRINUSE as we probably opened
+ the socket already for an address in the same network */
+ if (errno != EADDRINUSE)
+ msyslog(LOG_INFO,
+ "failed to listen for broadcasts to %s on interface #%d %s",
+ stoa(&interf->bcast), interf->ifnum, interf->name);
}
}
set_reuseaddr(0);
- if (nif > 0)
- DPRINTF(1, ("io_setbclient: Opened broadcast clients\n"));
- else if (!nif)
+ if (nif > 0) {
+ broadcast_client_enabled = ISC_TRUE;
+ DPRINTF(1, ("io_setbclient: listening to %d broadcast addresses\n", nif));
+ }
+ else if (!nif) {
+ broadcast_client_enabled = ISC_FALSE;
msyslog(LOG_ERR,
"Unable to listen for broadcasts, no broadcast interfaces available");
+ }
#else
msyslog(LOG_ERR,
"io_setbclient: Broadcast Client disabled by build");
@@ -2686,8 +2616,18 @@ io_unsetbclient(void)
continue;
if (!(INT_BCASTOPEN & ep->flags))
continue;
- socket_broadcast_disable(ep, &ep->sin);
+
+ if (ep->bfd != INVALID_SOCKET) {
+ /* destroy broadcast listening socket */
+ msyslog(LOG_INFO,
+ "stop listening for broadcasts to %s on interface #%d %s",
+ stoa(&ep->bcast), ep->ifnum, ep->name);
+ close_and_delete_fd_from_list(ep->bfd);
+ ep->bfd = INVALID_SOCKET;
+ ep->flags &= ~INT_BCASTOPEN;
+ }
}
+ broadcast_client_enabled = ISC_FALSE;
}
/*
@@ -2710,7 +2650,7 @@ io_multicast_add(
/* If we already have it we can just return */
if (NULL != find_flagged_addr_in_list(addr, INT_MCASTOPEN)) {
- msyslog(LOG_INFO,
+ msyslog(LOG_INFO,
"Duplicate request found for multicast address %s",
stoa(addr));
return;
@@ -2718,7 +2658,7 @@ io_multicast_add(
#ifndef MULTICAST_NONEWSOCKET
ep = new_interface(NULL);
-
+
/*
* Open a new socket for the multicast address
*/
@@ -2734,8 +2674,8 @@ io_multicast_add(
if (ep->fd != INVALID_SOCKET) {
ep->ignore_packets = ISC_FALSE;
ep->flags |= INT_MCASTIF;
-
- strncpy(ep->name, "multicast", sizeof(ep->name));
+
+ strlcpy(ep->name, "multicast", sizeof(ep->name));
DPRINT_INTERFACE(2, (ep, "multicast add ", "\n"));
add_interface(ep);
log_listen_address(ep);
@@ -2783,7 +2723,7 @@ io_multicast_add(
one_ep = ep;
#endif /* MULTICAST_NONEWSOCKET */
if (socket_multicast_enable(ep, addr))
- msyslog(LOG_INFO,
+ msyslog(LOG_INFO,
"Joined %s socket to multicast group %s",
stoa(&ep->sin),
stoa(addr));
@@ -2842,66 +2782,6 @@ io_multicast_del(
/*
- * init_nonblocking_io() - set up descriptor to be non blocking
- */
-static void init_nonblocking_io(
- SOCKET 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) {
- msyslog(LOG_ERR,
- "fcntl(O_NONBLOCK) fails on fd #%d: %m", fd);
- exit(1);
- }
-#elif defined(FNDELAY)
- if (fcntl(fd, F_SETFL, FNDELAY) < 0) {
- msyslog(LOG_ERR, "fcntl(FNDELAY) fails on fd #%d: %m",
- fd);
- exit(1);
- }
-#elif defined(O_NDELAY) /* generally the same as FNDELAY */
- if (fcntl(fd, F_SETFL, O_NDELAY) < 0) {
- msyslog(LOG_ERR, "fcntl(O_NDELAY) fails on fd #%d: %m",
- fd);
- exit(1);
- }
-#elif defined(FIONBIO)
- {
- int on = 1;
-
- if (ioctl(fd, FIONBIO, &on) < 0) {
- msyslog(LOG_ERR,
- "ioctl(FIONBIO) fails on fd #%d: %m",
- fd);
- exit(1);
- }
- }
-#elif defined(FIOSNBIO)
- if (ioctl(fd, FIOSNBIO, &on) < 0) {
- msyslog(LOG_ERR,
- "ioctl(FIOSNBIO) fails on fd #%d: %m", fd);
- exit(1);
- }
-#else
-# include "Bletch: Need non-blocking I/O!"
-#endif
-}
-
-/*
* open_socket - open a socket, returning the file descriptor
*/
@@ -2917,12 +2797,17 @@ open_socket(
int errval;
char scopetext[16];
/*
- * int is OK for REUSEADR per
+ * int is OK for REUSEADR per
* http://www.kohala.com/start/mcast.api.txt
*/
int on = 1;
int off = 0;
+#ifndef IPTOS_DSCP_EF
+#define IPTOS_DSCP_EF 0xb8
+#endif
+ int qos = IPTOS_DSCP_EF; /* QoS RFC3246 */
+
if (IS_IPV6(addr) && !ipv6_works)
return INVALID_SOCKET;
@@ -2930,11 +2815,11 @@ open_socket(
fd = socket(AF(addr), SOCK_DGRAM, 0);
if (INVALID_SOCKET == fd) {
errval = socket_errno();
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"socket(AF_INET%s, SOCK_DGRAM, 0) failed on address %s: %m",
IS_IPV6(addr) ? "6" : "", stoa(addr));
- if (errval == EPROTONOSUPPORT ||
+ if (errval == EPROTONOSUPPORT ||
errval == EAFNOSUPPORT ||
errval == EPFNOSUPPORT)
return (INVALID_SOCKET);
@@ -2965,16 +2850,16 @@ open_socket(
if (isc_win32os_versioncheck(5, 1, 0, 0) < 0) /* before 5.1 */
#endif
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
- (char *)((turn_off_reuse)
- ? &off
- : &on),
+ (char *)((turn_off_reuse)
+ ? &off
+ : &on),
sizeof(on))) {
msyslog(LOG_ERR,
"setsockopt SO_REUSEADDR %s fails for address %s: %m",
(turn_off_reuse)
- ? "off"
- : "on",
+ ? "off"
+ : "on",
stoa(addr));
closesocket(fd);
return INVALID_SOCKET;
@@ -2992,13 +2877,13 @@ open_socket(
* IPv4 specific options go here
*/
if (IS_IPV4(addr)) {
-#if defined(HAVE_IPTOS_SUPPORT)
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char *)&qos,
+#if defined(IPPROTO_IP) && defined(IP_TOS)
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char*)&qos,
sizeof(qos)))
msyslog(LOG_ERR,
"setsockopt IP_TOS (%02x) fails on address %s: %m",
qos, stoa(addr));
-#endif /* HAVE_IPTOS_SUPPORT */
+#endif /* IPPROTO_IP && IP_TOS */
if (bcast)
socket_broadcast_enable(interf, fd, addr);
}
@@ -3007,6 +2892,13 @@ open_socket(
* IPv6 specific options go here
*/
if (IS_IPV6(addr)) {
+#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS)
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, (char*)&qos,
+ sizeof(qos)))
+ msyslog(LOG_ERR,
+ "setsockopt IPV6_TCLASS (%02x) fails on address %s: %m",
+ qos, stoa(addr));
+#endif /* IPPROTO_IPV6 && IPV6_TCLASS */
#ifdef IPV6_V6ONLY
if (isc_net_probe_ipv6only() == ISC_R_SUCCESS
&& setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,
@@ -3068,7 +2960,7 @@ open_socket(
}
closesocket(fd);
-
+
return INVALID_SOCKET;
}
@@ -3082,14 +2974,39 @@ open_socket(
else
DPRINTF(4, ("setsockopt SO_TIMESTAMP enabled on fd %d address %s\n",
fd, stoa(addr)));
- }
+ }
#endif
+#ifdef HAVE_TIMESTAMPNS
+ {
+ if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMPNS,
+ (char*)&on, sizeof(on)))
+ msyslog(LOG_DEBUG,
+ "setsockopt SO_TIMESTAMPNS on fails on address %s: %m",
+ stoa(addr));
+ else
+ DPRINTF(4, ("setsockopt SO_TIMESTAMPNS enabled on fd %d address %s\n",
+ fd, stoa(addr)));
+ }
+#endif
+#ifdef HAVE_BINTIME
+ {
+ if (setsockopt(fd, SOL_SOCKET, SO_BINTIME,
+ (char*)&on, sizeof(on)))
+ msyslog(LOG_DEBUG,
+ "setsockopt SO_BINTIME on fails on address %s: %m",
+ stoa(addr));
+ else
+ DPRINTF(4, ("setsockopt SO_BINTIME enabled on fd %d address %s\n",
+ fd, stoa(addr)));
+ }
+#endif
+
DPRINTF(4, ("bind(%d) AF_INET%s, addr %s%%%d#%d, flags 0x%x\n",
fd, IS_IPV6(addr) ? "6" : "", stoa(addr),
SCOPE(addr), SRCPORT(addr), interf->flags));
- init_nonblocking_io(fd);
-
+ make_socket_nonblocking(fd);
+
#ifdef HAVE_SIGNALED_IO
init_socket_sig(fd);
#endif /* not HAVE_SIGNALED_IO */
@@ -3147,11 +3064,11 @@ sendpkt(
src = (IS_IPV4(dest))
? mc4_list
: mc6_list;
-
+
if (NULL == src) {
/*
* unbound peer - drop request and wait for better
- * network conditions
+ * network conditions
*/
DPRINTF(2, ("%ssendpkt(dst=%s, ttl=%d, len=%d): no interface - IGNORED\n",
ismcast ? "\tMCAST\t***** " : "",
@@ -3172,7 +3089,7 @@ sendpkt(
* set the multicast ttl for outgoing packets
*/
switch (AF(&src->sin)) {
-
+
case AF_INET :
cttl = (u_char)ttl;
rc = setsockopt(src->fd, IPPROTO_IP,
@@ -3180,7 +3097,7 @@ sendpkt(
(void *)&cttl,
sizeof(cttl));
break;
-
+
# ifdef INCLUDE_IPV6_SUPPORT
case AF_INET6 :
rc = setsockopt(src->fd, IPPROTO_IPV6,
@@ -3193,11 +3110,11 @@ sendpkt(
default:
rc = 0;
}
-
+
if (!rc)
src->last_ttl = ttl;
else
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"setsockopt IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS fails on address %s: %m",
stoa(&src->sin));
}
@@ -3247,17 +3164,25 @@ fdbits(
return buffer;
}
+
+#ifdef REFCLOCK
/*
* Routine to read the refclock packets for a specific interface
* Return the number of bytes read. That way we know if we should
* read it again or go on to the next one if no bytes returned
*/
static inline int
-read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts)
+read_refclock_packet(
+ SOCKET fd,
+ struct refclockio * rp,
+ l_fp ts
+ )
{
- int i;
- int buflen;
- register struct recvbuf *rb;
+ int i;
+ int buflen;
+ int saved_errno;
+ int consumed;
+ struct recvbuf * rb;
rb = get_free_recv_buffer();
@@ -3276,13 +3201,15 @@ read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts)
|| rp->datalen > sizeof(rb->recv_space))
? sizeof(rb->recv_space)
: rp->datalen;
- buflen = read(fd, (char *)&rb->recv_space, (unsigned)i);
+ do {
+ buflen = read(fd, (char *)&rb->recv_space, (u_int)i);
+ } while (buflen < 0 && EINTR == errno);
- if (buflen < 0) {
- if (errno != EINTR && errno != EAGAIN)
- msyslog(LOG_ERR, "clock read fd %d: %m", fd);
+ if (buflen <= 0) {
+ saved_errno = errno;
freerecvbuf(rb);
- return (buflen);
+ errno = saved_errno;
+ return buflen;
}
/*
@@ -3290,91 +3217,140 @@ read_refclock_packet(SOCKET fd, struct refclockio *rp, l_fp ts)
* put it on the full list and do bookkeeping.
*/
rb->recv_length = buflen;
- rb->recv_srcclock = rp->srcclock;
+ rb->recv_peer = 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);
- return (buflen);
- }
+ consumed = indicate_refclock_packet(rp, rb);
+ if (!consumed) {
+ rp->recvcount++;
+ packets_received++;
}
-
- add_full_recv_buffer(rb);
- rp->recvcount++;
- packets_received++;
- return (buflen);
+ return buflen;
}
+#endif /* REFCLOCK */
-#ifdef HAVE_TIMESTAMP
+#ifdef HAVE_PACKET_TIMESTAMP
/*
* extract timestamps from control message buffer
*/
static l_fp
fetch_timestamp(
struct recvbuf * rb,
- struct msghdr * msghdr,
+ struct msghdr * msghdr,
l_fp ts
)
{
-#ifdef USE_TIMESTAMP_CMSG
- struct cmsghdr *cmsghdr;
+ struct cmsghdr * cmsghdr;
+#ifdef HAVE_BINTIME
+ struct bintime * btp;
+#endif
+#ifdef HAVE_TIMESTAMPNS
+ struct timespec * tsp;
+#endif
+#ifdef HAVE_TIMESTAMP
+ struct timeval * tvp;
+#endif
+ unsigned long ticks;
+ double fuzz;
+ l_fp lfpfuzz;
+ l_fp nts;
+#ifdef DEBUG_TIMING
+ l_fp dts;
+#endif
cmsghdr = CMSG_FIRSTHDR(msghdr);
while (cmsghdr != NULL) {
switch (cmsghdr->cmsg_type)
{
+#ifdef HAVE_BINTIME
+ case SCM_BINTIME:
+#endif /* HAVE_BINTIME */
+#ifdef HAVE_TIMESTAMPNS
+ case SCM_TIMESTAMPNS:
+#endif /* HAVE_TIMESTAMPNS */
+#ifdef HAVE_TIMESTAMP
case SCM_TIMESTAMP:
- {
- struct timeval *tvp;
- double dtemp;
- l_fp nts;
-
- tvp = (struct timeval *)CMSG_DATA(cmsghdr);
- DPRINTF(4, ("fetch_timestamp: system network time stamp: %ld.%06ld\n",
- tvp->tv_sec, tvp->tv_usec));
- nts.l_i = tvp->tv_sec + JAN_1970;
- dtemp = (tvp->tv_usec
- + (ntp_random() * 2. / FRAC)) / 1e6;
- nts.l_uf = (u_int32)(dtemp * FRAC);
-#ifdef DEBUG_TIMING
+#endif /* HAVE_TIMESTAMP */
+#if defined(HAVE_BINTIME) || defined (HAVE_TIMESTAMPNS) || defined(HAVE_TIMESTAMP)
+ switch (cmsghdr->cmsg_type)
{
- l_fp dts;
-
- dts = ts;
- L_SUB(&dts, &nts);
- collect_timing(rb,
- "input processing delay",
- 1, &dts);
- DPRINTF(4, ("fetch_timestamp: timestamp delta: %s (incl. prec fuzz)\n",
- lfptoa(&dts, 9)));
+#ifdef HAVE_BINTIME
+ case SCM_BINTIME:
+ btp = (struct bintime *)CMSG_DATA(cmsghdr);
+ /*
+ * bintime documentation is at http://phk.freebsd.dk/pubs/timecounter.pdf
+ */
+ nts.l_i = btp->sec + JAN_1970;
+ nts.l_uf = (u_int32)(btp->frac >> 32);
+ if (sys_tick > measured_tick &&
+ sys_tick > 1e-9) {
+ ticks = (unsigned long)(nts.l_uf / (unsigned long)(sys_tick * FRAC));
+ nts.l_uf = (unsigned long)(ticks * (unsigned long)(sys_tick * FRAC));
+ }
+ DPRINTF(4, ("fetch_timestamp: system bintime network time stamp: %ld.%09lu\n",
+ btp->sec, (unsigned long)((nts.l_uf / FRAC) * 1e9)));
+ break;
+#endif /* HAVE_BINTIME */
+#ifdef HAVE_TIMESTAMPNS
+ case SCM_TIMESTAMPNS:
+ tsp = (struct timespec *)CMSG_DATA(cmsghdr);
+ if (sys_tick > measured_tick &&
+ sys_tick > 1e-9) {
+ ticks = (unsigned long)((tsp->tv_nsec * 1e-9) /
+ sys_tick);
+ tsp->tv_nsec = (long)(ticks * 1e9 *
+ sys_tick);
+ }
+ DPRINTF(4, ("fetch_timestamp: system nsec network time stamp: %ld.%09ld\n",
+ tsp->tv_sec, tsp->tv_nsec));
+ nts = tspec_stamp_to_lfp(*tsp);
+ break;
+#endif /* HAVE_TIMESTAMPNS */
+#ifdef HAVE_TIMESTAMP
+ case SCM_TIMESTAMP:
+ tvp = (struct timeval *)CMSG_DATA(cmsghdr);
+ if (sys_tick > measured_tick &&
+ sys_tick > 1e-6) {
+ ticks = (unsigned long)((tvp->tv_usec * 1e-6) /
+ sys_tick);
+ tvp->tv_usec = (long)(ticks * 1e6 *
+ sys_tick);
+ }
+ DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %ld.%06ld\n",
+ tvp->tv_sec, tvp->tv_usec));
+ nts = tval_stamp_to_lfp(*tvp);
+ break;
+#endif /* HAVE_TIMESTAMP */
}
-#endif
+ fuzz = ntp_random() * 2. / FRAC * sys_fuzz;
+ DTOLFP(fuzz, &lfpfuzz);
+ L_ADD(&nts, &lfpfuzz);
+#ifdef DEBUG_TIMING
+ dts = ts;
+ L_SUB(&dts, &nts);
+ collect_timing(rb, "input processing delay", 1,
+ &dts);
+ DPRINTF(4, ("fetch_timestamp: timestamp delta: %s (incl. fuzz)\n",
+ lfptoa(&dts, 9)));
+#endif /* DEBUG_TIMING */
ts = nts; /* network time stamp */
break;
- }
+#endif /* HAVE_BINTIME || HAVE_TIMESTAMPNS || HAVE_TIMESTAMP */
+
default:
DPRINTF(4, ("fetch_timestamp: skipping control message 0x%x\n",
cmsghdr->cmsg_type));
}
cmsghdr = CMSG_NXTHDR(msghdr, cmsghdr);
}
-#endif
return ts;
}
-#endif
+#endif /* HAVE_PACKET_TIMESTAMP */
/*
@@ -3392,10 +3368,10 @@ read_network_packet(
GETSOCKNAME_SOCKLEN_TYPE fromlen;
int buflen;
register struct recvbuf *rb;
-#ifdef HAVE_TIMESTAMP
+#ifdef HAVE_PACKET_TIMESTAMP
struct msghdr msghdr;
struct iovec iovec;
- char control[TIMESTAMP_CTLMSGBUF_SIZE];
+ char control[CMSG_BUFSIZE];
#endif
/*
@@ -3430,7 +3406,7 @@ read_network_packet(
fromlen = sizeof(rb->recv_srcadr);
-#ifndef HAVE_TIMESTAMP
+#ifndef HAVE_PACKET_TIMESTAMP
rb->recv_length = recvfrom(fd, (char *)&rb->recv_space,
sizeof(rb->recv_space), 0,
&rb->recv_srcadr.sa, &fromlen);
@@ -3449,7 +3425,7 @@ read_network_packet(
buflen = rb->recv_length;
- if (buflen == 0 || (buflen == -1 &&
+ if (buflen == 0 || (buflen == -1 &&
(EWOULDBLOCK == errno
#ifdef EAGAIN
|| EAGAIN == errno
@@ -3470,12 +3446,39 @@ read_network_packet(
fd, buflen, stoa(&rb->recv_srcadr)));
/*
+ ** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1
+ */
+
+ // temporary hack...
+#ifndef HAVE_SOLARIS_PRIVS
+ if (AF_INET6 == itf->family) {
+ DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
+ stoa(&rb->recv_srcadr),
+ IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr),
+ stoa(&itf->sin),
+ !IN6_IS_ADDR_LOOPBACK(&itf->sin)
+ ));
+ }
+
+ if ( AF_INET6 == itf->family
+ && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr)
+ && !IN6_IS_ADDR_LOOPBACK(&itf->sin)
+ ) {
+ packets_dropped++;
+ DPRINTF(1, ("DROPPING that packet\n"));
+ freerecvbuf(rb);
+ return buflen;
+ }
+ DPRINTF(1, ("processing that packet\n"));
+#endif
+
+ /*
* Got one. Mark how and when it got here,
* put it on the full list and do bookkeeping.
*/
rb->dstadr = itf;
rb->fd = fd;
-#ifdef HAVE_TIMESTAMP
+#ifdef HAVE_PACKET_TIMESTAMP
/* pick up a network time stamp if possible */
ts = fetch_timestamp(rb, &msghdr, ts);
#endif
@@ -3489,32 +3492,103 @@ read_network_packet(
return (buflen);
}
+/*
+ * attempt to handle io (select()/signaled IO)
+ */
+void
+io_handler(void)
+{
+# ifndef HAVE_SIGNALED_IO
+ fd_set rdfdes;
+ int nfound;
+
+ /*
+ * 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.
+ */
+ rdfdes = activefds;
+# if !defined(VMS) && !defined(SYS_VXWORKS)
+ nfound = select(maxactivefd + 1, &rdfdes, NULL,
+ NULL, NULL);
+# else /* VMS, VxWorks */
+ /* make select() wake up after one second */
+ {
+ struct timeval t1;
+
+ t1.tv_sec = 1;
+ t1.tv_usec = 0;
+ nfound = select(maxactivefd + 1,
+ &rdfdes, NULL, NULL,
+ &t1);
+ }
+# endif /* VMS, VxWorks */
+ if (nfound > 0) {
+ l_fp ts;
+
+ get_systime(&ts);
+
+ input_handler(&ts);
+ } else if (nfound == -1 && errno != EINTR) {
+ msyslog(LOG_ERR, "select() error: %m");
+ }
+# ifdef DEBUG
+ else if (debug > 4) {
+ msyslog(LOG_DEBUG, "select(): nfound=%d, error: %m", nfound);
+ } else {
+ DPRINTF(1, ("select() returned %d: %m\n", nfound));
+ }
+# endif /* DEBUG */
+# else /* HAVE_SIGNALED_IO */
+ wait_for_signal();
+# endif /* HAVE_SIGNALED_IO */
+}
/*
* input_handler - receive packets asynchronously
*/
-void
+static void
input_handler(
- l_fp *cts
+ l_fp * cts
)
{
- int buflen;
- int n;
- int doing;
- SOCKET fd;
- struct timeval tvzero;
- l_fp ts; /* Timestamp at BOselect() gob */
+ int buflen;
+ int n;
+ u_int idx;
+ int doing;
+ SOCKET fd;
+ blocking_child *c;
+ struct timeval tvzero;
+ l_fp ts; /* Timestamp at BOselect() gob */
#ifdef DEBUG_TIMING
- l_fp ts_e; /* Timestamp at EOselect() gob */
+ l_fp ts_e; /* Timestamp at EOselect() gob */
#endif
- fd_set fds;
- int select_count = 0;
- endpt *ep;
-#if defined(HAS_ROUTING_SOCKET)
- struct asyncio_reader *asyncio_reader;
+ fd_set fds;
+ size_t select_count;
+ endpt * ep;
+#ifdef REFCLOCK
+ struct refclockio *rp;
+ int saved_errno;
+ const char * clk;
+#endif
+#ifdef HAS_ROUTING_SOCKET
+ struct asyncio_reader * asyncio_reader;
+ struct asyncio_reader * next_asyncio_reader;
#endif
handler_calls++;
+ select_count = 0;
/*
* If we have something to do, freeze a timestamp.
@@ -3537,6 +3611,7 @@ input_handler(
*/
if (n < 0) {
int err = errno;
+ int j, b, prior;
/*
* extended FAU debugging output
*/
@@ -3545,20 +3620,26 @@ input_handler(
"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)))
- msyslog(LOG_ERR,
- "Bad file descriptor %d",
- j);
+ if (err != EBADF)
+ goto ih_return;
+ for (j = 0, prior = 0; j <= maxactivefd; j++) {
+ if (FD_ISSET(j, &activefds)) {
+ if (-1 != read(j, &b, 0)) {
+ prior = j;
+ continue;
+ }
+ msyslog(LOG_ERR,
+ "Removing bad file descriptor %d from select set",
+ j);
+ FD_CLR(j, &activefds);
+ if (j == maxactivefd)
+ maxactivefd = prior;
+ }
}
- return;
+ goto ih_return;
}
else if (n == 0)
- return;
+ goto ih_return;
++handler_pkts;
@@ -3568,17 +3649,38 @@ input_handler(
*/
if (refio != NULL) {
- register struct refclockio *rp;
-
for (rp = refio; rp != NULL; rp = rp->next) {
fd = rp->fd;
- if (FD_ISSET(fd, &fds))
+ if (!FD_ISSET(fd, &fds))
+ continue;
+ ++select_count;
+ buflen = read_refclock_packet(fd, rp, ts);
+ /*
+ * The first read must succeed after select()
+ * indicates readability, or we've reached
+ * a permanent EOF. http://bugs.ntp.org/1732
+ * reported ntpd munching CPU after a USB GPS
+ * was unplugged because select was indicating
+ * EOF but ntpd didn't remove the descriptor
+ * from the activefds set.
+ */
+ if (buflen < 0 && EAGAIN != errno) {
+ saved_errno = errno;
+ clk = refnumtoa(&rp->srcclock->srcadr);
+ errno = saved_errno;
+ msyslog(LOG_ERR, "%s read: %m", clk);
+ maintain_activefds(fd, TRUE);
+ } else if (0 == buflen) {
+ clk = refnumtoa(&rp->srcclock->srcadr);
+ msyslog(LOG_ERR, "%s read EOF", clk);
+ maintain_activefds(fd, TRUE);
+ } else {
+ /* drain any remaining refclock input */
do {
- ++select_count;
- buflen = read_refclock_packet(
- fd, rp, ts);
+ buflen = read_refclock_packet(fd, rp, ts);
} while (buflen > 0);
+ }
}
}
#endif /* REFCLOCK */
@@ -3614,19 +3716,31 @@ input_handler(
asyncio_reader = asyncio_reader_list;
while (asyncio_reader != NULL) {
+ /* callback may unlink and free asyncio_reader */
+ next_asyncio_reader = asyncio_reader->link;
if (FD_ISSET(asyncio_reader->fd, &fds)) {
++select_count;
- (asyncio_reader->receiver)(asyncio_reader);
+ (*asyncio_reader->receiver)(asyncio_reader);
}
- asyncio_reader = asyncio_reader->link;
+ asyncio_reader = next_asyncio_reader;
}
#endif /* HAS_ROUTING_SOCKET */
-
+
/*
- * Done everything from that select.
+ * Check for a response from a blocking child
*/
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c || -1 == c->resp_read_pipe)
+ continue;
+ if (FD_ISSET(c->resp_read_pipe, &fds)) {
+ select_count++;
+ process_blocking_resp(c);
+ }
+ }
/*
+ * Done everything from that select.
* If nothing to do, just return.
* If an error occurred, complain and return.
*/
@@ -3634,8 +3748,8 @@ input_handler(
#ifdef DEBUG
if (debug)
msyslog(LOG_DEBUG, "input_handler: select() returned 0");
-#endif
- return;
+#endif /* DEBUG */
+ goto ih_return;
}
/* We've done our work */
#ifdef DEBUG_TIMING
@@ -3651,12 +3765,78 @@ input_handler(
msyslog(LOG_DEBUG,
"input_handler: Processed a gob of fd's in %s msec",
lfptoms(&ts_e, 6));
-#endif
- /* just bail. */
+#endif /* DEBUG_TIMING */
+ /* We're done... */
+ ih_return:
return;
}
+#endif /* !HAVE_IO_COMPLETION_PORT */
+
+
+/*
+ * find an interface suitable for the src address
+ */
+endpt *
+select_peerinterface(
+ struct peer * peer,
+ sockaddr_u * srcadr,
+ endpt * dstadr
+ )
+{
+ endpt *ep;
+#ifndef SIM
+ endpt *wild;
+
+ wild = ANY_INTERFACE_CHOOSE(srcadr);
+
+ /*
+ * 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)) {
+ ep = loopback_interface;
+ } else if (peer->cast_flags &
+ (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
+ ep = findbcastinter(srcadr);
+ if (ep != NULL)
+ DPRINTF(4, ("Found *-cast interface %s for address %s\n",
+ stoa(&ep->sin), stoa(srcadr)));
+ else
+ DPRINTF(4, ("No *-cast local address found for address %s\n",
+ stoa(srcadr)));
+ } else {
+ ep = dstadr;
+ if (NULL == ep)
+ ep = wild;
+ }
+ /*
+ * If it is a multicast address, findbcastinter() may not find
+ * it. For unicast, we get to find the interface when dstadr is
+ * given to us as the wildcard (ANY_INTERFACE_CHOOSE). Either
+ * way, try a little harder.
+ */
+ if (wild == ep)
+ ep = findinterface(srcadr);
+ /*
+ * we do not bind to the wildcard interfaces for output
+ * as our (network) source address would be undefined and
+ * crypto will not work without knowing the own transmit address
+ */
+ if (ep != NULL && INT_WILDCARD & ep->flags)
+ if (!accept_wildcard_if_for_winnt)
+ ep = NULL;
+#else /* SIM follows */
+ ep = loopback_interface;
#endif
+ return ep;
+}
+
+
/*
* findinterface - find local interface corresponding to address
*/
@@ -3666,7 +3846,7 @@ findinterface(
)
{
endpt *iface;
-
+
iface = findlocalinterface(addr, INT_WILDCARD, 0);
if (NULL == iface) {
@@ -3712,7 +3892,7 @@ findlocalinterface(
DPRINTF(4, ("Finding interface for addr %s in list of addresses\n",
stoa(addr)));
-
+
s = socket(AF(addr), SOCK_DGRAM, 0);
if (INVALID_SOCKET == s)
return NULL;
@@ -3723,8 +3903,13 @@ findlocalinterface(
*/
if (bcast) {
on = 1;
- setsockopt(s, SOL_SOCKET, SO_BROADCAST,
- (char *)&on, sizeof(on));
+ if (SOCKET_ERROR == setsockopt(s, SOL_SOCKET,
+ SO_BROADCAST,
+ (char *)&on,
+ sizeof(on))) {
+ closesocket(s);
+ return NULL;
+ }
}
rtn = connect(s, &addr->sa, SOCKLEN(addr));
@@ -3741,10 +3926,10 @@ findlocalinterface(
DPRINTF(4, ("findlocalinterface: kernel maps %s to %s\n",
stoa(addr), stoa(&saddr)));
-
+
iface = getinterface(&saddr, flags);
- /*
+ /*
* if we didn't find an exact match on saddr, find the closest
* available local address. This handles the case of the
* address suggested by the kernel being excluded by nic rules
@@ -3753,7 +3938,7 @@ findlocalinterface(
* for more background.
*/
if (NULL == iface || iface->ignore_packets)
- iface = findclosestinterface(&saddr,
+ iface = findclosestinterface(&saddr,
flags | INT_LOOPBACK);
/* Don't use an interface which will ignore replies */
@@ -3779,7 +3964,7 @@ findlocalinterface(
* multiple feasible local addresses, regardless of the order ntpd
* enumerated them.
*/
-static endpt *
+endpt *
findclosestinterface(
sockaddr_u * addr,
int flags
@@ -3790,14 +3975,15 @@ findclosestinterface(
sockaddr_u addr_dist;
sockaddr_u min_dist;
+ ZERO_SOCK(&min_dist);
winner = NULL;
-
+
for (ep = ep_list; ep != NULL; ep = ep->elink) {
if (ep->ignore_packets ||
- AF(addr) != ep->family ||
+ AF(addr) != ep->family ||
flags & ep->flags)
continue;
-
+
calc_addr_distance(&addr_dist, addr, &ep->sin);
if (NULL == winner ||
-1 == cmp_addr_distance(&addr_dist, &min_dist)) {
@@ -3806,10 +3992,10 @@ findclosestinterface(
}
}
if (NULL == winner)
- DPRINTF(4, ("findclosestinterface(%s) failed\n",
+ DPRINTF(4, ("findclosestinterface(%s) failed\n",
stoa(addr)));
else
- DPRINTF(4, ("findclosestinterface(%s) -> %s\n",
+ DPRINTF(4, ("findclosestinterface(%s) -> %s\n",
stoa(addr), stoa(&winner->sin)));
return winner;
@@ -3837,7 +4023,7 @@ calc_addr_distance(
NTP_REQUIRE(AF(a1) == AF(a2));
- memset(dist, 0, sizeof(*dist));
+ ZERO_SOCK(dist);
AF(dist) = AF(a1);
/* v4 can be done a bit simpler */
@@ -3913,19 +4099,19 @@ cmp_addr_distance(
* fetch an interface structure the matches the
* address and has the given flags NOT set
*/
-static endpt *
+endpt *
getinterface(
- sockaddr_u * addr,
+ sockaddr_u * addr,
u_int32 flags
)
{
endpt *iface;
-
+
iface = find_addr_in_list(addr);
if (iface != NULL && (iface->flags & flags))
iface = NULL;
-
+
return iface;
}
@@ -3938,15 +4124,15 @@ findbcastinter(
sockaddr_u *addr
)
{
+ endpt * iface;
+
+ iface = NULL;
#if !defined(MPE) && (defined(SIOCGIFCONF) || defined(SYS_WINNT))
- struct interface *iface;
-
-
DPRINTF(4, ("Finding broadcast/multicast interface for addr %s in list of addresses\n",
stoa(addr)));
iface = findlocalinterface(addr, INT_LOOPBACK | INT_WILDCARD,
- 1);
+ 1);
if (iface != NULL) {
DPRINTF(4, ("Easily found bcast-/mcast- interface index #%d %s\n",
iface->ifnum, iface->name));
@@ -3960,11 +4146,11 @@ findbcastinter(
for (iface = ep_list; iface != NULL; iface = iface->elink) {
if (iface->flags & INT_WILDCARD)
continue;
-
+
/* Don't bother with ignored interfaces */
if (iface->ignore_packets)
continue;
-
+
/*
* First look if this is the correct family
*/
@@ -3979,7 +4165,7 @@ findbcastinter(
* If we are looking to match a multicast address and
* this interface is one...
*/
- if (addr_ismulticast(addr)
+ if (addr_ismulticast(addr)
&& (iface->flags & INT_MULTICAST)) {
#ifdef INCLUDE_IPV6_SUPPORT
/*
@@ -4005,7 +4191,7 @@ findbcastinter(
if (SOCK_EQ(&iface->bcast, addr))
break;
- if ((NSRCADR(&iface->sin) & NSRCADR(&iface->mask))
+ if ((NSRCADR(&iface->sin) & NSRCADR(&iface->mask))
== (NSRCADR(addr) & NSRCADR(&iface->mask)))
break;
}
@@ -4024,9 +4210,11 @@ findbcastinter(
DPRINTF(4, ("No bcast interface found for %s\n",
stoa(addr)));
iface = ANY_INTERFACE_CHOOSE(addr);
- } else
+ } else {
DPRINTF(4, ("Found bcast-/mcast- interface index #%d %s\n",
iface->ifnum, iface->name));
+ }
+
return iface;
}
@@ -4065,7 +4253,7 @@ io_addclock(
* 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;
+ rio->active = TRUE;
# ifdef HAVE_SIGNALED_IO
if (init_clock_sig(rio)) {
@@ -4082,7 +4270,7 @@ io_addclock(
/*
* enqueue
*/
- refio = rio;
+ LINK_SLIST(refio, rio, next);
/*
* register fd
@@ -4093,6 +4281,7 @@ io_addclock(
return 1;
}
+
/*
* io_closeclock - close the clock in the I/O structure given
*/
@@ -4101,36 +4290,29 @@ io_closeclock(
struct refclockio *rio
)
{
- register struct refclockio *rp;
+ struct refclockio *unlinked;
BLOCKIO();
/*
* Remove structure from the list
*/
- if (refio == rio)
- refio = rio->next;
- else {
- for (rp = refio; rp != NULL; rp = rp->next)
- if (rp->next == rio) {
- rp->next = rio->next;
- break;
- }
-
- if (NULL == rp) {
- UNBLOCKIO();
- return;
- }
+ rio->active = FALSE;
+ UNLINK_SLIST(unlinked, refio, rio, next, struct refclockio);
+ if (NULL != unlinked) {
+ purge_recv_buffers_for_fd(rio->fd);
+ /*
+ * Close the descriptor.
+ */
+ close_and_delete_fd_from_list(rio->fd);
}
+ rio->fd = -1;
- /*
- * Close the descriptor.
- */
- close_and_delete_fd_from_list(rio->fd);
UNBLOCKIO();
}
#endif /* REFCLOCK */
+
/*
* 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
@@ -4142,7 +4324,9 @@ io_closeclock(
*/
#ifndef SYS_WINNT
void
-kill_asyncio(int startfd)
+kill_asyncio(
+ int startfd
+ )
{
BLOCKIO();
@@ -4160,6 +4344,7 @@ kill_asyncio(int startfd)
}
#endif /* !SYS_WINNT */
+
/*
* Add and delete functions for the list of open sockets
*/
@@ -4175,76 +4360,48 @@ add_fd_to_list(
lsock->type = type;
LINK_SLIST(fd_list, lsock, link);
- /*
- * I/O Completion Ports don't care about the select and FD_SET
- */
-#ifndef HAVE_IO_COMPLETION_PORT
- if (fd < 0 || fd >= FD_SETSIZE) {
- msyslog(LOG_ERR,
- "Too many sockets in use, FD_SETSIZE %d exceeded",
- FD_SETSIZE);
- exit(1);
- }
- /*
- * keep activefds in sync
- */
- maxactivefd = max(fd, maxactivefd);
-
- FD_SET(fd, &activefds);
-#endif
+ maintain_activefds(fd, 0);
}
+
static void
close_and_delete_fd_from_list(
SOCKET fd
- )
+ )
{
vsock_t *lsock;
- UNLINK_EXPR_SLIST(lsock, fd_list, fd ==
+ UNLINK_EXPR_SLIST(lsock, fd_list, fd ==
UNLINK_EXPR_SLIST_CURRENT()->fd, link, vsock_t);
- if (lsock != NULL) {
- switch (lsock->type) {
- case FD_TYPE_SOCKET:
- closesocket(lsock->fd);
- break;
+ if (NULL == lsock)
+ return;
- case FD_TYPE_FILE:
- close(lsock->fd);
- break;
+ switch (lsock->type) {
- default:
- msyslog(LOG_ERR,
- "internal error - illegal descriptor type %d - EXITING",
- (int)lsock->type);
- exit(1);
- }
+ case FD_TYPE_SOCKET:
+ closesocket(lsock->fd);
+ break;
- free(lsock);
- /*
- * I/O Completion Ports don't care about select and fd_set
- */
-#ifndef HAVE_IO_COMPLETION_PORT
- /*
- * remove from activefds
- */
- FD_CLR(fd, &activefds);
-
- if (fd == maxactivefd && maxactivefd) {
- int i;
- NTP_INSIST(maxactivefd - 1 < FD_SETSIZE);
- for (i = maxactivefd - 1; i >= 0; i--)
- if (FD_ISSET(i, &activefds)) {
- maxactivefd = i;
- break;
- }
- NTP_INSIST(fd != maxactivefd);
- }
-#endif
+ case FD_TYPE_FILE:
+ closeserial(lsock->fd);
+ break;
+
+ default:
+ msyslog(LOG_ERR,
+ "internal error - illegal descriptor type %d - EXITING",
+ (int)lsock->type);
+ exit(1);
}
+
+ free(lsock);
+ /*
+ * remove from activefds
+ */
+ maintain_activefds(fd, 1);
}
+
static void
add_addr_to_list(
sockaddr_u * addr,
@@ -4260,9 +4417,9 @@ add_addr_to_list(
laddr = emalloc(sizeof(*laddr));
laddr->addr = *addr;
laddr->ep = ep;
-
+
LINK_SLIST(remoteaddr_list, laddr, link);
-
+
DPRINTF(4, ("Added addr %s to list of addresses\n",
stoa(addr)));
#ifdef DEBUG
@@ -4276,10 +4433,10 @@ add_addr_to_list(
static void
delete_addr_from_list(
sockaddr_u *addr
- )
+ )
{
remaddr_t *unlinked;
-
+
UNLINK_EXPR_SLIST(unlinked, remoteaddr_list, SOCK_EQ(addr,
&(UNLINK_EXPR_SLIST_CURRENT()->addr)), link, remaddr_t);
@@ -4298,28 +4455,28 @@ delete_interface_from_list(
{
remaddr_t *unlinked;
- do {
+ for (;;) {
UNLINK_EXPR_SLIST(unlinked, remoteaddr_list, iface ==
UNLINK_EXPR_SLIST_CURRENT()->ep, link,
remaddr_t);
- if (unlinked != NULL) {
- DPRINTF(4, ("Deleted addr %s for interface #%d %s from list of addresses\n",
- stoa(&unlinked->addr), iface->ifnum,
- iface->name));
- free(unlinked);
- }
- } while (unlinked != NULL);
+ if (unlinked == NULL)
+ break;
+ DPRINTF(4, ("Deleted addr %s for interface #%d %s from list of addresses\n",
+ stoa(&unlinked->addr), iface->ifnum,
+ iface->name));
+ free(unlinked);
+ }
}
static struct interface *
find_addr_in_list(
sockaddr_u *addr
- )
+ )
{
remaddr_t *entry;
-
+
DPRINTF(4, ("Searching for addr %s in list of addresses - ",
stoa(addr)));
@@ -4346,7 +4503,7 @@ find_flagged_addr_in_list(
)
{
remaddr_t *entry;
-
+
DPRINTF(4, ("Finding addr %s with flags %d in list: ",
stoa(addr), flags));
@@ -4390,10 +4547,10 @@ process_routing_msgs(struct asyncio_reader *reader)
#ifdef HAVE_RTNETLINK
struct nlmsghdr *nh;
#else
- struct rt_msghdr *rtm;
+ struct rt_msghdr rtm;
char *p;
#endif
-
+
if (disable_dynamic_updates) {
/*
* discard ourselves if we are not needed any more
@@ -4405,7 +4562,7 @@ process_routing_msgs(struct asyncio_reader *reader)
}
cnt = read(reader->fd, buffer, sizeof(buffer));
-
+
if (cnt < 0) {
msyslog(LOG_ERR,
"i/o error on routing socket %m - disabling");
@@ -4425,18 +4582,18 @@ process_routing_msgs(struct asyncio_reader *reader)
#else
for (p = buffer;
(p + sizeof(struct rt_msghdr)) <= (buffer + cnt);
- p += rtm->rtm_msglen) {
- rtm = (struct rt_msghdr *)p;
- if (rtm->rtm_version != RTM_VERSION) {
+ p += rtm.rtm_msglen) {
+ memcpy(&rtm, p, sizeof(rtm));
+ if (rtm.rtm_version != RTM_VERSION) {
msyslog(LOG_ERR,
"version mismatch (got %d - expected %d) on routing socket - disabling",
- rtm->rtm_version, RTM_VERSION);
+ rtm.rtm_version, RTM_VERSION);
remove_asyncio_reader(reader);
delete_asyncio_reader(reader);
return;
}
- msg_type = rtm->rtm_type;
+ msg_type = rtm.rtm_type;
#endif
switch (msg_type) {
#ifdef RTM_NEWADDR
@@ -4524,7 +4681,7 @@ init_async_notifications()
fd = move_fd(fd);
#ifdef HAVE_RTNETLINK
- memset(&sa, 0, sizeof(sa));
+ ZERO(sa);
sa.nl_family = PF_NETLINK;
sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR
| RTMGRP_IPV6_IFADDR | RTMGRP_IPV4_ROUTE
@@ -4536,16 +4693,16 @@ init_async_notifications()
return;
}
#endif
- init_nonblocking_io(fd);
+ make_socket_nonblocking(fd);
#if defined(HAVE_SIGNALED_IO)
init_socket_sig(fd);
#endif /* HAVE_SIGNALED_IO */
-
+
reader = new_asyncio_reader();
reader->fd = fd;
reader->receiver = process_routing_msgs;
-
+
add_asyncio_reader(reader, FD_TYPE_SOCKET);
msyslog(LOG_INFO,
"Listening on routing socket on fd #%d for interface updates",
@@ -4558,3 +4715,4 @@ init_async_notifications(void)
{
}
#endif
+
diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h
index 14ecefae6000..8b82ec006c2b 100644
--- a/ntpd/ntp_keyword.h
+++ b/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2010-04-06 04:38:11 UTC diff_ignore_line
+ * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,920 +10,1023 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[163] = {
- /* 0 258 T_Age */ "age",
- /* 1 259 T_All */ "all",
- /* 2 260 T_Allan */ "allan",
- /* 3 261 T_Auth */ "auth",
- /* 4 262 T_Autokey */ "autokey",
- /* 5 263 T_Automax */ "automax",
- /* 6 264 T_Average */ "average",
- /* 7 265 T_Bclient */ "bclient",
- /* 8 266 T_Beacon */ "beacon",
- /* 9 267 T_Bias */ "bias",
- /* 10 268 T_Broadcast */ "broadcast",
- /* 11 269 T_Broadcastclient */ "broadcastclient",
- /* 12 270 T_Broadcastdelay */ "broadcastdelay",
- /* 13 271 T_Burst */ "burst",
- /* 14 272 T_Calibrate */ "calibrate",
- /* 15 273 T_Calldelay */ "calldelay",
+const char * const keyword_text[186] = {
+ /* 0 258 T_Abbrev */ "abbrev",
+ /* 1 259 T_Age */ "age",
+ /* 2 260 T_All */ "all",
+ /* 3 261 T_Allan */ "allan",
+ /* 4 262 T_Allpeers */ "allpeers",
+ /* 5 263 T_Auth */ "auth",
+ /* 6 264 T_Autokey */ "autokey",
+ /* 7 265 T_Automax */ "automax",
+ /* 8 266 T_Average */ "average",
+ /* 9 267 T_Bclient */ "bclient",
+ /* 10 268 T_Beacon */ "beacon",
+ /* 11 269 T_Broadcast */ "broadcast",
+ /* 12 270 T_Broadcastclient */ "broadcastclient",
+ /* 13 271 T_Broadcastdelay */ "broadcastdelay",
+ /* 14 272 T_Burst */ "burst",
+ /* 15 273 T_Calibrate */ "calibrate",
/* 16 274 T_Ceiling */ "ceiling",
/* 17 275 T_Clockstats */ "clockstats",
/* 18 276 T_Cohort */ "cohort",
/* 19 277 T_ControlKey */ "controlkey",
/* 20 278 T_Crypto */ "crypto",
/* 21 279 T_Cryptostats */ "cryptostats",
- /* 22 280 T_Day */ "day",
- /* 23 281 T_Default */ "default",
- /* 24 282 T_Digest */ "digest",
- /* 25 283 T_Disable */ "disable",
- /* 26 284 T_Discard */ "discard",
- /* 27 285 T_Dispersion */ "dispersion",
- /* 28 286 T_Double */ NULL,
- /* 29 287 T_Driftfile */ "driftfile",
- /* 30 288 T_Drop */ "drop",
- /* 31 289 T_Ellipsis */ "...",
- /* 32 290 T_Enable */ "enable",
- /* 33 291 T_End */ "end",
- /* 34 292 T_False */ NULL,
- /* 35 293 T_File */ "file",
- /* 36 294 T_Filegen */ "filegen",
- /* 37 295 T_Flag1 */ "flag1",
- /* 38 296 T_Flag2 */ "flag2",
- /* 39 297 T_Flag3 */ "flag3",
- /* 40 298 T_Flag4 */ "flag4",
- /* 41 299 T_Flake */ "flake",
- /* 42 300 T_Floor */ "floor",
- /* 43 301 T_Freq */ "freq",
- /* 44 302 T_Fudge */ "fudge",
- /* 45 303 T_Host */ "host",
- /* 46 304 T_Huffpuff */ "huffpuff",
- /* 47 305 T_Iburst */ "iburst",
- /* 48 306 T_Ident */ "ident",
- /* 49 307 T_Ignore */ "ignore",
- /* 50 308 T_Includefile */ "includefile",
- /* 51 309 T_Integer */ NULL,
- /* 52 310 T_Interface */ "interface",
- /* 53 311 T_Ipv4 */ "ipv4",
- /* 54 312 T_Ipv4_flag */ "-4",
- /* 55 313 T_Ipv6 */ "ipv6",
- /* 56 314 T_Ipv6_flag */ "-6",
- /* 57 315 T_Kernel */ "kernel",
- /* 58 316 T_Key */ "key",
- /* 59 317 T_Keys */ "keys",
- /* 60 318 T_Keysdir */ "keysdir",
- /* 61 319 T_Kod */ "kod",
- /* 62 320 T_Mssntp */ "mssntp",
- /* 63 321 T_Leapfile */ "leapfile",
- /* 64 322 T_Limited */ "limited",
- /* 65 323 T_Link */ "link",
- /* 66 324 T_Listen */ "listen",
- /* 67 325 T_Logconfig */ "logconfig",
- /* 68 326 T_Logfile */ "logfile",
- /* 69 327 T_Loopstats */ "loopstats",
- /* 70 328 T_Lowpriotrap */ "lowpriotrap",
- /* 71 329 T_Manycastclient */ "manycastclient",
- /* 72 330 T_Manycastserver */ "manycastserver",
- /* 73 331 T_Mask */ "mask",
- /* 74 332 T_Maxclock */ "maxclock",
- /* 75 333 T_Maxdist */ "maxdist",
- /* 76 334 T_Maxpoll */ "maxpoll",
- /* 77 335 T_Minclock */ "minclock",
- /* 78 336 T_Mindist */ "mindist",
- /* 79 337 T_Minimum */ "minimum",
- /* 80 338 T_Minpoll */ "minpoll",
- /* 81 339 T_Minsane */ "minsane",
- /* 82 340 T_Mode */ "mode",
- /* 83 341 T_Monitor */ "monitor",
- /* 84 342 T_Month */ "month",
- /* 85 343 T_Multicastclient */ "multicastclient",
- /* 86 344 T_Nic */ "nic",
- /* 87 345 T_Nolink */ "nolink",
- /* 88 346 T_Nomodify */ "nomodify",
- /* 89 347 T_None */ "none",
- /* 90 348 T_Nopeer */ "nopeer",
- /* 91 349 T_Noquery */ "noquery",
- /* 92 350 T_Noselect */ "noselect",
- /* 93 351 T_Noserve */ "noserve",
- /* 94 352 T_Notrap */ "notrap",
- /* 95 353 T_Notrust */ "notrust",
- /* 96 354 T_Ntp */ "ntp",
- /* 97 355 T_Ntpport */ "ntpport",
- /* 98 356 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 99 357 T_Orphan */ "orphan",
- /* 100 358 T_Panic */ "panic",
- /* 101 359 T_Peer */ "peer",
- /* 102 360 T_Peerstats */ "peerstats",
- /* 103 361 T_Phone */ "phone",
- /* 104 362 T_Pid */ "pid",
- /* 105 363 T_Pidfile */ "pidfile",
- /* 106 364 T_Pool */ "pool",
- /* 107 365 T_Port */ "port",
- /* 108 366 T_Preempt */ "preempt",
- /* 109 367 T_Prefer */ "prefer",
- /* 110 368 T_Protostats */ "protostats",
- /* 111 369 T_Pw */ "pw",
- /* 112 370 T_Qos */ "qos",
- /* 113 371 T_Randfile */ "randfile",
- /* 114 372 T_Rawstats */ "rawstats",
- /* 115 373 T_Refid */ "refid",
- /* 116 374 T_Requestkey */ "requestkey",
- /* 117 375 T_Restrict */ "restrict",
- /* 118 376 T_Revoke */ "revoke",
- /* 119 377 T_Saveconfigdir */ "saveconfigdir",
- /* 120 378 T_Server */ "server",
- /* 121 379 T_Setvar */ "setvar",
- /* 122 380 T_Sign */ "sign",
- /* 123 381 T_Statistics */ "statistics",
- /* 124 382 T_Stats */ "stats",
- /* 125 383 T_Statsdir */ "statsdir",
- /* 126 384 T_Step */ "step",
- /* 127 385 T_Stepout */ "stepout",
- /* 128 386 T_Stratum */ "stratum",
- /* 129 387 T_String */ NULL,
- /* 130 388 T_Sysstats */ "sysstats",
- /* 131 389 T_Tick */ "tick",
- /* 132 390 T_Time1 */ "time1",
- /* 133 391 T_Time2 */ "time2",
- /* 134 392 T_Timingstats */ "timingstats",
- /* 135 393 T_Tinker */ "tinker",
- /* 136 394 T_Tos */ "tos",
- /* 137 395 T_Trap */ "trap",
- /* 138 396 T_True */ "true",
- /* 139 397 T_Trustedkey */ "trustedkey",
- /* 140 398 T_Ttl */ "ttl",
- /* 141 399 T_Type */ "type",
- /* 142 400 T_Unconfig */ "unconfig",
- /* 143 401 T_Unpeer */ "unpeer",
- /* 144 402 T_Version */ "version",
- /* 145 403 T_WanderThreshold */ NULL,
- /* 146 404 T_Week */ "week",
- /* 147 405 T_Wildcard */ "wildcard",
- /* 148 406 T_Xleave */ "xleave",
- /* 149 407 T_Year */ "year",
- /* 150 408 T_Flag */ NULL,
- /* 151 409 T_Void */ NULL,
- /* 152 410 T_EOC */ NULL,
- /* 153 411 T_Simulate */ "simulate",
- /* 154 412 T_Beep_Delay */ "beep_delay",
- /* 155 413 T_Sim_Duration */ "simulation_duration",
- /* 156 414 T_Server_Offset */ "server_offset",
- /* 157 415 T_Duration */ "duration",
- /* 158 416 T_Freq_Offset */ "freq_offset",
- /* 159 417 T_Wander */ "wander",
- /* 160 418 T_Jitter */ "jitter",
- /* 161 419 T_Prop_Delay */ "prop_delay",
- /* 162 420 T_Proc_Delay */ "proc_delay"
+ /* 22 280 T_Ctl */ "ctl",
+ /* 23 281 T_Day */ "day",
+ /* 24 282 T_Default */ "default",
+ /* 25 283 T_Digest */ "digest",
+ /* 26 284 T_Disable */ "disable",
+ /* 27 285 T_Discard */ "discard",
+ /* 28 286 T_Dispersion */ "dispersion",
+ /* 29 287 T_Double */ NULL,
+ /* 30 288 T_Driftfile */ "driftfile",
+ /* 31 289 T_Drop */ "drop",
+ /* 32 290 T_Ellipsis */ "...",
+ /* 33 291 T_Enable */ "enable",
+ /* 34 292 T_End */ "end",
+ /* 35 293 T_False */ NULL,
+ /* 36 294 T_File */ "file",
+ /* 37 295 T_Filegen */ "filegen",
+ /* 38 296 T_Filenum */ "filenum",
+ /* 39 297 T_Flag1 */ "flag1",
+ /* 40 298 T_Flag2 */ "flag2",
+ /* 41 299 T_Flag3 */ "flag3",
+ /* 42 300 T_Flag4 */ "flag4",
+ /* 43 301 T_Flake */ "flake",
+ /* 44 302 T_Floor */ "floor",
+ /* 45 303 T_Freq */ "freq",
+ /* 46 304 T_Fudge */ "fudge",
+ /* 47 305 T_Host */ "host",
+ /* 48 306 T_Huffpuff */ "huffpuff",
+ /* 49 307 T_Iburst */ "iburst",
+ /* 50 308 T_Ident */ "ident",
+ /* 51 309 T_Ignore */ "ignore",
+ /* 52 310 T_Incalloc */ "incalloc",
+ /* 53 311 T_Incmem */ "incmem",
+ /* 54 312 T_Initalloc */ "initalloc",
+ /* 55 313 T_Initmem */ "initmem",
+ /* 56 314 T_Includefile */ "includefile",
+ /* 57 315 T_Integer */ NULL,
+ /* 58 316 T_Interface */ "interface",
+ /* 59 317 T_Intrange */ NULL,
+ /* 60 318 T_Io */ "io",
+ /* 61 319 T_Ipv4 */ "ipv4",
+ /* 62 320 T_Ipv4_flag */ "-4",
+ /* 63 321 T_Ipv6 */ "ipv6",
+ /* 64 322 T_Ipv6_flag */ "-6",
+ /* 65 323 T_Kernel */ "kernel",
+ /* 66 324 T_Key */ "key",
+ /* 67 325 T_Keys */ "keys",
+ /* 68 326 T_Keysdir */ "keysdir",
+ /* 69 327 T_Kod */ "kod",
+ /* 70 328 T_Mssntp */ "mssntp",
+ /* 71 329 T_Leapfile */ "leapfile",
+ /* 72 330 T_Limited */ "limited",
+ /* 73 331 T_Link */ "link",
+ /* 74 332 T_Listen */ "listen",
+ /* 75 333 T_Logconfig */ "logconfig",
+ /* 76 334 T_Logfile */ "logfile",
+ /* 77 335 T_Loopstats */ "loopstats",
+ /* 78 336 T_Lowpriotrap */ "lowpriotrap",
+ /* 79 337 T_Manycastclient */ "manycastclient",
+ /* 80 338 T_Manycastserver */ "manycastserver",
+ /* 81 339 T_Mask */ "mask",
+ /* 82 340 T_Maxage */ "maxage",
+ /* 83 341 T_Maxclock */ "maxclock",
+ /* 84 342 T_Maxdepth */ "maxdepth",
+ /* 85 343 T_Maxdist */ "maxdist",
+ /* 86 344 T_Maxmem */ "maxmem",
+ /* 87 345 T_Maxpoll */ "maxpoll",
+ /* 88 346 T_Mem */ "mem",
+ /* 89 347 T_Memlock */ "memlock",
+ /* 90 348 T_Minclock */ "minclock",
+ /* 91 349 T_Mindepth */ "mindepth",
+ /* 92 350 T_Mindist */ "mindist",
+ /* 93 351 T_Minimum */ "minimum",
+ /* 94 352 T_Minpoll */ "minpoll",
+ /* 95 353 T_Minsane */ "minsane",
+ /* 96 354 T_Mode */ "mode",
+ /* 97 355 T_Mode7 */ "mode7",
+ /* 98 356 T_Monitor */ "monitor",
+ /* 99 357 T_Month */ "month",
+ /* 100 358 T_Mru */ "mru",
+ /* 101 359 T_Multicastclient */ "multicastclient",
+ /* 102 360 T_Nic */ "nic",
+ /* 103 361 T_Nolink */ "nolink",
+ /* 104 362 T_Nomodify */ "nomodify",
+ /* 105 363 T_Nomrulist */ "nomrulist",
+ /* 106 364 T_None */ "none",
+ /* 107 365 T_Nonvolatile */ "nonvolatile",
+ /* 108 366 T_Nopeer */ "nopeer",
+ /* 109 367 T_Noquery */ "noquery",
+ /* 110 368 T_Noselect */ "noselect",
+ /* 111 369 T_Noserve */ "noserve",
+ /* 112 370 T_Notrap */ "notrap",
+ /* 113 371 T_Notrust */ "notrust",
+ /* 114 372 T_Ntp */ "ntp",
+ /* 115 373 T_Ntpport */ "ntpport",
+ /* 116 374 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 117 375 T_Orphan */ "orphan",
+ /* 118 376 T_Orphanwait */ "orphanwait",
+ /* 119 377 T_Panic */ "panic",
+ /* 120 378 T_Peer */ "peer",
+ /* 121 379 T_Peerstats */ "peerstats",
+ /* 122 380 T_Phone */ "phone",
+ /* 123 381 T_Pid */ "pid",
+ /* 124 382 T_Pidfile */ "pidfile",
+ /* 125 383 T_Pool */ "pool",
+ /* 126 384 T_Port */ "port",
+ /* 127 385 T_Preempt */ "preempt",
+ /* 128 386 T_Prefer */ "prefer",
+ /* 129 387 T_Protostats */ "protostats",
+ /* 130 388 T_Pw */ "pw",
+ /* 131 389 T_Randfile */ "randfile",
+ /* 132 390 T_Rawstats */ "rawstats",
+ /* 133 391 T_Refid */ "refid",
+ /* 134 392 T_Requestkey */ "requestkey",
+ /* 135 393 T_Reset */ "reset",
+ /* 136 394 T_Restrict */ "restrict",
+ /* 137 395 T_Revoke */ "revoke",
+ /* 138 396 T_Rlimit */ "rlimit",
+ /* 139 397 T_Saveconfigdir */ "saveconfigdir",
+ /* 140 398 T_Server */ "server",
+ /* 141 399 T_Setvar */ "setvar",
+ /* 142 400 T_Source */ "source",
+ /* 143 401 T_Stacksize */ "stacksize",
+ /* 144 402 T_Statistics */ "statistics",
+ /* 145 403 T_Stats */ "stats",
+ /* 146 404 T_Statsdir */ "statsdir",
+ /* 147 405 T_Step */ "step",
+ /* 148 406 T_Stepout */ "stepout",
+ /* 149 407 T_Stratum */ "stratum",
+ /* 150 408 T_String */ NULL,
+ /* 151 409 T_Sys */ "sys",
+ /* 152 410 T_Sysstats */ "sysstats",
+ /* 153 411 T_Tick */ "tick",
+ /* 154 412 T_Time1 */ "time1",
+ /* 155 413 T_Time2 */ "time2",
+ /* 156 414 T_Timer */ "timer",
+ /* 157 415 T_Timingstats */ "timingstats",
+ /* 158 416 T_Tinker */ "tinker",
+ /* 159 417 T_Tos */ "tos",
+ /* 160 418 T_Trap */ "trap",
+ /* 161 419 T_True */ "true",
+ /* 162 420 T_Trustedkey */ "trustedkey",
+ /* 163 421 T_Ttl */ "ttl",
+ /* 164 422 T_Type */ "type",
+ /* 165 423 T_U_int */ NULL,
+ /* 166 424 T_Unconfig */ "unconfig",
+ /* 167 425 T_Unpeer */ "unpeer",
+ /* 168 426 T_Version */ "version",
+ /* 169 427 T_WanderThreshold */ NULL,
+ /* 170 428 T_Week */ "week",
+ /* 171 429 T_Wildcard */ "wildcard",
+ /* 172 430 T_Xleave */ "xleave",
+ /* 173 431 T_Year */ "year",
+ /* 174 432 T_Flag */ NULL,
+ /* 175 433 T_EOC */ NULL,
+ /* 176 434 T_Simulate */ "simulate",
+ /* 177 435 T_Beep_Delay */ "beep_delay",
+ /* 178 436 T_Sim_Duration */ "simulation_duration",
+ /* 179 437 T_Server_Offset */ "server_offset",
+ /* 180 438 T_Duration */ "duration",
+ /* 181 439 T_Freq_Offset */ "freq_offset",
+ /* 182 440 T_Wander */ "wander",
+ /* 183 441 T_Jitter */ "jitter",
+ /* 184 442 T_Prop_Delay */ "prop_delay",
+ /* 185 443 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 742
+#define SCANNER_INIT_S 822
-const scan_state sst[745] = {
+const scan_state sst[825] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
- S_ST( '-', 3, 314, 0 ), /* 1 */
+ S_ST( '-', 3, 322, 0 ), /* 1 */
S_ST( '.', 3, 3, 1 ), /* 2 */
- S_ST( '.', 3, 289, 0 ), /* 3 */
- S_ST( 'a', 3, 15, 2 ), /* 4 */
- S_ST( 'g', 3, 258, 0 ), /* 5 */
- S_ST( 'l', 3, 259, 5 ), /* 6 */
- S_ST( 'a', 3, 260, 0 ), /* 7 */
- S_ST( 'u', 3, 9, 6 ), /* 8 */
- S_ST( 't', 3, 10, 0 ), /* 9 */
- S_ST( 'o', 3, 13, 261 ), /* 10 */
- S_ST( 'k', 3, 12, 0 ), /* 11 */
- S_ST( 'e', 3, 262, 0 ), /* 12 */
- S_ST( 'm', 3, 14, 11 ), /* 13 */
- S_ST( 'a', 3, 263, 0 ), /* 14 */
- S_ST( 'v', 3, 16, 8 ), /* 15 */
- S_ST( 'e', 3, 17, 0 ), /* 16 */
- S_ST( 'r', 3, 18, 0 ), /* 17 */
- S_ST( 'a', 3, 19, 0 ), /* 18 */
- S_ST( 'g', 3, 264, 0 ), /* 19 */
- S_ST( 'b', 3, 55, 4 ), /* 20 */
- S_ST( 'c', 3, 22, 0 ), /* 21 */
- S_ST( 'l', 3, 23, 0 ), /* 22 */
- S_ST( 'i', 3, 24, 0 ), /* 23 */
- S_ST( 'e', 3, 25, 0 ), /* 24 */
- S_ST( 'n', 3, 265, 0 ), /* 25 */
- S_ST( 'e', 3, 30, 21 ), /* 26 */
- S_ST( 'a', 3, 28, 0 ), /* 27 */
- S_ST( 'c', 3, 29, 0 ), /* 28 */
- S_ST( 'o', 3, 266, 0 ), /* 29 */
- S_ST( 'e', 3, 31, 27 ), /* 30 */
- S_ST( 'p', 3, 32, 0 ), /* 31 */
- S_ST( '_', 3, 33, 0 ), /* 32 */
- S_ST( 'd', 3, 34, 0 ), /* 33 */
- S_ST( 'e', 3, 35, 0 ), /* 34 */
- S_ST( 'l', 3, 36, 0 ), /* 35 */
- S_ST( 'a', 3, 412, 0 ), /* 36 */
- S_ST( 'i', 3, 38, 26 ), /* 37 */
- S_ST( 'a', 3, 267, 0 ), /* 38 */
- S_ST( 'r', 3, 40, 37 ), /* 39 */
- S_ST( 'o', 3, 41, 0 ), /* 40 */
- S_ST( 'a', 3, 42, 0 ), /* 41 */
- S_ST( 'd', 3, 43, 0 ), /* 42 */
- S_ST( 'c', 3, 44, 0 ), /* 43 */
- S_ST( 'a', 3, 45, 0 ), /* 44 */
- S_ST( 's', 3, 268, 0 ), /* 45 */
- S_ST( 'c', 3, 47, 0 ), /* 46 */
- S_ST( 'l', 3, 48, 0 ), /* 47 */
- S_ST( 'i', 3, 49, 0 ), /* 48 */
- S_ST( 'e', 3, 50, 0 ), /* 49 */
- S_ST( 'n', 3, 269, 0 ), /* 50 */
- S_ST( 'd', 3, 52, 46 ), /* 51 */
- S_ST( 'e', 3, 53, 0 ), /* 52 */
- S_ST( 'l', 3, 54, 0 ), /* 53 */
- S_ST( 'a', 3, 270, 0 ), /* 54 */
- S_ST( 'u', 3, 56, 39 ), /* 55 */
- S_ST( 'r', 3, 57, 0 ), /* 56 */
- S_ST( 's', 3, 271, 0 ), /* 57 */
- S_ST( 'c', 3, 95, 20 ), /* 58 */
- S_ST( 'a', 3, 60, 0 ), /* 59 */
- S_ST( 'l', 3, 66, 0 ), /* 60 */
- S_ST( 'i', 3, 62, 0 ), /* 61 */
- S_ST( 'b', 3, 63, 0 ), /* 62 */
- S_ST( 'r', 3, 64, 0 ), /* 63 */
- S_ST( 'a', 3, 65, 0 ), /* 64 */
- S_ST( 't', 3, 272, 0 ), /* 65 */
- S_ST( 'l', 3, 67, 61 ), /* 66 */
- S_ST( 'd', 3, 68, 0 ), /* 67 */
- S_ST( 'e', 3, 69, 0 ), /* 68 */
- S_ST( 'l', 3, 70, 0 ), /* 69 */
- S_ST( 'a', 3, 273, 0 ), /* 70 */
- S_ST( 'e', 3, 72, 59 ), /* 71 */
- S_ST( 'i', 3, 73, 0 ), /* 72 */
- S_ST( 'l', 3, 74, 0 ), /* 73 */
- S_ST( 'i', 3, 75, 0 ), /* 74 */
- S_ST( 'n', 3, 274, 0 ), /* 75 */
- S_ST( 'l', 3, 77, 71 ), /* 76 */
- S_ST( 'o', 3, 78, 0 ), /* 77 */
- S_ST( 'c', 3, 79, 0 ), /* 78 */
- S_ST( 'k', 3, 80, 0 ), /* 79 */
- S_ST( 's', 3, 81, 0 ), /* 80 */
- S_ST( 't', 3, 82, 0 ), /* 81 */
- S_ST( 'a', 3, 83, 0 ), /* 82 */
- S_ST( 't', 3, 275, 0 ), /* 83 */
- S_ST( 'o', 3, 88, 76 ), /* 84 */
- S_ST( 'h', 3, 86, 0 ), /* 85 */
- S_ST( 'o', 3, 87, 0 ), /* 86 */
- S_ST( 'r', 3, 276, 0 ), /* 87 */
- S_ST( 'n', 3, 89, 85 ), /* 88 */
- S_ST( 't', 3, 90, 0 ), /* 89 */
- S_ST( 'r', 3, 91, 0 ), /* 90 */
- S_ST( 'o', 3, 92, 0 ), /* 91 */
- S_ST( 'l', 3, 93, 0 ), /* 92 */
- S_ST( 'k', 3, 94, 0 ), /* 93 */
- S_ST( 'e', 3, 277, 0 ), /* 94 */
- S_ST( 'r', 3, 96, 84 ), /* 95 */
- S_ST( 'y', 3, 97, 0 ), /* 96 */
- S_ST( 'p', 3, 98, 0 ), /* 97 */
- S_ST( 't', 3, 278, 0 ), /* 98 */
- S_ST( 's', 3, 100, 0 ), /* 99 */
- S_ST( 't', 3, 101, 0 ), /* 100 */
- S_ST( 'a', 3, 102, 0 ), /* 101 */
- S_ST( 't', 3, 279, 0 ), /* 102 */
- S_ST( 'd', 3, 135, 58 ), /* 103 */
- S_ST( 'a', 3, 280, 0 ), /* 104 */
- S_ST( 'e', 3, 106, 104 ), /* 105 */
- S_ST( 'f', 3, 107, 0 ), /* 106 */
- S_ST( 'a', 3, 108, 0 ), /* 107 */
- S_ST( 'u', 3, 109, 0 ), /* 108 */
- S_ST( 'l', 3, 281, 0 ), /* 109 */
- S_ST( 'i', 3, 114, 105 ), /* 110 */
- S_ST( 'g', 3, 112, 0 ), /* 111 */
- S_ST( 'e', 3, 113, 0 ), /* 112 */
- S_ST( 's', 3, 282, 0 ), /* 113 */
- S_ST( 's', 3, 121, 111 ), /* 114 */
- S_ST( 'a', 3, 116, 0 ), /* 115 */
- S_ST( 'b', 3, 117, 0 ), /* 116 */
- S_ST( 'l', 3, 283, 0 ), /* 117 */
- S_ST( 'c', 3, 119, 115 ), /* 118 */
- S_ST( 'a', 3, 120, 0 ), /* 119 */
- S_ST( 'r', 3, 284, 0 ), /* 120 */
- S_ST( 'p', 3, 122, 118 ), /* 121 */
- S_ST( 'e', 3, 123, 0 ), /* 122 */
- S_ST( 'r', 3, 124, 0 ), /* 123 */
- S_ST( 's', 3, 125, 0 ), /* 124 */
- S_ST( 'i', 3, 126, 0 ), /* 125 */
- S_ST( 'o', 3, 285, 0 ), /* 126 */
- S_ST( 'r', 3, 134, 110 ), /* 127 */
- S_ST( 'i', 3, 129, 0 ), /* 128 */
- S_ST( 'f', 3, 130, 0 ), /* 129 */
- S_ST( 't', 3, 131, 0 ), /* 130 */
- S_ST( 'f', 3, 132, 0 ), /* 131 */
- S_ST( 'i', 3, 133, 0 ), /* 132 */
- S_ST( 'l', 3, 287, 0 ), /* 133 */
- S_ST( 'o', 3, 288, 128 ), /* 134 */
- S_ST( 'u', 3, 136, 127 ), /* 135 */
- S_ST( 'r', 3, 137, 0 ), /* 136 */
- S_ST( 'a', 3, 138, 0 ), /* 137 */
- S_ST( 't', 3, 139, 0 ), /* 138 */
- S_ST( 'i', 3, 140, 0 ), /* 139 */
- S_ST( 'o', 3, 415, 0 ), /* 140 */
- S_ST( 'e', 3, 142, 103 ), /* 141 */
- S_ST( 'n', 3, 291, 0 ), /* 142 */
- S_ST( 'a', 3, 144, 0 ), /* 143 */
- S_ST( 'b', 3, 145, 0 ), /* 144 */
- S_ST( 'l', 3, 290, 0 ), /* 145 */
- S_ST( 'f', 3, 165, 141 ), /* 146 */
- S_ST( 'i', 3, 148, 0 ), /* 147 */
- S_ST( 'l', 3, 293, 0 ), /* 148 */
- S_ST( 'g', 3, 150, 0 ), /* 149 */
- S_ST( 'e', 3, 294, 0 ), /* 150 */
- S_ST( 'l', 3, 155, 147 ), /* 151 */
- S_ST( 'a', 3, 154, 0 ), /* 152 */
- S_ST( 'g', 3, 298, 0 ), /* 153 */
- S_ST( 'k', 3, 299, 153 ), /* 154 */
- S_ST( 'o', 3, 156, 152 ), /* 155 */
- S_ST( 'o', 3, 300, 0 ), /* 156 */
- S_ST( 'r', 3, 158, 151 ), /* 157 */
- S_ST( 'e', 3, 301, 0 ), /* 158 */
- S_ST( '_', 3, 160, 0 ), /* 159 */
- S_ST( 'o', 3, 161, 0 ), /* 160 */
- S_ST( 'f', 3, 162, 0 ), /* 161 */
- S_ST( 'f', 3, 163, 0 ), /* 162 */
- S_ST( 's', 3, 164, 0 ), /* 163 */
- S_ST( 'e', 3, 416, 0 ), /* 164 */
- S_ST( 'u', 3, 166, 157 ), /* 165 */
- S_ST( 'd', 3, 167, 0 ), /* 166 */
- S_ST( 'g', 3, 302, 0 ), /* 167 */
- S_ST( 'h', 3, 171, 146 ), /* 168 */
- S_ST( 'o', 3, 170, 0 ), /* 169 */
- S_ST( 's', 3, 303, 0 ), /* 170 */
- S_ST( 'u', 3, 172, 169 ), /* 171 */
- S_ST( 'f', 3, 173, 0 ), /* 172 */
- S_ST( 'f', 3, 174, 0 ), /* 173 */
- S_ST( 'p', 3, 175, 0 ), /* 174 */
- S_ST( 'u', 3, 176, 0 ), /* 175 */
- S_ST( 'f', 3, 304, 0 ), /* 176 */
- S_ST( 'i', 3, 204, 168 ), /* 177 */
- S_ST( 'b', 3, 179, 0 ), /* 178 */
- S_ST( 'u', 3, 180, 0 ), /* 179 */
- S_ST( 'r', 3, 181, 0 ), /* 180 */
- S_ST( 's', 3, 305, 0 ), /* 181 */
- S_ST( 'd', 3, 183, 178 ), /* 182 */
- S_ST( 'e', 3, 184, 0 ), /* 183 */
- S_ST( 'n', 3, 306, 0 ), /* 184 */
- S_ST( 'g', 3, 186, 182 ), /* 185 */
- S_ST( 'n', 3, 187, 0 ), /* 186 */
- S_ST( 'o', 3, 188, 0 ), /* 187 */
- S_ST( 'r', 3, 307, 0 ), /* 188 */
- S_ST( 'n', 3, 198, 185 ), /* 189 */
- S_ST( 'c', 3, 191, 0 ), /* 190 */
- S_ST( 'l', 3, 192, 0 ), /* 191 */
- S_ST( 'u', 3, 193, 0 ), /* 192 */
- S_ST( 'd', 3, 194, 0 ), /* 193 */
- S_ST( 'e', 3, 195, 0 ), /* 194 */
- S_ST( 'f', 3, 196, 0 ), /* 195 */
- S_ST( 'i', 3, 197, 0 ), /* 196 */
- S_ST( 'l', 3, 308, 0 ), /* 197 */
- S_ST( 't', 3, 199, 190 ), /* 198 */
- S_ST( 'e', 3, 200, 0 ), /* 199 */
- S_ST( 'r', 3, 201, 0 ), /* 200 */
- S_ST( 'f', 3, 202, 0 ), /* 201 */
- S_ST( 'a', 3, 203, 0 ), /* 202 */
- S_ST( 'c', 3, 310, 0 ), /* 203 */
- S_ST( 'p', 3, 205, 189 ), /* 204 */
- S_ST( 'v', 3, 313, 0 ), /* 205 */
- S_ST( 'j', 3, 207, 177 ), /* 206 */
- S_ST( 'i', 3, 208, 0 ), /* 207 */
- S_ST( 't', 3, 209, 0 ), /* 208 */
- S_ST( 't', 3, 210, 0 ), /* 209 */
- S_ST( 'e', 3, 418, 0 ), /* 210 */
- S_ST( 'k', 3, 218, 206 ), /* 211 */
- S_ST( 'e', 3, 316, 0 ), /* 212 */
- S_ST( 'r', 3, 214, 0 ), /* 213 */
- S_ST( 'n', 3, 215, 0 ), /* 214 */
- S_ST( 'e', 3, 315, 0 ), /* 215 */
- S_ST( 'd', 3, 217, 0 ), /* 216 */
- S_ST( 'i', 3, 318, 0 ), /* 217 */
- S_ST( 'o', 3, 319, 212 ), /* 218 */
- S_ST( 'l', 3, 235, 211 ), /* 219 */
- S_ST( 'e', 3, 221, 0 ), /* 220 */
- S_ST( 'a', 3, 222, 0 ), /* 221 */
- S_ST( 'p', 3, 223, 0 ), /* 222 */
- S_ST( 'f', 3, 224, 0 ), /* 223 */
- S_ST( 'i', 3, 225, 0 ), /* 224 */
- S_ST( 'l', 3, 321, 0 ), /* 225 */
- S_ST( 'i', 3, 232, 220 ), /* 226 */
- S_ST( 'm', 3, 228, 0 ), /* 227 */
- S_ST( 'i', 3, 229, 0 ), /* 228 */
- S_ST( 't', 3, 230, 0 ), /* 229 */
- S_ST( 'e', 3, 322, 0 ), /* 230 */
- S_ST( 'n', 3, 323, 227 ), /* 231 */
- S_ST( 's', 3, 233, 231 ), /* 232 */
- S_ST( 't', 3, 234, 0 ), /* 233 */
- S_ST( 'e', 3, 324, 0 ), /* 234 */
- S_ST( 'o', 3, 251, 226 ), /* 235 */
- S_ST( 'g', 3, 242, 0 ), /* 236 */
- S_ST( 'c', 3, 238, 0 ), /* 237 */
- S_ST( 'o', 3, 239, 0 ), /* 238 */
- S_ST( 'n', 3, 240, 0 ), /* 239 */
- S_ST( 'f', 3, 241, 0 ), /* 240 */
- S_ST( 'i', 3, 325, 0 ), /* 241 */
- S_ST( 'f', 3, 243, 237 ), /* 242 */
- S_ST( 'i', 3, 244, 0 ), /* 243 */
- S_ST( 'l', 3, 326, 0 ), /* 244 */
- S_ST( 'o', 3, 246, 236 ), /* 245 */
- S_ST( 'p', 3, 247, 0 ), /* 246 */
- S_ST( 's', 3, 248, 0 ), /* 247 */
- S_ST( 't', 3, 249, 0 ), /* 248 */
- S_ST( 'a', 3, 250, 0 ), /* 249 */
- S_ST( 't', 3, 327, 0 ), /* 250 */
- S_ST( 'w', 3, 252, 245 ), /* 251 */
- S_ST( 'p', 3, 253, 0 ), /* 252 */
- S_ST( 'r', 3, 254, 0 ), /* 253 */
- S_ST( 'i', 3, 255, 0 ), /* 254 */
- S_ST( 'o', 3, 256, 0 ), /* 255 */
- S_ST( 't', 3, 257, 0 ), /* 256 */
- S_ST( 'r', 3, 286, 0 ), /* 257 */
- S_ST( 'e', 0, 0, 0 ), /* 258 T_Age */
- S_ST( 'l', 0, 7, 0 ), /* 259 T_All */
- S_ST( 'n', 0, 0, 0 ), /* 260 T_Allan */
- S_ST( 'h', 0, 0, 0 ), /* 261 T_Auth */
- S_ST( 'y', 0, 0, 0 ), /* 262 T_Autokey */
- S_ST( 'x', 0, 0, 0 ), /* 263 T_Automax */
- S_ST( 'e', 0, 0, 0 ), /* 264 T_Average */
- S_ST( 't', 0, 0, 0 ), /* 265 T_Bclient */
- S_ST( 'n', 0, 0, 0 ), /* 266 T_Beacon */
- S_ST( 's', 0, 0, 0 ), /* 267 T_Bias */
- S_ST( 't', 1, 51, 0 ), /* 268 T_Broadcast */
- S_ST( 't', 0, 0, 0 ), /* 269 T_Broadcastclient */
- S_ST( 'y', 0, 0, 0 ), /* 270 T_Broadcastdelay */
- S_ST( 't', 0, 0, 0 ), /* 271 T_Burst */
- S_ST( 'e', 0, 0, 0 ), /* 272 T_Calibrate */
- S_ST( 'y', 0, 0, 0 ), /* 273 T_Calldelay */
+ S_ST( '.', 3, 290, 0 ), /* 3 . */
+ S_ST( 'a', 3, 23, 2 ), /* 4 */
+ S_ST( 'b', 3, 6, 0 ), /* 5 a */
+ S_ST( 'b', 3, 7, 0 ), /* 6 ab */
+ S_ST( 'r', 3, 8, 0 ), /* 7 abb */
+ S_ST( 'e', 3, 258, 0 ), /* 8 abbr */
+ S_ST( 'g', 3, 259, 5 ), /* 9 a */
+ S_ST( 'l', 3, 260, 9 ), /* 10 a */
+ S_ST( 'a', 3, 261, 0 ), /* 11 all */
+ S_ST( 'p', 3, 13, 11 ), /* 12 all */
+ S_ST( 'e', 3, 14, 0 ), /* 13 allp */
+ S_ST( 'e', 3, 15, 0 ), /* 14 allpe */
+ S_ST( 'r', 3, 262, 0 ), /* 15 allpee */
+ S_ST( 'u', 3, 17, 10 ), /* 16 a */
+ S_ST( 't', 3, 18, 0 ), /* 17 au */
+ S_ST( 'o', 3, 21, 263 ), /* 18 aut */
+ S_ST( 'k', 3, 20, 0 ), /* 19 auto */
+ S_ST( 'e', 3, 264, 0 ), /* 20 autok */
+ S_ST( 'm', 3, 22, 19 ), /* 21 auto */
+ S_ST( 'a', 3, 265, 0 ), /* 22 autom */
+ S_ST( 'v', 3, 24, 16 ), /* 23 a */
+ S_ST( 'e', 3, 25, 0 ), /* 24 av */
+ S_ST( 'r', 3, 26, 0 ), /* 25 ave */
+ S_ST( 'a', 3, 27, 0 ), /* 26 aver */
+ S_ST( 'g', 3, 266, 0 ), /* 27 avera */
+ S_ST( 'b', 3, 61, 4 ), /* 28 */
+ S_ST( 'c', 3, 30, 0 ), /* 29 b */
+ S_ST( 'l', 3, 31, 0 ), /* 30 bc */
+ S_ST( 'i', 3, 32, 0 ), /* 31 bcl */
+ S_ST( 'e', 3, 33, 0 ), /* 32 bcli */
+ S_ST( 'n', 3, 267, 0 ), /* 33 bclie */
+ S_ST( 'e', 3, 38, 29 ), /* 34 b */
+ S_ST( 'a', 3, 36, 0 ), /* 35 be */
+ S_ST( 'c', 3, 37, 0 ), /* 36 bea */
+ S_ST( 'o', 3, 268, 0 ), /* 37 beac */
+ S_ST( 'e', 3, 39, 35 ), /* 38 be */
+ S_ST( 'p', 3, 40, 0 ), /* 39 bee */
+ S_ST( '_', 3, 41, 0 ), /* 40 beep */
+ S_ST( 'd', 3, 42, 0 ), /* 41 beep_ */
+ S_ST( 'e', 3, 43, 0 ), /* 42 beep_d */
+ S_ST( 'l', 3, 44, 0 ), /* 43 beep_de */
+ S_ST( 'a', 3, 435, 0 ), /* 44 beep_del */
+ S_ST( 'r', 3, 46, 34 ), /* 45 b */
+ S_ST( 'o', 3, 47, 0 ), /* 46 br */
+ S_ST( 'a', 3, 48, 0 ), /* 47 bro */
+ S_ST( 'd', 3, 49, 0 ), /* 48 broa */
+ S_ST( 'c', 3, 50, 0 ), /* 49 broad */
+ S_ST( 'a', 3, 51, 0 ), /* 50 broadc */
+ S_ST( 's', 3, 269, 0 ), /* 51 broadca */
+ S_ST( 'c', 3, 53, 0 ), /* 52 broadcast */
+ S_ST( 'l', 3, 54, 0 ), /* 53 broadcastc */
+ S_ST( 'i', 3, 55, 0 ), /* 54 broadcastcl */
+ S_ST( 'e', 3, 56, 0 ), /* 55 broadcastcli */
+ S_ST( 'n', 3, 270, 0 ), /* 56 broadcastclie */
+ S_ST( 'd', 3, 58, 52 ), /* 57 broadcast */
+ S_ST( 'e', 3, 59, 0 ), /* 58 broadcastd */
+ S_ST( 'l', 3, 60, 0 ), /* 59 broadcastde */
+ S_ST( 'a', 3, 271, 0 ), /* 60 broadcastdel */
+ S_ST( 'u', 3, 62, 45 ), /* 61 b */
+ S_ST( 'r', 3, 63, 0 ), /* 62 bu */
+ S_ST( 's', 3, 272, 0 ), /* 63 bur */
+ S_ST( 'c', 3, 104, 28 ), /* 64 */
+ S_ST( 'a', 3, 66, 0 ), /* 65 c */
+ S_ST( 'l', 3, 67, 0 ), /* 66 ca */
+ S_ST( 'i', 3, 68, 0 ), /* 67 cal */
+ S_ST( 'b', 3, 69, 0 ), /* 68 cali */
+ S_ST( 'r', 3, 70, 0 ), /* 69 calib */
+ S_ST( 'a', 3, 71, 0 ), /* 70 calibr */
+ S_ST( 't', 3, 273, 0 ), /* 71 calibra */
+ S_ST( 'e', 3, 73, 65 ), /* 72 c */
+ S_ST( 'i', 3, 74, 0 ), /* 73 ce */
+ S_ST( 'l', 3, 75, 0 ), /* 74 cei */
+ S_ST( 'i', 3, 76, 0 ), /* 75 ceil */
+ S_ST( 'n', 3, 274, 0 ), /* 76 ceili */
+ S_ST( 'l', 3, 78, 72 ), /* 77 c */
+ S_ST( 'o', 3, 79, 0 ), /* 78 cl */
+ S_ST( 'c', 3, 80, 0 ), /* 79 clo */
+ S_ST( 'k', 3, 81, 0 ), /* 80 cloc */
+ S_ST( 's', 3, 82, 0 ), /* 81 clock */
+ S_ST( 't', 3, 83, 0 ), /* 82 clocks */
+ S_ST( 'a', 3, 84, 0 ), /* 83 clockst */
+ S_ST( 't', 3, 275, 0 ), /* 84 clocksta */
+ S_ST( 'o', 3, 89, 77 ), /* 85 c */
+ S_ST( 'h', 3, 87, 0 ), /* 86 co */
+ S_ST( 'o', 3, 88, 0 ), /* 87 coh */
+ S_ST( 'r', 3, 276, 0 ), /* 88 coho */
+ S_ST( 'n', 3, 90, 86 ), /* 89 co */
+ S_ST( 't', 3, 91, 0 ), /* 90 con */
+ S_ST( 'r', 3, 92, 0 ), /* 91 cont */
+ S_ST( 'o', 3, 93, 0 ), /* 92 contr */
+ S_ST( 'l', 3, 94, 0 ), /* 93 contro */
+ S_ST( 'k', 3, 95, 0 ), /* 94 control */
+ S_ST( 'e', 3, 277, 0 ), /* 95 controlk */
+ S_ST( 'r', 3, 97, 85 ), /* 96 c */
+ S_ST( 'y', 3, 98, 0 ), /* 97 cr */
+ S_ST( 'p', 3, 99, 0 ), /* 98 cry */
+ S_ST( 't', 3, 278, 0 ), /* 99 cryp */
+ S_ST( 's', 3, 101, 0 ), /* 100 crypto */
+ S_ST( 't', 3, 102, 0 ), /* 101 cryptos */
+ S_ST( 'a', 3, 103, 0 ), /* 102 cryptost */
+ S_ST( 't', 3, 279, 0 ), /* 103 cryptosta */
+ S_ST( 't', 3, 280, 96 ), /* 104 c */
+ S_ST( 'd', 3, 137, 64 ), /* 105 */
+ S_ST( 'a', 3, 281, 0 ), /* 106 d */
+ S_ST( 'e', 3, 108, 106 ), /* 107 d */
+ S_ST( 'f', 3, 109, 0 ), /* 108 de */
+ S_ST( 'a', 3, 110, 0 ), /* 109 def */
+ S_ST( 'u', 3, 111, 0 ), /* 110 defa */
+ S_ST( 'l', 3, 282, 0 ), /* 111 defau */
+ S_ST( 'i', 3, 116, 107 ), /* 112 d */
+ S_ST( 'g', 3, 114, 0 ), /* 113 di */
+ S_ST( 'e', 3, 115, 0 ), /* 114 dig */
+ S_ST( 's', 3, 283, 0 ), /* 115 dige */
+ S_ST( 's', 3, 123, 113 ), /* 116 di */
+ S_ST( 'a', 3, 118, 0 ), /* 117 dis */
+ S_ST( 'b', 3, 119, 0 ), /* 118 disa */
+ S_ST( 'l', 3, 284, 0 ), /* 119 disab */
+ S_ST( 'c', 3, 121, 117 ), /* 120 dis */
+ S_ST( 'a', 3, 122, 0 ), /* 121 disc */
+ S_ST( 'r', 3, 285, 0 ), /* 122 disca */
+ S_ST( 'p', 3, 124, 120 ), /* 123 dis */
+ S_ST( 'e', 3, 125, 0 ), /* 124 disp */
+ S_ST( 'r', 3, 126, 0 ), /* 125 dispe */
+ S_ST( 's', 3, 127, 0 ), /* 126 disper */
+ S_ST( 'i', 3, 128, 0 ), /* 127 dispers */
+ S_ST( 'o', 3, 286, 0 ), /* 128 dispersi */
+ S_ST( 'r', 3, 136, 112 ), /* 129 d */
+ S_ST( 'i', 3, 131, 0 ), /* 130 dr */
+ S_ST( 'f', 3, 132, 0 ), /* 131 dri */
+ S_ST( 't', 3, 133, 0 ), /* 132 drif */
+ S_ST( 'f', 3, 134, 0 ), /* 133 drift */
+ S_ST( 'i', 3, 135, 0 ), /* 134 driftf */
+ S_ST( 'l', 3, 288, 0 ), /* 135 driftfi */
+ S_ST( 'o', 3, 289, 130 ), /* 136 dr */
+ S_ST( 'u', 3, 138, 129 ), /* 137 d */
+ S_ST( 'r', 3, 139, 0 ), /* 138 du */
+ S_ST( 'a', 3, 140, 0 ), /* 139 dur */
+ S_ST( 't', 3, 141, 0 ), /* 140 dura */
+ S_ST( 'i', 3, 142, 0 ), /* 141 durat */
+ S_ST( 'o', 3, 438, 0 ), /* 142 durati */
+ S_ST( 'e', 3, 144, 105 ), /* 143 */
+ S_ST( 'n', 3, 292, 0 ), /* 144 e */
+ S_ST( 'a', 3, 146, 0 ), /* 145 en */
+ S_ST( 'b', 3, 147, 0 ), /* 146 ena */
+ S_ST( 'l', 3, 291, 0 ), /* 147 enab */
+ S_ST( 'f', 3, 169, 143 ), /* 148 */
+ S_ST( 'i', 3, 150, 0 ), /* 149 f */
+ S_ST( 'l', 3, 294, 0 ), /* 150 fi */
+ S_ST( 'g', 3, 152, 0 ), /* 151 file */
+ S_ST( 'e', 3, 295, 0 ), /* 152 fileg */
+ S_ST( 'n', 3, 154, 151 ), /* 153 file */
+ S_ST( 'u', 3, 296, 0 ), /* 154 filen */
+ S_ST( 'l', 3, 159, 149 ), /* 155 f */
+ S_ST( 'a', 3, 158, 0 ), /* 156 fl */
+ S_ST( 'g', 3, 300, 0 ), /* 157 fla */
+ S_ST( 'k', 3, 301, 157 ), /* 158 fla */
+ S_ST( 'o', 3, 160, 156 ), /* 159 fl */
+ S_ST( 'o', 3, 302, 0 ), /* 160 flo */
+ S_ST( 'r', 3, 162, 155 ), /* 161 f */
+ S_ST( 'e', 3, 303, 0 ), /* 162 fr */
+ S_ST( '_', 3, 164, 0 ), /* 163 freq */
+ S_ST( 'o', 3, 165, 0 ), /* 164 freq_ */
+ S_ST( 'f', 3, 166, 0 ), /* 165 freq_o */
+ S_ST( 'f', 3, 167, 0 ), /* 166 freq_of */
+ S_ST( 's', 3, 168, 0 ), /* 167 freq_off */
+ S_ST( 'e', 3, 439, 0 ), /* 168 freq_offs */
+ S_ST( 'u', 3, 170, 161 ), /* 169 f */
+ S_ST( 'd', 3, 171, 0 ), /* 170 fu */
+ S_ST( 'g', 3, 304, 0 ), /* 171 fud */
+ S_ST( 'h', 3, 175, 148 ), /* 172 */
+ S_ST( 'o', 3, 174, 0 ), /* 173 h */
+ S_ST( 's', 3, 305, 0 ), /* 174 ho */
+ S_ST( 'u', 3, 176, 173 ), /* 175 h */
+ S_ST( 'f', 3, 177, 0 ), /* 176 hu */
+ S_ST( 'f', 3, 178, 0 ), /* 177 huf */
+ S_ST( 'p', 3, 179, 0 ), /* 178 huff */
+ S_ST( 'u', 3, 180, 0 ), /* 179 huffp */
+ S_ST( 'f', 3, 306, 0 ), /* 180 huffpu */
+ S_ST( 'i', 3, 222, 172 ), /* 181 */
+ S_ST( 'b', 3, 183, 0 ), /* 182 i */
+ S_ST( 'u', 3, 184, 0 ), /* 183 ib */
+ S_ST( 'r', 3, 185, 0 ), /* 184 ibu */
+ S_ST( 's', 3, 307, 0 ), /* 185 ibur */
+ S_ST( 'd', 3, 187, 182 ), /* 186 i */
+ S_ST( 'e', 3, 188, 0 ), /* 187 id */
+ S_ST( 'n', 3, 308, 0 ), /* 188 ide */
+ S_ST( 'g', 3, 190, 186 ), /* 189 i */
+ S_ST( 'n', 3, 191, 0 ), /* 190 ig */
+ S_ST( 'o', 3, 192, 0 ), /* 191 ign */
+ S_ST( 'r', 3, 309, 0 ), /* 192 igno */
+ S_ST( 'n', 3, 216, 189 ), /* 193 i */
+ S_ST( 'c', 3, 206, 0 ), /* 194 in */
+ S_ST( 'a', 3, 196, 0 ), /* 195 inc */
+ S_ST( 'l', 3, 197, 0 ), /* 196 inca */
+ S_ST( 'l', 3, 198, 0 ), /* 197 incal */
+ S_ST( 'o', 3, 310, 0 ), /* 198 incall */
+ S_ST( 'l', 3, 200, 195 ), /* 199 inc */
+ S_ST( 'u', 3, 201, 0 ), /* 200 incl */
+ S_ST( 'd', 3, 202, 0 ), /* 201 inclu */
+ S_ST( 'e', 3, 203, 0 ), /* 202 includ */
+ S_ST( 'f', 3, 204, 0 ), /* 203 include */
+ S_ST( 'i', 3, 205, 0 ), /* 204 includef */
+ S_ST( 'l', 3, 314, 0 ), /* 205 includefi */
+ S_ST( 'm', 3, 207, 199 ), /* 206 inc */
+ S_ST( 'e', 3, 311, 0 ), /* 207 incm */
+ S_ST( 'i', 3, 209, 194 ), /* 208 in */
+ S_ST( 't', 3, 214, 0 ), /* 209 ini */
+ S_ST( 'a', 3, 211, 0 ), /* 210 init */
+ S_ST( 'l', 3, 212, 0 ), /* 211 inita */
+ S_ST( 'l', 3, 213, 0 ), /* 212 inital */
+ S_ST( 'o', 3, 312, 0 ), /* 213 initall */
+ S_ST( 'm', 3, 215, 210 ), /* 214 init */
+ S_ST( 'e', 3, 313, 0 ), /* 215 initm */
+ S_ST( 't', 3, 217, 208 ), /* 216 in */
+ S_ST( 'e', 3, 218, 0 ), /* 217 int */
+ S_ST( 'r', 3, 219, 0 ), /* 218 inte */
+ S_ST( 'f', 3, 220, 0 ), /* 219 inter */
+ S_ST( 'a', 3, 221, 0 ), /* 220 interf */
+ S_ST( 'c', 3, 316, 0 ), /* 221 interfa */
+ S_ST( 'p', 3, 223, 318 ), /* 222 i */
+ S_ST( 'v', 3, 321, 0 ), /* 223 ip */
+ S_ST( 'j', 3, 225, 181 ), /* 224 */
+ S_ST( 'i', 3, 226, 0 ), /* 225 j */
+ S_ST( 't', 3, 227, 0 ), /* 226 ji */
+ S_ST( 't', 3, 228, 0 ), /* 227 jit */
+ S_ST( 'e', 3, 441, 0 ), /* 228 jitt */
+ S_ST( 'k', 3, 236, 224 ), /* 229 */
+ S_ST( 'e', 3, 324, 0 ), /* 230 k */
+ S_ST( 'r', 3, 232, 0 ), /* 231 ke */
+ S_ST( 'n', 3, 233, 0 ), /* 232 ker */
+ S_ST( 'e', 3, 323, 0 ), /* 233 kern */
+ S_ST( 'd', 3, 235, 0 ), /* 234 keys */
+ S_ST( 'i', 3, 326, 0 ), /* 235 keysd */
+ S_ST( 'o', 3, 327, 230 ), /* 236 k */
+ S_ST( 'l', 3, 253, 229 ), /* 237 */
+ S_ST( 'e', 3, 239, 0 ), /* 238 l */
+ S_ST( 'a', 3, 240, 0 ), /* 239 le */
+ S_ST( 'p', 3, 241, 0 ), /* 240 lea */
+ S_ST( 'f', 3, 242, 0 ), /* 241 leap */
+ S_ST( 'i', 3, 243, 0 ), /* 242 leapf */
+ S_ST( 'l', 3, 329, 0 ), /* 243 leapfi */
+ S_ST( 'i', 3, 250, 238 ), /* 244 l */
+ S_ST( 'm', 3, 246, 0 ), /* 245 li */
+ S_ST( 'i', 3, 247, 0 ), /* 246 lim */
+ S_ST( 't', 3, 248, 0 ), /* 247 limi */
+ S_ST( 'e', 3, 330, 0 ), /* 248 limit */
+ S_ST( 'n', 3, 331, 245 ), /* 249 li */
+ S_ST( 's', 3, 251, 249 ), /* 250 li */
+ S_ST( 't', 3, 252, 0 ), /* 251 lis */
+ S_ST( 'e', 3, 332, 0 ), /* 252 list */
+ S_ST( 'o', 3, 446, 244 ), /* 253 l */
+ S_ST( 'g', 3, 315, 0 ), /* 254 lo */
+ S_ST( 'c', 3, 256, 0 ), /* 255 log */
+ S_ST( 'o', 3, 257, 0 ), /* 256 logc */
+ S_ST( 'n', 3, 287, 0 ), /* 257 logco */
+ S_ST( 'v', 1, 0, 0 ), /* 258 T_Abbrev */
+ S_ST( 'e', 0, 0, 0 ), /* 259 T_Age */
+ S_ST( 'l', 0, 12, 0 ), /* 260 T_All */
+ S_ST( 'n', 0, 0, 0 ), /* 261 T_Allan */
+ S_ST( 's', 0, 0, 0 ), /* 262 T_Allpeers */
+ S_ST( 'h', 0, 0, 0 ), /* 263 T_Auth */
+ S_ST( 'y', 0, 0, 0 ), /* 264 T_Autokey */
+ S_ST( 'x', 0, 0, 0 ), /* 265 T_Automax */
+ S_ST( 'e', 0, 0, 0 ), /* 266 T_Average */
+ S_ST( 't', 0, 0, 0 ), /* 267 T_Bclient */
+ S_ST( 'n', 0, 0, 0 ), /* 268 T_Beacon */
+ S_ST( 't', 1, 57, 0 ), /* 269 T_Broadcast */
+ S_ST( 't', 0, 0, 0 ), /* 270 T_Broadcastclient */
+ S_ST( 'y', 0, 0, 0 ), /* 271 T_Broadcastdelay */
+ S_ST( 't', 0, 0, 0 ), /* 272 T_Burst */
+ S_ST( 'e', 0, 0, 0 ), /* 273 T_Calibrate */
S_ST( 'g', 0, 0, 0 ), /* 274 T_Ceiling */
S_ST( 's', 0, 0, 0 ), /* 275 T_Clockstats */
S_ST( 't', 0, 0, 0 ), /* 276 T_Cohort */
S_ST( 'y', 0, 0, 0 ), /* 277 T_ControlKey */
- S_ST( 'o', 0, 99, 0 ), /* 278 T_Crypto */
+ S_ST( 'o', 0, 100, 0 ), /* 278 T_Crypto */
S_ST( 's', 0, 0, 0 ), /* 279 T_Cryptostats */
- S_ST( 'y', 0, 0, 0 ), /* 280 T_Day */
- S_ST( 't', 0, 0, 0 ), /* 281 T_Default */
- S_ST( 't', 1, 0, 0 ), /* 282 T_Digest */
- S_ST( 'e', 0, 0, 0 ), /* 283 T_Disable */
- S_ST( 'd', 0, 0, 0 ), /* 284 T_Discard */
- S_ST( 'n', 0, 0, 0 ), /* 285 T_Dispersion */
- S_ST( 'a', 3, 328, 0 ), /* 286 */
- S_ST( 'e', 1, 0, 0 ), /* 287 T_Driftfile */
- S_ST( 'p', 0, 0, 0 ), /* 288 T_Drop */
- S_ST( '.', 0, 0, 0 ), /* 289 T_Ellipsis */
- S_ST( 'e', 0, 0, 0 ), /* 290 T_Enable */
- S_ST( 'd', 0, 0, 143 ), /* 291 T_End */
- S_ST( 'm', 3, 473, 219 ), /* 292 */
- S_ST( 'e', 1, 149, 0 ), /* 293 T_File */
- S_ST( 'n', 0, 0, 0 ), /* 294 T_Filegen */
- S_ST( '1', 0, 0, 0 ), /* 295 T_Flag1 */
- S_ST( '2', 0, 0, 295 ), /* 296 T_Flag2 */
- S_ST( '3', 0, 0, 296 ), /* 297 T_Flag3 */
- S_ST( '4', 0, 0, 297 ), /* 298 T_Flag4 */
- S_ST( 'e', 0, 0, 0 ), /* 299 T_Flake */
- S_ST( 'r', 0, 0, 0 ), /* 300 T_Floor */
- S_ST( 'q', 0, 159, 0 ), /* 301 T_Freq */
- S_ST( 'e', 1, 0, 0 ), /* 302 T_Fudge */
- S_ST( 't', 1, 0, 0 ), /* 303 T_Host */
- S_ST( 'f', 0, 0, 0 ), /* 304 T_Huffpuff */
- S_ST( 't', 0, 0, 0 ), /* 305 T_Iburst */
- S_ST( 't', 1, 0, 0 ), /* 306 T_Ident */
- S_ST( 'e', 0, 0, 0 ), /* 307 T_Ignore */
- S_ST( 'e', 1, 0, 0 ), /* 308 T_Includefile */
- S_ST( 'a', 3, 433, 0 ), /* 309 */
- S_ST( 'e', 0, 0, 0 ), /* 310 T_Interface */
- S_ST( '4', 0, 0, 0 ), /* 311 T_Ipv4 */
- S_ST( '4', 0, 0, 0 ), /* 312 T_Ipv4_flag */
- S_ST( '6', 0, 0, 311 ), /* 313 T_Ipv6 */
- S_ST( '6', 0, 0, 312 ), /* 314 T_Ipv6_flag */
- S_ST( 'l', 0, 0, 0 ), /* 315 T_Kernel */
- S_ST( 'y', 0, 317, 213 ), /* 316 T_Key */
- S_ST( 's', 1, 216, 0 ), /* 317 T_Keys */
- S_ST( 'r', 1, 0, 0 ), /* 318 T_Keysdir */
- S_ST( 'd', 0, 0, 0 ), /* 319 T_Kod */
- S_ST( 'p', 0, 0, 0 ), /* 320 T_Mssntp */
- S_ST( 'e', 1, 0, 0 ), /* 321 T_Leapfile */
- S_ST( 'd', 0, 0, 0 ), /* 322 T_Limited */
- S_ST( 'k', 0, 0, 0 ), /* 323 T_Link */
- S_ST( 'n', 0, 0, 0 ), /* 324 T_Listen */
- S_ST( 'g', 2, 0, 0 ), /* 325 T_Logconfig */
- S_ST( 'e', 1, 0, 0 ), /* 326 T_Logfile */
- S_ST( 's', 0, 0, 0 ), /* 327 T_Loopstats */
- S_ST( 'p', 0, 0, 0 ), /* 328 T_Lowpriotrap */
- S_ST( 't', 1, 0, 0 ), /* 329 T_Manycastclient */
- S_ST( 'r', 2, 0, 0 ), /* 330 T_Manycastserver */
- S_ST( 'k', 0, 0, 0 ), /* 331 T_Mask */
- S_ST( 'k', 0, 0, 0 ), /* 332 T_Maxclock */
- S_ST( 't', 0, 0, 0 ), /* 333 T_Maxdist */
- S_ST( 'l', 0, 0, 0 ), /* 334 T_Maxpoll */
- S_ST( 'k', 0, 0, 0 ), /* 335 T_Minclock */
- S_ST( 't', 0, 0, 0 ), /* 336 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 337 T_Minimum */
- S_ST( 'l', 0, 0, 0 ), /* 338 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 339 T_Minsane */
- S_ST( 'e', 0, 0, 0 ), /* 340 T_Mode */
- S_ST( 'r', 0, 0, 0 ), /* 341 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 342 T_Month */
- S_ST( 't', 2, 0, 0 ), /* 343 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 344 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 345 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 346 T_Nomodify */
- S_ST( 'e', 0, 0, 0 ), /* 347 T_None */
- S_ST( 'r', 0, 0, 0 ), /* 348 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 349 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 350 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 351 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 352 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 353 T_Notrust */
- S_ST( 'p', 0, 521, 0 ), /* 354 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 355 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 356 T_NtpSignDsocket */
- S_ST( 'n', 0, 0, 0 ), /* 357 T_Orphan */
- S_ST( 'c', 0, 0, 0 ), /* 358 T_Panic */
- S_ST( 'r', 1, 542, 0 ), /* 359 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 360 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 361 T_Phone */
- S_ST( 'd', 0, 550, 0 ), /* 362 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 363 T_Pidfile */
- S_ST( 'l', 1, 0, 0 ), /* 364 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 365 T_Port */
- S_ST( 't', 0, 0, 0 ), /* 366 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 367 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 368 T_Protostats */
- S_ST( 'w', 1, 0, 556 ), /* 369 T_Pw */
- S_ST( 's', 0, 0, 0 ), /* 370 T_Qos */
- S_ST( 'e', 1, 0, 0 ), /* 371 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 372 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 373 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 374 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 375 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 376 T_Revoke */
- S_ST( 'r', 1, 0, 0 ), /* 377 T_Saveconfigdir */
- S_ST( 'r', 1, 630, 0 ), /* 378 T_Server */
- S_ST( 'r', 1, 0, 0 ), /* 379 T_Setvar */
- S_ST( 'n', 1, 0, 0 ), /* 380 T_Sign */
- S_ST( 's', 0, 0, 0 ), /* 381 T_Statistics */
- S_ST( 's', 0, 665, 660 ), /* 382 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 383 T_Statsdir */
- S_ST( 'p', 0, 668, 0 ), /* 384 T_Step */
- S_ST( 't', 0, 0, 0 ), /* 385 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 386 T_Stratum */
- S_ST( 'n', 3, 403, 0 ), /* 387 */
- S_ST( 's', 0, 0, 0 ), /* 388 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 389 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 390 T_Time1 */
- S_ST( '2', 0, 0, 390 ), /* 391 T_Time2 */
- S_ST( 's', 0, 0, 0 ), /* 392 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 393 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 394 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 395 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 396 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 397 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 398 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 399 T_Type */
- S_ST( 'g', 1, 0, 0 ), /* 400 T_Unconfig */
- S_ST( 'r', 1, 0, 0 ), /* 401 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 402 T_Version */
- S_ST( 'y', 3, 408, 0 ), /* 403 */
- S_ST( 'k', 0, 0, 0 ), /* 404 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 405 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 406 T_Xleave */
- S_ST( 'r', 0, 0, 0 ), /* 407 T_Year */
- S_ST( 'c', 3, 409, 0 ), /* 408 */
- S_ST( 'a', 3, 410, 0 ), /* 409 */
- S_ST( 's', 3, 421, 0 ), /* 410 */
- S_ST( 'e', 0, 0, 0 ), /* 411 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 412 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 413 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 414 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 415 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 416 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 417 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 418 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 419 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 420 T_Proc_Delay */
- S_ST( 't', 3, 427, 0 ), /* 421 */
- S_ST( 'c', 3, 423, 0 ), /* 422 */
- S_ST( 'l', 3, 424, 0 ), /* 423 */
- S_ST( 'i', 3, 425, 0 ), /* 424 */
- S_ST( 'e', 3, 426, 0 ), /* 425 */
- S_ST( 'n', 3, 329, 0 ), /* 426 */
- S_ST( 's', 3, 428, 422 ), /* 427 */
- S_ST( 'e', 3, 429, 0 ), /* 428 */
- S_ST( 'r', 3, 430, 0 ), /* 429 */
- S_ST( 'v', 3, 431, 0 ), /* 430 */
- S_ST( 'e', 3, 330, 0 ), /* 431 */
- S_ST( 's', 3, 331, 387 ), /* 432 */
- S_ST( 'x', 3, 441, 432 ), /* 433 */
- S_ST( 'c', 3, 435, 0 ), /* 434 */
- S_ST( 'l', 3, 436, 0 ), /* 435 */
- S_ST( 'o', 3, 437, 0 ), /* 436 */
- S_ST( 'c', 3, 332, 0 ), /* 437 */
- S_ST( 'd', 3, 439, 434 ), /* 438 */
- S_ST( 'i', 3, 440, 0 ), /* 439 */
- S_ST( 's', 3, 333, 0 ), /* 440 */
- S_ST( 'p', 3, 442, 438 ), /* 441 */
- S_ST( 'o', 3, 443, 0 ), /* 442 */
- S_ST( 'l', 3, 334, 0 ), /* 443 */
- S_ST( 'i', 3, 445, 309 ), /* 444 */
- S_ST( 'n', 3, 459, 0 ), /* 445 */
- S_ST( 'c', 3, 447, 0 ), /* 446 */
- S_ST( 'l', 3, 448, 0 ), /* 447 */
- S_ST( 'o', 3, 449, 0 ), /* 448 */
- S_ST( 'c', 3, 335, 0 ), /* 449 */
- S_ST( 'd', 3, 451, 446 ), /* 450 */
- S_ST( 'i', 3, 452, 0 ), /* 451 */
- S_ST( 's', 3, 336, 0 ), /* 452 */
- S_ST( 'i', 3, 454, 450 ), /* 453 */
- S_ST( 'm', 3, 455, 0 ), /* 454 */
- S_ST( 'u', 3, 337, 0 ), /* 455 */
- S_ST( 'p', 3, 457, 453 ), /* 456 */
- S_ST( 'o', 3, 458, 0 ), /* 457 */
- S_ST( 'l', 3, 338, 0 ), /* 458 */
- S_ST( 's', 3, 460, 456 ), /* 459 */
- S_ST( 'a', 3, 461, 0 ), /* 460 */
- S_ST( 'n', 3, 339, 0 ), /* 461 */
- S_ST( 'o', 3, 464, 444 ), /* 462 */
- S_ST( 'd', 3, 340, 0 ), /* 463 */
- S_ST( 'n', 3, 468, 463 ), /* 464 */
- S_ST( 'i', 3, 466, 0 ), /* 465 */
- S_ST( 't', 3, 467, 0 ), /* 466 */
- S_ST( 'o', 3, 341, 0 ), /* 467 */
- S_ST( 't', 3, 342, 465 ), /* 468 */
- S_ST( 's', 3, 470, 462 ), /* 469 */
- S_ST( 's', 3, 471, 0 ), /* 470 */
- S_ST( 'n', 3, 472, 0 ), /* 471 */
- S_ST( 't', 3, 320, 0 ), /* 472 */
- S_ST( 'u', 3, 474, 469 ), /* 473 */
- S_ST( 'l', 3, 475, 0 ), /* 474 */
- S_ST( 't', 3, 476, 0 ), /* 475 */
- S_ST( 'i', 3, 477, 0 ), /* 476 */
- S_ST( 'c', 3, 478, 0 ), /* 477 */
- S_ST( 'a', 3, 479, 0 ), /* 478 */
- S_ST( 's', 3, 480, 0 ), /* 479 */
- S_ST( 't', 3, 481, 0 ), /* 480 */
- S_ST( 'c', 3, 482, 0 ), /* 481 */
- S_ST( 'l', 3, 483, 0 ), /* 482 */
- S_ST( 'i', 3, 484, 0 ), /* 483 */
- S_ST( 'e', 3, 485, 0 ), /* 484 */
- S_ST( 'n', 3, 343, 0 ), /* 485 */
- S_ST( 'n', 3, 517, 292 ), /* 486 */
- S_ST( 'i', 3, 344, 0 ), /* 487 */
- S_ST( 'o', 3, 512, 487 ), /* 488 */
- S_ST( 'l', 3, 490, 0 ), /* 489 */
- S_ST( 'i', 3, 491, 0 ), /* 490 */
- S_ST( 'n', 3, 345, 0 ), /* 491 */
- S_ST( 'm', 3, 493, 489 ), /* 492 */
- S_ST( 'o', 3, 494, 0 ), /* 493 */
- S_ST( 'd', 3, 495, 0 ), /* 494 */
- S_ST( 'i', 3, 496, 0 ), /* 495 */
- S_ST( 'f', 3, 346, 0 ), /* 496 */
- S_ST( 'n', 3, 347, 492 ), /* 497 */
- S_ST( 'p', 3, 499, 497 ), /* 498 */
- S_ST( 'e', 3, 500, 0 ), /* 499 */
- S_ST( 'e', 3, 348, 0 ), /* 500 */
- S_ST( 'q', 3, 502, 498 ), /* 501 */
- S_ST( 'u', 3, 503, 0 ), /* 502 */
- S_ST( 'e', 3, 504, 0 ), /* 503 */
- S_ST( 'r', 3, 349, 0 ), /* 504 */
- S_ST( 's', 3, 506, 501 ), /* 505 */
- S_ST( 'e', 3, 510, 0 ), /* 506 */
- S_ST( 'l', 3, 508, 0 ), /* 507 */
- S_ST( 'e', 3, 509, 0 ), /* 508 */
- S_ST( 'c', 3, 350, 0 ), /* 509 */
- S_ST( 'r', 3, 511, 507 ), /* 510 */
- S_ST( 'v', 3, 351, 0 ), /* 511 */
- S_ST( 't', 3, 513, 505 ), /* 512 */
- S_ST( 'r', 3, 515, 0 ), /* 513 */
- S_ST( 'a', 3, 352, 0 ), /* 514 */
- S_ST( 'u', 3, 516, 514 ), /* 515 */
- S_ST( 's', 3, 353, 0 ), /* 516 */
- S_ST( 't', 3, 354, 488 ), /* 517 */
- S_ST( 'p', 3, 519, 0 ), /* 518 */
- S_ST( 'o', 3, 520, 0 ), /* 519 */
- S_ST( 'r', 3, 355, 0 ), /* 520 */
- S_ST( 's', 3, 522, 518 ), /* 521 */
- S_ST( 'i', 3, 523, 0 ), /* 522 */
- S_ST( 'g', 3, 524, 0 ), /* 523 */
- S_ST( 'n', 3, 525, 0 ), /* 524 */
- S_ST( 'd', 3, 526, 0 ), /* 525 */
- S_ST( 's', 3, 527, 0 ), /* 526 */
- S_ST( 'o', 3, 528, 0 ), /* 527 */
- S_ST( 'c', 3, 529, 0 ), /* 528 */
- S_ST( 'k', 3, 530, 0 ), /* 529 */
- S_ST( 'e', 3, 356, 0 ), /* 530 */
- S_ST( 'o', 3, 532, 486 ), /* 531 */
- S_ST( 'r', 3, 533, 0 ), /* 532 */
- S_ST( 'p', 3, 534, 0 ), /* 533 */
- S_ST( 'h', 3, 535, 0 ), /* 534 */
- S_ST( 'a', 3, 357, 0 ), /* 535 */
- S_ST( 'p', 3, 369, 531 ), /* 536 */
- S_ST( 'a', 3, 538, 0 ), /* 537 */
- S_ST( 'n', 3, 539, 0 ), /* 538 */
- S_ST( 'i', 3, 358, 0 ), /* 539 */
- S_ST( 'e', 3, 541, 537 ), /* 540 */
- S_ST( 'e', 3, 359, 0 ), /* 541 */
- S_ST( 's', 3, 543, 0 ), /* 542 */
- S_ST( 't', 3, 544, 0 ), /* 543 */
- S_ST( 'a', 3, 545, 0 ), /* 544 */
- S_ST( 't', 3, 360, 0 ), /* 545 */
- S_ST( 'h', 3, 547, 540 ), /* 546 */
- S_ST( 'o', 3, 548, 0 ), /* 547 */
- S_ST( 'n', 3, 361, 0 ), /* 548 */
- S_ST( 'i', 3, 362, 546 ), /* 549 */
- S_ST( 'f', 3, 551, 0 ), /* 550 */
- S_ST( 'i', 3, 552, 0 ), /* 551 */
- S_ST( 'l', 3, 363, 0 ), /* 552 */
- S_ST( 'o', 3, 555, 549 ), /* 553 */
- S_ST( 'o', 3, 364, 0 ), /* 554 */
- S_ST( 'r', 3, 365, 554 ), /* 555 */
- S_ST( 'r', 3, 563, 553 ), /* 556 */
- S_ST( 'e', 3, 561, 0 ), /* 557 */
- S_ST( 'e', 3, 559, 0 ), /* 558 */
- S_ST( 'm', 3, 560, 0 ), /* 559 */
- S_ST( 'p', 3, 366, 0 ), /* 560 */
- S_ST( 'f', 3, 562, 558 ), /* 561 */
- S_ST( 'e', 3, 367, 0 ), /* 562 */
- S_ST( 'o', 3, 576, 557 ), /* 563 */
- S_ST( 'c', 3, 565, 0 ), /* 564 */
- S_ST( '_', 3, 566, 0 ), /* 565 */
- S_ST( 'd', 3, 567, 0 ), /* 566 */
- S_ST( 'e', 3, 568, 0 ), /* 567 */
- S_ST( 'l', 3, 569, 0 ), /* 568 */
- S_ST( 'a', 3, 420, 0 ), /* 569 */
- S_ST( 'p', 3, 571, 564 ), /* 570 */
- S_ST( '_', 3, 572, 0 ), /* 571 */
- S_ST( 'd', 3, 573, 0 ), /* 572 */
- S_ST( 'e', 3, 574, 0 ), /* 573 */
- S_ST( 'l', 3, 575, 0 ), /* 574 */
- S_ST( 'a', 3, 419, 0 ), /* 575 */
- S_ST( 't', 3, 577, 570 ), /* 576 */
- S_ST( 'o', 3, 578, 0 ), /* 577 */
- S_ST( 's', 3, 579, 0 ), /* 578 */
- S_ST( 't', 3, 580, 0 ), /* 579 */
- S_ST( 'a', 3, 581, 0 ), /* 580 */
- S_ST( 't', 3, 368, 0 ), /* 581 */
- S_ST( 'q', 3, 583, 536 ), /* 582 */
- S_ST( 'o', 3, 370, 0 ), /* 583 */
- S_ST( 'r', 3, 596, 582 ), /* 584 */
- S_ST( 'a', 3, 591, 0 ), /* 585 */
- S_ST( 'n', 3, 587, 0 ), /* 586 */
- S_ST( 'd', 3, 588, 0 ), /* 587 */
- S_ST( 'f', 3, 589, 0 ), /* 588 */
- S_ST( 'i', 3, 590, 0 ), /* 589 */
- S_ST( 'l', 3, 371, 0 ), /* 590 */
- S_ST( 'w', 3, 592, 586 ), /* 591 */
- S_ST( 's', 3, 593, 0 ), /* 592 */
- S_ST( 't', 3, 594, 0 ), /* 593 */
- S_ST( 'a', 3, 595, 0 ), /* 594 */
- S_ST( 't', 3, 372, 0 ), /* 595 */
- S_ST( 'e', 3, 611, 585 ), /* 596 */
- S_ST( 'f', 3, 598, 0 ), /* 597 */
- S_ST( 'i', 3, 373, 0 ), /* 598 */
- S_ST( 'q', 3, 600, 597 ), /* 599 */
- S_ST( 'u', 3, 601, 0 ), /* 600 */
- S_ST( 'e', 3, 602, 0 ), /* 601 */
- S_ST( 's', 3, 603, 0 ), /* 602 */
- S_ST( 't', 3, 604, 0 ), /* 603 */
- S_ST( 'k', 3, 605, 0 ), /* 604 */
- S_ST( 'e', 3, 374, 0 ), /* 605 */
- S_ST( 's', 3, 607, 599 ), /* 606 */
- S_ST( 't', 3, 608, 0 ), /* 607 */
- S_ST( 'r', 3, 609, 0 ), /* 608 */
- S_ST( 'i', 3, 610, 0 ), /* 609 */
- S_ST( 'c', 3, 375, 0 ), /* 610 */
- S_ST( 'v', 3, 612, 606 ), /* 611 */
- S_ST( 'o', 3, 613, 0 ), /* 612 */
- S_ST( 'k', 3, 376, 0 ), /* 613 */
- S_ST( 's', 3, 674, 584 ), /* 614 */
- S_ST( 'a', 3, 616, 0 ), /* 615 */
- S_ST( 'v', 3, 617, 0 ), /* 616 */
- S_ST( 'e', 3, 618, 0 ), /* 617 */
- S_ST( 'c', 3, 619, 0 ), /* 618 */
- S_ST( 'o', 3, 620, 0 ), /* 619 */
- S_ST( 'n', 3, 621, 0 ), /* 620 */
- S_ST( 'f', 3, 622, 0 ), /* 621 */
- S_ST( 'i', 3, 623, 0 ), /* 622 */
- S_ST( 'g', 3, 624, 0 ), /* 623 */
- S_ST( 'd', 3, 625, 0 ), /* 624 */
- S_ST( 'i', 3, 377, 0 ), /* 625 */
- S_ST( 'e', 3, 636, 615 ), /* 626 */
- S_ST( 'r', 3, 628, 0 ), /* 627 */
- S_ST( 'v', 3, 629, 0 ), /* 628 */
- S_ST( 'e', 3, 378, 0 ), /* 629 */
- S_ST( '_', 3, 631, 0 ), /* 630 */
- S_ST( 'o', 3, 632, 0 ), /* 631 */
- S_ST( 'f', 3, 633, 0 ), /* 632 */
- S_ST( 'f', 3, 634, 0 ), /* 633 */
- S_ST( 's', 3, 635, 0 ), /* 634 */
- S_ST( 'e', 3, 414, 0 ), /* 635 */
- S_ST( 't', 3, 637, 627 ), /* 636 */
- S_ST( 'v', 3, 638, 0 ), /* 637 */
- S_ST( 'a', 3, 379, 0 ), /* 638 */
- S_ST( 'i', 3, 641, 626 ), /* 639 */
- S_ST( 'g', 3, 380, 0 ), /* 640 */
- S_ST( 'm', 3, 642, 640 ), /* 641 */
- S_ST( 'u', 3, 643, 0 ), /* 642 */
- S_ST( 'l', 3, 644, 0 ), /* 643 */
- S_ST( 'a', 3, 645, 0 ), /* 644 */
- S_ST( 't', 3, 646, 0 ), /* 645 */
- S_ST( 'i', 3, 647, 411 ), /* 646 */
- S_ST( 'o', 3, 648, 0 ), /* 647 */
- S_ST( 'n', 3, 649, 0 ), /* 648 */
- S_ST( '_', 3, 650, 0 ), /* 649 */
- S_ST( 'd', 3, 651, 0 ), /* 650 */
- S_ST( 'u', 3, 652, 0 ), /* 651 */
- S_ST( 'r', 3, 653, 0 ), /* 652 */
- S_ST( 'a', 3, 654, 0 ), /* 653 */
- S_ST( 't', 3, 655, 0 ), /* 654 */
- S_ST( 'i', 3, 656, 0 ), /* 655 */
- S_ST( 'o', 3, 413, 0 ), /* 656 */
- S_ST( 't', 3, 670, 639 ), /* 657 */
- S_ST( 'a', 3, 659, 0 ), /* 658 */
- S_ST( 't', 3, 382, 0 ), /* 659 */
- S_ST( 'i', 3, 661, 0 ), /* 660 */
- S_ST( 's', 3, 662, 0 ), /* 661 */
- S_ST( 't', 3, 663, 0 ), /* 662 */
- S_ST( 'i', 3, 664, 0 ), /* 663 */
- S_ST( 'c', 3, 381, 0 ), /* 664 */
- S_ST( 'd', 3, 666, 0 ), /* 665 */
- S_ST( 'i', 3, 383, 0 ), /* 666 */
- S_ST( 'e', 3, 384, 658 ), /* 667 */
- S_ST( 'o', 3, 669, 0 ), /* 668 */
- S_ST( 'u', 3, 385, 0 ), /* 669 */
- S_ST( 'r', 3, 671, 667 ), /* 670 */
- S_ST( 'a', 3, 672, 0 ), /* 671 */
- S_ST( 't', 3, 673, 0 ), /* 672 */
- S_ST( 'u', 3, 386, 0 ), /* 673 */
- S_ST( 'y', 3, 675, 657 ), /* 674 */
- S_ST( 's', 3, 676, 0 ), /* 675 */
- S_ST( 's', 3, 677, 0 ), /* 676 */
- S_ST( 't', 3, 678, 0 ), /* 677 */
- S_ST( 'a', 3, 679, 0 ), /* 678 */
- S_ST( 't', 3, 388, 0 ), /* 679 */
- S_ST( 't', 3, 706, 614 ), /* 680 */
- S_ST( 'i', 3, 692, 0 ), /* 681 */
- S_ST( 'c', 3, 389, 0 ), /* 682 */
- S_ST( 'm', 3, 685, 682 ), /* 683 */
- S_ST( 'e', 3, 391, 0 ), /* 684 */
- S_ST( 'i', 3, 686, 684 ), /* 685 */
- S_ST( 'n', 3, 687, 0 ), /* 686 */
- S_ST( 'g', 3, 688, 0 ), /* 687 */
- S_ST( 's', 3, 689, 0 ), /* 688 */
- S_ST( 't', 3, 690, 0 ), /* 689 */
- S_ST( 'a', 3, 691, 0 ), /* 690 */
- S_ST( 't', 3, 392, 0 ), /* 691 */
- S_ST( 'n', 3, 693, 683 ), /* 692 */
- S_ST( 'k', 3, 694, 0 ), /* 693 */
- S_ST( 'e', 3, 393, 0 ), /* 694 */
- S_ST( 'o', 3, 394, 681 ), /* 695 */
- S_ST( 'r', 3, 698, 695 ), /* 696 */
- S_ST( 'a', 3, 395, 0 ), /* 697 */
- S_ST( 'u', 3, 699, 697 ), /* 698 */
- S_ST( 's', 3, 700, 396 ), /* 699 */
- S_ST( 't', 3, 701, 0 ), /* 700 */
- S_ST( 'e', 3, 702, 0 ), /* 701 */
- S_ST( 'd', 3, 703, 0 ), /* 702 */
- S_ST( 'k', 3, 704, 0 ), /* 703 */
- S_ST( 'e', 3, 397, 0 ), /* 704 */
- S_ST( 't', 3, 398, 696 ), /* 705 */
- S_ST( 'y', 3, 707, 705 ), /* 706 */
- S_ST( 'p', 3, 399, 0 ), /* 707 */
- S_ST( 'u', 3, 709, 680 ), /* 708 */
- S_ST( 'n', 3, 715, 0 ), /* 709 */
- S_ST( 'c', 3, 711, 0 ), /* 710 */
- S_ST( 'o', 3, 712, 0 ), /* 711 */
- S_ST( 'n', 3, 713, 0 ), /* 712 */
- S_ST( 'f', 3, 714, 0 ), /* 713 */
- S_ST( 'i', 3, 400, 0 ), /* 714 */
- S_ST( 'p', 3, 716, 710 ), /* 715 */
- S_ST( 'e', 3, 717, 0 ), /* 716 */
- S_ST( 'e', 3, 401, 0 ), /* 717 */
- S_ST( 'v', 3, 719, 708 ), /* 718 */
- S_ST( 'e', 3, 720, 0 ), /* 719 */
- S_ST( 'r', 3, 721, 0 ), /* 720 */
- S_ST( 's', 3, 722, 0 ), /* 721 */
- S_ST( 'i', 3, 723, 0 ), /* 722 */
- S_ST( 'o', 3, 402, 0 ), /* 723 */
- S_ST( 'w', 3, 731, 718 ), /* 724 */
- S_ST( 'a', 3, 726, 0 ), /* 725 */
- S_ST( 'n', 3, 727, 0 ), /* 726 */
- S_ST( 'd', 3, 728, 0 ), /* 727 */
- S_ST( 'e', 3, 417, 0 ), /* 728 */
- S_ST( 'e', 3, 730, 725 ), /* 729 */
- S_ST( 'e', 3, 404, 0 ), /* 730 */
- S_ST( 'i', 3, 732, 729 ), /* 731 */
- S_ST( 'l', 3, 733, 0 ), /* 732 */
- S_ST( 'd', 3, 734, 0 ), /* 733 */
- S_ST( 'c', 3, 735, 0 ), /* 734 */
- S_ST( 'a', 3, 736, 0 ), /* 735 */
- S_ST( 'r', 3, 405, 0 ), /* 736 */
- S_ST( 'x', 3, 738, 724 ), /* 737 */
- S_ST( 'l', 3, 739, 0 ), /* 738 */
- S_ST( 'e', 3, 740, 0 ), /* 739 */
- S_ST( 'a', 3, 741, 0 ), /* 740 */
- S_ST( 'v', 3, 406, 0 ), /* 741 */
- S_ST( 'y', 3, 743, 737 ), /* 742 initial state */
- S_ST( 'e', 3, 744, 0 ), /* 743 */
- S_ST( 'a', 3, 407, 0 ) /* 744 */
+ S_ST( 'l', 0, 0, 0 ), /* 280 T_Ctl */
+ S_ST( 'y', 0, 0, 0 ), /* 281 T_Day */
+ S_ST( 't', 0, 0, 0 ), /* 282 T_Default */
+ S_ST( 't', 1, 0, 0 ), /* 283 T_Digest */
+ S_ST( 'e', 0, 0, 0 ), /* 284 T_Disable */
+ S_ST( 'd', 0, 0, 0 ), /* 285 T_Discard */
+ S_ST( 'n', 0, 0, 0 ), /* 286 T_Dispersion */
+ S_ST( 'f', 3, 293, 0 ), /* 287 logcon */
+ S_ST( 'e', 1, 0, 0 ), /* 288 T_Driftfile */
+ S_ST( 'p', 0, 0, 0 ), /* 289 T_Drop */
+ S_ST( '.', 0, 0, 0 ), /* 290 T_Ellipsis */
+ S_ST( 'e', 0, 0, 0 ), /* 291 T_Enable */
+ S_ST( 'd', 0, 0, 145 ), /* 292 T_End */
+ S_ST( 'i', 3, 333, 0 ), /* 293 logconf */
+ S_ST( 'e', 1, 153, 0 ), /* 294 T_File */
+ S_ST( 'n', 0, 0, 0 ), /* 295 T_Filegen */
+ S_ST( 'm', 0, 0, 0 ), /* 296 T_Filenum */
+ S_ST( '1', 0, 0, 0 ), /* 297 T_Flag1 */
+ S_ST( '2', 0, 0, 297 ), /* 298 T_Flag2 */
+ S_ST( '3', 0, 0, 298 ), /* 299 T_Flag3 */
+ S_ST( '4', 0, 0, 299 ), /* 300 T_Flag4 */
+ S_ST( 'e', 0, 0, 0 ), /* 301 T_Flake */
+ S_ST( 'r', 0, 0, 0 ), /* 302 T_Floor */
+ S_ST( 'q', 0, 163, 0 ), /* 303 T_Freq */
+ S_ST( 'e', 1, 0, 0 ), /* 304 T_Fudge */
+ S_ST( 't', 1, 0, 0 ), /* 305 T_Host */
+ S_ST( 'f', 0, 0, 0 ), /* 306 T_Huffpuff */
+ S_ST( 't', 0, 0, 0 ), /* 307 T_Iburst */
+ S_ST( 't', 1, 0, 0 ), /* 308 T_Ident */
+ S_ST( 'e', 0, 0, 0 ), /* 309 T_Ignore */
+ S_ST( 'c', 0, 0, 0 ), /* 310 T_Incalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 311 T_Incmem */
+ S_ST( 'c', 0, 0, 0 ), /* 312 T_Initalloc */
+ S_ST( 'm', 0, 0, 0 ), /* 313 T_Initmem */
+ S_ST( 'e', 1, 0, 0 ), /* 314 T_Includefile */
+ S_ST( 'f', 3, 317, 255 ), /* 315 log */
+ S_ST( 'e', 0, 0, 0 ), /* 316 T_Interface */
+ S_ST( 'i', 3, 408, 0 ), /* 317 logf */
+ S_ST( 'o', 0, 0, 193 ), /* 318 T_Io */
+ S_ST( '4', 0, 0, 0 ), /* 319 T_Ipv4 */
+ S_ST( '4', 0, 0, 0 ), /* 320 T_Ipv4_flag */
+ S_ST( '6', 0, 0, 319 ), /* 321 T_Ipv6 */
+ S_ST( '6', 0, 0, 320 ), /* 322 T_Ipv6_flag */
+ S_ST( 'l', 0, 0, 0 ), /* 323 T_Kernel */
+ S_ST( 'y', 0, 325, 231 ), /* 324 T_Key */
+ S_ST( 's', 1, 234, 0 ), /* 325 T_Keys */
+ S_ST( 'r', 1, 0, 0 ), /* 326 T_Keysdir */
+ S_ST( 'd', 0, 0, 0 ), /* 327 T_Kod */
+ S_ST( 'p', 0, 0, 0 ), /* 328 T_Mssntp */
+ S_ST( 'e', 1, 0, 0 ), /* 329 T_Leapfile */
+ S_ST( 'd', 0, 0, 0 ), /* 330 T_Limited */
+ S_ST( 'k', 0, 0, 0 ), /* 331 T_Link */
+ S_ST( 'n', 0, 0, 0 ), /* 332 T_Listen */
+ S_ST( 'g', 2, 0, 0 ), /* 333 T_Logconfig */
+ S_ST( 'e', 1, 0, 0 ), /* 334 T_Logfile */
+ S_ST( 's', 0, 0, 0 ), /* 335 T_Loopstats */
+ S_ST( 'p', 0, 0, 0 ), /* 336 T_Lowpriotrap */
+ S_ST( 't', 1, 0, 0 ), /* 337 T_Manycastclient */
+ S_ST( 'r', 2, 0, 0 ), /* 338 T_Manycastserver */
+ S_ST( 'k', 0, 0, 0 ), /* 339 T_Mask */
+ S_ST( 'e', 0, 0, 0 ), /* 340 T_Maxage */
+ S_ST( 'k', 0, 0, 0 ), /* 341 T_Maxclock */
+ S_ST( 'h', 0, 0, 0 ), /* 342 T_Maxdepth */
+ S_ST( 't', 0, 0, 0 ), /* 343 T_Maxdist */
+ S_ST( 'm', 0, 0, 0 ), /* 344 T_Maxmem */
+ S_ST( 'l', 0, 0, 0 ), /* 345 T_Maxpoll */
+ S_ST( 'm', 0, 492, 0 ), /* 346 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 347 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 348 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 349 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 350 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 351 T_Minimum */
+ S_ST( 'l', 0, 0, 0 ), /* 352 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 353 T_Minsane */
+ S_ST( 'e', 0, 355, 0 ), /* 354 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 355 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 356 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 357 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 358 T_Mru */
+ S_ST( 't', 2, 0, 0 ), /* 359 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 360 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 361 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 362 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 363 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 364 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 365 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 366 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 367 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 368 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 369 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 370 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 371 T_Notrust */
+ S_ST( 'p', 0, 588, 0 ), /* 372 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 373 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 374 T_NtpSignDsocket */
+ S_ST( 'n', 0, 603, 0 ), /* 375 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 376 T_Orphanwait */
+ S_ST( 'c', 0, 0, 0 ), /* 377 T_Panic */
+ S_ST( 'r', 1, 612, 0 ), /* 378 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 379 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 380 T_Phone */
+ S_ST( 'd', 0, 620, 0 ), /* 381 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 382 T_Pidfile */
+ S_ST( 'l', 1, 0, 0 ), /* 383 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 384 T_Port */
+ S_ST( 't', 0, 0, 0 ), /* 385 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 386 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 387 T_Protostats */
+ S_ST( 'w', 1, 0, 626 ), /* 388 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 389 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 390 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 391 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 392 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 393 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 394 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 395 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 396 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 397 T_Saveconfigdir */
+ S_ST( 'r', 1, 703, 0 ), /* 398 T_Server */
+ S_ST( 'r', 1, 0, 0 ), /* 399 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 400 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 401 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 402 T_Statistics */
+ S_ST( 's', 0, 746, 741 ), /* 403 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 404 T_Statsdir */
+ S_ST( 'p', 0, 749, 0 ), /* 405 T_Step */
+ S_ST( 't', 0, 0, 0 ), /* 406 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 407 T_Stratum */
+ S_ST( 'l', 3, 334, 0 ), /* 408 logfi */
+ S_ST( 's', 0, 756, 0 ), /* 409 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 410 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 411 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 412 T_Time1 */
+ S_ST( '2', 0, 0, 412 ), /* 413 T_Time2 */
+ S_ST( 'r', 0, 0, 413 ), /* 414 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 415 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 416 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 417 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 418 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 419 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 420 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 421 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 422 T_Type */
+ S_ST( 'o', 3, 427, 254 ), /* 423 lo */
+ S_ST( 'g', 1, 0, 0 ), /* 424 T_Unconfig */
+ S_ST( 'r', 1, 0, 0 ), /* 425 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 426 T_Version */
+ S_ST( 'p', 3, 432, 0 ), /* 427 loo */
+ S_ST( 'k', 0, 0, 0 ), /* 428 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 429 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 430 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 431 T_Year */
+ S_ST( 's', 3, 433, 0 ), /* 432 loop */
+ S_ST( 't', 3, 444, 0 ), /* 433 loops */
+ S_ST( 'e', 0, 0, 0 ), /* 434 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 435 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 436 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 437 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 438 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 439 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 440 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 441 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 442 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 443 T_Proc_Delay */
+ S_ST( 'a', 3, 445, 0 ), /* 444 loopst */
+ S_ST( 't', 3, 335, 0 ), /* 445 loopsta */
+ S_ST( 'w', 3, 447, 423 ), /* 446 lo */
+ S_ST( 'p', 3, 448, 0 ), /* 447 low */
+ S_ST( 'r', 3, 449, 0 ), /* 448 lowp */
+ S_ST( 'i', 3, 450, 0 ), /* 449 lowpr */
+ S_ST( 'o', 3, 451, 0 ), /* 450 lowpri */
+ S_ST( 't', 3, 452, 0 ), /* 451 lowprio */
+ S_ST( 'r', 3, 453, 0 ), /* 452 lowpriot */
+ S_ST( 'a', 3, 336, 0 ), /* 453 lowpriotr */
+ S_ST( 'm', 3, 528, 237 ), /* 454 */
+ S_ST( 'a', 3, 473, 0 ), /* 455 m */
+ S_ST( 'n', 3, 457, 0 ), /* 456 ma */
+ S_ST( 'y', 3, 458, 0 ), /* 457 man */
+ S_ST( 'c', 3, 459, 0 ), /* 458 many */
+ S_ST( 'a', 3, 460, 0 ), /* 459 manyc */
+ S_ST( 's', 3, 461, 0 ), /* 460 manyca */
+ S_ST( 't', 3, 467, 0 ), /* 461 manycas */
+ S_ST( 'c', 3, 463, 0 ), /* 462 manycast */
+ S_ST( 'l', 3, 464, 0 ), /* 463 manycastc */
+ S_ST( 'i', 3, 465, 0 ), /* 464 manycastcl */
+ S_ST( 'e', 3, 466, 0 ), /* 465 manycastcli */
+ S_ST( 'n', 3, 337, 0 ), /* 466 manycastclie */
+ S_ST( 's', 3, 468, 462 ), /* 467 manycast */
+ S_ST( 'e', 3, 469, 0 ), /* 468 manycasts */
+ S_ST( 'r', 3, 470, 0 ), /* 469 manycastse */
+ S_ST( 'v', 3, 471, 0 ), /* 470 manycastser */
+ S_ST( 'e', 3, 338, 0 ), /* 471 manycastserv */
+ S_ST( 's', 3, 339, 456 ), /* 472 ma */
+ S_ST( 'x', 3, 488, 472 ), /* 473 ma */
+ S_ST( 'a', 3, 475, 0 ), /* 474 max */
+ S_ST( 'g', 3, 340, 0 ), /* 475 maxa */
+ S_ST( 'c', 3, 477, 474 ), /* 476 max */
+ S_ST( 'l', 3, 478, 0 ), /* 477 maxc */
+ S_ST( 'o', 3, 479, 0 ), /* 478 maxcl */
+ S_ST( 'c', 3, 341, 0 ), /* 479 maxclo */
+ S_ST( 'd', 3, 484, 476 ), /* 480 max */
+ S_ST( 'e', 3, 482, 0 ), /* 481 maxd */
+ S_ST( 'p', 3, 483, 0 ), /* 482 maxde */
+ S_ST( 't', 3, 342, 0 ), /* 483 maxdep */
+ S_ST( 'i', 3, 485, 481 ), /* 484 maxd */
+ S_ST( 's', 3, 343, 0 ), /* 485 maxdi */
+ S_ST( 'm', 3, 487, 480 ), /* 486 max */
+ S_ST( 'e', 3, 344, 0 ), /* 487 maxm */
+ S_ST( 'p', 3, 489, 486 ), /* 488 max */
+ S_ST( 'o', 3, 490, 0 ), /* 489 maxp */
+ S_ST( 'l', 3, 345, 0 ), /* 490 maxpo */
+ S_ST( 'e', 3, 346, 455 ), /* 491 m */
+ S_ST( 'l', 3, 493, 0 ), /* 492 mem */
+ S_ST( 'o', 3, 494, 0 ), /* 493 meml */
+ S_ST( 'c', 3, 347, 0 ), /* 494 memlo */
+ S_ST( 'i', 3, 496, 491 ), /* 495 m */
+ S_ST( 'n', 3, 513, 0 ), /* 496 mi */
+ S_ST( 'c', 3, 498, 0 ), /* 497 min */
+ S_ST( 'l', 3, 499, 0 ), /* 498 minc */
+ S_ST( 'o', 3, 500, 0 ), /* 499 mincl */
+ S_ST( 'c', 3, 348, 0 ), /* 500 minclo */
+ S_ST( 'd', 3, 505, 497 ), /* 501 min */
+ S_ST( 'e', 3, 503, 0 ), /* 502 mind */
+ S_ST( 'p', 3, 504, 0 ), /* 503 minde */
+ S_ST( 't', 3, 349, 0 ), /* 504 mindep */
+ S_ST( 'i', 3, 506, 502 ), /* 505 mind */
+ S_ST( 's', 3, 350, 0 ), /* 506 mindi */
+ S_ST( 'i', 3, 508, 501 ), /* 507 min */
+ S_ST( 'm', 3, 509, 0 ), /* 508 mini */
+ S_ST( 'u', 3, 351, 0 ), /* 509 minim */
+ S_ST( 'p', 3, 511, 507 ), /* 510 min */
+ S_ST( 'o', 3, 512, 0 ), /* 511 minp */
+ S_ST( 'l', 3, 352, 0 ), /* 512 minpo */
+ S_ST( 's', 3, 514, 510 ), /* 513 min */
+ S_ST( 'a', 3, 515, 0 ), /* 514 mins */
+ S_ST( 'n', 3, 353, 0 ), /* 515 minsa */
+ S_ST( 'o', 3, 518, 495 ), /* 516 m */
+ S_ST( 'd', 3, 354, 0 ), /* 517 mo */
+ S_ST( 'n', 3, 522, 517 ), /* 518 mo */
+ S_ST( 'i', 3, 520, 0 ), /* 519 mon */
+ S_ST( 't', 3, 521, 0 ), /* 520 moni */
+ S_ST( 'o', 3, 356, 0 ), /* 521 monit */
+ S_ST( 't', 3, 357, 519 ), /* 522 mon */
+ S_ST( 'r', 3, 358, 516 ), /* 523 m */
+ S_ST( 's', 3, 525, 523 ), /* 524 m */
+ S_ST( 's', 3, 526, 0 ), /* 525 ms */
+ S_ST( 'n', 3, 527, 0 ), /* 526 mss */
+ S_ST( 't', 3, 328, 0 ), /* 527 mssn */
+ S_ST( 'u', 3, 529, 524 ), /* 528 m */
+ S_ST( 'l', 3, 530, 0 ), /* 529 mu */
+ S_ST( 't', 3, 531, 0 ), /* 530 mul */
+ S_ST( 'i', 3, 532, 0 ), /* 531 mult */
+ S_ST( 'c', 3, 533, 0 ), /* 532 multi */
+ S_ST( 'a', 3, 534, 0 ), /* 533 multic */
+ S_ST( 's', 3, 535, 0 ), /* 534 multica */
+ S_ST( 't', 3, 536, 0 ), /* 535 multicas */
+ S_ST( 'c', 3, 537, 0 ), /* 536 multicast */
+ S_ST( 'l', 3, 538, 0 ), /* 537 multicastc */
+ S_ST( 'i', 3, 539, 0 ), /* 538 multicastcl */
+ S_ST( 'e', 3, 540, 0 ), /* 539 multicastcli */
+ S_ST( 'n', 3, 359, 0 ), /* 540 multicastclie */
+ S_ST( 'n', 3, 584, 454 ), /* 541 */
+ S_ST( 'i', 3, 360, 0 ), /* 542 n */
+ S_ST( 'o', 3, 579, 542 ), /* 543 n */
+ S_ST( 'l', 3, 545, 0 ), /* 544 no */
+ S_ST( 'i', 3, 546, 0 ), /* 545 nol */
+ S_ST( 'n', 3, 361, 0 ), /* 546 noli */
+ S_ST( 'm', 3, 552, 544 ), /* 547 no */
+ S_ST( 'o', 3, 549, 0 ), /* 548 nom */
+ S_ST( 'd', 3, 550, 0 ), /* 549 nomo */
+ S_ST( 'i', 3, 551, 0 ), /* 550 nomod */
+ S_ST( 'f', 3, 362, 0 ), /* 551 nomodi */
+ S_ST( 'r', 3, 553, 548 ), /* 552 nom */
+ S_ST( 'u', 3, 554, 0 ), /* 553 nomr */
+ S_ST( 'l', 3, 555, 0 ), /* 554 nomru */
+ S_ST( 'i', 3, 556, 0 ), /* 555 nomrul */
+ S_ST( 's', 3, 363, 0 ), /* 556 nomruli */
+ S_ST( 'n', 3, 558, 547 ), /* 557 no */
+ S_ST( 'v', 3, 559, 364 ), /* 558 non */
+ S_ST( 'o', 3, 560, 0 ), /* 559 nonv */
+ S_ST( 'l', 3, 561, 0 ), /* 560 nonvo */
+ S_ST( 'a', 3, 562, 0 ), /* 561 nonvol */
+ S_ST( 't', 3, 563, 0 ), /* 562 nonvola */
+ S_ST( 'i', 3, 564, 0 ), /* 563 nonvolat */
+ S_ST( 'l', 3, 365, 0 ), /* 564 nonvolati */
+ S_ST( 'p', 3, 566, 557 ), /* 565 no */
+ S_ST( 'e', 3, 567, 0 ), /* 566 nop */
+ S_ST( 'e', 3, 366, 0 ), /* 567 nope */
+ S_ST( 'q', 3, 569, 565 ), /* 568 no */
+ S_ST( 'u', 3, 570, 0 ), /* 569 noq */
+ S_ST( 'e', 3, 571, 0 ), /* 570 noqu */
+ S_ST( 'r', 3, 367, 0 ), /* 571 noque */
+ S_ST( 's', 3, 573, 568 ), /* 572 no */
+ S_ST( 'e', 3, 577, 0 ), /* 573 nos */
+ S_ST( 'l', 3, 575, 0 ), /* 574 nose */
+ S_ST( 'e', 3, 576, 0 ), /* 575 nosel */
+ S_ST( 'c', 3, 368, 0 ), /* 576 nosele */
+ S_ST( 'r', 3, 578, 574 ), /* 577 nose */
+ S_ST( 'v', 3, 369, 0 ), /* 578 noser */
+ S_ST( 't', 3, 580, 572 ), /* 579 no */
+ S_ST( 'r', 3, 582, 0 ), /* 580 not */
+ S_ST( 'a', 3, 370, 0 ), /* 581 notr */
+ S_ST( 'u', 3, 583, 581 ), /* 582 notr */
+ S_ST( 's', 3, 371, 0 ), /* 583 notru */
+ S_ST( 't', 3, 372, 543 ), /* 584 n */
+ S_ST( 'p', 3, 586, 0 ), /* 585 ntp */
+ S_ST( 'o', 3, 587, 0 ), /* 586 ntpp */
+ S_ST( 'r', 3, 373, 0 ), /* 587 ntppo */
+ S_ST( 's', 3, 589, 585 ), /* 588 ntp */
+ S_ST( 'i', 3, 590, 0 ), /* 589 ntps */
+ S_ST( 'g', 3, 591, 0 ), /* 590 ntpsi */
+ S_ST( 'n', 3, 592, 0 ), /* 591 ntpsig */
+ S_ST( 'd', 3, 593, 0 ), /* 592 ntpsign */
+ S_ST( 's', 3, 594, 0 ), /* 593 ntpsignd */
+ S_ST( 'o', 3, 595, 0 ), /* 594 ntpsignds */
+ S_ST( 'c', 3, 596, 0 ), /* 595 ntpsigndso */
+ S_ST( 'k', 3, 597, 0 ), /* 596 ntpsigndsoc */
+ S_ST( 'e', 3, 374, 0 ), /* 597 ntpsigndsock */
+ S_ST( 'o', 3, 599, 541 ), /* 598 */
+ S_ST( 'r', 3, 600, 0 ), /* 599 o */
+ S_ST( 'p', 3, 601, 0 ), /* 600 or */
+ S_ST( 'h', 3, 602, 0 ), /* 601 orp */
+ S_ST( 'a', 3, 375, 0 ), /* 602 orph */
+ S_ST( 'w', 3, 604, 0 ), /* 603 orphan */
+ S_ST( 'a', 3, 605, 0 ), /* 604 orphanw */
+ S_ST( 'i', 3, 376, 0 ), /* 605 orphanwa */
+ S_ST( 'p', 3, 388, 598 ), /* 606 */
+ S_ST( 'a', 3, 608, 0 ), /* 607 p */
+ S_ST( 'n', 3, 609, 0 ), /* 608 pa */
+ S_ST( 'i', 3, 377, 0 ), /* 609 pan */
+ S_ST( 'e', 3, 611, 607 ), /* 610 p */
+ S_ST( 'e', 3, 378, 0 ), /* 611 pe */
+ S_ST( 's', 3, 613, 0 ), /* 612 peer */
+ S_ST( 't', 3, 614, 0 ), /* 613 peers */
+ S_ST( 'a', 3, 615, 0 ), /* 614 peerst */
+ S_ST( 't', 3, 379, 0 ), /* 615 peersta */
+ S_ST( 'h', 3, 617, 610 ), /* 616 p */
+ S_ST( 'o', 3, 618, 0 ), /* 617 ph */
+ S_ST( 'n', 3, 380, 0 ), /* 618 pho */
+ S_ST( 'i', 3, 381, 616 ), /* 619 p */
+ S_ST( 'f', 3, 621, 0 ), /* 620 pid */
+ S_ST( 'i', 3, 622, 0 ), /* 621 pidf */
+ S_ST( 'l', 3, 382, 0 ), /* 622 pidfi */
+ S_ST( 'o', 3, 625, 619 ), /* 623 p */
+ S_ST( 'o', 3, 383, 0 ), /* 624 po */
+ S_ST( 'r', 3, 384, 624 ), /* 625 po */
+ S_ST( 'r', 3, 633, 623 ), /* 626 p */
+ S_ST( 'e', 3, 631, 0 ), /* 627 pr */
+ S_ST( 'e', 3, 629, 0 ), /* 628 pre */
+ S_ST( 'm', 3, 630, 0 ), /* 629 pree */
+ S_ST( 'p', 3, 385, 0 ), /* 630 preem */
+ S_ST( 'f', 3, 632, 628 ), /* 631 pre */
+ S_ST( 'e', 3, 386, 0 ), /* 632 pref */
+ S_ST( 'o', 3, 646, 627 ), /* 633 pr */
+ S_ST( 'c', 3, 635, 0 ), /* 634 pro */
+ S_ST( '_', 3, 636, 0 ), /* 635 proc */
+ S_ST( 'd', 3, 637, 0 ), /* 636 proc_ */
+ S_ST( 'e', 3, 638, 0 ), /* 637 proc_d */
+ S_ST( 'l', 3, 639, 0 ), /* 638 proc_de */
+ S_ST( 'a', 3, 443, 0 ), /* 639 proc_del */
+ S_ST( 'p', 3, 641, 634 ), /* 640 pro */
+ S_ST( '_', 3, 642, 0 ), /* 641 prop */
+ S_ST( 'd', 3, 643, 0 ), /* 642 prop_ */
+ S_ST( 'e', 3, 644, 0 ), /* 643 prop_d */
+ S_ST( 'l', 3, 645, 0 ), /* 644 prop_de */
+ S_ST( 'a', 3, 442, 0 ), /* 645 prop_del */
+ S_ST( 't', 3, 647, 640 ), /* 646 pro */
+ S_ST( 'o', 3, 648, 0 ), /* 647 prot */
+ S_ST( 's', 3, 649, 0 ), /* 648 proto */
+ S_ST( 't', 3, 650, 0 ), /* 649 protos */
+ S_ST( 'a', 3, 651, 0 ), /* 650 protost */
+ S_ST( 't', 3, 387, 0 ), /* 651 protosta */
+ S_ST( 'r', 3, 683, 606 ), /* 652 */
+ S_ST( 'a', 3, 659, 0 ), /* 653 r */
+ S_ST( 'n', 3, 655, 0 ), /* 654 ra */
+ S_ST( 'd', 3, 656, 0 ), /* 655 ran */
+ S_ST( 'f', 3, 657, 0 ), /* 656 rand */
+ S_ST( 'i', 3, 658, 0 ), /* 657 randf */
+ S_ST( 'l', 3, 389, 0 ), /* 658 randfi */
+ S_ST( 'w', 3, 660, 654 ), /* 659 ra */
+ S_ST( 's', 3, 661, 0 ), /* 660 raw */
+ S_ST( 't', 3, 662, 0 ), /* 661 raws */
+ S_ST( 'a', 3, 663, 0 ), /* 662 rawst */
+ S_ST( 't', 3, 390, 0 ), /* 663 rawsta */
+ S_ST( 'e', 3, 680, 653 ), /* 664 r */
+ S_ST( 'f', 3, 666, 0 ), /* 665 re */
+ S_ST( 'i', 3, 391, 0 ), /* 666 ref */
+ S_ST( 'q', 3, 668, 665 ), /* 667 re */
+ S_ST( 'u', 3, 669, 0 ), /* 668 req */
+ S_ST( 'e', 3, 670, 0 ), /* 669 requ */
+ S_ST( 's', 3, 671, 0 ), /* 670 reque */
+ S_ST( 't', 3, 672, 0 ), /* 671 reques */
+ S_ST( 'k', 3, 673, 0 ), /* 672 request */
+ S_ST( 'e', 3, 392, 0 ), /* 673 requestk */
+ S_ST( 's', 3, 676, 667 ), /* 674 re */
+ S_ST( 'e', 3, 393, 0 ), /* 675 res */
+ S_ST( 't', 3, 677, 675 ), /* 676 res */
+ S_ST( 'r', 3, 678, 0 ), /* 677 rest */
+ S_ST( 'i', 3, 679, 0 ), /* 678 restr */
+ S_ST( 'c', 3, 394, 0 ), /* 679 restri */
+ S_ST( 'v', 3, 681, 674 ), /* 680 re */
+ S_ST( 'o', 3, 682, 0 ), /* 681 rev */
+ S_ST( 'k', 3, 395, 0 ), /* 682 revo */
+ S_ST( 'l', 3, 684, 664 ), /* 683 r */
+ S_ST( 'i', 3, 685, 0 ), /* 684 rl */
+ S_ST( 'm', 3, 686, 0 ), /* 685 rli */
+ S_ST( 'i', 3, 396, 0 ), /* 686 rlim */
+ S_ST( 's', 3, 755, 652 ), /* 687 */
+ S_ST( 'a', 3, 689, 0 ), /* 688 s */
+ S_ST( 'v', 3, 690, 0 ), /* 689 sa */
+ S_ST( 'e', 3, 691, 0 ), /* 690 sav */
+ S_ST( 'c', 3, 692, 0 ), /* 691 save */
+ S_ST( 'o', 3, 693, 0 ), /* 692 savec */
+ S_ST( 'n', 3, 694, 0 ), /* 693 saveco */
+ S_ST( 'f', 3, 695, 0 ), /* 694 savecon */
+ S_ST( 'i', 3, 696, 0 ), /* 695 saveconf */
+ S_ST( 'g', 3, 697, 0 ), /* 696 saveconfi */
+ S_ST( 'd', 3, 698, 0 ), /* 697 saveconfig */
+ S_ST( 'i', 3, 397, 0 ), /* 698 saveconfigd */
+ S_ST( 'e', 3, 709, 688 ), /* 699 s */
+ S_ST( 'r', 3, 701, 0 ), /* 700 se */
+ S_ST( 'v', 3, 702, 0 ), /* 701 ser */
+ S_ST( 'e', 3, 398, 0 ), /* 702 serv */
+ S_ST( '_', 3, 704, 0 ), /* 703 server */
+ S_ST( 'o', 3, 705, 0 ), /* 704 server_ */
+ S_ST( 'f', 3, 706, 0 ), /* 705 server_o */
+ S_ST( 'f', 3, 707, 0 ), /* 706 server_of */
+ S_ST( 's', 3, 708, 0 ), /* 707 server_off */
+ S_ST( 'e', 3, 437, 0 ), /* 708 server_offs */
+ S_ST( 't', 3, 710, 700 ), /* 709 se */
+ S_ST( 'v', 3, 711, 0 ), /* 710 set */
+ S_ST( 'a', 3, 399, 0 ), /* 711 setv */
+ S_ST( 'i', 3, 713, 699 ), /* 712 s */
+ S_ST( 'm', 3, 714, 0 ), /* 713 si */
+ S_ST( 'u', 3, 715, 0 ), /* 714 sim */
+ S_ST( 'l', 3, 716, 0 ), /* 715 simu */
+ S_ST( 'a', 3, 717, 0 ), /* 716 simul */
+ S_ST( 't', 3, 718, 0 ), /* 717 simula */
+ S_ST( 'i', 3, 719, 434 ), /* 718 simulat */
+ S_ST( 'o', 3, 720, 0 ), /* 719 simulati */
+ S_ST( 'n', 3, 721, 0 ), /* 720 simulatio */
+ S_ST( '_', 3, 722, 0 ), /* 721 simulation */
+ S_ST( 'd', 3, 723, 0 ), /* 722 simulation_ */
+ S_ST( 'u', 3, 724, 0 ), /* 723 simulation_d */
+ S_ST( 'r', 3, 725, 0 ), /* 724 simulation_du */
+ S_ST( 'a', 3, 726, 0 ), /* 725 simulation_dur */
+ S_ST( 't', 3, 727, 0 ), /* 726 simulation_dura */
+ S_ST( 'i', 3, 728, 0 ), /* 727 simulation_durat */
+ S_ST( 'o', 3, 436, 0 ), /* 728 simulation_durati */
+ S_ST( 'o', 3, 730, 712 ), /* 729 s */
+ S_ST( 'u', 3, 731, 0 ), /* 730 so */
+ S_ST( 'r', 3, 732, 0 ), /* 731 sou */
+ S_ST( 'c', 3, 400, 0 ), /* 732 sour */
+ S_ST( 't', 3, 751, 729 ), /* 733 s */
+ S_ST( 'a', 3, 740, 0 ), /* 734 st */
+ S_ST( 'c', 3, 736, 0 ), /* 735 sta */
+ S_ST( 'k', 3, 737, 0 ), /* 736 stac */
+ S_ST( 's', 3, 738, 0 ), /* 737 stack */
+ S_ST( 'i', 3, 739, 0 ), /* 738 stacks */
+ S_ST( 'z', 3, 401, 0 ), /* 739 stacksi */
+ S_ST( 't', 3, 403, 735 ), /* 740 sta */
+ S_ST( 'i', 3, 742, 0 ), /* 741 stat */
+ S_ST( 's', 3, 743, 0 ), /* 742 stati */
+ S_ST( 't', 3, 744, 0 ), /* 743 statis */
+ S_ST( 'i', 3, 745, 0 ), /* 744 statist */
+ S_ST( 'c', 3, 402, 0 ), /* 745 statisti */
+ S_ST( 'd', 3, 747, 0 ), /* 746 stats */
+ S_ST( 'i', 3, 404, 0 ), /* 747 statsd */
+ S_ST( 'e', 3, 405, 734 ), /* 748 st */
+ S_ST( 'o', 3, 750, 0 ), /* 749 step */
+ S_ST( 'u', 3, 406, 0 ), /* 750 stepo */
+ S_ST( 'r', 3, 752, 748 ), /* 751 st */
+ S_ST( 'a', 3, 753, 0 ), /* 752 str */
+ S_ST( 't', 3, 754, 0 ), /* 753 stra */
+ S_ST( 'u', 3, 407, 0 ), /* 754 strat */
+ S_ST( 'y', 3, 409, 733 ), /* 755 s */
+ S_ST( 's', 3, 757, 0 ), /* 756 sys */
+ S_ST( 't', 3, 758, 0 ), /* 757 syss */
+ S_ST( 'a', 3, 759, 0 ), /* 758 sysst */
+ S_ST( 't', 3, 410, 0 ), /* 759 syssta */
+ S_ST( 't', 3, 786, 687 ), /* 760 */
+ S_ST( 'i', 3, 772, 0 ), /* 761 t */
+ S_ST( 'c', 3, 411, 0 ), /* 762 ti */
+ S_ST( 'm', 3, 765, 762 ), /* 763 ti */
+ S_ST( 'e', 3, 414, 0 ), /* 764 tim */
+ S_ST( 'i', 3, 766, 764 ), /* 765 tim */
+ S_ST( 'n', 3, 767, 0 ), /* 766 timi */
+ S_ST( 'g', 3, 768, 0 ), /* 767 timin */
+ S_ST( 's', 3, 769, 0 ), /* 768 timing */
+ S_ST( 't', 3, 770, 0 ), /* 769 timings */
+ S_ST( 'a', 3, 771, 0 ), /* 770 timingst */
+ S_ST( 't', 3, 415, 0 ), /* 771 timingsta */
+ S_ST( 'n', 3, 773, 763 ), /* 772 ti */
+ S_ST( 'k', 3, 774, 0 ), /* 773 tin */
+ S_ST( 'e', 3, 416, 0 ), /* 774 tink */
+ S_ST( 'o', 3, 417, 761 ), /* 775 t */
+ S_ST( 'r', 3, 778, 775 ), /* 776 t */
+ S_ST( 'a', 3, 418, 0 ), /* 777 tr */
+ S_ST( 'u', 3, 779, 777 ), /* 778 tr */
+ S_ST( 's', 3, 780, 419 ), /* 779 tru */
+ S_ST( 't', 3, 781, 0 ), /* 780 trus */
+ S_ST( 'e', 3, 782, 0 ), /* 781 trust */
+ S_ST( 'd', 3, 783, 0 ), /* 782 truste */
+ S_ST( 'k', 3, 784, 0 ), /* 783 trusted */
+ S_ST( 'e', 3, 420, 0 ), /* 784 trustedk */
+ S_ST( 't', 3, 421, 776 ), /* 785 t */
+ S_ST( 'y', 3, 787, 785 ), /* 786 t */
+ S_ST( 'p', 3, 422, 0 ), /* 787 ty */
+ S_ST( 'u', 3, 789, 760 ), /* 788 */
+ S_ST( 'n', 3, 795, 0 ), /* 789 u */
+ S_ST( 'c', 3, 791, 0 ), /* 790 un */
+ S_ST( 'o', 3, 792, 0 ), /* 791 unc */
+ S_ST( 'n', 3, 793, 0 ), /* 792 unco */
+ S_ST( 'f', 3, 794, 0 ), /* 793 uncon */
+ S_ST( 'i', 3, 424, 0 ), /* 794 unconf */
+ S_ST( 'p', 3, 796, 790 ), /* 795 un */
+ S_ST( 'e', 3, 797, 0 ), /* 796 unp */
+ S_ST( 'e', 3, 425, 0 ), /* 797 unpe */
+ S_ST( 'v', 3, 799, 788 ), /* 798 */
+ S_ST( 'e', 3, 800, 0 ), /* 799 v */
+ S_ST( 'r', 3, 801, 0 ), /* 800 ve */
+ S_ST( 's', 3, 802, 0 ), /* 801 ver */
+ S_ST( 'i', 3, 803, 0 ), /* 802 vers */
+ S_ST( 'o', 3, 426, 0 ), /* 803 versi */
+ S_ST( 'w', 3, 811, 798 ), /* 804 */
+ S_ST( 'a', 3, 806, 0 ), /* 805 w */
+ S_ST( 'n', 3, 807, 0 ), /* 806 wa */
+ S_ST( 'd', 3, 808, 0 ), /* 807 wan */
+ S_ST( 'e', 3, 440, 0 ), /* 808 wand */
+ S_ST( 'e', 3, 810, 805 ), /* 809 w */
+ S_ST( 'e', 3, 428, 0 ), /* 810 we */
+ S_ST( 'i', 3, 812, 809 ), /* 811 w */
+ S_ST( 'l', 3, 813, 0 ), /* 812 wi */
+ S_ST( 'd', 3, 814, 0 ), /* 813 wil */
+ S_ST( 'c', 3, 815, 0 ), /* 814 wild */
+ S_ST( 'a', 3, 816, 0 ), /* 815 wildc */
+ S_ST( 'r', 3, 429, 0 ), /* 816 wildca */
+ S_ST( 'x', 3, 818, 804 ), /* 817 */
+ S_ST( 'l', 3, 819, 0 ), /* 818 x */
+ S_ST( 'e', 3, 820, 0 ), /* 819 xl */
+ S_ST( 'a', 3, 821, 0 ), /* 820 xle */
+ S_ST( 'v', 3, 430, 0 ), /* 821 xlea */
+ S_ST( 'y', 3, 823, 817 ), /* 822 [initial state] */
+ S_ST( 'e', 3, 824, 0 ), /* 823 y */
+ S_ST( 'a', 3, 431, 0 ) /* 824 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
new file mode 100644
index 000000000000..14b8cd99fa56
--- /dev/null
+++ b/ntpd/ntp_leapsec.c
@@ -0,0 +1,1009 @@
+/*
+ * ntp_leapsec.c - leap second processing for NTPD
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ----------------------------------------------------------------------
+ * This is an attempt to get the leap second handling into a dedicated
+ * module to make the somewhat convoluted logic testable.
+ */
+
+#include <config.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <ctype.h>
+
+#include "ntp_types.h"
+#include "ntp_fp.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_leapsec.h"
+#include "ntp.h"
+#include "vint64ops.h"
+#include "lib_strbuf.h"
+
+#include "isc/sha1.h"
+
+static const char * const logPrefix = "leapsecond file";
+
+/* ---------------------------------------------------------------------
+ * GCC is rather sticky with its 'const' attribute. We have to do it more
+ * explicit than with a cast if we want to get rid of a CONST qualifier.
+ * Greetings from the PASCAL world, where casting was only possible via
+ * untagged unions...
+ */
+static inline void*
+noconst(
+ const void* ptr
+ )
+{
+ union {
+ const void * cp;
+ void * vp;
+ } tmp;
+ tmp.cp = ptr;
+ return tmp.vp;
+}
+
+/* ---------------------------------------------------------------------
+ * Our internal data structure
+ */
+#define MAX_HIST 10 /* history of leap seconds */
+
+struct leap_info {
+ vint64 ttime; /* transition time (after the step, ntp scale) */
+ uint32_t stime; /* schedule limit (a month before transition) */
+ int16_t taiof; /* TAI offset on and after the transition */
+ uint8_t dynls; /* dynamic: inserted on peer/clock request */
+};
+typedef struct leap_info leap_info_t;
+
+struct leap_head {
+ vint64 update; /* time of information update */
+ vint64 expire; /* table expiration time */
+ uint16_t size; /* number of infos in table */
+ int16_t base_tai; /* total leaps before first entry */
+ int16_t this_tai; /* current TAI offset */
+ int16_t next_tai; /* TAI offset after 'when' */
+ vint64 dtime; /* due time (current era end) */
+ vint64 ttime; /* nominal transition time (next era start) */
+ vint64 stime; /* schedule time (when we take notice) */
+ vint64 ebase; /* base time of this leap era */
+ uint8_t dynls; /* next leap is dynamic (by peer request) */
+};
+typedef struct leap_head leap_head_t;
+
+struct leap_table {
+ leap_signature_t lsig;
+ leap_head_t head;
+ leap_info_t info[MAX_HIST];
+};
+
+/* Where we store our tables */
+static leap_table_t _ltab[2], *_lptr;
+static int/*BOOL*/ _electric;
+
+/* Forward decls of local helpers */
+static int add_range(leap_table_t*, const leap_info_t*);
+static char * get_line(leapsec_reader, void*, char*, size_t);
+static char * skipws(const char*);
+static int parsefail(const char * cp, const char * ep);
+static void reload_limits(leap_table_t*, const vint64*);
+static int betweenu32(uint32_t, uint32_t, uint32_t);
+static void reset_times(leap_table_t*);
+static int leapsec_add(leap_table_t*, const vint64*, int);
+static int leapsec_raw(leap_table_t*, const vint64 *, int, int);
+static char * lstostr(const vint64 * ts);
+
+/* =====================================================================
+ * Get & Set the current leap table
+ */
+
+/* ------------------------------------------------------------------ */
+leap_table_t *
+leapsec_get_table(
+ int alternate)
+{
+ leap_table_t *p1, *p2;
+
+ p1 = _lptr;
+ p1 = &_ltab[p1 == &_ltab[1]];
+ p2 = &_ltab[p1 == &_ltab[0]];
+ if (alternate) {
+ memcpy(p2, p1, sizeof(leap_table_t));
+ p1 = p2;
+ }
+
+ return p1;
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_set_table(
+ leap_table_t * pt)
+{
+ if (pt == &_ltab[0] || pt == &_ltab[1])
+ _lptr = pt;
+ return _lptr == pt;
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_electric(
+ int/*BOOL*/ on)
+{
+ int res = _electric;
+ if (on < 0)
+ return res;
+
+ _electric = (on != 0);
+ if (_electric == res)
+ return res;
+
+ if (_lptr == &_ltab[0] || _lptr == &_ltab[1])
+ reset_times(_lptr);
+
+ return res;
+}
+
+/* =====================================================================
+ * API functions that operate on tables
+ */
+
+/* ---------------------------------------------------------------------
+ * Clear all leap second data. Use it for init & cleanup
+ */
+void
+leapsec_clear(
+ leap_table_t * pt)
+{
+ memset(&pt->lsig, 0, sizeof(pt->lsig));
+ memset(&pt->head, 0, sizeof(pt->head));
+ reset_times(pt);
+}
+
+/* ---------------------------------------------------------------------
+ * Load a leap second file and check expiration on the go
+ */
+int/*BOOL*/
+leapsec_load(
+ leap_table_t * pt ,
+ leapsec_reader func,
+ void * farg,
+ int use_build_limit)
+{
+ char *cp, *ep, linebuf[50];
+ vint64 ttime, limit;
+ long taiof;
+ struct calendar build;
+
+ leapsec_clear(pt);
+ if (use_build_limit && ntpcal_get_build_date(&build))
+ limit = ntpcal_date_to_ntp64(&build);
+ else
+ memset(&limit, 0, sizeof(limit));
+
+ while (get_line(func, farg, linebuf, sizeof(linebuf))) {
+ cp = linebuf;
+ if (*cp == '#') {
+ cp++;
+ if (*cp == '@') {
+ cp = skipws(cp+1);
+ pt->head.expire = strtouv64(cp, &ep, 10);
+ if (parsefail(cp, ep))
+ goto fail_read;
+ pt->lsig.etime = pt->head.expire.D_s.lo;
+ } else if (*cp == '$') {
+ cp = skipws(cp+1);
+ pt->head.update = strtouv64(cp, &ep, 10);
+ if (parsefail(cp, ep))
+ goto fail_read;
+ }
+ } else if (isdigit((u_char)*cp)) {
+ ttime = strtouv64(cp, &ep, 10);
+ if (parsefail(cp, ep))
+ goto fail_read;
+ cp = skipws(ep);
+ taiof = strtol(cp, &ep, 10);
+ if ( parsefail(cp, ep)
+ || taiof > SHRT_MAX || taiof < SHRT_MIN)
+ goto fail_read;
+ if (ucmpv64(&ttime, &limit) >= 0) {
+ if (!leapsec_raw(pt, &ttime,
+ taiof, FALSE))
+ goto fail_insn;
+ } else {
+ pt->head.base_tai = (int16_t)taiof;
+ }
+ pt->lsig.ttime = ttime.D_s.lo;
+ pt->lsig.taiof = (int16_t)taiof;
+ }
+ }
+ return TRUE;
+
+fail_read:
+ errno = EILSEQ;
+fail_insn:
+ leapsec_clear(pt);
+ return FALSE;
+}
+
+/* ---------------------------------------------------------------------
+ * Dump a table in human-readable format. Use 'fprintf' and a FILE
+ * pointer if you want to get it printed into a stream.
+ */
+void
+leapsec_dump(
+ const leap_table_t * pt ,
+ leapsec_dumper func,
+ void * farg)
+{
+ int idx;
+ vint64 ts;
+ struct calendar atb, ttb;
+
+ ntpcal_ntp64_to_date(&ttb, &pt->head.expire);
+ (*func)(farg, "leap table (%u entries) expires at %04u-%02u-%02u:\n",
+ pt->head.size,
+ ttb.year, ttb.month, ttb.monthday);
+ idx = pt->head.size;
+ while (idx-- != 0) {
+ ts = pt->info[idx].ttime;
+ ntpcal_ntp64_to_date(&ttb, &ts);
+ ts = subv64u32(&ts, pt->info[idx].stime);
+ ntpcal_ntp64_to_date(&atb, &ts);
+
+ (*func)(farg, "%04u-%02u-%02u [%c] (%04u-%02u-%02u) - %d\n",
+ ttb.year, ttb.month, ttb.monthday,
+ "-*"[pt->info[idx].dynls != 0],
+ atb.year, atb.month, atb.monthday,
+ pt->info[idx].taiof);
+ }
+}
+
+/* =====================================================================
+ * usecase driven API functions
+ */
+
+int/*BOOL*/
+leapsec_query(
+ leap_result_t * qr ,
+ uint32_t ts32 ,
+ const time_t * pivot)
+{
+ leap_table_t * pt;
+ vint64 ts64, last, next;
+ uint32_t due32;
+ int fired;
+
+ /* preset things we use later on... */
+ fired = FALSE;
+ ts64 = ntpcal_ntp_to_ntp(ts32, pivot);
+ pt = leapsec_get_table(FALSE);
+ memset(qr, 0, sizeof(leap_result_t));
+
+ if (ucmpv64(&ts64, &pt->head.ebase) < 0) {
+ /* Most likely after leap frame reset. Could also be a
+ * backstep of the system clock. Anyway, get the new
+ * leap era frame.
+ */
+ reload_limits(pt, &ts64);
+ } else if (ucmpv64(&ts64, &pt->head.dtime) >= 0) {
+ /* Boundary crossed in forward direction. This might
+ * indicate a leap transition, so we prepare for that
+ * case.
+ *
+ * Some operations below are actually NOPs in electric
+ * mode, but having only one code path that works for
+ * both modes is easier to maintain.
+ */
+ last = pt->head.ttime;
+ qr->warped = (int16_t)(last.D_s.lo -
+ pt->head.dtime.D_s.lo);
+ next = addv64i32(&ts64, qr->warped);
+ reload_limits(pt, &next);
+ fired = ucmpv64(&pt->head.ebase, &last) == 0;
+ if (fired) {
+ ts64 = next;
+ ts32 = next.D_s.lo;
+ } else {
+ qr->warped = 0;
+ }
+ }
+
+ qr->tai_offs = pt->head.this_tai;
+
+ /* If before the next scheduling alert, we're done. */
+ if (ucmpv64(&ts64, &pt->head.stime) < 0)
+ return fired;
+
+ /* now start to collect the remaing data */
+ due32 = pt->head.dtime.D_s.lo;
+
+ qr->tai_diff = pt->head.next_tai - pt->head.this_tai;
+ qr->ttime = pt->head.ttime;
+ qr->ddist = due32 - ts32;
+ qr->dynamic = pt->head.dynls;
+ qr->proximity = LSPROX_SCHEDULE;
+
+ /* if not in the last day before transition, we're done. */
+ if (!betweenu32(due32 - SECSPERDAY, ts32, due32))
+ return fired;
+
+ qr->proximity = LSPROX_ANNOUNCE;
+ if (!betweenu32(due32 - 10, ts32, due32))
+ return fired;
+
+ /* The last 10s before the transition. Prepare for action! */
+ qr->proximity = LSPROX_ALERT;
+ return fired;
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_frame(
+ leap_result_t *qr)
+{
+ const leap_table_t * pt;
+
+ memset(qr, 0, sizeof(leap_result_t));
+ pt = leapsec_get_table(FALSE);
+ if (ucmpv64(&pt->head.ttime, &pt->head.stime) <= 0)
+ return FALSE;
+
+ qr->tai_offs = pt->head.this_tai;
+ qr->tai_diff = pt->head.next_tai - pt->head.this_tai;
+ qr->ttime = pt->head.ttime;
+ qr->dynamic = pt->head.dynls;
+
+ return TRUE;
+}
+
+/* ------------------------------------------------------------------ */
+/* Reset the current leap frame */
+void
+leapsec_reset_frame(void)
+{
+ reset_times(leapsec_get_table(FALSE));
+}
+
+/* ------------------------------------------------------------------ */
+/* load a file from a FILE pointer. Note: If hcheck is true, load
+ * only after successful signature check. The stream must be seekable
+ * or this will fail.
+ */
+int/*BOOL*/
+leapsec_load_stream(
+ FILE * ifp ,
+ const char * fname,
+ int/*BOOL*/ logall)
+{
+ leap_table_t *pt;
+ int rcheck;
+
+ if (NULL == fname)
+ fname = "<unknown>";
+
+ rcheck = leapsec_validate((leapsec_reader)getc, ifp);
+ if (logall)
+ switch (rcheck)
+ {
+ case LSVALID_GOODHASH:
+ msyslog(LOG_NOTICE, "%s ('%s'): good hash signature",
+ logPrefix, fname);
+ break;
+
+ case LSVALID_NOHASH:
+ msyslog(LOG_ERR, "%s ('%s'): no hash signature",
+ logPrefix, fname);
+ break;
+ case LSVALID_BADHASH:
+ msyslog(LOG_ERR, "%s ('%s'): signature mismatch",
+ logPrefix, fname);
+ break;
+ case LSVALID_BADFORMAT:
+ msyslog(LOG_ERR, "%s ('%s'): malformed hash signature",
+ logPrefix, fname);
+ break;
+ default:
+ msyslog(LOG_ERR, "%s ('%s'): unknown error code %d",
+ logPrefix, fname, rcheck);
+ break;
+ }
+ if (rcheck < 0)
+ return FALSE;
+
+ rewind(ifp);
+ pt = leapsec_get_table(TRUE);
+ if (!leapsec_load(pt, (leapsec_reader)getc, ifp, TRUE)) {
+ switch (errno) {
+ case EINVAL:
+ msyslog(LOG_ERR, "%s ('%s'): bad transition time",
+ logPrefix, fname);
+ break;
+ case ERANGE:
+ msyslog(LOG_ERR, "%s ('%s'): times not ascending",
+ logPrefix, fname);
+ break;
+ default:
+ msyslog(LOG_ERR, "%s ('%s'): parsing error",
+ logPrefix, fname);
+ break;
+ }
+ return FALSE;
+ }
+
+ if (pt->head.size)
+ msyslog(LOG_NOTICE, "%s ('%s'): loaded, expire=%s last=%s ofs=%d",
+ logPrefix, fname, lstostr(&pt->head.expire),
+ lstostr(&pt->info[0].ttime), pt->info[0].taiof);
+ else
+ msyslog(LOG_NOTICE,
+ "%s ('%s'): loaded, expire=%s ofs=%d (no entries after build date)",
+ logPrefix, fname, lstostr(&pt->head.expire),
+ pt->head.base_tai);
+
+ return leapsec_set_table(pt);
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_load_file(
+ const char * fname,
+ struct stat * sb_old,
+ int/*BOOL*/ force,
+ int/*BOOL*/ logall)
+{
+ FILE * fp;
+ struct stat sb_new;
+ int rc;
+
+ /* just do nothing if there is no leap file */
+ if ( !(fname && *fname) )
+ return FALSE;
+
+ /* try to stat the leapfile */
+ if (0 != stat(fname, &sb_new)) {
+ if (logall)
+ msyslog(LOG_ERR, "%s ('%s'): stat failed: %m",
+ logPrefix, fname);
+ return FALSE;
+ }
+
+ /* silently skip to postcheck if no new file found */
+ if (NULL != sb_old) {
+ if (!force
+ && sb_old->st_mtime == sb_new.st_mtime
+ && sb_old->st_ctime == sb_new.st_ctime
+ )
+ return FALSE;
+ *sb_old = sb_new;
+ }
+
+ /* try to open the leap file, complain if that fails
+ *
+ * [perlinger@ntp.org]
+ * coverity raises a TOCTOU (time-of-check/time-of-use) issue
+ * here, which is not entirely helpful: While there is indeed a
+ * possible race condition between the 'stat()' call above and
+ * the 'fopen)' call below, I intentionally want to omit the
+ * overhead of opening the file and calling 'fstat()', because
+ * in most cases the file would have be to closed anyway without
+ * reading the contents. I chose to disable the coverity
+ * warning instead.
+ *
+ * So unless someone comes up with a reasonable argument why
+ * this could be a real issue, I'll just try to silence coverity
+ * on that topic.
+ */
+ /* coverity[toctou] */
+ if ((fp = fopen(fname, "r")) == NULL) {
+ if (logall)
+ msyslog(LOG_ERR,
+ "%s ('%s'): open failed: %m",
+ logPrefix, fname);
+ return FALSE;
+ }
+
+ rc = leapsec_load_stream(fp, fname, logall);
+ fclose(fp);
+ return rc;
+}
+
+/* ------------------------------------------------------------------ */
+void
+leapsec_getsig(
+ leap_signature_t * psig)
+{
+ const leap_table_t * pt;
+
+ pt = leapsec_get_table(FALSE);
+ memcpy(psig, &pt->lsig, sizeof(leap_signature_t));
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_expired(
+ uint32_t when,
+ const time_t * tpiv)
+{
+ const leap_table_t * pt;
+ vint64 limit;
+
+ pt = leapsec_get_table(FALSE);
+ limit = ntpcal_ntp_to_ntp(when, tpiv);
+ return ucmpv64(&limit, &pt->head.expire) >= 0;
+}
+
+/* ------------------------------------------------------------------ */
+int32_t
+leapsec_daystolive(
+ uint32_t when,
+ const time_t * tpiv)
+{
+ const leap_table_t * pt;
+ vint64 limit;
+
+ pt = leapsec_get_table(FALSE);
+ limit = ntpcal_ntp_to_ntp(when, tpiv);
+ limit = subv64(&pt->head.expire, &limit);
+ return ntpcal_daysplit(&limit).hi;
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_add_fix(
+ int total,
+ uint32_t ttime,
+ uint32_t etime,
+ const time_t * pivot)
+{
+ time_t tpiv;
+ leap_table_t * pt;
+ vint64 tt64, et64;
+
+ if (pivot == NULL) {
+ time(&tpiv);
+ pivot = &tpiv;
+ }
+
+ et64 = ntpcal_ntp_to_ntp(etime, pivot);
+ tt64 = ntpcal_ntp_to_ntp(ttime, pivot);
+ pt = leapsec_get_table(TRUE);
+
+ if ( ucmpv64(&et64, &pt->head.expire) <= 0
+ || !leapsec_raw(pt, &tt64, total, FALSE) )
+ return FALSE;
+
+ pt->lsig.etime = etime;
+ pt->lsig.ttime = ttime;
+ pt->lsig.taiof = (int16_t)total;
+
+ pt->head.expire = et64;
+
+ return leapsec_set_table(pt);
+}
+
+/* ------------------------------------------------------------------ */
+int/*BOOL*/
+leapsec_add_dyn(
+ int insert,
+ uint32_t ntpnow,
+ const time_t * pivot )
+{
+ leap_table_t * pt;
+ vint64 now64;
+
+ pt = leapsec_get_table(TRUE);
+ now64 = ntpcal_ntp_to_ntp(ntpnow, pivot);
+ return ( leapsec_add(pt, &now64, (insert != 0))
+ && leapsec_set_table(pt));
+}
+
+/* =====================================================================
+ * internal helpers
+ */
+
+/* [internal] Reset / init the time window in the leap processor to
+ * force reload on next query. Since a leap transition cannot take place
+ * at an odd second, the value chosen avoids spurious leap transition
+ * triggers. Making all three times equal forces a reload. Using the
+ * maximum value for unsigned 64 bits makes finding the next leap frame
+ * a bit easier.
+ */
+static void
+reset_times(
+ leap_table_t * pt)
+{
+ memset(&pt->head.ebase, 0xFF, sizeof(vint64));
+ pt->head.stime = pt->head.ebase;
+ pt->head.ttime = pt->head.ebase;
+ pt->head.dtime = pt->head.ebase;
+}
+
+/* [internal] Add raw data to the table, removing old entries on the
+ * fly. This cannot fail currently.
+ */
+static int/*BOOL*/
+add_range(
+ leap_table_t * pt,
+ const leap_info_t * pi)
+{
+ /* If the table is full, make room by throwing out the oldest
+ * entry. But remember the accumulated leap seconds!
+ */
+ if (pt->head.size >= MAX_HIST) {
+ pt->head.size = MAX_HIST - 1;
+ pt->head.base_tai = pt->info[pt->head.size].taiof;
+ }
+
+ /* make room in lower end and insert item */
+ memmove(pt->info+1, pt->info, pt->head.size*sizeof(*pt->info));
+ pt->info[0] = *pi;
+ pt->head.size++;
+
+ /* invalidate the cached limit data -- we might have news ;-)
+ *
+ * This blocks a spurious transition detection. OTOH, if you add
+ * a value after the last query before a leap transition was
+ * expected to occur, this transition trigger is lost. But we
+ * can probably live with that.
+ */
+ reset_times(pt);
+ return TRUE;
+}
+
+/* [internal] given a reader function, read characters into a buffer
+ * until either EOL or EOF is reached. Makes sure that the buffer is
+ * always NUL terminated, but silently truncates excessive data. The
+ * EOL-marker ('\n') is *not* stored in the buffer.
+ *
+ * Returns the pointer to the buffer, unless EOF was reached when trying
+ * to read the first character of a line.
+ */
+static char *
+get_line(
+ leapsec_reader func,
+ void * farg,
+ char * buff,
+ size_t size)
+{
+ int ch;
+ char *ptr;
+
+ /* if we cannot even store the delimiter, declare failure */
+ if (buff == NULL || size == 0)
+ return NULL;
+
+ ptr = buff;
+ while (EOF != (ch = (*func)(farg)) && '\n' != ch)
+ if (size > 1) {
+ size--;
+ *ptr++ = (char)ch;
+ }
+ /* discard trailing whitespace */
+ while (ptr != buff && isspace((u_char)ptr[-1]))
+ ptr--;
+ *ptr = '\0';
+ return (ptr == buff && ch == EOF) ? NULL : buff;
+}
+
+/* [internal] skips whitespace characters from a character buffer. */
+static char *
+skipws(
+ const char *ptr)
+{
+ while (isspace((u_char)*ptr))
+ ptr++;
+ return (char*)noconst(ptr);
+}
+
+/* [internal] check if a strtoXYZ ended at EOL or whistespace and
+ * converted something at all. Return TRUE if something went wrong.
+ */
+static int/*BOOL*/
+parsefail(
+ const char * cp,
+ const char * ep)
+{
+ return (cp == ep)
+ || (*ep && *ep != '#' && !isspace((u_char)*ep));
+}
+
+/* [internal] reload the table limits around the given time stamp. This
+ * is where the real work is done when it comes to table lookup and
+ * evaluation. Some care has been taken to have correct code for dealing
+ * with boundary conditions and empty tables.
+ *
+ * In electric mode, transition and trip time are the same. In dumb
+ * mode, the difference of the TAI offsets must be taken into account
+ * and trip time and transition time become different. The difference
+ * becomes the warping distance when the trip time is reached.
+ */
+static void
+reload_limits(
+ leap_table_t * pt,
+ const vint64 * ts)
+{
+ int idx;
+
+ /* Get full time and search the true lower bound. Use a
+ * simple loop here, since the number of entries does
+ * not warrant a binary search. This also works for an empty
+ * table, so there is no shortcut for that case.
+ */
+ for (idx = 0; idx != pt->head.size; idx++)
+ if (ucmpv64(ts, &pt->info[idx].ttime) >= 0)
+ break;
+
+ /* get time limits with proper bound conditions. Note that the
+ * bounds of the table will be observed even if the table is
+ * empty -- no undefined condition must arise from this code.
+ */
+ if (idx >= pt->head.size) {
+ memset(&pt->head.ebase, 0x00, sizeof(vint64));
+ pt->head.this_tai = pt->head.base_tai;
+ } else {
+ pt->head.ebase = pt->info[idx].ttime;
+ pt->head.this_tai = pt->info[idx].taiof;
+ }
+ if (--idx >= 0) {
+ pt->head.next_tai = pt->info[idx].taiof;
+ pt->head.dynls = pt->info[idx].dynls;
+ pt->head.ttime = pt->info[idx].ttime;
+
+ if (_electric)
+ pt->head.dtime = pt->head.ttime;
+ else
+ pt->head.dtime = addv64i32(
+ &pt->head.ttime,
+ pt->head.next_tai - pt->head.this_tai);
+
+ pt->head.stime = subv64u32(
+ &pt->head.ttime, pt->info[idx].stime);
+
+ } else {
+ memset(&pt->head.ttime, 0xFF, sizeof(vint64));
+ pt->head.stime = pt->head.ttime;
+ pt->head.dtime = pt->head.ttime;
+ pt->head.next_tai = pt->head.this_tai;
+ pt->head.dynls = 0;
+ }
+}
+
+/* [internal] Take a time stamp and create a leap second frame for
+ * it. This will schedule a leap second for the beginning of the next
+ * month, midnight UTC. The 'insert' argument tells if a leap second is
+ * added (!=0) or removed (==0). We do not handle multiple inserts
+ * (yet?)
+ *
+ * Returns 1 if the insert worked, 0 otherwise. (It's not possible to
+ * insert a leap second into the current history -- only appending
+ * towards the future is allowed!)
+ */
+static int/*BOOL*/
+leapsec_add(
+ leap_table_t* pt ,
+ const vint64 * now64 ,
+ int insert)
+{
+ vint64 ttime, stime;
+ struct calendar fts;
+ leap_info_t li;
+
+ /* Check against the table expiration and the lates available
+ * leap entry. Do not permit inserts, only appends, and only if
+ * the extend the table beyond the expiration!
+ */
+ if ( ucmpv64(now64, &pt->head.expire) < 0
+ || (pt->head.size && ucmpv64(now64, &pt->info[0].ttime) <= 0)) {
+ errno = ERANGE;
+ return FALSE;
+ }
+
+ ntpcal_ntp64_to_date(&fts, now64);
+ /* To guard against dangling leap flags: do not accept leap
+ * second request on the 1st hour of the 1st day of the month.
+ */
+ if (fts.monthday == 1 && fts.hour == 0) {
+ errno = EINVAL;
+ return FALSE;
+ }
+
+ /* Ok, do the remaining calculations */
+ fts.monthday = 1;
+ fts.hour = 0;
+ fts.minute = 0;
+ fts.second = 0;
+ stime = ntpcal_date_to_ntp64(&fts);
+ fts.month++;
+ ttime = ntpcal_date_to_ntp64(&fts);
+
+ li.ttime = ttime;
+ li.stime = ttime.D_s.lo - stime.D_s.lo;
+ li.taiof = (pt->head.size ? pt->info[0].taiof : pt->head.base_tai)
+ + (insert ? 1 : -1);
+ li.dynls = 1;
+ return add_range(pt, &li);
+}
+
+/* [internal] Given a time stamp for a leap insertion (the exact begin
+ * of the new leap era), create new leap frame and put it into the
+ * table. This is the work horse for reading a leap file and getting a
+ * leap second update via authenticated network packet.
+ */
+int/*BOOL*/
+leapsec_raw(
+ leap_table_t * pt,
+ const vint64 * ttime,
+ int taiof,
+ int dynls)
+{
+ vint64 stime;
+ struct calendar fts;
+ leap_info_t li;
+
+ /* Check that we only extend the table. Paranoia rulez! */
+ if (pt->head.size && ucmpv64(ttime, &pt->info[0].ttime) <= 0) {
+ errno = ERANGE;
+ return FALSE;
+ }
+
+ ntpcal_ntp64_to_date(&fts, ttime);
+ /* If this does not match the exact month start, bail out. */
+ if (fts.monthday != 1 || fts.hour || fts.minute || fts.second) {
+ errno = EINVAL;
+ return FALSE;
+ }
+ fts.month--; /* was in range 1..12, no overflow here! */
+ stime = ntpcal_date_to_ntp64(&fts);
+ li.ttime = *ttime;
+ li.stime = ttime->D_s.lo - stime.D_s.lo;
+ li.taiof = (int16_t)taiof;
+ li.dynls = (dynls != 0);
+ return add_range(pt, &li);
+}
+
+/* [internal] Do a wrap-around save range inclusion check.
+ * Returns TRUE if x in [lo,hi[ (intervall open on right side) with full
+ * handling of an overflow / wrap-around.
+ */
+static int/*BOOL*/
+betweenu32(
+ uint32_t lo,
+ uint32_t x,
+ uint32_t hi)
+{
+ int rc;
+
+ if (lo <= hi)
+ rc = (lo <= x) && (x < hi);
+ else
+ rc = (lo <= x) || (x < hi);
+ return rc;
+}
+
+/* =====================================================================
+ * validation stuff
+ */
+
+typedef struct {
+ unsigned char hv[ISC_SHA1_DIGESTLENGTH];
+} sha1_digest;
+
+/* [internal] parse a digest line to get the hash signature
+ * The NIST code creating the hash writes them out as 5 hex integers
+ * without leading zeros. This makes reading them back as hex-encoded
+ * BLOB impossible, because there might be less than 40 hex digits.
+ *
+ * The solution is to read the values back as integers, and then do the
+ * byte twiddle necessary to get it into an array of 20 chars. The
+ * drawback is that it permits any acceptable number syntax provided by
+ * 'scanf()' and 'strtoul()', including optional signs and '0x'
+ * prefixes.
+ */
+static int/*BOOL*/
+do_leap_hash(
+ sha1_digest * mac,
+ char const * cp )
+{
+ int wi, di, num, len;
+ unsigned long tmp[5];
+
+ memset(mac, 0, sizeof(*mac));
+ num = sscanf(cp, " %lx %lx %lx %lx %lx%n",
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4],
+ &len);
+ if (num != 5 || cp[len] > ' ')
+ return FALSE;
+
+ /* now do the byte twiddle */
+ for (wi=0; wi < 5; ++wi)
+ for (di=3; di >= 0; --di) {
+ mac->hv[wi*4 + di] = (unsigned char)tmp[wi];
+ tmp[wi] >>= 8;
+ }
+ return TRUE;
+}
+
+/* [internal] add the digits of a data line to the hash, stopping at the
+ * next hash ('#') character.
+ */
+static void
+do_hash_data(
+ isc_sha1_t * mdctx,
+ char const * cp )
+{
+ unsigned char text[32]; // must be power of two!
+ unsigned int tlen = 0;
+ unsigned char ch;
+
+ while ('\0' != (ch = *cp++) && '#' != ch)
+ if (isdigit(ch)) {
+ text[tlen++] = ch;
+ tlen &= (sizeof(text)-1);
+ if (0 == tlen)
+ isc_sha1_update(
+ mdctx, text, sizeof(text));
+ }
+
+ if (0 < tlen)
+ isc_sha1_update(mdctx, text, tlen);
+}
+
+/* given a reader and a reader arg, calculate and validate the the hash
+ * signature of a NIST leap second file.
+ */
+int
+leapsec_validate(
+ leapsec_reader func,
+ void * farg)
+{
+ isc_sha1_t mdctx;
+ sha1_digest rdig, ldig; /* remote / local digests */
+ char line[50];
+ int hlseen = -1;
+
+ isc_sha1_init(&mdctx);
+ while (get_line(func, farg, line, sizeof(line))) {
+ if (!strncmp(line, "#h", 2))
+ hlseen = do_leap_hash(&rdig, line+2);
+ else if (!strncmp(line, "#@", 2))
+ do_hash_data(&mdctx, line+2);
+ else if (!strncmp(line, "#$", 2))
+ do_hash_data(&mdctx, line+2);
+ else if (isdigit(line[0]))
+ do_hash_data(&mdctx, line);
+ }
+ isc_sha1_final(&mdctx, ldig.hv);
+ isc_sha1_invalidate(&mdctx);
+
+ if (0 > hlseen)
+ return LSVALID_NOHASH;
+ if (0 == hlseen)
+ return LSVALID_BADFORMAT;
+ if (0 != memcmp(&rdig, &ldig, sizeof(sha1_digest)))
+ return LSVALID_BADHASH;
+ return LSVALID_GOODHASH;
+}
+
+/*
+ * lstostr - prettyprint NTP seconds
+ */
+static char * lstostr(
+ const vint64 * ts)
+{
+ char * buf;
+ struct calendar tm;
+
+ LIB_GETBUF(buf);
+ ntpcal_ntp64_to_date(&tm, ts);
+ snprintf(buf, LIB_BUFLENGTH, "%04d-%02d-%02dT%02d:%02dZ",
+ tm.year, tm.month, tm.monthday,
+ tm.hour, tm.minute);
+ return buf;
+}
+
+
+
+/* -*- that's all folks! -*- */
diff --git a/ntpd/ntp_leapsec.h b/ntpd/ntp_leapsec.h
new file mode 100644
index 000000000000..75edcc4608f7
--- /dev/null
+++ b/ntpd/ntp_leapsec.h
@@ -0,0 +1,218 @@
+/*
+ * ntp_leapsec.h - leap second processing for NTPD
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ * ----------------------------------------------------------------------
+ * This is an attempt to get the leap second handling into a dedicated
+ * module to make the somewhat convoluted logic testable.
+ */
+
+#ifndef NTP_LEAPSEC_H
+#define NTP_LEAPSEC_H
+
+struct stat;
+
+
+/* function pointer types. Note that 'fprintf' and 'getc' can be casted
+ * to the dumper resp. reader type, provided the auxiliary argument is a
+ * valid FILE pointer in hat case.
+ */
+typedef void (*leapsec_dumper)(void*, const char *fmt, ...);
+typedef int (*leapsec_reader)(void*);
+
+struct leap_table;
+typedef struct leap_table leap_table_t;
+
+/* Validate a stream containing a leap second file in the NIST / NTPD
+ * format that can also be loaded via 'leapsec_load()'. This uses
+ * the SHA1 hash and preprocessing as described in the NIST leapsecond
+ * file.
+ */
+#define LSVALID_GOODHASH 1 /* valid signature */
+#define LSVALID_NOHASH 0 /* no signature in file */
+#define LSVALID_BADHASH -1 /* signature mismatch */
+#define LSVALID_BADFORMAT -2 /* signature not parseable */
+
+extern int leapsec_validate(leapsec_reader, void*);
+
+
+/* Set/get electric mode
+ * Electric mode is defined as the operation mode where the system clock
+ * automagically manages the leap second, so we don't have to care about
+ * stepping the clock. (This should be the case with most systems,
+ * including the current implementation of the Win32 timekeeping.)
+ *
+ * The consequence of electric mode is that we do not 'see' the leap
+ * second, and no client actions are needed when crossing the leap era
+ * boundary. In manual (aka non-electric) mode the clock will simply
+ * step forward untill *we* (that is, this module) tells the client app
+ * to step at the right time. This needs a slightly different type of
+ * processing, so switching between those two modes should not be done
+ * too close to a leap second. The transition might be lost in that
+ * case. (The limit is actual 2 sec before transition.)
+ *
+ * OTOH, this is a system characteristic, so it's expected to be set
+ * properly somewhere after system start and retain the value.
+ *
+ * Simply querying the state or setting it to the same value as before
+ * does not have any unwanted side effects. You can query by giving a
+ * negative value for the switch.
+ */
+extern int/*BOOL*/ leapsec_electric(int/*BOOL*/ on);
+
+
+/* Query result for a leap second schedule
+ * 'ttime' is the transition point in full time scale, but only if
+ * 'tai_diff' is not zero. Nominal UTC time when the next leap
+ * era starts.
+ * 'ddist' is the distance to the transition, in clock seconds.
+ * This is the distance to the due time, which is different
+ * from the transition time if the mode is non-electric.
+ * Only valid if 'tai_diff' is not zero.
+ * 'tai_offs' is the CURRENT distance from clock (UTC) to TAI. Always valid.
+ * 'tai_diff' is the change in TAI offset after the next leap
+ * transition. Zero if nothing is pending or too far ahead.
+ * 'warped' is set only once, when the the leap second occurred between
+ * two queries. Always zero in electric mode. If non-zero,
+ * immediately step the clock.
+ * 'proximity' is a proximity warning. See definitions below. This is
+ * more useful than an absolute difference to the leap second.
+ * 'dynamic' != 0 if entry was requested by clock/peer
+ */
+struct leap_result {
+ vint64 ttime;
+ uint32_t ddist;
+ int16_t tai_offs;
+ int16_t tai_diff;
+ int16_t warped;
+ uint8_t proximity;
+ uint8_t dynamic;
+};
+typedef struct leap_result leap_result_t;
+
+struct leap_signature {
+ uint32_t etime; /* expiration time */
+ uint32_t ttime; /* transition time */
+ int16_t taiof; /* total offset to TAI */
+};
+typedef struct leap_signature leap_signature_t;
+
+
+#define LSPROX_NOWARN 0 /* clear radar screen */
+#define LSPROX_SCHEDULE 1 /* less than 1 month to target*/
+#define LSPROX_ANNOUNCE 2 /* less than 1 day to target */
+#define LSPROX_ALERT 3 /* less than 10 sec to target */
+
+/* Get the current or alternate table pointer. Getting the alternate
+ * pointer will automatically copy the primary table, so it can be
+ * subsequently modified.
+ */
+extern leap_table_t *leapsec_get_table(int alternate);
+
+/* Set the current leap table. Accepts only return values from
+ * 'leapsec_get_table()', so it's hard to do something wrong. Returns
+ * TRUE if the current table is the requested one.
+ */
+extern int/*BOOL*/ leapsec_set_table(leap_table_t *);
+
+/* Clear all leap second data. Use it for init & cleanup */
+extern void leapsec_clear(leap_table_t*);
+
+/* Load a leap second file. If 'blimit' is set, do not store (but
+ * register with their TAI offset) leap entries before the build date.
+ * Update the leap signature data on the fly.
+ */
+extern int/*BOOL*/ leapsec_load(leap_table_t*, leapsec_reader,
+ void*, int blimit);
+
+/* Dump the current leap table in readable format, using the provided
+ * dump formatter function.
+ */
+extern void leapsec_dump(const leap_table_t*, leapsec_dumper func, void *farg);
+
+/* Read a leap second file from stream. This is a convenience wrapper
+ * around the generic load function, 'leapsec_load()'.
+ */
+extern int/*BOOL*/ leapsec_load_stream(FILE * fp, const char * fname,
+ int/*BOOL*/logall);
+
+/* Read a leap second file from file. It checks that the file exists and
+ * (if 'force' is not applied) the ctime/mtime has changed since the
+ * last load. If the file has to be loaded, either due to 'force' or
+ * changed time stamps, the 'stat()' results of the file are stored in
+ * '*sb' for the next cycle. Returns TRUE on successful load, FALSE
+ * otherwise. Uses 'leapsec_load_stream()' internally.
+ */
+extern int/*BOOL*/ leapsec_load_file(const char * fname, struct stat * sb,
+ int/*BOOL*/force, int/*BOOL*/logall);
+
+/* Get the current leap data signature. This consists of the last
+ * ransition, the table expiration, and the total TAI difference at the
+ * last transition. This is valid even if the leap transition itself was
+ * culled due to the build date limit.
+ */
+extern void leapsec_getsig(leap_signature_t * psig);
+
+/* Check if the leap table is expired at the given time.
+ */
+extern int/*BOOL*/ leapsec_expired(uint32_t when, const time_t * pivot);
+
+/* Get the distance to expiration in days.
+ * Returns negative values if expired, zero if there are less than 24hrs
+ * left, and positive numbers otherwise.
+ */
+extern int32_t leapsec_daystolive(uint32_t when, const time_t * pivot);
+
+/* Reset the current leap frame, so the next query will do proper table
+ * lookup from fresh. Suppresses a possible leap era transition detection
+ * for the next query.
+ */
+extern void leapsec_reset_frame(void);
+
+/* Given a transition time, the TAI offset valid after that and an
+ * expiration time, try to establish a system leap transition. Only
+ * works if the existing table is extended. On success, updates the
+ * signature data.
+ */
+extern int/*BOOL*/ leapsec_add_fix(int offset, uint32_t ttime, uint32_t etime,
+ const time_t * pivot);
+
+/* Take a time stamp and create a leap second frame for it. This will
+ * schedule a leap second for the beginning of the next month, midnight
+ * UTC. The 'insert' argument tells if a leap second is added (!=0) or
+ * removed (==0). We do not handle multiple inserts (yet?)
+ *
+ * Returns 1 if the insert worked, 0 otherwise. (It's not possible to
+ * insert a leap second into the current history -- only appending
+ * towards the future is allowed!)
+ *
+ * 'ntp_now' is subject to era unfolding. The entry is marked
+ * dynamic. The leap signature is NOT updated.
+ */
+extern int/*BOOL*/ leapsec_add_dyn(int/*BOOL*/ insert, uint32_t ntp_now,
+ const time_t * pivot);
+
+/* Take a time stamp and get the associated leap information. The time
+ * stamp is subject to era unfolding around the pivot or the current
+ * system time if pivot is NULL. Sets the information in '*qr' and
+ * returns TRUE if a leap second era boundary was crossed between the
+ * last and the current query. In that case, qr->warped contains the
+ * required clock stepping, which is always zero in electric mode.
+ */
+extern int/*BOOL*/ leapsec_query(leap_result_t *qr, uint32_t ntpts,
+ const time_t * pivot);
+
+/* Get the current leap frame info. Returns TRUE if the result contains
+ * useable data, FALSE if there is currently no leap second frame.
+ * This merely replicates some results from a previous query, but since
+ * it does not check the current time, only the following entries are
+ * meaningful:
+ * qr->ttime;
+ * qr->tai_offs;
+ * qr->tai_diff;
+ * qr->dynamic;
+ */
+extern int/*BOOL*/ leapsec_frame(leap_result_t *qr);
+
+#endif /* !defined(NTP_LEAPSEC_H) */
diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c
index 3eb09e10060a..87db726e417e 100644
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -13,16 +13,13 @@
#include "ntp_unixtime.h"
#include "ntp_stdlib.h"
+#include <limits.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 */
@@ -35,15 +32,14 @@
* 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_MINSTEP 300. /* 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 (log2) */
#define CLOCK_AVG 8. /* parameter averaging constant */
#define CLOCK_FLL .25 /* FLL loop gain */
+#define CLOCK_FLOOR .0005 /* startup offset floor (s) */
#define CLOCK_ALLAN 11 /* Allan intercept (log2 s) */
-#define CLOCK_DAY 86400. /* one day in seconds (s) */
-#define CLOCK_JUNE (CLOCK_DAY * 30) /* June 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) */
@@ -119,13 +115,20 @@ u_char allan_xpt = CLOCK_ALLAN; /* Allan intercept (log2 s) */
static double clock_offset; /* offset */
double clock_jitter; /* offset jitter */
double drift_comp; /* frequency (s/s) */
+static double init_drift_comp; /* initial frequency (PPM) */
double clock_stability; /* frequency stability (wander) (s/s) */
double clock_codec; /* audio codec frequency (samples/s) */
static u_long clock_epoch; /* last update */
u_int sys_tai; /* TAI offset from UTC */
+static int loop_started; /* TRUE after LOOP_DRIFTINIT */
static void rstclock (int, double); /* transition function */
static double direct_freq(double); /* direct set frequency */
static void set_freq(double); /* set frequency */
+#ifndef PATH_MAX
+# define PATH_MAX MAX_PATH
+#endif
+static char relative_path[PATH_MAX + 1]; /* relative path per recursive make */
+static char *this_file = NULL;
#ifdef KERNEL_PLL
static struct timex ntv; /* ntp_adjtime() parameters */
@@ -133,28 +136,31 @@ int pll_status; /* last kernel status bits */
#if defined(STA_NANO) && NTP_API == 4
static u_int loop_tai; /* last TAI offset */
#endif /* STA_NANO */
+static void start_kern_loop(void);
+static void stop_kern_loop(void);
#endif /* KERNEL_PLL */
/*
* Clock state machine control flags
*/
-int ntp_enable = 1; /* clock discipline enabled */
+int ntp_enable = TRUE; /* clock discipline enabled */
int pll_control; /* kernel support available */
-int kern_enable = 1; /* kernel support enabled */
-int pps_enable; /* kernel PPS discipline enabled */
+int kern_enable = TRUE; /* kernel support enabled */
+int hardpps_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 */
+int freq_cnt; /* initial frequency clamp */
+int freq_set; /* initial set frequency switch */
/*
* Clock state machine variables
*/
-int state; /* clock discipline state */
+int state = 0; /* clock discipline state */
u_char sys_poll; /* time constant/poll (log2 s) */
int tc_counter; /* jiggle counter */
double last_offset; /* last offset (s) */
-static u_long last_step; /* last clock step */
/*
* Huff-n'-puff filter variables
@@ -177,6 +183,18 @@ static sigjmp_buf env; /* environment var. for pll_trap() */
#endif /* KERNEL_PLL */
/*
+ * file_name - return pointer to non-relative portion of this C file pathname
+ */
+static char *file_name(void)
+{
+ if (this_file == NULL) {
+ (void)strncpy(relative_path, __FILE__, PATH_MAX);
+ for (this_file=relative_path; *this_file && ! isalnum(*this_file); this_file++) ;
+ }
+ return this_file;
+}
+
+/*
* init_loopfilter - initialize loop filter data
*/
void
@@ -187,7 +205,113 @@ init_loopfilter(void)
*/
sys_poll = ntp_minpoll;
clock_jitter = LOGTOD(sys_precision);
+ freq_cnt = (int)clock_minstep;
+}
+
+#ifdef KERNEL_PLL
+/*
+ * ntp_adjtime_error_handler - process errors from ntp_adjtime
+ */
+static void
+ntp_adjtime_error_handler(
+ const char *caller, /* name of calling function */
+ struct timex *ptimex, /* pointer to struct timex */
+ int ret, /* return value from ntp_adjtime */
+ int saved_errno, /* value of errno when ntp_adjtime returned */
+ int pps_call, /* ntp_adjtime call was PPS-related */
+ int tai_call, /* ntp_adjtime call was TAI-related */
+ int line /* line number of ntp_adjtime call */
+ )
+{
+ switch (ret) {
+ case -1:
+ switch (saved_errno) {
+ case EFAULT:
+ msyslog(LOG_ERR, "%s: %s line %d: invalid struct timex pointer: 0x%lx",
+ caller, file_name(), line,
+ (long)((void *)ptimex)
+ );
+ break;
+ case EINVAL:
+ msyslog(LOG_ERR, "%s: %s line %d: invalid struct timex \"constant\" element value: %ld",
+ caller, file_name(), line,
+ (long)(ptimex->constant)
+ );
+ break;
+ case EPERM:
+ if (tai_call) {
+ errno = saved_errno;
+ msyslog(LOG_ERR,
+ "%s: ntp_adjtime(TAI) failed: %m",
+ caller);
+ }
+ errno = saved_errno;
+ msyslog(LOG_ERR, "%s: %s line %d: ntp_adjtime: %m",
+ caller, file_name(), line
+ );
+ break;
+ default:
+ msyslog(LOG_NOTICE, "%s: %s line %d: unhandled errno value %d after failed ntp_adjtime call",
+ caller, file_name(), line,
+ saved_errno
+ );
+ break;
+ }
+ break;
+#ifdef TIME_OK
+ case TIME_OK: /* 0 no leap second warning */
+ /* OK means OK */
+ break;
+#endif
+#ifdef TIME_INS
+ case TIME_INS: /* 1 positive leap second warning */
+ msyslog(LOG_INFO, "%s: %s line %d: kernel reports positive leap second warning state",
+ caller, file_name(), line
+ );
+ break;
+#endif
+#ifdef TIME_DEL
+ case TIME_DEL: /* 2 negative leap second warning */
+ msyslog(LOG_INFO, "%s: %s line %d: kernel reports negative leap second warning state",
+ caller, file_name(), line
+ );
+ break;
+#endif
+#ifdef TIME_OOP
+ case TIME_OOP: /* 3 leap second in progress */
+ msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second in progress",
+ caller, file_name(), line
+ );
+ break;
+#endif
+#ifdef TIME_WAIT
+ case TIME_WAIT: /* 4 leap second has occured */
+ msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second has occured",
+ caller, file_name(), line
+ );
+ break;
+#endif
+#ifdef TIME_ERROR
+ case TIME_ERROR: /* loss of synchronization */
+ if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
+ report_event(EVNT_KERN, NULL,
+ "PPS no signal");
+ errno = saved_errno;
+ DPRINTF(1, ("kernel loop status (%s) %d %m\n",
+ k_st_flags(ptimex->status), errno));
+ break;
+#endif
+ default:
+ msyslog(LOG_NOTICE, "%s: %s line %d: unhandled return value %d from ntp_adjtime in %s at line %d",
+ caller, file_name(), line,
+ ret,
+ __func__, __LINE__
+ );
+ break;
+ }
+ return;
}
+#endif
/*
* local_clock - the NTP logical clock loop filter.
@@ -209,6 +333,7 @@ local_clock(
{
int rval; /* return code */
int osys_poll; /* old system poll */
+ int ntp_adj_ret; /* returned by ntp_adjtime */
double mu; /* interval since last update */
double clock_frequency; /* clock frequency */
double dtemp, etemp; /* double temps */
@@ -220,15 +345,16 @@ local_clock(
* the open-loop response and then go home.
*/
#ifdef LOCKCLOCK
- return (0);
-
-#else /* LOCKCLOCK */
+ {
+#else
if (!ntp_enable) {
+#endif /* LOCKCLOCK */
record_loop_stats(fp_offset, drift_comp, clock_jitter,
clock_stability, sys_poll);
return (0);
}
+#ifndef LOCKCLOCK
/*
* If the clock is way off, panic is declared. The clock_panic
* defaults to 1000 s; if set to zero, the panic will never
@@ -250,7 +376,7 @@ local_clock(
/*
* This section simulates ntpdate. If the offset exceeds the
* step threshold (128 ms), step the clock to that time and
- * exit. Othewise, slew the clock to that time and exit. Note
+ * exit. Otherwise, slew the clock to that time and exit. Note
* that the slew will persist and eventually complete beyond the
* life of this program. Note that while ntpdate is active, the
* terminal does not detach, so the termination message prints
@@ -260,7 +386,7 @@ local_clock(
if (fabs(fp_offset) > clock_max && clock_max > 0) {
step_systime(fp_offset);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
- fp_offset);
+ fp_offset);
printf("ntpd: time set %+.6fs\n", fp_offset);
} else {
adj_systime(fp_offset);
@@ -344,7 +470,7 @@ local_clock(
clock_frequency = direct_freq(fp_offset);
- /* fall through to S_SPIK */
+ /* fall through to EVNT_SPIK */
/*
* In SPIK state we ignore succeeding outlyers until
@@ -389,12 +515,10 @@ local_clock(
tc_counter = 0;
clock_jitter = LOGTOD(sys_precision);
rval = 2;
- if (state == EVNT_NSET || (current_time -
- last_step) < clock_minstep * 2) {
+ if (state == EVNT_NSET) {
rstclock(EVNT_FREQ, 0);
return (rval);
}
- last_step = current_time;
break;
}
rstclock(EVNT_SYNC, 0);
@@ -404,7 +528,7 @@ local_clock(
* The offset is less than the step threshold. Calculate
* the jitter as the exponentially weighted offset
* differences.
- */
+ */
etemp = SQUARE(clock_jitter);
dtemp = SQUARE(max(fabs(fp_offset - last_offset),
LOGTOD(sys_precision)));
@@ -419,66 +543,59 @@ local_clock(
* the stepout threshold.
*/
case EVNT_NSET:
+ adj_systime(fp_offset);
rstclock(EVNT_FREQ, fp_offset);
break;
/*
- * In FSET state this is the first update received and
- * the frequency has been initialized. Adjust the phase,
- * but do not adjust the frequency until the next
- * update.
- */
- case EVNT_FSET:
- rstclock(EVNT_SYNC, fp_offset);
- break;
-
- /*
* In FREQ state ignore updates until the stepout
* threshold. After that, compute the new frequency, but
- * do not adjust the phase or frequency until the next
- * update.
+ * do not adjust the frequency until the holdoff counter
+ * decrements to zero.
*/
case EVNT_FREQ:
if (mu < clock_minstep)
return (0);
clock_frequency = direct_freq(fp_offset);
- rstclock(EVNT_SYNC, 0);
- break;
-
+ /* fall through */
/*
- * We get here by default in SYNC and SPIK states. Here
- * we compute the frequency update due to PLL and FLL
- * contributions.
+ * We get here by default in FSET, SPIK and SYNC states.
+ * Here compute the frequency update due to PLL and FLL
+ * contributions. Note, we avoid frequency discipline at
+ * startup until the initial transient has subsided.
*/
default:
allow_panic = FALSE;
-
- /*
- * The FLL and PLL frequency gain constants
- * depend on the time constant and Allan
- * intercept. The PLL is always used, but
- * becomes ineffective above the Allan intercept
- * where the FLL becomes effective.
- */
- if (sys_poll >= allan_xpt)
- clock_frequency += (fp_offset -
- clock_offset) /
- max(ULOGTOD(sys_poll), mu) *
- CLOCK_FLL;
-
- /*
- * The PLL frequency gain (numerator) depends on
- * the minimum of the update interval and Allan
- * intercept. This reduces the PLL gain when the
- * FLL becomes effective.
- */
- etemp = min(ULOGTOD(allan_xpt), mu);
- dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
- clock_frequency += fp_offset * etemp / (dtemp *
- dtemp);
+ if (freq_cnt == 0) {
+
+ /*
+ * The FLL and PLL frequency gain constants
+ * depend on the time constant and Allan
+ * intercept. The PLL is always used, but
+ * becomes ineffective above the Allan intercept
+ * where the FLL becomes effective.
+ */
+ if (sys_poll >= allan_xpt)
+ clock_frequency += (fp_offset -
+ clock_offset) / max(ULOGTOD(sys_poll),
+ mu) * CLOCK_FLL;
+
+ /*
+ * The PLL frequency gain (numerator) depends on
+ * the minimum of the update interval and Allan
+ * intercept. This reduces the PLL gain when the
+ * FLL becomes effective.
+ */
+ etemp = min(ULOGTOD(allan_xpt), mu);
+ dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
+ clock_frequency += fp_offset * etemp / (dtemp *
+ dtemp);
+ }
rstclock(EVNT_SYNC, fp_offset);
+ if (fabs(fp_offset) < CLOCK_FLOOR)
+ freq_cnt = 0;
break;
}
}
@@ -499,7 +616,7 @@ local_clock(
* lead to overflow problems. This might occur if some misguided
* lad set the step threshold to something ridiculous.
*/
- if (pll_control && kern_enable) {
+ if (pll_control && kern_enable && freq_cnt == 0) {
/*
* We initialize the structure for the ntp_adjtime()
@@ -512,7 +629,7 @@ local_clock(
* frequency offsets for jitter and stability values and
* to update the frequency file.
*/
- memset(&ntv, 0, sizeof(ntv));
+ ZERO(ntv);
if (ext_enable) {
ntv.modes = MOD_STATUS;
} else {
@@ -534,6 +651,9 @@ local_clock(
dtemp);
ntv.constant = sys_poll - 4;
#endif /* STA_NANO */
+ if (ntv.constant < 0)
+ ntv.constant = 0;
+
ntv.esterror = (u_int32)(clock_jitter * 1e6);
ntv.maxerror = (u_int32)((sys_rootdelay / 2 +
sys_rootdisp) * 1e6);
@@ -542,7 +662,7 @@ local_clock(
/*
* Enable/disable the PPS if requested.
*/
- if (pps_enable) {
+ if (hardpps_enable) {
if (!(pll_status & STA_PPSTIME))
report_event(EVNT_KERN,
NULL, "PPS enabled");
@@ -565,10 +685,8 @@ local_clock(
* the pps. In any case, fetch the kernel offset,
* frequency and jitter.
*/
- if (ntp_adjtime(&ntv) == TIME_ERROR) {
- if (!(ntv.status & STA_PPSSIGNAL))
- report_event(EVNT_KERN, NULL,
- "PPS no signal");
+ if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
}
pll_status = ntv.status;
#ifdef STA_NANO
@@ -597,7 +715,9 @@ local_clock(
loop_tai = sys_tai;
ntv.modes = MOD_TAI;
ntv.constant = sys_tai;
- ntp_adjtime(&ntv);
+ if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, 0, 1, __LINE__ - 1);
+ }
}
#endif /* STA_NANO */
}
@@ -626,16 +746,18 @@ local_clock(
*/
etemp = SQUARE(clock_stability);
clock_stability = SQRT(etemp + (dtemp - etemp) / CLOCK_AVG);
- drift_file_sw = TRUE;
/*
- * Here we adjust the timeconstan by comparing the current
+ * Here we adjust the time constant by comparing the current
* offset with the clock jitter. If the offset is less than the
* clock jitter times a constant, then the averaging interval is
* increased, otherwise it is decreased. A bit of hysteresis
- * helps calm the dance. Works best using burst mode.
+ * helps calm the dance. Works best using burst mode. Don't
+ * fiddle with the poll during the startup clamp period.
*/
- if (fabs(clock_offset) < CLOCK_PGATE * clock_jitter) {
+ if (freq_cnt > 0) {
+ tc_counter = 0;
+ } else if (fabs(clock_offset) < CLOCK_PGATE * clock_jitter) {
tc_counter += sys_poll;
if (tc_counter > CLOCK_LIMIT) {
tc_counter = CLOCK_LIMIT;
@@ -689,34 +811,68 @@ adj_host_clock(
void
)
{
- double adjustment;
+ double offset_adj;
+ double freq_adj;
/*
* 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.
+ * would be counterproductive. During the startup clamp period, the
+ * time constant is clamped at 2.
*/
sys_rootdisp += clock_phi;
-
#ifndef LOCKCLOCK
+ if (!ntp_enable || mode_ntpdate)
+ return;
/*
- * If clock discipline is disabled or if the kernel is enabled,
- * get out of Dodge quick.
+ * Determine the phase adjustment. The gain factor (denominator)
+ * increases with poll interval, so is dominated by the FLL
+ * above the Allan intercept. Note the reduced time constant at
+ * startup.
*/
- if (!ntp_enable || mode_ntpdate || (pll_control &&
- kern_enable))
- return;
+ if (state != EVNT_SYNC) {
+ offset_adj = 0.;
+ } else if (freq_cnt > 0) {
+ offset_adj = clock_offset / (CLOCK_PLL * ULOGTOD(1));
+ freq_cnt--;
+#ifdef KERNEL_PLL
+ } else if (pll_control && kern_enable) {
+ offset_adj = 0.;
+#endif /* KERNEL_PLL */
+ } else {
+ offset_adj = clock_offset / (CLOCK_PLL * ULOGTOD(sys_poll));
+ }
+
+ /*
+ * If the kernel discipline is enabled the frequency correction
+ * drift_comp has already been engaged via ntp_adjtime() in
+ * set_freq(). Otherwise it is a component of the adj_systime()
+ * offset.
+ */
+#ifdef KERNEL_PLL
+ if (pll_control && kern_enable)
+ freq_adj = 0.;
+ else
+#endif /* KERNEL_PLL */
+ freq_adj = drift_comp;
+
+ /* Bound absolute value of total adjustment to NTP_MAXFREQ. */
+ if (offset_adj + freq_adj > NTP_MAXFREQ)
+ offset_adj = NTP_MAXFREQ - freq_adj;
+ else if (offset_adj + freq_adj < -NTP_MAXFREQ)
+ offset_adj = -NTP_MAXFREQ - freq_adj;
+ clock_offset -= offset_adj;
/*
- * Implement the phase and frequency adjustments. The gain
- * factor (denominator) increases with poll interval, so is
- * dominated by the FLL above the Allan intercept.
- */
- adjustment = clock_offset / (CLOCK_PLL * ULOGTOD(sys_poll));
- clock_offset -= adjustment;
- adj_systime(adjustment + drift_comp);
+ * Windows port adj_systime() must be called each second,
+ * even if the argument is zero, to ease emulation of
+ * adjtime() using Windows' slew API which controls the rate
+ * but does not automatically stop slewing when an offset
+ * has decayed to zero.
+ */
+ adj_systime(offset_adj + freq_adj);
#endif /* LOCKCLOCK */
}
@@ -743,6 +899,7 @@ rstclock(
clock_epoch = current_time;
}
+
/*
* calc_freq - calculate frequency directly
*
@@ -759,71 +916,163 @@ direct_freq(
double fp_offset
)
{
+ set_freq(fp_offset / (current_time - clock_epoch));
-#ifdef KERNEL_PLL
- /*
- * If the kernel is enabled, we need the residual offset to
- * calculate the frequency correction.
- */
- if (pll_control && kern_enable) {
- memset(&ntv, 0, sizeof(ntv));
- ntp_adjtime(&ntv);
-#ifdef STA_NANO
- clock_offset = ntv.offset / 1e9;
-#else /* STA_NANO */
- clock_offset = ntv.offset / 1e6;
-#endif /* STA_NANO */
- drift_comp = FREQTOD(ntv.freq);
- }
-#endif /* KERNEL_PLL */
- set_freq((fp_offset - clock_offset) / (current_time -
- clock_epoch) + drift_comp);
- wander_resid = 0;
- return (drift_comp);
+ return drift_comp;
}
/*
- * set_freq - set clock frequency
+ * set_freq - set clock frequency correction
+ *
+ * Used to step the frequency correction at startup, possibly again once
+ * the frequency is measured (that is, transitioning from EVNT_NSET to
+ * EVNT_FSET), and finally to switch between daemon and kernel loop
+ * discipline at runtime.
+ *
+ * When the kernel loop discipline is available but the daemon loop is
+ * in use, the kernel frequency correction is disabled (set to 0) to
+ * ensure drift_comp is applied by only one of the loops.
*/
static void
set_freq(
double freq /* frequency update */
)
{
- char tbuf[80];
+ const char * loop_desc;
+ int ntp_adj_ret;
drift_comp = freq;
+ loop_desc = "ntpd";
+#ifdef KERNEL_PLL
+ if (pll_control) {
+ ZERO(ntv);
+ ntv.modes = MOD_FREQUENCY;
+ if (kern_enable) {
+ loop_desc = "kernel";
+ ntv.freq = DTOFREQ(drift_comp);
+ }
+ if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, 0, 0, __LINE__ - 1);
+ }
+ }
+#endif /* KERNEL_PLL */
+ mprintf_event(EVNT_FSET, NULL, "%s %.3f PPM", loop_desc,
+ drift_comp * 1e6);
+}
+
#ifdef KERNEL_PLL
+static void
+start_kern_loop(void)
+{
+ static int atexit_done;
+ int ntp_adj_ret;
+
+ pll_control = TRUE;
+ ZERO(ntv);
+ ntv.modes = MOD_BITS;
+ ntv.status = STA_PLL;
+ ntv.maxerror = MAXDISPERSE;
+ ntv.esterror = MAXDISPERSE;
+ ntv.constant = sys_poll; /* why is it that here constant is unconditionally set to sys_poll, whereas elsewhere is is modified depending on nanosecond vs. microsecond kernel? */
+#ifdef SIGSYS
/*
- * If the kernel is enabled, update the kernel frequency.
+ * Use sigsetjmp() to save state and then call ntp_adjtime(); if
+ * it fails, then pll_trap() will set pll_control FALSE before
+ * returning control using siglogjmp().
*/
- if (pll_control && kern_enable) {
- memset(&ntv, 0, sizeof(ntv));
- ntv.modes = MOD_FREQUENCY;
- ntv.freq = DTOFREQ(drift_comp);
- ntp_adjtime(&ntv);
- snprintf(tbuf, sizeof(tbuf), "kernel %.3f PPM",
- drift_comp * 1e6);
- report_event(EVNT_FSET, NULL, tbuf);
+ newsigsys.sa_handler = pll_trap;
+ newsigsys.sa_flags = 0;
+ if (sigaction(SIGSYS, &newsigsys, &sigsys)) {
+ msyslog(LOG_ERR, "sigaction() trap SIGSYS: %m");
+ pll_control = FALSE;
} else {
- snprintf(tbuf, sizeof(tbuf), "ntpd %.3f PPM",
- drift_comp * 1e6);
- report_event(EVNT_FSET, NULL, tbuf);
+ if (sigsetjmp(env, 1) == 0) {
+ if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, 0, 0, __LINE__ - 1);
+ }
+ }
+ if (sigaction(SIGSYS, &sigsys, NULL)) {
+ msyslog(LOG_ERR,
+ "sigaction() restore SIGSYS: %m");
+ pll_control = FALSE;
+ }
}
-#else /* KERNEL_PLL */
- snprintf(tbuf, sizeof(tbuf), "ntpd %.3f PPM", drift_comp *
- 1e6);
- report_event(EVNT_FSET, NULL, tbuf);
-#endif /* KERNEL_PLL */
+#else /* SIGSYS */
+ if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, 0, 0, __LINE__ - 1);
+ }
+#endif /* SIGSYS */
+
+ /*
+ * Save the result status and light up an external clock
+ * if available.
+ */
+ pll_status = ntv.status;
+ if (pll_control) {
+ if (!atexit_done) {
+ atexit_done = TRUE;
+ atexit(&stop_kern_loop);
+ }
+#ifdef STA_NANO
+ if (pll_status & STA_CLK)
+ ext_enable = TRUE;
+#endif /* STA_NANO */
+ report_event(EVNT_KERN, NULL,
+ "kernel time sync enabled");
+ }
+}
+#endif /* KERNEL_PLL */
+
+
+#ifdef KERNEL_PLL
+static void
+stop_kern_loop(void)
+{
+ if (pll_control && kern_enable)
+ report_event(EVNT_KERN, NULL,
+ "kernel time sync disabled");
}
+#endif /* KERNEL_PLL */
+
+
+/*
+ * select_loop() - choose kernel or daemon loop discipline.
+ */
+void
+select_loop(
+ int use_kern_loop
+ )
+{
+ if (kern_enable == use_kern_loop)
+ return;
+#ifdef KERNEL_PLL
+ if (pll_control && !use_kern_loop)
+ stop_kern_loop();
+#endif
+ kern_enable = use_kern_loop;
+#ifdef KERNEL_PLL
+ if (pll_control && use_kern_loop)
+ start_kern_loop();
+#endif
+ /*
+ * If this loop selection change occurs after initial startup,
+ * call set_freq() to switch the frequency compensation to or
+ * from the kernel loop.
+ */
+#ifdef KERNEL_PLL
+ if (pll_control && loop_started)
+ set_freq(drift_comp);
+#endif
+}
+
/*
* huff-n'-puff filter
*/
void
-huffpuff()
+huffpuff(void)
{
int i;
@@ -851,7 +1100,8 @@ loop_config(
double freq
)
{
- int i;
+ int i;
+ double ftemp;
#ifdef DEBUG
if (debug > 1)
@@ -870,92 +1120,28 @@ loop_config(
if (mode_ntpdate)
break;
- pll_control = 1;
- memset(&ntv, 0, sizeof(ntv));
- ntv.modes = MOD_BITS;
- ntv.status = STA_PLL;
- ntv.maxerror = MAXDISPERSE;
- ntv.esterror = MAXDISPERSE;
- ntv.constant = sys_poll;
-#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 */
+ start_kern_loop();
+#endif /* KERNEL_PLL */
/*
- * Save the result status and light up an external clock
- * if available.
+ * Initialize frequency if given; otherwise, begin frequency
+ * calibration phase.
*/
- pll_status = ntv.status;
- if (pll_control) {
-#ifdef STA_NANO
- if (pll_status & STA_CLK)
- ext_enable = 1;
-#endif /* STA_NANO */
- report_event(EVNT_KERN, NULL,
- "kernel time sync enabled");
- }
-#endif /* KERNEL_PLL */
-#endif /* LOCKCLOCK */
- break;
-
- /*
- * Initialize the frequency. If the frequency file is missing or
- * broken, set the initial frequency to zero and set the state
- * to NSET. Otherwise, set the initial frequency to the given
- * value and the state to FSET.
- */
- case LOOP_DRIFTCOMP:
-#ifndef LOCKCLOCK
- if (freq > NTP_MAXFREQ || freq < -NTP_MAXFREQ) {
- set_freq(0);
- rstclock(EVNT_NSET, 0);
- } else {
- set_freq(freq);
+ ftemp = init_drift_comp / 1e6;
+ if (ftemp > NTP_MAXFREQ)
+ ftemp = NTP_MAXFREQ;
+ else if (ftemp < -NTP_MAXFREQ)
+ ftemp = -NTP_MAXFREQ;
+ set_freq(ftemp);
+ if (freq_set)
rstclock(EVNT_FSET, 0);
- }
+ else
+ rstclock(EVNT_NSET, 0);
+ loop_started = TRUE;
#endif /* LOCKCLOCK */
break;
- /*
- * Disable the kernel at shutdown. The microkernel just abandons
- * ship. The nanokernel carefully cleans up so applications can
- * see this. Note the last programmed offset and frequency are
- * left in place.
- */
case LOOP_KERN_CLEAR:
-#ifndef LOCKCLOCK
-#ifdef KERNEL_PLL
- if (pll_control && kern_enable) {
- memset((char *)&ntv, 0, sizeof(ntv));
- ntv.modes = MOD_STATUS;
- ntv.status = STA_UNSYNC;
- ntp_adjtime(&ntv);
- report_event(EVNT_KERN, NULL,
- "kernel time sync disabledx");
- }
-#endif /* KERNEL_PLL */
-#endif /* LOCKCLOCK */
break;
/*
@@ -974,15 +1160,15 @@ loop_config(
break;
case LOOP_FREQ: /* initial frequency (freq) */
- set_freq(freq / 1e6);
- rstclock(EVNT_FSET, 0);
+ init_drift_comp = freq;
+ freq_set++;
break;
case LOOP_HUFFPUFF: /* huff-n'-puff length (huffpuff) */
if (freq < HUFFPUFF)
freq = HUFFPUFF;
sys_hufflen = (int)(freq / HUFFPUFF);
- sys_huffpuff = (double *)emalloc(sizeof(double) *
+ sys_huffpuff = emalloc(sizeof(sys_huffpuff[0]) *
sys_hufflen);
for (i = 0; i < sys_hufflen; i++)
sys_huffpuff[i] = 1e9;
@@ -996,14 +1182,21 @@ loop_config(
case LOOP_MAX: /* step threshold (step) */
clock_max = freq;
if (clock_max == 0 || clock_max > 0.5)
- kern_enable = 0;
+ select_loop(FALSE);
break;
case LOOP_MINSTEP: /* stepout threshold (stepout) */
- clock_minstep = freq;
+ if (freq < CLOCK_MINSTEP)
+ clock_minstep = CLOCK_MINSTEP;
+ else
+ clock_minstep = freq;
+ break;
+
+ case LOOP_TICK: /* tick increment (tick) */
+ set_sys_tick_precision(freq);
break;
- case LOOP_LEAP: /* not used */
+ case LOOP_LEAP: /* not used, fall through */
default:
msyslog(LOG_NOTICE,
"loop_config: unsupported option %d", item);
@@ -1025,7 +1218,7 @@ pll_trap(
int arg
)
{
- pll_control = 0;
+ pll_control = FALSE;
siglongjmp(env, 1);
}
#endif /* KERNEL_PLL && SIGSYS */
diff --git a/ntpd/ntp_monitor.c b/ntpd/ntp_monitor.c
index 200a9028dd9f..1214e1d661c2 100644
--- a/ntpd/ntp_monitor.c
+++ b/ntpd/ntp_monitor.c
@@ -8,6 +8,7 @@
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_if.h"
+#include "ntp_lists.h"
#include "ntp_stdlib.h"
#include <ntp_random.h>
@@ -35,44 +36,45 @@
* the memory limit. Then we free memory by grabbing entries off the
* tail for the MRU list, unlinking from the hash table, and
* reinitializing.
- */
-/*
- * 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
+ * INC_MONLIST is the default allocation granularity in entries.
+ * INIT_MONLIST is the default initial allocation in entries.
*/
-#ifndef MAXMONMEM
-#define MAXMONMEM 600 /* we allocate up to 600 structures */
+#ifdef MONMEMINC /* old name */
+# define INC_MONLIST MONMEMINC
+#elif !defined(INC_MONLIST)
+# define INC_MONLIST (4 * 1024 / sizeof(mon_entry))
+#endif
+#ifndef INIT_MONLIST
+# define INIT_MONLIST (4 * 1024 / sizeof(mon_entry))
#endif
-#ifndef MONMEMINC
-#define MONMEMINC 40 /* allocate them 40 at a time */
+#ifndef MRU_MAXDEPTH_DEF
+# define MRU_MAXDEPTH_DEF (1024 * 1024 / sizeof(mon_entry))
#endif
/*
* Hashing stuff
*/
-#define MON_HASH_SIZE NTP_HASH_SIZE
-#define MON_HASH_MASK NTP_HASH_MASK
-#define MON_HASH(addr) NTP_HASH_ADDR(addr)
+u_char mon_hash_bits;
/*
- * 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.
+ * Pointers to the hash table and the MRU list. Memory for the hash
+ * table is allocated only if monitoring is enabled.
*/
-static struct mon_data *mon_hash[MON_HASH_SIZE]; /* list ptrs */
-struct mon_data mon_mru_list;
+mon_entry ** mon_hash; /* MRU hash table */
+mon_entry mon_mru_list; /* mru listhead */
/*
- * List of free structures structures, and counters of free and total
+ * List of free structures structures, and counters of in-use 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() */
+static mon_entry *mon_free; /* free list or null if none */
+ u_int mru_alloc; /* mru list + free list count */
+ u_int mru_entries; /* mru list count */
+ u_int mru_peakentries; /* highest mru_entries seen */
+ u_int mru_initalloc = INIT_MONLIST;/* entries to preallocate */
+ u_int mru_incalloc = INC_MONLIST;/* allocation batch factor */
+static u_int mon_mem_increments; /* times called malloc() */
/*
* Parameters of the RES_LIMITED restriction option. We define headway
@@ -81,17 +83,24 @@ static int mon_mem_increments; /* times called malloc() */
* is less than eight times the increment.
*/
int ntp_minpkt = NTP_MINPKT; /* minimum (log 2 s) */
-int ntp_minpoll = NTP_MINPOLL; /* increment (log 2 s) */
+u_char ntp_minpoll = NTP_MINPOLL; /* increment (log 2 s) */
/*
* 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 */
-int mon_age = 3000; /* preemption limit */
-static int mon_have_memory;
-static void mon_getmoremem (void);
-static void remove_from_hash (struct mon_data *);
+ u_int mon_enabled; /* enable switch */
+ u_int mru_mindepth = 600; /* preempt above this */
+ int mru_maxage = 64; /* for entries older than */
+ u_int mru_maxdepth = /* MRU count hard limit */
+ MRU_MAXDEPTH_DEF;
+ int mon_age = 3000; /* preemption limit */
+
+static void mon_getmoremem(void);
+static void remove_from_hash(mon_entry *);
+static inline void mon_free_entry(mon_entry *);
+static inline void mon_reclaim_entry(mon_entry *);
+
/*
* init_mon - initialize monitoring global data
@@ -101,15 +110,86 @@ init_mon(void)
{
/*
* Don't do much of anything here. We don't allocate memory
- * until someone explicitly starts us.
+ * until mon_start().
*/
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);
+ INIT_DLIST(mon_mru_list, mru);
+}
+
+
+/*
+ * remove_from_hash - removes an entry from the address hash table and
+ * decrements mru_entries.
+ */
+static void
+remove_from_hash(
+ mon_entry *mon
+ )
+{
+ u_int hash;
+ mon_entry *punlinked;
+
+ mru_entries--;
+ hash = MON_HASH(&mon->rmtadr);
+ UNLINK_SLIST(punlinked, mon_hash[hash], mon, hash_next,
+ mon_entry);
+ NTP_ENSURE(punlinked == mon);
+}
+
+
+static inline void
+mon_free_entry(
+ mon_entry *m
+ )
+{
+ ZERO(*m);
+ LINK_SLIST(mon_free, m, hash_next);
+}
+
+
+/*
+ * mon_reclaim_entry - Remove an entry from the MRU list and from the
+ * hash array, then zero-initialize it. Indirectly
+ * decrements mru_entries.
+
+ * The entry is prepared to be reused. Before return, in
+ * remove_from_hash(), mru_entries is decremented. It is the caller's
+ * responsibility to increment it again.
+ */
+static inline void
+mon_reclaim_entry(
+ mon_entry *m
+ )
+{
+ DEBUG_INSIST(NULL != m);
+
+ UNLINK_DLIST(m, mru);
+ remove_from_hash(m);
+ ZERO(*m);
+}
+
+
+/*
+ * mon_getmoremem - get more memory and put it on the free list
+ */
+static void
+mon_getmoremem(void)
+{
+ mon_entry *chunk;
+ u_int entries;
+
+ entries = (0 == mon_mem_increments)
+ ? mru_initalloc
+ : mru_incalloc;
+
+ if (entries) {
+ chunk = emalloc(entries * sizeof(*chunk));
+ mru_alloc += entries;
+ for (chunk += entries; entries; entries--)
+ mon_free_entry(--chunk);
+
+ mon_mem_increments++;
+ }
}
@@ -121,24 +201,31 @@ mon_start(
int mode
)
{
+ size_t octets;
+ u_int min_hash_slots;
- if (mon_enabled != MON_OFF) {
+ if (MON_OFF == mode) /* MON_OFF is 0 */
+ return;
+ if (mon_enabled) {
mon_enabled |= mode;
return;
}
- if (mode == MON_OFF)
- return;
-
- if (!mon_have_memory) {
- mon_total_mem = 0;
- mon_mem_increments = 0;
- mon_free = NULL;
+ if (0 == mon_mem_increments)
mon_getmoremem();
- mon_have_memory = 1;
- }
+ /*
+ * Select the MRU hash table size to limit the average count
+ * per bucket at capacity (mru_maxdepth) to 8, if possible
+ * given our hash is limited to 16 bits.
+ */
+ min_hash_slots = (mru_maxdepth / 8) + 1;
+ mon_hash_bits = 0;
+ while (min_hash_slots >>= 1)
+ mon_hash_bits++;
+ mon_hash_bits = max(4, mon_hash_bits);
+ mon_hash_bits = min(16, mon_hash_bits);
+ octets = sizeof(*mon_hash) * MON_HASH_SIZE;
+ mon_hash = erealloc_zero(mon_hash, octets, 0);
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
mon_enabled = mode;
}
@@ -151,10 +238,9 @@ mon_stop(
int mode
)
{
- register struct mon_data *md, *md_next;
- register int i;
+ mon_entry *mon;
- if (mon_enabled == MON_OFF)
+ if (MON_OFF == mon_enabled)
return;
if ((mon_enabled & mode) == 0 || mode == MON_OFF)
return;
@@ -164,245 +250,247 @@ mon_stop(
return;
/*
- * Put everything back on the free list
+ * Move everything on the MRU list to the free list quickly,
+ * without bothering to remove each from either the MRU list or
+ * the hash table.
*/
- 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;
+ ITER_DLIST_BEGIN(mon_mru_list, mon, mru, mon_entry)
+ mon_free_entry(mon);
+ ITER_DLIST_END()
+
+ /* empty the MRU list and hash table. */
+ mru_entries = 0;
+ INIT_DLIST(mon_mru_list, mru);
+ zero_mem(mon_hash, sizeof(*mon_hash) * MON_HASH_SIZE);
}
+
+/*
+ * mon_clearinterface -- remove mru entries referring to a local address
+ * which is going away.
+ */
void
-ntp_monclearinterface(struct interface *interface)
+mon_clearinterface(
+ endpt *lcladr
+ )
{
- struct mon_data *md;
-
- for (md = mon_mru_list.mru_next; md != &mon_mru_list;
- md = md->mru_next) {
- if (md->interface == interface) {
- /* dequeue from mru list and put to free list */
- md->mru_prev->mru_next = md->mru_next;
- md->mru_next->mru_prev = md->mru_prev;
- remove_from_hash(md);
- md->hash_next = mon_free;
- mon_free = md;
+ mon_entry *mon;
+
+ /* iterate mon over mon_mru_list */
+ ITER_DLIST_BEGIN(mon_mru_list, mon, mru, mon_entry)
+ if (mon->lcladr == lcladr) {
+ /* remove from mru list */
+ UNLINK_DLIST(mon, mru);
+ /* remove from hash list, adjust mru_entries */
+ remove_from_hash(mon);
+ /* put on free list */
+ mon_free_entry(mon);
}
- }
+ ITER_DLIST_END()
}
/*
* ntp_monitor - record stats about this packet
*
- * Returns flags
+ * Returns supplied restriction flags, with RES_LIMITED and RES_KOD
+ * cleared unless the packet should not be responded to normally
+ * (RES_LIMITED) and possibly should trigger a KoD response (RES_KOD).
+ * The returned flags are saved in the MRU entry, so that it reflects
+ * whether the last packet from that source triggered rate limiting,
+ * and if so, possible KoD response. This implies you can not tell
+ * whether a given address is eligible for rate limiting/KoD from the
+ * monlist restrict bits, only whether or not the last packet triggered
+ * such responses. ntpdc -c reslist lets you see whether RES_LIMITED
+ * or RES_KOD is lit for a particular address before ntp_monitor()'s
+ * typical dousing.
*/
-int
+u_short
ntp_monitor(
struct recvbuf *rbufp,
- int flags
+ u_short flags
)
{
- register struct pkt *pkt;
- register struct mon_data *md;
- sockaddr_u addr;
- register u_int hash;
- register int mode;
- int interval;
+ l_fp interval_fp;
+ struct pkt * pkt;
+ mon_entry * mon;
+ mon_entry * oldest;
+ int oldest_age;
+ u_int hash;
+ u_short restrict_mask;
+ u_char mode;
+ u_char version;
+ int interval;
+ int head; /* headway increment */
+ int leak; /* new headway */
+ int limit; /* average threshold */
if (mon_enabled == MON_OFF)
- return (flags);
+ return ~(RES_LIMITED | RES_KOD) & flags;
pkt = &rbufp->recv_pkt;
- memset(&addr, 0, sizeof(addr));
- memcpy(&addr, &(rbufp->recv_srcadr), sizeof(addr));
- hash = MON_HASH(&addr);
+ hash = MON_HASH(&rbufp->recv_srcadr);
mode = PKT_MODE(pkt->li_vn_mode);
- md = mon_hash[hash];
- while (md != NULL) {
- int head; /* headway increment */
- int leak; /* new headway */
- int limit; /* average threshold */
+ version = PKT_VERSION(pkt->li_vn_mode);
+ mon = mon_hash[hash];
+
+ /*
+ * We keep track of all traffic for a given IP in one entry,
+ * otherwise cron'ed ntpdate or similar evades RES_LIMITED.
+ */
+
+ for (; mon != NULL; mon = mon->hash_next)
+ if (SOCK_EQ(&mon->rmtadr, &rbufp->recv_srcadr))
+ break;
+
+ if (mon != NULL) {
+ interval_fp = rbufp->recv_time;
+ L_SUB(&interval_fp, &mon->last);
+ /* add one-half second to round up */
+ L_ADDUF(&interval_fp, 0x80000000);
+ interval = interval_fp.l_i;
+ mon->last = rbufp->recv_time;
+ NSRCPORT(&mon->rmtadr) = NSRCPORT(&rbufp->recv_srcadr);
+ mon->count++;
+ restrict_mask = flags;
+ mon->vn_mode = VN_MODE(version, mode);
+
+ /* Shuffle to the head of the MRU list. */
+ UNLINK_DLIST(mon, mru);
+ LINK_DLIST(mon_mru_list, mon, mru);
/*
- * Match address only to conserve MRU size.
+ * At this point the most recent arrival is first in the
+ * MRU list. Decrease the counter by the headway, but
+ * not less than zero.
*/
- if (SOCK_EQ(&md->rmtadr, &addr)) {
- interval = current_time - md->lasttime;
- md->lasttime = current_time;
- md->count++;
- md->flags = flags;
- 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;
-
- /*
- * At this point the most recent arrival is
- * first in the MRU list. Decrease the counter
- * by the headway, but not less than zero.
- */
- md->leak -= interval;
- if (md->leak < 0)
- md->leak = 0;
- head = 1 << ntp_minpoll;
- leak = md->leak + head;
- limit = NTP_SHIFT * head;
-#ifdef DEBUG
- if (debug > 1)
- printf("restrict: interval %d headway %d limit %d\n",
- interval, leak, limit);
-#endif
+ mon->leak -= interval;
+ mon->leak = max(0, mon->leak);
+ head = 1 << ntp_minpoll;
+ leak = mon->leak + head;
+ limit = NTP_SHIFT * head;
- /*
- * If the minimum and average thresholds are not
- * exceeded, douse the RES_LIMITED and RES_KOD
- * bits and increase the counter by the headway
- * increment. Note that we give a 1-s grace for
- * the minimum threshold and a 2-s grace for the
- * headway increment. If one or both thresholds
- * are exceeded and the old counter is less than
- * the average threshold, set the counter to the
- * average threshold plus the inrcrment and
- * leave the RES_KOD bit lit. Othewise, leave
- * the counter alone and douse the RES_KOD bit.
- * This rate-limits the KoDs to no less than the
- * average headway.
- */
- if (interval + 1 >= (1 << ntp_minpkt) &&
- leak < limit) {
- md->leak = leak - 2;
- md->flags &= ~(RES_LIMITED | RES_KOD);
- } else if (md->leak < limit) {
- md->leak = limit + head;
- } else {
- md->flags &= ~RES_KOD;
- }
- return (md->flags);
- }
- md = md->hash_next;
+ DPRINTF(2, ("MRU: interval %d headway %d limit %d\n",
+ interval, leak, limit));
+
+ /*
+ * If the minimum and average thresholds are not
+ * exceeded, douse the RES_LIMITED and RES_KOD bits and
+ * increase the counter by the headway increment. Note
+ * that we give a 1-s grace for the minimum threshold
+ * and a 2-s grace for the headway increment. If one or
+ * both thresholds are exceeded and the old counter is
+ * less than the average threshold, set the counter to
+ * the average threshold plus the increment and leave
+ * the RES_LIMITED and RES_KOD bits lit. Otherwise,
+ * leave the counter alone and douse the RES_KOD bit.
+ * This rate-limits the KoDs to no less than the average
+ * headway.
+ */
+ if (interval + 1 >= ntp_minpkt && leak < limit) {
+ mon->leak = leak - 2;
+ restrict_mask &= ~(RES_LIMITED | RES_KOD);
+ } else if (mon->leak < limit)
+ mon->leak = limit + head;
+ else
+ restrict_mask &= ~RES_KOD;
+
+ mon->flags = restrict_mask;
+
+ return mon->flags;
}
/*
* 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.
+ *
+ * The following ntp.conf "mru" knobs come into play determining
+ * the depth (or count) of the MRU list:
+ * - mru_mindepth ("mru mindepth") is a floor beneath which
+ * entries are kept without regard to their age. The
+ * default is 600 which matches the longtime implementation
+ * limit on the total number of entries.
+ * - mru_maxage ("mru maxage") is a ceiling on the age in
+ * seconds of entries. Entries older than this are
+ * reclaimed once mon_mindepth is exceeded. 64s default.
+ * Note that entries older than this can easily survive
+ * as they are reclaimed only as needed.
+ * - mru_maxdepth ("mru maxdepth") is a hard limit on the
+ * number of entries.
+ * - "mru maxmem" sets mru_maxdepth to the number of entries
+ * which fit in the given number of kilobytes. The default is
+ * 1024, or 1 megabyte.
+ * - mru_initalloc ("mru initalloc" sets the count of the
+ * initial allocation of MRU entries.
+ * - "mru initmem" sets mru_initalloc in units of kilobytes.
+ * The default is 4.
+ * - mru_incalloc ("mru incalloc" sets the number of entries to
+ * allocate on-demand each time the free list is empty.
+ * - "mru incmem" sets mru_incalloc in units of kilobytes.
+ * The default is 4.
+ * Whichever of "mru maxmem" or "mru maxdepth" occurs last in
+ * ntp.conf controls. Similarly for "mru initalloc" and "mru
+ * initmem", and for "mru incalloc" and "mru incmem".
*/
- if (mon_free == NULL && mon_total_mem >= MAXMONMEM) {
-
- /*
- * Preempt from the MRU list if old enough.
- */
- md = mon_mru_list.mru_prev;
- if (ntp_random() / (2. * FRAC) > (double)(current_time
- - md->lasttime) / mon_age)
- return (flags & ~(RES_LIMITED | RES_KOD));
-
- 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)
+ if (mru_entries < mru_mindepth) {
+ if (NULL == mon_free)
mon_getmoremem();
- md = mon_free;
- mon_free = md->hash_next;
+ UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
+ } else {
+ oldest = TAIL_DLIST(mon_mru_list, mru);
+ oldest_age = 0; /* silence uninit warning */
+ if (oldest != NULL) {
+ interval_fp = rbufp->recv_time;
+ L_SUB(&interval_fp, &oldest->last);
+ /* add one-half second to round up */
+ L_ADDUF(&interval_fp, 0x80000000);
+ oldest_age = interval_fp.l_i;
+ }
+ /* note -1 is legal for mru_maxage (disables) */
+ if (oldest != NULL && mru_maxage < oldest_age) {
+ mon_reclaim_entry(oldest);
+ mon = oldest;
+ } else if (mon_free != NULL || mru_alloc <
+ mru_maxdepth) {
+ if (NULL == mon_free)
+ mon_getmoremem();
+ UNLINK_HEAD_SLIST(mon, mon_free, hash_next);
+ /* Preempt from the MRU list if old enough. */
+ } else if (ntp_random() / (2. * FRAC) >
+ (double)oldest_age / mon_age) {
+ return ~(RES_LIMITED | RES_KOD) & flags;
+ } else {
+ mon_reclaim_entry(oldest);
+ mon = oldest;
+ }
}
/*
* Got one, initialize it
*/
- md->lasttime = md->firsttime = current_time;
- md->count = 1;
- md->flags = flags & ~(RES_LIMITED | RES_KOD);
- md->leak = 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_MCASTOPEN) && rbufp->fd == md->interface->fd) ?
- MDF_MCAST: rbufp->fd == md->interface->bfd ? MDF_BCAST :
- MDF_UCAST);
+ mru_entries++;
+ mru_peakentries = max(mru_peakentries, mru_entries);
+ mon->last = rbufp->recv_time;
+ mon->first = mon->last;
+ mon->count = 1;
+ mon->flags = ~(RES_LIMITED | RES_KOD) & flags;
+ mon->leak = 0;
+ memcpy(&mon->rmtadr, &rbufp->recv_srcadr, sizeof(mon->rmtadr));
+ mon->vn_mode = VN_MODE(version, mode);
+ mon->lcladr = rbufp->dstadr;
+ mon->cast_flags = (u_char)(((rbufp->dstadr->flags &
+ INT_MCASTOPEN) && rbufp->fd == mon->lcladr->fd) ? MDF_MCAST
+ : rbufp->fd == mon->lcladr->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;
- return (md->flags);
-}
-
+ LINK_SLIST(mon_hash[hash], mon, hash_next);
+ LINK_DLIST(mon_mru_list, mon, mru);
-/*
- * 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++;
+ return mon->flags;
}
-static void
-remove_from_hash(
- struct mon_data *md
- )
-{
- register u_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/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index 248545f067c3..b3f4e4fd8a6f 100644
--- a/ntpd/ntp_parser.c
+++ b/ntpd/ntp_parser.c
@@ -1,20 +1,19 @@
-/* A Bison parser, made by GNU Bison 2.4.3. */
+/* A Bison parser, made by GNU Bison 3.0.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2009, 2010 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 3 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, see <http://www.gnu.org/licenses/>. */
@@ -27,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -45,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.3"
+#define YYBISON_VERSION "3.0.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -59,15 +58,11 @@
/* Pull parsers. */
#define YYPULL 1
-/* Using locations. */
-#define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
-
-/* Line 189 of yacc.c */
-#line 11 "ntp_parser.y"
+#line 14 "ntp_parser.y" /* yacc.c:339 */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -78,7 +73,6 @@
#include "ntp_machine.h"
#include "ntp_stdlib.h"
#include "ntp_filegen.h"
- #include "ntp_data_structures.h"
#include "ntp_scanner.h"
#include "ntp_config.h"
#include "ntp_crypto.h"
@@ -90,24 +84,27 @@
for both the simulator and the daemon
*/
-
- struct FILE_INFO *ip_file; /* Pointer to the configuration file stream */
-
#define YYMALLOC emalloc
#define YYFREE free
#define YYERROR_VERBOSE
- #define YYMAXDEPTH 1000 /* stop the madness sooner */
- void yyerror(const char *msg);
- extern int input_from_file; /* 0=input from ntpq :config */
+ #define YYMAXDEPTH 1000 /* stop the madness sooner */
+ void yyerror(struct FILE_INFO *ip_file, const char *msg);
+ #ifdef SIM
+ # define ONLY_SIM(a) (a)
+ #else
+ # define ONLY_SIM(a) NULL
+ #endif
-/* Line 189 of yacc.c */
-#line 106 "ntp_parser.c"
+#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 1
-#endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@@ -117,387 +114,439 @@
# define YYERROR_VERBOSE 0
#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 1
+/* In a future release of Bison, this section will be replaced
+ by #include "y.tab.h". */
+#ifndef YY_YY_Y_TAB_H_INCLUDED
+# define YY_YY_Y_TAB_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+#if YYDEBUG
+extern int yydebug;
#endif
-
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_Age = 258,
- T_All = 259,
- T_Allan = 260,
- T_Auth = 261,
- T_Autokey = 262,
- T_Automax = 263,
- T_Average = 264,
- T_Bclient = 265,
- T_Beacon = 266,
- T_Bias = 267,
- T_Broadcast = 268,
- T_Broadcastclient = 269,
- T_Broadcastdelay = 270,
- T_Burst = 271,
- T_Calibrate = 272,
- T_Calldelay = 273,
- T_Ceiling = 274,
- T_Clockstats = 275,
- T_Cohort = 276,
- T_ControlKey = 277,
- T_Crypto = 278,
- T_Cryptostats = 279,
- T_Day = 280,
- T_Default = 281,
- T_Digest = 282,
- T_Disable = 283,
- T_Discard = 284,
- T_Dispersion = 285,
- T_Double = 286,
- T_Driftfile = 287,
- T_Drop = 288,
- T_Ellipsis = 289,
- T_Enable = 290,
- T_End = 291,
- T_False = 292,
- T_File = 293,
- T_Filegen = 294,
- T_Flag1 = 295,
- T_Flag2 = 296,
- T_Flag3 = 297,
- T_Flag4 = 298,
- T_Flake = 299,
- T_Floor = 300,
- T_Freq = 301,
- T_Fudge = 302,
- T_Host = 303,
- T_Huffpuff = 304,
- T_Iburst = 305,
- T_Ident = 306,
- T_Ignore = 307,
- T_Includefile = 308,
- T_Integer = 309,
- T_Interface = 310,
- T_Ipv4 = 311,
- T_Ipv4_flag = 312,
- T_Ipv6 = 313,
- T_Ipv6_flag = 314,
- T_Kernel = 315,
- T_Key = 316,
- T_Keys = 317,
- T_Keysdir = 318,
- T_Kod = 319,
- T_Mssntp = 320,
- T_Leapfile = 321,
- T_Limited = 322,
- T_Link = 323,
- T_Listen = 324,
- T_Logconfig = 325,
- T_Logfile = 326,
- T_Loopstats = 327,
- T_Lowpriotrap = 328,
- T_Manycastclient = 329,
- T_Manycastserver = 330,
- T_Mask = 331,
- T_Maxclock = 332,
- T_Maxdist = 333,
- T_Maxpoll = 334,
- T_Minclock = 335,
- T_Mindist = 336,
- T_Minimum = 337,
- T_Minpoll = 338,
- T_Minsane = 339,
- T_Mode = 340,
- T_Monitor = 341,
- T_Month = 342,
- T_Multicastclient = 343,
- T_Nic = 344,
- T_Nolink = 345,
- T_Nomodify = 346,
- T_None = 347,
- T_Nopeer = 348,
- T_Noquery = 349,
- T_Noselect = 350,
- T_Noserve = 351,
- T_Notrap = 352,
- T_Notrust = 353,
- T_Ntp = 354,
- T_Ntpport = 355,
- T_NtpSignDsocket = 356,
- T_Orphan = 357,
- T_Panic = 358,
- T_Peer = 359,
- T_Peerstats = 360,
- T_Phone = 361,
- T_Pid = 362,
- T_Pidfile = 363,
- T_Pool = 364,
- T_Port = 365,
- T_Preempt = 366,
- T_Prefer = 367,
- T_Protostats = 368,
- T_Pw = 369,
- T_Qos = 370,
- T_Randfile = 371,
- T_Rawstats = 372,
- T_Refid = 373,
- T_Requestkey = 374,
- T_Restrict = 375,
- T_Revoke = 376,
- T_Saveconfigdir = 377,
- T_Server = 378,
- T_Setvar = 379,
- T_Sign = 380,
- T_Statistics = 381,
- T_Stats = 382,
- T_Statsdir = 383,
- T_Step = 384,
- T_Stepout = 385,
- T_Stratum = 386,
- T_String = 387,
- T_Sysstats = 388,
- T_Tick = 389,
- T_Time1 = 390,
- T_Time2 = 391,
- T_Timingstats = 392,
- T_Tinker = 393,
- T_Tos = 394,
- T_Trap = 395,
- T_True = 396,
- T_Trustedkey = 397,
- T_Ttl = 398,
- T_Type = 399,
- T_Unconfig = 400,
- T_Unpeer = 401,
- T_Version = 402,
- T_WanderThreshold = 403,
- T_Week = 404,
- T_Wildcard = 405,
- T_Xleave = 406,
- T_Year = 407,
- T_Flag = 408,
- T_Void = 409,
- T_EOC = 410,
- T_Simulate = 411,
- T_Beep_Delay = 412,
- T_Sim_Duration = 413,
- T_Server_Offset = 414,
- T_Duration = 415,
- T_Freq_Offset = 416,
- T_Wander = 417,
- T_Jitter = 418,
- T_Prop_Delay = 419,
- T_Proc_Delay = 420
- };
+ enum yytokentype
+ {
+ T_Abbrev = 258,
+ T_Age = 259,
+ T_All = 260,
+ T_Allan = 261,
+ T_Allpeers = 262,
+ T_Auth = 263,
+ T_Autokey = 264,
+ T_Automax = 265,
+ T_Average = 266,
+ T_Bclient = 267,
+ T_Beacon = 268,
+ T_Broadcast = 269,
+ T_Broadcastclient = 270,
+ T_Broadcastdelay = 271,
+ T_Burst = 272,
+ T_Calibrate = 273,
+ T_Ceiling = 274,
+ T_Clockstats = 275,
+ T_Cohort = 276,
+ T_ControlKey = 277,
+ T_Crypto = 278,
+ T_Cryptostats = 279,
+ T_Ctl = 280,
+ T_Day = 281,
+ T_Default = 282,
+ T_Digest = 283,
+ T_Disable = 284,
+ T_Discard = 285,
+ T_Dispersion = 286,
+ T_Double = 287,
+ T_Driftfile = 288,
+ T_Drop = 289,
+ T_Ellipsis = 290,
+ T_Enable = 291,
+ T_End = 292,
+ T_False = 293,
+ T_File = 294,
+ T_Filegen = 295,
+ T_Filenum = 296,
+ T_Flag1 = 297,
+ T_Flag2 = 298,
+ T_Flag3 = 299,
+ T_Flag4 = 300,
+ T_Flake = 301,
+ T_Floor = 302,
+ T_Freq = 303,
+ T_Fudge = 304,
+ T_Host = 305,
+ T_Huffpuff = 306,
+ T_Iburst = 307,
+ T_Ident = 308,
+ T_Ignore = 309,
+ T_Incalloc = 310,
+ T_Incmem = 311,
+ T_Initalloc = 312,
+ T_Initmem = 313,
+ T_Includefile = 314,
+ T_Integer = 315,
+ T_Interface = 316,
+ T_Intrange = 317,
+ T_Io = 318,
+ T_Ipv4 = 319,
+ T_Ipv4_flag = 320,
+ T_Ipv6 = 321,
+ T_Ipv6_flag = 322,
+ T_Kernel = 323,
+ T_Key = 324,
+ T_Keys = 325,
+ T_Keysdir = 326,
+ T_Kod = 327,
+ T_Mssntp = 328,
+ T_Leapfile = 329,
+ T_Limited = 330,
+ T_Link = 331,
+ T_Listen = 332,
+ T_Logconfig = 333,
+ T_Logfile = 334,
+ T_Loopstats = 335,
+ T_Lowpriotrap = 336,
+ T_Manycastclient = 337,
+ T_Manycastserver = 338,
+ T_Mask = 339,
+ T_Maxage = 340,
+ T_Maxclock = 341,
+ T_Maxdepth = 342,
+ T_Maxdist = 343,
+ T_Maxmem = 344,
+ T_Maxpoll = 345,
+ T_Mem = 346,
+ T_Memlock = 347,
+ T_Minclock = 348,
+ T_Mindepth = 349,
+ T_Mindist = 350,
+ T_Minimum = 351,
+ T_Minpoll = 352,
+ T_Minsane = 353,
+ T_Mode = 354,
+ T_Mode7 = 355,
+ T_Monitor = 356,
+ T_Month = 357,
+ T_Mru = 358,
+ T_Multicastclient = 359,
+ T_Nic = 360,
+ T_Nolink = 361,
+ T_Nomodify = 362,
+ T_Nomrulist = 363,
+ T_None = 364,
+ T_Nonvolatile = 365,
+ T_Nopeer = 366,
+ T_Noquery = 367,
+ T_Noselect = 368,
+ T_Noserve = 369,
+ T_Notrap = 370,
+ T_Notrust = 371,
+ T_Ntp = 372,
+ T_Ntpport = 373,
+ T_NtpSignDsocket = 374,
+ T_Orphan = 375,
+ T_Orphanwait = 376,
+ T_Panic = 377,
+ T_Peer = 378,
+ T_Peerstats = 379,
+ T_Phone = 380,
+ T_Pid = 381,
+ T_Pidfile = 382,
+ T_Pool = 383,
+ T_Port = 384,
+ T_Preempt = 385,
+ T_Prefer = 386,
+ T_Protostats = 387,
+ T_Pw = 388,
+ T_Randfile = 389,
+ T_Rawstats = 390,
+ T_Refid = 391,
+ T_Requestkey = 392,
+ T_Reset = 393,
+ T_Restrict = 394,
+ T_Revoke = 395,
+ T_Rlimit = 396,
+ T_Saveconfigdir = 397,
+ T_Server = 398,
+ T_Setvar = 399,
+ T_Source = 400,
+ T_Stacksize = 401,
+ T_Statistics = 402,
+ T_Stats = 403,
+ T_Statsdir = 404,
+ T_Step = 405,
+ T_Stepout = 406,
+ T_Stratum = 407,
+ T_String = 408,
+ T_Sys = 409,
+ T_Sysstats = 410,
+ T_Tick = 411,
+ T_Time1 = 412,
+ T_Time2 = 413,
+ T_Timer = 414,
+ T_Timingstats = 415,
+ T_Tinker = 416,
+ T_Tos = 417,
+ T_Trap = 418,
+ T_True = 419,
+ T_Trustedkey = 420,
+ T_Ttl = 421,
+ T_Type = 422,
+ T_U_int = 423,
+ T_Unconfig = 424,
+ T_Unpeer = 425,
+ T_Version = 426,
+ T_WanderThreshold = 427,
+ T_Week = 428,
+ T_Wildcard = 429,
+ T_Xleave = 430,
+ T_Year = 431,
+ T_Flag = 432,
+ T_EOC = 433,
+ T_Simulate = 434,
+ T_Beep_Delay = 435,
+ T_Sim_Duration = 436,
+ T_Server_Offset = 437,
+ T_Duration = 438,
+ T_Freq_Offset = 439,
+ T_Wander = 440,
+ T_Jitter = 441,
+ T_Prop_Delay = 442,
+ T_Proc_Delay = 443
+ };
#endif
/* Tokens. */
-#define T_Age 258
-#define T_All 259
-#define T_Allan 260
-#define T_Auth 261
-#define T_Autokey 262
-#define T_Automax 263
-#define T_Average 264
-#define T_Bclient 265
-#define T_Beacon 266
-#define T_Bias 267
-#define T_Broadcast 268
-#define T_Broadcastclient 269
-#define T_Broadcastdelay 270
-#define T_Burst 271
-#define T_Calibrate 272
-#define T_Calldelay 273
+#define T_Abbrev 258
+#define T_Age 259
+#define T_All 260
+#define T_Allan 261
+#define T_Allpeers 262
+#define T_Auth 263
+#define T_Autokey 264
+#define T_Automax 265
+#define T_Average 266
+#define T_Bclient 267
+#define T_Beacon 268
+#define T_Broadcast 269
+#define T_Broadcastclient 270
+#define T_Broadcastdelay 271
+#define T_Burst 272
+#define T_Calibrate 273
#define T_Ceiling 274
#define T_Clockstats 275
#define T_Cohort 276
#define T_ControlKey 277
#define T_Crypto 278
#define T_Cryptostats 279
-#define T_Day 280
-#define T_Default 281
-#define T_Digest 282
-#define T_Disable 283
-#define T_Discard 284
-#define T_Dispersion 285
-#define T_Double 286
-#define T_Driftfile 287
-#define T_Drop 288
-#define T_Ellipsis 289
-#define T_Enable 290
-#define T_End 291
-#define T_False 292
-#define T_File 293
-#define T_Filegen 294
-#define T_Flag1 295
-#define T_Flag2 296
-#define T_Flag3 297
-#define T_Flag4 298
-#define T_Flake 299
-#define T_Floor 300
-#define T_Freq 301
-#define T_Fudge 302
-#define T_Host 303
-#define T_Huffpuff 304
-#define T_Iburst 305
-#define T_Ident 306
-#define T_Ignore 307
-#define T_Includefile 308
-#define T_Integer 309
-#define T_Interface 310
-#define T_Ipv4 311
-#define T_Ipv4_flag 312
-#define T_Ipv6 313
-#define T_Ipv6_flag 314
-#define T_Kernel 315
-#define T_Key 316
-#define T_Keys 317
-#define T_Keysdir 318
-#define T_Kod 319
-#define T_Mssntp 320
-#define T_Leapfile 321
-#define T_Limited 322
-#define T_Link 323
-#define T_Listen 324
-#define T_Logconfig 325
-#define T_Logfile 326
-#define T_Loopstats 327
-#define T_Lowpriotrap 328
-#define T_Manycastclient 329
-#define T_Manycastserver 330
-#define T_Mask 331
-#define T_Maxclock 332
-#define T_Maxdist 333
-#define T_Maxpoll 334
-#define T_Minclock 335
-#define T_Mindist 336
-#define T_Minimum 337
-#define T_Minpoll 338
-#define T_Minsane 339
-#define T_Mode 340
-#define T_Monitor 341
-#define T_Month 342
-#define T_Multicastclient 343
-#define T_Nic 344
-#define T_Nolink 345
-#define T_Nomodify 346
-#define T_None 347
-#define T_Nopeer 348
-#define T_Noquery 349
-#define T_Noselect 350
-#define T_Noserve 351
-#define T_Notrap 352
-#define T_Notrust 353
-#define T_Ntp 354
-#define T_Ntpport 355
-#define T_NtpSignDsocket 356
-#define T_Orphan 357
-#define T_Panic 358
-#define T_Peer 359
-#define T_Peerstats 360
-#define T_Phone 361
-#define T_Pid 362
-#define T_Pidfile 363
-#define T_Pool 364
-#define T_Port 365
-#define T_Preempt 366
-#define T_Prefer 367
-#define T_Protostats 368
-#define T_Pw 369
-#define T_Qos 370
-#define T_Randfile 371
-#define T_Rawstats 372
-#define T_Refid 373
-#define T_Requestkey 374
-#define T_Restrict 375
-#define T_Revoke 376
-#define T_Saveconfigdir 377
-#define T_Server 378
-#define T_Setvar 379
-#define T_Sign 380
-#define T_Statistics 381
-#define T_Stats 382
-#define T_Statsdir 383
-#define T_Step 384
-#define T_Stepout 385
-#define T_Stratum 386
-#define T_String 387
-#define T_Sysstats 388
-#define T_Tick 389
-#define T_Time1 390
-#define T_Time2 391
-#define T_Timingstats 392
-#define T_Tinker 393
-#define T_Tos 394
-#define T_Trap 395
-#define T_True 396
-#define T_Trustedkey 397
-#define T_Ttl 398
-#define T_Type 399
-#define T_Unconfig 400
-#define T_Unpeer 401
-#define T_Version 402
-#define T_WanderThreshold 403
-#define T_Week 404
-#define T_Wildcard 405
-#define T_Xleave 406
-#define T_Year 407
-#define T_Flag 408
-#define T_Void 409
-#define T_EOC 410
-#define T_Simulate 411
-#define T_Beep_Delay 412
-#define T_Sim_Duration 413
-#define T_Server_Offset 414
-#define T_Duration 415
-#define T_Freq_Offset 416
-#define T_Wander 417
-#define T_Jitter 418
-#define T_Prop_Delay 419
-#define T_Proc_Delay 420
-
-
-
-
+#define T_Ctl 280
+#define T_Day 281
+#define T_Default 282
+#define T_Digest 283
+#define T_Disable 284
+#define T_Discard 285
+#define T_Dispersion 286
+#define T_Double 287
+#define T_Driftfile 288
+#define T_Drop 289
+#define T_Ellipsis 290
+#define T_Enable 291
+#define T_End 292
+#define T_False 293
+#define T_File 294
+#define T_Filegen 295
+#define T_Filenum 296
+#define T_Flag1 297
+#define T_Flag2 298
+#define T_Flag3 299
+#define T_Flag4 300
+#define T_Flake 301
+#define T_Floor 302
+#define T_Freq 303
+#define T_Fudge 304
+#define T_Host 305
+#define T_Huffpuff 306
+#define T_Iburst 307
+#define T_Ident 308
+#define T_Ignore 309
+#define T_Incalloc 310
+#define T_Incmem 311
+#define T_Initalloc 312
+#define T_Initmem 313
+#define T_Includefile 314
+#define T_Integer 315
+#define T_Interface 316
+#define T_Intrange 317
+#define T_Io 318
+#define T_Ipv4 319
+#define T_Ipv4_flag 320
+#define T_Ipv6 321
+#define T_Ipv6_flag 322
+#define T_Kernel 323
+#define T_Key 324
+#define T_Keys 325
+#define T_Keysdir 326
+#define T_Kod 327
+#define T_Mssntp 328
+#define T_Leapfile 329
+#define T_Limited 330
+#define T_Link 331
+#define T_Listen 332
+#define T_Logconfig 333
+#define T_Logfile 334
+#define T_Loopstats 335
+#define T_Lowpriotrap 336
+#define T_Manycastclient 337
+#define T_Manycastserver 338
+#define T_Mask 339
+#define T_Maxage 340
+#define T_Maxclock 341
+#define T_Maxdepth 342
+#define T_Maxdist 343
+#define T_Maxmem 344
+#define T_Maxpoll 345
+#define T_Mem 346
+#define T_Memlock 347
+#define T_Minclock 348
+#define T_Mindepth 349
+#define T_Mindist 350
+#define T_Minimum 351
+#define T_Minpoll 352
+#define T_Minsane 353
+#define T_Mode 354
+#define T_Mode7 355
+#define T_Monitor 356
+#define T_Month 357
+#define T_Mru 358
+#define T_Multicastclient 359
+#define T_Nic 360
+#define T_Nolink 361
+#define T_Nomodify 362
+#define T_Nomrulist 363
+#define T_None 364
+#define T_Nonvolatile 365
+#define T_Nopeer 366
+#define T_Noquery 367
+#define T_Noselect 368
+#define T_Noserve 369
+#define T_Notrap 370
+#define T_Notrust 371
+#define T_Ntp 372
+#define T_Ntpport 373
+#define T_NtpSignDsocket 374
+#define T_Orphan 375
+#define T_Orphanwait 376
+#define T_Panic 377
+#define T_Peer 378
+#define T_Peerstats 379
+#define T_Phone 380
+#define T_Pid 381
+#define T_Pidfile 382
+#define T_Pool 383
+#define T_Port 384
+#define T_Preempt 385
+#define T_Prefer 386
+#define T_Protostats 387
+#define T_Pw 388
+#define T_Randfile 389
+#define T_Rawstats 390
+#define T_Refid 391
+#define T_Requestkey 392
+#define T_Reset 393
+#define T_Restrict 394
+#define T_Revoke 395
+#define T_Rlimit 396
+#define T_Saveconfigdir 397
+#define T_Server 398
+#define T_Setvar 399
+#define T_Source 400
+#define T_Stacksize 401
+#define T_Statistics 402
+#define T_Stats 403
+#define T_Statsdir 404
+#define T_Step 405
+#define T_Stepout 406
+#define T_Stratum 407
+#define T_String 408
+#define T_Sys 409
+#define T_Sysstats 410
+#define T_Tick 411
+#define T_Time1 412
+#define T_Time2 413
+#define T_Timer 414
+#define T_Timingstats 415
+#define T_Tinker 416
+#define T_Tos 417
+#define T_Trap 418
+#define T_True 419
+#define T_Trustedkey 420
+#define T_Ttl 421
+#define T_Type 422
+#define T_U_int 423
+#define T_Unconfig 424
+#define T_Unpeer 425
+#define T_Version 426
+#define T_WanderThreshold 427
+#define T_Week 428
+#define T_Wildcard 429
+#define T_Xleave 430
+#define T_Year 431
+#define T_Flag 432
+#define T_EOC 433
+#define T_Simulate 434
+#define T_Beep_Delay 435
+#define T_Sim_Duration 436
+#define T_Server_Offset 437
+#define T_Duration 438
+#define T_Freq_Offset 439
+#define T_Wander 440
+#define T_Jitter 441
+#define T_Prop_Delay 442
+#define T_Proc_Delay 443
+
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
-
-/* Line 214 of yacc.c */
-#line 50 "ntp_parser.y"
-
- char *String;
- double Double;
- int Integer;
- void *VoidPtr;
- queue *Queue;
- struct attr_val *Attr_val;
- struct address_node *Address_node;
- struct setvar_node *Set_var;
-
- /* Simulation types */
- server_info *Sim_server;
- script_info *Sim_script;
-
-
-
-/* Line 214 of yacc.c */
-#line 489 "ntp_parser.c"
-} YYSTYPE;
+#line 54 "ntp_parser.y" /* yacc.c:355 */
+
+ char * String;
+ double Double;
+ int Integer;
+ unsigned U_int;
+ gen_fifo * Generic_fifo;
+ attr_val * Attr_val;
+ attr_val_fifo * Attr_val_fifo;
+ int_fifo * Int_fifo;
+ string_fifo * String_fifo;
+ address_node * Address_node;
+ address_fifo * Address_fifo;
+ setvar_node * Set_var;
+ server_info * Sim_server;
+ server_info_fifo * Sim_server_fifo;
+ script_info * Sim_script;
+ script_info_fifo * Sim_script_fifo;
+
+#line 535 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-/* Copy the second part of user declarations. */
+extern YYSTYPE yylval;
+int yyparse (struct FILE_INFO *ip_file);
-/* Line 264 of yacc.c */
-#line 501 "ntp_parser.c"
+#endif /* !YY_YY_Y_TAB_H_INCLUDED */
+
+/* Copy the second part of user declarations. */
+
+#line 550 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -511,11 +560,8 @@ typedef unsigned char yytype_uint8;
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
#else
-typedef short int yytype_int8;
+typedef signed char yytype_int8;
#endif
#ifdef YYTYPE_UINT16
@@ -535,8 +581,7 @@ typedef short int yytype_int16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# elif ! defined YYSIZE_T
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
@@ -550,39 +595,68 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
#else
-static int
-YYID (yyi)
- int yyi;
+# define YY_INITIAL_VALUE(Value) Value
#endif
-{
- return yyi;
-}
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
+
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -600,11 +674,11 @@ YYID (yyi)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# endif
@@ -612,8 +686,8 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -627,25 +701,23 @@ YYID (yyi)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
@@ -655,7 +727,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -673,79 +745,85 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
+# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
#endif
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 168
+#define YYFINAL 203
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 630
+#define YYLAST 653
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 171
+#define YYNTOKENS 194
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 89
+#define YYNNTS 104
/* YYNRULES -- Number of rules. */
-#define YYNRULES 267
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 375
+#define YYNRULES 307
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 411
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 420
+#define YYMAXUTOK 443
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 167, 168, 2, 2, 2, 2, 2, 2, 2, 2,
+ 190, 191, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 166, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 189, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 169, 2, 170, 2, 2, 2, 2,
+ 2, 2, 2, 192, 2, 193, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -775,218 +853,127 @@ static const yytype_uint8 yytranslate[] =
135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
- 165
+ 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 186, 187, 188
};
#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 9, 12, 15, 16, 18, 20,
- 22, 24, 26, 28, 30, 32, 34, 36, 38, 40,
- 44, 47, 49, 51, 53, 55, 57, 59, 62, 64,
- 66, 68, 71, 73, 75, 77, 80, 82, 84, 86,
- 88, 90, 92, 94, 96, 98, 101, 103, 105, 107,
- 109, 111, 113, 116, 118, 120, 122, 125, 128, 131,
- 134, 137, 140, 143, 146, 149, 152, 155, 156, 159,
- 162, 165, 167, 169, 171, 173, 175, 177, 180, 183,
- 185, 188, 191, 194, 196, 198, 200, 202, 204, 206,
- 208, 210, 212, 215, 218, 222, 225, 227, 229, 231,
- 233, 235, 237, 239, 241, 243, 244, 247, 250, 253,
- 255, 257, 259, 261, 263, 265, 267, 269, 271, 273,
- 275, 277, 279, 282, 286, 290, 295, 300, 306, 307,
- 310, 312, 314, 316, 318, 320, 322, 324, 326, 328,
- 330, 332, 334, 336, 338, 341, 343, 346, 348, 350,
- 352, 356, 359, 361, 364, 367, 370, 373, 375, 377,
- 379, 381, 383, 385, 388, 391, 394, 396, 398, 400,
- 402, 404, 406, 408, 410, 412, 415, 418, 420, 423,
- 425, 427, 429, 431, 433, 435, 437, 439, 442, 445,
- 448, 452, 454, 457, 460, 463, 466, 469, 472, 476,
- 479, 481, 483, 485, 487, 489, 491, 493, 495, 498,
- 499, 504, 506, 507, 510, 512, 515, 518, 521, 523,
- 525, 529, 533, 535, 537, 539, 541, 543, 545, 547,
- 549, 551, 554, 556, 559, 561, 563, 565, 571, 574,
- 576, 579, 581, 583, 585, 587, 589, 591, 597, 599,
- 603, 606, 610, 614, 617, 619, 625, 630, 634, 637,
- 639, 646, 650, 653, 657, 661, 665, 669
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int16 yyrhs[] =
-{
- 172, 0, -1, 173, -1, 173, 174, 155, -1, 174,
- 155, -1, 1, 155, -1, -1, 175, -1, 186, -1,
- 188, -1, 189, -1, 198, -1, 206, -1, 193, -1,
- 212, -1, 217, -1, 221, -1, 225, -1, 248, -1,
- 176, 177, 180, -1, 176, 177, -1, 123, -1, 109,
- -1, 104, -1, 13, -1, 74, -1, 178, -1, 179,
- 132, -1, 132, -1, 57, -1, 59, -1, 180, 181,
- -1, 181, -1, 182, -1, 184, -1, 12, 247, -1,
- 183, -1, 7, -1, 16, -1, 50, -1, 95, -1,
- 111, -1, 112, -1, 141, -1, 151, -1, 185, 54,
- -1, 61, -1, 83, -1, 79, -1, 143, -1, 85,
- -1, 147, -1, 187, 177, -1, 145, -1, 146, -1,
- 14, -1, 75, 245, -1, 88, 245, -1, 8, 54,
- -1, 22, 54, -1, 23, 190, -1, 62, 132, -1,
- 63, 132, -1, 119, 54, -1, 121, 54, -1, 142,
- 241, -1, 101, 132, -1, -1, 190, 191, -1, 192,
- 132, -1, 121, 54, -1, 48, -1, 51, -1, 114,
- -1, 116, -1, 125, -1, 27, -1, 139, 194, -1,
- 194, 195, -1, 195, -1, 196, 54, -1, 197, 247,
- -1, 21, 246, -1, 19, -1, 45, -1, 102, -1,
- 84, -1, 11, -1, 81, -1, 78, -1, 80, -1,
- 77, -1, 126, 199, -1, 128, 132, -1, 39, 200,
- 201, -1, 199, 200, -1, 200, -1, 20, -1, 24,
- -1, 72, -1, 105, -1, 117, -1, 133, -1, 137,
- -1, 113, -1, -1, 201, 202, -1, 38, 132, -1,
- 144, 205, -1, 203, -1, 204, -1, 68, -1, 90,
- -1, 35, -1, 28, -1, 92, -1, 107, -1, 25,
- -1, 149, -1, 87, -1, 152, -1, 3, -1, 29,
- 209, -1, 120, 177, 207, -1, 120, 26, 207, -1,
- 120, 57, 26, 207, -1, 120, 59, 26, 207, -1,
- 120, 178, 76, 178, 207, -1, -1, 207, 208, -1,
- 44, -1, 52, -1, 64, -1, 65, -1, 67, -1,
- 73, -1, 91, -1, 93, -1, 94, -1, 96, -1,
- 97, -1, 98, -1, 100, -1, 147, -1, 209, 210,
- -1, 210, -1, 211, 54, -1, 9, -1, 82, -1,
- 86, -1, 47, 177, 213, -1, 213, 214, -1, 214,
- -1, 215, 247, -1, 216, 246, -1, 131, 54, -1,
- 118, 132, -1, 135, -1, 136, -1, 40, -1, 41,
- -1, 42, -1, 43, -1, 35, 218, -1, 28, 218,
- -1, 218, 219, -1, 219, -1, 220, -1, 127, -1,
- 6, -1, 10, -1, 17, -1, 60, -1, 86, -1,
- 99, -1, 138, 222, -1, 222, 223, -1, 223, -1,
- 224, 247, -1, 5, -1, 30, -1, 46, -1, 49,
- -1, 103, -1, 129, -1, 130, -1, 236, -1, 226,
- 247, -1, 227, 132, -1, 228, 132, -1, 53, 132,
- 174, -1, 36, -1, 18, 54, -1, 32, 229, -1,
- 70, 234, -1, 106, 244, -1, 124, 230, -1, 140,
- 178, -1, 140, 178, 232, -1, 143, 240, -1, 15,
- -1, 134, -1, 66, -1, 108, -1, 115, -1, 71,
- -1, 122, -1, 132, -1, 132, 31, -1, -1, 132,
- 166, 132, 231, -1, 26, -1, -1, 232, 233, -1,
- 233, -1, 110, 54, -1, 55, 178, -1, 234, 235,
- -1, 235, -1, 132, -1, 237, 239, 238, -1, 237,
- 239, 132, -1, 55, -1, 89, -1, 4, -1, 56,
- -1, 58, -1, 150, -1, 69, -1, 52, -1, 33,
- -1, 240, 54, -1, 54, -1, 241, 242, -1, 242,
- -1, 54, -1, 243, -1, 167, 54, 34, 54, 168,
- -1, 244, 132, -1, 132, -1, 245, 177, -1, 177,
- -1, 54, -1, 141, -1, 37, -1, 54, -1, 31,
- -1, 249, 169, 250, 252, 170, -1, 156, -1, 250,
- 251, 155, -1, 251, 155, -1, 157, 166, 247, -1,
- 158, 166, 247, -1, 252, 253, -1, 253, -1, 255,
- 169, 254, 256, 170, -1, 159, 166, 247, 155, -1,
- 123, 166, 177, -1, 256, 257, -1, 257, -1, 160,
- 166, 247, 169, 258, 170, -1, 258, 259, 155, -1,
- 259, 155, -1, 161, 166, 247, -1, 162, 166, 247,
- -1, 163, 166, 247, -1, 164, 166, 247, -1, 165,
- 166, 247, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 318, 318, 322, 323, 324, 338, 339, 340, 341,
- 342, 343, 344, 345, 346, 347, 348, 349, 350, 358,
- 364, 373, 374, 375, 376, 377, 381, 382, 387, 392,
- 394, 399, 400, 404, 405, 406, 411, 416, 417, 418,
- 419, 420, 421, 422, 423, 427, 432, 433, 434, 435,
- 436, 437, 447, 455, 456, 466, 468, 470, 481, 483,
- 485, 490, 492, 494, 496, 498, 500, 506, 507, 517,
- 519, 531, 532, 533, 534, 535, 536, 545, 550, 551,
- 555, 557, 559, 564, 565, 566, 567, 568, 572, 573,
- 574, 575, 584, 586, 595, 603, 604, 608, 609, 610,
- 611, 612, 613, 614, 615, 620, 621, 631, 641, 650,
- 665, 670, 671, 675, 676, 680, 681, 682, 683, 684,
- 685, 686, 695, 699, 704, 709, 722, 735, 744, 745,
- 750, 751, 752, 753, 754, 755, 756, 757, 758, 759,
- 760, 761, 762, 763, 767, 769, 774, 779, 780, 781,
- 790, 795, 797, 802, 804, 806, 808, 813, 814, 818,
- 819, 820, 821, 830, 832, 837, 844, 854, 856, 868,
- 869, 870, 871, 872, 873, 882, 886, 887, 891, 896,
- 897, 898, 899, 900, 901, 902, 911, 912, 919, 926,
- 942, 961, 966, 968, 970, 972, 974, 976, 978, 980,
- 985, 986, 990, 991, 992, 996, 997, 1001, 1003, 1007,
- 1011, 1016, 1018, 1022, 1024, 1028, 1029, 1033, 1034, 1038,
- 1053, 1058, 1066, 1067, 1071, 1072, 1073, 1074, 1078, 1079,
- 1080, 1090, 1091, 1095, 1097, 1102, 1104, 1108, 1113, 1114,
- 1118, 1119, 1123, 1132, 1133, 1137, 1138, 1147, 1162, 1166,
- 1167, 1171, 1172, 1176, 1177, 1181, 1186, 1190, 1194, 1195,
- 1199, 1204, 1205, 1209, 1211, 1213, 1215, 1217
+ 0, 363, 363, 367, 368, 369, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 404, 414, 415, 416, 417, 418, 422, 423, 428, 433,
+ 435, 441, 442, 450, 451, 452, 456, 461, 462, 463,
+ 464, 465, 466, 467, 468, 472, 474, 479, 480, 481,
+ 482, 483, 484, 488, 493, 502, 512, 513, 523, 525,
+ 527, 538, 545, 547, 552, 554, 556, 558, 560, 569,
+ 575, 576, 584, 586, 598, 599, 600, 601, 602, 611,
+ 616, 621, 629, 631, 633, 638, 639, 640, 641, 642,
+ 643, 647, 648, 649, 650, 659, 661, 670, 680, 685,
+ 693, 694, 695, 696, 697, 698, 699, 700, 705, 706,
+ 714, 724, 733, 748, 753, 754, 758, 759, 763, 764,
+ 765, 766, 767, 768, 769, 778, 782, 786, 794, 802,
+ 810, 825, 840, 853, 854, 862, 863, 864, 865, 866,
+ 867, 868, 869, 870, 871, 872, 873, 874, 875, 876,
+ 880, 885, 893, 898, 899, 900, 904, 909, 917, 922,
+ 923, 924, 925, 926, 927, 928, 929, 937, 947, 952,
+ 960, 962, 964, 966, 968, 973, 974, 978, 979, 980,
+ 981, 989, 994, 999, 1007, 1012, 1013, 1014, 1023, 1025,
+ 1030, 1035, 1043, 1045, 1062, 1063, 1064, 1065, 1066, 1067,
+ 1071, 1072, 1080, 1085, 1090, 1098, 1103, 1104, 1105, 1106,
+ 1107, 1108, 1109, 1110, 1119, 1120, 1121, 1128, 1135, 1151,
+ 1170, 1175, 1177, 1179, 1181, 1183, 1190, 1195, 1196, 1197,
+ 1201, 1202, 1203, 1207, 1208, 1212, 1219, 1229, 1238, 1243,
+ 1245, 1250, 1251, 1259, 1261, 1269, 1274, 1282, 1307, 1314,
+ 1324, 1325, 1329, 1330, 1331, 1332, 1336, 1337, 1338, 1342,
+ 1347, 1352, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1376,
+ 1381, 1389, 1394, 1402, 1404, 1408, 1413, 1418, 1426, 1431,
+ 1439, 1448, 1449, 1453, 1454, 1463, 1481, 1485, 1490, 1498,
+ 1503, 1504, 1508, 1513, 1521, 1526, 1531, 1536, 1541, 1549,
+ 1554, 1559, 1567, 1572, 1573, 1574, 1575, 1576
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 1
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "T_Age", "T_All", "T_Allan", "T_Auth",
- "T_Autokey", "T_Automax", "T_Average", "T_Bclient", "T_Beacon", "T_Bias",
- "T_Broadcast", "T_Broadcastclient", "T_Broadcastdelay", "T_Burst",
- "T_Calibrate", "T_Calldelay", "T_Ceiling", "T_Clockstats", "T_Cohort",
- "T_ControlKey", "T_Crypto", "T_Cryptostats", "T_Day", "T_Default",
- "T_Digest", "T_Disable", "T_Discard", "T_Dispersion", "T_Double",
- "T_Driftfile", "T_Drop", "T_Ellipsis", "T_Enable", "T_End", "T_False",
- "T_File", "T_Filegen", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4",
- "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff",
- "T_Iburst", "T_Ident", "T_Ignore", "T_Includefile", "T_Integer",
- "T_Interface", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
- "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp",
- "T_Leapfile", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
- "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
- "T_Manycastserver", "T_Mask", "T_Maxclock", "T_Maxdist", "T_Maxpoll",
- "T_Minclock", "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane",
- "T_Mode", "T_Monitor", "T_Month", "T_Multicastclient", "T_Nic",
- "T_Nolink", "T_Nomodify", "T_None", "T_Nopeer", "T_Noquery",
- "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
- "T_NtpSignDsocket", "T_Orphan", "T_Panic", "T_Peer", "T_Peerstats",
- "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port", "T_Preempt",
- "T_Prefer", "T_Protostats", "T_Pw", "T_Qos", "T_Randfile", "T_Rawstats",
- "T_Refid", "T_Requestkey", "T_Restrict", "T_Revoke", "T_Saveconfigdir",
- "T_Server", "T_Setvar", "T_Sign", "T_Statistics", "T_Stats",
- "T_Statsdir", "T_Step", "T_Stepout", "T_Stratum", "T_String",
- "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timingstats",
+ "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
+ "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
+ "T_Bclient", "T_Beacon", "T_Broadcast", "T_Broadcastclient",
+ "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling",
+ "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats",
+ "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", "T_Discard",
+ "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Ellipsis",
+ "T_Enable", "T_End", "T_False", "T_File", "T_Filegen", "T_Filenum",
+ "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4", "T_Flake", "T_Floor",
+ "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident",
+ "T_Ignore", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem",
+ "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io",
+ "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key",
+ "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Limited",
+ "T_Link", "T_Listen", "T_Logconfig", "T_Logfile", "T_Loopstats",
+ "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver", "T_Mask",
+ "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem",
+ "T_Maxpoll", "T_Mem", "T_Memlock", "T_Minclock", "T_Mindepth",
+ "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
+ "T_Monitor", "T_Month", "T_Mru", "T_Multicastclient", "T_Nic",
+ "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile",
+ "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
+ "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
+ "T_Orphanwait", "T_Panic", "T_Peer", "T_Peerstats", "T_Phone", "T_Pid",
+ "T_Pidfile", "T_Pool", "T_Port", "T_Preempt", "T_Prefer", "T_Protostats",
+ "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset",
+ "T_Restrict", "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server",
+ "T_Setvar", "T_Source", "T_Stacksize", "T_Statistics", "T_Stats",
+ "T_Statsdir", "T_Step", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
+ "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats",
"T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl",
- "T_Type", "T_Unconfig", "T_Unpeer", "T_Version", "T_WanderThreshold",
- "T_Week", "T_Wildcard", "T_Xleave", "T_Year", "T_Flag", "T_Void",
- "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
+ "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer", "T_Version",
+ "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
+ "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
"T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
"T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
"$accept", "configuration", "command_list", "command", "server_command",
"client_type", "address", "ip_address", "address_fam", "option_list",
"option", "option_flag", "option_flag_keyword", "option_int",
- "option_int_keyword", "unpeer_command", "unpeer_keyword",
- "other_mode_command", "authentication_command", "crypto_command_list",
- "crypto_command", "crypto_str_keyword", "orphan_mode_command",
- "tos_option_list", "tos_option", "tos_option_int_keyword",
- "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
- "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
- "filegen_type", "access_control_command", "ac_flag_list",
- "access_control_flag", "discard_option_list", "discard_option",
- "discard_option_keyword", "fudge_command", "fudge_factor_list",
- "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
- "system_option_command", "system_option_list", "system_option",
- "system_option_flag_keyword", "tinker_command", "tinker_option_list",
- "tinker_option", "tinker_option_keyword", "miscellaneous_command",
- "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
+ "option_int_keyword", "option_str", "option_str_keyword",
+ "unpeer_command", "unpeer_keyword", "other_mode_command",
+ "authentication_command", "crypto_command_list", "crypto_command",
+ "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
+ "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
+ "monitoring_command", "stats_list", "stat", "filegen_option_list",
+ "filegen_option", "link_nolink", "enable_disable", "filegen_type",
+ "access_control_command", "ac_flag_list", "access_control_flag",
+ "discard_option_list", "discard_option", "discard_option_keyword",
+ "mru_option_list", "mru_option", "mru_option_keyword", "fudge_command",
+ "fudge_factor_list", "fudge_factor", "fudge_factor_dbl_keyword",
+ "fudge_factor_bool_keyword", "rlimit_command", "rlimit_option_list",
+ "rlimit_option", "rlimit_option_keyword", "system_option_command",
+ "system_option_list", "system_option", "system_option_flag_keyword",
+ "system_option_local_flag_keyword", "tinker_command",
+ "tinker_option_list", "tinker_option", "tinker_option_keyword",
+ "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
"misc_cmd_str_lcl_keyword", "drift_parm", "variable_assign",
"t_default_or_zero", "trap_option_list", "trap_option",
"log_config_list", "log_config_command", "interface_command",
- "interface_nic", "nic_rule_class", "nic_rule_action", "integer_list",
+ "interface_nic", "nic_rule_class", "nic_rule_action", "reset_command",
+ "counter_set_list", "counter_set_keyword", "integer_list",
"integer_list_range", "integer_list_range_elt", "integer_range",
"string_list", "address_list", "boolean", "number", "simulate_command",
"sim_conf_start", "sim_init_statement_list", "sim_init_statement",
- "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
- "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt", 0
+ "sim_init_keyword", "sim_server_list", "sim_server", "sim_server_offset",
+ "sim_server_name", "sim_act_list", "sim_act", "sim_act_stmt_list",
+ "sim_act_stmt", "sim_act_keyword", YY_NULLPTR
};
#endif
# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+ (internal) symbol number NUM (which must be that of a token). */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
@@ -1005,476 +992,450 @@ static const yytype_uint16 yytoknum[] =
385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 416, 417, 418, 419, 420, 61, 40, 41, 123,
- 125
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 61,
+ 40, 41, 123, 125
};
# endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint16 yyr1[] =
-{
- 0, 171, 172, 173, 173, 173, 174, 174, 174, 174,
- 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
- 175, 176, 176, 176, 176, 176, 177, 177, 178, 179,
- 179, 180, 180, 181, 181, 181, 182, 183, 183, 183,
- 183, 183, 183, 183, 183, 184, 185, 185, 185, 185,
- 185, 185, 186, 187, 187, 188, 188, 188, 189, 189,
- 189, 189, 189, 189, 189, 189, 189, 190, 190, 191,
- 191, 192, 192, 192, 192, 192, 192, 193, 194, 194,
- 195, 195, 195, 196, 196, 196, 196, 196, 197, 197,
- 197, 197, 198, 198, 198, 199, 199, 200, 200, 200,
- 200, 200, 200, 200, 200, 201, 201, 202, 202, 202,
- 202, 203, 203, 204, 204, 205, 205, 205, 205, 205,
- 205, 205, 206, 206, 206, 206, 206, 206, 207, 207,
- 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 208, 208, 208, 208, 209, 209, 210, 211, 211, 211,
- 212, 213, 213, 214, 214, 214, 214, 215, 215, 216,
- 216, 216, 216, 217, 217, 218, 218, 219, 219, 220,
- 220, 220, 220, 220, 220, 221, 222, 222, 223, 224,
- 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
- 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
- 226, 226, 227, 227, 227, 228, 228, 229, 229, 229,
- 230, 231, 231, 232, 232, 233, 233, 234, 234, 235,
- 236, 236, 237, 237, 238, 238, 238, 238, 239, 239,
- 239, 240, 240, 241, 241, 242, 242, 243, 244, 244,
- 245, 245, 246, 246, 246, 247, 247, 248, 249, 250,
- 250, 251, 251, 252, 252, 253, 254, 255, 256, 256,
- 257, 258, 258, 259, 259, 259, 259, 259
-};
+#define YYPACT_NINF -178
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
- 2, 1, 1, 1, 1, 1, 1, 2, 1, 1,
- 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
- 1, 1, 2, 1, 1, 1, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
- 2, 1, 1, 1, 1, 1, 1, 2, 2, 1,
- 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 2, 3, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 0, 2, 2, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 3, 3, 4, 4, 5, 0, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
- 3, 2, 1, 2, 2, 2, 2, 1, 1, 1,
- 1, 1, 1, 2, 2, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
- 3, 1, 2, 2, 2, 2, 2, 2, 3, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
- 4, 1, 0, 2, 1, 2, 2, 2, 1, 1,
- 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 2, 1, 1, 1, 5, 2, 1,
- 2, 1, 1, 1, 1, 1, 1, 5, 1, 3,
- 2, 3, 3, 2, 1, 5, 4, 3, 2, 1,
- 6, 3, 2, 3, 3, 3, 3, 3
-};
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-178)))
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint16 yydefact[] =
+#define YYTABLE_NINF -7
+
+#define yytable_value_is_error(Yytable_value) \
+ 0
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const yytype_int16 yypact[] =
{
- 0, 0, 0, 24, 55, 200, 0, 0, 67, 0,
- 0, 209, 0, 191, 0, 0, 0, 222, 0, 0,
- 202, 0, 205, 25, 0, 0, 223, 0, 23, 0,
- 203, 22, 204, 0, 0, 0, 206, 21, 0, 0,
- 0, 201, 0, 0, 0, 0, 0, 53, 54, 248,
- 0, 2, 0, 7, 0, 8, 0, 9, 10, 13,
- 11, 12, 14, 15, 16, 17, 0, 0, 0, 186,
- 0, 18, 0, 5, 58, 192, 59, 60, 169, 170,
- 171, 172, 173, 174, 168, 164, 166, 167, 147, 148,
- 149, 122, 145, 0, 207, 193, 163, 97, 98, 99,
- 100, 104, 101, 102, 103, 105, 29, 30, 28, 0,
- 26, 0, 6, 61, 62, 219, 194, 218, 241, 56,
- 57, 66, 239, 195, 63, 128, 29, 30, 128, 26,
- 64, 0, 196, 92, 96, 93, 179, 180, 181, 182,
- 183, 184, 185, 175, 177, 0, 87, 83, 0, 84,
- 91, 89, 90, 88, 86, 85, 77, 79, 0, 0,
- 197, 235, 0, 65, 234, 236, 232, 199, 1, 0,
- 4, 20, 52, 246, 245, 187, 188, 189, 230, 229,
- 228, 0, 0, 76, 71, 72, 73, 74, 0, 75,
- 68, 0, 165, 144, 146, 208, 94, 159, 160, 161,
- 162, 0, 0, 157, 158, 150, 152, 0, 0, 27,
- 190, 217, 240, 238, 124, 128, 128, 123, 0, 0,
- 95, 176, 178, 244, 242, 243, 82, 78, 80, 81,
- 0, 0, 198, 214, 0, 233, 231, 3, 37, 0,
- 38, 39, 46, 48, 47, 50, 40, 41, 42, 43,
- 49, 51, 44, 19, 32, 33, 36, 34, 0, 224,
- 225, 226, 221, 227, 220, 0, 0, 0, 0, 70,
- 69, 114, 113, 0, 111, 112, 0, 106, 109, 110,
- 156, 155, 151, 153, 154, 130, 131, 132, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 143, 129,
- 125, 126, 128, 212, 216, 215, 213, 0, 35, 31,
- 45, 0, 0, 0, 0, 0, 254, 0, 250, 107,
- 121, 117, 119, 115, 116, 118, 120, 108, 127, 211,
- 210, 0, 251, 252, 0, 249, 247, 253, 0, 237,
- 257, 0, 0, 0, 0, 0, 259, 0, 0, 255,
- 258, 256, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 260, 0, 262, 263,
- 264, 265, 266, 267, 261
+ 26, -153, -30, -178, -178, -178, -28, -178, 166, 18,
+ -109, 166, -178, 200, -47, -178, -102, -178, -96, -93,
+ -178, -89, -178, -178, -47, 330, -47, -178, -178, -85,
+ -178, -76, -178, -178, 20, -2, 45, 22, -22, -178,
+ -178, -67, 200, -65, -178, 107, 520, -63, -53, 35,
+ -178, -178, -178, 46, 203, -94, -178, -47, -178, -47,
+ -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -21, -55, -54, -178, 4, -178, -178, -77, -178, -178,
+ -178, 158, -178, -178, -178, -178, -178, -178, -178, -178,
+ 166, -178, -178, -178, -178, -178, -178, 18, -178, 47,
+ 84, -178, 166, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, 49, -178, -33, 361, -178,
+ -178, -178, -89, -178, -178, -47, -178, -178, -178, -178,
+ -178, -178, -178, -178, 330, -178, 58, -47, -178, -178,
+ -31, -178, -178, -178, -178, -178, -178, -178, -178, -2,
+ -178, -178, 94, 98, -178, -178, 43, -178, -178, -178,
+ -178, -22, -178, 68, -57, -178, 200, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, 107, -178, -21,
+ -178, -178, -25, -178, -178, -178, -178, -178, -178, -178,
+ -178, 520, -178, 75, -21, -178, -178, 86, -53, -178,
+ -178, -178, 87, -178, -19, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, 3, -107, -178, -178,
+ -178, -178, -178, 88, -178, 7, -178, -178, -178, -178,
+ -5, 8, -178, -178, -178, -178, 23, 111, -178, -178,
+ 49, -178, -21, -25, -178, -178, -178, -178, -178, -178,
+ -178, -178, 482, -178, -178, 482, 482, -63, -178, -178,
+ 28, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, -46, 144, -178, -178, -178, 416, -178, -178, -178,
+ -178, -178, -178, -178, -178, -127, 5, 10, -178, -178,
+ -178, -178, 40, -178, -178, 24, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, 482, 482, -178, 167, -63, 142, -178, 143, -178,
+ -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, -178, -51, -178,
+ 57, 27, 34, -117, -178, 29, -178, -21, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, 482, -178, -178,
+ -178, -178, 32, -178, -178, -178, -47, -178, -178, -178,
+ 33, -178, -178, -178, 38, 52, -21, 39, -146, -178,
+ 59, -21, -178, -178, -178, 50, -44, -178, -178, -178,
+ -178, -178, 60, 63, 41, -178, 71, -178, -21, -178,
+ -178
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
+ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
{
- -1, 50, 51, 52, 53, 54, 118, 110, 111, 253,
- 254, 255, 256, 257, 258, 55, 56, 57, 58, 77,
- 190, 191, 59, 156, 157, 158, 159, 60, 133, 105,
- 196, 277, 278, 279, 327, 61, 214, 299, 91, 92,
- 93, 62, 205, 206, 207, 208, 63, 85, 86, 87,
- 64, 143, 144, 145, 65, 66, 67, 68, 95, 132,
- 330, 232, 233, 116, 117, 69, 70, 264, 181, 167,
- 163, 164, 165, 123, 119, 226, 175, 71, 72, 267,
- 268, 315, 316, 342, 317, 345, 346, 359, 360
+ 0, 0, 0, 24, 58, 227, 0, 70, 0, 0,
+ 237, 0, 220, 0, 0, 230, 0, 250, 0, 0,
+ 231, 0, 233, 25, 0, 0, 0, 251, 228, 0,
+ 23, 0, 232, 22, 0, 0, 0, 0, 0, 234,
+ 21, 0, 0, 0, 229, 0, 0, 0, 0, 0,
+ 56, 57, 286, 0, 2, 0, 7, 0, 8, 0,
+ 9, 10, 13, 11, 12, 14, 15, 16, 17, 18,
+ 0, 0, 0, 214, 0, 215, 19, 0, 5, 61,
+ 62, 63, 194, 195, 196, 197, 200, 198, 199, 201,
+ 189, 191, 192, 193, 153, 154, 155, 125, 151, 0,
+ 235, 221, 188, 100, 101, 102, 103, 107, 104, 105,
+ 106, 108, 29, 30, 28, 0, 26, 0, 6, 64,
+ 65, 247, 222, 246, 279, 59, 159, 160, 161, 162,
+ 163, 164, 165, 166, 126, 157, 0, 60, 69, 277,
+ 223, 66, 262, 263, 264, 265, 266, 267, 268, 259,
+ 261, 133, 29, 30, 133, 133, 26, 67, 187, 185,
+ 186, 181, 183, 0, 0, 224, 95, 99, 96, 206,
+ 207, 208, 209, 210, 211, 212, 213, 202, 204, 0,
+ 90, 85, 0, 86, 94, 92, 93, 91, 89, 87,
+ 88, 79, 81, 0, 0, 241, 273, 0, 68, 272,
+ 274, 270, 226, 1, 0, 4, 31, 55, 284, 283,
+ 216, 217, 218, 258, 257, 256, 0, 0, 78, 74,
+ 75, 76, 77, 0, 71, 0, 190, 150, 152, 236,
+ 97, 0, 177, 178, 179, 180, 0, 0, 175, 176,
+ 167, 169, 0, 0, 27, 219, 245, 278, 156, 158,
+ 276, 260, 129, 133, 133, 132, 127, 0, 182, 184,
+ 0, 98, 203, 205, 282, 280, 281, 84, 80, 82,
+ 83, 225, 0, 271, 269, 3, 20, 252, 253, 254,
+ 249, 255, 248, 290, 291, 0, 0, 0, 73, 72,
+ 117, 116, 0, 114, 115, 0, 109, 112, 113, 173,
+ 174, 172, 168, 170, 171, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 134, 130, 131, 133, 240, 0, 0, 242, 0, 37,
+ 38, 39, 54, 47, 49, 48, 51, 40, 41, 42,
+ 43, 50, 52, 44, 32, 33, 36, 34, 0, 35,
+ 0, 0, 0, 0, 293, 0, 288, 0, 110, 124,
+ 120, 122, 118, 119, 121, 123, 111, 128, 239, 238,
+ 244, 243, 0, 45, 46, 53, 0, 287, 285, 292,
+ 0, 289, 275, 296, 0, 0, 0, 0, 0, 298,
+ 0, 0, 294, 297, 295, 0, 0, 303, 304, 305,
+ 306, 307, 0, 0, 0, 299, 0, 301, 0, 300,
+ 302
};
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -145
-static const yytype_int16 yypact[] =
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
{
- 126, -121, -19, -145, -145, -145, -2, -1, -145, 8,
- 20, -95, 8, -145, 47, -46, -78, -145, -76, -73,
- -145, -72, -145, -145, -46, -46, -145, -71, -145, -67,
- -145, -145, -145, 12, -17, 19, -145, -145, -58, 47,
- -56, -145, 0, 295, -55, -47, 24, -145, -145, -145,
- 80, 262, -70, -145, -46, -145, -46, -145, -145, -145,
- -145, -145, -145, -145, -145, -145, -10, -50, -49, -145,
- 3, -145, -85, -145, -145, -145, -145, 142, -145, -145,
- -145, -145, -145, -145, -145, 8, -145, -145, -145, -145,
- -145, 20, -145, 33, 58, -145, 8, -145, -145, -145,
- -145, -145, -145, -145, -145, -145, -145, -145, -145, 168,
- -145, -36, 398, -145, -145, -145, -72, -145, -145, -46,
- -46, -145, -145, -34, -145, -145, 71, 73, -145, 25,
- -145, -57, -145, 47, -145, -145, -145, -145, -145, -145,
- -145, -145, -145, 0, -145, -10, -145, -145, -9, -145,
- -145, -145, -145, -145, -145, -145, 295, -145, 57, -10,
- -35, -145, 59, -47, -145, -145, -145, 63, -145, -37,
- -145, 31, -145, -145, -145, -145, -145, -145, -145, -145,
- -145, 6, -126, -145, -145, -145, -145, -145, 74, -145,
- -145, -20, -145, -145, -145, -145, -11, -145, -145, -145,
- -145, 4, 77, -145, -145, 168, -145, -10, -9, -145,
- -145, -145, -145, -145, 483, -145, -145, 483, -55, 5,
- -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
- -55, 91, -35, -145, 112, -145, -145, -145, -145, -10,
- -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
- -145, -145, -145, 31, -145, -145, -145, -145, 93, -145,
- -145, -145, -145, -145, -145, -7, -3, -107, -4, -145,
- -145, -145, -145, 34, -145, -145, 1, -145, -145, -145,
- -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
- -145, -145, -145, -145, -145, -145, -145, -145, -145, -145,
- 483, 483, -145, 131, -145, -145, -145, 116, -145, -145,
- -145, -10, -10, 9, 16, -100, -145, 7, -145, -145,
- -145, -145, -145, -145, -145, -145, -145, -145, 483, -145,
- -145, 15, -145, -145, -46, -145, -145, -145, 26, -145,
- -145, 21, 35, -10, 28, -112, -145, 36, -10, -145,
- -145, -145, 37, -40, 39, 41, 46, 50, 62, 61,
- 48, -10, -10, -10, -10, -10, -145, 78, -145, -145,
- -145, -145, -145, -145, -145
+ -178, -178, -178, -40, -178, -178, -14, -35, -178, -178,
+ -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, -178, -178, 64, -178, -178, -178,
+ -178, -32, -178, -178, -178, -178, -178, -178, -151, -178,
+ -178, 141, -178, -178, 116, -178, -178, -178, 11, -178,
+ -178, -178, -178, 93, -178, -178, 248, -69, -178, -178,
+ -178, -178, 83, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, -178, 139, -178, -178, -178, -178, -178,
+ -178, 119, -178, -178, 67, -178, -178, 243, 36, -177,
+ -178, -178, -178, -15, -178, -178, -82, -178, -178, -178,
+ -116, -178, -126, -178
};
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
{
- -145, -145, -145, -43, -145, -145, -15, -32, -145, -145,
- -51, -145, -145, -145, -145, -145, -145, -145, -145, -145,
- -145, -145, -145, -145, 81, -145, -145, -145, -145, -33,
- -145, -145, -145, -145, -145, -145, -125, -145, -145, 122,
- -145, -145, -145, 38, -145, -145, -145, 217, -63, -145,
- -145, -145, 95, -145, -145, -145, -145, -145, -145, -145,
- -145, -145, 10, -145, 120, -145, -145, -145, -145, -145,
- -145, 76, -145, -145, 215, 43, -144, -145, -145, -145,
- -23, -145, -62, -145, -145, -145, -90, -145, -102
+ -1, 53, 54, 55, 56, 57, 124, 116, 117, 276,
+ 344, 345, 346, 347, 348, 349, 350, 58, 59, 60,
+ 61, 81, 224, 225, 62, 191, 192, 193, 194, 63,
+ 166, 111, 230, 296, 297, 298, 366, 64, 252, 320,
+ 97, 98, 99, 134, 135, 136, 65, 240, 241, 242,
+ 243, 66, 161, 162, 163, 67, 90, 91, 92, 93,
+ 68, 177, 178, 179, 69, 70, 71, 72, 101, 165,
+ 369, 271, 327, 122, 123, 73, 74, 282, 216, 75,
+ 149, 150, 202, 198, 199, 200, 140, 125, 267, 210,
+ 76, 77, 285, 286, 287, 353, 354, 385, 355, 388,
+ 389, 402, 403, 404
};
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -7
+ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 109, 222, 129, 217, 320, 136, 134, 161, 169, 125,
- 259, 106, 160, 107, 78, 229, 313, 271, 79, 128,
- 230, 173, 192, 313, 272, 80, 321, 273, 223, 88,
- 137, 265, 266, 192, 73, 74, 178, 94, 238, 171,
- 126, 172, 127, 239, 174, 224, 138, 240, 344, 139,
- 265, 266, 75, 76, 112, 179, 113, 274, 349, 114,
- 115, 121, 260, 283, 261, 122, 124, 97, 81, 210,
- 336, 98, 180, 130, 131, 231, 135, 108, 166, 275,
- 168, 241, 176, 177, 182, 170, 108, 194, 322, 195,
- 300, 301, 242, 323, 82, 308, 209, 215, 213, 216,
- 220, 218, 89, 140, 212, 212, 90, 83, 324, 219,
- 243, 228, 270, 234, 244, 108, 245, 236, 237, 99,
- 162, 354, 355, 356, 357, 358, 246, 1, 269, 141,
- 142, 281, 225, 276, 2, 84, 280, 303, 262, 3,
- 4, 5, 247, 248, 6, 305, 307, 310, 7, 8,
- 325, 318, 100, 326, 9, 10, 263, 329, 11, 311,
- 101, 12, 13, 312, 102, 14, 319, 332, 333, 183,
- 331, 335, 249, 15, 250, 334, 338, 328, 251, 16,
- 103, 17, 252, 339, 104, 341, 302, 343, 18, 19,
- 184, 351, 20, 185, 348, 344, 21, 22, 304, 347,
- 23, 24, 309, 368, 352, 361, 353, 362, 197, 198,
- 199, 200, 363, 193, 25, 26, 364, 369, 370, 371,
- 372, 373, 354, 355, 356, 357, 358, 27, 365, 96,
- 28, 366, 29, 374, 30, 31, 211, 227, 221, 235,
- 120, 32, 306, 282, 314, 33, 34, 35, 36, 37,
- 38, 284, 39, 337, 40, 350, 186, 367, 187, 0,
- 41, 0, 0, 188, 42, 43, 44, 189, 45, 46,
- 2, 47, 48, 0, 0, 3, 4, 5, 0, 0,
- 6, -6, 49, 0, 7, 8, 201, 0, 0, 0,
- 9, 10, 0, 0, 11, 0, 0, 12, 13, 202,
- 0, 14, 0, 203, 204, 0, 146, 0, 0, 15,
- 0, 0, 0, 0, 147, 16, 148, 17, 0, 340,
- 0, 0, 0, 0, 18, 19, 0, 0, 20, 0,
- 0, 0, 21, 22, 0, 0, 23, 24, 0, 0,
- 149, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 26, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 27, 0, 0, 28, 0, 29, 0,
- 30, 31, 150, 151, 0, 152, 153, 32, 0, 154,
- 0, 33, 34, 35, 36, 37, 38, 0, 39, 0,
- 40, 0, 0, 0, 0, 0, 41, 155, 0, 0,
- 42, 43, 44, 0, 45, 46, 2, 47, 48, 0,
- 0, 3, 4, 5, 0, 0, 6, -6, 49, 0,
- 7, 8, 0, 0, 0, 0, 9, 10, 0, 0,
- 11, 0, 0, 12, 13, 0, 0, 14, 0, 0,
- 0, 0, 0, 0, 0, 15, 0, 0, 0, 0,
- 0, 16, 0, 17, 0, 0, 0, 0, 0, 0,
- 18, 19, 0, 0, 20, 0, 0, 0, 21, 22,
- 0, 0, 23, 24, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 25, 26, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,
- 0, 0, 28, 0, 29, 0, 30, 31, 0, 0,
- 0, 0, 0, 32, 0, 0, 0, 33, 34, 35,
- 36, 37, 38, 0, 39, 0, 40, 285, 0, 0,
- 0, 0, 41, 0, 0, 286, 42, 43, 44, 0,
- 45, 46, 0, 47, 48, 0, 0, 287, 288, 0,
- 289, 0, 0, 0, 49, 0, 290, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 291, 0, 292, 293, 0, 294,
- 295, 296, 0, 297, 0, 0, 0, 0, 0, 0,
+ 115, 156, 263, 255, 256, 142, 143, 196, 277, 373,
+ 167, 208, 195, 264, 204, 325, 351, 270, 112, 158,
+ 113, 226, 155, 144, 290, 78, 351, 1, 359, 94,
+ 79, 291, 80, 226, 292, 265, 2, 387, 213, 209,
+ 3, 4, 5, 206, 100, 207, 203, 392, 6, 7,
+ 360, 118, 231, 283, 284, 8, 9, 119, 214, 10,
+ 120, 145, 11, 12, 121, 303, 13, 278, 138, 279,
+ 159, 293, 151, 283, 284, 14, 378, 139, 245, 15,
+ 141, 215, 157, 326, 205, 16, 164, 17, 168, 146,
+ 114, 232, 233, 234, 235, 201, 18, 19, 211, 212,
+ 20, 294, 321, 322, 21, 22, 114, 228, 23, 24,
+ 152, 247, 153, 169, 95, 217, 229, 374, 249, 96,
+ 244, 253, 250, 247, 160, 254, 361, 257, 259, 25,
+ 26, 27, 260, 362, 261, 269, 28, 197, 170, 266,
+ 397, 398, 399, 400, 401, 29, 272, 274, 288, 30,
+ 363, 31, 147, 32, 33, 171, 280, 148, 172, 275,
+ 289, 299, 295, 34, 35, 36, 37, 38, 39, 40,
+ 41, 301, 367, 42, 82, 43, 300, 281, 83, 328,
+ 381, 324, 44, 356, 84, 236, 218, 45, 46, 47,
+ 154, 48, 49, 358, 368, 50, 51, 364, 114, 357,
+ 365, 237, 371, 372, -6, 52, 238, 239, 219, 390,
+ 375, 220, 377, 2, 395, 384, 376, 3, 4, 5,
+ 103, 380, 323, 382, 104, 6, 7, 386, 391, 173,
+ 408, 410, 8, 9, 85, 387, 10, 394, 227, 11,
+ 12, 407, 396, 13, 397, 398, 399, 400, 401, 409,
+ 248, 302, 14, 405, 258, 268, 15, 174, 175, 102,
+ 262, 246, 16, 176, 17, 273, 86, 87, 251, 137,
+ 352, 379, 393, 18, 19, 0, 406, 20, 0, 304,
+ 105, 21, 22, 88, 0, 23, 24, 0, 0, 0,
+ 370, 221, 222, 0, 0, 0, 0, 0, 223, 0,
+ 0, 0, 0, 0, 0, 0, 25, 26, 27, 0,
+ 0, 0, 0, 28, 89, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 106, 0, 30, 0, 31, 0,
+ 32, 33, 107, 0, 0, 108, 0, 0, 0, 0,
+ 34, 35, 36, 37, 38, 39, 40, 41, 0, 0,
+ 42, 0, 43, 0, 0, 109, 0, 0, 0, 44,
+ 110, 0, 383, 0, 45, 46, 47, 0, 48, 49,
+ 0, 2, 50, 51, 0, 3, 4, 5, 0, 0,
+ 0, -6, 52, 6, 7, 126, 127, 128, 129, 0,
+ 8, 9, 0, 0, 10, 0, 0, 11, 12, 0,
+ 0, 13, 0, 0, 0, 0, 0, 0, 0, 0,
+ 14, 0, 0, 0, 15, 130, 0, 131, 0, 132,
+ 16, 0, 17, 0, 133, 329, 0, 0, 0, 0,
+ 0, 18, 19, 330, 0, 20, 0, 0, 0, 21,
+ 22, 0, 0, 23, 24, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 26, 27, 0, 331, 332,
+ 0, 28, 0, 0, 0, 0, 0, 0, 0, 0,
+ 29, 0, 0, 0, 30, 333, 31, 0, 32, 33,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 35,
+ 36, 37, 38, 39, 40, 41, 334, 0, 42, 0,
+ 43, 0, 0, 335, 0, 336, 0, 44, 0, 0,
+ 0, 0, 45, 46, 47, 0, 48, 49, 305, 337,
+ 50, 51, 0, 180, 0, 0, 306, 0, 0, 181,
+ 52, 182, 0, 0, 0, 0, 338, 339, 0, 0,
+ 0, 0, 0, 0, 307, 308, 0, 309, 0, 0,
+ 0, 0, 0, 310, 0, 0, 0, 183, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 340, 0, 341, 0, 0, 0, 0, 342, 0, 311,
+ 312, 343, 0, 313, 314, 0, 315, 316, 317, 0,
+ 318, 0, 0, 0, 0, 0, 184, 0, 185, 0,
+ 0, 0, 0, 186, 0, 187, 0, 0, 188, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 298
+ 189, 190, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 319
};
static const yytype_int16 yycheck[] =
{
- 15, 145, 34, 128, 3, 5, 39, 54, 51, 26,
- 4, 57, 44, 59, 6, 159, 123, 28, 10, 34,
- 55, 31, 85, 123, 35, 17, 25, 38, 37, 9,
- 30, 157, 158, 96, 155, 54, 33, 132, 7, 54,
- 57, 56, 59, 12, 54, 54, 46, 16, 160, 49,
- 157, 158, 54, 54, 132, 52, 132, 68, 170, 132,
- 132, 132, 56, 207, 58, 132, 54, 20, 60, 112,
- 170, 24, 69, 54, 132, 110, 132, 132, 54, 90,
- 0, 50, 132, 132, 169, 155, 132, 54, 87, 31,
- 215, 216, 61, 92, 86, 239, 132, 26, 132, 26,
- 133, 76, 82, 103, 119, 120, 86, 99, 107, 166,
- 79, 54, 132, 54, 83, 132, 85, 54, 155, 72,
- 167, 161, 162, 163, 164, 165, 95, 1, 54, 129,
- 130, 54, 141, 144, 8, 127, 132, 132, 132, 13,
- 14, 15, 111, 112, 18, 54, 34, 54, 22, 23,
- 149, 155, 105, 152, 28, 29, 150, 26, 32, 166,
- 113, 35, 36, 166, 117, 39, 132, 311, 312, 27,
- 54, 155, 141, 47, 143, 166, 169, 302, 147, 53,
- 133, 55, 151, 168, 137, 159, 218, 166, 62, 63,
- 48, 155, 66, 51, 166, 160, 70, 71, 230, 343,
- 74, 75, 253, 155, 348, 166, 169, 166, 40, 41,
- 42, 43, 166, 91, 88, 89, 166, 361, 362, 363,
- 364, 365, 161, 162, 163, 164, 165, 101, 166, 12,
- 104, 170, 106, 155, 108, 109, 116, 156, 143, 163,
- 25, 115, 232, 205, 267, 119, 120, 121, 122, 123,
- 124, 208, 126, 315, 128, 345, 114, 359, 116, -1,
- 134, -1, -1, 121, 138, 139, 140, 125, 142, 143,
- 8, 145, 146, -1, -1, 13, 14, 15, -1, -1,
- 18, 155, 156, -1, 22, 23, 118, -1, -1, -1,
- 28, 29, -1, -1, 32, -1, -1, 35, 36, 131,
- -1, 39, -1, 135, 136, -1, 11, -1, -1, 47,
- -1, -1, -1, -1, 19, 53, 21, 55, -1, 334,
- -1, -1, -1, -1, 62, 63, -1, -1, 66, -1,
- -1, -1, 70, 71, -1, -1, 74, 75, -1, -1,
- 45, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 88, 89, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 101, -1, -1, 104, -1, 106, -1,
- 108, 109, 77, 78, -1, 80, 81, 115, -1, 84,
- -1, 119, 120, 121, 122, 123, 124, -1, 126, -1,
- 128, -1, -1, -1, -1, -1, 134, 102, -1, -1,
- 138, 139, 140, -1, 142, 143, 8, 145, 146, -1,
- -1, 13, 14, 15, -1, -1, 18, 155, 156, -1,
- 22, 23, -1, -1, -1, -1, 28, 29, -1, -1,
- 32, -1, -1, 35, 36, -1, -1, 39, -1, -1,
- -1, -1, -1, -1, -1, 47, -1, -1, -1, -1,
- -1, 53, -1, 55, -1, -1, -1, -1, -1, -1,
- 62, 63, -1, -1, 66, -1, -1, -1, 70, 71,
- -1, -1, 74, 75, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 88, 89, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 101,
- -1, -1, 104, -1, 106, -1, 108, 109, -1, -1,
- -1, -1, -1, 115, -1, -1, -1, 119, 120, 121,
- 122, 123, 124, -1, 126, -1, 128, 44, -1, -1,
- -1, -1, 134, -1, -1, 52, 138, 139, 140, -1,
- 142, 143, -1, 145, 146, -1, -1, 64, 65, -1,
- 67, -1, -1, -1, 156, -1, 73, -1, -1, -1,
+ 14, 36, 179, 154, 155, 7, 8, 60, 5, 60,
+ 42, 32, 47, 38, 54, 61, 143, 194, 65, 41,
+ 67, 90, 36, 25, 29, 178, 143, 1, 4, 11,
+ 60, 36, 60, 102, 39, 60, 10, 183, 34, 60,
+ 14, 15, 16, 57, 153, 59, 0, 193, 22, 23,
+ 26, 153, 3, 180, 181, 29, 30, 153, 54, 33,
+ 153, 63, 36, 37, 153, 242, 40, 64, 153, 66,
+ 92, 76, 27, 180, 181, 49, 193, 153, 118, 53,
+ 60, 77, 60, 129, 178, 59, 153, 61, 153, 91,
+ 153, 42, 43, 44, 45, 60, 70, 71, 153, 153,
+ 74, 106, 253, 254, 78, 79, 153, 60, 82, 83,
+ 65, 125, 67, 6, 96, 192, 32, 168, 60, 101,
+ 153, 27, 153, 137, 146, 27, 102, 84, 60, 103,
+ 104, 105, 189, 109, 166, 60, 110, 190, 31, 164,
+ 184, 185, 186, 187, 188, 119, 60, 60, 60, 123,
+ 126, 125, 154, 127, 128, 48, 153, 159, 51, 178,
+ 153, 153, 167, 137, 138, 139, 140, 141, 142, 143,
+ 144, 60, 323, 147, 8, 149, 153, 174, 12, 35,
+ 357, 153, 156, 178, 18, 136, 28, 161, 162, 163,
+ 145, 165, 166, 153, 27, 169, 170, 173, 153, 189,
+ 176, 152, 60, 60, 178, 179, 157, 158, 50, 386,
+ 153, 53, 178, 10, 391, 182, 189, 14, 15, 16,
+ 20, 192, 257, 191, 24, 22, 23, 189, 189, 122,
+ 189, 408, 29, 30, 68, 183, 33, 178, 97, 36,
+ 37, 178, 192, 40, 184, 185, 186, 187, 188, 178,
+ 134, 240, 49, 193, 161, 191, 53, 150, 151, 11,
+ 177, 122, 59, 156, 61, 198, 100, 101, 149, 26,
+ 285, 353, 388, 70, 71, -1, 402, 74, -1, 243,
+ 80, 78, 79, 117, -1, 82, 83, -1, -1, -1,
+ 325, 133, 134, -1, -1, -1, -1, -1, 140, -1,
+ -1, -1, -1, -1, -1, -1, 103, 104, 105, -1,
+ -1, -1, -1, 110, 148, -1, -1, -1, -1, -1,
+ -1, -1, 119, -1, 124, -1, 123, -1, 125, -1,
+ 127, 128, 132, -1, -1, 135, -1, -1, -1, -1,
+ 137, 138, 139, 140, 141, 142, 143, 144, -1, -1,
+ 147, -1, 149, -1, -1, 155, -1, -1, -1, 156,
+ 160, -1, 376, -1, 161, 162, 163, -1, 165, 166,
+ -1, 10, 169, 170, -1, 14, 15, 16, -1, -1,
+ -1, 178, 179, 22, 23, 55, 56, 57, 58, -1,
+ 29, 30, -1, -1, 33, -1, -1, 36, 37, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ 49, -1, -1, -1, 53, 85, -1, 87, -1, 89,
+ 59, -1, 61, -1, 94, 9, -1, -1, -1, -1,
+ -1, 70, 71, 17, -1, 74, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 91, -1, 93, 94, -1, 96,
- 97, 98, -1, 100, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 103, 104, 105, -1, 52, 53,
+ -1, 110, -1, -1, -1, -1, -1, -1, -1, -1,
+ 119, -1, -1, -1, 123, 69, 125, -1, 127, 128,
+ -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
+ 139, 140, 141, 142, 143, 144, 90, -1, 147, -1,
+ 149, -1, -1, 97, -1, 99, -1, 156, -1, -1,
+ -1, -1, 161, 162, 163, -1, 165, 166, 46, 113,
+ 169, 170, -1, 13, -1, -1, 54, -1, -1, 19,
+ 179, 21, -1, -1, -1, -1, 130, 131, -1, -1,
+ -1, -1, -1, -1, 72, 73, -1, 75, -1, -1,
+ -1, -1, -1, 81, -1, -1, -1, 47, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 164, -1, 166, -1, -1, -1, -1, 171, -1, 107,
+ 108, 175, -1, 111, 112, -1, 114, 115, 116, -1,
+ 118, -1, -1, -1, -1, -1, 86, -1, 88, -1,
+ -1, -1, -1, 93, -1, 95, -1, -1, 98, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 147
+ 120, 121, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 171
};
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 1, 8, 13, 14, 15, 18, 22, 23, 28,
- 29, 32, 35, 36, 39, 47, 53, 55, 62, 63,
- 66, 70, 71, 74, 75, 88, 89, 101, 104, 106,
- 108, 109, 115, 119, 120, 121, 122, 123, 124, 126,
- 128, 134, 138, 139, 140, 142, 143, 145, 146, 156,
- 172, 173, 174, 175, 176, 186, 187, 188, 189, 193,
- 198, 206, 212, 217, 221, 225, 226, 227, 228, 236,
- 237, 248, 249, 155, 54, 54, 54, 190, 6, 10,
- 17, 60, 86, 99, 127, 218, 219, 220, 9, 82,
- 86, 209, 210, 211, 132, 229, 218, 20, 24, 72,
- 105, 113, 117, 133, 137, 200, 57, 59, 132, 177,
- 178, 179, 132, 132, 132, 132, 234, 235, 177, 245,
- 245, 132, 132, 244, 54, 26, 57, 59, 177, 178,
- 54, 132, 230, 199, 200, 132, 5, 30, 46, 49,
- 103, 129, 130, 222, 223, 224, 11, 19, 21, 45,
- 77, 78, 80, 81, 84, 102, 194, 195, 196, 197,
- 178, 54, 167, 241, 242, 243, 54, 240, 0, 174,
- 155, 177, 177, 31, 54, 247, 132, 132, 33, 52,
- 69, 239, 169, 27, 48, 51, 114, 116, 121, 125,
- 191, 192, 219, 210, 54, 31, 201, 40, 41, 42,
- 43, 118, 131, 135, 136, 213, 214, 215, 216, 132,
- 174, 235, 177, 132, 207, 26, 26, 207, 76, 166,
- 200, 223, 247, 37, 54, 141, 246, 195, 54, 247,
- 55, 110, 232, 233, 54, 242, 54, 155, 7, 12,
- 16, 50, 61, 79, 83, 85, 95, 111, 112, 141,
- 143, 147, 151, 180, 181, 182, 183, 184, 185, 4,
- 56, 58, 132, 150, 238, 157, 158, 250, 251, 54,
- 132, 28, 35, 38, 68, 90, 144, 202, 203, 204,
- 132, 54, 214, 247, 246, 44, 52, 64, 65, 67,
- 73, 91, 93, 94, 96, 97, 98, 100, 147, 208,
- 207, 207, 178, 132, 178, 54, 233, 34, 247, 181,
- 54, 166, 166, 123, 251, 252, 253, 255, 155, 132,
- 3, 25, 87, 92, 107, 149, 152, 205, 207, 26,
- 231, 54, 247, 247, 166, 155, 170, 253, 169, 168,
- 177, 159, 254, 166, 160, 256, 257, 247, 166, 170,
- 257, 155, 247, 169, 161, 162, 163, 164, 165, 258,
- 259, 166, 166, 166, 166, 166, 170, 259, 155, 247,
- 247, 247, 247, 247, 155
+ 0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
+ 33, 36, 37, 40, 49, 53, 59, 61, 70, 71,
+ 74, 78, 79, 82, 83, 103, 104, 105, 110, 119,
+ 123, 125, 127, 128, 137, 138, 139, 140, 141, 142,
+ 143, 144, 147, 149, 156, 161, 162, 163, 165, 166,
+ 169, 170, 179, 195, 196, 197, 198, 199, 211, 212,
+ 213, 214, 218, 223, 231, 240, 245, 249, 254, 258,
+ 259, 260, 261, 269, 270, 273, 284, 285, 178, 60,
+ 60, 215, 8, 12, 18, 68, 100, 101, 117, 148,
+ 250, 251, 252, 253, 11, 96, 101, 234, 235, 236,
+ 153, 262, 250, 20, 24, 80, 124, 132, 135, 155,
+ 160, 225, 65, 67, 153, 200, 201, 202, 153, 153,
+ 153, 153, 267, 268, 200, 281, 55, 56, 57, 58,
+ 85, 87, 89, 94, 237, 238, 239, 281, 153, 153,
+ 280, 60, 7, 8, 25, 63, 91, 154, 159, 274,
+ 275, 27, 65, 67, 145, 200, 201, 60, 41, 92,
+ 146, 246, 247, 248, 153, 263, 224, 225, 153, 6,
+ 31, 48, 51, 122, 150, 151, 156, 255, 256, 257,
+ 13, 19, 21, 47, 86, 88, 93, 95, 98, 120,
+ 121, 219, 220, 221, 222, 201, 60, 190, 277, 278,
+ 279, 60, 276, 0, 197, 178, 200, 200, 32, 60,
+ 283, 153, 153, 34, 54, 77, 272, 192, 28, 50,
+ 53, 133, 134, 140, 216, 217, 251, 235, 60, 32,
+ 226, 3, 42, 43, 44, 45, 136, 152, 157, 158,
+ 241, 242, 243, 244, 153, 197, 268, 200, 238, 60,
+ 153, 275, 232, 27, 27, 232, 232, 84, 247, 60,
+ 189, 225, 256, 283, 38, 60, 164, 282, 220, 60,
+ 283, 265, 60, 278, 60, 178, 203, 5, 64, 66,
+ 153, 174, 271, 180, 181, 286, 287, 288, 60, 153,
+ 29, 36, 39, 76, 106, 167, 227, 228, 229, 153,
+ 153, 60, 242, 283, 282, 46, 54, 72, 73, 75,
+ 81, 107, 108, 111, 112, 114, 115, 116, 118, 171,
+ 233, 232, 232, 201, 153, 61, 129, 266, 35, 9,
+ 17, 52, 53, 69, 90, 97, 99, 113, 130, 131,
+ 164, 166, 171, 175, 204, 205, 206, 207, 208, 209,
+ 210, 143, 287, 289, 290, 292, 178, 189, 153, 4,
+ 26, 102, 109, 126, 173, 176, 230, 232, 27, 264,
+ 201, 60, 60, 60, 168, 153, 189, 178, 193, 290,
+ 192, 283, 191, 200, 182, 291, 189, 183, 293, 294,
+ 283, 189, 193, 294, 178, 283, 192, 184, 185, 186,
+ 187, 188, 295, 296, 297, 193, 296, 178, 189, 178,
+ 283
};
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
+{
+ 0, 194, 195, 196, 196, 196, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
+ 198, 199, 199, 199, 199, 199, 200, 200, 201, 202,
+ 202, 203, 203, 204, 204, 204, 205, 206, 206, 206,
+ 206, 206, 206, 206, 206, 207, 207, 208, 208, 208,
+ 208, 208, 208, 209, 210, 211, 212, 212, 213, 213,
+ 213, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ 215, 215, 216, 216, 217, 217, 217, 217, 217, 218,
+ 219, 219, 220, 220, 220, 221, 221, 221, 221, 221,
+ 221, 222, 222, 222, 222, 223, 223, 223, 224, 224,
+ 225, 225, 225, 225, 225, 225, 225, 225, 226, 226,
+ 227, 227, 227, 227, 228, 228, 229, 229, 230, 230,
+ 230, 230, 230, 230, 230, 231, 231, 231, 231, 231,
+ 231, 231, 231, 232, 232, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
+ 234, 234, 235, 236, 236, 236, 237, 237, 238, 239,
+ 239, 239, 239, 239, 239, 239, 239, 240, 241, 241,
+ 242, 242, 242, 242, 242, 243, 243, 244, 244, 244,
+ 244, 245, 246, 246, 247, 248, 248, 248, 249, 249,
+ 250, 250, 251, 251, 252, 252, 252, 252, 252, 252,
+ 253, 253, 254, 255, 255, 256, 257, 257, 257, 257,
+ 257, 257, 257, 257, 258, 258, 258, 258, 258, 258,
+ 258, 258, 258, 258, 258, 258, 258, 259, 259, 259,
+ 260, 260, 260, 261, 261, 262, 262, 262, 263, 264,
+ 264, 265, 265, 266, 266, 267, 267, 268, 269, 269,
+ 270, 270, 271, 271, 271, 271, 272, 272, 272, 273,
+ 274, 274, 275, 275, 275, 275, 275, 275, 275, 276,
+ 276, 277, 277, 278, 278, 279, 280, 280, 281, 281,
+ 282, 282, 282, 283, 283, 284, 285, 286, 286, 287,
+ 288, 288, 289, 289, 290, 291, 292, 293, 293, 294,
+ 295, 295, 296, 297, 297, 297, 297, 297
+};
-#define YYRECOVERING() (!!yyerrstatus)
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
+ 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 0, 2, 2, 2, 1, 1, 1, 1, 1, 2,
+ 2, 1, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 3, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 3, 5, 3,
+ 4, 4, 3, 0, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 2, 1, 1, 1, 2, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 2, 1,
+ 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
+ 1, 2, 2, 1, 2, 1, 1, 1, 2, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 3,
+ 1, 2, 2, 2, 2, 3, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 0, 4, 1,
+ 0, 0, 2, 2, 2, 2, 1, 1, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 1, 2, 1, 1, 1, 5, 2, 1, 2, 1,
+ 1, 1, 1, 1, 1, 5, 1, 3, 2, 3,
+ 1, 1, 2, 1, 5, 4, 3, 2, 1, 6,
+ 3, 2, 3, 1, 1, 1, 1, 1
+};
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
-#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (ip_file, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (0)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -1484,54 +1445,47 @@ while (YYID (0))
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
+/* This macro is provided for backward compatibility. */
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, ip_file); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct FILE_INFO *ip_file)
{
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ YYUSE (ip_file);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
# endif
- switch (yytype)
- {
- default:
- break;
- }
+ YYUSE (yytype);
}
@@ -1539,24 +1493,13 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct FILE_INFO *ip_file)
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, ip_file);
YYFPRINTF (yyoutput, ")");
}
@@ -1565,16 +1508,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1585,49 +1520,42 @@ yy_stack_print (yybottom, yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct FILE_INFO *ip_file)
{
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
+ yy_symbol_print (stderr,
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , ip_file);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, ip_file); \
+} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
@@ -1641,7 +1569,7 @@ int yydebug;
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -1656,7 +1584,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
#if YYERROR_VERBOSE
@@ -1665,15 +1592,8 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
@@ -1689,16 +1609,8 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -1728,27 +1640,27 @@ yytnamerr (char *yyres, const char *yystr)
char const *yyp = yystr;
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
@@ -1759,161 +1671,161 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
{
- int yyn = yypact[yystate];
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+ }
+ }
+ }
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
+ switch (yycount)
{
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
}
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct FILE_INFO *ip_file)
{
YYUSE (yyvaluep);
-
+ YYUSE (ip_file);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- switch (yytype)
- {
-
- default:
- break;
- }
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
}
-/* Prevent warnings from -Wmissing-prototypes. */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
+
/* The lookahead symbol. */
@@ -1921,49 +1833,26 @@ int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-
/* Number of syntax errors so far. */
int yynerrs;
+/*----------.
+| yyparse. |
+`----------*/
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
int
-yyparse ()
-
-#endif
-#endif
+yyparse (struct FILE_INFO *ip_file)
{
-
-
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
- Refer to the stacks thru separate pointers, to allow yyoverflow
+ Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
@@ -1981,7 +1870,7 @@ yyparse ()
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1999,9 +1888,8 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -2010,14 +1898,6 @@ yyparse ()
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -2038,23 +1918,23 @@ yyparse ()
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
@@ -2062,22 +1942,22 @@ yyparse ()
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
@@ -2086,10 +1966,10 @@ yyparse ()
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -2109,7 +1989,7 @@ yybackup:
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
+ if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
@@ -2118,7 +1998,7 @@ yybackup:
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
+ yychar = yylex (ip_file);
}
if (yychar <= YYEOF)
@@ -2140,8 +2020,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -2158,7 +2038,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@@ -2181,7 +2063,7 @@ yyreduce:
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
+ '$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -2195,9 +2077,7 @@ yyreduce:
switch (yyn)
{
case 5:
-
-/* Line 1464 of yacc.c */
-#line 325 "ntp_parser.y"
+#line 370 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2209,1152 +2089,1252 @@ yyreduce:
ip_file->err_line_no,
ip_file->err_col_no);
}
- break;
-
- case 19:
-
-/* Line 1464 of yacc.c */
-#line 359 "ntp_parser.y"
- {
- struct peer_node *my_node = create_peer_node((yyvsp[(1) - (3)].Integer), (yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue));
- if (my_node)
- enqueue(cfgt.peers, my_node);
- }
+#line 2093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-
-/* Line 1464 of yacc.c */
-#line 365 "ntp_parser.y"
+#line 405 "ntp_parser.y" /* yacc.c:1646 */
{
- struct peer_node *my_node = create_peer_node((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Address_node), NULL);
- if (my_node)
- enqueue(cfgt.peers, my_node);
+ peer_node *my_node;
+
+ my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
+ APPEND_G_FIFO(cfgt.peers, my_node);
}
+#line 2104 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-
-/* Line 1464 of yacc.c */
-#line 383 "ntp_parser.y"
- { (yyval.Address_node) = create_address_node((yyvsp[(2) - (2)].String), (yyvsp[(1) - (2)].Integer)); }
+#line 424 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
+#line 2110 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-
-/* Line 1464 of yacc.c */
-#line 388 "ntp_parser.y"
- { (yyval.Address_node) = create_address_node((yyvsp[(1) - (1)].String), 0); }
+#line 429 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
+#line 2116 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-
-/* Line 1464 of yacc.c */
-#line 393 "ntp_parser.y"
+#line 434 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
+#line 2122 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-
-/* Line 1464 of yacc.c */
-#line 395 "ntp_parser.y"
+#line 436 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
+#line 2128 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-
-/* Line 1464 of yacc.c */
-#line 399 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 441 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-
-/* Line 1464 of yacc.c */
-#line 400 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
- break;
-
- case 35:
-
-/* Line 1464 of yacc.c */
-#line 407 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+#line 443 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2143 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-
-/* Line 1464 of yacc.c */
-#line 412 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+#line 457 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2149 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
+#line 473 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2155 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 428 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+ case 46:
+#line 475 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2161 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 52:
+ case 53:
+#line 489 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2167 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 448 "ntp_parser.y"
+ case 55:
+#line 503 "ntp_parser.y" /* yacc.c:1646 */
{
- struct unpeer_node *my_node = create_unpeer_node((yyvsp[(2) - (2)].Address_node));
+ unpeer_node *my_node;
+
+ my_node = create_unpeer_node((yyvsp[0].Address_node));
if (my_node)
- enqueue(cfgt.unpeers, my_node);
+ APPEND_G_FIFO(cfgt.unpeers, my_node);
}
- break;
-
- case 55:
-
-/* Line 1464 of yacc.c */
-#line 467 "ntp_parser.y"
- { cfgt.broadcastclient = 1; }
- break;
-
- case 56:
-
-/* Line 1464 of yacc.c */
-#line 469 "ntp_parser.y"
- { append_queue(cfgt.manycastserver, (yyvsp[(2) - (2)].Queue)); }
- break;
-
- case 57:
-
-/* Line 1464 of yacc.c */
-#line 471 "ntp_parser.y"
- { append_queue(cfgt.multicastclient, (yyvsp[(2) - (2)].Queue)); }
+#line 2179 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-
-/* Line 1464 of yacc.c */
-#line 482 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer))); }
+#line 524 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.broadcastclient = 1; }
+#line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-
-/* Line 1464 of yacc.c */
-#line 484 "ntp_parser.y"
- { cfgt.auth.control_key = (yyvsp[(2) - (2)].Integer); }
+#line 526 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
+#line 2191 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-
-/* Line 1464 of yacc.c */
-#line 486 "ntp_parser.y"
- {
- cfgt.auth.cryptosw++;
- append_queue(cfgt.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Queue));
- }
+#line 528 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
+#line 2197 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-
-/* Line 1464 of yacc.c */
-#line 491 "ntp_parser.y"
- { cfgt.auth.keys = (yyvsp[(2) - (2)].String); }
+#line 539 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ attr_val *atrv;
+
+ atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
+ APPEND_G_FIFO(cfgt.vars, atrv);
+ }
+#line 2208 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 62:
-
-/* Line 1464 of yacc.c */
-#line 493 "ntp_parser.y"
- { cfgt.auth.keysdir = (yyvsp[(2) - (2)].String); }
+#line 546 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.control_key = (yyvsp[0].Integer); }
+#line 2214 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 63:
-
-/* Line 1464 of yacc.c */
-#line 495 "ntp_parser.y"
- { cfgt.auth.request_key = (yyvsp[(2) - (2)].Integer); }
+#line 548 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ cfgt.auth.cryptosw++;
+ CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
+ }
+#line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 64:
-
-/* Line 1464 of yacc.c */
-#line 497 "ntp_parser.y"
- { cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer); }
+#line 553 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.keys = (yyvsp[0].String); }
+#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 65:
-
-/* Line 1464 of yacc.c */
-#line 499 "ntp_parser.y"
- { cfgt.auth.trusted_key_list = (yyvsp[(2) - (2)].Queue); }
+#line 555 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.keysdir = (yyvsp[0].String); }
+#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 66:
-
-/* Line 1464 of yacc.c */
-#line 501 "ntp_parser.y"
- { cfgt.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); }
+#line 557 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.request_key = (yyvsp[0].Integer); }
+#line 2241 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 67:
-
-/* Line 1464 of yacc.c */
-#line 506 "ntp_parser.y"
- { (yyval.Queue) = create_queue(); }
+#line 559 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.revoke = (yyvsp[0].Integer); }
+#line 2247 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 68:
+#line 561 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
-/* Line 1464 of yacc.c */
-#line 508 "ntp_parser.y"
- {
- if ((yyvsp[(2) - (2)].Attr_val) != NULL)
- (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val));
- else
- (yyval.Queue) = (yyvsp[(1) - (2)].Queue);
+ // if (!cfgt.auth.trusted_key_list)
+ // cfgt.auth.trusted_key_list = $2;
+ // else
+ // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
+#line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 69:
-
-/* Line 1464 of yacc.c */
-#line 518 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+#line 570 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
+#line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 70:
+#line 575 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2272 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 520 "ntp_parser.y"
+ case 71:
+#line 577 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2281 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 72:
+#line 585 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2287 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 73:
+#line 587 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
- cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer);
+ cfgt.auth.revoke = (yyvsp[0].Integer);
msyslog(LOG_WARNING,
"'crypto revoke %d' is deprecated, "
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
- break;
-
- case 77:
-
-/* Line 1464 of yacc.c */
-#line 546 "ntp_parser.y"
- { append_queue(cfgt.orphan_cmds,(yyvsp[(2) - (2)].Queue)); }
- break;
-
- case 78:
-
-/* Line 1464 of yacc.c */
-#line 550 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 79:
-
-/* Line 1464 of yacc.c */
-#line 551 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+#line 612 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
+#line 2306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 80:
-
-/* Line 1464 of yacc.c */
-#line 556 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
+#line 617 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 81:
-
-/* Line 1464 of yacc.c */
-#line 558 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+#line 622 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2324 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 82:
-
-/* Line 1464 of yacc.c */
-#line 560 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
+#line 630 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 92:
+ case 83:
+#line 632 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 585 "ntp_parser.y"
- { append_queue(cfgt.stats_list, (yyvsp[(2) - (2)].Queue)); }
+ case 84:
+#line 634 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
+#line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 93:
+ case 95:
+#line 660 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
+#line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 587 "ntp_parser.y"
+ case 96:
+#line 662 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
- cfgt.stats_dir = (yyvsp[(2) - (2)].String);
+ cfgt.stats_dir = (yyvsp[0].String);
} else {
- YYFREE((yyvsp[(2) - (2)].String));
- yyerror("statsdir remote configuration ignored");
+ YYFREE((yyvsp[0].String));
+ yyerror(ip_file, "statsdir remote configuration ignored");
}
}
+#line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 94:
-
-/* Line 1464 of yacc.c */
-#line 596 "ntp_parser.y"
+ case 97:
+#line 671 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.filegen_opts,
- create_filegen_node((yyvsp[(2) - (3)].Integer), (yyvsp[(3) - (3)].Queue)));
+ filegen_node *fgn;
+
+ fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
+ APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
+#line 2372 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 95:
-
-/* Line 1464 of yacc.c */
-#line 603 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_ival((yyvsp[(2) - (2)].Integer))); }
+ case 98:
+#line 681 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
+ }
+#line 2381 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 96:
-
-/* Line 1464 of yacc.c */
-#line 604 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue(create_ival((yyvsp[(1) - (1)].Integer))); }
+ case 99:
+#line 686 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Int_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
+ }
+#line 2390 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 105:
-
-/* Line 1464 of yacc.c */
-#line 620 "ntp_parser.y"
- { (yyval.Queue) = create_queue(); }
+ case 108:
+#line 705 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 106:
-
-/* Line 1464 of yacc.c */
-#line 622 "ntp_parser.y"
+ case 109:
+#line 707 "ntp_parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(2) - (2)].Attr_val) != NULL)
- (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val));
- else
- (yyval.Queue) = (yyvsp[(1) - (2)].Queue);
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2405 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 107:
-
-/* Line 1464 of yacc.c */
-#line 632 "ntp_parser.y"
+ case 110:
+#line 715 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
- (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
+ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
} else {
(yyval.Attr_val) = NULL;
- YYFREE((yyvsp[(2) - (2)].String));
- yyerror("filegen file remote config ignored");
+ YYFREE((yyvsp[0].String));
+ yyerror(ip_file, "filegen file remote config ignored");
}
}
+#line 2419 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 108:
-
-/* Line 1464 of yacc.c */
-#line 642 "ntp_parser.y"
+ case 111:
+#line 725 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
- (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
+ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
} else {
(yyval.Attr_val) = NULL;
- yyerror("filegen type remote config ignored");
+ yyerror(ip_file, "filegen type remote config ignored");
}
}
+#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 109:
-
-/* Line 1464 of yacc.c */
-#line 651 "ntp_parser.y"
+ case 112:
+#line 734 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
if (input_from_file) {
- (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
+ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
} else {
(yyval.Attr_val) = NULL;
- if (T_Link == (yyvsp[(1) - (1)].Integer))
+ if (T_Link == (yyvsp[0].Integer))
err = "filegen link remote config ignored";
else
err = "filegen nolink remote config ignored";
- yyerror(err);
+ yyerror(ip_file, err);
}
}
+#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 110:
-
-/* Line 1464 of yacc.c */
-#line 666 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+ case 113:
+#line 749 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2457 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 122:
-
-/* Line 1464 of yacc.c */
-#line 696 "ntp_parser.y"
+ case 125:
+#line 779 "ntp_parser.y" /* yacc.c:1646 */
{
- append_queue(cfgt.discard_opts, (yyvsp[(2) - (2)].Queue));
+ CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
+#line 2465 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 123:
-
-/* Line 1464 of yacc.c */
-#line 700 "ntp_parser.y"
+ case 126:
+#line 783 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node((yyvsp[(2) - (3)].Address_node), NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no));
+ CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
+#line 2473 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 124:
-
-/* Line 1464 of yacc.c */
-#line 705 "ntp_parser.y"
+ case 127:
+#line 787 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(NULL, NULL, (yyvsp[(3) - (3)].Queue), ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2485 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 125:
-
-/* Line 1464 of yacc.c */
-#line 710 "ntp_parser.y"
+ case 128:
+#line 795 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(
- create_address_node(
- estrdup("0.0.0.0"),
- AF_INET),
- create_address_node(
- estrdup("0.0.0.0"),
- AF_INET),
- (yyvsp[(4) - (4)].Queue),
- ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2497 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 126:
-
-/* Line 1464 of yacc.c */
-#line 723 "ntp_parser.y"
+ case 129:
+#line 803 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(
- create_address_node(
- estrdup("::"),
- AF_INET6),
- create_address_node(
- estrdup("::"),
- AF_INET6),
- (yyvsp[(4) - (4)].Queue),
- ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2509 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 127:
-
-/* Line 1464 of yacc.c */
-#line 736 "ntp_parser.y"
+ case 130:
+#line 811 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node((yyvsp[(2) - (5)].Address_node), (yyvsp[(4) - (5)].Address_node), (yyvsp[(5) - (5)].Queue), ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node(
+ create_address_node(
+ estrdup("0.0.0.0"),
+ AF_INET),
+ create_address_node(
+ estrdup("0.0.0.0"),
+ AF_INET),
+ (yyvsp[0].Int_fifo),
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
+#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 128:
-
-/* Line 1464 of yacc.c */
-#line 744 "ntp_parser.y"
- { (yyval.Queue) = create_queue(); }
- break;
-
- case 129:
-
-/* Line 1464 of yacc.c */
-#line 746 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_ival((yyvsp[(2) - (2)].Integer))); }
+ case 131:
+#line 826 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ restrict_node *rn;
+
+ rn = create_restrict_node(
+ create_address_node(
+ estrdup("::"),
+ AF_INET6),
+ create_address_node(
+ estrdup("::"),
+ AF_INET6),
+ (yyvsp[0].Int_fifo),
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
+ }
+#line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 144:
+ case 132:
+#line 841 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ restrict_node * rn;
-/* Line 1464 of yacc.c */
-#line 768 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+ APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
+ rn = create_restrict_node(
+ NULL, NULL, (yyvsp[0].Int_fifo), ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
+ }
+#line 2560 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 145:
-
-/* Line 1464 of yacc.c */
-#line 770 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+ case 133:
+#line 853 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Int_fifo) = NULL; }
+#line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 146:
-
-/* Line 1464 of yacc.c */
-#line 775 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+ case 134:
+#line 855 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
+ }
+#line 2575 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 150:
-
-/* Line 1464 of yacc.c */
-#line 791 "ntp_parser.y"
- { enqueue(cfgt.fudge, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
+#line 881 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2584 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 151:
-
-/* Line 1464 of yacc.c */
-#line 796 "ntp_parser.y"
- { enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+#line 886 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2593 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
case 152:
-
-/* Line 1464 of yacc.c */
-#line 798 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+#line 894 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 153:
+ case 156:
+#line 905 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2608 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 803 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+ case 157:
+#line 910 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2617 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 154:
+ case 158:
+#line 918 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 805 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+ case 167:
+#line 938 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ addr_opts_node *aon;
+
+ aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
+ APPEND_G_FIFO(cfgt.fudge, aon);
+ }
+#line 2634 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 155:
+ case 168:
+#line 948 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2643 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 807 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+ case 169:
+#line 953 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2652 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 156:
+ case 170:
+#line 961 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2658 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 809 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
+ case 171:
+#line 963 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2664 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 163:
+ case 172:
+#line 965 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2670 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 831 "ntp_parser.y"
- { append_queue(cfgt.enable_opts, (yyvsp[(2) - (2)].Queue)); }
+ case 173:
+#line 967 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2676 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 164:
+ case 174:
+#line 969 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2682 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 833 "ntp_parser.y"
- { append_queue(cfgt.disable_opts, (yyvsp[(2) - (2)].Queue)); }
+ case 181:
+#line 990 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
+#line 2688 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 165:
+ case 182:
+#line 995 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2697 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 838 "ntp_parser.y"
+ case 183:
+#line 1000 "ntp_parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(2) - (2)].Attr_val) != NULL)
- (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val));
- else
- (yyval.Queue) = (yyvsp[(1) - (2)].Queue);
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 166:
+ case 184:
+#line 1008 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2712 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 845 "ntp_parser.y"
+ case 188:
+#line 1024 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 189:
+#line 1026 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
+#line 2724 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 190:
+#line 1031 "ntp_parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(1) - (1)].Attr_val) != NULL)
- (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val));
- else
- (yyval.Queue) = create_queue();
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
+#line 2733 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 167:
-
-/* Line 1464 of yacc.c */
-#line 855 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
+ case 191:
+#line 1036 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2742 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 168:
+ case 192:
+#line 1044 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
+#line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 857 "ntp_parser.y"
+ case 193:
+#line 1046 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
- (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
+ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
} else {
+ char err_str[128];
+
(yyval.Attr_val) = NULL;
- yyerror("enable/disable stats remote config ignored");
+ snprintf(err_str, sizeof(err_str),
+ "enable/disable %s remote configuration ignored",
+ keyword((yyvsp[0].Integer)));
+ yyerror(ip_file, err_str);
}
}
+#line 2766 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 175:
-
-/* Line 1464 of yacc.c */
-#line 882 "ntp_parser.y"
- { append_queue(cfgt.tinker, (yyvsp[(2) - (2)].Queue)); }
+ case 202:
+#line 1081 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
+#line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 176:
-
-/* Line 1464 of yacc.c */
-#line 886 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+ case 203:
+#line 1086 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2781 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 177:
-
-/* Line 1464 of yacc.c */
-#line 887 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+ case 204:
+#line 1091 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2790 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 178:
-
-/* Line 1464 of yacc.c */
-#line 892 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
+ case 205:
+#line 1099 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2796 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 187:
-
-/* Line 1464 of yacc.c */
-#line 913 "ntp_parser.y"
+ case 216:
+#line 1122 "ntp_parser.y" /* yacc.c:1646 */
{
- struct attr_val *av;
+ attr_val *av;
- av = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double));
- enqueue(cfgt.vars, av);
+ av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
+ APPEND_G_FIFO(cfgt.vars, av);
}
+#line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 188:
-
-/* Line 1464 of yacc.c */
-#line 920 "ntp_parser.y"
+ case 217:
+#line 1129 "ntp_parser.y" /* yacc.c:1646 */
{
- struct attr_val *av;
+ attr_val *av;
- av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
- enqueue(cfgt.vars, av);
+ av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
+ APPEND_G_FIFO(cfgt.vars, av);
}
+#line 2818 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 189:
-
-/* Line 1464 of yacc.c */
-#line 927 "ntp_parser.y"
+ case 218:
+#line 1136 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
- struct attr_val *av;
+ attr_val *av;
if (input_from_file) {
- av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
- enqueue(cfgt.vars, av);
+ av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
+ APPEND_G_FIFO(cfgt.vars, av);
} else {
- YYFREE((yyvsp[(2) - (2)].String));
+ YYFREE((yyvsp[0].String));
snprintf(error_text, sizeof(error_text),
"%s remote config ignored",
- keyword((yyvsp[(1) - (2)].Integer)));
- yyerror(error_text);
+ keyword((yyvsp[-1].Integer)));
+ yyerror(ip_file, error_text);
}
}
+#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 190:
-
-/* Line 1464 of yacc.c */
-#line 943 "ntp_parser.y"
+ case 219:
+#line 1152 "ntp_parser.y" /* yacc.c:1646 */
{
if (!input_from_file) {
- yyerror("remote includefile ignored");
+ yyerror(ip_file, "remote includefile ignored");
break;
}
if (curr_include_level >= MAXINCLUDELEVEL) {
fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
- msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.\n");
+ msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
} else {
- fp[curr_include_level + 1] = F_OPEN(FindConfig((yyvsp[(2) - (3)].String)), "r");
+ fp[curr_include_level + 1] = F_OPEN(FindConfig((yyvsp[-1].String)), "r");
if (fp[curr_include_level + 1] == NULL) {
- fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig((yyvsp[(2) - (3)].String)));
- msyslog(LOG_ERR, "getconfig: Couldn't open <%s>\n", FindConfig((yyvsp[(2) - (3)].String)));
+ fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig((yyvsp[-1].String)));
+ msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", FindConfig((yyvsp[-1].String)));
} else {
ip_file = fp[++curr_include_level];
}
}
}
+#line 2861 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 191:
-
-/* Line 1464 of yacc.c */
-#line 962 "ntp_parser.y"
+ case 220:
+#line 1171 "ntp_parser.y" /* yacc.c:1646 */
{
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
}
+#line 2870 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 192:
-
-/* Line 1464 of yacc.c */
-#line 967 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer))); }
+ case 221:
+#line 1176 "ntp_parser.y" /* yacc.c:1646 */
+ { /* see drift_parm below for actions */ }
+#line 2876 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 193:
-
-/* Line 1464 of yacc.c */
-#line 969 "ntp_parser.y"
- { /* Null action, possibly all null parms */ }
+ case 222:
+#line 1178 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
+#line 2882 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 194:
-
-/* Line 1464 of yacc.c */
-#line 971 "ntp_parser.y"
- { append_queue(cfgt.logconfig, (yyvsp[(2) - (2)].Queue)); }
+ case 223:
+#line 1180 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
+#line 2888 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 195:
-
-/* Line 1464 of yacc.c */
-#line 973 "ntp_parser.y"
- { append_queue(cfgt.phone, (yyvsp[(2) - (2)].Queue)); }
+ case 224:
+#line 1182 "ntp_parser.y" /* yacc.c:1646 */
+ { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
+#line 2894 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 196:
-
-/* Line 1464 of yacc.c */
-#line 975 "ntp_parser.y"
- { enqueue(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); }
+ case 225:
+#line 1184 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ addr_opts_node *aon;
+
+ aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
+ APPEND_G_FIFO(cfgt.trap, aon);
+ }
+#line 2905 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 197:
-
-/* Line 1464 of yacc.c */
-#line 977 "ntp_parser.y"
- { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (2)].Address_node), NULL)); }
+ case 226:
+#line 1191 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
+#line 2911 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 198:
-
-/* Line 1464 of yacc.c */
-#line 979 "ntp_parser.y"
- { enqueue(cfgt.trap, create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Queue))); }
+ case 235:
+#line 1213 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
+#line 2922 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 199:
-
-/* Line 1464 of yacc.c */
-#line 981 "ntp_parser.y"
- { append_queue(cfgt.ttl, (yyvsp[(2) - (2)].Queue)); }
+ case 236:
+#line 1220 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
+ APPEND_G_FIFO(cfgt.vars, av);
+ av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
+#line 2935 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 207:
-
-/* Line 1464 of yacc.c */
-#line 1002 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String))); }
+ case 237:
+#line 1229 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, "");
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
+#line 2946 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 208:
-
-/* Line 1464 of yacc.c */
-#line 1004 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double)));
- enqueue(cfgt.vars, create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String))); }
+ case 238:
+#line 1239 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
+#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 209:
-
-/* Line 1464 of yacc.c */
-#line 1007 "ntp_parser.y"
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, "\0")); }
+ case 240:
+#line 1245 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Integer) = 0; }
+#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 210:
-
-/* Line 1464 of yacc.c */
-#line 1012 "ntp_parser.y"
- { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (4)].String), (yyvsp[(3) - (4)].String), (yyvsp[(4) - (4)].Integer)); }
+ case 241:
+#line 1250 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val_fifo) = NULL; }
+#line 2964 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 212:
-
-/* Line 1464 of yacc.c */
-#line 1018 "ntp_parser.y"
- { (yyval.Integer) = 0; }
+ case 242:
+#line 1252 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2973 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 213:
-
-/* Line 1464 of yacc.c */
-#line 1023 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+ case 243:
+#line 1260 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2979 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 214:
-
-/* Line 1464 of yacc.c */
-#line 1024 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+ case 244:
+#line 1262 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
+ destroy_address_node((yyvsp[0].Address_node));
+ }
+#line 2988 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 215:
-
-/* Line 1464 of yacc.c */
-#line 1028 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
+ case 245:
+#line 1270 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 2997 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 216:
-
-/* Line 1464 of yacc.c */
-#line 1029 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_pval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Address_node)); }
+ case 246:
+#line 1275 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 3006 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 217:
-
-/* Line 1464 of yacc.c */
-#line 1033 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+ case 247:
+#line 1283 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ char prefix;
+ char * type;
+
+ switch ((yyvsp[0].String)[0]) {
+
+ case '+':
+ case '-':
+ case '=':
+ prefix = (yyvsp[0].String)[0];
+ type = (yyvsp[0].String) + 1;
+ break;
+
+ default:
+ prefix = '=';
+ type = (yyvsp[0].String);
+ }
+
+ (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
+ YYFREE((yyvsp[0].String));
+ }
+#line 3032 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 218:
-
-/* Line 1464 of yacc.c */
-#line 1034 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+ case 248:
+#line 1308 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ nic_rule_node *nrn;
+
+ nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
+ APPEND_G_FIFO(cfgt.nic_rules, nrn);
+ }
+#line 3043 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 219:
-
-/* Line 1464 of yacc.c */
-#line 1039 "ntp_parser.y"
+ case 249:
+#line 1315 "ntp_parser.y" /* yacc.c:1646 */
{
- char prefix = (yyvsp[(1) - (1)].String)[0];
- char *type = (yyvsp[(1) - (1)].String) + 1;
+ nic_rule_node *nrn;
- if (prefix != '+' && prefix != '-' && prefix != '=') {
- yyerror("Logconfig prefix is not '+', '-' or '='\n");
- }
- else
- (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
- YYFREE((yyvsp[(1) - (1)].String));
+ nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
+ APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
+#line 3054 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 220:
+ case 259:
+#line 1343 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
+#line 3060 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ break;
-/* Line 1464 of yacc.c */
-#line 1054 "ntp_parser.y"
+ case 260:
+#line 1348 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.nic_rules,
- create_nic_rule_node((yyvsp[(3) - (3)].Integer), NULL, (yyvsp[(2) - (3)].Integer)));
+ (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3069 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 221:
-
-/* Line 1464 of yacc.c */
-#line 1059 "ntp_parser.y"
+ case 261:
+#line 1353 "ntp_parser.y" /* yacc.c:1646 */
{
- enqueue(cfgt.nic_rules,
- create_nic_rule_node(0, (yyvsp[(3) - (3)].String), (yyvsp[(2) - (3)].Integer)));
+ (yyval.Int_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
+#line 3078 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 231:
-
-/* Line 1464 of yacc.c */
-#line 1090 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_ival((yyvsp[(2) - (2)].Integer))); }
+ case 269:
+#line 1377 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
+ }
+#line 3087 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 232:
-
-/* Line 1464 of yacc.c */
-#line 1091 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue(create_ival((yyvsp[(1) - (1)].Integer))); }
+ case 270:
+#line 1382 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
+ }
+#line 3096 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 233:
-
-/* Line 1464 of yacc.c */
-#line 1096 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Attr_val)); }
+ case 271:
+#line 1390 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 3105 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 234:
-
-/* Line 1464 of yacc.c */
-#line 1098 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Attr_val)); }
+ case 272:
+#line 1395 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
+ }
+#line 3114 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 235:
-
-/* Line 1464 of yacc.c */
-#line 1103 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[(1) - (1)].Integer)); }
+ case 273:
+#line 1403 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
+#line 3120 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 237:
-
-/* Line 1464 of yacc.c */
-#line 1109 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_shorts('-', (yyvsp[(2) - (5)].Integer), (yyvsp[(4) - (5)].Integer)); }
+ case 275:
+#line 1409 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
+#line 3126 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 238:
-
-/* Line 1464 of yacc.c */
-#line 1113 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), create_pval((yyvsp[(2) - (2)].String))); }
+ case 276:
+#line 1414 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.String_fifo) = (yyvsp[-1].String_fifo);
+ APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
+ }
+#line 3135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 239:
-
-/* Line 1464 of yacc.c */
-#line 1114 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue(create_pval((yyvsp[(1) - (1)].String))); }
+ case 277:
+#line 1419 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.String_fifo) = NULL;
+ APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
+ }
+#line 3144 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 240:
-
-/* Line 1464 of yacc.c */
-#line 1118 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Address_node)); }
+ case 278:
+#line 1427 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
+ APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
+ }
+#line 3153 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 241:
-
-/* Line 1464 of yacc.c */
-#line 1119 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Address_node)); }
+ case 279:
+#line 1432 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Address_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
+ }
+#line 3162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 242:
-
-/* Line 1464 of yacc.c */
-#line 1124 "ntp_parser.y"
+ case 280:
+#line 1440 "ntp_parser.y" /* yacc.c:1646 */
{
- if ((yyvsp[(1) - (1)].Integer) != 0 && (yyvsp[(1) - (1)].Integer) != 1) {
- yyerror("Integer value is not boolean (0 or 1). Assuming 1");
+ if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
+ yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
(yyval.Integer) = 1;
} else {
- (yyval.Integer) = (yyvsp[(1) - (1)].Integer);
+ (yyval.Integer) = (yyvsp[0].Integer);
}
}
+#line 3175 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 243:
-
-/* Line 1464 of yacc.c */
-#line 1132 "ntp_parser.y"
+ case 281:
+#line 1448 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
+#line 3181 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 244:
-
-/* Line 1464 of yacc.c */
-#line 1133 "ntp_parser.y"
+ case 282:
+#line 1449 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
+#line 3187 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 245:
-
-/* Line 1464 of yacc.c */
-#line 1137 "ntp_parser.y"
- { (yyval.Double) = (double)(yyvsp[(1) - (1)].Integer); }
+ case 283:
+#line 1453 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Double) = (double)(yyvsp[0].Integer); }
+#line 3193 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-
-/* Line 1464 of yacc.c */
-#line 1148 "ntp_parser.y"
+ case 285:
+#line 1464 "ntp_parser.y" /* yacc.c:1646 */
{
- cfgt.sim_details = create_sim_node((yyvsp[(3) - (5)].Queue), (yyvsp[(4) - (5)].Queue));
+ sim_node *sn;
+
+ sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
+ APPEND_G_FIFO(cfgt.sim_details, sn);
- /* Reset the old_config_style variable */
+ /* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
+#line 3207 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-
-/* Line 1464 of yacc.c */
-#line 1162 "ntp_parser.y"
+ case 286:
+#line 1481 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
+#line 3213 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-
-/* Line 1464 of yacc.c */
-#line 1166 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); }
- break;
-
- case 250:
-
-/* Line 1464 of yacc.c */
-#line 1167 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); }
- break;
-
- case 251:
-
-/* Line 1464 of yacc.c */
-#line 1171 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
- break;
-
- case 252:
-
-/* Line 1464 of yacc.c */
-#line 1172 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
- break;
-
- case 253:
-
-/* Line 1464 of yacc.c */
-#line 1176 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_server)); }
- break;
-
- case 254:
-
-/* Line 1464 of yacc.c */
-#line 1177 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_server)); }
+ case 287:
+#line 1486 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
+ }
+#line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 255:
-
-/* Line 1464 of yacc.c */
-#line 1182 "ntp_parser.y"
- { (yyval.Sim_server) = create_sim_server((yyvsp[(1) - (5)].Address_node), (yyvsp[(3) - (5)].Double), (yyvsp[(4) - (5)].Queue)); }
+ case 288:
+#line 1491 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
+ }
+#line 3231 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 256:
-
-/* Line 1464 of yacc.c */
-#line 1186 "ntp_parser.y"
- { (yyval.Double) = (yyvsp[(3) - (4)].Double); }
+ case 289:
+#line 1499 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3237 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 257:
-
-/* Line 1464 of yacc.c */
-#line 1190 "ntp_parser.y"
- { (yyval.Address_node) = (yyvsp[(3) - (3)].Address_node); }
+ case 292:
+#line 1509 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
+ APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
+ }
+#line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 258:
-
-/* Line 1464 of yacc.c */
-#line 1194 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (2)].Queue), (yyvsp[(2) - (2)].Sim_script)); }
+ case 293:
+#line 1514 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Sim_server_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
+ }
+#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 259:
-
-/* Line 1464 of yacc.c */
-#line 1195 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (1)].Sim_script)); }
+ case 294:
+#line 1522 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
+#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-
-/* Line 1464 of yacc.c */
-#line 1200 "ntp_parser.y"
- { (yyval.Sim_script) = create_sim_script_info((yyvsp[(3) - (6)].Double), (yyvsp[(5) - (6)].Queue)); }
+ case 295:
+#line 1527 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Double) = (yyvsp[-1].Double); }
+#line 3267 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 261:
-
-/* Line 1464 of yacc.c */
-#line 1204 "ntp_parser.y"
- { (yyval.Queue) = enqueue((yyvsp[(1) - (3)].Queue), (yyvsp[(2) - (3)].Attr_val)); }
+ case 296:
+#line 1532 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Address_node) = (yyvsp[0].Address_node); }
+#line 3273 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 262:
-
-/* Line 1464 of yacc.c */
-#line 1205 "ntp_parser.y"
- { (yyval.Queue) = enqueue_in_new_queue((yyvsp[(1) - (2)].Attr_val)); }
+ case 297:
+#line 1537 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
+ APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
+ }
+#line 3282 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 263:
-
-/* Line 1464 of yacc.c */
-#line 1210 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+ case 298:
+#line 1542 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Sim_script_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
+ }
+#line 3291 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 264:
-
-/* Line 1464 of yacc.c */
-#line 1212 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+ case 299:
+#line 1550 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
+#line 3297 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 265:
-
-/* Line 1464 of yacc.c */
-#line 1214 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+ case 300:
+#line 1555 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
+ }
+#line 3306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 266:
-
-/* Line 1464 of yacc.c */
-#line 1216 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+ case 301:
+#line 1560 "ntp_parser.y" /* yacc.c:1646 */
+ {
+ (yyval.Attr_val_fifo) = NULL;
+ APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
+ }
+#line 3315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
- case 267:
-
-/* Line 1464 of yacc.c */
-#line 1218 "ntp_parser.y"
- { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
+ case 302:
+#line 1568 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
+#line 3321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
break;
-
-/* Line 1464 of yacc.c */
-#line 3356 "ntp_parser.c"
+#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
default: break;
}
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
@@ -3363,7 +3343,7 @@ yyreduce:
*++yyvsp = yyval;
- /* Now `shift' the result of the reduction. Determine what state
+ /* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -3378,48 +3358,51 @@ yyreduce:
goto yynewstate;
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
+ yyerror (ip_file, YY_("syntax error"));
#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
{
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (ip_file, yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
}
+# undef YYSYNTAX_ERROR
#endif
}
@@ -3428,20 +3411,20 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, ip_file);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -3460,7 +3443,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- /* Do not reclaim the symbols of the rule which action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -3473,35 +3456,37 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
+ yystos[yystate], yyvsp, ip_file);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@@ -3525,28 +3510,33 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
+ yyerror (ip_file, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- /* Do not reclaim the symbols of the rule which action triggered
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, ip_file);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
+ yystos[*yyssp], yyvsp, ip_file);
YYPOPSTACK (1);
}
#ifndef yyoverflow
@@ -3557,18 +3547,14 @@ yyreturn:
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ return yyresult;
}
+#line 1579 "ntp_parser.y" /* yacc.c:1906 */
-
-/* Line 1684 of yacc.c */
-#line 1222 "ntp_parser.y"
-
-
-void
+void
yyerror(
+ struct FILE_INFO *ip_file,
const char *msg
)
{
@@ -3600,9 +3586,8 @@ yyerror(
/*
- * token_name - Convert T_ token integers to text.
- * Example: token_name(T_Server) returns "T_Server".
- * see also keyword(T_Server) which returns "server".
+ * token_name - convert T_ token integers to text
+ * example: token_name(T_Server) returns "T_Server"
*/
const char *
token_name(
@@ -3613,18 +3598,15 @@ token_name(
}
-/* Initial Testing function -- ignore
+/* Initial Testing function -- ignore */
+#if 0
int main(int argc, char *argv[])
{
ip_file = FOPEN(argv[1], "r");
- if (!ip_file) {
+ if (!ip_file)
fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);
- }
- key_scanner = create_keyword_scanner(keyword_list);
- print_keyword_scanner(key_scanner, 0);
yyparse();
return 0;
}
-*/
-
+#endif
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index 427f2237091f..c8301572244b 100644
--- a/ntpd/ntp_parser.h
+++ b/ntpd/ntp_parser.h
@@ -1,21 +1,19 @@
+/* A Bison parser, made by GNU Bison 3.0.2. */
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- 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 3 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, see <http://www.gnu.org/licenses/>. */
@@ -28,380 +26,434 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+#ifndef YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
+# define YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
-/* Tokens. */
+/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_Age = 258,
- T_All = 259,
- T_Allan = 260,
- T_Auth = 261,
- T_Autokey = 262,
- T_Automax = 263,
- T_Average = 264,
- T_Bclient = 265,
- T_Beacon = 266,
- T_Bias = 267,
- T_Broadcast = 268,
- T_Broadcastclient = 269,
- T_Broadcastdelay = 270,
- T_Burst = 271,
- T_Calibrate = 272,
- T_Calldelay = 273,
- T_Ceiling = 274,
- T_Clockstats = 275,
- T_Cohort = 276,
- T_ControlKey = 277,
- T_Crypto = 278,
- T_Cryptostats = 279,
- T_Day = 280,
- T_Default = 281,
- T_Digest = 282,
- T_Disable = 283,
- T_Discard = 284,
- T_Dispersion = 285,
- T_Double = 286,
- T_Driftfile = 287,
- T_Drop = 288,
- T_Ellipsis = 289,
- T_Enable = 290,
- T_End = 291,
- T_False = 292,
- T_File = 293,
- T_Filegen = 294,
- T_Flag1 = 295,
- T_Flag2 = 296,
- T_Flag3 = 297,
- T_Flag4 = 298,
- T_Flake = 299,
- T_Floor = 300,
- T_Freq = 301,
- T_Fudge = 302,
- T_Host = 303,
- T_Huffpuff = 304,
- T_Iburst = 305,
- T_Ident = 306,
- T_Ignore = 307,
- T_Includefile = 308,
- T_Integer = 309,
- T_Interface = 310,
- T_Ipv4 = 311,
- T_Ipv4_flag = 312,
- T_Ipv6 = 313,
- T_Ipv6_flag = 314,
- T_Kernel = 315,
- T_Key = 316,
- T_Keys = 317,
- T_Keysdir = 318,
- T_Kod = 319,
- T_Mssntp = 320,
- T_Leapfile = 321,
- T_Limited = 322,
- T_Link = 323,
- T_Listen = 324,
- T_Logconfig = 325,
- T_Logfile = 326,
- T_Loopstats = 327,
- T_Lowpriotrap = 328,
- T_Manycastclient = 329,
- T_Manycastserver = 330,
- T_Mask = 331,
- T_Maxclock = 332,
- T_Maxdist = 333,
- T_Maxpoll = 334,
- T_Minclock = 335,
- T_Mindist = 336,
- T_Minimum = 337,
- T_Minpoll = 338,
- T_Minsane = 339,
- T_Mode = 340,
- T_Monitor = 341,
- T_Month = 342,
- T_Multicastclient = 343,
- T_Nic = 344,
- T_Nolink = 345,
- T_Nomodify = 346,
- T_None = 347,
- T_Nopeer = 348,
- T_Noquery = 349,
- T_Noselect = 350,
- T_Noserve = 351,
- T_Notrap = 352,
- T_Notrust = 353,
- T_Ntp = 354,
- T_Ntpport = 355,
- T_NtpSignDsocket = 356,
- T_Orphan = 357,
- T_Panic = 358,
- T_Peer = 359,
- T_Peerstats = 360,
- T_Phone = 361,
- T_Pid = 362,
- T_Pidfile = 363,
- T_Pool = 364,
- T_Port = 365,
- T_Preempt = 366,
- T_Prefer = 367,
- T_Protostats = 368,
- T_Pw = 369,
- T_Qos = 370,
- T_Randfile = 371,
- T_Rawstats = 372,
- T_Refid = 373,
- T_Requestkey = 374,
- T_Restrict = 375,
- T_Revoke = 376,
- T_Saveconfigdir = 377,
- T_Server = 378,
- T_Setvar = 379,
- T_Sign = 380,
- T_Statistics = 381,
- T_Stats = 382,
- T_Statsdir = 383,
- T_Step = 384,
- T_Stepout = 385,
- T_Stratum = 386,
- T_String = 387,
- T_Sysstats = 388,
- T_Tick = 389,
- T_Time1 = 390,
- T_Time2 = 391,
- T_Timingstats = 392,
- T_Tinker = 393,
- T_Tos = 394,
- T_Trap = 395,
- T_True = 396,
- T_Trustedkey = 397,
- T_Ttl = 398,
- T_Type = 399,
- T_Unconfig = 400,
- T_Unpeer = 401,
- T_Version = 402,
- T_WanderThreshold = 403,
- T_Week = 404,
- T_Wildcard = 405,
- T_Xleave = 406,
- T_Year = 407,
- T_Flag = 408,
- T_Void = 409,
- T_EOC = 410,
- T_Simulate = 411,
- T_Beep_Delay = 412,
- T_Sim_Duration = 413,
- T_Server_Offset = 414,
- T_Duration = 415,
- T_Freq_Offset = 416,
- T_Wander = 417,
- T_Jitter = 418,
- T_Prop_Delay = 419,
- T_Proc_Delay = 420
- };
+ enum yytokentype
+ {
+ T_Abbrev = 258,
+ T_Age = 259,
+ T_All = 260,
+ T_Allan = 261,
+ T_Allpeers = 262,
+ T_Auth = 263,
+ T_Autokey = 264,
+ T_Automax = 265,
+ T_Average = 266,
+ T_Bclient = 267,
+ T_Beacon = 268,
+ T_Broadcast = 269,
+ T_Broadcastclient = 270,
+ T_Broadcastdelay = 271,
+ T_Burst = 272,
+ T_Calibrate = 273,
+ T_Ceiling = 274,
+ T_Clockstats = 275,
+ T_Cohort = 276,
+ T_ControlKey = 277,
+ T_Crypto = 278,
+ T_Cryptostats = 279,
+ T_Ctl = 280,
+ T_Day = 281,
+ T_Default = 282,
+ T_Digest = 283,
+ T_Disable = 284,
+ T_Discard = 285,
+ T_Dispersion = 286,
+ T_Double = 287,
+ T_Driftfile = 288,
+ T_Drop = 289,
+ T_Ellipsis = 290,
+ T_Enable = 291,
+ T_End = 292,
+ T_False = 293,
+ T_File = 294,
+ T_Filegen = 295,
+ T_Filenum = 296,
+ T_Flag1 = 297,
+ T_Flag2 = 298,
+ T_Flag3 = 299,
+ T_Flag4 = 300,
+ T_Flake = 301,
+ T_Floor = 302,
+ T_Freq = 303,
+ T_Fudge = 304,
+ T_Host = 305,
+ T_Huffpuff = 306,
+ T_Iburst = 307,
+ T_Ident = 308,
+ T_Ignore = 309,
+ T_Incalloc = 310,
+ T_Incmem = 311,
+ T_Initalloc = 312,
+ T_Initmem = 313,
+ T_Includefile = 314,
+ T_Integer = 315,
+ T_Interface = 316,
+ T_Intrange = 317,
+ T_Io = 318,
+ T_Ipv4 = 319,
+ T_Ipv4_flag = 320,
+ T_Ipv6 = 321,
+ T_Ipv6_flag = 322,
+ T_Kernel = 323,
+ T_Key = 324,
+ T_Keys = 325,
+ T_Keysdir = 326,
+ T_Kod = 327,
+ T_Mssntp = 328,
+ T_Leapfile = 329,
+ T_Limited = 330,
+ T_Link = 331,
+ T_Listen = 332,
+ T_Logconfig = 333,
+ T_Logfile = 334,
+ T_Loopstats = 335,
+ T_Lowpriotrap = 336,
+ T_Manycastclient = 337,
+ T_Manycastserver = 338,
+ T_Mask = 339,
+ T_Maxage = 340,
+ T_Maxclock = 341,
+ T_Maxdepth = 342,
+ T_Maxdist = 343,
+ T_Maxmem = 344,
+ T_Maxpoll = 345,
+ T_Mem = 346,
+ T_Memlock = 347,
+ T_Minclock = 348,
+ T_Mindepth = 349,
+ T_Mindist = 350,
+ T_Minimum = 351,
+ T_Minpoll = 352,
+ T_Minsane = 353,
+ T_Mode = 354,
+ T_Mode7 = 355,
+ T_Monitor = 356,
+ T_Month = 357,
+ T_Mru = 358,
+ T_Multicastclient = 359,
+ T_Nic = 360,
+ T_Nolink = 361,
+ T_Nomodify = 362,
+ T_Nomrulist = 363,
+ T_None = 364,
+ T_Nonvolatile = 365,
+ T_Nopeer = 366,
+ T_Noquery = 367,
+ T_Noselect = 368,
+ T_Noserve = 369,
+ T_Notrap = 370,
+ T_Notrust = 371,
+ T_Ntp = 372,
+ T_Ntpport = 373,
+ T_NtpSignDsocket = 374,
+ T_Orphan = 375,
+ T_Orphanwait = 376,
+ T_Panic = 377,
+ T_Peer = 378,
+ T_Peerstats = 379,
+ T_Phone = 380,
+ T_Pid = 381,
+ T_Pidfile = 382,
+ T_Pool = 383,
+ T_Port = 384,
+ T_Preempt = 385,
+ T_Prefer = 386,
+ T_Protostats = 387,
+ T_Pw = 388,
+ T_Randfile = 389,
+ T_Rawstats = 390,
+ T_Refid = 391,
+ T_Requestkey = 392,
+ T_Reset = 393,
+ T_Restrict = 394,
+ T_Revoke = 395,
+ T_Rlimit = 396,
+ T_Saveconfigdir = 397,
+ T_Server = 398,
+ T_Setvar = 399,
+ T_Source = 400,
+ T_Stacksize = 401,
+ T_Statistics = 402,
+ T_Stats = 403,
+ T_Statsdir = 404,
+ T_Step = 405,
+ T_Stepout = 406,
+ T_Stratum = 407,
+ T_String = 408,
+ T_Sys = 409,
+ T_Sysstats = 410,
+ T_Tick = 411,
+ T_Time1 = 412,
+ T_Time2 = 413,
+ T_Timer = 414,
+ T_Timingstats = 415,
+ T_Tinker = 416,
+ T_Tos = 417,
+ T_Trap = 418,
+ T_True = 419,
+ T_Trustedkey = 420,
+ T_Ttl = 421,
+ T_Type = 422,
+ T_U_int = 423,
+ T_Unconfig = 424,
+ T_Unpeer = 425,
+ T_Version = 426,
+ T_WanderThreshold = 427,
+ T_Week = 428,
+ T_Wildcard = 429,
+ T_Xleave = 430,
+ T_Year = 431,
+ T_Flag = 432,
+ T_EOC = 433,
+ T_Simulate = 434,
+ T_Beep_Delay = 435,
+ T_Sim_Duration = 436,
+ T_Server_Offset = 437,
+ T_Duration = 438,
+ T_Freq_Offset = 439,
+ T_Wander = 440,
+ T_Jitter = 441,
+ T_Prop_Delay = 442,
+ T_Proc_Delay = 443
+ };
#endif
/* Tokens. */
-#define T_Age 258
-#define T_All 259
-#define T_Allan 260
-#define T_Auth 261
-#define T_Autokey 262
-#define T_Automax 263
-#define T_Average 264
-#define T_Bclient 265
-#define T_Beacon 266
-#define T_Bias 267
-#define T_Broadcast 268
-#define T_Broadcastclient 269
-#define T_Broadcastdelay 270
-#define T_Burst 271
-#define T_Calibrate 272
-#define T_Calldelay 273
+#define T_Abbrev 258
+#define T_Age 259
+#define T_All 260
+#define T_Allan 261
+#define T_Allpeers 262
+#define T_Auth 263
+#define T_Autokey 264
+#define T_Automax 265
+#define T_Average 266
+#define T_Bclient 267
+#define T_Beacon 268
+#define T_Broadcast 269
+#define T_Broadcastclient 270
+#define T_Broadcastdelay 271
+#define T_Burst 272
+#define T_Calibrate 273
#define T_Ceiling 274
#define T_Clockstats 275
#define T_Cohort 276
#define T_ControlKey 277
#define T_Crypto 278
#define T_Cryptostats 279
-#define T_Day 280
-#define T_Default 281
-#define T_Digest 282
-#define T_Disable 283
-#define T_Discard 284
-#define T_Dispersion 285
-#define T_Double 286
-#define T_Driftfile 287
-#define T_Drop 288
-#define T_Ellipsis 289
-#define T_Enable 290
-#define T_End 291
-#define T_False 292
-#define T_File 293
-#define T_Filegen 294
-#define T_Flag1 295
-#define T_Flag2 296
-#define T_Flag3 297
-#define T_Flag4 298
-#define T_Flake 299
-#define T_Floor 300
-#define T_Freq 301
-#define T_Fudge 302
-#define T_Host 303
-#define T_Huffpuff 304
-#define T_Iburst 305
-#define T_Ident 306
-#define T_Ignore 307
-#define T_Includefile 308
-#define T_Integer 309
-#define T_Interface 310
-#define T_Ipv4 311
-#define T_Ipv4_flag 312
-#define T_Ipv6 313
-#define T_Ipv6_flag 314
-#define T_Kernel 315
-#define T_Key 316
-#define T_Keys 317
-#define T_Keysdir 318
-#define T_Kod 319
-#define T_Mssntp 320
-#define T_Leapfile 321
-#define T_Limited 322
-#define T_Link 323
-#define T_Listen 324
-#define T_Logconfig 325
-#define T_Logfile 326
-#define T_Loopstats 327
-#define T_Lowpriotrap 328
-#define T_Manycastclient 329
-#define T_Manycastserver 330
-#define T_Mask 331
-#define T_Maxclock 332
-#define T_Maxdist 333
-#define T_Maxpoll 334
-#define T_Minclock 335
-#define T_Mindist 336
-#define T_Minimum 337
-#define T_Minpoll 338
-#define T_Minsane 339
-#define T_Mode 340
-#define T_Monitor 341
-#define T_Month 342
-#define T_Multicastclient 343
-#define T_Nic 344
-#define T_Nolink 345
-#define T_Nomodify 346
-#define T_None 347
-#define T_Nopeer 348
-#define T_Noquery 349
-#define T_Noselect 350
-#define T_Noserve 351
-#define T_Notrap 352
-#define T_Notrust 353
-#define T_Ntp 354
-#define T_Ntpport 355
-#define T_NtpSignDsocket 356
-#define T_Orphan 357
-#define T_Panic 358
-#define T_Peer 359
-#define T_Peerstats 360
-#define T_Phone 361
-#define T_Pid 362
-#define T_Pidfile 363
-#define T_Pool 364
-#define T_Port 365
-#define T_Preempt 366
-#define T_Prefer 367
-#define T_Protostats 368
-#define T_Pw 369
-#define T_Qos 370
-#define T_Randfile 371
-#define T_Rawstats 372
-#define T_Refid 373
-#define T_Requestkey 374
-#define T_Restrict 375
-#define T_Revoke 376
-#define T_Saveconfigdir 377
-#define T_Server 378
-#define T_Setvar 379
-#define T_Sign 380
-#define T_Statistics 381
-#define T_Stats 382
-#define T_Statsdir 383
-#define T_Step 384
-#define T_Stepout 385
-#define T_Stratum 386
-#define T_String 387
-#define T_Sysstats 388
-#define T_Tick 389
-#define T_Time1 390
-#define T_Time2 391
-#define T_Timingstats 392
-#define T_Tinker 393
-#define T_Tos 394
-#define T_Trap 395
-#define T_True 396
-#define T_Trustedkey 397
-#define T_Ttl 398
-#define T_Type 399
-#define T_Unconfig 400
-#define T_Unpeer 401
-#define T_Version 402
-#define T_WanderThreshold 403
-#define T_Week 404
-#define T_Wildcard 405
-#define T_Xleave 406
-#define T_Year 407
-#define T_Flag 408
-#define T_Void 409
-#define T_EOC 410
-#define T_Simulate 411
-#define T_Beep_Delay 412
-#define T_Sim_Duration 413
-#define T_Server_Offset 414
-#define T_Duration 415
-#define T_Freq_Offset 416
-#define T_Wander 417
-#define T_Jitter 418
-#define T_Prop_Delay 419
-#define T_Proc_Delay 420
-
-
-
+#define T_Ctl 280
+#define T_Day 281
+#define T_Default 282
+#define T_Digest 283
+#define T_Disable 284
+#define T_Discard 285
+#define T_Dispersion 286
+#define T_Double 287
+#define T_Driftfile 288
+#define T_Drop 289
+#define T_Ellipsis 290
+#define T_Enable 291
+#define T_End 292
+#define T_False 293
+#define T_File 294
+#define T_Filegen 295
+#define T_Filenum 296
+#define T_Flag1 297
+#define T_Flag2 298
+#define T_Flag3 299
+#define T_Flag4 300
+#define T_Flake 301
+#define T_Floor 302
+#define T_Freq 303
+#define T_Fudge 304
+#define T_Host 305
+#define T_Huffpuff 306
+#define T_Iburst 307
+#define T_Ident 308
+#define T_Ignore 309
+#define T_Incalloc 310
+#define T_Incmem 311
+#define T_Initalloc 312
+#define T_Initmem 313
+#define T_Includefile 314
+#define T_Integer 315
+#define T_Interface 316
+#define T_Intrange 317
+#define T_Io 318
+#define T_Ipv4 319
+#define T_Ipv4_flag 320
+#define T_Ipv6 321
+#define T_Ipv6_flag 322
+#define T_Kernel 323
+#define T_Key 324
+#define T_Keys 325
+#define T_Keysdir 326
+#define T_Kod 327
+#define T_Mssntp 328
+#define T_Leapfile 329
+#define T_Limited 330
+#define T_Link 331
+#define T_Listen 332
+#define T_Logconfig 333
+#define T_Logfile 334
+#define T_Loopstats 335
+#define T_Lowpriotrap 336
+#define T_Manycastclient 337
+#define T_Manycastserver 338
+#define T_Mask 339
+#define T_Maxage 340
+#define T_Maxclock 341
+#define T_Maxdepth 342
+#define T_Maxdist 343
+#define T_Maxmem 344
+#define T_Maxpoll 345
+#define T_Mem 346
+#define T_Memlock 347
+#define T_Minclock 348
+#define T_Mindepth 349
+#define T_Mindist 350
+#define T_Minimum 351
+#define T_Minpoll 352
+#define T_Minsane 353
+#define T_Mode 354
+#define T_Mode7 355
+#define T_Monitor 356
+#define T_Month 357
+#define T_Mru 358
+#define T_Multicastclient 359
+#define T_Nic 360
+#define T_Nolink 361
+#define T_Nomodify 362
+#define T_Nomrulist 363
+#define T_None 364
+#define T_Nonvolatile 365
+#define T_Nopeer 366
+#define T_Noquery 367
+#define T_Noselect 368
+#define T_Noserve 369
+#define T_Notrap 370
+#define T_Notrust 371
+#define T_Ntp 372
+#define T_Ntpport 373
+#define T_NtpSignDsocket 374
+#define T_Orphan 375
+#define T_Orphanwait 376
+#define T_Panic 377
+#define T_Peer 378
+#define T_Peerstats 379
+#define T_Phone 380
+#define T_Pid 381
+#define T_Pidfile 382
+#define T_Pool 383
+#define T_Port 384
+#define T_Preempt 385
+#define T_Prefer 386
+#define T_Protostats 387
+#define T_Pw 388
+#define T_Randfile 389
+#define T_Rawstats 390
+#define T_Refid 391
+#define T_Requestkey 392
+#define T_Reset 393
+#define T_Restrict 394
+#define T_Revoke 395
+#define T_Rlimit 396
+#define T_Saveconfigdir 397
+#define T_Server 398
+#define T_Setvar 399
+#define T_Source 400
+#define T_Stacksize 401
+#define T_Statistics 402
+#define T_Stats 403
+#define T_Statsdir 404
+#define T_Step 405
+#define T_Stepout 406
+#define T_Stratum 407
+#define T_String 408
+#define T_Sys 409
+#define T_Sysstats 410
+#define T_Tick 411
+#define T_Time1 412
+#define T_Time2 413
+#define T_Timer 414
+#define T_Timingstats 415
+#define T_Tinker 416
+#define T_Tos 417
+#define T_Trap 418
+#define T_True 419
+#define T_Trustedkey 420
+#define T_Ttl 421
+#define T_Type 422
+#define T_U_int 423
+#define T_Unconfig 424
+#define T_Unpeer 425
+#define T_Version 426
+#define T_WanderThreshold 427
+#define T_Week 428
+#define T_Wildcard 429
+#define T_Xleave 430
+#define T_Year 431
+#define T_Flag 432
+#define T_EOC 433
+#define T_Simulate 434
+#define T_Beep_Delay 435
+#define T_Sim_Duration 436
+#define T_Server_Offset 437
+#define T_Duration 438
+#define T_Freq_Offset 439
+#define T_Wander 440
+#define T_Jitter 441
+#define T_Prop_Delay 442
+#define T_Proc_Delay 443
+/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+typedef union YYSTYPE YYSTYPE;
+union YYSTYPE
{
+#line 54 "ntp_parser.y" /* yacc.c:1909 */
-/* Line 1676 of yacc.c */
-#line 50 "ntp_parser.y"
-
- char *String;
- double Double;
- int Integer;
- void *VoidPtr;
- queue *Queue;
- struct attr_val *Attr_val;
- struct address_node *Address_node;
- struct setvar_node *Set_var;
-
- /* Simulation types */
- server_info *Sim_server;
- script_info *Sim_script;
+ char * String;
+ double Double;
+ int Integer;
+ unsigned U_int;
+ gen_fifo * Generic_fifo;
+ attr_val * Attr_val;
+ attr_val_fifo * Attr_val_fifo;
+ int_fifo * Int_fifo;
+ string_fifo * String_fifo;
+ address_node * Address_node;
+ address_fifo * Address_fifo;
+ setvar_node * Set_var;
+ server_info * Sim_server;
+ server_info_fifo * Sim_server_fifo;
+ script_info * Sim_script;
+ script_info_fifo * Sim_script_fifo;
-
-
-/* Line 1676 of yacc.c */
-#line 399 "ntp_parser.h"
-} YYSTYPE;
+#line 449 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
+};
# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
+
extern YYSTYPE yylval;
+int yyparse (struct FILE_INFO *ip_file);
+#endif /* !YY_YY_______NTPD_NTP_PARSER_H_INCLUDED */
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
index a3e7a075c1d4..e75bffe4f580 100644
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -8,6 +8,9 @@
* Copyright (c) 2006
*/
+%parse-param {struct FILE_INFO *ip_file}
+%lex-param {struct FILE_INFO *ip_file}
+
%{
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -18,7 +21,6 @@
#include "ntp_machine.h"
#include "ntp_stdlib.h"
#include "ntp_filegen.h"
- #include "ntp_data_structures.h"
#include "ntp_scanner.h"
#include "ntp_config.h"
#include "ntp_crypto.h"
@@ -30,15 +32,17 @@
for both the simulator and the daemon
*/
-
- struct FILE_INFO *ip_file; /* Pointer to the configuration file stream */
-
#define YYMALLOC emalloc
#define YYFREE free
#define YYERROR_VERBOSE
- #define YYMAXDEPTH 1000 /* stop the madness sooner */
- void yyerror(const char *msg);
- extern int input_from_file; /* 0=input from ntpq :config */
+ #define YYMAXDEPTH 1000 /* stop the madness sooner */
+ void yyerror(struct FILE_INFO *ip_file, const char *msg);
+
+ #ifdef SIM
+ # define ONLY_SIM(a) (a)
+ #else
+ # define ONLY_SIM(a) NULL
+ #endif
%}
/*
@@ -48,50 +52,55 @@
%token-table
%union {
- char *String;
- double Double;
- int Integer;
- void *VoidPtr;
- queue *Queue;
- struct attr_val *Attr_val;
- struct address_node *Address_node;
- struct setvar_node *Set_var;
-
- /* Simulation types */
- server_info *Sim_server;
- script_info *Sim_script;
+ char * String;
+ double Double;
+ int Integer;
+ unsigned U_int;
+ gen_fifo * Generic_fifo;
+ attr_val * Attr_val;
+ attr_val_fifo * Attr_val_fifo;
+ int_fifo * Int_fifo;
+ string_fifo * String_fifo;
+ address_node * Address_node;
+ address_fifo * Address_fifo;
+ setvar_node * Set_var;
+ server_info * Sim_server;
+ server_info_fifo * Sim_server_fifo;
+ script_info * Sim_script;
+ script_info_fifo * Sim_script_fifo;
}
/* TERMINALS (do not appear left of colon) */
+%token <Integer> T_Abbrev
%token <Integer> T_Age
%token <Integer> T_All
%token <Integer> T_Allan
+%token <Integer> T_Allpeers
%token <Integer> T_Auth
%token <Integer> T_Autokey
%token <Integer> T_Automax
%token <Integer> T_Average
%token <Integer> T_Bclient
%token <Integer> T_Beacon
-%token <Integer> T_Bias
%token <Integer> T_Broadcast
%token <Integer> T_Broadcastclient
%token <Integer> T_Broadcastdelay
%token <Integer> T_Burst
%token <Integer> T_Calibrate
-%token <Integer> T_Calldelay
%token <Integer> T_Ceiling
%token <Integer> T_Clockstats
%token <Integer> T_Cohort
%token <Integer> T_ControlKey
%token <Integer> T_Crypto
%token <Integer> T_Cryptostats
+%token <Integer> T_Ctl
%token <Integer> T_Day
%token <Integer> T_Default
%token <Integer> T_Digest
%token <Integer> T_Disable
%token <Integer> T_Discard
%token <Integer> T_Dispersion
-%token <Double> T_Double
+%token <Double> T_Double /* not a token */
%token <Integer> T_Driftfile
%token <Integer> T_Drop
%token <Integer> T_Ellipsis /* "..." not "ellipsis" */
@@ -100,6 +109,7 @@
%token <Integer> T_False
%token <Integer> T_File
%token <Integer> T_Filegen
+%token <Integer> T_Filenum
%token <Integer> T_Flag1
%token <Integer> T_Flag2
%token <Integer> T_Flag3
@@ -113,9 +123,15 @@
%token <Integer> T_Iburst
%token <Integer> T_Ident
%token <Integer> T_Ignore
+%token <Integer> T_Incalloc
+%token <Integer> T_Incmem
+%token <Integer> T_Initalloc
+%token <Integer> T_Initmem
%token <Integer> T_Includefile
-%token <Integer> T_Integer
+%token <Integer> T_Integer /* not a token */
%token <Integer> T_Interface
+%token <Integer> T_Intrange /* not a token */
+%token <Integer> T_Io
%token <Integer> T_Ipv4
%token <Integer> T_Ipv4_flag
%token <Integer> T_Ipv6
@@ -137,22 +153,32 @@
%token <Integer> T_Manycastclient
%token <Integer> T_Manycastserver
%token <Integer> T_Mask
+%token <Integer> T_Maxage
%token <Integer> T_Maxclock
+%token <Integer> T_Maxdepth
%token <Integer> T_Maxdist
+%token <Integer> T_Maxmem
%token <Integer> T_Maxpoll
+%token <Integer> T_Mem
+%token <Integer> T_Memlock
%token <Integer> T_Minclock
+%token <Integer> T_Mindepth
%token <Integer> T_Mindist
%token <Integer> T_Minimum
%token <Integer> T_Minpoll
%token <Integer> T_Minsane
%token <Integer> T_Mode
+%token <Integer> T_Mode7
%token <Integer> T_Monitor
%token <Integer> T_Month
+%token <Integer> T_Mru
%token <Integer> T_Multicastclient
%token <Integer> T_Nic
%token <Integer> T_Nolink
%token <Integer> T_Nomodify
+%token <Integer> T_Nomrulist
%token <Integer> T_None
+%token <Integer> T_Nonvolatile
%token <Integer> T_Nopeer
%token <Integer> T_Noquery
%token <Integer> T_Noselect
@@ -163,6 +189,7 @@
%token <Integer> T_Ntpport
%token <Integer> T_NtpSignDsocket
%token <Integer> T_Orphan
+%token <Integer> T_Orphanwait
%token <Integer> T_Panic
%token <Integer> T_Peer
%token <Integer> T_Peerstats
@@ -175,28 +202,32 @@
%token <Integer> T_Prefer
%token <Integer> T_Protostats
%token <Integer> T_Pw
-%token <Integer> T_Qos
%token <Integer> T_Randfile
%token <Integer> T_Rawstats
%token <Integer> T_Refid
%token <Integer> T_Requestkey
+%token <Integer> T_Reset
%token <Integer> T_Restrict
%token <Integer> T_Revoke
+%token <Integer> T_Rlimit
%token <Integer> T_Saveconfigdir
%token <Integer> T_Server
%token <Integer> T_Setvar
-%token <Integer> T_Sign
+%token <Integer> T_Source
+%token <Integer> T_Stacksize
%token <Integer> T_Statistics
%token <Integer> T_Stats
%token <Integer> T_Statsdir
%token <Integer> T_Step
%token <Integer> T_Stepout
%token <Integer> T_Stratum
-%token <String> T_String
+%token <String> T_String /* not a token */
+%token <Integer> T_Sys
%token <Integer> T_Sysstats
%token <Integer> T_Tick
%token <Integer> T_Time1
%token <Integer> T_Time2
+%token <Integer> T_Timer
%token <Integer> T_Timingstats
%token <Integer> T_Tinker
%token <Integer> T_Tos
@@ -205,6 +236,7 @@
%token <Integer> T_Trustedkey
%token <Integer> T_Ttl
%token <Integer> T_Type
+%token <Integer> T_U_int /* Not a token */
%token <Integer> T_Unconfig
%token <Integer> T_Unpeer
%token <Integer> T_Version
@@ -213,8 +245,7 @@
%token <Integer> T_Wildcard
%token <Integer> T_Xleave
%token <Integer> T_Year
-%token <Integer> T_Flag /* Not an actual token */
-%token <Integer> T_Void /* Not an actual token */
+%token <Integer> T_Flag /* Not a token */
%token <Integer> T_EOC
@@ -234,28 +265,30 @@
/*** NON-TERMINALS ***/
%type <Integer> access_control_flag
-%type <Queue> ac_flag_list
+%type <Int_fifo> ac_flag_list
%type <Address_node> address
%type <Integer> address_fam
-%type <Queue> address_list
+%type <Address_fifo> address_list
%type <Integer> boolean
%type <Integer> client_type
+%type <Integer> counter_set_keyword
+%type <Int_fifo> counter_set_list
%type <Attr_val> crypto_command
-%type <Queue> crypto_command_list
+%type <Attr_val_fifo> crypto_command_list
%type <Integer> crypto_str_keyword
%type <Attr_val> discard_option
%type <Integer> discard_option_keyword
-%type <Queue> discard_option_list
+%type <Attr_val_fifo> discard_option_list
%type <Integer> enable_disable
%type <Attr_val> filegen_option
-%type <Queue> filegen_option_list
+%type <Attr_val_fifo> filegen_option_list
%type <Integer> filegen_type
%type <Attr_val> fudge_factor
%type <Integer> fudge_factor_bool_keyword
%type <Integer> fudge_factor_dbl_keyword
-%type <Queue> fudge_factor_list
-%type <Queue> integer_list
-%type <Queue> integer_list_range
+%type <Attr_val_fifo> fudge_factor_list
+%type <Attr_val_fifo> integer_list
+%type <Attr_val_fifo> integer_list_range
%type <Attr_val> integer_list_range_elt
%type <Attr_val> integer_range
%type <Integer> nic_rule_action
@@ -264,48 +297,60 @@
%type <Address_node> ip_address
%type <Integer> link_nolink
%type <Attr_val> log_config_command
-%type <Queue> log_config_list
+%type <Attr_val_fifo> log_config_list
%type <Integer> misc_cmd_dbl_keyword
%type <Integer> misc_cmd_str_keyword
%type <Integer> misc_cmd_str_lcl_keyword
+%type <Attr_val> mru_option
+%type <Integer> mru_option_keyword
+%type <Attr_val_fifo> mru_option_list
%type <Integer> nic_rule_class
%type <Double> number
%type <Attr_val> option
%type <Attr_val> option_flag
%type <Integer> option_flag_keyword
-%type <Queue> option_list
+%type <Attr_val_fifo> option_list
%type <Attr_val> option_int
%type <Integer> option_int_keyword
+%type <Attr_val> option_str
+%type <Integer> option_str_keyword
+%type <Integer> reset_command
+%type <Integer> rlimit_option_keyword
+%type <Attr_val> rlimit_option
+%type <Attr_val_fifo> rlimit_option_list
%type <Integer> stat
-%type <Queue> stats_list
-%type <Queue> string_list
+%type <Int_fifo> stats_list
+%type <String_fifo> string_list
%type <Attr_val> system_option
%type <Integer> system_option_flag_keyword
-%type <Queue> system_option_list
+%type <Integer> system_option_local_flag_keyword
+%type <Attr_val_fifo> system_option_list
%type <Integer> t_default_or_zero
%type <Integer> tinker_option_keyword
%type <Attr_val> tinker_option
-%type <Queue> tinker_option_list
+%type <Attr_val_fifo> tinker_option_list
%type <Attr_val> tos_option
%type <Integer> tos_option_dbl_keyword
%type <Integer> tos_option_int_keyword
-%type <Queue> tos_option_list
+%type <Attr_val_fifo> tos_option_list
%type <Attr_val> trap_option
-%type <Queue> trap_option_list
+%type <Attr_val_fifo> trap_option_list
%type <Integer> unpeer_keyword
%type <Set_var> variable_assign
/* NTP Simulator non-terminals */
-%type <Queue> sim_init_statement_list
-%type <Attr_val> sim_init_statement
-%type <Queue> sim_server_list
-%type <Sim_server> sim_server
-%type <Double> sim_server_offset
-%type <Address_node> sim_server_name
-%type <Queue> sim_act_list
-%type <Sim_script> sim_act
-%type <Queue> sim_act_stmt_list
-%type <Attr_val> sim_act_stmt
+%type <Attr_val> sim_init_statement
+%type <Attr_val_fifo> sim_init_statement_list
+%type <Integer> sim_init_keyword
+%type <Sim_server_fifo> sim_server_list
+%type <Sim_server> sim_server
+%type <Double> sim_server_offset
+%type <Address_node> sim_server_name
+%type <Sim_script> sim_act
+%type <Sim_script_fifo> sim_act_list
+%type <Integer> sim_act_keyword
+%type <Attr_val_fifo> sim_act_stmt_list
+%type <Attr_val> sim_act_stmt
%%
@@ -344,6 +389,7 @@ command : /* NULL STATEMENT */
| access_control_command
| orphan_mode_command
| fudge_command
+ | rlimit_command
| system_option_command
| tinker_command
| miscellaneous_command
@@ -357,15 +403,10 @@ command : /* NULL STATEMENT */
server_command
: client_type address option_list
{
- struct peer_node *my_node = create_peer_node($1, $2, $3);
- if (my_node)
- enqueue(cfgt.peers, my_node);
- }
- | client_type address
- {
- struct peer_node *my_node = create_peer_node($1, $2, NULL);
- if (my_node)
- enqueue(cfgt.peers, my_node);
+ peer_node *my_node;
+
+ my_node = create_peer_node($1, $2, $3);
+ APPEND_G_FIFO(cfgt.peers, my_node);
}
;
@@ -384,8 +425,8 @@ address
;
ip_address
- : T_String
- { $$ = create_address_node($1, 0); }
+ : T_String
+ { $$ = create_address_node($1, AF_UNSPEC); }
;
address_fam
@@ -396,15 +437,19 @@ address_fam
;
option_list
- : option_list option { $$ = enqueue($1, $2); }
- | option { $$ = enqueue_in_new_queue($1); }
+ : /* empty list */
+ { $$ = NULL; }
+ | option_list option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
;
option
: option_flag
| option_int
- | T_Bias number
- { $$ = create_attr_dval($1, $2); }
+ | option_str
;
option_flag
@@ -426,6 +471,8 @@ option_flag_keyword
option_int
: option_int_keyword T_Integer
{ $$ = create_attr_ival($1, $2); }
+ | option_int_keyword T_U_int
+ { $$ = create_attr_uval($1, $2); }
;
option_int_keyword
@@ -437,6 +484,14 @@ option_int_keyword
| T_Version
;
+option_str
+ : option_str_keyword T_String
+ { $$ = create_attr_sval($1, $2); }
+ ;
+
+option_str_keyword
+ : T_Ident
+ ;
/* unpeer commands
@@ -446,9 +501,11 @@ option_int_keyword
unpeer_command
: unpeer_keyword address
{
- struct unpeer_node *my_node = create_unpeer_node($2);
+ unpeer_node *my_node;
+
+ my_node = create_unpeer_node($2);
if (my_node)
- enqueue(cfgt.unpeers, my_node);
+ APPEND_G_FIFO(cfgt.unpeers, my_node);
}
;
unpeer_keyword
@@ -466,9 +523,9 @@ other_mode_command
: T_Broadcastclient
{ cfgt.broadcastclient = 1; }
| T_Manycastserver address_list
- { append_queue(cfgt.manycastserver, $2); }
+ { CONCAT_G_FIFOS(cfgt.manycastserver, $2); }
| T_Multicastclient address_list
- { append_queue(cfgt.multicastclient, $2); }
+ { CONCAT_G_FIFOS(cfgt.multicastclient, $2); }
;
@@ -479,13 +536,18 @@ other_mode_command
authentication_command
: T_Automax T_Integer
- { enqueue(cfgt.vars, create_attr_ival($1, $2)); }
+ {
+ attr_val *atrv;
+
+ atrv = create_attr_ival($1, $2);
+ APPEND_G_FIFO(cfgt.vars, atrv);
+ }
| T_ControlKey T_Integer
{ cfgt.auth.control_key = $2; }
| T_Crypto crypto_command_list
{
cfgt.auth.cryptosw++;
- append_queue(cfgt.auth.crypto_cmd_list, $2);
+ CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, $2);
}
| T_Keys T_String
{ cfgt.auth.keys = $2; }
@@ -496,20 +558,25 @@ authentication_command
| T_Revoke T_Integer
{ cfgt.auth.revoke = $2; }
| T_Trustedkey integer_list_range
- { cfgt.auth.trusted_key_list = $2; }
+ {
+ cfgt.auth.trusted_key_list = $2;
+
+ // if (!cfgt.auth.trusted_key_list)
+ // cfgt.auth.trusted_key_list = $2;
+ // else
+ // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
+ }
| T_NtpSignDsocket T_String
{ cfgt.auth.ntp_signd_socket = $2; }
;
crypto_command_list
: /* empty list */
- { $$ = create_queue(); }
+ { $$ = NULL; }
| crypto_command_list crypto_command
- {
- if ($2 != NULL)
- $$ = enqueue($1, $2);
- else
- $$ = $1;
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
}
;
@@ -532,7 +599,6 @@ crypto_str_keyword
| T_Ident
| T_Pw
| T_Randfile
- | T_Sign
| T_Digest
;
@@ -543,12 +609,20 @@ crypto_str_keyword
orphan_mode_command
: T_Tos tos_option_list
- { append_queue(cfgt.orphan_cmds,$2); }
+ { CONCAT_G_FIFOS(cfgt.orphan_cmds, $2); }
;
tos_option_list
- : tos_option_list tos_option { $$ = enqueue($1, $2); }
- | tos_option { $$ = enqueue_in_new_queue($1); }
+ : tos_option_list tos_option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | tos_option
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
tos_option
@@ -564,6 +638,7 @@ tos_option_int_keyword
: T_Ceiling
| T_Floor
| T_Orphan
+ | T_Orphanwait
| T_Minsane
| T_Beacon
;
@@ -582,26 +657,36 @@ tos_option_dbl_keyword
monitoring_command
: T_Statistics stats_list
- { append_queue(cfgt.stats_list, $2); }
+ { CONCAT_G_FIFOS(cfgt.stats_list, $2); }
| T_Statsdir T_String
{
if (input_from_file) {
cfgt.stats_dir = $2;
} else {
YYFREE($2);
- yyerror("statsdir remote configuration ignored");
+ yyerror(ip_file, "statsdir remote configuration ignored");
}
}
| T_Filegen stat filegen_option_list
{
- enqueue(cfgt.filegen_opts,
- create_filegen_node($2, $3));
+ filegen_node *fgn;
+
+ fgn = create_filegen_node($2, $3);
+ APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
;
stats_list
- : stats_list stat { $$ = enqueue($1, create_ival($2)); }
- | stat { $$ = enqueue_in_new_queue(create_ival($1)); }
+ : stats_list stat
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, create_int_node($2));
+ }
+ | stat
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, create_int_node($1));
+ }
;
stat
@@ -617,13 +702,11 @@ stat
filegen_option_list
: /* empty list */
- { $$ = create_queue(); }
+ { $$ = NULL; }
| filegen_option_list filegen_option
{
- if ($2 != NULL)
- $$ = enqueue($1, $2);
- else
- $$ = $1;
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
}
;
@@ -635,7 +718,7 @@ filegen_option
} else {
$$ = NULL;
YYFREE($2);
- yyerror("filegen file remote config ignored");
+ yyerror(ip_file, "filegen file remote config ignored");
}
}
| T_Type filegen_type
@@ -644,7 +727,7 @@ filegen_option
$$ = create_attr_ival($1, $2);
} else {
$$ = NULL;
- yyerror("filegen type remote config ignored");
+ yyerror(ip_file, "filegen type remote config ignored");
}
}
| link_nolink
@@ -659,7 +742,7 @@ filegen_option
err = "filegen link remote config ignored";
else
err = "filegen nolink remote config ignored";
- yyerror(err);
+ yyerror(ip_file, err);
}
}
| enable_disable
@@ -694,56 +777,85 @@ filegen_type
access_control_command
: T_Discard discard_option_list
{
- append_queue(cfgt.discard_opts, $2);
+ CONCAT_G_FIFOS(cfgt.discard_opts, $2);
+ }
+ | T_Mru mru_option_list
+ {
+ CONCAT_G_FIFOS(cfgt.mru_opts, $2);
}
| T_Restrict address ac_flag_list
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node($2, NULL, $3, ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node($2, NULL, $3,
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
+ }
+ | T_Restrict ip_address T_Mask ip_address ac_flag_list
+ {
+ restrict_node *rn;
+
+ rn = create_restrict_node($2, $4, $5,
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
| T_Restrict T_Default ac_flag_list
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(NULL, NULL, $3, ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node(NULL, NULL, $3,
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
| T_Restrict T_Ipv4_flag T_Default ac_flag_list
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(
- create_address_node(
- estrdup("0.0.0.0"),
- AF_INET),
- create_address_node(
- estrdup("0.0.0.0"),
- AF_INET),
- $4,
- ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node(
+ create_address_node(
+ estrdup("0.0.0.0"),
+ AF_INET),
+ create_address_node(
+ estrdup("0.0.0.0"),
+ AF_INET),
+ $4,
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
| T_Restrict T_Ipv6_flag T_Default ac_flag_list
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node(
- create_address_node(
- estrdup("::"),
- AF_INET6),
- create_address_node(
- estrdup("::"),
- AF_INET6),
- $4,
- ip_file->line_no));
+ restrict_node *rn;
+
+ rn = create_restrict_node(
+ create_address_node(
+ estrdup("::"),
+ AF_INET6),
+ create_address_node(
+ estrdup("::"),
+ AF_INET6),
+ $4,
+ ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
- | T_Restrict ip_address T_Mask ip_address ac_flag_list
+ | T_Restrict T_Source ac_flag_list
{
- enqueue(cfgt.restrict_opts,
- create_restrict_node($2, $4, $5, ip_file->line_no));
+ restrict_node * rn;
+
+ APPEND_G_FIFO($3, create_int_node($2));
+ rn = create_restrict_node(
+ NULL, NULL, $3, ip_file->line_no);
+ APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
;
ac_flag_list
: /* empty list is allowed */
- { $$ = create_queue(); }
+ { $$ = NULL; }
| ac_flag_list access_control_flag
- { $$ = enqueue($1, create_ival($2)); }
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, create_int_node($2));
+ }
;
access_control_flag
@@ -754,6 +866,7 @@ access_control_flag
| T_Limited
| T_Lowpriotrap
| T_Nomodify
+ | T_Nomrulist
| T_Nopeer
| T_Noquery
| T_Noserve
@@ -765,9 +878,15 @@ access_control_flag
discard_option_list
: discard_option_list discard_option
- { $$ = enqueue($1, $2); }
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
| discard_option
- { $$ = enqueue_in_new_queue($1); }
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
discard_option
@@ -781,6 +900,34 @@ discard_option_keyword
| T_Monitor
;
+mru_option_list
+ : mru_option_list mru_option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | mru_option
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
+ ;
+
+mru_option
+ : mru_option_keyword T_Integer
+ { $$ = create_attr_ival($1, $2); }
+ ;
+
+mru_option_keyword
+ : T_Incalloc
+ | T_Incmem
+ | T_Initalloc
+ | T_Initmem
+ | T_Maxage
+ | T_Maxdepth
+ | T_Maxmem
+ | T_Mindepth
+ ;
/* Fudge Commands
* --------------
@@ -788,14 +935,25 @@ discard_option_keyword
fudge_command
: T_Fudge address fudge_factor_list
- { enqueue(cfgt.fudge, create_addr_opts_node($2, $3)); }
+ {
+ addr_opts_node *aon;
+
+ aon = create_addr_opts_node($2, $3);
+ APPEND_G_FIFO(cfgt.fudge, aon);
+ }
;
fudge_factor_list
: fudge_factor_list fudge_factor
- { enqueue($1, $2); }
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
| fudge_factor
- { $$ = enqueue_in_new_queue($1); }
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
fudge_factor
@@ -805,6 +963,8 @@ fudge_factor
{ $$ = create_attr_ival($1, $2); }
| T_Stratum T_Integer
{ $$ = create_attr_ival($1, $2); }
+ | T_Abbrev T_String
+ { $$ = create_attr_sval($1, $2); }
| T_Refid T_String
{ $$ = create_attr_sval($1, $2); }
;
@@ -821,6 +981,39 @@ fudge_factor_bool_keyword
| T_Flag4
;
+/* rlimit Commands
+ * ---------------
+ */
+
+rlimit_command
+ : T_Rlimit rlimit_option_list
+ { CONCAT_G_FIFOS(cfgt.rlimit, $2); }
+ ;
+
+rlimit_option_list
+ : rlimit_option_list rlimit_option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | rlimit_option
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
+ ;
+
+rlimit_option
+ : rlimit_option_keyword T_Integer
+ { $$ = create_attr_ival($1, $2); }
+ ;
+
+rlimit_option_keyword
+ : T_Memlock
+ | T_Stacksize
+ | T_Filenum
+ ;
+
/* Command for System Options
* --------------------------
@@ -828,38 +1021,39 @@ fudge_factor_bool_keyword
system_option_command
: T_Enable system_option_list
- { append_queue(cfgt.enable_opts, $2); }
+ { CONCAT_G_FIFOS(cfgt.enable_opts, $2); }
| T_Disable system_option_list
- { append_queue(cfgt.disable_opts, $2); }
+ { CONCAT_G_FIFOS(cfgt.disable_opts, $2); }
;
system_option_list
: system_option_list system_option
{
- if ($2 != NULL)
- $$ = enqueue($1, $2);
- else
- $$ = $1;
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
}
| system_option
{
- if ($1 != NULL)
- $$ = enqueue_in_new_queue($1);
- else
- $$ = create_queue();
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
}
;
system_option
: system_option_flag_keyword
{ $$ = create_attr_ival(T_Flag, $1); }
- | T_Stats
+ | system_option_local_flag_keyword
{
if (input_from_file) {
$$ = create_attr_ival(T_Flag, $1);
} else {
+ char err_str[128];
+
$$ = NULL;
- yyerror("enable/disable stats remote config ignored");
+ snprintf(err_str, sizeof(err_str),
+ "enable/disable %s remote configuration ignored",
+ keyword($1));
+ yyerror(ip_file, err_str);
}
}
;
@@ -873,18 +1067,31 @@ system_option_flag_keyword
| T_Ntp
;
+system_option_local_flag_keyword
+ : T_Mode7
+ | T_Stats
+ ;
/* Tinker Commands
* ---------------
*/
tinker_command
- : T_Tinker tinker_option_list { append_queue(cfgt.tinker, $2); }
+ : T_Tinker tinker_option_list
+ { CONCAT_G_FIFOS(cfgt.tinker, $2); }
;
tinker_option_list
- : tinker_option_list tinker_option { $$ = enqueue($1, $2); }
- | tinker_option { $$ = enqueue_in_new_queue($1); }
+ : tinker_option_list tinker_option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | tinker_option
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
tinker_option
@@ -900,6 +1107,7 @@ tinker_option_keyword
| T_Panic
| T_Step
| T_Stepout
+ | T_Tick
;
@@ -909,50 +1117,51 @@ tinker_option_keyword
miscellaneous_command
: interface_command
+ | reset_command
| misc_cmd_dbl_keyword number
{
- struct attr_val *av;
+ attr_val *av;
av = create_attr_dval($1, $2);
- enqueue(cfgt.vars, av);
+ APPEND_G_FIFO(cfgt.vars, av);
}
| misc_cmd_str_keyword T_String
{
- struct attr_val *av;
+ attr_val *av;
av = create_attr_sval($1, $2);
- enqueue(cfgt.vars, av);
+ APPEND_G_FIFO(cfgt.vars, av);
}
| misc_cmd_str_lcl_keyword T_String
{
char error_text[64];
- struct attr_val *av;
+ attr_val *av;
if (input_from_file) {
av = create_attr_sval($1, $2);
- enqueue(cfgt.vars, av);
+ APPEND_G_FIFO(cfgt.vars, av);
} else {
YYFREE($2);
snprintf(error_text, sizeof(error_text),
"%s remote config ignored",
keyword($1));
- yyerror(error_text);
+ yyerror(ip_file, error_text);
}
}
| T_Includefile T_String command
{
if (!input_from_file) {
- yyerror("remote includefile ignored");
+ yyerror(ip_file, "remote includefile ignored");
break;
}
if (curr_include_level >= MAXINCLUDELEVEL) {
fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
- msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.\n");
+ msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
} else {
fp[curr_include_level + 1] = F_OPEN(FindConfig($2), "r");
if (fp[curr_include_level + 1] == NULL) {
fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig($2));
- msyslog(LOG_ERR, "getconfig: Couldn't open <%s>\n", FindConfig($2));
+ msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", FindConfig($2));
} else {
ip_file = fp[++curr_include_level];
}
@@ -963,33 +1172,35 @@ miscellaneous_command
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
}
- | T_Calldelay T_Integer
- { enqueue(cfgt.vars, create_attr_ival($1, $2)); }
| T_Driftfile drift_parm
- { /* Null action, possibly all null parms */ }
+ { /* see drift_parm below for actions */ }
| T_Logconfig log_config_list
- { append_queue(cfgt.logconfig, $2); }
+ { CONCAT_G_FIFOS(cfgt.logconfig, $2); }
| T_Phone string_list
- { append_queue(cfgt.phone, $2); }
+ { CONCAT_G_FIFOS(cfgt.phone, $2); }
| T_Setvar variable_assign
- { enqueue(cfgt.setvar, $2); }
- | T_Trap ip_address
- { enqueue(cfgt.trap, create_addr_opts_node($2, NULL)); }
+ { APPEND_G_FIFO(cfgt.setvar, $2); }
| T_Trap ip_address trap_option_list
- { enqueue(cfgt.trap, create_addr_opts_node($2, $3)); }
+ {
+ addr_opts_node *aon;
+
+ aon = create_addr_opts_node($2, $3);
+ APPEND_G_FIFO(cfgt.trap, aon);
+ }
| T_Ttl integer_list
- { append_queue(cfgt.ttl, $2); }
+ { CONCAT_G_FIFOS(cfgt.ttl, $2); }
;
misc_cmd_dbl_keyword
: T_Broadcastdelay
+ | T_Nonvolatile
| T_Tick
;
misc_cmd_str_keyword
- : T_Leapfile
+ : T_Ident
+ | T_Leapfile
| T_Pidfile
- | T_Qos
;
misc_cmd_str_lcl_keyword
@@ -999,12 +1210,28 @@ misc_cmd_str_lcl_keyword
drift_parm
: T_String
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, $1)); }
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, $1);
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
| T_String T_Double
- { enqueue(cfgt.vars, create_attr_dval(T_WanderThreshold, $2));
- enqueue(cfgt.vars, create_attr_sval(T_Driftfile, $1)); }
- | /* Null driftfile, indicated by null string "\0" */
- { enqueue(cfgt.vars, create_attr_sval(T_Driftfile, "\0")); }
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, $1);
+ APPEND_G_FIFO(cfgt.vars, av);
+ av = create_attr_dval(T_WanderThreshold, $2);
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
+ | /* Null driftfile, indicated by empty string "" */
+ {
+ attr_val *av;
+
+ av = create_attr_sval(T_Driftfile, "");
+ APPEND_G_FIFO(cfgt.vars, av);
+ }
;
variable_assign
@@ -1015,36 +1242,63 @@ variable_assign
t_default_or_zero
: T_Default
| /* empty, no "default" modifier */
- { $$ = 0; }
+ { $$ = 0; }
;
trap_option_list
- : trap_option_list trap_option
- { $$ = enqueue($1, $2); }
- | trap_option { $$ = enqueue_in_new_queue($1); }
+ : /* empty list */
+ { $$ = NULL; }
+ | trap_option_list trap_option
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
;
trap_option
- : T_Port T_Integer { $$ = create_attr_ival($1, $2); }
- | T_Interface ip_address { $$ = create_attr_pval($1, $2); }
+ : T_Port T_Integer
+ { $$ = create_attr_ival($1, $2); }
+ | T_Interface ip_address
+ {
+ $$ = create_attr_sval($1, estrdup($2->address));
+ destroy_address_node($2);
+ }
;
log_config_list
- : log_config_list log_config_command { $$ = enqueue($1, $2); }
- | log_config_command { $$ = enqueue_in_new_queue($1); }
+ : log_config_list log_config_command
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | log_config_command
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
log_config_command
: T_String
{
- char prefix = $1[0];
- char *type = $1 + 1;
+ char prefix;
+ char * type;
- if (prefix != '+' && prefix != '-' && prefix != '=') {
- yyerror("Logconfig prefix is not '+', '-' or '='\n");
- }
- else
- $$ = create_attr_sval(prefix, estrdup(type));
+ switch ($1[0]) {
+
+ case '+':
+ case '-':
+ case '=':
+ prefix = $1[0];
+ type = $1 + 1;
+ break;
+
+ default:
+ prefix = '=';
+ type = $1;
+ }
+
+ $$ = create_attr_sval(prefix, estrdup(type));
YYFREE($1);
}
;
@@ -1052,13 +1306,17 @@ log_config_command
interface_command
: interface_nic nic_rule_action nic_rule_class
{
- enqueue(cfgt.nic_rules,
- create_nic_rule_node($3, NULL, $2));
+ nic_rule_node *nrn;
+
+ nrn = create_nic_rule_node($3, NULL, $2);
+ APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
| interface_nic nic_rule_action T_String
{
- enqueue(cfgt.nic_rules,
- create_nic_rule_node(0, $3, $2));
+ nic_rule_node *nrn;
+
+ nrn = create_nic_rule_node(0, $3, $2);
+ APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
;
@@ -1080,6 +1338,34 @@ nic_rule_action
| T_Drop
;
+reset_command
+ : T_Reset counter_set_list
+ { CONCAT_G_FIFOS(cfgt.reset_counters, $2); }
+ ;
+
+counter_set_list
+ : counter_set_list counter_set_keyword
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, create_int_node($2));
+ }
+ | counter_set_keyword
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, create_int_node($1));
+ }
+ ;
+
+counter_set_keyword
+ : T_Allpeers
+ | T_Auth
+ | T_Ctl
+ | T_Io
+ | T_Mem
+ | T_Sys
+ | T_Timer
+ ;
+
/* Miscellaneous Rules
@@ -1087,54 +1373,84 @@ nic_rule_action
*/
integer_list
- : integer_list T_Integer { $$ = enqueue($1, create_ival($2)); }
- | T_Integer { $$ = enqueue_in_new_queue(create_ival($1)); }
+ : integer_list T_Integer
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, create_int_node($2));
+ }
+ | T_Integer
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, create_int_node($1));
+ }
;
integer_list_range
: integer_list_range integer_list_range_elt
- { $$ = enqueue($1, $2); }
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
| integer_list_range_elt
- { $$ = enqueue_in_new_queue($1); }
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
integer_list_range_elt
: T_Integer
{ $$ = create_attr_ival('i', $1); }
- | integer_range /* default of $$ = $1 is good */
+ | integer_range
;
-integer_range /* limited to unsigned shorts */
+integer_range
: '(' T_Integer T_Ellipsis T_Integer ')'
- { $$ = create_attr_shorts('-', $2, $4); }
+ { $$ = create_attr_rangeval('-', $2, $4); }
;
string_list
- : string_list T_String { $$ = enqueue($1, create_pval($2)); }
- | T_String { $$ = enqueue_in_new_queue(create_pval($1)); }
+ : string_list T_String
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, create_string_node($2));
+ }
+ | T_String
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, create_string_node($1));
+ }
;
address_list
- : address_list address { $$ = enqueue($1, $2); }
- | address { $$ = enqueue_in_new_queue($1); }
+ : address_list address
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | address
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
boolean
: T_Integer
{
if ($1 != 0 && $1 != 1) {
- yyerror("Integer value is not boolean (0 or 1). Assuming 1");
+ yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
$$ = 1;
} else {
$$ = $1;
}
}
- | T_True { $$ = 1; }
- | T_False { $$ = 0; }
+ | T_True { $$ = 1; }
+ | T_False { $$ = 0; }
;
number
- : T_Integer { $$ = (double)$1; }
+ : T_Integer { $$ = (double)$1; }
| T_Double
;
@@ -1146,9 +1462,12 @@ number
simulate_command
: sim_conf_start '{' sim_init_statement_list sim_server_list '}'
{
- cfgt.sim_details = create_sim_node($3, $4);
+ sim_node *sn;
+
+ sn = create_sim_node($3, $4);
+ APPEND_G_FIFO(cfgt.sim_details, sn);
- /* Reset the old_config_style variable */
+ /* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
;
@@ -1163,66 +1482,105 @@ sim_conf_start
;
sim_init_statement_list
- : sim_init_statement_list sim_init_statement T_EOC { $$ = enqueue($1, $2); }
- | sim_init_statement T_EOC { $$ = enqueue_in_new_queue($1); }
+ : sim_init_statement_list sim_init_statement T_EOC
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | sim_init_statement T_EOC
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
sim_init_statement
- : T_Beep_Delay '=' number { $$ = create_attr_dval($1, $3); }
- | T_Sim_Duration '=' number { $$ = create_attr_dval($1, $3); }
+ : sim_init_keyword '=' number
+ { $$ = create_attr_dval($1, $3); }
+ ;
+
+sim_init_keyword
+ : T_Beep_Delay
+ | T_Sim_Duration
;
sim_server_list
- : sim_server_list sim_server { $$ = enqueue($1, $2); }
- | sim_server { $$ = enqueue_in_new_queue($1); }
+ : sim_server_list sim_server
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | sim_server
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
sim_server
: sim_server_name '{' sim_server_offset sim_act_list '}'
- { $$ = create_sim_server($1, $3, $4); }
+ { $$ = ONLY_SIM(create_sim_server($1, $3, $4)); }
;
sim_server_offset
- : T_Server_Offset '=' number T_EOC { $$ = $3; }
+ : T_Server_Offset '=' number T_EOC
+ { $$ = $3; }
;
sim_server_name
- : T_Server '=' address { $$ = $3; }
+ : T_Server '=' address
+ { $$ = $3; }
;
sim_act_list
- : sim_act_list sim_act { $$ = enqueue($1, $2); }
- | sim_act { $$ = enqueue_in_new_queue($1); }
+ : sim_act_list sim_act
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | sim_act
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
sim_act
: T_Duration '=' number '{' sim_act_stmt_list '}'
- { $$ = create_sim_script_info($3, $5); }
+ { $$ = ONLY_SIM(create_sim_script_info($3, $5)); }
;
sim_act_stmt_list
- : sim_act_stmt_list sim_act_stmt T_EOC { $$ = enqueue($1, $2); }
- | sim_act_stmt T_EOC { $$ = enqueue_in_new_queue($1); }
+ : sim_act_stmt_list sim_act_stmt T_EOC
+ {
+ $$ = $1;
+ APPEND_G_FIFO($$, $2);
+ }
+ | sim_act_stmt T_EOC
+ {
+ $$ = NULL;
+ APPEND_G_FIFO($$, $1);
+ }
;
sim_act_stmt
- : T_Freq_Offset '=' number
- { $$ = create_attr_dval($1, $3); }
- | T_Wander '=' number
- { $$ = create_attr_dval($1, $3); }
- | T_Jitter '=' number
- { $$ = create_attr_dval($1, $3); }
- | T_Prop_Delay '=' number
- { $$ = create_attr_dval($1, $3); }
- | T_Proc_Delay '=' number
+ : sim_act_keyword '=' number
{ $$ = create_attr_dval($1, $3); }
;
+sim_act_keyword
+ : T_Freq_Offset
+ | T_Wander
+ | T_Jitter
+ | T_Prop_Delay
+ | T_Proc_Delay
+ ;
%%
-void
+void
yyerror(
+ struct FILE_INFO *ip_file,
const char *msg
)
{
@@ -1254,9 +1612,8 @@ yyerror(
/*
- * token_name - Convert T_ token integers to text.
- * Example: token_name(T_Server) returns "T_Server".
- * see also keyword(T_Server) which returns "server".
+ * token_name - convert T_ token integers to text
+ * example: token_name(T_Server) returns "T_Server"
*/
const char *
token_name(
@@ -1267,17 +1624,15 @@ token_name(
}
-/* Initial Testing function -- ignore
+/* Initial Testing function -- ignore */
+#if 0
int main(int argc, char *argv[])
{
ip_file = FOPEN(argv[1], "r");
- if (!ip_file) {
+ if (!ip_file)
fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);
- }
- key_scanner = create_keyword_scanner(keyword_list);
- print_keyword_scanner(key_scanner, 0);
yyparse();
return 0;
}
-*/
+#endif
diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index 619e389f0339..495ee30af1a1 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -13,19 +13,10 @@
#include "ntp_stdlib.h"
#include "ntp_control.h"
#include <ntp_random.h>
-#ifdef OPENSSL
-#include "openssl/rand.h"
-#endif /* OPENSSL */
-
-#ifdef SYS_WINNT
-int accept_wildcard_if_for_winnt;
-#else
-const int accept_wildcard_if_for_winnt = FALSE;
-#endif
/*
- * Table of valid association combinations
- * ---------------------------------------
+ * Table of valid association combinations
+ * ---------------------------------------
*
* packet->mode
* peer->mode | UNSPEC ACTIVE PASSIVE CLIENT SERVER BCAST
@@ -49,8 +40,9 @@ const int accept_wildcard_if_for_winnt = FALSE;
#define NO_PEER 0 /* action when no peer is found */
int AM[AM_MODES][AM_MODES] = {
-/* { UNSPEC, ACTIVE, PASSIVE, CLIENT, SERVER, BCAST } */
-
+/* packet->mode */
+/* peer { UNSPEC, ACTIVE, PASSIVE, CLIENT, SERVER, BCAST } */
+/* mode */
/*NONE*/{ AM_ERR, AM_NEWPASS, AM_NOMATCH, AM_FXMIT, AM_MANYCAST, AM_NEWBCL},
/*A*/ { AM_ERR, AM_PROCPKT, AM_PROCPKT, AM_NOMATCH, AM_NOMATCH, AM_NOMATCH},
@@ -70,11 +62,19 @@ int AM[AM_MODES][AM_MODES] = {
/*
* These routines manage the allocation of memory to peer structures
- * and the maintenance of the peer hash table. The three main entry
- * points are findpeer(), which looks for matching peer structures 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.
+ * and the maintenance of three data structures involving all peers:
+ *
+ * - peer_list is a single list with all peers, suitable for scanning
+ * operations over all peers.
+ * - peer_adr_hash is an array of lists indexed by hashed peer address.
+ * - peer_aid_hash is an array of lists indexed by hashed associd.
+ *
+ * They also maintain a free list of peer structures, peer_free.
+ *
+ * The three main entry points are findpeer(), which looks for matching
+ * peer structures 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
@@ -82,21 +82,22 @@ int AM[AM_MODES][AM_MODES] = {
struct peer *peer_hash[NTP_HASH_SIZE]; /* peer hash table */
int peer_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
struct peer *assoc_hash[NTP_HASH_SIZE]; /* association ID hash table */
-int assoc_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
+int assoc_hash_count[NTP_HASH_SIZE];/* peers in each bucket */
+struct peer *peer_list; /* peer structures list */
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.
+ * value every time an association is mobilized.
*/
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 */
+#define INIT_PEER_ALLOC 8 /* static preallocation */
+#define INC_PEER_ALLOC 4 /* add N more when empty */
/*
* Miscellaneous statistic counters which may be queried.
@@ -111,10 +112,15 @@ int peer_associations; /* mobilized associations */
int peer_preempt; /* preemptable associations */
static struct peer init_peer_alloc[INIT_PEER_ALLOC]; /* init alloc */
-static void getmorepeermem (void);
-static struct interface *select_peerinterface (struct peer *, sockaddr_u *, struct interface *, u_char);
+static struct peer * findexistingpeer_name(const char *, u_short,
+ struct peer *, int);
+static struct peer * findexistingpeer_addr(sockaddr_u *,
+ struct peer *, int,
+ u_char);
+static void free_peer(struct peer *, int);
+static void getmorepeermem(void);
+static int score(struct peer *);
-static int score(struct peer *);
/*
* init_peer - initialize peer data structures and counters
@@ -125,35 +131,22 @@ static int score(struct peer *);
void
init_peer(void)
{
- register int i;
-
- /*
- * Clear hash tables and counters.
- */
- memset(peer_hash, 0, sizeof(peer_hash));
- memset(peer_hash_count, 0, sizeof(peer_hash_count));
- memset(assoc_hash, 0, sizeof(assoc_hash));
- memset(assoc_hash_count, 0, sizeof(assoc_hash_count));
-
- /*
- * Clear stat counters
- */
- findpeer_calls = peer_allocations = 0;
- assocpeer_calls = peer_demobilizations = 0;
+ int i;
/*
- * Initialize peer memory.
+ * Initialize peer free list from static allocation.
*/
- peer_free = NULL;
- for (i = 0; i < INIT_PEER_ALLOC; i++)
- LINK_SLIST(peer_free, &init_peer_alloc[i], next);
- total_peer_structs = INIT_PEER_ALLOC;
- peer_free_count = INIT_PEER_ALLOC;
+ for (i = COUNTOF(init_peer_alloc) - 1; i >= 0; i--)
+ LINK_SLIST(peer_free, &init_peer_alloc[i], p_link);
+ total_peer_structs = COUNTOF(init_peer_alloc);
+ peer_free_count = COUNTOF(init_peer_alloc);
/*
* Initialize our first association ID
*/
- while ((current_association_ID = ntp_random() & 0xffff) == 0);
+ do
+ current_association_ID = ntp_random() & ASSOCID_MAX;
+ while (!current_association_ID);
}
@@ -163,33 +156,62 @@ init_peer(void)
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++) {
- LINK_SLIST(peer_free, peer, next);
- peer++;
- }
+ int i;
+ struct peer *peers;
+
+ peers = emalloc_zero(INC_PEER_ALLOC * sizeof(*peers));
+
+ for (i = INC_PEER_ALLOC - 1; i >= 0; i--)
+ LINK_SLIST(peer_free, &peers[i], p_link);
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(
+static struct peer *
+findexistingpeer_name(
+ const char * hostname,
+ u_short hname_fam,
+ struct peer * start_peer,
+ int mode
+ )
+{
+ struct peer *p;
+
+ if (NULL == start_peer)
+ p = peer_list;
+ else
+ p = start_peer->p_link;
+ for (; p != NULL; p = p->p_link)
+ if (p->hostname != NULL
+ && (-1 == mode || p->hmode == mode)
+ && (AF_UNSPEC == hname_fam
+ || AF_UNSPEC == AF(&p->srcadr)
+ || hname_fam == AF(&p->srcadr))
+ && !strcasecmp(p->hostname, hostname))
+ break;
+ return p;
+}
+
+
+static
+struct peer *
+findexistingpeer_addr(
sockaddr_u * addr,
struct peer * start_peer,
int mode,
u_char cast_flags
)
{
- register struct peer *peer;
+ struct peer *peer;
+
+ DPRINTF(2, ("findexistingpeer_addr(%s, %s, %d, 0x%x)\n",
+ sptoa(addr),
+ (start_peer)
+ ? sptoa(&start_peer->srcadr)
+ : "NULL",
+ mode, (u_int)cast_flags));
/*
* start_peer is included so we can locate instances of the
@@ -204,15 +226,21 @@ findexistingpeer(
if (NULL == start_peer)
peer = peer_hash[NTP_HASH_ADDR(addr)];
else
- peer = start_peer->next;
+ peer = start_peer->adr_link;
while (peer != NULL) {
- if (ADDR_PORT_EQ(addr, &peer->srcadr)
- && (-1 == mode || peer->hmode == mode ||
- ((MDF_BCLNT & peer->cast_flags) &&
- (MDF_BCLNT & cast_flags))))
+ DPRINTF(3, ("%s %s %d %d 0x%x 0x%x ", sptoa(addr),
+ sptoa(&peer->srcadr), mode, peer->hmode,
+ (u_int)cast_flags, (u_int)peer->cast_flags));
+ if ((-1 == mode || peer->hmode == mode ||
+ ((MDF_BCLNT & peer->cast_flags) &&
+ (MDF_BCLNT & cast_flags))) &&
+ ADDR_PORT_EQ(addr, &peer->srcadr)) {
+ DPRINTF(3, ("found.\n"));
break;
- peer = peer->next;
+ }
+ DPRINTF(3, ("\n"));
+ peer = peer->adr_link;
}
return peer;
@@ -220,6 +248,27 @@ findexistingpeer(
/*
+ * findexistingpeer - search by address and return a pointer to a peer.
+ */
+struct peer *
+findexistingpeer(
+ sockaddr_u * addr,
+ const char * hostname,
+ struct peer * start_peer,
+ int mode,
+ u_char cast_flags
+ )
+{
+ if (hostname != NULL)
+ return findexistingpeer_name(hostname, AF(addr),
+ start_peer, mode);
+ else
+ return findexistingpeer_addr(addr, start_peer, mode,
+ cast_flags);
+}
+
+
+/*
* findpeer - find and return a peer match for a received datagram in
* the peer_hash table.
*/
@@ -239,9 +288,8 @@ findpeer(
findpeer_calls++;
srcadr = &rbufp->recv_srcadr;
hash = NTP_HASH_ADDR(srcadr);
- for (p = peer_hash[hash]; p != NULL; p = p->next) {
- if (SOCK_EQ(srcadr, &p->srcadr) &&
- NSRCPORT(srcadr) == NSRCPORT(&p->srcadr)) {
+ for (p = peer_hash[hash]; p != NULL; p = p->adr_link) {
+ if (ADDR_PORT_EQ(srcadr, &p->srcadr)) {
/*
* if the association matching rules determine
@@ -300,24 +348,22 @@ findpeer(
}
/*
- * findpeerbyassocid - find and return a peer using his association ID
+ * findpeerbyassoc - find and return a peer using his association ID
*/
struct peer *
findpeerbyassoc(
- u_int assoc
+ associd_t assoc
)
{
struct peer *p;
u_int hash;
assocpeer_calls++;
-
hash = assoc & NTP_HASH_MASK;
- for (p = assoc_hash[hash]; p != NULL; p = p->ass_next) {
+ for (p = assoc_hash[hash]; p != NULL; p = p->aid_link)
if (assoc == p->associd)
- return p;
- }
- return NULL;
+ break;
+ return p;
}
@@ -327,26 +373,17 @@ findpeerbyassoc(
void
clear_all(void)
{
- struct peer *peer, *next_peer;
- int n;
+ struct peer *p;
/*
* This routine is called when the clock is stepped, and so all
* previously saved time values are untrusted.
*/
- for (n = 0; n < NTP_HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
- next_peer = peer->next;
- if (!(peer->cast_flags & (MDF_ACAST |
- MDF_MCAST | MDF_BCAST))) {
- peer_clear(peer, "STEP");
- }
- }
- }
-#ifdef DEBUG
- if (debug)
- printf("clear_all: at %lu\n", current_time);
-#endif
+ for (p = peer_list; p != NULL; p = p->p_link)
+ if (!(MDF_TXONLY_MASK & p->cast_flags))
+ peer_clear(p, "STEP");
+
+ DPRINTF(1, ("clear_all: at %lu\n", current_time));
}
@@ -358,36 +395,30 @@ score_all(
struct peer *peer /* peer structure pointer */
)
{
- struct peer *speer, *next_peer;
- int n;
+ struct peer *speer;
int temp, tamp;
+ int x;
/*
- * This routine finds the minimum score for all ephemeral
- * assocations and returns > 0 if the association can be
+ * This routine finds the minimum score for all preemptible
+ * associations and returns > 0 if the association can be
* demobilized.
*/
tamp = score(peer);
temp = 100;
- for (n = 0; n < NTP_HASH_SIZE; n++) {
- for (speer = peer_hash[n]; speer != 0; speer =
- next_peer) {
- int x;
-
- next_peer = speer->next;
- if ((x = score(speer)) < temp && (peer->flags &
- FLAG_PREEMPT))
+ for (speer = peer_list; speer != NULL; speer = speer->p_link)
+ if (speer->flags & FLAG_PREEMPT) {
+ x = score(speer);
+ if (x < temp)
temp = x;
}
- }
-#ifdef DEBUG
- if (debug)
- printf("score_all: at %lu score %d min %d\n",
- current_time, tamp, temp);
-#endif
+ DPRINTF(1, ("score_all: at %lu score %d min %d\n",
+ current_time, tamp, temp));
+
if (tamp != temp)
temp = 0;
- return (temp);
+
+ return temp;
}
@@ -423,63 +454,94 @@ score(
/*
+ * free_peer - internal routine to free memory referred to by a struct
+ * peer and return it to the peer free list. If unlink is
+ * nonzero, unlink from the various lists.
+ */
+static void
+free_peer(
+ struct peer * p,
+ int unlink_peer
+ )
+{
+ struct peer * unlinked;
+ int hash;
+
+ if (unlink_peer) {
+ hash = NTP_HASH_ADDR(&p->srcadr);
+ peer_hash_count[hash]--;
+
+ UNLINK_SLIST(unlinked, peer_hash[hash], p, adr_link,
+ struct peer);
+ if (NULL == unlinked) {
+ peer_hash_count[hash]++;
+ msyslog(LOG_ERR, "peer %s not in address table!",
+ stoa(&p->srcadr));
+ }
+
+ /*
+ * Remove him from the association hash as well.
+ */
+ hash = p->associd & NTP_HASH_MASK;
+ assoc_hash_count[hash]--;
+
+ UNLINK_SLIST(unlinked, assoc_hash[hash], p, aid_link,
+ struct peer);
+ if (NULL == unlinked) {
+ assoc_hash_count[hash]++;
+ msyslog(LOG_ERR,
+ "peer %s not in association ID table!",
+ stoa(&p->srcadr));
+ }
+
+ /* Remove him from the overall list. */
+ UNLINK_SLIST(unlinked, peer_list, p, p_link,
+ struct peer);
+ if (NULL == unlinked)
+ msyslog(LOG_ERR, "%s not in peer list!",
+ stoa(&p->srcadr));
+ }
+
+ if (p->hostname != NULL)
+ free(p->hostname);
+
+ if (p->ident != NULL)
+ free(p->ident);
+
+ if (p->addrs != NULL)
+ free(p->addrs); /* from copy_addrinfo_list() */
+
+ /* Add his corporeal form to peer free list */
+ ZERO(*p);
+ LINK_SLIST(peer_free, p, p_link);
+ peer_free_count++;
+}
+
+
+/*
* unpeer - remove peer structure from hash table and free structure
*/
void
unpeer(
- struct peer *peer_to_remove
+ struct peer *peer
)
{
- register struct peer *unlinked;
- int hash;
- char tbuf[80];
-
- snprintf(tbuf, sizeof(tbuf), "assoc %d",
- peer_to_remove->associd);
- report_event(PEVNT_DEMOBIL, peer_to_remove, tbuf);
- set_peerdstadr(peer_to_remove, NULL);
- hash = NTP_HASH_ADDR(&peer_to_remove->srcadr);
- peer_hash_count[hash]--;
+ mprintf_event(PEVNT_DEMOBIL, peer, "assoc %u", peer->associd);
+ restrict_source(&peer->srcadr, 1, 0);
+ set_peerdstadr(peer, NULL);
peer_demobilizations++;
peer_associations--;
- if (peer_to_remove->flags & FLAG_PREEMPT)
+ if (FLAG_PREEMPT & peer->flags)
peer_preempt--;
#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);
+ if (FLAG_REFCLOCK & peer->flags)
+ refclock_unpeer(peer);
#endif
- peer_to_remove->action = 0; /* disable timeout actions */
-
- UNLINK_SLIST(unlinked, peer_hash[hash], peer_to_remove, next,
- struct peer);
-
- if (NULL == unlinked) {
- peer_hash_count[hash]++;
- msyslog(LOG_ERR, "peer struct for %s not in table!",
- stoa(&peer_to_remove->srcadr));
- }
-
- /*
- * Remove him from the association hash as well.
- */
- hash = peer_to_remove->associd & NTP_HASH_MASK;
- assoc_hash_count[hash]--;
-
- UNLINK_SLIST(unlinked, assoc_hash[hash], peer_to_remove,
- ass_next, struct peer);
- if (NULL == unlinked) {
- assoc_hash_count[hash]++;
- msyslog(LOG_ERR,
- "peer struct for %s not in association table!",
- stoa(&peer_to_remove->srcadr));
- }
-
- LINK_SLIST(peer_free, peer_to_remove, next);
- peer_free_count++;
+ free_peer(peer, TRUE);
}
@@ -488,16 +550,17 @@ unpeer(
*/
struct peer *
peer_config(
- sockaddr_u *srcadr,
- struct interface *dstadr,
- int hmode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- int ttl,
- keyid_t key,
- u_char *keystr
+ sockaddr_u * srcadr,
+ const char * hostname,
+ endpt * dstadr,
+ u_char hmode,
+ u_char version,
+ u_char minpoll,
+ u_char maxpoll,
+ u_int flags,
+ u_int32 ttl,
+ keyid_t key,
+ const char * ident /* autokey group */
)
{
u_char cast_flags;
@@ -516,7 +579,9 @@ peer_config(
break;
case MODE_CLIENT:
- if (IS_MCAST(srcadr))
+ if (hostname != NULL && SOCK_UNSPEC(srcadr))
+ cast_flags = MDF_POOL;
+ else if (IS_MCAST(srcadr))
cast_flags = MDF_ACAST;
else
cast_flags = MDF_UCAST;
@@ -528,12 +593,18 @@ peer_config(
/*
* Mobilize the association and initialize its variables. If
- * emulating ntpdate, force iburst.
+ * emulating ntpdate, force iburst. For pool and manycastclient
+ * strip FLAG_PREEMPT as the prototype associations are not
+ * themselves preemptible, though the resulting associations
+ * are.
*/
+ flags |= FLAG_CONFIG;
if (mode_ntpdate)
flags |= FLAG_IBURST;
- return(newpeer(srcadr, dstadr, hmode, version, minpoll, maxpoll,
- flags | FLAG_CONFIG, cast_flags, ttl, key));
+ if ((MDF_ACAST | MDF_POOL) & cast_flags)
+ flags &= ~FLAG_PREEMPT;
+ return newpeer(srcadr, hostname, dstadr, hmode, version,
+ minpoll, maxpoll, flags, cast_flags, ttl, key, ident);
}
/*
@@ -563,11 +634,9 @@ set_peerdstadr(
p->dstadr->peercnt--;
UNLINK_SLIST(unlinked, p->dstadr->peers, p, ilink,
struct peer);
- msyslog(LOG_INFO, "%s interface %s -> %s",
- stoa(&p->srcadr), stoa(&p->dstadr->sin),
- (dstadr != NULL)
- ? stoa(&dstadr->sin)
- : "(none)");
+ msyslog(LOG_INFO, "%s local addr %s -> %s",
+ stoa(&p->srcadr), latoa(p->dstadr),
+ latoa(dstadr));
}
p->dstadr = dstadr;
if (dstadr != NULL) {
@@ -581,22 +650,20 @@ set_peerdstadr(
*/
static void
peer_refresh_interface(
- struct peer *peer
+ struct peer *p
)
{
endpt * niface;
endpt * piface;
- niface = select_peerinterface(peer, &peer->srcadr, NULL,
- peer->cast_flags);
+ niface = select_peerinterface(p, &p->srcadr, NULL);
DPRINTF(4, (
- "peer_refresh_interface: %s->%s mode %d vers %d poll %d %d flags 0x%x 0x%x ttl %d key %08x: new interface: ",
- 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));
+ "peer_refresh_interface: %s->%s mode %d vers %d poll %d %d flags 0x%x 0x%x ttl %u key %08x: new interface: ",
+ p->dstadr == NULL ? "<null>" :
+ stoa(&p->dstadr->sin), stoa(&p->srcadr), p->hmode,
+ p->version, p->minpoll, p->maxpoll, p->flags, p->cast_flags,
+ p->ttl, p->keyid));
if (niface != NULL) {
DPRINTF(4, (
"fd=%d, bfd=%d, name=%.16s, flags=0x%x, ifindex=%u, sin=%s",
@@ -611,34 +678,32 @@ peer_refresh_interface(
DPRINTF(4, ("<NONE>\n"));
}
- piface = peer->dstadr;
- set_peerdstadr(peer, niface);
- if (peer->dstadr) {
+ piface = p->dstadr;
+ set_peerdstadr(p, niface);
+ if (p->dstadr != NULL) {
/*
* clear crypto if we change the local address
*/
- if (peer->dstadr != piface && !(peer->cast_flags &
- MDF_ACAST) && peer->pmode != MODE_BROADCAST)
- peer_clear(peer, "XFAC");
+ if (p->dstadr != piface && !(MDF_ACAST & p->cast_flags)
+ && MODE_BROADCAST != p->pmode)
+ peer_clear(p, "XFAC");
/*
* Broadcast needs the socket enabled for broadcast
*/
- if (peer->cast_flags & MDF_BCAST) {
- enable_broadcast(peer->dstadr, &peer->srcadr);
- }
+ if (MDF_BCAST & p->cast_flags)
+ enable_broadcast(p->dstadr, &p->srcadr);
/*
* Multicast needs the socket interface enabled for
* multicast
*/
- if (peer->cast_flags & MDF_MCAST) {
- enable_multicast_if(peer->dstadr,
- &peer->srcadr);
- }
+ if (MDF_MCAST & p->cast_flags)
+ enable_multicast_if(p->dstadr, &p->srcadr);
}
}
+
/*
* refresh_all_peerinterfaces - see that all interface bindings are up
* to date
@@ -646,104 +711,40 @@ peer_refresh_interface(
void
refresh_all_peerinterfaces(void)
{
- struct peer *peer, *next_peer;
- int n;
+ struct peer *p;
/*
* this is called when the interface list has changed
* give all peers a chance to find a better interface
*/
- for (n = 0; n < NTP_HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
- next_peer = peer->next;
- peer_refresh_interface(peer);
- }
- }
+ for (p = peer_list; p != NULL; p = p->p_link)
+ peer_refresh_interface(p);
}
-
-/*
- * find an interface suitable for the src address
- */
-static endpt *
-select_peerinterface(
- struct peer * peer,
- sockaddr_u * srcadr,
- endpt * dstadr,
- u_char cast_flags
- )
-{
- endpt *ep;
- endpt *wild;
-
- wild = ANY_INTERFACE_CHOOSE(srcadr);
-
- /*
- * 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)) {
- ep = loopback_interface;
- } else if (cast_flags &
- (MDF_BCLNT | MDF_ACAST | MDF_MCAST | MDF_BCAST)) {
- ep = findbcastinter(srcadr);
- if (ep != NULL)
- DPRINTF(4, ("Found *-cast interface %s for address %s\n",
- stoa(&ep->sin), stoa(srcadr)));
- else
- DPRINTF(4, ("No *-cast local address found for address %s\n",
- stoa(srcadr)));
- } else {
- ep = dstadr;
- if (NULL == ep)
- ep = wild;
- }
- /*
- * If it is a multicast address, findbcastinter() may not find
- * it. For unicast, we get to find the interface when dstadr is
- * given to us as the wildcard (ANY_INTERFACE_CHOOSE). Either
- * way, try a little harder.
- */
- if (wild == ep)
- ep = findinterface(srcadr);
- /*
- * we do not bind to the wildcard interfaces for output
- * as our (network) source address would be undefined and
- * crypto will not work without knowing the own transmit address
- */
- if (ep != NULL && INT_WILDCARD & ep->flags)
- if (!accept_wildcard_if_for_winnt)
- ep = NULL;
-
- return ep;
-}
/*
* newpeer - initialize a new peer association
*/
struct peer *
newpeer(
- sockaddr_u *srcadr,
- struct interface *dstadr,
- int hmode,
- int version,
- int minpoll,
- int maxpoll,
- u_int flags,
- u_char cast_flags,
- int ttl,
- keyid_t key
+ sockaddr_u * srcadr,
+ const char * hostname,
+ endpt * dstadr,
+ u_char hmode,
+ u_char version,
+ u_char minpoll,
+ u_char maxpoll,
+ u_int flags,
+ u_char cast_flags,
+ u_int32 ttl,
+ keyid_t key,
+ const char * ident
)
{
- struct peer *peer;
- u_int hash;
- char tbuf[80];
+ struct peer * peer;
+ u_int hash;
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If Autokey is requested but not configured, complain loudly.
*/
@@ -756,7 +757,12 @@ newpeer(
return (NULL);
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+
+ /*
+ * For now only pool associations have a hostname.
+ */
+ NTP_INSIST(NULL == hostname || (MDF_POOL & cast_flags));
/*
* First search from the beginning for an association with given
@@ -767,7 +773,8 @@ newpeer(
* structure.
*/
if (dstadr != NULL) {
- peer = findexistingpeer(srcadr, NULL, hmode, cast_flags);
+ peer = findexistingpeer(srcadr, hostname, NULL, hmode,
+ cast_flags);
while (peer != NULL) {
if (peer->dstadr == dstadr ||
((MDF_BCLNT & cast_flags) &&
@@ -778,12 +785,13 @@ newpeer(
peer->dstadr == findinterface(srcadr))
break;
- peer = findexistingpeer(srcadr, peer, hmode,
- cast_flags);
+ peer = findexistingpeer(srcadr, hostname, peer,
+ hmode, cast_flags);
}
} else {
/* no endpt address given */
- peer = findexistingpeer(srcadr, NULL, hmode, cast_flags);
+ peer = findexistingpeer(srcadr, hostname, NULL, hmode,
+ cast_flags);
}
/*
@@ -792,8 +800,13 @@ newpeer(
* multicast) and preemptible (manycast and pool) client
* associations.
*/
- if (peer != NULL)
- return (NULL);
+ if (peer != NULL) {
+ DPRINTF(2, ("newpeer(%s) found existing association\n",
+ (hostname)
+ ? hostname
+ : stoa(srcadr)));
+ return NULL;
+ }
/*
* Allocate a new peer structure. Some dirt here, since some of
@@ -801,12 +814,11 @@ newpeer(
*/
if (peer_free_count == 0)
getmorepeermem();
- UNLINK_HEAD_SLIST(peer, peer_free, next);
+ UNLINK_HEAD_SLIST(peer, peer_free, p_link);
peer_free_count--;
peer_associations++;
- if (flags & FLAG_PREEMPT)
+ if (FLAG_PREEMPT & flags)
peer_preempt++;
- memset(peer, 0, sizeof(*peer));
/*
* Assign an association ID and increment the system variable.
@@ -815,15 +827,15 @@ newpeer(
if (++current_association_ID == 0)
++current_association_ID;
- DPRINTF(3, ("newpeer: cast flags: 0x%x for address: %s\n",
- cast_flags, stoa(srcadr)));
-
peer->srcadr = *srcadr;
- set_peerdstadr(peer, select_peerinterface(peer, srcadr, dstadr,
- cast_flags));
- peer->hmode = (u_char)hmode;
- peer->version = (u_char)version;
+ if (hostname != NULL)
+ peer->hostname = estrdup(hostname);
+ peer->hmode = hmode;
+ peer->version = version;
peer->flags = flags;
+ peer->cast_flags = cast_flags;
+ set_peerdstadr(peer,
+ select_peerinterface(peer, srcadr, dstadr));
/*
* It is an error to set minpoll less than NTP_MINPOLL or to
@@ -835,43 +847,48 @@ newpeer(
if (minpoll == 0)
peer->minpoll = NTP_MINDPOLL;
else
- peer->minpoll = (u_char)min(minpoll, NTP_MAXPOLL);
+ peer->minpoll = min(minpoll, NTP_MAXPOLL);
if (maxpoll == 0)
peer->maxpoll = NTP_MAXDPOLL;
else
- peer->maxpoll = (u_char)max(maxpoll, NTP_MINPOLL);
+ peer->maxpoll = max(maxpoll, NTP_MINPOLL);
if (peer->minpoll > peer->maxpoll)
peer->minpoll = peer->maxpoll;
- if (peer->dstadr)
- DPRINTF(3, ("newpeer: using fd %d and our addr %s\n",
- peer->dstadr->fd, stoa(&peer->dstadr->sin)));
+ if (peer->dstadr != NULL)
+ DPRINTF(3, ("newpeer(%s): using fd %d and our addr %s\n",
+ stoa(srcadr), peer->dstadr->fd,
+ stoa(&peer->dstadr->sin)));
else
- DPRINTF(3, ("newpeer: local interface currently not bound\n"));
+ DPRINTF(3, ("newpeer(%s): local interface currently not bound\n",
+ stoa(srcadr)));
/*
* Broadcast needs the socket enabled for broadcast
*/
- if ((cast_flags & MDF_BCAST) && peer->dstadr)
+ if ((MDF_BCAST & cast_flags) && peer->dstadr != NULL)
enable_broadcast(peer->dstadr, srcadr);
/*
* Multicast needs the socket interface enabled for multicast
*/
- if ((cast_flags & MDF_MCAST) && peer->dstadr)
+ if ((MDF_MCAST & cast_flags) && peer->dstadr != NULL)
enable_multicast_if(peer->dstadr, srcadr);
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (key > NTP_MAXKEY)
peer->flags |= FLAG_SKEY;
-#endif /* OPENSSL */
- peer->cast_flags = cast_flags;
- peer->ttl = (u_char)ttl;
+#endif /* AUTOKEY */
+ peer->ttl = ttl;
peer->keyid = key;
+ if (ident != NULL)
+ peer->ident = estrdup(ident);
peer->precision = sys_precision;
peer->hpoll = peer->minpoll;
if (cast_flags & MDF_ACAST)
peer_clear(peer, "ACST");
+ else if (cast_flags & MDF_POOL)
+ peer_clear(peer, "POOL");
else if (cast_flags & MDF_MCAST)
peer_clear(peer, "MCST");
else if (cast_flags & MDF_BCAST)
@@ -888,9 +905,8 @@ newpeer(
peer->timereachable = current_time;
peer->timereceived = current_time;
-#ifdef REFCLOCK
if (ISREFCLOCKADR(&peer->srcadr)) {
-
+#ifdef REFCLOCK
/*
* We let the reference clock support do clock
* dependent initialization. This includes setting
@@ -904,35 +920,41 @@ newpeer(
* Dump it, something screwed up
*/
set_peerdstadr(peer, NULL);
- LINK_SLIST(peer_free, peer, next);
- peer_free_count++;
- return (NULL);
+ free_peer(peer, 0);
+ return NULL;
}
+#else /* REFCLOCK */
+ msyslog(LOG_ERR, "refclock %s isn't supported. ntpd was compiled without refclock support.",
+ stoa(&peer->srcadr));
+ set_peerdstadr(peer, NULL);
+ free_peer(peer, 0);
+ return NULL;
+#endif /* REFCLOCK */
}
-#endif
/*
* Put the new peer in the hash tables.
*/
hash = NTP_HASH_ADDR(&peer->srcadr);
- LINK_SLIST(peer_hash[hash], peer, next);
+ LINK_SLIST(peer_hash[hash], peer, adr_link);
peer_hash_count[hash]++;
hash = peer->associd & NTP_HASH_MASK;
- LINK_SLIST(assoc_hash[hash], peer, ass_next);
+ LINK_SLIST(assoc_hash[hash], peer, aid_link);
assoc_hash_count[hash]++;
- snprintf(tbuf, sizeof(tbuf), "assoc %d", peer->associd);
- report_event(PEVNT_MOBIL, peer, tbuf);
- DPRINTF(1, ("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));
- return (peer);
+ LINK_SLIST(peer_list, peer, p_link);
+
+ restrict_source(&peer->srcadr, 0, 0);
+ mprintf_event(PEVNT_MOBIL, peer, "assoc %d", peer->associd);
+ DPRINTF(1, ("newpeer: %s->%s mode %u vers %u poll %u %u flags 0x%x 0x%x ttl %u key %08x\n",
+ latoa(peer->dstadr), stoa(&peer->srcadr), peer->hmode,
+ peer->version, peer->minpoll, peer->maxpoll, peer->flags,
+ peer->cast_flags, peer->ttl, peer->keyid));
+ return peer;
}
/*
- * peer_clr_stats - clear peer module statiistics counters
+ * peer_clr_stats - clear peer module statistics counters
*/
void
peer_clr_stats(void)
@@ -944,6 +966,7 @@ peer_clr_stats(void)
peer_timereset = current_time;
}
+
/*
* peer_reset - reset statistics counters
*/
@@ -974,47 +997,42 @@ void
peer_all_reset(void)
{
struct peer *peer;
- int hash;
- for (hash = 0; hash < NTP_HASH_SIZE; hash++)
- for (peer = peer_hash[hash]; peer != 0; peer = peer->next)
+ for (peer = peer_list; peer != NULL; peer = peer->p_link)
peer_reset(peer);
}
/*
- * findmanycastpeer - find and return a manycast peer
+ * findmanycastpeer - find and return a manycastclient or pool
+ * association matching a received response.
*/
struct peer *
findmanycastpeer(
struct recvbuf *rbufp /* receive buffer pointer */
)
{
- register struct peer *peer;
+ struct peer *peer;
struct pkt *pkt;
l_fp p_org;
- int i;
/*
- * This routine is called upon arrival of a server-mode message
- * from a manycast client. 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.
+ * This routine is called upon arrival of a server-mode response
+ * to a manycastclient multicast solicitation, or to a pool
+ * server unicast solicitation. Search the peer list for a
+ * manycastclient association where the last transmit timestamp
+ * matches the response packet's originate timestamp. There can
+ * be multiple manycastclient associations, or multiple pool
+ * solicitation assocations, so this assumes the transmit
+ * timestamps are unique for such.
*/
pkt = &rbufp->recv_pkt;
- for (i = 0; i < NTP_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(&p_org, &peer->aorg))
- return (peer);
- }
+ for (peer = peer_list; peer != NULL; peer = peer->p_link)
+ if (MDF_SOLICIT_MASK & peer->cast_flags) {
+ NTOHL_FP(&pkt->org, &p_org);
+ if (L_ISEQU(&p_org, &peer->aorg))
+ break;
}
- }
- return (NULL);
+
+ return peer;
}
diff --git a/ntpd/ntp_prio_q.c b/ntpd/ntp_prio_q.c
new file mode 100644
index 000000000000..703673b8a182
--- /dev/null
+++ b/ntpd/ntp_prio_q.c
@@ -0,0 +1,238 @@
+/* ntp_prio_q.c
+ *
+ * This file contains the priority queue implementation used by the
+ * discrete event simulator.
+ *
+ * Written By: Sachin Kamboj
+ * University of Delaware
+ * Newark, DE 19711
+ * Copyright (c) 2006
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ntp_stdlib.h>
+#include <ntp_prio_q.h>
+
+/* Priority Queue
+ * --------------
+ * Define a priority queue in which the relative priority of the elements
+ * is determined by a function 'get_order' which is supplied to the
+ * priority_queue
+ */
+queue *debug_create_priority_queue(
+ q_order_func get_order
+#ifdef _CRTDBG_MAP_ALLOC
+ , const char * sourcefile
+ , int line_num
+#endif
+ )
+{
+ queue *my_queue;
+
+#ifndef _CRTDBG_MAP_ALLOC
+ my_queue = emalloc(sizeof(queue));
+#else
+ /* preserve original callsite __FILE__ and __LINE__ for leak report */
+ my_queue = debug_erealloc(NULL, sizeof(queue), sourcefile, line_num);
+#endif
+ my_queue->get_order = get_order;
+ my_queue->front = NULL;
+ my_queue->no_of_elements = 0;
+
+ return my_queue;
+}
+
+
+/* Define a function to "destroy" a priority queue, freeing-up
+ * all the allocated resources in the process
+ */
+
+void destroy_queue(
+ queue *my_queue
+ )
+{
+ node *temp = NULL;
+
+ /* Empty out the queue elements if they are not already empty */
+ while (my_queue->front != NULL) {
+ temp = my_queue->front;
+ my_queue->front = my_queue->front->node_next;
+ free(temp);
+ }
+
+ /* Now free the queue */
+ free(my_queue);
+}
+
+
+/* Define a function to allocate memory for one element
+ * of the queue. The allocated memory consists of size
+ * bytes plus the number of bytes needed for bookkeeping
+ */
+
+void *debug_get_node(
+ size_t size
+#ifdef _CRTDBG_MAP_ALLOC
+ , const char * sourcefile
+ , int line_num
+#endif
+ )
+{
+ node *new_node;
+
+#ifndef _CRTDBG_MAP_ALLOC
+ new_node = emalloc(sizeof(*new_node) + size);
+#else
+ new_node = debug_erealloc(NULL, sizeof(*new_node) + size,
+ sourcefile, line_num);
+#endif
+ new_node->node_next = NULL;
+
+ return new_node + 1;
+}
+
+/* Define a function to free the allocated memory for a queue node */
+void free_node(
+ void *my_node
+ )
+{
+ node *old_node = my_node;
+
+ free(old_node - 1);
+}
+
+
+void *
+next_node(
+ void *pv
+ )
+{
+ node *pn;
+
+ pn = pv;
+ pn--;
+
+ if (pn->node_next == NULL)
+ return NULL;
+
+ return pn->node_next + 1;
+}
+
+
+/* Define a function to check if the queue is empty. */
+int empty(
+ queue *my_queue
+ )
+{
+ return (!my_queue || !my_queue->front);
+}
+
+
+void *
+queue_head(
+ queue *q
+ )
+{
+ if (NULL == q || NULL == q->front)
+ return NULL;
+
+ return q->front + 1;
+}
+
+
+/* Define a function to add an element to the priority queue.
+ * The element is added according to its priority -
+ * relative priority is given by the get_order function
+ */
+queue *enqueue(
+ queue * my_queue,
+ void * my_node
+ )
+{
+ node *new_node = (node *)my_node - 1;
+ node *i = NULL;
+ node *j = my_queue->front;
+
+ while (j != NULL &&
+ (*my_queue->get_order)(new_node + 1, j + 1) > 0) {
+ i = j;
+ j = j->node_next;
+ }
+
+ if (i == NULL) { /* Insert at beginning of the queue */
+ new_node->node_next = my_queue->front;
+ my_queue->front = new_node;
+ } else { /* Insert Elsewhere, including the end */
+ new_node->node_next = i->node_next;
+ i->node_next = new_node;
+ }
+
+ ++my_queue->no_of_elements;
+ return my_queue;
+}
+
+
+/* Define a function to dequeue the first element from the priority
+ * queue and return it
+ */
+void *dequeue(
+ queue *my_queue
+ )
+{
+ node *my_node = my_queue->front;
+
+ if (my_node != NULL) {
+ my_queue->front = my_node->node_next;
+ --my_queue->no_of_elements;
+ return my_node + 1;
+ } else
+ return NULL;
+}
+
+
+/* Define a function that returns the number of elements in the
+ * priority queue
+ */
+int get_no_of_elements(
+ queue *my_queue
+ )
+{
+ return my_queue->no_of_elements;
+}
+
+
+/* Define a function to append a queue onto another.
+ * Note: there is a faster way (O(1) as opposed to O(n))
+ * to do this for simple (FIFO) queues, but we can't rely on
+ * that for priority queues. (Given the current representation)
+ *
+ * I don't anticipate this to be a problem. If it does turn
+ * out to be a bottleneck, I will consider replacing the
+ * current implementation with a binomial or fibonacci heap.
+ */
+void append_queue(
+ queue *q1,
+ queue *q2
+ )
+{
+ while (!empty(q2))
+ enqueue(q1, dequeue(q2));
+ destroy_queue(q2);
+}
+
+
+/* FIFO Queue
+ * ----------
+ * Use the priority queue to create a traditional FIFO queue.
+ * The only extra function needed is the create_queue
+ */
+
+/* C is not Lisp and does not allow anonymous lambda functions :-(.
+ * So define a get_fifo_order function here
+ */
+int get_fifo_order(const void *el1, const void *el2)
+{
+ return 1;
+}
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index 03e3593b9435..091fcf527ff8 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -13,16 +13,14 @@
#include "ntp_unixtime.h"
#include "ntp_control.h"
#include "ntp_string.h"
+#include "ntp_leapsec.h"
#include <stdio.h>
#ifdef HAVE_LIBSCF_H
#include <libscf.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif /* HAVE_LIBSCF_H */
-
-
-#if defined(VMS) && defined(VMS_LOCALUNIT) /*wjm*/
-#include "ntp_refclock.h"
#endif
/*
@@ -44,6 +42,22 @@
#define RESP_DELAY 1 /* refclock burst delay (s) */
/*
+ * pool soliciting restriction duration (s)
+ */
+#define POOL_SOLICIT_WINDOW 8
+
+/*
+ * peer_select groups statistics for a peer used by clock_select() and
+ * clock_cluster().
+ */
+typedef struct peer_select_tag {
+ struct peer * peer;
+ double synch; /* sync distance */
+ double error; /* jitter */
+ double seljit; /* selection jitter */
+} peer_select;
+
+/*
* System variables are declared here. Unless specified otherwise, all
* times are in seconds.
*/
@@ -79,26 +93,26 @@ double sys_maxdist = MAXDISTANCE; /* selection threshold */
double sys_jitter; /* system jitter */
u_long sys_epoch; /* last clock update time */
static double sys_clockhop; /* clockhop threshold */
-int leap_tai; /* TAI at next next leap */
-u_long leap_sec; /* next scheduled leap from file */
-u_long leap_peers; /* next scheduled leap from peers */
-u_long leap_expire; /* leap information expiration */
-static int leap_vote; /* leap consensus */
+static int leap_vote_ins; /* leap consensus for insert */
+static int leap_vote_del; /* leap consensus for delete */
keyid_t sys_private; /* private value for session seed */
int sys_manycastserver; /* respond to manycast client pkts */
+int ntp_mode7; /* respond to ntpdc (mode7) */
int peer_ntpdate; /* active peers in ntpdate mode */
int sys_survivors; /* truest of the truechimers */
+char *sys_ident = NULL; /* identity scheme */
/*
* TOS and multicast mapping stuff
*/
int sys_floor = 0; /* cluster stratum floor */
-int sys_ceiling = STRATUM_UNSPEC; /* cluster stratum ceiling */
+int sys_ceiling = STRATUM_UNSPEC - 1; /* cluster stratum ceiling */
int sys_minsane = 1; /* minimum candidates */
int sys_minclock = NTP_MINCLOCK; /* minimum candidates */
int sys_maxclock = NTP_MAXCLOCK; /* maximum candidates */
int sys_cohort = 0; /* cohort switch */
int sys_orphan = STRATUM_UNSPEC + 1; /* orphan stratum */
+int sys_orphwait = NTP_ORPHWAIT; /* orphan wait */
int sys_beacon = BEACON; /* manycast beacon interval */
int sys_ttlmax; /* max ttl mapping vector index */
u_char sys_ttl[MAX_TTL]; /* ttl mapping vector */
@@ -119,14 +133,23 @@ u_long sys_limitrejected; /* rate exceeded */
u_long sys_kodsent; /* KoD sent */
static double root_distance (struct peer *);
-static void clock_combine (struct peer **, int);
+static void clock_combine (peer_select *, int, int);
static void peer_xmit (struct peer *);
-static void fast_xmit (struct recvbuf *, int, keyid_t,
- int);
+static void fast_xmit (struct recvbuf *, int, keyid_t, int);
+static void pool_xmit (struct peer *);
static void clock_update (struct peer *);
-static int default_get_precision (void);
+static void measure_precision(void);
+static double measure_tick_fuzz(void);
static int local_refid (struct peer *);
static int peer_unfit (struct peer *);
+#ifdef AUTOKEY
+static int group_test (char *, char *);
+#endif /* AUTOKEY */
+#ifdef WORKER
+void pool_name_resolved (int, int, void *, const char *,
+ const char *, const struct addrinfo *,
+ const struct addrinfo *);
+#endif /* WORKER */
/*
@@ -137,7 +160,7 @@ transmit(
struct peer *peer /* peer structure pointer */
)
{
- int hpoll;
+ u_char hpoll;
/*
* The polling state machine. There are two kinds of machines,
@@ -164,9 +187,13 @@ transmit(
* increased by one for each poll until either sys_maxclock
* servers have been found or the maximum ttl is reached. When
* sys_maxclock servers are found we stop polling until one or
- * more servers have timed out or until less than minpoll
+ * more servers have timed out or until less than sys_minclock
* associations turn up. In this case additional better servers
- * are dragged in and preempt the existing ones.
+ * are dragged in and preempt the existing ones. Once every
+ * sys_beacon seconds we are to transmit unconditionally, but
+ * this code is not quite right -- peer->unreach counts polls
+ * and is being compared with sys_beacon, so the beacons happen
+ * every sys_beacon polls.
*/
if (peer->cast_flags & MDF_ACAST) {
peer->outdate = current_time;
@@ -176,7 +203,7 @@ transmit(
peer_xmit(peer);
} else if (sys_survivors < sys_minclock ||
peer_associations < sys_maxclock) {
- if (peer->ttl < sys_ttlmax)
+ if (peer->ttl < (u_int32)sys_ttlmax)
peer->ttl++;
peer_xmit(peer);
}
@@ -186,8 +213,30 @@ transmit(
}
/*
+ * Pool associations transmit unicast solicitations when there
+ * are less than a hard limit of 2 * sys_maxclock associations,
+ * and either less than sys_minclock survivors or less than
+ * sys_maxclock associations. The hard limit prevents unbounded
+ * growth in associations if the system clock or network quality
+ * result in survivor count dipping below sys_minclock often.
+ * This was observed testing with pool, where sys_maxclock == 12
+ * resulted in 60 associations without the hard limit. A
+ * similar hard limit on manycastclient ephemeral associations
+ * may be appropriate.
+ */
+ if (peer->cast_flags & MDF_POOL) {
+ peer->outdate = current_time;
+ if ((peer_associations <= 2 * sys_maxclock) &&
+ (peer_associations < sys_maxclock ||
+ sys_survivors < sys_minclock))
+ pool_xmit(peer);
+ poll_update(peer, hpoll);
+ return;
+ }
+
+ /*
* In unicast modes the dance is much more intricate. It is
- * desigmed to back off whenever possible to minimize network
+ * designed to back off whenever possible to minimize network
* traffic.
*/
if (peer->burst == 0) {
@@ -202,8 +251,6 @@ transmit(
peer->outdate = current_time;
peer->unreach++;
peer->reach <<= 1;
- if (!(peer->reach & 0x0f))
- clock_filter(peer, 0., 0., MAXDISPERSE);
if (!peer->reach) {
/*
@@ -211,8 +258,11 @@ transmit(
* previously reachable raise a trap. Send a
* burst if enabled.
*/
- if (oreach)
+ clock_filter(peer, 0., 0., MAXDISPERSE);
+ if (oreach) {
+ peer_unfit(peer);
report_event(PEVNT_UNREACH, peer, NULL);
+ }
if ((peer->flags & FLAG_IBURST) &&
peer->retry == 0)
peer->retry = NTP_RETRY;
@@ -220,11 +270,13 @@ transmit(
/*
* Here the peer is reachable. Send a burst if
- * enabled and the peer is fit.
+ * enabled and the peer is fit. Reset unreach
+ * for persistent and ephemeral associations.
+ * Unreach is also reset for survivors in
+ * clock_select().
*/
hpoll = sys_poll;
- if (!(peer->flags & FLAG_PREEMPT &&
- peer->hmode == MODE_CLIENT))
+ if (!(peer->flags & FLAG_PREEMPT))
peer->unreach = 0;
if ((peer->flags & FLAG_BURST) && peer->retry ==
0 && !peer_unfit(peer))
@@ -232,26 +284,29 @@ transmit(
}
/*
- * Watch for timeout. If preemptable, toss the rascal;
+ * Watch for timeout. If ephemeral, toss the rascal;
* otherwise, bump the poll interval. Note the
* poll_update() routine will clamp it to maxpoll.
+ * If preemptible and we have more peers than maxclock,
+ * and this peer has the minimum score of preemptibles,
+ * demobilize.
*/
if (peer->unreach >= NTP_UNREACH) {
hpoll++;
- if (peer->flags & FLAG_PREEMPT) {
- report_event(PEVNT_RESTART, peer,
- "timeout");
- if (peer->hmode != MODE_CLIENT) {
- peer_clear(peer, "TIME");
- unpeer(peer);
- return;
- }
- if (peer_associations > sys_maxclock &&
- score_all(peer)) {
- peer_clear(peer, "TIME");
- unpeer(peer);
- return;
- }
+ /* ephemeral: no FLAG_CONFIG nor FLAG_PREEMPT */
+ if (!(peer->flags & (FLAG_CONFIG | FLAG_PREEMPT))) {
+ report_event(PEVNT_RESTART, peer, "timeout");
+ peer_clear(peer, "TIME");
+ unpeer(peer);
+ return;
+ }
+ if ((peer->flags & FLAG_PREEMPT) &&
+ (peer_associations > sys_maxclock) &&
+ score_all(peer)) {
+ report_event(PEVNT_RESTART, peer, "timeout");
+ peer_clear(peer, "TIME");
+ unpeer(peer);
+ return;
}
}
} else {
@@ -268,8 +323,9 @@ transmit(
if (peer_ntpdate == 0) {
msyslog(LOG_NOTICE,
"ntpd: no servers found");
- printf(
- "ntpd: no servers found\n");
+ if (!msyslog_term)
+ printf(
+ "ntpd: no servers found\n");
exit (0);
}
}
@@ -297,11 +353,11 @@ receive(
{
register struct peer *peer; /* peer structure pointer */
register struct pkt *pkt; /* receive packet pointer */
- int hisversion; /* packet version */
- int hisleap; /* packet leap indicator */
- int hismode; /* packet mode */
- int hisstratum; /* packet stratum */
- int restrict_mask; /* restrict bits */
+ u_char hisversion; /* packet version */
+ u_char hisleap; /* packet leap indicator */
+ u_char hismode; /* packet mode */
+ u_char hisstratum; /* packet stratum */
+ u_short restrict_mask; /* restrict bits */
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
int is_authentic = 0; /* cryptosum ok */
@@ -314,11 +370,13 @@ receive(
l_fp p_org; /* origin timestamp */
l_fp p_rec; /* receive timestamp */
l_fp p_xmt; /* transmit timestamp */
-#ifdef OPENSSL
+#ifdef AUTOKEY
+ char hostname[NTP_MAXSTRLEN + 1];
+ char *groupname = NULL;
struct autokey *ap; /* autokey structure pointer */
int rval; /* cookie snatcher */
keyid_t pkeyid = 0, tkeyid = 0; /* key IDs */
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#ifdef HAVE_NTP_SIGND
static unsigned char zero_key[16];
#endif /* HAVE_NTP_SIGND */
@@ -334,18 +392,15 @@ receive(
* reveals a clogging attack.
*/
sys_received++;
- if (SRCPORT(&rbufp->recv_srcadr) < NTP_PORT) {
+ if (0 == SRCPORT(&rbufp->recv_srcadr)) {
sys_badlength++;
return; /* bogus port */
}
restrict_mask = restrictions(&rbufp->recv_srcadr);
-#ifdef DEBUG
- if (debug > 1)
- printf("receive: at %ld %s<-%s flags %x restrict %03x\n",
+ DPRINTF(2, ("receive: at %ld %s<-%s flags %x restrict %03x\n",
current_time, stoa(&rbufp->dstadr->sin),
stoa(&rbufp->recv_srcadr),
- rbufp->dstadr->flags, restrict_mask);
-#endif
+ rbufp->dstadr->flags, restrict_mask));
pkt = &rbufp->recv_pkt;
hisversion = PKT_VERSION(pkt->li_vn_mode);
hisleap = PKT_LEAP(pkt->li_vn_mode);
@@ -356,7 +411,7 @@ receive(
return; /* ignore everything */
}
if (hismode == MODE_PRIVATE) {
- if (restrict_mask & RES_NOQUERY) {
+ if (!ntp_mode7 || (restrict_mask & RES_NOQUERY)) {
sys_restricted++;
return; /* no query private */
}
@@ -381,7 +436,7 @@ receive(
* This is for testing. If restricted drop ten percent of
* surviving packets.
*/
- if (restrict_mask & RES_TIMEOUT) {
+ if (restrict_mask & RES_FLAKE) {
if ((double)ntp_random() / 0x7fffffff < .1) {
sys_restricted++;
return; /* no flakeway */
@@ -431,8 +486,12 @@ receive(
*/
authlen = LEN_PKT_NOMAC;
has_mac = rbufp->recv_length - authlen;
- while (has_mac != 0) {
+ while (has_mac > 0) {
u_int32 len;
+#ifdef AUTOKEY
+ u_int32 hostlen;
+ struct exten *ep;
+#endif /*AUTOKEY */
if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) {
sys_badlength++;
@@ -444,18 +503,52 @@ receive(
} else {
opcode = ntohl(((u_int32 *)pkt)[authlen / 4]);
- len = opcode & 0xffff;
- if (len % 4 != 0 || len < 4 || len + authlen >
- rbufp->recv_length) {
+ len = opcode & 0xffff;
+ if (len % 4 != 0 || len < 4 || (int)len +
+ authlen > rbufp->recv_length) {
sys_badlength++;
return; /* bad length */
}
+#ifdef AUTOKEY
+ /*
+ * Extract calling group name for later. If
+ * sys_groupname is non-NULL, there must be
+ * a group name provided to elicit a response.
+ */
+ if ((opcode & 0x3fff0000) == CRYPTO_ASSOC &&
+ sys_groupname != NULL) {
+ ep = (struct exten *)&((u_int32 *)pkt)[authlen / 4];
+ hostlen = ntohl(ep->vallen);
+ if (hostlen >= sizeof(hostname) ||
+ hostlen > len -
+ offsetof(struct exten, pkt)) {
+ sys_badlength++;
+ return; /* bad length */
+ }
+ memcpy(hostname, &ep->pkt, hostlen);
+ hostname[hostlen] = '\0';
+ groupname = strchr(hostname, '@');
+ if (groupname == NULL) {
+ sys_declined++;
+ return;
+ }
+ groupname++;
+ }
+#endif /* AUTOKEY */
authlen += len;
has_mac -= len;
}
}
/*
+ * If has_mac is < 0 we had a malformed packet.
+ */
+ if (has_mac < 0) {
+ sys_badlength++;
+ return; /* bad length */
+ }
+
+ /*
* If authentication required, a MAC must be present.
*/
if (restrict_mask & RES_DONTTRUST && has_mac == 0) {
@@ -466,14 +559,19 @@ receive(
/*
* Update the MRU list and finger the cloggers. It can be a
* little expensive, so turn it off for production use.
+ * RES_LIMITED and RES_KOD will be cleared in the returned
+ * restrict_mask unless one or both actions are warranted.
*/
restrict_mask = ntp_monitor(rbufp, restrict_mask);
if (restrict_mask & RES_LIMITED) {
sys_limitrejected++;
if (!(restrict_mask & RES_KOD) || MODE_BROADCAST ==
- hismode || MODE_SERVER == hismode)
+ hismode || MODE_SERVER == hismode) {
+ if (MODE_SERVER == hismode)
+ DPRINTF(1, ("Possibly self-induced rate limiting of MODE_SERVER from %s\n",
+ stoa(&rbufp->recv_srcadr)));
return; /* rate exceeded */
-
+ }
if (hismode == MODE_CLIENT)
fast_xmit(rbufp, MODE_SERVER, skeyid,
restrict_mask);
@@ -486,10 +584,10 @@ receive(
/*
* We have tossed out as many buggy packets as possible early in
- * the game to reduce the exposure to a clogging attack. now we
+ * 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
+ * digest 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
@@ -575,7 +673,7 @@ receive(
} else {
restrict_mask &= ~RES_MSSNTP;
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* For autokey modes, generate the session key
* and install in the key cache. Use the socket
@@ -623,7 +721,7 @@ receive(
* the wildcard interface, game over.
*/
if (crypto_flags && rbufp->dstadr ==
- any_interface) {
+ ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
sys_restricted++;
return; /* no wildcard */
}
@@ -659,7 +757,7 @@ receive(
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Compute the cryptosum. Note a clogging attack may
@@ -673,10 +771,10 @@ receive(
is_authentic = AUTH_ERROR;
else
is_authentic = AUTH_OK;
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (crypto_flags && skeyid > NTP_MAXKEY)
authtrust(skeyid, 0);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#ifdef DEBUG
if (debug)
printf(
@@ -735,6 +833,16 @@ receive(
return; /* not enabled */
}
+#ifdef AUTOKEY
+ /*
+ * Do not respond if not the same group.
+ */
+ if (group_test(groupname, NULL)) {
+ sys_declined++;
+ return;
+ }
+#endif /* AUTOKEY */
+
/*
* Do not respond if we are not synchronized or our
* stratum is greater than the manycaster or the
@@ -759,24 +867,41 @@ receive(
/*
* This is a server mode packet returned in response to a client
- * mode packet sent to a multicast group address. The origin
- * 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.
+ * mode packet sent to a multicast group address (for
+ * manycastclient) or to a unicast address (for pool). The
+ * origin 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.
*
- * If the packet is authentic and the manycast association is
- * found, we mobilize a client association and copy pertinent
- * variables from the manycast association to the new client
- * association. If not, just ignore the packet.
+ * If the packet is authentic and the manycastclient or pool
+ * association is found, we mobilize a client association and
+ * copy pertinent variables from the manycastclient or pool
+ * association to the new client association. If not, just
+ * ignore the packet.
*
* 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.
*/
case AM_MANYCAST:
- if (!AUTH(sys_authenticate | (restrict_mask &
- (RES_NOPEER | RES_DONTTRUST)), is_authentic)) {
+
+#ifdef AUTOKEY
+ /*
+ * Do not respond if not the same group.
+ */
+ if (group_test(groupname, NULL)) {
+ sys_declined++;
+ return;
+ }
+#endif /* AUTOKEY */
+ if ((peer2 = findmanycastpeer(rbufp)) == NULL) {
+ sys_restricted++;
+ return; /* not enabled */
+ }
+ if (!AUTH((!(peer2->cast_flags & MDF_POOL) &&
+ sys_authenticate) | (restrict_mask & (RES_NOPEER |
+ RES_DONTTRUST)), is_authentic)) {
sys_restricted++;
return; /* access denied */
}
@@ -790,26 +915,32 @@ receive(
sys_declined++;
return; /* no help */
}
- if ((peer2 = findmanycastpeer(rbufp)) == NULL) {
- sys_restricted++;
- return; /* not enabled */
- }
- if ((peer = newpeer(&rbufp->recv_srcadr, rbufp->dstadr,
- MODE_CLIENT, hisversion, NTP_MINDPOLL, NTP_MAXDPOLL,
- FLAG_PREEMPT, MDF_UCAST | MDF_ACLNT, 0, skeyid)) ==
- NULL) {
+ peer = newpeer(&rbufp->recv_srcadr, NULL, rbufp->dstadr,
+ MODE_CLIENT, hisversion, peer2->minpoll,
+ peer2->maxpoll, FLAG_PREEMPT |
+ (FLAG_IBURST & peer2->flags), MDF_UCAST |
+ MDF_UCLNT, 0, skeyid, sys_ident);
+ if (NULL == peer) {
sys_declined++;
return; /* ignore duplicate */
}
/*
- * We don't need these, but it warms the billboards.
+ * After each ephemeral pool association is spun,
+ * accelerate the next poll for the pool solicitor so
+ * the pool will fill promptly.
*/
- if (peer2->flags & FLAG_IBURST)
- peer->flags |= FLAG_IBURST;
- peer->minpoll = peer2->minpoll;
- peer->maxpoll = peer2->maxpoll;
- break;
+ if (peer2->cast_flags & MDF_POOL)
+ peer2->nextdate = current_time + 1;
+
+ /*
+ * Further processing of the solicitation response would
+ * simply detect its origin timestamp as bogus for the
+ * brand-new association (it matches the prototype
+ * association) and tinker with peer->nextdate delaying
+ * first sync.
+ */
+ return; /* solicitation response handled */
/*
* This is the first packet received from a broadcast server. If
@@ -818,6 +949,16 @@ receive(
* kiss any frogs here.
*/
case AM_NEWBCL:
+
+#ifdef AUTOKEY
+ /*
+ * Do not respond if not the same group.
+ */
+ if (group_test(groupname, sys_ident)) {
+ sys_declined++;
+ return;
+ }
+#endif /* AUTOKEY */
if (sys_bclient == 0) {
sys_restricted++;
return; /* not enabled */
@@ -838,17 +979,17 @@ receive(
return; /* no help */
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* Do not respond if Autokey and the opcode is not a
- * CRYPTO_ASSOC response with associationn ID.
+ * CRYPTO_ASSOC response with association ID.
*/
if (crypto_flags && skeyid > NTP_MAXKEY && (opcode &
0xffff0000) != (CRYPTO_ASSOC | CRYPTO_RESP)) {
sys_declined++;
return; /* protocol error */
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Broadcasts received via a multicast address may
@@ -868,7 +1009,7 @@ receive(
* Determine whether to execute the initial volley.
*/
if (sys_bdelay != 0) {
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If a two-way exchange is not possible,
* neither is Autokey.
@@ -877,23 +1018,22 @@ receive(
sys_restricted++;
return; /* no autokey */
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Do not execute the volley. Start out in
* broadcast client mode.
*/
- peer = newpeer(&rbufp->recv_srcadr, match_ep,
- MODE_BCLIENT, hisversion, pkt->ppoll,
- pkt->ppoll, FLAG_PREEMPT, MDF_BCLNT, 0,
- skeyid);
+ peer = newpeer(&rbufp->recv_srcadr, NULL,
+ match_ep, MODE_BCLIENT, hisversion,
+ pkt->ppoll, pkt->ppoll, FLAG_PREEMPT,
+ MDF_BCLNT, 0, skeyid, sys_ident);
if (NULL == peer) {
sys_restricted++;
return; /* ignore duplicate */
} else {
peer->delay = sys_bdelay;
- peer->bias = -sys_bdelay / 2.;
}
break;
}
@@ -906,18 +1046,18 @@ receive(
* packet, normally 6 (64 s) and that the poll interval
* is fixed at this value.
*/
- peer = newpeer(&rbufp->recv_srcadr, match_ep,
+ peer = newpeer(&rbufp->recv_srcadr, NULL, match_ep,
MODE_CLIENT, hisversion, pkt->ppoll, pkt->ppoll,
FLAG_BC_VOL | FLAG_IBURST | FLAG_PREEMPT, MDF_BCLNT,
- 0, skeyid);
+ 0, skeyid, sys_ident);
if (NULL == peer) {
sys_restricted++;
return; /* ignore duplicate */
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (skeyid > NTP_MAXKEY)
crypto_recv(peer, rbufp);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
return; /* hooray */
@@ -927,6 +1067,16 @@ receive(
* mobilize a passive association. If not, kiss the frog.
*/
case AM_NEWPASS:
+
+#ifdef AUTOKEY
+ /*
+ * Do not respond if not the same group.
+ */
+ if (group_test(groupname, sys_ident)) {
+ sys_declined++;
+ return;
+ }
+#endif /* AUTOKEY */
if (!AUTH(sys_authenticate | (restrict_mask &
(RES_NOPEER | RES_DONTTRUST)), is_authentic)) {
@@ -947,16 +1097,19 @@ receive(
fast_xmit(rbufp, MODE_ACTIVE, 0,
restrict_mask);
sys_restricted++;
+ return;
}
}
/*
- * Do not respond if synchronized and stratum is either
+ * Do not respond if synchronized and if stratum is
* below the floor or at or above the ceiling. Note,
* this allows an unsynchronized peer to synchronize to
* us. It would be very strange if he did and then was
* nipped, but that could only happen if we were
- * operating at the top end of the range.
+ * operating at the top end of the range. It also means
+ * we will spin an ephemeral association in response to
+ * MODE_ACTIVE KoDs, which will time out eventually.
*/
if (hisleap != LEAP_NOTINSYNC && (hisstratum <
sys_floor || hisstratum >= sys_ceiling)) {
@@ -965,13 +1118,13 @@ receive(
}
/*
- * The message is correctly authenticated and
- * allowed. Mobiliae a symmetric passive association.
+ * The message is correctly authenticated and allowed.
+ * Mobilize a symmetric passive association.
*/
- if ((peer = newpeer(&rbufp->recv_srcadr,
+ if ((peer = newpeer(&rbufp->recv_srcadr, NULL,
rbufp->dstadr, MODE_PASSIVE, hisversion, pkt->ppoll,
- NTP_MAXDPOLL, FLAG_PREEMPT, MDF_UCAST, 0,
- skeyid)) == NULL) {
+ NTP_MAXDPOLL, 0, MDF_UCAST, 0, skeyid,
+ sys_ident)) == NULL) {
sys_declined++;
return; /* ignore duplicate */
}
@@ -982,12 +1135,22 @@ receive(
* Process regular packet. Nothing special.
*/
case AM_PROCPKT:
+
+#ifdef AUTOKEY
+ /*
+ * Do not respond if not the same group.
+ */
+ if (group_test(groupname, peer->ident)) {
+ sys_declined++;
+ return;
+ }
+#endif /* AUTOKEY */
break;
/*
* A passive packet matches a passive association. This is
* usually the result of reconfiguring a client on the fly. As
- * this association might be legitamate and this packet an
+ * this association might be legitimate and this packet an
* attempt to deny service, just ignore it.
*/
case AM_ERR:
@@ -1002,7 +1165,7 @@ receive(
return;
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If the association is configured for Autokey, the packet must
* have a public key ID; if not, the packet must have a
@@ -1014,7 +1177,7 @@ receive(
sys_badauth++;
return;
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
peer->received++;
peer->flash &= ~PKT_TEST_MASK;
if (peer->flags & FLAG_XBOGUS) {
@@ -1042,7 +1205,7 @@ receive(
/*
* If this is a broadcast mode packet, skip further checking. If
- * an intial volley, bail out now and let the client do its
+ * an initial volley, bail out now and let the client do its
* stuff. If the origin timestamp is nonzero, this is an
* interleaved broadcast. so restart the protocol.
*/
@@ -1082,14 +1245,14 @@ receive(
/*
* Check for bogus packet in interleaved symmetric mode. This
- * can happen if a packet is lost, duplicat or crossed. If
+ * can happen if a packet is lost, duplicated or crossed. If
* found, flip and resynchronize.
*/
} else if (!L_ISZERO(&peer->dst) && !L_ISEQU(&p_org,
- &peer->dst)) {
- peer->bogusorg++;
- peer->flags |= FLAG_XBOGUS;
- peer->flash |= TEST2; /* bogus */
+ &peer->dst)) {
+ peer->bogusorg++;
+ peer->flags |= FLAG_XBOGUS;
+ peer->flash |= TEST2; /* bogus */
}
/*
@@ -1115,10 +1278,10 @@ receive(
unpeer(peer);
return;
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (peer->crypto)
peer_clear(peer, "AUTH");
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
return;
/*
@@ -1139,17 +1302,17 @@ receive(
unpeer(peer);
return;
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (peer->crypto)
peer_clear(peer, "AUTH");
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
return;
}
/*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
- * this maximumn and advance the headway to give the sender some
+ * this maximum and advance the headway to give the sender some
* headroom. Very intricate.
*/
peer->ppoll = max(peer->minpoll, pkt->ppoll);
@@ -1176,7 +1339,7 @@ receive(
else
peer->flags &= ~FLAG_AUTHENTIC;
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* More autokey dance. The rules of the cha-cha are as follows:
*
@@ -1202,7 +1365,7 @@ receive(
*/
if (peer->flags & FLAG_SKEY) {
/*
- * Decrement remaining audokey hashes. This isn't
+ * Decrement remaining autokey hashes. This isn't
* perfect if a packet is lost, but results in no harm.
*/
ap = (struct autokey *)peer->recval.ptr;
@@ -1281,7 +1444,7 @@ receive(
/*
* The maximum lifetime of the protocol is about one
* week before restarting the Autokey protocol to
- * refreshed certificates and leapseconds values.
+ * refresh certificates and leapseconds values.
*/
if (current_time > peer->refresh) {
report_event(PEVNT_RESTART, peer,
@@ -1290,7 +1453,7 @@ receive(
return;
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* The dance is complete and the flash bits have been lit. Toss
@@ -1306,7 +1469,7 @@ receive(
if (peer->flip != 0) {
peer->rec = p_rec;
peer->dst = rbufp->recv_time;
- if (peer->nextdate - current_time < (1 << min(peer->ppoll,
+ if (peer->nextdate - current_time < (1U << min(peer->ppoll,
peer->hpoll)) / 2)
peer->nextdate++;
else
@@ -1331,7 +1494,7 @@ process_packet(
double t34, t21;
double p_offset, p_del, p_disp;
l_fp p_rec, p_xmt, p_org, p_reftime, ci;
- u_char pmode, pleap, pstratum;
+ u_char pmode, pleap, pversion, pstratum;
char statstr[NTP_MAXSTRLEN];
#ifdef ASSYM
int itemp;
@@ -1349,14 +1512,17 @@ process_packet(
NTOHL_FP(&pkt->xmt, &p_xmt);
pmode = PKT_MODE(pkt->li_vn_mode);
pleap = PKT_LEAP(pkt->li_vn_mode);
+ pversion = PKT_VERSION(pkt->li_vn_mode);
pstratum = PKT_TO_STRATUM(pkt->stratum);
/*
* Capture the header values in the client/peer association..
*/
record_raw_stats(&peer->srcadr, peer->dstadr ?
- &peer->dstadr->sin : NULL, &p_org, &p_rec, &p_xmt,
- &peer->dst);
+ &peer->dstadr->sin : NULL,
+ &p_org, &p_rec, &p_xmt, &peer->dst,
+ pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
+ p_del, p_disp, pkt->refid);
peer->leap = pleap;
peer->stratum = min(pstratum, STRATUM_UNSPEC);
peer->pmode = pmode;
@@ -1463,7 +1629,8 @@ process_packet(
p_del = t21 - t34;
p_offset = (t21 + t34) / 2.;
if (p_del < 0 || p_del > 1.) {
- sprintf(statstr, "t21 %.6f t34 %.6f", t21, t34);
+ snprintf(statstr, sizeof(statstr),
+ "t21 %.6f t34 %.6f", t21, t34);
report_event(PEVNT_XERR, peer, statstr);
return;
}
@@ -1487,7 +1654,7 @@ process_packet(
peer->aorg = p_xmt;
peer->borg = peer->dst;
if (t34 < 0 || t34 > 1.) {
- sprintf(statstr,
+ snprintf(statstr, sizeof(statstr),
"offset %.6f delay %.6f", t21, t34);
report_event(PEVNT_XERR, peer, statstr);
return;
@@ -1515,7 +1682,7 @@ process_packet(
*/
if (FLAG_BC_VOL & peer->flags) {
peer->flags &= ~FLAG_BC_VOL;
- peer->delay = (peer->offset - p_offset) * 2;
+ peer->delay = fabs(peer->offset - p_offset) * 2;
}
p_del = peer->delay;
p_offset += p_del / 2;
@@ -1536,7 +1703,7 @@ process_packet(
p_del = fabs(t21 - t34);
p_offset = (t21 + t34) / 2.;
}
- p_offset += peer->bias;
+ p_del = max(p_del, LOGTOD(sys_precision));
p_disp = LOGTOD(sys_precision) + LOGTOD(peer->precision) +
clock_phi * p_del;
@@ -1613,7 +1780,7 @@ process_packet(
/*
* That was awesome. Now hand off to the clock filter.
*/
- clock_filter(peer, p_offset, p_del, p_disp);
+ clock_filter(peer, p_offset + peer->bias, p_del, p_disp);
/*
* If we are in broadcast calibrate mode, return to broadcast
@@ -1622,16 +1789,16 @@ process_packet(
*/
if ((FLAG_BC_VOL & peer->flags) && MODE_CLIENT == peer->hmode &&
!(TEST11 & peer_unfit(peer))) { /* distance exceeded */
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (peer->flags & FLAG_SKEY) {
if (!(~peer->crypto & CRYPTO_FLAG_ALL))
peer->hmode = MODE_BCLIENT;
} else {
peer->hmode = MODE_BCLIENT;
}
-#else /* OPENSSL */
+#else /* !AUTOKEY follows */
peer->hmode = MODE_BCLIENT;
-#endif /* OPENSSL */
+#endif /* !AUTOKEY */
}
}
@@ -1667,10 +1834,34 @@ clock_update(
sys_refid = peer->refid;
else
sys_refid = addr2refid(&peer->srcadr);
- dtemp = sys_jitter + fabs(sys_offset) + peer->disp +
- (peer->delay + peer->rootdelay) / 2 + clock_phi *
- (current_time - peer->update);
- sys_rootdisp = dtemp + peer->rootdisp;
+ /*
+ * Root Dispersion (E) is defined (in RFC 5905) as:
+ *
+ * E = p.epsilon_r + p.epsilon + p.psi + PHI*(s.t - p.t) + |THETA|
+ *
+ * where:
+ * p.epsilon_r is the PollProc's root dispersion
+ * p.epsilon is the PollProc's dispersion
+ * p.psi is the PollProc's jitter
+ * THETA is the combined offset
+ *
+ * NB: Think Hard about where these numbers come from and
+ * what they mean. When did peer->update happen? Has anything
+ * interesting happened since then? What values are the most
+ * defensible? Why?
+ *
+ * DLM thinks this equation is probably the best of all worse choices.
+ */
+ dtemp = peer->rootdisp
+ + peer->disp
+ + sys_jitter
+ + clock_phi * (current_time - peer->update)
+ + fabs(sys_offset);
+
+ if (dtemp > sys_mindisp)
+ sys_rootdisp = dtemp;
+ else
+ sys_rootdisp = sys_mindisp;
sys_rootdelay = peer->delay + peer->rootdelay;
sys_reftime = peer->dst;
@@ -1723,7 +1914,7 @@ clock_update(
sys_rootdisp = 0;
L_CLR(&sys_reftime);
sys_jitter = LOGTOD(sys_precision);
- leapsec = 0;
+ leapsec_reset_frame();
break;
/*
@@ -1738,44 +1929,43 @@ clock_update(
*/
if (sys_leap == LEAP_NOTINSYNC) {
sys_leap = LEAP_NOWARNING;
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (crypto_flags)
crypto_update();
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+ /*
+ * If our parent process is waiting for the
+ * first clock sync, send them home satisfied.
+ */
+#ifdef HAVE_WORKING_FORK
+ if (waitsync_fd_to_close != -1) {
+ close(waitsync_fd_to_close);
+ waitsync_fd_to_close = -1;
+ DPRINTF(1, ("notified parent --wait-sync is done\n"));
+ }
+#endif /* HAVE_WORKING_FORK */
+
}
/*
- * If the leapseconds values are from file or network
- * and the leap is in the future, schedule a leap at the
- * given epoch. Otherwise, if the number of survivor
- * leap bits is greater than half the number of
- * survivors, schedule a leap for the end of the current
- * month.
+ * If there is no leap second pending and the number of
+ * survivor leap bits is greater than half the number of
+ * survivors, try to schedule a leap for the end of the
+ * current month. (This only works if no leap second for
+ * that range is in the table, so doing this more than
+ * once is mostly harmless.)
*/
- get_systime(&now);
- if (leap_sec > 0) {
- if (leap_sec > now.l_ui) {
- sys_tai = leap_tai - 1;
- if (leapsec == 0)
- report_event(EVNT_ARMED, NULL,
- NULL);
- leapsec = leap_sec - now.l_ui;
- } else {
- sys_tai = leap_tai;
+ if (leapsec == LSPROX_NOWARN) {
+ if (leap_vote_ins > leap_vote_del
+ && leap_vote_ins > sys_survivors / 2) {
+ get_systime(&now);
+ leapsec_add_dyn(TRUE, now.l_ui, NULL);
}
- break;
-
- } else if (leap_vote > sys_survivors / 2) {
- leap_peers = now.l_ui + leap_month(now.l_ui);
- if (leap_peers > now.l_ui) {
- if (leapsec == 0)
- report_event(PEVNT_ARMED, peer,
- NULL);
- leapsec = leap_peers - now.l_ui;
+ if (leap_vote_del > leap_vote_ins
+ && leap_vote_del > sys_survivors / 2) {
+ get_systime(&now);
+ leapsec_add_dyn(FALSE, now.l_ui, NULL);
}
- } else if (leapsec > 0) {
- report_event(EVNT_DISARMED, NULL, NULL);
- leapsec = 0;
}
break;
@@ -1795,11 +1985,11 @@ clock_update(
void
poll_update(
struct peer *peer, /* peer structure pointer */
- int mpoll
+ u_char mpoll
)
{
- int hpoll, minpkt;
u_long next, utemp;
+ u_char hpoll;
/*
* This routine figures out when the next poll should be sent.
@@ -1808,18 +1998,11 @@ poll_update(
* the poll interval is reduced. We watch out for races here
* between the receive process and the poll process.
*
- * First, bracket the poll interval according to the type of
- * association and options. If a fixed interval is configured,
- * use minpoll. This primarily is for reference clocks, but
- * works for any association. Otherwise, clamp the poll interval
- * between minpoll and maxpoll.
- */
- if (peer->cast_flags & MDF_BCLNT)
- hpoll = peer->minpoll;
- else
- hpoll = max(min(peer->maxpoll, mpoll), peer->minpoll);
+ * Clamp the poll interval between minpoll and maxpoll.
+ */
+ hpoll = max(min(peer->maxpoll, mpoll), peer->minpoll);
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If during the crypto protocol the poll interval has changed,
* the lifetimes in the key list are probably bogus. Purge the
@@ -1827,7 +2010,7 @@ poll_update(
*/
if ((peer->flags & FLAG_SKEY) && hpoll != peer->hpoll)
key_expire(peer);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
peer->hpoll = hpoll;
/*
@@ -1838,7 +2021,7 @@ poll_update(
* sending in a burst, use the earliest time. When not in a
* burst but with a reply pending, send at the earliest time
* unless the next scheduled time has not advanced. This can
- * only happen if multiple replies are peinding in the same
+ * only happen if multiple replies are pending in the same
* response interval. Otherwise, send at the later of the next
* scheduled time and the earliest time.
*
@@ -1847,9 +2030,8 @@ poll_update(
* slink away. If called from the poll process, delay 1 s for a
* reference clock, otherwise 2 s.
*/
- minpkt = 1 << ntp_minpkt;
utemp = current_time + max(peer->throttle - (NTP_SHIFT - 1) *
- (1 << peer->minpoll), minpkt);
+ (1 << peer->minpoll), ntp_minpkt);
if (peer->burst > 0) {
if (peer->nextdate > current_time)
return;
@@ -1860,19 +2042,19 @@ poll_update(
else
peer->nextdate = utemp;
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If a burst is not in progress and a crypto response message
* is pending, delay 2 s, but only if this is a new interval.
*/
} else if (peer->cmmd != NULL) {
if (peer->nextdate > current_time) {
- if (peer->nextdate + minpkt != utemp)
+ if (peer->nextdate + ntp_minpkt != utemp)
peer->nextdate = utemp;
} else {
peer->nextdate = utemp;
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* The ordinary case. If a retry, use minpoll; if unreachable,
@@ -1893,29 +2075,22 @@ poll_update(
if (peer->flags & FLAG_REFCLOCK)
next = 1 << hpoll;
else
+#endif /* REFCLOCK */
next = ((0x1000UL | (ntp_random() & 0x0ff)) <<
hpoll) >> 12;
-#else /* REFCLOCK */
- next = ((0x1000UL | (ntp_random() & 0x0ff)) << hpoll) >>
- 12;
-#endif /* REFCLOCK */
next += peer->outdate;
if (next > utemp)
peer->nextdate = next;
else
peer->nextdate = utemp;
- hpoll = peer->throttle - (1 << peer->minpoll);
- if (hpoll > 0)
- peer->nextdate += minpkt;
+ if (peer->throttle > (1 << peer->minpoll))
+ peer->nextdate += ntp_minpkt;
}
-#ifdef DEBUG
- if (debug > 1)
- printf("poll_update: at %lu %s poll %d burst %d retry %d head %d early %lu next %lu\n",
+ DPRINTF(2, ("poll_update: at %lu %s poll %d burst %d retry %d head %d early %lu next %lu\n",
current_time, ntoa(&peer->srcadr), peer->hpoll,
peer->burst, peer->retry, peer->throttle,
utemp - current_time, peer->nextdate -
- current_time);
-#endif
+ current_time));
}
@@ -1929,9 +2104,9 @@ peer_clear(
char *ident /* tally lights */
)
{
- int i;
+ u_char u;
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* If cryptographic credentials have been acquired, toss them to
* Valhalla. Note that autokeys are ephemeral, in that they are
@@ -1954,12 +2129,12 @@ peer_clear(
free(peer->subject);
if (peer->issuer != NULL)
free(peer->issuer);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Clear all values, including the optional crypto values above.
*/
- memset(CLEAR_TO_ZERO(peer), 0, LEN_CLEAR_TO_ZERO);
+ memset(CLEAR_TO_ZERO(peer), 0, LEN_CLEAR_TO_ZERO(peer));
peer->ppoll = peer->maxpoll;
peer->hpoll = peer->minpoll;
peer->disp = MAXDISPERSE;
@@ -1971,39 +2146,39 @@ peer_clear(
*/
if (peer->flags & FLAG_XLEAVE)
peer->flip = 1;
- for (i = 0; i < NTP_SHIFT; i++) {
- peer->filter_order[i] = i;
- peer->filter_disp[i] = MAXDISPERSE;
+ for (u = 0; u < NTP_SHIFT; u++) {
+ peer->filter_order[u] = u;
+ peer->filter_disp[u] = MAXDISPERSE;
}
#ifdef REFCLOCK
if (!(peer->flags & FLAG_REFCLOCK)) {
+#endif
peer->leap = LEAP_NOTINSYNC;
peer->stratum = STRATUM_UNSPEC;
memcpy(&peer->refid, ident, 4);
+#ifdef REFCLOCK
}
-#else
- peer->leap = LEAP_NOTINSYNC;
- peer->stratum = STRATUM_UNSPEC;
- memcpy(&peer->refid, ident, 4);
-#endif /* REFCLOCK */
+#endif
/*
* During initialization use the association count to spread out
- * the polls at one-second intervals. Otherwise, randomize over
- * the minimum poll interval in order to avoid broadcast
- * implosion.
+ * the polls at one-second intervals. Passive associations'
+ * first poll is delayed by the "discard minimum" to avoid rate
+ * limiting. Other post-startup new or cleared associations
+ * randomize the first poll over the minimum poll interval to
+ * avoid implosion.
*/
peer->nextdate = peer->update = peer->outdate = current_time;
if (initializing) {
peer->nextdate += peer_associations;
- } else if (peer->hmode == MODE_PASSIVE) {
- peer->nextdate += 1 << ntp_minpkt;
+ } else if (MODE_PASSIVE == peer->hmode) {
+ peer->nextdate += ntp_minpkt;
} else {
- peer->nextdate += ntp_random() % peer_associations;
+ peer->nextdate += ntp_random() % peer->minpoll;
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
peer->refresh = current_time + (1 << NTP_REFRESH);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#ifdef DEBUG
if (debug)
printf(
@@ -2069,7 +2244,7 @@ clock_filter(
peer->filter_disp[j] = MAXDISPERSE;
dst[i] = MAXDISPERSE;
} else if (peer->update - peer->filter_epoch[j] >
- ULOGTOD(allan_xpt)) {
+ (u_long)ULOGTOD(allan_xpt)) {
dst[i] = peer->filter_delay[j] +
peer->filter_disp[j];
} else {
@@ -2079,11 +2254,10 @@ clock_filter(
j = (j + 1) % NTP_SHIFT;
}
- /*
- * If the clock discipline has stabilized, sort the samples by
- * distance.
+ /*
+ * If the clock has stabilized, sort the samples by distance.
*/
- if (sys_leap != LEAP_NOTINSYNC) {
+ if (freq_cnt == 0) {
for (i = 1; i < NTP_SHIFT; i++) {
for (j = 0; j < i; j++) {
if (dst[j] > dst[i]) {
@@ -2143,7 +2317,6 @@ clock_filter(
clock_select();
return;
}
-
etemp = fabs(peer->offset - peer->filter_offset[k]);
peer->offset = peer->filter_offset[k];
peer->delay = peer->filter_delay[k];
@@ -2176,7 +2349,7 @@ clock_filter(
*/
if (peer->filter_epoch[k] <= peer->epoch) {
#if DEBUG
- if (debug)
+ if (debug > 1)
printf("clock_filter: old sample %lu\n", current_time -
peer->filter_epoch[k]);
#endif
@@ -2208,7 +2381,7 @@ clock_filter(
*
* LOCKCLOCK: (1) 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
+ * 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.
*/
@@ -2217,14 +2390,15 @@ clock_select(void)
{
struct peer *peer;
int i, j, k, n;
- int nlist, nl3;
+ int nlist, nl2;
int allow, osurv;
+ int speer;
double d, e, f, g;
double high, low;
- double seljitter;
- double synch[NTP_MAXASSOC], error[NTP_MAXASSOC];
+ double speermet;
double orphmet = 2.0 * U_INT32_MAX; /* 2x is greater than */
- struct peer *osys_peer = NULL;
+ struct endpoint endp;
+ struct peer *osys_peer;
struct peer *sys_prefer = NULL; /* prefer peer */
struct peer *typesystem = NULL;
struct peer *typeorphan = NULL;
@@ -2233,14 +2407,13 @@ clock_select(void)
struct peer *typelocal = NULL;
struct peer *typepps = NULL;
#endif /* REFCLOCK */
-
- static int list_alloc = 0;
static struct endpoint *endpoint = NULL;
static int *indx = NULL;
- static struct peer **peer_list = NULL;
+ static peer_select *peers = NULL;
static u_int endpoint_size = 0;
+ static u_int peers_size = 0;
static u_int indx_size = 0;
- static u_int peer_list_size = 0;
+ size_t octets;
/*
* Initialize and create endpoint, index and peer lists big
@@ -2254,25 +2427,21 @@ clock_select(void)
sys_stratum = STRATUM_UNSPEC;
memcpy(&sys_refid, "DOWN", 4);
#endif /* LOCKCLOCK */
- nlist = 0;
- for (n = 0; n < NTP_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 = (struct endpoint *)emalloc(endpoint_size);
- indx = (int *)emalloc(indx_size);
- peer_list = (struct peer **)emalloc(peer_list_size);
- }
+
+ /*
+ * Allocate dynamic space depending on the number of
+ * associations.
+ */
+ nlist = 1;
+ for (peer = peer_list; peer != NULL; peer = peer->p_link)
+ nlist++;
+ endpoint_size = ALIGNED_SIZE(nlist * 2 * sizeof(*endpoint));
+ peers_size = ALIGNED_SIZE(nlist * sizeof(*peers));
+ indx_size = ALIGNED_SIZE(nlist * 2 * sizeof(*indx));
+ octets = endpoint_size + peers_size + indx_size;
+ endpoint = erealloc(endpoint, octets);
+ peers = INC_ALIGNED_PTR(endpoint, endpoint_size);
+ indx = INC_ALIGNED_PTR(peers, peers_size);
/*
* Initially, we populate the island with all the rifraff peers
@@ -2284,135 +2453,130 @@ clock_select(void)
* 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 < NTP_HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != NULL; peer =
- peer->next) {
- peer->new_status = CTL_PST_SEL_REJECT;
+ nlist = nl2 = 0; /* none yet */
+ for (peer = peer_list; peer != NULL; peer = peer->p_link) {
+ peer->new_status = CTL_PST_SEL_REJECT;
- /*
- * Leave the island immediately if the peer is
- * unfit to synchronize.
- */
- if (peer_unfit(peer))
- continue;
+ /*
+ * Leave the island immediately if the peer is
+ * unfit to synchronize.
+ */
+ if (peer_unfit(peer))
+ continue;
- /*
- * If this peer is an orphan parent, elect the
- * one with the lowest metric defined as the
- * IPv4 address or the first 64 bits of the
- * hashed IPv6 address. To ensure convergence
- * on the same selected orphan, consider as
- * well that this system may have the lowest
- * metric and be the orphan parent. If this
- * system wins, sys_peer will be NULL to trigger
- * orphan mode in timer().
- */
- if (peer->stratum == sys_orphan) {
- u_int32 localmet;
- u_int32 peermet;
+ /*
+ * If this peer is an orphan parent, elect the
+ * one with the lowest metric defined as the
+ * IPv4 address or the first 64 bits of the
+ * hashed IPv6 address. To ensure convergence
+ * on the same selected orphan, consider as
+ * well that this system may have the lowest
+ * metric and be the orphan parent. If this
+ * system wins, sys_peer will be NULL to trigger
+ * orphan mode in timer().
+ */
+ if (peer->stratum == sys_orphan) {
+ u_int32 localmet;
+ u_int32 peermet;
- if (peer->dstadr != NULL)
- localmet = ntohl(peer->dstadr->addr_refid);
- else
- localmet = U_INT32_MAX;
- peermet = ntohl(addr2refid(&peer->srcadr));
- if (peermet < localmet &&
- peermet < orphmet) {
- typeorphan = peer;
- orphmet = peermet;
- }
- continue;
+ if (peer->dstadr != NULL)
+ localmet = ntohl(peer->dstadr->addr_refid);
+ else
+ localmet = U_INT32_MAX;
+ peermet = ntohl(addr2refid(&peer->srcadr));
+ if (peermet < localmet && peermet < orphmet) {
+ typeorphan = peer;
+ orphmet = peermet;
}
+ continue;
+ }
- /*
- * If this peer could have the orphan parent
- * as a synchronization ancestor, exclude it
- * from selection to avoid forming a
- * synchronization loop within the orphan mesh,
- * triggering stratum climb to infinity
- * instability. Peers at stratum higher than
- * the orphan stratum could have the orphan
- * parent in ancestry so are excluded.
- * See http://bugs.ntp.org/2050
- */
- if (peer->stratum > sys_orphan)
- continue;
+ /*
+ * If this peer could have the orphan parent
+ * as a synchronization ancestor, exclude it
+ * from selection to avoid forming a
+ * synchronization loop within the orphan mesh,
+ * triggering stratum climb to infinity
+ * instability. Peers at stratum higher than
+ * the orphan stratum could have the orphan
+ * parent in ancestry so are excluded.
+ * See http://bugs.ntp.org/2050
+ */
+ if (peer->stratum > sys_orphan)
+ continue;
#ifdef REFCLOCK
- /*
- * The following are special cases. We deal
- * with them later.
- */
- if (!(peer->flags & FLAG_PREFER)) {
- switch (peer->refclktype) {
- case REFCLK_LOCALCLOCK:
- if (typelocal == NULL)
- typelocal = peer;
- continue;
-
- case REFCLK_ACTS:
- if (typeacts == NULL)
- typeacts = peer;
- continue;
- }
- }
-#endif /* REFCLOCK */
-
- /*
- * If we get this far, the peer can stay on the
- * island, but does not yet have the immunity
- * idol.
- */
- peer->new_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;
+ /*
+ * The following are special cases. We deal
+ * with them later.
+ */
+ if (!(peer->flags & FLAG_PREFER)) {
+ switch (peer->refclktype) {
+ case REFCLK_LOCALCLOCK:
+ if (current_time > orphwait &&
+ typelocal == NULL)
+ typelocal = peer;
+ continue;
- indx[i + 2] = indx[i];
+ case REFCLK_ACTS:
+ if (current_time > orphwait &&
+ typeacts == NULL)
+ typeacts = peer;
+ continue;
}
- indx[i + 2] = nl3;
- endpoint[nl3].type = 0;
- endpoint[nl3++].val = e;
+ }
+#endif /* REFCLOCK */
- e = e - f; /* Lower end */
- for (; i >= 0; i--) {
- if (e >= endpoint[indx[i]].val)
- break;
+ /*
+ * If we get this far, the peer can stay on the
+ * island, but does not yet have the immunity
+ * idol.
+ */
+ peer->new_status = CTL_PST_SEL_SANE;
+ f = root_distance(peer);
+ peers[nlist].peer = peer;
+ peers[nlist].error = peer->jitter;
+ peers[nlist].synch = f;
+ nlist++;
- indx[i + 1] = indx[i];
+ /*
+ * Insert each interval endpoint on the unsorted
+ * endpoint[] list.
+ */
+ e = peer->offset;
+ endpoint[nl2].type = -1; /* lower end */
+ endpoint[nl2].val = e - f;
+ nl2++;
+ endpoint[nl2].type = 1; /* upper end */
+ endpoint[nl2].val = e + f;
+ nl2++;
+ }
+ /*
+ * Construct sorted indx[] of endpoint[] indexes ordered by
+ * offset.
+ */
+ for (i = 0; i < nl2; i++)
+ indx[i] = i;
+ for (i = 0; i < nl2; i++) {
+ endp = endpoint[indx[i]];
+ e = endp.val;
+ k = i;
+ for (j = i + 1; j < nl2; j++) {
+ endp = endpoint[indx[j]];
+ if (endp.val < e) {
+ e = endp.val;
+ k = j;
}
- indx[i + 1] = nl3;
- endpoint[nl3].type = -1;
- endpoint[nl3++].val = e;
+ }
+ if (k != i) {
+ j = indx[k];
+ indx[k] = indx[i];
+ indx[i] = j;
}
}
-#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
+ for (i = 0; i < nl2; i++)
+ DPRINTF(3, ("select: endpoint %2d %.6f\n",
+ endpoint[indx[i]].type, endpoint[indx[i]].val));
+
/*
* This is the actual algorithm that cleaves the truechimers
* from the falsetickers. The original algorithm was described
@@ -2438,43 +2602,27 @@ clock_select(void)
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.
+ * Bound the interval (low, high) as the smallest
+ * interval containing points from the most sources.
*/
- found = 0;
n = 0;
- for (i = 0; i < nl3; i++) {
+ for (i = 0; i < nl2; 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--) {
+ for (j = nl2 - 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.
@@ -2484,18 +2632,25 @@ clock_select(void)
}
/*
- * Clustering algorithm. Construct candidate list in order first
- * by stratum then by root distance, but keep only the best
- * NTP_MAXASSOC of them. Scan the list to find falsetickers, who
- * leave the island immediately. The TRUE peer is always a
+ * Clustering algorithm. Whittle candidate list of falsetickers,
+ * who leave the island immediately. The TRUE peer is always a
* truechimer. We must leave at least one peer to collect the
* million bucks.
+ *
+ * We assert the correct time is contained in the interval, but
+ * the best offset estimate for the interval might not be
+ * contained in the interval. For this purpose, a truechimer is
+ * defined as the midpoint of an interval that overlaps the
+ * intersection interval.
*/
j = 0;
for (i = 0; i < nlist; i++) {
- peer = peer_list[i];
- if (nlist > 1 && (peer->offset <= low || peer->offset >=
- high) && !(peer->flags & FLAG_TRUE))
+ double h;
+
+ peer = peers[i].peer;
+ h = peers[i].synch;
+ if ((high <= low || peer->offset + h < low ||
+ peer->offset - h > high) && !(peer->flags & FLAG_TRUE))
continue;
#ifdef REFCLOCK
@@ -2511,29 +2666,8 @@ clock_select(void)
}
#endif /* REFCLOCK */
- /*
- * The metric is the scaled root distance at the next
- * poll interval plus the peer stratum.
- */
- d = (root_distance(peer) + clock_phi * (peer->nextdate -
- current_time)) / sys_maxdist + peer->stratum;
- if (j >= NTP_MAXASSOC) {
- 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;
+ if (j != i)
+ peers[j] = peers[i];
j++;
}
nlist = j;
@@ -2545,19 +2679,19 @@ clock_select(void)
* Otherwise, give up and leave the island to the rats.
*/
if (nlist == 0) {
- error[0] = 0;
- synch[0] = 0;
+ peers[0].error = 0;
+ peers[0].synch = sys_mindisp;
#ifdef REFCLOCK
if (typeacts != NULL) {
- peer_list[0] = typeacts;
+ peers[0].peer = typeacts;
nlist = 1;
} else if (typelocal != NULL) {
- peer_list[0] = typelocal;
+ peers[0].peer = typelocal;
nlist = 1;
} else
#endif /* REFCLOCK */
if (typeorphan != NULL) {
- peer_list[0] = typeorphan;
+ peers[0].peer = typeorphan;
nlist = 1;
}
}
@@ -2566,107 +2700,121 @@ clock_select(void)
* Mark the candidates at this point as truechimers.
*/
for (i = 0; i < nlist; i++) {
- peer_list[i]->new_status = CTL_PST_SEL_SELCAND;
-#ifdef DEBUG
- if (debug > 1)
- printf("select: survivor %s %f\n",
- stoa(&peer_list[i]->srcadr), synch[i]);
-#endif
+ peers[i].peer->new_status = CTL_PST_SEL_SELCAND;
+ DPRINTF(2, ("select: survivor %s %f\n",
+ stoa(&peers[i].peer->srcadr), peers[i].synch));
}
/*
* Now, vote outlyers off the island by select jitter weighted
* by root distance. Continue voting as long as there are more
- * than sys_minclock survivors and the minimum select jitter is
- * greater than the maximum peer jitter. Stop if we are about to
- * discard a TRUE or PREFER peer, who of course has the
- * immunity idol.
+ * than sys_minclock survivors and the select jitter of the peer
+ * with the worst metric is greater than the minimum peer
+ * jitter. Stop if we are about to discard a TRUE or PREFER
+ * peer, who of course have the immunity idol.
*/
- seljitter = 0;
while (1) {
d = 1e9;
e = -1e9;
- f = g = 0;
+ g = 0;
k = 0;
for (i = 0; i < nlist; i++) {
- if (error[i] < d)
- d = error[i];
- f = 0;
+ if (peers[i].error < d)
+ d = peers[i].error;
+ peers[i].seljit = 0;
if (nlist > 1) {
+ f = 0;
for (j = 0; j < nlist; j++)
- f += DIFF(peer_list[j]->offset,
- peer_list[i]->offset);
- f = SQRT(f / (nlist - 1));
+ f += DIFF(peers[j].peer->offset,
+ peers[i].peer->offset);
+ peers[i].seljit = SQRT(f / (nlist - 1));
}
- if (f * synch[i] > e) {
- g = f;
- e = f * synch[i];
+ if (peers[i].seljit * peers[i].synch > e) {
+ g = peers[i].seljit;
+ e = peers[i].seljit * peers[i].synch;
k = i;
}
}
- f = max(f, LOGTOD(sys_precision));
- if (nlist <= sys_minsane || nlist <= sys_minclock) {
+ g = max(g, LOGTOD(sys_precision));
+ if (nlist <= max(1, sys_minclock) || g <= d ||
+ ((FLAG_TRUE | FLAG_PREFER) & peers[k].peer->flags))
break;
- } else if (f <= d || peer_list[k]->flags &
- (FLAG_TRUE | FLAG_PREFER)) {
- seljitter = f;
- break;
- }
-#ifdef DEBUG
- if (debug > 2)
- printf(
- "select: drop %s seljit %.6f jit %.6f\n",
- ntoa(&peer_list[k]->srcadr), g, d);
-#endif
+ DPRINTF(3, ("select: drop %s seljit %.6f jit %.6f\n",
+ ntoa(&peers[k].peer->srcadr), g, d));
if (nlist > sys_maxclock)
- peer_list[k]->new_status = CTL_PST_SEL_EXCESS;
- for (j = k + 1; j < nlist; j++) {
- peer_list[j - 1] = peer_list[j];
- synch[j - 1] = synch[j];
- error[j - 1] = error[j];
- }
+ peers[k].peer->new_status = CTL_PST_SEL_EXCESS;
+ for (j = k + 1; j < nlist; j++)
+ peers[j - 1] = peers[j];
nlist--;
}
/*
* What remains is a list usually not greater than sys_minclock
- * peers. Note that the head of the list is the system peer at
- * the lowest stratum and that unsynchronized peers cannot
- * survive this far.
+ * peers. Note that unsynchronized peers cannot survive this
+ * far. Count and mark these survivors.
*
* While at it, count the number of leap warning bits found.
* This will be used later to vote the system leap warning bit.
* If a leap warning bit is found on a reference clock, the vote
* is always won.
+ *
+ * Choose the system peer using a hybrid metric composed of the
+ * selection jitter scaled by the root distance augmented by
+ * stratum scaled by sys_mindisp (.001 by default). The goal of
+ * the small stratum factor is to avoid clockhop between a
+ * reference clock and a network peer which has a refclock and
+ * is using an older ntpd, which does not floor sys_rootdisp at
+ * sys_mindisp.
+ *
+ * In contrast, ntpd 4.2.6 and earlier used stratum primarily
+ * in selecting the system peer, using a weight of 1 second of
+ * additional root distance per stratum. This heavy bias is no
+ * longer appropriate, as the scaled root distance provides a
+ * more rational metric carrying the cumulative error budget.
*/
- leap_vote = 0;
+ e = 1e9;
+ speer = 0;
+ leap_vote_ins = 0;
+ leap_vote_del = 0;
for (i = 0; i < nlist; i++) {
- peer = peer_list[i];
+ peer = peers[i].peer;
peer->unreach = 0;
peer->new_status = CTL_PST_SEL_SYNCCAND;
sys_survivors++;
if (peer->leap == LEAP_ADDSECOND) {
if (peer->flags & FLAG_REFCLOCK)
- leap_vote = nlist;
- else
- leap_vote++;
+ leap_vote_ins = nlist;
+ else if (leap_vote_ins < nlist)
+ leap_vote_ins++;
+ }
+ if (peer->leap == LEAP_DELSECOND) {
+ if (peer->flags & FLAG_REFCLOCK)
+ leap_vote_del = nlist;
+ else if (leap_vote_del < nlist)
+ leap_vote_del++;
}
if (peer->flags & FLAG_PREFER)
sys_prefer = peer;
+ speermet = peers[i].seljit * peers[i].synch +
+ peer->stratum * sys_mindisp;
+ if (speermet < e) {
+ e = speermet;
+ speer = i;
+ }
}
/*
* Unless there are at least sys_misane survivors, leave the
* building dark. Otherwise, do a clockhop dance. Ordinarily,
- * use the first survivor on the survivor list. However, if the
- * last selection is not first on the list, use it as long as
- * it doesn't get too old or too ugly.
+ * use the selected survivor speer. However, if the current
+ * system peer is not speer, stay with the current system peer
+ * as long as it doesn't get too old or too ugly.
*/
if (nlist > 0 && nlist >= sys_minsane) {
double x;
- typesystem = peer_list[0];
+ typesystem = peers[speer].peer;
if (osys_peer == NULL || osys_peer == typesystem) {
sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
@@ -2675,11 +2823,8 @@ clock_select(void)
sys_clockhop = sys_mindisp;
else
sys_clockhop *= .5;
-#ifdef DEBUG
- if (debug)
- printf("select: clockhop %d %.6f %.6f\n",
- j, x, sys_clockhop);
-#endif
+ DPRINTF(1, ("select: clockhop %d %.6f %.6f\n",
+ j, x, sys_clockhop));
if (fabs(x) < sys_clockhop)
typesystem = osys_peer;
else
@@ -2698,9 +2843,7 @@ clock_select(void)
if (typesystem != NULL) {
if (sys_prefer == NULL) {
typesystem->new_status = CTL_PST_SEL_SYSPEER;
- clock_combine(peer_list, sys_survivors);
- sys_jitter = SQRT(SQUARE(sys_jitter) +
- SQUARE(seljitter));
+ clock_combine(peers, sys_survivors, speer);
} else {
typesystem = sys_prefer;
sys_clockhop = 0;
@@ -2708,11 +2851,8 @@ clock_select(void)
sys_offset = typesystem->offset;
sys_jitter = typesystem->jitter;
}
-#ifdef DEBUG
- if (debug)
- printf("select: combine offset %.9f jitter %.9f\n",
- sys_offset, sys_jitter);
-#endif
+ DPRINTF(1, ("select: combine offset %.9f jitter %.9f\n",
+ sys_offset, sys_jitter));
}
#ifdef REFCLOCK
/*
@@ -2731,11 +2871,8 @@ clock_select(void)
typesystem->new_status = CTL_PST_SEL_PPS;
sys_offset = typesystem->offset;
sys_jitter = typesystem->jitter;
-#ifdef DEBUG
- if (debug)
- printf("select: pps offset %.9f jitter %.9f\n",
- sys_offset, sys_jitter);
-#endif
+ DPRINTF(1, ("select: pps offset %.9f jitter %.9f\n",
+ sys_offset, sys_jitter));
}
#endif /* REFCLOCK */
@@ -2745,13 +2882,14 @@ clock_select(void)
* current statistics, but do not update the clock.
*/
if (typesystem == NULL) {
- if (osys_peer != NULL)
+ if (osys_peer != NULL) {
+ if (sys_orphwait > 0)
+ orphwait = current_time + sys_orphwait;
report_event(EVNT_NOPEER, NULL, NULL);
- sys_peer = NULL;
- for (n = 0; n < NTP_HASH_SIZE; n++)
- for (peer = peer_hash[n]; peer != NULL; peer =
- peer->next)
- peer->status = peer->new_status;
+ }
+ sys_peer = NULL;
+ for (peer = peer_list; peer != NULL; peer = peer->p_link)
+ peer->status = peer->new_status;
return;
}
@@ -2767,21 +2905,17 @@ clock_select(void)
*/
if (osys_peer != typesystem)
report_event(PEVNT_NEWPEER, typesystem, NULL);
- for (n = 0; n < NTP_HASH_SIZE; n++)
- for (peer = peer_hash[n]; peer != NULL; peer =
- peer->next)
- peer->status = peer->new_status;
+ for (peer = peer_list; peer != NULL; peer = peer->p_link)
+ peer->status = peer->new_status;
clock_update(typesystem);
}
-/*
- * clock_combine - compute system offset and jitter from selected peers
- */
static void
clock_combine(
- struct peer **peers, /* survivor list */
- int npeers /* number of survivors */
+ peer_select * peers, /* survivor list */
+ int npeers, /* number of survivors */
+ int syspeer /* index of sys.peer */
)
{
int i;
@@ -2789,13 +2923,14 @@ clock_combine(
y = z = w = 0;
for (i = 0; i < npeers; i++) {
- x = root_distance(peers[i]);
- y += 1. / x;
- z += peers[i]->offset / x;
- w += SQUARE(peers[i]->offset - peers[0]->offset) / x;
+ x = 1. / peers[i].synch;
+ y += x;
+ z += x * peers[i].peer->offset;
+ w += x * DIFF(peers[i].peer->offset,
+ peers[syspeer].peer->offset);
}
sys_offset = z / y;
- sys_jitter = SQRT(w / y);
+ sys_jitter = SQRT(w / y + SQUARE(peers[syspeer].seljit));
}
@@ -2810,15 +2945,36 @@ root_distance(
double dtemp;
/*
+ * Root Distance (LAMBDA) is defined as:
+ * (delta + DELTA)/2 + epsilon + EPSILON + phi
+ *
+ * where:
+ * delta is the round-trip delay
+ * DELTA is the root delay
+ * epsilon is the remote server precision + local precision
+ * + (15 usec each second)
+ * EPSILON is the root dispersion
+ * phi is the peer jitter statistic
+ *
+ * NB: Think hard about why we are using these values, and what
+ * the alternatives are, and the various pros/cons.
+ *
+ * DLM thinks these are probably the best choices from any of the
+ * other worse choices.
+ */
+ dtemp = (peer->delay + peer->rootdelay) / 2
+ + LOGTOD(peer->precision)
+ + LOGTOD(sys_precision)
+ + clock_phi * (current_time - peer->update)
+ + peer->rootdisp
+ + peer->jitter;
+ /*
* Careful squeak here. The value returned must be greater than
* the minimum root dispersion in order to avoid clockhop with
* highly precise reference clocks. Note that the root distance
* cannot exceed the sys_maxdist, as this is the cutoff by the
* selection algorithm.
*/
- dtemp = (peer->delay + peer->rootdelay) / 2 + peer->disp +
- peer->rootdisp + clock_phi * (current_time - peer->update) +
- peer->jitter;
if (dtemp < sys_mindisp)
dtemp = sys_mindisp;
return (dtemp);
@@ -2866,11 +3022,11 @@ peer_xmit(
* might not be usable.
*/
sendlen = LEN_PKT_NOMAC;
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (!(peer->flags & FLAG_SKEY) && peer->keyid == 0) {
-#else
+#else /* !AUTOKEY follows */
if (peer->keyid == 0) {
-#endif /* OPENSSL */
+#endif /* !AUTOKEY */
/*
* Transmit a-priori timestamps
@@ -2931,7 +3087,7 @@ peer_xmit(
* authenticated. If autokey is enabled, fuss with the various
* modes; otherwise, symmetric key cryptography is used.
*/
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (peer->flags & FLAG_SKEY) {
struct exten *exten; /* extension field */
@@ -3028,7 +3184,7 @@ peer_xmit(
*/
if (!peer->crypto)
exten = crypto_args(peer, CRYPTO_ASSOC,
- peer->associd, sys_hostname);
+ peer->associd, hostval.ptr);
else if (!(peer->crypto & CRYPTO_FLAG_CERT))
exten = crypto_args(peer, CRYPTO_CERT,
peer->associd, peer->issuer);
@@ -3071,7 +3227,7 @@ peer_xmit(
else if (!(peer->crypto & CRYPTO_FLAG_SIGN))
exten = crypto_args(peer, CRYPTO_SIGN,
- peer->associd, sys_hostname);
+ peer->associd, hostval.ptr);
else if (!(peer->crypto & CRYPTO_FLAG_LEAP))
exten = crypto_args(peer, CRYPTO_LEAP,
peer->associd, NULL);
@@ -3095,7 +3251,7 @@ peer_xmit(
*/
if (!peer->crypto)
exten = crypto_args(peer, CRYPTO_ASSOC,
- peer->associd, sys_hostname);
+ peer->associd, hostval.ptr);
else if (!(peer->crypto & CRYPTO_FLAG_CERT))
exten = crypto_args(peer, CRYPTO_CERT,
peer->associd, peer->issuer);
@@ -3126,7 +3282,7 @@ peer_xmit(
else if (!(peer->crypto & CRYPTO_FLAG_SIGN))
exten = crypto_args(peer, CRYPTO_SIGN,
- peer->associd, sys_hostname);
+ peer->associd, hostval.ptr);
else if (!(peer->crypto & CRYPTO_FLAG_LEAP))
exten = crypto_args(peer, CRYPTO_LEAP,
peer->associd, NULL);
@@ -3170,7 +3326,7 @@ peer_xmit(
xkeyid, 0, 2);
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Transmit a-priori timestamps
@@ -3202,10 +3358,10 @@ peer_xmit(
return;
}
sendlen += authlen;
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (xkeyid > NTP_MAXKEY)
authtrust(xkeyid, 0);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
if (sendlen > sizeof(xpkt)) {
msyslog(LOG_ERR, "proto: buffer overflow %u", sendlen);
exit (-1);
@@ -3229,16 +3385,15 @@ peer_xmit(
}
L_SUB(&xmt_ty, &xmt_tx);
LFPTOD(&xmt_ty, peer->xleave);
-#ifdef OPENSSL
+#ifdef AUTOKEY
#ifdef DEBUG
if (debug)
printf("transmit: at %ld %s->%s mode %d keyid %08x len %d index %d\n",
- current_time, peer->dstadr ?
- ntoa(&peer->dstadr->sin) : "-",
- ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
+ current_time, latoa(peer->dstadr),
+ ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
peer->keynumber);
#endif
-#else /* OPENSSL */
+#else /* !AUTOKEY follows */
#ifdef DEBUG
if (debug)
printf("transmit: at %ld %s->%s mode %d keyid %08x len %d\n",
@@ -3246,7 +3401,7 @@ peer_xmit(
ntoa(&peer->dstadr->sin) : "-",
ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen);
#endif
-#endif /* OPENSSL */
+#endif /* !AUTOKEY */
}
@@ -3266,7 +3421,7 @@ fast_xmit(
struct pkt *rpkt; /* receive packet structure */
l_fp xmt_tx, xmt_ty;
int sendlen;
-#ifdef OPENSSL
+#ifdef AUTOKEY
u_int32 temp32;
#endif
@@ -3298,7 +3453,11 @@ fast_xmit(
PKT_VERSION(rpkt->li_vn_mode), xmode);
xpkt.stratum = STRATUM_PKT_UNSPEC;
xpkt.ppoll = max(rpkt->ppoll, ntp_minpoll);
+ xpkt.precision = rpkt->precision;
memcpy(&xpkt.refid, "RATE", 4);
+ xpkt.rootdelay = rpkt->rootdelay;
+ xpkt.rootdisp = rpkt->rootdisp;
+ xpkt.reftime = rpkt->reftime;
xpkt.org = rpkt->xmt;
xpkt.rec = rpkt->xmt;
xpkt.xmt = rpkt->xmt;
@@ -3356,7 +3515,7 @@ fast_xmit(
* value to generate the cookie, which is unique for every
* source-destination-key ID combination.
*/
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (xkeyid > NTP_MAXKEY) {
keyid_t cookie;
@@ -3371,7 +3530,7 @@ fast_xmit(
*/
cookie = session_key(&rbufp->recv_srcadr,
&rbufp->dstadr->sin, 0, sys_private, 0);
- if (rbufp->recv_length > sendlen + MAX_MAC_LEN) {
+ if (rbufp->recv_length > sendlen + (int)MAX_MAC_LEN) {
session_key(&rbufp->dstadr->sin,
&rbufp->recv_srcadr, xkeyid, 0, 2);
temp32 = CRYPTO_RESP;
@@ -3384,13 +3543,13 @@ fast_xmit(
&rbufp->recv_srcadr, xkeyid, cookie, 2);
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
get_systime(&xmt_tx);
sendlen += authencrypt(xkeyid, (u_int32 *)&xpkt, sendlen);
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (xkeyid > NTP_MAXKEY)
authtrust(xkeyid, 0);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
sendpkt(&rbufp->recv_srcadr, rbufp->dstadr, 0, &xpkt, sendlen);
get_systime(&xmt_ty);
L_SUB(&xmt_ty, &xmt_tx);
@@ -3405,7 +3564,165 @@ fast_xmit(
}
-#ifdef OPENSSL
+/*
+ * pool_xmit - resolve hostname or send unicast solicitation for pool.
+ */
+static void
+pool_xmit(
+ struct peer *pool /* pool solicitor association */
+ )
+{
+#ifdef WORKER
+ struct pkt xpkt; /* transmit packet structure */
+ struct addrinfo hints;
+ int rc;
+ struct interface * lcladr;
+ sockaddr_u * rmtadr;
+ int restrict_mask;
+ struct peer * p;
+ l_fp xmt_tx;
+
+ if (NULL == pool->ai) {
+ if (pool->addrs != NULL) {
+ /* free() is used with copy_addrinfo_list() */
+ free(pool->addrs);
+ pool->addrs = NULL;
+ }
+ ZERO(hints);
+ hints.ai_family = AF(&pool->srcadr);
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+ /* ignore getaddrinfo_sometime() errors, we will retry */
+ rc = getaddrinfo_sometime(
+ pool->hostname,
+ "ntp",
+ &hints,
+ 0, /* no retry */
+ &pool_name_resolved,
+ (void *)(u_int)pool->associd);
+ if (!rc)
+ DPRINTF(1, ("pool DNS lookup %s started\n",
+ pool->hostname));
+ else
+ msyslog(LOG_ERR,
+ "unable to start pool DNS %s %m",
+ pool->hostname);
+ return;
+ }
+
+ do {
+ /* copy_addrinfo_list ai_addr points to a sockaddr_u */
+ rmtadr = (sockaddr_u *)(void *)pool->ai->ai_addr;
+ pool->ai = pool->ai->ai_next;
+ p = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT, 0);
+ } while (p != NULL && pool->ai != NULL);
+ if (p != NULL)
+ return; /* out of addresses, re-query DNS next poll */
+ restrict_mask = restrictions(rmtadr);
+ if (RES_FLAGS & restrict_mask)
+ restrict_source(rmtadr, 0,
+ current_time + POOL_SOLICIT_WINDOW + 1);
+ lcladr = findinterface(rmtadr);
+ memset(&xpkt, 0, sizeof(xpkt));
+ xpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, pool->version,
+ MODE_CLIENT);
+ xpkt.stratum = STRATUM_TO_PKT(sys_stratum);
+ xpkt.ppoll = pool->hpoll;
+ xpkt.precision = sys_precision;
+ xpkt.refid = sys_refid;
+ xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
+ xpkt.rootdisp = HTONS_FP(DTOUFP(sys_rootdisp));
+ HTONL_FP(&sys_reftime, &xpkt.reftime);
+ get_systime(&xmt_tx);
+ pool->aorg = xmt_tx;
+ HTONL_FP(&xmt_tx, &xpkt.xmt);
+ sendpkt(rmtadr, lcladr, sys_ttl[pool->ttl], &xpkt,
+ LEN_PKT_NOMAC);
+ pool->sent++;
+ pool->throttle += (1 << pool->minpoll) - 2;
+#ifdef DEBUG
+ if (debug)
+ printf("transmit: at %ld %s->%s pool\n",
+ current_time, latoa(lcladr), stoa(rmtadr));
+#endif
+ msyslog(LOG_INFO, "Soliciting pool server %s", stoa(rmtadr));
+#endif /* WORKER */
+}
+
+
+#ifdef AUTOKEY
+ /*
+ * group_test - test if this is the same group
+ *
+ * host assoc return action
+ * none none 0 mobilize *
+ * none group 0 mobilize *
+ * group none 0 mobilize *
+ * group group 1 mobilize
+ * group different 1 ignore
+ * * ignore if notrust
+ */
+int group_test(
+ char *grp,
+ char *ident
+ )
+{
+ if (grp == NULL)
+ return (0);
+
+ if (strcmp(grp, sys_groupname) == 0)
+ return (0);
+
+ if (ident == NULL)
+ return (1);
+
+ if (strcmp(grp, ident) == 0)
+ return (0);
+
+ return (1);
+}
+#endif /* AUTOKEY */
+
+#ifdef WORKER
+void
+pool_name_resolved(
+ int rescode,
+ int gai_errno,
+ void * context,
+ const char * name,
+ const char * service,
+ const struct addrinfo * hints,
+ const struct addrinfo * res
+ )
+{
+ struct peer * pool; /* pool solicitor association */
+ associd_t assoc;
+
+ if (rescode) {
+ msyslog(LOG_ERR,
+ "error resolving pool %s: %s (%d)",
+ name, gai_strerror(rescode), rescode);
+ return;
+ }
+
+ assoc = (associd_t)(u_int)context;
+ pool = findpeerbyassoc(assoc);
+ if (NULL == pool) {
+ msyslog(LOG_ERR,
+ "Could not find assoc %u for pool DNS %s",
+ assoc, name);
+ return;
+ }
+ DPRINTF(1, ("pool DNS %s completed\n", name));
+ pool->addrs = copy_addrinfo_list(res);
+ pool->ai = pool->addrs;
+ pool_xmit(pool);
+
+}
+#endif /* WORKER */
+
+
+#ifdef AUTOKEY
/*
* key_expire - purge the key list
*/
@@ -3431,7 +3748,7 @@ key_expire(
peer->associd);
#endif
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
@@ -3516,9 +3833,10 @@ peer_unfit(
/*
* 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 */
+#define MINSTEP 20e-9 /* minimum clock increment (s) */
+#define MAXSTEP 1 /* maximum clock increment (s) */
+#define MINCHANGES 12 /* minimum number of step samples */
+#define MAXLOOPS ((int)(1. / MINSTEP)) /* avoid infinite loop */
/*
* This routine measures the system precision defined as the minimum of
@@ -3526,49 +3844,132 @@ peer_unfit(
* clock. However, if a difference is less than MINSTEP, the clock has
* been read more than once during a clock tick and the difference is
* ignored. We set MINSTEP greater than zero in case something happens
- * like a cache miss.
+ * like a cache miss, and to tolerate underlying system clocks which
+ * ensure each reading is strictly greater than prior readings while
+ * using an underlying stepping (not interpolated) clock.
+ *
+ * sys_tick and sys_precision represent the time to read the clock for
+ * systems with high-precision clocks, and the tick interval or step
+ * size for lower-precision stepping clocks.
+ *
+ * This routine also measures the time to read the clock on stepping
+ * system clocks by counting the number of readings between changes of
+ * the underlying clock. With either type of clock, the minimum time
+ * to read the clock is saved as sys_fuzz, and used to ensure the
+ * get_systime() readings always increase and are fuzzed below sys_fuzz.
+ */
+void
+measure_precision(void)
+{
+ /*
+ * With sys_fuzz set to zero, get_systime() fuzzing of low bits
+ * is effectively disabled. trunc_os_clock is FALSE to disable
+ * get_ostime() simulation of a low-precision system clock.
+ */
+ set_sys_fuzz(0.);
+ trunc_os_clock = FALSE;
+ measured_tick = measure_tick_fuzz();
+ set_sys_tick_precision(measured_tick);
+ msyslog(LOG_INFO, "proto: precision = %.3f usec (%d)",
+ sys_tick * 1e6, sys_precision);
+ if (sys_fuzz < sys_tick) {
+ msyslog(LOG_NOTICE, "proto: fuzz beneath %.3f usec",
+ sys_fuzz * 1e6);
+ }
+}
+
+
+/*
+ * measure_tick_fuzz()
+ *
+ * measures the minimum time to read the clock (stored in sys_fuzz)
+ * and returns the tick, the larger of the minimum increment observed
+ * between successive clock readings and the time to read the clock.
*/
-int
-default_get_precision(void)
+double
+measure_tick_fuzz(void)
{
+ l_fp minstep; /* MINSTEP as l_fp */
l_fp val; /* current seconds fraction */
l_fp last; /* last seconds fraction */
- l_fp diff; /* difference */
+ l_fp ldiff; /* val - last */
double tick; /* computed tick value */
- double dtemp; /* scratch */
+ double diff;
+ long repeats;
+ long max_repeats;
+ int changes;
int i; /* log2 precision */
- /*
- * Loop to find precision value in seconds.
- */
tick = MAXSTEP;
- i = 0;
+ max_repeats = 0;
+ repeats = 0;
+ changes = 0;
+ DTOLFP(MINSTEP, &minstep);
get_systime(&last);
- while (1) {
+ for (i = 0; i < MAXLOOPS && changes < MINCHANGES; i++) {
get_systime(&val);
- diff = val;
- L_SUB(&diff, &last);
+ ldiff = val;
+ L_SUB(&ldiff, &last);
last = val;
- LFPTOD(&diff, dtemp);
- if (dtemp < MINSTEP)
- continue;
+ if (L_ISGT(&ldiff, &minstep)) {
+ max_repeats = max(repeats, max_repeats);
+ repeats = 0;
+ changes++;
+ LFPTOD(&ldiff, diff);
+ tick = min(diff, tick);
+ } else {
+ repeats++;
+ }
+ }
+ if (changes < MINCHANGES) {
+ msyslog(LOG_ERR, "Fatal error: precision could not be measured (MINSTEP too large?)");
+ exit(1);
+ }
- if (dtemp < tick)
- tick = dtemp;
- if (++i >= MINLOOPS)
- break;
+ if (0 == max_repeats) {
+ set_sys_fuzz(tick);
+ } else {
+ set_sys_fuzz(tick / max_repeats);
+ }
+
+ return tick;
+}
+
+
+void
+set_sys_tick_precision(
+ double tick
+ )
+{
+ int i;
+
+ if (tick > 1.) {
+ msyslog(LOG_ERR,
+ "unsupported tick %.3f > 1s ignored", tick);
+ return;
+ }
+ if (tick < measured_tick) {
+ msyslog(LOG_ERR,
+ "proto: tick %.3f less than measured tick %.3f, ignored",
+ tick, measured_tick);
+ return;
+ } else if (tick > measured_tick) {
+ trunc_os_clock = TRUE;
+ msyslog(LOG_NOTICE,
+ "proto: truncating system clock to multiples of %.9f",
+ tick);
}
sys_tick = tick;
/*
* Find the nearest power of two.
*/
- msyslog(LOG_NOTICE, "proto: precision = %.3f usec", tick * 1e6);
- for (i = 0; tick <= 1; i++)
+ for (i = 0; tick <= 1; i--)
tick *= 2;
if (tick - 1 > 1 - tick / 2)
- i--;
- return (-i);
+ i++;
+
+ sys_precision = (s_char)i;
}
@@ -3593,7 +3994,7 @@ init_proto(void)
sys_rootdisp = 0;
L_CLR(&sys_reftime);
sys_jitter = 0;
- sys_precision = (s_char)default_get_precision();
+ measure_precision();
get_systime(&dummy);
sys_survivors = 0;
sys_manycastserver = 0;
@@ -3601,12 +4002,13 @@ init_proto(void)
sys_bdelay = 0;
sys_authenticate = 1;
sys_stattime = current_time;
+ orphwait = current_time + sys_orphwait;
proto_clr_stats();
for (i = 0; i < MAX_TTL; i++) {
sys_ttl[i] = (u_char)((i * 256) / MAX_TTL);
sys_ttlmax = i;
}
- pps_enable = 0;
+ hardpps_enable = 0;
stats_control = 1;
}
@@ -3652,7 +4054,7 @@ proto_config(
#endif /* REFCLOCK */
case PROTO_KERNEL: /* kernel discipline (kernel) */
- kern_enable = value;
+ select_loop(value);
break;
case PROTO_MONITOR: /* monitoring (monitor) */
@@ -3666,8 +4068,12 @@ proto_config(
ntp_enable = value;
break;
+ case PROTO_MODE7: /* mode7 management (ntpdc) */
+ ntp_mode7 = value;
+ break;
+
case PROTO_PPS: /* PPS discipline (pps) */
- pps_enable = value;
+ hardpps_enable = value;
break;
case PROTO_FILEGEN: /* statistics (stats) */
@@ -3724,8 +4130,10 @@ proto_config(
sys_orphan = (int)dvalue;
break;
- case PROTO_ADJ: /* tick increment (tick) */
- sys_tick = dvalue;
+ case PROTO_ORPHWAIT: /* orphan wait (orphwait) */
+ orphwait -= sys_orphwait;
+ sys_orphwait = (int)dvalue;
+ orphwait += sys_orphwait;
break;
/*
@@ -3765,4 +4173,5 @@ proto_clr_stats(void)
sys_badlength = 0;
sys_badauth = 0;
sys_limitrejected = 0;
+ sys_kodsent = 0;
}
diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c
index a4d30e80b118..f0e9b9ec307d 100644
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -21,16 +21,6 @@
#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 KERNEL_PLL
#include "ntp_syscall.h"
#endif /* KERNEL_PLL */
@@ -50,8 +40,8 @@
* 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 perform various debugging functions.
+ * serial devices, process sample data, and to perform various debugging
+ * functions.
*
* The main interface used by these routines is the refclockproc
* structure, which contains for most drivers the decimal equivalants
@@ -71,21 +61,14 @@
#define FUDGEFAC .1 /* fudge correction factor */
#define LF 0x0a /* ASCII LF */
-#ifdef PPS
-int fdpps; /* ppsclock legacy */
-#endif /* PPS */
-
int cal_enable; /* enable refclock calibrate */
/*
* Forward declarations
*/
-#ifdef QSORT_USES_VOID_P
static int refclock_cmpl_fp (const void *, const void *);
-#else
-static int refclock_cmpl_fp (const double *, const double *);
-#endif /* QSORT_USES_VOID_P */
static int refclock_sample (struct refclockproc *);
+static int refclock_ioctl(int, u_int);
/*
@@ -200,8 +183,7 @@ refclock_newpeer(
/*
* Allocate and initialize interface structure
*/
- pp = emalloc(sizeof(*pp));
- memset(pp, 0, sizeof(*pp));
+ pp = emalloc_zero(sizeof(*pp));
peer->procptr = pp;
/*
@@ -214,7 +196,9 @@ refclock_newpeer(
peer->stratum = STRATUM_REFCLOCK;
peer->ppoll = peer->maxpoll;
pp->type = clktype;
+ pp->conf = refclock_conf[clktype];
pp->timestarted = current_time;
+ pp->io.fd = -1;
/*
* Set peer.pmode based on the hmode. For appearances only.
@@ -274,16 +258,18 @@ refclock_unpeer(
*/
void
refclock_timer(
- struct peer *peer /* peer structure pointer */
+ struct peer *p
)
{
- u_char clktype;
- int unit;
-
- clktype = peer->refclktype;
- unit = peer->refclkunit;
- if (refclock_conf[clktype]->clock_timer != noentry)
- (refclock_conf[clktype]->clock_timer)(unit, peer);
+ struct refclockproc * pp;
+ int unit;
+
+ unit = p->refclkunit;
+ pp = p->procptr;
+ if (pp->conf->clock_timer != noentry)
+ (*pp->conf->clock_timer)(unit, p);
+ if (pp->action != NULL && pp->nextaction <= current_time)
+ (*pp->action)(p);
}
@@ -480,7 +466,7 @@ refclock_sample(
return (0);
if (n > 1)
- qsort((void *)off, n, sizeof(off[0]), refclock_cmpl_fp);
+ qsort(off, n, sizeof(off[0]), refclock_cmpl_fp);
/*
* Reject the furthest from the median of the samples until
@@ -512,7 +498,7 @@ refclock_sample(
if (debug)
printf(
"refclock_sample: n %d offset %.6f disp %.6f jitter %.6f\n",
- n, pp->offset, pp->disp, pp->jitter);
+ (int)n, pp->offset, pp->disp, pp->jitter);
#endif
return (int)n;
}
@@ -591,25 +577,39 @@ refclock_gtlin(
l_fp *tsptr /* pointer to timestamp returned */
)
{
- char s[BMAX];
- char *dpt, *dpend, *dp;
+ const char *sp, *spend;
+ char *dp, *dpend;
+ int dlen;
+
+ if (bmax <= 0)
+ return (0);
- dpt = s;
- dpend = s + refclock_gtraw(rbufp, s, BMAX - 1, tsptr);
- if (dpend - dpt > bmax - 1)
- dpend = dpt + bmax - 1;
- for (dp = lineptr; dpt < dpend; dpt++) {
- char c;
+ dp = lineptr;
+ dpend = dp + bmax - 1; /* leave room for NUL pad */
+ sp = (const char *)rbufp->recv_buffer;
+ spend = sp + rbufp->recv_length;
- c = *dpt & 0x7f;
+ while (sp != spend && dp != dpend) {
+ char c;
+
+ c = *sp++ & 0x7f;
if (c >= 0x20 && c < 0x7f)
*dp++ = c;
}
- if (dp == lineptr)
- return (0);
-
- *dp = '\0';
- return (dp - lineptr);
+ /* Get length of data written to the destination buffer. If
+ * zero, do *not* place a NUL byte to preserve the previous
+ * buffer content.
+ */
+ dlen = dp - lineptr;
+ if (dlen)
+ *dp = '\0';
+ *tsptr = rbufp->recv_time;
+ DPRINTF(2, ("refclock_gtlin: fd %d time %s timecode %d %s\n",
+ rbufp->fd, ulfptoa(&rbufp->recv_time, 6), dlen,
+ (dlen != 0)
+ ? lineptr
+ : ""));
+ return (dlen);
}
@@ -626,9 +626,7 @@ refclock_gtlin(
* followed by a NULL character ('\0'), which is not included in the
* count.
*
- * 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.
+ * *tsptr receives a copy of the buffer timestamp.
*/
int
refclock_gtraw(
@@ -638,74 +636,99 @@ refclock_gtraw(
l_fp *tsptr /* pointer to timestamp returned */
)
{
- char *dpt, *dpend, *dp;
- l_fp trtmp, tstmp;
- int i;
+ if (bmax <= 0)
+ return (0);
+ bmax -= 1; /* leave room for trailing NUL */
+ if (bmax > rbufp->recv_length)
+ bmax = rbufp->recv_length;
+ memcpy(lineptr, rbufp->recv_buffer, bmax);
+ lineptr[bmax] = '\0';
+
+ *tsptr = rbufp->recv_time;
+ DPRINTF(2, ("refclock_gtraw: fd %d time %s timecode %d %s\n",
+ rbufp->fd, ulfptoa(&rbufp->recv_time, 6), bmax,
+ lineptr));
+ return (bmax);
+}
- /*
- * 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;
- }
+
+/*
+ * indicate_refclock_packet()
+ *
+ * Passes a fragment of refclock input read from the device to the
+ * driver direct input routine, which may consume it (batch it for
+ * queuing once a logical unit is assembled). If it is not so
+ * consumed, queue it for the driver's receive entrypoint.
+ *
+ * The return value is TRUE if the data has been consumed as a fragment
+ * and should not be counted as a received packet.
+ */
+int
+indicate_refclock_packet(
+ struct refclockio * rio,
+ struct recvbuf * rb
+ )
+{
+ /* Does this refclock use direct input routine? */
+ if (rio->io_input != NULL && (*rio->io_input)(rb) == 0) {
+ /*
+ * data was consumed - nothing to pass up
+ * into block input machine
+ */
+ freerecvbuf(rb);
+
+ return TRUE;
}
+ add_full_recv_buffer(rb);
- /*
- * Copy the raw buffer to the user string. The string is padded
- * with a NULL, which is not included in the character count.
+ return FALSE;
+}
+
+
+/*
+ * process_refclock_packet()
+ *
+ * Used for deferred processing of 'io_input' on systems where threading
+ * is used (notably Windows). This is acting as a trampoline to make the
+ * real calls to the refclock functions.
+ */
+#ifdef HAVE_IO_COMPLETION_PORT
+void
+process_refclock_packet(
+ struct recvbuf * rb
+ )
+{
+ struct refclockio * rio;
+
+ /* get the refclockio structure from the receive buffer */
+ rio = &rb->recv_peer->procptr->io;
+
+ /* call 'clock_recv' if either there is no input function or the
+ * raw input function tells us to feed the packet to the
+ * receiver.
*/
- if (dpend - dpt > bmax - 1)
- dpend = dpt + bmax - 1;
- for (dp = lineptr; dpt < dpend; dpt++)
- *dp++ = *dpt;
- *dp = '\0';
- i = dp - lineptr;
-#ifdef DEBUG
- if (debug > 1)
- printf("refclock_gtraw: fd %d time %s timecode %d %s\n",
- rbufp->fd, ulfptoa(&trtmp, 6), i, lineptr);
-#endif
- *tsptr = trtmp;
- return (i);
+ if (rio->io_input == NULL || (*rio->io_input)(rb) != 0) {
+ rio->recvcount++;
+ packets_received++;
+ handler_pkts++;
+ (*rio->clock_recv)(rb);
+ }
}
+#endif /* HAVE_IO_COMPLETION_PORT */
/*
* The following code does not apply to WINNT & VMS ...
*/
-#if !defined SYS_VXWORKS && !defined SYS_WINNT
+#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.
+ * returns the file descriptor if successful, or logs an error and
+ * returns -1.
*/
int
refclock_open(
@@ -717,7 +740,7 @@ refclock_open(
int fd;
int omode;
#ifdef O_NONBLOCK
- char trash[128]; /* litter bin for old input data */
+ char trash[128]; /* litter bin for old input data */
#endif
/*
@@ -732,18 +755,26 @@ refclock_open(
#endif
fd = open(dev, omode, 0777);
+ /* refclock_open() long returned 0 on failure, avoid it. */
+ if (0 == fd) {
+ fd = dup(0);
+ SAVE_ERRNO(
+ close(0);
+ )
+ }
if (fd < 0) {
- msyslog(LOG_ERR, "refclock_open %s: %m", dev);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "refclock_open %s: %m", dev);
+ )
+ return -1;
}
- NTP_INSIST(fd != 0);
if (!refclock_setup(fd, speed, lflags)) {
close(fd);
- return (0);
+ return -1;
}
if (!refclock_ioctl(fd, lflags)) {
close(fd);
- return (0);
+ return -1;
}
#ifdef O_NONBLOCK
/*
@@ -755,7 +786,7 @@ refclock_open(
while (read(fd, trash, sizeof(trash)) > 0 || errno == EINTR)
/*NOP*/;
#endif
- return (fd);
+ return fd;
}
@@ -771,9 +802,6 @@ refclock_setup(
{
int i;
TTY ttyb, *ttyp;
-#ifdef PPS
- fdpps = fd; /* ppsclock legacy */
-#endif /* PPS */
/*
* By default, the serial line port is initialized in canonical
@@ -790,9 +818,12 @@ refclock_setup(
* POSIX serial line parameters (termios interface)
*/
if (tcgetattr(fd, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup fd %d tcgetattr: %m", fd);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "refclock_setup fd %d tcgetattr: %m",
+ fd);
+ )
+ return FALSE;
}
/*
@@ -807,7 +838,7 @@ refclock_setup(
ttyp->c_cflag = CS8 | CLOCAL | CREAD;
if (lflags & LDISC_7O1) {
/* HP Z3801A needs 7-bit, odd parity */
- ttyp->c_cflag = CS7 | PARENB | PARODD | CLOCAL | CREAD;
+ ttyp->c_cflag = CS7 | PARENB | PARODD | CLOCAL | CREAD;
}
cfsetispeed(&ttyb, speed);
cfsetospeed(&ttyb, speed);
@@ -846,9 +877,12 @@ refclock_setup(
if (lflags & LDISC_ECHO)
ttyp->c_lflag |= ECHO;
if (tcsetattr(fd, TCSANOW, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup fd %d TCSANOW: %m", fd);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "refclock_setup fd %d TCSANOW: %m",
+ fd);
+ )
+ return FALSE;
}
/*
@@ -857,7 +891,8 @@ refclock_setup(
* is logged, but we keep our fingers crossed otherwise.
*/
if (tcflush(fd, TCIOFLUSH) < 0)
- msyslog(LOG_ERR, "refclock_setup fd %d tcflush(): %m", fd);
+ msyslog(LOG_ERR, "refclock_setup fd %d tcflush(): %m",
+ fd);
#endif /* HAVE_TERMIOS */
#ifdef HAVE_SYSV_TTYS
@@ -867,9 +902,12 @@ refclock_setup(
*
*/
if (ioctl(fd, TCGETA, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup fd %d TCGETA: %m", fd);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "refclock_setup fd %d TCGETA: %m",
+ fd);
+ )
+ return FALSE;
}
/*
@@ -915,9 +953,11 @@ refclock_setup(
ttyp->c_cc[VMIN] = 1;
}
if (ioctl(fd, TCSETA, ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup fd %d TCSETA: %m", fd);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "refclock_setup fd %d TCSETA: %m", fd);
+ )
+ return FALSE;
}
#endif /* HAVE_SYSV_TTYS */
@@ -927,23 +967,26 @@ refclock_setup(
* 4.3bsd serial line parameters (sgttyb interface)
*/
if (ioctl(fd, TIOCGETP, (char *)ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup fd %d TIOCGETP: %m", fd);
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "refclock_setup fd %d TIOCGETP: %m",
+ fd);
+ )
+ return FALSE;
}
if (speed)
ttyp->sg_ispeed = ttyp->sg_ospeed = speed;
ttyp->sg_flags = EVENP | ODDP | CRMOD;
if (ioctl(fd, TIOCSETP, (char *)ttyp) < 0) {
- msyslog(LOG_ERR,
- "refclock_setup TIOCSETP: %m");
- return (0);
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "refclock_setup TIOCSETP: %m");
+ )
+ return FALSE;
}
#endif /* HAVE_BSD_TTYS */
return(1);
}
#endif /* HAVE_TERMIOS || HAVE_SYSV_TTYS || HAVE_BSD_TTYS */
-#endif /* SYS_VXWORKS SYS_WINNT */
/*
@@ -952,8 +995,8 @@ refclock_setup(
* 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.
+ * up optional features such as tty_clk. The routine returns TRUE if
+ * successful.
*/
int
refclock_ioctl(
@@ -962,53 +1005,13 @@ refclock_ioctl(
)
{
/*
- * simply return 1 if no UNIX line discipline is supported
+ * simply return TRUE 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)
+ DPRINTF(1, ("refclock_ioctl: fd %d flags 0x%x\n", fd, lflags));
-#ifdef DEBUG
- if (debug)
- printf("refclock_ioctl: fd %d flags 0x%x\n", fd,
- lflags);
-#endif
-#ifdef 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 (lflags & (LDISC_CLK | LDISC_CLKPPS | LDISC_ACTS)) {
- int rval = 0;
-
- if (ioctl(fd, I_PUSH, "clk") < 0) {
- msyslog(LOG_NOTICE,
- "refclock_ioctl fd %d I_PUSH: %m", fd);
- return (0);
-#ifdef CLK_SETSTR
- } else {
- char *str;
-
- if (lflags & LDISC_CLKPPS)
- str = "\377";
- else if (lflags & LDISC_ACTS)
- str = "*";
- else
- str = "\n";
- if (ioctl(fd, CLK_SETSTR, str) < 0) {
- msyslog(LOG_ERR,
- "refclock_ioctl fd %d CLK_SETSTR: %m", fd);
- return (0);
- }
-#endif /*CLK_SETSTR */
- }
- }
-#endif /* TTYCLK */
-#endif /* HAVE_TERMIOS || HAVE_SYSV_TTYS || HAVE_BSD_TTYS */
-#endif /* SYS_VXWORKS SYS_WINNT */
- return (1);
+ return TRUE;
}
+#endif /* !defined(SYS_VXWORKS) && !defined(SYS_WINNT) */
/*
@@ -1023,7 +1026,7 @@ refclock_ioctl(
void
refclock_control(
sockaddr_u *srcadr,
- struct refclockstat *in,
+ const struct refclockstat *in,
struct refclockstat *out
)
{
@@ -1041,17 +1044,18 @@ refclock_control(
clktype = (u_char)REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
- peer = findexistingpeer(srcadr, NULL, -1, 0);
+ peer = findexistingpeer(srcadr, NULL, NULL, -1, 0);
- if (NULL == peer || NULL == peer->procptr)
+ if (NULL == peer)
return;
+ NTP_INSIST(peer->procptr != NULL);
pp = peer->procptr;
/*
* Initialize requested data
*/
- if (in != 0) {
+ if (in != NULL) {
if (in->haveflags & CLK_HAVETIME1)
pp->fudgetime1 = in->fudgetime1;
if (in->haveflags & CLK_HAVETIME2)
@@ -1081,14 +1085,25 @@ refclock_control(
/*
* Readback requested data
*/
- if (out != 0) {
- out->haveflags = CLK_HAVETIME1 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2 | CLK_HAVEFLAG4;
- out->fudgetime1 = pp->fudgetime1;
- out->fudgetime2 = pp->fudgetime2;
+ if (out != NULL) {
out->fudgeval1 = pp->stratum;
out->fudgeval2 = pp->refid;
+ out->haveflags = CLK_HAVEVAL1 | CLK_HAVEVAL2;
+ out->fudgetime1 = pp->fudgetime1;
+ if (0.0 != out->fudgetime1)
+ out->haveflags |= CLK_HAVETIME1;
+ out->fudgetime2 = pp->fudgetime2;
+ if (0.0 != out->fudgetime2)
+ out->haveflags |= CLK_HAVETIME2;
out->flags = (u_char) pp->sloppyclockflag;
+ if (CLK_FLAG1 & out->flags)
+ out->haveflags |= CLK_HAVEFLAG1;
+ if (CLK_FLAG2 & out->flags)
+ out->haveflags |= CLK_HAVEFLAG2;
+ if (CLK_FLAG3 & out->flags)
+ out->haveflags |= CLK_HAVEFLAG3;
+ if (CLK_FLAG4 & out->flags)
+ out->haveflags |= CLK_HAVEFLAG4;
out->timereset = current_time - pp->timestarted;
out->polls = pp->polls;
@@ -1140,7 +1155,7 @@ refclock_buginfo(
clktype = (u_char) REFCLOCKTYPE(srcadr);
unit = REFCLOCKUNIT(srcadr);
- peer = findexistingpeer(srcadr, NULL, -1, 0);
+ peer = findexistingpeer(srcadr, NULL, NULL, -1, 0);
if (NULL == peer || NULL == peer->procptr)
return;
@@ -1210,7 +1225,7 @@ refclock_params(
struct refclock_atom *ap /* atom structure pointer */
)
{
- memset(&ap->pps_params, 0, sizeof(pps_params_t));
+ ZERO(ap->pps_params);
ap->pps_params.api_version = PPS_API_VERS_1;
/*
@@ -1230,19 +1245,17 @@ refclock_params(
}
/*
- * If flag3 is lit, select the kernel PPS.
+ * If flag3 is lit, select the kernel PPS if we can.
*/
if (mode & CLK_FLAG3) {
if (time_pps_kcbind(ap->handle, PPS_KC_HARDPPS,
ap->pps_params.mode & ~PPS_TSFMT_TSPEC,
PPS_TSFMT_TSPEC) < 0) {
- if (errno != EOPNOTSUPP) {
- msyslog(LOG_ERR,
- "refclock_params: time_pps_kcbind: %m");
- return (0);
- }
+ msyslog(LOG_ERR,
+ "refclock_params: time_pps_kcbind: %m");
+ return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
return (1);
}
@@ -1282,7 +1295,7 @@ refclock_pps(
}
timeout.tv_sec = 0;
timeout.tv_nsec = 0;
- memset(&pps_info, 0, sizeof(pps_info_t));
+ ZERO(pps_info);
if (time_pps_fetch(ap->handle, PPS_TSFMT_TSPEC, &pps_info,
&timeout) < 0) {
refclock_report(peer, CEVNT_FAULT);
@@ -1295,15 +1308,8 @@ refclock_pps(
ap->ts = pps_info.clear_timestamp;
else
return (0);
-
- /*
- * There can be zero, one or two PPS pulses between polls,
- * depending on the poll interval relative to the PPS interval.
- * The pulse must be newer and within the range gate relative
- * to the last pulse.
- */
- if (ap->ts.tv_sec <= timeout.tv_sec || abs(ap->ts.tv_nsec -
- timeout.tv_nsec) > RANGEGATE)
+
+ if (0 == memcmp(&timeout, &ap->ts, sizeof(timeout)))
return (0);
/*
diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c
index a3c17e2267e8..157304b6da52 100644
--- a/ntpd/ntp_request.c
+++ b/ntpd/ntp_request.c
@@ -50,78 +50,78 @@ struct req_proc {
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) (sockaddr_u *, struct interface *,
+ void (*handler) (sockaddr_u *, endpt *,
struct req_pkt *); /* routine to handle request */
};
/*
* Universal request codes
*/
-static struct req_proc univ_codes[] = {
+static const struct req_proc univ_codes[] = {
{ NO_REQUEST, NOAUTH, 0, 0 }
};
-static void req_ack (sockaddr_u *, struct interface *, struct req_pkt *, int);
-static char * prepare_pkt (sockaddr_u *, struct interface *,
+static void req_ack (sockaddr_u *, endpt *, struct req_pkt *, int);
+static void * prepare_pkt (sockaddr_u *, endpt *,
struct req_pkt *, size_t);
-static char * more_pkt (void);
+static void * more_pkt (void);
static void flush_pkt (void);
-static void peer_list (sockaddr_u *, struct interface *, struct req_pkt *);
-static void peer_list_sum (sockaddr_u *, struct interface *, struct req_pkt *);
-static void peer_info (sockaddr_u *, struct interface *, struct req_pkt *);
-static void peer_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void sys_info (sockaddr_u *, struct interface *, struct req_pkt *);
-static void sys_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void mem_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void io_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void timer_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void loop_info (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_conf (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_unconf (sockaddr_u *, struct interface *, struct req_pkt *);
-static void set_sys_flag (sockaddr_u *, struct interface *, struct req_pkt *);
-static void clr_sys_flag (sockaddr_u *, struct interface *, struct req_pkt *);
-static void setclr_flags (sockaddr_u *, struct interface *, struct req_pkt *, u_long);
-static void list_restrict (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_resaddflags (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_ressubflags (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_unrestrict (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_restrict (sockaddr_u *, struct interface *, struct req_pkt *, int);
-static void mon_getlist_0 (sockaddr_u *, struct interface *, struct req_pkt *);
-static void mon_getlist_1 (sockaddr_u *, struct interface *, struct req_pkt *);
-static void reset_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void reset_peer (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_key_reread (sockaddr_u *, struct interface *, struct req_pkt *);
-static void trust_key (sockaddr_u *, struct interface *, struct req_pkt *);
-static void untrust_key (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_trustkey (sockaddr_u *, struct interface *, struct req_pkt *, u_long);
-static void get_auth_info (sockaddr_u *, struct interface *, struct req_pkt *);
-static void reset_auth_stats (void);
-static void req_get_traps (sockaddr_u *, struct interface *, struct req_pkt *);
-static void req_set_trap (sockaddr_u *, struct interface *, struct req_pkt *);
-static void req_clr_trap (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_setclr_trap (sockaddr_u *, struct interface *, struct req_pkt *, int);
-static void set_request_keyid (sockaddr_u *, struct interface *, struct req_pkt *);
-static void set_control_keyid (sockaddr_u *, struct interface *, struct req_pkt *);
-static void get_ctl_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void get_if_stats (sockaddr_u *, struct interface *, struct req_pkt *);
-static void do_if_reload (sockaddr_u *, struct interface *, struct req_pkt *);
+static void list_peers (sockaddr_u *, endpt *, struct req_pkt *);
+static void list_peers_sum (sockaddr_u *, endpt *, struct req_pkt *);
+static void peer_info (sockaddr_u *, endpt *, struct req_pkt *);
+static void peer_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void sys_info (sockaddr_u *, endpt *, struct req_pkt *);
+static void sys_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void mem_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void io_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void timer_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void loop_info (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_conf (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_unconf (sockaddr_u *, endpt *, struct req_pkt *);
+static void set_sys_flag (sockaddr_u *, endpt *, struct req_pkt *);
+static void clr_sys_flag (sockaddr_u *, endpt *, struct req_pkt *);
+static void setclr_flags (sockaddr_u *, endpt *, struct req_pkt *, u_long);
+static void list_restrict4 (restrict_u *, struct info_restrict **);
+static void list_restrict6 (restrict_u *, struct info_restrict **);
+static void list_restrict (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_resaddflags (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_ressubflags (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_unrestrict (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_restrict (sockaddr_u *, endpt *, struct req_pkt *, int);
+static void mon_getlist (sockaddr_u *, endpt *, struct req_pkt *);
+static void reset_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void reset_peer (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_key_reread (sockaddr_u *, endpt *, struct req_pkt *);
+static void trust_key (sockaddr_u *, endpt *, struct req_pkt *);
+static void untrust_key (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_trustkey (sockaddr_u *, endpt *, struct req_pkt *, u_long);
+static void get_auth_info (sockaddr_u *, endpt *, struct req_pkt *);
+static void req_get_traps (sockaddr_u *, endpt *, struct req_pkt *);
+static void req_set_trap (sockaddr_u *, endpt *, struct req_pkt *);
+static void req_clr_trap (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_setclr_trap (sockaddr_u *, endpt *, struct req_pkt *, int);
+static void set_request_keyid (sockaddr_u *, endpt *, struct req_pkt *);
+static void set_control_keyid (sockaddr_u *, endpt *, struct req_pkt *);
+static void get_ctl_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void get_if_stats (sockaddr_u *, endpt *, struct req_pkt *);
+static void do_if_reload (sockaddr_u *, endpt *, struct req_pkt *);
#ifdef KERNEL_PLL
-static void get_kernel_info (sockaddr_u *, struct interface *, struct req_pkt *);
+static void get_kernel_info (sockaddr_u *, endpt *, struct req_pkt *);
#endif /* KERNEL_PLL */
#ifdef REFCLOCK
-static void get_clock_info (sockaddr_u *, struct interface *, struct req_pkt *);
-static void set_clock_fudge (sockaddr_u *, struct interface *, struct req_pkt *);
+static void get_clock_info (sockaddr_u *, endpt *, struct req_pkt *);
+static void set_clock_fudge (sockaddr_u *, endpt *, struct req_pkt *);
#endif /* REFCLOCK */
#ifdef REFCLOCK
-static void get_clkbug_info (sockaddr_u *, struct interface *, struct req_pkt *);
+static void get_clkbug_info (sockaddr_u *, endpt *, 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 },
+static const struct req_proc ntp_codes[] = {
+ { REQ_PEER_LIST, NOAUTH, 0, 0, list_peers },
+ { REQ_PEER_LIST_SUM, NOAUTH, 0, 0, list_peers_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),
@@ -147,8 +147,8 @@ static struct req_proc ntp_codes[] = {
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_MON_GETLIST, NOAUTH, 0, 0, mon_getlist },
+ { REQ_MON_GETLIST_1, NOAUTH, 0, 0, mon_getlist },
{ 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 },
@@ -178,7 +178,7 @@ static struct req_proc ntp_codes[] = {
get_clkbug_info },
#endif
{ REQ_IF_STATS, AUTH, 0, 0, get_if_stats },
- { REQ_IF_RELOAD, AUTH, 0, 0, do_if_reload },
+ { REQ_IF_RELOAD, AUTH, 0, 0, do_if_reload },
{ NO_REQUEST, NOAUTH, 0, 0, 0 }
};
@@ -196,14 +196,16 @@ keyid_t info_auth_keyid;
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 */
+/*
+ * lazy way to count errors, indexed by the error code
+ */
+u_long errorcounter[MAX_INFO_ERR + 1];
/*
* 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;
+u_long auth_timereset;
/*
* Response packet used by these routines. Also some state information
@@ -221,7 +223,7 @@ static int databytes;
static char exbuf[RESP_DATA_SIZE];
static int usingexbuf;
static sockaddr_u *toaddr;
-static struct interface *frominter;
+static endpt *frominter;
/*
* init_request - initialize request data
@@ -247,7 +249,7 @@ init_request (void)
static void
req_ack(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt,
int errcode
)
@@ -274,10 +276,10 @@ req_ack(
* prepare_pkt - prepare response packet for transmission, return pointer
* to storage for data item.
*/
-static char *
+static void *
prepare_pkt(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *pkt,
size_t structsize
)
@@ -306,14 +308,14 @@ prepare_pkt(
/*
* return the beginning of the packet buffer.
*/
- return &rpkt.data[0];
+ return &rpkt.u;
}
/*
* more_pkt - return a data pointer for a new item.
*/
-static char *
+static void *
more_pkt(void)
{
/*
@@ -331,7 +333,7 @@ more_pkt(void)
/*
* Copy data out of exbuf into the packet.
*/
- memcpy(&rpkt.data[0], exbuf, (unsigned)itemsize);
+ memcpy(&rpkt.u.data[0], exbuf, (unsigned)itemsize);
seqno++;
databytes = 0;
nitems = 0;
@@ -346,7 +348,7 @@ more_pkt(void)
* More room in packet. Give him the
* next address.
*/
- return &rpkt.data[databytes];
+ return &rpkt.u.data[databytes];
} else {
/*
* No room in packet. Give him the extra
@@ -413,8 +415,8 @@ process_private(
struct req_pkt *inpkt;
struct req_pkt_tail *tailinpkt;
sockaddr_u *srcadr;
- struct interface *inter;
- struct req_proc *proc;
+ endpt *inter;
+ const struct req_proc *proc;
int ec;
short temp_size;
l_fp ftmp;
@@ -613,6 +615,9 @@ process_private(
"process_private: failed auth mod_okay %d\n",
mod_okay);
#endif
+ if (!mod_okay) {
+ sys_restricted++;
+ }
req_ack(srcadr, inter, inpkt, INFO_ERR_AUTH);
return;
}
@@ -654,162 +659,149 @@ process_private(
/*
- * peer_list - send a list of the peers
+ * list_peers - send a list of the peers
*/
static void
-peer_list(
+list_peers(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- register struct info_peer_list *ip;
- register struct peer *pp;
- register int i;
- register int skip = 0;
+ struct info_peer_list *ip;
+ struct peer *pp;
+ int skip = 0;
ip = (struct info_peer_list *)prepare_pkt(srcadr, inter, inpkt,
v6sizeof(struct info_peer_list));
- for (i = 0; i < NTP_HASH_SIZE && ip != 0; i++) {
- pp = peer_hash[i];
- while (pp != 0 && ip != 0) {
- if (IS_IPV6(&pp->srcadr)) {
- if (client_v6_capable) {
- ip->addr6 = SOCK_ADDR6(&pp->srcadr);
- ip->v6_flag = 1;
- skip = 0;
- } else {
- skip = 1;
- break;
- }
- } else {
- ip->addr = NSRCADR(&pp->srcadr);
- if (client_v6_capable)
- ip->v6_flag = 0;
+ for (pp = peer_list; pp != NULL && ip != NULL; pp = pp->p_link) {
+ if (IS_IPV6(&pp->srcadr)) {
+ if (client_v6_capable) {
+ ip->addr6 = SOCK_ADDR6(&pp->srcadr);
+ ip->v6_flag = 1;
skip = 0;
+ } else {
+ skip = 1;
+ break;
}
+ } else {
+ ip->addr = NSRCADR(&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;
+ 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();
}
- }
+ } /* for pp */
+
flush_pkt();
}
/*
- * peer_list_sum - return extended peer list
+ * list_peers_sum - return extended peer list
*/
static void
-peer_list_sum(
+list_peers_sum(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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
+ DPRINTF(3, ("wants peer list summary\n"));
+
ips = (struct info_peer_summary *)prepare_pkt(srcadr, inter, inpkt,
v6sizeof(struct info_peer_summary));
- for (i = 0; i < NTP_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 (IS_IPV6(&pp->srcadr)) {
- if (client_v6_capable) {
- ips->srcadr6 = SOCK_ADDR6(&pp->srcadr);
- ips->v6_flag = 1;
- if (pp->dstadr)
- ips->dstadr6 = SOCK_ADDR6(&pp->dstadr->sin);
- else
- memset(&ips->dstadr6, 0, sizeof(ips->dstadr6));
- skip = 0;
- } else {
- skip = 1;
- break;
- }
+ for (pp = peer_list; pp != NULL && ips != NULL; pp = pp->p_link) {
+ DPRINTF(4, ("sum: got one\n"));
+ /*
+ * Be careful here not to return v6 peers when we
+ * want only v4.
+ */
+ if (IS_IPV6(&pp->srcadr)) {
+ if (client_v6_capable) {
+ ips->srcadr6 = SOCK_ADDR6(&pp->srcadr);
+ ips->v6_flag = 1;
+ if (pp->dstadr)
+ ips->dstadr6 = SOCK_ADDR6(&pp->dstadr->sin);
+ else
+ ZERO(ips->dstadr6);
+ skip = 0;
} else {
- ips->srcadr = NSRCADR(&pp->srcadr);
- if (client_v6_capable)
- ips->v6_flag = 0;
-
- if (pp->dstadr) {
- if (!pp->processed)
+ skip = 1;
+ break;
+ }
+ } else {
+ ips->srcadr = NSRCADR(&pp->srcadr);
+ if (client_v6_capable)
+ ips->v6_flag = 0;
+
+ if (pp->dstadr) {
+ if (!pp->processed)
+ ips->dstadr = NSRCADR(&pp->dstadr->sin);
+ else {
+ if (MDF_BCAST == pp->cast_flags)
+ ips->dstadr = NSRCADR(&pp->dstadr->bcast);
+ else if (pp->cast_flags) {
ips->dstadr = NSRCADR(&pp->dstadr->sin);
- else {
- if (MDF_BCAST == pp->cast_flags)
+ if (!ips->dstadr)
ips->dstadr = NSRCADR(&pp->dstadr->bcast);
- else if (pp->cast_flags) {
- ips->dstadr = NSRCADR(&pp->dstadr->sin);
- if (!ips->dstadr)
- ips->dstadr = NSRCADR(&pp->dstadr->bcast);
- }
}
- } else
- ips->dstadr = 0;
+ }
+ } else
+ ips->dstadr = 0;
- 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_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(SQRT(pp->disp)));
- }
- pp = pp->next;
- ips = (struct info_peer_summary *)more_pkt();
+ 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_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(SQRT(pp->disp)));
+ }
+ ips = (struct info_peer_summary *)more_pkt();
+ } /* for pp */
+
flush_pkt();
}
@@ -820,39 +812,48 @@ peer_list_sum(
static void
peer_info (
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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;
- sockaddr_u addr;
- extern struct peer *sys_peer;
- l_fp ltmp;
+ u_short items;
+ size_t item_sz;
+ char * datap;
+ struct info_peer_list ipl;
+ struct peer * pp;
+ struct info_peer * ip;
+ int i;
+ int j;
+ sockaddr_u addr;
+ l_fp ltmp;
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) {
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz != sizeof(ipl)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+ ip = prepare_pkt(srcadr, inter, inpkt,
+ v6sizeof(struct info_peer));
+ while (items-- > 0 && ip != NULL) {
+ ZERO(ipl);
+ memcpy(&ipl, datap, item_sz);
ZERO_SOCK(&addr);
- NSRCPORT(&addr) = ipl->port;
- if (client_v6_capable && ipl->v6_flag) {
+ NSRCPORT(&addr) = ipl.port;
+ if (client_v6_capable && ipl.v6_flag) {
AF(&addr) = AF_INET6;
- SOCK_ADDR6(&addr) = ipl->addr6;
+ SOCK_ADDR6(&addr) = ipl.addr6;
} else {
AF(&addr) = AF_INET;
- NSRCADR(&addr) = ipl->addr;
+ NSRCADR(&addr) = ipl.addr;
}
#ifdef ISC_PLATFORM_HAVESALEN
addr.sa.sa_len = SOCKLEN(&addr);
#endif
- ipl++;
- pp = findexistingpeer(&addr, NULL, -1, 0);
+ datap += item_sz;
+
+ pp = findexistingpeer(&addr, NULL, NULL, -1, 0);
if (NULL == pp)
continue;
if (IS_IPV6(srcadr)) {
@@ -862,7 +863,7 @@ peer_info (
? SOCK_ADDR6(&pp->dstadr->bcast)
: SOCK_ADDR6(&pp->dstadr->sin);
else
- memset(&ip->dstadr6, 0, sizeof(ip->dstadr6));
+ ZERO(ip->dstadr6);
ip->srcadr6 = SOCK_ADDR6(&pp->srcadr);
ip->v6_flag = 1;
@@ -889,19 +890,19 @@ peer_info (
ip->srcport = NSRCPORT(&pp->srcadr);
ip->flags = 0;
if (pp == sys_peer)
- ip->flags |= INFO_FLAG_SYSPEER;
+ ip->flags |= INFO_FLAG_SYSPEER;
if (pp->flags & FLAG_CONFIG)
- ip->flags |= INFO_FLAG_CONFIG;
+ ip->flags |= INFO_FLAG_CONFIG;
if (pp->flags & FLAG_REFCLOCK)
- ip->flags |= INFO_FLAG_REFCLOCK;
+ ip->flags |= INFO_FLAG_REFCLOCK;
if (pp->flags & FLAG_PREFER)
- ip->flags |= INFO_FLAG_PREFER;
+ ip->flags |= INFO_FLAG_PREFER;
if (pp->flags & FLAG_BURST)
- ip->flags |= INFO_FLAG_BURST;
+ ip->flags |= INFO_FLAG_BURST;
if (pp->status == CTL_PST_SEL_SYNCCAND)
- ip->flags |= INFO_FLAG_SEL_CANDIDATE;
+ ip->flags |= INFO_FLAG_SEL_CANDIDATE;
if (pp->status >= CTL_PST_SEL_SYSPEER)
- ip->flags |= INFO_FLAG_SHORTLIST;
+ ip->flags |= INFO_FLAG_SHORTLIST;
ip->leap = pp->leap;
ip->hmode = pp->hmode;
ip->keyid = pp->keyid;
@@ -911,11 +912,11 @@ peer_info (
ip->precision = pp->precision;
ip->version = pp->version;
ip->reach = pp->reach;
- ip->unreach = (u_char) pp->unreach;
+ ip->unreach = (u_char)pp->unreach;
ip->flash = (u_char)pp->flash;
- ip->flash2 = (u_short) pp->flash;
+ ip->flash2 = (u_short)pp->flash;
ip->estbdelay = HTONS_FP(DTOFP(pp->delay));
- ip->ttl = pp->ttl;
+ ip->ttl = (u_char)pp->ttl;
ip->associd = htons(pp->associd);
ip->rootdelay = HTONS_FP(DTOUFP(pp->rootdelay));
ip->rootdispersion = HTONS_FP(DTOUFP(pp->rootdisp));
@@ -927,21 +928,22 @@ peer_info (
j = pp->filter_nextpt - 1;
for (i = 0; i < NTP_SHIFT; i++, j--) {
if (j < 0)
- j = NTP_SHIFT-1;
+ 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]);
+ 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;
+ 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();
+ ip = more_pkt();
}
flush_pkt();
}
@@ -953,45 +955,49 @@ peer_info (
static void
peer_stats (
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- register struct info_peer_list *ipl;
- register struct peer *pp;
- register struct info_peer_stats *ip;
- register int items;
+ u_short items;
+ size_t item_sz;
+ char * datap;
+ struct info_peer_list ipl;
+ struct peer * pp;
+ struct info_peer_stats *ip;
sockaddr_u addr;
- extern struct peer *sys_peer;
-#ifdef DEBUG
- if (debug)
- printf("peer_stats: called\n");
-#endif
+ DPRINTF(1, ("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) {
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz > sizeof(ipl)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
+ ip = prepare_pkt(srcadr, inter, inpkt,
+ v6sizeof(struct info_peer_stats));
+ while (items-- > 0 && ip != NULL) {
+ ZERO(ipl);
+ memcpy(&ipl, datap, item_sz);
+ ZERO(addr);
+ NSRCPORT(&addr) = ipl.port;
+ if (client_v6_capable && ipl.v6_flag) {
AF(&addr) = AF_INET6;
- SOCK_ADDR6(&addr) = ipl->addr6;
+ SOCK_ADDR6(&addr) = ipl.addr6;
} else {
AF(&addr) = AF_INET;
- NSRCADR(&addr) = ipl->addr;
+ NSRCADR(&addr) = ipl.addr;
}
#ifdef ISC_PLATFORM_HAVESALEN
addr.sa.sa_len = SOCKLEN(&addr);
#endif
DPRINTF(1, ("peer_stats: looking for %s, %d, %d\n",
- stoa(&addr), ipl->port, NSRCPORT(&addr)));
+ stoa(&addr), ipl.port, NSRCPORT(&addr)));
- ipl = (struct info_peer_list *)((char *)ipl +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
- pp = findexistingpeer(&addr, NULL, -1, 0);
+ pp = findexistingpeer(&addr, NULL, NULL, -1, 0);
if (NULL == pp)
continue;
@@ -1023,7 +1029,7 @@ peer_stats (
? SOCK_ADDR6(&pp->dstadr->bcast)
: SOCK_ADDR6(&pp->dstadr->sin);
else
- memset(&ip->dstadr6, 0, sizeof(ip->dstadr6));
+ ZERO(ip->dstadr6);
ip->srcadr6 = SOCK_ADDR6(&pp->srcadr);
ip->v6_flag = 1;
@@ -1070,7 +1076,7 @@ peer_stats (
static void
sys_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1103,7 +1109,7 @@ sys_info(
is->rootdelay = htonl(DTOFP(sys_rootdelay));
is->rootdispersion = htonl(DTOUFP(sys_rootdisp));
is->frequency = htonl(DTOFP(sys_jitter));
- is->stability = htonl(DTOUFP(clock_stability));
+ is->stability = htonl(DTOUFP(clock_stability * 1e6));
is->refid = sys_refid;
HTONL_FP(&sys_reftime, &is->reftime);
@@ -1124,12 +1130,12 @@ sys_info(
is->flags |= INFO_FLAG_MONITOR;
if (ntp_enable)
is->flags |= INFO_FLAG_NTP;
- if (pps_enable)
+ if (hardpps_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);
+ HTONL_UF(sys_authdelay.l_uf, &is->authdelay);
(void) more_pkt();
flush_pkt();
}
@@ -1141,15 +1147,12 @@ sys_info(
static void
sys_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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);
@@ -1174,24 +1177,13 @@ sys_stats(
static void
mem_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
register struct info_mem_stats *ms;
register int i;
- /*
- * Importations from the peer module
- */
- extern int peer_hash_count[NTP_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));
@@ -1202,14 +1194,11 @@ mem_stats(
ms->allocations = htonl((u_int32)peer_allocations);
ms->demobilizations = htonl((u_int32)peer_demobilizations);
- for (i = 0; i < NTP_HASH_SIZE; i++) {
- if (peer_hash_count[i] > 255)
- ms->hashcount[i] = 255;
- else
- ms->hashcount[i] = (u_char)peer_hash_count[i];
- }
+ for (i = 0; i < NTP_HASH_SIZE; i++)
+ ms->hashcount[i] = (u_char)
+ max((u_int)peer_hash_count[i], UCHAR_MAX);
- (void) more_pkt();
+ more_pkt();
flush_pkt();
}
@@ -1220,17 +1209,12 @@ mem_stats(
static void
io_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- register struct info_io_stats *io;
+ 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));
@@ -1258,7 +1242,7 @@ io_stats(
static void
timer_stats(
sockaddr_u * srcadr,
- struct interface * inter,
+ endpt * inter,
struct req_pkt * inpkt
)
{
@@ -1285,21 +1269,13 @@ timer_stats(
static void
loop_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- register struct info_loop *li;
+ 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 sys_epoch;
-
li = (struct info_loop *)prepare_pkt(srcadr, inter, inpkt,
sizeof(struct info_loop));
@@ -1310,7 +1286,7 @@ loop_info(
li->compliance = htonl((u_int32)(tc_counter));
li->watchdog_timer = htonl((u_int32)(current_time - sys_epoch));
- (void) more_pkt();
+ more_pkt();
flush_pkt();
}
@@ -1321,16 +1297,16 @@ loop_info(
static void
do_conf(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- static u_long soonest_ifrescan_time = 0;
- int items;
- u_int fl;
- struct conf_peer *cp;
- struct conf_peer temp_cp;
- sockaddr_u peeraddr;
+ u_short items;
+ size_t item_sz;
+ u_int fl;
+ char * datap;
+ struct conf_peer temp_cp;
+ sockaddr_u peeraddr;
/*
* Do a check of everything to see that it looks
@@ -1338,56 +1314,30 @@ do_conf(
* 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));
-
-#if 0 /* paranoid checking - these are done in newpeer() */
- 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_PREFER | CONF_FLAG_BURST |
- CONF_FLAG_IBURST | CONF_FLAG_SKEY))
- fl = 1;
- cp = (struct conf_peer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
- }
-
- if (fl) {
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz > sizeof(temp_cp)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
-#endif /* end paranoid checking */
-
- /*
- * 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));
+ ZERO(temp_cp);
+ memcpy(&temp_cp, datap, item_sz);
ZERO_SOCK(&peeraddr);
fl = 0;
if (temp_cp.flags & CONF_FLAG_PREFER)
fl |= FLAG_PREFER;
if (temp_cp.flags & CONF_FLAG_BURST)
- fl |= FLAG_BURST;
+ fl |= FLAG_BURST;
if (temp_cp.flags & CONF_FLAG_IBURST)
- fl |= FLAG_IBURST;
-#ifdef OPENSSL
+ fl |= FLAG_IBURST;
+#ifdef AUTOKEY
if (temp_cp.flags & CONF_FLAG_SKEY)
fl |= FLAG_SKEY;
-#endif /* OPENSSL */
- if (client_v6_capable && temp_cp.v6_flag != 0) {
+#endif /* AUTOKEY */
+ if (client_v6_capable && temp_cp.v6_flag) {
AF(&peeraddr) = AF_INET6;
SOCK_ADDR6(&peeraddr) = temp_cp.peeraddr6;
} else {
@@ -1409,7 +1359,7 @@ do_conf(
#endif
/* XXX W2DO? minpoll/maxpoll arguments ??? */
- if (peer_config(&peeraddr, (struct interface *)0,
+ if (peer_config(&peeraddr, NULL, NULL,
temp_cp.hmode, temp_cp.version, temp_cp.minpoll,
temp_cp.maxpoll, fl, temp_cp.ttl, temp_cp.keyid,
NULL) == 0) {
@@ -1417,134 +1367,30 @@ do_conf(
return;
}
- /*
- * ntp_intres.c uses REQ_CONFIG/doconf() to add each
- * server after its name is resolved. If we have been
- * disconnected from the network, it may notice the
- * network has returned and add the first server while
- * the relevant interface is still disabled, awaiting
- * the next interface rescan. To get things moving
- * more quickly, trigger an interface scan now, except
- * if we have done so in the last half minute.
- */
- if (soonest_ifrescan_time < current_time) {
- soonest_ifrescan_time = current_time + 30;
- timer_interfacetimeout(current_time);
- DPRINTF(1, ("do_conf triggering interface rescan\n"));
- }
-
- cp = (struct conf_peer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
}
-
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
-#if 0
-/* XXX */
-/*
- * dns_a - Snarf DNS info for an association ID
- */
-static void
-dns_a(
- sockaddr_u *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 (!ISREFCLOCKADR(&peeraddr) && ISBADADR(&peeraddr)) {
- msyslog(LOG_ERR, "dns_a: !ISREFCLOCKADR && ISBADADR");
- 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((sockaddr_u *)&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(
- sockaddr_u *srcadr,
- struct interface *inter,
+ sockaddr_u * srcadr,
+ endpt * inter,
struct req_pkt *inpkt
)
{
- register struct conf_unpeer *cp;
- struct conf_unpeer temp_cp;
- register int items;
- register struct peer *peer;
- sockaddr_u peeraddr;
- int bad, found;
+ u_short items;
+ size_t item_sz;
+ char * datap;
+ struct conf_unpeer temp_cp;
+ struct peer * p;
+ sockaddr_u peeraddr;
+ int bad;
+ int found;
/*
* This is a bit unstructured, but I like to be careful.
@@ -1553,13 +1399,18 @@ do_unconf(
* an error.
*/
items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz > sizeof(temp_cp)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
- bad = 0;
+ bad = FALSE;
while (items-- > 0 && !bad) {
- memset(&temp_cp, 0, sizeof(temp_cp));
+ ZERO(temp_cp);
+ memcpy(&temp_cp, datap, item_sz);
ZERO_SOCK(&peeraddr);
- memcpy(&temp_cp, cp, INFO_ITEMSIZE(inpkt->mbz_itemsize));
if (client_v6_capable && temp_cp.v6_flag) {
AF(&peeraddr) = AF_INET6;
SOCK_ADDR6(&peeraddr) = temp_cp.peeraddr6;
@@ -1571,22 +1422,22 @@ do_unconf(
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- found = 0;
- peer = NULL;
+ found = FALSE;
+ p = NULL;
DPRINTF(1, ("searching for %s\n", stoa(&peeraddr)));
while (!found) {
- peer = findexistingpeer(&peeraddr, peer, -1, 0);
- if (!peer)
+ p = findexistingpeer(&peeraddr, NULL, p, -1, 0);
+ if (NULL == p)
break;
- if (peer->flags & FLAG_CONFIG)
- found = 1;
+ if (FLAG_CONFIG & p->flags)
+ found = TRUE;
}
if (!found)
- bad = 1;
- cp = (struct conf_unpeer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ bad = TRUE;
+
+ datap += item_sz;
}
if (bad) {
@@ -1599,12 +1450,12 @@ do_unconf(
*/
items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
+ datap = inpkt->u.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));
+ ZERO(temp_cp);
+ memcpy(&temp_cp, datap, item_sz);
+ ZERO(peeraddr);
if (client_v6_capable && temp_cp.v6_flag) {
AF(&peeraddr) = AF_INET6;
SOCK_ADDR6(&peeraddr) = temp_cp.peeraddr6;
@@ -1616,24 +1467,23 @@ do_unconf(
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- found = 0;
- peer = NULL;
+ found = FALSE;
+ p = NULL;
while (!found) {
- peer = findexistingpeer(&peeraddr, peer, -1, 0);
- if (!peer)
+ p = findexistingpeer(&peeraddr, NULL, p, -1, 0);
+ if (NULL == p)
break;
- if (peer->flags & FLAG_CONFIG)
- found = 1;
+ if (FLAG_CONFIG & p->flags)
+ found = TRUE;
}
- NTP_INSIST(found);
- NTP_INSIST(peer);
+ INSIST(found);
+ INSIST(NULL != p);
- peer_clear(peer, "GONE");
- unpeer(peer);
+ peer_clear(p, "GONE");
+ unpeer(p);
- cp = (struct conf_unpeer *)
- ((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -1646,7 +1496,7 @@ do_unconf(
static void
set_sys_flag(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1660,7 +1510,7 @@ set_sys_flag(
static void
clr_sys_flag(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1674,23 +1524,21 @@ clr_sys_flag(
static void
setclr_flags(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt,
u_long set
)
{
struct conf_sys_flags *sf;
u_int32 flags;
- int prev_kern_enable;
- prev_kern_enable = kern_enable;
if (INFO_NITEMS(inpkt->err_nitems) > 1) {
msyslog(LOG_ERR, "setclr_flags: err_nitems > 1");
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
- sf = (struct conf_sys_flags *)inpkt->data;
+ sf = (struct conf_sys_flags *)&inpkt->u;
flags = ntohl(sf->flags);
if (flags & ~(SYS_FLAG_BCLIENT | SYS_FLAG_PPS |
@@ -1722,12 +1570,6 @@ setclr_flags(
if (flags & SYS_FLAG_CAL)
proto_config(PROTO_CAL, set, 0., NULL);
req_ack(srcadr, inter, inpkt, INFO_OKAY);
-
- /* Reset the kernel ntp parameters if the kernel flag changed. */
- if (prev_kern_enable && !kern_enable)
- loop_config(LOOP_KERN_CLEAR, 0.0);
- if (!prev_kern_enable && kern_enable)
- loop_config(LOOP_DRIFTCOMP, drift_comp);
}
/*
@@ -1789,7 +1631,7 @@ list_restrict6(
static void
list_restrict(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1819,7 +1661,7 @@ list_restrict(
static void
do_resaddflags(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1834,7 +1676,7 @@ do_resaddflags(
static void
do_ressubflags(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1848,7 +1690,7 @@ do_ressubflags(
static void
do_unrestrict(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -1862,16 +1704,18 @@ do_unrestrict(
static void
do_restrict(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt,
int op
)
{
- register struct conf_restrict *cr;
- register int items;
- sockaddr_u matchaddr;
- sockaddr_u matchmask;
- int bad;
+ char * datap;
+ struct conf_restrict cr;
+ u_short items;
+ size_t item_sz;
+ sockaddr_u matchaddr;
+ sockaddr_u matchmask;
+ int bad;
/*
* Do a check of the flags to make sure that only
@@ -1879,26 +1723,32 @@ do_restrict(
* about it. Note we are very picky here.
*/
items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz > sizeof(cr)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
- bad = 0;
- cr->flags = ntohs(cr->flags);
- cr->mflags = ntohs(cr->mflags);
+ bad = FALSE;
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))
+ memcpy(&cr, datap, item_sz);
+ cr.flags = ntohs(cr.flags);
+ cr.mflags = ntohs(cr.mflags);
+ if (~RESM_NTPONLY & cr.mflags)
+ bad |= 1;
+ if (~RES_ALLFLAGS & cr.flags)
+ bad |= 2;
+ if (INADDR_ANY != cr.mask) {
+ if (client_v6_capable && cr.v6_flag) {
+ if (IN6_IS_ADDR_UNSPECIFIED(&cr.addr6))
bad |= 4;
- } else
- if (cr->addr == htonl(INADDR_ANY))
+ } else {
+ if (INADDR_ANY == cr.addr)
bad |= 8;
+ }
}
- cr = (struct conf_restrict *)((char *)cr +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
}
if (bad) {
@@ -1910,26 +1760,28 @@ do_restrict(
/*
* Looks okay, try it out
*/
- items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
ZERO_SOCK(&matchaddr);
ZERO_SOCK(&matchmask);
+ datap = inpkt->u.data;
while (items-- > 0) {
- if (client_v6_capable && cr->v6_flag) {
+ memcpy(&cr, datap, item_sz);
+ cr.flags = ntohs(cr.flags);
+ cr.mflags = ntohs(cr.mflags);
+ if (client_v6_capable && cr.v6_flag) {
AF(&matchaddr) = AF_INET6;
AF(&matchmask) = AF_INET6;
- SOCK_ADDR6(&matchaddr) = cr->addr6;
- SOCK_ADDR6(&matchmask) = cr->mask6;
+ SOCK_ADDR6(&matchaddr) = cr.addr6;
+ SOCK_ADDR6(&matchmask) = cr.mask6;
} else {
AF(&matchaddr) = AF_INET;
AF(&matchmask) = AF_INET;
- NSRCADR(&matchaddr) = cr->addr;
- NSRCADR(&matchmask) = cr->mask;
+ NSRCADR(&matchaddr) = cr.addr;
+ NSRCADR(&matchmask) = cr.mask;
}
- hack_restrict(op, &matchaddr, &matchmask, cr->mflags,
- cr->flags);
- cr++;
+ hack_restrict(op, &matchaddr, &matchmask, cr.mflags,
+ cr.flags, 0);
+ datap += item_sz;
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -1940,114 +1792,22 @@ do_restrict(
* mon_getlist - return monitor data
*/
static void
-mon_getlist_0(
+mon_getlist(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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)((current_time -
- md->firsttime) / md->count));
- im->firsttime = htonl((u_int32)(current_time - md->lasttime));
- im->restr = htonl((u_int32)md->flags);
- im->count = htonl((u_int32)(md->count));
- if (IS_IPV6(&md->rmtadr)) {
- if (!client_v6_capable)
- continue;
- im->addr6 = SOCK_ADDR6(&md->rmtadr);
- im->v6_flag = 1;
- } else {
- im->addr = NSRCADR(&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();
+ req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
}
-/*
- * mon_getlist - return monitor data
- */
-static void
-mon_getlist_1(
- sockaddr_u *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)((current_time -
- md->firsttime) / md->count));
- im->firsttime = htonl((u_int32)(current_time - md->lasttime));
- im->restr = htonl((u_int32)md->flags);
- im->count = htonl((u_int32)md->count);
- if (IS_IPV6(&md->rmtadr)) {
- if (!client_v6_capable)
- continue;
- im->addr6 = SOCK_ADDR6(&md->rmtadr);
- im->v6_flag = 1;
- im->daddr6 = SOCK_ADDR6(&md->interface->sin);
- } else {
- im->addr = NSRCADR(&md->rmtadr);
- if (client_v6_capable)
- im->v6_flag = 0;
- if (MDF_BCAST == md->cast_flags)
- im->daddr = NSRCADR(&md->interface->bcast);
- else if (md->cast_flags) {
- im->daddr = NSRCADR(&md->interface->sin);
- if (!im->daddr)
- im->daddr = NSRCADR(&md->interface->bcast);
- } else
- im->daddr = 4;
- }
- im->flags = htonl(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) (void); /* routine to handle request */
+ void (*handler)(void); /* routine to handle request */
};
struct reset_entry reset_entries[] = {
@@ -2067,7 +1827,7 @@ struct reset_entry reset_entries[] = {
static void
reset_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2081,7 +1841,7 @@ reset_stats(
return;
}
- rflags = (struct reset_flags *)inpkt->data;
+ rflags = (struct reset_flags *)&inpkt->u;
flags = ntohl(rflags->flags);
if (flags & ~RESET_ALLFLAGS) {
@@ -2105,15 +1865,17 @@ reset_stats(
static void
reset_peer(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
- struct conf_unpeer *cp;
- int items;
- struct peer *peer;
- sockaddr_u peeraddr;
- int bad;
+ u_short items;
+ size_t item_sz;
+ char * datap;
+ struct conf_unpeer cp;
+ struct peer * p;
+ sockaddr_u peeraddr;
+ int bad;
/*
* We check first to see that every peer exists. If not,
@@ -2121,27 +1883,33 @@ reset_peer(
*/
items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
+ item_sz = INFO_ITEMSIZE(inpkt->mbz_itemsize);
+ datap = inpkt->u.data;
+ if (item_sz > sizeof(cp)) {
+ req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ return;
+ }
- bad = 0;
+ bad = FALSE;
while (items-- > 0 && !bad) {
+ ZERO(cp);
+ memcpy(&cp, datap, item_sz);
ZERO_SOCK(&peeraddr);
- if (client_v6_capable && cp->v6_flag) {
+ if (client_v6_capable && cp.v6_flag) {
AF(&peeraddr) = AF_INET6;
- SOCK_ADDR6(&peeraddr) = cp->peeraddr6;
+ SOCK_ADDR6(&peeraddr) = cp.peeraddr6;
} else {
AF(&peeraddr) = AF_INET;
- NSRCADR(&peeraddr) = cp->peeraddr;
+ NSRCADR(&peeraddr) = cp.peeraddr;
}
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- peer = findexistingpeer(&peeraddr, NULL, -1, 0);
- if (NULL == peer)
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ if (NULL == p)
bad++;
- cp = (struct conf_unpeer *)((char *)cp +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
}
if (bad) {
@@ -2153,28 +1921,28 @@ reset_peer(
* Now do it in earnest.
*/
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_unpeer *)inpkt->data;
+ datap = inpkt->u.data;
while (items-- > 0) {
+ ZERO(cp);
+ memcpy(&cp, datap, item_sz);
ZERO_SOCK(&peeraddr);
- if (client_v6_capable && cp->v6_flag) {
+ if (client_v6_capable && cp.v6_flag) {
AF(&peeraddr) = AF_INET6;
- SOCK_ADDR6(&peeraddr) = cp->peeraddr6;
+ SOCK_ADDR6(&peeraddr) = cp.peeraddr6;
} else {
AF(&peeraddr) = AF_INET;
- NSRCADR(&peeraddr) = cp->peeraddr;
+ NSRCADR(&peeraddr) = cp.peeraddr;
}
SET_PORT(&peeraddr, 123);
#ifdef ISC_PLATFORM_HAVESALEN
peeraddr.sa.sa_len = SOCKLEN(&peeraddr);
#endif
- peer = findexistingpeer(&peeraddr, NULL, -1, 0);
- while (peer != NULL) {
- peer_reset(peer);
- peer = findexistingpeer(&peeraddr, peer, -1, 0);
+ p = findexistingpeer(&peeraddr, NULL, NULL, -1, 0);
+ while (p != NULL) {
+ peer_reset(p);
+ p = findexistingpeer(&peeraddr, NULL, p, -1, 0);
}
- cp = (struct conf_unpeer *)((char *)cp +
- INFO_ITEMSIZE(inpkt->mbz_itemsize));
+ datap += item_sz;
}
req_ack(srcadr, inter, inpkt, INFO_OKAY);
@@ -2187,7 +1955,7 @@ reset_peer(
static void
do_key_reread(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2202,7 +1970,7 @@ do_key_reread(
static void
trust_key(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2216,7 +1984,7 @@ trust_key(
static void
untrust_key(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2230,7 +1998,7 @@ untrust_key(
static void
do_trustkey(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt,
u_long trust
)
@@ -2239,7 +2007,7 @@ do_trustkey(
register int items;
items = INFO_NITEMS(inpkt->err_nitems);
- kp = (u_long *)inpkt->data;
+ kp = (u_long *)&inpkt->u;
while (items-- > 0) {
authtrust(*kp, trust);
kp++;
@@ -2255,24 +2023,12 @@ do_trustkey(
static void
get_auth_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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));
@@ -2296,18 +2052,9 @@ get_auth_info(
* reset_auth_stats - reset the authentication stat counters. Done here
* to keep ntp-isms out of the authentication module
*/
-static void
+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;
@@ -2323,19 +2070,13 @@ reset_auth_stats(void)
static void
req_get_traps(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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;
+ struct info_trap *it;
+ struct ctl_trap *tr;
+ int i;
if (num_ctl_traps == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
@@ -2345,7 +2086,7 @@ req_get_traps(
it = (struct info_trap *)prepare_pkt(srcadr, inter, inpkt,
v6sizeof(struct info_trap));
- for (i = 0, tr = ctl_trap; i < CTL_MAXTRAPS; i++, tr++) {
+ for (i = 0, tr = ctl_traps; i < COUNTOF(ctl_traps); i++, tr++) {
if (tr->tr_flags & TRAP_INUSE) {
if (IS_IPV4(&tr->tr_addr)) {
if (tr->tr_localaddr == any_interface)
@@ -2383,7 +2124,7 @@ req_get_traps(
static void
req_set_trap(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2398,7 +2139,7 @@ req_set_trap(
static void
req_clr_trap(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2413,13 +2154,13 @@ req_clr_trap(
static void
do_setclr_trap(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt,
int set
)
{
register struct conf_trap *ct;
- register struct interface *linter;
+ register endpt *linter;
int res;
sockaddr_u laddr;
@@ -2439,7 +2180,7 @@ do_setclr_trap(
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
- ct = (struct conf_trap *)inpkt->data;
+ ct = (struct conf_trap *)&inpkt->u;
/*
* Look for the local interface. If none, use the default.
@@ -2490,7 +2231,7 @@ do_setclr_trap(
static void
set_request_keyid(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2505,7 +2246,7 @@ set_request_keyid(
return;
}
- pkeyid = (keyid_t *)inpkt->data;
+ pkeyid = (keyid_t *)&inpkt->u;
info_auth_keyid = ntohl(*pkeyid);
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
@@ -2518,12 +2259,11 @@ set_request_keyid(
static void
set_control_keyid(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
keyid_t *pkeyid;
- extern keyid_t ctl_auth_keyid;
/*
* Restrict ourselves to one item only.
@@ -2534,7 +2274,7 @@ set_control_keyid(
return;
}
- pkeyid = (keyid_t *)inpkt->data;
+ pkeyid = (keyid_t *)&inpkt->u;
ctl_auth_keyid = ntohl(*pkeyid);
req_ack(srcadr, inter, inpkt, INFO_OKAY);
}
@@ -2547,31 +2287,12 @@ set_control_keyid(
static void
get_ctl_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *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));
@@ -2603,7 +2324,7 @@ get_ctl_stats(
static void
get_kernel_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2615,7 +2336,7 @@ get_kernel_info(
return;
}
- memset((char *)&ntx, 0, sizeof(ntx));
+ ZERO(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,
@@ -2658,7 +2379,7 @@ get_kernel_info(
static void
get_clock_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2676,15 +2397,15 @@ get_clock_info(
#endif
SET_PORT(&addr, NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
- clkaddr = (u_int32 *) inpkt->data;
+ clkaddr = &inpkt->u.u32[0];
ic = (struct info_clock *)prepare_pkt(srcadr, inter, inpkt,
sizeof(struct info_clock));
while (items-- > 0) {
NSRCADR(&addr) = *clkaddr++;
- if (!ISREFCLOCKADR(&addr) ||
- findexistingpeer(&addr, NULL, -1, 0) == NULL) {
+ if (!ISREFCLOCKADR(&addr) || NULL ==
+ findexistingpeer(&addr, NULL, NULL, -1, 0)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
@@ -2725,7 +2446,7 @@ get_clock_info(
static void
set_clock_fudge(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2735,10 +2456,10 @@ set_clock_fudge(
sockaddr_u addr;
l_fp ltmp;
- ZERO_SOCK(&addr);
- memset((char *)&clock_stat, 0, sizeof clock_stat);
+ ZERO(addr);
+ ZERO(clock_stat);
items = INFO_NITEMS(inpkt->err_nitems);
- cf = (struct conf_fudge *) inpkt->data;
+ cf = (struct conf_fudge *)&inpkt->u;
while (items-- > 0) {
AF(&addr) = AF_INET;
@@ -2747,8 +2468,8 @@ set_clock_fudge(
addr.sa.sa_len = SOCKLEN(&addr);
#endif
SET_PORT(&addr, NTP_PORT);
- if (!ISREFCLOCKADR(&addr) ||
- findexistingpeer(&addr, NULL, -1, 0) == 0) {
+ if (!ISREFCLOCKADR(&addr) || NULL ==
+ findexistingpeer(&addr, NULL, NULL, -1, 0)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
@@ -2797,7 +2518,7 @@ set_clock_fudge(
static void
get_clkbug_info(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2815,20 +2536,20 @@ get_clkbug_info(
#endif
SET_PORT(&addr, NTP_PORT);
items = INFO_NITEMS(inpkt->err_nitems);
- clkaddr = (u_int32 *) inpkt->data;
+ clkaddr = (u_int32 *)&inpkt->u;
ic = (struct info_clkbug *)prepare_pkt(srcadr, inter, inpkt,
sizeof(struct info_clkbug));
while (items-- > 0) {
NSRCADR(&addr) = *clkaddr++;
- if (!ISREFCLOCKADR(&addr) ||
- findexistingpeer(&addr, NULL, -1, 0) == 0) {
+ if (!ISREFCLOCKADR(&addr) || NULL ==
+ findexistingpeer(&addr, NULL, NULL, -1, 0)) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
return;
}
- memset((char *)&bug, 0, sizeof bug);
+ ZERO(bug);
refclock_buginfo(&addr, &bug);
if (bug.nvalues == 0 && bug.ntimes == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
@@ -2869,7 +2590,7 @@ fill_info_if_stats(void *data, interface_info_t *interface_info)
struct info_if_stats *ifs = *ifsp;
endpt *ep = interface_info->ep;
- memset(ifs, 0, sizeof(*ifs));
+ ZERO(*ifs);
if (IS_IPV6(&ep->sin)) {
if (!client_v6_capable) {
@@ -2886,7 +2607,7 @@ fill_info_if_stats(void *data, interface_info_t *interface_info)
ifs->unmask.addr = SOCK_ADDR4(&ep->mask);
}
ifs->v6_flag = htonl(ifs->v6_flag);
- strncpy(ifs->name, ep->name, sizeof(ifs->name));
+ strlcpy(ifs->name, ep->name, sizeof(ifs->name));
ifs->family = htons(ep->family);
ifs->flags = htonl(ep->flags);
ifs->last_ttl = htonl(ep->last_ttl);
@@ -2895,7 +2616,7 @@ fill_info_if_stats(void *data, interface_info_t *interface_info)
ifs->sent = htonl(ep->sent);
ifs->notsent = htonl(ep->notsent);
ifs->ifindex = htonl(ep->ifindex);
- /* scope no longer in struct interface, in in6_addr typically */
+ /* scope no longer in endpt, in in6_addr typically */
ifs->scopeid = ifs->ifindex;
ifs->ifnum = htonl(ep->ifnum);
ifs->uptime = htonl(current_time - ep->starttime);
@@ -2912,7 +2633,7 @@ fill_info_if_stats(void *data, interface_info_t *interface_info)
static void
get_if_stats(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
@@ -2931,7 +2652,7 @@ get_if_stats(
static void
do_if_reload(
sockaddr_u *srcadr,
- struct interface *inter,
+ endpt *inter,
struct req_pkt *inpkt
)
{
diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c
index e087b6ce441a..6e7566713e8d 100644
--- a/ntpd/ntp_restrict.c
+++ b/ntpd/ntp_restrict.c
@@ -166,8 +166,7 @@ alloc_res4(void)
if (res != NULL)
return res;
- rl = emalloc(count * cb);
- memset(rl, 0, count * cb);
+ rl = emalloc_zero(count * cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
@@ -193,8 +192,7 @@ alloc_res6(void)
if (res != NULL)
return res;
- rl = emalloc(count * cb);
- memset(rl, 0, count * cb);
+ rl = emalloc_zero(count * cb);
/* link all but the first onto free list */
res = (void *)((char *)rl + (count - 1) * cb);
for (i = count - 1; i > 0; i--) {
@@ -217,7 +215,7 @@ free_res(
restrict_u * unlinked;
restrictcount--;
- if (RES_LIMITED && res->flags)
+ if (RES_LIMITED & res->flags)
dec_res_limited();
if (v6)
@@ -228,10 +226,10 @@ free_res(
NTP_INSIST(unlinked == res);
if (v6) {
- memset(res, 0, V6_SIZEOF_RESTRICT_U);
+ zero_mem(res, V6_SIZEOF_RESTRICT_U);
plisthead = &resfree6;
} else {
- memset(res, 0, V4_SIZEOF_RESTRICT_U);
+ zero_mem(res, V4_SIZEOF_RESTRICT_U);
plisthead = &resfree4;
}
LINK_SLIST(*plisthead, res, link);
@@ -262,11 +260,15 @@ match_restrict4_addr(
u_short port
)
{
+ const int v6 = 0;
restrict_u * res;
restrict_u * next;
for (res = restrictlist4; res != NULL; res = next) {
next = res->link;
+ if (res->expire &&
+ res->expire <= current_time)
+ free_res(res, v6);
if (res->u.v4.addr == (addr & res->u.v4.mask)
&& (!(RESM_NTPONLY & res->mflags)
|| NTP_PORT == port))
@@ -282,6 +284,7 @@ match_restrict6_addr(
u_short port
)
{
+ const int v6 = 1;
restrict_u * res;
restrict_u * next;
struct in6_addr masked;
@@ -289,6 +292,9 @@ match_restrict6_addr(
for (res = restrictlist6; res != NULL; res = next) {
next = res->link;
NTP_INSIST(next != res);
+ if (res->expire &&
+ res->expire <= current_time)
+ free_res(res, v6);
MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask);
if (ADDR6_EQ(&masked, &res->u.v6.addr)
&& (!(RESM_NTPONLY & res->mflags)
@@ -475,7 +481,8 @@ hack_restrict(
sockaddr_u * resaddr,
sockaddr_u * resmask,
u_short mflags,
- u_short flags
+ u_short flags,
+ u_long expire
)
{
int v6;
@@ -495,7 +502,7 @@ hack_restrict(
return;
}
- memset(&match, 0, sizeof(match));
+ ZERO(match);
/* silence VC9 potentially uninit warnings */
res = NULL;
v6 = 0;
@@ -525,6 +532,7 @@ hack_restrict(
match.flags = flags;
match.mflags = mflags;
+ match.expire = expire;
res = match_restrict_entry(&match, v6);
switch (op) {
@@ -598,3 +606,64 @@ hack_restrict(
}
+
+/*
+ * restrict_source - maintains dynamic "restrict source ..." entries as
+ * peers come and go.
+ */
+void
+restrict_source(
+ sockaddr_u * addr,
+ int farewell, /* 0 to add, 1 to remove */
+ u_long expire /* 0 is infinite, valid until */
+ )
+{
+ sockaddr_u onesmask;
+ restrict_u * res;
+ int found_specific;
+
+ if (!restrict_source_enabled || SOCK_UNSPEC(addr) ||
+ IS_MCAST(addr) || ISREFCLOCKADR(addr))
+ return;
+
+ NTP_REQUIRE(AF_INET == AF(addr) || AF_INET6 == AF(addr));
+
+ SET_HOSTMASK(&onesmask, AF(addr));
+ if (farewell) {
+ hack_restrict(RESTRICT_REMOVE, addr, &onesmask,
+ 0, 0, 0);
+ DPRINTF(1, ("restrict_source: %s removed", stoa(addr)));
+ return;
+ }
+
+ /*
+ * If there is a specific entry for this address, hands
+ * off, as it is condidered more specific than "restrict
+ * server ...".
+ * However, if the specific entry found is a fleeting one
+ * added by pool_xmit() before soliciting, replace it
+ * immediately regardless of the expire value to make way
+ * for the more persistent entry.
+ */
+ if (IS_IPV4(addr)) {
+ res = match_restrict4_addr(SRCADR(addr), SRCPORT(addr));
+ found_specific = (SRCADR(&onesmask) == res->u.v4.mask);
+ } else {
+ res = match_restrict6_addr(&SOCK_ADDR6(addr),
+ SRCPORT(addr));
+ found_specific = ADDR6_EQ(&res->u.v6.mask,
+ &SOCK_ADDR6(&onesmask));
+ }
+ if (!expire && found_specific && res->expire) {
+ found_specific = 0;
+ free_res(res, IS_IPV6(addr));
+ }
+ if (found_specific)
+ return;
+
+ hack_restrict(RESTRICT_FLAGS, addr, &onesmask,
+ restrict_source_mflags, restrict_source_flags,
+ expire);
+ DPRINTF(1, ("restrict_source: %s host restriction added\n",
+ stoa(addr)));
+}
diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c
index d3c9f826f8f9..3e098562dda7 100644
--- a/ntpd/ntp_scanner.c
+++ b/ntpd/ntp_scanner.c
@@ -19,11 +19,11 @@
#include <errno.h>
#include <string.h>
+#include "ntpd.h"
#include "ntp_config.h"
#include "ntpsim.h"
#include "ntp_scanner.h"
#include "ntp_parser.h"
-#include "ntp_debug.h"
/* ntp_keyword.h declares finite state machine and token text */
#include "ntp_keyword.h"
@@ -36,7 +36,7 @@
#define MAX_LEXEME (1024 + 1) /* The maximum size of a lexeme */
char yytext[MAX_LEXEME]; /* Buffer for storing the input text/lexeme */
-extern int input_from_file;
+u_int32 conf_file_sum; /* Simple sum of characters read */
@@ -56,11 +56,9 @@ const char special_chars[] = "{}(),;|=";
* ---------
*/
-int get_next_char(void);
static int is_keyword(char *lexeme, follby *pfollowedby);
-
/*
* keyword() - Return the keyword associated with token T_ identifier.
* See also token_name() for the string-ized T_ identifier.
@@ -123,14 +121,23 @@ FGETC(
struct FILE_INFO *stream
)
{
- int ch = fgetc(stream->fd);
-
- ++stream->col_no;
- if (ch == '\n') {
- stream->prev_line_col_no = stream->col_no;
- ++stream->line_no;
- stream->col_no = 1;
+ int ch;
+
+ do
+ ch = fgetc(stream->fd);
+ while (EOF != ch && (CHAR_MIN > ch || ch > CHAR_MAX));
+
+ if (EOF != ch) {
+ if (input_from_file)
+ conf_file_sum += (u_char)ch;
+ ++stream->col_no;
+ if (ch == '\n') {
+ stream->prev_line_col_no = stream->col_no;
+ ++stream->line_no;
+ stream->col_no = 1;
+ }
}
+
return ch;
}
@@ -144,6 +151,8 @@ UNGETC(
struct FILE_INFO *stream
)
{
+ if (input_from_file)
+ conf_file_sum -= (u_char)ch;
if (ch == '\n') {
stream->col_no = stream->prev_line_col_no;
stream->prev_line_col_no = -1;
@@ -178,9 +187,9 @@ FCLOSE(
* input_from_file flag.
*/
-int
+static int
get_next_char(
- void
+ struct FILE_INFO *ip_file
)
{
char ch;
@@ -203,8 +212,9 @@ get_next_char(
}
}
-void
+static void
push_back_char(
+ struct FILE_INFO *ip_file,
int ch
)
{
@@ -271,18 +281,63 @@ is_integer(
char *lexeme
)
{
- int i = 0;
+ int i;
+ int is_neg;
+ u_int u_val;
+
+ i = 0;
/* Allow a leading minus sign */
- if (lexeme[i] == '-')
- ++i;
+ if (lexeme[i] == '-') {
+ i++;
+ is_neg = TRUE;
+ } else {
+ is_neg = FALSE;
+ }
/* Check that all the remaining characters are digits */
- for (; lexeme[i]; ++i) {
+ for (; lexeme[i] != '\0'; i++) {
if (!isdigit(lexeme[i]))
- return 0;
+ return FALSE;
+ }
+
+ if (is_neg)
+ return TRUE;
+
+ /* Reject numbers that fit in unsigned but not in signed int */
+ if (1 == sscanf(lexeme, "%u", &u_val))
+ return (u_val <= INT_MAX);
+ else
+ return FALSE;
+}
+
+
+/* U_int -- assumes is_integer() has returned FALSE */
+static int
+is_u_int(
+ char *lexeme
+ )
+{
+ int i;
+ int is_hex;
+
+ i = 0;
+ if ('0' == lexeme[i] && 'x' == tolower(lexeme[i + 1])) {
+ i += 2;
+ is_hex = TRUE;
+ } else {
+ is_hex = FALSE;
}
- return 1;
+
+ /* Check that all the remaining characters are digits */
+ for (; lexeme[i] != '\0'; i++) {
+ if (is_hex && !isxdigit(lexeme[i]))
+ return FALSE;
+ if (!is_hex && !isdigit(lexeme[i]))
+ return FALSE;
+ }
+
+ return TRUE;
}
@@ -305,15 +360,13 @@ is_double(
for (; lexeme[i] && isdigit(lexeme[i]); i++)
num_digits++;
- /* Check for the required decimal point */
- if ('.' == lexeme[i])
+ /* Check for the optional decimal point */
+ if ('.' == lexeme[i]) {
i++;
- else
- return 0;
-
- /* Check for any digits after the decimal point */
- for (; lexeme[i] && isdigit(lexeme[i]); i++)
- num_digits++;
+ /* Check for any digits after the decimal point */
+ for (; lexeme[i] && isdigit(lexeme[i]); i++)
+ num_digits++;
+ }
/*
* The number of digits in both the decimal part and the
@@ -354,7 +407,7 @@ is_special(
int ch
)
{
- return (int)strchr(special_chars, ch);
+ return strchr(special_chars, ch) != NULL;
}
@@ -385,7 +438,7 @@ quote_if_needed(char *str)
|| strchr(str, ' ') != NULL)) {
snprintf(ret, octets, "\"%s\"", str);
} else
- strncpy(ret, str, octets);
+ strlcpy(ret, str, octets);
return ret;
}
@@ -424,18 +477,25 @@ create_string_token(
*/
int
yylex(
- void
+ struct FILE_INFO *ip_file
)
{
- int i, instring = 0;
- int yylval_was_set = 0;
- int token; /* The return value/the recognized token */
- int ch;
- static follby followedby = FOLLBY_TOKEN;
+ static follby followedby = FOLLBY_TOKEN;
+ int i;
+ int instring;
+ int yylval_was_set;
+ int converted;
+ int token; /* The return value */
+ int ch;
+
+ if (input_from_file)
+ ip_file = fp[curr_include_level];
+ instring = FALSE;
+ yylval_was_set = FALSE;
do {
/* Ignore whitespace at the beginning */
- while (EOF != (ch = get_next_char()) &&
+ while (EOF != (ch = get_next_char(ip_file)) &&
isspace(ch) &&
!is_EOC(ch))
; /* Null Statement */
@@ -461,19 +521,17 @@ yylex(
/* special chars are their own token values */
token = ch;
/*
- * '=' implies a single string following as in:
+ * '=' outside simulator configuration implies
+ * a single string following as in:
* setvar Owner = "The Boss" default
- * This could alternatively be handled by
- * removing '=' from special_chars and adding
- * it to the keyword table.
*/
- if ('=' == ch)
+ if ('=' == ch && old_config_style)
followedby = FOLLBY_STRING;
yytext[0] = (char)ch;
yytext[1] = '\0';
goto normal_return;
} else
- push_back_char(ch);
+ push_back_char(ip_file, ch);
/* save the position of start of the token */
ip_file->prev_token_line_no = ip_file->line_no;
@@ -481,7 +539,7 @@ yylex(
/* Read in the lexeme */
i = 0;
- while (EOF != (ch = get_next_char())) {
+ while (EOF != (ch = get_next_char(ip_file))) {
yytext[i] = (char)ch;
@@ -495,7 +553,7 @@ yylex(
/* Read the rest of the line on reading a start
of comment character */
if ('#' == ch) {
- while (EOF != (ch = get_next_char())
+ while (EOF != (ch = get_next_char(ip_file))
&& '\n' != ch)
; /* Null Statement */
break;
@@ -512,8 +570,8 @@ yylex(
* XXX - HMS: I'm not sure we want to assume the closing "
*/
if ('"' == ch) {
- instring = 1;
- while (EOF != (ch = get_next_char()) &&
+ instring = TRUE;
+ while (EOF != (ch = get_next_char(ip_file)) &&
ch != '"' && ch != '\n') {
yytext[i++] = (char)ch;
if (i >= COUNTOF(yytext))
@@ -525,7 +583,7 @@ yylex(
* not be pushed back, so we read another char.
*/
if ('"' == ch)
- ch = get_next_char();
+ ch = get_next_char(ip_file);
}
/* Pushback the last character read that is not a part
* of this lexeme.
@@ -534,9 +592,9 @@ yylex(
* when there is no newline at the end of a file.
*/
if (EOF == ch)
- push_back_char('\n');
+ push_back_char(ip_file, '\n');
else
- push_back_char(ch);
+ push_back_char(ip_file, ch);
yytext[i] = '\0';
} while (i == 0);
@@ -549,24 +607,61 @@ yylex(
if (followedby == FOLLBY_TOKEN && !instring) {
token = is_keyword(yytext, &followedby);
- if (token)
+ if (token) {
+ /*
+ * T_Server is exceptional as it forces the
+ * following token to be a string in the
+ * non-simulator parts of the configuration,
+ * but in the simulator configuration section,
+ * "server" is followed by "=" which must be
+ * recognized as a token not a string.
+ */
+ if (T_Server == token && !old_config_style)
+ followedby = FOLLBY_TOKEN;
goto normal_return;
- else if (is_integer(yytext)) {
- yylval_was_set = 1;
+ } else if (is_integer(yytext)) {
+ yylval_was_set = TRUE;
errno = 0;
if ((yylval.Integer = strtol(yytext, NULL, 10)) == 0
&& ((errno == EINVAL) || (errno == ERANGE))) {
msyslog(LOG_ERR,
"Integer cannot be represented: %s",
yytext);
- exit(1);
- } else {
- token = T_Integer;
- goto normal_return;
+ if (input_from_file) {
+ exit(1);
+ } else {
+ /* force end of parsing */
+ yylval.Integer = 0;
+ return 0;
+ }
}
- }
- else if (is_double(yytext)) {
- yylval_was_set = 1;
+ token = T_Integer;
+ goto normal_return;
+ } else if (is_u_int(yytext)) {
+ yylval_was_set = TRUE;
+ if ('0' == yytext[0] &&
+ 'x' == tolower(yytext[1]))
+ converted = sscanf(&yytext[2], "%x",
+ &yylval.U_int);
+ else
+ converted = sscanf(yytext, "%u",
+ &yylval.U_int);
+ if (1 != converted) {
+ msyslog(LOG_ERR,
+ "U_int cannot be represented: %s",
+ yytext);
+ if (input_from_file) {
+ exit(1);
+ } else {
+ /* force end of parsing */
+ yylval.Integer = 0;
+ return 0;
+ }
+ }
+ token = T_U_int;
+ goto normal_return;
+ } else if (is_double(yytext)) {
+ yylval_was_set = TRUE;
errno = 0;
if ((yylval.Double = atof(yytext)) == 0 && errno == ERANGE) {
msyslog(LOG_ERR,
@@ -579,7 +674,7 @@ yylex(
}
} else {
/* Default: Everything is a string */
- yylval_was_set = 1;
+ yylval_was_set = TRUE;
token = create_string_token(yytext);
goto normal_return;
}
@@ -617,11 +712,11 @@ yylex(
}
}
- instring = 0;
+ instring = FALSE;
if (FOLLBY_STRING == followedby)
followedby = FOLLBY_TOKEN;
- yylval_was_set = 1;
+ yylval_was_set = TRUE;
token = create_string_token(yytext);
normal_return:
@@ -640,7 +735,8 @@ lex_too_long:
yytext[min(sizeof(yytext) - 1, 50)] = 0;
msyslog(LOG_ERR,
"configuration item on line %d longer than limit of %lu, began with '%s'",
- ip_file->line_no, (u_long)(sizeof(yytext) - 1), yytext);
+ ip_file->line_no, (u_long)min(sizeof(yytext) - 1, 50),
+ yytext);
/*
* If we hit the length limit reading the startup configuration
diff --git a/ntpd/ntp_scanner.h b/ntpd/ntp_scanner.h
index 907d7c0ff5c2..67976371d8ff 100644
--- a/ntpd/ntp_scanner.h
+++ b/ntpd/ntp_scanner.h
@@ -11,6 +11,8 @@
#ifndef NTP_SCANNER_H
#define NTP_SCANNER_H
+#include "ntp_config.h"
+
/*
* ntp.conf syntax is slightly irregular in that some tokens such as
* hostnames do not require quoting even if they might otherwise be
@@ -103,11 +105,9 @@ struct FILE_INFO {
/* SCANNER GLOBAL VARIABLES
* ------------------------
*/
-extern struct config_tree cfgt; /* Parser output stored here */
+extern config_tree cfgt; /* Parser output stored here */
extern int curr_include_level; /* The current include level */
-extern struct FILE_INFO *ip_file; /* Pointer to the configuration file stream */
-
/* VARIOUS EXTERNAL DECLARATIONS
* -----------------------------
*/
@@ -120,13 +120,11 @@ extern struct FILE_INFO *fp[];
*/
extern const char *keyword(int token);
extern char *quote_if_needed(char *str);
-int yylex(void);
+int yylex(struct FILE_INFO *);
struct FILE_INFO *F_OPEN(const char *path, const char *mode);
int FGETC(struct FILE_INFO *stream);
int UNGETC(int ch, struct FILE_INFO *stream);
int FCLOSE(struct FILE_INFO *stream);
-void push_back_char(int ch);
-
#endif /* NTP_SCANNER_H */
diff --git a/ntpd/ntp_signd.c b/ntpd/ntp_signd.c
index 3beb03be5a69..2ba11d086614 100644
--- a/ntpd/ntp_signd.c
+++ b/ntpd/ntp_signd.c
@@ -33,14 +33,14 @@ static int
ux_socket_connect(const char *name)
{
int fd;
- struct sockaddr_un addr;
+ struct sockaddr_un addr;
if (!name) {
return -1;
}
- memset(&addr, 0, sizeof(addr));
- addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, name, sizeof(addr.sun_path));
+ ZERO(addr);
+ addr.sun_family = AF_UNIX;
+ strlcpy(addr.sun_path, name, sizeof(addr.sun_path));
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1) {
@@ -163,7 +163,7 @@ send_via_ntp_signd(
char *reply = NULL;
uint32_t reply_len;
- memset(&samba_pkt, 0, sizeof(samba_pkt));
+ ZERO(samba_pkt);
samba_pkt.op = 0; /* Sign message */
/* This will be echoed into the reply - a different
* impelementation might want multiple packets
diff --git a/ntpd/ntp_timer.c b/ntpd/ntp_timer.c
index 3c2c832b1986..958c8db39400 100644
--- a/ntpd/ntp_timer.c
+++ b/ntpd/ntp_timer.c
@@ -8,6 +8,13 @@
#include "ntp_machine.h"
#include "ntpd.h"
#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "ntp_leapsec.h"
+
+#if defined(HAVE_IO_COMPLETION_PORT)
+# include "ntp_iocompletionport.h"
+# include "ntp_timer.h"
+#endif
#include <stdio.h>
#include <signal.h>
@@ -18,31 +25,36 @@
# include <unistd.h>
#endif
-#if defined(HAVE_IO_COMPLETION_PORT)
-# include "ntp_iocompletionport.h"
-# include "ntp_timer.h"
-#endif
-
#ifdef KERNEL_PLL
#include "ntp_syscall.h"
#endif /* KERNEL_PLL */
-#ifdef OPENSSL
+#ifdef AUTOKEY
#include <openssl/rand.h>
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+
+
+/* TC_ERR represents the timer_create() error return value. */
+#ifdef SYS_VXWORKS
+#define TC_ERR ERROR
+#else
+#define TC_ERR (-1)
+#endif
+
+static void check_leapsec(u_int32, const time_t*, int/*BOOL*/);
/*
- * These routines provide support for the event timer. The timer is
+ * 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.
+ * second, 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.
*/
-volatile int interface_interval = 300; /* update interface every 5 minutes as default */
-
+volatile int interface_interval; /* init_io() sets def. 300s */
+
/*
* Alarm flag. The mainline code imports this.
*/
@@ -54,25 +66,24 @@ volatile int alarm_flag;
static u_long interface_timer; /* interface update timer */
static u_long adjust_timer; /* second timer */
static u_long stats_timer; /* stats timer */
+static u_long leapf_timer; /* Report leapfile problems once/day */
static u_long huffpuff_timer; /* huff-n'-puff timer */
-u_long leapsec; /* leapseconds countdown */
-l_fp sys_time; /* current system time */
-#ifdef OPENSSL
+static u_long worker_idle_timer;/* next check for idle intres */
+u_long leapsec; /* seconds to next leap (proximity class) */
+int leapdif; /* TAI difference step at next leap second*/
+u_long orphwait; /* orphan wait time */
+#ifdef AUTOKEY
static u_long revoke_timer; /* keys revoke timer */
static u_long keys_timer; /* session key timer */
u_long sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
u_long sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Statistics counter for the interested.
*/
volatile u_long alarm_overflow;
-#define MINUTE 60
-#define HOUR (60 * MINUTE)
-#define DAY (24 * HOUR)
-
u_long current_time; /* seconds since startup */
/*
@@ -87,64 +98,84 @@ 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;
+#ifdef SYS_WINNT
+HANDLE WaitableTimerHandle;
#else
static RETSIGTYPE alarming (int);
#endif /* SYS_WINNT */
#if !defined(VMS)
# if !defined SYS_WINNT || defined(SYS_CYGWIN32)
-# ifndef HAVE_TIMER_SETTIME
- struct itimerval itimer;
+# ifdef HAVE_TIMER_CREATE
+static timer_t timer_id;
+typedef struct itimerspec intervaltimer;
+# define itv_frac tv_nsec
# else
- static timer_t ntpd_timerid;
- struct itimerspec itimer;
-# endif /* HAVE_TIMER_SETTIME */
-# endif /* SYS_WINNT */
-#endif /* VMS */
+typedef struct itimerval intervaltimer;
+# define itv_frac tv_usec
+# endif
+intervaltimer itimer;
+# endif
+#endif
+
+#if !defined(SYS_WINNT) && !defined(VMS)
+void set_timer_or_die(const intervaltimer *);
+#endif
+
+
+#if !defined(SYS_WINNT) && !defined(VMS)
+void
+set_timer_or_die(
+ const intervaltimer * ptimer
+ )
+{
+ const char * setfunc;
+ int rc;
+
+# ifdef HAVE_TIMER_CREATE
+ setfunc = "timer_settime";
+ rc = timer_settime(timer_id, 0, &itimer, NULL);
+# else
+ setfunc = "setitimer";
+ rc = setitimer(ITIMER_REAL, &itimer, NULL);
+# endif
+ if (-1 == rc) {
+ msyslog(LOG_ERR, "interval timer %s failed, %m",
+ setfunc);
+ exit(1);
+ }
+}
+#endif /* !SYS_WINNT && !VMS */
+
/*
- * reinit_timer - reinitialize interval timer.
+ * reinit_timer - reinitialize interval timer after a clock step.
*/
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
+ ZERO(itimer);
+# ifdef HAVE_TIMER_CREATE
+ timer_gettime(timer_id, &itimer);
+# 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
+ 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.itv_frac < 0)
+ itimer.it_value.itv_frac = 0;
+ if (0 == itimer.it_value.tv_sec &&
+ 0 == itimer.it_value.itv_frac)
+ itimer.it_value.tv_sec = (1 << EVENT_TIMEOUT);
+ itimer.it_interval.tv_sec = (1 << EVENT_TIMEOUT);
+ itimer.it_interval.itv_frac = 0;
+ set_timer_or_die(&itimer);
# endif /* VMS */
}
+
/*
* init_timer - initialize the timer data structures
*/
@@ -154,10 +185,11 @@ init_timer(void)
/*
* Initialize...
*/
- alarm_flag = 0;
+ alarm_flag = FALSE;
alarm_overflow = 0;
adjust_timer = 1;
- stats_timer = 0;
+ stats_timer = SECSPERHR;
+ leapf_timer = SECSPERDAY;
huffpuff_timer = 0;
interface_timer = 0;
current_time = 0;
@@ -165,36 +197,25 @@ init_timer(void)
timer_xmtcalls = 0;
timer_timereset = 0;
-#if !defined(SYS_WINNT)
+#ifndef 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);
+# ifndef VMS
+# ifdef HAVE_TIMER_CREATE
+ if (TC_ERR == timer_create(CLOCK_REALTIME, NULL, &timer_id)) {
+ msyslog(LOG_ERR, "timer_create failed, %m");
+ exit(1);
}
- (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 */
+ signal_no_reset(SIGALRM, alarming);
+ itimer.it_interval.tv_sec =
+ itimer.it_value.tv_sec = (1 << EVENT_TIMEOUT);
+ itimer.it_interval.itv_frac = itimer.it_value.itv_frac = 0;
+ set_timer_or_die(&itimer);
+# else /* VMS follows */
vmsinc[0] = 10000000; /* 1 sec */
vmsinc[1] = 0;
lib$emul(&(1<<EVENT_TIMEOUT), &vmsinc, &0, &vmsinc);
@@ -203,8 +224,8 @@ init_timer(void)
lib$addx(&vmsinc, &vmstimer, &vmstimer);
sys$setimr(0, &vmstimer, alarming, alarming, 0);
-# endif /* VMS */
-#else /* SYS_WINNT */
+# endif /* VMS */
+#else /* SYS_WINNT follows */
/*
* Set up timer interrupts for every 2**EVENT_TIMEOUT seconds
* Under Windows/NT,
@@ -216,25 +237,45 @@ init_timer(void)
exit(1);
}
else {
- DWORD Period = (1<<EVENT_TIMEOUT) * 1000;
- LARGE_INTEGER DueTime;
+ DWORD Period;
+ LARGE_INTEGER DueTime;
+ BOOL rc;
+
+ Period = (1 << EVENT_TIMEOUT) * 1000;
DueTime.QuadPart = Period * 10000i64;
- if (!SetWaitableTimer(WaitableTimerHandle, &DueTime, Period, NULL, NULL, FALSE) != NO_ERROR) {
+ rc = SetWaitableTimer(WaitableTimerHandle, &DueTime,
+ Period, NULL, NULL, FALSE);
+ if (!rc) {
msyslog(LOG_ERR, "SetWaitableTimer failed: %m");
exit(1);
}
}
-#endif /* SYS_WINNT */
+#endif /* SYS_WINNT */
}
-#if defined(SYS_WINNT)
-extern HANDLE
-get_timer_handle(void)
+
+/*
+ * intres_timeout_req(s) is invoked in the parent to schedule an idle
+ * timeout to fire in s seconds, if not reset earlier by a call to
+ * intres_timeout_req(0), which clears any pending timeout. When the
+ * timeout expires, worker_idle_timer_fired() is invoked (again, in the
+ * parent).
+ *
+ * sntp and ntpd each provide implementations adapted to their timers.
+ */
+void
+intres_timeout_req(
+ u_int seconds /* 0 cancels */
+ )
{
- return WaitableTimerHandle;
+ if (0 == seconds) {
+ worker_idle_timer = 0;
+ return;
+ }
+ worker_idle_timer = current_time + seconds;
}
-#endif
+
/*
* timer - event timer
@@ -242,27 +283,25 @@ get_timer_handle(void)
void
timer(void)
{
- register struct peer *peer, *next_peer;
- u_int n;
+ struct peer * p;
+ struct peer * next_peer;
+ l_fp now;
+ time_t tnow;
/*
- * The basic timerevent is one second. This is used to adjust
- * the system clock in time and frequency, implement the
- * kiss-o'-deatch function and implement the association
- * polling function..
+ * The basic timerevent is one second. This is used to adjust the
+ * system clock in time and frequency, implement the kiss-o'-death
+ * function and the association polling function.
*/
current_time++;
- get_systime(&sys_time);
if (adjust_timer <= current_time) {
adjust_timer += 1;
adj_host_clock();
#ifdef REFCLOCK
- for (n = 0; n < NTP_HASH_SIZE; n++) {
- for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
- next_peer = peer->next;
- if (peer->flags & FLAG_REFCLOCK)
- refclock_timer(peer);
- }
+ for (p = peer_list; p != NULL; p = next_peer) {
+ next_peer = p->p_link;
+ if (FLAG_REFCLOCK & p->flags)
+ refclock_timer(p);
}
#endif /* REFCLOCK */
}
@@ -272,31 +311,24 @@ timer(void)
* careful here, since the peer structure might go away as the
* result of the call.
*/
- for (n = 0; n < NTP_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);
-
- /*
- * Restrain the non-burst packet rate not more
- * than one packet every 16 seconds. This is
- * usually tripped using iburst and minpoll of
- * 128 s or less.
- */
- if (peer->throttle > 0)
- peer->throttle--;
- if (peer->nextdate <= current_time) {
+ for (p = peer_list; p != NULL; p = next_peer) {
+ next_peer = p->p_link;
+
+ /*
+ * Restrain the non-burst packet rate not more
+ * than one packet every 16 seconds. This is
+ * usually tripped using iburst and minpoll of
+ * 128 s or less.
+ */
+ if (p->throttle > 0)
+ p->throttle--;
+ if (p->nextdate <= current_time) {
#ifdef REFCLOCK
- if (peer->flags & FLAG_REFCLOCK)
- refclock_transmit(peer);
- else
- transmit(peer);
-#else /* REFCLOCK */
- transmit(peer);
-#endif /* REFCLOCK */
- }
+ if (FLAG_REFCLOCK & p->flags)
+ refclock_transmit(p);
+ else
+#endif /* REFCLOCK */
+ transmit(p);
}
}
@@ -306,13 +338,14 @@ timer(void)
* synchronization source is an orphan. It shows offset zero and
* reference ID the loopback address.
*/
- if (sys_orphan < STRATUM_UNSPEC && sys_peer == NULL) {
+ if (sys_orphan < STRATUM_UNSPEC && sys_peer == NULL &&
+ current_time > orphwait) {
if (sys_leap == LEAP_NOTINSYNC) {
sys_leap = LEAP_NOWARNING;
-#ifdef OPENSSL
+#ifdef AUTOKEY
if (crypto_flags)
crypto_update();
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
}
sys_stratum = (u_char)sys_orphan;
if (sys_stratum > 1)
@@ -324,34 +357,25 @@ timer(void)
sys_rootdisp = 0;
}
+ get_systime(&now);
+ time(&tnow);
+
/*
- * Leapseconds. If a leap is pending, decrement the time
- * remaining. If less than one day remains, set the leap bits.
- * When no time remains, clear the leap bits and increment the
- * TAI. If kernel suppport is not available, do the leap
- * crudely. Note a leap cannot be pending unless the clock is
- * set.
+ * Leapseconds. Get time and defer to worker if either something
+ * is imminent or every 8th second.
*/
- if (leapsec > 0) {
- leapsec--;
- if (leapsec == 0) {
- sys_leap = LEAP_NOWARNING;
- sys_tai = leap_tai;
-#ifdef KERNEL_PLL
- if (!(pll_control && kern_enable))
- step_systime(-1.0);
-#else /* KERNEL_PLL */
-#ifndef SYS_WINNT /* WinNT port has its own leap second handling */
- step_systime(-1.0);
-#endif /* SYS_WINNT */
-#endif /* KERNEL_PLL */
- report_event(EVNT_LEAP, NULL, NULL);
- } else {
- if (leapsec < DAY)
- sys_leap = LEAP_ADDSECOND;
- if (leap_tai > 0)
- sys_tai = leap_tai - 1;
- }
+ if (leapsec > LSPROX_NOWARN || 0 == (current_time & 7))
+ check_leapsec(now.l_ui, &tnow,
+ (sys_leap == LEAP_NOTINSYNC));
+ if (sys_leap != LEAP_NOTINSYNC) {
+ if (leapsec >= LSPROX_ANNOUNCE && leapdif) {
+ if (leapdif > 0)
+ sys_leap = LEAP_ADDSECOND;
+ else
+ sys_leap = LEAP_DELSECOND;
+ } else {
+ sys_leap = LEAP_NOWARNING;
+ }
}
/*
@@ -362,7 +386,7 @@ timer(void)
huffpuff();
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* Garbage collect expired keys.
*/
@@ -372,36 +396,41 @@ timer(void)
}
/*
- * Garbage collect key list and generate new private value. The
- * timer runs only after initial synchronization and fires about
- * once per day.
+ * Generate new private value. This causes all associations
+ * to regenerate cookies.
*/
- if (revoke_timer <= current_time && sys_leap !=
- LEAP_NOTINSYNC) {
+ if (revoke_timer && revoke_timer <= current_time) {
revoke_timer += 1 << sys_revoke;
RAND_bytes((u_char *)&sys_private, 4);
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Interface update timer
*/
if (interface_interval && interface_timer <= current_time) {
-
timer_interfacetimeout(current_time +
interface_interval);
DPRINTF(2, ("timer: interface update\n"));
interface_update(NULL, NULL);
}
-
+
+ if (worker_idle_timer && worker_idle_timer <= current_time)
+ worker_idle_timer_fired();
+
/*
- * Finally, write hourly stats.
+ * Finally, write hourly stats and do the hourly
+ * and daily leapfile checks.
*/
if (stats_timer <= current_time) {
- stats_timer += HOUR;
+ stats_timer += SECSPERHR;
write_stats();
- if (sys_tai != 0 && sys_time.l_ui > leap_expire)
- report_event(EVNT_LEAPVAL, NULL, NULL);
+ if (leapf_timer <= current_time) {
+ leapf_timer += SECSPERDAY;
+ check_leap_file(TRUE, now.l_ui, &tnow);
+ } else {
+ check_leap_file(FALSE, now.l_ui, &tnow);
+ }
}
}
@@ -415,24 +444,40 @@ alarming(
int sig
)
{
-#if !defined(VMS)
- if (initializing)
- return;
- if (alarm_flag)
- alarm_overflow++;
- else
- alarm_flag++;
-#else /* VMS AST routine */
+# ifdef DEBUG
+ const char *msg = "alarming: initializing TRUE\n";
+# endif
+
if (!initializing) {
- if (alarm_flag) alarm_overflow++;
- else alarm_flag = 1; /* increment is no good */
+ if (alarm_flag) {
+ alarm_overflow++;
+# ifdef DEBUG
+ msg = "alarming: overflow\n";
+# endif
+ } else {
+# ifndef VMS
+ alarm_flag++;
+# else
+ /* VMS AST routine, increment is no good */
+ alarm_flag = 1;
+# endif
+# ifdef DEBUG
+ msg = "alarming: normal\n";
+# endif
+ }
}
- lib$addx(&vmsinc,&vmstimer,&vmstimer);
- sys$setimr(0,&vmstimer,alarming,alarming,0);
-#endif /* VMS */
+# ifdef VMS
+ lib$addx(&vmsinc, &vmstimer, &vmstimer);
+ sys$setimr(0, &vmstimer, alarming, alarming, 0);
+# endif
+# ifdef DEBUG
+ if (debug >= 4)
+ write(1, msg, strlen(msg));
+# endif
}
#endif /* SYS_WINNT */
+
void
timer_interfacetimeout(u_long timeout)
{
@@ -451,3 +496,75 @@ timer_clr_stats(void)
timer_timereset = current_time;
}
+static void
+check_leapsec(
+ u_int32 now ,
+ const time_t * tpiv ,
+ int/*BOOL*/ reset)
+{
+ leap_result_t lsdata;
+ u_int32 lsprox;
+
+#ifndef SYS_WINNT /* WinNT port has its own leap second handling */
+# ifdef KERNEL_PLL
+ leapsec_electric(pll_control && kern_enable);
+# else
+ leapsec_electric(0);
+# endif
+#endif
+ if (reset) {
+ lsprox = LSPROX_NOWARN;
+ leapsec_reset_frame();
+ memset(&lsdata, 0, sizeof(lsdata));
+ } else if (leapsec_query(&lsdata, now, tpiv)) {
+ /* Full hit. Eventually step the clock, but always
+ * announce the leap event has happened.
+ */
+ if (lsdata.warped < 0) {
+ step_systime(lsdata.warped);
+ msyslog(LOG_NOTICE, "Inserting positive leap second.");
+ } else if (lsdata.warped > 0) {
+ step_systime(lsdata.warped);
+ msyslog(LOG_NOTICE, "Inserting negative leap second.");
+ }
+ report_event(EVNT_LEAP, NULL, NULL);
+ lsprox = LSPROX_NOWARN;
+ leapsec = LSPROX_NOWARN;
+ sys_tai = lsdata.tai_offs;
+ } else {
+ lsprox = lsdata.proximity;
+ sys_tai = lsdata.tai_offs;
+ }
+
+ /* We guard against panic alarming during the red alert phase.
+ * Strange and evil things might happen if we go from stone cold
+ * to piping hot in one step. If things are already that wobbly,
+ * we let the normal clock correction take over, even if a jump
+ * is involved.
+ * Also make sure the alarming events are edge-triggered, that is,
+ * ceated only when the threshold is crossed.
+ */
+ if ( (leapsec > 0 || lsprox < LSPROX_ALERT)
+ && leapsec < lsprox ) {
+ if ( leapsec < LSPROX_SCHEDULE
+ && lsprox >= LSPROX_SCHEDULE) {
+ if (lsdata.dynamic)
+ report_event(PEVNT_ARMED, sys_peer, NULL);
+ else
+ report_event(EVNT_ARMED, NULL, NULL);
+ }
+ leapsec = lsprox;
+ }
+ if (leapsec > lsprox) {
+ if ( leapsec >= LSPROX_SCHEDULE
+ && lsprox < LSPROX_SCHEDULE) {
+ report_event(EVNT_DISARMED, NULL, NULL);
+ }
+ leapsec = lsprox;
+ }
+
+ if (leapsec >= LSPROX_SCHEDULE)
+ leapdif = lsdata.tai_diff;
+ else
+ leapdif = 0;
+}
diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c
index 8bc95d619a56..a7da52b86141 100644
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -6,12 +6,14 @@
#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 "ntp_assert.h"
+#include "ntp_calendar.h"
+#include "ntp_leapsec.h"
+#include "lib_strbuf.h"
#include <stdio.h>
#include <ctype.h>
@@ -19,6 +21,10 @@
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <sys/stat.h>
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
@@ -27,12 +33,6 @@
# include <math.h>
#endif
-#ifdef DOSYNCTODR
-# if !defined(VMS)
-# include <sys/resource.h>
-# endif /* VMS */
-#endif
-
#if defined(VMS)
# include <descrip.h>
#endif /* VMS */
@@ -55,12 +55,13 @@
* File names
*/
static char *key_file_name; /* keys file name */
-char *leapseconds_file_name; /* leapseconds file name */
+static char *leapfile_name; /* leapseconds file name */
+static struct stat leapfile_stat; /* leapseconds file stat() buffer */
+static int /*BOOL*/have_leapfile = FALSE;
char *stats_drift_file; /* frequency file name */
static char *stats_temp_file; /* temp frequency file name */
-double wander_resid; /* wander threshold */
-double wander_threshold = 1e-7; /* initial wander threshold */
-int drift_file_sw; /* clock update switch */
+static double wander_resid; /* last frequency update */
+double wander_threshold = 1e-7; /* initial frequency threshold */
/*
* Statistics file stuff
@@ -73,24 +74,16 @@ int drift_file_sw; /* clock update switch */
# endif /* SYS_WINNT */
#endif
-#ifndef MAXPATHLEN
-# define MAXPATHLEN 256
-#endif
-#ifdef DEBUG_TIMING
-static FILEGEN timingstats;
-#endif
-#ifdef OPENSSL
-static FILEGEN cryptostats;
-#endif /* OPENSSL */
-
-static char statsdir[MAXPATHLEN] = NTP_VAR;
+char statsdir[MAXFILENAME] = NTP_VAR;
static FILEGEN peerstats;
static FILEGEN loopstats;
static FILEGEN clockstats;
static FILEGEN rawstats;
static FILEGEN sysstats;
static FILEGEN protostats;
+static FILEGEN cryptostats;
+static FILEGEN timingstats;
/*
* This controls whether stats are written to the fileset. Provided
@@ -99,16 +92,16 @@ static FILEGEN protostats;
int stats_control;
/*
- * Initial frequency offset later passed to the loopfilter.
+ * Last frequency written to file.
*/
-double old_drift = 1e9; /* current frequency */
static double prev_drift_comp; /* last frequency update */
/*
- * Static prototypes
+ * Function prototypes
*/
-static int leap_file(FILE *);
-static void record_sys_stats(void);
+static void record_sys_stats(void);
+ void ntpd_time_stepped(void);
+static void check_leap_expiration(int, uint32_t, const time_t*);
/*
* Prototypes
@@ -117,7 +110,6 @@ static void record_sys_stats(void);
void uninit_util(void);
#endif
-
/*
* uninit_util - free memory allocated by init_util
*/
@@ -144,12 +136,12 @@ uninit_util(void)
filegen_unregister("rawstats");
filegen_unregister("sysstats");
filegen_unregister("protostats");
-#ifdef OPENSSL
+#ifdef AUTOKEY
filegen_unregister("cryptostats");
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#ifdef DEBUG_TIMING
filegen_unregister("timingstats");
-#endif /* DEBUG_TIMING */
+#endif /* DEBUG_TIMING */
#if defined(_MSC_VER) && defined (_DEBUG)
_CrtCheckMemory();
@@ -159,28 +151,26 @@ uninit_util(void)
/*
- * init_util - initialize the utilities (ntpd included)
+ * init_util - initialize the util module of ntpd
*/
void
init_util(void)
{
- stats_drift_file = NULL;
- stats_temp_file = NULL;
- key_file_name = NULL;
- filegen_register(statsdir, "peerstats", &peerstats);
- filegen_register(statsdir, "loopstats", &loopstats);
+ filegen_register(statsdir, "peerstats", &peerstats);
+ filegen_register(statsdir, "loopstats", &loopstats);
filegen_register(statsdir, "clockstats", &clockstats);
- filegen_register(statsdir, "rawstats", &rawstats);
- filegen_register(statsdir, "sysstats", &sysstats);
+ filegen_register(statsdir, "rawstats", &rawstats);
+ filegen_register(statsdir, "sysstats", &sysstats);
filegen_register(statsdir, "protostats", &protostats);
-#ifdef OPENSSL
filegen_register(statsdir, "cryptostats", &cryptostats);
-#endif /* OPENSSL */
-#ifdef DEBUG_TIMING
filegen_register(statsdir, "timingstats", &timingstats);
-#endif /* DEBUG_TIMING */
+ /*
+ * register with libntp ntp_set_tod() to call us back
+ * when time is stepped.
+ */
+ step_callback = &ntpd_time_stepped;
#ifdef DEBUG
- atexit(uninit_util);
+ atexit(&uninit_util);
#endif /* DEBUG */
}
@@ -192,14 +182,13 @@ void
write_stats(void)
{
FILE *fp;
- double ftemp;
#ifdef DOSYNCTODR
struct timeval tv;
#if !defined(VMS)
int prio_set;
#endif
#ifdef HAVE_GETCLOCK
- struct timespec ts;
+ struct timespec ts;
#endif
int o_prio;
@@ -221,8 +210,8 @@ write_stats(void)
* 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
+ * so setting DOSYNCTODR seems a bad idea in the
+ * case of us resolution
*/
#if !defined(VMS)
@@ -251,9 +240,9 @@ write_stats(void)
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;
+ (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 */
@@ -265,79 +254,71 @@ write_stats(void)
#endif /* VMS */
#endif /* DOSYNCTODR */
record_sys_stats();
- ftemp = fabs(prev_drift_comp - drift_comp);
- prev_drift_comp = drift_comp;
- if (ftemp > clock_phi)
- return;
-
- if (stats_drift_file != 0 && drift_file_sw) {
+ if (stats_drift_file != 0) {
/*
* When the frequency file is written, initialize the
- * wander threshold to a configured initial value.
- * Thereafter reduce it by a factor of 0.5. When it
- * drops below the frequency wander, write the frequency
- * file. This adapts to the prevailing wander yet
- * minimizes the file writes.
+ * prev_drift_comp and wander_resid. Thereafter,
+ * reduce the wander_resid by half each hour. When
+ * the difference between the prev_drift_comp and
+ * drift_comp is less than the wander_resid, update
+ * the frequncy file. This minimizes the file writes to
+ * nonvolaile storage.
*/
- drift_file_sw = FALSE;
- wander_resid *= 0.5;
#ifdef DEBUG
if (debug)
- printf("write_stats: wander %.6lf thresh %.6lf, freq %.6lf\n",
- clock_stability * 1e6, wander_resid * 1e6,
- drift_comp * 1e6);
+ printf("write_stats: frequency %.6lf thresh %.6lf, freq %.6lf\n",
+ (prev_drift_comp - drift_comp) * 1e6, wander_resid *
+ 1e6, drift_comp * 1e6);
#endif
- if (sys_leap != LEAP_NOTINSYNC && clock_stability >
- wander_resid) {
- wander_resid = wander_threshold;
- if ((fp = fopen(stats_temp_file, "w")) == NULL)
- {
- msyslog(LOG_ERR,
- "frequency file %s: %m",
- stats_temp_file);
- return;
- }
- fprintf(fp, "%.3f\n", drift_comp * 1e6);
- (void)fclose(fp);
- /* atomic */
+ if (fabs(prev_drift_comp - drift_comp) < wander_resid) {
+ wander_resid *= 0.5;
+ return;
+ }
+ prev_drift_comp = drift_comp;
+ wander_resid = wander_threshold;
+ if ((fp = fopen(stats_temp_file, "w")) == NULL) {
+ msyslog(LOG_ERR, "frequency file %s: %m",
+ stats_temp_file);
+ return;
+ }
+ fprintf(fp, "%.3f\n", drift_comp * 1e6);
+ (void)fclose(fp);
+ /* atomic */
#ifdef SYS_WINNT
- if (_unlink(stats_drift_file)) /* rename semantics differ under NT */
- msyslog(LOG_WARNING,
- "Unable to remove prior drift file %s, %m",
- stats_drift_file);
+ if (_unlink(stats_drift_file)) /* rename semantics differ under NT */
+ msyslog(LOG_WARNING,
+ "Unable to remove prior drift file %s, %m",
+ stats_drift_file);
#endif /* SYS_WINNT */
#ifndef NO_RENAME
- if (rename(stats_temp_file, stats_drift_file))
- msyslog(LOG_WARNING,
- "Unable to rename temp drift file %s to %s, %m",
- stats_temp_file, stats_drift_file);
+ if (rename(stats_temp_file, stats_drift_file))
+ msyslog(LOG_WARNING,
+ "Unable to rename temp drift file %s to %s, %m",
+ 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,
- "frequency file %s: %m",
- stats_drift_file);
- return;
- }
+ /* we have no rename NFS of ftp in use */
+ if ((fp = fopen(stats_drift_file, "w")) ==
+ NULL) {
+ msyslog(LOG_ERR,
+ "frequency file %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
- } else {
- /* XXX: Log a message at INFO level */
+ /* 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
}
}
@@ -354,8 +335,9 @@ stats_config(
FILE *fp;
const char *value;
int len;
- char tbuf[80];
- char str1[20], str2[20];
+ double old_drift;
+ l_fp now;
+ time_t ttnow;
#ifndef VMS
const char temp_ext[] = ".TEMP";
#else
@@ -370,39 +352,44 @@ stats_config(
char newvalue[MAX_PATH], parameter[MAX_PATH];
if (!ExpandEnvironmentStrings(invalue, newvalue, MAX_PATH)) {
- switch(item) {
- case STATS_FREQ_FILE:
- strcpy(parameter,"STATS_FREQ_FILE");
+ switch (item) {
+ case STATS_FREQ_FILE:
+ strlcpy(parameter, "STATS_FREQ_FILE",
+ sizeof(parameter));
break;
- case STATS_LEAP_FILE:
- strcpy(parameter,"STATS_LEAP_FILE");
+ case STATS_LEAP_FILE:
+ strlcpy(parameter, "STATS_LEAP_FILE",
+ sizeof(parameter));
break;
- case STATS_STATSDIR:
- strcpy(parameter,"STATS_STATSDIR");
+ case STATS_STATSDIR:
+ strlcpy(parameter, "STATS_STATSDIR",
+ sizeof(parameter));
break;
- case STATS_PID_FILE:
- strcpy(parameter,"STATS_PID_FILE");
+ case STATS_PID_FILE:
+ strlcpy(parameter, "STATS_PID_FILE",
+ sizeof(parameter));
break;
- default:
- strcpy(parameter,"UNKNOWN");
+ default:
+ strlcpy(parameter, "UNKNOWN",
+ sizeof(parameter));
break;
}
value = invalue;
msyslog(LOG_ERR,
- "ExpandEnvironmentStrings(%s) failed: %m\n",
- parameter);
+ "ExpandEnvironmentStrings(%s) failed: %m\n",
+ parameter);
} else {
value = newvalue;
}
-#else
+#else
value = invalue;
#endif /* SYS_WINNT */
- switch(item) {
+ switch (item) {
/*
* Open and read frequency file.
@@ -413,12 +400,10 @@ stats_config(
stats_drift_file = erealloc(stats_drift_file, len + 1);
stats_temp_file = erealloc(stats_temp_file,
- len + sizeof(".TEMP"));
-
- memcpy(stats_drift_file, value, (unsigned)(len+1));
- memcpy(stats_temp_file, value, (unsigned)len);
- memcpy(stats_temp_file + len, temp_ext,
- sizeof(temp_ext));
+ len + sizeof(".TEMP"));
+ memcpy(stats_drift_file, value, (size_t)(len+1));
+ memcpy(stats_temp_file, value, (size_t)len);
+ memcpy(stats_temp_file + len, temp_ext, sizeof(temp_ext));
/*
* Open drift file and read frequency. If the file is
@@ -436,8 +421,8 @@ stats_config(
}
fclose(fp);
- old_drift /= 1e6;
- prev_drift_comp = old_drift;
+ loop_config(LOOP_FREQ, old_drift);
+ prev_drift_comp = drift_comp;
break;
/*
@@ -445,87 +430,30 @@ stats_config(
*/
case STATS_STATSDIR:
- /*
- * HMS: the following test is insufficient:
- * - value may be missing the DIR_SEP
- * - we still need the filename after it
- */
- if (strlen(value) >= sizeof(statsdir)) {
+ /* - 1 since value may be missing the DIR_SEP. */
+ if (strlen(value) >= sizeof(statsdir) - 1) {
msyslog(LOG_ERR,
"statsdir too long (>%d, sigh)",
- (int)sizeof(statsdir) - 1);
+ (int)sizeof(statsdir) - 2);
} else {
- l_fp now;
int add_dir_sep;
- int value_l = strlen(value);
+ int value_l;
/* Add a DIR_SEP unless we already have one. */
- if (value_l == 0)
- add_dir_sep = 0;
+ value_l = strlen(value);
+ if (0 == value_l)
+ add_dir_sep = FALSE;
else
add_dir_sep = (DIR_SEP !=
value[value_l - 1]);
if (add_dir_sep)
- snprintf(statsdir, sizeof(statsdir),
- "%s%c", value, DIR_SEP);
+ snprintf(statsdir, sizeof(statsdir),
+ "%s%c", value, DIR_SEP);
else
- snprintf(statsdir, sizeof(statsdir),
- "%s", value);
-
- get_systime(&now);
- 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);
- }
- if(protostats.prefix == &statsdir[0] &&
- protostats.fp != NULL) {
- fclose(protostats.fp);
- protostats.fp = NULL;
- filegen_setup(&protostats, 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 */
-#ifdef DEBUG_TIMING
- if(timingstats.prefix == &statsdir[0] &&
- timingstats.fp != NULL) {
- fclose(timingstats.fp);
- timingstats.fp = NULL;
- filegen_setup(&timingstats, now.l_ui);
- }
-#endif /* DEBUG_TIMING */
+ snprintf(statsdir, sizeof(statsdir),
+ "%s", value);
+ filegen_statsdir();
}
break;
@@ -539,32 +467,47 @@ stats_config(
break;
}
fprintf(fp, "%d", (int)getpid());
- fclose(fp);;
+ fclose(fp);
break;
/*
* Read leapseconds file.
+ *
+ * Note: Currently a leap file without SHA1 signature is
+ * accepted, but if there is a signature line, the signature
+ * must be valid or the file is rejected.
*/
case STATS_LEAP_FILE:
- if ((fp = fopen(value, "r")) == NULL) {
- msyslog(LOG_ERR, "leapseconds file %s: %m",
- value);
+ if (!value || (len = strlen(value)) == 0)
break;
- }
- if (leap_file(fp) < 0) {
- msyslog(LOG_ERR,
- "format error leapseconds file %s",
- value);
- } else {
- strcpy(str1, fstostr(leap_sec));
- strcpy(str2, fstostr(leap_expire));
- snprintf(tbuf, sizeof(tbuf),
- "%d leap %s expire %s", leap_tai, str1,
- str2);
- report_event(EVNT_TAI, NULL, tbuf);
+ leapfile_name = erealloc(leapfile_name, len + 1);
+ memcpy(leapfile_name, value, len + 1);
+
+ if (leapsec_load_file(
+ leapfile_name, &leapfile_stat, TRUE, TRUE))
+ {
+ leap_signature_t lsig;
+
+ get_systime(&now);
+ time(&ttnow);
+ leapsec_getsig(&lsig);
+ mprintf_event(EVNT_TAI, NULL,
+ "%d leap %s %s %s",
+ lsig.taiof,
+ fstostr(lsig.ttime),
+ leapsec_expired(now.l_ui, NULL)
+ ? "expired"
+ : "expires",
+ fstostr(lsig.etime));
+
+ have_leapfile = TRUE;
+
+ /* force an immediate daily expiration check of
+ * the leap seconds table
+ */
+ check_leap_expiration(TRUE, now.l_ui, &ttnow);
}
- fclose(fp);
break;
default:
@@ -691,6 +634,30 @@ record_clock_stats(
/*
+ * mprintf_clock_stats - write clock statistics to file with
+ * msnprintf-style formatting.
+ */
+int
+mprintf_clock_stats(
+ sockaddr_u *addr,
+ const char *fmt,
+ ...
+ )
+{
+ va_list ap;
+ int rc;
+ char msg[512];
+
+ va_start(ap, fmt);
+ rc = mvsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+ if (stats_control)
+ record_clock_stats(addr, msg);
+
+ return rc;
+}
+
+/*
* record_raw_stats - write raw timestamps to file
*
* file format
@@ -707,7 +674,16 @@ record_raw_stats(
l_fp *t1, /* originate timestamp */
l_fp *t2, /* receive timestamp */
l_fp *t3, /* transmit timestamp */
- l_fp *t4 /* destination timestamp */
+ l_fp *t4, /* destination timestamp */
+ int leap,
+ int version,
+ int mode,
+ int stratum,
+ int poll,
+ int precision,
+ double root_delay, /* seconds */
+ double root_dispersion,/* seconds */
+ u_int32 refid
)
{
l_fp now;
@@ -721,10 +697,13 @@ record_raw_stats(
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), dstadr ?
- stoa(dstadr) : "-", ulfptoa(t1, 9), ulfptoa(t2, 9),
- ulfptoa(t3, 9), ulfptoa(t4, 9));
+ fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s\n",
+ day, ulfptoa(&now, 3),
+ stoa(srcadr), dstadr ? stoa(dstadr) : "-",
+ ulfptoa(t1, 9), ulfptoa(t2, 9),
+ ulfptoa(t3, 9), ulfptoa(t4, 9),
+ leap, version, mode, stratum, poll, precision,
+ root_delay, root_dispersion, refid_str(refid, stratum));
fflush(rawstats.fp);
}
}
@@ -806,7 +785,7 @@ record_proto_stats(
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* record_crypto_stats - write crypto statistics to file
*
@@ -842,7 +821,7 @@ record_crypto_stats(
fflush(cryptostats.fp);
}
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#ifdef DEBUG_TIMING
@@ -881,127 +860,68 @@ record_timing_stats(
/*
- * leap_file - read leapseconds file
+ * check_leap_file - See if the leapseconds file has been updated.
*
- * Read the ERTS leapsecond file in NIST text format and extract the
- * NTP seconds of the latest leap and TAI offset after the leap.
+ * Returns: n/a
+ *
+ * Note: This loads a new leapfile on the fly. Currently a leap file
+ * without SHA1 signature is accepted, but if there is a signature line,
+ * the signature must be valid or the file is rejected.
*/
-static int
-leap_file(
- FILE *fp /* file handle */
+void
+check_leap_file(
+ int is_daily_check,
+ uint32_t ntptime ,
+ const time_t *systime
)
{
- char buf[NTP_MAXSTRLEN]; /* file line buffer */
- u_long leap; /* NTP time at leap */
- u_long expire; /* NTP time when file expires */
- int offset; /* TAI offset at leap (s) */
- int i;
-
- /*
- * Read and parse the leapseconds file. Empty lines and comments
- * are ignored. A line beginning with #@ contains the file
- * expiration time in NTP seconds. Other lines begin with two
- * integers followed by junk or comments. The first integer is
- * the NTP seconds at the leap, the second is the TAI offset
- * after the leap.
- */
- offset = 0;
- leap = 0;
- expire = 0;
- i = 10;
- while (fgets(buf, NTP_MAXSTRLEN - 1, fp) != NULL) {
- if (strlen(buf) < 1)
- continue;
-
- if (buf[0] == '#') {
- if (strlen(buf) < 3)
- continue;
-
- /*
- * Note the '@' flag was used only in the 2006
- * table; previious to that the flag was '$'.
- */
- if (buf[1] == '@' || buf[1] == '$') {
- if (sscanf(&buf[2], "%lu", &expire) !=
- 1)
- return (-1);
-
- continue;
- }
- }
- if (sscanf(buf, "%lu %d", &leap, &offset) == 2) {
-
- /*
- * Valid offsets must increase by one for each
- * leap.
- */
- if (i++ != offset)
- return (-1);
- }
- }
-
- /*
- * There must be at least one leap.
- */
- if (i == 10)
- return (-1);
+ /* just do nothing if there is no leap file */
+ if ( ! (leapfile_name && *leapfile_name))
+ return;
+
+ /* try to load leapfile, force it if no leapfile loaded yet */
+ if (leapsec_load_file(
+ leapfile_name, &leapfile_stat,
+ !have_leapfile, is_daily_check))
+ have_leapfile = TRUE;
+ else if (!have_leapfile)
+ return;
- leap_tai = offset;
- leap_sec = leap;
- leap_expire = expire;
- return (0);
+ check_leap_expiration(is_daily_check, ntptime, systime);
}
-
/*
- * leap_month - returns seconds until the end of the month.
+ * check expiration of a loaded leap table
*/
-u_long
-leap_month(
- u_long sec /* current NTP second */
+static void
+check_leap_expiration(
+ int is_daily_check,
+ uint32_t ntptime ,
+ const time_t *systime
)
{
- u_long ltemp;
- u_long *ptr;
- u_long year[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30,
- 31};
- u_long lyear[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30,
- 31};
+ static const char * const logPrefix = "leapsecond file";
+ int rc;
- /*
- * Find current leap cycle.
+ /* test the expiration of the leap data and log with proper
+ * level and frequency (once/hour or once/day, depending on the
+ * state.
*/
- ltemp = sec;
- while (ltemp >= L_CENT)
- ltemp -= L_CENT;
- while (ltemp >= L_4YEAR)
- ltemp -= L_4YEAR;
-
- /*
- * We are within four years of the target. If in leap year, use
- * leap year month table; otherwise, use year month table.
- */
- if (ltemp < L_LYEAR) {
- ptr = lyear;
- } else {
- ptr = year;
- ltemp -= L_LYEAR;
- while (ltemp >= L_YEAR)
- ltemp -= L_YEAR;
+ rc = leapsec_daystolive(ntptime, systime);
+ if (rc == 0) {
+ msyslog(LOG_WARNING,
+ "%s ('%s'): will expire in less than one day",
+ logPrefix, leapfile_name);
+ } else if (is_daily_check && rc < 28) {
+ if (rc < 0)
+ msyslog(LOG_ERR,
+ "%s ('%s'): expired less than %d day%s ago",
+ logPrefix, leapfile_name, -rc, (rc == -1 ? "" : "s"));
+ else
+ msyslog(LOG_WARNING,
+ "%s ('%s'): will expire in less than %d days",
+ logPrefix, leapfile_name, 1+rc);
}
-
- /*
- * We are within one year of the target. Find the month of the
- * leap.
- */
- while (ltemp >= *ptr * L_DAY)
- ltemp -= *ptr++ * L_DAY;
-
- /*
- * The result is the number of seconds until the end of the
- * month when the leap is to occur.
- */
- return (*ptr * L_DAY - ltemp - L_DAY);
}
@@ -1021,7 +941,7 @@ getauthkeys(
#ifndef SYS_WINNT
key_file_name = erealloc(key_file_name, len + 1);
- memmove(key_file_name, keyfile, len + 1);
+ memcpy(key_file_name, keyfile, len + 1);
#else
key_file_name = erealloc(key_file_name, _MAX_PATH);
if (len + 1 > _MAX_PATH)
@@ -1030,8 +950,10 @@ getauthkeys(
_MAX_PATH)) {
msyslog(LOG_ERR,
"ExpandEnvironmentStrings(KEY_FILE) failed: %m");
- strncpy(key_file_name, keyfile, _MAX_PATH);
+ strlcpy(key_file_name, keyfile, _MAX_PATH);
}
+ key_file_name = erealloc(key_file_name,
+ 1 + strlen(key_file_name));
#endif /* SYS_WINNT */
authreadkeys(key_file_name);
@@ -1049,53 +971,6 @@ rereadkeys(void)
}
-/*
- * sock_hash - hash a sockaddr_u structure
- */
-u_short
-sock_hash(
- sockaddr_u *addr
- )
-{
- u_int hashVal;
- u_int j;
- size_t len;
- u_char *pch;
- 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.
- */
- pch = (u_char *)&AF(addr);
- hashVal = 37 * hashVal + *pch;
- if (sizeof(AF(addr)) > 1) {
- pch++;
- hashVal = 37 * hashVal + *pch;
- }
- switch(AF(addr)) {
- case AF_INET:
- pch = (u_char *)&SOCK_ADDR4(addr);
- len = sizeof(SOCK_ADDR4(addr));
- break;
-
- case AF_INET6:
- pch = (u_char *)&SOCK_ADDR6(addr);
- len = sizeof(SOCK_ADDR6(addr));
- break;
- }
-
- for (j = 0; j < len ; j++)
- hashVal = 37 * hashVal + pch[j];
-
- hashVal = hashVal & NTP_HASH_MASK;
-
- return (u_short)hashVal;
-}
-
-
#if notyet
/*
* ntp_exit - document explicitly that ntpd has exited
@@ -1115,19 +990,42 @@ char * fstostr(
time_t ntp_stamp
)
{
- static char str[20];
- struct tm * tm;
- time_t unix_stamp;
-
- unix_stamp = ntp_stamp - JAN_1970;
- tm = gmtime(&unix_stamp);
- if (NULL != tm)
- snprintf(str, sizeof(str),
- "%04d%02d%02d%02d%02d",
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min);
+ char * buf;
+ struct calendar tm;
+
+ LIB_GETBUF(buf);
+ if (ntpcal_ntp_to_date(&tm, (u_int32)ntp_stamp, NULL) < 0)
+ snprintf(buf, LIB_BUFLENGTH, "ntpcal_ntp_to_date: %ld: range error",
+ (long)ntp_stamp);
else
- strcpy(str, "gmtime() error");
+ snprintf(buf, LIB_BUFLENGTH, "%04d%02d%02d%02d%02d",
+ tm.year, tm.month, tm.monthday,
+ tm.hour, tm.minute);
+ return buf;
+}
+
+
+/*
+ * ntpd_time_stepped is called back by step_systime(), allowing ntpd
+ * to do any one-time processing necessitated by the step.
+ */
+void
+ntpd_time_stepped(void)
+{
+ u_int saved_mon_enabled;
- return str;
+ /*
+ * flush the monitor MRU list which contains l_fp timestamps
+ * which should not be compared across the step.
+ */
+ if (MON_OFF != mon_enabled) {
+ saved_mon_enabled = mon_enabled;
+ mon_stop(MON_OFF);
+ mon_start(saved_mon_enabled);
+ }
+
+ /* inform interpolating Windows code to allow time to go back */
+#ifdef SYS_WINNT
+ win_time_stepped();
+#endif
}
diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c
index d5989bffde0f..82fe62477fdc 100644
--- a/ntpd/ntpd-opts.c
+++ b/ntpd/ntpd-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:01 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:46:33 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,35 +15,42 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpd program is copyrighted and licensed
+ * under the following terms:
*
- * see html/copyright.html
- *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ntpd-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#define OPTION_CODE_COMPILE 1
-#include "ntpd-opts.h"
-
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
-
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[38] =
-"ntpd 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
+#define zCopyright (ntpd_opt_strs+0)
+#define zLicenseDescrip (ntpd_opt_strs+310)
/*
* global included definitions
@@ -54,469 +61,723 @@ extern tUsageProc optionUsage;
# include <stdlib.h>
#endif
+#ifdef __windows
+ extern int atoi(const char*);
+#else
+# include <stdlib.h>
+#endif
+
#ifndef NULL
# define NULL 0
#endif
-/*
- * Ipv4 option description with
+/**
+ * static const strings for ntpd options
+ */
+static char const ntpd_opt_strs[2999] =
+/* 0 */ "ntpd 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 310 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 950 */ "Force IPv4 DNS name resolution\0"
+/* 981 */ "IPV4\0"
+/* 986 */ "ipv4\0"
+/* 991 */ "Force IPv6 DNS name resolution\0"
+/* 1022 */ "IPV6\0"
+/* 1027 */ "ipv6\0"
+/* 1032 */ "Require crypto authentication\0"
+/* 1062 */ "AUTHREQ\0"
+/* 1070 */ "authreq\0"
+/* 1078 */ "Do not require crypto authentication\0"
+/* 1115 */ "AUTHNOREQ\0"
+/* 1125 */ "authnoreq\0"
+/* 1135 */ "Allow us to sync to broadcast servers\0"
+/* 1173 */ "BCASTSYNC\0"
+/* 1183 */ "bcastsync\0"
+/* 1193 */ "configuration file name\0"
+/* 1217 */ "CONFIGFILE\0"
+/* 1228 */ "configfile\0"
+/* 1239 */ "Increase debug verbosity level\0"
+/* 1270 */ "DEBUG_LEVEL\0"
+/* 1282 */ "debug-level\0"
+/* 1294 */ "Set the debug verbosity level\0"
+/* 1324 */ "SET_DEBUG_LEVEL\0"
+/* 1340 */ "set-debug-level\0"
+/* 1356 */ "frequency drift file name\0"
+/* 1382 */ "DRIFTFILE\0"
+/* 1392 */ "driftfile\0"
+/* 1402 */ "Allow the first adjustment to be Big\0"
+/* 1439 */ "PANICGATE\0"
+/* 1449 */ "panicgate\0"
+/* 1459 */ "Jail directory\0"
+/* 1474 */ "JAILDIR\0"
+/* 1482 */ "jaildir\0"
+/* 1490 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1569 */ "Listen on an interface name or address\0"
+/* 1608 */ "INTERFACE\0"
+/* 1618 */ "interface\0"
+/* 1628 */ "path to symmetric keys\0"
+/* 1651 */ "KEYFILE\0"
+/* 1659 */ "keyfile\0"
+/* 1667 */ "path to the log file\0"
+/* 1688 */ "LOGFILE\0"
+/* 1696 */ "logfile\0"
+/* 1704 */ "Do not listen to virtual interfaces\0"
+/* 1740 */ "NOVIRTUALIPS\0"
+/* 1753 */ "novirtualips\0"
+/* 1766 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1805 */ "MODIFYMMTIMER\0"
+/* 1819 */ "modifymmtimer\0"
+/* 1833 */ "Do not fork\0"
+/* 1845 */ "NOFORK\0"
+/* 1852 */ "nofork\0"
+/* 1859 */ "Run at high priority\0"
+/* 1880 */ "NICE\0"
+/* 1885 */ "nice\0"
+/* 1890 */ "path to the PID file\0"
+/* 1911 */ "PIDFILE\0"
+/* 1919 */ "pidfile\0"
+/* 1927 */ "Process priority\0"
+/* 1944 */ "PRIORITY\0"
+/* 1953 */ "priority\0"
+/* 1962 */ "Set the time and quit\0"
+/* 1984 */ "QUIT\0"
+/* 1989 */ "quit\0"
+/* 1994 */ "Broadcast/propagation delay\0"
+/* 2022 */ "PROPAGATIONDELAY\0"
+/* 2039 */ "propagationdelay\0"
+/* 2056 */ "Save parsed configuration and quit\0"
+/* 2091 */ "SAVECONFIGQUIT\0"
+/* 2106 */ "saveconfigquit\0"
+/* 2121 */ "Statistics file location\0"
+/* 2146 */ "STATSDIR\0"
+/* 2155 */ "statsdir\0"
+/* 2164 */ "Trusted key number\0"
+/* 2183 */ "TRUSTEDKEY\0"
+/* 2194 */ "trustedkey\0"
+/* 2205 */ "Run as userid (or userid:groupid)\0"
+/* 2239 */ "USER\0"
+/* 2244 */ "user\0"
+/* 2249 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2313 */ "UPDATEINTERVAL\0"
+/* 2328 */ "updateinterval\0"
+/* 2343 */ "make ARG an ntp variable (RW)\0"
+/* 2373 */ "VAR\0"
+/* 2377 */ "var\0"
+/* 2381 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2415 */ "DVAR\0"
+/* 2420 */ "dvar\0"
+/* 2425 */ "Seconds to wait for first clock sync\0"
+/* 2462 */ "WAIT_SYNC\0"
+/* 2472 */ "wait-sync\0"
+/* 2482 */ "Slew up to 600 seconds\0"
+/* 2505 */ "SLEW\0"
+/* 2510 */ "slew\0"
+/* 2515 */ "Use CPU cycle counter (Windows only)\0"
+/* 2552 */ "USEPCC\0"
+/* 2559 */ "usepcc\0"
+/* 2566 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2609 */ "PCCFREQ\0"
+/* 2617 */ "pccfreq\0"
+/* 2625 */ "Register with mDNS as a NTP server\0"
+/* 2660 */ "MDNS\0"
+/* 2665 */ "mdns\0"
+/* 2670 */ "display extended usage information and exit\0"
+/* 2714 */ "help\0"
+/* 2719 */ "extended usage information passed thru pager\0"
+/* 2764 */ "more-help\0"
+/* 2774 */ "output version information and exit\0"
+/* 2810 */ "version\0"
+/* 2818 */ "NTPD\0"
+/* 2823 */ "ntpd - NTP daemon program - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
+ "\t\t[ <server1> ... <serverN> ]\n\0"
+/* 2952 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2986 */ "\n\0"
+/* 2988 */ "ntpd 4.2.8";
+
+/**
+ * ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv4Text[] =
- "Force IPv4 DNS name resolution";
-static char const zIpv4_NAME[] = "IPV4";
-static char const zIpv4_Name[] = "ipv4";
-static const int
- aIpv4CantList[] = {
+/** Descriptive text for the ipv4 option */
+#define IPV4_DESC (ntpd_opt_strs+950)
+/** Upper-cased name for the ipv4 option */
+#define IPV4_NAME (ntpd_opt_strs+981)
+/** Name string for the ipv4 option */
+#define IPV4_name (ntpd_opt_strs+986)
+/** Other options that appear in conjunction with the ipv4 option */
+static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
-#define IPV4_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv4 option */
+#define IPV4_FLAGS (OPTST_DISABLED)
-/*
- * Ipv6 option description with
+/**
+ * ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv6Text[] =
- "Force IPv6 DNS name resolution";
-static char const zIpv6_NAME[] = "IPV6";
-static char const zIpv6_Name[] = "ipv6";
-static const int
- aIpv6CantList[] = {
+/** Descriptive text for the ipv6 option */
+#define IPV6_DESC (ntpd_opt_strs+991)
+/** Upper-cased name for the ipv6 option */
+#define IPV6_NAME (ntpd_opt_strs+1022)
+/** Name string for the ipv6 option */
+#define IPV6_name (ntpd_opt_strs+1027)
+/** Other options that appear in conjunction with the ipv6 option */
+static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
-#define IPV6_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv6 option */
+#define IPV6_FLAGS (OPTST_DISABLED)
-/*
- * Authreq option description with
+/**
+ * authreq option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zAuthreqText[] =
- "Require crypto authentication";
-static char const zAuthreq_NAME[] = "AUTHREQ";
-static char const zAuthreq_Name[] = "authreq";
-static const int
- aAuthreqCantList[] = {
+/** Descriptive text for the authreq option */
+#define AUTHREQ_DESC (ntpd_opt_strs+1032)
+/** Upper-cased name for the authreq option */
+#define AUTHREQ_NAME (ntpd_opt_strs+1062)
+/** Name string for the authreq option */
+#define AUTHREQ_name (ntpd_opt_strs+1070)
+/** Other options that appear in conjunction with the authreq option */
+static int const aAuthreqCantList[] = {
INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
-#define AUTHREQ_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the authreq option */
+#define AUTHREQ_FLAGS (OPTST_DISABLED)
-/*
- * Authnoreq option description with
+/**
+ * authnoreq option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zAuthnoreqText[] =
- "Do not require crypto authentication";
-static char const zAuthnoreq_NAME[] = "AUTHNOREQ";
-static char const zAuthnoreq_Name[] = "authnoreq";
-static const int
- aAuthnoreqCantList[] = {
+/** Descriptive text for the authnoreq option */
+#define AUTHNOREQ_DESC (ntpd_opt_strs+1078)
+/** Upper-cased name for the authnoreq option */
+#define AUTHNOREQ_NAME (ntpd_opt_strs+1115)
+/** Name string for the authnoreq option */
+#define AUTHNOREQ_name (ntpd_opt_strs+1125)
+/** Other options that appear in conjunction with the authnoreq option */
+static int const aAuthnoreqCantList[] = {
INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
-#define AUTHNOREQ_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the authnoreq option */
+#define AUTHNOREQ_FLAGS (OPTST_DISABLED)
-/*
- * Bcastsync option description:
+/**
+ * bcastsync option description:
*/
-static char const zBcastsyncText[] =
- "Allow us to sync to broadcast servers";
-static char const zBcastsync_NAME[] = "BCASTSYNC";
-static char const zBcastsync_Name[] = "bcastsync";
-#define BCASTSYNC_FLAGS (OPTST_DISABLED)
-
-/*
- * Configfile option description:
+/** Descriptive text for the bcastsync option */
+#define BCASTSYNC_DESC (ntpd_opt_strs+1135)
+/** Upper-cased name for the bcastsync option */
+#define BCASTSYNC_NAME (ntpd_opt_strs+1173)
+/** Name string for the bcastsync option */
+#define BCASTSYNC_name (ntpd_opt_strs+1183)
+/** Compiled in flag settings for the bcastsync option */
+#define BCASTSYNC_FLAGS (OPTST_DISABLED)
+
+/**
+ * configfile option description:
*/
-static char const zConfigfileText[] =
- "configuration file name";
-static char const zConfigfile_NAME[] = "CONFIGFILE";
-static char const zConfigfile_Name[] = "configfile";
-#define CONFIGFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the configfile option */
+#define CONFIGFILE_DESC (ntpd_opt_strs+1193)
+/** Upper-cased name for the configfile option */
+#define CONFIGFILE_NAME (ntpd_opt_strs+1217)
+/** Name string for the configfile option */
+#define CONFIGFILE_name (ntpd_opt_strs+1228)
+/** Compiled in flag settings for the configfile option */
+#define CONFIGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Debug_Level option description:
+/**
+ * debug-level option description:
*/
-#ifdef DEBUG
-static char const zDebug_LevelText[] =
- "Increase output debug message level";
-static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
-static char const zDebug_Level_Name[] = "debug-level";
-#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
-
-#else /* disable Debug_Level */
-#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_Level_NAME NULL
-static char const zDebug_Level_Name[] = "debug-level";
-static char const zDebug_LevelText[] = "this package was built using 'configure --disable--debug'";
-#endif /* DEBUG */
-
-/*
- * Set_Debug_Level option description:
+/** Descriptive text for the debug-level option */
+#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1239)
+/** Upper-cased name for the debug-level option */
+#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1270)
+/** Name string for the debug-level option */
+#define DEBUG_LEVEL_name (ntpd_opt_strs+1282)
+/** Compiled in flag settings for the debug-level option */
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/**
+ * set-debug-level option description:
*/
-#ifdef DEBUG
-static char const zSet_Debug_LevelText[] =
- "Set the output debug message level";
-static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-static char const zSet_Debug_Level_Name[] = "set-debug-level";
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-
-#else /* disable Set_Debug_Level */
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_Level_NAME NULL
-static char const zSet_Debug_Level_Name[] = "set-debug-level";
-static char const zSet_Debug_LevelText[] = "this package was built using 'configure --disable--debug'";
-#endif /* DEBUG */
+/** Descriptive text for the set-debug-level option */
+#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1294)
+/** Upper-cased name for the set-debug-level option */
+#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1324)
+/** Name string for the set-debug-level option */
+#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1340)
+/** Compiled in flag settings for the set-debug-level option */
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Driftfile option description:
+/**
+ * driftfile option description:
*/
-static char const zDriftfileText[] =
- "frequency drift file name";
-static char const zDriftfile_NAME[] = "DRIFTFILE";
-static char const zDriftfile_Name[] = "driftfile";
-#define DRIFTFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the driftfile option */
+#define DRIFTFILE_DESC (ntpd_opt_strs+1356)
+/** Upper-cased name for the driftfile option */
+#define DRIFTFILE_NAME (ntpd_opt_strs+1382)
+/** Name string for the driftfile option */
+#define DRIFTFILE_name (ntpd_opt_strs+1392)
+/** Compiled in flag settings for the driftfile option */
+#define DRIFTFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Panicgate option description:
+/**
+ * panicgate option description:
*/
-static char const zPanicgateText[] =
- "Allow the first adjustment to be Big";
-static char const zPanicgate_NAME[] = "PANICGATE";
-static char const zPanicgate_Name[] = "panicgate";
-#define PANICGATE_FLAGS (OPTST_DISABLED)
-
-/*
- * Jaildir option description:
+/** Descriptive text for the panicgate option */
+#define PANICGATE_DESC (ntpd_opt_strs+1402)
+/** Upper-cased name for the panicgate option */
+#define PANICGATE_NAME (ntpd_opt_strs+1439)
+/** Name string for the panicgate option */
+#define PANICGATE_name (ntpd_opt_strs+1449)
+/** Compiled in flag settings for the panicgate option */
+#define PANICGATE_FLAGS (OPTST_DISABLED)
+
+/**
+ * jaildir option description:
*/
#ifdef HAVE_DROPROOT
-static char const zJaildirText[] =
- "Jail directory";
-static char const zJaildir_NAME[] = "JAILDIR";
-static char const zJaildir_Name[] = "jaildir";
-#define JAILDIR_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the jaildir option */
+#define JAILDIR_DESC (ntpd_opt_strs+1459)
+/** Upper-cased name for the jaildir option */
+#define JAILDIR_NAME (ntpd_opt_strs+1474)
+/** Name string for the jaildir option */
+#define JAILDIR_name (ntpd_opt_strs+1482)
+/** Compiled in flag settings for the jaildir option */
+#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Jaildir */
-#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zJaildir_NAME NULL
-static char const zJaildir_Name[] = "jaildir";
-static char const zJaildirText[] = "built without --enable-clockctl or --enable-linuxcaps";
+#else /* disable jaildir */
+#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define JAILDIR_NAME NULL
+/** Descriptive text for the jaildir option */
+#define JAILDIR_DESC (ntpd_opt_strs+1490)
+#define JAILDIR_name (ntpd_opt_strs+1482)
#endif /* HAVE_DROPROOT */
-/*
- * Interface option description:
+/**
+ * interface option description:
*/
-static char const zInterfaceText[] =
- "Listen on an interface name or address";
-static char const zInterface_NAME[] = "INTERFACE";
-static char const zInterface_Name[] = "interface";
-#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
+/** Descriptive text for the interface option */
+#define INTERFACE_DESC (ntpd_opt_strs+1569)
+/** Upper-cased name for the interface option */
+#define INTERFACE_NAME (ntpd_opt_strs+1608)
+/** Name string for the interface option */
+#define INTERFACE_name (ntpd_opt_strs+1618)
+/** Compiled in flag settings for the interface option */
+#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Keyfile option description:
+/**
+ * keyfile option description:
*/
-static char const zKeyfileText[] =
- "path to symmetric keys";
-static char const zKeyfile_NAME[] = "KEYFILE";
-static char const zKeyfile_Name[] = "keyfile";
-#define KEYFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the keyfile option */
+#define KEYFILE_DESC (ntpd_opt_strs+1628)
+/** Upper-cased name for the keyfile option */
+#define KEYFILE_NAME (ntpd_opt_strs+1651)
+/** Name string for the keyfile option */
+#define KEYFILE_name (ntpd_opt_strs+1659)
+/** Compiled in flag settings for the keyfile option */
+#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Logfile option description:
+/**
+ * logfile option description:
*/
-static char const zLogfileText[] =
- "path to the log file";
-static char const zLogfile_NAME[] = "LOGFILE";
-static char const zLogfile_Name[] = "logfile";
-#define LOGFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the logfile option */
+#define LOGFILE_DESC (ntpd_opt_strs+1667)
+/** Upper-cased name for the logfile option */
+#define LOGFILE_NAME (ntpd_opt_strs+1688)
+/** Name string for the logfile option */
+#define LOGFILE_name (ntpd_opt_strs+1696)
+/** Compiled in flag settings for the logfile option */
+#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Novirtualips option description:
+/**
+ * novirtualips option description:
*/
-static char const zNovirtualipsText[] =
- "Do not listen to virtual interfaces";
-static char const zNovirtualips_NAME[] = "NOVIRTUALIPS";
-static char const zNovirtualips_Name[] = "novirtualips";
-#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
-
-/*
- * Modifymmtimer option description:
+/** Descriptive text for the novirtualips option */
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1704)
+/** Upper-cased name for the novirtualips option */
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1740)
+/** Name string for the novirtualips option */
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1753)
+/** Compiled in flag settings for the novirtualips option */
+#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
+
+/**
+ * modifymmtimer option description:
*/
#ifdef SYS_WINNT
-static char const zModifymmtimerText[] =
- "Modify Multimedia Timer (Windows only)";
-static char const zModifymmtimer_NAME[] = "MODIFYMMTIMER";
-static char const zModifymmtimer_Name[] = "modifymmtimer";
-#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
-
-#else /* disable Modifymmtimer */
-#define MODIFYMMTIMER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zModifymmtimer_NAME NULL
-#define zModifymmtimerText NULL
-#define zModifymmtimer_Name NULL
+/** Descriptive text for the modifymmtimer option */
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1766)
+/** Upper-cased name for the modifymmtimer option */
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1805)
+/** Name string for the modifymmtimer option */
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1819)
+/** Compiled in flag settings for the modifymmtimer option */
+#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
+
+#else /* disable modifymmtimer */
+#define MODIFYMMTIMER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define MODIFYMMTIMER_NAME NULL
+#define MODIFYMMTIMER_DESC NULL
+#define MODIFYMMTIMER_name NULL
#endif /* SYS_WINNT */
-/*
- * Nofork option description:
+/**
+ * nofork option description with
+ * "Must also have options" and "Incompatible options":
*/
-static char const zNoforkText[] =
- "Do not fork";
-static char const zNofork_NAME[] = "NOFORK";
-static char const zNofork_Name[] = "nofork";
-#define NOFORK_FLAGS (OPTST_DISABLED)
-
-/*
- * Nice option description:
+/** Descriptive text for the nofork option */
+#define NOFORK_DESC (ntpd_opt_strs+1833)
+/** Upper-cased name for the nofork option */
+#define NOFORK_NAME (ntpd_opt_strs+1845)
+/** Name string for the nofork option */
+#define NOFORK_name (ntpd_opt_strs+1852)
+/** Other options that appear in conjunction with the nofork option */
+static int const aNoforkCantList[] = {
+ INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
+/** Compiled in flag settings for the nofork option */
+#define NOFORK_FLAGS (OPTST_DISABLED)
+
+/**
+ * nice option description:
*/
-static char const zNiceText[] =
- "Run at high priority";
-static char const zNice_NAME[] = "NICE";
-static char const zNice_Name[] = "nice";
-#define NICE_FLAGS (OPTST_DISABLED)
-
-/*
- * Pidfile option description:
+/** Descriptive text for the nice option */
+#define NICE_DESC (ntpd_opt_strs+1859)
+/** Upper-cased name for the nice option */
+#define NICE_NAME (ntpd_opt_strs+1880)
+/** Name string for the nice option */
+#define NICE_name (ntpd_opt_strs+1885)
+/** Compiled in flag settings for the nice option */
+#define NICE_FLAGS (OPTST_DISABLED)
+
+/**
+ * pidfile option description:
*/
-static char const zPidfileText[] =
- "path to the PID file";
-static char const zPidfile_NAME[] = "PIDFILE";
-static char const zPidfile_Name[] = "pidfile";
-#define PIDFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the pidfile option */
+#define PIDFILE_DESC (ntpd_opt_strs+1890)
+/** Upper-cased name for the pidfile option */
+#define PIDFILE_NAME (ntpd_opt_strs+1911)
+/** Name string for the pidfile option */
+#define PIDFILE_name (ntpd_opt_strs+1919)
+/** Compiled in flag settings for the pidfile option */
+#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Priority option description:
+/**
+ * priority option description:
*/
-static char const zPriorityText[] =
- "Process priority";
-static char const zPriority_NAME[] = "PRIORITY";
-static char const zPriority_Name[] = "priority";
-#define PRIORITY_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the priority option */
+#define PRIORITY_DESC (ntpd_opt_strs+1927)
+/** Upper-cased name for the priority option */
+#define PRIORITY_NAME (ntpd_opt_strs+1944)
+/** Name string for the priority option */
+#define PRIORITY_name (ntpd_opt_strs+1953)
+/** Compiled in flag settings for the priority option */
+#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Quit option description:
+/**
+ * quit option description with
+ * "Must also have options" and "Incompatible options":
*/
-static char const zQuitText[] =
- "Set the time and quit";
-static char const zQuit_NAME[] = "QUIT";
-static char const zQuit_Name[] = "quit";
-#define QUIT_FLAGS (OPTST_DISABLED)
-
-/*
- * Propagationdelay option description:
+/** Descriptive text for the quit option */
+#define QUIT_DESC (ntpd_opt_strs+1962)
+/** Upper-cased name for the quit option */
+#define QUIT_NAME (ntpd_opt_strs+1984)
+/** Name string for the quit option */
+#define QUIT_name (ntpd_opt_strs+1989)
+/** Other options that appear in conjunction with the quit option */
+static int const aQuitCantList[] = {
+ INDEX_OPT_SAVECONFIGQUIT,
+ INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
+/** Compiled in flag settings for the quit option */
+#define QUIT_FLAGS (OPTST_DISABLED)
+
+/**
+ * propagationdelay option description:
*/
-static char const zPropagationdelayText[] =
- "Broadcast/propagation delay";
-static char const zPropagationdelay_NAME[] = "PROPAGATIONDELAY";
-static char const zPropagationdelay_Name[] = "propagationdelay";
-#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the propagationdelay option */
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+1994)
+/** Upper-cased name for the propagationdelay option */
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2022)
+/** Name string for the propagationdelay option */
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2039)
+/** Compiled in flag settings for the propagationdelay option */
+#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Saveconfigquit option description:
+/**
+ * saveconfigquit option description with
+ * "Must also have options" and "Incompatible options":
*/
#ifdef SAVECONFIG
-static char const zSaveconfigquitText[] =
- "Save parsed configuration and quit";
-static char const zSaveconfigquit_NAME[] = "SAVECONFIGQUIT";
-static char const zSaveconfigquit_Name[] = "saveconfigquit";
-#define SAVECONFIGQUIT_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the saveconfigquit option */
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2056)
+/** Upper-cased name for the saveconfigquit option */
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2091)
+/** Name string for the saveconfigquit option */
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2106)
+/** Other options that appear in conjunction with the saveconfigquit option */
+static int const aSaveconfigquitCantList[] = {
+ INDEX_OPT_QUIT,
+ INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
+/** Compiled in flag settings for the saveconfigquit option */
+#define SAVECONFIGQUIT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Saveconfigquit */
-#define SAVECONFIGQUIT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSaveconfigquit_NAME NULL
-#define zSaveconfigquitText NULL
-#define zSaveconfigquit_Name NULL
+#else /* disable saveconfigquit */
+#define SAVECONFIGQUIT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define aSaveconfigquitCantList NULL
+#define SAVECONFIGQUIT_NAME NULL
+#define SAVECONFIGQUIT_DESC NULL
+#define SAVECONFIGQUIT_name NULL
#endif /* SAVECONFIG */
-/*
- * Statsdir option description:
+/**
+ * statsdir option description:
*/
-static char const zStatsdirText[] =
- "Statistics file location";
-static char const zStatsdir_NAME[] = "STATSDIR";
-static char const zStatsdir_Name[] = "statsdir";
-#define STATSDIR_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the statsdir option */
+#define STATSDIR_DESC (ntpd_opt_strs+2121)
+/** Upper-cased name for the statsdir option */
+#define STATSDIR_NAME (ntpd_opt_strs+2146)
+/** Name string for the statsdir option */
+#define STATSDIR_name (ntpd_opt_strs+2155)
+/** Compiled in flag settings for the statsdir option */
+#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Trustedkey option description:
+/**
+ * trustedkey option description:
*/
-static char const zTrustedkeyText[] =
- "Trusted key number";
-static char const zTrustedkey_NAME[] = "TRUSTEDKEY";
-static char const zTrustedkey_Name[] = "trustedkey";
-#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
+/** Descriptive text for the trustedkey option */
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2164)
+/** Upper-cased name for the trustedkey option */
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2183)
+/** Name string for the trustedkey option */
+#define TRUSTEDKEY_name (ntpd_opt_strs+2194)
+/** Compiled in flag settings for the trustedkey option */
+#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * User option description:
+/**
+ * user option description:
*/
#ifdef HAVE_DROPROOT
-static char const zUserText[] =
- "Run as userid (or userid:groupid)";
-static char const zUser_NAME[] = "USER";
-static char const zUser_Name[] = "user";
-#define USER_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the user option */
+#define USER_DESC (ntpd_opt_strs+2205)
+/** Upper-cased name for the user option */
+#define USER_NAME (ntpd_opt_strs+2239)
+/** Name string for the user option */
+#define USER_name (ntpd_opt_strs+2244)
+/** Compiled in flag settings for the user option */
+#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable User */
-#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zUser_NAME NULL
-static char const zUser_Name[] = "user";
-static char const zUserText[] = "built without --enable-clockctl or --enable-linuxcaps";
+#else /* disable user */
+#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define USER_NAME NULL
+/** Descriptive text for the user option */
+#define USER_DESC (ntpd_opt_strs+1490)
+#define USER_name (ntpd_opt_strs+2244)
#endif /* HAVE_DROPROOT */
-/*
- * Updateinterval option description:
+/**
+ * updateinterval option description:
*/
-static char const zUpdateintervalText[] =
- "interval in seconds between scans for new or dropped interfaces";
-static char const zUpdateinterval_NAME[] = "UPDATEINTERVAL";
-static char const zUpdateinterval_Name[] = "updateinterval";
-#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the updateinterval option */
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2249)
+/** Upper-cased name for the updateinterval option */
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2313)
+/** Name string for the updateinterval option */
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2328)
+/** Compiled in flag settings for the updateinterval option */
+#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Var option description:
+/**
+ * var option description:
*/
-static char const zVarText[] =
- "make ARG an ntp variable (RW)";
-static char const zVar_NAME[] = "VAR";
-static char const zVar_Name[] = "var";
-#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
+/** Descriptive text for the var option */
+#define VAR_DESC (ntpd_opt_strs+2343)
+/** Upper-cased name for the var option */
+#define VAR_NAME (ntpd_opt_strs+2373)
+/** Name string for the var option */
+#define VAR_name (ntpd_opt_strs+2377)
+/** Compiled in flag settings for the var option */
+#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Dvar option description:
+/**
+ * dvar option description:
*/
-static char const zDvarText[] =
- "make ARG an ntp variable (RW|DEF)";
-static char const zDvar_NAME[] = "DVAR";
-static char const zDvar_Name[] = "dvar";
-#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
+/** Descriptive text for the dvar option */
+#define DVAR_DESC (ntpd_opt_strs+2381)
+/** Upper-cased name for the dvar option */
+#define DVAR_NAME (ntpd_opt_strs+2415)
+/** Name string for the dvar option */
+#define DVAR_name (ntpd_opt_strs+2420)
+/** Compiled in flag settings for the dvar option */
+#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Slew option description:
+/**
+ * wait-sync option description with
+ * "Must also have options" and "Incompatible options":
*/
-static char const zSlewText[] =
- "Slew up to 600 seconds";
-static char const zSlew_NAME[] = "SLEW";
-static char const zSlew_Name[] = "slew";
-#define SLEW_FLAGS (OPTST_DISABLED)
+#ifdef HAVE_WORKING_FORK
+/** Descriptive text for the wait-sync option */
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2425)
+/** Upper-cased name for the wait-sync option */
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2462)
+/** Name string for the wait-sync option */
+#define WAIT_SYNC_name (ntpd_opt_strs+2472)
+/** Other options that appear in conjunction with the wait-sync option */
+static int const aWait_SyncCantList[] = {
+ INDEX_OPT_NOFORK,
+ INDEX_OPT_QUIT,
+ INDEX_OPT_SAVECONFIGQUIT, NO_EQUIVALENT };
+/** Compiled in flag settings for the wait-sync option */
+#define WAIT_SYNC_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Usepcc option description:
+#else /* disable wait-sync */
+#define WAIT_SYNC_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define aWait_SyncCantList NULL
+#define WAIT_SYNC_NAME NULL
+#define WAIT_SYNC_DESC NULL
+#define WAIT_SYNC_name NULL
+#endif /* HAVE_WORKING_FORK */
+
+/**
+ * slew option description:
+ */
+/** Descriptive text for the slew option */
+#define SLEW_DESC (ntpd_opt_strs+2482)
+/** Upper-cased name for the slew option */
+#define SLEW_NAME (ntpd_opt_strs+2505)
+/** Name string for the slew option */
+#define SLEW_name (ntpd_opt_strs+2510)
+/** Compiled in flag settings for the slew option */
+#define SLEW_FLAGS (OPTST_DISABLED)
+
+/**
+ * usepcc option description:
*/
#ifdef SYS_WINNT
-static char const zUsepccText[] =
- "Use CPU cycle counter (Windows only)";
-static char const zUsepcc_NAME[] = "USEPCC";
-static char const zUsepcc_Name[] = "usepcc";
-#define USEPCC_FLAGS (OPTST_DISABLED)
-
-#else /* disable Usepcc */
-#define USEPCC_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zUsepcc_NAME NULL
-#define zUsepccText NULL
-#define zUsepcc_Name NULL
+/** Descriptive text for the usepcc option */
+#define USEPCC_DESC (ntpd_opt_strs+2515)
+/** Upper-cased name for the usepcc option */
+#define USEPCC_NAME (ntpd_opt_strs+2552)
+/** Name string for the usepcc option */
+#define USEPCC_name (ntpd_opt_strs+2559)
+/** Compiled in flag settings for the usepcc option */
+#define USEPCC_FLAGS (OPTST_DISABLED)
+
+#else /* disable usepcc */
+#define USEPCC_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define USEPCC_NAME NULL
+#define USEPCC_DESC NULL
+#define USEPCC_name NULL
#endif /* SYS_WINNT */
-/*
- * Pccfreq option description:
+/**
+ * pccfreq option description:
*/
#ifdef SYS_WINNT
-static char const zPccfreqText[] =
- "Force CPU cycle counter use (Windows only)";
-static char const zPccfreq_NAME[] = "PCCFREQ";
-static char const zPccfreq_Name[] = "pccfreq";
-#define PCCFREQ_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the pccfreq option */
+#define PCCFREQ_DESC (ntpd_opt_strs+2566)
+/** Upper-cased name for the pccfreq option */
+#define PCCFREQ_NAME (ntpd_opt_strs+2609)
+/** Name string for the pccfreq option */
+#define PCCFREQ_name (ntpd_opt_strs+2617)
+/** Compiled in flag settings for the pccfreq option */
+#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Pccfreq */
-#define PCCFREQ_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zPccfreq_NAME NULL
-#define zPccfreqText NULL
-#define zPccfreq_Name NULL
+#else /* disable pccfreq */
+#define PCCFREQ_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define PCCFREQ_NAME NULL
+#define PCCFREQ_DESC NULL
+#define PCCFREQ_name NULL
#endif /* SYS_WINNT */
+/**
+ * mdns option description:
+ */
+#ifdef HAVE_DNSREGISTRATION
+/** Descriptive text for the mdns option */
+#define MDNS_DESC (ntpd_opt_strs+2625)
+/** Upper-cased name for the mdns option */
+#define MDNS_NAME (ntpd_opt_strs+2660)
+/** Name string for the mdns option */
+#define MDNS_name (ntpd_opt_strs+2665)
+/** Compiled in flag settings for the mdns option */
+#define MDNS_FLAGS (OPTST_DISABLED)
+
+#else /* disable mdns */
+#define MDNS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define MDNS_NAME NULL
+#define MDNS_DESC NULL
+#define MDNS_name NULL
+#endif /* HAVE_DNSREGISTRATION */
+
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (ntpd_opt_strs+2670)
+#define HELP_name (ntpd_opt_strs+2714)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (ntpd_opt_strs+2719)
+#define MORE_HELP_name (ntpd_opt_strs+2764)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-/*
+#define VER_DESC (ntpd_opt_strs+2774)
+#define VER_name (ntpd_opt_strs+2810)
+/**
* Declare option callback procedures
*/
-#ifdef DEBUG
- static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
-#if defined(TEST_NTPD_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-static tOptProc
- doUsageOpt;
-
-/*
- * #define map the "normal" callout procs to the test ones...
- */
-#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
-
-
-#else /* NOT defined TEST_NTPD_OPTS */
-/*
- * When not under test, there are different procs to use
- */
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ ntpOptionPrintVersion, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
- doUsageOpt;
-
-/*
- * #define map the "normal" callout procs
- */
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-#endif /* defined(TEST_NTPD_OPTS) */
-#ifdef TEST_NTPD_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_NTPD_OPTS */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpd Option Descriptions.
+ doOptDebug_Level, doUsageOpt;
+#define VER_PROC ntpOptionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the ntpd Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ntpd program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
@@ -524,11 +785,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV4_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv4 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv4CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
+ /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_OPT_IPV6,
@@ -536,11 +797,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV6_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv6 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv6CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
+ /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 2, VALUE_OPT_AUTHREQ,
@@ -548,11 +809,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ AUTHREQ_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --authreq */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aAuthreqCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zAuthreqText, zAuthreq_NAME, zAuthreq_Name,
+ /* desc, NAME, name */ AUTHREQ_DESC, AUTHREQ_NAME, AUTHREQ_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 3, VALUE_OPT_AUTHNOREQ,
@@ -560,11 +821,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ AUTHNOREQ_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --authnoreq */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aAuthnoreqCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zAuthnoreqText, zAuthnoreq_NAME, zAuthnoreq_Name,
+ /* desc, NAME, name */ AUTHNOREQ_DESC, AUTHNOREQ_NAME, AUTHNOREQ_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 4, VALUE_OPT_BCASTSYNC,
@@ -572,11 +833,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ BCASTSYNC_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --bcastsync */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zBcastsyncText, zBcastsync_NAME, zBcastsync_Name,
+ /* desc, NAME, name */ BCASTSYNC_DESC, BCASTSYNC_NAME, BCASTSYNC_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 5, VALUE_OPT_CONFIGFILE,
@@ -584,11 +845,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ CONFIGFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --configfile */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zConfigfileText, zConfigfile_NAME, zConfigfile_Name,
+ /* desc, NAME, name */ CONFIGFILE_DESC, CONFIGFILE_NAME, CONFIGFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 6, VALUE_OPT_DEBUG_LEVEL,
@@ -596,11 +857,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
+ /* option proc */ doOptDebug_Level,
+ /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 7, VALUE_OPT_SET_DEBUG_LEVEL,
@@ -608,11 +869,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --set-debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
- /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 8, VALUE_OPT_DRIFTFILE,
@@ -620,11 +881,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ DRIFTFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --driftfile */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zDriftfileText, zDriftfile_NAME, zDriftfile_Name,
+ /* desc, NAME, name */ DRIFTFILE_DESC, DRIFTFILE_NAME, DRIFTFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 9, VALUE_OPT_PANICGATE,
@@ -632,11 +893,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ PANICGATE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --panicgate */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPanicgateText, zPanicgate_NAME, zPanicgate_Name,
+ /* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
@@ -644,11 +905,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ JAILDIR_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --jaildir */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zJaildirText, zJaildir_NAME, zJaildir_Name,
+ /* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
@@ -656,11 +917,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ INTERFACE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --interface */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionStackArg,
- /* desc, NAME, name */ zInterfaceText, zInterface_NAME, zInterface_Name,
+ /* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
@@ -668,11 +929,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --keyfile */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zKeyfileText, zKeyfile_NAME, zKeyfile_Name,
+ /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
@@ -680,11 +941,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --logfile */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zLogfileText, zLogfile_NAME, zLogfile_Name,
+ /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
@@ -692,11 +953,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --novirtualips */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zNovirtualipsText, zNovirtualips_NAME, zNovirtualips_Name,
+ /* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
@@ -704,11 +965,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --modifymmtimer */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zModifymmtimerText, zModifymmtimer_NAME, zModifymmtimer_Name,
+ /* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 16, VALUE_OPT_NOFORK,
@@ -716,11 +977,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --nofork */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
+ /* must/cannot opts */ NULL, aNoforkCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zNoforkText, zNofork_NAME, zNofork_Name,
+ /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 17, VALUE_OPT_NICE,
@@ -728,11 +989,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NICE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --nice */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zNiceText, zNice_NAME, zNice_Name,
+ /* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
@@ -740,11 +1001,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PIDFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --pidfile */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPidfileText, zPidfile_NAME, zPidfile_Name,
+ /* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
@@ -752,11 +1013,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PRIORITY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --priority */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionNumericVal,
- /* desc, NAME, name */ zPriorityText, zPriority_NAME, zPriority_Name,
+ /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 20, VALUE_OPT_QUIT,
@@ -764,11 +1025,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ QUIT_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --quit */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
+ /* must/cannot opts */ NULL, aQuitCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zQuitText, zQuit_NAME, zQuit_Name,
+ /* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
@@ -776,11 +1037,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --propagationdelay */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPropagationdelayText, zPropagationdelay_NAME, zPropagationdelay_Name,
+ /* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
@@ -788,11 +1049,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --saveconfigquit */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
+ /* must/cannot opts */ NULL, aSaveconfigquitCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zSaveconfigquitText, zSaveconfigquit_NAME, zSaveconfigquit_Name,
+ /* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
@@ -800,11 +1061,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --statsdir */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zStatsdirText, zStatsdir_NAME, zStatsdir_Name,
+ /* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
@@ -812,11 +1073,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --trustedkey */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionStackArg,
- /* desc, NAME, name */ zTrustedkeyText, zTrustedkey_NAME, zTrustedkey_Name,
+ /* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 25, VALUE_OPT_USER,
@@ -824,11 +1085,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --user */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zUserText, zUser_NAME, zUser_Name,
+ /* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
@@ -836,11 +1097,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --updateinterval */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionNumericVal,
- /* desc, NAME, name */ zUpdateintervalText, zUpdateinterval_NAME, zUpdateinterval_Name,
+ /* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 27, VALUE_OPT_VAR,
@@ -848,11 +1109,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --var */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionStackArg,
- /* desc, NAME, name */ zVarText, zVar_NAME, zVar_Name,
+ /* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 28, VALUE_OPT_DVAR,
@@ -860,104 +1121,131 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --dvar */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionStackArg,
- /* desc, NAME, name */ zDvarText, zDvar_NAME, zDvar_Name,
+ /* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
+ /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ WAIT_SYNC_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --wait-sync */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, aWait_SyncCantList,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 29, VALUE_OPT_SLEW,
- /* equiv idx, value */ 29, VALUE_OPT_SLEW,
+ { /* entry idx, value */ 30, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 30, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --slew */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSlewText, zSlew_NAME, zSlew_Name,
+ /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 30, VALUE_OPT_USEPCC,
- /* equiv idx, value */ 30, VALUE_OPT_USEPCC,
+ { /* entry idx, value */ 31, VALUE_OPT_USEPCC,
+ /* equiv idx, value */ 31, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --usepcc */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zUsepccText, zUsepcc_NAME, zUsepcc_Name,
+ /* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 31, VALUE_OPT_PCCFREQ,
- /* equiv idx, value */ 31, VALUE_OPT_PCCFREQ,
+ { /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
+ /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --pccfreq */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 33, VALUE_OPT_MDNS,
+ /* equiv idx, value */ 33, VALUE_OPT_MDNS,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ MDNS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --mdns */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPccfreqText, zPccfreq_NAME, zPccfreq_Name,
+ /* desc, NAME, name */ MDNS_DESC, MDNS_NAME, MDNS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpd Option Environment
- */
-static char const zPROGNAME[5] = "NTPD";
-static char const zUsageTitle[99] =
-"ntpd - NTP daemon program - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
-#define zRcName NULL
-#define apzHomeList NULL
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-static char const zDetail[7] = "\n\n";
-static char const zFullVersion[] = NTPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of ntpd. */
+#define zPROGNAME (ntpd_opt_strs+2818)
+/** Reference to the title line for ntpd usage. */
+#define zUsageTitle (ntpd_opt_strs+2823)
+/** There is no ntpd configuration file. */
+#define zRcName NULL
+/** There are no directories to search for ntpd config files. */
+#define apzHomeList NULL
+/** The ntpd program bug email address. */
+#define zBugsAddr (ntpd_opt_strs+2952)
+/** Clarification/explanation of what ntpd does. */
+#define zExplain (ntpd_opt_strs+2986)
+/** Extra detail explaining what ntpd does. */
+#define zDetail (NULL)
+/** The full version string for ntpd. */
+#define zFullVersion (ntpd_opt_strs+2988)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -967,16 +1255,71 @@ static char const zFullVersion[] = NTPD_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define ntpd_full_usage (NULL)
+#define ntpd_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = NTPD_EXIT_SUCCESS;
+ optionUsage(&ntpdOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
-#define ntpd_full_usage NULL
-#define ntpd_short_usage NULL
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug-level option.
+ *
+ * @param[in] pOptions the ntpd options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /*
+ * Be sure the flag-code[0] handles special values for the options pointer
+ * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
+ * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
+ * reset its state.
+ */
+ /* extracted from debug-opt.def, line 15 */
+OPT_VALUE_SET_DEBUG_LEVEL++;
+ (void)pOptDesc;
+ (void)pOptions;
+}
+/* extracted from optmain.tlib near line 1245 */
+
+/**
+ * The directory containing the data associated with ntpd.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged ntpd
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define ntpd_packager_info NULL
#else
+/** Packager information for ntpd. */
static char const ntpd_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -989,7 +1332,13 @@ static char const ntpd_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ntpd. The one structure that
+ * binds them all.
+ */
tOptions ntpdOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -999,7 +1348,6 @@ tOptions ntpdOptions = {
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ OPTPROC_ENVIRON
- + OPTPROC_NO_ARGS
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
@@ -1018,142 +1366,586 @@ tOptions ntpdOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 35 /* full option count */, 32 /* user option count */,
+ 37 /* full option count */, 34 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL,
PKGDATADIR, ntpd_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(NTPD_EXIT_SUCCESS);
-}
-
-#if ! defined(TEST_NTPD_OPTS)
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * For the set-debug-level option, when DEBUG is #define-d.
- */
-#ifdef DEBUG
-static void
-doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- /* extracted from ntpdbase-opts.def, line 100 */
-DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
-}
-#endif /* defined DEBUG */
-#endif /* defined(TEST_NTPD_OPTS) */
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_NTPD_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = NTPD_EXIT_SUCCESS;
- (void)optionProcess(&ntpdOptions, argc, argv);
- optionPutShell(&ntpdOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_NTPD_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * ntpd program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(NTPD_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the ntpdOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &ntpdOptions;
+ tOptions * const opts = &ntpdOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- ntpdOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the ntpdOptions structure noted in the
+ comments below. The literal text is defined in ntpd_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ ntpd_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via ntpdOptions.pzCopyright */
+ puts(_("ntpd 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via ntpdOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Force IPv4 DNS name resolution"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Force IPv6 DNS name resolution"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Require crypto authentication"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Do not require crypto authentication"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Allow us to sync to broadcast servers"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("configuration file name"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Increase debug verbosity level"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Set the debug verbosity level"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("frequency drift file name"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Allow the first adjustment to be Big"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Jail directory"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Listen on an interface name or address"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("path to symmetric keys"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("path to the log file"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Do not listen to virtual interfaces"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Modify Multimedia Timer (Windows only)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Do not fork"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Run at high priority"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("path to the PID file"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Process priority"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Set the time and quit"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Broadcast/propagation delay"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Save parsed configuration and quit"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Statistics file location"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Trusted key number"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Run as userid (or userid:groupid)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("interval in seconds between scans for new or dropped interfaces"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("make ARG an ntp variable (RW)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("make ARG an ntp variable (RW|DEF)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Seconds to wait for first clock sync"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Slew up to 600 seconds"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Use CPU cycle counter (Windows only)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Force CPU cycle counter use (Windows only)"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Register with mDNS as a NTP server"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via ntpdOptions.pzUsageTitle */
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
+\t\t[ <server1> ... <serverN> ]\n"));
+
+ /* referenced via ntpdOptions.pzExplain */
+ puts(_("\n"));
+
+ /* referenced via ntpdOptions.pzFullVersion */
+ puts(_("ntpd 4.2.8"));
+
+ /* referenced via ntpdOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via ntpdOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/ntpd/ntpd-opts.def b/ntpd/ntpd-opts.def
index 7266e1b2aea4..dee484dbe1b4 100644
--- a/ntpd/ntpd-opts.def
+++ b/ntpd/ntpd-opts.def
@@ -4,10 +4,608 @@ autogen definitions options;
#include copyright.def
-prog-name = "ntpd";
-prog-title = "NTP daemon program";
+prog-name = "ntpd";
+prog-title = "NTP daemon program";
+argument = "[ <server1> ... <serverN> ]";
#include ntpdbase-opts.def
-detail = <<- _END_DETAIL
- _END_DETAIL;
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+The
+.Nm
+utility 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, as defined by RFC-5905,
+but also retains compatibility with
+version 3, as defined by RFC-1305, and versions 1
+and 2, as defined by RFC-1059 and RFC-1119, respectively.
+.Pp
+The
+.Nm
+utility 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.
+.Pp
+Ordinarily,
+.Nm
+reads the
+.Xr ntp.conf 5
+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.
+.Pp
+If NetInfo support is built into
+.Nm ,
+then
+.Nm
+will attempt to read its configuration from the
+NetInfo if the default
+.Xr ntp.conf 5
+file cannot be read and no file is
+specified by the
+.Fl c
+option.
+.Pp
+Various internal
+.Nm
+variables can be displayed and
+configuration options altered while the
+.Nm
+is running
+using the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+When
+.Nm
+starts it looks at the value of
+.Xr umask 2 ,
+and if zero
+.Nm
+will set the
+.Xr umask 2
+to 022.
+ _END_PROG_MDOC_DESCRIP;
+};
+
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+.Ss "How NTP Operates"
+The
+.Nm
+utility operates by exchanging messages with
+one or more configured servers over a range of 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.
+This initial delay to set the clock
+can be safely and dramatically reduced using the
+.Cm iburst
+keyword with the
+.Ic server
+configuration
+command, as described in
+.Xr ntp.conf 5 .
+.Pp
+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 the default case, if
+.Nm
+detects that the time on the host
+is more than 1000s from the server time,
+.Nm
+assumes something must be terribly wrong and the only
+reliable action is for the operator to intervene and set the clock
+by hand.
+(Reasons for this include there is no TOY chip,
+or its battery is dead, or that the TOY chip is just of poor quality.)
+This causes
+.Nm
+to exit with a panic message to
+the system log.
+The
+.Fl g
+option overrides this check and the
+clock will be set to the server time regardless of the chip time
+(up to 68 years in the past or future \(em
+this is a limitation of the NTPv4 protocol).
+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
+.Nm
+to exit anyway.
+.Pp
+Under ordinary conditions,
+.Nm
+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
+.Nm
+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.
+.Pp
+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
+.Nm
+is first started without a valid drift file
+on a system with a large intrinsic drift
+the error might grow to exceed 128 ms,
+which would 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.
+There are several solutions, however.
+If the
+.Fl x
+option is included on the command line, the clock will
+never be stepped and only slew corrections will be used.
+But this choice comes with a cost that
+should be carefully explored before deciding to use
+the
+.Fl x
+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.
+.Pp
+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,
+.Nm
+enters the same state as when the
+.Pa ntp.drift
+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
+(the host
+.Cm time.ien.it
+comes to mind), there may be occasional
+step/slew corrections and subsequent frequency corrections.
+It
+helps in these cases to use the
+.Cm burst
+keyword when
+configuring the server, but
+ONLY
+when you have permission to do so from the owner of the target host.
+.Pp
+Finally,
+in the past many startup scripts would run
+.Xr ntpdate 1ntpdatemdoc
+to get the system clock close to correct before starting
+.Xr ntpd 1ntpdmdoc ,
+but this was never more than a mediocre hack and is no longer needed.
+If you are following the instructions in
+.Sx "Starting NTP (Best Current Practice)"
+and you still need to set the system time before starting
+.Nm ,
+please open a bug report and document what is going on,
+and then look at using
+.Xr sntp 1sntpmdoc .
+.Pp
+There is a way to start
+.Xr ntpd 1ntpdmdoc
+that often addresses all of the problems mentioned above.
+.Ss "Starting NTP (Best Current Practice)"
+First, use the
+.Cm iburst
+option on your
+.Cm server
+entries.
+.Pp
+If you can also keep a good
+.Pa ntp.drift
+file then
+.Xr ntpd 1ntpdmdoc
+will effectively "warm-start" and your system's clock will
+be stable in under 11 seconds' time.
+.Pp
+As soon as possible in the startup sequence, start
+.Xr ntpd 1ntpdmdoc
+with at least the
+.Fl g
+and perhaps the
+.Fl N
+options.
+Then,
+start the rest of your "normal" processes.
+This will give
+.Xr ntpd 1ntpdmdoc
+as much time as possible to get the system's clock synchronized and stable.
+.Pp
+Finally,
+if you have processes like
+.Cm dovecot
+or database servers
+that require
+monotonically-increasing time,
+run
+.Xr ntp-wait 1ntp-waitmdoc
+as late as possible in the boot sequence
+(perhaps with the
+.Fl v
+flag)
+and after
+.Xr ntp-wait 1ntp-waitmdoc
+exits successfully
+it is as safe as it will ever be to start any process that require
+stable time.
+.Ss "Frequency Discipline"
+The
+.Nm
+behavior at startup depends on whether the
+frequency file, usually
+.Pa ntp.drift ,
+exists.
+This file
+contains the latest estimate of clock frequency error.
+When the
+.Nm
+is started and the file does not exist, the
+.Nm
+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
+.Nm
+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
+.Nm
+is started and the file does exist, the
+.Nm
+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.
+.Ss "Operating Modes"
+The
+.Nm
+utility can operate in any of several modes, including
+symmetric active/passive, client/server broadcast/multicast and
+manycast, as described in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+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.
+.Pp
+By default,
+.Nm
+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.
+.Pp
+In some cases it may not be practical for
+.Nm
+to run continuously.
+A common workaround has been to run the
+.Xr ntpdate 1ntpdatemdoc
+or
+.Xr sntp 1sntpmdoc
+programs from a
+.Xr cron 8
+job at designated
+times.
+However, these programs do not have the crafted signal
+processing, error checking or mitigation algorithms of
+.Nm .
+The
+.Fl q
+option is intended for this purpose.
+Setting this option will cause
+.Nm
+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
+.Cm iburst
+keyword with the
+.Ic server
+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
+.Xr ntpdate 1ntpdatemdoc
+program will be
+retired.
+.Pp
+When kernel support is available to discipline the clock
+frequency, which is the case for stock Solaris, Tru64, Linux and
+.Fx ,
+a useful feature is available to discipline the clock
+frequency.
+First,
+.Nm
+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
+.Nm
+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.
+.Ss "Poll Interval Control"
+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
+.Ic tinker
+.Cm minpoll
+command to a value not less than 16 s.
+This value is used for all
+configured associations, unless overridden by the
+.Cm minpoll
+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 overridden.
+.Pp
+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
+.Pa ntp.drift
+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.
+.Ss "The huff-n'-puff Filter"
+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.
+.Pp
+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.
+.Pp
+The filter is activated by the
+.Ic tinker
+command and
+.Cm huffpuff
+keyword, as described in
+.Xr ntp.conf 5 .
+ _END_MDOC_USAGE;
+};
+
+doc-section = {
+ ds-type = 'FILES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa /etc/ntp.drift
+the default name of the drift file
+.It Pa /etc/ntp.keys
+the default name of the key file
+.El
+ _END_MDOC_FILES;
+};
+
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_SEE_ALSO
+.Xr ntp.conf 5 ,
+.Xr ntpdate 1ntpdatemdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr ntpq 1ntpqmdoc ,
+.Xr sntp 1sntpmdoc
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 1)
+.%O RFC1059
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 2)
+.%O RFC1119
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+.Rs
+.%A David L. Mills
+.%A J. Martin, Ed.
+.%A J. Burbank
+.%A W. Kasch
+.%T Network Time Protocol Version 4: Protocol and Algorithms Specification
+.%O RFC5905
+.Re
+.Rs
+.%A David L. Mills
+.%A B. Haberman, Ed.
+.%T Network Time Protocol Version 4: Autokey Specification
+.%O RFC5906
+.Re
+.Rs
+.%A H. Gerstung
+.%A C. Elliott
+.%A B. Haberman, Ed.
+.%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
+.%O RFC5907
+.Re
+.Rs
+.%A R. Gayraud
+.%A B. Lourdelet
+.%T Network Time Protocol (NTP) Server Option for DHCPv6
+.%O RFC5908
+.Re
+ _END_MDOC_SEE_ALSO;
+};
+
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+The
+.Nm
+utility has gotten rather fat.
+While not huge, it has gotten
+larger than might be desirable for an elevated-priority
+.Nm
+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.
+ _END_MDOC_BUGS;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+Portions of this document came from FreeBSD.
+ _END_MDOC_NOTES;
+};
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index 4036432e14a3..2cfea535ac3e 100644
--- a/ntpd/ntpd-opts.h
+++ b/ntpd/ntpd-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:00 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:46:32 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpd program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the ntpd program.
* These macros are documented in the AutoGen info file in the
@@ -31,22 +46,22 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for ntpd
*/
typedef enum {
INDEX_OPT_IPV4 = 0,
@@ -78,48 +93,69 @@ typedef enum {
INDEX_OPT_UPDATEINTERVAL = 26,
INDEX_OPT_VAR = 27,
INDEX_OPT_DVAR = 28,
- INDEX_OPT_SLEW = 29,
- INDEX_OPT_USEPCC = 30,
- INDEX_OPT_PCCFREQ = 31,
- INDEX_OPT_VERSION = 32,
- INDEX_OPT_HELP = 33,
- INDEX_OPT_MORE_HELP = 34
+ INDEX_OPT_WAIT_SYNC = 29,
+ INDEX_OPT_SLEW = 30,
+ INDEX_OPT_USEPCC = 31,
+ INDEX_OPT_PCCFREQ = 32,
+ INDEX_OPT_MDNS = 33,
+ INDEX_OPT_VERSION = 34,
+ INDEX_OPT_HELP = 35,
+ INDEX_OPT_MORE_HELP = 36
} teOptIndex;
+/** count of all options for ntpd */
+#define OPTION_CT 37
+/** ntpd version */
+#define NTPD_VERSION "4.2.8"
+/** Full ntpd version text */
+#define NTPD_FULL_VERSION "ntpd 4.2.8"
-#define OPTION_CT 35
-#define NTPD_VERSION "4.2.6p5"
-#define NTPD_FULL_VERSION "ntpd 4.2.6p5"
-
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
* e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpdOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of ntpd exit codes
*/
typedef enum {
- NTPD_EXIT_SUCCESS = 0,
- NTPD_EXIT_FAILURE = 1
-} ntpd_exit_code_t;
-/*
+ NTPD_EXIT_SUCCESS = 0,
+ NTPD_EXIT_FAILURE = 1,
+ NTPD_EXIT_USAGE_ERROR = 64,
+ NTPD_EXIT_LIBOPTS_FAILURE = 70
+} ntpd_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
@@ -239,6 +275,10 @@ typedef enum {
# warning undefining DVAR due to option name conflict
# undef DVAR
# endif
+# ifdef WAIT_SYNC
+# warning undefining WAIT_SYNC due to option name conflict
+# undef WAIT_SYNC
+# endif
# ifdef SLEW
# warning undefining SLEW due to option name conflict
# undef SLEW
@@ -251,6 +291,10 @@ typedef enum {
# warning undefining PCCFREQ due to option name conflict
# undef PCCFREQ
# endif
+# ifdef MDNS
+# warning undefining MDNS due to option name conflict
+# undef MDNS
+# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
@@ -281,14 +325,16 @@ typedef enum {
# undef UPDATEINTERVAL
# undef VAR
# undef DVAR
+# undef WAIT_SYNC
# undef SLEW
# undef USEPCC
# undef PCCFREQ
+# undef MDNS
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_OPT_IPV4 '4'
#define VALUE_OPT_IPV6 '6'
@@ -298,6 +344,8 @@ typedef enum {
#define VALUE_OPT_CONFIGFILE 'c'
#define VALUE_OPT_DEBUG_LEVEL 'd'
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
+
+#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_DRIFTFILE 'f'
#define VALUE_OPT_PANICGATE 'g'
#define VALUE_OPT_JAILDIR 'i'
@@ -314,21 +362,29 @@ typedef enum {
#define OPT_VALUE_PRIORITY (DESC(PRIORITY).optArg.argInt)
#define VALUE_OPT_QUIT 'q'
#define VALUE_OPT_PROPAGATIONDELAY 'r'
-#define VALUE_OPT_SAVECONFIGQUIT 22
+#define VALUE_OPT_SAVECONFIGQUIT 0x1001
#define VALUE_OPT_STATSDIR 's'
#define VALUE_OPT_TRUSTEDKEY 't'
#define VALUE_OPT_USER 'u'
#define VALUE_OPT_UPDATEINTERVAL 'U'
#define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
-#define VALUE_OPT_VAR 27
-#define VALUE_OPT_DVAR 28
+#define VALUE_OPT_VAR 0x1002
+#define VALUE_OPT_DVAR 0x1003
+#define VALUE_OPT_WAIT_SYNC 'w'
+#ifdef HAVE_WORKING_FORK
+#define OPT_VALUE_WAIT_SYNC (DESC(WAIT_SYNC).optArg.argInt)
+#endif /* HAVE_WORKING_FORK */
#define VALUE_OPT_SLEW 'x'
-#define VALUE_OPT_USEPCC 30
-#define VALUE_OPT_PCCFREQ 31
+#define VALUE_OPT_USEPCC 0x1004
+#define VALUE_OPT_PCCFREQ 0x1005
+#define VALUE_OPT_MDNS 'm'
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1006
/*
* Interface defines not associated with particular options
*/
@@ -336,15 +392,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(ntpdOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpdOptions.curOptIdx = (n); \
- ntpdOptions.pzCurOpt = NULL)
+ ntpdOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpdOptions.pUsageProc)(&ntpdOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the ntpd option descriptor.
@@ -354,6 +410,17 @@ extern tOptions ntpdOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -387,4 +454,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_NTPD_OPTS_H_GUARD */
+
/* ntpd-opts.h ends here */
diff --git a/ntpd/ntpd.1 b/ntpd/ntpd.1
deleted file mode 100644
index baa7b8b9e291..000000000000
--- a/ntpd/ntpd.1
+++ /dev/null
@@ -1,339 +0,0 @@
-.TH NTPD 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:34:12 PM by AutoGen 5.12
-.\" From the definitions ntpd-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-ntpd \- NTP daemon program
-.SH SYNOPSIS
-.B ntpd
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.PP
-All arguments must be options.
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBntpd\fP command.
-
-.SH OPTIONS
-.TP
-.BR \-4 ", " \--ipv4
-Force IPv4 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv6.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-.TP
-.BR \-6 ", " \--ipv6
-Force IPv6 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv4.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-.TP
-.BR \-a ", " \--authreq
-Require crypto authentication.
-This option must not appear in combination with any of the following options:
-authnoreq.
-.sp
-Require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is the default.
-.TP
-.BR \-A ", " \--authnoreq
-Do not require crypto authentication.
-This option must not appear in combination with any of the following options:
-authreq.
-.sp
-Do not require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is almost never a good idea.
-.TP
-.BR \-b ", " \--bcastsync
-Allow us to sync to broadcast servers.
-.sp
-
-.TP
-.BR \-c " \fIstring\fP, " \--configfile "=" \fIstring\fP
-configuration file name.
-.sp
-The name and path of the configuration file,
-/etc/ntp.conf
-by default.
-.TP
-.BR \-d ", " \--debug-level
-Increase output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Increase the debugging message output level.
-.TP
-.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
-Set the output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-.TP
-.BR \-f " \fIstring\fP, " \--driftfile "=" \fIstring\fP
-frequency drift file name.
-.sp
-The name and path of the frequency file,
-/etc/ntp.drift
-by default.
-This is the same operation as the
-driftfile driftfile
-configuration specification in the
-/etc/ntp.conf
-file.
-.TP
-.BR \-g ", " \--panicgate
-Allow the first adjustment to be Big.
-This option may appear an unlimited number of times.
-.sp
-Normally,
-ntpd
-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,
-ntpd
-will exit with a message to the system log. This option can be used with the
--q
-and
--x
-options.
-See the
-tinker
-configuration file directive for other options.
-.TP
-.BR \-i " \fIstring\fP, " \--jaildir "=" \fIstring\fP
-Jail directory.
-.sp
-Chroot the server to the directory
-jaildir
-.
-This option also implies that the server attempts to drop root privileges at startup.
-You may need to also specify a
--u
-option.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
-.TP
-.BR \-I " \fIiface\fP, " \--interface "=" \fIiface\fP
-Listen on an interface name or address.
-This option may appear an unlimited number of times.
-.sp
-Open the network address given, or all the addresses associated with the
-given interface name. This option may appear multiple times. This option
-also implies not opening other addresses, except wildcard and localhost.
-This option is deprecated. Please consider using the configuration file
-interface command, which is more versatile.
-.TP
-.BR \-k " \fIstring\fP, " \--keyfile "=" \fIstring\fP
-path to symmetric keys.
-.sp
-Specify the name and path of the symmetric key file.
-/etc/ntp.keys
-is the default.
-This is the same operation as the
-keys keyfile
-configuration file directive.
-.TP
-.BR \-l " \fIstring\fP, " \--logfile "=" \fIstring\fP
-path to the log file.
-.sp
-Specify the name and path of the log file.
-The default is the system log file.
-This is the same operation as the
-logfile logfile
-configuration file directive.
-.TP
-.BR \-L ", " \--novirtualips
-Do not listen to virtual interfaces.
-.sp
-Do not listen to virtual interfaces, defined as those with
-names containing a colon. This option is deprecated. Please
-consider using the configuration file interface command, which
-is more versatile.
-.TP
-.BR \-M ", " \--modifymmtimer
-Modify Multimedia Timer (Windows only).
-.sp
-Set the Windows Multimedia Timer to highest resolution. This
-ensures the resolution does not change while ntpd is running,
-avoiding timekeeping glitches associated with changes.
-.TP
-.BR \-n ", " \--nofork
-Do not fork.
-.sp
-
-.TP
-.BR \-N ", " \--nice
-Run at high priority.
-.sp
-To the extent permitted by the operating system, run
-ntpd
-at the highest priority.
-.TP
-.BR \-p " \fIstring\fP, " \--pidfile "=" \fIstring\fP
-path to the PID file.
-.sp
-Specify the name and path of the file used to record
-ntpd's
-process ID.
-This is the same operation as the
-pidfile pidfile
-configuration file directive.
-.TP
-.BR \-P " \fInumber\fP, " \--priority "=" \fInumber\fP
-Process priority.
-This option takes an integer number as its argument.
-.sp
-To the extent permitted by the operating system, run
-ntpd
-at the specified
-sched_setscheduler(SCHED_FIFO)
-priority.
-.TP
-.BR \-q ", " \--quit
-Set the time and quit.
-.sp
-ntpd
-will exit just after the first time the clock is set. This behavior mimics that of the
-ntpdate
-program, which is to be retired.
-The
--g
-and
--x
-options can be used with this option.
-Note: The kernel time discipline is disabled with this option.
-.TP
-.BR \-r " \fIstring\fP, " \--propagationdelay "=" \fIstring\fP
-Broadcast/propagation delay.
-.sp
-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.
-.TP
-.BR \--saveconfigquit "=\fIstring\fP"
-Save parsed configuration and quit.
-.sp
-Cause ntpd to parse its startup configuration file and save an
-equivalent to the given filename and exit. This option was
-designed for automated testing.
-.TP
-.BR \-s " \fIstring\fP, " \--statsdir "=" \fIstring\fP
-Statistics file location.
-.sp
-Specify the directory path for files created by the statistics facility.
-This is the same operation as the
-statsdir statsdir
-configuration file directive.
-.TP
-.BR \-t " \fItkey\fP, " \--trustedkey "=" \fItkey\fP
-Trusted key number.
-This option may appear an unlimited number of times.
-.sp
-Add a key number to the trusted key list.
-.TP
-.BR \-u " \fIstring\fP, " \--user "=" \fIstring\fP
-Run as userid (or userid:groupid).
-.sp
-Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
---enable-clockctl
-) and Linux (configure with
---enable-linuxcaps
-).
-.TP
-.BR \-U " \fInumber\fP, " \--updateinterval "=" \fInumber\fP
-interval in seconds between scans for new or dropped interfaces.
-This option takes an integer number as its argument.
-.sp
-Give the time in seconds between two scans for new or dropped interfaces.
-For systems with routing socket support the scans will be performed shortly after the interface change
-has been detected by the system.
-Use 0 to disable scanning. 60 seconds is the minimum time between scans.
-.TP
-.BR \--var "=\fInvar\fP"
-make ARG an ntp variable (RW).
-This option may appear an unlimited number of times.
-.sp
-
-.TP
-.BR \--dvar "=\fIndvar\fP"
-make ARG an ntp variable (RW|DEF).
-This option may appear an unlimited number of times.
-.sp
-
-.TP
-.BR \-x ", " \--slew
-Slew up to 600 seconds.
-.sp
-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
--g
-and
--q
-options.
-See the
-tinker
-configuration file directive for other options.
-Note: The kernel time discipline is disabled with this option.
-.TP
-.BR \--usepcc
-Use CPU cycle counter (Windows only).
-.sp
-Attempt to substitute the CPU counter for QueryPerformanceCounter.
-The CPU counter and QueryPerformanceCounter are compared, and if
-they have the same frequency, the CPU counter (RDTSC on x86) is
-used directly, saving the overhead of a system call.
-.TP
-.BR \--pccfreq "=\fIstring\fP"
-Force CPU cycle counter use (Windows only).
-.sp
-Force substitution the CPU counter for QueryPerformanceCounter.
-The CPU counter (RDTSC on x86) is used unconditionally with the
-given frequency (in Hz).
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from environment variables named:
-.nf
- \fBNTPD_<option-name>\fP or \fBNTPD\fP
-.fi
-.ad
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBntpd\fP
-option definitions.
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
new file mode 100644
index 000000000000..52bc51531421
--- /dev/null
+++ b/ntpd/ntpd.1ntpdman
@@ -0,0 +1,987 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpd 1ntpdman "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-WBaqpd/ag-9Baiod)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:58 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpd-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpd\fP
+\- NTP daemon program
+.SH SYNOPSIS
+\f\*[B-Font]ntpd\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ <server1> ... <serverN> ]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntpd\fP
+utility 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, as defined by RFC-5905,
+but also retains compatibility with
+version 3, as defined by RFC-1305, and versions 1
+and 2, as defined by RFC-1059 and RFC-1119, respectively.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntpd\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily,
+\f\*[B-Font]ntpd\fP
+reads the
+\fCntp.conf\fR(5)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+If NetInfo support is built into
+\f\*[B-Font]ntpd\fP,
+then
+\f\*[B-Font]ntpd\fP
+will attempt to read its configuration from the
+NetInfo if the default
+\fCntp.conf\fR(5)\f[]
+file cannot be read and no file is
+specified by the
+\f\*[B-Font]\-c\f[]
+option.
+.sp \n(Ppu
+.ne 2
+
+Various internal
+\f\*[B-Font]ntpd\fP
+variables can be displayed and
+configuration options altered while the
+\f\*[B-Font]ntpd\fP
+is running
+using the
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+When
+\f\*[B-Font]ntpd\fP
+starts it looks at the value of
+\fCumask\fR(2)\f[],
+and if zero
+\f\*[B-Font]ntpd\fP
+will set the
+\fCumask\fR(2)\f[]
+to 022.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-a\f[], \f\*[B-Font]\-\-authreq\f[]
+Require crypto authentication.
+This option must not appear in combination with any of the following options:
+authnoreq.
+.sp
+Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+.TP
+.NOP \f\*[B-Font]\-A\f[], \f\*[B-Font]\-\-authnoreq\f[]
+Do not require crypto authentication.
+This option must not appear in combination with any of the following options:
+authreq.
+.sp
+Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+.TP
+.NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-bcastsync\f[]
+Allow us to sync to broadcast servers.
+.sp
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-configfile\f[]=\f\*[I-Font]string\f[]
+configuration file name.
+.sp
+The name and path of the configuration file,
+\fI/etc/ntp.conf\fP
+by default.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-driftfile\f[]=\f\*[I-Font]string\f[]
+frequency drift file name.
+.sp
+The name and path of the frequency file,
+\fI/etc/ntp.drift\fP
+by default.
+This is the same operation as the
+\fBdriftfile\fP \fIdriftfile\fP
+configuration specification in the
+\fI/etc/ntp.conf\fP
+file.
+.TP
+.NOP \f\*[B-Font]\-g\f[], \f\*[B-Font]\-\-panicgate\f[]
+Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
+.sp
+Normally,
+\fBntpd\fP
+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,
+\fBntpd\fP
+will exit with a message to the system log. This option can be used with the
+\fB-q\fP
+and
+\fB-x\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+.TP
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
+Jail directory.
+.sp
+Chroot the server to the directory
+\fIjaildir\fP
+.
+This option also implies that the server attempts to drop root privileges at startup.
+You may need to also specify a
+\fB-u\fP
+option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB--enable-clockctl\fP) or Linux (configure with
+\fB--enable-linuxcaps\fP) or Solaris (configure with \fB--enable-solarisprivs\fP).
+.TP
+.NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]iface\f[], \f\*[B-Font]\-\-interface\f[]=\f\*[I-Font]iface\f[]
+Listen on an interface name or address.
+This option may appear an unlimited number of times.
+.sp
+Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+\fBinterface\fP command, which is more versatile.
+.TP
+.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
+path to symmetric keys.
+.sp
+Specify the name and path of the symmetric key file.
+\fI/etc/ntp.keys\fP
+is the default.
+This is the same operation as the
+\fBkeys\fP \fIkeyfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-logfile\f[]=\f\*[I-Font]string\f[]
+path to the log file.
+.sp
+Specify the name and path of the log file.
+The default is the system log file.
+This is the same operation as the
+\fBlogfile\fP \fIlogfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-L\f[], \f\*[B-Font]\-\-novirtualips\f[]
+Do not listen to virtual interfaces.
+.sp
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file \fBinterface\fP command, which
+is more versatile.
+.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-modifymmtimer\f[]
+Modify Multimedia Timer (Windows only).
+.sp
+Set the Windows Multimedia Timer to highest resolution. This
+ensures the resolution does not change while ntpd is running,
+avoiding timekeeping glitches associated with changes.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-nofork\f[]
+Do not fork.
+This option must not appear in combination with any of the following options:
+wait-sync.
+.sp
+.TP
+.NOP \f\*[B-Font]\-N\f[], \f\*[B-Font]\-\-nice\f[]
+Run at high priority.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the highest priority.
+.TP
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pidfile\f[]=\f\*[I-Font]string\f[]
+path to the PID file.
+.sp
+Specify the name and path of the file used to record
+\fBntpd\fP's
+process ID.
+This is the same operation as the
+\fBpidfile\fP \fIpidfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-P\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-priority\f[]=\f\*[I-Font]number\f[]
+Process priority.
+This option takes an integer number as its argument.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the specified
+\fBsched_setscheduler(SCHED_FIFO)\fP
+priority.
+.TP
+.NOP \f\*[B-Font]\-q\f[], \f\*[B-Font]\-\-quit\f[]
+Set the time and quit.
+This option must not appear in combination with any of the following options:
+saveconfigquit, wait-sync.
+.sp
+\fBntpd\fP
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+\fBntpdate\fP
+program, which will soon be replaced with a shell script.
+The
+\fB-g\fP
+and
+\fB-x\fP
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-propagationdelay\f[]=\f\*[I-Font]string\f[]
+Broadcast/propagation delay.
+.sp
+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.
+.TP
+.NOP \f\*[B-Font]\-\-saveconfigquit\f[]=\f\*[I-Font]string\f[]
+Save parsed configuration and quit.
+This option must not appear in combination with any of the following options:
+quit, wait-sync.
+.sp
+Cause \fBntpd\fP to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-statsdir\f[]=\f\*[I-Font]string\f[]
+Statistics file location.
+.sp
+Specify the directory path for files created by the statistics facility.
+This is the same operation as the
+\fBstatsdir\fP \fIstatsdir\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]tkey\f[], \f\*[B-Font]\-\-trustedkey\f[]=\f\*[I-Font]tkey\f[]
+Trusted key number.
+This option may appear an unlimited number of times.
+.sp
+Add the specified key number to the trusted key list.
+.TP
+.NOP \f\*[B-Font]\-u\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-user\f[]=\f\*[I-Font]string\f[]
+Run as userid (or userid:groupid).
+.sp
+Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB--enable-clockctl\fP) or Linux (configure with
+\fB--enable-linuxcaps\fP) or Solaris (configure with \fB--enable-solarisprivs\fP).
+.TP
+.NOP \f\*[B-Font]\-U\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-updateinterval\f[]=\f\*[I-Font]number\f[]
+interval in seconds between scans for new or dropped interfaces.
+This option takes an integer number as its argument.
+.sp
+Give the time in seconds between two scans for new or dropped interfaces.
+For systems with routing socket support the scans will be performed shortly after the interface change
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+.TP
+.NOP \f\*[B-Font]\-\-var\f[]=\f\*[I-Font]nvar\f[]
+make ARG an ntp variable (RW).
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-dvar\f[]=\f\*[I-Font]ndvar\f[]
+make ARG an ntp variable (RW|DEF).
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-w\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-wait\-sync\f[]=\f\*[I-Font]number\f[]
+Seconds to wait for first clock sync.
+This option must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+This option takes an integer number as its argument.
+.sp
+If greater than zero, alters \fBntpd\fP's behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is \fBETIMEDOUT\fP.
+This provides the option for a script starting \fBntpd\fP to easily
+wait for the first set of the clock before proceeding.
+.TP
+.NOP \f\*[B-Font]\-x\f[], \f\*[B-Font]\-\-slew\f[]
+Slew up to 600 seconds.
+.sp
+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
+\fB-g\fP
+and
+\fB-q\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+.TP
+.NOP \f\*[B-Font]\-\-usepcc\f[]
+Use CPU cycle counter (Windows only).
+.sp
+Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
+they have the same frequency, the CPU counter (RDTSC on x86) is
+used directly, saving the overhead of a system call.
+.TP
+.NOP \f\*[B-Font]\-\-pccfreq\f[]=\f\*[I-Font]string\f[]
+Force CPU cycle counter use (Windows only).
+.sp
+Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+.TP
+.NOP \f\*[B-Font]\-m\f[], \f\*[B-Font]\-\-mdns\f[]
+Register with mDNS as a NTP server.
+.sp
+Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTPD_<option-name>\fP or \fBNTPD\fP
+.fi
+.ad
+.SH USAGE
+.SS "How NTP Operates"
+The
+\f\*[B-Font]ntpd\fP
+utility operates by exchanging messages with
+one or more configured servers over a range of 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.
+This initial delay to set the clock
+can be safely and dramatically reduced using the
+\f\*[B-Font]iburst\f[]
+keyword with the
+\f\*[B-Font]server\f[]
+configuration
+command, as described in
+\fCntp.conf\fR(5)\f[].
+.sp \n(Ppu
+.ne 2
+
+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 the default case, if
+\f\*[B-Font]ntpd\fP
+detects that the time on the host
+is more than 1000s from the server time,
+\f\*[B-Font]ntpd\fP
+assumes something must be terribly wrong and the only
+reliable action is for the operator to intervene and set the clock
+by hand.
+(Reasons for this include there is no TOY chip,
+or its battery is dead, or that the TOY chip is just of poor quality.)
+This causes
+\f\*[B-Font]ntpd\fP
+to exit with a panic message to
+the system log.
+The
+\f\*[B-Font]\-g\f[]
+option overrides this check and the
+clock will be set to the server time regardless of the chip time
+(up to 68 years in the past or future \(em
+this is a limitation of the NTPv4 protocol).
+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
+\f\*[B-Font]ntpd\fP
+to exit anyway.
+.sp \n(Ppu
+.ne 2
+
+Under ordinary conditions,
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]ntpd\fP
+is first started without a valid drift file
+on a system with a large intrinsic drift
+the error might grow to exceed 128 ms,
+which would 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.
+There are several solutions, however.
+If the
+\f\*[B-Font]\-x\f[]
+option is included on the command line, the clock will
+never be stepped and only slew corrections will be used.
+But this choice comes with a cost that
+should be carefully explored before deciding to use
+the
+\f\*[B-Font]\-x\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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,
+\f\*[B-Font]ntpd\fP
+enters the same state as when the
+\fIntp.drift\f[]
+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
+(the host
+\f\*[B-Font]time.ien.it\f[]
+comes to mind), there may be occasional
+step/slew corrections and subsequent frequency corrections.
+It
+helps in these cases to use the
+\f\*[B-Font]burst\f[]
+keyword when
+configuring the server, but
+ONLY
+when you have permission to do so from the owner of the target host.
+.sp \n(Ppu
+.ne 2
+
+Finally,
+in the past many startup scripts would run
+\fCntpdate\fR(1ntpdatemdoc)\f[]
+to get the system clock close to correct before starting
+\fCntpd\fR(1ntpdmdoc)\f[],
+but this was never more than a mediocre hack and is no longer needed.
+If you are following the instructions in
+\fIStarting NTP (Best Current Practice)\f[]
+and you still need to set the system time before starting
+\f\*[B-Font]ntpd\fP,
+please open a bug report and document what is going on,
+and then look at using
+\fCsntp\fR(1sntpmdoc)\f[].
+.sp \n(Ppu
+.ne 2
+
+There is a way to start
+\fCntpd\fR(1ntpdmdoc)\f[]
+that often addresses all of the problems mentioned above.
+.SS "Starting NTP (Best Current Practice)"
+First, use the
+\f\*[B-Font]iburst\f[]
+option on your
+\f\*[B-Font]server\f[]
+entries.
+.sp \n(Ppu
+.ne 2
+
+If you can also keep a good
+\fIntp.drift\f[]
+file then
+\fCntpd\fR(1ntpdmdoc)\f[]
+will effectively "warm-start" and your system's clock will
+be stable in under 11 seconds' time.
+.sp \n(Ppu
+.ne 2
+
+As soon as possible in the startup sequence, start
+\fCntpd\fR(1ntpdmdoc)\f[]
+with at least the
+\f\*[B-Font]\-g\f[]
+and perhaps the
+\f\*[B-Font]\-N\f[]
+options.
+Then,
+start the rest of your "normal" processes.
+This will give
+\fCntpd\fR(1ntpdmdoc)\f[]
+as much time as possible to get the system's clock synchronized and stable.
+.sp \n(Ppu
+.ne 2
+
+Finally,
+if you have processes like
+\f\*[B-Font]dovecot\f[]
+or database servers
+that require
+monotonically-increasing time,
+run
+\fCntp-wait\fR(1ntp-waitmdoc)\f[]
+as late as possible in the boot sequence
+(perhaps with the
+\f\*[B-Font]\-v\f[]
+flag)
+and after
+\fCntp-wait\fR(1ntp-waitmdoc)\f[]
+exits successfully
+it is as safe as it will ever be to start any process that require
+stable time.
+.SS "Frequency Discipline"
+The
+\f\*[B-Font]ntpd\fP
+behavior at startup depends on whether the
+frequency file, usually
+\fIntp.drift\f[],
+exists.
+This file
+contains the latest estimate of clock frequency error.
+When the
+\f\*[B-Font]ntpd\fP
+is started and the file does not exist, the
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+is started and the file does exist, the
+\f\*[B-Font]ntpd\fP
+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.
+.SS "Operating Modes"
+The
+\f\*[B-Font]ntpd\fP
+utility can operate in any of several modes, including
+symmetric active/passive, client/server broadcast/multicast and
+manycast, as described in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+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.
+.sp \n(Ppu
+.ne 2
+
+By default,
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+In some cases it may not be practical for
+\f\*[B-Font]ntpd\fP
+to run continuously.
+A common workaround has been to run the
+\fCntpdate\fR(1ntpdatemdoc)\f[]
+or
+\fCsntp\fR(1sntpmdoc)\f[]
+programs from a
+\fCcron\fR(8)\f[]
+job at designated
+times.
+However, these programs do not have the crafted signal
+processing, error checking or mitigation algorithms of
+\f\*[B-Font]ntpd\fP.
+The
+\f\*[B-Font]\-q\f[]
+option is intended for this purpose.
+Setting this option will cause
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]iburst\f[]
+keyword with the
+\f\*[B-Font]server\f[]
+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
+\fCntpdate\fR(1ntpdatemdoc)\f[]
+program will be
+retired.
+.sp \n(Ppu
+.ne 2
+
+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,
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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.
+.SS "Poll Interval Control"
+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
+\f\*[B-Font]tinker\f[]
+\f\*[B-Font]minpoll\f[]
+command to a value not less than 16 s.
+This value is used for all
+configured associations, unless overridden by the
+\f\*[B-Font]minpoll\f[]
+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 overridden.
+.sp \n(Ppu
+.ne 2
+
+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
+\fIntp.drift\f[]
+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.
+.SS "The huff-n'-puff Filter"
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The filter is activated by the
+\f\*[B-Font]tinker\f[]
+command and
+\f\*[B-Font]huffpuff\f[]
+keyword, as described in
+\fCntp.conf\fR(5)\f[].
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH FILES
+.TP 15
+.NOP \fI/etc/ntp.conf\f[]
+the default name of the configuration file
+.br
+.ns
+.TP 15
+.NOP \fI/etc/ntp.drift\f[]
+the default name of the drift file
+.br
+.ns
+.TP 15
+.NOP \fI/etc/ntp.keys\f[]
+the default name of the key file
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpdate\fR(1ntpdatemdoc)\f[],
+\fCntpdc\fR(1ntpdcmdoc)\f[],
+\fCntpq\fR(1ntpqmdoc)\f[],
+\fCsntp\fR(1sntpmdoc)\f[]
+.sp \n(Ppu
+.ne 2
+
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+\f[C]http://www.ntp.org/\f[].
+A snapshot of this documentation is available in HTML format in
+\fI/usr/share/doc/ntp\f[].
+David L. Mills,
+\fINetwork Time Protocol (Version 1)\fR,
+RFC1059
+.PP
+
+David L. Mills,
+\fINetwork Time Protocol (Version 2)\fR,
+RFC1119
+.PP
+
+David L. Mills,
+\fINetwork Time Protocol (Version 3)\fR,
+RFC1305
+.PP
+
+David L. Mills and J. Martin, Ed. and J. Burbank and W. Kasch,
+\fINetwork Time Protocol Version 4: Protocol and Algorithms Specification\fR,
+RFC5905
+.PP
+
+David L. Mills and B. Haberman, Ed.,
+\fINetwork Time Protocol Version 4: Autokey Specification\fR,
+RFC5906
+.PP
+
+H. Gerstung and C. Elliott and B. Haberman, Ed.,
+\fIDefinitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)\fR,
+RFC5907
+.PP
+
+R. Gayraud and B. Lourdelet,
+\fINetwork Time Protocol (NTP) Server Option for DHCPv6\fR,
+RFC5908
+.PP
+
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The
+\f\*[B-Font]ntpd\fP
+utility has gotten rather fat.
+While not huge, it has gotten
+larger than might be desirable for an elevated-priority
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+Portions of this document came from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntpd\fP
+option definitions.
diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc
new file mode 100644
index 000000000000..f390d2c48b50
--- /dev/null
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -0,0 +1,891 @@
+.Dd December 19 2014
+.Dt NTPD 1ntpdmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:14 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpd-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpd
+.Nd NTP daemon program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ <server1> ... <serverN> ]
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+utility 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, as defined by RFC\-5905,
+but also retains compatibility with
+version 3, as defined by RFC\-1305, and versions 1
+and 2, as defined by RFC\-1059 and RFC\-1119, respectively.
+.Pp
+The
+.Nm
+utility 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.
+.Pp
+Ordinarily,
+.Nm
+reads the
+.Xr ntp.conf 5
+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.
+.Pp
+If NetInfo support is built into
+.Nm ,
+then
+.Nm
+will attempt to read its configuration from the
+NetInfo if the default
+.Xr ntp.conf 5
+file cannot be read and no file is
+specified by the
+.Fl c
+option.
+.Pp
+Various internal
+.Nm
+variables can be displayed and
+configuration options altered while the
+.Nm
+is running
+using the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+When
+.Nm
+starts it looks at the value of
+.Xr umask 2 ,
+and if zero
+.Nm
+will set the
+.Xr umask 2
+to 022.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl a , Fl \-authreq
+Require crypto authentication.
+This option must not appear in combination with any of the following options:
+authnoreq.
+.sp
+Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+.It Fl A , Fl \-authnoreq
+Do not require crypto authentication.
+This option must not appear in combination with any of the following options:
+authreq.
+.sp
+Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+.It Fl b , Fl \-bcastsync
+Allow us to sync to broadcast servers.
+.sp
+.It Fl c Ar string , Fl \-configfile Ns = Ns Ar string
+configuration file name.
+.sp
+The name and path of the configuration file,
+\fI/etc/ntp.conf\fP
+by default.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl f Ar string , Fl \-driftfile Ns = Ns Ar string
+frequency drift file name.
+.sp
+The name and path of the frequency file,
+\fI/etc/ntp.drift\fP
+by default.
+This is the same operation as the
+\fBdriftfile\fP \fIdriftfile\fP
+configuration specification in the
+\fI/etc/ntp.conf\fP
+file.
+.It Fl g , Fl \-panicgate
+Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
+.sp
+Normally,
+\fBntpd\fP
+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,
+\fBntpd\fP
+will exit with a message to the system log. This option can be used with the
+\fB\-q\fP
+and
+\fB\-x\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
+Jail directory.
+.sp
+Chroot the server to the directory
+\fIjaildir\fP
+.
+This option also implies that the server attempts to drop root privileges at startup.
+You may need to also specify a
+\fB\-u\fP
+option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB\-\-enable\-clockctl\fP) or Linux (configure with
+\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
+.It Fl I Ar iface , Fl \-interface Ns = Ns Ar iface
+Listen on an interface name or address.
+This option may appear an unlimited number of times.
+.sp
+Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+\fBinterface\fP command, which is more versatile.
+.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
+path to symmetric keys.
+.sp
+Specify the name and path of the symmetric key file.
+\fI/etc/ntp.keys\fP
+is the default.
+This is the same operation as the
+\fBkeys\fP \fIkeyfile\fP
+configuration file directive.
+.It Fl l Ar string , Fl \-logfile Ns = Ns Ar string
+path to the log file.
+.sp
+Specify the name and path of the log file.
+The default is the system log file.
+This is the same operation as the
+\fBlogfile\fP \fIlogfile\fP
+configuration file directive.
+.It Fl L , Fl \-novirtualips
+Do not listen to virtual interfaces.
+.sp
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file \fBinterface\fP command, which
+is more versatile.
+.It Fl M , Fl \-modifymmtimer
+Modify Multimedia Timer (Windows only).
+.sp
+Set the Windows Multimedia Timer to highest resolution. This
+ensures the resolution does not change while ntpd is running,
+avoiding timekeeping glitches associated with changes.
+.It Fl n , Fl \-nofork
+Do not fork.
+This option must not appear in combination with any of the following options:
+wait\-sync.
+.sp
+.It Fl N , Fl \-nice
+Run at high priority.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the highest priority.
+.It Fl p Ar string , Fl \-pidfile Ns = Ns Ar string
+path to the PID file.
+.sp
+Specify the name and path of the file used to record
+\fBntpd\fP's
+process ID.
+This is the same operation as the
+\fBpidfile\fP \fIpidfile\fP
+configuration file directive.
+.It Fl P Ar number , Fl \-priority Ns = Ns Ar number
+Process priority.
+This option takes an integer number as its argument.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the specified
+\fBsched_setscheduler(SCHED_FIFO)\fP
+priority.
+.It Fl q , Fl \-quit
+Set the time and quit.
+This option must not appear in combination with any of the following options:
+saveconfigquit, wait\-sync.
+.sp
+\fBntpd\fP
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+\fBntpdate\fP
+program, which will soon be replaced with a shell script.
+The
+\fB\-g\fP
+and
+\fB\-x\fP
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+.It Fl r Ar string , Fl \-propagationdelay Ns = Ns Ar string
+Broadcast/propagation delay.
+.sp
+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.
+.It Fl \-saveconfigquit Ns = Ns Ar string
+Save parsed configuration and quit.
+This option must not appear in combination with any of the following options:
+quit, wait\-sync.
+.sp
+Cause \fBntpd\fP to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+.It Fl s Ar string , Fl \-statsdir Ns = Ns Ar string
+Statistics file location.
+.sp
+Specify the directory path for files created by the statistics facility.
+This is the same operation as the
+\fBstatsdir\fP \fIstatsdir\fP
+configuration file directive.
+.It Fl t Ar tkey , Fl \-trustedkey Ns = Ns Ar tkey
+Trusted key number.
+This option may appear an unlimited number of times.
+.sp
+Add the specified key number to the trusted key list.
+.It Fl u Ar string , Fl \-user Ns = Ns Ar string
+Run as userid (or userid:groupid).
+.sp
+Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB\-\-enable\-clockctl\fP) or Linux (configure with
+\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
+.It Fl U Ar number , Fl \-updateinterval Ns = Ns Ar number
+interval in seconds between scans for new or dropped interfaces.
+This option takes an integer number as its argument.
+.sp
+Give the time in seconds between two scans for new or dropped interfaces.
+For systems with routing socket support the scans will be performed shortly after the interface change
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+.It Fl \-var Ns = Ns Ar nvar
+make ARG an ntp variable (RW).
+This option may appear an unlimited number of times.
+.sp
+.It Fl \-dvar Ns = Ns Ar ndvar
+make ARG an ntp variable (RW|DEF).
+This option may appear an unlimited number of times.
+.sp
+.It Fl w Ar number , Fl \-wait\-sync Ns = Ns Ar number
+Seconds to wait for first clock sync.
+This option must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+This option takes an integer number as its argument.
+.sp
+If greater than zero, alters \fBntpd\fP's behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is \fBETIMEDOUT\fP.
+This provides the option for a script starting \fBntpd\fP to easily
+wait for the first set of the clock before proceeding.
+.It Fl x , Fl \-slew
+Slew up to 600 seconds.
+.sp
+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
+\fB\-g\fP
+and
+\fB\-q\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+.It Fl \-usepcc
+Use CPU cycle counter (Windows only).
+.sp
+Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
+they have the same frequency, the CPU counter (RDTSC on x86) is
+used directly, saving the overhead of a system call.
+.It Fl \-pccfreq Ns = Ns Ar string
+Force CPU cycle counter use (Windows only).
+.sp
+Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+.It Fl m , Fl \-mdns
+Register with mDNS as a NTP server.
+.sp
+Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTPD_<option\-name>\fP or \fBNTPD\fP
+.fi
+.ad
+.Sh USAGE
+.Ss "How NTP Operates"
+The
+.Nm
+utility operates by exchanging messages with
+one or more configured servers over a range of 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.
+This initial delay to set the clock
+can be safely and dramatically reduced using the
+.Cm iburst
+keyword with the
+.Ic server
+configuration
+command, as described in
+.Xr ntp.conf 5 .
+.Pp
+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 the default case, if
+.Nm
+detects that the time on the host
+is more than 1000s from the server time,
+.Nm
+assumes something must be terribly wrong and the only
+reliable action is for the operator to intervene and set the clock
+by hand.
+(Reasons for this include there is no TOY chip,
+or its battery is dead, or that the TOY chip is just of poor quality.)
+This causes
+.Nm
+to exit with a panic message to
+the system log.
+The
+.Fl g
+option overrides this check and the
+clock will be set to the server time regardless of the chip time
+(up to 68 years in the past or future \(em
+this is a limitation of the NTPv4 protocol).
+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
+.Nm
+to exit anyway.
+.Pp
+Under ordinary conditions,
+.Nm
+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
+.Nm
+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.
+.Pp
+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
+.Nm
+is first started without a valid drift file
+on a system with a large intrinsic drift
+the error might grow to exceed 128 ms,
+which would 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.
+There are several solutions, however.
+If the
+.Fl x
+option is included on the command line, the clock will
+never be stepped and only slew corrections will be used.
+But this choice comes with a cost that
+should be carefully explored before deciding to use
+the
+.Fl x
+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.
+.Pp
+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,
+.Nm
+enters the same state as when the
+.Pa ntp.drift
+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
+(the host
+.Cm time.ien.it
+comes to mind), there may be occasional
+step/slew corrections and subsequent frequency corrections.
+It
+helps in these cases to use the
+.Cm burst
+keyword when
+configuring the server, but
+ONLY
+when you have permission to do so from the owner of the target host.
+.Pp
+Finally,
+in the past many startup scripts would run
+.Xr ntpdate 1ntpdatemdoc
+to get the system clock close to correct before starting
+.Xr ntpd 1ntpdmdoc ,
+but this was never more than a mediocre hack and is no longer needed.
+If you are following the instructions in
+.Sx "Starting NTP (Best Current Practice)"
+and you still need to set the system time before starting
+.Nm ,
+please open a bug report and document what is going on,
+and then look at using
+.Xr sntp 1sntpmdoc .
+.Pp
+There is a way to start
+.Xr ntpd 1ntpdmdoc
+that often addresses all of the problems mentioned above.
+.Ss "Starting NTP (Best Current Practice)"
+First, use the
+.Cm iburst
+option on your
+.Cm server
+entries.
+.Pp
+If you can also keep a good
+.Pa ntp.drift
+file then
+.Xr ntpd 1ntpdmdoc
+will effectively "warm\-start" and your system's clock will
+be stable in under 11 seconds' time.
+.Pp
+As soon as possible in the startup sequence, start
+.Xr ntpd 1ntpdmdoc
+with at least the
+.Fl g
+and perhaps the
+.Fl N
+options.
+Then,
+start the rest of your "normal" processes.
+This will give
+.Xr ntpd 1ntpdmdoc
+as much time as possible to get the system's clock synchronized and stable.
+.Pp
+Finally,
+if you have processes like
+.Cm dovecot
+or database servers
+that require
+monotonically\-increasing time,
+run
+.Xr ntp\-wait 1ntp\-waitmdoc
+as late as possible in the boot sequence
+(perhaps with the
+.Fl v
+flag)
+and after
+.Xr ntp\-wait 1ntp\-waitmdoc
+exits successfully
+it is as safe as it will ever be to start any process that require
+stable time.
+.Ss "Frequency Discipline"
+The
+.Nm
+behavior at startup depends on whether the
+frequency file, usually
+.Pa ntp.drift ,
+exists.
+This file
+contains the latest estimate of clock frequency error.
+When the
+.Nm
+is started and the file does not exist, the
+.Nm
+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
+.Nm
+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
+.Nm
+is started and the file does exist, the
+.Nm
+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.
+.Ss "Operating Modes"
+The
+.Nm
+utility can operate in any of several modes, including
+symmetric active/passive, client/server broadcast/multicast and
+manycast, as described in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+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.
+.Pp
+By default,
+.Nm
+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.
+.Pp
+In some cases it may not be practical for
+.Nm
+to run continuously.
+A common workaround has been to run the
+.Xr ntpdate 1ntpdatemdoc
+or
+.Xr sntp 1sntpmdoc
+programs from a
+.Xr cron 8
+job at designated
+times.
+However, these programs do not have the crafted signal
+processing, error checking or mitigation algorithms of
+.Nm .
+The
+.Fl q
+option is intended for this purpose.
+Setting this option will cause
+.Nm
+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
+.Cm iburst
+keyword with the
+.Ic server
+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
+.Xr ntpdate 1ntpdatemdoc
+program will be
+retired.
+.Pp
+When kernel support is available to discipline the clock
+frequency, which is the case for stock Solaris, Tru64, Linux and
+.Fx ,
+a useful feature is available to discipline the clock
+frequency.
+First,
+.Nm
+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
+.Nm
+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.
+.Ss "Poll Interval Control"
+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
+.Ic tinker
+.Cm minpoll
+command to a value not less than 16 s.
+This value is used for all
+configured associations, unless overridden by the
+.Cm minpoll
+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 overridden.
+.Pp
+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
+.Pa ntp.drift
+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.
+.Ss "The huff\-n'\-puff Filter"
+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.
+.Pp
+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.
+.Pp
+The filter is activated by the
+.Ic tinker
+command and
+.Cm huffpuff
+keyword, as described in
+.Xr ntp.conf 5 .
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa /etc/ntp.drift
+the default name of the drift file
+.It Pa /etc/ntp.keys
+the default name of the key file
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpdate 1ntpdatemdoc ,
+.Xr ntpdc 1ntpdcmdoc ,
+.Xr ntpq 1ntpqmdoc ,
+.Xr sntp 1sntpmdoc
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 1)
+.%O RFC1059
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 2)
+.%O RFC1119
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+.Rs
+.%A David L. Mills
+.%A J. Martin, Ed.
+.%A J. Burbank
+.%A W. Kasch
+.%T Network Time Protocol Version 4: Protocol and Algorithms Specification
+.%O RFC5905
+.Re
+.Rs
+.%A David L. Mills
+.%A B. Haberman, Ed.
+.%T Network Time Protocol Version 4: Autokey Specification
+.%O RFC5906
+.Re
+.Rs
+.%A H. Gerstung
+.%A C. Elliott
+.%A B. Haberman, Ed.
+.%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
+.%O RFC5907
+.Re
+.Rs
+.%A R. Gayraud
+.%A B. Lourdelet
+.%T Network Time Protocol (NTP) Server Option for DHCPv6
+.%O RFC5908
+.Re
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The
+.Nm
+utility has gotten rather fat.
+While not huge, it has gotten
+larger than might be desirable for an elevated\-priority
+.Nm
+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.
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+Portions of this document came from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntpd\fP
+option definitions.
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
index b2884de0fe6c..ef1baa7037a1 100644
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -12,11 +12,13 @@
#include "ntp_stdlib.h"
#include <ntp_random.h>
+#include "ntp_config.h"
#include "ntp_syslog.h"
-#include "isc/assertions.h"
+#include "ntp_assert.h"
#include "isc/error.h"
#include "isc/strerror.h"
#include "isc/formatcheck.h"
+#include "iosignal.h"
#ifdef SIM
# include "ntpsim.h"
@@ -32,11 +34,9 @@
# include <sys/stat.h>
#endif
#include <stdio.h>
-#if !defined(VMS) /*wjm*/
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-#endif /* VMS */
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
#ifdef HAVE_SYS_SIGNAL_H
# include <sys/signal.h>
#else
@@ -45,13 +45,7 @@
#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 */
#if defined(HAVE_RTPRIO)
-# ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-# endif
# ifdef HAVE_SYS_LOCK_H
# include <sys/lock.h>
# endif
@@ -84,6 +78,7 @@
# include <apollo/base.h>
#endif /* SYS_DOMAINOS */
+
#include "recvbuff.h"
#include "ntp_cmdargs.h"
@@ -112,30 +107,34 @@
#ifdef HAVE_LINUX_CAPABILITIES
# include <sys/capability.h>
# include <sys/prctl.h>
-#endif
-#endif
-
-/*
- * Signals we catch for debugging. If not debugging we ignore them.
- */
-#define MOREDEBUGSIG SIGUSR1
-#define LESSDEBUGSIG SIGUSR2
+#endif /* HAVE_LINUX_CAPABILITIES */
+#if defined(HAVE_PRIV_H) && defined(HAVE_SOLARIS_PRIVS)
+# include <priv.h>
+#endif /* HAVE_PRIV_H */
+#endif /* HAVE_DROPROOT */
-/*
- * 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 (LIBSECCOMP) && (KERN_SECCOMP)
+/* # include <sys/types.h> */
+# include <sys/resource.h>
+# include <seccomp.h>
+#endif /* LIBSECCOMP and KERN_SECCOMP */
#ifdef HAVE_DNSREGISTRATION
-#include <dns_sd.h>
+# include <dns_sd.h>
DNSServiceRef mdns;
#endif
+#ifdef HAVE_SETPGRP_0
+# define ntp_setpgrp(x, y) setpgrp()
+#else
+# define ntp_setpgrp(x, y) setpgrp(x, y)
+#endif
+
+#ifdef HAVE_SOLARIS_PRIVS
+# define LOWPRIVS "basic,sys_time,net_privaddr,proc_setid,!proc_info,!proc_session,!proc_exec"
+static priv_set_t *lowprivs = NULL;
+static priv_set_t *highprivs = NULL;
+#endif /* HAVE_SOLARIS_PRIVS */
/*
* Scheduling priority we run at
*/
@@ -146,20 +145,12 @@ int priority_done = 2; /* 0 - Set priority */
/* 2 - Don't set priority */
/* 1 and 2 are pretty much the same */
-#ifdef DEBUG
-/*
- * Debugging flag
- */
-volatile int debug = 0; /* No debugging by default */
-#endif
-
-int listen_to_virtual_ips = 1;
-const char *specific_interface = NULL; /* interface name or IP address to bind to */
+int listen_to_virtual_ips = TRUE;
/*
* No-fork flag. If set, we do not become a background daemon.
*/
-int nofork = 0; /* Fork by default */
+int nofork; /* Fork by default */
#ifdef HAVE_DNSREGISTRATION
/*
@@ -167,15 +158,16 @@ int nofork = 0; /* Fork by default */
* after we have synched the first time. If the attempt fails, then try again once per
* minute for up to 5 times. After all, we may be starting before mDNS.
*/
-int mdnsreg = 1;
+int mdnsreg = FALSE;
int mdnstries = 5;
#endif /* HAVE_DNSREGISTRATION */
#ifdef HAVE_DROPROOT
-int droproot = 0;
-char *user = NULL; /* User to switch to */
-char *group = NULL; /* group to switch to */
-const char *chrootdir = NULL; /* directory to chroot to */
+int droproot;
+int root_dropped;
+char *user; /* User to switch to */
+char *group; /* group to switch to */
+const char *chrootdir; /* directory to chroot to */
int sw_uid;
int sw_gid;
char *endp;
@@ -183,6 +175,10 @@ struct group *gr;
struct passwd *pw;
#endif /* HAVE_DROPROOT */
+#ifdef HAVE_WORKING_FORK
+int waitsync_fd_to_close = -1; /* -w/--wait-sync */
+#endif
+
/*
* Initializing flag. All async routines watch this and only do their
* thing when it is clear.
@@ -206,126 +202,58 @@ extern int syscall (int, ...);
#endif /* DECL_SYSCALL */
-#ifdef SIGDIE2
+#if !defined(SIM) && defined(SIGDIE1)
static RETSIGTYPE finish (int);
-#endif /* SIGDIE2 */
+#endif
-#ifdef DEBUG
-#ifndef SYS_WINNT
+#if !defined(SIM) && defined(HAVE_WORKING_FORK)
+static int wait_child_sync_if (int, long);
+#endif
+
+#if !defined(SIM) && !defined(SYS_WINNT)
+# ifdef DEBUG
static RETSIGTYPE moredebug (int);
static RETSIGTYPE lessdebug (int);
-#endif
-#else /* not DEBUG */
+# else /* !DEBUG follows */
static RETSIGTYPE no_debug (int);
-#endif /* not DEBUG */
+# endif /* !DEBUG */
+#endif /* !SIM && !SYS_WINNT */
+
+int saved_argc;
+char ** saved_argv;
+#ifndef SIM
int ntpdmain (int, char **);
static void set_process_priority (void);
-void init_logging (char const *, int);
-void setup_logfile (void);
-static void process_commandline_opts(int *, char ***);
-
-static void assertion_failed (const char *file, int line,
- isc_assertiontype_t type, const char *cond);
-static void library_fatal_error (const char *file, int line,
- const char *format, va_list args) ISC_FORMAT_PRINTF(3, 0);
-static void library_unexpected_error(const char *file, int line,
- const char *format, va_list args) ISC_FORMAT_PRINTF(3, 0);
-
+static void assertion_failed (const char *, int,
+ isc_assertiontype_t,
+ const char *)
+ __attribute__ ((__noreturn__));
+static void library_fatal_error (const char *, int,
+ const char *, va_list)
+ ISC_FORMAT_PRINTF(3, 0);
+static void library_unexpected_error(const char *, int,
+ const char *, va_list)
+ ISC_FORMAT_PRINTF(3, 0);
+#endif /* !SIM */
-/*
- * Initialize the logging
- */
-void
-init_logging(
- char const *name,
- int log_version
- )
-{
- const char *cp;
-
- /*
- * Logging. This may actually work on the gizmo board. Find a name
- * to log with by using the basename
- */
- cp = strrchr(name, '/');
- if (cp == 0)
- cp = name;
- else
- cp++;
-#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 /* !VMS */
-
- if (log_version)
- NLOG(NLOG_SYSINFO) /* 'if' clause for syslog */
- msyslog(LOG_NOTICE, "%s", Version);
-}
-
-
-/*
- * Redirect logging to a file if requested with -l.
- * The ntp.conf logfile directive does not use this code, see
- * config_vars() in ntp_config.c.
- */
void
-setup_logfile(
- void
+parse_cmdline_opts(
+ int * pargc,
+ char ***pargv
)
{
- if (HAVE_OPT( LOGFILE )) {
- const char *my_optarg = OPT_ARG( LOGFILE );
- FILE *new_file;
-
- if(strcmp(my_optarg, "stderr") == 0)
- new_file = stderr;
- else if(strcmp(my_optarg, "stdout") == 0)
- new_file = stdout;
- else
- new_file = fopen(my_optarg, "a");
- if (new_file != NULL) {
- NLOG(NLOG_SYSINFO)
- msyslog(LOG_NOTICE, "logging to file %s", my_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",
- my_optarg);
- }
-}
+ static int parsed;
+ static int optct;
+ if (!parsed)
+ optct = ntpOptionProcess(&ntpdOptions, *pargc, *pargv);
-static void
-process_commandline_opts(
- int *pargc,
- char ***pargv
- )
-{
- int optct;
+ parsed = 1;
- optct = ntpOptionProcess(&ntpdOptions, *pargc, *pargv);
*pargc -= optct;
*pargv += optct;
}
@@ -338,14 +266,19 @@ main(
char *argv[]
)
{
- process_commandline_opts(&argc, &argv);
+ progname = argv[0];
+ parse_cmdline_opts(&argc, &argv);
+#ifdef DEBUG
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
+ DPRINTF(1, ("%s\n", Version));
+#endif
return ntpsim(argc, argv);
}
-#else /* SIM */
+#else /* !SIM follows */
#ifdef NO_MAIN_ALLOWED
CALL(ntpd,"ntpd",ntpdmain);
-#else
+#else /* !NO_MAIN_ALLOWED follows */
#ifndef SYS_WINNT
int
main(
@@ -355,9 +288,9 @@ main(
{
return ntpdmain(argc, argv);
}
-#endif /* SYS_WINNT */
-#endif /* NO_MAIN_ALLOWED */
-#endif /* SIM */
+#endif /* !SYS_WINNT */
+#endif /* !NO_MAIN_ALLOWED */
+#endif /* !SIM */
#ifdef _AIX
/*
@@ -396,11 +329,12 @@ catch_danger(int signo)
/*
* Set the process priority
*/
+#ifndef SIM
static void
set_process_priority(void)
{
-#ifdef DEBUG
+# ifdef DEBUG
if (debug > 1)
msyslog(LOG_DEBUG, "set_process_priority: %s: priority_done is <%d>",
((priority_done)
@@ -408,9 +342,9 @@ set_process_priority(void)
: "Attempt to set priority"
),
priority_done);
-#endif /* DEBUG */
+# endif /* DEBUG */
-#if defined(HAVE_SCHED_SETSCHEDULER)
+# if defined(HAVE_SCHED_SETSCHEDULER)
if (!priority_done) {
extern int config_priority_override, config_priority;
int pmax, pmin;
@@ -432,9 +366,9 @@ set_process_priority(void)
else
++priority_done;
}
-#endif /* HAVE_SCHED_SETSCHEDULER */
-#if defined(HAVE_RTPRIO)
-# ifdef RTP_SET
+# endif /* HAVE_SCHED_SETSCHEDULER */
+# ifdef HAVE_RTPRIO
+# ifdef RTP_SET
if (!priority_done) {
struct rtprio srtp;
@@ -446,17 +380,17 @@ set_process_priority(void)
else
++priority_done;
}
-# else /* not RTP_SET */
+# else /* !RTP_SET follows */
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
+# endif /* !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)
@@ -464,91 +398,152 @@ set_process_priority(void)
else
++priority_done;
}
-# endif /* HAVE_ATT_NICE */
-# ifdef HAVE_BSD_NICE
+# 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 */
+# 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");
}
+#endif /* !SIM */
/*
* Main program. Initialize us, disconnect us from the tty if necessary,
* and loop waiting for I/O and/or timer expiries.
*/
+#ifndef SIM
int
ntpdmain(
int argc,
char *argv[]
)
{
- l_fp now;
+ l_fp now;
struct recvbuf *rbuf;
-#ifdef _AIX /* HMS: ifdef SIGDANGER? */
+ const char * logfilename;
+# ifdef HAVE_UMASK
+ mode_t uv;
+# endif
+# if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
+ uid_t uid;
+# endif
+# if defined(HAVE_WORKING_FORK)
+ long wait_sync = 0;
+ int pipe_fds[2];
+ int rc;
+ int exit_code;
+# ifdef _AIX
struct sigaction sa;
-#endif
+# endif
+# if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
+ int fid;
+# endif
+# endif /* HAVE_WORKING_FORK*/
+# ifdef SCO5_CLOCK
+ int fd;
+ int zero;
+# endif
+# ifdef HAVE_UMASK
+ uv = umask(0);
+ if (uv)
+ umask(uv);
+ else
+ umask(022);
+# endif
+ saved_argc = argc;
+ saved_argv = argv;
progname = argv[0];
- initializing = 1; /* mark that we are initializing */
- process_commandline_opts(&argc, &argv);
- init_logging(progname, 1); /* Open the log file */
+ initializing = TRUE; /* mark that we are initializing */
+ parse_cmdline_opts(&argc, &argv);
+# ifdef DEBUG
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
+# ifdef HAVE_SETLINEBUF
+ setlinebuf(stdout);
+# endif
+# endif
-#ifdef HAVE_UMASK
- {
- mode_t uv;
+ if (HAVE_OPT(NOFORK) || HAVE_OPT(QUIT)
+# ifdef DEBUG
+ || debug
+# endif
+ || HAVE_OPT(SAVECONFIGQUIT))
+ nofork = TRUE;
- uv = umask(0);
- if(uv)
- (void) umask(uv);
- else
- (void) umask(022);
+ init_logging(progname, NLOG_SYNCMASK, TRUE);
+ /* honor -l/--logfile option to log to a file */
+ if (HAVE_OPT(LOGFILE)) {
+ logfilename = OPT_ARG(LOGFILE);
+ syslogit = FALSE;
+ change_logfile(logfilename, FALSE);
+ } else {
+ logfilename = NULL;
+ if (nofork)
+ msyslog_term = TRUE;
+ if (HAVE_OPT(SAVECONFIGQUIT))
+ syslogit = FALSE;
}
-#endif
+ msyslog(LOG_NOTICE, "%s: Starting", Version);
-#if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
{
- uid_t uid;
-
- uid = getuid();
- if (uid && !HAVE_OPT( SAVECONFIGQUIT )) {
- msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);
- printf("must be run as root, not uid %ld\n", (long)uid);
- exit(1);
+ int i;
+ char buf[1024]; /* Secret knowledge of msyslog buf length */
+ char *cp = buf;
+
+ /* Note that every arg has an initial space character */
+ snprintf(cp, sizeof(buf), "Command line:");
+ cp += strlen(cp);
+
+ for (i = 0; i < saved_argc ; ++i) {
+ snprintf(cp, sizeof(buf) - (cp - buf),
+ " %s", saved_argv[i]);
+ cp += strlen(cp);
}
+ msyslog(LOG_INFO, "%s", buf);
}
-#endif
-
- /* getstartup(argc, argv); / * startup configuration, may set debug */
-#ifdef DEBUG
- debug = DESC(DEBUG_LEVEL).optOccCt;
- DPRINTF(1, ("%s\n", Version));
-#endif
-
- /* honor -l/--logfile option to log to a file */
- setup_logfile();
+ /*
+ * Install trap handlers to log errors and assertion failures.
+ * Default handlers print to stderr which doesn't work if detached.
+ */
+ isc_assertion_setcallback(assertion_failed);
+ isc_error_setfatal(library_fatal_error);
+ isc_error_setunexpected(library_unexpected_error);
+
+ /* MPE lacks the concept of root */
+# if defined(HAVE_GETUID) && !defined(MPE)
+ uid = getuid();
+ if (uid && !HAVE_OPT( SAVECONFIGQUIT )) {
+ msyslog_term = TRUE;
+ msyslog(LOG_ERR,
+ "must be run as root, not uid %ld", (long)uid);
+ exit(1);
+ }
+# endif
/*
* Enable the Multi-Media Timer for Windows?
*/
-#ifdef SYS_WINNT
+# ifdef SYS_WINNT
if (HAVE_OPT( MODIFYMMTIMER ))
set_mm_timer(MM_TIMER_HIRES);
-#endif
+# endif
- if (HAVE_OPT( NOFORK ) || HAVE_OPT( QUIT )
-#ifdef DEBUG
- || debug
-#endif
- || HAVE_OPT( SAVECONFIGQUIT ))
- nofork = 1;
+#ifdef HAVE_DNSREGISTRATION
+/*
+ * Enable mDNS registrations?
+ */
+ if (HAVE_OPT( MDNS )) {
+ mdnsreg = TRUE;
+ }
+#endif /* HAVE_DNSREGISTRATION */
if (HAVE_OPT( NOVIRTUALIPS ))
listen_to_virtual_ips = 0;
@@ -563,7 +558,7 @@ ntpdmain(
while (ifacect-- > 0) {
add_nic_rule(
- is_ip_address(*ifaces, &addr)
+ is_ip_address(*ifaces, AF_UNSPEC, &addr)
? MATCH_IFADDR
: MATCH_IFNAME,
*ifaces, -1, ACTION_LISTEN);
@@ -574,21 +569,43 @@ ntpdmain(
if (HAVE_OPT( NICE ))
priority_done = 0;
-#if defined(HAVE_SCHED_SETSCHEDULER)
+# ifdef HAVE_SCHED_SETSCHEDULER
if (HAVE_OPT( PRIORITY )) {
config_priority = OPT_VALUE_PRIORITY;
config_priority_override = 1;
priority_done = 0;
}
-#endif
+# endif
+
+# ifdef HAVE_WORKING_FORK
+ do { /* 'loop' once */
+ if (!HAVE_OPT( WAIT_SYNC ))
+ break;
+ wait_sync = OPT_VALUE_WAIT_SYNC;
+ if (wait_sync <= 0) {
+ wait_sync = 0;
+ break;
+ }
+ /* -w requires a fork() even with debug > 0 */
+ nofork = FALSE;
+ if (pipe(pipe_fds)) {
+ exit_code = (errno) ? errno : -1;
+ msyslog(LOG_ERR,
+ "Pipe creation failed for --wait-sync: %m");
+ exit(exit_code);
+ }
+ waitsync_fd_to_close = pipe_fds[1];
+ } while (0); /* 'loop' once */
+# endif /* HAVE_WORKING_FORK */
-#ifdef SYS_WINNT
+ init_lib();
+# ifdef SYS_WINNT
/*
* Start interpolation thread, must occur before first
* get_systime()
*/
init_winnt_time();
-#endif
+# endif
/*
* Initialize random generator and public key pair
*/
@@ -596,259 +613,171 @@ ntpdmain(
ntp_srandom((int)(now.l_i * now.l_uf));
-#if !defined(VMS)
-# ifndef NODETACH
/*
* Detach us from the terminal. May need an #ifndef GIZMO.
*/
if (!nofork) {
+# ifdef HAVE_WORKING_FORK
+ rc = fork();
+ if (-1 == rc) {
+ exit_code = (errno) ? errno : -1;
+ msyslog(LOG_ERR, "fork: %m");
+ exit(exit_code);
+ }
+ if (rc > 0) {
+ /* parent */
+ exit_code = wait_child_sync_if(pipe_fds[0],
+ wait_sync);
+ exit(exit_code);
+ }
+
/*
- * Install trap handlers to log errors and assertion
- * failures. Default handlers print to stderr which
- * doesn't work if detached.
+ * child/daemon
+ * close all open files excepting waitsync_fd_to_close.
+ * msyslog() unreliable until after init_logging().
*/
- isc_assertion_setcallback(assertion_failed);
- isc_error_setfatal(library_fatal_error);
- isc_error_setunexpected(library_unexpected_error);
+ closelog();
+ if (syslog_file != NULL) {
+ fclose(syslog_file);
+ syslog_file = NULL;
+ syslogit = TRUE;
+ }
+ close_all_except(waitsync_fd_to_close);
+ INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
+ && 2 == dup2(0, 2));
-# ifndef SYS_WINNT
-# ifdef HAVE_DAEMON
- daemon(0, 0);
-# else /* not HAVE_DAEMON */
- if (fork()) /* HMS: What about a -1? */
- exit(0);
+ init_logging(progname, 0, TRUE);
+ /* we lost our logfile (if any) daemonizing */
+ setup_logfile(logfilename);
+# ifdef SYS_DOMAINOS
{
-#if !defined(F_CLOSEM)
- u_long s;
- int max_fd;
-#endif /* !FCLOSEM */
- if (syslog_file != NULL) {
- fclose(syslog_file);
- syslog_file = NULL;
- }
-#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);
-
- init_logging(progname, 0);
- /* we lost our logfile (if any) daemonizing */
- setup_logfile();
-
-#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;
+ uid_$t puid;
+ status_$t st;
- (void) sigaction(SIGDANGER, &sa, NULL);
-#endif /* _AIX */
+ proc2_$who_am_i(&puid);
+ proc2_$make_server(&puid, &st);
+ }
+# endif /* SYS_DOMAINOS */
+# ifdef HAVE_SETSID
+ if (setsid() == (pid_t)-1)
+ msyslog(LOG_ERR, "setsid(): %m");
+# elif defined(HAVE_SETPGID)
+ if (setpgid(0, 0) == -1)
+ msyslog(LOG_ERR, "setpgid(): %m");
+# else /* !HAVE_SETSID && !HAVE_SETPGID follows */
+# ifdef TIOCNOTTY
+ fid = open("/dev/tty", 2);
+ if (fid >= 0) {
+ ioctl(fid, (u_long)TIOCNOTTY, NULL);
+ close(fid);
}
-# endif /* not HAVE_DAEMON */
-# endif /* SYS_WINNT */
+# endif /* TIOCNOTTY */
+ ntp_setpgrp(0, getpid());
+# endif /* !HAVE_SETSID && !HAVE_SETPGID */
+# 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;
+ sigaction(SIGDANGER, &sa, NULL);
+# endif /* _AIX */
+# endif /* HAVE_WORKING_FORK */
}
-# endif /* NODETACH */
-#endif /* VMS */
-#ifdef SCO5_CLOCK
+# 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;
+ fd = open("/dev/at1", O_RDONLY);
+ if (fd >= 0) {
+ zero = 0;
if (ioctl(fd, ACPU_LOCK, &zero) < 0)
- msyslog(LOG_ERR, "cannot lock to base CPU: %m");
- close( fd );
- } /* else ...
- * If we can't open the device, this probably just isn't
- * a multiprocessor system, so we're A-OK.
- */
+ msyslog(LOG_ERR, "cannot lock to base CPU: %m");
+ close(fd);
}
-#endif
+# endif
-#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined(MCL_FUTURE)
-# ifdef HAVE_SETRLIMIT
+ /* Setup stack size in preparation for locking pages in memory. */
+# if defined(HAVE_MLOCKALL)
+# ifdef HAVE_SETRLIMIT
+ ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k");
+# ifdef RLIMIT_MEMLOCK
/*
- * Set the stack limit to something smaller, so that we don't lock a lot
- * of unused stack memory.
+ * The default RLIMIT_MEMLOCK is very low on Linux systems.
+ * Unless we increase this limit malloc calls are likely to
+ * fail if we drop root privilege. To be useful the value
+ * has to be larger than the largest ntpd resident set size.
*/
- {
- struct rlimit rl;
-
- /* HMS: must make the rlim_cur amount configurable */
- if (getrlimit(RLIMIT_STACK, &rl) != -1
- && (rl.rlim_cur = 50 * 4096) < rl.rlim_max)
- {
- if (setrlimit(RLIMIT_STACK, &rl) == -1)
- {
- msyslog(LOG_ERR,
- "Cannot adjust stack limit for mlockall: %m");
- }
- }
-# ifdef RLIMIT_MEMLOCK
- /*
- * The default RLIMIT_MEMLOCK is very low on Linux systems.
- * Unless we increase this limit malloc calls are likely to
- * fail if we drop root privlege. To be useful the value
- * has to be larger than the largest ntpd resident set size.
- */
- rl.rlim_cur = rl.rlim_max = 32*1024*1024;
- if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1) {
- msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
- }
-# endif /* RLIMIT_MEMLOCK */
- }
-# 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
+ ntp_rlimit(RLIMIT_MEMLOCK, DFLT_RLIMIT_MEMLOCK * 1024 * 1024, 1024 * 1024, "MB");
+# endif /* RLIMIT_MEMLOCK */
+# endif /* HAVE_SETRLIMIT */
+# else /* !HAVE_MLOCKALL follows */
+# 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) */
+ if (ulimit(SET_STACKLIM, (get_aix_stack() - 8 * 4096)) < 0)
+ msyslog(LOG_ERR,
+ "Cannot adjust stack limit for plock: %m");
+# endif /* _AIX */
+# endif /* PROCLOCK */
+# endif /* HAVE_PLOCK */
+# endif /* !HAVE_MLOCKALL */
/*
* 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
+# ifdef SIGDIE1
+ signal_no_reset(SIGDIE1, finish);
+ signal_no_reset(SIGDIE2, finish);
+ signal_no_reset(SIGDIE3, finish);
+ signal_no_reset(SIGDIE4, finish);
+# endif
+# ifdef SIGBUS
+ signal_no_reset(SIGBUS, finish);
+# endif
+
+# if !defined(SYS_WINNT) && !defined(VMS)
+# ifdef DEBUG
(void) signal_no_reset(MOREDEBUGSIG, moredebug);
(void) signal_no_reset(LESSDEBUGSIG, lessdebug);
-# else
+# else
(void) signal_no_reset(MOREDEBUGSIG, no_debug);
(void) signal_no_reset(LESSDEBUGSIG, no_debug);
-# endif /* DEBUG */
-#endif /* !SYS_WINNT && !VMS */
+# 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 */
+# ifdef SIGPIPE
+ signal_no_reset(SIGPIPE, SIG_IGN);
+# endif
/*
* Call the init_ routines to initialize the data structures.
*
* Exactly what command-line options are we expecting here?
*/
+ INIT_SSL();
init_auth();
init_util();
init_restrict();
init_mon();
init_timer();
- init_lib();
init_request();
init_control();
init_peer();
-#ifdef REFCLOCK
+# ifdef REFCLOCK
init_refclock();
-#endif
+# endif
set_process_priority();
init_proto(); /* Call at high priority */
init_io();
@@ -861,27 +790,61 @@ ntpdmain(
* since this will definitely be different for the gizmo board.
*/
getconfig(argc, argv);
+
+ if (do_memlock) {
+# if defined(HAVE_MLOCKALL)
+ /*
+ * lock the process into memory
+ */
+ if (!HAVE_OPT(SAVECONFIGQUIT) &&
+ 0 != mlockall(MCL_CURRENT|MCL_FUTURE))
+ msyslog(LOG_ERR, "mlockall(): %m");
+# else /* !HAVE_MLOCKALL follows */
+# ifdef HAVE_PLOCK
+# ifdef PROCLOCK
+ /*
+ * lock the process into memory
+ */
+ if (!HAVE_OPT(SAVECONFIGQUIT) && 0 != plock(PROCLOCK))
+ msyslog(LOG_ERR, "plock(PROCLOCK): %m");
+# else /* !PROCLOCK follows */
+# ifdef TXTLOCK
+ /*
+ * Lock text into ram
+ */
+ if (!HAVE_OPT(SAVECONFIGQUIT) && 0 != plock(TXTLOCK))
+ msyslog(LOG_ERR, "plock(TXTLOCK) error: %m");
+# else /* !TXTLOCK follows */
+ msyslog(LOG_ERR, "plock() - don't know what to lock!");
+# endif /* !TXTLOCK */
+# endif /* !PROCLOCK */
+# endif /* HAVE_PLOCK */
+# endif /* !HAVE_MLOCKALL */
+ }
+
+ loop_config(LOOP_DRIFTINIT, 0);
report_event(EVNT_SYSRESTART, NULL, NULL);
- loop_config(LOOP_DRIFTCOMP, old_drift);
- initializing = 0;
+ initializing = FALSE;
-#ifdef HAVE_DROPROOT
- if( droproot ) {
+# ifdef HAVE_DROPROOT
+ if (droproot) {
/* Drop super-user privileges and chroot now if the OS supports this */
-#ifdef HAVE_LINUX_CAPABILITIES
+# ifdef HAVE_LINUX_CAPABILITIES
/* set flag: keep privileges accross setuid() call (we only really need cap_sys_time): */
if (prctl( PR_SET_KEEPCAPS, 1L, 0L, 0L, 0L ) == -1) {
msyslog( LOG_ERR, "prctl( PR_SET_KEEPCAPS, 1L ) failed: %m" );
exit(-1);
}
-#else
+# elif HAVE_SOLARIS_PRIVS
+ /* Nothing to do here */
+# else
/* we need a user to switch to */
if (user == NULL) {
msyslog(LOG_ERR, "Need user name to drop root privileges (see -u flag!)" );
exit(-1);
}
-#endif /* HAVE_LINUX_CAPABILITIES */
+# endif /* HAVE_LINUX_CAPABILITIES || HAVE_SOLARIS_PRIVS */
if (user != NULL) {
if (isdigit((unsigned char)*user)) {
@@ -890,11 +853,8 @@ ntpdmain(
goto getuser;
if ((pw = getpwuid(sw_uid)) != NULL) {
- user = strdup(pw->pw_name);
- if (NULL == user) {
- msyslog(LOG_ERR, "strdup() failed: %m");
- exit (-1);
- }
+ free(user);
+ user = estrdup(pw->pw_name);
sw_gid = pw->pw_gid;
} else {
errno = 0;
@@ -910,9 +870,9 @@ getuser:
sw_gid = pw->pw_gid;
} else {
if (errno)
- msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
+ msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
else
- msyslog(LOG_ERR, "Cannot find user `%s'", user);
+ msyslog(LOG_ERR, "Cannot find user `%s'", user);
exit (-1);
}
}
@@ -949,6 +909,22 @@ getgroup:
exit (-1);
}
}
+# ifdef HAVE_SOLARIS_PRIVS
+ if ((lowprivs = priv_str_to_set(LOWPRIVS, ",", NULL)) == NULL) {
+ msyslog(LOG_ERR, "priv_str_to_set() failed:%m");
+ exit(-1);
+ }
+ if ((highprivs = priv_allocset()) == NULL) {
+ msyslog(LOG_ERR, "priv_allocset() failed:%m");
+ exit(-1);
+ }
+ (void) getppriv(PRIV_PERMITTED, highprivs);
+ (void) priv_intersect(highprivs, lowprivs);
+ if (setppriv(PRIV_SET, PRIV_PERMITTED, lowprivs) == -1) {
+ msyslog(LOG_ERR, "setppriv() failed:%m");
+ exit(-1);
+ }
+# endif /* HAVE_SOLARIS_PRIVS */
if (user && initgroups(user, sw_gid)) {
msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
exit (-1);
@@ -970,145 +946,210 @@ getgroup:
exit (-1);
}
-#ifndef HAVE_LINUX_CAPABILITIES
+# if !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS)
/*
* for now assume that the privilege to bind to privileged ports
* is associated with running with uid 0 - should be refined on
* ports that allow binding to NTP_PORT with uid != 0
*/
disable_dynamic_updates |= (sw_uid != 0); /* also notifies routing message listener */
-#endif
+# endif /* !HAVE_LINUX_CAPABILITIES && !HAVE_SOLARIS_PRIVS */
if (disable_dynamic_updates && interface_interval) {
interface_interval = 0;
- msyslog(LOG_INFO, "running in unprivileged mode disables dynamic interface tracking");
+ msyslog(LOG_INFO, "running as non-root disables dynamic interface tracking");
}
-#ifdef HAVE_LINUX_CAPABILITIES
- do {
+# ifdef HAVE_LINUX_CAPABILITIES
+ {
/*
* We may be running under non-root uid now, but we still hold full root privileges!
* We drop all of them, except for the crucial one or two: cap_sys_time and
* cap_net_bind_service if doing dynamic interface tracking.
*/
cap_t caps;
- char *captext = (interface_interval)
- ? "cap_sys_time,cap_net_bind_service=ipe"
- : "cap_sys_time=ipe";
- if( ! ( caps = cap_from_text( captext ) ) ) {
- msyslog( LOG_ERR, "cap_from_text() failed: %m" );
+ char *captext;
+
+ captext = (0 != interface_interval)
+ ? "cap_sys_time,cap_net_bind_service=pe"
+ : "cap_sys_time=pe";
+ caps = cap_from_text(captext);
+ if (!caps) {
+ msyslog(LOG_ERR,
+ "cap_from_text(%s) failed: %m",
+ captext);
exit(-1);
}
- if( cap_set_proc( caps ) == -1 ) {
- msyslog( LOG_ERR, "cap_set_proc() failed to drop root privileges: %m" );
+ if (-1 == cap_set_proc(caps)) {
+ msyslog(LOG_ERR,
+ "cap_set_proc() failed to drop root privs: %m");
exit(-1);
}
- cap_free( caps );
- } while(0);
-#endif /* HAVE_LINUX_CAPABILITIES */
+ cap_free(caps);
+ }
+# endif /* HAVE_LINUX_CAPABILITIES */
+# ifdef HAVE_SOLARIS_PRIVS
+ if (priv_delset(lowprivs, "proc_setid") == -1) {
+ msyslog(LOG_ERR, "priv_delset() failed:%m");
+ exit(-1);
+ }
+ if (setppriv(PRIV_SET, PRIV_PERMITTED, lowprivs) == -1) {
+ msyslog(LOG_ERR, "setppriv() failed:%m");
+ exit(-1);
+ }
+ priv_freeset(lowprivs);
+ priv_freeset(highprivs);
+# endif /* HAVE_SOLARIS_PRIVS */
+ root_dropped = TRUE;
+ fork_deferred_worker();
+ } /* if (droproot) */
+# endif /* HAVE_DROPROOT */
+
+/* libssecomp sandboxing */
+#if defined (LIBSECCOMP) && (KERN_SECCOMP)
+ scmp_filter_ctx ctx;
+
+ if ((ctx = seccomp_init(SCMP_ACT_KILL)) < 0)
+ msyslog(LOG_ERR, "%s: seccomp_init(SCMP_ACT_KILL) failed: %m", __func__);
+ else {
+ msyslog(LOG_DEBUG, "%s: seccomp_init(SCMP_ACT_KILL) succeeded", __func__);
+ }
- } /* if( droproot ) */
-#endif /* HAVE_DROPROOT */
+#ifdef __x86_64__
+int scmp_sc[] = {
+ SCMP_SYS(adjtimex),
+ SCMP_SYS(bind),
+ SCMP_SYS(brk),
+ SCMP_SYS(chdir),
+ SCMP_SYS(clock_gettime),
+ SCMP_SYS(clock_settime),
+ SCMP_SYS(close),
+ SCMP_SYS(connect),
+ SCMP_SYS(exit_group),
+ SCMP_SYS(fstat),
+ SCMP_SYS(fsync),
+ SCMP_SYS(futex),
+ SCMP_SYS(getitimer),
+ SCMP_SYS(getsockname),
+ SCMP_SYS(ioctl),
+ SCMP_SYS(lseek),
+ SCMP_SYS(madvise),
+ SCMP_SYS(mmap),
+ SCMP_SYS(munmap),
+ SCMP_SYS(open),
+ SCMP_SYS(poll),
+ SCMP_SYS(read),
+ SCMP_SYS(recvmsg),
+ SCMP_SYS(rename),
+ SCMP_SYS(rt_sigaction),
+ SCMP_SYS(rt_sigprocmask),
+ SCMP_SYS(rt_sigreturn),
+ SCMP_SYS(select),
+ SCMP_SYS(sendto),
+ SCMP_SYS(setitimer),
+ SCMP_SYS(setsid),
+ SCMP_SYS(socket),
+ SCMP_SYS(stat),
+ SCMP_SYS(time),
+ SCMP_SYS(write),
+};
+#endif
+#ifdef __i386__
+int scmp_sc[] = {
+ SCMP_SYS(_newselect),
+ SCMP_SYS(adjtimex),
+ SCMP_SYS(brk),
+ SCMP_SYS(chdir),
+ SCMP_SYS(clock_gettime),
+ SCMP_SYS(clock_settime),
+ SCMP_SYS(close),
+ SCMP_SYS(exit_group),
+ SCMP_SYS(fsync),
+ SCMP_SYS(futex),
+ SCMP_SYS(getitimer),
+ SCMP_SYS(madvise),
+ SCMP_SYS(mmap),
+ SCMP_SYS(mmap2),
+ SCMP_SYS(munmap),
+ SCMP_SYS(open),
+ SCMP_SYS(poll),
+ SCMP_SYS(read),
+ SCMP_SYS(rename),
+ SCMP_SYS(rt_sigaction),
+ SCMP_SYS(rt_sigprocmask),
+ SCMP_SYS(select),
+ SCMP_SYS(setitimer),
+ SCMP_SYS(setsid),
+ SCMP_SYS(sigprocmask),
+ SCMP_SYS(sigreturn),
+ SCMP_SYS(socketcall),
+ SCMP_SYS(stat64),
+ SCMP_SYS(time),
+ SCMP_SYS(write),
+};
+#endif
+ {
+ int i;
+
+ for (i = 0; i < COUNTOF(scmp_sc); i++) {
+ if (seccomp_rule_add(ctx,
+ SCMP_ACT_ALLOW, scmp_sc[i], 0) < 0) {
+ msyslog(LOG_ERR,
+ "%s: seccomp_rule_add() failed: %m",
+ __func__);
+ }
+ }
+ }
- /*
- * 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)
+ if (seccomp_load(ctx) < 0)
+ msyslog(LOG_ERR, "%s: seccomp_load() failed: %m",
+ __func__);
+ else {
+ msyslog(LOG_DEBUG, "%s: seccomp_load() succeeded", __func__);
+ }
+#endif /* LIBSECCOMP and KERN_SECCOMP */
+
+# ifdef HAVE_IO_COMPLETION_PORT
for (;;) {
GetReceivedBuffers();
-#else /* normal I/O */
+# else /* normal I/O */
BLOCK_IO_AND_ALARM();
- was_alarmed = 0;
- for (;;)
- {
-# if !defined(HAVE_SIGNALED_IO)
- extern fd_set activefds;
- extern int maxactivefd;
+ was_alarmed = FALSE;
- fd_set rdfdes;
- int nfound;
-# endif
-
- if (alarm_flag) /* alarmed? */
- {
- was_alarmed = 1;
- alarm_flag = 0;
+ for (;;) {
+ if (alarm_flag) { /* alarmed? */
+ was_alarmed = TRUE;
+ alarm_flag = FALSE;
}
- if (!was_alarmed && has_full_recv_buffer() == ISC_FALSE)
- {
+ if (!was_alarmed && !has_full_recv_buffer()) {
/*
* 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);
+ io_handler();
+ }
- (void)input_handler(&ts);
- }
- else if (nfound == -1 && errno != EINTR)
- msyslog(LOG_ERR, "select() error: %m");
-# ifdef DEBUG
- else if (debug > 5)
- 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;
- }
+ if (alarm_flag) { /* alarmed? */
+ was_alarmed = TRUE;
+ alarm_flag = FALSE;
}
- if (was_alarmed)
- {
+ if (was_alarmed) {
UNBLOCK_IO_AND_ALARM();
/*
* Out here, signals are unblocked. Call timer routine
* to process expiry.
*/
timer();
- was_alarmed = 0;
+ was_alarmed = FALSE;
BLOCK_IO_AND_ALARM();
}
-#endif /* ! HAVE_IO_COMPLETION_PORT */
+# endif /* !HAVE_IO_COMPLETION_PORT */
-#ifdef DEBUG_TIMING
+# ifdef DEBUG_TIMING
{
l_fp pts;
l_fp tsa, tsb;
@@ -1116,40 +1157,37 @@ getgroup:
get_systime(&pts);
tsa = pts;
-#endif
+# endif
rbuf = get_full_recv_buffer();
- while (rbuf != NULL)
- {
- if (alarm_flag)
- {
- was_alarmed = 1;
- alarm_flag = 0;
+ while (rbuf != NULL) {
+ if (alarm_flag) {
+ was_alarmed = TRUE;
+ alarm_flag = FALSE;
}
UNBLOCK_IO_AND_ALARM();
- if (was_alarmed)
- { /* avoid timer starvation during lengthy I/O handling */
+ if (was_alarmed) {
+ /* avoid timer starvation during lengthy I/O handling */
timer();
- was_alarmed = 0;
+ was_alarmed = FALSE;
}
/*
* Call the data procedure to handle each received
* packet.
*/
- if (rbuf->receiver != NULL) /* This should always be true */
- {
-#ifdef DEBUG_TIMING
+ if (rbuf->receiver != NULL) {
+# ifdef DEBUG_TIMING
l_fp dts = pts;
L_SUB(&dts, &rbuf->recv_time);
DPRINTF(2, ("processing timestamp delta %s (with prec. fuzz)\n", lfptoa(&dts, 9)));
collect_timing(rbuf, "buffer processing delay", 1, &dts);
bufcount++;
-#endif
- (rbuf->receiver)(rbuf);
+# endif
+ (*rbuf->receiver)(rbuf);
} else {
- msyslog(LOG_ERR, "receive buffer corruption - receiver found to be NULL - ABORTING");
+ msyslog(LOG_ERR, "fatal: receive buffer callback NULL");
abort();
}
@@ -1157,7 +1195,7 @@ getgroup:
freerecvbuf(rbuf);
rbuf = get_full_recv_buffer();
}
-#ifdef DEBUG_TIMING
+# ifdef DEBUG_TIMING
get_systime(&tsb);
L_SUB(&tsb, &tsa);
if (bufcount) {
@@ -1165,13 +1203,13 @@ getgroup:
DPRINTF(2, ("processing time for %d buffers %s\n", bufcount, lfptoa(&tsb, 9)));
}
}
-#endif
+# endif
/*
* Go around again
*/
-#ifdef HAVE_DNSREGISTRATION
+# ifdef HAVE_DNSREGISTRATION
if (mdnsreg && (current_time - mdnsreg ) > 60 && mdnstries && sys_leap != LEAP_NOTINSYNC) {
mdnsreg = current_time;
msyslog(LOG_INFO, "Attempting to register mDNS");
@@ -1184,18 +1222,19 @@ getgroup:
}
} else {
msyslog(LOG_INFO, "mDNS service registered.");
- mdnsreg = 0;
+ mdnsreg = FALSE;
}
}
-#endif /* HAVE_DNSREGISTRATION */
+# endif /* HAVE_DNSREGISTRATION */
}
UNBLOCK_IO_AND_ALARM();
return 1;
}
+#endif /* !SIM */
-#ifdef SIGDIE2
+#if !defined(SIM) && defined(SIGDIE1)
/*
* finish - exit gracefully
*/
@@ -1204,39 +1243,108 @@ finish(
int sig
)
{
- msyslog(LOG_NOTICE, "ntpd exiting on signal %d", sig);
-#ifdef HAVE_DNSREGISTRATION
+ const char *sig_desc;
+
+ sig_desc = NULL;
+#ifdef HAVE_STRSIGNAL
+ sig_desc = strsignal(sig);
+#endif
+ if (sig_desc == NULL)
+ sig_desc = "";
+ msyslog(LOG_NOTICE, "%s exiting on signal %d (%s)", progname,
+ sig, sig_desc);
+ /* See Bug 2513 and Bug 2522 re the unlink of PIDFILE */
+# ifdef HAVE_DNSREGISTRATION
if (mdns != NULL)
DNSServiceRefDeallocate(mdns);
-#endif
- switch (sig) {
-# ifdef SIGBUS
- case SIGBUS:
- printf("\nfinish(SIGBUS)\n");
- exit(0);
# endif
- case 0: /* Should never happen... */
- return;
-
- default:
- exit(0);
- }
+ exit(0);
}
-#endif /* SIGDIE2 */
+#endif /* !SIM && SIGDIE1 */
-/* assertion_failed
- * Redirect trap messages from ISC libraries to syslog.
- * This code was cloned and simplified from BIND.
+#ifndef SIM
+/*
+ * wait_child_sync_if - implements parent side of -w/--wait-sync
*/
+# ifdef HAVE_WORKING_FORK
+static int
+wait_child_sync_if(
+ int pipe_read_fd,
+ long wait_sync
+ )
+{
+ int rc;
+ int exit_code;
+ time_t wait_end_time;
+ time_t cur_time;
+ time_t wait_rem;
+ fd_set readset;
+ struct timeval wtimeout;
+
+ if (0 == wait_sync)
+ return 0;
+
+ /* waitsync_fd_to_close used solely by child */
+ close(waitsync_fd_to_close);
+ wait_end_time = time(NULL) + wait_sync;
+ do {
+ cur_time = time(NULL);
+ wait_rem = (wait_end_time > cur_time)
+ ? (wait_end_time - cur_time)
+ : 0;
+ wtimeout.tv_sec = wait_rem;
+ wtimeout.tv_usec = 0;
+ FD_ZERO(&readset);
+ FD_SET(pipe_read_fd, &readset);
+ rc = select(pipe_read_fd + 1, &readset, NULL, NULL,
+ &wtimeout);
+ if (-1 == rc) {
+ if (EINTR == errno)
+ continue;
+ exit_code = (errno) ? errno : -1;
+ msyslog(LOG_ERR,
+ "--wait-sync select failed: %m");
+ return exit_code;
+ }
+ if (0 == rc) {
+ /*
+ * select() indicated a timeout, but in case
+ * its timeouts are affected by a step of the
+ * system clock, select() again with a zero
+ * timeout to confirm.
+ */
+ FD_ZERO(&readset);
+ FD_SET(pipe_read_fd, &readset);
+ wtimeout.tv_sec = 0;
+ wtimeout.tv_usec = 0;
+ rc = select(pipe_read_fd + 1, &readset, NULL,
+ NULL, &wtimeout);
+ if (0 == rc) /* select() timeout */
+ break;
+ else /* readable */
+ return 0;
+ } else /* readable */
+ return 0;
+ } while (wait_rem > 0);
+
+ fprintf(stderr, "%s: -w/--wait-sync %ld timed out.\n",
+ progname, wait_sync);
+ return ETIMEDOUT;
+}
+# endif /* HAVE_WORKING_FORK */
+
/*
- * assertion_failed - Handle assertion failures.
+ * assertion_failed - Redirect assertion failures to msyslog().
*/
-
static void
-assertion_failed(const char *file, int line, isc_assertiontype_t type,
- const char *cond)
+assertion_failed(
+ const char *file,
+ int line,
+ isc_assertiontype_t type,
+ const char *cond
+ )
{
isc_assertion_setcallback(NULL); /* Avoid recursion */
@@ -1244,16 +1352,25 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
file, line, isc_assertion_typetotext(type), cond);
msyslog(LOG_ERR, "exiting (due to assertion failure)");
+#if defined(DEBUG) && defined(SYS_WINNT)
+ if (debug)
+ DebugBreak();
+#endif
+
abort();
}
+
/*
* library_fatal_error - Handle fatal errors from our libraries.
*/
-
static void
-library_fatal_error(const char *file, int line, const char *format,
- va_list args)
+library_fatal_error(
+ const char *file,
+ int line,
+ const char *format,
+ va_list args
+ )
{
char errbuf[256];
@@ -1261,20 +1378,30 @@ library_fatal_error(const char *file, int line, const char *format,
msyslog(LOG_ERR, "%s:%d: fatal error:", file, line);
vsnprintf(errbuf, sizeof(errbuf), format, args);
- msyslog(LOG_ERR, errbuf);
+ msyslog(LOG_ERR, "%s", errbuf);
msyslog(LOG_ERR, "exiting (due to fatal error in library)");
+#if defined(DEBUG) && defined(SYS_WINNT)
+ if (debug)
+ DebugBreak();
+#endif
+
abort();
}
+
/*
* library_unexpected_error - Handle non fatal errors from our libraries.
*/
-#define MAX_UNEXPECTED_ERRORS 100
+# define MAX_UNEXPECTED_ERRORS 100
int unexpected_error_cnt = 0;
static void
-library_unexpected_error(const char *file, int line, const char *format,
- va_list args)
+library_unexpected_error(
+ const char *file,
+ int line,
+ const char *format,
+ va_list args
+ )
{
char errbuf[256];
@@ -1283,18 +1410,17 @@ library_unexpected_error(const char *file, int line, const char *format,
msyslog(LOG_ERR, "%s:%d: unexpected error:", file, line);
vsnprintf(errbuf, sizeof(errbuf), format, args);
- msyslog(LOG_ERR, errbuf);
+ msyslog(LOG_ERR, "%s", errbuf);
if (++unexpected_error_cnt == MAX_UNEXPECTED_ERRORS)
- {
msyslog(LOG_ERR, "Too many errors. Shutting up.");
- }
}
+#endif /* !SIM */
+#if !defined(SIM) && !defined(SYS_WINNT)
+# ifdef DEBUG
-#ifdef DEBUG
-#ifndef SYS_WINNT
/*
* moredebug - increase debugging verbosity
*/
@@ -1313,6 +1439,7 @@ moredebug(
errno = saved_errno;
}
+
/*
* lessdebug - decrease debugging verbosity
*/
@@ -1330,9 +1457,10 @@ lessdebug(
}
errno = saved_errno;
}
-#endif
-#else /* not DEBUG */
-#ifndef SYS_WINNT
+
+# else /* !DEBUG follows */
+
+
/*
* no_debug - We don't do the debug here.
*/
@@ -1346,5 +1474,5 @@ no_debug(
msyslog(LOG_DEBUG, "ntpd not compiled for debugging (signal %d)", sig);
errno = saved_errno;
}
-#endif /* not SYS_WINNT */
-#endif /* not DEBUG */
+# endif /* !DEBUG */
+#endif /* !SIM && !SYS_WINNT */
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
new file mode 100644
index 000000000000..7d588dd6374d
--- /dev/null
+++ b/ntpd/ntpd.html
@@ -0,0 +1,995 @@
+<html lang="en">
+<head>
+<title>ntpd: Network Time Protocol (NTP) Daemon User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpd: Network Time Protocol (NTP) Daemon User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpd: Network Time Protocol (NTP) Daemon User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Description">ntpd Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">ntpd: Network Time Protocol (NTP) Daemon User Manual</h2>
+
+<p>The <code>ntpd</code> program is an operating system daemon that synchronizes the
+system clock to remote NTP time servers or local reference clocks.
+It is a complete implementation of NTP version 4 defined by RFC-5905, but
+also retains compatible with version 3 defined by RFC-1305 and versions
+1 and 2, defined by RFC-1059 and RFC-1119, respectively.
+The program can operate in any of several modes, including client/server,
+symmetric and broadcast modes, and with both symmetric-key and public-key
+cryptography.
+
+ <p>This document applies to version 4.2.8 of <code>ntpd</code>.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
+<li><a accesskey="2" href="#ntpd-Invocation">ntpd Invocation</a>: Invoking ntpd
+<li><a accesskey="3" href="#Usage">Usage</a>: Usage
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-Description"></a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>The <code>ntpd</code> program ordinarily requires
+a configuration file described at <a href="#ntp_002econf">ntp.conf</a>.
+This configuration file contains configuration commands described on
+the pages listed above.
+However a client can discover remote servers and configure them
+automatically.
+This makes it possible to deploy a fleet of workstations without
+specifying configuration details specific to the local environment.
+
+ <p>The <code>ntpd</code> program normally operates continuously while adjusting the
+system time and frequency, but in some cases this might not be
+practical.
+With the <code>-q</code> option <code>ntpd</code> operates as in continuous mode, but
+exits just after setting the clock for the first time.
+Most applications will probably want to specify the <code>iburst</code>
+option with the <code>server</code> command.
+With this option an initial volley of messages is exchanged to
+groom the data and set the clock in about ten seconds' time.
+If nothing is heard after a few minutes' time,
+the daemon times out and exits without setting the clock.
+
+<div class="node">
+<p><hr>
+<a name="ntpd-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntpd</h3>
+
+<p><a name="index-ntpd-1"></a><a name="index-NTP-daemon-program-2"></a>
+
+ <p>The
+<code>ntpd</code>
+utility 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, as defined by RFC-5905,
+but also retains compatibility with
+version 3, as defined by RFC-1305, and versions 1
+and 2, as defined by RFC-1059 and RFC-1119, respectively.
+
+ <p>The
+<code>ntpd</code>
+utility 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>Ordinarily,
+<code>ntpd</code>
+reads the
+<code>ntp.conf(5)</code>
+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>If NetInfo support is built into
+<code>ntpd</code>
+then
+<code>ntpd</code>
+will attempt to read its configuration from the
+NetInfo if the default
+<code>ntp.conf(5)</code>
+file cannot be read and no file is
+specified by the
+<code>-c</code>
+option.
+
+ <p>Various internal
+<code>ntpd</code>
+variables can be displayed and
+configuration options altered while the
+<code>ntpd</code>
+is running
+using the
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+utility programs.
+
+ <p>When
+<code>ntpd</code>
+starts it looks at the value of
+<code>umask(2)</code>,
+and if zero
+<code>ntpd</code>
+will set the
+<code>umask(2)</code>
+to 022.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpd</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpd-usage">ntpd usage</a>: ntpd help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntpd-ipv4">ntpd ipv4</a>: ipv4 option (-4)
+<li><a accesskey="3" href="#ntpd-ipv6">ntpd ipv6</a>: ipv6 option (-6)
+<li><a accesskey="4" href="#ntpd-authreq">ntpd authreq</a>: authreq option (-a)
+<li><a accesskey="5" href="#ntpd-authnoreq">ntpd authnoreq</a>: authnoreq option (-A)
+<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
+<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
+<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
+<li><a accesskey="9" href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
+<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
+<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
+<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
+<li><a href="#ntpd-novirtualips">ntpd novirtualips</a>: novirtualips option (-L)
+<li><a href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>: modifymmtimer option (-M)
+<li><a href="#ntpd-nice">ntpd nice</a>: nice option (-N)
+<li><a href="#ntpd-pidfile">ntpd pidfile</a>: pidfile option (-p)
+<li><a href="#ntpd-priority">ntpd priority</a>: priority option (-P)
+<li><a href="#ntpd-quit">ntpd quit</a>: quit option (-q)
+<li><a href="#ntpd-propagationdelay">ntpd propagationdelay</a>: propagationdelay option (-r)
+<li><a href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>: saveconfigquit option
+<li><a href="#ntpd-statsdir">ntpd statsdir</a>: statsdir option (-s)
+<li><a href="#ntpd-trustedkey">ntpd trustedkey</a>: trustedkey option (-t)
+<li><a href="#ntpd-user">ntpd user</a>: user option (-u)
+<li><a href="#ntpd-updateinterval">ntpd updateinterval</a>: updateinterval option (-U)
+<li><a href="#ntpd-wait_002dsync">ntpd wait-sync</a>: wait-sync option (-w)
+<li><a href="#ntpd-slew">ntpd slew</a>: slew option (-x)
+<li><a href="#ntpd-usepcc">ntpd usepcc</a>: usepcc option
+<li><a href="#ntpd-pccfreq">ntpd pccfreq</a>: pccfreq option
+<li><a href="#ntpd-mdns">ntpd mdns</a>: mdns option (-m)
+<li><a href="#ntpd-config">ntpd config</a>: presetting/configuring ntpd
+<li><a href="#ntpd-exit-status">ntpd exit status</a>: exit status
+<li><a href="#ntpd-Usage">ntpd Usage</a>: Usage
+<li><a href="#ntpd-Files">ntpd Files</a>: Files
+<li><a href="#ntpd-See-Also">ntpd See Also</a>: See Also
+<li><a href="#ntpd-Bugs">ntpd Bugs</a>: Bugs
+<li><a href="#ntpd-Notes">ntpd Notes</a>: Notes
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-ipv4">ntpd ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntpd-help-3"></a>
+This is the automatically generated usage text for ntpd.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8-x
+Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
+ [ &lt;server1&gt; ... &lt;serverN&gt; ]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -a no authreq Require crypto authentication
+ - prohibits the option 'authnoreq'
+ -A no authnoreq Do not require crypto authentication
+ - prohibits the option 'authreq'
+ -b no bcastsync Allow us to sync to broadcast servers
+ -c Str configfile configuration file name
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -f Str driftfile frequency drift file name
+ -g no panicgate Allow the first adjustment to be Big
+ - may appear multiple times
+ -i Str jaildir Jail directory
+ -I Str interface Listen on an interface name or address
+ - may appear multiple times
+ -k Str keyfile path to symmetric keys
+ -l Str logfile path to the log file
+ -L no novirtualips Do not listen to virtual interfaces
+ -n no nofork Do not fork
+ - prohibits the option 'wait-sync'
+ -N no nice Run at high priority
+ -p Str pidfile path to the PID file
+ -P Num priority Process priority
+ -q no quit Set the time and quit
+ - prohibits these options:
+ saveconfigquit
+ wait-sync
+ -r Str propagationdelay Broadcast/propagation delay
+ Str saveconfigquit Save parsed configuration and quit
+ - prohibits these options:
+ quit
+ wait-sync
+ -s Str statsdir Statistics file location
+ -t Str trustedkey Trusted key number
+ - may appear multiple times
+ -u Str user Run as userid (or userid:groupid)
+ -U Num updateinterval interval in seconds between scans for new or dropped interfaces
+ Str var make ARG an ntp variable (RW)
+ - may appear multiple times
+ Str dvar make ARG an ntp variable (RW|DEF)
+ - may appear multiple times
+ -w Num wait-sync Seconds to wait for first clock sync
+ - prohibits these options:
+ nofork
+ quit
+ saveconfigquit
+ -x no slew Slew up to 600 seconds
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - examining environment variables named NTPD_*
+
+Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntpd-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-ipv6">ntpd ipv6</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-usage">ntpd usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv4 option (-4)</h4>
+
+<p><a name="index-ntpd_002dipv4-4"></a>
+This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpd-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-authreq">ntpd authreq</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-ipv4">ntpd ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv6 option (-6)</h4>
+
+<p><a name="index-ntpd_002dipv6-5"></a>
+This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv4.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpd-authreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-authnoreq">ntpd authnoreq</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-ipv6">ntpd ipv6</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">authreq option (-a)</h4>
+
+<p><a name="index-ntpd_002dauthreq-6"></a>
+This is the &ldquo;require crypto authentication&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+authnoreq.
+</ul>
+
+ <p>Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+<div class="node">
+<p><hr>
+<a name="ntpd-authnoreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-configfile">ntpd configfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-authreq">ntpd authreq</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">authnoreq option (-A)</h4>
+
+<p><a name="index-ntpd_002dauthnoreq-7"></a>
+This is the &ldquo;do not require crypto authentication&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+authreq.
+</ul>
+
+ <p>Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+<div class="node">
+<p><hr>
+<a name="ntpd-configfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-driftfile">ntpd driftfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-authnoreq">ntpd authnoreq</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">configfile option (-c)</h4>
+
+<p><a name="index-ntpd_002dconfigfile-8"></a>
+This is the &ldquo;configuration file name&rdquo; option.
+This option takes a string argument.
+The name and path of the configuration file,
+<span class="file">/etc/ntp.conf</span>
+by default.
+<div class="node">
+<p><hr>
+<a name="ntpd-driftfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-panicgate">ntpd panicgate</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-configfile">ntpd configfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">driftfile option (-f)</h4>
+
+<p><a name="index-ntpd_002ddriftfile-9"></a>
+This is the &ldquo;frequency drift file name&rdquo; option.
+This option takes a string argument.
+The name and path of the frequency file,
+<span class="file">/etc/ntp.drift</span>
+by default.
+This is the same operation as the
+<code>driftfile</code> <kbd>driftfile</kbd>
+configuration specification in the
+<span class="file">/etc/ntp.conf</span>
+file.
+<div class="node">
+<p><hr>
+<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">panicgate option (-g)</h4>
+
+<p><a name="index-ntpd_002dpanicgate-10"></a>
+This is the &ldquo;allow the first adjustment to be big&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Normally,
+<code>ntpd</code>
+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,
+<code>ntpd</code>
+will exit with a message to the system log. This option can be used with the
+<code>-q</code>
+and
+<code>-x</code>
+options.
+See the
+<code>tinker</code>
+configuration file directive for other options.
+<div class="node">
+<p><hr>
+<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">jaildir option (-i)</h4>
+
+<p><a name="index-ntpd_002djaildir-11"></a>
+This is the &ldquo;jail directory&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
+</ul>
+
+ <p>Chroot the server to the directory
+<kbd>jaildir</kbd>
+.
+This option also implies that the server attempts to drop root privileges at startup.
+You may need to also specify a
+<code>-u</code>
+option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+<code>--enable-clockctl</code>) or Linux (configure with
+<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
+<div class="node">
+<p><hr>
+<a name="ntpd-interface"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-keyfile">ntpd keyfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-jaildir">ntpd jaildir</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">interface option (-I)</h4>
+
+<p><a name="index-ntpd_002dinterface-12"></a>
+This is the &ldquo;listen on an interface name or address&rdquo; option.
+This option takes a string argument <span class="file">iface</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+<code>interface</code> command, which is more versatile.
+<div class="node">
+<p><hr>
+<a name="ntpd-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-logfile">ntpd logfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-interface">ntpd interface</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">keyfile option (-k)</h4>
+
+<p><a name="index-ntpd_002dkeyfile-13"></a>
+This is the &ldquo;path to symmetric keys&rdquo; option.
+This option takes a string argument.
+Specify the name and path of the symmetric key file.
+<span class="file">/etc/ntp.keys</span>
+is the default.
+This is the same operation as the
+<code>keys</code> <kbd>keyfile</kbd>
+configuration file directive.
+<div class="node">
+<p><hr>
+<a name="ntpd-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-novirtualips">ntpd novirtualips</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-keyfile">ntpd keyfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">logfile option (-l)</h4>
+
+<p><a name="index-ntpd_002dlogfile-14"></a>
+This is the &ldquo;path to the log file&rdquo; option.
+This option takes a string argument.
+Specify the name and path of the log file.
+The default is the system log file.
+This is the same operation as the
+<code>logfile</code> <kbd>logfile</kbd>
+configuration file directive.
+<div class="node">
+<p><hr>
+<a name="ntpd-novirtualips"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-logfile">ntpd logfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">novirtualips option (-L)</h4>
+
+<p><a name="index-ntpd_002dnovirtualips-15"></a>
+This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file <code>interface</code> command, which
+is more versatile.
+<div class="node">
+<p><hr>
+<a name="ntpd-modifymmtimer"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-nice">ntpd nice</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-novirtualips">ntpd novirtualips</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">modifymmtimer option (-M)</h4>
+
+<p><a name="index-ntpd_002dmodifymmtimer-16"></a>
+This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</ul>
+
+ <p>Set the Windows Multimedia Timer to highest resolution. This
+ensures the resolution does not change while ntpd is running,
+avoiding timekeeping glitches associated with changes.
+<div class="node">
+<p><hr>
+<a name="ntpd-nice"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-pidfile">ntpd pidfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-modifymmtimer">ntpd modifymmtimer</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">nice option (-N)</h4>
+
+<p><a name="index-ntpd_002dnice-17"></a>
+This is the &ldquo;run at high priority&rdquo; option.
+To the extent permitted by the operating system, run
+<code>ntpd</code>
+at the highest priority.
+<div class="node">
+<p><hr>
+<a name="ntpd-pidfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-priority">ntpd priority</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-nice">ntpd nice</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">pidfile option (-p)</h4>
+
+<p><a name="index-ntpd_002dpidfile-18"></a>
+This is the &ldquo;path to the pid file&rdquo; option.
+This option takes a string argument.
+Specify the name and path of the file used to record
+<code>ntpd</code>'s
+process ID.
+This is the same operation as the
+<code>pidfile</code> <kbd>pidfile</kbd>
+configuration file directive.
+<div class="node">
+<p><hr>
+<a name="ntpd-priority"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-quit">ntpd quit</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-pidfile">ntpd pidfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">priority option (-P)</h4>
+
+<p><a name="index-ntpd_002dpriority-19"></a>
+This is the &ldquo;process priority&rdquo; option.
+This option takes a number argument.
+To the extent permitted by the operating system, run
+<code>ntpd</code>
+at the specified
+<code>sched_setscheduler(SCHED_FIFO)</code>
+priority.
+<div class="node">
+<p><hr>
+<a name="ntpd-quit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-propagationdelay">ntpd propagationdelay</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-priority">ntpd priority</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">quit option (-q)</h4>
+
+<p><a name="index-ntpd_002dquit-20"></a>
+This is the &ldquo;set the time and quit&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+saveconfigquit, wait-sync.
+</ul>
+
+ <p><code>ntpd</code>
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+<code>ntpdate</code>
+program, which will soon be replaced with a shell script.
+The
+<code>-g</code>
+and
+<code>-x</code>
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+<div class="node">
+<p><hr>
+<a name="ntpd-propagationdelay"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-quit">ntpd quit</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">propagationdelay option (-r)</h4>
+
+<p><a name="index-ntpd_002dpropagationdelay-21"></a>
+This is the &ldquo;broadcast/propagation delay&rdquo; option.
+This option takes a string argument.
+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.
+<div class="node">
+<p><hr>
+<a name="ntpd-saveconfigquit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-statsdir">ntpd statsdir</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-propagationdelay">ntpd propagationdelay</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">saveconfigquit option</h4>
+
+<p><a name="index-ntpd_002dsaveconfigquit-22"></a>
+This is the &ldquo;save parsed configuration and quit&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>SAVECONFIG</code> during the compilation.
+<li>must not appear in combination with any of the following options:
+quit, wait-sync.
+</ul>
+
+ <p>Cause <code>ntpd</code> to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+<div class="node">
+<p><hr>
+<a name="ntpd-statsdir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-trustedkey">ntpd trustedkey</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-saveconfigquit">ntpd saveconfigquit</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">statsdir option (-s)</h4>
+
+<p><a name="index-ntpd_002dstatsdir-23"></a>
+This is the &ldquo;statistics file location&rdquo; option.
+This option takes a string argument.
+Specify the directory path for files created by the statistics facility.
+This is the same operation as the
+<code>statsdir</code> <kbd>statsdir</kbd>
+configuration file directive.
+<div class="node">
+<p><hr>
+<a name="ntpd-trustedkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-user">ntpd user</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-statsdir">ntpd statsdir</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">trustedkey option (-t)</h4>
+
+<p><a name="index-ntpd_002dtrustedkey-24"></a>
+This is the &ldquo;trusted key number&rdquo; option.
+This option takes a string argument <span class="file">tkey</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Add the specified key number to the trusted key list.
+<div class="node">
+<p><hr>
+<a name="ntpd-user"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-updateinterval">ntpd updateinterval</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-trustedkey">ntpd trustedkey</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">user option (-u)</h4>
+
+<p><a name="index-ntpd_002duser-25"></a>
+This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>HAVE_DROPROOT</code> during the compilation.
+</ul>
+
+ <p>Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+<code>--enable-clockctl</code>) or Linux (configure with
+<code>--enable-linuxcaps</code>) or Solaris (configure with <code>--enable-solarisprivs</code>).
+<div class="node">
+<p><hr>
+<a name="ntpd-updateinterval"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-wait_002dsync">ntpd wait-sync</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-user">ntpd user</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">updateinterval option (-U)</h4>
+
+<p><a name="index-ntpd_002dupdateinterval-26"></a>
+This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
+This option takes a number argument.
+Give the time in seconds between two scans for new or dropped interfaces.
+For systems with routing socket support the scans will be performed shortly after the interface change
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+<div class="node">
+<p><hr>
+<a name="ntpd-wait_002dsync"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-slew">ntpd slew</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-updateinterval">ntpd updateinterval</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">wait-sync option (-w)</h4>
+
+<p><a name="index-ntpd_002dwait_002dsync-27"></a>
+This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
+This option takes a number argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>HAVE_WORKING_FORK</code> during the compilation.
+<li>must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+</ul>
+
+ <p>If greater than zero, alters <code>ntpd</code>'s behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is <code>ETIMEDOUT</code>.
+This provides the option for a script starting <code>ntpd</code> to easily
+wait for the first set of the clock before proceeding.
+<div class="node">
+<p><hr>
+<a name="ntpd-slew"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-usepcc">ntpd usepcc</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-wait_002dsync">ntpd wait-sync</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">slew option (-x)</h4>
+
+<p><a name="index-ntpd_002dslew-28"></a>
+This is the &ldquo;slew up to 600 seconds&rdquo; option.
+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
+<code>-g</code>
+and
+<code>-q</code>
+options.
+See the
+<code>tinker</code>
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+<div class="node">
+<p><hr>
+<a name="ntpd-usepcc"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-pccfreq">ntpd pccfreq</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-slew">ntpd slew</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">usepcc option</h4>
+
+<p><a name="index-ntpd_002dusepcc-29"></a>
+This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</ul>
+
+ <p>Attempt to substitute the CPU counter for <code>QueryPerformanceCounter</code>.
+The CPU counter and <code>QueryPerformanceCounter</code> are compared, and if
+they have the same frequency, the CPU counter (RDTSC on x86) is
+used directly, saving the overhead of a system call.
+<div class="node">
+<p><hr>
+<a name="ntpd-pccfreq"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-mdns">ntpd mdns</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-usepcc">ntpd usepcc</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">pccfreq option</h4>
+
+<p><a name="index-ntpd_002dpccfreq-30"></a>
+This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>SYS_WINNT</code> during the compilation.
+</ul>
+
+ <p>Force substitution the CPU counter for <code>QueryPerformanceCounter</code>.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+<div class="node">
+<p><hr>
+<a name="ntpd-mdns"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-config">ntpd config</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-pccfreq">ntpd pccfreq</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">mdns option (-m)</h4>
+
+<p><a name="index-ntpd_002dmdns-31"></a>
+This is the &ldquo;register with mdns as a ntp server&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>HAVE_DNSREGISTRATION</code> during the compilation.
+</ul>
+
+ <p>Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+
+<div class="node">
+<p><hr>
+<a name="ntpd-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-exit-status">ntpd exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-mdns">ntpd mdns</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">presetting/configuring ntpd</h4>
+
+<p>Any option that is not marked as <i>not presettable</i> may be preset by
+loading values from environment variables named <code>NTPD</code> and <code>NTPD_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
+the options listed above in upper case and segmented with underscores.
+The <code>NTPD</code> variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+ <p>The command line options relating to configuration and/or usage help are:
+
+<h5 class="subsubheading">version (-)</h5>
+
+<p>Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+ <dl>
+<dt><span class="samp">version</span><dd>Only print the version. This is the default.
+<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
+<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</dl>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Usage">ntpd Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-config">ntpd config</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="ntpd-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Files">ntpd Files</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-exit-status">ntpd exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-See-Also">ntpd See Also</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Usage">ntpd Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd Files</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Bugs">ntpd Bugs</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Files">ntpd Files</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd See Also</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-Bugs"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-Notes">ntpd Notes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-See-Also">ntpd See Also</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd Bugs</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpd-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-Bugs">ntpd Bugs</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpd Notes</h4>
+
+<div class="node">
+<p><hr>
+<a name="Usage"></a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Usage</h3>
+
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
new file mode 100644
index 000000000000..c115a4d8a55d
--- /dev/null
+++ b/ntpd/ntpd.man.in
@@ -0,0 +1,987 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpd @NTPD_MS@ "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-WBaqpd/ag-9Baiod)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:48:58 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpd-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpd\fP
+\- NTP daemon program
+.SH SYNOPSIS
+\f\*[B-Font]ntpd\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ <server1> ... <serverN> ]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntpd\fP
+utility 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, as defined by RFC-5905,
+but also retains compatibility with
+version 3, as defined by RFC-1305, and versions 1
+and 2, as defined by RFC-1059 and RFC-1119, respectively.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntpd\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Ordinarily,
+\f\*[B-Font]ntpd\fP
+reads the
+\fCntp.conf\fR(5)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+If NetInfo support is built into
+\f\*[B-Font]ntpd\fP,
+then
+\f\*[B-Font]ntpd\fP
+will attempt to read its configuration from the
+NetInfo if the default
+\fCntp.conf\fR(5)\f[]
+file cannot be read and no file is
+specified by the
+\f\*[B-Font]\-c\f[]
+option.
+.sp \n(Ppu
+.ne 2
+
+Various internal
+\f\*[B-Font]ntpd\fP
+variables can be displayed and
+configuration options altered while the
+\f\*[B-Font]ntpd\fP
+is running
+using the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+When
+\f\*[B-Font]ntpd\fP
+starts it looks at the value of
+\fCumask\fR(2)\f[],
+and if zero
+\f\*[B-Font]ntpd\fP
+will set the
+\fCumask\fR(2)\f[]
+to 022.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-a\f[], \f\*[B-Font]\-\-authreq\f[]
+Require crypto authentication.
+This option must not appear in combination with any of the following options:
+authnoreq.
+.sp
+Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+.TP
+.NOP \f\*[B-Font]\-A\f[], \f\*[B-Font]\-\-authnoreq\f[]
+Do not require crypto authentication.
+This option must not appear in combination with any of the following options:
+authreq.
+.sp
+Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+.TP
+.NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-bcastsync\f[]
+Allow us to sync to broadcast servers.
+.sp
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-configfile\f[]=\f\*[I-Font]string\f[]
+configuration file name.
+.sp
+The name and path of the configuration file,
+\fI/etc/ntp.conf\fP
+by default.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-f\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-driftfile\f[]=\f\*[I-Font]string\f[]
+frequency drift file name.
+.sp
+The name and path of the frequency file,
+\fI/etc/ntp.drift\fP
+by default.
+This is the same operation as the
+\fBdriftfile\fP \fIdriftfile\fP
+configuration specification in the
+\fI/etc/ntp.conf\fP
+file.
+.TP
+.NOP \f\*[B-Font]\-g\f[], \f\*[B-Font]\-\-panicgate\f[]
+Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
+.sp
+Normally,
+\fBntpd\fP
+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,
+\fBntpd\fP
+will exit with a message to the system log. This option can be used with the
+\fB-q\fP
+and
+\fB-x\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+.TP
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
+Jail directory.
+.sp
+Chroot the server to the directory
+\fIjaildir\fP
+.
+This option also implies that the server attempts to drop root privileges at startup.
+You may need to also specify a
+\fB-u\fP
+option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB--enable-clockctl\fP) or Linux (configure with
+\fB--enable-linuxcaps\fP) or Solaris (configure with \fB--enable-solarisprivs\fP).
+.TP
+.NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]iface\f[], \f\*[B-Font]\-\-interface\f[]=\f\*[I-Font]iface\f[]
+Listen on an interface name or address.
+This option may appear an unlimited number of times.
+.sp
+Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+\fBinterface\fP command, which is more versatile.
+.TP
+.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
+path to symmetric keys.
+.sp
+Specify the name and path of the symmetric key file.
+\fI/etc/ntp.keys\fP
+is the default.
+This is the same operation as the
+\fBkeys\fP \fIkeyfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-logfile\f[]=\f\*[I-Font]string\f[]
+path to the log file.
+.sp
+Specify the name and path of the log file.
+The default is the system log file.
+This is the same operation as the
+\fBlogfile\fP \fIlogfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-L\f[], \f\*[B-Font]\-\-novirtualips\f[]
+Do not listen to virtual interfaces.
+.sp
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file \fBinterface\fP command, which
+is more versatile.
+.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-modifymmtimer\f[]
+Modify Multimedia Timer (Windows only).
+.sp
+Set the Windows Multimedia Timer to highest resolution. This
+ensures the resolution does not change while ntpd is running,
+avoiding timekeeping glitches associated with changes.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-nofork\f[]
+Do not fork.
+This option must not appear in combination with any of the following options:
+wait-sync.
+.sp
+.TP
+.NOP \f\*[B-Font]\-N\f[], \f\*[B-Font]\-\-nice\f[]
+Run at high priority.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the highest priority.
+.TP
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pidfile\f[]=\f\*[I-Font]string\f[]
+path to the PID file.
+.sp
+Specify the name and path of the file used to record
+\fBntpd\fP's
+process ID.
+This is the same operation as the
+\fBpidfile\fP \fIpidfile\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-P\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-priority\f[]=\f\*[I-Font]number\f[]
+Process priority.
+This option takes an integer number as its argument.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the specified
+\fBsched_setscheduler(SCHED_FIFO)\fP
+priority.
+.TP
+.NOP \f\*[B-Font]\-q\f[], \f\*[B-Font]\-\-quit\f[]
+Set the time and quit.
+This option must not appear in combination with any of the following options:
+saveconfigquit, wait-sync.
+.sp
+\fBntpd\fP
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+\fBntpdate\fP
+program, which will soon be replaced with a shell script.
+The
+\fB-g\fP
+and
+\fB-x\fP
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-propagationdelay\f[]=\f\*[I-Font]string\f[]
+Broadcast/propagation delay.
+.sp
+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.
+.TP
+.NOP \f\*[B-Font]\-\-saveconfigquit\f[]=\f\*[I-Font]string\f[]
+Save parsed configuration and quit.
+This option must not appear in combination with any of the following options:
+quit, wait-sync.
+.sp
+Cause \fBntpd\fP to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-statsdir\f[]=\f\*[I-Font]string\f[]
+Statistics file location.
+.sp
+Specify the directory path for files created by the statistics facility.
+This is the same operation as the
+\fBstatsdir\fP \fIstatsdir\fP
+configuration file directive.
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]tkey\f[], \f\*[B-Font]\-\-trustedkey\f[]=\f\*[I-Font]tkey\f[]
+Trusted key number.
+This option may appear an unlimited number of times.
+.sp
+Add the specified key number to the trusted key list.
+.TP
+.NOP \f\*[B-Font]\-u\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-user\f[]=\f\*[I-Font]string\f[]
+Run as userid (or userid:groupid).
+.sp
+Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB--enable-clockctl\fP) or Linux (configure with
+\fB--enable-linuxcaps\fP) or Solaris (configure with \fB--enable-solarisprivs\fP).
+.TP
+.NOP \f\*[B-Font]\-U\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-updateinterval\f[]=\f\*[I-Font]number\f[]
+interval in seconds between scans for new or dropped interfaces.
+This option takes an integer number as its argument.
+.sp
+Give the time in seconds between two scans for new or dropped interfaces.
+For systems with routing socket support the scans will be performed shortly after the interface change
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+.TP
+.NOP \f\*[B-Font]\-\-var\f[]=\f\*[I-Font]nvar\f[]
+make ARG an ntp variable (RW).
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-dvar\f[]=\f\*[I-Font]ndvar\f[]
+make ARG an ntp variable (RW|DEF).
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-w\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-wait\-sync\f[]=\f\*[I-Font]number\f[]
+Seconds to wait for first clock sync.
+This option must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+This option takes an integer number as its argument.
+.sp
+If greater than zero, alters \fBntpd\fP's behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is \fBETIMEDOUT\fP.
+This provides the option for a script starting \fBntpd\fP to easily
+wait for the first set of the clock before proceeding.
+.TP
+.NOP \f\*[B-Font]\-x\f[], \f\*[B-Font]\-\-slew\f[]
+Slew up to 600 seconds.
+.sp
+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
+\fB-g\fP
+and
+\fB-q\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+.TP
+.NOP \f\*[B-Font]\-\-usepcc\f[]
+Use CPU cycle counter (Windows only).
+.sp
+Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
+they have the same frequency, the CPU counter (RDTSC on x86) is
+used directly, saving the overhead of a system call.
+.TP
+.NOP \f\*[B-Font]\-\-pccfreq\f[]=\f\*[I-Font]string\f[]
+Force CPU cycle counter use (Windows only).
+.sp
+Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+.TP
+.NOP \f\*[B-Font]\-m\f[], \f\*[B-Font]\-\-mdns\f[]
+Register with mDNS as a NTP server.
+.sp
+Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTPD_<option-name>\fP or \fBNTPD\fP
+.fi
+.ad
+.SH USAGE
+.SS "How NTP Operates"
+The
+\f\*[B-Font]ntpd\fP
+utility operates by exchanging messages with
+one or more configured servers over a range of 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.
+This initial delay to set the clock
+can be safely and dramatically reduced using the
+\f\*[B-Font]iburst\f[]
+keyword with the
+\f\*[B-Font]server\f[]
+configuration
+command, as described in
+\fCntp.conf\fR(5)\f[].
+.sp \n(Ppu
+.ne 2
+
+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 the default case, if
+\f\*[B-Font]ntpd\fP
+detects that the time on the host
+is more than 1000s from the server time,
+\f\*[B-Font]ntpd\fP
+assumes something must be terribly wrong and the only
+reliable action is for the operator to intervene and set the clock
+by hand.
+(Reasons for this include there is no TOY chip,
+or its battery is dead, or that the TOY chip is just of poor quality.)
+This causes
+\f\*[B-Font]ntpd\fP
+to exit with a panic message to
+the system log.
+The
+\f\*[B-Font]\-g\f[]
+option overrides this check and the
+clock will be set to the server time regardless of the chip time
+(up to 68 years in the past or future \(em
+this is a limitation of the NTPv4 protocol).
+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
+\f\*[B-Font]ntpd\fP
+to exit anyway.
+.sp \n(Ppu
+.ne 2
+
+Under ordinary conditions,
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+\f\*[B-Font]ntpd\fP
+is first started without a valid drift file
+on a system with a large intrinsic drift
+the error might grow to exceed 128 ms,
+which would 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.
+There are several solutions, however.
+If the
+\f\*[B-Font]\-x\f[]
+option is included on the command line, the clock will
+never be stepped and only slew corrections will be used.
+But this choice comes with a cost that
+should be carefully explored before deciding to use
+the
+\f\*[B-Font]\-x\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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,
+\f\*[B-Font]ntpd\fP
+enters the same state as when the
+\fIntp.drift\f[]
+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
+(the host
+\f\*[B-Font]time.ien.it\f[]
+comes to mind), there may be occasional
+step/slew corrections and subsequent frequency corrections.
+It
+helps in these cases to use the
+\f\*[B-Font]burst\f[]
+keyword when
+configuring the server, but
+ONLY
+when you have permission to do so from the owner of the target host.
+.sp \n(Ppu
+.ne 2
+
+Finally,
+in the past many startup scripts would run
+\fCntpdate\fR(@NTPDATE_MS@)\f[]
+to get the system clock close to correct before starting
+\fCntpd\fR(@NTPD_MS@)\f[],
+but this was never more than a mediocre hack and is no longer needed.
+If you are following the instructions in
+\fIStarting NTP (Best Current Practice)\f[]
+and you still need to set the system time before starting
+\f\*[B-Font]ntpd\fP,
+please open a bug report and document what is going on,
+and then look at using
+\fCsntp\fR(@SNTP_MS@)\f[].
+.sp \n(Ppu
+.ne 2
+
+There is a way to start
+\fCntpd\fR(@NTPD_MS@)\f[]
+that often addresses all of the problems mentioned above.
+.SS "Starting NTP (Best Current Practice)"
+First, use the
+\f\*[B-Font]iburst\f[]
+option on your
+\f\*[B-Font]server\f[]
+entries.
+.sp \n(Ppu
+.ne 2
+
+If you can also keep a good
+\fIntp.drift\f[]
+file then
+\fCntpd\fR(@NTPD_MS@)\f[]
+will effectively "warm-start" and your system's clock will
+be stable in under 11 seconds' time.
+.sp \n(Ppu
+.ne 2
+
+As soon as possible in the startup sequence, start
+\fCntpd\fR(@NTPD_MS@)\f[]
+with at least the
+\f\*[B-Font]\-g\f[]
+and perhaps the
+\f\*[B-Font]\-N\f[]
+options.
+Then,
+start the rest of your "normal" processes.
+This will give
+\fCntpd\fR(@NTPD_MS@)\f[]
+as much time as possible to get the system's clock synchronized and stable.
+.sp \n(Ppu
+.ne 2
+
+Finally,
+if you have processes like
+\f\*[B-Font]dovecot\f[]
+or database servers
+that require
+monotonically-increasing time,
+run
+\fCntp-wait\fR(@NTP_WAIT_MS@)\f[]
+as late as possible in the boot sequence
+(perhaps with the
+\f\*[B-Font]\-v\f[]
+flag)
+and after
+\fCntp-wait\fR(@NTP_WAIT_MS@)\f[]
+exits successfully
+it is as safe as it will ever be to start any process that require
+stable time.
+.SS "Frequency Discipline"
+The
+\f\*[B-Font]ntpd\fP
+behavior at startup depends on whether the
+frequency file, usually
+\fIntp.drift\f[],
+exists.
+This file
+contains the latest estimate of clock frequency error.
+When the
+\f\*[B-Font]ntpd\fP
+is started and the file does not exist, the
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+is started and the file does exist, the
+\f\*[B-Font]ntpd\fP
+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.
+.SS "Operating Modes"
+The
+\f\*[B-Font]ntpd\fP
+utility can operate in any of several modes, including
+symmetric active/passive, client/server broadcast/multicast and
+manycast, as described in the
+"Association Management"
+page
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[]).
+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.
+.sp \n(Ppu
+.ne 2
+
+By default,
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+In some cases it may not be practical for
+\f\*[B-Font]ntpd\fP
+to run continuously.
+A common workaround has been to run the
+\fCntpdate\fR(@NTPDATE_MS@)\f[]
+or
+\fCsntp\fR(@SNTP_MS@)\f[]
+programs from a
+\fCcron\fR(8)\f[]
+job at designated
+times.
+However, these programs do not have the crafted signal
+processing, error checking or mitigation algorithms of
+\f\*[B-Font]ntpd\fP.
+The
+\f\*[B-Font]\-q\f[]
+option is intended for this purpose.
+Setting this option will cause
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]iburst\f[]
+keyword with the
+\f\*[B-Font]server\f[]
+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
+\fCntpdate\fR(@NTPDATE_MS@)\f[]
+program will be
+retired.
+.sp \n(Ppu
+.ne 2
+
+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,
+\f\*[B-Font]ntpd\fP
+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
+\f\*[B-Font]ntpd\fP
+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.
+.SS "Poll Interval Control"
+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
+\f\*[B-Font]tinker\f[]
+\f\*[B-Font]minpoll\f[]
+command to a value not less than 16 s.
+This value is used for all
+configured associations, unless overridden by the
+\f\*[B-Font]minpoll\f[]
+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 overridden.
+.sp \n(Ppu
+.ne 2
+
+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
+\fIntp.drift\f[]
+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.
+.SS "The huff-n'-puff Filter"
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The filter is activated by the
+\f\*[B-Font]tinker\f[]
+command and
+\f\*[B-Font]huffpuff\f[]
+keyword, as described in
+\fCntp.conf\fR(5)\f[].
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH FILES
+.TP 15
+.NOP \fI/etc/ntp.conf\f[]
+the default name of the configuration file
+.br
+.ns
+.TP 15
+.NOP \fI/etc/ntp.drift\f[]
+the default name of the drift file
+.br
+.ns
+.TP 15
+.NOP \fI/etc/ntp.keys\f[]
+the default name of the key file
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpdate\fR(@NTPDATE_MS@)\f[],
+\fCntpdc\fR(@NTPDC_MS@)\f[],
+\fCntpq\fR(@NTPQ_MS@)\f[],
+\fCsntp\fR(@SNTP_MS@)\f[]
+.sp \n(Ppu
+.ne 2
+
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+\f[C]http://www.ntp.org/\f[].
+A snapshot of this documentation is available in HTML format in
+\fI/usr/share/doc/ntp\f[].
+David L. Mills,
+\fINetwork Time Protocol (Version 1)\fR,
+RFC1059
+.PP
+
+David L. Mills,
+\fINetwork Time Protocol (Version 2)\fR,
+RFC1119
+.PP
+
+David L. Mills,
+\fINetwork Time Protocol (Version 3)\fR,
+RFC1305
+.PP
+
+David L. Mills and J. Martin, Ed. and J. Burbank and W. Kasch,
+\fINetwork Time Protocol Version 4: Protocol and Algorithms Specification\fR,
+RFC5905
+.PP
+
+David L. Mills and B. Haberman, Ed.,
+\fINetwork Time Protocol Version 4: Autokey Specification\fR,
+RFC5906
+.PP
+
+H. Gerstung and C. Elliott and B. Haberman, Ed.,
+\fIDefinitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)\fR,
+RFC5907
+.PP
+
+R. Gayraud and B. Lourdelet,
+\fINetwork Time Protocol (NTP) Server Option for DHCPv6\fR,
+RFC5908
+.PP
+
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The
+\f\*[B-Font]ntpd\fP
+utility has gotten rather fat.
+While not huge, it has gotten
+larger than might be desirable for an elevated-priority
+\f\*[B-Font]ntpd\fP
+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.
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+Portions of this document came from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntpd\fP
+option definitions.
diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in
new file mode 100644
index 000000000000..bb24d02685e3
--- /dev/null
+++ b/ntpd/ntpd.mdoc.in
@@ -0,0 +1,891 @@
+.Dd December 19 2014
+.Dt NTPD @NTPD_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:14 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpd-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpd
+.Nd NTP daemon program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ <server1> ... <serverN> ]
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+utility 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, as defined by RFC\-5905,
+but also retains compatibility with
+version 3, as defined by RFC\-1305, and versions 1
+and 2, as defined by RFC\-1059 and RFC\-1119, respectively.
+.Pp
+The
+.Nm
+utility 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.
+.Pp
+Ordinarily,
+.Nm
+reads the
+.Xr ntp.conf 5
+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.
+.Pp
+If NetInfo support is built into
+.Nm ,
+then
+.Nm
+will attempt to read its configuration from the
+NetInfo if the default
+.Xr ntp.conf 5
+file cannot be read and no file is
+specified by the
+.Fl c
+option.
+.Pp
+Various internal
+.Nm
+variables can be displayed and
+configuration options altered while the
+.Nm
+is running
+using the
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+utility programs.
+.Pp
+When
+.Nm
+starts it looks at the value of
+.Xr umask 2 ,
+and if zero
+.Nm
+will set the
+.Xr umask 2
+to 022.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl a , Fl \-authreq
+Require crypto authentication.
+This option must not appear in combination with any of the following options:
+authnoreq.
+.sp
+Require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is the default.
+.It Fl A , Fl \-authnoreq
+Do not require crypto authentication.
+This option must not appear in combination with any of the following options:
+authreq.
+.sp
+Do not require cryptographic authentication for broadcast client,
+multicast client and symmetric passive associations.
+This is almost never a good idea.
+.It Fl b , Fl \-bcastsync
+Allow us to sync to broadcast servers.
+.sp
+.It Fl c Ar string , Fl \-configfile Ns = Ns Ar string
+configuration file name.
+.sp
+The name and path of the configuration file,
+\fI/etc/ntp.conf\fP
+by default.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl f Ar string , Fl \-driftfile Ns = Ns Ar string
+frequency drift file name.
+.sp
+The name and path of the frequency file,
+\fI/etc/ntp.drift\fP
+by default.
+This is the same operation as the
+\fBdriftfile\fP \fIdriftfile\fP
+configuration specification in the
+\fI/etc/ntp.conf\fP
+file.
+.It Fl g , Fl \-panicgate
+Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
+.sp
+Normally,
+\fBntpd\fP
+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,
+\fBntpd\fP
+will exit with a message to the system log. This option can be used with the
+\fB\-q\fP
+and
+\fB\-x\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
+Jail directory.
+.sp
+Chroot the server to the directory
+\fIjaildir\fP
+.
+This option also implies that the server attempts to drop root privileges at startup.
+You may need to also specify a
+\fB\-u\fP
+option.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB\-\-enable\-clockctl\fP) or Linux (configure with
+\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
+.It Fl I Ar iface , Fl \-interface Ns = Ns Ar iface
+Listen on an interface name or address.
+This option may appear an unlimited number of times.
+.sp
+Open the network address given, or all the addresses associated with the
+given interface name. This option may appear multiple times. This option
+also implies not opening other addresses, except wildcard and localhost.
+This option is deprecated. Please consider using the configuration file
+\fBinterface\fP command, which is more versatile.
+.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
+path to symmetric keys.
+.sp
+Specify the name and path of the symmetric key file.
+\fI/etc/ntp.keys\fP
+is the default.
+This is the same operation as the
+\fBkeys\fP \fIkeyfile\fP
+configuration file directive.
+.It Fl l Ar string , Fl \-logfile Ns = Ns Ar string
+path to the log file.
+.sp
+Specify the name and path of the log file.
+The default is the system log file.
+This is the same operation as the
+\fBlogfile\fP \fIlogfile\fP
+configuration file directive.
+.It Fl L , Fl \-novirtualips
+Do not listen to virtual interfaces.
+.sp
+Do not listen to virtual interfaces, defined as those with
+names containing a colon. This option is deprecated. Please
+consider using the configuration file \fBinterface\fP command, which
+is more versatile.
+.It Fl M , Fl \-modifymmtimer
+Modify Multimedia Timer (Windows only).
+.sp
+Set the Windows Multimedia Timer to highest resolution. This
+ensures the resolution does not change while ntpd is running,
+avoiding timekeeping glitches associated with changes.
+.It Fl n , Fl \-nofork
+Do not fork.
+This option must not appear in combination with any of the following options:
+wait\-sync.
+.sp
+.It Fl N , Fl \-nice
+Run at high priority.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the highest priority.
+.It Fl p Ar string , Fl \-pidfile Ns = Ns Ar string
+path to the PID file.
+.sp
+Specify the name and path of the file used to record
+\fBntpd\fP's
+process ID.
+This is the same operation as the
+\fBpidfile\fP \fIpidfile\fP
+configuration file directive.
+.It Fl P Ar number , Fl \-priority Ns = Ns Ar number
+Process priority.
+This option takes an integer number as its argument.
+.sp
+To the extent permitted by the operating system, run
+\fBntpd\fP
+at the specified
+\fBsched_setscheduler(SCHED_FIFO)\fP
+priority.
+.It Fl q , Fl \-quit
+Set the time and quit.
+This option must not appear in combination with any of the following options:
+saveconfigquit, wait\-sync.
+.sp
+\fBntpd\fP
+will not daemonize and will exit after the clock is first
+synchronized. This behavior mimics that of the
+\fBntpdate\fP
+program, which will soon be replaced with a shell script.
+The
+\fB\-g\fP
+and
+\fB\-x\fP
+options can be used with this option.
+Note: The kernel time discipline is disabled with this option.
+.It Fl r Ar string , Fl \-propagationdelay Ns = Ns Ar string
+Broadcast/propagation delay.
+.sp
+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.
+.It Fl \-saveconfigquit Ns = Ns Ar string
+Save parsed configuration and quit.
+This option must not appear in combination with any of the following options:
+quit, wait\-sync.
+.sp
+Cause \fBntpd\fP to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+.It Fl s Ar string , Fl \-statsdir Ns = Ns Ar string
+Statistics file location.
+.sp
+Specify the directory path for files created by the statistics facility.
+This is the same operation as the
+\fBstatsdir\fP \fIstatsdir\fP
+configuration file directive.
+.It Fl t Ar tkey , Fl \-trustedkey Ns = Ns Ar tkey
+Trusted key number.
+This option may appear an unlimited number of times.
+.sp
+Add the specified key number to the trusted key list.
+.It Fl u Ar string , Fl \-user Ns = Ns Ar string
+Run as userid (or userid:groupid).
+.sp
+Specify a user, and optionally a group, to switch to.
+This option is only available if the OS supports adjusting the clock
+without full root privileges.
+This option is supported under NetBSD (configure with
+\fB\-\-enable\-clockctl\fP) or Linux (configure with
+\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
+.It Fl U Ar number , Fl \-updateinterval Ns = Ns Ar number
+interval in seconds between scans for new or dropped interfaces.
+This option takes an integer number as its argument.
+.sp
+Give the time in seconds between two scans for new or dropped interfaces.
+For systems with routing socket support the scans will be performed shortly after the interface change
+has been detected by the system.
+Use 0 to disable scanning. 60 seconds is the minimum time between scans.
+.It Fl \-var Ns = Ns Ar nvar
+make ARG an ntp variable (RW).
+This option may appear an unlimited number of times.
+.sp
+.It Fl \-dvar Ns = Ns Ar ndvar
+make ARG an ntp variable (RW|DEF).
+This option may appear an unlimited number of times.
+.sp
+.It Fl w Ar number , Fl \-wait\-sync Ns = Ns Ar number
+Seconds to wait for first clock sync.
+This option must not appear in combination with any of the following options:
+nofork, quit, saveconfigquit.
+This option takes an integer number as its argument.
+.sp
+If greater than zero, alters \fBntpd\fP's behavior when forking to
+daemonize. Instead of exiting with status 0 immediately after
+the fork, the parent waits up to the specified number of
+seconds for the child to first synchronize the clock. The exit
+status is zero (success) if the clock was synchronized,
+otherwise it is \fBETIMEDOUT\fP.
+This provides the option for a script starting \fBntpd\fP to easily
+wait for the first set of the clock before proceeding.
+.It Fl x , Fl \-slew
+Slew up to 600 seconds.
+.sp
+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
+\fB\-g\fP
+and
+\fB\-q\fP
+options.
+See the
+\fBtinker\fP
+configuration file directive for other options.
+Note: The kernel time discipline is disabled with this option.
+.It Fl \-usepcc
+Use CPU cycle counter (Windows only).
+.sp
+Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
+they have the same frequency, the CPU counter (RDTSC on x86) is
+used directly, saving the overhead of a system call.
+.It Fl \-pccfreq Ns = Ns Ar string
+Force CPU cycle counter use (Windows only).
+.sp
+Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
+The CPU counter (RDTSC on x86) is used unconditionally with the
+given frequency (in Hz).
+.It Fl m , Fl \-mdns
+Register with mDNS as a NTP server.
+.sp
+Registers as an NTP server with the local mDNS server which allows
+the server to be discovered via mDNS client lookup.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from environment variables named:
+.nf
+ \fBNTPD_<option\-name>\fP or \fBNTPD\fP
+.fi
+.ad
+.Sh USAGE
+.Ss "How NTP Operates"
+The
+.Nm
+utility operates by exchanging messages with
+one or more configured servers over a range of 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.
+This initial delay to set the clock
+can be safely and dramatically reduced using the
+.Cm iburst
+keyword with the
+.Ic server
+configuration
+command, as described in
+.Xr ntp.conf 5 .
+.Pp
+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 the default case, if
+.Nm
+detects that the time on the host
+is more than 1000s from the server time,
+.Nm
+assumes something must be terribly wrong and the only
+reliable action is for the operator to intervene and set the clock
+by hand.
+(Reasons for this include there is no TOY chip,
+or its battery is dead, or that the TOY chip is just of poor quality.)
+This causes
+.Nm
+to exit with a panic message to
+the system log.
+The
+.Fl g
+option overrides this check and the
+clock will be set to the server time regardless of the chip time
+(up to 68 years in the past or future \(em
+this is a limitation of the NTPv4 protocol).
+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
+.Nm
+to exit anyway.
+.Pp
+Under ordinary conditions,
+.Nm
+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
+.Nm
+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.
+.Pp
+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
+.Nm
+is first started without a valid drift file
+on a system with a large intrinsic drift
+the error might grow to exceed 128 ms,
+which would 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.
+There are several solutions, however.
+If the
+.Fl x
+option is included on the command line, the clock will
+never be stepped and only slew corrections will be used.
+But this choice comes with a cost that
+should be carefully explored before deciding to use
+the
+.Fl x
+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.
+.Pp
+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,
+.Nm
+enters the same state as when the
+.Pa ntp.drift
+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
+(the host
+.Cm time.ien.it
+comes to mind), there may be occasional
+step/slew corrections and subsequent frequency corrections.
+It
+helps in these cases to use the
+.Cm burst
+keyword when
+configuring the server, but
+ONLY
+when you have permission to do so from the owner of the target host.
+.Pp
+Finally,
+in the past many startup scripts would run
+.Xr ntpdate @NTPDATE_MS@
+to get the system clock close to correct before starting
+.Xr ntpd @NTPD_MS@ ,
+but this was never more than a mediocre hack and is no longer needed.
+If you are following the instructions in
+.Sx "Starting NTP (Best Current Practice)"
+and you still need to set the system time before starting
+.Nm ,
+please open a bug report and document what is going on,
+and then look at using
+.Xr sntp @SNTP_MS@ .
+.Pp
+There is a way to start
+.Xr ntpd @NTPD_MS@
+that often addresses all of the problems mentioned above.
+.Ss "Starting NTP (Best Current Practice)"
+First, use the
+.Cm iburst
+option on your
+.Cm server
+entries.
+.Pp
+If you can also keep a good
+.Pa ntp.drift
+file then
+.Xr ntpd @NTPD_MS@
+will effectively "warm\-start" and your system's clock will
+be stable in under 11 seconds' time.
+.Pp
+As soon as possible in the startup sequence, start
+.Xr ntpd @NTPD_MS@
+with at least the
+.Fl g
+and perhaps the
+.Fl N
+options.
+Then,
+start the rest of your "normal" processes.
+This will give
+.Xr ntpd @NTPD_MS@
+as much time as possible to get the system's clock synchronized and stable.
+.Pp
+Finally,
+if you have processes like
+.Cm dovecot
+or database servers
+that require
+monotonically\-increasing time,
+run
+.Xr ntp\-wait 1ntp\-waitmdoc
+as late as possible in the boot sequence
+(perhaps with the
+.Fl v
+flag)
+and after
+.Xr ntp\-wait 1ntp\-waitmdoc
+exits successfully
+it is as safe as it will ever be to start any process that require
+stable time.
+.Ss "Frequency Discipline"
+The
+.Nm
+behavior at startup depends on whether the
+frequency file, usually
+.Pa ntp.drift ,
+exists.
+This file
+contains the latest estimate of clock frequency error.
+When the
+.Nm
+is started and the file does not exist, the
+.Nm
+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
+.Nm
+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
+.Nm
+is started and the file does exist, the
+.Nm
+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.
+.Ss "Operating Modes"
+The
+.Nm
+utility can operate in any of several modes, including
+symmetric active/passive, client/server broadcast/multicast and
+manycast, as described in the
+.Qq Association Management
+page
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp ) .
+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.
+.Pp
+By default,
+.Nm
+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.
+.Pp
+In some cases it may not be practical for
+.Nm
+to run continuously.
+A common workaround has been to run the
+.Xr ntpdate @NTPDATE_MS@
+or
+.Xr sntp @SNTP_MS@
+programs from a
+.Xr cron 8
+job at designated
+times.
+However, these programs do not have the crafted signal
+processing, error checking or mitigation algorithms of
+.Nm .
+The
+.Fl q
+option is intended for this purpose.
+Setting this option will cause
+.Nm
+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
+.Cm iburst
+keyword with the
+.Ic server
+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
+.Xr ntpdate @NTPDATE_MS@
+program will be
+retired.
+.Pp
+When kernel support is available to discipline the clock
+frequency, which is the case for stock Solaris, Tru64, Linux and
+.Fx ,
+a useful feature is available to discipline the clock
+frequency.
+First,
+.Nm
+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
+.Nm
+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.
+.Ss "Poll Interval Control"
+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
+.Ic tinker
+.Cm minpoll
+command to a value not less than 16 s.
+This value is used for all
+configured associations, unless overridden by the
+.Cm minpoll
+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 overridden.
+.Pp
+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
+.Pa ntp.drift
+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.
+.Ss "The huff\-n'\-puff Filter"
+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.
+.Pp
+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.
+.Pp
+The filter is activated by the
+.Ic tinker
+command and
+.Cm huffpuff
+keyword, as described in
+.Xr ntp.conf 5 .
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh FILES
+.Bl -tag -width /etc/ntp.drift -compact
+.It Pa /etc/ntp.conf
+the default name of the configuration file
+.It Pa /etc/ntp.drift
+the default name of the drift file
+.It Pa /etc/ntp.keys
+the default name of the key file
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpdate @NTPDATE_MS@ ,
+.Xr ntpdc @NTPDC_MS@ ,
+.Xr ntpq @NTPQ_MS@ ,
+.Xr sntp @SNTP_MS@
+.Pp
+In addition to the manual pages provided,
+comprehensive documentation is available on the world wide web
+at
+.Li http://www.ntp.org/ .
+A snapshot of this documentation is available in HTML format in
+.Pa /usr/share/doc/ntp .
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 1)
+.%O RFC1059
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 2)
+.%O RFC1119
+.Re
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+.Rs
+.%A David L. Mills
+.%A J. Martin, Ed.
+.%A J. Burbank
+.%A W. Kasch
+.%T Network Time Protocol Version 4: Protocol and Algorithms Specification
+.%O RFC5905
+.Re
+.Rs
+.%A David L. Mills
+.%A B. Haberman, Ed.
+.%T Network Time Protocol Version 4: Autokey Specification
+.%O RFC5906
+.Re
+.Rs
+.%A H. Gerstung
+.%A C. Elliott
+.%A B. Haberman, Ed.
+.%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
+.%O RFC5907
+.Re
+.Rs
+.%A R. Gayraud
+.%A B. Lourdelet
+.%T Network Time Protocol (NTP) Server Option for DHCPv6
+.%O RFC5908
+.Re
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The
+.Nm
+utility has gotten rather fat.
+While not huge, it has gotten
+larger than might be desirable for an elevated\-priority
+.Nm
+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.
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+Portions of this document came from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntpd\fP
+option definitions.
diff --git a/ntpd/ntpd.texi b/ntpd/ntpd.texi
new file mode 100644
index 000000000000..0ac091b47410
--- /dev/null
+++ b/ntpd/ntpd.texi
@@ -0,0 +1,113 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpd.info
+@settitle ntpd: Network Time Protocol (NTP) Daemon User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's ntpd, a program for
+controlling ntpd.
+@end ifinfo
+
+@direntry
+* ntpd: (ntpd). NTP Daemon program
+@end direntry
+
+@titlepage
+@title ntpd: Network Time Protocol (NTP) Daemon User's Manual
+@subtitle ntpd, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntpd Description, (dir), (dir)
+@top ntpd: Network Time Protocol (NTP) Daemon User Manual
+
+The @code{ntpd} program is an operating system daemon that synchronizes the
+system clock to remote NTP time servers or local reference clocks.
+It is a complete implementation of NTP version 4 defined by RFC-5905, but
+also retains compatible with version 3 defined by RFC-1305 and versions
+1 and 2, defined by RFC-1059 and RFC-1119, respectively.
+The program can operate in any of several modes, including client/server,
+symmetric and broadcast modes, and with both symmetric-key and public-key
+cryptography.
+
+This document applies to version @value{VERSION} of @code{ntpd}.
+
+@shortcontents
+
+@menu
+* ntpd Description:: Description
+* ntpd Invocation:: Invoking ntpd
+* Usage:: Usage
+@end menu
+
+@node ntpd Description
+@comment node-name, next, previous, up
+@section Description
+
+The @code{ntpd} program ordinarily requires
+a configuration file described at @ref{ntp.conf}.
+This configuration file contains configuration commands described on
+the pages listed above.
+However a client can discover remote servers and configure them
+automatically.
+This makes it possible to deploy a fleet of workstations without
+specifying configuration details specific to the local environment.
+
+The @code{ntpd} program normally operates continuously while adjusting the
+system time and frequency, but in some cases this might not be
+practical.
+With the @code{-q} option @code{ntpd} operates as in continuous mode, but
+exits just after setting the clock for the first time.
+Most applications will probably want to specify the @code{iburst}
+option with the @code{server} command.
+With this option an initial volley of messages is exchanged to
+groom the data and set the clock in about ten seconds' time.
+If nothing is heard after a few minutes' time,
+the daemon times out and exits without setting the clock.
+
+@include invoke-ntpd.texi
+
+@node Usage
+@comment node-name, next, previous, up
+@section Usage
+
+@multitable @columnfractions .23 .23 .05 .15
+@headitem What @tab Default @tab Flag @tab Option
+@item configuration file
+@tab @code{/etc/ntp.conf}
+@tab @code{-c}
+@tab @code{conffile}
+@item frequency file
+@tab none
+@tab @code{-f}
+@tab @code{driftfile}
+@item leapseconds file
+@tab none
+@tab
+@tab @code{leapfile}
+@item process ID file
+@tab none
+@tab @code{-p}
+@tab @code{pidfile}
+@item log file
+@tab system log
+@tab @code{-l}
+@tab @code{logfile}
+@item include file
+@tab none
+@tab none
+@tab @code{includefile}
+@item statistics path
+@tab @code{/var/NTP}
+@tab @code{-s}
+@tab @code{statsdir}
+@item keys path
+@tab @code{/usr/local/etc}
+@tab @code{-k}
+@tab @code{keysdir}
diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def
index 586a33e055dc..110504e5c076 100644
--- a/ntpd/ntpdbase-opts.def
+++ b/ntpd/ntpdbase-opts.def
@@ -8,8 +8,6 @@ include = <<- _EOF_
#endif
_EOF_;
-test-main;
-
flag = {
name = ipv4;
value = 4;
@@ -71,38 +69,12 @@ flag = {
descrip = "configuration file name";
doc = <<- _EndOfDoc_
The name and path of the configuration file,
- /etc/ntp.conf
+ @file{/etc/ntp.conf}
by default.
_EndOfDoc_;
};
-flag = {
- name = debug-level;
- value = d;
- max = NOLIMIT;
- ifdef = DEBUG;
- nopreset;
- descrip = "Increase output debug message level";
- omitted-usage = "this package was built using 'configure --disable--debug'";
- doc = <<- _EndOfDoc_
- Increase the debugging message output level.
- _EndOfDoc_;
-};
-
-flag = {
- name = set-debug-level;
- value = D;
- arg-type = string;
- max = NOLIMIT;
- ifdef = DEBUG;
- descrip = "Set the output debug message level";
- omitted-usage = "this package was built using 'configure --disable--debug'";
- flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
- doc = <<- _EndOfDoc_
- Set the output debugging level. Can be supplied multiple times,
- but each overrides the previous value(s).
- _EndOfDoc_;
-};
+#include debug-opt.def
flag = {
name = driftfile;
@@ -111,12 +83,12 @@ flag = {
descrip = "frequency drift file name";
doc = <<- _EndOfDoc_
The name and path of the frequency file,
- /etc/ntp.drift
+ @file{/etc/ntp.drift}
by default.
This is the same operation as the
- driftfile driftfile
+ @code{driftfile} @kbd{driftfile}
configuration specification in the
- /etc/ntp.conf
+ @file{/etc/ntp.conf}
file.
_EndOfDoc_;
};
@@ -128,16 +100,16 @@ flag = {
descrip = "Allow the first adjustment to be Big";
doc = <<- _EndOfDoc_
Normally,
- ntpd
+ @code{ntpd}
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,
- ntpd
+ @code{ntpd}
will exit with a message to the system log. This option can be used with the
- -q
+ @code{-q}
and
- -x
+ @code{-x}
options.
See the
- tinker
+ @code{tinker}
configuration file directive for other options.
_EndOfDoc_;
};
@@ -148,22 +120,20 @@ flag = {
value = i;
arg-type = string;
descrip = "Jail directory";
- omitted-usage = "built without --enable-clockctl or --enable-linuxcaps";
+ omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
doc = <<- _EndOfDoc_
Chroot the server to the directory
- jaildir
+ @kbd{jaildir}
.
This option also implies that the server attempts to drop root privileges at startup.
You may need to also specify a
- -u
+ @code{-u}
option.
This option is only available if the OS supports adjusting the clock
without full root privileges.
This option is supported under NetBSD (configure with
- --enable-clockctl
- ) and Linux (configure with
- --enable-linuxcaps
- ).
+ @code{--enable-clockctl}) or Linux (configure with
+ @code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
_EndOfDoc_;
};
@@ -180,7 +150,7 @@ flag = {
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
- interface command, which is more versatile.
+ @code{interface} command, which is more versatile.
_EndOfDoc_;
};
@@ -191,10 +161,10 @@ flag = {
descrip = "path to symmetric keys";
doc = <<- _EndOfDoc_
Specify the name and path of the symmetric key file.
- /etc/ntp.keys
+ @file{/etc/ntp.keys}
is the default.
This is the same operation as the
- keys keyfile
+ @code{keys} @kbd{keyfile}
configuration file directive.
_EndOfDoc_;
};
@@ -208,7 +178,7 @@ flag = {
Specify the name and path of the log file.
The default is the system log file.
This is the same operation as the
- logfile logfile
+ @code{logfile} @kbd{logfile}
configuration file directive.
_EndOfDoc_;
};
@@ -220,7 +190,7 @@ flag = {
doc = <<- _EndOfDoc_
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
- consider using the configuration file interface command, which
+ consider using the configuration file @code{interface} command, which
is more versatile.
_EndOfDoc_;
};
@@ -240,6 +210,7 @@ flag = {
flag = {
name = nofork;
value = n;
+ flags-cant = wait-sync;
descrip = "Do not fork";
doc = <<- _EndOfDoc_
_EndOfDoc_;
@@ -251,7 +222,7 @@ flag = {
descrip = "Run at high priority";
doc = <<- _EndOfDoc_
To the extent permitted by the operating system, run
- ntpd
+ @code{ntpd}
at the highest priority.
_EndOfDoc_;
};
@@ -263,10 +234,10 @@ flag = {
descrip = "path to the PID file";
doc = <<- _EndOfDoc_
Specify the name and path of the file used to record
- ntpd's
+ @code{ntpd}'s
process ID.
This is the same operation as the
- pidfile pidfile
+ @code{pidfile} @kbd{pidfile}
configuration file directive.
_EndOfDoc_;
};
@@ -278,9 +249,9 @@ flag = {
descrip = "Process priority";
doc = <<- _EndOfDoc_
To the extent permitted by the operating system, run
- ntpd
+ @code{ntpd}
at the specified
- sched_setscheduler(SCHED_FIFO)
+ @code{sched_setscheduler(SCHED_FIFO)}
priority.
_EndOfDoc_;
};
@@ -288,16 +259,19 @@ flag = {
flag = {
name = quit;
value = q;
+ flags-cant = saveconfigquit;
+ flags-cant = wait-sync;
descrip = "Set the time and quit";
doc = <<- _EndOfDoc_
- ntpd
- will exit just after the first time the clock is set. This behavior mimics that of the
- ntpdate
- program, which is to be retired.
+ @code{ntpd}
+ will not daemonize and will exit after the clock is first
+ synchronized. This behavior mimics that of the
+ @code{ntpdate}
+ program, which will soon be replaced with a shell script.
The
- -g
+ @code{-g}
and
- -x
+ @code{-x}
options can be used with this option.
Note: The kernel time discipline is disabled with this option.
_EndOfDoc_;
@@ -317,9 +291,11 @@ flag = {
ifdef = SAVECONFIG;
name = saveconfigquit;
arg-type = string;
+ flags-cant = quit;
+ flags-cant = wait-sync;
descrip = "Save parsed configuration and quit";
doc = <<- _EndOfDoc_
- Cause ntpd to parse its startup configuration file and save an
+ Cause @code{ntpd} to parse its startup configuration file and save an
equivalent to the given filename and exit. This option was
designed for automated testing.
_EndOfDoc_;
@@ -333,7 +309,7 @@ flag = {
doc = <<- _EndOfDoc_
Specify the directory path for files created by the statistics facility.
This is the same operation as the
- statsdir statsdir
+ @code{statsdir} @kbd{statsdir}
configuration file directive.
_EndOfDoc_;
};
@@ -347,7 +323,7 @@ flag = {
arg-name = tkey;
stack-arg;
doc = <<- _EndOfDoc_
- Add a key number to the trusted key list.
+ Add the specified key number to the trusted key list.
_EndOfDoc_;
};
@@ -357,16 +333,14 @@ flag = {
value = u;
arg-type = string;
descrip = "Run as userid (or userid:groupid)";
- omitted-usage = "built without --enable-clockctl or --enable-linuxcaps";
+ omitted-usage = "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs";
doc = <<- _EndOfDoc_
Specify a user, and optionally a group, to switch to.
This option is only available if the OS supports adjusting the clock
without full root privileges.
This option is supported under NetBSD (configure with
- --enable-clockctl
- ) and Linux (configure with
- --enable-linuxcaps
- ).
+ @code{--enable-clockctl}) or Linux (configure with
+ @code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
_EndOfDoc_;
};
@@ -408,6 +382,31 @@ flag = {
};
flag = {
+ ifdef = HAVE_WORKING_FORK;
+ name = wait-sync;
+ value = w;
+ arg-type = number;
+ flags-cant = nofork;
+ flags-cant = quit;
+ flags-cant = saveconfigquit;
+ descrip = "Seconds to wait for first clock sync";
+ doc = <<- _EndOfDoc_
+ If greater than zero, alters @code{ntpd}'s behavior when forking to
+ daemonize. Instead of exiting with status 0 immediately after
+ the fork, the parent waits up to the specified number of
+ seconds for the child to first synchronize the clock. The exit
+ status is zero (success) if the clock was synchronized,
+ otherwise it is @code{ETIMEDOUT}.
+ This provides the option for a script starting @code{ntpd} to easily
+ wait for the first set of the clock before proceeding.
+ _EndOfDoc_;
+/*
+** XXX: is it "first set" or is it more? If it's only "first set" then
+** that's not the same as SYNC.
+*/
+};
+
+flag = {
name = slew;
value = x;
descrip = "Slew up to 600 seconds";
@@ -417,12 +416,12 @@ flag = {
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
- -g
+ @code{-g}
and
- -q
+ @code{-q}
options.
See the
- tinker
+ @code{tinker}
configuration file directive for other options.
Note: The kernel time discipline is disabled with this option.
_EndOfDoc_;
@@ -433,8 +432,8 @@ flag = {
name = usepcc;
descrip = "Use CPU cycle counter (Windows only)";
doc = <<- _EndOfDoc_
- Attempt to substitute the CPU counter for QueryPerformanceCounter.
- The CPU counter and QueryPerformanceCounter are compared, and if
+ Attempt to substitute the CPU counter for @code{QueryPerformanceCounter}.
+ The CPU counter and @code{QueryPerformanceCounter} are compared, and if
they have the same frequency, the CPU counter (RDTSC on x86) is
used directly, saving the overhead of a system call.
_EndOfDoc_;
@@ -446,8 +445,19 @@ flag = {
arg-type = string;
descrip = "Force CPU cycle counter use (Windows only)";
doc = <<- _EndOfDoc_
- Force substitution the CPU counter for QueryPerformanceCounter.
+ Force substitution the CPU counter for @code{QueryPerformanceCounter}.
The CPU counter (RDTSC on x86) is used unconditionally with the
given frequency (in Hz).
_EndOfDoc_;
};
+
+flag = {
+ ifdef = HAVE_DNSREGISTRATION;
+ name = mdns;
+ value = m;
+ descrip = "Register with mDNS as a NTP server";
+ doc = <<- _EndOfDoc_
+ Registers as an NTP server with the local mDNS server which allows
+ the server to be discovered via mDNS client lookup.
+ _EndOfDoc_;
+};
diff --git a/ntpd/ntpsim.c b/ntpd/ntpsim.c
index e7c0d9a583c9..b7c3218fc1a2 100644
--- a/ntpd/ntpsim.c
+++ b/ntpd/ntpsim.c
@@ -9,14 +9,19 @@
* (Some code shamelessly based on the original NTP discrete event simulator)
*/
+#include <config.h>
#ifdef SIM
#include "ntpd.h"
-#include "ntpsim.h"
-#include "ntp_data_structures.h"
+#include "ntp_config.h"
+/* forward prototypes */
+int determine_event_ordering(const Event *e1, const Event *e2);
+int determine_recv_buf_ordering(const struct recvbuf *b1,
+ const struct recvbuf *b2);
+void create_server_associations(void);
+void init_sim_io(void);
/* Global Variable Definitions */
-
sim_info simulation; /* Simulation Control Variables */
local_clock_info simclock; /* Local Clock Variables */
queue *event_queue; /* Event Queue */
@@ -28,133 +33,175 @@ void (*event_ptr[]) (Event *) = {
}; /* Function pointer to the events */
-/* Define a function to compare two events to determine which one occurs first
+/*
+ * Define a function to compare two events to determine which one occurs
+ * first.
*/
-
-int determine_event_ordering(Event *e1, Event *e2);
-
-int determine_event_ordering(Event *e1, Event *e2)
+int
+determine_event_ordering(
+ const Event *e1,
+ const Event *e2
+ )
{
- return (e1->time - e2->time);
+ return (e1->time - e2->time);
}
-/* Define a function to compare two received packets to determine which one
- * is received first
- */
-int determine_recv_buf_ordering(struct recvbuf *b1, struct recvbuf *b2);
-int determine_recv_buf_ordering(struct recvbuf *b1, struct recvbuf *b2)
+/*
+ * Define a function to compare two received packets to determine which
+ * one is received first.
+ */
+int
+determine_recv_buf_ordering(
+ const struct recvbuf *b1,
+ const struct recvbuf *b2
+ )
{
- double recv_time1, recv_time2;
+ double recv_time1;
+ double recv_time2;
+
+ /* Simply convert the time received to double and subtract */
+ LFPTOD(&b1->recv_time, recv_time1);
+ LFPTOD(&b2->recv_time, recv_time2);
- /* Simply convert the time received to double and subtract */
- LFPTOD(&b1->recv_time, recv_time1);
- LFPTOD(&b2->recv_time, recv_time2);
- return ((int)(recv_time1 - recv_time2));
+ return (int)(recv_time1 - recv_time2);
}
+
/* Define a function to create the server associations */
-void create_server_associations()
+void create_server_associations(void)
{
- int i;
- for (i = 0;i < simulation.num_of_servers;++i) {
- printf("%s\n", stoa(simulation.servers[i].addr));
- if (peer_config(simulation.servers[i].addr,
- ANY_INTERFACE_CHOOSE(simulation.servers[i].addr),
- MODE_CLIENT,
- NTP_VERSION,
- NTP_MINDPOLL,
- NTP_MAXDPOLL,
- 0, /* peerflags */
- 0, /* ttl */
- 0, /* peerkey */
- (u_char *)"*" /* peerkeystr */) == 0) {
- fprintf(stderr, "ERROR!! Could not create association for: %s",
- stoa(simulation.servers[i].addr));
+ int i;
+
+ for (i = 0; i < simulation.num_of_servers; ++i) {
+ printf("%s\n", stoa(simulation.servers[i].addr));
+ if (peer_config(simulation.servers[i].addr,
+ NULL,
+ loopback_interface,
+ MODE_CLIENT,
+ NTP_VERSION,
+ NTP_MINDPOLL,
+ NTP_MAXDPOLL,
+ 0, /* peerflags */
+ 0, /* ttl */
+ 0, /* peerkey */
+ NULL /* group ident */) == 0) {
+ fprintf(stderr,
+ "ERROR!! Could not create association for: %s\n",
+ stoa(simulation.servers[i].addr));
+ }
}
- }
}
/* Main Simulator Code */
-int ntpsim(int argc, char *argv[])
+int
+ntpsim(
+ int argc,
+ char * argv[]
+ )
{
- Event *curr_event;
- struct timeval seed;
+ Event * curr_event;
+ struct timeval seed;
- /* Initialize the local Clock
- */
- simclock.local_time = 0;
- simclock.adj = 0;
- simclock.slew = 0;
-
- /* Initialize the simulation
- */
- simulation.num_of_servers = 0;
- simulation.beep_delay = BEEP_DLY;
- simulation.sim_time = 0;
- simulation.end_time = SIM_TIME;
-
- /*
- * Initialize ntp variables
- */
- initializing = 1;
- init_auth();
- init_util();
- init_restrict();
- init_mon();
- init_timer();
- init_lib();
- init_request();
- init_control();
- init_peer();
- init_proto();
- init_io();
- init_loopfilter();
- mon_start(MON_OFF);
-
- /* Call getconfig to parse the configuration file */
- getconfig(argc, argv);
- initializing = 0;
- loop_config(LOOP_DRIFTCOMP, old_drift / 1e6);
-
- /*
- * Watch out here, we want the real time, not the silly stuff.
- */
- gettimeofday(&seed, NULL);
- ntp_srandom(seed.tv_usec);
+ /* Initialize the local Clock */
+ simclock.local_time = 0;
+ simclock.adj = 0;
+ simclock.slew = 500e-6;
+
+ /* Initialize the simulation */
+ simulation.num_of_servers = 0;
+ simulation.beep_delay = BEEP_DLY;
+ simulation.sim_time = 0;
+ simulation.end_time = SIM_TIME;
+
+ /* Initialize ntp modules */
+ initializing = TRUE;
+ msyslog_term = TRUE;
+ init_sim_io();
+ init_auth();
+ init_util();
+ init_restrict();
+ init_mon();
+ init_timer();
+ init_lib();
+ init_request();
+ init_control();
+ init_peer();
+ init_proto();
+ init_loopfilter();
+ mon_start(MON_OFF);
+
+ /* Call getconfig to parse the configuration file */
+ getconfig(argc, argv);
+ loop_config(LOOP_DRIFTINIT, 0);
+ initializing = FALSE;
+
+ /*
+ * Watch out here, we want the real time, not the silly stuff.
+ */
+ gettimeofday(&seed, NULL);
+ ntp_srandom(seed.tv_usec);
+ /* Initialize the event queue */
+ event_queue = create_priority_queue((q_order_func)
+ determine_event_ordering);
- /* Initialize the event queue */
- event_queue = create_priority_queue((int(*)(void *, void*))
- determine_event_ordering);
+ /* Initialize the receive queue */
+ recv_queue = create_priority_queue((q_order_func)
+ determine_recv_buf_ordering);
- /* Initialize the receive queue */
- recv_queue = create_priority_queue((int(*)(void *, void*))
- determine_recv_buf_ordering);
+ /* Push a beep and a timer on the event queue */
+ enqueue(event_queue, event(0, BEEP));
+ enqueue(event_queue, event(simulation.sim_time + 1.0, TIMER));
- /* Push a beep and a timer on the event queue */
- enqueue(event_queue, event(0, BEEP));
- enqueue(event_queue, event(simulation.sim_time + 1.0, TIMER));
- /*
- * Pop the queue until nothing is left or time is exceeded
- */
- /* maxtime = simulation.sim_time + simulation.end_time;*/
- while (simulation.sim_time <= simulation.end_time &&
+ /*
+ * Pop the queue until nothing is left or time is exceeded
+ */
+ /* maxtime = simulation.sim_time + simulation.end_time;*/
+ while (simulation.sim_time <= simulation.end_time &&
(!empty(event_queue))) {
- curr_event = dequeue(event_queue);
- /* Update all the clocks to the time on the event */
- sim_update_clocks(curr_event);
+ curr_event = dequeue(event_queue);
+ /* Update all the clocks to the time on the event */
+ sim_update_clocks(curr_event);
- /* Execute the function associated with the event */
- event_ptr[curr_event->function](curr_event);
- free_node(curr_event);
- }
- return (0);
+ /* Execute the function associated with the event */
+ (*event_ptr[curr_event->function])(curr_event);
+ free_node(curr_event);
+ }
+ printf("sys_received: %lu\n", sys_received);
+ printf("sys_badlength: %lu\n", sys_badlength);
+ printf("sys_declined: %lu\n", sys_declined);
+ printf("sys_restricted: %lu\n", sys_restricted);
+ printf("sys_newversion: %lu\n", sys_newversion);
+ printf("sys_oldversion: %lu\n", sys_oldversion);
+ printf("sys_limitrejected: %lu\n", sys_limitrejected);
+ printf("sys_badauth: %lu\n", sys_badauth);
+
+ return (0);
}
+void
+init_sim_io(void)
+{
+ loopback_interface = emalloc_zero(sizeof(*loopback_interface));
+ ep_list = loopback_interface;
+ strlcpy(loopback_interface->name, "IPv4loop",
+ sizeof(loopback_interface->name));
+ loopback_interface->flags = INT_UP | INT_LOOPBACK;
+ loopback_interface->fd = -1;
+ loopback_interface->bfd = -1;
+ loopback_interface->ifnum = 1;
+ loopback_interface->family = AF_INET;
+ AF(&loopback_interface->sin) = AF_INET;
+ SET_ADDR4(&loopback_interface->sin, LOOPBACKADR);
+ SET_PORT(&loopback_interface->sin, NTP_PORT);
+ AF(&loopback_interface->mask) = AF_INET;
+ SET_ADDR4(&loopback_interface->mask, LOOPNETMASK);
+}
+
/* Define a function to create an return an Event */
@@ -189,7 +236,7 @@ void sim_event_timer(Event *e)
/* Process received buffers */
while (!empty(recv_queue)) {
rbuf = (struct recvbuf *)dequeue(recv_queue);
- (rbuf->receiver)(rbuf);
+ (*rbuf->receiver)(rbuf);
free_node(rbuf);
}
@@ -205,30 +252,30 @@ void sim_event_timer(Event *e)
* creates a reply packet and pushes the reply packet onto the event queue
*/
int simulate_server(
- sockaddr_u *serv_addr, /* Address of the server */
- struct interface *inter, /* Interface on which the reply should
- be inserted */
- struct pkt *rpkt /* Packet sent to the server that
- needs to be processed. */
-)
+ sockaddr_u *serv_addr, /* Address of the server */
+ endpt * inter, /* Interface on which the reply should
+ be inserted */
+ struct pkt *rpkt /* Packet sent to the server that
+ needs to be processed. */
+ )
{
- struct pkt xpkt; /* Packet to be transmitted back
- to the client */
- struct recvbuf rbuf; /* Buffer for the received packet */
- Event *e; /* Packet receive event */
- server_info *server; /* Pointer to the server being simulated */
- script_info *curr_script; /* Current script being processed */
+ struct pkt xpkt; /* Packet to be transmitted back
+ to the client */
+ struct recvbuf rbuf; /* Buffer for the received packet */
+ Event *e; /* Packet receive event */
+ server_info *server; /* Pointer to the server being simulated */
+ script_info *curr_script; /* Current script being processed */
int i;
- double d1, d2, d3; /* Delays while the packet is enroute */
- double t1, t2, t3, t4; /* The four timestamps in the packet */
+ double d1, d2, d3; /* Delays while the packet is enroute */
+ double t1, t2, t3, t4; /* The four timestamps in the packet */
+ l_fp lfp_host; /* host-order l_fp */
- memset(&xpkt, 0, sizeof(xpkt));
- memset(&rbuf, 0, sizeof(rbuf));
+ ZERO(xpkt);
+ ZERO(rbuf);
/* Search for the server with the desired address */
server = NULL;
for (i = 0; i < simulation.num_of_servers; ++i) {
- fprintf(stderr,"Checking address: %s\n", stoa(simulation.servers[i].addr));
if (memcmp(simulation.servers[i].addr, serv_addr,
sizeof(*serv_addr)) == 0) {
server = &simulation.servers[i];
@@ -236,7 +283,8 @@ int simulate_server(
}
}
- fprintf(stderr, "Received packet for: %s\n", stoa(serv_addr));
+ fprintf(stderr, "Received packet from %s on %s\n",
+ stoa(serv_addr), latoa(inter));
if (server == NULL)
abortsim("Server with specified address not found!!!");
@@ -247,7 +295,7 @@ int simulate_server(
* Masquerade the reply as a stratum-1 server with a GPS clock
*/
xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION,
- MODE_SERVER);
+ MODE_SERVER);
xpkt.stratum = STRATUM_TO_PKT(((u_char)1));
memcpy(&xpkt.refid, "GPS", 4);
xpkt.ppoll = rpkt->ppoll;
@@ -275,54 +323,53 @@ int simulate_server(
* Note: This function is called at time t1.
*/
- LFPTOD(&rpkt->xmt, t1);
+ NTOHL_FP(&rpkt->xmt, &lfp_host);
+ LFPTOD(&lfp_host, t1);
t2 = server->server_time + d1;
t3 = server->server_time + d1 + d2;
t4 = t1 + d1 + d2 + d3;
/* Save the timestamps */
- xpkt.org = rpkt->xmt;
- DTOLFP(t2, &xpkt.rec);
- DTOLFP(t3, &xpkt.xmt);
+ xpkt.org = rpkt->xmt;
+ DTOLFP(t2, &lfp_host);
+ HTONL_FP(&lfp_host, &xpkt.rec);
+ DTOLFP(t3, &lfp_host);
+ HTONL_FP(&lfp_host, &xpkt.xmt);
xpkt.reftime = xpkt.xmt;
-
-
- /* Ok, we are done with the packet. Now initialize the receive buffer for
- * the packet.
+ /*
+ * Ok, we are done with the packet. Now initialize the receive
+ * buffer for the packet.
*/
- rbuf.receiver = receive; /* Function to call to process the packet */
+ rbuf.used = 1;
+ rbuf.receiver = &receive; /* callback to process the packet */
rbuf.recv_length = LEN_PKT_NOMAC;
rbuf.recv_pkt = xpkt;
- rbuf.used = 1;
-
+ rbuf.dstadr = inter;
+ rbuf.fd = inter->fd;
memcpy(&rbuf.srcadr, serv_addr, sizeof(rbuf.srcadr));
memcpy(&rbuf.recv_srcadr, serv_addr, sizeof(rbuf.recv_srcadr));
- if ((rbuf.dstadr = malloc(sizeof(*rbuf.dstadr))) == NULL)
- abortsim("malloc failed in simulate_server");
- memcpy(rbuf.dstadr, inter, sizeof(*rbuf.dstadr));
- /* rbuf.link = NULL; */
- /* Create a packet event and insert it onto the event_queue at the
+ /*
+ * Create a packet event and insert it onto the event_queue at the
* arrival time (t4) of the packet at the client
*/
e = event(t4, PACKET);
e->rcv_buf = rbuf;
enqueue(event_queue, e);
-
- /* Check if the time of the script has expired. If yes, delete the script.
- * If not, re-enqueue the script onto the server script queue
+ /*
+ * Check if the time of the script has expired. If yes, delete it.
*/
if (curr_script->duration > simulation.sim_time &&
- !empty(server->script)) {
+ NULL == HEAD_PFIFO(server->script)) {
printf("Hello\n");
/*
* For some reason freeing up the curr_script memory kills the
* simulation. Further debugging is needed to determine why.
- * free_node(curr_script);
+ * free(curr_script);
*/
- curr_script = dequeue(server->script);
+ UNLINK_FIFO(curr_script, *server->script, link);
}
return (0);
@@ -333,7 +380,7 @@ int simulate_server(
* Most of the code is modified from the systime.c file by Prof. Mills
*/
-void sim_update_clocks (Event *e)
+void sim_update_clocks(Event *e)
{
double time_gap;
double adj;
@@ -342,7 +389,14 @@ void sim_update_clocks (Event *e)
/* Compute the time between the last update event and this update */
time_gap = e->time - simulation.sim_time;
+ if (time_gap < 0)
+ printf("WARNING: e->time %.6g comes before sim_time %.6g (gap %+.6g)\n",
+ e->time, simulation.sim_time, time_gap);
+
/* Advance the client clock */
+ if (e->time + time_gap < simclock.local_time)
+ printf("WARNING: e->time + gap %.6g comes before local_time %.6g\n",
+ e->time + time_gap, simclock.local_time);
simclock.local_time = e->time + time_gap;
/* Advance the simulation time */
@@ -352,7 +406,7 @@ void sim_update_clocks (Event *e)
* errors. The random error is a random walk computed as the
* integral of samples from a Gaussian distribution.
*/
- for (i = 0;i < simulation.num_of_servers; ++i) {
+ for (i = 0; i < simulation.num_of_servers; ++i) {
simulation.servers[i].curr_script->freq_offset +=
gauss(0, time_gap * simulation.servers[i].curr_script->wander);
@@ -360,7 +414,6 @@ void sim_update_clocks (Event *e)
(1 + simulation.servers[i].curr_script->freq_offset);
}
-
/* 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.
@@ -371,13 +424,11 @@ void sim_update_clocks (Event *e)
if (simclock.adj < 0) {
simclock.adj += adj;
simclock.local_time -= adj;
- }
- else {
+ } else {
simclock.adj -= adj;
simclock.local_time += adj;
}
- }
- else {
+ } else {
simclock.local_time += simclock.adj;
simclock.adj = 0;
}
@@ -573,7 +624,8 @@ gauss(
*/
if (s == 0)
return (m);
- while ((q1 = drand48()) == 0);
+ while ((q1 = drand48()) == 0)
+ /* empty statement */;
q2 = drand48();
return (m + s * sqrt(-2. * log(q1)) * cos(2. * PI * q2));
}
@@ -597,7 +649,8 @@ poisson(
*/
if (s == 0)
return (m);
- while ((q1 = drand48()) == 0);
+ while ((q1 = drand48()) == 0)
+ /* empty statement */;
return (m - s * log(q1 * s));
}
diff --git a/ntpd/refclock_acts.c b/ntpd/refclock_acts.c
index be69ce6cd581..36322fd91a25 100644
--- a/ntpd/refclock_acts.c
+++ b/ntpd/refclock_acts.c
@@ -6,7 +6,7 @@
#include <config.h>
#endif
-#if defined(REFCLOCK) && (defined(CLOCK_ACTS) || defined(CLOCK_PTBACTS))
+#if defined(REFCLOCK) && defined(CLOCK_ACTS)
#include "ntpd.h"
#include "ntp_io.h"
@@ -21,6 +21,12 @@
# include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
+#ifdef SYS_WINNT
+#undef write /* ports/winnt/include/config.h: #define write _write */
+extern int async_write(int, const void *, unsigned int);
+#define write(fd, data, octets) async_write(fd, data, octets)
+#endif
+
/*
* This driver supports the US (NIST, USNO) and European (PTB, NPL,
* etc.) modem time services, as well as Spectracom GPS and WWVB
@@ -33,20 +39,19 @@
* This driver requires a modem with a Hayes-compatible command set and
* control over the modem data terminal ready (DTR) control line. The
* modem setup string is hard-coded in the driver and may require
- * changes for nonstandard modems or special circumstances. For reasons
- * unrelated to this driver, the data set ready (DSR) control line
- * should not be set when this driver is first started.
+ * changes for nonstandard modems or special circumstances.
*
- * The calling program is initiated by setting fudge flag1, either
- * manually or automatically. When flag1 is set, the calling program
- * dials the first number in the phone command of the configuration
- * file. If that call fails, the calling program dials the second number
- * and so on. The number is specified by the Hayes ATDT prefix followed
- * by the number itself, including the prefix and long-distance digits
- * and delay code, if necessary. The flag1 is 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.
+ * When enabled, the calling program dials the first number in the
+ * phones file. If that call fails, it dials the second number and
+ * so on. The phone number is specified by the Hayes ATDT prefix
+ * followed by the number itself, including the long-distance prefix
+ * and delay code, if necessary. The calling program is enabled
+ * when (a) fudge flag1 is set by ntpdc, (b) at each poll interval
+ * when no other synchronization sources are present, and (c) at each
+ * poll interval whether or not other synchronization sources are
+ * present. The calling program disconnects if (a) the called party
+ * is busy or does not answer, (b) the called party disconnects
+ * before a sufficient nuimber of timecodes have been received.
*
* The driver is transparent to each of the modem time services and
* Spectracom radios. It selects the parsing algorithm depending on the
@@ -59,18 +64,17 @@
*
* flag1 force a call in manual mode
* flag2 enable port locking (not verified)
- * flag3 no modem; port is directly connected to device
+ * flag3 not used
* flag4 not used
*
* time1 offset adjustment (s)
*
- * Ordinarily, the serial port is connected to a modem; however, it can
- * be connected directly to a device or another computer for testing and
- * calibration. In this case set fudge flag3 and the driver will send a
- * single character 'T' at each poll event. In principle, fudge flag2
- * enables port locking, allowing the modem to be shared when not in use
- * by this driver. At least on Solaris with the current NTP I/O
- * routines, this results only in lots of ugly error messages.
+ * Ordinarily, the serial port is connected to a modem and the phones
+ * list is defined. If no phones list is defined, the port can be
+ * connected directly to a device or another computer. In this case the
+ * driver will send a single character 'T' at each poll event. If
+ * fudge flag2 is enabled, port locking allows the modem to be shared
+ * when not in use by this driver.
*/
/*
* National Institute of Science and Technology (NIST)
@@ -89,7 +93,9 @@
*
* MJD, DST, DUT1 and UTC are not used by this driver. The "*" or "#" is
* the on-time markers echoed by the driver and used by NIST to measure
- * and correct for the propagation delay.
+ * and correct for the propagation delay. Note: the ACTS timecode has
+ * recently been changed to eliminate the * on-time indicator. The
+ * reason for this and the long term implications are not clear.
*
* US Naval Observatory (USNO)
*
@@ -129,27 +135,26 @@
* Interface definitions
*/
#define DEVICE "/dev/acts%d" /* device name and unit */
-#define SPEED232 B9600 /* uart speed (9600 baud) */
+#define SPEED232 B19200 /* uart speed (19200 bps) */
#define PRECISION (-10) /* precision assumed (about 1 ms) */
-#define LOCKFILE "/var/spool/locks/LCK..cua%d"
+#define LOCKFILE "/var/spool/lock/LCK..cua%d"
#define DESCRIPTION "Automated Computer Time Service" /* WRU */
#define REFID "NONE" /* default reference ID */
#define MSGCNT 20 /* max message count */
-#define SMAX 256 /* max clockstats line length */
#define MAXPHONE 10 /* max number of phone numbers */
/*
- * Calling program modes
+ * Calling program modes (mode)
*/
-#define MODE_AUTO 0 /* automatic mode */
-#define MODE_BACKUP 1 /* backup mode */
+#define MODE_BACKUP 0 /* backup mode */
+#define MODE_AUTO 1 /* automatic mode */
#define MODE_MANUAL 2 /* manual mode */
/*
- * Service identifiers.
+ * Service identifiers (message length)
*/
#define REFACTS "NIST" /* NIST reference ID */
-#define LENACTS 50 /* NIST format */
+#define LENACTS 50 /* NIST format A */
#define REFUSNO "USNO" /* USNO reference ID */
#define LENUSNO 20 /* USNO */
#define REFPTB "PTB\0" /* PTB/NPL reference ID */
@@ -160,40 +165,41 @@
#define LF 0x0a /* ASCII LF */
/*
- * Modem setup strings. These may have to be changed for some modems.
+ * Modem setup strings. These may have to be changed for
+ * some modems.
*
* AT command prefix
* B1 US answer tone
* &C0 disable 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
+ * L1 set modem speaker volume to low level
* M1 speaker enabled until carrier detect
* Q0 return result codes
* V1 return result codes as English words
+ * Y1 enable long-space disconnect
*/
-#define MODEM_SETUP "ATB1&C0&D2E0L1M1Q0V1\r" /* modem setup */
-#define MODEM_HANGUP "ATH\r" /* modem disconnect */
+const char def_modem_setup[] = "ATB1&C0&D2E0L1M1Q0V1Y1";
+const char *modem_setup = def_modem_setup;
/*
* Timeouts (all in seconds)
*/
#define SETUP 3 /* setup timeout */
-#define DTR 1 /* DTR timeout */
+#define REDIAL 30 /* redial timeout */
#define ANSWER 60 /* answer timeout */
-#define CONNECT 20 /* first valid message timeout */
-#define TIMECODE 30 /* all valid messages timeout */
+#define TIMECODE 60 /* message timeout */
+#define MAXCODE 20 /* max timecodes */
/*
* State machine codes
*/
-#define S_IDLE 0 /* wait for poll */
-#define S_OK 1 /* wait for modem setup */
-#define S_DTR 2 /* wait for modem DTR */
-#define S_CONNECT 3 /* wait for answer*/
-#define S_FIRST 4 /* wait for first valid message */
-#define S_MSG 5 /* wait for all messages */
-#define S_CLOSE 6 /* wait after sending disconnect */
+typedef enum {
+ S_IDLE, /* wait for poll */
+ S_SETUP, /* send modem setup */
+ S_CONNECT, /* wait for answer */
+ S_MSG /* wait for timecode */
+} teModemState;
/*
* Unit control structure
@@ -205,7 +211,8 @@ struct actsunit {
int retry; /* retry index */
int msgcnt; /* count of messages received */
l_fp tstamp; /* on-time timestamp */
- char *bufptr; /* buffer pointer */
+ char *bufptr; /* next incoming char stored here */
+ char buf[BMAX]; /* bufptr roams within buf[] */
};
/*
@@ -214,17 +221,17 @@ struct actsunit {
static int acts_start (int, struct peer *);
static void acts_shutdown (int, struct peer *);
static void acts_receive (struct recvbuf *);
-static void acts_message (struct peer *);
-static void acts_timecode (struct peer *, char *);
+static void acts_message (struct peer *, const char *);
+static void acts_timecode (struct peer *, const char *);
static void acts_poll (int, struct peer *);
-static void acts_timeout (struct peer *);
-static void acts_disc (struct peer *);
+static void acts_timeout (struct peer *, teModemState);
static void acts_timer (int, struct peer *);
+static void acts_close (struct peer *);
/*
* Transfer vector (conditional structure name)
*/
-struct refclock refclock_acts = {
+struct refclock refclock_acts = {
acts_start, /* start up driver */
acts_shutdown, /* shut down driver */
acts_poll, /* transmit poll message */
@@ -238,34 +245,41 @@ struct refclock refclock_acts = {
* Initialize data for processing
*/
static int
-acts_start (
+acts_start(
int unit,
struct peer *peer
)
{
struct actsunit *up;
struct refclockproc *pp;
+ const char *setup;
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(struct actsunit));
- memset(up, 0, sizeof(struct actsunit));
+ up = emalloc_zero(sizeof(struct actsunit));
up->unit = unit;
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = acts_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
+ pp->io.fd = -1;
/*
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
+ memcpy(&pp->refid, REFID, 4);
peer->sstclktype = CTL_SST_TS_TELEPHONE;
- up->bufptr = pp->a_lastcode;
+ up->bufptr = up->buf;
+ if (def_modem_setup == modem_setup) {
+ setup = get_ext_sys_var("modemsetup");
+ if (setup != NULL)
+ modem_setup = estrdup(setup);
+ }
+
return (1);
}
@@ -274,7 +288,7 @@ acts_start (
* acts_shutdown - shut down the clock
*/
static void
-acts_shutdown (
+acts_shutdown(
int unit,
struct peer *peer
)
@@ -286,7 +300,8 @@ acts_shutdown (
* Warning: do this only when a call is not in progress.
*/
pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
+ up = pp->unitptr;
+ acts_close(peer);
free(up);
}
@@ -295,15 +310,16 @@ acts_shutdown (
* acts_receive - receive data from the serial interface
*/
static void
-acts_receive (
+acts_receive(
struct recvbuf *rbufp
)
{
struct actsunit *up;
struct refclockproc *pp;
struct peer *peer;
- char tbuf[BMAX];
- char *tptr;
+ char tbuf[sizeof(up->buf)];
+ char * tptr;
+ int octets;
/*
* Initialize pointers and read the timecode and timestamp. Note
@@ -312,27 +328,27 @@ acts_receive (
* arbitrary fragments. Capture the timecode at the beginning of
* the message and at the '*' and '#' on-time characters.
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- pp->lencode = refclock_gtraw(rbufp, tbuf, BMAX - (up->bufptr -
- pp->a_lastcode), &pp->lastrec);
+ up = pp->unitptr;
+ octets = sizeof(up->buf) - (up->bufptr - up->buf);
+ refclock_gtraw(rbufp, tbuf, octets, &pp->lastrec);
for (tptr = tbuf; *tptr != '\0'; tptr++) {
if (*tptr == LF) {
- if (up->bufptr == pp->a_lastcode) {
+ if (up->bufptr == up->buf) {
up->tstamp = pp->lastrec;
continue;
-
} else {
*up->bufptr = '\0';
- acts_message(peer);
- up->bufptr = pp->a_lastcode;
+ up->bufptr = up->buf;
+ acts_message(peer, up->buf);
}
} else if (!iscntrl(*tptr)) {
*up->bufptr++ = *tptr;
if (*tptr == '*' || *tptr == '#') {
up->tstamp = pp->lastrec;
- write(pp->io.fd, tptr, 1);
+ if (write(pp->io.fd, tptr, 1) < 0)
+ msyslog(LOG_ERR, "acts: write echo fails %m");
}
}
}
@@ -344,82 +360,362 @@ acts_receive (
*/
void
acts_message(
- struct peer *peer
+ struct peer *peer,
+ const char *msg
)
{
struct actsunit *up;
struct refclockproc *pp;
- int dtr = TIOCM_DTR;
- char tbuf[SMAX];
-#ifdef DEBUG
- u_int modem;
-#endif
+ char tbuf[BMAX];
+ int dtr = TIOCM_DTR;
+
+ DPRINTF(1, ("acts: %d %s\n", (int)strlen(msg), msg));
/*
* What to do depends on the state and the first token in the
- * message. */
+ * message.
+ */
pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
-#ifdef DEBUG
- ioctl(pp->io.fd, TIOCMGET, (char *)&modem);
- snprintf(tbuf, sizeof(tbuf), "acts: %04x (%d %d) %lu %s", modem,
- up->state, up->timer, (u_long)strlen(pp->a_lastcode),
- pp->a_lastcode);
- if (debug)
- printf("%s\n", tbuf);
-#endif
+ up = pp->unitptr;
/*
- * Extract the first token in the line. A NO token sends the
- * message to the clockstats.
+ * Extract the first token in the line.
*/
- strncpy(tbuf, pp->a_lastcode, SMAX);
+ strlcpy(tbuf, msg, sizeof(tbuf));
strtok(tbuf, " ");
- if (strcmp(tbuf, "NO") == 0) {
- report_event(PEVNT_CLOCK, peer, pp->a_lastcode);
- return;
- }
- switch(up->state) {
+ switch (up->state) {
/*
* We are waiting for the OK response to the modem setup
- * command. When this happens, raise DTR and dial the number
- * followed by \r.
+ * command. When this happens, dial the number followed.
+ * If anything other than OK is received, just ignore it
+ * and wait for timeoue.
*/
- case S_OK:
+ case S_SETUP:
if (strcmp(tbuf, "OK") != 0) {
- msyslog(LOG_ERR, "acts: setup error %s",
- pp->a_lastcode);
- acts_disc(peer);
- return;
+ /*
+ * We disable echo with MODEM_SETUP's E0 but
+ * if the modem was previously E1, we will
+ * see MODEM_SETUP echoed before the OK/ERROR.
+ * Ignore it.
+ */
+ if (!strcmp(tbuf, modem_setup))
+ return;
+ break;
}
- ioctl(pp->io.fd, TIOCMBIS, (char *)&dtr);
- up->state = S_DTR;
- up->timer = DTR;
+
+ mprintf_event(PEVNT_CLOCK, peer, "DIAL #%d %s",
+ up->retry, sys_phone[up->retry]);
+ if (ioctl(pp->io.fd, TIOCMBIS, &dtr) < 0)
+ msyslog(LOG_ERR, "acts: ioctl(TIOCMBIS) failed: %m");
+ if (write(pp->io.fd, sys_phone[up->retry],
+ strlen(sys_phone[up->retry])) < 0)
+ msyslog(LOG_ERR, "acts: write DIAL fails %m");
+ write(pp->io.fd, "\r", 1);
+ up->retry++;
+ up->state = S_CONNECT;
+ up->timer = ANSWER;
return;
/*
- * We are waiting for the call to be answered. All we care about
- * here is token CONNECT. Send the message to the clockstats.
+ * We are waiting for the CONNECT response to the dial
+ * command. When this happens, listen for timecodes. If
+ * somthing other than CONNECT is received, like BUSY
+ * or NO CARRIER, abort the call.
*/
case S_CONNECT:
- report_event(PEVNT_CLOCK, peer, pp->a_lastcode);
- if (strcmp(tbuf, "CONNECT") != 0) {
- acts_disc(peer);
+ if (strcmp(tbuf, "CONNECT") != 0)
+ break;
+
+ report_event(PEVNT_CLOCK, peer, msg);
+ up->state = S_MSG;
+ up->timer = TIMECODE;
+ return;
+
+ /*
+ * We are waiting for a timecode response. Pass it to
+ * the parser. If NO CARRIER is received, save the
+ * messages and abort the call.
+ */
+ case S_MSG:
+ if (strcmp(tbuf, "NO") == 0)
+ report_event(PEVNT_CLOCK, peer, msg);
+ if (up->msgcnt < MAXCODE)
+ acts_timecode(peer, msg);
+ else
+ acts_timeout(peer, S_MSG);
+ return;
+ }
+
+ /*
+ * Other response. Tell us about it.
+ */
+ report_event(PEVNT_CLOCK, peer, msg);
+ acts_close(peer);
+}
+
+
+/*
+ * acts_timeout - called on timeout
+ */
+static void
+acts_timeout(
+ struct peer *peer,
+ teModemState dstate
+ )
+{
+ struct actsunit *up;
+ struct refclockproc *pp;
+ int fd;
+ int rc;
+ char device[20];
+ char lockfile[128], pidbuf[8];
+
+ /*
+ * The state machine is driven by messages from the modem,
+ * when first started and at timeout.
+ */
+ pp = peer->procptr;
+ up = pp->unitptr;
+ switch (dstate) {
+
+ /*
+ * System poll event. Lock the modem port, open the device
+ * and send the setup command.
+ */
+ case S_IDLE:
+ if (-1 != pp->io.fd)
+ return; /* port is already open */
+
+ /*
+ * Lock the modem port. If busy, retry later. Note: if
+ * something fails between here and the close, the lock
+ * file may not be removed.
+ */
+ if (pp->sloppyclockflag & CLK_FLAG2) {
+ snprintf(lockfile, sizeof(lockfile), LOCKFILE,
+ up->unit);
+ fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL,
+ 0644);
+ if (fd < 0) {
+ report_event(PEVNT_CLOCK, peer, "acts: port busy");
+ return;
+ }
+ snprintf(pidbuf, sizeof(pidbuf), "%d\n",
+ (u_int)getpid());
+ if (write(fd, pidbuf, strlen(pidbuf)) < 0)
+ msyslog(LOG_ERR, "acts: write lock fails %m");
+ close(fd);
+ }
+
+ /*
+ * Open the device in raw mode and link the I/O.
+ */
+ snprintf(device, sizeof(device), DEVICE,
+ up->unit);
+ fd = refclock_open(device, SPEED232, LDISC_ACTS |
+ LDISC_RAW | LDISC_REMOTE);
+ if (fd <= 0) {
+ msyslog(LOG_ERR, "acts: open fails %m");
+ return;
+ }
+ pp->io.fd = fd;
+ if (!io_addclock(&pp->io)) {
+ msyslog(LOG_ERR, "acts: addclock fails");
+ close(fd);
+ pp->io.fd = -1;
return;
}
- up->state = S_FIRST;
- up->timer = CONNECT;
+ up->msgcnt = 0;
+ up->bufptr = up->buf;
+
+ /*
+ * If the port is directly connected to the device, skip
+ * the modem business and send 'T' for Spectrabum.
+ */
+ if (sys_phone[up->retry] == NULL) {
+ if (write(pp->io.fd, "T", 1) < 0)
+ msyslog(LOG_ERR, "acts: write T fails %m");
+ up->state = S_MSG;
+ up->timer = TIMECODE;
+ return;
+ }
+
+ /*
+ * Initialize the modem. This works with Hayes-
+ * compatible modems.
+ */
+ mprintf_event(PEVNT_CLOCK, peer, "SETUP %s",
+ modem_setup);
+ rc = write(pp->io.fd, modem_setup, strlen(modem_setup));
+ if (rc < 0)
+ msyslog(LOG_ERR, "acts: write SETUP fails %m");
+ write(pp->io.fd, "\r", 1);
+ up->state = S_SETUP;
+ up->timer = SETUP;
return;
/*
- * We are waiting for a timecode. Pass it to the parser.
+ * In SETUP state the modem did not respond OK to setup string.
+ */
+ case S_SETUP:
+ report_event(PEVNT_CLOCK, peer, "no modem");
+ break;
+
+ /*
+ * In CONNECT state the call did not complete. Abort the call.
+ */
+ case S_CONNECT:
+ report_event(PEVNT_CLOCK, peer, "no answer");
+ break;
+
+ /*
+ * In MSG states no further timecodes are expected. If any
+ * timecodes have arrived, update the clock. In any case,
+ * terminate the call.
*/
- case S_FIRST:
case S_MSG:
- acts_timecode(peer, pp->a_lastcode);
+ if (up->msgcnt == 0) {
+ report_event(PEVNT_CLOCK, peer, "no timecodes");
+ } else {
+ pp->lastref = pp->lastrec;
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ refclock_receive(peer);
+ }
break;
}
+ acts_close(peer);
+}
+
+
+/*
+ * acts_close - close and prepare for next call.
+ *
+ * In ClOSE state no further protocol actions are required
+ * other than to close and release the device and prepare to
+ * dial the next number if necessary.
+ */
+void
+acts_close(
+ struct peer *peer
+ )
+{
+ struct actsunit *up;
+ struct refclockproc *pp;
+ char lockfile[128];
+ int dtr;
+
+ pp = peer->procptr;
+ up = pp->unitptr;
+ if (pp->io.fd != -1) {
+ report_event(PEVNT_CLOCK, peer, "close");
+ dtr = TIOCM_DTR;
+ if (ioctl(pp->io.fd, TIOCMBIC, &dtr) < 0)
+ msyslog(LOG_ERR, "acts: ioctl(TIOCMBIC) failed: %m");
+ io_closeclock(&pp->io);
+ pp->io.fd = -1;
+ }
+ if (pp->sloppyclockflag & CLK_FLAG2) {
+ snprintf(lockfile, sizeof(lockfile),
+ LOCKFILE, up->unit);
+ unlink(lockfile);
+ }
+ if (up->msgcnt == 0 && up->retry > 0) {
+ if (sys_phone[up->retry] != NULL) {
+ up->state = S_IDLE;
+ up->timer = REDIAL;
+ return;
+ }
+ }
+ up->state = S_IDLE;
+ up->timer = 0;
+}
+
+
+/*
+ * acts_poll - called by the transmit routine
+ */
+static void
+acts_poll(
+ int unit,
+ struct peer *peer
+ )
+{
+ struct actsunit *up;
+ struct refclockproc *pp;
+
+ /*
+ * This routine is called at every system poll. All it does is
+ * set flag1 under certain conditions. The real work is done by
+ * the timeout routine and state machine.
+ */
+ pp = peer->procptr;
+ up = pp->unitptr;
+ 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:
+ return;
+
+ /*
+ * In automatic mode the calling program runs continuously at
+ * intervals determined by the poll event or specified timeout.
+ */
+ case MODE_AUTO:
+ break;
+
+ /*
+ * In backup mode the calling program runs continuously as long
+ * as either no peers are available or this peer is selected.
+ */
+ case MODE_BACKUP:
+ if (!(sys_peer == NULL || sys_peer == peer))
+ return;
+
+ break;
+ }
+ pp->polls++;
+ if (S_IDLE == up->state) {
+ up->retry = 0;
+ acts_timeout(peer, S_IDLE);
+ }
+}
+
+
+/*
+ * acts_timer - called at one-second intervals
+ */
+static void
+acts_timer(
+ int unit,
+ struct peer *peer
+ )
+{
+ struct actsunit *up;
+ struct refclockproc *pp;
+
+ /*
+ * This routine implments a timeout which runs for a programmed
+ * interval. The counter is initialized by the state machine and
+ * counts down to zero. Upon reaching zero, the state machine is
+ * called. If flag1 is set while timer is zero, force a call.
+ */
+ pp = peer->procptr;
+ up = pp->unitptr;
+ if (up->timer == 0) {
+ if (pp->sloppyclockflag & CLK_FLAG1) {
+ pp->sloppyclockflag &= ~CLK_FLAG1;
+ acts_timeout(peer, S_IDLE);
+ }
+ } else {
+ up->timer--;
+ if (up->timer == 0)
+ acts_timeout(peer, up->state);
+ }
}
/*
@@ -427,8 +723,8 @@ acts_message(
*/
void
acts_timecode(
- struct peer *peer, /* peer structure pointer */
- char *str /* timecode string */
+ struct peer * peer, /* peer structure pointer */
+ const char * str /* timecode string */
)
{
struct actsunit *up;
@@ -450,7 +746,7 @@ acts_timecode(
char dstchar; /* WWVB daylight/savings indicator */
int tz; /* WWVB timezone */
- u_int leapmonth; /* PTB/NPL month of leap */
+ int leapmonth; /* PTB/NPL month of leap */
char leapdir; /* PTB/NPL leap direction */
/*
@@ -459,9 +755,9 @@ acts_timecode(
* errors due noise are forgivable.
*/
pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
+ up = pp->unitptr;
pp->nsec = 0;
- switch(strlen(str)) {
+ switch (strlen(str)) {
/*
* For USNO format on-time character '*', which is on a line by
@@ -474,8 +770,8 @@ acts_timecode(
return;
/*
- * ACTS format: "jjjjj yy-mm-dd hh:mm:ss ds l uuu aaaaa
- * UTC(NIST) *"
+ * ACTS format A: "jjjjj yy-mm-dd hh:mm:ss ds l uuu aaaaa
+ * UTC(NIST) *".
*/
case LENACTS:
if (sscanf(str,
@@ -486,25 +782,17 @@ acts_timecode(
refclock_report(peer, CEVNT_BADREPLY);
return;
}
-
- /*
- * Wait until ACTS has calculated the roundtrip delay.
- * We don't need to do anything, as ACTS adjusts the
- * on-time epoch.
- */
- if (flag != '#')
- return;
-
pp->day = ymd2yd(pp->year, month, day);
pp->leap = LEAP_NOWARNING;
if (leap == 1)
- pp->leap = LEAP_ADDSECOND;
- else if (pp->leap == 2)
- pp->leap = LEAP_DELSECOND;
+ pp->leap = LEAP_ADDSECOND;
+ else if (leap == 2)
+ pp->leap = LEAP_DELSECOND;
memcpy(&pp->refid, REFACTS, 4);
- if (up->msgcnt == 0)
- record_clock_stats(&peer->srcadr, str);
up->msgcnt++;
+ if (flag != '#' && up->msgcnt < 10)
+ return;
+
break;
/*
@@ -525,10 +813,8 @@ acts_timecode(
*/
pp->leap = LEAP_NOWARNING;
memcpy(&pp->refid, REFUSNO, 4);
- if (up->msgcnt == 0)
- record_clock_stats(&peer->srcadr, str);
up->msgcnt++;
- return;
+ break;
/*
* PTB/NPL format: "yyyy-mm-dd hh:mm:ss MEZ"
@@ -545,14 +831,12 @@ acts_timecode(
pp->leap = LEAP_NOWARNING;
if (leapmonth == month) {
if (leapdir == '+')
- pp->leap = LEAP_ADDSECOND;
+ pp->leap = LEAP_ADDSECOND;
else if (leapdir == '-')
- pp->leap = LEAP_DELSECOND;
+ pp->leap = LEAP_DELSECOND;
}
pp->day = ymd2yd(pp->year, month, day);
memcpy(&pp->refid, REFPTB, 4);
- if (up->msgcnt == 0)
- record_clock_stats(&peer->srcadr, str);
up->msgcnt++;
break;
@@ -571,8 +855,6 @@ acts_timecode(
if (synchar != ' ')
pp->leap = LEAP_NOTINSYNC;
memcpy(&pp->refid, REFWWVB, 4);
- if (up->msgcnt == 0)
- record_clock_stats(&peer->srcadr, str);
up->msgcnt++;
break;
@@ -594,8 +876,6 @@ acts_timecode(
else if (leapchar == 'L')
pp->leap = LEAP_ADDSECOND;
memcpy(&pp->refid, REFWWVB, 4);
- if (up->msgcnt == 0)
- record_clock_stats(&peer->srcadr, str);
up->msgcnt++;
break;
@@ -615,321 +895,16 @@ acts_timecode(
*/
peer->refid = pp->refid;
pp->lastrec = up->tstamp;
+ if (up->msgcnt == 0)
+ return;
+
+ strlcpy(pp->a_lastcode, str, sizeof(pp->a_lastcode));
+ pp->lencode = strlen(pp->a_lastcode);
if (!refclock_process(pp)) {
refclock_report(peer, CEVNT_BADTIME);
return;
}
pp->lastref = pp->lastrec;
- if (up->state != S_MSG) {
- up->state = S_MSG;
- up->timer = TIMECODE;
- }
-}
-
-
-/*
- * acts_poll - called by the transmit routine
- */
-static void
-acts_poll (
- int unit,
- struct peer *peer
- )
-{
- struct actsunit *up;
- struct refclockproc *pp;
-
- /*
- * This routine is called at every system poll. All it does is
- * set flag1 under certain conditions. The real work is done by
- * the timeout routine and state machine.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- 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:
- /* fall through */
- break;
-
- /*
- * In automatic mode the calling program runs continuously at
- * intervals determined by the poll event or specified timeout.
- */
- case MODE_AUTO:
- pp->sloppyclockflag |= CLK_FLAG1;
- break;
-
- /*
- * In backup mode the calling program runs continuously as long
- * as either no peers are available or this peer is selected.
- */
- case MODE_BACKUP:
- if (sys_peer == NULL || sys_peer == peer)
- pp->sloppyclockflag |= CLK_FLAG1;
- break;
- }
-}
-
-
-/*
- * acts_timer - called at one-second intervals
- */
-static void
-acts_timer(
- int unit,
- struct peer *peer
- )
-{
- struct actsunit *up;
- struct refclockproc *pp;
-
- /*
- * This routine implments a timeout which runs for a programmed
- * interval. The counter is initialized by the state machine and
- * counts down to zero. Upon reaching zero, the state machine is
- * called. If flag1 is set while in S_IDLE state, force a
- * timeout.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- if (pp->sloppyclockflag & CLK_FLAG1 && up->state == S_IDLE) {
- acts_timeout(peer);
- return;
- }
- if (up->timer == 0)
- return;
-
- up->timer--;
- if (up->timer == 0)
- acts_timeout(peer);
-}
-
-
-/*
- * acts_timeout - called on timeout
- */
-static void
-acts_timeout(
- struct peer *peer
- )
-{
- struct actsunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
- char lockfile[128], pidbuf[8];
- char tbuf[SMAX];
-
- /*
- * The state machine is driven by messages from the modem, when
- * first stated and at timeout.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- pp->sloppyclockflag &= ~CLK_FLAG1;
- if (sys_phone[up->retry] == NULL && !(pp->sloppyclockflag &
- CLK_FLAG3)) {
- msyslog(LOG_ERR, "acts: no phones");
- return;
- }
- switch(up->state) {
-
- /*
- * System poll event. Lock the modem port and open the device.
- */
- case S_IDLE:
-
- /*
- * Lock the modem port. If busy, retry later. Note: if
- * something fails between here and the close, the lock
- * file may not be removed.
- */
- if (pp->sloppyclockflag & CLK_FLAG2) {
- snprintf(lockfile, sizeof(lockfile), LOCKFILE,
- up->unit);
- fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL,
- 0644);
- if (fd < 0) {
- msyslog(LOG_ERR, "acts: port busy");
- return;
- }
- snprintf(pidbuf, sizeof(pidbuf), "%d\n",
- (u_int)getpid());
- write(fd, pidbuf, strlen(pidbuf));
- close(fd);
- }
-
- /*
- * Open the device in raw mode and link the I/O.
- */
- if (!pp->io.fd) {
- snprintf(device, sizeof(device), DEVICE,
- up->unit);
- fd = refclock_open(device, SPEED232,
- LDISC_ACTS | LDISC_RAW | LDISC_REMOTE);
- if (fd == 0) {
- msyslog(LOG_ERR,
- "acts: open fails");
- return;
- }
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- msyslog(LOG_ERR,
- "acts: addclock fails");
- close(fd);
- pp->io.fd = 0;
- return;
- }
- }
-
- /*
- * If the port is directly connected to the device, skip
- * the modem business and send 'T' for Spectrabum.
- */
- if (pp->sloppyclockflag & CLK_FLAG3) {
- if (write(pp->io.fd, "T", 1) < 0) {
- msyslog(LOG_ERR, "acts: write %m");
- return;
- }
- up->state = S_FIRST;
- up->timer = CONNECT;
- return;
- }
-
- /*
- * Initialize the modem. This works with Hayes commands.
- */
-#ifdef DEBUG
- if (debug)
- printf("acts: setup %s\n", MODEM_SETUP);
-#endif
- if (write(pp->io.fd, MODEM_SETUP, strlen(MODEM_SETUP)) <
- 0) {
- msyslog(LOG_ERR, "acts: write %m");
- return;
- }
- up->state = S_OK;
- up->timer = SETUP;
- return;
-
- /*
- * In OK state the modem did not respond to setup.
- */
- case S_OK:
- msyslog(LOG_ERR, "acts: no modem");
- break;
-
- /*
- * In DTR state we are waiting for the modem to settle down
- * before hammering it with a dial command.
- */
- case S_DTR:
- snprintf(tbuf, sizeof(tbuf), "DIAL #%d %s", up->retry,
- sys_phone[up->retry]);
- report_event(PEVNT_CLOCK, peer, tbuf);
-#ifdef DEBUG
- if (debug)
- printf("%s\n", tbuf);
-#endif
- write(pp->io.fd, sys_phone[up->retry],
- strlen(sys_phone[up->retry]));
- write(pp->io.fd, "\r", 1);
- up->state = S_CONNECT;
- up->timer = ANSWER;
- return;
-
- /*
- * In CONNECT state the call did not complete.
- */
- case S_CONNECT:
- msyslog(LOG_ERR, "acts: no answer");
- break;
-
- /*
- * In FIRST state no messages were received.
- */
- case S_FIRST:
- msyslog(LOG_ERR, "acts: no messages");
- break;
-
- /*
- * In CLOSE state hangup is complete. Close the doors and
- * windows and get some air.
- */
- case S_CLOSE:
-
- /*
- * Close the device and unlock a shared modem.
- */
- if (pp->io.fd) {
- io_closeclock(&pp->io);
- close(pp->io.fd);
- if (pp->sloppyclockflag & CLK_FLAG2) {
- snprintf(lockfile, sizeof(lockfile),
- LOCKFILE, up->unit);
- unlink(lockfile);
- }
- pp->io.fd = 0;
- }
-
- /*
- * If messages were received, fold the tent and wait for
- * the next poll. If no messages and there are more
- * numbers to dial, retry after a short wait.
- */
- up->bufptr = pp->a_lastcode;
- up->timer = 0;
- up->state = S_IDLE;
- if ( up->msgcnt == 0) {
- up->retry++;
- if (sys_phone[up->retry] == NULL)
- up->retry = 0;
- else
- up->timer = SETUP;
- } else {
- up->retry = 0;
- }
- up->msgcnt = 0;
- return;
- }
- acts_disc(peer);
-}
-
-
-/*
- * acts_disc - disconnect the call and clean the place up.
- */
-static void
-acts_disc (
- struct peer *peer
- )
-{
- struct actsunit *up;
- struct refclockproc *pp;
- int dtr = TIOCM_DTR;
-
- /*
- * We get here if the call terminated successfully or if an
- * error occured. If the median filter has something in it,
- * feed the data to the clock filter. If a modem port, drop DTR
- * to force command mode and send modem hangup.
- */
- pp = peer->procptr;
- up = (struct actsunit *)pp->unitptr;
- if (up->msgcnt > 0)
- refclock_receive(peer);
- if (!(pp->sloppyclockflag & CLK_FLAG3)) {
- ioctl(pp->io.fd, TIOCMBIC, (char *)&dtr);
- write(pp->io.fd, MODEM_HANGUP, strlen(MODEM_HANGUP));
- }
- up->timer = SETUP;
- up->state = S_CLOSE;
}
#else
int refclock_acts_bs;
diff --git a/ntpd/refclock_arbiter.c b/ntpd/refclock_arbiter.c
index 8e92c0fbffcf..738be508d586 100644
--- a/ntpd/refclock_arbiter.c
+++ b/ntpd/refclock_arbiter.c
@@ -163,17 +163,17 @@ arb_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd <= 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = arb_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -182,7 +182,7 @@ arb_start(
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -218,7 +218,7 @@ arb_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -245,10 +245,10 @@ arb_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
- temp = refclock_gtlin(rbufp, tbuf, BMAX, &trtmp);
+ up = pp->unitptr;
+ temp = refclock_gtlin(rbufp, tbuf, sizeof(tbuf), &trtmp);
/*
* Note we get a buffer and timestamp for both a <cr> and <lf>,
@@ -289,7 +289,8 @@ arb_receive(
return;
} else if (!strncmp(tbuf, "SR", 2)) {
- strcpy(up->status, tbuf + 2);
+ strlcpy(up->status, tbuf + 2,
+ sizeof(up->status));
if (pp->sloppyclockflag & CLK_FLAG4)
write(pp->io.fd, "LA", 2);
else
@@ -297,25 +298,25 @@ arb_receive(
return;
} else if (!strncmp(tbuf, "LA", 2)) {
- strcpy(up->latlon, tbuf + 2);
+ strlcpy(up->latlon, tbuf + 2, sizeof(up->latlon));
write(pp->io.fd, "LO", 2);
return;
} else if (!strncmp(tbuf, "LO", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, tbuf + 2);
+ strlcat(up->latlon, " ", sizeof(up->latlon));
+ strlcat(up->latlon, tbuf + 2, sizeof(up->latlon));
write(pp->io.fd, "LH", 2);
return;
} else if (!strncmp(tbuf, "LH", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, tbuf + 2);
+ strlcat(up->latlon, " ", sizeof(up->latlon));
+ strlcat(up->latlon, tbuf + 2, sizeof(up->latlon));
write(pp->io.fd, "DB", 2);
return;
} else if (!strncmp(tbuf, "DB", 2)) {
- strcat(up->latlon, " ");
- strcat(up->latlon, tbuf + 2);
+ strlcat(up->latlon, " ", sizeof(up->latlon));
+ strlcat(up->latlon, tbuf + 2, sizeof(up->latlon));
record_clock_stats(&peer->srcadr, up->latlon);
#ifdef DEBUG
if (debug)
@@ -341,9 +342,9 @@ arb_receive(
/*
* Timecode format B5: "i yy ddd hh:mm:ss.000 "
*/
- strncpy(pp->a_lastcode, tbuf, BMAX);
+ strlcpy(pp->a_lastcode, tbuf, sizeof(pp->a_lastcode));
pp->a_lastcode[LENARB - 2] = up->qualchar;
- strcat(pp->a_lastcode, up->status);
+ strlcat(pp->a_lastcode, up->status, sizeof(pp->a_lastcode));
pp->lencode = strlen(pp->a_lastcode);
syncchar = ' ';
if (sscanf(pp->a_lastcode, "%c%2d %3d %2d:%2d:%2d",
@@ -450,7 +451,7 @@ arb_poll(
* need poll the clock; all others just listen in.
*/
pp = peer->procptr;
- up = (struct arbunit *)pp->unitptr;
+ up = pp->unitptr;
pp->polls++;
up->tcswitch = 0;
if (write(pp->io.fd, "TQ", 2) != 2)
diff --git a/ntpd/refclock_arc.c b/ntpd/refclock_arc.c
index c6ac8c7ee74b..b2c063e432ec 100644
--- a/ntpd/refclock_arc.c
+++ b/ntpd/refclock_arc.c
@@ -6,6 +6,8 @@
#include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_ARCRON_MSF)
static const char arc_version[] = { "V1.3 2003/02/21" };
@@ -402,7 +404,7 @@ Also note h<cr> command which starts a resync to MSF signal.
(BITSPERCHAR * BITTIME) ) )
/* Allow for UART to accept char half-way through final stop bit. */
-#define INITIALOFFSET (u_int32)(-BITTIME/2)
+#define INITIALOFFSET ((u_int32)(-BITTIME/2))
/*
charoffsets[x] is the time after the start of the second that byte
@@ -560,7 +562,7 @@ struct refclock refclock_arc = {
/* Queue us up for the next tick. */
#define ENQUEUE(up) \
do { \
- peer->nextaction = current_time + QUEUETICK; \
+ peer->procptr->nextaction = current_time + QUEUETICK; \
} while(0)
/* Placeholder event handler---does nothing safely---soaks up loose tick. */
@@ -649,7 +651,7 @@ arc_start(
DPRINTF(1, ("arc: unit %d using tty_open().\n", unit));
fd = tty_open(device, OPEN_FLAGS, 0777);
if (fd < 0) {
- msyslog(LOG_ERR, "MSF_ARCRON(%d): failed second open(%s, 0777): %m.\n",
+ msyslog(LOG_ERR, "MSF_ARCRON(%d): failed second open(%s, 0777): %m.",
unit, device);
close(temp_fd);
return 0;
@@ -658,14 +660,17 @@ arc_start(
temp_fd = -1;
#ifndef SYS_WINNT
- fcntl(fd, F_SETFL, 0); /* clear the descriptor flags */
+ if (-1 == fcntl(fd, F_SETFL, 0)) /* clear the descriptor flags */
+ msyslog(LOG_ERR, "MSF_ARCRON(%d): fcntl(F_SETFL, 0): %m.",
+ unit);
+
#endif
DPRINTF(1, ("arc: opened RS232 port with file descriptor %d.\n", fd));
#ifdef HAVE_TERMIOS
if (tcgetattr(fd, &arg) < 0) {
- msyslog(LOG_ERR, "MSF_ARCRON(%d): tcgetattr(%s): %m.\n",
+ msyslog(LOG_ERR, "MSF_ARCRON(%d): tcgetattr(%s): %m.",
unit, device);
close(fd);
return 0;
@@ -679,7 +684,7 @@ arc_start(
arg.c_cc[VTIME] = 0;
if (tcsetattr(fd, TCSANOW, &arg) < 0) {
- msyslog(LOG_ERR, "MSF_ARCRON(%d): tcsetattr(%s): %m.\n",
+ msyslog(LOG_ERR, "MSF_ARCRON(%d): tcsetattr(%s): %m.",
unit, device);
close(fd);
return 0;
@@ -698,7 +703,7 @@ arc_start(
up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = arc_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -755,7 +760,7 @@ arc_start(
up->quality = MIN_CLOCK_QUALITY;/* Don't trust the clock yet. */
#endif
- peer->action = arc_event_handler;
+ peer->procptr->action = arc_event_handler;
ENQUEUE(up);
@@ -775,7 +780,7 @@ arc_shutdown(
register struct arcunit *up;
struct refclockproc *pp;
- peer->action = dummy_event_handler;
+ peer->procptr->action = dummy_event_handler;
pp = peer->procptr;
up = pp->unitptr;
@@ -878,7 +883,7 @@ arc_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
up = pp->unitptr;
@@ -1003,7 +1008,7 @@ arc_receive(
diff = up->lastrec;
L_SUB(&diff, &timestamp);
printf("arc: adjusted timestamp by -%sms.\n",
- mfptoms(diff.l_i, diff.l_f, 3));
+ mfptoms(diff.l_ui, diff.l_uf, 3));
}
#endif
}
@@ -1578,5 +1583,5 @@ arc_poll(
}
#else
-int refclock_arc_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif
diff --git a/ntpd/refclock_as2201.c b/ntpd/refclock_as2201.c
index 163c2afee1a2..1acf9b208cfa 100644
--- a/ntpd/refclock_as2201.c
+++ b/ntpd/refclock_as2201.c
@@ -166,17 +166,17 @@ as2201_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
- if (!(fd = refclock_open(gpsdev, SPEED232, LDISC_CLK)))
+ fd = refclock_open(gpsdev, SPEED232, LDISC_CLK);
+ if (fd <= 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = as2201_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -185,13 +185,12 @@ as2201_start(
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
up->lastptr = up->stats;
@@ -213,7 +212,7 @@ as2201_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct as2201unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -233,13 +232,14 @@ as2201_receive(
struct refclockproc *pp;
struct peer *peer;
l_fp trtmp;
+ size_t octets;
/*
* Initialize pointers and read the timecode and timestamp.
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct as2201unit *)pp->unitptr;
+ up = pp->unitptr;
pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
#ifdef DEBUG
if (debug)
@@ -267,7 +267,7 @@ as2201_receive(
if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
return;
*up->lastptr++ = ' ';
- (void)strcpy(up->lastptr, pp->a_lastcode);
+ memcpy(up->lastptr, pp->a_lastcode, 1 + pp->lencode);
up->lastptr += pp->lencode;
return;
} else {
@@ -328,13 +328,17 @@ as2201_receive(
* send the next command. If not, simply write the timecode to
* the clockstats file.
*/
- (void)strcpy(up->lastptr, pp->a_lastcode);
+ if ((int)(up->lastptr - up->stats + pp->lencode) > SMAX - 2)
+ return;
+ memcpy(up->lastptr, pp->a_lastcode, pp->lencode);
up->lastptr += pp->lencode;
if (pp->sloppyclockflag & CLK_FLAG4) {
+ octets = strlen(stat_command[up->index]);
+ if ((int)(up->lastptr - up->stats + 1 + octets) > SMAX - 2)
+ return;
*up->lastptr++ = ' ';
- (void)strcpy(up->lastptr, stat_command[up->index]);
- up->lastptr += strlen(stat_command[up->index]);
- up->lastptr--;
+ memcpy(up->lastptr, stat_command[up->index], octets);
+ up->lastptr += octets - 1;
*up->lastptr = '\0';
(void)write(pp->io.fd, stat_command[up->index],
strlen(stat_command[up->index]));
@@ -372,14 +376,11 @@ as2201_poll(
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
diff --git a/ntpd/refclock_atom.c b/ntpd/refclock_atom.c
index d8a9d3e27add..b3c0d6b46ab0 100644
--- a/ntpd/refclock_atom.c
+++ b/ntpd/refclock_atom.c
@@ -134,7 +134,7 @@ atom_start(
memcpy((char *)&pp->refid, REFID, 4);
up = emalloc(sizeof(struct ppsunit));
memset(up, 0, sizeof(struct ppsunit));
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Open PPS device. This can be any serial or parallel port and
@@ -168,7 +168,7 @@ atom_shutdown(
struct ppsunit *up;
pp = peer->procptr;
- up = (struct ppsunit *)pp->unitptr;
+ up = pp->unitptr;
if (up->fddev > 0)
close(up->fddev);
free(up);
@@ -188,7 +188,7 @@ atom_timer(
char tbuf[80];
pp = peer->procptr;
- up = (struct ppsunit *)pp->unitptr;
+ up = pp->unitptr;
if (refclock_pps(peer, &up->atom, pp->sloppyclockflag) <= 0)
return;
diff --git a/ntpd/refclock_bancomm.c b/ntpd/refclock_bancomm.c
index 3bb0ffea430a..49922e39345c 100644
--- a/ntpd/refclock_bancomm.c
+++ b/ntpd/refclock_bancomm.c
@@ -146,11 +146,6 @@ typedef void *SYMMT_PCI_HANDLE;
extern u_long current_time; /* current time(s) */
/*
- * Imported from ntpd module
- */
-extern volatile 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
@@ -266,21 +261,21 @@ vme_start(
/*
* Allocate unit structure
*/
- vme = (struct vmeunit *)emalloc(sizeof(struct vmeunit));
- bzero((char *)vme, sizeof(struct vmeunit));
+ vme = emalloc_zero(sizeof(struct vmeunit));
/*
* Set up the structures
*/
pp = peer->procptr;
- pp->unitptr = (caddr_t) vme;
+ pp->unitptr = vme;
pp->timestarted = current_time;
pp->io.clock_recv = vme_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd_vme;
+ /* shouldn't there be an io_addclock() call? */
/*
* All done. Initialize a few random peer variables, then
@@ -309,7 +304,7 @@ vme_shutdown(
* Tell the I/O module to turn us off. We're history.
*/
pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr;
+ vme = pp->unitptr;
io_closeclock(&pp->io);
pp->unitptr = NULL;
if (NULL != vme)
@@ -349,7 +344,7 @@ vme_poll(
struct tm *tadr;
pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr; /* Here is the structure */
+ vme = pp->unitptr; /* Here is the structure */
tptr = &vme->vmedata;
if ((tptr = get_datumtime(tptr)) == NULL ) {
@@ -454,7 +449,7 @@ get_datumtime(struct vmedate *time_vme)
* the time.
*/
if(ioctl (fd_vme, SELTIMEFORMAT, TIME_DECIMAL)){
- msyslog(LOG_ERR, "Could not set time format\n");
+ msyslog(LOG_ERR, "Could not set time format");
return (NULL);
}
/* read the time */
diff --git a/ntpd/refclock_chronolog.c b/ntpd/refclock_chronolog.c
index ba4f60b4ed62..ee54b43a6126 100644
--- a/ntpd/refclock_chronolog.c
+++ b/ntpd/refclock_chronolog.c
@@ -109,18 +109,18 @@ chronolog_start(
if (debug)
printf ("starting Chronolog with device %s\n",device);
#endif
- if (!(fd = refclock_open(device, SPEED232, 0)))
+ fd = refclock_open(device, SPEED232, 0);
+ if (fd <= 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = chronolog_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -154,7 +154,7 @@ chronolog_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -184,9 +184,9 @@ chronolog_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
+ up = pp->unitptr;
temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
if (temp == 0) {
@@ -297,7 +297,7 @@ chronolog_receive(
pp->lastref = pp->lastrec;
refclock_receive(peer);
record_clock_stats(&peer->srcadr, pp->a_lastcode);
- up->lasthour = pp->hour;
+ up->lasthour = (u_char)pp->hour;
}
@@ -324,7 +324,7 @@ chronolog_poll(
char pollchar;
pp = peer->procptr;
- up = (struct chronolog_unit *)pp->unitptr;
+ up = pp->unitptr;
if (peer->burst == 0 && peer->reach == 0)
refclock_report(peer, CEVNT_TIMEOUT);
if (up->linect > 0)
diff --git a/ntpd/refclock_chu.c b/ntpd/refclock_chu.c
index ca14dc600fb4..9c7093d2c212 100644
--- a/ntpd/refclock_chu.c
+++ b/ntpd/refclock_chu.c
@@ -5,6 +5,8 @@
#include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_CHU)
#include "ntpd.h"
@@ -242,7 +244,7 @@
*/
#define CHAR (11. / 300.) /* character time (s) */
#define BURST 11 /* max characters per burst */
-#define MINCHAR 9 /* min characters per burst */
+#define MINCHARS 9 /* min characters per burst */
#define MINDIST 28 /* min burst distance (of 40) */
#define MINSYNC 8 /* min sync distance (of 16) */
#define MINSTAMP 20 /* min timestamps (of 60) */
@@ -478,15 +480,16 @@ chu_start(
* Open audio device. Don't complain if not there.
*/
fd_audio = audio_init(DEVICE_AUDIO, AUDIO_BUFSIZ, unit);
+
#ifdef DEBUG
- if (fd_audio > 0 && debug)
+ if (fd_audio >= 0 && debug)
audio_show();
#endif
/*
* If audio is unavailable, Open serial port in raw mode.
*/
- if (fd_audio > 0) {
+ if (fd_audio >= 0) {
fd = fd_audio;
} else {
snprintf(device, sizeof(device), DEVICE, unit);
@@ -500,18 +503,18 @@ chu_start(
snprintf(device, sizeof(device), DEVICE, unit);
fd = refclock_open(device, SPEED232, LDISC_RAW);
#endif /* HAVE_AUDIO */
- if (fd <= 0)
+
+ if (fd < 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = chu_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -527,7 +530,7 @@ chu_start(
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- strcpy(up->ident, "CHU");
+ strlcpy(up->ident, "CHU", sizeof(up->ident));
memcpy(&pp->refid, up->ident, 4);
DTOLFP(CHAR, &up->charstamp);
#ifdef HAVE_AUDIO
@@ -592,7 +595,7 @@ chu_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
if (up == NULL)
return;
@@ -618,9 +621,9 @@ chu_receive(
struct refclockproc *pp;
struct peer *peer;
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* If the audio codec is warmed up, the buffer contains codec
@@ -658,9 +661,9 @@ chu_audio_receive(
int bufcnt; /* buffer counter */
l_fp ltemp; /* l_fp temp */
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Main loop - read until there ain't no more. Note codec
@@ -745,7 +748,7 @@ chu_rf(
int i, j;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Bandpass filter. 4th-order elliptic, 500-Hz bandpass centered
@@ -970,9 +973,9 @@ chu_serial_receive(
u_char *dpt; /* receive buffer pointer */
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
dpt = (u_char *)&rbufp->recv_space;
chu_decode(peer, *dpt, rbufp->recv_time);
@@ -996,7 +999,7 @@ chu_decode(
double dtemp;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* If the interval since the last character is greater than the
@@ -1044,7 +1047,7 @@ chu_burst(
int i;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Correlate a block of five characters with the next block of
@@ -1052,7 +1055,7 @@ chu_burst(
* of bits that match in the two blocks for format A and that
* match the inverse for format B.
*/
- if (up->ndx < MINCHAR) {
+ if (up->ndx < MINCHARS) {
up->status |= RUNT;
return;
}
@@ -1107,7 +1110,7 @@ chu_b(
int i;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* In a format B burst, a character is considered valid only if
@@ -1183,7 +1186,7 @@ chu_a(
int i, j, k;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Determine correct burst phase. There are three cases
@@ -1259,7 +1262,7 @@ chu_a(
up->status |= AVALID;
up->second = pp->second = 30 + temp;
offset.l_ui = 30 + temp;
- offset.l_f = 0;
+ offset.l_uf = 0;
i = 0;
if (k < 0)
offset = up->charstamp;
@@ -1334,7 +1337,7 @@ chu_second(
double dtemp;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* This routine is called once per minute to process the
@@ -1441,7 +1444,7 @@ chu_major(
int i, j, k;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Majority decoder. Each burst encodes two replications at each
@@ -1502,7 +1505,7 @@ chu_clear(
int i, j;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Clear stuff for the minute.
@@ -1535,7 +1538,7 @@ chu_newchan(
int i;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* The radio can be tuned to three channels: 0 (3330 kHz), 1
@@ -1653,7 +1656,7 @@ chu_gain(
struct chuunit *up;
pp = peer->procptr;
- up = (struct chuunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Apparently, the codec uses only the high order bits of the
@@ -1676,5 +1679,5 @@ chu_gain(
#else
-int refclock_chu_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/ntpd/refclock_conf.c b/ntpd/refclock_conf.c
index 845e913f77c0..30cc632065c8 100644
--- a/ntpd/refclock_conf.c
+++ b/ntpd/refclock_conf.c
@@ -24,12 +24,6 @@ extern struct refclock refclock_local;
#define refclock_local refclock_none
#endif
-#if 0 && 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
@@ -258,6 +252,17 @@ extern struct refclock refclock_neoclock4x;
#define refclock_neoclock4x refclock_none
#endif
+#ifdef CLOCK_TSYNCPCI
+extern struct refclock refclock_tsyncpci;
+#else
+#define refclock_tsyncpci refclock_none
+#endif
+
+#if defined(CLOCK_GPSDJSON) && !defined(SYS_WINNT)
+extern struct refclock refclock_gpsdjson;
+#else
+#define refclock_gpsdjson refclock_none
+#endif
/*
* Order is clock_start(), clock_shutdown(), clock_poll(),
* clock_control(), clock_init(), clock_buginfo, clock_flags;
@@ -309,7 +314,9 @@ struct refclock * const refclock_conf[] = {
&refclock_tt560, /* 41 REFCLK_TT560 */
&refclock_zyfer, /* 42 REFCLK_ZYFER */
&refclock_ripencc, /* 43 REFCLK_RIPENCC */
- &refclock_neoclock4x /* 44 REFCLK_NEOCLOCK4X */
+ &refclock_neoclock4x, /* 44 REFCLK_NEOCLOCK4X */
+ &refclock_tsyncpci, /* 45 REFCLK_TSYNCPCI */
+ &refclock_gpsdjson /* 46 REFCLK_GPSDJSON */
};
u_char num_refclock_conf = sizeof(refclock_conf)/sizeof(struct refclock *);
diff --git a/ntpd/refclock_datum.c b/ntpd/refclock_datum.c
index 247d7da4acf5..95f13a8c0ca1 100644
--- a/ntpd/refclock_datum.c
+++ b/ntpd/refclock_datum.c
@@ -11,6 +11,8 @@
# include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_DATUM)
/*
@@ -19,29 +21,16 @@
#include "ntpd.h"
#include "ntp_io.h"
+#include "ntp_tty.h"
#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
+#include "timevalops.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"
@@ -139,7 +128,6 @@
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 */
@@ -166,8 +154,6 @@ struct datum_pts_unit {
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.
@@ -176,8 +162,8 @@ static struct datum_pts_unit
static int datum_pts_start (int, struct peer *);
static void datum_pts_shutdown (int, struct peer *);
static void datum_pts_poll (int, struct peer *);
-static void datum_pts_control (int, struct refclockstat *,
- struct refclockstat *, struct peer *);
+static void datum_pts_control (int, const struct refclockstat *,
+ struct refclockstat *, struct peer *);
static void datum_pts_init (void);
static void datum_pts_buginfo (int, struct refclockbug *, struct peer *);
@@ -232,10 +218,11 @@ datum_pts_start(
struct peer *peer
)
{
- struct datum_pts_unit **temp_datum_pts_unit;
+ struct refclockproc *pp;
struct datum_pts_unit *datum_pts;
int fd;
#ifdef HAVE_TERMIOS
+ int rc;
struct termios arg;
#endif
@@ -257,24 +244,16 @@ datum_pts_start(
/*
** Create the memory for the new unit
*/
-
- temp_datum_pts_unit = (struct datum_pts_unit **)
- emalloc((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 *)
- emalloc(sizeof(struct datum_pts_unit));
- datum_pts = datum_pts_unit[nunits];
-
+ datum_pts = emalloc_zero(sizeof(*datum_pts));
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 */
datum_pts->PTS_fd = fd;
- fcntl(datum_pts->PTS_fd, F_SETFL, 0); /* clear the descriptor flags */
+ if (-1 == fcntl(datum_pts->PTS_fd, F_SETFL, 0)) /* clear the descriptor flags */
+ msyslog(LOG_ERR, "MSF_ARCRON(%d): fcntl(F_SETFL, 0): %m.",
+ unit);
#ifdef DEBUG_DATUM_PTC
if (debug)
@@ -290,8 +269,6 @@ datum_pts_start(
** ntp folks so that it can become part of their regular distribution.
*/
-#ifdef HAVE_TERMIOS
-
memset(&arg, 0, sizeof(arg));
arg.c_iflag = IGNBRK;
@@ -301,43 +278,39 @@ datum_pts_start(
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
+ rc = tcsetattr(datum_pts->PTS_fd, TCSANOW, &arg);
+ if (rc < 0) {
+ msyslog(LOG_ERR, "Datum_PTS: tcsetattr(\"%s\") failed: %m", DATUM_DEV);
+ close(datum_pts->PTS_fd);
+ free(datum_pts);
+ return 0;
+ }
/*
** 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))) {
-
+ pp = peer->procptr;
+ pp->io.clock_recv = datum_pts_receive;
+ pp->io.srcclock = peer;
+ pp->io.datalen = 0;
+ pp->io.fd = datum_pts->PTS_fd;
+
+ if (!io_addclock(&pp->io)) {
+ pp->io.fd = -1;
#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);
+ close(datum_pts->PTS_fd);
+ free(datum_pts);
return 0;
}
+ peer->procptr->unitptr = datum_pts;
/*
** Now add one to the number of units and return a successful code
@@ -360,8 +333,8 @@ datum_pts_shutdown(
struct peer *peer
)
{
- int i,j;
- struct datum_pts_unit **temp_datum_pts_unit;
+ struct refclockproc *pp;
+ struct datum_pts_unit *datum_pts;
#ifdef DEBUG_DATUM_PTC
if (debug)
@@ -371,64 +344,18 @@ datum_pts_shutdown(
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.
+ ** We found the unit so close the file descriptor and free up the memory used
+ ** by the structure.
*/
-
- 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 **)
- emalloc((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;
-
- }
+ pp = peer->procptr;
+ datum_pts = pp->unitptr;
+ if (NULL != datum_pts) {
+ io_closeclock(&pp->io);
+ free(datum_pts);
}
-
-#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 */
@@ -441,11 +368,11 @@ datum_pts_poll(
struct peer *peer
)
{
- int i;
- int unit_index;
int error_code;
struct datum_pts_unit *datum_pts;
+ datum_pts = peer->procptr->unitptr;
+
#ifdef DEBUG_DATUM_PTC
if (debug)
printf("Poll Datum PTS\n");
@@ -454,35 +381,10 @@ datum_pts_poll(
/*
** 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;
-
- }
-
+ error_code = write(datum_pts->PTS_fd, TIME_REQUEST, 6);
+ if (error_code != 6)
+ perror("TIME_REQUEST");
+ datum_pts->nbytes = 0;
}
@@ -493,7 +395,7 @@ datum_pts_poll(
static void
datum_pts_control(
int unit,
- struct refclockstat *in,
+ const struct refclockstat *in,
struct refclockstat *out,
struct peer *peer
)
@@ -544,7 +446,6 @@ datum_pts_init(void)
** NULL since there are no units defined yet.
*/
- datum_pts_unit = NULL;
nunits = 0;
}
@@ -586,6 +487,7 @@ datum_pts_receive(
{
int i;
l_fp tstmp;
+ struct peer *p;
struct datum_pts_unit *datum_pts;
char *dpt;
int dpend;
@@ -602,13 +504,14 @@ datum_pts_receive(
** Get the time code (maybe partial) message out of the rbufp buffer.
*/
- datum_pts = (struct datum_pts_unit *)rbufp->recv_srcclock;
+ p = rbufp->recv_peer;
+ datum_pts = p->procptr->unitptr;
dpt = (char *)&rbufp->recv_space;
dpend = rbufp->recv_length;
#ifdef DEBUG_DATUM_PTC
if (debug)
- printf("Receive Datum PTS: %d bytes\n", dpend);
+ printf("Receive Datum PTS: %d bytes\n", dpend);
#endif
/* */
@@ -875,5 +778,5 @@ datum_pts_receive(
}
#else
-int refclock_datum_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/ntpd/refclock_dumbclock.c b/ntpd/refclock_dumbclock.c
index f300ac9bc5a1..89f0f4748413 100644
--- a/ntpd/refclock_dumbclock.c
+++ b/ntpd/refclock_dumbclock.c
@@ -121,18 +121,17 @@ dumbclock_start(
printf ("starting Dumbclock with device %s\n",device);
#endif
fd = refclock_open(device, SPEED232, 0);
- if (!fd)
+ if (fd <= 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = dumbclock_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -178,7 +177,7 @@ dumbclock_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -208,9 +207,9 @@ dumbclock_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
+ up = pp->unitptr;
temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
if (temp == 0) {
@@ -364,7 +363,7 @@ dumbclock_poll(
*/
#if 0
pp = peer->procptr;
- up = (struct dumbclock_unit *)pp->unitptr;
+ up = pp->unitptr;
if (peer->reach == 0)
refclock_report(peer, CEVNT_TIMEOUT);
if (up->linect > 0)
diff --git a/ntpd/refclock_fg.c b/ntpd/refclock_fg.c
index 5f2ca4b66617..d5915da3b5e7 100644
--- a/ntpd/refclock_fg.c
+++ b/ntpd/refclock_fg.c
@@ -37,16 +37,16 @@ static int fg_init (int);
static int fg_start (int, struct peer *);
static void fg_shutdown (int, struct peer *);
static void fg_poll (int, struct peer *);
-static void fg_receive (struct recvbuf *);
+static void fg_receive (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 */
+ int pollnum; /* Use peer.poll instead? */
+ int status; /* Hug to check status information on GPS */
+ int y2kwarn; /* Y2K bug */
};
/*
@@ -61,13 +61,13 @@ static char fgdate[] = { 0x10, 0x44, 0x10, 0x0D, 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_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 */
};
/*
@@ -76,14 +76,13 @@ struct refclock refclock_fg = {
static int
fg_init(
- int fd
- )
+ int fd
+ )
{
if (write(fd, fginit, LENFG) != LENFG)
- return 0;
-
- return (1);
+ return 0;
+ return 1;
}
/*
@@ -91,7 +90,7 @@ fg_init(
*/
static int
fg_start(
- int unit,
+ int unit,
struct peer *peer
)
{
@@ -104,35 +103,31 @@ fg_start(
/*
* Open device file for reading.
*/
- (void)sprintf(device, DEVICE, unit);
+ snprintf(device, sizeof(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);
+ DPRINTF(1, ("starting FG with device %s\n",device));
+
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd <= 0)
+ 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));
+ /*
+ * Allocate and initialize unit structure
+ */
+
+ up = emalloc(sizeof(struct fgunit));
+ memset(up, 0, sizeof(struct fgunit));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = fg_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
- (void) close(fd);
- return (0);
- }
+ close(fd);
+ pp->io.fd = -1;
+ return 0;
+ }
/*
@@ -140,13 +135,13 @@ fg_start(
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 3);
+ memcpy(&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);
@@ -167,9 +162,11 @@ fg_shutdown(
struct fgunit *up;
pp = peer->procptr;
- up = (struct fgunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
+ up = pp->unitptr;
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
+ if (up != NULL)
+ free(up);
}
@@ -186,30 +183,26 @@ fg_poll(
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.
- */
+ /*
+ * 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++;
+ refclock_report(peer, CEVNT_FAULT);
+ else
+ pp->polls++;
- if (peer->burst > 0)
- return;
/*
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
+ if (pp->coderecv == pp->codeproc) {
+ refclock_report(peer, CEVNT_TIMEOUT);
+ return;
+ }
*/
- peer->burst = NSTAGE;
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
return;
@@ -220,36 +213,34 @@ fg_poll(
*/
static void
fg_receive(
- struct recvbuf *rbufp
- )
+ struct recvbuf *rbufp
+ )
{
- struct refclockproc *pp;
+ struct refclockproc *pp;
struct fgunit *up;
- struct peer *peer;
+ struct peer *peer;
char *bpt;
- /*
- * Initialize pointers and read the timecode and timestamp
+ /*
+ * 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;
+ peer = rbufp->recv_peer;
+ pp = peer->procptr;
+ up = pp->unitptr;
/*
- * Below hug to implement receiving of status information
- */
- if(!up->pollnum)
- {
+ * Below hug to implement receiving of status information
+ */
+ if(!up->pollnum) {
up->pollnum++;
return;
}
- if (rbufp->recv_length < (LENFG-2))
- {
+ if (rbufp->recv_length < (LENFG - 2)) {
refclock_report(peer, CEVNT_BADREPLY);
- return; /* The reply is invalid discard it. */
+ return; /* The reply is invalid discard it. */
}
/* Below I trying to find a correct reply in buffer.
@@ -258,30 +249,29 @@ fg_receive(
*/
bpt = (char *)rbufp->recv_space.X_recv_buffer;
- while(*bpt != '')
+ while (*bpt != '\x10')
bpt++;
#define BP2(x) ( bpt[x] & 15 )
#define BP1(x) (( bpt[x] & 240 ) >> 4)
- pp->year = BP1(2)*10 + BP2(2);
+ pp->year = BP1(2) * 10 + BP2(2);
- if(pp->year == 94)
- {
+ if (pp->year == 94) {
refclock_report(peer, CEVNT_BADREPLY);
- if(!fg_init(pp->io.fd))
+ if (!fg_init(pp->io.fd))
refclock_report(peer, CEVNT_FAULT);
- return;
+ 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 += 100;
- pp->year += 1900;
- pp->day = 100 * BP2(3) + 10 * BP1(4) + BP2(4);
+ 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
@@ -290,51 +280,51 @@ fg_receive(
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);
+ 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;
+ 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;
+ 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))
- {
+
+ 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);
+ snprintf(pp->a_lastcode, sizeof(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);*/
+ /*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);
+ if (debug)
+ printf("fg: time is %04d/%03d %02d:%02d:%02d UTC\n",
+ pp->year, pp->day, pp->hour, pp->minute, pp->second);
#endif
- pp->disp = (10e-6);
+ 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.
- */
+ /*
+ * 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;
+ if (!refclock_process(pp))
+ refclock_report(peer, CEVNT_BADTIME);
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
return;
}
diff --git a/ntpd/refclock_gpsdjson.c b/ntpd/refclock_gpsdjson.c
new file mode 100644
index 000000000000..615098271e3b
--- /dev/null
+++ b/ntpd/refclock_gpsdjson.c
@@ -0,0 +1,1341 @@
+/*
+ * refclock_gpsdjson.c - clock driver as GPSD JSON client
+ * Juergen Perlinger (perlinger@ntp.org)
+ * Feb 11, 2014 for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * Heavily inspired by refclock_nmea.c
+ *
+ * Note: This will currently NOT work with Windows due to some
+ * limitations:
+ *
+ * - There is no GPSD for Windows. (There is an unofficial port to
+ * cygwin, but Windows is not officially supported.)
+ *
+ * - To work properly, this driver needs PPS and TPV sentences from
+ * GPSD. I don't see how the cygwin port should deal with that.
+ *
+ * - The device name matching must be done in a different way for
+ * Windows. (Can be done with COMxx matching, as done for NMEA.)
+ *
+ * Apart from those minor hickups, once GPSD has been fully ported to
+ * Windows, there's no reason why this should not work there ;-)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ntp_types.h"
+
+#if defined(REFCLOCK) && defined(CLOCK_GPSDJSON) && !defined(SYS_WINNT)
+
+/* =====================================================================
+ * get the little JSMN library directly into our guts
+ */
+#include "../libjsmn/jsmn.c"
+
+/* =====================================================================
+ * header stuff we need
+ */
+
+#include <netdb.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <netinet/tcp.h>
+
+#if defined(HAVE_SYS_POLL_H)
+# include <sys/poll.h>
+#elif defined(HAVE_SYS_SLECET_H)
+# include <sys/select.h>
+#else
+# error need poll() or select()
+#endif
+
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+#include "timespecops.h"
+
+#define PRECISION (-9) /* precision assumed (about 2 ms) */
+#define PPS_PRECISION (-20) /* precision assumed (about 1 us) */
+#define REFID "GPSD" /* reference id */
+#define DESCRIPTION "GPSD JSON client clock" /* who we are */
+
+#define MAX_PDU_LEN 1600
+#define TICKOVER_LOW 10
+#define TICKOVER_HIGH 120
+#define LOGTHROTTLE 3600
+
+#define PPS_MAXCOUNT 30
+#define PPS_HIWAT 20
+#define PPS_LOWAT 10
+
+#ifndef BOOL
+# define BOOL int
+#endif
+#ifndef TRUE
+# define TRUE 1
+#endif
+#ifndef FALSE
+# define FALSE 0
+#endif
+
+/* some local typedefs : The NTPD formatting style cries for short type
+ * names, and we provide them locally. Note:the suffix '_t' is reserved
+ * for the standard; I use a capital T instead.
+ */
+typedef struct peer peerT;
+typedef struct refclockproc clockprocT;
+typedef struct addrinfo addrinfoT;
+
+/* =====================================================================
+ * We use the same device name scheme as does the NMEA driver; since
+ * GPSD supports the same links, we can select devices by a fixed name.
+ */
+static const char * s_dev_stem = "/dev/gps";
+
+/* =====================================================================
+ * forward declarations for transfer vector and the vector itself
+ */
+
+static void gpsd_init (void);
+static int gpsd_start (int, peerT *);
+static void gpsd_shutdown (int, peerT *);
+static void gpsd_receive (struct recvbuf *);
+static void gpsd_poll (int, peerT *);
+static void gpsd_control (int, const struct refclockstat *,
+ struct refclockstat *, peerT *);
+static void gpsd_timer (int, peerT *);
+static void gpsd_clockstats (int, peerT *);
+
+static int myasprintf(char**, char const*, ...);
+
+struct refclock refclock_gpsdjson = {
+ gpsd_start, /* start up driver */
+ gpsd_shutdown, /* shut down driver */
+ gpsd_poll, /* transmit poll message */
+ gpsd_control, /* fudge control */
+ gpsd_init, /* initialize driver */
+ noentry, /* buginfo */
+ gpsd_timer /* called once per second */
+};
+
+/* =====================================================================
+ * our local clock unit and data
+ */
+typedef struct gpsd_unit {
+ int unit;
+ /* current line protocol version */
+ uint16_t proto_major;
+ uint16_t proto_minor;
+
+ /* PPS time stamps */
+ l_fp pps_local; /* when we received the PPS message */
+ l_fp pps_stamp; /* related reference time */
+ l_fp pps_recvt; /* when GPSD detected the pulse */
+
+ /* TPV (GPS data) time stamps */
+ l_fp tpv_local; /* when we received the TPV message */
+ l_fp tpv_stamp; /* effective GPS time stamp */
+ l_fp tpv_recvt; /* when GPSD got the fix */
+
+ /* fudge values for correction, mirrored as 'l_fp' */
+ l_fp pps_fudge;
+ l_fp tpv_fudge;
+
+ /* Flags to indicate available data */
+ int fl_tpv : 1; /* valid TPV seen (have time) */
+ int fl_pps : 1; /* valid pulse seen */
+ int fl_vers : 1; /* have protocol version */
+ int fl_watch : 1; /* watch reply seen */
+ int fl_nsec : 1; /* have nanosec PPS info */
+
+ /* admin stuff for sockets and device selection */
+ int fdt; /* current connecting socket */
+ addrinfoT * addr; /* next address to try */
+ u_int tickover; /* timeout countdown */
+ u_int tickpres; /* timeout preset */
+ u_int ppscount; /* PPS mode up/down count */
+ char * device; /* device name of unit */
+
+ /* tallies for the various events */
+ u_int tc_good; /* good samples received */
+ u_int tc_btime; /* bad time stamps */
+ u_int tc_bdate; /* bad date strings */
+ u_int tc_breply; /* bad replies */
+ u_int tc_recv; /* received known records */
+
+ /* log bloat throttle */
+ u_int logthrottle;/* seconds to next log slot */
+
+ /* record assemby buffer and saved length */
+ int buflen;
+ char buffer[MAX_PDU_LEN];
+} gpsd_unitT;
+
+/* =====================================================================
+ * static local helpers forward decls
+ */
+static void gpsd_init_socket(peerT * const peer);
+static void gpsd_test_socket(peerT * const peer);
+static void gpsd_stop_socket(peerT * const peer);
+
+static void gpsd_parse(peerT * const peer,
+ const l_fp * const rtime);
+static BOOL convert_ascii_time(l_fp * fp, const char * gps_time);
+static void save_ltc(clockprocT * const pp, const char * const tc);
+static int syslogok(clockprocT * const pp, gpsd_unitT * const up);
+
+/* =====================================================================
+ * local / static stuff
+ */
+
+/* The logon string is actually the ?WATCH command of GPSD, using JSON
+ * data and selecting the GPS device name we created from our unit
+ * number. [Note: This is a format string!]
+ */
+static const char * s_logon =
+ "?WATCH={\"enable\":true,\"json\":true,\"device\":\"%s\"};\r\n";
+
+/* We keep a static list of network addresses for 'localhost:gpsd', and
+ * we try to connect to them in round-robin fashion.
+ */
+static addrinfoT * s_gpsd_addr;
+
+/* =====================================================================
+ * log throttling
+ */
+static int/*BOOL*/
+syslogok(
+ clockprocT * const pp,
+ gpsd_unitT * const up)
+{
+ int res = (0 != (pp->sloppyclockflag & CLK_FLAG3))
+ || (0 == up->logthrottle )
+ || (LOGTHROTTLE == up->logthrottle );
+ if (res)
+ up->logthrottle = LOGTHROTTLE;
+ return res;
+}
+
+/* =====================================================================
+ * the clock functions
+ */
+
+/* ---------------------------------------------------------------------
+ * Init: This currently just gets the socket address for the GPS daemon
+ */
+static void
+gpsd_init(void)
+{
+ addrinfoT hints;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_socktype = SOCK_STREAM;
+
+ /* just take the first configured address of localhost... */
+ if (getaddrinfo("localhost", "gpsd", &hints, &s_gpsd_addr))
+ s_gpsd_addr = NULL;
+}
+
+/* ---------------------------------------------------------------------
+ * Start: allocate a unit pointer and set up the runtime data
+ */
+
+static int
+gpsd_start(
+ int unit,
+ peerT * peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = emalloc_zero(sizeof(*up));
+
+ struct stat sb;
+
+ /* initialize the unit structure */
+ up->fdt = -1;
+ up->addr = s_gpsd_addr;
+ up->tickpres = TICKOVER_LOW;
+
+ /* setup refclock processing */
+ up->unit = unit;
+ pp->unitptr = (caddr_t)up;
+ pp->io.fd = -1;
+ pp->io.clock_recv = gpsd_receive;
+ pp->io.srcclock = peer;
+ pp->io.datalen = 0;
+ pp->a_lastcode[0] = '\0';
+ pp->lencode = 0;
+ pp->clockdesc = DESCRIPTION;
+ memcpy(&pp->refid, REFID, 4);
+
+ /* Initialize miscellaneous variables */
+ peer->precision = PRECISION;
+
+ /* Create the device name and check for a Character Device. It's
+ * assumed that GPSD was started with the same link, so the
+ * names match. (If this is not practicable, we will have to
+ * read the symlink, if any, so we can get the true device
+ * file.)
+ */
+ if (-1 == myasprintf(&up->device, "%s%u", s_dev_stem, unit)) {
+ msyslog(LOG_ERR, "%s clock device name too long",
+ refnumtoa(&peer->srcadr));
+ goto dev_fail;
+ }
+ if (-1 == stat(up->device, &sb) || !S_ISCHR(sb.st_mode)) {
+ msyslog(LOG_ERR, "%s: '%s' is not a character device",
+ refnumtoa(&peer->srcadr), up->device);
+ goto dev_fail;
+ }
+ LOGIF(CLOCKINFO,
+ (LOG_NOTICE, "%s: startup, device is '%s'",
+ refnumtoa(&peer->srcadr), up->device));
+ return TRUE;
+
+dev_fail:
+ /* On failure, remove all UNIT ressources and declare defeat. */
+
+ INSIST (up);
+ free(up->device);
+ free(up);
+
+ pp->unitptr = (caddr_t)NULL;
+ return FALSE;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_shutdown(
+ int unit,
+ peerT * peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ UNUSED_ARG(unit);
+
+ if (up) {
+ free(up->device);
+ free(up);
+ }
+ pp->unitptr = (caddr_t)NULL;
+ if (-1 != pp->io.fd)
+ io_closeclock(&pp->io);
+ pp->io.fd = -1;
+ LOGIF(CLOCKINFO,
+ (LOG_NOTICE, "%s: shutdown", refnumtoa(&peer->srcadr)));
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_receive(
+ struct recvbuf * rbufp)
+{
+ /* declare & init control structure ptrs */
+ peerT * const peer = rbufp->recv_peer;
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ const char *psrc, *esrc;
+ char *pdst, *edst, ch;
+
+ /* Since we're getting a raw stream data, we must assemble lines
+ * in our receive buffer. We can't use neither 'refclock_gtraw'
+ * not 'refclock_gtlin' here... We process chars until we reach
+ * an EoL (that is, line feed) but we truncate the message if it
+ * does not fit the buffer. GPSD might truncate messages, too,
+ * so dealing with truncated buffers is necessary anyway.
+ */
+ psrc = (const char*)rbufp->recv_buffer;
+ esrc = psrc + rbufp->recv_length;
+
+ pdst = up->buffer + up->buflen;
+ edst = pdst + sizeof(up->buffer) - 1; /* for trailing NUL */
+
+ while (psrc != esrc) {
+ ch = *psrc++;
+ if (ch == '\n') {
+ /* trim trailing whitespace & terminate buffer */
+ while (pdst != up->buffer && pdst[-1] <= ' ')
+ --pdst;
+ *pdst = '\0';
+ /* process data and reset buffer */
+ gpsd_parse(peer, &rbufp->recv_time);
+ pdst = up->buffer;
+ } else if (pdst != edst) {
+ /* add next char, ignoring leading whitespace */
+ if (ch > ' ' || pdst != up->buffer)
+ *pdst++ = ch;
+ }
+ }
+ up->buflen = pdst - up->buffer;
+ up->tickover = TICKOVER_LOW;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_poll(
+ int unit,
+ peerT * peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+ u_int tc_max;
+
+ ++pp->polls;
+
+ /* find the dominant error */
+ tc_max = max(up->tc_btime, up->tc_bdate);
+ tc_max = max(tc_max, up->tc_breply);
+
+ if (pp->coderecv != pp->codeproc) {
+ /* all is well */
+ pp->lastref = pp->lastrec;
+ refclock_receive(peer);
+ } else {
+ /* not working properly, admit to it */
+ peer->flags &= ~FLAG_PPS;
+ peer->precision = PRECISION;
+
+ if (-1 == pp->io.fd) {
+ /* not connected to GPSD: clearly not working! */
+ refclock_report(peer, CEVNT_FAULT);
+ } else if (tc_max == up->tc_breply) {
+ refclock_report(peer, CEVNT_BADREPLY);
+ } else if (tc_max == up->tc_btime) {
+ refclock_report(peer, CEVNT_BADTIME);
+ } else if (tc_max == up->tc_bdate) {
+ refclock_report(peer, CEVNT_BADDATE);
+ } else {
+ refclock_report(peer, CEVNT_TIMEOUT);
+ }
+ }
+
+ if (pp->sloppyclockflag & CLK_FLAG4)
+ gpsd_clockstats(unit, peer);
+
+ /* clear tallies for next round */
+ up->tc_good = up->tc_btime = up->tc_bdate =
+ up->tc_breply = up->tc_recv = 0;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_control(
+ int unit,
+ const struct refclockstat * in_st,
+ struct refclockstat * out_st,
+ peerT * peer )
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ /* save preprocessed fudge times */
+ DTOLFP(pp->fudgetime1, &up->pps_fudge);
+ DTOLFP(pp->fudgetime2, &up->tpv_fudge);
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_timer(
+ int unit,
+ peerT * peer)
+{
+ static const char query[] = "?VERSION;";
+
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+ int rc;
+
+ /* This is used for timeout handling. Nothing that needs
+ * sub-second precison happens here, so receive/connect/retry
+ * timeouts are simply handled by a count down, and then we
+ * decide what to do by the socket values.
+ *
+ * Note that the timer stays at zero here, unless some of the
+ * functions set it to another value.
+ */
+ if (up->logthrottle)
+ --up->logthrottle;
+ if (up->tickover)
+ --up->tickover;
+ switch (up->tickover) {
+ case 4:
+ /* try to get a live signal
+ * If the device is not yet present, we will most likely
+ * get an error. We put out a new version request,
+ * because the reply will initiate a new watch request
+ * cycle.
+ */
+ if (-1 != pp->io.fd) {
+ if ( ! up->fl_watch) {
+ DPRINTF(2, ("GPSD_JSON(%d): timer livecheck: '%s'\n",
+ up->unit, query));
+ rc = write(pp->io.fd,
+ query, sizeof(query));
+ (void)rc;
+ }
+ } else if (-1 != up->fdt) {
+ gpsd_test_socket(peer);
+ }
+ break;
+
+ case 0:
+ if (-1 != pp->io.fd)
+ gpsd_stop_socket(peer);
+ else if (-1 != up->fdt)
+ gpsd_test_socket(peer);
+ else if (NULL != s_gpsd_addr)
+ gpsd_init_socket(peer);
+ break;
+
+ default:
+ if (-1 == pp->io.fd && -1 != up->fdt)
+ gpsd_test_socket(peer);
+ }
+
+ if (up->ppscount > PPS_HIWAT && !(peer->flags & FLAG_PPS))
+ peer->flags |= FLAG_PPS;
+ if (up->ppscount < PPS_LOWAT && (peer->flags & FLAG_PPS))
+ peer->flags &= ~FLAG_PPS;
+}
+
+/* =====================================================================
+ * JSON parsing stuff
+ */
+
+#define JSMN_MAXTOK 100
+#define INVALID_TOKEN (-1)
+
+typedef struct json_ctx {
+ char * buf;
+ int ntok;
+ jsmntok_t tok[JSMN_MAXTOK];
+} json_ctx;
+
+typedef int tok_ref;
+
+#ifdef HAVE_LONG_LONG
+typedef long long json_int;
+ #define JSON_STRING_TO_INT strtoll
+#else
+typedef long json_int;
+ #define JSON_STRING_TO_INT strtol
+#endif
+
+/* ------------------------------------------------------------------ */
+
+static tok_ref
+json_token_skip(
+ const json_ctx * ctx,
+ tok_ref tid)
+{
+ int len;
+ len = ctx->tok[tid].size;
+ for (++tid; len; --len)
+ if (tid < ctx->ntok)
+ tid = json_token_skip(ctx, tid);
+ else
+ break;
+ if (tid > ctx->ntok)
+ tid = ctx->ntok;
+ return tid;
+}
+
+/* ------------------------------------------------------------------ */
+
+static int
+json_object_lookup(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key)
+{
+ int len;
+
+ if (tid >= ctx->ntok || ctx->tok[tid].type != JSMN_OBJECT)
+ return INVALID_TOKEN;
+ len = ctx->ntok - tid - 1;
+ if (len > ctx->tok[tid].size)
+ len = ctx->tok[tid].size;
+ for (tid += 1; len > 1; len-=2) {
+ if (ctx->tok[tid].type != JSMN_STRING)
+ continue; /* hmmm... that's an error, strictly speaking */
+ if (!strcmp(key, ctx->buf + ctx->tok[tid].start))
+ return tid + 1;
+ tid = json_token_skip(ctx, tid + 1);
+ }
+ return INVALID_TOKEN;
+}
+
+/* ------------------------------------------------------------------ */
+
+#if 0 /* currently unused */
+static const char*
+json_object_lookup_string(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key)
+{
+ tok_ref val_ref;
+ val_ref = json_object_lookup(ctx, tid, key);
+ if (INVALID_TOKEN == val_ref ||
+ JSMN_STRING != ctx->tok[val_ref].type )
+ goto cvt_error;
+ return ctx->buf + ctx->tok[val_ref].start;
+
+ cvt_error:
+ errno = EINVAL;
+ return NULL;
+}
+#endif
+
+static const char*
+json_object_lookup_string_default(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key,
+ const char * def)
+{
+ tok_ref val_ref;
+ val_ref = json_object_lookup(ctx, tid, key);
+ if (INVALID_TOKEN == val_ref ||
+ JSMN_STRING != ctx->tok[val_ref].type )
+ return def;
+ return ctx->buf + ctx->tok[val_ref].start;
+}
+
+/* ------------------------------------------------------------------ */
+
+static json_int
+json_object_lookup_int(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key)
+{
+ json_int ret;
+ tok_ref val_ref;
+ char * ep;
+
+ val_ref = json_object_lookup(ctx, tid, key);
+ if (INVALID_TOKEN == val_ref ||
+ JSMN_PRIMITIVE != ctx->tok[val_ref].type )
+ goto cvt_error;
+ ret = JSON_STRING_TO_INT(
+ ctx->buf + ctx->tok[val_ref].start, &ep, 10);
+ if (*ep)
+ goto cvt_error;
+ return ret;
+
+ cvt_error:
+ errno = EINVAL;
+ return 0;
+}
+
+static json_int
+json_object_lookup_int_default(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key,
+ json_int def)
+{
+ json_int retv;
+ int esave;
+
+ esave = errno;
+ errno = 0;
+ retv = json_object_lookup_int(ctx, tid, key);
+ if (0 != errno)
+ retv = def;
+ errno = esave;
+ return retv;
+}
+
+/* ------------------------------------------------------------------ */
+
+static double
+json_object_lookup_float(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key)
+{
+ double ret;
+ tok_ref val_ref;
+ char * ep;
+
+ val_ref = json_object_lookup(ctx, tid, key);
+ if (INVALID_TOKEN == val_ref ||
+ JSMN_PRIMITIVE != ctx->tok[val_ref].type )
+ goto cvt_error;
+ ret = strtod(ctx->buf + ctx->tok[val_ref].start, &ep);
+ if (*ep)
+ goto cvt_error;
+ return ret;
+
+ cvt_error:
+ errno = EINVAL;
+ return 0.0;
+}
+
+static double
+json_object_lookup_float_default(
+ const json_ctx * ctx,
+ tok_ref tid,
+ const char * key,
+ double def)
+{
+ double retv;
+ int esave;
+
+ esave = errno;
+ errno = 0;
+ retv = json_object_lookup_float(ctx, tid, key);
+ if (0 != errno)
+ retv = def;
+ errno = esave;
+ return retv;
+}
+
+/* ------------------------------------------------------------------ */
+
+static BOOL
+json_parse_record(
+ json_ctx * ctx,
+ char * buf)
+{
+ jsmn_parser jsm;
+ int idx, rc;
+
+ jsmn_init(&jsm);
+ rc = jsmn_parse(&jsm, buf, ctx->tok, JSMN_MAXTOK);
+ ctx->buf = buf;
+ ctx->ntok = jsm.toknext;
+
+ /* Make all tokens NUL terminated by overwriting the
+ * terminator symbol
+ */
+ for (idx = 0; idx < jsm.toknext; ++idx)
+ if (ctx->tok[idx].end > ctx->tok[idx].start)
+ ctx->buf[ctx->tok[idx].end] = '\0';
+
+ if (JSMN_ERROR_PART != rc &&
+ JSMN_ERROR_NOMEM != rc &&
+ JSMN_SUCCESS != rc )
+ return FALSE; /* not parseable - bail out */
+
+ if (0 >= jsm.toknext || JSMN_OBJECT != ctx->tok[0].type)
+ return FALSE; /* not object or no data!?! */
+
+ return TRUE;
+}
+
+
+/* =====================================================================
+ * static local helpers
+ */
+
+/* ------------------------------------------------------------------ */
+/* Process a WATCH record
+ *
+ * Currently this is only used to recognise that the device is present
+ * and that we're listed subscribers.
+ */
+static void
+process_watch(
+ peerT * const peer ,
+ json_ctx * const jctx ,
+ const l_fp * const rtime)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ up->fl_watch = -1;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+process_version(
+ peerT * const peer ,
+ json_ctx * const jctx ,
+ const l_fp * const rtime)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ int len;
+ char * buf;
+ const char *revision;
+ const char *release;
+
+ /* get protocol version number */
+ revision = json_object_lookup_string_default(
+ jctx, 0, "rev", "(unknown)");
+ release = json_object_lookup_string_default(
+ jctx, 0, "release", "(unknown)");
+ errno = 0;
+ up->proto_major = (uint16_t)json_object_lookup_int(
+ jctx, 0, "proto_major");
+ up->proto_minor = (uint16_t)json_object_lookup_int(
+ jctx, 0, "proto_minor");
+ if (0 == errno) {
+ up->fl_vers = -1;
+ if (syslogok(pp, up))
+ msyslog(LOG_INFO,
+ "%s: GPSD revision=%s release=%s protocol=%u.%u",
+ refnumtoa(&peer->srcadr),
+ revision, release,
+ up->proto_major, up->proto_minor);
+ }
+
+ /* With the 3.9 GPSD protocol, '*_musec' vanished and was
+ * replace by '*_nsec'. Dispatch properly.
+ */
+ if ( up->proto_major > 3 ||
+ (up->proto_major == 3 && up->proto_minor >= 9))
+ up->fl_nsec = -1;
+ else
+ up->fl_nsec = 0;
+
+ /*TODO: validate protocol version! */
+
+ /* request watch for our GPS device
+ * Reuse the input buffer, which is no longer needed in the
+ * current cycle. Also assume that we can write the watch
+ * request in one sweep into the socket; since we do not do
+ * output otherwise, this should always work. (Unless the
+ * TCP/IP window size gets lower than the length of the
+ * request. We handle that when it happens.)
+ */
+ snprintf(up->buffer, sizeof(up->buffer),
+ s_logon, up->device);
+ buf = up->buffer;
+ len = strlen(buf);
+ if (len != write(pp->io.fd, buf, len)) {
+ /*Note: if the server fails to read our request, the
+ * resulting data timeout will take care of the
+ * connection!
+ */
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: failed to write watch request (%m)",
+ refnumtoa(&peer->srcadr));
+ }
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+process_tpv(
+ peerT * const peer ,
+ json_ctx * const jctx ,
+ const l_fp * const rtime)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ const char * gps_time;
+ int gps_mode;
+ double ept, epp, epx, epy, epv;
+ int log2;
+
+ gps_mode = (int)json_object_lookup_int_default(
+ jctx, 0, "mode", 0);
+
+ gps_time = json_object_lookup_string_default(
+ jctx, 0, "time", NULL);
+
+ if (gps_mode < 1 || NULL == gps_time) {
+ /* receiver has no fix; tell about and avoid stale data */
+ up->tc_breply += 1;
+ up->fl_tpv = 0;
+ up->fl_pps = 0;
+ return;
+ }
+
+ /* save last time code to clock data */
+ save_ltc(pp, gps_time);
+
+ /* convert clock and set resulting ref time */
+ if (convert_ascii_time(&up->tpv_stamp, gps_time)) {
+ DPRINTF(2, ("GPSD_JSON(%d): process_tpv, stamp='%s', recvt='%s' mode=%u\n",
+ up->unit,
+ gmprettydate(&up->tpv_stamp),
+ gmprettydate(&up->tpv_recvt),
+ gps_mode));
+
+ up->tpv_local = *rtime;
+ up->tpv_recvt = *rtime;/*TODO: hack until we get it remote from GPSD */
+ L_SUB(&up->tpv_recvt, &up->tpv_fudge);
+ up->fl_tpv = -1;
+ } else {
+ up->tc_btime += 1;
+ up->fl_tpv = 0;
+ }
+
+ /* Set the precision from the GPSD data
+ *
+ * Since EPT has some issues, we use EPT and a home-brewed error
+ * estimation base on a sphere derived from EPX/Y/V and the
+ * speed of light. Use the better one of those two.
+ */
+ ept = json_object_lookup_float_default(jctx, 0, "ept", 1.0);
+ epx = json_object_lookup_float_default(jctx, 0, "epx", 1000.0);
+ epy = json_object_lookup_float_default(jctx, 0, "epy", 1000.0);
+ if (1 == gps_mode) {
+ /* 2d-fix: extend bounding rectangle to cuboid */
+ epv = max(epx, epy);
+ } else {
+ /* 3d-fix: get bounding cuboid */
+ epv = json_object_lookup_float_default(
+ jctx, 0, "epv", 1000.0);
+ }
+
+ /* get diameter of enclosing sphere of bounding cuboid as spatial
+ * error, then divide spatial error by speed of light to get
+ * another time error estimate. Add extra 100 meters as
+ * optimistic lower bound. Then use the better one of the two
+ * estimations.
+ */
+ epp = 2.0 * sqrt(epx*epx + epy*epy + epv*epv);
+ epp = (epp + 100.0) / 299792458.0;
+
+ ept = min(ept, epp );
+ ept = min(ept, 0.5 );
+ ept = max(ept, 1.0-9);
+ ept = frexp(ept, &log2);
+
+ peer->precision = log2;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+process_pps(
+ peerT * const peer ,
+ json_ctx * const jctx ,
+ const l_fp * const rtime)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ struct timespec ts;
+
+ errno = 0;
+ ts.tv_sec = (time_t)json_object_lookup_int(
+ jctx, 0, "clock_sec");
+ if (up->fl_nsec)
+ ts.tv_nsec = json_object_lookup_int(
+ jctx, 0, "clock_nsec");
+ else
+ ts.tv_nsec = json_object_lookup_int(
+ jctx, 0, "clock_musec") * 1000;
+
+ if (0 != errno)
+ goto fail;
+
+ up->pps_local = *rtime;
+ /* get fudged receive time */
+ up->pps_recvt = tspec_stamp_to_lfp(ts);
+ L_SUB(&up->pps_recvt, &up->pps_fudge);
+
+ /* map to next full second as reference time stamp */
+ up->pps_stamp = up->pps_recvt;
+ L_ADDUF(&up->pps_stamp, 0x80000000u);
+ up->pps_stamp.l_uf = 0;
+
+ pp->lastrec = up->pps_stamp;
+
+ DPRINTF(2, ("GPSD_JSON(%d): process_pps, stamp='%s', recvt='%s'\n",
+ up->unit,
+ gmprettydate(&up->pps_stamp),
+ gmprettydate(&up->pps_recvt)));
+
+ /* When we have a time pulse, clear the TPV flag: the
+ * PPS is only valid for the >NEXT< TPV value!
+ */
+ up->fl_pps = -1;
+ up->fl_tpv = 0;
+ return;
+
+ fail:
+ DPRINTF(2, ("GPSD_JSON(%d): process_pps FAILED, nsec=%d stamp='%s', recvt='%s'\n",
+ up->unit, up->fl_nsec,
+ gmprettydate(&up->pps_stamp),
+ gmprettydate(&up->pps_recvt)));
+ up->tc_breply += 1;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_parse(
+ peerT * const peer ,
+ const l_fp * const rtime)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ json_ctx jctx;
+ const char * clsid;
+ l_fp tmpfp;
+
+ DPRINTF(2, ("GPSD_JSON(%d): gpsd_parse: time %s '%s'\n",
+ up->unit, ulfptoa(rtime, 6), up->buffer));
+
+ /* See if we can grab anything potentially useful */
+ if (!json_parse_record(&jctx, up->buffer))
+ return;
+
+ /* Now dispatch over the objects we know */
+ clsid = json_object_lookup_string_default(
+ &jctx, 0, "class", "-bad-repy-");
+
+ up->tc_recv += 1;
+ if (!strcmp("VERSION", clsid))
+ process_version(peer, &jctx, rtime);
+ else if (!strcmp("TPV", clsid))
+ process_tpv(peer, &jctx, rtime);
+ else if (!strcmp("PPS", clsid))
+ process_pps(peer, &jctx, rtime);
+ else if (!strcmp("WATCH", clsid))
+ process_watch(peer, &jctx, rtime);
+ else
+ return; /* nothing we know about... */
+
+ /* now aggregate TPV and PPS -- no PPS? just use TPV...*/
+ if (up->fl_tpv) {
+ /* TODO: also check remote receive time stamps */
+ tmpfp = up->tpv_local;
+ L_SUB(&tmpfp, &up->pps_local);
+
+ if (up->fl_pps && 0 == tmpfp.l_ui) {
+ refclock_process_offset(
+ pp, up->tpv_stamp, up->pps_recvt, 0.0);
+ if (up->ppscount < PPS_MAXCOUNT)
+ up->ppscount += 1;
+ } else {
+ refclock_process_offset(
+ pp, up->tpv_stamp, up->tpv_recvt, 0.0);
+ if (up->ppscount > 0)
+ up->ppscount -= 1;
+ }
+ up->fl_pps = 0;
+ up->fl_tpv = 0;
+ up->tc_good += 1;
+ }
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_stop_socket(
+ peerT * const peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ if (-1 != pp->io.fd)
+ io_closeclock(&pp->io);
+ pp->io.fd = -1;
+ if (syslogok(pp, up))
+ msyslog(LOG_INFO,
+ "%s: closing socket to GPSD",
+ refnumtoa(&peer->srcadr));
+ up->tickover = up->tickpres;
+ up->tickpres = min(up->tickpres + 5, TICKOVER_HIGH);
+ up->fl_vers = 0;
+ up->fl_tpv = 0;
+ up->fl_pps = 0;
+ up->fl_watch = 0;
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_init_socket(
+ peerT * const peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+ addrinfoT * ai;
+ int rc;
+ int ov;
+
+ /* draw next address to try */
+ if (NULL == up->addr)
+ up->addr = s_gpsd_addr;
+ ai = up->addr;
+ up->addr = ai->ai_next;
+
+ /* try to create a matching socket */
+ up->fdt = socket(
+ ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+ if (-1 == up->fdt) {
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: cannot create GPSD socket: %m",
+ refnumtoa(&peer->srcadr));
+ goto no_socket;
+ }
+
+ /* make sure the socket is non-blocking */
+ rc = fcntl(up->fdt, F_SETFL, O_NONBLOCK, 1);
+ if (-1 == rc) {
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: cannot set GPSD socket to non-blocking: %m",
+ refnumtoa(&peer->srcadr));
+ goto no_socket;
+ }
+ /* disable nagling */
+ ov = 1;
+ rc = setsockopt(up->fdt, IPPROTO_TCP, TCP_NODELAY,
+ (char*)&ov, sizeof(ov));
+ if (-1 == rc) {
+ if (syslogok(pp, up))
+ msyslog(LOG_INFO,
+ "%s: cannot disable TCP nagle: %m",
+ refnumtoa(&peer->srcadr));
+ }
+
+ /* start a non-blocking connect */
+ rc = connect(up->fdt, ai->ai_addr, ai->ai_addrlen);
+ if (-1 == rc && errno != EINPROGRESS) {
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: cannot connect GPSD socket: %m",
+ refnumtoa(&peer->srcadr));
+ goto no_socket;
+ }
+
+ return;
+
+ no_socket:
+ if (-1 != up->fdt)
+ close(up->fdt);
+ up->fdt = -1;
+ up->tickover = up->tickpres;
+ up->tickpres = min(up->tickpres + 5, TICKOVER_HIGH);
+}
+
+/* ------------------------------------------------------------------ */
+
+static void
+gpsd_test_socket(
+ peerT * const peer)
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ int ec, rc;
+ socklen_t lc;
+
+ /* Check if the non-blocking connect was finished by testing the
+ * socket for writeability. Use the 'poll()' API if available
+ * and 'select()' otherwise.
+ */
+ DPRINTF(2, ("GPSD_JSON(%d): check connect, fd=%d\n",
+ up->unit, up->fdt));
+
+#if defined(HAVE_SYS_POLL_H)
+ {
+ struct pollfd pfd;
+
+ pfd.events = POLLOUT;
+ pfd.fd = up->fdt;
+ rc = poll(&pfd, 1, 0);
+ if (1 != rc || !(pfd.revents & POLLOUT))
+ return;
+ }
+#elif defined(HAVE_SYS_SELECT_H)
+ {
+ struct timeval tout;
+ fd_set wset;
+
+ memset(&tout, 0, sizeof(tout));
+ FD_ZERO(&wset);
+ FD_SET(up->fdt, &wset);
+ rc = select(up->fdt+1, NULL, &wset, NULL, &tout);
+ if (0 == rc || !(FD_ISSET(up->fdt, &wset)))
+ return;
+ }
+#else
+# error Blooper! That should have been found earlier!
+#endif
+
+ /* next timeout is a full one... */
+ up->tickover = TICKOVER_LOW;
+
+ /* check for socket error */
+ ec = 0;
+ lc = sizeof(ec);
+ rc = getsockopt(up->fdt, SOL_SOCKET, SO_ERROR, &ec, &lc);
+ DPRINTF(1, ("GPSD_JSON(%d): connect finshed, fd=%d, ec=%d(%s)\n",
+ up->unit, up->fdt, ec, strerror(ec)));
+ if (-1 == rc || 0 != ec) {
+ errno = ec;
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: (async)cannot connect GPSD socket: %m",
+ refnumtoa(&peer->srcadr));
+ goto no_socket;
+ }
+ /* swap socket FDs, and make sure the clock was added */
+ pp->io.fd = up->fdt;
+ up->fdt = -1;
+ if (0 == io_addclock(&pp->io)) {
+ if (syslogok(pp, up))
+ msyslog(LOG_ERR,
+ "%s: failed to register with I/O engine",
+ refnumtoa(&peer->srcadr));
+ goto no_socket;
+ }
+ return;
+
+ no_socket:
+ if (-1 != up->fdt)
+ close(up->fdt);
+ up->fdt = -1;
+ up->tickover = up->tickpres;
+ up->tickpres = min(up->tickpres + 5, TICKOVER_HIGH);
+}
+
+/* =====================================================================
+ * helper stuff
+ */
+
+/*
+ * shm_clockstats - dump and reset counters
+ */
+static void
+gpsd_clockstats(
+ int unit,
+ peerT * const peer
+ )
+{
+ clockprocT * const pp = peer->procptr;
+ gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
+
+ char logbuf[128];
+ unsigned int llen;
+
+ /* if snprintf() returns a negative values on errors (some older
+ * ones do) make sure we are NUL terminated. Using an unsigned
+ * result does the trick.
+ */
+ llen = snprintf(logbuf, sizeof(logbuf),
+ "good=%-3u badtime=%-3u baddate=%-3u badreply=%-3u recv=%-3u",
+ up->tc_good, up->tc_btime, up->tc_bdate,
+ up->tc_breply, up->tc_recv);
+ logbuf[min(llen, sizeof(logbuf)-1)] = '\0';
+ record_clock_stats(&peer->srcadr, logbuf);
+}
+
+/* -------------------------------------------------------------------
+ * Convert a GPSD timestam (ISO8601 Format) to an l_fp
+ */
+static BOOL
+convert_ascii_time(
+ l_fp * fp ,
+ const char * gps_time)
+{
+ char *ep;
+ struct tm gd;
+ struct timespec ts;
+ long dw;
+
+ /* Use 'strptime' to take the brunt of the work, then parse
+ * the fractional part manually, starting with a digit weight of
+ * 10^8 nanoseconds.
+ */
+ ts.tv_nsec = 0;
+ ep = strptime(gps_time, "%Y-%m-%dT%H:%M:%S", &gd);
+ if (*ep == '.') {
+ dw = 100000000;
+ while (isdigit(*++ep)) {
+ ts.tv_nsec += (*ep - '0') * dw;
+ dw /= 10;
+ }
+ }
+ if (ep[0] != 'Z' || ep[1] != '\0')
+ return FALSE;
+
+ /* now convert the whole thing into a 'l_fp' */
+ ts.tv_sec = (ntpcal_tm_to_rd(&gd) - DAY_NTP_STARTS) * SECSPERDAY
+ + ntpcal_tm_to_daysec(&gd);
+ *fp = tspec_intv_to_lfp(ts);
+
+ return TRUE;
+}
+
+/* -------------------------------------------------------------------
+ * Save the last timecode string, making sure it's properly truncated
+ * if necessary and NUL terminated in any case.
+ */
+static void
+save_ltc(
+ clockprocT * const pp,
+ const char * const tc)
+{
+ size_t len;
+
+ len = (tc) ? strlen(tc) : 0;
+ if (len >= sizeof(pp->a_lastcode))
+ len = sizeof(pp->a_lastcode) - 1;
+ pp->lencode = (u_short)len;
+ memcpy(pp->a_lastcode, tc, len);
+ pp->a_lastcode[len] = '\0';
+}
+
+/*
+ * -------------------------------------------------------------------
+ * asprintf replacement... it's not available everywhere...
+ */
+static int
+myasprintf(
+ char ** spp,
+ char const * fmt,
+ ... )
+{
+ size_t alen, plen;
+
+ alen = 32;
+ *spp = NULL;
+ do {
+ va_list va;
+
+ alen += alen;
+ free(*spp);
+ *spp = (char*)malloc(alen);
+ if (NULL == *spp)
+ return -1;
+
+ va_start(va, fmt);
+ plen = (size_t)vsnprintf(*spp, alen, fmt, va);
+ va_end(va);
+ } while (plen >= alen);
+
+ return (int)plen;
+}
+
+#else
+NONEMPTY_TRANSLATION_UNIT
+#endif /* REFCLOCK && CLOCK_GPSDJSON */
diff --git a/ntpd/refclock_gpsvme.c b/ntpd/refclock_gpsvme.c
index c3322fdebf2d..66ccc9a3ec90 100644
--- a/ntpd/refclock_gpsvme.c
+++ b/ntpd/refclock_gpsvme.c
@@ -122,10 +122,10 @@ psc_start(
/* initialize peer variables */
pp = peer->procptr;
pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t) peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = -1;
- pp->unitptr = (caddr_t) up;
+ pp->unitptr = up;
get_systime(&pp->lastrec);
memcpy(&pp->refid, REFID, 4);
peer->precision = PRECISION;
@@ -173,7 +173,7 @@ psc_poll(
if (!up->msg_flag[unit]) { /* write once to system log */
msyslog(LOG_WARNING,
"SYNCHRONIZATION LOST on unit %1d, status %02x\n",
- status, unit);
+ unit, status);
up->msg_flag[unit] = 1;
}
return;
diff --git a/ntpd/refclock_heath.c b/ntpd/refclock_heath.c
index cd74eca3173d..435d8f6c4ffb 100644
--- a/ntpd/refclock_heath.c
+++ b/ntpd/refclock_heath.c
@@ -222,12 +222,13 @@ heath_start(
* Open serial port
*/
snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, speed[peer->ttl & 0x3],
- LDISC_REMOTE)))
+ fd = refclock_open(device, speed[peer->ttl & 0x3],
+ LDISC_REMOTE);
+ if (fd <= 0)
return (0);
pp = peer->procptr;
pp->io.clock_recv = heath_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -240,7 +241,6 @@ heath_start(
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy(&pp->refid, REFID, 4);
return (1);
@@ -282,7 +282,7 @@ heath_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX,
&trtmp);
@@ -430,8 +430,6 @@ heath_poll(
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;
@@ -444,7 +442,6 @@ heath_poll(
printf("heath: timecode %d %s\n", pp->lencode,
pp->a_lastcode);
#endif
- peer->burst = MAXSTAGE;
pp->polls++;
}
diff --git a/ntpd/refclock_hopfpci.c b/ntpd/refclock_hopfpci.c
index 284e3011c909..95bcab983c4d 100644
--- a/ntpd/refclock_hopfpci.c
+++ b/ntpd/refclock_hopfpci.c
@@ -124,8 +124,7 @@ hopfpci_start(
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
#ifndef SYS_WINNT
@@ -141,10 +140,10 @@ hopfpci_start(
pp = peer->procptr;
pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = INVALID_SOCKET;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
get_systime(&pp->lastrec);
@@ -195,7 +194,9 @@ hopfpci_poll(
pp = peer->procptr;
#ifndef SYS_WINNT
- ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
+ if (ioctl(fd, HOPF_CLOCK_GET_UTC, &m_time) < 0)
+ msyslog(LOG_ERR, "HOPF_P(%d): HOPF_CLOCK_GET_UTC: %m",
+ unit);
#else
GetHopfSystemTime(&m_time);
#endif
diff --git a/ntpd/refclock_hopfser.c b/ntpd/refclock_hopfser.c
index 48eea0022bb7..dae8b3761779 100644
--- a/ntpd/refclock_hopfser.c
+++ b/ntpd/refclock_hopfser.c
@@ -146,12 +146,11 @@ hopfserial_start (
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = hopfserial_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -170,7 +169,6 @@ hopfserial_start (
*/
pp->clockdesc = DESCRIPTION;
peer->precision = PRECISION;
- peer->burst = NSTAGE;
memcpy((char *)&pp->refid, REFID, 4);
up->leap_status = 0;
@@ -193,7 +191,7 @@ hopfserial_shutdown (
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct hopfclock_unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
@@ -216,30 +214,31 @@ hopfserial_receive (
struct refclockproc *pp;
struct peer *peer;
- int synch; /* synchhronization indicator */
- int DoW; /* Dow */
+ int synch; /* synchhronization indicator */
+ int DoW; /* Day of Week */
int day, month; /* ddd conversion */
+ int converted;
/*
* Initialize pointers and read the timecode and timestamp.
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct hopfclock_unit *)pp->unitptr;
+ up = 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)
+ pp->lencode = (u_short)refclock_gtlin(rbufp, pp->a_lastcode,
+ sizeof(pp->a_lastcode),
+ &pp->lastrec);
+ if (pp->lencode == 0)
return;
- sscanf(pp->a_lastcode,
+ converted = sscanf(pp->a_lastcode,
#if 1
"%1x%1x%2d%2d%2d%2d%2d%2d", /* ...cr,lf */
#else
@@ -259,9 +258,9 @@ hopfserial_receive (
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.*/ ||
+ if ((8 != converted) || (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)) {
@@ -356,7 +355,7 @@ hopfserial_poll (
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct hopfclock_unit *)pp->unitptr;
+ up = pp->unitptr;
pp->polls++;
up->rpt_next = 1;
diff --git a/ntpd/refclock_hpgps.c b/ntpd/refclock_hpgps.c
index 5867a1d7b278..0b45fc74f2f1 100644
--- a/ntpd/refclock_hpgps.c
+++ b/ntpd/refclock_hpgps.c
@@ -156,6 +156,7 @@ hpgps_start(
register struct hpgpsunit *up;
struct refclockproc *pp;
int fd;
+ int speed, ldisc;
char device[20];
/*
@@ -163,23 +164,23 @@ hpgps_start(
* Default is HP 58503A, mode arg selects HP Z3801A
*/
snprintf(device, sizeof(device), DEVICE, unit);
+ ldisc = LDISC_CLK;
+ speed = SPEED232;
/* mode parameter to server config line shares ttl slot */
- if ((peer->ttl == 1)) {
- if (!(fd = refclock_open(device, SPEED232Z,
- LDISC_CLK | LDISC_7O1)))
- return (0);
- } else {
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
+ if (1 == peer->ttl) {
+ ldisc |= LDISC_7O1;
+ speed = SPEED232Z;
}
+ fd = refclock_open(device, speed, ldisc);
+ if (fd <= 0)
+ return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = hpgps_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -188,7 +189,7 @@ hpgps_start(
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -228,7 +229,7 @@ hpgps_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -265,9 +266,9 @@ hpgps_receive(
/*
* Initialize pointers and read the receiver response
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
+ up = pp->unitptr;
*pp->a_lastcode = '\0';
pp->lencode = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
@@ -300,7 +301,7 @@ hpgps_receive(
if (up->linecnt-- > 0) {
if ((int)(pp->lencode + 2) <= (SMAX - (up->lastptr - up->statscrn))) {
*up->lastptr++ = '\n';
- (void)strcpy(up->lastptr, pp->a_lastcode);
+ memcpy(up->lastptr, pp->a_lastcode, pp->lencode);
up->lastptr += pp->lencode;
}
if (up->linecnt == 0)
@@ -333,7 +334,7 @@ hpgps_receive(
*
*/
- (void)strcpy(prompt,pp->a_lastcode);
+ strlcpy(prompt, pp->a_lastcode, sizeof(prompt));
tcp = strrchr(pp->a_lastcode,'>');
if (tcp == NULL)
tcp = pp->a_lastcode;
@@ -608,7 +609,7 @@ hpgps_poll(
* declare a timeout and keep going.
*/
pp = peer->procptr;
- up = (struct hpgpsunit *)pp->unitptr;
+ up = pp->unitptr;
if (up->pollcnt == 0)
refclock_report(peer, CEVNT_TIMEOUT);
else
diff --git a/ntpd/refclock_irig.c b/ntpd/refclock_irig.c
index 0a4747319c4b..46c01fbb7931 100644
--- a/ntpd/refclock_irig.c
+++ b/ntpd/refclock_irig.c
@@ -332,21 +332,19 @@ irig_start(
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
pp->io.clock_recv = irig_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
close(fd);
pp->io.fd = -1;
free(up);
- pp->unitptr = NULL;
return (0);
}
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -390,7 +388,7 @@ irig_shutdown(
struct irigunit *up;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -421,9 +419,9 @@ irig_receive(
int bufcnt; /* buffer counter */
l_fp ltemp; /* l_fp temp */
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Main loop - read until there ain't no more. Note codec
@@ -459,8 +457,8 @@ irig_receive(
sample = fabs(sample);
if (sample > up->signal)
up->signal = sample;
- up->signal += (sample - up->signal) /
- 1000;
+ up->signal += (sample - up->signal) /
+ 1000;
/*
* Once each second, determine the IRIG format and gain.
@@ -519,7 +517,7 @@ irig_rf(
double irig_b, irig_e; /* irig filter outputs */
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* IRIG-B filter. Matlab 4th-order IIR elliptic, 800-1200 Hz
@@ -601,7 +599,7 @@ irig_base(
int carphase; /* carrier phase */
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Synchronous baud integrator. Corresponding samples of current
@@ -754,7 +752,7 @@ irig_baud(
l_fp ltemp;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* The PLL time constant starts out small, in order to
@@ -848,8 +846,9 @@ irig_decode(
char spare[2 + 1]; /* mulligan digits */
int temp;
+ syncdig = 0;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Assemble frame bits.
@@ -984,7 +983,7 @@ irig_poll(
struct irigunit *up;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
@@ -1021,7 +1020,7 @@ irig_gain(
struct irigunit *up;
pp = peer->procptr;
- up = (struct irigunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Apparently, the codec uses only the high order bits of the
diff --git a/ntpd/refclock_jjy.c b/ntpd/refclock_jjy.c
index df7869dc987b..d8ec6b7446c1 100644
--- a/ntpd/refclock_jjy.c
+++ b/ntpd/refclock_jjy.c
@@ -4,7 +4,7 @@
/**********************************************************************/
/* */
-/* Copyright (C) 2001-2004, Takao Abe. All rights reserved. */
+/* Copyright (C) 2001-2011, Takao Abe. All rights reserved. */
/* */
/* Permission to use, copy, modify, and distribute this software */
/* and its documentation for any purpose is hereby granted */
@@ -92,6 +92,9 @@
/* when "fudge 127.127.40.X flag1 1" is specified */
/* ( DATE,STIM -> DCST,STUS,DATE,STIM ) */
/* */
+/* 2011/04/30 */
+/* [Add] Support the Tristate Ltd. TS-GPSclock-01 */
+/* */
/**********************************************************************/
#ifdef HAVE_CONFIG_H
@@ -122,7 +125,7 @@
/* dcst<CR><LF> VALID|INVALID<CR><LF> */
/* stus<CR><LF> ADJUSTED|UNADJUSTED<CR><LF> */
/* date<CR><LF> YYYY/MM/DD XXX<CR><LF> */
-/* time<CR><LF> HH:MM:SS<CR><LF> */
+/* time<CR><LF> HH:MM:SS<CR><LF> Not used by this driver */
/* stim<CR><LF> HH:MM:SS<CR><LF> Reply at just second */
/* */
/* During synchronization after a receiver is turned on, */
@@ -161,6 +164,23 @@
/* W: 0(Monday)-6(Sunday) */
/* */
/**********************************************************************/
+/* */
+/* The Tristate Ltd. GPS clock TS-GPSCLOCK-01 */
+/* */
+/* This clock has NMEA mode and command/respose mode. */
+/* When this jjy driver are used, set to command/respose mode */
+/* of this clock by the onboard switch SW4, and make sure the */
+/* LED-Y is tured on. */
+/* Other than this JJY driver, the refclock driver type 20, */
+/* generic NMEA driver, works with the NMEA mode of this clock. */
+/* */
+/* Command Response Remarks */
+/* ------------ ---------------------- --------------------- */
+/* stus<CR><LF> *R|*G|*U|+U<CR><LF> */
+/* date<CR><LF> YY/MM/DD<CR><LF> */
+/* time<CR><LF> HH:MM:SS<CR><LF> */
+/* */
+/**********************************************************************/
/*
* Interface definitions
@@ -171,6 +191,7 @@
#define SPEED232_CDEX_JST2000 B9600 /* UART speed (9600 baud) */
#define SPEED232_ECHOKEISOKUKI_LT2000 B9600 /* UART speed (9600 baud) */
#define SPEED232_CITIZENTIC_JJY200 B4800 /* UART speed (4800 baud) */
+#define SPEED232_TRISTATE_GPSCLOCK01 B38400 /* USB speed (38400 baud) */
#define REFID "JJY" /* reference ID */
#define DESCRIPTION "JJY Receiver"
#define PRECISION (-3) /* precision assumed (about 100 ms) */
@@ -196,26 +217,32 @@ struct jjyunit {
char rawbuf [ MAX_RAWBUF ] ;
};
-#define UNITTYPE_TRISTATE_JJY01 1
-#define UNITTYPE_CDEX_JST2000 2
+#define UNITTYPE_TRISTATE_JJY01 1
+#define UNITTYPE_CDEX_JST2000 2
#define UNITTYPE_ECHOKEISOKUKI_LT2000 3
#define UNITTYPE_CITIZENTIC_JJY200 4
+#define UNITTYPE_TRISTATE_GPSCLOCK01 5
/*
* Function prototypes
*/
-static int jjy_start (int, struct peer *);
-static void jjy_shutdown (int, struct peer *);
-static void jjy_poll (int, struct peer *);
-static void jjy_poll_tristate_jjy01 (int, struct peer *);
-static void jjy_poll_cdex_jst2000 (int, struct peer *);
-static void jjy_poll_echokeisokuki_lt2000(int, struct peer *);
-static void jjy_poll_citizentic_jjy200 (int, struct peer *);
-static void jjy_receive (struct recvbuf *);
-static int jjy_receive_tristate_jjy01 (struct recvbuf *);
-static int jjy_receive_cdex_jst2000 (struct recvbuf *);
+
+static int jjy_start (int, struct peer *);
+static void jjy_shutdown (int, struct peer *);
+
+static void jjy_poll (int, struct peer *);
+static void jjy_poll_tristate_jjy01 (int, struct peer *);
+static void jjy_poll_cdex_jst2000 (int, struct peer *);
+static void jjy_poll_echokeisokuki_lt2000 (int, struct peer *);
+static void jjy_poll_citizentic_jjy200 (int, struct peer *);
+static void jjy_poll_tristate_gpsclock01 (int, struct peer *);
+
+static void jjy_receive (struct recvbuf *);
+static int jjy_receive_tristate_jjy01 (struct recvbuf *);
+static int jjy_receive_cdex_jst2000 (struct recvbuf *);
static int jjy_receive_echokeisokuki_lt2000 (struct recvbuf *);
-static int jjy_receive_citizentic_jjy200 (struct recvbuf *);
+static int jjy_receive_citizentic_jjy200 (struct recvbuf *);
+static int jjy_receive_tristate_gpsclock01 (struct recvbuf *);
static void printableString ( char*, int, char*, int ) ;
@@ -284,9 +311,46 @@ static struct
{ TS_JJY01_COMMAND_NUMBER_DATE, "date", "date\r\n", 6 },
/* stim<CR><LF> -> HH:MM:SS<CR><LF> */
{ TS_JJY01_COMMAND_NUMBER_STIM, "stim", "stim\r\n", 6 },
- { 0 , NULL , NULL , 0 }
+ /* End of command */
+ { 0, NULL, NULL, 0 }
} ;
+/*
+ * Tristate TS-GPSCLOCK01 constants definition
+ */
+
+#define TS_GPSCLOCK01_COMMAND_NUMBER_DATE 1
+#define TS_GPSCLOCK01_COMMAND_NUMBER_TIME 2
+#define TS_GPSCLOCK01_COMMAND_NUMBER_STUS 4
+
+#define TS_GPSCLOCK01_REPLY_DATE "yyyy/mm/dd\r\n"
+#define TS_GPSCLOCK01_REPLY_TIME "hh:mm:ss\r\n"
+#define TS_GPSCLOCK01_REPLY_STUS_RTC "*R\r\n"
+#define TS_GPSCLOCK01_REPLY_STUS_GPS "*G\r\n"
+#define TS_GPSCLOCK01_REPLY_STUS_UTC "*U\r\n"
+#define TS_GPSCLOCK01_REPLY_STUS_PPS "+U\r\n"
+
+#define TS_GPSCLOCK01_REPLY_LENGTH_DATE 10 /* Length without <CR><LF> */
+#define TS_GPSCLOCK01_REPLY_LENGTH_TIME 8 /* Length without <CR><LF> */
+#define TS_GPSCLOCK01_REPLY_LENGTH_STUS 2 /* Length without <CR><LF> */
+
+static struct
+{
+ char commandNumber ;
+ char *commandLog ;
+ char *command ;
+ int commandLength ;
+} tristate_gpsclock01_command_sequence[] =
+{
+ /* stus<CR><LF> -> *R<CR><LF> or *G<CR><LF> or *U<CR><LF> or +U<CR><LF> */
+ { TS_GPSCLOCK01_COMMAND_NUMBER_STUS, "stus", "stus\r\n", 6 },
+ /* date<CR><LF> -> YYYY/MM/DD WWW<CR><LF> */
+ { TS_GPSCLOCK01_COMMAND_NUMBER_DATE, "date", "date\r\n", 6 },
+ /* time<CR><LF> -> HH:MM:SS<CR><LF> */
+ { TS_GPSCLOCK01_COMMAND_NUMBER_TIME, "time", "time\r\n", 6 },
+ /* End of command */
+ { 0, NULL, NULL, 0 }
+} ;
/**************************************************************************************************/
/* jjy_start - open the devices and initialize data for processing */
@@ -302,6 +366,8 @@ jjy_start ( int unit, struct peer *peer )
short iDiscipline ;
int iSpeed232 ;
+ char sLogText [ MAX_LOGTEXT ] , sDevText [ MAX_LOGTEXT ] ;
+
#ifdef DEBUG
if ( debug ) {
printf ( "jjy_start (refclock_jjy.c) : %s mode=%d ", ntoa(&peer->srcadr), peer->ttl ) ;
@@ -309,6 +375,10 @@ jjy_start ( int unit, struct peer *peer )
printf ( "\n" ) ;
}
#endif
+ snprintf ( sDevText, sizeof(sDevText), DEVICE, unit ) ;
+ snprintf ( sLogText, sizeof(sLogText), "*Initialze* %s mode=%d", sDevText, peer->ttl ) ;
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
+
/*
* Open serial port
*/
@@ -336,6 +406,10 @@ jjy_start ( int unit, struct peer *peer )
iDiscipline = LDISC_CLK ;
iSpeed232 = SPEED232_CITIZENTIC_JJY200 ;
break ;
+ case 5 :
+ iDiscipline = LDISC_CLK ;
+ iSpeed232 = SPEED232_TRISTATE_GPSCLOCK01 ;
+ break ;
default :
msyslog ( LOG_ERR, "JJY receiver [ %s mode %d ] : Unsupported mode",
ntoa(&peer->srcadr), peer->ttl ) ;
@@ -343,7 +417,8 @@ jjy_start ( int unit, struct peer *peer )
return RC_START_ERROR ;
}
- if ( ! ( fd = refclock_open ( pDeviceName, iSpeed232, iDiscipline ) ) ) {
+ fd = refclock_open ( pDeviceName, iSpeed232, iDiscipline ) ;
+ if ( fd <= 0 ) {
free ( (void*) pDeviceName ) ;
return RC_START_ERROR ;
}
@@ -398,6 +473,9 @@ jjy_start ( int unit, struct peer *peer )
up->lineexpect = 1 ;
up->charexpect[0] = 23 ; /* 'XX YY/MM/DD W HH:MM:SS<CR> */
break ;
+ case 5 :
+ up->unittype = UNITTYPE_TRISTATE_GPSCLOCK01 ;
+ break ;
/* 2010/11/20 */
/* The "default:" section of this switch block is never executed, */
@@ -408,9 +486,9 @@ jjy_start ( int unit, struct peer *peer )
}
pp = peer->procptr ;
- pp->unitptr = (caddr_t) up ;
+ pp->unitptr = up ;
pp->io.clock_recv = jjy_receive ;
- pp->io.srcclock = (caddr_t) peer ;
+ pp->io.srcclock = peer ;
pp->io.datalen = 0 ;
pp->io.fd = fd ;
if ( ! io_addclock(&pp->io) ) {
@@ -425,7 +503,6 @@ jjy_start ( int unit, struct peer *peer )
* Initialize miscellaneous variables
*/
peer->precision = PRECISION ;
- peer->burst = 1 ;
pp->clockdesc = DESCRIPTION ;
memcpy ( (char*)&pp->refid, REFID, strlen(REFID) ) ;
@@ -445,7 +522,7 @@ jjy_shutdown ( int unit, struct peer *peer )
struct refclockproc *pp;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( -1 != pp->io.fd )
io_closeclock ( &pp->io ) ;
if ( NULL != up )
@@ -473,9 +550,9 @@ jjy_receive ( struct recvbuf *rbufp )
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *) rbufp->recv_srcclock ;
+ peer = rbufp->recv_peer ;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
/*
* Get next input line
@@ -523,6 +600,17 @@ jjy_receive ( struct recvbuf *rbufp )
* We get down to business
*/
+#ifdef DEBUG
+ if ( debug ) {
+ if ( up->linediscipline == LDISC_RAW ) {
+ printableString( sLogText, MAX_LOGTEXT, up->rawbuf, up->charcount ) ;
+ } else {
+ printableString( sLogText, MAX_LOGTEXT, pp->a_lastcode, pp->lencode ) ;
+ }
+ printf ( "jjy_receive (refclock_jjy.c) : [%s]\n", sLogText ) ;
+ }
+#endif
+
pp->lastrec = tRecvTimestamp ;
up->linecount ++ ;
@@ -547,6 +635,10 @@ jjy_receive ( struct recvbuf *rbufp )
rc = jjy_receive_citizentic_jjy200 ( rbufp ) ;
break ;
+ case UNITTYPE_TRISTATE_GPSCLOCK01 :
+ rc = jjy_receive_tristate_gpsclock01 ( rbufp ) ;
+ break ;
+
default :
rc = 0 ;
break ;
@@ -567,29 +659,27 @@ jjy_receive ( struct recvbuf *rbufp )
}
}
- if ( rc == 0 )
+ if ( rc == 0 ) {
return ;
+ }
up->bPollFlag = 0 ;
if ( up->lineerror != 0 ) {
refclock_report ( peer, CEVNT_BADREPLY ) ;
- strncpy ( sLogText, "BAD REPLY [",
+ strlcpy ( sLogText, "BAD REPLY [",
sizeof( sLogText ) ) ;
if ( up->linediscipline == LDISC_RAW ) {
- strncat ( sLogText, up->rawbuf,
- sizeof( sLogText ) -
- strlen ( sLogText ) - 1 ) ;
+ strlcat ( sLogText, up->rawbuf,
+ sizeof( sLogText ) ) ;
} else {
- strncat ( sLogText, pp->a_lastcode,
- sizeof( sLogText ) -
- strlen ( sLogText ) - 1 ) ;
+ strlcat ( sLogText, pp->a_lastcode,
+ sizeof( sLogText ) ) ;
}
sLogText[MAX_LOGTEXT-1] = 0 ;
if ( strlen ( sLogText ) < MAX_LOGTEXT - 2 )
- strncat ( sLogText, "]",
- sizeof( sLogText ) -
- strlen ( sLogText ) - 1 ) ;
+ strlcat ( sLogText, "]",
+ sizeof( sLogText ) ) ;
record_clock_stats ( &peer->srcadr, sLogText ) ;
return ;
}
@@ -650,8 +740,9 @@ jjy_receive ( struct recvbuf *rbufp )
static int
jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
{
-
+#ifdef DEBUG
static char *sFunctionName = "jjy_receive_tristate_jjy01" ;
+#endif
struct jjyunit *up ;
struct refclockproc *pp ;
@@ -671,9 +762,9 @@ jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *) rbufp->recv_srcclock ;
+ peer = rbufp->recv_peer ;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( up->linediscipline == LDISC_RAW ) {
pBuf = up->rawbuf ;
@@ -734,8 +825,7 @@ jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
}
up->msecond = 0 ;
- if ( up->hour == 0 && up->minute == 0 &&
- up->second <= 2 ) {
+ if ( up->hour == 0 && up->minute == 0 && up->second <= 2 ) {
/*
* The command "date" and "time" ( or "stim" ) were sent to the JJY receiver separately,
* and the JJY receiver replies a date and time separately.
@@ -839,8 +929,9 @@ jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
static int
jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
{
-
+#ifdef DEBUG
static char *sFunctionName = "jjy_receive_cdex_jst2000" ;
+#endif
struct jjyunit *up ;
struct refclockproc *pp ;
@@ -853,9 +944,9 @@ jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *) rbufp->recv_srcclock ;
+ peer = rbufp->recv_peer ;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( up->linediscipline == LDISC_RAW ) {
pBuf = up->rawbuf ;
@@ -918,8 +1009,9 @@ jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
static int
jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
{
-
+#ifdef DEBUG
static char *sFunctionName = "jjy_receive_echokeisokuki_lt2000" ;
+#endif
struct jjyunit *up ;
struct refclockproc *pp ;
@@ -933,9 +1025,9 @@ jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *) rbufp->recv_srcclock ;
+ peer = rbufp->recv_peer ;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( up->linediscipline == LDISC_RAW ) {
pBuf = up->rawbuf ;
@@ -1076,8 +1168,9 @@ jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
static int
jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
{
-
+#ifdef DEBUG
static char *sFunctionName = "jjy_receive_citizentic_jjy200" ;
+#endif
struct jjyunit *up ;
struct refclockproc *pp ;
@@ -1092,9 +1185,9 @@ jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *) rbufp->recv_srcclock ;
+ peer = rbufp->recv_peer ;
pp = peer->procptr ;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( up->linediscipline == LDISC_RAW ) {
pBuf = up->rawbuf ;
@@ -1166,6 +1259,199 @@ jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
}
/**************************************************************************************************/
+
+static int
+jjy_receive_tristate_gpsclock01 ( struct recvbuf *rbufp )
+{
+#ifdef DEBUG
+ static char *sFunctionName = "jjy_receive_tristate_gpsclock01" ;
+#endif
+
+ struct jjyunit *up ;
+ struct refclockproc *pp ;
+ struct peer *peer;
+
+ char *pBuf ;
+ int iLen ;
+ int rc ;
+
+ int bOverMidnight = 0 ;
+
+ char sLogText [ MAX_LOGTEXT ], sReplyText [ MAX_LOGTEXT ] ;
+
+ char *pCmd ;
+ int iCmdLen ;
+
+ /*
+ * Initialize pointers and read the timecode and timestamp
+ */
+ peer = rbufp->recv_peer ;
+ pp = peer->procptr ;
+ up = pp->unitptr ;
+
+ if ( up->linediscipline == LDISC_RAW ) {
+ pBuf = up->rawbuf ;
+ iLen = up->charcount ;
+ } else {
+ pBuf = pp->a_lastcode ;
+ iLen = pp->lencode ;
+ }
+
+ /*
+ * Ignore NMEA data stream
+ */
+ if ( iLen > 5
+ && ( strncmp( pBuf, "$GP", 3 ) == 0 || strncmp( pBuf, "$PFEC", 5 ) == 0 ) ) {
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "%s (refclock_jjy.c) : Skip NMEA stream [%s]\n",
+ sFunctionName, pBuf ) ;
+ }
+#endif
+ return 0 ;
+ }
+
+ /*
+ * Skip command prompt '$Cmd>' from the TS-GPSclock-01
+ */
+ if ( iLen == 5 && strncmp( pBuf, "$Cmd>", 5 ) == 0 ) {
+ return 0 ;
+ } else if ( iLen > 5 && strncmp( pBuf, "$Cmd>", 5 ) == 0 ) {
+ pBuf += 5 ;
+ iLen -= 5 ;
+ }
+
+ /*
+ * Ignore NMEA data stream after command prompt
+ */
+ if ( iLen > 5
+ && ( strncmp( pBuf, "$GP", 3 ) == 0 || strncmp( pBuf, "$PFEC", 5 ) == 0 ) ) {
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "%s (refclock_jjy.c) : Skip NMEA stream [%s]\n",
+ sFunctionName, pBuf ) ;
+ }
+#endif
+ return 0 ;
+ }
+
+ switch ( tristate_gpsclock01_command_sequence[up->linecount-1].commandNumber ) {
+
+ case TS_GPSCLOCK01_COMMAND_NUMBER_DATE : /* YYYY/MM/DD */
+
+ if ( iLen != TS_GPSCLOCK01_REPLY_LENGTH_DATE ) {
+ 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 ;
+ }
+
+ break ;
+
+ case TS_GPSCLOCK01_COMMAND_NUMBER_TIME : /* HH:MM:SS */
+
+ if ( iLen != TS_GPSCLOCK01_REPLY_LENGTH_TIME ) {
+ 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" were sent to the JJY receiver separately,
+ * and the JJY receiver replies a date and time separately.
+ * Just after midnight transitions, we ignore this time.
+ */
+ bOverMidnight = 1 ;
+ }
+
+ break ;
+
+ case TS_GPSCLOCK01_COMMAND_NUMBER_STUS :
+
+ if ( iLen == TS_GPSCLOCK01_REPLY_LENGTH_STUS
+ && ( strncmp( pBuf, TS_GPSCLOCK01_REPLY_STUS_RTC, TS_GPSCLOCK01_REPLY_LENGTH_STUS ) == 0
+ || strncmp( pBuf, TS_GPSCLOCK01_REPLY_STUS_GPS, TS_GPSCLOCK01_REPLY_LENGTH_STUS ) == 0
+ || strncmp( pBuf, TS_GPSCLOCK01_REPLY_STUS_UTC, TS_GPSCLOCK01_REPLY_LENGTH_STUS ) == 0
+ || strncmp( pBuf, TS_GPSCLOCK01_REPLY_STUS_PPS, TS_GPSCLOCK01_REPLY_LENGTH_STUS ) == 0 ) ) {
+ /* Good */
+ } else {
+ up->lineerror = 1 ;
+ break ;
+ }
+
+ break ;
+
+ default : /* Unexpected reply */
+
+ up->lineerror = 1 ;
+ break ;
+
+ }
+
+ /* Clockstats Log */
+
+ printableString( sReplyText, sizeof(sReplyText), pBuf, iLen ) ;
+ snprintf ( sLogText, sizeof(sLogText), "%d: %s -> %c: %s",
+ up->linecount,
+ tristate_gpsclock01_command_sequence[up->linecount-1].commandLog,
+ ( up->lineerror == 0 )
+ ? ( ( bOverMidnight == 0 )
+ ? 'O'
+ : 'S' )
+ : 'X',
+ sReplyText ) ;
+ record_clock_stats ( &peer->srcadr, sLogText ) ;
+
+ /* Check before issue next command */
+
+ if ( up->lineerror != 0 ) {
+ /* Do not issue next command */
+ return 0 ;
+ }
+
+ if ( bOverMidnight != 0 ) {
+ /* Do not issue next command */
+ return 0 ;
+ }
+
+ if ( tristate_gpsclock01_command_sequence[up->linecount].command == NULL ) {
+ /* Command sequence completed */
+ return 1 ;
+ }
+
+ /* Issue next command */
+
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "%s (refclock_jjy.c) : send '%s'\n",
+ sFunctionName, tristate_gpsclock01_command_sequence[up->linecount].commandLog ) ;
+ }
+#endif
+
+ pCmd = tristate_gpsclock01_command_sequence[up->linecount].command ;
+ iCmdLen = tristate_gpsclock01_command_sequence[up->linecount].commandLength ;
+ if ( write ( pp->io.fd, pCmd, iCmdLen ) != iCmdLen ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+
+ return 0 ;
+
+}
+
+/**************************************************************************************************/
/* jjy_poll - called by the transmit procedure */
/**************************************************************************************************/
static void
@@ -1176,7 +1462,7 @@ jjy_poll ( int unit, struct peer *peer )
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( pp->polls > 0 && up->linecount == 0 ) {
/*
@@ -1216,6 +1502,10 @@ jjy_poll ( int unit, struct peer *peer )
jjy_poll_citizentic_jjy200 ( unit, peer ) ;
break ;
+ case UNITTYPE_TRISTATE_GPSCLOCK01 :
+ jjy_poll_tristate_gpsclock01 ( unit, peer ) ;
+ break ;
+
default :
break ;
@@ -1228,8 +1518,9 @@ jjy_poll ( int unit, struct peer *peer )
static void
jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
{
-
+#ifdef DEBUG
static char *sFunctionName = "jjy_poll_tristate_jjy01" ;
+#endif
struct jjyunit *up;
struct refclockproc *pp;
@@ -1238,7 +1529,7 @@ jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
int iCmdLen ;
pp = peer->procptr;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
if ( ( pp->sloppyclockflag & CLK_FLAG1 ) == 0 ) {
up->linecount = 2 ;
@@ -1310,7 +1601,7 @@ jjy_poll_echokeisokuki_lt2000 ( int unit, struct peer *peer )
char sCmd[2] ;
pp = peer->procptr;
- up = (struct jjyunit *) pp->unitptr ;
+ up = pp->unitptr ;
/*
* Send "T" or "C" command
@@ -1347,9 +1638,58 @@ jjy_poll_citizentic_jjy200 ( int unit, struct peer *peer )
/**************************************************************************************************/
static void
-printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
+jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
{
+#ifdef DEBUG
+ static char *sFunctionName = "jjy_poll_tristate_gpsclock01" ;
+#endif
+
+ struct jjyunit *up;
+ struct refclockproc *pp;
+
+ char *pCmd ;
+ int iCmdLen ;
+
+ pp = peer->procptr;
+ up = pp->unitptr ;
+
+ if ( ( pp->sloppyclockflag & CLK_FLAG1 ) == 0 ) {
+ up->linecount = 1 ;
+ }
+
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "%s (refclock_jjy.c) : flag1=%X CLK_FLAG1=%X up->linecount=%d\n",
+ sFunctionName, pp->sloppyclockflag, CLK_FLAG1,
+ up->linecount ) ;
+ }
+#endif
+
+ /*
+ * Send a first command
+ */
+
+#ifdef DEBUG
+ if ( debug ) {
+ printf ( "%s (refclock_jjy.c) : send '%s'\n",
+ sFunctionName,
+ tristate_gpsclock01_command_sequence[up->linecount].commandLog ) ;
+ }
+#endif
+
+ pCmd = tristate_gpsclock01_command_sequence[up->linecount].command ;
+ iCmdLen = tristate_gpsclock01_command_sequence[up->linecount].commandLength ;
+ if ( write ( pp->io.fd, pCmd, iCmdLen ) != iCmdLen ) {
+ refclock_report ( peer, CEVNT_FAULT ) ;
+ }
+
+}
+/**************************************************************************************************/
+
+static void
+printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
+{
char *printableControlChar[] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>",
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
@@ -1360,28 +1700,34 @@ printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
"<CAN>", "<EM>" , "<SUB>", "<ESC>",
"<FS>" , "<GS>" , "<RS>" , "<US>" ,
" " } ;
-
- int i, j, n ;
-
- for ( i = j = 0 ; i < iInputLen && j < iOutputLen ; i ++ ) {
+ size_t InputLen;
+ size_t OutputLen;
+ size_t i;
+ size_t j;
+ size_t n;
+
+ InputLen = (size_t)iInputLen;
+ OutputLen = (size_t)iOutputLen;
+ for ( i = j = 0 ; i < InputLen && j < OutputLen ; i ++ ) {
if ( isprint( sInput[i] ) ) {
n = 1 ;
- if ( j + 1 >= iOutputLen )
+ if ( j + 1 >= OutputLen )
break ;
sOutput[j] = sInput[i] ;
} else if ( ( sInput[i] & 0xFF ) <
COUNTOF(printableControlChar) ) {
n = strlen( printableControlChar[sInput[i] & 0xFF] ) ;
- if ( j + n + 1 >= iOutputLen )
+ if ( j + n + 1 >= OutputLen )
break ;
- strncpy( sOutput + j,
+ strlcpy( sOutput + j,
printableControlChar[sInput[i] & 0xFF],
- (size_t)iOutputLen - j ) ;
+ OutputLen - j ) ;
} else {
n = 5 ;
- if ( j + n + 1 >= iOutputLen ) break ;
- snprintf( sOutput + j, (size_t)iOutputLen - j,
- "<x%X>", sInput[i] & 0xFF ) ;
+ if ( j + n + 1 >= OutputLen )
+ break ;
+ snprintf( sOutput + j, OutputLen - j, "<x%X>",
+ sInput[i] & 0xFF ) ;
}
j += n ;
}
diff --git a/ntpd/refclock_jupiter.c b/ntpd/refclock_jupiter.c
index 844d24f59daa..377fc563229a 100644
--- a/ntpd/refclock_jupiter.c
+++ b/ntpd/refclock_jupiter.c
@@ -52,17 +52,12 @@
# include "ppsapi_timepps.h"
#endif
-#ifdef XNTP_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
#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);
+#define getshort(s) ((u_short)(s))
+#define putshort(s) ((u_short)(s))
#endif
/*
@@ -138,14 +133,15 @@ struct instance {
static void jupiter_canmsg (struct instance *, u_int);
static u_short jupiter_cksum (u_short *, u_int);
static int jupiter_config (struct instance *);
-static void jupiter_debug (struct peer *, char *, char *, ...)
- __attribute__ ((format (printf, 3, 4)));
+static void jupiter_debug (struct peer *, const char *,
+ const char *, ...)
+ __attribute__ ((format (printf, 3, 4)));
static char * jupiter_parse_t (struct instance *, u_short *);
static char * jupiter_parse_gpos (struct instance *, u_short *);
static void jupiter_platform (struct instance *, u_int);
static void jupiter_poll (int, struct peer *);
-static void jupiter_control (int, struct refclockstat *, struct
- refclockstat *, struct peer *);
+static void jupiter_control (int, const struct refclockstat *,
+ struct refclockstat *, struct peer *);
#ifdef HAVE_PPSAPI
static int jupiter_ppsapi (struct instance *);
static int jupiter_pps (struct instance *);
@@ -153,9 +149,9 @@ static int jupiter_pps (struct instance *);
static int jupiter_recv (struct instance *);
static void jupiter_receive (struct recvbuf *rbufp);
static void jupiter_reqmsg (struct instance *, u_int, u_int);
-static void jupiter_reqonemsg (struct instance *, u_int);
+static void jupiter_reqonemsg(struct instance *, u_int);
static char * jupiter_send (struct instance *, struct jheader *);
-static void jupiter_shutdown (int, struct peer *);
+static void jupiter_shutdown(int, struct peer *);
static int jupiter_start (int, struct peer *);
/*
@@ -182,7 +178,7 @@ jupiter_start(
{
struct refclockproc *pp;
struct instance *instance;
- int fd = -1;
+ int fd;
char gpsdev[20];
/*
@@ -190,27 +186,27 @@ jupiter_start(
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
fd = refclock_open(gpsdev, SPEED232, LDISC_RAW);
- if (fd == 0) {
- jupiter_debug(peer, "jupiter_start", "open %s: %s",
- gpsdev, strerror(errno));
+ if (fd <= 0) {
+ jupiter_debug(peer, "jupiter_start", "open %s: %m",
+ gpsdev);
return (0);
}
/* Allocate unit structure */
- instance = emalloc(sizeof(*instance));
- memset(instance, 0, sizeof(*instance));
+ instance = emalloc_zero(sizeof(*instance));
instance->peer = peer;
pp = peer->procptr;
pp->io.clock_recv = jupiter_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
close(fd);
+ pp->io.fd = -1;
free(instance);
return (0);
}
- pp->unitptr = (caddr_t)instance;
+ pp->unitptr = instance;
/*
* Initialize miscellaneous variables
@@ -257,7 +253,7 @@ jupiter_shutdown(int unit, struct peer *peer)
struct refclockproc *pp;
pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
+ instance = pp->unitptr;
if (!instance)
return;
@@ -268,7 +264,8 @@ jupiter_shutdown(int unit, struct peer *peer)
}
#endif /* HAVE_PPSAPI */
- io_closeclock(&pp->io);
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
free(instance);
}
@@ -364,7 +361,7 @@ jupiter_ppsapi(
"refclock_jupiter: time_pps_kcbind failed: %m");
return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
/* instance->peer->precision = PPS_PRECISION; */
@@ -422,7 +419,7 @@ jupiter_pps(struct instance *instance)
return 1;
instance->ts = ts;
- tstmp.l_ui = ts.tv_sec + JAN_1970;
+ tstmp.l_ui = (u_int32)ts.tv_sec + JAN_1970;
dtemp = ts.tv_nsec * FRAC / 1e9;
tstmp.l_uf = (u_int32)dtemp;
instance->peer->procptr->lastrec = tstmp;
@@ -440,7 +437,7 @@ jupiter_poll(int unit, struct peer *peer)
struct refclockproc *pp;
pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
+ instance = pp->unitptr;
/*
* You don't need to poll this clock. It puts out timecodes
@@ -475,7 +472,7 @@ jupiter_poll(int unit, struct peer *peer)
static void
jupiter_control(
int unit, /* unit (not used) */
- struct refclockstat *in, /* input parameters (not used) */
+ const struct refclockstat *in, /* input parameters (not used) */
struct refclockstat *out, /* output parameters (not used) */
struct peer *peer /* peer structure pointer */
)
@@ -485,7 +482,7 @@ jupiter_control(
u_char sloppyclockflag;
pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
+ instance = pp->unitptr;
DTOLFP(pp->fudgetime2, &instance->limit);
/* Force positive value. */
@@ -530,15 +527,15 @@ jupiter_receive(struct recvbuf *rbufp)
l_fp tstamp;
/* Initialize pointers and read the timecode and timestamp */
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- instance = (struct instance *)pp->unitptr;
+ instance = pp->unitptr;
bp = (u_char *)rbufp->recv_buffer;
bpcnt = rbufp->recv_length;
/* This shouldn't happen */
- if (bpcnt > sizeof(instance->sbuf) - instance->ssize)
+ if (bpcnt > (int)sizeof(instance->sbuf) - instance->ssize)
bpcnt = sizeof(instance->sbuf) - instance->ssize;
/* Append to input buffer */
@@ -612,7 +609,7 @@ jupiter_receive(struct recvbuf *rbufp)
break;
/* Add the new sample to a median filter */
- tstamp.l_ui = JAN_1970 + last_timecode;
+ tstamp.l_ui = JAN_1970 + (u_int32)last_timecode;
tstamp.l_uf = 0;
refclock_process_offset(pp, tstamp, pp->lastrec, pp->fudgetime1);
@@ -873,36 +870,27 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
/*
* 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__ */
+jupiter_debug(
+ struct peer * peer,
+ const char * function,
+ const char * fmt,
+ ...
+ )
{
- char buffer[200];
- va_list ap;
+ 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);
+ mvsnprintf(buffer, sizeof(buffer), fmt, ap);
+ record_clock_stats(&peer->srcadr, buffer);
#ifdef DEBUG
if (debug) {
- fprintf(stdout, "%s: ", function);
- fprintf(stdout, buffer);
- fprintf(stdout, "\n");
+ printf("%s: %s\n", function, buffer);
fflush(stdout);
}
#endif
@@ -930,10 +918,10 @@ jupiter_send(struct instance *instance, struct jheader *hp)
}
if ((cc = write(instance->peer->procptr->io.fd, (char *)hp, size)) < 0) {
- snprintf(errstr, sizeof(errstr), "write: %s", strerror(errno));
+ msnprintf(errstr, sizeof(errstr), "write: %m");
return (errstr);
- } else if (cc != size) {
- snprintf(errstr, sizeof(errstr), "short write (%d != %d)", cc, size);
+ } else if (cc != (int)size) {
+ snprintf(errstr, sizeof(errstr), "short write (%d != %u)", cc, size);
return (errstr);
}
return (NULL);
diff --git a/ntpd/refclock_leitch.c b/ntpd/refclock_leitch.c
index 52b65085c8f0..69ffdc5ed564 100644
--- a/ntpd/refclock_leitch.c
+++ b/ntpd/refclock_leitch.c
@@ -6,23 +6,17 @@
# include <config.h>
#endif
-#if defined(REFCLOCK) && defined(CLOCK_LEITCH)
+#include "ntp_types.h"
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
+#if defined(REFCLOCK) && defined(CLOCK_LEITCH)
#include <stdio.h>
#include <ctype.h>
-#ifdef STREAM
-#include <stropts.h>
-#if defined(LEITCHCLK)
-#include <sys/clkdefs.h>
-#endif /* LEITCHCLK */
-#endif /* STREAM */
-
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "timevalops.h"
#include "ntp_stdlib.h"
@@ -101,7 +95,7 @@ static void leitch_init (void);
static int leitch_start (int, struct peer *);
static void leitch_shutdown (int, struct peer *);
static void leitch_poll (int, struct peer *);
-static void leitch_control (int, struct refclockstat *, struct refclockstat *, struct peer *);
+static void leitch_control (int, const struct refclockstat *, struct refclockstat *, struct peer *);
#define leitch_buginfo noentry
static void leitch_receive (struct recvbuf *);
static void leitch_process (struct leitchunit *);
@@ -201,7 +195,7 @@ leitch_poll(
static void
leitch_control(
int unit,
- struct refclockstat *in,
+ const struct refclockstat *in,
struct refclockstat *out,
struct peer *passed_peer
)
@@ -303,9 +297,6 @@ leitch_start(
#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;
@@ -332,27 +323,12 @@ leitch_start(
}
}
#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 */
+ {
+ struct sgttyb ttyb;
if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
msyslog(LOG_ERR,
@@ -360,25 +336,13 @@ leitch_start(
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 */
@@ -391,7 +355,7 @@ leitch_start(
leitch->fudge1 = 15; /* 15ms */
leitch->leitchio.clock_recv = leitch_receive;
- leitch->leitchio.srcclock = (caddr_t) leitch;
+ leitch->leitchio.srcclock = peer;
leitch->leitchio.datalen = 0;
leitch->leitchio.fd = fd232;
if (!io_addclock(&leitch->leitchio)) {
@@ -426,7 +390,7 @@ leitch_receive(
struct recvbuf *rbufp
)
{
- struct leitchunit *leitch = (struct leitchunit *)rbufp->recv_srcclock;
+ struct leitchunit *leitch = rbufp->recv_peer->procptr->unitptr;
#ifdef DEBUG
if (debug)
@@ -632,5 +596,5 @@ leitch_get_time(
}
#else
-int refclock_leitch_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/ntpd/refclock_msfees.c b/ntpd/refclock_msfees.c
index 1b25c1c38c4e..8399c96e78ab 100644
--- a/ntpd/refclock_msfees.c
+++ b/ntpd/refclock_msfees.c
@@ -4,6 +4,8 @@
#include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_MSFEES) && defined(PPS)
/* Currently REQUIRES STREAM and PPSCD. CLK and CBREAK modes
@@ -14,8 +16,7 @@
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
+#include "timevalops.h"
#include <ctype.h>
#if defined(HAVE_BSD_TTYS)
@@ -349,11 +350,7 @@ 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 */
/*
@@ -537,7 +534,7 @@ msfees_start(
ees->timestarted= current_time;
ees->ttytype = 0;
ees->io.clock_recv= ees_receive;
- ees->io.srcclock= (caddr_t)ees;
+ ees->io.srcclock= peer;
ees->io.datalen = 0;
ees->io.fd = fd232;
@@ -589,7 +586,7 @@ msfees_start(
peer->refid = htonl(EESHSREFID);
}
unitinuse[unit] = 1;
- pp->unitptr = (caddr_t) &eesunits[unit];
+ pp->unitptr = &eesunits[unit];
pp->clockdesc = EESDESCRIPTION;
msyslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
return (1);
@@ -677,7 +674,7 @@ ees_receive(
#endif
/* Get the clock this applies to and a pointer to the data */
- ees = (struct eesunit *)rbufp->recv_srcclock;
+ ees = (struct eesunit *)rbufp->recv_peer->procptr->unitptr;
dpt = (u_char *)&rbufp->recv_space;
dpend = dpt + rbufp->recv_length;
if ((dbg & DB_LOG_AWAITMORE) && (rbufp->recv_length != LENEESCODE))
@@ -921,9 +918,9 @@ ees_receive(
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)
+ else {
+ pps_arrvstamp = tval_stamp_to_lfp(ppsclockev.tv);
+ /* if ((ABS(time difference) - 0.25) < 0)
* then believe it ...
*/
l_fp diff;
@@ -1227,7 +1224,6 @@ ees_receive(
/* offcompare - auxiliary comparison routine for offset sort */
-#ifdef QSORT_USES_VOID_P
static int
offcompare(
const void *va,
@@ -1238,16 +1234,6 @@ offcompare(
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 */
@@ -1289,16 +1275,11 @@ ees_process(
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:");
+ if (ees->dump_vals)
+ dump_buf(coffs, 0, samples, "Raw data is:");
/* Sort the offsets, trim off the extremes, then choose one. */
- qsort(
-#ifdef QSORT_USES_VOID_P
- (void *)
-#else
- (char *)
-#endif
- coffs, (size_t)samples, sizeof(l_fp), offcompare);
+ qsort(coffs, (size_t)samples, sizeof(coffs[0]), offcompare);
noff = samples;
i = 0;
@@ -1430,7 +1411,7 @@ ees_process(
* reference time, and lastsampletime as the receive time.
*/
if (ees->fix_pending) {
- msyslog(LOG_ERR, "MSF%d: fix_pending=%d -> jump %x.%08x\n",
+ msyslog(LOG_ERR, "MSF%d: fix_pending=%d -> jump %x.%08x",
ees->fix_pending, ees->unit, offset.l_i, offset.l_f);
ees->fix_pending = 0;
}
@@ -1465,5 +1446,5 @@ msfees_poll(
#else
-int refclock_msfees_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/ntpd/refclock_mx4200.c b/ntpd/refclock_mx4200.c
index f863dca08d98..c9422290d39a 100644
--- a/ntpd/refclock_mx4200.c
+++ b/ntpd/refclock_mx4200.c
@@ -67,8 +67,6 @@
# include <sys/ppsclock.h>
#endif
-#include "ntp_sprintf.h"
-
#ifndef HAVE_STRUCT_PPSCLOCKEV
struct ppsclockev {
# ifdef HAVE_STRUCT_TIMESPEC
@@ -175,11 +173,7 @@ static void mx4200_poll (int, struct peer *);
static char * mx4200_parse_t (struct peer *);
static char * mx4200_parse_p (struct peer *);
static char * mx4200_parse_s (struct peer *);
-#ifdef QSORT_USES_VOID_P
int mx4200_cmpl_fp (const void *, const void *);
-#else
-int mx4200_cmpl_fp (const l_fp *, const l_fp *);
-#endif /* not QSORT_USES_VOID_P */
static int mx4200_config (struct peer *);
static void mx4200_ref (struct peer *);
static void mx4200_send (struct peer *, char *, ...)
@@ -223,18 +217,17 @@ mx4200_start(
* Open serial port
*/
snprintf(gpsdev, sizeof(gpsdev), DEVICE, unit);
- if (!(fd = refclock_open(gpsdev, SPEED232, LDISC_PPS))) {
- return (0);
- }
+ fd = refclock_open(gpsdev, SPEED232, LDISC_PPS);
+ if (fd <= 0)
+ return 0;
/*
* Allocate unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = mx4200_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -243,7 +236,7 @@ mx4200_start(
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -270,7 +263,7 @@ mx4200_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -293,7 +286,7 @@ mx4200_config(
int mode;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Initialize the unit variables
@@ -493,7 +486,7 @@ mx4200_ref(
char nsc, ewc;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/* Should never happen! */
if (up->moving) return;
@@ -611,7 +604,7 @@ mx4200_poll(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* You don't need to poll this clock. It puts out timecodes
@@ -678,9 +671,9 @@ mx4200_receive(
/*
* Initialize pointers and read the timecode and timestamp.
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* If operating mode has been changed, then reinitialize the receiver
@@ -844,7 +837,7 @@ mx4200_receive(
* Capture the last PPS signal.
* Precision timestamp is returned in pp->lastrec
*/
- if (mx4200_pps(peer) != NULL) {
+ if (0 != mx4200_pps(peer)) {
mx4200_debug(peer, "mx4200_receive: pps failure\n");
refclock_report(peer, CEVNT_FAULT);
return;
@@ -964,7 +957,7 @@ mx4200_parse_t(
int oscillator_offset, time_mark_error, time_bias;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
leapsec_warn = 0; /* Not all receivers output leap second warnings (!) */
sscanf(pp->a_lastcode,
@@ -1244,7 +1237,7 @@ mx4200_parse_p(
char north_south, east_west;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/* Should never happen! */
if (up->moving) return ("mobile platform - no pos!");
@@ -1463,7 +1456,7 @@ mx4200_parse_s(
int sentence_type;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
sscanf ( pp->a_lastcode, "$PMVXG,%d", &sentence_type);
@@ -1508,7 +1501,7 @@ mx4200_pps(
struct timespec timeout;
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Grab the timestamp of the PPS signal.
@@ -1519,8 +1512,8 @@ mx4200_pps(
if (time_pps_fetch(up->pps_h, PPS_TSFMT_TSPEC, &(up->pps_i),
&timeout) < 0) {
mx4200_debug(peer,
- "mx4200_pps: time_pps_fetch: serial=%lu, %s\n",
- (unsigned long)up->pps_i.assert_sequence, strerror(errno));
+ "mx4200_pps: time_pps_fetch: serial=%lu, %m\n",
+ (unsigned long)up->pps_i.assert_sequence);
refclock_report(peer, CEVNT_FAULT);
return(1);
}
@@ -1561,15 +1554,8 @@ mx4200_pps(
/*
* 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__ */
{
#ifdef DEBUG
va_list ap;
@@ -1577,22 +1563,16 @@ mx4200_debug(peer, fmt, va_alist)
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;
-
+ up = pp->unitptr;
/*
* Print debug message to stdout
* In the future, we may want to get get more creative...
*/
- vprintf(fmt, ap);
+ mvprintf(fmt, ap);
va_end(ap);
}
@@ -1629,7 +1609,7 @@ mx4200_send(peer, fmt, va_alist)
#endif /* __STDC__ */
pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
+ up = pp->unitptr;
cp = buf;
*cp++ = '$';
diff --git a/ntpd/refclock_neoclock4x.c b/ntpd/refclock_neoclock4x.c
index c3d6033be28f..a0067e9c4675 100644
--- a/ntpd/refclock_neoclock4x.c
+++ b/ntpd/refclock_neoclock4x.c
@@ -131,20 +131,20 @@ struct neoclock4x_unit {
int utc_msec;
};
-static int neoclock4x_start (int, struct peer *);
+static int neoclock4x_start (int, struct peer *);
static void neoclock4x_shutdown (int, struct peer *);
static void neoclock4x_receive (struct recvbuf *);
static void neoclock4x_poll (int, struct peer *);
-static void neoclock4x_control (int, struct refclockstat *, struct refclockstat *, struct peer *);
+static void neoclock4x_control (int, const struct refclockstat *, struct refclockstat *, struct peer *);
-static int neol_atoi_len (const char str[], int *, int);
-static int neol_hexatoi_len (const char str[], int *, int);
-static void neol_jdn_to_ymd (unsigned long, int *, int *, int *);
-static void neol_localtime (unsigned long, int* , int*, int*, int*, int*, int*);
-static unsigned long neol_mktime (int, int, int, int, int, int);
+static int neol_atoi_len (const char str[], int *, int);
+static int neol_hexatoi_len (const char str[], int *, int);
+static void neol_jdn_to_ymd (unsigned long, int *, int *, int *);
+static void neol_localtime (unsigned long, int* , int*, int*, int*, int*, int*);
+static unsigned long neol_mktime (int, int, int, int, int, int);
#if !defined(NEOCLOCK4X_FIRMWARE)
-static int neol_query_firmware (int, int, char *, int);
-static int neol_check_firmware (int, const char*, char *);
+static int neol_query_firmware (int, int, char *, int);
+static int neol_check_firmware (int, const char*, char *);
#endif
struct refclock refclock_neoclock4x = {
@@ -294,9 +294,9 @@ neoclock4x_start(int unit,
memset((char *)up, 0, sizeof(struct neoclock4x_unit));
pp = peer->procptr;
pp->clockdesc = "NeoClock4X";
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->io.clock_recv = neoclock4x_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
/*
@@ -312,15 +312,14 @@ neoclock4x_start(int unit,
* 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, "?");
+ strlcpy(up->firmware, "?", sizeof(up->firmware));
up->firmwaretag = '?';
- strcpy(up->serial, "?");
- strcpy(up->radiosignal, "?");
+ strlcpy(up->serial, "?", sizeof(up->serial));
+ strlcpy(up->radiosignal, "?", sizeof(up->radiosignal));
up->timesource = '?';
up->dststatus = '?';
up->quarzstatus = '?';
@@ -336,7 +335,8 @@ neoclock4x_start(int unit,
#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)");
+ strlcpy(up->firmware, "(c) 2002 NEOL S.A. FRANCE / L0.01 NDF:A:* (compile time)",
+ sizeof(up->firmware));
up->firmwaretag = 'A';
#else
msyslog(LOG_EMERG, "NeoClock4X(%d): unknown firmware defined at compile time for NeoClock4X",
@@ -400,7 +400,7 @@ neoclock4x_shutdown(int unit,
pp = peer->procptr;
if(pp != NULL)
{
- up = (struct neoclock4x_unit *)pp->unitptr;
+ up = pp->unitptr;
if(up != NULL)
{
if(-1 != pp->io.fd)
@@ -454,9 +454,9 @@ neoclock4x_receive(struct recvbuf *rbufp)
unsigned char calc_chksum;
int recv_chksum;
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct neoclock4x_unit *)pp->unitptr;
+ up = pp->unitptr;
/* wait till poll interval is reached */
if(0 == up->recvnow)
@@ -663,7 +663,7 @@ neoclock4x_poll(int unit,
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct neoclock4x_unit *)pp->unitptr;
+ up = pp->unitptr;
pp->polls++;
up->recvnow = 1;
@@ -671,7 +671,7 @@ neoclock4x_poll(int unit,
static void
neoclock4x_control(int unit,
- struct refclockstat *in,
+ const struct refclockstat *in,
struct refclockstat *out,
struct peer *peer)
{
@@ -691,7 +691,7 @@ neoclock4x_control(int unit,
return;
}
- up = (struct neoclock4x_unit *)pp->unitptr;
+ up = pp->unitptr;
if(NULL == up)
{
msyslog(LOG_ERR, "NeoClock4X(%d): control: unit invalid/inactive", unit);
@@ -931,20 +931,20 @@ neol_query_firmware(int fd,
if(read_errors > 5)
{
msyslog(LOG_ERR, "NeoClock4X(%d): can't read firmware version (timeout)", unit);
- strcpy(tmpbuf, "unknown due to timeout");
+ strlcpy(tmpbuf, "unknown due to timeout", sizeof(tmpbuf));
break;
}
if(chars_read > 500)
{
msyslog(LOG_ERR, "NeoClock4X(%d): can't read firmware version (garbage)", unit);
- strcpy(tmpbuf, "unknown due to garbage input");
+ strlcpy(tmpbuf, "unknown due to garbage input", sizeof(tmpbuf));
break;
}
if(-1 == read(fd, &c, 1))
{
if(EAGAIN != errno)
{
- msyslog(LOG_DEBUG, "NeoClock4x(%d): read: %s", unit ,strerror(errno));
+ msyslog(LOG_DEBUG, "NeoClock4x(%d): read: %m", unit);
read_errors++;
}
else
@@ -963,7 +963,7 @@ neol_query_firmware(int fd,
if(0xA9 != c) /* wait for (c) char in input stream */
continue;
- strcpy(tmpbuf, "(c)");
+ strlcpy(tmpbuf, "(c)", sizeof(tmpbuf));
len = 3;
init = 0;
continue;
@@ -1008,10 +1008,10 @@ neol_query_firmware(int fd,
else
{
msyslog(LOG_ERR, "NeoClock4X(%d): can't query firmware version", unit);
- strcpy(tmpbuf, "unknown error");
+ strlcpy(tmpbuf, "unknown error", sizeof(tmpbuf));
}
- strncpy(firmware, tmpbuf, maxlen);
- firmware[maxlen] = '\0';
+ if (strlcpy(firmware, tmpbuf, maxlen) >= maxlen)
+ strlcpy(firmware, "buffer too small", maxlen);
if(flag)
{
diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c
index 22ec19d9015f..58867f47b3d5 100644
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -20,8 +20,12 @@
#include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_NMEA)
+#define NMEA_WRITE_SUPPORT 0 /* no write support at the moment */
+
#include <sys/stat.h>
#include <stdio.h>
#include <ctype.h>
@@ -32,26 +36,13 @@
#include "ntp_refclock.h"
#include "ntp_stdlib.h"
#include "ntp_calendar.h"
+#include "timespecops.h"
#ifdef HAVE_PPSAPI
# include "ppsapi_timepps.h"
# include "refclock_atom.h"
#endif /* HAVE_PPSAPI */
-#ifdef SYS_WINNT
-#undef write /* ports/winnt/include/config.h: #define write _write */
-extern int async_write(int, const void *, unsigned int);
-#define write(fd, data, octets) async_write(fd, data, octets)
-#endif
-
-#ifndef TIMESPECTOTS
-#define TIMESPECTOTS(ptspec, pts) \
- do { \
- DTOLFP((ptspec)->tv_nsec * 1.0e-9, pts); \
- (pts)->l_ui += (u_int32)((ptspec)->tv_sec) + JAN_1970; \
- } while (0)
-#endif
-
/*
* This driver supports NMEA-compatible GPS receivers
@@ -91,12 +82,63 @@ extern int async_write(int, const void *, unsigned int);
* 4 for 57600
* 5 for 115200
*/
-#define NMEA_MESSAGE_MASK_OLD 0x07
-#define NMEA_MESSAGE_MASK_SINGLE 0x08
-#define NMEA_MESSAGE_MASK (NMEA_MESSAGE_MASK_OLD | NMEA_MESSAGE_MASK_SINGLE)
+#define NMEA_MESSAGE_MASK 0x0000FF0FU
+#define NMEA_BAUDRATE_MASK 0x00000070U
+#define NMEA_BAUDRATE_SHIFT 4
+
+#define NMEA_DELAYMEAS_MASK 0x80
+#define NMEA_EXTLOG_MASK 0x00010000U
+#define NMEA_DATETRUST_MASK 0x02000000U
-#define NMEA_BAUDRATE_MASK 0x70
-#define NMEA_BAUDRATE_SHIFT 4
+#define NMEA_PROTO_IDLEN 5 /* tag name must be at least 5 chars */
+#define NMEA_PROTO_MINLEN 6 /* min chars in sentence, excluding CS */
+#define NMEA_PROTO_MAXLEN 80 /* max chars in sentence, excluding CS */
+#define NMEA_PROTO_FIELDS 32 /* not official; limit on fields per record */
+
+/*
+ * We check the timecode format and decode its contents. 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
+ *
+ * mode (0,1,2,3) selects sentence ANY/ALL, RMC, GGA, GLL, ZDA
+ * $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
+ * $GPRMC,232418.19,A,3513.8386,S,14900.7853,E,00.0,000.0,121199,12.,E*77
+ *
+ * Defining GPZDA to support Standard Time & Date
+ * sentence. The sentence has the following format
+ *
+ * $--ZDA,HHMMSS.SS,DD,MM,YYYY,TH,TM,*CS<CR><LF>
+ *
+ * Apart from the familiar fields,
+ * 'TH' Time zone Hours
+ * 'TM' Time zone Minutes
+ *
+ * Defining GPZDG to support Accord GPS Clock's custom NMEA
+ * sentence. The sentence has the following format
+ *
+ * $GPZDG,HHMMSS.S,DD,MM,YYYY,AA.BB,V*CS<CR><LF>
+ *
+ * It contains the GPS timestamp valid for next PPS pulse.
+ * Apart from the familiar fields,
+ * 'AA.BB' denotes the signal strength( should be < 05.00 )
+ * 'V' denotes the GPS sync status :
+ * '0' indicates INVALID time,
+ * '1' indicates accuracy of +/-20 ms
+ * '2' indicates accuracy of +/-100 ns
+ *
+ * Defining PGRMF for Garmin GPS Fix Data
+ * $PGRMF,WN,WS,DATE,TIME,LS,LAT,LAT_DIR,LON,LON_DIR,MODE,FIX,SPD,DIR,PDOP,TDOP
+ * WN -- GPS week number (weeks since 1980-01-06, mod 1024)
+ * WS -- GPS seconds in week
+ * LS -- GPS leap seconds, accumulated ( UTC + LS == GPS )
+ * FIX -- Fix type: 0=nofix, 1=2D, 2=3D
+ * DATE/TIME are standard date/time strings in UTC time scale
+ *
+ * The GPS time can be used to get the full century for the truncated
+ * date spec.
+ */
/*
* Definitions
@@ -135,115 +177,243 @@ extern int async_write(int, const void *, unsigned int);
* than the different timebase, $GPZDG is similar to $GPZDA.
*/
#define NMEA_GPZDG 4
-#define NMEA_ARRAY_SIZE (NMEA_GPZDG + 1)
+#define NMEA_PGRMF 5
+#define NMEA_ARRAY_SIZE (NMEA_PGRMF + 1)
/*
* Sentence selection mode bits
*/
-#define USE_ALL 0 /* any/all */
-#define USE_GPRMC 1
-#define USE_GPGGA 2
-#define USE_GPGLL 4
-#define USE_GPZDA_ZDG 8 /* affects both */
+#define USE_GPRMC 0x00000001u
+#define USE_GPGGA 0x00000002u
+#define USE_GPGLL 0x00000004u
+#define USE_GPZDA 0x00000008u
+#define USE_PGRMF 0x00000100u
/* mapping from sentence index to controlling mode bit */
-u_char sentence_mode[NMEA_ARRAY_SIZE] =
+static const u_int32 sentence_mode[NMEA_ARRAY_SIZE] =
{
USE_GPRMC,
USE_GPGGA,
USE_GPGLL,
- USE_GPZDA_ZDG,
- USE_GPZDA_ZDG
+ USE_GPZDA,
+ USE_GPZDA,
+ USE_PGRMF
+};
+
+/* date formats we support */
+enum date_fmt {
+ DATE_1_DDMMYY, /* use 1 field with 2-digit year */
+ DATE_3_DDMMYYYY /* use 3 fields with 4-digit year */
};
+/* results for 'field_init()'
+ *
+ * Note: If a checksum is present, the checksum test must pass OK or the
+ * sentence is tagged invalid.
+ */
+#define CHECK_EMPTY -1 /* no data */
+#define CHECK_INVALID 0 /* not a valid NMEA sentence */
+#define CHECK_VALID 1 /* valid but without checksum */
+#define CHECK_CSVALID 2 /* valid with checksum OK */
+
/*
* Unit control structure
*/
-struct nmeaunit {
+typedef struct {
#ifdef HAVE_PPSAPI
struct refclock_atom atom; /* PPSAPI structure */
- int ppsapi_tried; /* attempt PPSAPI once */
- int ppsapi_lit; /* time_pps_create() worked */
int ppsapi_fd; /* fd used with PPSAPI */
- int ppsapi_gate; /* allow edge detection processing */
- int tcount; /* timecode sample counter */
- int pcount; /* PPS sample counter */
+ u_char ppsapi_tried; /* attempt PPSAPI once */
+ u_char ppsapi_lit; /* time_pps_create() worked */
+ u_char ppsapi_gate; /* system is on PPS */
#endif /* HAVE_PPSAPI */
- l_fp tstamp; /* timestamp of last poll */
- int gps_time; /* 0 UTC, 1 GPS time */
- /* per sentence checksum seen flag */
- struct calendar used; /* hh:mm:ss of used sentence */
- u_char cksum_seen[NMEA_ARRAY_SIZE];
-};
+ u_char gps_time; /* use GPS time, not UTC */
+ u_short century_cache; /* cached current century */
+ l_fp last_reftime; /* last processed reference stamp */
+ short epoch_warp; /* last epoch warp, for logging */
+ /* tally stats, reset each poll cycle */
+ struct
+ {
+ u_int total;
+ u_int accepted;
+ u_int rejected; /* GPS said not enough signal */
+ u_int malformed; /* Bad checksum, invalid date or time */
+ u_int filtered; /* mode bits, not GPZDG, same second */
+ u_int pps_used;
+ }
+ tally;
+ /* per sentence checksum seen flag */
+ u_char cksum_type[NMEA_ARRAY_SIZE];
+} nmea_unit;
+
+/*
+ * helper for faster field access
+ */
+typedef struct {
+ char *base; /* buffer base */
+ char *cptr; /* current field ptr */
+ int blen; /* buffer length */
+ int cidx; /* current field index */
+} nmea_data;
+
+/*
+ * NMEA gps week/time information
+ * This record contains the number of weeks since 1980-01-06 modulo
+ * 1024, the seconds elapsed since start of the week, and the number of
+ * leap seconds that are the difference between GPS and UTC time scale.
+ */
+typedef struct {
+ u_int32 wt_time; /* seconds since weekstart */
+ u_short wt_week; /* week number */
+ short wt_leap; /* leap seconds */
+} gps_weektm;
+
+/*
+ * The GPS week time scale starts on Sunday, 1980-01-06. We need the
+ * rata die number of this day.
+ */
+#ifndef DAY_GPS_STARTS
+#define DAY_GPS_STARTS 722820
+#endif
/*
* Function prototypes
*/
+static void nmea_init (void);
static int nmea_start (int, struct peer *);
static void nmea_shutdown (int, struct peer *);
static void nmea_receive (struct recvbuf *);
static void nmea_poll (int, struct peer *);
#ifdef HAVE_PPSAPI
-static void nmea_control (int, struct refclockstat *,
+static void nmea_control (int, const struct refclockstat *,
struct refclockstat *, struct peer *);
-static void nmea_timer (int, struct peer *);
#define NMEA_CONTROL nmea_control
-#define NMEA_TIMER nmea_timer
#else
#define NMEA_CONTROL noentry
-#define NMEA_TIMER noentry
#endif /* HAVE_PPSAPI */
-static void gps_send (int, const char *, struct peer *);
-static char * field_parse (char *, int);
-static int nmea_checksum_ok(const char *);
-static void nmea_day_unfold(struct calendar*);
-static void nmea_century_unfold(struct calendar*);
+static void nmea_timer (int, struct peer *);
+
+/* parsing helpers */
+static int field_init (nmea_data * data, char * cp, int len);
+static char * field_parse (nmea_data * data, int fn);
+static void field_wipe (nmea_data * data, ...);
+static u_char parse_qual (nmea_data * data, int idx,
+ char tag, int inv);
+static int parse_time (struct calendar * jd, long * nsec,
+ nmea_data *, int idx);
+static int parse_date (struct calendar *jd, nmea_data*,
+ int idx, enum date_fmt fmt);
+static int parse_weekdata (gps_weektm *, nmea_data *,
+ int weekidx, int timeidx, int leapidx);
+/* calendar / date helpers */
+static int unfold_day (struct calendar * jd, u_int32 rec_ui);
+static int unfold_century (struct calendar * jd, u_int32 rec_ui);
+static int gpsfix_century (struct calendar * jd, const gps_weektm * wd,
+ u_short * ccentury);
+static l_fp eval_gps_time (struct peer * peer, const struct calendar * gpst,
+ const struct timespec * gpso, const l_fp * recv);
+
+static int nmead_open (const char * device);
+static void save_ltc (struct refclockproc * const, const char * const,
+ size_t);
+
+/*
+ * If we want the driver to ouput sentences, too: re-enable the send
+ * support functions by defining NMEA_WRITE_SUPPORT to non-zero...
+ */
+#if NMEA_WRITE_SUPPORT
+
+static void gps_send(int, const char *, struct peer *);
+# ifdef SYS_WINNT
+# undef write /* ports/winnt/include/config.h: #define write _write */
+extern int async_write(int, const void *, unsigned int);
+# define write(fd, data, octets) async_write(fd, data, octets)
+# endif /* SYS_WINNT */
+
+#endif /* NMEA_WRITE_SUPPORT */
+
+static int32_t g_gpsMinBase;
+static int32_t g_gpsMinYear;
/*
+ * -------------------------------------------------------------------
* Transfer vector
+ * -------------------------------------------------------------------
*/
-struct refclock refclock_nmea = {
+struct refclock refclock_nmea = {
nmea_start, /* start up driver */
nmea_shutdown, /* shut down driver */
nmea_poll, /* transmit poll message */
NMEA_CONTROL, /* fudge control */
- noentry, /* initialize driver */
+ nmea_init, /* initialize driver */
noentry, /* buginfo */
- NMEA_TIMER /* called once per second */
+ nmea_timer /* called once per second */
};
/*
+ * -------------------------------------------------------------------
+ * nmea_init - initialise data
+ *
+ * calculates a few runtime constants that cannot be made compile time
+ * constants.
+ * -------------------------------------------------------------------
+ */
+static void
+nmea_init(void)
+{
+ struct calendar date;
+
+ /* - calculate min. base value for GPS epoch & century unfolding
+ * This assumes that the build system was roughly in sync with
+ * the world, and that really synchronising to a time before the
+ * program was created would be unsafe or insane. If the build
+ * date cannot be stablished, at least use the start of GPS
+ * (1980-01-06) as minimum, because GPS can surely NOT
+ * synchronise beyond it's own big bang. We add a little safety
+ * margin for the fuzziness of the build date, which is in an
+ * undefined time zone. */
+ if (ntpcal_get_build_date(&date))
+ g_gpsMinBase = ntpcal_date_to_rd(&date) - 2;
+ else
+ g_gpsMinBase = 0;
+
+ if (g_gpsMinBase < DAY_GPS_STARTS)
+ g_gpsMinBase = DAY_GPS_STARTS;
+
+ ntpcal_rd_to_date(&date, g_gpsMinBase);
+ g_gpsMinYear = date.year;
+ g_gpsMinBase -= DAY_NTP_STARTS;
+}
+
+/*
+ * -------------------------------------------------------------------
* nmea_start - open the GPS devices and initialize data for processing
+ *
+ * return 0 on error, 1 on success. Even on error the peer structures
+ * must be in a state that permits 'nmea_shutdown()' to clean up all
+ * resources, because it will be called immediately to do so.
+ * -------------------------------------------------------------------
*/
static int
nmea_start(
- int unit,
- struct peer *peer
+ int unit,
+ struct peer * peer
)
{
- register struct nmeaunit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
- int baudrate;
- char *baudtext;
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = emalloc_zero(sizeof(*up));
+ char device[20];
+ size_t devlen;
+ u_int32 rate;
+ int baudrate;
+ char * baudtext;
- pp = peer->procptr;
- /*
- * Open serial port. Use CLK line discipline, if available.
- */
- snprintf(device, sizeof(device), DEVICE, unit);
-
- /*
- * Opening the serial port with appropriate baudrate
- * based on the value of bit 4/5/6
- */
- switch ((peer->ttl & NMEA_BAUDRATE_MASK) >> NMEA_BAUDRATE_SHIFT) {
+ /* Get baudrate choice from mode byte bits 4/5/6 */
+ rate = (peer->ttl & NMEA_BAUDRATE_MASK) >> NMEA_BAUDRATE_SHIFT;
+
+ switch (rate) {
case 0:
- case 6:
- case 7:
- default:
baudrate = SPEED232;
baudtext = "4800";
break;
@@ -271,266 +441,249 @@ nmea_start(
baudtext = "115200";
break;
#endif
+ default:
+ baudrate = SPEED232;
+ baudtext = "4800 (fallback)";
+ break;
}
- fd = refclock_open(device, baudrate, LDISC_CLK);
-
- if (fd <= 0) {
-#ifdef HAVE_READLINK
- /* nmead support added by Jon Miner (cp_n18@yahoo.com)
- *
- * See http://home.hiwaay.net/~taylorc/gps/nmea-server/
- * for information about nmead
- *
- * To use this, you need to create a link from /dev/gpsX
- * to the server:port where nmead is running. Something
- * like this:
- *
- * ln -s server:port /dev/gps1
- */
- char buffer[80];
- char *nmea_host, *nmea_tail;
- int nmea_port;
- int len;
- struct hostent *he;
- struct protoent *p;
- struct sockaddr_in so_addr;
-
- if ((len = readlink(device,buffer,sizeof(buffer))) == -1)
- return(0);
- buffer[len] = 0;
-
- if ((nmea_host = strtok(buffer,":")) == NULL)
- return(0);
- if ((nmea_tail = strtok(NULL,":")) == NULL)
- return(0);
-
- nmea_port = atoi(nmea_tail);
-
- if ((he = gethostbyname(nmea_host)) == NULL)
- return(0);
- if ((p = getprotobyname("tcp")) == NULL)
- return(0);
- memset(&so_addr, 0, sizeof(so_addr));
- so_addr.sin_family = AF_INET;
- so_addr.sin_port = htons(nmea_port);
- so_addr.sin_addr = *((struct in_addr *) he->h_addr);
-
- if ((fd = socket(PF_INET,SOCK_STREAM,p->p_proto)) == -1)
- return(0);
- if (connect(fd,(struct sockaddr *)&so_addr, sizeof(so_addr)) == -1) {
- close(fd);
- return (0);
- }
-#else
- pp->io.fd = -1;
- return (0);
-#endif
- }
-
- msyslog(LOG_NOTICE, "%s serial %s open at %s bps",
- refnumtoa(&peer->srcadr), device, baudtext);
-
- /*
- * Allocate and initialize unit structure
- */
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ /* Allocate and initialize unit structure */
+ pp->unitptr = (caddr_t)up;
+ pp->io.fd = -1;
pp->io.clock_recv = nmea_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
- pp->io.fd = fd;
- if (!io_addclock(&pp->io)) {
- pp->io.fd = -1;
- close(fd);
- free(up);
- return (0);
- }
- pp->unitptr = (caddr_t)up;
+ /* force change detection on first valid message */
+ memset(&up->last_reftime, 0xFF, sizeof(up->last_reftime));
+ /* force checksum on GPRMC, see below */
+ up->cksum_type[NMEA_GPRMC] = CHECK_CSVALID;
+#ifdef HAVE_PPSAPI
+ up->ppsapi_fd = -1;
+#endif
+ ZERO(up->tally);
- /*
- * Initialize miscellaneous variables
- */
+ /* Initialize miscellaneous variables */
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
memcpy(&pp->refid, REFID, 4);
- gps_send(fd,"$PMOTG,RMC,0000*1D\r\n", peer);
+ /* Open serial port. Use CLK line discipline, if available. */
+ devlen = snprintf(device, sizeof(device), DEVICE, unit);
+ if (devlen >= sizeof(device)) {
+ msyslog(LOG_ERR, "%s clock device name too long",
+ refnumtoa(&peer->srcadr));
+ return FALSE; /* buffer overflow */
+ }
+ pp->io.fd = refclock_open(device, baudrate, LDISC_CLK);
+ if (0 >= pp->io.fd) {
+ pp->io.fd = nmead_open(device);
+ if (-1 == pp->io.fd)
+ return FALSE;
+ }
+ LOGIF(CLOCKINFO, (LOG_NOTICE, "%s serial %s open at %s bps",
+ refnumtoa(&peer->srcadr), device, baudtext));
- return (1);
+ /* succeed if this clock can be added */
+ return io_addclock(&pp->io) != 0;
}
/*
+ * -------------------------------------------------------------------
* nmea_shutdown - shut down a GPS clock
*
* NOTE this routine is called after nmea_start() returns failure,
* as well as during a normal shutdown due to ntpq :config unpeer.
+ * -------------------------------------------------------------------
*/
static void
nmea_shutdown(
- int unit,
- struct peer *peer
+ int unit,
+ struct peer * peer
)
{
- register struct nmeaunit *up;
- struct refclockproc *pp;
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = (nmea_unit *)pp->unitptr;
UNUSED_ARG(unit);
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
if (up != NULL) {
#ifdef HAVE_PPSAPI
- if (up->ppsapi_lit) {
+ if (up->ppsapi_lit)
time_pps_destroy(up->atom.handle);
- if (up->ppsapi_fd != pp->io.fd)
- close(up->ppsapi_fd);
- }
+ if (up->ppsapi_tried && up->ppsapi_fd != pp->io.fd)
+ close(up->ppsapi_fd);
#endif
free(up);
}
+ pp->unitptr = (caddr_t)NULL;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
+ pp->io.fd = -1;
}
/*
+ * -------------------------------------------------------------------
* nmea_control - configure fudge params
+ * -------------------------------------------------------------------
*/
#ifdef HAVE_PPSAPI
static void
nmea_control(
- int unit,
- struct refclockstat *in_st,
- struct refclockstat *out_st,
- struct peer *peer
+ int unit,
+ const struct refclockstat * in_st,
+ struct refclockstat * out_st,
+ struct peer * peer
)
{
- char device[32];
- register struct nmeaunit *up;
- struct refclockproc *pp;
- int pps_fd;
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = (nmea_unit *)pp->unitptr;
+
+ char device[32];
+ size_t devlen;
UNUSED_ARG(in_st);
UNUSED_ARG(out_st);
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
+ /*
+ * PPS control
+ *
+ * If /dev/gpspps$UNIT can be opened that will be used for
+ * PPSAPI. Otherwise, the GPS serial device /dev/gps$UNIT
+ * already opened is used for PPSAPI as well. (This might not
+ * work, in which case the PPS API remains unavailable...)
+ */
- if (!(CLK_FLAG1 & pp->sloppyclockflag)) {
- if (!up->ppsapi_tried)
- return;
- up->ppsapi_tried = 0;
- if (!up->ppsapi_lit)
- return;
- peer->flags &= ~FLAG_PPS;
- peer->precision = PRECISION;
- time_pps_destroy(up->atom.handle);
+ /* Light up the PPSAPI interface if not yet attempted. */
+ if ((CLK_FLAG1 & pp->sloppyclockflag) && !up->ppsapi_tried) {
+ up->ppsapi_tried = TRUE;
+ devlen = snprintf(device, sizeof(device), PPSDEV, unit);
+ if (devlen < sizeof(device)) {
+ up->ppsapi_fd = open(device, PPSOPENMODE,
+ S_IRUSR | S_IWUSR);
+ } else {
+ up->ppsapi_fd = -1;
+ msyslog(LOG_ERR, "%s PPS device name too long",
+ refnumtoa(&peer->srcadr));
+ }
+ if (-1 == up->ppsapi_fd)
+ up->ppsapi_fd = pp->io.fd;
+ if (refclock_ppsapi(up->ppsapi_fd, &up->atom)) {
+ /* use the PPS API for our own purposes now. */
+ up->ppsapi_lit = refclock_params(
+ pp->sloppyclockflag, &up->atom);
+ if (!up->ppsapi_lit) {
+ /* failed to configure, drop PPS unit */
+ time_pps_destroy(up->atom.handle);
+ msyslog(LOG_WARNING,
+ "%s set PPSAPI params fails",
+ refnumtoa(&peer->srcadr));
+ }
+ /* note: the PPS I/O handle remains valid until
+ * flag1 is cleared or the clock is shut down.
+ */
+ } else {
+ msyslog(LOG_WARNING,
+ "%s flag1 1 but PPSAPI fails",
+ refnumtoa(&peer->srcadr));
+ }
+ }
+
+ /* shut down PPS API if activated */
+ if (!(CLK_FLAG1 & pp->sloppyclockflag) && up->ppsapi_tried) {
+ /* shutdown PPS API */
+ if (up->ppsapi_lit)
+ time_pps_destroy(up->atom.handle);
+ up->atom.handle = 0;
+ /* close/drop PPS fd */
if (up->ppsapi_fd != pp->io.fd)
close(up->ppsapi_fd);
- up->atom.handle = 0;
- up->ppsapi_lit = 0;
up->ppsapi_fd = -1;
- return;
- }
- if (up->ppsapi_tried)
- return;
- /*
- * Light up the PPSAPI interface.
- */
- up->ppsapi_tried = 1;
+ /* clear markers and peer items */
+ up->ppsapi_gate = FALSE;
+ up->ppsapi_lit = FALSE;
+ up->ppsapi_tried = FALSE;
- /*
- * if /dev/gpspps$UNIT can be opened that will be used for
- * PPSAPI. Otherwise, the GPS serial device /dev/gps$UNIT
- * already opened is used for PPSAPI as well.
- */
- snprintf(device, sizeof(device), PPSDEV, unit);
-
- pps_fd = open(device, PPSOPENMODE, S_IRUSR | S_IWUSR);
-
- if (-1 == pps_fd)
- pps_fd = pp->io.fd;
-
- if (refclock_ppsapi(pps_fd, &up->atom)) {
- up->ppsapi_lit = 1;
- up->ppsapi_fd = pps_fd;
- /* prepare to use the PPS API for our own purposes now. */
- refclock_params(pp->sloppyclockflag, &up->atom);
- return;
+ peer->flags &= ~FLAG_PPS;
+ peer->precision = PRECISION;
}
-
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_WARNING, "%s flag1 1 but PPSAPI fails",
- refnumtoa(&peer->srcadr));
}
#endif /* HAVE_PPSAPI */
-
/*
- * nmea_timer - called once per second, fetches PPS
- * timestamp and stuffs in median filter.
+ * -------------------------------------------------------------------
+ * nmea_timer - called once per second
+ * this only polls (older?) Oncore devices now
+ *
+ * Usually 'nmea_receive()' can get a timestamp every second, but at
+ * least one Motorola unit needs prompting each time. Doing so in
+ * 'nmea_poll()' gives only one sample per poll cycle, which actually
+ * defeats the purpose of the median filter. Polling once per second
+ * seems a much better idea.
+ * -------------------------------------------------------------------
*/
-#ifdef HAVE_PPSAPI
static void
nmea_timer(
- int unit,
- struct peer * peer
+ int unit,
+ struct peer * peer
)
{
- struct nmeaunit *up;
- struct refclockproc *pp;
+#if NMEA_WRITE_SUPPORT
+
+ struct refclockproc * const pp = peer->procptr;
UNUSED_ARG(unit);
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
-
- if (up->ppsapi_lit && up->ppsapi_gate &&
- refclock_pps(peer, &up->atom, pp->sloppyclockflag) > 0) {
- up->pcount++,
- peer->flags |= FLAG_PPS;
- peer->precision = PPS_PRECISION;
- }
+ if (-1 != pp->io.fd) /* any mode bits to evaluate here? */
+ gps_send(pp->io.fd, "$PMOTG,RMC,0000*1D\r\n", peer);
+#else
+
+ UNUSED_ARG(unit);
+ UNUSED_ARG(peer);
+
+#endif /* NMEA_WRITE_SUPPORT */
}
-#endif /* HAVE_PPSAPI */
#ifdef HAVE_PPSAPI
/*
+ * -------------------------------------------------------------------
+ * refclock_ppsrelate(...) -- correlate with PPS edge
+ *
* This function is used to correlate a receive time stamp and a
* reference time with a PPS edge time stamp. It applies the necessary
* fudges (fudge1 for PPS, fudge2 for receive time) and then tries to
- * move the receive time stamp to the corresponding edge. This can
- * warp into future, if a transmission delay of more than 500ms is not
- * compensated with a corresponding fudge time2 value, because then
- * the next PPS edge is nearer than the last. (Similiar to what the
- * PPS ATOM driver does, but we deal with full time stamps here, not
- * just phase shift information.) Likewise, a negative fudge time2
- * value must be used if the reference time stamp correlates with the
- * *following* PPS pulse.
+ * move the receive time stamp to the corresponding edge. This can warp
+ * into future, if a transmission delay of more than 500ms is not
+ * compensated with a corresponding fudge time2 value, because then the
+ * next PPS edge is nearer than the last. (Similiar to what the PPS ATOM
+ * driver does, but we deal with full time stamps here, not just phase
+ * shift information.) Likewise, a negative fudge time2 value must be
+ * used if the reference time stamp correlates with the *following* PPS
+ * pulse.
*
* Note that the receive time fudge value only needs to move the receive
* stamp near a PPS edge but that close proximity is not required;
* +/-100ms precision should be enough. But since the fudge value will
- * probably also be used to compensate the transmission delay when no PPS
- * edge can be related to the time stamp, it's best to get it as close
- * as possible.
+ * probably also be used to compensate the transmission delay when no
+ * PPS edge can be related to the time stamp, it's best to get it as
+ * close as possible.
*
- * It should also be noted that the typical use case is matching to
- * the preceeding edge, as most units relate their sentences to the
- * current second.
+ * It should also be noted that the typical use case is matching to the
+ * preceeding edge, as most units relate their sentences to the current
+ * second.
*
* The function returns PPS_RELATE_NONE (0) if no PPS edge correlation
* can be fixed; PPS_RELATE_EDGE (1) when a PPS edge could be fixed, but
- * the distance to the reference time stamp is too big (exceeds +/-400ms)
- * and the ATOM driver PLL cannot be used to fix the phase; and
- * PPS_RELATE_PHASE (2) when the ATOM driver PLL code can be used.
- *
- * On output, the receive time stamp is replaced with the
- * corresponding PPS edge time if a fix could be made; the PPS fudge
- * is updated to reflect the proper fudge time to apply. (This implies
- * that 'refclock_process_f()' must be used!)
+ * the distance to the reference time stamp is too big (exceeds
+ * +/-400ms) and the ATOM driver PLL cannot be used to fix the phase;
+ * and PPS_RELATE_PHASE (2) when the ATOM driver PLL code can be used.
+ *
+ * On output, the receive time stamp is replaced with the corresponding
+ * PPS edge time if a fix could be made; the PPS fudge is updated to
+ * reflect the proper fudge time to apply. (This implies that
+ * 'refclock_process_offset()' must be used!)
+ * -------------------------------------------------------------------
*/
#define PPS_RELATE_NONE 0 /* no pps correlation possible */
#define PPS_RELATE_EDGE 1 /* recv time fixed, no phase lock */
@@ -538,12 +691,13 @@ nmea_timer(
static int
refclock_ppsrelate(
- const struct refclockproc *pp , /* for sanity */
- const struct refclock_atom *ap , /* for PPS io */
- const l_fp *reftime ,
- l_fp *rd_stamp, /* i/o read stamp */
- double pp_fudge, /* pps fudge */
- double *rd_fudge) /* i/o read fudge */
+ const struct refclockproc * pp , /* for sanity */
+ const struct refclock_atom * ap , /* for PPS io */
+ const l_fp * reftime ,
+ l_fp * rd_stamp, /* i/o read stamp */
+ double pp_fudge, /* pps fudge */
+ double * rd_fudge /* i/o read fudge */
+ )
{
pps_info_t pps_info;
struct timespec timeout;
@@ -551,14 +705,13 @@ refclock_ppsrelate(
double delta, idelta;
if (pp->leap == LEAP_NOTINSYNC)
- return PPS_RELATE_NONE; /* clock is insane, no chance */
-
- memset(&timeout, 0, sizeof(timeout));
- memset(&pps_info, 0, sizeof(pps_info_t));
+ return PPS_RELATE_NONE; /* clock is insane, no chance */
+ ZERO(timeout);
+ ZERO(pps_info);
if (time_pps_fetch(ap->handle, PPS_TSFMT_TSPEC,
&pps_info, &timeout) < 0)
- return PPS_RELATE_NONE;
+ return PPS_RELATE_NONE; /* can't get time stamps */
/* get last active PPS edge before receive */
if (ap->pps_params.mode & PPS_CAPTUREASSERT)
@@ -566,10 +719,10 @@ refclock_ppsrelate(
else if (ap->pps_params.mode & PPS_CAPTURECLEAR)
timeout = pps_info.clear_timestamp;
else
- return PPS_RELATE_NONE;
+ return PPS_RELATE_NONE; /* WHICH edge, please?!? */
/* get delta between receive time and PPS time */
- TIMESPECTOTS(&timeout, &pp_stamp);
+ pp_stamp = tspec_stamp_to_lfp(timeout);
pp_delta = *rd_stamp;
L_SUB(&pp_delta, &pp_stamp);
LFPTOD(&pp_delta, delta);
@@ -590,7 +743,7 @@ refclock_ppsrelate(
/* if whole system out-of-sync, do not try to PLL */
if (sys_leap == LEAP_NOTINSYNC)
- return PPS_RELATE_EDGE; /* cannot PLL with atom code */
+ return PPS_RELATE_EDGE; /* cannot PLL with atom code */
/* check against reftime if ATOM PLL can be used */
pp_delta = *reftime;
@@ -598,7 +751,7 @@ refclock_ppsrelate(
LFPTOD(&pp_delta, delta);
delta += pp_fudge;
if (fabs(delta) > 0.45)
- return PPS_RELATE_EDGE; /* cannot PLL with atom code */
+ return PPS_RELATE_EDGE; /* cannot PLL with atom code */
/* all checks passed, gets an AAA rating here! */
return PPS_RELATE_PHASE; /* can PLL with atom code */
@@ -606,120 +759,128 @@ refclock_ppsrelate(
#endif /* HAVE_PPSAPI */
/*
+ * -------------------------------------------------------------------
* nmea_receive - receive data from the serial interface
+ *
+ * This is the workhorse for NMEA data evaluation:
+ *
+ * + it checks all NMEA data, and rejects sentences that are not valid
+ * NMEA sentences
+ * + it checks whether a sentence is known and to be used
+ * + it parses the time and date data from the NMEA data string and
+ * augments the missing bits. (century in dat, whole date, ...)
+ * + it rejects data that is not from the first accepted sentence in a
+ * burst
+ * + it eventually replaces the receive time with the PPS edge time.
+ * + it feeds the data to the internal processing stages.
+ * -------------------------------------------------------------------
*/
static void
nmea_receive(
- struct recvbuf *rbufp
+ struct recvbuf * rbufp
)
{
- register struct nmeaunit *up;
- struct refclockproc *pp;
- struct peer *peer;
- char *cp, *dp, *msg;
- u_char sentence;
- /* Use these variables to hold data until we decide its worth
- * keeping */
- char rd_lastcode[BMAX];
- l_fp rd_timestamp, reftime;
- int rd_lencode;
- double rd_fudge;
- struct calendar date;
-
- /*
- * Initialize pointers and read the timecode and timestamp
- */
- peer = rbufp->recv_peer;
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
-
- rd_lencode = refclock_gtlin(
- rbufp,
- rd_lastcode,
- sizeof(rd_lastcode),
- &rd_timestamp);
-
- /*
- * There is a case that a <CR><LF> gives back a "blank" line.
- * We can't have a well-formed sentence with less than 8 chars.
+ /* declare & init control structure ptrs */
+ struct peer * const peer = rbufp->recv_peer;
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = (nmea_unit*)pp->unitptr;
+
+ /* Use these variables to hold data until we decide its worth keeping */
+ nmea_data rdata;
+ char rd_lastcode[BMAX];
+ l_fp rd_timestamp, rd_reftime;
+ int rd_lencode;
+ double rd_fudge;
+
+ /* working stuff */
+ struct calendar date; /* to keep & convert the time stamp */
+ struct timespec tofs; /* offset to full-second reftime */
+ gps_weektm gpsw; /* week time storage */
+ /* results of sentence/date/time parsing */
+ u_char sentence; /* sentence tag */
+ int checkres;
+ char * cp;
+ int rc_date;
+ int rc_time;
+
+ /* make sure data has defined pristine state */
+ ZERO(tofs);
+ ZERO(date);
+ ZERO(gpsw);
+ sentence = 0;
+ rc_date = 0;
+ rc_time = 0;
+ /*
+ * Read the timecode and timestamp, then initialise field
+ * processing. The <CR><LF> at the NMEA line end is translated
+ * to <LF><LF> by the terminal input routines on most systems,
+ * and this gives us one spurious empty read per record which we
+ * better ignore silently.
*/
- if (0 == rd_lencode)
+ rd_lencode = refclock_gtlin(rbufp, rd_lastcode,
+ sizeof(rd_lastcode), &rd_timestamp);
+ checkres = field_init(&rdata, rd_lastcode, rd_lencode);
+ switch (checkres) {
+
+ case CHECK_INVALID:
+ DPRINTF(1, ("%s invalid data: '%s'\n",
+ refnumtoa(&peer->srcadr), rd_lastcode));
+ refclock_report(peer, CEVNT_BADREPLY);
return;
- if (rd_lencode < 8) {
- refclock_report(peer, CEVNT_BADREPLY);
+ case CHECK_EMPTY:
return;
- }
- DPRINTF(1, ("nmea: gpsread %d %s\n", rd_lencode, rd_lastcode));
+ default:
+ DPRINTF(1, ("%s gpsread: %d '%s'\n",
+ refnumtoa(&peer->srcadr), rd_lencode,
+ rd_lastcode));
+ break;
+ }
+ up->tally.total++;
- /*
- * 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
- * mode (0,1,2,3) selects sentence ANY/ALL, RMC, GGA, GLL, ZDA
- * $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
- * $GPRMC,232418.19,A,3513.8386,S,14900.7853,E,00.0,000.0,121199,12.,E*77
- *
- * Defining GPZDA to support Standard Time & Date
- * sentence. The sentence has the following format
- *
- * $--ZDA,HHMMSS.SS,DD,MM,YYYY,TH,TM,*CS<CR><LF>
- *
- * Apart from the familiar fields,
- * 'TH' Time zone Hours
- * 'TM' Time zone Minutes
- *
- * Defining GPZDG to support Accord GPS Clock's custom NMEA
- * sentence. The sentence has the following format
- *
- * $GPZDG,HHMMSS.S,DD,MM,YYYY,AA.BB,V*CS<CR><LF>
+ /*
+ * --> below this point we have a valid NMEA sentence <--
*
- * It contains the GPS timestamp valid for next PPS pulse.
- * Apart from the familiar fields,
- * 'AA.BB' denotes the signal strength( should be < 05.00 )
- * 'V' denotes the GPS sync status :
- * '0' indicates INVALID time,
- * '1' indicates accuracy of +/-20 ms
- * '2' indicates accuracy of +/-100 ns
+ * Check sentence name. Skip first 2 chars (talker ID) in most
+ * cases, to allow for $GLGGA and $GPGGA etc. Since the name
+ * field has at least 5 chars we can simply shift the field
+ * start.
*/
-
- cp = rd_lastcode;
- if (cp[0] == '$') {
- /* Allow for GLGGA and GPGGA etc. */
- msg = cp + 3;
-
- if (strncmp(msg, "RMC", 3) == 0)
- sentence = NMEA_GPRMC;
- else if (strncmp(msg, "GGA", 3) == 0)
- sentence = NMEA_GPGGA;
- else if (strncmp(msg, "GLL", 3) == 0)
- sentence = NMEA_GPGLL;
- else if (strncmp(msg, "ZDG", 3) == 0)
- sentence = NMEA_GPZDG;
- else if (strncmp(msg, "ZDA", 3) == 0)
- sentence = NMEA_GPZDA;
- else
- return;
- } else
- return;
-
+ cp = field_parse(&rdata, 0);
+ if (strncmp(cp + 2, "RMC,", 4) == 0)
+ sentence = NMEA_GPRMC;
+ else if (strncmp(cp + 2, "GGA,", 4) == 0)
+ sentence = NMEA_GPGGA;
+ else if (strncmp(cp + 2, "GLL,", 4) == 0)
+ sentence = NMEA_GPGLL;
+ else if (strncmp(cp + 2, "ZDA,", 4) == 0)
+ sentence = NMEA_GPZDA;
+ else if (strncmp(cp + 2, "ZDG,", 4) == 0)
+ sentence = NMEA_GPZDG;
+ else if (strncmp(cp, "PGRMF,", 6) == 0)
+ sentence = NMEA_PGRMF;
+ else
+ return; /* not something we know about */
+
+ /* Eventually output delay measurement now. */
+ if (peer->ttl & NMEA_DELAYMEAS_MASK) {
+ mprintf_clock_stats(&peer->srcadr, "delay %0.6f %.*s",
+ ldexp(rd_timestamp.l_uf, -32),
+ (int)(strchr(rd_lastcode, ',') - rd_lastcode),
+ rd_lastcode);
+ }
+
/* See if I want to process this message type */
if ((peer->ttl & NMEA_MESSAGE_MASK) &&
- !(peer->ttl & sentence_mode[sentence]))
+ !(peer->ttl & sentence_mode[sentence])) {
+ up->tally.filtered++;
return;
+ }
/*
- * $GPZDG provides GPS time not UTC, and the two mix poorly.
- * Once have processed a $GPZDG, do not process any further
- * UTC sentences (all but $GPZDG currently).
- */
- if (up->gps_time && NMEA_GPZDG != sentence)
- return;
-
- /*
+ * make sure it came in clean
+ *
* Apparently, older NMEA specifications (which are expensive)
* did not require the checksum for all sentences. $GPMRC is
* the only one so far identified which has always been required
@@ -728,406 +889,362 @@ nmea_receive(
* Today, most NMEA GPS receivers checksum every sentence. To
* preserve its error-detection capabilities with modern GPSes
* while allowing operation without checksums on all but $GPMRC,
- * we keep track of whether we've ever seen a checksum on a
- * given sentence, and if so, reject future checksum failures.
+ * we keep track of whether we've ever seen a valid checksum on
+ * a given sentence, and if so, reject future instances without
+ * checksum. ('up->cksum_type[NMEA_GPRMC]' is set in
+ * 'nmea_start()' to enforce checksums for $GPRMC right from the
+ * start.)
*/
- if (nmea_checksum_ok(rd_lastcode)) {
- up->cksum_seen[sentence] = TRUE;
- } else if (NMEA_GPRMC == sentence || up->cksum_seen[sentence]) {
+ if (up->cksum_type[sentence] <= (u_char)checkres) {
+ up->cksum_type[sentence] = (u_char)checkres;
+ } else {
+ DPRINTF(1, ("%s checksum missing: '%s'\n",
+ refnumtoa(&peer->srcadr), rd_lastcode));
refclock_report(peer, CEVNT_BADREPLY);
+ up->tally.malformed++;
+ return;
+ }
+
+ /*
+ * $GPZDG provides GPS time not UTC, and the two mix poorly.
+ * Once have processed a $GPZDG, do not process any further UTC
+ * sentences (all but $GPZDG currently).
+ */
+ if (up->gps_time && NMEA_GPZDG != sentence) {
+ up->tally.filtered++;
return;
}
- cp = rd_lastcode;
+ DPRINTF(1, ("%s processing %d bytes, timecode '%s'\n",
+ refnumtoa(&peer->srcadr), rd_lencode, rd_lastcode));
- /* Grab field depending on clock string type */
- memset(&date, 0, sizeof(date));
+ /*
+ * Grab fields depending on clock string type and possibly wipe
+ * sensitive data from the last timecode.
+ */
switch (sentence) {
case NMEA_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);
+ /* Check quality byte, fetch data & time */
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+ pp->leap = parse_qual(&rdata, 2, 'A', 0);
+ rc_date = parse_date(&date, &rdata, 9, DATE_1_DDMMYY)
+ && unfold_century(&date, rd_timestamp.l_ui);
+ if (CLK_FLAG4 & pp->sloppyclockflag)
+ field_wipe(&rdata, 3, 4, 5, 6, -1);
break;
case NMEA_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);
+ /* Check quality byte, fetch time only */
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+ pp->leap = parse_qual(&rdata, 6, '0', 1);
+ rc_date = unfold_day(&date, rd_timestamp.l_ui);
+ if (CLK_FLAG4 & pp->sloppyclockflag)
+ field_wipe(&rdata, 2, 4, -1);
break;
case NMEA_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);
+ /* Check quality byte, fetch time only */
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 5);
+ pp->leap = parse_qual(&rdata, 6, 'A', 0);
+ rc_date = unfold_day(&date, rd_timestamp.l_ui);
+ if (CLK_FLAG4 & pp->sloppyclockflag)
+ field_wipe(&rdata, 1, 3, -1);
break;
- case NMEA_GPZDG:
- /* For $GPZDG check for validity of GPS time. */
- dp = field_parse(cp, 6);
- if (dp[0] == '0')
- pp->leap = LEAP_NOTINSYNC;
- else
- pp->leap = LEAP_NOWARNING;
- /* fall through to NMEA_GPZDA */
-
case NMEA_GPZDA:
- if (NMEA_GPZDA == sentence)
- pp->leap = LEAP_NOWARNING;
+ /* No quality. Assume best, fetch time & full date */
+ pp->leap = LEAP_NOWARNING;
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+ rc_date = parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+ break;
- /* Now point at the time field */
- dp = field_parse(cp, 1);
+ case NMEA_GPZDG:
+ /* Check quality byte, fetch time & full date */
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 1);
+ rc_date = parse_date(&date, &rdata, 2, DATE_3_DDMMYYYY);
+ pp->leap = parse_qual(&rdata, 4, '0', 1);
+ tofs.tv_sec = -1; /* GPZDG is following second */
break;
+ case NMEA_PGRMF:
+ /* get date, time, qualifier and GPS weektime. We need
+ * date and time-of-day for the century fix, so we read
+ * them first.
+ */
+ rc_date = parse_weekdata(&gpsw, &rdata, 1, 2, 5)
+ && parse_date(&date, &rdata, 3, DATE_1_DDMMYY);
+ rc_time = parse_time(&date, &tofs.tv_nsec, &rdata, 4);
+ pp->leap = parse_qual(&rdata, 11, '0', 1);
+ rc_date = rc_date
+ && gpsfix_century(&date, &gpsw, &up->century_cache);
+ if (CLK_FLAG4 & pp->sloppyclockflag)
+ field_wipe(&rdata, 6, 8, -1);
+ break;
+
default:
+ INVARIANT(0); /* Coverity 97123 */
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])) {
-
- DPRINTF(1, ("NMEA time code %c%c%c%c%c%c non-numeric",
- dp[0], dp[1], dp[2], dp[3], dp[4], dp[5]));
- refclock_report(peer, CEVNT_BADTIME);
- return;
+ /* Check sanity of time-of-day. */
+ if (rc_time == 0) { /* no time or conversion error? */
+ checkres = CEVNT_BADTIME;
+ up->tally.malformed++;
}
-
- /*
- * Convert time and check values.
- */
- date.hour = ((dp[0] - '0') * 10) + dp[1] - '0';
- date.minute = ((dp[2] - '0') * 10) + dp[3] - '0';
- date.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;
- }
- }
- }
+ /* Check sanity of date. */
+ else if (rc_date == 0) {/* no date or conversion error? */
+ checkres = CEVNT_BADDATE;
+ up->tally.malformed++;
}
-
- if (date.hour > 23 || date.minute > 59 ||
- date.second > 59 || pp->nsec > 1000000000) {
-
- DPRINTF(1, ("NMEA hour/min/sec/nsec range %02d:%02d:%02d.%09ld\n",
- pp->hour, pp->minute, pp->second, pp->nsec));
- refclock_report(peer, CEVNT_BADTIME);
- return;
+ /* check clock sanity; [bug 2143] */
+ else if (pp->leap == LEAP_NOTINSYNC) { /* no good status? */
+ checkres = CEVNT_BADREPLY;
+ up->tally.rejected++;
}
+ else
+ checkres = -1;
- /*
- * Used only the first recognized sentence each second.
- */
- if (date.hour == up->used.hour &&
- date.minute == up->used.minute &&
- date.second == up->used.second)
- return;
-
- pp->lencode = (u_short)rd_lencode;
- memcpy(pp->a_lastcode, rd_lastcode, pp->lencode + 1);
- up->tstamp = rd_timestamp;
- pp->lastrec = up->tstamp;
- DPRINTF(1, ("nmea: timecode %d %s\n", pp->lencode, pp->a_lastcode));
-
- /*
- * Convert date and check values.
- */
- if (NMEA_GPRMC == sentence) {
-
- dp = field_parse(cp,9);
- date.monthday = 10 * (dp[0] - '0') + (dp[1] - '0');
- date.month = 10 * (dp[2] - '0') + (dp[3] - '0');
- date.year = 10 * (dp[4] - '0') + (dp[5] - '0');
- nmea_century_unfold(&date);
-
- } else if (NMEA_GPZDA == sentence || NMEA_GPZDG == sentence) {
-
- dp = field_parse(cp, 2);
- date.monthday = 10 * (dp[0] - '0') + (dp[1] - '0');
- dp = field_parse(cp, 3);
- date.month = 10 * (dp[0] - '0') + (dp[1] - '0');
- dp = field_parse(cp, 4);
- date.year = 1000 * (dp[0] - '0') + 100 * (dp[1] - '0')
- + 10 * (dp[2] - '0') + (dp[3] - '0');
-
- } else
- nmea_day_unfold(&date);
-
- if (date.month < 1 || date.month > 12 ||
- date.monthday < 1 || date.monthday > 31) {
- refclock_report(peer, CEVNT_BADDATE);
+ if (checkres != -1) {
+ save_ltc(pp, rd_lastcode, rd_lencode);
+ refclock_report(peer, checkres);
return;
}
- up->used.hour = date.hour;
- up->used.minute = date.minute;
- up->used.second = date.second;
-
- /*
- * If "fudge 127.127.20.__ flag4 1" is configured in ntp.conf,
- * remove the location and checksum from the NMEA sentence
- * recorded as the last timecode and visible to remote users
- * with:
- *
- * ntpq -c clockvar <server>
- *
- * Note that this also removes the location from the clockstats
- * log (if it is enabled). Some NTP operators monitor their
- * NMEA GPS using the change in location in clockstats over
- * time as as a proxy for the quality of GPS reception and
- * thereby time reported.
- */
- if (CLK_FLAG4 & pp->sloppyclockflag) {
- /*
- * Start by pointing cp and dp at the fields with
- * longitude and latitude in the last timecode.
- */
- switch (sentence) {
-
- case NMEA_GPGLL:
- cp = field_parse(pp->a_lastcode, 1);
- dp = field_parse(cp, 2);
- break;
-
- case NMEA_GPGGA:
- cp = field_parse(pp->a_lastcode, 2);
- dp = field_parse(cp, 2);
- break;
-
- case NMEA_GPRMC:
- cp = field_parse(pp->a_lastcode, 3);
- dp = field_parse(cp, 2);
- break;
-
- case NMEA_GPZDA:
- case NMEA_GPZDG:
- default:
- cp = dp = NULL;
- }
-
- /* Blank the entire latitude & longitude. */
- while (cp) {
- while (',' != *cp) {
- if ('.' != *cp)
- *cp = '_';
- cp++;
- }
-
- /* Longitude at cp then latitude at dp */
- if (cp < dp)
- cp = dp;
- else
- cp = NULL;
- }
-
- /* Blank the checksum, the last two characters */
- if (dp) {
- cp = pp->a_lastcode + pp->lencode - 2;
- if (0 == cp[2])
- cp[0] = cp[1] = '_';
- }
+ DPRINTF(1, ("%s effective timecode: %04u-%02u-%02u %02d:%02d:%02d\n",
+ refnumtoa(&peer->srcadr),
+ date.year, date.month, date.monthday,
+ date.hour, date.minute, date.second));
+ /* Check if we must enter GPS time mode; log so if we do */
+ if (!up->gps_time && (sentence == NMEA_GPZDG)) {
+ msyslog(LOG_INFO, "%s using GPS time as if it were UTC",
+ refnumtoa(&peer->srcadr));
+ up->gps_time = 1;
}
-
+
/*
* Get the reference time stamp from the calendar buffer.
- * Process the new sample in the median filter and determine
- * the timecode timestamp, but only if the PPS is not in
- * control.
+ * Process the new sample in the median filter and determine the
+ * timecode timestamp, but only if the PPS is not in control.
+ * Discard sentence if reference time did not change.
*/
- rd_fudge = pp->fudgetime2;
- date.yearday = 0; /* make sure it's not used */
- DTOLFP(pp->nsec * 1.0e-9, &reftime);
- reftime.l_ui += caltontp(&date);
-
- /* $GPZDG postprocessing first... */
- if (NMEA_GPZDG == sentence) {
- /*
- * Note if we're only using GPS timescale from now on.
- */
- if (!up->gps_time) {
- up->gps_time = 1;
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_INFO, "%s using only $GPZDG",
- refnumtoa(&peer->srcadr));
- }
- /*
- * $GPZDG indicates the second after the *next* PPS
- * pulse. So we remove 1 second from the reference
- * time now.
- */
- reftime.l_ui--;
+ rd_reftime = eval_gps_time(peer, &date, &tofs, &rd_timestamp);
+ if (L_ISEQU(&up->last_reftime, &rd_reftime)) {
+ /* Do not touch pp->a_lastcode on purpose! */
+ up->tally.filtered++;
+ return;
}
+ up->last_reftime = rd_reftime;
+ rd_fudge = pp->fudgetime2;
+
+ DPRINTF(1, ("%s using '%s'\n",
+ refnumtoa(&peer->srcadr), rd_lastcode));
+
+ /* Data will be accepted. Update stats & log data. */
+ up->tally.accepted++;
+ save_ltc(pp, rd_lastcode, rd_lencode);
+ pp->lastrec = rd_timestamp;
#ifdef HAVE_PPSAPI
- up->tcount++;
/*
- * If we have PPS running, we try to associate the sentence with
- * the last active edge of the PPS signal.
+ * If we have PPS running, we try to associate the sentence
+ * with the last active edge of the PPS signal.
*/
if (up->ppsapi_lit)
- switch (refclock_ppsrelate(pp, &up->atom, &reftime,
- &rd_timestamp, pp->fudgetime1,
- &rd_fudge))
+ switch (refclock_ppsrelate(
+ pp, &up->atom, &rd_reftime, &rd_timestamp,
+ pp->fudgetime1, &rd_fudge))
{
- case PPS_RELATE_EDGE:
- up->ppsapi_gate = 0;
- break;
case PPS_RELATE_PHASE:
- up->ppsapi_gate = 1;
+ up->ppsapi_gate = TRUE;
+ peer->precision = PPS_PRECISION;
+ peer->flags |= FLAG_PPS;
+ DPRINTF(2, ("%s PPS_RELATE_PHASE\n",
+ refnumtoa(&peer->srcadr)));
+ up->tally.pps_used++;
break;
+
+ case PPS_RELATE_EDGE:
+ up->ppsapi_gate = TRUE;
+ peer->precision = PPS_PRECISION;
+ DPRINTF(2, ("%s PPS_RELATE_EDGE\n",
+ refnumtoa(&peer->srcadr)));
+ break;
+
+ case PPS_RELATE_NONE:
default:
+ /*
+ * Resetting precision and PPS flag is done in
+ * 'nmea_poll', since it might be a glitch. But
+ * at the end of the poll cycle we know...
+ */
+ DPRINTF(2, ("%s PPS_RELATE_NONE\n",
+ refnumtoa(&peer->srcadr)));
break;
}
- else
- up->ppsapi_gate = 0;
-
- if (up->ppsapi_gate && (peer->flags & FLAG_PPS))
- return;
#endif /* HAVE_PPSAPI */
- refclock_process_offset(pp, reftime, rd_timestamp, rd_fudge);
+ refclock_process_offset(pp, rd_reftime, rd_timestamp, rd_fudge);
}
/*
+ * -------------------------------------------------------------------
* 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.
+ * Does the necessary bookkeeping stuff to keep the reported state of
+ * the clock in sync with reality.
+ *
+ * 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
+ int unit,
+ struct peer * peer
)
{
- register struct nmeaunit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct nmeaunit *)pp->unitptr;
-
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = (nmea_unit *)pp->unitptr;
+
/*
* Process median filter samples. If none received, declare a
* timeout and keep going.
*/
#ifdef HAVE_PPSAPI
- if (up->pcount == 0) {
+ /*
+ * If we don't have PPS pulses and time stamps, turn PPS down
+ * for now.
+ */
+ if (!up->ppsapi_gate) {
peer->flags &= ~FLAG_PPS;
peer->precision = PRECISION;
- }
- if (up->tcount == 0) {
- pp->coderecv = pp->codeproc;
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
- }
- up->pcount = up->tcount = 0;
-#else /* HAVE_PPSAPI */
- if (pp->coderecv == pp->codeproc) {
- refclock_report(peer, CEVNT_TIMEOUT);
- return;
+ } else {
+ up->ppsapi_gate = FALSE;
}
#endif /* HAVE_PPSAPI */
- pp->polls++;
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
- record_clock_stats(&peer->srcadr, pp->a_lastcode);
-
/*
- * usually nmea_receive can get a timestamp every second,
- * but at least one Motorola unit needs prompting each
- * time.
+ * If the median filter is empty, claim a timeout. Else process
+ * the input data and keep the stats going.
*/
+ if (pp->coderecv == pp->codeproc) {
+ refclock_report(peer, CEVNT_TIMEOUT);
+ } else {
+ pp->polls++;
+ pp->lastref = pp->lastrec;
+ refclock_receive(peer);
+ }
+
+ /*
+ * If extended logging is required, write the tally stats to the
+ * clockstats file; otherwise just do a normal clock stats
+ * record. Clear the tally stats anyway.
+ */
+ if (peer->ttl & NMEA_EXTLOG_MASK) {
+ /* Log & reset counters with extended logging */
+ char *nmea = pp->a_lastcode;
+ if (*nmea == '\0') nmea = "(none)";
+ mprintf_clock_stats(
+ &peer->srcadr, "%s %u %u %u %u %u %u",
+ nmea,
+ up->tally.total, up->tally.accepted,
+ up->tally.rejected, up->tally.malformed,
+ up->tally.filtered, up->tally.pps_used);
+ } else {
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ }
+ ZERO(up->tally);
+}
- gps_send(pp->io.fd,"$PMOTG,RMC,0000*1D\r\n", peer);
+/*
+ * -------------------------------------------------------------------
+ * Save the last timecode string, making sure it's properly truncated
+ * if necessary and NUL terminated in any case.
+ */
+static void
+save_ltc(
+ struct refclockproc * const pp,
+ const char * const tc,
+ size_t len
+ )
+{
+ if (len >= sizeof(pp->a_lastcode))
+ len = sizeof(pp->a_lastcode) - 1;
+ pp->lencode = (u_short)len;
+ memcpy(pp->a_lastcode, tc, len);
+ pp->a_lastcode[len] = '\0';
}
+#if NMEA_WRITE_SUPPORT
/*
+ * -------------------------------------------------------------------
+ * gps_send(fd, cmd, peer) Sends a command to the GPS receiver.
+ * as in gps_send(fd, "rqts,u", 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
+ * If 'cmd' starts with a '$' it is assumed that this command is in raw
+ * format, that is, starts with '$', ends with '<cr><lf>' and that any
+ * checksum is correctly provided; the command will be send 'as is' in
+ * that case. Otherwise the function will create the necessary frame
+ * (start char, chksum, final CRLF) on the fly.
*
+ * 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
+ int fd,
+ const char * cmd,
+ struct peer * peer
)
{
- if (write(fd, cmd, strlen(cmd)) == -1) {
- refclock_report(peer, CEVNT_FAULT);
+ /* $...*xy<CR><LF><NUL> add 7 */
+ char buf[NMEA_PROTO_MAXLEN + 7];
+ int len;
+ u_char dcs;
+ const u_char *beg, *end;
+
+ if (*cmd != '$') {
+ /* get checksum and length */
+ beg = end = (const u_char*)cmd;
+ dcs = 0;
+ while (*end >= ' ' && *end != '*')
+ dcs ^= *end++;
+ len = end - beg;
+ /* format into output buffer with overflow check */
+ len = snprintf(buf, sizeof(buf), "$%.*s*%02X\r\n",
+ len, beg, dcs);
+ if ((size_t)len >= sizeof(buf)) {
+ DPRINTF(1, ("%s gps_send: buffer overflow for command '%s'\n",
+ refnumtoa(&peer->srcadr), cmd));
+ return; /* game over player 1 */
+ }
+ cmd = buf;
+ } else {
+ len = strlen(cmd);
}
-}
+ DPRINTF(1, ("%s gps_send: '%.*s'\n", refnumtoa(&peer->srcadr),
+ len - 2, cmd));
-static char *
-field_parse(
- char *cp,
- int fn
- )
-{
- char *tp;
- int i = fn;
-
- for (tp = cp; i && *tp; tp++)
- if (*tp == ',')
- i--;
-
- return tp;
+ /* send out the whole stuff */
+ if (write(fd, cmd, len) == -1)
+ refclock_report(peer, CEVNT_FAULT);
}
-
+#endif /* NMEA_WRITE_SUPPORT */
/*
- * nmea_checksum_ok verifies 8-bit XOR checksum is correct then returns 1
+ * -------------------------------------------------------------------
+ * helpers for faster field splitting
+ * -------------------------------------------------------------------
+ *
+ * set up a field record, check syntax and verify checksum
*
* format is $XXXXX,1,2,3,4*ML
*
@@ -1137,71 +1254,372 @@ field_parse(
*
* $GPGLL,5057.970,N,00146.110,E,142451,A*27
* $GPVTG,089.0,T,,,15.2,N,,*7F
+ *
+ * Some other constraints:
+ * + The field name must at least 5 upcase characters or digits and must
+ * start with a character.
+ * + The checksum (if present) must be uppercase hex digits.
+ * + The length of a sentence is limited to 80 characters (not including
+ * the final CR/LF nor the checksum, but including the leading '$')
+ *
+ * Return values:
+ * + CHECK_INVALID
+ * The data does not form a valid NMEA sentence or a checksum error
+ * occurred.
+ * + CHECK_VALID
+ * The data is a valid NMEA sentence but contains no checksum.
+ * + CHECK_CSVALID
+ * The data is a valid NMEA sentence and passed the checksum test.
+ * -------------------------------------------------------------------
*/
-int
-nmea_checksum_ok(
- const char *sentence
+static int
+field_init(
+ nmea_data * data, /* context structure */
+ char * cptr, /* start of raw data */
+ int dlen /* data len, not counting trailing NUL */
)
{
- u_char my_cs;
- u_long input_cs;
- const char *p;
+ u_char cs_l; /* checksum local computed */
+ u_char cs_r; /* checksum remote given */
+ char * eptr; /* buffer end end pointer */
+ char tmp; /* char buffer */
+
+ cs_l = 0;
+ cs_r = 0;
+ /* some basic input constraints */
+ if (dlen < 0)
+ dlen = 0;
+ eptr = cptr + dlen;
+ *eptr = '\0';
+
+ /* load data context */
+ data->base = cptr;
+ data->cptr = cptr;
+ data->cidx = 0;
+ data->blen = dlen;
+
+ /* syntax check follows here. check allowed character
+ * sequences, updating the local computed checksum as we go.
+ *
+ * regex equiv: '^\$[A-Z][A-Z0-9]{4,}[^*]*(\*[0-9A-F]{2})?$'
+ */
+
+ /* -*- start character: '^\$' */
+ if (*cptr == '\0')
+ return CHECK_EMPTY;
+ if (*cptr++ != '$')
+ return CHECK_INVALID;
- my_cs = 0;
- p = sentence;
+ /* -*- advance context beyond start character */
+ data->base++;
+ data->cptr++;
+ data->blen--;
+
+ /* -*- field name: '[A-Z][A-Z0-9]{4,},' */
+ if (*cptr < 'A' || *cptr > 'Z')
+ return CHECK_INVALID;
+ cs_l ^= *cptr++;
+ while ((*cptr >= 'A' && *cptr <= 'Z') ||
+ (*cptr >= '0' && *cptr <= '9') )
+ cs_l ^= *cptr++;
+ if (*cptr != ',' || (cptr - data->base) < NMEA_PROTO_IDLEN)
+ return CHECK_INVALID;
+ cs_l ^= *cptr++;
+
+ /* -*- data: '[^*]*' */
+ while (*cptr && *cptr != '*')
+ cs_l ^= *cptr++;
+
+ /* -*- checksum field: (\*[0-9A-F]{2})?$ */
+ if (*cptr == '\0')
+ return CHECK_VALID;
+ if (*cptr != '*' || cptr != eptr - 3 ||
+ (cptr - data->base) >= NMEA_PROTO_MAXLEN)
+ return CHECK_INVALID;
+
+ for (cptr++; (tmp = *cptr) != '\0'; cptr++) {
+ if (tmp >= '0' && tmp <= '9')
+ cs_r = (cs_r << 4) + (tmp - '0');
+ else if (tmp >= 'A' && tmp <= 'F')
+ cs_r = (cs_r << 4) + (tmp - 'A' + 10);
+ else
+ break;
+ }
- if ('$' != *p++)
- return 0;
+ /* -*- make sure we are at end of string and csum matches */
+ if (cptr != eptr || cs_l != cs_r)
+ return CHECK_INVALID;
- for ( ; *p && '*' != *p; p++) {
+ return CHECK_CSVALID;
+}
- my_cs ^= *p;
+/*
+ * -------------------------------------------------------------------
+ * fetch a data field by index, zero being the name field. If this
+ * function is called repeatedly with increasing indices, the total load
+ * is O(n), n being the length of the string; if it is called with
+ * decreasing indices, the total load is O(n^2). Try not to go backwards
+ * too often.
+ * -------------------------------------------------------------------
+ */
+static char *
+field_parse(
+ nmea_data * data,
+ int fn
+ )
+{
+ char tmp;
+
+ if (fn < data->cidx) {
+ data->cidx = 0;
+ data->cptr = data->base;
+ }
+ while ((fn > data->cidx) && (tmp = *data->cptr) != '\0') {
+ data->cidx += (tmp == ',');
+ data->cptr++;
}
+ return data->cptr;
+}
- if ('*' != *p++)
- return 0;
+/*
+ * -------------------------------------------------------------------
+ * Wipe (that is, overwrite with '_') data fields and the checksum in
+ * the last timecode. The list of field indices is given as integers
+ * in a varargs list, preferrably in ascending order, in any case
+ * terminated by a negative field index.
+ *
+ * A maximum number of 8 fields can be overwritten at once to guard
+ * against runaway (that is, unterminated) argument lists.
+ *
+ * This function affects what a remote user can see with
+ *
+ * ntpq -c clockvar <server>
+ *
+ * Note that this also removes the wiped fields from any clockstats
+ * log. Some NTP operators monitor their NMEA GPS using the change in
+ * location in clockstats over time as as a proxy for the quality of
+ * GPS reception and thereby time reported.
+ * -------------------------------------------------------------------
+ */
+static void
+field_wipe(
+ nmea_data * data,
+ ...
+ )
+{
+ va_list va; /* vararg index list */
+ int fcnt; /* safeguard against runaway arglist */
+ int fidx; /* field to nuke, or -1 for checksum */
+ char * cp; /* overwrite destination */
+
+ fcnt = 8;
+ cp = NULL;
+ va_start(va, data);
+ do {
+ fidx = va_arg(va, int);
+ if (fidx >= 0 && fidx <= NMEA_PROTO_FIELDS) {
+ cp = field_parse(data, fidx);
+ } else {
+ cp = data->base + data->blen;
+ if (data->blen >= 3 && cp[-3] == '*')
+ cp -= 2;
+ }
+ for ( ; '\0' != *cp && '*' != *cp && ',' != *cp; cp++)
+ if ('.' != *cp)
+ *cp = '_';
+ } while (fcnt-- && fidx >= 0);
+ va_end(va);
+}
- if (0 == p[0] || 0 == p[1] || 0 != p[2])
- return 0;
+/*
+ * -------------------------------------------------------------------
+ * PARSING HELPERS
+ * -------------------------------------------------------------------
+ *
+ * Check sync status
+ *
+ * If the character at the data field start matches the tag value,
+ * return LEAP_NOWARNING and LEAP_NOTINSYNC otherwise. If the 'inverted'
+ * flag is given, just the opposite value is returned. If there is no
+ * data field (*cp points to the NUL byte) the result is LEAP_NOTINSYNC.
+ * -------------------------------------------------------------------
+ */
+static u_char
+parse_qual(
+ nmea_data * rd,
+ int idx,
+ char tag,
+ int inv
+ )
+{
+ static const u_char table[2] =
+ { LEAP_NOTINSYNC, LEAP_NOWARNING };
+ char * dp;
+
+ dp = field_parse(rd, idx);
+
+ return table[ *dp && ((*dp == tag) == !inv) ];
+}
- if (0 == hextoint(p, &input_cs))
- return 0;
+/*
+ * -------------------------------------------------------------------
+ * Parse a time stamp in HHMMSS[.sss] format with error checking.
+ *
+ * returns 1 on success, 0 on failure
+ * -------------------------------------------------------------------
+ */
+static int
+parse_time(
+ struct calendar * jd, /* result calendar pointer */
+ long * ns, /* storage for nsec fraction */
+ nmea_data * rd,
+ int idx
+ )
+{
+ static const unsigned long weight[4] = {
+ 0, 100000000, 10000000, 1000000
+ };
+
+ int rc;
+ u_int h;
+ u_int m;
+ u_int s;
+ int p1;
+ int p2;
+ u_long f;
+ char * dp;
+
+ dp = field_parse(rd, idx);
+ rc = sscanf(dp, "%2u%2u%2u%n.%3lu%n", &h, &m, &s, &p1, &f, &p2);
+ if (rc < 3 || p1 != 6) {
+ DPRINTF(1, ("nmea: invalid time code: '%.6s'\n", dp));
+ return FALSE;
+ }
+
+ /* value sanity check */
+ if (h > 23 || m > 59 || s > 60) {
+ DPRINTF(1, ("nmea: invalid time spec %02u:%02u:%02u\n",
+ h, m, s));
+ return FALSE;
+ }
- if (my_cs != input_cs)
- return 0;
+ jd->hour = (u_char)h;
+ jd->minute = (u_char)m;
+ jd->second = (u_char)s;
+ /* if we have a fraction, scale it up to nanoseconds. */
+ if (rc == 4)
+ *ns = f * weight[p2 - p1 - 1];
+ else
+ *ns = 0;
- return 1;
+ return TRUE;
}
/*
* -------------------------------------------------------------------
- * funny calendar-oriented stuff -- a bit hard to grok.
+ * Parse a date string from an NMEA sentence. This could either be a
+ * partial date in DDMMYY format in one field, or DD,MM,YYYY full date
+ * spec spanning three fields. This function does some extensive error
+ * checking to make sure the date string was consistent.
+ *
+ * returns 1 on success, 0 on failure
* -------------------------------------------------------------------
*/
+static int
+parse_date(
+ struct calendar * jd, /* result pointer */
+ nmea_data * rd,
+ int idx,
+ enum date_fmt fmt
+ )
+{
+ int rc;
+ u_int y;
+ u_int m;
+ u_int d;
+ int p;
+ char * dp;
+
+ dp = field_parse(rd, idx);
+ switch (fmt) {
+
+ case DATE_1_DDMMYY:
+ rc = sscanf(dp, "%2u%2u%2u%n", &d, &m, &y, &p);
+ if (rc != 3 || p != 6) {
+ DPRINTF(1, ("nmea: invalid date code: '%.6s'\n",
+ dp));
+ return FALSE;
+ }
+ break;
+
+ case DATE_3_DDMMYYYY:
+ rc = sscanf(dp, "%2u,%2u,%4u%n", &d, &m, &y, &p);
+ if (rc != 3 || p != 10) {
+ DPRINTF(1, ("nmea: invalid date code: '%.10s'\n",
+ dp));
+ return FALSE;
+ }
+ break;
+
+ default:
+ DPRINTF(1, ("nmea: invalid parse format: %d\n", fmt));
+ return FALSE;
+ }
+
+ /* value sanity check */
+ if (d < 1 || d > 31 || m < 1 || m > 12) {
+ DPRINTF(1, ("nmea: invalid date spec (YMD) %04u:%02u:%02u\n",
+ y, m, d));
+ return FALSE;
+ }
+
+ /* store results */
+ jd->monthday = (u_char)d;
+ jd->month = (u_char)m;
+ jd->year = (u_short)y;
+
+ return TRUE;
+}
+
/*
- * Do a periodic unfolding of a truncated value around a given pivot
- * value.
- * The result r will hold to pivot <= r < pivot+period (period>0) or
- * pivot+period < r <= pivot (period < 0) and value % period == r % period,
- * using floor division convention.
+ * -------------------------------------------------------------------
+ * Parse GPS week time info from an NMEA sentence. This info contains
+ * the GPS week number, the GPS time-of-week and the leap seconds GPS
+ * to UTC.
+ *
+ * returns 1 on success, 0 on failure
+ * -------------------------------------------------------------------
*/
-static time_t
-nmea_periodic_unfold(
- time_t pivot,
- time_t value,
- time_t period)
+static int
+parse_weekdata(
+ gps_weektm * wd,
+ nmea_data * rd,
+ int weekidx,
+ int timeidx,
+ int leapidx
+ )
{
- /*
- * This will only work as long as 'value - pivot%period' does
- * not create a signed overflow condition.
- */
- value = (value - (pivot % period)) % period;
- if (value && (value ^ period) < 0)
- value += period;
- return pivot + value;
+ u_long secs;
+ int fcnt;
+
+ /* parse fields and count success */
+ fcnt = sscanf(field_parse(rd, weekidx), "%hu", &wd->wt_week);
+ fcnt += sscanf(field_parse(rd, timeidx), "%lu", &secs);
+ fcnt += sscanf(field_parse(rd, leapidx), "%hd", &wd->wt_leap);
+ if (fcnt != 3 || wd->wt_week >= 1024 || secs >= 7*SECSPERDAY) {
+ DPRINTF(1, ("nmea: parse_weekdata: invalid weektime spec\n"));
+ return FALSE;
+ }
+ wd->wt_time = (u_int32)secs;
+
+ return TRUE;
}
/*
+ * -------------------------------------------------------------------
+ * funny calendar-oriented stuff -- perhaps a bit hard to grok.
+ * -------------------------------------------------------------------
+ *
* Unfold a time-of-day (seconds since midnight) around the current
* system time in a manner that guarantees an absolute difference of
* less than 12hrs.
@@ -1212,65 +1630,327 @@ nmea_periodic_unfold(
* off if not augmented with a time sources that also provide the
* necessary date information.
*
- * The function updates the refclockproc structure is also uses as
+ * The function updates the calendar structure it also uses as
* input to fetch the time from.
+ *
+ * returns 1 on success, 0 on failure
+ * -------------------------------------------------------------------
*/
-static void
-nmea_day_unfold(
- struct calendar *jd)
+static int
+unfold_day(
+ struct calendar * jd,
+ u_int32 rec_ui
+ )
{
- time_t value, pivot;
- struct tm *tdate;
-
- value = ((time_t)jd->hour * MINSPERHR
- + (time_t)jd->minute) * SECSPERMIN
- + (time_t)jd->second;
- pivot = time(NULL) - SECSPERDAY/2;
-
- value = nmea_periodic_unfold(pivot, value, SECSPERDAY);
- tdate = gmtime(&value);
- if (tdate) {
- jd->year = tdate->tm_year + 1900;
- jd->yearday = tdate->tm_yday + 1;
- jd->month = tdate->tm_mon + 1;
- jd->monthday = tdate->tm_mday;
- jd->hour = tdate->tm_hour;
- jd->minute = tdate->tm_min;
- jd->second = tdate->tm_sec;
- } else {
- jd->year = 0;
- jd->yearday = 0;
- jd->month = 0;
- jd->monthday = 0;
+ vint64 rec_qw;
+ ntpcal_split rec_ds;
+
+ /*
+ * basically this is the peridiodic extension of the receive
+ * time - 12hrs to the time-of-day with a period of 1 day.
+ * But we would have to execute this in 64bit arithmetic, and we
+ * cannot assume we can do this; therefore this is done
+ * in split representation.
+ */
+ rec_qw = ntpcal_ntp_to_ntp(rec_ui - SECSPERDAY/2, NULL);
+ rec_ds = ntpcal_daysplit(&rec_qw);
+ rec_ds.lo = ntpcal_periodic_extend(rec_ds.lo,
+ ntpcal_date_to_daysec(jd),
+ SECSPERDAY);
+ rec_ds.hi += ntpcal_daysec_to_date(jd, rec_ds.lo);
+ return (ntpcal_rd_to_date(jd, rec_ds.hi + DAY_NTP_STARTS) >= 0);
+}
+
+/*
+ * -------------------------------------------------------------------
+ * A 2-digit year is expanded into full year spec around the year found
+ * in 'jd->year'. This should be in +79/-19 years around the system time,
+ * or the result will be off by 100 years. The assymetric behaviour was
+ * chosen to enable inital sync for systems that do not have a
+ * battery-backup clock and start with a date that is typically years in
+ * the past.
+ *
+ * Since the GPS epoch starts at 1980-01-06, the resulting year will be
+ * not be before 1980 in any case.
+ *
+ * returns 1 on success, 0 on failure
+ * -------------------------------------------------------------------
+ */
+static int
+unfold_century(
+ struct calendar * jd,
+ u_int32 rec_ui
+ )
+{
+ struct calendar rec;
+ int32 baseyear;
+
+ ntpcal_ntp_to_date(&rec, rec_ui, NULL);
+ baseyear = rec.year - 20;
+ if (baseyear < g_gpsMinYear)
+ baseyear = g_gpsMinYear;
+ jd->year = (u_short)ntpcal_periodic_extend(baseyear, jd->year,
+ 100);
+
+ return ((baseyear <= jd->year) && (baseyear + 100 > jd->year));
+}
+
+/*
+ * -------------------------------------------------------------------
+ * A 2-digit year is expanded into a full year spec by correlation with
+ * a GPS week number and the current leap second count.
+ *
+ * The GPS week time scale counts weeks since Sunday, 1980-01-06, modulo
+ * 1024 and seconds since start of the week. The GPS time scale is based
+ * on international atomic time (TAI), so the leap second difference to
+ * UTC is also needed for a proper conversion.
+ *
+ * A brute-force analysis (that is, test for every date) shows that a
+ * wrong assignment of the century can not happen between the years 1900
+ * to 2399 when comparing the week signatures for different
+ * centuries. (I *think* that will not happen for 400*1024 years, but I
+ * have no valid proof. -*-perlinger@ntp.org-*-)
+ *
+ * This function is bound to to work between years 1980 and 2399
+ * (inclusive), which should suffice for now ;-)
+ *
+ * Note: This function needs a full date&time spec on input due to the
+ * necessary leap second corrections!
+ *
+ * returns 1 on success, 0 on failure
+ * -------------------------------------------------------------------
+ */
+static int
+gpsfix_century(
+ struct calendar * jd,
+ const gps_weektm * wd,
+ u_short * century
+ )
+{
+ int32 days;
+ int32 doff;
+ u_short week;
+ u_short year;
+ int loop;
+
+ /* Get day offset. Assumes that the input time is in range and
+ * that the leap seconds do not shift more than +/-1 day.
+ */
+ doff = ntpcal_date_to_daysec(jd) + wd->wt_leap;
+ doff = (doff >= SECSPERDAY) - (doff < 0);
+
+ /*
+ * Loop over centuries to get a match, starting with the last
+ * successful one. (Or with the 19th century if the cached value
+ * is out of range...)
+ */
+ year = jd->year % 100;
+ for (loop = 5; loop > 0; loop--,(*century)++) {
+ if (*century < 19 || *century >= 24)
+ *century = 19;
+ /* Get days and week in GPS epoch */
+ jd->year = year + *century * 100;
+ days = ntpcal_date_to_rd(jd) - DAY_GPS_STARTS + doff;
+ week = (days / 7) % 1024;
+ if (days >= 0 && wd->wt_week == week)
+ return TRUE; /* matched... */
}
+
+ jd->year = year;
+ return FALSE; /* match failed... */
}
/*
- * Unfold a 2-digit year into full year spec around the current year
- * of the system time. This requires the system clock to be in -79/+19
- * years around the true time, or the result will be off by
- * 100years. The assymetric behaviour was chosen to enable inital sync
- * for systems that do not have a battery-backup-clock and start with
- * a date that is typically years in the past.
- *
- * The function updates the calendar structure that is also used as
- * input to fetch the year from.
+ * -------------------------------------------------------------------
+ * And now the final execise: Considering the fact that many (most?)
+ * GPS receivers cannot handle a GPS epoch wrap well, we try to
+ * compensate for that problem by unwrapping a GPS epoch around the
+ * receive stamp. Another execise in periodic unfolding, of course,
+ * but with enough points to take care of.
+ *
+ * Note: The integral part of 'tofs' is intended to handle small(!)
+ * systematic offsets, as -1 for handling $GPZDG, which gives the
+ * following second. (sigh...) The absolute value shall be less than a
+ * day (86400 seconds).
+ * -------------------------------------------------------------------
*/
-static void
-nmea_century_unfold(
- struct calendar *jd)
+static l_fp
+eval_gps_time(
+ struct peer * peer, /* for logging etc */
+ const struct calendar * gpst, /* GPS time stamp */
+ const struct timespec * tofs, /* GPS frac second & offset */
+ const l_fp * recv /* receive time stamp */
+ )
{
- time_t pivot_time;
- struct tm *pivot_date;
- time_t pivot_year;
-
- /* get warp limit and century start of pivot from system time */
- pivot_time = time(NULL);
- pivot_date = gmtime(&pivot_time);
- pivot_year = pivot_date->tm_year + 1900 - 20;
- jd->year = nmea_periodic_unfold(pivot_year, jd->year, 100);
+ struct refclockproc * const pp = peer->procptr;
+ nmea_unit * const up = (nmea_unit *)pp->unitptr;
+
+ l_fp retv;
+
+ /* components of calculation */
+ int32_t rcv_sec, rcv_day; /* receive ToD and day */
+ int32_t gps_sec, gps_day; /* GPS ToD and day in NTP epoch */
+ int32_t adj_day, weeks; /* adjusted GPS day and week shift */
+
+ /* some temporaries to shuffle data */
+ vint64 vi64;
+ ntpcal_split rs64;
+
+ /* evaluate time stamp from receiver. */
+ gps_sec = ntpcal_date_to_daysec(gpst);
+ gps_day = ntpcal_date_to_rd(gpst) - DAY_NTP_STARTS;
+
+ /* merge in fractional offset */
+ retv = tspec_intv_to_lfp(*tofs);
+ gps_sec += retv.l_i;
+
+ /* If we fully trust the GPS receiver, just combine days and
+ * seconds and be done. */
+ if (peer->ttl & NMEA_DATETRUST_MASK) {
+ retv.l_ui = ntpcal_dayjoin(gps_day, gps_sec).D_s.lo;
+ return retv;
+ }
+
+ /* So we do not trust the GPS receiver to deliver a correct date
+ * due to the GPS epoch changes. We map the date from the
+ * receiver into the +/-512 week interval around the receive
+ * time in that case. This would be a tad easier with 64bit
+ * calculations, but again, we restrict the code to 32bit ops
+ * when possible. */
+
+ /* - make sure the GPS fractional day is normalised
+ * Applying the offset value might have put us slightly over the
+ * edge of the allowed range for seconds-of-day. Doing a full
+ * division with floor correction is overkill here; a simple
+ * addition or subtraction step is sufficient. Using WHILE loops
+ * gives the right result even if the offset exceeds one day,
+ * which is NOT what it's intented for! */
+ while (gps_sec >= SECSPERDAY) {
+ gps_sec -= SECSPERDAY;
+ gps_day += 1;
+ }
+ while (gps_sec < 0) {
+ gps_sec += SECSPERDAY;
+ gps_day -= 1;
+ }
+
+ /* - get unfold base: day of full recv time - 512 weeks */
+ vi64 = ntpcal_ntp_to_ntp(recv->l_ui, NULL);
+ rs64 = ntpcal_daysplit(&vi64);
+ rcv_sec = rs64.lo;
+ rcv_day = rs64.hi - 512 * 7;
+
+ /* - take the fractional days into account
+ * If the fractional day of the GPS time is smaller than the
+ * fractional day of the receive time, we shift the base day for
+ * the unfold by 1. */
+ if ( gps_sec < rcv_sec
+ || (gps_sec == rcv_sec && retv.l_uf < recv->l_uf))
+ rcv_day += 1;
+
+ /* - don't warp ahead of GPS invention! */
+ if (rcv_day < g_gpsMinBase)
+ rcv_day = g_gpsMinBase;
+
+ /* - let the magic happen: */
+ adj_day = ntpcal_periodic_extend(rcv_day, gps_day, 1024*7);
+
+ /* - check if we should log a GPS epoch warp */
+ weeks = (adj_day - gps_day) / 7;
+ if (weeks != up->epoch_warp) {
+ up->epoch_warp = weeks;
+ LOGIF(CLOCKINFO, (LOG_INFO,
+ "%s Changed GPS epoch warp to %d weeks",
+ refnumtoa(&peer->srcadr), weeks));
+ }
+
+ /* - build result and be done */
+ retv.l_ui = ntpcal_dayjoin(adj_day, gps_sec).D_s.lo;
+ return retv;
}
+/*
+ * ===================================================================
+ *
+ * NMEAD support
+ *
+ * original nmead support added by Jon Miner (cp_n18@yahoo.com)
+ *
+ * See http://home.hiwaay.net/~taylorc/gps/nmea-server/
+ * for information about nmead
+ *
+ * To use this, you need to create a link from /dev/gpsX to
+ * the server:port where nmead is running. Something like this:
+ *
+ * ln -s server:port /dev/gps1
+ *
+ * Split into separate function by Juergen Perlinger
+ * (perlinger-at-ntp-dot-org)
+ *
+ * ===================================================================
+ */
+static int
+nmead_open(
+ const char * device
+ )
+{
+ int fd = -1; /* result file descriptor */
+
+#ifdef HAVE_READLINK
+ char host[80]; /* link target buffer */
+ char * port; /* port name or number */
+ int rc; /* result code (several)*/
+ int sh; /* socket handle */
+ struct addrinfo ai_hint; /* resolution hint */
+ struct addrinfo *ai_list; /* resolution result */
+ struct addrinfo *ai; /* result scan ptr */
+
+ fd = -1;
+
+ /* try to read as link, make sure no overflow occurs */
+ rc = readlink(device, host, sizeof(host));
+ if ((size_t)rc >= sizeof(host))
+ return fd; /* error / overflow / truncation */
+ host[rc] = '\0'; /* readlink does not place NUL */
+
+ /* get port */
+ port = strchr(host, ':');
+ if (!port)
+ return fd; /* not 'host:port' syntax ? */
+ *port++ = '\0'; /* put in separator */
+
+ /* get address infos and try to open socket
+ *
+ * This getaddrinfo() is naughty in ntpd's nonblocking main
+ * thread, but you have to go out of your wary to use this code
+ * and typically the blocking is at startup where its impact is
+ * reduced. The same holds for the 'connect()', as it is
+ * blocking, too...
+ */
+ ZERO(ai_hint);
+ ai_hint.ai_protocol = IPPROTO_TCP;
+ ai_hint.ai_socktype = SOCK_STREAM;
+ if (getaddrinfo(host, port, &ai_hint, &ai_list))
+ return fd;
+
+ for (ai = ai_list; ai && (fd == -1); ai = ai->ai_next) {
+ sh = socket(ai->ai_family, ai->ai_socktype,
+ ai->ai_protocol);
+ if (INVALID_SOCKET == sh)
+ continue;
+ rc = connect(sh, ai->ai_addr, ai->ai_addrlen);
+ if (-1 != rc)
+ fd = sh;
+ else
+ close(sh);
+ }
+ freeaddrinfo(ai_list);
+#else
+ fd = -1;
+#endif
+
+ return fd;
+}
#else
-int refclock_nmea_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK && CLOCK_NMEA */
diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c
index bce8db882bdc..3bc60bf50321 100644
--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -11,7 +11,7 @@
* 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.
+ * than the others.
* The receivers without position hold (GT, GT+) will be less accurate.
*
* Tested with:
@@ -161,9 +161,11 @@
#include "ntp_io.h"
#include "ntp_unixtime.h"
#include "ntp_refclock.h"
+#include "ntp_calendar.h"
#include "ntp_stdlib.h"
#include <stdio.h>
+#include <stdarg.h>
#include <ctype.h>
#include <sys/stat.h>
#ifdef ONCORE_SHMEM_STATUS
@@ -179,10 +181,6 @@
# include "ppsapi_timepps.h"
#endif
-#ifdef HAVE_SYS_SIO_H
-# include <sys/sio.h>
-#endif
-
struct Bl {
int dt_ls;
int dt_lsf;
@@ -353,6 +351,8 @@ struct instance {
u_char once; /* one pass code at top of BaEaHa */
s_char assert;
u_char hardpps;
+ s_char pps_control; /* PPS control, M12 only */
+ s_char pps_control_msg_seen;
};
#define rcvbuf instance->Rcvbuf
@@ -377,6 +377,8 @@ static int oncore_checksum_ok (u_char *, int);
static void oncore_compute_dH (struct instance *);
static void oncore_load_almanac (struct instance *);
static void oncore_log (struct instance *, int, const char *);
+static int oncore_log_f (struct instance *, int, const char *, ...)
+ NTP_PRINTF(3, 4);
static void oncore_print_Cb (struct instance *, u_char *);
/* static void oncore_print_array (u_char *, int); */
static void oncore_print_posn (struct instance *);
@@ -407,6 +409,7 @@ static void oncore_msg_Cj_id (struct instance *, u_char *, size_t);
static void oncore_msg_Cj_init (struct instance *, u_char *, size_t);
static void oncore_msg_Ga (struct instance *, u_char *, size_t);
static void oncore_msg_Gb (struct instance *, u_char *, size_t);
+static void oncore_msg_Gc (struct instance *, u_char *, size_t);
static void oncore_msg_Gj (struct instance *, u_char *, size_t);
static void oncore_msg_Sz (struct instance *, u_char *, size_t);
@@ -467,7 +470,7 @@ static struct msg_desc {
{ "Fa", 9, oncore_msg_CaFaIa, "" },
{ "Ga", 20, oncore_msg_Ga, "" },
{ "Gb", 17, oncore_msg_Gb, "" },
- { "Gc", 8, 0, "" },
+ { "Gc", 8, oncore_msg_Gc, "" },
{ "Gd", 8, 0, "" },
{ "Ge", 8, 0, "" },
{ "Gj", 21, oncore_msg_Gj, "" },
@@ -528,7 +531,7 @@ static u_char oncore_cmd_Gax[] = { 'G', 'a', 0xff, 0xff, 0xff, 0xff, /* 12
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_Gc[] = { 'G', 'c', 0 }; /* 12 PPS Control: Off, On, 1+satellite,TRAIM */
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) */
@@ -550,9 +553,6 @@ static u_char oncore_cmd_Ia[] = { 'I', 'a' }; /* 12 Self Test */
* 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 */
@@ -595,8 +595,10 @@ oncore_start(
register struct instance *instance;
struct refclockproc *pp;
int fd1, fd2;
- char device1[STRING_LEN], device2[STRING_LEN], Msg[160];
+ char device1[STRING_LEN], device2[STRING_LEN];
+#ifndef SYS_WINNT
struct stat stat1, stat2;
+#endif
/* create instance structure for this unit */
@@ -606,7 +608,6 @@ oncore_start(
/* initialize miscellaneous variables */
pp = peer->procptr;
- pp->unitptr = (caddr_t) instance;
instance->pp = pp;
instance->unit = unit;
instance->peer = peer;
@@ -617,12 +618,15 @@ oncore_start(
instance->traim = -1;
instance->traim_in = -1;
instance->chan_in = -1;
+ instance->pps_control = -1; /* PPS control, M12 only */
+ instance->pps_control_msg_seen = -1; /* Have seen response to Gc msg */
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->flags &= ~FLAG_PPS; /* PPS not active yet */
peer->precision = -26;
peer->minpoll = 4;
peer->maxpoll = 4;
@@ -666,25 +670,22 @@ oncore_start(
*/
#ifndef SYS_WINNT
if (stat(device1, &stat1)) {
- snprintf(Msg, sizeof(Msg), "Can't stat fd1 (%s)",
- device1);
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR, "Can't stat fd1 (%s)",
+ device1);
return(0); /* exit, no file, can't start driver */
}
if (stat(device2, &stat2)) {
stat2.st_dev = stat2.st_ino = -2;
- snprintf(Msg, sizeof(Msg),
- "Can't stat fd2 (%s) errno = %d",
- device2, errno);
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR, "Can't stat fd2 (%s) %d %m",
+ device2, errno);
}
#endif /* !SYS_WINNT */
- if (!(fd1 = refclock_open(device1, SPEED, LDISC_RAW))) {
- snprintf(Msg, sizeof(Msg), "Can't open fd1 (%s)",
- device1);
- oncore_log(instance, LOG_ERR, Msg);
+ fd1 = refclock_open(device1, SPEED, LDISC_RAW);
+ if (fd1 <= 0) {
+ oncore_log_f(instance, LOG_ERR, "Can't open fd1 (%s)",
+ device1);
return(0); /* exit, can't open file, can't start driver */
}
@@ -700,9 +701,8 @@ oncore_start(
#endif /* !SYS_WINNT */
{ /* different devices here */
if ((fd2=tty_open(device2, O_RDWR, 0777)) < 0) {
- snprintf(Msg, sizeof(Msg),
- "Can't open fd2 (%s)", device2);
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR,
+ "Can't open fd2 (%s)", device2);
return(0); /* exit, can't open PPS file, can't start driver */
}
}
@@ -727,15 +727,17 @@ oncore_start(
return(0);
pp->io.clock_recv = oncore_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd1;
if (!io_addclock(&pp->io)) {
oncore_log(instance, LOG_ERR, "can't do io_addclock");
- (void) close(fd1);
+ close(fd1);
+ pp->io.fd = -1;
free(instance);
return (0);
}
+ pp->unitptr = instance;
#ifdef ONCORE_SHMEM_STATUS
/*
@@ -778,21 +780,24 @@ oncore_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- instance = (struct instance *) pp->unitptr;
+ instance = pp->unitptr;
- io_closeclock(&pp->io);
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
- time_pps_destroy (instance->pps_h);
+ if (instance != NULL) {
+ time_pps_destroy (instance->pps_h);
- close(instance->ttyfd);
+ close(instance->ttyfd);
- if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd))
- close(instance->ppsfd);
+ if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd))
+ close(instance->ppsfd);
- if (instance->shmemfd)
- close(instance->shmemfd);
+ if (instance->shmemfd)
+ close(instance->shmemfd);
- free(instance);
+ free(instance);
+ }
}
@@ -809,7 +814,7 @@ oncore_poll(
{
struct instance *instance;
- instance = (struct instance *) peer->procptr->unitptr;
+ instance = peer->procptr->unitptr;
if (instance->timeout) {
instance->timeout--;
if (instance->timeout == 0) {
@@ -843,17 +848,15 @@ oncore_ppsapi(
)
{
int cap, mode, mode1;
- char *cp, Msg[160];
+ char *cp;
if (time_pps_getcap(instance->pps_h, &cap) < 0) {
- msnprintf(Msg, sizeof(Msg), "time_pps_getcap failed: %m");
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR, "time_pps_getcap failed: %m");
return (0);
}
if (time_pps_getparams(instance->pps_h, &instance->pps_p) < 0) {
- msnprintf(Msg, sizeof(Msg), "time_pps_getparams failed: %m");
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR, "time_pps_getparams failed: %m");
return (0);
}
@@ -870,20 +873,19 @@ oncore_ppsapi(
mode = PPS_CAPTURECLEAR;
mode1 = PPS_OFFSETCLEAR;
}
- snprintf(Msg, sizeof(Msg), "Initializing timing to %s.", cp);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Initializing timing to %s.",
+ cp);
if (!(mode & cap)) {
- snprintf(Msg, sizeof(Msg),
- "Can't set timing to %s, exiting...", cp);
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR,
+ "Can't set timing to %s, exiting...", cp);
return(0);
}
if (!(mode1 & cap)) {
- snprintf(Msg, sizeof(Msg),
- "Can't set %s, this will increase jitter.", cp);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Can't set %s, this will increase jitter.",
+ cp);
mode1 = 0;
}
@@ -892,7 +894,7 @@ oncore_ppsapi(
instance->pps_p.mode = (mode | mode1 | PPS_TSFMT_TSPEC) & cap;
if (time_pps_setparams(instance->pps_h, &instance->pps_p) < 0) {
- oncore_log(instance, LOG_ERR, "ONCORE: time_pps_setparams fails");
+ oncore_log_f(instance, LOG_ERR, "ONCORE: time_pps_setparams fails %m");
return(0); /* exit, can't do time_pps_setparans on PPS file */
}
@@ -912,13 +914,12 @@ oncore_ppsapi(
if (time_pps_kcbind(instance->pps_h, PPS_KC_HARDPPS, i,
PPS_TSFMT_TSPEC) < 0) {
- msnprintf(Msg, sizeof(Msg), "time_pps_kcbind failed: %m");
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR, "time_pps_kcbind failed: %m");
oncore_log(instance, LOG_ERR, "HARDPPS failed, abort...");
return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
return(1);
}
@@ -932,7 +933,6 @@ oncore_init_shmem(
)
{
int i, l, n, fd, shmem_old_size, n1;
- char Msg[160];
u_char *cp, *cp1, *buf, *shmem_old;
struct msg_desc *mp;
struct stat sbuf;
@@ -1067,10 +1067,9 @@ oncore_init_shmem(
return;
}
- snprintf(Msg, sizeof(Msg),
- "SHMEM (size = %ld) is CONFIGURED and available as %s",
- (u_long) shmem_length, instance->shmem_fname);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "SHMEM (size = %ld) is CONFIGURED and available as %s",
+ (u_long) shmem_length, instance->shmem_fname);
}
#endif /* ONCORE_SHMEM_STATUS */
@@ -1165,7 +1164,7 @@ oncore_read_config(
* 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.
+ * 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.
*
@@ -1191,6 +1190,17 @@ oncore_read_config(
* 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.
*
+ * There is an optional line with PPSCONTROL on it (only valid for M12 or M12+T
+ * receivers, the option is read, but ignored for all others)
+ * and it is followed by:
+ * ON Turn PPS on. This is the default and the default for other
+ * oncore receivers. The PPS is on even if not tracking
+ * any satellites.
+ * SATELLITE Turns PPS on if tracking at least 1 satellite, else off.
+ * TRAIM Turns PPS on or off controlled by TRAIM.
+ * The OFF option is NOT implemented, since the Oncore driver will not work
+ * without the PPS signal.
+ *
* So acceptable input would be
* # these are my coordinates (RWC)
* LON -106 34.610
@@ -1200,7 +1210,7 @@ oncore_read_config(
*/
FILE *fd;
- char *cp, *cc, *ca, line[100], units[2], device[64], Msg[160], **cpp;
+ char *cp, *cc, *ca, line[100], units[2], device[64], **cpp;
char *dirs[] = { "/etc/ntp", "/etc", 0 };
int i, sign, lat_flg, long_flg, ht_flg, mode, mask;
double f1, f2, f3;
@@ -1314,12 +1324,11 @@ oncore_read_config(
f1 = 1000000000 * f1;
if (f1 < 0 || f1 > 1.e9)
f1 = 0;
- if (f1 < 0 || f1 > 999999) {
- snprintf(Msg, sizeof(Msg),
- "PPS Cable delay of %fns out of Range, ignored",
- f1);
- oncore_log(instance, LOG_WARNING, Msg);
- } else
+ if (f1 < 0 || f1 > 999999)
+ oncore_log_f(instance, LOG_WARNING,
+ "PPS Cable delay of %fns out of Range, ignored",
+ f1);
+ else
instance->delay = f1; /* delay in ns */
} else if (!strncmp(cc, "OFFSET", (size_t) 6)) {
f1 = 0;
@@ -1335,12 +1344,11 @@ oncore_read_config(
f1 = 1000000000 * f1;
if (f1 < 0 || f1 > 1.e9)
f1 = 0;
- if (f1 < 0 || f1 > 999999999.) {
- snprintf(Msg, sizeof(Msg),
- "PPS Offset of %fns out of Range, ignored",
- f1);
- oncore_log(instance, LOG_WARNING, Msg);
- } else
+ if (f1 < 0 || f1 > 999999999.)
+ oncore_log_f(instance, LOG_WARNING,
+ "PPS Offset of %fns out of Range, ignored",
+ f1);
+ else
instance->offset = f1; /* offset in ns */
} else if (!strncmp(cc, "MODE", (size_t) 4)) {
sscanf(ca, "%d", &mode);
@@ -1368,6 +1376,18 @@ oncore_read_config(
sscanf(ca, "%d", &mask);
if (mask > -1 && mask < 90)
instance->Ag = mask; /* Satellite mask angle */
+ } else if (!strncmp(cc,"PPSCONTROL",10)) { /* pps control M12 only */
+ if (!strcmp(ca,"ON") || !strcmp(ca, "CONTINUOUS")) {
+ instance->pps_control = 1; /* PPS always on */
+ } else if (!strcmp(ca,"SATELLITE")) {
+ instance->pps_control = 2; /* PPS on when satellite is available */
+ } else if (!strcmp(ca,"TRAIM")) {
+ instance->pps_control = 3; /* PPS on when TRAIM status is OK */
+ } else {
+ oncore_log_f(instance, LOG_WARNING,
+ "Unknown value \"%s\" for PPSCONTROL, ignored",
+ cc);
+ }
}
}
fclose(fd);
@@ -1379,22 +1399,19 @@ oncore_read_config(
instance->posn_set = 1;
if (!( lat_flg && long_flg && ht_flg )) {
- snprintf(Msg, sizeof(Msg),
- "ONCORE: incomplete data on %s", device);
- oncore_log (instance, LOG_WARNING, Msg);
+ oncore_log_f(instance, LOG_WARNING,
+ "ONCORE: incomplete data on %s", device);
instance->posn_set = 0;
if (mode == 1 || mode == 3) {
- snprintf(Msg, sizeof(Msg),
- "Input Mode = %d, but no/incomplete position, mode set to %d",
- mode, mode+1);
- oncore_log(instance, LOG_WARNING, Msg);
+ oncore_log_f(instance, LOG_WARNING,
+ "Input Mode = %d, but no/incomplete position, mode set to %d",
+ mode, mode+1);
mode++;
}
}
instance->init_type = mode;
- snprintf(Msg, sizeof(Msg), "Input mode = %d", mode);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Input mode = %d", mode);
}
@@ -1413,8 +1430,8 @@ oncore_receive(
struct peer *peer;
struct instance *instance;
- peer = (struct peer *)rbufp->recv_srcclock;
- instance = (struct instance *) peer->procptr->unitptr;
+ peer = rbufp->recv_peer;
+ instance = peer->procptr->unitptr;
p = (u_char *) &rbufp->recv_space;
#ifdef ONCORE_VERBOSE_RECEIVE
@@ -1422,20 +1439,20 @@ oncore_receive(
int i;
char Msg[120], Msg2[10];
- snprintf(Msg, sizeof(Msg), ">>> %d bytes available",
- rbufp->recv_length);
- oncore_log(instance, LOG_DEBUG, Msg);
- strncpy(Msg, ">>>", sizeof(Msg));
+ oncore_log_f(instance, LOG_DEBUG,
+ ">>> %d bytes available",
+ rbufp->recv_length);
+ strlcpy(Msg, ">>>", sizeof(Msg));
for (i = 0; i < rbufp->recv_length; i++) {
snprintf(Msg2, sizeof(Msg2), "%02x ", p[i]);
- strncat(Msg, Msg2, sizeof(Msg));
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
- strncpy(Msg, ">>>", sizeof(Msg));
+ strlcpy(Msg, ">>>", sizeof(Msg));
for (i = 0; i < rbufp->recv_length; i++) {
snprintf(Msg2, sizeof(Msg2), "%03o ", p[i]);
- strncat(Msg, Msg2, sizeof(Msg));
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
}
@@ -1470,13 +1487,10 @@ oncore_consume(
if (rcvbuf[i] == '@' && rcvbuf[i+1] == '@')
break;
#ifdef ONCORE_VERBOSE_CONSUME
- if (debug > 4) {
- char Msg[120];
-
- snprintf(Msg, sizeof(Msg),
- ">>> skipping %d chars", i);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ if (debug > 4)
+ oncore_log_f(instance, LOG_DEBUG,
+ ">>> skipping %d chars",
+ i);
#endif
if (i != rcvptr)
memcpy(rcvbuf, rcvbuf+i, (size_t)(rcvptr-i));
@@ -1491,14 +1505,10 @@ oncore_consume(
break;
if (m == l) {
#ifdef ONCORE_VERBOSE_CONSUME
- if (debug > 4) {
- char Msg[120];
-
- snprintf(Msg, sizeof(Msg),
- ">>> Unknown MSG, skipping 4 (%c%c)",
- rcvbuf[2], rcvbuf[3]);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ if (debug > 4)
+ oncore_log_f(instance, LOG_DEBUG,
+ ">>> Unknown MSG, skipping 4 (%c%c)",
+ rcvbuf[2], rcvbuf[3]);
#endif
memcpy(rcvbuf, rcvbuf+4, (size_t) 4);
rcvptr -= 4;
@@ -1507,15 +1517,11 @@ oncore_consume(
l = oncore_messages[m].len;
#ifdef ONCORE_VERBOSE_CONSUME
- if (debug > 3) {
- char Msg[120];
-
- snprintf(Msg, sizeof(Msg),
- "GOT: %c%c %d of %d entry %d",
- instance->unit, rcvbuf[2], rcvbuf[3],
- rcvptr, l, m);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ if (debug > 3)
+ oncore_log_f(instance, LOG_DEBUG,
+ "GOT: %c%c %d of %d entry %d",
+ instance->unit, rcvbuf[2],
+ rcvbuf[3], rcvptr, l, m);
#endif
/* Got the entire message ? */
@@ -1549,7 +1555,7 @@ oncore_consume(
for (i = 4; i < l; i++) {
snprintf(Msg2, sizeof(Msg2),
"%03o ", rcvbuf[i]);
- strncat(Msg, Msg2, sizeof(Msg));
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
}
@@ -1585,7 +1591,7 @@ oncore_get_timestamp(
struct timespec timeout;
struct peer *peer;
pps_info_t pps_i;
- char Msg[140];
+ char Msg[160];
peer = instance->peer;
@@ -1602,14 +1608,14 @@ oncore_get_timestamp(
if ((instance->site_survey != ONCORE_SS_DONE) || (instance->mode != MODE_0D)) {
#endif
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
/* Don't do anything without an almanac to define the GPS->UTC delta */
if (instance->rsm.bad_almanac) {
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1621,7 +1627,7 @@ oncore_get_timestamp(
if (instance->count5) {
instance->count5--;
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1630,8 +1636,9 @@ oncore_get_timestamp(
timeout.tv_nsec = 0;
if (time_pps_fetch(instance->pps_h, PPS_TSFMT_TSPEC, &pps_i,
&timeout) < 0) {
- oncore_log(instance, LOG_ERR, "time_pps_fetch failed");
- peer->flags &= ~FLAG_PPS;
+ oncore_log_f(instance, LOG_ERR,
+ "time_pps_fetch failed %m");
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1644,21 +1651,22 @@ oncore_get_timestamp(
i = (u_long) pps_i.assert_sequence;
# ifdef HAVE_STRUCT_TIMESPEC
- snprintf(Msg, sizeof(Msg),
- "serial/j (%lu, %lu) %ld.%09ld", i, j,
- (long)tsp->tv_sec, (long)tsp->tv_nsec);
+ oncore_log_f(instance, LOG_DEBUG,
+ "serial/j (%lu, %lu) %ld.%09ld", i,
+ j, (long)tsp->tv_sec,
+ (long)tsp->tv_nsec);
# else
- snprintf(Msg, sizeof(Msg),
- "serial/j (%lu, %lu) %ld.%06ld", i, j,
- (long)tsp->tv_sec, (long)tsp->tv_usec);
+ oncore_log_f(instance, LOG_DEBUG,
+ "serial/j (%lu, %lu) %ld.%06ld", i,
+ j, (long)tsp->tv_sec,
+ (long)tsp->tv_usec);
# endif
- oncore_log(instance, LOG_DEBUG, Msg);
}
#endif
if (pps_i.assert_sequence == j) {
oncore_log(instance, LOG_NOTICE, "ONCORE: oncore_get_timestamp, error serial pps");
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1672,21 +1680,22 @@ oncore_get_timestamp(
i = (u_long) pps_i.clear_sequence;
# ifdef HAVE_STRUCT_TIMESPEC
- snprintf(Msg, sizeof(Msg),
- "serial/j (%lu, %lu) %ld.%09ld", i, j,
- (long)tsp->tv_sec, (long)tsp->tv_nsec);
+ oncore_log_f(instance, LOG_DEBUG,
+ "serial/j (%lu, %lu) %ld.%09ld", i,
+ j, (long)tsp->tv_sec,
+ (long)tsp->tv_nsec);
# else
- snprintf(Msg. sizeof(Msg),
- "serial/j (%lu, %lu) %ld.%06ld", i, j,
- (long)tsp->tv_sec, (long)tsp->tv_usec);
+ oncore_log_f(instance, LOG_DEBUG,
+ "serial/j (%lu, %lu) %ld.%06ld", i,
+ j, (long)tsp->tv_sec,
+ (long)tsp->tv_usec);
# endif
- oncore_log(instance, LOG_DEBUG, Msg);
}
#endif
if (pps_i.clear_sequence == j) {
oncore_log(instance, LOG_ERR, "oncore_get_timestamp, error serial pps");
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
instance->ev_serial = pps_i.clear_sequence;
@@ -1745,16 +1754,16 @@ oncore_get_timestamp(
*/
if (time_pps_getcap(instance->pps_h, &current_mode) < 0) {
- msnprintf(Msg, sizeof(Msg), "time_pps_getcap failed: %m");
- oncore_log(instance, LOG_ERR, Msg);
- peer->flags &= ~FLAG_PPS;
+ oncore_log_f(instance, LOG_ERR,
+ "time_pps_getcap failed: %m");
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
if (time_pps_getparams(instance->pps_h, &current_params) < 0) {
- msnprintf(Msg, sizeof(Msg), "time_pps_getparams failed: %m");
- oncore_log(instance, LOG_ERR, Msg);
- peer->flags &= ~FLAG_PPS;
+ oncore_log_f(instance, LOG_ERR,
+ "time_pps_getparams failed: %m");
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1804,10 +1813,10 @@ oncore_get_timestamp(
snprintf(f4, sizeof(f4), "%3d",
(s_char)instance->BEHn[25]);
} else {
- strncpy(f1, "x", sizeof(f1));
- strncpy(f2, "x", sizeof(f2));
- strncpy(f3, "xx", sizeof(f3));
- strncpy(f4, "xxx", sizeof(f4));
+ strlcpy(f1, "x", sizeof(f1));
+ strlcpy(f2, "x", sizeof(f2));
+ strlcpy(f3, "xx", sizeof(f3));
+ strlcpy(f4, "xxx", sizeof(f4));
}
snprintf(Msg, sizeof(Msg), /* MAX length 128, currently at 127 */
"%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d traim %d,%s,%s sigma %s neg-sawtooth %s sat %d%d%d%d%d%d%d%d",
@@ -1837,10 +1846,10 @@ oncore_get_timestamp(
snprintf(f4, sizeof(f4), "%3d",
(s_char)instance->BEHn[14]);
} else {
- strncpy(f1, "x", sizeof(f1));
- strncpy(f2, "x", sizeof(f2));
- strncpy(f3, "xx", sizeof(f3));
- strncpy(f4, "xxx", sizeof(f4));
+ strlcpy(f1, "x", sizeof(f1));
+ strlcpy(f2, "x", sizeof(f2));
+ strlcpy(f3, "xx", sizeof(f3));
+ strlcpy(f4, "xxx", sizeof(f4));
}
snprintf(Msg, sizeof(Msg),
"%u.%09lu %d %d %2d %2d %2d %2ld rstat %02x dop %4.1f nsat %2d,%d traim %d,%s,%s sigma %s neg-sawtooth %s sat %d%d%d%d%d%d%d%d%d%d%d%d",
@@ -1864,7 +1873,7 @@ oncore_get_timestamp(
if (!refclock_process(instance->pp)) {
refclock_report(instance->peer, CEVNT_BADTIME);
- peer->flags &= ~FLAG_PPS;
+ peer->flags &= ~FLAG_PPS; /* problem - clear PPS FLAG */
return;
}
@@ -1916,9 +1925,8 @@ oncore_msg_any(
# else
GETTIMEOFDAY(&tv, 0);
# endif
- snprintf(Msg, sizeof(Msg), "%ld.%06ld",
- (long)tv.tv_sec, (long)tv.tv_usec);
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log(instance, LOG_DEBUG, "%ld.%06ld",
+ (long)tv.tv_sec, (long)tv.tv_usec);
if (!*fmt) {
snprintf(Msg, sizeof(Msg), ">>@@%c%c ", buf[2],
@@ -1926,13 +1934,12 @@ oncore_msg_any(
for(i = 2; i < len && i < 2400 ; i++) {
snprintf(Msg2, sizeof(Msg2), "%02x",
buf[i]);
- strncpy(Msg, Msg2, sizeof(Msg));
-
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
return;
} else {
- strncat(Msg, "##", sizeof(Msg));
+ strlcpy(Msg, "##", sizeof(Msg));
qlim = Msg + sizeof(Msg) - 3;
for (p = fmt, q = Msg + 2; q < qlim && *p; ) {
*q++ = *p++;
@@ -1945,7 +1952,7 @@ oncore_msg_any(
i = 4;
for (p = fmt; *p; p++) {
snprintf(Msg2, "%02x", buf[i++]);
- strncat(Msg, Msg2, sizeof(Msg));
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
}
@@ -1976,17 +1983,17 @@ oncore_msg_Ag(
u_char *buf,
size_t len
)
-{ char Msg[160], *cp;
+{
+ char *cp;
- cp = "set to";
- if (instance->o_state == ONCORE_RUN)
- cp = "is";
+ cp = "set to";
+ if (instance->o_state == ONCORE_RUN)
+ cp = "is";
- instance->Ag = buf[4];
- snprintf(Msg, sizeof(Msg),
- "Satellite mask angle %s %d degrees", cp,
- (int)instance->Ag);
- oncore_log(instance, LOG_INFO, Msg);
+ instance->Ag = buf[4];
+ oncore_log_f(instance, LOG_INFO,
+ "Satellite mask angle %s %d degrees", cp,
+ (int)instance->Ag);
}
@@ -2050,8 +2057,6 @@ oncore_msg_Ay(
size_t len
)
{
- char Msg[120];
-
if (instance->saw_Ay)
return;
@@ -2059,9 +2064,8 @@ oncore_msg_Ay(
instance->offset = buf_w32(&buf[4]);
- snprintf(Msg, sizeof(Msg), "PPS Offset is set to %ld ns",
- instance->offset);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "PPS Offset is set to %ld ns",
+ instance->offset);
}
@@ -2077,8 +2081,6 @@ oncore_msg_Az(
size_t len
)
{
- char Msg[120];
-
if (instance->saw_Az)
return;
@@ -2086,9 +2088,8 @@ oncore_msg_Az(
instance->delay = buf_w32(&buf[4]);
- snprintf(Msg, sizeof(Msg), "Cable delay is set to %ld ns",
- instance->delay);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Cable delay is set to %ld ns",
+ instance->delay);
}
@@ -2103,7 +2104,6 @@ oncore_msg_BaEaHa(
)
{
const char *cp;
- char Msg[160];
int mode;
/* OK, we are close to the RUN state now.
@@ -2134,18 +2134,14 @@ oncore_msg_BaEaHa(
else /* set from test */
instance->chan = instance->chan_ck;
- snprintf(Msg, sizeof(Msg), "Input says chan = %d",
- instance->chan_in);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Model # says chan = %d",
- instance->chan_id);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Testing says chan = %d",
- instance->chan_ck);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Using chan = %d",
- instance->chan);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Input says chan = %d",
+ instance->chan_in);
+ oncore_log_f(instance, LOG_INFO, "Model # says chan = %d",
+ instance->chan_id);
+ oncore_log_f(instance, LOG_INFO, "Testing says chan = %d",
+ instance->chan_ck);
+ oncore_log_f(instance, LOG_INFO, "Using chan = %d",
+ instance->chan);
instance->o_state = ONCORE_HAVE_CHAN;
oncore_log(instance, LOG_NOTICE, "state = ONCORE_HAVE_CHAN");
@@ -2168,6 +2164,15 @@ oncore_msg_BaEaHa(
memcpy(instance->BEHa, buf, (size_t) (len+3)); /* Ba, Ea or Ha */
+ /* check if we saw a response to Gc (M12 or M12+T */
+
+ if (instance->pps_control_msg_seen != -2) {
+ if ((instance->pps_control_msg_seen == -1) && (instance->pps_control != -1)) {
+ oncore_log(instance, LOG_INFO, "PPSCONTROL set, but not implemented (not M12)");
+ }
+ instance->pps_control_msg_seen = -2;
+ }
+
/* check the antenna (did it get unplugged) and almanac (is it ready) for changes. */
oncore_check_almanac(instance);
@@ -2282,10 +2287,9 @@ oncore_msg_BaEaHa(
* We will have to do it ourselves (done above)
*/
- snprintf(Msg, sizeof(Msg),
- "Initiating software 3D site survey (%d samples)",
- POS_HOLD_AVERAGE);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO,
+ "Initiating software 3D site survey (%d samples)",
+ POS_HOLD_AVERAGE);
oncore_log(instance, LOG_NOTICE, "SSstate = ONCORE_SS_SW");
instance->site_survey = ONCORE_SS_SW;
@@ -2442,13 +2446,10 @@ oncore_msg_Bd(
size_t len
)
{
- char Msg[160];
-
- snprintf(Msg, sizeof(Msg),
- "Bd: Almanac %s, week = %d, t = %d, %d SVs: %x",
- ((buf[4]) ? "LOADED" : "(NONE)"), buf[5], buf[6],
- buf[7], w32(&buf[8]));
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Bd: Almanac %s, week = %d, t = %d, %d SVs: %x",
+ ((buf[4]) ? "LOADED" : "(NONE)"), buf[5], buf[6],
+ buf[7], w32(&buf[8]));
}
@@ -2504,7 +2505,7 @@ oncore_msg_Bl(
{
int chan, id, subframe, valid, page, i, j, tow;
int day_now, day_lsf;
- char *cp, Msg[120];
+ char *cp;
enum {
WARN_NOT_YET,
WARN_0,
@@ -2513,7 +2514,7 @@ oncore_msg_Bl(
} warn;
day_now = day_lsf = 0;
- cp = NULL; /* keep gcc happy */
+ cp = NULL; /* keep gcc happy */
chan = buf[4] & 0377;
id = buf[5] & 0377;
@@ -2596,21 +2597,26 @@ oncore_msg_Bl(
i = instance->Bl.dt_lsf-instance->Bl.dt_ls;
if (i) {
j = (i >= 0) ? i : -i; /* abs(i) */
- snprintf(Msg, sizeof(Msg),
- "see Leap_Second (%c%d) in %d days",
- ((i >= 0) ? '+' : '-'), j,
- day_lsf-day_now);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "see Leap_Second (%c%d) in %d days",
+ ((i >= 0) ? '+' : '-'), j,
+ day_lsf-day_now);
}
}
- snprintf(Msg, sizeof(Msg),
- "dt_ls = %d dt_lsf = %d WN = %d DN = %d WN_lsf = %d DNlsf = %d wn_flg = %d lsf_flg = %d Bl_day = %d",
- instance->Bl.dt_ls, instance->Bl.dt_lsf,
- instance->Bl.WN, instance->Bl.DN,
- instance->Bl.WN_lsf, instance->Bl.DN_lsf,
- instance->Bl.wn_flg, instance->Bl.lsf_flg,
- instance->Bl.Bl_day);
- oncore_log(instance, LOG_INFO, Msg);
+
+/*
+ * Reg only wants the following output for "deeper" driver debugging.
+ * See Bug 2142 and Bug 1866
+ */
+#if 0
+ oncore_log_f(instance, LOG_DEBUG,
+ "dt_ls = %d dt_lsf = %d WN = %d DN = %d WN_lsf = %d DNlsf = %d wn_flg = %d lsf_flg = %d Bl_day = %d",
+ instance->Bl.dt_ls, instance->Bl.dt_lsf,
+ instance->Bl.WN, instance->Bl.DN,
+ instance->Bl.WN_lsf, instance->Bl.DN_lsf,
+ instance->Bl.wn_flg, instance->Bl.lsf_flg,
+ instance->Bl.Bl_day);
+#endif
}
@@ -2687,7 +2693,6 @@ oncore_msg_CaFaIa(
size_t len
)
{
- char Msg[120];
int i;
if (instance->o_state == ONCORE_TEST_SENT) {
@@ -2698,14 +2703,13 @@ oncore_msg_CaFaIa(
#if ONCORE_VERBOSE_SELF_TEST
if (debug > 2) {
if (buf[2] == 'I')
- snprintf(Msg, sizeof(Msg),
- ">>@@%ca %x %x %x", buf[2],
- buf[4], buf[5], buf[6]);
+ oncore_log_f(instance, LOG_DEBUG,
+ ">>@@%ca %x %x %x", buf[2],
+ buf[4], buf[5], buf[6]);
else
- snprintf(Msg, sizeof(Msg),
- ">>@@%ca %x %x", buf[2],
- buf[4], buf[5]);
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG,
+ ">>@@%ca %x %x", buf[2],
+ buf[4], buf[5]);
}
#endif
@@ -2716,16 +2720,15 @@ oncore_msg_CaFaIa(
if (buf[2] == 'I') i = i || buf[6];
if (i) {
if (buf[2] == 'I')
- snprintf(Msg, sizeof(Msg),
- "self test failed: result %02x %02x %02x",
- buf[4], buf[5], buf[6]);
+ oncore_log_f(instance, LOG_ERR,
+ "self test failed: result %02x %02x %02x",
+ buf[4], buf[5], buf[6]);
else
- snprintf(Msg, sizeof(Msg),
- "self test failed: result %02x %02x",
- buf[4], buf[5]);
- oncore_log(instance, LOG_ERR, Msg);
+ oncore_log_f(instance, LOG_ERR,
+ "self test failed: result %02x %02x",
+ buf[4], buf[5]);
- oncore_log(instance, LOG_ERR,
+ oncore_log(instance, LOG_ERR,
"ONCORE: self test failed, shutting down driver");
refclock_report(instance->peer, CEVNT_FAULT);
@@ -2781,13 +2784,8 @@ oncore_msg_Cb(
memcpy(instance->shmem + instance->shmem_Cb + i + 3, buf, (size_t) (len + 3));
#ifdef ONCORE_VERBOSE_MSG_CB
- {
- char Msg[160];
-
- snprintf(Msg, sizeof(Msg), "See Cb [%d,%d]", buf[4],
- buf[5]);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ oncore_log_f(instance, LOG_DEBUG, "See Cb [%d,%d]", buf[4],
+ buf[5]);
#endif
}
@@ -2891,7 +2889,7 @@ oncore_msg_Cj_id(
size_t len
)
{
- char *cp, *cp1, *cp2, Model[21], Msg[160];
+ char *cp, *cp1, *cp2, Model[21];
/* Write Receiver ID message to clockstats file */
@@ -2962,10 +2960,9 @@ oncore_msg_Cj_id(
/* use MODEL to set CHAN and TRAIM and possibly zero SHMEM */
- snprintf(Msg, sizeof(Msg),
- "This looks like an Oncore %s with version %d.%d firmware.",
- cp, instance->version, instance->revision);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO,
+ "This looks like an Oncore %s with version %d.%d firmware.",
+ cp, instance->version, instance->revision);
instance->chan_id = 8; /* default */
if (instance->model == ONCORE_BASIC || instance->model == ONCORE_PVT6)
@@ -2983,14 +2980,13 @@ oncore_msg_Cj_id(
else if (instance->model == ONCORE_M12)
instance->traim_id = -1;
- snprintf(Msg, sizeof(Msg), "Channels = %d, TRAIM = %s",
- instance->chan_id,
- ((instance->traim_id < 0)
- ? "UNKNOWN"
- : (instance->traim_id > 0)
- ? "ON"
- : "OFF"));
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Channels = %d, TRAIM = %s",
+ instance->chan_id,
+ ((instance->traim_id < 0)
+ ? "UNKNOWN"
+ : (instance->traim_id > 0)
+ ? "ON"
+ : "OFF"));
}
@@ -3008,7 +3004,6 @@ oncore_msg_Cj_init(
size_t len
)
{
- char Msg[160];
u_char Cmd[20];
int mode;
@@ -3021,10 +3016,9 @@ oncore_msg_Cj_init(
if (instance->chan == 12) {
instance->shmem_bad_Ea = 1;
- snprintf(Msg, sizeof(Msg),
- "*** SHMEM partially enabled for ONCORE M12 s/w v%d.%d ***",
- instance->version, instance->revision);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "*** SHMEM partially enabled for ONCORE M12 s/w v%d.%d ***",
+ instance->version, instance->revision);
}
oncore_sendmsg(instance, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Return to Posn Fix mode */
@@ -3056,11 +3050,9 @@ oncore_msg_Cj_init(
oncore_sendmsg(instance, 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, Cmd, sizeof(oncore_cmd_Ay));
- }
+ 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, Cmd, sizeof(oncore_cmd_Ay));
/* Satellite mask angle */
@@ -3096,6 +3088,8 @@ oncore_msg_Cj_init(
oncore_sendmsg(instance, oncore_cmd_Ea0, sizeof(oncore_cmd_Ea0));
oncore_sendmsg(instance, oncore_cmd_En0, sizeof(oncore_cmd_En0));
oncore_sendmsg(instance, oncore_cmd_Ha, sizeof(oncore_cmd_Ha ));
+ oncore_cmd_Gc[2] = (instance->pps_control < 0) ? 1 : instance->pps_control;
+ oncore_sendmsg(instance, oncore_cmd_Gc, sizeof(oncore_cmd_Gc)); /* PPS off/continuous/Tracking 1+sat/TRAIM */
}
instance->count = 1;
@@ -3114,7 +3108,6 @@ oncore_msg_Ga(
size_t len
)
{
- char Msg[160];
long lat, lon, ht;
double Lat, Lon, Ht;
@@ -3131,11 +3124,9 @@ oncore_msg_Ga(
Lon /= 3600000;
Ht /= 100;
-
- snprintf(Msg, sizeof(Msg),
- "Ga Posn Lat = %.7f, Lon = %.7f, Ht = %.2f", Lat,
- Lon, Ht);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Ga Posn Lat = %.7f, Lon = %.7f, Ht = %.2f", Lat,
+ Lon, Ht);
instance->ss_lat = lat;
instance->ss_long = lon;
@@ -3155,7 +3146,7 @@ oncore_msg_Gb(
size_t len
)
{
- char Msg[160], *gmts;
+ char * gmts;
int mo, d, y, h, m, s, gmth, gmtm;
mo = buf[4];
@@ -3170,10 +3161,27 @@ oncore_msg_Gb(
gmth = buf[12];
gmtm = buf[13];
- snprintf(Msg, sizeof(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);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Date/Time set to: %d%s%d %2d:%02d:%02d GMT (GMT offset is %s%02d:%02d)",
+ d, months[mo-1], y, h, m, s, gmts, gmth, gmtm);
+}
+
+
+
+/* Response to PPS Control message (M12 and M12+T only ) */
+
+static void
+oncore_msg_Gc(
+ struct instance *instance,
+ u_char *buf,
+ size_t len
+ )
+{
+ char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
+
+ instance->pps_control_msg_seen = 1;
+ oncore_log_f(instance, LOG_INFO, "PPS Control set to %s",
+ tbl[buf[4]]);
}
@@ -3188,8 +3196,13 @@ oncore_msg_Gj(
size_t len
)
{
+ static const char * insrem[2] = {
+ "removed",
+ "inserted"
+ };
+
int dt;
- char Msg[160], *cp;
+ char *cp;
instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
@@ -3197,22 +3210,32 @@ oncore_msg_Gj(
dt = buf[5] - buf[4];
- snprintf(Msg, sizeof(Msg),
- "Leap Sec Msg: %d %d %d %d %d %d %d %d %d %d", 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]);
- oncore_log(instance, LOG_INFO, Msg);
-
- if (dt) {
- snprintf(Msg, sizeof(Msg),
- "Leap second (%d) scheduled for %d%s%d at %d:%d:%d",
- dt, buf[9], Month[buf[8] - 1],
- 256 * buf[6] + buf[7], buf[15], buf[16],
- buf[17]);
- oncore_log(instance, LOG_NOTICE, Msg);
- }
+ oncore_log_f(instance, LOG_INFO,
+ "Leap Sec Msg: %d %d %d %d %d %d %d %d %d %d",
+ 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]);
+
+ /* There seems to be eternal confusion about when a leap second
+ * takes place. It's the second *before* the new TAI offset
+ * becomes effective. But since the ONCORE receiver tells us
+ * just that, we would have to do some time/date calculations to
+ * get the actual leap second -- that is, the one that is
+ * deleted or inserted.
+ *
+ * Going through all this for a simple log is probably overkill,
+ * so for fixing bug#1050 the message output is changed to
+ * reflect the fact that it tells the second after the leap
+ * second.
+ */
+ if (dt)
+ oncore_log_f(instance, LOG_NOTICE,
+ "Leap second %s (%d) before %04u-%02u-%02u/%02u:%02u:%02u",
+ insrem[(dt > 0)], dt,
+ 256u * buf[6] + buf[7], buf[8], buf[9],
+ buf[15], buf[16], buf[17]);
/* Only raise warning within a month of the leap second */
@@ -3327,23 +3350,19 @@ oncore_check_almanac(
bits3 = instance->BEHa[141]; /* UTC parameters */
if (!instance->count5_set && (bits3 & 0xC0)) {
- instance->count5 = 2;
+ instance->count5 = 4; /* was 2 [Bug 1766] */
instance->count5_set = 1;
}
#ifdef ONCORE_VERBOSE_CHECK_ALMANAC
- {
- char Msg[160];
-
- snprintf(Msg, sizeof(Msg),
- "DEBUG BITS: (%x %x), (%x %x %x), %x %x %x %x %x",
- instance->BEHa[129],
- instance->BEHa[130], bits1, bits2,
- bits3, instance->mode == MODE_0D,
- instance->mode == MODE_2D,
- instance->mode == MODE_3D,
- instance->rsm.bad_almanac,
- instance->rsm.bad_fix);
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG,
+ "DEBUG BITS: (%x %x), (%x %x %x), %x %x %x %x %x",
+ instance->BEHa[129], instance->BEHa[130],
+ bits1, bits2, bits3,
+ instance->mode == MODE_0D,
+ instance->mode == MODE_2D,
+ instance->mode == MODE_3D,
+ instance->rsm.bad_almanac,
+ instance->rsm.bad_fix);
}
#endif
}
@@ -3427,9 +3446,10 @@ oncore_check_leap_sec(
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))
+ if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12)) {
oncore_sendmsg(instance, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
oncore_sendmsg(instance, oncore_cmd_Bl, sizeof(oncore_cmd_Bl));
+ }
}
}
}
@@ -3464,7 +3484,6 @@ oncore_compute_dH(
)
{
int GPS, MSL;
- char Msg[160];
/* Here calculate dH = GPS - MSL for output message */
/* also set Altitude Hold mode if GT */
@@ -3482,11 +3501,9 @@ oncore_compute_dH(
/* if MSL is not set, the calculation is meaningless */
- if (MSL) { /* not set ! */
- snprintf(Msg, sizeof(Msg), "dH = (GPS - MSL) = %.2fm",
- instance->dH);
- oncore_log(instance, LOG_INFO, Msg);
- }
+ if (MSL) /* not set ! */
+ oncore_log_f(instance, LOG_INFO,
+ "dH = (GPS - MSL) = %.2fm", instance->dH);
}
@@ -3521,11 +3538,8 @@ oncore_load_almanac(
#else /* ONCORE_VERBOSE_LOAD_ALMANAC follows */
for (cp = instance->shmem + 4; (n = 256 * (*(cp-3)) + *(cp-2));
cp += (n+3)) {
- char Msg[160];
-
- snprintf(Msg, sizeof(Msg), "See %c%c%c%c %d", *(cp),
- *(cp+1), *(cp+2), *(cp+3), *(cp+4));
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG, "See %c%c%c%c %d",
+ *(cp), *(cp+1), *(cp+2), *(cp+3), *(cp+4));
if (!strncmp(cp, "@@Cb", 4)) {
oncore_print_Cb(instance, cp);
@@ -3556,14 +3570,10 @@ oncore_load_almanac(
jj = buf_w32(cp + 19);
kk = buf_w32(cp + 23);
#ifdef ONCORE_VERBOSE_LOAD_ALMANAC
- {
- char Msg[160];
- snprintf(Msg, sizeof(Msg),
- "SHMEM posn = %ld (%d, %d, %d)",
- (long)(cp-instance->shmem),
- ii, jj, kk);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ oncore_log_f(instance, LOG_DEBUG,
+ "SHMEM posn = %ld (%d, %d, %d)",
+ (long)(cp-instance->shmem),
+ ii, jj, kk);
#endif
if (ii != 0 || jj != 0 || kk != 0) { /* phk asked for this test */
instance->ss_lat = ii;
@@ -3581,13 +3591,9 @@ oncore_load_almanac(
tm = gmtime((const time_t *) &tv.tv_sec);
#ifdef ONCORE_VERBOSE_LOAD_ALMANAC
- {
- char Msg[160];
- snprintf(Msg, sizeof(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);
- oncore_log(instance, LOG_DEBUG, Msg);
- }
+ oncore_log_f(instance, LOG_DEBUG, "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);
#endif
if (instance->chan == 12) {
memcpy(Cmd, oncore_cmd_Gb, (size_t) sizeof(oncore_cmd_Gb));
@@ -3638,20 +3644,19 @@ oncore_print_Cb(
int ii;
char Msg[160], Msg2[10];
- snprintf(Msg, sizeof(Msg), "DEBUG: See: %c%c%c%c", *(cp),
- *(cp+1), *(cp+2), *(cp+3));
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG, "DEBUG: See: %c%c%c%c", *(cp),
+ *(cp+1), *(cp+2), *(cp+3));
+
snprintf(Msg, sizeof(Msg), "DEBUG: Cb: [%d,%d]", *(cp+4),
*(cp+5));
- for(ii = 0; ii < 33; ii++) {
+ for (ii = 0; ii < 33; ii++) {
snprintf(Msg2, sizeof(Msg2), " %d", *(cp+ii));
- strncat(Msg, Msg2, sizeof(Msg));
+ strlcat(Msg, Msg2, sizeof(Msg));
}
oncore_log(instance, LOG_DEBUG, Msg);
- snprintf(Msg, sizeof(Msg), "Debug: Cb: [%d,%d]", *(cp+4),
- *(cp+5));
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG, "Debug: Cb: [%d,%d]", *(cp+4),
+ *(cp+5));
#endif
}
@@ -3684,7 +3689,7 @@ oncore_print_posn(
struct instance *instance
)
{
- char Msg[120], ew, ns;
+ char ew, ns;
double xd, xm, xs, yd, ym, ys, hm, hft;
int idx, idy, is, imx, imy;
long lat, lon;
@@ -3709,10 +3714,9 @@ oncore_print_posn(
xd = lat/3600000.; /* lat, lon in int msec arc, ht in cm. */
yd = lon/3600000.;
- snprintf(Msg, sizeof(Msg),
- "Lat = %c %11.7fdeg, Long = %c %11.7fdeg, Alt = %5.2fm (%5.2fft) GPS",
- ns, xd, ew, yd, hm, hft);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO,
+ "Lat = %c %11.7fdeg, Long = %c %11.7fdeg, Alt = %5.2fm (%5.2fft) GPS",
+ ns, xd, ew, yd, hm, hft);
idx = xd;
idy = yd;
@@ -3720,9 +3724,9 @@ oncore_print_posn(
imy = lon%3600000;
xm = imx/60000.;
ym = imy/60000.;
- snprintf(Msg, sizeof(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);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO,
+ "Lat = %c %3ddeg %7.4fm, Long = %c %3ddeg %8.5fm, Alt = %7.2fm (%7.2fft) GPS",
+ ns, idx, xm, ew, idy, ym, hm, hft);
imx = xm;
imy = ym;
@@ -3730,10 +3734,9 @@ oncore_print_posn(
xs = is/1000.;
is = lon%60000;
ys = is/1000.;
- snprintf(Msg, sizeof(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);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO,
+ "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);
}
@@ -3755,11 +3758,8 @@ oncore_sendmsg(
fd = instance->ttyfd;
#ifdef ONCORE_VERBOSE_SENDMSG
if (debug > 4) {
- char Msg[120];
-
- snprintf(Msg, sizeof(Msg), "ONCORE: Send @@%c%c %d",
- ptr[0], ptr[1], (int)len);
- oncore_log(instance, LOG_DEBUG, Msg);
+ oncore_log_f(instance, LOG_DEBUG, "ONCORE: Send @@%c%c %d",
+ ptr[0], ptr[1], (int)len);
}
#endif
write(fd, "@@", (size_t) 2);
@@ -3845,25 +3845,19 @@ 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;
- snprintf(Msg, sizeof(Msg), "Input says TRAIM = %d",
- instance->traim_in);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Model # says TRAIM = %d",
- instance->traim_id);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Testing says TRAIM = %d",
- instance->traim_ck);
- oncore_log(instance, LOG_INFO, Msg);
- snprintf(Msg, sizeof(Msg), "Using TRAIM = %d",
- instance->traim);
- oncore_log(instance, LOG_INFO, Msg);
+ oncore_log_f(instance, LOG_INFO, "Input says TRAIM = %d",
+ instance->traim_in);
+ oncore_log_f(instance, LOG_INFO, "Model # says TRAIM = %d",
+ instance->traim_id);
+ oncore_log_f(instance, LOG_INFO, "Testing says TRAIM = %d",
+ instance->traim_ck);
+ oncore_log_f(instance, LOG_INFO, "Using TRAIM = %d",
+ instance->traim);
if (instance->traim_ck == 1 && instance->traim == 0) {
/* if it should be off, and I turned it on during testing,
@@ -3933,7 +3927,6 @@ oncore_ss(
struct instance *instance
)
{
- char Msg[160];
double lat, lon, ht;
@@ -3977,18 +3970,16 @@ oncore_ss(
instance->ss_long /= POS_HOLD_AVERAGE;
instance->ss_ht /= POS_HOLD_AVERAGE;
- snprintf(Msg, sizeof(Msg),
- "Surveyed posn: lat %.3f (mas) long %.3f (mas) ht %.3f (cm)",
- instance->ss_lat, instance->ss_long,
- instance->ss_ht);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Surveyed posn: lat %.3f (mas) long %.3f (mas) ht %.3f (cm)",
+ instance->ss_lat, instance->ss_long,
+ instance->ss_ht);
lat = instance->ss_lat/3600000.;
lon = instance->ss_long/3600000.;
ht = instance->ss_ht/100;
- snprintf(Msg, sizeof(Msg),
- "Surveyed posn: lat %.7f (deg) long %.7f (deg) ht %.2f (m)",
- lat, lon, ht);
- oncore_log(instance, LOG_NOTICE, Msg);
+ oncore_log_f(instance, LOG_NOTICE,
+ "Surveyed posn: lat %.7f (deg) long %.7f (deg) ht %.2f (m)",
+ lat, lon, ht);
oncore_set_posn(instance);
@@ -4049,46 +4040,42 @@ oncore_wait_almanac(
static void
oncore_log (
struct instance *instance,
- int log_level,
+ int log_level,
const char *msg
)
{
- int i;
- char Msg[200];
+ msyslog(log_level, "ONCORE[%d]: %s", instance->unit, msg);
+ mprintf_clock_stats(&instance->peer->srcadr, "ONCORE[%d]: %s",
+ instance->unit, msg);
+}
- snprintf(Msg, sizeof(Msg), "ONCORE[%d]: %s", instance->unit,
- msg);
- syslog(log_level, Msg);
- i = strlen(msg);
+static int
+oncore_log_f(
+ struct instance * instance,
+ int log_level,
+ const char * fmt,
+ ...
+ )
+{
+ va_list ap;
+ int rc;
+ char msg[512];
- if (i > 127) {
- snprintf(Msg, sizeof(Msg),
- "Internal Error: max error msg length exceeded in clockstats file (%d)",
- i);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- record_clock_stats(&(instance->peer->srcadr), "Start of message was");
- strncpy(Msg, msg, 120);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- } else { /* now put ONCORE[n]: ahead of message if it will fit */
- if (i < 110) {
- snprintf(Msg, sizeof(Msg), "ONCORE[%d]: %s",
- instance->unit, msg);
- record_clock_stats(&(instance->peer->srcadr), Msg);
- } else
- record_clock_stats(&(instance->peer->srcadr), msg);
- }
+ va_start(ap, fmt);
+ rc = mvsnprintf(msg, sizeof(msg), fmt, ap);
+ va_end(ap);
+ oncore_log(instance, log_level, msg);
#ifdef ONCORE_VERBOSE_ONCORE_LOG
- instance->max_len = max(i, instance->max_len);
+ instance->max_len = max(strlen(msg), instance->max_len);
instance->max_count++;
- if (instance->max_count % 100 == 0) {
- snprintf(Msg, sizeof(Msg),
- "Max Message Length so far is %d",
- instance->max_len);
- oncore_log(instance, LOG_INFO, Msg);
- }
+ if (instance->max_count % 100 == 0)
+ oncore_log_f(instance, LOG_INFO,
+ "Max Message Length so far is %d",
+ instance->max_len);
#endif
+ return rc;
}
#else
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
index ffe520d01d40..2b396d8a51a1 100644
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -305,9 +305,7 @@ palisade_start (
/*
* Allocate and initialize unit structure
*/
- up = (struct palisade_unit *) emalloc(sizeof(struct palisade_unit));
-
- memset((char *)up, 0, sizeof(struct palisade_unit));
+ up = emalloc_zero(sizeof(*up));
up->type = CLK_TYPE(peer);
switch (up->type) {
@@ -315,20 +313,20 @@ palisade_start (
/* Normal mode, do nothing */
break;
case CLK_PRAECIS:
- msyslog(LOG_NOTICE, "Palisade(%d) Praecis mode enabled\n"
+ msyslog(LOG_NOTICE, "Palisade(%d) Praecis mode enabled"
,unit);
break;
case CLK_THUNDERBOLT:
- msyslog(LOG_NOTICE, "Palisade(%d) Thunderbolt mode enabled\n"
+ msyslog(LOG_NOTICE, "Palisade(%d) Thunderbolt mode enabled"
,unit);
tio.c_cflag = (CS8|CLOCAL|CREAD);
break;
case CLK_ACUTIME:
- msyslog(LOG_NOTICE, "Palisade(%d) Acutime Gold mode enabled\n"
+ msyslog(LOG_NOTICE, "Palisade(%d) Acutime Gold mode enabled"
,unit);
break;
default:
- msyslog(LOG_NOTICE, "Palisade(%d) mode unknown\n",unit);
+ msyslog(LOG_NOTICE, "Palisade(%d) mode unknown",unit);
break;
}
if (tcsetattr(fd, TCSANOW, &tio) == -1) {
@@ -343,7 +341,7 @@ palisade_start (
pp = peer->procptr;
pp->io.clock_recv = palisade_io;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -359,7 +357,7 @@ palisade_start (
/*
* Initialize miscellaneous variables
*/
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
pp->clockdesc = DESCRIPTION;
peer->precision = PRECISION;
@@ -394,7 +392,7 @@ palisade_shutdown (
struct palisade_unit *up;
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -448,7 +446,7 @@ TSIP_decode (
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Check the time packet, decode its contents.
@@ -544,7 +542,7 @@ TSIP_decode (
#ifdef DEBUG
if (debug > 1)
- printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d UTC %02d\n",
+ printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %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
@@ -620,7 +618,7 @@ TSIP_decode (
#ifdef DEBUG
if (debug > 1)
- printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d UTC %02x %s\n",
+ printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %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]);
@@ -764,7 +762,7 @@ TSIP_decode (
#ifdef DEBUG
if (debug > 1)
- printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%06ld %02d/%02d/%04d ",up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, pp->nsec, mb(14), mb(13), pp->year);
+ printf("TSIP_decode: unit %d: %02X #%d %02d:%02d:%02d.%09ld %02d/%02d/%04d ",up->unit, mb(0) & 0xff, event, pp->hour, pp->minute, pp->second, pp->nsec, mb(14), mb(13), pp->year);
#endif
return 1;
break;
@@ -789,9 +787,9 @@ TSIP_decode (
}
else if ((up->rpt_buf[0] == PACKET_41A) & (up->type == CLK_ACUTIME)) {
#ifdef DEBUG
- printf("GPS TOW: %ld\n", getlong((u_char *) &mb(0)));
+ printf("GPS TOW: %ld\n", (long)getlong((u_char *) &mb(0)));
printf("GPS WN: %d\n", getint((u_char *) &mb(4)));
- printf("GPS UTC-GPS Offser: %ld\n", getlong((u_char *) &mb(6)));
+ printf("GPS UTC-GPS Offser: %ld\n", (long)getlong((u_char *) &mb(6)));
#endif
return 0;
}
@@ -835,15 +833,15 @@ TSIP_decode (
up->polled = -1;
#ifdef DEBUG
if (debug > 1) {
- if (mb(1) && 0x01)
+ if (mb(1) & 0x01)
printf ("Signal Processor Error, reset unit.\n");
- if (mb(1) && 0x02)
+ if (mb(1) & 0x02)
printf ("Alignment error, channel or chip 1, reset unit.\n");
- if (mb(1) && 0x03)
+ if (mb(1) & 0x03)
printf ("Alignment error, channel or chip 2, reset unit.\n");
- if (mb(1) && 0x04)
+ if (mb(1) & 0x04)
printf ("Antenna feed line fault (open or short)\n");
- if (mb(1) && 0x05)
+ if (mb(1) & 0x05)
printf ("Excessive reference frequency error, refer to packet 0x2D and packet 0x4D documentation for further information\n");
}
#endif
@@ -900,7 +898,7 @@ palisade_receive (
* Initialize pointers and read the timecode and timestamp.
*/
pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
+ up = pp->unitptr;
if (! TSIP_decode(peer)) return;
@@ -912,7 +910,7 @@ palisade_receive (
#ifdef DEBUG
if (debug)
printf(
- "palisade_receive: unit %d: %4d %03d %02d:%02d:%02d.%06ld\n",
+ "palisade_receive: unit %d: %4d %03d %02d:%02d:%02d.%09ld\n",
up->unit, pp->year, pp->day, pp->hour, pp->minute,
pp->second, pp->nsec);
#endif
@@ -924,7 +922,7 @@ palisade_receive (
*/
snprintf(pp->a_lastcode, sizeof(pp->a_lastcode),
- "%4d %03d %02d:%02d:%02d.%06ld",
+ "%4d %03d %02d:%02d:%02d.%09ld",
pp->year, pp->day,
pp->hour,pp->minute, pp->second, pp->nsec);
pp->lencode = 24;
@@ -965,7 +963,7 @@ palisade_poll (
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
+ up = pp->unitptr;
pp->polls++;
if (up->polled > 0) /* last reply never arrived or error */
@@ -1038,9 +1036,9 @@ palisade_io (
char * c, * d;
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct palisade_unit *)pp->unitptr;
+ up = pp->unitptr;
if(up->type == CLK_PRAECIS) {
if(praecis_msg) {
@@ -1141,14 +1139,12 @@ HW_poll (
int x; /* state before & after RTS set */
struct palisade_unit *up;
- up = (struct palisade_unit *) pp->unitptr;
+ up = 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
+ DPRINTF(1, ("Palisade HW_poll: unit %d: GET %m\n",
+ up->unit));
msyslog(LOG_ERR, "Palisade(%d) HW_poll: ioctl(fd,GET): %m",
up->unit);
return -1;
@@ -1190,85 +1186,66 @@ HW_poll (
return 0;
}
-#if 0 /* unused */
/*
- * this 'casts' a character array into a float
+ * copy/swap a big-endian palisade double into a host double
*/
-float
-getfloat (
- u_char *bp
- )
-{
- 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
+static double
getdbl (
u_char *bp
)
{
- 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;
+#ifdef WORDS_BIGENDIAN
+ double out;
+
+ memcpy(&out, bp, sizeof(out));
+ return out;
#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;
+ union {
+ u_char ch[8];
+ u_int32 u32[2];
+ } ui;
+
+ union {
+ double out;
+ u_int32 u32[2];
+ } uo;
+
+ memcpy(ui.ch, bp, sizeof(ui.ch));
+ /* least-significant 32 bits of double from swapped bp[4] to bp[7] */
+ uo.u32[0] = ntohl(ui.u32[1]);
+ /* most-significant 32 bits from swapped bp[0] to bp[3] */
+ uo.u32[1] = ntohl(ui.u32[0]);
+
+ return uo.out;
+#endif
}
/*
- * cast a 16 bit character array into a short (16 bit) int
+ * copy/swap a big-endian palisade short into a host short
*/
-short
+static short
getint (
u_char *bp
)
{
- return (short) (bp[1] + (bp[0] << 8));
+ u_short us;
+
+ memcpy(&us, bp, sizeof(us));
+ return (short)ntohs(us);
}
/*
- * cast a 32 bit character array into a long (32 bit) int
+ * copy/swap a big-endian palisade 32-bit int into a host 32-bit int
*/
-long
+static int32
getlong(
u_char *bp
)
{
- return (long) (bp[0] << 24) |
- (bp[1] << 16) |
- (bp[2] << 8) |
- bp[3];
+ u_int32 u32;
+
+ memcpy(&u32, bp, sizeof(u32));
+ return (int32)(u_int32)ntohl(u32);
}
#else /* REFCLOCK && CLOCK_PALISADE*/
diff --git a/ntpd/refclock_palisade.h b/ntpd/refclock_palisade.h
index c2d4476a9833..4f1ab266eef3 100644
--- a/ntpd/refclock_palisade.h
+++ b/ntpd/refclock_palisade.h
@@ -50,12 +50,8 @@
*
*/
-#ifndef _REFCLOCK_PALISADE_H
-#define _REFCLOCK_PALISADE_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#ifndef REFCLOCK_PALISADE_H
+#define REFCLOCK_PALISADE_H
#if defined HAVE_SYS_MODEM_H
#include <sys/modem.h>
@@ -183,14 +179,13 @@ static int palisade_start (int, struct peer *);
static void palisade_shutdown (int, struct peer *);
static void palisade_receive (struct peer *);
static void palisade_poll (int, struct peer *);
-static void palisade_io (struct recvbuf *);
+static void palisade_io (struct recvbuf *);
int palisade_configure (int, struct peer *);
int TSIP_decode (struct peer *);
long HW_poll (struct refclockproc *);
-float getfloat (u_char *);
-double getdbl (u_char *);
-short getint (u_char *);
-long getlong (u_char *);
+static double getdbl (u_char *);
+static short getint (u_char *);
+static int32 getlong (u_char *);
#ifdef PALISADE_SENDCMD_RESURRECTED
@@ -202,4 +197,5 @@ static void sendint (struct packettx *buffer, int a);
static int sendetx (struct packettx *buffer, int fd);
static void init_thunderbolt (int fd);
static void init_acutime (int fd);
-#endif /* PALISADE_H */
+
+#endif /* REFCLOCK_PALISADE_H */
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index 75d5fe2a8a3c..052ec3a5ed99 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -48,6 +48,8 @@
# include "config.h"
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_PARSE)
/*
@@ -96,7 +98,7 @@
#include "ntpd.h"
#include "ntp_refclock.h"
-#include "ntp_unixtime.h" /* includes <sys/time.h> */
+#include "timevalops.h" /* includes <sys/time.h> */
#include "ntp_control.h"
#include "ntp_string.h"
@@ -120,6 +122,7 @@
#endif
#ifdef HAVE_TERMIOS
+# include <termios.h>
# define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
# define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
# undef HAVE_SYSV_TTYS
@@ -198,7 +201,7 @@ static char rcsid[] = "refclock_parse.c,v 4.81 2009/05/01 10:15:29 kardel RELEAS
static int parse_start (int, struct peer *);
static void parse_shutdown (int, struct peer *);
static void parse_poll (int, struct peer *);
-static void parse_control (int, struct refclockstat *, struct refclockstat *, struct peer *);
+static void parse_control (int, const struct refclockstat *, struct refclockstat *, struct peer *);
struct refclock refclock_parse = {
parse_start,
@@ -856,6 +859,35 @@ static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE }
#define VARITEXT_SAMPLES 32
#define VARITEXT_KEEP 20
+/*
+ * SEL240x Satellite Sychronized Clock
+ */
+#define SEL240X_POLLRATE 0 /* only true direct polling */
+#define SEL240X_POLLCMD "BUB8"
+#define SEL240X_CMDSIZE 4
+
+static poll_info_t sel240x_pollinfo = { SEL240X_POLLRATE,
+ SEL240X_POLLCMD,
+ SEL240X_CMDSIZE };
+#define SEL240X_FLAGS (PARSE_F_PPSONSECOND)
+#define SEL240X_POLL poll_dpoll
+#define SEL240X_INIT poll_init
+#define SEL240X_END 0
+#define SEL240X_DATA ((void *)(&sel240x_pollinfo))
+#define SEL240X_ROOTDELAY 0.0
+#define SEL240X_BASEDELAY 0.0
+#define SEL240X_ID GPS_ID
+#define SEL240X_DESCRIPTION "SEL240x Satellite Synchronized Clock"
+#define SEL240X_FORMAT "SEL B8"
+#define SEL240X_MAXUNSYNC 60*60*12 /* only trust clock for 12 hours */
+#define SEL240X_SPEED (B9600)
+#define SEL240X_CFLAG (CS8|CREAD|CLOCAL)
+#define SEL240X_IFLAG (IGNBRK|IGNPAR)
+#define SEL240X_OFLAG (0)
+#define SEL240X_LFLAG (0)
+#define SEL240X_SAMPLES 5
+#define SEL240X_KEEP 3
+
static struct parse_clockinfo
{
u_long cl_flags; /* operation flags (PPS interpretation, trust handling) */
@@ -1445,6 +1477,29 @@ static struct parse_clockinfo
GPS16X_SAMPLES,
GPS16X_KEEP
},
+ { /* mode 24 */
+ SEL240X_FLAGS,
+ SEL240X_POLL,
+ SEL240X_INIT,
+ NO_EVENT,
+ SEL240X_END,
+ NO_MESSAGE,
+ SEL240X_DATA,
+ SEL240X_ROOTDELAY,
+ SEL240X_BASEDELAY,
+ SEL240X_ID,
+ SEL240X_DESCRIPTION,
+ SEL240X_FORMAT,
+ GPS_TYPE,
+ SEL240X_MAXUNSYNC,
+ SEL240X_SPEED,
+ SEL240X_CFLAG,
+ SEL240X_IFLAG,
+ SEL240X_OFLAG,
+ SEL240X_LFLAG,
+ SEL240X_SAMPLES,
+ SEL240X_KEEP
+ },
};
static int ncltypes = sizeof(parse_clockinfo) / sizeof(struct parse_clockinfo);
@@ -1567,13 +1622,14 @@ mkreadable(
int hex
)
{
+ static const char ellipsis[] = "...";
char *b = buffer;
char *endb = NULL;
if (blen < 4)
return NULL; /* don't bother with mini buffers */
- endb = buffer + blen - 4;
+ endb = buffer + blen - sizeof(ellipsis);
blen--; /* account for '\0' */
@@ -1602,7 +1658,7 @@ mkreadable(
{
if (*src == '\\')
{
- strcpy(buffer,"\\\\");
+ memcpy(buffer, "\\\\", 2);
buffer += 2;
blen -= 2;
src++;
@@ -1616,7 +1672,7 @@ mkreadable(
}
}
if (srclen && !blen && endb) /* overflow - set last chars to ... */
- strcpy(endb, "...");
+ memcpy(endb, ellipsis, sizeof(ellipsis));
}
*buffer = '\0';
@@ -1720,29 +1776,6 @@ static bind_t io_bindings[] =
#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
*/
@@ -1986,9 +2019,10 @@ stream_receive(
struct recvbuf *rbufp
)
{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
+ struct parseunit * parse;
parsetime_t parsetime;
+ parse = (struct parseunit *)rbufp->recv_peer->procptr->unitptr;
if (!parse->peer)
return;
@@ -2027,15 +2061,17 @@ stream_receive(
* errors.
*/
- cvt_ts(parsetime.parse_stime, "parse_stime");
+ parsetime.parse_stime.fp = tval_stamp_to_lfp(parsetime.parse_stime.tv);
if (PARSE_TIMECODE(parsetime.parse_state))
{
- cvt_ts(parsetime.parse_time, "parse_time");
+ parsetime.parse_time.fp = tval_stamp_to_lfp(parsetime.parse_time.tv);
}
if (PARSE_PPS(parsetime.parse_state))
- cvt_ts(parsetime.parse_ptime, "parse_ptime");
+ {
+ parsetime.parse_ptime.fp = tval_stamp_to_lfp(parsetime.parse_ptime.tv);
+ }
parse_process(parse, &parsetime);
}
@@ -2132,11 +2168,13 @@ local_input(
struct recvbuf *rbufp
)
{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
+ struct parseunit * parse;
+
int count;
unsigned char *s;
timestamp_t ts;
+ parse = (struct parseunit *)rbufp->recv_peer->procptr->unitptr;
if (!parse->peer)
return 0;
@@ -2311,12 +2349,19 @@ local_input(
sizeof(parsetime_t));
buf->recv_length = sizeof(parsetime_t);
buf->recv_time = rbufp->recv_time;
+#ifndef HAVE_IO_COMPLETION_PORT
buf->srcadr = rbufp->srcadr;
+#endif
buf->dstadr = rbufp->dstadr;
buf->receiver = rbufp->receiver;
buf->fd = rbufp->fd;
buf->X_from_where = rbufp->X_from_where;
+ parse->generic->io.recvcount++;
+ packets_received++;
add_full_recv_buffer(buf);
+#ifdef HAVE_IO_COMPLETION_PORT
+ SetEvent(WaitableIoEventHandle);
+#endif
}
parse_iodone(&parse->parseio);
}
@@ -2342,9 +2387,10 @@ local_receive(
struct recvbuf *rbufp
)
{
- struct parseunit *parse = (struct parseunit *)((void *)rbufp->recv_srcclock);
+ struct parseunit * parse;
parsetime_t parsetime;
+ parse = (struct parseunit *)rbufp->recv_peer->procptr->unitptr;
if (!parse->peer)
return;
@@ -2462,41 +2508,42 @@ parsestate(
if (flagstrings[i].bit & lstate)
{
if (s != t)
- strncpy(t, "; ", BUFFER_SIZES(buffer, t, size));
- strncat(t, flagstrings[i].name, BUFFER_SIZES(buffer, t, size));
- t += strlen(t);
+ strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size));
+ if (strlcat(t, flagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
+ BUFFER_SIZES(buffer, t, size))
+ t += strlen(t);
}
i++;
}
if (lstate & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
{
- if (s != t)
- strncpy(t, "; ", BUFFER_SIZES(buffer, t, size));
-
- t += strlen(t);
-
- strncpy(t, "(", BUFFER_SIZES(buffer, t, size));
+ if (s != t &&
+ strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
+ BUFFER_SIZES(buffer, t, size))
+ t += strlen(t);
- s = t = t + strlen(t);
+ if (strlcpy(t, "(", BUFFER_SIZES(buffer, t, size)) <
+ BUFFER_SIZES(buffer, t, size))
+ s = t = t + strlen(t);
i = 0;
while (sflagstrings[i].bit)
{
if (sflagstrings[i].bit & lstate)
{
- if (t != s)
- {
- strncpy(t, "; ", BUFFER_SIZES(buffer, t, size));
+ if (t != s &&
+ strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
+ BUFFER_SIZES(buffer, t, size))
t += 2;
- }
- strncpy(t, sflagstrings[i].name, BUFFER_SIZES(buffer, t, size));
- t += strlen(t);
+ if (strlcpy(t, sflagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
+ BUFFER_SIZES(buffer, t, size))
+ t += strlen(t);
}
i++;
}
- strncpy(t, ")", BUFFER_SIZES(buffer, t, size));
+ strlcpy(t, ")", BUFFER_SIZES(buffer, t, size));
}
return buffer;
}
@@ -2536,8 +2583,8 @@ parsestatus(
if (flagstrings[i].bit & lstate)
{
if (buffer[0])
- strncat(buffer, "; ", size);
- strncat(buffer, flagstrings[i].name, size);
+ strlcat(buffer, "; ", size);
+ strlcat(buffer, flagstrings[i].name, size);
}
i++;
}
@@ -2695,10 +2742,10 @@ parse_shutdown(
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)0;
+ struct parseunit *parse = NULL;
if (peer && peer->procptr)
- parse = (struct parseunit *)peer->procptr->unitptr;
+ parse = peer->procptr->unitptr;
if (!parse)
{
@@ -2706,7 +2753,7 @@ parse_shutdown(
return;
}
- if (!parse->peer)
+ if (!parse->peer)
{
msyslog(LOG_INFO, "PARSE receiver #%d: INTERNAL ERROR - unit already inactive - shutdown ignored", unit);
return;
@@ -2719,7 +2766,7 @@ parse_shutdown(
}
#endif
if (parse->generic->io.fd != parse->ppsfd && parse->ppsfd != -1)
- (void)close(parse->ppsfd); /* close separate PPS source */
+ (void)closeserial(parse->ppsfd); /* close separate PPS source */
/*
* print statistics a last time and
@@ -2790,7 +2837,7 @@ parse_hardpps(
* tell the rest, that we have a kernel PPS source, iff we ever enable HARDPPS
*/
if (mode == PARSE_HARDPPS_ENABLE)
- pps_enable = 1;
+ hardpps_enable = 1;
}
}
@@ -2930,12 +2977,11 @@ parse_start(
#ifndef O_NOCTTY
#define O_NOCTTY 0
#endif
-
- fd232 = open(parsedev, O_RDWR | O_NOCTTY
-#ifdef O_NONBLOCK
- | O_NONBLOCK
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 0
#endif
- , 0777);
+
+ fd232 = tty_open(parsedev, O_RDWR | O_NOCTTY | O_NONBLOCK, 0777);
if (fd232 == -1)
{
@@ -2943,9 +2989,7 @@ parse_start(
return 0;
}
- parse = (struct parseunit *)emalloc(sizeof(struct parseunit));
-
- memset((char *)parse, 0, sizeof(struct parseunit));
+ parse = emalloc_zero(sizeof(*parse));
parse->generic = peer->procptr; /* link up */
parse->generic->unitptr = (caddr_t)parse; /* link down */
@@ -3059,11 +3103,7 @@ parse_start(
* if the PARSEPPSDEVICE can be opened that will be used
* for PPS else PARSEDEVICE will be used
*/
- parse->ppsfd = open(parseppsdev, O_RDWR | O_NOCTTY
-#ifdef O_NONBLOCK
- | O_NONBLOCK
-#endif
- , 0777);
+ parse->ppsfd = tty_open(parseppsdev, O_RDWR | O_NOCTTY | O_NONBLOCK, 0777);
if (parse->ppsfd == -1)
{
@@ -3145,7 +3185,7 @@ parse_start(
/*
* pick correct input machine
*/
- parse->generic->io.srcclock = (caddr_t)parse;
+ parse->generic->io.srcclock = peer;
parse->generic->io.datalen = 0;
parse->binding = init_iobinding(parse);
@@ -3155,7 +3195,7 @@ parse_start(
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 */
- }
+ }
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 */
@@ -3193,9 +3233,12 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
- strncpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format, sizeof(tmp_ctl.parseformat.parse_buffer));
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
+
+ tmp_ctl.parseformat.parse_count = strlcpy(tmp_ctl.parseformat.parse_buffer,
+ parse->parse_type->cl_format,
+ sizeof(tmp_ctl.parseformat.parse_buffer));
+ if (tmp_ctl.parseformat.parse_count >= sizeof(tmp_ctl.parseformat.parse_buffer))
+ tmp_ctl.parseformat.parse_count = sizeof(tmp_ctl.parseformat.parse_buffer) - 1;
if (!PARSE_SETFMT(parse, &tmp_ctl))
{
@@ -3288,7 +3331,7 @@ parse_start(
static void
parse_ctl(
struct parseunit *parse,
- struct refclockstat *in
+ const struct refclockstat *in
)
{
if (in)
@@ -3349,7 +3392,7 @@ parse_poll(
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
+ struct parseunit *parse = peer->procptr->unitptr;
if (peer != parse->peer)
{
@@ -3401,12 +3444,12 @@ parse_poll(
static void
parse_control(
int unit,
- struct refclockstat *in,
+ const struct refclockstat *in,
struct refclockstat *out,
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
+ struct parseunit *parse = peer->procptr->unitptr;
parsectl_t tmpctl;
static char outstatus[400]; /* status output buffer */
@@ -3483,7 +3526,7 @@ parse_control(
if (parse->timedata.parse_time.fp.l_ui == 0)
{
- strncpy(tt, "<UNDEFINED>\"", BUFFER_SIZES(start, tt, 128));
+ strlcpy(tt, "<UNDEFINED>\"", BUFFER_SIZES(start, tt, 128));
}
else
{
@@ -3509,7 +3552,7 @@ parse_control(
(void) parsestate(tmpctl.parsegettc.parse_state, tt, BUFFER_SIZES(start, tt, 512));
- strncat(tt, "\"", BUFFER_SIZES(start, tt, 512));
+ strlcat(tt, "\"", BUFFER_SIZES(start, tt, 512));
if (tmpctl.parsegettc.parse_count)
mkascii(outstatus+strlen(outstatus), (int)(sizeof(outstatus)- strlen(outstatus) - 1),
@@ -3529,8 +3572,8 @@ parse_control(
tt = add_var(&out->kv_list, 80, RO|DEF);
snprintf(tt, 80, "refclock_format=\"");
- strncat(tt, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
- strncat(tt,"\"", 80);
+ strlcat(tt, tmpctl.parseformat.parse_buffer, 80);
+ strlcat(tt,"\"", 80);
}
/*
@@ -3538,7 +3581,7 @@ parse_control(
*/
start = tt = add_var(&out->kv_list, LEN_STATES, RO|DEF);
- strncpy(tt, "refclock_states=\"", LEN_STATES);
+ strlcpy(tt, "refclock_states=\"", LEN_STATES);
tt += strlen(tt);
for (i = 0; i <= CEVNT_MAX; i++)
@@ -3573,7 +3616,7 @@ parse_control(
(int)(percent / 100), (int)(percent % 100));
if ((count = strlen(item)) < (LEN_STATES - 40 - (tt - start)))
{
- strncpy(tt, item, BUFFER_SIZES(start, tt, LEN_STATES));
+ strlcpy(tt, item, BUFFER_SIZES(start, tt, LEN_STATES));
tt += count;
}
sum += s_time;
@@ -3628,7 +3671,7 @@ parse_event(
if (parse->parse_type->cl_event)
parse->parse_type->cl_event(parse, event);
-
+
if (event == CEVNT_NOMINAL)
{
NLOG(NLOG_CLOCKSTATUS)
@@ -3652,6 +3695,9 @@ parse_process(
l_fp off, rectime, reftime;
double fudge;
+ /* silence warning: 'off.Ul_i.Xl_i' may be used uninitialized in this function */
+ ZERO(off);
+
/*
* check for changes in conversion status
* (only one for each new status !)
@@ -3923,8 +3969,8 @@ parse_process(
#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))
+ if (M_ISGEQ(off.l_i, off.l_uf, -1, 0x80000000) &&
+ M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_uf))
{
fudge = ppsphaseadjust; /* pick PPS fudge factor */
@@ -3935,7 +3981,7 @@ parse_process(
if (parse->parse_type->cl_flags & PARSE_F_PPSONSECOND)
{
reftime = off = offset;
- if (reftime.l_uf & (unsigned)0x80000000)
+ if (reftime.l_uf & 0x80000000)
reftime.l_ui++;
reftime.l_uf = 0;
@@ -3944,7 +3990,7 @@ parse_process(
* 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 */
+ off.l_i = (off.l_uf & 0x8000000) ? -1 : 0; /* sign extend */
}
else
{
@@ -3969,14 +4015,14 @@ parse_process(
*/
off = offset;
reftime = offset;
- if (reftime.l_uf & (unsigned)0x80000000)
+ if (reftime.l_uf & 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 */
+ off.l_i = (off.l_uf & 0x80000000) ? -1 : 0; /* sign extend */
}
}
else
@@ -4266,7 +4312,7 @@ gps16x_message(
*p++ = ' ';
}
- strncat(p, (const char *)s->string, sizeof(buffer));
+ strlcat(p, (const char *)s->string, sizeof(buffer));
}
s++;
}
@@ -4276,7 +4322,7 @@ gps16x_message(
}
else
{
- strncat(buffer, "<OK>\"", sizeof(buffer));
+ strlcat(buffer, "<OK>\"", sizeof(buffer));
}
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
@@ -4336,12 +4382,12 @@ gps16x_message(
switch (antinfo.status)
{
case ANT_INVALID:
- strncat(p, "<OK>", BUFFER_SIZE(buffer, p));
+ strlcat(p, "<OK>", BUFFER_SIZE(buffer, p));
p += strlen(p);
break;
case ANT_DISCONN:
- strncat(p, "DISCONNECTED since ", BUFFER_SIZE(buffer, p));
+ strlcat(p, "DISCONNECTED since ", BUFFER_SIZE(buffer, p));
NLOG(NLOG_CLOCKSTATUS)
ERR(ERR_BADSTATUS)
msyslog(LOG_ERR,"PARSE receiver #%d: ANTENNA FAILURE: %s",
@@ -4353,7 +4399,7 @@ gps16x_message(
break;
case ANT_RECONN:
- strncat(p, "RECONNECTED on ", BUFFER_SIZE(buffer, p));
+ strlcat(p, "RECONNECTED on ", BUFFER_SIZE(buffer, p));
p += strlen(p);
mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p));
snprintf(p, BUFFER_SIZE(buffer, p), ", reconnect clockoffset %c%ld.%07ld s, disconnect time ",
@@ -4371,7 +4417,7 @@ gps16x_message(
break;
}
- strncat(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcat(p, "\"", BUFFER_SIZE(buffer, p));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
@@ -4392,24 +4438,24 @@ gps16x_message(
int i;
p = buffer;
- strncpy(buffer, "gps_tot_51=\"", BUFFER_SIZE(buffer, p));
+ strlcpy(buffer, "gps_tot_51=\"", BUFFER_SIZE(buffer, p));
p += strlen(p);
mbg_tgps_str(&p, &cfgh.tot_51, BUFFER_SIZE(buffer, p));
- strncpy(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
p = buffer;
- strncpy(buffer, "gps_tot_63=\"", BUFFER_SIZE(buffer, p));
+ strlcpy(buffer, "gps_tot_63=\"", BUFFER_SIZE(buffer, p));
p += strlen(p);
mbg_tgps_str(&p, &cfgh.tot_63, BUFFER_SIZE(buffer, p));
- strncpy(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
p = buffer;
- strncpy(buffer, "gps_t0a=\"", BUFFER_SIZE(buffer, p));
+ strlcpy(buffer, "gps_t0a=\"", BUFFER_SIZE(buffer, p));
p += strlen(p);
mbg_tgps_str(&p, &cfgh.t0a, BUFFER_SIZE(buffer, p));
- strncpy(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
for (i = MIN_SVNO; i < MAX_SVNO; i++)
@@ -4420,16 +4466,16 @@ gps16x_message(
switch (cfgh.cfg[i] & 0x7)
{
case 0:
- strncpy(p, "BLOCK I", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "BLOCK I", BUFFER_SIZE(buffer, p));
break;
case 1:
- strncpy(p, "BLOCK II", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "BLOCK II", BUFFER_SIZE(buffer, p));
break;
default:
- strncpy(p, "bad CFG", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "bad CFG", BUFFER_SIZE(buffer, p));
break;
}
- strncat(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcat(p, "\"", BUFFER_SIZE(buffer, p));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
p = buffer;
@@ -4438,28 +4484,28 @@ gps16x_message(
switch ((cfgh.health[i] >> 5) & 0x7 )
{
case 0:
- strncpy(p, "OK;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "OK;", BUFFER_SIZE(buffer, p));
break;
case 1:
- strncpy(p, "PARITY;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "PARITY;", BUFFER_SIZE(buffer, p));
break;
case 2:
- strncpy(p, "TLM/HOW;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "TLM/HOW;", BUFFER_SIZE(buffer, p));
break;
case 3:
- strncpy(p, "Z-COUNT;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "Z-COUNT;", BUFFER_SIZE(buffer, p));
break;
case 4:
- strncpy(p, "SUBFRAME 1,2,3;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "SUBFRAME 1,2,3;", BUFFER_SIZE(buffer, p));
break;
case 5:
- strncpy(p, "SUBFRAME 4,5;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "SUBFRAME 4,5;", BUFFER_SIZE(buffer, p));
break;
case 6:
- strncpy(p, "UPLOAD BAD;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "UPLOAD BAD;", BUFFER_SIZE(buffer, p));
break;
case 7:
- strncpy(p, "DATA BAD;", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "DATA BAD;", BUFFER_SIZE(buffer, p));
break;
}
@@ -4468,25 +4514,25 @@ gps16x_message(
switch (cfgh.health[i] & 0x1F)
{
case 0:
- strncpy(p, "SIGNAL OK", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "SIGNAL OK", BUFFER_SIZE(buffer, p));
break;
case 0x1C:
- strncpy(p, "SV TEMP OUT", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "SV TEMP OUT", BUFFER_SIZE(buffer, p));
break;
case 0x1D:
- strncpy(p, "SV WILL BE TEMP OUT", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "SV WILL BE TEMP OUT", BUFFER_SIZE(buffer, p));
break;
case 0x1E:
break;
case 0x1F:
- strncpy(p, "MULTIPLE ERRS", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "MULTIPLE ERRS", BUFFER_SIZE(buffer, p));
break;
default:
- strncpy(p, "TRANSMISSION PROBLEMS", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "TRANSMISSION PROBLEMS", BUFFER_SIZE(buffer, p));
break;
}
- strncat(p, "\"", sizeof(buffer));
+ strlcat(p, "\"", sizeof(buffer));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
}
}
@@ -4511,14 +4557,14 @@ gps16x_message(
if (utc.valid)
{
- strncpy(p, "gps_utc_correction=\"", sizeof(buffer));
+ strlcpy(p, "gps_utc_correction=\"", sizeof(buffer));
p += strlen(p);
mk_utcinfo(p, utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf, BUFFER_SIZE(buffer, p));
- strncat(p, "\"", BUFFER_SIZE(buffer, p));
+ strlcat(p, "\"", BUFFER_SIZE(buffer, p));
}
else
{
- strncpy(p, "gps_utc_correction=\"<NO UTC DATA>\"", BUFFER_SIZE(buffer, p));
+ strlcpy(p, "gps_utc_correction=\"<NO UTC DATA>\"", BUFFER_SIZE(buffer, p));
}
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
@@ -4542,7 +4588,7 @@ gps16x_message(
snprintf(buffer, sizeof(buffer), "gps_message=\"%s\"", buffer1);
}
else
- strncpy(buffer, "gps_message=<NONE>", sizeof(buffer));
+ strlcpy(buffer, "gps_message=<NONE>", sizeof(buffer));
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
@@ -4574,7 +4620,7 @@ gps16x_poll(
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
+ struct parseunit *parse = peer->procptr->unitptr;
static GPS_MSG_HDR sequence[] =
{
@@ -4588,7 +4634,7 @@ gps16x_poll(
{ GPS_POS_LLA, 0, 0, 0 },
{ (unsigned short)~0, 0, 0, 0 }
};
-
+
int rtc;
unsigned char cmd_buffer[64];
unsigned char *outp = cmd_buffer;
@@ -4596,7 +4642,7 @@ gps16x_poll(
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
- parse->peer->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
+ parse->peer->procptr->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
}
if (sequence[parse->localstate].gps_cmd == (unsigned short)~0)
@@ -4654,7 +4700,7 @@ gps16x_poll_init(
{
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
- parse->peer->action = gps16x_poll;
+ parse->peer->procptr->action = gps16x_poll;
gps16x_poll(parse->peer);
}
@@ -4716,14 +4762,14 @@ poll_poll(
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
+ struct parseunit *parse = 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;
+ parse->peer->procptr->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
}
}
@@ -4737,7 +4783,7 @@ poll_init(
{
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
- parse->peer->action = poll_poll;
+ parse->peer->procptr->action = poll_poll;
poll_poll(parse->peer);
}
@@ -5111,7 +5157,7 @@ trimble_check(
struct peer *peer
)
{
- struct parseunit *parse = (struct parseunit *)peer->procptr->unitptr;
+ struct parseunit *parse = peer->procptr->unitptr;
trimble_t *t = parse->localdata;
u_char buffer[256];
struct txbuf buf;
@@ -5165,10 +5211,10 @@ trimbletsip_end(
if (t)
{
free(t);
- parse->localdata = (void *)0;
+ parse->localdata = NULL;
}
- parse->peer->nextaction = 0;
- parse->peer->action = (void (*) (struct peer *))0;
+ parse->peer->procptr->nextaction = 0;
+ parse->peer->procptr->action = NULL;
}
/*--------------------------------------------------
@@ -5202,8 +5248,8 @@ trimbletsip_init(
}
}
- parse->peer->action = trimble_check;
- parse->peer->nextaction = current_time;
+ parse->peer->procptr->action = trimble_check;
+ parse->peer->procptr->nextaction = current_time;
/*
* configure terminal line for ICANON mode with VEOL characters
@@ -5410,7 +5456,7 @@ trimbletsip_message(
break;
case CMD_RBEST4:
- strncpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
t += strlen(t);
switch (mb(0) & 0xF)
{
@@ -5419,22 +5465,22 @@ trimbletsip_message(
break;
case 1:
- strncpy(t, "0D", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "0D", BUFFER_SIZE(pbuffer, t));
break;
case 3:
- strncpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
break;
case 4:
- strncpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
break;
}
t += strlen(t);
if (mb(0) & 0x10)
- strncpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
else
- strncpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
t += strlen(t);
snprintf(t, BUFFER_SIZE(pbuffer, t), "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
@@ -5473,28 +5519,28 @@ trimbletsip_message(
snprintf(t, BUFFER_SIZE(pbuffer, t), "illegal value 0x%02x", mb(0) & 0xFF);
break;
case 0x00:
- strncpy(t, "doing position fixes", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "doing position fixes", BUFFER_SIZE(pbuffer, t));
break;
case 0x01:
- strncpy(t, "no GPS time yet", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "no GPS time yet", BUFFER_SIZE(pbuffer, t));
break;
case 0x03:
- strncpy(t, "PDOP too high", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "PDOP too high", BUFFER_SIZE(pbuffer, t));
break;
case 0x08:
- strncpy(t, "no usable satellites", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "no usable satellites", BUFFER_SIZE(pbuffer, t));
break;
case 0x09:
- strncpy(t, "only ONE usable satellite", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "only ONE usable satellite", BUFFER_SIZE(pbuffer, t));
break;
case 0x0A:
- strncpy(t, "only TWO usable satellites", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "only TWO usable satellites", BUFFER_SIZE(pbuffer, t));
break;
case 0x0B:
- strncpy(t, "only THREE usable satellites", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "only THREE usable satellites", BUFFER_SIZE(pbuffer, t));
break;
case 0x0C:
- strncpy(t, "the chosen satellite is unusable", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "the chosen satellite is unusable", BUFFER_SIZE(pbuffer, t));
break;
}
@@ -5563,13 +5609,13 @@ trimbletsip_message(
short dtlsf = getshort((unsigned char *)&mb(24));
if ((int)t0t != 0)
- {
- mk_utcinfo(t, wnt, wnlsf, dn, dtls, dtlsf, BUFFER_SIZE(pbuffer, t));
- }
+ {
+ mk_utcinfo(t, wnt, wnlsf, dn, dtls, dtlsf, BUFFER_SIZE(pbuffer, t));
+ }
else
- {
- strncpy(t, "<NO UTC DATA>", BUFFER_SIZE(pbuffer, t));
- }
+ {
+ strlcpy(t, "<NO UTC DATA>", BUFFER_SIZE(pbuffer, t));
+ }
}
break;
@@ -5598,11 +5644,11 @@ trimbletsip_message(
double f = getflt((unsigned char *)&mb(12));
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
- x, y, z,
- f);
+ snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
+ x, y, z,
+ f);
else
- return;
+ return;
}
break;
@@ -5613,12 +5659,12 @@ trimbletsip_message(
double f = getflt((unsigned char *)&mb(12));
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, 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)));
+ snprintf(t, BUFFER_SIZE(pbuffer, 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;
+ return;
}
break;
@@ -5628,7 +5674,7 @@ trimbletsip_message(
double y = getdbl((unsigned char *)&mb(8));
double z = getdbl((unsigned char *)&mb(16));
snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm",
- x, y, z);
+ x, y, z);
}
break;
@@ -5647,7 +5693,7 @@ trimbletsip_message(
{
int i, sats;
- strncpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
t += strlen(t);
switch (mb(0) & 0x7)
{
@@ -5656,18 +5702,18 @@ trimbletsip_message(
break;
case 3:
- strncpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
break;
case 4:
- strncpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
break;
}
t += strlen(t);
if (mb(0) & 0x8)
- strncpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
else
- strncpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
t += strlen(t);
sats = (mb(0)>>4) & 0xF;
@@ -5689,7 +5735,7 @@ trimbletsip_message(
}
if (tr)
- { /* mark for tracking status query */
+ { /* mark for tracking status query */
tr->qtracking = 1;
}
}
@@ -5702,7 +5748,7 @@ trimbletsip_message(
if (getflt((unsigned char *)&mb(4)) < 0.0)
{
- strncpy(t, "<NO MEASUREMENTS>", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "<NO MEASUREMENTS>", BUFFER_SIZE(pbuffer, t));
var_flag &= ~DEF;
}
else
@@ -5718,31 +5764,31 @@ trimbletsip_message(
if (mb(20))
{
var_flag &= ~DEF;
- strncpy(t, ", OLD", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, ", OLD", BUFFER_SIZE(pbuffer, t));
}
t += strlen(t);
if (mb(22))
{
if (mb(22) == 1)
- strncpy(t, ", BAD PARITY", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, ", BAD PARITY", BUFFER_SIZE(pbuffer, t));
else
if (mb(22) == 2)
- strncpy(t, ", BAD EPH HEALTH", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, ", BAD EPH HEALTH", BUFFER_SIZE(pbuffer, t));
}
t += strlen(t);
if (mb(23))
- strncpy(t, ", collecting data", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, ", collecting data", BUFFER_SIZE(pbuffer, t));
}
}
break;
default:
- strncpy(t, "<UNDECODED>", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t, "<UNDECODED>", BUFFER_SIZE(pbuffer, t));
break;
}
t += strlen(t);
- strncpy(t,"\"", BUFFER_SIZE(pbuffer, t));
+ strlcpy(t,"\"", BUFFER_SIZE(pbuffer, t));
set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
}
}
@@ -5847,7 +5893,7 @@ rawdcf_init_2(
#endif /* DTR initialisation type */
#else /* defined(REFCLOCK) && defined(PARSE) */
-int refclock_parse_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* defined(REFCLOCK) && defined(PARSE) */
/*
@@ -5971,7 +6017,7 @@ int refclock_parse_bs;
* implement fast refclock startup
*
* Revision 4.50 2005/04/16 20:51:35 kardel
- * set pps_enable = 1 when binding a kernel PPS source
+ * set hardpps_enable = 1 when binding a kernel PPS source
*
* Revision 4.49 2005/04/16 17:29:26 kardel
* add non polling clock type 18 for just listenning to Meinberg clocks
diff --git a/ntpd/refclock_pcf.c b/ntpd/refclock_pcf.c
index fcc12be0706a..4379832b4a7f 100644
--- a/ntpd/refclock_pcf.c
+++ b/ntpd/refclock_pcf.c
@@ -88,7 +88,7 @@ pcf_start(
pp = peer->procptr;
pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
@@ -118,7 +118,8 @@ pcf_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- (void)close(pp->io.fd);
+ if (NULL != pp)
+ close(pp->io.fd);
}
@@ -144,7 +145,7 @@ pcf_poll(
return;
}
- memset(&tm, 0, sizeof(tm));
+ ZERO(tm);
tm.tm_mday = buf[11] * 10 + buf[10];
tm.tm_mon = buf[13] * 10 + buf[12] - 1;
diff --git a/ntpd/refclock_pst.c b/ntpd/refclock_pst.c
index bd208c72590f..39be05138dde 100644
--- a/ntpd/refclock_pst.c
+++ b/ntpd/refclock_pst.c
@@ -128,17 +128,17 @@ pst_start(
* Open serial port. Use CLK line discipline, if available.
*/
snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd <= 0)
return (0);
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = pst_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -147,7 +147,7 @@ pst_start(
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -155,7 +155,6 @@ pst_start(
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, WWVREFID, 4);
- peer->burst = MAXSTAGE;
return (1);
}
@@ -173,7 +172,7 @@ pst_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct pstunit *)pp->unitptr;
+ up = pp->unitptr;
if (-1 != pp->io.fd)
io_closeclock(&pp->io);
if (NULL != up)
@@ -202,9 +201,9 @@ pst_receive(
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct pstunit *)pp->unitptr;
+ up = pp->unitptr;
up->lastptr += refclock_gtlin(rbufp, up->lastptr, pp->a_lastcode
+ BMAX - 2 - up->lastptr, &trtmp);
*up->lastptr++ = ' ';
@@ -295,13 +294,11 @@ pst_poll(
* becomes unreachable, declare a timeout and keep going.
*/
pp = peer->procptr;
- up = (struct pstunit *)pp->unitptr;
+ up = 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;
@@ -313,7 +310,6 @@ pst_poll(
printf("pst: timecode %d %s\n", pp->lencode,
pp->a_lastcode);
#endif
- peer->burst = MAXSTAGE;
pp->polls++;
}
diff --git a/ntpd/refclock_ripencc.c b/ntpd/refclock_ripencc.c
index 3ce3a73750b3..602ca9d6aa14 100644
--- a/ntpd/refclock_ripencc.c
+++ b/ntpd/refclock_ripencc.c
@@ -477,7 +477,8 @@ ripencc_start(int unit, struct peer *peer)
* Open serial port
*/
(void)snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_RAW))) {
+ fd = refclock_open(device, SPEED232, LDISC_RAW);
+ if (fd <= 0) {
pp->io.fd = -1;
return (0);
}
@@ -503,23 +504,18 @@ ripencc_start(int unit, struct peer *peer)
/*
* 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));
+ up = emalloc_zero(sizeof(*up));
pp->io.clock_recv = ripencc_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
if (!io_addclock(&pp->io)) {
pp->io.fd = -1;
- (void) close(fd);
+ close(fd);
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -653,7 +649,7 @@ ripencc_ppsapi(
int capability;
pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
+ up = pp->unitptr;
if (time_pps_getcap(up->handle, &capability) < 0) {
msyslog(LOG_ERR,
"refclock_ripencc: time_pps_getcap failed: %m");
@@ -684,7 +680,7 @@ ripencc_ppsapi(
"refclock_ripencc: time_pps_kcbind failed: %m");
return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
peer->precision = PPS_PRECISION;
@@ -719,7 +715,7 @@ ripencc_get_pps_ts(
l_fp tstmp;
#ifdef DEBUG_PPS
- msyslog(LOG_INFO,"ripencc_get_pps_ts\n");
+ msyslog(LOG_INFO,"ripencc_get_pps_ts");
#endif /* DEBUG_PPS */
@@ -756,8 +752,8 @@ ripencc_get_pps_ts(
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);
+ msyslog(LOG_INFO,"ts.tv_sec: %d",(int)ts.tv_sec);
+ msyslog(LOG_INFO,"ts.tv_nsec: %ld",ts.tv_nsec);
#endif /* DEBUG_PPS */
*tsptr = tstmp;
@@ -774,7 +770,7 @@ ripencc_shutdown(int unit, struct peer *peer)
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
+ up = pp->unitptr;
if (up != NULL) {
if (up->handle != 0)
@@ -802,7 +798,7 @@ ripencc_poll(int unit, struct peer *peer)
fprintf(stderr, "ripencc_poll(%d)\n", unit);
#endif /* DEBUG_NCC */
pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
+ up = pp->unitptr;
if (up->pollcnt == 0)
refclock_report(peer, CEVNT_TIMEOUT);
else
@@ -833,7 +829,7 @@ ripencc_send(struct peer *peer, TSIPPKT spt)
register struct refclockproc *pp;
pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
+ up = pp->unitptr;
if (debug)
printf("ripencc_send(%d, %02X)\n", up->unit, cmd);
}
@@ -908,9 +904,9 @@ ripencc_receive(struct recvbuf *rbufp)
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct ripencc_unit *)pp->unitptr;
+ up = pp->unitptr;
rd_lencode = refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
#ifdef DEBUG_RAW
@@ -998,11 +994,11 @@ ripencc_receive(struct recvbuf *rbufp)
pp->nsec = 0;
}
else
- msyslog(LOG_INFO, "%s(): ripencc_get_pps_ts returns failure\n",__FUNCTION__);
+ msyslog(LOG_INFO, "%s(): ripencc_get_pps_ts returns failure",__FUNCTION__);
if (!up->polled) {
- msyslog(LOG_INFO, "%s(): unrequested packet\n",__FUNCTION__);
+ msyslog(LOG_INFO, "%s(): unrequested packet",__FUNCTION__);
/* unrequested packet */
break;
}
diff --git a/ntpd/refclock_shm.c b/ntpd/refclock_shm.c
index b73e899766d3..6540e6f377da 100644
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -1,5 +1,5 @@
/*
- * refclock_shm - clock driver for utc via shared memory
+ * 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
@@ -11,21 +11,23 @@
# include <config.h>
#endif
+#include "ntp_types.h"
+
#if defined(REFCLOCK) && defined(CLOCK_SHM)
#include "ntpd.h"
-#undef fileno
+#undef fileno
#include "ntp_io.h"
-#undef fileno
+#undef fileno
#include "ntp_refclock.h"
-#undef fileno
-#include "ntp_unixtime.h"
-#undef fileno
+#undef fileno
+#include "timespecops.h"
+#undef fileno
#include "ntp_stdlib.h"
-#undef fileno
+#undef fileno
#include <ctype.h>
-#undef fileno
+#undef fileno
#ifndef SYS_WINNT
# include <sys/ipc.h>
@@ -37,10 +39,7 @@
/*
* This driver supports a reference clock attached thru shared memory
- */
-
-/* Temp hack to simplify testing of the old mode. */
-#define OLDWAY 0
+ */
/*
* SHM interface definitions
@@ -58,8 +57,10 @@ static int shm_start (int unit, struct peer *peer);
static void shm_shutdown (int unit, struct peer *peer);
static void shm_poll (int unit, struct peer *peer);
static void shm_timer (int unit, struct peer *peer);
- int shm_peek (int unit, struct peer *peer);
- void shm_clockstats (int unit, struct peer *peer);
+static void shm_peek (int unit, struct peer *peer);
+static void shm_clockstats (int unit, struct peer *peer);
+static void shm_control (int unit, const struct refclockstat * in_st,
+ struct refclockstat * out_st, struct peer *peer);
/*
* Transfer vector
@@ -68,31 +69,33 @@ struct refclock refclock_shm = {
shm_start, /* start up driver */
shm_shutdown, /* shut down driver */
shm_poll, /* transmit poll message */
- noentry, /* not used: control */
+ shm_control, /* control settings */
noentry, /* not used: init */
noentry, /* not used: buginfo */
shm_timer, /* once per second */
};
struct shmTime {
- int mode; /* 0 - if valid set
- * use values,
+ int mode; /* 0 - if valid is set:
+ * use values,
* clear valid
- * 1 - if valid set
+ * 1 - if valid is set:
* if count before and after read of values is equal,
- * use values
+ * 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];
+ volatile int count;
+ time_t clockTimeStampSec;
+ int clockTimeStampUSec;
+ time_t receiveTimeStampSec;
+ int receiveTimeStampUSec;
+ int leap;
+ int precision;
+ int nsamples;
+ volatile int valid;
+ unsigned clockTimeStampNSec; /* Unsigned ns timestamps */
+ unsigned receiveTimeStampNSec; /* Unsigned ns timestamps */
+ int dummy[8];
};
struct shmunit {
@@ -104,6 +107,9 @@ struct shmunit {
int notready; /* number of peeks without data ready */
int bad; /* number of invalid samples */
int clash; /* number of access clashes while reading */
+
+ time_t max_delta; /* difference limit */
+ time_t max_delay; /* age/stale limit */
};
@@ -115,60 +121,62 @@ struct shmTime *getShmTime (int unit) {
/* 0x4e545030 is NTP0.
* Big units will give non-ascii but that's OK
- * as long as everybody does it the same way.
+ * as long as everybody does it the same way.
*/
- shmid=shmget (0x4e545030+unit, sizeof (struct shmTime),
- IPC_CREAT|(unit<2?0600:0666));
- if (shmid==-1) { /*error */
- msyslog(LOG_ERR,"SHM shmget (unit %d): %s",unit,strerror(errno));
+ shmid=shmget (0x4e545030 + unit, sizeof (struct shmTime),
+ IPC_CREAT | ((unit < 2) ? 0600 : 0666));
+ if (shmid == -1) { /* error */
+ msyslog(LOG_ERR, "SHM shmget (unit %d): %m", unit);
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));
+ struct shmTime *p = (struct shmTime *)shmat (shmid, 0, 0);
+ if (p == (struct shmTime *)-1) { /* error */
+ msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
return 0;
}
return p;
}
#else
char buf[10];
- LPSECURITY_ATTRIBUTES psec=0;
- HANDLE shmid=0;
+ LPSECURITY_ATTRIBUTES psec = 0;
+ HANDLE shmid = 0;
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa;
+
snprintf(buf, sizeof(buf), "NTP%d", unit);
if (unit >= 2) { /* world access */
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) {
- msyslog(LOG_ERR,"SHM InitializeSecurityDescriptor (unit %d): %m",unit);
+ 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);
+ 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;
+ sa.lpSecurityDescriptor = &sd;
+ sa.bInheritHandle = 0;
+ psec = &sa;
}
- shmid=CreateFileMapping ((HANDLE)0xffffffff, psec, PAGE_READWRITE,
- 0, sizeof (struct shmTime),buf);
+ 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);
+ msyslog(LOG_ERR, "SHM CreateFileMapping (unit %d): %s", unit, buf);
return 0;
- }
- else {
- struct shmTime *p=(struct shmTime *) MapViewOfFile (shmid,
+ } else {
+ struct shmTime *p = (struct shmTime *) MapViewOfFile (shmid,
FILE_MAP_WRITE, 0, 0, sizeof (struct shmTime));
- if (p==0) { /*error*/
+ 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);
+ msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s", unit, buf)
return 0;
}
return p;
@@ -189,13 +197,11 @@ shm_start(
pp = peer->procptr;
pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = -1;
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
- pp->unitptr = (caddr_t)up;
+ up = emalloc_zero(sizeof(*up));
up->shm = getShmTime(unit);
@@ -204,20 +210,57 @@ shm_start(
*/
memcpy((char *)&pp->refid, REFID, 4);
if (up->shm != 0) {
+ pp->unitptr = up;
up->shm->precision = PRECISION;
peer->precision = up->shm->precision;
- up->shm->valid=0;
- up->shm->nsamples=NSAMPLES;
+ up->shm->valid = 0;
+ up->shm->nsamples = NSAMPLES;
pp->clockdesc = DESCRIPTION;
- return (1);
- }
- else {
+ /* items to be changed later in 'shm_control()': */
+ up->max_delay = 5;
+ up->max_delta = 4*3600;
+ return 1;
+ } else {
+ free(up);
+ pp->unitptr = NULL;
return 0;
}
}
/*
+ * shm_control - configure flag1/time2 params
+ *
+ * These are not yet available during 'shm_start', so we have to do any
+ * pre-computations we want to avoid during regular poll/timer callbacks
+ * in this callback.
+ */
+static void
+shm_control(
+ int unit,
+ const struct refclockstat * in_st,
+ struct refclockstat * out_st,
+ struct peer * peer
+ )
+{
+ struct refclockproc *pp;
+ struct shmunit *up;
+
+ pp = peer->procptr;
+ up = pp->unitptr;
+
+ if (NULL == up)
+ return;
+ if (pp->sloppyclockflag & CLK_FLAG1)
+ up->max_delta = 0;
+ else if (pp->fudgetime2 < 1. || pp->fudgetime2 > 86400.)
+ up->max_delta = 4*3600;
+ else
+ up->max_delta = (time_t)floor(pp->fudgetime2 + 0.5);
+}
+
+
+/*
* shm_shutdown - shut down the clock
*/
static void
@@ -230,12 +273,12 @@ shm_shutdown(
struct shmunit *up;
pp = peer->procptr;
- up = (struct shmunit *)pp->unitptr;
+ up = pp->unitptr;
if (NULL == up)
return;
#ifndef SYS_WINNT
- /* HMS: shmdt()wants char* or const void * */
+ /* HMS: shmdt() wants char* or const void * */
(void) shmdt ((char *)up->shm);
#else
UnmapViewOfFile (up->shm);
@@ -250,9 +293,6 @@ shm_shutdown(
static void
shm_timer(int unit, struct peer *peer)
{
- if (OLDWAY)
- return;
-
shm_peek(unit, peer);
}
@@ -267,47 +307,84 @@ shm_poll(
)
{
struct refclockproc *pp;
- int ok;
+ struct shmunit *up;
+ int major_error;
pp = peer->procptr;
-
- if (OLDWAY) {
- ok = shm_peek(unit, peer);
- if (!ok) return;
- }
+ up = pp->unitptr;
+
+ pp->polls++;
+
+ /* get dominant reason if we have no samples at all */
+ major_error = max(up->notready, up->bad);
+ major_error = max(major_error, up->clash);
/*
- * Process median filter samples. If none received, declare a
- * timeout and keep going.
+ * Process median filter samples. If none received, see what
+ * happened, tell the core and keep going.
*/
- if (pp->coderecv == pp->codeproc) {
+ if (pp->coderecv != pp->codeproc) {
+ /* have some samples, everything OK */
+ pp->lastref = pp->lastrec;
+ refclock_receive(peer);
+ } else if (NULL == up->shm) { /* is this possible at all? */
+ /* we're out of business without SHM access */
+ refclock_report(peer, CEVNT_FAULT);
+ } else if (major_error == up->clash) {
+ /* too many collisions is like a bad signal */
+ refclock_report(peer, CEVNT_PROP);
+ } else if (major_error == up->bad) {
+ /* too much stale/bad/garbled data */
+ refclock_report(peer, CEVNT_BADREPLY);
+ } else {
+ /* in any other case assume it's just a timeout */
refclock_report(peer, CEVNT_TIMEOUT);
- shm_clockstats(unit, peer);
- return;
}
- pp->lastref = pp->lastrec;
- refclock_receive(peer);
+ /* shm_clockstats() clears the tallies, so it must be last... */
shm_clockstats(unit, peer);
}
/*
* shm_peek - try to grab a sample
*/
-int shm_peek(
+static void
+shm_peek(
int unit,
struct peer *peer
)
{
struct refclockproc *pp;
struct shmunit *up;
- struct shmTime *shm;
+
+ /* access order is important for lock-free SHM access; we
+ ** enforce order by treating the whole structure volatile.
+ **
+ ** IMPORTANT NOTE: This does not protect from reordering on CPU
+ ** level, and it does nothing for cache consistency and
+ ** visibility of changes by other cores. We need atomic and/or
+ ** fence instructions for that.
+ */
+ volatile struct shmTime *shm;
+
+ struct timespec tvr;
+ struct timespec tvt;
+ l_fp tsrcv;
+ l_fp tsref;
+ unsigned int c;
+ unsigned int cns_new, rns_new;
+ int cnt;
+
+ /* for formatting 'a_lastcode': */
+ struct calendar cd;
+ time_t tt, now;
+ vint64 ts;
/*
* This is the main routine. It snatches the time from the shm
* board and tacks on a local timestamp.
*/
pp = peer->procptr;
- up = (struct shmunit*)pp->unitptr;
+ up = pp->unitptr;
up->ticks++;
if (up->shm == 0) {
/* try to map again - this may succeed if meanwhile some-
@@ -316,102 +393,179 @@ int shm_peek(
}
shm = up->shm;
if (shm == 0) {
- refclock_report(peer, CEVNT_FAULT);
- return(0);
+ DPRINTF(1, ("%s: no SHM segment\n",
+ refnumtoa(&peer->srcadr)));
+ return;
+ }
+ if ( ! shm->valid) {
+ DPRINTF(1, ("%s: SHM not ready\n",
+ refnumtoa(&peer->srcadr)));
+ up->notready++;
+ return;
}
- if (shm->valid) {
- struct timeval tvr;
- struct timeval tvt;
- struct tm *t;
- int ok=1;
- tvr.tv_sec = 0;
- tvr.tv_usec = 0;
- tvt.tv_sec = 0;
- tvt.tv_usec = 0;
- switch (shm->mode) {
- case 0: {
- tvr.tv_sec=shm->receiveTimeStampSec;
- tvr.tv_usec=shm->receiveTimeStampUSec;
- tvt.tv_sec=shm->clockTimeStampSec;
- tvt.tv_usec=shm->clockTimeStampUSec;
- }
- break;
- case 1: {
- int cnt=shm->count;
- tvr.tv_sec=shm->receiveTimeStampSec;
- tvr.tv_usec=shm->receiveTimeStampUSec;
- tvt.tv_sec=shm->clockTimeStampSec;
- tvt.tv_usec=shm->clockTimeStampUSec;
- ok=(cnt==shm->count);
- }
- break;
- default:
- msyslog (LOG_ERR, "SHM: bad mode found in shared memory: %d",shm->mode);
+
+ switch (shm->mode) {
+ case 0:
+ tvr.tv_sec = shm->receiveTimeStampSec;
+ tvr.tv_nsec = shm->receiveTimeStampUSec * 1000;
+ rns_new = shm->receiveTimeStampNSec;
+ tvt.tv_sec = shm->clockTimeStampSec;
+ tvt.tv_nsec = shm->clockTimeStampUSec * 1000;
+ cns_new = shm->clockTimeStampNSec;
+
+ /* Since the following comparisons are between unsigned
+ ** variables they are always well defined, and any
+ ** (signed) underflow will turn into very large unsigned
+ ** values, well above the 1000 cutoff.
+ **
+ ** Note: The usecs *must* be a *truncated*
+ ** representation of the nsecs. This code will fail for
+ ** *rounded* usecs, and the logic to deal with
+ ** wrap-arounds in the presence of rounded values is
+ ** much more convoluted.
+ */
+ if ( ((cns_new - (unsigned)tvt.tv_nsec) < 1000)
+ && ((rns_new - (unsigned)tvr.tv_nsec) < 1000)) {
+ tvt.tv_nsec = cns_new;
+ tvr.tv_nsec = rns_new;
}
- shm->valid=0;
- if (ok) {
- time_t help; /* XXX NetBSD has incompatible tv_sec */
-
- TVTOTS(&tvr,&pp->lastrec);
- pp->lastrec.l_ui += JAN_1970;
- /* pp->lasttime = current_time; */
- pp->polls++;
- help = tvt.tv_sec;
- t = gmtime (&help);
- 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=shm->precision;
- pp->leap=shm->leap;
- }
- else {
- refclock_report(peer, CEVNT_FAULT);
+ /* At this point tvr and tvt contains valid ns-level
+ ** timestamps, possibly generated by extending the old
+ ** us-level timestamps
+ */
+ DPRINTF(2, ("%s: SHM type 0 sample\n",
+ refnumtoa(&peer->srcadr)));
+ break;
+
+ case 1:
+ cnt = shm->count;
+
+ tvr.tv_sec = shm->receiveTimeStampSec;
+ tvr.tv_nsec = shm->receiveTimeStampUSec * 1000;
+ rns_new = shm->receiveTimeStampNSec;
+ tvt.tv_sec = shm->clockTimeStampSec;
+ tvt.tv_nsec = shm->clockTimeStampUSec * 1000;
+ cns_new = shm->clockTimeStampNSec;
+ if (cnt != shm->count) {
+ DPRINTF(1, ("%s: type 1 access clash\n",
+ refnumtoa(&peer->srcadr)));
msyslog (LOG_NOTICE, "SHM: access clash in shared memory");
up->clash++;
- return(0);
+ return;
+ }
+
+ /* See the case above for an explanation of the
+ ** following test.
+ */
+ if ( ((cns_new - (unsigned)tvt.tv_nsec) < 1000)
+ && ((rns_new - (unsigned)tvr.tv_nsec) < 1000)) {
+ tvt.tv_nsec = cns_new;
+ tvr.tv_nsec = rns_new;
}
+ /* At this point tvr and tvt contains valid ns-level
+ ** timestamps, possibly generated by extending the old
+ ** us-level timestamps
+ */
+ DPRINTF(2, ("%s: SHM type 1 sample\n",
+ refnumtoa(&peer->srcadr)));
+ break;
+
+ default:
+ DPRINTF(1, ("%s: SHM type blooper, mode=%d\n",
+ refnumtoa(&peer->srcadr), shm->mode));
+ up->bad++;
+ msyslog (LOG_ERR, "SHM: bad mode found in shared memory: %d",
+ shm->mode);
+ return;
}
- else {
- refclock_report(peer, CEVNT_TIMEOUT);
- up->notready++;
- return(0);
+ shm->valid = 0;
+
+ /* format the last time code in human-readable form into
+ * 'pp->a_lastcode'. Someone claimed: "NetBSD has incompatible
+ * tv_sec". I can't find a base for this claim, but we can work
+ * around that potential problem. BTW, simply casting a pointer
+ * is a receipe for disaster on some architectures.
+ */
+ tt = (time_t)tvt.tv_sec;
+ ts = time_to_vint64(&tt);
+ ntpcal_time_to_date(&cd, &ts);
+
+ /* add ntpq -c cv timecode in ISO 8601 format */
+ c = snprintf(pp->a_lastcode, sizeof(pp->a_lastcode),
+ "%04u-%02u-%02uT%02u:%02u:%02u.%09ldZ",
+ cd.year, cd.month, cd.monthday,
+ cd.hour, cd.minute, cd.second,
+ (long)tvt.tv_nsec);
+ pp->lencode = (c < sizeof(pp->a_lastcode)) ? c : 0;
+
+ /* check 1: age control of local time stamp */
+ time(&now);
+ tt = now - tvr.tv_sec;
+ if (tt < 0 || tt > up->max_delay) {
+ DPRINTF(1, ("%s:SHM stale/bad receive time, delay=%llds\n",
+ refnumtoa(&peer->srcadr), (long long)tt));
+ up->bad++;
+ msyslog (LOG_ERR, "SHM: stale/bad receive time, delay=%llds",
+ (long long)tt);
+ return;
}
- if (!refclock_process(pp)) {
- refclock_report(peer, CEVNT_BADTIME);
+
+ /* check 2: delta check */
+ tt = tvr.tv_sec - tvt.tv_sec - (tvr.tv_nsec < tvt.tv_nsec);
+ if (tt < 0)
+ tt = -tt;
+ if (up->max_delta > 0 && tt > up->max_delta) {
+ DPRINTF(1, ("%s: SHM diff limit exceeded, delta=%llds\n",
+ refnumtoa(&peer->srcadr), (long long)tt));
up->bad++;
- return(0);
+ msyslog (LOG_ERR, "SHM: difference limit exceeded, delta=%llds\n",
+ (long long)tt);
+ return;
}
+
+ /* if we really made it to this point... we're winners! */
+ DPRINTF(2, ("%s: SHM feeding data\n",
+ refnumtoa(&peer->srcadr)));
+ tsrcv = tspec_stamp_to_lfp(tvr);
+ tsref = tspec_stamp_to_lfp(tvt);
+ pp->leap = shm->leap;
+ peer->precision = shm->precision;
+ refclock_process_offset(pp, tsref, tsrcv, pp->fudgetime1);
up->good++;
- return(1);
}
/*
* shm_clockstats - dump and reset counters
*/
-void shm_clockstats(
+static void shm_clockstats(
int unit,
struct peer *peer
)
{
struct refclockproc *pp;
struct shmunit *up;
- char logbuf[256];
+ char logbuf[64];
+ unsigned int llen;
pp = peer->procptr;
- up = (struct shmunit*)pp->unitptr;
-
- if (!(pp->sloppyclockflag & CLK_FLAG4)) return;
-
- snprintf(logbuf, sizeof(logbuf), "%3d %3d %3d %3d %3d",
- up->ticks, up->good, up->notready, up->bad, up->clash);
- record_clock_stats(&peer->srcadr, logbuf);
-
- up->ticks = up->good = up->notready =up->bad = up->clash = 0;
+ up = pp->unitptr;
+
+ if (pp->sloppyclockflag & CLK_FLAG4) {
+ /* if snprintf() returns a negative values on errors
+ ** (some older ones do) make sure we are NUL
+ ** terminated. Using an unsigned result does the trick.
+ */
+ llen = snprintf(logbuf, sizeof(logbuf),
+ "%3d %3d %3d %3d %3d",
+ up->ticks, up->good, up->notready,
+ up->bad, up->clash);
+ logbuf[min(llen, sizeof(logbuf)-1)] = '\0';
+ record_clock_stats(&peer->srcadr, logbuf);
+ }
+ up->ticks = up->good = up->notready = up->bad = up->clash = 0;
}
#else
-int refclock_shm_bs;
+NONEMPTY_TRANSLATION_UNIT
#endif /* REFCLOCK */
diff --git a/ntpd/refclock_tpro.c b/ntpd/refclock_tpro.c
index 86764d3f7a25..ac511bb4b392 100644
--- a/ntpd/refclock_tpro.c
+++ b/ntpd/refclock_tpro.c
@@ -87,20 +87,18 @@ tpro_start(
/*
* Allocate and initialize unit structure
*/
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = noentry;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous peer variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
return (1);
@@ -120,7 +118,7 @@ tpro_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct tprounit *)pp->unitptr;
+ up = pp->unitptr;
io_closeclock(&pp->io);
if (NULL != up)
free(up);
@@ -145,7 +143,7 @@ tpro_poll(
* board and tacks on a local timestamp.
*/
pp = peer->procptr;
- up = (struct tprounit *)pp->unitptr;
+ up = pp->unitptr;
tp = &up->tprodata;
if (read(pp->io.fd, (char *)tp, sizeof(struct tproval)) < 0) {
@@ -161,7 +159,7 @@ tpro_poll(
* 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.
+ * done by the snprintf() 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
@@ -196,8 +194,6 @@ tpro_poll(
refclock_report(peer, CEVNT_BADTIME);
return;
}
- if (peer->burst > 0)
- return;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
return;
@@ -205,7 +201,6 @@ tpro_poll(
pp->lastref = pp->lastrec;
record_clock_stats(&peer->srcadr, pp->a_lastcode);
refclock_receive(peer);
- peer->burst = NSTAGE;
}
#else
diff --git a/ntpd/refclock_trak.c b/ntpd/refclock_trak.c
deleted file mode 100644
index ddb86de845b0..000000000000
--- a/ntpd/refclock_trak.c
+++ /dev/null
@@ -1,358 +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.
- */
- snprintf(device, sizeof(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
- */
- up = emalloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
- 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);
- pp->io.fd = -1;
- 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;
- if (-1 != pp->io.fd)
- io_closeclock(&pp->io);
- if (NULL != up)
- 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/ntpd/refclock_true.c b/ntpd/refclock_true.c
index e2520c0dc1c3..36ade81c7ba5 100644
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -1,9 +1,8 @@
/*
- * refclock_true - clock driver for the Kinemetrics Truetime receivers
+ * 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
+ * Development work being done:
+ * - Support TL-3 WWV TOD receiver
*/
#ifdef HAVE_CONFIG_H
@@ -12,15 +11,15 @@
#if defined(REFCLOCK) && defined(CLOCK_TRUETIME)
+#include <stdio.h>
+#include <ctype.h>
+
#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>
-
#ifdef SYS_WINNT
extern int async_write(int, const void *, unsigned int);
#undef write
@@ -50,10 +49,11 @@ extern int async_write(int, const void *, unsigned int);
/*
* 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)
+ * GOES: (468-DC, usable with GPS->GOES converting antenna)
+ * 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)
+ * TL-3: 3 channel WWV/H receiver w/ IRIG and RS-232 outputs
* OM-DC: getting stale ("OMEGA")
*
* Most of this code is originally from refclock_wwvb.c with thanks.
@@ -71,15 +71,18 @@ extern int async_write(int, const void *, unsigned int);
* ? +/- 1 milliseconds # +/- 100 microseconds
* * +/- 10 microseconds . +/- 1 microsecond
* space less than 1 microsecond
+ * TL-3 Receiver: (default quality codes for TL-3)
+ * ? unknown quality (receiver is unlocked)
+ * space +/- 5 milliseconds
* 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.
+ * 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.
*
@@ -103,16 +106,27 @@ extern int async_write(int, const void *, unsigned int);
* 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)
+ * Notes on the TrueTime TimeLink TL-3 WWV TOD receiver:
+ *
+ * This clock may be polled, or send one timecode per second.
+ * That mode may be toggled via the front panel ("C" mode), or controlled
+ * from the RS-232 port. Send the receiver "ST1" to turn it on, and
+ * "ST0" to turn it off. Send "QV" to get the firmware revision (useful
+ * for identifying this model.)
+ *
+ * Note that it can take several polling cycles, especially if the receiver
+ * was in the continuous timecode mode. (It can be slow to leave that mode.)
+ *
+ * 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)
+ * stratum - stratum to assign to this clock (default = 0)
+ * refid - 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)
*/
@@ -139,19 +153,19 @@ extern int async_write(int, const void *, unsigned int);
* 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};
+ e_TL3, e_Poll, e_Location, e_TS, e_Max};
const char *events[] = {"Init", "Huh", "F18", "F50", "F51", "Satellite",
- "Poll", "Location", "TS"};
+ "TL3", "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};
+ s_InqTL3, 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"};
+ "InqTL3", "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"};
+enum true_type {t_unknown, t_goes, t_tm, t_tcu, t_omega, t_tl3, t_Max};
+const char *types[] = {"unknown", "goes", "tm", "tcu", "omega", "tl3"};
#define typeStr(x) (((int)x<(int)t_Max) ? types[(int)x] : "?")
/*
@@ -211,30 +225,33 @@ true_debug(struct peer *peer, const char *fmt, ...)
va_start(ap, fmt);
pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
+ up = 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+"))) {
+ 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);
+ static char buf[BUFSIZ];
+
+ setvbuf(up->debug, buf, _IOLBF, BUFSIZ);
#else
- setlinebuf(up->debug);
+ setlinebuf(up->debug);
#endif
- }
- } else {
- fclose(up->debug);
- up->debug = NULL;
- }
+ }
+ } else {
+ fclose(up->debug);
+ up->debug = NULL;
+ }
}
if (up->debug) {
@@ -262,37 +279,34 @@ true_start(
/*
* Open serial port
*/
- (void)snprintf(device, sizeof(device), DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
- return (0);
+ snprintf(device, sizeof(device), DEVICE, unit);
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd <= 0)
+ 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));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = true_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
- (void) close(fd);
+ close(fd);
+ pp->io.fd = -1;
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
pp->clockdesc = DESCRIPTION;
- memcpy((char *)&pp->refid, REFID, 4);
+ memcpy(&pp->refid, REFID, 4);
up->pollcnt = 2;
up->type = t_unknown;
up->state = s_Base;
@@ -309,6 +323,7 @@ true_start(
return (1);
}
+
/*
* true_shutdown - shut down the clock
*/
@@ -322,9 +337,11 @@ true_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
+ up = pp->unitptr;
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
+ if (up != NULL)
+ free(up);
}
@@ -343,33 +360,34 @@ true_receive(
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;
+ /* These variables hold data until we decide to keep it */
+ 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;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Read clock output. Automatically handles STREAMS, CLKLDISC.
*/
- rd_lencode = refclock_gtlin(rbufp, rd_lastcode, BMAX, &rd_tmp);
- rd_lastcode[rd_lencode] = '\0';
+ 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);
+ if (rd_lencode == 0)
+ return;
+ pp->lencode = rd_lencode;
+ strlcpy(pp->a_lastcode, rd_lastcode, sizeof(pp->a_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);
@@ -440,24 +458,37 @@ true_receive(
*/
if (sscanf(pp->a_lastcode, "F%2d", &i) == 1 && i > 0 && i < 80) {
switch (i) {
- case 50:
+ case 50:
true_doevent(peer, e_F50);
break;
- case 51:
+ case 51:
true_doevent(peer, e_F51);
break;
- default:
+ default:
true_debug(peer, "got F%02d - ignoring\n", i);
break;
}
return;
}
+ /*
+ * Timecode: "VER xx.xx"
+ * (from a TL3 when sent "QV", so id's it during initialization.)
+ */
+ if (pp->a_lastcode[0] == 'V' && pp->a_lastcode[1] == 'E' &&
+ pp->a_lastcode[2] == 'R' && pp->a_lastcode[6] == '.') {
+ true_doevent(peer, e_TL3);
+ NLOG(NLOG_CLOCKSTATUS) {
+ msyslog(LOG_INFO, "TL3: %s", pp->a_lastcode);
+ }
+ 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 ||
+ if (strncmp(pp->a_lastcode, " TRUETIME Mk III ", 17) == 0 ||
strncmp(pp->a_lastcode, " TRUETIME XL", 12) == 0) {
true_doevent(peer, e_F18);
NLOG(NLOG_CLOCKSTATUS) {
@@ -468,8 +499,8 @@ true_receive(
/*
* Timecode: "N03726428W12209421+000033"
- * 1 2
- * 0123456789012345678901234
+ * 1 2
+ * index 0123456789012345678901234
* (from a TCU during initialization)
*/
if ((pp->a_lastcode[0] == 'N' || pp->a_lastcode[0] == 'S') &&
@@ -483,6 +514,8 @@ true_receive(
}
/*
* Timecode: "ddd:hh:mm:ssQ"
+ * 1 2
+ * index 0123456789012345678901234
* (from all clocks supported by this driver.)
*/
if (pp->a_lastcode[3] == ':' &&
@@ -498,9 +531,9 @@ true_receive(
*/
if (synced == '>' || synced == '#' || synced == '?'
|| synced == 'X')
- pp->leap = LEAP_NOTINSYNC;
+ pp->leap = LEAP_NOTINSYNC;
else
- pp->leap = LEAP_NOWARNING;
+ pp->leap = LEAP_NOWARNING;
true_doevent(peer, e_TS);
@@ -552,9 +585,15 @@ true_receive(
* want one when polled. If we havn't been polled, bail out.
*/
if (!up->polled)
- return;
+ return;
+
+ /* We only call doevent if additional things need be done
+ * at poll interval. Currently, its only for GOES. We also
+ * call it for clock unknown so that it gets logged.
+ */
+ if (up->type == t_goes || up->type == t_unknown)
+ true_doevent(peer, e_Poll);
- true_doevent(peer, e_Poll);
if (!refclock_process(pp)) {
refclock_report(peer, CEVNT_BADTIME);
return;
@@ -563,7 +602,7 @@ true_receive(
* If clock is good we send a NOMINAL message so that
* any previous BAD messages are nullified
*/
- pp->lastref = pp->lastrec;
+ pp->lastref = pp->lastrec;
refclock_receive(peer);
refclock_report(peer, CEVNT_NOMINAL);
@@ -597,13 +636,13 @@ true_send(
pp = peer->procptr;
if (!(pp->sloppyclockflag & CLK_FLAG1)) {
- register int len = strlen(cmd);
+ 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);
+ refclock_report(peer, CEVNT_FAULT);
else
- pp->polls++;
+ pp->polls++;
}
}
@@ -621,7 +660,7 @@ true_doevent(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct true_unit *)pp->unitptr;
+ up = pp->unitptr;
if (event != e_TS) {
NLOG(NLOG_CLOCKSTATUS) {
msyslog(LOG_INFO, "TRUE: clock %s, state %s, event %s",
@@ -633,176 +672,233 @@ true_doevent(
true_debug(peer, "clock %s, state %s, event %s\n",
typeStr(up->type), stateStr(up->state), eventStr(event));
switch (up->type) {
- case t_goes:
+ case t_goes:
switch (event) {
- case e_Init: /* FALLTHROUGH */
- case e_Satellite:
+ 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:
+ case e_Poll:
/*
* After each poll, check the station (satellite).
*/
true_send(peer, "P");
/* No state change needed. */
break;
- default:
+ default:
break;
}
/* FALLTHROUGH */
- case t_omega:
+ case t_omega:
switch (event) {
- case e_Init:
+ case e_Init:
true_send(peer, "C");
up->state = s_Start;
break;
- case e_TS:
+ case e_TS:
if (up->state != s_Start && up->state != s_Auto) {
true_send(peer, "\03\r");
break;
}
up->state = s_Auto;
break;
- default:
+ default:
break;
}
break;
- case t_tm:
+ case t_tm:
switch (event) {
- case e_Init:
+ case e_Init:
true_send(peer, "F18\r");
up->state = s_Init;
break;
- case e_F18:
+ case e_F18:
true_send(peer, "F50\r");
+ /*
+ * 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;
+ }
up->state = s_F18;
break;
- case e_F50:
+ case e_F50:
true_send(peer, "F51\r");
up->state = s_F50;
break;
- case e_F51:
+ case e_F51:
true_send(peer, "F08\r");
up->state = s_Start;
break;
- case e_TS:
+ case e_TS:
if (up->state != s_Start && up->state != s_Auto) {
true_send(peer, "\03\r");
break;
}
up->state = s_Auto;
break;
- default:
+ default:
break;
}
break;
- case t_tcu:
+ case t_tcu:
switch (event) {
- case e_Init:
+ 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:
+ case e_TS:
if (up->state != s_Start && up->state != s_Auto) {
true_send(peer, "\03\r");
break;
}
up->state = s_Auto;
break;
- default:
+ default:
break;
}
break;
- case t_unknown:
+ case t_tl3:
+ switch (event) {
+ case e_Init:
+ true_send(peer, "ST1"); /* Turn on continuous stream */
+ break;
+ case e_TS:
+ up->state = s_Auto;
+ break;
+ default:
+ break;
+ }
+ break;
+ case t_unknown:
+ if (event == e_Poll)
+ break;
switch (up->state) {
- case s_Base:
+ case s_Base:
if (event != e_Init)
abort();
true_send(peer, "P\r");
up->state = s_InqGOES;
break;
- case s_InqGOES:
+ case s_InqGOES:
switch (event) {
- case e_Satellite:
+ case e_Satellite:
up->type = t_goes;
true_doevent(peer, e_Init);
break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh: /*FALLTHROUGH*/
- case e_TS:
+ case e_Init: /*FALLTHROUGH*/
+ case e_Huh:
+ case e_TS:
+ true_send(peer, "ST0"); /* turn off TL3 auto */
+ sleep(1); /* wait for it */
+ up->state = s_InqTL3;
+ true_send(peer, "QV"); /* see if its a TL3 */
+ break;
+ default:
+ abort();
+ }
+ break;
+ case s_InqTL3:
+ switch (event) {
+ case e_TL3:
+ up->type = t_tl3;
+ up->state = s_Auto; /* Inq side-effect. */
+ true_send(peer, "ST1"); /* Turn on 1/sec data */
+ break;
+ case e_Init: /*FALLTHROUGH*/
+ case e_Huh:
up->state = s_InqOmega;
true_send(peer, "C\r");
break;
+ case e_TS:
+ up->type = t_tl3; /* Already sending data */
+ up->state = s_Auto;
+ break;
default:
- abort();
+ msyslog(LOG_INFO,
+ "TRUE: TL3 init fellthrough! (%d)", event);
+ break;
}
break;
- case s_InqOmega:
+ case s_InqOmega:
switch (event) {
- case e_TS:
+ case e_TS:
up->type = t_omega;
up->state = s_Auto; /* Inq side-effect. */
break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
+ case e_Init: /*FALLTHROUGH*/
+ case e_Huh:
up->state = s_InqTM;
true_send(peer, "F18\r");
break;
- default:
+ default:
abort();
}
break;
- case s_InqTM:
+ case s_InqTM:
switch (event) {
- case e_F18:
+ case e_F18:
up->type = t_tm;
true_doevent(peer, e_Init);
break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
+ case e_Init: /*FALLTHROUGH*/
+ case e_Huh:
true_send(peer, "PO\r");
up->state = s_InqTCU;
break;
- default:
- abort();
+ default:
+ msyslog(LOG_INFO,
+ "TRUE: TM/TMD init fellthrough!");
+ break;
}
break;
- case s_InqTCU:
+ case s_InqTCU:
switch (event) {
- case e_Location:
+ case e_Location:
up->type = t_tcu;
true_doevent(peer, e_Init);
break;
- case e_Init: /*FALLTHROUGH*/
- case e_Huh:
+ case e_Init: /*FALLTHROUGH*/
+ case e_Huh:
up->state = s_Base;
sleep(1); /* XXX */
break;
- default:
- abort();
+ default:
+ msyslog(LOG_INFO,
+ "TRUE: TCU init fellthrough!");
+ break;
}
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));
+ 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();
+ default:
+ msyslog(LOG_INFO, "TRUE: cannot identify refclock!");
+ abort();
/* NOTREACHED */
}
@@ -842,10 +938,10 @@ true_poll(
* 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 {
+ up = pp->unitptr;
+ if (up->pollcnt > 0) {
+ up->pollcnt--;
+ } else {
true_doevent(peer, e_Init);
refclock_report(peer, CEVNT_TIMEOUT);
}
diff --git a/ntpd/refclock_tsyncpci.c b/ntpd/refclock_tsyncpci.c
new file mode 100644
index 000000000000..e70a7cf9c82e
--- /dev/null
+++ b/ntpd/refclock_tsyncpci.c
@@ -0,0 +1,912 @@
+/*******************************************************************************
+*
+* Module : refclock_tsyncpci.c
+* Date : 09/08/08
+* Purpose : Implements a reference clock driver for the NTP daemon. This
+* reference clock driver provides a means to communicate with
+* the Spectracom TSYNC PCI timing devices and use them as a time
+* source.
+*
+* (C) Copyright 2008 Spectracom Corporation
+*
+* This software is provided by Spectracom Corporation '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 Spectracom Corporation 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.
+*
+* This software is released for distribution according to the NTP copyright
+* and license contained in html/copyright.html of NTP source.
+*
+*******************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(REFCLOCK) && defined(CLOCK_TSYNCPCI)
+
+#include <asm/ioctl.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+#include <netinet/in.h>
+
+
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_refclock.h"
+#include "ntp_unixtime.h"
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+
+
+/*******************************************************************************
+**
+** This driver supports the Spectracom TSYNC PCI GPS receiver. It requires
+** that the tsyncpci.o device driver be installed and loaded.
+**
+*******************************************************************************/
+
+#define TSYNC_PCI_REVISION "1.11"
+
+/*
+** TPRO interface definitions
+*/
+#define DEVICE "/dev/tsyncpci" /* device name */
+#define PRECISION (-20) /* precision assumed (1 us) */
+#define DESCRIPTION "Spectracom TSYNC-PCI" /* WRU */
+
+#define SECONDS_1900_TO_1970 (2208988800U)
+
+#define TSYNC_REF_IID (0x2500) // SS CAI, REF IID
+#define TSYNC_REF_DEST_ID (0x0001) // KTS Firmware
+#define TSYNC_REF_IN_PYLD_OFF (0)
+#define TSYNC_REF_IN_LEN (0)
+#define TSYNC_REF_OUT_PYLD_OFF (0)
+#define TSYNC_REF_OUT_LEN (8)
+#define TSYNC_REF_MAX_OUT_LEN (16)
+#define TSYNC_REF_PYLD_LEN (TSYNC_REF_IN_LEN + \
+ TSYNC_REF_MAX_OUT_LEN)
+#define TSYNC_REF_LEN (4)
+#define TSYNC_REF_LOCAL ("LOCL")
+
+#define TSYNC_TMSCL_IID (0x2301) // CS CAI, TIMESCALE IID
+#define TSYNC_TMSCL_DEST_ID (0x0001) // KTS Firmware
+#define TSYNC_TMSCL_IN_PYLD_OFF (0)
+#define TSYNC_TMSCL_IN_LEN (0)
+#define TSYNC_TMSCL_OUT_PYLD_OFF (0)
+#define TSYNC_TMSCL_OUT_LEN (4)
+#define TSYNC_TMSCL_MAX_OUT_LEN (12)
+#define TSYNC_TMSCL_PYLD_LEN (TSYNC_TMSCL_IN_LEN + \
+ TSYNC_TMSCL_MAX_OUT_LEN)
+
+#define TSYNC_LEAP_IID (0x2307) // CS CAI, LEAP SEC IID
+#define TSYNC_LEAP_DEST_ID (0x0001) // KTS Firmware
+#define TSYNC_LEAP_IN_PYLD_OFF (0)
+#define TSYNC_LEAP_IN_LEN (0)
+#define TSYNC_LEAP_OUT_PYLD_OFF (0)
+#define TSYNC_LEAP_OUT_LEN (28)
+#define TSYNC_LEAP_MAX_OUT_LEN (36)
+#define TSYNC_LEAP_PYLD_LEN (TSYNC_LEAP_IN_LEN + \
+ TSYNC_LEAP_MAX_OUT_LEN)
+
+// These define the base date/time of the system clock. The system time will
+// be tracked as the number of seconds from this date/time.
+#define TSYNC_TIME_BASE_YEAR (1970) // earliest acceptable year
+
+#define TSYNC_LCL_STRATUM (0)
+
+/*
+** TSYNC Time Scales type
+*/
+typedef enum
+{
+ TIME_SCALE_UTC = 0, // Universal Coordinated Time
+ TIME_SCALE_TAI = 1, // International Atomic Time
+ TIME_SCALE_GPS = 2, // Global Positioning System
+ TIME_SCALE_LOCAL = 3, // UTC w/local rules for time zone and DST
+ NUM_TIME_SCALES = 4, // Number of time scales
+
+ TIME_SCALE_MAX = 15 // Maximum number of timescales
+
+} TIME_SCALE;
+
+/*
+** TSYNC Board Object
+*/
+typedef struct BoardObj {
+
+ int file_descriptor;
+ unsigned short devid;
+ unsigned short options;
+ unsigned char firmware[5];
+ unsigned char FPGA[5];
+ unsigned char driver[7];
+
+} BoardObj;
+
+/*
+** TSYNC Time Object
+*/
+typedef struct TimeObj {
+
+ unsigned char syncOption; /* -M option */
+ unsigned int secsDouble; /* seconds floating pt */
+ unsigned char seconds; /* seconds whole num */
+ unsigned char minutes;
+ unsigned char hours;
+ unsigned short days;
+ unsigned short year;
+ unsigned short flags; /* bit 2 SYNC, bit 1 TCODE; all others 0 */
+
+} TimeObj;
+
+/*
+** NTP Time Object
+*/
+typedef struct NtpTimeObj {
+
+ TimeObj timeObj;
+ struct timeval tv;
+ unsigned int refId;
+
+} NtpTimeObj;
+/*
+** TSYNC Supervisor Reference Object
+*/
+typedef struct ReferenceObj {
+
+ char time[TSYNC_REF_LEN];
+ char pps[TSYNC_REF_LEN];
+
+} ReferenceObj;
+
+/*
+** TSYNC Seconds Time Object
+*/
+typedef struct SecTimeObj
+{
+ unsigned int seconds;
+ unsigned int ns;
+}
+SecTimeObj;
+
+/*
+** TSYNC DOY Time Object
+*/
+typedef struct DoyTimeObj
+{
+ unsigned int year;
+ unsigned int doy;
+ unsigned int hour;
+ unsigned int minute;
+ unsigned int second;
+ unsigned int ns;
+}
+DoyTimeObj;
+
+/*
+** TSYNC Leap Second Object
+*/
+typedef struct LeapSecondObj
+{
+ int offset;
+ DoyTimeObj utcDate;
+}
+LeapSecondObj;
+
+/*
+ * structures for ioctl interactions with driver
+ */
+#define DI_PAYLOADS_STARTER_LENGTH 4
+typedef struct ioctl_trans_di {
+
+ // input parameters
+ uint16_t dest;
+ uint16_t iid;
+
+ uint32_t inPayloadOffset;
+ uint32_t inLength;
+ uint32_t outPayloadOffset;
+ uint32_t maxOutLength;
+
+ // output parameters
+ uint32_t actualOutLength;
+ int32_t status;
+
+ // Input and output
+
+ // The payloads field MUST be last in ioctl_trans_di.
+ uint8_t payloads[DI_PAYLOADS_STARTER_LENGTH];
+
+}ioctl_trans_di;
+
+/*
+ * structure for looking up a reference ID from a reference name
+ */
+typedef struct
+{
+ const char* pRef; // KTS Reference Name
+ const char* pRefId; // NTP Reference ID
+
+} RefIdLookup;
+
+/*
+ * unit control structure
+ */
+typedef struct {
+ uint32_t refPrefer; // Reference prefer flag
+ uint32_t refId; // Host peer reference ID
+ uint8_t refStratum; // Host peer reference stratum
+
+} TsyncUnit;
+
+/*
+** Function prototypes
+*/
+static void tsync_poll (int unit, struct peer *);
+static void tsync_shutdown (int, struct peer *);
+static int tsync_start (int, struct peer *);
+
+/*
+** Helper functions
+*/
+static void ApplyTimeOffset (DoyTimeObj* pDt, int off);
+static void SecTimeFromDoyTime (SecTimeObj* pSt, DoyTimeObj* pDt);
+static void DoyTimeFromSecTime (DoyTimeObj* pDt, SecTimeObj* pSt);
+
+/*
+** Transfer vector
+*/
+struct refclock refclock_tsyncpci = {
+ tsync_start, /* start up driver */
+ tsync_shutdown, /* shut down driver */
+ tsync_poll, /* transmit poll message */
+ noentry, /* not used (old tsync_control) */
+ noentry, /* initialize driver (not used) */
+ noentry, /* not used (old tsync_buginfo) */
+ NOFLAGS /* not used */
+};
+
+/*
+ * Reference ID lookup table
+ */
+static RefIdLookup RefIdLookupTbl[] =
+{
+ {"gps", "GPS"},
+ {"ir", "IRIG"},
+ {"hvq", "HVQ"},
+ {"frq", "FREQ"},
+ {"mdm", "ACTS"},
+ {"epp", "PPS"},
+ {"ptp", "PTP"},
+ {"asc", "ATC"},
+ {"hst0", "USER"},
+ {"hst", TSYNC_REF_LOCAL},
+ {"self", TSYNC_REF_LOCAL},
+ {NULL, NULL}
+};
+
+/*******************************************************************************
+** IOCTL DEFINITIONS
+*******************************************************************************/
+#define IOCTL_TPRO_ID 't'
+#define IOCTL_TPRO_OPEN _IOWR(IOCTL_TPRO_ID, 0, BoardObj)
+#define IOCTL_TPRO_GET_NTP_TIME _IOWR(IOCTL_TPRO_ID, 25, NtpTimeObj)
+#define IOCTL_TSYNC_GET _IOWR(IOCTL_TPRO_ID, 26, ioctl_trans_di)
+
+/******************************************************************************
+ *
+ * Function: tsync_start()
+ * Description: Used to intialize the Spectracom TSYNC reference driver.
+ *
+ * Parameters:
+ * IN: unit - not used.
+ * *peer - pointer to this reference clock's peer structure
+ * Returns: 0 - unsuccessful
+ * 1 - successful
+ *
+*******************************************************************************/
+static int tsync_start(int unit, struct peer *peer)
+{
+ struct refclockproc *pp;
+ TsyncUnit *up;
+
+
+ /*
+ ** initialize reference clock and peer parameters
+ */
+ pp = peer->procptr;
+ pp->clockdesc = DESCRIPTION;
+ pp->io.clock_recv = noentry;
+ pp->io.srcclock = peer;
+ pp->io.datalen = 0;
+ peer->precision = PRECISION;
+
+ // Allocate and initialize unit structure
+ if (!(up = (TsyncUnit*)emalloc(sizeof(TsyncUnit))))
+ {
+ return (0);
+ }
+
+ // Store reference preference
+ up->refPrefer = peer->flags & FLAG_PREFER;
+
+ // Initialize reference stratum level and ID
+ up->refStratum = STRATUM_UNSPEC;
+ strncpy((char *)&up->refId, TSYNC_REF_LOCAL, TSYNC_REF_LEN);
+
+ // Attach unit structure
+ pp->unitptr = (caddr_t)up;
+
+ /* Declare our refId as local in the beginning because we do not know
+ * what our actual refid is yet.
+ */
+ strncpy((char *)&pp->refid, TSYNC_REF_LOCAL, TSYNC_REF_LEN);
+
+ return (1);
+
+} /* End - tsync_start() */
+
+/*******************************************************************************
+**
+** Function: tsync_shutdown()
+** Description: Handles anything related to shutting down the reference clock
+** driver. Nothing at this point in time.
+**
+** Parameters:
+** IN: unit - not used.
+** *peer - pointer to this reference clock's peer structure
+** Returns: none.
+**
+*******************************************************************************/
+static void tsync_shutdown(int unit, struct peer *peer)
+{
+
+} /* End - tsync_shutdown() */
+
+/******************************************************************************
+ *
+ * Function: tsync_poll()
+ * Description: Retrieve time from the TSYNC device.
+ *
+ * Parameters:
+ * IN: unit - not used.
+ * *peer - pointer to this reference clock's peer structure
+ * Returns: none.
+ *
+*******************************************************************************/
+static void tsync_poll(int unit, struct peer *peer)
+{
+ char device[32];
+ struct refclockproc *pp;
+ struct calendar jt;
+ TsyncUnit *up;
+ unsigned char synch;
+ double seconds;
+ int err;
+ int err1;
+ int err2;
+ int err3;
+ int i;
+ int j;
+ unsigned int itAllocationLength;
+ unsigned int itAllocationLength1;
+ unsigned int itAllocationLength2;
+ NtpTimeObj TimeContext;
+ BoardObj hBoard;
+ char timeRef[TSYNC_REF_LEN + 1];
+ char ppsRef [TSYNC_REF_LEN + 1];
+ TIME_SCALE tmscl = TIME_SCALE_UTC;
+ LeapSecondObj leapSec;
+ ioctl_trans_di *it;
+ ioctl_trans_di *it1;
+ ioctl_trans_di *it2;
+ l_fp offset;
+ l_fp ltemp;
+ ReferenceObj * pRefObj;
+
+
+ /* Construct the device name */
+ sprintf(device, "%s%d", DEVICE, (int)peer->refclkunit);
+
+ printf("Polling device number %d...\n", (int)peer->refclkunit);
+
+ /* Open the TSYNC device */
+ hBoard.file_descriptor = open(device, O_RDONLY | O_NDELAY, 0777);
+
+ /* If error opening TSYNC device... */
+ if (hBoard.file_descriptor < 0)
+ {
+ msyslog(LOG_ERR, "Couldn't open device");
+ return;
+ }
+
+ /* If error while initializing the board... */
+ if (ioctl(hBoard.file_descriptor, IOCTL_TPRO_OPEN, &hBoard) < 0)
+ {
+ msyslog(LOG_ERR, "Couldn't initialize device");
+ close(hBoard.file_descriptor);
+ return;
+ }
+
+ /* Allocate memory for ioctl message */
+ itAllocationLength =
+ (sizeof(ioctl_trans_di) - DI_PAYLOADS_STARTER_LENGTH) +
+ TSYNC_REF_IN_LEN + TSYNC_REF_MAX_OUT_LEN;
+
+ it = (ioctl_trans_di*)alloca(itAllocationLength);
+ if (it == NULL) {
+ msyslog(LOG_ERR, "Couldn't allocate transaction memory - Reference");
+ return;
+ }
+
+ /* Build SS_GetRef ioctl message */
+ it->dest = TSYNC_REF_DEST_ID;
+ it->iid = TSYNC_REF_IID;
+ it->inPayloadOffset = TSYNC_REF_IN_PYLD_OFF;
+ it->inLength = TSYNC_REF_IN_LEN;
+ it->outPayloadOffset = TSYNC_REF_OUT_PYLD_OFF;
+ it->maxOutLength = TSYNC_REF_MAX_OUT_LEN;
+ it->actualOutLength = 0;
+ it->status = 0;
+ memset(it->payloads, 0, TSYNC_REF_MAX_OUT_LEN);
+
+ /* Read the reference from the TSYNC-PCI device */
+ err = ioctl(hBoard.file_descriptor,
+ IOCTL_TSYNC_GET,
+ (char *)it);
+
+ /* Allocate memory for ioctl message */
+ itAllocationLength1 =
+ (sizeof(ioctl_trans_di) - DI_PAYLOADS_STARTER_LENGTH) +
+ TSYNC_TMSCL_IN_LEN + TSYNC_TMSCL_MAX_OUT_LEN;
+
+ it1 = (ioctl_trans_di*)alloca(itAllocationLength1);
+ if (it1 == NULL) {
+ msyslog(LOG_ERR, "Couldn't allocate transaction memory - Time Scale");
+ return;
+ }
+
+ /* Build CS_GetTimeScale ioctl message */
+ it1->dest = TSYNC_TMSCL_DEST_ID;
+ it1->iid = TSYNC_TMSCL_IID;
+ it1->inPayloadOffset = TSYNC_TMSCL_IN_PYLD_OFF;
+ it1->inLength = TSYNC_TMSCL_IN_LEN;
+ it1->outPayloadOffset = TSYNC_TMSCL_OUT_PYLD_OFF;
+ it1->maxOutLength = TSYNC_TMSCL_MAX_OUT_LEN;
+ it1->actualOutLength = 0;
+ it1->status = 0;
+ memset(it1->payloads, 0, TSYNC_TMSCL_MAX_OUT_LEN);
+
+ /* Read the Time Scale info from the TSYNC-PCI device */
+ err1 = ioctl(hBoard.file_descriptor,
+ IOCTL_TSYNC_GET,
+ (char *)it1);
+
+ /* Allocate memory for ioctl message */
+ itAllocationLength2 =
+ (sizeof(ioctl_trans_di) - DI_PAYLOADS_STARTER_LENGTH) +
+ TSYNC_LEAP_IN_LEN + TSYNC_LEAP_MAX_OUT_LEN;
+
+ it2 = (ioctl_trans_di*)alloca(itAllocationLength2);
+ if (it2 == NULL) {
+ msyslog(LOG_ERR, "Couldn't allocate transaction memory - Leap Second");
+ return;
+ }
+
+ /* Build CS_GetLeapSec ioctl message */
+ it2->dest = TSYNC_LEAP_DEST_ID;
+ it2->iid = TSYNC_LEAP_IID;
+ it2->inPayloadOffset = TSYNC_LEAP_IN_PYLD_OFF;
+ it2->inLength = TSYNC_LEAP_IN_LEN;
+ it2->outPayloadOffset = TSYNC_LEAP_OUT_PYLD_OFF;
+ it2->maxOutLength = TSYNC_LEAP_MAX_OUT_LEN;
+ it2->actualOutLength = 0;
+ it2->status = 0;
+ memset(it2->payloads, 0, TSYNC_LEAP_MAX_OUT_LEN);
+
+ /* Read the leap seconds info from the TSYNC-PCI device */
+ err2 = ioctl(hBoard.file_descriptor,
+ IOCTL_TSYNC_GET,
+ (char *)it2);
+
+ pp = peer->procptr;
+ up = (TsyncUnit*)pp->unitptr;
+
+ /* Read the time from the TSYNC-PCI device */
+ err3 = ioctl(hBoard.file_descriptor,
+ IOCTL_TPRO_GET_NTP_TIME,
+ (char *)&TimeContext);
+
+ /* Close the TSYNC device */
+ close(hBoard.file_descriptor);
+
+ // Check for errors
+ if ((err < 0) ||(err1 < 0) || (err2 < 0) || (err3 < 0) ||
+ (it->status != 0) || (it1->status != 0) || (it2->status != 0) ||
+ (it->actualOutLength != TSYNC_REF_OUT_LEN) ||
+ (it1->actualOutLength != TSYNC_TMSCL_OUT_LEN) ||
+ (it2->actualOutLength != TSYNC_LEAP_OUT_LEN)) {
+ refclock_report(peer, CEVNT_FAULT);
+ return;
+ }
+
+ // Extract reference identifiers from ioctl payload
+ memset(timeRef, '\0', sizeof(timeRef));
+ memset(ppsRef, '\0', sizeof(ppsRef));
+ pRefObj = (void *)it->payloads;
+ memcpy(timeRef, pRefObj->time, TSYNC_REF_LEN);
+ memcpy(ppsRef, pRefObj->pps, TSYNC_REF_LEN);
+
+ // Extract the Clock Service Time Scale and convert to correct byte order
+ memcpy(&tmscl, ((TIME_SCALE*)(it1->payloads)), sizeof(tmscl));
+ tmscl = ntohl(tmscl);
+
+ // Extract leap second info from ioctl payload and perform byte swapping
+ for (i = 0; i < (sizeof(leapSec) / 4); i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ ((unsigned char*)&leapSec)[(i * 4) + j] =
+ ((unsigned char*)(it2->payloads))[(i * 4) + (3 - j)];
+ }
+ }
+
+ // Determine time reference ID from reference name
+ for (i = 0; RefIdLookupTbl[i].pRef != NULL; i++)
+ {
+ // Search RefID table
+ if (strstr(timeRef, RefIdLookupTbl[i].pRef) != NULL)
+ {
+ // Found the matching string
+ break;
+ }
+ }
+
+ // Determine pps reference ID from reference name
+ for (j = 0; RefIdLookupTbl[j].pRef != NULL; j++)
+ {
+ // Search RefID table
+ if (strstr(ppsRef, RefIdLookupTbl[j].pRef) != NULL)
+ {
+ // Found the matching string
+ break;
+ }
+ }
+
+ // Determine synchronization state from flags
+ synch = (TimeContext.timeObj.flags == 0x4) ? 1 : 0;
+
+ // Pull seconds information from time object
+ seconds = (double) (TimeContext.timeObj.secsDouble);
+ seconds /= (double) 1000000.0;
+
+ /*
+ ** Convert the number of microseconds to double and then place in the
+ ** peer's last received long floating point format.
+ */
+ DTOLFP(((double)TimeContext.tv.tv_usec / 1000000.0), &pp->lastrec);
+
+ /*
+ ** The specTimeStamp is the number of seconds since 1/1/1970, while the
+ ** peer's lastrec time should be compatible with NTP which is seconds since
+ ** 1/1/1900. So Add the number of seconds between 1900 and 1970 to the
+ ** specTimeStamp and place in the peer's lastrec long floating point struct.
+ */
+ pp->lastrec.Ul_i.Xl_ui += (unsigned int)TimeContext.tv.tv_sec +
+ SECONDS_1900_TO_1970;
+
+ pp->polls++;
+
+ /*
+ ** set the reference clock object
+ */
+ sprintf(pp->a_lastcode, "%03d %02d:%02d:%02.6f",
+ TimeContext.timeObj.days, TimeContext.timeObj.hours,
+ TimeContext.timeObj.minutes, seconds);
+
+ pp->lencode = strlen (pp->a_lastcode);
+ pp->day = TimeContext.timeObj.days;
+ pp->hour = TimeContext.timeObj.hours;
+ pp->minute = TimeContext.timeObj.minutes;
+ pp->second = (int) seconds;
+ seconds = (seconds - (double) (pp->second / 1.0)) * 1000000000;
+ pp->nsec = (long) seconds;
+
+ /*
+ ** calculate year start
+ */
+ jt.year = TimeContext.timeObj.year;
+ jt.yearday = 1;
+ jt.monthday = 1;
+ jt.month = 1;
+ jt.hour = 0;
+ jt.minute = 0;
+ jt.second = 0;
+ pp->yearstart = caltontp(&jt);
+
+ // Calculate and report reference clock offset
+ offset.l_ui = (long)(((pp->day - 1) * 24) + pp->hour + GMT);
+ offset.l_ui = (offset.l_ui * 60) + (long)pp->minute;
+ offset.l_ui = (offset.l_ui * 60) + (long)pp->second;
+ offset.l_ui = offset.l_ui + (long)pp->yearstart;
+ offset.l_uf = 0;
+ DTOLFP(pp->nsec / 1e9, &ltemp);
+ L_ADD(&offset, &ltemp);
+ refclock_process_offset(pp, offset, pp->lastrec,
+ pp->fudgetime1);
+
+ // KTS in sync
+ if (synch) {
+ // Subtract leap second info by one second to determine effective day
+ ApplyTimeOffset(&(leapSec.utcDate), -1);
+
+ // If there is a leap second today and the KTS is using a time scale
+ // which handles leap seconds then
+ if ((tmscl != TIME_SCALE_GPS) && (tmscl != TIME_SCALE_TAI) &&
+ (leapSec.utcDate.year == (unsigned int)TimeContext.timeObj.year) &&
+ (leapSec.utcDate.doy == (unsigned int)TimeContext.timeObj.days))
+ {
+ // If adding a second
+ if (leapSec.offset == 1)
+ {
+ pp->leap = LEAP_ADDSECOND;
+ }
+ // Else if removing a second
+ else if (leapSec.offset == -1)
+ {
+ pp->leap = LEAP_DELSECOND;
+ }
+ // Else report no leap second pending (no handling of offsets
+ // other than +1 or -1)
+ else
+ {
+ pp->leap = LEAP_NOWARNING;
+ }
+ }
+ // Else report no leap second pending
+ else
+ {
+ pp->leap = LEAP_NOWARNING;
+ }
+
+ peer->leap = pp->leap;
+ refclock_report(peer, CEVNT_NOMINAL);
+
+ // If reference name reported, then not in holdover
+ if ((RefIdLookupTbl[i].pRef != NULL) &&
+ (RefIdLookupTbl[j].pRef != NULL))
+ {
+ // Determine if KTS being synchronized by host (identified as
+ // "LOCL")
+ if ((strcmp(RefIdLookupTbl[i].pRefId, TSYNC_REF_LOCAL) == 0) ||
+ (strcmp(RefIdLookupTbl[j].pRefId, TSYNC_REF_LOCAL) == 0))
+ {
+ // Clear prefer flag
+ peer->flags &= ~FLAG_PREFER;
+
+ // Set reference clock stratum level as unusable
+ pp->stratum = STRATUM_UNSPEC;
+ peer->stratum = pp->stratum;
+
+ // If a valid peer is available
+ if ((sys_peer != NULL) && (sys_peer != peer))
+ {
+ // Store reference peer stratum level and ID
+ up->refStratum = sys_peer->stratum;
+ up->refId = addr2refid(&sys_peer->srcadr);
+ }
+ }
+ else
+ {
+ // Restore prefer flag
+ peer->flags |= up->refPrefer;
+
+ // Store reference stratum as local clock
+ up->refStratum = TSYNC_LCL_STRATUM;
+ strncpy((char *)&up->refId, RefIdLookupTbl[j].pRefId,
+ TSYNC_REF_LEN);
+
+ // Set reference clock stratum level as local clock
+ pp->stratum = TSYNC_LCL_STRATUM;
+ peer->stratum = pp->stratum;
+ }
+
+ // Update reference name
+ strncpy((char *)&pp->refid, RefIdLookupTbl[j].pRefId,
+ TSYNC_REF_LEN);
+ peer->refid = pp->refid;
+ }
+ // Else in holdover
+ else
+ {
+ // Restore prefer flag
+ peer->flags |= up->refPrefer;
+
+ // Update reference ID to saved ID
+ pp->refid = up->refId;
+ peer->refid = pp->refid;
+
+ // Update stratum level to saved stratum level
+ pp->stratum = up->refStratum;
+ peer->stratum = pp->stratum;
+ }
+ }
+ // Else KTS not in sync
+ else {
+ // Place local identifier in peer RefID
+ strncpy((char *)&pp->refid, TSYNC_REF_LOCAL, TSYNC_REF_LEN);
+ peer->refid = pp->refid;
+
+ // Report not in sync
+ pp->leap = LEAP_NOTINSYNC;
+ peer->leap = pp->leap;
+ }
+
+ if (pp->coderecv == pp->codeproc) {
+ refclock_report(peer, CEVNT_TIMEOUT);
+ return;
+ }
+
+ record_clock_stats(&peer->srcadr, pp->a_lastcode);
+ refclock_receive(peer);
+
+ /* Increment the number of times the reference has been polled */
+ pp->polls++;
+
+} /* End - tsync_poll() */
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Function: ApplyTimeOffset
+// Description: The ApplyTimeOffset function adds an offset (in seconds) to a
+// specified date and time. The specified date and time is passed
+// back after being modified.
+//
+// Assumptions: 1. Every fourth year is a leap year. Therefore, this function
+// is only accurate through Feb 28, 2100.
+////////////////////////////////////////////////////////////////////////////////
+void ApplyTimeOffset(DoyTimeObj* pDt, int off)
+{
+ SecTimeObj st; // Time, in seconds
+
+
+ // Convert date and time to seconds
+ SecTimeFromDoyTime(&st, pDt);
+
+ // Apply offset
+ st.seconds = (int)((signed long long)st.seconds + (signed long long)off);
+
+ // Convert seconds to date and time
+ DoyTimeFromSecTime(pDt, &st);
+
+} // End ApplyTimeOffset
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Function: SecTimeFromDoyTime
+// Description: The SecTimeFromDoyTime function converts a specified date
+// and time into a count of seconds since the base time. This
+// function operates across the range Base Time to Max Time for
+// the system.
+//
+// Assumptions: 1. A leap year is any year evenly divisible by 4. Therefore,
+// this function is only accurate through Feb 28, 2100.
+// 2. Conversion does not account for leap seconds.
+////////////////////////////////////////////////////////////////////////////////
+void SecTimeFromDoyTime(SecTimeObj* pSt, DoyTimeObj* pDt)
+{
+ unsigned int yrs; // Years
+ unsigned int lyrs; // Leap years
+
+
+ // Start with accumulated time of 0
+ pSt->seconds = 0;
+
+ // Calculate the number of years and leap years
+ yrs = pDt->year - TSYNC_TIME_BASE_YEAR;
+ lyrs = (yrs + 1) / 4;
+
+ // Convert leap years and years
+ pSt->seconds += lyrs * SECSPERLEAPYEAR;
+ pSt->seconds += (yrs - lyrs) * SECSPERYEAR;
+
+ // Convert days, hours, minutes and seconds
+ pSt->seconds += (pDt->doy - 1) * SECSPERDAY;
+ pSt->seconds += pDt->hour * SECSPERHR;
+ pSt->seconds += pDt->minute * SECSPERMIN;
+ pSt->seconds += pDt->second;
+
+ // Copy the subseconds count
+ pSt->ns = pDt->ns;
+
+} // End SecTimeFromDoyTime
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Function: DoyTimeFromSecTime
+// Description: The DoyTimeFromSecTime function converts a specified count
+// of seconds since the start of our base time into a SecTimeObj
+// structure.
+//
+// Assumptions: 1. A leap year is any year evenly divisible by 4. Therefore,
+// this function is only accurate through Feb 28, 2100.
+// 2. Conversion does not account for leap seconds.
+////////////////////////////////////////////////////////////////////////////////
+void DoyTimeFromSecTime(DoyTimeObj* pDt, SecTimeObj* pSt)
+{
+ signed long long secs; // Seconds accumulator variable
+ unsigned int yrs; // Years accumulator variable
+ unsigned int doys; // Days accumulator variable
+ unsigned int hrs; // Hours accumulator variable
+ unsigned int mins; // Minutes accumulator variable
+
+
+ // Convert the seconds count into a signed 64-bit number for calculations
+ secs = (signed long long)(pSt->seconds);
+
+ // Calculate the number of 4 year chunks
+ yrs = (unsigned int)((secs /
+ ((SECSPERYEAR * 3) + SECSPERLEAPYEAR)) * 4);
+ secs %= ((SECSPERYEAR * 3) + SECSPERLEAPYEAR);
+
+ // If there is at least a normal year worth of time left
+ if (secs >= SECSPERYEAR)
+ {
+ // Increment the number of years and subtract a normal year of time
+ yrs++;
+ secs -= SECSPERYEAR;
+ }
+
+ // If there is still at least a normal year worth of time left
+ if (secs >= SECSPERYEAR)
+ {
+ // Increment the number of years and subtract a normal year of time
+ yrs++;
+ secs -= SECSPERYEAR;
+ }
+
+ // If there is still at least a leap year worth of time left
+ if (secs >= SECSPERLEAPYEAR)
+ {
+ // Increment the number of years and subtract a leap year of time
+ yrs++;
+ secs -= SECSPERLEAPYEAR;
+ }
+
+ // Calculate the day of year as the number of days left, then add 1
+ // because months start on the 1st.
+ doys = (unsigned int)((secs / SECSPERDAY) + 1);
+ secs %= SECSPERDAY;
+
+ // Calculate the hour
+ hrs = (unsigned int)(secs / SECSPERHR);
+ secs %= SECSPERHR;
+
+ // Calculate the minute
+ mins = (unsigned int)(secs / SECSPERMIN);
+ secs %= SECSPERMIN;
+
+ // Fill in the doytime structure
+ pDt->year = yrs + TSYNC_TIME_BASE_YEAR;
+ pDt->doy = doys;
+ pDt->hour = hrs;
+ pDt->minute = mins;
+ pDt->second = (unsigned int)secs;
+ pDt->ns = pSt->ns;
+
+} // End DoyTimeFromSecTime
+
+#else
+int refclock_tsyncpci_bs;
+#endif /* REFCLOCK */
diff --git a/ntpd/refclock_tt560.c b/ntpd/refclock_tt560.c
index 7aa2180e756f..171ba5c8cc44 100644
--- a/ntpd/refclock_tt560.c
+++ b/ntpd/refclock_tt560.c
@@ -76,14 +76,14 @@ tt560_start(
{
register struct tt560unit *up;
struct refclockproc *pp;
- char device[20];
- int fd;
- caddr_t membase;
+ char device[20];
+ int fd;
+ caddr_t membase;
/*
* Open TT560 device
*/
- (void)sprintf(device, DEVICE, unit);
+ snprintf(device, sizeof(device), DEVICE, unit);
fd = open(device, O_RDWR);
if (fd == -1) {
msyslog(LOG_ERR, "tt560_start: open of %s: %m", device);
@@ -123,7 +123,6 @@ tt560_start(
* Initialize miscellaneous peer variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
return (1);
@@ -195,9 +194,9 @@ tt560_poll(
* 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.
+ * done by the snprintf() and sscanf() routines.
*/
- sprintf(pp->a_lastcode,
+ snprintf(pp->a_lastcode, sizeof(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,
@@ -227,15 +226,12 @@ tt560_poll(
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;
}
/******************************************************************
diff --git a/ntpd/refclock_ulink.c b/ntpd/refclock_ulink.c
index 5b7f46f03816..d8f24a506f50 100644
--- a/ntpd/refclock_ulink.c
+++ b/ntpd/refclock_ulink.c
@@ -2,23 +2,6 @@
* 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
@@ -142,36 +125,33 @@ ulink_start(
/*
* Open serial port. Use CLK line discipline, if available.
*/
- (void)sprintf(device, DEVICE, unit);
- if (!(fd = refclock_open(device, SPEED232, LDISC_CLK)))
+ snprintf(device, sizeof(device), DEVICE, unit);
+ fd = refclock_open(device, SPEED232, LDISC_CLK);
+ if (fd <= 0)
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));
+ up = emalloc(sizeof(struct ulinkunit));
+ memset(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.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
- (void) close(fd);
+ close(fd);
+ pp->io.fd = -1;
free(up);
return (0);
}
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
*/
peer->precision = PRECISION;
- peer->burst = NSTAGE;
pp->clockdesc = DESCRIPTION;
memcpy((char *)&pp->refid, REFID, 4);
return (1);
@@ -191,9 +171,11 @@ ulink_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct ulinkunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
+ up = pp->unitptr;
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
+ if (up != NULL)
+ free(up);
}
@@ -209,21 +191,21 @@ ulink_receive(
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 siglchar; /* model difference between 33x/325 */
+ l_fp trtmp; /* arrival timestamp */
+ int quality = INT_MAX; /* quality indicator */
+ int temp; /* int temp */
+ char syncchar; /* synchronization indicator */
+ char leapchar; /* leap indicator */
+ char modechar; /* model 320 mode flag */
+ char siglchar; /* model difference between 33x/325 */
char char_quality[2]; /* temp quality flag */
/*
* Initialize pointers and read the timecode and timestamp
*/
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct ulinkunit *)pp->unitptr;
+ up = pp->unitptr;
temp = refclock_gtlin(rbufp, pp->a_lastcode, BMAX, &trtmp);
/*
@@ -571,8 +553,6 @@ ulink_poll(
else
pp->polls++;
- if (peer->burst > 0)
- return;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
return;
@@ -580,7 +560,6 @@ ulink_poll(
pp->lastref = pp->lastrec;
refclock_receive(peer);
record_clock_stats(&peer->srcadr, pp->a_lastcode);
- peer->burst = NSTAGE;
}
diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c
index b03cfe128702..14183b46ce2d 100644
--- a/ntpd/refclock_wwv.c
+++ b/ntpd/refclock_wwv.c
@@ -63,7 +63,7 @@
*
* Fudge factors
*
- * Fudge flag4 causes the dubugging output described above to be
+ * Fudge flag4 causes the debugging output described above to be
* recorded in the clockstats file. 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
@@ -81,8 +81,8 @@
#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 WWV_SEC 8000 /* second epoch (sample rate) (Hz) */
+#define WWV_MIN (WWV_SEC * 60) /* minute epoch */
#define OFFSET 128 /* companded sample offset */
#define SIZE 256 /* decompanding table size */
#define MAXAMP 6000. /* max signal level reference */
@@ -201,10 +201,10 @@
* 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 */
+#define MS (WWV_SEC / 1000) /* samples per millisecond */
+#define IN100 ((100 * 80) / WWV_SEC) /* 100 Hz increment */
+#define IN1000 ((1000 * 80) / WWV_SEC) /* 1000 Hz increment */
+#define IN1200 ((1200 * 80) / WWV_SEC) /* 1200 Hz increment */
/*
* Acquisition and tracking time constants
@@ -596,7 +596,7 @@ static void wwv_corr4 (struct peer *, struct decvec *,
double [], double [][4]);
static void wwv_gain (struct peer *);
static void wwv_tsec (struct peer *);
-static int timecode (struct wwvunit *, char *);
+static int timecode (struct wwvunit *, char *, size_t);
static double wwv_snr (double, double);
static int carry (struct decvec *);
static int wwv_newchan (struct peer *);
@@ -659,15 +659,10 @@ wwv_start(
/*
* Allocate and initialize unit structure
*/
- if (!(up = (struct wwvunit *)emalloc(sizeof(struct wwvunit)))) {
- close(fd);
- return (0);
- }
- memset(up, 0, sizeof(struct wwvunit));
+ up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
pp->io.clock_recv = wwv_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -675,6 +670,7 @@ wwv_start(
free(up);
return (0);
}
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -693,10 +689,10 @@ wwv_start(
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.;
+ if (i % 16 == 0)
+ step *= 2.;
}
- DTOLFP(1. / SECOND, &up->tick);
+ DTOLFP(1. / WWV_SEC, &up->tick);
/*
* Initialize the decoding matrix with the radix for each digit
@@ -765,7 +761,7 @@ wwv_shutdown(
struct wwvunit *up;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (up == NULL)
return;
@@ -803,15 +799,15 @@ wwv_receive(
int bufcnt; /* buffer counter */
l_fp ltemp;
- peer = (struct peer *)rbufp->recv_srcclock;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Main loop - read until there ain't no more. Note codec
* samples are bit-inverted.
*/
- DTOLFP((double)rbufp->recv_length / SECOND, &ltemp);
+ DTOLFP((double)rbufp->recv_length / WWV_SEC, &ltemp);
L_SUB(&rbufp->recv_time, &ltemp);
up->timestamp = rbufp->recv_time;
dpt = rbufp->recv_buffer;
@@ -839,7 +835,7 @@ wwv_receive(
* per second, which results in a frequency change of
* 125 PPM.
*/
- up->phase += (up->freq + clock_codec) / SECOND;
+ up->phase += (up->freq + clock_codec) / WWV_SEC;
if (up->phase >= .5) {
up->phase -= 1.;
} else if (up->phase < -.5) {
@@ -884,7 +880,7 @@ wwv_poll(
struct wwvunit *up;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (up->errflg)
refclock_report(peer, up->errflg);
up->errflg = 0;
@@ -968,7 +964,7 @@ wwv_rf(
static double hsiamp; /* wwvh I tick amplitude */
static double hsqamp; /* wwvh Q tick amplitude */
- static double epobuf[SECOND]; /* second sync comb filter */
+ static double epobuf[WWV_SEC]; /* second sync comb filter */
static double epomax, nxtmax; /* second sync amplitude buffer */
static int epopos; /* epoch second sync position buffer */
@@ -978,7 +974,7 @@ wwv_rf(
int i;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (!iniflg) {
iniflg = 1;
@@ -1095,8 +1091,8 @@ wwv_rf(
* while the second counter (epoch) counts the samples in the
* second.
*/
- up->mphase = (up->mphase + 1) % MINUTE;
- epoch = up->mphase % SECOND;
+ up->mphase = (up->mphase + 1) % WWV_MIN;
+ epoch = up->mphase % WWV_SEC;
/*
* WWV
@@ -1124,7 +1120,7 @@ wwv_rf(
sp = &up->mitig[up->achan].wwv;
sp->amp = sqrt(ciamp * ciamp + cqamp * cqamp) / SYNCYC;
if (!(up->status & MSYNC))
- wwv_qrz(peer, sp, (int)(pp->fudgetime1 * SECOND));
+ wwv_qrz(peer, sp, (int)(pp->fudgetime1 * WWV_SEC));
/*
* WWVH
@@ -1152,7 +1148,7 @@ wwv_rf(
rp = &up->mitig[up->achan].wwvh;
rp->amp = sqrt(hiamp * hiamp + hqamp * hqamp) / SYNCYC;
if (!(up->status & MSYNC))
- wwv_qrz(peer, rp, (int)(pp->fudgetime2 * SECOND));
+ wwv_qrz(peer, rp, (int)(pp->fudgetime2 * WWV_SEC));
jptr = (jptr + 1) % SYNSIZ;
kptr = (kptr + 1) % TCKSIZ;
@@ -1180,9 +1176,9 @@ wwv_rf(
* don't miss a beat.
*/
if (up->status & LEPSEC) {
- up->mphase -= SECOND;
+ up->mphase -= WWV_SEC;
if (up->mphase < 0)
- up->mphase += MINUTE;
+ up->mphase += WWV_MIN;
}
}
}
@@ -1206,9 +1202,9 @@ wwv_rf(
wwv_epoch(peer);
} else if (up->sptr != NULL) {
sp = up->sptr;
- if (sp->metric >= TTHR && epoch == sp->mepoch % SECOND)
+ if (sp->metric >= TTHR && epoch == sp->mepoch % WWV_SEC)
{
- up->rsec = (60 - sp->mepoch / SECOND) % 60;
+ up->rsec = (60 - sp->mepoch / WWV_SEC) % 60;
up->rphase = 0;
up->status |= MSYNC;
up->watch = 0;
@@ -1256,7 +1252,7 @@ wwv_rf(
epopos = epoch;
j = epoch - 6 * MS;
if (j < 0)
- j += SECOND;
+ j += WWV_SEC;
nxtmax = fabs(epobuf[j]);
}
if (epoch == 0) {
@@ -1264,7 +1260,7 @@ wwv_rf(
up->eposnr = wwv_snr(epomax, nxtmax);
epopos -= TCKCYC * MS;
if (epopos < 0)
- epopos += SECOND;
+ epopos += WWV_SEC;
wwv_endpoc(peer, epopos);
if (!(up->status & SSYNC))
up->alarm |= SYNERR;
@@ -1308,7 +1304,7 @@ wwv_qrz(
long epoch;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Find the sample with peak amplitude, which defines the minute
@@ -1317,7 +1313,7 @@ wwv_qrz(
*/
epoch = up->mphase - pdelay - SYNSIZ;
if (epoch < 0)
- epoch += MINUTE;
+ epoch += WWV_MIN;
if (sp->amp > sp->maxeng) {
sp->maxeng = sp->amp;
sp->pos = epoch;
@@ -1334,10 +1330,10 @@ wwv_qrz(
if (up->mphase == 0) {
sp->synmax = sp->maxeng;
sp->synsnr = wwv_snr(sp->synmax, (sp->noieng -
- sp->synmax) / MINUTE);
+ sp->synmax) / WWV_MIN);
if (sp->count == 0)
sp->lastpos = sp->pos;
- epoch = (sp->pos - sp->lastpos) % MINUTE;
+ epoch = (sp->pos - sp->lastpos) % WWV_MIN;
sp->reach <<= 1;
if (sp->reach & (1 << AMAX))
sp->count--;
@@ -1355,11 +1351,11 @@ wwv_qrz(
else
sp->metric = wwv_metric(sp);
if (pp->sloppyclockflag & CLK_FLAG4) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv8 %04x %3d %s %04x %.0f %.0f/%.1f %ld %ld",
up->status, up->gain, sp->refid,
sp->reach & 0xffff, sp->metric, sp->synmax,
- sp->synsnr, sp->pos % SECOND, epoch);
+ sp->synsnr, sp->pos % WWV_SEC, epoch);
record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
if (debug)
@@ -1409,10 +1405,10 @@ wwv_endpoc(
int tmp2;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (!iniflg) {
iniflg = 1;
- memset((char *)epoch_mf, 0, sizeof(epoch_mf));
+ ZERO(epoch_mf);
}
/*
@@ -1466,7 +1462,7 @@ wwv_endpoc(
* interval while the comb filter charges up and noise
* dissapates..
*/
- tmp2 = (tepoch - xepoch) % SECOND;
+ tmp2 = (tepoch - xepoch) % WWV_SEC;
if (tmp2 == 0) {
syncnt++;
if (syncnt > SCMP && up->status & MSYNC && (up->status &
@@ -1482,7 +1478,7 @@ wwv_endpoc(
}
if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status &
MSYNC)) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv1 %04x %3d %4d %5.0f %5.1f %5d %4d %4d %4d",
up->status, up->gain, tepoch, up->epomax,
up->eposnr, tmp2, avgcnt, syncnt,
@@ -1542,7 +1538,7 @@ wwv_endpoc(
* to zero; if it decrements to -3, the interval is halved and
* the counter set to zero.
*/
- dtemp = (mepoch - zepoch) % SECOND;
+ dtemp = (mepoch - zepoch) % WWV_SEC;
if (up->status & FGATE) {
if (abs(dtemp) < MAXFREQ * MINAVG) {
up->freq += (dtemp / 2.) / ((mcount - zcount) *
@@ -1573,11 +1569,11 @@ wwv_endpoc(
}
}
if (pp->sloppyclockflag & CLK_FLAG4) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv2 %04x %5.0f %5.1f %5d %4d %4d %4d %4.0f %7.2f",
up->status, up->epomax, up->eposnr, mepoch,
up->avgint, maxrun, mcount - zcount, dtemp,
- up->freq * 1e6 / SECOND);
+ up->freq * 1e6 / WWV_SEC);
record_clock_stats(&peer->srcadr, tbuf);
#ifdef DEBUG
if (debug)
@@ -1625,7 +1621,7 @@ wwv_epoch(
static double sigmin, sigzer, sigone, engmax, engmin;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Find the maximum minute sync pulse energy for both the
@@ -1699,7 +1695,7 @@ wwv_epoch(
* next pulse.
*/
up->rphase++;
- if (up->mphase % SECOND == up->repoch) {
+ if (up->mphase % WWV_SEC == up->repoch) {
up->status &= ~(DGATE | BGATE);
engmin = sqrt(up->irig * up->irig + up->qrig *
up->qrig);
@@ -1763,10 +1759,10 @@ wwv_rsec(
int sw, arg, nsec;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (!iniflg) {
iniflg = 1;
- memset((char *)bitvec, 0, sizeof(bitvec));
+ ZERO(bitvec);
}
/*
@@ -1860,7 +1856,7 @@ wwv_rsec(
}
rp->metric = wwv_metric(rp);
if (pp->sloppyclockflag & CLK_FLAG4) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv5 %04x %3d %4d %.0f/%.1f %.0f/%.1f %s %04x %.0f %.0f/%.1f %s %04x %.0f %.0f/%.1f",
up->status, up->gain, up->yepoch,
up->epomax, up->eposnr, up->datsig,
@@ -2025,7 +2021,7 @@ wwv_rsec(
}
if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status &
DSYNC)) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv3 %2d %04x %3d %4d %5.0f %5.1f %5.0f %5.1f %5.0f",
nsec, up->status, up->gain, up->yepoch, up->epomax,
up->eposnr, up->datsig, up->datsnr, bit);
@@ -2059,7 +2055,7 @@ wwv_clock(
l_fp offset; /* offset in NTP seconds */
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (!(up->status & SSYNC))
up->alarm |= SYNERR;
if (up->digcnt < 9)
@@ -2095,7 +2091,8 @@ wwv_clock(
refclock_receive(peer);
}
}
- pp->lencode = timecode(up, pp->a_lastcode);
+ pp->lencode = timecode(up, pp->a_lastcode,
+ sizeof(pp->a_lastcode));
record_clock_stats(&peer->srcadr, pp->a_lastcode);
#ifdef DEBUG
if (debug)
@@ -2132,7 +2129,7 @@ wwv_corr4(
int i, j;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Correlate digit vector with each BCD coefficient vector. If
@@ -2193,7 +2190,7 @@ wwv_corr4(
}
if ((pp->sloppyclockflag & CLK_FLAG4) && !(up->status &
INSYNC)) {
- sprintf(tbuf,
+ snprintf(tbuf, sizeof(tbuf),
"wwv4 %2d %04x %3d %4d %5.0f %2d %d %d %d %5.0f %5.1f",
up->rsec - 1, up->status, up->gain, up->yepoch,
up->epomax, vp->radix, vp->digit, mldigit,
@@ -2225,7 +2222,7 @@ wwv_tsec(
int temp;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Advance minute unit of the day. Don't propagate carries until
@@ -2404,7 +2401,7 @@ wwv_newchan(
int i, j, rval;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Search all five station pairs looking for the channel with
@@ -2496,7 +2493,7 @@ wwv_newgame(
int i;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Initialize strategic values. Note we set the leap bits
@@ -2521,9 +2518,11 @@ wwv_newgame(
cp = &up->mitig[i];
cp->gain = up->gain;
cp->wwv.select = SELV;
- sprintf(cp->wwv.refid, "WV%.0f", floor(qsy[i]));
+ snprintf(cp->wwv.refid, sizeof(cp->wwv.refid), "WV%.0f",
+ floor(qsy[i]));
cp->wwvh.select = SELH;
- sprintf(cp->wwvh.refid, "WH%.0f", floor(qsy[i]));
+ snprintf(cp->wwvh.refid, sizeof(cp->wwvh.refid), "WH%.0f",
+ floor(qsy[i]));
}
up->dchan = (DCHAN + NCHAN - 1) % NCHAN;
wwv_newchan(peer);
@@ -2573,7 +2572,7 @@ wwv_qsy(
struct wwvunit *up;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
if (up->fd_icom > 0) {
up->mitig[up->achan].gain = up->gain;
rval = icom_freq(up->fd_icom, peer->ttl & 0x7f,
@@ -2614,7 +2613,8 @@ wwv_qsy(
static int
timecode(
struct wwvunit *up, /* driver structure pointer */
- char *ptr /* target string */
+ char * tc, /* target string */
+ size_t tcsiz /* target max chars */
)
{
struct sync *sp;
@@ -2639,20 +2639,23 @@ timecode(
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);
+ snprintf(tc, tcsiz, "%c%1X", synchar, up->alarm);
+ snprintf(cptr, sizeof(cptr),
+ " %4d %03d %02d:%02d:%02d %c%c %+d",
+ year, day, hour, minute, second, leapchar, dst, dut);
+ strlcat(tc, cptr, tcsiz);
/*
* 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, sp->metric,
- up->errcnt, up->freq / SECOND * 1e6, up->avgint);
- strcat(ptr, cptr);
- return (strlen(ptr));
+ snprintf(cptr, sizeof(cptr), " %d %d %s %.0f %d %.1f %d",
+ up->watch, up->mitig[up->dchan].gain, sp->refid,
+ sp->metric, up->errcnt, up->freq / WWV_SEC * 1e6,
+ up->avgint);
+ strlcat(tc, cptr, tcsiz);
+
+ return strlen(tc);
}
@@ -2676,7 +2679,7 @@ wwv_gain(
struct wwvunit *up;
pp = peer->procptr;
- up = (struct wwvunit *)pp->unitptr;
+ up = pp->unitptr;
/*
* Apparently, the codec uses only the high order bits of the
diff --git a/ntpd/refclock_wwvb.c b/ntpd/refclock_wwvb.c
index 10bb63f6e389..75897fcc550b 100644
--- a/ntpd/refclock_wwvb.c
+++ b/ntpd/refclock_wwvb.c
@@ -199,7 +199,7 @@ wwvb_start(
up = emalloc_zero(sizeof(*up));
pp = peer->procptr;
pp->io.clock_recv = wwvb_receive;
- pp->io.srcclock = (void *)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
@@ -229,8 +229,8 @@ wwvb_shutdown(
struct peer *peer
)
{
- register struct wwvbunit *up;
- struct refclockproc *pp;
+ struct refclockproc * pp;
+ struct wwvbunit * up;
pp = peer->procptr;
up = pp->unitptr;
@@ -395,28 +395,28 @@ wwvb_receive(
*/
switch (qualchar) {
- case ' ':
+ case ' ':
pp->disp = .001;
pp->lastref = pp->lastrec;
break;
- case 'A':
+ case 'A':
pp->disp = .01;
break;
- case 'B':
+ case 'B':
pp->disp = .1;
break;
- case 'C':
+ case 'C':
pp->disp = .5;
break;
- case 'D':
+ case 'D':
pp->disp = MAXDISPERSE;
break;
- default:
+ default:
pp->disp = MAXDISPERSE;
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -455,7 +455,9 @@ wwvb_timer(
register struct wwvbunit *up;
struct refclockproc *pp;
char pollchar; /* character sent to clock */
+#ifdef DEBUG
l_fp now;
+#endif
/*
* Time to poll the clock. The Spectracom clock responds to a
@@ -591,9 +593,8 @@ wwvb_control(
return;
}
- NLOG(NLOG_CLOCKINFO)
- msyslog(LOG_WARNING, "%s flag1 1 but PPSAPI fails",
- refnumtoa(&peer->srcadr));
+ msyslog(LOG_WARNING, "%s flag1 1 but PPSAPI fails",
+ refnumtoa(&peer->srcadr));
}
#endif /* HAVE_PPSAPI */
diff --git a/ntpd/refclock_zyfer.c b/ntpd/refclock_zyfer.c
index ed83b2611fc7..7b79da32c97e 100644
--- a/ntpd/refclock_zyfer.c
+++ b/ntpd/refclock_zyfer.c
@@ -19,7 +19,9 @@
#include <stdio.h>
#include <ctype.h>
-#ifdef HAVE_SYS_TERMIOS_H
+#if defined(HAVE_TERMIOS_H)
+# include <termios.h>
+#elif defined(HAVE_SYS_TERMIOS_H)
# include <sys/termios.h>
#endif
#ifdef HAVE_SYS_PPSCLOCK_H
@@ -134,32 +136,30 @@ zyfer_start(
* 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);
+ snprintf(device, sizeof(device), DEVICE, unit);
+ fd = refclock_open(device, SPEED232, LDISC_RAW);
+ if (fd <= 0)
+ 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));
+ up = emalloc(sizeof(struct zyferunit));
+ memset(up, 0, sizeof(struct zyferunit));
pp = peer->procptr;
pp->io.clock_recv = zyfer_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd;
if (!io_addclock(&pp->io)) {
- (void) close(fd);
+ close(fd);
+ pp->io.fd = -1;
free(up);
return (0);
}
- pp->unitptr = (caddr_t)up;
+ pp->unitptr = up;
/*
* Initialize miscellaneous variables
@@ -187,9 +187,11 @@ zyfer_shutdown(
struct refclockproc *pp;
pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
- io_closeclock(&pp->io);
- free(up);
+ up = pp->unitptr;
+ if (pp->io.fd != -1)
+ io_closeclock(&pp->io);
+ if (up != NULL)
+ free(up);
}
@@ -208,20 +210,10 @@ zyfer_receive(
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;
+ peer = rbufp->recv_peer;
pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
+ up = pp->unitptr;
p = (u_char *) &rbufp->recv_space;
/*
* If lencode is 0:
@@ -290,14 +282,7 @@ zyfer_receive(
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;
@@ -332,7 +317,7 @@ zyfer_poll(
* side to capture a sample and check for timeouts.
*/
pp = peer->procptr;
- up = (struct zyferunit *)pp->unitptr;
+ up = pp->unitptr;
if (!up->pollcnt)
refclock_report(peer, CEVNT_TIMEOUT);
else
diff --git a/ntpdate/Makefile.am b/ntpdate/Makefile.am
index ea760af9bb77..774cf297884a 100644
--- a/ntpdate/Makefile.am
+++ b/ntpdate/Makefile.am
@@ -1,41 +1,40 @@
-NULL=
-AUTOMAKE_OPTIONS=
+NULL =
-BUILT_SOURCES=
-CLEANFILES=
+BUILT_SOURCES =
+CLEANFILES =
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= ntpdate
-else
-sbin_PROGRAMS= ntpdate
-endif
+bin_PROGRAMS = $(NTPDATE_DB)
+libexec_PROGRAMS = $(NTPDATE_DL)
+sbin_PROGRAMS = $(NTPDATE_DS)
-EXTRA_PROGRAMS= ntptimeset
+EXTRA_PROGRAMS = ntpdate
-ntptimeset_SOURCES= ntptimeset.c ntptime_config.c
+AM_CFLAGS = $(CFLAGS_NTP)
-AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
-LDADD= version.o ../libntp/libntp.a
-ntpdate_LDADD= $(LDADD) @LCRYPTO@
+LDADD = version.o ../libntp/libntp.a
+ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LIBOPTS_LDADD)
+ntpdate_LDADD += $(LIBM) $(LDADD_NTP)
DISTCLEANFILES= .version version.c stamp-v
noinst_HEADERS= ntpdate.h
-ETAGS_ARGS= Makefile.am
$(PROGRAMS): $(LDADD)
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-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
+version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/ntpdate/Makefile.in b/ntpdate/Makefile.in
index ee826612a60e..d7ffd18d2273 100644
--- a/ntpdate/Makefile.in
+++ b/ntpdate/Makefile.in
@@ -39,74 +39,125 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = ntpdate$(EXEEXT)
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = ntpdate$(EXEEXT)
-EXTRA_PROGRAMS = ntptimeset$(EXEEXT)
+EXTRA_PROGRAMS = ntpdate$(EXEEXT)
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf
subdir = ntpdate
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
ntpdate_SOURCES = ntpdate.c
ntpdate_OBJECTS = ntpdate.$(OBJEXT)
-ntpdate_DEPENDENCIES = $(LDADD)
-am_ntptimeset_OBJECTS = ntptimeset.$(OBJEXT) ntptime_config.$(OBJEXT)
-ntptimeset_OBJECTS = $(am_ntptimeset_OBJECTS)
-ntptimeset_LDADD = $(LDADD)
-ntptimeset_DEPENDENCIES = version.o ../libntp/libntp.a
+am__DEPENDENCIES_1 =
+ntpdate_DEPENDENCIES = $(LDADD) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = ntpdate.c $(ntptimeset_SOURCES)
-DIST_SOURCES = ntpdate.c $(ntptimeset_SOURCES)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = ntpdate.c
+DIST_SOURCES = ntpdate.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -118,21 +169,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -140,6 +201,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -158,14 +220,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -178,10 +294,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -189,9 +307,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -200,6 +336,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -248,27 +385,30 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
-BUILT_SOURCES = .deps-ver
-CLEANFILES = .deps-ver
-ntptimeset_SOURCES = ntptimeset.c ntptime_config.c
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include
-
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
+bin_PROGRAMS = $(NTPDATE_DB)
+libexec_PROGRAMS = $(NTPDATE_DL)
+sbin_PROGRAMS = $(NTPDATE_DS)
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
LDADD = version.o ../libntp/libntp.a
-ntpdate_LDADD = $(LDADD) @LCRYPTO@
+ntpdate_LDADD = $(LDADD) $(LDADD_LIBNTP) $(PTHREAD_LIBS) \
+ $(LIBOPTS_LDADD) $(LIBM) $(LDADD_NTP)
DISTCLEANFILES = .version version.c stamp-v
noinst_HEADERS = ntpdate.h
-ETAGS_ARGS = Makefile.am
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -341,6 +481,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -386,10 +569,7 @@ clean-sbinPROGRAMS:
rm -f $$list
ntpdate$(EXEEXT): $(ntpdate_OBJECTS) $(ntpdate_DEPENDENCIES)
@rm -f ntpdate$(EXEEXT)
- $(LINK) $(ntpdate_OBJECTS) $(ntpdate_LDADD) $(LIBS)
-ntptimeset$(EXEEXT): $(ntptimeset_OBJECTS) $(ntptimeset_DEPENDENCIES)
- @rm -f ntptimeset$(EXEEXT)
- $(LINK) $(ntptimeset_OBJECTS) $(ntptimeset_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpdate_OBJECTS) $(ntpdate_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -398,26 +578,27 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptime_config.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntptimeset.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -515,7 +696,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -549,8 +730,8 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -576,7 +757,8 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -617,56 +799,65 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
+ uninstall-sbinPROGRAMS
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-sbinPROGRAMS
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-info install-info-am \
+ install-libexecPROGRAMS install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinPROGRAMS install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS
$(PROGRAMS): $(LDADD)
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+version.c: $(ntpdate_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdate
-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
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -675,17 +866,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -694,7 +878,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/ntpdate/ntpdate.c b/ntpdate/ntpdate.c
index 7686b41a1b29..16569f30b5f4 100644
--- a/ntpdate/ntpdate.c
+++ b/ntpdate/ntpdate.c
@@ -14,13 +14,12 @@
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_io.h"
-#include "ntp_unixtime.h"
+#include "timevalops.h"
#include "ntpdate.h"
#include "ntp_string.h"
#include "ntp_syslog.h"
#include "ntp_select.h"
#include "ntp_stdlib.h"
-#include "ntp_assert.h"
#include <ssl_applink.c>
#include "isc/net.h"
@@ -111,11 +110,6 @@ static timer_t ntpdate_timerid;
s_char sys_precision; /* local clock precision (log2 s) */
/*
- * Debugging flag
- */
-volatile int debug = 0;
-
-/*
* File descriptor masks etc. for call to select
*/
@@ -330,7 +324,7 @@ ntpdatemain (
key_file = key_file_storage;
if (!ExpandEnvironmentStrings(KEYFILE, key_file, MAX_PATH))
- msyslog(LOG_ERR, "ExpandEnvironmentStrings(KEYFILE) failed: %m\n");
+ msyslog(LOG_ERR, "ExpandEnvironmentStrings(KEYFILE) failed: %m");
ssl_applink();
#endif /* SYS_WINNT */
@@ -834,7 +828,7 @@ receive(
if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode) &&
STRATUM_PKT_UNSPEC == rpkt->stratum &&
!memcmp("RATE", &rpkt->refid, 4)) {
- msyslog(LOG_ERR, "%s rate limit response from server.\n",
+ msyslog(LOG_ERR, "%s rate limit response from server.",
stoa(&rbufp->recv_srcadr));
server->event_time = 0;
complete_servers++;
@@ -1358,7 +1352,7 @@ addserver(
char service[5];
sockaddr_u addr;
- strncpy(service, "ntp", sizeof(service));
+ strlcpy(service, "ntp", sizeof(service));
/* Get host address. Looking for UDP datagram connection. */
ZERO(hints);
@@ -1379,13 +1373,13 @@ addserver(
by waiting for resolution of several servers */
fprintf(stderr, "Exiting, name server cannot be used: %s (%d)",
gai_strerror(error), error);
- msyslog(LOG_ERR, "name server cannot be used: %s (%d)\n",
+ msyslog(LOG_ERR, "name server cannot be used: %s (%d)",
gai_strerror(error), error);
exit(1);
}
fprintf(stderr, "Error resolving %s: %s (%d)\n", serv,
gai_strerror(error), error);
- msyslog(LOG_ERR, "Can't find host %s: %s (%d)\n", serv,
+ msyslog(LOG_ERR, "Can't find host %s: %s (%d)", serv,
gai_strerror(error), error);
return;
}
@@ -1695,7 +1689,7 @@ init_io(void)
* Open the socket
*/
- strncpy(service, "ntp", sizeof(service));
+ strlcpy(service, "ntp", sizeof(service));
/*
* Init hints addrinfo structure
@@ -2044,7 +2038,7 @@ l_adj_systime(
if (adjtv.tv_usec != 0 && !debug) {
if (adjtime(&adjtv, &oadjtv) < 0) {
msyslog(LOG_ERR, "Can't adjust the time of day: %m");
- return 0;
+ exit(1);
}
}
return 1;
diff --git a/ntpdate/ntpdate.h b/ntpdate/ntpdate.h
index 75fba4291065..df9c49eb4a22 100644
--- a/ntpdate/ntpdate.h
+++ b/ntpdate/ntpdate.h
@@ -89,10 +89,13 @@ struct server {
/*
- * Some defaults
+ * No less than 2s between requests to a server to stay within ntpd's
+ * default "discard minimum 1" (and 1s enforcement slop). That is
+ * enforced only if the nondefault limited restriction is in place, such
+ * as with "restrict ... limited" and "restrict ... kod limited".
*/
-#define MINTIMEOUT (2 * TIMER_HZ) /* 2s min. between packets */
-#define DEFTIMEOUT MINTIMEOUT /* (to the same server) */
+#define MINTIMEOUT (1 * TIMER_HZ) /* 1s min. between packets */
+#define DEFTIMEOUT (2 * TIMER_HZ) /* 2s by default */
#define DEFSAMPLES 4 /* get 4 samples per server */
#define DEFPRECISION (-5) /* the precision we claim */
#define DEFMAXPERIOD 60 /* maximum time to wait */
diff --git a/ntpdate/ntptime_config.c b/ntpdate/ntptime_config.c
deleted file mode 100644
index e784d28034f0..000000000000
--- a/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/ntpdate/ntptimeset.c b/ntpdate/ntptimeset.c
deleted file mode 100644
index 2485aadb6b05..000000000000
--- a/ntpdate/ntptimeset.c
+++ /dev/null
@@ -1,2164 +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
-# 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;
- int tot_recvbufs;
- 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;
- 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
-
- tot_recvbufs = full_recvbuffs(); /* get received buffers */
- if (printmsg) {
- printmsg = 0;
- analysis(0);
- }
- if (alarm_flag) { /* alarmed? */
- was_alarmed = 1;
- alarm_flag = 0;
- }
-
- if (!was_alarmed && tot_recvbufs > 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;
- }
- tot_recvbufs = full_recvbuffs(); /* 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.
- */
- rbuf = get_full_recv_buffer();
- while (rbuf != NULL)
- {
- receive(rbuf);
- freerecvbuf(rbuf);
- rbuf = get_full_recv_buffer();
- }
-
- /*
- * 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/ntpdc/Makefile.am b/ntpdc/Makefile.am
index 00aeffb8033d..a61dab99df3e 100644
--- a/ntpdc/Makefile.am
+++ b/ntpdc/Makefile.am
@@ -1,38 +1,80 @@
NULL=
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= ntpdc
-else
-sbin_PROGRAMS= ntpdc
-endif
+bin_PROGRAMS= $(NTPDC_DB)
+libexec_PROGRAMS= $(NTPDC_DL)
+sbin_PROGRAMS= $(NTPDC_DS)
-EXTRA_PROGRAMS= ntpdc-layout
+EXTRA_PROGRAMS= ntpdc ntpdc-layout
EXTRA_DATA= check-layout
BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h
-AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD= version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- @EDITLINE_LIBS@ @LCRYPTO@
+ntpdc_LDADD = version.o $(LIBOPTS_LDADD)
+ntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
+ntpdc_LDADD += $(LDADD_NTP)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
-DISTCLEANFILES= .version version.c
+
+DISTCLEANFILES= .version version.c config.log $(man_MANS)
CLEANFILES= check-layout layout.here nl.c ntpdc-layout
noinst_HEADERS= ntpdc.h
ETAGS_ARGS= Makefile.am
-EXTRA_DIST= nl_in.c nl.pl layout.std \
- ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
-man_MANS= $(srcdir)/ntpdc.1
-noinst_DATA= $(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+EXTRA_DIST= \
+ invoke-ntpdc.menu \
+ invoke-ntpdc.texi \
+ layout.std \
+ nl_in.c \
+ nl.pl \
+ ntpdc-opts.def \
+ ntpdc.1ntpdcman \
+ ntpdc.1ntpdcmdoc \
+ ntpdc.man.in \
+ ntpdc.mdoc.in \
+ ntpdc.html \
+ ntpdc.texi \
+ $(NULL)
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntpdc.$(NTPDC_MS)
+
+## HMS: Real Soon Now...
+##info_TEXINFOS= ntpdc.texi
+##ntpdc_TEXINFOS= ntpdc-opts.texi
+
+html_DATA= \
+ $(srcdir)/ntpdc.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntpdc.menu \
+ $(srcdir)/invoke-ntpdc.texi \
+ $(srcdir)/ntpdc.man.in \
+ $(srcdir)/ntpdc.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
$(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
@@ -40,15 +82,41 @@ $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) ntpdc-opts.def
-$(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
+###
-$(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.texi
+$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
+ mv $(srcdir)/ntpdc.man.in+ $(srcdir)/ntpdc.man.in
+
+###
+
+$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
+ mv $(srcdir)/ntpdc.mdoc.in+ $(srcdir)/ntpdc.mdoc.in
+
+###
+
+ntpdc.$(NTPDC_MS): $(srcdir)/ntpdc.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpdc.$(NTPDC_MS)+:$(srcdir)/ntpdc.$(MANTAGFMT).in
+ mv ntpdc.$(NTPDC_MS)+ ntpdc.$(NTPDC_MS)
+
+###
+
+$(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpdc-opts.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
@@ -60,17 +128,16 @@ layout.here: ntpdc-layout
check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(PROGRAMS): $(LDADD)
+$(PROGRAMS): version.o
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
-
-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
+version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
@@ -78,4 +145,7 @@ nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
$(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/ntpdc/Makefile.in b/ntpdc/Makefile.in
index 39ddb0fd3b4b..1b77fc9dec56 100644
--- a/ntpdc/Makefile.in
+++ b/ntpdc/Makefile.in
@@ -40,56 +40,99 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = ntpdc$(EXEEXT)
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = ntpdc$(EXEEXT)
-EXTRA_PROGRAMS = ntpdc-layout$(EXEEXT)
+EXTRA_PROGRAMS = ntpdc$(EXEEXT) ntpdc-layout$(EXEEXT)
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/nl.pl.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf
subdir = ntpdc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = nl.pl
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpdc_OBJECTS = ntpdc.$(OBJEXT) ntpdc_ops.$(OBJEXT) \
ntpdc-opts.$(OBJEXT)
ntpdc_OBJECTS = $(am_ntpdc_OBJECTS)
am__DEPENDENCIES_1 =
ntpdc_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \
- ../libntp/libntp.a
+ ../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
ntpdc_layout_SOURCES = ntpdc-layout.c
ntpdc_layout_OBJECTS = ntpdc-layout.$(OBJEXT)
ntpdc_layout_DEPENDENCIES =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
DIST_SOURCES = $(ntpdc_SOURCES) ntpdc-layout.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -114,28 +157,41 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -147,21 +203,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -169,6 +235,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -187,14 +254,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -207,10 +328,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -218,9 +341,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -229,6 +370,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -277,45 +419,78 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
+bin_PROGRAMS = $(NTPDC_DB)
+libexec_PROGRAMS = $(NTPDC_DL)
+sbin_PROGRAMS = $(NTPDC_DS)
EXTRA_DATA = check-layout
BUILT_SOURCES = @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h \
- .deps-ver
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+ check-libopts check-libntp .deps-ver
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
ntpdc_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- @EDITLINE_LIBS@ @LCRYPTO@
-
+ $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) \
+ $(LDADD_NTP)
# 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 .deps-ver
+DISTCLEANFILES = .version version.c config.log $(man_MANS)
+CLEANFILES = check-layout layout.here nl.c ntpdc-layout check-libopts \
+ check-libntp .deps-ver
noinst_HEADERS = ntpdc.h
ETAGS_ARGS = Makefile.am
-EXTRA_DIST = nl_in.c nl.pl layout.std \
- ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
-
-man_MANS = $(srcdir)/ntpdc.1
-noinst_DATA = $(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-
-std_def_list = $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+EXTRA_DIST = \
+ invoke-ntpdc.menu \
+ invoke-ntpdc.texi \
+ layout.std \
+ nl_in.c \
+ nl.pl \
+ ntpdc-opts.def \
+ ntpdc.1ntpdcman \
+ ntpdc.1ntpdcmdoc \
+ ntpdc.man.in \
+ ntpdc.mdoc.in \
+ ntpdc.html \
+ ntpdc.texi \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+man_MANS = ntpdc.$(NTPDC_MS)
+html_DATA = \
+ $(srcdir)/ntpdc.html \
+ $(NULL)
+
+noinst_DATA = \
+ $(srcdir)/invoke-ntpdc.menu \
+ $(srcdir)/invoke-ntpdc.texi \
+ $(srcdir)/ntpdc.man.in \
+ $(srcdir)/ntpdc.mdoc.in \
+ $(NULL)
+
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -390,6 +565,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -435,10 +653,10 @@ clean-sbinPROGRAMS:
rm -f $$list
ntpdc$(EXEEXT): $(ntpdc_OBJECTS) $(ntpdc_DEPENDENCIES)
@rm -f ntpdc$(EXEEXT)
- $(LINK) $(ntpdc_OBJECTS) $(ntpdc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpdc_OBJECTS) $(ntpdc_LDADD) $(LIBS)
ntpdc-layout$(EXEEXT): $(ntpdc_layout_OBJECTS) $(ntpdc_layout_DEPENDENCIES)
@rm -f ntpdc-layout$(EXEEXT)
- $(LINK) $(ntpdc_layout_OBJECTS) $(ntpdc_layout_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpdc_layout_OBJECTS) $(ntpdc_layout_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -452,22 +670,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdc_ops.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -477,10 +698,10 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -506,7 +727,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -515,6 +736,64 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -616,7 +895,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -650,8 +929,8 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -671,13 +950,14 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-data-local install-htmlDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -688,7 +968,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man8
install-pdf: install-pdf-am
@@ -718,29 +998,34 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man8
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-man1 \
+ install-htmlDATA install-info install-info-am \
+ install-libexecPROGRAMS install-man install-man1 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
+ uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinPROGRAMS
+
+install-data-local: install-html
$(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
@@ -748,15 +1033,41 @@ $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) ntpdc-opts.def
-$(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
+###
+
+$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
+ mv $(srcdir)/ntpdc.man.in+ $(srcdir)/ntpdc.man.in
+
+###
+
+$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
+ mv $(srcdir)/ntpdc.mdoc.in+ $(srcdir)/ntpdc.mdoc.in
+
+###
+
+ntpdc.$(NTPDC_MS): $(srcdir)/ntpdc.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpdc.$(NTPDC_MS)+:$(srcdir)/ntpdc.$(MANTAGFMT).in
+ mv ntpdc.$(NTPDC_MS)+ ntpdc.$(NTPDC_MS)
-$(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.texi
+###
+
+$(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpdc-opts.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc-layout.o: nl.c
@@ -766,17 +1077,16 @@ layout.here: ntpdc-layout
check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(PROGRAMS): $(LDADD)
+$(PROGRAMS): version.o
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
-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
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
@@ -784,23 +1094,37 @@ nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
$(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -809,17 +1133,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -828,7 +1145,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/ntpdc/ntpdc-opts.menu b/ntpdc/invoke-ntpdc.menu
index 42ca3b42be82..42ca3b42be82 100644
--- a/ntpdc/ntpdc-opts.menu
+++ b/ntpdc/invoke-ntpdc.menu
diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi
new file mode 100644
index 000000000000..cc97163ccf0c
--- /dev/null
+++ b/ntpdc/invoke-ntpdc.texi
@@ -0,0 +1,349 @@
+@node ntpdc Invocation
+@section Invoking ntpdc
+@pindex ntpdc
+@cindex vendor-specific NTPD control program
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:49:42 AM by AutoGen 5.18.5pre4
+# From the definitions ntpdc-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{ntpdc}
+is deprecated.
+Please use
+@code{ntpq(1ntpqmdoc)} instead - it can do everything
+@code{ntpdc}
+used to do, and it does so using a much more sane interface.
+
+@code{ntpdc}
+is a utility program used to query
+@code{ntpd(1ntpdmdoc)}
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+@code{ntpdc}
+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
+@code{ntpdc}
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntpdc usage:: ntpdc help/usage (@option{--help})
+* ntpdc ipv4:: ipv4 option (-4)
+* ntpdc ipv6:: ipv6 option (-6)
+* ntpdc command:: command option (-c)
+* ntpdc interactive:: interactive option (-i)
+* ntpdc listpeers:: listpeers option (-l)
+* ntpdc numeric:: numeric option (-n)
+* ntpdc peers:: peers option (-p)
+* ntpdc showpeers:: showpeers option (-s)
+* ntpdc config:: presetting/configuring ntpdc
+* ntpdc exit status:: exit status
+* ntpdc Usage:: Usage
+* ntpdc See Also:: See Also
+* ntpdc Authors:: Authors
+* ntpdc Bugs:: Bugs
+@end menu
+
+@node ntpdc usage
+@subsection ntpdc help/usage (@option{--help})
+@cindex ntpdc help
+
+This is the automatically generated usage text for ntpdc.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8
+Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -c Str command run a command and exit
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -i no interactive Force ntpq to operate in interactive mode
+ - prohibits these options:
+ command
+ listpeers
+ peers
+ showpeers
+ -l no listpeers Print a list of the peers
+ - prohibits the option 'command'
+ -n no numeric numeric host addresses
+ -p no peers Print a list of the peers
+ - prohibits the option 'command'
+ -s no showpeers Show a list of the peers
+ - prohibits the option 'command'
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -> opt save-opts save the option state to a config file
+ -< Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTPDC_*
+
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+@end example
+@exampleindent 4
+
+@node ntpdc ipv4
+@subsection ipv4 option (-4)
+@cindex ntpdc-ipv4
+
+This is the ``force ipv4 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv6.
+@end itemize
+
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+@node ntpdc ipv6
+@subsection ipv6 option (-6)
+@cindex ntpdc-ipv6
+
+This is the ``force ipv6 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv4.
+@end itemize
+
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+@node ntpdc command
+@subsection command option (-c)
+@cindex ntpdc-command
+
+This is the ``run a command and exit'' option.
+This option takes a string argument @file{cmd}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+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).
+@node ntpdc interactive
+@subsection interactive option (-i)
+@cindex ntpdc-interactive
+
+This is the ``force ntpq to operate in interactive mode'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+@end itemize
+
+Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+@node ntpdc listpeers
+@subsection listpeers option (-l)
+@cindex ntpdc-listpeers
+
+This is the ``print a list of the peers'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+command.
+@end itemize
+
+Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+@node ntpdc numeric
+@subsection numeric option (-n)
+@cindex ntpdc-numeric
+
+This is the ``numeric host addresses'' option.
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+@node ntpdc peers
+@subsection peers option (-p)
+@cindex ntpdc-peers
+
+This is the ``print a list of the peers'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+command.
+@end itemize
+
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+@node ntpdc showpeers
+@subsection showpeers option (-s)
+@cindex ntpdc-showpeers
+
+This is the ``show a list of the peers'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+command.
+@end itemize
+
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+
+
+@node ntpdc config
+@subsection presetting/configuring ntpdc
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTPDC} and @code{NTPDC_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{NTPDC} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+@noindent
+@code{libopts} will search in 2 places for configuration files:
+@itemize @bullet
+@item
+$HOME
+@item
+$PWD
+@end itemize
+The environment variables @code{HOME}, and @code{PWD}
+are expanded and replaced when @file{ntpdc} runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named @file{.ntprc} is searched for
+within that directory and processed.
+
+Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+@example
+[NTPDC]
+@end example
+@noindent
+or by
+@example
+<?program ntpdc>
+@end example
+@noindent
+Do not mix these styles within one configuration file.
+
+Compound values and carefully constructed string values may also be
+specified using XML syntax:
+@example
+<option-name>
+ <sub-opt>...&lt;...&gt;...</sub-opt>
+</option-name>
+@end example
+@noindent
+yielding an @code{option-name.sub-opt} string value of
+@example
+"...<...>..."
+@end example
+@code{AutoOpts} does not track suboptions. You simply note that it is a
+hierarchicly valued option. @code{AutoOpts} does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node ntpdc exit status
+@subsection ntpdc exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@item 66 (EX_NOINPUT)
+A specified configuration file could not be loaded.
+@item 70 (EX_SOFTWARE)
+libopts had an internal operational error. Please report
+it to autogen-users@@lists.sourceforge.net. Thank you.
+@end table
+@node ntpdc Usage
+@subsection ntpdc Usage
+@node ntpdc See Also
+@subsection ntpdc See Also
+@node ntpdc Authors
+@subsection ntpdc Authors
+@node ntpdc Bugs
+@subsection ntpdc Bugs
diff --git a/ntpdc/layout.std b/ntpdc/layout.std
index 8d538d15f451..6117f5215f2c 100644
--- a/ntpdc/layout.std
+++ b/ntpdc/layout.std
@@ -1,3 +1,7 @@
+sizeof(union req_data_u_tag) = 176
+offsetof(u32) = 0
+offsetof(data) = 0
+
sizeof(struct req_pkt) = 216
offsetof(rm_vn_mode) = 0
offsetof(auth_seq) = 1
@@ -5,7 +9,7 @@ offsetof(implementation) = 2
offsetof(request) = 3
offsetof(err_nitems) = 4
offsetof(mbz_itemsize) = 6
-offsetof(data) = 8
+offsetof(u) = 8
offsetof(tstamp) = 184
offsetof(keyid) = 192
offsetof(mac) = 196
@@ -15,6 +19,10 @@ offsetof(tstamp) = 0
offsetof(keyid) = 8
offsetof(mac) = 12
+sizeof(union resp_pkt_u_tag) = 500
+offsetof(data) = 0
+offsetof(u32) = 0
+
sizeof(struct resp_pkt) = 508
offsetof(rm_vn_mode) = 0
offsetof(auth_seq) = 1
@@ -22,7 +30,7 @@ offsetof(implementation) = 2
offsetof(request) = 3
offsetof(err_nitems) = 4
offsetof(mbz_itemsize) = 6
-offsetof(data) = 8
+offsetof(u) = 8
sizeof(struct info_peer_list) = 32
offsetof(addr) = 0
@@ -269,8 +277,8 @@ offsetof(addr6) = 16
offsetof(mask6) = 32
sizeof(struct info_monitor_1) = 72
-offsetof(lasttime) = 0
-offsetof(firsttime) = 4
+offsetof(avg_int) = 0
+offsetof(last_int) = 4
offsetof(restr) = 8
offsetof(count) = 12
offsetof(addr) = 16
@@ -285,8 +293,8 @@ offsetof(addr6) = 40
offsetof(daddr6) = 56
sizeof(struct info_monitor) = 48
-offsetof(lasttime) = 0
-offsetof(firsttime) = 4
+offsetof(avg_int) = 0
+offsetof(last_int) = 4
offsetof(restr) = 8
offsetof(count) = 12
offsetof(addr) = 16
diff --git a/ntpdc/nl.pl b/ntpdc/nl.pl
index 57d6d53a6df6..4a418fbcb0dc 100755
--- a/ntpdc/nl.pl
+++ b/ntpdc/nl.pl
@@ -7,7 +7,7 @@ $debug = 0;
while (<>) {
next if /^#/;
next if /^\s*$/;
- if (/^struct req_pkt/) {
+ if (/^typedef union req_data_u_tag/) {
$found = 1;
}
if (/^struct info_dns_assoc/) {
@@ -20,13 +20,19 @@ while (<>) {
printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
next;
}
+ if (/^typedef (union\s*\w*)\s*{\s*$/) {
+ $type = $1;
+ print STDERR "union = '$type'\n" if $debug;
+ printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
+ next;
+ }
if (/\s*\w+\s+(\w*)\s*(\[.*\])?\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 (/^}\s*;\s*$/) {
+ if (/^}\s*\w*\s*;\s*$/) {
printf " printf(\"\\n\");\n\n";
$found = 0 if $last;
next;
diff --git a/ntpdc/nl.pl.in b/ntpdc/nl.pl.in
index 813dc1f10df4..8007538dc056 100644
--- a/ntpdc/nl.pl.in
+++ b/ntpdc/nl.pl.in
@@ -7,7 +7,7 @@ $debug = 0;
while (<>) {
next if /^#/;
next if /^\s*$/;
- if (/^struct req_pkt/) {
+ if (/^typedef union req_data_u_tag/) {
$found = 1;
}
if (/^struct info_dns_assoc/) {
@@ -20,13 +20,19 @@ while (<>) {
printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
next;
}
+ if (/^typedef (union\s*\w*)\s*{\s*$/) {
+ $type = $1;
+ print STDERR "union = '$type'\n" if $debug;
+ printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
+ next;
+ }
if (/\s*\w+\s+(\w*)\s*(\[.*\])?\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 (/^}\s*;\s*$/) {
+ if (/^}\s*\w*\s*;\s*$/) {
printf " printf(\"\\n\");\n\n";
$found = 0 if $last;
next;
diff --git a/ntpdc/ntpdc-layout.c b/ntpdc/ntpdc-layout.c
index b05fbf3848e7..01714888416c 100644
--- a/ntpdc/ntpdc-layout.c
+++ b/ntpdc/ntpdc-layout.c
@@ -2,6 +2,7 @@
* ntpdc-layout - print layout of NTP mode 7 request/response packets
*/
+#include <config.h>
#include <stdio.h>
#include <stddef.h>
diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c
index d84268d9b66b..11ba2cce359e 100644
--- a/ntpdc/ntpdc-opts.c
+++ b/ntpdc/ntpdc-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:16 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:49:26 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,35 +15,42 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpdc program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ntpdc-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#define OPTION_CODE_COMPILE 1
-#include "ntpdc-opts.h"
-
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
-
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[39] =
-"ntpdc 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
+#define zCopyright (ntpdc_opt_strs+0)
+#define zLicenseDescrip (ntpdc_opt_strs+311)
/*
* global included definitions
@@ -58,200 +65,272 @@ extern tUsageProc optionUsage;
# define NULL 0
#endif
-/*
- * Ipv4 option description with
+/**
+ * static const strings for ntpdc options
+ */
+static char const ntpdc_opt_strs[1849] =
+/* 0 */ "ntpdc 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 311 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 951 */ "Force IPv4 DNS name resolution\0"
+/* 982 */ "IPV4\0"
+/* 987 */ "ipv4\0"
+/* 992 */ "Force IPv6 DNS name resolution\0"
+/* 1023 */ "IPV6\0"
+/* 1028 */ "ipv6\0"
+/* 1033 */ "run a command and exit\0"
+/* 1056 */ "COMMAND\0"
+/* 1064 */ "command\0"
+/* 1072 */ "Increase debug verbosity level\0"
+/* 1103 */ "DEBUG_LEVEL\0"
+/* 1115 */ "debug-level\0"
+/* 1127 */ "Set the debug verbosity level\0"
+/* 1157 */ "SET_DEBUG_LEVEL\0"
+/* 1173 */ "set-debug-level\0"
+/* 1189 */ "Force ntpq to operate in interactive mode\0"
+/* 1231 */ "INTERACTIVE\0"
+/* 1243 */ "interactive\0"
+/* 1255 */ "Print a list of the peers\0"
+/* 1281 */ "LISTPEERS\0"
+/* 1291 */ "listpeers\0"
+/* 1301 */ "numeric host addresses\0"
+/* 1324 */ "NUMERIC\0"
+/* 1332 */ "numeric\0"
+/* 1340 */ "PEERS\0"
+/* 1346 */ "peers\0"
+/* 1352 */ "Show a list of the peers\0"
+/* 1377 */ "SHOWPEERS\0"
+/* 1387 */ "showpeers\0"
+/* 1397 */ "display extended usage information and exit\0"
+/* 1441 */ "help\0"
+/* 1446 */ "extended usage information passed thru pager\0"
+/* 1491 */ "more-help\0"
+/* 1501 */ "output version information and exit\0"
+/* 1537 */ "version\0"
+/* 1545 */ "save the option state to a config file\0"
+/* 1584 */ "save-opts\0"
+/* 1594 */ "load options from a config file\0"
+/* 1626 */ "LOAD_OPTS\0"
+/* 1636 */ "no-load-opts\0"
+/* 1649 */ "no\0"
+/* 1652 */ "NTPDC\0"
+/* 1658 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
+/* 1786 */ "$HOME\0"
+/* 1792 */ ".\0"
+/* 1794 */ ".ntprc\0"
+/* 1801 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1835 */ "\n\0"
+/* 1837 */ "ntpdc 4.2.8";
+
+/**
+ * ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv4Text[] =
- "Force IPv4 DNS name resolution";
-static char const zIpv4_NAME[] = "IPV4";
-static char const zIpv4_Name[] = "ipv4";
-static const int
- aIpv4CantList[] = {
+/** Descriptive text for the ipv4 option */
+#define IPV4_DESC (ntpdc_opt_strs+951)
+/** Upper-cased name for the ipv4 option */
+#define IPV4_NAME (ntpdc_opt_strs+982)
+/** Name string for the ipv4 option */
+#define IPV4_name (ntpdc_opt_strs+987)
+/** Other options that appear in conjunction with the ipv4 option */
+static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
-#define IPV4_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv4 option */
+#define IPV4_FLAGS (OPTST_DISABLED)
-/*
- * Ipv6 option description with
+/**
+ * ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv6Text[] =
- "Force IPv6 DNS name resolution";
-static char const zIpv6_NAME[] = "IPV6";
-static char const zIpv6_Name[] = "ipv6";
-static const int
- aIpv6CantList[] = {
+/** Descriptive text for the ipv6 option */
+#define IPV6_DESC (ntpdc_opt_strs+992)
+/** Upper-cased name for the ipv6 option */
+#define IPV6_NAME (ntpdc_opt_strs+1023)
+/** Name string for the ipv6 option */
+#define IPV6_name (ntpdc_opt_strs+1028)
+/** Other options that appear in conjunction with the ipv6 option */
+static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
-#define IPV6_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv6 option */
+#define IPV6_FLAGS (OPTST_DISABLED)
-/*
- * Command option description:
+/**
+ * command option description:
*/
-static char const zCommandText[] =
- "run a command and exit";
-static char const zCommand_NAME[] = "COMMAND";
-static char const zCommand_Name[] = "command";
-#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
+/** Descriptive text for the command option */
+#define COMMAND_DESC (ntpdc_opt_strs+1033)
+/** Upper-cased name for the command option */
+#define COMMAND_NAME (ntpdc_opt_strs+1056)
+/** Name string for the command option */
+#define COMMAND_name (ntpdc_opt_strs+1064)
+/** Compiled in flag settings for the command option */
+#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Listpeers option description with
- * "Must also have options" and "Incompatible options":
+/**
+ * debug-level option description:
*/
-static char const zListpeersText[] =
- "Print a list of the peers";
-static char const zListpeers_NAME[] = "LISTPEERS";
-static char const zListpeers_Name[] = "listpeers";
-static const int
- aListpeersCantList[] = {
- INDEX_OPT_COMMAND, NO_EQUIVALENT };
-#define LISTPEERS_FLAGS (OPTST_DISABLED)
-
-/*
- * Peers option description with
- * "Must also have options" and "Incompatible options":
+/** Descriptive text for the debug-level option */
+#define DEBUG_LEVEL_DESC (ntpdc_opt_strs+1072)
+/** Upper-cased name for the debug-level option */
+#define DEBUG_LEVEL_NAME (ntpdc_opt_strs+1103)
+/** Name string for the debug-level option */
+#define DEBUG_LEVEL_name (ntpdc_opt_strs+1115)
+/** Compiled in flag settings for the debug-level option */
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/**
+ * set-debug-level option description:
*/
-static char const zPeersText[] =
- "Print a list of the peers";
-static char const zPeers_NAME[] = "PEERS";
-static char const zPeers_Name[] = "peers";
-static const int
- aPeersCantList[] = {
- INDEX_OPT_COMMAND, NO_EQUIVALENT };
-#define PEERS_FLAGS (OPTST_DISABLED)
-
-/*
- * Showpeers option description with
- * "Must also have options" and "Incompatible options":
- */
-static char const zShowpeersText[] =
- "Show a list of the peers";
-static char const zShowpeers_NAME[] = "SHOWPEERS";
-static char const zShowpeers_Name[] = "showpeers";
-static const int
- aShowpeersCantList[] = {
- INDEX_OPT_COMMAND, NO_EQUIVALENT };
-#define SHOWPEERS_FLAGS (OPTST_DISABLED)
-
-/*
- * Interactive option description with
+/** Descriptive text for the set-debug-level option */
+#define SET_DEBUG_LEVEL_DESC (ntpdc_opt_strs+1127)
+/** Upper-cased name for the set-debug-level option */
+#define SET_DEBUG_LEVEL_NAME (ntpdc_opt_strs+1157)
+/** Name string for the set-debug-level option */
+#define SET_DEBUG_LEVEL_name (ntpdc_opt_strs+1173)
+/** Compiled in flag settings for the set-debug-level option */
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/**
+ * interactive option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zInteractiveText[] =
- "Force ntpq to operate in interactive mode";
-static char const zInteractive_NAME[] = "INTERACTIVE";
-static char const zInteractive_Name[] = "interactive";
-static const int
- aInteractiveCantList[] = {
+/** Descriptive text for the interactive option */
+#define INTERACTIVE_DESC (ntpdc_opt_strs+1189)
+/** Upper-cased name for the interactive option */
+#define INTERACTIVE_NAME (ntpdc_opt_strs+1231)
+/** Name string for the interactive option */
+#define INTERACTIVE_name (ntpdc_opt_strs+1243)
+/** Other options that appear in conjunction with the interactive option */
+static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
INDEX_OPT_LISTPEERS,
INDEX_OPT_PEERS,
INDEX_OPT_SHOWPEERS, NO_EQUIVALENT };
-#define INTERACTIVE_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the interactive option */
+#define INTERACTIVE_FLAGS (OPTST_DISABLED)
-/*
- * Debug_Level option description:
+/**
+ * listpeers option description with
+ * "Must also have options" and "Incompatible options":
*/
-static char const zDebug_LevelText[] =
- "Increase output debug message level";
-static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
-static char const zDebug_Level_Name[] = "debug-level";
-#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the listpeers option */
+#define LISTPEERS_DESC (ntpdc_opt_strs+1255)
+/** Upper-cased name for the listpeers option */
+#define LISTPEERS_NAME (ntpdc_opt_strs+1281)
+/** Name string for the listpeers option */
+#define LISTPEERS_name (ntpdc_opt_strs+1291)
+/** Other options that appear in conjunction with the listpeers option */
+static int const aListpeersCantList[] = {
+ INDEX_OPT_COMMAND, NO_EQUIVALENT };
+/** Compiled in flag settings for the listpeers option */
+#define LISTPEERS_FLAGS (OPTST_DISABLED)
-/*
- * Set_Debug_Level option description:
+/**
+ * numeric option description:
*/
-static char const zSet_Debug_LevelText[] =
- "Set the output debug message level";
-static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-static char const zSet_Debug_Level_Name[] = "set-debug-level";
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+/** Descriptive text for the numeric option */
+#define NUMERIC_DESC (ntpdc_opt_strs+1301)
+/** Upper-cased name for the numeric option */
+#define NUMERIC_NAME (ntpdc_opt_strs+1324)
+/** Name string for the numeric option */
+#define NUMERIC_name (ntpdc_opt_strs+1332)
+/** Compiled in flag settings for the numeric option */
+#define NUMERIC_FLAGS (OPTST_DISABLED)
+
+/**
+ * peers option description with
+ * "Must also have options" and "Incompatible options":
+ */
+/** Descriptive text for the peers option */
+#define PEERS_DESC (ntpdc_opt_strs+1255)
+/** Upper-cased name for the peers option */
+#define PEERS_NAME (ntpdc_opt_strs+1340)
+/** Name string for the peers option */
+#define PEERS_name (ntpdc_opt_strs+1346)
+/** Other options that appear in conjunction with the peers option */
+static int const aPeersCantList[] = {
+ INDEX_OPT_COMMAND, NO_EQUIVALENT };
+/** Compiled in flag settings for the peers option */
+#define PEERS_FLAGS (OPTST_DISABLED)
-/*
- * Numeric option description:
+/**
+ * showpeers option description with
+ * "Must also have options" and "Incompatible options":
*/
-static char const zNumericText[] =
- "numeric host addresses";
-static char const zNumeric_NAME[] = "NUMERIC";
-static char const zNumeric_Name[] = "numeric";
-#define NUMERIC_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the showpeers option */
+#define SHOWPEERS_DESC (ntpdc_opt_strs+1352)
+/** Upper-cased name for the showpeers option */
+#define SHOWPEERS_NAME (ntpdc_opt_strs+1377)
+/** Name string for the showpeers option */
+#define SHOWPEERS_name (ntpdc_opt_strs+1387)
+/** Other options that appear in conjunction with the showpeers option */
+static int const aShowpeersCantList[] = {
+ INDEX_OPT_COMMAND, NO_EQUIVALENT };
+/** Compiled in flag settings for the showpeers option */
+#define SHOWPEERS_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (ntpdc_opt_strs+1397)
+#define HELP_name (ntpdc_opt_strs+1441)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (ntpdc_opt_strs+1446)
+#define MORE_HELP_name (ntpdc_opt_strs+1491)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-static char const zSave_OptsText[] = "Save the option state to a config file";
-static char const zSave_Opts_Name[] = "save-opts";
-static char const zLoad_OptsText[] = "Load options from a config file";
-static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
-static char const zNotLoad_Opts_Name[] = "no-load-opts";
-static char const zNotLoad_Opts_Pfx[] = "no";
-#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
-/*
+#define VER_DESC (ntpdc_opt_strs+1501)
+#define VER_name (ntpdc_opt_strs+1537)
+#define SAVE_OPTS_DESC (ntpdc_opt_strs+1545)
+#define SAVE_OPTS_name (ntpdc_opt_strs+1584)
+#define LOAD_OPTS_DESC (ntpdc_opt_strs+1594)
+#define LOAD_OPTS_NAME (ntpdc_opt_strs+1626)
+#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1636)
+#define LOAD_OPTS_pfx (ntpdc_opt_strs+1649)
+#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
+/**
* Declare option callback procedures
*/
-#if defined(TEST_NTPDC_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-static tOptProc
- doUsageOpt;
-
-/*
- * #define map the "normal" callout procs to the test ones...
- */
-#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
-
-
-#else /* NOT defined TEST_NTPDC_OPTS */
-/*
- * When not under test, there are different procs to use
- */
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ ntpOptionPrintVersion, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
- doOptSet_Debug_Level, doUsageOpt;
-
-/*
- * #define map the "normal" callout procs
- */
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-#endif /* defined(TEST_NTPDC_OPTS) */
-#ifdef TEST_NTPDC_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_NTPDC_OPTS */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpdc Option Descriptions.
+ doOptDebug_Level, doUsageOpt;
+#define VER_PROC ntpOptionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the ntpdc Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ntpdc program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
@@ -259,11 +338,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV4_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv4 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv4CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
+ /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_OPT_IPV6,
@@ -271,11 +350,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV6_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv6 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv6CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
+ /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 2, VALUE_OPT_COMMAND,
@@ -283,190 +362,184 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ COMMAND_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --command */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionStackArg,
- /* desc, NAME, name */ zCommandText, zCommand_NAME, zCommand_Name,
+ /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 3, VALUE_OPT_LISTPEERS,
- /* equiv idx, value */ 3, VALUE_OPT_LISTPEERS,
+ { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
+ /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ LISTPEERS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --debug-level */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aListpeersCantList,
- /* option proc */ NULL,
- /* desc, NAME, name */ zListpeersText, zListpeers_NAME, zListpeers_Name,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptDebug_Level,
+ /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 4, VALUE_OPT_PEERS,
- /* equiv idx, value */ 4, VALUE_OPT_PEERS,
+ { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ PEERS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --set-debug-level */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aPeersCantList,
- /* option proc */ NULL,
- /* desc, NAME, name */ zPeersText, zPeers_NAME, zPeers_Name,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_SHOWPEERS,
- /* equiv idx, value */ 5, VALUE_OPT_SHOWPEERS,
+ { /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
+ /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ SHOWPEERS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ INTERACTIVE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --interactive */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aShowpeersCantList,
+ /* must/cannot opts */ NULL, aInteractiveCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zShowpeersText, zShowpeers_NAME, zShowpeers_Name,
+ /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 6, VALUE_OPT_INTERACTIVE,
- /* equiv idx, value */ 6, VALUE_OPT_INTERACTIVE,
+ { /* entry idx, value */ 6, VALUE_OPT_LISTPEERS,
+ /* equiv idx, value */ 6, VALUE_OPT_LISTPEERS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ INTERACTIVE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ LISTPEERS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --listpeers */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aInteractiveCantList,
+ /* must/cannot opts */ NULL, aListpeersCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zInteractiveText, zInteractive_NAME, zInteractive_Name,
+ /* desc, NAME, name */ LISTPEERS_DESC, LISTPEERS_NAME, LISTPEERS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_DEBUG_LEVEL,
- /* equiv idx, value */ 7, VALUE_OPT_DEBUG_LEVEL,
+ { /* entry idx, value */ 7, VALUE_OPT_NUMERIC,
+ /* equiv idx, value */ 7, VALUE_OPT_NUMERIC,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, NOLIMIT, 0,
- /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ NUMERIC_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --numeric */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
+ /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_SET_DEBUG_LEVEL,
- /* equiv idx, value */ 8, VALUE_OPT_SET_DEBUG_LEVEL,
+ { /* entry idx, value */ 8, VALUE_OPT_PEERS,
+ /* equiv idx, value */ 8, VALUE_OPT_PEERS,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, NOLIMIT, 0,
- /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ PEERS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --peers */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
- /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
- /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
+ /* must/cannot opts */ NULL, aPeersCantList,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 9, VALUE_OPT_NUMERIC,
- /* equiv idx, value */ 9, VALUE_OPT_NUMERIC,
+ { /* entry idx, value */ 9, VALUE_OPT_SHOWPEERS,
+ /* equiv idx, value */ 9, VALUE_OPT_SHOWPEERS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ NUMERIC_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ SHOWPEERS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --showpeers */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, NULL,
+ /* must/cannot opts */ NULL, aShowpeersCantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zNumericText, zNumeric_NAME, zNumeric_Name,
+ /* desc, NAME, name */ SHOWPEERS_DESC, SHOWPEERS_NAME, SHOWPEERS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
+ | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
+ /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_DISABLE_IMM, 0,
+ | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionLoadOpt,
- /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
- /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
+ /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
+ /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpdc Option Environment
- */
-static char const zPROGNAME[6] = "NTPDC";
-static char const zUsageTitle[127] =
-"ntpdc - vendor-specific NTP query program - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
-static char const zRcName[7] = ".ntprc";
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of ntpdc. */
+#define zPROGNAME (ntpdc_opt_strs+1652)
+/** Reference to the title line for ntpdc usage. */
+#define zUsageTitle (ntpdc_opt_strs+1658)
+/** ntpdc configuration file name. */
+#define zRcName (ntpdc_opt_strs+1794)
+/** Directories to search for ntpdc config files. */
static char const * const apzHomeList[3] = {
- "$HOME",
- ".",
+ ntpdc_opt_strs+1786,
+ ntpdc_opt_strs+1792,
NULL };
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-static char const zDetail[601] = "\n\
-The [= prog-name =] utility program is used to query an NTP daemon about\n\
-its current state and to request changes in that state. It uses NTP mode\n\
-7 control message formats described in the source code. The program may\n\
-be run either in interactive mode or controlled using command line\n\
-arguments. Extensive state and statistics information is available\n\
-through the [= prog-name =] interface. In addition, nearly all the\n\
-configuration options which can be specified at startup using ntpd's\n\
-configuration file may also be specified at run time using [= prog-name =]\n\
-.\n";
-static char const zFullVersion[] = NTPDC_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+/** The ntpdc program bug email address. */
+#define zBugsAddr (ntpdc_opt_strs+1801)
+/** Clarification/explanation of what ntpdc does. */
+#define zExplain (ntpdc_opt_strs+1835)
+/** Extra detail explaining what ntpdc does. */
+#define zDetail (NULL)
+/** The full version string for ntpdc. */
+#define zFullVersion (ntpdc_opt_strs+1837)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -476,16 +549,71 @@ static char const zFullVersion[] = NTPDC_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define ntpdc_full_usage (NULL)
+#define ntpdc_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = NTPDC_EXIT_SUCCESS;
+ optionUsage(&ntpdcOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug-level option.
+ *
+ * @param[in] pOptions the ntpdc options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /*
+ * Be sure the flag-code[0] handles special values for the options pointer
+ * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
+ * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
+ * reset its state.
+ */
+ /* extracted from debug-opt.def, line 15 */
+OPT_VALUE_SET_DEBUG_LEVEL++;
+ (void)pOptDesc;
+ (void)pOptions;
+}
+/* extracted from optmain.tlib near line 1245 */
-#define ntpdc_full_usage NULL
-#define ntpdc_short_usage NULL
+/**
+ * The directory containing the data associated with ntpdc.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged ntpdc
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define ntpdc_packager_info NULL
#else
+/** Packager information for ntpdc. */
static char const ntpdc_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -498,7 +626,13 @@ static char const ntpdc_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ntpdc. The one structure that
+ * binds them all.
+ */
tOptions ntpdcOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -532,134 +666,507 @@ tOptions ntpdcOptions = {
PKGDATADIR, ntpdc_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(NTPDC_EXIT_SUCCESS);
-}
-
-#if ! defined(TEST_NTPDC_OPTS)
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * For the set-debug-level option.
- */
-static void
-doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- /* extracted from debug-opt.def, line 27 */
-DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
-}
-#endif /* defined(TEST_NTPDC_OPTS) */
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_NTPDC_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = NTPDC_EXIT_SUCCESS;
- (void)optionProcess(&ntpdcOptions, argc, argv);
- optionPutShell(&ntpdcOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_NTPDC_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * ntpdc program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(NTPDC_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the ntpdcOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &ntpdcOptions;
+ tOptions * const opts = &ntpdcOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- ntpdcOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the ntpdcOptions structure noted in the
+ comments below. The literal text is defined in ntpdc_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ ntpdc_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via ntpdcOptions.pzCopyright */
+ puts(_("ntpdc 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via ntpdcOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Force IPv4 DNS name resolution"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Force IPv6 DNS name resolution"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("run a command and exit"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Increase debug verbosity level"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Set the debug verbosity level"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Force ntpq to operate in interactive mode"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Print a list of the peers"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("numeric host addresses"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Print a list of the peers"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("Show a list of the peers"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("save the option state to a config file"));
+
+ /* referenced via ntpdcOptions.pOptDesc->pzText */
+ puts(_("load options from a config file"));
+
+ /* referenced via ntpdcOptions.pzUsageTitle */
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
+
+ /* referenced via ntpdcOptions.pzExplain */
+ puts(_("\n"));
+
+ /* referenced via ntpdcOptions.pzFullVersion */
+ puts(_("ntpdc 4.2.8"));
+
+ /* referenced via ntpdcOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via ntpdcOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/ntpdc/ntpdc-opts.def b/ntpdc/ntpdc-opts.def
index a42eb67c446a..df3350eb8a3c 100644
--- a/ntpdc/ntpdc-opts.def
+++ b/ntpdc/ntpdc-opts.def
@@ -2,15 +2,14 @@
autogen definitions options;
+#include autogen-version.def
+#include copyright.def
+
prog-name = "ntpdc";
-prog-title = "vendor-specific NTP query program";
+prog-title = "vendor-specific NTPD control program";
argument = '[ host ...]';
-#include copyright.def
#include homerc.def
-#include autogen-version.def
-
-test-main;
flag = {
name = ipv4;
@@ -49,6 +48,19 @@ flag = {
_EndOfDoc_;
};
+#include debug-opt.def
+
+flag = {
+ name = interactive;
+ value = i;
+ flags-cant = command, listpeers, peers, showpeers;
+ descrip = "Force ntpq to operate in interactive mode";
+ doc = <<- _EndOfDoc_
+ Force ntpq to operate in interactive mode. Prompts will be written
+ to the standard output and commands read from the standard input.
+ _EndOfDoc_;
+};
+
flag = {
name = listpeers;
value = l;
@@ -61,6 +73,16 @@ flag = {
};
flag = {
+ name = numeric;
+ value = n;
+ descrip = "numeric host addresses";
+ doc = <<- _EndOfDoc_
+ Output all host addresses in dotted-quad numeric format rather than
+ converting to the canonical host names.
+ _EndOfDoc_;
+};
+
+flag = {
name = peers;
value = p;
descrip = "Print a list of the peers";
@@ -82,46 +104,709 @@ flag = {
_EndOfDoc_;
};
-flag = {
- name = interactive;
- value = i;
- flags-cant = command, listpeers, peers, showpeers;
- descrip = "Force ntpq to operate in interactive mode";
- doc = <<- _EndOfDoc_
- Force ntpq to operate in interactive mode. Prompts will be written
- to the standard output and commands read from the standard input.
- _EndOfDoc_;
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+is deprecated.
+Please use
+.Xr ntpq 1ntpqmdoc instead - it can do everything
+.Nm
+used to do, and it does so using a much more sane interface.
+.Pp
+.Nm
+is a utility program used to query
+.Xr ntpd 1ntpdmdoc
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+.Nm
+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
+.Nm .
+ _END_PROG_MDOC_DESCRIP;
};
-#include debug-opt.def
-flag = {
- name = numeric;
- value = n;
- descrip = "numeric host addresses";
- doc = <<- _EndOfDoc_
- Output all host addresses in dotted-quad numeric format rather than
- converting to the canonical host names.
- _EndOfDoc_;
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+If one or more request options are included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
+.Pp
+The
+.Nm
+utility 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.
+The
+.Nm
+utility makes
+no attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+.Pp
+The operation of
+.Nm
+are specific to the particular
+implementation of the
+.Xr ntpd 1ntpdmdoc
+daemon and can be expected to
+work only with this and maybe some previous versions of the daemon.
+Requests from a remote
+.Nm
+utility 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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+Specifying a command line option other than
+.Fl i
+or
+.Fl n
+will cause the specified query (queries) to be sent to
+the indicated host(s) immediately.
+Otherwise,
+.Nm
+will
+attempt to read interactive format commands from the standard
+input.
+.Ss "Interactive Commands"
+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
+.Ql \&> ,
+followed by a file name, to the command line.
+.Pp
+A number of interactive format commands are executed entirely
+within the
+.Nm
+utility itself and do not result in NTP
+mode 7 requests being sent to a server.
+These are described
+following.
+.Bl -tag -width indent
+.It Ic \&? Ar command_keyword
+.It Ic help Ar command_keyword
+A
+.Sq Ic \&?
+will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Sq Ic \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Xr ntpq 1ntpqmdoc
+than this manual
+page.
+.It Ic delay Ar milliseconds
+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.
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+Hostname may
+be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic quit
+Exit
+.Nm .
+.It Ic passwd
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 8000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.El
+.Ss "Control Message Commands"
+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.
+.Bl -tag -width indent
+.It Ic listpeers
+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.
+.It Ic peers
+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.
+.Pp
+The character in the left margin indicates the mode this peer
+entry is operating in.
+A
+.Ql \&+
+denotes symmetric active, a
+.Ql \&-
+indicates symmetric passive, a
+.Ql \&=
+means the
+remote server is being polled in client mode, a
+.Ql \&^
+indicates that the server is broadcasting to this address, a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&*
+marks the peer the server is currently synchronizing
+to.
+.Pp
+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
+.Fn REFCLK "implementation_number" "parameter" .
+On
+.Ic hostnames
+.Cm no
+only IP-addresses
+will be displayed.
+.It Ic dmpeers
+A slightly different peer summary list.
+Identical to the output
+of the
+.Ic peers
+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
+.Ql \&.
+indicates that this peer was cast off in the falseticker
+detection, while a
+.Ql \&+
+indicates that the peer made it
+through.
+A
+.Ql \&*
+denotes the peer the server is currently
+synchronizing with.
+.It Ic showpeer Ar peer_address Oo Ar ... Oc
+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.
+.It Ic pstats Ar peer_address Oo Ar ... Oc
+Show per-peer statistic counters associated with the specified
+peer(s).
+.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc
+Obtain and print information concerning a peer clock.
+The
+values obtained provide information on the setting of fudge factors
+and other clock performance information.
+.It Ic kerninfo
+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.
+.It Ic loopinfo Op Cm oneline | Cm multiline
+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
+.Sq offset
+is the last offset given to the
+loop filter by the packet processing code.
+The
+.Sq frequency
+is the frequency error of the local clock in parts-per-million
+(ppm).
+The
+.Sq time_const
+controls the stiffness of the
+phase-lock loop and thus the speed at which it can adapt to
+oscillator drift.
+The
+.Sq watchdog timer
+value is the number
+of seconds which have elapsed since the last sample offset was
+given to the loop filter.
+The
+.Cm oneline
+and
+.Cm multiline
+options specify the format in which this
+information is to be printed, with
+.Cm multiline
+as the
+default.
+.It Ic sysinfo
+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.
+.Pp
+The
+.Sq system flags
+show various system flags, some of
+which can be set and cleared by the
+.Ic enable
+and
+.Ic disable
+configuration commands, respectively.
+These are
+the
+.Cm auth ,
+.Cm bclient ,
+.Cm monitor ,
+.Cm pll ,
+.Cm pps
+and
+.Cm stats
+flags.
+See the
+.Xr ntpd 1ntpdmdoc
+documentation for the meaning of these flags.
+There
+are two additional flags which are read only, the
+.Cm kernel_pll
+and
+.Cm kernel_pps .
+These flags indicate
+the synchronization status when the precision time kernel
+modifications are in use.
+The
+.Sq kernel_pll
+indicates that
+the local clock is being disciplined by the kernel, while the
+.Sq kernel_pps
+indicates the kernel discipline is provided by the PPS
+signal.
+.Pp
+The
+.Sq stability
+is the residual frequency error remaining
+after the 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
+.Va kern.clockrate.tick
+may be
+incorrect.
+.Pp
+The
+.Sq broadcastdelay
+shows the default broadcast delay,
+as set by the
+.Ic broadcastdelay
+configuration command.
+.Pp
+The
+.Sq authdelay
+shows the default authentication delay,
+as set by the
+.Ic authdelay
+configuration command.
+.It Ic sysstats
+Print statistics counters maintained in the protocol
+module.
+.It Ic memstats
+Print statistics counters related to memory allocation
+code.
+.It Ic iostats
+Print statistics counters maintained in the input-output
+module.
+.It Ic timerstats
+Print statistics counters maintained in the timer/event queue
+support code.
+.It Ic reslist
+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.
+.It Ic monlist Op Ar version
+Obtain and print traffic counts collected and maintained by the
+monitor facility.
+The version number should not normally need to be
+specified.
+.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc
+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.
+.El
+.Ss "Runtime Configuration Requests"
+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
+.Nm .
+This can be done using the
+.Ic keyid
+and
+.Ic 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.
+.Pp
+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.
+.Pp
+The following commands all make authenticated requests.
+.Bl -tag -width indent
+.It Xo Ic addpeer Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+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
+.Ar keyid
+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
+.Ar version
+can be 1, 2 or 3 and defaults to 3.
+The
+.Cm prefer
+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.
+.It Xo Ic addserver Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is client.
+.It Xo Ic broadcast Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is broadcast.
+In this case a valid key identifier and key are
+required.
+The
+.Ar peer_address
+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.
+.It Ic unconfig Ar peer_address Oo Ar ... Oc
+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.
+.It Xo Ic fudge Ar peer_address
+.Op Cm time1
+.Op Cm time2
+.Op Ar stratum
+.Op Ar refid
+.Xc
+This command provides a way to set certain data for a reference
+clock.
+See the source listing for further information.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+These commands operate in the same way as the
+.Ic enable
+and
+.Ic disable
+configuration file commands of
+.Xr ntpd 1ntpdmdoc .
+.Bl -tag -width indent
+.It Cm auth
+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.
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the multicastclient command with
+default address.
+The default for this flag is disable.
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for this flag is disable.
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this flag is enable if support is available, otherwise disable.
+.It Cm monitor
+Enables the monitoring facility.
+See the documentation here about the
+.Cm monlist
+command or further information.
+The default for this flag is enable.
+.It Cm ntp
+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.
+.It Cm pps
+Enables the pulse-per-second (PPS) signal when frequency
+and time is disciplined by the precision time kernel modifications.
+See the
+.Qq A Kernel Model for Precision Timekeeping
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page for further information.
+The default for this flag is disable.
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section of
+.Xr ntp.conf 5
+for further information.
+The default for this flag is disable.
+.El
+.It Xo Ic restrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+This command operates in the same way as the
+.Ic restrict
+configuration file commands of
+.Xr ntpd 1ntpdmdoc .
+.It Xo Ic unrestrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+Unrestrict the matching entry from the restrict list.
+.It Xo Ic delrestrict Ar address Ar mask
+.Op Cm ntpport
+.Xc
+Delete the matching entry from the restrict list.
+.It Ic readkeys
+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
+.Xr ntpd 1ntpdmdoc
+configuration file).
+This
+allows encryption keys to be changed without restarting the
+server.
+.It Ic trustedkey Ar keyid Oo Ar ... Oc
+.It Ic untrustedkey Ar keyid Oo Ar ... Oc
+These commands operate in the same way as the
+.Ic trustedkey
+and
+.Ic untrustedkey
+configuration file
+commands of
+.Xr ntpd 1ntpdmdoc .
+.It Ic authinfo
+Returns information concerning the authentication module,
+including known keys and counts of encryptions and decryptions
+which have been done.
+.It Ic traps
+Display the traps set in the server.
+See the source listing for
+further information.
+.It Xo Ic addtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Set a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Xo Ic clrtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Clear a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Ic reset
+Clear the statistics counters in various modules of the server.
+See the source listing for further information.
+.El
+ _END_MDOC_USAGE;
+};
+
+
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_SEEALSO
+.Xr ntp.conf 5 ,
+.Xr ntpd 1ntpdmdoc
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+ _END_MDOC_SEEALSO;
};
-detail = <<- _END_DETAIL
- The
- [= prog-name =]
- utility program is used to query an NTP daemon about its
- current state and to request changes in that state.
- It uses NTP mode 7 control message formats described in the source code.
- The program may
- be run either in interactive mode or controlled using command line
- arguments.
- Extensive state and statistics information is available
- through the
- [= prog-name =]
- 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
- [= prog-name =] .
-
-
- _END_DETAIL;
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTHORS
+The formatting directives in this document came from FreeBSD.
+ _END_MDOC_AUTHORS;
+};
+
+
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+The
+.Nm
+utility 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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+ _END_MDOC_BUGS;
+};
diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h
index 2f2060773693..31e72bb15b5d 100644
--- a/ntpdc/ntpdc-opts.h
+++ b/ntpdc/ntpdc-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:16 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:49:25 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpdc program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the ntpdc program.
* These macros are documented in the AutoGen info file in the
@@ -31,75 +46,95 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for ntpdc
*/
typedef enum {
INDEX_OPT_IPV4 = 0,
INDEX_OPT_IPV6 = 1,
INDEX_OPT_COMMAND = 2,
- INDEX_OPT_LISTPEERS = 3,
- INDEX_OPT_PEERS = 4,
- INDEX_OPT_SHOWPEERS = 5,
- INDEX_OPT_INTERACTIVE = 6,
- INDEX_OPT_DEBUG_LEVEL = 7,
- INDEX_OPT_SET_DEBUG_LEVEL = 8,
- INDEX_OPT_NUMERIC = 9,
+ INDEX_OPT_DEBUG_LEVEL = 3,
+ INDEX_OPT_SET_DEBUG_LEVEL = 4,
+ INDEX_OPT_INTERACTIVE = 5,
+ INDEX_OPT_LISTPEERS = 6,
+ INDEX_OPT_NUMERIC = 7,
+ INDEX_OPT_PEERS = 8,
+ INDEX_OPT_SHOWPEERS = 9,
INDEX_OPT_VERSION = 10,
INDEX_OPT_HELP = 11,
INDEX_OPT_MORE_HELP = 12,
INDEX_OPT_SAVE_OPTS = 13,
INDEX_OPT_LOAD_OPTS = 14
} teOptIndex;
-
+/** count of all options for ntpdc */
#define OPTION_CT 15
-#define NTPDC_VERSION "4.2.6p5"
-#define NTPDC_FULL_VERSION "ntpdc 4.2.6p5"
+/** ntpdc version */
+#define NTPDC_VERSION "4.2.8"
+/** Full ntpdc version text */
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8"
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
* e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpdcOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of ntpdc exit codes
*/
typedef enum {
- NTPDC_EXIT_SUCCESS = 0,
- NTPDC_EXIT_FAILURE = 1
-} ntpdc_exit_code_t;
-/*
+ NTPDC_EXIT_SUCCESS = 0,
+ NTPDC_EXIT_FAILURE = 1,
+ NTPDC_EXIT_USAGE_ERROR = 64,
+ NTPDC_EXIT_NO_CONFIG_INPUT = 66,
+ NTPDC_EXIT_LIBOPTS_FAILURE = 70
+} ntpdc_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
@@ -115,22 +150,6 @@ typedef enum {
# warning undefining COMMAND due to option name conflict
# undef COMMAND
# endif
-# ifdef LISTPEERS
-# warning undefining LISTPEERS due to option name conflict
-# undef LISTPEERS
-# endif
-# ifdef PEERS
-# warning undefining PEERS due to option name conflict
-# undef PEERS
-# endif
-# ifdef SHOWPEERS
-# warning undefining SHOWPEERS due to option name conflict
-# undef SHOWPEERS
-# endif
-# ifdef INTERACTIVE
-# warning undefining INTERACTIVE due to option name conflict
-# undef INTERACTIVE
-# endif
# ifdef DEBUG_LEVEL
# warning undefining DEBUG_LEVEL due to option name conflict
# undef DEBUG_LEVEL
@@ -139,46 +158,69 @@ typedef enum {
# warning undefining SET_DEBUG_LEVEL due to option name conflict
# undef SET_DEBUG_LEVEL
# endif
+# ifdef INTERACTIVE
+# warning undefining INTERACTIVE due to option name conflict
+# undef INTERACTIVE
+# endif
+# ifdef LISTPEERS
+# warning undefining LISTPEERS due to option name conflict
+# undef LISTPEERS
+# endif
# ifdef NUMERIC
# warning undefining NUMERIC due to option name conflict
# undef NUMERIC
# endif
+# ifdef PEERS
+# warning undefining PEERS due to option name conflict
+# undef PEERS
+# endif
+# ifdef SHOWPEERS
+# warning undefining SHOWPEERS due to option name conflict
+# undef SHOWPEERS
+# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
# undef COMMAND
-# undef LISTPEERS
-# undef PEERS
-# undef SHOWPEERS
-# undef INTERACTIVE
# undef DEBUG_LEVEL
# undef SET_DEBUG_LEVEL
+# undef INTERACTIVE
+# undef LISTPEERS
# undef NUMERIC
+# undef PEERS
+# undef SHOWPEERS
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_OPT_IPV4 '4'
#define VALUE_OPT_IPV6 '6'
#define VALUE_OPT_COMMAND 'c'
-#define VALUE_OPT_LISTPEERS 'l'
-#define VALUE_OPT_PEERS 'p'
-#define VALUE_OPT_SHOWPEERS 's'
-#define VALUE_OPT_INTERACTIVE 'i'
#define VALUE_OPT_DEBUG_LEVEL 'd'
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
+
+#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
+#define VALUE_OPT_INTERACTIVE 'i'
+#define VALUE_OPT_LISTPEERS 'l'
#define VALUE_OPT_NUMERIC 'n'
+#define VALUE_OPT_PEERS 'p'
+#define VALUE_OPT_SHOWPEERS 's'
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1001
+/** option flag (value) for save-opts-value option */
#define VALUE_OPT_SAVE_OPTS '>'
+/** option flag (value) for load-opts-value option */
#define VALUE_OPT_LOAD_OPTS '<'
#define SET_OPT_SAVE_OPTS(a) STMTS( \
DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
- DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
+ DESC(SAVE_OPTS).optArg.argString = (char const*)(a))
/*
* Interface defines not associated with particular options
*/
@@ -186,15 +228,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(ntpdcOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpdcOptions.curOptIdx = (n); \
- ntpdcOptions.pzCurOpt = NULL)
+ ntpdcOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpdcOptions.pUsageProc)(&ntpdcOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the ntpdc option descriptor.
@@ -204,6 +246,17 @@ extern tOptions ntpdcOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -237,4 +290,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_NTPDC_OPTS_H_GUARD */
+
/* ntpdc-opts.h ends here */
diff --git a/ntpdc/ntpdc-opts.texi b/ntpdc/ntpdc-opts.texi
deleted file mode 100644
index b868c5e659d2..000000000000
--- a/ntpdc/ntpdc-opts.texi
+++ /dev/null
@@ -1,269 +0,0 @@
-@node ntpdc Invocation
-@section Invoking ntpdc
-@pindex ntpdc
-@cindex vendor-specific NTP query program
-@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:25 PM by AutoGen 5.12
-# From the definitions ntpdc-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-The
-[= prog-name =]
-utility program is used to query an NTP daemon about its
-current state and to request changes in that state.
-It uses NTP mode 7 control message formats described in the source code.
-The program may
-be run either in interactive mode or controlled using command line
-arguments.
-Extensive state and statistics information is available
-through the
-[= prog-name =]
-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
-[= prog-name =] .
-
-
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpdc} program. It documents the @command{ntpdc} usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpdc usage:: ntpdc usage help (-?)
-* ntpdc command:: command option (-c)
-* ntpdc debug-level:: debug-level option (-d)
-* ntpdc interactive:: interactive option (-i)
-* ntpdc ipv4:: ipv4 option (-4)
-* ntpdc ipv6:: ipv6 option (-6)
-* ntpdc listpeers:: listpeers option (-l)
-* ntpdc numeric:: numeric option (-n)
-* ntpdc peers:: peers option (-p)
-* ntpdc set-debug-level:: set-debug-level option (-D)
-* ntpdc showpeers:: showpeers option (-s)
-@end menu
-
-@node ntpdc usage
-@subsection ntpdc usage help (-?)
-@cindex ntpdc usage
-
-This is the automatically generated usage text for ntpdc:
-
-@exampleindent 0
-@example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.6p5
-USAGE: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -c Str command run a command and exit
- - may appear multiple times
- -l no listpeers Print a list of the peers
- - prohibits these options:
- command
- -p no peers Print a list of the peers
- - prohibits these options:
- command
- -s no showpeers Show a list of the peers
- - prohibits these options:
- command
- -i no interactive Force ntpq to operate in interactive mode
- - prohibits these options:
- command
- listpeers
- peers
- showpeers
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -n no numeric numeric host addresses
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - disabled as --no-load-opts
- - may appear multiple times
-
-Options are specified by doubled hyphens and their name or by a single
-hyphen and the flag character.
-
-The following option preset mechanisms are supported:
- - reading file $HOME/.ntprc
- - reading file ./.ntprc
- - examining environment variables named NTPDC_*
-
-The [= prog-name =] utility program is used to query an NTP daemon about
-its current state and to request changes in that state. It uses NTP mode
-7 control message formats described in the source code. The program may
-be run either in interactive mode or controlled using command line
-arguments. Extensive state and statistics information is available
-through the [= prog-name =] 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 [= prog-name =]
-.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpdc command
-@subsection command option (-c)
-@cindex ntpdc-command
-
-This is the ``run a command and exit'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-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).
-
-@node ntpdc debug-level
-@subsection debug-level option (-d)
-@cindex ntpdc-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntpdc interactive
-@subsection interactive option (-i)
-@cindex ntpdc-interactive
-
-This is the ``force ntpq to operate in interactive mode'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command, listpeers, peers, showpeers.
-@end itemize
-
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-
-@node ntpdc ipv4
-@subsection ipv4 option (-4)
-@cindex ntpdc-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpdc ipv6
-@subsection ipv6 option (-6)
-@cindex ntpdc-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node ntpdc listpeers
-@subsection listpeers option (-l)
-@cindex ntpdc-listpeers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary of
-their state. This is equivalent to the 'listpeers' interactive command.
-
-@node ntpdc numeric
-@subsection numeric option (-n)
-@cindex ntpdc-numeric
-
-This is the ``numeric host addresses'' option.
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-
-@node ntpdc peers
-@subsection peers option (-p)
-@cindex ntpdc-peers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-
-@node ntpdc set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpdc-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntpdc showpeers
-@subsection showpeers option (-s)
-@cindex ntpdc-showpeers
-
-This is the ``show a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'dmpeers' interactive command.
diff --git a/ntpdc/ntpdc.1 b/ntpdc/ntpdc.1
deleted file mode 100644
index 3ff74975f11e..000000000000
--- a/ntpdc/ntpdc.1
+++ /dev/null
@@ -1,161 +0,0 @@
-.TH NTPDC 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:34:25 PM by AutoGen 5.12
-.\" From the definitions ntpdc-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-ntpdc \- vendor-specific NTP query program
-.SH SYNOPSIS
-.B ntpdc
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.br
-.in +8
-[ host ...]
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBntpdc\fP command.
-The
-[= prog-name =]
-utility program is used to query an NTP daemon about its
-current state and to request changes in that state.
-It uses NTP mode 7 control message formats described in the source code.
-The program may
-be run either in interactive mode or controlled using command line
-arguments.
-Extensive state and statistics information is available
-through the
-[= prog-name =]
-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
-[= prog-name =] .
-
-
-.SH OPTIONS
-.TP
-.BR \-4 ", " \--ipv4
-Force IPv4 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv6.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-.TP
-.BR \-6 ", " \--ipv6
-Force IPv6 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv4.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-.TP
-.BR \-c " \fIcmd\fP, " \--command "=" \fIcmd\fP
-run a command and exit.
-This option may appear an unlimited number of times.
-.sp
-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).
-.TP
-.BR \-l ", " \--listpeers
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-command.
-.sp
-Print a list of the peers known to the server as well as a summary of
-their state. This is equivalent to the 'listpeers' interactive command.
-.TP
-.BR \-p ", " \--peers
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-command.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-.TP
-.BR \-s ", " \--showpeers
-Show a list of the peers.
-This option must not appear in combination with any of the following options:
-command.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'dmpeers' interactive command.
-.TP
-.BR \-i ", " \--interactive
-Force ntpq to operate in interactive mode.
-This option must not appear in combination with any of the following options:
-command, listpeers, peers, showpeers.
-.sp
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-.TP
-.BR \-d ", " \--debug-level
-Increase output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Increase the debugging message output level.
-.TP
-.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
-Set the output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-.TP
-.BR \-n ", " \--numeric
-numeric host addresses.
-.sp
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
-.TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
-out of order.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from configuration ("RC" or ".INI") file(s) and values from
-environment variables named:
-.nf
- \fBNTPDC_<option-name>\fP or \fBNTPDC\fP
-.fi
-.ad
-The environmental presets take precedence (are processed later than)
-the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
-is searched for within those directories.
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
-option definitions.
diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman
new file mode 100644
index 000000000000..861fade98039
--- /dev/null
+++ b/ntpdc/ntpdc.1ntpdcman
@@ -0,0 +1,874 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpdc 1ntpdcman "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Fraief/ag-Rraadf)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:38 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpdc-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpdc\fP
+\- vendor-specific NTPD control program
+.SH SYNOPSIS
+\f\*[B-Font]ntpdc\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ host ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpdc\fP
+is deprecated.
+Please use
+\fCntpq\fR(1ntpqmdoc)\f[] instead \- it can do everything
+\f\*[B-Font]ntpdc\fP
+used to do, and it does so using a much more sane interface.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntpdc\fP
+is a utility program used to query
+\fCntpd\fR(1ntpdmdoc)\f[]
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+\f\*[B-Font]ntpdc\fP
+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
+\f\*[B-Font]ntpdc\fP.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+.sp
+Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+.TP
+.NOP \f\*[B-Font]\-l\f[], \f\*[B-Font]\-\-listpeers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+numeric host addresses.
+.sp
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-showpeers\f[]
+Show a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPDC_<option-name>\fP or \fBNTPDC\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+If one or more request options are included on the command line
+when
+\f\*[B-Font]ntpdc\fP
+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,
+\f\*[B-Font]ntpdc\fP
+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.
+The
+\f\*[B-Font]ntpdc\fP
+utility will prompt for
+commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntpdc\fP
+utility 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.
+The
+\f\*[B-Font]ntpdc\fP
+utility makes
+no attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+.sp \n(Ppu
+.ne 2
+
+The operation of
+\f\*[B-Font]ntpdc\fP
+are specific to the particular
+implementation of the
+\fCntpd\fR(1ntpdmdoc)\f[]
+daemon and can be expected to
+work only with this and maybe some previous versions of the daemon.
+Requests from a remote
+\f\*[B-Font]ntpdc\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
+while a
+\f\*[B-Font]\-6\f[]
+qualifier forces DNS resolution to the IPv6 namespace.
+Specifying a command line option other than
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-n\f[]
+will cause the specified query (queries) to be sent to
+the indicated host(s) immediately.
+Otherwise,
+\f\*[B-Font]ntpdc\fP
+will
+attempt to read interactive format commands from the standard
+input.
+.SS "Interactive Commands"
+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
+\[oq]\&>\[cq],
+followed by a file name, to the command line.
+.sp \n(Ppu
+.ne 2
+
+A number of interactive format commands are executed entirely
+within the
+\f\*[B-Font]ntpdc\fP
+utility itself and do not result in NTP
+mode 7 requests being sent to a server.
+These are described
+following.
+.TP 7
+.NOP \f\*[B-Font]\&?\f[] \f\*[I-Font]command_keyword\f[]
+.TP 7
+.NOP \f\*[B-Font]help\f[] \f\*[I-Font]command_keyword\f[]
+A
+\[oq]\f\*[B-Font]\&?\f[]\[cq]
+will print a list of all the command
+keywords known to this incarnation of
+\f\*[B-Font]ntpdc\fP.
+A
+\[oq]\f\*[B-Font]\&?\f[]\[cq]
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+\fCntpq\fR(1ntpqmdoc)\f[]
+than this manual
+page.
+.TP 7
+.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+Set the host to which future queries will be sent.
+Hostname may
+be either a host name or a numeric address.
+.TP 7
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+If
+\f\*[B-Font]yes\f[]
+is specified, host names are printed in
+information displays.
+If
+\f\*[B-Font]no\f[]
+is specified, numeric
+addresses are printed instead.
+The default is
+\f\*[B-Font]yes\f[],
+unless
+modified using the command line
+\f\*[B-Font]\-n\f[]
+switch.
+.TP 7
+.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]quit\f[]
+Exit
+\f\*[B-Font]ntpdc\fP.
+.TP 7
+.NOP \f\*[B-Font]passwd\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+Specify a timeout period for responses to server queries.
+The
+default is about 8000 milliseconds.
+Note that since
+\f\*[B-Font]ntpdc\fP
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.PP
+.SS "Control Message Commands"
+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.
+.TP 7
+.NOP \f\*[B-Font]listpeers\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]peers\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The character in the left margin indicates the mode this peer
+entry is operating in.
+A
+\[oq]\&+\[cq]
+denotes symmetric active, a
+\[oq]\&-\[cq]
+indicates symmetric passive, a
+\[oq]\&=\[cq]
+means the
+remote server is being polled in client mode, a
+\[oq]\&^\[cq]
+indicates that the server is broadcasting to this address, a
+\[oq]\&~\[cq]
+denotes that the remote peer is sending broadcasts and a
+\[oq]\&~\[cq]
+denotes that the remote peer is sending broadcasts and a
+\[oq]\&*\[cq]
+marks the peer the server is currently synchronizing
+to.
+.sp \n(Ppu
+.ne 2
+
+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
+\fBREFCLK\fR()\f[]
+On
+\f\*[B-Font]hostnames\f[]
+\f\*[B-Font]no\f[]
+only IP-addresses
+will be displayed.
+.TP 7
+.NOP \f\*[B-Font]dmpeers\f[]
+A slightly different peer summary list.
+Identical to the output
+of the
+\f\*[B-Font]peers\f[]
+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
+\[oq]\&.\[cq]
+indicates that this peer was cast off in the falseticker
+detection, while a
+\[oq]\&+\[cq]
+indicates that the peer made it
+through.
+A
+\[oq]\&*\[cq]
+denotes the peer the server is currently
+synchronizing with.
+.TP 7
+.NOP \f\*[B-Font]showpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+Show per-peer statistic counters associated with the specified
+peer(s).
+.TP 7
+.NOP \f\*[B-Font]clockstat\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
+Obtain and print information concerning a peer clock.
+The
+values obtained provide information on the setting of fudge factors
+and other clock performance information.
+.TP 7
+.NOP \f\*[B-Font]kerninfo\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]loopinfo\f[] [\f\*[B-Font]oneline\f[] | \f\*[B-Font]multiline\f[]]
+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
+\[oq]offset\[cq]
+is the last offset given to the
+loop filter by the packet processing code.
+The
+\[oq]frequency\[cq]
+is the frequency error of the local clock in parts-per-million
+(ppm).
+The
+\[oq]time_const\[cq]
+controls the stiffness of the
+phase-lock loop and thus the speed at which it can adapt to
+oscillator drift.
+The
+\[oq]watchdog timer\[cq]
+value is the number
+of seconds which have elapsed since the last sample offset was
+given to the loop filter.
+The
+\f\*[B-Font]oneline\f[]
+and
+\f\*[B-Font]multiline\f[]
+options specify the format in which this
+information is to be printed, with
+\f\*[B-Font]multiline\f[]
+as the
+default.
+.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]system flags\[cq]
+show various system flags, some of
+which can be set and cleared by the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+configuration commands, respectively.
+These are
+the
+\f\*[B-Font]auth\f[],
+\f\*[B-Font]bclient\f[],
+\f\*[B-Font]monitor\f[],
+\f\*[B-Font]pll\f[],
+\f\*[B-Font]pps\f[]
+and
+\f\*[B-Font]stats\f[]
+flags.
+See the
+\fCntpd\fR(1ntpdmdoc)\f[]
+documentation for the meaning of these flags.
+There
+are two additional flags which are read only, the
+\f\*[B-Font]kernel_pll\f[]
+and
+\f\*[B-Font]kernel_pps\f[].
+These flags indicate
+the synchronization status when the precision time kernel
+modifications are in use.
+The
+\[oq]kernel_pll\[cq]
+indicates that
+the local clock is being disciplined by the kernel, while the
+\[oq]kernel_pps\[cq]
+indicates the kernel discipline is provided by the PPS
+signal.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]stability\[cq]
+is the residual frequency error remaining
+after the 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
+\fIkern.clockrate.tick\f[]
+may be
+incorrect.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]broadcastdelay\[cq]
+shows the default broadcast delay,
+as set by the
+\f\*[B-Font]broadcastdelay\f[]
+configuration command.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]authdelay\[cq]
+shows the default authentication delay,
+as set by the
+\f\*[B-Font]authdelay\f[]
+configuration command.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Print statistics counters maintained in the protocol
+module.
+.TP 7
+.NOP \f\*[B-Font]memstats\f[]
+Print statistics counters related to memory allocation
+code.
+.TP 7
+.NOP \f\*[B-Font]iostats\f[]
+Print statistics counters maintained in the input-output
+module.
+.TP 7
+.NOP \f\*[B-Font]timerstats\f[]
+Print statistics counters maintained in the timer/event queue
+support code.
+.TP 7
+.NOP \f\*[B-Font]reslist\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]monlist\f[] [\f\*[I-Font]version\f[]]
+Obtain and print traffic counts collected and maintained by the
+monitor facility.
+The version number should not normally need to be
+specified.
+.TP 7
+.NOP \f\*[B-Font]clkbug\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.PP
+.SS "Runtime Configuration Requests"
+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
+\f\*[B-Font]ntpdc\fP.
+This can be done using the
+\f\*[B-Font]keyid\f[]
+and
+\f\*[B-Font]passwd\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The following commands all make authenticated requests.
+.TP 7
+.NOP \f\*[B-Font]addpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+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
+\f\*[I-Font]keyid\f[]
+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
+\f\*[I-Font]version\f[]
+can be 1, 2 or 3 and defaults to 3.
+The
+\f\*[B-Font]prefer\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]addserver\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+Identical to the addpeer command, except that the operating
+mode is client.
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+Identical to the addpeer command, except that the operating
+mode is broadcast.
+In this case a valid key identifier and key are
+required.
+The
+\f\*[I-Font]peer_address\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]unconfig\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]fudge\f[] \f\*[I-Font]peer_address\f[] [\f\*[B-Font]time1\f[]] [\f\*[B-Font]time2\f[]] [\f\*[I-Font]stratum\f[]] [\f\*[I-Font]refid\f[]]
+This command provides a way to set certain data for a reference
+clock.
+See the source listing for further information.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
+.TP 7
+.NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
+These commands operate in the same way as the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+configuration file commands of
+\fCntpd\fR(1ntpdmdoc)\f[].
+.RS
+.TP 7
+.NOP \f\*[B-Font]auth\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]bclient\f[]
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the multicastclient command with
+default address.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]calibrate\f[]
+Enables the calibrate feature for reference clocks.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]kernel\f[]
+Enables the kernel time discipline, if available.
+The default for this flag is enable if support is available, otherwise disable.
+.TP 7
+.NOP \f\*[B-Font]monitor\f[]
+Enables the monitoring facility.
+See the documentation here about the
+\f\*[B-Font]monlist\f[]
+command or further information.
+The default for this flag is enable.
+.TP 7
+.NOP \f\*[B-Font]ntp\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]pps\f[]
+Enables the pulse-per-second (PPS) signal when frequency
+and time is disciplined by the precision time kernel modifications.
+See the
+"A Kernel Model for Precision Timekeeping"
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+page for further information.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]stats\f[]
+Enables the statistics facility.
+See the
+\fIMonitoring\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[]
+for further information.
+The default for this flag is disable.
+.RE
+.TP 7
+.NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
+This command operates in the same way as the
+\f\*[B-Font]restrict\f[]
+configuration file commands of
+\fCntpd\fR(1ntpdmdoc)\f[].
+.TP 7
+.NOP \f\*[B-Font]unrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
+Unrestrict the matching entry from the restrict list.
+.TP 7
+.NOP \f\*[B-Font]delrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] [\f\*[B-Font]ntpport\f[]]
+Delete the matching entry from the restrict list.
+.TP 7
+.NOP \f\*[B-Font]readkeys\f[]
+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
+\fCntpd\fR(1ntpdmdoc)\f[]
+configuration file).
+This
+allows encryption keys to be changed without restarting the
+server.
+.TP 7
+.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
+.TP 7
+.NOP \f\*[B-Font]untrustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
+These commands operate in the same way as the
+\f\*[B-Font]trustedkey\f[]
+and
+\f\*[B-Font]untrustedkey\f[]
+configuration file
+commands of
+\fCntpd\fR(1ntpdmdoc)\f[].
+.TP 7
+.NOP \f\*[B-Font]authinfo\f[]
+Returns information concerning the authentication module,
+including known keys and counts of encryptions and decryptions
+which have been done.
+.TP 7
+.NOP \f\*[B-Font]traps\f[]
+Display the traps set in the server.
+See the source listing for
+further information.
+.TP 7
+.NOP \f\*[B-Font]addtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
+Set a trap for asynchronous messages.
+See the source listing
+for further information.
+.TP 7
+.NOP \f\*[B-Font]clrtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
+Clear a trap for asynchronous messages.
+See the source listing
+for further information.
+.TP 7
+.NOP \f\*[B-Font]reset\f[]
+Clear the statistics counters in various modules of the server.
+See the source listing for further information.
+.PP
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpd\fR(1ntpdmdoc)\f[]
+David L. Mills,
+\fINetwork Time Protocol (Version 3)\fR,
+RFC1305
+.PP
+
+.SH AUTHORS
+The formatting directives in this document came from FreeBSD.
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The
+\f\*[B-Font]ntpdc\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Please report bugs to http://bugs.ntp.org .
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
+option definitions.
diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc
new file mode 100644
index 000000000000..7c8693db08e0
--- /dev/null
+++ b/ntpdc/ntpdc.1ntpdcmdoc
@@ -0,0 +1,809 @@
+.Dd December 19 2014
+.Dt NTPDC 1ntpdcmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:44 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpdc-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpdc
+.Nd vendor-specific NTPD control program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ host ...]
+.Pp
+.Sh DESCRIPTION
+.Nm
+is deprecated.
+Please use
+.Xr ntpq 1ntpqmdoc instead \- it can do everything
+.Nm
+used to do, and it does so using a much more sane interface.
+.Pp
+.Nm
+is a utility program used to query
+.Xr ntpd 1ntpdmdoc
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+.Nm
+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
+.Nm .
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl i , Fl \-interactive
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+.sp
+Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+.It Fl l , Fl \-listpeers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+.It Fl n , Fl \-numeric
+numeric host addresses.
+.sp
+Output all host addresses in dotted\-quad numeric format rather than
+converting to the canonical host names.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl s , Fl \-showpeers
+Show a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPDC_<option\-name>\fP or \fBNTPDC\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+If one or more request options are included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
+.Pp
+The
+.Nm
+utility 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.
+The
+.Nm
+utility makes
+no attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+.Pp
+The operation of
+.Nm
+are specific to the particular
+implementation of the
+.Xr ntpd 1ntpdmdoc
+daemon and can be expected to
+work only with this and maybe some previous versions of the daemon.
+Requests from a remote
+.Nm
+utility 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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+Specifying a command line option other than
+.Fl i
+or
+.Fl n
+will cause the specified query (queries) to be sent to
+the indicated host(s) immediately.
+Otherwise,
+.Nm
+will
+attempt to read interactive format commands from the standard
+input.
+.Ss "Interactive Commands"
+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
+.Ql \&> ,
+followed by a file name, to the command line.
+.Pp
+A number of interactive format commands are executed entirely
+within the
+.Nm
+utility itself and do not result in NTP
+mode 7 requests being sent to a server.
+These are described
+following.
+.Bl -tag -width indent
+.It Ic \&? Ar command_keyword
+.It Ic help Ar command_keyword
+A
+.Sq Ic \&?
+will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Sq Ic \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Xr ntpq 1ntpqmdoc
+than this manual
+page.
+.It Ic delay Ar milliseconds
+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.
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+Hostname may
+be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic quit
+Exit
+.Nm .
+.It Ic passwd
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 8000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.El
+.Ss "Control Message Commands"
+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.
+.Bl -tag -width indent
+.It Ic listpeers
+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.
+.It Ic peers
+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.
+.Pp
+The character in the left margin indicates the mode this peer
+entry is operating in.
+A
+.Ql \&+
+denotes symmetric active, a
+.Ql \&\-
+indicates symmetric passive, a
+.Ql \&=
+means the
+remote server is being polled in client mode, a
+.Ql \&^
+indicates that the server is broadcasting to this address, a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&*
+marks the peer the server is currently synchronizing
+to.
+.Pp
+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
+.Fn REFCLK "implementation_number" "parameter" .
+On
+.Ic hostnames
+.Cm no
+only IP\-addresses
+will be displayed.
+.It Ic dmpeers
+A slightly different peer summary list.
+Identical to the output
+of the
+.Ic peers
+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
+.Ql \&.
+indicates that this peer was cast off in the falseticker
+detection, while a
+.Ql \&+
+indicates that the peer made it
+through.
+A
+.Ql \&*
+denotes the peer the server is currently
+synchronizing with.
+.It Ic showpeer Ar peer_address Oo Ar ... Oc
+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.
+.It Ic pstats Ar peer_address Oo Ar ... Oc
+Show per\-peer statistic counters associated with the specified
+peer(s).
+.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc
+Obtain and print information concerning a peer clock.
+The
+values obtained provide information on the setting of fudge factors
+and other clock performance information.
+.It Ic kerninfo
+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.
+.It Ic loopinfo Op Cm oneline | Cm multiline
+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
+.Sq offset
+is the last offset given to the
+loop filter by the packet processing code.
+The
+.Sq frequency
+is the frequency error of the local clock in parts\-per\-million
+(ppm).
+The
+.Sq time_const
+controls the stiffness of the
+phase\-lock loop and thus the speed at which it can adapt to
+oscillator drift.
+The
+.Sq watchdog timer
+value is the number
+of seconds which have elapsed since the last sample offset was
+given to the loop filter.
+The
+.Cm oneline
+and
+.Cm multiline
+options specify the format in which this
+information is to be printed, with
+.Cm multiline
+as the
+default.
+.It Ic sysinfo
+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.
+.Pp
+The
+.Sq system flags
+show various system flags, some of
+which can be set and cleared by the
+.Ic enable
+and
+.Ic disable
+configuration commands, respectively.
+These are
+the
+.Cm auth ,
+.Cm bclient ,
+.Cm monitor ,
+.Cm pll ,
+.Cm pps
+and
+.Cm stats
+flags.
+See the
+.Xr ntpd 1ntpdmdoc
+documentation for the meaning of these flags.
+There
+are two additional flags which are read only, the
+.Cm kernel_pll
+and
+.Cm kernel_pps .
+These flags indicate
+the synchronization status when the precision time kernel
+modifications are in use.
+The
+.Sq kernel_pll
+indicates that
+the local clock is being disciplined by the kernel, while the
+.Sq kernel_pps
+indicates the kernel discipline is provided by the PPS
+signal.
+.Pp
+The
+.Sq stability
+is the residual frequency error remaining
+after the 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
+.Va kern.clockrate.tick
+may be
+incorrect.
+.Pp
+The
+.Sq broadcastdelay
+shows the default broadcast delay,
+as set by the
+.Ic broadcastdelay
+configuration command.
+.Pp
+The
+.Sq authdelay
+shows the default authentication delay,
+as set by the
+.Ic authdelay
+configuration command.
+.It Ic sysstats
+Print statistics counters maintained in the protocol
+module.
+.It Ic memstats
+Print statistics counters related to memory allocation
+code.
+.It Ic iostats
+Print statistics counters maintained in the input\-output
+module.
+.It Ic timerstats
+Print statistics counters maintained in the timer/event queue
+support code.
+.It Ic reslist
+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.
+.It Ic monlist Op Ar version
+Obtain and print traffic counts collected and maintained by the
+monitor facility.
+The version number should not normally need to be
+specified.
+.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc
+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.
+.El
+.Ss "Runtime Configuration Requests"
+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
+.Nm .
+This can be done using the
+.Ic keyid
+and
+.Ic 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.
+.Pp
+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.
+.Pp
+The following commands all make authenticated requests.
+.Bl -tag -width indent
+.It Xo Ic addpeer Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+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
+.Ar keyid
+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
+.Ar version
+can be 1, 2 or 3 and defaults to 3.
+The
+.Cm prefer
+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.
+.It Xo Ic addserver Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is client.
+.It Xo Ic broadcast Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is broadcast.
+In this case a valid key identifier and key are
+required.
+The
+.Ar peer_address
+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.
+.It Ic unconfig Ar peer_address Oo Ar ... Oc
+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.
+.It Xo Ic fudge Ar peer_address
+.Op Cm time1
+.Op Cm time2
+.Op Ar stratum
+.Op Ar refid
+.Xc
+This command provides a way to set certain data for a reference
+clock.
+See the source listing for further information.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+These commands operate in the same way as the
+.Ic enable
+and
+.Ic disable
+configuration file commands of
+.Xr ntpd 1ntpdmdoc .
+.Bl -tag -width indent
+.It Cm auth
+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.
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the multicastclient command with
+default address.
+The default for this flag is disable.
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for this flag is disable.
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this flag is enable if support is available, otherwise disable.
+.It Cm monitor
+Enables the monitoring facility.
+See the documentation here about the
+.Cm monlist
+command or further information.
+The default for this flag is enable.
+.It Cm ntp
+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.
+.It Cm pps
+Enables the pulse\-per\-second (PPS) signal when frequency
+and time is disciplined by the precision time kernel modifications.
+See the
+.Qq A Kernel Model for Precision Timekeeping
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page for further information.
+The default for this flag is disable.
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section of
+.Xr ntp.conf 5
+for further information.
+The default for this flag is disable.
+.El
+.It Xo Ic restrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+This command operates in the same way as the
+.Ic restrict
+configuration file commands of
+.Xr ntpd 1ntpdmdoc .
+.It Xo Ic unrestrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+Unrestrict the matching entry from the restrict list.
+.It Xo Ic delrestrict Ar address Ar mask
+.Op Cm ntpport
+.Xc
+Delete the matching entry from the restrict list.
+.It Ic readkeys
+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
+.Xr ntpd 1ntpdmdoc
+configuration file).
+This
+allows encryption keys to be changed without restarting the
+server.
+.It Ic trustedkey Ar keyid Oo Ar ... Oc
+.It Ic untrustedkey Ar keyid Oo Ar ... Oc
+These commands operate in the same way as the
+.Ic trustedkey
+and
+.Ic untrustedkey
+configuration file
+commands of
+.Xr ntpd 1ntpdmdoc .
+.It Ic authinfo
+Returns information concerning the authentication module,
+including known keys and counts of encryptions and decryptions
+which have been done.
+.It Ic traps
+Display the traps set in the server.
+See the source listing for
+further information.
+.It Xo Ic addtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Set a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Xo Ic clrtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Clear a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Ic reset
+Clear the statistics counters in various modules of the server.
+See the source listing for further information.
+.El
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpd 1ntpdmdoc
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+.Sh AUTHORS
+The formatting directives in this document came from FreeBSD.
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The
+.Nm
+utility 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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
+option definitions.
diff --git a/ntpdc/ntpdc.c b/ntpdc/ntpdc.c
index bffaf09a02c1..35951841e81a 100644
--- a/ntpdc/ntpdc.c
+++ b/ntpdc/ntpdc.c
@@ -1,31 +1,38 @@
/*
* ntpdc - control and monitor your ntpd daemon
*/
-
+#include <config.h>
#include <stdio.h>
#include <stddef.h>
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#ifdef SYS_WINNT
+# include <mswsock.h>
+#endif
+#include <isc/net.h>
+#include <isc/result.h>
#include "ntpdc.h"
#include "ntp_select.h"
-#include "ntp_io.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
#include "ntp_lineedit.h"
-#include "isc/net.h"
-#include "isc/result.h"
+#ifdef OPENSSL
+#include "openssl/evp.h"
+#include "openssl/objects.h"
+#endif
#include <ssl_applink.c>
#include "ntp_libopts.h"
#include "ntpdc-opts.h"
-#ifdef SYS_WINNT
-# include <Mswsock.h>
-# include <io.h>
-#endif /* SYS_WINNT */
-
#ifdef SYS_VXWORKS
/* vxWorks needs mode flag -casey*/
# define open(name, flags) open(name, flags, 0777)
@@ -216,11 +223,6 @@ static const char *chosts[MAXHOSTS];
#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;
@@ -237,7 +239,6 @@ static FILE *current_output;
extern struct xcmd opcmds[];
char *progname;
-volatile int debug;
#ifdef NO_MAIN_ALLOWED
CALL(ntpdc,"ntpdc",ntpdcmain);
@@ -271,7 +272,6 @@ ntpdcmain(
char *argv[]
)
{
- extern int ntp_optind;
delay_time.l_ui = 0;
delay_time.l_uf = DEFDELAY;
@@ -283,6 +283,7 @@ ntpdcmain(
init_lib(); /* sets up ipv4_works, ipv6_works */
ssl_applink();
+ init_auth();
/* Check to see if we have IPv6. Otherwise default to IPv4 */
if (!ipv6_works)
@@ -312,7 +313,7 @@ ntpdcmain(
}
}
- debug = DESC(DEBUG_LEVEL).optOccCt;
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
if (HAVE_OPT(INTERACTIVE)) {
interactive = 1;
@@ -346,62 +347,6 @@ ntpdcmain(
interactive = 1;
}
-#if 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;
- }
-#endif
-
#ifndef SYS_WINNT /* Under NT cannot handle SIGINT, WIN32 spawns a handler */
if (interactive)
(void) signal_no_reset(SIGINT, abortcmd);
@@ -447,6 +392,8 @@ openhost(
char temphost[LENHOSTNAME];
int a_info, i;
struct addrinfo hints, *ai = NULL;
+ sockaddr_u addr;
+ size_t octets;
register const char *cp;
char name[LENHOSTNAME];
char service[5];
@@ -476,8 +423,8 @@ openhost(
* 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));
+ strlcpy(service, "ntp", sizeof(service));
+ ZERO(hints);
hints.ai_family = ai_fam_templ;
hints.ai_protocol = IPPROTO_UDP;
hints.ai_socktype = SOCK_DGRAM;
@@ -501,7 +448,7 @@ openhost(
a_info = getaddrinfo(hname, service, &hints, &ai);
}
if (a_info != 0) {
- (void) fprintf(stderr, "%s\n", gai_strerror(a_info));
+ fprintf(stderr, "%s\n", gai_strerror(a_info));
if (ai != NULL)
freeaddrinfo(ai);
return 0;
@@ -511,30 +458,29 @@ openhost(
* getaddrinfo() has returned without error so ai should not
* be NULL.
*/
- NTP_INSIST(ai != NULL);
+ INSIST(ai != NULL);
+ ZERO(addr);
+ octets = min(sizeof(addr), ai->ai_addrlen);
+ memcpy(&addr, ai->ai_addr, octets);
- if (ai->ai_canonname == NULL) {
- strncpy(temphost, stoa((sockaddr_u *)ai->ai_addr),
- LENHOSTNAME);
- temphost[LENHOSTNAME-1] = '\0';
- } else {
- strncpy(temphost, ai->ai_canonname, LENHOSTNAME);
- temphost[LENHOSTNAME-1] = '\0';
- }
+ if (ai->ai_canonname == NULL)
+ strlcpy(temphost, stoa(&addr), sizeof(temphost));
+ else
+ strlcpy(temphost, ai->ai_canonname, sizeof(temphost));
if (debug > 2)
- printf("Opening host %s\n", temphost);
+ printf("Opening host %s\n", temphost);
if (havehost == 1) {
if (debug > 2)
- printf("Closing old host %s\n", currenthost);
- (void) closesocket(sockfd);
+ printf("Closing old host %s\n", currenthost);
+ closesocket(sockfd);
havehost = 0;
}
- (void) strcpy(currenthost, temphost);
+ strlcpy(currenthost, temphost, sizeof(currenthost));
/* port maps to the same in both families */
- s_port = ((struct sockaddr_in6 *)ai->ai_addr)->sin6_port;
+ s_port = NSRCPORT(&addr);;
#ifdef SYS_VXWORKS
((struct sockaddr_in6 *)&hostaddr)->sin6_port = htons(SERVER_PORT_NUM);
if (ai->ai_family == AF_INET)
@@ -556,18 +502,13 @@ openhost(
exit(1);
}
}
+#endif /* SYS_WINNT */
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
@@ -583,12 +524,13 @@ openhost(
#ifdef SYS_VXWORKS
if (connect(sockfd, (struct sockaddr *)&hostaddr,
- sizeof(hostaddr)) == -1)
+ sizeof(hostaddr)) == -1) {
#else
- if (connect(sockfd, (struct sockaddr *)ai->ai_addr,
- ai->ai_addrlen) == -1)
+ if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) == -1) {
#endif /* SYS_VXWORKS */
- error("connect", "", "");
+ error("connect", "", "");
+ exit(-1);
+ }
freeaddrinfo(ai);
havehost = 1;
@@ -623,8 +565,11 @@ sendpkt(
static void
growpktdata(void)
{
+ size_t priorsz;
+
+ priorsz = (size_t)pktdatasize;
pktdatasize += INCDATASIZE;
- pktdata = erealloc(pktdata, (size_t)pktdatasize);
+ pktdata = erealloc_zero(pktdata, (size_t)pktdatasize, priorsz);
}
@@ -671,7 +616,7 @@ getresponse(
numrecv = 0;
*rdata = datap = pktdata;
lastseq = 999; /* too big to be a sequence number */
- memset(haveseq, 0, sizeof(haveseq));
+ ZERO(haveseq);
FD_ZERO(&fds);
again:
@@ -725,35 +670,35 @@ getresponse(
*/
if (n < RESP_HEADER_SIZE) {
if (debug)
- printf("Short (%d byte) packet received\n", n);
+ 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));
+ 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));
+ 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");
+ printf("Encrypted packet received\n");
goto again;
}
if (!ISRESPONSE(rpkt.rm_vn_mode)) {
if (debug)
- printf("Received request packet, wanted response\n");
+ 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");
+ printf("Received packet with nonzero MBZ field!\n");
goto again;
}
@@ -762,7 +707,7 @@ getresponse(
*/
if (rpkt.implementation != implcode || rpkt.request != reqcode) {
if (debug)
- printf(
+ printf(
"Received implementation/request of %d/%d, wanted %d/%d",
rpkt.implementation, rpkt.request,
implcode, reqcode);
@@ -802,7 +747,7 @@ getresponse(
* If this isn't our first packet, make sure the size matches
* the other ones.
*/
- if (!firstpkt && esize != *rsize) {
+ if (!firstpkt && size != *rsize) {
if (debug)
printf("Received itemsize %d, previous %d\n",
size, *rsize);
@@ -844,11 +789,11 @@ getresponse(
* items. This is so we can play nice with older implementations
*/
- tmp_data = rpkt.data;
+ tmp_data = rpkt.u.data;
for (i = 0; i < items; i++) {
memcpy(datap, tmp_data, (unsigned)size);
tmp_data += size;
- memset(datap + size, 0, pad);
+ zero_mem(datap + size, pad);
datap += size + pad;
}
@@ -911,15 +856,14 @@ sendrequest(
int maclen;
char * pass;
- memset(&qpkt, 0, sizeof(qpkt));
-
+ ZERO(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 && qdata != NULL) {
- memcpy(qpkt.data, qdata, datasize);
+ memcpy(qpkt.u.data, qdata, datasize);
qpkt.err_nitems = ERR_NITEMS(0, qitems);
qpkt.mbz_itemsize = MBZ_ITEMSIZE(qsize);
} else {
@@ -1085,7 +1029,7 @@ again:
if (implcode == IMPL_XNTPD)
break;
(void) fprintf(stderr,
- "***Server implementation incompatable with our own\n");
+ "***Server implementation incompatible with our own\n");
break;
case INFO_ERR_REQ:
(void) fprintf(stderr,
@@ -1179,6 +1123,11 @@ docmd(
/*
* Tokenize the command line. If nothing on it, return.
*/
+ if (strlen(cmdline) >= MAXLINE) {
+ fprintf(stderr, "***Command ignored, more than %d characters:\n%s\n",
+ MAXLINE - 1, cmdline);
+ return;
+ }
tokenize(cmdline, tokens, &ntok);
if (ntok == 0)
return;
@@ -1396,8 +1345,7 @@ getarg(
char *cp, *np;
static const char *digits = "0123456789";
- memset(argp, 0, sizeof(*argp));
-
+ ZERO(*argp);
argp->string = str;
argp->type = code & ~OPT;
@@ -1496,15 +1444,13 @@ getnetnum(
NTP_INSIST(sizeof(*num) >= ai->ai_addrlen);
memcpy(num, ai->ai_addr, ai->ai_addrlen);
if (fullhost != NULL) {
- if (ai->ai_canonname != NULL) {
- strncpy(fullhost, ai->ai_canonname,
+ if (ai->ai_canonname != NULL)
+ strlcpy(fullhost, ai->ai_canonname,
LENHOSTNAME);
- fullhost[LENHOSTNAME - 1] = '\0';
- } else {
+ else
getnameinfo(&num->sa, SOCKLEN(num),
fullhost, LENHOSTNAME, NULL,
0, 0);
- }
}
return 1;
}
@@ -1513,21 +1459,22 @@ getnetnum(
return 0;
}
+
/*
* nntohost - convert network number to host name. This routine enforces
* the showhostnames setting.
*/
-char *
+const char *
nntohost(
sockaddr_u *netnum
)
{
- if (!showhostnames)
+ if (!showhostnames || SOCK_UNSPEC(netnum))
return stoa(netnum);
-
- if (ISREFCLOCKADR(netnum))
+ else if (ISREFCLOCKADR(netnum))
return refnumtoa(netnum);
- return socktohost(netnum);
+ else
+ return socktohost(netnum);
}
@@ -1561,8 +1508,7 @@ help(
for (xcp = opcmds; xcp->keyword != 0; xcp++)
list[words++] = xcp->keyword;
- qsort((void *)list, (size_t)words, sizeof(list[0]),
- helpsort);
+ qsort((void *)list, words, sizeof(list[0]), helpsort);
col = 0;
for (word = 0; word < words; word++) {
length = strlen(list[word]);
@@ -1576,7 +1522,8 @@ help(
for (row = 0; row < rows; row++) {
for (word = row; word < words; word += rows)
- fprintf(fp, "%-*.*s", col, col-1, list[word]);
+ fprintf(fp, "%-*.*s", (int)col,
+ (int)col - 1, list[word]);
fprintf(fp, "\n");
}
} else {
@@ -1824,20 +1771,17 @@ passwd(
return;
}
}
- if (!interactive) {
- authusekey(info_auth_keyid, info_auth_keytype,
- (u_char *)pcmd->argval[0].string);
- authtrust(info_auth_keyid, 1);
- } else {
+ if (pcmd->nargs >= 1)
+ pass = pcmd->argval[0].string;
+ else {
pass = getpass_keytype(info_auth_keytype);
- 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);
+ if ('\0' == *pass) {
+ fprintf(fp, "Password unchanged\n");
+ return;
}
}
+ authusekey(info_auth_keyid, info_auth_keytype, (u_char *)pass);
+ authtrust(info_auth_keyid, 1);
}
diff --git a/ntpdc/ntpdc.h b/ntpdc/ntpdc.h
index 9d41a70ccd59..bfc222863f39 100644
--- a/ntpdc/ntpdc.h
+++ b/ntpdc/ntpdc.h
@@ -64,4 +64,4 @@ extern int showhostnames;
extern int s_port;
extern int doquery (int, int, int, int, int, char *, int *, int *, char **, int, int);
-extern char * nntohost (sockaddr_u *);
+extern const char * nntohost (sockaddr_u *);
diff --git a/ntpdc/ntpdc.html b/ntpdc/ntpdc.html
new file mode 100644
index 000000000000..3e450ce049dc
--- /dev/null
+++ b/ntpdc/ntpdc.html
@@ -0,0 +1,515 @@
+<html lang="en">
+<head>
+<title>ntpdc: NTPD Control User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpdc: NTPD Control User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpdc: NTPD Control User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Description">ntpdc Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">ntpdc: NTPD Control User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>ntpdc</code> program,
+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 cron job.
+
+ <p>This document applies to version 4.2.8 of <code>ntpdc</code>.
+
+ <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
+IETF specification.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">ntpdc: NTPD Control User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpdc-Description">ntpdc Description</a>: Description
+<li><a accesskey="2" href="#ntpdc-Invocation">ntpdc Invocation</a>: Invoking ntpdc
+<li><a accesskey="3" href="#Usage">Usage</a>: Usage
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-Description"></a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the
+standard output in the format:
+
+<pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
+</pre>
+ <p>where
+YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
+(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
+and
+the +4.567 +/- 0.089 secs indicates the time offset and
+error bound of the system clock relative to the server clock.
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntpdc</h3>
+
+<p><a name="index-ntpdc-1"></a><a name="index-vendor_002dspecific-NTPD-control-program-2"></a>
+
+ <p><code>ntpdc</code>
+is deprecated.
+Please use
+<code>ntpq(1ntpqmdoc)</code> instead - it can do everything
+<code>ntpdc</code>
+used to do, and it does so using a much more sane interface.
+
+ <p><code>ntpdc</code>
+is a utility program used to query
+<code>ntpd(1ntpdmdoc)</code>
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+<code>ntpdc</code>
+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
+<code>ntpdc</code>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpdc-usage">ntpdc usage</a>: ntpdc help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntpdc-ipv4">ntpdc ipv4</a>: ipv4 option (-4)
+<li><a accesskey="3" href="#ntpdc-ipv6">ntpdc ipv6</a>: ipv6 option (-6)
+<li><a accesskey="4" href="#ntpdc-command">ntpdc command</a>: command option (-c)
+<li><a accesskey="5" href="#ntpdc-interactive">ntpdc interactive</a>: interactive option (-i)
+<li><a accesskey="6" href="#ntpdc-listpeers">ntpdc listpeers</a>: listpeers option (-l)
+<li><a accesskey="7" href="#ntpdc-numeric">ntpdc numeric</a>: numeric option (-n)
+<li><a accesskey="8" href="#ntpdc-peers">ntpdc peers</a>: peers option (-p)
+<li><a accesskey="9" href="#ntpdc-showpeers">ntpdc showpeers</a>: showpeers option (-s)
+<li><a href="#ntpdc-config">ntpdc config</a>: presetting/configuring ntpdc
+<li><a href="#ntpdc-exit-status">ntpdc exit status</a>: exit status
+<li><a href="#ntpdc-Usage">ntpdc Usage</a>: Usage
+<li><a href="#ntpdc-See-Also">ntpdc See Also</a>: See Also
+<li><a href="#ntpdc-Authors">ntpdc Authors</a>: Authors
+<li><a href="#ntpdc-Bugs">ntpdc Bugs</a>: Bugs
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv4">ntpdc ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntpdc-help-3"></a>
+This is the automatically generated usage text for ntpdc.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8
+Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -c Str command run a command and exit
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -i no interactive Force ntpq to operate in interactive mode
+ - prohibits these options:
+ command
+ listpeers
+ peers
+ showpeers
+ -l no listpeers Print a list of the peers
+ - prohibits the option 'command'
+ -n no numeric numeric host addresses
+ -p no peers Print a list of the peers
+ - prohibits the option 'command'
+ -s no showpeers Show a list of the peers
+ - prohibits the option 'command'
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -&gt; opt save-opts save the option state to a config file
+ -&lt; Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTPDC_*
+
+Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntpdc-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv6">ntpdc ipv6</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-usage">ntpdc usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv4 option (-4)</h4>
+
+<p><a name="index-ntpdc_002dipv4-4"></a>
+This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpdc-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-command">ntpdc command</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv4">ntpdc ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv6 option (-6)</h4>
+
+<p><a name="index-ntpdc_002dipv6-5"></a>
+This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv4.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpdc-command"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-interactive">ntpdc interactive</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv6">ntpdc ipv6</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">command option (-c)</h4>
+
+<p><a name="index-ntpdc_002dcommand-6"></a>
+This is the &ldquo;run a command and exit&rdquo; option.
+This option takes a string argument <span class="file">cmd</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>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).
+<div class="node">
+<p><hr>
+<a name="ntpdc-interactive"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-listpeers">ntpdc listpeers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-command">ntpdc command</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">interactive option (-i)</h4>
+
+<p><a name="index-ntpdc_002dinteractive-7"></a>
+This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+</ul>
+
+ <p>Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+<div class="node">
+<p><hr>
+<a name="ntpdc-listpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-numeric">ntpdc numeric</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-interactive">ntpdc interactive</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">listpeers option (-l)</h4>
+
+<p><a name="index-ntpdc_002dlistpeers-8"></a>
+This is the &ldquo;print a list of the peers&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+command.
+</ul>
+
+ <p>Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+<div class="node">
+<p><hr>
+<a name="ntpdc-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-peers">ntpdc peers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-listpeers">ntpdc listpeers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">numeric option (-n)</h4>
+
+<p><a name="index-ntpdc_002dnumeric-9"></a>
+This is the &ldquo;numeric host addresses&rdquo; option.
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+<div class="node">
+<p><hr>
+<a name="ntpdc-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-showpeers">ntpdc showpeers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-numeric">ntpdc numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">peers option (-p)</h4>
+
+<p><a name="index-ntpdc_002dpeers-10"></a>
+This is the &ldquo;print a list of the peers&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+command.
+</ul>
+
+ <p>Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+<div class="node">
+<p><hr>
+<a name="ntpdc-showpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-config">ntpdc config</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-peers">ntpdc peers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">showpeers option (-s)</h4>
+
+<p><a name="index-ntpdc_002dshowpeers-11"></a>
+This is the &ldquo;show a list of the peers&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+command.
+</ul>
+
+ <p>Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-exit-status">ntpdc exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-showpeers">ntpdc showpeers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">presetting/configuring ntpdc</h4>
+
+<p>Any option that is not marked as <i>not presettable</i> may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
+the options listed above in upper case and segmented with underscores.
+The <code>NTPDC</code> variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
+ <ul>
+<li>$HOME
+<li>$PWD
+</ul>
+ The environment variables <code>HOME</code>, and <code>PWD</code>
+are expanded and replaced when <span class="file">ntpdc</span> runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+within that directory and processed.
+
+ <p>Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+ <p>Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+<pre class="example"> [NTPDC]
+</pre>
+ <p class="noindent">or by
+<pre class="example"> &lt;?program ntpdc&gt;
+</pre>
+ <p class="noindent">Do not mix these styles within one configuration file.
+
+ <p>Compound values and carefully constructed string values may also be
+specified using XML syntax:
+<pre class="example"> &lt;option-name&gt;
+ &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
+ &lt;/option-name&gt;
+</pre>
+ <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
+<pre class="example"> "...&lt;...&gt;..."
+</pre>
+ <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
+hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+ <p>The command line options relating to configuration and/or usage help are:
+
+<h5 class="subsubheading">version (-)</h5>
+
+<p>Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+ <dl>
+<dt><span class="samp">version</span><dd>Only print the version. This is the default.
+<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
+<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</dl>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Usage">ntpdc Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-config">ntpdc config</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
+<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="ntpdc-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-See-Also">ntpdc See Also</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-exit-status">ntpdc exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Authors">ntpdc Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Usage">ntpdc Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc See Also</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Bugs">ntpdc Bugs</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-See-Also">ntpdc See Also</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc Authors</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntpdc-Bugs"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Authors">ntpdc Authors</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpdc Bugs</h4>
+
+<div class="node">
+<p><hr>
+<a name="Usage"></a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Usage</h3>
+
+<p>The simplest use of this program is as an unprivileged command to
+check the current time, offset, and error in the local clock.
+For example:
+
+<pre class="example"> ntpdc ntpserver.somewhere
+</pre>
+ <p>With suitable privilege, it can be run as a command or in a
+<code>cron</code> job to reset the local clock from a reliable server, like
+the <code>ntpdate</code> and <code>rdate</code> commands.
+For example:
+
+<pre class="example"> ntpdc -a ntpserver.somewhere
+</pre>
+ </body></html>
+
diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in
new file mode 100644
index 000000000000..f3814324b868
--- /dev/null
+++ b/ntpdc/ntpdc.man.in
@@ -0,0 +1,874 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpdc @NTPDC_MS@ "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Fraief/ag-Rraadf)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:38 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpdc-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpdc\fP
+\- vendor-specific NTPD control program
+.SH SYNOPSIS
+\f\*[B-Font]ntpdc\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ host ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpdc\fP
+is deprecated.
+Please use
+\fCntpq\fR(@NTPQ_MS@)\f[] instead \- it can do everything
+\f\*[B-Font]ntpdc\fP
+used to do, and it does so using a much more sane interface.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntpdc\fP
+is a utility program used to query
+\fCntpd\fR(@NTPD_MS@)\f[]
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+\f\*[B-Font]ntpdc\fP
+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
+\f\*[B-Font]ntpdc\fP.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+.sp
+Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+.TP
+.NOP \f\*[B-Font]\-l\f[], \f\*[B-Font]\-\-listpeers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+numeric host addresses.
+.sp
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-showpeers\f[]
+Show a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPDC_<option-name>\fP or \fBNTPDC\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+If one or more request options are included on the command line
+when
+\f\*[B-Font]ntpdc\fP
+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,
+\f\*[B-Font]ntpdc\fP
+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.
+The
+\f\*[B-Font]ntpdc\fP
+utility will prompt for
+commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntpdc\fP
+utility 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.
+The
+\f\*[B-Font]ntpdc\fP
+utility makes
+no attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+.sp \n(Ppu
+.ne 2
+
+The operation of
+\f\*[B-Font]ntpdc\fP
+are specific to the particular
+implementation of the
+\fCntpd\fR(@NTPD_MS@)\f[]
+daemon and can be expected to
+work only with this and maybe some previous versions of the daemon.
+Requests from a remote
+\f\*[B-Font]ntpdc\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
+while a
+\f\*[B-Font]\-6\f[]
+qualifier forces DNS resolution to the IPv6 namespace.
+Specifying a command line option other than
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-n\f[]
+will cause the specified query (queries) to be sent to
+the indicated host(s) immediately.
+Otherwise,
+\f\*[B-Font]ntpdc\fP
+will
+attempt to read interactive format commands from the standard
+input.
+.SS "Interactive Commands"
+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
+\[oq]\&>\[cq],
+followed by a file name, to the command line.
+.sp \n(Ppu
+.ne 2
+
+A number of interactive format commands are executed entirely
+within the
+\f\*[B-Font]ntpdc\fP
+utility itself and do not result in NTP
+mode 7 requests being sent to a server.
+These are described
+following.
+.TP 7
+.NOP \f\*[B-Font]\&?\f[] \f\*[I-Font]command_keyword\f[]
+.TP 7
+.NOP \f\*[B-Font]help\f[] \f\*[I-Font]command_keyword\f[]
+A
+\[oq]\f\*[B-Font]\&?\f[]\[cq]
+will print a list of all the command
+keywords known to this incarnation of
+\f\*[B-Font]ntpdc\fP.
+A
+\[oq]\f\*[B-Font]\&?\f[]\[cq]
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+\fCntpq\fR(@NTPQ_MS@)\f[]
+than this manual
+page.
+.TP 7
+.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+Set the host to which future queries will be sent.
+Hostname may
+be either a host name or a numeric address.
+.TP 7
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+If
+\f\*[B-Font]yes\f[]
+is specified, host names are printed in
+information displays.
+If
+\f\*[B-Font]no\f[]
+is specified, numeric
+addresses are printed instead.
+The default is
+\f\*[B-Font]yes\f[],
+unless
+modified using the command line
+\f\*[B-Font]\-n\f[]
+switch.
+.TP 7
+.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]quit\f[]
+Exit
+\f\*[B-Font]ntpdc\fP.
+.TP 7
+.NOP \f\*[B-Font]passwd\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+Specify a timeout period for responses to server queries.
+The
+default is about 8000 milliseconds.
+Note that since
+\f\*[B-Font]ntpdc\fP
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.PP
+.SS "Control Message Commands"
+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.
+.TP 7
+.NOP \f\*[B-Font]listpeers\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]peers\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The character in the left margin indicates the mode this peer
+entry is operating in.
+A
+\[oq]\&+\[cq]
+denotes symmetric active, a
+\[oq]\&-\[cq]
+indicates symmetric passive, a
+\[oq]\&=\[cq]
+means the
+remote server is being polled in client mode, a
+\[oq]\&^\[cq]
+indicates that the server is broadcasting to this address, a
+\[oq]\&~\[cq]
+denotes that the remote peer is sending broadcasts and a
+\[oq]\&~\[cq]
+denotes that the remote peer is sending broadcasts and a
+\[oq]\&*\[cq]
+marks the peer the server is currently synchronizing
+to.
+.sp \n(Ppu
+.ne 2
+
+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
+\fBREFCLK\fR()\f[]
+On
+\f\*[B-Font]hostnames\f[]
+\f\*[B-Font]no\f[]
+only IP-addresses
+will be displayed.
+.TP 7
+.NOP \f\*[B-Font]dmpeers\f[]
+A slightly different peer summary list.
+Identical to the output
+of the
+\f\*[B-Font]peers\f[]
+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
+\[oq]\&.\[cq]
+indicates that this peer was cast off in the falseticker
+detection, while a
+\[oq]\&+\[cq]
+indicates that the peer made it
+through.
+A
+\[oq]\&*\[cq]
+denotes the peer the server is currently
+synchronizing with.
+.TP 7
+.NOP \f\*[B-Font]showpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+Show per-peer statistic counters associated with the specified
+peer(s).
+.TP 7
+.NOP \f\*[B-Font]clockstat\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
+Obtain and print information concerning a peer clock.
+The
+values obtained provide information on the setting of fudge factors
+and other clock performance information.
+.TP 7
+.NOP \f\*[B-Font]kerninfo\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]loopinfo\f[] [\f\*[B-Font]oneline\f[] | \f\*[B-Font]multiline\f[]]
+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
+\[oq]offset\[cq]
+is the last offset given to the
+loop filter by the packet processing code.
+The
+\[oq]frequency\[cq]
+is the frequency error of the local clock in parts-per-million
+(ppm).
+The
+\[oq]time_const\[cq]
+controls the stiffness of the
+phase-lock loop and thus the speed at which it can adapt to
+oscillator drift.
+The
+\[oq]watchdog timer\[cq]
+value is the number
+of seconds which have elapsed since the last sample offset was
+given to the loop filter.
+The
+\f\*[B-Font]oneline\f[]
+and
+\f\*[B-Font]multiline\f[]
+options specify the format in which this
+information is to be printed, with
+\f\*[B-Font]multiline\f[]
+as the
+default.
+.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]system flags\[cq]
+show various system flags, some of
+which can be set and cleared by the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+configuration commands, respectively.
+These are
+the
+\f\*[B-Font]auth\f[],
+\f\*[B-Font]bclient\f[],
+\f\*[B-Font]monitor\f[],
+\f\*[B-Font]pll\f[],
+\f\*[B-Font]pps\f[]
+and
+\f\*[B-Font]stats\f[]
+flags.
+See the
+\fCntpd\fR(@NTPD_MS@)\f[]
+documentation for the meaning of these flags.
+There
+are two additional flags which are read only, the
+\f\*[B-Font]kernel_pll\f[]
+and
+\f\*[B-Font]kernel_pps\f[].
+These flags indicate
+the synchronization status when the precision time kernel
+modifications are in use.
+The
+\[oq]kernel_pll\[cq]
+indicates that
+the local clock is being disciplined by the kernel, while the
+\[oq]kernel_pps\[cq]
+indicates the kernel discipline is provided by the PPS
+signal.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]stability\[cq]
+is the residual frequency error remaining
+after the 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
+\fIkern.clockrate.tick\f[]
+may be
+incorrect.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]broadcastdelay\[cq]
+shows the default broadcast delay,
+as set by the
+\f\*[B-Font]broadcastdelay\f[]
+configuration command.
+.sp \n(Ppu
+.ne 2
+
+The
+\[oq]authdelay\[cq]
+shows the default authentication delay,
+as set by the
+\f\*[B-Font]authdelay\f[]
+configuration command.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Print statistics counters maintained in the protocol
+module.
+.TP 7
+.NOP \f\*[B-Font]memstats\f[]
+Print statistics counters related to memory allocation
+code.
+.TP 7
+.NOP \f\*[B-Font]iostats\f[]
+Print statistics counters maintained in the input-output
+module.
+.TP 7
+.NOP \f\*[B-Font]timerstats\f[]
+Print statistics counters maintained in the timer/event queue
+support code.
+.TP 7
+.NOP \f\*[B-Font]reslist\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]monlist\f[] [\f\*[I-Font]version\f[]]
+Obtain and print traffic counts collected and maintained by the
+monitor facility.
+The version number should not normally need to be
+specified.
+.TP 7
+.NOP \f\*[B-Font]clkbug\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.PP
+.SS "Runtime Configuration Requests"
+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
+\f\*[B-Font]ntpdc\fP.
+This can be done using the
+\f\*[B-Font]keyid\f[]
+and
+\f\*[B-Font]passwd\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The following commands all make authenticated requests.
+.TP 7
+.NOP \f\*[B-Font]addpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+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
+\f\*[I-Font]keyid\f[]
+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
+\f\*[I-Font]version\f[]
+can be 1, 2 or 3 and defaults to 3.
+The
+\f\*[B-Font]prefer\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]addserver\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+Identical to the addpeer command, except that the operating
+mode is client.
+.TP 7
+.NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
+Identical to the addpeer command, except that the operating
+mode is broadcast.
+In this case a valid key identifier and key are
+required.
+The
+\f\*[I-Font]peer_address\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]unconfig\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]fudge\f[] \f\*[I-Font]peer_address\f[] [\f\*[B-Font]time1\f[]] [\f\*[B-Font]time2\f[]] [\f\*[I-Font]stratum\f[]] [\f\*[I-Font]refid\f[]]
+This command provides a way to set certain data for a reference
+clock.
+See the source listing for further information.
+.TP 7
+.NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
+.TP 7
+.NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
+These commands operate in the same way as the
+\f\*[B-Font]enable\f[]
+and
+\f\*[B-Font]disable\f[]
+configuration file commands of
+\fCntpd\fR(@NTPD_MS@)\f[].
+.RS
+.TP 7
+.NOP \f\*[B-Font]auth\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]bclient\f[]
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the multicastclient command with
+default address.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]calibrate\f[]
+Enables the calibrate feature for reference clocks.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]kernel\f[]
+Enables the kernel time discipline, if available.
+The default for this flag is enable if support is available, otherwise disable.
+.TP 7
+.NOP \f\*[B-Font]monitor\f[]
+Enables the monitoring facility.
+See the documentation here about the
+\f\*[B-Font]monlist\f[]
+command or further information.
+The default for this flag is enable.
+.TP 7
+.NOP \f\*[B-Font]ntp\f[]
+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.
+.TP 7
+.NOP \f\*[B-Font]pps\f[]
+Enables the pulse-per-second (PPS) signal when frequency
+and time is disciplined by the precision time kernel modifications.
+See the
+"A Kernel Model for Precision Timekeeping"
+(available as part of the HTML documentation
+provided in
+\fI/usr/share/doc/ntp\f[])
+page for further information.
+The default for this flag is disable.
+.TP 7
+.NOP \f\*[B-Font]stats\f[]
+Enables the statistics facility.
+See the
+\fIMonitoring\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[]
+for further information.
+The default for this flag is disable.
+.RE
+.TP 7
+.NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
+This command operates in the same way as the
+\f\*[B-Font]restrict\f[]
+configuration file commands of
+\fCntpd\fR(@NTPD_MS@)\f[].
+.TP 7
+.NOP \f\*[B-Font]unrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
+Unrestrict the matching entry from the restrict list.
+.TP 7
+.NOP \f\*[B-Font]delrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] [\f\*[B-Font]ntpport\f[]]
+Delete the matching entry from the restrict list.
+.TP 7
+.NOP \f\*[B-Font]readkeys\f[]
+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
+\fCntpd\fR(@NTPD_MS@)\f[]
+configuration file).
+This
+allows encryption keys to be changed without restarting the
+server.
+.TP 7
+.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
+.TP 7
+.NOP \f\*[B-Font]untrustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
+These commands operate in the same way as the
+\f\*[B-Font]trustedkey\f[]
+and
+\f\*[B-Font]untrustedkey\f[]
+configuration file
+commands of
+\fCntpd\fR(@NTPD_MS@)\f[].
+.TP 7
+.NOP \f\*[B-Font]authinfo\f[]
+Returns information concerning the authentication module,
+including known keys and counts of encryptions and decryptions
+which have been done.
+.TP 7
+.NOP \f\*[B-Font]traps\f[]
+Display the traps set in the server.
+See the source listing for
+further information.
+.TP 7
+.NOP \f\*[B-Font]addtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
+Set a trap for asynchronous messages.
+See the source listing
+for further information.
+.TP 7
+.NOP \f\*[B-Font]clrtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
+Clear a trap for asynchronous messages.
+See the source listing
+for further information.
+.TP 7
+.NOP \f\*[B-Font]reset\f[]
+Clear the statistics counters in various modules of the server.
+See the source listing for further information.
+.PP
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "SEE ALSO"
+\fCntp.conf\fR(5)\f[],
+\fCntpd\fR(@NTPD_MS@)\f[]
+David L. Mills,
+\fINetwork Time Protocol (Version 3)\fR,
+RFC1305
+.PP
+
+.SH AUTHORS
+The formatting directives in this document came from FreeBSD.
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+The
+\f\*[B-Font]ntpdc\fP
+utility 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.
+.sp \n(Ppu
+.ne 2
+
+Please report bugs to http://bugs.ntp.org .
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
+option definitions.
diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in
new file mode 100644
index 000000000000..ee074f162c05
--- /dev/null
+++ b/ntpdc/ntpdc.mdoc.in
@@ -0,0 +1,809 @@
+.Dd December 19 2014
+.Dt NTPDC @NTPDC_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:49:44 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpdc-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpdc
+.Nd vendor-specific NTPD control program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ host ...]
+.Pp
+.Sh DESCRIPTION
+.Nm
+is deprecated.
+Please use
+.Xr ntpq @NTPQ_MS@ instead \- it can do everything
+.Nm
+used to do, and it does so using a much more sane interface.
+.Pp
+.Nm
+is a utility program used to query
+.Xr ntpd @NTPD_MS@
+about its
+current state and to request changes in that state.
+It uses NTP mode 7 control message formats described in the source code.
+The program may
+be run either in interactive mode or controlled using command line
+arguments.
+Extensive state and statistics information is available
+through the
+.Nm
+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
+.Nm .
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl i , Fl \-interactive
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, listpeers, peers, showpeers.
+.sp
+Force ntpq to operate in interactive mode. Prompts will be written
+to the standard output and commands read from the standard input.
+.It Fl l , Fl \-listpeers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary of
+their state. This is equivalent to the 'listpeers' interactive command.
+.It Fl n , Fl \-numeric
+numeric host addresses.
+.sp
+Output all host addresses in dotted\-quad numeric format rather than
+converting to the canonical host names.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl s , Fl \-showpeers
+Show a list of the peers.
+This option must not appear in combination with any of the following options:
+command.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'dmpeers' interactive command.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPDC_<option\-name>\fP or \fBNTPDC\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+If one or more request options are included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
+.Pp
+The
+.Nm
+utility 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.
+The
+.Nm
+utility makes
+no attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+.Pp
+The operation of
+.Nm
+are specific to the particular
+implementation of the
+.Xr ntpd @NTPD_MS@
+daemon and can be expected to
+work only with this and maybe some previous versions of the daemon.
+Requests from a remote
+.Nm
+utility 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.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
+while a
+.Fl 6
+qualifier forces DNS resolution to the IPv6 namespace.
+Specifying a command line option other than
+.Fl i
+or
+.Fl n
+will cause the specified query (queries) to be sent to
+the indicated host(s) immediately.
+Otherwise,
+.Nm
+will
+attempt to read interactive format commands from the standard
+input.
+.Ss "Interactive Commands"
+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
+.Ql \&> ,
+followed by a file name, to the command line.
+.Pp
+A number of interactive format commands are executed entirely
+within the
+.Nm
+utility itself and do not result in NTP
+mode 7 requests being sent to a server.
+These are described
+following.
+.Bl -tag -width indent
+.It Ic \&? Ar command_keyword
+.It Ic help Ar command_keyword
+A
+.Sq Ic \&?
+will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Sq Ic \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Xr ntpq @NTPQ_MS@
+than this manual
+page.
+.It Ic delay Ar milliseconds
+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.
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+Hostname may
+be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic quit
+Exit
+.Nm .
+.It Ic passwd
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 8000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.El
+.Ss "Control Message Commands"
+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.
+.Bl -tag -width indent
+.It Ic listpeers
+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.
+.It Ic peers
+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.
+.Pp
+The character in the left margin indicates the mode this peer
+entry is operating in.
+A
+.Ql \&+
+denotes symmetric active, a
+.Ql \&\-
+indicates symmetric passive, a
+.Ql \&=
+means the
+remote server is being polled in client mode, a
+.Ql \&^
+indicates that the server is broadcasting to this address, a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&~
+denotes that the remote peer is sending broadcasts and a
+.Ql \&*
+marks the peer the server is currently synchronizing
+to.
+.Pp
+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
+.Fn REFCLK "implementation_number" "parameter" .
+On
+.Ic hostnames
+.Cm no
+only IP\-addresses
+will be displayed.
+.It Ic dmpeers
+A slightly different peer summary list.
+Identical to the output
+of the
+.Ic peers
+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
+.Ql \&.
+indicates that this peer was cast off in the falseticker
+detection, while a
+.Ql \&+
+indicates that the peer made it
+through.
+A
+.Ql \&*
+denotes the peer the server is currently
+synchronizing with.
+.It Ic showpeer Ar peer_address Oo Ar ... Oc
+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.
+.It Ic pstats Ar peer_address Oo Ar ... Oc
+Show per\-peer statistic counters associated with the specified
+peer(s).
+.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc
+Obtain and print information concerning a peer clock.
+The
+values obtained provide information on the setting of fudge factors
+and other clock performance information.
+.It Ic kerninfo
+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.
+.It Ic loopinfo Op Cm oneline | Cm multiline
+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
+.Sq offset
+is the last offset given to the
+loop filter by the packet processing code.
+The
+.Sq frequency
+is the frequency error of the local clock in parts\-per\-million
+(ppm).
+The
+.Sq time_const
+controls the stiffness of the
+phase\-lock loop and thus the speed at which it can adapt to
+oscillator drift.
+The
+.Sq watchdog timer
+value is the number
+of seconds which have elapsed since the last sample offset was
+given to the loop filter.
+The
+.Cm oneline
+and
+.Cm multiline
+options specify the format in which this
+information is to be printed, with
+.Cm multiline
+as the
+default.
+.It Ic sysinfo
+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.
+.Pp
+The
+.Sq system flags
+show various system flags, some of
+which can be set and cleared by the
+.Ic enable
+and
+.Ic disable
+configuration commands, respectively.
+These are
+the
+.Cm auth ,
+.Cm bclient ,
+.Cm monitor ,
+.Cm pll ,
+.Cm pps
+and
+.Cm stats
+flags.
+See the
+.Xr ntpd @NTPD_MS@
+documentation for the meaning of these flags.
+There
+are two additional flags which are read only, the
+.Cm kernel_pll
+and
+.Cm kernel_pps .
+These flags indicate
+the synchronization status when the precision time kernel
+modifications are in use.
+The
+.Sq kernel_pll
+indicates that
+the local clock is being disciplined by the kernel, while the
+.Sq kernel_pps
+indicates the kernel discipline is provided by the PPS
+signal.
+.Pp
+The
+.Sq stability
+is the residual frequency error remaining
+after the 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
+.Va kern.clockrate.tick
+may be
+incorrect.
+.Pp
+The
+.Sq broadcastdelay
+shows the default broadcast delay,
+as set by the
+.Ic broadcastdelay
+configuration command.
+.Pp
+The
+.Sq authdelay
+shows the default authentication delay,
+as set by the
+.Ic authdelay
+configuration command.
+.It Ic sysstats
+Print statistics counters maintained in the protocol
+module.
+.It Ic memstats
+Print statistics counters related to memory allocation
+code.
+.It Ic iostats
+Print statistics counters maintained in the input\-output
+module.
+.It Ic timerstats
+Print statistics counters maintained in the timer/event queue
+support code.
+.It Ic reslist
+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.
+.It Ic monlist Op Ar version
+Obtain and print traffic counts collected and maintained by the
+monitor facility.
+The version number should not normally need to be
+specified.
+.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc
+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.
+.El
+.Ss "Runtime Configuration Requests"
+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
+.Nm .
+This can be done using the
+.Ic keyid
+and
+.Ic 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.
+.Pp
+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.
+.Pp
+The following commands all make authenticated requests.
+.Bl -tag -width indent
+.It Xo Ic addpeer Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+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
+.Ar keyid
+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
+.Ar version
+can be 1, 2 or 3 and defaults to 3.
+The
+.Cm prefer
+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.
+.It Xo Ic addserver Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is client.
+.It Xo Ic broadcast Ar peer_address
+.Op Ar keyid
+.Op Ar version
+.Op Cm prefer
+.Xc
+Identical to the addpeer command, except that the operating
+mode is broadcast.
+In this case a valid key identifier and key are
+required.
+The
+.Ar peer_address
+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.
+.It Ic unconfig Ar peer_address Oo Ar ... Oc
+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.
+.It Xo Ic fudge Ar peer_address
+.Op Cm time1
+.Op Cm time2
+.Op Ar stratum
+.Op Ar refid
+.Xc
+This command provides a way to set certain data for a reference
+clock.
+See the source listing for further information.
+.It Xo Ic enable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+.It Xo Ic disable
+.Oo
+.Cm auth | Cm bclient |
+.Cm calibrate | Cm kernel |
+.Cm monitor | Cm ntp |
+.Cm pps | Cm stats
+.Oc
+.Xc
+These commands operate in the same way as the
+.Ic enable
+and
+.Ic disable
+configuration file commands of
+.Xr ntpd @NTPD_MS@ .
+.Bl -tag -width indent
+.It Cm auth
+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.
+.It Cm bclient
+Enables the server to listen for a message from a broadcast or
+multicast server, as in the multicastclient command with
+default address.
+The default for this flag is disable.
+.It Cm calibrate
+Enables the calibrate feature for reference clocks.
+The default for this flag is disable.
+.It Cm kernel
+Enables the kernel time discipline, if available.
+The default for this flag is enable if support is available, otherwise disable.
+.It Cm monitor
+Enables the monitoring facility.
+See the documentation here about the
+.Cm monlist
+command or further information.
+The default for this flag is enable.
+.It Cm ntp
+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.
+.It Cm pps
+Enables the pulse\-per\-second (PPS) signal when frequency
+and time is disciplined by the precision time kernel modifications.
+See the
+.Qq A Kernel Model for Precision Timekeeping
+(available as part of the HTML documentation
+provided in
+.Pa /usr/share/doc/ntp )
+page for further information.
+The default for this flag is disable.
+.It Cm stats
+Enables the statistics facility.
+See the
+.Sx Monitoring Options
+section of
+.Xr ntp.conf 5
+for further information.
+The default for this flag is disable.
+.El
+.It Xo Ic restrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+This command operates in the same way as the
+.Ic restrict
+configuration file commands of
+.Xr ntpd @NTPD_MS@ .
+.It Xo Ic unrestrict Ar address Ar mask
+.Ar flag Oo Ar ... Oc
+.Xc
+Unrestrict the matching entry from the restrict list.
+.It Xo Ic delrestrict Ar address Ar mask
+.Op Cm ntpport
+.Xc
+Delete the matching entry from the restrict list.
+.It Ic readkeys
+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
+.Xr ntpd @NTPD_MS@
+configuration file).
+This
+allows encryption keys to be changed without restarting the
+server.
+.It Ic trustedkey Ar keyid Oo Ar ... Oc
+.It Ic untrustedkey Ar keyid Oo Ar ... Oc
+These commands operate in the same way as the
+.Ic trustedkey
+and
+.Ic untrustedkey
+configuration file
+commands of
+.Xr ntpd @NTPD_MS@ .
+.It Ic authinfo
+Returns information concerning the authentication module,
+including known keys and counts of encryptions and decryptions
+which have been done.
+.It Ic traps
+Display the traps set in the server.
+See the source listing for
+further information.
+.It Xo Ic addtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Set a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Xo Ic clrtrap Ar address
+.Op Ar port
+.Op Ar interface
+.Xc
+Clear a trap for asynchronous messages.
+See the source listing
+for further information.
+.It Ic reset
+Clear the statistics counters in various modules of the server.
+See the source listing for further information.
+.El
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
+.Xr ntpd @NTPD_MS@
+.Rs
+.%A David L. Mills
+.%T Network Time Protocol (Version 3)
+.%O RFC1305
+.Re
+.Sh AUTHORS
+The formatting directives in this document came from FreeBSD.
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+The
+.Nm
+utility 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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
+option definitions.
diff --git a/ntpdc/ntpdc.texi b/ntpdc/ntpdc.texi
new file mode 100644
index 000000000000..3a828065ae6e
--- /dev/null
+++ b/ntpdc/ntpdc.texi
@@ -0,0 +1,88 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpdc.info
+@settitle ntpdc: NTPD Control User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's ntpdc, a program for
+controlling ntpd.
+@end ifinfo
+
+@direntry
+* ntpdc: (ntpdc). ntpd Control program
+@end direntry
+
+@titlepage
+@title ntpdc: NTPD Control User's Manual
+@subtitle ntpdc, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntpdc Description, (dir), (dir)
+@top ntpdc: NTPD Control User Manual
+
+This document describes the use of the NTP Project's @code{ntpdc} program,
+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 cron job.
+
+This document applies to version @value{VERSION} of @code{ntpdc}.
+
+The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
+IETF specification.
+
+@shortcontents
+
+@menu
+* ntpdc Description:: Description
+* ntpdc Invocation:: Invoking ntpdc
+* Usage:: Usage
+@end menu
+
+@node ntpdc Description
+@comment node-name, next, previous, up
+@section Description
+
+By default, @code{ntpdc} writes the local data and time (i.e., not UTC) to the
+standard output in the format:
+
+@example
+1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
+@end example
+
+where
+YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
+(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
+and
+the +4.567 +/- 0.089 secs indicates the time offset and
+error bound of the system clock relative to the server clock.
+
+@include invoke-ntpdc.texi
+
+@node Usage
+@comment node-name, next, previous, up
+@section Usage
+
+The simplest use of this program is as an unprivileged command to
+check the current time, offset, and error in the local clock.
+For example:
+
+@example
+ntpdc ntpserver.somewhere
+@end example
+
+With suitable privilege, it can be run as a command or in a
+@code{cron} job to reset the local clock from a reliable server, like
+the @code{ntpdate} and @code{rdate} commands.
+For example:
+
+@example
+ntpdc -a ntpserver.somewhere
+@end example
diff --git a/ntpdc/ntpdc_ops.c b/ntpdc/ntpdc_ops.c
index 9350c8ceaa86..b0e7af05b447 100644
--- a/ntpdc/ntpdc_ops.c
+++ b/ntpdc/ntpdc_ops.c
@@ -86,8 +86,8 @@ static void clockstat (struct parse *, FILE *);
static void fudge (struct parse *, FILE *);
static void clkbug (struct parse *, FILE *);
static void kerninfo (struct parse *, FILE *);
-static void get_if_stats (struct parse *, FILE *);
-static void do_if_reload (struct parse *, FILE *);
+static void get_if_stats (struct parse *, FILE *);
+static void do_if_reload (struct parse *, FILE *);
/*
* Commands we understand. Ntpdc imports this.
@@ -144,7 +144,7 @@ struct xcmd opcmds[] = {
{ "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 },
+ { "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 },
@@ -167,7 +167,7 @@ struct xcmd opcmds[] = {
{ "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", "...", "...", "..." },
+ { "io|sys|mem|timer|auth|ctl|allpeers", "...", "...", "..." },
"reset various subsystem statistics counters" },
{ "preset", preset, { NTP_ADD, OPT|NTP_ADD, OPT|NTP_ADD, OPT|NTP_ADD },
{ "peer_address", "peer2_addr", "peer3_addr", "peer4_addr" },
@@ -247,7 +247,7 @@ struct xcmd opcmds[] = {
*/
#define SET_ADDR(address, v6flag, v4addr, v6addr) \
do { \
- memset(&(address), 0, sizeof(address)); \
+ ZERO(address); \
if (v6flag) { \
AF(&(address)) = AF_INET6; \
SOCK_ADDR6(&(address)) = (v6addr); \
@@ -265,8 +265,8 @@ do { \
*/
#define SET_ADDRS(a1, a2, info, a1prefix, a2prefix) \
do { \
- memset(&(a1), 0, sizeof(a1)); \
- memset(&(a2), 0, sizeof(a2)); \
+ ZERO(a1); \
+ ZERO(a2); \
if ((info)->v6_flag) { \
AF(&(a1)) = AF_INET6; \
AF(&(a2)) = AF_INET6; \
@@ -284,31 +284,6 @@ do { \
/*
- * SET_ADDRS - setup source and destination addresses for
- * v4/v6 as needed
- */
-#if 0
-#define SET_ADDR_MASK(address, addrmask, info) \
-do { \
- memset(&(address), 0, sizeof(address)); \
- memset(&(mask), 0, sizeof(mask)); \
- if ((info)->v6_flag) { \
- AF(&(address)) = AF_INET6; \
- AF(&(addrmask)) = AF_INET6; \
- SOCK_ADDR6(&(address)) = (info)->addr6; \
- SOCK_ADDR6(&(addrmask)) = (info)->mask6; \
- } else { \
- AF(&(address)) = AF_INET; \
- AF(&(addrmask)) = AF_INET; \
- NSRCADR(&(address)) = (info)->addr; \
- NSRCADR(&(addrmask)) = (info)->mask; \
- } \
- SET_SS_LEN_IF_PRESENT(&(address)); \
- SET_SS_LEN_IF_PRESENT(&(addrmask)); \
-} while (0)
-#endif
-
-/*
* checkitems - utility to print a message if no items were returned
*/
static int
@@ -532,7 +507,7 @@ again:
}
/* Convert a refid & stratum (in host order) to a string */
-static char*
+static char *
refid_string(
u_int32 refid,
int stratum
@@ -541,7 +516,7 @@ refid_string(
if (stratum <= 1) {
static char junk[5];
junk[4] = 0;
- memmove(junk, (char *)&refid, 4);
+ memcpy(junk, &refid, 4);
return junk;
}
@@ -550,49 +525,56 @@ refid_string(
static void
print_pflag(
- FILE *fp,
- u_int32 flags
- )
+ FILE * fp,
+ u_int32 flags
+ )
{
- const char *str;
+ static const char none[] = "";
+ static const char comma[] = ",";
+ const char *dlim;
- if (flags == 0) {
- (void) fprintf(fp, " none\n");
- } else {
- str = "";
- if (flags & INFO_FLAG_SYSPEER) {
- (void) fprintf(fp, " system_peer");
- str = ",";
- }
- if (flags & INFO_FLAG_CONFIG) {
- (void) fprintf(fp, "%s config", str);
- str = ",";
- }
- if (flags & INFO_FLAG_REFCLOCK) {
- (void) fprintf(fp, "%s refclock", str);
- str = ",";
- }
- if (flags & INFO_FLAG_AUTHENABLE) {
- (void) fprintf(fp, "%s auth", str);
- str = ",";
- }
- if (flags & INFO_FLAG_BCLIENT) {
- (void) fprintf(fp, "%s bclient", str);
- str = ",";
- }
- if (flags & INFO_FLAG_PREFER) {
- (void) fprintf(fp, "%s prefer", str);
- str = ",";
- }
- if (flags & INFO_FLAG_IBURST) {
- (void) fprintf(fp, "%s iburst", str);
- str = ",";
- }
- if (flags & INFO_FLAG_BURST) {
- (void) fprintf(fp, "%s burst", str);
- }
- (void) fprintf(fp, "\n");
+ if (0 == flags) {
+ fprintf(fp, " none\n");
+ return;
+ }
+ dlim = none;
+ if (flags & INFO_FLAG_SYSPEER) {
+ fprintf(fp, " system_peer");
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_CONFIG) {
+ fprintf(fp, "%s config", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_REFCLOCK) {
+ fprintf(fp, "%s refclock", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_AUTHENABLE) {
+ fprintf(fp, "%s auth", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_PREFER) {
+ fprintf(fp, "%s prefer", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_IBURST) {
+ fprintf(fp, "%s iburst", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_BURST) {
+ fprintf(fp, "%s burst", dlim);
+ dlim = comma;
}
+ if (flags & INFO_FLAG_SEL_CANDIDATE) {
+ fprintf(fp, "%s candidate", dlim);
+ dlim = comma;
+ }
+ if (flags & INFO_FLAG_SHORTLIST) {
+ fprintf(fp, "%s shortlist", dlim);
+ dlim = comma;
+ }
+ fprintf(fp, "\n");
}
/*
* printpeer - print detail information for a peer
@@ -727,7 +709,7 @@ again:
}
pl->port = (u_short)s_port;
pl->hmode = pl->flags = 0;
- pl = (struct info_peer_list *)((char *)pl + sendsize);
+ pl = (void *)((char *)pl + sendsize);
}
res = doquery(impl_ver, REQ_PEER_INFO, 0, qitems,
@@ -740,19 +722,19 @@ again:
}
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
- return;
+ return;
if (!checkitemsize(itemsize, sizeof(struct info_peer)) &&
!checkitemsize(itemsize, v4sizeof(struct info_peer)))
- return;
+ return;
while (items-- > 0) {
printpeer(pp, fp);
if (items > 0)
- (void) fprintf(fp, "\n");
+ fprintf(fp, "\n");
pp++;
}
}
@@ -784,7 +766,7 @@ again:
else
sendsize = v4sizeof(struct info_peer_list);
- memset(plist, 0, sizeof(plist));
+ ZERO(plist);
qitemlim = min(pcmd->nargs, COUNTOF(plist));
for (qitems = 0, pl = plist; qitems < qitemlim; qitems++) {
@@ -803,7 +785,7 @@ again:
}
pl->port = (u_short)s_port;
pl->hmode = plist[qitems].flags = 0;
- pl = (struct info_peer_list *)((char *)pl + sendsize);
+ pl = (void *)((char *)pl + sendsize);
}
res = doquery(impl_ver, REQ_PEER_STATS, 0, qitems,
@@ -817,7 +799,7 @@ again:
}
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
return;
@@ -1441,7 +1423,7 @@ again:
if (res)
return;
- memset(&cpeer, 0, sizeof(cpeer));
+ ZERO(cpeer);
if (IS_IPV4(&pcmd->argval[0].netnum)) {
cpeer.peeraddr = NSRCADR(&pcmd->argval[0].netnum);
@@ -1528,7 +1510,7 @@ again:
SOCK_ADDR6(&pcmd->argval[qitems].netnum);
pl->v6_flag = 1;
}
- pl = (struct conf_unpeer *)((char *)pl + sendsize);
+ pl = (void *)((char *)pl + sendsize);
}
res = doquery(impl_ver, REQ_UNCONFIG, 1, qitems,
@@ -1667,7 +1649,7 @@ static struct resflags resflagsV3[] = {
{ "limited", RES_LIMITED },
{ "version", RES_VERSION },
{ "kod", RES_KOD },
- { "timeout", RES_TIMEOUT },
+ { "flake", RES_FLAKE },
{ "", 0 }
};
@@ -1675,6 +1657,7 @@ static struct resflags resflagsV3[] = {
static struct resflags resmflags[] = {
{ "ntpport", RESM_NTPONLY },
{ "interface", RESM_INTERFACE },
+ { "source", RESM_SOURCE },
{ "", 0 }
};
@@ -1696,8 +1679,8 @@ reslist(
int itemsize;
int res;
int skip;
- char *addr;
- char *mask;
+ const char *addr;
+ const char *mask;
struct resflags *rf;
u_int32 count;
u_short flags;
@@ -1716,26 +1699,26 @@ again:
}
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
- return;
+ return;
if (!checkitemsize(itemsize, sizeof(struct info_restrict)) &&
!checkitemsize(itemsize, v4sizeof(struct info_restrict)))
- return;
+ return;
- (void) fprintf(fp,
- " address mask count flags\n");
- (void) fprintf(fp,
- "=====================================================================\n");
+ fprintf(fp,
+ " address mask count flags\n");
+ fprintf(fp,
+ "=====================================================================\n");
while (items > 0) {
SET_ADDRS(resaddr, maskaddr, rl, addr, mask);
if (rl->v6_flag != 0) {
addr = nntohost(&resaddr);
} else {
- if ((rl->mask == (u_int32)0xffffffff))
+ if (rl->mask == (u_int32)0xffffffff)
addr = nntohost(&resaddr);
else
addr = stoa(&resaddr);
@@ -1756,29 +1739,33 @@ again:
while (rf->bit != 0) {
if (mflags & rf->bit) {
if (!res)
- (void) strcat(flagstr, comma);
+ strlcat(flagstr, comma,
+ sizeof(flagstr));
res = 0;
- (void) strcat(flagstr, rf->str);
+ strlcat(flagstr, rf->str,
+ sizeof(flagstr));
}
rf++;
}
rf = (impl_ver == IMPL_XNTPD_OLD)
- ? &resflagsV2[0]
- : &resflagsV3[0]
- ;
+ ? &resflagsV2[0]
+ : &resflagsV3[0];
+
while (rf->bit != 0) {
if (flags & rf->bit) {
if (!res)
- (void) strcat(flagstr, comma);
+ strlcat(flagstr, comma,
+ sizeof(flagstr));
res = 0;
- (void) strcat(flagstr, rf->str);
+ strlcat(flagstr, rf->str,
+ sizeof(flagstr));
}
rf++;
}
if (flagstr[0] == '\0')
- strcpy(flagstr, "none");
+ strlcpy(flagstr, "none", sizeof(flagstr));
if (!skip)
fprintf(fp, "%-15.15s %-15.15s %9lu %s\n",
@@ -1960,6 +1947,9 @@ monlist(
)
{
char *struct_star;
+ struct info_monitor *ml;
+ struct info_monitor_1 *m1;
+ struct old_info_monitor *oml;
sockaddr_u addr;
sockaddr_u dstadr;
int items;
@@ -1967,14 +1957,13 @@ monlist(
int res;
int version = -1;
- if (pcmd->nargs > 0) {
+ 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,
+ REQ_MON_GETLIST, 0, 0, 0, NULL,
&items, &itemsize, &struct_star,
(version < 0) ? (1 << INFO_ERR_REQ) : 0,
sizeof(struct info_monitor_1));
@@ -1985,57 +1974,57 @@ 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));
+ res = doquery(impl_ver, REQ_MON_GETLIST, 0, 0, 0, NULL,
+ &items, &itemsize, &struct_star, 0,
+ sizeof(struct info_monitor));
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
- return;
+ 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 rstr avgint lstint\n");
- (void) fprintf(fp,
- "===============================================================================\n");
+ m1 = (void *)struct_star;
+ fprintf(fp,
+ "remote address port local address count m ver rstr avgint lstint\n");
+ fprintf(fp,
+ "===============================================================================\n");
while (items > 0) {
- SET_ADDRS(dstadr, addr, ml, daddr, addr);
+ SET_ADDRS(dstadr, addr, m1, daddr, addr);
if ((pcmd->nargs == 0) ||
- ((pcmd->argval->ival == 6) && (ml->v6_flag != 0)) ||
- ((pcmd->argval->ival == 4) && (ml->v6_flag == 0)))
+ ((pcmd->argval->ival == 6) && (m1->v6_flag != 0)) ||
+ ((pcmd->argval->ival == 4) && (m1->v6_flag == 0)))
fprintf(fp,
"%-22.22s %5d %-15s %8lu %1u %1u %6lx %6lu %7lu\n",
nntohost(&addr),
- ntohs(ml->port),
+ ntohs(m1->port),
stoa(&dstadr),
- (u_long)ntohl(ml->count),
- ml->mode,
- ml->version,
- (u_long)ntohl(ml->restr),
- (u_long)ntohl(ml->lasttime),
- (u_long)ntohl(ml->firsttime));
- ml++;
+ (u_long)ntohl(m1->count),
+ m1->mode,
+ m1->version,
+ (u_long)ntohl(m1->restr),
+ (u_long)ntohl(m1->avg_int),
+ (u_long)ntohl(m1->last_int));
+ m1++;
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 rstr avgint lstint\n");
- (void) fprintf(fp,
- "===============================================================================\n");
+ ml = (void *) struct_star;
+ fprintf(fp,
+ " address port count mode ver rstr avgint lstint\n");
+ fprintf(fp,
+ "===============================================================================\n");
while (items > 0) {
SET_ADDR(dstadr, ml->v6_flag, ml->addr, ml->addr6);
if ((pcmd->nargs == 0) ||
((pcmd->argval->ival == 6) && (ml->v6_flag != 0)) ||
((pcmd->argval->ival == 4) && (ml->v6_flag == 0)))
- (void) fprintf(fp,
+ fprintf(fp,
"%-25.25s %5u %9lu %4u %2u %9lx %9lu %9lu\n",
nntohost(&dstadr),
ntohs(ml->port),
@@ -2043,27 +2032,28 @@ again:
ml->mode,
ml->version,
(u_long)ntohl(ml->restr),
- (u_long)ntohl(ml->lasttime),
- (u_long)ntohl(ml->firsttime));
+ (u_long)ntohl(ml->avg_int),
+ (u_long)ntohl(ml->last_int));
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");
+
+ oml = (void *)struct_star;
+ fprintf(fp,
+ " address port count mode version lasttime firsttime\n");
+ fprintf(fp,
+ "======================================================================\n");
while (items > 0) {
SET_ADDR(dstadr, oml->v6_flag, oml->addr, oml->addr6);
- (void) fprintf(fp, "%-20.20s %5u %9lu %4u %3u %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));
+ fprintf(fp, "%-20.20s %5u %9lu %4u %3u %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--;
}
@@ -2078,15 +2068,16 @@ again:
* Mapping between command line strings and stat reset flags
*/
struct statreset {
- const char *str;
- int flag;
+ const char * const str;
+ const int flag;
} sreset[] = {
+ { "allpeers", RESET_FLAG_ALLPEERS },
{ "io", RESET_FLAG_IO },
{ "sys", RESET_FLAG_SYS },
{ "mem", RESET_FLAG_MEM },
{ "timer", RESET_FLAG_TIMER },
{ "auth", RESET_FLAG_AUTH },
- { "allpeers", RESET_FLAG_ALLPEERS },
+ { "ctl", RESET_FLAG_CTL },
{ "", 0 }
};
@@ -2112,11 +2103,11 @@ reset(
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;
+ break;
}
if (sreset[i].flag == 0) {
- (void) fprintf(fp, "Flag %s unknown\n",
- pcmd->argval[res].string);
+ fprintf(fp, "Flag %s unknown\n",
+ pcmd->argval[res].string);
err++;
} else {
rflags.flags |= sreset[i].flag;
@@ -2187,7 +2178,7 @@ again:
SOCK_ADDR6(&pcmd->argval[qitems].netnum);
pl->v6_flag = 1;
}
- pl = (struct conf_unpeer *)((char *)pl + sendsize);
+ pl = (void *)((char *)pl + sendsize);
}
res = doquery(impl_ver, REQ_RESET_PEER, 1, qitems,
@@ -2373,9 +2364,8 @@ traps(
int res;
again:
- res = doquery(impl_ver, REQ_TRAPS, 0, 0, 0, (char *)NULL,
- &items, &itemsize, (void *)&it, 0,
- sizeof(struct info_trap));
+ res = doquery(impl_ver, REQ_TRAPS, 0, 0, 0, NULL, &items,
+ &itemsize, (void *)&it, 0, sizeof(*it));
if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
impl_ver = IMPL_XNTPD_OLD;
@@ -2383,39 +2373,38 @@ again:
}
if (res != 0)
- return;
+ return;
if (!checkitems(items, fp))
- return;
+ return;
if (!checkitemsize(itemsize, sizeof(struct info_trap)) &&
!checkitemsize(itemsize, v4sizeof(struct info_trap)))
- return;
+ return;
for (i = 0; i < items; i++ ) {
- if (i != 0)
- (void) fprintf(fp, "\n");
SET_ADDRS(trap_addr, local_addr, it, trap_address, local_address);
- (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));
+ fprintf(fp, "%saddress %s, port %d\n",
+ (0 == i)
+ ? ""
+ : "\n",
+ stoa(&trap_addr), ntohs(it->trap_port));
+ fprintf(fp, "interface: %s, ",
+ (0 == it->local_address)
+ ? "wildcard"
+ : stoa(&local_addr));
if (ntohl(it->flags) & TRAP_CONFIGURED)
- (void) fprintf(fp, "configured\n");
+ fprintf(fp, "configured\n");
else if (ntohl(it->flags) & TRAP_NONPRIO)
- (void) fprintf(fp, "low priority\n");
+ fprintf(fp, "low priority\n");
else
- (void) fprintf(fp, "normal priority\n");
+ 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));
+ fprintf(fp, "set for %ld secs, last set %ld secs ago\n",
+ (long)ntohl(it->origtime),
+ (long)ntohl(it->settime));
+ fprintf(fp, "sequence %d, number of resets %ld\n",
+ ntohs(it->sequence), (long)ntohl(it->resets));
}
}
@@ -2757,7 +2746,7 @@ fudge(
err = 0;
- memset((char *)&fudgedata, 0, sizeof fudgedata);
+ ZERO(fudgedata);
fudgedata.clockadr = NSRCADR(&pcmd->argval[0].netnum);
if (STREQ(pcmd->argval[1].string, "time1")) {
@@ -2963,9 +2952,9 @@ again:
(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);
+ (u_long)ntohl(ik->maxerror) * tscale);
(void)fprintf(fp, "estimated error: %g s\n",
- (u_long)ntohl(ik->esterror) * 1e-6);
+ (u_long)ntohl(ik->esterror) * tscale);
(void)fprintf(fp, "status: %04x ", status);
#ifdef STA_PLL
if (status & STA_PLL) (void)fprintf(fp, " pll");
diff --git a/ntpq/Makefile.am b/ntpq/Makefile.am
index 735880bbbf07..50c072a0fd93 100644
--- a/ntpq/Makefile.am
+++ b/ntpq/Makefile.am
@@ -1,36 +1,70 @@
NULL=
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= ntpq
-else
-sbin_PROGRAMS= ntpq
-endif
+EXTRA_PROGRAMS= ntpq
+bin_PROGRAMS= $(NTPQ_DB)
+libexec_PROGRAMS= $(NTPQ_DL)
+sbin_PROGRAMS= $(NTPQ_DS)
-AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
-ntpq_LDADD= version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- @EDITLINE_LIBS@ @LCRYPTO@
+ntpq_LDADD = version.o $(LIBOPTS_LDADD)
+ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
+ntpq_LDADD += $(LDADD_NTP)
noinst_HEADERS= ntpq.h
noinst_LIBRARIES= libntpq.a
libntpq_a_CFLAGS= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
CLEANFILES=
-DISTCLEANFILES= .version version.c
+DISTCLEANFILES= .version version.c config.log $(man_MANS)
ETAGS_ARGS= Makefile.am
-EXTRA_DIST= ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu
+EXTRA_DIST= \
+ invoke-ntpq.menu \
+ invoke-ntpq.texi \
+ ntpq-opts.def \
+ ntpq.1ntpqman \
+ ntpq.1ntpqmdoc \
+ ntpq.man.in \
+ ntpq.mdoc.in \
+ ntpq.html \
+ ntpq.texi \
+ $(NULL)
+
BUILT_SOURCES= ntpq-opts.c ntpq-opts.h
-man_MANS= $(srcdir)/ntpq.1
-noinst_DATA= $(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+
+html_DATA= \
+ $(srcdir)/ntpq.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntpq.menu \
+ $(srcdir)/invoke-ntpq.texi \
+ $(srcdir)/ntpq.man.in \
+ $(srcdir)/ntpq.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntpq.$(NTPQ_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
@@ -41,27 +75,57 @@ $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
$(run_ag) ntpq-opts.def
-$(srcdir)/ntpq.1: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def
+###
+
+$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
-$(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.texi
+$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
+ mv $(srcdir)/ntpq.man.in+ $(srcdir)/ntpq.man.in
+
+###
+
+$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
+
+$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
+ mv $(srcdir)/ntpq.mdoc.in+ $(srcdir)/ntpq.mdoc.in
+
+###
+
+ntpq.$(NTPQ_MS): $(srcdir)/ntpq.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpq.$(NTPQ_MS)+:$(srcdir)/ntpq.$(MANTAGFMT).in
+ mv ntpq.$(NTPQ_MS)+ ntpq.$(NTPQ_MS)
+
+###
+
+$(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpq-opts.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
-$(PROGRAMS): $(LDADD)
+$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true )
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+###
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+$(PROGRAMS): version.o
-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
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/ntpq/Makefile.in b/ntpq/Makefile.in
index 0bdcc2d13639..d42493758a12 100644
--- a/ntpq/Makefile.in
+++ b/ntpq/Makefile.in
@@ -41,24 +41,48 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = ntpq$(EXEEXT)
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = ntpq$(EXEEXT)
+EXTRA_PROGRAMS = ntpq$(EXEEXT)
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf
subdir = ntpq
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -67,32 +91,55 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
libntpq_a_AR = $(AR) $(ARFLAGS)
libntpq_a_LIBADD =
am_libntpq_a_OBJECTS = libntpq_a-libntpq.$(OBJEXT) \
libntpq_a-libntpq_subs.$(OBJEXT)
libntpq_a_OBJECTS = $(am_libntpq_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpq_OBJECTS = ntpq.$(OBJEXT) ntpq-subs.$(OBJEXT) \
ntpq-opts.$(OBJEXT)
ntpq_OBJECTS = $(am_ntpq_OBJECTS)
am__DEPENDENCIES_1 =
-ntpq_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) ../libntp/libntp.a
+ntpq_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) ../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
DIST_SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -117,28 +164,41 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -150,21 +210,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -172,6 +242,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -190,14 +261,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -210,10 +335,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -221,9 +348,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -232,6 +377,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -280,43 +426,74 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
-
+bin_PROGRAMS = $(NTPQ_DB)
+libexec_PROGRAMS = $(NTPQ_DL)
+sbin_PROGRAMS = $(NTPQ_DS)
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
ntpq_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
- @EDITLINE_LIBS@ @LCRYPTO@
-
+ $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(EDITLINE_LIBS) \
+ $(LDADD_NTP)
noinst_HEADERS = ntpq.h
noinst_LIBRARIES = libntpq.a
libntpq_a_CFLAGS = -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
-CLEANFILES = .deps-ver
-DISTCLEANFILES = .version version.c
+CLEANFILES = check-libopts check-libntp .deps-ver
+DISTCLEANFILES = .version version.c config.log $(man_MANS)
ETAGS_ARGS = Makefile.am
-EXTRA_DIST = ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu
-BUILT_SOURCES = ntpq-opts.c ntpq-opts.h .deps-ver
-man_MANS = $(srcdir)/ntpq.1
-noinst_DATA = $(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-
-std_def_list = $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+EXTRA_DIST = \
+ invoke-ntpq.menu \
+ invoke-ntpq.texi \
+ ntpq-opts.def \
+ ntpq.1ntpqman \
+ ntpq.1ntpqmdoc \
+ ntpq.man.in \
+ ntpq.mdoc.in \
+ ntpq.html \
+ ntpq.texi \
+ $(NULL)
+
+BUILT_SOURCES = ntpq-opts.c ntpq-opts.h check-libopts check-libntp \
+ .deps-ver
+html_DATA = \
+ $(srcdir)/ntpq.html \
+ $(NULL)
+
+noinst_DATA = \
+ $(srcdir)/invoke-ntpq.menu \
+ $(srcdir)/invoke-ntpq.texi \
+ $(srcdir)/ntpq.man.in \
+ $(srcdir)/ntpq.mdoc.in \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+man_MANS = ntpq.$(NTPQ_MS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
ntpq_SOURCES = ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -350,9 +527,9 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libntpq.a: $(libntpq_a_OBJECTS) $(libntpq_a_DEPENDENCIES)
- -rm -f libntpq.a
- $(libntpq_a_AR) libntpq.a $(libntpq_a_OBJECTS) $(libntpq_a_LIBADD)
- $(RANLIB) libntpq.a
+ $(AM_V_at)-rm -f libntpq.a
+ $(AM_V_AR)$(libntpq_a_AR) libntpq.a $(libntpq_a_OBJECTS) $(libntpq_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libntpq.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -396,6 +573,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -441,7 +661,7 @@ clean-sbinPROGRAMS:
rm -f $$list
ntpq$(EXEEXT): $(ntpq_OBJECTS) $(ntpq_DEPENDENCIES)
@rm -f ntpq$(EXEEXT)
- $(LINK) $(ntpq_OBJECTS) $(ntpq_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpq_OBJECTS) $(ntpq_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -456,50 +676,57 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpq.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libntpq_a-libntpq.o: libntpq.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq.c' object='libntpq_a-libntpq.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
libntpq_a-libntpq.obj: libntpq.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq.c' object='libntpq_a-libntpq.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
libntpq_a-libntpq_subs.o: libntpq_subs.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq_subs.c' object='libntpq_a-libntpq_subs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
libntpq_a-libntpq_subs.obj: libntpq_subs.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq_subs.c' object='libntpq_a-libntpq_subs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
@@ -509,10 +736,10 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -538,7 +765,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -547,6 +774,64 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -648,7 +933,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -682,8 +967,9 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-noinstLIBRARIES clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -703,13 +989,14 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-data-local install-htmlDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -720,7 +1007,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man8
install-pdf: install-pdf-am
@@ -750,29 +1037,34 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man8
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-noinstLIBRARIES \
- clean-sbinPROGRAMS ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-exec-hook \
- install-html install-html-am install-info install-info-am \
- install-man install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-sbinPROGRAMS install-strip installcheck \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-noinstLIBRARIES clean-sbinPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-hook install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecPROGRAMS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
+ uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinPROGRAMS
+
+install-data-local: install-html
$(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
@@ -780,46 +1072,87 @@ $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
$(run_ag) ntpq-opts.def
-$(srcdir)/ntpq.1: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def
+###
+
+$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
+
+$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
+ mv $(srcdir)/ntpq.man.in+ $(srcdir)/ntpq.man.in
+
+###
+
+$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
+
+$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
+ mv $(srcdir)/ntpq.mdoc.in+ $(srcdir)/ntpq.mdoc.in
+
+###
+
+ntpq.$(NTPQ_MS): $(srcdir)/ntpq.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpq.$(NTPQ_MS)+:$(srcdir)/ntpq.$(MANTAGFMT).in
+ mv ntpq.$(NTPQ_MS)+ ntpq.$(NTPQ_MS)
+
+###
-$(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.texi
+$(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpq-opts.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
-$(PROGRAMS): $(LDADD)
+$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true )
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+###
+
+$(PROGRAMS): version.o
+
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
-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
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -828,17 +1161,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -847,7 +1173,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/ntpq/ntpq-opts.menu b/ntpq/invoke-ntpq.menu
index c06f90d34aca..c06f90d34aca 100644
--- a/ntpq/ntpq-opts.menu
+++ b/ntpq/invoke-ntpq.menu
diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi
new file mode 100644
index 000000000000..017081dc2fa2
--- /dev/null
+++ b/ntpq/invoke-ntpq.texi
@@ -0,0 +1,1086 @@
+@node ntpq Invocation
+@section Invoking ntpq
+@pindex ntpq
+@cindex standard NTP query program
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:50:17 AM by AutoGen 5.18.5pre4
+# From the definitions ntpq-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+The
+@code{ntpq}
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+@code{ntpq}
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
+
+If one or more request options is included on the command line
+when
+@code{ntpq}
+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,
+@code{ntpq}
+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.
+The
+@code{ntpq}
+utility will prompt for
+commands if the standard input is a terminal device.
+
+@code{ntpq}
+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.
+The
+@code{ntpq}
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+
+Specifying a
+command line option other than
+@code{-i}
+or
+@code{-n}
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+@code{ntpq}
+will attempt to read
+interactive format commands from the standard input.
+@subsubsection Internal Commands
+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.
+
+A
+number of interactive format commands are executed entirely within
+the
+@code{ntpq}
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+@table @asis
+@item @code{?} @code{[@kbd{command_keyword}]}
+@item @code{help} @code{[@kbd{command_keyword}]}
+A
+@quoteleft{}?@quoteright{}
+by itself will print a list of all the command
+keywords known to this incarnation of
+@code{ntpq}
+A
+@quoteleft{}?@quoteright{}
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+@code{ntpq}
+than this manual
+page.
+@item @code{addvars} @kbd{variable_name}@code{[@code{=value}]} @code{...}
+@item @code{rmvars} @kbd{variable_name} @code{...}
+@item @code{clearvars}
+@item @code{showvars}
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+@quoteleft{}variable_name=value@quoteright{},
+where the
+@quoteleft{}=value@quoteright{}
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+@code{ntpq}
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+@code{readlist}
+and
+@code{writelist}
+commands described below.
+The
+@code{addvars}
+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
+@code{rmvars}
+command can be used to remove individual variables from the list,
+while the
+@code{clearlist}
+command removes all variables from the
+list.
+The
+@code{showvars}
+command displays the current list of optional variables.
+@item @code{authenticate} @code{[yes | no]}
+Normally
+@code{ntpq}
+does not authenticate requests unless
+they are write requests.
+The command
+@quoteleft{}authenticate yes@quoteright{}
+causes
+@code{ntpq}
+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
+@code{peer}
+display.
+The command
+@quoteleft{}authenticate@quoteright{}
+causes
+@code{ntpq}
+to display whether or not
+@code{ntpq}
+is currently autheinticating requests.
+@item @code{cooked}
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+@code{ntpq}
+will have their
+values reformatted for human consumption.
+Variables which
+@code{ntpq}
+thinks should have a decodable value but didn't are
+marked with a trailing
+@quoteleft{}?@quoteright{}.
+@item @code{debug} @code{[@code{more} | @code{less} | @code{off}]}
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+@item @code{delay} @kbd{milliseconds}
+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.
+@item @code{exit}
+Exit
+@code{ntpq}
+@item @code{host} @kbd{hostname}
+Set the host to which future queries will be sent.
+@kbd{hostname}
+may be either a host name or a numeric address.
+@item @code{hostnames} @code{[@code{yes} | @code{no}]}
+If
+@code{yes}
+is specified, host names are printed in
+information displays.
+If
+@code{no}
+is specified, numeric
+addresses are printed instead.
+The default is
+@code{yes},
+unless
+modified using the command line
+@code{-n}
+switch.
+@item @code{keyid} @kbd{keyid}
+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.
+@item @code{keytype} @code{[@code{md5} | @code{OpenSSLDigestType}]}
+Specify the type of key to use for authenticating requests.
+@code{md5}
+is alway supported.
+If
+@code{ntpq}
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+@code{keytype}
+is displayed.
+@item @code{ntpversion} @code{[@code{1} | @code{2} | @code{3} | @code{4}]}
+Sets the NTP version number which
+@code{ntpq}
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+@item @code{passwd}
+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.
+@code{poll}
+@kbd{n}
+@code{verbose}
+@item @code{quit}
+Exit
+@code{ntpq}
+@item @code{raw}
+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.
+@item @code{timeout} @kbd{milliseconds}
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+@code{ntpq}
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+@item @code{version}
+Print the version of the
+@code{ntpq}
+program.
+@end table
+
+@subsubsection Control Message Commands
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server and expect a single response message.
+The exceptions are the
+@code{peers}
+command, which sends a series of messages,
+and the
+@code{mreadlist}
+and
+@code{mreadvar}
+commands, which iterate over a range of associations.
+@table @asis
+@item @code{associations}
+Display a list of mobilized associations in the form:
+@example
+ind assid status conf reach auth condition last_event cnt
+@end example
+@table @asis
+@item Sy String Ta Sy Description
+@item @code{ind} @code{Ta} @code{index} @code{on} @code{this} @code{list}
+@item @code{assid} @code{Ta} @code{association} @code{ID}
+@item @code{status} @code{Ta} @code{peer} @code{status} @code{word}
+@item @code{conf} @code{Ta} @code{yes}: @code{persistent,} @code{no}: @code{ephemeral}
+@item @code{reach} @code{Ta} @code{yes}: @code{reachable,} @code{no}: @code{unreachable}
+@item @code{auth} @code{Ta} @code{ok}, @code{yes}, @code{bad} @code{and} @code{none}
+@item @code{condition} @code{Ta} @code{selection} @code{status} @code{(see} @code{the} @code{select} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{last_event} @code{Ta} @code{event} @code{report} @code{(see} @code{the} @code{event} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{cnt} @code{Ta} @code{event} @code{count} @code{(see} @code{the} @code{count} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@end table
+@item @code{authinfo}
+Display the authentication statistics.
+@item @code{clockvar} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
+@item @code{cv} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
+Display a list of clock variables for those associations supporting a reference clock.
+@item @code{:config} @code{[...]}
+Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+@item @code{config-from-file} @kbd{filename}
+Send the each line of
+@kbd{filename}
+to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+@item @code{ifstats}
+Display statistics for each local network address. Authentication is required.
+@item @code{iostats}
+Display network and reference clock I/O statistics.
+@item @code{kerninfo}
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+@item @code{lassociations}
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+@item @code{lopeers} @code{[@code{-4} | @code{-6}]}
+Obtain and print a list of all peers and clients showing
+@kbd{dstadr}
+(associated with any given IP version).
+@item @code{lpeers} @code{[@code{-4} | @code{-6}]}
+Print a peer spreadsheet for the appropriate IP version(s).
+@kbd{dstadr}
+(associated with any given IP version).
+@item @code{monstats}
+Display monitor facility statistics.
+@item @code{mrulist} @code{[@code{limited} | @code{kod} | @code{mincount}=@kbd{count} | @code{laddr}=@kbd{localaddr} | @code{sort}=@kbd{sortorder} | @code{resany}=@kbd{hexmask} | @code{resall}=@kbd{hexmask}]}
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+@code{sort}=@kbd{sortorder},
+the options filter the list returned by
+@code{ntpd.}
+The
+@code{limited}
+and
+@code{kod}
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+@code{mincount}=@kbd{count}
+option filters entries representing less than
+@kbd{count}
+packets.
+The
+@code{laddr}=@kbd{localaddr}
+option filters entries for packets received on any local address other than
+@kbd{localaddr}.
+@code{resany}=@kbd{hexmask}
+and
+@code{resall}=@kbd{hexmask}
+filter entries containing none or less than all, respectively, of the bits in
+@kbd{hexmask},
+which must begin with
+@code{0x}.
+The
+@kbd{sortorder}
+defaults to
+@code{lstint}
+and may be any of
+@code{addr},
+@code{count},
+@code{avgint},
+@code{lstint},
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+@table @asis
+@item Column
+Description
+@item @code{lstint}
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+@code{ntpq}
+@item @code{avgint}
+Average interval in s between packets from this address.
+@item @code{rstr}
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+@code{restrict}
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+@item @code{r}
+Rate control indicator, either
+a period,
+@code{L}
+or
+@code{K}
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+@item @code{m}
+Packet mode.
+@item @code{v}
+Packet version number.
+@item @code{count}
+Packets received from this address.
+@item @code{rport}
+Source port of last packet from this address.
+@item @code{remote} @code{address}
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+@end table
+@item @code{mreadvar} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
+@item @code{mrv} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
+Perform the same function as the
+@code{readvar}
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+@code{associations}
+command.
+@item @code{opeers} @code{[@code{-4} | @code{-6}]}
+Obtain and print the old-style list of all peers and clients showing
+@kbd{dstadr}
+(associated with any given IP version),
+rather than the
+@kbd{refid}.
+@item @code{passociations}
+Perform the same function as the
+@code{associations}
+command,
+except that it uses previously stored data rather than making a new query.
+@item @code{peers}
+Display a list of peers in the form:
+@example
+[tally]remote refid st t when pool reach delay offset jitter
+@end example
+@table @asis
+@item Variable
+Description
+@item @code{[tally]}
+single-character code indicating current value of the
+@code{select}
+field of the
+.Lk decode.html#peer "peer status word"
+@item @code{remote}
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+@code{-w}
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+@item @code{refid}
+association ID or
+.Lk decode.html#kiss "'kiss code"
+@item @code{st}
+stratum
+@item @code{t}
+@code{u}:
+unicast or manycast client,
+@code{b}:
+broadcast or multicast client,
+@code{l}:
+local (reference clock),
+@code{s}:
+symmetric (peer),
+@code{A}:
+manycast server,
+@code{B}:
+broadcast server,
+@code{M}:
+multicast server
+@item @code{when}
+sec/min/hr since last received packet
+@item @code{poll}
+poll interval (log2 s)
+@item @code{reach}
+reach shift register (octal)
+@item @code{delay}
+roundtrip delay
+@item @code{offset}
+offset of server relative to this host
+@item @code{jitter}
+jitter
+@end table
+@item @code{pstats} @kbd{assocID}
+Show the statistics for the peer with the given
+@kbd{assocID}.
+@item @code{readlist} @kbd{assocID}
+@item @code{rl} @kbd{assocID}
+Read the system or peer variables included in the variable list.
+@item @code{readvar} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
+@item @code{rv} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
+Display the specified variables.
+If
+@kbd{assocID}
+is zero, the variables are from the
+@ref{System Variables}
+name space, otherwise they are from the
+@ref{Peer Variables}
+name space.
+The
+@kbd{assocID}
+is required, as the same name can occur in both spaces.
+If no
+@kbd{name}
+is included, all operative variables in the name space are displayed.
+
+In this case only, if the
+@kbd{assocID}
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+@item @code{reslist}
+Show the access control (restrict) list for
+@code{ntpq}
+
+@item @code{saveconfig} @kbd{filename}
+Write the current configuration,
+including any runtime modifications given with
+@code{:config}
+or
+@code{config-from-file},
+to the ntpd host's file
+@kbd{filename}.
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+@code{ntpd}
+configuration file.
+@kbd{filename}
+can use
+@code{strftime()}
+format specifies to substitute the current date and time, for example,
+@code{q]saveconfig} @code{ntp-%Y%m%d-%H%M%S.confq]}.
+The filename used is stored in system variable
+@code{savedconfig}.
+Authentication is required.
+@item @code{timerstats}
+Display interval timer counters.
+@item @code{writelist} @kbd{assocID}
+Write the system or peer variables included in the variable list.
+@item @code{writevar} @kbd{assocID} @kbd{name}=@kbd{value} @code{[, ...]}
+Write the specified variables.
+If the
+@kbd{assocID}
+is zero, the variables are from the
+@ref{System Variables}
+name space, otherwise they are from the
+@ref{Peer Variables}
+name space.
+The
+@kbd{assocID}
+is required, as the same name can occur in both spaces.
+@item @code{sysinfo}
+Display operational summary.
+@item @code{sysstats}
+Print statistics counters maintained in the protocol module.
+@end table
+
+@subsubsection Status Words and Kiss Codes
+
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per-association basis.
+These words are displayed in the
+@code{rv}
+and
+@code{as}
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss-o'-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+
+@subsubsection System Variables
+The following system variables appear in the
+@code{rv}
+billboard.
+Not all variables are displayed in some configurations.
+@table @asis
+@item Variable
+Description
+@item @code{status}
+.Lk decode.html#sys "system status word"
+@item @code{version}
+NTP software version and build time
+@item @code{processor}
+hardware platform and version
+@item @code{system}
+operating system and version
+@item @code{leap}
+leap warning indicator (0-3)
+@item @code{stratum}
+stratum (1-15)
+@item @code{precision}
+precision (log2 s)
+@item @code{rootdelay}
+total roundtrip delay to the primary reference clock
+@item @code{rootdisp}
+total dispersion to the primary reference clock
+@item @code{peer}
+system peer association ID
+@item @code{tc}
+time constant and poll exponent (log2 s) (3-17)
+@item @code{mintc}
+minimum time constant (log2 s) (3-10)
+@item @code{clock}
+date and time of day
+@item @code{refid}
+reference ID or
+.Lk decode.html#kiss "kiss code"
+@item @code{reftime}
+reference time
+@item @code{offset}
+combined offset of server relative to this host
+@item @code{sys_jitter}
+combined system jitter
+@item @code{frequency}
+frequency offset (PPM) relative to hardware clock
+@item @code{clk_wander}
+clock frequency wander (PPM)
+@item @code{clk_jitter}
+clock jitter
+@item @code{tai}
+TAI-UTC offset (s)
+@item @code{leapsec}
+NTP seconds when the next leap second is/was inserted
+@item @code{expire}
+NTP seconds when the NIST leapseconds file expires
+@end table
+The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+
+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 Autokey dance:
+
+@table @asis
+@item Variable
+Description
+@item @code{host}
+Autokey host name for this host
+@item @code{ident}
+Autokey group name for this host
+@item @code{flags}
+host flags (see Autokey specification)
+@item @code{digest}
+OpenSSL message digest algorithm
+@item @code{signature}
+OpenSSL digest/signature scheme
+@item @code{update}
+NTP seconds at last signature update
+@item @code{cert}
+certificate subject, issuer and certificate flags
+@item @code{until}
+NTP seconds when the certificate expires
+@end table
+@subsubsection Peer Variables
+The following peer variables appear in the
+@code{rv}
+billboard for each association.
+Not all variables are displayed in some configurations.
+
+@table @asis
+@item Variable
+Description
+@item @code{associd}
+association ID
+@item @code{status}
+.Lk decode.html#peer "peer status word"
+@item @code{srcadr}
+source (remote) IP address
+@item @code{srcport}
+source (remote) port
+@item @code{dstadr}
+destination (local) IP address
+@item @code{dstport}
+destination (local) port
+@item @code{leap}
+leap indicator (0-3)
+@item @code{stratum}
+stratum (0-15)
+@item @code{precision}
+precision (log2 s)
+@item @code{rootdelay}
+total roundtrip delay to the primary reference clock
+@item @code{rootdisp}
+total root dispersion to the primary reference clock
+@item @code{refid}
+reference ID or
+.Lk decode.html#kiss "kiss code"
+@item @code{reftime}
+reference time
+@item @code{reach}
+reach register (octal)
+@item @code{unreach}
+unreach counter
+@item @code{hmode}
+host mode (1-6)
+@item @code{pmode}
+peer mode (1-5)
+@item @code{hpoll}
+host poll exponent (log2 s) (3-17)
+@item @code{ppoll}
+peer poll exponent (log2 s) (3-17)
+@item @code{headway}
+headway (see
+.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
+@item @code{flash}
+.Lk decode.html#flash "flash status word"
+@item @code{offset}
+filter offset
+@item @code{delay}
+filter delay
+@item @code{dispersion}
+filter dispersion
+@item @code{jitter}
+filter jitter
+@item @code{ident}
+Autokey group name for this association
+@item @code{bias}
+unicast/broadcast bias
+@item @code{xleave}
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+@end table
+The
+@code{bias}
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+@code{xleave}
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+@table @asis
+@item Variable
+Description
+@item @code{flags}
+peer flags (see Autokey specification)
+@item @code{host}
+Autokey server name
+@item @code{flags}
+peer flags (see Autokey specification)
+@item @code{signature}
+OpenSSL digest/signature scheme
+@item @code{initsequence}
+initial key ID
+@item @code{initkey}
+initial key index
+@item @code{timestamp}
+Autokey signature timestamp
+@end table
+
+@subsubsection Clock Variables
+The following clock variables appear in the
+@code{cv}
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+@table @asis
+@item Variable
+Description
+@item @code{associd}
+association ID
+@item @code{status}
+.Lk decode.html#clock "clock status word"
+@item @code{device}
+device description
+@item @code{timecode}
+ASCII time code string (specific to device)
+@item @code{poll}
+poll messages sent
+@item @code{noreply}
+no reply
+@item @code{badformat}
+bad format
+@item @code{baddata}
+bad date or time
+@item @code{fudgetime1}
+fudge time 1
+@item @code{fudgetime2}
+fudge time 2
+@item @code{stratum}
+driver stratum
+@item @code{refid}
+driver reference ID
+@item @code{flags}
+driver flags
+@end table
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpq} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntpq usage:: ntpq help/usage (@option{--help})
+* ntpq ipv4:: ipv4 option (-4)
+* ntpq ipv6:: ipv6 option (-6)
+* ntpq command:: command option (-c)
+* ntpq interactive:: interactive option (-i)
+* ntpq numeric:: numeric option (-n)
+* ntpq old-rv:: old-rv option
+* ntpq peers:: peers option (-p)
+* ntpq wide:: wide option (-w)
+* ntpq config:: presetting/configuring ntpq
+* ntpq exit status:: exit status
+@end menu
+
+@node ntpq usage
+@subsection ntpq help/usage (@option{--help})
+@cindex ntpq help
+
+This is the automatically generated usage text for ntpq.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntpq - standard NTP query program - Ver. 4.2.8
+Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -c Str command run a command and exit
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -i no interactive Force ntpq to operate in interactive mode
+ - prohibits these options:
+ command
+ peers
+ -n no numeric numeric host addresses
+ no old-rv Always output status line with readvar
+ -p no peers Print a list of the peers
+ - prohibits the option 'interactive'
+ -w no wide Display the full 'remote' value
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -> opt save-opts save the option state to a config file
+ -< Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTPQ_*
+
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+@end example
+@exampleindent 4
+
+@node ntpq ipv4
+@subsection ipv4 option (-4)
+@cindex ntpq-ipv4
+
+This is the ``force ipv4 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv6.
+@end itemize
+
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+@node ntpq ipv6
+@subsection ipv6 option (-6)
+@cindex ntpq-ipv6
+
+This is the ``force ipv6 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv4.
+@end itemize
+
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+@node ntpq command
+@subsection command option (-c)
+@cindex ntpq-command
+
+This is the ``run a command and exit'' option.
+This option takes a string argument @file{cmd}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+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).
+@node ntpq interactive
+@subsection interactive option (-i)
+@cindex ntpq-interactive
+
+This is the ``force ntpq to operate in interactive mode'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+command, peers.
+@end itemize
+
+Force @code{ntpq} to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+@node ntpq numeric
+@subsection numeric option (-n)
+@cindex ntpq-numeric
+
+This is the ``numeric host addresses'' option.
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+@node ntpq old-rv
+@subsection old-rv option
+@cindex ntpq-old-rv
+
+This is the ``always output status line with readvar'' option.
+By default, @code{ntpq} now suppresses the @code{associd=...}
+line that precedes the output of @code{readvar}
+(alias @code{rv}) when a single variable is requested, such as
+@code{ntpq -c "rv 0 offset"}.
+This option causes @code{ntpq} to include both lines of output
+for a single-variable @code{readvar}.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer @code{ntpq} to behave identically in this regard.
+@node ntpq peers
+@subsection peers option (-p)
+@cindex ntpq-peers
+
+This is the ``print a list of the peers'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+interactive.
+@end itemize
+
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+@node ntpq wide
+@subsection wide option (-w)
+@cindex ntpq-wide
+
+This is the ``display the full 'remote' value'' option.
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+
+
+@node ntpq config
+@subsection presetting/configuring ntpq
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTPQ} and @code{NTPQ_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{NTPQ} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+@noindent
+@code{libopts} will search in 2 places for configuration files:
+@itemize @bullet
+@item
+$HOME
+@item
+$PWD
+@end itemize
+The environment variables @code{HOME}, and @code{PWD}
+are expanded and replaced when @file{ntpq} runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named @file{.ntprc} is searched for
+within that directory and processed.
+
+Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+@example
+[NTPQ]
+@end example
+@noindent
+or by
+@example
+<?program ntpq>
+@end example
+@noindent
+Do not mix these styles within one configuration file.
+
+Compound values and carefully constructed string values may also be
+specified using XML syntax:
+@example
+<option-name>
+ <sub-opt>...&lt;...&gt;...</sub-opt>
+</option-name>
+@end example
+@noindent
+yielding an @code{option-name.sub-opt} string value of
+@example
+"...<...>..."
+@end example
+@code{AutoOpts} does not track suboptions. You simply note that it is a
+hierarchicly valued option. @code{AutoOpts} does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node ntpq exit status
+@subsection ntpq exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@item 66 (EX_NOINPUT)
+A specified configuration file could not be loaded.
+@item 70 (EX_SOFTWARE)
+libopts had an internal operational error. Please report
+it to autogen-users@@lists.sourceforge.net. Thank you.
+@end table
diff --git a/ntpq/libntpq.c b/ntpq/libntpq.c
index fff8e81eab74..becd956f2889 100644
--- a/ntpq/libntpq.c
+++ b/ntpq/libntpq.c
@@ -215,6 +215,7 @@ int ntpq_queryhost(unsigned short VARSET, unsigned short association, char *resu
****************************************************************************
* Parameters:
* hostname char* Hostname/IP of the host running ntpd
+ * fam int Address Family (AF_INET, AF_INET6, or 0)
*
* Returns:
* int 1 if the host connection could be set up, i.e.
@@ -224,9 +225,13 @@ int ntpq_queryhost(unsigned short VARSET, unsigned short association, char *resu
* 0 (zero) if a failure occured
****************************************************************************/
-int ntpq_openhost(char *hostname)
+int
+ntpq_openhost(
+ char *hostname,
+ int fam
+ )
{
- if ( openhost(hostname) )
+ if ( openhost(hostname, fam) )
{
numhosts = 1;
} else {
diff --git a/ntpq/libntpq.h b/ntpq/libntpq.h
index 164cc58cf831..82a874093c9b 100644
--- a/ntpq/libntpq.h
+++ b/ntpq/libntpq.h
@@ -80,9 +80,10 @@ extern struct ntpq_varlist ntpq_varlist[MAXLIST];
*/
/* from libntpq.c */
-extern int ntpq_openhost(char *);
+extern int ntpq_openhost(char *, int);
extern int ntpq_closehost(void);
-extern int ntpq_queryhost(unsigned short VARSET, associd_t association, char *resultbuf, int maxlen);
+extern int ntpq_queryhost(unsigned short VARSET, associd_t association,
+ char *resultbuf, int maxlen);
extern size_t ntpq_getvar(const char *resultbuf, size_t datalen,
const char *varname, char *varvalue,
size_t maxlen);
@@ -104,5 +105,5 @@ extern int ntpq_read_assoc_clockvars( associd_t associd, char *resultbuf, int ma
/* in libntpq_subs.c */
extern int ntpq_dogetassoc(void);
extern char ntpq_decodeaddrtype(sockaddr_u *sock);
-extern int ntpq_doquerylist(struct ntpq_varlist *, int , associd_t , int , u_short *, int *, const char **datap );
-
+extern int ntpq_doquerylist(struct ntpq_varlist *, int, associd_t, int,
+ u_short *, int *, const char **datap);
diff --git a/ntpq/libntpq_subs.c b/ntpq/libntpq_subs.c
index 09b99bd48290..e53b4193c9e4 100644
--- a/ntpq/libntpq_subs.c
+++ b/ntpq/libntpq_subs.c
@@ -17,21 +17,19 @@
#include "libntpq.h"
-/* the following functions are required internally by a number of libntpq functions
- * and since they are defined as static in ntpq-subs.c, they need to be exported here
- */
-
int ntpq_dogetassoc(void)
{
- if ( dogetassoc(NULL))
- {
+ if (dogetassoc(NULL))
return numassoc;
- } else {
- return 0;
- }
+ else
+ return 0;
}
+/* the following functions are required internally by a number of libntpq functions
+ * and since they are defined as static in ntpq-subs.c, they need to be exported here
+ */
+
char ntpq_decodeaddrtype(sockaddr_u *sock)
{
return decodeaddrtype(sock);
diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c
index c026af1491eb..fe2a8fe82033 100644
--- a/ntpq/ntpq-opts.c
+++ b/ntpq/ntpq-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:27 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:49:47 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,35 +15,42 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpq program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ntpq-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#define OPTION_CODE_COMPILE 1
-#include "ntpq-opts.h"
-
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
-
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[38] =
-"ntpq 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
+#define zCopyright (ntpq_opt_strs+0)
+#define zLicenseDescrip (ntpq_opt_strs+310)
/*
* global included definitions
@@ -58,189 +65,262 @@ extern tUsageProc optionUsage;
# define NULL 0
#endif
-/*
- * Ipv4 option description with
+/**
+ * static const strings for ntpq options
+ */
+static char const ntpq_opt_strs[1863] =
+/* 0 */ "ntpq 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 310 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 950 */ "Force IPv4 DNS name resolution\0"
+/* 981 */ "IPV4\0"
+/* 986 */ "ipv4\0"
+/* 991 */ "Force IPv6 DNS name resolution\0"
+/* 1022 */ "IPV6\0"
+/* 1027 */ "ipv6\0"
+/* 1032 */ "run a command and exit\0"
+/* 1055 */ "COMMAND\0"
+/* 1063 */ "command\0"
+/* 1071 */ "Increase debug verbosity level\0"
+/* 1102 */ "DEBUG_LEVEL\0"
+/* 1114 */ "debug-level\0"
+/* 1126 */ "Set the debug verbosity level\0"
+/* 1156 */ "SET_DEBUG_LEVEL\0"
+/* 1172 */ "set-debug-level\0"
+/* 1188 */ "Force ntpq to operate in interactive mode\0"
+/* 1230 */ "INTERACTIVE\0"
+/* 1242 */ "interactive\0"
+/* 1254 */ "numeric host addresses\0"
+/* 1277 */ "NUMERIC\0"
+/* 1285 */ "numeric\0"
+/* 1293 */ "Always output status line with readvar\0"
+/* 1332 */ "OLD_RV\0"
+/* 1339 */ "old-rv\0"
+/* 1346 */ "Print a list of the peers\0"
+/* 1372 */ "PEERS\0"
+/* 1378 */ "peers\0"
+/* 1384 */ "Display the full 'remote' value\0"
+/* 1416 */ "WIDE\0"
+/* 1421 */ "wide\0"
+/* 1426 */ "display extended usage information and exit\0"
+/* 1470 */ "help\0"
+/* 1475 */ "extended usage information passed thru pager\0"
+/* 1520 */ "more-help\0"
+/* 1530 */ "output version information and exit\0"
+/* 1566 */ "version\0"
+/* 1574 */ "save the option state to a config file\0"
+/* 1613 */ "save-opts\0"
+/* 1623 */ "load options from a config file\0"
+/* 1655 */ "LOAD_OPTS\0"
+/* 1665 */ "no-load-opts\0"
+/* 1678 */ "no\0"
+/* 1681 */ "NTPQ\0"
+/* 1686 */ "ntpq - standard NTP query program - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
+/* 1803 */ "$HOME\0"
+/* 1809 */ ".\0"
+/* 1811 */ ".ntprc\0"
+/* 1818 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1852 */ "ntpq 4.2.8";
+
+/**
+ * ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv4Text[] =
- "Force IPv4 DNS name resolution";
-static char const zIpv4_NAME[] = "IPV4";
-static char const zIpv4_Name[] = "ipv4";
-static const int
- aIpv4CantList[] = {
+/** Descriptive text for the ipv4 option */
+#define IPV4_DESC (ntpq_opt_strs+950)
+/** Upper-cased name for the ipv4 option */
+#define IPV4_NAME (ntpq_opt_strs+981)
+/** Name string for the ipv4 option */
+#define IPV4_name (ntpq_opt_strs+986)
+/** Other options that appear in conjunction with the ipv4 option */
+static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
-#define IPV4_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv4 option */
+#define IPV4_FLAGS (OPTST_DISABLED)
-/*
- * Ipv6 option description with
+/**
+ * ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv6Text[] =
- "Force IPv6 DNS name resolution";
-static char const zIpv6_NAME[] = "IPV6";
-static char const zIpv6_Name[] = "ipv6";
-static const int
- aIpv6CantList[] = {
+/** Descriptive text for the ipv6 option */
+#define IPV6_DESC (ntpq_opt_strs+991)
+/** Upper-cased name for the ipv6 option */
+#define IPV6_NAME (ntpq_opt_strs+1022)
+/** Name string for the ipv6 option */
+#define IPV6_name (ntpq_opt_strs+1027)
+/** Other options that appear in conjunction with the ipv6 option */
+static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
-#define IPV6_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv6 option */
+#define IPV6_FLAGS (OPTST_DISABLED)
-/*
- * Command option description:
+/**
+ * command option description:
*/
-static char const zCommandText[] =
- "run a command and exit";
-static char const zCommand_NAME[] = "COMMAND";
-static char const zCommand_Name[] = "command";
-#define COMMAND_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the command option */
+#define COMMAND_DESC (ntpq_opt_strs+1032)
+/** Upper-cased name for the command option */
+#define COMMAND_NAME (ntpq_opt_strs+1055)
+/** Name string for the command option */
+#define COMMAND_name (ntpq_opt_strs+1063)
+/** Compiled in flag settings for the command option */
+#define COMMAND_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Debug_Level option description:
- */
-static char const zDebug_LevelText[] =
- "Increase output debug message level";
-static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
-static char const zDebug_Level_Name[] = "debug-level";
-#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
-
-/*
- * Set_Debug_Level option description:
+/**
+ * debug-level option description:
*/
-static char const zSet_Debug_LevelText[] =
- "Set the output debug message level";
-static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-static char const zSet_Debug_Level_Name[] = "set-debug-level";
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-
-/*
- * Peers option description with
- * "Must also have options" and "Incompatible options":
+/** Descriptive text for the debug-level option */
+#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1071)
+/** Upper-cased name for the debug-level option */
+#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1102)
+/** Name string for the debug-level option */
+#define DEBUG_LEVEL_name (ntpq_opt_strs+1114)
+/** Compiled in flag settings for the debug-level option */
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/**
+ * set-debug-level option description:
*/
-static char const zPeersText[] =
- "Print a list of the peers";
-static char const zPeers_NAME[] = "PEERS";
-static char const zPeers_Name[] = "peers";
-static const int
- aPeersCantList[] = {
- INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
-#define PEERS_FLAGS (OPTST_DISABLED)
-
-/*
- * Interactive option description with
+/** Descriptive text for the set-debug-level option */
+#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1126)
+/** Upper-cased name for the set-debug-level option */
+#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1156)
+/** Name string for the set-debug-level option */
+#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1172)
+/** Compiled in flag settings for the set-debug-level option */
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/**
+ * interactive option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zInteractiveText[] =
- "Force ntpq to operate in interactive mode";
-static char const zInteractive_NAME[] = "INTERACTIVE";
-static char const zInteractive_Name[] = "interactive";
-static const int
- aInteractiveCantList[] = {
+/** Descriptive text for the interactive option */
+#define INTERACTIVE_DESC (ntpq_opt_strs+1188)
+/** Upper-cased name for the interactive option */
+#define INTERACTIVE_NAME (ntpq_opt_strs+1230)
+/** Name string for the interactive option */
+#define INTERACTIVE_name (ntpq_opt_strs+1242)
+/** Other options that appear in conjunction with the interactive option */
+static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
INDEX_OPT_PEERS, NO_EQUIVALENT };
-#define INTERACTIVE_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the interactive option */
+#define INTERACTIVE_FLAGS (OPTST_DISABLED)
-/*
- * Numeric option description:
+/**
+ * numeric option description:
+ */
+/** Descriptive text for the numeric option */
+#define NUMERIC_DESC (ntpq_opt_strs+1254)
+/** Upper-cased name for the numeric option */
+#define NUMERIC_NAME (ntpq_opt_strs+1277)
+/** Name string for the numeric option */
+#define NUMERIC_name (ntpq_opt_strs+1285)
+/** Compiled in flag settings for the numeric option */
+#define NUMERIC_FLAGS (OPTST_DISABLED)
+
+/**
+ * old-rv option description:
*/
-static char const zNumericText[] =
- "numeric host addresses";
-static char const zNumeric_NAME[] = "NUMERIC";
-static char const zNumeric_Name[] = "numeric";
-#define NUMERIC_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the old-rv option */
+#define OLD_RV_DESC (ntpq_opt_strs+1293)
+/** Upper-cased name for the old-rv option */
+#define OLD_RV_NAME (ntpq_opt_strs+1332)
+/** Name string for the old-rv option */
+#define OLD_RV_name (ntpq_opt_strs+1339)
+/** Compiled in flag settings for the old-rv option */
+#define OLD_RV_FLAGS (OPTST_DISABLED)
+
+/**
+ * peers option description with
+ * "Must also have options" and "Incompatible options":
+ */
+/** Descriptive text for the peers option */
+#define PEERS_DESC (ntpq_opt_strs+1346)
+/** Upper-cased name for the peers option */
+#define PEERS_NAME (ntpq_opt_strs+1372)
+/** Name string for the peers option */
+#define PEERS_name (ntpq_opt_strs+1378)
+/** Other options that appear in conjunction with the peers option */
+static int const aPeersCantList[] = {
+ INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
+/** Compiled in flag settings for the peers option */
+#define PEERS_FLAGS (OPTST_DISABLED)
-/*
- * Old_Rv option description:
+/**
+ * wide option description:
*/
-static char const zOld_RvText[] =
- "Always output status line with readvar";
-static char const zOld_Rv_NAME[] = "OLD_RV";
-static char const zOld_Rv_Name[] = "old-rv";
-#define OLD_RV_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the wide option */
+#define WIDE_DESC (ntpq_opt_strs+1384)
+/** Upper-cased name for the wide option */
+#define WIDE_NAME (ntpq_opt_strs+1416)
+/** Name string for the wide option */
+#define WIDE_name (ntpq_opt_strs+1421)
+/** Compiled in flag settings for the wide option */
+#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (ntpq_opt_strs+1426)
+#define HELP_name (ntpq_opt_strs+1470)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (ntpq_opt_strs+1475)
+#define MORE_HELP_name (ntpq_opt_strs+1520)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-static char const zSave_OptsText[] = "Save the option state to a config file";
-static char const zSave_Opts_Name[] = "save-opts";
-static char const zLoad_OptsText[] = "Load options from a config file";
-static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
-static char const zNotLoad_Opts_Name[] = "no-load-opts";
-static char const zNotLoad_Opts_Pfx[] = "no";
-#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
-/*
+#define VER_DESC (ntpq_opt_strs+1530)
+#define VER_name (ntpq_opt_strs+1566)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1574)
+#define SAVE_OPTS_name (ntpq_opt_strs+1613)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1623)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1655)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1665)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1678)
+#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
+/**
* Declare option callback procedures
*/
-#if defined(TEST_NTPQ_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-extern tOptProc
- optionStackArg;
-static tOptProc
- doUsageOpt;
-
-/*
- * #define map the "normal" callout procs to the test ones...
- */
-#define COMMAND_OPT_PROC optionStackArg
-#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
-#define PEERS_OPT_PROC optionStackArg
-
-
-#else /* NOT defined TEST_NTPQ_OPTS */
-/*
- * When not under test, there are different procs to use
- */
extern tOptProc
- ntpq_custom_opt_handler, optionBooleanVal, optionNestedVal,
- optionNumericVal, optionPagedUsage, optionPrintVersion,
+ ntpOptionPrintVersion, ntpq_custom_opt_handler, optionBooleanVal,
+ optionNestedVal, optionNumericVal, optionPagedUsage,
optionResetOpt, optionStackArg, optionTimeDate,
- optionTimeVal, optionUnstackArg, optionVersionStderr;
+ optionTimeVal, optionUnstackArg, optionVendorOption;
static tOptProc
- doOptSet_Debug_Level, doUsageOpt;
-
-/*
- * #define map the "normal" callout procs
- */
-#define COMMAND_OPT_PROC ntpq_custom_opt_handler
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-#define PEERS_OPT_PROC ntpq_custom_opt_handler
-
-#define COMMAND_OPT_PROC ntpq_custom_opt_handler
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-#define PEERS_OPT_PROC ntpq_custom_opt_handler
-#endif /* defined(TEST_NTPQ_OPTS) */
-#ifdef TEST_NTPQ_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_NTPQ_OPTS */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpq Option Descriptions.
+ doOptDebug_Level, doUsageOpt;
+#define VER_PROC ntpOptionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the ntpq Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ntpq program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
@@ -248,11 +328,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV4_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv4 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv4CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
+ /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_OPT_IPV6,
@@ -260,11 +340,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV6_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv6 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv6CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
+ /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 2, VALUE_OPT_COMMAND,
@@ -272,11 +352,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ COMMAND_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --command */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ COMMAND_OPT_PROC,
- /* desc, NAME, name */ zCommandText, zCommand_NAME, zCommand_Name,
+ /* option proc */ ntpq_custom_opt_handler,
+ /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
@@ -284,11 +364,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
+ /* option proc */ doOptDebug_Level,
+ /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
@@ -296,151 +376,160 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --set-debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
- /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_PEERS,
- /* equiv idx, value */ 5, VALUE_OPT_PEERS,
+ { /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
+ /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ PEERS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ INTERACTIVE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --interactive */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aPeersCantList,
- /* option proc */ PEERS_OPT_PROC,
- /* desc, NAME, name */ zPeersText, zPeers_NAME, zPeers_Name,
+ /* must/cannot opts */ NULL, aInteractiveCantList,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 6, VALUE_OPT_INTERACTIVE,
- /* equiv idx, value */ 6, VALUE_OPT_INTERACTIVE,
+ { /* entry idx, value */ 6, VALUE_OPT_NUMERIC,
+ /* equiv idx, value */ 6, VALUE_OPT_NUMERIC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ INTERACTIVE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ NUMERIC_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --numeric */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aInteractiveCantList,
+ /* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zInteractiveText, zInteractive_NAME, zInteractive_Name,
+ /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_NUMERIC,
- /* equiv idx, value */ 7, VALUE_OPT_NUMERIC,
+ { /* entry idx, value */ 7, VALUE_OPT_OLD_RV,
+ /* equiv idx, value */ 7, VALUE_OPT_OLD_RV,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ NUMERIC_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ OLD_RV_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --old-rv */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zNumericText, zNumeric_NAME, zNumeric_Name,
+ /* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_OLD_RV,
- /* equiv idx, value */ 8, VALUE_OPT_OLD_RV,
+ { /* entry idx, value */ 8, VALUE_OPT_PEERS,
+ /* equiv idx, value */ 8, VALUE_OPT_PEERS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OLD_RV_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ PEERS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --peers */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, aPeersCantList,
+ /* option proc */ ntpq_custom_opt_handler,
+ /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 9, VALUE_OPT_WIDE,
+ /* equiv idx, value */ 9, VALUE_OPT_WIDE,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ WIDE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --wide */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zOld_RvText, zOld_Rv_NAME, zOld_Rv_Name,
+ /* desc, NAME, name */ WIDE_DESC, WIDE_NAME, WIDE_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
+ | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
+ /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_DISABLE_IMM, 0,
+ | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionLoadOpt,
- /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
- /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
+ /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
+ /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpq Option Environment
- */
-static char const zPROGNAME[5] = "NTPQ";
-static char const zUsageTitle[119] =
-"ntpq - standard NTP query program - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
-static char const zRcName[7] = ".ntprc";
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of ntpq. */
+#define zPROGNAME (ntpq_opt_strs+1681)
+/** Reference to the title line for ntpq usage. */
+#define zUsageTitle (ntpq_opt_strs+1686)
+/** ntpq configuration file name. */
+#define zRcName (ntpq_opt_strs+1811)
+/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- "$HOME",
- ".",
+ ntpq_opt_strs+1803,
+ ntpq_opt_strs+1809,
NULL };
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-static char const zDetail[384] = "\n\
-The [= prog-name =] utility program is used to query NTP servers which\n\
-implement the standard NTP mode 6 control message formats defined in\n\
-Appendix B of the NTPv3 specification RFC1305, requesting information\n\
-about current state and/or changes in that state. The same formats are\n\
-used in NTPv4, although some of the variables have changed and new ones\n\
-added.\n";
-static char const zFullVersion[] = NTPQ_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+/** The ntpq program bug email address. */
+#define zBugsAddr (ntpq_opt_strs+1818)
+/** Clarification/explanation of what ntpq does. */
+#define zExplain (NULL)
+/** Extra detail explaining what ntpq does. */
+#define zDetail (NULL)
+/** The full version string for ntpq. */
+#define zFullVersion (ntpq_opt_strs+1852)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -450,16 +539,71 @@ static char const zFullVersion[] = NTPQ_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define ntpq_full_usage (NULL)
+#define ntpq_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = NTPQ_EXIT_SUCCESS;
+ optionUsage(&ntpqOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug-level option.
+ *
+ * @param[in] pOptions the ntpq options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /*
+ * Be sure the flag-code[0] handles special values for the options pointer
+ * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
+ * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
+ * reset its state.
+ */
+ /* extracted from debug-opt.def, line 15 */
+OPT_VALUE_SET_DEBUG_LEVEL++;
+ (void)pOptDesc;
+ (void)pOptions;
+}
+/* extracted from optmain.tlib near line 1245 */
-#define ntpq_full_usage NULL
-#define ntpq_short_usage NULL
+/**
+ * The directory containing the data associated with ntpq.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged ntpq
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define ntpq_packager_info NULL
#else
+/** Packager information for ntpq. */
static char const ntpq_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -472,7 +616,13 @@ static char const ntpq_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ntpq. The one structure that
+ * binds them all.
+ */
tOptions ntpqOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -500,140 +650,510 @@ tOptions ntpqOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 14 /* full option count */, 9 /* user option count */,
+ 15 /* full option count */, 10 /* user option count */,
ntpq_full_usage, ntpq_short_usage,
NULL, NULL,
PKGDATADIR, ntpq_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(NTPQ_EXIT_SUCCESS);
-}
-
-#if ! defined(TEST_NTPQ_OPTS)
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * For the set-debug-level option.
- */
-static void
-doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- /* extracted from debug-opt.def, line 27 */
-DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
-}
-#endif /* defined(TEST_NTPQ_OPTS) */
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = NTPQ_EXIT_SUCCESS;
- (void)optionProcess(&ntpqOptions, argc, argv);
- optionPutShell(&ntpqOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_NTPQ_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * ntpq program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(NTPQ_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the ntpqOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &ntpqOptions;
+ tOptions * const opts = &ntpqOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- ntpqOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the ntpqOptions structure noted in the
+ comments below. The literal text is defined in ntpq_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ ntpq_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via ntpqOptions.pzCopyright */
+ puts(_("ntpq 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via ntpqOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Force IPv4 DNS name resolution"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Force IPv6 DNS name resolution"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("run a command and exit"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Increase debug verbosity level"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Set the debug verbosity level"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Force ntpq to operate in interactive mode"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("numeric host addresses"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Always output status line with readvar"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Print a list of the peers"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("Display the full 'remote' value"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("save the option state to a config file"));
+
+ /* referenced via ntpqOptions.pOptDesc->pzText */
+ puts(_("load options from a config file"));
+
+ /* referenced via ntpqOptions.pzUsageTitle */
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
+
+ /* referenced via ntpqOptions.pzFullVersion */
+ puts(_("ntpq 4.2.8"));
+
+ /* referenced via ntpqOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via ntpqOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/ntpq/ntpq-opts.def b/ntpq/ntpq-opts.def
index 8845aa320456..d0c57a029312 100644
--- a/ntpq/ntpq-opts.def
+++ b/ntpq/ntpq-opts.def
@@ -10,8 +10,6 @@ prog-name = "ntpq";
prog-title = "standard NTP query program";
argument = '[ host ...]';
-test-main;
-
flag = {
name = ipv4;
flags-cant = ipv6;
@@ -52,25 +50,14 @@ flag = {
#include debug-opt.def
flag = {
- name = peers;
- value = p;
- descrip = "Print a list of the peers";
- flags-cant = interactive;
- call-proc = ntpq_custom_opt_handler;
- doc = <<- _EndOfDoc_
- Print a list of the peers known to the server as well as a summary
- of their state. This is equivalent to the 'peers' interactive command.
- _EndOfDoc_;
-};
-
-flag = {
name = interactive;
value = i;
flags-cant = command, peers;
descrip = "Force ntpq to operate in interactive mode";
doc = <<- _EndOfDoc_
- Force ntpq to operate in interactive mode. Prompts will be written
- to the standard output and commands read from the standard input.
+ Force @code{ntpq} to operate in interactive mode.
+ Prompts will be written to the standard output and
+ commands read from the standard input.
_EndOfDoc_;
};
@@ -88,273 +75,864 @@ flag = {
name = old-rv;
descrip = "Always output status line with readvar";
doc = <<- _EndOfDoc_
- By default, ntpq now suppresses the associd=... line that
- precedes the output of "readvar" (alias "rv") when a single
- variable is requested, such as ntpq -c "rv 0 offset". This
- option causes ntpq to include both lines of output for a
- single-variable readvar. Using an environment variable to
+ By default, @code{ntpq} now suppresses the @code{associd=...}
+ line that precedes the output of @code{readvar}
+ (alias @code{rv}) when a single variable is requested, such as
+ @code{ntpq -c "rv 0 offset"}.
+ This option causes @code{ntpq} to include both lines of output
+ for a single-variable @code{readvar}.
+ Using an environment variable to
preset this option in a script will enable both older and
- newer ntpq to behave identically in this regard.
+ newer @code{ntpq} to behave identically in this regard.
_EndOfDoc_;
};
-detail = <<- _END_DETAIL
- The
- [= prog-name =]
- utility program is used to query NTP servers which
- implement the standard NTP mode 6 control message formats defined
- in Appendix B of the NTPv3 specification RFC1305, requesting
- information about current state and/or changes in that state.
- The same formats are used in NTPv4, although some of the
- variables have changed and new ones added.
- _END_DETAIL;
+flag = {
+ name = peers;
+ value = p;
+ descrip = "Print a list of the peers";
+ flags-cant = interactive;
+ call-proc = ntpq_custom_opt_handler;
+ doc = <<- _EndOfDoc_
+ Print a list of the peers known to the server as well as a summary
+ of their state. This is equivalent to the 'peers' interactive command.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = wide;
+ value = w;
+ descrip = "Display the full 'remote' value";
+ doc = <<- _EndOfDoc_
+ Display the full value of the 'remote' value. If this requires
+ more than 15 characters, display the full value, emit a newline,
+ and continue the data display properly indented on the next line.
+ _EndOfDoc_;
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
-prog-man-descrip = <<- _END_PROG_MAN_DESCRIP
- The
- [= prog-name =]
- utility program is used to query NTP servers which
- implement the standard NTP mode 6 control message formats defined
- in Appendix B of the NTPv3 specification RFC1305, requesting
- information about current state and/or changes in that state.
- 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.
- 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.
- The
- [= prog-name =]
- utility can also obtain and print a
- list of peers in a common format by sending multiple queries to the
- server.
+The
+.Nm
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+.Nm
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
- If one or more request options is included on the command line
- when
- [= prog-name =]
- 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,
- [= prog-name =]
- 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.
- The
- [= prog-name =]
- utility will prompt for
- commands if the standard input is a terminal device.
+If one or more request options is included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
- The
- [= prog-name =]
- utility 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.
- The
- [= prog-name =]
- utility makes
- one attempt to retransmit requests, and will time requests out if
- the remote host is not heard from within a suitable timeout
- time.
+.Nm
+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.
+The
+.Nm
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
- Specifying a
- command line option other than
- .Fl i
- or
- .Fl n
- will
- cause the specified query (queries) to be sent to the indicated
- host(s) immediately.
- Otherwise,
- [= prog-name =]
- will attempt to read
- interactive format commands from the standard input.
- .Ss "Internal Commands"
- 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.
+Specifying a
+command line option other than
+.Fl i
+or
+.Fl n
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+.Nm
+will attempt to read
+interactive format commands from the standard input.
+.Ss "Internal Commands"
+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.
- A
- number of interactive format commands are executed entirely within
- the
- [= prog-name =]
- utility itself and do not result in NTP mode 6
- requests being sent to a server.
- These are described following.
- @table @code
- @item ? [command_keyword]
- @itemx help [command_keyword]
- A
- .Ql \&?
- by itself will print a list of all the command
- keywords known to this incarnation of
- [= prog-name =] .
- A
- .Ql \&?
- followed by a command keyword will print function and usage
- information about the command.
- This command is probably a better
- source of information about
- [= prog-name =]
- than this manual
- page.
- @item addvars
- .Ar variable_name [=value] ...
- .Xc
- @item rmvars variable_name ...
- @item clearvars
- The data carried by NTP mode 6 messages consists of a list of
- items of the form
- .Ql variable_name=value ,
- where the
- .Ql =value
- is ignored, and can be omitted,
- in requests to the server to read variables.
- The
- [= prog-name =]
- utility maintains an internal list in which data to be included in control
- messages can be assembled, and sent using the
- .Ic readlist
- and
- .Ic writelist
- commands described below.
- The
- .Ic addvars
- 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
- .Ic rmvars
- command can be used to remove individual variables from the list,
- while the
- .Ic clearlist
- command removes all variables from the
- list.
- @item authenticate [ yes | no ]
- Normally
- [= prog-name =]
- does not authenticate requests unless
- they are write requests.
- The command
- .Ql authenticate yes
- causes
- [= prog-name =]
- 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
- .Ic peer
- display.
- The command
- .Ql authenticate
- causes
- [= prog-name =]
- to display whether or not
- [= prog-name =]
- is currently autheinticating requests.
- @item cooked
- Causes output from query commands to be "cooked", so that
- variables which are recognized by
- [= prog-name =]
- will have their
- values reformatted for human consumption.
- Variables which
- [= prog-name =]
- thinks should have a decodable value but didn't are
- marked with a trailing
- .Ql \&? .
- .@item debug [
- .Cm more |
- .Cm less |
- .Cm off
- ]
- .Xc
- With no argument, displays the current debug level.
- Otherwise, the debug level is changed to the indicated level.
- @item delay milliseconds
- 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.
- @item host hostname
- Set the host to which future queries will be sent.
- Hostname may
- be either a host name or a numeric address.
- @item hostnames Cm yes | Cm no
- If
- .Cm yes
- is specified, host names are printed in
- information displays.
- If
- .Cm no
- is specified, numeric
- addresses are printed instead.
- The default is
- .Cm yes ,
- unless
- modified using the command line
- .Fl n
- switch.
- @item keyid keyid
- 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.
- @item ntpversion [
- .Cm 1 |
- .Cm 2 |
- .Cm 3 |
- .Cm 4
- ]
- .Xc
- Sets the NTP version number which
- [= prog-name =]
- 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.
- With no argument, displays the current NTP version that will be used
- when communicating with servers.
- @item quit
- Exit
- [= prog-name =] .
- @item passwd
- 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.
- @item raw
- 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.
- @item timeout Ar milliseconds
- Specify a timeout period for responses to server queries.
- The
- default is about 5000 milliseconds.
- Note that since
- [= prog-name =]
- retries each query once after a timeout, the total waiting time for
- a timeout will be twice the timeout value set.
- @end table
+A
+number of interactive format commands are executed entirely within
+the
+.Nm
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+.Bl -tag -width "? [command_keyword]" -compact -offset indent
+.It Ic ? Op Ar command_keyword
+.It Ic help Op Ar command_keyword
+A
+.Ql \&?
+by itself will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Ql \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Nm
+than this manual
+page.
+.It Ic addvars Ar variable_name Ns Xo Op Ic =value
+.Ic ...
+.Xc
+.It Ic rmvars Ar variable_name Ic ...
+.It Ic clearvars
+.It Ic showvars
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+.Ql variable_name=value ,
+where the
+.Ql =value
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+.Nm
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+.Ic readlist
+and
+.Ic writelist
+commands described below.
+The
+.Ic addvars
+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
+.Ic rmvars
+command can be used to remove individual variables from the list,
+while the
+.Ic clearlist
+command removes all variables from the
+list.
+The
+.Ic showvars
+command displays the current list of optional variables.
+.It Ic authenticate Op yes | no
+Normally
+.Nm
+does not authenticate requests unless
+they are write requests.
+The command
+.Ql authenticate yes
+causes
+.Nm
+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
+.Ic peer
+display.
+The command
+.Ql authenticate
+causes
+.Nm
+to display whether or not
+.Nm
+is currently autheinticating requests.
+.It Ic cooked
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+.Nm
+will have their
+values reformatted for human consumption.
+Variables which
+.Nm
+thinks should have a decodable value but didn't are
+marked with a trailing
+.Ql \&? .
+.It Xo
+.Ic debug
+.Oo
+.Cm more |
+.Cm less |
+.Cm off
+.Oc
+.Xc
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+.It Ic delay Ar milliseconds
+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.
+.It Ic exit
+Exit
+.Nm .
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+.Ar hostname
+may be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic keytype Xo Oo
+.Cm md5 |
+.Cm OpenSSLDigestType
+.Oc
+.Xc
+Specify the type of key to use for authenticating requests.
+.Cm md5
+is alway supported.
+If
+.Nm
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+.Ic keytype
+is displayed.
+.It Ic ntpversion Xo Oo
+.Cm 1 |
+.Cm 2 |
+.Cm 3 |
+.Cm 4
+.Oc
+.Xc
+Sets the NTP version number which
+.Nm
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+.It Ic passwd
+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.
+.\" Not yet implemented.
+.\" .It Ic poll
+.\" .Op Ar n
+.\" .Op Ic verbose
+.\" Poll an NTP server in client mode
+.\" .Ar n
+.\" times.
+.It Ic quit
+Exit
+.Nm .
+.It Ic raw
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.It Ic version
+Print the version of the
+.Nm
+program.
+.El
- _END_PROG_MAN_DESCRIP;
+.Ss "Control Message Commands"
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server and expect a single response message.
+The exceptions are the
+.Li peers
+command, which sends a series of messages,
+and the
+.Li mreadlist
+and
+.Li mreadvar
+commands, which iterate over a range of associations.
+.Bl -tag -width "something" -compact -offset indent
+.It Cm associations
+Display a list of mobilized associations in the form:
+.Dl ind assid status conf reach auth condition last_event cnt
+.Bl -column -offset indent ".Sy Variable" ".Sy Description"
+.It Sy String Ta Sy Description
+.It Li ind Ta index on this list
+.It Li assid Ta association ID
+.It Li status Ta peer status word
+.It Li conf Ta Li yes : persistent, Li no : ephemeral
+.It Li reach Ta Li yes : reachable, Li no : unreachable
+.It Li auth Ta Li ok , Li yes , Li bad and Li none
+.It Li condition Ta selection status (see the Li select field of the peer status word)
+.It Li last_event Ta event report (see the Li event field of the peer status word)
+.It Li cnt Ta event count (see the Li count field of the peer status word)
+.El
+.It Cm authinfo
+Display the authentication statistics.
+.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+Display a list of clock variables for those associations supporting a reference clock.
+.It Cm :config Op ...
+Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.It Cm config-from-file Ar filename
+Send the each line of
+.Ar filename
+to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+.It Ic ifstats
+Display statistics for each local network address. Authentication is required.
+.It Ic iostats
+Display network and reference clock I/O statistics.
+.It Ic kerninfo
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+.It Ic lassociations
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+.It Ic lopeers Xo
+.Oo Ic -4 |
+.Ic -6
+.Oc
+.Xc
+Obtain and print a list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version).
+.It Ic lpeers Xo
+.Oo Ic -4 |
+.Ic -6
+.Oc
+.Xc
+Print a peer spreadsheet for the appropriate IP version(s).
+.Ar dstadr
+(associated with any given IP version).
+.It Ic monstats
+Display monitor facility statistics.
+.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+.Cm sort Ns = Ns Ar sortorder ,
+the options filter the list returned by
+.Cm ntpd.
+The
+.Cm limited
+and
+.Cm kod
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+.Cm mincount Ns = Ns Ar count
+option filters entries representing less than
+.Ar count
+packets.
+The
+.Cm laddr Ns = Ns Ar localaddr
+option filters entries for packets received on any local address other than
+.Ar localaddr .
+.Cm resany Ns = Ns Ar hexmask
+and
+.Cm resall Ns = Ns Ar hexmask
+filter entries containing none or less than all, respectively, of the bits in
+.Ar hexmask ,
+which must begin with
+.Cm 0x .
+The
+.Ar sortorder
+defaults to
+.Cm lstint
+and may be any of
+.Cm addr ,
+.Cm count ,
+.Cm avgint ,
+.Cm lstint ,
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+.Bl -tag -width "something" -compact -offset indent
+.It Column
+Description
+.It Ic lstint
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+.Nm .
+.It Ic avgint
+Average interval in s between packets from this address.
+.It Ic rstr
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+.Ic restrict
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+.It Ic r
+Rate control indicator, either
+a period,
+.Ic L
+or
+.Ic K
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+.It Ic m
+Packet mode.
+.It Ic v
+Packet version number.
+.It Ic count
+Packets received from this address.
+.It Ic rport
+Source port of last packet from this address.
+.It Ic remote address
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+.El
+.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+Perform the same function as the
+.Ic readvar
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+.Ic associations
+command.
+.It Ic opeers Xo
+.Oo Ic -4 |
+.Ic -6
+.Oc
+.Xc
+Obtain and print the old-style list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version),
+rather than the
+.Ar refid .
+.It Ic passociations
+Perform the same function as the
+.Ic associations
+command,
+except that it uses previously stored data rather than making a new query.
+.It Ic peers
+Display a list of peers in the form:
+.Dl [tally]remote refid st t when pool reach delay offset jitter
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic [tally]
+single-character code indicating current value of the
+.Ic select
+field of the
+.Lk decode.html#peer "peer status word"
+.It Ic remote
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.Fl w
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+.It Ic refid
+association ID or
+.Lk decode.html#kiss "'kiss code"
+.It Ic st
+stratum
+.It Ic t
+.Ic u :
+unicast or manycast client,
+.Ic b :
+broadcast or multicast client,
+.Ic l :
+local (reference clock),
+.Ic s :
+symmetric (peer),
+.Ic A :
+manycast server,
+.Ic B :
+broadcast server,
+.Ic M :
+multicast server
+.It Ic when
+sec/min/hr since last received packet
+.It Ic poll
+poll interval (log2 s)
+.It Ic reach
+reach shift register (octal)
+.It Ic delay
+roundtrip delay
+.It Ic offset
+offset of server relative to this host
+.It Ic jitter
+jitter
+.El
+.It Ic pstats Ar assocID
+Show the statistics for the peer with the given
+.Ar assocID .
+.It Ic readlist Ar assocID
+.It Ic rl Ar assocID
+Read the system or peer variables included in the variable list.
+.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+Display the specified variables.
+If
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+If no
+.Ar name
+is included, all operative variables in the name space are displayed.
+
+In this case only, if the
+.Ar assocID
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+.It Ic reslist
+Show the access control (restrict) list for
+.Nm .
+
+.It Ic saveconfig Ar filename
+Write the current configuration,
+including any runtime modifications given with
+.Ic :config
+or
+.Ic config-from-file ,
+to the ntpd host's file
+.Ar filename .
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+.Ic ntpd
+configuration file.
+.Ar filename
+can use
+.Xr strftime
+format specifies to substitute the current date and time, for example,
+.Ic q]saveconfig ntp-%Y%m%d-%H%M%S.confq] .
+The filename used is stored in system variable
+.Ic savedconfig .
+Authentication is required.
+.It Ic timerstats
+Display interval timer counters.
+.It Ic writelist Ar assocID
+Write the system or peer variables included in the variable list.
+.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
+Write the specified variables.
+If the
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+.It Ic sysinfo
+Display operational summary.
+.It Ic sysstats
+Print statistics counters maintained in the protocol module.
+.El
+
+.Ss Status Words and Kiss Codes
+
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per-association basis.
+These words are displayed in the
+.Ic rv
+and
+.Ic as
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+.Pp
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss-o'-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+
+.Ss System Variables
+The following system variables appear in the
+.Ic rv
+billboard.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic status
+.Lk decode.html#sys "system status word"
+.It Ic version
+NTP software version and build time
+.It Ic processor
+hardware platform and version
+.It Ic system
+operating system and version
+.It Ic leap
+leap warning indicator (0-3)
+.It Ic stratum
+stratum (1-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total dispersion to the primary reference clock
+.It Ic peer
+system peer association ID
+.It Ic tc
+time constant and poll exponent (log2 s) (3-17)
+.It Ic mintc
+minimum time constant (log2 s) (3-10)
+.It Ic clock
+date and time of day
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic offset
+combined offset of server relative to this host
+.It Ic sys_jitter
+combined system jitter
+.It Ic frequency
+frequency offset (PPM) relative to hardware clock
+.It Ic clk_wander
+clock frequency wander (PPM)
+.It Ic clk_jitter
+clock jitter
+.It Ic tai
+TAI-UTC offset (s)
+.It Ic leapsec
+NTP seconds when the next leap second is/was inserted
+.It Ic expire
+NTP seconds when the NIST leapseconds file expires
+.El
+The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+.Pp
+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 Autokey dance:
+
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic host
+Autokey host name for this host
+.It Ic ident
+Autokey group name for this host
+.It Ic flags
+host flags (see Autokey specification)
+.It Ic digest
+OpenSSL message digest algorithm
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic update
+NTP seconds at last signature update
+.It Ic cert
+certificate subject, issuer and certificate flags
+.It Ic until
+NTP seconds when the certificate expires
+.El
+.Ss Peer Variables
+The following peer variables appear in the
+.Ic rv
+billboard for each association.
+Not all variables are displayed in some configurations.
+
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#peer "peer status word"
+.It Ic srcadr
+source (remote) IP address
+.It Ic srcport
+source (remote) port
+.It Ic dstadr
+destination (local) IP address
+.It Ic dstport
+destination (local) port
+.It Ic leap
+leap indicator (0-3)
+.It Ic stratum
+stratum (0-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total root dispersion to the primary reference clock
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic reach
+reach register (octal)
+.It Ic unreach
+unreach counter
+.It Ic hmode
+host mode (1-6)
+.It Ic pmode
+peer mode (1-5)
+.It Ic hpoll
+host poll exponent (log2 s) (3-17)
+.It Ic ppoll
+peer poll exponent (log2 s) (3-17)
+.It Ic headway
+headway (see
+.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
+.It Ic flash
+.Lk decode.html#flash "flash status word"
+.It Ic offset
+filter offset
+.It Ic delay
+filter delay
+.It Ic dispersion
+filter dispersion
+.It Ic jitter
+filter jitter
+.It Ic ident
+Autokey group name for this association
+.It Ic bias
+unicast/broadcast bias
+.It Ic xleave
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+.El
+The
+.Ic bias
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+.Ic xleave
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+.Pp
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic host
+Autokey server name
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic initsequence
+initial key ID
+.It Ic initkey
+initial key index
+.It Ic timestamp
+Autokey signature timestamp
+.El
+
+.Ss Clock Variables
+The following clock variables appear in the
+.Ic cv
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#clock "clock status word"
+.It Ic device
+device description
+.It Ic timecode
+ASCII time code string (specific to device)
+.It Ic poll
+poll messages sent
+.It Ic noreply
+no reply
+.It Ic badformat
+bad format
+.It Ic baddata
+bad date or time
+.It Ic fudgetime1
+fudge time 1
+.It Ic fudgetime2
+fudge time 2
+.It Ic stratum
+driver stratum
+.It Ic refid
+driver reference ID
+.It Ic flags
+driver flags
+.El
+ _END_PROG_MDOC_DESCRIP;
+};
diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h
index 06abfa96a075..4e42e20ab407 100644
--- a/ntpq/ntpq-opts.h
+++ b/ntpq/ntpq-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:27 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:49:47 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpq program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the ntpq program.
* These macros are documented in the AutoGen info file in the
@@ -31,22 +46,22 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for ntpq
*/
typedef enum {
INDEX_OPT_IPV4 = 0,
@@ -54,51 +69,72 @@ typedef enum {
INDEX_OPT_COMMAND = 2,
INDEX_OPT_DEBUG_LEVEL = 3,
INDEX_OPT_SET_DEBUG_LEVEL = 4,
- INDEX_OPT_PEERS = 5,
- INDEX_OPT_INTERACTIVE = 6,
- INDEX_OPT_NUMERIC = 7,
- INDEX_OPT_OLD_RV = 8,
- INDEX_OPT_VERSION = 9,
- INDEX_OPT_HELP = 10,
- INDEX_OPT_MORE_HELP = 11,
- INDEX_OPT_SAVE_OPTS = 12,
- INDEX_OPT_LOAD_OPTS = 13
+ INDEX_OPT_INTERACTIVE = 5,
+ INDEX_OPT_NUMERIC = 6,
+ INDEX_OPT_OLD_RV = 7,
+ INDEX_OPT_PEERS = 8,
+ INDEX_OPT_WIDE = 9,
+ INDEX_OPT_VERSION = 10,
+ INDEX_OPT_HELP = 11,
+ INDEX_OPT_MORE_HELP = 12,
+ INDEX_OPT_SAVE_OPTS = 13,
+ INDEX_OPT_LOAD_OPTS = 14
} teOptIndex;
+/** count of all options for ntpq */
+#define OPTION_CT 15
+/** ntpq version */
+#define NTPQ_VERSION "4.2.8"
+/** Full ntpq version text */
+#define NTPQ_FULL_VERSION "ntpq 4.2.8"
-#define OPTION_CT 14
-#define NTPQ_VERSION "4.2.6p5"
-#define NTPQ_FULL_VERSION "ntpq 4.2.6p5"
-
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
* e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (ntpqOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of ntpq exit codes
*/
typedef enum {
- NTPQ_EXIT_SUCCESS = 0,
- NTPQ_EXIT_FAILURE = 1
-} ntpq_exit_code_t;
-/*
+ NTPQ_EXIT_SUCCESS = 0,
+ NTPQ_EXIT_FAILURE = 1,
+ NTPQ_EXIT_USAGE_ERROR = 64,
+ NTPQ_EXIT_NO_CONFIG_INPUT = 66,
+ NTPQ_EXIT_LIBOPTS_FAILURE = 70
+} ntpq_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
@@ -122,10 +158,6 @@ typedef enum {
# warning undefining SET_DEBUG_LEVEL due to option name conflict
# undef SET_DEBUG_LEVEL
# endif
-# ifdef PEERS
-# warning undefining PEERS due to option name conflict
-# undef PEERS
-# endif
# ifdef INTERACTIVE
# warning undefining INTERACTIVE due to option name conflict
# undef INTERACTIVE
@@ -138,40 +170,57 @@ typedef enum {
# warning undefining OLD_RV due to option name conflict
# undef OLD_RV
# endif
+# ifdef PEERS
+# warning undefining PEERS due to option name conflict
+# undef PEERS
+# endif
+# ifdef WIDE
+# warning undefining WIDE due to option name conflict
+# undef WIDE
+# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
# undef COMMAND
# undef DEBUG_LEVEL
# undef SET_DEBUG_LEVEL
-# undef PEERS
# undef INTERACTIVE
# undef NUMERIC
# undef OLD_RV
+# undef PEERS
+# undef WIDE
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_OPT_IPV4 '4'
#define VALUE_OPT_IPV6 '6'
#define VALUE_OPT_COMMAND 'c'
#define VALUE_OPT_DEBUG_LEVEL 'd'
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#define VALUE_OPT_PEERS 'p'
+
+#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_INTERACTIVE 'i'
#define VALUE_OPT_NUMERIC 'n'
-#define VALUE_OPT_OLD_RV 8
+#define VALUE_OPT_OLD_RV 0x1001
+#define VALUE_OPT_PEERS 'p'
+#define VALUE_OPT_WIDE 'w'
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1002
+/** option flag (value) for save-opts-value option */
#define VALUE_OPT_SAVE_OPTS '>'
+/** option flag (value) for load-opts-value option */
#define VALUE_OPT_LOAD_OPTS '<'
#define SET_OPT_SAVE_OPTS(a) STMTS( \
DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
- DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
+ DESC(SAVE_OPTS).optArg.argString = (char const*)(a))
/*
* Interface defines not associated with particular options
*/
@@ -179,15 +228,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(ntpqOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpqOptions.curOptIdx = (n); \
- ntpqOptions.pzCurOpt = NULL)
+ ntpqOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpqOptions.pUsageProc)(&ntpqOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the ntpq option descriptor.
@@ -197,6 +246,17 @@ extern tOptions ntpqOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -230,4 +290,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_NTPQ_OPTS_H_GUARD */
+
/* ntpq-opts.h ends here */
diff --git a/ntpq/ntpq-opts.texi b/ntpq/ntpq-opts.texi
deleted file mode 100644
index 1086170764c3..000000000000
--- a/ntpq/ntpq-opts.texi
+++ /dev/null
@@ -1,229 +0,0 @@
-@node ntpq Invocation
-@section Invoking ntpq
-@pindex ntpq
-@cindex standard NTP query program
-@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpq-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:35 PM by AutoGen 5.12
-# From the definitions ntpq-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-The
-[= prog-name =]
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
-information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpq} program. It documents the @command{ntpq} usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpq usage:: ntpq usage help (-?)
-* ntpq command:: command option (-c)
-* ntpq debug-level:: debug-level option (-d)
-* ntpq interactive:: interactive option (-i)
-* ntpq ipv4:: ipv4 option (-4)
-* ntpq ipv6:: ipv6 option (-6)
-* ntpq numeric:: numeric option (-n)
-* ntpq old-rv:: old-rv option
-* ntpq peers:: peers option (-p)
-* ntpq set-debug-level:: set-debug-level option (-D)
-@end menu
-
-@node ntpq usage
-@subsection ntpq usage help (-?)
-@cindex ntpq usage
-
-This is the automatically generated usage text for ntpq:
-
-@exampleindent 0
-@example
-ntpq - standard NTP query program - Ver. 4.2.6p5
-USAGE: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -c Str command run a command and exit
- - may appear multiple times
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -p no peers Print a list of the peers
- - prohibits these options:
- interactive
- -i no interactive Force ntpq to operate in interactive mode
- - prohibits these options:
- command
- peers
- -n no numeric numeric host addresses
- no old-rv Always output status line with readvar
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - disabled as --no-load-opts
- - may appear multiple times
-
-Options are specified by doubled hyphens and their name or by a single
-hyphen and the flag character.
-
-The following option preset mechanisms are supported:
- - reading file $HOME/.ntprc
- - reading file ./.ntprc
- - examining environment variables named NTPQ_*
-
-The [= prog-name =] utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined in
-Appendix B of the NTPv3 specification RFC1305, requesting information
-about current state and/or changes in that state. The same formats are
-used in NTPv4, although some of the variables have changed and new ones
-added.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpq command
-@subsection command option (-c)
-@cindex ntpq-command
-
-This is the ``run a command and exit'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-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).
-
-@node ntpq debug-level
-@subsection debug-level option (-d)
-@cindex ntpq-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntpq interactive
-@subsection interactive option (-i)
-@cindex ntpq-interactive
-
-This is the ``force ntpq to operate in interactive mode'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-command, peers.
-@end itemize
-
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-
-@node ntpq ipv4
-@subsection ipv4 option (-4)
-@cindex ntpq-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-
-@node ntpq ipv6
-@subsection ipv6 option (-6)
-@cindex ntpq-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-
-@node ntpq numeric
-@subsection numeric option (-n)
-@cindex ntpq-numeric
-
-This is the ``numeric host addresses'' option.
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-
-@node ntpq old-rv
-@subsection old-rv option
-@cindex ntpq-old-rv
-
-This is the ``always output status line with readvar'' option.
-By default, ntpq now suppresses the associd=... line that
-precedes the output of "readvar" (alias "rv") when a single
-variable is requested, such as ntpq -c "rv 0 offset". This
-option causes ntpq to include both lines of output for a
-single-variable readvar. Using an environment variable to
-preset this option in a script will enable both older and
-newer ntpq to behave identically in this regard.
-
-@node ntpq peers
-@subsection peers option (-p)
-@cindex ntpq-peers
-
-This is the ``print a list of the peers'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-interactive.
-@end itemize
-
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-
-@node ntpq set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntpq-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c
index ba235f1575e9..5460f80fc93a 100644
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -1,21 +1,18 @@
/*
- * ntpq_ops.c - subroutines which are called to perform operations by ntpq
+ * ntpq-subs.c - subroutines which are called to perform ntpq commands.
*/
-
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/time.h>
-#include "ntp_stdlib.h"
#include "ntpq.h"
#include "ntpq-opts.h"
-extern char * chosts[];
-extern char currenthost[];
-extern int currenthostisnum;
-extern int numhosts;
-int maxhostlen;
+extern char currenthost[];
+extern int currenthostisnum;
+size_t maxhostlen;
/*
* Declarations for command handlers in here
@@ -41,10 +38,10 @@ static void readvar (struct parse *, FILE *);
static void writevar (struct parse *, FILE *);
static void clocklist (struct parse *, FILE *);
static void clockvar (struct parse *, FILE *);
-static int findassidrange (u_int32, u_int32, int *, int *);
+static int findassidrange (u_int32, u_int32, int *, int *,
+ FILE *);
static void mreadlist (struct parse *, FILE *);
static void mreadvar (struct parse *, FILE *);
-static int dogetassoc (FILE *);
static void printassoc (int, FILE *);
static void associations (struct parse *, FILE *);
static void lassociations (struct parse *, FILE *);
@@ -55,7 +52,8 @@ static void lpassociations (struct parse *, FILE *);
static void radiostatus (struct parse *, FILE *);
#endif /* UNUSED */
-static void pstatus (struct parse *, FILE *);
+static void authinfo (struct parse *, FILE *);
+static void pstats (struct parse *, FILE *);
static long when (l_fp *, l_fp *, l_fp *);
static char * prettyinterval (char *, size_t, long);
static int doprintpeers (struct varlist *, int, int, int, const char *, FILE *, int);
@@ -66,10 +64,18 @@ static void lpeers (struct parse *, FILE *);
static void doopeers (int, FILE *, int);
static void opeers (struct parse *, FILE *);
static void lopeers (struct parse *, FILE *);
-static void config (struct parse *, FILE *);
-static void saveconfig (struct parse *, FILE *);
-static void config_from_file(struct parse *, FILE *);
-
+static void config (struct parse *, FILE *);
+static void saveconfig (struct parse *, FILE *);
+static void config_from_file(struct parse *, FILE *);
+static void mrulist (struct parse *, FILE *);
+static void ifstats (struct parse *, FILE *);
+static void reslist (struct parse *, FILE *);
+static void sysstats (struct parse *, FILE *);
+static void sysinfo (struct parse *, FILE *);
+static void kerninfo (struct parse *, FILE *);
+static void monstats (struct parse *, FILE *);
+static void iostats (struct parse *, FILE *);
+static void timerstats (struct parse *, FILE *);
/*
* Commands we understand. Ntpdc imports this.
@@ -111,26 +117,26 @@ struct xcmd opcmds[] = {
{ "writelist", writelist, { OPT|NTP_UINT, NO, NO, NO },
{ "assocID", "", "", "" },
"write the system or peer variables included in the variable list" },
- { "readvar", readvar, { OPT|NTP_UINT, OPT|NTP_STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
+ { "readvar", readvar, { OPT|NTP_UINT, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR, },
+ { "assocID", "varname1", "varname2", "varname3" },
"read system or peer variables" },
- { "rv", readvar, { OPT|NTP_UINT, OPT|NTP_STR, NO, NO },
- { "assocID", "name=value[,...]", "", "" },
+ { "rv", readvar, { OPT|NTP_UINT, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR, },
+ { "assocID", "varname1", "varname2", "varname3" },
"read system or peer variables" },
{ "writevar", writevar, { NTP_UINT, NTP_STR, NO, NO },
{ "assocID", "name=value,[...]", "", "" },
"write system or peer variables" },
{ "mreadlist", mreadlist, { NTP_UINT, NTP_UINT, NO, NO },
- { "assocID", "assocID", "", "" },
+ { "assocIDlow", "assocIDhigh", "", "" },
"read the peer variables in the variable list for multiple peers" },
{ "mrl", mreadlist, { NTP_UINT, NTP_UINT, NO, NO },
- { "assocID", "assocID", "", "" },
+ { "assocIDlow", "assocIDhigh", "", "" },
"read the peer variables in the variable list for multiple peers" },
{ "mreadvar", mreadvar, { NTP_UINT, NTP_UINT, OPT|NTP_STR, NO },
- { "assocID", "assocID", "name=value[,...]", "" },
+ { "assocIDlow", "assocIDhigh", "name=value[,...]", "" },
"read peer variables from multiple peers" },
{ "mrv", mreadvar, { NTP_UINT, NTP_UINT, OPT|NTP_STR, NO },
- { "assocID", "assocID", "name=value[,...]", "" },
+ { "assocIDlow", "assocIDhigh", "name=value[,...]", "" },
"read peer variables from multiple peers" },
{ "clocklist", clocklist, { OPT|NTP_UINT, NO, NO, NO },
{ "assocID", "", "", "" },
@@ -144,9 +150,9 @@ struct xcmd opcmds[] = {
{ "cv", clockvar, { OPT|NTP_UINT, OPT|NTP_STR, NO, NO },
{ "assocID", "name=value[,...]", "", "" },
"read clock variables" },
- { "pstatus", pstatus, { NTP_UINT, NO, NO, NO },
+ { "pstats", pstats, { NTP_UINT, NO, NO, NO },
{ "assocID", "", "", "" },
- "print status information returned for a peer" },
+ "show statistics 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]" },
@@ -165,6 +171,36 @@ struct xcmd opcmds[] = {
{ "config-from-file", config_from_file, { NTP_STR, NO, NO, NO },
{ "<configuration filename>", "", "", "" },
"configure ntpd using the configuration filename" },
+ { "mrulist", mrulist, { OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
+ { "tag=value", "tag=value", "tag=value", "tag=value" },
+ "display the list of most recently seen source addresses, tags mincount=... resall=0x... resany=0x..." },
+ { "ifstats", ifstats, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "show statistics for each local address ntpd is using" },
+ { "reslist", reslist, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "show ntpd access control list" },
+ { "sysinfo", sysinfo, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display system summary" },
+ { "kerninfo", kerninfo, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display kernel loop and PPS statistics" },
+ { "sysstats", sysstats, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display system uptime and packet counts" },
+ { "monstats", monstats, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display monitor (mrulist) counters and limits" },
+ { "authinfo", authinfo, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display symmetric authentication counters" },
+ { "iostats", iostats, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display network input and output counters" },
+ { "timerstats", timerstats, { NO, NO, NO, NO },
+ { "", "", "", "" },
+ "display interval timer counters" },
{ 0, 0, { NO, NO, NO, NO },
{ "-4|-6", "", "", "" }, "" }
};
@@ -173,9 +209,47 @@ struct xcmd opcmds[] = {
/*
* Variable list data space
*/
-#define MAXLINE 512 /* maximum length of a line */
-#define MAXLIST 64 /* maximum number of variables in list */
-#define LENHOSTNAME 256 /* host name is 256 characters long */
+#define MAXLINE 512 /* maximum length of a line */
+#define MAXLIST 128 /* maximum variables in list */
+#define LENHOSTNAME 256 /* host name limit */
+
+#define MRU_GOT_COUNT 0x1
+#define MRU_GOT_LAST 0x2
+#define MRU_GOT_FIRST 0x4
+#define MRU_GOT_MV 0x8
+#define MRU_GOT_RS 0x10
+#define MRU_GOT_ADDR 0x20
+#define MRU_GOT_ALL (MRU_GOT_COUNT | MRU_GOT_LAST | MRU_GOT_FIRST \
+ | MRU_GOT_MV | MRU_GOT_RS | MRU_GOT_ADDR)
+
+/*
+ * mrulist() depends on MRUSORT_DEF and MRUSORT_RDEF being the first two
+ */
+typedef enum mru_sort_order_tag {
+ MRUSORT_DEF = 0, /* lstint ascending */
+ MRUSORT_R_DEF, /* lstint descending */
+ MRUSORT_AVGINT, /* avgint ascending */
+ MRUSORT_R_AVGINT, /* avgint descending */
+ MRUSORT_ADDR, /* IPv4 asc. then IPv6 asc. */
+ MRUSORT_R_ADDR, /* IPv6 desc. then IPv4 desc. */
+ MRUSORT_COUNT, /* hit count ascending */
+ MRUSORT_R_COUNT, /* hit count descending */
+ MRUSORT_MAX, /* special: count of this enum */
+} mru_sort_order;
+
+const char * const mru_sort_keywords[MRUSORT_MAX] = {
+ "lstint", /* MRUSORT_DEF */
+ "-lstint", /* MRUSORT_R_DEF */
+ "avgint", /* MRUSORT_AVGINT */
+ "-avgint", /* MRUSORT_R_AVGINT */
+ "addr", /* MRUSORT_ADDR */
+ "-addr", /* MRUSORT_R_ADDR */
+ "count", /* MRUSORT_COUNT */
+ "-count", /* MRUSORT_R_COUNT */
+};
+
+typedef int (*qsort_cmp)(const void *, const void *);
+
/*
* Old CTL_PST defines for version 2.
*/
@@ -203,18 +277,101 @@ struct varlist {
* Imported from ntpq.c
*/
extern int showhostnames;
+extern int wideremote;
extern int rawmode;
extern struct servent *server_entry;
-extern struct association assoc_cache[];
-extern int numassoc;
+extern struct association *assoc_cache;
extern u_char pktversion;
-extern struct ctl_var peer_var[];
+
+typedef struct mru_tag mru;
+struct mru_tag {
+ mru * hlink; /* next in hash table bucket */
+ DECL_DLIST_LINK(mru, mlink);
+ int count;
+ l_fp last;
+ l_fp first;
+ u_char mode;
+ u_char ver;
+ u_short rs;
+ sockaddr_u addr;
+};
+
+typedef struct ifstats_row_tag {
+ u_int ifnum;
+ sockaddr_u addr;
+ sockaddr_u bcast;
+ int enabled;
+ u_int flags;
+ int mcast_count;
+ char name[32];
+ int peer_count;
+ int received;
+ int sent;
+ int send_errors;
+ u_int ttl;
+ u_int uptime;
+} ifstats_row;
+
+typedef struct reslist_row_tag {
+ u_int idx;
+ sockaddr_u addr;
+ sockaddr_u mask;
+ u_long hits;
+ char flagstr[128];
+} reslist_row;
+
+typedef struct var_display_collection_tag {
+ const char * const tag; /* system variable */
+ const char * const display; /* descriptive text */
+ u_char type; /* NTP_STR, etc */
+ union {
+ char * str;
+ sockaddr_u sau; /* NTP_ADD */
+ l_fp lfp; /* NTP_LFP */
+ } v; /* retrieved value */
+} vdc;
/*
- * For quick string comparisons
+ * other local function prototypes
*/
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
+void mrulist_ctrl_c_hook(void);
+static mru * add_mru(mru *);
+static int collect_mru_list(const char *, l_fp *);
+static int fetch_nonce(char *, size_t);
+static int qcmp_mru_avgint(const void *, const void *);
+static int qcmp_mru_r_avgint(const void *, const void *);
+static int qcmp_mru_addr(const void *, const void *);
+static int qcmp_mru_r_addr(const void *, const void *);
+static int qcmp_mru_count(const void *, const void *);
+static int qcmp_mru_r_count(const void *, const void *);
+static void validate_ifnum(FILE *, u_int, int *, ifstats_row *);
+static void another_ifstats_field(int *, ifstats_row *, FILE *);
+static void collect_display_vdc(associd_t as, vdc *table,
+ int decodestatus, FILE *fp);
+/*
+ * static globals
+ */
+static u_int mru_count;
+static u_int mru_dupes;
+volatile int mrulist_interrupted;
+static mru mru_list; /* listhead */
+static mru ** hash_table;
+
+/*
+ * qsort comparison function table for mrulist(). The first two
+ * entries are NULL because they are handled without qsort().
+ */
+const static qsort_cmp mru_qcmp_table[MRUSORT_MAX] = {
+ NULL, /* MRUSORT_DEF unused */
+ NULL, /* MRUSORT_R_DEF unused */
+ &qcmp_mru_avgint, /* MRUSORT_AVGINT */
+ &qcmp_mru_r_avgint, /* MRUSORT_R_AVGINT */
+ &qcmp_mru_addr, /* MRUSORT_ADDR */
+ &qcmp_mru_r_addr, /* MRUSORT_R_ADDR */
+ &qcmp_mru_count, /* MRUSORT_COUNT */
+ &qcmp_mru_r_count, /* MRUSORT_R_COUNT */
+};
/*
* checkassocid - return the association ID, checking to see if it is valid
@@ -241,7 +398,10 @@ checkassocid(
/*
- * findlistvar - look for the named variable in a list and return if found
+ * findlistvar - Look for the named variable in a varlist. If found,
+ * return a pointer to it. Otherwise, if the list has
+ * slots available, return the pointer to the first free
+ * slot, or NULL if it's full.
*/
static struct varlist *
findlistvar(
@@ -249,14 +409,15 @@ findlistvar(
char *name
)
{
- register struct varlist *vl;
+ struct varlist *vl;
- for (vl = list; vl < list + MAXLIST && vl->name != 0; vl++)
- if (STREQ(name, vl->name))
- return vl;
+ for (vl = list; vl < list + MAXLIST && vl->name != NULL; vl++)
+ if (!strcmp(name, vl->name))
+ return vl;
if (vl < list + MAXLIST)
return vl;
- return (struct varlist *)0;
+
+ return NULL;
}
@@ -269,7 +430,7 @@ doaddvlist(
const char *vars
)
{
- register struct varlist *vl;
+ struct varlist *vl;
int len;
char *name;
char *value;
@@ -277,19 +438,19 @@ doaddvlist(
len = strlen(vars);
while (nextvar(&len, &vars, &name, &value)) {
vl = findlistvar(vlist, name);
- if (vl == 0) {
- (void) fprintf(stderr, "Variable list full\n");
+ if (NULL == vl) {
+ fprintf(stderr, "Variable list full\n");
return;
}
- if (vl->name == 0) {
+ if (NULL == vl->name) {
vl->name = estrdup(name);
- } else if (vl->value != 0) {
+ } else if (vl->value != NULL) {
free(vl->value);
- vl->value = 0;
+ vl->value = NULL;
}
- if (value != 0)
+ if (value != NULL)
vl->value = estrdup(value);
}
}
@@ -304,7 +465,7 @@ dormvlist(
const char *vars
)
{
- register struct varlist *vl;
+ struct varlist *vl;
int len;
char *name;
char *value;
@@ -376,16 +537,20 @@ makequerydata(
else
valuelen = strlen(vl->value);
totallen = namelen + valuelen + (valuelen != 0) + (cp != data);
- if (cp + totallen > cpend)
- break;
+ if (cp + totallen > cpend) {
+ fprintf(stderr,
+ "***Ignoring variables starting with `%s'\n",
+ vl->name);
+ break;
+ }
if (cp != data)
*cp++ = ',';
- memmove(cp, vl->name, (unsigned)namelen);
+ memcpy(cp, vl->name, (size_t)namelen);
cp += namelen;
if (valuelen != 0) {
*cp++ = '=';
- memmove(cp, vl->value, (unsigned)valuelen);
+ memcpy(cp, vl->value, (size_t)valuelen);
cp += valuelen;
}
}
@@ -413,8 +578,8 @@ doquerylist(
datalen = sizeof(data);
makequerydata(vlist, &datalen, data);
- return doquery(op, associd, auth, datalen, data, rstatus,
- dsize, datap);
+ return doquery(op, associd, auth, datalen, data, rstatus, dsize,
+ datap);
}
@@ -427,19 +592,18 @@ doprintvlist(
FILE *fp
)
{
- register struct varlist *vl;
+ size_t n;
- 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);
- }
- }
+ if (NULL == vlist->name) {
+ fprintf(fp, "No variables on list\n");
+ return;
+ }
+ for (n = 0; n < MAXLIST && vlist[n].name != NULL; n++) {
+ if (NULL == vlist[n].value)
+ fprintf(fp, "%s\n", vlist[n].name);
+ else
+ fprintf(fp, "%s=%s\n", vlist[n].name,
+ vlist[n].value);
}
}
@@ -532,20 +696,21 @@ dolist(
return 0;
if (numhosts > 1)
- (void) fprintf(fp, "server=%s ", currenthost);
+ fprintf(fp, "server=%s ", currenthost);
if (dsize == 0) {
if (associd == 0)
- (void) fprintf(fp, "No system%s variables returned\n",
- (type == TYPE_CLOCK) ? " clock" : "");
+ 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);
+ fprintf(fp,
+ "No information returned for%s association %u\n",
+ (type == TYPE_CLOCK) ? " clock" : "",
+ associd);
return 1;
}
if (!quiet)
- fprintf(fp,"associd=%d ",associd);
+ fprintf(fp, "associd=%u ", associd);
printvars(dsize, datap, (int)rstatus, type, quiet, fp);
return 1;
}
@@ -616,7 +781,7 @@ writelist(
if (dsize == 0)
(void) fprintf(fp, "done! (no data returned)\n");
else {
- (void) fprintf(fp,"associd=%d ",associd);
+ (void) fprintf(fp,"associd=%u ", associd);
printvars(dsize, datap, (int)rstatus,
(associd != 0) ? TYPE_PEER : TYPE_SYS, 0, fp);
}
@@ -634,6 +799,8 @@ readvar(
)
{
associd_t associd;
+ u_int tmpcount;
+ u_int u;
int type;
struct varlist tmplist[MAXLIST];
@@ -644,9 +811,12 @@ readvar(
else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
return;
- memset(tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
+ ZERO(tmplist);
+ if (pcmd->nargs > 1) {
+ tmpcount = pcmd->nargs - 1;
+ for (u = 0; u < tmpcount; u++)
+ doaddvlist(tmplist, pcmd->argval[1 + u].string);
+ }
type = (0 == associd)
? TYPE_SYS
@@ -680,7 +850,7 @@ writevar(
else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
return;
- memset((char *)tmplist, 0, sizeof(tmplist));
+ ZERO(tmplist);
doaddvlist(tmplist, pcmd->argval[1].string);
res = doquerylist(tmplist, CTL_OP_WRITEVAR, associd, 1, &rstatus,
@@ -696,7 +866,7 @@ writevar(
if (dsize == 0)
fprintf(fp, "done! (no data returned)\n");
else {
- fprintf(fp,"associd=%d ",associd);
+ fprintf(fp,"associd=%u ", associd);
type = (0 == associd)
? TYPE_SYS
: TYPE_PEER;
@@ -749,7 +919,7 @@ clockvar(
else if ((associd = checkassocid(pcmd->argval[0].uval)) == 0)
return;
- memset(tmplist, 0, sizeof(tmplist));
+ ZERO(tmplist);
if (pcmd->nargs >= 2)
doaddvlist(tmplist, pcmd->argval[1].string);
@@ -764,17 +934,22 @@ clockvar(
*/
static int
findassidrange(
- u_int32 assid1,
- u_int32 assid2,
- int *from,
- int *to
+ u_int32 assid1,
+ u_int32 assid2,
+ int * from,
+ int * to,
+ FILE * fp
)
{
associd_t assids[2];
int ind[COUNTOF(assids)];
- int i;
+ u_int i;
size_t a;
+
+ if (0 == numassoc)
+ dogetassoc(fp);
+
assids[0] = checkassocid(assid1);
if (0 == assids[0])
return 0;
@@ -821,16 +996,15 @@ mreadlist(
int from;
int to;
- /* HMS: uval? */
if (!findassidrange(pcmd->argval[0].uval, pcmd->argval[1].uval,
- &from, &to))
+ &from, &to, fp))
return;
for (i = from; i <= to; i++) {
if (i != from)
- (void) fprintf(fp, "\n");
- if (!dolist(g_varlist, (int)assoc_cache[i].assid,
- CTL_OP_READVAR, TYPE_PEER, fp))
+ fprintf(fp, "\n");
+ if (!dolist(g_varlist, assoc_cache[i].assid,
+ CTL_OP_READVAR, TYPE_PEER, fp))
return;
}
return;
@@ -852,13 +1026,12 @@ mreadvar(
struct varlist tmplist[MAXLIST];
struct varlist *pvars;
- /* HMS: uval? */
if (!findassidrange(pcmd->argval[0].uval, pcmd->argval[1].uval,
- &from, &to))
+ &from, &to, fp))
return;
+ ZERO(tmplist);
if (pcmd->nargs >= 3) {
- memset(tmplist, 0, sizeof(tmplist));
doaddvlist(tmplist, pcmd->argval[2].string);
pvars = tmplist;
} else {
@@ -866,13 +1039,14 @@ mreadvar(
}
for (i = from; i <= to; i++) {
- if (i != from)
- fprintf(fp, "\n");
- if (!dolist(pvars, (int)assoc_cache[i].assid,
- CTL_OP_READVAR, TYPE_PEER, fp))
+ if (!dolist(pvars, assoc_cache[i].assid, CTL_OP_READVAR,
+ TYPE_PEER, fp))
break;
}
- doclearvlist(tmplist);
+
+ if (pvars == tmplist)
+ doclearvlist(tmplist);
+
return;
}
@@ -880,12 +1054,13 @@ mreadvar(
/*
* dogetassoc - query the host for its list of associations
*/
-static int
+int
dogetassoc(
FILE *fp
)
{
const char *datap;
+ const u_short *pus;
int res;
int dsize;
u_short rstatus;
@@ -898,29 +1073,41 @@ dogetassoc(
if (dsize == 0) {
if (numhosts > 1)
- (void) fprintf(fp, "server=%s ", currenthost);
- (void) fprintf(fp, "No association ID's returned\n");
+ fprintf(fp, "server=%s ", currenthost);
+ fprintf(fp, "No association ID's returned\n");
return 0;
}
if (dsize & 0x3) {
if (numhosts > 1)
- (void) fprintf(stderr, "server=%s ", currenthost);
- (void) fprintf(stderr,
- "***Server returned %d octets, should be multiple of 4\n",
- dsize);
+ fprintf(stderr, "server=%s ", currenthost);
+ 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(*((const u_short *)datap));
- datap += sizeof(u_short);
- assoc_cache[numassoc].status = ntohs(*((const u_short *)datap));
- datap += sizeof(u_short);
- if (++numassoc >= MAXASSOC)
- break;
- dsize -= sizeof(u_short) + sizeof(u_short);
+ if (numassoc >= assoc_cache_slots) {
+ grow_assoc_cache();
+ }
+ pus = (const void *)datap;
+ assoc_cache[numassoc].assid = ntohs(*pus);
+ datap += sizeof(*pus);
+ pus = (const void *)datap;
+ assoc_cache[numassoc].status = ntohs(*pus);
+ datap += sizeof(*pus);
+ dsize -= 2 * sizeof(*pus);
+ if (debug) {
+ fprintf(stderr, "[%u] ",
+ assoc_cache[numassoc].assid);
+ }
+ numassoc++;
+ }
+ if (debug) {
+ fprintf(stderr, "\n%d associations total\n", numassoc);
}
sortassoc();
return 1;
@@ -937,7 +1124,7 @@ printassoc(
)
{
register char *bp;
- int i;
+ u_int i;
u_char statval;
int event;
u_long event_count;
@@ -946,7 +1133,6 @@ printassoc(
const char *auth;
const char *condition = "";
const char *last_event;
- const char *cnt;
char buf[128];
if (numassoc == 0) {
@@ -1101,12 +1287,11 @@ printassoc(
last_event = "";
break;
}
- cnt = uinttoa(event_count);
snprintf(buf, sizeof(buf),
- "%3d %5u %04x %3.3s %4s %4.4s %9.9s %11s %2s",
+ "%3d %5u %04x %3.3s %4s %4.4s %9.9s %11s %2lu",
i + 1, assoc_cache[i].assid,
assoc_cache[i].status, conf, reach, auth,
- condition, last_event, cnt);
+ condition, last_event, event_count);
bp = buf + strlen(buf);
while (bp > buf && ' ' == bp[-1])
--bp;
@@ -1240,45 +1425,6 @@ radiostatus(
#endif /* UNUSED */
/*
- * pstatus - print peer status returned by the server
- */
-static void
-pstatus(
- struct parse *pcmd,
- FILE *fp
- )
-{
- const char *datap;
- int res;
- associd_t 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, NULL, &rstatus,
- &dsize, &datap);
-
- if (res != 0)
- return;
-
- if (numhosts > 1)
- fprintf(fp, "server=%s ", currenthost);
- if (dsize == 0) {
- fprintf(fp,
- "No information returned for association %u\n",
- associd);
- return;
- }
-
- fprintf(fp, "associd=%u ", associd);
- printvars(dsize, datap, (int)rstatus, TYPE_PEER, 0, fp);
-}
-
-
-/*
* when - print how long its been since his last packet arrived
*/
static long
@@ -1373,54 +1519,42 @@ decodeaddrtype(
* 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 */
+ { "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 */
+ { "hmode", 0 }, /* 13 */
{ 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 */
+ { "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 */
+ { "hmode", 0 }, /* 13 */
+ { "srchost", 0 }, /* 14 */
{ 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
@@ -1438,15 +1572,21 @@ doprintpeers(
{
char *name;
char *value = NULL;
- int i;
int c;
-
+ int len;
+ int have_srchost;
+ int have_dstadr;
+ int have_da_rid;
+ int have_jitter;
sockaddr_u srcadr;
sockaddr_u dstadr;
+ sockaddr_u dum_store;
sockaddr_u refidadr;
+ long hmode = 0;
u_long srcport = 0;
- char *dstadr_refid = "0.0.0.0";
- char *serverlocal;
+ u_int32 u32;
+ const char *dstadr_refid = "0.0.0.0";
+ const char *serverlocal;
size_t drlen;
u_long stratum = 0;
long ppoll = 0;
@@ -1459,59 +1599,66 @@ doprintpeers(
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);
+ have_srchost = FALSE;
+ have_dstadr = FALSE;
+ have_da_rid = FALSE;
+ have_jitter = FALSE;
ZERO_SOCK(&srcadr);
ZERO_SOCK(&dstadr);
-
- /* 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));
+ clock_name[0] = '\0';
+ ZERO(estoffset);
+ ZERO(estdelay);
+ ZERO(estjitter);
+ ZERO(estdisp);
while (nextvar(&datalen, &data, &name, &value)) {
- sockaddr_u dum_store;
-
- i = findvar(name, peer_var, 1);
- if (i == 0)
- continue; /* don't know this one */
- switch (i) {
- case CP_SRCADR:
- if (decodenetnum(value, &srcadr)) {
- havevar[HAVE_SRCADR] = 1;
+ if (!strcmp("srcadr", name) ||
+ !strcmp("peeradr", name)) {
+ if (!decodenetnum(value, &srcadr))
+ fprintf(stderr, "malformed %s=%s\n",
+ name, value);
+ } else if (!strcmp("srchost", name)) {
+ if (pvl == peervarlist) {
+ len = strlen(value);
+ if (2 < len &&
+ (size_t)len < sizeof(clock_name)) {
+ /* strip quotes */
+ value++;
+ len -= 2;
+ memcpy(clock_name, value, len);
+ clock_name[len] = '\0';
+ have_srchost = TRUE;
+ }
}
- break;
- case CP_DSTADR:
+ } else if (!strcmp("dstadr", name)) {
if (decodenetnum(value, &dum_store)) {
type = decodeaddrtype(&dum_store);
- havevar[HAVE_DSTADR] = 1;
+ have_dstadr = TRUE;
dstadr = dum_store;
if (pvl == opeervarlist) {
+ have_da_rid = TRUE;
dstadr_refid = trunc_left(stoa(&dstadr), 15);
}
}
- break;
- case CP_REFID:
+ } else if (!strcmp("hmode", name)) {
+ decodeint(value, &hmode);
+ } else if (!strcmp("refid", name)) {
if (pvl == peervarlist) {
- havevar[HAVE_REFID] = 1;
- if (*value == '\0') {
+ have_da_rid = TRUE;
+ drlen = strlen(value);
+ if (0 == drlen) {
dstadr_refid = "";
- } else if (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 if (drlen <= 4) {
+ ZERO(u32);
+ memcpy(&u32, value, drlen);
+ dstadr_refid = refid_str(u32, 1);
} else if (decodenetnum(value, &refidadr)) {
if (SOCK_UNSPEC(&refidadr))
dstadr_refid = "0.0.0.0";
@@ -1522,84 +1669,90 @@ doprintpeers(
dstadr_refid =
stoa(&refidadr);
} else {
- havevar[HAVE_REFID] = 0;
+ have_da_rid = FALSE;
}
}
- 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 (pvl == peervarlist)
- 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;
+ } else if (!strcmp("stratum", name)) {
+ decodeuint(value, &stratum);
+ } else if (!strcmp("hpoll", name)) {
+ if (decodeint(value, &hpoll) && hpoll < 0)
+ hpoll = NTP_MINPOLL;
+ } else if (!strcmp("ppoll", name)) {
+ if (decodeint(value, &ppoll) && ppoll < 0)
+ ppoll = NTP_MINPOLL;
+ } else if (!strcmp("reach", name)) {
+ decodeuint(value, &reach);
+ } else if (!strcmp("delay", name)) {
+ decodetime(value, &estdelay);
+ } else if (!strcmp("offset", name)) {
+ decodetime(value, &estoffset);
+ } else if (!strcmp("jitter", name)) {
+ if (pvl == peervarlist &&
+ decodetime(value, &estjitter))
+ have_jitter = 1;
+ } else if (!strcmp("rootdisp", name) ||
+ !strcmp("dispersion", name)) {
+ decodetime(value, &estdisp);
+ } else if (!strcmp("rec", name)) {
+ decodets(value, &rec);
+ } else if (!strcmp("srcport", name) ||
+ !strcmp("peerport", name)) {
+ decodeuint(value, &srcport);
+ } else if (!strcmp("reftime", name)) {
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.
+ * hmode gives the best guidance for the t column. If the response
+ * did not include hmode we'll use the old decodeaddrtype() result.
*/
- if (havevar[HAVE_SRCPORT] && srcport != NTP_PORT)
- return (1);
+ switch (hmode) {
+
+ case MODE_BCLIENT:
+ /* broadcastclient or multicastclient */
+ type = 'b';
+ break;
+
+ case MODE_BROADCAST:
+ /* broadcast or multicast server */
+ if (IS_MCAST(&srcadr))
+ type = 'M';
+ else
+ type = 'B';
+ break;
+
+ case MODE_CLIENT:
+ if (ISREFCLOCKADR(&srcadr))
+ type = 'l'; /* local refclock*/
+ else if (SOCK_UNSPEC(&srcadr))
+ type = 'p'; /* pool */
+ else if (IS_MCAST(&srcadr))
+ type = 'a'; /* manycastclient */
+ else
+ type = 'u'; /* unicast */
+ break;
+
+ case MODE_ACTIVE:
+ type = 's'; /* symmetric active */
+ break; /* configured */
+
+ case MODE_PASSIVE:
+ type = 'S'; /* symmetric passive */
+ break; /* ephemeral */
+ }
/*
* Got everything, format the line
*/
- poll_sec = 1<<max(min3(ppoll, hpoll, NTP_MAXPOLL), NTP_MINPOLL);
+ poll_sec = 1 << min(ppoll, hpoll);
if (pktversion > NTP_OLDVERSION)
c = flash3[CTL_PEER_STATVAL(rstatus) & 0x7];
else
c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3];
if (numhosts > 1) {
- if (peervarlist == pvl && havevar[HAVE_DSTADR]) {
+ if (peervarlist == pvl && have_dstadr) {
serverlocal = nntohost_col(&dstadr,
(size_t)min(LIB_BUFLENGTH - 1, maxhostlen),
TRUE);
@@ -1610,13 +1763,22 @@ doprintpeers(
else
serverlocal = currenthost;
}
- fprintf(fp, "%-*s ", maxhostlen, serverlocal);
+ fprintf(fp, "%-*s ", (int)maxhostlen, serverlocal);
}
if (AF_UNSPEC == af || AF(&srcadr) == af) {
- strncpy(clock_name, nntohost(&srcadr), sizeof(clock_name));
- fprintf(fp, "%c%-15.15s ", c, clock_name);
- drlen = strlen(dstadr_refid);
- makeascii(drlen, dstadr_refid, fp);
+ if (!have_srchost)
+ strlcpy(clock_name, nntohost(&srcadr),
+ sizeof(clock_name));
+ if (wideremote && 15 < strlen(clock_name))
+ fprintf(fp, "%c%s\n ", c, clock_name);
+ else
+ fprintf(fp, "%c%-15.15s ", c, clock_name);
+ if (!have_da_rid) {
+ drlen = 0;
+ } else {
+ drlen = strlen(dstadr_refid);
+ makeascii(drlen, dstadr_refid, fp);
+ }
while (drlen++ < 15)
fputc(' ', fp);
fprintf(fp,
@@ -1628,7 +1790,7 @@ doprintpeers(
(int)poll_sec),
reach, lfptoms(&estdelay, 3),
lfptoms(&estoffset, 3),
- (havevar[HAVE_JITTER])
+ (have_jitter)
? lfptoms(&estjitter, 3)
: lfptoms(&estdisp, 3));
return (1);
@@ -1637,22 +1799,6 @@ doprintpeers(
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
@@ -1709,41 +1855,45 @@ dopeers(
int af
)
{
- int i;
+ u_int u;
char fullname[LENHOSTNAME];
sockaddr_u netnum;
- char * name_or_num;
+ const char * name_or_num;
size_t sl;
if (!dogetassoc(fp))
return;
- for (i = 0; i < numhosts; ++i) {
- if (getnetnum(chosts[i], &netnum, fullname, af)) {
+ for (u = 0; u < numhosts; u++) {
+ if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
name_or_num = nntohost(&netnum);
sl = strlen(name_or_num);
- maxhostlen = max(maxhostlen, (int)sl);
+ maxhostlen = max(maxhostlen, sl);
}
}
if (numhosts > 1)
- fprintf(fp, "%-*.*s ", maxhostlen, maxhostlen,
+ fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
"server (local)");
fprintf(fp,
" remote refid st t when poll reach delay offset jitter\n");
if (numhosts > 1)
- for (i = 0; i <= maxhostlen; ++i)
+ for (u = 0; u <= maxhostlen; u++)
fprintf(fp, "=");
fprintf(fp,
"==============================================================================\n");
- for (i = 0; i < numassoc; i++) {
+ for (u = 0; u < numassoc; u++) {
if (!showall &&
- !(CTL_PEER_STATVAL(assoc_cache[i].status)
- & (CTL_PST_CONFIG|CTL_PST_REACH)))
+ !(CTL_PEER_STATVAL(assoc_cache[u].status)
+ & (CTL_PST_CONFIG|CTL_PST_REACH))) {
+ if (debug)
+ fprintf(stderr, "eliding [%d]\n",
+ (int)assoc_cache[u].assid);
continue;
- if (!dogetpeers(peervarlist, (int)assoc_cache[i].assid, fp, af)) {
- return;
}
+ if (!dogetpeers(peervarlist, (int)assoc_cache[u].assid,
+ fp, af))
+ return;
}
return;
}
@@ -1803,7 +1953,7 @@ doopeers(
int af
)
{
- register int i;
+ u_int i;
char fullname[LENHOSTNAME];
sockaddr_u netnum;
@@ -1811,28 +1961,28 @@ doopeers(
return;
for (i = 0; i < numhosts; ++i) {
- if (getnetnum(chosts[i], &netnum, fullname, af))
- if ((int)strlen(fullname) > maxhostlen)
+ if (getnetnum(chosts[i].name, &netnum, fullname, af))
+ if (strlen(fullname) > maxhostlen)
maxhostlen = strlen(fullname);
}
if (numhosts > 1)
- (void) fprintf(fp, "%-*.*s ", maxhostlen, maxhostlen, "server");
- (void) fprintf(fp,
- " remote local st t when poll reach delay offset disp\n");
+ fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+ "server");
+ fprintf(fp,
+ " remote local st t when poll reach delay offset disp\n");
if (numhosts > 1)
for (i = 0; i <= maxhostlen; ++i)
- (void) fprintf(fp, "=");
- (void) fprintf(fp,
- "==============================================================================\n");
+ fprintf(fp, "=");
+ fprintf(fp,
+ "==============================================================================\n");
for (i = 0; i < numassoc; i++) {
if (!showall &&
- !(CTL_PEER_STATVAL(assoc_cache[i].status)
- & (CTL_PST_CONFIG|CTL_PST_REACH)))
+ !(CTL_PEER_STATVAL(assoc_cache[i].status) &
+ (CTL_PST_CONFIG | CTL_PST_REACH)))
continue;
- if (!dogetpeers(opeervarlist, (int)assoc_cache[i].assid, fp, af)) {
+ if (!dogetpeers(opeervarlist, assoc_cache[i].assid, fp, af))
return;
- }
}
return;
}
@@ -1891,7 +2041,7 @@ config (
FILE *fp
)
{
- char *cfgcmd;
+ const char *cfgcmd;
u_short rstatus;
int rsize;
const char *rdata;
@@ -2015,3 +2165,1711 @@ config_from_file (
printf("Done sending file\n");
fclose(config_fd);
}
+
+
+static int
+fetch_nonce(
+ char * nonce,
+ size_t cb_nonce
+ )
+{
+ const char nonce_eq[] = "nonce=";
+ int qres;
+ u_short rstatus;
+ int rsize;
+ const char * rdata;
+ int chars;
+
+ /*
+ * Retrieve a nonce specific to this client to demonstrate to
+ * ntpd that we're capable of receiving responses to our source
+ * IP address, and thereby unlikely to be forging the source.
+ */
+ qres = doquery(CTL_OP_REQ_NONCE, 0, 0, 0, NULL, &rstatus,
+ &rsize, &rdata);
+ if (qres) {
+ fprintf(stderr, "nonce request failed\n");
+ return FALSE;
+ }
+
+ if (rsize <= sizeof(nonce_eq) - 1 ||
+ strncmp(rdata, nonce_eq, sizeof(nonce_eq) - 1)) {
+ fprintf(stderr, "unexpected nonce response format: %.*s\n",
+ rsize, rdata);
+ return FALSE;
+ }
+ chars = rsize - (sizeof(nonce_eq) - 1);
+ if (chars >= (int)cb_nonce)
+ return FALSE;
+ memcpy(nonce, rdata + sizeof(nonce_eq) - 1, chars);
+ nonce[chars] = '\0';
+ while (chars > 0 &&
+ ('\r' == nonce[chars - 1] || '\n' == nonce[chars - 1])) {
+ chars--;
+ nonce[chars] = '\0';
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * add_mru Add and entry to mru list, hash table, and allocate
+ * and return a replacement.
+ * This is a helper for collect_mru_list().
+ */
+static mru *
+add_mru(
+ mru *add
+ )
+{
+ u_short hash;
+ mru *mon;
+ mru *unlinked;
+
+
+ hash = NTP_HASH_ADDR(&add->addr);
+ /* see if we have it among previously received entries */
+ for (mon = hash_table[hash]; mon != NULL; mon = mon->hlink)
+ if (SOCK_EQ(&mon->addr, &add->addr))
+ break;
+ if (mon != NULL) {
+ if (!L_ISGEQ(&add->first, &mon->first)) {
+ fprintf(stderr,
+ "add_mru duplicate %s new first ts %08x.%08x precedes prior %08x.%08x\n",
+ sptoa(&add->addr), add->last.l_ui,
+ add->last.l_uf, mon->last.l_ui,
+ mon->last.l_uf);
+ exit(1);
+ }
+ UNLINK_DLIST(mon, mlink);
+ UNLINK_SLIST(unlinked, hash_table[hash], mon, hlink, mru);
+ NTP_INSIST(unlinked == mon);
+ mru_dupes++;
+ TRACE(2, ("(updated from %08x.%08x) ", mon->last.l_ui,
+ mon->last.l_uf));
+ }
+ LINK_DLIST(mru_list, add, mlink);
+ LINK_SLIST(hash_table[hash], add, hlink);
+ TRACE(2, ("add_mru %08x.%08x c %d m %d v %d rest %x first %08x.%08x %s\n",
+ add->last.l_ui, add->last.l_uf, add->count,
+ (int)add->mode, (int)add->ver, (u_int)add->rs,
+ add->first.l_ui, add->first.l_uf, sptoa(&add->addr)));
+ /* if we didn't update an existing entry, alloc replacement */
+ if (NULL == mon) {
+ mon = emalloc(sizeof(*mon));
+ mru_count++;
+ }
+ ZERO(*mon);
+
+ return mon;
+}
+
+
+/* MGOT macro is specific to collect_mru_list() */
+#define MGOT(bit) \
+ do { \
+ got |= (bit); \
+ if (MRU_GOT_ALL == got) { \
+ got = 0; \
+ mon = add_mru(mon); \
+ ci++; \
+ } \
+ } while (0)
+
+
+void
+mrulist_ctrl_c_hook(void)
+{
+ mrulist_interrupted = TRUE;
+}
+
+
+static int
+collect_mru_list(
+ const char * parms,
+ l_fp * pnow
+ )
+{
+ const u_int sleep_msecs = 5;
+ static int ntpd_row_limit = MRU_ROW_LIMIT;
+ int c_mru_l_rc; /* this function's return code */
+ u_char got; /* MRU_GOT_* bits */
+ time_t next_report;
+ size_t cb;
+ mru *mon;
+ mru *head;
+ mru *recent;
+ int list_complete;
+ char nonce[128];
+ char buf[128];
+ char req_buf[CTL_MAX_DATA_LEN];
+ char *req;
+ char *req_end;
+ int chars;
+ int qres;
+ u_short rstatus;
+ int rsize;
+ const char *rdata;
+ int limit;
+ int frags;
+ int cap_frags;
+ char *tag;
+ char *val;
+ int si; /* server index in response */
+ int ci; /* client (our) index for validation */
+ int ri; /* request index (.# suffix) */
+ int mv;
+ l_fp newest;
+ l_fp last_older;
+ sockaddr_u addr_older;
+ int have_now;
+ int have_addr_older;
+ int have_last_older;
+ u_int restarted_count;
+ u_int nonce_uses;
+ u_short hash;
+ mru *unlinked;
+
+ if (!fetch_nonce(nonce, sizeof(nonce)))
+ return FALSE;
+
+ nonce_uses = 0;
+ restarted_count = 0;
+ mru_count = 0;
+ INIT_DLIST(mru_list, mlink);
+ cb = NTP_HASH_SIZE * sizeof(*hash_table);
+ NTP_INSIST(NULL == hash_table);
+ hash_table = emalloc_zero(cb);
+
+ c_mru_l_rc = FALSE;
+ list_complete = FALSE;
+ have_now = FALSE;
+ cap_frags = TRUE;
+ got = 0;
+ ri = 0;
+ cb = sizeof(*mon);
+ mon = emalloc_zero(cb);
+ ZERO(*pnow);
+ ZERO(last_older);
+ mrulist_interrupted = FALSE;
+ set_ctrl_c_hook(&mrulist_ctrl_c_hook);
+ fprintf(stderr,
+ "Ctrl-C will stop MRU retrieval and display partial results.\n");
+ fflush(stderr);
+ next_report = time(NULL) + MRU_REPORT_SECS;
+
+ limit = min(3 * MAXFRAGS, ntpd_row_limit);
+ frags = MAXFRAGS;
+ snprintf(req_buf, sizeof(req_buf), "nonce=%s, frags=%d%s",
+ nonce, frags, parms);
+ nonce_uses++;
+
+ while (TRUE) {
+ if (debug)
+ fprintf(stderr, "READ_MRU parms: %s\n", req_buf);
+
+ qres = doqueryex(CTL_OP_READ_MRU, 0, 0, strlen(req_buf),
+ req_buf, &rstatus, &rsize, &rdata, TRUE);
+
+ if (CERR_UNKNOWNVAR == qres && ri > 0) {
+ /*
+ * None of the supplied prior entries match, so
+ * toss them from our list and try again.
+ */
+ if (debug)
+ fprintf(stderr,
+ "no overlap between %d prior entries and server MRU list\n",
+ ri);
+ while (ri--) {
+ recent = HEAD_DLIST(mru_list, mlink);
+ NTP_INSIST(recent != NULL);
+ if (debug)
+ fprintf(stderr,
+ "tossing prior entry %s to resync\n",
+ sptoa(&recent->addr));
+ UNLINK_DLIST(recent, mlink);
+ hash = NTP_HASH_ADDR(&recent->addr);
+ UNLINK_SLIST(unlinked, hash_table[hash],
+ recent, hlink, mru);
+ NTP_INSIST(unlinked == recent);
+ free(recent);
+ mru_count--;
+ }
+ if (NULL == HEAD_DLIST(mru_list, mlink)) {
+ restarted_count++;
+ if (restarted_count > 8) {
+ fprintf(stderr,
+ "Giving up after 8 restarts from the beginning.\n"
+ "With high-traffic NTP servers, this can occur if the\n"
+ "MRU list is limited to less than about 16 seconds' of\n"
+ "entries. See the 'mru' ntp.conf directive to adjust.\n");
+ goto cleanup_return;
+ }
+ if (debug)
+ fprintf(stderr,
+ "---> Restarting from the beginning, retry #%u\n",
+ restarted_count);
+ }
+ } else if (CERR_UNKNOWNVAR == qres) {
+ fprintf(stderr,
+ "CERR_UNKNOWNVAR from ntpd but no priors given.\n");
+ goto cleanup_return;
+ } else if (CERR_BADVALUE == qres) {
+ if (cap_frags) {
+ cap_frags = FALSE;
+ if (debug)
+ fprintf(stderr,
+ "Reverted to row limit from fragments limit.\n");
+ } else {
+ /* ntpd has lower cap on row limit */
+ ntpd_row_limit--;
+ limit = min(limit, ntpd_row_limit);
+ if (debug)
+ fprintf(stderr,
+ "Row limit reduced to %d following CERR_BADVALUE.\n",
+ limit);
+ }
+ } else if (ERR_INCOMPLETE == qres ||
+ ERR_TIMEOUT == qres) {
+ /*
+ * Reduce the number of rows/frags requested by
+ * half to recover from lost response fragments.
+ */
+ if (cap_frags) {
+ frags = max(2, frags / 2);
+ if (debug)
+ fprintf(stderr,
+ "Frag limit reduced to %d following incomplete response.\n",
+ frags);
+ } else {
+ limit = max(2, limit / 2);
+ if (debug)
+ fprintf(stderr,
+ "Row limit reduced to %d following incomplete response.\n",
+ limit);
+ }
+ } else if (qres) {
+ show_error_msg(qres, 0);
+ goto cleanup_return;
+ }
+ /*
+ * This is a cheap cop-out implementation of rawmode
+ * output for mrulist. A better approach would be to
+ * dump similar output after the list is collected by
+ * ntpq with a continuous sequence of indexes. This
+ * cheap approach has indexes resetting to zero for
+ * each query/response, and duplicates are not
+ * coalesced.
+ */
+ if (!qres && rawmode)
+ printvars(rsize, rdata, rstatus, TYPE_SYS, 1, stdout);
+ ci = 0;
+ have_addr_older = FALSE;
+ have_last_older = FALSE;
+ while (!qres && nextvar(&rsize, &rdata, &tag, &val)) {
+ if (debug > 1)
+ fprintf(stderr, "nextvar gave: %s = %s\n",
+ tag, val);
+ switch(tag[0]) {
+
+ case 'a':
+ if (!strcmp(tag, "addr.older")) {
+ if (!have_last_older) {
+ fprintf(stderr,
+ "addr.older %s before last.older\n",
+ val);
+ goto cleanup_return;
+ }
+ if (!decodenetnum(val, &addr_older)) {
+ fprintf(stderr,
+ "addr.older %s garbled\n",
+ val);
+ goto cleanup_return;
+ }
+ hash = NTP_HASH_ADDR(&addr_older);
+ for (recent = hash_table[hash];
+ recent != NULL;
+ recent = recent->hlink)
+ if (ADDR_PORT_EQ(
+ &addr_older,
+ &recent->addr))
+ break;
+ if (NULL == recent) {
+ fprintf(stderr,
+ "addr.older %s not in hash table\n",
+ val);
+ goto cleanup_return;
+ }
+ if (!L_ISEQU(&last_older,
+ &recent->last)) {
+ fprintf(stderr,
+ "last.older %08x.%08x mismatches %08x.%08x expected.\n",
+ last_older.l_ui,
+ last_older.l_uf,
+ recent->last.l_ui,
+ recent->last.l_uf);
+ goto cleanup_return;
+ }
+ have_addr_older = TRUE;
+ } else if (1 != sscanf(tag, "addr.%d", &si)
+ || si != ci)
+ goto nomatch;
+ else if (decodenetnum(val, &mon->addr))
+ MGOT(MRU_GOT_ADDR);
+ break;
+
+ case 'l':
+ if (!strcmp(tag, "last.older")) {
+ if ('0' != val[0] ||
+ 'x' != val[1] ||
+ !hextolfp(val + 2, &last_older)) {
+ fprintf(stderr,
+ "last.older %s garbled\n",
+ val);
+ goto cleanup_return;
+ }
+ have_last_older = TRUE;
+ } else if (!strcmp(tag, "last.newest")) {
+ if (0 != got) {
+ fprintf(stderr,
+ "last.newest %s before complete row, got = 0x%x\n",
+ val, (u_int)got);
+ goto cleanup_return;
+ }
+ if (!have_now) {
+ fprintf(stderr,
+ "last.newest %s before now=\n",
+ val);
+ goto cleanup_return;
+ }
+ head = HEAD_DLIST(mru_list, mlink);
+ if (NULL != head) {
+ if ('0' != val[0] ||
+ 'x' != val[1] ||
+ !hextolfp(val + 2, &newest) ||
+ !L_ISEQU(&newest,
+ &head->last)) {
+ fprintf(stderr,
+ "last.newest %s mismatches %08x.%08x",
+ val,
+ head->last.l_ui,
+ head->last.l_uf);
+ goto cleanup_return;
+ }
+ }
+ list_complete = TRUE;
+ } else if (1 != sscanf(tag, "last.%d", &si) ||
+ si != ci || '0' != val[0] ||
+ 'x' != val[1] ||
+ !hextolfp(val + 2, &mon->last)) {
+ goto nomatch;
+ } else {
+ MGOT(MRU_GOT_LAST);
+ /*
+ * allow interrupted retrieval,
+ * using most recent retrieved
+ * entry's last seen timestamp
+ * as the end of operation.
+ */
+ *pnow = mon->last;
+ }
+ break;
+
+ case 'f':
+ if (1 != sscanf(tag, "first.%d", &si) ||
+ si != ci || '0' != val[0] ||
+ 'x' != val[1] ||
+ !hextolfp(val + 2, &mon->first))
+ goto nomatch;
+ MGOT(MRU_GOT_FIRST);
+ break;
+
+ case 'n':
+ if (!strcmp(tag, "nonce")) {
+ strlcpy(nonce, val, sizeof(nonce));
+ nonce_uses = 0;
+ break; /* case */
+ } else if (strcmp(tag, "now") ||
+ '0' != val[0] ||
+ 'x' != val[1] ||
+ !hextolfp(val + 2, pnow))
+ goto nomatch;
+ have_now = TRUE;
+ break;
+
+ case 'c':
+ if (1 != sscanf(tag, "ct.%d", &si) ||
+ si != ci ||
+ 1 != sscanf(val, "%d", &mon->count)
+ || mon->count < 1)
+ goto nomatch;
+ MGOT(MRU_GOT_COUNT);
+ break;
+
+ case 'm':
+ if (1 != sscanf(tag, "mv.%d", &si) ||
+ si != ci ||
+ 1 != sscanf(val, "%d", &mv))
+ goto nomatch;
+ mon->mode = PKT_MODE(mv);
+ mon->ver = PKT_VERSION(mv);
+ MGOT(MRU_GOT_MV);
+ break;
+
+ case 'r':
+ if (1 != sscanf(tag, "rs.%d", &si) ||
+ si != ci ||
+ 1 != sscanf(val, "0x%hx", &mon->rs))
+ goto nomatch;
+ MGOT(MRU_GOT_RS);
+ break;
+
+ default:
+ nomatch:
+ /* empty stmt */ ;
+ /* ignore unknown tags */
+ }
+ }
+ if (have_now)
+ list_complete = TRUE;
+ if (list_complete) {
+ NTP_INSIST(0 == ri || have_addr_older);
+ }
+ if (mrulist_interrupted) {
+ printf("mrulist retrieval interrupted by operator.\n"
+ "Displaying partial client list.\n");
+ fflush(stdout);
+ }
+ if (list_complete || mrulist_interrupted) {
+ fprintf(stderr,
+ "\rRetrieved %u unique MRU entries and %u updates.\n",
+ mru_count, mru_dupes);
+ fflush(stderr);
+ break;
+ }
+ if (time(NULL) >= next_report) {
+ next_report += MRU_REPORT_SECS;
+ fprintf(stderr, "\r%u (%u updates) ", mru_count,
+ mru_dupes);
+ fflush(stderr);
+ }
+
+ /*
+ * Snooze for a bit between queries to let ntpd catch
+ * up with other duties.
+ */
+#ifdef SYS_WINNT
+ Sleep(sleep_msecs);
+#elif !defined(HAVE_NANOSLEEP)
+ sleep((sleep_msecs / 1000) + 1);
+#else
+ {
+ struct timespec interv = { 0,
+ 1000 * sleep_msecs };
+ nanosleep(&interv, NULL);
+ }
+#endif
+ /*
+ * If there were no errors, increase the number of rows
+ * to a maximum of 3 * MAXFRAGS (the most packets ntpq
+ * can handle in one response), on the assumption that
+ * no less than 3 rows fit in each packet, capped at
+ * our best guess at the server's row limit.
+ */
+ if (!qres) {
+ if (cap_frags) {
+ frags = min(MAXFRAGS, frags + 1);
+ } else {
+ limit = min3(3 * MAXFRAGS,
+ ntpd_row_limit,
+ max(limit + 1,
+ limit * 33 / 32));
+ }
+ }
+ /*
+ * prepare next query with as many address and last-seen
+ * timestamps as will fit in a single packet.
+ */
+ req = req_buf;
+ req_end = req_buf + sizeof(req_buf);
+#define REQ_ROOM (req_end - req)
+ snprintf(req, REQ_ROOM, "nonce=%s, %s=%d%s", nonce,
+ (cap_frags)
+ ? "frags"
+ : "limit",
+ (cap_frags)
+ ? frags
+ : limit,
+ parms);
+ req += strlen(req);
+ nonce_uses++;
+ if (nonce_uses >= 4) {
+ if (!fetch_nonce(nonce, sizeof(nonce)))
+ goto cleanup_return;
+ nonce_uses = 0;
+ }
+
+
+ for (ri = 0, recent = HEAD_DLIST(mru_list, mlink);
+ recent != NULL;
+ ri++, recent = NEXT_DLIST(mru_list, recent, mlink)) {
+
+ snprintf(buf, sizeof(buf),
+ ", addr.%d=%s, last.%d=0x%08x.%08x",
+ ri, sptoa(&recent->addr), ri,
+ recent->last.l_ui, recent->last.l_uf);
+ chars = strlen(buf);
+ if (REQ_ROOM - chars < 1)
+ break;
+ memcpy(req, buf, chars + 1);
+ req += chars;
+ }
+ }
+
+ set_ctrl_c_hook(NULL);
+ c_mru_l_rc = TRUE;
+ goto retain_hash_table;
+
+cleanup_return:
+ free(hash_table);
+ hash_table = NULL;
+
+retain_hash_table:
+ if (mon != NULL)
+ free(mon);
+
+ return c_mru_l_rc;
+}
+
+
+/*
+ * qcmp_mru_addr - sort MRU entries by remote address.
+ *
+ * All IPv4 addresses sort before any IPv6, addresses are sorted by
+ * value within address family.
+ */
+static int
+qcmp_mru_addr(
+ const void *v1,
+ const void *v2
+ )
+{
+ const mru * const * ppm1 = v1;
+ const mru * const * ppm2 = v2;
+ const mru * pm1;
+ const mru * pm2;
+ u_short af1;
+ u_short af2;
+ size_t cmplen;
+ size_t addr_off;
+
+ pm1 = *ppm1;
+ pm2 = *ppm2;
+
+ af1 = AF(&pm1->addr);
+ af2 = AF(&pm2->addr);
+
+ if (af1 != af2)
+ return (AF_INET == af1)
+ ? -1
+ : 1;
+
+ cmplen = SIZEOF_INADDR(af1);
+ addr_off = (AF_INET == af1)
+ ? offsetof(struct sockaddr_in, sin_addr)
+ : offsetof(struct sockaddr_in6, sin6_addr);
+
+ return memcmp((const char *)&pm1->addr + addr_off,
+ (const char *)&pm2->addr + addr_off,
+ cmplen);
+}
+
+
+static int
+qcmp_mru_r_addr(
+ const void *v1,
+ const void *v2
+ )
+{
+ return -qcmp_mru_addr(v1, v2);
+}
+
+
+/*
+ * qcmp_mru_count - sort MRU entries by times seen (hit count).
+ */
+static int
+qcmp_mru_count(
+ const void *v1,
+ const void *v2
+ )
+{
+ const mru * const * ppm1 = v1;
+ const mru * const * ppm2 = v2;
+ const mru * pm1;
+ const mru * pm2;
+
+ pm1 = *ppm1;
+ pm2 = *ppm2;
+
+ return (pm1->count < pm2->count)
+ ? -1
+ : ((pm1->count == pm2->count)
+ ? 0
+ : 1);
+}
+
+
+static int
+qcmp_mru_r_count(
+ const void *v1,
+ const void *v2
+ )
+{
+ return -qcmp_mru_count(v1, v2);
+}
+
+
+/*
+ * qcmp_mru_avgint - sort MRU entries by average interval.
+ */
+static int
+qcmp_mru_avgint(
+ const void *v1,
+ const void *v2
+ )
+{
+ const mru * const * ppm1 = v1;
+ const mru * const * ppm2 = v2;
+ const mru * pm1;
+ const mru * pm2;
+ l_fp interval;
+ double avg1;
+ double avg2;
+
+ pm1 = *ppm1;
+ pm2 = *ppm2;
+
+ interval = pm1->last;
+ L_SUB(&interval, &pm1->first);
+ LFPTOD(&interval, avg1);
+ avg1 /= pm1->count;
+
+ interval = pm2->last;
+ L_SUB(&interval, &pm2->first);
+ LFPTOD(&interval, avg2);
+ avg2 /= pm2->count;
+
+ if (avg1 < avg2)
+ return -1;
+ else if (avg1 > avg2)
+ return 1;
+
+ /* secondary sort on lstint - rarely tested */
+ if (L_ISEQU(&pm1->last, &pm2->last))
+ return 0;
+ else if (L_ISGEQ(&pm1->last, &pm2->last))
+ return -1;
+ else
+ return 1;
+}
+
+
+static int
+qcmp_mru_r_avgint(
+ const void *v1,
+ const void *v2
+ )
+{
+ return -qcmp_mru_avgint(v1, v2);
+}
+
+
+/*
+ * mrulist - ntpq's mrulist command to fetch an arbitrarily large Most
+ * Recently Used (seen) remote address list from ntpd.
+ *
+ * Similar to ntpdc's monlist command, but not limited to a single
+ * request/response, and thereby not limited to a few hundred remote
+ * addresses.
+ *
+ * See ntpd/ntp_control.c read_mru_list() for comments on the way
+ * CTL_OP_READ_MRU is designed to be used.
+ *
+ * mrulist intentionally differs from monlist in the way the avgint
+ * column is calculated. monlist includes the time after the last
+ * packet from the client until the monlist query time in the average,
+ * while mrulist excludes it. That is, monlist's average interval grows
+ * over time for remote addresses not heard from in some time, while it
+ * remains unchanged in mrulist. This also affects the avgint value for
+ * entries representing a single packet, with identical first and last
+ * timestamps. mrulist shows 0 avgint, monlist shows a value identical
+ * to lstint.
+ */
+static void
+mrulist(
+ struct parse * pcmd,
+ FILE * fp
+ )
+{
+ const char mincount_eq[] = "mincount=";
+ const char resall_eq[] = "resall=";
+ const char resany_eq[] = "resany=";
+ const char maxlstint_eq[] = "maxlstint=";
+ const char laddr_eq[] = "laddr=";
+ const char sort_eq[] = "sort=";
+ mru_sort_order order;
+ size_t n;
+ char parms_buf[128];
+ char buf[24];
+ char *parms;
+ const char *arg;
+ size_t cb;
+ mru **sorted;
+ mru **ppentry;
+ mru *recent;
+ l_fp now;
+ l_fp interval;
+ double favgint;
+ double flstint;
+ int avgint;
+ int lstint;
+ int i;
+
+ order = MRUSORT_DEF;
+ parms_buf[0] = '\0';
+ parms = parms_buf;
+ for (i = 0; i < pcmd->nargs; i++) {
+ arg = pcmd->argval[i].string;
+ if (arg != NULL) {
+ cb = strlen(arg) + 1;
+ if ((!strncmp(resall_eq, arg, sizeof(resall_eq)
+ - 1) || !strncmp(resany_eq, arg,
+ sizeof(resany_eq) - 1) || !strncmp(
+ mincount_eq, arg, sizeof(mincount_eq) - 1)
+ || !strncmp(laddr_eq, arg, sizeof(laddr_eq)
+ - 1) || !strncmp(maxlstint_eq, arg,
+ sizeof(laddr_eq) - 1)) && parms + cb + 2 <=
+ parms_buf + sizeof(parms_buf)) {
+ /* these are passed intact to ntpd */
+ memcpy(parms, ", ", 2);
+ parms += 2;
+ memcpy(parms, arg, cb);
+ parms += cb - 1;
+ } else if (!strncmp(sort_eq, arg,
+ sizeof(sort_eq) - 1)) {
+ arg += sizeof(sort_eq) - 1;
+ for (n = 0;
+ n < COUNTOF(mru_sort_keywords);
+ n++)
+ if (!strcmp(mru_sort_keywords[n],
+ arg))
+ break;
+ if (n < COUNTOF(mru_sort_keywords))
+ order = n;
+ } else if (!strcmp("limited", arg) ||
+ !strcmp("kod", arg)) {
+ /* transform to resany=... */
+ snprintf(buf, sizeof(buf),
+ ", resany=0x%x",
+ ('k' == arg[0])
+ ? RES_KOD
+ : RES_LIMITED);
+ cb = 1 + strlen(buf);
+ if (parms + cb <
+ parms_buf + sizeof(parms_buf)) {
+ memcpy(parms, buf, cb);
+ parms += cb - 1;
+ }
+ } else
+ fprintf(stderr,
+ "ignoring unrecognized mrulist parameter: %s\n",
+ arg);
+ }
+ }
+ parms = parms_buf;
+
+ if (!collect_mru_list(parms, &now))
+ return;
+
+ /* display the results */
+ if (rawmode)
+ goto cleanup_return;
+
+ /* construct an array of entry pointers in default order */
+ sorted = emalloc(mru_count * sizeof(*sorted));
+ ppentry = sorted;
+ if (MRUSORT_R_DEF != order) {
+ ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
+ NTP_INSIST(ppentry < sorted + mru_count);
+ *ppentry = recent;
+ ppentry++;
+ ITER_DLIST_END()
+ } else {
+ REV_ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
+ NTP_INSIST(ppentry < sorted + mru_count);
+ *ppentry = recent;
+ ppentry++;
+ REV_ITER_DLIST_END()
+ }
+
+ if (ppentry - sorted != (int)mru_count) {
+ fprintf(stderr,
+ "mru_count %u should match MRU list depth %ld.\n",
+ mru_count, (long)(ppentry - sorted));
+ free(sorted);
+ goto cleanup_return;
+ }
+
+ /* re-sort sorted[] if not default or reverse default */
+ if (MRUSORT_R_DEF < order)
+ qsort(sorted, mru_count, sizeof(sorted[0]),
+ mru_qcmp_table[order]);
+
+ printf( "lstint avgint rstr r m v count rport remote address\n"
+ "==============================================================================\n");
+ /* '=' x 78 */
+ for (ppentry = sorted; ppentry < sorted + mru_count; ppentry++) {
+ recent = *ppentry;
+ interval = now;
+ L_SUB(&interval, &recent->last);
+ LFPTOD(&interval, flstint);
+ lstint = (int)(flstint + 0.5);
+ interval = recent->last;
+ L_SUB(&interval, &recent->first);
+ LFPTOD(&interval, favgint);
+ favgint /= recent->count;
+ avgint = (int)(favgint + 0.5);
+ fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5hu %s\n",
+ lstint, avgint, recent->rs,
+ (RES_KOD & recent->rs)
+ ? 'K'
+ : (RES_LIMITED & recent->rs)
+ ? 'L'
+ : '.',
+ (int)recent->mode, (int)recent->ver,
+ recent->count, SRCPORT(&recent->addr),
+ nntohost(&recent->addr));
+ if (showhostnames)
+ fflush(fp);
+ }
+ fflush(fp);
+ if (debug) {
+ fprintf(stderr,
+ "--- completed, freeing sorted[] pointers\n");
+ fflush(stderr);
+ }
+ free(sorted);
+
+cleanup_return:
+ if (debug) {
+ fprintf(stderr, "... freeing MRU entries\n");
+ fflush(stderr);
+ }
+ ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
+ free(recent);
+ ITER_DLIST_END()
+ if (debug) {
+ fprintf(stderr, "... freeing hash_table[]\n");
+ fflush(stderr);
+ }
+ free(hash_table);
+ hash_table = NULL;
+ INIT_DLIST(mru_list, mlink);
+}
+
+
+/*
+ * validate_ifnum - helper for ifstats()
+ *
+ * Ensures rows are received in order and complete.
+ */
+static void
+validate_ifnum(
+ FILE * fp,
+ u_int ifnum,
+ int * pfields,
+ ifstats_row * prow
+ )
+{
+ if (prow->ifnum == ifnum)
+ return;
+ if (prow->ifnum + 1 == ifnum) {
+ if (*pfields < IFSTATS_FIELDS)
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ *pfields, IFSTATS_FIELDS);
+ *pfields = 0;
+ prow->ifnum = ifnum;
+ return;
+ }
+ fprintf(stderr,
+ "received if index %u, have %d of %d fields for index %u, aborting.\n",
+ ifnum, *pfields, IFSTATS_FIELDS, prow->ifnum);
+ exit(1);
+}
+
+
+/*
+ * another_ifstats_field - helper for ifstats()
+ *
+ * If all fields for the row have been received, print it.
+ */
+static void
+another_ifstats_field(
+ int * pfields,
+ ifstats_row * prow,
+ FILE * fp
+ )
+{
+ u_int ifnum;
+
+ (*pfields)++;
+ /* we understand 12 tags */
+ if (IFSTATS_FIELDS > *pfields)
+ return;
+ /*
+ " interface name send\n"
+ " # address/broadcast drop flag ttl mc received sent failed peers uptime\n"
+ "==============================================================================\n");
+ */
+ fprintf(fp,
+ "%3u %-24.24s %c %4x %3d %2d %6d %6d %6d %5d %8d\n"
+ " %s\n",
+ prow->ifnum, prow->name,
+ (prow->enabled)
+ ? '.'
+ : 'D',
+ prow->flags, prow->ttl, prow->mcast_count,
+ prow->received, prow->sent, prow->send_errors,
+ prow->peer_count, prow->uptime, sptoa(&prow->addr));
+ if (!SOCK_UNSPEC(&prow->bcast))
+ fprintf(fp, " %s\n", sptoa(&prow->bcast));
+ ifnum = prow->ifnum;
+ ZERO(*prow);
+ prow->ifnum = ifnum;
+}
+
+
+/*
+ * ifstats - ntpq -c ifstats modeled on ntpdc -c ifstats.
+ */
+static void
+ifstats(
+ struct parse * pcmd,
+ FILE * fp
+ )
+{
+ const char addr_fmt[] = "addr.%u";
+ const char bcast_fmt[] = "bcast.%u";
+ const char en_fmt[] = "en.%u"; /* enabled */
+ const char flags_fmt[] = "flags.%u";
+ const char mc_fmt[] = "mc.%u"; /* mcast count */
+ const char name_fmt[] = "name.%u";
+ const char pc_fmt[] = "pc.%u"; /* peer count */
+ const char rx_fmt[] = "rx.%u";
+ const char tl_fmt[] = "tl.%u"; /* ttl */
+ const char tx_fmt[] = "tx.%u";
+ const char txerr_fmt[] = "txerr.%u";
+ const char up_fmt[] = "up.%u"; /* uptime */
+ const char * datap;
+ int qres;
+ int dsize;
+ u_short rstatus;
+ char * tag;
+ char * val;
+ int fields;
+ u_int ifnum;
+ u_int ui;
+ ifstats_row row;
+ int comprende;
+ size_t len;
+
+ qres = doquery(CTL_OP_READ_ORDLIST_A, 0, TRUE, 0, NULL, &rstatus,
+ &dsize, &datap);
+ if (qres) /* message already displayed */
+ return;
+
+ fprintf(fp,
+ " interface name send\n"
+ " # address/broadcast drop flag ttl mc received sent failed peers uptime\n"
+ "==============================================================================\n");
+ /* '=' x 78 */
+
+ ZERO(row);
+ fields = 0;
+ ifnum = 0;
+ ui = 0;
+ while (nextvar(&dsize, &datap, &tag, &val)) {
+ if (debug > 1)
+ fprintf(stderr, "nextvar gave: %s = %s\n", tag,
+ (NULL == val)
+ ? ""
+ : val);
+ comprende = FALSE;
+ switch(tag[0]) {
+
+ case 'a':
+ if (1 == sscanf(tag, addr_fmt, &ui) &&
+ decodenetnum(val, &row.addr))
+ comprende = TRUE;
+ break;
+
+ case 'b':
+ if (1 == sscanf(tag, bcast_fmt, &ui) &&
+ (NULL == val ||
+ decodenetnum(val, &row.bcast)))
+ comprende = TRUE;
+ break;
+
+ case 'e':
+ if (1 == sscanf(tag, en_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.enabled))
+ comprende = TRUE;
+ break;
+
+ case 'f':
+ if (1 == sscanf(tag, flags_fmt, &ui) &&
+ 1 == sscanf(val, "0x%x", &row.flags))
+ comprende = TRUE;
+ break;
+
+ case 'm':
+ if (1 == sscanf(tag, mc_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.mcast_count))
+ comprende = TRUE;
+ break;
+
+ case 'n':
+ if (1 == sscanf(tag, name_fmt, &ui)) {
+ /* strip quotes */
+ len = strlen(val);
+ if (len >= 2 &&
+ len - 2 < sizeof(row.name)) {
+ len -= 2;
+ memcpy(row.name, val + 1, len);
+ row.name[len] = '\0';
+ comprende = TRUE;
+ }
+ }
+ break;
+
+ case 'p':
+ if (1 == sscanf(tag, pc_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.peer_count))
+ comprende = TRUE;
+ break;
+
+ case 'r':
+ if (1 == sscanf(tag, rx_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.received))
+ comprende = TRUE;
+ break;
+
+ case 't':
+ if (1 == sscanf(tag, tl_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.ttl))
+ comprende = TRUE;
+ else if (1 == sscanf(tag, tx_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.sent))
+ comprende = TRUE;
+ else if (1 == sscanf(tag, txerr_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.send_errors))
+ comprende = TRUE;
+ break;
+
+ case 'u':
+ if (1 == sscanf(tag, up_fmt, &ui) &&
+ 1 == sscanf(val, "%d", &row.uptime))
+ comprende = TRUE;
+ break;
+ }
+
+ if (comprende) {
+ /* error out if rows out of order */
+ validate_ifnum(fp, ui, &fields, &row);
+ /* if the row is complete, print it */
+ another_ifstats_field(&fields, &row, fp);
+ }
+ }
+ if (fields != IFSTATS_FIELDS)
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ fields, IFSTATS_FIELDS);
+
+ fflush(fp);
+}
+
+
+/*
+ * validate_reslist_idx - helper for reslist()
+ *
+ * Ensures rows are received in order and complete.
+ */
+static void
+validate_reslist_idx(
+ FILE * fp,
+ u_int idx,
+ int * pfields,
+ reslist_row * prow
+ )
+{
+ if (prow->idx == idx)
+ return;
+ if (prow->idx + 1 == idx) {
+ if (*pfields < RESLIST_FIELDS)
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ *pfields, RESLIST_FIELDS);
+ *pfields = 0;
+ prow->idx = idx;
+ return;
+ }
+ fprintf(stderr,
+ "received reslist index %u, have %d of %d fields for index %u, aborting.\n",
+ idx, *pfields, RESLIST_FIELDS, prow->idx);
+ exit(1);
+}
+
+
+/*
+ * another_reslist_field - helper for reslist()
+ *
+ * If all fields for the row have been received, print it.
+ */
+static void
+another_reslist_field(
+ int * pfields,
+ reslist_row * prow,
+ FILE * fp
+ )
+{
+ char addrmaskstr[128];
+ int prefix; /* subnet mask as prefix bits count */
+ u_int idx;
+
+ (*pfields)++;
+ /* we understand 4 tags */
+ if (RESLIST_FIELDS > *pfields)
+ return;
+
+ prefix = sockaddr_masktoprefixlen(&prow->mask);
+ if (prefix >= 0)
+ snprintf(addrmaskstr, sizeof(addrmaskstr), "%s/%d",
+ stoa(&prow->addr), prefix);
+ else
+ snprintf(addrmaskstr, sizeof(addrmaskstr), "%s %s",
+ stoa(&prow->addr), stoa(&prow->mask));
+
+ /*
+ " hits addr/prefix or addr mask\n"
+ " restrictions\n"
+ "==============================================================================\n");
+ */
+ fprintf(fp,
+ "%10lu %s\n"
+ " %s\n",
+ prow->hits, addrmaskstr, prow->flagstr);
+ idx = prow->idx;
+ ZERO(*prow);
+ prow->idx = idx;
+}
+
+
+/*
+ * reslist - ntpq -c reslist modeled on ntpdc -c reslist.
+ */
+static void
+reslist(
+ struct parse * pcmd,
+ FILE * fp
+ )
+{
+ const char addr_fmtu[] = "addr.%u";
+ const char mask_fmtu[] = "mask.%u";
+ const char hits_fmt[] = "hits.%u";
+ const char flags_fmt[] = "flags.%u";
+ const char qdata[] = "addr_restrictions";
+ const int qdata_chars = COUNTOF(qdata) - 1;
+ const char * datap;
+ int qres;
+ int dsize;
+ u_short rstatus;
+ char * tag;
+ char * val;
+ int fields;
+ u_int idx;
+ u_int ui;
+ reslist_row row;
+ int comprende;
+ size_t len;
+
+ qres = doquery(CTL_OP_READ_ORDLIST_A, 0, TRUE, qdata_chars,
+ qdata, &rstatus, &dsize, &datap);
+ if (qres) /* message already displayed */
+ return;
+
+ fprintf(fp,
+ " hits addr/prefix or addr mask\n"
+ " restrictions\n"
+ "==============================================================================\n");
+ /* '=' x 78 */
+
+ ZERO(row);
+ fields = 0;
+ idx = 0;
+ ui = 0;
+ while (nextvar(&dsize, &datap, &tag, &val)) {
+ if (debug > 1)
+ fprintf(stderr, "nextvar gave: %s = %s\n", tag,
+ (NULL == val)
+ ? ""
+ : val);
+ comprende = FALSE;
+ switch(tag[0]) {
+
+ case 'a':
+ if (1 == sscanf(tag, addr_fmtu, &ui) &&
+ decodenetnum(val, &row.addr))
+ comprende = TRUE;
+ break;
+
+ case 'f':
+ if (1 == sscanf(tag, flags_fmt, &ui)) {
+ if (NULL == val) {
+ row.flagstr[0] = '\0';
+ comprende = TRUE;
+ } else {
+ len = strlen(val);
+ memcpy(row.flagstr, val, len);
+ row.flagstr[len] = '\0';
+ comprende = TRUE;
+ }
+ }
+ break;
+
+ case 'h':
+ if (1 == sscanf(tag, hits_fmt, &ui) &&
+ 1 == sscanf(val, "%lu", &row.hits))
+ comprende = TRUE;
+ break;
+
+ case 'm':
+ if (1 == sscanf(tag, mask_fmtu, &ui) &&
+ decodenetnum(val, &row.mask))
+ comprende = TRUE;
+ break;
+ }
+
+ if (comprende) {
+ /* error out if rows out of order */
+ validate_reslist_idx(fp, ui, &fields, &row);
+ /* if the row is complete, print it */
+ another_reslist_field(&fields, &row, fp);
+ }
+ }
+ if (fields != RESLIST_FIELDS)
+ fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
+ fields, RESLIST_FIELDS);
+
+ fflush(fp);
+}
+
+
+/*
+ * collect_display_vdc
+ */
+static void
+collect_display_vdc(
+ associd_t as,
+ vdc * table,
+ int decodestatus,
+ FILE * fp
+ )
+{
+ static const char * const suf[2] = { "adr", "port" };
+ static const char * const leapbits[4] = { "00", "01",
+ "10", "11" };
+ struct varlist vl[MAXLIST];
+ char tagbuf[32];
+ vdc *pvdc;
+ u_short rstatus;
+ int rsize;
+ const char *rdata;
+ int qres;
+ char *tag;
+ char *val;
+ u_int n;
+ size_t len;
+ int match;
+ u_long ul;
+ int vtype;
+
+ ZERO(vl);
+ for (pvdc = table; pvdc->tag != NULL; pvdc++) {
+ ZERO(pvdc->v);
+ if (NTP_ADD != pvdc->type) {
+ doaddvlist(vl, pvdc->tag);
+ } else {
+ for (n = 0; n < COUNTOF(suf); n++) {
+ snprintf(tagbuf, sizeof(tagbuf), "%s%s",
+ pvdc->tag, suf[n]);
+ doaddvlist(vl, tagbuf);
+ }
+ }
+ }
+ qres = doquerylist(vl, CTL_OP_READVAR, as, 0, &rstatus, &rsize,
+ &rdata);
+ doclearvlist(vl);
+ if (qres)
+ return; /* error msg already displayed */
+
+ /*
+ * iterate over the response variables filling vdc_table with
+ * the retrieved values.
+ */
+ while (nextvar(&rsize, &rdata, &tag, &val)) {
+ if (NULL == val)
+ continue;
+ n = 0;
+ for (pvdc = table; pvdc->tag != NULL; pvdc++) {
+ len = strlen(pvdc->tag);
+ if (strncmp(tag, pvdc->tag, len))
+ continue;
+ if (NTP_ADD != pvdc->type) {
+ if ('\0' != tag[len])
+ continue;
+ break;
+ }
+ match = FALSE;
+ for (n = 0; n < COUNTOF(suf); n++) {
+ if (strcmp(tag + len, suf[n]))
+ continue;
+ match = TRUE;
+ break;
+ }
+ if (match)
+ break;
+ }
+ if (NULL == pvdc->tag)
+ continue;
+ switch (pvdc->type) {
+
+ case NTP_STR:
+ /* strip surrounding double quotes */
+ if ('"' == val[0]) {
+ len = strlen(val);
+ if (len > 0 && '"' == val[len - 1]) {
+ val[len - 1] = '\0';
+ val++;
+ }
+ }
+ /* fallthru */
+ case NTP_MODE: /* fallthru */
+ case NTP_2BIT:
+ pvdc->v.str = estrdup(val);
+ break;
+
+ case NTP_LFP:
+ decodets(val, &pvdc->v.lfp);
+ break;
+
+ case NTP_ADP:
+ if (!decodenetnum(val, &pvdc->v.sau))
+ fprintf(stderr, "malformed %s=%s\n",
+ pvdc->tag, val);
+ break;
+
+ case NTP_ADD:
+ if (0 == n) { /* adr */
+ if (!decodenetnum(val, &pvdc->v.sau))
+ fprintf(stderr,
+ "malformed %s=%s\n",
+ pvdc->tag, val);
+ } else { /* port */
+ if (atouint(val, &ul))
+ SET_PORT(&pvdc->v.sau,
+ (u_short)ul);
+ }
+ break;
+ }
+ }
+
+ /* and display */
+ if (decodestatus) {
+ vtype = (0 == as)
+ ? TYPE_SYS
+ : TYPE_PEER;
+ fprintf(fp, "associd=%u status=%04x %s,\n", as, rstatus,
+ statustoa(vtype, rstatus));
+ }
+
+ for (pvdc = table; pvdc->tag != NULL; pvdc++) {
+ switch (pvdc->type) {
+
+ case NTP_STR:
+ if (pvdc->v.str != NULL) {
+ fprintf(fp, "%s %s\n", pvdc->display,
+ pvdc->v.str);
+ free(pvdc->v.str);
+ pvdc->v.str = NULL;
+ }
+ break;
+
+ case NTP_ADD: /* fallthru */
+ case NTP_ADP:
+ fprintf(fp, "%s %s\n", pvdc->display,
+ nntohostp(&pvdc->v.sau));
+ break;
+
+ case NTP_LFP:
+ fprintf(fp, "%s %s\n", pvdc->display,
+ prettydate(&pvdc->v.lfp));
+ break;
+
+ case NTP_MODE:
+ atouint(pvdc->v.str, &ul);
+ fprintf(fp, "%s %s\n", pvdc->display,
+ modetoa((int)ul));
+ break;
+
+ case NTP_2BIT:
+ atouint(pvdc->v.str, &ul);
+ fprintf(fp, "%s %s\n", pvdc->display,
+ leapbits[ul & 0x3]);
+ break;
+
+ default:
+ fprintf(stderr, "unexpected vdc type %d for %s\n",
+ pvdc->type, pvdc->tag);
+ break;
+ }
+ }
+}
+
+
+/*
+ * sysstats - implements ntpq -c sysstats modeled on ntpdc -c sysstats
+ */
+static void
+sysstats(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc sysstats_vdc[] = {
+ { "ss_uptime", "uptime: ", NTP_STR },
+ { "ss_reset", "sysstats reset: ", NTP_STR },
+ { "ss_received", "packets received: ", NTP_STR },
+ { "ss_thisver", "current version: ", NTP_STR },
+ { "ss_oldver", "older version: ", NTP_STR },
+ { "ss_badformat", "bad length or format: ", NTP_STR },
+ { "ss_badauth", "authentication failed:", NTP_STR },
+ { "ss_declined", "declined: ", NTP_STR },
+ { "ss_restricted", "restricted: ", NTP_STR },
+ { "ss_limited", "rate limited: ", NTP_STR },
+ { "ss_kodsent", "KoD responses: ", NTP_STR },
+ { "ss_processed", "processed for time: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, sysstats_vdc, FALSE, fp);
+}
+
+
+/*
+ * sysinfo - modeled on ntpdc's sysinfo
+ */
+static void
+sysinfo(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc sysinfo_vdc[] = {
+ { "peeradr", "system peer: ", NTP_ADP },
+ { "peermode", "system peer mode: ", NTP_MODE },
+ { "leap", "leap indicator: ", NTP_2BIT },
+ { "stratum", "stratum: ", NTP_STR },
+ { "precision", "log2 precision: ", NTP_STR },
+ { "rootdelay", "root delay: ", NTP_STR },
+ { "rootdisp", "root dispersion: ", NTP_STR },
+ { "refid", "reference ID: ", NTP_STR },
+ { "reftime", "reference time: ", NTP_LFP },
+ { "sys_jitter", "system jitter: ", NTP_STR },
+ { "clk_jitter", "clock jitter: ", NTP_STR },
+ { "clk_wander", "clock wander: ", NTP_STR },
+ { "bcastdelay", "broadcast delay: ", NTP_STR },
+ { "authdelay", "symm. auth. delay:", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, sysinfo_vdc, TRUE, fp);
+}
+
+
+/*
+ * kerninfo - modeled on ntpdc's kerninfo
+ */
+static void
+kerninfo(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc kerninfo_vdc[] = {
+ { "koffset", "pll offset: ", NTP_STR },
+ { "kfreq", "pll frequency: ", NTP_STR },
+ { "kmaxerr", "maximum error: ", NTP_STR },
+ { "kesterr", "estimated error: ", NTP_STR },
+ { "kstflags", "kernel status: ", NTP_STR },
+ { "ktimeconst", "pll time constant: ", NTP_STR },
+ { "kprecis", "precision: ", NTP_STR },
+ { "kfreqtol", "frequency tolerance: ", NTP_STR },
+ { "kppsfreq", "pps frequency: ", NTP_STR },
+ { "kppsstab", "pps stability: ", NTP_STR },
+ { "kppsjitter", "pps jitter: ", NTP_STR },
+ { "kppscalibdur", "calibration interval ", NTP_STR },
+ { "kppscalibs", "calibration cycles: ", NTP_STR },
+ { "kppsjitexc", "jitter exceeded: ", NTP_STR },
+ { "kppsstbexc", "stability exceeded: ", NTP_STR },
+ { "kppscaliberrs", "calibration errors: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, kerninfo_vdc, TRUE, fp);
+}
+
+
+/*
+ * monstats - implements ntpq -c monstats
+ */
+static void
+monstats(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc monstats_vdc[] = {
+ { "mru_enabled", "enabled: ", NTP_STR },
+ { "mru_depth", "addresses: ", NTP_STR },
+ { "mru_deepest", "peak addresses: ", NTP_STR },
+ { "mru_maxdepth", "maximum addresses: ", NTP_STR },
+ { "mru_mindepth", "reclaim above count:", NTP_STR },
+ { "mru_maxage", "reclaim older than: ", NTP_STR },
+ { "mru_mem", "kilobytes: ", NTP_STR },
+ { "mru_maxmem", "maximum kilobytes: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, monstats_vdc, FALSE, fp);
+}
+
+
+/*
+ * iostats - ntpq -c iostats - network input and output counters
+ */
+static void
+iostats(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc iostats_vdc[] = {
+ { "iostats_reset", "time since reset: ", NTP_STR },
+ { "total_rbuf", "receive buffers: ", NTP_STR },
+ { "free_rbuf", "free receive buffers: ", NTP_STR },
+ { "used_rbuf", "used receive buffers: ", NTP_STR },
+ { "rbuf_lowater", "low water refills: ", NTP_STR },
+ { "io_dropped", "dropped packets: ", NTP_STR },
+ { "io_ignored", "ignored packets: ", NTP_STR },
+ { "io_received", "received packets: ", NTP_STR },
+ { "io_sent", "packets sent: ", NTP_STR },
+ { "io_sendfailed", "packet send failures: ", NTP_STR },
+ { "io_wakeups", "input wakeups: ", NTP_STR },
+ { "io_goodwakeups", "useful input wakeups: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, iostats_vdc, FALSE, fp);
+}
+
+
+/*
+ * timerstats - ntpq -c timerstats - interval timer counters
+ */
+static void
+timerstats(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc timerstats_vdc[] = {
+ { "timerstats_reset", "time since reset: ", NTP_STR },
+ { "timer_overruns", "timer overruns: ", NTP_STR },
+ { "timer_xmts", "calls to transmit: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, timerstats_vdc, FALSE, fp);
+}
+
+
+/*
+ * authinfo - implements ntpq -c authinfo
+ */
+static void
+authinfo(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc authinfo_vdc[] = {
+ { "authreset", "time since reset:", NTP_STR },
+ { "authkeys", "stored keys: ", NTP_STR },
+ { "authfreek", "free keys: ", NTP_STR },
+ { "authklookups", "key lookups: ", NTP_STR },
+ { "authknotfound", "keys not found: ", NTP_STR },
+ { "authkuncached", "uncached keys: ", NTP_STR },
+ { "authkexpired", "expired keys: ", NTP_STR },
+ { "authencrypts", "encryptions: ", NTP_STR },
+ { "authdecrypts", "decryptions: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+
+ collect_display_vdc(0, authinfo_vdc, FALSE, fp);
+}
+
+
+/*
+ * pstats - show statistics for a peer
+ */
+static void
+pstats(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ static vdc pstats_vdc[] = {
+ { "src", "remote host: ", NTP_ADD },
+ { "dst", "local address: ", NTP_ADD },
+ { "timerec", "time last received: ", NTP_STR },
+ { "timer", "time until next send:", NTP_STR },
+ { "timereach", "reachability change: ", NTP_STR },
+ { "sent", "packets sent: ", NTP_STR },
+ { "received", "packets received: ", NTP_STR },
+ { "badauth", "bad authentication: ", NTP_STR },
+ { "bogusorg", "bogus origin: ", NTP_STR },
+ { "oldpkt", "duplicate: ", NTP_STR },
+ { "seldisp", "bad dispersion: ", NTP_STR },
+ { "selbroken", "bad reference time: ", NTP_STR },
+ { "candidate", "candidate order: ", NTP_STR },
+ { NULL, NULL, 0 }
+ };
+ associd_t associd;
+
+ associd = checkassocid(pcmd->argval[0].uval);
+ if (0 == associd)
+ return;
+
+ collect_display_vdc(associd, pstats_vdc, TRUE, fp);
+}
+
diff --git a/ntpq/ntpq.1 b/ntpq/ntpq.1
deleted file mode 100644
index 9415c0d9b225..000000000000
--- a/ntpq/ntpq.1
+++ /dev/null
@@ -1,399 +0,0 @@
-.TH NTPQ 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:34:35 PM by AutoGen 5.12
-.\" From the definitions ntpq-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-ntpq \- standard NTP query program
-.SH SYNOPSIS
-.B ntpq
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.br
-.in +8
-[ host ...]
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBntpq\fP command.
-The
-[= prog-name =]
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
-information about current state and/or changes in that state.
-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.
-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.
-The
-[= prog-name =]
-utility can also obtain and print a
-list of peers in a common format by sending multiple queries to the
-server.
-
-If one or more request options is included on the command line
-when
-[= prog-name =]
-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,
-[= prog-name =]
-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.
-The
-[= prog-name =]
-utility will prompt for
-commands if the standard input is a terminal device.
-
-The
-[= prog-name =]
-utility 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.
-The
-[= prog-name =]
-utility makes
-one attempt to retransmit requests, and will time requests out if
-the remote host is not heard from within a suitable timeout
-time.
-
-Specifying a
-command line option other than
-.Fl i
-or
-.Fl n
-will
-cause the specified query (queries) to be sent to the indicated
-host(s) immediately.
-Otherwise,
-[= prog-name =]
-will attempt to read
-interactive format commands from the standard input.
-.Ss "Internal Commands"
-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.
-
-A
-number of interactive format commands are executed entirely within
-the
-[= prog-name =]
-utility itself and do not result in NTP mode 6
-requests being sent to a server.
-These are described following.
-.sp
-.IR "? [command_keyword]"
-.sp 1x help [command_keyword]
-A
-.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
-[= prog-name =] .
-A
-.Ql \&?
-followed by a command keyword will print function and usage
-information about the command.
-This command is probably a better
-source of information about
-[= prog-name =]
-than this manual
-page.
-.sp
-.IR "addvars"
-.Ar variable_name [=value] ...
-.Xc
-.sp
-.IR "rmvars variable_name ..."
-.sp
-.IR "clearvars"
-The data carried by NTP mode 6 messages consists of a list of
-items of the form
-.Ql variable_name=value ,
-where the
-.Ql =value
-is ignored, and can be omitted,
-in requests to the server to read variables.
-The
-[= prog-name =]
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
-.Ic readlist
-and
-.Ic writelist
-commands described below.
-The
-.Ic addvars
-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
-.Ic rmvars
-command can be used to remove individual variables from the list,
-while the
-.Ic clearlist
-command removes all variables from the
-list.
-.sp
-.IR "authenticate [ yes | no ]"
-Normally
-[= prog-name =]
-does not authenticate requests unless
-they are write requests.
-The command
-.Ql authenticate yes
-causes
-[= prog-name =]
-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
-.Ic peer
-display.
-The command
-.Ql authenticate
-causes
-[= prog-name =]
-to display whether or not
-[= prog-name =]
-is currently autheinticating requests.
-.sp
-.IR "cooked"
-Causes output from query commands to be "cooked", so that
-variables which are recognized by
-[= prog-name =]
-will have their
-values reformatted for human consumption.
-Variables which
-[= prog-name =]
-thinks should have a decodable value but didn't are
-marked with a trailing
-.Ql \&? .
-.@item debug [
-.Cm more |
-.Cm less |
-.Cm off
-]
-.Xc
-With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.sp
-.IR "delay milliseconds"
-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.
-.sp
-.IR "host hostname"
-Set the host to which future queries will be sent.
-Hostname may
-be either a host name or a numeric address.
-.sp
-.IR "hostnames Cm yes | Cm no"
-If
-.Cm yes
-is specified, host names are printed in
-information displays.
-If
-.Cm no
-is specified, numeric
-addresses are printed instead.
-The default is
-.Cm yes ,
-unless
-modified using the command line
-.Fl n
-switch.
-.sp
-.IR "keyid keyid"
-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.
-.sp
-.IR "ntpversion ["
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-]
-.Xc
-Sets the NTP version number which
-[= prog-name =]
-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.
-With no argument, displays the current NTP version that will be used
-when communicating with servers.
-.sp
-.IR "quit"
-Exit
-[= prog-name =] .
-.sp
-.IR "passwd"
-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.
-.sp
-.IR "raw"
-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.
-.sp
-.IR "timeout Ar milliseconds"
-Specify a timeout period for responses to server queries.
-The
-default is about 5000 milliseconds.
-Note that since
-[= prog-name =]
-retries each query once after a timeout, the total waiting time for
-a timeout will be twice the timeout value set.
-.br
-
-.SH OPTIONS
-.TP
-.BR \-4 ", " \--ipv4
-Force IPv4 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv6.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-.TP
-.BR \-6 ", " \--ipv6
-Force IPv6 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv4.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-.TP
-.BR \-c " \fIcmd\fP, " \--command "=" \fIcmd\fP
-run a command and exit.
-This option may appear an unlimited number of times.
-.sp
-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).
-.TP
-.BR \-d ", " \--debug-level
-Increase output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Increase the debugging message output level.
-.TP
-.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
-Set the output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-.TP
-.BR \-p ", " \--peers
-Print a list of the peers.
-This option must not appear in combination with any of the following options:
-interactive.
-.sp
-Print a list of the peers known to the server as well as a summary
-of their state. This is equivalent to the 'peers' interactive command.
-.TP
-.BR \-i ", " \--interactive
-Force ntpq to operate in interactive mode.
-This option must not appear in combination with any of the following options:
-command, peers.
-.sp
-Force ntpq to operate in interactive mode. Prompts will be written
-to the standard output and commands read from the standard input.
-.TP
-.BR \-n ", " \--numeric
-numeric host addresses.
-.sp
-Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
-.TP
-.BR \--old-rv
-Always output status line with readvar.
-.sp
-By default, ntpq now suppresses the associd=... line that
-precedes the output of "readvar" (alias "rv") when a single
-variable is requested, such as ntpq \-c "rv 0 offset". This
-option causes ntpq to include both lines of output for a
-single-variable readvar. Using an environment variable to
-preset this option in a script will enable both older and
-newer ntpq to behave identically in this regard.
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
-.TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
-out of order.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from configuration ("RC" or ".INI") file(s) and values from
-environment variables named:
-.nf
- \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
-.fi
-.ad
-The environmental presets take precedence (are processed later than)
-the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
-is searched for within those directories.
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
-option definitions.
diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman
new file mode 100644
index 000000000000..49cc5aa66335
--- /dev/null
+++ b/ntpq/ntpq.1ntpqman
@@ -0,0 +1,1408 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpq 1ntpqman "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-XYaGog/ag-9Yayng)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:13 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpq-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpq\fP
+\- standard NTP query program
+.SH SYNOPSIS
+\f\*[B-Font]ntpq\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ host ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntpq\fP
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
+If one or more request options is included on the command line
+when
+\f\*[B-Font]ntpq\fP
+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,
+\f\*[B-Font]ntpq\fP
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility will prompt for
+commands if the standard input is a terminal device.
+\f\*[B-Font]ntpq\fP
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+Specifying a
+command line option other than
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-n\f[]
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+\f\*[B-Font]ntpq\fP
+will attempt to read
+interactive format commands from the standard input.
+.SS "Internal Commands"
+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.
+A
+number of interactive format commands are executed entirely within
+the
+\f\*[B-Font]ntpq\fP
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+.TP 20
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+A
+\[oq]\&?\[cq]
+by itself will print a list of all the command
+keywords known to this incarnation of
+\f\*[B-Font]ntpq\fP.
+A
+\[oq]\&?\[cq]
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+\f\*[B-Font]ntpq\fP
+than this manual
+page.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]clearvars\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]showvars\f[]
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+\[oq]variable_name=value\[cq],
+where the
+\[oq]=value\[cq]
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+\f\*[B-Font]ntpq\fP
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+\f\*[B-Font]readlist\f[]
+and
+\f\*[B-Font]writelist\f[]
+commands described below.
+The
+\f\*[B-Font]addvars\f[]
+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
+\f\*[B-Font]rmvars\f[]
+command can be used to remove individual variables from the list,
+while the
+\f\*[B-Font]clearlist\f[]
+command removes all variables from the
+list.
+The
+\f\*[B-Font]showvars\f[]
+command displays the current list of optional variables.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+Normally
+\f\*[B-Font]ntpq\fP
+does not authenticate requests unless
+they are write requests.
+The command
+\[oq]authenticate yes\[cq]
+causes
+\f\*[B-Font]ntpq\fP
+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
+\f\*[B-Font]peer\f[]
+display.
+The command
+\[oq]authenticate\[cq]
+causes
+\f\*[B-Font]ntpq\fP
+to display whether or not
+\f\*[B-Font]ntpq\fP
+is currently autheinticating requests.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]cooked\f[]
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+\f\*[B-Font]ntpq\fP
+will have their
+values reformatted for human consumption.
+Variables which
+\f\*[B-Font]ntpq\fP
+thinks should have a decodable value but didn't are
+marked with a trailing
+\[oq]\&?\[cq].
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]exit\f[]
+Exit
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+Set the host to which future queries will be sent.
+\f\*[I-Font]hostname\f[]
+may be either a host name or a numeric address.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+If
+\f\*[B-Font]yes\f[]
+is specified, host names are printed in
+information displays.
+If
+\f\*[B-Font]no\f[]
+is specified, numeric
+addresses are printed instead.
+The default is
+\f\*[B-Font]yes\f[],
+unless
+modified using the command line
+\f\*[B-Font]\-n\f[]
+switch.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
+Specify the type of key to use for authenticating requests.
+\f\*[B-Font]md5\f[]
+is alway supported.
+If
+\f\*[B-Font]ntpq\fP
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+\f\*[B-Font]keytype\f[]
+is displayed.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+Sets the NTP version number which
+\f\*[B-Font]ntpq\fP
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]passwd\f[]
+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.
+.\" Not yet implemented.
+.\" .It Ic poll
+.\" .Op Ar n
+.\" .Op Ic verbose
+.\" Poll an NTP server in client mode
+.\" .Ar n
+.\" times.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]quit\f[]
+Exit
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]raw\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+\f\*[B-Font]ntpq\fP
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]version\f[]
+Print the version of the
+\f\*[B-Font]ntpq\fP
+program.
+.PP
+.SS "Control Message Commands"
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server and expect a single response message.
+The exceptions are the
+\f[C]peers\f[]
+command, which sends a series of messages,
+and the
+\f[C]mreadlist\f[]
+and
+\f[C]mreadvar\f[]
+commands, which iterate over a range of associations.
+.TP 10
+.NOP \f\*[B-Font]associations\f[]
+Display a list of mobilized associations in the form:
+.Dl ind assid status conf reach auth condition last_event cnt
+.RS
+.IP \fB\(bu\fP 2
+.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
+.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
+.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
+.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
+.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
+.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]authinfo\f[]
+Display the authentication statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+Display a list of clock variables for those associations supporting a reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] [...]
+Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
+Send the each line of
+\f\*[I-Font]filename\f[]
+to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ifstats\f[]
+Display statistics for each local network address. Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]iostats\f[]
+Display network and reference clock I/O statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]kerninfo\f[]
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lassociations\f[]
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Obtain and print a list of all peers and clients showing
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version).
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Print a peer spreadsheet for the appropriate IP version(s).
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version).
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]monstats\f[]
+Display monitor facility statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+the options filter the list returned by
+\f\*[B-Font]ntpd.\f[]
+The
+\f\*[B-Font]limited\f[]
+and
+\f\*[B-Font]kod\f[]
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
+option filters entries representing less than
+\f\*[I-Font]count\f[]
+packets.
+The
+\f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[]
+option filters entries for packets received on any local address other than
+\f\*[I-Font]localaddr\f[].
+\f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[]
+and
+\f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]
+filter entries containing none or less than all, respectively, of the bits in
+\f\*[I-Font]hexmask\f[],
+which must begin with
+\f\*[B-Font]0x\f[].
+The
+\f\*[I-Font]sortorder\f[]
+defaults to
+\f\*[B-Font]lstint\f[]
+and may be any of
+\f\*[B-Font]addr\f[],
+\f\*[B-Font]count\f[],
+\f\*[B-Font]avgint\f[],
+\f\*[B-Font]lstint\f[],
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+.RS
+.TP 10
+.NOP Column
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lstint\f[]
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]avgint\f[]
+Average interval in s between packets from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rstr\f[]
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+\f\*[B-Font]restrict\f[]
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]r\f[]
+Rate control indicator, either
+a period,
+\f\*[B-Font]L\f[]
+or
+\f\*[B-Font]K\f[]
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]m\f[]
+Packet mode.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]v\f[]
+Packet version number.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]count\f[]
+Packets received from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rport\f[]
+Source port of last packet from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+\f\*[B-Font]associations\f[]
+command.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Obtain and print the old-style list of all peers and clients showing
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version),
+rather than the
+\f\*[I-Font]refid\f[].
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]passociations\f[]
+Perform the same function as the
+\f\*[B-Font]associations\f[]
+command,
+except that it uses previously stored data rather than making a new query.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]peers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid st t when pool reach delay offset jitter
+.RS
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font][tally]\f[]
+single-character code indicating current value of the
+\f\*[B-Font]select\f[]
+field of the
+.Lk decode.html#peer "peer status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]remote\f[]
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]\-w\f[]
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+association ID or
+.Lk decode.html#kiss "'kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]st\f[]
+stratum
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]t\f[]
+\f\*[B-Font]u\f[]:
+unicast or manycast client,
+\f\*[B-Font]b\f[]:
+broadcast or multicast client,
+\f\*[B-Font]l\f[]:
+local (reference clock),
+\f\*[B-Font]s\f[]:
+symmetric (peer),
+\f\*[B-Font]A\f[]:
+manycast server,
+\f\*[B-Font]B\f[]:
+broadcast server,
+\f\*[B-Font]M\f[]:
+multicast server
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]when\f[]
+sec/min/hr since last received packet
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]poll\f[]
+poll interval (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reach\f[]
+reach shift register (octal)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]delay\f[]
+roundtrip delay
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+offset of server relative to this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]jitter\f[]
+jitter
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
+Show the statistics for the peer with the given
+\f\*[I-Font]assocID\f[].
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
+Read the system or peer variables included in the variable list.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+Display the specified variables.
+If
+\f\*[I-Font]assocID\f[]
+is zero, the variables are from the
+\fISystem\f[] \fIVariables\f[]
+name space, otherwise they are from the
+\fIPeer\f[] \fIVariables\f[]
+name space.
+The
+\f\*[I-Font]assocID\f[]
+is required, as the same name can occur in both spaces.
+If no
+\f\*[I-Font]name\f[]
+is included, all operative variables in the name space are displayed.
+In this case only, if the
+\f\*[I-Font]assocID\f[]
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reslist\f[]
+Show the access control (restrict) list for
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration,
+including any runtime modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[],
+to the ntpd host's file
+\f\*[I-Font]filename\f[].
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+\f\*[B-Font]ntpd\f[]
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\fR()\f[]
+format specifies to substitute the current date and time, for example,
+\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+The filename used is stored in system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timerstats\f[]
+Display interval timer counters.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
+Write the system or peer variables included in the variable list.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Write the specified variables.
+If the
+\f\*[I-Font]assocID\f[]
+is zero, the variables are from the
+\fISystem\f[] \fIVariables\f[]
+name space, otherwise they are from the
+\fIPeer\f[] \fIVariables\f[]
+name space.
+The
+\f\*[I-Font]assocID\f[]
+is required, as the same name can occur in both spaces.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Print statistics counters maintained in the protocol module.
+.PP
+.SS Status Words and Kiss Codes
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per-association basis.
+These words are displayed in the
+\f\*[B-Font]rv\f[]
+and
+\f\*[B-Font]as\f[]
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+.sp \n(Ppu
+.ne 2
+
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss-o'-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+.SS System Variables
+The following system variables appear in the
+\f\*[B-Font]rv\f[]
+billboard.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#sys "system status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]version\f[]
+NTP software version and build time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]processor\f[]
+hardware platform and version
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]system\f[]
+operating system and version
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leap\f[]
+leap warning indicator (0-3)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+stratum (1-15)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]precision\f[]
+precision (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdelay\f[]
+total roundtrip delay to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdisp\f[]
+total dispersion to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]peer\f[]
+system peer association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reftime\f[]
+reference time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+combined offset of server relative to this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]frequency\f[]
+frequency offset (PPM) relative to hardware clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clk_wander\f[]
+clock frequency wander (PPM)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clk_jitter\f[]
+clock jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]tai\f[]
+TAI-UTC offset (s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leapsec\f[]
+NTP seconds when the next leap second is/was inserted
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]expire\f[]
+NTP seconds when the NIST leapseconds file expires
+.PP
+The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+.sp \n(Ppu
+.ne 2
+
+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 Autokey dance:
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]host\f[]
+Autokey host name for this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+host flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]digest\f[]
+OpenSSL message digest algorithm
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]signature\f[]
+OpenSSL digest/signature scheme
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]update\f[]
+NTP seconds at last signature update
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]cert\f[]
+certificate subject, issuer and certificate flags
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]until\f[]
+NTP seconds when the certificate expires
+.PP
+.SS Peer Variables
+The following peer variables appear in the
+\f\*[B-Font]rv\f[]
+billboard for each association.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]associd\f[]
+association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#peer "peer status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]srcadr\f[]
+source (remote) IP address
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]srcport\f[]
+source (remote) port
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dstadr\f[]
+destination (local) IP address
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dstport\f[]
+destination (local) port
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leap\f[]
+leap indicator (0-3)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+stratum (0-15)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]precision\f[]
+precision (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdelay\f[]
+total roundtrip delay to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdisp\f[]
+total root dispersion to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reftime\f[]
+reference time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reach\f[]
+reach register (octal)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]unreach\f[]
+unreach counter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]hmode\f[]
+host mode (1-6)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]pmode\f[]
+peer mode (1-5)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]hpoll\f[]
+host poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ppoll\f[]
+peer poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]headway\f[]
+headway (see
+.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flash\f[]
+.Lk decode.html#flash "flash status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+filter offset
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]delay\f[]
+filter delay
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dispersion\f[]
+filter dispersion
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]jitter\f[]
+filter jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]bias\f[]
+unicast/broadcast bias
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]xleave\f[]
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+.PP
+The
+\f\*[B-Font]bias\f[]
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+\f\*[B-Font]xleave\f[]
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+.sp \n(Ppu
+.ne 2
+
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+peer flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]host\f[]
+Autokey server name
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+peer flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]signature\f[]
+OpenSSL digest/signature scheme
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]initsequence\f[]
+initial key ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]initkey\f[]
+initial key index
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timestamp\f[]
+Autokey signature timestamp
+.PP
+.SS Clock Variables
+The following clock variables appear in the
+\f\*[B-Font]cv\f[]
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]associd\f[]
+association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#clock "clock status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]device\f[]
+device description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timecode\f[]
+ASCII time code string (specific to device)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]poll\f[]
+poll messages sent
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]noreply\f[]
+no reply
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]badformat\f[]
+bad format
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]baddata\f[]
+bad date or time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]fudgetime1\f[]
+fudge time 1
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]fudgetime2\f[]
+fudge time 2
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+driver stratum
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+driver reference ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+driver flags
+.PP
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, peers.
+.sp
+Force \fBntpq\fP to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+numeric host addresses.
+.sp
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-\-old\-rv\f[]
+Always output status line with readvar.
+.sp
+By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
+line that precedes the output of \fBreadvar\fP
+(alias \fBrv\fP) when a single variable is requested, such as
+\fBntpq \-c "rv 0 offset"\fP.
+This option causes \fBntpq\fP to include both lines of output
+for a single-variable \fBreadvar\fP.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer \fBntpq\fP to behave identically in this regard.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
+option definitions.
diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc
new file mode 100644
index 000000000000..3c93d140553f
--- /dev/null
+++ b/ntpq/ntpq.1ntpqmdoc
@@ -0,0 +1,954 @@
+.Dd December 19 2014
+.Dt NTPQ 1ntpqmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpq-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpq
+.Nd standard NTP query program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ host ...]
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+.Nm
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
+If one or more request options is included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
+.Nm
+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.
+The
+.Nm
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+Specifying a
+command line option other than
+.Fl i
+or
+.Fl n
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+.Nm
+will attempt to read
+interactive format commands from the standard input.
+.Ss "Internal Commands"
+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.
+A
+number of interactive format commands are executed entirely within
+the
+.Nm
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+.Bl -tag -width "? [command_keyword]" -compact -offset indent
+.It Ic ? Op Ar command_keyword
+.It Ic help Op Ar command_keyword
+A
+.Ql \&?
+by itself will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Ql \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Nm
+than this manual
+page.
+.It Ic addvars Ar variable_name Ns Xo Op Ic =value
+.Ic ...
+.Xc
+.It Ic rmvars Ar variable_name Ic ...
+.It Ic clearvars
+.It Ic showvars
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+.Ql variable_name=value ,
+where the
+.Ql =value
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+.Nm
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+.Ic readlist
+and
+.Ic writelist
+commands described below.
+The
+.Ic addvars
+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
+.Ic rmvars
+command can be used to remove individual variables from the list,
+while the
+.Ic clearlist
+command removes all variables from the
+list.
+The
+.Ic showvars
+command displays the current list of optional variables.
+.It Ic authenticate Op yes | no
+Normally
+.Nm
+does not authenticate requests unless
+they are write requests.
+The command
+.Ql authenticate yes
+causes
+.Nm
+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
+.Ic peer
+display.
+The command
+.Ql authenticate
+causes
+.Nm
+to display whether or not
+.Nm
+is currently autheinticating requests.
+.It Ic cooked
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+.Nm
+will have their
+values reformatted for human consumption.
+Variables which
+.Nm
+thinks should have a decodable value but didn't are
+marked with a trailing
+.Ql \&? .
+.It Xo
+.Ic debug
+.Oo
+.Cm more |
+.Cm less |
+.Cm off
+.Oc
+.Xc
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+.It Ic delay Ar milliseconds
+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.
+.It Ic exit
+Exit
+.Nm .
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+.Ar hostname
+may be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic keytype Xo Oo
+.Cm md5 |
+.Cm OpenSSLDigestType
+.Oc
+.Xc
+Specify the type of key to use for authenticating requests.
+.Cm md5
+is alway supported.
+If
+.Nm
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+.Ic keytype
+is displayed.
+.It Ic ntpversion Xo Oo
+.Cm 1 |
+.Cm 2 |
+.Cm 3 |
+.Cm 4
+.Oc
+.Xc
+Sets the NTP version number which
+.Nm
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+.It Ic passwd
+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.
+.\" Not yet implemented.
+.\" .It Ic poll
+.\" .Op Ar n
+.\" .Op Ic verbose
+.\" Poll an NTP server in client mode
+.\" .Ar n
+.\" times.
+.It Ic quit
+Exit
+.Nm .
+.It Ic raw
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.It Ic version
+Print the version of the
+.Nm
+program.
+.El
+.Ss "Control Message Commands"
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode\-6 message to the server and expect a single response message.
+The exceptions are the
+.Li peers
+command, which sends a series of messages,
+and the
+.Li mreadlist
+and
+.Li mreadvar
+commands, which iterate over a range of associations.
+.Bl -tag -width "something" -compact -offset indent
+.It Cm associations
+Display a list of mobilized associations in the form:
+.Dl ind assid status conf reach auth condition last_event cnt
+.Bl -column -offset indent ".Sy Variable" ".Sy Description"
+.It Sy String Ta Sy Description
+.It Li ind Ta index on this list
+.It Li assid Ta association ID
+.It Li status Ta peer status word
+.It Li conf Ta Li yes : persistent, Li no : ephemeral
+.It Li reach Ta Li yes : reachable, Li no : unreachable
+.It Li auth Ta Li ok , Li yes , Li bad and Li none
+.It Li condition Ta selection status (see the Li select field of the peer status word)
+.It Li last_event Ta event report (see the Li event field of the peer status word)
+.It Li cnt Ta event count (see the Li count field of the peer status word)
+.El
+.It Cm authinfo
+Display the authentication statistics.
+.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+Display a list of clock variables for those associations supporting a reference clock.
+.It Cm :config Op ...
+Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.It Cm config\-from\-file Ar filename
+Send the each line of
+.Ar filename
+to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+.It Ic ifstats
+Display statistics for each local network address. Authentication is required.
+.It Ic iostats
+Display network and reference clock I/O statistics.
+.It Ic kerninfo
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+.It Ic lassociations
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+.It Ic lopeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Obtain and print a list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version).
+.It Ic lpeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Print a peer spreadsheet for the appropriate IP version(s).
+.Ar dstadr
+(associated with any given IP version).
+.It Ic monstats
+Display monitor facility statistics.
+.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+.Cm sort Ns = Ns Ar sortorder ,
+the options filter the list returned by
+.Cm ntpd.
+The
+.Cm limited
+and
+.Cm kod
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+.Cm mincount Ns = Ns Ar count
+option filters entries representing less than
+.Ar count
+packets.
+The
+.Cm laddr Ns = Ns Ar localaddr
+option filters entries for packets received on any local address other than
+.Ar localaddr .
+.Cm resany Ns = Ns Ar hexmask
+and
+.Cm resall Ns = Ns Ar hexmask
+filter entries containing none or less than all, respectively, of the bits in
+.Ar hexmask ,
+which must begin with
+.Cm 0x .
+The
+.Ar sortorder
+defaults to
+.Cm lstint
+and may be any of
+.Cm addr ,
+.Cm count ,
+.Cm avgint ,
+.Cm lstint ,
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+.Bl -tag -width "something" -compact -offset indent
+.It Column
+Description
+.It Ic lstint
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+.Nm .
+.It Ic avgint
+Average interval in s between packets from this address.
+.It Ic rstr
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+.Ic restrict
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+.It Ic r
+Rate control indicator, either
+a period,
+.Ic L
+or
+.Ic K
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+.It Ic m
+Packet mode.
+.It Ic v
+Packet version number.
+.It Ic count
+Packets received from this address.
+.It Ic rport
+Source port of last packet from this address.
+.It Ic remote address
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+.El
+.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+Perform the same function as the
+.Ic readvar
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+.Ic associations
+command.
+.It Ic opeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Obtain and print the old\-style list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version),
+rather than the
+.Ar refid .
+.It Ic passociations
+Perform the same function as the
+.Ic associations
+command,
+except that it uses previously stored data rather than making a new query.
+.It Ic peers
+Display a list of peers in the form:
+.Dl [tally]remote refid st t when pool reach delay offset jitter
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic [tally]
+single\-character code indicating current value of the
+.Ic select
+field of the
+.Lk decode.html#peer "peer status word"
+.It Ic remote
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.Fl w
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+.It Ic refid
+association ID or
+.Lk decode.html#kiss "'kiss code"
+.It Ic st
+stratum
+.It Ic t
+.Ic u :
+unicast or manycast client,
+.Ic b :
+broadcast or multicast client,
+.Ic l :
+local (reference clock),
+.Ic s :
+symmetric (peer),
+.Ic A :
+manycast server,
+.Ic B :
+broadcast server,
+.Ic M :
+multicast server
+.It Ic when
+sec/min/hr since last received packet
+.It Ic poll
+poll interval (log2 s)
+.It Ic reach
+reach shift register (octal)
+.It Ic delay
+roundtrip delay
+.It Ic offset
+offset of server relative to this host
+.It Ic jitter
+jitter
+.El
+.It Ic pstats Ar assocID
+Show the statistics for the peer with the given
+.Ar assocID .
+.It Ic readlist Ar assocID
+.It Ic rl Ar assocID
+Read the system or peer variables included in the variable list.
+.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+Display the specified variables.
+If
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+If no
+.Ar name
+is included, all operative variables in the name space are displayed.
+In this case only, if the
+.Ar assocID
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts\-per\-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+.It Ic reslist
+Show the access control (restrict) list for
+.Nm .
+.It Ic saveconfig Ar filename
+Write the current configuration,
+including any runtime modifications given with
+.Ic :config
+or
+.Ic config\-from\-file ,
+to the ntpd host's file
+.Ar filename .
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+.Ic ntpd
+configuration file.
+.Ar filename
+can use
+.Xr strftime
+format specifies to substitute the current date and time, for example,
+.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+The filename used is stored in system variable
+.Ic savedconfig .
+Authentication is required.
+.It Ic timerstats
+Display interval timer counters.
+.It Ic writelist Ar assocID
+Write the system or peer variables included in the variable list.
+.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
+Write the specified variables.
+If the
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+.It Ic sysinfo
+Display operational summary.
+.It Ic sysstats
+Print statistics counters maintained in the protocol module.
+.El
+.Ss Status Words and Kiss Codes
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per\-association basis.
+These words are displayed in the
+.Ic rv
+and
+.Ic as
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+.Pp
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss\-o'\-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+.Ss System Variables
+The following system variables appear in the
+.Ic rv
+billboard.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic status
+.Lk decode.html#sys "system status word"
+.It Ic version
+NTP software version and build time
+.It Ic processor
+hardware platform and version
+.It Ic system
+operating system and version
+.It Ic leap
+leap warning indicator (0\-3)
+.It Ic stratum
+stratum (1\-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total dispersion to the primary reference clock
+.It Ic peer
+system peer association ID
+.It Ic tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Ic mintc
+minimum time constant (log2 s) (3\-10)
+.It Ic clock
+date and time of day
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic offset
+combined offset of server relative to this host
+.It Ic sys_jitter
+combined system jitter
+.It Ic frequency
+frequency offset (PPM) relative to hardware clock
+.It Ic clk_wander
+clock frequency wander (PPM)
+.It Ic clk_jitter
+clock jitter
+.It Ic tai
+TAI\-UTC offset (s)
+.It Ic leapsec
+NTP seconds when the next leap second is/was inserted
+.It Ic expire
+NTP seconds when the NIST leapseconds file expires
+.El
+The jitter and wander statistics are exponentially\-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+.Pp
+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 Autokey dance:
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic host
+Autokey host name for this host
+.It Ic ident
+Autokey group name for this host
+.It Ic flags
+host flags (see Autokey specification)
+.It Ic digest
+OpenSSL message digest algorithm
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic update
+NTP seconds at last signature update
+.It Ic cert
+certificate subject, issuer and certificate flags
+.It Ic until
+NTP seconds when the certificate expires
+.El
+.Ss Peer Variables
+The following peer variables appear in the
+.Ic rv
+billboard for each association.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#peer "peer status word"
+.It Ic srcadr
+source (remote) IP address
+.It Ic srcport
+source (remote) port
+.It Ic dstadr
+destination (local) IP address
+.It Ic dstport
+destination (local) port
+.It Ic leap
+leap indicator (0\-3)
+.It Ic stratum
+stratum (0\-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total root dispersion to the primary reference clock
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic reach
+reach register (octal)
+.It Ic unreach
+unreach counter
+.It Ic hmode
+host mode (1\-6)
+.It Ic pmode
+peer mode (1\-5)
+.It Ic hpoll
+host poll exponent (log2 s) (3\-17)
+.It Ic ppoll
+peer poll exponent (log2 s) (3\-17)
+.It Ic headway
+headway (see
+.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
+.It Ic flash
+.Lk decode.html#flash "flash status word"
+.It Ic offset
+filter offset
+.It Ic delay
+filter delay
+.It Ic dispersion
+filter dispersion
+.It Ic jitter
+filter jitter
+.It Ic ident
+Autokey group name for this association
+.It Ic bias
+unicast/broadcast bias
+.It Ic xleave
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+.El
+The
+.Ic bias
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+.Ic xleave
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+.Pp
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic host
+Autokey server name
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic initsequence
+initial key ID
+.It Ic initkey
+initial key index
+.It Ic timestamp
+Autokey signature timestamp
+.El
+.Ss Clock Variables
+The following clock variables appear in the
+.Ic cv
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#clock "clock status word"
+.It Ic device
+device description
+.It Ic timecode
+ASCII time code string (specific to device)
+.It Ic poll
+poll messages sent
+.It Ic noreply
+no reply
+.It Ic badformat
+bad format
+.It Ic baddata
+bad date or time
+.It Ic fudgetime1
+fudge time 1
+.It Ic fudgetime2
+fudge time 2
+.It Ic stratum
+driver stratum
+.It Ic refid
+driver reference ID
+.It Ic flags
+driver flags
+.El
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl i , Fl \-interactive
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, peers.
+.sp
+Force \fBntpq\fP to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+.It Fl n , Fl \-numeric
+numeric host addresses.
+.sp
+Output all host addresses in dotted\-quad numeric format rather than
+converting to the canonical host names.
+.It Fl \-old\-rv
+Always output status line with readvar.
+.sp
+By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
+line that precedes the output of \fBreadvar\fP
+(alias \fBrv\fP) when a single variable is requested, such as
+\fBntpq \-c "rv 0 offset"\fP.
+This option causes \fBntpq\fP to include both lines of output
+for a single\-variable \fBreadvar\fP.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer \fBntpq\fP to behave identically in this regard.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl w , Fl \-wide
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
+option definitions.
diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c
index bc1acc61ed7b..2ffdfc7be0ec 100644
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -1,38 +1,45 @@
/*
* ntpq - query an NTP server using mode 6 commands
*/
-
+#include <config.h>
#include <stdio.h>
-
#include <ctype.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/types.h>
#include <sys/time.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#ifdef SYS_WINNT
+# include <mswsock.h>
+#endif
+#include <isc/net.h>
+#include <isc/result.h>
#include "ntpq.h"
+#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
-#include "ntp_io.h"
#include "ntp_select.h"
-#include "ntp_stdlib.h"
#include "ntp_assert.h"
+#include "lib_strbuf.h"
#include "ntp_lineedit.h"
#include "ntp_debug.h"
-#include "isc/net.h"
-#include "isc/result.h"
+#ifdef OPENSSL
+#include "openssl/evp.h"
+#include "openssl/objects.h"
+#endif
#include <ssl_applink.c>
#include "ntp_libopts.h"
#include "ntpq-opts.h"
-#ifdef SYS_WINNT
-# include <Mswsock.h>
-# include <io.h>
-#endif /* SYS_WINNT */
-#ifdef SYS_VXWORKS
- /* vxWorks needs mode flag -casey*/
+#ifdef SYS_VXWORKS /* vxWorks needs mode flag -casey*/
# define open(name, flags) open(name, flags, 0777)
# define SERVER_PORT_NUM 123
#endif
@@ -97,126 +104,41 @@ 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 HA 1 /* host address */
+#define NA 2 /* network address */
+#define LP 3 /* leap (print in binary) */
+#define RF 4 /* refid (sometimes string, sometimes not) */
+#define AR 5 /* array of times */
+#define FX 6 /* test flags */
+#define TS 7 /* l_fp timestamp in hex */
+#define OC 8 /* integer, print in octal */
#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_OFFSET, FL, "offset" }, /* 10 */
- { CS_DRIFT, FS, "frequency" }, /* 11 */
- { CS_JITTER, FU, "jitter" }, /* 12 */
- { CS_CLOCK, TS, "clock" }, /* 13 */
- { CS_PROCESSOR, ST, "processor" }, /* 14 */
- { CS_SYSTEM, ST, "system" }, /* 15 */
- { CS_VERSION, ST, "version" }, /* 16 */
- { CS_STABIL, FS, "stability" }, /* 17 */
- { CS_VARLIST, ST, "sys_var_list" }, /* 18 */
- { 0, EOV, "" }
+ * For the most part ntpq simply displays what ntpd provides in the
+ * mostly plain-text mode 6 responses. A few variable names are by
+ * default "cooked" to provide more human-friendly output.
+ */
+const var_format cookedvars[] = {
+ { "leap", LP },
+ { "reach", OC },
+ { "refid", RF },
+ { "reftime", TS },
+ { "clock", TS },
+ { "org", TS },
+ { "rec", TS },
+ { "xmt", TS },
+ { "flash", FX },
+ { "srcadr", HA },
+ { "peeradr", HA }, /* compat with others */
+ { "dstadr", NA },
+ { "filtdelay", AR },
+ { "filtoffset", AR },
+ { "filtdisp", AR },
+ { "filterror", AR }, /* compat with others */
};
-/*
- * 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, "rootdisp" }, /* 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_UNREACH, UI, "unreach" }, /* 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
@@ -242,11 +164,11 @@ int ntpqmain (int, char **);
/*
* Built in command handler declarations
*/
-static int openhost (const char *);
-
+static int openhost (const char *, int);
+static void dump_hex_printable(const void *, size_t);
static int sendpkt (void *, size_t);
static int getresponse (int, int, u_short *, int *, const char **, int);
-static int sendrequest (int, int, int, int, char *);
+static int sendrequest (int, associd_t, int, int, const char *);
static char * tstflags (u_long);
#ifndef BUILD_AS_LIB
static void getcmds (void);
@@ -255,9 +177,10 @@ static RETSIGTYPE abortcmd (int);
#endif /* SYS_WINNT */
static void docmd (const char *);
static void tokenize (const char *, char **, int *);
-static int getarg (char *, int, arg_v *);
+static int getarg (const char *, int, arg_v *);
#endif /* BUILD_AS_LIB */
-static int findcmd (char *, struct xcmd *, struct xcmd *, struct xcmd **);
+static int findcmd (const char *, struct xcmd *,
+ struct xcmd *, struct xcmd **);
static int rtdatetolfp (char *, l_fp *);
static int decodearr (char *, int *, l_fp *);
static void help (struct parse *, FILE *);
@@ -285,10 +208,12 @@ static void atoascii (const char *, size_t, char *, size_t);
static void cookedprint (int, int, const char *, int, int, FILE *);
static void rawprint (int, int, const char *, int, int, FILE *);
static void startoutput (void);
-static void output (FILE *, char *, char *);
+static void output (FILE *, const char *, const char *);
static void endoutput (FILE *);
static void outputarr (FILE *, char *, int, l_fp *);
static int assoccmp (const void *, const void *);
+ u_short varfmt (const char *);
+
void ntpq_custom_opt_handler (tOptions *, tOptDesc *);
@@ -314,7 +239,7 @@ struct xcmd builtins[] = {
{ "poll", ntp_poll, { OPT|NTP_UINT, OPT|NTP_STR, NO, NO },
{ "n", "verbose", "", "" },
"poll an NTP server in client mode `n' times" },
- { "passwd", passwd, { NO, NO, NO, NO },
+ { "passwd", passwd, { OPT|NTP_STR, NO, NO, NO },
{ "", "", "", "" },
"specify a password to use for authenticated requests"},
{ "hostnames", hostnames, { OPT|NTP_STR, NO, NO, NO },
@@ -359,8 +284,18 @@ struct xcmd builtins[] = {
* Default values we use.
*/
#define DEFHOST "localhost" /* default host name */
-#define DEFTIMEOUT (5) /* 5 second time out */
-#define DEFSTIMEOUT (2) /* 2 second time out after first */
+#define DEFTIMEOUT 5 /* wait 5 seconds for 1st pkt */
+#define DEFSTIMEOUT 3 /* and 3 more for each additional */
+/*
+ * Requests are automatically retried once, so total timeout with no
+ * response is a bit over 2 * DEFTIMEOUT, or 10 seconds. At the other
+ * extreme, a request eliciting 32 packets of responses each for some
+ * reason nearly DEFSTIMEOUT seconds after the prior in that series,
+ * with a single packet dropped, would take around 32 * DEFSTIMEOUT, or
+ * 93 seconds to fail each of two times, or 186 seconds.
+ * Some commands involve a series of requests, such as "peers" and
+ * "mrulist", so the cumulative timeouts are even longer for those.
+ */
#define DEFDELAY 0x51EB852 /* 20 milliseconds, l_fp fraction */
#define LENHOSTNAME 256 /* host name is 256 characters long */
#define MAXCMDS 100 /* maximum commands on cmd line */
@@ -368,7 +303,7 @@ struct xcmd builtins[] = {
#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 MAXVALLEN 2048 /* maximum length of a variable value */
#define MAXOUTLINE 72 /* maximum length of an output line */
#define SCREENWIDTH 76 /* nominal screen width in columns */
@@ -382,6 +317,7 @@ char currenthost[LENHOSTNAME]; /* current host name */
int currenthostisnum; /* is prior text from IP? */
struct sockaddr_in hostaddr = { 0 }; /* host address */
int showhostnames = 1; /* show host names by default */
+int wideremote = 0; /* show wide remote names? */
int ai_fam_templ; /* address family */
int ai_fam_default; /* default address family */
@@ -401,15 +337,18 @@ 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.
+ * assoc_cache[] is a dynamic array which allows references to
+ * associations using &1 ... &N for n associations, avoiding manual
+ * lookup of the current association IDs for a given ntpd. It also
+ * caches the status word for each association, retrieved incidentally.
*/
-struct association assoc_cache[MAXASSOC];
-int numassoc = 0; /* number of cached associations */
+struct association * assoc_cache;
+u_int assoc_cache_slots;/* count of allocated array entries */
+u_int numassoc; /* number of cached associations */
/*
* For commands typed on the command line (with the -c option)
@@ -421,17 +360,18 @@ const char *ccmds[MAXCMDS];
/*
* 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
+u_int numhosts;
+
+chost chosts[MAXHOSTS];
+#define ADDHOST(cp) \
+ do { \
+ if (numhosts < MAXHOSTS) { \
+ chosts[numhosts].name = (cp); \
+ chosts[numhosts].fam = ai_fam_templ; \
+ numhosts++; \
+ } \
+ } while (0)
/*
* Macro definitions we use
@@ -456,7 +396,6 @@ FILE *current_output;
extern struct xcmd opcmds[];
char *progname;
-volatile int debug;
#ifdef NO_MAIN_ALLOWED
#ifndef BUILD_AS_LIB
@@ -497,7 +436,9 @@ ntpqmain(
char *argv[]
)
{
- extern int ntp_optind;
+ u_int ihost;
+ int icmd;
+
#ifdef SYS_VXWORKS
clear_globals();
@@ -509,6 +450,7 @@ ntpqmain(
init_lib(); /* sets up ipv4_works, ipv6_works */
ssl_applink();
+ init_auth();
/* Check to see if we have IPv6. Otherwise default to IPv4 */
if (!ipv6_works)
@@ -527,7 +469,7 @@ ntpqmain(
* handled by ntpq_custom_opt_handler().
*/
- debug = DESC(DEBUG_LEVEL).optOccCt;
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
if (HAVE_OPT(IPV4))
ai_fam_templ = AF_INET;
@@ -542,49 +484,34 @@ ntpqmain(
if (HAVE_OPT(NUMERIC))
showhostnames = 0;
+ if (HAVE_OPT(WIDE))
+ wideremote = 1;
+
old_rv = HAVE_OPT(OLD_RV);
-#if 0
- 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);
- }
-#endif
- NTP_INSIST(ntp_optind <= argc);
- if (ntp_optind == argc) {
+ if (0 == argc) {
ADDHOST(DEFHOST);
} else {
- for (; ntp_optind < argc; ntp_optind++)
- ADDHOST(argv[ntp_optind]);
+ for (ihost = 0; ihost < (u_int)argc; ihost++) {
+ if ('-' == *argv[ihost]) {
+ //
+ // If I really cared I'd also check:
+ // 0 == argv[ihost][2]
+ //
+ // and there are other cases as well...
+ //
+ if ('4' == argv[ihost][1]) {
+ ai_fam_templ = AF_INET;
+ continue;
+ } else if ('6' == argv[ihost][1]) {
+ ai_fam_templ = AF_INET6;
+ continue;
+ } else {
+ // XXX Throw a usage error
+ }
+ }
+ ADDHOST(argv[ihost]);
+ }
}
if (numcmds == 0 && interactive == 0
@@ -598,14 +525,11 @@ ntpqmain(
#endif /* SYS_WINNT */
if (numcmds == 0) {
- (void) openhost(chosts[0]);
+ (void) openhost(chosts[0].name, chosts[0].fam);
getcmds();
} else {
- int ihost;
- int icmd;
-
for (ihost = 0; ihost < numhosts; ihost++) {
- if (openhost(chosts[ihost]))
+ if (openhost(chosts[ihost].name, chosts[ihost].fam))
for (icmd = 0; icmd < numcmds; icmd++)
docmd(ccmds[icmd]);
}
@@ -622,22 +546,25 @@ ntpqmain(
*/
static int
openhost(
- const char *hname
+ const char *hname,
+ int fam
)
{
+ const char svc[] = "ntp";
char temphost[LENHOSTNAME];
int a_info, i;
- struct addrinfo hints, *ai = NULL;
+ struct addrinfo hints, *ai;
+ sockaddr_u addr;
+ size_t octets;
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 != ']'; cp++, i++)
@@ -657,14 +584,14 @@ openhost(
* will return an "IPv4-mapped IPv6 address" address if you
* give it an IPv4 address to lookup.
*/
- strcpy(service, "ntp");
ZERO(hints);
- hints.ai_family = ai_fam_templ;
+ hints.ai_family = fam;
hints.ai_protocol = IPPROTO_UDP;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = Z_AI_NUMERICHOST;
+ ai = NULL;
- a_info = getaddrinfo(hname, service, &hints, &ai);
+ a_info = getaddrinfo(hname, svc, &hints, &ai);
if (a_info == EAI_NONAME
#ifdef EAI_NODATA
|| a_info == EAI_NODATA
@@ -674,44 +601,53 @@ openhost(
#ifdef AI_ADDRCONFIG
hints.ai_flags |= AI_ADDRCONFIG;
#endif
- a_info = getaddrinfo(hname, service, &hints, &ai);
+ a_info = getaddrinfo(hname, svc, &hints, &ai);
}
#ifdef AI_ADDRCONFIG
/* 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);
+ hints.ai_flags &= ~AI_ADDRCONFIG;
+ a_info = getaddrinfo(hname, svc, &hints, &ai);
}
#endif
if (a_info != 0) {
- (void) fprintf(stderr, "%s\n", gai_strerror(a_info));
+ fprintf(stderr, "%s\n", gai_strerror(a_info));
return 0;
}
- if (!showhostnames || ai->ai_canonname == NULL) {
- strncpy(temphost,
- stoa((sockaddr_u *)ai->ai_addr),
- LENHOSTNAME);
+ INSIST(ai != NULL);
+ ZERO(addr);
+ octets = min(sizeof(addr), ai->ai_addrlen);
+ memcpy(&addr, ai->ai_addr, octets);
+
+ if (ai->ai_canonname == NULL) {
+ strlcpy(temphost, stoa(&addr), sizeof(temphost));
currenthostisnum = TRUE;
} else {
- strncpy(temphost, ai->ai_canonname, LENHOSTNAME);
+ strlcpy(temphost, ai->ai_canonname, sizeof(temphost));
currenthostisnum = FALSE;
}
- temphost[LENHOSTNAME-1] = '\0';
if (debug > 2)
- printf("Opening host %s\n", temphost);
+ printf("Opening host %s (%s)\n",
+ temphost,
+ (ai->ai_family == AF_INET)
+ ? "AF_INET"
+ : (ai->ai_family == AF_INET6)
+ ? "AF_INET6"
+ : "AF-???"
+ );
if (havehost == 1) {
if (debug > 2)
printf("Closing old host %s\n", currenthost);
- (void) closesocket(sockfd);
+ closesocket(sockfd);
havehost = 0;
}
- (void) strcpy(currenthost, temphost);
+ strlcpy(currenthost, temphost, sizeof(currenthost));
/* port maps to the same location in both families */
- s_port = ((struct sockaddr_in6 *)ai->ai_addr)->sin6_port;
+ s_port = NSRCPORT(&addr);
#ifdef SYS_VXWORKS
((struct sockaddr_in6 *)&hostaddr)->sin6_port = htons(SERVER_PORT_NUM);
if (ai->ai_family == AF_INET)
@@ -730,46 +666,90 @@ openhost(
err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
(char *)&optionValue, sizeof(optionValue));
if (err) {
- err = WSAGetLastError();
- fprintf(stderr,
- "setsockopt(SO_SYNCHRONOUS_NONALERT) "
- "error: %s\n", strerror(err));
+ mfprintf(stderr,
+ "setsockopt(SO_SYNCHRONOUS_NONALERT)"
+ " error: %m\n");
+ freeaddrinfo(ai);
exit(1);
}
}
#endif /* SYS_WINNT */
- sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
+ sockfd = socket(ai->ai_family, ai->ai_socktype,
+ ai->ai_protocol);
if (sockfd == INVALID_SOCKET) {
error("socket", "", "");
+ freeaddrinfo(ai);
+ return 0;
}
-
+
#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", "", "");
+ error("setsockopt", "", "");
}
# endif
#endif
+ if
#ifdef SYS_VXWORKS
- if (connect(sockfd, (struct sockaddr *)&hostaddr,
+ (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
#else
- if (connect(sockfd, (struct sockaddr *)ai->ai_addr,
+ (connect(sockfd, (struct sockaddr *)ai->ai_addr,
ai->ai_addrlen) == -1)
#endif /* SYS_VXWORKS */
- error("connect", "", "");
- if (a_info == 0)
+ {
+ error("connect", "", "");
freeaddrinfo(ai);
+ return 0;
+ }
+ freeaddrinfo(ai);
havehost = 1;
+ numassoc = 0;
+
return 1;
}
+static void
+dump_hex_printable(
+ const void * data,
+ size_t len
+ )
+{
+ const char * cdata;
+ const char * rowstart;
+ size_t idx;
+ size_t rowlen;
+ u_char uch;
+
+ cdata = data;
+ while (len > 0) {
+ rowstart = cdata;
+ rowlen = min(16, len);
+ for (idx = 0; idx < rowlen; idx++) {
+ uch = *(cdata++);
+ printf("%02x ", uch);
+ }
+ for ( ; idx < 16 ; idx++)
+ printf(" ");
+ cdata = rowstart;
+ for (idx = 0; idx < rowlen; idx++) {
+ uch = *(cdata++);
+ printf("%c", (isprint(uch))
+ ? uch
+ : '.');
+ }
+ printf("\n");
+ len -= rowlen;
+ }
+}
+
+
/* XXX ELIMINATE sendpkt similar in ntpq.c, ntpdc.c, ntp_io.c, ntptrace.c */
/*
* sendpkt - send a packet to the remote host
@@ -789,24 +769,12 @@ sendpkt(
}
if (debug >= 4) {
- int first = 8;
- char *cdata = xdata;
-
- printf("Packet data:\n");
- while (xdatalen-- > 0) {
- if (first-- == 0) {
- printf("\n");
- first = 7;
- }
- printf(" %02x", *cdata++ & 0xff);
- }
- printf("\n");
+ printf("Request packet:\n");
+ dump_hex_printable(xdata, xdatalen);
}
return 0;
}
-
-
/*
* getresponse - get a (series of) response packet(s) and return the data
*/
@@ -833,9 +801,7 @@ getresponse(
int shouldbesize;
fd_set fds;
int n;
- int len;
- int first;
- char *data;
+ int errcode;
/*
* This is pretty tricky. We may get between 1 and MAXFRAG packets
@@ -864,7 +830,7 @@ getresponse(
tvo = tvout;
else
tvo = tvsout;
-
+
FD_SET(sockfd, &fds);
n = select(sockfd + 1, &fds, NULL, NULL, &tvo);
@@ -893,7 +859,7 @@ getresponse(
for (f = 0; f < numfrags; f++)
fprintf(stderr,
"%2u: %5d %5d\t%3d octets\n",
- f, offsets[f],
+ (u_int)f, offsets[f],
offsets[f] +
counts[f],
counts[f]);
@@ -913,19 +879,8 @@ getresponse(
}
if (debug >= 4) {
- len = n;
- first = 8;
- data = (char *)&rpkt;
-
- printf("Packet data:\n");
- while (len-- > 0) {
- if (first-- == 0) {
- printf("\n");
- first = 7;
- }
- printf(" %02x", *data++ & 0xff);
- }
- printf("\n");
+ printf("Response packet:\n");
+ dump_hex_printable(&rpkt, n);
}
/*
@@ -977,15 +932,12 @@ getresponse(
* 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 (CTL_ISMORE(rpkt.r_m_e_op))
+ TRACE(1, ("Error code %d received on not-final packet\n",
+ errcode));
if (errcode == CERR_UNSPEC)
- return ERR_UNSPEC;
+ return ERR_UNSPEC;
return errcode;
}
@@ -994,9 +946,8 @@ getresponse(
* we sent.
*/
if (ntohs(rpkt.associd) != associd) {
- if (debug)
- printf("Association ID %d doesn't match expected %d\n",
- ntohs(rpkt.associd), associd);
+ TRACE(1, ("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.
@@ -1017,20 +968,16 @@ getresponse(
* boundary and no smaller than claimed by rpkt.count
*/
if (n & 0x3) {
- if (debug)
- printf("Response packet not padded, "
- "size = %d\n", n);
+ TRACE(1, ("Response packet not padded, size = %d\n",
+ n));
continue;
}
shouldbesize = (CTL_HEADER_LEN + count + 3) & ~3;
if (n < shouldbesize) {
- printf("Response packet claims %u octets "
- "payload, above %d received\n",
- count,
- n - CTL_HEADER_LEN
- );
+ printf("Response packet claims %u octets payload, above %ld received\n",
+ count, (long)n - CTL_HEADER_LEN);
return ERR_INCOMPLETE;
}
@@ -1074,29 +1021,23 @@ getresponse(
}
}
- if (debug >= 2)
- printf("Got packet, size = %d\n", n);
- if ((int)count > (n - CTL_HEADER_LEN)) {
- if (debug)
- printf("Received count of %d octets, "
- "data in packet is %d\n",
- count, n-CTL_HEADER_LEN);
+ TRACE(2, ("Got packet, size = %d\n", n));
+ if (count > (n - CTL_HEADER_LEN)) {
+ TRACE(1, ("Received count of %u octets, data in packet is %ld\n",
+ count, (long)n - CTL_HEADER_LEN));
continue;
}
if (count == 0 && CTL_ISMORE(rpkt.r_m_e_op)) {
- if (debug)
- printf("Received count of 0 in non-final fragment\n");
+ TRACE(1, ("Received count of 0 in non-final fragment\n"));
continue;
}
if (offset + count > sizeof(pktdata)) {
- if (debug)
- printf("Offset %d, count %d, too big for buffer\n",
- offset, count);
+ TRACE(1, ("Offset %u, count %u, 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");
+ TRACE(1, ("Received second last fragment packet\n"));
continue;
}
@@ -1104,13 +1045,11 @@ getresponse(
* So far, so good. Record this fragment, making sure it doesn't
* overlap anything.
*/
- if (debug >= 2)
- printf("Packet okay\n");;
+ TRACE(2, ("Packet okay\n"));
if (numfrags > (MAXFRAGS - 1)) {
- if (debug)
- printf("Number of fragments exceeds maximum %d\n",
- MAXFRAGS - 1);
+ TRACE(2, ("Number of fragments exceeds maximum %d\n",
+ MAXFRAGS - 1));
return ERR_TOOMUCH;
}
@@ -1118,32 +1057,27 @@ getresponse(
* Find the position for the fragment relative to any
* previously received.
*/
- for (f = 0;
- f < numfrags && offsets[f] < offset;
+ for (f = 0;
+ f < numfrags && offsets[f] < offset;
f++) {
/* empty body */ ;
}
if (f < numfrags && offset == offsets[f]) {
- if (debug)
- printf("duplicate %u octets at %u ignored, prior %u at %u\n",
- count, offset, counts[f],
- offsets[f]);
+ TRACE(1, ("duplicate %u octets at %u ignored, prior %u at %u\n",
+ count, offset, counts[f], offsets[f]));
continue;
}
if (f > 0 && (offsets[f-1] + counts[f-1]) > offset) {
- if (debug)
- printf("received frag at %u overlaps with %u octet frag at %u\n",
- offset, counts[f-1],
- offsets[f-1]);
+ TRACE(1, ("received frag at %u overlaps with %u octet frag at %u\n",
+ offset, counts[f-1], offsets[f-1]));
continue;
}
if (f < numfrags && (offset + count) > offsets[f]) {
- if (debug)
- printf("received %u octet frag at %u overlaps with frag at %u\n",
- count, offset, offsets[f]);
+ TRACE(1, ("received %u octet frag at %u overlaps with frag at %u\n",
+ count, offset, offsets[f]));
continue;
}
@@ -1168,7 +1102,7 @@ getresponse(
/*
* Copy the data into the data buffer.
*/
- memcpy((char *)pktdata + offset, rpkt.data, count);
+ memcpy((char *)pktdata + offset, &rpkt.u, count);
/*
* If we've seen the last fragment, look for holes in the sequence.
@@ -1181,10 +1115,8 @@ getresponse(
break;
if (f == numfrags) {
*rsize = offsets[f-1] + counts[f-1];
- if (debug)
- fprintf(stderr,
- "%u packets reassembled into response\n",
- numfrags);
+ TRACE(1, ("%lu packets reassembled into response\n",
+ (u_long)numfrags));
return 0;
}
}
@@ -1198,10 +1130,10 @@ getresponse(
static int
sendrequest(
int opcode,
- int associd,
+ associd_t associd,
int auth,
int qsize,
- char *qdata
+ const char *qdata
)
{
struct ntp_control qpkt;
@@ -1237,10 +1169,10 @@ sendrequest(
* If we have data, copy and pad it out to a 32-bit boundary.
*/
if (qsize > 0) {
- memcpy(qpkt.data, qdata, (size_t)qsize);
+ memcpy(&qpkt.u, qdata, (size_t)qsize);
pktsize += qsize;
while (pktsize & (sizeof(u_int32) - 1)) {
- qpkt.data[qsize++] = 0;
+ qpkt.u.data[qsize++] = 0;
pktsize++;
}
}
@@ -1251,14 +1183,14 @@ sendrequest(
*/
if (!auth && !always_auth) {
return sendpkt(&qpkt, pktsize);
- }
+ }
/*
* Pad out packet to a multiple of 8 octets to be sure
* receiver can handle it.
*/
while (pktsize & 7) {
- qpkt.data[qsize++] = 0;
+ qpkt.u.data[qsize++] = 0;
pktsize++;
}
@@ -1268,7 +1200,7 @@ sendrequest(
if (info_auth_keyid == 0) {
key_id = getkeyid("Keyid: ");
if (key_id == 0 || key_id > NTP_MAXKEY) {
- fprintf(stderr,
+ fprintf(stderr,
"Invalid key identifier\n");
return 1;
}
@@ -1289,7 +1221,7 @@ sendrequest(
* Do the encryption.
*/
maclen = authencrypt(info_auth_keyid, (void *)&qpkt, pktsize);
- if (!maclen) {
+ if (!maclen) {
fprintf(stderr, "Key not found\n");
return 1;
} else if ((size_t)maclen != (info_auth_hashlen + sizeof(keyid_t))) {
@@ -1299,7 +1231,7 @@ sendrequest(
(u_long)info_auth_hashlen);
return 1;
}
-
+
return sendpkt((char *)&qpkt, pktsize + maclen);
}
@@ -1385,7 +1317,7 @@ doquery(
associd_t associd,
int auth,
int qsize,
- char *qdata,
+ const char *qdata,
u_short *rstatus,
int *rsize,
const char **rdata
@@ -1406,7 +1338,7 @@ doqueryex(
associd_t associd,
int auth,
int qsize,
- char *qdata,
+ const char *qdata,
u_short *rstatus,
int *rsize,
const char **rdata,
@@ -1434,7 +1366,7 @@ doqueryex(
res = sendrequest(opcode, associd, auth, qsize, qdata);
if (res != 0)
return res;
-
+
/*
* Get the response. If we got a standard error, print a message
*/
@@ -1524,7 +1456,7 @@ docmd(
tokenize(cmdline, tokens, &ntok);
if (ntok == 0)
return;
-
+
/*
* Find the appropriate command description.
*/
@@ -1538,7 +1470,12 @@ docmd(
tokens[0]);
return;
}
-
+
+ /* Warn about ignored extra args */
+ for (i = MAXARGS + 1; i < ntok ; ++i) {
+ fprintf(stderr, "***Extra arg `%s' ignored\n", tokens[i]);
+ }
+
/*
* Save the keyword, then walk through the arguments, interpreting
* as we go.
@@ -1594,13 +1531,15 @@ docmd(
jump = 0; /* HMS: 961106: was after fclose() */
if (i) (void) fclose(current_output);
}
+
+ return;
}
/*
* tokenize - turn a command line into tokens
*
- * SK: Modified to allow a quoted string
+ * SK: Modified to allow a quoted string
*
* HMS: If the first character of the first token is a ':' then (after
* eating inter-token whitespace) the 2nd token is the rest of the line.
@@ -1636,6 +1575,8 @@ tokenize(
if (*ntok == 1 && tokens[0][0] == ':') {
do {
+ if (sp - tspace >= MAXLINE)
+ goto toobig;
*sp++ = *cp++;
} while (!ISEOL(*cp));
}
@@ -1646,19 +1587,33 @@ tokenize(
else if (*cp == '\"') {
++cp;
do {
+ if (sp - tspace >= MAXLINE)
+ goto toobig;
*sp++ = *cp++;
} while ((*cp != '\"') && !ISEOL(*cp));
/* HMS: a missing closing " should be an error */
}
else {
do {
+ if (sp - tspace >= MAXLINE)
+ goto toobig;
*sp++ = *cp++;
} while ((*cp != '\"') && !ISSPACE(*cp) && !ISEOL(*cp));
/* HMS: Why check for a " in the previous line? */
}
+ if (sp - tspace >= MAXLINE)
+ goto toobig;
*sp++ = '\0';
}
+ return;
+
+ toobig:
+ *ntok = 0;
+ fprintf(stderr,
+ "***Line `%s' is too big\n",
+ line);
+ return;
}
@@ -1667,84 +1622,66 @@ tokenize(
*/
static int
getarg(
- char *str,
+ const char *str,
int code,
arg_v *argp
)
{
- int isneg;
- char *cp, *np;
- static const char *digits = "0123456789";
+ u_long ul;
switch (code & ~OPT) {
- case NTP_STR:
+ case NTP_STR:
argp->string = str;
break;
- case NTP_ADD:
- if (!getnetnum(str, &(argp->netnum), (char *)0, 0)) {
+
+ case NTP_ADD:
+ if (!getnetnum(str, &argp->netnum, NULL, 0))
return 0;
- }
break;
- case NTP_INT:
- case NTP_UINT:
- isneg = 0;
- np = str;
- if (*np == '&') {
- np++;
- isneg = atoi(np);
- if (isneg <= 0) {
- (void) fprintf(stderr,
- "***Association value `%s' invalid/undecodable\n", str);
+
+ case NTP_UINT:
+ if ('&' == str[0]) {
+ if (!atouint(&str[1], &ul)) {
+ fprintf(stderr,
+ "***Association index `%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);
+ if (0 == numassoc) {
+ dogetassoc(stdout);
+ if (0 == numassoc) {
+ fprintf(stderr,
+ "***No associations found, `%s' unknown\n",
+ str);
return 0;
- } else {
- isneg = numassoc;
}
}
- argp->uval = assoc_cache[isneg-1].assid;
+ ul = min(ul, numassoc);
+ argp->uval = assoc_cache[ul - 1].assid;
break;
}
-
- if (*np == '-') {
- np++;
- isneg = 1;
+ if (!atouint(str, &argp->uval)) {
+ fprintf(stderr, "***Illegal unsigned value %s\n",
+ str);
+ return 0;
}
+ break;
- 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) == NTP_UINT) {
- (void) fprintf(stderr,
- "***Value %s should be unsigned\n", str);
- return 0;
- }
- argp->ival = -argp->ival;
+ case NTP_INT:
+ if (!atoint(str, &argp->ival)) {
+ fprintf(stderr, "***Illegal integer value %s\n",
+ str);
+ return 0;
}
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");
+
+ case IP_VERSION:
+ if (!strcmp("-6", str)) {
+ argp->ival = 6;
+ } else if (!strcmp("-4", str)) {
+ argp->ival = 4;
+ } else {
+ fprintf(stderr, "***Version must be either 4 or 6\n");
return 0;
}
break;
@@ -1760,14 +1697,14 @@ getarg(
*/
static int
findcmd(
- register char *str,
- struct xcmd *clist1,
- struct xcmd *clist2,
- struct xcmd **cmd
+ const char * str,
+ struct xcmd * clist1,
+ struct xcmd * clist2,
+ struct xcmd ** cmd
)
{
- register struct xcmd *cl;
- register int clen;
+ struct xcmd *cl;
+ int clen;
int nmatch;
struct xcmd *nearmatch = NULL;
struct xcmd *clist;
@@ -1841,7 +1778,7 @@ getnetnum(
#ifdef AI_ADDRCONFIG
hints.ai_flags |= AI_ADDRCONFIG;
#endif
-
+
/*
* decodenetnum only works with addresses, but handles syntax
* that getaddrinfo doesn't: [2001::1]:1234
@@ -1852,19 +1789,18 @@ getnetnum(
LENHOSTNAME, NULL, 0, 0);
return 1;
} else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
- NTP_INSIST(sizeof(*num) >= ai->ai_addrlen);
+ INSIST(sizeof(*num) >= ai->ai_addrlen);
memcpy(num, ai->ai_addr, ai->ai_addrlen);
if (fullhost != NULL) {
- if (ai->ai_canonname != NULL) {
- strncpy(fullhost, ai->ai_canonname,
+ if (ai->ai_canonname != NULL)
+ strlcpy(fullhost, ai->ai_canonname,
LENHOSTNAME);
- fullhost[LENHOSTNAME - 1] = '\0';
- } else {
+ else
getnameinfo(&num->sa, SOCKLEN(num),
fullhost, LENHOSTNAME, NULL,
0, 0);
- }
}
+ freeaddrinfo(ai);
return 1;
}
fprintf(stderr, "***Can't find host %s\n", hname);
@@ -1872,11 +1808,12 @@ getnetnum(
return 0;
}
+
/*
* nntohost - convert network number to host name. This routine enforces
* the showhostnames setting.
*/
-char *
+const char *
nntohost(
sockaddr_u *netnum
)
@@ -1894,7 +1831,7 @@ nntohost(
* Such as IPv6 addresses, the caller decides whether
* the first or last of the numeric address is used.
*/
-char *
+const char *
nntohost_col(
sockaddr_u * addr,
size_t width,
@@ -1903,7 +1840,7 @@ nntohost_col(
{
const char * out;
- if (!showhostnames) {
+ if (!showhostnames || SOCK_UNSPEC(addr)) {
if (preserve_lowaddrbits)
out = trunc_left(stoa(addr), width);
else
@@ -1918,6 +1855,29 @@ nntohost_col(
/*
+ * nntohostp() is the same as nntohost() plus a :port suffix
+ */
+const char *
+nntohostp(
+ sockaddr_u *netnum
+ )
+{
+ const char * hostn;
+ char * buf;
+
+ if (!showhostnames || SOCK_UNSPEC(netnum))
+ return sptoa(netnum);
+ else if (ISREFCLOCKADR(netnum))
+ return refnumtoa(netnum);
+
+ hostn = socktohost(netnum);
+ LIB_GETBUF(buf);
+ snprintf(buf, LIB_BUFLENGTH, "%s:%u", hostn, SRCPORT(netnum));
+
+ return buf;
+}
+
+/*
* rtdatetolfp - decode an RT-11 date into an l_fp
*/
static int
@@ -1930,10 +1890,6 @@ rtdatetolfp(
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;
@@ -1966,7 +1922,7 @@ rtdatetolfp(
if (*cp++ != '-')
return 0;
-
+
for (i = 0; i < 3; i++)
buf[i] = *cp++;
buf[3] = '\0';
@@ -1980,7 +1936,7 @@ rtdatetolfp(
if (*cp++ != '-')
return 0;
-
+
if (!isdigit((int)*cp))
return 0;
cal.year = (u_short)(*cp++ - '0');
@@ -2195,7 +2151,7 @@ help(
)
{
struct xcmd *xcp = NULL; /* quiet warning */
- char *cmd;
+ const char *cmd;
const char *list[100];
size_t word, words;
size_t row, rows;
@@ -2205,17 +2161,18 @@ help(
if (pcmd->nargs == 0) {
words = 0;
for (xcp = builtins; xcp->keyword != NULL; xcp++) {
- if (*(xcp->keyword) != '?')
+ if (*(xcp->keyword) != '?' &&
+ words < COUNTOF(list))
list[words++] = xcp->keyword;
}
for (xcp = opcmds; xcp->keyword != NULL; xcp++)
- list[words++] = xcp->keyword;
+ if (words < COUNTOF(list))
+ list[words++] = xcp->keyword;
- qsort((void *)list, (size_t)words, sizeof(list[0]),
- helpsort);
+ qsort((void *)list, words, sizeof(list[0]), helpsort);
col = 0;
for (word = 0; word < words; word++) {
- length = strlen(list[word]);
+ length = strlen(list[word]);
col = max(col, length);
}
@@ -2226,8 +2183,8 @@ help(
for (row = 0; row < rows; row++) {
for (word = row; word < words; word += rows)
- fprintf(fp, "%-*.*s", col, col-1,
- list[word]);
+ fprintf(fp, "%-*.*s", (int)col,
+ (int)col - 1, list[word]);
fprintf(fp, "\n");
}
} else {
@@ -2275,6 +2232,8 @@ printusage(
{
register int i;
+ /* XXX: Do we need to warn about extra args here too? */
+
(void) fprintf(fp, "usage: %s", xcp->keyword);
for (i = 0; i < MAXARGS && xcp->arg[i] != NO; i++) {
if (xcp->arg[i] & OPT)
@@ -2369,27 +2328,19 @@ host(
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;
- }
+ else
+ goto no_change;
i = 1;
}
- if (openhost(pcmd->argval[i].string)) {
- (void) fprintf(fp, "current host set to %s\n", currenthost);
- numassoc = 0;
+ if (openhost(pcmd->argval[i].string, ai_fam_templ)) {
+ fprintf(fp, "current host set to %s\n", currenthost);
} else {
+ no_change:
if (havehost)
- (void) fprintf(fp,
- "current host remains %s\n",
- currenthost);
+ fprintf(fp, "current host remains %s\n",
+ currenthost);
else
- (void) fprintf(fp, "still no current host\n");
+ fprintf(fp, "still no current host\n");
}
}
@@ -2479,15 +2430,14 @@ passwd(
FILE *fp
)
{
- char *pass;
+ const 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");
+ info_auth_keyid = getkeyid("Keyid: ");
+ if (info_auth_keyid == 0) {
+ (void)fprintf(fp, "Keyid must be defined\n");
return;
}
- info_auth_keyid = u_keyid;
}
if (pcmd->nargs >= 1)
pass = pcmd->argval[0].string;
@@ -2498,7 +2448,8 @@ passwd(
return;
}
}
- authusekey(info_auth_keyid, info_auth_keytype, (u_char *)pass);
+ authusekey(info_auth_keyid, info_auth_keytype,
+ (const u_char *)pass);
authtrust(info_auth_keyid, 1);
}
@@ -2747,10 +2698,10 @@ atoascii(
size_t out_octets
)
{
- register const u_char * pchIn;
- const u_char * pchInLimit;
- register u_char * pchOut;
- register u_char c;
+ const u_char * pchIn;
+ const u_char * pchInLimit;
+ u_char * pchOut;
+ u_char c;
pchIn = (const u_char *)in;
pchInLimit = pchIn + in_octets;
@@ -2852,7 +2803,7 @@ asciize(
* "too long" -> "too l"
* Used for hostnames.
*/
-char *
+const char *
trunc_right(
const char * src,
size_t width
@@ -2861,7 +2812,7 @@ trunc_right(
size_t sl;
char * out;
-
+
sl = strlen(src);
if (sl > width && LIB_BUFLENGTH - 1 > width && width > 0) {
LIB_GETBUF(out);
@@ -2880,7 +2831,7 @@ trunc_right(
* "too long" -> "_long"
* Used for local IPv6 addresses, where low bits differentiate.
*/
-char *
+const char *
trunc_left(
const char * src,
size_t width
@@ -2924,10 +2875,10 @@ nextvar(
)
{
const char *cp;
- char *np;
+ const char *np;
const char *cpend;
- char *npend; /* character after last */
- int quoted = 0;
+ size_t srclen;
+ size_t len;
static char name[MAXVARLEN];
static char value[MAXVALLEN];
@@ -2939,39 +2890,33 @@ nextvar(
*/
while (cp < cpend && (*cp == ',' || isspace((int)*cp)))
cp++;
- if (cp == cpend)
+ 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';
+ srclen = strcspn(cp, ",=\r\n");
+ srclen = min(srclen, (size_t)(cpend - cp));
+ len = srclen;
+ while (len > 0 && isspace(cp[len - 1]))
+ len--;
+ if (len > 0)
+ memcpy(name, cp, len);
+ name[len] = '\0';
*vname = name;
+ cp += srclen;
/*
* 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++;
+ if (cp >= cpend || *cp == ',' || *cp == '\r' || *cp == '\n') {
+ if (cp < cpend)
+ cp++;
*datap = cp;
*datalen = cpend - cp;
- *vvalue = (char *)0;
+ *vvalue = NULL;
return 1;
}
@@ -2979,68 +2924,54 @@ nextvar(
* 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++) == '"');
+ while (cp < cpend && (isspace(*cp) && *cp != '\r' && *cp != '\n'))
+ cp++;
+ np = cp;
+ if ('"' == *np) {
+ do {
+ np++;
+ } while (np < cpend && '"' != *np);
+ if (np < cpend && '"' == *np)
+ np++;
+ } else {
+ while (np < cpend && ',' != *np && '\r' != *np)
+ np++;
}
-
- /*
- * 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;
+ len = np - cp;
+ if (np > cpend || len >= sizeof(value) ||
+ (np < cpend && ',' != *np && '\r' != *np))
+ return 0;
+ memcpy(value, cp, len);
/*
* Trim off any trailing whitespace
*/
- while (np > value && isspace((int)(*(np-1))))
- np--;
- *np = '\0';
+ while (len > 0 && isspace(value[len - 1]))
+ len--;
+ value[len] = '\0';
/*
* Return this. All done.
*/
- if (cp != cpend)
- cp++;
- *datap = cp;
- *datalen = cpend - cp;
+ if (np < cpend && ',' == *np)
+ np++;
+ *datap = np;
+ *datalen = cpend - np;
*vvalue = value;
return 1;
}
-/*
- * findvar - see if this variable is known to us.
- * If "code" is 1, return ctl_var->code.
- * Otherwise return the ordinal position of the found variable.
- */
-int
-findvar(
- char *varname,
- struct ctl_var *varlist,
- int code
- )
+u_short
+varfmt(const char * varname)
{
- register char *np;
- register struct ctl_var *vl;
+ u_int n;
- vl = varlist;
- np = varname;
- while (vl->fmt != EOV) {
- if (vl->fmt != PADDING && STREQ(np, vl->text))
- return (code)
- ? vl->code
- : (vl - varlist)
- ;
- vl++;
- }
- return 0;
-}
+ for (n = 0; n < COUNTOF(cookedvars); n++)
+ if (!strcmp(varname, cookedvars[n].varname))
+ return cookedvars[n].fmt;
+ return PADDING;
+}
/*
@@ -3130,8 +3061,8 @@ startoutput(void)
static void
output(
FILE *fp,
- char *name,
- char *value
+ const char *name,
+ const char *value
)
{
size_t len;
@@ -3194,7 +3125,7 @@ outputarr(
*/
for (i = (int)strlen(name); i < 11; i++)
*bp++ = ' ';
-
+
for (i = narr; i > 0; i--) {
if (i != narr)
*bp++ = ' ';
@@ -3237,7 +3168,7 @@ tstflags(
cp += strlen(cp);
cb -= strlen(cp);
if (!val) {
- strncat(cp, " ok", cb);
+ strlcat(cp, " ok", cb);
cp += strlen(cp);
cb -= strlen(cp);
} else {
@@ -3275,34 +3206,21 @@ cookedprint(
FILE *fp
)
{
- register int varid;
char *name;
char *value;
char output_raw;
int fmt;
- struct ctl_var *varlist;
l_fp lfp;
- long ival;
sockaddr_u hval;
u_long uval;
- l_fp lfparr[8];
int narr;
+ size_t len;
+ l_fp lfparr[8];
+ char b[12];
+ char bn[2 * MAXVARLEN];
+ char bv[2 * MAXVALLEN];
- switch (datatype) {
- case TYPE_PEER:
- varlist = peer_var;
- break;
- case TYPE_SYS:
- varlist = sys_var;
- break;
- case TYPE_CLOCK:
- varlist = clock_var;
- break;
- default:
- fprintf(stderr, "Unknown datatype(0x%x) in cookedprint\n",
- datatype);
- return;
- }
+ UNUSED_ARG(datatype);
if (!quiet)
fprintf(fp, "status=%04x %s,\n", status,
@@ -3310,146 +3228,94 @@ cookedprint(
startoutput();
while (nextvar(&length, &data, &name, &value)) {
- varid = findvar(name, varlist, 0);
- if (varid == 0) {
+ fmt = varfmt(name);
+ output_raw = 0;
+ switch (fmt) {
+
+ case PADDING:
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 (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;
+ break;
- case OC:
- if (!decodeuint(value, &uval))
- output_raw = '?';
- else {
- char b[12];
+ case TS:
+ if (!decodets(value, &lfp))
+ output_raw = '?';
+ else
+ output(fp, name, prettydate(&lfp));
+ break;
- (void) snprintf(b, sizeof 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 HA: /* fallthru */
+ 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 FX:
- if (!decodeuint(value, &uval))
- output_raw = '?';
+ case RF:
+ if (decodenetnum(value, &hval)) {
+ if (ISREFCLOCKADR(&hval))
+ output(fp, name,
+ refnumtoa(&hval));
else
- output(fp, name, tstflags(uval));
- break;
-
- default:
- (void) fprintf(stderr,
- "Internal error in cookedprint, %s=%s, fmt %d\n",
- name, value, fmt);
- break;
+ output(fp, name, stoa(&hval));
+ } else if (strlen(value) <= 4) {
+ output(fp, name, value);
+ } else {
+ output_raw = '?';
}
+ break;
+ case LP:
+ if (!decodeuint(value, &uval) || uval > 3) {
+ output_raw = '?';
+ } else {
+ b[0] = (0x2 & uval)
+ ? '1'
+ : '0';
+ b[1] = (0x1 & uval)
+ ? '1'
+ : '0';
+ b[2] = '\0';
+ output(fp, name, b);
+ }
+ break;
+
+ case OC:
+ if (!decodeuint(value, &uval)) {
+ output_raw = '?';
+ } else {
+ snprintf(b, sizeof(b), "%03lo", uval);
+ output(fp, name, b);
+ }
+ 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:
+ fprintf(stderr, "Internal error in cookedprint, %s=%s, fmt %d\n",
+ name, value, fmt);
+ output_raw = '?';
+ break;
}
- if (output_raw != 0) {
- char bn[401];
- char bv[401];
- int len;
+ if (output_raw != 0) {
atoascii(name, MAXVARLEN, bn, sizeof(bn));
- atoascii(value, MAXVARLEN, bv, sizeof(bv));
+ atoascii(value, MAXVALLEN, bv, sizeof(bv));
if (output_raw != '*') {
len = strlen(bv);
bv[len] = output_raw;
@@ -3469,8 +3335,8 @@ void
sortassoc(void)
{
if (numassoc > 1)
- qsort((void *)assoc_cache, (size_t)numassoc,
- sizeof(assoc_cache[0]), assoccmp);
+ qsort(assoc_cache, (size_t)numassoc,
+ sizeof(assoc_cache[0]), &assoccmp);
}
@@ -3495,6 +3361,28 @@ assoccmp(
/*
+ * grow_assoc_cache() - enlarge dynamic assoc_cache array
+ *
+ * The strategy is to add an assumed 4k page size at a time, leaving
+ * room for malloc() bookkeeping overhead equivalent to 4 pointers.
+ */
+void
+grow_assoc_cache(void)
+{
+ static size_t prior_sz;
+ size_t new_sz;
+
+ new_sz = prior_sz + 4 * 1024;
+ if (0 == prior_sz) {
+ new_sz -= 4 * sizeof(void *);
+ }
+ assoc_cache = erealloc_zero(assoc_cache, new_sz, prior_sz);
+ prior_sz = new_sz;
+ assoc_cache_slots = new_sz / sizeof(assoc_cache[0]);
+}
+
+
+/*
* ntpq_custom_opt_handler - autoopts handler for -c and -p
*
* By default, autoopts loses the relative order of -c and -p options
@@ -3509,12 +3397,12 @@ ntpq_custom_opt_handler(
)
{
switch (pOptDesc->optValue) {
-
+
default:
- fprintf(stderr,
+ fprintf(stderr,
"ntpq_custom_opt_handler unexpected option '%c' (%d)\n",
pOptDesc->optValue, pOptDesc->optValue);
- exit(-1);
+ exit(1);
case 'c':
ADDCMD(pOptDesc->pzLastArg);
diff --git a/ntpq/ntpq.h b/ntpq/ntpq.h
index 77d5ce7f9afb..ec2bcb98d3bb 100644
--- a/ntpq/ntpq.h
+++ b/ntpq/ntpq.h
@@ -1,11 +1,16 @@
/*
* ntpq.h - definitions of interest to ntpq
*/
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#include "ntp_fp.h"
#include "ntp.h"
-#include "ntp_control.h"
+#include "ntp_stdlib.h"
#include "ntp_string.h"
#include "ntp_malloc.h"
+#include "ntp_assert.h"
+#include "ntp_control.h"
#include "lib_strbuf.h"
/*
@@ -14,8 +19,34 @@
#define MAXARGS 4
/*
- * Flags for forming descriptors.
+ * Limit on packets in a single response. Increasing this value to
+ * 96 will marginally speed "mrulist" operation on lossless networks
+ * but it has been observed to cause loss on WiFi networks and with
+ * an IPv6 go6.net tunnel over UDP. That loss causes the request
+ * row limit to be cut in half, and it grows back very slowly to
+ * ensure forward progress is made and loss isn't triggered too quickly
+ * afterward. While the lossless case gains only marginally with
+ * MAXFRAGS == 96, the lossy case is a lot slower due to the repeated
+ * timeouts. Empirally, MAXFRAGS == 32 avoids most of the routine loss
+ * on both the WiFi and UDP v6 tunnel tests and seems a good compromise.
+ * This suggests some device in the path has a limit of 32 ~512 byte UDP
+ * packets in queue.
+ * Lowering MAXFRAGS may help with particularly lossy networks, but some
+ * ntpq commands may rely on the longtime value of 24 implicitly,
+ * assuming a single multipacket response will be large enough for any
+ * needs. In contrast, the "mrulist" command is implemented as a series
+ * of requests and multipacket responses to each.
*/
+#define MAXFRAGS 32
+
+/*
+ * Error codes for internal use
+ */
+#define ERR_UNSPEC 256
+#define ERR_INCOMPLETE 257
+#define ERR_TIMEOUT 258
+#define ERR_TOOMUCH 259
+
/*
* Flags for forming descriptors.
*/
@@ -27,12 +58,16 @@
#define NTP_INT 0x3 /* signed integer */
#define NTP_ADD 0x4 /* IP network address */
#define IP_VERSION 0x5 /* IP version */
+#define NTP_ADP 0x6 /* IP address and port */
+#define NTP_LFP 0x7 /* NTP timestamp */
+#define NTP_MODE 0x8 /* peer mode */
+#define NTP_2BIT 0x9 /* leap bits */
/*
* Arguments are returned in a union
*/
typedef union {
- char *string;
+ const char *string;
long ival;
u_long uval;
sockaddr_u netnum;
@@ -68,38 +103,52 @@ struct association {
u_short status;
};
-#define MAXASSOC 1024
+/*
+ * mrulist terminal status interval
+ */
+#define MRU_REPORT_SECS 5
/*
- * Structure for translation tables between text format
- * variable indices and text format.
+ * var_format is used to override cooked formatting for selected vars.
*/
-struct ctl_var {
- u_short code;
- u_short fmt;
- const char *text;
+typedef struct var_format_tag {
+ const char * varname;
+ u_short fmt;
+} var_format;
+
+typedef struct chost_tag chost;
+struct chost_tag {
+ const char *name;
+ int fam;
};
+extern chost chosts[];
+
extern int interactive; /* are we prompting? */
extern int old_rv; /* use old rv behavior? --old-rv */
+extern u_int assoc_cache_slots;/* count of allocated array entries */
+extern u_int numassoc; /* number of cached associations */
+extern u_int numhosts;
+extern void grow_assoc_cache(void);
extern void asciize (int, char *, FILE *);
extern int getnetnum (const char *, sockaddr_u *, char *, int);
extern void sortassoc (void);
extern void show_error_msg (int, associd_t);
-extern int doquery (int, associd_t, int, int, char *,
+extern int dogetassoc (FILE *);
+extern int doquery (int, associd_t, int, int, const char *,
u_short *, int *, const char **);
-extern int doqueryex (int, associd_t, int, int, char *,
+extern int doqueryex (int, associd_t, int, int, const char *,
u_short *, int *, const char **, int);
-extern char * nntohost (sockaddr_u *);
-extern char * nntohost_col (sockaddr_u *, size_t, int);
+extern const char * nntohost (sockaddr_u *);
+extern const char * nntohost_col (sockaddr_u *, size_t, int);
+extern const char * nntohostp (sockaddr_u *);
extern int decodets (char *, l_fp *);
extern int decodeuint (char *, u_long *);
extern int nextvar (int *, const char **, char **, char **);
extern int decodetime (char *, l_fp *);
extern void printvars (int, const char *, int, int, int, FILE *);
extern int decodeint (char *, long *);
-extern int findvar (char *, struct ctl_var *, int code);
extern void makeascii (int, const char *, FILE *);
-extern char * trunc_left (const char *, size_t);
-extern char * trunc_right (const char *, size_t);
+extern const char * trunc_left (const char *, size_t);
+extern const char * trunc_right(const char *, size_t);
diff --git a/ntpq/ntpq.html b/ntpq/ntpq.html
new file mode 100644
index 000000000000..e5119d5b3625
--- /dev/null
+++ b/ntpq/ntpq.html
@@ -0,0 +1,1814 @@
+<html lang="en">
+<head>
+<title>ntpq: Network Time Protocol Query User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpq: Network Time Protocol Query User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpq: Network Time Protocol Query User's Manual</h1>
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">ntpq: Network Time Protocol Query User Manual</a>
+</ul>
+</div>
+
+
+
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-Description">ntpq Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">ntpq: Network Time Protocol Query User Manual</h2>
+
+<p>The <code>ntpq</code> utility program is used to
+monitor the operational status
+and determine the performance of
+<code>ntpd</code>, the NTP daemon.
+
+ <p>This document applies to version 4.2.8 of <code>ntpq</code>.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
+<li><a accesskey="2" href="#ntpq-Invocation">ntpq Invocation</a>: Invoking ntpq
+<li><a accesskey="3" href="#Usage">Usage</a>
+<li><a accesskey="4" href="#Internal-Commands">Internal Commands</a>
+<li><a accesskey="5" href="#Control-Message-Commands">Control Message Commands</a>
+<li><a accesskey="6" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>
+<li><a accesskey="7" href="#System-Variables">System Variables</a>
+<li><a accesskey="8" href="#Peer-Variables">Peer Variables</a>
+<li><a accesskey="9" href="#Clock-Variables">Clock Variables</a>
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpq-Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Usage">Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>The <code>ntpq</code> utility program is used to monitor NTP daemon <code>ntpd</code> 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 variable names have changed and new ones added.
+The description on this page is for the NTPv4 variables.
+
+ <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 <code>ntpq</code> 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 <code>ntpq</code> 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, <code>ntpq</code> 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. <code>ntpq</code> will prompt for commands if the standard input is a terminal device.
+
+ <p><code>ntpq</code> 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. <code>ntpq</code> 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>Note that in contexts where a host name is expected, a <code>-4</code> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <code>-6</code> qualifier forces DNS resolution to the IPv6 namespace.
+
+ <p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.
+
+<div class="node">
+<p><hr>
+<a name="ntpq-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntpq</h3>
+
+<p><a name="index-ntpq-1"></a><a name="index-standard-NTP-query-program-2"></a>
+
+ <p>The
+<code>ntpq</code>
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+<code>ntpq</code>
+utility 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
+<code>ntpq</code>
+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,
+<code>ntpq</code>
+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.
+The
+<code>ntpq</code>
+utility will prompt for
+commands if the standard input is a terminal device.
+
+ <p><code>ntpq</code>
+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.
+The
+<code>ntpq</code>
+utility 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>Specifying a
+command line option other than
+<code>-i</code>
+or
+<code>-n</code>
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+<code>ntpq</code>
+will attempt to read
+interactive format commands from the standard input.
+
+<h5 class="subsubsection">Internal Commands</h5>
+
+<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.
+
+ <p>A
+number of interactive format commands are executed entirely within
+the
+<code>ntpq</code>
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+ <dl>
+<dt><code>?</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><br><dt><code>help</code> <code>[</code><kbd>command_keyword</kbd><code>]</code><dd>A
+?
+by itself will print a list of all the command
+keywords known to this incarnation of
+<code>ntpq</code>
+A
+?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+<code>ntpq</code>
+than this manual
+page.
+<br><dt><code>addvars</code> <kbd>variable_name</kbd><code>[=value]</code> <code>...</code><br><dt><code>rmvars</code> <kbd>variable_name</kbd> <code>...</code><br><dt><code>clearvars</code><br><dt><code>showvars</code><dd>The data carried by NTP mode 6 messages consists of a list of
+items of the form
+variable_name=value,
+where the
+=value
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+<code>ntpq</code>
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+<code>readlist</code>
+and
+<code>writelist</code>
+commands described below.
+The
+<code>addvars</code>
+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
+<code>rmvars</code>
+command can be used to remove individual variables from the list,
+while the
+<code>clearlist</code>
+command removes all variables from the
+list.
+The
+<code>showvars</code>
+command displays the current list of optional variables.
+<br><dt><code>authenticate</code> <code>[yes | no]</code><dd>Normally
+<code>ntpq</code>
+does not authenticate requests unless
+they are write requests.
+The command
+authenticate yes
+causes
+<code>ntpq</code>
+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
+<code>peer</code>
+display.
+The command
+authenticate
+causes
+<code>ntpq</code>
+to display whether or not
+<code>ntpq</code>
+is currently autheinticating requests.
+<br><dt><code>cooked</code><dd>Causes output from query commands to be "cooked", so that
+variables which are recognized by
+<code>ntpq</code>
+will have their
+values reformatted for human consumption.
+Variables which
+<code>ntpq</code>
+thinks should have a decodable value but didn't are
+marked with a trailing
+?.
+<br><dt><code>debug</code> <code>[more | less | off]</code><dd>With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+<br><dt><code>delay</code> <kbd>milliseconds</kbd><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.
+<br><dt><code>exit</code><dd>Exit
+<code>ntpq</code>
+<br><dt><code>host</code> <kbd>hostname</kbd><dd>Set the host to which future queries will be sent.
+<kbd>hostname</kbd>
+may be either a host name or a numeric address.
+<br><dt><code>hostnames</code> <code>[yes | no]</code><dd>If
+<code>yes</code>
+is specified, host names are printed in
+information displays.
+If
+<code>no</code>
+is specified, numeric
+addresses are printed instead.
+The default is
+<code>yes</code>,
+unless
+modified using the command line
+<code>-n</code>
+switch.
+<br><dt><code>keyid</code> <kbd>keyid</kbd><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.
+<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests.
+<code>md5</code>
+is alway supported.
+If
+<code>ntpq</code>
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+<code>keytype</code>
+is displayed.
+<br><dt><code>ntpversion</code> <code>[1 | 2 | 3 | 4]</code><dd>Sets the NTP version number which
+<code>ntpq</code>
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+<br><dt><code>passwd</code><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.
+<code>poll</code>
+<kbd>n</kbd>
+<code>verbose</code>
+<br><dt><code>quit</code><dd>Exit
+<code>ntpq</code>
+<br><dt><code>raw</code><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.
+<br><dt><code>timeout</code> <kbd>milliseconds</kbd><dd>Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+<code>ntpq</code>
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+<br><dt><code>version</code><dd>Print the version of the
+<code>ntpq</code>
+program.
+</dl>
+
+<h5 class="subsubsection">Control Message Commands</h5>
+
+<p>Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server and expect a single response message.
+The exceptions are the
+<code>peers</code>
+command, which sends a series of messages,
+and the
+<code>mreadlist</code>
+and
+<code>mreadvar</code>
+commands, which iterate over a range of associations.
+ <dl>
+<dt><code>associations</code><dd>Display a list of mobilized associations in the form:
+ <pre class="example"> ind assid status conf reach auth condition last_event cnt
+ </pre>
+ <dl>
+<dt>Sy String Ta Sy Description<br><dt><code>ind</code> <code>Ta</code> <code>index</code> <code>on</code> <code>this</code> <code>list</code><br><dt><code>assid</code> <code>Ta</code> <code>association</code> <code>ID</code><br><dt><code>status</code> <code>Ta</code> <code>peer</code> <code>status</code> <code>word</code><br><dt><code>conf</code> <code>Ta</code> <code>yes</code>: <code>persistent,</code> <code>no</code>: <code>ephemeral</code><br><dt><code>reach</code> <code>Ta</code> <code>yes</code>: <code>reachable,</code> <code>no</code>: <code>unreachable</code><br><dt><code>auth</code> <code>Ta</code> <code>ok</code>, <code>yes</code>, <code>bad</code> <code>and</code> <code>none</code><br><dt><code>condition</code> <code>Ta</code> <code>selection</code> <code>status</code> <code>(see</code> <code>the</code> <code>select</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>last_event</code> <code>Ta</code> <code>event</code> <code>report</code> <code>(see</code> <code>the</code> <code>event</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><br><dt><code>cnt</code> <code>Ta</code> <code>event</code> <code>count</code> <code>(see</code> <code>the</code> <code>count</code> <code>field</code> <code>of</code> <code>the</code> <code>peer</code> <code>status</code> <code>word)</code><dd></dl>
+ <br><dt><code>authinfo</code><dd>Display the authentication statistics.
+<br><dt><code>clockvar</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><br><dt><code>cv</code> <kbd>assocID</kbd> <code>[</code><kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]]</code> <code>[...]</code><dd>Display a list of clock variables for those associations supporting a reference clock.
+<br><dt><code>:config</code> <code>[...]</code><dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+<br><dt><code>config-from-file</code> <kbd>filename</kbd><dd>Send the each line of
+<kbd>filename</kbd>
+to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+<br><dt><code>ifstats</code><dd>Display statistics for each local network address. Authentication is required.
+<br><dt><code>iostats</code><dd>Display network and reference clock I/O statistics.
+<br><dt><code>kerninfo</code><dd>Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+<br><dt><code>lassociations</code><dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.
+<br><dt><code>lopeers</code> <code>[-4 | -6]</code><dd>Obtain and print a list of all peers and clients showing
+<kbd>dstadr</kbd>
+(associated with any given IP version).
+<br><dt><code>lpeers</code> <code>[-4 | -6]</code><dd>Print a peer spreadsheet for the appropriate IP version(s).
+<kbd>dstadr</kbd>
+(associated with any given IP version).
+<br><dt><code>monstats</code><dd>Display monitor facility statistics.
+<br><dt><code>mrulist</code> <code>[limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+<code>sort</code>=<kbd>sortorder</kbd>,
+the options filter the list returned by
+<code>ntpd.</code>
+The
+<code>limited</code>
+and
+<code>kod</code>
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+<code>mincount</code>=<kbd>count</kbd>
+option filters entries representing less than
+<kbd>count</kbd>
+packets.
+The
+<code>laddr</code>=<kbd>localaddr</kbd>
+option filters entries for packets received on any local address other than
+<kbd>localaddr</kbd>.
+<code>resany</code>=<kbd>hexmask</kbd>
+and
+<code>resall</code>=<kbd>hexmask</kbd>
+filter entries containing none or less than all, respectively, of the bits in
+<kbd>hexmask</kbd>,
+which must begin with
+<code>0x</code>.
+The
+<kbd>sortorder</kbd>
+defaults to
+<code>lstint</code>
+and may be any of
+<code>addr</code>,
+<code>count</code>,
+<code>avgint</code>,
+<code>lstint</code>,
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+ <dl>
+<dt>Column<dd>Description
+<br><dt><code>lstint</code><dd>Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+<code>ntpq</code>
+<br><dt><code>avgint</code><dd>Average interval in s between packets from this address.
+<br><dt><code>rstr</code><dd>Restriction flags associated with this address.
+Most are copied unchanged from the matching
+<code>restrict</code>
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+<br><dt><code>r</code><dd>Rate control indicator, either
+a period,
+<code>L</code>
+or
+<code>K</code>
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+<br><dt><code>m</code><dd>Packet mode.
+<br><dt><code>v</code><dd>Packet version number.
+<br><dt><code>count</code><dd>Packets received from this address.
+<br><dt><code>rport</code><dd>Source port of last packet from this address.
+<br><dt><code>remote</code> <code>address</code><dd>DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+</dl>
+ <br><dt><code>mreadvar</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><br><dt><code>mrv</code> <code>assocID</code> <code>assocID</code> <code>[</code><kbd>variable_name</kbd><code>[=</code><kbd>value</kbd><code>] ...]</code><dd>Perform the same function as the
+<code>readvar</code>
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+<code>associations</code>
+command.
+<br><dt><code>opeers</code> <code>[-4 | -6]</code><dd>Obtain and print the old-style list of all peers and clients showing
+<kbd>dstadr</kbd>
+(associated with any given IP version),
+rather than the
+<kbd>refid</kbd>.
+<br><dt><code>passociations</code><dd>Perform the same function as the
+<code>associations</code>
+command,
+except that it uses previously stored data rather than making a new query.
+<br><dt><code>peers</code><dd>Display a list of peers in the form:
+ <pre class="example"> [tally]remote refid st t when pool reach delay offset jitter
+ </pre>
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>[tally]</code><dd>single-character code indicating current value of the
+<code>select</code>
+field of the
+.Lk decode.html#peer "peer status word"
+<br><dt><code>remote</code><dd>host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+<code>-w</code>
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+<br><dt><code>refid</code><dd>association ID or
+.Lk decode.html#kiss "'kiss code"
+<br><dt><code>st</code><dd>stratum
+<br><dt><code>t</code><dd><code>u</code>:
+unicast or manycast client,
+<code>b</code>:
+broadcast or multicast client,
+<code>l</code>:
+local (reference clock),
+<code>s</code>:
+symmetric (peer),
+<code>A</code>:
+manycast server,
+<code>B</code>:
+broadcast server,
+<code>M</code>:
+multicast server
+<br><dt><code>when</code><dd>sec/min/hr since last received packet
+<br><dt><code>poll</code><dd>poll interval (log2 s)
+<br><dt><code>reach</code><dd>reach shift register (octal)
+<br><dt><code>delay</code><dd>roundtrip delay
+<br><dt><code>offset</code><dd>offset of server relative to this host
+<br><dt><code>jitter</code><dd>jitter
+</dl>
+ <br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
+<kbd>assocID</kbd>.
+<br><dt><code>readlist</code> <kbd>assocID</kbd><br><dt><code>rl</code> <kbd>assocID</kbd><dd>Read the system or peer variables included in the variable list.
+<br><dt><code>readvar</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><br><dt><code>rv</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><dd>Display the specified variables.
+If
+<kbd>assocID</kbd>
+is zero, the variables are from the
+<a href="#System-Variables">System Variables</a>
+name space, otherwise they are from the
+<a href="#Peer-Variables">Peer Variables</a>
+name space.
+The
+<kbd>assocID</kbd>
+is required, as the same name can occur in both spaces.
+If no
+<kbd>name</kbd>
+is included, all operative variables in the name space are displayed.
+
+ <p>In this case only, if the
+<kbd>assocID</kbd>
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+<br><dt><code>reslist</code><dd>Show the access control (restrict) list for
+<code>ntpq</code>
+
+ <br><dt><code>saveconfig</code> <kbd>filename</kbd><dd>Write the current configuration,
+including any runtime modifications given with
+<code>:config</code>
+or
+<code>config-from-file</code>,
+to the ntpd host's file
+<kbd>filename</kbd>.
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+<code>ntpd</code>
+configuration file.
+<kbd>filename</kbd>
+can use
+<code>strftime()</code>
+format specifies to substitute the current date and time, for example,
+<code>q]saveconfig</code> <code>ntp-%Y%m%d-%H%M%S.confq]</code>.
+The filename used is stored in system variable
+<code>savedconfig</code>.
+Authentication is required.
+<br><dt><code>timerstats</code><dd>Display interval timer counters.
+<br><dt><code>writelist</code> <kbd>assocID</kbd><dd>Write the system or peer variables included in the variable list.
+<br><dt><code>writevar</code> <kbd>assocID</kbd> <kbd>name</kbd>=<kbd>value</kbd> <code>[, ...]</code><dd>Write the specified variables.
+If the
+<kbd>assocID</kbd>
+is zero, the variables are from the
+<a href="#System-Variables">System Variables</a>
+name space, otherwise they are from the
+<a href="#Peer-Variables">Peer Variables</a>
+name space.
+The
+<kbd>assocID</kbd>
+is required, as the same name can occur in both spaces.
+<br><dt><code>sysinfo</code><dd>Display operational summary.
+<br><dt><code>sysstats</code><dd>Print statistics counters maintained in the protocol module.
+</dl>
+
+<h5 class="subsubsection">Status Words and Kiss Codes</h5>
+
+<p>The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per-association basis.
+These words are displayed in the
+<code>rv</code>
+and
+<code>as</code>
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+
+ <p>Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss-o'-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+
+<h5 class="subsubsection">System Variables</h5>
+
+<p>The following system variables appear in the
+<code>rv</code>
+billboard.
+Not all variables are displayed in some configurations.
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>status</code><dd>.Lk decode.html#sys "system status word"
+<br><dt><code>version</code><dd>NTP software version and build time
+<br><dt><code>processor</code><dd>hardware platform and version
+<br><dt><code>system</code><dd>operating system and version
+<br><dt><code>leap</code><dd>leap warning indicator (0-3)
+<br><dt><code>stratum</code><dd>stratum (1-15)
+<br><dt><code>precision</code><dd>precision (log2 s)
+<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
+<br><dt><code>rootdisp</code><dd>total dispersion to the primary reference clock
+<br><dt><code>peer</code><dd>system peer association ID
+<br><dt><code>tc</code><dd>time constant and poll exponent (log2 s) (3-17)
+<br><dt><code>mintc</code><dd>minimum time constant (log2 s) (3-10)
+<br><dt><code>clock</code><dd>date and time of day
+<br><dt><code>refid</code><dd>reference ID or
+.Lk decode.html#kiss "kiss code"
+<br><dt><code>reftime</code><dd>reference time
+<br><dt><code>offset</code><dd>combined offset of server relative to this host
+<br><dt><code>sys_jitter</code><dd>combined system jitter
+<br><dt><code>frequency</code><dd>frequency offset (PPM) relative to hardware clock
+<br><dt><code>clk_wander</code><dd>clock frequency wander (PPM)
+<br><dt><code>clk_jitter</code><dd>clock jitter
+<br><dt><code>tai</code><dd>TAI-UTC offset (s)
+<br><dt><code>leapsec</code><dd>NTP seconds when the next leap second is/was inserted
+<br><dt><code>expire</code><dd>NTP seconds when the NIST leapseconds file expires
+</dl>
+ The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+
+ <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 Autokey dance:
+
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>host</code><dd>Autokey host name for this host
+<br><dt><code>ident</code><dd>Autokey group name for this host
+<br><dt><code>flags</code><dd>host flags (see Autokey specification)
+<br><dt><code>digest</code><dd>OpenSSL message digest algorithm
+<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
+<br><dt><code>update</code><dd>NTP seconds at last signature update
+<br><dt><code>cert</code><dd>certificate subject, issuer and certificate flags
+<br><dt><code>until</code><dd>NTP seconds when the certificate expires
+</dl>
+
+<h5 class="subsubsection">Peer Variables</h5>
+
+<p>The following peer variables appear in the
+<code>rv</code>
+billboard for each association.
+Not all variables are displayed in some configurations.
+
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>associd</code><dd>association ID
+<br><dt><code>status</code><dd>.Lk decode.html#peer "peer status word"
+<br><dt><code>srcadr</code><dd>source (remote) IP address
+<br><dt><code>srcport</code><dd>source (remote) port
+<br><dt><code>dstadr</code><dd>destination (local) IP address
+<br><dt><code>dstport</code><dd>destination (local) port
+<br><dt><code>leap</code><dd>leap indicator (0-3)
+<br><dt><code>stratum</code><dd>stratum (0-15)
+<br><dt><code>precision</code><dd>precision (log2 s)
+<br><dt><code>rootdelay</code><dd>total roundtrip delay to the primary reference clock
+<br><dt><code>rootdisp</code><dd>total root dispersion to the primary reference clock
+<br><dt><code>refid</code><dd>reference ID or
+.Lk decode.html#kiss "kiss code"
+<br><dt><code>reftime</code><dd>reference time
+<br><dt><code>reach</code><dd>reach register (octal)
+<br><dt><code>unreach</code><dd>unreach counter
+<br><dt><code>hmode</code><dd>host mode (1-6)
+<br><dt><code>pmode</code><dd>peer mode (1-5)
+<br><dt><code>hpoll</code><dd>host poll exponent (log2 s) (3-17)
+<br><dt><code>ppoll</code><dd>peer poll exponent (log2 s) (3-17)
+<br><dt><code>headway</code><dd>headway (see
+.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
+<br><dt><code>flash</code><dd>.Lk decode.html#flash "flash status word"
+<br><dt><code>offset</code><dd>filter offset
+<br><dt><code>delay</code><dd>filter delay
+<br><dt><code>dispersion</code><dd>filter dispersion
+<br><dt><code>jitter</code><dd>filter jitter
+<br><dt><code>ident</code><dd>Autokey group name for this association
+<br><dt><code>bias</code><dd>unicast/broadcast bias
+<br><dt><code>xleave</code><dd>interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+</dl>
+ The
+<code>bias</code>
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+<code>xleave</code>
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+
+ <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>flags</code><dd>peer flags (see Autokey specification)
+<br><dt><code>host</code><dd>Autokey server name
+<br><dt><code>flags</code><dd>peer flags (see Autokey specification)
+<br><dt><code>signature</code><dd>OpenSSL digest/signature scheme
+<br><dt><code>initsequence</code><dd>initial key ID
+<br><dt><code>initkey</code><dd>initial key index
+<br><dt><code>timestamp</code><dd>Autokey signature timestamp
+</dl>
+
+<h5 class="subsubsection">Clock Variables</h5>
+
+<p>The following clock variables appear in the
+<code>cv</code>
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+ <dl>
+<dt>Variable<dd>Description
+<br><dt><code>associd</code><dd>association ID
+<br><dt><code>status</code><dd>.Lk decode.html#clock "clock status word"
+<br><dt><code>device</code><dd>device description
+<br><dt><code>timecode</code><dd>ASCII time code string (specific to device)
+<br><dt><code>poll</code><dd>poll messages sent
+<br><dt><code>noreply</code><dd>no reply
+<br><dt><code>badformat</code><dd>bad format
+<br><dt><code>baddata</code><dd>bad date or time
+<br><dt><code>fudgetime1</code><dd>fudge time 1
+<br><dt><code>fudgetime2</code><dd>fudge time 2
+<br><dt><code>stratum</code><dd>driver stratum
+<br><dt><code>refid</code><dd>driver reference ID
+<br><dt><code>flags</code><dd>driver flags
+</dl>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpq</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpq-usage">ntpq usage</a>: ntpq help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntpq-ipv4">ntpq ipv4</a>: ipv4 option (-4)
+<li><a accesskey="3" href="#ntpq-ipv6">ntpq ipv6</a>: ipv6 option (-6)
+<li><a accesskey="4" href="#ntpq-command">ntpq command</a>: command option (-c)
+<li><a accesskey="5" href="#ntpq-interactive">ntpq interactive</a>: interactive option (-i)
+<li><a accesskey="6" href="#ntpq-numeric">ntpq numeric</a>: numeric option (-n)
+<li><a accesskey="7" href="#ntpq-old_002drv">ntpq old-rv</a>: old-rv option
+<li><a accesskey="8" href="#ntpq-peers">ntpq peers</a>: peers option (-p)
+<li><a accesskey="9" href="#ntpq-wide">ntpq wide</a>: wide option (-w)
+<li><a href="#ntpq-config">ntpq config</a>: presetting/configuring ntpq
+<li><a href="#ntpq-exit-status">ntpq exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpq-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-ipv4">ntpq ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpq help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntpq-help-3"></a>
+This is the automatically generated usage text for ntpq.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.7p486-RC
+Usage: ntpq [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -c Str command run a command and exit
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -i no interactive Force ntpq to operate in interactive mode
+ - prohibits these options:
+ command
+ peers
+ -n no numeric numeric host addresses
+ no old-rv Always output status line with readvar
+ -p no peers Print a list of the peers
+ - prohibits the option 'interactive'
+ -w no wide Display the full 'remote' value
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -&gt; opt save-opts save the option state to a config file
+ -&lt; Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTPQ_*
+
+Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntpq-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-ipv6">ntpq ipv6</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-usage">ntpq usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv4 option (-4)</h4>
+
+<p><a name="index-ntpq_002dipv4-4"></a>
+This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpq-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-command">ntpq command</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-ipv4">ntpq ipv4</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv6 option (-6)</h4>
+
+<p><a name="index-ntpq_002dipv6-5"></a>
+This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv4.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+<div class="node">
+<p><hr>
+<a name="ntpq-command"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-interactive">ntpq interactive</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-ipv6">ntpq ipv6</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">command option (-c)</h4>
+
+<p><a name="index-ntpq_002dcommand-6"></a>
+This is the &ldquo;run a command and exit&rdquo; option.
+This option takes a string argument <span class="file">cmd</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>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).
+<div class="node">
+<p><hr>
+<a name="ntpq-interactive"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-numeric">ntpq numeric</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-command">ntpq command</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">interactive option (-i)</h4>
+
+<p><a name="index-ntpq_002dinteractive-7"></a>
+This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+command, peers.
+</ul>
+
+ <p>Force <code>ntpq</code> to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+<div class="node">
+<p><hr>
+<a name="ntpq-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-old_002drv">ntpq old-rv</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-interactive">ntpq interactive</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">numeric option (-n)</h4>
+
+<p><a name="index-ntpq_002dnumeric-8"></a>
+This is the &ldquo;numeric host addresses&rdquo; option.
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+<div class="node">
+<p><hr>
+<a name="ntpq-old_002drv"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-peers">ntpq peers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-numeric">ntpq numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">old-rv option</h4>
+
+<p><a name="index-ntpq_002dold_002drv-9"></a>
+This is the &ldquo;always output status line with readvar&rdquo; option.
+By default, <code>ntpq</code> now suppresses the <code>associd=...</code>
+line that precedes the output of <code>readvar</code>
+(alias <code>rv</code>) when a single variable is requested, such as
+<code>ntpq -c "rv 0 offset"</code>.
+This option causes <code>ntpq</code> to include both lines of output
+for a single-variable <code>readvar</code>.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer <code>ntpq</code> to behave identically in this regard.
+<div class="node">
+<p><hr>
+<a name="ntpq-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-wide">ntpq wide</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-old_002drv">ntpq old-rv</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">peers option (-p)</h4>
+
+<p><a name="index-ntpq_002dpeers-10"></a>
+This is the &ldquo;print a list of the peers&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+interactive.
+</ul>
+
+ <p>Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+<div class="node">
+<p><hr>
+<a name="ntpq-wide"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-config">ntpq config</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-peers">ntpq peers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">wide option (-w)</h4>
+
+<p><a name="index-ntpq_002dwide-11"></a>
+This is the &ldquo;display the full 'remote' value&rdquo; option.
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+
+<div class="node">
+<p><hr>
+<a name="ntpq-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpq-exit-status">ntpq exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-wide">ntpq wide</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">presetting/configuring ntpq</h4>
+
+<p>Any option that is not marked as <i>not presettable</i> may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPQ</code> and <code>NTPQ_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
+the options listed above in upper case and segmented with underscores.
+The <code>NTPQ</code> variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
+ <ul>
+<li>$HOME
+<li>$PWD
+</ul>
+ The environment variables <code>HOME</code>, and <code>PWD</code>
+are expanded and replaced when <span class="file">ntpq</span> runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+within that directory and processed.
+
+ <p>Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+ <p>Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+<pre class="example"> [NTPQ]
+</pre>
+ <p class="noindent">or by
+<pre class="example"> &lt;?program ntpq&gt;
+</pre>
+ <p class="noindent">Do not mix these styles within one configuration file.
+
+ <p>Compound values and carefully constructed string values may also be
+specified using XML syntax:
+<pre class="example"> &lt;option-name&gt;
+ &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
+ &lt;/option-name&gt;
+</pre>
+ <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
+<pre class="example"> "...&lt;...&gt;..."
+</pre>
+ <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
+hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+ <p>The command line options relating to configuration and/or usage help are:
+
+<h5 class="subsubheading">version (-)</h5>
+
+<p>Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+ <dl>
+<dt><span class="samp">version</span><dd>Only print the version. This is the default.
+<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
+<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</dl>
+
+<div class="node">
+<p><hr>
+<a name="ntpq-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-config">ntpq config</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpq-Invocation">ntpq Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntpq exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
+<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+</dl>
+
+<div class="node">
+<p><hr>
+<a name="Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Internal-Commands">Internal Commands</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpq-Description">ntpq Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Usage</h3>
+
+<p><table summary=""><tr align="left"><th valign="top" width="23%">What </th><th valign="top" width="23%">Default </th><th valign="top" width="5%">Flag </th><th valign="top" width="15%">Option
+<br></th></tr><tr align="left"><td valign="top" width="23%">configuration file
+</td><td valign="top" width="23%"><code>/etc/ntp.conf</code>
+</td><td valign="top" width="5%"><code>-c</code>
+</td><td valign="top" width="15%"><code>conffile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">frequency file
+</td><td valign="top" width="23%">none
+</td><td valign="top" width="5%"><code>-f</code>
+</td><td valign="top" width="15%"><code>driftfile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">leapseconds file
+</td><td valign="top" width="23%">none
+</td><td valign="top" width="5%">
+</td><td valign="top" width="15%"><code>leapfile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">process ID file
+</td><td valign="top" width="23%">none
+</td><td valign="top" width="5%"><code>-p</code>
+</td><td valign="top" width="15%"><code>pidfile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">log file
+</td><td valign="top" width="23%">system log
+</td><td valign="top" width="5%"><code>-l</code>
+</td><td valign="top" width="15%"><code>logfile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">include file
+</td><td valign="top" width="23%">none
+</td><td valign="top" width="5%">none
+</td><td valign="top" width="15%"><code>includefile</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">statistics path
+</td><td valign="top" width="23%"><code>/var/NTP</code>
+</td><td valign="top" width="5%"><code>-s</code>
+</td><td valign="top" width="15%"><code>statsdir</code>
+<br></td></tr><tr align="left"><td valign="top" width="23%">keys path
+</td><td valign="top" width="23%"><code>/usr/local/etc</code>
+</td><td valign="top" width="5%"><code>-k</code>
+</td><td valign="top" width="15%"><code>keysdir</code>
+<br></td></tr></table>
+
+<div class="node">
+<p><hr>
+<a name="Internal-Commands"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Control-Message-Commands">Control Message Commands</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Usage">Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Internal Commands</h3>
+
+<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 <code>&gt;</code>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <code>ntpq</code> program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.
+
+ <dl>
+<dt><code><a name="help"></a> ? [</code><kbd>command_keyword</kbd><code>]</code><dt><code>help [</code><kbd>command_keyword</kbd><code>]</code><dd>A <code>?</code> by itself will print a list of all the command keywords known to <code>ntpq</code>. A <code>?</code> followed by a command keyword will print function and usage information about the command.
+
+ <br><dt><code><a name="addvars"></a> &gt;addvars </code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code>] [...]</code><dt><code>rmvars </code><kbd>name</kbd><code> [...]</code><dt><code>clearvars&lt;/dt&gt;</code><dd>The arguments to these commands consist of a list of items of the form
+<kbd>name</kbd><code> = </code><kbd>value</kbd>, where the <code>= </code><kbd>value</kbd> is ignored,
+and can be omitted in read requests.
+<code>ntpq</code> maintains an internal list in which data to be included
+in control messages can be assembled, and sent using the <code>readlist</code>
+and <code>writelist</code> commands described below.
+The <code>addvars</code> command allows variables and 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 <code>rmvars</code> command can be used to remove individual variables
+from the list,
+while the <code>clearlist</code> command removes all variables from the list.
+
+ <br><dt><code><a name="cooked"></a> cooked</code><dd>Display server messages in prettyprint format.
+
+ <br><dt><code><a name="debug"></a> debug more | less | off</code><dd>Turns internal query program debugging on and off.
+
+ <br><dt><code><a name="delay"></a> delay </code><kbd>milliseconds</kbd><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.
+
+ <br><dt><code><a name="host"></a> host </code><kbd>name</kbd><dd>Set the host to which future queries will be sent.
+The name may be either a DNS name or a numeric address.
+
+ <br><dt><code><a name="hostnames"></a> hostnames [yes | no]</code><dd>If <code>yes</code> is specified, host names are printed in information displays.
+If <code>no</code> is specified, numeric addresses are printed instead.
+The default is <code>yes</code>,
+unless modified using the command line <code>-n</code> switch.
+
+ <br><dt><code><a name="keyid"></a> keyid </code><kbd>keyid</kbd><dd>This command specifies the key number to be used
+to authenticate configuration requests.
+This must correspond to a key ID configured in <code>ntp.conf</code> for this purpose.
+
+ <br><dt><code><a name="keytype"></a> keytype</code><dd>Specify the digest algorithm to use for authenticated requests,
+with default <code>MD5</code>.
+If the OpenSSL library is installed,
+digest can be be any message digest algorithm supported by the library.
+The current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
+
+ <br><dt><code><a name="ntpversion"></a> ntpversion 1 | 2 | 3 | 4</code><dd>Sets the NTP version number which <code>ntpq</code> claims in packets.
+Defaults to 2.
+Note that mode-6 control messages (and modes, for that matter)
+didn't exist in NTP version 1.
+
+ <br><dt><code><a name="passwd"></a> passwd</code><dd>This command prompts for a password to authenticate requests.
+The password must correspond to the key ID configured in <code>ntp.conf</code> for this purpose.
+
+ <br><dt><code><a name="quit"></a> quit</code><dd>Exit <code>ntpq</code>.
+
+ <br><dt><code><a name="raw"></a> raw</code><dd>Display server messages as received and without reformatting.
+
+ <br><dt><code><a name="timeout"></a> timeout </code><kbd>millseconds</kbd><dd>Specify a timeout period for responses to server queries.
+The default is about 5000 milliseconds.
+Note that since <code>ntpq</code> retries each query once after a timeout
+the total waiting time for a timeout will be twice the timeout value set.
+
+ </dl>
+
+<div class="node">
+<p><hr>
+<a name="Control-Message-Commands"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Internal-Commands">Internal Commands</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Control Message Commands</h3>
+
+<p>Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space,
+while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server
+and expect a single response message.
+The exceptions are the <code>peers</code> command,
+which sends a series of messages,
+and the <code>mreadlist</code> and <code>mreadvar</code> commands,
+which iterate over a range of associations.
+
+ <p><a name="as"></a>
+ <dl>
+<dt><code>associations</code><dd>Display a list of mobilized associations in the form:
+<br>
+<code>ind assid status conf reach auth condition last_event cnt</code>
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="40%">Description
+
+ <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>ind</code>
+</td><td valign="top" width="40%">index on this list
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>assid</code>
+</td><td valign="top" width="40%">association ID
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
+</td><td valign="top" width="40%"><a href="decode.html#peer">peer status word</a>
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>conf</code>
+</td><td valign="top" width="40%"><code>yes</code>: persistent, <code>no</code>: ephemeral
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
+</td><td valign="top" width="40%"><code>yes</code>: reachable, <code>no</code>: unreachable
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>auth</code>
+</td><td valign="top" width="40%"><code>ok</code>, <code>yes</code>, <code>bad</code> and <code>none</code>
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>condition</code>
+</td><td valign="top" width="40%">selection status (see the <code>select</code> field of the <a href="decode.html#peer">peer status word</a>)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>last_event</code>
+</td><td valign="top" width="40%">event report (see the <code>event</code> field of the <a href="decode.html#peer">peer status word</a>)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cnt</code>
+event count (see the <code>count</code> field of the <a href="decode.html#peer">peer status word</a>)
+
+ <br></td></tr></table>
+
+ <br><dt><code><a name="cv"></a> clockvar </code><kbd>assocID</kbd><code> [</code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> [...]] [...]]</code><dt><code>cv </code><kbd>assocID</kbd><code> [</code><kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> [...] ][...]]</code><dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock.
+
+ <br><dt><code><a name="_003aconfig"></a> :config [...]</code><dd>Send the remainder of the command line, including whitespace, to the server
+as a run-time configuration command in the same format
+as the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+
+ <br><dt><code><a name="config_002dfrom_002dfile"></a> config-from-file </code><kbd>filename</kbd><dd>Send the each line of <kbd>filename</kbd> to the server as
+run-time configuration commands in the same format as the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
+
+ <br><dt><code><a name="ifstats"></a> ifstats</code><dd>Display statistics for each local network address.
+Authentication is required.
+
+ <br><dt><code><a name="iostats"></a> iostats</code><dd>Display network and reference clock I/O statistics.
+
+ <br><dt><code><a name="kerninfo"></a> kerninfo</code><dd>Display kernel loop and PPS statistics.
+As with other ntpq output, times are in milliseconds.
+The precision value displayed is in milliseconds as well,
+unlike the precision system variable.
+
+ <br><dt><code><a name="lassoc"></a> lassociations</code><dd>Perform the same function as the associations command,
+except display mobilized and unmobilized associations.
+
+ <br><dt><code><a name="monstats"></a> monstats</code><dd>Display monitor facility statistics.
+
+ <br><dt><code><a name="mrulist"></a> mrulist [limited | kod | mincount=</code><kbd>count</kbd><code> | laddr=</code><kbd>localaddr</kbd><code> | sort=</code><kbd>sortorder</kbd><code> | resany=</code><kbd>hexmask</kbd><code> | resall=</code><kbd>hexmask</kbd><code>]</code><dd>Obtain and print traffic counts collected and maintained by
+the monitor facility.
+With the exception of <code>sort=</code><kbd>sortorder</kbd>,
+the options filter the list returned by <code>ntpd</code>.
+The <code>limited</code> and <code>kod</code> options return only entries
+representing client addresses from which the last packet received
+triggered either discarding or a KoD response.
+The <code>mincount=</code><kbd>count</kbd> option filters entries representing
+less than <kbd>count</kbd> packets.
+The <code>laddr=</code><kbd>localaddr</kbd> option filters entries for packets
+received on any local address other than <kbd>localaddr</kbd>.
+<code>resany=</code><kbd>hexmask</kbd> and <code>resall=</code><kbd>hexmask</kbd>
+filter entries containing none or less than all, respectively,
+of the bits in <kbd>hexmask</kbd>, which must begin with <code>0x</code>.
+<br>
+The <kbd>sortorder</kbd> defaults to <code>lstint</code> and may be any of
+<code>addr</code>, <code>count</code>, <code>avgint</code>, <code>lstint</code>, or
+any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Column </th><th valign="top" width="40%">Description
+
+ <p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>lstint</code>
+</td><td valign="top" width="40%">
+Interval in s between the receipt of the most recent packet from this
+address and the completion of the retrieval of the MRU list by <code>ntpq</code>
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>avgint</code>
+</td><td valign="top" width="40%">
+Average interval in s between packets from this address.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rstr</code>
+</td><td valign="top" width="40%">
+Restriction flags associated with this address.
+Most are copied unchanged from the matching <code>restrict</code> command,
+however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>r</code>
+</td><td valign="top" width="40%">
+Rate control indicator, either a period, <code>L</code> or <code>K</code> for
+no rate control response, rate limiting by discarding, or
+rate limiting with a KoD response, respectively.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>m</code>
+</td><td valign="top" width="40%">
+Packet mode.
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>v</code>
+</td><td valign="top" width="40%">
+Packet version number.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>count</code>
+</td><td valign="top" width="40%">
+Packets received from this address.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rport</code>
+</td><td valign="top" width="40%">
+Source port of last packet from this address.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote address</code>
+</td><td valign="top" width="40%">
+DNS name, numeric address, or address followed by claimed DNS name which
+could not be verified in parentheses.
+
+ <br></td></tr></table>
+
+ <br><dt><code><a name="mreadvar"></a> mreadvar </code><kbd>assocID</kbd> <kbd>assocID</kbd><code> [ </code><kbd>variable_name</kbd><code> [ = </code><kbd>value</kbd><code>[ ... ]</code><dt><code><a name="mrv"></a> mrv </code><kbd>assocID</kbd> <kbd>assocID</kbd><code> [ </code><kbd>variable_name</kbd><code> [ = </code><kbd>value</kbd><code>[ ... ]</code><dd>Perform the same function as the <code>readvar</code> command,
+except for a range of association IDs.
+This range is determined from the association list cached by
+the most recent <code>associations</code> command.
+
+ <br><dt><code><a name="passoc"></a> passociations</code><dd>Perform the same function as the <code>associations command</code>, except that
+it uses previously stored data rather than making a new query.
+
+ <br><dt><code><a name="pe"></a> peers</code><dd>Display a list of peers in the form:
+<br>
+<code>[tally]remote refid st t when pool reach delay offset jitter</code>
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+<br></th></tr><tr align="left"><td valign="top" width="10%"><code>[tally]</code>
+</td><td valign="top" width="20%">
+single-character code indicating current value of the <code>select</code> field
+of the <a href="decode.html#peer">peer status word</a>.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>remote</code>
+</td><td valign="top" width="20%">
+host name (or IP number) of peer
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
+</td><td valign="top" width="20%">
+association ID or <a href="decode.html#kiss">kiss code</a>.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>st</code>
+</td><td valign="top" width="20%">
+stratum
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>t</code>
+</td><td valign="top" width="20%">
+<code>u</code>: unicast or manycast client,
+<code>b</code>: broadcast or multicast client,
+<code>l</code>: local (reference clock),
+<code>s</code>: symmetric (peer),
+<code>A</code>: manycast server,
+<code>B</code>: broadcast server,
+<code>M</code>: multicast server.
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>when</code>
+</td><td valign="top" width="20%">
+sec/min/hr since last received packet
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
+</td><td valign="top" width="20%">
+poll interval (log(2) s)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
+</td><td valign="top" width="20%">
+reach shift register (octal)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
+</td><td valign="top" width="20%">
+roundtrip delay
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
+</td><td valign="top" width="20%">
+offset of server relative to this host
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
+</td><td valign="top" width="20%">
+jitter
+
+ <br></td></tr></table>
+
+ <br><dt><code><a name="rv"></a> readvar </code><kbd>assocID</kbd> <kbd>name</kbd><code> [ = </code><kbd>value</kbd><code> ] [,...]</code><dt><code>rv </code><kbd>assocID</kbd><code> [ </code><kbd>name</kbd><code> ] [,...]</code><dd>Display the specified variables.
+If <kbd>assocID</kbd> is zero,
+the variables are from the <a href="#system">system variables</a> name space,
+otherwise they are from the <a href="#peer">peer variables</a> name space.
+The <kbd>assocID</kbd> is required, as the same name can occur in both spaces.
+If no <kbd>name</kbd> is included,
+all operative variables in the name space are displayed.
+In this case only, if the <kbd>assocID</kbd> is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds and
+frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format YYYYMMDDTTTT,
+where YYYY is the year, MM the month of year, DD the day of month and
+TTTT the time of day.
+
+ <br><dt><code><a name="saveconfig"></a> saveconfig </code><kbd>filename</kbd><dd>Write the current configuration, including any runtime modifications
+given with <code>:config</code> or <code>config-from-file</code>,
+to the ntpd host's file <kbd>filename</kbd>.
+This command will be rejected by the server unless
+<a href="miscopt.html#saveconfigdir">saveconfigdir</a>
+appears in the <code>ntpd</code> configuration file.
+<kbd>filename</kbd> can use <code>strftime()</code> format specifiers
+to substitute the current date and time, for example,
+<code>saveconfig ntp-%Y%m%d-%H%M%S.conf</code>.
+The filename used is stored in system variable <code>savedconfig</code>.
+Authentication is required.
+
+ <br><dt><code><a name="writevar"></a> writevar </code><kbd>assocID</kbd> <kbd>name</kbd><code> = </code><kbd>value</kbd><code> [,...]</code><dd>Write the specified variables.
+If the <kbd>assocID</kbd> is zero, the variables are from the
+<a href="#system">system variables</a> name space, otherwise they are from the
+<a href="#peer">peer variables</a> name space.
+The <kbd>assocID</kbd> is required,
+as the same name can occur in both spaces.
+
+ <br><dt><code><a name="sysinfo"></a> sysinfo</code><dd>Display operational summary.
+
+ <br><dt><code><a name="sysstats"></a> sysstats</code><dd>Print statistics counters maintained in the protocol module.
+
+ </dl>
+
+<div class="node">
+<p><hr>
+<a name="Status-Words-and-Kiss-Codes"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#System-Variables">System Variables</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Control-Message-Commands">Control Message Commands</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Status Words and Kiss Codes</h3>
+
+<p>The current state of the operating program is shown
+in a set of status words maintained by the system
+and each association separately.
+These words are displayed in the <code>rv</code> and <code>as</code> commands
+both in hexadecimal and decoded short tip strings.
+The codes, tips and short explanations are on the
+<a href="decode.html">Event Messages and Status Words</a> page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+
+ <p>Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+<a href="decode.html#kiss">kiss codes</a>.
+The original purpose was for kiss-o'-death (KoD) packets sent
+by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+
+<div class="node">
+<p><hr>
+<a name="System-Variables"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Peer-Variables">Peer Variables</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Status-Words-and-Kiss-Codes">Status Words and Kiss Codes</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">System Variables</h3>
+
+<p>The following system variables appear in the <code>rv</code> billboard.
+Not all variables are displayed in some configurations.
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+
+<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
+</td><td valign="top" width="20%">
+<a href="decode.html#sys">system status word</a>
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>version</code>
+</td><td valign="top" width="20%">
+NTP software version and build time
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>processor</code>
+</td><td valign="top" width="20%">
+hardware platform and version
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>system</code>
+</td><td valign="top" width="20%">
+operating system and version
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
+</td><td valign="top" width="20%">
+leap warning indicator (0-3)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
+</td><td valign="top" width="20%">
+stratum (1-15)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
+</td><td valign="top" width="20%">
+precision (log(2) s)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
+</td><td valign="top" width="20%">
+total roundtrip delay to the primary reference clock
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
+</td><td valign="top" width="20%">
+total dispersion to the primary reference clock
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>peer</code>
+</td><td valign="top" width="20%">
+system peer association ID
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tc</code>
+time constant and poll exponent (log(2) s) (3-17)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>mintc</code>
+minimum time constant (log(2) s) (3-10)
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clock</code>
+</td><td valign="top" width="20%">
+date and time of day
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
+reference ID or <a href="decode.html#kiss">kiss code</a>
+
+ <p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
+</td><td valign="top" width="20%">
+reference time
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
+</td><td valign="top" width="20%">
+combined offset of server relative to this host
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>sys_jitter</code>
+</td><td valign="top" width="20%">
+combined system jitter
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>frequency</code>
+</td><td valign="top" width="20%">
+frequency offset (PPM) relative to hardware clock
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_wander</code>
+</td><td valign="top" width="20%">
+clock frequency wander (PPM)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>clk_jitter</code>
+</td><td valign="top" width="20%">
+clock jitter
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>tai</code>
+</td><td valign="top" width="20%">
+TAI-UTC offset (s)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leapsec</code>
+</td><td valign="top" width="20%">
+NTP seconds when the next leap second is/was inserted
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>expire</code>
+</td><td valign="top" width="20%">
+NTP seconds when the NIST leapseconds file expires
+
+ <br></td></tr></table>
+
+ <p>The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+
+ <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 Autokey dance:
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+
+<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
+</td><td valign="top" width="20%">
+Autokey host name for this host
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
+</td><td valign="top" width="20%">
+Autokey group name for this host
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
+</td><td valign="top" width="20%">
+host flags (see Autokey specification)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>digest</code>
+</td><td valign="top" width="20%">
+OpenSSL message digest algorithm
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
+</td><td valign="top" width="20%">
+OpenSSL digest/signature scheme
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>update</code>
+</td><td valign="top" width="20%">
+NTP seconds at last signature update
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>cert</code>
+</td><td valign="top" width="20%">
+certificate subject, issuer and certificate flags
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>until</code>
+</td><td valign="top" width="20%">
+NTP seconds when the certificate expires
+
+ <br></td></tr></table>
+
+<div class="node">
+<p><hr>
+<a name="Peer-Variables"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Clock-Variables">Clock Variables</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#System-Variables">System Variables</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Peer Variables</h3>
+
+<p>The following peer variables appear in the <code>rv</code> billboard
+for each association.
+Not all variables are displayed in some configurations.
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+
+<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
+</td><td valign="top" width="20%">
+association ID
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
+</td><td valign="top" width="20%">
+<a href="decode.html#peer">peer status word</a>
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcadr</code>
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>srcport</code>
+</td><td valign="top" width="20%">
+source (remote) IP address and port
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstadr</code>
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>dstport</code>
+</td><td valign="top" width="20%">
+destination (local) IP address and port
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>leap</code>
+</td><td valign="top" width="20%">
+leap indicator (0-3)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
+</td><td valign="top" width="20%">
+stratum (0-15)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>precision</code>
+</td><td valign="top" width="20%">
+precision (log(2) s)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdelay</code>
+</td><td valign="top" width="20%">
+total roundtrip delay to the primary reference clock
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>rootdisp</code>
+</td><td valign="top" width="20%">total root dispersion to the primary reference clock
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
+</td><td valign="top" width="20%">
+reference ID or <a href="decode.html#kiss">kiss code</a>
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reftime</code>
+</td><td valign="top" width="20%">
+reference time
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>reach</code>
+</td><td valign="top" width="20%">
+reach register (octal)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>unreach</code>
+</td><td valign="top" width="20%">
+unreach counter
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hmode</code>
+</td><td valign="top" width="20%">
+host mode (1-6)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>pmode</code>
+</td><td valign="top" width="20%">
+peer mode (1-5)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>hpoll</code>
+</td><td valign="top" width="20%">
+host poll exponent (log(2) s) (3-17)
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>ppoll</code>
+</td><td valign="top" width="20%">
+peer poll exponent (log(2) s) (3-17)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>headway</code>
+</td><td valign="top" width="20%">
+headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a>)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flash</code>
+</td><td valign="top" width="20%">
+<a href="decode.html#flash">flash status word</a>
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>offset</code>
+</td><td valign="top" width="20%">
+filter offset
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>delay</code>
+</td><td valign="top" width="20%">
+filter delay
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>dispersion</code>
+</td><td valign="top" width="20%">
+filter dispersion
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>jitter</code>
+</td><td valign="top" width="20%">
+filter jitter
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>ident</code>
+</td><td valign="top" width="20%">
+Autokey group name for this association
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>bias</code>
+</td><td valign="top" width="20%">
+unicast/broadcast bias
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>xleave</code>
+</td><td valign="top" width="20%">
+interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)
+
+ <br></td></tr></table>
+
+ <p>The bias variable is calculated when the first broadcast packet is received
+after the calibration volley. It represents the offset of the broadcast
+subgraph relative to the unicast subgraph. The xleave variable appears
+only the interleaved symmetric and interleaved modes. It represents
+the internal queuing, buffering and transmission delays for the preceding
+packet.
+
+ <p>When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+
+<p><br></th></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
+</td><td valign="top" width="20%">
+peer flags (see Autokey specification)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>host</code>
+</td><td valign="top" width="20%">
+Autokey server name
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
+</td><td valign="top" width="20%">
+peer flags (see Autokey specification)
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>signature</code>
+</td><td valign="top" width="20%">
+OpenSSL digest/signature scheme
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initsequence</code>
+</td><td valign="top" width="20%">
+initial key ID
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>initkey</code>
+</td><td valign="top" width="20%">
+initial key index
+
+<p><br></td></tr><tr align="left"><td valign="top" width="10%"><code>timestamp</code>
+</td><td valign="top" width="20%">
+Autokey signature timestamp
+
+ <br></td></tr></table>
+
+<div class="node">
+<p><hr>
+<a name="Clock-Variables"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Peer-Variables">Peer Variables</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Clock Variables</h3>
+
+<p>The following clock variables appear in the <code>cv</code> billboard for each association with a reference clock. Not all variables are displayed in some configurations.
+
+ <p><table summary=""><tr align="left"><th valign="top" width="10%">Variable </th><th valign="top" width="20%">Description
+<br></th></tr><tr align="left"><td valign="top" width="10%"><code>associd</code>
+</td><td valign="top" width="20%">association ID
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>status</code>
+</td><td valign="top" width="20%"><a href="decode.html#clock">clock status word</a>
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>device</code>
+</td><td valign="top" width="20%">device description
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>timecode</code>
+</td><td valign="top" width="20%">ASCII time code string (specific to device)
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>poll</code>
+</td><td valign="top" width="20%">poll messages sent
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>noreply</code>
+</td><td valign="top" width="20%">no reply
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>badformat</code>
+</td><td valign="top" width="20%">bad format
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>baddata</code>
+</td><td valign="top" width="20%">bad date or time
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime1</code>
+</td><td valign="top" width="20%">fudge time 1
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>fudgetime2</code>
+</td><td valign="top" width="20%">fudge time 2
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>stratum</code>
+</td><td valign="top" width="20%">driver stratum
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>refid</code>
+</td><td valign="top" width="20%">driver reference ID
+<br></td></tr><tr align="left"><td valign="top" width="10%"><code>flags</code>
+</td><td valign="top" width="20%">driver flags
+ <br></td></tr></table>
+
+</body></html>
+
diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in
new file mode 100644
index 000000000000..548ebf7f5dd9
--- /dev/null
+++ b/ntpq/ntpq.man.in
@@ -0,0 +1,1408 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpq @NTPQ_MS@ "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-XYaGog/ag-9Yayng)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:13 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpq-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpq\fP
+\- standard NTP query program
+.SH SYNOPSIS
+\f\*[B-Font]ntpq\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ host ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The
+\f\*[B-Font]ntpq\fP
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
+If one or more request options is included on the command line
+when
+\f\*[B-Font]ntpq\fP
+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,
+\f\*[B-Font]ntpq\fP
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility will prompt for
+commands if the standard input is a terminal device.
+\f\*[B-Font]ntpq\fP
+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.
+The
+\f\*[B-Font]ntpq\fP
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+Specifying a
+command line option other than
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-n\f[]
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+\f\*[B-Font]ntpq\fP
+will attempt to read
+interactive format commands from the standard input.
+.SS "Internal Commands"
+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.
+A
+number of interactive format commands are executed entirely within
+the
+\f\*[B-Font]ntpq\fP
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+.TP 20
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+A
+\[oq]\&?\[cq]
+by itself will print a list of all the command
+keywords known to this incarnation of
+\f\*[B-Font]ntpq\fP.
+A
+\[oq]\&?\[cq]
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+\f\*[B-Font]ntpq\fP
+than this manual
+page.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]clearvars\f[]
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]showvars\f[]
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+\[oq]variable_name=value\[cq],
+where the
+\[oq]=value\[cq]
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+\f\*[B-Font]ntpq\fP
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+\f\*[B-Font]readlist\f[]
+and
+\f\*[B-Font]writelist\f[]
+commands described below.
+The
+\f\*[B-Font]addvars\f[]
+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
+\f\*[B-Font]rmvars\f[]
+command can be used to remove individual variables from the list,
+while the
+\f\*[B-Font]clearlist\f[]
+command removes all variables from the
+list.
+The
+\f\*[B-Font]showvars\f[]
+command displays the current list of optional variables.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+Normally
+\f\*[B-Font]ntpq\fP
+does not authenticate requests unless
+they are write requests.
+The command
+\[oq]authenticate yes\[cq]
+causes
+\f\*[B-Font]ntpq\fP
+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
+\f\*[B-Font]peer\f[]
+display.
+The command
+\[oq]authenticate\[cq]
+causes
+\f\*[B-Font]ntpq\fP
+to display whether or not
+\f\*[B-Font]ntpq\fP
+is currently autheinticating requests.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]cooked\f[]
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+\f\*[B-Font]ntpq\fP
+will have their
+values reformatted for human consumption.
+Variables which
+\f\*[B-Font]ntpq\fP
+thinks should have a decodable value but didn't are
+marked with a trailing
+\[oq]\&?\[cq].
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]exit\f[]
+Exit
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+Set the host to which future queries will be sent.
+\f\*[I-Font]hostname\f[]
+may be either a host name or a numeric address.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+If
+\f\*[B-Font]yes\f[]
+is specified, host names are printed in
+information displays.
+If
+\f\*[B-Font]no\f[]
+is specified, numeric
+addresses are printed instead.
+The default is
+\f\*[B-Font]yes\f[],
+unless
+modified using the command line
+\f\*[B-Font]\-n\f[]
+switch.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
+Specify the type of key to use for authenticating requests.
+\f\*[B-Font]md5\f[]
+is alway supported.
+If
+\f\*[B-Font]ntpq\fP
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+\f\*[B-Font]keytype\f[]
+is displayed.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+Sets the NTP version number which
+\f\*[B-Font]ntpq\fP
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]passwd\f[]
+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.
+.\" Not yet implemented.
+.\" .It Ic poll
+.\" .Op Ar n
+.\" .Op Ic verbose
+.\" Poll an NTP server in client mode
+.\" .Ar n
+.\" times.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]quit\f[]
+Exit
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]raw\f[]
+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.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+\f\*[B-Font]ntpq\fP
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.br
+.ns
+.TP 20
+.NOP \f\*[B-Font]version\f[]
+Print the version of the
+\f\*[B-Font]ntpq\fP
+program.
+.PP
+.SS "Control Message Commands"
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server and expect a single response message.
+The exceptions are the
+\f[C]peers\f[]
+command, which sends a series of messages,
+and the
+\f[C]mreadlist\f[]
+and
+\f[C]mreadvar\f[]
+commands, which iterate over a range of associations.
+.TP 10
+.NOP \f\*[B-Font]associations\f[]
+Display a list of mobilized associations in the form:
+.Dl ind assid status conf reach auth condition last_event cnt
+.RS
+.IP \fB\(bu\fP 2
+.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
+.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
+.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
+.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
+.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
+.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]authinfo\f[]
+Display the authentication statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+Display a list of clock variables for those associations supporting a reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] [...]
+Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
+Send the each line of
+\f\*[I-Font]filename\f[]
+to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ifstats\f[]
+Display statistics for each local network address. Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]iostats\f[]
+Display network and reference clock I/O statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]kerninfo\f[]
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lassociations\f[]
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Obtain and print a list of all peers and clients showing
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version).
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Print a peer spreadsheet for the appropriate IP version(s).
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version).
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]monstats\f[]
+Display monitor facility statistics.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+the options filter the list returned by
+\f\*[B-Font]ntpd.\f[]
+The
+\f\*[B-Font]limited\f[]
+and
+\f\*[B-Font]kod\f[]
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
+option filters entries representing less than
+\f\*[I-Font]count\f[]
+packets.
+The
+\f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[]
+option filters entries for packets received on any local address other than
+\f\*[I-Font]localaddr\f[].
+\f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[]
+and
+\f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]
+filter entries containing none or less than all, respectively, of the bits in
+\f\*[I-Font]hexmask\f[],
+which must begin with
+\f\*[B-Font]0x\f[].
+The
+\f\*[I-Font]sortorder\f[]
+defaults to
+\f\*[B-Font]lstint\f[]
+and may be any of
+\f\*[B-Font]addr\f[],
+\f\*[B-Font]count\f[],
+\f\*[B-Font]avgint\f[],
+\f\*[B-Font]lstint\f[],
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+.RS
+.TP 10
+.NOP Column
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lstint\f[]
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]avgint\f[]
+Average interval in s between packets from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rstr\f[]
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+\f\*[B-Font]restrict\f[]
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]r\f[]
+Rate control indicator, either
+a period,
+\f\*[B-Font]L\f[]
+or
+\f\*[B-Font]K\f[]
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]m\f[]
+Packet mode.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]v\f[]
+Packet version number.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]count\f[]
+Packets received from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rport\f[]
+Source port of last packet from this address.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+\f\*[B-Font]associations\f[]
+command.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
+Obtain and print the old-style list of all peers and clients showing
+\f\*[I-Font]dstadr\f[]
+(associated with any given IP version),
+rather than the
+\f\*[I-Font]refid\f[].
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]passociations\f[]
+Perform the same function as the
+\f\*[B-Font]associations\f[]
+command,
+except that it uses previously stored data rather than making a new query.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]peers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid st t when pool reach delay offset jitter
+.RS
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font][tally]\f[]
+single-character code indicating current value of the
+\f\*[B-Font]select\f[]
+field of the
+.Lk decode.html#peer "peer status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]remote\f[]
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]\-w\f[]
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+association ID or
+.Lk decode.html#kiss "'kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]st\f[]
+stratum
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]t\f[]
+\f\*[B-Font]u\f[]:
+unicast or manycast client,
+\f\*[B-Font]b\f[]:
+broadcast or multicast client,
+\f\*[B-Font]l\f[]:
+local (reference clock),
+\f\*[B-Font]s\f[]:
+symmetric (peer),
+\f\*[B-Font]A\f[]:
+manycast server,
+\f\*[B-Font]B\f[]:
+broadcast server,
+\f\*[B-Font]M\f[]:
+multicast server
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]when\f[]
+sec/min/hr since last received packet
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]poll\f[]
+poll interval (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reach\f[]
+reach shift register (octal)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]delay\f[]
+roundtrip delay
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+offset of server relative to this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]jitter\f[]
+jitter
+.RE
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
+Show the statistics for the peer with the given
+\f\*[I-Font]assocID\f[].
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
+Read the system or peer variables included in the variable list.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+Display the specified variables.
+If
+\f\*[I-Font]assocID\f[]
+is zero, the variables are from the
+\fISystem\f[] \fIVariables\f[]
+name space, otherwise they are from the
+\fIPeer\f[] \fIVariables\f[]
+name space.
+The
+\f\*[I-Font]assocID\f[]
+is required, as the same name can occur in both spaces.
+If no
+\f\*[I-Font]name\f[]
+is included, all operative variables in the name space are displayed.
+In this case only, if the
+\f\*[I-Font]assocID\f[]
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reslist\f[]
+Show the access control (restrict) list for
+\f\*[B-Font]ntpq\fP.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration,
+including any runtime modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[],
+to the ntpd host's file
+\f\*[I-Font]filename\f[].
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+\f\*[B-Font]ntpd\f[]
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\fR()\f[]
+format specifies to substitute the current date and time, for example,
+\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+The filename used is stored in system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timerstats\f[]
+Display interval timer counters.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
+Write the system or peer variables included in the variable list.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Write the specified variables.
+If the
+\f\*[I-Font]assocID\f[]
+is zero, the variables are from the
+\fISystem\f[] \fIVariables\f[]
+name space, otherwise they are from the
+\fIPeer\f[] \fIVariables\f[]
+name space.
+The
+\f\*[I-Font]assocID\f[]
+is required, as the same name can occur in both spaces.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Print statistics counters maintained in the protocol module.
+.PP
+.SS Status Words and Kiss Codes
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per-association basis.
+These words are displayed in the
+\f\*[B-Font]rv\f[]
+and
+\f\*[B-Font]as\f[]
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+.sp \n(Ppu
+.ne 2
+
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss-o'-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+.SS System Variables
+The following system variables appear in the
+\f\*[B-Font]rv\f[]
+billboard.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#sys "system status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]version\f[]
+NTP software version and build time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]processor\f[]
+hardware platform and version
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]system\f[]
+operating system and version
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leap\f[]
+leap warning indicator (0-3)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+stratum (1-15)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]precision\f[]
+precision (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdelay\f[]
+total roundtrip delay to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdisp\f[]
+total dispersion to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]peer\f[]
+system peer association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reftime\f[]
+reference time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+combined offset of server relative to this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]frequency\f[]
+frequency offset (PPM) relative to hardware clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clk_wander\f[]
+clock frequency wander (PPM)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clk_jitter\f[]
+clock jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]tai\f[]
+TAI-UTC offset (s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leapsec\f[]
+NTP seconds when the next leap second is/was inserted
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]expire\f[]
+NTP seconds when the NIST leapseconds file expires
+.PP
+The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+.sp \n(Ppu
+.ne 2
+
+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 Autokey dance:
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]host\f[]
+Autokey host name for this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this host
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+host flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]digest\f[]
+OpenSSL message digest algorithm
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]signature\f[]
+OpenSSL digest/signature scheme
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]update\f[]
+NTP seconds at last signature update
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]cert\f[]
+certificate subject, issuer and certificate flags
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]until\f[]
+NTP seconds when the certificate expires
+.PP
+.SS Peer Variables
+The following peer variables appear in the
+\f\*[B-Font]rv\f[]
+billboard for each association.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]associd\f[]
+association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#peer "peer status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]srcadr\f[]
+source (remote) IP address
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]srcport\f[]
+source (remote) port
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dstadr\f[]
+destination (local) IP address
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dstport\f[]
+destination (local) port
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]leap\f[]
+leap indicator (0-3)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+stratum (0-15)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]precision\f[]
+precision (log2 s)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdelay\f[]
+total roundtrip delay to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]rootdisp\f[]
+total root dispersion to the primary reference clock
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reftime\f[]
+reference time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]reach\f[]
+reach register (octal)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]unreach\f[]
+unreach counter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]hmode\f[]
+host mode (1-6)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]pmode\f[]
+peer mode (1-5)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]hpoll\f[]
+host poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ppoll\f[]
+peer poll exponent (log2 s) (3-17)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]headway\f[]
+headway (see
+.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flash\f[]
+.Lk decode.html#flash "flash status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]offset\f[]
+filter offset
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]delay\f[]
+filter delay
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]dispersion\f[]
+filter dispersion
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]jitter\f[]
+filter jitter
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]bias\f[]
+unicast/broadcast bias
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]xleave\f[]
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+.PP
+The
+\f\*[B-Font]bias\f[]
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+\f\*[B-Font]xleave\f[]
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+.sp \n(Ppu
+.ne 2
+
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+peer flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]host\f[]
+Autokey server name
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+peer flags (see Autokey specification)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]signature\f[]
+OpenSSL digest/signature scheme
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]initsequence\f[]
+initial key ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]initkey\f[]
+initial key index
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timestamp\f[]
+Autokey signature timestamp
+.PP
+.SS Clock Variables
+The following clock variables appear in the
+\f\*[B-Font]cv\f[]
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+.TP 10
+.NOP Variable
+Description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]associd\f[]
+association ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]status\f[]
+.Lk decode.html#clock "clock status word"
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]device\f[]
+device description
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]timecode\f[]
+ASCII time code string (specific to device)
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]poll\f[]
+poll messages sent
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]noreply\f[]
+no reply
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]badformat\f[]
+bad format
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]baddata\f[]
+bad date or time
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]fudgetime1\f[]
+fudge time 1
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]fudgetime2\f[]
+fudge time 2
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]stratum\f[]
+driver stratum
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]refid\f[]
+driver reference ID
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]flags\f[]
+driver flags
+.PP
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, peers.
+.sp
+Force \fBntpq\fP to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+numeric host addresses.
+.sp
+Output all host addresses in dotted-quad numeric format rather than
+converting to the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-\-old\-rv\f[]
+Always output status line with readvar.
+.sp
+By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
+line that precedes the output of \fBreadvar\fP
+(alias \fBrv\fP) when a single variable is requested, such as
+\fBntpq \-c "rv 0 offset"\fP.
+This option causes \fBntpq\fP to include both lines of output
+for a single-variable \fBreadvar\fP.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer \fBntpq\fP to behave identically in this regard.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.TP
+.NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
+option definitions.
diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in
new file mode 100644
index 000000000000..34bbfdfbc169
--- /dev/null
+++ b/ntpq/ntpq.mdoc.in
@@ -0,0 +1,954 @@
+.Dd December 19 2014
+.Dt NTPQ @NTPQ_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpq-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpq
+.Nd standard NTP query program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ host ...]
+.Pp
+.Sh DESCRIPTION
+The
+.Nm
+utility program is used to query NTP servers which
+implement the standard NTP mode 6 control message formats defined
+in Appendix B of the NTPv3 specification RFC1305, requesting
+information about current state and/or changes in that state.
+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.
+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.
+The
+.Nm
+utility can also obtain and print a
+list of peers in a common format by sending multiple queries to the
+server.
+If one or more request options is included on the command line
+when
+.Nm
+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,
+.Nm
+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.
+The
+.Nm
+utility will prompt for
+commands if the standard input is a terminal device.
+.Nm
+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.
+The
+.Nm
+utility makes
+one attempt to retransmit requests, and will time requests out if
+the remote host is not heard from within a suitable timeout
+time.
+Specifying a
+command line option other than
+.Fl i
+or
+.Fl n
+will
+cause the specified query (queries) to be sent to the indicated
+host(s) immediately.
+Otherwise,
+.Nm
+will attempt to read
+interactive format commands from the standard input.
+.Ss "Internal Commands"
+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.
+A
+number of interactive format commands are executed entirely within
+the
+.Nm
+utility itself and do not result in NTP mode 6
+requests being sent to a server.
+These are described following.
+.Bl -tag -width "? [command_keyword]" -compact -offset indent
+.It Ic ? Op Ar command_keyword
+.It Ic help Op Ar command_keyword
+A
+.Ql \&?
+by itself will print a list of all the command
+keywords known to this incarnation of
+.Nm .
+A
+.Ql \&?
+followed by a command keyword will print function and usage
+information about the command.
+This command is probably a better
+source of information about
+.Nm
+than this manual
+page.
+.It Ic addvars Ar variable_name Ns Xo Op Ic =value
+.Ic ...
+.Xc
+.It Ic rmvars Ar variable_name Ic ...
+.It Ic clearvars
+.It Ic showvars
+The data carried by NTP mode 6 messages consists of a list of
+items of the form
+.Ql variable_name=value ,
+where the
+.Ql =value
+is ignored, and can be omitted,
+in requests to the server to read variables.
+The
+.Nm
+utility maintains an internal list in which data to be included in control
+messages can be assembled, and sent using the
+.Ic readlist
+and
+.Ic writelist
+commands described below.
+The
+.Ic addvars
+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
+.Ic rmvars
+command can be used to remove individual variables from the list,
+while the
+.Ic clearlist
+command removes all variables from the
+list.
+The
+.Ic showvars
+command displays the current list of optional variables.
+.It Ic authenticate Op yes | no
+Normally
+.Nm
+does not authenticate requests unless
+they are write requests.
+The command
+.Ql authenticate yes
+causes
+.Nm
+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
+.Ic peer
+display.
+The command
+.Ql authenticate
+causes
+.Nm
+to display whether or not
+.Nm
+is currently autheinticating requests.
+.It Ic cooked
+Causes output from query commands to be "cooked", so that
+variables which are recognized by
+.Nm
+will have their
+values reformatted for human consumption.
+Variables which
+.Nm
+thinks should have a decodable value but didn't are
+marked with a trailing
+.Ql \&? .
+.It Xo
+.Ic debug
+.Oo
+.Cm more |
+.Cm less |
+.Cm off
+.Oc
+.Xc
+With no argument, displays the current debug level.
+Otherwise, the debug level is changed to the indicated level.
+.It Ic delay Ar milliseconds
+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.
+.It Ic exit
+Exit
+.Nm .
+.It Ic host Ar hostname
+Set the host to which future queries will be sent.
+.Ar hostname
+may be either a host name or a numeric address.
+.It Ic hostnames Op Cm yes | Cm no
+If
+.Cm yes
+is specified, host names are printed in
+information displays.
+If
+.Cm no
+is specified, numeric
+addresses are printed instead.
+The default is
+.Cm yes ,
+unless
+modified using the command line
+.Fl n
+switch.
+.It Ic keyid Ar keyid
+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.
+.It Ic keytype Xo Oo
+.Cm md5 |
+.Cm OpenSSLDigestType
+.Oc
+.Xc
+Specify the type of key to use for authenticating requests.
+.Cm md5
+is alway supported.
+If
+.Nm
+was built with OpenSSL support,
+any digest type supported by OpenSSL can also be provided.
+If no argument is given, the current
+.Ic keytype
+is displayed.
+.It Ic ntpversion Xo Oo
+.Cm 1 |
+.Cm 2 |
+.Cm 3 |
+.Cm 4
+.Oc
+.Xc
+Sets the NTP version number which
+.Nm
+claims in
+packets.
+Defaults to 3, and 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.
+With no argument, displays the current NTP version that will be used
+when communicating with servers.
+.It Ic passwd
+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.
+.\" Not yet implemented.
+.\" .It Ic poll
+.\" .Op Ar n
+.\" .Op Ic verbose
+.\" Poll an NTP server in client mode
+.\" .Ar n
+.\" times.
+.It Ic quit
+Exit
+.Nm .
+.It Ic raw
+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.
+.It Ic timeout Ar milliseconds
+Specify a timeout period for responses to server queries.
+The
+default is about 5000 milliseconds.
+Note that since
+.Nm
+retries each query once after a timeout, the total waiting time for
+a timeout will be twice the timeout value set.
+.It Ic version
+Print the version of the
+.Nm
+program.
+.El
+.Ss "Control Message Commands"
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode\-6 message to the server and expect a single response message.
+The exceptions are the
+.Li peers
+command, which sends a series of messages,
+and the
+.Li mreadlist
+and
+.Li mreadvar
+commands, which iterate over a range of associations.
+.Bl -tag -width "something" -compact -offset indent
+.It Cm associations
+Display a list of mobilized associations in the form:
+.Dl ind assid status conf reach auth condition last_event cnt
+.Bl -column -offset indent ".Sy Variable" ".Sy Description"
+.It Sy String Ta Sy Description
+.It Li ind Ta index on this list
+.It Li assid Ta association ID
+.It Li status Ta peer status word
+.It Li conf Ta Li yes : persistent, Li no : ephemeral
+.It Li reach Ta Li yes : reachable, Li no : unreachable
+.It Li auth Ta Li ok , Li yes , Li bad and Li none
+.It Li condition Ta selection status (see the Li select field of the peer status word)
+.It Li last_event Ta event report (see the Li event field of the peer status word)
+.It Li cnt Ta event count (see the Li count field of the peer status word)
+.El
+.It Cm authinfo
+Display the authentication statistics.
+.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
+Display a list of clock variables for those associations supporting a reference clock.
+.It Cm :config Op ...
+Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.It Cm config\-from\-file Ar filename
+Send the each line of
+.Ar filename
+to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+.It Ic ifstats
+Display statistics for each local network address. Authentication is required.
+.It Ic iostats
+Display network and reference clock I/O statistics.
+.It Ic kerninfo
+Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+.It Ic lassociations
+Perform the same function as the associations command, except display mobilized and unmobilized associations.
+.It Ic lopeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Obtain and print a list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version).
+.It Ic lpeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Print a peer spreadsheet for the appropriate IP version(s).
+.Ar dstadr
+(associated with any given IP version).
+.It Ic monstats
+Display monitor facility statistics.
+.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
+Obtain and print traffic counts collected and maintained by the monitor facility.
+With the exception of
+.Cm sort Ns = Ns Ar sortorder ,
+the options filter the list returned by
+.Cm ntpd.
+The
+.Cm limited
+and
+.Cm kod
+options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+The
+.Cm mincount Ns = Ns Ar count
+option filters entries representing less than
+.Ar count
+packets.
+The
+.Cm laddr Ns = Ns Ar localaddr
+option filters entries for packets received on any local address other than
+.Ar localaddr .
+.Cm resany Ns = Ns Ar hexmask
+and
+.Cm resall Ns = Ns Ar hexmask
+filter entries containing none or less than all, respectively, of the bits in
+.Ar hexmask ,
+which must begin with
+.Cm 0x .
+The
+.Ar sortorder
+defaults to
+.Cm lstint
+and may be any of
+.Cm addr ,
+.Cm count ,
+.Cm avgint ,
+.Cm lstint ,
+or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+.Bl -tag -width "something" -compact -offset indent
+.It Column
+Description
+.It Ic lstint
+Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+.Nm .
+.It Ic avgint
+Average interval in s between packets from this address.
+.It Ic rstr
+Restriction flags associated with this address.
+Most are copied unchanged from the matching
+.Ic restrict
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+.It Ic r
+Rate control indicator, either
+a period,
+.Ic L
+or
+.Ic K
+for no rate control response,
+rate limiting by discarding, or rate limiting with a KoD response, respectively.
+.It Ic m
+Packet mode.
+.It Ic v
+Packet version number.
+.It Ic count
+Packets received from this address.
+.It Ic rport
+Source port of last packet from this address.
+.It Ic remote address
+DNS name, numeric address, or address followed by
+claimed DNS name which could not be verified in parentheses.
+.El
+.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
+Perform the same function as the
+.Ic readvar
+command, except for a range of association IDs.
+This range is determined from the association list cached by the most recent
+.Ic associations
+command.
+.It Ic opeers Xo
+.Oo Ic \-4 |
+.Ic \-6
+.Oc
+.Xc
+Obtain and print the old\-style list of all peers and clients showing
+.Ar dstadr
+(associated with any given IP version),
+rather than the
+.Ar refid .
+.It Ic passociations
+Perform the same function as the
+.Ic associations
+command,
+except that it uses previously stored data rather than making a new query.
+.It Ic peers
+Display a list of peers in the form:
+.Dl [tally]remote refid st t when pool reach delay offset jitter
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic [tally]
+single\-character code indicating current value of the
+.Ic select
+field of the
+.Lk decode.html#peer "peer status word"
+.It Ic remote
+host name (or IP number) of peer.
+The value displayed will be truncated to 15 characters unless the
+.Fl w
+flag is given, in which case the full value will be displayed
+on the first line,
+and the remaining data is displayed on the next line.
+.It Ic refid
+association ID or
+.Lk decode.html#kiss "'kiss code"
+.It Ic st
+stratum
+.It Ic t
+.Ic u :
+unicast or manycast client,
+.Ic b :
+broadcast or multicast client,
+.Ic l :
+local (reference clock),
+.Ic s :
+symmetric (peer),
+.Ic A :
+manycast server,
+.Ic B :
+broadcast server,
+.Ic M :
+multicast server
+.It Ic when
+sec/min/hr since last received packet
+.It Ic poll
+poll interval (log2 s)
+.It Ic reach
+reach shift register (octal)
+.It Ic delay
+roundtrip delay
+.It Ic offset
+offset of server relative to this host
+.It Ic jitter
+jitter
+.El
+.It Ic pstats Ar assocID
+Show the statistics for the peer with the given
+.Ar assocID .
+.It Ic readlist Ar assocID
+.It Ic rl Ar assocID
+Read the system or peer variables included in the variable list.
+.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
+Display the specified variables.
+If
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+If no
+.Ar name
+is included, all operative variables in the name space are displayed.
+In this case only, if the
+.Ar assocID
+is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds
+and frequency values in parts\-per\-million (PPM).
+Some NTP timestamps are represented in the format
+YYYYMMDDTTTT ,
+where YYYY is the year,
+MM the month of year,
+DD the day of month and
+TTTT the time of day.
+.It Ic reslist
+Show the access control (restrict) list for
+.Nm .
+.It Ic saveconfig Ar filename
+Write the current configuration,
+including any runtime modifications given with
+.Ic :config
+or
+.Ic config\-from\-file ,
+to the ntpd host's file
+.Ar filename .
+This command will be rejected by the server unless
+.Lk miscopt.html#saveconfigdir "saveconfigdir"
+appears in the
+.Ic ntpd
+configuration file.
+.Ar filename
+can use
+.Xr strftime
+format specifies to substitute the current date and time, for example,
+.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+The filename used is stored in system variable
+.Ic savedconfig .
+Authentication is required.
+.It Ic timerstats
+Display interval timer counters.
+.It Ic writelist Ar assocID
+Write the system or peer variables included in the variable list.
+.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
+Write the specified variables.
+If the
+.Ar assocID
+is zero, the variables are from the
+.Sx System Variables
+name space, otherwise they are from the
+.Sx Peer Variables
+name space.
+The
+.Ar assocID
+is required, as the same name can occur in both spaces.
+.It Ic sysinfo
+Display operational summary.
+.It Ic sysstats
+Print statistics counters maintained in the protocol module.
+.El
+.Ss Status Words and Kiss Codes
+The current state of the operating program is shown
+in a set of status words
+maintained by the system.
+Status information is also available on a per\-association basis.
+These words are displayed in the
+.Ic rv
+and
+.Ic as
+commands both in hexadecimal and in decoded short tip strings.
+The codes, tips and short explanations are documented on the
+.Lk decode.html "Event Messages and Status Words"
+page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+.Pp
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+.Lk decode.html#kiss "kiss codes" .
+The original purpose was for kiss\-o'\-death (KoD) packets
+sent by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+.Ss System Variables
+The following system variables appear in the
+.Ic rv
+billboard.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic status
+.Lk decode.html#sys "system status word"
+.It Ic version
+NTP software version and build time
+.It Ic processor
+hardware platform and version
+.It Ic system
+operating system and version
+.It Ic leap
+leap warning indicator (0\-3)
+.It Ic stratum
+stratum (1\-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total dispersion to the primary reference clock
+.It Ic peer
+system peer association ID
+.It Ic tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Ic mintc
+minimum time constant (log2 s) (3\-10)
+.It Ic clock
+date and time of day
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic offset
+combined offset of server relative to this host
+.It Ic sys_jitter
+combined system jitter
+.It Ic frequency
+frequency offset (PPM) relative to hardware clock
+.It Ic clk_wander
+clock frequency wander (PPM)
+.It Ic clk_jitter
+clock jitter
+.It Ic tai
+TAI\-UTC offset (s)
+.It Ic leapsec
+NTP seconds when the next leap second is/was inserted
+.It Ic expire
+NTP seconds when the NIST leapseconds file expires
+.El
+The jitter and wander statistics are exponentially\-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+.Pp
+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 Autokey dance:
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic host
+Autokey host name for this host
+.It Ic ident
+Autokey group name for this host
+.It Ic flags
+host flags (see Autokey specification)
+.It Ic digest
+OpenSSL message digest algorithm
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic update
+NTP seconds at last signature update
+.It Ic cert
+certificate subject, issuer and certificate flags
+.It Ic until
+NTP seconds when the certificate expires
+.El
+.Ss Peer Variables
+The following peer variables appear in the
+.Ic rv
+billboard for each association.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#peer "peer status word"
+.It Ic srcadr
+source (remote) IP address
+.It Ic srcport
+source (remote) port
+.It Ic dstadr
+destination (local) IP address
+.It Ic dstport
+destination (local) port
+.It Ic leap
+leap indicator (0\-3)
+.It Ic stratum
+stratum (0\-15)
+.It Ic precision
+precision (log2 s)
+.It Ic rootdelay
+total roundtrip delay to the primary reference clock
+.It Ic rootdisp
+total root dispersion to the primary reference clock
+.It Ic refid
+reference ID or
+.Lk decode.html#kiss "kiss code"
+.It Ic reftime
+reference time
+.It Ic reach
+reach register (octal)
+.It Ic unreach
+unreach counter
+.It Ic hmode
+host mode (1\-6)
+.It Ic pmode
+peer mode (1\-5)
+.It Ic hpoll
+host poll exponent (log2 s) (3\-17)
+.It Ic ppoll
+peer poll exponent (log2 s) (3\-17)
+.It Ic headway
+headway (see
+.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
+.It Ic flash
+.Lk decode.html#flash "flash status word"
+.It Ic offset
+filter offset
+.It Ic delay
+filter delay
+.It Ic dispersion
+filter dispersion
+.It Ic jitter
+filter jitter
+.It Ic ident
+Autokey group name for this association
+.It Ic bias
+unicast/broadcast bias
+.It Ic xleave
+interleave delay (see
+.Lk xleave.html "NTP Interleaved Modes" )
+.El
+The
+.Ic bias
+variable is calculated when the first broadcast packet is received
+after the calibration volley.
+It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+The
+.Ic xleave
+variable appears only for the interleaved symmetric and interleaved modes.
+It represents the internal queuing, buffering and transmission delays
+for the preceding packet.
+.Pp
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic host
+Autokey server name
+.It Ic flags
+peer flags (see Autokey specification)
+.It Ic signature
+OpenSSL digest/signature scheme
+.It Ic initsequence
+initial key ID
+.It Ic initkey
+initial key index
+.It Ic timestamp
+Autokey signature timestamp
+.El
+.Ss Clock Variables
+The following clock variables appear in the
+.Ic cv
+billboard for each association with a reference clock.
+Not all variables are displayed in some configurations.
+.Bl -tag -width "something" -compact -offset indent
+.It Variable
+Description
+.It Ic associd
+association ID
+.It Ic status
+.Lk decode.html#clock "clock status word"
+.It Ic device
+device description
+.It Ic timecode
+ASCII time code string (specific to device)
+.It Ic poll
+poll messages sent
+.It Ic noreply
+no reply
+.It Ic badformat
+bad format
+.It Ic baddata
+bad date or time
+.It Ic fudgetime1
+fudge time 1
+.It Ic fudgetime2
+fudge time 2
+.It Ic stratum
+driver stratum
+.It Ic refid
+driver reference ID
+.It Ic flags
+driver flags
+.El
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
+run a command and exit.
+This option may appear an unlimited number of times.
+.sp
+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).
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl i , Fl \-interactive
+Force ntpq to operate in interactive mode.
+This option must not appear in combination with any of the following options:
+command, peers.
+.sp
+Force \fBntpq\fP to operate in interactive mode.
+Prompts will be written to the standard output and
+commands read from the standard input.
+.It Fl n , Fl \-numeric
+numeric host addresses.
+.sp
+Output all host addresses in dotted\-quad numeric format rather than
+converting to the canonical host names.
+.It Fl \-old\-rv
+Always output status line with readvar.
+.sp
+By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
+line that precedes the output of \fBreadvar\fP
+(alias \fBrv\fP) when a single variable is requested, such as
+\fBntpq \-c "rv 0 offset"\fP.
+This option causes \fBntpq\fP to include both lines of output
+for a single\-variable \fBreadvar\fP.
+Using an environment variable to
+preset this option in a script will enable both older and
+newer \fBntpq\fP to behave identically in this regard.
+.It Fl p , Fl \-peers
+Print a list of the peers.
+This option must not appear in combination with any of the following options:
+interactive.
+.sp
+Print a list of the peers known to the server as well as a summary
+of their state. This is equivalent to the 'peers' interactive command.
+.It Fl w , Fl \-wide
+Display the full 'remote' value.
+.sp
+Display the full value of the 'remote' value. If this requires
+more than 15 characters, display the full value, emit a newline,
+and continue the data display properly indented on the next line.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
+option definitions.
diff --git a/ntpq/ntpq.texi b/ntpq/ntpq.texi
new file mode 100644
index 000000000000..ac79dcc49d19
--- /dev/null
+++ b/ntpq/ntpq.texi
@@ -0,0 +1,834 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpq.info
+@settitle ntpq: Network Time Protocol Query User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's ntpq, a program for
+querying the state of an NTP server.
+@end ifinfo
+
+@direntry
+* ntpq: (ntpq). NTP Query program
+@end direntry
+
+@titlepage
+@title ntpq: Network Time Protocol Query User's Manual
+@subtitle ntpq, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@shortcontents
+
+@node Top, ntpq Description, (dir), (dir)
+@top ntpq: Network Time Protocol Query User Manual
+
+The @code{ntpq} utility program is used to
+monitor the operational status
+and determine the performance of
+@code{ntpd}, the NTP daemon.
+
+This document applies to version @value{VERSION} of @code{ntpq}.
+
+@menu
+* ntpq Description::
+* ntpq Invocation:: Invoking ntpq
+* Usage::
+* Internal Commands::
+* Control Message Commands::
+* Status Words and Kiss Codes::
+* System Variables::
+* Peer Variables::
+* Clock Variables::
+@end menu
+
+@node ntpq Description, Usage, Top, Top
+@comment node-name, next, previous, up
+@section Description
+
+The @code{ntpq} utility program is used to monitor NTP daemon @code{ntpd} 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 variable names have changed and new ones added.
+The description on this page is for the NTPv4 variables.
+
+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 @code{ntpq} can also obtain and print a list of peers in a common format by sending multiple queries to the server.
+
+If one or more request options is included on the command line when @code{ntpq} 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, @code{ntpq} 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. @code{ntpq} will prompt for commands if the standard input is a terminal device.
+
+@code{ntpq} 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. @code{ntpq} makes one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.
+
+Note that in contexts where a host name is expected, a @code{-4} qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a @code{-6} qualifier forces DNS resolution to the IPv6 namespace.
+
+For examples and usage, see the @url{debug.html, NTP Debugging Techniques} page.
+
+@include invoke-ntpq.texi
+
+@node Usage, Internal Commands, ntpq Description, Top
+@comment node-name, next, previous, up
+@section Usage
+
+@multitable @columnfractions .23 .23 .05 .15
+@headitem What @tab Default @tab Flag @tab Option
+@item configuration file
+@tab @code{/etc/ntp.conf}
+@tab @code{-c}
+@tab @code{conffile}
+@item frequency file
+@tab none
+@tab @code{-f}
+@tab @code{driftfile}
+@item leapseconds file
+@tab none
+@tab
+@tab @code{leapfile}
+@item process ID file
+@tab none
+@tab @code{-p}
+@tab @code{pidfile}
+@item log file
+@tab system log
+@tab @code{-l}
+@tab @code{logfile}
+@item include file
+@tab none
+@tab none
+@tab @code{includefile}
+@item statistics path
+@tab @code{/var/NTP}
+@tab @code{-s}
+@tab @code{statsdir}
+@item keys path
+@tab @code{/usr/local/etc}
+@tab @code{-k}
+@tab @code{keysdir}
+@end multitable
+
+@node Internal Commands, Control Message Commands, Usage, Top
+@comment node-name, next, previous, up
+@section Internal Commands
+
+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 @code{>}, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the @code{ntpq} program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.
+
+@table @code
+
+@item @anchor{help} @code{? [}@kbd{command_keyword}@code{]}
+@itemx @code{help [}@kbd{command_keyword}@code{]}
+A @code{?} by itself will print a list of all the command keywords known to @code{ntpq}. A @code{?} followed by a command keyword will print function and usage information about the command.
+
+@item @anchor{addvars} >@code{addvars @kbd{name} [ = @kbd{value}] [...]}
+@itemx @code{rmvars @kbd{name} [...]}
+@itemx @code{clearvars}</dt>
+The arguments to these commands consist of a list of items of the form
+@code{@kbd{name} = @kbd{value}}, where the @code{= @kbd{value}} is ignored,
+and can be omitted in read requests.
+@code{ntpq} maintains an internal list in which data to be included
+in control messages can be assembled, and sent using the @code{readlist}
+and @code{writelist} commands described below.
+The @code{addvars} command allows variables and 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 @code{rmvars} command can be used to remove individual variables
+from the list,
+while the @code{clearlist} command removes all variables from the list.
+
+@item @anchor{cooked} @code{cooked}
+Display server messages in prettyprint format.
+
+@item @anchor{debug} @code{debug more | less | off}
+Turns internal query program debugging on and off.
+
+@item @anchor{delay} @code{delay @kbd{milliseconds}}
+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.
+
+@item @anchor{host} @code{host @kbd{name}}
+Set the host to which future queries will be sent.
+The name may be either a DNS name or a numeric address.
+
+@item @anchor{hostnames} @code{hostnames [yes | no]}
+If @code{yes} is specified, host names are printed in information displays.
+If @code{no} is specified, numeric addresses are printed instead.
+The default is @code{yes},
+unless modified using the command line @code{-n} switch.
+
+@item @anchor{keyid} @code{keyid @kbd{keyid}}
+This command specifies the key number to be used
+to authenticate configuration requests.
+This must correspond to a key ID configured in @code{ntp.conf} for this purpose.
+
+@item @anchor{keytype} @code{keytype}
+Specify the digest algorithm to use for authenticated requests,
+with default @code{MD5}.
+If the OpenSSL library is installed,
+digest can be be any message digest algorithm supported by the library.
+The current selections are: @code{MD2}, @code{MD4}, @code{MD5}, @code{MDC2}, @code{RIPEMD160}, @code{SHA} and @code{SHA1}.
+
+@item @anchor{ntpversion} @code{ntpversion 1 | 2 | 3 | 4}
+Sets the NTP version number which @code{ntpq} claims in packets.
+Defaults to 2.
+Note that mode-6 control messages (and modes, for that matter)
+didn't exist in NTP version 1.
+
+@item @anchor{passwd} @code{passwd}
+This command prompts for a password to authenticate requests.
+The password must correspond to the key ID configured in @code{ntp.conf} for this purpose.
+
+@item @anchor{quit} @code{quit}
+Exit @code{ntpq}.
+
+@item @anchor{raw} @code{raw}
+Display server messages as received and without reformatting.
+
+@item @anchor{timeout} @code{timeout @kbd{millseconds}}
+Specify a timeout period for responses to server queries.
+The default is about 5000 milliseconds.
+Note that since @code{ntpq} retries each query once after a timeout
+the total waiting time for a timeout will be twice the timeout value set.
+
+@end table
+
+@node Control Message Commands, Status Words and Kiss Codes, Internal Commands, Top
+@comment node-name, next, previous, up
+@section Control Message Commands
+
+Association IDs are used to identify system, peer and clock variables.
+System variables are assigned an association ID of zero and system name space,
+while each association is assigned a nonzero association ID and peer namespace.
+Most control commands send a single mode-6 message to the server
+and expect a single response message.
+The exceptions are the @code{peers} command,
+which sends a series of messages,
+and the @code{mreadlist} and @code{mreadvar} commands,
+which iterate over a range of associations.
+
+@anchor{as}
+@table @code
+@item @code{associations}
+Display a list of mobilized associations in the form:
+@*
+@code{ind assid status conf reach auth condition last_event cnt}
+
+@multitable @columnfractions .1 .4
+@headitem Variable @tab Description
+
+@item @code{ind}
+@tab index on this list
+
+@item @code{assid}
+@tab association ID
+
+@item @code{status}
+@tab @url{decode.html#peer, peer status word}
+
+@item @code{conf}
+@tab @code{yes}: persistent, @code{no}: ephemeral
+
+@item @code{reach}
+@tab @code{yes}: reachable, @code{no}: unreachable
+
+@item @code{auth}
+@tab @code{ok}, @code{yes}, @code{bad} and @code{none}
+
+@item @code{condition}
+@tab selection status (see the @code{select} field of the @url{decode.html#peer, peer status word})
+
+@item @code{last_event}
+@tab event report (see the @code{event} field of the @url{decode.html#peer, peer status word})
+
+@item @code{cnt}
+event count (see the @code{count} field of the @url{decode.html#peer, peer status word})
+
+@end multitable
+
+@item @anchor{cv} clockvar @kbd{assocID} [@kbd{name} [ = @kbd{value} [...]] [...]]
+@itemx cv @kbd{assocID} [@kbd{name} [ = @kbd{value} [...] ][...]]
+Display a list of @ref{clock,,clock variables} for those associations supporting a reference clock.
+
+@item @anchor{:config} :config [...]
+Send the remainder of the command line, including whitespace, to the server
+as a run-time configuration command in the same format
+as the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+
+@item @anchor{config-from-file} config-from-file @kbd{filename}
+Send the each line of @kbd{filename} to the server as
+run-time configuration commands in the same format as the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
+
+@item @anchor{ifstats} ifstats
+Display statistics for each local network address.
+Authentication is required.
+
+@item @anchor{iostats} iostats
+Display network and reference clock I/O statistics.
+
+@item @anchor{kerninfo} kerninfo
+Display kernel loop and PPS statistics.
+As with other ntpq output, times are in milliseconds.
+The precision value displayed is in milliseconds as well,
+unlike the precision system variable.
+
+@item @anchor{lassoc} lassociations
+Perform the same function as the associations command,
+except display mobilized and unmobilized associations.
+
+@item @anchor{monstats} monstats
+Display monitor facility statistics.
+
+@item @anchor{mrulist} mrulist [limited | kod | mincount=@kbd{count} | laddr=@kbd{localaddr} | sort=@kbd{sortorder} | resany=@kbd{hexmask} | resall=@kbd{hexmask}]
+Obtain and print traffic counts collected and maintained by
+the monitor facility.
+With the exception of @code{sort=@kbd{sortorder}},
+the options filter the list returned by @code{ntpd}.
+The @code{limited} and @code{kod} options return only entries
+representing client addresses from which the last packet received
+triggered either discarding or a KoD response.
+The @code{mincount=@kbd{count}} option filters entries representing
+less than @code{@kbd{count}} packets.
+The @code{laddr=@kbd{localaddr}} option filters entries for packets
+received on any local address other than @code{@kbd{localaddr}}.
+@code{resany=@kbd{hexmask}} and @code{resall=@kbd{hexmask}}
+filter entries containing none or less than all, respectively,
+of the bits in @code{@kbd{hexmask}}, which must begin with @code{0x}.
+@*
+The @code{@kbd{sortorder}} defaults to @code{lstint} and may be any of
+@code{addr}, @code{count}, @code{avgint}, @code{lstint}, or
+any of those preceded by a minus sign (hyphen) to reverse the sort order.
+The output columns are:
+
+@multitable @columnfractions .1 .4
+@headitem Column @tab Description
+
+@item @code{lstint}
+@tab
+Interval in s between the receipt of the most recent packet from this
+address and the completion of the retrieval of the MRU list by @code{ntpq}
+
+@item @code{avgint}
+@tab
+Average interval in s between packets from this address.
+
+@item @code{rstr}
+@tab
+Restriction flags associated with this address.
+Most are copied unchanged from the matching @code{restrict} command,
+however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
+
+@item @code{r}
+@tab
+Rate control indicator, either a period, @code{L} or @code{K} for
+no rate control response, rate limiting by discarding, or
+rate limiting with a KoD response, respectively.
+
+@item @code{m}
+@tab
+Packet mode.
+@item @code{v}
+@tab
+Packet version number.
+
+@item @code{count}
+@tab
+Packets received from this address.
+
+@item @code{rport}
+@tab
+Source port of last packet from this address.
+
+@item @code{remote address}
+@tab
+DNS name, numeric address, or address followed by claimed DNS name which
+could not be verified in parentheses.
+
+@end multitable
+
+@item @anchor{mreadvar} @code{mreadvar @kbd{assocID} @kbd{assocID} [ @kbd{variable_name} [ = @kbd{value}[ ... ]}
+@itemx @anchor{mrv} @code{mrv @kbd{assocID} @kbd{assocID} [ @kbd{variable_name} [ = @kbd{value}[ ... ]}
+Perform the same function as the @code{readvar} command,
+except for a range of association IDs.
+This range is determined from the association list cached by
+the most recent @code{associations} command.
+
+@item @anchor{passoc} @code{passociations}
+Perform the same function as the @code{associations command}, except that
+it uses previously stored data rather than making a new query.
+
+@item @anchor{pe} @code{peers}
+Display a list of peers in the form:
+@*
+@code{[tally]remote refid st t when pool reach delay offset jitter}
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+@item @code{[tally]}
+@tab
+single-character code indicating current value of the @code{select} field
+of the @url{decode.html#peer, peer status word}.
+
+@item @code{remote}
+@tab
+host name (or IP number) of peer
+
+@item @code{refid}
+@tab
+association ID or @url{decode.html#kiss, kiss code}.
+
+@item @code{st}
+@tab
+stratum
+
+@item @code{t}
+@tab
+@code{u}: unicast or manycast client,
+@code{b}: broadcast or multicast client,
+@code{l}: local (reference clock),
+@code{s}: symmetric (peer),
+@code{A}: manycast server,
+@code{B}: broadcast server,
+@code{M}: multicast server.
+
+@item @code{when}
+@tab
+sec/min/hr since last received packet
+
+@item @code{poll}
+@tab
+poll interval (log(2) s)
+
+@item @code{reach}
+@tab
+reach shift register (octal)
+
+@item @code{delay}
+@tab
+roundtrip delay
+
+@item @code{offset}
+@tab
+offset of server relative to this host
+
+@item @code{jitter}
+@tab
+jitter
+
+@end multitable
+
+@item @anchor{rv} readvar @kbd{assocID} @kbd{name} [ = @kbd{value} ] [,...]
+@itemx rv @kbd{assocID} [ @kbd{name} ] [,...]
+Display the specified variables.
+If @code{@kbd{assocID}} is zero,
+the variables are from the @ref{system, system variables} name space,
+otherwise they are from the @ref{peer, peer variables} name space.
+The @kbd{assocID} is required, as the same name can occur in both spaces.
+If no @kbd{name} is included,
+all operative variables in the name space are displayed.
+In this case only, if the @code{@kbd{assocID}} is omitted, it is assumed zero.
+Multiple names are specified with comma separators and without whitespace.
+Note that time values are represented in milliseconds and
+frequency values in parts-per-million (PPM).
+Some NTP timestamps are represented in the format YYYYMMDDTTTT,
+where YYYY is the year, MM the month of year, DD the day of month and
+TTTT the time of day.
+
+@item @anchor{saveconfig} @code{saveconfig @kbd{filename}}
+Write the current configuration, including any runtime modifications
+given with @code{:config} or @code{config-from-file},
+to the ntpd host's file @kbd{filename}.
+This command will be rejected by the server unless
+@url{miscopt.html#saveconfigdir, saveconfigdir}
+appears in the @code{ntpd} configuration file.
+@kbd{filename} can use @code{strftime()} format specifiers
+to substitute the current date and time, for example,
+@code{saveconfig ntp-%Y%m%d-%H%M%S.conf}.
+The filename used is stored in system variable @code{savedconfig}.
+Authentication is required.
+
+@item @anchor{writevar} writevar @kbd{assocID} @kbd{name} = @kbd{value} [,...]
+Write the specified variables.
+If the @code{@kbd{assocID}} is zero, the variables are from the
+@ref{system, system variables} name space, otherwise they are from the
+@ref{peer, peer variables} name space.
+The @code{@kbd{assocID}} is required,
+as the same name can occur in both spaces.
+
+@item @anchor{sysinfo} @code{sysinfo}
+Display operational summary.
+
+@item @anchor{sysstats} @code{sysstats}
+Print statistics counters maintained in the protocol module.
+
+@end table
+
+@node Status Words and Kiss Codes, System Variables, Control Message Commands, Top
+@comment node-name, next, previous, up
+@section Status Words and Kiss Codes
+
+The current state of the operating program is shown
+in a set of status words maintained by the system
+and each association separately.
+These words are displayed in the @code{rv} and @code{as} commands
+both in hexadecimal and decoded short tip strings.
+The codes, tips and short explanations are on the
+@url{decode.html, Event Messages and Status Words} page.
+The page also includes a list of system and peer messages,
+the code for the latest of which is included in the status word.
+
+Information resulting from protocol machine state transitions
+is displayed using an informal set of ASCII strings called
+@url{decode.html#kiss, kiss codes}.
+The original purpose was for kiss-o'-death (KoD) packets sent
+by the server to advise the client of an unusual condition.
+They are now displayed, when appropriate,
+in the reference identifier field in various billboards.
+
+@node System Variables, Peer Variables, Status Words and Kiss Codes, Top
+@comment node-name, next, previous, up
+@section System Variables
+
+The following system variables appear in the @code{rv} billboard.
+Not all variables are displayed in some configurations.
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+
+@item @code{status}
+@tab
+@url{decode.html#sys, system status word}
+
+@item @code{version}
+@tab
+NTP software version and build time
+
+@item @code{processor}
+@tab
+hardware platform and version
+
+@item @code{system}
+@tab
+operating system and version
+
+@item @code{leap}
+@tab
+leap warning indicator (0-3)
+
+@item @code{stratum}
+@tab
+stratum (1-15)
+
+@item @code{precision}
+@tab
+precision (log(2) s)
+
+@item @code{rootdelay}
+@tab
+total roundtrip delay to the primary reference clock
+
+@item @code{rootdisp}
+@tab
+total dispersion to the primary reference clock
+
+@item @code{peer}
+@tab
+system peer association ID
+
+@item @code{tc}
+time constant and poll exponent (log(2) s) (3-17)
+
+@item @code{mintc}
+minimum time constant (log(2) s) (3-10)
+
+@item @code{clock}
+@tab
+date and time of day
+
+@item @code{refid}
+reference ID or @url{decode.html#kiss, kiss code}
+
+@item @code{reftime}
+@tab
+reference time
+
+@item @code{offset}
+@tab
+combined offset of server relative to this host
+
+@item @code{sys_jitter}
+@tab
+combined system jitter
+
+@item @code{frequency}
+@tab
+frequency offset (PPM) relative to hardware clock
+
+@item @code{clk_wander}
+@tab
+clock frequency wander (PPM)
+
+@item @code{clk_jitter}
+@tab
+clock jitter
+
+@item @code{tai}
+@tab
+TAI-UTC offset (s)
+
+@item @code{leapsec}
+@tab
+NTP seconds when the next leap second is/was inserted
+
+@item @code{expire}
+@tab
+NTP seconds when the NIST leapseconds file expires
+
+@end multitable
+
+The jitter and wander statistics are exponentially-weighted RMS averages.
+The system jitter is defined in the NTPv4 specification;
+the clock jitter statistic is computed by the clock discipline module.
+
+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 Autokey dance:
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+
+@item @code{host}
+@tab
+Autokey host name for this host
+
+@item @code{ident}
+@tab
+Autokey group name for this host
+
+@item @code{flags}
+@tab
+host flags (see Autokey specification)
+
+@item @code{digest}
+@tab
+OpenSSL message digest algorithm
+
+@item @code{signature}
+@tab
+OpenSSL digest/signature scheme
+
+@item @code{update}
+@tab
+NTP seconds at last signature update
+
+@item @code{cert}
+@tab
+certificate subject, issuer and certificate flags
+
+@item @code{until}
+@tab
+NTP seconds when the certificate expires
+
+@end multitable
+
+@node Peer Variables, Clock Variables, System Variables, Top
+@comment node-name, next, previous, up
+@section Peer Variables
+
+The following peer variables appear in the @code{rv} billboard
+for each association.
+Not all variables are displayed in some configurations.
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+
+@item @code{associd}
+@tab
+association ID
+
+@item @code{status}
+@tab
+@url{decode.html#peer, peer status word}
+
+@item @code{srcadr}
+@itemx @code{srcport}
+@tab
+source (remote) IP address and port
+
+@item @code{dstadr}
+@itemx @code{dstport}
+@tab
+destination (local) IP address and port
+
+@item @code{leap}
+@tab
+leap indicator (0-3)
+
+@item @code{stratum}
+@tab
+stratum (0-15)
+
+@item @code{precision}
+@tab
+precision (log(2) s)
+
+@item @code{rootdelay}
+@tab
+total roundtrip delay to the primary reference clock
+
+@item @code{rootdisp}
+@tab total root dispersion to the primary reference clock
+
+@item @code{refid}
+@tab
+reference ID or @url{decode.html#kiss, kiss code}
+
+@item @code{reftime}
+@tab
+reference time
+
+@item @code{reach}
+@tab
+reach register (octal)
+
+@item @code{unreach}
+@tab
+unreach counter
+
+@item @code{hmode}
+@tab
+host mode (1-6)
+
+@item @code{pmode}
+@tab
+peer mode (1-5)
+
+@item @code{hpoll}
+@tab
+host poll exponent (log(2) s) (3-17)
+@item @code{ppoll}
+@tab
+peer poll exponent (log(2) s) (3-17)
+
+@item @code{headway}
+@tab
+headway (see @url{rate.html, Rate Management and the Kiss-o'-Death Packet})
+
+@item @code{flash}
+@tab
+@url{decode.html#flash, flash status word}
+
+@item @code{offset}
+@tab
+filter offset
+
+@item @code{delay}
+@tab
+filter delay
+
+@item @code{dispersion}
+@tab
+filter dispersion
+
+@item @code{jitter}
+@tab
+filter jitter
+
+@item @code{ident}
+@tab
+Autokey group name for this association
+
+@item @code{bias}
+@tab
+unicast/broadcast bias
+
+@item @code{xleave}
+@tab
+interleave delay (see @url{xleave.html, NTP Interleaved Modes})
+
+@end multitable
+
+The bias variable is calculated when the first broadcast packet is received
+after the calibration volley. It represents the offset of the broadcast
+subgraph relative to the unicast subgraph. The xleave variable appears
+only the interleaved symmetric and interleaved modes. It represents
+the internal queuing, buffering and transmission delays for the preceding
+packet.
+
+When the NTPv4 daemon is compiled with the OpenSSL software library,
+additional peer variables are displayed, including the following:
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+
+@item @code{flags}
+@tab
+peer flags (see Autokey specification)
+
+@item @code{host}
+@tab
+Autokey server name
+
+@item @code{flags}
+@tab
+peer flags (see Autokey specification)
+
+@item @code{signature}
+@tab
+OpenSSL digest/signature scheme
+
+@item @code{initsequence}
+@tab
+initial key ID
+
+@item @code{initkey}
+@tab
+initial key index
+
+@item @code{timestamp}
+@tab
+Autokey signature timestamp
+
+@end multitable
+
+@node Clock Variables, , Peer Variables, Top
+@comment node-name, next, previous, up
+@section Clock Variables
+
+The following clock variables appear in the @code{cv} billboard for each association with a reference clock. Not all variables are displayed in some configurations.
+
+@multitable @columnfractions .1 .2
+@headitem Variable @tab Description
+@item @code{associd}
+@tab association ID
+@item @code{status}
+@tab @url{decode.html#clock, clock status word}
+@item @code{device}
+@tab device description
+@item @code{timecode}
+@tab ASCII time code string (specific to device)
+@item @code{poll}
+@tab poll messages sent
+@item @code{noreply}
+@tab no reply
+@item @code{badformat}
+@tab bad format
+@item @code{baddata}
+@tab bad date or time
+@item @code{fudgetime1}
+@tab fudge time 1
+@item @code{fudgetime2}
+@tab fudge time 2
+@item @code{stratum}
+@tab driver stratum
+@item @code{refid}
+@tab driver reference ID
+@item @code{flags}
+@tab driver flags
+@end multitable
diff --git a/ntpsnmpd/Makefile.am b/ntpsnmpd/Makefile.am
index 168de2787310..11ecf1b0dcc9 100644
--- a/ntpsnmpd/Makefile.am
+++ b/ntpsnmpd/Makefile.am
@@ -1,38 +1,72 @@
NULL=
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= @MAKE_NTPSNMPD@
-else
-sbin_PROGRAMS= @MAKE_NTPSNMPD@
-endif
+bin_PROGRAMS= $(NTPSNMPD_DB)
+libexec_PROGRAMS= $(NTPSNMPD_DL)
+sbin_PROGRAMS= $(NTPSNMPD_DS)
EXTRA_PROGRAMS= ntpsnmpd
ntpsnmpd_SOURCES= netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
ntpsnmpd-opts.c ntpsnmpd-opts.h ntpSnmpSubagentObject.h \
ntp_snmp.h
# HMS: we probably want a version.o file here, too.
-LDADD= ../ntpq/libntpq.a ../libntp/libntp.a @LCRYPTO@ @SNMP_LIBS@ \
- $(LIBOPTS_LDADD)
-AM_CPPFLAGS= -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) @SNMP_CPPFLAGS@
-
-AM_CFLAGS= @SNMP_CFLAGS@
-EXTRA_DIST= ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \
- ntpsnmpd-opts.menu ntpv4-mib.mib
+LDADD = ../ntpq/libntpq.a ../libntp/libntp.a
+LDADD += $(SNMP_LIBS) $(LDADD_LIBNTP) $(LIBM)
+LDADD += $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBOPTS_LDADD)
+
+AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP)
+
+AM_CPPFLAGS = -I$(top_srcdir)/ntpq
+AM_CPPFLAGS += $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(SNMP_CPPFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+EXTRA_DIST= \
+ invoke-ntpsnmpd.menu \
+ invoke-ntpsnmpd.texi \
+ ntpsnmpd-opts.def \
+ ntpsnmpd.1ntpsnmpdman \
+ ntpsnmpd.1ntpsnmpdmdoc \
+ ntpsnmpd.man.in \
+ ntpsnmpd.mdoc.in \
+ ntpsnmpd.html \
+ ntpsnmpd.texi \
+ ntpv4-mib.mib \
+ $(NULL)
+
BUILT_SOURCES= ntpsnmpd-opts.c ntpsnmpd-opts.h
CLEANFILES=
-noinst_DATA= $(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu
-man_MANS= $(srcdir)/ntpsnmpd.1
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+DISTCLEANFILES= config.log $(man_MANS)
+
+html_DATA= \
+ $(srcdir)/ntpsnmpd.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntpsnmpd.menu \
+ $(srcdir)/invoke-ntpsnmpd.texi \
+ $(srcdir)/ntpsnmpd.man.in \
+ $(srcdir)/ntpsnmpd.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntpsnmpd.$(NTPSNMPD_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
$(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
@@ -40,15 +74,44 @@ $(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
$(run_ag) ntpsnmpd-opts.def
-$(srcdir)/ntpsnmpd.1: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpsnmpd ntpsnmpd-opts.def
+###
-$(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.texi
+$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
+ mv $(srcdir)/ntpsnmpd.man.in+ $(srcdir)/ntpsnmpd.man.in
+
+###
+
+$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
+ mv $(srcdir)/ntpsnmpd.mdoc.in+ $(srcdir)/ntpsnmpd.mdoc.in
+
+###
+
+ntpsnmpd.$(NTPSNMPD_MS): $(srcdir)/ntpsnmpd.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsnmpd.$(NTPSNMPD_MS)+:$(srcdir)/ntpsnmpd.$(MANTAGFMT).in
+ mv ntpsnmpd.$(NTPSNMPD_MS)+ ntpsnmpd.$(NTPSNMPD_MS)
+
+###
+
+$(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpsnmpd-opts.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/ntpsnmpd/Makefile.in b/ntpsnmpd/Makefile.in
index 81376b1ef74b..6733b3cb19cb 100644
--- a/ntpsnmpd/Makefile.in
+++ b/ntpsnmpd/Makefile.in
@@ -41,49 +41,94 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpsnmpd$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf
subdir = ntpsnmpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
am_ntpsnmpd_OBJECTS = netsnmp_daemonize.$(OBJEXT) ntpsnmpd.$(OBJEXT) \
ntpSnmpSubagentObject.$(OBJEXT) ntpsnmpd-opts.$(OBJEXT)
ntpsnmpd_OBJECTS = $(am_ntpsnmpd_OBJECTS)
ntpsnmpd_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
ntpsnmpd_DEPENDENCIES = ../ntpq/libntpq.a ../libntp/libntp.a \
- $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(ntpsnmpd_SOURCES)
DIST_SOURCES = $(ntpsnmpd_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -108,27 +153,40 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -140,21 +198,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -162,6 +230,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -180,14 +249,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -200,10 +323,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -211,9 +336,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -222,6 +365,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -270,45 +414,73 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-AUTOMAKE_OPTIONS =
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = @MAKE_NTPSNMPD@
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = @MAKE_NTPSNMPD@
+bin_PROGRAMS = $(NTPSNMPD_DB)
+libexec_PROGRAMS = $(NTPSNMPD_DL)
+sbin_PROGRAMS = $(NTPSNMPD_DS)
ntpsnmpd_SOURCES = netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
ntpsnmpd-opts.c ntpsnmpd-opts.h ntpSnmpSubagentObject.h \
ntp_snmp.h
# HMS: we probably want a version.o file here, too.
-LDADD = ../ntpq/libntpq.a ../libntp/libntp.a @LCRYPTO@ @SNMP_LIBS@ \
- $(LIBOPTS_LDADD)
-
-AM_CPPFLAGS = -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) @SNMP_CPPFLAGS@
-
-AM_CFLAGS = @SNMP_CFLAGS@
-EXTRA_DIST = ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \
- ntpsnmpd-opts.menu ntpv4-mib.mib
-
-BUILT_SOURCES = ntpsnmpd-opts.c ntpsnmpd-opts.h .deps-ver
-CLEANFILES = .deps-ver
-noinst_DATA = $(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu
-man_MANS = $(srcdir)/ntpsnmpd.1
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-
-std_def_list = $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
-
+LDADD = ../ntpq/libntpq.a ../libntp/libntp.a $(SNMP_LIBS) \
+ $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NTP) \
+ $(LIBOPTS_LDADD)
+AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP)
+AM_CPPFLAGS = -I$(top_srcdir)/ntpq $(NTP_INCS) $(LIBOPTS_CFLAGS) \
+ $(SNMP_CPPFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
+EXTRA_DIST = \
+ invoke-ntpsnmpd.menu \
+ invoke-ntpsnmpd.texi \
+ ntpsnmpd-opts.def \
+ ntpsnmpd.1ntpsnmpdman \
+ ntpsnmpd.1ntpsnmpdmdoc \
+ ntpsnmpd.man.in \
+ ntpsnmpd.mdoc.in \
+ ntpsnmpd.html \
+ ntpsnmpd.texi \
+ ntpv4-mib.mib \
+ $(NULL)
+
+BUILT_SOURCES = ntpsnmpd-opts.c ntpsnmpd-opts.h check-libntp \
+ check-libopts .deps-ver
+CLEANFILES = check-libntp check-libopts .deps-ver
+DISTCLEANFILES = config.log $(man_MANS)
+html_DATA = \
+ $(srcdir)/ntpsnmpd.html \
+ $(NULL)
+
+noinst_DATA = \
+ $(srcdir)/invoke-ntpsnmpd.menu \
+ $(srcdir)/invoke-ntpsnmpd.texi \
+ $(srcdir)/ntpsnmpd.man.in \
+ $(srcdir)/ntpsnmpd.mdoc.in \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+man_MANS = ntpsnmpd.$(NTPSNMPD_MS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -381,6 +553,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -426,7 +641,7 @@ clean-sbinPROGRAMS:
rm -f $$list
ntpsnmpd$(EXEEXT): $(ntpsnmpd_OBJECTS) $(ntpsnmpd_DEPENDENCIES)
@rm -f ntpsnmpd$(EXEEXT)
- $(LINK) $(ntpsnmpd_OBJECTS) $(ntpsnmpd_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntpsnmpd_OBJECTS) $(ntpsnmpd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -440,22 +655,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpsnmpd.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -465,10 +683,10 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -494,7 +712,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -503,6 +721,64 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -604,7 +880,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -630,6 +906,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -637,8 +914,8 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -658,13 +935,14 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-data-local install-htmlDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -675,7 +953,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man8
install-pdf: install-pdf-am
@@ -705,64 +983,109 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man8
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-man1 \
+ install-htmlDATA install-info install-info-am \
+ install-libexecPROGRAMS install-man install-man1 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
+ uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinPROGRAMS
+install-data-local: install-html
+
$(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
$(run_ag) ntpsnmpd-opts.def
-$(srcdir)/ntpsnmpd.1: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpsnmpd ntpsnmpd-opts.def
+###
+
+$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
+ mv $(srcdir)/ntpsnmpd.man.in+ $(srcdir)/ntpsnmpd.man.in
+
+###
+
+$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
+ mv $(srcdir)/ntpsnmpd.mdoc.in+ $(srcdir)/ntpsnmpd.mdoc.in
+
+###
-$(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.texi
+ntpsnmpd.$(NTPSNMPD_MS): $(srcdir)/ntpsnmpd.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsnmpd.$(NTPSNMPD_MS)+:$(srcdir)/ntpsnmpd.$(MANTAGFMT).in
+ mv ntpsnmpd.$(NTPSNMPD_MS)+ ntpsnmpd.$(NTPSNMPD_MS)
+
+###
+
+$(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpsnmpd-opts.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -771,17 +1094,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -790,7 +1106,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/ntpsnmpd/ntpsnmpd-opts.menu b/ntpsnmpd/invoke-ntpsnmpd.menu
index 886e80a7316f..886e80a7316f 100644
--- a/ntpsnmpd/ntpsnmpd-opts.menu
+++ b/ntpsnmpd/invoke-ntpsnmpd.menu
diff --git a/ntpsnmpd/invoke-ntpsnmpd.texi b/ntpsnmpd/invoke-ntpsnmpd.texi
new file mode 100644
index 000000000000..6631f01a80d6
--- /dev/null
+++ b/ntpsnmpd/invoke-ntpsnmpd.texi
@@ -0,0 +1,188 @@
+@node ntpsnmpd Invocation
+@section Invoking ntpsnmpd
+@pindex ntpsnmpd
+@cindex NTP SNMP MIB agent
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:50:32 AM by AutoGen 5.18.5pre4
+# From the definitions ntpsnmpd-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{ntpsnmpd}
+is an SNMP MIB agent designed to interface with
+@code{ntpd(1ntpdmdoc)}.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpsnmpd} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntpsnmpd usage:: ntpsnmpd help/usage (@option{--help})
+* ntpsnmpd agentxsocket:: agentxsocket option
+* ntpsnmpd config:: presetting/configuring ntpsnmpd
+* ntpsnmpd exit status:: exit status
+* ntpsnmpd Usage:: Usage
+* ntpsnmpd Notes:: Notes
+* ntpsnmpd Authors:: Authors
+@end menu
+
+@node ntpsnmpd usage
+@subsection ntpsnmpd help/usage (@option{--help})
+@cindex ntpsnmpd help
+
+This is the automatically generated usage text for ntpsnmpd.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8
+Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+ Flg Arg Option-Name Description
+ -n no nofork Do not fork
+ -p no syslog Log to syslog()
+ Str agentxsocket The socket address ntpsnmpd uses to connect to net-snmpd
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -> opt save-opts save the option state to a config file
+ -< Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTPSNMPD_*
+
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+@end example
+@exampleindent 4
+
+@node ntpsnmpd agentxsocket
+@subsection agentxsocket option
+@cindex ntpsnmpd-agentxsocket
+
+This is the ``the socket address ntpsnmpd uses to connect to net-snmpd'' option.
+This option takes a string argument.
+[<transport-specifier>:]<transport-address>
+The default "agent X socket" is the Unix Domain socket
+@file{unix:/var/agentx/master}.
+Another common alternative is @file{tcp:localhost:705}.
+
+
+@node ntpsnmpd config
+@subsection presetting/configuring ntpsnmpd
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTPSNMPD} and @code{NTPSNMPD_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{NTPSNMPD} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+@noindent
+@code{libopts} will search in 2 places for configuration files:
+@itemize @bullet
+@item
+$HOME
+@item
+$PWD
+@end itemize
+The environment variables @code{HOME}, and @code{PWD}
+are expanded and replaced when @file{ntpsnmpd} runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named @file{.ntprc} is searched for
+within that directory and processed.
+
+Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+@example
+[NTPSNMPD]
+@end example
+@noindent
+or by
+@example
+<?program ntpsnmpd>
+@end example
+@noindent
+Do not mix these styles within one configuration file.
+
+Compound values and carefully constructed string values may also be
+specified using XML syntax:
+@example
+<option-name>
+ <sub-opt>...&lt;...&gt;...</sub-opt>
+</option-name>
+@end example
+@noindent
+yielding an @code{option-name.sub-opt} string value of
+@example
+"...<...>..."
+@end example
+@code{AutoOpts} does not track suboptions. You simply note that it is a
+hierarchicly valued option. @code{AutoOpts} does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node ntpsnmpd exit status
+@subsection ntpsnmpd exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@item 66 (EX_NOINPUT)
+A specified configuration file could not be loaded.
+@item 70 (EX_SOFTWARE)
+libopts had an internal operational error. Please report
+it to autogen-users@@lists.sourceforge.net. Thank you.
+@end table
+@node ntpsnmpd Usage
+@subsection ntpsnmpd Usage
+@node ntpsnmpd Notes
+@subsection ntpsnmpd Notes
+@node ntpsnmpd Authors
+@subsection ntpsnmpd Authors
diff --git a/ntpsnmpd/netsnmp_daemonize.c b/ntpsnmpd/netsnmp_daemonize.c
index 43cba8922ca1..969caa0db77a 100644
--- a/ntpsnmpd/netsnmp_daemonize.c
+++ b/ntpsnmpd/netsnmp_daemonize.c
@@ -191,8 +191,10 @@ int
netsnmp_daemonize(int quit_immediately, int stderr_log)
{
int i = 0;
+ int saved_errno;
+
DEBUGMSGT(("daemonize","deamonizing...\n"));
-#if HAVE_WORKING_FORK
+#ifdef HAVE_WORKING_FORK
/*
* Fork to return control to the invoking process and to
* guarantee that we aren't a process group leader.
@@ -200,10 +202,11 @@ netsnmp_daemonize(int quit_immediately, int stderr_log)
i = fork();
if (i != 0) {
/* Parent. */
+ saved_errno = errno;
DEBUGMSGT(("daemonize","first fork returned %d.\n", i));
if(i == -1) {
snmp_log(LOG_ERR,"first fork failed (errno %d) in "
- "netsnmp_daemonize()\n", errno);
+ "netsnmp_daemonize()\n", saved_errno);
return -1;
}
if (quit_immediately) {
@@ -220,10 +223,11 @@ netsnmp_daemonize(int quit_immediately, int stderr_log)
* Fork to let the process/session group leader exit.
*/
if ((i = fork()) != 0) {
+ saved_errno = errno;
DEBUGMSGT(("daemonize","second fork returned %d.\n", i));
if(i == -1) {
snmp_log(LOG_ERR,"second fork failed (errno %d) in "
- "netsnmp_daemonize()\n", errno);
+ "netsnmp_daemonize()\n", saved_errno);
}
/* Parent. */
exit(0);
diff --git a/ntpsnmpd/ntpSnmpSubagentObject.c b/ntpsnmpd/ntpSnmpSubagentObject.c
index 57b10ba49b0e..f65fedf600de 100644
--- a/ntpsnmpd/ntpSnmpSubagentObject.c
+++ b/ntpsnmpd/ntpSnmpSubagentObject.c
@@ -121,7 +121,7 @@ ntpsnmpd_parse_string(
if (value[0] == '"') {
val_cnt--;
- strncpy(value, &value[1], valuesize);
+ strlcpy(value, &value[1], valuesize);
if (val_cnt > 0 && value[val_cnt - 1] == '"') {
val_cnt--;
value[val_cnt] = '\0';
diff --git a/ntpsnmpd/ntpsnmpd-opts.c b/ntpsnmpd/ntpsnmpd-opts.c
index 77a8a698a112..4877ffe4ccf1 100644
--- a/ntpsnmpd/ntpsnmpd-opts.c
+++ b/ntpsnmpd/ntpsnmpd-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:36 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:50:22 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,131 +15,185 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpsnmpd program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ntpsnmpd-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#define OPTION_CODE_COMPILE 1
-#include "ntpsnmpd-opts.h"
-
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
+#define zCopyright (ntpsnmpd_opt_strs+0)
+#define zLicenseDescrip (ntpsnmpd_opt_strs+314)
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[42] =
-"ntpsnmpd 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
#ifndef NULL
# define NULL 0
#endif
-/*
- * Nofork option description:
+/**
+ * static const strings for ntpsnmpd options
*/
-static char const zNoforkText[] =
- "Do not fork";
-static char const zNofork_NAME[] = "NOFORK";
-static char const zNofork_Name[] = "nofork";
-#define NOFORK_FLAGS (OPTST_DISABLED)
-
-/*
- * Syslog option description:
+static char const ntpsnmpd_opt_strs[1548] =
+/* 0 */ "ntpsnmpd 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 954 */ "Do not fork\0"
+/* 966 */ "NOFORK\0"
+/* 973 */ "nofork\0"
+/* 980 */ "Log to syslog()\0"
+/* 996 */ "SYSLOG\0"
+/* 1003 */ "syslog\0"
+/* 1010 */ "The socket address ntpsnmpd uses to connect to net-snmpd\0"
+/* 1067 */ "AGENTXSOCKET\0"
+/* 1080 */ "agentxsocket\0"
+/* 1093 */ "unix:/var/agentx/master\0"
+/* 1117 */ "display extended usage information and exit\0"
+/* 1161 */ "help\0"
+/* 1166 */ "extended usage information passed thru pager\0"
+/* 1211 */ "more-help\0"
+/* 1221 */ "output version information and exit\0"
+/* 1257 */ "version\0"
+/* 1265 */ "save the option state to a config file\0"
+/* 1304 */ "save-opts\0"
+/* 1314 */ "load options from a config file\0"
+/* 1346 */ "LOAD_OPTS\0"
+/* 1356 */ "no-load-opts\0"
+/* 1369 */ "no\0"
+/* 1372 */ "NTPSNMPD\0"
+/* 1381 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/* 1482 */ "$HOME\0"
+/* 1488 */ ".\0"
+/* 1490 */ ".ntprc\0"
+/* 1497 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1531 */ "\n\0"
+/* 1533 */ "ntpsnmpd 4.2.8";
+
+/**
+ * nofork option description:
*/
-static char const zSyslogText[] =
- "Log to syslog()";
-static char const zSyslog_NAME[] = "SYSLOG";
-static char const zSyslog_Name[] = "syslog";
-#define SYSLOG_FLAGS (OPTST_DISABLED)
-
-/*
- * Agentxsocket option description:
+/** Descriptive text for the nofork option */
+#define NOFORK_DESC (ntpsnmpd_opt_strs+954)
+/** Upper-cased name for the nofork option */
+#define NOFORK_NAME (ntpsnmpd_opt_strs+966)
+/** Name string for the nofork option */
+#define NOFORK_name (ntpsnmpd_opt_strs+973)
+/** Compiled in flag settings for the nofork option */
+#define NOFORK_FLAGS (OPTST_DISABLED)
+
+/**
+ * syslog option description:
+ */
+/** Descriptive text for the syslog option */
+#define SYSLOG_DESC (ntpsnmpd_opt_strs+980)
+/** Upper-cased name for the syslog option */
+#define SYSLOG_NAME (ntpsnmpd_opt_strs+996)
+/** Name string for the syslog option */
+#define SYSLOG_name (ntpsnmpd_opt_strs+1003)
+/** Compiled in flag settings for the syslog option */
+#define SYSLOG_FLAGS (OPTST_DISABLED)
+
+/**
+ * agentXSocket option description:
*/
-static char const zAgentxsocketText[] =
- "The socket address ntpsnmpd uses to connect to net-snmpd";
-static char const zAgentxsocket_NAME[] = "AGENTXSOCKET";
-static char const zAgentxsocket_Name[] = "agentxsocket";
-static char const zAgentxsocketDefaultArg[] = "unix:/var/agentx/master";
-#define AGENTXSOCKET_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the agentXSocket option */
+#define AGENTXSOCKET_DESC (ntpsnmpd_opt_strs+1010)
+/** Upper-cased name for the agentXSocket option */
+#define AGENTXSOCKET_NAME (ntpsnmpd_opt_strs+1067)
+/** Name string for the agentXSocket option */
+#define AGENTXSOCKET_name (ntpsnmpd_opt_strs+1080)
+/** The compiled in default value for the agentXSocket option argument */
+#define AGENTXSOCKET_DFT_ARG (ntpsnmpd_opt_strs+1093)
+/** Compiled in flag settings for the agentXSocket option */
+#define AGENTXSOCKET_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (ntpsnmpd_opt_strs+1117)
+#define HELP_name (ntpsnmpd_opt_strs+1161)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (ntpsnmpd_opt_strs+1166)
+#define MORE_HELP_name (ntpsnmpd_opt_strs+1211)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-static char const zSave_OptsText[] = "Save the option state to a config file";
-static char const zSave_Opts_Name[] = "save-opts";
-static char const zLoad_OptsText[] = "Load options from a config file";
-static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
-static char const zNotLoad_Opts_Name[] = "no-load-opts";
-static char const zNotLoad_Opts_Pfx[] = "no";
-#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
-/*
+#define VER_DESC (ntpsnmpd_opt_strs+1221)
+#define VER_name (ntpsnmpd_opt_strs+1257)
+#define SAVE_OPTS_DESC (ntpsnmpd_opt_strs+1265)
+#define SAVE_OPTS_name (ntpsnmpd_opt_strs+1304)
+#define LOAD_OPTS_DESC (ntpsnmpd_opt_strs+1314)
+#define LOAD_OPTS_NAME (ntpsnmpd_opt_strs+1346)
+#define NO_LOAD_OPTS_name (ntpsnmpd_opt_strs+1356)
+#define LOAD_OPTS_pfx (ntpsnmpd_opt_strs+1369)
+#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
+/**
* Declare option callback procedures
*/
-#if defined(TEST_NTPSNMPD_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-static tOptProc
- doUsageOpt;
-
-#else /* NOT defined TEST_NTPSNMPD_OPTS */
-/*
- * When not under test, there are different procs to use
- */
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ ntpOptionPrintVersion, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
doUsageOpt;
-#endif /* defined(TEST_NTPSNMPD_OPTS) */
-#ifdef TEST_NTPSNMPD_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_NTPSNMPD_OPTS */
+#define VER_PROC ntpOptionPrintVersion
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpsnmpd Option Descriptions.
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the ntpsnmpd Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ntpsnmpd program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_NOFORK,
@@ -147,11 +201,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --nofork */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zNoforkText, zNofork_NAME, zNofork_Name,
+ /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_OPT_SYSLOG,
@@ -159,11 +213,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SYSLOG_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --syslog */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSyslogText, zSyslog_NAME, zSyslog_Name,
+ /* desc, NAME, name */ SYSLOG_DESC, SYSLOG_NAME, SYSLOG_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 2, VALUE_OPT_AGENTXSOCKET,
@@ -171,97 +225,100 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ AGENTXSOCKET_FLAGS, 0,
- /* last opt argumnt */ { zAgentxsocketDefaultArg },
+ /* last opt argumnt */ { AGENTXSOCKET_DFT_ARG },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zAgentxsocketText, zAgentxsocket_NAME, zAgentxsocket_Name,
+ /* desc, NAME, name */ AGENTXSOCKET_DESC, AGENTXSOCKET_NAME, AGENTXSOCKET_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
+ | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
+ /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_DISABLE_IMM, 0,
+ | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionLoadOpt,
- /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
- /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
+ /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
+ /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntpsnmpd Option Environment
- */
-static char const zPROGNAME[9] = "NTPSNMPD";
-static char const zUsageTitle[103] =
-"ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
-static char const zRcName[7] = ".ntprc";
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of ntpsnmpd. */
+#define zPROGNAME (ntpsnmpd_opt_strs+1372)
+/** Reference to the title line for ntpsnmpd usage. */
+#define zUsageTitle (ntpsnmpd_opt_strs+1381)
+/** ntpsnmpd configuration file name. */
+#define zRcName (ntpsnmpd_opt_strs+1490)
+/** Directories to search for ntpsnmpd config files. */
static char const * const apzHomeList[3] = {
- "$HOME",
- ".",
+ ntpsnmpd_opt_strs+1482,
+ ntpsnmpd_opt_strs+1488,
NULL };
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-#define zDetail NULL
-static char const zFullVersion[] = NTPSNMPD_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+/** The ntpsnmpd program bug email address. */
+#define zBugsAddr (ntpsnmpd_opt_strs+1497)
+/** Clarification/explanation of what ntpsnmpd does. */
+#define zExplain (ntpsnmpd_opt_strs+1531)
+/** Extra detail explaining what ntpsnmpd does. */
+#define zDetail (NULL)
+/** The full version string for ntpsnmpd. */
+#define zFullVersion (ntpsnmpd_opt_strs+1533)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -271,16 +328,49 @@ static char const zFullVersion[] = NTPSNMPD_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define ntpsnmpd_full_usage (NULL)
+#define ntpsnmpd_short_usage (NULL)
-#define ntpsnmpd_full_usage NULL
-#define ntpsnmpd_short_usage NULL
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = NTPSNMPD_EXIT_SUCCESS;
+ optionUsage(&ntpsnmpdOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
+/* extracted from optmain.tlib near line 1245 */
+
+/**
+ * The directory containing the data associated with ntpsnmpd.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged ntpsnmpd
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define ntpsnmpd_packager_info NULL
#else
+/** Packager information for ntpsnmpd. */
static char const ntpsnmpd_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -293,7 +383,13 @@ static char const ntpsnmpd_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ntpsnmpd. The one structure that
+ * binds them all.
+ */
tOptions ntpsnmpdOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -328,120 +424,486 @@ tOptions ntpsnmpdOptions = {
PKGDATADIR, ntpsnmpd_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(NTPSNMPD_EXIT_SUCCESS);
-}
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_NTPSNMPD_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = NTPSNMPD_EXIT_SUCCESS;
- (void)optionProcess(&ntpsnmpdOptions, argc, argv);
- optionPutShell(&ntpsnmpdOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_NTPSNMPD_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * ntpsnmpd program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(NTPSNMPD_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the ntpsnmpdOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &ntpsnmpdOptions;
+ tOptions * const opts = &ntpsnmpdOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- ntpsnmpdOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the ntpsnmpdOptions structure noted in the
+ comments below. The literal text is defined in ntpsnmpd_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ ntpsnmpd_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via ntpsnmpdOptions.pzCopyright */
+ puts(_("ntpsnmpd 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via ntpsnmpdOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("Do not fork"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("Log to syslog()"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("The socket address ntpsnmpd uses to connect to net-snmpd"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("save the option state to a config file"));
+
+ /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
+ puts(_("load options from a config file"));
+
+ /* referenced via ntpsnmpdOptions.pzUsageTitle */
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
+
+ /* referenced via ntpsnmpdOptions.pzExplain */
+ puts(_("\n"));
+
+ /* referenced via ntpsnmpdOptions.pzFullVersion */
+ puts(_("ntpsnmpd 4.2.8"));
+
+ /* referenced via ntpsnmpdOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via ntpsnmpdOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/ntpsnmpd/ntpsnmpd-opts.def b/ntpsnmpd/ntpsnmpd-opts.def
index 7145f6347d7b..b3162e58e488 100644
--- a/ntpsnmpd/ntpsnmpd-opts.def
+++ b/ntpsnmpd/ntpsnmpd-opts.def
@@ -9,8 +9,6 @@ autogen definitions options;
prog-name = "ntpsnmpd";
prog-title = "NTP SNMP MIB agent";
-test-main;
-
flag = {
name = nofork;
value = n;
@@ -35,6 +33,114 @@ flag = {
descrip = "The socket address ntpsnmpd uses to connect to net-snmpd";
doc = <<- _EndOfDoc_
[<transport-specifier>:]<transport-address>
- The default is the Unix Domain socket "unix:/var/agentx/master". Another common alternative is tcp:localhost:705.
+ The default "agent X socket" is the Unix Domain socket
+ @file{unix:/var/agentx/master}.
+ Another common alternative is @file{tcp:localhost:705}.
_EndOfDoc_;
};
+
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+ .Nm
+ is an SNMP MIB agent designed to interface with
+ .Xr ntpd 1ntpdmdoc .
+ _END_PROG_MDOC_DESCRIP;
+};
+
+/*
+prog-info-descrip = <<- _END_PROG_INFO_DESCRIP
+ _END_PROG_INFO_DESCRIP;
+*/
+
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+ .Nm
+ currently uses a private MIB OID,
+ .Ql enterprises.5597 ,
+ which is the Meinberg top level OEM OID, and
+ .Ql 99
+ is the temporary working space for this project.
+ The final OID has to be registered with IANA
+ and this is done by the RFC Editor
+ when the NTPv4 MIB RFC is standardized.
+ .Pp
+ If you have
+ .Xr snmpwalk 1
+ installed you can run
+ .Dl % snmpwalk -v2c -c public localhost enterprises.5597.99
+ to see a list of all currently supported NTP MIB objects
+ and their current values.
+ _END_MDOC_USAGE;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+The following objects are currently supported:
+.Pp
+.Bl -tag -width ".Li ntpEntSoftwareVersionVal" -compact -offset indent
+.It Li ntpEntSoftwareName
+please fill me in...
+.It Li ntpEntSoftwareVersion
+please fill me in...
+.It Li ntpEntSoftwareVersionVal
+please fill me in...
+.It Li ntpEntSoftwareVendor
+please fill me in...
+.It Li ntpEntSystemType
+please fill me in...
+.It Li ntpEntTimeResolution
+please fill me in...
+.It Li ntpEntTimeResolutionVal
+please fill me in...
+.It Li ntpEntTimePrecision
+please fill me in...
+.It Li ntpEntTimePrecisionVal
+please fill me in...
+.It Li ntpEntTimeDistance
+please fill me in...
+.El
+ _END_MDOC_NOTES;
+};
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTHORS
+.An "Heiko Gerstung"
+ _END_MDOC_AUTHORS;
+};
+
+/*
+doc-section = {
+ ds-type = 'SEE ALSO';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_SEE_ALSO
+.Rs
+.%A H. Gerstung
+.%A C. Elliott
+.%A B. Haberman, Ed.
+.%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
+.%O RFC5907
+.Re
+ _END_MDOC_SEE_ALSO;
+};
+*/
+
+/*
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+ _END_MDOC_BUGS;
+};
+*/
diff --git a/ntpsnmpd/ntpsnmpd-opts.h b/ntpsnmpd/ntpsnmpd-opts.h
index d382425ce27f..67742a23dc77 100644
--- a/ntpsnmpd/ntpsnmpd-opts.h
+++ b/ntpsnmpd/ntpsnmpd-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:36 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:50:21 AM by AutoGen 5.18.5pre4
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntpsnmpd program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the ntpsnmpd program.
* These macros are documented in the AutoGen info file in the
@@ -31,22 +46,22 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for ntpsnmpd
*/
typedef enum {
INDEX_OPT_NOFORK = 0,
@@ -58,41 +73,61 @@ typedef enum {
INDEX_OPT_SAVE_OPTS = 6,
INDEX_OPT_LOAD_OPTS = 7
} teOptIndex;
-
+/** count of all options for ntpsnmpd */
#define OPTION_CT 8
-#define NTPSNMPD_VERSION "4.2.6p5"
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.6p5"
+/** ntpsnmpd version */
+#define NTPSNMPD_VERSION "4.2.8"
+/** Full ntpsnmpd version text */
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8"
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
* e.g. HAVE_OPT(NOFORK)
*/
#define DESC(n) (ntpsnmpdOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of ntpsnmpd exit codes
*/
typedef enum {
- NTPSNMPD_EXIT_SUCCESS = 0,
- NTPSNMPD_EXIT_FAILURE = 1
-} ntpsnmpd_exit_code_t;
-/*
+ NTPSNMPD_EXIT_SUCCESS = 0,
+ NTPSNMPD_EXIT_FAILURE = 1,
+ NTPSNMPD_EXIT_USAGE_ERROR = 64,
+ NTPSNMPD_EXIT_NO_CONFIG_INPUT = 66,
+ NTPSNMPD_EXIT_LIBOPTS_FAILURE = 70
+} ntpsnmpd_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
@@ -114,22 +149,27 @@ typedef enum {
# undef AGENTXSOCKET
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_OPT_NOFORK 'n'
#define VALUE_OPT_SYSLOG 'p'
-#define VALUE_OPT_AGENTXSOCKET 2
+#define VALUE_OPT_AGENTXSOCKET 0x1001
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1002
+/** option flag (value) for save-opts-value option */
#define VALUE_OPT_SAVE_OPTS '>'
+/** option flag (value) for load-opts-value option */
#define VALUE_OPT_LOAD_OPTS '<'
#define SET_OPT_SAVE_OPTS(a) STMTS( \
DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
- DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
+ DESC(SAVE_OPTS).optArg.argString = (char const*)(a))
/*
* Interface defines not associated with particular options
*/
@@ -137,15 +177,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(ntpsnmpdOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntpsnmpdOptions.curOptIdx = (n); \
- ntpsnmpdOptions.pzCurOpt = NULL)
+ ntpsnmpdOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntpsnmpdOptions.pUsageProc)(&ntpsnmpdOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the ntpsnmpd option descriptor.
@@ -155,6 +195,17 @@ extern tOptions ntpsnmpdOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -188,4 +239,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_NTPSNMPD_OPTS_H_GUARD */
+
/* ntpsnmpd-opts.h ends here */
diff --git a/ntpsnmpd/ntpsnmpd-opts.texi b/ntpsnmpd/ntpsnmpd-opts.texi
deleted file mode 100644
index 06e6bdb6b137..000000000000
--- a/ntpsnmpd/ntpsnmpd-opts.texi
+++ /dev/null
@@ -1,82 +0,0 @@
-@node ntpsnmpd Invocation
-@section Invoking ntpsnmpd
-@pindex ntpsnmpd
-@cindex NTP SNMP MIB agent
-@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:39 PM by AutoGen 5.12
-# From the definitions ntpsnmpd-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntpsnmpd} program. It documents the @command{ntpsnmpd} usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntpsnmpd usage:: ntpsnmpd usage help (-?)
-* ntpsnmpd agentxsocket:: agentxsocket option
-* ntpsnmpd nofork:: nofork option (-n)
-* ntpsnmpd syslog:: syslog option (-p)
-@end menu
-
-@node ntpsnmpd usage
-@subsection ntpsnmpd usage help (-?)
-@cindex ntpsnmpd usage
-
-This is the automatically generated usage text for ntpsnmpd:
-
-@exampleindent 0
-@example
-ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.6p5
-USAGE: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
- Flg Arg Option-Name Description
- -n no nofork Do not fork
- -p no syslog Log to syslog()
- Str agentxsocket The socket address ntpsnmpd uses to connect to net-snmpd
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - disabled as --no-load-opts
- - may appear multiple times
-
-Options are specified by doubled hyphens and their name or by a single
-hyphen and the flag character.
-
-The following option preset mechanisms are supported:
- - reading file $HOME/.ntprc
- - reading file ./.ntprc
- - examining environment variables named NTPSNMPD_*
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntpsnmpd agentxsocket
-@subsection agentxsocket option
-@cindex ntpsnmpd-agentxsocket
-
-This is the ``the socket address ntpsnmpd uses to connect to net-snmpd'' option.
-[<transport-specifier>:]<transport-address>
-The default is the Unix Domain socket "unix:/var/agentx/master". Another common alternative is tcp:localhost:705.
-
-@node ntpsnmpd nofork
-@subsection nofork option (-n)
-@cindex ntpsnmpd-nofork
-
-This is the ``do not fork'' option.
-
-
-@node ntpsnmpd syslog
-@subsection syslog option (-p)
-@cindex ntpsnmpd-syslog
-
-This is the ``log to syslog()'' option.
diff --git a/ntpsnmpd/ntpsnmpd.1 b/ntpsnmpd/ntpsnmpd.1
deleted file mode 100644
index 7fac938b9faf..000000000000
--- a/ntpsnmpd/ntpsnmpd.1
+++ /dev/null
@@ -1,87 +0,0 @@
-.TH NTPSNMPD 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:34:39 PM by AutoGen 5.12
-.\" From the definitions ntpsnmpd-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-ntpsnmpd \- NTP SNMP MIB agent
-.SH SYNOPSIS
-.B ntpsnmpd
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.PP
-All arguments must be options.
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBntpsnmpd\fP command.
-Its description is not documented.
-.SH OPTIONS
-.TP
-.BR \-n ", " \--nofork
-Do not fork.
-.sp
-
-.TP
-.BR \-p ", " \--syslog
-Log to syslog().
-.sp
-
-.TP
-.BR \--agentxsocket "=\fIstring\fP"
-The socket address ntpsnmpd uses to connect to net-snmpd.
-The default \fIstring\fP for this option is:
-.ti +4
- unix:/var/agentx/master
-.sp
-[<transport-specifier>:]<transport-address>
-The default is the Unix Domain socket "unix:/var/agentx/master". Another common alternative is tcp:localhost:705.
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
-.TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
-out of order.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from configuration ("RC" or ".INI") file(s) and values from
-environment variables named:
-.nf
- \fBNTPSNMPD_<option-name>\fP or \fBNTPSNMPD\fP
-.fi
-.ad
-The environmental presets take precedence (are processed later than)
-the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
-is searched for within those directories.
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBntpsnmpd\fP
-option definitions.
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdman b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
new file mode 100644
index 000000000000..c1880b7ec40b
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
@@ -0,0 +1,203 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsnmpd 1ntpsnmpdman "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-FOaywh/ag-ROaqvh)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:29 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsnmpd-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsnmpd\fP
+\- NTP SNMP MIB agent
+.SH SYNOPSIS
+\f\*[B-Font]ntpsnmpd\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsnmpd\fP
+is an SNMP MIB agent designed to interface with
+\fCntpd\fR(1ntpdmdoc)\f[].
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-nofork\f[]
+Do not fork.
+.sp
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-syslog\f[]
+Log to syslog().
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-agentxsocket\f[]=\f\*[I-Font]string\f[]
+The socket address ntpsnmpd uses to connect to net-snmpd.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ unix:/var/agentx/master
+.sp
+[<transport-specifier>:]<transport-address>
+The default "agent X socket" is the Unix Domain socket
+\fIunix:/var/agentx/master\fP.
+Another common alternative is \fItcp:localhost:705\fP.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPSNMPD_<option-name>\fP or \fBNTPSNMPD\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+\f\*[B-Font]ntpsnmpd\fP
+currently uses a private MIB OID,
+\[oq]enterprises.5597\[cq],
+which is the Meinberg top level OEM OID, and
+\[oq]99\[cq]
+is the temporary working space for this project.
+The final OID has to be registered with IANA
+and this is done by the RFC Editor
+when the NTPv4 MIB RFC is standardized.
+.sp \n(Ppu
+.ne 2
+
+If you have
+\fCsnmpwalk\fR(1)\f[]
+installed you can run
+.Dl % snmpwalk \-v2c \-c public localhost enterprises.5597.99
+to see a list of all currently supported NTP MIB objects
+and their current values.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Heiko Gerstung"
+.br
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+The following objects are currently supported:
+.sp \n(Ppu
+.ne 2
+
+.TP 29
+.NOP \f[C]ntpEntSoftwareName\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVersion\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVersionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVendor\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSystemType\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeResolution\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeResolutionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimePrecision\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimePrecisionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeDistance\f[]
+please fill me in...
+.PP
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntpsnmpd\fP
+option definitions.
diff --git a/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
new file mode 100644
index 000000000000..ce76dc14f5d0
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
@@ -0,0 +1,144 @@
+.Dd December 19 2014
+.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:34 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsnmpd-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsnmpd
+.Nd NTP SNMP MIB agent
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+is an SNMP MIB agent designed to interface with
+.Xr ntpd 1ntpdmdoc .
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-nofork
+Do not fork.
+.sp
+.It Fl p , Fl \-syslog
+Log to syslog().
+.sp
+.It Fl \-agentxsocket Ns = Ns Ar string
+The socket address ntpsnmpd uses to connect to net\-snmpd.
+The default
+.Ar string
+for this option is:
+.ti +4
+ unix:/var/agentx/master
+.sp
+[<transport\-specifier>:]<transport\-address>
+The default "agent X socket" is the Unix Domain socket
+\fIunix:/var/agentx/master\fP.
+Another common alternative is \fItcp:localhost:705\fP.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPSNMPD_<option\-name>\fP or \fBNTPSNMPD\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+.Nm
+currently uses a private MIB OID,
+.Ql enterprises.5597 ,
+which is the Meinberg top level OEM OID, and
+.Ql 99
+is the temporary working space for this project.
+The final OID has to be registered with IANA
+and this is done by the RFC Editor
+when the NTPv4 MIB RFC is standardized.
+.Pp
+If you have
+.Xr snmpwalk 1
+installed you can run
+.Dl % snmpwalk \-v2c \-c public localhost enterprises.5597.99
+to see a list of all currently supported NTP MIB objects
+and their current values.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Heiko Gerstung"
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+The following objects are currently supported:
+.Pp
+.Bl -tag -width ".Li ntpEntSoftwareVersionVal" -compact -offset indent
+.It Li ntpEntSoftwareName
+please fill me in...
+.It Li ntpEntSoftwareVersion
+please fill me in...
+.It Li ntpEntSoftwareVersionVal
+please fill me in...
+.It Li ntpEntSoftwareVendor
+please fill me in...
+.It Li ntpEntSystemType
+please fill me in...
+.It Li ntpEntTimeResolution
+please fill me in...
+.It Li ntpEntTimeResolutionVal
+please fill me in...
+.It Li ntpEntTimePrecision
+please fill me in...
+.It Li ntpEntTimePrecisionVal
+please fill me in...
+.It Li ntpEntTimeDistance
+please fill me in...
+.El
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsnmpd\fP
+option definitions.
diff --git a/ntpsnmpd/ntpsnmpd.c b/ntpsnmpd/ntpsnmpd.c
index 278d5a86e170..d96ad3af453b 100644
--- a/ntpsnmpd/ntpsnmpd.c
+++ b/ntpsnmpd/ntpsnmpd.c
@@ -85,7 +85,7 @@ main (int argc, char **argv) {
init_agent("ntpsnmpd");
/* Try to connect to ntpd */
- if ( ntpq_openhost("localhost") == 0 )
+ if ( ntpq_openhost("localhost", 0) == 0 )
{
fprintf(stderr, "Error: Could not connect to ntpd. Aborting.\n");
exit(1);
diff --git a/ntpsnmpd/ntpsnmpd.html b/ntpsnmpd/ntpsnmpd.html
new file mode 100644
index 000000000000..974b536e5d25
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.html
@@ -0,0 +1,79 @@
+<html lang="en">
+<head>
+<title>ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual</h1>
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">ntpsnmpd: Network Time Protocol Query User Manual</a>
+</ul>
+</div>
+
+
+
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsnmpd-Description">ntpsnmpd Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">ntpsnmpd: Network Time Protocol Query User Manual</h2>
+
+<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
+operations and determine performance. It uses the standard NTP mode 6 control
+
+ <p>This document applies to version 4.2.8 of <code>ntpsnmpd</code>.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpsnmpd-Description">ntpsnmpd Description</a>: Description
+<li><a accesskey="2" href="#ntpsnmpd-Invocation">ntpsnmpd Invocation</a>: Invoking ntpsnmpd
+<li><a accesskey="3" href="#Usage">Usage</a>: Usage
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpsnmpd-Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Usage">Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>The <code>ntpsnmpd</code> utility program provides an SNMP MIB agent for <code>ntpd</code>.
+
+<div class="node">
+<p><hr>
+<a name="Usage"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsnmpd-Description">ntpsnmpd Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Usage</h3>
+
+<p>(what should we say here?)
+
+</body></html>
+
diff --git a/ntpsnmpd/ntpsnmpd.man.in b/ntpsnmpd/ntpsnmpd.man.in
new file mode 100644
index 000000000000..da48b668e110
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.man.in
@@ -0,0 +1,203 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsnmpd @NTPSNMPD_MS@ "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-FOaywh/ag-ROaqvh)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:29 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsnmpd-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsnmpd\fP
+\- NTP SNMP MIB agent
+.SH SYNOPSIS
+\f\*[B-Font]ntpsnmpd\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsnmpd\fP
+is an SNMP MIB agent designed to interface with
+\fCntpd\fR(@NTPD_MS@)\f[].
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-nofork\f[]
+Do not fork.
+.sp
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-syslog\f[]
+Log to syslog().
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-agentxsocket\f[]=\f\*[I-Font]string\f[]
+The socket address ntpsnmpd uses to connect to net-snmpd.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ unix:/var/agentx/master
+.sp
+[<transport-specifier>:]<transport-address>
+The default "agent X socket" is the Unix Domain socket
+\fIunix:/var/agentx/master\fP.
+Another common alternative is \fItcp:localhost:705\fP.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPSNMPD_<option-name>\fP or \fBNTPSNMPD\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+\f\*[B-Font]ntpsnmpd\fP
+currently uses a private MIB OID,
+\[oq]enterprises.5597\[cq],
+which is the Meinberg top level OEM OID, and
+\[oq]99\[cq]
+is the temporary working space for this project.
+The final OID has to be registered with IANA
+and this is done by the RFC Editor
+when the NTPv4 MIB RFC is standardized.
+.sp \n(Ppu
+.ne 2
+
+If you have
+\fCsnmpwalk\fR(1)\f[]
+installed you can run
+.Dl % snmpwalk \-v2c \-c public localhost enterprises.5597.99
+to see a list of all currently supported NTP MIB objects
+and their current values.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Heiko Gerstung"
+.br
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+The following objects are currently supported:
+.sp \n(Ppu
+.ne 2
+
+.TP 29
+.NOP \f[C]ntpEntSoftwareName\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVersion\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVersionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSoftwareVendor\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntSystemType\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeResolution\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeResolutionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimePrecision\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimePrecisionVal\f[]
+please fill me in...
+.br
+.ns
+.TP 29
+.NOP \f[C]ntpEntTimeDistance\f[]
+please fill me in...
+.PP
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntpsnmpd\fP
+option definitions.
diff --git a/ntpsnmpd/ntpsnmpd.mdoc.in b/ntpsnmpd/ntpsnmpd.mdoc.in
new file mode 100644
index 000000000000..d85df74e59c6
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.mdoc.in
@@ -0,0 +1,144 @@
+.Dd December 19 2014
+.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:34 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsnmpd-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsnmpd
+.Nd NTP SNMP MIB agent
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+is an SNMP MIB agent designed to interface with
+.Xr ntpd @NTPD_MS@ .
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-nofork
+Do not fork.
+.sp
+.It Fl p , Fl \-syslog
+Log to syslog().
+.sp
+.It Fl \-agentxsocket Ns = Ns Ar string
+The socket address ntpsnmpd uses to connect to net\-snmpd.
+The default
+.Ar string
+for this option is:
+.ti +4
+ unix:/var/agentx/master
+.sp
+[<transport\-specifier>:]<transport\-address>
+The default "agent X socket" is the Unix Domain socket
+\fIunix:/var/agentx/master\fP.
+Another common alternative is \fItcp:localhost:705\fP.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTPSNMPD_<option\-name>\fP or \fBNTPSNMPD\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+.Nm
+currently uses a private MIB OID,
+.Ql enterprises.5597 ,
+which is the Meinberg top level OEM OID, and
+.Ql 99
+is the temporary working space for this project.
+The final OID has to be registered with IANA
+and this is done by the RFC Editor
+when the NTPv4 MIB RFC is standardized.
+.Pp
+If you have
+.Xr snmpwalk 1
+installed you can run
+.Dl % snmpwalk \-v2c \-c public localhost enterprises.5597.99
+to see a list of all currently supported NTP MIB objects
+and their current values.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Heiko Gerstung"
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+The following objects are currently supported:
+.Pp
+.Bl -tag -width ".Li ntpEntSoftwareVersionVal" -compact -offset indent
+.It Li ntpEntSoftwareName
+please fill me in...
+.It Li ntpEntSoftwareVersion
+please fill me in...
+.It Li ntpEntSoftwareVersionVal
+please fill me in...
+.It Li ntpEntSoftwareVendor
+please fill me in...
+.It Li ntpEntSystemType
+please fill me in...
+.It Li ntpEntTimeResolution
+please fill me in...
+.It Li ntpEntTimeResolutionVal
+please fill me in...
+.It Li ntpEntTimePrecision
+please fill me in...
+.It Li ntpEntTimePrecisionVal
+please fill me in...
+.It Li ntpEntTimeDistance
+please fill me in...
+.El
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsnmpd\fP
+option definitions.
diff --git a/ntpsnmpd/ntpsnmpd.texi b/ntpsnmpd/ntpsnmpd.texi
new file mode 100644
index 000000000000..69355967012d
--- /dev/null
+++ b/ntpsnmpd/ntpsnmpd.texi
@@ -0,0 +1,53 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpsnmpd.info
+@settitle ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's ntpsnmpd, a program for
+querying the state of an NTP server via SNMP.
+@end ifinfo
+
+@direntry
+* ntpsnmpd: (ntpsnmpd). NTP SNMP Daemon program
+@end direntry
+
+@titlepage
+@title ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual
+@subtitle ntpsnmpd, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@shortcontents
+
+@node Top, ntpsnmpd Description, (dir), (dir)
+@top ntpsnmpd: Network Time Protocol Query User Manual
+
+The @code{ntpsnmpd} utility program is used to monitor NTP daemon @code{ntpd}
+operations and determine performance. It uses the standard NTP mode 6 control
+
+This document applies to version @value{VERSION} of @code{ntpsnmpd}.
+
+@menu
+* ntpsnmpd Description:: Description
+* ntpsnmpd Invocation:: Invoking ntpsnmpd
+* Usage:: Usage
+@end menu
+
+@node ntpsnmpd Description, Usage, Top, Top
+@comment node-name, next, previous, up
+@section Description
+
+The @code{ntpsnmpd} utility program provides an SNMP MIB agent for @code{ntpd}.
+
+@node Usage, , ntpsnmpd Description, Top
+@comment node-name, next, previous, up
+@section Usage
+
+(what should we say here?)
diff --git a/packageinfo.sh b/packageinfo.sh
index 7b389a3411e6..684227aa7295 100644
--- a/packageinfo.sh
+++ b/packageinfo.sh
@@ -34,8 +34,7 @@
# To skip over -stable beta1 directly to -RC1, set prerelease=rc.
#
# To skip all -stable prereleases and move from one primary or point
-# release directly to the next point release, or to go from RC to
-# release, set rcpoint=GO.
+# release directly to the next point release, set rcpoint=GO.
#
##
#
@@ -48,13 +47,23 @@
# repotype must be stable or dev
repotype=stable
+# post-4.2.8:
+# version=Major.Minor
+# 4.2.8 and before:
# version=Protocol.Major.Minor
# odd minor numbers are for -dev, even minor numbers are for -stable
# UpdatePoint will fail if repotype is inconsistent with minor.
proto=4
major=2
-minor=6
-version=${proto}.${major}.${minor}
+minor=8
+
+case "${proto}.${major}" in
+ 4.[012])
+ version=${proto}.${major}.${minor}
+ ;;
+ *) version=${major}.${minor}
+ ;;
+esac
# Special. Normally unused. A suffix.
#special=ag
@@ -66,12 +75,15 @@ prerelease=
# ChangeLog starting tag (see also CommitLog-4.1.0)
CLTAG=NTP_4_2_0
+### post-4.2.8:
+### Point number, after "major.minor.", normally modified by script.
+### 4.2.8 and before:
### Point number, after "p", normally modified by script.
# 3 cases:
# - Numeric values increment
# - empty 'increments' to 1
# - NEW 'increments' to empty
-point=5
+point=
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
diff --git a/parseutil/Makefile.am b/parseutil/Makefile.am
index e06b34990d75..99fb3d19632e 100644
--- a/parseutil/Makefile.am
+++ b/parseutil/Makefile.am
@@ -1,18 +1,19 @@
NULL=
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
+
BUILT_SOURCES =
CLEANFILES =
noinst_PROGRAMS = @TESTDCF@ @DCFD@
EXTRA_PROGRAMS = testdcf dcfd
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ETAGS_ARGS = Makefile.am
DISTCLEANFILES = $(EXTRA_PROGRAMS)
-#EXTRA_DIST= TAGS
check-local: @DCFD@
case "$(noinst_PROGRAMS)" in \
@@ -20,3 +21,4 @@ check-local: @DCFD@
esac
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/parseutil/Makefile.in b/parseutil/Makefile.in
index a24e7525b497..1d9d9cbe5df9 100644
--- a/parseutil/Makefile.in
+++ b/parseutil/Makefile.in
@@ -36,20 +36,44 @@ build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = testdcf$(EXEEXT) dcfd$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/depsver.mf
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf
subdir = parseutil
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -60,42 +84,75 @@ PROGRAMS = $(noinst_PROGRAMS)
dcfd_SOURCES = dcfd.c
dcfd_OBJECTS = dcfd.$(OBJEXT)
dcfd_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+dcfd_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
testdcf_SOURCES = testdcf.c
testdcf_OBJECTS = testdcf.$(OBJEXT)
testdcf_LDADD = $(LDADD)
+testdcf_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = dcfd.c testdcf.c
DIST_SOURCES = dcfd.c testdcf.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -107,21 +164,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -129,6 +196,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -147,14 +215,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -167,10 +289,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -178,9 +302,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -189,6 +331,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -237,23 +380,23 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
BUILT_SOURCES = .deps-ver
CLEANFILES = .deps-ver
noinst_PROGRAMS = @TESTDCF@ @DCFD@
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include
-
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
ETAGS_ARGS = Makefile.am
DISTCLEANFILES = $(EXTRA_PROGRAMS)
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -294,10 +437,10 @@ clean-noinstPROGRAMS:
rm -f $$list
dcfd$(EXEEXT): $(dcfd_OBJECTS) $(dcfd_DEPENDENCIES)
@rm -f dcfd$(EXEEXT)
- $(LINK) $(dcfd_OBJECTS) $(dcfd_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(dcfd_OBJECTS) $(dcfd_LDADD) $(LIBS)
testdcf$(EXEEXT): $(testdcf_OBJECTS) $(testdcf_DEPENDENCIES)
@rm -f testdcf$(EXEEXT)
- $(LINK) $(testdcf_OBJECTS) $(testdcf_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(testdcf_OBJECTS) $(testdcf_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -309,22 +452,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdcf.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -539,7 +685,6 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am
-#EXTRA_DIST= TAGS
check-local: @DCFD@
case "$(noinst_PROGRAMS)" in \
@@ -551,7 +696,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -560,17 +705,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -579,7 +717,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/parseutil/dcfd.c b/parseutil/dcfd.c
index a65ad896db73..0db94c0be973 100644
--- a/parseutil/dcfd.c
+++ b/parseutil/dcfd.c
@@ -587,7 +587,8 @@ cvt_rawdcf(
/*
* invalid character (no consecutive bit sequence)
*/
- dprintf(("parse: cvt_rawdcf: character check for 0x%x@%d FAILED\n", *s, s - buffer));
+ dprintf(("parse: cvt_rawdcf: character check for 0x%x@%ld FAILED\n",
+ (u_int)*s, (long)(s - buffer)));
*s = (unsigned char)~0;
rtc = CVT_FAIL|CVT_BADFMT;
}
@@ -898,15 +899,19 @@ static const char *wday[8] =
*/
static char *
pr_timeval(
- struct timeval *val
- )
+ 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));
+ snprintf(buf, sizeof(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));
+ snprintf(buf, sizeof(buf), "%ld.%06ld",
+ (long int)val->tv_sec,
+ (long int)l_abs(val->tv_usec));
return buf;
}
@@ -1320,43 +1325,6 @@ check_y2k( void )
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 );
diff --git a/parseutil/testdcf.c b/parseutil/testdcf.c
index 223ab30838f2..c78c2424eb2f 100644
--- a/parseutil/testdcf.c
+++ b/parseutil/testdcf.c
@@ -34,6 +34,7 @@
*
*/
+#include <config.h>
#include "ntp_stdlib.h"
#include <sys/ioctl.h>
diff --git a/ports/winnt/include/arpa/inet.h b/ports/winnt/include/arpa/inet.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/arpa/inet.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/clockstuff.h b/ports/winnt/include/clockstuff.h
new file mode 100644
index 000000000000..df8569935094
--- /dev/null
+++ b/ports/winnt/include/clockstuff.h
@@ -0,0 +1,44 @@
+#ifndef _CLOCKSTUFF_H
+#define _CLOCKSTUFF_H
+
+#include <time.h>
+#include <sys\timeb.h>
+
+#include "ntp_fp.h"
+#include "ntp_syslog.h"
+
+
+void init_winnt_time(void);
+void reset_winnt_time(void);
+void lock_thread_to_processor(HANDLE);
+
+/* 100ns intervals between 1/1/1601 and 1/1/1970 as reported by
+ * SystemTimeToFileTime()
+ */
+
+#define FILETIME_1970 0x019db1ded53e8000
+#define HECTONANOSECONDS 10000000
+
+/*
+ * Multimedia Timer
+ */
+
+void set_mm_timer(int);
+
+enum {
+ MM_TIMER_LORES,
+ MM_TIMER_HIRES
+};
+
+/*
+ * get_sys_time_as_filetime is a function pointer to
+ * either GetSystemTimeAsFileTime provided by Windows
+ * or ntpd's interpolating replacement.
+ */
+typedef void (WINAPI *PGSTAFT)(LPFILETIME pftResult);
+extern PGSTAFT get_sys_time_as_filetime;
+extern PGSTAFT pGetSystemTimePreciseAsFileTime;
+
+void lock_thread_to_processor(HANDLE);
+
+#endif
diff --git a/ports/winnt/include/config.h b/ports/winnt/include/config.h
new file mode 100644
index 000000000000..b99aaa7ee27f
--- /dev/null
+++ b/ports/winnt/include/config.h
@@ -0,0 +1,554 @@
+/*
+ * ports/winnt/include/config.h - static Windows config.h
+ *
+ * On most systems config.h is generated by the configure script.
+ * For the Windows port, it's hand-maintained. Compilers earlier
+ * than Visual C++ 2005 are no longer supported, enabling
+ * portable use of "long long" and "%lld".
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/*
+ * Known predifined MS compiler version codes:
+ * 1800: MSVC++ 12.0 (Visual Studio 2013)
+ * 1700: MSVC++ 11.0 (Visual Studio 2012)
+ * 1600: MSVC++ 10.0 (Visual Studio 2010)
+ * 1500: MSVC++ 9.0 (Visual Studio 2008)
+ * 1400: MSVC++ 8.0 (Visual Studio 2005)
+ * 1310: MSVC++ 7.1 (Visual Studio 2003)
+ * 1300: MSVC++ 7.0
+ * 1200: MSVC++ 6.0 (Visual C++ 6)
+ * 1100: MSVC++ 5.0
+ */
+
+#if defined(_MSC_VER) && _MSC_VER < 1400
+#error Minimum supported Microsoft compiler is Visual C++ 2005.
+#endif
+
+/*
+ * We want structures and prototypes added after Windows NT 4.0 exposed
+ * by Windows header files, so we define _WIN32_WINNT to target Windows
+ * XP (version 5.1). By default, _WIN32_WINNT also controls the minimum
+ * required Windows version to launch the .exe. As we want a single
+ * binary to work on all supported Windows versions, we runtime link
+ * newer functions, and use the linker /version:0x0400 option to
+ * override the .EXE header minimum Windows version.
+ *
+ * When using the VC++ 2008 and later compilers, the resulting binaries
+ * will not work on versions earlier than Windows XP, due to runtime
+ * library dependencies. That is, Visual C++ 2005 is the last version
+ * capable of producing binaries usable with Windows NT 4 and 2000.
+ */
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#define __attribute__(x) /* empty */
+#define _CRT_SECURE_NO_DEPRECATE 1
+
+/*
+ * ANSI C compliance enabled
+ */
+#define __STDC__ 1
+
+/*
+ * Enable the debug build of MS C runtime to dump leaks
+ * at exit time (currently only if run under a debugger).
+ */
+#if defined(_MSC_VER) && defined(_DEBUG)
+# define _CRTDBG_MAP_ALLOC
+# include <stdlib.h>
+# include <malloc.h>
+# include <crtdbg.h>
+/* # define MALLOC_LINT */ /* defers free() */
+# define EREALLOC_IMPL(ptr, newsz, filenm, loc) \
+ _realloc_dbg(ptr, newsz, _NORMAL_BLOCK, filenm, loc)
+#endif
+
+/*
+ * We need to include stdio.h first before we #define snprintf
+ * otherwise we can get errors during the build
+ */
+#include <stdio.h>
+
+/* Prevent inclusion of winsock.h in windows.h */
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_
+#endif
+
+#ifndef __RPCASYNC_H__
+#define __RPCASYNC_H__
+#endif
+
+/*
+ * On Unix struct sock_timeval is equivalent to struct timeval.
+ * On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
+ * as required by Windows' socket() interface timeout argument, while
+ * timeval.tv_sec is time_t for the more common use as a UTC time
+ * within NTP.
+ *
+ * winsock.h unconditionally defines struct timeval with long tv_sec
+ * instead of time_t tv_sec. We redirect its declaration to struct
+ * sock_timeval instead of struct timeval with a #define.
+ */
+#define timeval sock_timeval
+
+/* Include Windows headers */
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#undef timeval /* see sock_timeval #define and comment above */
+
+/*
+ * Some definitions we are using are missing in the headers
+ * shipping with VC6. However, if the SDK is installed then the
+ * SDK's headers may declare the missing types. This is at least
+ * the case in the Oct 2001 SDK. That SDK and all subsequent
+ * versions also define the symbol _W64, so we can use that one
+ * to determine whether some types need to be defined, or not.
+ */
+#ifdef _W64
+/* VC6 can include wspiapi.h only if the SDK is installed */
+#include <wspiapi.h>
+#endif
+
+#undef interface
+#include <process.h>
+#include <time.h> /* time_t for timeval decl */
+#include <io.h>
+#include <isc/strerror.h>
+
+/* ---------------------------------------------------------------------
+ * Above this line are #include lines and the few #define lines
+ * needed before including headers.
+ */
+
+struct timeval {
+ time_t tv_sec;
+ long tv_usec;
+};
+
+/*
+ * ntohl and friends are actual functions on Windows, use our own
+ * macros instead to save the function call overhead. All releases
+ * of Windows are little-endian.
+ */
+#ifdef ntohl
+#error ntohl is already defined in ports/winnt/include/config.h
+#else
+#define ntohl(ul) (((u_long)(ul) & 0xff) << 24 | \
+ ((u_long)(ul) & 0xff00) << 8 | \
+ ((u_long)(ul) & 0xff0000) >> 8 | \
+ ((u_long)(ul) & 0xff000000) >> 24)
+#define htonl(ul) ntohl(ul)
+#define ntohs(us) ((u_short) \
+ (((u_short)(us) & 0xff) << 8 | \
+ ((u_short)(us) & 0xff00) >> 8))
+#define htons(us) ntohs(us)
+#endif
+
+/*
+ * On Unix open() works for tty (serial) devices just fine, while on
+ * Windows refclock serial devices are opened using CreateFile, a lower
+ * level than the CRT-provided descriptors, because the C runtime lacks
+ * tty APIs. For refclocks which wish to use open() as well as or
+ * instead of refclock_open(), tty_open() is equivalent to open() on
+ * Unix and implemented in the Windows port similarly to
+ * refclock_open().
+ */
+extern int tty_open(char *, int, int);
+
+/*
+ * disable use of __declspec(dllexport) by libisc routines
+ */
+#define ISC_STATIC_WIN 1
+
+/*
+ * ntp_rfc2553.h has cruft under #ifdef SYS_WINNT which is
+ * appropriate for older Microsoft IPv6 definitions, such
+ * as in_addr6 being the struct type. We can differentiate
+ * the RFC2553-compliant newer headers because they have
+ * #define in_addr6 in6_addr
+ * for backward compatibility. With the newer headers,
+ * we define ISC_PLATFORM_HAVEIPV6 and disable the cruft.
+ */
+#ifdef in_addr6
+#define WANT_IPV6
+#define ISC_PLATFORM_HAVEIPV6
+#define ISC_PLATFORM_HAVESCOPEID
+#define HAVE_STRUCT_SOCKADDR_STORAGE
+#define ISC_PLATFORM_HAVEIN6PKTINFO
+#endif /* in_addr6 / RFC2553-compliant IPv6 headers */
+
+#define NO_OPTION_NAME_WARNINGS
+
+#if !defined( _W64 )
+ /*
+ * if ULONG_PTR needs to be defined then the build environment
+ * is pure 32 bit Windows. Since ULONG_PTR and DWORD have
+ * the same size in 32 bit Windows we can safely define
+ * a replacement.
+ */
+typedef DWORD ULONG_PTR;
+/* VC6 doesn't know about socklen_t, except if the SDK is installed */
+typedef int socklen_t;
+#endif /* _W64 */
+
+#define ISC_PLATFORM_NEEDIN6ADDRANY
+#define HAVE_SOCKADDR_IN6
+
+/*
+ * The type of the socklen_t defined for getnameinfo() and getaddrinfo()
+ * is int for VS compilers on Windows but the type is already declared
+ */
+#define GETSOCKNAME_SOCKLEN_TYPE socklen_t
+
+/*
+ * Older SDKs do not define SO_EXCLUSIVEADDRUSE in winsock2.h
+ */
+#ifndef SO_EXCLUSIVEADDRUSE
+#define SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR))
+#endif
+
+#if defined _MSC_VER && _MSC_VER < 1400
+/*
+ * Use 32-bit time definitions for versions prior to VS 2005
+ * VS 2005 defaults to 64-bit time
+ */
+# define SIZEOF_TIME_T 4
+#else
+# define SIZEOF_TIME_T 8
+#endif
+
+
+/*
+ * An attempt to cut down the number of warnings generated during compilation.
+ * All of these should be benign to disable.
+ */
+
+#pragma warning(disable: 4100) /* unreferenced formal parameter */
+#pragma warning(disable: 4127) /* conditional expression is constant */
+#pragma warning(disable: 4996) /* more secure replacement available */
+
+/*
+ * Windows NT Configuration Values
+ */
+#if defined _DEBUG /* Use VC standard macro definitions */
+# define DEBUG 1
+#endif
+
+#define __windows__ 1
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+#define OPEN_BCAST_SOCKET 1 /* for ntp_io.c */
+#define TYPEOF_IP_MULTICAST_LOOP BOOL
+#define SETSOCKOPT_ARG_CAST (const char *)
+#define HAVE_RANDOM
+#define AUTOKEY
+#define SAVECONFIG 1
+
+/*
+ * Multimedia timer enable
+ */
+#define USE_MM_TIMER
+
+/* Enable OpenSSL */
+#define OPENSSL 1
+
+/*
+ * Keywords and functions that Microsoft maps
+ * to other names
+ */
+#define inline __inline
+#define stricmp _stricmp
+#define strcasecmp _stricmp
+#define isascii __isascii
+#define finite _finite
+#define random rand
+#define srandom srand
+#define fdopen _fdopen
+#define read _read
+#define open _open
+#ifndef close
+#define close _close
+#endif
+#define write _write
+#define strdup _strdup
+#define alloca _alloca
+#define stat _stat /*struct stat from <sys/stat.h> */
+#define fstat _fstat
+#define unlink _unlink
+/*
+ * punt on fchmod on Windows
+ */
+#define fchmod(x,y) {}
+#define lseek _lseek
+#define pipe _pipe
+#define dup2 _dup2
+/*
+ * scale, unix sleep is seconds, Windows Sleep is msec
+ */
+#define sleep(x) Sleep((unsigned)(x) * 1000)
+#define fileno _fileno
+#define isatty _isatty
+#define mktemp _mktemp
+#define getpid _getpid
+#define timegm _mkgmtime
+#define errno_to_str isc__strerror
+
+typedef int pid_t; /* PID is an int */
+typedef int ssize_t; /* ssize is an int */
+
+/*
+ * Map the stream to the file number
+ */
+#define STDOUT_FILENO _fileno(stdout)
+#define STDERR_FILENO _fileno(stderr)
+
+/*
+ * To minimize Windows-specific changes to the rest of the NTP code,
+ * particularly reference clocks, ntp_stdlib.h will
+ *
+ * #define strerror(e) ntp_strerror(e)
+ *
+ * to deal with our mixture of C runtime (open, write) and Windows
+ * (sockets, serial ports) error codes. This is an ugly hack because
+ * both use the lowest values differently, but particularly for ntpd,
+ * it's not a problem.
+ */
+#define NTP_REDEFINE_STRERROR
+
+#define MCAST /* Enable Multicast Support */
+#define MULTICAST_NONEWSOCKET /* Don't create a new socket for mcast address */
+
+# define REFCLOCK /* from ntpd.mak */
+
+/* #define CLOCK_PARSE */
+#define CLOCK_ACTS
+#define CLOCK_ARBITER
+#define CLOCK_ARCRON_MSF
+#define OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER /* timepps.h */
+#define HAVE_TIMEPPS_H
+#define HAVE_PPSAPI
+#define CLOCK_ATOM
+#define CLOCK_CHU
+#define CLOCK_CHRONOLOG
+#define CLOCK_DUMBCLOCK
+#define CLOCK_HOPF_SERIAL /* device 38, hopf DCF77/GPS serial line receiver */
+#define CLOCK_HOPF_PCI /* device 39, hopf DCF77/GPS PCI-Bus receiver */
+#define CLOCK_JUPITER
+#define CLOCK_LOCAL
+#define CLOCK_NMEA
+#define CLOCK_ONCORE
+#define CLOCK_PALISADE /* from ntpd.mak */
+#define CLOCK_PARSE
+/* parse component drivers */
+#define CLOCK_COMPUTIME
+#define CLOCK_DCF7000
+#define CLOCK_HOPF6021
+#define CLOCK_MEINBERG
+#define CLOCK_RAWDCF
+#define CLOCK_RCC8000
+#define CLOCK_SCHMID
+#define CLOCK_TRIMTAIP
+#define CLOCK_TRIMTSIP
+#define CLOCK_VARITEXT
+#define CLOCK_WHARTON_400A
+/* end parse component drivers */
+/* # define CLOCK_SHM */
+#define CLOCK_SPECTRACOM /* refclock_wwvb.c */
+#define CLOCK_TRIMBLEDC
+#define CLOCK_TRUETIME
+
+#define NTP_LITTLE_ENDIAN /* from libntp.mak */
+#define NTP_POSIX_SOURCE
+
+#define SYSLOG_FILE /* from libntp.mak */
+
+#define HAVE_LONG_LONG_INT 1
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+#define HAVE_SIZE_T 1
+#define HAVE_PTRDIFF_T 1
+
+# define SIZEOF_SIGNED_CHAR 1
+# define SIZEOF_SHORT 2
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 4
+# define SIZEOF_LONG_LONG 8
+
+/* libntp/snprintf.c doesn't know %I64d */
+#define ISC_PLATFORM_QUADFORMAT "ll"
+
+# define HAVE_ERRNO_H 1
+# define HAVE_FCNTL_H 1
+# define HAVE_LIMITS_H 1
+# define HAVE_STDARG_H 1
+# define HAVE_SYS_RESOURCE_H 1
+# define HAVE_SYS_TIME_H 1
+# define HAVE_TERMIOS_H 1
+
+# define HAVE_ALLOCA 1
+# define HAVE_GETCLOCK 1
+# define HAVE_MEMMOVE 1
+# define HAVE_MKTIME 1
+# define HAVE_SETVBUF 1
+# define HAVE_STRCHR 1 /* for libopts */
+# define HAVE_STRDUP 1
+# define HAVE_TIMEGM 1 /* actually _mkgmtime */
+
+# define HAVE_STRUCT_TIMESPEC
+# define HAVE_IO_COMPLETION_PORT
+# define ISC_PLATFORM_NEEDNTOP
+# define ISC_PLATFORM_NEEDPTON
+
+#define HAVE_BSD_NICE /* emulate BSD setpriority() */
+
+#define HW_WANT_RPL_VSNPRINTF 1
+#define vsnprintf rpl_vsnprintf
+#include <stdarg.h>
+int rpl_vsnprintf(char *, size_t, const char *, va_list);
+#define HW_WANT_RPL_SNPRINTF 1
+#define snprintf rpl_snprintf
+int rpl_snprintf(char *, size_t, const char *, ...);
+#define HAVE_VSNPRINTF 1
+#define HAVE_SNPRINTF 1
+
+typedef char *caddr_t;
+
+#ifdef _WCTYPE_T_DEFINED /* see vc/include/crtdefs.h */
+#define HAVE_WINT_T 1
+#endif
+
+#ifndef _INTPTR_T_DEFINED
+typedef long intptr_t;
+#define _INTPTR_T_DEFINED
+#endif
+#define HAVE_INTPTR_T 1
+
+#ifndef _UINTPTR_T_DEFINED
+typedef unsigned long uintptr_t;
+#define _UINTPTR_T_DEFINED
+#endif
+#define HAVE_UINTPTR_T 1
+
+#if !defined( _W64 )
+ /*
+ * if DWORD_PTR needs to be defined then the build environment
+ * is pure 32 bit Windows. Since DWORD_PTR and DWORD have
+ * the same size in 32 bit Windows we can safely define
+ * a replacement.
+ */
+ typedef DWORD DWORD_PTR;
+#endif
+
+#define NEED_S_CHAR_TYPEDEF
+
+
+/* C99 exact size integer support. */
+#if defined(_MSC_VER) && _MSC_VER<1800
+# define MISSING_INTTYPES_H 1 /* not provided by VS2012 and earlier */
+# define MISSING_STDBOOL_H 1 /* not provided by VS2012 and earlier */
+#else
+#if defined(_MSC_VER) && _MSC_VER>=1800
+/* VS2013 and above support C99 types */
+# define HAVE_INT8_T 1
+# define HAVE_UINT8_T 1
+# define HAVE_INT16_T 1
+# define HAVE_UINT16_T 1
+# define HAVE_INT32_T 1
+# define HAVE_UINT32_T 1
+#endif
+#endif
+
+#if !defined (MISSING_STDBOOL_H)
+# define HAVE_STDBOOL_H
+#endif
+#if !defined(MISSING_INTTYPES_H)
+# define HAVE_INTTYPES_H 1
+#elif !defined(MISSING_STDINT_H)
+# define HAVE_STDINT_H 1
+#elif !defined(ADDED_EXACT_SIZE_INTEGERS)
+# define ADDED_EXACT_SIZE_INTEGERS 1
+ typedef __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+
+ typedef __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+
+ typedef __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+#endif
+
+
+/* Directory separator, usually / or \ */
+#define DIR_SEP '\\'
+
+#define POSIX_SHELL "/bin/sh" /* libopts/makeshell.c */
+
+#define ULONG_CONST(a) a ## UL
+
+#define NOKMEM
+#define RETSIGTYPE void
+
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "Windows"
+#endif
+
+#ifndef STR_PROCESSOR
+
+#define STRINGIZE(arg) #arg
+
+#ifdef _M_IX86
+#ifndef _M_IX86_FP
+#define STR_PROCESSOR "x86"
+#else
+#if !_M_IX86_FP
+#define STR_PROCESSOR "x86"
+#else
+#if _M_IX86_FP > 2
+#define STR_PROCESSOR "x86-FP-" STRINGIZE(_M_IX86_FP)
+#else
+#if _M_IX86_FP == 2
+#define STR_PROCESSOR "x86-SSE2"
+#else
+#define STR_PROCESSOR "x86-SSE"
+#endif /* _M_IX86 == 2 */
+#endif /* _M_IX86_FP > 2 */
+#endif /* !_M_IX86_FP */
+#endif /* !defined(_M_IX86_FP) */
+#endif /* !defined(_M_IX86) */
+
+#ifdef _M_IA64
+#define STR_PROCESSOR "Itanium"
+#endif
+
+#ifdef _M_X64
+#define STR_PROCESSOR "x64"
+#endif
+
+#endif /* !defined(STR_PROCESSOR) */
+
+#undef STRINGIZE
+
+#define SIOCGIFFLAGS SIO_GET_INTERFACE_LIST /* used in ntp_io.c */
+/*
+ * Below this line are includes which must happen after the bulk of
+ * config.h is processed. If you need to add another #include to this
+ * file the preferred location is near the top, above the similar
+ * line of hyphens.
+ * ---------------------------------------------------------------------
+ */
+
+/*
+ * Include standard stat information
+ */
+#include <isc/stat.h>
+
+#endif /* CONFIG_H */
diff --git a/ports/winnt/include/gaa_compat.h b/ports/winnt/include/gaa_compat.h
new file mode 100644
index 000000000000..fdacaf0e84a5
--- /dev/null
+++ b/ports/winnt/include/gaa_compat.h
@@ -0,0 +1,771 @@
+/*
+ * ports/winnt/include/gaa_compat.h
+ *
+ * This header allows systems without a recent-enough SDK to build NTP
+ * which can use GetAdaptersAddresses(), related functions and macros.
+ */
+#ifndef GAA_COMPAT_H
+#define GAA_COMPAT_H
+
+#ifdef _W64
+# include <iphlpapi.h>
+#else /* !_W64 follows */
+
+#pragma warning(push)
+/* warning C4201: nonstandard extension used : nameless struct/union */
+#pragma warning(disable:4201)
+/* warning C4214: nonstandard extension used : bit field types other than int */
+#pragma warning(disable:4214)
+
+/* +++++++++++++++++++++++ from nldef.h */
+typedef enum {
+ //
+ // These values are from iptypes.h.
+ // They need to fit in a 4 bit field.
+ //
+ IpPrefixOriginOther = 0,
+ IpPrefixOriginManual,
+ IpPrefixOriginWellKnown,
+ IpPrefixOriginDhcp,
+ IpPrefixOriginRouterAdvertisement,
+ IpPrefixOriginUnchanged = 1 << 4
+} NL_PREFIX_ORIGIN;
+
+typedef enum {
+ //
+ // These values are from in iptypes.h.
+ // They need to fit in a 4 bit field.
+ //
+ IpSuffixOriginOther = 0,
+ IpSuffixOriginManual,
+ IpSuffixOriginWellKnown,
+ IpSuffixOriginDhcp,
+ IpSuffixOriginLinkLayerAddress,
+ IpSuffixOriginRandom,
+ IpSuffixOriginUnchanged = 1 << 4
+} NL_SUFFIX_ORIGIN;
+
+typedef enum {
+ //
+ // These values are from in iptypes.h.
+ //
+ IpDadStateInvalid = 0,
+ IpDadStateTentative,
+ IpDadStateDuplicate,
+ IpDadStateDeprecated,
+ IpDadStatePreferred,
+} NL_DAD_STATE;
+/* +++++++++++++++++++++++ from nldef.h */
+
+
+/* +++++++++++++++++++++++ from ifdef.h */
+typedef ULONG32 NET_IF_OBJECT_ID, *PNET_IF_OBJECT_ID;
+
+
+typedef enum _NET_IF_ADMIN_STATUS // ifAdminStatus
+{
+ NET_IF_ADMIN_STATUS_UP = 1,
+ NET_IF_ADMIN_STATUS_DOWN = 2,
+ NET_IF_ADMIN_STATUS_TESTING = 3
+} NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
+
+typedef enum _NET_IF_OPER_STATUS // ifOperStatus
+{
+ NET_IF_OPER_STATUS_UP = 1,
+ NET_IF_OPER_STATUS_DOWN = 2,
+ NET_IF_OPER_STATUS_TESTING = 3,
+ NET_IF_OPER_STATUS_UNKNOWN = 4,
+ NET_IF_OPER_STATUS_DORMANT = 5,
+ NET_IF_OPER_STATUS_NOT_PRESENT = 6,
+ NET_IF_OPER_STATUS_LOWER_LAYER_DOWN = 7
+} NET_IF_OPER_STATUS, *PNET_IF_OPER_STATUS;
+
+//
+// Flags to extend operational status
+//
+#define NET_IF_OPER_STATUS_DOWN_NOT_AUTHENTICATED 0x00000001
+#define NET_IF_OPER_STATUS_DOWN_NOT_MEDIA_CONNECTED 0x00000002
+#define NET_IF_OPER_STATUS_DORMANT_PAUSED 0x00000004
+#define NET_IF_OPER_STATUS_DORMANT_LOW_POWER 0x00000008
+
+typedef UINT32 NET_IF_COMPARTMENT_ID, *PNET_IF_COMPARTMENT_ID;
+
+//
+// Define compartment ID type:
+//
+#define NET_IF_COMPARTMENT_ID_UNSPECIFIED (NET_IF_COMPARTMENT_ID)0
+#define NET_IF_COMPARTMENT_ID_PRIMARY (NET_IF_COMPARTMENT_ID)1
+
+#define NET_IF_OID_IF_ALIAS 0x00000001 // identifies the ifAlias string for an interface
+#define NET_IF_OID_COMPARTMENT_ID 0x00000002 // identifies the compartment ID for an interface.
+#define NET_IF_OID_NETWORK_GUID 0x00000003 // identifies the NetworkGuid for an interface.
+#define NET_IF_OID_IF_ENTRY 0x00000004 // identifies statistics for an interface.
+
+//
+// Define NetworkGUID type:
+//
+typedef GUID NET_IF_NETWORK_GUID, *PNET_IF_NETWORK_GUID;
+
+//
+// Define macros for an "unspecified" NetworkGUID value to be used in structures
+// that haven't had the NET_LUID field filled in yet.
+//
+#define NET_SET_UNSPECIFIED_NETWORK_GUID(_pNetworkGuid)
+#define NET_IS_UNSPECIFIED_NETWORK_GUID(_NetworkGuidValue)
+
+//
+// To prevent collisions between user-assigned and system-assigend site-ids,
+// we partition the site-id space into two:
+// 1. User-Assigned: NET_SITEID_UNSPECIFIED < SiteId < NET_SITEID_MAXUSER
+// 2. System-Assigned: NET_SITEID_MAXUSER < SiteId < NET_SITEID_MAXSYSTEM
+//
+// Note: A network's SiteId doesn't really need to be settable.
+// 1. The network profile manager creates a network per network profile.
+// 2. NDIS/IF assigns a unique SiteId to each network.
+//
+#define NET_SITEID_UNSPECIFIED (0)
+#define NET_SITEID_MAXUSER (0x07ffffff)
+#define NET_SITEID_MAXSYSTEM (0x0fffffff)
+C_ASSERT(NET_SITEID_MAXUSER < NET_SITEID_MAXSYSTEM);
+
+typedef enum _NET_IF_RCV_ADDRESS_TYPE // ifRcvAddressType
+{
+ NET_IF_RCV_ADDRESS_TYPE_OTHER = 1,
+ NET_IF_RCV_ADDRESS_TYPE_VOLATILE = 2,
+ NET_IF_RCV_ADDRESS_TYPE_NON_VOLATILE = 3
+} NET_IF_RCV_ADDRESS_TYPE, *PNET_IF_RCV_ADDRESS_TYPE;
+
+typedef struct _NET_IF_RCV_ADDRESS_LH
+{
+ NET_IF_RCV_ADDRESS_TYPE ifRcvAddressType;
+ USHORT ifRcvAddressLength;
+ USHORT ifRcvAddressOffset; // from beginning of this struct
+} NET_IF_RCV_ADDRESS_LH, *PNET_IF_RCV_ADDRESS_LH;
+
+typedef struct _NET_IF_ALIAS_LH
+{
+ USHORT ifAliasLength; // in bytes, of ifAlias string
+ USHORT ifAliasOffset; // in bytes, from beginning of this struct
+} NET_IF_ALIAS_LH, *PNET_IF_ALIAS_LH;
+
+#pragma warning(push)
+#pragma warning(disable:4214) // bit field types other than int
+typedef union _NET_LUID_LH
+{
+ ULONG64 Value;
+ struct
+ {
+ ULONG64 Reserved:24;
+ ULONG64 NetLuidIndex:24;
+ ULONG64 IfType:16; // equal to IANA IF type
+ }Info;
+} NET_LUID_LH, *PNET_LUID_LH;
+#pragma warning(pop)
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef NET_IF_RCV_ADDRESS_LH NET_IF_RCV_ADDRESS;
+typedef NET_IF_RCV_ADDRESS* PNET_IF_RCV_ADDRESS;
+
+typedef NET_IF_ALIAS_LH NET_IF_ALIAS;
+typedef NET_IF_ALIAS* PNET_IF_ALIAS;
+#endif //NTDDI_LONGHORN
+
+//
+// Need to make this visible on all platforms (for the purpose of IF_LUID).
+//
+typedef NET_LUID_LH NET_LUID;
+typedef NET_LUID* PNET_LUID;
+
+//
+// IF_LUID
+//
+// Define the locally unique datalink interface identifier type.
+// This type is persistable.
+//
+typedef NET_LUID IF_LUID, *PIF_LUID;
+
+typedef ULONG NET_IFINDEX, *PNET_IFINDEX; // Interface Index (ifIndex)
+typedef UINT16 NET_IFTYPE, *PNET_IFTYPE; // Interface Type (IANA ifType)
+
+#define NET_IFINDEX_UNSPECIFIED (NET_IFINDEX)(0) // Not a valid ifIndex
+#define NET_IFLUID_UNSPECIFIED (0) // Not a valid if Luid
+
+//
+// Definitions for NET_IF_INFORMATION.Flags
+//
+#define NIIF_HARDWARE_INTERFACE 0x00000001 // Set iff hardware
+#define NIIF_FILTER_INTERFACE 0x00000002
+#define NIIF_NDIS_RESERVED1 0x00000004
+#define NIIF_NDIS_RESERVED2 0x00000008
+#define NIIF_NDIS_RESERVED3 0x00000010
+#define NIIF_NDIS_WDM_INTERFACE 0x00000020
+#define NIIF_NDIS_ENDPOINT_INTERFACE 0x00000040
+
+#define NIIF_WAN_TUNNEL_TYPE_UNKNOWN ((ULONG)(-1))
+
+//
+// Define datalink interface access types.
+//
+typedef enum _NET_IF_ACCESS_TYPE
+{
+ NET_IF_ACCESS_LOOPBACK = 1,
+ NET_IF_ACCESS_BROADCAST = 2,
+ NET_IF_ACCESS_POINT_TO_POINT = 3,
+ NET_IF_ACCESS_POINT_TO_MULTI_POINT = 4,
+ NET_IF_ACCESS_MAXIMUM = 5
+} NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
+
+
+//
+// Define datalink interface direction types.
+//
+typedef enum _NET_IF_DIRECTION_TYPE
+{
+ NET_IF_DIRECTION_SENDRECEIVE,
+ NET_IF_DIRECTION_SENDONLY,
+ NET_IF_DIRECTION_RECEIVEONLY,
+ NET_IF_DIRECTION_MAXIMUM
+} NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
+
+
+typedef enum _NET_IF_CONNECTION_TYPE
+{
+ NET_IF_CONNECTION_DEDICATED = 1,
+ NET_IF_CONNECTION_PASSIVE = 2,
+ NET_IF_CONNECTION_DEMAND = 3,
+ NET_IF_CONNECTION_MAXIMUM = 4
+} NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
+
+
+typedef enum _NET_IF_MEDIA_CONNECT_STATE
+{
+ MediaConnectStateUnknown,
+ MediaConnectStateConnected,
+ MediaConnectStateDisconnected
+} NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
+
+#define NET_IF_LINK_SPEED_UNKNOWN ((ULONG64)(-1))
+
+//
+// Defines the duplex state of media
+//
+typedef enum _NET_IF_MEDIA_DUPLEX_STATE
+{
+ MediaDuplexStateUnknown,
+ MediaDuplexStateHalf,
+ MediaDuplexStateFull
+} NET_IF_MEDIA_DUPLEX_STATE, *PNET_IF_MEDIA_DUPLEX_STATE;
+
+
+// Special values for fields in NET_PHYSICAL_LOCATION
+#define NIIF_BUS_NUMBER_UNKNOWN ((ULONG)(-1))
+#define NIIF_SLOT_NUMBER_UNKNOWN ((ULONG)(-1))
+#define NIIF_FUNCTION_NUMBER_UNKNOWN ((ULONG)(-1))
+
+typedef struct _NET_PHYSICAL_LOCATION_LH
+{
+ ULONG BusNumber; // Physical location
+ ULONG SlotNumber; // ... for hardware
+ ULONG FunctionNumber; // ... devices.
+} NET_PHYSICAL_LOCATION_LH, *PNET_PHYSICAL_LOCATION_LH;
+
+//
+// maximum string size in -wchar- units
+//
+#define IF_MAX_STRING_SIZE 256
+
+typedef struct _IF_COUNTED_STRING_LH
+{
+ USHORT Length; // in -Bytes-
+ WCHAR String[IF_MAX_STRING_SIZE + 1];
+} IF_COUNTED_STRING_LH, *PIF_COUNTED_STRING_LH;
+
+#define IF_MAX_PHYS_ADDRESS_LENGTH 32
+
+typedef struct _IF_PHYSICAL_ADDRESS_LH
+{
+ USHORT Length;
+ UCHAR Address[IF_MAX_PHYS_ADDRESS_LENGTH];
+} IF_PHYSICAL_ADDRESS_LH, *PIF_PHYSICAL_ADDRESS_LH;
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef NET_PHYSICAL_LOCATION_LH NET_PHYSICAL_LOCATION;
+typedef NET_PHYSICAL_LOCATION* PNET_PHYSICAL_LOCATION;
+
+typedef IF_COUNTED_STRING_LH IF_COUNTED_STRING;
+typedef IF_COUNTED_STRING* PIF_COUNTED_STRING;
+
+typedef IF_PHYSICAL_ADDRESS_LH IF_PHYSICAL_ADDRESS;
+typedef IF_PHYSICAL_ADDRESS* PIF_PHYSICAL_ADDRESS;
+#endif
+
+
+//
+// IF_INDEX
+//
+// Define the interface index type.
+// This type is not persistable.
+// This must be unsigned (not an enum) to replace previous uses of
+// an index that used a DWORD type.
+//
+
+typedef NET_IFINDEX IF_INDEX, *PIF_INDEX;
+#define IFI_UNSPECIFIED NET_IFINDEX_UNSPECIFIED
+
+
+//
+// Get definitions for IFTYPE and IF_ACCESS_TYPE.
+//
+#include <ipifcons.h>
+
+
+//
+// Types of tunnels (sub-type of IF_TYPE when IF_TYPE is IF_TYPE_TUNNEL).
+// See http://www.iana.org/assignments/ianaiftype-mib.
+//
+typedef enum {
+ TUNNEL_TYPE_NONE = 0,
+ TUNNEL_TYPE_OTHER = 1,
+ TUNNEL_TYPE_DIRECT = 2,
+ TUNNEL_TYPE_6TO4 = 11,
+ TUNNEL_TYPE_ISATAP = 13,
+ TUNNEL_TYPE_TEREDO = 14,
+} TUNNEL_TYPE, *PTUNNEL_TYPE;
+
+//
+// IF_ADMINISTRATIVE_STATE
+//
+// Datalink Interface Administrative State.
+// Indicates whether the interface has been administratively enabled.
+//
+
+typedef enum _IF_ADMINISTRATIVE_STATE {
+ IF_ADMINISTRATIVE_DISABLED,
+ IF_ADMINISTRATIVE_ENABLED,
+ IF_ADMINISTRATIVE_DEMANDDIAL,
+} IF_ADMINISTRATIVE_STATE, *PIF_ADMINISTRATIVE_STATE;
+
+
+//
+// Note: Interface is Operational iff
+// ((MediaSense is Connected) and (AdministrativeState is Enabled))
+// or
+// ((MediaSense is Connected) and (AdministrativeState is OnDemand))
+//
+// !Operational iff
+// ((MediaSense != Connected) or (AdministrativeState is Disabled))
+//
+
+//
+// OperStatus values from RFC 2863
+//
+typedef enum {
+ IfOperStatusUp = 1,
+ IfOperStatusDown,
+ IfOperStatusTesting,
+ IfOperStatusUnknown,
+ IfOperStatusDormant,
+ IfOperStatusNotPresent,
+ IfOperStatusLowerLayerDown
+} IF_OPER_STATUS;
+/* +++++++++++++++++++++++ from ifdef.h */
+
+
+/* +++++++++++++++++++++++ from iptypes.h */
+// Definitions and structures used by getnetworkparams and getadaptersinfo apis
+
+#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 // arb.
+#define MAX_ADAPTER_NAME_LENGTH 256 // arb.
+#define MAX_ADAPTER_ADDRESS_LENGTH 8 // arb.
+#define DEFAULT_MINIMUM_ENTITIES 32 // arb.
+#define MAX_HOSTNAME_LEN 128 // arb.
+#define MAX_DOMAIN_NAME_LEN 128 // arb.
+#define MAX_SCOPE_ID_LEN 256 // arb.
+#define MAX_DHCPV6_DUID_LENGTH 130 // RFC 3315.
+
+//
+// types
+//
+
+// Node Type
+
+#define BROADCAST_NODETYPE 1
+#define PEER_TO_PEER_NODETYPE 2
+#define MIXED_NODETYPE 4
+#define HYBRID_NODETYPE 8
+
+//
+// IP_ADDRESS_STRING - store an IP address as a dotted decimal string
+//
+
+typedef struct {
+ char String[4 * 4];
+} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING;
+
+//
+// IP_ADDR_STRING - store an IP address with its corresponding subnet mask,
+// both as dotted decimal strings
+//
+
+typedef struct _IP_ADDR_STRING {
+ struct _IP_ADDR_STRING* Next;
+ IP_ADDRESS_STRING IpAddress;
+ IP_MASK_STRING IpMask;
+ DWORD Context;
+} IP_ADDR_STRING, *PIP_ADDR_STRING;
+
+//
+// ADAPTER_INFO - per-adapter information. All IP addresses are stored as
+// strings
+//
+
+typedef struct _IP_ADAPTER_INFO {
+ struct _IP_ADAPTER_INFO* Next;
+ DWORD ComboIndex;
+ char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
+ char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
+ UINT AddressLength;
+ BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
+ DWORD Index;
+ UINT Type;
+ UINT DhcpEnabled;
+ PIP_ADDR_STRING CurrentIpAddress;
+ IP_ADDR_STRING IpAddressList;
+ IP_ADDR_STRING GatewayList;
+ IP_ADDR_STRING DhcpServer;
+ BOOL HaveWins;
+ IP_ADDR_STRING PrimaryWinsServer;
+ IP_ADDR_STRING SecondaryWinsServer;
+ time_t LeaseObtained;
+ time_t LeaseExpires;
+} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
+
+#ifdef _WINSOCK2API_
+
+//
+// The following types require Winsock2.
+//
+
+typedef NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN;
+typedef NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN;
+typedef NL_DAD_STATE IP_DAD_STATE;
+
+typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
+ SOCKET_ADDRESS Address;
+
+ IP_PREFIX_ORIGIN PrefixOrigin;
+ IP_SUFFIX_ORIGIN SuffixOrigin;
+ IP_DAD_STATE DadState;
+
+ ULONG ValidLifetime;
+ ULONG PreferredLifetime;
+ ULONG LeaseLifetime;
+ UINT8 OnLinkPrefixLength;
+} IP_ADAPTER_UNICAST_ADDRESS_LH,
+ *PIP_ADAPTER_UNICAST_ADDRESS_LH;
+
+typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next;
+ SOCKET_ADDRESS Address;
+
+ IP_PREFIX_ORIGIN PrefixOrigin;
+ IP_SUFFIX_ORIGIN SuffixOrigin;
+ IP_DAD_STATE DadState;
+
+ ULONG ValidLifetime;
+ ULONG PreferredLifetime;
+ ULONG LeaseLifetime;
+} IP_ADAPTER_UNICAST_ADDRESS_XP, *PIP_ADAPTER_UNICAST_ADDRESS_XP;
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef IP_ADAPTER_UNICAST_ADDRESS_LH IP_ADAPTER_UNICAST_ADDRESS;
+typedef IP_ADAPTER_UNICAST_ADDRESS_LH *PIP_ADAPTER_UNICAST_ADDRESS;
+#elif (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_UNICAST_ADDRESS_XP IP_ADAPTER_UNICAST_ADDRESS;
+typedef IP_ADAPTER_UNICAST_ADDRESS_XP *PIP_ADAPTER_UNICAST_ADDRESS;
+#endif
+
+//
+// Bit values of IP_ADAPTER_UNICAST_ADDRESS Flags field.
+//
+#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x01
+#define IP_ADAPTER_ADDRESS_TRANSIENT 0x02
+
+typedef struct _IP_ADAPTER_ANYCAST_ADDRESS_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_ANYCAST_ADDRESS_XP *Next;
+ SOCKET_ADDRESS Address;
+} IP_ADAPTER_ANYCAST_ADDRESS_XP, *PIP_ADAPTER_ANYCAST_ADDRESS_XP;
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_ANYCAST_ADDRESS_XP IP_ADAPTER_ANYCAST_ADDRESS;
+typedef IP_ADAPTER_ANYCAST_ADDRESS_XP *PIP_ADAPTER_ANYCAST_ADDRESS;
+#endif
+
+typedef struct _IP_ADAPTER_MULTICAST_ADDRESS_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_MULTICAST_ADDRESS_XP *Next;
+ SOCKET_ADDRESS Address;
+} IP_ADAPTER_MULTICAST_ADDRESS_XP, *PIP_ADAPTER_MULTICAST_ADDRESS_XP;
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_MULTICAST_ADDRESS_XP IP_ADAPTER_MULTICAST_ADDRESS;
+typedef IP_ADAPTER_MULTICAST_ADDRESS_XP *PIP_ADAPTER_MULTICAST_ADDRESS;
+#endif
+
+typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Reserved;
+ };
+ };
+ struct _IP_ADAPTER_DNS_SERVER_ADDRESS_XP *Next;
+ SOCKET_ADDRESS Address;
+} IP_ADAPTER_DNS_SERVER_ADDRESS_XP, *PIP_ADAPTER_DNS_SERVER_ADDRESS_XP;
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_DNS_SERVER_ADDRESS_XP IP_ADAPTER_DNS_SERVER_ADDRESS;
+typedef IP_ADAPTER_DNS_SERVER_ADDRESS_XP *PIP_ADAPTER_DNS_SERVER_ADDRESS;
+#endif
+
+typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Reserved;
+ };
+ };
+ struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH *Next;
+ SOCKET_ADDRESS Address;
+} IP_ADAPTER_WINS_SERVER_ADDRESS_LH, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS;
+typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH *PIP_ADAPTER_WINS_SERVER_ADDRESS;
+#endif
+
+
+typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Reserved;
+ };
+ };
+ struct _IP_ADAPTER_GATEWAY_ADDRESS_LH *Next;
+ SOCKET_ADDRESS Address;
+} IP_ADAPTER_GATEWAY_ADDRESS_LH, *PIP_ADAPTER_GATEWAY_ADDRESS_LH;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS;
+typedef IP_ADAPTER_GATEWAY_ADDRESS_LH *PIP_ADAPTER_GATEWAY_ADDRESS;
+#endif
+
+typedef struct _IP_ADAPTER_PREFIX_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD Flags;
+ };
+ };
+ struct _IP_ADAPTER_PREFIX_XP *Next;
+ SOCKET_ADDRESS Address;
+ ULONG PrefixLength;
+} IP_ADAPTER_PREFIX_XP, *PIP_ADAPTER_PREFIX_XP;
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_PREFIX_XP IP_ADAPTER_PREFIX;
+typedef IP_ADAPTER_PREFIX_XP *PIP_ADAPTER_PREFIX;
+#endif
+
+//
+// Bit values of IP_ADAPTER_ADDRESSES Flags field.
+//
+#define IP_ADAPTER_DDNS_ENABLED 0x00000001
+#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x00000002
+#define IP_ADAPTER_DHCP_ENABLED 0x00000004
+#define IP_ADAPTER_RECEIVE_ONLY 0x00000008
+#define IP_ADAPTER_NO_MULTICAST 0x00000010
+#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x00000020
+#define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x00000040
+#define IP_ADAPTER_IPV4_ENABLED 0x00000080
+#define IP_ADAPTER_IPV6_ENABLED 0x00000100
+
+typedef struct _IP_ADAPTER_ADDRESSES_LH {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ IF_INDEX IfIndex;
+ };
+ };
+ struct _IP_ADAPTER_ADDRESSES_LH *Next;
+ PCHAR AdapterName;
+ PIP_ADAPTER_UNICAST_ADDRESS_LH FirstUnicastAddress;
+ PIP_ADAPTER_ANYCAST_ADDRESS_XP FirstAnycastAddress;
+ PIP_ADAPTER_MULTICAST_ADDRESS_XP FirstMulticastAddress;
+ PIP_ADAPTER_DNS_SERVER_ADDRESS_XP FirstDnsServerAddress;
+ PWCHAR DnsSuffix;
+ PWCHAR Description;
+ PWCHAR FriendlyName;
+ BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
+ ULONG PhysicalAddressLength;
+ union {
+ ULONG Flags;
+ struct {
+ ULONG DdnsEnabled : 1;
+ ULONG RegisterAdapterSuffix : 1;
+ ULONG Dhcpv4Enabled : 1;
+ ULONG ReceiveOnly : 1;
+ ULONG NoMulticast : 1;
+ ULONG Ipv6OtherStatefulConfig : 1;
+ ULONG NetbiosOverTcpipEnabled : 1;
+ ULONG Ipv4Enabled : 1;
+ ULONG Ipv6Enabled : 1;
+ ULONG Ipv6ManagedAddressConfigurationSupported : 1;
+ };
+ };
+ ULONG Mtu;
+ IFTYPE IfType;
+ IF_OPER_STATUS OperStatus;
+ IF_INDEX Ipv6IfIndex;
+ ULONG ZoneIndices[16];
+ PIP_ADAPTER_PREFIX_XP FirstPrefix;
+
+ ULONG64 TransmitLinkSpeed;
+ ULONG64 ReceiveLinkSpeed;
+ PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress;
+ PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress;
+ ULONG Ipv4Metric;
+ ULONG Ipv6Metric;
+ IF_LUID Luid;
+ SOCKET_ADDRESS Dhcpv4Server;
+ NET_IF_COMPARTMENT_ID CompartmentId;
+ NET_IF_NETWORK_GUID NetworkGuid;
+ NET_IF_CONNECTION_TYPE ConnectionType;
+ TUNNEL_TYPE TunnelType;
+ //
+ // DHCP v6 Info.
+ //
+ SOCKET_ADDRESS Dhcpv6Server;
+ BYTE Dhcpv6ClientDuid[MAX_DHCPV6_DUID_LENGTH];
+ ULONG Dhcpv6ClientDuidLength;
+ ULONG Dhcpv6Iaid;
+} IP_ADAPTER_ADDRESSES_LH,
+ *PIP_ADAPTER_ADDRESSES_LH;
+
+typedef struct _IP_ADAPTER_ADDRESSES_XP {
+ union {
+ ULONGLONG Alignment;
+ struct {
+ ULONG Length;
+ DWORD IfIndex;
+ };
+ };
+ struct _IP_ADAPTER_ADDRESSES_XP *Next;
+ PCHAR AdapterName;
+ PIP_ADAPTER_UNICAST_ADDRESS_XP FirstUnicastAddress;
+ PIP_ADAPTER_ANYCAST_ADDRESS_XP FirstAnycastAddress;
+ PIP_ADAPTER_MULTICAST_ADDRESS_XP FirstMulticastAddress;
+ PIP_ADAPTER_DNS_SERVER_ADDRESS_XP FirstDnsServerAddress;
+ PWCHAR DnsSuffix;
+ PWCHAR Description;
+ PWCHAR FriendlyName;
+ BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
+ DWORD PhysicalAddressLength;
+ DWORD Flags;
+ DWORD Mtu;
+ DWORD IfType;
+ IF_OPER_STATUS OperStatus;
+ DWORD Ipv6IfIndex;
+ DWORD ZoneIndices[16];
+ PIP_ADAPTER_PREFIX_XP FirstPrefix;
+} IP_ADAPTER_ADDRESSES_XP,
+ *PIP_ADAPTER_ADDRESSES_XP;
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef IP_ADAPTER_ADDRESSES_LH IP_ADAPTER_ADDRESSES;
+typedef IP_ADAPTER_ADDRESSES_LH *PIP_ADAPTER_ADDRESSES;
+#elif (NTDDI_VERSION >= NTDDI_WINXP)
+typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
+typedef IP_ADAPTER_ADDRESSES_XP *PIP_ADAPTER_ADDRESSES;
+#else
+//
+// For platforms other platforms that are including
+// the file but not using the types.
+//
+typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
+typedef IP_ADAPTER_ADDRESSES_XP *PIP_ADAPTER_ADDRESSES;
+#endif
+
+
+//
+// Flags used as argument to GetAdaptersAddresses().
+// "SKIP" flags are added when the default is to include the information.
+// "INCLUDE" flags are added when the default is to skip the information.
+//
+#define GAA_FLAG_SKIP_UNICAST 0x0001
+#define GAA_FLAG_SKIP_ANYCAST 0x0002
+#define GAA_FLAG_SKIP_MULTICAST 0x0004
+#define GAA_FLAG_SKIP_DNS_SERVER 0x0008
+#define GAA_FLAG_INCLUDE_PREFIX 0x0010
+#define GAA_FLAG_SKIP_FRIENDLY_NAME 0x0020
+#define GAA_FLAG_INCLUDE_WINS_INFO 0x0040
+#define GAA_FLAG_INCLUDE_GATEWAYS 0x0080
+#define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x0100
+#define GAA_FLAG_INCLUDE_ALL_COMPARTMENTS 0x0200
+#define GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER 0x0400
+
+#endif /* _WINSOCK2API_ */
+/* +++++++++++++++++++++++ from iptypes.h */
+
+
+/* +++++++++++++++++++++++ from iphlpapi.h */
+#ifdef _WINSOCK2API_
+
+//
+// The following functions require Winsock2.
+//
+
+ULONG
+WINAPI
+GetAdaptersAddresses(
+ IN ULONG Family,
+ IN ULONG Flags,
+ IN PVOID Reserved,
+ __out_bcount_opt(*SizePointer) PIP_ADAPTER_ADDRESSES AdapterAddresses,
+ IN OUT PULONG SizePointer
+ );
+
+#endif
+/* +++++++++++++++++++++++ from iphlpapi.h */
+
+#pragma warning(pop)
+#endif /* !_W64 */
+#endif /* GAA_COMPAT_H */
diff --git a/ports/winnt/include/hopf_PCI_io.h b/ports/winnt/include/hopf_PCI_io.h
new file mode 100644
index 000000000000..7bca1d3f57c9
--- /dev/null
+++ b/ports/winnt/include/hopf_PCI_io.h
@@ -0,0 +1,91 @@
+/*
+ * hopf_PCI_io.h
+ * structur definition and prototype Function declarations
+ *
+ * Date: 21.03.2000 Revision: 01.10
+ *
+ * Copyright (C) 1999, 2000 by Bernd Altmeier altmeier@ATLSoft.de
+ *
+ */
+
+#if defined(__cplusplus)
+extern "C"{
+#endif
+
+#ifndef __inpREAD_H
+#define __inpREAD_H
+
+
+typedef struct _CLOCKVER {
+ CHAR cVersion[255];
+} CLOCKVER, *PCLOCKVER, *LPCLOCKVER;
+
+typedef struct _HOPFTIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+ WORD wStatus;
+} HOPFTIME, *PHOPFTIME, *LPHOPFTIME;
+
+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, *PSATSTAT, *LPSATSTAT;
+
+
+typedef struct _GPSPOS {
+ LONG wAltitude; // Höhe immer 0
+ LONG wLongitude; // Länge in Msec
+ LONG wLatitude; // Breite in Msec
+} GPSPOS, *PGPSPOS, *LPGPSPOS;
+
+
+typedef struct _DCFANTENNE {
+ BYTE bStatus;
+ BYTE bStatus1;
+ WORD wAntValue;
+} DCFANTENNE, *PDCFANTENNE, *LPDCFANTENNE;
+
+
+
+// Function declarations
+BOOL OpenHopfDevice();
+BOOL CloseHopfDevice();
+VOID GetHopfTime(LPHOPFTIME Data, DWORD Offset);
+VOID GetHopfLocalTime(LPHOPFTIME Data);
+VOID GetHopfSystemTime(LPHOPFTIME Data);
+VOID GetSatData(LPSATSTAT Data);
+VOID GetDiffTime(LPLONG Data);
+VOID GetPosition(LPGPSPOS Data);
+VOID GetHardwareVersion(LPCLOCKVER Data);
+VOID GetHardwareData(LPDWORD Data,WORD Ofs);
+VOID GetDCFAntenne(LPDCFANTENNE Data);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* inpREAD_H */
+
diff --git a/ports/winnt/include/netdb.h b/ports/winnt/include/netdb.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/netdb.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/ntp_iocompletionport.h b/ports/winnt/include/ntp_iocompletionport.h
new file mode 100644
index 000000000000..7d7ff7c4b207
--- /dev/null
+++ b/ports/winnt/include/ntp_iocompletionport.h
@@ -0,0 +1,27 @@
+#if !defined __ntp_iocompletionport_h
+# define __ntp_iocompletionport_h
+
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "clockstuff.h"
+#include "ntp_worker.h"
+
+# if defined(HAVE_IO_COMPLETION_PORT)
+
+extern void init_io_completion_port(void);
+extern void uninit_io_completion_port(void);
+
+extern int io_completion_port_add_socket(SOCKET fd, struct interface *);
+
+struct refclockio; /* in ntp_refclock.h but inclusion here triggers problems */
+extern int io_completion_port_add_clock_io(struct refclockio *rio);
+extern void io_completion_port_remove_clock_io(struct refclockio *rio);
+extern int io_completion_port_sendto(int, void *, size_t, sockaddr_u *);
+
+extern int GetReceivedBuffers(void);
+
+extern HANDLE WaitableExitEventHandle;
+
+# endif
+
+#endif
diff --git a/ports/winnt/include/ntp_timer.h b/ports/winnt/include/ntp_timer.h
new file mode 100644
index 000000000000..15328a67a123
--- /dev/null
+++ b/ports/winnt/include/ntp_timer.h
@@ -0,0 +1,6 @@
+#ifndef NTP_TIMER_H
+#define NTP_TIMER_H
+
+extern void timer_clr_stats(void);
+
+#endif /* NTP_TIMER_H */
diff --git a/ports/winnt/include/ntservice.h b/ports/winnt/include/ntservice.h
new file mode 100644
index 000000000000..f44335fdb3b9
--- /dev/null
+++ b/ports/winnt/include/ntservice.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 1999-2001 Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
+ * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+ * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef NTSERVICE_H
+#define NTSERVICE_H
+
+#define NTP_DISPLAY_NAME "NetworkTimeProtocol"
+#define NTP_SERVICE_NAME "ntpd"
+
+void ntservice_init(void);
+void UpdateSCM(DWORD);
+void WINAPI ServiceControl(DWORD dwCtrlCode);
+void ntservice_shutdown(void);
+BOOL ntservice_systemisshuttingdown(void);
+BOOL WINAPI OnConsoleEvent(DWORD dwCtrlType);
+
+#endif /* NTSERVICE_H */
diff --git a/ports/winnt/include/stdint.h b/ports/winnt/include/stdint.h
new file mode 100644
index 000000000000..4040c24f0f84
--- /dev/null
+++ b/ports/winnt/include/stdint.h
@@ -0,0 +1,244 @@
+/*
+ * stdint_msvc.h - C99 integer types for older Visual C compilers
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * ----------------------------------------------------------------------
+ *
+ * Fairly straight forward implementation of the C99 standard integer
+ * types.
+ */
+
+#ifndef __STDINT_INCLUDED
+#define __STDINT_INCLUDED
+
+#if !defined(_MSC_VER) || _MSC_VER >= 1800
+# error Use only with MSVC6 - MSVC11(VS2012)
+#endif
+
+#include <crtdefs.h>
+#include <limits.h>
+
+/* ---------------------------------------------------------------------
+ * We declare the min/max values, using the MSVC syntax for literals of
+ * a given bit width.
+ */
+
+#define _VC_SI_LIT(lit,wbit) (lit ## i ## wbit)
+#define _VC_UI_LIT(lit,wbit) (lit ## ui ## wbit)
+
+/* ---------------------------------------------------------------------
+ * Exact width integer types
+ */
+typedef __int8 int8_t;
+typedef __int16 int16_t;
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# define INT8_MIN _I8_MIN
+# define INT8_MAX _I8_MAX
+# define UINT8_MAX _UI8_MAX
+# define INT16_MIN _I16_MIN
+# define INT16_MAX _I16_MAX
+# define UINT16_MAX _UI16_MAX
+# define INT32_MIN _I32_MIN
+# define INT32_MAX _I32_MAX
+# define UINT32_MAX _UI32_MAX
+# define INT64_MIN _I64_MIN
+# define INT64_MAX _I64_MAX
+# define UINT64_MAX _UI64_MAX
+#endif
+
+/* ---------------------------------------------------------------------
+ * Least-size integers
+ *
+ * These are mapped to exact size.
+ */
+typedef __int8 int_least8_t;
+typedef __int16 int_least16_t;
+typedef __int32 int_least32_t;
+typedef __int64 int_least64_t;
+
+typedef unsigned __int8 uint_least8_t;
+typedef unsigned __int16 uint_least16_t;
+typedef unsigned __int32 uint_least32_t;
+typedef unsigned __int64 uint_least64_t;
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+#define INT_LEAST8_MIN _I8_MIN
+#define INT_LEAST8_MAX _I8_MAX
+#define UINT_LEAST8_MAX _UI8_MAX
+#define INT_LEAST16_MIN _I16_MIN
+#define INT_LEAST16_MAX _I16_MAX
+#define UINT_LEAST16_MAX _UI16_MAX
+#define INT_LEAST32_MIN _I32_MIN
+#define INT_LEAST32_MAX _I32_MAX
+#define UINT_LEAST32_MAX _UI32_MAX
+#define INT_LEAST64_MIN _I64_MIN
+#define INT_LEAST64_MAX _I64_MAX
+#define UINT_LEAST64_MAX _UI64_MAX
+#endif
+
+/* ---------------------------------------------------------------------
+ * least-size, fastest integer
+ *
+ * The 'FAST' types are all 32 bits, except the 64 bit quantity; as the
+ * natural register width is 32 bits, quantities of that size are fastest
+ * to operate on naturally. (This even holds for the x86_64; MSVC uses
+ * the 'llp64' model.
+ */
+typedef __int32 int_fast8_t;
+typedef __int32 int_fast16_t;
+typedef __int32 int_fast32_t;
+typedef __int64 int_fast64_t;
+
+typedef unsigned __int32 uint_fast8_t;
+typedef unsigned __int32 uint_fast16_t;
+typedef unsigned __int32 uint_fast32_t;
+typedef unsigned __int64 uint_fast64_t;
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+#define INT_FAST8_MIN _I32_MIN
+#define INT_FAST8_MAX _I32_MAX
+#define UINT_FAST8_MAX _UI32_MAX
+#define INT_FAST16_MIN _I32_MIN
+#define INT_FAST16_MAX _I32_MAX
+#define UINT_FAST16_MAX _UI32_MAX
+#define INT_FAST32_MIN _I32_MIN
+#define INT_FAST32_MAX _I32_MAX
+#define UINT_FAST32_MAX _UI32_MAX
+#define INT_FAST64_MIN _I64_MIN
+#define INT_FAST64_MAX _I64_MAX
+#define UINT_FAST64_MAX _UI64_MAX
+#endif
+
+/* ---------------------------------------------------------------------
+ * The (u)intptr_t, ptrdiff_t and size_t definitions depend on the
+ * target: 32bit for x86, and 64bit for x64, aka amd64. Well, we
+ * have to bite the bullet.
+ */
+
+/* ------------------------------------------------------------------ */
+# if defined(_WIN64) || defined(WIN64)
+/* ------------------------------------------------------------------ */
+
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+ typedef __int64 intptr_t;
+# endif
+
+# ifndef _UINTPTR_T_DEFINED
+# define _UINTPTR_T_DEFINED
+ typedef unsigned __int64 uintptr_t;
+# endif
+
+# ifndef _PTRDIFF_T_DEFINED
+# define _PTRDIFF_T_DEFINED
+ typedef __int64 ptrdiff_t;
+# endif
+
+# if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# ifndef INTPTR_MIN
+# define INTPTR_MIN _I64_MIN
+# endif
+# ifndef INTPTR_MAX
+# define INTPTR_MAX _I64_MAX
+# endif
+# ifndef UINTPTR_MAX
+# define UINTPTR_MAX _UI64_MAX
+# endif
+# ifndef PTRDIFF_MIN
+# define PTRDIFF_MIN _I64_MIN
+# endif
+# ifndef PTRDIFF_MAX
+# define PTRDIFF_MAX _I64_MAX
+# endif
+# endif
+
+/* ------------------------------------------------------------------ */
+#else /* 32 bit target assumed here! */
+/* ------------------------------------------------------------------ */
+
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+ typedef __int32 intptr_t;
+# endif
+
+# ifndef _UINTPTR_T_DEFINED
+# define _UINTPTR_T_DEFINED
+ typedef unsigned __int32 uintptr_t;
+# endif
+
+# ifndef _PTRDIFF_T_DEFINED
+# define _PTRDIFF_T_DEFINED
+ typedef __int64 ptrdiff_t;
+# endif
+
+# if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# ifndef INTPTR_MIN
+# define INTPTR_MIN _I32_MIN
+# endif
+# ifndef INTPTR_MAX
+# define INTPTR_MAX _I32_MAX
+# endif
+# ifndef UINTPTR_MAX
+# define UINTPTR_MAX _UI32_MAX
+# endif
+# ifndef PTRDIFF_MIN
+# define PTRDIFF_MIN _I32_MIN
+# endif
+# ifndef PTRDIFF_MAX
+# define PTRDIFF_MAX _I32_MAX
+# endif
+# endif
+#endif /* platform dependent stuff */
+
+
+/* ---------------------------------------------------------------------
+ * max integer is 64-bit integer
+ */
+typedef __int64 intmax_t;
+typedef unsigned __int64 uintmax_t;
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# define INTMAX_MIN _I64_MIN
+# define INTMAX_MAX _I64_MAX
+# define UINTMAX_MAX _UI64_MAX
+#endif
+
+/* ---------------------------------------------------------------------
+ * limit for size_t (older MSVC versions lack that one)
+ */
+#if _MSC_VER <=1200
+# if defined(_WIN64) || defined(WIN64)
+# define SIZE_MAX _UI64_MAX
+#else
+# define SIZE_MAX _UI32_MAX
+# endif
+#endif
+
+/* ---------------------------------------------------------------------
+ * construct numerical literals with precise size
+ */
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
+# define INT8_C(lit) _VC_SI_LIT(lit,8)
+# define UINT8_C(lit) _VC_UI_LIT(lit,8)
+# define INT16_C(lit) _VC_SI_LIT(lit,16)
+# define UINT16_C(lit) _VC_UI_LIT(lit,16)
+# define INT32_C(lit) _VC_SI_LIT(lit,32)
+# define UINT32_C(lit) _VC_UI_LIT(lit,32)
+# define INT64_C(lit) _VC_SI_LIT(lit,64)
+# define UINT64_C(lit) _VC_UI_LIT(lit,64)
+# define INTMAX_C(lit) _VC_SI_LIT(lit,64)
+# define UINTMAX_C(lit) _VC_UI_LIT(lit,64)
+#endif
+
+#endif
+/**** EOF ****/
diff --git a/ports/winnt/include/stdnoreturn.h b/ports/winnt/include/stdnoreturn.h
new file mode 100644
index 000000000000..65702e012026
--- /dev/null
+++ b/ports/winnt/include/stdnoreturn.h
@@ -0,0 +1,61 @@
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A substitute for ISO C11 <stdnoreturn.h>.
+
+ Copyright 2012-2014 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef noreturn
+
+/* ISO C11 <stdnoreturn.h> for platforms that lack it.
+
+ References:
+ ISO C11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+ section 7.23 */
+
+/* The definition of _Noreturn is copied here. */
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
+
+#if 1200 <= _MSC_VER
+/* Standard include files on this platform contain declarations like
+ "__declspec (noreturn) void abort (void);". "#define noreturn
+ _Noreturn" would cause this declaration to be rewritten to the
+ invalid "__declspec (__declspec (noreturn)) void abort (void);".
+ Instead, define noreturn to empty, so that such declarations are
+ rewritten to "__declspec () void abort (void);", which is
+ equivalent to "void abort (void);"; this gives up on noreturn's
+ advice to the compiler but at least it is valid code. */
+# define noreturn /*empty*/
+#else
+# define noreturn _Noreturn
+#endif
+
+/* Did he ever return?
+ No he never returned
+ And his fate is still unlearn'd ...
+ -- Steiner J, Hawes BL. M.T.A. (1949) */
+
+#endif /* noreturn */
diff --git a/ports/winnt/include/sys/ioctl.h b/ports/winnt/include/sys/ioctl.h
new file mode 100644
index 000000000000..6f4b07691661
--- /dev/null
+++ b/ports/winnt/include/sys/ioctl.h
@@ -0,0 +1,11 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
+
+#ifndef _IOCTL_H
+#define _IOCTL_H
+
+#include "win32_io.h"
+
+#endif \ No newline at end of file
diff --git a/ports/winnt/include/sys/param.h b/ports/winnt/include/sys/param.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/sys/param.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/sys/resource.h b/ports/winnt/include/sys/resource.h
new file mode 100644
index 000000000000..01f4c810ff7f
--- /dev/null
+++ b/ports/winnt/include/sys/resource.h
@@ -0,0 +1,10 @@
+/*
+ * ports/winnt/include/sys/resource.h
+ *
+ * routines declared in Unix systems' sys/resource.h
+ */
+
+#define PRIO_PROCESS 0
+#define NTP_PRIO (-12)
+
+int setpriority(int, int, int); /* winnt\libntp\setpriority.c */
diff --git a/ports/winnt/include/sys/signal.h b/ports/winnt/include/sys/signal.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/sys/signal.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/sys/time.h b/ports/winnt/include/sys/time.h
new file mode 100644
index 000000000000..b4489170bea0
--- /dev/null
+++ b/ports/winnt/include/sys/time.h
@@ -0,0 +1,25 @@
+/*
+ * ports/winnt/include/sys/time.h
+ *
+ * routines declared in Unix systems' sys/time.h
+ */
+
+#ifndef SYS_TIME_H
+#define SYS_TIME_H
+
+#include "ntp_types.h"
+#include <time.h>
+#include <sys/timeb.h>
+
+typedef struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+} timespec_t;
+
+#define TIMEOFDAY 0 /* getclock() clktyp arg */
+extern int getclock(int, struct timespec *ts);
+extern int gettimeofday(struct timeval *, void *);
+extern int settimeofday(struct timeval *);
+extern void init_win_precise_time(void);
+
+#endif /* SYS_TIME_H */
diff --git a/ports/winnt/include/sys/wait.h b/ports/winnt/include/sys/wait.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/sys/wait.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/syslog.h b/ports/winnt/include/syslog.h
new file mode 100644
index 000000000000..5cbf30a00a13
--- /dev/null
+++ b/ports/winnt/include/syslog.h
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+/* From BIND 9 lib/isc/include/isc/: syslog.h,v 1.4 2002/08/01 03:43:31 mayer */
+
+#ifndef _SYSLOG_H
+#define _SYSLOG_H
+
+#include <stdio.h>
+
+/* Constant definitions for openlog() */
+#define LOG_PID 1
+#define LOG_CONS 2
+/* NT event log does not support facility level */
+#define LOG_KERN 0
+#define LOG_USER 0
+#define LOG_MAIL 0
+#define LOG_DAEMON 0
+#define LOG_AUTH 0
+#define LOG_SYSLOG 0
+#define LOG_LPR 0
+#define LOG_LOCAL0 0
+#define LOG_LOCAL1 0
+#define LOG_LOCAL2 0
+#define LOG_LOCAL3 0
+#define LOG_LOCAL4 0
+#define LOG_LOCAL5 0
+#define LOG_LOCAL6 0
+#define LOG_LOCAL7 0
+
+#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 */
+
+/*
+ * These are ignored on NT
+ */
+#define LOG_NDELAY 0 /* Open the connection to syslogd immediately */
+
+#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
+
+void
+syslog(int level, const char *fmt, ...);
+
+void
+openlog(const char *, int, ...);
+
+void
+closelog(void);
+
+void
+ModifyLogLevel(int level);
+
+int
+setlogmask(int maskpri);
+
+void
+InitNTLogging(FILE *, int);
+
+void
+NTReportError(const char *, const char *);
+
+#endif
diff --git a/ports/winnt/include/termios.h b/ports/winnt/include/termios.h
new file mode 100644
index 000000000000..9c1cc625cd40
--- /dev/null
+++ b/ports/winnt/include/termios.h
@@ -0,0 +1,214 @@
+#ifndef NTP_WIN_TERMIOS_H
+#define NTP_WIN_TERMIOS_H
+
+/* Flag definitions for compatibility
+ * ==================================
+*/
+
+#include <fcntl.h>
+
+#define NCCS 18 /* refclock_arc.c uses VTIME (17) */
+#define VEOL 3
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+struct termios
+{
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+};
+
+/* c_cc characters
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+*/
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IUCLC 0001000
+#define IXON 0002000
+#define IXANY 0004000
+#define IXOFF 0010000
+#define IMAXBEL 0020000
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define OLCUC 0000002
+#define ONLCR 0000004
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+
+#define NLDLY 0000400
+#define NL0 0000000
+#define NL1 0000400
+
+#define CRDLY 0003000
+#define CR0 0000000
+#define CR1 0001000
+#define CR2 0002000
+#define CR3 0003000
+
+#define TABDLY 0014000
+#define TAB0 0000000
+#define TAB1 0004000
+#define TAB2 0010000
+#define TAB3 0014000
+#define XTABS 0014000
+
+#define BSDLY 0020000
+#define BS0 0000000
+#define BS1 0020000
+
+#define VTDLY 0040000
+#define VT0 0000000
+#define VT1 0040000
+
+#define FFDLY 0100000
+#define FF0 0000000
+#define FF1 0100000
+
+/* c_cflag bit meaning */
+#define CBAUD 0010017
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+
+#define EXTA B19200
+#define EXTB B38400
+
+#define CSIZE 0000060
+#define CS5 0000000
+#define CS6 0000020
+#define CS7 0000040
+#define CS8 0000060
+
+#define CSTOPB 0000100
+#define CREAD 0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL 0002000
+#define CLOCAL 0004000
+
+#define CBAUDEX 0010000
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+
+#define CIBAUD 002003600000 /* input baud rate (not used) */
+#define CRTSCTS 020000000000 /* flow control */
+
+/* c_lflag bits */
+#define ISIG 0000001
+#define ICANON 0000002
+#define XCASE 0000004
+#define ECHO 0000010
+#define ECHOE 0000020
+#define ECHOK 0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL 0001000
+#define ECHOPRT 0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+/* tcflow() and TCXONC use these */
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+/* tcflush() and TCFLSH use these */
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+/* tcsetattr uses these */
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+#define VMIN 16
+#define VTIME 17
+
+/* modem lines */
+#define TIOCM_LE 0x001
+#define TIOCM_DTR 0x002
+#define TIOCM_RTS 0x004
+#define TIOCM_ST 0x008
+#define TIOCM_SR 0x010
+#define TIOCM_CTS 0x020
+#define TIOCM_CAR 0x040
+#define TIOCM_RNG 0x080
+#define TIOCM_DSR 0x100
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_OUT1 0x2000
+#define TIOCM_OUT2 0x4000
+
+/* ioctl */
+#define TIOCMGET 1
+#define TIOCMSET 2
+#define TIOCMBIC 3
+#define TIOCMBIS 4
+
+/* NOP cfsetospeed() and cfsetispeed() for now */
+#define cfsetospeed(dcb, spd) (0)
+#define cfsetispeed(dcb, spd) (0)
+
+extern int closeserial (int);
+extern int ioctl (int, int, int *);
+extern int tcsetattr (int, int, const struct termios *);
+extern int tcgetattr (int, struct termios *);
+extern int tcflush (int, int);
+extern int isserialhandle (HANDLE);
+
+#endif /* NTP_WIN_TERMIOS_H */
diff --git a/ports/winnt/include/timepps.h b/ports/winnt/include/timepps.h
new file mode 100644
index 000000000000..76b1bfada1ab
--- /dev/null
+++ b/ports/winnt/include/timepps.h
@@ -0,0 +1,811 @@
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2009 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and *
+ * its documentation for any purpose and with or 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This modified timepps.h can be used to provide a PPSAPI interface *
+ * to a machine running Windows with one or more backend provider DLLs *
+ * implementing the provider interfaces defined herein. *
+ * *
+ * This Windows version was derived by Dave Hart *
+ * <davehart@davehart.com> from Mills' timepps-Solaris.h *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+#ifndef TIMEPPS_H
+#define TIMEPPS_H
+
+#include "sys/time.h" /* in ntp ref source declares struct timespec */
+
+/*
+ * The following definitions are architecture independent
+ */
+
+#define PPS_API_VERS_1 1 /* API version number */
+#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
+#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
+#define PPS_FRAC 4294967296. /* 2^32 as a double */
+#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
+#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
+
+#define PPS_NORMALIZE(x) /* normalize timespec */ \
+ do { \
+ if ((x).tv_nsec >= PPS_NANOSECOND) { \
+ (x).tv_nsec -= PPS_NANOSECOND; \
+ (x).tv_sec++; \
+ } else if ((x).tv_nsec < 0) { \
+ (x).tv_nsec += PPS_NANOSECOND; \
+ (x).tv_sec--; \
+ } \
+ } while (0)
+
+#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
+ do { \
+ double d_frac; \
+ \
+ d_frac = ((struct timespec)&(x))->tv_nsec \
+ * PPS_FRAC / PPS_NANOSECOND; \
+ (x).integral = ((struct timespec)&(x))->tv_sec \
+ + PPS_JAN_1970; \
+ (x).fractional = (unsigned int)d_frac; \
+ if (d_frac >= PPS_FRAC) \
+ (x).integral++; \
+ } while (0)
+
+#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
+ do { \
+ double d_frac; \
+ \
+ /* careful, doing in place and tv_sec may be 64bit */ \
+ d_frac = (double)((ntp_fp_t *)&(x))->fractional \
+ * PPS_NANOSECOND / PPS_FRAC; \
+ (x).tv_sec = ((ntp_fp_t *)&(x))->integral \
+ - (time_t)PPS_JAN_1970; \
+ (x).tv_nsec = (long)d_frac; \
+ } while (0)
+
+
+/*
+ * Device/implementation parameters (mode)
+ */
+
+#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
+#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
+#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
+
+#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
+#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
+#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
+
+#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
+#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
+
+/*
+ * Kernel actions (mode)
+ */
+
+#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
+#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
+
+/*
+ * Timestamp formats (tsformat)
+ */
+
+#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
+#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
+#define PPS_TSFMT_BOTH (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
+
+/*
+ * Kernel discipline actions (not used in Windows yet)
+ */
+
+#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
+#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
+#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
+
+/*
+ * Type definitions
+ */
+
+typedef unsigned long pps_seq_t; /* sequence number */
+
+#pragma warning(push)
+#pragma warning(disable: 201) /* nonstd extension nameless union */
+
+typedef struct ntp_fp {
+ union ntp_fp_sec {
+ unsigned int integral;
+ int s_integral;
+ };
+ unsigned int fractional;
+} ntp_fp_t; /* NTP-compatible time stamp */
+
+#pragma warning(pop)
+
+typedef union pps_timeu { /* timestamp format */
+ struct timespec tspec;
+ ntp_fp_t ntpfp;
+ unsigned long longpad[3];
+} pps_timeu_t; /* generic data type to represent time stamps */
+
+/* addition of NTP fixed-point format */
+
+#define NTPFP_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 NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->integral, (r)->fractional, \
+ (a)->s_integral, (a)->fractional)
+
+
+/*
+ * Timestamp information structure
+ */
+
+typedef struct pps_info {
+ pps_seq_t assert_sequence; /* seq. num. of assert event */
+ pps_seq_t clear_sequence; /* seq. num. of clear event */
+ pps_timeu_t assert_tu; /* time of assert event */
+ pps_timeu_t clear_tu; /* time of clear event */
+ int current_mode; /* current mode bits */
+} pps_info_t;
+
+#define assert_timestamp assert_tu.tspec
+#define clear_timestamp clear_tu.tspec
+
+#define assert_timestamp_ntpfp assert_tu.ntpfp
+#define clear_timestamp_ntpfp clear_tu.ntpfp
+
+/*
+ * Parameter structure
+ */
+
+typedef struct pps_params {
+ int api_version; /* API version # */
+ int mode; /* mode bits */
+ pps_timeu_t assert_off_tu; /* offset compensation for assert */
+ pps_timeu_t clear_off_tu; /* offset compensation for clear */
+} pps_params_t;
+
+#define assert_offset assert_off_tu.tspec
+#define clear_offset clear_off_tu.tspec
+
+#define assert_offset_ntpfp assert_off_tu.ntpfp
+#define clear_offset_ntpfp clear_off_tu.ntpfp
+
+/*
+ *------ Here begins the implementation-specific part! ------
+ */
+
+#include <windows.h>
+#include <errno.h>
+#include <stddef.h> /* offsetof() */
+#include <io.h> /* _get_osfhandle() */
+
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 45
+#endif
+
+typedef UINT_PTR pps_handle_t; /* pps handlebars */
+
+#ifndef inline
+#define inline __inline
+#endif
+
+/*
+ * ntpd on Windows is typically distributed as a binary as few users
+ * have the tools needed to build from source. Rather than build
+ * a single timepps.h for Windows which knows how to talk to all
+ * PPS implementations frozen in time as of compiling, this timepps.h
+ * allows one or more backend providers to be used by naming a DLL
+ * which exports the provider interfaces defined here.
+ */
+typedef enum ppsapi_magic_tag {
+ PPSAPI_MAGIC_UNIT = 0x70707355, /* ppsU */
+} ppsapi_magic;
+
+typedef struct {
+ struct pps_provider_tag *provider;
+ void * context;/* provider's unit pointer */
+ ppsapi_magic magic; /* to detect invalid handles */
+ pps_params_t params; /* PPS parameters set by user */
+} pps_unit_t;
+
+typedef void (*ppps_ntp_timestamp_from_counter)(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp
+ );
+
+typedef pps_handle_t (*pcreate_pps_handle)(
+ void * prov_context
+ );
+
+/*
+ * ppsapi_prov_init() - exported by backend DLLs
+ *
+ * Return value is pps capabilities available to PPSAPI consumers
+ * via time_pps_getcaps().
+ */
+#define PPSAPI_TIMEPPS_PROV_VER 2
+
+typedef int (WINAPI *pppsapi_prov_init)(
+ int ppsapi_timepps_prov_ver,
+ pcreate_pps_handle create_pps_handle,
+ ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
+ char * short_name_buf,
+ size_t short_name_size,
+ char * full_name_buf,
+ size_t full_name_size
+ );
+
+typedef int (WINAPI *provtime_pps_create)(
+ HANDLE winhandle, /* user device handle */
+ pps_handle_t *phandle /* returned handle */
+ );
+
+typedef int (WINAPI *provtime_pps_destroy)(
+ pps_unit_t * unit,
+ void * context
+ );
+
+typedef int (WINAPI *provtime_pps_setparams)(
+ pps_unit_t * unit,
+ void * context,
+ const pps_params_t * params
+ );
+
+typedef int (WINAPI *provtime_pps_fetch)(
+ pps_unit_t * unit,
+ void * context,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * timeout
+ );
+
+typedef int (WINAPI *provtime_pps_kcbind)(
+ pps_unit_t * unit,
+ void * context,
+ const int kernel_consumer,
+ const int edge,
+ const int tsformat
+ );
+
+typedef struct pps_provider_tag {
+ struct pps_provider_tag *next;
+ int caps;
+ char * short_name;
+ char * full_name;
+ provtime_pps_create ptime_pps_create;
+ provtime_pps_destroy ptime_pps_destroy;
+ provtime_pps_setparams ptime_pps_setparams;
+ provtime_pps_fetch ptime_pps_fetch;
+ provtime_pps_kcbind ptime_pps_kcbind;
+} ppsapi_provider;
+
+static ppsapi_provider * g_provider_list;
+static ppsapi_provider * g_curr_provider;
+
+
+static inline pps_handle_t
+internal_create_pps_handle(
+ void * prov_context
+ )
+{
+ pps_unit_t * punit;
+
+ if (NULL == g_curr_provider) {
+ fprintf(stderr, "create_pps_handle: provider backend called me outside time_pps_create\n");
+ punit = NULL;
+ } else
+ punit = malloc(sizeof(*punit));
+ if (punit != NULL) {
+ punit->provider = g_curr_provider;
+ punit->context = prov_context;
+ punit->magic = PPSAPI_MAGIC_UNIT;
+ memset(&punit->params, 0, sizeof(punit->params));
+ }
+ return (pps_handle_t)punit;
+}
+
+static inline pps_unit_t *
+unit_from_ppsapi_handle(
+ pps_handle_t handle
+ )
+{
+ pps_unit_t *punit;
+
+ punit = (pps_unit_t *)handle;
+ if (PPSAPI_MAGIC_UNIT != punit->magic)
+ punit = NULL;
+ return punit;
+}
+
+/*
+ * ntpd on Windows only looks to errno after finding
+ * GetLastError returns NO_ERROR. To accomodate its
+ * use of msyslog in portable code such as refclock_atom.c,
+ * this implementation always clears the Windows
+ * error code using SetLastError(NO_ERROR) when
+ * returning an errno. This is also a good idea
+ * for any non-ntpd clients as they should rely only
+ * the errno for PPSAPI functions.
+ */
+#define RETURN_PPS_ERRNO(e) \
+do { \
+ SetLastError(NO_ERROR); \
+ errno = (e); \
+ return -1; \
+} while (0)
+
+
+#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
+extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
+#else
+/*
+ * helper routine for serialpps.sys ioctl which returns
+ * performance counter "timestamp" as well as a system
+ * FILETIME timestamp. Converts one of the inputs to
+ * NTP fixed-point format.
+ *
+ * You will probably want to supply your own and #define
+ * OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER, as this stub
+ * converts only the low-resolution system timestamp.
+ *
+ * When implementing a provider, use the pointer to this
+ * conversion function supplied to your prov_init(), as
+ * the copy in your DLL will likely be the stub below,
+ * where you want the one provided by the PPSAPI client
+ * such as ntpd.
+ */
+static inline void
+pps_ntp_timestamp_from_counter(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp)
+{
+ ULONGLONG BiasedTimestamp;
+
+ /* convert from 100ns units to NTP fixed point format */
+
+ BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
+ result->integral = PPS_JAN_1970 +
+ (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
+ result->fractional =
+ (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
+ (PPS_FRAC / PPS_HECTONANOSECONDS));
+}
+#endif
+
+
+static inline int
+load_pps_provider(
+ char * dllpath
+ )
+{
+ char short_name[16];
+ char full_name[64];
+ ppsapi_provider * prov;
+ HMODULE hmod;
+ pppsapi_prov_init pprov_init;
+
+ prov = malloc(sizeof(*prov));
+ if (NULL == prov)
+ return ENOMEM;
+
+ hmod = LoadLibrary(dllpath);
+ if (NULL == hmod) {
+ fprintf(stderr, "load_pps_provider: LoadLibrary(%s) error %u\n", dllpath, GetLastError());
+ free(prov);
+ return ENOENT;
+ }
+
+ pprov_init = (pppsapi_prov_init)GetProcAddress(hmod, "ppsapi_prov_init");
+ if (NULL == pprov_init) {
+ fprintf(stderr, "load_pps_provider: entrypoint ppsapi_prov_init not found in %s\n", dllpath);
+ free(prov);
+ FreeLibrary(hmod);
+ return EFAULT;
+ }
+
+ prov->caps = (*pprov_init)(PPSAPI_TIMEPPS_PROV_VER,
+ &internal_create_pps_handle,
+ &pps_ntp_timestamp_from_counter,
+ short_name, sizeof(short_name),
+ full_name, sizeof(full_name));
+
+ if (!prov->caps) {
+ free(prov);
+ FreeLibrary(hmod);
+ return EACCES;
+ }
+
+ prov->short_name = _strdup(short_name);
+ prov->full_name = _strdup(full_name);
+
+ if (NULL == prov->short_name || !prov->short_name[0]
+ || NULL == prov->full_name || !prov->full_name[0]) {
+
+ if (prov->short_name)
+ free(prov->short_name);
+ if (prov->full_name)
+ free(prov->full_name);
+ free(prov);
+ FreeLibrary(hmod);
+ return EINVAL;
+ }
+
+ prov->ptime_pps_create = (provtime_pps_create)
+ GetProcAddress(hmod, "prov_time_pps_create");
+ prov->ptime_pps_destroy = (provtime_pps_destroy)
+ GetProcAddress(hmod, "prov_time_pps_destroy");
+ prov->ptime_pps_setparams = (provtime_pps_setparams)
+ GetProcAddress(hmod, "prov_time_pps_setparams");
+ prov->ptime_pps_fetch = (provtime_pps_fetch)
+ GetProcAddress(hmod, "prov_time_pps_fetch");
+ prov->ptime_pps_kcbind = (provtime_pps_kcbind)
+ GetProcAddress(hmod, "prov_time_pps_kcbind");
+
+ if (NULL == prov->ptime_pps_create
+ || NULL == prov->ptime_pps_destroy
+ || NULL == prov->ptime_pps_setparams
+ || NULL == prov->ptime_pps_fetch
+ || NULL == prov->ptime_pps_kcbind) {
+
+ fprintf(stderr, "PPSAPI provider %s missing entrypoint\n",
+ prov->short_name);
+ free(prov->short_name);
+ free(prov->full_name);
+ free(prov);
+ FreeLibrary(hmod);
+ return EINVAL;
+ }
+
+ fprintf(stderr, "loaded PPSAPI provider %s caps 0x%x provider %p\n",
+ prov->full_name, prov->caps, prov);
+
+ prov->next = g_provider_list;
+ g_provider_list = prov;
+
+ return 0;
+}
+
+
+/*
+ * time_pps_create - create PPS handle from file descriptor
+ *
+ * This is the initial entrypoint of PPSAPI from the client. Note
+ * to maintain source compatibility with Unix, the input file
+ * descriptor really is a descriptor from the C runtime low-numbered
+ * descriptor namespace, though it may have been converted from a
+ * native Windows HANDLE using _open_osfhandle().
+ */
+static inline int
+time_pps_create(
+ int filedes,/* device file descriptor */
+ pps_handle_t * phandle /* returned handle */
+ )
+{
+ HANDLE winhandle;
+ char * dlls;
+ char * dll;
+ char * pch;
+ ppsapi_provider * prov;
+ pps_handle_t ppshandle;
+ int err;
+
+ if (NULL == phandle)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ winhandle = (HANDLE)_get_osfhandle(filedes);
+ fprintf(stderr, "time_pps_create(%d) got winhandle %p\n", filedes, winhandle);
+ if (INVALID_HANDLE_VALUE == winhandle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ /*
+ * For initial testing the list of PPSAPI backend
+ * providers is provided by the environment variable
+ * PPSAPI_DLLS, separated by semicolons such as
+ * PPSAPI_DLLS=c:\ntp\serial_ppsapi.dll;..\parport_ppsapi.dll
+ * There are a million better ways, such as a well-known
+ * registry key under which a value is created for each
+ * provider DLL installed, or even a platform-specific
+ * ntp.conf directive or command-line switch.
+ */
+ dlls = getenv("PPSAPI_DLLS");
+ if (dlls != NULL && NULL == g_provider_list) {
+ dlls = dll = _strdup(dlls);
+ fprintf(stderr, "getenv(PPSAPI_DLLS) gives %s\n", dlls);
+ } else
+ dlls = dll = NULL;
+
+ while (dll != NULL && dll[0]) {
+ pch = strchr(dll, ';');
+ if (pch != NULL)
+ *pch = 0;
+ err = load_pps_provider(dll);
+ if (err) {
+ fprintf(stderr, "load_pps_provider(%s) got errno %d\n", dll, err);
+ RETURN_PPS_ERRNO(err);
+ }
+ dll = (NULL == pch)
+ ? NULL
+ : pch + 1;
+ }
+
+ if (NULL != dlls)
+ free(dlls);
+ dlls = dll = NULL;
+
+ /*
+ * Hand off to each provider in turn until one returns a PPS
+ * handle or they've all declined.
+ */
+ for (prov = g_provider_list; prov != NULL; prov = prov->next) {
+ ppshandle = 0;
+ g_curr_provider = prov;
+ err = (*prov->ptime_pps_create)(winhandle, &ppshandle);
+ g_curr_provider = NULL;
+ fprintf(stderr, "%s prov_time_pps_create(%p) returned %d\n",
+ prov->short_name, winhandle, err);
+ if (!err && ppshandle) {
+ *phandle = ppshandle;
+ return 0;
+ }
+ }
+
+ fprintf(stderr, "PPSAPI provider list %p\n", g_provider_list);
+
+ RETURN_PPS_ERRNO(ENOEXEC);
+}
+
+
+/*
+ * release PPS handle
+ */
+
+static inline int
+time_pps_destroy(
+ pps_handle_t handle
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_destroy)(punit, punit->context);
+
+ free(punit);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * set parameters for handle
+ */
+
+static inline int
+time_pps_setparams(
+ pps_handle_t handle,
+ const pps_params_t *params
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ /*
+ * Check for valid arguments and set parameters.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == params)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ err = (*punit->provider->ptime_pps_setparams)(punit, punit->context, params);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * get parameters for handle
+ */
+
+static inline int
+time_pps_getparams(
+ pps_handle_t handle,
+ pps_params_t *params_buf
+ )
+{
+ pps_unit_t * punit;
+
+ /*
+ * Check for valid arguments and get parameters.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == params_buf)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *params_buf = punit->params;
+ return 0;
+}
+
+
+/*
+ * time_pps_getcap - get capabilities for handle
+ */
+static inline int
+time_pps_getcap(
+ pps_handle_t handle,
+ int *pmode
+ )
+{
+ pps_unit_t * punit;
+
+ /*
+ * Check for valid arguments and get capabilities.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == pmode)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *pmode = punit->provider->caps;
+ return 0;
+}
+
+/*
+ * Fetch timestamps
+ */
+
+static inline int
+time_pps_fetch(
+ pps_handle_t handle,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * ptimeout
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ /*
+ * Check for valid arguments and fetch timestamps
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == pinfo)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_fetch)(punit,
+ punit->context,
+ tsformat,
+ pinfo,
+ ptimeout);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * time_pps_kcbind - specify kernel consumer
+ *
+ * Not supported so far by Windows.
+ */
+
+static inline int
+time_pps_kcbind(
+ pps_handle_t handle,
+ const int kernel_consumer,
+ const int edge, const int tsformat
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_kcbind)(
+ punit,
+ punit->context,
+ kernel_consumer,
+ edge,
+ tsformat);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+
+#endif /* TIMEPPS_H */
diff --git a/ports/winnt/include/unistd.h b/ports/winnt/include/unistd.h
new file mode 100644
index 000000000000..5e1599737300
--- /dev/null
+++ b/ports/winnt/include/unistd.h
@@ -0,0 +1,4 @@
+/**************************************************************
+ * Dummy Header for Unix to Windows NT portability
+ * Created for NTP package
+ **************************************************************/
diff --git a/ports/winnt/include/win32_io.h b/ports/winnt/include/win32_io.h
new file mode 100644
index 000000000000..8f67ca1d1896
--- /dev/null
+++ b/ports/winnt/include/win32_io.h
@@ -0,0 +1,7 @@
+#ifndef WIN32_IO_H
+#define WIN32_IO_H
+
+extern void InitSockets(void);
+extern void connection_reset_fix(SOCKET fd, sockaddr_u *addr);
+
+#endif /* WIN32_IO_H */
diff --git a/ports/winnt/instsrv/instsrv.c b/ports/winnt/instsrv/instsrv.c
new file mode 100644
index 000000000000..b3acc9f3921d
--- /dev/null
+++ b/ports/winnt/instsrv/instsrv.c
@@ -0,0 +1,461 @@
+/*
+ * File: instsrv.c
+ * Purpose: To install a new service and to insert registry entries.
+ *
+ */
+#ifndef __RPCASYNC_H__
+#define __RPCASYNC_H__ /* Skip asynch rpc inclusion */
+#endif
+
+#include <windows.h>
+#include <stdio.h>
+
+#define PERR(api) printf("\n%s: Error %d from %s on line %d", \
+ __FILE__, GetLastError(), api, __LINE__);
+
+#define MSG_FOR_ACCESS_DENIED "You aren't authorized to do this - please see your system Administrator"
+#define MSG_1_FOR_BAD_PATH "The fully qualified path name to the .exe must be given, and"
+#define MSG_2_FOR_BAD_PATH " the drive letter must be for a fixed disk (e.g., not a net drive)"
+
+SC_HANDLE schService;
+SC_HANDLE schSCManager;
+int ok2;
+
+VOID DisplayHelp(VOID);
+
+/* --------------------------------------------------------------------------------------- */
+
+int InstallService(LPCTSTR serviceName, LPCTSTR displayName, LPCTSTR serviceExe)
+{
+ LPCTSTR lpszBinaryPathName = serviceExe;
+ TCHAR lpszRootPathName[] ="?:\\";
+
+ if ( (':' != *(lpszBinaryPathName+1)) || ('\\' != *(lpszBinaryPathName+2)) )
+ { printf("\n%s",MSG_1_FOR_BAD_PATH);
+ printf("\n%s\n",MSG_2_FOR_BAD_PATH);
+ return 1;
+ }
+
+ #define DRIVE_TYPE_INDETERMINATE 0
+ #define ROOT_DIR_DOESNT_EXIST 1
+
+ *lpszRootPathName = *(lpszBinaryPathName+0) ;
+
+ switch ( GetDriveType(lpszRootPathName) )
+ {
+ case DRIVE_FIXED :
+ { // OK
+ break;
+ }
+ case ROOT_DIR_DOESNT_EXIST :
+ { printf("\n%s",MSG_1_FOR_BAD_PATH);
+ printf("\n the root directory where the .exe is specified to be must exist, and");
+ printf("\n%s\n",MSG_2_FOR_BAD_PATH);
+ return 1;
+ }
+ case DRIVE_TYPE_INDETERMINATE :
+ case DRIVE_REMOVABLE :
+ case DRIVE_REMOTE :
+ case DRIVE_CDROM :
+ case DRIVE_RAMDISK :
+ { printf("\n%s",MSG_1_FOR_BAD_PATH);
+ printf("\n%s\n",MSG_2_FOR_BAD_PATH);
+ return 1;
+ }
+ default :
+ { printf("\n%s",MSG_1_FOR_BAD_PATH);
+ printf("\n%s\n",MSG_2_FOR_BAD_PATH);
+ return 1;
+ }
+ }
+
+ if (INVALID_HANDLE_VALUE == CreateFile(lpszBinaryPathName,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL))
+ {
+ printf("\n%s",MSG_1_FOR_BAD_PATH);
+ printf("\n the file must exist, and");
+ printf("\n%s\n",MSG_2_FOR_BAD_PATH);
+ return 1;
+ }
+
+ schService = CreateService(
+ schSCManager, // SCManager database
+ serviceName, // name of service
+ displayName, // name to display
+ SERVICE_ALL_ACCESS, // desired access
+ SERVICE_WIN32_OWN_PROCESS, // service type
+ SERVICE_AUTO_START, // start type
+ SERVICE_ERROR_NORMAL, // error control type
+ lpszBinaryPathName, // service's binary
+ NULL, // no load ordering group
+ NULL, // no tag identifier
+ NULL, // no dependencies
+ NULL, // Local System account
+ NULL); // null password
+
+ if (NULL == schService)
+ { switch (GetLastError())
+ {
+ case ERROR_ACCESS_DENIED :
+ { printf("\n%s",MSG_FOR_ACCESS_DENIED);
+ break;
+ }
+ case ERROR_SERVICE_EXISTS :
+ { printf("\nThe %s service is already installed",serviceName);
+ printf("\nRemove it first if you need to re-install a new version\n");
+ break;
+ }
+ default :
+ { PERR("CreateService");
+ }
+ }
+ return 1;
+ }
+ else
+
+ CloseServiceHandle(schService);
+ return 0;
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+int RemoveService(LPCTSTR serviceName)
+{
+ {
+ #define SZ_ENUM_BUF 4096
+ ENUM_SERVICE_STATUS essServiceStatus[SZ_ENUM_BUF];
+ DWORD dwBufSize = sizeof(essServiceStatus);
+ DWORD dwBytesNeeded = 0;
+ DWORD dwServicesReturned = 0;
+ DWORD dwResumeHandle = 0;
+ DWORD dwI = 0;
+ BOOLEAN bFound = FALSE;
+
+ if (!EnumServicesStatus(schSCManager,
+ SERVICE_WIN32,
+ SERVICE_ACTIVE,
+ (LPENUM_SERVICE_STATUS)&essServiceStatus,
+ dwBufSize,
+ &dwBytesNeeded,
+ &dwServicesReturned,
+ &dwResumeHandle))
+ { switch (GetLastError())
+ {
+ case ERROR_ACCESS_DENIED :
+ { printf("\n%s",MSG_FOR_ACCESS_DENIED);
+ break;
+ }
+ default :
+ { PERR("EnumServicesStatus");
+ }
+ }
+ return 1;
+ }
+
+ for (dwI=0; dwI<dwServicesReturned; dwI++)
+ { if(0 == _stricmp(essServiceStatus[dwI].lpServiceName,serviceName))
+ { bFound = TRUE;
+ break;
+ }
+ }
+
+ if (bFound)
+ { printf("\nThe %s service cannot be removed until it has been stopped.",serviceName);
+ printf("\nTo stop the %s service, use the Stop button in the Control",serviceName);
+ printf("\n Panel Services applet\n");
+ return 1;
+ }
+ }
+
+ schService = OpenService(schSCManager,
+ serviceName,
+ SERVICE_ALL_ACCESS);
+ if (NULL == schService)
+ { switch (GetLastError())
+ {
+ case ERROR_ACCESS_DENIED :
+ { printf("\n%s",MSG_FOR_ACCESS_DENIED);
+ break;
+ }
+ case ERROR_SERVICE_DOES_NOT_EXIST :
+ { printf("\nThe %s service is not installed, so cannot be removed\n",serviceName);
+ break;
+ }
+ default :
+ { PERR("OpenService");
+ }
+ }
+ return 1;
+ }
+
+ if (DeleteService(schService))
+ { printf("\nDelete of Service \"Network Time Protocol\" was SUCCESSFUL\n");
+ return 0;
+ }
+ else
+ { switch (GetLastError())
+ {
+ case ERROR_ACCESS_DENIED :
+ { printf("\n%s",MSG_FOR_ACCESS_DENIED);
+ break;
+ }
+ default :
+ { PERR("DeleteService");
+ }
+ }
+ return 1;
+ }
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+int 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);
+ if(bSuccess != ERROR_SUCCESS)
+ {
+ PERR("RegCreateKey");
+ return 1;
+ }
+
+ /* 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 */
+ if(bSuccess != ERROR_SUCCESS)
+ {
+ PERR("RegSetValueEx");
+ return 1;
+ }
+
+ /* 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 */
+ if(bSuccess != ERROR_SUCCESS)
+ {
+ PERR("RegSetValueEx");
+ return 1;
+ }
+ RegCloseKey(hk);
+ return 0;
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+int addKeysToRegistry()
+
+{
+ HKEY hk; /* registry key handle */
+ BOOL bSuccess;
+ char myarray[200];
+ char *lpmyarray = myarray;
+ int arsize = 0;
+
+ /* now add the depends on service key */
+
+ /* Create a new key for our application */
+ bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,
+ "SYSTEM\\CurrentControlSet\\Services\\NTP", &hk);
+ if(bSuccess != ERROR_SUCCESS)
+ {
+ PERR("RegCreateKey");
+ return 1;
+ }
+
+ strcpy(lpmyarray,"TcpIp");
+ lpmyarray = lpmyarray + 6;
+ arsize = arsize + 6;
+ strcpy(lpmyarray,"Afd");
+ lpmyarray = lpmyarray + 4;
+ arsize = arsize + 4;
+ arsize = arsize + 2;
+ strcpy(lpmyarray,"\0\0");
+
+ bSuccess = RegSetValueEx(hk, /* subkey handle */
+ "DependOnService", /* value name */
+ 0, /* must be zero */
+ REG_MULTI_SZ, /* value type */
+ (LPBYTE) &myarray, /* address of value data */
+ arsize); /* length of value data */
+ if(bSuccess != ERROR_SUCCESS)
+ {
+ PERR("RegSetValueEx");
+ return 1;
+ }
+
+ RegCloseKey(hk);
+ return 0;
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+ #define SZ_NAME_BUF 270 // 256 is max, add a little
+ UCHAR ucNameBuf[SZ_NAME_BUF] = "NTP";
+ LPTSTR lpszServName = (LPTSTR)&ucNameBuf;
+
+ UCHAR ucDNameBuf[SZ_NAME_BUF] = "Network Time Protocol";
+ LPTSTR lpszDispName = (LPTSTR)&ucDNameBuf;
+
+
+ UCHAR ucExeNBuf[SZ_NAME_BUF] = "";
+ LPTSTR lpszExeName = (LPTSTR)&ucExeNBuf;
+
+ BOOL bRemovingService = FALSE;
+ char *p;
+
+ int ok = 0;
+
+ // check if Win32s, if so, display notice and terminate
+ if( GetVersion() & 0x80000000 )
+ {
+ MessageBox( NULL,
+ "This application cannot run on Windows 3.1.\n"
+ "This application will now terminate.",
+ "NAMED",
+ MB_OK | MB_ICONSTOP | MB_SETFOREGROUND );
+ return( 1 );
+ }
+ if (argc == 2)
+ bRemovingService = (!stricmp(argv[1], "remove"));
+
+ if(!bRemovingService)
+ {
+
+
+ if (argc != 2)
+ {
+ DisplayHelp();
+ return(1);
+ }
+
+ p=argv[1];
+ if ( ('/' == *p)
+ || ('-' == *p) )
+ {
+ DisplayHelp();
+ return(1);
+ }
+
+
+ }
+
+ if (strlen(argv[1]) > 256)
+ {
+ printf("\nThe service name cannot be longer than 256 characters\n");
+ return(1);
+ }
+
+
+
+ bRemovingService = (!stricmp(argv[1], "remove"));
+ schSCManager = OpenSCManager(
+ NULL, // machine (NULL == local)
+ NULL, // database (NULL == default)
+ SC_MANAGER_ALL_ACCESS); // access required
+
+ if (NULL == schSCManager)
+ { switch (GetLastError())
+ {
+ case ERROR_ACCESS_DENIED :
+ { printf("\n%s",MSG_FOR_ACCESS_DENIED);
+ break;
+ }
+ default :
+ { PERR("OpenSCManager");
+ }
+ }
+ return (0);
+ }
+
+ if (bRemovingService)
+ {
+ ok = RemoveService(lpszServName);
+ }
+ else
+ {
+ /* get the exe name */
+ strcpy(lpszExeName,argv[1]);
+ ok = InstallService(lpszServName, lpszDispName, lpszExeName);
+ }
+
+ CloseServiceHandle(schSCManager);
+
+ if (!bRemovingService)
+ {
+ if (ok == 0)
+ { /* Set the Event-ID message-file name. */
+ ok = addSourceToRegistry("NTP", lpszExeName);
+ if (ok == 0)
+ ok = addKeysToRegistry();
+ else return ok;
+
+ if (ok == 0)
+ {
+ printf("\nThe \"Network Time Protocol\" service was successfully created.\n");
+ printf("\nDon't forget!!! You must now go to the Control Panel and");
+ printf("\n use the Services applet to change the account name and");
+ printf("\n password that the NTP Service will use when");
+ printf("\n it starts.");
+ printf("\nTo do this: use the Startup button in the Services applet,");
+ printf("\n and (for example) specify the desired account and");
+ printf("\n correct password.");
+ printf("\nAlso, use the Services applet to ensure this newly installed");
+ printf("\n service starts automatically on bootup.\n");
+ return 0;
+ }
+ }
+ else return ok;
+ }
+ return 0;
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+VOID DisplayHelp(VOID)
+{
+ printf("Installs or removes the NTP service.\n");
+ printf("To install the NTP service,\n");
+ printf("type INSTSRV <path> \n");
+ printf("Where:\n");
+ printf(" path Absolute path to the NTP service, name.exe. You must\n");
+ printf(" use a fully qualified path and the drive letter must be for a\n");
+ printf(" fixed, local drive.\n\n");
+ printf("For example, INSTSRV i:\\winnt\\system32\\ntpd.exe\n");
+ printf("To remove the NTP service,\n");
+ printf("type INSTSRV remove \n");
+
+}
+
+/* EOF */
diff --git a/ports/winnt/libntp/MSG00001.bin b/ports/winnt/libntp/MSG00001.bin
new file mode 100644
index 000000000000..320ee54d1e2c
--- /dev/null
+++ b/ports/winnt/libntp/MSG00001.bin
Binary files differ
diff --git a/ports/winnt/libntp/SetSystemTime.c b/ports/winnt/libntp/SetSystemTime.c
new file mode 100644
index 000000000000..8cb43173f22e
--- /dev/null
+++ b/ports/winnt/libntp/SetSystemTime.c
@@ -0,0 +1,34 @@
+
+#include <config.h>
+
+#include "clockstuff.h"
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+
+pset_tod_using set_tod_using = NULL;
+
+int
+ntp_set_tod(
+ struct timeval *tv,
+ void *tzp
+ )
+{
+ SYSTEMTIME st;
+ union {
+ FILETIME ft;
+ ULONGLONG ull;
+ } t;
+
+ UNUSED_ARG(tzp);
+
+ t.ull = FILETIME_1970 +
+ (ULONGLONG)tv->tv_sec * 10 * 1000 * 1000 +
+ (ULONGLONG)tv->tv_usec * 10;
+
+ if (!FileTimeToSystemTime(&t.ft, &st) || !SetSystemTime(&st)) {
+ msyslog(LOG_ERR, "SetSystemTime failed: %m");
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/ports/winnt/libntp/getclock.c b/ports/winnt/libntp/getclock.c
new file mode 100644
index 000000000000..68496bd53078
--- /dev/null
+++ b/ports/winnt/libntp/getclock.c
@@ -0,0 +1,63 @@
+/*
+ * getclock.c - Emulate Unix getclock(3) nanosecond interface for libntp/ntpd
+ */
+#include "config.h"
+
+#include "ntp_unixtime.h"
+#include "clockstuff.h"
+#include "ntp_stdlib.h"
+
+/*
+ * getclock() is in libntp. To use interpolation,
+ * ports/winnt/ntpd/nt_clockstuff.c overrides GetSystemTimeAsFileTime
+ * via the pointer get_sys_time_as_filetime.
+ */
+PGSTAFT get_sys_time_as_filetime;
+PGSTAFT pGetSystemTimePreciseAsFileTime;
+
+
+int
+getclock(
+ int clktyp,
+ struct timespec *ts
+ )
+{
+ union {
+ FILETIME ft;
+ ULONGLONG ull;
+ } uNow;
+
+ if (clktyp != TIMEOFDAY) {
+ TRACE(1, ("getclock() supports only TIMEOFDAY clktyp\n"));
+ errno = EINVAL;
+ return -1;
+ }
+
+ (*get_sys_time_as_filetime)(&uNow.ft);
+
+ /*
+ * Convert the hecto-nano second time to timespec format
+ */
+ uNow.ull -= FILETIME_1970;
+ ts->tv_sec = (time_t)( uNow.ull / HECTONANOSECONDS);
+ ts->tv_nsec = (long)(( uNow.ull % HECTONANOSECONDS) * 100);
+
+ return 0;
+}
+
+
+void
+init_win_precise_time(void)
+{
+ HANDLE hDll;
+ FARPROC pfn;
+
+ hDll = LoadLibrary("kernel32");
+ pfn = GetProcAddress(hDll, "GetSystemTimePreciseAsFileTime");
+ if (NULL != pfn) {
+ pGetSystemTimePreciseAsFileTime = (PGSTAFT)pfn;
+ get_sys_time_as_filetime = pGetSystemTimePreciseAsFileTime;
+ } else {
+ get_sys_time_as_filetime = &GetSystemTimeAsFileTime;
+ }
+}
diff --git a/ports/winnt/libntp/messages.h b/ports/winnt/libntp/messages.h
new file mode 100644
index 000000000000..475371169a2a
--- /dev/null
+++ b/ports/winnt/libntp/messages.h
@@ -0,0 +1,199 @@
+ /*
+ Microsoft Developer Support
+ Copyright (c) 1992 Microsoft Corporation
+
+ This file contains the message definitions for the Win32
+ syslog support messages for the nntp firewall
+-------------------------------------------------------------------------
+ HEADER SECTION
+
+ The header section defines names and language identifiers for use
+ by the message definitions later in this file. The MessageIdTypedef,
+ SeverityNames, FacilityNames, and LanguageNames keywords are
+ optional and not required.
+
+
+
+ The MessageIdTypedef keyword gives a typedef name that is used in a
+ type cast for each message code in the generated include file. Each
+ message code appears in the include file with the format: #define
+ name ((type) 0xnnnnnnnn) The default value for type is empty, and no
+ type cast is generated. It is the programmer's responsibility to
+ specify a typedef statement in the application source code to define
+ the type. The type used in the typedef must be large enough to
+ accomodate the entire 32-bit message code.
+
+
+
+ The SeverityNames keyword defines the set of names that are allowed
+ as the value of the Severity keyword in the message definition. The
+ set is delimited by left and right parentheses. Associated with each
+ severity name is a number that, when shifted left by 30, gives the
+ bit pattern to logical-OR with the Facility value and MessageId
+ value to form the full 32-bit message code. The default value of
+ this keyword is:
+
+ SeverityNames=(
+ Success=0x0
+ Informational=0x1
+ Warning=0x2
+ Error=0x3
+ )
+
+ Severity values occupy the high two bits of a 32-bit message code.
+ Any severity value that does not fit in two bits is an error. The
+ severity codes can be given symbolic names by following each value
+ with :name
+
+
+FacilityNames=(System=0x0:FACILITY_SYSTEM
+ Runtime=0x2:FACILITY_RUNTIME
+ Stubs=0x3:FACILITY_STUBS
+ Io=0x4:FACILITY_IO_ERROR_CODE
+ )
+
+ The FacilityNames keyword defines the set of names that are allowed
+ as the value of the Facility keyword in the message definition. The
+ set is delimited by left and right parentheses. Associated with each
+ facility name is a number that, when shift it left by 16 bits, gives
+ the bit pattern to logical-OR with the Severity value and MessageId
+ value to form the full 32-bit message code. The default value of
+ this keyword is:
+
+ FacilityNames=(
+ System=0x0FF
+ Application=0xFFF
+ )
+
+ Facility codes occupy the low order 12 bits of the high order
+ 16-bits of a 32-bit message code. Any facility code that does not
+ fit in 12 bits is an error. This allows for 4,096 facility codes.
+ The first 256 codes are reserved for use by the system software. The
+ facility codes can be given symbolic names by following each value
+ with :name
+
+
+ The LanguageNames keyword defines the set of names that are allowed
+ as the value of the Language keyword in the message definition. The
+ set is delimited by left and right parentheses. Associated with each
+ language name is a number and a file name that are used to name the
+ generated resource file that contains the messages for that
+ language. The number corresponds to the language identifier to use
+ in the resource table. The number is separated from the file name
+ with a colon. The initial value of LanguageNames is:
+
+ LanguageNames=(English=1:MSG00001)
+
+ Any new names in the source file which don't override the built-in
+ names are added to the list of valid languages. This allows an
+ application to support private languages with descriptive names.
+
+
+-------------------------------------------------------------------------
+ MESSAGE DEFINITION SECTION
+
+ Following the header section is the body of the Message Compiler
+ source file. The body consists of zero or more message definitions.
+ Each message definition begins with one or more of the following
+ statements:
+
+ MessageId = [number|+number]
+ Severity = severity_name
+ Facility = facility_name
+ SymbolicName = name
+
+ The MessageId statement marks the beginning of the message
+ definition. A MessageID statement is required for each message,
+ although the value is optional. If no value is specified, the value
+ used is the previous value for the facility plus one. If the value
+ is specified as +number then the value used is the previous value
+ for the facility, plus the number after the plus sign. Otherwise, if
+ a numeric value is given, that value is used. Any MessageId value
+ that does not fit in 16 bits is an error.
+
+ The Severity and Facility statements are optional. These statements
+ specify additional bits to OR into the final 32-bit message code. If
+ not specified they default to the value last specified for a message
+ definition. The initial values prior to processing the first message
+ definition are:
+
+ Severity=Success
+ Facility=Application
+
+ The value associated with Severity and Facility must match one of
+ the names given in the FacilityNames and SeverityNames statements in
+ the header section. The SymbolicName statement allows you to
+ associate a C/C++ symbolic constant with the final 32-bit message
+ code.
+ */
+//
+// Values are 32 bit values laid out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+
+//
+// Define the severity codes
+//
+#define STATUS_SEVERITY_WARNING 0x2
+#define STATUS_SEVERITY_SUCCESS 0x0
+#define STATUS_SEVERITY_INFORMATIONAL 0x1
+#define STATUS_SEVERITY_ERROR 0x3
+
+
+//
+// MessageId: NTP_ERROR
+//
+// MessageText:
+//
+// %1
+//
+#define NTP_ERROR ((DWORD)0xC0000001L)
+
+//
+// MessageId: NTP_WARNING
+//
+// MessageText:
+//
+// %1
+//
+//
+#define NTP_WARNING ((DWORD)0x80000002L)
+
+//
+// MessageId: NTP_INFO
+//
+// MessageText:
+//
+// %1
+//
+//
+//
+//
+#define NTP_INFO ((DWORD)0x40000003L)
+
diff --git a/ports/winnt/libntp/messages.mc b/ports/winnt/libntp/messages.mc
new file mode 100644
index 000000000000..3a6bc7d22c0f
--- /dev/null
+++ b/ports/winnt/libntp/messages.mc
@@ -0,0 +1,161 @@
+; /*
+; Microsoft Developer Support
+; Copyright (c) 1992 Microsoft Corporation
+;
+; This file contains the message definitions for the Win32
+; syslog support messages for the nntp firewall
+
+;-------------------------------------------------------------------------
+; HEADER SECTION
+;
+; The header section defines names and language identifiers for use
+; by the message definitions later in this file. The MessageIdTypedef,
+; SeverityNames, FacilityNames, and LanguageNames keywords are
+; optional and not required.
+;
+;
+MessageIdTypedef=DWORD
+;
+; The MessageIdTypedef keyword gives a typedef name that is used in a
+; type cast for each message code in the generated include file. Each
+; message code appears in the include file with the format: #define
+; name ((type) 0xnnnnnnnn) The default value for type is empty, and no
+; type cast is generated. It is the programmer's responsibility to
+; specify a typedef statement in the application source code to define
+; the type. The type used in the typedef must be large enough to
+; accomodate the entire 32-bit message code.
+;
+;
+SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
+ Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
+ Warning=0x2:STATUS_SEVERITY_WARNING
+ Error=0x3:STATUS_SEVERITY_ERROR
+ )
+;
+; The SeverityNames keyword defines the set of names that are allowed
+; as the value of the Severity keyword in the message definition. The
+; set is delimited by left and right parentheses. Associated with each
+; severity name is a number that, when shifted left by 30, gives the
+; bit pattern to logical-OR with the Facility value and MessageId
+; value to form the full 32-bit message code. The default value of
+; this keyword is:
+;
+; SeverityNames=(
+; Success=0x0
+; Informational=0x1
+; Warning=0x2
+; Error=0x3
+; )
+;
+; Severity values occupy the high two bits of a 32-bit message code.
+; Any severity value that does not fit in two bits is an error. The
+; severity codes can be given symbolic names by following each value
+; with :name
+;
+;
+;FacilityNames=(System=0x0:FACILITY_SYSTEM
+; Runtime=0x2:FACILITY_RUNTIME
+; Stubs=0x3:FACILITY_STUBS
+; Io=0x4:FACILITY_IO_ERROR_CODE
+; )
+;
+; The FacilityNames keyword defines the set of names that are allowed
+; as the value of the Facility keyword in the message definition. The
+; set is delimited by left and right parentheses. Associated with each
+; facility name is a number that, when shift it left by 16 bits, gives
+; the bit pattern to logical-OR with the Severity value and MessageId
+; value to form the full 32-bit message code. The default value of
+; this keyword is:
+;
+; FacilityNames=(
+; System=0x0FF
+; Application=0xFFF
+; )
+;
+; Facility codes occupy the low order 12 bits of the high order
+; 16-bits of a 32-bit message code. Any facility code that does not
+; fit in 12 bits is an error. This allows for 4,096 facility codes.
+; The first 256 codes are reserved for use by the system software. The
+; facility codes can be given symbolic names by following each value
+; with :name
+;
+;
+; The LanguageNames keyword defines the set of names that are allowed
+; as the value of the Language keyword in the message definition. The
+; set is delimited by left and right parentheses. Associated with each
+; language name is a number and a file name that are used to name the
+; generated resource file that contains the messages for that
+; language. The number corresponds to the language identifier to use
+; in the resource table. The number is separated from the file name
+; with a colon. The initial value of LanguageNames is:
+;
+; LanguageNames=(English=1:MSG00001)
+;
+; Any new names in the source file which don't override the built-in
+; names are added to the list of valid languages. This allows an
+; application to support private languages with descriptive names.
+;
+;
+;-------------------------------------------------------------------------
+; MESSAGE DEFINITION SECTION
+;
+; Following the header section is the body of the Message Compiler
+; source file. The body consists of zero or more message definitions.
+; Each message definition begins with one or more of the following
+; statements:
+;
+; MessageId = [number|+number]
+; Severity = severity_name
+; Facility = facility_name
+; SymbolicName = name
+;
+; The MessageId statement marks the beginning of the message
+; definition. A MessageID statement is required for each message,
+; although the value is optional. If no value is specified, the value
+; used is the previous value for the facility plus one. If the value
+; is specified as +number then the value used is the previous value
+; for the facility, plus the number after the plus sign. Otherwise, if
+; a numeric value is given, that value is used. Any MessageId value
+; that does not fit in 16 bits is an error.
+;
+; The Severity and Facility statements are optional. These statements
+; specify additional bits to OR into the final 32-bit message code. If
+; not specified they default to the value last specified for a message
+; definition. The initial values prior to processing the first message
+; definition are:
+;
+; Severity=Success
+; Facility=Application
+;
+; The value associated with Severity and Facility must match one of
+; the names given in the FacilityNames and SeverityNames statements in
+; the header section. The SymbolicName statement allows you to
+; associate a C/C++ symbolic constant with the final 32-bit message
+; code.
+; */
+
+MessageId=0x1
+Severity=Error
+Facility=Application
+SymbolicName=NTP_ERROR
+Language=English
+%1
+.
+
+MessageId=0x2
+Severity=Warning
+Facility=Application
+SymbolicName=NTP_WARNING
+Language=English
+%1
+
+.
+MessageId=0x3
+Severity=Informational
+Facility=Application
+SymbolicName=NTP_INFO
+Language=English
+%1
+
+
+
diff --git a/ports/winnt/libntp/messages.rc b/ports/winnt/libntp/messages.rc
new file mode 100644
index 000000000000..0abcb0fa2c57
--- /dev/null
+++ b/ports/winnt/libntp/messages.rc
@@ -0,0 +1,2 @@
+LANGUAGE 0x9,0x1
+1 11 "MSG00001.bin"
diff --git a/ports/winnt/libntp/randfile.c b/ports/winnt/libntp/randfile.c
new file mode 100644
index 000000000000..7de80b80d6a4
--- /dev/null
+++ b/ports/winnt/libntp/randfile.c
@@ -0,0 +1,109 @@
+/*
+ * Make sure that there is a good source of random characters
+ * so that OpenSSL can work properly and securely.
+ */
+
+#include <config.h>
+#include <wincrypt.h>
+
+#include <stdio.h>
+
+unsigned int getrandom_chars(int desired, unsigned char *buf, int lenbuf);
+BOOL create_random_file(char *filename);
+
+BOOL
+init_randfile()
+{
+ FILE *rf;
+ char *randfile;
+ char *homedir;
+ char tmp[256];
+ /* See if the environmental variable RANDFILE is defined
+ * and the file exists
+ */
+ randfile = getenv("RANDFILE");
+ if (randfile != NULL) {
+ rf = fopen(randfile, "rb");
+ if (rf != NULL) {
+ fclose(rf);
+ return (TRUE);
+ }
+ else {
+ /* The environmental variable exists but not the file */
+ return (create_random_file(randfile));
+ }
+ }
+ /*
+ * If the RANDFILE environmental variable does not exist,
+ * see if the HOME enviromental variable exists and
+ * a .rnd file is in there.
+ */
+ homedir = getenv("HOME");
+ if (homedir != NULL &&
+ (strlen(homedir) + 5 /* \.rnd */) < sizeof(tmp)) {
+ snprintf(tmp, sizeof(tmp), "%s\\.rnd", homedir);
+ rf = fopen(tmp, "rb");
+ if (rf != NULL) {
+ fclose(rf);
+ return (TRUE);
+ }
+ else {
+ /* The HOME environmental variable exists but not the file */
+ return (create_random_file(tmp));
+ }
+ }
+ /*
+ * Final try. Look for it on the C:\ directory
+ * NOTE: This is a really bad place for it security-wise
+ * However, OpenSSL looks for it there if it can't find it elsewhere
+ */
+ rf = fopen("C:\\.rnd", "rb");
+ if (rf != NULL) {
+ fclose(rf);
+ return (TRUE);
+ }
+ /* The file does not exist */
+ return (create_random_file("C:\\.rnd"));
+}
+/*
+ * Routine to create the random file with 1024 random characters
+ */
+BOOL
+create_random_file(char *filename) {
+ FILE *rf;
+ int nchars;
+ unsigned char buf[1025];
+
+ nchars = getrandom_chars(1024, buf, sizeof(buf));
+ rf = fopen(filename, "wb");
+ if (rf == NULL)
+ return (FALSE);
+ fwrite(buf, sizeof(unsigned char), nchars, rf);
+ fclose(rf);
+ return (TRUE);
+}
+
+unsigned int
+getrandom_chars(int desired, unsigned char *buf, int lenbuf) {
+ HCRYPTPROV hcryptprov;
+ BOOL err;
+
+ if (buf == NULL || lenbuf <= 0 || desired > lenbuf)
+ return (0);
+ /*
+ * The first time we just try to acquire the context
+ */
+ err = CryptAcquireContext(&hcryptprov, NULL, NULL, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT);
+ if (!err){
+ return (0);
+ }
+ if (!CryptGenRandom(hcryptprov, desired, buf)) {
+ CryptReleaseContext(hcryptprov, 0);
+ return (0);
+ }
+
+ CryptReleaseContext(hcryptprov, 0);
+ return (desired);
+}
+
diff --git a/ports/winnt/libntp/setpriority.c b/ports/winnt/libntp/setpriority.c
new file mode 100644
index 000000000000..52ab78529422
--- /dev/null
+++ b/ports/winnt/libntp/setpriority.c
@@ -0,0 +1,76 @@
+#include <config.h>
+#include <stdio.h>
+#include <sys/resource.h> /* our private version */
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
+#include "ntp_debug.h"
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "clockstuff.h"
+
+
+/*
+ * setpriority
+ *
+ * to reduce the #ifdef forest in the portable code,
+ * we emulate the BSD setpriority interface:
+ *
+ * if (-1 == setpriority(PRIO_PROCESS, 0, NTP_PRIO))
+ * msyslog(LOG_ERR, "setpriority() error: %m");
+ *
+ * However, since the Windows port of ntpd has always raised its
+ * priority (to realtime if allowed, or silently downgraded to
+ * high by the system if not) with or without -N. Changing that
+ * now would endanger users who upgrade the binary without adding
+ * -N to its invocation. Instsrv assumes ntpd.exe is installed
+ * with no command-line arguments.
+ *
+ * This routine is used by utilities as well as ntpd itself, so
+ * it checks if the priority is already high or realtime and
+ * logs no complaints in that case, to avoid duplicating. ntpd
+ * will have raised the priority to one of those in
+ * init_winnt_time, while the utilities will rely on this
+ * code.
+ *
+ */
+
+int setpriority(
+ int which,
+ int who,
+ int prio
+ )
+{
+ BOOL success;
+ DWORD prio_class;
+
+ if (PRIO_PROCESS != which || who || NTP_PRIO != prio)
+ TRACE(1, ("windows setpriority() clone needs work.\n"));
+
+ prio_class = GetPriorityClass(GetCurrentProcess());
+
+ if (HIGH_PRIORITY_CLASS == prio_class ||
+ REALTIME_PRIORITY_CLASS == prio_class)
+ return 0;
+
+ success = SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
+
+ if (!success) {
+ msyslog(LOG_ERR, "Unable to raise priority: %m");
+ errno = EPERM;
+ return -1;
+ }
+
+ prio_class = GetPriorityClass(GetCurrentProcess());
+
+ if (REALTIME_PRIORITY_CLASS == prio_class)
+ msyslog(LOG_INFO, "Raised to realtime priority class");
+ else if (HIGH_PRIORITY_CLASS == prio_class)
+ msyslog(LOG_ERR, "Raised to high priority class, realtime "
+ "requires Increase Scheduling Priority "
+ "privilege (enabled with secpol.msc).");
+ else
+ msyslog(LOG_ERR, "Unexpected process priority class %d",
+ prio_class);
+
+ return 0;
+}
diff --git a/ports/winnt/libntp/syslog.c b/ports/winnt/libntp/syslog.c
new file mode 100644
index 000000000000..71c90c237ec3
--- /dev/null
+++ b/ports/winnt/libntp/syslog.c
@@ -0,0 +1,219 @@
+/*
+ * 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.
+ */
+
+/* From BIND 9 lib/isc/win32/: syslog.c,v 1.6 2002/08/03 01:34:14 mayer */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <windows.h>
+#include <string.h>
+#include <stdlib.h>
+#include <syslog.h>
+
+#include <isc/strerror.h>
+#include <lib_strbuf.h>
+
+#include "ntp_stdlib.h"
+
+#include "messages.h"
+
+static HANDLE hAppLog = NULL;
+static FILE *log_stream;
+static int debug_level = 0;
+static char progname[51] = "NTP";
+static int logmask = 0;
+
+static struct dsn_c_pvt_sfnt {
+ int val;
+ const char *strval;
+} facilities[] = {
+ { LOG_KERN, "kern" },
+ { LOG_USER, "user" },
+ { LOG_MAIL, "mail" },
+ { LOG_DAEMON, "daemon" },
+ { LOG_AUTH, "auth" },
+ { LOG_SYSLOG, "syslog" },
+ { LOG_LPR, "lpr" },
+#ifdef LOG_NEWS
+ { LOG_NEWS, "news" },
+#endif
+#ifdef LOG_UUCP
+ { LOG_UUCP, "uucp" },
+#endif
+#ifdef LOG_CRON
+ { LOG_CRON, "cron" },
+#endif
+#ifdef LOG_AUTHPRIV
+ { LOG_AUTHPRIV, "authpriv" },
+#endif
+#ifdef LOG_FTP
+ { LOG_FTP, "ftp" },
+#endif
+ { LOG_LOCAL0, "local0"},
+ { LOG_LOCAL1, "local1"},
+ { LOG_LOCAL2, "local2"},
+ { LOG_LOCAL3, "local3"},
+ { LOG_LOCAL4, "local4"},
+ { LOG_LOCAL5, "local5"},
+ { LOG_LOCAL6, "local6"},
+ { LOG_LOCAL7, "local7"},
+ { 0, NULL }
+};
+
+#if 0
+BOOL
+isc_syslog_facilityfromstring(const char *str, int *facilityp) {
+ int i;
+
+ REQUIRE(str != NULL);
+ REQUIRE(facilityp != NULL);
+
+ for (i = 0 ; facilities[i].strval != NULL ; i++) {
+ if (strcasecmp(facilities[i].strval, str) == 0) {
+ *facilityp = facilities[i].val;
+ return (TRUE);
+ }
+ }
+ return (FALSE);
+}
+#endif
+/*
+ * Log to the NT Event Log
+ */
+void
+syslog(int level, const char *fmt, ...) {
+ va_list ap;
+ char buf[1024];
+ char *str[1];
+
+ str[0] = buf;
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ /* Make sure that the channel is open to write the event */
+ if (hAppLog == NULL) {
+ openlog(progname, LOG_PID);
+ }
+ switch (level) {
+ case LOG_INFO:
+ case LOG_NOTICE:
+ case LOG_DEBUG:
+ ReportEvent(hAppLog, EVENTLOG_INFORMATION_TYPE, 0,
+ NTP_INFO, NULL, 1, 0, str, NULL);
+ break;
+ case LOG_WARNING:
+ ReportEvent(hAppLog, EVENTLOG_WARNING_TYPE, 0,
+ NTP_WARNING, NULL, 1, 0, str, NULL);
+ break;
+ default:
+ ReportEvent(hAppLog, EVENTLOG_ERROR_TYPE, 0,
+ NTP_ERROR, NULL, 1, 0, str, NULL);
+ break;
+ }
+}
+
+/*
+ * Initialize event logging
+ */
+void
+openlog(const char *name, int flags, ...) {
+ /* Get a handle to the Application event log */
+ hAppLog = RegisterEventSource(NULL, progname);
+ strlcpy(progname, name, sizeof(progname));
+}
+
+/*
+ * Close the Handle to the application Event Log
+ * We don't care whether or not we succeeded so ignore return values
+ * In fact if we failed then we would have nowhere to put the message
+ */
+void
+closelog() {
+ DeregisterEventSource(hAppLog);
+}
+
+/*
+ * Keep event logging synced with the current debug level
+ */
+void
+ModifyLogLevel(int level) {
+ debug_level = level;
+}
+/*
+ * Set the log priority mask to the given value.
+ * Return the previous priority mask
+ * Note that this setting is ignored in Win32
+ */
+int
+setlogmask(int maskpri) {
+ int temp = logmask;
+ logmask = maskpri;
+ return (temp);
+}
+
+/*
+ * Initialize logging for the port section of libbind.
+ * Piggyback onto stream given.
+ */
+void
+InitNTLogging(FILE *stream, int debug) {
+ log_stream = stream;
+ ModifyLogLevel(debug);
+}
+/*
+ * This function is for reporting errors to the application
+ * event log in case the regular syslog is not available
+ * mainly during startup. It should not be used under normal
+ * circumstances.
+ */
+void
+NTReportError(const char *name, const char *str) {
+ HANDLE hNTAppLog = NULL;
+ const char *buf[1];
+
+ buf[0] = str;
+
+ hNTAppLog = RegisterEventSource(NULL, name);
+
+ ReportEvent(hNTAppLog, EVENTLOG_ERROR_TYPE, 0,
+ NTP_ERROR, NULL, 1, 0, buf, NULL);
+
+ DeregisterEventSource(hNTAppLog);
+}
+
+
+/*
+ * ntp_strerror() - provide strerror()-compatible wrapper for libisc's
+ * isc__strerror(), which knows about Windows as well as
+ * C runtime error messages.
+ */
+
+char *
+ntp_strerror(
+ int code
+ )
+{
+ char * buf;
+
+ LIB_GETBUF(buf);
+ isc__strerror(code, buf, LIB_BUFLENGTH);
+
+ return buf;
+}
diff --git a/ports/winnt/libntp/termios.c b/ports/winnt/libntp/termios.c
new file mode 100644
index 000000000000..3fe4e4859c01
--- /dev/null
+++ b/ports/winnt/libntp/termios.c
@@ -0,0 +1,789 @@
+/* This file implements system calls that are not compatible with UNIX */
+/* Moved to libntp/termios.c */
+
+#include <config.h>
+#include <io.h>
+#include <stdio.h>
+
+#include "ntp.h"
+#include "ntp_tty.h"
+#include "lib_strbuf.h"
+#include "ntp_assert.h"
+#include "win32_io.h"
+
+#define MAX_SERIAL 255 /* COM1: - COM255: */
+
+typedef struct comhandles_tag {
+ HANDLE h;
+ size_t opens;
+ HANDLE * dupes;
+} comhandles;
+
+comhandles * hnds; /* handle/dupes array */
+size_t c_hnds; /* current array size */
+
+/*
+ * common_serial_open ensures duplicate opens of the same port
+ * work by duplicating the handle for the 2nd open, allowing
+ * refclock_atom to share a GPS refclock's comm port.
+ */
+HANDLE common_serial_open(
+ char * dev,
+ char ** pwindev
+ )
+{
+ char * windev;
+ HANDLE handle;
+ size_t unit;
+ size_t prev_c_hnds;
+ size_t opens;
+ char * pch;
+
+ /*
+ * This is odd, but we'll take any unix device path
+ * by looking for the initial '/' and strip off everything
+ * before the final digits, then translate that to COM__:
+ * maintaining backward compatibility with NTP practice of
+ * mapping unit 0 to the nonfunctional COM0:
+ *
+ * To ease the job of taking the windows COMx: device names
+ * out of reference clocks, we'll also work with those
+ * equanimously.
+ */
+
+ TRACE(1, ("common_serial_open given %s\n", dev));
+
+ pch = NULL;
+ if ('/' == dev[0]) {
+ pch = dev + strlen(dev) - 1;
+
+ if (isdigit(pch[0])) {
+ while (isdigit(pch[0])) {
+ pch--;
+ }
+ pch++;
+ }
+ TRACE(1, ("common_serial_open skipped to ending digits leaving %s\n", pch));
+ } else if ('c' == tolower(dev[0])
+ && 'o' == tolower(dev[1])
+ && 'm' == tolower(dev[2])) {
+ pch = dev + 3;
+ TRACE(1, ("common_serial_open skipped COM leaving %s\n", pch));
+ }
+
+ if (!pch || !isdigit(pch[0])) {
+ TRACE(1, ("not a digit: %s\n", pch ? pch : "[NULL]"));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if (1 != sscanf(pch, "%d", &unit)
+ || unit > MAX_SERIAL
+ || unit < 0) {
+ TRACE(1, ("sscanf failure of %s\n", pch));
+ return INVALID_HANDLE_VALUE;
+ }
+
+
+ if (c_hnds < unit + 1) {
+ prev_c_hnds = c_hnds;
+ c_hnds = unit + 1;
+ /* round up to closest multiple of 4 to avoid churn */
+ c_hnds = (c_hnds + 3) & ~3;
+ hnds = erealloc_zero(hnds, c_hnds * sizeof(hnds[0]),
+ prev_c_hnds * sizeof(hnds[0]));
+ }
+
+ if (NULL == hnds[unit].h) {
+ NTP_ENSURE(0 == hnds[unit].opens);
+ LIB_GETBUF(windev);
+ snprintf(windev, LIB_BUFLENGTH, "\\\\.\\COM%d", unit);
+ TRACE(1, ("windows device %s\n", windev));
+ *pwindev = windev;
+ hnds[unit].h =
+ CreateFile(
+ windev,
+ GENERIC_READ | GENERIC_WRITE,
+ 0, /* sharing prohibited */
+ NULL, /* default security */
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
+ NULL);
+ if (INVALID_HANDLE_VALUE == hnds[unit].h)
+ hnds[unit].h = NULL;
+ }
+
+ if (NULL != hnds[unit].h) {
+ /* think handle = dup(hnds[unit].h); */
+ DuplicateHandle(
+ GetCurrentProcess(),
+ hnds[unit].h,
+ GetCurrentProcess(),
+ &handle,
+ 0,
+ FALSE,
+ DUPLICATE_SAME_ACCESS
+ );
+ hnds[unit].opens++;
+ opens = hnds[unit].opens;
+ hnds[unit].dupes = erealloc(hnds[unit].dupes, opens *
+ sizeof(hnds[unit].dupes[0]));
+ hnds[unit].dupes[opens - 1] = handle;
+ return handle;
+ }
+
+ return INVALID_HANDLE_VALUE;
+}
+
+
+/*
+ * closeserial() is used in place of close by ntpd refclock I/O for ttys
+ */
+int
+closeserial(int fd)
+{
+ HANDLE h;
+ BOOL found;
+ size_t u;
+ size_t d;
+
+ h = (HANDLE)_get_osfhandle(fd);
+ if (INVALID_HANDLE_VALUE == h) {
+ errno = EBADF;
+ return -1;
+ }
+
+ d = 0; /* silence potent. uninit. warning */
+ found = FALSE;
+ for (u = 0; u < c_hnds; u++) {
+ for (d = 0; d < hnds[u].opens; d++) {
+ if (hnds[u].dupes[d] == h) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (found)
+ break;
+ }
+ if (found) {
+ hnds[u].opens--;
+ if (d < hnds[u].opens)
+ memmove(&hnds[u].dupes[d],
+ &hnds[u].dupes[d + 1],
+ hnds[u].opens - d *
+ sizeof(hnds[u].dupes[d]));
+ if (0 == hnds[u].opens) {
+ CloseHandle(hnds[u].h);
+ hnds[u].h = NULL;
+ }
+ }
+
+ return close(fd);
+}
+
+/*
+ * isserialhandle() -- check if a handle is a COM port handle
+ */
+int isserialhandle(
+ HANDLE h
+ )
+{
+ size_t u;
+ size_t d;
+
+
+ for (u = 0; u < c_hnds; u++)
+ for (d = 0; d < hnds[u].opens; d++)
+ if (hnds[u].dupes[d] == h)
+ return TRUE;
+ return FALSE;
+}
+
+
+/*
+ * tty_open - open serial port for refclock special uses
+ *
+ * This routine opens a serial port for and returns the
+ * file descriptor if success and -1 if failure.
+ */
+int tty_open(
+ char *dev, /* device name pointer */
+ int access, /* O_RDWR */
+ int mode /* unused */
+ )
+{
+ HANDLE Handle;
+ char * windev;
+
+ /*
+ * open communication port handle
+ */
+ windev = NULL;
+ Handle = common_serial_open(dev, &windev);
+ windev = (windev)
+ ? windev
+ : dev;
+
+ if (Handle == INVALID_HANDLE_VALUE) {
+ msyslog(LOG_ERR, "tty_open: device %s CreateFile error: %m", windev);
+ errno = EMFILE; /* lie, lacking conversion from GetLastError() */
+ return -1;
+ }
+
+ return (int)_open_osfhandle((int)Handle, _O_TEXT);
+}
+
+
+/*
+ * 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 or -1 indicating failure.
+ */
+int refclock_open(
+ char * dev, /* device name pointer */
+ u_int speed, /* serial port speed (code) */
+ u_int flags /* line discipline flags */
+ )
+{
+ char * windev;
+ HANDLE h;
+ COMMTIMEOUTS timeouts;
+ DCB dcb;
+ DWORD dwEvtMask;
+ int fd;
+ int translate;
+
+ /*
+ * open communication port handle
+ */
+ windev = NULL;
+ h = common_serial_open(dev, &windev);
+ windev = (windev) ? windev : dev;
+
+ if (INVALID_HANDLE_VALUE == h) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "CreateFile(%s) error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ /* Change the input/output buffers to be large. */
+ if (!SetupComm(h, 1024, 1024)) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "SetupComm(%s) error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ dcb.DCBlength = sizeof(dcb);
+
+ if (!GetCommState(h, &dcb)) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "GetCommState(%s) error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ switch (speed) {
+
+ case B300:
+ dcb.BaudRate = 300;
+ break;
+
+ case B1200:
+ dcb.BaudRate = 1200;
+ break;
+
+ case B2400:
+ dcb.BaudRate = 2400;
+ break;
+
+ case B4800:
+ dcb.BaudRate = 4800;
+ break;
+
+ case B9600:
+ dcb.BaudRate = 9600;
+ break;
+
+ case B19200:
+ dcb.BaudRate = 19200;
+ break;
+
+ case B38400:
+ dcb.BaudRate = 38400;
+ break;
+
+ case B57600:
+ dcb.BaudRate = 57600;
+ break;
+
+ case B115200:
+ dcb.BaudRate = 115200;
+ break;
+
+ default:
+ msyslog(LOG_ERR, "%s unsupported bps code %u", windev,
+ speed);
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+
+ dcb.fBinary = TRUE;
+ dcb.fParity = TRUE;
+ dcb.fOutxCtsFlow = 0;
+ dcb.fOutxDsrFlow = 0;
+ dcb.fDtrControl = DTR_CONTROL_ENABLE;
+ dcb.fDsrSensitivity = 0;
+ dcb.fTXContinueOnXoff = TRUE;
+ dcb.fOutX = 0;
+ dcb.fInX = 0;
+ dcb.fErrorChar = 0;
+ dcb.fNull = 0;
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fAbortOnError = 0;
+ dcb.ByteSize = 8;
+ dcb.StopBits = ONESTOPBIT;
+ dcb.Parity = NOPARITY;
+ dcb.ErrorChar = 0;
+ dcb.EofChar = 0;
+ if (LDISC_RAW & flags)
+ dcb.EvtChar = 0;
+ else
+ dcb.EvtChar = '\r';
+
+ if (!SetCommState(h, &dcb)) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "SetCommState(%s) error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ /* watch out for CR (dcb.EvtChar) as well as the CD line */
+ dwEvtMask = EV_RLSD;
+ if (LDISC_RAW & flags)
+ dwEvtMask |= EV_RXCHAR;
+ else
+ dwEvtMask |= EV_RXFLAG;
+ if (!SetCommMask(h, dwEvtMask)) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR, "SetCommMask(%s) error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ /* configure the handle to never block */
+ timeouts.ReadIntervalTimeout = MAXDWORD;
+ timeouts.ReadTotalTimeoutMultiplier = 0;
+ timeouts.ReadTotalTimeoutConstant = 0;
+ timeouts.WriteTotalTimeoutMultiplier = 0;
+ timeouts.WriteTotalTimeoutConstant = 0;
+
+ if (!SetCommTimeouts(h, &timeouts)) {
+ SAVE_ERRNO(
+ msyslog(LOG_ERR,
+ "Device %s SetCommTimeouts error: %m",
+ windev);
+ )
+ return -1;
+ }
+
+ translate = (LDISC_RAW & flags)
+ ? 0
+ : _O_TEXT;
+ fd = _open_osfhandle((int)h, translate);
+ /* refclock_open() long returned 0 on failure, avoid it. */
+ if (0 == fd) {
+ fd = _dup(0);
+ _close(0);
+ }
+
+ return fd;
+}
+
+
+int
+ioctl_tiocmget(
+ HANDLE h,
+ int *pi
+ )
+{
+ DWORD dw;
+
+ if (!GetCommModemStatus(h, &dw)) {
+ errno = ENOTTY;
+ return -1;
+ }
+
+ *pi = ((dw & MS_CTS_ON) ? TIOCM_CTS : 0)
+ | ((dw & MS_DSR_ON) ? TIOCM_DSR : 0)
+ | ((dw & MS_RLSD_ON) ? TIOCM_CAR : 0)
+ | ((dw & MS_RING_ON) ? TIOCM_RI : 0);
+
+ return 0;
+}
+
+
+int
+ioctl_tiocmset(
+ HANDLE h,
+ int *pi
+ )
+{
+ BOOL failed;
+ int result;
+
+ failed = !EscapeCommFunction(
+ h,
+ (*pi & TIOCM_RTS)
+ ? SETRTS
+ : CLRRTS
+ );
+
+ if (!failed)
+ failed = !EscapeCommFunction(
+ h,
+ (*pi & TIOCM_DTR)
+ ? SETDTR
+ : CLRDTR
+ );
+
+ if (failed) {
+ errno = ENOTTY;
+ result = -1;
+ } else
+ result = 0;
+
+ return result;
+}
+
+
+int
+ioctl(
+ int fd,
+ int op,
+ int *pi
+ )
+{
+ HANDLE h;
+ int result;
+ int modctl;
+
+ h = (HANDLE)_get_osfhandle(fd);
+
+ if (INVALID_HANDLE_VALUE == h) {
+ /* errno already set */
+ return -1;
+ }
+
+ switch (op) {
+
+ case TIOCMGET:
+ result = ioctl_tiocmget(h, pi);
+ break;
+
+ case TIOCMSET:
+ result = ioctl_tiocmset(h, pi);
+ break;
+
+ case TIOCMBIC:
+ result = ioctl_tiocmget(h, &modctl);
+ if (result < 0)
+ return result;
+ modctl &= ~(*pi);
+ result = ioctl_tiocmset(h, &modctl);
+ break;
+
+ case TIOCMBIS:
+ result = ioctl_tiocmget(h, &modctl);
+ if (result < 0)
+ return result;
+ modctl |= *pi;
+ result = ioctl_tiocmset(h, &modctl);
+ break;
+
+ default:
+ errno = EINVAL;
+ result = -1;
+ }
+
+ return result;
+}
+
+
+int
+tcsetattr(
+ int fd,
+ int optional_actions,
+ const struct termios * tios
+ )
+{
+ DCB dcb;
+ HANDLE h;
+
+ UNUSED_ARG(optional_actions);
+
+ h = (HANDLE)_get_osfhandle(fd);
+
+ if (INVALID_HANDLE_VALUE == h) {
+ /* errno already set */
+ return -1;
+ }
+
+ dcb.DCBlength = sizeof(dcb);
+ if (!GetCommState(h, &dcb)) {
+ errno = ENOTTY;
+ return -1;
+ }
+
+ switch (max(tios->c_ospeed, tios->c_ispeed)) {
+
+ case B300:
+ dcb.BaudRate = 300;
+ break;
+
+ case B1200:
+ dcb.BaudRate = 1200;
+ break;
+
+ case B2400:
+ dcb.BaudRate = 2400;
+ break;
+
+ case B4800:
+ dcb.BaudRate = 4800;
+ break;
+
+ case B9600:
+ dcb.BaudRate = 9600;
+ break;
+
+ case B19200:
+ dcb.BaudRate = 19200;
+ break;
+
+ case B38400:
+ dcb.BaudRate = 38400;
+ break;
+
+ case B57600:
+ dcb.BaudRate = 57600;
+ break;
+
+ case B115200:
+ dcb.BaudRate = 115200;
+ break;
+
+ default:
+ msyslog(LOG_ERR, "unsupported serial baud rate");
+ errno = EINVAL;
+ return -1;
+ }
+
+ switch (tios->c_cflag & CSIZE) {
+
+ case CS5:
+ dcb.ByteSize = 5;
+ break;
+
+ case CS6:
+ dcb.ByteSize = 6;
+ break;
+
+ case CS7:
+ dcb.ByteSize = 7;
+ break;
+
+ case CS8:
+ dcb.ByteSize = 8;
+ break;
+
+ default:
+ msyslog(LOG_ERR, "unsupported serial word size");
+ errno = EINVAL;
+ return FALSE;
+ }
+
+ if (PARENB & tios->c_cflag) {
+ dcb.fParity = TRUE;
+ dcb.Parity = (tios->c_cflag & PARODD)
+ ? ODDPARITY
+ : EVENPARITY;
+ } else {
+ dcb.fParity = FALSE;
+ dcb.Parity = NOPARITY;
+ }
+
+ dcb.StopBits = (CSTOPB & tios->c_cflag)
+ ? TWOSTOPBITS
+ : ONESTOPBIT;
+
+ if (!SetCommState(h, &dcb)) {
+ errno = ENOTTY;
+ return -1;
+ }
+
+ return 0;
+}
+
+
+int
+tcgetattr(
+ int fd,
+ struct termios *tios
+ )
+{
+ DCB dcb;
+ HANDLE h;
+
+ h = (HANDLE)_get_osfhandle(fd);
+
+ if (INVALID_HANDLE_VALUE == h) {
+ /* errno already set */
+ return -1;
+ }
+
+ dcb.DCBlength = sizeof(dcb);
+
+ if (!GetCommState(h, &dcb)) {
+ errno = ENOTTY;
+ return -1;
+ }
+
+ /* Set c_ispeed & c_ospeed */
+
+ switch (dcb.BaudRate) {
+
+ case 300:
+ tios->c_ispeed = tios->c_ospeed = B300;
+ break;
+
+ case 1200:
+ tios->c_ispeed = tios->c_ospeed = B1200;
+ break;
+
+ case 2400:
+ tios->c_ispeed = tios->c_ospeed = B2400;
+ break;
+
+ case 4800:
+ tios->c_ispeed = tios->c_ospeed = B4800;
+ break;
+
+ case 9600:
+ tios->c_ispeed = tios->c_ospeed = B9600;
+ break;
+
+ case 19200:
+ tios->c_ispeed = tios->c_ospeed = B19200;
+ break;
+
+ case 38400:
+ tios->c_ispeed = tios->c_ospeed = B38400;
+ break;
+
+ case 57600:
+ tios->c_ispeed = tios->c_ospeed = B57600;
+ break;
+
+ case 115200:
+ tios->c_ispeed = tios->c_ospeed = B115200;
+ break;
+
+ default:
+ tios->c_ispeed = tios->c_ospeed = B9600;
+ }
+
+
+ switch (dcb.ByteSize) {
+ case 5:
+ tios->c_cflag = CS5;
+ break;
+
+ case 6:
+ tios->c_cflag = CS6;
+ break;
+
+ case 7:
+ tios->c_cflag = CS7;
+ break;
+
+ case 8:
+ default:
+ tios->c_cflag = CS8;
+ }
+
+ if (dcb.fParity) {
+ tios->c_cflag |= PARENB;
+
+ if (ODDPARITY == dcb.Parity)
+ tios->c_cflag |= PARODD;
+ }
+
+ if (TWOSTOPBITS == dcb.StopBits)
+ tios->c_cflag |= CSTOPB;
+
+ tios->c_iflag = 0;
+ tios->c_lflag = 0;
+ tios->c_line = 0;
+ tios->c_oflag = 0;
+
+ return 0;
+}
+
+
+int
+tcflush(
+ int fd,
+ int mode
+ )
+{
+ HANDLE h;
+ BOOL success;
+ DWORD flags;
+ int result;
+
+ h = (HANDLE)_get_osfhandle(fd);
+
+ if (INVALID_HANDLE_VALUE == h) {
+ /* errno already set */
+ return -1;
+ }
+
+ switch (mode) {
+
+ case TCIFLUSH:
+ flags = PURGE_RXCLEAR;
+ break;
+
+ case TCOFLUSH:
+ flags = PURGE_TXABORT;
+ break;
+
+ case TCIOFLUSH:
+ flags = PURGE_RXCLEAR | PURGE_TXABORT;
+ break;
+
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+
+ success = PurgeComm(h, flags);
+
+ if (success)
+ result = 0;
+ else {
+ errno = ENOTTY;
+ result = -1;
+ }
+
+ return result;
+}
+
diff --git a/ports/winnt/libntp/util_clockstuff.c b/ports/winnt/libntp/util_clockstuff.c
new file mode 100644
index 000000000000..e4bd0de3dd24
--- /dev/null
+++ b/ports/winnt/libntp/util_clockstuff.c
@@ -0,0 +1,26 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ntp_syslog.h"
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+#include "clockstuff.h"
+
+int
+gettimeofday(
+ struct timeval * tv,
+ void * ignored
+ )
+{
+ struct timespec ts;
+
+ UNUSED_ARG(ignored);
+
+ getclock(TIMEOFDAY, &ts);
+
+ tv->tv_sec = ts.tv_sec;
+ tv->tv_usec = ts.tv_nsec / 10;
+
+ return 0;
+}
diff --git a/ports/winnt/libntp/win32_io.c b/ports/winnt/libntp/win32_io.c
new file mode 100644
index 000000000000..9e7a86179853
--- /dev/null
+++ b/ports/winnt/libntp/win32_io.c
@@ -0,0 +1,81 @@
+/* This file implements i/o calls that are specific to Windows */
+
+#include <config.h>
+#include <stdio.h>
+#include "ntp_fp.h"
+#include "ntp_net.h"
+#include "ntp_stdlib.h"
+#include "ntp_syslog.h"
+#include "win32_io.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.
+ * Based on that article, it is surprising that a much newer winsock2.h
+ * does not define SIO_UDP_CONNRESET (the one that comes with VS 2008).
+ * 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
+
+void
+InitSockets(
+ void
+ )
+{
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ /* Need Winsock 2.0 or better */
+ wVersionRequested = MAKEWORD(2, 0);
+
+ err = WSAStartup(wVersionRequested, &wsaData);
+ if ( err != 0 ) {
+ SetLastError(err);
+ mfprintf(stderr, "No usable winsock: %m\n");
+ SetLastError(err);
+ msyslog(LOG_ERR, "No usable winsock: %m");
+ exit(1);
+ }
+}
+
+/*
+ * 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.
+ */
+void
+connection_reset_fix(
+ SOCKET fd,
+ sockaddr_u * addr
+ )
+{
+ DWORD dw;
+ BOOL bNewBehavior = FALSE;
+ DWORD status;
+
+ /*
+ * disable bad behavior using IOCTL: SIO_UDP_CONNRESET
+ * NT 4.0 has no problem
+ */
+ if (isc_win32os_majorversion() >= 5) {
+ status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior,
+ sizeof(bNewBehavior), NULL, 0,
+ &dw, NULL, NULL);
+ if (SOCKET_ERROR == status)
+ msyslog(LOG_ERR,
+ "connection_reset_fix() failed for address %s: %m",
+ stoa(addr));
+ }
+}
+
diff --git a/ports/winnt/ntpd/hopf_PCI_io.c b/ports/winnt/ntpd/hopf_PCI_io.c
new file mode 100644
index 000000000000..a1ba200f1171
--- /dev/null
+++ b/ports/winnt/ntpd/hopf_PCI_io.c
@@ -0,0 +1,335 @@
+/*
+ * hopf_PCI_io.c
+ * Read data from a hopf PCI clock using the ATLSoft WinNT driver.
+ *
+ * Date: 21.03.2000 Revision: 01.10
+ *
+ * Copyright (C) 1999, 2000 by Bernd Altmeier altmeier@ATLSoft.de
+ *
+ */
+
+/*
+ * Ignore nonstandard extension warning.
+ * This happens when including winioctl.h
+ */
+#pragma warning(disable: 4201)
+#define _FILESYSTEMFSCTL_
+
+#include <config.h>
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <winioctl.h>
+
+#include "ntp_stdlib.h"
+#include "hopf_PCI_io.h"
+
+
+#define ATL_PASSTHROUGH_READ_TOSIZE (3 * sizeof(ULONG))
+#define ATL_PASSTHROUGH_READ_FROMSIZE 0
+#define IOCTL_ATLSOFT_PASSTHROUGH_READ CTL_CODE( \
+ FILE_DEVICE_UNKNOWN, \
+ 0x805, \
+ METHOD_BUFFERED, \
+ FILE_ANY_ACCESS)
+
+
+HANDLE hDevice = NULL; // this is the handle to the PCI Device
+
+HANDLE hRdEvent;
+OVERLAPPED Rdoverlapped;
+OVERLAPPED * pRdOverlapped;
+
+ULONG iobuffer[256];
+DWORD cbReturned;
+BOOL HaveBoard = FALSE;
+
+struct {
+ ULONG region;
+ ULONG offset;
+ ULONG count;
+} io_params;
+
+
+BOOL
+OpenHopfDevice(void)
+{
+ OSVERSIONINFO VersionInfo;
+ ULONG deviceNumber;
+ CHAR deviceName[255];
+
+ VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&VersionInfo);
+ switch (VersionInfo.dwPlatformId) {
+
+ case VER_PLATFORM_WIN32_WINDOWS: // Win95/98
+ return FALSE; // "NTP does not support Win 95-98."
+ break;
+
+ case VER_PLATFORM_WIN32_NT: // WinNT
+ deviceNumber = 0;
+ snprintf(deviceName, sizeof(deviceName),
+ "\\\\.\\hclk6039%d", deviceNumber + 1);
+ hDevice = CreateFile(
+ deviceName,
+ GENERIC_WRITE | GENERIC_READ,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_DELETE_ON_CLOSE | FILE_FLAG_OVERLAPPED,
+ NULL);
+ break;
+
+ default:
+ hDevice = INVALID_HANDLE_VALUE;
+ break;
+ } // end switch
+
+ if (INVALID_HANDLE_VALUE == hDevice) // the system didn't return a handle
+ return FALSE; //"A handle to the driver could not be obtained properly"
+
+ // an event to be used for async transfers
+ hRdEvent = CreateEvent(
+ NULL,
+ TRUE,
+ FALSE,
+ NULL);
+
+ if (INVALID_HANDLE_VALUE == hRdEvent)
+ return FALSE; // the system didn't return a handle
+
+ pRdOverlapped = &Rdoverlapped;
+ pRdOverlapped->hEvent = hRdEvent;
+
+ HaveBoard = TRUE; // board installed and we have access
+
+ return TRUE;
+} // end of OpenHopfDevice()
+
+
+BOOL
+CloseHopfDevice(void)
+{
+ CloseHandle(hRdEvent);// When done, close the handle to the driver
+
+ return CloseHandle(hDevice);
+} // end of CloseHopfDevice()
+
+
+void
+ReadHopfDevice(void)
+{
+ if (!HaveBoard)
+ return;
+
+ DeviceIoControl(
+ hDevice,
+ IOCTL_ATLSOFT_PASSTHROUGH_READ,
+ &io_params,
+ ATL_PASSTHROUGH_READ_TOSIZE,
+ iobuffer,
+ ATL_PASSTHROUGH_READ_FROMSIZE
+ + io_params.count * sizeof(ULONG),
+ &cbReturned,
+ pRdOverlapped
+ );
+}
+
+
+#ifdef NOTUSED
+void
+GetHardwareData(
+ LPDWORD Data32,
+ WORD Ofs
+ )
+{
+ io_params.region = 1;
+ io_params.offset = Ofs;
+ io_params.count = 1;
+ ReadHopfDevice();
+ *Data32 = iobuffer[0];
+}
+#endif /* NOTUSED */
+
+
+void
+GetHopfTime(
+ LPHOPFTIME Data,
+ DWORD Offset
+ )
+{
+ io_params.region = 1;
+ io_params.offset = Offset;
+ io_params.count = 4;
+
+ ReadHopfDevice();
+
+ Data->wHour = 0;
+ Data->wMinute = 0;
+ Data->wSecond = 0;
+ while (iobuffer[0] >= 60 * 60 * 1000) {
+ iobuffer[0] = iobuffer[0] - 60 * 60 * 1000;
+ Data->wHour++;
+ }
+ while (iobuffer[0] >= 60 * 1000) {
+ iobuffer[0] = iobuffer[0] - 60 * 1000;
+ Data->wMinute++;
+ }
+ while (iobuffer[0] >= 1000) {
+ iobuffer[0] = iobuffer[0] - 1000;
+ Data->wSecond++;
+ }
+ Data->wMilliseconds = LOWORD(iobuffer[0]);
+ Data->wDay = HIBYTE(HIWORD(iobuffer[1]));
+ Data->wMonth = LOBYTE(HIWORD(iobuffer[1]));
+ Data->wYear = LOWORD(iobuffer[1]);
+ Data->wDayOfWeek = HIBYTE(HIWORD(iobuffer[2]));
+ if (Data->wDayOfWeek == 7) // Dow Korrektur
+ Data->wDayOfWeek = 0;
+
+ io_params.region = 1;
+ io_params.offset += 0x08;
+ io_params.count = 1;
+
+ ReadHopfDevice();
+
+ Data->wStatus = LOBYTE(HIWORD(iobuffer[0]));
+}
+
+
+#ifdef NOTUSED
+void
+GetHopfLocalTime(
+ LPHOPFTIME Data
+ )
+{
+ DWORD Offset = 0;
+
+ GetHopfTime(Data, Offset);
+}
+#endif /* NOTUSED */
+
+
+void
+GetHopfSystemTime(
+ LPHOPFTIME Data
+ )
+{
+ DWORD Offset = 0x10;
+
+ GetHopfTime(Data,Offset);
+}
+
+
+#ifdef NOTUSED
+void
+GetSatData(
+ LPSATSTAT Data
+ )
+{
+ io_params.region = 1;
+ io_params.offset = 0xb0;
+ io_params.count = 5;
+
+ ReadHopfDevice();
+
+ Data->wVisible = HIBYTE(HIWORD(iobuffer[0]));
+ Data->wMode = LOBYTE(LOWORD(iobuffer[0]));
+ Data->wSat0 = HIBYTE(HIWORD(iobuffer[1]));
+ Data->wRat0 = LOBYTE(HIWORD(iobuffer[1]));
+ Data->wSat1 = HIBYTE(LOWORD(iobuffer[1]));
+ Data->wRat1 = LOBYTE(LOWORD(iobuffer[1]));
+ Data->wSat2 = HIBYTE(HIWORD(iobuffer[2]));
+ Data->wRat2 = LOBYTE(HIWORD(iobuffer[2]));
+ Data->wSat3 = HIBYTE(LOWORD(iobuffer[2]));
+ Data->wRat3 = LOBYTE(LOWORD(iobuffer[2]));
+ Data->wSat4 = HIBYTE(HIWORD(iobuffer[3]));
+ Data->wRat4 = LOBYTE(HIWORD(iobuffer[3]));
+ Data->wSat5 = HIBYTE(LOWORD(iobuffer[3]));
+ Data->wRat5 = LOBYTE(LOWORD(iobuffer[3]));
+ Data->wSat6 = HIBYTE(HIWORD(iobuffer[4]));
+ Data->wRat6 = LOBYTE(HIWORD(iobuffer[4]));
+ Data->wSat7 = HIBYTE(LOWORD(iobuffer[4]));
+ Data->wRat7 = LOBYTE(LOWORD(iobuffer[4]));
+}
+
+
+void
+GetDiffTime(
+ LPLONG Data
+ )
+{
+ io_params.region = 1;
+ io_params.offset = 0x0c;
+ io_params.count = 1;
+
+ ReadHopfDevice();
+
+ *Data = iobuffer[0];
+}
+
+
+void
+GetPosition(
+ LPGPSPOS Data
+ )
+{
+ io_params.region = 1;
+ io_params.offset = 0x90; // Positionsdaten Länge
+ io_params.count = 1;
+
+ ReadHopfDevice();
+
+ Data->wLongitude = iobuffer[0]; //in Millisekunden
+ io_params.region = 1;
+ io_params.offset = 0xa0; // Positionsdaten Breite
+ io_params.count = 1;
+
+ ReadHopfDevice();
+
+ Data->wLatitude = iobuffer[0];
+ Data->wAltitude = 0;
+}
+
+
+void
+GetHardwareVersion(
+ LPCLOCKVER Data
+ )
+{
+ int i;
+
+ io_params.region = 1;
+ io_params.offset = 0x50;
+ io_params.count = 12;
+
+ ReadHopfDevice();
+
+ Data->cVersion[0] = '\0';
+ iobuffer[13] = 0;
+ for (i = 0; i < 13; i++) {
+ Data->cVersion[i * 4 ] = HIBYTE(HIWORD(iobuffer[i]));
+ Data->cVersion[i * 4 + 1] = LOBYTE(HIWORD(iobuffer[i]));
+ Data->cVersion[i * 4 + 2] = HIBYTE(LOWORD(iobuffer[i]));
+ Data->cVersion[i * 4 + 3] = LOBYTE(LOWORD(iobuffer[i]));
+ }
+}
+
+
+void
+GetDCFAntenne(
+ LPDCFANTENNE Data
+ )
+{
+ io_params.region = 1;
+ io_params.offset = 0xcc;
+ io_params.count = 1;
+
+ ReadHopfDevice();
+ Data->bStatus1 = HIBYTE(HIWORD(iobuffer[0]));
+ Data->bStatus = LOBYTE(HIWORD(iobuffer[0]));
+ Data->wAntValue = LOWORD(iobuffer[0]);
+}
+#endif /* NOTUSED */
+
diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c
new file mode 100644
index 000000000000..052bfcd2d92b
--- /dev/null
+++ b/ports/winnt/ntpd/nt_clockstuff.c
@@ -0,0 +1,1743 @@
+/* Windows NT Clock Routines
+ *
+ * Created by Sven Dietrich sven@inter-yacht.com
+ *
+ * New interpolation scheme by Dave Hart <davehart@davehart.com> in
+ * February 2009 overcomes 500us-1ms inherent jitter with the older
+ * scheme, first identified by Peter Rosin (nee Ekberg)
+ * <peda@lysator.liu.se> in 2003 [Bug 216].
+ *
+ * Note: The Windows port of ntpd uses the C99-snprintf replacement for
+ * (v)snprintf(), also used by msyslog(), which does not understand the
+ * printf format specifier %I64d, only the more common %lld. With the
+ * minimum supported compiler raised to Visual C++ 2005 in ntp-dev in
+ * August 2011, all MS C runtime routines also understand %lld and %llu.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/resource.h> /* our private version */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VS 2005 */
+#include <intrin.h> /* for __rdtsc() */
+#endif
+
+#ifdef HAVE_PPSAPI
+#include <timepps.h>
+/*
+ * ports/winnt/include/timepps.h defines EOPNOTSUPP for compatibility
+ * with PPSAPI on other platforms. ports/winnt/include/isc/net.h has
+ * #define EOPNOTSUPP WSAEOPNOTSUPP, so to avoid a macro redefinition
+ * warning undefine it.
+ */
+#undef EOPNOTSUPP
+#endif /* HAVE_PPSAPI */
+
+#include "ntp_stdlib.h"
+#include "ntp_unixtime.h"
+#include "ntp_timer.h"
+#include "ntp_assert.h"
+#include "ntp_leapsec.h"
+#include "clockstuff.h"
+#include "ntservice.h"
+#include "ntpd.h"
+#include "ntpd-opts.h"
+
+extern double sys_residual; /* residual from previous adjustment */
+
+/*
+ * Include code to possibly modify the MM timer while the service is active.
+ */
+
+/*
+ * Whether or not MM timer modifications takes place is still controlled
+ * by the variable below which is initialized by a default value but
+ * might be changed depending on a command line switch.
+ */
+static int modify_mm_timer = MM_TIMER_LORES;
+
+#define MM_TIMER_INTV 1 /* the interval we'd want to set the MM timer to [ms] */
+
+static UINT wTimerRes;
+
+BOOL init_randfile();
+
+static long last_Adj = 0;
+
+#define LS_CORR_INTV_SECS 2 /* seconds to apply leap second correction */
+#define LS_CORR_INTV ( (LONGLONG) HECTONANOSECONDS * LS_CORR_INTV_SECS )
+#define LS_CORR_LIMIT ( (LONGLONG) HECTONANOSECONDS / 2 ) // half a second
+
+typedef union ft_ull {
+ FILETIME ft;
+ ULONGLONG ull;
+ LONGLONG ll;
+ LARGE_INTEGER li;
+} FT_ULL;
+
+/* leap second stuff */
+static FT_ULL ls_ft;
+static DWORD ls_time_adjustment;
+static ULONGLONG ls_ref_perf_cnt;
+static LONGLONG ls_elapsed;
+
+static BOOL winnt_time_initialized = FALSE;
+static BOOL winnt_use_interpolation = FALSE;
+static unsigned clock_thread_id;
+
+
+void WINAPI GetInterpTimeAsFileTime(LPFILETIME pft);
+static void StartClockThread(void);
+static void tune_ctr_freq(LONGLONG, LONGLONG);
+void StopClockThread(void);
+void atexit_revert_mm_timer(void);
+void win_time_stepped(void);
+
+static HANDLE clock_thread = NULL;
+static HANDLE TimerThreadExitRequest = NULL;
+
+/*
+ * interp_time estimates time in 100ns units
+ * based on a performance counter value given.
+ * The 2nd parameter indicates if this is
+ * part of a current time-of-day calculation.
+ */
+ULONGLONG interp_time(ULONGLONG, BOOL);
+
+/*
+ * add_counter_time_pair is called by the
+ * high priority clock thread with a new
+ * sample.
+ */
+void add_counter_time_pair(ULONGLONG, LONGLONG);
+
+/*
+ * globals used by the above two functions to
+ * implement the counter/time history
+ */
+#define BASELINES_TOT 256
+#define BASELINES_USED 64
+
+static volatile int newest_baseline = 0;
+static volatile int newest_baseline_gen = 0;
+static ULONGLONG baseline_counts[BASELINES_TOT] = {0};
+static LONGLONG baseline_times[BASELINES_TOT] = {0};
+
+#define CLOCK_BACK_THRESHOLD 100 /* < 10us unremarkable */
+static ULONGLONG clock_backward_max = CLOCK_BACK_THRESHOLD;
+static int clock_backward_count;
+
+/**
+ * A flag set on Windows versions which ignore small time adjustments.
+ *
+ * Windows Vista and Windows 7 ignore TimeAdjustment less than 16.
+ * @note Has to be checked for Windows Server 2008/2012 and Windows 8.
+ * Ref: http://support.microsoft.com/kb/2537623, bug #2328
+ */
+static BOOL os_ignores_small_adjustment;
+
+/*
+ * clockperiod is the period used for SetSystemTimeAdjustment
+ * slewing calculations but does not necessarily correspond
+ * to the precision of the OS clock. Prior to Windows Vista
+ * (6.0) the two were identical. In 100ns units.
+ */
+static DWORD clockperiod;
+
+/*
+ * os_clock_precision is the observed precision of the OS
+ * clock, meaning the increment between discrete values. This
+ * is currently calculated once at startup. 100ns units.
+ */
+static ULONGLONG os_clock_precision;
+
+/*
+ * NomPerfCtrFreq is from QueryPerformanceFrequency and is the
+ * number of performance counter beats per second. PerfCtrFreq
+ * starts from NomPerfCtrFreq but is maintained using a sliding
+ * window average based on actual performance counter behavior,
+ * to allow us to better tolerate powersaving measures that
+ * alter the effective frequency of the processor cycle counter
+ * (TSC) which sometimes underlies QueryPerformanceCounter.
+ *
+ * Note that the OS is unlikely to be so subtle in its internal
+ * scheduling of waitable timers, presumably done using the
+ * performance counter. Therefore our calculations for
+ * interpolated time should be based on PerfCtrFreq but our
+ * calculations for SetWaitableTimer should assume the OS will
+ * convert from FILETIME 100ns units to performance counter
+ * beats using the nominal frequency.
+ */
+
+volatile ULONGLONG PerfCtrFreq = 0;
+ ULONGLONG NomPerfCtrFreq = 0;
+
+/*
+ * If we're using RDTSC beating at the same rate as
+ * QueryPerformanceCounter, there is a systemic
+ * offset we need to account for when using
+ * counterstamps from serialpps.sys, which are
+ * always from QPC (actually KeQueryPerformanceCounter).
+ */
+static LONGLONG QPC_offset = 0;
+
+/*
+ * Substitute RDTSC for QueryPerformanceCounter()?
+ */
+static int use_pcc = -1;
+
+/*
+ * Restrict threads that call QPC/RDTSC to one CPU?
+ */
+static int lock_interp_threads = -1;
+
+/*
+ * ppm_per_adjust_unit is parts per million effect on the OS
+ * clock per slewing adjustment unit per second. Per haps.
+ */
+static DOUBLE ppm_per_adjust_unit;
+
+/*
+ * wintickadj emulates the functionality provided by unix tickadj,
+ * providing a baseline clock correction if needed to get the
+ * clock within a few hundred PPM of correct frequency.
+ */
+static long wintickadj;
+
+static void choose_interp_counter(void);
+static int is_qpc_built_on_pcc(void);
+
+/*
+ * performance counter frequency observations
+ */
+#define TUNE_CTR_DEPTH 3 /* running avg depth */
+
+static HANDLE ctr_freq_timer = INVALID_HANDLE_VALUE;
+static ULONGLONG tune_ctr_freq_max_interval;
+static unsigned tune_ctr_period;
+void start_ctr_freq_timer(ULONGLONG now_time);
+void reset_ctr_freq_timer(ULONGLONG when, ULONGLONG now);
+void reset_ctr_freq_timer_abs(ULONGLONG when);
+
+/* round a Windows time to the next bottom of the second */
+
+#define ROUND_TO_NEXT_SEC_BOTTOM(t) \
+do { \
+ (t) += 3 * HECTONANOSECONDS / 2 - 1; \
+ (t) /= HECTONANOSECONDS; \
+ (t) *= HECTONANOSECONDS; \
+ (t) -= HECTONANOSECONDS / 2; \
+} while (0)
+
+/*
+ * NT native time format is 100's of nanoseconds since 1601-01-01.
+ * Helpers for converting between "hectonanoseconds" and the
+ * performance counter scale from which interpolated time is
+ * derived.
+ */
+#define HNS2PERF(hns) ((hns) * PerfCtrFreq / HECTONANOSECONDS)
+#define PERF2HNS(ctr) ((ctr) * HECTONANOSECONDS / PerfCtrFreq)
+
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VS 2005 */
+#define get_pcc() __rdtsc()
+#else
+/*
+ * something like this can be used for a compiler without __rdtsc()
+ */
+ULONGLONG __forceinline
+get_pcc(void)
+{
+ /* RDTSC returns in EDX:EAX, same as C compiler */
+ __asm {
+ RDTSC
+ }
+}
+#endif
+
+
+/*
+ * perf_ctr() returns the current performance counter value,
+ * from QueryPerformanceCounter or RDTSC.
+ */
+ULONGLONG WINAPI
+perf_ctr(void)
+{
+ FT_ULL ft;
+
+ if (use_pcc)
+ return get_pcc();
+ else {
+ QueryPerformanceCounter(&ft.li);
+ return ft.ull;
+ }
+}
+
+
+/*
+ * init_small_adjustment
+ *
+ * Set variable os_ignores_small_adjustment
+ *
+ */
+static void init_small_adjustment(void)
+{
+ OSVERSIONINFO vi;
+ memset(&vi, 0, sizeof(vi));
+ vi.dwOSVersionInfoSize = sizeof(vi);
+
+ if (!GetVersionEx(&vi)) {
+ msyslog(LOG_WARNING, "GetVersionEx failed with error code %d.", GetLastError());
+ os_ignores_small_adjustment = FALSE;
+ return;
+ }
+
+ if (vi.dwMajorVersion == 6 && vi.dwMinorVersion == 1) {
+ // Windows 7 and Windows Server 2008 R2
+ //
+ // Windows 7 is documented as affected.
+ // Windows Server 2008 R2 is assumed affected.
+ os_ignores_small_adjustment = TRUE;
+ } else if (vi.dwMajorVersion == 6 && vi.dwMinorVersion == 0) {
+ // Windows Vista and Windows Server 2008
+ //
+ // Windows Vista is documented as affected.
+ // Windows Server 2008 is assumed affected.
+ os_ignores_small_adjustment = TRUE;
+ } else {
+ os_ignores_small_adjustment = FALSE;
+ }
+}
+
+
+/*
+ * choose_interp_counter - select between QueryPerformanceCounter and
+ * the x86 processor cycle counter (TSC).
+ */
+static void
+choose_interp_counter(void)
+{
+ const char * ntpd_pcc_freq_text;
+ int qpc_built_on_pcc;
+
+ /*
+ * Regardless of whether we actually use RDTSC, first determine
+ * if QueryPerformanceCounter is built on it, so that we can
+ * decide whether it's prudent to lock QPC-consuming threads to
+ * a particular CPU.
+ */
+ qpc_built_on_pcc = is_qpc_built_on_pcc();
+ lock_interp_threads = qpc_built_on_pcc;
+
+ /*
+ * It's time to make some more permanent knobs,
+ * but for right now the RDTSC aka PCC dance on x86 is:
+ *
+ * 1. With none of these variables defined, only QPC
+ * is used because there is no reliable way to
+ * detect counter frequency variation after ntpd
+ * startup implemented.
+ * 2. We need a better knob, but for now if you know
+ * your RDTSC / CPU frequency is invariant, set
+ * NTPD_PCC and assuming your QPC is based on the
+ * PCC as well, RDTSC will be substituted.
+ * 3. More forcefully, you can jam in a desired exact
+ * processor frequency, expressed in cycles per
+ * second by setting NTPD_PCC_FREQ=398125000, for
+ * example, if yor actual known CPU frequency is
+ * 398.125 MHz, and NTPD_PCC doesn't work because
+ * QueryPerformanceCounter is implemented using
+ * another counter. It is very easy to make ntpd
+ * fall down if the NTPD_PCC_FREQ value isn't very
+ * close to the observed RDTSC units per second.
+ *
+ * Items 2 and 3 could probably best be combined into one
+ * new windows-specific command line switch such as
+ * ntpd --pcc
+ * or
+ * ntpd --pcc=398125000
+ *
+ * They are currently tied to Windows because that is
+ * the only ntpd port with its own interpolation, and
+ * to x86/x64 because no one has ported the Windows
+ * ntpd port to the sole remaining alternative, Intel
+ * Itanium.
+ */
+ if (HAVE_OPT(PCCFREQ))
+ ntpd_pcc_freq_text = OPT_ARG(PCCFREQ);
+ else
+ ntpd_pcc_freq_text = getenv("NTPD_PCC_FREQ");
+
+ if (!HAVE_OPT(USEPCC)
+ && NULL == ntpd_pcc_freq_text
+ && NULL == getenv("NTPD_PCC")) {
+ use_pcc = 0;
+ return;
+ }
+
+ if (!qpc_built_on_pcc && NULL == ntpd_pcc_freq_text) {
+ use_pcc = 0;
+ return;
+ }
+
+ use_pcc = 1;
+ if (ntpd_pcc_freq_text != NULL)
+ sscanf(ntpd_pcc_freq_text,
+ "%llu",
+ &NomPerfCtrFreq);
+
+ NLOG(NLOG_CLOCKINFO)
+ msyslog(LOG_INFO,
+ "using processor cycle counter "
+ "%.3f MHz",
+ NomPerfCtrFreq / 1e6);
+ return;
+}
+
+
+/*
+ * is_qpc_built_on_pcc - test if QueryPerformanceCounter runs at the
+ * same rate as the processor cycle counter (TSC).
+ */
+static int
+is_qpc_built_on_pcc(void)
+{
+ LONGLONG offset;
+ FT_ULL ft1;
+ FT_ULL ft2;
+ FT_ULL ft3;
+ FT_ULL ft4;
+ FT_ULL ft5;
+
+ NTP_REQUIRE(NomPerfCtrFreq != 0);
+
+ QueryPerformanceCounter(&ft1.li);
+ ft2.ull = get_pcc();
+ Sleep(1);
+ QueryPerformanceCounter(&ft3.li);
+ Sleep(1);
+ ft4.ull = get_pcc();
+ Sleep(1);
+ QueryPerformanceCounter(&ft5.li);
+
+ offset = ft2.ull - ft1.ull;
+ ft3.ull += offset;
+ ft5.ull += offset;
+
+ if (ft2.ull <= ft3.ull &&
+ ft3.ull <= ft4.ull &&
+ ft4.ull <= ft5.ull) {
+
+ QPC_offset = offset;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+/*
+ * Request Multimedia Timer
+ */
+void
+set_mm_timer(
+ int timerres
+ )
+{
+ modify_mm_timer = timerres;
+}
+
+/*
+ * adj_systime - called once every second to discipline system clock.
+ * Normally, the offset passed in (parameter now) is in the range
+ * [-NTP_MAXFREQ, NTP_MAXFREQ]. However, at EVNT_NSET, a much larger
+ * slew is requested if the initial offset is less than the step
+ * threshold, in the range [-step, step] where step is the step
+ * threshold, 128 msec by default. For the remainder of the frequency
+ * training interval, adj_systime is called with 0 offset each second
+ * and slew the large offset at 500 PPM (500 usec/sec).
+ * Returns 1 if okay, 0 if trouble.
+ */
+int
+adj_systime(
+ double now
+ )
+{
+ /* ntp time scale origin as ticks since 1601-01-01 */
+ static const ULONGLONG HNS_JAN_1900 = 94354848000000000ull;
+
+ static double adjtime_carry;
+ double dtemp;
+ u_char isneg;
+ BOOL rc;
+ long TimeAdjustment;
+ SYSTEMTIME st;
+ ULONGLONG this_perf_count;
+ FT_ULL curr_ft;
+ leap_result_t lsi;
+
+ /*
+ * Add the residual from the previous adjustment to the new
+ * adjustment, bound and round.
+ */
+ dtemp = adjtime_carry + sys_residual + now;
+ adjtime_carry = 0.;
+ sys_residual = 0.;
+ if (dtemp < 0) {
+ isneg = TRUE;
+ dtemp = -dtemp;
+ } else {
+ isneg = FALSE;
+ }
+
+ if (dtemp > NTP_MAXFREQ) {
+ adjtime_carry = dtemp - NTP_MAXFREQ;
+ dtemp = NTP_MAXFREQ;
+ }
+
+ if (isneg) {
+ dtemp = -dtemp;
+ adjtime_carry = -adjtime_carry;
+ }
+
+ dtemp = dtemp * 1e6;
+
+ /*
+ * dtemp is in micro seconds. NT uses 100 ns units,
+ * so a unit change in TimeAdjustment corresponds
+ * to slewing 10 ppm on a 100 Hz system. Calculate
+ * the number of 100ns units to add, using OS tick
+ * frequency as per suggestion from Harry Pyle,
+ * and leave the remainder in dtemp
+ */
+ TimeAdjustment = (long)(dtemp / ppm_per_adjust_unit +
+ ((isneg)
+ ? -0.5
+ : 0.5));
+
+ if (os_ignores_small_adjustment) {
+ /*
+ * As the OS ignores adjustments smaller than 16, we need to
+ * leave these small adjustments in sys_residual, causing
+ * the small values to be averaged over time.
+ */
+ if (TimeAdjustment > -16 && TimeAdjustment < 16) {
+ TimeAdjustment = 0;
+ }
+ }
+
+ dtemp -= TimeAdjustment * ppm_per_adjust_unit;
+
+
+ /* If a piping-hot close leap second is pending for the end
+ * of this day, determine the UTC time stamp when the transition
+ * must take place. (Calculated in the current leap era!)
+ */
+ if (leapsec >= LSPROX_ALERT) {
+ if (0 == ls_ft.ull && leapsec_frame(&lsi)) {
+ if (lsi.tai_diff > 0) {
+ /* A leap second insert is scheduled at the end
+ * of the day. Since we have not yet computed the
+ * time stamp, do it now. Signal electric mode
+ * for this insert.
+ */
+ ls_ft.ull = lsi.ttime.Q_s * HECTONANOSECONDS
+ + HNS_JAN_1900;
+ FileTimeToSystemTime(&ls_ft.ft, &st);
+ msyslog(LOG_NOTICE,
+ "Detected positive leap second announcement "
+ "for %04d-%02d-%02d %02d:%02d:%02d UTC",
+ st.wYear, st.wMonth, st.wDay,
+ st.wHour, st.wMinute, st.wSecond);
+ leapsec_electric(TRUE);
+ } else if (lsi.tai_diff < 0) {
+ /* Do not handle negative leap seconds here. If this
+ * happens, let the system step.
+ */
+ leapsec_electric(FALSE);
+ }
+ }
+ } else {
+ /* The leap second announcement is gone. Happens primarily after
+ * the leap transition, but can also be due to a clock step.
+ * Disarm the leap second, but only if there is one scheduled
+ * and not currently in progress!
+ */
+ if (ls_ft.ull != 0 && ls_time_adjustment == 0) {
+ ls_ft.ull = 0;
+ msyslog(LOG_NOTICE, "Leap second announcement disarmed");
+ }
+ }
+
+ /*
+ * If the time stamp for the next leap second has been set
+ * then check if the leap second must be handled
+ */
+ if (ls_ft.ull != 0) {
+ this_perf_count = perf_ctr();
+
+ if (0 == ls_time_adjustment) { /* has not yet been scheduled */
+
+ GetSystemTimeAsFileTime(&curr_ft.ft);
+ if (curr_ft.ull >= ls_ft.ull) {
+ ls_time_adjustment = clockperiod / LS_CORR_INTV_SECS;
+ ls_ref_perf_cnt = this_perf_count;
+ ls_elapsed = 0;
+ msyslog(LOG_NOTICE, "Inserting positive leap second.");
+ }
+ } else { /* leap sec adjustment has been scheduled previously */
+ ls_elapsed = (this_perf_count - ls_ref_perf_cnt)
+ * HECTONANOSECONDS / PerfCtrFreq;
+ }
+
+ if (ls_time_adjustment != 0) { /* leap second adjustment is currently active */
+ if (ls_elapsed > (LS_CORR_INTV - LS_CORR_LIMIT)) {
+ ls_time_adjustment = 0; /* leap second adjustment done */
+ ls_ft.ull = 0;
+ }
+
+ /*
+ * NOTE: While the system time is slewed during the leap second
+ * the interpolation function which is based on the performance
+ * counter does not account for the slew.
+ */
+ TimeAdjustment -= ls_time_adjustment;
+ }
+ }
+
+
+ sys_residual = dtemp / 1e6;
+ DPRINTF(3, ("adj_systime: %.9f -> %.9f residual %.9f",
+ now, 1e-6 * (TimeAdjustment * ppm_per_adjust_unit),
+ sys_residual));
+ if (0. == adjtime_carry)
+ DPRINTF(3, ("\n"));
+ else
+ DPRINTF(3, (" adjtime %.9f\n", adjtime_carry));
+
+ /* only adjust the clock if adjustment changes */
+ TimeAdjustment += wintickadj;
+ if (last_Adj != TimeAdjustment) {
+ last_Adj = TimeAdjustment;
+ DPRINTF(2, ("SetSystemTimeAdjustment(%+ld)\n", TimeAdjustment));
+ rc = SetSystemTimeAdjustment(clockperiod + TimeAdjustment, FALSE);
+ if (!rc)
+ msyslog(LOG_ERR, "Can't adjust time: %m");
+ } else {
+ rc = TRUE;
+ }
+
+ return rc;
+}
+
+
+void
+init_winnt_time(void)
+{
+ static const char settod[] = "settimeofday=\"SetSystemTime\"";
+ char szMsgPath[MAX_PATH+1];
+ HANDLE hToken = INVALID_HANDLE_VALUE;
+ TOKEN_PRIVILEGES tkp;
+ TIMECAPS tc;
+ BOOL noslew;
+ DWORD adjclockperiod;
+ LARGE_INTEGER Freq;
+ FT_ULL initial_hectonanosecs;
+ FT_ULL next_hectonanosecs;
+ double adjppm;
+ double rawadj;
+ char * pch;
+
+ if (winnt_time_initialized)
+ return;
+
+ /*
+ * Make sure the service is initialized
+ * before we do anything else
+ */
+ ntservice_init();
+
+ /* Set up the Console Handler */
+ if (!SetConsoleCtrlHandler(OnConsoleEvent, TRUE)) {
+ msyslog(LOG_ERR, "Can't set console control handler: %m");
+ }
+
+ /* Set the Event-ID message-file name. */
+ if (!GetModuleFileName(NULL, szMsgPath, sizeof(szMsgPath))) {
+ msyslog(LOG_ERR, "GetModuleFileName(PGM_EXE_FILE) failed: %m");
+ exit(1);
+ }
+
+ /* Initialize random file before OpenSSL checks */
+ if (!init_randfile())
+ msyslog(LOG_ERR, "Unable to initialize .rnd file");
+
+#pragma warning(push)
+#pragma warning(disable: 4127) /* conditional expression is constant */
+
+#ifdef DEBUG
+ if (SIZEOF_TIME_T != sizeof(time_t)
+ || SIZEOF_INT != sizeof(int)
+ || SIZEOF_SIGNED_CHAR != sizeof(char)) {
+ msyslog(LOG_ERR, "config.h SIZEOF_* macros wrong, fatal");
+ exit(1);
+ }
+#endif
+
+#pragma warning(pop)
+
+ init_small_adjustment();
+ leapsec_electric(TRUE);
+
+ /*
+ * 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 use return value of AdjustTokenPrivileges. */
+ /* (success does not indicate all privileges were set) */
+ if (GetLastError() != ERROR_SUCCESS) {
+ msyslog(LOG_ERR, "AdjustTokenPrivileges failed: %m");
+ /* later set time call will probably fail */
+ }
+
+ CloseHandle(hToken);
+ hToken = INVALID_HANDLE_VALUE;
+
+ /*
+ * Say how we're setting the time of day
+ */
+ set_sys_var(settod, sizeof(settod), RO);
+
+ /*
+ * ntpd on Windows has always raised its priority, without
+ * requiring -N as on Unix. Since Windows ntpd doesn't share
+ * the history of unix ntpd of once having no -N and therefore
+ * needing to be invoked under nice, there is no reason to
+ * bring it in line with the Unix version in this regard.
+ * Instsrv assumes ntpd is invoked with no arguments, and
+ * upgrading users would be negatively surprised by the
+ * poor timekeeping if they failed to add -N as part of
+ * upgrading were we to correct this platform difference.
+ */
+ if (-1 == setpriority(PRIO_PROCESS, 0, NTP_PRIO))
+ exit(-1);
+
+ /* Determine the existing system time slewing */
+ if (!GetSystemTimeAdjustment(&adjclockperiod, &clockperiod, &noslew)) {
+ msyslog(LOG_ERR, "GetSystemTimeAdjustment failed: %m");
+ exit(-1);
+ }
+
+ /*
+ * If there is no slewing before ntpd, adjclockperiod and clockperiod
+ * will be equal. Any difference is carried into adj_systime's first
+ * pass as the previous adjustment.
+ */
+ last_Adj = adjclockperiod - clockperiod;
+
+ if (last_Adj)
+ msyslog(LOG_INFO,
+ "Clock interrupt period %.3f msec "
+ "(startup slew %.1f usec/period)",
+ clockperiod / 1e4,
+ last_Adj / 10.);
+ else
+ msyslog(LOG_INFO,
+ "Clock interrupt period %.3f msec",
+ clockperiod / 1e4);
+
+ /*
+ * Calculate the time adjustment resulting from incrementing
+ * units per tick by 1 unit for 1 second
+ */
+ ppm_per_adjust_unit = 1e6 / clockperiod;
+
+ pch = getenv("NTPD_TICKADJ_PPM");
+ if (pch != NULL && 1 == sscanf(pch, "%lf", &adjppm)) {
+ rawadj = adjppm / ppm_per_adjust_unit;
+ rawadj += (rawadj < 0)
+ ? -0.5
+ : 0.5;
+ wintickadj = (long)rawadj;
+ msyslog(LOG_INFO,
+ "Using NTPD_TICKADJ_PPM %+g ppm (%+ld)",
+ adjppm, wintickadj);
+ }
+
+ /* get the performance counter ticks per second */
+ if (!QueryPerformanceFrequency(&Freq) || !Freq.QuadPart) {
+ msyslog(LOG_ERR, "QueryPerformanceFrequency failed: %m");
+ exit(-1);
+ }
+
+ NomPerfCtrFreq = PerfCtrFreq = Freq.QuadPart;
+ msyslog(LOG_INFO,
+ "Performance counter frequency %.3f MHz",
+ PerfCtrFreq / 1e6);
+
+ /*
+ * With a precise system clock, our interpolation decision is
+ * a slam dunk.
+ */
+ if (NULL != pGetSystemTimePreciseAsFileTime) {
+ winnt_use_interpolation = FALSE;
+ winnt_time_initialized = TRUE;
+
+ return;
+ }
+
+ /*
+ * Implement any multimedia timer manipulation requested via -M
+ * option. This is rumored to be unneeded on Win8 with the
+ * introduction of the precise (interpolated) system clock.
+ */
+ if (modify_mm_timer) {
+ if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
+ wTimerRes = min(max(tc.wPeriodMin, MM_TIMER_INTV), tc.wPeriodMax);
+ timeBeginPeriod(wTimerRes);
+ atexit(atexit_revert_mm_timer);
+
+ msyslog(LOG_INFO, "MM timer resolution: %u..%u msec, set to %u msec",
+ tc.wPeriodMin, tc.wPeriodMax, wTimerRes );
+ } else {
+ msyslog(LOG_ERR, "Multimedia timer unavailable");
+ }
+ }
+
+ /*
+ * Spin on GetSystemTimeAsFileTime to determine its
+ * granularity. Prior to Windows Vista this is
+ * typically the same as the clock period.
+ */
+ GetSystemTimeAsFileTime(&initial_hectonanosecs.ft);
+ do {
+ GetSystemTimeAsFileTime(&next_hectonanosecs.ft);
+ } while (initial_hectonanosecs.ull == next_hectonanosecs.ull);
+
+ os_clock_precision = next_hectonanosecs.ull -
+ initial_hectonanosecs.ull;
+
+ msyslog(LOG_INFO,
+ "Windows clock precision %.3f msec, min. slew %.3f ppm/s",
+ os_clock_precision / 1e4, ppm_per_adjust_unit);
+
+ winnt_time_initialized = TRUE;
+
+ choose_interp_counter();
+
+ if (getenv("NTPD_USE_SYSTEM_CLOCK") ||
+ (os_clock_precision < 4 * 10000 &&
+ !getenv("NTPD_USE_INTERP_DANGEROUS"))) {
+ msyslog(LOG_INFO, "using Windows clock directly");
+ } else {
+ winnt_use_interpolation = TRUE;
+ get_sys_time_as_filetime = GetInterpTimeAsFileTime;
+ StartClockThread();
+ }
+}
+
+
+void
+atexit_revert_mm_timer(void)
+{
+ timeEndPeriod(wTimerRes);
+ DPRINTF(1, ("MM timer resolution reset\n"));
+}
+
+
+void
+reset_winnt_time(void)
+{
+ SYSTEMTIME st;
+
+ /*
+ * If we're in the 2-second slew right after a leap second,
+ * we don't want to continue that extreme slew, in that case
+ * disable our slewing and return clock discipline to the
+ * kernel. Similarly if we are not yet synchronized,
+ * our current slew may not be a good ongoing trim.
+ * Otherwise, our leave in place the last SetSystemTimeAdjustment
+ * as an ongoing frequency correction, better than nothing.
+ * TODO:
+ * Verify this will not call SetSystemTimeAdjustment if
+ * ntpd is running in ntpdate mode.
+ */
+ if (sys_leap == LEAP_NOTINSYNC || ls_time_adjustment != 0)
+ SetSystemTimeAdjustment(0, TRUE);
+
+ /*
+ * Read the current system time, and write it back to
+ * force CMOS update, only if we are exiting because
+ * the computer is shutting down and we are already
+ * synchronized.
+ */
+ if (ntservice_systemisshuttingdown() && sys_leap != LEAP_NOTINSYNC) {
+ GetSystemTime(&st);
+ SetSystemTime(&st);
+ NLOG(NLOG_SYSEVENT | NLOG_CLOCKINFO)
+ msyslog(LOG_NOTICE, "system is shutting down, CMOS time reset.");
+ }
+}
+
+
+/*
+ * GetSystemTimeAsFileTime() interface clone is used by getclock() in ntpd.
+ */
+
+void WINAPI
+GetInterpTimeAsFileTime(
+ LPFILETIME pft
+ )
+{
+ static ULONGLONG last_interp_time;
+ FT_ULL now_time;
+ FT_ULL now_count;
+ ULONGLONG clock_backward;
+
+ /*
+ * Mark a mark ASAP. The latency to here should be reasonably
+ * deterministic
+ */
+
+ now_count.ull = perf_ctr();
+ now_time.ull = interp_time(now_count.ull, TRUE);
+
+ if (last_interp_time <= now_time.ull) {
+ last_interp_time = now_time.ull;
+ } else {
+ clock_backward = last_interp_time - now_time.ull;
+ if (clock_backward > clock_backward_max) {
+ clock_backward_max = clock_backward;
+ clock_backward_count++;
+ }
+ now_time.ull = last_interp_time;
+ }
+ *pft = now_time.ft;
+
+ return;
+}
+
+
+/*
+ * TimerApcFunction is invoked on the high-priority clock
+ * thread to capture a new baseline system time and
+ * performance counter correlation every 43 msec (64Hz
+ * OS clock precision).
+ */
+static void CALLBACK
+TimerApcFunction(
+ LPVOID lpArgToCompletionRoutine,
+ DWORD dwTimerLowValue,
+ DWORD dwTimerHighValue
+ )
+{
+ static BOOL ctr_freq_timer_started = FALSE;
+ static ULONGLONG prev_count;
+ ULONGLONG now_time;
+ FT_ULL now_count;
+
+ /* Grab the counter first of all */
+ now_count.ull = perf_ctr();
+
+ now_time = (((ULONGLONG)dwTimerHighValue << 32) |
+ dwTimerLowValue);
+
+ /*
+ * Save this correlation in the history.
+ */
+ add_counter_time_pair(now_count.ull, now_time);
+
+ /*
+ * Once we're synchronized start the counter frequency
+ * tuning timer.
+ */
+ if (INVALID_HANDLE_VALUE == ctr_freq_timer &&
+ LEAP_NOTINSYNC != sys_leap)
+ start_ctr_freq_timer(now_time);
+}
+
+
+unsigned WINAPI
+ClockThread(
+ void *arg
+ )
+{
+ LARGE_INTEGER DueTime;
+ HANDLE timer;
+ double HZ;
+ double TimerHz;
+ DWORD timer_period_msec;
+ DWORD res;
+ char *ntpd_int_int_text;
+
+ UNUSED_ARG(arg);
+
+ timer = CreateWaitableTimer(NULL, FALSE, NULL);
+
+ ntpd_int_int_text = getenv("NTPD_INT_INT");
+
+ HZ = (double)HECTONANOSECONDS / clockperiod;
+
+ if (HZ > 63 && HZ < 65) {
+ timer_period_msec = 43;
+ } else if (HZ > 98 && HZ < 102) {
+ timer_period_msec = 27;
+ if (NULL == ntpd_int_int_text)
+ msyslog(LOG_WARNING,
+ "%.3f Hz system clock may benefit from "
+ "custom NTPD_INT_INT env var timer interval "
+ "override between approx. 20 and 50 msecs.",
+ HZ);
+ } else {
+ timer_period_msec = (DWORD)(0.5 + (2.752 * clockperiod / 10000));
+ if (NULL == ntpd_int_int_text)
+ msyslog(LOG_WARNING,
+ "unfamiliar %.3f Hz system clock may benefit "
+ "from custom NTPD_INT_INT env var timer "
+ "interval override between approx. 20 and 50 "
+ "msecs.",
+ HZ);
+ }
+
+ if (ntpd_int_int_text != NULL) {
+ timer_period_msec = atoi(ntpd_int_int_text);
+ timer_period_msec = max(9, timer_period_msec);
+ msyslog(LOG_NOTICE,
+ "using NTPD_INT_INT env var override %u",
+ timer_period_msec);
+ }
+
+ TimerHz = 1e3 / timer_period_msec;
+ msyslog(LOG_NOTICE, "HZ %.3f using %u msec timer %.3f Hz %d deep",
+ HZ,
+ timer_period_msec,
+ TimerHz,
+ BASELINES_USED);
+
+ /* negative DueTime means relative to now */
+ DueTime.QuadPart = -(int)timer_period_msec;
+
+ SetWaitableTimer(
+ timer,
+ &DueTime, /* first fire */
+ timer_period_msec, /* period thereafter */
+ TimerApcFunction, /* callback routine */
+ &timer, /* context for callback */
+ FALSE); /* do not interfere with power saving */
+
+ /*
+ * The clock thread spends the rest of its life in the TimerApcFunction
+ * and ctr_freq_timer_fired timer APC callbacks, which can only occur
+ * while this thread is in an alertable wait. Note the Ex on
+ * WaitForSingleObjectEx and TRUE for fAlertable. The wait will return
+ * after each APC callback in which case we simply wait again. We will
+ * break out of the loop when StopClockThread signals our exit event.
+ */
+ do res = WaitForSingleObjectEx(
+ TimerThreadExitRequest,
+ INFINITE,
+ TRUE);
+ while (WAIT_OBJECT_0 != res);
+
+ CloseHandle(timer);
+
+ if (ctr_freq_timer != INVALID_HANDLE_VALUE) {
+ CloseHandle(ctr_freq_timer);
+ ctr_freq_timer = INVALID_HANDLE_VALUE;
+ }
+
+ return 0;
+}
+
+
+static void
+StartClockThread(void)
+{
+ static BOOL done_once = FALSE;
+ FT_ULL StartTime;
+
+ /* init variables with the time now */
+ GetSystemTimeAsFileTime(&StartTime.ft);
+ baseline_times[0] = StartTime.ull;
+ baseline_counts[0] = perf_ctr();
+
+ /* init sync objects */
+ TimerThreadExitRequest = CreateEvent(NULL, FALSE, FALSE, NULL);
+
+ clock_thread =
+ (HANDLE)_beginthreadex(
+ NULL,
+ 0,
+ ClockThread,
+ NULL,
+ CREATE_SUSPENDED,
+ &clock_thread_id);
+
+ if (clock_thread != NULL) {
+ /* remember the thread priority is only within the process class */
+ if (!SetThreadPriority(clock_thread, THREAD_PRIORITY_TIME_CRITICAL)) {
+ DPRINTF(1, ("Error setting thread priority\n"));
+ }
+
+ lock_thread_to_processor(clock_thread);
+ ResumeThread(clock_thread);
+
+ if (FALSE == done_once) {
+ done_once = TRUE;
+ lock_thread_to_processor(GetCurrentThread());
+ atexit( StopClockThread );
+ }
+
+ /*
+ * Give the clock thread time to fill its counter/time
+ * sample buffer. This will underfill the buffer a
+ * bit for sample periods over 43 msec.
+ */
+ Sleep(BASELINES_USED * 43);
+ }
+}
+
+
+void
+StopClockThread(void)
+{
+ /*
+ * if the clock thread exit()s this routine
+ * will be called on the clock thread and
+ * we need not (and can't) use the normal
+ * TimerThreadExitRequest event.
+ */
+ if (GetCurrentThreadId() != clock_thread_id) {
+
+ if (!SetEvent(TimerThreadExitRequest) ||
+ WaitForSingleObject(clock_thread, 2 * 1000) !=
+ WAIT_OBJECT_0) {
+ msyslog(LOG_ERR, "Failed to stop clock thread.");
+ }
+ }
+ CloseHandle(TimerThreadExitRequest);
+ TimerThreadExitRequest = NULL;
+ CloseHandle(clock_thread);
+ clock_thread = NULL;
+}
+
+
+void
+lock_thread_to_processor(HANDLE thread)
+{
+ static DWORD_PTR ProcessAffinityMask;
+ static DWORD_PTR ThreadAffinityMask;
+ DWORD_PTR SystemAffinityMask;
+ char *cputext;
+ unsigned int cpu;
+
+ if ( ! winnt_time_initialized) {
+ DPRINTF(1, ("init_winnt_time() must be called before "
+ "lock_thread_to_processor(), exiting\n"));
+ exit(-1);
+ }
+
+ if (!winnt_use_interpolation)
+ return;
+
+ if (-1 == lock_interp_threads) {
+ DPRINTF(1, ("choose_interp_counter() is not called "
+ "before lock_thread_to_processor()\n"));
+ exit(-1);
+ } else if (!lock_interp_threads)
+ return;
+
+ /*
+ * Calculate the ThreadAffinityMask we'll use once on the
+ * first invocation.
+ */
+ if (!ProcessAffinityMask) {
+
+ /*
+ * Choose which processor to nail the main and clock threads to.
+ * If we have more than one, we simply choose the 2nd.
+ * Randomly choosing from 2 to n would be better, but in
+ * either case with clock and network interrupts more likely
+ * to be serviced by the first procecssor, let's stay away
+ * from it. QueryPerformanceCounter is not necessarily
+ * consistent across CPUs, hence the need to nail the two
+ * threads involved in QPC-based interpolation to the same
+ * CPU.
+ */
+
+ GetProcessAffinityMask(
+ GetCurrentProcess(),
+ &ProcessAffinityMask,
+ &SystemAffinityMask);
+
+ /*
+ * respect NTPD_CPU environment variable if present
+ * for testing. NTPD_CPU=0 means use all CPUs, 1-64
+ * means lock threads involved in interpolation to
+ * that CPU. Default to 2nd if more than 1.
+ */
+
+ cpu = 2;
+ cputext = getenv("NTPD_CPU");
+ if (cputext) {
+ cpu = (unsigned int) atoi(cputext);
+ cpu = min((8 * sizeof(DWORD_PTR)), cpu);
+ }
+
+ /*
+ * Clear all bits except the 2nd. If we have only one proc
+ * that leaves ThreadAffinityMask zeroed and we won't bother
+ * with SetThreadAffinityMask.
+ */
+
+ ThreadAffinityMask = (0 == cpu) ? 0 : (1 << (cpu - 1));
+
+ if (ThreadAffinityMask &&
+ !(ThreadAffinityMask & ProcessAffinityMask))
+
+ DPRINTF(1, ("Selected CPU %u (mask %x) is outside "
+ "process mask %x, using all CPUs.\n",
+ cpu, ThreadAffinityMask,
+ ProcessAffinityMask));
+ else
+ DPRINTF(1, ("Wiring to processor %u (0 means all) "
+ "affinity mask %x\n",
+ cpu, ThreadAffinityMask));
+
+ ThreadAffinityMask &= ProcessAffinityMask;
+ }
+
+ if (ThreadAffinityMask &&
+ !SetThreadAffinityMask(thread, ThreadAffinityMask))
+ msyslog(LOG_ERR,
+ "Unable to wire thread to mask %x: %m",
+ ThreadAffinityMask);
+}
+
+
+#ifdef HAVE_PPSAPI
+static inline void ntp_timestamp_from_counter(l_fp *, ULONGLONG,
+ ULONGLONG);
+
+/*
+ * helper routine for serial PPS which returns QueryPerformanceCounter
+ * timestamp and needs to interpolate it to an NTP timestamp.
+ */
+void
+pps_ntp_timestamp_from_counter(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp
+ )
+{
+ /*
+ * convert between equivalent l_fp and PPSAPI ntp_fp_t
+ */
+ ntp_timestamp_from_counter(
+ (l_fp *)result,
+ Timestamp,
+ Counterstamp);
+}
+
+
+static inline
+void
+ntp_timestamp_from_counter(
+ l_fp *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp
+ )
+{
+ FT_ULL Now;
+ FT_ULL Ctr;
+ LONGLONG CtrDelta;
+ double seconds;
+ ULONGLONG InterpTimestamp;
+
+ if (winnt_use_interpolation) {
+ if (0 == Counterstamp) {
+ DPRINTF(1, ("ntp_timestamp_from_counter rejecting 0 counter.\n"));
+ ZERO(*result);
+ return;
+ }
+
+ InterpTimestamp = interp_time(Counterstamp + QPC_offset, FALSE);
+ } else { /* ! winnt_use_interpolation */
+ if (NULL != pGetSystemTimePreciseAsFileTime &&
+ 0 != Counterstamp) {
+ QueryPerformanceCounter(&Ctr.li);
+ (*pGetSystemTimePreciseAsFileTime)(&Now.ft);
+ CtrDelta = Ctr.ull - Counterstamp;
+ seconds = (double)CtrDelta / PerfCtrFreq;
+ InterpTimestamp = Now.ull -
+ (ULONGLONG)(seconds * HECTONANOSECONDS);
+ } else {
+ /* have to simply use the driver's system time timestamp */
+ InterpTimestamp = Timestamp;
+ GetSystemTimeAsFileTime(&Now.ft);
+ }
+ }
+
+ /* convert from 100ns units to NTP fixed point format */
+
+ InterpTimestamp -= FILETIME_1970;
+ result->l_ui = JAN_1970 + (u_int32)(InterpTimestamp / HECTONANOSECONDS);
+ result->l_uf = (u_int32)((InterpTimestamp % HECTONANOSECONDS) *
+ (ULONGLONG)FRAC / HECTONANOSECONDS);
+}
+#endif /* HAVE_PPSAPI */
+
+
+void
+win_time_stepped(void)
+{
+ /*
+ * called back by ntp_set_tod after the system
+ * time has been stepped (set).
+ *
+ * We normally prevent the reported time from going backwards
+ * but need to allow it in this case.
+ */
+ if (FALSE == winnt_use_interpolation)
+ return;
+
+
+ /*
+ * Restart the clock thread to get a new baseline
+ * time/counter correlation.
+ */
+ StopClockThread();
+
+ /*
+ * newest_baseline_gen is a generation counter
+ * incremented once each time newest_baseline
+ * is reset.
+ */
+ newest_baseline_gen++;
+
+ clock_backward_max = CLOCK_BACK_THRESHOLD;
+ clock_backward_count = 0;
+ newest_baseline = 0;
+ ZERO(baseline_counts);
+ ZERO(baseline_times);
+
+ StartClockThread();
+}
+
+
+/*
+ * log2ull - log base 2 of a unsigned 64-bit number
+ */
+int
+log2ull(
+ ULONGLONG n
+ )
+{
+ const ULONGLONG one = 1;
+ int log = 0;
+
+ if (n >= one<<32) { n >>= 32; log += 32; }
+ if (n >= one<<16) { n >>= 16; log += 16; }
+ if (n >= one<< 8) { n >>= 8; log += 8; }
+ if (n >= one<< 4) { n >>= 4; log += 4; }
+ if (n >= one<< 2) { n >>= 2; log += 2; }
+ if (n >= one<< 1) { log += 1; }
+
+ return (n) ? log : (-1);
+}
+
+
+/*
+ * ctr_freq_timer_fired is called once a few seconds before
+ * tune_ctr_period seconds have elapsed, to reset the timer
+ * and hopefully minimize error due to the system using the
+ * nominal performance counter frequency to set the timer
+ * internally, which is typically dozens of PPM from the
+ * actual performance counter rate. A few seconds later
+ * it is called again to observe the counter and estimate the
+ * counter frequency.
+ */
+static void CALLBACK
+ctr_freq_timer_fired(
+ LPVOID arg,
+ DWORD dwTimeLow,
+ DWORD dwTimeHigh
+ )
+{
+ static FT_ULL begin_time = {0};
+ static FT_ULL begin_count = {0};
+ static ULONGLONG next_period_time = 0;
+ static ULONGLONG report_systemtime = 0;
+ const ULONGLONG five_minutes = 5ui64 * 60 * HECTONANOSECONDS;
+ FT_ULL now_time;
+ FT_ULL now_count;
+
+ if (!begin_time.ull) {
+ begin_count.ull = perf_ctr();
+ begin_time.ft.dwLowDateTime = dwTimeLow;
+ begin_time.ft.dwHighDateTime = dwTimeHigh;
+
+ /*
+ * adapt perf ctr observation interval to the
+ * counter frequency
+ */
+ tune_ctr_period = 22680 / log2ull(NomPerfCtrFreq);
+
+ /*
+ * reset timer 2s before period ends to minimize
+ * error from OS timer routines using nominal
+ * performance frequency internally.
+ */
+ tune_ctr_freq_max_interval = tune_ctr_period - 2;
+
+ next_period_time = begin_time.ull +
+ (ULONGLONG)tune_ctr_period * HECTONANOSECONDS;
+
+ ROUND_TO_NEXT_SEC_BOTTOM(next_period_time);
+
+ reset_ctr_freq_timer(next_period_time, begin_time.ull);
+
+ return;
+ }
+
+ now_time.ft.dwLowDateTime = dwTimeLow;
+ now_time.ft.dwHighDateTime = dwTimeHigh;
+
+ if (now_time.ull >= next_period_time) {
+ now_count.ull = perf_ctr();
+ tune_ctr_freq(
+ now_count.ull - begin_count.ull,
+ now_time.ull - begin_time.ull);
+ next_period_time += (ULONGLONG)tune_ctr_period * HECTONANOSECONDS;
+ begin_count.ull = now_count.ull;
+ begin_time.ull = now_time.ull;
+ }
+
+ /*
+ * Log clock backward events no more often than 5 minutes.
+ */
+ if (!report_systemtime) {
+ report_systemtime = now_time.ull + five_minutes;
+ } else if (report_systemtime <= now_time.ull) {
+ report_systemtime += five_minutes;
+ if (clock_backward_count) {
+ msyslog(LOG_WARNING,
+ "clock would have gone backward %d times, "
+ "max %.1f usec",
+ clock_backward_count,
+ clock_backward_max / 10.);
+
+ clock_backward_max = CLOCK_BACK_THRESHOLD;
+ clock_backward_count = 0;
+ }
+ }
+ reset_ctr_freq_timer(next_period_time, now_time.ull);
+}
+
+
+void
+reset_ctr_freq_timer_abs(
+ ULONGLONG when
+ )
+{
+ FT_ULL fire_time;
+
+ fire_time.ull = when;
+ SetWaitableTimer(
+ ctr_freq_timer,
+ &fire_time.li, /* first fire */
+ 0, /* not periodic */
+ ctr_freq_timer_fired, /* callback routine */
+ NULL, /* context for callback */
+ FALSE); /* do not interfere with power saving */
+}
+
+
+void
+reset_ctr_freq_timer(
+ ULONGLONG when,
+ ULONGLONG now
+ )
+{
+ if (when - now >
+ (tune_ctr_freq_max_interval * HECTONANOSECONDS + HECTONANOSECONDS))
+ when = now + tune_ctr_freq_max_interval * HECTONANOSECONDS;
+
+ reset_ctr_freq_timer_abs(when);
+}
+
+
+void
+start_ctr_freq_timer(
+ ULONGLONG now_time
+ )
+{
+ ULONGLONG when;
+
+ ctr_freq_timer = CreateWaitableTimer(NULL, FALSE, NULL);
+ when = now_time;
+ ROUND_TO_NEXT_SEC_BOTTOM(when);
+
+ reset_ctr_freq_timer_abs(when);
+}
+
+
+/*
+ * tune_ctr_freq is called once per tune_ctr_period seconds
+ * with a counter difference and time difference.
+ */
+void
+tune_ctr_freq(
+ LONGLONG ctr_delta,
+ LONGLONG time_delta
+ )
+{
+ static unsigned count = 0;
+ static unsigned dispcount = 0;
+ static unsigned report_at_count = 0;
+ static int disbelieved = 0;
+ static int i = 0;
+ static double nom_freq = 0;
+ static LONGLONG diffs[TUNE_CTR_DEPTH] = {0};
+ static LONGLONG sum = 0;
+ char ctr_freq_eq[64];
+ LONGLONG delta;
+ LONGLONG deltadiff;
+ ULONGLONG ObsPerfCtrFreq;
+ double freq;
+ double this_freq;
+ BOOL isneg;
+
+ /* one-time initialization */
+ if (!report_at_count) {
+ report_at_count = 24 * 60 * 60 / tune_ctr_period;
+ nom_freq = NomPerfCtrFreq / 1e6;
+ }
+
+ /* delta is the per-second observed frequency this time */
+ delta = (LONGLONG)((double)ctr_delta * HECTONANOSECONDS /
+ time_delta);
+
+ /* disbelieve any delta more than +/- 976 PPM from nominal */
+ deltadiff = delta - NomPerfCtrFreq;
+ if (0 > deltadiff) {
+ isneg = TRUE;
+ deltadiff = -deltadiff;
+ } else {
+ isneg = FALSE;
+ }
+
+ if ((ULONGLONG)deltadiff > (NomPerfCtrFreq / 1024)) {
+ disbelieved++;
+ dispcount++;
+#ifdef DEBUG
+ msyslog(LOG_DEBUG, "ctr delta %s%lld exceeds limit %llu",
+ (isneg) ? "-" : "",
+ deltadiff,
+ NomPerfCtrFreq / 1024);
+#endif
+ } else {
+
+ /*
+ * collect average over TUNE_CTR_DEPTH samples
+ * for our PerfCtrFreq trimming.
+ */
+
+ if (isneg)
+ deltadiff = -deltadiff;
+ sum -= diffs[i];
+ diffs[i] = deltadiff;
+ sum += deltadiff;
+ i = (i + 1) % COUNTOF(diffs);
+ count++;
+ dispcount++;
+ }
+
+ this_freq = delta / 1e6;
+
+ ObsPerfCtrFreq = NomPerfCtrFreq + (sum / COUNTOF(diffs));
+
+#if 1 /* #if 0 to disable changing freq used */
+ /* get rid of ObsPerfCtrFreq when removing the #ifdef */
+ PerfCtrFreq = ObsPerfCtrFreq;
+#endif
+ freq = PerfCtrFreq / 1e6;
+
+ /*
+ * make the performance counter's frequency error from its
+ * nominal rate, expressed in PPM, available via ntpq as
+ * system variable "ctr_frequency". This is consistent with
+ * "frequency" which is the system clock drift in PPM.
+ */
+ snprintf(ctr_freq_eq, sizeof(ctr_freq_eq), "ctr_frequency=%.2f",
+ 1e6 * (freq - nom_freq) / nom_freq);
+ set_sys_var(ctr_freq_eq, strlen(ctr_freq_eq) + 1, RO | DEF);
+
+ /*
+ * report observed ctr freq each time the estimate used during
+ * startup moves toward the observed freq from the nominal.
+ */
+
+ if (count > COUNTOF(diffs) &&
+ /* (count % COUNTOF(diffs)) && */ /* enables reporting each */
+ dispcount < report_at_count) /* TUNE_CTR_DEPTH samples */
+ return;
+
+ NLOG(NLOG_CLOCKINFO)
+ if (count <= COUNTOF(diffs))
+ /* moving to observed freq. from nominal (startup) */
+ msyslog(LOG_INFO,
+ (freq > 100)
+ ? "ctr %.3f MHz %+6.2f PPM using %.3f MHz %+6.2f PPM"
+ : "ctr %.6f MHz %+6.2f PPM using %.6f MHz %+6.2f PPM",
+ this_freq,
+ 1e6 * (this_freq - nom_freq) / nom_freq,
+ freq,
+ 1e6 * (freq - nom_freq) / nom_freq);
+ else
+ /* steady state */
+ msyslog(LOG_INFO,
+ (freq > 100)
+ ? "ctr %.3f MHz %+.2f PPM"
+ : "ctr %.6f MHz %+.2f PPM",
+ freq,
+ 1e6 * (freq - nom_freq) / nom_freq);
+
+ if (disbelieved) {
+ msyslog(LOG_ERR,
+ "%d ctr samples exceed +/- 976 PPM range gate",
+ disbelieved);
+ disbelieved = 0;
+ }
+
+ dispcount = 0;
+}
+
+
+/*
+ * add_counter_time_pair is called by the
+ * high priority clock thread with each new
+ * baseline counter/time correlation.
+ */
+void
+add_counter_time_pair(
+ ULONGLONG ctr,
+ LONGLONG time
+ )
+{
+ int i;
+
+ i = (newest_baseline + 1) % BASELINES_TOT;
+
+ baseline_counts[i] = ctr;
+ baseline_times[i] = time;
+
+ newest_baseline = i;
+}
+
+
+/*
+ * interp_time estimates NT time in 100ns units
+ * based on a performance counter value given.
+ * This must tolerate recent historical counters
+ * as well as current. When current is FALSE
+ * we can't assume ctr is the latest/highest
+ * seen.
+ */
+ULONGLONG
+interp_time(
+ ULONGLONG ctr,
+ BOOL current
+ )
+{
+ static __declspec(thread) int last_newest = -1;
+ static __declspec(thread) int last_newest_gen;
+ static __declspec(thread) int best_index;
+ ULONGLONG this_ctr;
+ LONGLONG this_time;
+ LONGLONG latest_time;
+ LONGLONG ctr_diff;
+ int i;
+ int i_gen;
+ int c;
+
+ /*
+ * Use the system time (roughly synchronised to the tick, and
+ * extrapolated using the system performance counter.
+ *
+ * Cache the results per thread and only repeat the
+ * calculation when new data has arrived.
+ */
+ i = newest_baseline;
+ i_gen = newest_baseline_gen;
+
+ if (last_newest == i && last_newest_gen == i_gen) {
+ this_time = baseline_times[best_index];
+ ctr_diff = ctr - baseline_counts[best_index];
+ this_time += (LONGLONG)PERF2HNS((double)ctr_diff);
+
+ return this_time;
+ }
+
+ last_newest = i;
+ last_newest_gen = i_gen;
+
+ latest_time = 0;
+
+ /*
+ * Run through the history calculating the interpolated
+ * time based on each counter/time correlation in turn,
+ * and believe the latest one. This is akin to the NTP
+ * protocol minimum delay clock filter. Errors due to
+ * counter/time correlations with stale time are all
+ * negative.
+ */
+ for (c = 0; c < BASELINES_USED; c++) {
+ if (baseline_times[i]) {
+ this_time = baseline_times[i];
+ this_ctr = baseline_counts[i];
+
+ ctr_diff = ctr - this_ctr;
+
+ if (current && ctr_diff < 0) {
+ /*
+ * The performance counter apparently went
+ * backwards without rolling over. It might
+ * be nice to complain but we don't want
+ * to do it repeatedly.
+ */
+ ctr_diff = 0;
+ }
+
+ this_time += (LONGLONG)PERF2HNS((double)ctr_diff);
+
+ if (this_time > latest_time) {
+ latest_time = this_time;
+ best_index = i;
+ }
+ }
+ i = i ? (i - 1) : (BASELINES_TOT - 1);
+ }
+
+ return latest_time;
+}
diff --git a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c
new file mode 100644
index 000000000000..046d6cda1e2b
--- /dev/null
+++ b/ports/winnt/ntpd/ntp_iocompletionport.c
@@ -0,0 +1,1639 @@
+/*
+-----------------------------------------------------------------------
+This is the IO completion port handling for async/overlapped IO on
+Windows >= Win2000.
+
+Some notes on the implementation:
+
++ Only one thread is used to serve the IO completion port, for several
+ reasons:
+
+ * First, there seems to be (have been?) trouble that locked up NTPD
+ when more than one thread was used for IOCPL.
+
+ * Second, for the sake of the time stamp interpolation the threads
+ must run on the same CPU as the time interpolation thread. This
+ makes using more than one thread useless, as they would compete for
+ the same core and create contention.
+
++ Some IO operations need a possibly lengthy postprocessing. Emulating
+ the UN*X line discipline is currently the only but prominent example.
+ To avoid the processing in the time-critical IOCPL thread, longer
+ processing is offloaded the worker thread pool.
+
++ A fact that seems not as well-known as it should be is that all
+ ressources passed to an overlapped IO operation must be considered
+ owned by the OS until the result has been fetched/dequeued. This
+ includes all overlapped structures and buffers involved, so cleaning
+ up on shutdown must be carefully constructed. (This includes closing
+ all the IO handles and waiting for the results to be dequeued.
+ 'CancleIo()' cannot be used since it's broken beyond repair.)
+
+ If this is not possible, then all ressources should be dropped into
+ oblivion -- otherwise "bad things (tm)" are bound to happen.
+
+ Using a private heap that is silently dropped but not deleted is a
+ good way to avoid cluttering memory stats with IO context related
+ objects. Leak tracing becomes more interesting, though.
+
+
+The current implementation is based on the work of Danny Mayer who improved
+the original implementation and Dave Hart who improved on the serial I/O
+routines. The true roots of this file seem to be shrouded by the mist of time...
+
+
+This version still provides the 'user space PPS' emulation
+feature.
+
+Juergen Perlinger (perlinger@ntp.org) Feb 2012
+
+-----------------------------------------------------------------------
+*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_IO_COMPLETION_PORT
+
+#include <stddef.h>
+#include <stdio.h>
+#include <process.h>
+#include <syslog.h>
+
+#include "ntpd.h"
+#include "ntp_machine.h"
+#include "ntp_iocompletionport.h"
+#include "ntp_request.h"
+#include "ntp_assert.h"
+#include "ntp_io.h"
+#include "ntp_lists.h"
+
+
+#define CONTAINEROF(p, type, member) \
+ ((type *)((char *)(p) - offsetof(type, member)))
+
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable: 201) /* nonstd extension nameless union */
+#endif
+
+/*
+ * ---------------------------------------------------------------------
+ * storage type for PPS data (DCD change counts & times)
+ * ---------------------------------------------------------------------
+ */
+struct PpsData {
+ u_long cc_assert;
+ u_long cc_clear;
+ l_fp ts_assert;
+ l_fp ts_clear;
+};
+typedef struct PpsData PPSData_t;
+
+struct PpsDataEx {
+ u_long cov_count;
+ PPSData_t data;
+};
+typedef volatile struct PpsDataEx PPSDataEx_t;
+
+/*
+ * ---------------------------------------------------------------------
+ * device context; uses reference counting to avoid nasty surprises.
+ * Currently this stores only the PPS time stamps, but it could be
+ * easily extended.
+ * ---------------------------------------------------------------------
+ */
+#define PPS_QUEUE_LEN 8u /* must be power of two! */
+#define PPS_QUEUE_MSK (PPS_QUEUE_LEN-1) /* mask for easy MOD ops */
+
+struct DeviceContext {
+ volatile long ref_count;
+ volatile u_long cov_count;
+ PPSData_t pps_data;
+ PPSDataEx_t pps_buff[PPS_QUEUE_LEN];
+};
+
+typedef struct DeviceContext DevCtx_t;
+
+/*
+ * ---------------------------------------------------------------------
+ * I/O context structure
+ *
+ * This is an extended overlapped structure. Some fields are only used
+ * for serial I/O, others are used for all operations. The serial I/O is
+ * more interesting since the same context object is used for waiting,
+ * actual I/O and possibly offload processing in a worker thread until
+ * a complete operation cycle is done.
+ *
+ * In this case the I/O context is used to gather all the bits that are
+ * finally needed for the processing of the buffer.
+ * ---------------------------------------------------------------------
+ */
+//struct IoCtx;
+typedef struct IoCtx IoCtx_t;
+typedef struct refclockio RIO_t;
+
+typedef void (*IoCompleteFunc)(ULONG_PTR, IoCtx_t *);
+
+struct IoCtx {
+ OVERLAPPED ol; /* 'kernel' part of the context */
+ union {
+ recvbuf_t * recv_buf; /* incoming -> buffer structure */
+ void * trans_buf; /* outgoing -> char array */
+ PPSData_t * pps_buf; /* for reading PPS seq/stamps */
+ HANDLE ppswake; /* pps wakeup for attach */
+ };
+ IoCompleteFunc onIoDone; /* HL callback to execute */
+ RIO_t * rio; /* RIO backlink (for offload) */
+ DevCtx_t * devCtx;
+ l_fp DCDSTime; /* PPS-hack: time of DCD ON */
+ l_fp FlagTime; /* timestamp of flag/event char */
+ l_fp RecvTime; /* timestamp of callback */
+ DWORD errCode; /* error code of last I/O */
+ DWORD byteCount; /* byte count " */
+ DWORD com_events; /* buffer for COM events */
+ unsigned int flRawMem : 1; /* buffer is raw memory -> free */
+ unsigned int flTsDCDS : 1; /* DCDSTime valid? */
+ unsigned int flTsFlag : 1; /* FlagTime valid? */
+};
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+/*
+ * local function definitions
+ */
+static void ntpd_addremove_semaphore(HANDLE, int);
+static inline void set_serial_recv_time (recvbuf_t *, IoCtx_t *);
+
+/* Initiate/Request async IO operations */
+static BOOL QueueSerialWait (RIO_t *, recvbuf_t *, IoCtx_t *);
+static BOOL QueueSerialRead (RIO_t *, recvbuf_t *, IoCtx_t *);
+static BOOL QueueRawSerialRead(RIO_t *, recvbuf_t *, IoCtx_t *);
+static BOOL QueueSocketRecv (SOCKET , recvbuf_t *, IoCtx_t *);
+
+
+/* High-level IO callback functions */
+static void OnSocketRecv (ULONG_PTR, IoCtx_t *);
+static void OnSerialWaitComplete (ULONG_PTR, IoCtx_t *);
+static void OnSerialReadComplete (ULONG_PTR, IoCtx_t *);
+static void OnRawSerialReadComplete(ULONG_PTR, IoCtx_t *);
+static void OnSerialWriteComplete (ULONG_PTR, IoCtx_t *);
+
+/* worker pool offload functions */
+static DWORD WINAPI OnSerialReadWorker(void * ctx);
+
+
+/* keep a list to traverse to free memory on debug builds */
+#ifdef DEBUG
+static void free_io_completion_port_mem(void);
+#endif
+
+
+ HANDLE WaitableExitEventHandle;
+ HANDLE WaitableIoEventHandle;
+static HANDLE hIoCompletionPort;
+
+DWORD ActiveWaitHandles;
+HANDLE WaitHandles[16];
+
+/*
+ * -------------------------------------------------------------------
+ * We make a pool of our own for IO context objects -- the are owned by
+ * the system until a completion result is pulled from the queue, and
+ * they seriously go into the way of memory tracking until we can safely
+ * cancel an IO request.
+ * -------------------------------------------------------------------
+ */
+static HANDLE hHeapHandle;
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Create a new heap for IO context objects
+ */
+static void
+IoCtxPoolInit(
+ size_t initObjs
+ )
+{
+ hHeapHandle = HeapCreate(0, initObjs * sizeof(IoCtx_t), 0);
+ if (hHeapHandle == NULL) {
+ msyslog(LOG_ERR, "Can't initialize Heap: %m");
+ exit(1);
+ }
+}
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ *
+ * Delete the IO context heap
+ *
+ * Since we do not know what callbacks are pending, we just drop the
+ * pool into oblivion. New allocs and frees will fail from this moment,
+ * but we simply don't care. At least the normal heap dump stats will
+ * show no leaks from IO context blocks. On the downside, we have to
+ * track them ourselves if something goes wrong.
+ */
+static void
+IoCtxPoolDone(void)
+{
+ hHeapHandle = NULL;
+}
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Alloc & Free on local heap
+ *
+ * When the heap handle is NULL, these both will fail; Alloc with a NULL
+ * return and Free silently.
+ */
+static void * __fastcall
+LocalPoolAlloc(
+ size_t size,
+ const char * desc
+)
+{
+ void * ptr;
+
+ /* Windows heaps can't grok zero byte allocation.
+ * We just get one byte.
+ */
+ if (size == 0)
+ size = 1;
+ if (hHeapHandle != NULL)
+ ptr = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, size);
+ else
+ ptr = NULL;
+ DPRINTF(3, ("Allocate '%s', heap=%p, ptr=%p\n",
+ desc, hHeapHandle, ptr));
+
+ return ptr;
+}
+
+static void __fastcall
+LocalPoolFree(
+ void * ptr,
+ const char * desc
+ )
+{
+ DPRINTF(3, ("Free '%s', heap=%p, ptr=%p\n",
+ desc, hHeapHandle, ptr));
+ if (ptr != NULL && hHeapHandle != NULL)
+ HeapFree(hHeapHandle, 0, ptr);
+}
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Alloc & Free of Device context
+ *
+ * When the heap handle is NULL, these both will fail; Alloc with a NULL
+ * return and Free silently.
+ */
+static DevCtx_t * __fastcall
+DevCtxAlloc(void)
+{
+ DevCtx_t * devCtx;
+ u_long slot;
+
+ /* allocate struct and tag all slots as invalid */
+ devCtx = (DevCtx_t *)LocalPoolAlloc(sizeof(DevCtx_t), "DEV ctx");
+ if (devCtx != NULL)
+ {
+ /* The initial COV values make sure there is no busy
+ * loop on unused/empty slots.
+ */
+ devCtx->cov_count = 0;
+ for (slot = 0; slot < PPS_QUEUE_LEN; slot++)
+ devCtx->pps_buff[slot].cov_count = ~slot;
+ }
+ return devCtx;
+}
+
+static void __fastcall
+DevCtxFree(
+ DevCtx_t * devCtx
+ )
+{
+ /* this would be the place to get rid of managed ressources. */
+ LocalPoolFree(devCtx, "DEV ctx");
+}
+
+static DevCtx_t * __fastcall
+DevCtxAttach(
+ DevCtx_t * devCtx
+ )
+{
+ if (devCtx != NULL)
+ InterlockedIncrement(&devCtx->ref_count);
+ return devCtx;
+}
+
+static void __fastcall
+DevCtxDetach(
+ DevCtx_t * devCtx
+ )
+{
+ if (devCtx && !InterlockedDecrement(&devCtx->ref_count))
+ DevCtxFree(devCtx);
+}
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Alloc & Free of I/O context
+ *
+ * When the heap handle is NULL, these both will fail; Alloc with a NULL
+ * return and Free silently.
+ */
+static IoCtx_t * __fastcall
+IoCtxAlloc(
+ DevCtx_t * devCtx
+ )
+{
+ IoCtx_t * ioCtx;
+
+ ioCtx = (IoCtx_t *)LocalPoolAlloc(sizeof(IoCtx_t), "IO ctx");
+ if (ioCtx != NULL)
+ ioCtx->devCtx = DevCtxAttach(devCtx);
+ return ioCtx;
+}
+
+static void __fastcall
+IoCtxFree(
+ IoCtx_t * ctx
+ )
+{
+ if (ctx)
+ DevCtxDetach(ctx->devCtx);
+ LocalPoolFree(ctx, "IO ctx");
+}
+
+static void __fastcall
+IoCtxReset(
+ IoCtx_t * ctx
+ )
+{
+ RIO_t * rio;
+ DevCtx_t * dev;
+ if (ctx) {
+ rio = ctx->rio;
+ dev = ctx->devCtx;
+ ZERO(*ctx);
+ ctx->rio = rio;
+ ctx->devCtx = dev;
+ }
+}
+
+/*
+ * -------------------------------------------------------------------
+ * The IO completion thread and support functions
+ *
+ * There is only one completion thread, because it is locked to the same
+ * core as the time interpolation. Having more than one causes core
+ * contention and is not useful.
+ * -------------------------------------------------------------------
+ */
+static HANDLE hIoCompletionThread;
+static UINT tidCompletionThread;
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * The IO completion worker thread
+ *
+ * Note that this thread does not enter an alertable wait state and that
+ * the only waiting point is the IO completion port. If stopping this
+ * thread with a special queued result packet does not work,
+ * 'TerminateThread()' is the only remaining weapon in the arsenal. A
+ * dangerous weapon -- it's like SIGKILL.
+ */
+static unsigned WINAPI
+iocompletionthread(void *NotUsed)
+{
+ DWORD err;
+ DWORD octets;
+ ULONG_PTR key;
+ OVERLAPPED * pol;
+ IoCtx_t * lpo;
+
+ UNUSED_ARG(NotUsed);
+
+ /*
+ * Socket and refclock receive call gettimeofday() so the I/O
+ * thread needs to be on the same processor as the main and
+ * timing threads to ensure consistent QueryPerformanceCounter()
+ * results.
+ *
+ * This gets seriously into the way of efficient thread pooling
+ * on multicore systems.
+ */
+ lock_thread_to_processor(GetCurrentThread());
+
+ /*
+ * Set the thread priority high enough so I/O will preempt
+ * normal recv packet processing, but not higher than the timer
+ * sync thread.
+ */
+ if (!SetThreadPriority(GetCurrentThread(),
+ THREAD_PRIORITY_ABOVE_NORMAL))
+ msyslog(LOG_ERR, "Can't set thread priority: %m");
+
+ for(;;) {
+ if (GetQueuedCompletionStatus(
+ hIoCompletionPort,
+ &octets,
+ &key,
+ &pol,
+ INFINITE)) {
+ err = ERROR_SUCCESS;
+ } else {
+ err = GetLastError();
+ }
+ if (NULL == pol) {
+ DPRINTF(2, ("Overlapped IO Thread Exiting\n"));
+ break; /* fail */
+ }
+ lpo = CONTAINEROF(pol, IoCtx_t, ol);
+ get_systime(&lpo->RecvTime);
+ lpo->byteCount = octets;
+ lpo->errCode = err;
+ handler_calls++;
+ (*lpo->onIoDone)(key, lpo);
+ }
+
+ return 0;
+}
+
+/*
+ * -------------------------------------------------------------------
+ * Create/initialise the I/O creation port
+ */
+void
+init_io_completion_port(void)
+{
+#ifdef DEBUG
+ atexit(&free_io_completion_port_mem);
+#endif
+
+ /* Create the context pool first. */
+ IoCtxPoolInit(20);
+
+ /* Create the event used to signal an IO event */
+ WaitableIoEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (WaitableIoEventHandle == NULL) {
+ msyslog(LOG_ERR, "Can't create I/O event handle: %m");
+ exit(1);
+ }
+ /* Create the event used to signal an exit event */
+ WaitableExitEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (WaitableExitEventHandle == NULL) {
+ msyslog(LOG_ERR, "Can't create exit event handle: %m");
+ exit(1);
+ }
+
+ /* Create the IO completion port */
+ hIoCompletionPort = CreateIoCompletionPort(
+ INVALID_HANDLE_VALUE, NULL, 0, 0);
+ if (hIoCompletionPort == NULL) {
+ msyslog(LOG_ERR, "Can't create I/O completion port: %m");
+ exit(1);
+ }
+
+ /* Initialize the Wait Handles table */
+ WaitHandles[0] = WaitableIoEventHandle;
+ WaitHandles[1] = WaitableExitEventHandle; /* exit request */
+ WaitHandles[2] = WaitableTimerHandle;
+ ActiveWaitHandles = 3;
+
+ /*
+ * Supply ntp_worker.c with function to add or remove a
+ * semaphore to the ntpd I/O loop which is signalled by a worker
+ * when a response is ready. The callback is invoked in the
+ * parent.
+ */
+ addremove_io_semaphore = &ntpd_addremove_semaphore;
+
+ /*
+ * Have one thread servicing I/O. See rationale in front matter.
+ */
+ hIoCompletionThread = (HANDLE)_beginthreadex(
+ NULL,
+ 0,
+ iocompletionthread,
+ NULL,
+ 0,
+ &tidCompletionThread);
+}
+
+
+/*
+ * -------------------------------------------------------------------
+ * completion port teardown
+ */
+void
+uninit_io_completion_port(
+ void
+ )
+{
+ DWORD rc;
+
+ /* do noting if completion port already gone. */
+ if (NULL == hIoCompletionPort)
+ return;
+
+ /*
+ * Service thread seems running. Terminate him with grace
+ * first and force later...
+ */
+ if (tidCompletionThread != GetCurrentThreadId()) {
+ PostQueuedCompletionStatus(hIoCompletionPort, 0, 0, 0);
+ rc = WaitForSingleObject(hIoCompletionThread, 5000);
+ if (rc == WAIT_TIMEOUT) {
+ /* Thread lost. Kill off with TerminateThread. */
+ msyslog(LOG_ERR,
+ "IO completion thread refuses to terminate");
+ TerminateThread(hIoCompletionThread, ~0UL);
+ }
+ }
+
+ /* stop using the memory pool */
+ IoCtxPoolDone();
+
+ /* now reap all handles... */
+ CloseHandle(hIoCompletionThread);
+ hIoCompletionThread = NULL;
+ CloseHandle(hIoCompletionPort);
+ hIoCompletionPort = NULL;
+}
+
+
+/*
+ * -------------------------------------------------------------------
+ * external worker thread support (wait handle stuff)
+ *
+ * !Attention!
+ *
+ * - This function must only be called from the main thread. Changing
+ * a set of wait handles while someone is waiting on it creates
+ * undefined behaviour. Also there's no provision for mutual
+ * exclusion when accessing global values.
+ *
+ * - It's not possible to register a handle that is already in the table.
+ */
+static void
+ntpd_addremove_semaphore(
+ HANDLE sem,
+ int remove
+ )
+{
+ DWORD hi;
+
+ /* search for a matching entry first. */
+ for (hi = 3; hi < ActiveWaitHandles; hi++)
+ if (sem == WaitHandles[hi])
+ break;
+
+ if (remove) {
+ /*
+ * If found, eventually swap with last entry to keep
+ * the table dense.
+ */
+ if (hi < ActiveWaitHandles) {
+ ActiveWaitHandles--;
+ if (hi < ActiveWaitHandles)
+ WaitHandles[hi] =
+ WaitHandles[ActiveWaitHandles];
+ WaitHandles[ActiveWaitHandles] = NULL;
+ }
+ } else {
+ /*
+ * Make sure the entry is not found and there is enough
+ * room, then append to the table array.
+ */
+ if (hi >= ActiveWaitHandles) {
+ NTP_INSIST(ActiveWaitHandles < COUNTOF(WaitHandles));
+ WaitHandles[ActiveWaitHandles] = sem;
+ ActiveWaitHandles++;
+ }
+ }
+}
+
+
+#ifdef DEBUG
+static void
+free_io_completion_port_mem(
+ void
+ )
+{
+ /*
+ * At the moment, do absolutely nothing. Returning memory here
+ * requires NO PENDING OVERLAPPED OPERATIONS AT ALL at this
+ * point in time, and as long we cannot be reasonable sure about
+ * that the simple advice is:
+ *
+ * HANDS OFF!
+ */
+}
+#endif /* DEBUG */
+
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Prelude -- common error checking code
+ * -------------------------------------------------------------------
+ */
+extern char * NTstrerror(int err, BOOL *bfreebuf);
+
+static BOOL
+IoResultCheck(
+ DWORD err,
+ IoCtx_t * ctx,
+ const char * msg
+ )
+{
+ char * msgbuf;
+ BOOL dynbuf;
+
+ /* If the clock is not / no longer active, assume
+ * 'ERROR_OPERATION_ABORTED' and do the necessary cleanup.
+ */
+ if (ctx->rio && !ctx->rio->active)
+ err = ERROR_OPERATION_ABORTED;
+
+ switch (err)
+ {
+ /* The first ones are no real errors. */
+ case ERROR_SUCCESS: /* all is good */
+ case ERROR_IO_PENDING: /* callback pending */
+ return TRUE;
+
+ /* the next ones go silently -- only cleanup is done */
+ case ERROR_INVALID_PARAMETER: /* handle already closed */
+ case ERROR_OPERATION_ABORTED: /* handle closed while wait */
+ break;
+
+
+ default:
+ /*
+ * We have to resort to the low level error formatting
+ * functions here, since the error code can be an
+ * overlapped result. Relying the value to be the same
+ * as the 'GetLastError()' result at this point of
+ * execution is shaky at best, and using SetLastError()
+ * to force it seems too nasty.
+ */
+ msgbuf = NTstrerror(err, &dynbuf);
+ msyslog(LOG_ERR, "%s: err=%u, '%s'", msg, err, msgbuf);
+ if (dynbuf)
+ LocalFree(msgbuf);
+ break;
+ }
+
+ /* If we end here, we have to mop up the buffer and context */
+ if (ctx->flRawMem) {
+ if (ctx->trans_buf)
+ free(ctx->trans_buf);
+ } else {
+ if (ctx->recv_buf)
+ freerecvbuf(ctx->recv_buf);
+ }
+ IoCtxFree(ctx);
+ return FALSE;
+}
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Part 1 -- COMM event handling
+ * -------------------------------------------------------------------
+ */
+
+static BOOL
+QueueSerialWait(
+ RIO_t * rio,
+ recvbuf_t * buff,
+ IoCtx_t * lpo
+ )
+{
+ BOOL rc;
+
+ lpo->onIoDone = OnSerialWaitComplete;
+ lpo->recv_buf = buff;
+ lpo->flRawMem = 0;
+ lpo->rio = rio;
+ buff->fd = rio->fd;
+
+ rc = WaitCommEvent((HANDLE)_get_osfhandle(rio->fd),
+ &lpo->com_events, &lpo->ol);
+ if (!rc)
+ return IoResultCheck(GetLastError(), lpo,
+ "Can't wait on Refclock");
+ return TRUE;
+}
+
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+static void
+OnSerialWaitComplete(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ RIO_t * rio;
+ DevCtx_t * dev;
+ recvbuf_t * buff;
+ PPSDataEx_t * ppsbuf;
+ DWORD modem_status;
+ u_long covc;
+
+ /* check and bail out if operation failed */
+ if (!IoResultCheck(lpo->errCode, lpo,
+ "WaitCommEvent failed"))
+ return;
+
+ /* get & validate context and buffer. */
+ rio = (RIO_t *)key;
+ buff = lpo->recv_buf;
+ dev = lpo->devCtx;
+
+ NTP_INSIST(rio == lpo->rio);
+
+#ifdef DEBUG
+ if (~(EV_RXFLAG | EV_RLSD | EV_RXCHAR) & lpo->com_events) {
+ msyslog(LOG_ERR, "WaitCommEvent returned unexpected mask %x",
+ lpo->com_events);
+ exit(-1);
+ }
+#endif
+ /*
+ * Take note of changes on DCD; 'user mode PPS hack'.
+ * perlinger@ntp.org suggested a way of solving several problems with
+ * this code that makes a lot of sense: move to a putative
+ * dcdpps-ppsapi-provider.dll.
+ */
+ if (EV_RLSD & lpo->com_events) {
+ modem_status = 0;
+ GetCommModemStatus((HANDLE)_get_osfhandle(rio->fd),
+ &modem_status);
+
+ if (dev != NULL) {
+ /* PPS-context available -- use it! */
+ if (MS_RLSD_ON & modem_status) {
+ dev->pps_data.cc_assert++;
+ dev->pps_data.ts_assert = lpo->RecvTime;
+ DPRINTF(2, ("upps-real: fd %d DCD PPS Rise at %s\n", rio->fd,
+ ulfptoa(&lpo->RecvTime, 6)));
+ } else {
+ dev->pps_data.cc_clear++;
+ dev->pps_data.ts_clear = lpo->RecvTime;
+ DPRINTF(2, ("upps-real: fd %d DCD PPS Fall at %s\n", rio->fd,
+ ulfptoa(&lpo->RecvTime, 6)));
+ }
+ /*
+ ** Update PPS buffer, writing from low to high, with index
+ ** update as last action. We use interlocked ops and a
+ ** volatile data destination to avoid reordering on compiler
+ ** and CPU level. The interlocked instruction act as full
+ ** barriers -- we need only release semantics, but we don't
+ ** have them before VS2010.
+ */
+ covc = dev->cov_count + 1u;
+ ppsbuf = dev->pps_buff + (covc & PPS_QUEUE_MSK);
+ InterlockedExchange((PLONG)&ppsbuf->cov_count, covc);
+ ppsbuf->data = dev->pps_data;
+ InterlockedExchange((PLONG)&dev->cov_count, covc);
+ }
+ /* perlinger@ntp.org, 2012-11-19
+ It can be argued that once you have the PPS API active, you can
+ disable the old pps hack. This would give a behaviour that's much
+ more like the behaviour under a UN*Xish OS. On the other hand, it
+ will give a nasty surprise for people which have until now happily
+ taken the pps hack for granted, and after the first complaint, I have
+ decided to keep the old implementation unconditionally. So here it is:
+
+ /* backward compat: 'usermode-pps-hack' */
+ if (MS_RLSD_ON & modem_status) {
+ lpo->DCDSTime = lpo->RecvTime;
+ lpo->flTsDCDS = 1;
+ DPRINTF(2, ("upps-hack: fd %d DCD PPS Rise at %s\n", rio->fd,
+ ulfptoa(&lpo->RecvTime, 6)));
+ }
+ }
+
+ /* If IO ready, read data. Go back waiting else. */
+ if (EV_RXFLAG & lpo->com_events) { /* line discipline */
+ lpo->FlagTime = lpo->RecvTime;
+ lpo->flTsFlag = 1;
+ QueueSerialRead(rio, buff, lpo);
+ } else if (EV_RXCHAR & lpo->com_events) { /* raw discipline */
+ lpo->FlagTime = lpo->RecvTime;
+ lpo->flTsFlag = 1;
+ QueueRawSerialRead(rio, buff, lpo);
+ } else { /* idle... */
+ QueueSerialWait(rio, buff, lpo);
+ }
+}
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Part 2 -- line discipline emulation
+ *
+ * Ideally this should *not* be done in the IO completion thread.
+ * We use a worker pool thread to offload the low-level processing.
+ * -------------------------------------------------------------------
+ */
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Start & Queue a serial read for line discipline emulation.
+ */
+static BOOL
+QueueSerialRead(
+ RIO_t * rio,
+ recvbuf_t * buff,
+ IoCtx_t * lpo
+ )
+{
+ BOOL rc;
+
+ lpo->onIoDone = &OnSerialReadComplete;
+ lpo->recv_buf = buff;
+ lpo->flRawMem = 0;
+ lpo->rio = rio;
+ buff->fd = rio->fd;
+
+ rc = ReadFile((HANDLE)_get_osfhandle(rio->fd),
+ (char*)buff->recv_buffer + buff->recv_length,
+ sizeof(buff->recv_buffer) - buff->recv_length,
+ NULL, &lpo->ol);
+ if (!rc)
+ return IoResultCheck(GetLastError(), lpo,
+ "Can't read from Refclock");
+ return TRUE;
+}
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * IO completion thread callback. Takes a time stamp and offloads the
+ * real work to the worker pool ASAP.
+ */
+static void
+OnSerialReadComplete(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ RIO_t * rio;
+ recvbuf_t * buff;
+
+ /* check and bail out if operation failed */
+ if (!IoResultCheck(lpo->errCode, lpo,
+ "Read from Refclock failed"))
+ return;
+
+ /* get & validate context and buffer. */
+ rio = lpo->rio;
+ buff = lpo->recv_buf;
+ NTP_INSIST((ULONG_PTR)rio == key);
+
+ /* Offload to worker pool */
+ if (!QueueUserWorkItem(&OnSerialReadWorker, lpo, WT_EXECUTEDEFAULT)) {
+ msyslog(LOG_ERR,
+ "Can't offload to worker thread, will skip data: %m");
+ IoCtxReset(lpo);
+ buff->recv_length = 0;
+ QueueSerialWait(rio, buff, lpo);
+ }
+}
+
+
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Worker pool offload function -- avoid lengthy operations in the IO
+ * completion thread (affects timing...)
+ *
+ * This function does the real work of emulating the UN*X line
+ * discipline. Since this involves allocation of additional buffers and
+ * string parsing/copying, it is offloaded to the worker thread pool so
+ * the IO completion thread can resume faster.
+ */
+static DWORD WINAPI
+OnSerialReadWorker(void * ctx)
+{
+ IoCtx_t * lpo;
+ recvbuf_t * buff, *obuf;
+ RIO_t * rio;
+ char *sptr, *send, *dptr;
+ BOOL eol;
+ char ch;
+
+ /* Get context back */
+ lpo = (IoCtx_t*)ctx;
+ buff = lpo->recv_buf;
+ rio = lpo->rio;
+ /*
+ * ignore 0 bytes read due to closure on fd.
+ * Eat the first line of input as it's possibly partial.
+ */
+ if (lpo->byteCount && rio->recvcount++) {
+ /* account for additional input */
+ buff->recv_length += (int)lpo->byteCount;
+
+ /*
+ * Now mimic the Unix line discipline.
+ */
+ sptr = (char *)buff->recv_buffer;
+ send = sptr + buff->recv_length;
+ obuf = NULL;
+ dptr = NULL;
+
+ /* hack #1: eat away leading CR/LF if here is any */
+ while (sptr != send) {
+ ch = *sptr;
+ if (ch != '\n' && ch != '\r')
+ break;
+ sptr++;
+ }
+
+ while (sptr != send)
+ {
+ /* get new buffer to store line */
+ obuf = get_free_recv_buffer_alloc();
+ obuf->fd = rio->fd;
+ obuf->receiver = &process_refclock_packet;
+ obuf->dstadr = NULL;
+ obuf->recv_peer = rio->srcclock;
+ set_serial_recv_time(obuf, lpo);
+
+ /*
+ * Copy data to new buffer, convert CR to LF on
+ * the fly. Stop after either.
+ */
+ dptr = (char *)obuf->recv_buffer;
+ eol = FALSE;
+ while (sptr != send && !eol) {
+ ch = *sptr++;
+ if ('\r' == ch) {
+ ch = '\n';
+ }
+ *dptr++ = ch;
+ eol = ('\n' == ch);
+ }
+ obuf->recv_length =
+ (int)(dptr - (char *)obuf->recv_buffer);
+
+ /*
+ * If NL found, push this buffer and prepare to
+ * get a new one.
+ */
+ if (eol) {
+ add_full_recv_buffer(obuf);
+ SetEvent(WaitableIoEventHandle);
+ obuf = NULL;
+ }
+ }
+
+ /*
+ * If we still have an output buffer, continue to fill
+ * it again.
+ */
+ if (obuf) {
+ obuf->recv_length =
+ (int)(dptr - (char *)obuf->recv_buffer);
+ freerecvbuf(buff);
+ buff = obuf;
+ } else {
+ /* clear the current buffer, continue */
+ buff->recv_length = 0;
+ }
+ } else {
+ buff->recv_length = 0;
+ }
+
+ IoCtxReset(lpo);
+ QueueSerialWait(rio, buff, lpo);
+ return 0;
+}
+
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Part 3 -- raw data input
+ *
+ * Raw data processing is fast enough to do without offloading to the
+ * worker pool, so this is rather short'n sweet...
+ * -------------------------------------------------------------------
+ */
+
+static BOOL
+QueueRawSerialRead(
+ RIO_t * rio,
+ recvbuf_t * buff,
+ IoCtx_t * lpo
+ )
+{
+ BOOL rc;
+
+ lpo->onIoDone = OnRawSerialReadComplete;
+ lpo->recv_buf = buff;
+ lpo->flRawMem = 0;
+ lpo->rio = rio;
+ buff->fd = rio->fd;
+
+ rc = ReadFile((HANDLE)_get_osfhandle(rio->fd),
+ buff->recv_buffer,
+ sizeof(buff->recv_buffer),
+ NULL, &lpo->ol);
+ if (!rc)
+ return IoResultCheck(GetLastError(), lpo,
+ "Can't read raw from Refclock");
+ return TRUE;
+}
+
+
+static void
+OnRawSerialReadComplete(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ RIO_t * rio;
+ recvbuf_t * buff;
+
+ /* check and bail out if operation failed */
+ if (!IoResultCheck(lpo->errCode, lpo,
+ "Raw read from Refclock failed"))
+ return;
+
+ /* get & validate context and buffer. */
+ rio = lpo->rio;
+ buff = lpo->recv_buf;
+ NTP_INSIST((ULONG_PTR)rio == key);
+
+ /* ignore 0 bytes read. */
+ if (lpo->byteCount > 0) {
+ buff->recv_length = (int)lpo->byteCount;
+ buff->dstadr = NULL;
+ buff->receiver = process_refclock_packet;
+ buff->recv_peer = rio->srcclock;
+ set_serial_recv_time(buff, lpo);
+ add_full_recv_buffer(buff);
+ SetEvent(WaitableIoEventHandle);
+ buff = get_free_recv_buffer_alloc();
+ }
+
+ buff->recv_length = 0;
+ QueueSerialWait(rio, buff, lpo);
+}
+
+
+static inline void
+set_serial_recv_time(
+ recvbuf_t * obuf,
+ IoCtx_t * lpo
+ )
+{
+ /*
+ * Time stamp assignment is interesting. If we
+ * have a DCD stamp, we use it, otherwise we use
+ * the FLAG char event time, and if that is also
+ * not / no longer available we use the arrival
+ * time.
+ */
+ if (lpo->flTsDCDS)
+ obuf->recv_time = lpo->DCDSTime;
+ else if (lpo->flTsFlag)
+ obuf->recv_time = lpo->FlagTime;
+ else
+ obuf->recv_time = lpo->RecvTime;
+
+ lpo->flTsDCDS = lpo->flTsFlag = 0; /* use only once... */
+}
+
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Part 4 -- Overlapped serial output
+ *
+ * Again, no need to offload any work.
+ * -------------------------------------------------------------------
+ */
+
+/*
+ * async_write, clone of write(), used by some reflock drivers
+ */
+int
+async_write(
+ int fd,
+ const void * data,
+ unsigned int count
+ )
+{
+ IoCtx_t * lpo;
+ BOOL rc;
+
+ lpo = IoCtxAlloc(NULL);
+ if (lpo == NULL) {
+ DPRINTF(1, ("async_write: out of memory\n"));
+ errno = ENOMEM;
+ return -1;
+ }
+
+ lpo->onIoDone = OnSerialWriteComplete;
+ lpo->trans_buf = emalloc(count);
+ lpo->flRawMem = 1;
+ memcpy(lpo->trans_buf, data, count);
+
+ rc = WriteFile((HANDLE)_get_osfhandle(fd),
+ lpo->trans_buf, count,
+ NULL, &lpo->ol);
+ if (!rc && !IoResultCheck(GetLastError(), lpo,
+ "Can't write to Refclock")) {
+ errno = EBADF;
+ return -1;
+ }
+ return count;
+}
+
+static void
+OnSerialWriteComplete(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ /* set RIO and force silent cleanup if no error */
+ lpo->rio = (RIO_t *)key;
+ if (ERROR_SUCCESS == lpo->errCode)
+ lpo->errCode = ERROR_OPERATION_ABORTED;
+ IoResultCheck(lpo->errCode, lpo,
+ "Write to Refclock failed");
+}
+
+
+/*
+ * -------------------------------------------------------------------
+ * Serial IO stuff
+ *
+ * Part 5 -- read PPS time stamps
+ *
+ * -------------------------------------------------------------------
+ */
+
+/* The dummy read procedure is used for getting the device context
+ * into the IO completion thread, using the IO completion queue for
+ * transport. There are other ways to accomplish what we need here,
+ * but using the IO machine is handy and avoids a lot of trouble.
+ */
+static void
+OnPpsDummyRead(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ RIO_t * rio;
+
+ rio = (RIO_t *)key;
+ lpo->devCtx = DevCtxAttach(rio->device_context);
+ SetEvent(lpo->ppswake);
+}
+
+__declspec(dllexport) void* __stdcall
+ntp_pps_attach_device(
+ HANDLE hndIo
+ )
+{
+ IoCtx_t myIoCtx;
+ HANDLE myEvt;
+ DevCtx_t * dev;
+ DWORD rc;
+
+ if (!isserialhandle(hndIo)) {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return NULL;
+ }
+
+ ZERO(myIoCtx);
+ dev = NULL;
+ myEvt = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (NULL == myEvt)
+ goto done;
+
+ myIoCtx.ppswake = myEvt;
+ myIoCtx.onIoDone = OnPpsDummyRead;
+ rc = ReadFile(hndIo, &myIoCtx.byteCount, 0,
+ &myIoCtx.byteCount, &myIoCtx.ol);
+ if (!rc && (GetLastError() != ERROR_IO_PENDING))
+ goto done;
+ if (WaitForSingleObject(myEvt, INFINITE) == WAIT_OBJECT_0)
+ if (NULL == (dev = myIoCtx.devCtx))
+ SetLastError(ERROR_INVALID_HANDLE);
+done:
+ rc = GetLastError();
+ CloseHandle(myEvt);
+ SetLastError(rc);
+ return dev;
+}
+
+__declspec(dllexport) void __stdcall
+ntp_pps_detach_device(
+ DevCtx_t * dev
+ )
+{
+ DevCtxDetach(dev);
+}
+
+__declspec(dllexport) BOOL __stdcall
+ntp_pps_read(
+ DevCtx_t * dev,
+ PPSData_t * data,
+ size_t dlen
+ )
+{
+ u_long guard, covc;
+ int repc;
+ PPSDataEx_t * ppsbuf;
+
+
+ if (dev == NULL) {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ if (data == NULL || dlen != sizeof(PPSData_t)) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ /*
+ ** Reading from shared memory in a lock-free fashion can be
+ ** a bit tricky, since we have to read the components in the
+ ** opposite direction from the write, and the compiler must
+ ** not reorder the read sequence.
+ ** We use interlocked ops and a volatile data source to avoid
+ ** reordering on compiler and CPU level. The interlocked
+ ** instruction act as full barriers -- we need only aquire
+ ** semantics, but we don't have them before VS2010.
+ */
+ repc = 3;
+ do {
+ InterlockedExchange((PLONG)&covc, dev->cov_count);
+ ppsbuf = dev->pps_buff + (covc & PPS_QUEUE_MSK);
+ *data = ppsbuf->data;
+ InterlockedExchange((PLONG)&guard, ppsbuf->cov_count);
+ guard ^= covc;
+ } while (guard && ~guard && --repc);
+
+ if (guard) {
+ SetLastError(ERROR_INVALID_DATA);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/*
+ * Add a reference clock data structures I/O handles to
+ * the I/O completion port. Return 1 if any error.
+ */
+int
+io_completion_port_add_clock_io(
+ RIO_t *rio
+ )
+{
+ IoCtx_t * lpo;
+ DevCtx_t * dev;
+ recvbuf_t * buff;
+ HANDLE h;
+
+ h = (HANDLE)_get_osfhandle(rio->fd);
+ if (NULL == CreateIoCompletionPort(
+ h,
+ hIoCompletionPort,
+ (ULONG_PTR)rio,
+ 0)) {
+ msyslog(LOG_ERR, "Can't add COM port to i/o completion port: %m");
+ return 1;
+ }
+
+ dev = DevCtxAlloc();
+ if (NULL == dev) {
+ msyslog(LOG_ERR, "Can't allocate device context for i/o completion port: %m");
+ return 1;
+ }
+ rio->device_context = DevCtxAttach(dev);
+ lpo = IoCtxAlloc(dev);
+ if (NULL == lpo) {
+ msyslog(LOG_ERR, "Can't allocate heap for completion port: %m");
+ return 1;
+ }
+ buff = get_free_recv_buffer_alloc();
+ buff->recv_length = 0;
+ QueueSerialWait(rio, buff, lpo);
+
+ return 0;
+}
+
+void
+io_completion_port_remove_clock_io(
+ RIO_t *rio
+ )
+{
+ if (rio)
+ DevCtxDetach((DevCtx_t *)rio->device_context);
+}
+
+/*
+ * Queue a receiver on a socket. Returns 0 if no buffer can be queued
+ *
+ * Note: As per the winsock documentation, we use WSARecvFrom. Using
+ * ReadFile() is less efficient.
+ */
+static BOOL
+QueueSocketRecv(
+ SOCKET s,
+ recvbuf_t * buff,
+ IoCtx_t * lpo
+ )
+{
+ WSABUF wsabuf;
+ DWORD Flags;
+ int rc;
+
+ lpo->onIoDone = OnSocketRecv;
+ lpo->recv_buf = buff;
+ lpo->flRawMem = 0;
+ lpo->rio = NULL;
+
+ Flags = 0;
+ buff->fd = s;
+ buff->recv_srcadr_len = sizeof(buff->recv_srcadr);
+ wsabuf.buf = (char *)buff->recv_buffer;
+ wsabuf.len = sizeof(buff->recv_buffer);
+
+ rc = WSARecvFrom(buff->fd, &wsabuf, 1, NULL, &Flags,
+ &buff->recv_srcadr.sa, &buff->recv_srcadr_len,
+ &lpo->ol, NULL);
+ if (SOCKET_ERROR == rc)
+ return IoResultCheck(GetLastError(), lpo,
+ "Can't read from Socket");
+ return TRUE;
+}
+
+
+static void
+OnSocketRecv(
+ ULONG_PTR key,
+ IoCtx_t * lpo
+ )
+{
+ recvbuf_t * buff;
+ recvbuf_t * newbuff;
+ struct interface * inter = (struct interface *)key;
+
+ NTP_REQUIRE(NULL != lpo);
+ NTP_REQUIRE(NULL != lpo->recv_buf);
+
+ /* check and bail out if operation failed */
+ if (!IoResultCheck(lpo->errCode, lpo,
+ "Read from Socket failed"))
+ return;
+
+ /*
+ * Convert the overlapped pointer back to a recvbuf pointer.
+ * Fetch items that are lost when the context is queued again.
+ */
+ buff = lpo->recv_buf;
+ buff->recv_time = lpo->RecvTime;
+ buff->recv_length = (int)lpo->byteCount;
+
+ /*
+ * Get a new recv buffer for the replacement socket receive
+ */
+ newbuff = get_free_recv_buffer_alloc();
+ if (NULL != newbuff) {
+ QueueSocketRecv(inter->fd, newbuff, lpo);
+ } else {
+ IoCtxFree(lpo);
+ msyslog(LOG_ERR, "Can't add I/O request to socket");
+ }
+ DPRINTF(4, ("%sfd %d %s recv packet mode is %d\n",
+ (MODE_BROADCAST == get_packet_mode(buff))
+ ? " **** Broadcast "
+ : "",
+ (int)buff->fd, stoa(&buff->recv_srcadr),
+ get_packet_mode(buff)));
+
+ /*
+ * If we keep it add some info to the structure
+ */
+ if (buff->recv_length && !inter->ignore_packets) {
+ NTP_INSIST(buff->recv_srcadr_len <=
+ sizeof(buff->recv_srcadr));
+ buff->receiver = &receive;
+ buff->dstadr = inter;
+ packets_received++;
+ handler_pkts++;
+ inter->received++;
+ add_full_recv_buffer(buff);
+
+ DPRINTF(2, ("Received %d bytes fd %d in buffer %p from %s\n",
+ buff->recv_length, (int)buff->fd, buff,
+ stoa(&buff->recv_srcadr)));
+
+ /*
+ * Now signal we have something to process
+ */
+ SetEvent(WaitableIoEventHandle);
+ } else
+ freerecvbuf(buff);
+}
+
+
+/*
+ * Add a socket handle to the I/O completion port, and send
+ * NTP_RECVS_PER_SOCKET recv requests to the kernel.
+ */
+int
+io_completion_port_add_socket(
+ SOCKET fd,
+ struct interface * inter
+ )
+{
+ IoCtx_t * lpo;
+ recvbuf_t * buff;
+ int n;
+
+ if (fd != INVALID_SOCKET) {
+ if (NULL == CreateIoCompletionPort((HANDLE)fd,
+ hIoCompletionPort, (ULONG_PTR)inter, 0)) {
+ msyslog(LOG_ERR,
+ "Can't add socket to i/o completion port: %m");
+ return 1;
+ }
+ }
+
+ /*
+ * Windows 2000 bluescreens with bugcheck 0x76
+ * PROCESS_HAS_LOCKED_PAGES at ntpd process
+ * termination when using more than one pending
+ * receive per socket. A runtime version test
+ * would allow using more on newer versions
+ * of Windows.
+ */
+
+#define WINDOWS_RECVS_PER_SOCKET 1
+
+ for (n = 0; n < WINDOWS_RECVS_PER_SOCKET; n++) {
+
+ buff = get_free_recv_buffer_alloc();
+ lpo = IoCtxAlloc(NULL);
+ if (lpo == NULL)
+ {
+ msyslog(LOG_ERR
+ , "Can't allocate IO completion context: %m");
+ return 1;
+ }
+
+ QueueSocketRecv(fd, buff, lpo);
+
+ }
+ return 0;
+}
+
+
+/*
+ * io_completion_port_sendto() -- sendto() replacement for Windows
+ *
+ * Returns len after successful send.
+ * Returns -1 for any error, with the error code available via
+ * msyslog() %m, or GetLastError().
+ */
+int
+io_completion_port_sendto(
+ int fd,
+ void * pkt,
+ size_t len,
+ sockaddr_u * dest
+ )
+{
+ static u_long time_next_ifscan_after_error;
+ WSABUF wsabuf;
+ DWORD octets_sent;
+ DWORD Result;
+ int errval;
+ int AddrLen;
+
+ wsabuf.buf = (void *)pkt;
+ wsabuf.len = len;
+ AddrLen = SOCKLEN(dest);
+ octets_sent = 0;
+
+ Result = WSASendTo(fd, &wsabuf, 1, &octets_sent, 0,
+ &dest->sa, AddrLen, NULL, NULL);
+ errval = GetLastError();
+ if (SOCKET_ERROR == Result) {
+ if (ERROR_UNEXP_NET_ERR == errval) {
+ /*
+ * We get this error when trying to send if the
+ * network interface is gone or has lost link.
+ * Rescan interfaces to catch on sooner, but no
+ * more often than once per minute. Once ntpd
+ * is able to detect changes without polling
+ * this should be unneccessary
+ */
+ if (time_next_ifscan_after_error < current_time) {
+ time_next_ifscan_after_error = current_time + 60;
+ timer_interfacetimeout(current_time);
+ }
+ DPRINTF(4, ("sendto unexpected network error, interface may be down\n"));
+ } else {
+ msyslog(LOG_ERR, "WSASendTo(%s) error %m",
+ stoa(dest));
+ }
+ SetLastError(errval);
+ return -1;
+ }
+
+ if (len != (int)octets_sent) {
+ msyslog(LOG_ERR, "WSASendTo(%s) sent %u of %d octets",
+ stoa(dest), octets_sent, len);
+ SetLastError(ERROR_BAD_LENGTH);
+ return -1;
+ }
+
+ DPRINTF(4, ("sendto %s %d octets\n", stoa(dest), len));
+
+ return len;
+}
+
+
+
+/*
+ * GetReceivedBuffers
+ * Note that this is in effect the main loop for processing requests
+ * both send and receive. This should be reimplemented
+ */
+int
+GetReceivedBuffers()
+{
+ DWORD index;
+ HANDLE ready;
+ int have_packet;
+
+ have_packet = FALSE;
+ while (!have_packet) {
+ index = WaitForMultipleObjects(ActiveWaitHandles,
+ WaitHandles, FALSE,
+ INFINITE);
+ switch (index) {
+
+ case WAIT_OBJECT_0 + 0: /* Io event */
+ DPRINTF(4, ("IoEvent occurred\n"));
+ have_packet = TRUE;
+ break;
+
+ case WAIT_OBJECT_0 + 1: /* exit request */
+ exit(0);
+ break;
+
+ case WAIT_OBJECT_0 + 2: /* timer */
+ timer();
+ break;
+
+ case WAIT_IO_COMPLETION: /* loop */
+ break;
+
+ case WAIT_TIMEOUT:
+ msyslog(LOG_ERR,
+ "WaitForMultipleObjects INFINITE timed out.");
+ exit(1);
+ break;
+
+ case WAIT_FAILED:
+ msyslog(LOG_ERR,
+ "WaitForMultipleObjects Failed: Error: %m");
+ exit(1);
+ break;
+
+ default:
+ DEBUG_INSIST((index - WAIT_OBJECT_0) <
+ ActiveWaitHandles);
+ ready = WaitHandles[index - WAIT_OBJECT_0];
+ handle_blocking_resp_sem(ready);
+ break;
+
+ } /* switch */
+ }
+
+ return (full_recvbuffs()); /* get received buffers */
+}
+
+#else
+ static int NonEmptyCompilationUnit;
+#endif
+
diff --git a/ports/winnt/ntpd/ntservice.c b/ports/winnt/ntpd/ntservice.c
new file mode 100644
index 000000000000..f0840bdb9d6a
--- /dev/null
+++ b/ports/winnt/ntpd/ntservice.c
@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 1999-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 ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS. IN NO EVENT SHALL ISC 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <ntp_stdlib.h>
+#include "syslog.h"
+#include "ntpd.h"
+#include "ntservice.h"
+#include "clockstuff.h"
+#include "ntp_iocompletionport.h"
+#include "ntpd-opts.h"
+#include "isc/win32os.h"
+#include <ssl_applink.c>
+
+
+/*
+ * Globals
+ */
+static SERVICE_STATUS_HANDLE hServiceStatus = 0;
+static BOOL foreground = FALSE;
+static BOOL computer_shutting_down = FALSE;
+static int glb_argc;
+static char **glb_argv;
+HANDLE hServDoneEvent = NULL;
+extern int accept_wildcard_if_for_winnt;
+
+/*
+ * Forward declarations
+ */
+void uninit_io_completion_port();
+int ntpdmain(int argc, char *argv[]);
+void WINAPI ServiceControl(DWORD dwCtrlCode);
+void ntservice_exit(void);
+
+#ifdef WRAP_DBG_MALLOC
+void *wrap_dbg_malloc(size_t s, const char *f, int l);
+void *wrap_dbg_realloc(void *p, size_t s, const char *f, int l);
+void wrap_dbg_free(void *p);
+#endif
+
+void WINAPI
+service_main(
+ DWORD argc,
+ LPTSTR *argv
+ )
+{
+ if (argc > 1) {
+ /*
+ * Let command line parameters from the Windows SCM GUI
+ * override the standard parameters from the ImagePath registry key.
+ */
+ glb_argc = argc;
+ glb_argv = argv;
+ }
+
+ ntpdmain(glb_argc, glb_argv);
+}
+
+
+/*
+ * This is the entry point for the executable
+ * We can call ntpdmain() explicitly or via StartServiceCtrlDispatcher()
+ * as we need to.
+ */
+int main(
+ int argc,
+ char ** argv
+ )
+{
+ int rc;
+ int argc_after_opts;
+ char ** argv_after_opts;
+
+ ssl_applink();
+
+ /* Save the command line parameters */
+ glb_argc = argc;
+ glb_argv = argv;
+
+ /* Under original Windows NT we must not discard the wildcard */
+ /* socket to workaround a bug in NT's getsockname(). */
+ if (isc_win32os_majorversion() <= 4)
+ accept_wildcard_if_for_winnt = TRUE;
+
+ argc_after_opts = argc;
+ argv_after_opts = argv;
+ parse_cmdline_opts(&argc_after_opts, &argv_after_opts);
+
+ if (HAVE_OPT(QUIT)
+ || HAVE_OPT(SAVECONFIGQUIT)
+ || HAVE_OPT(HELP)
+#ifdef DEBUG
+ || OPT_VALUE_SET_DEBUG_LEVEL != 0
+#endif
+ || HAVE_OPT(NOFORK))
+ foreground = TRUE;
+
+ if (foreground) /* run in console window */
+ rc = ntpdmain(argc, argv);
+ else {
+ /* Start up as service */
+
+ SERVICE_TABLE_ENTRY dispatchTable[] = {
+ { TEXT(NTP_DISPLAY_NAME), service_main },
+ { NULL, NULL }
+ };
+
+ rc = StartServiceCtrlDispatcher(dispatchTable);
+ if (rc)
+ rc = 0;
+ else {
+ rc = GetLastError();
+ fprintf(stderr,
+ "%s: unable to start as service:\n"
+ "%s\n"
+ "Use -d, -q, -n, -?, --help or "
+ "--saveconfigquit to run "
+ "interactive.\n",
+ argv[0], ntp_strerror(rc));
+ }
+ }
+ return rc;
+}
+
+
+/*
+ * Initialize the Service by registering it.
+ */
+void
+ntservice_init() {
+ char ConsoleTitle[256];
+
+ if (!foreground) {
+ /* Register handler with the SCM */
+ hServiceStatus = RegisterServiceCtrlHandler(NTP_DISPLAY_NAME,
+ ServiceControl);
+ if (!hServiceStatus) {
+ NTReportError(NTP_SERVICE_NAME,
+ "could not register service control handler");
+ exit(1);
+ }
+ UpdateSCM(SERVICE_RUNNING);
+ } else {
+ snprintf(ConsoleTitle, sizeof(ConsoleTitle),
+ "NTP Version %s", Version);
+ ConsoleTitle[sizeof(ConsoleTitle) - 1] = '\0';
+ SetConsoleTitle(ConsoleTitle);
+ }
+
+#ifdef _CRTDBG_MAP_ALLOC
+ /* ask the runtime to dump memory leaks at exit */
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF
+ | _CRTDBG_LEAK_CHECK_DF /* report on leaks at exit */
+ | _CRTDBG_CHECK_ALWAYS_DF /* Check heap every alloc/dealloc */
+#ifdef MALLOC_LINT
+ | _CRTDBG_DELAY_FREE_MEM_DF /* Don't actually free memory */
+#endif
+ );
+#ifdef DOES_NOT_WORK
+ /*
+ * hart: I haven't seen this work, running ntpd.exe -n from a shell
+ * to both a file and the debugger output window. Docs indicate it
+ * should cause leak report to go to stderr, but it's only seen if
+ * ntpd runs under a debugger (in the debugger's output), even with
+ * this block of code enabled.
+ */
+ _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+#endif
+#endif /* using MS debug C runtime heap, _CRTDBG_MAP_ALLOC */
+
+ atexit( ntservice_exit );
+}
+
+
+/*
+ * Routine to check if the service is stopping
+ * because the computer is shutting down
+ */
+BOOL
+ntservice_systemisshuttingdown() {
+ return computer_shutting_down;
+}
+
+void
+ntservice_exit( void )
+{
+ uninit_io_completion_port();
+ Sleep( 200 ); //##++
+
+ reset_winnt_time();
+
+ msyslog(LOG_INFO, "ntservice: The Network Time Protocol Service is stopping.");
+
+ if (!foreground) {
+ /* service mode, need to have the service_main routine
+ * register with the service control manager that the
+ * service has stopped running, before exiting
+ */
+ UpdateSCM(SERVICE_STOPPED);
+ }
+}
+
+/*
+ * ServiceControl(): Handles requests from the SCM and passes them on
+ * to the service.
+ */
+void WINAPI
+ServiceControl(
+ DWORD dwCtrlCode
+ )
+{
+ switch (dwCtrlCode) {
+
+ case SERVICE_CONTROL_SHUTDOWN:
+ computer_shutting_down = TRUE;
+ /* fall through to stop case */
+
+ case SERVICE_CONTROL_STOP:
+ if (WaitableExitEventHandle != NULL) {
+ SetEvent(WaitableExitEventHandle);
+ UpdateSCM(SERVICE_STOP_PENDING);
+ Sleep(100); //##++
+ }
+ return;
+
+ case SERVICE_CONTROL_PAUSE:
+ case SERVICE_CONTROL_CONTINUE:
+ case SERVICE_CONTROL_INTERROGATE:
+ default:
+ break;
+ }
+ UpdateSCM(SERVICE_RUNNING);
+}
+
+/*
+ * Tell the Service Control Manager the state of the service.
+ */
+void UpdateSCM(DWORD state) {
+ SERVICE_STATUS ss;
+ static DWORD dwState = SERVICE_STOPPED;
+
+ if (hServiceStatus) {
+ if (state)
+ dwState = state;
+
+ ZERO(ss);
+ ss.dwServiceType |= SERVICE_WIN32_OWN_PROCESS;
+ ss.dwCurrentState = dwState;
+ ss.dwControlsAccepted = SERVICE_ACCEPT_STOP |
+ SERVICE_ACCEPT_SHUTDOWN;
+ ss.dwCheckPoint = 0;
+ ss.dwServiceSpecificExitCode = 0;
+ ss.dwWin32ExitCode = NO_ERROR;
+ ss.dwWaitHint = dwState == SERVICE_STOP_PENDING ? 5000 : 1000;
+
+ SetServiceStatus(hServiceStatus, &ss);
+ }
+}
+
+BOOL WINAPI
+OnConsoleEvent(
+ DWORD dwCtrlType
+ )
+{
+ switch (dwCtrlType) {
+#ifdef DEBUG
+ case CTRL_BREAK_EVENT:
+ if (debug > 0) {
+ debug <<= 1;
+ }
+ else {
+ debug = 1;
+ }
+ if (debug > 8) {
+ debug = 0;
+ }
+ msyslog(LOG_DEBUG, "debug level %d", debug);
+ break;
+#else
+ case CTRL_BREAK_EVENT:
+ break;
+#endif
+
+ case CTRL_C_EVENT:
+ case CTRL_CLOSE_EVENT:
+ case CTRL_SHUTDOWN_EVENT:
+ if (WaitableExitEventHandle != NULL) {
+ SetEvent(WaitableExitEventHandle);
+ Sleep(100); //##++
+ }
+ break;
+
+ default :
+ /* pass to next handler */
+ return FALSE;
+ }
+
+ /* we've handled it, no more handlers should be called */
+ return TRUE;
+}
+
diff --git a/ports/winnt/ntptrace/ntptrace.dsp b/ports/winnt/ntptrace/ntptrace.dsp
new file mode 100644
index 000000000000..ed8616a37802
--- /dev/null
+++ b/ports/winnt/ntptrace/ntptrace.dsp
@@ -0,0 +1,153 @@
+# Microsoft Developer Studio Project File - Name="ntptrace" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ntptrace - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ntptrace.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ntptrace.mak" CFG="ntptrace - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ntptrace - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ntptrace - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""$/ntp/dev/ports/winnt/ntptrace", AXBAAAAA"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ntptrace - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MT /W4 /GX /O2 /I "\\" /I "$(OPENSSL)\inc32" /I "." /I "..\include" /I "..\..\..\include" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "__STDC__" /D "SYS_WINNT" /D "HAVE_CONFIG_H" /D _WIN32_WINNT=0x400 /YX"windows.h" /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "ntptrace - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "." /I "..\include" /I "..\..\..\include" /I "$(OPENSSL)\inc32" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "__STDC__" /D "SYS_WINNT" /D "HAVE_CONFIG_H" /D _WIN32_WINNT=0x400 /FR /YX"windows.h" /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/Debug/ntptrace.exe" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "ntptrace - Win32 Release"
+# Name "ntptrace - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\ntptrace\ntptrace.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\libntp\util_clockstuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\version.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\include\sys\ioctl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\ntptrace\ntptrace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\sys\resource.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=..\..\..\configure
+
+!IF "$(CFG)" == "ntptrace - Win32 Release"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=..\..\..\configure
+
+"$(ProjDir)\version.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ echo Using NT Shell Script to generate version.c
+ ..\scripts\mkver.bat -P ntptrace
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "ntptrace - Win32 Debug"
+
+# Begin Custom Build
+ProjDir=.
+InputPath=..\..\..\configure
+
+"$(ProjDir)\version.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ echo Using NT Shell Script to generate version.c
+ ..\scripts\mkver.bat -P ntptrace
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
diff --git a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h
new file mode 100644
index 000000000000..1007ccdd90c3
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h
@@ -0,0 +1,714 @@
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2000 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and *
+ * its documentation for any purpose and with or 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This modified timepps.h can be used to provide a PPSAPI interface *
+ * to a machine running Windows with a suitably modified *
+ * serialpps.sys being used in place of serial.sys. It can *
+ * be extended to support a modified parallel port driver once *
+ * available. *
+ * *
+ * This Windows version was derived by Dave Hart *
+ * <davehart@davehart.com> from Mills' timepps-Solaris.h *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+#ifndef _SYS_TIMEPPS_H_
+#define _SYS_TIMEPPS_H_
+
+/* Implementation note: the logical states ``assert'' and ``clear''
+ * are implemented in terms of the UART register, i.e. ``assert''
+ * means the bit is set.
+ */
+
+/*
+ * The following definitions are architecture independent
+ */
+
+#define PPS_API_VERS_1 1 /* API version number */
+#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
+#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
+#define PPS_FRAC 4294967296. /* 2^32 as a double */
+#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
+#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
+
+#define PPS_NORMALIZE(x) /* normalize timespec */ \
+ do { \
+ if ((x).tv_nsec >= PPS_NANOSECOND) { \
+ (x).tv_nsec -= PPS_NANOSECOND; \
+ (x).tv_sec++; \
+ } else if ((x).tv_nsec < 0) { \
+ (x).tv_nsec += PPS_NANOSECOND; \
+ (x).tv_sec--; \
+ } \
+ } while (0)
+
+#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
+ do { \
+ double d_temp; \
+ \
+ (x).integral += (unsigned int)PPS_JAN_1970; \
+ d_temp = (x).fractional * PPS_FRAC / PPS_NANOSECOND; \
+ if (d_temp >= PPS_FRAC) \
+ (x).integral++; \
+ (x).fractional = (unsigned int)d_temp; \
+ } while (0)
+
+#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
+ do { \
+ double d_temp; \
+ \
+ (x).tv_sec -= (time_t)PPS_JAN_1970; \
+ d_temp = (double)((x).tv_nsec); \
+ d_temp *= PPS_NANOSECOND; \
+ d_temp /= PPS_FRAC; \
+ (x).tv_nsec = (long)d_temp; \
+ } while (0)
+
+
+/*
+ * Device/implementation parameters (mode)
+ */
+
+#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
+#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
+#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
+
+#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
+#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
+#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
+
+#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
+#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
+
+/*
+ * Kernel actions (mode)
+ */
+
+#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
+#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
+
+/*
+ * Timestamp formats (tsformat)
+ */
+
+#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
+#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
+
+/*
+ * Kernel discipline actions (not used in Windows yet)
+ */
+
+#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
+#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
+#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
+
+/*
+ * Type definitions
+ */
+
+typedef unsigned long pps_seq_t; /* sequence number */
+
+#pragma warning(push)
+#pragma warning(disable: 201) /* nonstd extension nameless union */
+
+typedef struct ntp_fp {
+ union ntp_fp_sec {
+ unsigned int integral;
+ int s_integral;
+ };
+ unsigned int fractional;
+} ntp_fp_t; /* NTP-compatible time stamp */
+
+#pragma warning(pop)
+
+typedef union pps_timeu { /* timestamp format */
+ struct timespec tspec;
+ ntp_fp_t ntpfp;
+ unsigned long longpad[3];
+} pps_timeu_t; /* generic data type to represent time stamps */
+
+/* addition of NTP fixed-point format */
+
+#define NTPFP_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 NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->integral, (r)->fractional, \
+ (a)->s_integral, (a)->fractional)
+
+
+/*
+ * Timestamp information structure
+ */
+
+typedef struct pps_info {
+ pps_seq_t assert_sequence; /* seq. num. of assert event */
+ pps_seq_t clear_sequence; /* seq. num. of clear event */
+ pps_timeu_t assert_tu; /* time of assert event */
+ pps_timeu_t clear_tu; /* time of clear event */
+ int current_mode; /* current mode bits */
+} pps_info_t;
+
+#define assert_timestamp assert_tu.tspec
+#define clear_timestamp clear_tu.tspec
+
+#define assert_timestamp_ntpfp assert_tu.ntpfp
+#define clear_timestamp_ntpfp clear_tu.ntpfp
+
+/*
+ * Parameter structure
+ */
+
+typedef struct pps_params {
+ int api_version; /* API version # */
+ int mode; /* mode bits */
+ pps_timeu_t assert_off_tu; /* offset compensation for assert */
+ pps_timeu_t clear_off_tu; /* offset compensation for clear */
+} pps_params_t;
+
+#define assert_offset assert_off_tu.tspec
+#define clear_offset clear_off_tu.tspec
+
+#define assert_offset_ntpfp assert_off_tu.ntpfp
+#define clear_offset_ntpfp clear_off_tu.ntpfp
+
+/*
+ * The following definitions are architecture-dependent
+ */
+
+#define PPS_CAP (PPS_CAPTUREASSERT | PPS_OFFSETASSERT | PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
+#define PPS_RO (PPS_CANWAIT | PPS_CANPOLL)
+
+typedef struct {
+ int filedes; /* file descriptor */
+ OVERLAPPED ol; /* caches ol.hEvent for DeviceIoControl */
+ pps_params_t params; /* PPS parameters set by user */
+} pps_unit_t;
+
+typedef pps_unit_t* pps_handle_t; /* pps handlebars */
+
+/*
+ *------ Here begins the implementation-specific part! ------
+ */
+
+#include <windows.h>
+#include <errno.h>
+
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 45
+#endif
+
+typedef struct _OLD_SERIAL_PPS_STAMPS {
+ LARGE_INTEGER Timestamp;
+ LARGE_INTEGER Counterstamp;
+} OLD_SERIAL_PPS_STAMPS, *POLDSERIAL_PPS_STAMPS;
+
+typedef struct _SERIAL_PPS_STAMPS {
+ LARGE_INTEGER Timestamp;
+ LARGE_INTEGER Counterstamp;
+ DWORD SeqNum;
+} SERIAL_PPS_STAMPS, *PSERIAL_PPS_STAMPS;
+
+#define IOCTL_SERIAL_GET_PPS_STAMPS CTL_CODE(FILE_DEVICE_SERIAL_PORT,114,METHOD_BUFFERED,FILE_ANY_ACCESS)
+
+/* byte offset of member m in struct typedef s */
+#define PPS_OFFSETOF(m,s) (size_t)(&((s *)0)->m)
+
+/*
+ * ntpd on Windows only looks to errno after finding
+ * GetLastError returns NO_ERROR. To accomodate its
+ * use of msyslog in portable code such as refclock_atom.c,
+ * this implementation always clears the Windows
+ * error code using SetLastError(NO_ERROR) when
+ * returning an errno. This is also a good idea
+ * for any non-ntpd clients as they should use only
+ * the errno for PPSAPI functions.
+ */
+#define RETURN_PPS_ERRNO(e) \
+do { \
+ SetLastError(NO_ERROR); \
+ errno = (e); \
+ return -1; \
+} while (0)
+
+
+#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
+extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
+#else
+/*
+ * helper routine for serialpps.sys ioctl which returns
+ * performance counter "timestamp" as well as a system
+ * FILETIME timestamp. Converts one of the inputs to
+ * NTP fixed-point format.
+ */
+static inline void
+pps_ntp_timestamp_from_counter(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp)
+{
+ ULONGLONG BiasedTimestamp;
+
+ /* convert from 100ns units to NTP fixed point format */
+
+ BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
+ result->integral = PPS_JAN_1970 +
+ (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
+ result->fractional =
+ (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
+ (PPS_FRAC / PPS_HECTONANOSECONDS));
+}
+#endif
+
+
+/*
+ * create PPS handle from file descriptor
+ */
+
+static inline int
+time_pps_create(
+ int filedes, /* file descriptor */
+ pps_handle_t *handle /* returned handle */
+ )
+{
+ OLD_SERIAL_PPS_STAMPS old_pps_stamps;
+ DWORD bytes;
+ OVERLAPPED ol;
+
+ /*
+ * Check for valid arguments and attach PPS signal.
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ if (PPS_OFFSETOF(tspec.tv_nsec, pps_timeu_t) !=
+ PPS_OFFSETOF(ntpfp.fractional, pps_timeu_t)) {
+ fprintf(stderr,
+ "timepps.h needs work, union of \n"
+ "unsigned int ntp_fp.integral and\n"
+ "time_t timespec.tv_sec accessed\n"
+ "interchangeably.\n");
+ RETURN_PPS_ERRNO(EFAULT);
+ }
+
+ /*
+ * For this ioctl which will never block, we don't want to go
+ * through the overhead of a completion port, so we use an
+ * event handle in the overlapped structure with its 1 bit set.
+ *
+ * From GetQueuedCompletionStatus docs:
+ * Even if you have passed the function a file handle associated
+ * with a completion port and a valid OVERLAPPED structure, an
+ * application can prevent completion port notification. This is
+ * done by specifying a valid event handle for the hEvent member
+ * of the OVERLAPPED structure, and setting its low-order bit. A
+ * valid event handle whose low-order bit is set keeps I/O
+ * completion from being queued to the completion port.
+ */
+
+ ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ ol.hEvent = (HANDLE) ((ULONG_PTR)ol.hEvent | 1);
+
+ if (FALSE == DeviceIoControl(
+ (HANDLE)_get_osfhandle(filedes),
+ IOCTL_SERIAL_GET_PPS_STAMPS,
+ NULL,
+ 0,
+ &old_pps_stamps,
+ sizeof(old_pps_stamps),
+ &bytes,
+ &ol)
+ || sizeof(old_pps_stamps) != bytes) {
+
+ /*
+ * If you want to write some dead code this could detect the
+ * IOCTL being pended, but the driver always has the info
+ * instantly, so ERROR_IO_PENDING isn't a concern.
+ */
+
+ CloseHandle(ol.hEvent);
+ fprintf(stderr,
+ "time_pps_create: IOCTL_SERIAL_GET_PPS_STAMPS: %d %d\n",
+ bytes,
+ GetLastError());
+ RETURN_PPS_ERRNO(ENXIO);
+ }
+
+ /*
+ * Allocate and initialize default unit structure.
+ */
+
+ *handle = malloc(sizeof(pps_unit_t));
+ if (!(*handle))
+ RETURN_PPS_ERRNO(ENOMEM);
+
+ memset(*handle, 0, sizeof(pps_unit_t));
+ (*handle)->filedes = filedes;
+ (*handle)->ol.hEvent = ol.hEvent;
+ (*handle)->params.api_version = PPS_API_VERS_1;
+ (*handle)->params.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC;
+ return (0);
+}
+
+/*
+ * release PPS handle
+ */
+
+static inline int
+time_pps_destroy(
+ pps_handle_t handle
+ )
+{
+ /*
+ * Check for valid arguments and detach PPS signal.
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ CloseHandle(handle->ol.hEvent);
+ free(handle);
+ return (0);
+}
+
+/*
+ * set parameters for handle
+ */
+
+static inline int
+time_pps_setparams(
+ pps_handle_t handle,
+ const pps_params_t *params
+ )
+{
+ int mode, mode_in;
+ /*
+ * Check for valid arguments and set parameters.
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (!params)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ /*
+ * There was no reasonable consensu in the API working group.
+ * I require `api_version' to be set!
+ */
+
+ if (params->api_version != PPS_API_VERS_1)
+ RETURN_PPS_ERRNO(EINVAL);
+
+ /*
+ * only settable modes are PPS_CAPTUREASSERT and PPS_OFFSETASSERT
+ */
+
+ mode_in = params->mode;
+
+ /*
+ * Only one of the time formats may be selected
+ * if a nonzero assert offset is supplied.
+ */
+ if ((mode_in & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) ==
+ (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) {
+
+ if (handle->params.assert_offset.tv_sec ||
+ handle->params.assert_offset.tv_nsec)
+
+ RETURN_PPS_ERRNO(EINVAL);
+
+ /*
+ * If no offset was specified but both time
+ * format flags are used consider it harmless
+ * but turn off PPS_TSFMT_NTPFP so getparams
+ * will not show both formats lit.
+ */
+ mode_in &= ~PPS_TSFMT_NTPFP;
+ }
+
+ /* turn off read-only bits */
+
+ mode_in &= ~PPS_RO;
+
+ /*
+ * test remaining bits, should only have captureassert,
+ * offsetassert, and/or timestamp format bits.
+ */
+
+ if (mode_in & ~(PPS_CAPTUREASSERT | PPS_OFFSETASSERT |
+ PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
+ RETURN_PPS_ERRNO(EOPNOTSUPP);
+
+ /*
+ * ok, ready to go.
+ */
+
+ mode = handle->params.mode;
+ handle->params = *params;
+ handle->params.mode = mode | mode_in;
+ handle->params.api_version = PPS_API_VERS_1;
+ return (0);
+}
+
+/*
+ * get parameters for handle
+ */
+
+static inline int
+time_pps_getparams(
+ pps_handle_t handle,
+ pps_params_t *params
+ )
+{
+ /*
+ * Check for valid arguments and get parameters.
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (!params)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *params = handle->params;
+ return (0);
+}
+
+/* (
+ * get capabilities for handle
+ */
+
+static inline int
+time_pps_getcap(
+ pps_handle_t handle,
+ int *mode
+ )
+{
+ /*
+ * Check for valid arguments and get capabilities.
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (!mode)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *mode = PPS_CAP;
+ return (0);
+}
+
+/*
+ * Fetch timestamps
+ */
+
+static inline int
+time_pps_fetch(
+ pps_handle_t handle,
+ const int tsformat,
+ pps_info_t *ppsinfo,
+ const struct timespec *timeout
+ )
+{
+ SERIAL_PPS_STAMPS pps_stamps;
+ pps_info_t infobuf;
+ BOOL rc;
+ DWORD bytes;
+ DWORD lasterr;
+
+ /*
+ * Check for valid arguments and fetch timestamps
+ */
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (!ppsinfo)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ /*
+ * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
+ * ignore the timeout variable.
+ */
+
+ memset(&infobuf, 0, sizeof(infobuf));
+
+ /*
+ * if not captureassert, nothing to return.
+ */
+
+ if (!handle->params.mode & PPS_CAPTUREASSERT) {
+ *ppsinfo = infobuf;
+ return (0);
+ }
+
+ /*
+ * First rev of serialpps.sys didn't support the SeqNum field,
+ * support it by simply returning constant 0 for serial in that case.
+ */
+ pps_stamps.SeqNum = 0;
+
+ /*
+ * interrogate (hopefully) serialpps.sys
+ * if it's the standard serial.sys or another driver,
+ * IOCTL_SERIAL_GET_PPS_STAMPS is most likely unknown
+ * and will result in ERROR_INVALID_PARAMETER.
+ */
+ bytes = 0;
+
+ rc = DeviceIoControl(
+ (HANDLE)_get_osfhandle(handle->filedes),
+ IOCTL_SERIAL_GET_PPS_STAMPS,
+ NULL,
+ 0,
+ &pps_stamps,
+ sizeof(pps_stamps),
+ &bytes,
+ &handle->ol);
+
+ if (!rc) {
+
+ lasterr = GetLastError();
+ if (ERROR_INVALID_PARAMETER != lasterr)
+ fprintf(stderr, "time_pps_fetch: ioctl err %d\n",
+ lasterr);
+ RETURN_PPS_ERRNO(EOPNOTSUPP);
+
+ } else if (bytes != sizeof(pps_stamps) &&
+ bytes != sizeof(OLD_SERIAL_PPS_STAMPS)) {
+
+ fprintf(stderr,
+ "time_pps_fetch: wanted %d or %d bytes got %d from "
+ "IOCTL_SERIAL_GET_PPS_STAMPS 0x%x\n" ,
+ sizeof(OLD_SERIAL_PPS_STAMPS),
+ sizeof(SERIAL_PPS_STAMPS),
+ bytes,
+ IOCTL_SERIAL_GET_PPS_STAMPS);
+ RETURN_PPS_ERRNO(ENXIO);
+ }
+
+ /*
+ * pps_ntp_timestamp_from_counter takes the two flavors
+ * of timestamp we have (counter and system time) and
+ * uses whichever it can to give the best NTP fixed-point
+ * conversion. In ntpd the Counterstamp is typically
+ * used. A stub implementation in this file simply
+ * converts from Windows Timestamp to NTP fixed-point.
+ */
+ pps_ntp_timestamp_from_counter(
+ &infobuf.assert_timestamp_ntpfp,
+ pps_stamps.Timestamp.QuadPart,
+ pps_stamps.Counterstamp.QuadPart);
+
+ /*
+ * Note that only assert timestamps
+ * are captured by this interface.
+ */
+
+ infobuf.assert_sequence = pps_stamps.SeqNum;
+
+ /*
+ * Apply offset and translate to specified format
+ */
+
+ switch (tsformat) {
+ case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
+ if (handle->params.mode & PPS_OFFSETASSERT) {
+ NTPFP_L_ADDS(&infobuf.assert_timestamp_ntpfp,
+ &handle->params.assert_offset_ntpfp);
+ }
+ break;
+
+ case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
+ PPS_NTPTOTSPEC(infobuf.assert_timestamp);
+ if (handle->params.mode & PPS_OFFSETASSERT) {
+ infobuf.assert_timestamp.tv_sec +=
+ handle->params.assert_offset.tv_sec;
+ infobuf.assert_timestamp.tv_nsec +=
+ handle->params.assert_offset.tv_nsec;
+ PPS_NORMALIZE(infobuf.assert_timestamp);
+ }
+ break;
+
+ default:
+ RETURN_PPS_ERRNO(EINVAL);
+ }
+
+ infobuf.current_mode = handle->params.mode;
+ *ppsinfo = infobuf;
+ return (0);
+}
+
+/*
+ * time_pps_kcbind - specify kernel consumer
+ *
+ * Not supported so far by Windows.
+ */
+
+static inline int
+time_pps_kcbind(
+ pps_handle_t handle,
+ const int kernel_consumer,
+ const int edge, const int tsformat
+ )
+{
+ /*
+ * Check for valid arguments before revealing the ugly truth
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ RETURN_PPS_ERRNO(EOPNOTSUPP);
+}
+
+
+
+#endif /* _SYS_TIMEPPS_H_ */
diff --git a/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt
new file mode 100644
index 000000000000..e335d4dfd9a1
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt
@@ -0,0 +1,52 @@
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2000 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and *
+ * its documentation for any purpose and with or 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This modified timepps.h can be used to provide a PPSAPI interface *
+ * to a machine running Windows with a suitably modified *
+ * serialpps.sys being used in place of serial.sys. It can *
+ * be extended to support a modified parallel port driver once *
+ * available. *
+ * *
+ * This Windows version was derived by Dave Hart *
+ * <davehart@davehart.com> from Mills' timepps-Solaris.h *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+timepps.h implements IETF RFC "Pulse-Per-Second API for UNIX-like
+Operating Systems, Version 1.0" for Microsoft Windows.
+
+
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c
new file mode 100644
index 000000000000..4a708f4c0b5b
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c
@@ -0,0 +1,465 @@
+/*
+ * loopback-ppsapi-provider.c - derived from monolithic timepps.h
+ * for usermode PPS by Juergen Perlinger
+ */
+
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2009 *
+ * *
+ * 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This serialpps-ppsapi-provider.dll implements the PPSAPI provider *
+ * for serialpps.sys, which is a very lightly patched Windows *
+ * serial.sys with CD timestamping support.
+ * *
+ * This Windows version was derived by Dave Hart *
+ * <davehart@davehart.com> from David L. Mills' timepps-Solaris.h *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+/*
+ * Implementation note: the logical states ``assert'' and ``clear''
+ * are implemented in terms of the UART register, i.e. ``assert''
+ * means the bit is set. This follows the sense of the serial driver
+ * of the Windows OS, and is opposite of the RS-232 spec for the
+ * CD/DCD logical state.
+ */
+
+
+#define PPSAPI_PROVIDER_EXPORTS
+#include "loopback-ppsapi.h"
+
+/*
+** global stuff
+*/
+
+pcreate_pps_handle p_create_pps_handle;
+
+#define SERIALPPS_CAPS (PPS_CAPTUREBOTH | PPS_OFFSETBOTH | PPS_TSFMT_BOTH)
+#define SERIALPPS_RO (PPS_CANWAIT | PPS_CANPOLL)
+
+
+/*
+ * The ntp_timestamp_from_counter callback into timepps.h routines in
+ * the host is saved in each unit separately, so that binaries that
+ * inline timepps.h into multiple source files (such as refclock_atom.c
+ * and a number of other ntpd refclocks including refclock_nmea.c) will
+ * get called back in the correct instance for each unit. This assumes
+ * that ppsapi_prov_init for subsequent instances happens only after the
+ * first instance has completed all time_pps_create() calls it will
+ * invoke, which is a safe assumption at least for ntpd.
+ */
+struct loopback_unit {
+ HANDLE hnd_dev; /* true device handle */
+ HANDLE hnd_pps; /* loopback handle */
+ ntp_fp_t ofs_assert; /* correction for assert*/
+ ntp_fp_t ofs_clear; /* correction for clear */
+};
+typedef struct loopback_unit loopback_unit;
+
+/*
+ * --------------------------------------------------------------------
+ * DllMain - DLL entrypoint, no-op.
+ * --------------------------------------------------------------------
+ */
+BOOL APIENTRY DllMain(
+ HMODULE hModule,
+ DWORD why,
+ LPVOID lpReserved
+ )
+{
+ UNUSED(hModule);
+ UNUSED(lpReserved);
+ UNUSED(why);
+
+ return TRUE;
+}
+
+/*
+ * --------------------------------------------------------------------
+ * time conversion and other helpers
+ * --------------------------------------------------------------------
+ */
+
+/* --------------------------------------------------------------------
+ * convert fixed point time stamp to struct timespec, with proper
+ * Epoch/Era unfolding around the current time.
+ */
+static struct timespec
+fp_stamp_to_tspec(
+ ntp_fp_t x,
+ time_t p
+ )
+{
+ struct timespec out;
+ u_int64 tmp;
+ u_int32 ntp;
+
+ ntp = x.I.u;
+ tmp = p;
+ tmp -= 0x80000000u; /* unshift of half range */
+ ntp -= (u_int32)PPS_JAN_1970; /* warp into UN*X domain */
+ ntp -= (u_int32)tmp; /* cycle difference */
+ tmp += (u_int64)ntp; /* get expanded time */
+ out.tv_sec = (time_t)tmp;
+ out.tv_nsec = ((long)(((u_int64)x.F.u * PPS_NANOSECOND + 0x80000000u) >> 32));
+ if (out.tv_nsec >= PPS_NANOSECOND) {
+ out.tv_nsec -= PPS_NANOSECOND;
+ out.tv_sec++;
+ }
+
+ return out;
+}
+
+/* --------------------------------------------------------------------
+ * convert a duration in struct timespec format to
+ * fixed point representation.
+ */
+static ntp_fp_t
+tspec_to_fp(
+ const struct timespec * ts
+ )
+{
+ ntp_fp_t out;
+ long tmp;
+
+ out.I.u = (u_int32)ts->tv_sec;
+ tmp = ts->tv_nsec;
+ if (tmp < 0)
+ do {
+ tmp += PPS_NANOSECOND;
+ out.I.u--;
+ } while (tmp < 0);
+ else if (tmp >= PPS_NANOSECOND)
+ do {
+ tmp -= PPS_NANOSECOND;
+ out.I.u++;
+ } while (tmp >= PPS_NANOSECOND);
+ out.F.u = (u_int32)((u_int64)tmp << 32) + (PPS_NANOSECOND / 2) / PPS_NANOSECOND;
+ return out;
+}
+
+/* --------------------------------------------------------------------
+ * count number of '1' bits in a u_long
+ */
+static size_t
+popcount(
+ u_long val
+ )
+{
+ size_t res;
+
+ for (res = 0; val; res++)
+ val &= (val - 1);
+ return res;
+}
+
+/*
+ * --------------------------------------------------------------------
+ * API function implementation
+ * --------------------------------------------------------------------
+ */
+
+/* --------------------------------------------------------------------
+ * prov_time_pps_create - create PPS handle given underlying device
+ */
+int WINAPI
+prov_time_pps_create(
+ HANDLE device, /* underlying device */
+ pps_handle_t * handle /* returned handle */
+ )
+{
+ loopback_unit * loopunit;
+ pps_unit_t * punit;
+
+ /*
+ * Allocate and initialize loopback unit structure.
+ */
+ loopunit = (loopback_unit*)calloc(1, sizeof(loopback_unit));
+ if (NULL == loopunit)
+ return ENOMEM;
+
+ /* Try to attach to NTPD internal data with the device handle.
+ * Free unit buffer on failure.
+ */
+ loopunit->hnd_dev = device;
+ loopunit->hnd_pps = ntp_pps_attach_device(device);
+ if (NULL == loopunit->hnd_pps) {
+ free(loopunit);
+ return ENXIO;
+ }
+
+ /* create the outer PPS handle structure. Undo work done so far
+ * if things go wrong.
+ */
+ *handle = (*p_create_pps_handle)(loopunit);
+ if (!*handle) {
+ ntp_pps_detach_device(loopunit->hnd_pps);
+ free(loopunit);
+ return ENOMEM;
+ }
+
+ /* All good so far. Store things to remember. */
+ punit = (pps_unit_t *)*handle;
+ punit->params.api_version = PPS_API_VERS_1;
+ punit->params.mode = PPS_CAPTUREBOTH | PPS_TSFMT_BOTH;
+ return 0;
+}
+
+
+/* --------------------------------------------------------------------
+ * prov_time_pps_destroy - release PPS handle
+ */
+int WINAPI
+prov_time_pps_destroy(
+ pps_unit_t * unit,
+ void * context
+ )
+{
+ loopback_unit * loopunit;
+
+ loopunit = (loopback_unit*)context;
+ if (unit->context == context)
+ unit->context = NULL;
+ if (NULL != loopunit)
+ ntp_pps_detach_device(loopunit->hnd_pps);
+ free(loopunit);
+ return 0;
+}
+
+
+/* --------------------------------------------------------------------
+ * prov_time_pps_setparams - set parameters for handle
+ */
+int WINAPI
+prov_time_pps_setparams(
+ pps_unit_t * unit,
+ void * context,
+ const pps_params_t * params
+ )
+{
+ loopback_unit * loopunit;
+ int mode;
+
+ loopunit = (loopback_unit*)context;
+ mode = params->mode;
+
+ /*
+ * There was no reasonable consensus in the API working group.
+ * I require `api_version' to be set!
+ */
+ if (params->api_version != PPS_API_VERS_1)
+ return EINVAL;
+
+ /*
+ * We support all edges and formats plus offsets, but not
+ * POLL or WAIT. And we are strict on the time stamp format:
+ * Only one is permitted if we set offsets!
+ */
+
+ /*
+ * Only one of the time formats may be selected.
+ */
+ if ((mode & PPS_OFFSETBOTH) != 0 &&
+ popcount(mode & PPS_TSFMT_BOTH) != 1 )
+ return EINVAL;
+
+ /* turn off read-only bits */
+ mode &= ~SERIALPPS_RO;
+
+ /*
+ * test remaining bits.
+ */
+ if (mode & ~(PPS_CAPTUREBOTH | PPS_OFFSETBOTH | PPS_TSFMT_BOTH))
+ return EOPNOTSUPP;
+
+ /*
+ * ok, ready to go.
+ *
+ * calculate offsets as ntp_fp_t's and store them in unit as ntp_fp_t. They will
+ * be always applied, since fetching the time stamps is not critical.
+ */
+ if (mode & PPS_OFFSETASSERT) {
+ if (mode & PPS_TSFMT_TSPEC)
+ loopunit->ofs_assert = tspec_to_fp(&params->assert_offset);
+ else
+ loopunit->ofs_assert = params->assert_offset_ntpfp;
+ }
+ if (mode & PPS_OFFSETCLEAR) {
+ if (mode & PPS_TSFMT_TSPEC)
+ loopunit->ofs_clear = tspec_to_fp(&params->clear_offset);
+ else
+ loopunit->ofs_clear = params->clear_offset_ntpfp;
+ }
+ /* save remaining bits */
+ mode |= unit->params.mode;
+ unit->params = *params;
+ unit->params.mode = mode;
+
+ return 0;
+}
+
+
+/* --------------------------------------------------------------------
+ * prov_time_pps_fetch - Fetch timestamps
+ */
+
+int WINAPI
+prov_time_pps_fetch(
+ pps_unit_t * unit,
+ void * context,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * timeout
+ )
+{
+ loopback_unit * loopunit;
+ PPSData_t pps_stamps;
+ pps_info_t infobuf;
+ BOOL rc;
+ time_t tnow;
+
+ /*
+ * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
+ * ignore the timeout variable.
+ */
+ UNUSED(timeout);
+ loopunit = (loopback_unit*)context;
+
+ /* read & check raw data from daemon */
+ memset(&infobuf, 0, sizeof(infobuf));
+ rc = ntp_pps_read(loopunit->hnd_pps, &pps_stamps, sizeof(pps_stamps));
+ if (!rc) {
+ switch (GetLastError())
+ {
+ case ERROR_INVALID_HANDLE:
+ return EINVAL;
+ case ERROR_INVALID_PARAMETER:
+ return EOPNOTSUPP;
+ case ERROR_INVALID_DATA:
+ return ENXIO;
+ default:
+ return EINVAL;
+ }
+ }
+
+ /* add offsets on raw data */
+ NTPFP_L_ADDS(&pps_stamps.ts_assert, &loopunit->ofs_assert);
+ NTPFP_L_ADDS(&pps_stamps.ts_clear , &loopunit->ofs_clear);
+
+ /* store sequence numbers */
+ infobuf.assert_sequence = pps_stamps.cc_assert;
+ infobuf.clear_sequence = pps_stamps.cc_clear;
+
+ /*
+ * Translate or copy to specified format
+ */
+ switch (tsformat) {
+ case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
+ infobuf.assert_timestamp_ntpfp = pps_stamps.ts_assert;
+ infobuf.clear_timestamp_ntpfp = pps_stamps.ts_clear;
+ break;
+
+ case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
+ time(&tnow);
+ infobuf.assert_timestamp = fp_stamp_to_tspec(pps_stamps.ts_assert, tnow);
+ infobuf.clear_timestamp = fp_stamp_to_tspec(pps_stamps.ts_clear, tnow);
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ infobuf.current_mode = unit->params.mode;
+ *pinfo = infobuf;
+
+ return 0;
+}
+
+
+/* --------------------------------------------------------------------
+ * prov_time_pps_kcbind - specify kernel consumer
+ *
+ * Not supported so far by Windows.
+ */
+int WINAPI
+prov_time_pps_kcbind(
+ pps_unit_t * punit,
+ void * context,
+ const int kernel_consumer,
+ const int edge,
+ const int tsformat
+ )
+{
+ UNUSED(punit);
+ UNUSED(context);
+ UNUSED(kernel_consumer);
+ UNUSED(edge);
+ UNUSED(tsformat);
+
+ return EOPNOTSUPP;
+}
+
+
+/* --------------------------------------------------------------------
+ * prov_init - returns capabilities and provider name
+ */
+int WINAPI
+ppsapi_prov_init(
+ int ppsapi_timepps_prov_ver,
+ pcreate_pps_handle create_pps_handle,
+ ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
+ char * short_name_buf,
+ size_t short_name_size,
+ char * full_name_buf,
+ size_t full_name_size
+ )
+{
+ UNUSED(ntp_timestamp_from_counter);
+
+ if (ppsapi_timepps_prov_ver < PPSAPI_TIMEPPS_PROV_VER)
+ return 0;
+
+ p_create_pps_handle = create_pps_handle;
+
+ strncpy(short_name_buf, "loopback", short_name_size);
+ short_name_buf[short_name_size - 1] ='\0'; /* ensure ASCIIZ */
+ strncpy(full_name_buf,
+ "loopback user mode DCD change detection",
+ full_name_size);
+ full_name_buf[full_name_size - 1] ='\0'; /* ensure ASCIIZ */
+
+ return SERIALPPS_CAPS;
+}
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def
new file mode 100644
index 000000000000..14573a25c3d7
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.def
@@ -0,0 +1,9 @@
+LIBRARY "loopback-ppsapi-provider.dll"
+
+EXPORTS
+ ppsapi_prov_init
+ prov_time_pps_create
+ prov_time_pps_destroy
+ prov_time_pps_fetch
+ prov_time_pps_kcbind
+ prov_time_pps_setparams \ No newline at end of file
diff --git a/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h
new file mode 100644
index 000000000000..5541e333ed3b
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h
@@ -0,0 +1,49 @@
+//
+// serialpps-ppsapi-provider.h
+//
+// For this tiny project the single header serves as a precompiled header
+// as well, meaning all the bulky headers are included before or within it.
+// Within, in this case.
+//
+
+#define _CRT_SECURE_NO_WARNINGS
+#include <stdio.h>
+#include <windows.h>
+typedef __int32 int32;
+typedef unsigned __int32 u_int32;
+typedef __int64 int64;
+typedef unsigned __int64 u_int64;
+#include "timepps.h"
+
+#ifndef UNUSED
+#define UNUSED(item) ((void)(item))
+#endif
+
+/* PPS data structure as captured by the serial line I/O system. This
+ * must match the local definition in 'ntp_iocompletionport.c' or
+ * 'Bad Things (tm)' are bound to happen.
+ */
+struct PpsData {
+ u_long cc_assert;
+ u_long cc_clear;
+ ntp_fp_t ts_assert;
+ ntp_fp_t ts_clear;
+};
+typedef struct PpsData PPSData_t;
+
+/* prototypes imported from the NTPD executable */
+__declspec(dllimport) HANDLE WINAPI ntp_pps_attach_device(HANDLE hndIo);
+__declspec(dllimport) void WINAPI ntp_pps_detach_device(HANDLE ppsHandle);
+__declspec(dllimport) BOOL WINAPI ntp_pps_read(HANDLE ppsHandle, void*, size_t);
+
+/* prototypes exported to the NTPD executable */
+__declspec(dllexport) int WINAPI prov_time_pps_create(HANDLE, pps_handle_t*);
+__declspec(dllexport) int WINAPI prov_time_pps_destroy(pps_unit_t*, void*);
+__declspec(dllexport) int WINAPI prov_time_pps_setparams(pps_unit_t*, void*,
+ const pps_params_t*);
+__declspec(dllexport) int WINAPI prov_time_pps_fetch(pps_unit_t*, void*,
+ const int, pps_info_t*, const struct timespec*);
+__declspec(dllexport) int WINAPI prov_time_pps_kcbind(pps_unit_t*, void*, const int, const int, const int);
+__declspec(dllexport) int WINAPI ppsapi_prov_init(int, pcreate_pps_handle,
+ ppps_ntp_timestamp_from_counter, char*, size_t,
+ char*, size_t);
diff --git a/ports/winnt/ppsapi/loopback/src/sys/time.h b/ports/winnt/ppsapi/loopback/src/sys/time.h
new file mode 100644
index 000000000000..079e5b64431f
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/src/sys/time.h
@@ -0,0 +1,18 @@
+/*
+ * This sys/time.h is part of ppsapi-prov skeleton sample source code
+ * for a Windows PPSAPI provider DLL. It was adapted from
+ * ports/winnt/include/sys/time.h in ntpd.
+ */
+
+#ifndef SYS_TIME_H
+#define SYS_TIME_H
+
+#include <windows.h>
+#include <time.h>
+
+typedef struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+} timespec_t;
+
+#endif /* SYS_TIME_H */
diff --git a/ports/winnt/ppsapi/loopback/src/timepps.h b/ports/winnt/ppsapi/loopback/src/timepps.h
new file mode 100644
index 000000000000..3a7e80662418
--- /dev/null
+++ b/ports/winnt/ppsapi/loopback/src/timepps.h
@@ -0,0 +1,805 @@
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2009 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and *
+ * its documentation for any purpose and with or 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This modified timepps.h can be used to provide a PPSAPI interface *
+ * to a machine running Windows with one or more backend provider DLLs *
+ * implementing the provider interfaces defined herein. *
+ * *
+ * This Windows version was derived by Dave Hart *
+ * <davehart@davehart.com> from Mills' timepps-Solaris.h *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+#ifndef TIMEPPS_H
+#define TIMEPPS_H
+
+#include "sys/time.h" /* in ntp ref source declares struct timespec */
+
+/*
+ * The following definitions are architecture independent
+ */
+
+#define PPS_API_VERS_1 1 /* API version number */
+#define PPS_JAN_1970 2208988800UL /* 1970 - 1900 in seconds */
+#define PPS_NANOSECOND 1000000000L /* one nanosecond in decimal */
+#define PPS_FRAC 4294967296. /* 2^32 as a double */
+#define PPS_HECTONANOSECONDS 10000000 /* 100ns units in a second */
+#define PPS_FILETIME_1970 0x019db1ded53e8000 /* unix epoch to Windows */
+
+#define PPS_NORMALIZE(x) /* normalize timespec */ \
+ do { \
+ while ((x).tv_nsec >= PPS_NANOSECOND) { \
+ (x).tv_nsec -= PPS_NANOSECOND; \
+ (x).tv_sec++; \
+ } \
+ while ((x).tv_nsec < 0) { \
+ (x).tv_nsec += PPS_NANOSECOND; \
+ (x).tv_sec--; \
+ } \
+ } while (0)
+
+#define PPS_TSPECTONTP(x) /* convert timespec to ntp_fp */ \
+ do { \
+ double d_frac; \
+ \
+ d_frac = ((struct timespec)&(x))->tv_nsec \
+ * PPS_FRAC / PPS_NANOSECOND; \
+ (x).integral = ((struct timespec)&(x))->tv_sec \
+ + PPS_JAN_1970; \
+ (x).fractional = (unsigned int)d_frac; \
+ if (d_frac >= PPS_FRAC) \
+ (x).integral++; \
+ } while (0)
+
+#define PPS_NTPTOTSPEC(x) /* convert ntp_fp to timespec */ \
+ do { \
+ double d_frac; \
+ \
+ /* careful, doing in place and tv_sec may be 64bit */ \
+ d_frac = (double)((ntp_fp_t *)&(x))->F.u \
+ * PPS_NANOSECOND / PPS_FRAC; \
+ (x).tv_sec = ((ntp_fp_t *)&(x))->I.u \
+ - (time_t)PPS_JAN_1970; \
+ (x).tv_nsec = (long)d_frac; \
+ } while (0)
+
+
+/*
+ * Device/implementation parameters (mode)
+ */
+
+#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
+#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
+#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
+
+#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */
+#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */
+#define PPS_OFFSETBOTH 0x30 /* apply compensation for both */
+
+#define PPS_CANWAIT 0x100 /* Can we wait for an event? */
+#define PPS_CANPOLL 0x200 /* "This bit is reserved for */
+
+/*
+ * Kernel actions (mode)
+ */
+
+#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
+#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
+
+/*
+ * Timestamp formats (tsformat)
+ */
+
+#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
+#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
+#define PPS_TSFMT_BOTH (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
+
+/*
+ * Kernel discipline actions (not used in Windows yet)
+ */
+
+#define PPS_KC_HARDPPS 0 /* enable kernel consumer */
+#define PPS_KC_HARDPPS_PLL 1 /* phase-lock mode */
+#define PPS_KC_HARDPPS_FLL 2 /* frequency-lock mode */
+
+/*
+ * Type definitions
+ */
+
+typedef unsigned long pps_seq_t; /* sequence number */
+
+#pragma warning(push)
+//#pragma warning(disable: 201) /* nonstd extension nameless union */
+
+typedef struct ntp_fp {
+ union {
+ int32 s;
+ u_int32 u;
+ } I;
+ union {
+ int32 s;
+ u_int32 u;
+ } F;
+} ntp_fp_t; /* NTP-compatible time stamp */
+
+#pragma warning(pop)
+
+typedef union pps_timeu { /* timestamp format */
+ struct timespec tspec;
+ ntp_fp_t ntpfp;
+ unsigned long longpad[3];
+} pps_timeu_t; /* generic data type to represent time stamps */
+
+/* addition of NTP fixed-point format */
+
+#define NTPFP_M_ADD(r_i, r_f, a_i, a_f) /* r += a */ \
+ do { \
+ r_f = (u_int32)(r_f) + (u_int32)(a_f); \
+ r_i = (u_int32)(r_i) + (u_int32)(a_i) + \
+ ((u_int32)(r_f) < (u_int32)(a_f)); \
+ } while (0)
+
+#define NTPFP_L_ADDS(r, a) NTPFP_M_ADD((r)->I.u, (r)->F.u, (a)->I.u, (a)->F.u)
+
+
+/*
+ * Timestamp information structure
+ */
+
+typedef struct pps_info {
+ pps_seq_t assert_sequence; /* seq. num. of assert event */
+ pps_seq_t clear_sequence; /* seq. num. of clear event */
+ pps_timeu_t assert_tu; /* time of assert event */
+ pps_timeu_t clear_tu; /* time of clear event */
+ int current_mode; /* current mode bits */
+} pps_info_t;
+
+#define assert_timestamp assert_tu.tspec
+#define clear_timestamp clear_tu.tspec
+
+#define assert_timestamp_ntpfp assert_tu.ntpfp
+#define clear_timestamp_ntpfp clear_tu.ntpfp
+
+/*
+ * Parameter structure
+ */
+
+typedef struct pps_params {
+ int api_version; /* API version # */
+ int mode; /* mode bits */
+ pps_timeu_t assert_off_tu; /* offset compensation for assert */
+ pps_timeu_t clear_off_tu; /* offset compensation for clear */
+} pps_params_t;
+
+#define assert_offset assert_off_tu.tspec
+#define clear_offset clear_off_tu.tspec
+
+#define assert_offset_ntpfp assert_off_tu.ntpfp
+#define clear_offset_ntpfp clear_off_tu.ntpfp
+
+/*
+ *------ Here begins the implementation-specific part! ------
+ */
+
+#include <windows.h>
+#include <errno.h>
+#include <stddef.h> /* offsetof() */
+#include <io.h> /* _get_osfhandle() */
+
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 45
+#endif
+
+typedef UINT_PTR pps_handle_t; /* pps handlebars */
+
+#ifndef inline
+#define inline __inline
+#endif
+
+/*
+ * ntpd on Windows is typically distributed as a binary as few users
+ * have the tools needed to build from source. Rather than build
+ * a single timepps.h for Windows which knows how to talk to all
+ * PPS implementations frozen in time as of compiling, this timepps.h
+ * allows one or more backend providers to be used by naming a DLL
+ * which exports the provider interfaces defined here.
+ */
+typedef enum ppsapi_magic_tag {
+ PPSAPI_MAGIC_UNIT = 0x70707355, /* ppsU */
+} ppsapi_magic;
+
+typedef struct {
+ struct pps_provider_tag *provider;
+ void * context;/* provider's unit pointer */
+ ppsapi_magic magic; /* to detect invalid handles */
+ pps_params_t params; /* PPS parameters set by user */
+} pps_unit_t;
+
+typedef void (*ppps_ntp_timestamp_from_counter)(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp
+ );
+
+typedef pps_handle_t (*pcreate_pps_handle)(
+ void * prov_context
+ );
+
+/*
+ * ppsapi_prov_init() - exported by backend DLLs
+ *
+ * Return value is pps capabilities available to PPSAPI consumers
+ * via time_pps_getcaps().
+ */
+#define PPSAPI_TIMEPPS_PROV_VER 2
+
+typedef int (WINAPI *pppsapi_prov_init)(
+ int ppsapi_timepps_prov_ver,
+ pcreate_pps_handle create_pps_handle,
+ ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
+ char * short_name_buf,
+ size_t short_name_size,
+ char * full_name_buf,
+ size_t full_name_size
+ );
+
+typedef int (WINAPI *provtime_pps_create)(
+ HANDLE winhandle, /* user device handle */
+ pps_handle_t *phandle /* returned handle */
+ );
+
+typedef int (WINAPI *provtime_pps_destroy)(
+ pps_unit_t * unit,
+ void * context
+ );
+
+typedef int (WINAPI *provtime_pps_setparams)(
+ pps_unit_t * unit,
+ void * context,
+ const pps_params_t * params
+ );
+
+typedef int (WINAPI *provtime_pps_fetch)(
+ pps_unit_t * unit,
+ void * context,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * timeout
+ );
+
+typedef int (WINAPI *provtime_pps_kcbind)(
+ pps_unit_t * unit,
+ void * context,
+ const int kernel_consumer,
+ const int edge,
+ const int tsformat
+ );
+
+typedef struct pps_provider_tag {
+ struct pps_provider_tag *next;
+ int caps;
+ char * short_name;
+ char * full_name;
+ provtime_pps_create ptime_pps_create;
+ provtime_pps_destroy ptime_pps_destroy;
+ provtime_pps_setparams ptime_pps_setparams;
+ provtime_pps_fetch ptime_pps_fetch;
+ provtime_pps_kcbind ptime_pps_kcbind;
+} ppsapi_provider;
+
+static ppsapi_provider * g_provider_list;
+static ppsapi_provider * g_curr_provider;
+
+
+static inline pps_handle_t
+internal_create_pps_handle(
+ void * prov_context
+ )
+{
+ pps_unit_t * punit;
+
+ if (NULL == g_curr_provider) {
+ fprintf(stderr, "create_pps_handle: provider backend called me outside time_pps_create\n");
+ punit = NULL;
+ } else
+ punit = malloc(sizeof(*punit));
+ if (punit != NULL) {
+ punit->provider = g_curr_provider;
+ punit->context = prov_context;
+ punit->magic = PPSAPI_MAGIC_UNIT;
+ memset(&punit->params, 0, sizeof(punit->params));
+ }
+ return (pps_handle_t)punit;
+}
+
+static inline pps_unit_t *
+unit_from_ppsapi_handle(
+ pps_handle_t handle
+ )
+{
+ pps_unit_t *punit;
+
+ punit = (pps_unit_t *)handle;
+ if (PPSAPI_MAGIC_UNIT != punit->magic)
+ punit = NULL;
+ return punit;
+}
+
+/*
+ * ntpd on Windows only looks to errno after finding
+ * GetLastError returns NO_ERROR. To accomodate its
+ * use of msyslog in portable code such as refclock_atom.c,
+ * this implementation always clears the Windows
+ * error code using SetLastError(NO_ERROR) when
+ * returning an errno. This is also a good idea
+ * for any non-ntpd clients as they should rely only
+ * the errno for PPSAPI functions.
+ */
+#define RETURN_PPS_ERRNO(e) \
+do { \
+ SetLastError(NO_ERROR); \
+ errno = (e); \
+ return -1; \
+} while (0)
+
+
+#ifdef OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER
+extern void pps_ntp_timestamp_from_counter(ntp_fp_t *, ULONGLONG, ULONGLONG);
+#else
+/*
+ * helper routine for serialpps.sys ioctl which returns
+ * performance counter "timestamp" as well as a system
+ * FILETIME timestamp. Converts one of the inputs to
+ * NTP fixed-point format.
+ *
+ * You will probably want to supply your own and #define
+ * OWN_PPS_NTP_TIMESTAMP_FROM_COUNTER, as this stub
+ * converts only the low-resolution system timestamp.
+ *
+ * When implementing a provider, use the pointer to this
+ * conversion function supplied to your prov_init(), as
+ * the copy in your DLL will likely be the stub below,
+ * where you want the one provided by the PPSAPI client
+ * such as ntpd.
+ */
+static inline void
+pps_ntp_timestamp_from_counter(
+ ntp_fp_t *result,
+ ULONGLONG Timestamp,
+ ULONGLONG Counterstamp)
+{
+ ULONGLONG BiasedTimestamp;
+
+ /* convert from 100ns units to NTP fixed point format */
+
+ BiasedTimestamp = Timestamp - PPS_FILETIME_1970;
+ result->I.u = PPS_JAN_1970 +
+ (unsigned)(BiasedTimestamp / PPS_HECTONANOSECONDS);
+ result->F.u =
+ (unsigned) ((BiasedTimestamp % PPS_HECTONANOSECONDS) *
+ (PPS_FRAC / PPS_HECTONANOSECONDS));
+}
+#endif
+
+
+static inline int
+load_pps_provider(
+ char * dllpath
+ )
+{
+ char short_name[16];
+ char full_name[64];
+ ppsapi_provider * prov;
+ HMODULE hmod;
+ pppsapi_prov_init pprov_init;
+
+ prov = malloc(sizeof(*prov));
+ if (NULL == prov)
+ return ENOMEM;
+
+ hmod = LoadLibrary(dllpath);
+ if (NULL == hmod) {
+ fprintf(stderr, "load_pps_provider: LoadLibrary(%s) error %u\n", dllpath, GetLastError());
+ free(prov);
+ return ENOENT;
+ }
+
+ pprov_init = (pppsapi_prov_init)GetProcAddress(hmod, "ppsapi_prov_init");
+ if (NULL == pprov_init) {
+ fprintf(stderr, "load_pps_provider: entrypoint ppsapi_prov_init not found in %s\n", dllpath);
+ free(prov);
+ FreeLibrary(hmod);
+ return EFAULT;
+ }
+
+ prov->caps = (*pprov_init)(PPSAPI_TIMEPPS_PROV_VER,
+ &internal_create_pps_handle,
+ &pps_ntp_timestamp_from_counter,
+ short_name, sizeof(short_name),
+ full_name, sizeof(full_name));
+
+ if (!prov->caps) {
+ free(prov);
+ FreeLibrary(hmod);
+ return EACCES;
+ }
+
+ prov->short_name = _strdup(short_name);
+ prov->full_name = _strdup(full_name);
+
+ if (NULL == prov->short_name || !prov->short_name[0]
+ || NULL == prov->full_name || !prov->full_name[0]) {
+
+ if (prov->short_name)
+ free(prov->short_name);
+ if (prov->full_name)
+ free(prov->full_name);
+ free(prov);
+ FreeLibrary(hmod);
+ return EINVAL;
+ }
+
+ prov->ptime_pps_create = (provtime_pps_create)
+ GetProcAddress(hmod, "prov_time_pps_create");
+ prov->ptime_pps_destroy = (provtime_pps_destroy)
+ GetProcAddress(hmod, "prov_time_pps_destroy");
+ prov->ptime_pps_setparams = (provtime_pps_setparams)
+ GetProcAddress(hmod, "prov_time_pps_setparams");
+ prov->ptime_pps_fetch = (provtime_pps_fetch)
+ GetProcAddress(hmod, "prov_time_pps_fetch");
+ prov->ptime_pps_kcbind = (provtime_pps_kcbind)
+ GetProcAddress(hmod, "prov_time_pps_kcbind");
+
+ if (NULL == prov->ptime_pps_create
+ || NULL == prov->ptime_pps_destroy
+ || NULL == prov->ptime_pps_setparams
+ || NULL == prov->ptime_pps_fetch
+ || NULL == prov->ptime_pps_kcbind) {
+
+ fprintf(stderr, "PPSAPI provider %s missing entrypoint\n",
+ prov->short_name);
+ free(prov->short_name);
+ free(prov->full_name);
+ free(prov);
+ FreeLibrary(hmod);
+ return EINVAL;
+ }
+
+ fprintf(stderr, "loaded PPSAPI provider %s caps 0x%x provider %p\n",
+ prov->full_name, prov->caps, prov);
+
+ prov->next = g_provider_list;
+ g_provider_list = prov;
+
+ return 0;
+}
+
+
+/*
+ * time_pps_create - create PPS handle from file descriptor
+ *
+ * This is the initial entrypoint of PPSAPI from the client. Note
+ * to maintain source compatibility with Unix, the input file
+ * descriptor really is a descriptor from the C runtime low-numbered
+ * descriptor namespace, though it may have been converted from a
+ * native Windows HANDLE using _open_osfhandle().
+ */
+static inline int
+time_pps_create(
+ int filedes,/* device file descriptor */
+ pps_handle_t * phandle /* returned handle */
+ )
+{
+ HANDLE winhandle;
+ char * dlls;
+ char * dll;
+ char * pch;
+ ppsapi_provider * prov;
+ pps_handle_t ppshandle;
+ int err;
+
+ if (NULL == phandle)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ winhandle = (HANDLE)_get_osfhandle(filedes);
+ fprintf(stderr, "time_pps_create(%d) got winhandle %p\n", filedes, winhandle);
+ if (INVALID_HANDLE_VALUE == winhandle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ /*
+ * For initial testing the list of PPSAPI backend
+ * providers is provided by the environment variable
+ * PPSAPI_DLLS, separated by semicolons such as
+ * PPSAPI_DLLS=c:\ntp\serial_ppsapi.dll;..\parport_ppsapi.dll
+ * There are a million better ways, such as a well-known
+ * registry key under which a value is created for each
+ * provider DLL installed, or even a platform-specific
+ * ntp.conf directive or command-line switch.
+ */
+ dlls = getenv("PPSAPI_DLLS");
+ if (dlls != NULL && NULL == g_provider_list) {
+ dlls = dll = _strdup(dlls);
+ fprintf(stderr, "getenv(PPSAPI_DLLS) gives %s\n", dlls);
+ } else
+ dlls = dll = NULL;
+
+ while (dll != NULL && dll[0]) {
+ pch = strchr(dll, ';');
+ if (pch != NULL)
+ *pch = 0;
+ err = load_pps_provider(dll);
+ if (err) {
+ fprintf(stderr, "load_pps_provider(%s) got errno %d\n", dll, err);
+ RETURN_PPS_ERRNO(err);
+ }
+ dll = (NULL == pch)
+ ? NULL
+ : pch + 1;
+ }
+
+ if (NULL != dlls)
+ free(dlls);
+ dlls = dll = NULL;
+
+ /*
+ * Hand off to each provider in turn until one returns a PPS
+ * handle or they've all declined.
+ */
+ for (prov = g_provider_list; prov != NULL; prov = prov->next) {
+ ppshandle = 0;
+ g_curr_provider = prov;
+ err = (*prov->ptime_pps_create)(winhandle, &ppshandle);
+ g_curr_provider = NULL;
+ fprintf(stderr, "%s prov_time_pps_create(%p) returned %d\n",
+ prov->short_name, winhandle, err);
+ if (!err && ppshandle) {
+ *phandle = ppshandle;
+ return 0;
+ }
+ }
+
+ fprintf(stderr, "PPSAPI provider list %p\n", g_provider_list);
+
+ RETURN_PPS_ERRNO(ENOEXEC);
+}
+
+
+/*
+ * release PPS handle
+ */
+
+static inline int
+time_pps_destroy(
+ pps_handle_t handle
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_destroy)(punit, punit->context);
+
+ free(punit);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * set parameters for handle
+ */
+
+static inline int
+time_pps_setparams(
+ pps_handle_t handle,
+ const pps_params_t *params
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ /*
+ * Check for valid arguments and set parameters.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == params)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ err = (*punit->provider->ptime_pps_setparams)(punit, punit->context, params);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * get parameters for handle
+ */
+
+static inline int
+time_pps_getparams(
+ pps_handle_t handle,
+ pps_params_t *params_buf
+ )
+{
+ pps_unit_t * punit;
+
+ /*
+ * Check for valid arguments and get parameters.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == params_buf)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *params_buf = punit->params;
+ return 0;
+}
+
+
+/*
+ * time_pps_getcap - get capabilities for handle
+ */
+static inline int
+time_pps_getcap(
+ pps_handle_t handle,
+ int *pmode
+ )
+{
+ pps_unit_t * punit;
+
+ /*
+ * Check for valid arguments and get capabilities.
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == pmode)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ *pmode = punit->provider->caps;
+ return 0;
+}
+
+/*
+ * Fetch timestamps
+ */
+
+static inline int
+time_pps_fetch(
+ pps_handle_t handle,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * ptimeout
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ /*
+ * Check for valid arguments and fetch timestamps
+ */
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ if (NULL == pinfo)
+ RETURN_PPS_ERRNO(EFAULT);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_fetch)(punit,
+ punit->context,
+ tsformat,
+ pinfo,
+ ptimeout);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+/*
+ * time_pps_kcbind - specify kernel consumer
+ *
+ * Not supported so far by Windows.
+ */
+
+static inline int
+time_pps_kcbind(
+ pps_handle_t handle,
+ const int kernel_consumer,
+ const int edge, const int tsformat
+ )
+{
+ pps_unit_t * punit;
+ int err;
+
+ if (!handle)
+ RETURN_PPS_ERRNO(EBADF);
+
+ punit = unit_from_ppsapi_handle(handle);
+
+ if (NULL == punit)
+ RETURN_PPS_ERRNO(EBADF);
+
+ err = (*punit->provider->ptime_pps_kcbind)(
+ punit,
+ punit->context,
+ kernel_consumer,
+ edge,
+ tsformat);
+
+ if (err)
+ RETURN_PPS_ERRNO(err);
+ else
+ return 0;
+}
+
+
+#endif /* TIMEPPS_H */
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c
new file mode 100644
index 000000000000..fe15d2972587
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c
@@ -0,0 +1,382 @@
+/*
+ * skeleton-ppsapi-provider.c - structure but no useful function
+ */
+
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1999-2009 *
+ * *
+ * 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. *
+ * *
+ ***********************************************************************
+ * *
+ * This header file complies with "Pulse-Per-Second API for UNIX-like *
+ * Operating Systems, Version 1.0", rfc2783. Credit is due Jeff Mogul *
+ * and Marc Brett, from whom much of this code was shamelessly stolen. *
+ * *
+ * This skeleton-ppsapi-provider.c implements the PPSAPI provider DLL *
+ * interface but has no actual timestamp-fetching code. It is *
+ * derived from serialpps-ppsapi-provider.c which was derived from *
+ * David L. Mills' timepps.h for Solaris. *
+ * *
+ ***********************************************************************
+ * *
+ * Some of this include file *
+ * Copyright (c) 1999 by Ulrich Windl, *
+ * based on code by Reg Clemens <reg@dwf.com> *
+ * based on code by Poul-Henning Kamp <phk@FreeBSD.org> *
+ * *
+ ***********************************************************************
+ * *
+ * "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 *
+ * *
+ **********************************************************************/
+
+
+#include "skeleton-ppsapi-provider.h"
+
+pcreate_pps_handle p_create_pps_handle;
+ppps_ntp_timestamp_from_counter p_ntp_timestamp_from_counter;
+
+#define SKELPPS_CAPS (PPS_CAPTUREASSERT | PPS_OFFSETASSERT \
+ | PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)
+#define SKELPPS_RO (PPS_CANWAIT | PPS_CANPOLL)
+
+
+/*
+ * The ntp_timestamp_from_counter callback into timepps.h routines in
+ * the host is saved in each unit separately, so that binaries that
+ * inline timepps.h into multiple source files (such as refclock_atom.c
+ * and a number of other ntpd refclocks including refclock_nmea.c) will
+ * get called back in the correct instance for each unit. This assumes
+ * that ppsapi_prov_init for subsequent instances happens only after the
+ * first instance has completed all time_pps_create() calls it will
+ * invoke, which is a safe assumption at least for ntpd.
+ */
+typedef struct skel_unit_tag {
+ HANDLE device;
+ ppps_ntp_timestamp_from_counter p_ntp_timestamp_from_counter;
+} skel_unit;
+
+
+/*
+ * DllMain - DLL entrypoint, no-op.
+ */
+BOOL APIENTRY DllMain(
+ HMODULE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ UNUSED(hModule);
+ UNUSED(ul_reason_for_call);
+ UNUSED(lpReserved);
+
+ return TRUE;
+}
+
+
+/*
+ * prov_time_pps_create - create PPS handle given underlying device
+ */
+int WINAPI
+prov_time_pps_create(
+ HANDLE device, /* underlying device */
+ pps_handle_t * handle /* returned handle */
+ )
+{
+ skel_unit * pskelunit;
+ pps_unit_t * punit;
+
+ /*
+ * Allocate and initialize unit structure.
+ */
+
+ pskelunit = malloc(sizeof(*pskelunit));
+ if (NULL == pskelunit)
+ return ENOMEM;
+
+ pskelunit->device = device;
+ pskelunit->p_ntp_timestamp_from_counter = p_ntp_timestamp_from_counter;
+
+ *handle = (*p_create_pps_handle)(pskelunit);
+ if (*handle) {
+ punit = (pps_unit_t *)*handle;
+ punit->params.api_version = PPS_API_VERS_1;
+ punit->params.mode = PPS_CAPTUREASSERT | PPS_TSFMT_TSPEC;
+ }
+
+ return (*handle)
+ ? 0
+ : ENOMEM;
+}
+
+
+/*
+ * prov_time_pps_destroy - release PPS handle
+ */
+int WINAPI
+prov_time_pps_destroy(
+ pps_unit_t * unit,
+ void * context
+ )
+{
+ skel_unit *pskelunit;
+
+ UNUSED(unit);
+
+ pskelunit = context;
+ free(pskelunit);
+
+ return 0;
+}
+
+
+/*
+ * prov_time_pps_setparams - set parameters for handle
+ */
+int WINAPI
+prov_time_pps_setparams(
+ pps_unit_t * unit,
+ void * context,
+ const pps_params_t * params
+ )
+{
+ skel_unit *pskelunit;
+ int mode, mode_in;
+
+ pskelunit = context;
+
+ /*
+ * There was no reasonable consensus in the API working group.
+ * I require `api_version' to be set!
+ */
+
+ if (params->api_version != PPS_API_VERS_1)
+ return EINVAL;
+
+ /*
+ * The only settable modes are PPS_CAPTUREASSERT,
+ * PPS_OFFSETASSERT, and the timestamp formats.
+ */
+
+ mode_in = params->mode;
+
+ /*
+ * Only one of the time formats may be selected
+ * if a nonzero assert offset is supplied.
+ */
+ if ((mode_in & (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
+ == (PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP)) {
+
+ if (params->assert_offset.tv_sec ||
+ params->assert_offset.tv_nsec)
+ return EINVAL;
+
+ /*
+ * If no offset was specified but both time
+ * format flags are used consider it harmless
+ * but turn off PPS_TSFMT_NTPFP so getparams
+ * will not show both formats lit.
+ */
+ mode_in &= ~PPS_TSFMT_NTPFP;
+ }
+
+ /* turn off read-only bits */
+
+ mode_in &= ~SKELPPS_RO;
+
+ /*
+ * test remaining bits, should only have captureassert,
+ * offsetassert, and/or timestamp format bits.
+ */
+
+ if (mode_in & ~(PPS_CAPTUREASSERT | PPS_OFFSETASSERT |
+ PPS_TSFMT_TSPEC | PPS_TSFMT_NTPFP))
+ return EOPNOTSUPP;
+
+ /*
+ * ok, ready to go.
+ */
+
+ mode = unit->params.mode;
+ unit->params = *params;
+ unit->params.mode = mode | mode_in;
+
+ return 0;
+}
+
+
+/*
+ * prov_time_pps_fetch - Fetch timestamps
+ */
+
+int WINAPI
+prov_time_pps_fetch(
+ pps_unit_t * unit,
+ void * context,
+ const int tsformat,
+ pps_info_t * pinfo,
+ const struct timespec * timeout
+ )
+{
+ ULONGLONG WindowsTimestamp;
+ ULONGLONG Counterstamp;
+ skel_unit *pskelunit;
+ pps_info_t infobuf;
+
+ /*
+ * nb. PPS_CANWAIT is NOT set by the implementation, we can totally
+ * ignore the timeout variable.
+ */
+ UNUSED(timeout);
+ pskelunit = context;
+
+ memset(&infobuf, 0, sizeof(infobuf));
+
+ /*
+ * if not captureassert, nothing to return.
+ */
+
+ if (!(unit->params.mode & PPS_CAPTUREASSERT)) {
+ *pinfo = infobuf;
+ return 0;
+ }
+
+ /*
+ * ADD CODE to retrieve timestamp here.
+ */
+ WindowsTimestamp = Counterstamp = 0;
+ /*
+ * ADD CODE to retrieve timestamp here.
+ */
+
+ /*
+ * pps_ntp_timestamp_from_counter takes the two flavors
+ * of timestamp we have (counter and system time) and
+ * uses whichever it can to give the best NTP fixed-point
+ * conversion. In ntpd the Counterstamp is typically
+ * used. A stub implementation in timepps.h simply
+ * converts from Windows timestamp to NTP fixed-point.
+ * We call through a pointer to get ntpd's version.
+ */
+ (*pskelunit->p_ntp_timestamp_from_counter)(
+ &infobuf.assert_timestamp_ntpfp,
+ WindowsTimestamp,
+ Counterstamp);
+
+ /*
+ * Note that only assert timestamps
+ * are captured by this interface.
+ */
+ infobuf.assert_sequence = 0; /* ADD CODE */
+
+ /*
+ * Apply offset and translate to specified format
+ */
+ switch (tsformat) {
+ case PPS_TSFMT_NTPFP: /* NTP format requires no translation */
+ if (unit->params.mode & PPS_OFFSETASSERT) {
+ NTPFP_L_ADDS(&infobuf.assert_timestamp_ntpfp,
+ &unit->params.assert_offset_ntpfp);
+ }
+ break;
+
+ case PPS_TSFMT_TSPEC: /* timespec format requires conversion to nsecs form */
+ PPS_NTPTOTSPEC(infobuf.assert_timestamp);
+ if (unit->params.mode & PPS_OFFSETASSERT) {
+ infobuf.assert_timestamp.tv_sec +=
+ unit->params.assert_offset.tv_sec;
+ infobuf.assert_timestamp.tv_nsec +=
+ unit->params.assert_offset.tv_nsec;
+ PPS_NORMALIZE(infobuf.assert_timestamp);
+ }
+ break;
+
+ default:
+ return EINVAL;
+ }
+
+ infobuf.current_mode = unit->params.mode;
+ *pinfo = infobuf;
+ return (0);
+}
+
+
+/*
+ * prov_time_pps_kcbind - specify kernel consumer
+ *
+ * Not supported so far by Windows.
+ */
+int WINAPI
+prov_time_pps_kcbind(
+ pps_unit_t * punit,
+ void * context,
+ const int kernel_consumer,
+ const int edge,
+ const int tsformat
+ )
+{
+ UNUSED(punit);
+ UNUSED(context);
+ UNUSED(kernel_consumer);
+ UNUSED(edge);
+ UNUSED(tsformat);
+
+ return EOPNOTSUPP;
+}
+
+
+/*
+ * prov_init - returns capabilities and provider name
+ */
+int WINAPI
+ppsapi_prov_init(
+ int ppsapi_timepps_prov_ver,
+ pcreate_pps_handle create_pps_handle,
+ ppps_ntp_timestamp_from_counter ntp_timestamp_from_counter,
+ char * short_name_buf,
+ size_t short_name_size,
+ char * full_name_buf,
+ size_t full_name_size
+ )
+{
+ ppsapi_provider test_prov;
+
+ if (ppsapi_timepps_prov_ver < PPSAPI_TIMEPPS_PROV_VER)
+ return 0;
+
+ p_create_pps_handle = create_pps_handle;
+ p_ntp_timestamp_from_counter = ntp_timestamp_from_counter;
+
+ strncpy(short_name_buf, "skeleton", short_name_size);
+ strncpy(full_name_buf,
+ "skeleton, ADD CODE to make useful",
+ full_name_size);
+
+ /*
+ * Use function pointer prototypes from timepps.h to verify
+ * our prototypes match with some otherwise pointless code.
+ */
+ test_prov.ptime_pps_create = &prov_time_pps_create;
+ test_prov.ptime_pps_destroy = &prov_time_pps_destroy;
+ test_prov.ptime_pps_fetch = &prov_time_pps_fetch;
+ test_prov.ptime_pps_kcbind = &prov_time_pps_kcbind;
+ test_prov.ptime_pps_setparams = &prov_time_pps_setparams;
+
+ return SKELPPS_CAPS;
+}
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def
new file mode 100644
index 000000000000..ef29709b0f67
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.def
@@ -0,0 +1,9 @@
+LIBRARY "skeleton-ppsapi-provider.dll"
+
+EXPORTS
+ ppsapi_prov_init
+ prov_time_pps_create
+ prov_time_pps_destroy
+ prov_time_pps_fetch
+ prov_time_pps_kcbind
+ prov_time_pps_setparams \ No newline at end of file
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h
new file mode 100644
index 000000000000..2bb79911152f
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h
@@ -0,0 +1,22 @@
+//
+// serialpps-ppsapi-provider.h
+//
+// For this tiny project the single header serves as a precompiled header
+// as well, meaning all the bulky headers are included before or within it.
+// Within, in this case.
+//
+
+#define _CRT_SECURE_NO_WARNINGS
+#include <stdio.h>
+/* Prevent inclusion of winsock.h in windows.h */
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_
+#endif
+#include <windows.h>
+typedef DWORD u_int32;
+#include "sys/time.h"
+#include "../../include/timepps.h"
+
+#ifndef UNUSED
+#define UNUSED(item) ((void)(item))
+#endif
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln
new file mode 100644
index 000000000000..8c2417a91c88
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.sln
@@ -0,0 +1,19 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skeleton-ppsapi-provider", "skeleton-ppsapi-provider.vcproj", "{F7842ACD-EB61-4D65-9999-AFB0E77E63EA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Debug|Win32.Build.0 = Debug|Win32
+ {F7842ACD-EB61-4D65-9999-AFB0E77E63EA}.Release|Win32.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj
new file mode 100644
index 000000000000..bab3e7d404aa
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.vcproj
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="skeleton-ppsapi-provider"
+ ProjectGUID="{F7842ACD-EB61-4D65-9999-AFB0E77E63EA}"
+ RootNamespace="skeletonppsapiprovider"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;"
+ MinimalRebuild="true"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="skeleton-ppsapi-provider.h"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateManifest="false"
+ ModuleDefinitionFile="skeleton-ppsapi-provider.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="skeleton-ppsapi-provider.h"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateManifest="false"
+ ModuleDefinitionFile="skeleton-ppsapi-provider.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\skeleton-ppsapi-provider.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ GeneratePreprocessedFile="0"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\skeleton-ppsapi-provider.h"
+ >
+ </File>
+ <File
+ RelativePath=".\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\timepps.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/ppsapi/skelprov/sys/time.h b/ports/winnt/ppsapi/skelprov/sys/time.h
new file mode 100644
index 000000000000..079e5b64431f
--- /dev/null
+++ b/ports/winnt/ppsapi/skelprov/sys/time.h
@@ -0,0 +1,18 @@
+/*
+ * This sys/time.h is part of ppsapi-prov skeleton sample source code
+ * for a Windows PPSAPI provider DLL. It was adapted from
+ * ports/winnt/include/sys/time.h in ntpd.
+ */
+
+#ifndef SYS_TIME_H
+#define SYS_TIME_H
+
+#include <windows.h>
+#include <time.h>
+
+typedef struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+} timespec_t;
+
+#endif /* SYS_TIME_H */
diff --git a/ports/winnt/scripts/mkver.bat b/ports/winnt/scripts/mkver.bat
new file mode 100755
index 000000000000..7b448299607d
--- /dev/null
+++ b/ports/winnt/scripts/mkver.bat
@@ -0,0 +1,439 @@
+@echo off
+GOTO PROG
+
+see notes/remarks directly below this header:
+######################################################################
+#
+# Revision: mkver.bat
+# Author: Frederick Czajka
+# Date: 02/10/2000
+# Purpose: Provide a NT Shell script to replace the perl script
+# that replaced the UNIX mkver shell script.
+#
+#
+#
+# Notes: I had two goals with this script one to only use native
+# NT Shell commands and two was too emulate the PERL style
+# output. This required some work for the DATE format as
+# you will see and TIME was really tricky to get a format
+# matching PERLs!
+#
+#
+# Changes:
+# 02/23/2011 David J Taylor - Use reg instead of regedit so "run as
+# administrator" is not required.
+# 12/21/2009 Dave Hart
+# - packageinfo.sh uses prerelease= now not
+# releasecandidate=
+# 08/28/2009 Dave Hart
+# - support for building using per-compiler subdirs of winnt
+# 08/08/2006 Heiko Gerstung
+# - bugfixed point / rcpoint errors leading to a wrong
+# version string
+# - added a few cases for uppercase strings
+# 03/09/2005 Heiko Gerstung
+# - added UTC offset to version time information
+# - bugfixed several issues preventing this script to be used on NT4
+# - removed an obsolete warning
+#
+# 03/08/2005 Danny Mayer
+# - bugfixed NOBK label position
+#
+# 03/08/2005 Heiko Gerstung
+# - bugfixed BK detection and support for multiple ChangeSets
+#
+# 02/24/2005 Heiko Gerstung
+# - check if BK is installed and do not try to call it if not
+#
+#
+# 02/03/2005 Heiko Gerstung
+# - now getting NTP version from version.m4 (not configure)
+# - added BK ChangeSet revision and Openssl-Indicator (-o)
+# to the version number
+# - major rework of the time and date recognition routines
+# in order to reflect international settings and OS-
+# dependand formats
+#
+######################################################################
+
+Notes/Howtos:
+
+If you spot an error stating that bk.exe could not be found or executed
+although it is installed on your computer, you should try to add the path
+to your BK binary in your IDE configuration (for VisualStudio see
+Tools/Options/Directories/Executables).
+
+Alternatively you can create a file called 'version' in the root path of
+your ntp source tree which holds a string that is added to the version number.
+
+
+:PROG
+IF {%1} == {} GOTO USAGE
+IF {%1} == {-H} GOTO USAGE
+IF {%2} == {} GOTO USAGE
+IF {%1} == {-P} GOTO BEGIN
+
+
+
+REM *****************************************************************************************************************
+REM For any other bizarre permutation...
+REM *****************************************************************************************************************
+GOTO USAGE
+
+:BEGIN
+
+SET GENERATED_PROGRAM=%2
+
+REM *****************************************************************************************************************
+REM Reimplemented from orginal Unix Shell script
+REM *****************************************************************************************************************
+ IF NOT EXIST .version ECHO 0 > .version
+ FOR /F %%i IN (.version) do @SET RUN=%%i
+ SET /A RUN=%RUN%+1
+ ECHO %RUN% > .version
+
+REM *****************************************************************************************************************
+REM Resetting variables
+REM *****************************************************************************************************************
+ SET VER=
+ SET CSET=
+ SET SSL=
+ SET MYDATE=
+ SET MYTIME=
+ SET DAY=99
+ SET NMM=99
+ SET YEAR=0
+ SET HOUR=
+ SET MIN=
+ SET MMIN=
+ SET SEC=
+ SET SUBSEC=
+ SET DATEDELIM=
+ SET TIMEDELIM=
+ SET DATEFORMAT=
+ SET TIMEFORMAT=
+ SET UTC=
+ SET ACTIVEBIAS=
+
+REM *****************************************************************************************************************
+REM Check if DATE and TIME environment variables are available
+REM *****************************************************************************************************************
+
+ SET MYDATE=%DATE%
+ SET MYTIME=%TIME%
+
+ REM ** Not available (huh? Are you older than NT4SP6A, grandpa?)
+ IF "%MYDATE%" == "" FOR /F "TOKENS=1 DELIMS=" %%a IN ('date/t') DO SET MYDATE=%%a
+ IF "%MYTIME%" == "" FOR /F "TOKENS=1 DELIMS=" %%a IN ('time/t') DO SET MYTIME=%%a
+
+REM *****************************************************************************************************************
+REM Try to find out UTC offset
+REM *****************************************************************************************************************
+
+ REM *** Start with setting a dummy value which is used when we are not able to find out the real UTC offset
+ SET UTC=(LOCAL TIME)
+ SET UTC_HR=
+ SET UTC_MIN=
+ SET UTC_SIGN=
+
+ REM *** Now get the timezone settings from the registry
+ reg export "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" %TEMP%\TZ-%GENERATED_PROGRAM%.TMP
+ REM was: regedit /e %TEMP%\TZ-%GENERATED_PROGRAM%.TMP "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
+ IF NOT EXIST %TEMP%\TZ-%GENERATED_PROGRAM%.TMP GOTO NOTZINFO
+
+ for /f "Tokens=1* Delims==" %%a in ('type %TEMP%\TZ-%GENERATED_PROGRAM%.TMP') do if %%a == "ActiveTimeBias" SET ACTIVEBIAS=%%b
+ for /f "Tokens=1* Delims=:" %%a in ('echo %ACTIVEBIAS%') do ( SET ACTIVEBIAS=%%b & SET PARTYP=%%a )
+
+ REM *** Clean up temporary file
+ IF EXIST %TEMP%\TZ-%GENERATED_PROGRAM%.TMP DEL %TEMP%\TZ-%GENERATED_PROGRAM%.TMP
+
+ REM *** Check if we really got a dword value from the registry ...
+ IF NOT "%PARTYP%"=="dword " goto NOTZINFO
+
+ REM *** Check if we are in UTC timezone, then we can avoid some stress...
+ if "%ACTIVEBIAS%" == "00000000" SET UTC=(UTC) & GOTO NOTZINFO
+
+ SET HI=0x%ACTIVEBIAS:~0,4%
+ SET LO=0x%ACTIVEBIAS:~4,4%
+
+ if "%HI%"=="0xffff" ( SET /A ACTIVEBIAS=%LO% - %HI% - 1 ) ELSE ( SET /A ACTIVEBIAS=%LO%)
+ SET /A UTC_HR="%ACTIVEBIAS%/60"
+ SET /A UTC_MIN="%ACTIVEBIAS% %% 60"
+ SET UTC_SIGN=%ACTIVEBIAS:~0,1%
+
+ REM *** check the direction in which the local timezone alters UTC time
+ IF NOT "%UTC_SIGN%"=="-" SET UTC_SIGN=+
+ IF "%UTC_SIGN%"=="-" SET UTC_HR=%UTC_HR:~1,2%
+
+ REM *** Now turn the direction, because we need to know it from the viewpoint of UTC
+ IF "%UTC_SIGN%"=="+" (SET UTC_SIGN=-) ELSE (SET UTC_SIGN=+)
+
+ REM *** Put the values in a "00" format
+ IF %UTC_HR% LEQ 9 SET UTC_HR=0%UTC_HR%
+ IF %UTC_MIN% LEQ 9 SET UTC_MIN=0%UTC_MIN%
+
+ REM *** Set up UTC offset string used in version string
+ SET UTC=(UTC%UTC_SIGN%%UTC_HR%:%UTC_MIN%)
+
+
+:NOTZINFO
+echo off
+
+REM *****************************************************************************************************************
+REM Now grab the Version number out of the source code (using the packageinfo.sh file...)
+REM *****************************************************************************************************************
+
+ REM First, get the main NTP version number. In recent versions this must be extracted
+ REM from a packageinfo.sh file while in earlier versions the info was available from
+ REM a version.m4 file.
+ SET F_PACKAGEINFO_SH=..\..\..\..\packageinfo.sh
+ IF EXIST %F_PACKAGEINFO_SH% goto VER_FROM_PACKAGE_INFO
+ REM next two lines can go away when all windows compilers are building under
+ rem ports\winnt\<compiler dir>\<binary name dir> (ports\winnt\vs2008\ntpd)
+ rem rather than ports\winnt\<binary name dir> (ports\winnt\ntpd)
+ SET F_PACKAGEINFO_SH=..\..\..\packageinfo.sh
+ IF EXIST %F_PACKAGEINFO_SH% goto VER_FROM_PACKAGE_INFO
+ goto ERRNOVERF
+
+:VER_FROM_PACKAGE_INFO
+ REM Get version from packageinfo.sh file, which contains lines reading e.g.
+
+ TYPE %F_PACKAGEINFO_SH% | FIND /V "rcpoint=" | FIND /V "betapoint=" | FIND "point=" > point.txt
+ SET F_POINT_SH=point.txt
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "proto=" %%F_PACKAGEINFO_SH%%') DO SET PROTO=%%a
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "major=" %%F_PACKAGEINFO_SH%%') DO SET MAJOR=%%a
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "minor=" %%F_PACKAGEINFO_SH%%') DO SET MINOR=%%a
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "point=" %%F_POINT_SH%%') DO SET POINT=%%a
+ IF "%POINT%"=="NEW" set POINT=
+ IF NOT "%POINT%"=="" set POINT=p%POINT%
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "betapoint=" %%F_PACKAGEINFO_SH%%') DO SET BETAPOINT=%%a
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "rcpoint=" %%F_PACKAGEINFO_SH%%') DO SET RCPOINT=%%a
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "special=" %%F_PACKAGEINFO_SH%%') DO SET SPECIAL=%%a
+ IF NOT "%SPECIAL%"=="" set SPECIAL=-%SPECIAL%
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "prerelease=" %%F_PACKAGEINFO_SH%%') DO SET PRERELEASE=%%a
+ IF /I "%PRERELEASE%"=="beta" set PR_SUF=-beta
+ IF /I "%PRERELEASE%"=="rc" set PR_SUF=-RC
+
+ FOR /F "eol=# TOKENS=2 DELIMS==" %%a IN ('findstr "repotype=" %%F_PACKAGEINFO_SH%%') DO SET REPOTYPE=%%a
+ IF /I "%REPOTYPE%"=="stable" set REPOTYPE=STABLE
+
+ IF NOT "%REPOTYPE%"=="STABLE" SET RCPOINT=
+ IF "%PR_SUF%"=="-RC" set PR_POINT=%RCPOINT%
+ IF "%PR_SUF%"=="-beta" set PR_POINT=%BETAPOINT%
+
+ SET VER=%PROTO%.%MAJOR%.%MINOR%%POINT%%SPECIAL%%PR_SUF%%PR_POINT%
+
+ REM Now we have the version info, try to add a BK ChangeSet version number
+
+ REM ** Check if BK is installed ...
+ bk -R prs -hr+ -nd:I: ChangeSet 2> NUL > NUL
+ IF ERRORLEVEL 1 GOTO NOBK
+
+ REM ** Try to get the CSet rev directly from BK
+ FOR /F "TOKENS=1 DELIMS==" %%a IN ('bk.exe -R prs -hr+ -nd:I: ChangeSet') DO @SET CSET=%%a
+
+:NOBK
+ REM ** If that was not successful, we'll take a look into a version file, if available
+ IF EXIST ..\..\..\..\sntp\scm-rev (
+ IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\..\sntp\scm-rev') DO @SET CSET=%%a
+ )
+ REM next if block can go away once all windows compilers are building in
+ REM ports\winnt\<compiler dir>\<binary name dir> (ports\winnt\vs2008\ntpd)
+ IF EXIST ..\..\..\sntp\scm-rev (
+ IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\sntp\scm-rev') DO @SET CSET=%%a
+ )
+
+ REM ** Now, expand our version number with the CSet revision, if we managed to get one
+ IF NOT "%CSET%"=="" SET VER=%VER%@%CSET%
+
+ REM We can add a "crypto" identifier (-o) if we see that Crypto support is included in our build
+ REM we always include openssl on windows...
+ SET VER=%VER%-o
+
+
+REM *****************************************************************************************************************
+REM Check for user settings regarding the time and date format, we use the registry to find out...
+REM *****************************************************************************************************************
+
+
+ REM Any temporary files left from a previous run? Go where you belong...
+ IF exist userset.reg del userset.reg
+ IF exist userset.txt del userset.txt
+
+ reg export "HKEY_CURRENT_USER\Control Panel\International" userset.reg
+ REM was: regedit /E userset.reg "HKEY_CURRENT_USER\Control Panel\International"
+ IF not exist userset.reg goto ERRNOREG
+
+ rem *** convert from unicode to ascii if necessary
+ type userset.reg > userset.txt
+
+
+ FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr "iDate" userset.txt') DO SET DATEFORMAT=%%b
+ FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr "iTime" userset.txt') DO SET TIMEFORMAT=%%b
+
+ FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr /R "sDate\>" userset.txt') DO SET DATEDELIM=%%b
+ FOR /F "TOKENS=1-9 DELIMS== " %%a IN ('findstr /R "sTime\>" userset.txt') DO SET TIMEDELIM=%%b
+
+ IF "%TIMEFORMAT%"=="" GOTO ERRNOTIME
+ IF "%DATEFORMAT%"=="" GOTO ERRNODATE
+ IF "%TIMEDELIM%"=="" GOTO ERRNOTIME
+ IF "%DATEDELIM%"=="" GOTO ERRNODATE
+
+ SET TIMEDELIM=%TIMEDELIM:~1,1%
+ SET DATEDELIM=%DATEDELIM:~1,1%
+ SET TIMEFORMAT=%TIMEFORMAT:~1,1%
+ SET DATEFORMAT=%DATEFORMAT:~1,1%
+
+REM *****************************************************************************************************************
+REM Well, well. Its time to look at the time and format it in a standard way (if possible)
+REM *****************************************************************************************************************
+
+
+ FOR /F "TOKENS=1-4 DELIMS=%TIMEDELIM% " %%a IN ('echo %MYTIME%') DO SET AA=%%a&SET BB=%%b&SET CC=%%c&SET DD=%%d
+
+ REM 12H Format
+ IF "%TIMEFORMAT%" == "0" (
+ SET HOUR=%AA%
+ SET MIN=%BB%
+ FOR /F "USEBACKQ TOKENS=1 DELIMS=ap" %%a IN ('%BB%') DO SET MMIN=%%a
+ SET SEC=%CC%
+ SET SUBSEC=%DD%
+ )
+
+ REM Get rid of the "a" or "p" if we have one of these in our minute string
+ IF NOT "%MMIN%"=="%MIN%" FOR /F "USEBACKQ TOKENS=1 DELIMS=ap " %%a IN ('%MIN%') DO SET MIN=%%a
+
+ REM 24H Format
+ IF "%TIMEFORMAT%" == "1" (
+ SET HOUR=%AA%
+ SET MIN=%BB%
+ SET SEC=%CC%
+ SET SUBSEC=%DD%
+ )
+
+ IF "%HOUR%"=="" GOTO ERRNOTIME
+ IF "%MIN%"=="" GOTO ERRNOTIME
+
+ IF "%SEC%"=="" SET SEC=00
+ IF "%SUBSEC%"=="" SET SUBSEC=00
+
+
+REM *****************************************************************************************************************
+REM It's time to format the date :-)
+REM *****************************************************************************************************************
+
+
+ FOR /F "TOKENS=1-4 DELIMS=./- " %%a IN ('ECHO %MYDATE%') DO SET AA=%%a&SET BB=%%b&SET CC=%%c&SET DD=%%d
+
+ IF "%DD%" == "" (
+ REM No Day of Week in Date
+ ( IF "%DATEFORMAT%" == "0" SET DOW=_&SET DAY=%BB%&SET NMM=%AA%&SET YEAR=%CC% )
+ ( IF "%DATEFORMAT%" == "1" SET DOW=_&SET DAY=%AA%&SET NMM=%BB%&SET YEAR=%CC% )
+ ( IF "%DATEFORMAT%" == "2" SET DOW=_&SET DAY=%CC%&SET NMM=%BB%&SET YEAR=%AA% )
+ ) ELSE (
+ ( IF "%DATEFORMAT%" == "0" SET DOW=%AA%&SET DAY=%CC%&SET NMM=%BB%&SET YEAR=%DD% )
+ ( IF "%DATEFORMAT%" == "1" SET DOW=%AA%&SET DAY=%BB%&SET NMM=%CC%&SET YEAR=%DD% )
+ ( IF "%DATEFORMAT%" == "2" SET DOW=%AA%&SET DAY=%DD%&SET NMM=%CC%&SET YEAR=%BB% )
+ )
+
+ REM Something went wrong, we weren't able to get a valid date
+ IF NOT "%YEAR%" == "0" GOTO DATEOK
+ goto ERRNODATE
+
+:DATEOK
+
+ REM Clean up any temporary files we may have created...
+ REM IF exist userset.reg del userset.reg
+ REM IF exist userset.txt del userset.txt
+
+ IF "%NMM%" == "01" SET MONTH=Jan
+ IF "%NMM%" == "02" SET MONTH=Feb
+ IF "%NMM%" == "03" SET MONTH=Mar
+ IF "%NMM%" == "04" SET MONTH=Apr
+ IF "%NMM%" == "05" SET MONTH=May
+ IF "%NMM%" == "06" SET MONTH=Jun
+ IF "%NMM%" == "07" SET MONTH=Jul
+ IF "%NMM%" == "08" SET MONTH=Aug
+ IF "%NMM%" == "09" SET MONTH=Sep
+ IF "%NMM%" == "10" SET MONTH=Oct
+ IF "%NMM%" == "11" SET MONTH=Nov
+ IF "%NMM%" == "12" SET MONTH=Dec
+
+ IF NOT {%MONTH%} == {} GOTO DATE_OK
+
+ REM *** Not US date format! Assume ISO: yyyy-mm-dd
+
+ FOR /F "TOKENS=1-4 DELIMS=/- " %%a IN ('date/t') DO SET DAY=%%a&SET yyyy=%%b&SET nmm=%%c&SET dd=%%d
+
+ echo a=%%a b=%%b c=%%c d=%%d
+ IF "%NMM%" == "01" SET MONTH=Jan
+ IF "%NMM%" == "02" SET MONTH=Feb
+ IF "%NMM%" == "03" SET MONTH=Mar
+ IF "%NMM%" == "04" SET MONTH=Apr
+ IF "%NMM%" == "05" SET MONTH=May
+ IF "%NMM%" == "06" SET MONTH=Jun
+ IF "%NMM%" == "07" SET MONTH=Jul
+ IF "%NMM%" == "08" SET MONTH=Aug
+ IF "%NMM%" == "09" SET MONTH=Sep
+ IF "%NMM%" == "10" SET MONTH=Oct
+ IF "%NMM%" == "11" SET MONTH=Nov
+ IF "%NMM%" == "12" SET MONTH=Dec
+
+:DATE_OK
+ IF "%SS" == "" SET SS="00"
+
+
+REM *****************************************************************************************************************
+REM Now create a valid version.c file ...
+REM *****************************************************************************************************************
+
+ ECHO Version %VER% Build %RUN% date %MONTH%/%DAY%/%YEAR% time %HOUR%:%MIN%:%SEC% %UTC%
+ ECHO char * Version = "%GENERATED_PROGRAM% %VER% %MONTH% %DAY% %HOUR%:%MIN%:%SEC% %UTC% %YEAR% (%RUN%)" ; > version.c
+ GOTO EOF
+
+
+REM *****************************************************************************************************************
+REM Here are the error messages I know
+REM *****************************************************************************************************************
+:ERRNOREG
+ ECHO "Error: Registry could not be read (check if reg.exe is available and works as expected)"
+ GOTO EOF
+
+
+:ERRNODATE
+ ECHO "Error: Dateformat unknown (check if contents of userset.txt are correctly, especially for iDate and sDate)"
+ GOTO EOF
+
+:ERRNOTIME
+ ECHO "Error: Timeformat unknown (check if contents of userset.txt are correctly, especially for iTime and sTime)"
+ GOTO EOF
+
+:ERRNOVERF
+ ECHO "Error: Version file not found (searching for ..\..\..\..\packageinfo.sh)"
+ GOTO EOF
+
+
+REM *****************************************************************************************************************
+REM Show'em how to run (me)
+REM *****************************************************************************************************************
+:USAGE
+
+ ECHO Usage: mkver.bat [ -P <Program Name> -H ]
+ ECHO -P Database Name
+ ECHO -H Help on options
+
+REM *****************************************************************************************************************
+REM All good things come to an end someday. Time to leave
+REM *****************************************************************************************************************
+:EOF
+
+REM *** Cleaning up
+IF EXIST point.txt DEL point.txt
+IF EXIST userset.txt DEL userset.txt
+IF EXIST userset.reg DEL userset.reg
diff --git a/ports/winnt/vs2005/Instsrv.vcproj b/ports/winnt/vs2005/Instsrv.vcproj
new file mode 100644
index 000000000000..74ccb8171dca
--- /dev/null
+++ b/ports/winnt/vs2005/Instsrv.vcproj
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="instsrv"
+ ProjectGUID="{EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\instsrv\Debug"
+ IntermediateDirectory=".\instsrv\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\instsrv\Debug/Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\include,..\include,."
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile=".\instsrv\Debug/Instsrv.pch"
+ AssemblerListingLocation=".\instsrv\Debug/"
+ ObjectFile=".\instsrv\Debug/"
+ ProgramDataBaseFileName=".\instsrv\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="bin/Debug/Instsrv.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\instsrv\Debug/Instsrv.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\instsrv\Debug/Instsrv.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\instsrv\Release"
+ IntermediateDirectory=".\instsrv\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\instsrv\Release/Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\include,..\include,."
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\instsrv\Release/Instsrv.pch"
+ AssemblerListingLocation=".\instsrv\Release/"
+ ObjectFile=".\instsrv\Release/"
+ ProgramDataBaseFileName=".\instsrv\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="bin/Release/Instsrv.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\instsrv\Release/Instsrv.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\instsrv\Release/Instsrv.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\instsrv\instsrv.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/libntp.vcproj b/ports/winnt/vs2005/libntp.vcproj
new file mode 100644
index 000000000000..f2d0b9e714df
--- /dev/null
+++ b/ports/winnt/vs2005/libntp.vcproj
@@ -0,0 +1,864 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libntp"
+ ProjectGUID="{ECDDC7EE-5805-4603-B38D-804C09BDC910}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\libntp\Debug"
+ IntermediateDirectory=".\libntp\Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_LIB;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\libntp\Debug/libntp.pch"
+ AssemblerListingLocation=".\libntp\Debug/"
+ ObjectFile=".\libntp\Debug/"
+ ProgramDataBaseFileName=".\libntp\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\libntp\Debug\libntp.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\libntp\Debug/libntp.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\libntp\Release"
+ IntermediateDirectory=".\libntp\Release"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_LIB;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\libntp\Release/libntp.pch"
+ AssemblerListingLocation=".\libntp\Release/"
+ ObjectFile=".\libntp\Release/"
+ ProgramDataBaseFileName=".\libntp\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile=".\libntp\Release\libntp.lib"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\libntp\Release/libntp.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\libntp\a_md5encrypt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\adjtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\assertions.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\atoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\atolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\atouint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\authkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\authreadkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\authusekey.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\buffer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\backtrace-emtpytbl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\backtrace.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\buftvtots.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\caljulian.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\caltontp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\calyearstart.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\clocktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\clocktypes.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\condition.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\decodenetnum.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\dofptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\dolfptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\emalloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\error.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\event.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\findconfig.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\getclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\hextoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\hextolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\humandate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\icom.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\inet_aton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\inet_ntop.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\inet_pton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\interfaceiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\iosignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\lib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\lib_strbuf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sntp\libopts\libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\machines.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\mktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\modetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\nls\msgcat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\mstolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\msyslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\net.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\netaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\netof.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\netscope.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_calendar.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_intres.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_lineedit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_random.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_rfc2553.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_worker.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\numtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\numtohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\octtoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\once.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\ondestroy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\prettydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\randfile.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\recvbuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\refnumtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\setpriority.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\SetSystemTime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\snprintf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\sockaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\socktoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\socktohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ssl_init.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\statestr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\stdtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\strerror.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\strl_obsd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\syslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\syssignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\systime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\task.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\termios.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\time.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\timetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\timevalops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\uglydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\util_clockstuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\libntp\win32_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\win32os.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\work_fork.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\work_thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ymd2yd.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\buffer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\condition.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\event.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\global.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\hash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\intreswork.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\inttypes.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\ioctl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\lib_strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\md5.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\isc\mem.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\isc\netscope.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_lists.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_intres.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\ondestroy.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\signal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\stat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\stdtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\task.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\thread.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\libntp\messages.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+ <File
+ RelativePath="..\libntp\messages.mc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntp.sln b/ports/winnt/vs2005/ntp.sln
new file mode 100644
index 000000000000..6b840bed78b1
--- /dev/null
+++ b/ports/winnt/vs2005/ntp.sln
@@ -0,0 +1,70 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instsrv", "Instsrv.vcproj", "{EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libntp", "libntp.vcproj", "{ECDDC7EE-5805-4603-B38D-804C09BDC910}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd", "ntpd.vcproj", "{F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}"
+ ProjectSection(ProjectDependencies) = postProject
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdate", "ntpdate.vcproj", "{9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}"
+ ProjectSection(ProjectDependencies) = postProject
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdc", "ntpdc.vcproj", "{C82634BB-AC80-4796-B2AF-2903C665ED17}"
+ ProjectSection(ProjectDependencies) = postProject
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpkeygen", "ntpkeygen.vcproj", "{9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}"
+ ProjectSection(ProjectDependencies) = postProject
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpq", "ntpq.vcproj", "{EA10E04E-946B-44A6-B0AB-B5B93A160744}"
+ ProjectSection(ProjectDependencies) = postProject
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910} = {ECDDC7EE-5805-4603-B38D-804C09BDC910}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Debug|Win32.Build.0 = Debug|Win32
+ {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Release|Win32.ActiveCfg = Release|Win32
+ {EAA8D0C8-A8AF-4C40-BF14-4A94570DE033}.Release|Win32.Build.0 = Release|Win32
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Debug|Win32.ActiveCfg = Debug|Win32
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Debug|Win32.Build.0 = Debug|Win32
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Release|Win32.ActiveCfg = Release|Win32
+ {ECDDC7EE-5805-4603-B38D-804C09BDC910}.Release|Win32.Build.0 = Release|Win32
+ {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Debug|Win32.Build.0 = Debug|Win32
+ {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Release|Win32.ActiveCfg = Release|Win32
+ {F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}.Release|Win32.Build.0 = Release|Win32
+ {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Debug|Win32.Build.0 = Debug|Win32
+ {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Release|Win32.ActiveCfg = Release|Win32
+ {9BF928B1-8A1A-4A0D-BE6D-38EDAD29F416}.Release|Win32.Build.0 = Release|Win32
+ {C82634BB-AC80-4796-B2AF-2903C665ED17}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C82634BB-AC80-4796-B2AF-2903C665ED17}.Debug|Win32.Build.0 = Debug|Win32
+ {C82634BB-AC80-4796-B2AF-2903C665ED17}.Release|Win32.ActiveCfg = Release|Win32
+ {C82634BB-AC80-4796-B2AF-2903C665ED17}.Release|Win32.Build.0 = Release|Win32
+ {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Debug|Win32.Build.0 = Debug|Win32
+ {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Release|Win32.ActiveCfg = Release|Win32
+ {9B768B99-2BC8-4A4C-AC0D-A7DA9C695825}.Release|Win32.Build.0 = Release|Win32
+ {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Debug|Win32.Build.0 = Debug|Win32
+ {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Release|Win32.ActiveCfg = Release|Win32
+ {EA10E04E-946B-44A6-B0AB-B5B93A160744}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ports/winnt/vs2005/ntpd.vcproj b/ports/winnt/vs2005/ntpd.vcproj
new file mode 100644
index 000000000000..005f287bcd5b
--- /dev/null
+++ b/ports/winnt/vs2005/ntpd.vcproj
@@ -0,0 +1,1893 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ntpd"
+ ProjectGUID="{F6F7E7C0-AE5E-4D7C-A17E-A3043FE68664}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\ntpd\Release"
+ IntermediateDirectory=".\ntpd\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpd\Release/ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\..\..\ntpd,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\ntpd\Release/ntpd.pch"
+ AssemblerListingLocation=".\ntpd\Release/"
+ ObjectFile=".\ntpd\Release/"
+ ProgramDataBaseFileName=".\ntpd\Release/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Release/ntpd.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="bin/Release/ntpd.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpd\Release/ntpd.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\ntpd\Debug"
+ IntermediateDirectory=".\ntpd\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpd\Debug/ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\..\..\ntpd,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\ntpd\Debug/ntpd.pch"
+ AssemblerListingLocation=".\ntpd\Debug/"
+ ObjectFile=".\ntpd\Debug/"
+ ProgramDataBaseFileName=".\ntpd\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Debug/ntpd.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="bin/Debug/ntpd.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpd\Debug/ntpd.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\ntpd\cmd_args.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\ntpd\nt_clockstuff.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_config.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_control.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_crypto.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_filegen.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_io.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\ntpd\ntp_iocompletionport.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_leapsec.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_loopfilter.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_monitor.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_parser.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_peer.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_proto.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_refclock.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_request.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_restrict.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_scanner.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_timer.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_util.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntpd-opts.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntpd.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\ntpd\ntservice.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\include\ascii.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\assertions.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\boolean.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\hopf_PCI_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\isc\int.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\jupiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\mbg_gps166.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_cmdargs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_filegen.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntp_leapsec.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_request.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_tty.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_worker.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntp_workimpl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\ntpd-opts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\ntservice.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\isc\offset.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\sntp\libopts\autoopts\options.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\param.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\include\isc\result.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\sys\wait.h"
+ >
+ </File>
+ <File
+ RelativePath="..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\isc\win32\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\libntp\messages.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ntp-dev-4.2.5p209\ports\winnt\libntp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="\ntp-dev-4.2.5p209\ports\winnt\libntp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\libntp\MSG00001.bin"
+ >
+ </File>
+ <File
+ RelativePath="version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="..\libntp\messages.mc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Reference Clock"
+ >
+ <File
+ RelativePath="..\ntpd\hopf_PCI_io.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_acts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_arbiter.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_arc.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_as2201.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_atom.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_bancomm.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_chronolog.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_chu.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_conf.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_datum.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_dumbclock.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_gpsvme.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_heath.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_hopfpci.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_hopfser.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_hpgps.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_irig.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_jupiter.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_leitch.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_local.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_msfees.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_mx4200.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_nmea.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_oncore.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_palisade.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_palisade.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_parse.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_pst.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_ptbacts.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_shm.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_tpro.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_true.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tsyncpci.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_usno.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpd\refclock_wwvb.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Parse Lib"
+ >
+ <File
+ RelativePath="..\..\..\libparse\clk_computime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_dcf7000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_hopf6021.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_meinberg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_rawdcf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_rcc8000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_schmid.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_trimtaip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_trimtsip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_trimtsip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_varitext.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\clk_wharton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\data_mbg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libparse\parse_conf.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\..\configure"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\scripts\mkver.bat;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\scripts\mkver.bat;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\scripts\mkver.bat"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpdate.vcproj b/ports/winnt/vs2005/ntpdate.vcproj
new file mode 100644
index 000000000000..2e40cad47837
--- /dev/null
+++ b/ports/winnt/vs2005/ntpdate.vcproj
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ntpdate"
+ ProjectGUID="{AF12F490-0BDA-4BC4-8F4B-EDA43B381CB3}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\ntpdate\Debug"
+ IntermediateDirectory=".\ntpdate\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpdate\Debug/ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\ntpdate\Debug/ntpdate.pch"
+ AssemblerListingLocation=".\ntpdate\Debug/"
+ ObjectFile=".\ntpdate\Debug/"
+ ProgramDataBaseFileName=".\ntpdate\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Debug/ntpdate.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="bin/Debug/ntpdate.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpdate\Debug/ntpdate.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\ntpdate\Release"
+ IntermediateDirectory=".\ntpdate\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpdate\Release/ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\ntpdate\Release/ntpdate.pch"
+ AssemblerListingLocation=".\ntpdate\Release/"
+ ObjectFile=".\ntpdate\Release/"
+ ProgramDataBaseFileName=".\ntpdate\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Release/ntpdate.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="bin/Release/ntpdate.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpdate\Release/ntpdate.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\ntpdate\ntpdate.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\ntpdate\ntpdate.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\configure"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpdc.vcproj b/ports/winnt/vs2005/ntpdc.vcproj
new file mode 100644
index 000000000000..8339c58ab7d9
--- /dev/null
+++ b/ports/winnt/vs2005/ntpdc.vcproj
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ntpdc"
+ ProjectGUID="{FA6396FE-2060-4A60-BE9E-86531637FB52}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\ntpdc\Debug"
+ IntermediateDirectory=".\ntpdc\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpdc\Debug/ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\ntpdc\Debug/ntpdc.pch"
+ AssemblerListingLocation=".\ntpdc\Debug/"
+ ObjectFile=".\ntpdc\Debug/"
+ ProgramDataBaseFileName=".\ntpdc\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Debug/ntpdc.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="bin/Debug/ntpdc.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpdc\Debug/ntpdc.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\ntpdc\Release"
+ IntermediateDirectory=".\ntpdc\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpdc\Release/ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\ntpdc\Release/ntpdc.pch"
+ AssemblerListingLocation=".\ntpdc\Release/"
+ ObjectFile=".\ntpdc\Release/"
+ ProgramDataBaseFileName=".\ntpdc\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Release/ntpdc.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="bin/Release/ntpdc.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpdc\Release/ntpdc.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\ntpdc\ntpdc-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpdc\ntpdc.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpdc\ntpdc_ops.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\ntpdc\ntpdc.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\configure"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpkeygen.vcproj b/ports/winnt/vs2005/ntpkeygen.vcproj
new file mode 100644
index 000000000000..b6c0ab8edb0d
--- /dev/null
+++ b/ports/winnt/vs2005/ntpkeygen.vcproj
@@ -0,0 +1,378 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ntpkeygen"
+ ProjectGUID="{AC45551A-4745-4160-839C-066FBFB255D1}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\ntp-keygen\Debug"
+ IntermediateDirectory=".\ntp-keygen\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntp-keygen\Debug/ntpkeygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\ntp-keygen\Debug/ntpkeygen.pch"
+ AssemblerListingLocation=".\ntp-keygen\Debug/"
+ ObjectFile=".\ntp-keygen\Debug/"
+ ProgramDataBaseFileName=".\ntp-keygen\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib libntp\Debug\libntp.lib"
+ OutputFile="bin/Debug/ntp-keygen.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="bin/Debug/ntp-keygen.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntp-keygen\Debug/ntpkeygen.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\ntp-keygen\Release"
+ IntermediateDirectory=".\ntp-keygen\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntp-keygen\Release/ntpkeygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_WIN32_WINNT=0x400;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\ntp-keygen\Release/ntpkeygen.pch"
+ AssemblerListingLocation=".\ntp-keygen\Release/"
+ ObjectFile=".\ntp-keygen\Release/"
+ ProgramDataBaseFileName=".\ntp-keygen\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib libntp\Release\libntp.lib"
+ OutputFile="bin/Release/ntp-keygen.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="bin/Release/ntp-keygen.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntp-keygen\Release/ntpkeygen.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\libntp\getopt.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\util\ntp-keygen-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\util\ntp-keygen.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\ntp_random.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\libntp\randfile.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\configure"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2005/ntpq.vcproj b/ports/winnt/vs2005/ntpq.vcproj
new file mode 100644
index 000000000000..ec7c1a5ae30c
--- /dev/null
+++ b/ports/winnt/vs2005/ntpq.vcproj
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ntpq"
+ ProjectGUID="{4BD64547-230D-4C0E-9F2C-9D75B4CC0FC7}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\ntpq\Release"
+ IntermediateDirectory=".\ntpq\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpq\Release/ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=".\ntpq\Release/ntpq.pch"
+ AssemblerListingLocation=".\ntpq\Release/"
+ ObjectFile=".\ntpq\Release/"
+ ProgramDataBaseFileName=".\ntpq\Release/"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Release/ntpq.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile="bin/Release/ntpq.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpq\Release/ntpq.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\ntpq\Debug"
+ IntermediateDirectory=".\ntpq\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\ntpq\Debug/ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,..\include,..\..\..\include,..\..\..\lib\isc\win32\include,..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile=".\ntpq\Debug/ntpq.pch"
+ AssemblerListingLocation=".\ntpq\Debug/"
+ ObjectFile=".\ntpq\Debug/"
+ ProgramDataBaseFileName=".\ntpq\Debug/"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="bin/Debug/ntpq.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="bin/Debug/ntpq.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ Version="0x0400"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ntpq\Debug/ntpq.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\ntpq\ntpq-opts.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpq\ntpq-subs.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\ntpq\ntpq.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\ntpq\ntpq.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\configure"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/instsrv/instsrv.vcproj b/ports/winnt/vs2008/instsrv/instsrv.vcproj
new file mode 100644
index 000000000000..e3324a66ec6b
--- /dev/null
+++ b/ports/winnt/vs2008/instsrv/instsrv.vcproj
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="instsrv"
+ ProjectGUID="{C3534C4D-6DF1-498E-9904-4337878A1515}"
+ RootNamespace="instsrv"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\instsrv\instsrv.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/libntp/libntp.vcproj b/ports/winnt/vs2008/libntp/libntp.vcproj
new file mode 100644
index 000000000000..6bf25cbfa225
--- /dev/null
+++ b/ports/winnt/vs2008/libntp/libntp.vcproj
@@ -0,0 +1,948 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="libntp"
+ ProjectGUID="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)libntp.pch"
+ AssemblerListingLocation="$IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(IntDir)"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ GeneratePreprocessedFile="0"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="false"
+ PrecompiledHeaderFile="$(IntDir)libntp.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(IntDir)"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\libntp\a_md5encrypt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\adjtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\assertions.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atouint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\audio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authreadkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authusekey.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\backtrace-emptytbl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\backtrace.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\buffer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\buftvtots.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\caljulian.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\caltontp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\calyearstart.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\clocktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\clocktypes.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\condition.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\decodenetnum.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\dofptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\dolfptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\emalloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\error.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\event.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\findconfig.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\getclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\hextoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\hextolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\humandate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\icom.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_aton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_ntop.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_pton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\interfaceiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\iosignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\lib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\lib_strbuf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\machines.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\mktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\modetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\nls\msgcat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\mstolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\msyslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\net.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\netaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\netof.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\netscope.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_calendar.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_intres.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_lineedit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_random.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_rfc2553.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_worker.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\numtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\numtohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\octtoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\once.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\ondestroy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\prettydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\randfile.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\recvbuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\refnumtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\setpriority.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\SetSystemTime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\sha1.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\snprintf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\sockaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socktoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socktohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ssl_init.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\statestr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\stdtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\strdup.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\strerror.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\strl_obsd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\syslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\syssignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\systime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\task.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\termios.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\time.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\timetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\timevalops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\uglydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\util_clockstuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\vint64ops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\win32_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\win32os.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\work_fork.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\work_thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ymd2yd.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\ag-char-map.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\buffer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\condition.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\declcond.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\event.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\gaa_compat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\global.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\hash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\intreswork.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\ioctl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\lib_strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\md5.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\mem.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\mutex.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\netscope.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_intres.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_libopts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lists.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_md5.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\ondestroy.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\resource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\signal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\stat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\stdtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\task.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\thread.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timespecops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timetoa.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timevalops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\vint64ops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.mc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj b/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj
new file mode 100644
index 000000000000..e306108e6f9d
--- /dev/null
+++ b/ports/winnt/vs2008/loopback-pps/loopback-ppsapi-provider.vcproj
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="loopback-ppsapi-provider"
+ ProjectGUID="{1ACE209D-D56E-450B-8711-B73E4ACFC38E}"
+ RootNamespace="loopbackerialppsapiprovider"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
+ PreprocessorDefinitions="SYS_WINNT"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ntpd.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ Version="0x0400"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(OutDir)"
+ GenerateManifest="false"
+ ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
+ PreprocessorDefinitions="SYS_WINNT"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ntpd.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ Version="0x0400"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(OutDir)"
+ GenerateManifest="false"
+ ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <ProjectReference
+ ReferencedProjectIdentifier="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+ CopyLocal="false"
+ CopyLocalDependencies="false"
+ CopyLocalSatelliteAssemblies="false"
+ RelativePathToProject=".\libntp\libntp.vcproj"
+ />
+ <ProjectReference
+ ReferencedProjectIdentifier="{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+ CopyLocal="false"
+ CopyLocalDependencies="false"
+ CopyLocalSatelliteAssemblies="false"
+ RelativePathToProject=".\ntpd\ntpd.vcproj"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\timepps.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj b/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj
new file mode 100644
index 000000000000..6bf76fe93cf6
--- /dev/null
+++ b/ports/winnt/vs2008/ntp-keygen/ntp-keygen.vcproj
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntp-keygen"
+ ProjectGUID="{C88C1FBF-59D2-447F-BF57-0BCA8889028F}"
+ RootNamespace="ntp-keygen"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntp-keygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntp-keygen,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntp-keygen.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntp-keygen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntp-keygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntp-keygen,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntp-keygen.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntp-keygen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\util\ntp-keygen-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\util\ntp-keygen.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntp.sln b/ports/winnt/vs2008/ntp.sln
new file mode 100644
index 000000000000..e5556d9043f4
--- /dev/null
+++ b/ports/winnt/vs2008/ntp.sln
@@ -0,0 +1,90 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd", "ntpd\ntpd.vcproj", "{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A} = {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instsrv", "instsrv\instsrv.vcproj", "{C3534C4D-6DF1-498E-9904-4337878A1515}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libntp", "libntp\libntp.vcproj", "{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdate", "ntpdate\ntpdate.vcproj", "{2789A62E-3F46-44F1-AAF0-816CD23C2911}"
+ ProjectSection(ProjectDependencies) = postProject
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdc", "ntpdc\ntpdc.vcproj", "{8011C820-B3D5-4034-86EA-FFC30AE6764B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntp-keygen", "ntp-keygen\ntp-keygen.vcproj", "{C88C1FBF-59D2-447F-BF57-0BCA8889028F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpq", "ntpq\ntpq.vcproj", "{6A92BF14-8931-48B1-A571-DEBE9F190616}"
+ ProjectSection(ProjectDependencies) = postProject
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd-keyword-gen", "ntpd-keyword-gen\ntpd-keyword-gen.vcproj", "{1B814CC1-EAD4-4A13-B29C-A67B23C9845A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00} = {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopback-ppsapi-provider", "loopback-pps\loopback-ppsapi-provider.vcproj", "{1ACE209D-D56E-450B-8711-B73E4ACFC38E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB61F8BF-9637-495C-9087-E8664B400CE0} = {CB61F8BF-9637-495C-9087-E8664B400CE0}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|Win32.Build.0 = Debug|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|Win32.ActiveCfg = Release|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|Win32.Build.0 = Release|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|Win32.Build.0 = Debug|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|Win32.ActiveCfg = Release|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|Win32.Build.0 = Release|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|Win32.ActiveCfg = Debug|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|Win32.Build.0 = Debug|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|Win32.ActiveCfg = Release|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|Win32.Build.0 = Release|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|Win32.Build.0 = Debug|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|Win32.ActiveCfg = Release|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|Win32.Build.0 = Release|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|Win32.Build.0 = Debug|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|Win32.ActiveCfg = Release|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|Win32.Build.0 = Release|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|Win32.Build.0 = Debug|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|Win32.ActiveCfg = Release|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|Win32.Build.0 = Release|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|Win32.Build.0 = Debug|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|Win32.ActiveCfg = Release|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|Win32.Build.0 = Release|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|Win32.Build.0 = Debug|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|Win32.ActiveCfg = Release|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|Win32.Build.0 = Release|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|Win32.Build.0 = Debug|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|Win32.ActiveCfg = Release|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj b/ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
new file mode 100644
index 000000000000..9a309d24ec84
--- /dev/null
+++ b/ports/winnt/vs2008/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpd-keyword-gen"
+ ProjectGUID="{1B814CC1-EAD4-4A13-B29C-A67B23C9845A}"
+ RootNamespace="ntpdkeywordgen"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ ProgramDataBaseFileName="$(OutDir)keyword-gen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)keyword-gen.exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)keywordgen.pdb"
+ RandomizedBaseAddress="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\libopts"
+ PreprocessorDefinitions="_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ ProgramDataBaseFileName="$(OutDir)keyword-gen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)keyword-gen.exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)keywordgen.pdb"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpd\keyword-gen.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\lib_strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat b/ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat
new file mode 100644
index 000000000000..3013b8f15c67
--- /dev/null
+++ b/ports/winnt/vs2008/ntpd/gen-ntp_keyword.bat
@@ -0,0 +1,39 @@
+@echo off
+REM gen-ntp_keyword.bat
+REM helper to invoke keyword-gen and possibly update ntp_keyword.h
+REM Usage:
+REM gen-ntp_keyword dir_containing_keyword-gen.exe
+REM
+if "%1"=="" goto Usage
+if not exist %1\keyword-gen.exe goto ExeNotFound
+%1\keyword-gen.exe ..\..\..\..\ntpd\ntp_parser.h > new_keyword.h
+findstr /v diff_ignore_line new_keyword.h > new_keyword_cmp.h
+findstr /v diff_ignore_line ..\..\..\..\ntpd\ntp_keyword.h > ntp_keyword_cmp.h
+set meat_changed=0
+fc /L ntp_keyword_cmp.h new_keyword_cmp.h > NUL
+if errorlevel 1 set meat_changed=1
+del ntp_keyword_cmp.h new_keyword_cmp.h
+if "0"=="%meat_changed%" goto SkipUpdate
+xcopy /yf new_keyword.h ..\..\..\..\ntpd\ntp_keyword.h
+findstr diff_ignore_line new_keyword.h > ..\..\..\..\ntpd\keyword-gen-utd
+echo updated keyword-gen-utd and ntp_keyword.h
+goto SkipSkipMsg
+
+:skipUpdate
+echo ntp_keyword.h is unchanged
+
+:SkipSkipMsg
+set meat_changed=
+del new_keyword.h
+goto Exit
+
+:Usage
+echo Usage:
+echo gen-ntp_keyword dir_containing_keyword-gen.exe
+goto Exit
+
+:ExeNotFound
+echo keyword-gen.exe not found at %1\keyword-gen.exe
+goto Exit
+
+:Exit
diff --git a/ports/winnt/vs2008/ntpd/ntpd.vcproj b/ports/winnt/vs2008/ntpd/ntpd.vcproj
new file mode 100644
index 000000000000..3dfcfe4aa0f0
--- /dev/null
+++ b/ports/winnt/vs2008/ntpd/ntpd.vcproj
@@ -0,0 +1,1126 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="ntpd"
+ ProjectGUID="{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="false"
+ PrecompiledHeaderFile="$(IntDir)ntpd.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpd-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpd.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpd-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpd\cmd_args.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\keyword-gen.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\ntpd\nt_clockstuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_config.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_control.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_crypto.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_filegen.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ntpd\ntp_iocompletionport.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_leapsec.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_loopfilter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_monitor.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.y"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_peer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_proto.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_refclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_request.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_restrict.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_signd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_util.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd-opts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpsim.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ntpd\ntservice.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ascii.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\assertions.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\boolean.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\declcond.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\hopf_PCI_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\int.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\jupiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\mbg_gps166.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_cmdargs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_filegen.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_keyword.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_leapsec.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_libopts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lists.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_request.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_tty.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_worker.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_workimpl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd-opts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpsim.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntservice.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\offset.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\autoopts\options.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\param.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_palisade.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\result.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\timepps.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timespecops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timevalops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\wait.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="..\libntp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="..\libntp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libntp\MSG00001.bin"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_keyword.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h"
+ CommandLine=".\gen-ntp_keyword $(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\..\..\ntpd\ntp_parser.h"
+ Outputs="..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h"
+ CommandLine=".\gen-ntp_keyword $(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\..\..\ntpd\ntp_parser.h"
+ Outputs="..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ ShowIncludes="true"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="..\libntp\messages.mc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Reference Clock"
+ >
+ <File
+ RelativePath="..\..\ntpd\hopf_PCI_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_acts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_arbiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_arc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_as2201.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_atom.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_bancomm.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_chronolog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_chu.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_conf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_datum.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_dumbclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_fg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_gpsvme.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_heath.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hopfpci.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hopfser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hpgps.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_irig.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_jjy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_jupiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_leitch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_local.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_msfees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_mx4200.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_neoclock4x.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_nmea.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_oncore.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_palisade.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_pcf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_pst.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_ripencc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_shm.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tpro.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_true.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tsyncpci.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tt560.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_ulink.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_wwv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_wwvb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_zyfer.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Parse Lib"
+ >
+ <File
+ RelativePath="..\..\..\..\libparse\binio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_computime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_dcf7000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_hopf6021.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_meinberg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_rawdcf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_rcc8000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_schmid.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_trimtaip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_trimtsip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_varitext.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_wharton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\data_mbg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\gpstolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\ieee754io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\info_trimble.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\mfp_mul.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parse_conf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parsesolaris.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parsestreams.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\trim_info.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\scripts\mkver.bat"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\scripts\mkver.bat;..\..\include\config.h"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\scripts\mkver.bat;..\..\include\config.h"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntpdate/ntpdate.vcproj b/ports/winnt/vs2008/ntpdate/ntpdate.vcproj
new file mode 100644
index 000000000000..85a4bef373ca
--- /dev/null
+++ b/ports/winnt/vs2008/ntpdate/ntpdate.vcproj
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpdate"
+ ProjectGUID="{2789A62E-3F46-44F1-AAF0-816CD23C2911}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\ntpdate,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpdate.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdate-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpdate,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpdate.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdate-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpdate\ntpdate.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdate\ntpdate.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntpdc/ntpdc.vcproj b/ports/winnt/vs2008/ntpdc/ntpdc.vcproj
new file mode 100644
index 000000000000..5fd301ddf8b5
--- /dev/null
+++ b/ports/winnt/vs2008/ntpdc/ntpdc.vcproj
@@ -0,0 +1,367 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpdc"
+ ProjectGUID="{8011C820-B3D5-4034-86EA-FFC30AE6764B}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpdc,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpdc.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdc-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntpdc,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpdc.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdc-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc_ops.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2008/ntpq/ntpq.vcproj b/ports/winnt/vs2008/ntpq/ntpq.vcproj
new file mode 100644
index 000000000000..440b38bae97a
--- /dev/null
+++ b/ports/winnt/vs2008/ntpq/ntpq.vcproj
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpq"
+ ProjectGUID="{6A92BF14-8931-48B1-A571-DEBE9F190616}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntpq,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpq.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpq-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpq,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpq.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpq-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq-opts.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq-subs.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/instsrv/instsrv.vcproj b/ports/winnt/vs2013/instsrv/instsrv.vcproj
new file mode 100644
index 000000000000..e3324a66ec6b
--- /dev/null
+++ b/ports/winnt/vs2013/instsrv/instsrv.vcproj
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="instsrv"
+ ProjectGUID="{C3534C4D-6DF1-498E-9904-4337878A1515}"
+ RootNamespace="instsrv"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)Instsrv.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\include,..\..\include,..\..\instsrv"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)Instsrv.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)instsrv-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="oldnames.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\instsrv\instsrv.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/instsrv/instsrv.vcxproj b/ports/winnt/vs2013/instsrv/instsrv.vcxproj
new file mode 100644
index 000000000000..69360a4f4508
--- /dev/null
+++ b/ports/winnt/vs2013/instsrv/instsrv.vcxproj
@@ -0,0 +1,680 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C3534C4D-6DF1-498E-9904-4337878A1515}</ProjectGuid>
+ <RootNamespace>instsrv</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)Instsrv.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\instsrv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;_WINDOWS;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)Instsrv.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)instsrv-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>oldnames.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\instsrv\instsrv.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters b/ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters
new file mode 100644
index 000000000000..b2d70f6561b8
--- /dev/null
+++ b/ports/winnt/vs2013/instsrv/instsrv.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{e8390c50-c913-4569-99e0-d09ea4a59555}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{bde2853f-cf7f-4658-89e7-21f3b87fc2e2}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{21cb96d9-ac72-4879-98fd-1e8ed146b4be}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\instsrv\instsrv.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/libntp/libntp.vcproj b/ports/winnt/vs2013/libntp/libntp.vcproj
new file mode 100644
index 000000000000..f9f57507d4d2
--- /dev/null
+++ b/ports/winnt/vs2013/libntp/libntp.vcproj
@@ -0,0 +1,936 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libntp"
+ ProjectGUID="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)libntp.pch"
+ AssemblerListingLocation="$IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(IntDir)"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\libntp,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ GeneratePreprocessedFile="0"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="false"
+ PrecompiledHeaderFile="$(IntDir)libntp.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(IntDir)"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\libntp\a_md5encrypt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\adjtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\assertions.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\atouint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\audio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authreadkeys.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\authusekey.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\backtrace-emptytbl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\backtrace.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\buffer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\buftvtots.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\caljulian.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\caltontp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\calyearstart.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\clocktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\clocktypes.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\condition.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\decodenetnum.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\dofptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\dolfptoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\emalloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\error.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\event.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\findconfig.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\getclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\hextoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\hextolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\humandate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\icom.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_aton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_ntop.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\inet_pton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\interfaceiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\iosignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\lib.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\lib_strbuf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\log.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\machines.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\mktime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\modetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\nls\msgcat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\mstolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\msyslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\net.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\netaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\netof.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\netscope.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_calendar.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_intres.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_libopts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_lineedit.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_random.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_rfc2553.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ntp_worker.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\numtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\numtohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\octtoint.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\once.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\ondestroy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\prettydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\randfile.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\recvbuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\refnumtoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\setpriority.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\SetSystemTime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\snprintf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\sockaddr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socktoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\socktohost.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ssl_init.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\statestr.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\stdtime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\strdup.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\strerror.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\strl_obsd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\syslog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\syssignal.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\systime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\task.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\termios.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\time.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\timetoa.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\timevalops.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\uglydate.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\util_clockstuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libntp\win32_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\win32os.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\work_fork.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\work_thread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libntp\ymd2yd.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\ag-char-map.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\buffer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\condition.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\declcond.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\event.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\gaa_compat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\global.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\hash.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\intreswork.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\ioctl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\lib_strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\md5.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\mem.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\mutex.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\isc\netscope.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_intres.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_libopts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lists.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_md5.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\ondestroy.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\resource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\signal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\stat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\stdtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\task.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\thread.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timespecops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timetoa.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timevalops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.mc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Message Compiler"
+ CommandLine="mc -h $(InputDir) -r $(InputDir) -e h $(InputPath)&#x0D;&#x0A;"
+ Outputs="$(InputDir)$(InputName).rc;$(InputDir)$(InputName).h;$(InputDir)msg00001.bin"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj b/ports/winnt/vs2013/libntp/libntp.vcxproj
new file mode 100644
index 000000000000..d3b1b6e3c00a
--- /dev/null
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj
@@ -0,0 +1,740 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\libntp;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_LIB;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)libntp.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>NoListing</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Lib>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\libntp\a_md5encrypt.c" />
+ <ClCompile Include="..\..\..\..\libntp\adjtime.c" />
+ <ClCompile Include="..\..\..\..\libntp\vint64ops.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\assertions.c" />
+ <ClCompile Include="..\..\..\..\libntp\atoint.c" />
+ <ClCompile Include="..\..\..\..\libntp\atolfp.c" />
+ <ClCompile Include="..\..\..\..\libntp\atouint.c" />
+ <ClCompile Include="..\..\..\..\libntp\audio.c" />
+ <ClCompile Include="..\..\..\..\libntp\authkeys.c" />
+ <ClCompile Include="..\..\..\..\libntp\authreadkeys.c" />
+ <ClCompile Include="..\..\..\..\libntp\authusekey.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\backtrace-emptytbl.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\backtrace.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\buffer.c" />
+ <ClCompile Include="..\..\..\..\libntp\buftvtots.c" />
+ <ClCompile Include="..\..\..\..\libntp\caljulian.c" />
+ <ClCompile Include="..\..\..\..\libntp\caltontp.c" />
+ <ClCompile Include="..\..\..\..\libntp\calyearstart.c" />
+ <ClCompile Include="..\..\..\..\libntp\clocktime.c" />
+ <ClCompile Include="..\..\..\..\libntp\clocktypes.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\sha1.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\condition.c" />
+ <ClCompile Include="..\..\..\..\libntp\decodenetnum.c" />
+ <ClCompile Include="..\..\..\..\libntp\dofptoa.c" />
+ <ClCompile Include="..\..\..\..\libntp\dolfptoa.c" />
+ <ClCompile Include="..\..\..\..\libntp\emalloc.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\error.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\event.c" />
+ <ClCompile Include="..\..\..\..\libntp\findconfig.c" />
+ <ClCompile Include="..\..\libntp\getclock.c" />
+ <ClCompile Include="..\..\..\..\libntp\getopt.c" />
+ <ClCompile Include="..\..\..\..\libntp\hextoint.c" />
+ <ClCompile Include="..\..\..\..\libntp\hextolfp.c" />
+ <ClCompile Include="..\..\..\..\libntp\humandate.c" />
+ <ClCompile Include="..\..\..\..\libntp\icom.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\inet_aton.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\inet_ntop.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\inet_pton.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\interfaceiter.c" />
+ <ClCompile Include="..\..\..\..\libntp\iosignal.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\lib.c" />
+ <ClCompile Include="..\..\..\..\libntp\lib_strbuf.c" />
+ <ClCompile Include="..\..\..\..\sntp\libopts\libopts.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\log.c" />
+ <ClCompile Include="..\..\..\..\libntp\machines.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\md5.c" />
+ <ClCompile Include="..\..\..\..\libntp\mktime.c" />
+ <ClCompile Include="..\..\..\..\libntp\modetoa.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\nls\msgcat.c" />
+ <ClCompile Include="..\..\..\..\libntp\mstolfp.c" />
+ <ClCompile Include="..\..\..\..\libntp\msyslog.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\net.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\netaddr.c" />
+ <ClCompile Include="..\..\..\..\libntp\netof.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\netscope.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_calendar.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_intres.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_libopts.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_lineedit.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_random.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_rfc2553.c" />
+ <ClCompile Include="..\..\..\..\libntp\ntp_worker.c" />
+ <ClCompile Include="..\..\..\..\libntp\numtoa.c" />
+ <ClCompile Include="..\..\..\..\libntp\numtohost.c" />
+ <ClCompile Include="..\..\..\..\libntp\octtoint.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\once.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\ondestroy.c" />
+ <ClCompile Include="..\..\..\..\libntp\prettydate.c" />
+ <ClCompile Include="..\..\libntp\randfile.c" />
+ <ClCompile Include="..\..\..\..\libntp\recvbuff.c" />
+ <ClCompile Include="..\..\..\..\libntp\refnumtoa.c" />
+ <ClCompile Include="..\..\libntp\setpriority.c" />
+ <ClCompile Include="..\..\libntp\SetSystemTime.c" />
+ <ClCompile Include="..\..\..\..\libntp\snprintf.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\sockaddr.c" />
+ <ClCompile Include="..\..\..\..\libntp\socket.c" />
+ <ClCompile Include="..\..\..\..\libntp\socktoa.c" />
+ <ClCompile Include="..\..\..\..\libntp\socktohost.c" />
+ <ClCompile Include="..\..\..\..\libntp\ssl_init.c" />
+ <ClCompile Include="..\..\..\..\libntp\statestr.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\stdtime.c" />
+ <ClCompile Include="..\..\..\..\libntp\strdup.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\strerror.c" />
+ <ClCompile Include="..\..\..\..\libntp\strl_obsd.c" />
+ <ClCompile Include="..\..\libntp\syslog.c" />
+ <ClCompile Include="..\..\..\..\libntp\syssignal.c" />
+ <ClCompile Include="..\..\..\..\libntp\systime.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\task.c" />
+ <ClCompile Include="..\..\libntp\termios.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\thread.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\time.c" />
+ <ClCompile Include="..\..\..\..\libntp\timetoa.c" />
+ <ClCompile Include="..\..\..\..\libntp\timevalops.c" />
+ <ClCompile Include="..\..\..\..\libntp\uglydate.c" />
+ <ClCompile Include="..\..\libntp\util_clockstuff.c" />
+ <ClCompile Include="..\..\libntp\win32_io.c" />
+ <ClCompile Include="..\..\..\..\lib\isc\win32\win32os.c" />
+ <ClCompile Include="..\..\..\..\libntp\work_fork.c" />
+ <ClCompile Include="..\..\..\..\libntp\work_thread.c" />
+ <ClCompile Include="..\..\..\..\libntp\ymd2yd.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\vint64ops.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\sha1.h" />
+ <ClInclude Include="..\..\..\..\sntp\libopts\ag-char-map.h" />
+ <ClInclude Include="..\..\..\..\include\binio.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\buffer.h" />
+ <ClInclude Include="..\..\include\clockstuff.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\condition.h" />
+ <ClInclude Include="..\..\include\config.h" />
+ <ClInclude Include="..\..\..\..\include\declcond.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\event.h" />
+ <ClInclude Include="..\..\include\gaa_compat.h" />
+ <ClInclude Include="..\..\..\..\include\global.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\hash.h" />
+ <ClInclude Include="..\..\..\..\include\ieee754io.h" />
+ <ClInclude Include="..\..\include\netinet\in.h" />
+ <ClInclude Include="..\..\include\arpa\inet.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\interfaceiter.h" />
+ <ClInclude Include="..\..\..\..\include\intreswork.h" />
+ <ClInclude Include="..\..\include\sys\ioctl.h" />
+ <ClInclude Include="..\..\..\..\include\iosignal.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\ipv6.h" />
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\lib_strbuf.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\log.h" />
+ <ClInclude Include="..\..\..\..\include\md5.h" />
+ <ClInclude Include="..\..\..\..\include\isc\mem.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\mutex.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\net.h" />
+ <ClInclude Include="..\..\..\..\include\isc\netaddr.h" />
+ <ClInclude Include="..\..\include\netdb.h" />
+ <ClInclude Include="..\..\..\..\include\isc\netscope.h" />
+ <ClInclude Include="..\..\..\..\include\ntp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_calendar.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_control.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_debug.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_if.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_intres.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_io.h" />
+ <ClInclude Include="..\..\include\ntp_iocompletionport.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_libopts.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_lists.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_malloc.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_md5.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_net.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_random.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_refclock.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_select.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_string.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h" />
+ <ClInclude Include="..\..\include\ntp_timer.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_types.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h" />
+ <ClInclude Include="..\..\..\..\include\ntpd.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\ondestroy.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\platform.h" />
+ <ClInclude Include="..\..\..\..\include\recvbuff.h" />
+ <ClInclude Include="..\..\include\sys\resource.h" />
+ <ClInclude Include="..\..\include\sys\signal.h" />
+ <ClInclude Include="..\..\include\sys\socket.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\stat.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\stdtime.h" />
+ <ClInclude Include="..\..\include\syslog.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\task.h" />
+ <ClInclude Include="..\..\include\termios.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\thread.h" />
+ <ClInclude Include="..\..\include\sys\time.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\time.h" />
+ <ClInclude Include="..\..\..\..\include\timespecops.h" />
+ <ClInclude Include="..\..\..\..\include\timetoa.h" />
+ <ClInclude Include="..\..\..\..\include\timevalops.h" />
+ <ClInclude Include="..\..\include\win32_io.h" />
+ <ClInclude Include="..\..\include\isc\win32os.h" />
+ <ClInclude Include="..\..\libntp\messages.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\libntp\messages.mc">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">Message Compiler</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Message Compiler</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">Message Compiler</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">mc -h %(RootDir)%(Directory) -r %(RootDir)%(Directory) -e h %(FullPath)
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">%(RootDir)%(Directory)%(Filename).rc;%(RootDir)%(Directory)%(Filename).h;%(RootDir)%(Directory)msg00001.bin;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/libntp/libntp.vcxproj.filters b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
new file mode 100644
index 000000000000..4eefad71149d
--- /dev/null
+++ b/ports/winnt/vs2013/libntp/libntp.vcxproj.filters
@@ -0,0 +1,568 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{df2922e3-313f-4661-9019-a88cb5be1bee}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{70e10793-da6a-4bfe-b35a-c00a64ac61bc}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Generated Files">
+ <UniqueIdentifier>{6452d330-e63a-473c-bd9f-1874d4061592}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{fc799aa8-add1-4e83-8dff-de647477bf79}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\libntp\a_md5encrypt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\adjtime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\assertions.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\atoint.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\atolfp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\atouint.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\audio.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\authkeys.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\authreadkeys.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\authusekey.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\backtrace-emptytbl.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\backtrace.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\buffer.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\buftvtots.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\caljulian.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\caltontp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\calyearstart.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\clocktime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\clocktypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\condition.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\decodenetnum.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\dofptoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\dolfptoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\emalloc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\error.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\event.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\findconfig.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\getclock.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\getopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\hextoint.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\hextolfp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\humandate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\icom.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\inet_aton.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\inet_ntop.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\inet_pton.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\interfaceiter.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\iosignal.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\lib.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\lib_strbuf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\sntp\libopts\libopts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\log.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\machines.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\md5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\mktime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\modetoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\nls\msgcat.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\mstolfp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\msyslog.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\net.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\netaddr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\netof.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\netscope.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_calendar.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_intres.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_libopts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_lineedit.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_random.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_rfc2553.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ntp_worker.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\numtoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\numtohost.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\octtoint.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\once.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\ondestroy.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\prettydate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\randfile.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\recvbuff.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\refnumtoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\setpriority.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\SetSystemTime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\snprintf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\sockaddr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\socket.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\socktoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\socktohost.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ssl_init.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\statestr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\stdtime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\strdup.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\strerror.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\strl_obsd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\syslog.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\syssignal.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\systime.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\task.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\termios.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\thread.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\time.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\timetoa.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\timevalops.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\uglydate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\util_clockstuff.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libntp\win32_io.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\win32\win32os.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\work_fork.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\work_thread.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\ymd2yd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\lib\isc\sha1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libntp\vint64ops.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\sntp\libopts\ag-char-map.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\binio.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\buffer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\clockstuff.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\condition.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\declcond.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\event.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\gaa_compat.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\global.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\hash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ieee754io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\netinet\in.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\arpa\inet.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\interfaceiter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\intreswork.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\ioctl.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\iosignal.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\ipv6.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\lib_strbuf.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\log.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\md5.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\isc\mem.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\mutex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\isc\netaddr.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\netdb.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\isc\netscope.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_calendar.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_control.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_debug.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_if.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_intres.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ntp_iocompletionport.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_libopts.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_lists.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_malloc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_md5.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_random.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_refclock.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_select.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ntp_timer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_types.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntpd.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\ondestroy.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\platform.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\recvbuff.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\signal.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\socket.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\stat.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\stdtime.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\task.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\termios.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\thread.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\time.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\time.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\timespecops.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\timetoa.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\timevalops.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\win32_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\win32os.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libntp\messages.h">
+ <Filter>Generated Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\sha1.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\vint64ops.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\libntp\messages.mc">
+ <Filter>Resource Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj
new file mode 100644
index 000000000000..e306108e6f9d
--- /dev/null
+++ b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcproj
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="loopback-ppsapi-provider"
+ ProjectGUID="{1ACE209D-D56E-450B-8711-B73E4ACFC38E}"
+ RootNamespace="loopbackerialppsapiprovider"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
+ PreprocessorDefinitions="SYS_WINNT"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ntpd.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ Version="0x0400"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(OutDir)"
+ GenerateManifest="false"
+ ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include"
+ PreprocessorDefinitions="SYS_WINNT"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="serialpps-ppsapi-provider.h"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(OutDir)loopback-ppsapi-provider-vc90"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ntpd.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ Version="0x0400"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(OutDir)"
+ GenerateManifest="false"
+ ModuleDefinitionFile="..\..\ppsapi\loopback\src\loopback-ppsapi.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <ProjectReference
+ ReferencedProjectIdentifier="{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+ CopyLocal="false"
+ CopyLocalDependencies="false"
+ CopyLocalSatelliteAssemblies="false"
+ RelativePathToProject=".\libntp\libntp.vcproj"
+ />
+ <ProjectReference
+ ReferencedProjectIdentifier="{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+ CopyLocal="false"
+ CopyLocalDependencies="false"
+ CopyLocalSatelliteAssemblies="false"
+ RelativePathToProject=".\ntpd\ntpd.vcproj"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\loopback-ppsapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\sys\time.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ppsapi\loopback\src\timepps.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj
new file mode 100644
index 000000000000..a5ba8aa9ced3
--- /dev/null
+++ b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj
@@ -0,0 +1,583 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1ACE209D-D56E-450B-8711-B73E4ACFC38E}</ProjectGuid>
+ <RootNamespace>loopbackerialppsapiprovider</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SYS_WINNT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeaderFile>serialpps-ppsapi-provider.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ProgramDataBaseFileName>$(OutDir)loopback-ppsapi-provider-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ntpd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <Version>
+ </Version>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>..\..\ppsapi\loopback\src\loopback-ppsapi.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <Private>false</Private>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\ntpd\ntpd.vcxproj">
+ <Project>{cb61f8bf-9637-495c-9087-e8664b400ce0}</Project>
+ <Private>false</Private>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\ppsapi\loopback\src\loopback-ppsapi.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\ppsapi\loopback\src\loopback-ppsapi.h" />
+ <ClInclude Include="..\..\ppsapi\loopback\src\sys\time.h" />
+ <ClInclude Include="..\..\ppsapi\loopback\src\timepps.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters
new file mode 100644
index 000000000000..135f4eb7e004
--- /dev/null
+++ b/ports/winnt/vs2013/loopback-pps/loopback-ppsapi-provider.vcxproj.filters
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\ppsapi\loopback\src\loopback-ppsapi.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\ppsapi\loopback\src\loopback-ppsapi.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\ppsapi\loopback\src\sys\time.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\ppsapi\loopback\src\timepps.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj
new file mode 100644
index 000000000000..6bf76fe93cf6
--- /dev/null
+++ b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcproj
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntp-keygen"
+ ProjectGUID="{C88C1FBF-59D2-447F-BF57-0BCA8889028F}"
+ RootNamespace="ntp-keygen"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntp-keygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntp-keygen,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntp-keygen.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntp-keygen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntp-keygen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntp-keygen,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntp-keygen.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntp-keygen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\util\ntp-keygen-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\util\ntp-keygen.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntp-keygen&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj
new file mode 100644
index 000000000000..21a2675c34a2
--- /dev/null
+++ b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj
@@ -0,0 +1,752 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C88C1FBF-59D2-447F-BF57-0BCA8889028F}</ProjectGuid>
+ <RootNamespace>ntp-keygen</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntp-keygen.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntp-keygen;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntp-keygen.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntp-keygen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\util\ntp-keygen-opts.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">Level3</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\util\ntp-keygen.c" />
+ <ClCompile Include="version.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntp-keygen
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters
new file mode 100644
index 000000000000..4fba55170c74
--- /dev/null
+++ b/ports/winnt/vs2013/ntp-keygen/ntp-keygen.vcxproj.filters
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{f11f7756-c1fa-4353-8941-89cc81be5e02}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{e01d2f25-84af-473d-bb5a-57991927813b}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{8fcd5bab-1f17-4bd9-93a5-33c7eac5b745}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\util\ntp-keygen-opts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\util\ntp-keygen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="version.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntp.sln b/ports/winnt/vs2013/ntp.sln
new file mode 100644
index 000000000000..e28828f370a4
--- /dev/null
+++ b/ports/winnt/vs2013/ntp.sln
@@ -0,0 +1,166 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30219.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd", "ntpd\ntpd.vcxproj", "{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instsrv", "instsrv\instsrv.vcxproj", "{C3534C4D-6DF1-498E-9904-4337878A1515}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libntp", "libntp\libntp.vcxproj", "{400FBFCB-462E-40D0-B06B-3B74E3FFFD00}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdate", "ntpdate\ntpdate.vcxproj", "{2789A62E-3F46-44F1-AAF0-816CD23C2911}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpdc", "ntpdc\ntpdc.vcxproj", "{8011C820-B3D5-4034-86EA-FFC30AE6764B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntp-keygen", "ntp-keygen\ntp-keygen.vcxproj", "{C88C1FBF-59D2-447F-BF57-0BCA8889028F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpq", "ntpq\ntpq.vcxproj", "{6A92BF14-8931-48B1-A571-DEBE9F190616}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntpd-keyword-gen", "ntpd-keyword-gen\ntpd-keyword-gen.vcxproj", "{1B814CC1-EAD4-4A13-B29C-A67B23C9845A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopback-ppsapi-provider", "loopback-pps\loopback-ppsapi-provider.vcxproj", "{1ACE209D-D56E-450B-8711-B73E4ACFC38E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug XP|Win32 = Debug XP|Win32
+ Debug XP|x64 = Debug XP|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release XP|Win32 = Release XP|Win32
+ Release XP|x64 = Release XP|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|Win32.Build.0 = Debug|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|x64.ActiveCfg = Debug|x64
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Debug|x64.Build.0 = Debug|x64
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release XP|Win32.Build.0 = Release XP|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release XP|x64.ActiveCfg = Release XP|x64
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|Win32.ActiveCfg = Release|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|Win32.Build.0 = Release|Win32
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|x64.ActiveCfg = Release|x64
+ {CB61F8BF-9637-495C-9087-E8664B400CE0}.Release|x64.Build.0 = Release|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|Win32.Build.0 = Debug|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|x64.ActiveCfg = Debug|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Debug|x64.Build.0 = Debug|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release XP|Win32.Build.0 = Release XP|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release XP|x64.ActiveCfg = Release XP|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|Win32.ActiveCfg = Release|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|Win32.Build.0 = Release|Win32
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|x64.ActiveCfg = Release|x64
+ {C3534C4D-6DF1-498E-9904-4337878A1515}.Release|x64.Build.0 = Release|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|Win32.ActiveCfg = Debug|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|Win32.Build.0 = Debug|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|x64.ActiveCfg = Debug|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Debug|x64.Build.0 = Debug|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release XP|Win32.Build.0 = Release XP|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release XP|x64.ActiveCfg = Release XP|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|Win32.ActiveCfg = Release|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|Win32.Build.0 = Release|Win32
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|x64.ActiveCfg = Release|x64
+ {400FBFCB-462E-40D0-B06B-3B74E3FFFD00}.Release|x64.Build.0 = Release|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|Win32.Build.0 = Debug|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|x64.ActiveCfg = Debug|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Debug|x64.Build.0 = Debug|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release XP|Win32.Build.0 = Release XP|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release XP|x64.ActiveCfg = Release XP|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|Win32.ActiveCfg = Release|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|Win32.Build.0 = Release|Win32
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|x64.ActiveCfg = Release|x64
+ {2789A62E-3F46-44F1-AAF0-816CD23C2911}.Release|x64.Build.0 = Release|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|Win32.Build.0 = Debug|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|x64.ActiveCfg = Debug|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Debug|x64.Build.0 = Debug|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release XP|Win32.Build.0 = Release XP|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release XP|x64.ActiveCfg = Release XP|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|Win32.ActiveCfg = Release|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|Win32.Build.0 = Release|Win32
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|x64.ActiveCfg = Release|x64
+ {8011C820-B3D5-4034-86EA-FFC30AE6764B}.Release|x64.Build.0 = Release|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|Win32.Build.0 = Debug|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|x64.ActiveCfg = Debug|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Debug|x64.Build.0 = Debug|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release XP|Win32.Build.0 = Release XP|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release XP|x64.ActiveCfg = Release XP|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|Win32.ActiveCfg = Release|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|Win32.Build.0 = Release|Win32
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|x64.ActiveCfg = Release|x64
+ {C88C1FBF-59D2-447F-BF57-0BCA8889028F}.Release|x64.Build.0 = Release|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|Win32.Build.0 = Debug|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|x64.ActiveCfg = Debug|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Debug|x64.Build.0 = Debug|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release XP|Win32.Build.0 = Release XP|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release XP|x64.ActiveCfg = Release XP|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|Win32.ActiveCfg = Release|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|Win32.Build.0 = Release|Win32
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|x64.ActiveCfg = Release|x64
+ {6A92BF14-8931-48B1-A571-DEBE9F190616}.Release|x64.Build.0 = Release|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|Win32.Build.0 = Debug|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|x64.ActiveCfg = Debug|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Debug|x64.Build.0 = Debug|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release XP|Win32.Build.0 = Release XP|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release XP|x64.ActiveCfg = Release XP|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|Win32.ActiveCfg = Release|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|Win32.Build.0 = Release|Win32
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|x64.ActiveCfg = Release|x64
+ {1B814CC1-EAD4-4A13-B29C-A67B23C9845A}.Release|x64.Build.0 = Release|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug XP|Win32.ActiveCfg = Debug XP|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug XP|Win32.Build.0 = Debug XP|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug XP|x64.ActiveCfg = Debug XP|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|Win32.Build.0 = Debug|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|x64.ActiveCfg = Debug|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Debug|x64.Build.0 = Debug|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release XP|Win32.ActiveCfg = Release XP|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release XP|Win32.Build.0 = Release XP|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release XP|x64.ActiveCfg = Release XP|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|Win32.ActiveCfg = Release|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|Win32.Build.0 = Release|Win32
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|x64.ActiveCfg = Release|x64
+ {1ACE209D-D56E-450B-8711-B73E4ACFC38E}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
new file mode 100644
index 000000000000..9a309d24ec84
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcproj
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpd-keyword-gen"
+ ProjectGUID="{1B814CC1-EAD4-4A13-B29C-A67B23C9845A}"
+ RootNamespace="ntpdkeywordgen"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ ProgramDataBaseFileName="$(OutDir)keyword-gen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)keyword-gen.exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)keywordgen.pdb"
+ RandomizedBaseAddress="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\libopts"
+ PreprocessorDefinitions="_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ ProgramDataBaseFileName="$(OutDir)keyword-gen-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)keyword-gen.exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)keywordgen.pdb"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpd\keyword-gen.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\lib_strbuf.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj
new file mode 100644
index 000000000000..979ceb1ed94b
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj
@@ -0,0 +1,531 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1B814CC1-EAD4-4A13-B29C-A67B23C9845A}</ProjectGuid>
+ <RootNamespace>ntpdkeywordgen</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(OutDir)keyword-gen-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)keyword-gen.exe</OutputFile>
+ <Version>
+ </Version>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)keywordgen.pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpd\keyword-gen.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h" />
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\lib_strbuf.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\net.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_config.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_net.h" />
+ <ClInclude Include="..\..\..\..\ntpd\ntp_parser.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h" />
+ <ClInclude Include="..\..\..\..\ntpd\ntp_scanner.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_string.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_types.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters
new file mode 100644
index 000000000000..44b51670ca06
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd-keyword-gen/ntpd-keyword-gen.vcxproj.filters
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpd\keyword-gen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\lib_strbuf.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_parser.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_scanner.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_types.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat b/ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat
new file mode 100644
index 000000000000..3013b8f15c67
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd/gen-ntp_keyword.bat
@@ -0,0 +1,39 @@
+@echo off
+REM gen-ntp_keyword.bat
+REM helper to invoke keyword-gen and possibly update ntp_keyword.h
+REM Usage:
+REM gen-ntp_keyword dir_containing_keyword-gen.exe
+REM
+if "%1"=="" goto Usage
+if not exist %1\keyword-gen.exe goto ExeNotFound
+%1\keyword-gen.exe ..\..\..\..\ntpd\ntp_parser.h > new_keyword.h
+findstr /v diff_ignore_line new_keyword.h > new_keyword_cmp.h
+findstr /v diff_ignore_line ..\..\..\..\ntpd\ntp_keyword.h > ntp_keyword_cmp.h
+set meat_changed=0
+fc /L ntp_keyword_cmp.h new_keyword_cmp.h > NUL
+if errorlevel 1 set meat_changed=1
+del ntp_keyword_cmp.h new_keyword_cmp.h
+if "0"=="%meat_changed%" goto SkipUpdate
+xcopy /yf new_keyword.h ..\..\..\..\ntpd\ntp_keyword.h
+findstr diff_ignore_line new_keyword.h > ..\..\..\..\ntpd\keyword-gen-utd
+echo updated keyword-gen-utd and ntp_keyword.h
+goto SkipSkipMsg
+
+:skipUpdate
+echo ntp_keyword.h is unchanged
+
+:SkipSkipMsg
+set meat_changed=
+del new_keyword.h
+goto Exit
+
+:Usage
+echo Usage:
+echo gen-ntp_keyword dir_containing_keyword-gen.exe
+goto Exit
+
+:ExeNotFound
+echo keyword-gen.exe not found at %1\keyword-gen.exe
+goto Exit
+
+:Exit
diff --git a/ports/winnt/vs2013/ntpd/ntpd.vcproj b/ports/winnt/vs2013/ntpd/ntpd.vcproj
new file mode 100644
index 000000000000..3dfcfe4aa0f0
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd/ntpd.vcproj
@@ -0,0 +1,1126 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="ntpd"
+ ProjectGUID="{CB61F8BF-9637-495C-9087-E8664B400CE0}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="false"
+ PrecompiledHeaderFile="$(IntDir)ntpd.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpd-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpd.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\ntpd,..\..\..\..\ntpd,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ SmallerTypeCheck="true"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpd.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpd-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib winmm.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ OptimizeForWindows98="0"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpd\cmd_args.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\keyword-gen.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\ntpd\nt_clockstuff.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_config.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_control.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_crypto.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_filegen.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ntpd\ntp_iocompletionport.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_leapsec.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_loopfilter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_monitor.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.y"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_peer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_proto.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_refclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_request.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_restrict.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_signd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_timer.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_util.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd-opts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpsim.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\ntpd\ntservice.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ascii.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\assertions.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\binio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\boolean.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\clockstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\declcond.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\hopf_PCI_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ieee754io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netinet\in.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\arpa\inet.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\int.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\interfaceiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\iosignal.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\ipv6.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\jupiter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\l_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libntp\log.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\mbg_gps166.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\netaddr.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\netdb.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_calendar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_cmdargs.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_control.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_debug.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_filegen.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_if.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_iocompletionport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_keyword.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_leapsec.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_libopts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lists.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_malloc.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_parser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_proto.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_refclock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_request.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_rfc2553.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_scanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntp_timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_tty.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_types.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_worker.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_workimpl.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntpd-opts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpd.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntpsim.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\ntservice.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\offset.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\sntp\libopts\autoopts\options.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\param.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\platform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\recvbuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_palisade.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\lib\isc\include\isc\result.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\termios.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\timepps.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timespecops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\timevalops.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\sys\wait.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\win32_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\win32os.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ >
+ <File
+ RelativePath="..\..\libntp\messages.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="..\libntp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ AdditionalIncludeDirectories="..\libntp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libntp\MSG00001.bin"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\ntp_keyword.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h"
+ CommandLine=".\gen-ntp_keyword $(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\..\..\ntpd\ntp_parser.h"
+ Outputs="..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h"
+ CommandLine=".\gen-ntp_keyword $(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\..\..\ntpd\ntp_parser.h"
+ Outputs="..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ ShowIncludes="true"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="..\libntp\messages.mc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Reference Clock"
+ >
+ <File
+ RelativePath="..\..\ntpd\hopf_PCI_io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_acts.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_arbiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_arc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_as2201.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_atom.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_bancomm.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_chronolog.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_chu.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_conf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_datum.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_dumbclock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_fg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_gpsvme.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_heath.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hopfpci.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hopfser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_hpgps.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_irig.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_jjy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_jupiter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_leitch.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_local.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_msfees.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_mx4200.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_neoclock4x.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_nmea.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_oncore.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_palisade.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_pcf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_pst.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_ripencc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_shm.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tpro.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_true.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tsyncpci.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_tt560.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_ulink.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_wwv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_wwvb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpd\refclock_zyfer.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Parse Lib"
+ >
+ <File
+ RelativePath="..\..\..\..\libparse\binio.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_computime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_dcf7000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_hopf6021.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_meinberg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_rawdcf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_rcc8000.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_schmid.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_trimtaip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_trimtsip.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_varitext.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\clk_wharton.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\data_mbg.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\gpstolfp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\ieee754io.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\info_trimble.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\mfp_mul.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parse_conf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parsesolaris.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\parsestreams.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libparse\trim_info.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\scripts\mkver.bat"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\scripts\mkver.bat;..\..\include\config.h"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpd&#x0D;&#x0A;"
+ AdditionalDependencies="..\..\scripts\mkver.bat;..\..\include\config.h"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntpd/ntpd.vcxproj b/ports/winnt/vs2013/ntpd/ntpd.vcxproj
new file mode 100644
index 000000000000..50c9cd98953a
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd/ntpd.vcxproj
@@ -0,0 +1,1036 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CB61F8BF-9637-495C-9087-E8664B400CE0}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpd.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpd;..\..\..\..\ntpd;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <SmallerTypeCheck>true</SmallerTypeCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpd.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpd-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpd\cmd_args.c" />
+ <ClCompile Include="..\..\..\..\ntpd\keyword-gen.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\nt_clockstuff.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_config.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_control.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_crypto.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_filegen.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_io.c" />
+ <ClCompile Include="..\..\ntpd\ntp_iocompletionport.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_leapsec.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_loopfilter.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_monitor.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_parser.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_peer.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_proto.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_refclock.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_request.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_restrict.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_scanner.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_signd.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_timer.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntp_util.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntpd-opts.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntpd.c" />
+ <ClCompile Include="..\..\..\..\ntpd\ntpsim.c" />
+ <ClCompile Include="..\..\ntpd\ntservice.c" />
+ <ClCompile Include="version.c">
+ <ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ShowIncludes>
+ <ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ShowIncludes>
+ <ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ShowIncludes>
+ <ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ShowIncludes>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\hopf_PCI_io.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_acts.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_arbiter.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_arc.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_as2201.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_atom.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_bancomm.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_chronolog.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_chu.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_conf.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_datum.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_dumbclock.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_fg.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_gpsvme.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_heath.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hopfpci.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hopfser.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hpgps.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_irig.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_jjy.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_jupiter.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_leitch.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_local.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_msfees.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_mx4200.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_neoclock4x.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_nmea.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_oncore.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_palisade.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_parse.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_pcf.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_pst.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_ripencc.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_shm.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tpro.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_true.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tsyncpci.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tt560.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_ulink.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_wwv.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_wwvb.c" />
+ <ClCompile Include="..\..\..\..\ntpd\refclock_zyfer.c" />
+ <ClCompile Include="..\..\..\..\libparse\binio.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_computime.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_dcf7000.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_hopf6021.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_meinberg.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_rawdcf.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_rcc8000.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_schmid.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_trimtaip.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_trimtsip.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_varitext.c" />
+ <ClCompile Include="..\..\..\..\libparse\clk_wharton.c" />
+ <ClCompile Include="..\..\..\..\libparse\data_mbg.c" />
+ <ClCompile Include="..\..\..\..\libparse\gpstolfp.c" />
+ <ClCompile Include="..\..\..\..\libparse\ieee754io.c" />
+ <ClCompile Include="..\..\..\..\libparse\info_trimble.c" />
+ <ClCompile Include="..\..\..\..\libparse\mfp_mul.c" />
+ <ClCompile Include="..\..\..\..\libparse\parse.c" />
+ <ClCompile Include="..\..\..\..\libparse\parse_conf.c" />
+ <ClCompile Include="..\..\..\..\libparse\parsesolaris.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\parsestreams.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\trim_info.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\ntpd\ntp_parser.y">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ExcludedFromBuild>
+ </CustomBuild>
+ <None Include="..\..\libntp\MSG00001.bin" />
+ <None Include="..\libntp\messages.mc" />
+ <CustomBuild Include="..\..\scripts\mkver.bat">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">true</ExcludedFromBuild>
+ </CustomBuild>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpd
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">..\..\scripts\mkver.bat;..\..\include\config.h;%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ascii.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\assertions.h" />
+ <ClInclude Include="..\..\..\..\include\binio.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\boolean.h" />
+ <ClInclude Include="..\..\include\clockstuff.h" />
+ <ClInclude Include="..\..\include\config.h" />
+ <ClInclude Include="..\..\..\..\ntpd\declcond.h" />
+ <ClInclude Include="..\..\include\hopf_PCI_io.h" />
+ <ClInclude Include="..\..\..\..\include\ieee754io.h" />
+ <ClInclude Include="..\..\include\netinet\in.h" />
+ <ClInclude Include="..\..\include\arpa\inet.h" />
+ <ClInclude Include="..\..\include\isc\int.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\interfaceiter.h" />
+ <ClInclude Include="..\..\..\..\include\iosignal.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\ipv6.h" />
+ <ClInclude Include="..\..\..\..\ntpd\jupiter.h" />
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h" />
+ <ClInclude Include="..\..\..\libntp\log.h" />
+ <ClInclude Include="..\..\..\..\include\mbg_gps166.h" />
+ <ClInclude Include="..\..\include\isc\net.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\netaddr.h" />
+ <ClInclude Include="..\..\include\netdb.h" />
+ <ClInclude Include="..\..\..\..\include\ntp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_calendar.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_cmdargs.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_config.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_control.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_debug.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_filegen.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_if.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_io.h" />
+ <ClInclude Include="..\..\include\ntp_iocompletionport.h" />
+ <CustomBuild Include="..\..\..\..\ntpd\ntp_keyword.h">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">invoking keyword-gen on ntp_parser.h to produce ntp_keyword.h</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">.\gen-ntp_keyword $(SolutionDir)$(Platform)-tmp\$(Configuration)
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">..\..\..\..\ntpd\ntp_parser.h;%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">..\..\..\..\ntpd\ntp_keyword.h ..\..\..\..\ntpd\keyword-gen-utd;%(Outputs)</Outputs>
+ </CustomBuild>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_leapsec.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_libopts.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_lists.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_malloc.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_net.h" />
+ <ClInclude Include="..\..\..\..\ntpd\ntp_parser.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_random.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_refclock.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_request.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h" />
+ <ClInclude Include="..\..\..\..\ntpd\ntp_scanner.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_select.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_string.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h" />
+ <ClInclude Include="..\..\include\ntp_timer.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_tty.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_types.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_worker.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_workimpl.h" />
+ <ClInclude Include="..\..\..\..\ntpd\ntpd-opts.h" />
+ <ClInclude Include="..\..\..\..\include\ntpd.h" />
+ <ClInclude Include="..\..\..\..\include\ntpsim.h" />
+ <ClInclude Include="..\..\include\ntservice.h" />
+ <ClInclude Include="..\..\include\isc\offset.h" />
+ <ClInclude Include="..\..\..\..\sntp\libopts\autoopts\options.h" />
+ <ClInclude Include="..\..\include\sys\param.h" />
+ <ClInclude Include="..\..\include\isc\platform.h" />
+ <ClInclude Include="..\..\..\..\include\recvbuff.h" />
+ <ClInclude Include="..\..\..\..\ntpd\refclock_palisade.h" />
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\result.h" />
+ <ClInclude Include="..\..\include\sys\socket.h" />
+ <ClInclude Include="..\..\include\syslog.h" />
+ <ClInclude Include="..\..\include\termios.h" />
+ <ClInclude Include="..\..\include\timepps.h" />
+ <ClInclude Include="..\..\..\..\include\timespecops.h" />
+ <ClInclude Include="..\..\..\..\include\timevalops.h" />
+ <ClInclude Include="..\..\include\sys\wait.h" />
+ <ClInclude Include="..\..\include\win32_io.h" />
+ <ClInclude Include="..\..\include\isc\win32os.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\libntp\messages.rc">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">..\libntp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\ntpd-keyword-gen\ntpd-keyword-gen.vcxproj">
+ <Project>{1b814cc1-ead4-4a13-b29c-a67b23c9845a}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters b/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters
new file mode 100644
index 000000000000..c125d105b9be
--- /dev/null
+++ b/ports/winnt/vs2013/ntpd/ntpd.vcxproj.filters
@@ -0,0 +1,559 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{31ad5712-dbda-49a0-abf3-c24f1d3b3822}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{e8591cc7-e9b7-4fea-9747-d219a1ce73cf}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Generated Files">
+ <UniqueIdentifier>{952e91f9-804e-48f6-b49b-6b47ef88bfcb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{12a98ad7-139f-4258-8886-ed369f10cae6}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ <Filter Include="Reference Clock">
+ <UniqueIdentifier>{ca4a4827-79af-4bbf-abbb-58d6e6e6fdc3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Parse Lib">
+ <UniqueIdentifier>{5afb644e-b0fd-4fcb-96a3-2bac7c09a7cd}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpd\cmd_args.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\keyword-gen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\nt_clockstuff.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_config.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_control.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_crypto.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_filegen.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_io.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\ntp_iocompletionport.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_leapsec.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_loopfilter.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_monitor.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_parser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_peer.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_proto.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_refclock.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_request.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_restrict.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_scanner.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_signd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_timer.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntp_util.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntpd-opts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntpd.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\ntpsim.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\ntservice.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="version.c">
+ <Filter>Generated Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\ntpd\hopf_PCI_io.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_acts.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_arbiter.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_arc.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_as2201.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_atom.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_bancomm.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_chronolog.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_chu.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_conf.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_datum.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_dumbclock.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_fg.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_gpsvme.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_heath.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hopfpci.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hopfser.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_hpgps.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_irig.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_jjy.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_jupiter.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_leitch.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_local.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_msfees.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_mx4200.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_neoclock4x.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_nmea.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_oncore.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_palisade.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_parse.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_pcf.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_pst.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_ripencc.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_shm.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tpro.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_true.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tsyncpci.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_tt560.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_ulink.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_wwv.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_wwvb.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpd\refclock_zyfer.c">
+ <Filter>Reference Clock</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\binio.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_computime.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_dcf7000.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_hopf6021.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_meinberg.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_rawdcf.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_rcc8000.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_schmid.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_trimtaip.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_trimtsip.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_varitext.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\clk_wharton.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\data_mbg.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\gpstolfp.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\ieee754io.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\info_trimble.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\mfp_mul.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\parse.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\parse_conf.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\parsesolaris.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\parsestreams.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\libparse\trim_info.c">
+ <Filter>Parse Lib</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\libntp\MSG00001.bin">
+ <Filter>Generated Files</Filter>
+ </None>
+ <None Include="..\libntp\messages.mc">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ascii.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\assertions.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\binio.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\boolean.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\clockstuff.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\declcond.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\hopf_PCI_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ieee754io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\netinet\in.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\arpa\inet.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\int.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\interfaceiter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\iosignal.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\win32\include\isc\ipv6.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\jupiter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\l_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\libntp\log.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\mbg_gps166.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\netaddr.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\netdb.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_calendar.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_cmdargs.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_control.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_debug.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_filegen.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_if.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ntp_iocompletionport.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_leapsec.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_libopts.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_lists.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_malloc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_parser.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_proto.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_random.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_refclock.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_request.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_rfc2553.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntp_scanner.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_select.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ntp_timer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_tty.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_types.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_worker.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_workimpl.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\ntpd-opts.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntpd.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntpsim.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\ntservice.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\offset.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\sntp\libopts\autoopts\options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\param.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\platform.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\recvbuff.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpd\refclock_palisade.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\lib\isc\include\isc\result.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\socket.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\termios.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\timepps.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\timespecops.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\timevalops.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\sys\wait.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\win32_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\win32os.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\libntp\messages.rc">
+ <Filter>Generated Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\ntpd\ntp_parser.y">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ <CustomBuild Include="..\..\..\..\ntpd\ntp_keyword.h">
+ <Filter>Header Files</Filter>
+ </CustomBuild>
+ <CustomBuild Include="..\..\scripts\mkver.bat">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpdate/ntpdate.vcproj b/ports/winnt/vs2013/ntpdate/ntpdate.vcproj
new file mode 100644
index 000000000000..85a4bef373ca
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdate/ntpdate.vcproj
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpdate"
+ ProjectGUID="{2789A62E-3F46-44F1-AAF0-816CD23C2911}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\ntpdate,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpdate.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdate-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdate.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpdate,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC)"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpdate.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdate-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpdate\ntpdate.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\include\config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\isc\net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_fp.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_io.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_machine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_net.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_select.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_stdlib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_string.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_syslog.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_unixtime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdate\ntpdate.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\syslog.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdate&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj b/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj
new file mode 100644
index 000000000000..5591fb7ae15f
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj
@@ -0,0 +1,750 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2789A62E-3F46-44F1-AAF0-816CD23C2911}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdate.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdate;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdate.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdate-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpdate\ntpdate.c" />
+ <ClCompile Include="version.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h" />
+ <ClInclude Include="..\..\include\isc\net.h" />
+ <ClInclude Include="..\..\..\..\include\ntp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_io.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_net.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_select.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_string.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h" />
+ <ClInclude Include="..\..\..\..\ntpdate\ntpdate.h" />
+ <ClInclude Include="..\..\include\syslog.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdate
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters b/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters
new file mode 100644
index 000000000000..b2ec7e63204f
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdate/ntpdate.vcxproj.filters
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{a889d71b-7d63-4e86-a764-a4075ede9e24}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{66b7a61f-7329-4b83-8b39-a15703b336bd}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{7acd1484-cc13-4187-a393-39ea3cb89649}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpdate\ntpdate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="version.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\isc\net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_fp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_io.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_machine.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_net.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_select.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_stdlib.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_unixtime.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpdate\ntpdate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\syslog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpdc/ntpdc.vcproj b/ports/winnt/vs2013/ntpdc/ntpdc.vcproj
new file mode 100644
index 000000000000..5fd301ddf8b5
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdc/ntpdc.vcproj
@@ -0,0 +1,367 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpdc"
+ ProjectGUID="{8011C820-B3D5-4034-86EA-FFC30AE6764B}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpdc,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpdc.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdc-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpdc.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntpdc,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpdc.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpdc-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc-opts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc_ops.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ WarningLevel="3"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ntp_assert.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpdc\ntpdc.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpdc&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj b/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj
new file mode 100644
index 000000000000..a16ab0551cdd
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj
@@ -0,0 +1,768 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8011C820-B3D5-4034-86EA-FFC30AE6764B}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpdc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpdc;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;__STDC__;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpdc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpdc-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc-opts.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">Level3</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">Level3</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc_ops.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level3</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">Level3</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="version.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h" />
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h" />
+ <ClInclude Include="..\..\..\..\ntpdc\ntpdc.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpdc
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters b/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters
new file mode 100644
index 000000000000..8e83e7631a72
--- /dev/null
+++ b/ports/winnt/vs2013/ntpdc/ntpdc.vcxproj.filters
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{f9cafbdf-2c38-46c2-9c83-4e177c213fd8}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{5fa1d807-8b78-4e72-b44c-d698dd579a13}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{4c7e2cb5-4dc3-4551-b0a2-11b30ecd802c}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc-opts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpdc\ntpdc_ops.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="version.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ntp_assert.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpdc\ntpdc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpq/ntpq.vcproj b/ports/winnt/vs2013/ntpq/ntpq.vcproj
new file mode 100644
index 000000000000..440b38bae97a
--- /dev/null
+++ b/ports/winnt/vs2013/ntpq/ntpq.vcproj
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="ntpq"
+ ProjectGUID="{6A92BF14-8931-48B1-A571-DEBE9F190616}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\ntpq,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(IntDir)ntpq.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpq-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)-bin\$(ConfigurationName)\"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)-tmp\$(ConfigurationName)\$(TargetName)\"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ DeleteExtensionsOnClean="*.obj;*.ilk;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName="$(IntDir)ntpq.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="..\..\ntpq,..\..\include,..\..\..\..\include,..\..\..\..\lib\isc\win32\include,..\..\..\..\lib\isc\include,$(OPENSSL_INC),..\..\..\..\sntp\libopts"
+ PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32;;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ MinimalRebuild="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="$(IntDir)ntpq.pch"
+ AssemblerListingLocation="$(IntDir)"
+ ObjectFile="$(IntDir)"
+ ProgramDataBaseFileName="$(OutDir)ntpq-vc90"
+ BrowseInformation="1"
+ WarningLevel="4"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib $(OPENSSL_LIB)\libeay32.lib"
+ OutputFile="$(OutDir)$(ProjectName).exe"
+ Version="0x0400"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateManifest="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="1"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/$(ProjectName).bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq-opts.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq-subs.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\version.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\..\..\include\ntp_lineedit.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\ntpq\ntpq.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\..\packageinfo.sh"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="echo Using NT Shell Script to generate version.c&#x0D;&#x0A;..\..\scripts\mkver.bat -P ntpq&#x0D;&#x0A;"
+ Outputs="$(ProjectDir)version.c"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/ports/winnt/vs2013/ntpq/ntpq.vcxproj b/ports/winnt/vs2013/ntpq/ntpq.vcxproj
new file mode 100644
index 000000000000..e5f1f8430c18
--- /dev/null
+++ b/ports/winnt/vs2013/ntpq/ntpq.vcxproj
@@ -0,0 +1,740 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug XP|Win32">
+ <Configuration>Debug XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug XP|x64">
+ <Configuration>Debug XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|Win32">
+ <Configuration>Release XP</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release XP|x64">
+ <Configuration>Release XP</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{6A92BF14-8931-48B1-A571-DEBE9F190616}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <OutDir>$(SolutionDir)$(Platform)-bin\$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)$(Platform)-tmp\$(Configuration)\$(TargetName)\</IntDir>
+ <ExtensionsToDeleteOnClean>*.obj%3b*.ilk%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.pgc%3b*.pgd%3b*.meta%3b$(TargetPath)</ExtensionsToDeleteOnClean>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL64_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName />
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling />
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention />
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>false</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">
+ <Midl>
+ <TypeLibraryName>$(IntDir)ntpq.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>$(VC_IncludePath);..\..\ntpq;..\..\include;..\..\..\..\include;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;$(OPENSSL_INC);..\..\..\..\sntp\libopts;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;WIN32;SYS_WINNT;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <MinimalRebuild>false</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)ntpq.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)ntpq-vc90</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <ExpandAttributedSource>true</ExpandAttributedSource>
+ <AssemblerOutput>All</AssemblerOutput>
+ <UseUnicodeForAssemblerListing>true</UseUnicodeForAssemblerListing>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;$(OPENSSL64_LIB)\libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <Version>
+ </Version>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapExports>true</MapExports>
+ <OptimizeReferences>false</OptimizeReferences>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(IntDir)$(ProjectName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpq\ntpq-opts.c" />
+ <ClCompile Include="..\..\..\..\ntpq\ntpq-subs.c" />
+ <ClCompile Include="..\..\..\..\ntpq\ntpq.c" />
+ <ClCompile Include="version.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h" />
+ <ClInclude Include="..\..\..\..\ntpq\ntpq.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">echo Using NT Shell Script to generate version.c
+..\..\scripts\mkver.bat -P ntpq
+</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|Win32'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release XP|x64'">$(ProjectDir)version.c;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libntp\libntp.vcxproj">
+ <Project>{400fbfcb-462e-40d0-b06b-3b74e3fffd00}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters b/ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters
new file mode 100644
index 000000000000..0ac851d64a39
--- /dev/null
+++ b/ports/winnt/vs2013/ntpq/ntpq.vcxproj.filters
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{726ba7d7-a7f0-4d12-8713-79de7ce8f776}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{e0db3665-e32f-4959-97ac-4cfa2556ef19}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{29c4355d-bb94-4347-964f-5d1c731481d5}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\ntpq\ntpq-opts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpq\ntpq-subs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\ntpq\ntpq.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="version.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\include\ntp_lineedit.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\ntpq\ntpq.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\..\packageinfo.sh" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/readme.y2kfixes b/readme.y2kfixes
index e9a63c1e81c9..4518770fda88 100755
--- a/readme.y2kfixes
+++ b/readme.y2kfixes
Binary files differ
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 017ea0219127..7ddf4247bf47 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,39 +1,174 @@
NULL=
+SUBDIRS= \
+ build \
+ calc_tickadj \
+ ntp-wait \
+ ntpsweep \
+ ntptrace \
+ lib \
+ $(NULL)
+
+man1_MANS=
+man8_MANS=
+
+DISTCLEANFILES= config.log $(man_MANS)
-if NTP_BINSUBDIR_IS_BIN
-bin_SCRIPTS = ntp-wait ntptrace
-else
-sbin_SCRIPTS = ntp-wait ntptrace
-endif
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
noinst_SCRIPTS = \
- calc_tickadj \
- checktime \
- freq_adj \
- html2man \
- mkver \
- ntpsweep \
ntpver \
plot_summary \
summary \
$(NULL)
-EXTRA_DIST = \
- check--help \
- checkChangeLog \
- cvo.sh \
- fixautomakedepsmagic \
- genCommitLog \
- genver \
- hpadjtime.sh \
- monitoring \
- ntp-close \
- ntp-groper \
- ntp-restart \
- ntp-status \
- rc1 \
- rc2 \
- stats \
- UpdatePoint \
- VersionName \
+install-data-local: install-html
+
+EXTRA_DIST = \
+ deprecated \
+ monitoring \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ plot_summary-opts \
+ plot_summary-opts.def \
+ rc \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ summary-opts \
+ summary-opts.def \
+ stats \
$(NULL)
+
+noinst_DATA = \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ $(NULL)
+
+#OPTTPL = ../sntp/ag-tpl/perlopt.tpl
+OPTTPL = $(std_def_list)
+
+##
+
+plot_summary: $(srcdir)/plot_summary-opts
+
+$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
+ $(run_ag) plot_summary-opts.def
+
+### Nroff
+
+$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
+ mv $(srcdir)/plot_summary.man.in+ $(srcdir)/plot_summary.man.in
+
+### Mdoc
+
+$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
+ mv $(srcdir)/plot_summary.mdoc.in+ $(srcdir)/plot_summary.mdoc.in
+
+### Manpage (local)
+
+plot_summary.1: $(srcdir)/plot_summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=plot_summary.1+:$(srcdir)/plot_summary.$(MANTAGFMT).in
+ mv plot_summary.1+ plot_summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke-plot_summary.texi $(srcdir)/plot_summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o plot_summary.html plot_summary.texi || true )
+
+
+##
+
+summary: $(srcdir)/summary-opts
+
+$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
+ $(run_ag) summary-opts.def
+
+### Nroff
+
+$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
+ mv $(srcdir)/summary.man.in+ $(srcdir)/summary.man.in
+
+### Mdoc
+
+$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
+ mv $(srcdir)/summary.mdoc.in+ $(srcdir)/summary.mdoc.in
+
+### Manpage (local)
+
+summary.1: $(srcdir)/summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=summary.1+:$(srcdir)/summary.$(MANTAGFMT).in
+ mv summary.1+ summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
+
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index e41f06cc9786..593f438570a2 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -15,6 +15,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -36,30 +37,66 @@ build_triplet = @build@
host_triplet = @host@
subdir = scripts
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/calc_tickadj.in $(srcdir)/checktime.in \
- $(srcdir)/freq_adj.in $(srcdir)/html2man.in $(srcdir)/mkver.in \
- $(srcdir)/ntp-wait.in $(srcdir)/ntpsweep.in \
- $(srcdir)/ntptrace.in $(srcdir)/ntpver.in \
- $(srcdir)/plot_summary.in $(srcdir)/summary.in
+ $(srcdir)/ntpver.in $(srcdir)/plot_summary.in \
+ $(srcdir)/summary.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = calc_tickadj checktime freq_adj html2man mkver \
- ntp-wait ntpsweep ntptrace ntpver plot_summary summary
+CONFIG_CLEAN_FILES = ntpver plot_summary summary
CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -81,26 +118,73 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
-SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) $(sbin_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS)
+DATA = $(noinst_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -112,21 +196,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -134,6 +228,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -152,14 +247,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -172,10 +321,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -183,9 +334,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -194,6 +363,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -242,41 +412,86 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_SCRIPTS = ntp-wait ntptrace
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_SCRIPTS = ntp-wait ntptrace
+SUBDIRS = \
+ build \
+ calc_tickadj \
+ ntp-wait \
+ ntpsweep \
+ ntptrace \
+ lib \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+DISTCLEANFILES = config.log $(man_MANS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
noinst_SCRIPTS = \
- calc_tickadj \
- checktime \
- freq_adj \
- html2man \
- mkver \
- ntpsweep \
ntpver \
plot_summary \
summary \
$(NULL)
EXTRA_DIST = \
- check--help \
- checkChangeLog \
- cvo.sh \
- fixautomakedepsmagic \
- genCommitLog \
- genver \
- hpadjtime.sh \
- monitoring \
- ntp-close \
- ntp-groper \
- ntp-restart \
- ntp-status \
- rc1 \
- rc2 \
- stats \
- UpdatePoint \
- VersionName \
+ deprecated \
+ monitoring \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ plot_summary-opts \
+ plot_summary-opts.def \
+ rc \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
+ summary-opts \
+ summary-opts.def \
+ stats \
+ $(NULL)
+
+noinst_DATA = \
+ invoke-plot_summary.texi \
+ invoke-plot_summary.menu \
+ plot_summary.1plot_summaryman \
+ plot_summary.1plot_summarymdoc \
+ plot_summary.mdoc.in \
+ plot_summary.man.in \
+ plot_summary.texi \
+ plot_summary.html \
+ invoke-summary.texi \
+ invoke-summary.menu \
+ summary.1summaryman \
+ summary.1summarymdoc \
+ summary.mdoc.in \
+ summary.man.in \
+ summary.texi \
+ summary.html \
$(NULL)
-all: all-am
+
+#OPTTPL = ../sntp/ag-tpl/perlopt.tpl
+OPTTPL = $(std_def_list)
+all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -309,110 +524,236 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-calc_tickadj: $(top_builddir)/config.status $(srcdir)/calc_tickadj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-checktime: $(top_builddir)/config.status $(srcdir)/checktime.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-freq_adj: $(top_builddir)/config.status $(srcdir)/freq_adj.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-html2man: $(top_builddir)/config.status $(srcdir)/html2man.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-mkver: $(top_builddir)/config.status $(srcdir)/mkver.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntp-wait: $(top_builddir)/config.status $(srcdir)/ntp-wait.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntpsweep: $(top_builddir)/config.status $(srcdir)/ntpsweep.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-ntptrace: $(top_builddir)/config.status $(srcdir)/ntptrace.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ntpver: $(top_builddir)/config.status $(srcdir)/ntpver.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
plot_summary: $(top_builddir)/config.status $(srcdir)/plot_summary.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
summary: $(top_builddir)/config.status $(srcdir)/summary.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-binSCRIPTS: $(bin_SCRIPTS)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-binSCRIPTS:
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
-install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
- @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
done | \
- sed -e 'p;s,.*/,,;n' \
- -e 'h;s|.*|.|' \
- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
- if (++n[d] == $(am__install_max)) { \
- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
- else { print "f", d "/" $$4, $$1 } } \
- END { for (d in files) print "f", d, files[d] }' | \
- while read type dir files; do \
- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
- test -z "$$files" || { \
- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
- } \
- ; done
-
-uninstall-sbinSCRIPTS:
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
@$(NORMAL_UNINSTALL)
- @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
- files=`for p in $$list; do echo "$$p"; done | \
- sed -e 's,.*/,,;$(transform)'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
-mostlyclean-libtool:
- -rm -f *.lo
+# 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):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
-clean-libtool:
- -rm -rf .libs _libs
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
tags: TAGS
-TAGS:
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
ctags: CTAGS
-CTAGS:
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -442,22 +783,51 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
check-am: all-am
-check: check-am
-all-am: Makefile $(SCRIPTS)
-installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -470,91 +840,186 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
-distclean: distclean-am
+distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-html: html-am
+html: html-recursive
html-am:
-info: info-am
+info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-data-local install-man
-install-dvi: install-dvi-am
+install-dvi: install-dvi-recursive
install-dvi-am:
-install-exec-am: install-binSCRIPTS install-sbinSCRIPTS
+install-exec-am:
-install-html: install-html-am
+install-html: install-html-recursive
install-html-am:
-install-info: install-info-am
+install-info: install-info-recursive
install-info-am:
-install-man:
+install-man: install-man1 install-man8
-install-pdf: install-pdf-am
+install-pdf: install-pdf-recursive
install-pdf-am:
-install-ps: install-ps-am
+install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-pdf: pdf-am
+pdf: pdf-recursive
pdf-am:
-ps: ps-am
+ps: ps-recursive
ps-am:
-uninstall-am: uninstall-binSCRIPTS uninstall-sbinSCRIPTS
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-man8 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-man uninstall-man1 \
+ uninstall-man8
+
+
+install-data-local: install-html
+
+plot_summary: $(srcdir)/plot_summary-opts
+
+$(srcdir)/plot_summary-opts: plot_summary-opts.def $(OPTTPL)
+ $(run_ag) plot_summary-opts.def
+
+### Nroff
+
+$(srcdir)/plot_summary.1plot_summaryman: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summaryman -Tagman-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.man.in: $(srcdir)/plot_summary.1plot_summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summaryman > $(srcdir)/plot_summary.man.in+
+ mv $(srcdir)/plot_summary.man.in+ $(srcdir)/plot_summary.man.in
+
+### Mdoc
+
+$(srcdir)/plot_summary.1plot_summarymdoc: $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1plot_summarymdoc -Tagmdoc-cmd.tpl plot_summary-opts.def
+
+$(srcdir)/plot_summary.mdoc.in: $(srcdir)/plot_summary.1plot_summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/plot_summary.1plot_summarymdoc > $(srcdir)/plot_summary.mdoc.in+
+ mv $(srcdir)/plot_summary.mdoc.in+ $(srcdir)/plot_summary.mdoc.in
+
+### Manpage (local)
+
+plot_summary.1: $(srcdir)/plot_summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=plot_summary.1+:$(srcdir)/plot_summary.$(MANTAGFMT).in
+ mv plot_summary.1+ plot_summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-plot_summary.menu: $(srcdir)/invoke-plot_summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-plot_summary.texi: plot_summary-opts $(srcdir)/plot_summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section plot_summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/plot_summary.html: $(srcdir)/invoke-plot_summary.menu $(srcdir)/invoke-plot_summary.texi $(srcdir)/plot_summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o plot_summary.html plot_summary.texi || true )
+
+summary: $(srcdir)/summary-opts
+
+$(srcdir)/summary-opts: summary-opts.def $(OPTTPL)
+ $(run_ag) summary-opts.def
+
+### Nroff
+
+$(srcdir)/summary.1summaryman: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summaryman -Tagman-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.man.in: $(srcdir)/summary.1summaryman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summaryman > $(srcdir)/summary.man.in+
+ mv $(srcdir)/summary.man.in+ $(srcdir)/summary.man.in
+
+### Mdoc
+
+$(srcdir)/summary.1summarymdoc: $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1summarymdoc -Tagmdoc-cmd.tpl summary-opts.def
+
+$(srcdir)/summary.mdoc.in: $(srcdir)/summary.1summarymdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/summary.1summarymdoc > $(srcdir)/summary.mdoc.in+
+ mv $(srcdir)/summary.mdoc.in+ $(srcdir)/summary.mdoc.in
+
+### Manpage (local)
+
+summary.1: $(srcdir)/summary.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=summary.1+:$(srcdir)/summary.$(MANTAGFMT).in
+ mv summary.1+ summary.1
+
+### Texinfo
+
+$(srcdir)/invoke-summary.menu: $(srcdir)/invoke-summary.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
-.MAKE: install-am install-strip
+$(srcdir)/invoke-summary.texi: summary-opts $(srcdir)/summary-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section summary-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binSCRIPTS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-sbinSCRIPTS install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
- uninstall-sbinSCRIPTS
+### HTML
+$(srcdir)/summary.html: $(srcdir)/invoke-summary.menu $(srcdir)/invoke-summary.texi $(srcdir)/summary.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o summary.html summary.texi || true )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/scripts/README b/scripts/README
index 673ddb4492e2..9f70a6362888 100644
--- a/scripts/README
+++ b/scripts/README
@@ -6,38 +6,26 @@ 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
+rc start/stop scripts for NTP
ntp-wait Blocks until ntpd is in state 4 (synchronized).
- Hopefully useful at boot time, to delay the boot sequence
+ 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?
+ntptrace Trace ntp peers of a server up to stratum 1.
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
+summary Generate summary files out of stat files produced by NTP
+ daemon.
+
+plot_summary Plot summaries generated by summary script.
diff --git a/scripts/build/Makefile.am b/scripts/build/Makefile.am
new file mode 100644
index 000000000000..51a1bbccfb64
--- /dev/null
+++ b/scripts/build/Makefile.am
@@ -0,0 +1,17 @@
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl
+
+noinst_SCRIPTS = mkver
+
+NULL=
+EXTRA_DIST = \
+ check--help \
+ checkChangeLog \
+ checkHtmlFileDates \
+ fixautomakedepsmagic \
+ genCommitLog \
+ genver \
+ updateBEDate \
+ UpdatePoint \
+ VersionName \
+ $(NULL)
diff --git a/scripts/build/Makefile.in b/scripts/build/Makefile.in
new file mode 100644
index 000000000000..e1d881161450
--- /dev/null
+++ b/scripts/build/Makefile.in
@@ -0,0 +1,551 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts/build
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/mkver.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = mkver
+CONFIG_CLEAN_VPATH_FILES =
+SCRIPTS = $(noinst_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl
+
+noinst_SCRIPTS = mkver
+NULL =
+EXTRA_DIST = \
+ check--help \
+ checkChangeLog \
+ checkHtmlFileDates \
+ fixautomakedepsmagic \
+ genCommitLog \
+ genver \
+ updateBEDate \
+ UpdatePoint \
+ VersionName \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/build/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/build/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+mkver: $(top_builddir)/config.status $(srcdir)/mkver.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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:
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-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/scripts/UpdatePoint b/scripts/build/UpdatePoint
index 309cdccb657e..e3c5957dc6bc 100755
--- a/scripts/UpdatePoint
+++ b/scripts/build/UpdatePoint
@@ -306,7 +306,7 @@ case "$newrcpoint" in
esac
printf "Previous version: "
-scripts/VersionName
+scripts/build/VersionName
# apply packageinfo.sh changes
@@ -321,11 +321,11 @@ case "$test" in
0)
mv packageinfo.sh+ packageinfo.sh
printf "Updated version: "
- scripts/VersionName
+ scripts/build/VersionName
;;
*)
printf "Next version would be: "
- scripts/VersionName -p ./packageinfo.sh+
+ scripts/build/VersionName -p ./packageinfo.sh+
rm packageinfo.sh+
;;
esac
diff --git a/scripts/VersionName b/scripts/build/VersionName
index 1030196ce392..71e31a948ff0 100755
--- a/scripts/VersionName
+++ b/scripts/build/VersionName
@@ -21,7 +21,13 @@ esac
NAME="$version"
case $point in
[1-9]*)
- NAME="${NAME}p${point}"
+ case "${proto}.${major}" in
+ 4.[012])
+ NAME="${NAME}p${point}"
+ ;;
+ *) NAME="${NAME}.${point}"
+ ;;
+ esac
;;
NEW) ;;
'') ;;
diff --git a/scripts/check--help b/scripts/build/check--help
index 1524675b4473..1524675b4473 100755
--- a/scripts/check--help
+++ b/scripts/build/check--help
diff --git a/scripts/checkChangeLog b/scripts/build/checkChangeLog
index 46c56c44b053..46c56c44b053 100755
--- a/scripts/checkChangeLog
+++ b/scripts/build/checkChangeLog
diff --git a/scripts/build/checkHtmlFileDates b/scripts/build/checkHtmlFileDates
new file mode 100755
index 000000000000..9d9a2f2625d0
--- /dev/null
+++ b/scripts/build/checkHtmlFileDates
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+bk version > /dev/null 2>&1 || exit 0
+
+for i in `find * -type f -name '*.html' -print | grep -v SCCS/`
+do
+ # echo $i
+ set `bk diffs $i | wc -l`
+ lines=$1
+ case "$lines" in
+ 0) ;;
+ *) echo "Processing <$i>"
+ ../scripts/build/updateBEDate $i
+ ;;
+ esac
+done
diff --git a/scripts/fixautomakedepsmagic b/scripts/build/fixautomakedepsmagic
index ec82bba548ca..ec82bba548ca 100644..100755
--- a/scripts/fixautomakedepsmagic
+++ b/scripts/build/fixautomakedepsmagic
diff --git a/scripts/genCommitLog b/scripts/build/genCommitLog
index 318e2866a47d..318e2866a47d 100755
--- a/scripts/genCommitLog
+++ b/scripts/build/genCommitLog
diff --git a/scripts/build/genver b/scripts/build/genver
new file mode 100755
index 000000000000..c07324392cb0
--- /dev/null
+++ b/scripts/build/genver
@@ -0,0 +1,96 @@
+#! /bin/sh
+
+# possible usage: $0 [-f] [version.m4] [version.def]
+#
+# -f would be 'force the update'
+
+force=0
+outputs=
+for i in $*
+do
+ case "$i" in
+ -f)
+ force=1
+ ;;
+ *version.m4)
+ outputs="m4/version.m4 $outputs"
+ ;;
+ *version.def)
+ outputs="include/version.def $outputs"
+ ;;
+ *version.texi)
+ outputs="include/version.texi $outputs"
+ ;;
+ *) echo "Unrecognized option: $i"
+ exit 1
+ ;;
+ esac
+done
+
+case "$outputs" in
+ '') outputs="m4/version.m4 include/version.def include/version.texi" ;;
+esac
+
+set -e
+
+. ../packageinfo.sh
+
+dversion=`../scripts/build/VersionName -p ../packageinfo.sh`
+
+set +e
+
+# Create intermediate files in $TEMPDIR defaulting it to /tmp
+# if not set. This avoids races when multiple builds run in
+# parallel on shared source.
+
+TEMPDIR=${TEMPDIR=/tmp}
+
+case "$outputs" in
+ *version.m4*)
+ echo "m4_define([VERSION_NUMBER],[${dversion}])" > "${TEMPDIR}/version.m4+"
+ cmp -s "${TEMPDIR}/version.m4+" m4/version.m4
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.m4+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.m4+" m4/version.m4
+ ;;
+ esac
+ ;;
+esac
+
+case "$outputs" in
+ *version.def*)
+ echo "version = '${dversion}';" > "${TEMPDIR}/version.def+"
+ cmp -s "${TEMPDIR}/version.def+" include/version.def
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.def+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.def+" include/version.def
+ ;;
+ esac
+ ;;
+esac
+
+case "$outputs" in
+ *version.texi*)
+ echo "@set UPDATED `date +'%d %B %Y'`" > "${TEMPDIR}/version.texi+"
+ echo "@set EDITION $dversion" >> "${TEMPDIR}/version.texi+"
+ echo "@set VERSION $dversion" >> "${TEMPDIR}/version.texi+"
+ cmp -s "${TEMPDIR}/version.texi+" include/version.texi
+ rc=$?
+ case "$force$rc" in
+ 00)
+ rm -f "${TEMPDIR}/version.texi+"
+ ;;
+ *)
+ mv "${TEMPDIR}/version.texi+" include/version.texi
+ ;;
+ esac
+ ;;
+esac
diff --git a/scripts/mkver.in b/scripts/build/mkver.in
index 4557a044277a..3aef1c816a7f 100644
--- a/scripts/mkver.in
+++ b/scripts/build/mkver.in
@@ -1,4 +1,4 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
PROG=${1-UNKNOWN}
ConfStr="$PROG"
@@ -10,11 +10,9 @@ case "$CSET" in
*) ConfStr="$ConfStr@$CSET" ;;
esac
-case "@LCRYPTO@" in
+case "@VER_SUFFIX@" in
'') ;;
- -lcrypto)
- ConfStr="${ConfStr}-o" ;;
- *) ConfStr="${ConfStr}-?" ;;
+ *) ConfStr="${ConfStr}-@VER_SUFFIX@" ;;
esac
ConfStr="$ConfStr `LC_TIME=C TZ=UTC date`"
diff --git a/scripts/build/updateBEDate b/scripts/build/updateBEDate
new file mode 100755
index 000000000000..467e7070af66
--- /dev/null
+++ b/scripts/build/updateBEDate
@@ -0,0 +1,53 @@
+#! /usr/bin/env perl
+use warnings;
+use strict;
+
+# for each filename on the command line
+# get the modtime
+# make a backup of the file
+# - error if there is already a backup?
+# flush the live version(?)
+# start a line-by-line copy of the backup to the new file,
+# doing the BeginDate/EndDate substitution
+
+# <!-- #BeginDate format:En1m -->3-oct-11 18:20<!-- #EndDate -->
+# <!-- #BeginDate format:En2m -->01-Aug-2011 17:56<!-- #EndDate -->
+# without the 'm' no minutes are included.
+
+my $i;
+my $mod_time;
+my $stamp;
+my @m_abbr = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
+
+foreach ( @ARGV ) {
+ $i = $_;
+ $mod_time = (stat ($i))[9];
+ $stamp = localtime($mod_time);
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
+ localtime($mod_time);
+ $year += 1900;
+
+ # print "<$i> at <$stamp>\n";
+
+ open(my $IFILE, "<", $i) or die "Cannot open < $i: $!";
+ open(my $OFILE, ">", $i.".new") or die "Cannot open > $i.new: $!";
+ while(<$IFILE>) {
+ if (/(.*<!--\s*#BeginDate\s*format:)(\S*)(\s*-->).*(<!--\s*#EndDate\s*-->.*)/) {
+ # print "Got: $_";
+ # print "as: <$1><$2><$3>...<$4>\n";
+ print { $OFILE } $1,$2,$3;
+ printf { $OFILE } "%s-%s-%s %02d:%02d", $mday,$m_abbr[$mon],$year,$hour,$min;
+ print { $OFILE } $4,"\n";
+ }
+ else {
+ print { $OFILE } $_;
+ }
+ }
+ close($IFILE);
+ close($OFILE);
+ #
+ utime(time, $mod_time, "$i.new") || die "touch $i.new failed: $!";
+ #
+ rename $i,"$i.old" || die "rename $i,$i.old failed: $!";
+ rename "$i.new",$i || die "rename $i.new,$i failed: $!";
+}
diff --git a/scripts/calc_tickadj.in b/scripts/calc_tickadj.in
deleted file mode 100644
index 32eae12964a2..000000000000
--- a/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/scripts/calc_tickadj/Makefile.am b/scripts/calc_tickadj/Makefile.am
new file mode 100644
index 000000000000..b98bc8771898
--- /dev/null
+++ b/scripts/calc_tickadj/Makefile.am
@@ -0,0 +1,104 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+
+bin_SCRIPTS= $(CALC_TICKADJ_DB)
+libexec_SCRIPTS= $(CALC_TICKADJ_DL)
+sbin_SCRIPTS= $(CALC_TICKADJ_DS)
+EXTRA_SCRIPTS= calc_tickadj
+
+man1_MANS=
+man8_MANS=
+manpage_HACK=
+if WANT_CALC_TICKADJ_MS
+man_MANS= calc_tickadj.$(CALC_TICKADJ_MS)
+else
+manpage_HACK+= calc_tickadj.
+# Note that if we don't WANT_CALC_TICKADJ then CALC_TICKADJ_MS will
+# be empty. But we still need the .texi and other files to be built, as
+# they are general prerequisites.
+# The manpage_HACK is listed in noinst_DATA so that takes care of these.
+endif
+
+DISTCLEANFILES = config.log $(man_MANS) calc_tickadj.
+
+EXTRA_DIST = \
+ calc_tickadj.in \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(NULL)
+
+noinst_DATA = \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(manpage_HACK) \
+ $(NULL)
+
+calc_tickadj: $(srcdir)/calc_tickadj-opts
+
+$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
+ $(run_ag) calc_tickadj-opts.def
+
+### Nroff
+
+$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
+ mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
+
+### Mdoc
+
+$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
+ mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
+
+### Manpage
+
+calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
+ mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
diff --git a/scripts/calc_tickadj/Makefile.in b/scripts/calc_tickadj/Makefile.in
new file mode 100644
index 000000000000..be052be8f2eb
--- /dev/null
+++ b/scripts/calc_tickadj/Makefile.in
@@ -0,0 +1,866 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+@WANT_CALC_TICKADJ_MS_FALSE@am__append_1 = calc_tickadj.
+subdir = scripts/calc_tickadj
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/calc_tickadj.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = calc_tickadj
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(CALC_TICKADJ_DB)
+libexec_SCRIPTS = $(CALC_TICKADJ_DL)
+sbin_SCRIPTS = $(CALC_TICKADJ_DS)
+EXTRA_SCRIPTS = calc_tickadj
+man1_MANS =
+man8_MANS =
+manpage_HACK = $(am__append_1)
+@WANT_CALC_TICKADJ_MS_TRUE@man_MANS = calc_tickadj.$(CALC_TICKADJ_MS)
+# Note that if we don't WANT_CALC_TICKADJ then CALC_TICKADJ_MS will
+# be empty. But we still need the .texi and other files to be built, as
+# they are general prerequisites.
+# The manpage_HACK is listed in noinst_DATA so that takes care of these.
+DISTCLEANFILES = config.log $(man_MANS) calc_tickadj.
+EXTRA_DIST = \
+ calc_tickadj.in \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(NULL)
+
+noinst_DATA = \
+ calc_tickadj.1calc_tickadjman \
+ calc_tickadj.1calc_tickadjmdoc \
+ calc_tickadj.man.in \
+ calc_tickadj.mdoc.in \
+ calc_tickadj.texi \
+ calc_tickadj.html \
+ calc_tickadj-opts.def \
+ calc_tickadj-opts \
+ invoke-calc_tickadj.texi \
+ invoke-calc_tickadj.menu \
+ $(manpage_HACK) \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/calc_tickadj/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/calc_tickadj/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+calc_tickadj: $(top_builddir)/config.status $(srcdir)/calc_tickadj.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-libexecSCRIPTS \
+ uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-man1 \
+ uninstall-man8 uninstall-sbinSCRIPTS
+
+
+calc_tickadj: $(srcdir)/calc_tickadj-opts
+
+$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
+ $(run_ag) calc_tickadj-opts.def
+
+### Nroff
+
+$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
+ mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
+
+### Mdoc
+
+$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
+
+$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
+ mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
+
+### Manpage
+
+calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
+ mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
+
+# 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/scripts/calc_tickadj/calc_tickadj-opts b/scripts/calc_tickadj/calc_tickadj-opts
new file mode 100644
index 000000000000..c8a8c0d8509d
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj-opts
@@ -0,0 +1,60 @@
+# EDIT THIS FILE WITH CAUTION (calc_tickadj-opts)
+#
+# It has been AutoGen-ed August 31, 2014 at 04:52:46 AM by AutoGen 5.18.4
+# From the definitions calc_tickadj-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'drift-file' => '/etc/ntp/drift',
+ 'tick' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'drift-file|d=s', 'tick|t=i',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/calc_tickadj/calc_tickadj-opts.def b/scripts/calc_tickadj/calc_tickadj-opts.def
new file mode 100644
index 000000000000..cdb50efebe27
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj-opts.def
@@ -0,0 +1,60 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = calc_tickadj;
+prog-title = 'Calculates "optimal" value for tick given ntp drift file.';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = drift-file;
+ value = d;
+ arg-type = string;
+ arg-default = '/etc/ntp/drift';
+ descrip = 'Ntp drift file to use';
+ doc = 'Use the specified drift file for calculations';
+};
+
+flag = {
+ name = tick;
+ value = t;
+ arg-type = number;
+ descrip = 'Tick value of this host';
+ doc = 'The current tick which to adjustment will be calculated';
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _EndOfDoc
+The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+The example output of
+@example
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+@end example
+
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+@code{calc_tickadj} tries to determine the the tick value by using
+@code{tickadj} program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+ _EndOfDoc;
+};
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
new file mode 100644
index 000000000000..b77ec1cc62f8
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
@@ -0,0 +1,108 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH calc_tickadj 1calc_tickadjman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4GaOOZ/ag-fHaWNZ)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:36 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]calc_tickadj\fP
+\- Calculates optimal value for tick given ntp drift file.
+.SH SYNOPSIS
+\f\*[B-Font]calc_tickadj\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.br
+.in +4
+.nf
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.in -4
+.fi
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-drift\-file\f[]=\f\*[I-Font]string\f[]
+Ntp drift file to use.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tick\f[]=\f\*[I-Font]number\f[]
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
new file mode 100644
index 000000000000..911f0726dc5f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
@@ -0,0 +1,84 @@
+.Dd December 19 2014
+.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:39 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm calc_tickadj
+.Nd Calculates "optimal" value for tick given ntp drift file.
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.Bd -literal -offset indent
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.Ed
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
+Ntp drift file to use.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.It Fl t Ar number , Fl \-tick Ns = Ns Ar number
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html
new file mode 100644
index 000000000000..8d0898f2fa05
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.html
@@ -0,0 +1,166 @@
+<html lang="en">
+<head>
+<title>calc_tickadj User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="calc_tickadj User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">calc_tickadj User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">calc_tickadj User's Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>calc_tickadj</code> program.
+This document applies to version 4.2.8 of <code>calc_tickadj</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">calc_tickadj User's Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#calc_005ftickadj-Description">calc_tickadj Description</a>: Description
+<li><a accesskey="2" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>: Invoking calc_tickadj
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-Description">calc_tickadj Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking calc_tickadj</h3>
+
+<p><a name="index-calc_005ftickadj-1"></a><a name="index-Calculates-_0022optimal_0022-value-for-tick-given-ntp-drift-file_002e-2"></a>
+The <code>calc_tickadj</code> script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+ <p>The example output of
+<pre class="example"> $ ./calc_tickadj
+ 81.699 (drift)
+ 9999 usec; 9999779 nsec
+ $ cat /etc/ntp/drift
+ -23.159
+</pre>
+ <p>means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+ <p>If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+ <p><code>calc_tickadj</code> tries to determine the the tick value by using
+<code>tickadj</code> program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>calc_tickadj</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#calc_005ftickadj-usage">calc_tickadj usage</a>: calc_tickadj help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>: drift-file option (-d)
+<li><a accesskey="3" href="#calc_005ftickadj-tick">calc_tickadj tick</a>: tick option (-t)
+<li><a accesskey="4" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">calc_tickadj help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-calc_005ftickadj-help-3"></a>
+This is the automatically generated usage text for calc_tickadj.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="calc_005ftickadj-drift_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-usage">calc_tickadj usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">drift-file option (-d)</h4>
+
+<p><a name="index-calc_005ftickadj_002ddrift_002dfile-4"></a>
+This is the &ldquo;ntp drift file to use&rdquo; option.
+This option takes a string argument.
+Use the specified drift file for calculations
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-tick"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#calc_005ftickadj-exit-status">calc_tickadj exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-drift_002dfile">calc_tickadj drift-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">tick option (-t)</h4>
+
+<p><a name="index-calc_005ftickadj_002dtick-5"></a>
+This is the &ldquo;tick value of this host&rdquo; option.
+This option takes a number argument.
+The current tick which to adjustment will be calculated
+<div class="node">
+<p><hr>
+<a name="calc_005ftickadj-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#calc_005ftickadj-tick">calc_tickadj tick</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#calc_005ftickadj-Invocation">calc_tickadj Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">calc_tickadj exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/calc_tickadj/calc_tickadj.in b/scripts/calc_tickadj/calc_tickadj.in
new file mode 100644
index 000000000000..38b826eb2fff
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.in
@@ -0,0 +1,59 @@
+#! @PATH_PERL@ -w
+#
+# drift of 104.8576 -> +1 tick. Base of 10000 ticks.
+#
+# 970306 HMS Deal with nanoseconds. Fix sign of adjustments.
+package calc_tickadj;
+use strict;
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+ my $drift_file = $opts->{'drift-file'};
+ my $tick = $opts->{'tick'};
+
+ if (!$tick) {
+ my ($fl) = `tickadj`;
+ if (defined $fl && $fl =~ /(?:KERNEL|PRESET)?\s*tick\s+=\s+(\d+)/) {
+ $tick = $1;
+ }
+ else {
+ die "Could not get tick value, try manually with -t/--tick\n";
+ }
+ }
+
+ # Drift file is in PPM where Milion is actually 2**20
+ my $cvt = (2 ** 20) / $tick;
+ my $drift = 0.;
+
+ open my $dfh, $drift_file or die "Could not open $drift_file: $!\n";
+
+ $drift = <$dfh>;
+
+ close $dfh;
+ die "Invalid drift file value <$drift>" if $drift !~ /[+-]?\d+\.?[0-9]+/;
+
+ while ($drift < 0) {
+ $drift += $cvt;
+ $tick--;
+ }
+
+ while ($drift > $cvt) {
+ $drift -= $cvt;
+ $tick++;
+ }
+
+ printf "%.3f (drift)\n", $drift;
+ printf "%d usec; %d nsec\n", $tick, ($tick + ($drift/$cvt)) * 1000;
+
+ return 0;
+}
+
+@calc_tickadj_opts@
+
+1;
+__END__
diff --git a/scripts/calc_tickadj/calc_tickadj.man.in b/scripts/calc_tickadj/calc_tickadj.man.in
new file mode 100644
index 000000000000..b77ec1cc62f8
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.man.in
@@ -0,0 +1,108 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH calc_tickadj 1calc_tickadjman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4GaOOZ/ag-fHaWNZ)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:36 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]calc_tickadj\fP
+\- Calculates optimal value for tick given ntp drift file.
+.SH SYNOPSIS
+\f\*[B-Font]calc_tickadj\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.br
+.in +4
+.nf
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.in -4
+.fi
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-drift\-file\f[]=\f\*[I-Font]string\f[]
+Ntp drift file to use.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tick\f[]=\f\*[I-Font]number\f[]
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.mdoc.in b/scripts/calc_tickadj/calc_tickadj.mdoc.in
new file mode 100644
index 000000000000..911f0726dc5f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.mdoc.in
@@ -0,0 +1,84 @@
+.Dd December 19 2014
+.Dt CALC_TICKADJ 1calc_tickadjmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:39 AM by AutoGen 5.18.5pre4
+.\" From the definitions calc_tickadj-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm calc_tickadj
+.Nd Calculates "optimal" value for tick given ntp drift file.
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+The \fBcalc_tickadj\fP script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+.sp
+The example output of
+.Bd -literal -offset indent
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+.Ed
+.sp
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of \-23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+.sp
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+.sp
+\fBcalc_tickadj\fP tries to determine the the tick value by using
+\fBtickadj\fP program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl d Ar string , Fl \-drift\-file Ns = Ns Ar string
+Ntp drift file to use.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /etc/ntp/drift
+.sp
+Use the specified drift file for calculations
+.It Fl t Ar number , Fl \-tick Ns = Ns Ar number
+Tick value of this host.
+This option takes an integer number as its argument.
+.sp
+The current tick which to adjustment will be calculated
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBcalc_tickadj\fP
+option definitions.
diff --git a/scripts/calc_tickadj/calc_tickadj.texi b/scripts/calc_tickadj/calc_tickadj.texi
new file mode 100644
index 000000000000..d15b428eca7f
--- /dev/null
+++ b/scripts/calc_tickadj/calc_tickadj.texi
@@ -0,0 +1,37 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename calc_tickadj.info
+@settitle calc_tickadj User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{calc_tickadj}, a program from the NTP
+Project, that is used calculate optimal tick value based on given drift file.
+@end ifinfo
+
+@direntry
+* calc_tickadj: (calc_tickadj). Calculate optimal tick value from a drift file.
+@end direntry
+
+@titlepage
+@title calc_tickadj User's Manual
+@subtitle calc_tickadj, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@node Top, calc_tickadj Description, (dir), (dir)
+@top calc_tickadj User's Manual
+
+This document describes the use of the NTP Project's @code{calc_tickadj} program.
+This document applies to version @value{VERSION} of @code{calc_tickadj}.
+
+@shortcontents
+
+@menu
+* calc_tickadj Description:: Description
+* calc_tickadj Invocation:: Invoking calc_tickadj
+@end menu
+
+@include invoke-calc_tickadj.texi
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.menu b/scripts/calc_tickadj/invoke-calc_tickadj.menu
new file mode 100644
index 000000000000..865a0d72d414
--- /dev/null
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.menu
@@ -0,0 +1 @@
+* calc_tickadj Invocation:: Invoking calc_tickadj
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi
new file mode 100644
index 000000000000..93585e5247f4
--- /dev/null
+++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi
@@ -0,0 +1,102 @@
+@node calc_tickadj Invocation
+@section Invoking calc_tickadj
+@pindex calc_tickadj
+@cindex Calculates "optimal" value for tick given ntp drift file.
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:41 AM by AutoGen 5.18.5pre4
+# From the definitions calc_tickadj-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+The @code{calc_tickadj} script uses provided ntp drift file to generate optimal
+tick value. Generally, ntpd can do better job if the drift value is the
+smallest possible number.
+
+The example output of
+@example
+$ ./calc_tickadj
+81.699 (drift)
+9999 usec; 9999779 nsec
+$ cat /etc/ntp/drift
+-23.159
+@end example
+
+means the following. If tick on that box is 10,000, by making the value 9999
+we'll shift the box from its current drift of -23.159 to a drift of 81.699, and
+in doing so we'll speed the clock up a little every second instead of slowing
+the clock down a little.
+
+If 'tick' on that box is 10,000,000 then by setting it to 9999779 the drift
+value will be somewhere around 0.0.
+
+@code{calc_tickadj} tries to determine the the tick value by using
+@code{tickadj} program from ntp package. If this doesn't work you can specify
+current tick manually on command line.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{calc_tickadj} program.
+
+@menu
+* calc_tickadj usage:: calc_tickadj help/usage (@option{--help})
+* calc_tickadj drift-file:: drift-file option (-d)
+* calc_tickadj tick:: tick option (-t)
+* calc_tickadj exit status:: exit status
+@end menu
+
+@node calc_tickadj usage
+@subsection calc_tickadj help/usage (@option{--help})
+@cindex calc_tickadj help
+
+This is the automatically generated usage text for calc_tickadj.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p467
+USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ -d, --drift-file=str Ntp drift file to use
+ -t, --tick=num Tick value of this host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node calc_tickadj drift-file
+@subsection drift-file option (-d)
+@cindex calc_tickadj-drift-file
+
+This is the ``ntp drift file to use'' option.
+This option takes a string argument.
+Use the specified drift file for calculations
+@node calc_tickadj tick
+@subsection tick option (-t)
+@cindex calc_tickadj-tick
+
+This is the ``tick value of this host'' option.
+This option takes a number argument.
+The current tick which to adjustment will be calculated
+@node calc_tickadj exit status
+@subsection calc_tickadj exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/checktime.in b/scripts/checktime.in
deleted file mode 100644
index 2fe8f711bc82..000000000000
--- a/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/scripts/freq_adj.in b/scripts/deprecated/freq_adj.in
index 88eb390e1db6..88eb390e1db6 100644
--- a/scripts/freq_adj.in
+++ b/scripts/deprecated/freq_adj.in
diff --git a/scripts/hpadjtime.sh b/scripts/deprecated/hpadjtime.sh
index 3de2a4093046..3de2a4093046 100755
--- a/scripts/hpadjtime.sh
+++ b/scripts/deprecated/hpadjtime.sh
diff --git a/scripts/html2man.in b/scripts/deprecated/html2man.in
index 2f5fb3f9935e..adc484820a08 100755
--- a/scripts/html2man.in
+++ b/scripts/deprecated/html2man.in
@@ -19,21 +19,21 @@ $MANDIR = "./man";
# HTML files to convert. Also include per-file info here:
# name of man page, man section, 'see also' section
%manfiles = (
- 'ntpd' => ['ntpd', 8, 'ntp.conf(5), ntpq(8), ntpdc(8)'],
- 'ntpq' => ['ntpq', 8, 'ntp_decode(5), ntpd(8), ntpdc(8)'],
- 'ntpdate' => ['ntpdate', 8, 'ntpd(8)'],
- 'ntpdc' => ['ntpdc', 8, 'ntpd(8)'],
- 'ntptime' => ['ntptime', 8, 'ntpd(8), ntpdate(8)'],
- 'ntptrace' => ['ntptrace', 8, 'ntpd(8)'],
- 'ntp-wait' => ['ntp-wait', 8, 'ntpd(8)'],
- 'keygen' => ['ntp-keygen', 8, 'ntpd(8), ntp_auth(5)'],
- 'tickadj' => ['tickadj', 8, 'ntpd(8)'],
- 'confopt' => ['ntp.conf', 5, 'ntpd(8), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
- 'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(8)'],
+ 'ntpd' => ['ntpd', @NTPD_MS@, 'ntp.conf(5), ntpq(@NTPQ_MS@), ntpdc(@NTPDC_MS@)'],
+ 'ntpq' => ['ntpq', @NTPQ_MS@, 'ntp_decode(5), ntpd(@NTPD_MS@), ntpdc(@NTPDC_MS@)'],
+ 'ntpdate' => ['ntpdate', @NTPDATE_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntpdc' => ['ntpdc', @NTPDC_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntptime' => ['ntptime', @NTPTIME_MS@, 'ntpd(@NTPD_MS@), ntpdate(@NTPDATE_MS@)'],
+ 'ntptrace' => ['ntptrace', @NTPTRACE_MS@, 'ntpd(@NTPD_MS@)'],
+ 'ntp-wait' => ['ntp-wait', @NTP_WAIT_MS@, 'ntpd(@NTPD_MS@)'],
+ 'keygen' => ['ntp-keygen', @NTP_KEYGEN_MS@, 'ntpd(@NTPD_MS@), ntp_auth(5)'],
+ 'tickadj' => ['tickadj', @TICKADJ_MS@, 'ntpd(@NTPD_MS@)'],
+ 'confopt' => ['ntp.conf', 5, 'ntpd(@NTPD_MS@), ntp_auth(5), ntp_mon(5), ntp_acc(5), ntp_clock(5), ntp_misc(5)'],
+ 'authopt' => ['ntp_auth', 5, 'ntp.conf(5), ntpd(@NTPD_MS@)'],
'monopt' => ['ntp_mon', 5, 'ntp.conf(5), ntp_decode(5)'],
'accopt' => ['ntp_acc', 5, 'ntp.conf(5)'],
'clockopt' => ['ntp_clock', 5, 'ntp.conf(5)'],
- 'decode' => ['ntp_decode', 5, 'ntpq(8), ntp_mon(5)'],
+ 'decode' => ['ntp_decode', 5, 'ntpq(@NTPQ_MS@), ntp_mon(5)'],
'miscopt' => ['ntp_misc', 5, 'ntp.conf(5)']);
%table_headers = (
diff --git a/scripts/ntp-close b/scripts/deprecated/ntp-close
index b5077e67142c..b5077e67142c 100755
--- a/scripts/ntp-close
+++ b/scripts/deprecated/ntp-close
diff --git a/scripts/ntp-groper b/scripts/deprecated/ntp-groper
index 1fd0cfe4c2d6..1fd0cfe4c2d6 100755
--- a/scripts/ntp-groper
+++ b/scripts/deprecated/ntp-groper
diff --git a/scripts/ntp-restart b/scripts/deprecated/ntp-restart
index 0a1d58a5c56c..0a1d58a5c56c 100755
--- a/scripts/ntp-restart
+++ b/scripts/deprecated/ntp-restart
diff --git a/scripts/ntp-status b/scripts/deprecated/ntp-status
index 4109124eedb6..4109124eedb6 100755
--- a/scripts/ntp-status
+++ b/scripts/deprecated/ntp-status
diff --git a/scripts/genver b/scripts/genver
deleted file mode 100755
index ddf25cd41536..000000000000
--- a/scripts/genver
+++ /dev/null
@@ -1,88 +0,0 @@
-#! /bin/sh
-
-# possible usage: $0 [-f] [version.m4] [version.def]
-#
-# -f would be 'force the update'
-
-force=0
-outputs=
-for i in $*
-do
- case "$i" in
- -f) force=1 ;;
- version.m4)
- outputs="version.m4 $outputs"
- ;;
- *version.def)
- outputs="include/version.def $outputs"
- ;;
- *version.texi)
- outputs="include/version.texi $outputs"
- ;;
- *) echo "Unrecognized option: $i"
- exit 1
- ;;
- esac
-done
-
-case "$outputs" in
- '') outputs="version.m4 include/version.def include/version.texi" ;;
-esac
-
-set -e
-
-. ./packageinfo.sh
-
-dversion=`scripts/VersionName`
-
-set +e
-
-case "$outputs" in
- *version.m4*)
- echo "m4_define([VERSION_NUMBER],[${dversion}])" > /tmp/version.m4+
- cmp -s /tmp/version.m4+ version.m4
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.m4+
- ;;
- *)
- mv /tmp/version.m4+ version.m4
- ;;
- esac
- ;;
-esac
-
-case "$outputs" in
- *version.def*)
- echo "version = '${dversion}';" > /tmp/version.def+
- cmp -s /tmp/version.def+ include/version.def
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.def+
- ;;
- *)
- mv /tmp/version.def+ include/version.def
- ;;
- esac
- ;;
-esac
-
-case "$outputs" in
- *version.texi*)
- echo "@set UPDATED `date +'%d %B %Y'`" > /tmp/version.texi+
- echo "@set EDITION $dversion" >> /tmp/version.texi+
- echo "@set VERSION $dversion" >> /tmp/version.texi+
- cmp -s /tmp/version.texi+ include/version.texi
- rc=$?
- case "$force$rc" in
- 00)
- rm -f /tmp/version.texi+
- ;;
- *)
- mv /tmp/version.texi+ include/version.texi
- ;;
- esac
- ;;
-esac
diff --git a/scripts/invoke-plot_summary.menu b/scripts/invoke-plot_summary.menu
new file mode 100644
index 000000000000..b287f20a040e
--- /dev/null
+++ b/scripts/invoke-plot_summary.menu
@@ -0,0 +1 @@
+* plot_summary Invocation:: Invoking plot_summary
diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi
new file mode 100644
index 000000000000..d78ca9304afd
--- /dev/null
+++ b/scripts/invoke-plot_summary.texi
@@ -0,0 +1,121 @@
+@node plot_summary Invocation
+@section Invoking plot_summary
+@pindex plot_summary
+@cindex plot statistics generated by summary script
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:15 AM by AutoGen 5.18.5pre4
+# From the definitions plot_summary-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{plot_summary} program.
+
+@menu
+* plot_summary usage:: plot_summary help/usage (@option{--help})
+* plot_summary directory:: directory option
+* plot_summary identifier:: identifier option
+* plot_summary peer:: peer option
+* plot_summary plot-term:: plot-term option
+* plot_summary output-file:: output-file option
+* plot_summary exit status:: exit status
+@end menu
+
+@node plot_summary usage
+@subsection plot_summary help/usage (@option{--help})
+@cindex plot_summary help
+
+This is the automatically generated usage text for plot_summary.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node plot_summary directory
+@subsection directory option
+@cindex plot_summary-directory
+
+This is the ``where the summary files are'' option.
+This option takes a string argument.
+ The directory where the @code{plot_summary} will search for the
+ *_summary files generated by @code{summary} script.
+@node plot_summary identifier
+@subsection identifier option
+@cindex plot_summary-identifier
+
+This is the ``origin of the data'' option.
+This option takes a string argument.
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+@node plot_summary peer
+@subsection peer option
+@cindex plot_summary-peer
+
+This is the ``peers to generate plots for'' option.
+This option takes a string argument.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+@node plot_summary plot-term
+@subsection plot-term option
+@cindex plot_summary-plot-term
+
+This is the ``gnuplot terminal'' option.
+This option takes a string argument.
+ This is string is passed directly to the @code{gnuplot set terminal}
+ command. Default is @code{x11} if @code{DISPLAY} is set and
+ @code{dumb} is it's not'. See output from @code(gnuplot -e "set
+ terminal") for the list of avalaible options.
+@node plot_summary output-file
+@subsection output-file option
+@cindex plot_summary-output-file
+
+This is the ``output file'' option.
+This option takes a str argument.
+ Output file for @code{gnuplot}, default to stdout.
+@node plot_summary exit status
+@subsection plot_summary exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/invoke-summary.menu b/scripts/invoke-summary.menu
new file mode 100644
index 000000000000..f6adfe1d1bf3
--- /dev/null
+++ b/scripts/invoke-summary.menu
@@ -0,0 +1 @@
+* summary Invocation:: Invoking summary
diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi
new file mode 100644
index 000000000000..289490d73143
--- /dev/null
+++ b/scripts/invoke-summary.texi
@@ -0,0 +1,103 @@
+@node summary Invocation
+@section Invoking summary
+@pindex summary
+@cindex compute various stastics from NTP stat files
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:21 AM by AutoGen 5.18.5pre4
+# From the definitions summary-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{summary} program.
+
+@menu
+* summary usage:: summary help/usage (@option{--help})
+* summary directory:: directory option
+* summary end-date:: end-date option
+* summary output-directory:: output-directory option
+* summary start-date:: start-date option
+* summary exit status:: exit status
+@end menu
+
+@node summary usage
+@subsection summary help/usage (@option{--help})
+@cindex summary help
+
+This is the automatically generated usage text for summary.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node summary directory
+@subsection directory option
+@cindex summary-directory
+
+This is the ``directory containing stat files'' option.
+This option takes a string argument.
+ The directory where @code{ntpd} will search for .stat files generated
+ by @code{ntpd}.
+@node summary end-date
+@subsection end-date option
+@cindex summary-end-date
+
+This is the ``end date'' option.
+This option takes a number argument.
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use @code{date -u +%Y%m%d})
+ to get the timestamp.
+@node summary output-directory
+@subsection output-directory option
+@cindex summary-output-directory
+
+This is the ``output directory'' option.
+This option takes a str argument.
+ The output directory @code{summary} will write all output files to.
+@node summary start-date
+@subsection start-date option
+@cindex summary-start-date
+
+This is the ``start date'' option.
+This option takes a num argument.
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+@node summary exit status
+@subsection summary exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/lib/Makefile.am b/scripts/lib/Makefile.am
new file mode 100644
index 000000000000..d7c0c0e2c544
--- /dev/null
+++ b/scripts/lib/Makefile.am
@@ -0,0 +1,5 @@
+perllibdir = @PERLLIBDIR@
+
+nobase_perllib_DATA = NTP/Util.pm
+
+EXTRA_DIST = ${nobase_perllib_DATA}
diff --git a/scripts/lib/Makefile.in b/scripts/lib/Makefile.in
new file mode 100644
index 000000000000..9d460e1cadc7
--- /dev/null
+++ b/scripts/lib/Makefile.in
@@ -0,0 +1,584 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts/lib
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(perllibdir)"
+DATA = $(nobase_perllib_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+perllibdir = @PERLLIBDIR@
+nobase_perllib_DATA = NTP/Util.pm
+EXTRA_DIST = ${nobase_perllib_DATA}
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/lib/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/lib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-nobase_perllibDATA: $(nobase_perllib_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
+ @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(perllibdir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(perllibdir)/$$dir"; }; \
+ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(perllibdir)/$$dir'"; \
+ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(perllibdir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_perllibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(perllibdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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 $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(perllibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_perllibDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nobase_perllibDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man \
+ install-nobase_perllibDATA install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-nobase_perllibDATA
+
+
+# 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/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm
new file mode 100644
index 000000000000..66f2453bf0cf
--- /dev/null
+++ b/scripts/lib/NTP/Util.pm
@@ -0,0 +1,137 @@
+package NTP::Util;
+use strict;
+use warnings;
+use Exporter 'import';
+use Carp;
+use version 0.77;
+
+our @EXPORT_OK = qw(ntp_read_vars do_dns ntp_peers ntp_sntp_line);
+
+my $ntpq_path = 'ntpq';
+my $sntp_path = 'sntp';
+
+our $IP_AGNOSTIC;
+
+BEGIN {
+ require Socket;
+ if (version->parse($Socket::VERSION) >= version->parse(1.94)) {
+ Socket->import(qw(getaddrinfo getnameinfo SOCK_RAW AF_INET));
+ $IP_AGNOSTIC = 1;
+ }
+ else {
+ Socket->import(qw(inet_aton SOCK_RAW AF_INET));
+ }
+}
+
+my %obsolete_vars = (
+ phase => 'offset',
+ rootdispersion => 'rootdisp',
+);
+
+sub ntp_read_vars {
+ my ($peer, $vars, $host) = @_;
+ my $do_all = !@$vars;
+ my %out_vars = map {; $_ => undef } @$vars;
+
+ $out_vars{status_line} = {} if $do_all;
+
+ my $cmd = "$ntpq_path -n -c 'rv $peer ".(join ',', @$vars)."'";
+ $cmd .= " $host" if defined $host;
+ $cmd .= " |";
+
+ open my $fh, $cmd or croak "Could not start ntpq: $!";
+
+ while (<$fh>) {
+ return undef if /Connection refused/;
+
+ if (/^asso?c?id=0 status=(\S{4}) (\S+), (\S+),/gi) {
+ $out_vars{status_line}{status} = $1;
+ $out_vars{status_line}{leap} = $2;
+ $out_vars{status_line}{sync} = $3;
+ }
+
+ while (/(\w+)=([^,]+),?\s/g) {
+ my ($var, $val) = ($1, $2);
+ $val =~ s/^"([^"]+)"$/$1/;
+ $var = $obsolete_vars{$var} if exists $obsolete_vars{$var};
+ if ($do_all) {
+ $out_vars{$var} = $val
+ }
+ else {
+ $out_vars{$var} = $val if exists $out_vars{$var};
+ }
+ }
+ }
+
+ close $fh or croak "running ntpq failed: $! (exit status $?)";
+ return \%out_vars;
+}
+
+sub do_dns {
+ my ($host) = @_;
+
+ if ($IP_AGNOSTIC) {
+ my ($err, $res);
+
+ ($err, $res) = getaddrinfo($host, '', {socktype => SOCK_RAW});
+ die "getaddrinfo failed: $err\n" if $err;
+
+ ($err, $res) = getnameinfo($res->{addr}, 0);
+ die "getnameinfo failed: $err\n" if $err;
+
+ return $res;
+ }
+ # Too old perl, do only ipv4
+ elsif ($host =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
+ return gethostbyaddr inet_aton($host), AF_INET;
+ }
+ else {
+ return;
+ }
+}
+
+sub ntp_peers {
+ my ($host) = @_;
+
+ my $cmd = "$ntpq_path -np $host |";
+
+ open my $fh, $cmd or croak "Could not start ntpq: $!";
+
+ <$fh> for 1 .. 2;
+
+ my @columns = qw(remote refid st t when poll reach delay offset jitter);
+ my @peers;
+ while (<$fh>) {
+ if (/(?:[\w\.\*-]+\s*){10}/) {
+ my $col = 0;
+ push @peers, { map {; $columns[ $col++ ] => $_ } split /(?<=.)\s+/ };
+ }
+ else {
+ #TODO return error (but not needed anywhere now)
+ warn "ERROR: $_";
+ }
+ }
+
+ close $fh or croak "running ntpq failed: $! (exit status $?)";
+ return \@peers;
+}
+
+# TODO: we don't need this but it would be nice to have all the line parsed
+sub ntp_sntp_line {
+ my ($host) = @_;
+
+ my $cmd = "$sntp_path $host |";
+ open my $fh, $cmd or croak "Could not start sntp: $!";
+
+ my ($offset, $stratum);
+ while (<$fh>) {
+ next if !/^\d{4}-\d\d-\d\d/;
+ chomp;
+ my @output = split / /;
+
+ $offset = $output[3];
+ ($stratum = pop @output) =~ s/s(\d{1,2})/$1/;
+ }
+ close $fh or croak "running sntp failed: $! (exit status $?)";
+ return ($offset, $stratum);
+}
diff --git a/scripts/monitoring/ntp.pl b/scripts/monitoring/ntp.pl
index b23f396ee024..3478f71bc709 100644
--- a/scripts/monitoring/ntp.pl
+++ b/scripts/monitoring/ntp.pl
@@ -148,24 +148,34 @@ 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",
+ 1, "sync_pps",
+ 2, "sync_lf_clock",
3, "sync_hf_clock",
- 4, "sync_local_proto",
- 5, "sync_ntp",
- 6, "sync_udp/time",
- 7, "sync_wristwatch",
+ 4, "sync_uhf_clock",
+ 5, "sync_local_proto",
+ 6, "sync_ntp",
+ 7, "sync_udp/time",
+ 8, "sync_wristwatch",
+ 9, "sync_telephone",
"-", "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",
+ 1, "event_freq_not_set",
+ 2, "event_freq_set",
+ 3, "event_spike_detect",
+ 4, "event_freq_mode",
+ 5, "event_clock_sync",
+ 6, "event_restart",
+ 7, "event_panic_stop",
+ 8, "event_no_sys_peer",
+ 9, "event_leap_armed",
+ 10, "event_leap_disarmed",
+ 11, "event_leap_event",
+ 12, "event_clock_step",
+ 13, "event_kern",
+ 14, "event_loaded_leaps",
+ 15, "event_stale_leaps",
"-", "event",
);
sub LI
@@ -196,26 +206,38 @@ 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_bcast { return ($_[$[] & 0x0800) == 0x0800; }
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",
+ 1, "sel_falsetick",
+ 2, "sel_excess",
+ 3, "sel_outlier",
+ 4, "sel_candidate",
+ 5, "sel_backup",
+ 6, "sel_sys.peer",
+ 6, "sel_pps.peer",
"-", "PeerSel",
);
%PeerEvent = (0, "event_unspec",
- 1, "event_ip_err",
- 2, "event_authen",
+ 1, "event_mobilize",
+ 2, "event_demobilize",
3, "event_unreach",
4, "event_reach",
- 5, "event_clock_excptn",
- 6, "event_stratum_chg",
+ 5, "event_restart",
+ 6, "event_no_reply",
+ 7, "event_rate_exceed",
+ 8, "event_denied",
+ 9, "event_leap_armed",
+ 10, "event_sys_peer",
+ 11, "event_clock_event",
+ 12, "event_bad_auth",
+ 13, "event_popcorn",
+ 14, "event_intlv_mode",
+ 15, "event_intlv_err",
"-", "event",
);
@@ -236,8 +258,7 @@ sub peer_status
$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 .= "bcast," if &psw_PStat_bcast($_[$[]);
$x .= sprintf(" %s, %d event%s, %s", &PeerSelection($_[$[]),
&psw_PCnt($_[$[]), ((&psw_PCnt($_[$[]) == 1) ? "" : "s"),
@@ -256,7 +277,7 @@ sub csw_CEvnt { return $_[$[] & 0xff; }
1, "clk_timeout",
2, "clk_badreply",
3, "clk_fault",
- 4, "clk_prop",
+ 4, "clk_badsig",
5, "clk_baddate",
6, "clk_badtime",
"-", "clk",
@@ -295,13 +316,19 @@ sub error_status
;#
;# cntrl op name translation
-%CntrlOpName = (1, "read_status",
+%CntrlOpName = (0, "reserved",
+ 1, "read_status",
2, "read_variables",
3, "write_variables",
4, "read_clock_variables",
5, "write_clock_variables",
6, "set_trap",
7, "trap_response",
+ 8, "configure",
+ 9, "saveconf",
+ 10, "read_mru",
+ 11, "read_ordlist",
+ 12, "rqst_nonce",
31, "unset_trap", # !!! unofficial !!!
"-", "cntrlop",
);
@@ -393,7 +420,7 @@ sub handle_packet
$STAT_frag++;
$lastseen = 1 if !&pkt_M($r_e_m_op);
- if (!defined(%FRAGS))
+ if (!%FRAGS)
{
print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
$FRAGS{$offset} = $data;
diff --git a/scripts/monitoring/ntptrap b/scripts/monitoring/ntptrap
index 5a1bcb1b225e..f2abef950872 100644
--- a/scripts/monitoring/ntptrap
+++ b/scripts/monitoring/ntptrap
@@ -45,15 +45,17 @@ $ntp'timeout if 0;
;#
sub usage
{
- die("usage: $0 [-n] [-p <port>] [-l <logfile>] [host] ...\n");
+ die("usage: $0 [-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
+$opt_l = "/dev/null" # where to write debug messages to
+ if (!$opt_l);
+$opt_p = 0 # port to use locally - (0 does mean: will be chosen by kernel)
+ if (!$opt_p);
+
@Hosts = ($#ARGV < $[) ? ("localhost") : @ARGV;
;# setup for debug output
diff --git a/scripts/ntp-wait.in b/scripts/ntp-wait.in
deleted file mode 100644
index 7b026ca1909c..000000000000
--- a/scripts/ntp-wait.in
+++ /dev/null
@@ -1,54 +0,0 @@
-#! @PATH_PERL@ -w
-
-die "perl5 needed\n" unless ($] > 5);
-
-use Getopt::Std;
-
-$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('n:s:v');
-
-$cmd = 'ntpq -c "rv 0"';
-
-$| = 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>) {
- chomp;
- # the first line should be similar to:
- # associd=0 status=0645 leap_none, sync_ntp, ...
- if (/^associd=0 status=(\S{4}) (\S+), (\S+),/) {
- my $status = $1;
- my $leap = $2;
- my $sync = $3;
- # print $_;
- # print "status <$status>, leap <$leap>, sync <$sync>\n";
- last if ($leap =~ /(sync|leap)_alarm/);
- if ($leap =~ /leap_(none|((add|del)_sec))/) {
- # We could check $sync here to make sure we like the source...
- print "\bOK!\n" if ($opt_v);
- exit 0;
- }
- print "\bUnexpected 'leap' status <$leap>\n";
- exit 1;
- }
-
- if (/Connection refused/) {
- print "\bntpd is not running!\n" if ($opt_v);
- exit 1;
- }
-
- # Otherwise, we have a bigger problem.
- print "\bUnexpected first line <$_>\n";
- 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/scripts/ntp-wait/Makefile.am b/scripts/ntp-wait/Makefile.am
new file mode 100644
index 000000000000..b819329ead9e
--- /dev/null
+++ b/scripts/ntp-wait/Makefile.am
@@ -0,0 +1,96 @@
+NULL=
+
+bin_SCRIPTS = $(NTP_WAIT_DB)
+libexec_SCRIPTS = $(NTP_WAIT_DL)
+sbin_SCRIPTS = $(NTP_WAIT_DS)
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntp-wait.$(NTP_WAIT_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntp-wait
+
+DISTCLEANFILES = config.log $(man_MANS)
+EXTRA_DIST = \
+ ntp-wait.in \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+html_DATA = $(srcdir)/ntp-wait.html
+
+noinst_DATA = \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+ntp-wait: $(srcdir)/ntp-wait-opts
+
+$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) ntp-wait-opts.def
+
+### Nroff
+
+$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
+ mv $(srcdir)/ntp-wait.man.in+ $(srcdir)/ntp-wait.man.in
+
+### Mdoc
+
+$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
+ mv $(srcdir)/ntp-wait.mdoc.in+ $(srcdir)/ntp-wait.mdoc.in
+
+### Manpage
+
+ntp-wait.$(NTP_WAIT_MS): $(srcdir)/ntp-wait.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-wait.$(NTP_WAIT_MS)+:$(srcdir)/ntp-wait.$(MANTAGFMT).in
+ mv ntp-wait.$(NTP_WAIT_MS)+ ntp-wait.$(NTP_WAIT_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
diff --git a/scripts/ntp-wait/Makefile.in b/scripts/ntp-wait/Makefile.in
new file mode 100644
index 000000000000..8357c52122ba
--- /dev/null
+++ b/scripts/ntp-wait/Makefile.in
@@ -0,0 +1,880 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts/ntp-wait
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntp-wait.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntp-wait
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+bin_SCRIPTS = $(NTP_WAIT_DB)
+libexec_SCRIPTS = $(NTP_WAIT_DL)
+sbin_SCRIPTS = $(NTP_WAIT_DS)
+man1_MANS =
+man8_MANS =
+man_MANS = ntp-wait.$(NTP_WAIT_MS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntp-wait
+DISTCLEANFILES = config.log $(man_MANS)
+EXTRA_DIST = \
+ ntp-wait.in \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+html_DATA = $(srcdir)/ntp-wait.html
+noinst_DATA = \
+ ntp-wait.1ntp-waitman \
+ ntp-wait.1ntp-waitmdoc \
+ ntp-wait.man.in \
+ ntp-wait.mdoc.in \
+ ntp-wait.texi \
+ ntp-wait.html \
+ ntp-wait-opts.def \
+ ntp-wait-opts \
+ invoke-ntp-wait.texi \
+ invoke-ntp-wait.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntp-wait/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntp-wait/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntp-wait: $(top_builddir)/config.status $(srcdir)/ntp-wait.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntp-wait: $(srcdir)/ntp-wait-opts
+
+$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) ntp-wait-opts.def
+
+### Nroff
+
+$(srcdir)/ntp-wait.1ntp-waitman: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitman -Tagman-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.man.in: $(srcdir)/ntp-wait.1ntp-waitman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitman > $(srcdir)/ntp-wait.man.in+
+ mv $(srcdir)/ntp-wait.man.in+ $(srcdir)/ntp-wait.man.in
+
+### Mdoc
+
+$(srcdir)/ntp-wait.1ntp-waitmdoc: $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-waitmdoc -Tagmdoc-cmd.tpl ntp-wait-opts.def
+
+$(srcdir)/ntp-wait.mdoc.in: $(srcdir)/ntp-wait.1ntp-waitmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-wait.1ntp-waitmdoc > $(srcdir)/ntp-wait.mdoc.in+
+ mv $(srcdir)/ntp-wait.mdoc.in+ $(srcdir)/ntp-wait.mdoc.in
+
+### Manpage
+
+ntp-wait.$(NTP_WAIT_MS): $(srcdir)/ntp-wait.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-wait.$(NTP_WAIT_MS)+:$(srcdir)/ntp-wait.$(MANTAGFMT).in
+ mv ntp-wait.$(NTP_WAIT_MS)+ ntp-wait.$(NTP_WAIT_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntp-wait.menu: $(srcdir)/invoke-ntp-wait.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntp-wait.texi: ntp-wait-opts $(srcdir)/ntp-wait-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-wait-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntp-wait.html: $(srcdir)/invoke-ntp-wait.menu $(srcdir)/invoke-ntp-wait.texi $(srcdir)/ntp-wait.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntp-wait.html ntp-wait.texi || true )
+
+# 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/scripts/ntp-wait/invoke-ntp-wait.menu b/scripts/ntp-wait/invoke-ntp-wait.menu
new file mode 100644
index 000000000000..bb51936efaa2
--- /dev/null
+++ b/scripts/ntp-wait/invoke-ntp-wait.menu
@@ -0,0 +1 @@
+* ntp-wait Invocation:: Invoking ntp-wait
diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi
new file mode 100644
index 000000000000..2f660b5ebf4a
--- /dev/null
+++ b/scripts/ntp-wait/invoke-ntp-wait.texi
@@ -0,0 +1,114 @@
+@node ntp-wait Invocation
+@section Invoking ntp-wait
+@pindex ntp-wait
+@cindex Wait for ntpd to stabilize the system clock
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:48 AM by AutoGen 5.18.5pre4
+# From the definitions ntp-wait-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{ntp-wait}
+will send at most
+@kbd{num-tries}
+queries to
+@code{ntpd(8)},
+sleeping for
+@kbd{secs-between-tries}
+after each status return that says
+@code{ntpd(8)}
+has not yet produced a synchronized and stable system clock.
+
+@code{ntp-wait}
+will do this quietly, unless the
+@code{-v}
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+@kbd{ntpd} @kbd{-g}
+has set the time.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp-wait} program.
+
+@menu
+* ntp-wait usage:: ntp-wait help/usage (@option{--help})
+* ntp-wait tries:: tries option (-n)
+* ntp-wait sleep:: sleep option (-s)
+* ntp-wait verbose:: verbose option (-v)
+* ntp-wait exit status:: exit status
+* ntp-wait Authors:: Authors
+* ntp-wait Notes:: Notes
+@end menu
+
+@node ntp-wait usage
+@subsection ntp-wait help/usage (@option{--help})
+@cindex ntp-wait help
+
+This is the automatically generated usage text for ntp-wait.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntp-wait tries
+@subsection tries option (-n)
+@cindex ntp-wait-tries
+
+This is the ``number of times to check ntpd'' option.
+This option takes a number argument.
+ The maximum number of times we will check @code{ntpd} to see if
+ it has been able to synchronize and stabilize the system clock.
+@node ntp-wait sleep
+@subsection sleep option (-s)
+@cindex ntp-wait-sleep
+
+This is the ``how long to sleep between tries'' option.
+This option takes a number argument @file{secs-between-tries}.
+ We will sleep for @file{secs-between-tries} after each query
+ of @code{ntpd} that returns "the time is not yet stable".
+@node ntp-wait verbose
+@subsection verbose option (-v)
+@cindex ntp-wait-verbose
+
+This is the ``be verbose'' option.
+ By default, @code{ntp-wait} is silent.
+ With this option, @code{ntp-wait} will provide status information.
+@node ntp-wait exit status
+@subsection ntp-wait exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
+@node ntp-wait Authors
+@subsection ntp-wait Authors
+@node ntp-wait Notes
+@subsection ntp-wait Notes
diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts
new file mode 100644
index 000000000000..3184f7b3e79d
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait-opts
@@ -0,0 +1,62 @@
+# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:43 AM by AutoGen 5.18.5pre4
+# From the definitions ntp-wait-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'tries' => '100',
+ 'sleep' => '6',
+ 'verbose' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'tries|n=i', 'sleep|s=i', 'verbose|v',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntp-wait/ntp-wait-opts.def b/scripts/ntp-wait/ntp-wait-opts.def
new file mode 100644
index 000000000000..14eebbc91c30
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait-opts.def
@@ -0,0 +1,109 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = "ntp-wait";
+prog-title = "Wait for ntpd to stabilize the system clock";
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = tries;
+ value = n;
+ arg-type = number;
+ arg-default = 100;
+ descrip = "Number of times to check ntpd";
+ doc = <<- _EndOfDoc_
+ The maximum number of times we will check @code{ntpd} to see if
+ it has been able to synchronize and stabilize the system clock.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = sleep;
+ value = s;
+ arg-type = number;
+ arg-name = "secs-between-tries";
+ arg-default = 6;
+ descrip = "How long to sleep between tries";
+ doc = <<- _EndOfDoc_
+ We will sleep for @file{secs-between-tries} after each query
+ of @code{ntpd} that returns "the time is not yet stable".
+ _EndOfDoc_;
+};
+
+flag = {
+ name = verbose;
+ value = v;
+ descrip = "Be verbose";
+ doc = <<- _EndOfDoc_
+ By default, @code{ntp-wait} is silent.
+ With this option, @code{ntp-wait} will provide status information.
+ _EndOfDoc_;
+};
+
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+will send at most
+.Ar num-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs-between-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd -g
+has set the time.
+ _END_PROG_MDOC_DESCRIP;
+};
+
+/*
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+ _END_MDOC_USAGE;
+};
+*/
+
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTH
+.An "Harlan Stenn"
+ _END_MDOC_AUTH;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+This document corresponds to version @VERSION@ of NTP.
+ _END_MDOC_NOTES;
+};
+
+/*
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+ _END_MDOC_BUGS;
+};
+*/
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitman b/scripts/ntp-wait/ntp-wait.1ntp-waitman
new file mode 100644
index 000000000000..b30efe1d535c
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitman
@@ -0,0 +1,122 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-wait 1ntp-waitman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaWc1/ag-WTa4b1)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:45 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-wait\fP
+\- Wait for ntpd to stabilize the system clock
+.SH SYNOPSIS
+\f\*[B-Font]ntp-wait\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntp-wait\fP
+will send at most
+\f\*[I-Font]num-tries\f[]
+queries to
+\fCntpd\fR(8)\f[],
+sleeping for
+\f\*[I-Font]secs-between-tries\f[]
+after each status return that says
+\fCntpd\fR(8)\f[]
+has not yet produced a synchronized and stable system clock.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntp-wait\fP
+will do this quietly, unless the
+\f\*[B-Font]\-v\f[]
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+\f\*[I-Font]ntpd\f[] \f\*[I-Font]\-g\f[]
+has set the time.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tries\f[]=\f\*[I-Font]number\f[]
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]secs\-between\-tries\f[], \f\*[B-Font]\-\-sleep\f[]=\f\*[I-Font]secs\-between\-tries\f[]
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]secs\-between\-tries\f[]
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs-between-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.TP
+.NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
+Be verbose.
+.sp
+ By default, \fBntp-wait\fP is silent.
+ With this option, \fBntp-wait\fP will provide status information.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Harlan Stenn"
+.br
+.SH NOTES
+This document corresponds to version @VERSION@ of NTP.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
new file mode 100644
index 000000000000..14e26d710f46
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc
@@ -0,0 +1,95 @@
+.Dd December 19 2014
+.Dt NTP_WAIT 1ntp-waitmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-wait
+.Nd Wait for ntpd to stabilize the system clock
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will send at most
+.Ar num\-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs\-between\-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd \-g
+has set the time.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n Ar number , Fl \-tries Ns = Ns Ar number
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.It Fl s Ar secs\-between\-tries , Fl \-sleep Ns = Ns Ar secs\-between\-tries
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+.Ar secs\-between\-tries
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs\-between\-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.It Fl v , Fl \-verbose
+Be verbose.
+.sp
+ By default, \fBntp\-wait\fP is silent.
+ With this option, \fBntp\-wait\fP will provide status information.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Harlan Stenn"
+.Sh NOTES
+This document corresponds to version @VERSION@ of NTP.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html
new file mode 100644
index 000000000000..5ac2849df0b5
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.html
@@ -0,0 +1,208 @@
+<html lang="en">
+<head>
+<title>Ntp-wait User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Ntp-wait User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Ntp-wait User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Description">ntp-wait Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>ntp-wait</code> program.
+
+ <p>If there are time-sensitive applications,
+the proper sequence of events is to
+run <code>ntpd -g</code> as early as possible,
+then invoke all of the non-time-sensitive process,
+run <code>ntp-wait</code> to block
+until the system's time has stabilized and synchronized,
+and only then start any applicaitons (like database servers) that require
+accurate and stable time.
+
+ <p>This document applies to version 4.2.8 of <code>ntp-wait</code>.
+
+<div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002dwait-Description">ntp-wait Description</a>: Description
+<li><a accesskey="2" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>: Invoking ntp-wait
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking ntp-wait</h3>
+
+<p><a name="index-ntp_002dwait-1"></a><a name="index-Wait-for-ntpd-to-stabilize-the-system-clock-2"></a>
+
+ <p><code>ntp-wait</code>
+will send at most
+<kbd>num-tries</kbd>
+queries to
+<code>ntpd(8)</code>,
+sleeping for
+<kbd>secs-between-tries</kbd>
+after each status return that says
+<code>ntpd(8)</code>
+has not yet produced a synchronized and stable system clock.
+
+ <p><code>ntp-wait</code>
+will do this quietly, unless the
+<code>-v</code>
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+<kbd>ntpd</kbd> <kbd>-g</kbd>
+has set the time.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-wait</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002dwait-usage">ntp-wait usage</a>: ntp-wait help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntp_002dwait-tries">ntp-wait tries</a>: tries option (-n)
+<li><a accesskey="3" href="#ntp_002dwait-sleep">ntp-wait sleep</a>: sleep option (-s)
+<li><a accesskey="4" href="#ntp_002dwait-verbose">ntp-wait verbose</a>: verbose option (-v)
+<li><a accesskey="5" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>: exit status
+<li><a accesskey="6" href="#ntp_002dwait-Authors">ntp-wait Authors</a>: Authors
+<li><a accesskey="7" href="#ntp_002dwait-Notes">ntp-wait Notes</a>: Notes
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-tries">ntp-wait tries</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 ntp-wait help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntp_002dwait-help-3"></a>
+This is the automatically generated usage text for ntp-wait.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.8
+USAGE: ntp-wait [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ -n, --tries=num Number of times to check ntpd
+ -s, --sleep=num How long to sleep between tries
+ -v, --verbose Be verbose
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dwait-tries"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-usage">ntp-wait usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 tries option (-n)</h4>
+
+<p><a name="index-ntp_002dwait_002dtries-4"></a>
+This is the &ldquo;number of times to check ntpd&rdquo; option.
+This option takes a number argument.
+ The maximum number of times we will check <code>ntpd</code> to see if
+ it has been able to synchronize and stabilize the system clock.
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-sleep"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-tries">ntp-wait tries</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 sleep option (-s)</h4>
+
+<p><a name="index-ntp_002dwait_002dsleep-5"></a>
+This is the &ldquo;how long to sleep between tries&rdquo; option.
+This option takes a number argument <span class="file">secs-between-tries</span>.
+ We will sleep for <span class="file">secs-between-tries</span> after each query
+ of <code>ntpd</code> that returns "the time is not yet stable".
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-verbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-sleep">ntp-wait sleep</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 verbose option (-v)</h4>
+
+<p><a name="index-ntp_002dwait_002dverbose-6"></a>
+This is the &ldquo;be verbose&rdquo; option.
+ By default, <code>ntp-wait</code> is silent.
+ With this option, <code>ntp-wait</code> will provide status information.
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-verbose">ntp-wait verbose</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 ntp-wait exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dwait-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dwait-Notes">ntp-wait Notes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-exit-status">ntp-wait exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 ntp-wait Authors</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dwait-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dwait-Authors">ntp-wait Authors</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dwait-Invocation">ntp-wait Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 ntp-wait Notes</h4>
+
+</body></html>
+
diff --git a/scripts/ntp-wait/ntp-wait.in b/scripts/ntp-wait/ntp-wait.in
new file mode 100644
index 000000000000..b35828a16582
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.in
@@ -0,0 +1,66 @@
+#! @PATH_PERL@
+
+package ntp_wait;
+use 5.006_000;
+use strict;
+use warnings;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(ntp_read_vars);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+
+ my $tries = $opts->{tries}; # How many tries before we give up? (10 min+)
+ my $sleep = $opts->{sleep}; # Seconds to sleep between tries (6s = 10/min)
+ my $verbose = $opts->{verbose}; # Be verbose?
+
+ # Autoflush stdout
+ $| = 1;
+
+ print "Waiting for ntpd to synchronize... " if $verbose;
+
+ for my $i (1 .. $tries) {
+ my $info = ntp_read_vars(0, []);
+
+ if (!defined $info) {
+ print "\bntpd is not running!\n" if $verbose;
+ return 1;
+ }
+
+ if (!exists $info->{status_line}{leap}) {
+ print "\bLeap status not avalaible\n";
+ return 1;
+ }
+
+ my $leap = $info->{status_line}{leap};
+ my $sync = $info->{status_line}{sync};
+
+ if ($leap =~ /(sync|leap)_alarm/) {
+ print "\b".(substr "*+:.", $i % 4, 1) if $verbose;
+ sleep $sleep if $i < $tries;
+ next;
+ }
+
+ if ($leap =~ /leap_(none|((add|del)_sec))/) {
+ # We could check $sync here to make sure we like the source...
+ print "\bOK!\n" if $verbose;
+ return 0;
+ }
+
+ print "\bUnexpected 'leap' status <$leap>\n";
+ return 1;
+ }
+
+ print "\bNo!\nntpd did not synchronize.\n" if $verbose;
+ return 1;
+}
+
+@ntp_wait_opts@
+
+1;
+__END__
diff --git a/scripts/ntp-wait/ntp-wait.man.in b/scripts/ntp-wait/ntp-wait.man.in
new file mode 100644
index 000000000000..dbcfd24f7870
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.man.in
@@ -0,0 +1,122 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-wait @NTP_WAIT_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-JTaWc1/ag-WTa4b1)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:45 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-wait\fP
+\- Wait for ntpd to stabilize the system clock
+.SH SYNOPSIS
+\f\*[B-Font]ntp-wait\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntp-wait\fP
+will send at most
+\f\*[I-Font]num-tries\f[]
+queries to
+\fCntpd\fR(8)\f[],
+sleeping for
+\f\*[I-Font]secs-between-tries\f[]
+after each status return that says
+\fCntpd\fR(8)\f[]
+has not yet produced a synchronized and stable system clock.
+.sp \n(Ppu
+.ne 2
+
+\f\*[B-Font]ntp-wait\fP
+will do this quietly, unless the
+\f\*[B-Font]\-v\f[]
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+\f\*[I-Font]ntpd\f[] \f\*[I-Font]\-g\f[]
+has set the time.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-tries\f[]=\f\*[I-Font]number\f[]
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]secs\-between\-tries\f[], \f\*[B-Font]\-\-sleep\f[]=\f\*[I-Font]secs\-between\-tries\f[]
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]secs\-between\-tries\f[]
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs-between-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.TP
+.NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
+Be verbose.
+.sp
+ By default, \fBntp-wait\fP is silent.
+ With this option, \fBntp-wait\fP will provide status information.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Harlan Stenn"
+.br
+.SH NOTES
+This document corresponds to version @VERSION@ of NTP.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.mdoc.in b/scripts/ntp-wait/ntp-wait.mdoc.in
new file mode 100644
index 000000000000..7d73e4ebd90e
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.mdoc.in
@@ -0,0 +1,95 @@
+.Dd December 19 2014
+.Dt NTP_WAIT @NTP_WAIT_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-wait-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-wait
+.Nd Wait for ntpd to stabilize the system clock
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.Nm
+will send at most
+.Ar num\-tries
+queries to
+.Xr ntpd 8 ,
+sleeping for
+.Ar secs\-between\-tries
+after each status return that says
+.Xr ntpd 8
+has not yet produced a synchronized and stable system clock.
+.Pp
+.Nm
+will do this quietly, unless the
+.Fl v
+flag is provided.
+This can be useful at boot time, to delay the boot sequence until after
+.Ar ntpd \-g
+has set the time.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n Ar number , Fl \-tries Ns = Ns Ar number
+Number of times to check ntpd.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 100
+.sp
+ The maximum number of times we will check \fBntpd\fP to see if
+ it has been able to synchronize and stabilize the system clock.
+.It Fl s Ar secs\-between\-tries , Fl \-sleep Ns = Ns Ar secs\-between\-tries
+How long to sleep between tries.
+This option takes an integer number as its argument.
+The default
+.Ar secs\-between\-tries
+for this option is:
+.ti +4
+ 6
+.sp
+ We will sleep for \fIsecs\-between\-tries\fP after each query
+ of \fBntpd\fP that returns "the time is not yet stable".
+.It Fl v , Fl \-verbose
+Be verbose.
+.sp
+ By default, \fBntp\-wait\fP is silent.
+ With this option, \fBntp\-wait\fP will provide status information.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Harlan Stenn"
+.Sh NOTES
+This document corresponds to version @VERSION@ of NTP.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-wait\fP
+option definitions.
diff --git a/scripts/ntp-wait/ntp-wait.texi b/scripts/ntp-wait/ntp-wait.texi
new file mode 100644
index 000000000000..208639b3dff9
--- /dev/null
+++ b/scripts/ntp-wait/ntp-wait.texi
@@ -0,0 +1,52 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntp-wait.info
+@settitle Ntp-wait User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntp-wait},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* ntp-wait: (ntp-wait). Wait for ntpd to synchronize and stabilize the system clock.
+@end direntry
+
+@titlepage
+@title ntp-wait User's Manual
+@subtitle ntp-wait, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntp-wait Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{ntp-wait} program.
+
+If there are time-sensitive applications,
+the proper sequence of events is to
+run @code{ntpd -g} as early as possible,
+then invoke all of the non-time-sensitive process,
+run @code{ntp-wait} to block
+until the system's time has stabilized and synchronized,
+and only then start any applicaitons (like database servers) that require
+accurate and stable time.
+
+This document applies to version @value{VERSION} of @code{ntp-wait}.
+
+@shortcontents
+
+@menu
+* ntp-wait Description:: Description
+* ntp-wait Invocation:: Invoking ntp-wait
+@end menu
+
+@include invoke-ntp-wait.texi
diff --git a/scripts/ntpsweep.in b/scripts/ntpsweep.in
deleted file mode 100644
index e503a0637a34..000000000000
--- a/scripts/ntpsweep.in
+++ /dev/null
@@ -1,300 +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 <ntpsweep@lambermont.dyndns.org>
-
-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/scripts/ntpsweep/Makefile.am b/scripts/ntpsweep/Makefile.am
new file mode 100644
index 000000000000..7ecc23bd5abd
--- /dev/null
+++ b/scripts/ntpsweep/Makefile.am
@@ -0,0 +1,102 @@
+NULL=
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS= $(NTPSWEEP_DB)
+sbin_SCRIPTS= $(NTPSWEEP_DS)
+libexec_SCRIPTS= $(NTPSWEEP_DL)
+noinst_SCRIPTS= $(NTPSWEEP_NI)
+EXTRA_SCRIPTS= ntpsweep
+
+man1_MANS=
+man8_MANS=
+if INSTALL_NTPSWEEP
+man_MANS= ntpsweep.$(NTPSWEEP_MS)
+else
+noinst_MANS= ntpsweep.$(NTPSWEEP_MS)
+endif
+
+EXTRA_DIST = \
+ ntpsweep.in \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+html_DATA = ntpsweep.html
+
+CLEANFILES = ntpsweep.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+
+noinst_DATA = \
+ ntpsweep.1 \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+ntpsweep: $(srcdir)/ntpsweep-opts
+
+$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) ntpsweep-opts.def
+
+### Nroff
+
+$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
+ mv $(srcdir)/ntpsweep.man.in+ $(srcdir)/ntpsweep.man.in
+
+### Mdoc
+
+$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
+ mv $(srcdir)/ntpsweep.mdoc.in+ $(srcdir)/ntpsweep.mdoc.in
+
+### Manpage
+
+ntpsweep.1: ntpsweep.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsweep.1+:$(srcdir)/ntpsweep.$(MANTAGFMT).in
+ mv ntpsweep.1+ ntpsweep.1
+
+### Texinfo
+
+$(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
diff --git a/scripts/ntpsweep/Makefile.in b/scripts/ntpsweep/Makefile.in
new file mode 100644
index 000000000000..0e1a2b21fdb7
--- /dev/null
+++ b/scripts/ntpsweep/Makefile.in
@@ -0,0 +1,886 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts/ntpsweep
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntpsweep.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntpsweep
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(noinst_SCRIPTS) \
+ $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+bin_SCRIPTS = $(NTPSWEEP_DB)
+sbin_SCRIPTS = $(NTPSWEEP_DS)
+libexec_SCRIPTS = $(NTPSWEEP_DL)
+noinst_SCRIPTS = $(NTPSWEEP_NI)
+EXTRA_SCRIPTS = ntpsweep
+man1_MANS =
+man8_MANS =
+@INSTALL_NTPSWEEP_TRUE@man_MANS = ntpsweep.$(NTPSWEEP_MS)
+@INSTALL_NTPSWEEP_FALSE@noinst_MANS = ntpsweep.$(NTPSWEEP_MS)
+EXTRA_DIST = \
+ ntpsweep.in \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+html_DATA = ntpsweep.html
+CLEANFILES = ntpsweep.1
+DISTCLEANFILES = config.log $(man_MANS) $(noinst_MANS)
+noinst_DATA = \
+ ntpsweep.1 \
+ ntpsweep.1ntpsweepman \
+ ntpsweep.1ntpsweepmdoc \
+ ntpsweep.man.in \
+ ntpsweep.mdoc.in \
+ ntpsweep.texi \
+ ntpsweep.html \
+ ntpsweep-opts.def \
+ ntpsweep-opts \
+ invoke-ntpsweep.texi \
+ invoke-ntpsweep.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntpsweep/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntpsweep/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntpsweep: $(top_builddir)/config.status $(srcdir)/ntpsweep.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntpsweep: $(srcdir)/ntpsweep-opts
+
+$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) ntpsweep-opts.def
+
+### Nroff
+
+$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
+ mv $(srcdir)/ntpsweep.man.in+ $(srcdir)/ntpsweep.man.in
+
+### Mdoc
+
+$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
+
+$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
+ mv $(srcdir)/ntpsweep.mdoc.in+ $(srcdir)/ntpsweep.mdoc.in
+
+### Manpage
+
+ntpsweep.1: ntpsweep.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsweep.1+:$(srcdir)/ntpsweep.$(MANTAGFMT).in
+ mv ntpsweep.1+ ntpsweep.1
+
+### Texinfo
+
+$(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
+
+# 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/scripts/ntpsweep/invoke-ntpsweep.menu b/scripts/ntpsweep/invoke-ntpsweep.menu
new file mode 100644
index 000000000000..6a1faea642f3
--- /dev/null
+++ b/scripts/ntpsweep/invoke-ntpsweep.menu
@@ -0,0 +1 @@
+* ntpsweep Invocation:: Invoking ntpsweep
diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi
new file mode 100644
index 000000000000..c8917a53b56c
--- /dev/null
+++ b/scripts/ntpsweep/invoke-ntpsweep.texi
@@ -0,0 +1,118 @@
+@node ntpsweep Invocation
+@section Invoking ntpsweep
+@pindex ntpsweep
+@cindex Print various informations about given ntp servers
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:55 AM by AutoGen 5.18.5pre4
+# From the definitions ntpsweep-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+@code{ntpsweep}
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpsweep} program.
+
+@menu
+* ntpsweep usage:: ntpsweep help/usage (@option{--help})
+* ntpsweep host-list:: host-list option (-l)
+* ntpsweep peers:: peers option (-p)
+* ntpsweep maxlevel:: maxlevel option (-m)
+* ntpsweep strip:: strip option (-s)
+* ntpsweep host:: host option (-h)
+* ntpsweep exit status:: exit status
+@end menu
+
+@node ntpsweep usage
+@subsection ntpsweep help/usage (@option{--help})
+@cindex ntpsweep help
+
+This is the automatically generated usage text for ntpsweep.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntpsweep host-list
+@subsection host-list option (-l)
+@cindex ntpsweep-host-list
+
+This is the ``host to execute actions on'' option.
+This option takes a string argument.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+@node ntpsweep peers
+@subsection peers option (-p)
+@cindex ntpsweep-peers
+
+This is the ``recursively list all peers a host synchronizes to'' option.
+This option has no @samp{doc} documentation.
+@node ntpsweep maxlevel
+@subsection maxlevel option (-m)
+@cindex ntpsweep-maxlevel
+
+This is the ``traverse peers up to this level (4 is a reasonable number)'' option.
+This option takes a number argument.
+This option has no @samp{doc} documentation.
+@node ntpsweep strip
+@subsection strip option (-s)
+@cindex ntpsweep-strip
+
+This is the ``strip this string from hostnames'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+@node ntpsweep host
+@subsection host option (-h)
+@cindex ntpsweep-host
+
+This is the ``specify a single host'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+
+@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
+@node ntpsweep exit status
+@subsection ntpsweep exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts
new file mode 100644
index 000000000000..fbddd827e755
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep-opts
@@ -0,0 +1,67 @@
+# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:44:53 AM by AutoGen 5.18.5pre4
+# From the definitions ntpsweep-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'host-list' => [],
+ 'peers' => '',
+ 'maxlevel' => '',
+ 'strip' => '',
+ 'host' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '[hostfile]';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'host-list|l=s', 'peers|p', 'maxlevel|m=i',
+ 'strip|s=s', 'host|h=s',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntpsweep/ntpsweep-opts.def b/scripts/ntpsweep/ntpsweep-opts.def
new file mode 100644
index 000000000000..23dc020e9b93
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep-opts.def
@@ -0,0 +1,66 @@
+/* -*- Mode: Text -*- */
+autogen definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'ntpsweep';
+prog-title = 'Print various informations about given ntp servers';
+package = ntp;
+#include version.def
+
+argument = '[hostfile]';
+long-opts;
+gnu-usage;
+
+flag = {
+ name = host-list;
+ value = l;
+ arg-type = string;
+ max = NOLIMIT;
+ stack-arg;
+ descrip = 'Host to execute actions on';
+ doc = <<- _EndOfDoc_
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peers;
+ value = p;
+ descrip = 'Recursively list all peers a host synchronizes to';
+};
+
+flag = {
+ name = maxlevel;
+ value = m;
+ arg-type = number;
+ descrip = 'Traverse peers up to this level (4 is a reasonable number)';
+};
+
+flag = {
+ name = strip;
+ value = s;
+ arg-type = string;
+ descrip = 'Strip this string from hostnames';
+};
+
+/* Deprecated options */
+flag = {
+ name = host;
+ value = h;
+ arg-type = string;
+ descrip = 'Specify a single host';
+ deprecated;
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+ _END_PROG_MDOC_DESCRIP;
+};
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepman b/scripts/ntpsweep/ntpsweep.1ntpsweepman
new file mode 100644
index 000000000000..45912acddaf6
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepman
@@ -0,0 +1,97 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsweep 1ntpsweepman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9Pa4E2/ag-kQaaE2)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:57 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsweep\fP
+\- Print various informations about given ntp servers
+.SH SYNOPSIS
+\f\*[B-Font]ntpsweep\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[hostfile]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsweep\fP
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\-list\f[]=\f\*[I-Font]string\f[]
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-maxlevel\f[]=\f\*[I-Font]number\f[]
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-strip\f[]=\f\*[I-Font]string\f[]
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-h\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
new file mode 100644
index 000000000000..edcb21de9dd4
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc
@@ -0,0 +1,75 @@
+.Dd December 19 2014
+.Dt NTPSWEEP 1ntpsweepmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:00 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsweep
+.Nd Print various informations about given ntp servers
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[hostfile]
+.Pp
+.Sh DESCRIPTION
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl l Ar string , Fl \-host\-list Ns = Ns Ar string
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.It Fl p , Fl \-peers
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.It Fl m Ar number , Fl \-maxlevel Ns = Ns Ar number
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl s Ar string , Fl \-strip Ns = Ns Ar string
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.It Fl h Ar string , Fl \-host Ns = Ns Ar string
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html
new file mode 100644
index 000000000000..d8c3b7cf0a1c
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.html
@@ -0,0 +1,201 @@
+<html lang="en">
+<head>
+<title>ntpsweep User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="ntpsweep User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">ntpsweep User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-Description">ntpsweep Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+ <p>This document describes the use of the NTP Project's <code>ntpsweep</code> program.
+
+ <p>This document applies to version 4.2.8 of <code>ntpsweep</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpsweep-Description">ntpsweep Description</a>: Description
+<li><a accesskey="2" href="#ntpsweep-Invocation">ntpsweep Invocation</a>: Invoking ntpsweep
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpsweep-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">0.1 Invoking ntpsweep</h3>
+
+<p><a name="index-ntpsweep-1"></a><a name="index-Print-various-informations-about-given-ntp-servers-2"></a>
+<code>ntpsweep</code>
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpsweep</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntpsweep-usage">ntpsweep usage</a>: ntpsweep help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>: host-list option (-l)
+<li><a accesskey="3" href="#ntpsweep-peers">ntpsweep peers</a>: peers option (-p)
+<li><a accesskey="4" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>: maxlevel option (-m)
+<li><a accesskey="5" href="#ntpsweep-strip">ntpsweep strip</a>: strip option (-s)
+<li><a accesskey="6" href="#ntpsweep-host">ntpsweep host</a>: host option (-h)
+<li><a accesskey="7" href="#ntpsweep-exit-status">ntpsweep exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntpsweep-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.1 ntpsweep help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntpsweep-help-3"></a>
+This is the automatically generated usage text for ntpsweep.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.2.8
+USAGE: ntpsweep [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [hostfile]
+
+ -l, --host-list=str Host to execute actions on
+ - may appear multiple times
+ -p, --peers Recursively list all peers a host synchronizes to
+ -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number)
+ -s, --strip=str Strip this string from hostnames
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntpsweep-host_002dlist"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-peers">ntpsweep peers</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-usage">ntpsweep usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.2 host-list option (-l)</h4>
+
+<p><a name="index-ntpsweep_002dhost_002dlist-4"></a>
+This is the &ldquo;host to execute actions on&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>Use this option to specify the host on which this script operates.
+ May appear multiple times.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-host_002dlist">ntpsweep host-list</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.3 peers option (-p)</h4>
+
+<p><a name="index-ntpsweep_002dpeers-5"></a>
+This is the &ldquo;recursively list all peers a host synchronizes to&rdquo; option.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-maxlevel"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-strip">ntpsweep strip</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-peers">ntpsweep peers</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.4 maxlevel option (-m)</h4>
+
+<p><a name="index-ntpsweep_002dmaxlevel-6"></a>
+This is the &ldquo;traverse peers up to this level (4 is a reasonable number)&rdquo; option.
+This option takes a number argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-strip"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-host">ntpsweep host</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-maxlevel">ntpsweep maxlevel</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.5 strip option (-s)</h4>
+
+<p><a name="index-ntpsweep_002dstrip-7"></a>
+This is the &ldquo;strip this string from hostnames&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntpsweep-host"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsweep-exit-status">ntpsweep exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-strip">ntpsweep strip</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.6 host option (-h)</h4>
+
+<p><a name="index-ntpsweep_002dhost-8"></a>
+This is the &ldquo;specify a single host&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+
+ <p><strong>NOTE</strong><strong>: THIS OPTION IS DEPRECATED</strong>
+<div class="node">
+<p><hr>
+<a name="ntpsweep-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsweep-host">ntpsweep host</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpsweep-Invocation">ntpsweep Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">0.1.7 ntpsweep exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/ntpsweep/ntpsweep.in b/scripts/ntpsweep/ntpsweep.in
new file mode 100644
index 000000000000..fed35d17e1f0
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.in
@@ -0,0 +1,204 @@
+#! @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 <ntpsweep@lambermont.dyndns.org>
+
+package ntpsweep;
+use 5.006_000;
+use strict;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(do_dns ntp_read_vars ntp_peers ntp_sntp_line);
+
+(my $program = $0) =~ s%.*/(.+?)(.pl)?$%$1%;
+my ($showpeers, $maxlevel, $strip);
+my (%known_host_info, %known_host_peers);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts) ||
+ (((@_ != 1) && !$opts->{host} && !@{$opts->{'host-list'}}))) {
+ usage(1);
+ };
+
+ # no STDOUT buffering
+ $| = 1;
+ ($showpeers, $maxlevel, $strip) =
+ ($opts->{peers}, $opts->{maxlevel}, $opts->{strip});
+
+ my $hostsfile = shift;
+
+ # Main program
+
+ my @hosts;
+
+ if ($opts->{host}) {
+ push @hosts, $opts->{host};
+ }
+ else {
+ @hosts = read_hosts($hostsfile) if $hostsfile;
+ push @hosts, @{$opts->{'host-list'}};
+ }
+
+ # Print header
+ print <<EOF;
+Host st offset(s) version system processor
+--------------------------------+--+---------+-----------+------------+---------
+EOF
+
+ %known_host_info = ();
+ %known_host_peers = ();
+ scan_hosts(@hosts);
+
+ return 0;
+}
+
+sub scan_hosts {
+ my (@hosts) = @_;
+
+ my $host;
+ for $host (@hosts) {
+ scan_host($host, 0, $host => 1);
+ }
+}
+
+sub read_hosts {
+ my ($hostsfile) = @_;
+ my @hosts;
+
+ open my $hosts, $hostsfile
+ or die "$program: FATAL: unable to read $hostsfile: $!\n";
+
+ while (<$hosts>) {
+ next if /^\s*(#|$)/; # comment/empty
+ chomp;
+ push @hosts, $_;
+ }
+
+ close $hosts;
+ return @hosts;
+}
+
+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 (exists $known_host_info{$host}) {
+ $known_host = 1;
+ }
+ else {
+ ($offset, $stratum) = ntp_sntp_line($host);
+
+ # got answers ? If so, go on.
+ if ($stratum) {
+ my $vars = ntp_read_vars(0, [qw(processor system daemon_version)], $host) || {};
+ $daemonversion = $vars->{daemon_version};
+ $system = $vars->{system};
+ $processor = $vars->{processor};
+
+ # 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) {
+ if ($showpeers) {
+ my @peers_tmp = ntp_peers($host);
+ for (@peers_tmp) {
+ $_->{remote} =~ s/^(?: |x|\.|-|\+|#|\*|o)([^ ]+)/$1/;
+ push @peers, $_->{remote};
+ }
+ }
+ }
+
+ # 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} = " ?";
+ }
+ $known_host_peers{$host} = [@peers];
+ }
+
+ if ($stratum || $known_host) { # Valid or known host
+ my $printhost = ' ' x $level . (do_dns($host) || $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 && ($maxlevel ? $level < $maxlevel : 1)) {
+ $trace{$host} = 1;
+ # Loop through peers
+ foreach my $peer (@{$known_host_peers{$host}}) {
+ if (exists $trace{$peer}) {
+ # we've detected a loop !
+ $printhost = ' ' x ($level + 1) . "= " . $peer;
+ # Shorten host string
+ $printhost =~ s/$strip// if $strip;
+ printf "%-32s\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 . (do_dns($host) || $host);
+ $printhost =~ s/$strip// if $strip;
+ printf "%-32s ?\n", substr $printhost, 0, 32;
+ }
+}
+
+@ntpsweep_opts@
+
+1;
+__END__
diff --git a/scripts/ntpsweep/ntpsweep.man.in b/scripts/ntpsweep/ntpsweep.man.in
new file mode 100644
index 000000000000..45912acddaf6
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.man.in
@@ -0,0 +1,97 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntpsweep 1ntpsweepman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-9Pa4E2/ag-kQaaE2)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:44:57 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntpsweep\fP
+\- Print various informations about given ntp servers
+.SH SYNOPSIS
+\f\*[B-Font]ntpsweep\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[hostfile]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]ntpsweep\fP
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\-list\f[]=\f\*[I-Font]string\f[]
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.TP
+.NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-maxlevel\f[]=\f\*[I-Font]number\f[]
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-strip\f[]=\f\*[I-Font]string\f[]
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-h\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.mdoc.in b/scripts/ntpsweep/ntpsweep.mdoc.in
new file mode 100644
index 000000000000..edcb21de9dd4
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.mdoc.in
@@ -0,0 +1,75 @@
+.Dd December 19 2014
+.Dt NTPSWEEP 1ntpsweepmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:00 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntpsweep-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntpsweep
+.Nd Print various informations about given ntp servers
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[hostfile]
+.Pp
+.Sh DESCRIPTION
+.Nm
+prints per host the NTP stratum level, the clock offset in seconds, the daemon
+version, the operating system and the processor. Optionally recursing through
+all peers.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl l Ar string , Fl \-host\-list Ns = Ns Ar string
+Host to execute actions on.
+This option may appear an unlimited number of times.
+.sp
+ Use this option to specify the host on which this script operates.
+ May appear multiple times.
+.It Fl p , Fl \-peers
+Recursively list all peers a host synchronizes to.
+.sp
+This option has not been fully documented.
+.It Fl m Ar number , Fl \-maxlevel Ns = Ns Ar number
+Traverse peers up to this level (4 is a reasonable number).
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl s Ar string , Fl \-strip Ns = Ns Ar string
+Strip this string from hostnames.
+.sp
+This option has not been fully documented.
+.It Fl h Ar string , Fl \-host Ns = Ns Ar string
+Specify a single host.
+.sp
+This option has not been fully documented.
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntpsweep\fP
+option definitions.
diff --git a/scripts/ntpsweep/ntpsweep.texi b/scripts/ntpsweep/ntpsweep.texi
new file mode 100644
index 000000000000..e408065a65fb
--- /dev/null
+++ b/scripts/ntpsweep/ntpsweep.texi
@@ -0,0 +1,43 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntpsweep.info
+@settitle ntpsweep User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntpsweep},
+a program from
+the NTP Project,
+that is used to wait until @code{ntpd} has been able to
+synchronize and stabilize the time on the current host.
+@end ifinfo
+
+@direntry
+* ntpsweep: (ntpsweep). Wait for ntpd to synchronize and stabilize the system clock.
+@end direntry
+
+@titlepage
+@title ntpsweep User's Manual
+@subtitle ntpsweep, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntpsweep Description, (dir), (dir)
+
+This document describes the use of the NTP Project's @code{ntpsweep} program.
+
+This document applies to version @value{VERSION} of @code{ntpsweep}.
+
+@shortcontents
+
+@menu
+* ntpsweep Description:: Description
+* ntpsweep Invocation:: Invoking ntpsweep
+@end menu
+
+@include invoke-ntpsweep.texi
diff --git a/scripts/ntptrace.in b/scripts/ntptrace.in
deleted file mode 100755
index d44dab46d834..000000000000
--- a/scripts/ntptrace.in
+++ /dev/null
@@ -1,71 +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 $opt_m);
-
-$ntpq = "ntpq";
-
-$Getopt::Std::STANDARD_HELP_VERSION=1;
-getopts('nm:');
-
-$dodns = 1;
-$dodns = 0 if (defined($opt_n));
-
-$max_hosts = (defined($opt_m) ? $opt_m : 99);
-$max_hosts = 0 if ( $max_hosts !~ /^\d+$/ );
-$nb_host = 1;
-
-$host = shift;
-$host ||= "127.0.0.1";
-
-for (;;) {
- $nb_host++;
- $rootdelay = 0;
- $rootdispersion = 0;
- $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,]+)/);
- $rootdispersion = $1 if (/rootdispersion=([^\s,]+)/);
- $refid = $1 if (/refid=([^\s,]+)/);
- }
- close(PH) || die "$cmd failed";
- last if ($stratum == 255);
- $offset /= 1000;
- $syncdistance = ($rootdispersion + ($rootdelay / 2)) / 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, synch distance %f",
- $dhost, $stratum, $offset, $syncdistance);
- 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}$/);
- last if ($nb_host > $max_hosts);
-
- $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 "");
- last if ($thost =~ /^127\.127\.\d{1,3}\.\d{1,3}$/);
- $host = $thost;
-}
-
diff --git a/scripts/ntptrace/Makefile.am b/scripts/ntptrace/Makefile.am
new file mode 100644
index 000000000000..19300e8cb880
--- /dev/null
+++ b/scripts/ntptrace/Makefile.am
@@ -0,0 +1,95 @@
+NULL=
+man1_MANS=
+man8_MANS=
+man_MANS= ntptrace.$(NTPTRACE_MS)
+
+bin_SCRIPTS = $(NTPTRACE_DB)
+libexec_SCRIPTS = $(NTPTRACE_DL)
+sbin_SCRIPTS = $(NTPTRACE_DS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntptrace
+
+EXTRA_DIST = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+DISTCLEANFILES = config.log $(man_MANS)
+
+html_DATA = $(srcdir)/ntptrace.html
+
+noinst_DATA = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+ntptrace: $(srcdir)/ntptrace-opts
+
+$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) ntptrace-opts.def
+
+### Nroff
+
+$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
+ mv $(srcdir)/ntptrace.man.in+ $(srcdir)/ntptrace.man.in
+
+### Mdoc
+
+$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
+ mv $(srcdir)/ntptrace.mdoc.in+ $(srcdir)/ntptrace.mdoc.in
+
+### Manpage (local)
+
+ntptrace.$(NTPTRACE_MS): $(srcdir)/ntptrace.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntptrace.$(NTPTRACE_MS)+:$(srcdir)/ntptrace.$(MANTAGFMT).in
+ mv ntptrace.$(NTPTRACE_MS)+ ntptrace.$(NTPTRACE_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
diff --git a/scripts/ntptrace/Makefile.in b/scripts/ntptrace/Makefile.in
new file mode 100644
index 000000000000..a59e9362b263
--- /dev/null
+++ b/scripts/ntptrace/Makefile.in
@@ -0,0 +1,879 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts/ntptrace
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ntptrace.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ntptrace
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(sbin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+man1_MANS =
+man8_MANS =
+man_MANS = ntptrace.$(NTPTRACE_MS)
+bin_SCRIPTS = $(NTPTRACE_DB)
+libexec_SCRIPTS = $(NTPTRACE_DL)
+sbin_SCRIPTS = $(NTPTRACE_DS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
+ --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
+
+EXTRA_SCRIPTS = ntptrace
+EXTRA_DIST = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+DISTCLEANFILES = config.log $(man_MANS)
+html_DATA = $(srcdir)/ntptrace.html
+noinst_DATA = \
+ ntptrace.1ntptraceman \
+ ntptrace.1ntptracemdoc \
+ ntptrace.mdoc.in \
+ ntptrace.man.in \
+ ntptrace.texi \
+ ntptrace.html \
+ ntptrace-opts.def \
+ ntptrace-opts \
+ invoke-ntptrace.texi \
+ invoke-ntptrace.menu \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/ntptrace/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/ntptrace/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ntptrace: $(top_builddir)/config.status $(srcdir)/ntptrace.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+install-libexecSCRIPTS: $(libexec_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+install-sbinSCRIPTS: $(sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS install-libexecSCRIPTS \
+ install-sbinSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS uninstall-htmlDATA \
+ uninstall-libexecSCRIPTS uninstall-man uninstall-sbinSCRIPTS
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecSCRIPTS install-man install-man1 install-man8 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-sbinSCRIPTS install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-htmlDATA uninstall-libexecSCRIPTS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinSCRIPTS
+
+
+ntptrace: $(srcdir)/ntptrace-opts
+
+$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) ntptrace-opts.def
+
+### Nroff
+
+$(srcdir)/ntptrace.1ntptraceman: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptraceman -Tagman-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.man.in: $(srcdir)/ntptrace.1ntptraceman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptraceman > $(srcdir)/ntptrace.man.in+
+ mv $(srcdir)/ntptrace.man.in+ $(srcdir)/ntptrace.man.in
+
+### Mdoc
+
+$(srcdir)/ntptrace.1ntptracemdoc: $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntptracemdoc -Tagmdoc-cmd.tpl ntptrace-opts.def
+
+$(srcdir)/ntptrace.mdoc.in: $(srcdir)/ntptrace.1ntptracemdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntptrace.1ntptracemdoc > $(srcdir)/ntptrace.mdoc.in+
+ mv $(srcdir)/ntptrace.mdoc.in+ $(srcdir)/ntptrace.mdoc.in
+
+### Manpage (local)
+
+ntptrace.$(NTPTRACE_MS): $(srcdir)/ntptrace.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntptrace.$(NTPTRACE_MS)+:$(srcdir)/ntptrace.$(MANTAGFMT).in
+ mv ntptrace.$(NTPTRACE_MS)+ ntptrace.$(NTPTRACE_MS)
+
+### Texinfo
+
+$(srcdir)/invoke-ntptrace.menu: $(srcdir)/invoke-ntptrace.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntptrace.texi: ntptrace-opts $(srcdir)/ntptrace-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntptrace-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+### HTML
+
+$(srcdir)/ntptrace.html: $(srcdir)/invoke-ntptrace.menu $(srcdir)/invoke-ntptrace.texi $(srcdir)/ntptrace.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntptrace.html ntptrace.texi || true )
+
+# 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/scripts/ntptrace/invoke-ntptrace.menu b/scripts/ntptrace/invoke-ntptrace.menu
new file mode 100644
index 000000000000..bea3b8b23f4d
--- /dev/null
+++ b/scripts/ntptrace/invoke-ntptrace.menu
@@ -0,0 +1 @@
+* ntptrace Invocation:: Invoking ntptrace
diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi
new file mode 100644
index 000000000000..403961774924
--- /dev/null
+++ b/scripts/ntptrace/invoke-ntptrace.texi
@@ -0,0 +1,109 @@
+@node ntptrace Invocation
+@section Invoking ntptrace
+@pindex ntptrace
+@cindex Trace peers of an NTP server
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:07 AM by AutoGen 5.18.5pre4
+# From the definitions ntptrace-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+@code{ntptrace} is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+@example
+% 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'
+@end example
+
+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
+@code{ntptrace}; this is why it is not always zero for "localhost"), 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.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntptrace} program.
+
+@menu
+* ntptrace usage:: ntptrace help/usage (@option{--help})
+* ntptrace numeric:: numeric option (-n)
+* ntptrace max-hosts:: max-hosts option (-m)
+* ntptrace host:: host option (-r)
+* ntptrace exit status:: exit status
+@end menu
+
+@node ntptrace usage
+@subsection ntptrace help/usage (@option{--help})
+@cindex ntptrace help
+
+This is the automatically generated usage text for ntptrace.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+@end example
+@exampleindent 4
+
+@node ntptrace numeric
+@subsection numeric option (-n)
+@cindex ntptrace-numeric
+
+This is the ``print ip addresses instead of hostnames'' option.
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+@node ntptrace max-hosts
+@subsection max-hosts option (-m)
+@cindex ntptrace-max-hosts
+
+This is the ``maximum number of peers to trace'' option.
+This option takes a number argument.
+This option has no @samp{doc} documentation.
+@node ntptrace host
+@subsection host option (-r)
+@cindex ntptrace-host
+
+This is the ``single remote host'' option.
+This option takes a string argument.
+This option has no @samp{doc} documentation.
+@node ntptrace exit status
+@subsection ntptrace exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@end table
diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts
new file mode 100644
index 000000000000..65b6e277a2c8
--- /dev/null
+++ b/scripts/ntptrace/ntptrace-opts
@@ -0,0 +1,62 @@
+# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:02 AM by AutoGen 5.18.5pre4
+# From the definitions ntptrace-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'numeric' => '',
+ 'max-hosts' => '99',
+ 'host' => '127.0.0.1',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '[host]';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'numeric|n', 'max-hosts|m=i', 'host|r=s',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/ntptrace/ntptrace-opts.def b/scripts/ntptrace/ntptrace-opts.def
new file mode 100644
index 000000000000..81ddda3b209a
--- /dev/null
+++ b/scripts/ntptrace/ntptrace-opts.def
@@ -0,0 +1,69 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+//#include copyright.def
+#include autogen-version.def
+
+prog-name = 'ntptrace';
+prog-title = 'Trace peers of an NTP server';
+package = ntp;
+#include version.def
+argument = '[host]';
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = numeric;
+ value = n;
+ descrip = 'Print IP addresses instead of hostnames';
+ doc = <<- _EndOfDoc_
+ Output hosts as dotted-quad numeric format rather than converting to
+ the canonical host names.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = max-hosts;
+ value = m;
+ arg-type = number;
+ arg-default = 99;
+ descrip = 'Maximum number of peers to trace';
+};
+
+flag = {
+ name = host;
+ value = r;
+ arg-type = string;
+ arg-default = '127.0.0.1';
+ descrip = 'Single remote host';
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+@code{ntptrace} is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+@example
+% 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'
+@end example
+
+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
+@code{ntptrace}; this is why it is not always zero for "localhost"), 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.
+ _END_PROG_MDOC_DESCRIP;
+};
diff --git a/scripts/ntptrace/ntptrace.1ntptraceman b/scripts/ntptrace/ntptrace.1ntptraceman
new file mode 100644
index 000000000000..aa4e63370483
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.1ntptraceman
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntptrace 1ntptraceman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ryayX3/ag-EyaGW3)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:04 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntptrace\fP
+\- Trace peers of an NTP server
+.SH SYNOPSIS
+\f\*[B-Font]ntptrace\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[host]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.br
+.in +4
+.nf
+% 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'
+.in -4
+.fi
+.sp
+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
+\fBntptrace\fP; this is why it is not always zero for "localhost"), 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.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-max\-hosts\f[]=\f\*[I-Font]number\f[]
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Single remote host.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.1ntptracemdoc b/scripts/ntptrace/ntptrace.1ntptracemdoc
new file mode 100644
index 000000000000..17c0c788815f
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.1ntptracemdoc
@@ -0,0 +1,91 @@
+.Dd December 19 2014
+.Dt NTPTRACE 1ntptracemdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntptrace
+.Nd Trace peers of an NTP server
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[host]
+.Pp
+.Sh DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.Bd -literal -offset indent
+% 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'
+.Ed
+.sp
+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
+\fBntptrace\fP; this is why it is not always zero for "localhost"), 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.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-numeric
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted\-quad numeric format rather than converting to
+the canonical host names.
+.It Fl m Ar number , Fl \-max\-hosts Ns = Ns Ar number
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.It Fl r Ar string , Fl \-host Ns = Ns Ar string
+Single remote host.
+The default
+.Ar string
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html
new file mode 100644
index 000000000000..a0323a94ebec
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.html
@@ -0,0 +1,180 @@
+<html lang="en">
+<head>
+<title>Ntptrace User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Ntptrace User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Ntptrace User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-Description">ntptrace Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>ntptrace</code> program.
+This document applies to version 4.2.8 of <code>ntptrace</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Simple Network Time Protocol User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntptrace-Description">ntptrace Description</a>: Description
+<li><a accesskey="2" href="#ntptrace-Invocation">ntptrace Invocation</a>: Invoking ntptrace
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntptrace-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-Description">ntptrace Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntptrace</h3>
+
+<p><a name="index-ntptrace-1"></a><a name="index-Trace-peers-of-an-NTP-server-2"></a>
+<code>ntptrace</code> is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+
+ <p>If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+
+<pre class="example"> % 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
+<code>ntptrace</code>; this is why it is not always zero for "localhost"), 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>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntptrace</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntptrace-usage">ntptrace usage</a>: ntptrace help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntptrace-numeric">ntptrace numeric</a>: numeric option (-n)
+<li><a accesskey="3" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>: max-hosts option (-m)
+<li><a accesskey="4" href="#ntptrace-host">ntptrace host</a>: host option (-r)
+<li><a accesskey="5" href="#ntptrace-exit-status">ntptrace exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntptrace-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-numeric">ntptrace numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntptrace help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntptrace-help-3"></a>
+This is the automatically generated usage text for ntptrace.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.2.8
+USAGE: ntptrace [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [host]
+
+ -n, --numeric Print IP addresses instead of hostnames
+ -m, --max-hosts=num Maximum number of peers to trace
+ -r, --host=str Single remote host
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntptrace-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-usage">ntptrace usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">numeric option (-n)</h4>
+
+<p><a name="index-ntptrace_002dnumeric-4"></a>
+This is the &ldquo;print ip addresses instead of hostnames&rdquo; option.
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+<div class="node">
+<p><hr>
+<a name="ntptrace-max_002dhosts"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-host">ntptrace host</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-numeric">ntptrace numeric</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">max-hosts option (-m)</h4>
+
+<p><a name="index-ntptrace_002dmax_002dhosts-5"></a>
+This is the &ldquo;maximum number of peers to trace&rdquo; option.
+This option takes a number argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntptrace-host"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntptrace-exit-status">ntptrace exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-max_002dhosts">ntptrace max-hosts</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">host option (-r)</h4>
+
+<p><a name="index-ntptrace_002dhost-6"></a>
+This is the &ldquo;single remote host&rdquo; option.
+This option takes a string argument.
+This option has no <span class="samp">doc</span> documentation.
+<div class="node">
+<p><hr>
+<a name="ntptrace-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntptrace-host">ntptrace host</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntptrace-Invocation">ntptrace Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntptrace exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/ntptrace/ntptrace.in b/scripts/ntptrace/ntptrace.in
new file mode 100755
index 000000000000..7cc5ce7f7224
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.in
@@ -0,0 +1,80 @@
+#! @PATH_PERL@ -w
+# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
+
+package ntptrace;
+use 5.006_000;
+use strict;
+use lib "@PERLLIBDIR@";
+use NTP::Util qw(ntp_read_vars do_dns);
+
+exit run(@ARGV) unless caller;
+
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
+ };
+
+ my $dodns = $opts->{numeric} ? 0 : 1;
+ my $max_hosts = $opts->{'max-hosts'};
+ my $host = shift || $opts->{host};
+ my $nb_host = 0;
+
+ for (;;) {
+ $nb_host++;
+
+ my %info = get_info($host);
+ last if not %info;
+
+ my $dhost = $host;
+ if ($dodns) {
+ my $name = do_dns($host);
+ $dhost = $name if defined $name;
+ }
+
+ printf "%s: stratum %d, offset %f, synch distance %f",
+ $dhost, $info{stratum}, $info{offset}, $info{syncdistance};
+ printf ", refid '%s'", $info{refid} if $info{stratum} == 1;
+ print "\n";
+
+ last if $info{stratum} == 0 || $info{stratum} == 1 ||
+ $info{stratum} == 16;
+ last if $info{refid} =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
+ last if $nb_host == $max_hosts;
+
+ my $next_host = get_next_host($info{peer}, $host);
+ last if $next_host eq '';
+ last if $next_host =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
+
+ $host = $next_host;
+ }
+ return 0;
+}
+
+sub get_info {
+ my ($host) = @_;
+ my ($rootdelay, $rootdisp, $info) = (0, 0);
+
+ $info = ntp_read_vars(0, [], $host);
+ return if not defined $info;
+ return if not exists $info->{stratum};
+
+ $info->{offset} /= 1000;
+ $info->{syncdistance} = ($info->{rootdisp} + ($info->{rootdelay} / 2)) / 1000;
+
+ return %$info;
+}
+
+
+sub get_next_host {
+ my ($peer, $host) = @_;
+
+ my $info = ntp_read_vars($peer, [qw(srcadr)], $host);
+ return if not defined $info;
+ return $info->{srcadr};
+}
+
+@ntptrace_opts@
+
+1;
+__END__
diff --git a/scripts/ntptrace/ntptrace.man.in b/scripts/ntptrace/ntptrace.man.in
new file mode 100644
index 000000000000..dc13ce06a794
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.man.in
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntptrace @NTPTRACE_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-ryayX3/ag-EyaGW3)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:04 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntptrace\fP
+\- Trace peers of an NTP server
+.SH SYNOPSIS
+\f\*[B-Font]ntptrace\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[host]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.br
+.in +4
+.nf
+% 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'
+.in -4
+.fi
+.sp
+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
+\fBntptrace\fP; this is why it is not always zero for "localhost"), 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.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted-quad numeric format rather than converting to
+the canonical host names.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-max\-hosts\f[]=\f\*[I-Font]number\f[]
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-host\f[]=\f\*[I-Font]string\f[]
+Single remote host.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-v\f[] [{\f\*[I-Font]v|c|n\f[] \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.mdoc.in b/scripts/ntptrace/ntptrace.mdoc.in
new file mode 100644
index 000000000000..975a55c18491
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.mdoc.in
@@ -0,0 +1,91 @@
+.Dd December 19 2014
+.Dt NTPTRACE @NTPTRACE_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:09 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntptrace-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntptrace
+.Nd Trace peers of an NTP server
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[host]
+.Pp
+.Sh DESCRIPTION
+\fBntptrace\fP is a perl script that uses the ntpq utility program to follow
+the chain of NTP servers from a given host back to the primary time source. For
+ntptrace to work properly, each of these servers must implement the NTP Control
+and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.
+.sp
+If given no arguments, ntptrace starts with localhost. Here is an example of
+the output from ntptrace:
+.sp
+.Bd -literal -offset indent
+% 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'
+.Ed
+.sp
+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
+\fBntptrace\fP; this is why it is not always zero for "localhost"), 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.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl n , Fl \-numeric
+Print IP addresses instead of hostnames.
+.sp
+Output hosts as dotted\-quad numeric format rather than converting to
+the canonical host names.
+.It Fl m Ar number , Fl \-max\-hosts Ns = Ns Ar number
+Maximum number of peers to trace.
+This option takes an integer number as its argument.
+The default
+.Ar number
+for this option is:
+.ti +4
+ 99
+.sp
+This option has not been fully documented.
+.It Fl r Ar string , Fl \-host Ns = Ns Ar string
+Single remote host.
+The default
+.Ar string
+for this option is:
+.ti +4
+ 127.0.0.1
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBntptrace\fP
+option definitions.
diff --git a/scripts/ntptrace/ntptrace.texi b/scripts/ntptrace/ntptrace.texi
new file mode 100644
index 000000000000..b1851f2a827b
--- /dev/null
+++ b/scripts/ntptrace/ntptrace.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntptrace.info
+@settitle Ntptrace User's Manual
+@include ../../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{ntptrace},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* ntptrace: (ntptrace). Trace the ntp server to the primary time source.
+@end direntry
+
+@titlepage
+@title ntptrace User's Manual
+@subtitle ntptrace, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, ntptrace Description, (dir), (dir)
+@top Simple Network Time Protocol User Manual
+
+This document describes the use of the NTP Project's @code{ntptrace} program.
+This document applies to version @value{VERSION} of @code{ntptrace}.
+
+@shortcontents
+
+@menu
+* ntptrace Description:: Description
+* ntptrace Invocation:: Invoking ntptrace
+@end menu
+
+@include invoke-ntptrace.texi
diff --git a/scripts/ntpver.in b/scripts/ntpver.in
index be36897c46f7..9615e66d61c6 100644
--- a/scripts/ntpver.in
+++ b/scripts/ntpver.in
@@ -1,7 +1,7 @@
-#!@PATH_SH@
+#!@CONFIG_SHELL@
# 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 }'
+ntpq -c "rv 0 daemon_version" $* | @AWK@ '/daemon_version/ { print $2 }'
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts
new file mode 100644
index 000000000000..a7fd55bf367f
--- /dev/null
+++ b/scripts/plot_summary-opts
@@ -0,0 +1,73 @@
+# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:11 AM by AutoGen 5.18.5pre4
+# From the definitions plot_summary-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'directory' => '/tmp',
+ 'identifier' => '',
+ 'offset-limit' => '0.128',
+ 'peer' => [],
+ 'plot-term' => '',
+ 'output-file' => '',
+ 'dont-wait' => '',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'directory=s', 'identifier=s', 'offset-limit=f',
+ 'peer=s', 'plot-term=s', 'output-file=s',
+ 'dont-wait',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/plot_summary-opts.def b/scripts/plot_summary-opts.def
new file mode 100644
index 000000000000..61f028bce4e6
--- /dev/null
+++ b/scripts/plot_summary-opts.def
@@ -0,0 +1,83 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'plot_summary';
+prog-title = 'plot statistics generated by summary script';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = directory;
+ arg-type = string;
+ arg-default = '/tmp';
+ descrip = 'Where the summary files are';
+ doc = <<- _EndOfDoc_
+ The directory where the @code{plot_summary} will search for the
+ *_summary files generated by @code{summary} script.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = identifier;
+ arg-type = string;
+ descrip = 'Origin of the data';
+ doc = <<- _EndOfDoc_
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+ _EndOfDoc_;
+};
+
+flag = {
+ name = offset-limit;
+ arg-type = string;
+ arg-name = float;
+ arg-default = "0.128";
+ descrip = 'Limit of absolute offset';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peer;
+ arg-type = string;
+ stack-arg;
+ max = NOLIMIT;
+ descrip = 'Peers to generate plots for';
+ doc = <<- _EndOfDoc_
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = plot-term;
+ arg-type = string;
+ descrip = 'Gnuplot terminal';
+ doc = <<- _EndOfDoc_
+ This is string is passed directly to the @code{gnuplot set terminal}
+ command. Default is @code{x11} if @code{DISPLAY} is set and
+ @code{dumb} is it's not'. See output from @code(gnuplot -e "set
+ terminal") for the list of avalaible options.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = output-file;
+ arg-type = str;
+ descrip = 'Output file';
+ doc = <<- _EndOfDoc_
+ Output file for @code{gnuplot}, default to stdout.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = dont-wait;
+ descrip = "Don't wait for keystroke between plots";
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
diff --git a/scripts/plot_summary.1plot_summaryman b/scripts/plot_summary.1plot_summaryman
new file mode 100644
index 000000000000..3fa391531dd1
--- /dev/null
+++ b/scripts/plot_summary.1plot_summaryman
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH plot_summary 1plot_summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nJa4Z5/ag-AJaaZ5)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:17 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]plot_summary\fP
+\- plot statistics generated by summary script
+.SH SYNOPSIS
+\f\*[B-Font]plot_summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH "DESCRIPTION"
+There is no description for this command.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Where the summary files are.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.TP
+.NOP \f\*[B-Font]\-\-identifier\f[]=\f\*[I-Font]string\f[]
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.TP
+.NOP \f\*[B-Font]\-\-offset\-limit\f[]=\f\*[I-Font]float\f[]
+Limit of absolute offset.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 0.128
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-peer\f[]=\f\*[I-Font]string\f[]
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.TP
+.NOP \f\*[B-Font]\-\-plot\-term\f[]=\f\*[I-Font]string\f[]
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.TP
+.NOP \f\*[B-Font]\-\-output\-file\f[]=\f\*[I-Font]str\f[]
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.1plot_summarymdoc b/scripts/plot_summary.1plot_summarymdoc
new file mode 100644
index 000000000000..639786eb6b30
--- /dev/null
+++ b/scripts/plot_summary.1plot_summarymdoc
@@ -0,0 +1,88 @@
+.Dd December 19 2014
+.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm plot_summary
+.Nd plot statistics generated by summary script
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh "DESCRIPTION"
+There is no description for this command.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Where the summary files are.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.It Fl \-identifier Ns = Ns Ar string
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.It Fl \-offset\-limit Ns = Ns Ar float
+Limit of absolute offset.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 0.128
+.sp
+.It Fl \-peer Ns = Ns Ar string
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.It Fl \-plot\-term Ns = Ns Ar string
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.It Fl \-output\-file Ns = Ns Ar str
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html
new file mode 100644
index 000000000000..ff3e3f197581
--- /dev/null
+++ b/scripts/plot_summary.html
@@ -0,0 +1,207 @@
+<html lang="en">
+<head>
+<title>Plot_summary User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Plot_summary User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Plot_summary User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-Description">plot_summary Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Plot_summary User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>plot_summary</code> program.
+This document applies to version 4.2.8 of <code>plot_summary</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Plot_summary User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#plot_005fsummary-Description">plot_summary Description</a>: Description
+<li><a accesskey="2" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>: Invoking plot_summary
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-Description">plot_summary Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking plot_summary</h3>
+
+<p><a name="index-plot_005fsummary-1"></a><a name="index-plot-statistics-generated-by-summary-script-2"></a>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>plot_summary</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#plot_005fsummary-usage">plot_summary usage</a>: plot_summary help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#plot_005fsummary-directory">plot_summary directory</a>: directory option
+<li><a accesskey="3" href="#plot_005fsummary-identifier">plot_summary identifier</a>: identifier option
+<li><a accesskey="4" href="#plot_005fsummary-peer">plot_summary peer</a>: peer option
+<li><a accesskey="5" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>: plot-term option
+<li><a accesskey="6" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>: output-file option
+<li><a accesskey="7" href="#plot_005fsummary-exit-status">plot_summary exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-directory">plot_summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot_summary help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-plot_005fsummary-help-3"></a>
+This is the automatically generated usage text for plot_summary.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.2.8
+USAGE: plot_summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ --directory=str Where the summary files are
+ --identifier=str Origin of the data
+ --offset-limit=float Limit of absolute offset
+ --peer=str Peers to generate plots for
+ - may appear multiple times
+ --plot-term=str Gnuplot terminal
+ --output-file=str Output file
+ --dont-wait Don't wait for keystroke between plots
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="plot_005fsummary-directory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-identifier">plot_summary identifier</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-usage">plot_summary usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">directory option</h4>
+
+<p><a name="index-plot_005fsummary_002ddirectory-4"></a>
+This is the &ldquo;where the summary files are&rdquo; option.
+This option takes a string argument.
+ The directory where the <code>plot_summary</code> will search for the
+ *_summary files generated by <code>summary</code> script.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-identifier"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-peer">plot_summary peer</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-directory">plot_summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">identifier option</h4>
+
+<p><a name="index-plot_005fsummary_002didentifier-5"></a>
+This is the &ldquo;origin of the data&rdquo; option.
+This option takes a string argument.
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-peer"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-identifier">plot_summary identifier</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">peer option</h4>
+
+<p><a name="index-plot_005fsummary_002dpeer-6"></a>
+This is the &ldquo;peers to generate plots for&rdquo; option.
+This option takes a string argument.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>may appear an unlimited number of times.
+</ul>
+
+ <p>By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-plot_002dterm"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-peer">plot_summary peer</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot-term option</h4>
+
+<p><a name="index-plot_005fsummary_002dplot_002dterm-7"></a>
+This is the &ldquo;gnuplot terminal&rdquo; option.
+This option takes a string argument.
+ This is string is passed directly to the <code>gnuplot set terminal</code>
+ command. Default is <code>x11</code> if <code>DISPLAY</code> is set and
+ <code>dumb</code> is it's not'. See output from -e "set
+ terminal") for the list of avalaible options.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-output_002dfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#plot_005fsummary-exit-status">plot_summary exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-plot_002dterm">plot_summary plot-term</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">output-file option</h4>
+
+<p><a name="index-plot_005fsummary_002doutput_002dfile-8"></a>
+This is the &ldquo;output file&rdquo; option.
+This option takes a str argument.
+ Output file for <code>gnuplot</code>, default to stdout.
+<div class="node">
+<p><hr>
+<a name="plot_005fsummary-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#plot_005fsummary-output_002dfile">plot_summary output-file</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#plot_005fsummary-Invocation">plot_summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">plot_summary exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/plot_summary.in b/scripts/plot_summary.in
index 3b46a0401159..3401b0d0b8b8 100644
--- a/scripts/plot_summary.in
+++ b/scripts/plot_summary.in
@@ -19,53 +19,48 @@
# 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"
+package plot_summary;
+use 5.006_000;
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 ($identifier, $offset_limit, $gnuplot_terminal, $wait_after_plot,
+ $output_file, $output_file_number);
-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,
- );
+exit run(@ARGV) unless caller;
-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";
+sub run {
+ my $opts;
+ if (!processOptions(\@_, $opts)) {
+ usage(1);
}
- print STDERR "\n";
- die;
-}
-chomp $identifier;
-die "illegal offset-limit: $offset_limit" unless $offset_limit > 0.0;
-$offset_limit *= 1e6; # scale to microseconds
+ $identifier = $opts->{'identifier'};
+ if (!$identifier) {
+ $identifier = "host".`hostname`;
+ chomp $identifier;
+ }
+ $offset_limit = $opts->{'offset-limit'};
+ $output_file = $opts->{'output-file'};
+ $output_file_number = 1;
+ $gnuplot_terminal = $opts->{'plot-terminal'}
+ || ( $ENV{DISPLAY} ? "x11" : "dumb" );
+ $wait_after_plot = !$opts->{'dont-wait'};
+
+ die "illegal offset-limit: $offset_limit" unless $offset_limit > 0.0;
+ $offset_limit *= 1e6; # scale to microseconds
+
+ my $summary_dir = $opts->{'directory'};
+
+ my $loop_summary ="$summary_dir/loop_summary";
+ my $peer_summary ="$summary_dir/peer_summary";
+ my $clock_summary="$summary_dir/clock_summary";
+
+ my @peer_list = @{$opts->{'peer'}};
+
+ do_loop($loop_summary);
+ do_peer($peer_summary, $_) for @peer_list;
+}
# return the smallest value in the given list
sub min
@@ -176,7 +171,7 @@ sub do_loop
"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 style data yerrorbars\n";
print "set multiplot\n";
print "set size 1, 0.5\n";
print "set lmargin 8\n";
@@ -224,7 +219,7 @@ sub do_loop
print "set xlabel\n";
print "set ylabel \"[us]\"\n";
print "set origin 0, 0.5\n";
- print "set data style linespoints\n";
+ print "set style data linespoints\n";
print "set multiplot\n";
print "plot $ylimit \"$out_file\" using 1:6 title \"Offset\", ";
print "\"$out_file\" using 1:6 smooth bezier " .
@@ -296,7 +291,7 @@ sub do_peer
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 style data 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 " .
@@ -328,10 +323,7 @@ sub do_peer
unlink $out_file;
}
+@plot_summary_opts@
-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;
+1;
+__END__
diff --git a/scripts/plot_summary.man.in b/scripts/plot_summary.man.in
new file mode 100644
index 000000000000..3fa391531dd1
--- /dev/null
+++ b/scripts/plot_summary.man.in
@@ -0,0 +1,114 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH plot_summary 1plot_summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-nJa4Z5/ag-AJaaZ5)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:17 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]plot_summary\fP
+\- plot statistics generated by summary script
+.SH SYNOPSIS
+\f\*[B-Font]plot_summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH "DESCRIPTION"
+There is no description for this command.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Where the summary files are.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.TP
+.NOP \f\*[B-Font]\-\-identifier\f[]=\f\*[I-Font]string\f[]
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.TP
+.NOP \f\*[B-Font]\-\-offset\-limit\f[]=\f\*[I-Font]float\f[]
+Limit of absolute offset.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 0.128
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-peer\f[]=\f\*[I-Font]string\f[]
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.TP
+.NOP \f\*[B-Font]\-\-plot\-term\f[]=\f\*[I-Font]string\f[]
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.TP
+.NOP \f\*[B-Font]\-\-output\-file\f[]=\f\*[I-Font]str\f[]
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.TP
+.NOP \f\*[B-Font]\-\-dont\-wait\f[]
+Don't wait for keystroke between plots.
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.mdoc.in b/scripts/plot_summary.mdoc.in
new file mode 100644
index 000000000000..639786eb6b30
--- /dev/null
+++ b/scripts/plot_summary.mdoc.in
@@ -0,0 +1,88 @@
+.Dd December 19 2014
+.Dt PLOT_SUMMARY 1plot_summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:19 AM by AutoGen 5.18.5pre4
+.\" From the definitions plot_summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm plot_summary
+.Nd plot statistics generated by summary script
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh "DESCRIPTION"
+There is no description for this command.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Where the summary files are.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The directory where the \fBplot_summary\fP will search for the
+ *_summary files generated by \fBsummary\fP script.
+.It Fl \-identifier Ns = Ns Ar string
+Origin of the data.
+.sp
+ Where does the plotted data come from, default to string "host" plus
+ current hostname
+.It Fl \-offset\-limit Ns = Ns Ar float
+Limit of absolute offset.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 0.128
+.sp
+.It Fl \-peer Ns = Ns Ar string
+Peers to generate plots for.
+This option may appear an unlimited number of times.
+.sp
+ By default the peer_summary plots are not generated. Use this option to
+ specify list of peers if you want to generate plots for them.
+.It Fl \-plot\-term Ns = Ns Ar string
+Gnuplot terminal.
+.sp
+ This is string is passed directly to the \fBgnuplot set terminal\fP
+ command. Default is \fBx11\fP if \fBDISPLAY\fP is set and
+ \fBdumb\fP is it's not'. See output from @code(gnuplot \-e "set
+ terminal") for the list of avalaible options.
+.It Fl \-output\-file Ns = Ns Ar str
+Output file.
+.sp
+ Output file for \fBgnuplot\fP, default to stdout.
+.It Fl \-dont\-wait
+Don't wait for keystroke between plots.
+.sp
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBplot_summary\fP
+option definitions.
diff --git a/scripts/plot_summary.texi b/scripts/plot_summary.texi
new file mode 100644
index 000000000000..33fa1fdc8cdd
--- /dev/null
+++ b/scripts/plot_summary.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename plot_summary.info
+@settitle Plot_summary User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{plot_summary},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* plot_summary: (plot_summary). Summarize (something)
+@end direntry
+
+@titlepage
+@title plot_summary User's Manual
+@subtitle plot_summary, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, plot_summary Description, (dir), (dir)
+@top Plot_summary User Manual
+
+This document describes the use of the NTP Project's @code{plot_summary} program.
+This document applies to version @value{VERSION} of @code{plot_summary}.
+
+@shortcontents
+
+@menu
+* plot_summary Description:: Description
+* plot_summary Invocation:: Invoking plot_summary
+@end menu
+
+@include invoke-plot_summary.texi
diff --git a/scripts/rc/README b/scripts/rc/README
new file mode 100644
index 000000000000..f5b82bcbc679
--- /dev/null
+++ b/scripts/rc/README
@@ -0,0 +1,13 @@
+This directory contains some example rc scripts for ntpd.
+
+In general, ntpd should be started as soon as possible in the boot process. If
+any services require stable system clock, the ntpwait script should be run
+before them as late as possible.
+
+The rc.d contains scripts for systems using rc.d init system (originated in
+NetBSD). If a service requires stable system time, indicate it with TIMESYNC
+dependency and set ntpwait_enable to YES.
+
+For SysV init systems, you'll have to create links as /etc/rc2.d/S20ntpd and
+/etc/rc2.d/S80ntpwait yourself. (The numbers are just examples, try to give
+ntpd as much time as possible to synchronize before running ntpwait).
diff --git a/scripts/rc/ntpd b/scripts/rc/ntpd
new file mode 100644
index 000000000000..9896247e77a0
--- /dev/null
+++ b/scripts/rc/ntpd
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+NTPD=/usr/sbin/ntpd
+PIDFILE=/var/run/ntpd.pid
+USER=ntp
+GROUP=ntp
+NTPD_OPTS="-g -u $USER:$GROUP -p $PIDFILE"
+
+ntpd_start() {
+ if [ -r $PIDFILE ]; then
+ echo "ntpd seems to be already running under pid `cat $PIDFILE`."
+ echo "Delete $PIDFILE if this is not the case.";
+ return 1;
+ fi
+ echo -n "Starting NTP daemon... "
+
+ $NTPD $NTPD_OPTS
+
+ # You can't always rely on the ntpd exit code, see Bug #2420
+ # case "$?" in
+ # 0) echo "OK!"
+ # return 0;;
+ # *) echo "FAILED!"
+ # return 1;;
+ # esac
+
+ sleep 1
+
+ if ps -Ao args|grep -q "^$NTPD $NTPD_OPTS"; then
+ echo "OK!"
+ return 0
+ else
+ echo "FAILED!"
+ [ -e $PIDFILE ] && rm $PIDFILE
+ return 1
+ fi
+}
+
+ntpd_stop() {
+ if [ ! -r $PIDFILE ]; then
+ echo "ntpd doesn't seem to be running, cannot read the pid file."
+ return 1;
+ fi
+ echo -n "Stopping NTP daemon...";
+ PID=`cat $PIDFILE`
+
+ if kill -TERM $PID 2> /dev/null;then
+ # Give ntp 15 seconds to exit
+ for i in `seq 1 15`; do
+ if [ -n "`ps -p $PID|grep -v PID`" ]; then
+ echo -n .
+ sleep 1
+ else
+ echo " OK!"
+ rm $PIDFILE
+ return 0
+ fi
+ done
+ fi
+
+ echo " FAILED! ntpd is still running";
+ return 1
+}
+
+ntpd_status() {
+ if [ -r $PIDFILE ]; then
+ echo "NTP daemon is running as `cat $PIDFILE`"
+ else
+ echo "NTP daemon is not running"
+ fi
+}
+
+case "$1" in
+ 'start')
+ ntpd_start
+ ;;
+ 'stop')
+ ntpd_stop
+ ;;
+ 'restart')
+ ntpd_stop && ntpd_start
+ ;;
+ 'status')
+ ntpd_status
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart|status)"
+esac
diff --git a/scripts/rc/ntpwait b/scripts/rc/ntpwait
new file mode 100644
index 000000000000..2542b2add9e6
--- /dev/null
+++ b/scripts/rc/ntpwait
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+NTPWAIT=/usr/sbin/ntpwait
+
+ntpwait_start() {
+ $NTPWAIT -v
+}
+
+case "$1" in
+ 'start')
+ ntpwait_start
+ ;;
+ *)
+ echo "Usage: $0 (start)"
+esac
diff --git a/scripts/rc/rc.d/TIMESYNC b/scripts/rc/rc.d/TIMESYNC
new file mode 100644
index 000000000000..a8c074fd4865
--- /dev/null
+++ b/scripts/rc/rc.d/TIMESYNC
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# PROVIDE: TIMESYNC
+# REQUIRE: LOGIN ntpwait
+
+# This depedency ensures that all services which require stable system clock
+# are run after ntpd is synchronized. It's run as late as possible, if you need
+# stable clock before login use BEFORE: LOGIN
diff --git a/scripts/rc/rc.d/ntpd b/scripts/rc/rc.d/ntpd
new file mode 100644
index 000000000000..ea33458bc9b7
--- /dev/null
+++ b/scripts/rc/rc.d/ntpd
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# PROVIDE: ntpd
+# REQUIRE: syslogd cleanvar devfs
+# BEFORE: SERVERS
+
+. /etc/rc.subr
+
+name="ntpd"
+rcvar="ntpd_enable"
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd="ntpd_precmd"
+
+load_rc_config $name
+
+ntpd_precmd()
+{
+ rc_flags="-c ${ntpd_config} ${ntpd_flags}"
+
+ if checkyesno ntpd_sync_on_start; then
+ rc_flags="-g $rc_flags"
+ fi
+
+ if [ -z "$ntpd_chrootdir" ]; then
+ return 0;
+ fi
+
+ rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
+}
+
+run_rc_command "$1"
diff --git a/scripts/rc/rc.d/ntpwait b/scripts/rc/rc.d/ntpwait
new file mode 100644
index 000000000000..891d0dbd6cb6
--- /dev/null
+++ b/scripts/rc/rc.d/ntpwait
@@ -0,0 +1,21 @@
+#!/bin/sh
+# This script, when run, runs ntp-wait if ntpd is enabled.
+
+# PROVIDE: ntpwait
+
+. /etc/rc.subr
+
+name="ntpwait"
+rcvar="ntpwait_enable"
+start_cmd="ntpwait_start"
+ntp_wait="/usr/sbin/ntp-wait"
+
+load_rc_config "$name"
+
+ntpwait_start() {
+ if checkyesno ntpd_enable; then
+ $ntp_wait -v
+ fi
+}
+
+run_rc_command "$1"
diff --git a/scripts/rc1/postinstall b/scripts/rc1/postinstall
deleted file mode 100644
index d84b8c517211..000000000000
--- a/scripts/rc1/postinstall
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp start
diff --git a/scripts/rc1/preinstall b/scripts/rc1/preinstall
deleted file mode 100644
index aa18639c2fe6..000000000000
--- a/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/scripts/rc1/preremove b/scripts/rc1/preremove
deleted file mode 100644
index b870151a27b4..000000000000
--- a/scripts/rc1/preremove
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-/etc/init.d/xntp stop
-
-exit 0
diff --git a/scripts/rc1/prototype b/scripts/rc1/prototype
deleted file mode 100644
index 3de20b076b8c..000000000000
--- a/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/scripts/rc1/xntp b/scripts/rc1/xntp
deleted file mode 100644
index 227b943aaa2e..000000000000
--- a/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/scripts/rc2/local.ntpd b/scripts/rc2/local.ntpd
deleted file mode 100644
index ba53e05adbbb..000000000000
--- a/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/scripts/summary-opts b/scripts/summary-opts
new file mode 100644
index 000000000000..edd3b3945087
--- /dev/null
+++ b/scripts/summary-opts
@@ -0,0 +1,69 @@
+# EDIT THIS FILE WITH CAUTION (summary-opts)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:45:13 AM by AutoGen 5.18.5pre4
+# From the definitions summary-opts.def
+# and the template file perlopt
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ 'directory' => '/var/log/ntp',
+ 'end-date' => '',
+ 'output-directory' => '/tmp',
+ 'peer-dist-limit' => '400',
+ 'skip-time-steps' => '3600',
+ 'start-date' => '19700101',
+ 'help' => '', 'more-help' => ''
+ };
+ my $argument = '';
+ my $ret = GetOptionsFromArray($args, $opts, (
+ 'directory=s', 'end-date=i', 'output-directory=s',
+ 'peer-dist-limit=f', 'skip-time-steps=f', 'start-date=i',
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/scripts/summary-opts.def b/scripts/summary-opts.def
new file mode 100644
index 000000000000..82c31eb24817
--- /dev/null
+++ b/scripts/summary-opts.def
@@ -0,0 +1,82 @@
+/* -*- Mode: Text -*- */
+AutoGen Definitions perlopt;
+
+#include autogen-version.def
+
+prog-name = 'summary';
+prog-title = 'compute various stastics from NTP stat files';
+package = ntp;
+#include version.def
+
+long-opts;
+gnu-usage;
+
+flag = {
+ name = directory;
+ arg-type = string;
+ arg-default = '/var/log/ntp';
+ descrip = 'Directory containing stat files';
+ doc = <<- _EndOfDoc_
+ The directory where @code{ntpd} will search for .stat files generated
+ by @code{ntpd}.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = end-date;
+ arg-type = number;
+ descrip = 'End date';
+ doc = <<- _EndOfDoc_
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use @code{date -u +%Y%m%d})
+ to get the timestamp.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = output-directory;
+ arg-type = str;
+ arg-default = '/tmp';
+ descrip = 'Output directory';
+ doc = <<- _EndOfDoc_
+ The output directory @code{summary} will write all output files to.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = peer-dist-limit;
+ arg-type = string;
+ arg-name = float;
+ arg-default = 400;
+ descrip = 'Peer dist limit';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = skip-time-steps;
+ arg-type = string;
+ arg-name = float;
+ arg-default = 3600;
+ descrip = 'Ignore time offsets larger that this';
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = start-date;
+ arg-type = num;
+ arg-default = 19700101;
+ descrip = 'Start date';
+ doc = <<- _EndOfDoc_
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+ _EndOfDoc_;
+};
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'texi';
+ ds-text = <<- _EndOfDoc
+ _EndOfDoc;
+};
diff --git a/scripts/summary.1summaryman b/scripts/summary.1summaryman
new file mode 100644
index 000000000000..36680b8cc5ce
--- /dev/null
+++ b/scripts/summary.1summaryman
@@ -0,0 +1,123 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH summary 1summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-A3aGb6/ag-M3aOa6)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:22 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]summary\fP
+\- compute various stastics from NTP stat files
+.SH SYNOPSIS
+\f\*[B-Font]summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+.sp
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Directory containing stat files.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.TP
+.NOP \f\*[B-Font]\-\-end\-date\f[]=\f\*[I-Font]number\f[]
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.TP
+.NOP \f\*[B-Font]\-\-output\-directory\f[]=\f\*[I-Font]str\f[]
+Output directory.
+The default
+\f\*[I-Font]str\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.TP
+.NOP \f\*[B-Font]\-\-peer\-dist\-limit\f[]=\f\*[I-Font]float\f[]
+Peer dist limit.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 400
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-skip\-time\-steps\f[]=\f\*[I-Font]float\f[]
+Ignore time offsets larger that this.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 3600
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-start\-date\f[]=\f\*[I-Font]num\f[]
+Start date.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]num\f[]
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.1summarymdoc b/scripts/summary.1summarymdoc
new file mode 100644
index 000000000000..603eea825fdc
--- /dev/null
+++ b/scripts/summary.1summarymdoc
@@ -0,0 +1,98 @@
+.Dd December 19 2014
+.Dt SUMMARY 1summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:24 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm summary
+.Nd compute various stastics from NTP stat files
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.sp
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Directory containing stat files.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.It Fl \-end\-date Ns = Ns Ar number
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.It Fl \-output\-directory Ns = Ns Ar str
+Output directory.
+The default
+.Ar str
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.It Fl \-peer\-dist\-limit Ns = Ns Ar float
+Peer dist limit.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 400
+.sp
+.It Fl \-skip\-time\-steps Ns = Ns Ar float
+Ignore time offsets larger that this.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 3600
+.sp
+.It Fl \-start\-date Ns = Ns Ar num
+Start date.
+This option takes an integer number as its argument.
+The default
+.Ar num
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.html b/scripts/summary.html
new file mode 100644
index 000000000000..269e903fd3f6
--- /dev/null
+++ b/scripts/summary.html
@@ -0,0 +1,182 @@
+<html lang="en">
+<head>
+<title>Summary User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Summary User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Summary User's Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-Description">summary Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Summary User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>summary</code> program.
+This document applies to version 4.2.8 of <code>summary</code>.
+
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Summary User Manual</a>
+</ul>
+</div>
+
+<ul class="menu">
+<li><a accesskey="1" href="#summary-Description">summary Description</a>: Description
+<li><a accesskey="2" href="#summary-Invocation">summary Invocation</a>: Invoking summary
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="summary-Invocation"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-Description">summary Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<h3 class="section">Invoking summary</h3>
+
+<p><a name="index-summary-1"></a><a name="index-compute-various-stastics-from-NTP-stat-files-2"></a>
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>summary</code> program.
+
+<ul class="menu">
+<li><a accesskey="1" href="#summary-usage">summary usage</a>: summary help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#summary-directory">summary directory</a>: directory option
+<li><a accesskey="3" href="#summary-end_002ddate">summary end-date</a>: end-date option
+<li><a accesskey="4" href="#summary-output_002ddirectory">summary output-directory</a>: output-directory option
+<li><a accesskey="5" href="#summary-start_002ddate">summary start-date</a>: start-date option
+<li><a accesskey="6" href="#summary-exit-status">summary exit status</a>: exit status
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="summary-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-directory">summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">summary help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-summary-help-3"></a>
+This is the automatically generated usage text for summary.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">summary - compute various stastics from NTP stat files - Ver. 4.2.8
+USAGE: summary [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+
+ --directory=str Directory containing stat files
+ --end-date=num End date
+ --output-directory=str Output directory
+ --peer-dist-limit=float Peer dist limit
+ --skip-time-steps=float Ignore time offsets larger that this
+ --start-date=num Start date
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage text through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+</pre>
+ <div class="node">
+<p><hr>
+<a name="summary-directory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-end_002ddate">summary end-date</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-usage">summary usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">directory option</h4>
+
+<p><a name="index-summary_002ddirectory-4"></a>
+This is the &ldquo;directory containing stat files&rdquo; option.
+This option takes a string argument.
+ The directory where <code>ntpd</code> will search for .stat files generated
+ by <code>ntpd</code>.
+<div class="node">
+<p><hr>
+<a name="summary-end_002ddate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-output_002ddirectory">summary output-directory</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-directory">summary directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">end-date option</h4>
+
+<p><a name="index-summary_002dend_002ddate-5"></a>
+This is the &ldquo;end date&rdquo; option.
+This option takes a number argument.
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use <code>date -u +%Y%m%d</code>)
+ to get the timestamp.
+<div class="node">
+<p><hr>
+<a name="summary-output_002ddirectory"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-start_002ddate">summary start-date</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-end_002ddate">summary end-date</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">output-directory option</h4>
+
+<p><a name="index-summary_002doutput_002ddirectory-6"></a>
+This is the &ldquo;output directory&rdquo; option.
+This option takes a str argument.
+ The output directory <code>summary</code> will write all output files to.
+<div class="node">
+<p><hr>
+<a name="summary-start_002ddate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#summary-exit-status">summary exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-output_002ddirectory">summary output-directory</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">start-date option</h4>
+
+<p><a name="index-summary_002dstart_002ddate-7"></a>
+This is the &ldquo;start date&rdquo; option.
+This option takes a num argument.
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+<div class="node">
+<p><hr>
+<a name="summary-exit-status"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#summary-start_002ddate">summary start-date</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#summary-Invocation">summary Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">summary exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</dl>
+
+</body></html>
+
diff --git a/scripts/summary.in b/scripts/summary.in
index 515dfc6b56f7..a99f8df0e73e 100644
--- a/scripts/summary.in
+++ b/scripts/summary.in
@@ -18,55 +18,90 @@
# 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"
+package summary;
+use 5.006_000;
use strict;
-use Getopt::Long;
+my ($log_date_pattern, $statsdir, $outputdir, $skip_time_steps, $startdate,
+ $enddate, $peer_dist_limit);
-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;
+exit run(@ARGV) unless caller;
-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);
+sub run {
+ my $opts;
+ if (!processOptions(\@ARGV, $opts)) {
+ usage(1);
+ };
-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";
+ $log_date_pattern = '[12]\d{3}[01]\d[0-3]\d';
+ $statsdir = $opts->{directory};
+ $outputdir = $opts->{'output-directory'};
+ $skip_time_steps = $opts->{'skip-time-steps'};
+ $startdate = $opts->{'start-date'};
+ $enddate = $opts->{'end-date'};
+ if (!$enddate){
+ $enddate = `date -u +%Y%m%d`;
+ chomp $enddate;
+ --$enddate;
}
- print STDERR "\n";
- die;
-}
+ $peer_dist_limit = $opts->{'peer-dist-limit'};
+
+ # 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);
+
+ my $loop_summary="$outputdir/loop_summary";
+ my $peer_summary="$outputdir/peer_summary";
+ my $clock_summary="$outputdir/clock_summary";
+ my (@loopfiles, @peerfiles, @clockfiles);
-# 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$/);
+ print STDERR "Creating summaries from $statsdir ($startdate to $enddate)\n";
-$skip_time_steps = 0.128 if ($skip_time_steps == 0);
+ 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
+ for ($loop_summary, $peer_summary, $clock_summary) { unlink $_ if -f $_ };
+
+ my $date;
+ for (@loopfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_loop($statsdir, $_, $loop_summary);
+ }
+ }
+
+ for (@peerfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_peer($statsdir, $_, $peer_summary);
+ }
+ }
+
+ for (@clockfiles) {
+ $date = $_; $date =~ s/.*($log_date_pattern)$/$1/;
+ if ($date ge $startdate && $date le $enddate) {
+ do_clock($statsdir, $_, $clock_summary);
+ }
+ }
+
+ print STDERR "Creating peer summary with limit $peer_dist_limit\n";
+ peer_summary($peer_summary) if (-f $peer_summary);
+}
sub min
{
@@ -328,46 +363,7 @@ sub peer_summary
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;
+@summary_opts@
-print STDERR "Creating peer summary with limit $peer_dist_limit\n";
-peer_summary $peer_summary if (-f $peer_summary);
+1;
+__END__
diff --git a/scripts/summary.man.in b/scripts/summary.man.in
new file mode 100644
index 000000000000..36680b8cc5ce
--- /dev/null
+++ b/scripts/summary.man.in
@@ -0,0 +1,123 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH summary 1summaryman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-A3aGb6/ag-M3aOa6)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:22 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]summary\fP
+\- compute various stastics from NTP stat files
+.SH SYNOPSIS
+\f\*[B-Font]summary\fP
+[\f\*[B-Font]\-\-option-name\f[]]
+[\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+.sp
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-\-directory\f[]=\f\*[I-Font]string\f[]
+Directory containing stat files.
+The default
+\f\*[I-Font]string\f[]
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.TP
+.NOP \f\*[B-Font]\-\-end\-date\f[]=\f\*[I-Font]number\f[]
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.TP
+.NOP \f\*[B-Font]\-\-output\-directory\f[]=\f\*[I-Font]str\f[]
+Output directory.
+The default
+\f\*[I-Font]str\f[]
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.TP
+.NOP \f\*[B-Font]\-\-peer\-dist\-limit\f[]=\f\*[I-Font]float\f[]
+Peer dist limit.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 400
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-skip\-time\-steps\f[]=\f\*[I-Font]float\f[]
+Ignore time offsets larger that this.
+The default
+\f\*[I-Font]float\f[]
+for this option is:
+.ti +4
+ 3600
+.sp
+.TP
+.NOP \f\*[B-Font]\-\-start\-date\f[]=\f\*[I-Font]num\f[]
+Start date.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]num\f[]
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.TP
+.NOP \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.mdoc.in b/scripts/summary.mdoc.in
new file mode 100644
index 000000000000..603eea825fdc
--- /dev/null
+++ b/scripts/summary.mdoc.in
@@ -0,0 +1,98 @@
+.Dd December 19 2014
+.Dt SUMMARY 1summarymdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:45:24 AM by AutoGen 5.18.5pre4
+.\" From the definitions summary-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm summary
+.Nd compute various stastics from NTP stat files
+.Sh SYNOPSIS
+.Nm
+.Op Fl \-option\-name
+.Op Fl \-option\-name Ar value
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+.sp
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl \-directory Ns = Ns Ar string
+Directory containing stat files.
+The default
+.Ar string
+for this option is:
+.ti +4
+ /var/log/ntp
+.sp
+ The directory where \fBntpd\fP will search for .stat files generated
+ by \fBntpd\fP.
+.It Fl \-end\-date Ns = Ns Ar number
+End date.
+This option takes an integer number as its argument.
+.sp
+ Process all files with the date suffix less or equal to value of this
+ option. Defaults to today minus one day (Use \fBdate \-u +%Y%m%d\fP)
+ to get the timestamp.
+.It Fl \-output\-directory Ns = Ns Ar str
+Output directory.
+The default
+.Ar str
+for this option is:
+.ti +4
+ /tmp
+.sp
+ The output directory \fBsummary\fP will write all output files to.
+.It Fl \-peer\-dist\-limit Ns = Ns Ar float
+Peer dist limit.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 400
+.sp
+.It Fl \-skip\-time\-steps Ns = Ns Ar float
+Ignore time offsets larger that this.
+The default
+.Ar float
+for this option is:
+.ti +4
+ 3600
+.sp
+.It Fl \-start\-date Ns = Ns Ar num
+Start date.
+This option takes an integer number as its argument.
+The default
+.Ar num
+for this option is:
+.ti +4
+ 19700101
+.sp
+ Process all files with the date suffix more or equal to value of
+ this option. Defaults to 197000101.
+.It Fl \-help
+Display usage information and exit.
+.It Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsummary\fP
+option definitions.
diff --git a/scripts/summary.texi b/scripts/summary.texi
new file mode 100644
index 000000000000..5f1548ac4fdc
--- /dev/null
+++ b/scripts/summary.texi
@@ -0,0 +1,40 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename summary.info
+@settitle Summary User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of @code{summary},
+a program from the NTP Project
+@end ifinfo
+
+@direntry
+* summary: (summary). Summarize (something)
+@end direntry
+
+@titlepage
+@title summary User's Manual
+@subtitle summary, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@node Top, summary Description, (dir), (dir)
+@top Summary User Manual
+
+This document describes the use of the NTP Project's @code{summary} program.
+This document applies to version @value{VERSION} of @code{summary}.
+
+@shortcontents
+
+@menu
+* summary Description:: Description
+* summary Invocation:: Invoking summary
+@end menu
+
+@include invoke-summary.texi
diff --git a/sntp/COPYRIGHT b/sntp/COPYRIGHT
index a4a8dbca37c2..1775a64784a5 100644
--- a/sntp/COPYRIGHT
+++ b/sntp/COPYRIGHT
@@ -4,7 +4,7 @@ This file is automatically generated from html/copyright.html
jpg "Clone me," says Dolly sheepishly.
- Last update: 1-Jan-2011 08:34 UTC
+ Last update: 9-Aug-2014 07:56 UTC
_________________________________________________________________
The following copyright notice applies to all files collectively
@@ -13,7 +13,7 @@ This file is automatically generated from html/copyright.html
applies as if the text was explicitly included in the file.
***********************************************************************
* *
-* Copyright (c) University of Delaware 1992-2011 *
+* Copyright (c) University of Delaware 1992-2014 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@@ -75,53 +75,58 @@ This file is automatically generated from html/copyright.html
27. [29]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
28. [30]Frank Kardel [31]<kardel (at) ntp (dot) org> PARSE <GENERIC>
- driver (>14 reference clocks), STREAMS modules for PARSE, support
+ (driver 14 reference clocks), STREAMS modules for PARSE, support
scripts, syslog cleanup, dynamic interface handling
- 29. [32]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 29. [32]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
+ comply with NTPv4 specification, ntpq saveconfig
+ 30. [33]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 30. [33]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 31. [34]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ 31. [34]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 32. [35]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
- 32. [35]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 33. [36]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 34. [37]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 33. [36]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 34. [37]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 35. [38]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 35. [38]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
+ 36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance
- 36. [39]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
- 37. [40]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 38. [41]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 39. [42]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 40. [43]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 41. [44]Derek Mulcahy <derek@toybox.demon.co.uk> and [45]Damon
+ 37. [40]David L. Mills <mills@udel.edu> Version 4 foundation,
+ precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19,
+ 22, 36
+ 38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 41. [44]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 42. [45]Derek Mulcahy <derek@toybox.demon.co.uk> and [46]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 42. [46]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
+ 43. [47]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
maintenance
- 43. [47]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 44. [48]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 45. [49]Wilfredo Sánchez <wsanchez@apple.com> added support for
+ 45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo
- 46. [50]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 47. [51]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 48. [52]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 49. [53]Michael Shields <shields@tembel.org> USNO clock driver
- 50. [54]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
+ 49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 50. [54]Michael Shields <shields@tembel.org> USNO clock driver
+ 51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver
- 51. [55]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 52. [56]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 53. [57]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
+ 53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support
- 54. [58]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
+ 55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
- 55. [59]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
+ Solaris issues
+ 57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
+ (libseccomp) support
+ 58. [62]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 56. [60]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
@@ -141,7 +146,7 @@ References
12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
13. mailto:%20reg@dwf.com
14. mailto:%20clift@ml.csiro.au
- 15. mailto:casey@csc.co.za
+ 15. mailto:%20casey@csc.co.za
16. mailto:%20Sven_Dietrich@trimble.COM
17. mailto:%20dundas@salt.jpl.nasa.gov
18. mailto:%20duwe@immd4.informatik.uni-erlangen.de
@@ -153,37 +158,40 @@ References
24. mailto:%20iglesias@uci.edu
25. mailto:%20jagubox.gsfc.nasa.gov
26. mailto:%20jbj@chatham.usdesign.com
- 27. mailto:Hans.Lambermont@nl.origin-it.com
+ 27. mailto:%20Hans.Lambermont@nl.origin-it.com
28. mailto:H.Lambermont@chello.nl
29. mailto:%20phk@FreeBSD.ORG
30. http://www4.informatik.uni-erlangen.de/%7ekardel
- 31. mailto:%20kardel(at)ntp(dot)org
- 32. mailto:%20jones@hermes.chpc.utexas.edu
- 33. mailto:%20dkatz@cisco.com
- 34. mailto:%20leres@ee.lbl.gov
- 35. mailto:%20lindholm@ucs.ubc.ca
- 36. mailto:%20louie@ni.umd.edu
- 37. mailto:%20thorinn@diku.dk
- 38. mailto:%20mayer@ntp.org
- 39. mailto:%20mills@udel.edu
- 40. mailto:%20moeller@gwdgv1.dnet.gwdg.de
- 41. mailto:%20mogul@pa.dec.com
- 42. mailto:%20tmoore@fievel.daytonoh.ncr.com
- 43. mailto:%20kamal@whence.com
- 44. mailto:%20derek@toybox.demon.co.uk
- 45. mailto:%20d@hd.org
- 46. mailto:%20neal@ntp.org
- 47. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
- 48. mailto:%20dirce@zk3.dec.com
- 49. mailto:%20wsanchez@apple.com
- 50. mailto:%20mrapple@quack.kfu.com
- 51. mailto:%20jack@innovativeinternet.com
- 52. mailto:%20schnitz@unipress.com
- 53. mailto:%20shields@tembel.org
- 54. mailto:%20pebbles.jpl.nasa.gov
- 55. mailto:%20harlan@pfcs.com
- 56. mailto:%20ken@sdd.hp.com
- 57. mailto:%20ajit@ee.udel.edu
- 58. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
- 59. mailto:%20vixie@vix.com
- 60. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
+ 31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
+ 32. mailto:kuehn@ntp.org
+ 33. mailto:%20jones@hermes.chpc.utexas.edu
+ 34. mailto:%20dkatz@cisco.com
+ 35. mailto:%20leres@ee.lbl.gov
+ 36. mailto:%20lindholm@ucs.ubc.ca
+ 37. mailto:%20louie@ni.umd.edu
+ 38. mailto:%20thorinn@diku.dk
+ 39. mailto:%20mayer@ntp.org
+ 40. mailto:%20mills@udel.edu
+ 41. mailto:%20moeller@gwdgv1.dnet.gwdg.de
+ 42. mailto:%20mogul@pa.dec.com
+ 43. mailto:%20tmoore@fievel.daytonoh.ncr.com
+ 44. mailto:%20kamal@whence.com
+ 45. mailto:%20derek@toybox.demon.co.uk
+ 46. mailto:%20d@hd.org
+ 47. mailto:%20neal@ntp.org
+ 48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
+ 49. mailto:%20dirce@zk3.dec.com
+ 50. mailto:%20wsanchez@apple.com
+ 51. mailto:%20mrapple@quack.kfu.com
+ 52. mailto:%20jack@innovativeinternet.com
+ 53. mailto:%20schnitz@unipress.com
+ 54. mailto:%20shields@tembel.org
+ 55. mailto:%20pebbles.jpl.nasa.gov
+ 56. mailto:%20harlan@pfcs.com
+ 57. mailto:%20ken@sdd.hp.com
+ 58. mailto:%20ajit@ee.udel.edu
+ 59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
+ 60. mailto:%20brian.utterback@oracle.com
+ 61. mailto:%20loganaden@gmail.com
+ 62. mailto:%20vixie@vix.com
+ 63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
diff --git a/sntp/Makefile.am b/sntp/Makefile.am
index a19d77b27f6d..81a137a3348a 100644
--- a/sntp/Makefile.am
+++ b/sntp/Makefile.am
@@ -1,97 +1,167 @@
-# Makefile.am for JMK's SNTP, by Harlan Stenn
+## Makefile.am for JMK's SNTP, by Harlan Stenn
-NULL =
-
-## LIBOPTS_CHECK_NOBUILD works with Automake 1.10 now
-AUTOMAKE_OPTIONS = foreign 1.10
-ACLOCAL_AMFLAGS = -I ../m4 -I libopts/m4
-
-AM_CPPFLAGS = $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/nothreads/include \
- -I$(top_srcdir)/../lib/isc/unix/include
+ACLOCAL_AMFLAGS = -I m4 -I libevent/m4 -I libopts/m4
-LDADD = $(LIBOPTS_LDADD) $(LIBM) ../libntp/libntp.a @LCRYPTO@
+NULL =
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(SNTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+LDADD = version.o
+LDADD += libsntp.a
+LDADD += $(LIBOPTS_LDADD)
+LDADD += $(LDADD_LIBEVENT)
+LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+LDADD += $(PTHREAD_LIBS)
+LDADD += $(LDADD_NTP)
+
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L include -L ag-tpl --writable
+std_def_list = \
+ $(srcdir)/include/debug-opt.def \
+ $(srcdir)/include/autogen-version.def \
+ $(srcdir)/include/copyright.def \
+ $(srcdir)/include/homerc.def \
+ $(srcdir)/include/ntp.lic \
+ $(srcdir)/include/version.def \
+ $(NULL)
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS = sntp
-else
-sbin_PROGRAMS = sntp
+EXTRA_PROGRAMS = sntp
+
+bin_PROGRAMS = @SNTP_DB@
+libexec_PROGRAMS = @SNTP_DL@
+sbin_PROGRAMS = @SNTP_DS@
+
+##
+## DIST_SUBDIRS is typically automatically derived by automake including
+## all possible SUBDIRS values, as even items which are not built are
+## typically distributed.
+##
+## To allow us to avoid configuring the libevent tearoff entirely when
+## it is not needed, we define DIST_SUBDIRS manually excluding libevent
+## when not building it, and in that case arrange for its distribution
+## with EXTRA_DIST copying the entire directory and libevent-dist-hook
+## cleaning unwanted VCS remnants.
+##
+## When we are building libevent, it is distributed conventionally, by
+## recursive make dist in sntp including libevent.
+##
+
+SUBDIRS = include scripts
+DIST_SUBDIRS = include scripts
+
+if BUILD_SNTP
+noinst_LIBRARIES = libsntp.a
+if BUILD_LIBEVENT
+SUBDIRS += libevent
+DIST_SUBDIRS += libevent
+endif
+if GTEST_AVAILABLE
+SUBDIRS += tests
+endif
endif
-CLEANFILES = check-COPYRIGHT-submake
-
-SUBDIRS =
if NEED_LIBOPTS
SUBDIRS += libopts
endif
+DIST_SUBDIRS += libopts tests
+
+libsntp_a_SOURCES = \
+ crypto.c \
+ kod_management.c \
+ log.c \
+ main.c \
+ networking.c \
+ sntp-opts.c \
+ utilities.c \
+ $(NULL)
+
sntp_SOURCES = \
- crypto.c \
- crypto.h \
- data_formats.h \
- header.h \
- kod_management.c \
- kod_management.h \
- log.c \
- log.h \
- main.c \
- main.h \
- networking.c \
- networking.h \
sntp.c \
- sntp-opts.c \
- sntp-opts.h \
- utilities.c \
- utilities.h \
+ $(NULL)
+
+noinst_HEADERS = \
+ crypto.h \
+ data_formats.h \
+ kod_management.h \
+ log.h \
+ main.h \
+ networking.h \
+ sntp-opts.h \
+ tests_main.h \
+ utilities.h \
+ $(NULL)
+
+DISTCLEANFILES = \
+ .version \
+ version.c \
+ config.log \
+ $(man_MANS) \
$(NULL)
EXTRA_DIST = \
- $(srcdir)/autogen-version.def \
- bincheck.mf \
$(srcdir)/COPYRIGHT \
+ ag-tpl \
deps-ver \
- depsver.mf \
+ invoke-sntp.menu \
+ invoke-sntp.texi \
+ @NTP_FORCE_LIBEVENT_DIST@ \
+ loc \
sntp-opts.def \
- sntp-opts.menu \
- sntp-opts.texi \
- sntp.1 \
+ sntp.1sntpman \
+ sntp.1sntpmdoc \
+ sntp.man.in \
+ sntp.mdoc.in \
sntp.html \
sntp.texi \
- $(srcdir)/version.def \
- $(srcdir)/version.m4 \
- $(srcdir)/version.texi \
+ $(srcdir)/scm-rev \
+ $(srcdir)/m4/version.m4 \
$(NULL)
-OLD_EXTRA_DIST= \
- autogen-version.def version.def version.m4 version.texi
-
-BUILT_SOURCES= \
- check-autogen-version.def \
- check-version.def \
- check-version.m4 \
- check-version.texi \
+BUILT_SOURCES = \
$(srcdir)/COPYRIGHT \
libtool \
$(srcdir)/sntp-opts.c \
$(srcdir)/sntp-opts.h \
+ check-scm-rev \
+ $(srcdir)/include/version.def \
+ $(srcdir)/m4/version.m4 \
+ $(srcdir)/include/version.texi \
$(NULL)
-man_MANS= $(srcdir)/sntp.1
+CLEANFILES = \
+ built-sources-only \
+ check-COPYRIGHT-submake \
+ $(NULL)
-# HMS: Real Soon Now...
-#info_TEXINFOS= sntp.texi
-#sntp_TEXINFOS= sntp-opts.texi
+man1_MANS=
+man8_MANS=
+man_MANS= sntp.$(SNTP_MS)
-noinst_DATA= \
+## HMS: Real Soon Now...
+##info_TEXINFOS= sntp.texi
+##sntp_TEXINFOS= invoke-sntp.texi
+
+html_DATA= \
$(srcdir)/sntp.html \
- $(srcdir)/sntp-opts.texi \
- $(srcdir)/sntp-opts.menu \
$(NULL)
+noinst_DATA= \
+ $(srcdir)/invoke-sntp.menu \
+ $(srcdir)/invoke-sntp.texi \
+ $(srcdir)/sntp.man.in \
+ $(srcdir)/sntp.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
FRC:
@: do-nothing action to prevent default SCCS get
@: FRC "force" depends on nothing and is not a file, so is
@@ -99,6 +169,18 @@ FRC:
@: similarly always be outdated causing their rules to fire
@: each time they or a dependent is built.
+$(PROGRAMS): version.o
+
+## We probably need something about libevent, too
+## That is probably not possible since LDADD_LIBEVENT may be
+## non-file "-levent_core".
+
+version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
+ env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+
check-autogen-version.def: FRC
@cd $(srcdir) \
&& test -r ../include/autogen-version.def \
@@ -109,46 +191,39 @@ check-autogen-version.def: FRC
fi )
$(srcdir)/autogen-version.def:
- $(MAKE) check-autogen-version.def
-
-check-version.def: FRC
- @cd $(srcdir) \
- && test -r ../include/version.def \
- && ( if cmp -s ../include/version.def version.def; \
- then : ; \
- else cp ../include/version.def version.def; \
- echo "Installing new sntp/version.def file"; \
- fi )
+ $(MAKE) $(AM_MAKEFLAGS) check-autogen-version.def
-$(srcdir)/version.def:
- $(MAKE) check-version.def
+built-sources-only: $(BUILT_SOURCES)
+ @: do-nothing action to avoid default SCCS get
-check-version.m4: FRC
- @cd $(srcdir) \
- && test -r ../version.m4 \
- && ( if cmp -s ../version.m4 version.m4; \
- then : ; \
- else cp ../version.m4 version.m4; \
- echo "Installing new sntp/version.m4 file"; \
- fi )
+## HMS: The next bit is still suboptimal. We'll get an error if this is
+## a bk repo and srcdir or scm-rev is unwritable.
-$(srcdir)/version.m4:
- $(MAKE) check-version.m4
+check-scm-rev: $(srcdir)/scm-rev
+ @: do-nothing
-check-version.texi: FRC
- @cd $(srcdir) \
- && test -r ../include/version.texi \
- && ( if cmp -s ../include/version.texi version.texi; \
- then : ; \
- else cp ../include/version.texi version.texi; \
- echo "Installing new sntp/version.texi file"; \
- fi )
+$(srcdir)/scm-rev:
+ -test -r $(srcdir)/../SCCS/s.ChangeSet && \
+ (bk version) >/dev/null 2>&1 && \
+ cd $(srcdir)/.. && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
+
+$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver m4/version.m4
+
+$(srcdir)/include/version.def: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver include/version.def
-$(srcdir)/version.texi:
- $(MAKE) check-version.texi
+$(srcdir)/include/version.texi: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver include/version.texi
$(srcdir)/../COPYRIGHT:
- cd .. && $(MAKE) COPYRIGHT-please
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) COPYRIGHT-please
check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT
@cmp -s $(srcdir)/../COPYRIGHT $(srcdir)/COPYRIGHT \
@@ -159,35 +234,64 @@ check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT
check-COPYRIGHT: FRC
[ ! -r $(srcdir)/../COPYRIGHT ] \
|| [ check-COPYRIGHT-submake -nt $(srcdir)/../COPYRIGHT ] \
- || $(MAKE) check-COPYRIGHT-submake
+ || $(MAKE) $(AM_MAKEFLAGS) check-COPYRIGHT-submake
$(srcdir)/COPYRIGHT: check-COPYRIGHT
@: do-nothing action to prevent any default
$(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
-
-$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
+
+$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(std_def_list)
$(run_ag) sntp-opts.def
-$(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
- $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def
+###
+
+$(srcdir)/sntp.1sntpman: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
-$(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.texi
+$(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.sed
+ sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpman > $(srcdir)/sntp.man.in+
+ mv $(srcdir)/sntp.man.in+ $(srcdir)/sntp.man.in
+
+###
+
+$(srcdir)/sntp.1sntpmdoc: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
+
+$(srcdir)/sntp.mdoc.in: $(srcdir)/sntp.1sntpmdoc $(srcdir)/scripts/mansec2subst.sed
+ sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpmdoc > $(srcdir)/sntp.mdoc.in+
+ mv $(srcdir)/sntp.mdoc.in+ $(srcdir)/sntp.mdoc.in
+
+###
+
+sntp.$(SNTP_MS): $(srcdir)/sntp.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=sntp.$(SNTP_MS)+:$(srcdir)/sntp.$(MANTAGFMT).in
+ mv sntp.$(SNTP_MS)+ sntp.$(SNTP_MS)
+
+###
+
+$(srcdir)/invoke-sntp.menu: $(srcdir)/invoke-sntp.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-
-$(srcdir)/sntp-opts.texi: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
- $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
- $(top_srcdir)/../scripts/check--help $@
-$(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi
- cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
+$(srcdir)/invoke-sntp.texi: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
+ $(top_srcdir)/../scripts/build/check--help $@
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) libntp.a
+$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
+libevent-dist-hook:
+ if test -n "$(NTP_FORCE_LIBEVENT_DIST)" ; then rm -rf $(distdir)/libevent/autom4te.cache $(distdir)/libevent/config.h.in~ ; find $(distdir)/libevent -type d -name SCCS -print | xargs rm -rf ; fi
+
+dist-hook: libevent-dist-hook
+ @: do-nothing action to avoid default SCCS get
+
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/sntp/Makefile.in b/sntp/Makefile.in
index f77fe623a803..c03abeef7ed7 100644
--- a/sntp/Makefile.in
+++ b/sntp/Makefile.in
@@ -15,13 +15,13 @@
@SET_MAKE@
-# Makefile.am for JMK's SNTP, by Harlan Stenn
-
# we traditionally installed software in bindir, while it should have gone
# in sbindir. Now that we offer a choice, look in the "other" installation
# subdir to warn folks if there is another version there.
+
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -41,27 +41,49 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = sntp$(EXEEXT)
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = sntp$(EXEEXT)
-@NEED_LIBOPTS_TRUE@am__append_1 = libopts
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/configure \
- $(top_srcdir)/depsver.mf compile config.guess config.sub \
- depcomp install-sh ltmain.sh missing
+EXTRA_PROGRAMS = sntp$(EXEEXT)
+@BUILD_LIBEVENT_TRUE@@BUILD_SNTP_TRUE@am__append_1 = libevent
+@BUILD_LIBEVENT_TRUE@@BUILD_SNTP_TRUE@am__append_2 = libevent
+@BUILD_SNTP_TRUE@@GTEST_AVAILABLE_TRUE@am__append_3 = tests
+@NEED_LIBOPTS_TRUE@am__append_4 = libopts
+DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(top_srcdir)/bincheck.mf \
+ $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/configure $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf compile config.guess config.sub \
+ depcomp install-sh libevent/build-aux/compile \
+ libevent/build-aux/config.guess libevent/build-aux/config.sub \
+ libevent/build-aux/depcomp libevent/build-aux/install-sh \
+ libevent/build-aux/ltmain.sh libevent/build-aux/missing \
+ libevent/build-aux/ylwrap ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
- $(top_srcdir)/../m4/libtool.m4 \
- $(top_srcdir)/../m4/ltoptions.m4 \
- $(top_srcdir)/../m4/ltsugar.m4 \
- $(top_srcdir)/../m4/ltversion.m4 \
- $(top_srcdir)/../m4/lt~obsolete.m4 \
- $(top_srcdir)/../m4/ntp_cacheversion.m4 \
- $(top_srcdir)/../m4/ntp_dir_sep.m4 \
- $(top_srcdir)/../m4/ntp_lib_m.m4 \
- $(top_srcdir)/../m4/ntp_openssl.m4 $(top_srcdir)/../version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/libevent/m4/openldap.m4 \
+ $(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/m4/ntp_compiler.m4 \
+ $(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/m4/ntp_googletest.m4 \
+ $(top_srcdir)/m4/ntp_ipv6.m4 $(top_srcdir)/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/m4/ntp_libevent.m4 \
+ $(top_srcdir)/m4/ntp_libntp.m4 \
+ $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/m4/ntp_openssl.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
+ $(top_srcdir)/m4/ntp_sysexits.m4 \
+ $(top_srcdir)/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -70,34 +92,61 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+libsntp_a_AR = $(AR) $(ARFLAGS)
+libsntp_a_LIBADD =
am__objects_1 =
-am_sntp_OBJECTS = crypto.$(OBJEXT) kod_management.$(OBJEXT) \
+am_libsntp_a_OBJECTS = crypto.$(OBJEXT) kod_management.$(OBJEXT) \
log.$(OBJEXT) main.$(OBJEXT) networking.$(OBJEXT) \
- sntp.$(OBJEXT) sntp-opts.$(OBJEXT) utilities.$(OBJEXT) \
- $(am__objects_1)
+ sntp-opts.$(OBJEXT) utilities.$(OBJEXT) $(am__objects_1)
+libsntp_a_OBJECTS = $(am_libsntp_a_OBJECTS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
+am_sntp_OBJECTS = sntp.$(OBJEXT) $(am__objects_1)
sntp_OBJECTS = $(am_sntp_OBJECTS)
sntp_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
-sntp_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- ../libntp/libntp.a
+sntp_DEPENDENCIES = version.o libsntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-SOURCES = $(sntp_SOURCES)
-DIST_SOURCES = $(sntp_SOURCES)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libsntp_a_SOURCES) $(sntp_SOURCES)
+DIST_SOURCES = $(libsntp_a_SOURCES) $(sntp_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
@@ -127,9 +176,11 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
+HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -137,7 +188,6 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = libopts
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -175,18 +225,31 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -196,19 +259,29 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
@@ -216,19 +289,75 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_FORCE_LIBEVENT_DIST = @NTP_FORCE_LIBEVENT_DIST@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -239,19 +368,40 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -293,80 +443,117 @@ psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4 -I libevent/m4 -I libopts/m4
NULL =
-AUTOMAKE_OPTIONS = foreign 1.10
-ACLOCAL_AMFLAGS = -I ../m4 -I libopts/m4
-AM_CPPFLAGS = $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/nothreads/include \
- -I$(top_srcdir)/../lib/isc/unix/include
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(SNTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) \
+ $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
+LDADD = version.o libsntp.a $(LIBOPTS_LDADD) $(LDADD_LIBEVENT) \
+ ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) \
+ $(LDADD_NTP)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L include -L ag-tpl --writable
+
+std_def_list = \
+ $(srcdir)/include/debug-opt.def \
+ $(srcdir)/include/autogen-version.def \
+ $(srcdir)/include/copyright.def \
+ $(srcdir)/include/homerc.def \
+ $(srcdir)/include/ntp.lic \
+ $(srcdir)/include/version.def \
+ $(NULL)
-LDADD = $(LIBOPTS_LDADD) $(LIBM) ../libntp/libntp.a @LCRYPTO@
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
+bin_PROGRAMS = @SNTP_DB@
+libexec_PROGRAMS = @SNTP_DL@
+sbin_PROGRAMS = @SNTP_DS@
+SUBDIRS = include scripts $(am__append_1) $(am__append_3) \
+ $(am__append_4)
+DIST_SUBDIRS = include scripts $(am__append_2) libopts tests
+@BUILD_SNTP_TRUE@noinst_LIBRARIES = libsntp.a
+libsntp_a_SOURCES = \
+ crypto.c \
+ kod_management.c \
+ log.c \
+ main.c \
+ networking.c \
+ sntp-opts.c \
+ utilities.c \
+ $(NULL)
-CLEANFILES = check-COPYRIGHT-submake .deps-ver
-SUBDIRS = $(am__append_1)
sntp_SOURCES = \
- crypto.c \
- crypto.h \
- data_formats.h \
- header.h \
- kod_management.c \
- kod_management.h \
- log.c \
- log.h \
- main.c \
- main.h \
- networking.c \
- networking.h \
sntp.c \
- sntp-opts.c \
- sntp-opts.h \
- utilities.c \
- utilities.h \
+ $(NULL)
+
+noinst_HEADERS = \
+ crypto.h \
+ data_formats.h \
+ kod_management.h \
+ log.h \
+ main.h \
+ networking.h \
+ sntp-opts.h \
+ tests_main.h \
+ utilities.h \
+ $(NULL)
+
+DISTCLEANFILES = \
+ .version \
+ version.c \
+ config.log \
+ $(man_MANS) \
$(NULL)
EXTRA_DIST = \
- $(srcdir)/autogen-version.def \
- bincheck.mf \
$(srcdir)/COPYRIGHT \
+ ag-tpl \
deps-ver \
- depsver.mf \
+ invoke-sntp.menu \
+ invoke-sntp.texi \
+ @NTP_FORCE_LIBEVENT_DIST@ \
+ loc \
sntp-opts.def \
- sntp-opts.menu \
- sntp-opts.texi \
- sntp.1 \
+ sntp.1sntpman \
+ sntp.1sntpmdoc \
+ sntp.man.in \
+ sntp.mdoc.in \
sntp.html \
sntp.texi \
- $(srcdir)/version.def \
- $(srcdir)/version.m4 \
- $(srcdir)/version.texi \
+ $(srcdir)/scm-rev \
+ $(srcdir)/m4/version.m4 \
$(NULL)
-OLD_EXTRA_DIST = \
- autogen-version.def version.def version.m4 version.texi
-
-BUILT_SOURCES = check-autogen-version.def check-version.def \
- check-version.m4 check-version.texi $(srcdir)/COPYRIGHT \
- libtool $(srcdir)/sntp-opts.c $(srcdir)/sntp-opts.h $(NULL) \
- .deps-ver
-man_MANS = $(srcdir)/sntp.1
+BUILT_SOURCES = $(srcdir)/COPYRIGHT libtool $(srcdir)/sntp-opts.c \
+ $(srcdir)/sntp-opts.h check-scm-rev \
+ $(srcdir)/include/version.def $(srcdir)/m4/version.m4 \
+ $(srcdir)/include/version.texi $(NULL) check-libntp \
+ check-libopts .deps-ver
+CLEANFILES = built-sources-only check-COPYRIGHT-submake $(NULL) \
+ check-libntp check-libopts .deps-ver
+man1_MANS =
+man8_MANS =
+man_MANS = sntp.$(SNTP_MS)
+html_DATA = \
+ $(srcdir)/sntp.html \
+ $(NULL)
-# HMS: Real Soon Now...
-#info_TEXINFOS= sntp.texi
-#sntp_TEXINFOS= sntp-opts.texi
noinst_DATA = \
- $(srcdir)/sntp.html \
- $(srcdir)/sntp-opts.texi \
- $(srcdir)/sntp-opts.menu \
+ $(srcdir)/invoke-sntp.menu \
+ $(srcdir)/invoke-sntp.texi \
+ $(srcdir)/sntp.man.in \
+ $(srcdir)/sntp.mdoc.in \
$(NULL)
+SNTP_INCS = -I$(top_srcdir)/../include \
+ -I$(top_srcdir)/../lib/isc/include \
+ -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/../lib/isc/unix/include
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -374,7 +561,7 @@ all: $(BUILT_SOURCES) config.h
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -423,6 +610,13 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libsntp.a: $(libsntp_a_OBJECTS) $(libsntp_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libsntp.a
+ $(AM_V_AR)$(libsntp_a_AR) libsntp.a $(libsntp_a_OBJECTS) $(libsntp_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libsntp.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -466,6 +660,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -511,7 +748,7 @@ clean-sbinPROGRAMS:
rm -f $$list
sntp$(EXEEXT): $(sntp_OBJECTS) $(sntp_DEPENDENCIES)
@rm -f sntp$(EXEEXT)
- $(LINK) $(sntp_OBJECTS) $(sntp_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(sntp_OBJECTS) $(sntp_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -529,22 +766,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -557,10 +797,10 @@ clean-libtool:
distclean-libtool:
-rm -f libtool config.lt
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -586,7 +826,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -595,6 +835,64 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -804,6 +1102,9 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
@@ -922,10 +1223,11 @@ distcleancheck: distclean
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
+ config.h
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -951,6 +1253,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -958,8 +1261,9 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-recursive
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS \
+ mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -980,13 +1284,14 @@ info: info-recursive
info-am:
-install-data-am: install-man
+install-data-am: install-data-local install-htmlDATA install-man
install-dvi: install-dvi-recursive
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-recursive
@@ -997,7 +1302,7 @@ install-info: install-info-recursive
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man8
install-pdf: install-pdf-recursive
@@ -1029,10 +1334,10 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man8
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-exec-am \
@@ -1040,25 +1345,30 @@ uninstall-man: uninstall-man1
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags \
- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-noinstLIBRARIES clean-sbinPROGRAMS ctags ctags-recursive \
+ dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzma \
dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-man1 \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-hook install-html \
+ install-html-am install-htmlDATA install-info install-info-am \
+ install-libexecPROGRAMS install-man install-man1 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am \
- uninstall-binPROGRAMS uninstall-man uninstall-man1 \
- uninstall-sbinPROGRAMS
+ uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \
+ uninstall-man8 uninstall-sbinPROGRAMS
+
+install-data-local: install-html
FRC:
@: do-nothing action to prevent default SCCS get
@@ -1067,6 +1377,14 @@ FRC:
@: similarly always be outdated causing their rules to fire
@: each time they or a dependent is built.
+$(PROGRAMS): version.o
+
+version.c: $(sntp_OBJECTS) ../libntp/libntp.a Makefile $(srcdir)/scm-rev
+ env CSET=`cat $(srcdir)/scm-rev` $(top_builddir)/../scripts/build/mkver sntp
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
+
check-autogen-version.def: FRC
@cd $(srcdir) \
&& test -r ../include/autogen-version.def \
@@ -1077,46 +1395,36 @@ check-autogen-version.def: FRC
fi )
$(srcdir)/autogen-version.def:
- $(MAKE) check-autogen-version.def
-
-check-version.def: FRC
- @cd $(srcdir) \
- && test -r ../include/version.def \
- && ( if cmp -s ../include/version.def version.def; \
- then : ; \
- else cp ../include/version.def version.def; \
- echo "Installing new sntp/version.def file"; \
- fi )
+ $(MAKE) $(AM_MAKEFLAGS) check-autogen-version.def
-$(srcdir)/version.def:
- $(MAKE) check-version.def
+built-sources-only: $(BUILT_SOURCES)
+ @: do-nothing action to avoid default SCCS get
-check-version.m4: FRC
- @cd $(srcdir) \
- && test -r ../version.m4 \
- && ( if cmp -s ../version.m4 version.m4; \
- then : ; \
- else cp ../version.m4 version.m4; \
- echo "Installing new sntp/version.m4 file"; \
- fi )
+check-scm-rev: $(srcdir)/scm-rev
+ @: do-nothing
-$(srcdir)/version.m4:
- $(MAKE) check-version.m4
+$(srcdir)/scm-rev:
+ -test -r $(srcdir)/../SCCS/s.ChangeSet && \
+ (bk version) >/dev/null 2>&1 && \
+ cd $(srcdir)/.. && \
+ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
+ y=`cat sntp/scm-rev 2>/dev/null` || true && \
+ case "$$x" in ''|$$y) ;; *) echo $$x > sntp/scm-rev ;; esac
-check-version.texi: FRC
- @cd $(srcdir) \
- && test -r ../include/version.texi \
- && ( if cmp -s ../include/version.texi version.texi; \
- then : ; \
- else cp ../include/version.texi version.texi; \
- echo "Installing new sntp/version.texi file"; \
- fi )
+$(srcdir)/m4/version.m4: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver m4/version.m4
+
+$(srcdir)/include/version.def: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver include/version.def
-$(srcdir)/version.texi:
- $(MAKE) check-version.texi
+$(srcdir)/include/version.texi: $(srcdir)/../packageinfo.sh
+ TEMPDIR=`pwd` && export TEMPDIR && cd $(srcdir) && \
+ ../scripts/build/genver include/version.texi
$(srcdir)/../COPYRIGHT:
- cd .. && $(MAKE) COPYRIGHT-please
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) COPYRIGHT-please
check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT
@cmp -s $(srcdir)/../COPYRIGHT $(srcdir)/COPYRIGHT \
@@ -1127,7 +1435,7 @@ check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT
check-COPYRIGHT: FRC
[ ! -r $(srcdir)/../COPYRIGHT ] \
|| [ check-COPYRIGHT-submake -nt $(srcdir)/../COPYRIGHT ] \
- || $(MAKE) check-COPYRIGHT-submake
+ || $(MAKE) $(AM_MAKEFLAGS) check-COPYRIGHT-submake
$(srcdir)/COPYRIGHT: check-COPYRIGHT
@: do-nothing action to prevent any default
@@ -1135,46 +1443,86 @@ $(srcdir)/COPYRIGHT: check-COPYRIGHT
$(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
-$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
+$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(std_def_list)
$(run_ag) sntp-opts.def
-$(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
- $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def
+###
+
+$(srcdir)/sntp.1sntpman: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1sntpman -Tagman-cmd.tpl sntp-opts.def
+
+$(srcdir)/sntp.man.in: $(srcdir)/sntp.1sntpman $(srcdir)/scripts/mansec2subst.sed
+ sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpman > $(srcdir)/sntp.man.in+
+ mv $(srcdir)/sntp.man.in+ $(srcdir)/sntp.man.in
+
+###
+
+$(srcdir)/sntp.1sntpmdoc: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1sntpmdoc -Tagmdoc-cmd.tpl sntp-opts.def
+
+$(srcdir)/sntp.mdoc.in: $(srcdir)/sntp.1sntpmdoc $(srcdir)/scripts/mansec2subst.sed
+ sed -f $(srcdir)/scripts/mansec2subst.sed $(srcdir)/sntp.1sntpmdoc > $(srcdir)/sntp.mdoc.in+
+ mv $(srcdir)/sntp.mdoc.in+ $(srcdir)/sntp.mdoc.in
+
+###
-$(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.texi
+sntp.$(SNTP_MS): $(srcdir)/sntp.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=sntp.$(SNTP_MS)+:$(srcdir)/sntp.$(MANTAGFMT).in
+ mv sntp.$(SNTP_MS)+ sntp.$(SNTP_MS)
+
+###
+
+$(srcdir)/invoke-sntp.menu: $(srcdir)/invoke-sntp.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/sntp-opts.texi: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def
- $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
- $(top_srcdir)/../scripts/check--help $@
+$(srcdir)/invoke-sntp.texi: $(srcdir)/sntp-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section sntp-opts.def
+ $(top_srcdir)/../scripts/build/check--help $@
-$(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi
+$(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(srcdir)/sntp.texi $(srcdir)/include/version.texi
cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true )
-../libntp/libntp.a:
- cd ../libntp && $(MAKE) libntp.a
-
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
+libevent-dist-hook:
+ if test -n "$(NTP_FORCE_LIBEVENT_DIST)" ; then rm -rf $(distdir)/libevent/autom4te.cache $(distdir)/libevent/config.h.in~ ; find $(distdir)/libevent -type d -name SCCS -print | xargs rm -rf ; fi
+
+dist-hook: libevent-dist-hook
+ @: do-nothing action to avoid default SCCS get
+
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libopts: libopts/libopts.la
+ @echo stamp > $@
+
+libopts/libopts.la:
+ -cd libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -1183,17 +1531,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -1202,7 +1543,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/sntp/aclocal.m4 b/sntp/aclocal.m4
index f371c52b6d84..aff791b83646 100644
--- a/sntp/aclocal.m4
+++ b/sntp/aclocal.m4
@@ -19,6 +19,125 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# serial 9 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2010 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -841,6 +960,33 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
+# Copyright (C) 2009 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.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -985,12 +1131,33 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([libopts/m4/libopts.m4])
-m4_include([../m4/libtool.m4])
-m4_include([../m4/ltoptions.m4])
-m4_include([../m4/ltsugar.m4])
-m4_include([../m4/ltversion.m4])
-m4_include([../m4/lt~obsolete.m4])
-m4_include([../m4/ntp_cacheversion.m4])
-m4_include([../m4/ntp_dir_sep.m4])
-m4_include([../m4/ntp_lib_m.m4])
-m4_include([../m4/ntp_openssl.m4])
+m4_include([libopts/m4/stdnoreturn.m4])
+m4_include([libevent/m4/openldap-thread-check.m4])
+m4_include([libevent/m4/openldap.m4])
+m4_include([m4/hms_search_lib.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/ntp_cacheversion.m4])
+m4_include([m4/ntp_compiler.m4])
+m4_include([m4/ntp_crosscompile.m4])
+m4_include([m4/ntp_debug.m4])
+m4_include([m4/ntp_dir_sep.m4])
+m4_include([m4/ntp_facilitynames.m4])
+m4_include([m4/ntp_googletest.m4])
+m4_include([m4/ntp_ipv6.m4])
+m4_include([m4/ntp_lib_m.m4])
+m4_include([m4/ntp_libevent.m4])
+m4_include([m4/ntp_libntp.m4])
+m4_include([m4/ntp_lineeditlibs.m4])
+m4_include([m4/ntp_locinfo.m4])
+m4_include([m4/ntp_openssl.m4])
+m4_include([m4/ntp_pkg_config.m4])
+m4_include([m4/ntp_prog_cc.m4])
+m4_include([m4/ntp_sntp.m4])
+m4_include([m4/ntp_sysexits.m4])
+m4_include([m4/ntp_ver_suffix.m4])
+m4_include([m4/os_cflags.m4])
+m4_include([m4/snprintf.m4])
diff --git a/sntp/ag-tpl/0-old/Mdoc.pm b/sntp/ag-tpl/0-old/Mdoc.pm
new file mode 100644
index 000000000000..61fffd6f615f
--- /dev/null
+++ b/sntp/ag-tpl/0-old/Mdoc.pm
@@ -0,0 +1,515 @@
+=head1 NAME
+
+Mdoc - perl module to parse Mdoc macros
+
+=head1 SYNOPSIS
+
+ use Mdoc qw(ns pp soff son stoggle mapwords);
+
+See mdoc2man and mdoc2texi for code examples.
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item def_macro( NAME, CODE, [ raw => 1, greedy => 1, concat_until => '.Xx' ] )
+
+Define new macro. The CODE reference will be called by call_macro(). You can
+have two distinct definitions for and inline macro and for a standalone macro
+(i. e. 'Pa' and '.Pa').
+
+The CODE reference is passed a list of arguments and is expected to return list
+of strings and control characters (see C<CONSTANTS>).
+
+By default the surrouding "" from arguments to macros are removed, use C<raw>
+to disable this.
+
+Normaly CODE reference is passed all arguments up to next nested macro. Set
+C<greedy> to to pass everything up to the end of the line.
+
+If the concat_until is present, the line is concated until the .Xx macro is
+found. For example the following macro definition
+
+ def_macro('.Oo', gen_encloser(qw([ ]), concat_until => '.Oc' }
+ def_macro('.Cm', sub { mapwords {'($_)'} @_ } }
+
+and the following input
+
+ .Oo
+ .Cm foo |
+ .Cm bar |
+ .Oc
+
+results in [(foo) | (bar)]
+
+=item get_macro( NAME )
+
+Returns a hash reference like:
+
+ { run => CODE, raw => [1|0], greedy => [1|0] }
+
+Where C<CODE> is the CODE reference used to define macro called C<NAME>
+
+=item parse_line( INPUT, OUTPUT_CODE, PREPROCESS_CODE )
+
+Parse a line from the C<INPUT> filehandle. If a macro was detected it returns a
+list (MACRO_NAME, @MACRO_ARGS), otherwise it calls the C<OUTPUT_CODE>, giving
+caller a chance to modify line before printing it. If C<PREPROCESS_CODE> is
+defined it calls it prior to passing argument to a macro, giving caller a
+chance to alter them. if EOF was reached undef is returned.
+
+=item call_macro( MACRO, ARGS, ... )
+
+Call macro C<MACRO> with C<ARGS>. The CODE reference for macro C<MACRO> is
+called and for all the nested macros. Every called macro returns a list which
+is appended to return value and returned when all nested macros are processed.
+Use to_string() to produce a printable string from the list.
+
+=item to_string ( LIST )
+
+Processes C<LIST> returned from call_macro() and returns formatted string.
+
+=item mapwords BLOCK ARRAY
+
+This is like perl's map only it calls BLOCK only on elements which are not
+punctuation or control characters.
+
+=item space ( ['on'|'off] )
+
+Turn spacing on or off. If called without argument it returns the current state.
+
+=item gen_encloser ( START, END )
+
+Helper function for generating macros that enclose their arguments.
+ gen_encloser(qw({ }));
+returns
+ sub { '{', ns, @_, ns, pp('}')}
+
+=item set_Bl_callback( CODE , DEFS )
+
+This module implements the Bl/El macros for you. Using set_Bl_callback you can
+provide a macro definition that should be executed on a .Bl call.
+
+=item set_El_callback( CODE , DEFS )
+
+This module implements the Bl/El macros for you. Using set_El_callback you can
+provide a macro definition that should be executed on a .El call.
+
+=item set_Re_callback( CODE )
+
+The C<CODE> is called after a Rs/Re block is done. With a hash reference as a
+parameter, describing the reference.
+
+=back
+
+=head1 CONSTANTS
+
+=over 4
+
+=item ns
+
+Indicate 'no space' between to members of the list.
+
+=item pp ( STRING )
+
+The string is 'punctuation point'. It means that every punctuation
+preceeding that element is put behind it.
+
+=item soff
+
+Turn spacing off.
+
+=item son
+
+Turn spacing on.
+
+=item stoggle
+
+Toogle spacing.
+
+=item hs
+
+Print space no matter spacing mode.
+
+=back
+
+=head1 TODO
+
+* The concat_until only works with standalone macros. This means that
+ .Po blah Pc
+will hang until .Pc in encountered.
+
+* Provide default macros for Bd/Ed
+
+* The reference implementation is uncomplete
+
+=cut
+
+package Mdoc;
+use strict;
+use warnings;
+use List::Util qw(reduce);
+use Text::ParseWords qw(quotewords);
+use Carp;
+use Exporter qw(import);
+our @EXPORT_OK = qw(ns pp soff son stoggle hs mapwords gen_encloser nl);
+
+use constant {
+ ns => ['nospace'],
+ soff => ['spaceoff'],
+ son => ['spaceon'],
+ stoggle => ['spacetoggle'],
+ hs => ['hardspace'],
+};
+
+sub pp {
+ my $c = shift;
+ return ['pp', $c ];
+}
+sub gen_encloser {
+ my ($o, $c) = @_;
+ return sub { ($o, ns, @_, ns, pp($c)) };
+}
+
+sub mapwords(&@) {
+ my ($f, @l) = @_;
+ my @res;
+ for my $el (@l) {
+ local $_ = $el;
+ push @res, $el =~ /^(?:[,\.\{\}\(\):;\[\]\|])$/ || ref $el eq 'ARRAY' ?
+ $el : $f->();
+ }
+ return @res;
+}
+
+my %macros;
+
+###############################################################################
+
+# Default macro definitions start
+
+###############################################################################
+
+def_macro('Xo', sub { @_ }, concat_until => '.Xc');
+
+def_macro('.Ns', sub {ns, @_});
+def_macro('Ns', sub {ns, @_});
+
+{
+ my %reference;
+ def_macro('.Rs', sub { () } );
+ def_macro('.%A', sub {
+ if ($reference{authors}) {
+ $reference{authors} .= " and @_"
+ }
+ else {
+ $reference{authors} = "@_";
+ }
+ return ();
+ });
+ def_macro('.%T', sub { $reference{title} = "@_"; () } );
+ def_macro('.%O', sub { $reference{optional} = "@_"; () } );
+
+ sub set_Re_callback {
+ my ($sub) = @_;
+ croak 'Not a CODE reference' if not ref $sub eq 'CODE';
+ def_macro('.Re', sub {
+ my @ret = $sub->(\%reference);
+ %reference = (); @ret
+ });
+ return;
+ }
+}
+
+def_macro('.Bl', sub { die '.Bl - no list callback set' });
+def_macro('.It', sub { die ".It called outside of list context - maybe near line $." });
+def_macro('.El', sub { die '.El requires .Bl first' });
+
+
+{
+ my $elcb = sub { () };
+
+ sub set_El_callback {
+ my ($sub) = @_;
+ croak 'Not a CODE reference' if ref $sub ne 'CODE';
+ $elcb = $sub;
+ return;
+ }
+
+ sub set_Bl_callback {
+ my ($blcb, %defs) = @_;
+ croak 'Not a CODE reference' if ref $blcb ne 'CODE';
+ def_macro('.Bl', sub {
+
+ my $orig_it = get_macro('.It');
+ my $orig_el = get_macro('.El');
+ my $orig_bl = get_macro('.Bl');
+ my $orig_elcb = $elcb;
+
+ # Restore previous .It and .El on each .El
+ def_macro('.El', sub {
+ def_macro('.El', delete $orig_el->{run}, %$orig_el);
+ def_macro('.It', delete $orig_it->{run}, %$orig_it);
+ def_macro('.Bl', delete $orig_bl->{run}, %$orig_bl);
+ my @ret = $elcb->(@_);
+ $elcb = $orig_elcb;
+ @ret
+ });
+ $blcb->(@_)
+ }, %defs);
+ return;
+ }
+}
+
+def_macro('.Sm', sub {
+ my ($arg) = @_;
+ if (defined $arg) {
+ space($arg);
+ } else {
+ space() eq 'off' ?
+ space('on') :
+ space('off');
+ }
+ ()
+} );
+def_macro('Sm', do { my $off; sub {
+ my ($arg) = @_;
+ if (defined $arg && $arg =~ /^(on|off)$/) {
+ shift;
+ if ($arg eq 'off') { soff, @_; }
+ elsif ($arg eq 'on') { son, @_; }
+ }
+ else {
+ stoggle, @_;
+ }
+}} );
+
+###############################################################################
+
+# Default macro definitions end
+
+###############################################################################
+
+sub def_macro {
+ croak 'Odd number of elements for hash argument <'.(scalar @_).'>' if @_%2;
+ my ($macro, $sub, %def) = @_;
+ croak 'Not a CODE reference' if ref $sub ne 'CODE';
+
+ $macros{ $macro } = {
+ run => $sub,
+ greedy => delete $def{greedy} || 0,
+ raw => delete $def{raw} || 0,
+ concat_until => delete $def{concat_until},
+ };
+ if ($macros{ $macro }{concat_until}) {
+ $macros{ $macros{ $macro }{concat_until} } = { run => sub { @_ } };
+ $macros{ $macro }{greedy} = 1;
+ }
+ return;
+}
+
+sub get_macro {
+ my ($macro) = @_;
+ croak "Macro <$macro> not defined" if not exists $macros{ $macro };
+ +{ %{ $macros{ $macro } } }
+}
+
+#TODO: document this
+sub parse_opts {
+ my %args;
+ my $last;
+ for (@_) {
+ if ($_ =~ /^\\?-/) {
+ s/^\\?-//;
+ $args{$_} = 1;
+ $last = _unquote($_);
+ }
+ else {
+ $args{$last} = _unquote($_) if $last;
+ undef $last;
+ }
+ }
+ return %args;
+}
+
+sub _is_control {
+ my ($el, $expected) = @_;
+ if (defined $expected) {
+ ref $el eq 'ARRAY' and $el->[0] eq $expected;
+ }
+ else {
+ ref $el eq 'ARRAY';
+ }
+}
+
+{
+ my $sep = ' ';
+
+ sub to_string {
+ if (@_ > 0) {
+ # Handle punctunation
+ my ($in_brace, @punct) = '';
+ my @new = map {
+ if (/^([\[\(])$/) {
+ ($in_brace = $1) =~ tr/([/)]/;
+ $_, ns
+ }
+ elsif (/^([\)\]])$/ && $in_brace eq $1) {
+ $in_brace = '';
+ ns, $_
+ }
+ elsif ($_ =~ /^[,\.;:\?\!\)\]]$/) {
+ push @punct, ns, $_;
+ ();
+ }
+ elsif (_is_control($_, 'pp')) {
+ $_->[1]
+ }
+ elsif (_is_control($_)) {
+ $_
+ }
+ else {
+ splice (@punct), $_;
+ }
+ } @_;
+ push @new, @punct;
+
+ # Produce string out of an array dealing with the special control characters
+ # space('off') must but one character delayed
+ my ($no_space, $space_off) = 1;
+ my $res = '';
+ while (defined(my $el = shift @new)) {
+ if (_is_control($el, 'hardspace')) { $no_space = 1; $res .= ' ' }
+ elsif (_is_control($el, 'nospace')) { $no_space = 1; }
+ elsif (_is_control($el, 'spaceoff')) { $space_off = 1; }
+ elsif (_is_control($el, 'spaceon')) { space('on'); }
+ elsif (_is_control($el, 'spacetoggle')) { space() eq 'on' ?
+ $space_off = 1 :
+ space('on') }
+ else {
+ if ($no_space) {
+ $no_space = 0;
+ $res .= "$el"
+ }
+ else {
+ $res .= "$sep$el"
+ }
+
+ if ($space_off) { space('off'); $space_off = 0; }
+ }
+ }
+ $res
+ }
+ else {
+ '';
+ }
+ }
+
+ sub space {
+ my ($arg) = @_;
+ if (defined $arg && $arg =~ /^(on|off)$/) {
+ $sep = ' ' if $arg eq 'on';
+ $sep = '' if $arg eq 'off';
+ return;
+ }
+ else {
+ return $sep eq '' ? 'off' : 'on';
+ }
+ }
+}
+
+sub _unquote {
+ my @args = @_;
+ $_ =~ s/^"([^"]+)"$/$1/g for @args;
+ wantarray ? @args : $args[0];
+}
+
+sub call_macro {
+ my ($macro, @args) = @_;
+ my @ret;
+
+ my @newargs;
+ my $i = 0;
+
+ @args = _unquote(@args) if (!$macros{ $macro }{raw});
+
+ # Call any callable macros in the argument list
+ for (@args) {
+ if ($_ =~ /^[A-Z][a-z]+$/ && exists $macros{ $_ }) {
+ push @ret, call_macro($_, @args[$i+1 .. $#args]);
+ last;
+ } else {
+ if ($macros{ $macro }{greedy}) {
+ push @ret, $_;
+ }
+ else {
+ push @newargs, $_;
+ }
+ }
+ $i++;
+ }
+
+ if ($macros{ $macro }{concat_until}) {
+ my ($n_macro, @n_args) = ('');
+ while (1) {
+ die "EOF was reached and no $macros{ $macro }{concat_until} found"
+ if not defined $n_macro;
+ ($n_macro, @n_args) = parse_line(undef, sub { push @ret, shift });
+ if ($n_macro eq $macros{ $macro }{concat_until}) {
+ push @ret, call_macro($n_macro, @n_args);
+ last;
+ }
+ else {
+ $n_macro =~ s/^\.//;
+ push @ret, call_macro($n_macro, @n_args) if exists $macros{ $n_macro };
+ }
+ }
+ }
+
+ if ($macros{ $macro }{greedy}) {
+ #print "MACROG $macro (", (join ', ', @ret), ")\n";
+ return $macros{ $macro }{run}->(@ret);
+ }
+ else {
+ #print "MACRO $macro (", (join ', ', @newargs), ")".(join ', ', @ret)."\n";
+ return $macros{ $macro }{run}->(@newargs), @ret;
+ }
+}
+
+{
+ my ($in_fh, $out_sub, $preprocess_sub);
+ sub parse_line {
+ $in_fh = $_[0] if defined $_[0] || !defined $in_fh;
+ $out_sub = $_[1] if defined $_[1] || !defined $out_sub;
+ $preprocess_sub = $_[2] if defined $_[2] || !defined $preprocess_sub;
+
+ croak 'out_sub not a CODE reference'
+ if not ref $out_sub eq 'CODE';
+ croak 'preprocess_sub not a CODE reference'
+ if defined $preprocess_sub && not ref $preprocess_sub eq 'CODE';
+
+ while (my $line = <$in_fh>) {
+ chomp $line;
+ if ($line =~ /^\.[A-z][a-z0-9]+/ || $line =~ /^\.%[A-Z]/ ||
+ $line =~ /^\.\\"/)
+ {
+ $line =~ s/ +/ /g;
+ my ($macro, @args) = quotewords(' ', 1, $line);
+ @args = grep { defined $_ } @args;
+ $preprocess_sub->(@args) if defined $preprocess_sub;
+ if ($macro && exists $macros{ $macro }) {
+ return ($macro, @args);
+ } else {
+ $out_sub->($line);
+ }
+ }
+ else {
+ $out_sub->($line);
+ }
+ }
+ return;
+ }
+}
+
+1;
+__END__
diff --git a/sntp/ag-tpl/0-old/agman-cmd.tpl b/sntp/ag-tpl/0-old/agman-cmd.tpl
new file mode 100644
index 000000000000..6d937e4687b1
--- /dev/null
+++ b/sntp/ag-tpl/0-old/agman-cmd.tpl
@@ -0,0 +1,58 @@
+[+: -*- Mode: nroff -*-
+
+ AutoGen5 template man
+
+## agman-cmd.tpl -- Template for command line man pages
+##
+## This file is part of AutoOpts, a companion to AutoGen.
+## AutoOpts is free software.
+## Copyright (C) 1992-2013 Bruce Korb - all rights reserved
+##
+## AutoOpts is available under any one of two licenses. The license
+## in use must be one of these two and the choice is under the control
+## of the user of the license.
+##
+## The GNU Lesser General Public License, version 3 or later
+## See the files "COPYING.lgplv3" and "COPYING.gplv3"
+##
+## The Modified Berkeley Software Distribution License
+## See the file "COPYING.mbsd"
+##
+## These files have the following sha256 sums:
+##
+## 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+## 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+## 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+
+# Produce a man page for section 1, 5 or 8 commands.
+# Which is selected via: -DMAN_SECTION=n
+# passed to the autogen invocation. "n" may have a suffix, if desired.
+#
+:+][+:
+
+(define head-line (lambda()
+ (sprintf ".TH %s %s \"%s\" \"%s\" \"%s\"\n.\\\"\n"
+ (get "prog-name") man-sect
+ (shell "date '+%d %b %Y'") package-text section-name) ))
+
+(define man-page #t)
+(out-push-new) :+][+:
+
+INCLUDE "mdoc-synopsis.tlib" :+][+:
+INCLUDE "cmd-doc.tlib" :+][+:
+
+INVOKE build-doc :+][+:
+
+ (shell (string-append
+ "fn='" (find-file "mdoc2man") "'\n"
+ "test -f ${fn} || die mdoc2man not found from $PWD\n"
+ "${fn} <<\\_EndOfMdoc_ || die ${fn} failed in $PWD\n"
+ (out-pop #t)
+ "\n_EndOfMdoc_" ))
+
+:+][+:
+
+(out-move (string-append (get "prog-name") "."
+ man-sect)) :+][+:
+
+agman-cmd.tpl ends here :+]
diff --git a/sntp/ag-tpl/0-old/agmdoc-cmd.tpl b/sntp/ag-tpl/0-old/agmdoc-cmd.tpl
new file mode 100644
index 000000000000..cc56ffe8434b
--- /dev/null
+++ b/sntp/ag-tpl/0-old/agmdoc-cmd.tpl
@@ -0,0 +1,46 @@
+[+: -*- Mode: nroff -*-
+
+ AutoGen5 template mdoc
+
+## agman-cmd.tpl -- Template for command line mdoc pages
+##
+## This file is part of AutoOpts, a companion to AutoGen.
+## AutoOpts is free software.
+## AutoOpts is Copyright (C) 1992-2013 by Bruce Korb - all rights reserved
+##
+## AutoOpts is available under any one of two licenses. The license
+## in use must be one of these two and the choice is under the control
+## of the user of the license.
+##
+## The GNU Lesser General Public License, version 3 or later
+## See the files "COPYING.lgplv3" and "COPYING.gplv3"
+##
+## The Modified Berkeley Software Distribution License
+## See the file "COPYING.mbsd"
+##
+## These files have the following sha256 sums:
+##
+## 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+## 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+## 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+
+# Produce a man page for section 1, 5 or 8 commands.
+# Which is selected via: -DMAN_SECTION=n
+# passed to the autogen invocation. "n" may have a suffix, if desired.
+#
+:+][+:
+
+(define head-line (lambda() (string-append
+ ".Dd " (shell "date '+%B %e %Y' | sed 's/ */ /g'")
+ "\n.Dt " UP-PROG-NAME " " man-sect " " section-name
+ "\n.Os\n") ))
+
+(define man-page #f) :+][+:
+
+INCLUDE "mdoc-synopsis.tlib" :+][+:
+INCLUDE "cmd-doc.tlib" :+][+:
+INVOKE build-doc :+][+:
+
+(out-move (string-append
+ (get "prog-name") "." man-sect)) :+][+:
+agmdoc-cmd.tpl ends here :+]
diff --git a/sntp/ag-tpl/0-old/cmd-doc.tlib b/sntp/ag-tpl/0-old/cmd-doc.tlib
new file mode 100644
index 000000000000..0f4c50c10a38
--- /dev/null
+++ b/sntp/ag-tpl/0-old/cmd-doc.tlib
@@ -0,0 +1,1079 @@
+[+: -*- Mode: nroff -*-
+
+ AutoGen5 template man
+
+# cmd-doc.tlib -- Template for command line man/mdoc pages
+#
+# This file is part of AutoOpts, a companion to AutoGen.
+# AutoOpts is free software.
+# Copyright (C) 1992-2013 Bruce Korb - all rights reserved
+#
+# AutoOpts is available under any one of two licenses. The license
+# in use must be one of these two and the choice is under the control
+# of the user of the license.
+#
+# The GNU Lesser General Public License, version 3 or later
+# See the files "COPYING.lgplv3" and "COPYING.gplv3"
+#
+# The Modified Berkeley Software Distribution License
+# See the file "COPYING.mbsd"
+#
+# These files have the following sha256 sums:
+#
+# 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+# 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+# 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+
+# Produce a man page for section 1, 5, 6 or 8 commands. Which is
+# selected via: -DMAN_SECTION=n. "n" may have a suffix, if desired.
+# These sections have default section names that may be overridden
+# with -DSECTIN_NAME=XX, also passed to the autogen invocation.
+#
+:+][+:
+
+ ;;# START-BUILDTREE-ISMS
+ ;;
+ (shell "CLexe=${AGexe%/agen5/*}/columns/columns
+ test -x \"${CLexe}\" || {
+ CLexe=${AGexe%/autogen}/columns
+ test -x \"${CLexe}\" || die 'columns program is not findable'
+ }")
+
+:+][+: # END-BUILDTREE-ISMS
+
+(shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'`
+ test -x \"${CLexe}\" || CLexe=`which columns`")
+
+# END-INSTALL-ONLY-CODE :+][+:
+
+(define down-prog-name (string-downcase! (get "prog-name")))
+(define UP-PROG-NAME (get-up-name "prog-name"))
+
+(define command-doc #t)
+(define tmp-val (getenv "MAN_SECTION"))
+(define man-sect (if (exist? "cmd-section") (get "cmd-section") "1"))
+(define file-name "")
+(define sect-name "")
+(define macro-name "")
+(define tmp-str "")
+(define fname-line "")
+(define use-flags (exist? "flag.value"))
+(define named-mode (not (or use-flags (exist? "long-opts") )))
+
+(if (defined? 'tmp-val)
+ (if (string? tmp-val)
+ (set! man-sect tmp-val)))
+
+(define section-name
+ (if (=* man-sect "1") "User Commands"
+ (if (=* man-sect "5") "File Formats"
+ (if (=* man-sect "6") "Games"
+ (if (=* man-sect "8") "System Management"
+ (error
+ "the agman-cmd template only produces section 1, 5, 6 and 8 man pages")
+)))))
+(set! tmp-val (getenv "SECTION_NAME"))
+(if (defined? 'tmp-val) (if (string? tmp-val)
+ (set! section-name tmp-val) ))
+
+(define package-text "")
+(define package+version (and (exist? "package") (exist? "version")))
+
+(if (or (exist? "package") (exist? "version")) (begin
+ (set! package-text (string-append
+ (get "package")
+ (if package+version " (" "")
+ (get "version")
+ (if package+version ")" "") ))
+) )
+
+(define name-to-fname (lambda (nm)
+ (string-tr (string-downcase nm) " " "-") ))
+
+(define sect-line-fname (lambda () (begin
+ (out-push-new file-name)
+ (emit (string-append ".Sh \"" sect-name "\"\n"))
+ (string-append "mk-" macro-name) )))
+
+(make-tmp-dir)
+
+(define home-rc-files (exist? "homerc"))
+(define home-rc-text
+ "\nSee \\fBOPTION PRESETS\\fP for configuration files.")
+
+(define environ-init (exist? "environrc"))
+(define environ-text
+ "\nSee \\fBOPTION PRESETS\\fP for configuration environment variables.")
+
+(emit (head-line))
+(dne ".\\\" ") :+]
+.Sh NAME
+.Nm [+: prog-name :+]
+.Nd [+: prog-title :+]
+[+: INCLUDE "tpl-config.tlib" :+][+:#
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" B U I L D D O C
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE build-doc :+][+:
+
+(if (not command-doc) (begin
+ (set! home-rc-files #f)
+ (set! home-rc-text "")
+) ) :+][+:
+
+INVOKE doc-sections :+][+:
+INVOKE ao-sections :+][+:
+INVOKE assemble-sections :+][+:
+
+ENDDEF build-doc
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" A S S E M B L E S E C T I O N S
+.\"
+.\" Emit the files for each section that was provided, and do conversions
+.\"
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE assemble-sections :+][+:
+
+(out-push-new)
+
+:+][+:
+#.\" Insert the sections in the prescribed order
+#.\" Ensure a newline between them all. We strip blank lines,
+#.\" so extra blank lines get removed.
+#:+]
+cvt_prog='[+:
+
+ (define target-form (if man-page "man" "mdoc"))
+ (define source-form (get "option-format" "texi"))
+ (define converter (string-append source-form "2" target-form ))
+ (set! tmp-str (find-file converter))
+
+ (if (not (defined? 'tmp-str))
+ (error (string-append "cannot locate " converter)))
+ tmp-str
+:+]'
+cvt_prog=`cd \`dirname "$cvt_prog"\` >/dev/null && pwd
+ `/`basename "$cvt_prog"`
+cd $tmp_dir
+test -x "$cvt_prog" || die "'$cvt_prog' is not executable"
+{
+ list='synopsis description options option-presets'
+ for f in $list ; do cat $f ; echo ; done
+ rm -f $list name
+ list='implementation-notes environment files examples exit-status errors
+ compatibility see-also conforming-to history authors copyright bugs
+ notes'
+ for f in $list ; do cat $f ; echo ; done > .end-doc
+ rm -f $list
+ list=`ls -1 *`' .end-doc'
+ for f in $list ; do cat $f ; echo ; done
+ rm -f $list
+} 1>.doc 2>/dev/null
+[+:
+IF (exist? "doc-sub") :+][+:
+ (out-push-new (string-append tmp-dir "/.cmds")) :+][+:
+ FOR doc-sub :+][+:
+
+ IF (define field-name (get "sub-type" target-form))
+ (~~ target-form field-name) :+][+:
+
+ (set! field-name (get "sub-name"))
+ (define rep-string (string-append "<<" field-name ">>"))
+ (emit (string-substitute (get "sub-text") rep-string (get field-name)))
+ "\n"
+
+ :+][+: ENDIF :+][+:
+
+ ENDFOR doc-sub :+][+:
+
+ (out-pop)
+ (define post-proc-cmd (string-append
+ (get "doc-sub-cmd" "sed -f %s %s") " | "
+ egrep-prog " -v '^[ ]*$' | $cvt_prog"))
+ (sprintf post-proc-cmd ".cmds" ".doc")
+ :+][+:
+ELSE \:+]
+[+:(. egrep-prog):+] -v '^[ ]*$' .doc | $cvt_prog[+:
+ENDIF doc-sub exists :+][+:
+
+(shell (out-pop #t)) :+][+:
+
+ENDDEF assemble-sections
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" D O C S E C T I O N S
+.\"
+.\" Emit the files for each section that was provided.
+.\" If multiple sections exist, they get glued together with ".Pp"
+.\" between them.
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE doc-sections :+][+:
+
+FOR doc-section :+][+:
+ IF
+ (define sec-type (string-upcase (get "ds-type")))
+ (define sec-name (name-to-fname sec-type))
+ (define cvt-fn (find-file (string-append
+ (get "ds-format" "man") "2mdoc")))
+ (if (not (defined? 'cvt-fn))
+ (error (sprintf "Cannot locate converter for %s"
+ (get "ds-format" "man"))))
+
+ (define sec-file (string-append tmp-dir "/" sec-name))
+ (access? sec-file R_OK) :+][+:
+ (out-push-add sec-file)
+ (emit ".Pp\n") :+][+:
+
+ ELSE :+][+: CASE
+ (out-push-new sec-file)
+ sec-type :+][+:
+
+ == "" :+][+: (error "unnamed doc-section") :+][+:
+ *==* " " :+].Sh "[+: (. sec-type) :+]"[+:
+ * :+].Sh [+: (. sec-type) :+][+:
+ ESAC :+][+:
+ ENDIF :+]
+[+:
+ (shell (string-append
+ "fn='" cvt-fn "'\n"
+ "test -f ${fn} || die ${fn} not found from $PWD\n"
+ "${fn} <<\\_EndOfDocSection_ || die ${fn} failed in $PWD\n"
+ (get "ds-text")
+ "\n_EndOfDocSection_"
+ )) :+][+:
+
+ CASE (emit "\n") sec-type :+][+:
+ == FILES :+][+:
+ (if home-rc-files (emit home-rc-text))
+ (set! home-rc-files #f) :+][+:
+
+ == ENVIRONMENT :+][+:
+ (if environ-init (emit environ-text))
+ (set! environ-init #f) :+][+:
+ ESAC :+][+:
+
+ (out-pop)
+ :+][+:
+
+ENDFOR doc-section :+][+:
+
+ENDDEF doc-sections
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" A O S E C T I O N S
+.\"
+.\" Emit the files for the sections that these templates augment,
+.\" replace or conditionally replace
+.\"
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE ao-sections :+][+:
+ IF (. command-doc) :+][+:
+ INVOKE cond-section sec = "OPTIONS" mode = "replace" :+][+:
+ INVOKE cond-section sec = "EXIT STATUS" mode = "insert" :+][+:
+
+ IF (or home-rc-files environ-init) :+][+:
+ INVOKE cond-section sec = "OPTION PRESETS" mode = "replace" :+][+:
+
+ IF (. home-rc-files) :+][+:
+ INVOKE cond-section sec = "FILES" mode = "append" :+][+:
+ ENDIF :+][+:
+
+ IF (. environ-init) :+][+:
+ INVOKE cond-section sec = "ENVIRONMENT" mode = "append" :+][+:
+ ENDIF :+][+:
+ ENDIF :+][+:
+
+ ELSE section 5, not command :+][+:
+ INVOKE cond-section sec = "FILES" mode = "append" :+][+:
+ ENDIF section 5/not :+][+:
+
+ INVOKE cond-section sec = "SYNOPSIS" mode = "alt" :+][+:
+ INVOKE cond-section sec = "DESCRIPTION" mode = "append" :+][+:
+ INVOKE cond-section sec = "AUTHORS" mode = "alt" :+][+:
+ INVOKE cond-section sec = "BUGS" mode = "append" :+][+:
+ INVOKE cond-section sec = "NOTES" mode = "append" :+][+:
+
+IF (exist? "copyright") :+][+:
+ INVOKE cond-section sec = "COPYRIGHT" mode = "alt" :+][+:
+ENDIF :+][+:
+
+ENDDEF ao-sections
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" C O N D I T I O N A L S E C T I O N
+.\"
+.\" Figure out what to do for AutoOpts required sections, depending on "mode"
+.\" In all cases, if the file does not exist, invoke the "mk" macro to create
+.\" a new file. If it does exist, then:
+.\"
+.\" alt Alternate -- emit no text
+.\" replace throw away any pre-existing file.
+.\" append invoke the "append" macro to emit additional text
+.\" insert save the current contents, replacing the .Sh line with .Pp.
+.\" invoke the "mk" macro then emit the saved text
+.\"
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE cond-section :+][+:
+
+ IF
+ (set! sect-name (string-upcase! (string-substitute
+ (get "sec") "-" " " )))
+ (set! macro-name (string-downcase! (string-substitute
+ sect-name " " "-" )))
+ (set! file-name (string-append tmp-dir "/" macro-name))
+
+ (not (access? file-name R_OK)) :+][+:
+
+ INVOKE (sect-line-fname) :+][+:
+
+ ELSE file exists :+][+:
+
+ CASE (get "mode") :+][+:
+
+ == replace :+][+:
+ INVOKE (sect-line-fname) :+][+:
+
+ == append :+][+:
+ (out-push-add file-name) :+][+:
+ INVOKE (string-append "append-" macro-name) :+][+:
+
+ == insert :+][+:
+ (set! fname-line (shellf
+ "sed '1s/.Sh .*/.Pp/' %1$s ; rm -f %1$s" file-name)) :+][+:
+ INVOKE (sect-line-fname) :+][+:
+
+ == alt :+][+:
+ (out-push-new) :+][+:
+
+ * :+][+:
+ (error (sprintf "invalid section type: %s" (get "mode")))
+
+ :+][+:
+ ESAC :+][+:
+
+ ENDIF file existence/non-existence :+][+:
+ (out-pop) :+][+: # All paths open out :+][+:
+ENDDEF cond-section
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - D E S C R I P T I O N
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-description :+][+:
+
+ (out-push-new)
+ (emit
+ (if (exist? "prog-man-descrip")
+ (stack-join "\n.Pp\n" "prog-man-descrip")
+ (if (exist? "detail")
+ (stack-join "\n.Pp\n" "detail")
+ "There is no description for this command."
+ ) ) )
+ (shell "sed 's/^$/.sp/' <<\\_EODesc_\n" (out-pop #t) "\n_EODesc_")
+
+ :+][+:
+ INVOKE append-description :+][+:
+
+ENDDEF mk-description
+
+.\" = = = = = = = = = = = = = = = = = =
+.\" A P P E N D - D E S C R I P T I O N
+.\" = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE append-description :+][+:
+
+IF (= (get "main.main-type") "for-each"):+][+:
+
+ CASE main.handler-type :+][+:
+ ~* ^(name|file)|.*text \:+]
+.Pp
+This program will perform its function for every file named on the command
+line or every file named in a list read from stdin. The arguments or input
+names must be pre\-existing files. The input list may contain comments,
+which[+:
+
+ !E \:+]
+.Pp
+This program will perform its function for every command line argument
+or every non\-comment line in a list read from stdin.
+The input list comments[+:
+
+ * :+][+:
+ (error "the 'for-each' main has in invalid handler-type.") :+][+:
+ ESAC \:+]
+ are blank lines or lines beginning with a '[+:
+ ?% comment-char "%s" "#" :+]' character.
+[+:
+
+ENDIF - "main" is of "for-each" type :+][+:
+
+ENDDEF append-description
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - O P T I O N S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-options
+
+:+][+:
+
+(define opt-arg "")
+(define dis-name "")
+(define opt-name "")
+(define optname-from "A-Z_^")
+(define optname-to "a-z--")
+(define cvt-cmd "")
+(define formatted-doc (exist? "option-format"))
+
+(if formatted-doc (begin
+ (out-push-new)
+ (set! cvt-cmd (string-append (get "option-format") "2mdoc"))
+) )
+
+(if (exist? "preserve-case")
+ (begin
+ (set! optname-from "_^")
+ (set! optname-to "--")
+) )
+
+(define fix-optname (lambda (o_nm) (begin
+ (set! o_nm (string-tr o_nm optname-from optname-to))
+ (set! o_nm (string-substitute o_nm "-" "\\-" ))
+ o_nm )))
+
+(if (exist? "option-info")
+ (string-append ".Pp\n" (get "option-info") "\n") )
+\:+]
+.Bl -tag[+:
+
+FOR flag :+][+:
+ IF (not (exist? "documentation")) :+][+:
+ IF (exist? "aliases") :+][+:
+ INVOKE emit-alias-opt :+][+:
+ ELSE :+][+:
+ INVOKE emit-flag-text :+][+:
+ ENDIF :+][+:
+
+ ELSE :+]
+.Ss "[+: (get "descrip" "") :+]"[+:
+(set! tmp-str (get "documentation" ""))
+(if (> (string-length tmp-str) 3) (string-append
+ "\n" tmp-str "\n" )) :+][+:
+
+ ENDIF :+][+:
+ENDFOR flag
+
+.\" = = = = = = = = = = = = = = = = =
+.\" help option
+.\" = = = = = = = = = = = = = = = = =
+
+:+]
+.It [+:
+ (define tmp-val (get "help-value" "\\&?"))
+ (if (and use-flags (> (string-length tmp-val) 0))
+ (string-append "Fl " tmp-val
+ (if (exist? "long-opts") " , Fl -help" "") )
+ (string-append (if (exist? "long-opts") "Fl -" "") "help" )
+ ) \:+]
+
+Display usage information and exit.[+:#
+
+.\" = = = = = = = = = = = = = = = = =
+.\" more-help option
+.\" = = = = = = = = = = = = = = = = = :+][+:
+
+ IF (not (exist? "no-libopts")) :+]
+.It [+:
+ (define tmp-val (get "more-help-value" "\\&!"))
+ (if (and use-flags (> (string-length tmp-val) 0))
+ (string-append "Fl " tmp-val
+ (if (exist? "long-opts") " , Fl -more-help" "") )
+ (string-append (if (exist? "long-opts") "Fl -" "") "more-help" )
+ ) \:+]
+
+Pass the extended usage information through a pager.[+:
+
+ENDIF no no-libopts
+
+.\" = = = = = = = = = = = = = = = = =
+.\" save and load configuration
+.\" = = = = = = = = = = = = = = = = = :+][+:
+
+IF (exist? "homerc") :+]
+.It [+:
+
+ IF (not (exist? "disable-save")) :+][+:
+
+ (define tmp-val (get "save-opts-value" ">"))
+ (if (and use-flags (> (string-length tmp-val) 0))
+ (string-append "Fl " tmp-val " Oo Ar cfgfile Oc"
+ (if (exist? "long-opts")
+ " , Fl -save-opts Oo Ns = Ns Ar cfgfile Oc" ) "")
+ (string-append (if (exist? "long-opts") "Fl -" "")
+ "save-opts Oo Ns = Ns Ar cfgfile Oc" )
+ ) \:+]
+
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It [+:
+ ENDIF saving not disabled :+][+:
+
+ (define tmp-val (get "load-opts-value" "<"))
+ (define tmp-str (if (exist? "long-opts") "Fl -" ""))
+
+ (if (and use-flags (> (string-length tmp-val) 0))
+ (string-append "Fl " tmp-val " Ar cfgfile"
+ (if (exist? "long-opts")
+ (string-append " , " tmp-str "load-opts Ns = Ns Ar cfgfile"
+ " , " tmp-str "no-load-opts" )
+ "") )
+ (string-append tmp-str "load-opts Ns = Ns Ar cfgfile , "
+ tmp-str "no-load-opts" )
+ ) \:+]
+
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.[+:
+
+ENDIF (exist? "homerc")
+
+.\" = = = = = = = = = = = = = = = = =
+.\" version
+.\" = = = = = = = = = = = = = = = = = :+][+:
+
+IF (exist? "version") :+]
+.It [+:
+
+ (define tmp-val (get "version-value" "v"))
+ (if (and use-flags (> (string-length tmp-val) 0))
+ (string-append "Fl " tmp-val " Op Brq Ar v|c|n"
+ (if (exist? "long-opts")
+ " Fl -version Op Brq Ar v|c|n" ) "")
+ (string-append (if (exist? "long-opts") "Fl -" "")
+ "version Op Brq Ar v|c|n" )
+ ) \:+]
+
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.[+:
+ENDIF :+]
+.El
+[+:
+
+(if formatted-doc
+ (shell (string-append
+ "fn='" (find-file cvt-cmd)
+ "'\ntest -f ${fn} || die '" cvt-cmd " not found'\n"
+ "${fn} <<\\_EndOfMdoc_ || die ${fn} failed in $PWD\n"
+ (out-pop #t)
+ "\n_EndOfMdoc_" )) ) :+][+:
+
+ENDDEF mk-options
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - O P T I O N - P R E S E T S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-option-presets \:+]
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from [+:
+ IF (. home-rc-files)
+ :+]configuration ("RC" or ".INI") file(s)[+:
+ IF (. environ-init) :+] and values from
+[+:
+ ENDIF :+][+:
+ ENDIF :+][+:
+ IF (. environ-init) :+]environment variables named:
+.nf
+ \fB[+:(. UP-PROG-NAME):+]_<option-name>\fP or \fB[+:(. UP-PROG-NAME):+]\fP
+.fi
+.ad[+:
+ IF (. home-rc-files) :+]
+The environmental presets take precedence (are processed later than)
+the configuration files.[+:
+ ENDIF :+][+:
+ ELSE :+].[+:
+ ENDIF :+][+:
+
+ CASE
+ (define rc-file
+ (get "rcfile" (string-append "." (get "prog-name") "rc")) )
+ (count "homerc") :+][+:
+
+ == "0" :+][+:
+ == "1" :+][+:
+
+ CASE homerc :+][+:
+ ~~ '\.|\$HOME' :+]
+The file "\fI[+: (string-append (get "homerc") "/" rc-file)
+:+]\fP" will be used, if present.[+:
+
+ == "" :+][+:
+
+ * :+]
+The \fIhomerc\fP file is "\fI[+:homerc:+]\fP", unless that is a directory.
+In that case, the file "\fI[+: (. rc-file) :+]\fP"
+is searched for within that directory.[+:
+ ESAC :+][+:
+
+ * :+]
+The \fIhomerc\fP files are [+:
+ FOR homerc ", " :+][+:
+ IF (last-for?) :+]and [+:
+ ENDIF :+]"\fI[+: homerc :+]\fP"[+: ENDFOR :+].
+If any of these are directories, then the file \fI[+: (. rc-file) :+]\fP
+is searched for within those directories.[+:
+ ESAC :+][+:
+
+ENDDEF mk-option-presets
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - E X I T - S T A T U S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-exit-status \:+]
+One of the following exit values will be returned:
+.Bl -tag
+[+:
+(ag-fprintf 0 ".It 0 \" (EXIT_%s)\"\n%s\n"
+ (string->c-name! (string-upcase (get "exit-name[0]" "SUCCESS")))
+ (get "exit-desc[0]" "Successful program execution.") )
+
+(define need-ex-noinput (exist? "homerc"))
+(define need-ex-software #t)
+
+(ag-fprintf 0 ".It 1 \" (EXIT_%s)\"\n%s\n"
+ (string->c-name! (string-upcase (get "exit-name[1]" "FAILURE")))
+ (get "exit-desc[1]"
+ "The operation failed or the command syntax was not valid.")) :+][+:
+
+FOR exit-desc (for-from 2) :+][+:
+ (if (= (for-index) 66)
+ (set! need-ex-noinput #f)
+ (if (= (for-index) 70)
+ (set! need-ex-software #f) ))
+
+ (set! tmp-str (get (sprintf "exit-name[%d]" (for-index)) "* unnamed *"))
+ (sprintf ".It %d \" (EXIT_%s)\"\n%s\n"
+ (for-index)
+ (string-upcase (string->c-name! tmp-str))
+ (get "exit-desc" "")) :+][+:
+ENDFOR exit-desc :+][+:
+(if need-ex-noinput
+ (emit ".It 66 \" (EX_NOINPUT)\"
+A specified configuration file could not be loaded.\n"))
+
+(if need-ex-software
+ (emit ".It 70 \" (EX_SOFTWARE)\"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.\n"))
+
+(if (> (string-length fname-line) 1)
+ (emit fname-line)) :+]
+.El
+[+:
+
+ENDDEF mk-exit-status
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - A U T H O R S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-authors :+][+:
+
+ (define remove-authors #t)
+
+ (set! tmp-val
+ (if (exist? "copyright.author")
+ (stack-join ",\n" "copyright.author")
+ (stack-join ",\n" "copyright.owner") ))
+
+ (if (> (string-length tmp-val) 1)
+ (string-append tmp-val "\n")
+ (delete-file file-name))
+
+ :+][+:
+
+ENDDEF mk-authors
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - B U G S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-bugs :+][+:
+
+ (set! tmp-val (get "copyright.eaddr" (get "eaddr")))
+ (if (> (string-length tmp-val) 1)
+ (string-append "Please send bug reports to: " tmp-val "\n")
+ (delete-file file-name) )
+ :+][+:
+
+ENDDEF mk-bugs :+][+:
+
+DEFINE append-bugs :+][+:
+
+ (set! tmp-val (get "copyright.eaddr" (get "eaddr")))
+ (if (> (string-length tmp-val) 1)
+ (string-append "\n.Pp\nPlease send bug reports to: " tmp-val "\n") )
+ :+][+:
+
+ENDDEF append-bugs
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - C O P Y R I G H T (+ licensing)
+.\"
+.\" This section is guaranteed to be the last section in the man page
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-copyright \:+]
+Copyright (C) [+: copyright.date :+] [+:
+ (get "copyright.owner" (get "copyright.author" (get "copyright.eaddr")))
+ :+] all rights reserved.
+[+: CASE (get "copyright.type") :+][+:
+ = note :+][+: (get "copyright.text") :+][+:
+ == '' :+]This program has an unspecified license.[+:
+
+ * :+][+:
+ (string-append "This program is released under the terms of "
+ (license-name (get "copyright.type")) ".") :+][+:
+
+ ESAC :+]
+[+:
+ENDDEF mk-copyright
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - N O T E S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-notes \:+]
+This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP
+option definitions.
+[+:
+
+ENDDEF mk-notes
+
+.\" = = = = = APPEND TO IT: :+][+:
+
+DEFINE append-notes :+]
+.Pp
+This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP
+option definitions.[+:
+
+ENDDEF append-notes
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - E N V I R O N M E N T
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-environment :+][+:
+ INVOKE append-environment :+][+:
+ENDDEF mk-environment
+
+.\" = = = = = APPEND TO IT: :+][+:
+
+DEFINE append-environment :+]
+[+:(. environ-text) :+][+:
+ENDDEF append-environment
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" M K - F I L E S
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE mk-files :+][+:
+ INVOKE append-files :+][+:
+ENDDEF mk-files
+
+.\" = = = = = APPEND TO IT: :+][+:
+
+DEFINE append-files :+]
+[+:(. home-rc-text) :+][+:
+ENDDEF append-files
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" E M I T A L I A S O P T
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE emit-alias-opt :+]
+.It [+:
+ IF (exist? "value") :+][+:
+ IF (exist? "long-opts") \:+]
+ Fl [+:value:+] , Fl \-[+: name :+][+:
+ ELSE \:+]
+ Fl [+:value:+][+:
+ ENDIF (exist? "long-opts") :+][+:
+
+ ELSE value does not exist -- named option only :+][+:
+
+ IF (not (exist? "long-opts")) \:+]
+ [+: name :+][+:
+ ELSE \:+]
+ Fl \-[+: (get "name") :+][+:
+ ENDIF :+][+:
+ ENDIF :+]
+This is an alias for the \fI--[+: aliases :+]\fR option.[+:
+ IF (exist? "deprecated") :+]
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+[+:
+ ENDIF :+][+:
+ENDDEF emit-alias-opt
+
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\" E M I T F L A G T E X T
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE emit-flag-text :+][+:
+
+ (if (exist? "enable")
+ (set! opt-name (string-append (get "enable") "-" (get "name")))
+ (set! opt-name (get "name")) )
+ (if (exist? "disable")
+ (set! dis-name (string-append (get "disable") "-" (get "name")))
+ (set! dis-name "") )
+
+ (set! opt-name (fix-optname opt-name))
+ (if (> (string-length dis-name) 0)
+ (set! dis-name (fix-optname dis-name)) )
+
+ (if (not (exist? "arg-type"))
+ (set! opt-arg "")
+ (set! opt-arg (string-append "Ar "
+ (fix-optname (if (exist? "arg-name")
+ (get "arg-name")
+ (string-downcase! (get "arg-type")) ))
+ ))
+ )
+
+:+]
+.It [+:
+ IF (exist? "value") :+][+:
+ IF (exist? "long-opts") :+][+:
+
+ # * * * * * * * * * * * * * * * * * * * *
+ *
+ * The option has a flag value (character) AND
+ * the program uses long options
+ *
+ \:+]
+ Fl [+:value:+][+:
+ IF (not (exist? "arg-type")) :+] , Fl -[+:
+ ELSE :+] [+:(. opt-arg):+] , Fl -[+:
+ ENDIF :+][+: (. opt-name) :+] [+:
+ IF (exist? "arg-type") :+][+:
+ ? arg-optional Oo Ns = Ns
+ :+] [+: (. opt-arg) :+] [+:
+ arg-optional Oc :+][+:
+ ENDIF :+][+:
+ IF (exist? "disable") :+] , Fl -[+:(. dis-name):+][+:
+ ENDIF :+][+:
+
+ ELSE :+][+:
+
+ # * * * * * * * * * * * * * * * * * * * *
+ *
+ * The option has a flag value (character) BUT
+ * the program does _NOT_ use long options
+ *
+ \:+]
+ Fl [+:value:+] [+:
+ IF (exist? "arg-type") :+][+:
+ arg-optional Oo :+] [+:(. opt-arg):+] [+:
+ arg-optional Oc :+] [+:
+ ENDIF " :+][+:
+ ENDIF (exist? "long-opts") :+][+:
+
+
+ ELSE value does not exist -- named option only :+][+:
+
+ IF (not (exist? "long-opts")) :+][+:
+
+ # * * * * * * * * * * * * * * * * * * * *
+ *
+ * The option does not have a flag value (character).
+ * The program does _NOT_ use long options either.
+ * Special magic: All arguments are named options.
+ *
+ \:+]
+ [+: (. opt-name) :+] [+:
+ IF (exist? "arg-type") :+] [+:
+ ? arg-optional ' Oo = Ns' ' Ns = Ns '
+ :+] [+:(. opt-arg) :+] [+:
+ arg-optional Oc :+] [+:
+ ENDIF:+][+:
+ IF (exist? "disable") :+] , Fl -[+:(. dis-name):+][+:
+ ENDIF :+][+:
+
+
+ ELSE :+][+:
+ # * * * * * * * * * * * * * * * * * * * *
+ *
+ * The option does not have a flag value (character).
+ * The program, instead, only accepts long options.
+ *
+ \:+]
+ Fl -[+: (. opt-name) :+] [+:
+
+ IF (exist? "arg-type") :+][+:
+ arg-optional Oo :+] Ns = Ns [+:(. opt-arg):+] [+:
+ arg-optional Oc :+][+:
+ ENDIF :+][+:
+
+ IF (exist? "disable")
+ :+], " Fl \-[+:(. dis-name):+]"[+:
+ ENDIF :+][+:
+ ENDIF :+][+:
+ ENDIF :+]
+[+: (get "descrip" "") :+].[+:
+
+ IF (exist? "min") :+]
+This option is required to appear.[+:
+ ENDIF :+][+:
+
+ IF (exist? "max") :+]
+This option may appear [+:
+ IF % max (= "%s" "NOLIMIT")
+ :+]an unlimited number of times[+:ELSE
+ :+]up to [+: max :+] times[+:
+ ENDIF:+].[+:
+ ENDIF:+][+:
+
+ IF (exist? "disable") :+]
+The \fI[+:(. dis-name):+]\fP form will [+:
+ IF (exist? "stack-arg")
+ :+]clear the list of option arguments[+:
+ ELSE :+]disable the option[+:
+ ENDIF :+].[+:
+ ENDIF:+][+:
+
+ IF (exist? "enabled") :+]
+This option is enabled by default.[+:
+ ENDIF :+][+:
+
+ IF (exist? "no-preset") :+]
+This option may not be preset with environment variables
+or in initialization (rc) files.[+:
+ ENDIF :+][+:
+
+ IF (and (exist? "default") named-mode) :+]
+This option is the default option.[+:
+ ENDIF :+][+:
+
+ IF (exist? "equivalence") :+]
+This option is a member of the [+:equivalence:+] class of options.[+:
+ ENDIF :+][+:
+
+ IF (exist? "flags-must") :+]
+This option must appear in combination with the following options:
+[+: FOR flags-must ", " :+][+:flags-must:+][+:ENDFOR:+].[+:
+ ENDIF :+][+:
+
+ IF (exist? "flags-cant") :+]
+This option must not appear in combination with any of the following options:
+[+: FOR flags-cant ", " :+][+:flags-cant:+][+:ENDFOR:+].[+:
+ ENDIF :+][+:
+
+
+ IF (~* (get "arg-type") "key|set") :+]
+This option takes a keyword as its argument[+:
+
+ IF (=* (get "arg-type") "set")
+
+:+] list. Each entry turns on or off
+membership bits. The bits are set by name or numeric value and cleared
+by preceding the name or number with an exclamation character ('!').
+They can all be cleared with the magic name \fInone\fR and they can all be set
+with
+.IR all .
+A single option will process a list of these values.[+:
+
+ ELSE
+
+:+]. The argument sets an enumeration value that can
+be tested by comparing them against the option value macro.[+:
+
+ ENDIF
+
+:+]
+The available keywords are:
+.in +4
+.nf
+.na
+[+: (shellf "${CLexe} --indent='' --spread=1 -W50 <<_EOF_\n%s\n_EOF_"
+ (join "\n" (stack "keyword")) ) :+]
+.fi
+or their numeric equivalent.
+.in -4[+: (if (exist? "arg-default") "\n.sp" ) :+][+:
+
+ ELIF (=* (get "arg-type") "num") :+]
+This option takes an integer number as its argument.[+:
+
+ IF (exist? "arg-range") :+]
+The value of
+.[+:(. opt-arg):+]
+is constrained to being:
+.in +4
+.nf
+.na[+:FOR arg_range ", or" :+]
+[+: (shellf "
+range='%s'
+
+case \"X${range}\" in
+X'->'?* )
+ echo \"less than or equal to\" `
+ echo $range | sed 's/->//' ` ;;
+
+X?*'->' )
+ echo \"greater than or equal to\" `
+ echo $range | sed 's/->.*//' ` ;;
+
+X?*'->'?* )
+ echo \"in the range \" `
+ echo $range | sed 's/->/ through /' ` ;;
+
+X?* )
+ echo exactly $range ;;
+
+X* ) echo $range is indeterminate
+esac"
+
+(get "arg-range") )
+:+][+:
+ ENDFOR arg-range :+]
+.fi
+.in -4[+:
+
+ ENDIF arg-range exists :+][+:
+
+ ENDIF arg-type key/set/num :+][+:
+
+ IF (exist? "arg-default") :+]
+The default
+.[+: (. opt-arg) :+]
+for this option is:
+.ti +4
+ [+: (join " + " (stack "arg-default" )) :+][+:
+ ENDIF :+]
+.sp
+[+:
+ (if (exist? "doc") (string-substitute (get "doc" "") "\n\n" "\n.sp\n")
+ "This option has not been fully documented." ) :+][+:
+ IF (exist? "deprecated") :+]
+.sp
+.B
+NOTE: THIS OPTION IS DEPRECATED
+[+:
+ ENDIF :+][+:
+
+ENDDEF emit-flag-text
+
+.\" cmd-doc.tlib ends here \:+]
diff --git a/sntp/ag-tpl/0-old/mdoc-synopsis.tlib b/sntp/ag-tpl/0-old/mdoc-synopsis.tlib
new file mode 100644
index 000000000000..35fe05bbdbdb
--- /dev/null
+++ b/sntp/ag-tpl/0-old/mdoc-synopsis.tlib
@@ -0,0 +1,92 @@
+[+: autogen5 template man :+][+:
+DEFINE mk-synopsis :+][+:
+ (out-push-new file-name) \:+]
+.Sh SYNOPSIS
+.Nm[+:
+
+ IF (. use-flags) :+][+:
+ IF (exist? "long-opts") :+]
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[+: ELSE no long options: :+]
+.Op Fl flags
+.Op Fl flag Op Ar value
+[+: ENDIF
+ :+][+:
+ ELIF (exist? "long-opts")
+ :+]
+.Op Fl \-option-name
+.Op Fl \-option-name Ar value
+[+:
+
+ ELIF (not (exist? "argument")) :+]
+.Op Ar option\-name Ar value
+.Pp
+All arguments are named options.
+[+:
+ ENDIF :+][+:
+
+ IF (exist? "argument") :+][+:
+ argument :+][+:
+
+ IF (exist? "reorder-args") :+]
+.Pp
+Operands and options may be intermixed. They will be reordered.
+[+: ENDIF :+][+:
+
+ ELIF (or (exist? "long-opts") use-flags)
+
+:+]
+.Pp
+All arguments must be options.
+[+:
+
+ ENDIF :+][+:
+
+ IF (exist? "main") :+][+:
+ CASE main.main-type :+][+:
+ == shell-process :+]
+.Pp
+This program will emit text that is expected to be evaluated by
+a Bourne-compatible shell, thus digesting the options for the script.[+:
+
+ == shell-parser :+]
+.Pp
+This program is designed to produce output suitable for inclusion
+into a shell script that will parse the options described.[+:
+
+ == for-each :+]
+.Pp
+The operands that this program operates on may be specified either
+on the command line or read from standard input, one per line.
+In that input, leading and trailing white space is stripped,
+blank lines are ignored[+:
+
+ IF (define comment-char (get "comment-char" "#"))
+ (> (string-length comment-char) 1) \:+]
+ and lines beginning with the character
+.I [+: (substring comment-char 1 0):+]
+are treated as comments[+:
+ ENDIF :+].[+:
+
+ IF (exist? "interleaved") :+]
+Options may be interleaved with operands both on the command
+line and when operands are read from standard input.[+:
+ ENDIF interleaved
+
+:+]
+Standard input may not be a terminal.[+:
+
+ ESAC main-type :+][+:
+ ENDIF main exists :+]
+.Pp
+[+:
+
+FOR explain "\n.Pp\n" :+][+:
+ (get "explain" "") :+][+:
+ENDFOR :+][+:
+
+(out-pop) :+][+:
+ENDDEF mk-synopsis :+]
diff --git a/sntp/ag-tpl/0-old/mdoc2man b/sntp/ag-tpl/0-old/mdoc2man
new file mode 100755
index 000000000000..459505900a47
--- /dev/null
+++ b/sntp/ag-tpl/0-old/mdoc2man
@@ -0,0 +1,193 @@
+#!/usr/bin/perl
+
+### ToDo
+# Properly implement -columns in the "my %lists" definition...
+#
+# .Xr requires at least 1 arg, the code here expects at least 2
+###
+
+package mdoc2man;
+use strict;
+use warnings;
+use File::Basename;
+use lib dirname(__FILE__);
+use Mdoc qw(hs ns pp mapwords son soff stoggle gen_encloser);
+
+########
+## Basic
+########
+
+Mdoc::def_macro( '.Sh', sub { '.SH', hs, @_ }, raw => 1);
+Mdoc::def_macro( '.Ss', sub { '.SS', hs, @_ }, raw => 1);
+Mdoc::def_macro( '.Pp', sub { ".sp \\n(Ppu\n.ne 2\n" } );
+Mdoc::def_macro( '.Nd', sub { "\\- @_" } );
+
+# Macros that enclose things
+Mdoc::def_macro( '.Brq', gen_encloser(qw({ })) , greedy => 1 );
+Mdoc::def_macro( '.Op' , gen_encloser(qw([ ])) , greedy => 1 );
+Mdoc::def_macro( '.Qq' , gen_encloser(qw(" ")) , greedy => 1 );
+Mdoc::def_macro( '.Dq' , gen_encloser(qw(\*[Lq] \*[Rq])), greedy => 1 );
+Mdoc::def_macro( '.Ql' , gen_encloser(qw(\[oq] \[cq])) , greedy => 1 );
+Mdoc::def_macro( '.Sq' , gen_encloser(qw(\[oq] \[cq])) , greedy => 1 );
+Mdoc::def_macro( '.Pq' , gen_encloser(qw/( )/) , greedy => 1 );
+Mdoc::def_macro( '.D1' , sub { ".in +4\n", ns, @_ , ns , "\n.in -4" } , greedy => 1);
+
+Mdoc::def_macro( 'Oo', sub { '[', @_ } );
+Mdoc::def_macro( 'Oc', sub { ']', @_ } );
+
+Mdoc::def_macro( 'Po', sub { '(', @_} );
+Mdoc::def_macro( 'Pc', sub { ')', @_ } );
+
+Mdoc::def_macro( 'Bro', sub { '{', ns, @_ } );
+Mdoc::def_macro( 'Brc', sub { '}', @_ } );
+
+Mdoc::def_macro( '.Oo', gen_encloser(qw([ ])), concat_until => '.Oc' );
+Mdoc::def_macro( '.Bro', gen_encloser(qw({ })), concat_until => '.Brc' );
+Mdoc::def_macro( '.Po', gen_encloser(qw/( )/), concat_until => '.Pc' );
+
+Mdoc::def_macro( '.Ev', sub { @_ } );
+Mdoc::def_macro( '.An', sub { ".NOP ", @_, "\n.br" }, raw => 1 );
+Mdoc::def_macro( '.Li', sub { mapwords {"\\f[C]$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Cm', sub { mapwords {"\\f\\*[B-Font]$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Ic', sub { mapwords {"\\f\\*[B-Font]$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Fl', sub { mapwords {"\\f\\*[B-Font]\\-$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Ar', sub { mapwords {"\\f\\*[I-Font]$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Em', sub { mapwords {"\\fI$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Va', sub { mapwords {"\\fI$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Sx', sub { mapwords {"\\fI$_\\f[]"} @_ } );
+Mdoc::def_macro( '.Xr', sub { "\\fC".(shift)."\\fR(".(shift).")\\f[]", @_ } );
+Mdoc::def_macro( '.Fn', sub { "\\f\\*[B-Font]".(shift)."\\fR()\\f[]" } );
+Mdoc::def_macro( '.Fn', sub { "\\fB".(shift)."\\fR()\\f[]" } );
+Mdoc::def_macro( '.Fx', sub { "FreeBSD", @_ } );
+Mdoc::def_macro( '.Ux', sub { "UNIX", @_ } );
+
+Mdoc::def_macro( '.No', sub { ".NOP", map { ($_, ns) } @_ } );
+Mdoc::def_macro( '.Pa', sub { mapwords {"\\fI$_\\f[]"} @_; } );
+{
+ my $name;
+ Mdoc::def_macro('.Nm', sub {
+ $name = shift if (!$name);
+ "\\f\\*[B-Font]$name\\fP", @_
+ } );
+}
+
+########
+## lists
+########
+
+my %lists = (
+ bullet => sub {
+ Mdoc::def_macro('.It', sub { '.IP \fB\(bu\fP 2' });
+ },
+
+ column => sub {
+ Mdoc::def_macro('.It', sub { '.IP \fB\(bu\fP 2' });
+ },
+
+ tag => sub {
+ my (%opts) = @_;
+
+ my $width = '';
+
+ if (exists $opts{width}) {
+ $width = ' '.((length $opts{width})+1);
+ }
+
+ if (exists $opts{compact}) {
+ my $dobrns = 0;
+ Mdoc::def_macro('.It', sub {
+ my @ret = (".TP$width\n.NOP", hs);
+ if ($dobrns) {
+ ".br\n.ns\n", ns, @ret, @_;
+ }
+ else {
+ $dobrns = 1;
+ @ret, @_;
+ }
+ }, raw => 1);
+ }
+ else {
+ Mdoc::def_macro('.It', sub {
+ ".TP$width\n.NOP", hs, @_
+ }, raw => 1);
+ }
+ },
+);
+
+Mdoc::set_Bl_callback(do { my $nested = 0; sub {
+ my $type = shift;
+ my %opts = Mdoc::parse_opts(@_);
+ if (defined $type && $type =~ /-(\w+)/ && exists $lists{$1}) {
+
+ # Wrap nested lists with .RS and .RE
+ Mdoc::set_El_callback(sub {
+ return '.RE' if $nested-- > 1;
+ return '.PP';
+ });
+
+ $lists{$1}->(%opts);
+
+ if ($nested++) {
+ return ".RS";
+ }
+ else {
+ return ();
+ }
+ }
+ else {
+ die "Invalid list type <$type>";
+ }
+}}, raw => 1);
+
+# don't bother with arguments for now and do what mdoc2man'.sh' did
+
+Mdoc::def_macro('.Bd', sub { ".br\n.in +4\n.nf" } );
+Mdoc::def_macro('.Ed', sub { ".in -4\n.fi" } );
+
+Mdoc::set_Re_callback(sub {
+ my ($reference) = @_;
+ <<"REF";
+$reference->{authors},
+\\fI$reference->{title}\\fR,
+$reference->{optional}\n.PP
+REF
+});
+
+# Define all macros which have the same sub for inline and standalone macro
+for (qw(Xr Em Ar Fl Ic Cm Qq Op Nm Pa Sq Li Va Brq Pq Fx Ux)) {
+ my $m = Mdoc::get_macro(".$_");
+ Mdoc::def_macro($_, delete $m->{run}, %$m);
+}
+
+sub print_line {
+ print shift;
+ print "\n";
+}
+
+sub run {
+ print <<'DEFS';
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+DEFS
+
+ while (my ($macro, @args) = Mdoc::parse_line(\*STDIN, \&print_line)) {
+ my @ret = Mdoc::call_macro($macro, @args);
+ print_line(Mdoc::to_string(@ret)) if @ret;
+ }
+ return 0;
+}
+
+exit run(@ARGV) unless caller;
+
+1;
+__END__
diff --git a/sntp/ag-tpl/0-old/mdoc2texi b/sntp/ag-tpl/0-old/mdoc2texi
new file mode 100755
index 000000000000..e4966ad083a4
--- /dev/null
+++ b/sntp/ag-tpl/0-old/mdoc2texi
@@ -0,0 +1,162 @@
+#! /usr/bin/perl
+
+### To Do:
+
+# the Bl -column command needs work:
+# - support for "-offset"
+# - support for the header widths
+
+#
+
+###
+
+package mdoc2texi;
+use strict;
+use warnings;
+use File::Basename qw(dirname);
+use lib dirname(__FILE__);
+use Mdoc qw(ns pp hs mapwords gen_encloser nl);
+
+# Ignore commments
+Mdoc::def_macro( '.\"', sub { () } );
+
+# Enclosers
+Mdoc::def_macro( '.An', sub { @_, ns, '@*' } );
+Mdoc::def_macro( '.Aq', gen_encloser(qw(< >)), greedy => 1);
+Mdoc::def_macro( '.Bq', gen_encloser(qw([ ])), greedy => 1);
+Mdoc::def_macro( '.Brq', gen_encloser(qw(@{ @})), greedy => 1);
+Mdoc::def_macro( '.Pq', gen_encloser(qw/( )/), greedy => 1);
+Mdoc::def_macro( '.Qq', gen_encloser(qw(" ")), greedy => 1);
+Mdoc::def_macro( '.Op', gen_encloser(qw(@code{[ ]})), greedy => 1);
+Mdoc::def_macro( '.Ql', gen_encloser(qw(@quoteleft{} @quoteright{})),
+ greedy => 1);
+Mdoc::def_macro( '.Sq', gen_encloser(qw(@quoteleft{} @quoteright{})),
+ greedy => 1);
+Mdoc::def_macro( '.Dq', gen_encloser(qw(@quotedblleft{} @quotedblright{})),
+ greedy => 1);
+Mdoc::def_macro( '.Eq', sub {
+ my ($o, $c) = (shift, pop);
+ gen_encloser($o, $c)->(@_)
+}, greedy => 1);
+Mdoc::def_macro( '.D1', sub { "\@example\n", ns, @_, ns, "\n\@end example" },
+ greedy => 1);
+Mdoc::def_macro( '.Dl', sub { "\@example\n", ns, @_, ns, "\n\@end example" },
+ greedy => 1);
+
+Mdoc::def_macro( '.Oo', gen_encloser(qw(@code{[ ]})), concat_until => '.Oc');
+Mdoc::def_macro( 'Oo', sub { '@code{[', ns, @_ } );
+Mdoc::def_macro( 'Oc', sub { @_, ns, pp(']}') } );
+
+Mdoc::def_macro( '.Bro', gen_encloser(qw(@code{@{ @}})), concat_until => '.Brc');
+Mdoc::def_macro( 'Bro', sub { '@code{@{', ns, @_ } );
+Mdoc::def_macro( 'Brc', sub { @_, ns, pp('@}}') } );
+
+Mdoc::def_macro( '.Po', gen_encloser(qw/( )/), concat_until => '.Pc');
+Mdoc::def_macro( 'Po', sub { '(', @_ } );
+Mdoc::def_macro( 'Pc', sub { @_, ')' } );
+
+Mdoc::def_macro( '.Ar', sub { mapwords {"\@kbd{$_}"} @_ } );
+Mdoc::def_macro( '.Fl', sub { mapwords {"\@code{-$_}"} @_ } );
+Mdoc::def_macro( '.Cm', sub { mapwords {"\@code{-$_}"} @_ } );
+Mdoc::def_macro( '.Ic', sub { mapwords {"\@code{$_}"} @_ } );
+Mdoc::def_macro( '.Cm', sub { mapwords {"\@code{$_}"} @_ } );
+Mdoc::def_macro( '.Li', sub { mapwords {"\@code{$_}"} @_ } );
+Mdoc::def_macro( '.Va', sub { mapwords {"\@code{$_}"} @_ } );
+Mdoc::def_macro( '.Em', sub { mapwords {"\@emph{$_}"} @_ } );
+Mdoc::def_macro( '.Fn', sub { '@code{'.(shift).'()}' } );
+Mdoc::def_macro( '.Ss', sub { "\@subsubsection", hs, @_ });
+Mdoc::def_macro( '.Sh', sub {
+ my $name = "@_";
+ "\@node", hs, "$name\n", ns, "\@subsection", hs, $name
+ });
+Mdoc::def_macro( '.Ss', sub { "\@subsubsection", hs, @_ });
+Mdoc::def_macro( '.Xr', sub { '@code{'.(shift).'('.(shift).')}', @_ } );
+Mdoc::def_macro( '.Sx', gen_encloser(qw(@ref{ })) );
+Mdoc::def_macro( '.Ux', sub { '@sc{unix}', @_ } );
+Mdoc::def_macro( '.Fx', sub { '@sc{freebsd}', @_ } );
+{
+ my $name;
+ Mdoc::def_macro('.Nm', sub {
+ $name = shift || $ENV{AG_DEF_PROG_NAME} || 'XXX' if (!$name);
+ "\@code{$name}"
+ } );
+}
+Mdoc::def_macro( '.Pa', sub { mapwords {"\@file{$_}"} @_ } );
+Mdoc::def_macro( '.Pp', sub { '' } );
+
+# Setup references
+
+Mdoc::def_macro( '.Rs', sub { "\@*\n", @_ } );
+Mdoc::set_Re_callback(sub {
+ my ($reference) = @_;
+ "@*\n", ns, $reference->{authors}, ',', "\@emph{$reference->{title}}",
+ ',', $reference->{optional}
+ });
+
+# Set up Bd/Ed
+
+my %displays = (
+ literal => [ '@verbatim', '@end verbatim' ],
+);
+
+Mdoc::def_macro( '.Bd', sub {
+ (my $type = shift) =~ s/^-//;
+ die "Not supported display type <$type>"
+ if not exists $displays{ $type };
+
+ my $orig_ed = Mdoc::get_macro('.Ed');
+ Mdoc::def_macro('.Ed', sub {
+ Mdoc::def_macro('.Ed', delete $orig_ed->{run}, %$orig_ed);
+ $displays{ $type }[1];
+ });
+ $displays{ $type }[0]
+ });
+Mdoc::def_macro('.Ed', sub { die '.Ed used but .Bd was not seen' });
+
+# Set up Bl/El
+
+my %lists = (
+ bullet => [ '@itemize @bullet', '@end itemize' ],
+ tag => [ '@table @asis', '@end table' ],
+ column => [ '@table @asis', '@end table' ],
+);
+
+Mdoc::set_Bl_callback(sub {
+ my $type = shift;
+ die "Specify a list type" if not defined $type;
+ $type =~ s/^-//;
+ die "Not supported list type <$type>" if not exists $lists{ $type };
+ Mdoc::set_El_callback(sub { $lists{ $type }[1] });
+ $lists{ $type }[0]
+ });
+Mdoc::def_macro('.It', sub { '@item', hs, @_ });
+
+for (qw(Aq Bq Brq Pq Qq Ql Sq Dq Eq Ar Fl Ic Pa Op Cm Li Fx Ux Va)) {
+ my $m = Mdoc::get_macro(".$_");
+ Mdoc::def_macro($_, delete $m->{run}, %$m);
+}
+
+sub print_line {
+ my $s = shift;
+ $s =~ s/\\&//g;
+ print "$s\n";
+}
+
+sub preprocess_args {
+ $_ =~ s/([{}])/\@$1/g for @_;
+}
+
+sub run {
+ while (my ($macro, @args) = Mdoc::parse_line(\*STDIN, \&print_line,
+ \&preprocess_args)
+ ) {
+ my @ret = Mdoc::call_macro($macro, @args);
+ if (@ret) {
+ my $s = Mdoc::to_string(@ret);
+ print_line($s);
+ }
+ }
+ return 0;
+}
+
+exit run(@ARGV) unless caller;
diff --git a/sntp/ag-tpl/0-old/perlopt.tpl b/sntp/ag-tpl/0-old/perlopt.tpl
new file mode 100644
index 000000000000..c4fd695838a5
--- /dev/null
+++ b/sntp/ag-tpl/0-old/perlopt.tpl
@@ -0,0 +1,188 @@
+[= AutoGen5 template foo=(base-name) -*- Mode: scheme -*-=]
+[=
+
+(emit (dne "# "))
+
+(if (not (and (exist? "prog-name") (exist? "prog-title") (exist? "version")))
+ (error "prog-name and prog-title are required"))
+(define prog-name (get "prog-name"))
+
+(if (> (string-length prog-name) 16)
+ (error (sprintf "prog-name limited to 16 characters: %s"
+ prog-name)) )
+(if (not (exist? "long-opts"))
+ (error "long-opts is required"))
+
+;; perl list containing string to initialize the option hash
+(define perl_opts "")
+;; perl list containing option definitions for Getopt::Long
+(define perl_defs " ")
+;; usage string
+(define perl_usage "")
+
+(define optname-from "A-Z_^")
+(define optname-to "a-z--")
+(define counter 0)
+
+(define q (lambda (s) (string-append "'" s "'")))
+(define qp (lambda (s) (string-append "q{" s "}")))
+
+=][=
+
+FOR flag =][=
+
+(define optarg "") ;; the option argument for Getopt::Long
+(define opttarget "''") ;; the value of a hash key that represents option
+(define optargname "")
+(define optisarray #f)
+(define optname (string-tr! (get "name") optname-from optname-to))
+
+=][= #
+;; since autoopts doesn't support float we take the combination arg-name =
+;; float and arg-type = string as float
+=][=
+ IF arg-type =][=
+ CASE arg-type =][=
+
+ =* num =][= (set! optarg "=i") =][=
+
+ =* str =][=
+ (if (and (exist? "arg-name") (== (get "arg-name") "float"))
+ (set! optarg "=f")
+ (set! optarg "=s")
+ ) =][=
+
+ * =][=
+ (error (string-append "unknown arg type '"
+ (get "arg-type") "' for " (get "name"))) =][=
+ ESAC arg-type =][=
+ ENDIF =][=
+
+(if (exist? "stack-arg")
+ ;; set optarget to array reference if can take more than one value
+ ;; FIXME: if "max" exists, then just presume it is greater than 1
+ ;;
+ (if (and (exist? "max") (== (get "max") "NOLIMIT"))
+ (begin
+ (set! opttarget (string-append
+ "["
+ (if (exist? "arg-default") (q (get "arg-default")) "")
+ "]"
+ )
+ )
+ (set! optisarray #t)
+ )
+ (error "If stack-arg then max has to be NOLIMIT")
+ )
+ ;; just scalar otherwise
+ (if (exist? "arg-default") (set! opttarget (q (get "arg-default"))))
+)
+
+(set! perl_opts (string-append perl_opts
+ "'" (get "name") "' => " opttarget ",\n "))
+
+(define def_add (string-append "'" optname (if (exist? "value")
+ (string-append "|" (get "value")) "") optarg "',"))
+
+(define add_len (+ (string-length def_add) counter))
+(if (> add_len 80)
+ (begin
+ (set! perl_defs (string-append perl_defs "\n " def_add))
+ (set! counter 8)
+ )
+ (begin
+ (set! perl_defs (string-append perl_defs " " def_add))
+ (set! counter (+ counter add_len))
+ )
+)
+
+(if (exist? "arg-type")
+ (if (and (exist? "arg-name") (== (get "arg-name") "float"))
+ (set! optargname "=float")
+ (set! optargname (string-append "=" (substring (get "arg-type") 0 3)))
+ )
+ (set! optargname " ")
+)
+
+(if (not (exist? "deprecated"))
+ (set! perl_usage (string-append perl_usage
+ (sprintf "\n %-28s %s" (string-append
+ (if (exist? "value") (string-append "-" (get "value") ",") " ")
+ " --"
+ (get "name")
+ optargname)
+ (get "descrip"))
+) ) )
+(if optisarray
+ (set! perl_usage (string-append perl_usage
+ "\n - may appear multiple times"))
+)
+
+=][=
+
+ENDFOR each "flag" =]
+
+use Getopt::Long qw(GetOptionsFromArray);
+Getopt::Long::Configure(qw(no_auto_abbrev no_ignore_case_always));
+
+my $usage;
+
+sub usage {
+ my ($ret) = @_;
+ print STDERR $usage;
+ exit $ret;
+}
+
+sub paged_usage {
+ my ($ret) = @_;
+ my $pager = $ENV{PAGER} || '(less || more)';
+
+ open STDOUT, "| $pager" or die "Can't fork a pager: $!";
+ print $usage;
+
+ exit $ret;
+}
+
+sub processOptions {
+ my $args = shift;
+
+ my $opts = {
+ [= (. perl_opts) =]'help' => '', 'more-help' => ''
+ };
+ my $argument = '[= argument =]';
+ my $ret = GetOptionsFromArray($args, $opts, (
+[= (. perl_defs) =]
+ 'help|?', 'more-help'));
+
+ $usage = <<'USAGE';
+[= prog-name =] - [= prog-title =] - Ver. [= version =]
+USAGE: [= prog-name =] [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [= argument =]
+[= (. perl_usage) =]
+ -?, --help Display usage information and exit
+ --more-help Pass the extended usage information through a pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+USAGE
+
+ usage(0) if $opts->{'help'};
+ paged_usage(0) if $opts->{'more-help'};[=
+
+CASE argument =][=
+!E =][=
+==* "[" =][=
+* =]
+
+ if ($argument && $argument =~ /^[^\[]/ && !@$args) {
+ print STDERR "Not enough arguments supplied (See --help/-?)\n";
+ exit 1;
+ }[=
+
+ESAC
+
+=]
+ $_[0] = $opts;
+ return $ret;
+}
+
+END { close STDOUT };
diff --git a/sntp/autogen-version.def b/sntp/autogen-version.def
deleted file mode 100644
index d69457ccf1e0..000000000000
--- a/sntp/autogen-version.def
+++ /dev/null
@@ -1,2 +0,0 @@
-#assert (version-compare >= autogen-version "5.11.9")
-guard-option-names;
diff --git a/sntp/bincheck.mf b/sntp/bincheck.mf
index 326b7adedf6a..67f461f8cb36 100644
--- a/sntp/bincheck.mf
+++ b/sntp/bincheck.mf
@@ -3,13 +3,15 @@
# subdir to warn folks if there is another version there.
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
diff --git a/sntp/check-libntp.mf b/sntp/check-libntp.mf
new file mode 100644
index 000000000000..b867a3a9a9f7
--- /dev/null
+++ b/sntp/check-libntp.mf
@@ -0,0 +1,15 @@
+## check-libntp.mf - automake fragment
+##
+## tests/libntp/Makefile.am
+## sntp/tests/Makefile.am
+## The above files have adaptations of this for deeper nesting.
+
+BUILT_SOURCES += check-libntp
+CLEANFILES += check-libntp
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
diff --git a/sntp/check-libopts.mf b/sntp/check-libopts.mf
new file mode 100644
index 000000000000..7c79b3fcfcc0
--- /dev/null
+++ b/sntp/check-libopts.mf
@@ -0,0 +1,14 @@
+## check-libopts.mf - automake fragment
+##
+## If we are not using the tearoff libopts, we won't be
+## building its libopts.la, so the submake is allowed
+## to fail.
+
+BUILT_SOURCES += check-libopts
+CLEANFILES += check-libopts
+
+check-libopts: libopts/libopts.la
+ @echo stamp > $@
+
+libopts/libopts.la:
+ -cd libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
diff --git a/sntp/config.h.in b/sntp/config.h.in
index 69fa2e3a110f..122fee502b3e 100644
--- a/sntp/config.h.in
+++ b/sntp/config.h.in
@@ -1,8 +1,37 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* why not HAVE_P_S? */
+#undef CALL_PTHREAD_SETCONCURRENCY
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Enable debugging code? */
+#undef DEBUG
+
/* Directory separator character, usually / or \\ */
#undef DIR_SEP
+/* number of args to el_init() */
+#undef EL_INIT_ARGS
+
+/* nls support in libopts */
+#undef ENABLE_NLS
+
+/* successful termination */
+#undef EX_OK
+
+/* internal software error */
+#undef EX_SOFTWARE
+
/* fopen(3) accepts a 'b' in the mode flag */
#undef FOPEN_BINARY_FLAG
@@ -12,9 +41,38 @@
/* What is getsockname()'s socklen type? */
#undef GETSOCKNAME_SOCKLEN_TYPE
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
/* Define to 1 if you have the `canonicalize_file_name' function. */
#undef HAVE_CANONICALIZE_FILE_NAME
+/* Define to 1 if you have the `chmod' function. */
+#undef HAVE_CHMOD
+
+/* Define to 1 if you have the `clock_getres' function. */
+#undef HAVE_CLOCK_GETRES
+
+/* 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 <cthreads.h> header file. */
+#undef HAVE_CTHREADS_H
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR_R
+
/* Define this if /dev/zero is readable device */
#undef HAVE_DEV_ZERO
@@ -28,27 +86,66 @@
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
+/* Can we drop root privileges? */
+#undef HAVE_DROPROOT
+
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
+/* Define to 1 if you have the `fstat' function. */
+#undef HAVE_FSTAT
+
+/* 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 `getifaddrs' function. */
+#undef HAVE_GETIFADDRS
+
+/* if you have GNU Pth */
+#undef HAVE_GNU_PTH
+
+/* Define to 1 if you have the <histedit.h> header file. */
+#undef HAVE_HISTEDIT_H
+
+/* Define to 1 if you have the <history.h> header file. */
+#undef HAVE_HISTORY_H
+
+/* Define to 1 if you have the `if_nametoindex' function. */
+#undef HAVE_IF_NAMETOINDEX
+
/* inline keyword or macro available */
#undef HAVE_INLINE
/* Define to 1 if the system has the type `int16_t'. */
#undef HAVE_INT16_T
+/* Define to 1 if the system has the type `int32'. */
+#undef HAVE_INT32
+
+/* int32 type in DNS headers, not others. */
+#undef HAVE_INT32_ONLY_WITH_DNS
+
/* Define to 1 if the system has the type `int32_t'. */
#undef HAVE_INT32_T
/* Define to 1 if the system has the type `int8_t'. */
#undef HAVE_INT8_T
+/* Define to 1 if the system has the type `intmax_t'. */
+#undef HAVE_INTMAX_T
+
/* Define to 1 if the system has the type `intptr_t'. */
#undef HAVE_INTPTR_T
@@ -61,9 +158,60 @@
/* Define to 1 if you have the <libgen.h> header file. */
#undef HAVE_LIBGEN_H
+/* Define to 1 if you have the `intl' library (-lintl). */
+#undef HAVE_LIBINTL
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* using Linux pthread? */
+#undef HAVE_LINUXTHREADS
+
+/* Do we have Linux capabilities? */
+#undef HAVE_LINUX_CAPABILITIES
+
+/* Define to 1 if you have the <linux/if_addr.h> header file. */
+#undef HAVE_LINUX_IF_ADDR_H
+
+/* if you have LinuxThreads */
+#undef HAVE_LINUX_THREADS
+
+/* Define to 1 if you have the `localeconv' function. */
+#undef HAVE_LOCALECONV
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if the system has the type `long double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* if you have SunOS LWP package */
+#undef HAVE_LWP
+
+/* Define to 1 if you have the <lwp/lwp.h> header file. */
+#undef HAVE_LWP_LWP_H
+
+/* define if you have Mach Cthreads */
+#undef HAVE_MACH_CTHREADS
+
+/* Define to 1 if you have the <mach/cthreads.h> header file. */
+#undef HAVE_MACH_CTHREADS_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 <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -79,27 +227,147 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
-/* Define to 1 if you have the <net/netmp.h> header file. */
-#undef HAVE_NET_NETMP_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/in_var.h> header file. */
+#undef HAVE_NETINET_IN_VAR_H
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_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 <net/if_var.h> header file. */
+#undef HAVE_NET_IF_VAR_H
/* sntp does not care about 'nice' */
#undef HAVE_NO_NICE
+/* if you have NT Event Log */
+#undef HAVE_NT_EVENT_LOG
+
+/* if you have NT Service Manager */
+#undef HAVE_NT_SERVICE_MANAGER
+
+/* if you have NT Threads */
+#undef HAVE_NT_THREADS
+
/* Define this if pathfind(3) works */
#undef HAVE_PATHFIND
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
+/* Define to 1 if you have the <priv.h> header file. */
+#undef HAVE_PRIV_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* define to pthreads API spec revision */
+#undef HAVE_PTHREADS
+
+/* Define to 1 if you have the `pthread_attr_getstacksize' function. */
+#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
+
+/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
+#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
+
+/* define if you have pthread_detach function */
+#undef HAVE_PTHREAD_DETACH
+
+/* Define to 1 if you have the `pthread_getconcurrency' function. */
+#undef HAVE_PTHREAD_GETCONCURRENCY
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `pthread_kill' function. */
+#undef HAVE_PTHREAD_KILL
+
+/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
+#undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP
+
+/* define if you have pthread_rwlock_destroy function */
+#undef HAVE_PTHREAD_RWLOCK_DESTROY
+
+/* Define to 1 if you have the `pthread_setconcurrency' function. */
+#undef HAVE_PTHREAD_SETCONCURRENCY
+
+/* Define to 1 if you have the `pthread_yield' function. */
+#undef HAVE_PTHREAD_YIELD
+
+/* Define to 1 if you have the <pth.h> header file. */
+#undef HAVE_PTH_H
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#undef HAVE_PTRDIFF_T
+
+/* Define to 1 if you have the <readline.h> header file. */
+#undef HAVE_READLINE_H
+
+/* Define if your readline library has \`add_history' */
+#undef HAVE_READLINE_HISTORY
+
+/* 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 this if we have a functional realpath(3C) */
#undef HAVE_REALPATH
+/* Define to 1 if you have the `recvmsg' function. */
+#undef HAVE_RECVMSG
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define to 1 if you have the `res_init' function. */
+#undef HAVE_RES_INIT
+
/* Define to 1 if you have the <runetype.h> header file. */
#undef HAVE_RUNETYPE_H
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the <semaphore.h> header file. */
+#undef HAVE_SEMAPHORE_H
+
+/* Define to 1 if you have the `sem_timedwait' function. */
+#undef HAVE_SEM_TIMEDWAIT
+
/* Define to 1 if you have the <setjmp.h> header file. */
#undef HAVE_SETJMP_H
+/* Define to 1 if you have the `settimeofday' function. */
+#undef HAVE_SETTIMEOFDAY
+
+/* 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 `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* sigwait() available? */
+#undef HAVE_SIGWAIT
+
/* Define to 1 if the system has the type `size_t'. */
#undef HAVE_SIZE_T
@@ -109,24 +377,39 @@
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
+/* Define to 1 if you have the `socketpair' function. */
+#undef HAVE_SOCKETPAIR
+
+/* Are Solaris privileges available? */
+#undef HAVE_SOLARIS_PRIVS
+
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
/* 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_r' function. */
+#undef HAVE_STRERROR_R
+
/* Define this if strftime() works */
#undef HAVE_STRFTIME
@@ -136,21 +419,54 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
+/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
+
+/* Define to 1 if `thousands_sep' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_THOUSANDS_SEP
+
+/* Do we have struct ntptimeval? */
+#undef HAVE_STRUCT_NTPTIMEVAL
+
/* Does a system header define struct sockaddr_storage? */
#undef HAVE_STRUCT_SOCKADDR_STORAGE
+/* struct timespec declared? */
+#undef HAVE_STRUCT_TIMESPEC
+
+/* Define to 1 if you have the <synch.h> header file. */
+#undef HAVE_SYNCH_H
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
/* Define to 1 if you have the <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H
+/* */
+#undef HAVE_SYSLOG_FACILITYNAMES
+
/* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
+/* Define to 1 if you have the <sys/capability.h> header file. */
+#undef HAVE_SYS_CAPABILITY_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/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
@@ -171,6 +487,9 @@
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
+/* Define to 1 if you have the <sys/prctl.h> header file. */
+#undef HAVE_SYS_PRCTL_H
+
/* Define to 1 if you have the <sys/procset.h> header file. */
#undef HAVE_SYS_PROCSET_H
@@ -186,6 +505,15 @@
/* 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/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/time.h> header file. */
#undef HAVE_SYS_TIME_H
@@ -204,6 +532,27 @@
/* sntp does not care about TTY stuff */
#undef HAVE_TERMIOS
+/* if you have Solaris LWP (thr) package */
+#undef HAVE_THR
+
+/* Define to 1 if you have the <thread.h> header file. */
+#undef HAVE_THREAD_H
+
+/* Define to 1 if you have the `thr_getconcurrency' function. */
+#undef HAVE_THR_GETCONCURRENCY
+
+/* Define to 1 if you have the `thr_setconcurrency' function. */
+#undef HAVE_THR_SETCONCURRENCY
+
+/* Define to 1 if you have the `thr_yield' function. */
+#undef HAVE_THR_YIELD
+
+/* Define to 1 if you have the `timegm' function. */
+#undef HAVE_TIMEGM
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
/* Define to 1 if the system has the type `uint16_t'. */
#undef HAVE_UINT16_T
@@ -213,6 +562,9 @@
/* Define to 1 if the system has the type `uint8_t'. */
#undef HAVE_UINT8_T
+/* Define to 1 if the system has the type `uintmax_t'. */
+#undef HAVE_UINTMAX_T
+
/* Define to 1 if the system has the type `uintptr_t'. */
#undef HAVE_UINTPTR_T
@@ -222,9 +574,21 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* deviant sigwait? */
+#undef HAVE_UNIXWARE_SIGWAIT
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
+/* Define to 1 if the system has the type `u_int32'. */
+#undef HAVE_U_INT32
+
+/* u_int32 type in DNS headers, not others. */
+#undef HAVE_U_INT32_ONLY_WITH_DNS
+
/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
@@ -240,12 +604,9 @@
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
-/* Define to 1 if you have the `vsnprintf' function. */
+/* Define if C99-compliant `vsnprintf' is available. */
#undef HAVE_VSNPRINTF
-/* Define to 1 if you have the `vsprintf' function. */
-#undef HAVE_VSPRINTF
-
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
@@ -261,34 +622,54 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
+/* define if select implicitly yields */
+#undef HAVE_YIELDING_SELECT
+
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
-/* Does struct sockaddr_storage have __ss_family? */
-#undef HAVE___SS_FAMILY_IN_SS
+/* defined if C compiler supports __attribute__((...)) */
+#undef HAVE___ATTRIBUTE__
- /* Handle sockaddr_storage.__ss_family */
- #ifdef HAVE___SS_FAMILY_IN_SS
- # define ss_family __ss_family
- #endif /* HAVE___SS_FAMILY_IN_SS */
+ /* define away __attribute__() if unsupported */
+ #ifndef HAVE___ATTRIBUTE__
+ # define __attribute__(x) /* empty */
+ #endif
+ #define ISC_PLATFORM_NORETURN_PRE
+ #define ISC_PLATFORM_NORETURN_POST __attribute__((__noreturn__))
-/* Does struct sockaddr_storage have __ss_len? */
-#undef HAVE___SS_LEN_IN_SS
+/* Define to 1 if you have the `__res_init' function. */
+#undef HAVE___RES_INIT
+/* Does struct sockaddr_storage have __ss_family? */
+#undef HAVE___SS_FAMILY_IN_SS
- /* Handle sockaddr_storage.__ss_len */
- #ifdef HAVE___SS_LEN_IN_SS
- # define ss_len __ss_len
- #endif /* HAVE___SS_LEN_IN_SS */
+
+ /* Handle sockaddr_storage.__ss_family */
+ #ifdef HAVE___SS_FAMILY_IN_SS
+ # define ss_family __ss_family
+ #endif /* HAVE___SS_FAMILY_IN_SS */
+
+/* Define to provide `rpl_snprintf' function. */
+#undef HW_WANT_RPL_SNPRINTF
+
+/* Define to provide `rpl_vsnprintf' function. */
+#undef HW_WANT_RPL_VSNPRINTF
+
+/* Enclose PTHREAD_ONCE_INIT in extra braces? */
+#undef ISC_PLATFORM_BRACEPTHREADONCEINIT
/* Do we need to fix in6isaddr? */
#undef ISC_PLATFORM_FIXIN6ISADDR
+/* ISC: do we have if_nametoindex()? */
+#undef ISC_PLATFORM_HAVEIFNAMETOINDEX
+
/* have struct if_laddrconf? */
#undef ISC_PLATFORM_HAVEIF_LADDRCONF
@@ -322,6 +703,12 @@
/* ISC: provide inet_pton() */
#undef ISC_PLATFORM_NEEDPTON
+/* enable libisc thread support? */
+#undef ISC_PLATFORM_USETHREADS
+
+/* define to 1 if library is thread safe */
+#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
@@ -329,6 +716,12 @@
/* Does the target support multicast IP? */
#undef MCAST
+/* pthread_init() required? */
+#undef NEED_PTHREAD_INIT
+
+/* use PTHREAD_SCOPE_SYSTEM? */
+#undef NEED_PTHREAD_SCOPE_SYSTEM
+
/* Do we need an s_char typedef? */
#undef NEED_S_CHAR_TYPEDEF
@@ -341,6 +734,9 @@
/* Should we avoid #warning on option name collisions? */
#undef NO_OPTION_NAME_WARNINGS
+/* define if you have (or want) no threads */
+#undef NO_THREADS
+
/* Use OpenSSL? */
#undef OPENSSL
@@ -368,9 +764,15 @@
/* define to a working POSIX compliant shell */
#undef POSIX_SHELL
+/* enable thread safety */
+#undef REENTRANT
+
/* name of regex header file */
#undef REGEX_HEADER
+/* define if sched_yield yields the entire process */
+#undef REPLACE_BROKEN_YIELD
+
/* The size of `char*', as computed by sizeof. */
#undef SIZEOF_CHARP
@@ -380,6 +782,12 @@
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of `pthread_t', as computed by sizeof. */
+#undef SIZEOF_PTHREAD_T
+
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
@@ -389,27 +797,99 @@
/* The size of `time_t', as computed by sizeof. */
#undef SIZEOF_TIME_T
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
/* canonical system (cpu-vendor-os) of where we should run */
#undef STR_SYSTEM
+/* Does Xettimeofday take 1 arg? */
+#undef SYSV_TIMEOFDAY
+
+/* enable thread safety */
+#undef THREADSAFE
+
+/* enable thread safety */
+#undef THREAD_SAFE
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
+/* Provide a typedef for uintptr_t? */
+#ifndef HAVE_UINTPTR_T
+typedef unsigned int uintptr_t;
+#define HAVE_UINTPTR_T 1
+#endif
+
/* What type to use for setsockopt */
#undef TYPEOF_IP_MULTICAST_LOOP
+/* 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
+/* vsnprintf expands "%m" to strerror(errno) */
+#undef VSNPRINTF_PERCENT_M
+
/* configure --enable-ipv6 */
#undef WANT_IPV6
/* Define this if a working libregex can be found */
#undef WITH_LIBREGEX
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#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
+
+/* enable thread safety */
+#undef _REENTRANT
+
+/* enable thread safety */
+#undef _SGI_MP_SOURCE
+
+/* enable thread safety */
+#undef _THREADSAFE
+
+/* enable thread safety */
+#undef _THREAD_SAFE
+
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
/* Are we _special_? */
#undef __APPLE_USE_RFC_3542
@@ -418,6 +898,28 @@
# undef __CHAR_UNSIGNED__
#endif
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -430,24 +932,80 @@
#undef inline
#endif
+/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
+ not define. */
+#undef intmax_t
+
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
+
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ /*
+ * stdio.h must be included after _GNU_SOURCE is defined
+ * but before #define snprintf rpl_snprintf
+ */
+ # include <stdio.h>
+ #endif
+
+
+/* Define to rpl_snprintf if the replacement function should be used. */
+#undef snprintf
+
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
+/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
+ do not define. */
+#undef uintmax_t
+
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
+#undef uintptr_t
+
/* Define as `fork' if `vfork' does not work. */
#undef vfork
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+ code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
+
+/* Define to rpl_vsnprintf if the replacement function should be used. */
+#undef vsnprintf
+
#ifndef MPINFOU_PREDECLARED
# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
+typedef union mpinfou {
struct pdk_mpinfo *pdkptr;
struct mpinfo *pikptr;
} mpinfou_t;
#endif
+
+
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ # if defined(HW_WANT_RPL_VSNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ # include <stdarg.h>
+ int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ # if defined(HW_WANT_RPL_SNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ int rpl_snprintf(char *, size_t, const char *, ...);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ #endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */
+
diff --git a/sntp/configure b/sntp/configure
index 7782c29ba539..0592f2245863 100755
--- a/sntp/configure
+++ b/sntp/configure
@@ -1,6 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for sntp 4.2.6p5.
+# Generated by GNU Autoconf 2.68 for sntp 4.2.8.
+#
+# Report bugs to <http://bugs.ntp.org./>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -244,10 +246,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://bugs.ntp.org./ about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
fi
exit 1
fi
@@ -567,10 +570,10 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sntp'
PACKAGE_TARNAME='sntp'
-PACKAGE_VERSION='4.2.6p5'
-PACKAGE_STRING='sntp 4.2.6p5'
-PACKAGE_BUGREPORT=''
-PACKAGE_URL=''
+PACKAGE_VERSION='4.2.8'
+PACKAGE_STRING='sntp 4.2.8'
+PACKAGE_BUGREPORT='http://bugs.ntp.org./'
+PACKAGE_URL='http://www.ntp.org./'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -608,19 +611,49 @@ ac_includes_default="\
# include <unistd.h>
#endif"
+ac_header_list=
+enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
-LIBOBJS
-NTP_BINSUBDIR_IS_BIN_FALSE
-NTP_BINSUBDIR_IS_BIN_TRUE
-BINSUBDIR
-LCRYPTO
-OPENSSL_LIB
-OPENSSL_INC
-OPENSSL
-HAVE_INLINE
-LIBM
+GTEST_AVAILABLE_FALSE
+GTEST_AVAILABLE_TRUE
+GTEST_CPPFLAGS
+GTEST_CXXFLAGS
+GTEST_LIBS
+GTEST_LDFLAGS
+GTEST_CONFIG
+CXXCPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+VER_SUFFIX
+LIB_SYSLOG
+subdirs
+BUILD_LIBEVENT_FALSE
+BUILD_LIBEVENT_TRUE
+LDADD_LIBEVENT
+CPPFLAGS_LIBEVENT
+PKG_CONFIG
+NTP_FORCE_LIBEVENT_DIST
+LIBOPTS_DIR
+LIBOPTS_CFLAGS
+LIBOPTS_LDADD
+NEED_LIBOPTS_FALSE
+NEED_LIBOPTS_TRUE
+INSTALL_LIBOPTS_FALSE
+INSTALL_LIBOPTS_TRUE
+POSIX_SHELL
+GL_GENERATE_STDNORETURN_H_FALSE
+GL_GENERATE_STDNORETURN_H_TRUE
+STDNORETURN_H
+BUILD_SNTP_FALSE
+BUILD_SNTP_TRUE
+SNTP
+LIBTOOL_DEPS
OTOOL64
OTOOL
LIPO
@@ -636,18 +669,106 @@ LN_S
NM
ac_ct_DUMPBIN
DUMPBIN
+LIBTOOL
+LIBOBJS
+PTHREADS_FALSE
+PTHREADS_TRUE
+LIBISC_PTHREADS_NOTHREADS
+PTHREAD_LIBS
+HAVE_INLINE
+ALLOCA
+LIBM
+EDITLINE_LIBS
LD
FGREP
-LIBTOOL
-LIBOPTS_DIR
-LIBOPTS_CFLAGS
-LIBOPTS_LDADD
-NEED_LIBOPTS_FALSE
-NEED_LIBOPTS_TRUE
-INSTALL_LIBOPTS_FALSE
-INSTALL_LIBOPTS_TRUE
-POSIX_SHELL
SED
+LDADD_LIBNTP
+NTP_CROSSCOMPILE_FALSE
+NTP_CROSSCOMPILE_TRUE
+TIMETRIM_NI
+TIMETRIM_MS
+TIMETRIM_DS
+TIMETRIM_DL
+TIMETRIM_DB
+TICKADJ_NI
+TICKADJ_MS
+TICKADJ_DS
+TICKADJ_DL
+TICKADJ_DB
+SNTP_NI
+SNTP_MS
+SNTP_DS
+SNTP_DL
+SNTP_DB
+NTP_WAIT_NI
+NTP_WAIT_MS
+NTP_WAIT_DS
+NTP_WAIT_DL
+NTP_WAIT_DB
+NTP_KEYGEN_NI
+NTP_KEYGEN_MS
+NTP_KEYGEN_DS
+NTP_KEYGEN_DL
+NTP_KEYGEN_DB
+NTPTRACE_NI
+NTPTRACE_MS
+NTPTRACE_DS
+NTPTRACE_DL
+NTPTRACE_DB
+NTPTIME_NI
+NTPTIME_MS
+NTPTIME_DS
+NTPTIME_DL
+NTPTIME_DB
+INSTALL_NTPSWEEP_FALSE
+INSTALL_NTPSWEEP_TRUE
+NTPSWEEP_NI
+NTPSWEEP_MS
+NTPSWEEP_DS
+NTPSWEEP_DL
+NTPSWEEP_DB
+NTPSNMPD_NI
+NTPSNMPD_MS
+NTPSNMPD_DS
+NTPSNMPD_DL
+NTPSNMPD_DB
+NTPQ_NI
+NTPQ_MS
+NTPQ_DS
+NTPQ_DL
+NTPQ_DB
+NTPD_NI
+NTPD_MS
+NTPD_DS
+NTPD_DL
+NTPD_DB
+NTPDSIM_NI
+NTPDSIM_MS
+NTPDSIM_DS
+NTPDSIM_DL
+NTPDSIM_DB
+NTPDC_NI
+NTPDC_MS
+NTPDC_DS
+NTPDC_DL
+NTPDC_DB
+NTPDATE_NI
+NTPDATE_MS
+NTPDATE_DS
+NTPDATE_DL
+NTPDATE_DB
+MANTAGFMT
+CALC_TICKADJ_NI
+CALC_TICKADJ_MS
+CALC_TICKADJ_DS
+CALC_TICKADJ_DL
+CALC_TICKADJ_DB
+WANT_CALC_TICKADJ_MS_FALSE
+WANT_CALC_TICKADJ_MS_TRUE
+LDFLAGS_NTP
+LDADD_NTP
+CPPFLAGS_NTP
+CFLAGS_NTP
EGREP
GREP
CPP
@@ -675,6 +796,8 @@ build_os
build_vendor
build_cpu
build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
@@ -739,8 +862,27 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_dependency_tracking
+with_locfile
+with_gnu_ld
+with_lineeditlibs
+enable_debugging
+enable_thread_support
+with_threads
+with_yielding_select
+enable_c99_snprintf
+enable_clockctl
+enable_linuxcaps
+enable_solarisprivs
enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_sysroot
+enable_libtool_lock
+with_sntp
+enable_nls
enable_local_libopts
enable_libopts_install
with_autoopts_config
@@ -749,18 +891,15 @@ with_libregex
with_libregex_cflags
with_libregex_libs
enable_optional_args
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-with_sysroot
-enable_libtool_lock
+enable_local_libevent
+with_crypto
with_openssl_libdir
with_openssl_incdir
-with_crypto
+with_rpath
enable_ipv6
with_kame
-with_binsubdir
+enable_getifaddrs
+with_gtest
'
ac_precious_vars='build_alias
host_alias
@@ -770,8 +909,12 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP'
-
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP'
+ac_subdirs_all='libevent'
# Initialize some variables set by options.
ac_init_help=
@@ -1313,7 +1456,7 @@ 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 sntp 4.2.6p5 to adapt to many kinds of systems.
+\`configure' configures sntp 4.2.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1383,7 +1526,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sntp 4.2.6p5:";;
+ short | recursive ) echo "Configuration of sntp 4.2.8:";;
esac
cat <<\_ACEOF
@@ -1391,38 +1534,60 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ defaults: + yes, - no, s system-specific
+ --enable-debugging + include ntpd debugging code
+ --enable-thread-support s use threads (+ if available)
+ --enable-c99-snprintf s force replacement
+ --enable-clockctl s Use /dev/clockctl for non-root clock control
+ --enable-linuxcaps + Use Linux capabilities for non-root clock control
+ --enable-solarisprivs + Use Solaris privileges for non-root clock control
--enable-shared[=PKGS] build shared libraries [default=no]
- --enable-local-libopts Force using the supplied libopts tearoff code
- --disable-libopts-install
- Do not install libopts with client installation
- --disable-optional-args not wanting optional option args
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-nls disable nls support in libopts
+ --enable-local-libopts Use the supplied libopts tearoff code
+ --enable-libopts-install
+ Install libopts with client installation
+ --disable-optional-args not wanting optional option args
+ --enable-local-libevent Force using the supplied libevent tearoff code
--enable-ipv6 s use IPv6?
+ --enable-getifaddrs + Enable the use of getifaddrs() [[yes|no]].
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-locfile=XXX os-specific or "legacy"
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-lineeditlibs edit,editline (readline may be specified if desired)
+ --with-threads with threads [auto]
+ --with-yielding-select with yielding select [auto]
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
+ --without-sntp - disable building sntp and sntp/tests
--with-autoopts-config specify the config-info script
--with-regex-header a reg expr header is specified
--with-libregex libregex installation prefix
--with-libregex-cflags libregex compile flags
--with-libregex-libs libregex link command arguments
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
+ --with-crypto + =openssl,libcrypto
+
--with-openssl-libdir + =/something/reasonable
+
--with-openssl-incdir + =/something/reasonable
- --with-crypto + =openssl
+
+ --without-rpath s Disable auto-added -R linker paths
+
--with-kame - =/usr/local/v6
- --with-binsubdir bin ={bin,sbin}
+ --with-gtest Use the gtest framework (Default: if it's available)
Some influential environment variables:
CC C compiler command
@@ -1433,11 +1598,15 @@ Some influential environment variables:
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP 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.
-Report bugs to the package provider.
+Report bugs to <http://bugs.ntp.org./>.
+sntp home page: <http://www.ntp.org./>.
_ACEOF
ac_status=$?
fi
@@ -1500,7 +1669,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sntp configure 4.2.6p5
+sntp configure 4.2.8
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1589,94 +1758,6 @@ fi
} # ac_fn_c_try_cpp
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -1747,6 +1828,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------ ##
+## Report this to http://bugs.ntp.org./ ##
+## ------------------------------------ ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@@ -1764,6 +1849,48 @@ fi
} # ac_fn_c_check_header_mongrel
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -1795,6 +1922,52 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_header_compile
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
# -------------------------------------------
# Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -1849,6 +2022,119 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); 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
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2027,77 +2313,188 @@ rm -f conftest.val
} # ac_fn_c_compute_int
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); 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
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* 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_$2 || defined __stub___$2
-choke me
-#endif
-
+$5
int
main ()
{
-return $2 ();
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
else
- eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-eval ac_res=\$$3
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-} # ac_fn_c_check_func
+} # ac_fn_c_check_member
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sntp $as_me 4.2.6p5, which was
+It was created by sntp $as_me 4.2.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2377,6 +2774,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+as_fn_append ac_header_list " stdarg.h"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -2447,7 +2845,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in . "$srcdir"/.; do
+for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -2463,7 +2861,7 @@ for ac_dir in . "$srcdir"/.; do
fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2476,9 +2874,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-# Increment sntp_configure_cache_version by one for each change to
-# configure.ac or .m4 files which invalidates cached values from
-# previous versions.
+# Bump sntp_configure_cache_version for each change to configure.ac or
+# .m4 files which invalidates cached values from previous configure
+# runs.
#
# If the change affects cache variables used only by the main NTP
# configure.ac, then only its version number should be bumped, while
@@ -2488,15 +2886,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# bumping.
#
# If a change affects variables shared by all NTP configure scripts,
-# please bump the version numbers of all three. If you are not sure,
-# the safe choice is to bump all three on any cache-invalidating change.
+# please bump the version numbers of each. If you are not sure, the
+# safe choice is to bump all on any cache-invalidating change.
#
# In order to avoid the risk of version stamp collision between -stable
# and -dev branches, do not simply increment the version, instead use
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-sntp_configure_cache_version=20091117
+sntp_configure_cache_version=20120806
# When the version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
@@ -2534,11 +2932,13 @@ sntp_configure_cache_version=20091117
# Parent configure just created cache from empty,
# flushing would be counterproductive.
ntp_cache_flush=0;
+ ;;
esac
esac
;;
*)
# configure cache version mismatches config.cache version
+ ;;
esac
case "$ntp_cache_flush" in
@@ -2575,7 +2975,7 @@ sntp_configure_cache_version=20091117
for c_varname in $c_varname_list
do
- { eval $c_varname=; unset $c_varname;}
+ { eval $c_varname=; unset $c_varname; }
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
@@ -3037,7 +3437,7 @@ fi
# Define the identity of the package.
PACKAGE='sntp'
- VERSION='4.2.6p5'
+ VERSION='4.2.8'
cat >>confdefs.h <<_ACEOF
@@ -3077,6 +3477,19 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -3156,7 +3569,6 @@ _ACEOF
ac_config_headers="$ac_config_headers config.h"
-# Checks for programs.
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4136,131 +4548,6 @@ else
fi
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4400,177 +4687,523 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# AC_PROG_CC_STDC has two functions. It attempts to find a compiler
-# capable of C99, or failing that, for C89. CC is set afterward with
-# the selected invocation, such as "gcc --std=gnu99". Also, the
-# ac_cv_prog_cc_stdc variable is no if the compiler selected for CC
-# does not accept C89.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
- case $ac_cv_prog_cc_stdc in #(
- no) :
- ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
+int
+main ()
+{
+
+ ;
+ return 0;
}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
- your preprocessor is broken;
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-struct incomplete_array
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
{
- int datasize;
- double data[];
-};
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
-typedef const char *ccp;
-static inline int
-test_restrict (ccp restrict text)
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
+
+ ;
return 0;
}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
- const char *str;
- int number;
- float fnumber;
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
int
main ()
{
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
+fi
- ni.number = 58;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+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
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c99=$ac_arg
+ ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
+case "x$ac_cv_prog_cc_c89" in
x)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
$as_echo "none needed" >&6; } ;;
@@ -4578,14 +5211,463 @@ $as_echo "none needed" >&6; } ;;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
$as_echo "unsupported" >&6; } ;;
*)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
@@ -4673,42 +5755,222 @@ $as_echo "unsupported" >&6; } ;;
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
if test "x$ac_cv_prog_cc_c89" != xno; then :
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+
+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
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' 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
- ac_cv_prog_cc_stdc=no
+ am_cv_CC_dependencies_compiler_type=none
fi
fi
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if ${ac_cv_prog_cc_stdc+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$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
+
+
+# Ralf Wildenhues: With per-target flags we need CC_C_O
+# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
$as_echo_n "(cached) " >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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*
- case $ac_cv_prog_cc_stdc in #(
- no) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
- '') :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
- *) :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+
+
+
+CFLAGS_NTP=
+CPPFLAGS_NTP=
+LDADD_NTP=
+LDFLAGS_NTP=
-case "$ac_cv_prog_cc_stdc" in
+
+
+
+
+case "$ac_cv_prog_cc_c89" in
no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile SNTP
- version 4.2.5 and higher." >&5
-$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile SNTP
- version 4.2.5 and higher." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ version 4.2.5 and higher." >&5
+$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
+ version 4.2.5 and higher." >&2;}
+ ;;
esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
$as_echo_n "checking if $CC can handle #warning... " >&6; }
if ${ntp_cv_cpp_warning+:} false; then :
@@ -4743,9 +6005,45 @@ $as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
+$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
+if ${ntp_cv_cc_attribute+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+void foo(void) __attribute__((__noreturn__));
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_cc_attribute=yes
+else
+ ntp_cv_cc_attribute=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
+$as_echo "$ntp_cv_cc_attribute" >&6; }
+case "$ntp_cv_cc_attribute" in
+ yes)
+
+$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
+
+esac
+
+
case "$GCC" in
yes)
- SAVED_CFLAGS_NTP="$CFLAGS"
+ SAVED_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wstrict-overflow"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
@@ -4778,7 +6076,7 @@ $as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
# $ntp_cv_gcc_Wstrict_overflow is tested later to add the
# flag to CFLAGS.
#
- CFLAGS="$SAVED_CFLAGS_NTP -Winit-self"
+ CFLAGS="$SAVED_CFLAGS -Winit-self"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
if ${ntp_cv_gcc_Winit_self+:} false; then :
@@ -4808,94 +6106,794 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
- CFLAGS="$SAVED_CFLAGS_NTP"
- { SAVED_CFLAGS_NTP=; unset SAVED_CFLAGS_NTP;}
+ CFLAGS="$SAVED_CFLAGS"
+ { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
#
# $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS.
+ # flag to CFLAGS_NTP.
#
-esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
+if ${ntp_cv_gc_sections_runs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
-case "$host" in
- *-*-solaris*)
- # see "man standards".
- # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
- # -D_XOPEN_SOURCE=600 seems OK for c99
- #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- libxnet=-lxnet
- ;;
+ origCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wl,--gc-sections"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <stdio.h>
+
+int
+main ()
+{
+
+ FILE * fpC;
+ char buf[32];
+ size_t cch;
+ int read_success_once;
+
+ fpC = fopen("conftest.c", "r");
+ if (NULL == fpC)
+ exit(1);
+ do {
+ cch = fread(buf, sizeof(buf), 1, fpC);
+ read_success_once |= (0 != cch);
+ } while (0 != cch);
+ if (!read_success_once)
+ exit(2);
+ if (!feof(fpC))
+ exit(3);
+ if (0 != fclose(fpC))
+ exit(4);
+
+ exit(EXIT_SUCCESS);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
+ ntp_cv_gc_sections_runs=no
+ else
+ ntp_cv_gc_sections_runs=no
+ ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
+ fi
+
+else
+ ntp_cv_gc_sections_runs=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$origCFLAGS"
+ { origCFLAGS=; unset origCFLAGS;}
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
+$as_echo "$ntp_cv_gc_sections_runs" >&6; }
+ case "$ntp_cv_gc_sections_runs" in
+ yes)
+ LDADD_LIBNTP="-Wl,--gc-sections"
+ CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
+ ;;
+ no)
+ LDADD_LIBNTP=
+ ;;
+ esac
+ CFLAGS_NTP="$CFLAGS_NTP -Wall"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
+ # CFLAGS_NTP="$CFLAGS_NTP -Werror"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
+ CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
+ CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
+ case "$ntp_cv_gcc_Winit_self" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
+ esac
+ case "$ntp_cv_gcc_Wstrict_overflow" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
+ esac
+ # -W[no-]strict-prototypes might be added by NTP_OPENSSL
esac
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
+$as_echo_n "checking additional compiler flags... " >&6; }
+ # allow ntp_os_flags to be preset to skip this stuff
+ case "${ntp_os_cflags+set}" in
+ set)
+ ;;
+ *)
+ ntp_os_cflags=
+ case "$host_os" in
+ aix[1-3]*)
+ ;;
+ aix4.[0-2]*)
+ # turn on additional headers
+ ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
+ ;;
+ aix5.3*)
+ # avoid circular dependencies in yp headers, and more
+ ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
+ ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
+ ;;
+ aix*)
+ # XXX Only verified thru AIX6.
+ # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
+ # avoid circular dependencies in yp headers
+ # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
+ # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
+ # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
+ ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
+ ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
+ ;;
+ amigaos)
+ ntp_os_cflags="-DSYS_AMIGA"
+ ;;
+ darwin*|macosx*|rhapsody*)
+ ntp_os_cflags="-D_P1003_1B_VISIBLE"
+ ;;
+ hpux10.*) # at least for hppa2.0-hp-hpux10.20
+ case "$GCC" in
+ yes)
+ ;;
+ *)
+ # use Ansi compiler on HPUX, and some -Wp magic
+ ntp_os_cflags="-Ae -Wp,-H18816"
+ ;;
+ esac
+ ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
+ ;;
+ hpux*)
+ case "$GCC" in
+ yes)
+ ;;
+ *)
+ # use Ansi compiler on HPUX
+ ntp_os_cflags="-Ae"
+ esac
+ ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE"
+ ;;
+ irix6*)
+ case "$CC" in
+ cc)
+ # do not use 64-bit compiler
+ ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
+ esac
+ ;;
+ nextstep3)
+ ntp_os_cflags="-posix"
+ ;;
+ solaris1*|solaris2.[0-5]|solaris2.5.*)
+ ;;
+ sunos[34]*|sunos5.[0-5]|sunos5.5.*)
+ ;;
+ solaris2*|sunos5*)
+ # turn on 64-bit file offset interface
+ ntp_os_cflags="-D_LARGEFILE64_SOURCE"
+ ;;
+ vxworks*)
+ case "$build" in
+ $host)
+ ;;
+ *)
+ # Quick and dirty sanity check
+ case "$VX_KERNEL" in
+ '')
+ as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
+ esac
+ ntp_os_cflags="-DSYS_VXWORKS"
+ esac
+ ;;
+ esac
esac
+ case "$ntp_os_flags" in
+ '')
+ ntp_os_cflags_msg="none needed"
+ ;;
+ *)
+ ntp_os_cflags_msg="$ntp_os_cflags"
+ esac
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
+$as_echo "$ntp_os_cflags_msg" >&6; }
+ { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- enable_shared=no
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; 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
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int
+main ()
+{
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_volatile=yes
+else
+ ac_cv_c_volatile=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+$as_echo "#define volatile /**/" >>confdefs.h
-# NTP has (so far) been relying on leading-edge autogen.
-# Therefore, by default:
-# - use the version we ship with
-# - do not install it
-# - build a static copy (AC_DISABLE_SHARED - done earlier)
-case "${enable_local_libopts+set}" in
- set) ;;
- *) enable_local_libopts=yes ;;
-esac
-case "${enable_libopts_install+set}" in
- set) ;;
- *) enable_libopts_install=no ;;
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
+$as_echo_n "checking for install dir and man conventions... " >&6; }
+
+
+# Check whether --with-locfile was given.
+if test "${with_locfile+set}" = set; then :
+ withval=$with_locfile;
+else
+ with_locfile=no
+
+fi
+
+
+( \
+ SENTINEL_DIR="$PWD" && \
+ cd $srcdir/ && \
+ case "$with_locfile" in \
+ yes|no|'') \
+ scripts/genLocInfo -d "$SENTINEL_DIR" \
+ ;; \
+ *) \
+ scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile" \
+ ;; \
+ esac \
+) > genLocInfo.i 2> genLocInfo.err
+. ./genLocInfo.i
+
+case "$GENLOCINFO" in
+ OK)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
+$as_echo "in file $GENLOCINFOFILE" >&6; }
+ rm genLocInfo.err genLocInfo.i
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
+$as_echo "failed." >&6; }
+ as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
+ ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
+ if test "$CALC_TICKADJ_MS" ; then
+ WANT_CALC_TICKADJ_MS_TRUE=
+ WANT_CALC_TICKADJ_MS_FALSE='#'
+else
+ WANT_CALC_TICKADJ_MS_TRUE='#'
+ WANT_CALC_TICKADJ_MS_FALSE=
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -z "$NTPSWEEP_NI" ; then
+ INSTALL_NTPSWEEP_TRUE=
+ INSTALL_NTPSWEEP_FALSE='#'
+else
+ INSTALL_NTPSWEEP_TRUE='#'
+ INSTALL_NTPSWEEP_FALSE=
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Expose a cross-compilation indicator to makefiles
+ if test $build != $host; then
+ NTP_CROSSCOMPILE_TRUE=
+ NTP_CROSSCOMPILE_FALSE='#'
+else
+ NTP_CROSSCOMPILE_TRUE='#'
+ NTP_CROSSCOMPILE_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
+ for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
@@ -4904,14 +6902,14 @@ case `"$ac_path_GREP" --version 2>&1` in
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
# Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
@@ -4919,49 +6917,62 @@ case `"$ac_path_GREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
- $ac_path_GREP_found && break 3
+ $ac_path_SED_found && break 3
done
done
done
IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
- ac_cv_path_GREP=$GREP
+ ac_cv_path_SED=$SED
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
+ for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
@@ -4970,14 +6981,14 @@ case `"$ac_path_EGREP" --version 2>&1` in
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
@@ -4985,144 +6996,1120 @@ case `"$ac_path_EGREP" --version 2>&1` in
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
- $ac_path_EGREP_found && break 3
+ $ac_path_FGREP_found && break 3
done
done
done
IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
- ac_cv_path_EGREP=$EGREP
+ ac_cv_path_FGREP=$FGREP
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+ # Check whether --enable-c99-snprintf was given.
+if test "${enable_c99_snprintf+set}" = set; then :
+ enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
+else
+ force_c99_snprintf=no
+
+fi
+
+ case "$force_c99_snprintf" in
+ yes)
+ hw_force_rpl_snprintf=yes
+ hw_force_rpl_vsnprintf=yes
+ esac
+
+
+
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
+if test "x$ac_cv_func_vsnprintf" = xyes; then :
+ hw_cv_func_vsnprintf=yes
+else
+ hw_cv_func_vsnprintf=no
+fi
+
+ if test "$hw_cv_func_vsnprintf" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
+$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_vsnprintf_c99+:} false; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ hw_cv_func_vsnprintf_c99=no
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+#if HAVE_STDARG_H
+ #include <stdarg.h>
+ #endif
+ #include <stdio.h>
+ static int testprintf(char *buf, size_t size, const char *format, ...)
+ {
+ int result;
+ va_list ap;
+ va_start(ap, format);
+ result = vsnprintf(buf, size, format, ap);
+ va_end(ap);
+ return result;
+ }
+int
+main ()
+{
+char buf[43];
+ if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ hw_cv_func_vsnprintf_c99=yes
+else
+ hw_cv_func_vsnprintf_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
+$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
+else
+ hw_cv_func_vsnprintf_c99=no
+fi
+
+$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
+$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
+ if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
+ hw_use_rpl_vsnprintf=yes
+else
+ hw_use_rpl_vsnprintf=no
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
+$as_echo "$hw_use_rpl_vsnprintf" >&6; }
+ if test "$hw_use_rpl_vsnprintf" = yes; then :
+
+$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
+
+ if test ${hw_nodef_vsnprintf=no} = no; then :
+
+$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
+fi
+ for ac_header in inttypes.h locale.h stddef.h stdint.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
+_ACEOF
+
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if ${ac_cv_type_long_double+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$GCC" = yes; then
+ ac_cv_type_long_double=yes
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* The Stardent Vistra knows sizeof (long double), but does
+ not support it. */
+ long double foo = 0.0L;
int
main ()
{
+static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ sizeof (double) <= sizeof (long double))];
+test_array [0] = 0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
+ ac_cv_type_long_double=yes
else
- ac_cv_header_stdc=no
+ ac_cv_type_long_double=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
+$as_echo "$ac_cv_type_long_double" >&6; }
+ if test $ac_cv_type_long_double = yes; then
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
else
- ac_cv_header_stdc=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f conftest*
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
else
- ac_cv_header_stdc=no
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
fi
-rm -f conftest*
+
+
+
+ ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_intmax_t" = xyes; then :
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long int' \
+ || ac_type='long int'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
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 :
- :
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintmax_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
+
+else
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long int' \
+ || ac_type='unsigned long int'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+fi
+
+
+
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else
+ for ac_type in 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define uintptr_t $ac_type
+_ACEOF
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
+
+
+fi
+
+ for ac_func in localeconv
+do :
+ ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
+if test "x$ac_cv_func_localeconv" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALECONV 1
+_ACEOF
+
+fi
+done
+
+
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.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))
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* 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";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 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;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+
+
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+ _hw_cv_func_xprintf_replace_done=yes
+fi
+
+fi
+
+
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes; then :
+ hw_cv_func_snprintf=yes
+else
+ hw_cv_func_snprintf=no
+fi
+
+ if test "$hw_cv_func_snprintf" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
+$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
+if ${hw_cv_func_snprintf_c99+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ hw_cv_func_snprintf_c99=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
int
main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+char buf[43];
+ if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;
+ ;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
-
+ hw_cv_func_snprintf_c99=yes
else
- ac_cv_header_stdc=no
+ hw_cv_func_snprintf_c99=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
+$as_echo "$hw_cv_func_snprintf_c99" >&6; }
+else
+ hw_cv_func_snprintf_c99=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
+$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
+ if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
+ hw_use_rpl_snprintf=yes
+else
+ hw_use_rpl_snprintf=no
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
+$as_echo "$hw_use_rpl_snprintf" >&6; }
+ if test "$hw_use_rpl_snprintf" = yes; then :
-# 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
+$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
+
+ if test ${hw_nodef_snprintf=no} = no; then :
+
+$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
+
+fi
+
+ if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* 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";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 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;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+
+
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+ _hw_cv_func_xprintf_replace_done=yes
+fi
+
+fi
+
+
+
+
+
+# HMS: Save $LIBS and empty it.
+# any LIBS we add here should go in to LDADD_LIBNTP
+
+__LIBS=$LIBS
+LIBS=
+
+
+
+# [Bug 2332] because we need to know if we are using GNU ld...
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
+$as_echo_n "checking for directory path separator... " >&6; }
+if ${ntp_cv_dir_sep+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$ntp_cv_dir_sep" in
+ '')
+ case "$host_os" in
+ *djgpp | *mingw32* | *emx*)
+ ntp_cv_dir_sep="'\\'"
+ ;;
+ *)
+ ntp_cv_dir_sep="'/'"
+ ;;
+ esac
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
+$as_echo "$ntp_cv_dir_sep" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define DIR_SEP $ntp_cv_dir_sep
+_ACEOF
+
+
+
+ NTP_ORIG_LIBS="$LIBS"
+
+# Check whether --with-lineeditlibs was given.
+if test "${with_lineeditlibs+set}" = set; then :
+ withval=$with_lineeditlibs; use_lineeditlibs="$withval"
+else
+ use_lineeditlibs="edit,editline"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
+$as_echo_n "checking line editing libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
+$as_echo "$use_lineeditlibs" >&6; }
+ case "$use_lineeditlibs" in
+ no)
+ ntp_lib_lineedit=no
+ ;;
+ *)
+ for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
+ for term_lib in "" termcap curses ncurses; do
+ case "$term_lib" in
+ '')
+ TRY_LIB="-l$lineedit_lib"
+ ;;
+ *)
+ TRY_LIB="-l$lineedit_lib -l$term_lib"
+ ;;
+ esac
+ LIBS="$NTP_ORIG_LIBS $TRY_LIB"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
+$as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ntp_lib_lineedit="$TRY_LIB"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ case "$ntp_lib_lineedit" in
+ '')
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ # Use readline()
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+ esac
+ case "$term_lib" in
+ '')
+ # do not try el_gets without a terminal library
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
+$as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char el_gets ();
+int
+main ()
+{
+return el_gets ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ntp_lib_lineedit="$TRY_LIB"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ case "$ntp_lib_lineedit" in
+ '')
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *) # Use el_gets()
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+ ;;
+ esac # $ntp_lib_lineedit
+ esac # $term_lib
+ done
+ case "$ntp_lib_lineedit" in
+ '')
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+ LIBS="$NTP_ORIG_LIBS"
+ ;;
+ esac # $use_lineeditlibs
+
+ case "$ntp_lib_lineedit" in
+ '')
+ ntp_lib_lineedit="no"
+ ;;
+ no)
+ ;;
+ *)
+ EDITLINE_LIBS="$ntp_lib_lineedit"
+
+ ;;
+ esac # $ntp_lib_lineedit
+
+ case "$ntp_lib_lineedit" in
+ no)
+ ;;
+ *)
+ for ac_header in readline.h readline/readline.h histedit.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -5132,66 +8119,118 @@ fi
done
-
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
+ for ac_header in history.h readline/history.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
+done
- ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
+ case "$ac_cv_header_histedit_h" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
+$as_echo_n "checking number of arguments to el_init()... " >&6; }
+if ${ntp_cv_el_init_args+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <$ac_hdr>
+
+ #include <stdio.h>
+ #include <histedit.h>
int
main ()
{
-if ((DIR *) 0)
-return 0;
+
+ el_init("conftest", stdin, stdout, stderr);
+
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- eval "$as_ac_Header=yes"
+ ntp_cv_el_init_args=4
else
- eval "$as_ac_Header=no"
+ ntp_cv_el_init_args=3
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
-eval ac_res=\$$as_ac_Header
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
+$as_echo "$ntp_cv_el_init_args" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define EL_INIT_ARGS $ntp_cv_el_init_args
_ACEOF
-ac_header_dirent=$ac_hdr; break
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
+$as_echo_n "checking whether readline supports history... " >&6; }
+
+ ntp_lib_lineedit_history="no"
+ ORIG_LIBS="$LIBS"
+ LIBS="$ORIG_LIBS $ntp_lib_lineedit"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char add_history ();
+int
+main ()
+{
+return add_history ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ntp_lib_lineedit_history="yes"
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ORIG_LIBS"
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
+$as_echo "$ntp_lib_lineedit_history" >&6; }
+
+ case "$ntp_lib_lineedit_history" in
+ yes)
+
+$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
+
+ esac
+ esac # $ntp_lib_lineedit
+ { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
+ { ORIG_LIBS=; unset ORIG_LIBS;}
+ { TRY_LIB=; unset TRY_LIB;}
+ { use_lineeditlibs=; unset use_lineeditlibs;}
+
+
+LIBM=
+case "$host" in
+ *-*-darwin*)
+ ;;
+ *)
+ _libs=$LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
+$as_echo_n "checking for library containing cos... " >&6; }
+if ${ac_cv_search_cos+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -5204,16 +8243,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char opendir ();
+char cos ();
int
main ()
{
-return opendir ();
+return cos ();
;
return 0;
}
_ACEOF
-for ac_lib in '' dir; do
+for ac_lib in '' m; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -5221,34 +8260,576 @@ for ac_lib in '' dir; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
+ ac_cv_search_cos=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if ${ac_cv_search_cos+:} false; then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if ${ac_cv_search_cos+:} false; then :
else
- ac_cv_search_opendir=no
+ ac_cv_search_cos=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
+$as_echo "$ac_cv_search_cos" >&6; }
+ac_res=$ac_cv_search_cos
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ LIBM="-lm"
+fi
+
+ LIBS=$_libs
+ ;;
+esac
+
+{ _libs=; unset _libs;}
+
+
+for ac_header in vfork.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
fi
+done
+
+for ac_func in fork vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if ${ac_cv_func_fork_works+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_fork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_fork_works=yes
+else
+ ac_cv_func_fork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if ${ac_cv_func_vfork_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_vfork_works=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
+int
+main ()
+{
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_vfork_works=yes
+else
+ ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if ${ac_cv_func_strerror_r_char_p+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+ac_busted_vpath_in_make=no
+case "$build" in
+ *-*-irix6.1*) # 64 bit only
+ # busted vpath?
+ ;;
+ *-*-irix6*) # 6.2 (and later?)
+ ac_busted_vpath_in_make=yes
+ ;;
+ *-*-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
+ yes.|no*)
+ ;;
+ *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
+ '')
+ as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
+ esac
+ ;;
+esac
+
+case "$host" in
+ *-*-aix4*)
+ # Bug 2516:
+ # Was *-*-aix[[4-9]]*
+ # XXX only verified thru AIX6. But...
+ # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
+ # that this support would be in 5.3, removed in 6, and added back.
+ #
+ # (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.
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -5261,16 +8842,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char opendir ();
+char clock_gettime ();
int
main ()
{
-return opendir ();
+return clock_gettime ();
;
return 0;
}
_ACEOF
-for ac_lib in '' x; do
+for ac_lib in '' rt; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -5278,56 +8859,65 @@ for ac_lib in '' x; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_opendir=$ac_res
+ ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_opendir+:} false; then :
+ if ${ac_cv_search_clock_gettime+:} false; then :
break
fi
done
-if ${ac_cv_search_opendir+:} false; then :
+if ${ac_cv_search_clock_gettime+:} false; then :
else
- ac_cv_search_opendir=no
+ ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_clock_gettime" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
+ esac
fi
+ for ac_func in clock_getres clock_gettime clock_settime
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
+ ;;
+esac
- # =================
- # AC_CHECK_HEADERS
- # =================
- for ac_header in \
- dlfcn.h errno.h fcntl.h libgen.h \
- memory.h netinet/in.h setjmp.h sys/mman.h \
- sys/param.h sys/poll.h sys/procset.h sys/select.h \
- sys/socket.h sys/stropts.h sys/time.h sys/un.h \
- sys/wait.h unistd.h utime.h sysexits.h
+for ac_func in getclock stime timegm strlcpy strlcat
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
-
done
- for ac_header in stdarg.h varargs.h
+#
+for ac_header in errno.h sys/socket.h sys/types.h time.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -5335,15 +8925,112 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- lo_have_arg_hdr=true;break
+
+fi
+
+done
+
+for ac_header in net/if.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+
+"
+if test "x$ac_cv_header_net_if_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NET_IF_H 1
+_ACEOF
+
+fi
+
+done
+
+case "$host" in
+ *-hp-hpux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
+$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
+if ${ntp_cv_predecl_mpinfou+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- lo_have_arg_hdr=false
+
+ np_cv_predecl_mpinfou=no
+ case "$ac_cv_header_net_if_h" in
+ no)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+ } mpinfou_t;
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #include <net/if.h>
+
+int
+main ()
+{
+
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ntp_cv_predecl_mpinfou=yes
+ ac_cv_header_net_if_h=yes
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
+$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
+ case "$ntp_cv_predecl_mpinfou" in
+ yes)
+ cat >>confdefs.h <<_ACEOF
+#ifndef MPINFOU_PREDECLARED
+# define MPINFOU_PREDECLARED
+typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+} mpinfou_t;
+#endif
+_ACEOF
+
+ esac
+esac
+
+case "$host" in
+ *-linux*)
+ for ac_header in linux/if_addr.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+
+"
+if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LINUX_IF_ADDR_H 1
+_ACEOF
+
fi
done
+esac
- for ac_header in string.h strings.h
+for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -5351,15 +9038,30 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- lo_have_str_hdr=true;break
-else
- lo_have_str_hdr=false
+
fi
done
+# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
+for ac_header in sys/sysctl.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+ #if defined HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
+
+"
+if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SYSCTL_H 1
+_ACEOF
- for ac_header in limits.h sys/limits.h values.h
+fi
+
+done
+
+for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -5367,42 +9069,85 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- lo_have_lim_hdr=true;break
-else
- lo_have_lim_hdr=false
+
fi
done
- for ac_header in inttypes.h stdint.h
+for ac_header in resolv.h
do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+
+"
+if test "x$ac_cv_header_resolv_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_RESOLV_H 1
_ACEOF
- lo_have_typ_hdr=true;break
-else
- lo_have_typ_hdr=false
+
fi
done
- # ----------------------------------------------------------------------
- # check for various programs used during the build.
- # On OS/X, "wchar.h" needs "runetype.h" to work properly.
- # ----------------------------------------------------------------------
- for ac_header in runetype.h wchar.h
+for ac_header in net/if_var.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+
+"
+if test "x$ac_cv_header_net_if_var_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NET_IF_VAR_H 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in netinet/ip.h netinet/in_var.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
- $ac_includes_default
- #if HAVE_RUNETYPE_H
- # include <runetype.h>
- #endif
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_VAR_H
+ # include <net/if_var.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
@@ -5415,199 +9160,528 @@ fi
done
- # --------------------------------------------
- # Verify certain entries from AC_CHECK_HEADERS
- # --------------------------------------------
- for f in sys_types sys_mman sys_param sys_stat sys_wait \
- string errno stdlib memory setjmp
- do eval as_ac_var=\${ac_cv_header_${f}_h+set}
- test "${as_ac_var}" = set || {
- as_fn_error $? "You must have ${f}.h on your system" "$LINENO" 5
- }
- done
-
- ${lo_have_arg_hdr} || \
- as_fn_error $? "You must have stdarg.h or varargs.h on your system" "$LINENO" 5
+# HMS: Do we need to check for -lsocket before or after these tests?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+$as_echo_n "checking for library containing inet_pton... " >&6; }
+if ${ac_cv_search_inet_pton+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- ${lo_have_str_hdr} || \
- as_fn_error $? "You must have string.h or strings.h on your system" "$LINENO" 5
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_pton ();
+int
+main ()
+{
+return inet_pton ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_pton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_pton+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_pton+:} false; then :
- ${lo_have_lim_hdr} || \
- as_fn_error $? "You must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
+else
+ ac_cv_search_inet_pton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+$as_echo "$ac_cv_search_inet_pton" >&6; }
+ac_res=$ac_cv_search_inet_pton
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_inet_pton" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
+ esac
- ${lo_have_typ_hdr} || \
- as_fn_error $? "You must have inttypes.h or stdint.h on your system" "$LINENO" 5
+fi
- # ----------------------------------------------------------------------
- # Checks for typedefs
- # ----------------------------------------------------------------------
- ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
-if test "x$ac_cv_type_wchar_t" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
+$as_echo_n "checking for library containing inet_ntop... " >&6; }
+if ${ac_cv_search_inet_ntop+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WCHAR_T 1
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_ntop=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_ntop+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_ntop+:} false; then :
+else
+ ac_cv_search_inet_ntop=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
+$as_echo "$ac_cv_search_inet_ntop" >&6; }
+ac_res=$ac_cv_search_inet_ntop
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_inet_ntop" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
+ esac
fi
- ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
- $ac_includes_default
- #if HAVE_RUNETYPE_H
- # include <runetype.h>
- #endif
- #if HAVE_WCHAR_H
- # include <wchar.h>
- #endif
-"
-if test "x$ac_cv_type_wint_t" = xyes; then :
+# [Bug 1628] On Solaris, we need -lxnet -lsocket. Generalize this to
+# avoid keying on the OS name: If we find socket functions in
+# libsocket, next try for them in libxnet without libsocket, if found,
+# list both. If we simply tested libxnet first, we would find the
+# functions there and never add libsocket. See also [Bug 660]
+# http://bugs.ntp.org/show_bug.cgi?id=660#c9
+saved_LIBS=$LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+$as_echo_n "checking for library containing setsockopt... " >&6; }
+if ${ac_cv_search_setsockopt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WINT_T 1
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setsockopt ();
+int
+main ()
+{
+return setsockopt ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' socket; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_setsockopt=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_setsockopt+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_setsockopt+:} false; then :
+else
+ ac_cv_search_setsockopt=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
+$as_echo "$ac_cv_search_setsockopt" >&6; }
+ac_res=$ac_cv_search_setsockopt
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_setsockopt" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
+ esac
fi
- ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
-if test "x$ac_cv_type_int8_t" = xyes; then :
+case "$ac_cv_search_setsockopt" in
+ -lsocket)
+ LIBS="$saved_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
+$as_echo_n "checking for library containing getsockopt... " >&6; }
+if ${ac_cv_search_getsockopt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8_T 1
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getsockopt ();
+int
+main ()
+{
+return getsockopt ();
+ ;
+ return 0;
+}
_ACEOF
+for ac_lib in '' xnet; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_getsockopt=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_getsockopt+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_getsockopt+:} false; then :
+else
+ ac_cv_search_getsockopt=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
+$as_echo "$ac_cv_search_getsockopt" >&6; }
+ac_res=$ac_cv_search_getsockopt
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_getsockopt" in
+ 'none required') ;;
+ no) ;;
+ *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
+ esac
fi
-ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint8_t" = xyes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8_T 1
-_ACEOF
+ # XXX Possible trouble here - reading the comments above and looking at the
+ # code below I wonder if we'll add -lxnet when we don't need it.
+ # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
+ # there when it is not needed?
+ case "$ac_cv_search_getsockopt" in
+ -lxnet)
+ LIBS="-lxnet -lsocket $saved_LIBS"
+ ;;
+ *) LIBS="-lsocket $saved_LIBS"
+ ;;
+ esac
+ ;;
+esac
+{ saved_LIBS=; unset saved_LIBS;}
+# Bug 2427 - look for recvmsg here.
+for ac_func in recvmsg
+do :
+ ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
+if test "x$ac_cv_func_recvmsg" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RECVMSG 1
+_ACEOF
fi
-ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
-if test "x$ac_cv_type_int16_t" = xyes; then :
+done
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT16_T 1
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
fi
-ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint16_t" = xyes; then :
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT16_T 1
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
_ACEOF
+ ;;
+esac
-fi
-ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
-if test "x$ac_cv_type_int32_t" = xyes; then :
+case "$ac_cv_c_inline" in
+ '')
+ ;;
+ *)
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT32_T 1
+$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_time=yes
+else
+ ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint32_t" = xyes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT32_T 1
-_ACEOF
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
+$as_echo_n "checking size of time_t... " >&6; }
+if ${ac_cv_sizeof_time_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_time_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (time_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_time_t=0
+ fi
+fi
fi
-ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
+$as_echo "$ac_cv_sizeof_time_t" >&6; }
+
+
cat >>confdefs.h <<_ACEOF
-#define HAVE_INTPTR_T 1
+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
_ACEOF
-fi
-ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_uintptr_t" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+$as_echo_n "checking whether char is unsigned... " >&6; }
+if ${ac_cv_c_char_unsigned+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((char) -1) < 0)];
+test_array [0] = 0
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_char_unsigned=no
+else
+ ac_cv_c_char_unsigned=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+$as_echo "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+ $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
+fi
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
+$as_echo_n "checking size of signed char... " >&6; }
+if ${ac_cv_sizeof_signed_char+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
+else
+ if test "$ac_cv_type_signed_char" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (signed char)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_signed_char=0
+ fi
fi
-ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint_t" = xyes; then :
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
+$as_echo "$ac_cv_sizeof_signed_char" >&6; }
+
+
cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT_T 1
+#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
_ACEOF
-fi
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
+if test "x$ac_cv_type_s_char" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_PID_T 1
+#define HAVE_S_CHAR 1
_ACEOF
fi
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_SIZE_T 1
+#define HAVE_LONG_LONG 1
_ACEOF
fi
-
- # =====
- # sizes
- # =====
- # The cast to long int works around a bug in the HP C Compiler
+# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5
-$as_echo_n "checking size of char*... " >&6; }
-if ${ac_cv_sizeof_charp+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default"; then :
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
else
- if test "$ac_cv_type_charp" = yes; then
+ if test "$ac_cv_type_short" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (char*)
+as_fn_error 77 "cannot compute sizeof (short)
See \`config.log' for more details" "$LINENO" 5; }
else
- ac_cv_sizeof_charp=0
+ ac_cv_sizeof_short=0
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5
-$as_echo "$ac_cv_sizeof_charp" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHARP $ac_cv_sizeof_charp
+#define SIZEOF_SHORT $ac_cv_sizeof_short
_ACEOF
- # The cast to long int works around a bug in the HP C Compiler
+# The cast to long int 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.
@@ -5640,7 +9714,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # The cast to long int works around a bug in the HP C Compiler
+# The cast to long int 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.
@@ -5673,1109 +9747,5079 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # The cast to long int works around a bug in the HP C Compiler
+
+case "$ac_cv_type_long_long" in
+ no)
+ ;;
+ *)
+ # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if ${ac_cv_sizeof_long_long+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
else
- if test "$ac_cv_type_short" = yes; then
+ if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
+as_fn_error 77 "cannot compute sizeof (long long)
See \`config.log' for more details" "$LINENO" 5; }
else
- ac_cv_sizeof_short=0
+ ac_cv_sizeof_long_long=0
fi
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
_ACEOF
+ ;;
+esac
- # ----------------------------------------------------------------------
- # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
- # ----------------------------------------------------------------------
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
-$as_echo_n "checking for pathfind in -lgen... " >&6; }
-if ${ac_cv_lib_gen_pathfind+:} false; then :
+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.
+
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+
+ ;;
+ no1no)
+ # We have signed chars, can say 'signed char', no s_char typedef.
+
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+
+ ;;
+ yes0no)
+ # We have unsigned chars, can't say 'signed char', no s_char typedef.
+ as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
+ ;;
+ yes1no)
+ # We have unsigned chars, can say 'signed char', no s_char typedef.
+
+$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgen $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <sys/types.h>
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pathfind ();
-int
-main ()
-{
-return pathfind ();
- ;
- return 0;
-}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gen_pathfind=yes
+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_lib_gen_pathfind=no
+ ac_cv_type_uid_t=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest*
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
-$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
-if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
+$as_echo_n "checking if we're including debugging code... " >&6; }
+# Check whether --enable-debugging was given.
+if test "${enable_debugging+set}" = set; then :
+ enableval=$enable_debugging; ntp_ok=$enableval
+else
+ ntp_ok=yes
+
+fi
+
+case "$ntp_ok" in
+ yes)
+
+$as_echo "#define DEBUG 1" >>confdefs.h
+
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
+$as_echo "$ntp_ok" >&6; }
+
+
+
+# check if we can compile with pthreads
+for ac_header in semaphore.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
+if test "x$ac_cv_header_semaphore_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
+#define HAVE_SEMAPHORE_H 1
_ACEOF
- LIBS="-lgen $LIBS"
-
fi
- for ac_func in vprintf
+done
+
+for ac_func in socketpair
do :
- ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-if test "x$ac_cv_func_vprintf" = xyes; then :
+ ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
+if test "x$ac_cv_func_socketpair" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_VPRINTF 1
+#define HAVE_SOCKETPAIR 1
_ACEOF
-ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = xyes; then :
+fi
+done
-$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+# Check whether --enable-thread-support was given.
+if test "${enable_thread_support+set}" = set; then :
+ enableval=$enable_thread_support;
+else
+ enable_thread_support=yes
fi
+have_pthreads=no
+case "$enable_thread_support" in
+ yes)
+ ol_found_pthreads=no
+
+
+
+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
+
+# OpenLDAP --with-threads
+
+# Check whether --with-threads was given.
+if test "${with_threads+set}" = set; then :
+ withval=$with_threads;
+ ol_arg=invalid
+ for ol_val in auto nt posix mach pth lwp yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
+ fi
+ ol_with_threads="$ol_arg"
+
+else
+ ol_with_threads="auto"
fi
+# end --with-threads
+
+
+case "$ol_with_threads$host" in
+ auto*-*-solaris2.[0-6])
+ ol_with_threads=no
+ ;;
+esac
+
+
+ol_aix_threads=no
+case "$host" in
+*-*-aix*) if test -z "$CC" ; then
+ case "$ol_with_threads" in
+ auto | yes | posix) ol_aix_threads=yes ;;
+ esac
+ fi
+;;
+esac
+
+if test $ol_aix_threads = yes ; then
+ if test -z "${CC}" ; then
+ for ac_prog in cc_r xlc_r cc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
done
+ done
+IFS=$as_save_IFS
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
- for ac_header in vfork.h
+
+ test -n "$CC" && break
+done
+
+
+ if test "$CC" = cc ; then
+ if test $ol_with_threads != auto ; then
+ as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
+$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+ fi
+ ol_with_threads=no
+ fi
+ fi
+
+ case ${CC} in cc_r | xlc_r)
+ ol_with_threads=posix
+ ol_cv_pthread_create=yes
+ ;;
+ esac
+fi
+
+ol_link_threads=no
+# OpenLDAP --with-yielding_select
+
+# Check whether --with-yielding_select was given.
+if test "${with_yielding_select+set}" = set; then :
+ withval=$with_yielding_select;
+ ol_arg=invalid
+ for ol_val in auto yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
+ fi
+ ol_with_yielding_select="$ol_arg"
+
+else
+ ol_with_yielding_select="auto"
+fi
+# end --with-yielding_select
+
+
+case $ol_with_threads in auto | yes | nt)
+
+
+ ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
+if test "x$ac_cv_func__beginthread" = xyes; then :
+
+fi
+
+
+ if test $ac_cv_func__beginthread = yes ; then
+
+$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
+
+ ol_cv_nt_threads=yes
+ fi
+
+
+ if test "$ol_cv_nt_threads" = yes ; then
+ ol_link_threads=nt
+ ol_with_threads=found
+ ol_with_yielding_select=yes
+
+
+$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
+
+ fi
+
+ if test $ol_with_threads = nt ; then
+ as_fn_error $? "could not locate NT Threads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | posix)
+
+ for ac_header in pthread.h
do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
+#define HAVE_PTHREAD_H 1
_ACEOF
fi
done
-for ac_func in fork vfork
+
+ if test $ac_cv_header_pthread_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
+$as_echo_n "checking POSIX thread version... " >&6; }
+if ${ol_cv_pthread_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+
+int
+main ()
+{
+
+ int i = PTHREAD_CREATE_JOINABLE;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_detach" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=10
+else
+ ol_cv_pthread_version=8
+fi
+rm -f conftest*
+
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+# ifdef PTHREAD_CREATE_UNDETACHED
+ draft7
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft7" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=7
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+#ifdef PTHREAD_MUTEX_INITIALIZER
+ draft5
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft5" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=5
+else
+ ol_cv_pthread_version=4
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
+$as_echo "$ol_cv_pthread_version" >&6; }
+
+
+ if test $ol_cv_pthread_version != 0 ; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREADS $ol_cv_pthread_version
+_ACEOF
+
+ else
+ as_fn_error $? "unknown pthread version" "$LINENO" 5
+ fi
+
+ # consider threads found
+ ol_with_threads=found
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
+else
+ ol_cv_header_linux_threads=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
+
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
+$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
+if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+#ifdef _POSIX_THREAD_IS_GNU_PTH
+ __gnu_pth__;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
+ ol_cv_header_gnu_pth_pthread_h=yes
+else
+ ol_cv_header_gnu_pth_pthread_h=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
+$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
+
+
+ if test $ol_cv_header_gnu_pth_pthread_h = no ; then
+ for ac_header in sched.h
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SCHED_H 1
_ACEOF
fi
+
done
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
+$as_echo_n "checking for pthread_create in default libraries... " >&6; }
+if ${ol_cv_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_fork_works=cross
-else
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
int
main ()
{
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
;
return 0;
}
_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_create=yes
+else
+ ol_cv_pthread_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_fork_works=yes
+ ol_cv_pthread_create=yes
else
- ac_cv_func_fork_works=no
+ ol_cv_pthread_create=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
+$as_echo "$ol_cv_pthread_create" >&6; }
+ if test $ol_cv_pthread_create != no ; then
+ ol_link_threads=posix
+ ol_link_pthreads=""
+ fi
+
+ # Pthread try link: -kthread (ol_cv_pthread_kthread)
+if test "$ol_link_threads" = no ; then
+ # try -kthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
+$as_echo_n "checking for pthread link with -kthread... " >&6; }
+if ${ol_cv_pthread_kthread+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_func_fork_works=$ac_cv_func_fork
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-kthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_kthread=yes
+else
+ ol_cv_pthread_kthread=no
fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_kthread=yes
+else
+ ol_cv_pthread_kthread=no
fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
+$as_echo "$ol_cv_pthread_kthread" >&6; }
+
+ if test $ol_cv_pthread_kthread = yes ; then
+ ol_link_pthreads="-kthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -pthread (ol_cv_pthread_pthread)
+if test "$ol_link_threads" = no ; then
+ # try -pthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
+$as_echo_n "checking for pthread link with -pthread... " >&6; }
+if ${ol_cv_pthread_pthread+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_vfork_works=cross
-else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
+#ifndef NULL
+#define NULL (void*)0
#endif
+
+static void *task(p)
+ void *p;
{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
+ return (void *) (p == NULL);
}
int
main ()
{
- pid_t parent = getpid ();
- pid_t child;
- sparc_address_test (0);
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
- child = vfork ();
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
- /* Did the child fail? (This shouldn't happen.) */
- || status
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
+ return 0;
+
+ ;
+ return 0;
}
_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_pthread=yes
+else
+ ol_cv_pthread_pthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_vfork_works=yes
+ ol_cv_pthread_pthread=yes
else
- ac_cv_func_vfork_works=no
+ ol_cv_pthread_pthread=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
+$as_echo "$ol_cv_pthread_pthread" >&6; }
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ if test $ol_cv_pthread_pthread = yes ; then
+ ol_link_pthreads="-pthread"
+ ol_link_threads=posix
+ fi
fi
-if test "x$ac_cv_func_vfork_works" = xyes; then
+ # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
+if test "$ol_link_threads" = no ; then
+ # try -pthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
+$as_echo_n "checking for pthread link with -pthreads... " >&6; }
+if ${ol_cv_pthread_pthreads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthreads $LIBS"
-else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-$as_echo "#define vfork fork" >>confdefs.h
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_pthreads=yes
+else
+ ol_cv_pthread_pthreads=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
- for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_pthreads=yes
+else
+ ol_cv_pthread_pthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
-done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
+$as_echo "$ol_cv_pthread_pthreads" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
+ if test $ol_cv_pthread_pthreads = yes ; then
+ ol_link_pthreads="-pthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
+if test "$ol_link_threads" = no ; then
+ # try -mthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
+$as_echo_n "checking for pthread link with -mthreads... " >&6; }
+if ${ol_cv_pthread_mthreads+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- 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_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-mthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
else
- ac_cv_path_SED=$SED
+ ol_cv_pthread_mthreads=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
- while :
- do
- POSIX_SHELL=`which bash`
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`which dash`
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=/usr/xpg4/bin/sh
- test -x "$POSIX_SHELL" && break
- POSIX_SHELL=`/bin/sh -c '
- exec 2>/dev/null
- if ! true ; then exit 1 ; fi
- echo /bin/sh'`
- test -x "$POSIX_SHELL" && break
- as_fn_error $? "Cannot locate a working POSIX shell" "$LINENO" 5
- done
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-cat >>confdefs.h <<_ACEOF
-#define POSIX_SHELL "${POSIX_SHELL}"
-_ACEOF
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
- LIBOPTS_BUILD_BLOCKED=''
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
- NEED_LIBOPTS_DIR=''
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
- # Check whether --enable-local-libopts was given.
-if test "${enable_local_libopts+set}" = set; then :
- enableval=$enable_local_libopts;
- if test x$enableval = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
-$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
- LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
- LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
- NEED_LIBOPTS_DIR=true
- fi
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
+else
+ ol_cv_pthread_mthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # Check whether --enable-libopts-install was given.
-if test "${enable_libopts_install+set}" = set; then :
- enableval=$enable_libopts_install;
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
+$as_echo "$ol_cv_pthread_mthreads" >&6; }
- if test "X${enable_libopts_install}" != Xno; then
- INSTALL_LIBOPTS_TRUE=
- INSTALL_LIBOPTS_FALSE='#'
+ if test $ol_cv_pthread_mthreads = yes ; then
+ ol_link_pthreads="-mthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -thread (ol_cv_pthread_thread)
+if test "$ol_link_threads" = no ; then
+ # try -thread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
+$as_echo_n "checking for pthread link with -thread... " >&6; }
+if ${ol_cv_pthread_thread+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- INSTALL_LIBOPTS_TRUE='#'
- INSTALL_LIBOPTS_FALSE=
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-thread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_thread=yes
+else
+ ol_cv_pthread_thread=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test -z "${NEED_LIBOPTS_DIR}" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
-$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-# Check whether --with-autoopts-config was given.
-if test "${with_autoopts_config+set}" = set; then :
- withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_thread=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
-$as_echo_n "checking whether autoopts-config is specified... " >&6; }
-if ${lo_cv_with_autoopts_config+:} false; then :
+ ol_cv_pthread_thread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
+$as_echo "$ol_cv_pthread_thread" >&6; }
+
+ if test $ol_cv_pthread_thread = yes ; then
+ ol_link_pthreads="-thread"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
$as_echo_n "(cached) " >&6
else
- if autoopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=autoopts-config
- elif libopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=libopts-config
- else lo_cv_with_autoopts_config=no ; fi
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
-$as_echo "$lo_cv_with_autoopts_config" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of AC_ARG_WITH
- if ${lo_cv_test_autoopts+:} false; then :
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -z "${lo_cv_with_autoopts_config}" \
- -o X"${lo_cv_with_autoopts_config}" = Xno
- then
- if autoopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=autoopts-config
- elif libopts-config --help 2>/dev/null 1>&2
- then lo_cv_with_autoopts_config=libopts-config
- else lo_cv_with_autoopts_config=false ; fi
- fi
- lo_cv_test_autoopts=`
- ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
- if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
- then lo_cv_test_autoopts=no ; fi
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc $LIBS"
-fi
- # end of CACHE_VAL
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
-$as_echo "${lo_cv_test_autoopts}" >&6; }
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test "X${lo_cv_test_autoopts}" != Xno
- then
- LIBOPTS_LDADD="${lo_cv_test_autoopts}"
- LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
- else
- LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
- LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
- NEED_LIBOPTS_DIR=true
- fi
- fi # end of if test -z "${NEED_LIBOPTS_DIR}"
- if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
- NEED_LIBOPTS_DIR=''
- fi
- if test -n "${NEED_LIBOPTS_DIR}"; then
- NEED_LIBOPTS_TRUE=
- NEED_LIBOPTS_FALSE='#'
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
else
- NEED_LIBOPTS_TRUE='#'
- NEED_LIBOPTS_FALSE=
+ ol_cv_pthread_lpthread_lmach_lexc=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
- LIBOPTS_DIR=libopts
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
-# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
-if test -z "$NEED_LIBOPTS_TRUE"; then :
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
- # Check to see if a reg expr header is specified.
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
-# Check whether --with-regex-header was given.
-if test "${with_regex_header+set}" = set; then :
- withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
-$as_echo_n "checking whether a reg expr header is specified... " >&6; }
-if ${libopts_cv_with_regex_header+:} false; then :
+ ol_cv_pthread_lpthread_lmach_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
+
+ if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -Wl,-woff,85
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
+if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
$as_echo_n "(cached) " >&6
else
- libopts_cv_with_regex_header=no
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -Wl,-woff,85 $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
+else
+ ol_cv_pthread_lib_lpthread_woff=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
-$as_echo "$libopts_cv_with_regex_header" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
+else
+ ol_cv_pthread_lib_lpthread_woff=no
fi
- # end of AC_ARG_WITH
- if test "X${libopts_cv_with_regex_header}" != Xno
- then
- cat >>confdefs.h <<_ACEOF
-#define REGEX_HEADER <${libopts_cv_with_regex_header}>
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
+$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
+
+ if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
+ ol_link_pthreads="-lpthread -Wl,-woff,85"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
+$as_echo_n "checking for pthread link with -lpthread... " >&6; }
+if ${ol_cv_pthread_lpthread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
+else
+ ol_cv_pthread_lpthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- else
-$as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
- fi
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
- # Check to see if a working libregex can be found.
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
-# Check whether --with-libregex was given.
-if test "${with_libregex+set}" = set; then :
- withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
-$as_echo_n "checking whether with-libregex was specified... " >&6; }
-if ${libopts_cv_with_libregex_root+:} false; then :
+ ol_cv_pthread_lpthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
+$as_echo "$ol_cv_pthread_lpthread" >&6; }
+
+ if test $ol_cv_pthread_lpthread = yes ; then
+ ol_link_pthreads="-lpthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
+$as_echo_n "checking for pthread link with -lc_r... " >&6; }
+if ${ol_cv_pthread_lc_r+:} false; then :
$as_echo_n "(cached) " >&6
else
- libopts_cv_with_libregex_root=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
-$as_echo "$libopts_cv_with_libregex_root" >&6; }
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lc_r=yes
+else
+ ol_cv_pthread_lc_r=no
fi
- # end of AC_ARG_WITH libregex
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- if test "${with_libregex+set}" = set && \
- test "${withval}" = no
- then ## disabled by request
- libopts_cv_with_libregex_root=no
- libopts_cv_with_libregex_cflags=no
- libopts_cv_with_libregex_libs=no
- else
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
-# Check whether --with-libregex-cflags was given.
-if test "${with_libregex_cflags+set}" = set; then :
- withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_regex_cflags}
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lc_r=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
-$as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
-if ${libopts_cv_with_libregex_cflags+:} false; then :
+ ol_cv_pthread_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
+$as_echo "$ol_cv_pthread_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lc_r = yes ; then
+ ol_link_pthreads="-lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -threads (ol_cv_pthread_threads)
+if test "$ol_link_threads" = no ; then
+ # try -threads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
+$as_echo_n "checking for pthread link with -threads... " >&6; }
+if ${ol_cv_pthread_threads+:} false; then :
$as_echo_n "(cached) " >&6
else
- libopts_cv_with_libregex_cflags=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
-$as_echo "$libopts_cv_with_libregex_cflags" >&6; }
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-threads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_threads=yes
+else
+ ol_cv_pthread_threads=no
fi
- # end of AC_ARG_WITH libregex-cflags
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Check whether --with-libregex-libs was given.
-if test "${with_libregex_libs+set}" = set; then :
- withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_regex_libs}
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_threads=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
-$as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
-if ${libopts_cv_with_libregex_libs+:} false; then :
+ ol_cv_pthread_threads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
+$as_echo "$ol_cv_pthread_threads" >&6; }
+
+ if test $ol_cv_pthread_threads = yes ; then
+ ol_link_pthreads="-threads"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
$as_echo_n "(cached) " >&6
else
- libopts_cv_with_libregex_libs=no
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
-$as_echo "$libopts_cv_with_libregex_libs" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of AC_ARG_WITH libregex-libs
- case "X${libopts_cv_with_libregex_cflags}" in
- Xyes|Xno|X )
- case "X${libopts_cv_with_libregex_root}" in
- Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
- * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
- esac
- esac
- case "X${libopts_cv_with_libregex_libs}" in
- Xyes|Xno|X )
- case "X${libopts_cv_with_libregex_root}" in
- Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
- * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";;
- esac
- esac
- libopts_save_CPPFLAGS="${CPPFLAGS}"
- libopts_save_LIBS="${LIBS}"
- fi ## disabled by request
- case "X${libopts_cv_with_libregex_cflags}" in
- Xyes|Xno|X )
- libopts_cv_with_libregex_cflags="" ;;
- * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
- esac
- case "X${libopts_cv_with_libregex_libs}" in
- Xyes|Xno|X )
- libopts_cv_with_libregex_libs="" ;;
- * )
- LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
- esac
- LIBREGEX_CFLAGS=""
- LIBREGEX_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
-$as_echo_n "checking whether libregex functions properly... " >&6; }
- if ${libopts_cv_with_libregex+:} false; then :
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- libopts_cv_with_libregex=no
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include REGEX_HEADER
-static regex_t re;
-void comp_re( char const* pzPat ) {
- int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
- if (res == 0) return;
- exit( res ); }
-int main() {
- regmatch_t m[2];
- comp_re( "^.*\$" );
- comp_re( "()|no.*" );
- comp_re( "." );
- if (regexec( &re, "X", 2, m, 0 ) != 0) return 1;
- if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
- fputs( "error: regex -->.<-- did not match\n", stderr );
- return 1;
- }
- return 0; }
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_with_libregex=yes
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
else
- libopts_cv_with_libregex=no
+ ol_cv_pthread_lpthreads_lmach_lexc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of AC_TRY_RUN
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
- # end of AC_CACHE_VAL for libopts_cv_with_libregex
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
-$as_echo "${libopts_cv_with_libregex}" >&6; }
- if test "X${libopts_cv_with_libregex}" != Xno
- then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
-$as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
+ if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
- else
- CPPFLAGS="${libopts_save_CPPFLAGS}"
- LIBS="${libopts_save_LIBS}"
- fi
+ # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lexc $LIBS"
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- # Check to see if pathfind(3) works.
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
-$as_echo_n "checking whether pathfind(3) works... " >&6; }
- if ${libopts_cv_run_pathfind+:} false; then :
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
+
+ if test $ol_cv_pthread_lpthreads_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
+$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
+if ${ol_cv_pthread_lib_lpthreads+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- libopts_cv_run_pathfind=no
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads $LIBS"
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthreads=yes
+else
+ ol_cv_pthread_lib_lpthreads=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.h>
-#include <stdlib.h>
-int main (int argc, char** argv) {
- char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
- return (pz == 0) ? 1 : 0;
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_run_pathfind=yes
+ ol_cv_pthread_lib_lpthreads=yes
else
- libopts_cv_run_pathfind=no
+ ol_cv_pthread_lib_lpthreads=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of TRY_RUN
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
fi
- # end of AC_CACHE_VAL for libopts_cv_run_pathfind
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
-$as_echo "${libopts_cv_run_pathfind}" >&6; }
- if test "X${libopts_cv_run_pathfind}" != Xno
- then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
+$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
-$as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
+ if test $ol_cv_pthread_lib_lpthreads = yes ; then
+ ol_link_pthreads="-lpthreads"
+ ol_link_threads=posix
+ fi
+fi
- fi
+ if test $ol_link_threads != no ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
- # Check to see if /dev/zero is readable device.
+ for ac_func in sched_yield pthread_yield thr_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
-$as_echo_n "checking whether /dev/zero is readable device... " >&6; }
- if ${libopts_cv_test_dev_zero+:} false; then :
+fi
+done
+
+
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test $ac_cv_func_thr_yield = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- libopts_cv_test_dev_zero=`exec 2> /dev/null
-dzero=\`ls -lL /dev/zero | egrep ^c......r\`
-test -z "${dzero}" && exit 1
-echo ${dzero}`
- if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
- then libopts_cv_test_dev_zero=no
- fi
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rt_sched_yield=yes
+else
+ ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+ LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+
+$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+ ac_cv_func_sched_yield=yes
+else
+ ac_cv_func_sched_yield=no
fi
- # end of CACHE_VAL of libopts_cv_test_dev_zero
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
-$as_echo "${libopts_cv_test_dev_zero}" >&6; }
- if test "X${libopts_cv_test_dev_zero}" != Xno
- then
-$as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
+ fi
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test "$ac_cv_func_thr_yield" = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
+$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+ fi
- fi
+ for ac_func in pthread_kill
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
+if test "x$ac_cv_func_pthread_kill" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL 1
+_ACEOF
+fi
+done
- # Check to see if we have a functional realpath(3C).
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
+$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
-$as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
- if ${libopts_cv_run_realpath+:} false; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <pthread.h>
+pthread_rwlock_t rwlock;
+
+int
+main ()
+{
+pthread_rwlock_destroy(&rwlock);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_rwlock_destroy=yes
+else
+ ol_cv_func_pthread_rwlock_destroy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
+$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
+ if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
+
+$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
+$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_detach+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- libopts_cv_run_realpath=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+int
+main ()
+{
+pthread_detach(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_detach=yes
+else
+ ol_cv_func_pthread_detach=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
+$as_echo "$ol_cv_func_pthread_detach" >&6; }
+
+ if test $ol_cv_func_pthread_detach = no ; then
+ as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
+ fi
+
+
+$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
+
+
+ for ac_func in \
+ pthread_setconcurrency \
+ pthread_getconcurrency \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+ for ac_func in pthread_kill_other_threads_np
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
+if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
+_ACEOF
+
+fi
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
+$as_echo_n "checking for LinuxThreads implementation... " >&6; }
+if ${ol_cv_sys_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
+$as_echo "$ol_cv_sys_linux_threads" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
+$as_echo_n "checking for LinuxThreads consistency... " >&6; }
+if ${ol_cv_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ol_cv_header_linux_threads = yes &&
+ test $ol_cv_sys_linux_threads = yes; then
+ ol_cv_linux_threads=yes
+ elif test $ol_cv_header_linux_threads = no &&
+ test $ol_cv_sys_linux_threads = no; then
+ ol_cv_linux_threads=no
+ else
+ ol_cv_linux_threads=error
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
+$as_echo "$ol_cv_linux_threads" >&6; }
+
+
+ if test $ol_cv_linux_threads = error; then
+ as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
+$as_echo_n "checking if pthread_create() works... " >&6; }
+if ${ol_cv_pthread_create_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_create_works=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <limits.h>
-#include <stdlib.h>
-int main (int argc, char** argv) {
-#ifndef PATH_MAX
-choke me!!
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
#else
- char zPath[PATH_MAX+1];
+ status = pthread_attr_setdetachstate(&attr, detach);
#endif
- char *pz = realpath(argv[0], zPath);
- return (pz == zPath) ? 0 : 1;
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_run_realpath=yes
+ ol_cv_pthread_create_works=yes
else
- libopts_cv_run_realpath=no
+ ol_cv_pthread_create_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of TRY_RUN
fi
- # end of AC_CACHE_VAL for libopts_cv_run_realpath
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
-$as_echo "${libopts_cv_run_realpath}" >&6; }
- if test "X${libopts_cv_run_realpath}" != Xno
- then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
+$as_echo "$ol_cv_pthread_create_works" >&6; }
-$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
+ if test $ol_cv_pthread_create_works = no ; then
+ as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
+ fi
- fi
+ ol_replace_broken_yield=no
+ if test $ol_replace_broken_yield = yes ; then
+$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
- # Check to see if strftime() works.
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
-$as_echo_n "checking whether strftime() works... " >&6; }
- if ${libopts_cv_run_strftime+:} false; then :
+ if test x$ol_with_yielding_select = xauto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
+$as_echo_n "checking if select yields when using pthreads... " >&6; }
+if ${ol_cv_pthread_select_yields+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- libopts_cv_run_strftime=no
-
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_select_yields=cross
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <time.h>
-#include <string.h>
-char t_buf[ 64 ];
-int main() {
- static char const z[] = "Thursday Aug 28 240";
- struct tm tm;
- tm.tm_sec = 36; /* seconds after the minute [0, 61] */
- tm.tm_min = 44; /* minutes after the hour [0, 59] */
- tm.tm_hour = 12; /* hour since midnight [0, 23] */
- tm.tm_mday = 28; /* day of the month [1, 31] */
- tm.tm_mon = 7; /* months since January [0, 11] */
- tm.tm_year = 86; /* years since 1900 */
- tm.tm_wday = 4; /* days since Sunday [0, 6] */
- tm.tm_yday = 239; /* days since January 1 [0, 365] */
- tm.tm_isdst = 1; /* flag for daylight savings time */
- strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
- return (strcmp( t_buf, z ) != 0); }
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*) 0
+#endif
+
+static int fildes[2];
+
+static void *task(p)
+ void *p;
+{
+ int i;
+ struct timeval tv;
+
+ fd_set rfds;
+
+ tv.tv_sec=10;
+ tv.tv_usec=0;
+
+ FD_ZERO(&rfds);
+ FD_SET(fildes[0], &rfds);
+
+ /* we're not interested in any fds */
+ i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
+
+ if(i < 0) {
+ perror("select");
+ exit(10);
+ }
+
+ exit(0); /* if we exit here, the select blocked the whole process */
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t t;
+
+ /* create a pipe to select */
+ if(pipe(&fildes[0])) {
+ perror("select");
+ exit(1);
+ }
+
+#ifdef HAVE_PTHREAD_SETCONCURRENCY
+ (void) pthread_setconcurrency(2);
+#else
+#ifdef HAVE_THR_SETCONCURRENCY
+ /* Set Solaris LWP concurrency to 2 */
+ thr_setconcurrency(2);
+#endif
+#endif
+
+#if HAVE_PTHREADS < 6
+ pthread_create(&t, pthread_attr_default, task, NULL);
+#else
+ pthread_create(&t, NULL, task, NULL);
+#endif
+
+ /* make sure task runs first */
+#ifdef HAVE_THR_YIELD
+ thr_yield();
+#elif defined( HAVE_SCHED_YIELD )
+ sched_yield();
+#elif defined( HAVE_PTHREAD_YIELD )
+ pthread_yield();
+#endif
+
+ exit(2);
+}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_run_strftime=yes
+ ol_cv_pthread_select_yields=no
else
- libopts_cv_run_strftime=no
+ ol_cv_pthread_select_yields=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- # end of TRY_RUN
fi
- # end of AC_CACHE_VAL for libopts_cv_run_strftime
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
-$as_echo "${libopts_cv_run_strftime}" >&6; }
- if test "X${libopts_cv_run_strftime}" != Xno
- then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
+$as_echo "$ol_cv_pthread_select_yields" >&6; }
-$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+ if test $ol_cv_pthread_select_yields = cross ; then
+ as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
+ fi
- fi
+ if test $ol_cv_pthread_select_yields = yes ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
+ fi
+ fi
+ if test $ol_with_threads = posix ; then
+ as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
+ fi
+ ;;
+esac
- # Check to see if fopen accepts "b" mode.
+case $ol_with_threads in auto | yes | mach)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
-$as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
- if ${libopts_cv_run_fopen_binary+:} false; then :
+ for ac_header in mach/cthreads.h cthreads.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_mach_cthreads_h = yes ; then
+ ol_with_threads=found
+
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
+fi
+
+
+ if test $ol_link_threads = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
+$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
+if ${ol_cv_cthread_all_load+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
- libopts_cv_run_fopen_binary=no
+ save_LIBS="$LIBS"
+ LIBS="-all_load $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <mach/cthreads.h>
+int
+main ()
+{
+ cthread_fork((void *)0, (void *)0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_cthread_all_load=yes
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ol_cv_cthread_all_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
+$as_echo "$ol_cv_cthread_all_load" >&6; }
+
+ if test $ol_cv_cthread_all_load = yes ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
+ ol_link_threads=mach
+ ol_with_threads=found
+ fi
+ fi
+
+ elif test $ac_cv_header_cthreads_h = yes ; then
+
+ ol_with_threads=found
+
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lthreads"
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
+fi
+
+ LIBS="$save_LIBS"
+
+ if test $ol_link_threads = yes ; then
+ LTHREAD_LIBS="-lthreads"
+ ol_link_threads=mach
+ ol_with_threads=found
+ else
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+
+ elif test $ol_with_threads = mach ; then
+ as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
+ fi
+
+ if test $ol_link_threads = mach ; then
+
+$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
+
+ elif test $ol_with_threads = found ; then
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | pth)
+
+ for ac_header in pth.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTH_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_pth_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
+$as_echo_n "checking for pth_version in -lpth... " >&6; }
+if ${ac_cv_lib_pth_pth_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpth $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
-int main (int argc, char** argv) {
-FILE* fp = fopen("conftest.$ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pth_version ();
+int
+main ()
+{
+return pth_version ();
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_run_fopen_binary=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pth_pth_version=yes
else
- libopts_cv_run_fopen_binary=no
+ ac_cv_lib_pth_pth_version=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
- # end of TRY_RUN
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
+$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
+if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
+ have_pth=yes
+else
+ have_pth=no
+fi
+
+
+ if test $have_pth = yes ; then
+
+$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
+ ol_link_threads=pth
+ ol_with_threads=found
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | lwp)
+
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
- # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
-$as_echo "${libopts_cv_run_fopen_binary}" >&6; }
- if test "X${libopts_cv_run_fopen_binary}" != Xno
- then
-$as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
+done
- else
+ if test $ac_cv_header_thread_h = yes &&
+ test $ac_cv_header_synch_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
+$as_echo_n "checking for thr_create in -lthread... " >&6; }
+if ${ac_cv_lib_thread_thr_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-$as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char thr_create ();
+int
+main ()
+{
+return thr_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_thread_thr_create=yes
+else
+ ac_cv_lib_thread_thr_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
+$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
+if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
+ have_thr=yes
+else
+ have_thr=no
+fi
- fi
+ if test $have_thr = yes ; then
+$as_echo "#define HAVE_THR 1" >>confdefs.h
- # Check to see if fopen accepts "t" mode.
+ LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
+ ol_link_threads=thr
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
-$as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
- if ${libopts_cv_run_fopen_text+:} false; then :
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+
+ for ac_func in \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_lwp_lwp_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
+$as_echo_n "checking for lwp_create in -llwp... " >&6; }
+if ${ac_cv_lib_lwp_lwp_create+:} false; then :
$as_echo_n "(cached) " >&6
else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llwp $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lwp_create ();
+int
+main ()
+{
+return lwp_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lwp_lwp_create=yes
+else
+ ac_cv_lib_lwp_lwp_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
+$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
+if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
+ have_lwp=yes
+else
+ have_lwp=no
+fi
+
+
+ if test $have_lwp = yes ; then
+
+$as_echo "#define HAVE_LWP 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
+ ol_link_threads=lwp
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=no
+ fi
+ fi
+ fi
+ ;;
+esac
+
+if test $ol_with_yielding_select = yes ; then
+
+$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
+
+fi
+
+if test $ol_with_threads = manual ; then
+ ol_link_threads=yes
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
+$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
+
+ for ac_header in pthread.h sched.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in sched_yield pthread_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
- if test "$cross_compiling" = yes; then :
- libopts_cv_run_fopen_text=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
-int main (int argc, char** argv) {
-FILE* fp = fopen("conftest.$ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }
+#include <pthread.h>
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- libopts_cv_run_fopen_text=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
else
- libopts_cv_run_fopen_text=no
+ ol_cv_header_linux_threads=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest*
+
+
fi
- # end of TRY_RUN
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
+
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ for ac_header in mach/cthreads.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MACH_CTHREADS_H 1
+_ACEOF
fi
- # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
-$as_echo "${libopts_cv_run_fopen_text}" >&6; }
- if test "X${libopts_cv_run_fopen_text}" != Xno
- then
-$as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
+done
- else
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
-$as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
+fi
- fi
+done
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
- # Check to see if not wanting optional option args.
+done
- # Check whether --enable-optional-args was given.
-if test "${enable_optional_args+set}" = set; then :
- enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
+fi
+
+if test $ol_link_threads != no && test $ol_link_threads != nt ; then
+
+$as_echo "#define REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
+$as_echo_n "checking for thread specific errno... " >&6; }
+if ${ol_cv_errno_thread_specific+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
-$as_echo_n "checking whether not wanting optional option args... " >&6; }
-if ${libopts_cv_enable_optional_args+:} false; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+errno = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_errno_thread_specific=yes
+else
+ ol_cv_errno_thread_specific=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
+$as_echo "$ol_cv_errno_thread_specific" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
+$as_echo_n "checking for thread specific h_errno... " >&6; }
+if ${ol_cv_h_errno_thread_specific+:} false; then :
$as_echo_n "(cached) " >&6
else
- libopts_cv_enable_optional_args=yes
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netdb.h>
+int
+main ()
+{
+h_errno = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_h_errno_thread_specific=yes
+else
+ ol_cv_h_errno_thread_specific=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
-$as_echo "$libopts_cv_enable_optional_args" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
- # end of AC_ARG_ENABLE
- if test "X${libopts_cv_enable_optional_args}" = Xno
- then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
+$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
-$as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
+ if test $ol_cv_errno_thread_specific != yes ||
+ test $ol_cv_h_errno_thread_specific != yes ; then
+ LIBS="$LTHREAD_LIBS $LIBS"
+ LTHREAD_LIBS=""
+ fi
- fi
+fi
+if test $ol_link_threads = no ; then
+ if test $ol_with_threads = yes ; then
+ as_fn_error $? "no suitable thread support" "$LINENO" 5
+ fi
+ if test $ol_with_threads = auto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
+$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+ ol_with_threads=no
+ fi
- ac_config_files="$ac_config_files libopts/Makefile"
+$as_echo "#define NO_THREADS 1" >>confdefs.h
+ LTHREAD_LIBS=""
+ BUILD_THREAD=no
+else
+ BUILD_THREAD=yes
+fi
-fi # end of AC_DEFUN of LIBOPTS_CHECK
+if test $ol_link_threads != no ; then
+$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+fi
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+case "$ol_with_threads" in
+ no)
+ ol_pthread_ok=no
+
+ ;;
+ *)
+ ol_found_pthreads=yes
+ ;;
esac
+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
-macro_version='2.4'
-macro_revision='1.3293'
+ case "$ol_found_pthreads" in
+ yes)
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ for ac_func in sem_timedwait
+do :
+ ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
+if test "x$ac_cv_func_sem_timedwait" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_TIMEDWAIT 1
+_ACEOF
+fi
+done
+ LIBS="$saved_LIBS"
+ { saved_LIBS=; unset saved_LIBS;}
+ CFLAGS="$saved_CFLAGS"
+ { saved_CFLAGS=; unset saved_CFLAGS;}
+ case "$ac_cv_func_sem_timedwait" in
+ yes)
+ PTHREAD_LIBS="$LTHREAD_LIBS"
+ have_pthreads=yes
+ # Bug 2332: With GCC we need to force a reference to libgcc_s
+ # (if libgcc_s exists) or the combination of
+ # threads + setuid + mlockall does not work on linux because
+ # thread cancellation fails to load libgcc_s with dlopen().
+ # We have to pass this all as linker options to avoid argument
+ # reordering by libtool.
+ case "$GCC$with_gnu_ld" in
+ yesyes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -lgcc_s" >&5
+$as_echo_n "checking for exit in -lgcc_s... " >&6; }
+if ${ac_cv_lib_gcc_s_exit+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcc_s $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char exit ();
+int
+main ()
+{
+return exit ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_gcc_s_exit=yes
+else
+ ac_cv_lib_gcc_s_exit=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcc_s_exit" >&5
+$as_echo "$ac_cv_lib_gcc_s_exit" >&6; }
+if test "x$ac_cv_lib_gcc_s_exit" = xyes; then :
+ PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"
+fi
+ ;;
+ esac
+ esac
+ esac
+esac
+case "$have_pthreads" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+$as_echo_n "checking size of pthread_t... " >&6; }
+if ${ac_cv_sizeof_pthread_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
+ $ac_includes_default
+ #include <pthread.h>
+"; then :
+else
+ if test "$ac_cv_type_pthread_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (pthread_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_pthread_t=0
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
+_ACEOF
-ltmain="$ac_aux_dir/ltmain.sh"
-# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+ LIBISC_PTHREADS_NOTHREADS=pthreads
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
+$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+ #
+ # We'd like to use sigwait() too
+ #
+ ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
+if test "x$ac_cv_func_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
+$as_echo_n "checking for sigwait in -lc... " >&6; }
+if ${ac_cv_lib_c_sigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
+int
+main ()
+{
+return sigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_sigwait=yes
+else
+ ac_cv_lib_c_sigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
+$as_echo "$ac_cv_lib_c_sigwait" >&6; }
+if test "x$ac_cv_lib_c_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
+$as_echo_n "checking for sigwait in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_sigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
+int
+main ()
+{
+return sigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread_sigwait=yes
+else
+ ac_cv_lib_pthread_sigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
+$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
+if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
+ have_sigwait=yes
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
+$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread__Psigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _Psigwait ();
+int
+main ()
+{
+return _Psigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread__Psigwait=yes
+else
+ ac_cv_lib_pthread__Psigwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
+$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
+if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
+ have_sigwait=yes
+else
+ have_sigwait=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ case "$host:$have_sigwait" in
+ *-freebsd*:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
+$as_echo_n "checking for sigwait in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_sigwait+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sigwait ();
+int
+main ()
+{
+return sigwait ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_r_sigwait=yes
+else
+ ac_cv_lib_c_r_sigwait=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
+$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
+if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
+ have_sigwait=yes
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
+fi
+
+ esac
+ case "$have_sigwait" in
+ yes)
+ ac_cv_func_sigwait=yes
+
+$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
+
+ esac
+
+ for ac_func in pthread_attr_getstacksize
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
+if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
+_ACEOF
+
+fi
+done
+
+ for ac_func in pthread_attr_setstacksize sysconf
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ case "$host" in
+ *-freebsd5.[012]|*-freebsd5.[012].*)
+ ;;
+ *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
+
+$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
+
+ ;;
+ *-bsdi3.*|*-bsdi4.0*)
+
+$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
+
+ ;;
+ *-linux*)
+
+$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
+
+ ;;
+ *-solaris*)
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ for ac_func in pthread_setconcurrency
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
+if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_SETCONCURRENCY 1
+_ACEOF
+
+fi
+done
+
+ case "$ac_cv_func_pthread_setconcurrency" in
+ yes)
+
+$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+
+ esac
+ ;;
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
+
+$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
+
+ ;;
+ esac
+ hack_shutup_pthreadonceinit=no
+ case "$host" in
+ *-aix5.[123].*)
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.[89])
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.1[0-9])
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
+$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
+if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <pthread.h>
+
+int
+main ()
{
- $ECHO ""
+
+ static pthread_once_t once_test =
+ PTHREAD_ONCE_INIT;
+
+
+ ;
+ return 0;
}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_braces_around_pthread_once_init=no
+else
+ ntp_cv_braces_around_pthread_once_init=yes
-case "$ECHO" in
- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
+$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
+ case "$ntp_cv_braces_around_pthread_once_init" in
+ yes)
+ hack_shutup_pthreadonceinit=yes
+ esac
+ ;;
+ esac
+ case "$hack_shutup_pthreadonceinit" in
+ yes)
+
+$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
+
+ esac
+ LIBS="$saved_LIBS"
+ { saved_LIBS=; unset saved_LIBS;}
+ CFLAGS="$saved_CFLAGS"
+ { saved_CFLAGS=; unset saved_CFLAGS;}
+ ;;
+ *)
+ LIBISC_PTHREADS_NOTHREADS=nothreads
+ ;;
esac
+ if test "$have_pthreads" != "no"; then
+ PTHREADS_TRUE=
+ PTHREADS_FALSE='#'
+else
+ PTHREADS_TRUE='#'
+ PTHREADS_FALSE=
+fi
@@ -6783,283 +14827,1086 @@ esac
+case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
+ no:yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
+$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
+if ${ntp_cv_vsnprintf_percent_m+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ntp_cv_vsnprintf_percent_m=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ );
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ )
+ {
+ va_list ap;
+ int rc;
+
+ va_start(ap, fmt);
+ rc = vsnprintf(dst, sz, fmt, ap);
+ va_end(ap);
+
+ return rc;
+ }
+int
+main ()
+{
+ char sbuf[512];
+ char pbuf[512];
+ int slen;
+ strcpy(sbuf, strerror(ENOENT));
+ errno = ENOENT;
+ slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
+ "wrong");
+ return strcmp(sbuf, pbuf);
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
- $as_echo_n "(cached) " >&6
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ntp_cv_vsnprintf_percent_m=yes
else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- 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_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ ntp_cv_vsnprintf_percent_m=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
+$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
+ case "$ntp_cv_vsnprintf_percent_m" in
+ yes)
+
+$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
+
+ esac
esac
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+for ac_header in sys/clockctl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_CLOCKCTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+# Check whether --enable-clockctl was given.
+if test "${enable_clockctl+set}" = set; then :
+ enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
+else
+ ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
+$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
+$as_echo "$ntp_use_dev_clockctl" >&6; }
+
+
+for ac_header in sys/capability.h sys/prctl.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
+$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
+
+case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
+ yesyes)
+ case "$host" in
+ mips-sgi-irix*)
+ ntp_have_linuxcaps=no
+ ;;
+ *) ntp_have_linuxcaps=yes
+ ;;
+ esac
+ ;;
+ *)
+ ntp_have_linuxcaps=no
+ ;;
+esac
+
+# Check whether --enable-linuxcaps was given.
+if test "${enable_linuxcaps+set}" = set; then :
+ enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
+$as_echo "$ntp_have_linuxcaps" >&6; }
+
+case "$ntp_have_linuxcaps" in
+ yes)
+
+$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
+
+ LIBS="$LIBS -lcap"
+ ;;
+esac
+
+
+for ac_header in priv.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
+if test "x$ac_cv_header_priv_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PRIV_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
+$as_echo_n "checking if we have solaris privileges... " >&6; }
+
+case "$ac_cv_header_priv_h" in
+ yes)
+ case "$host" in
+ *-solaris*)
+ ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
+if test "x$ac_cv_func_setppriv" = xyes; then :
+ ntp_have_solarisprivs=yes
+else
+ ntp_have_solarisprivs=no
+
+fi
+
+ ;;
+ esac
+esac
+
+# Check whether --enable-solarisprivs was given.
+if test "${enable_solarisprivs+set}" = set; then :
+ enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
+
+fi
+
+
+
+case "$ntp_have_solarisprivs" in
+ yes)
+
+$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
+
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
+$as_echo "$ntp_have_solarisprivs" >&6; }
+
+case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
+ *yes*)
+
+$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
+
+esac
+
+case "$host" in
+ *-*-darwin*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
+$as_echo_n "checking for library containing res_9_init... " >&6; }
+if ${ac_cv_search_res_9_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_9_init ();
+int
+main ()
+{
+return res_9_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_res_9_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_res_9_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_res_9_init+:} false; then :
+
else
- ac_cv_path_SED=$SED
+ ac_cv_search_res_9_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
+$as_echo "$ac_cv_search_res_9_init" >&6; }
+ac_res=$ac_cv_search_res_9_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
+ ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
+$as_echo_n "checking for library containing res_init... " >&6; }
+if ${ac_cv_search_res_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char res_init ();
+int
+main ()
+{
+return res_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_res_init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_res_init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_res_init+:} false; then :
+else
+ ac_cv_search_res_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
+$as_echo "$ac_cv_search_res_init" >&6; }
+ac_res=$ac_cv_search_res_init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
+ ;;
+esac
+for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+#HMS: Why do we do this check so "early"?
+for ac_func in res_init
+do :
+ ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
+if test "x$ac_cv_func_res_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+else
+ for ac_func in __res_init
+do :
+ ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
+if test "x$ac_cv_func___res_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___RES_INIT 1
+_ACEOF
+fi
+done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
+fi
+done
+
+
+# We also need -lsocket, but we have tested for that already.
+ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
+if test "x$ac_cv_func_inet_ntop" = xyes; then :
+
+else
+
+$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes; then :
+
+else
+
+$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
+if test "x$ac_cv_type_int32" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT32 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
+if test "x$ac_cv_type_u_int32" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_U_INT32 1
+_ACEOF
+
+
+fi
+
+
+
+
+case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
+$as_echo_n "checking for int32 with DNS headers included... " >&6; }
+if ${ntp_cv_type_int32_with_dns+:} false; then :
$as_echo_n "(cached) " >&6
else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
+
+int
+main ()
+{
+
+ size_t cb = sizeof(int32);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_type_int32_with_dns=yes
+else
+ ntp_cv_type_int32_with_dns=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
+$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
+ case "$ntp_cv_type_int32_with_dns" in
+ yes)
+
+$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
+
+ esac
esac
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
+case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
+$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
+if ${ntp_cv_type_u_int32_with_dns+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_path_FGREP=$FGREP
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
+
+int
+main ()
+{
+
+ size_t cb = sizeof(u_int32);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_type_u_int32_with_dns=yes
+else
+ ntp_cv_type_u_int32_with_dns=no
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
+$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
+ case "$ntp_cv_type_u_int32_with_dns" in
+ yes)
+$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
-test -z "$GREP" && GREP=grep
+ esac
+esac
+
+for ac_header in sys/timepps.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_ERRNO_H
+ # include <errno.h>
+ #endif
+
+
+"
+if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEPPS_H 1
+_ACEOF
+fi
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
+$as_echo_n "checking for struct timespec... " >&6; }
+if ${ntp_cv_struct_timespec+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_timespec=yes
+else
+ ntp_cv_struct_timespec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
+$as_echo "$ntp_cv_struct_timespec" >&6; }
+case "$ntp_cv_struct_timespec" in
+ yes)
+$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
+$as_echo_n "checking for struct ntptimeval... " >&6; }
+if ${ntp_cv_struct_ntptimeval+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ #include <sys/time.h>
+ #include <sys/timex.h>
+int
+main ()
+{
+ struct ntptimeval n;
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_struct_ntptimeval=yes
else
- with_gnu_ld=no
+ ntp_cv_struct_ntptimeval=no
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
+$as_echo "$ntp_cv_struct_ntptimeval" >&6; }
+case "$ntp_cv_struct_ntptimeval" in
+ yes)
+
+$as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
+
+esac
+
+for ac_header in md5.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+
+
+"
+if test "x$ac_cv_header_md5_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MD5_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
+$as_echo_n "checking for library containing MD5Init... " >&6; }
+if ${ac_cv_search_MD5Init+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char MD5Init ();
+int
+main ()
+{
+return MD5Init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' md5 md; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_MD5Init=$ac_res
fi
-if ${lt_cv_path_LD+:} false; then :
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_MD5Init+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_MD5Init+:} false; then :
+
+else
+ ac_cv_search_MD5Init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
+$as_echo "$ac_cv_search_MD5Init" >&6; }
+ac_res=$ac_cv_search_MD5Init
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
+$as_echo_n "checking for SIGIO... " >&6; }
+if ${ntp_cv_hdr_def_sigio+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <signal.h>
+
+ #ifndef SIGIO
+ # error
+ #endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ntp_cv_hdr_def_sigio=yes
+else
+ ntp_cv_hdr_def_sigio=no
+
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
+$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
+$as_echo_n "checking if we want to use SIGIO... " >&6; }
+ans=no
+case "$ntp_cv_hdr_def_sigio" in
+ yes)
+ ans=yes
+ case "$host" in
+ alpha*-dec-osf4*|alpha*-dec-osf5*)
+ ans=no
;;
- *)
- test "$with_gnu_ld" != yes && break
+ *-convex-*)
+ ans=no
;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
+ *-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
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ m68k-*-mint*)
+ ans=no
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+
+$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
+
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
+$as_echo_n "checking for SIGPOLL... " >&6; }
+if ${ntp_cv_hdr_def_sigpoll+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <signal.h>
+
+ #ifndef SIGPOLL
+ # error
+ #endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ntp_cv_hdr_def_sigpoll=yes
+else
+ ntp_cv_hdr_def_sigpoll=no
+
fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
+$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
+$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
+ans=no
+case "$ntp_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[4-9]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-solaris*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+
+$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
+
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
+$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
+ans=no
+case "$ntp_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[4-9]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+
+$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
+
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
+$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
+if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/time.h>
+
+int
+main ()
+{
+
+ gettimeofday(0, 0);
+ settimeofday(0, 0);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_func_Xettimeofday_nargs=2
+else
+ ntp_cv_func_Xettimeofday_nargs=1
+
fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
- $as_echo_n "(cached) " >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
+$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
+case "$ntp_cv_func_Xettimeofday_nargs" in
+ 1)
+
+$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
+
+esac
+
+for ac_func in settimeofday
+do :
+ ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
+if test "x$ac_cv_func_settimeofday" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SETTIMEOFDAY 1
+_ACEOF
+
else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
+
+ case "$host" in
+ *-*-mpeix*) ac_cv_func_settimeofday=yes
+ esac
+
+fi
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
+$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
+ntp_warning='GRONK'
+ans=none
+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!'
+ esac
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
+$as_echo "$ans" >&6; }
+case "$ntp_warning" in
+ '')
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
+$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
+ ;;
esac
+
+
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$__LIBS
+{ __LIBS=; unset __LIBS;}
+
+
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
@@ -7069,6 +15916,48 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4'
+macro_revision='1.3293'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
if ${lt_cv_path_NM+:} false; then :
@@ -13725,46 +22614,114 @@ CC="$lt_save_CC"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
-$as_echo_n "checking for directory path separator... " >&6; }
-if ${ntp_cv_dir_sep+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case "$ntp_cv_dir_sep" in
- '')
- case "$target_os" in
- *djgpp | *mingw32* | *emx*)
- ntp_cv_dir_sep="'\\'"
- ;;
- *)
- ntp_cv_dir_sep="'/'"
- ;;
- esac
- esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
+$as_echo_n "checking if sntp will be built... " >&6; }
+
+# Check whether --with-sntp was given.
+if test "${with_sntp+set}" = set; then :
+ withval=$with_sntp;
+else
+ with_sntp="${withsntp=yes}"
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
-$as_echo "$ntp_cv_dir_sep" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define DIR_SEP $ntp_cv_dir_sep
-_ACEOF
+case "$with_sntp" in
+ no)
+ SNTP=
+ ;;
+ *)
+ SNTP=sntp
+ ;;
+esac
+
+ if test -n "$SNTP"; then
+ BUILD_SNTP_TRUE=
+ BUILD_SNTP_FALSE='#'
+else
+ BUILD_SNTP_TRUE='#'
+ BUILD_SNTP_FALSE=
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
+$as_echo "$with_sntp" >&6; }
-# Checks for libraries.
-LIBM=
-case "$host" in
- *-*-darwin*)
+case "$SNTP" in
+ '')
+ SNTP_DB=
+ SNTP_DL=
+ SNTP_DS=
;;
- *)
- _libs=$LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
-$as_echo_n "checking for library containing cos... " >&6; }
-if ${ac_cv_search_cos+:} false; then :
+esac
+
+###
+
+# NTP has (so far) been relying on leading-edge autogen.
+# Therefore, by default:
+# - use the version we ship with
+# - do not install it
+# - build a static copy (AC_DISABLE_SHARED - done earlier)
+case "${enable_local_libopts+set}" in
+ set) ;;
+ *) enable_local_libopts=yes ;;
+esac
+case "${enable_libopts_install+set}" in
+ set) ;;
+ *) enable_libopts_install=no ;;
+esac
+enable_nls=no
+
+
+ ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -13777,16 +22734,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char cos ();
+char opendir ();
int
main ()
{
-return cos ();
+return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' m; do
+for ac_lib in '' dir; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -13794,69 +22751,34 @@ for ac_lib in '' m; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_cos=$ac_res
+ ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_cos+:} false; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if ${ac_cv_search_cos+:} false; then :
+if ${ac_cv_search_opendir+:} false; then :
else
- ac_cv_search_cos=no
+ ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
-$as_echo "$ac_cv_search_cos" >&6; }
-ac_res=$ac_cv_search_cos
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- LIBM="-lm"
-fi
-
- LIBS=$_libs
- ;;
-esac
-
-{ _libs=; unset _libs;}
-
-case "$GCC" in
- yes)
- CFLAGS="$CFLAGS -Wall"
- # CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wcast-qual"
- # CFLAGS="$CFLAGS -Wconversion"
- # CFLAGS="$CFLAGS -Werror"
- # CFLAGS="$CFLAGS -Wextra"
- # CFLAGS="$CFLAGS -Wfloat-equal"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
- case "$ntp_cv_gcc_Winit_self" in
- yes)
- CFLAGS="$CFLAGS -Winit-self"
- esac
- case "$ntp_cv_gcc_Wstrict_overflow" in
- yes)
- CFLAGS="$CFLAGS -Wstrict-overflow"
- esac
- # -W[no-]strict-prototypes is added later depending on OpenSSL
-esac
-
-ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent"
-if test "x$ac_cv_func_gethostent" = xyes; then :
+fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostent" >&5
-$as_echo_n "checking for library containing gethostent... " >&6; }
-if ${ac_cv_search_gethostent+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
@@ -13869,42 +22791,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char gethostent ();
+char opendir ();
int
main ()
{
-return gethostent ();
+return opendir ();
;
return 0;
}
_ACEOF
-for ac_lib in '' nsl; do
+for ac_lib in '' x; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
- LIBS="-l$ac_lib $libxnet -lsocket $ac_func_search_save_LIBS"
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_gethostent=$ac_res
+ ac_cv_search_opendir=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
- if ${ac_cv_search_gethostent+:} false; then :
+ if ${ac_cv_search_opendir+:} false; then :
break
fi
done
-if ${ac_cv_search_gethostent+:} false; then :
+if ${ac_cv_search_opendir+:} false; then :
else
- ac_cv_search_gethostent=no
+ ac_cv_search_opendir=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostent" >&5
-$as_echo "$ac_cv_search_gethostent" >&6; }
-ac_res=$ac_cv_search_gethostent
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -13912,71 +22834,495 @@ fi
fi
-ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
-if test "x$ac_cv_func_openlog" = xyes; then :
+ # =================
+ # AC_CHECK_HEADERS
+ # =================
+ for ac_header in \
+ sys/mman.h sys/param.h sys/poll.h sys/procset.h \
+ sys/select.h sys/socket.h sys/stropts.h sys/time.h \
+ sys/un.h sys/wait.h dlfcn.h errno.h \
+ fcntl.h libgen.h libintl.h memory.h \
+ netinet/in.h setjmp.h stdbool.h sysexits.h \
+ unistd.h utime.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ for ac_header in stdarg.h varargs.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_arg_hdr=true;break
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
+ lo_have_arg_hdr=false
+fi
+
+done
+
+
+ for ac_header in string.h strings.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_str_hdr=true;break
+else
+ lo_have_str_hdr=false
+fi
+
+done
+
+
+ for ac_header in limits.h sys/limits.h values.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_lim_hdr=true;break
+else
+ lo_have_lim_hdr=false
+fi
+
+done
+
+
+ for ac_header in inttypes.h stdint.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ lo_have_typ_hdr=true;break
+else
+ lo_have_typ_hdr=false
+fi
+
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
+$as_echo_n "checking for working stdnoreturn.h... " >&6; }
+if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv) {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char openlog ();
int
main ()
{
-return openlog ();
+
;
return 0;
}
_ACEOF
-for ac_lib in '' gen; do
- if test -z "$ac_lib"; then
- ac_res="none required"
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_stdnoreturn_h=yes
+else
+ gl_cv_header_working_stdnoreturn_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
+$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
+
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ STDNORETURN_H='stdnoreturn.h'
fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_openlog=$ac_res
+
+
+ if test -n "$STDNORETURN_H"; then
+ GL_GENERATE_STDNORETURN_H_TRUE=
+ GL_GENERATE_STDNORETURN_H_FALSE='#'
+else
+ GL_GENERATE_STDNORETURN_H_TRUE='#'
+ GL_GENERATE_STDNORETURN_H_FALSE=
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
- break
+
+
+
+ # ----------------------------------------------------------------------
+ # check for various programs used during the build.
+ # On OS/X, "wchar.h" needs "runetype.h" to work properly.
+ # ----------------------------------------------------------------------
+ for ac_header in runetype.h wchar.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
+
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
-if ${ac_cv_search_openlog+:} false; then :
+
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls;
+fi
+
+ if test "x$enable_nls" != "xno" && \
+ test "X${ac_cv_header_libintl_h}" = Xyes; then :
+
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+fi
+
+ # --------------------------------------------
+ # Verify certain entries from AC_CHECK_HEADERS
+ # --------------------------------------------
+ ${lo_have_arg_hdr} || \
+ as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
+
+ ${lo_have_str_hdr} || \
+ as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
+
+ ${lo_have_lim_hdr} || \
+ as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
+
+ ${lo_have_typ_hdr} || \
+ as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
+
+ for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
+ do eval as_ac_var=\${ac_cv_header_${f}_h}
+ test "X${as_ac_var}" = Xyes || {
+ as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
+ }
+ done
+ test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
+ echo '#include <stdint.h>' > inttypes.h
+
+ # ----------------------------------------------------------------------
+ # Checks for typedefs
+ # ----------------------------------------------------------------------
+ ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
+if test "x$ac_cv_type_wchar_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WCHAR_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
+ $ac_includes_default
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
+ #if HAVE_WCHAR_H
+ # include <wchar.h>
+ #endif
+
+"
+if test "x$ac_cv_type_wint_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
+if test "x$ac_cv_type_int8_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT8_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint8_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT8_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
+if test "x$ac_cv_type_int16_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT16_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint16_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT16_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
+if test "x$ac_cv_type_int32_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT32_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint32_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT32_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
+if test "x$ac_cv_type_uint_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PID_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIZE_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
+
+
+fi
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5
+$as_echo_n "checking size of char*... " >&6; }
+if ${ac_cv_sizeof_charp+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_search_openlog=no
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_charp" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (char*)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_charp=0
+ fi
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
-ac_res=$ac_cv_search_openlog
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5
+$as_echo "$ac_cv_sizeof_charp" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHARP $ac_cv_sizeof_charp
+_ACEOF
+
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
-$as_echo_n "checking for library containing openlog... " >&6; }
-if ${ac_cv_search_openlog+:} false; then :
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+
+ # ------------
+ # AC_CHECK_LIB
+ # ------------
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
+$as_echo_n "checking for pathfind in -lgen... " >&6; }
+if ${ac_cv_lib_gen_pathfind+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13986,58 +23332,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char openlog ();
+char pathfind ();
int
main ()
{
-return openlog ();
+return pathfind ();
;
return 0;
}
_ACEOF
-for ac_lib in '' syslog; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $libxnet -lsocket $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_openlog=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_openlog+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_openlog+:} false; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_gen_pathfind=yes
else
- ac_cv_search_openlog=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+ ac_cv_lib_gen_pathfind=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
-$as_echo "$ac_cv_search_openlog" >&6; }
-ac_res=$ac_cv_search_openlog
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
+$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
+if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGEN 1
+_ACEOF
-fi
+ LIBS="-lgen $LIBS"
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-$as_echo_n "checking for library containing setsockopt... " >&6; }
-if ${ac_cv_search_setsockopt+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_gettext+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_func_search_save_LIBS=$LIBS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14047,899 +23377,1799 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char setsockopt ();
+char gettext ();
int
main ()
{
-return setsockopt ();
+return gettext ();
;
return 0;
}
_ACEOF
-for ac_lib in '' socket xnet; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_setsockopt=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_gettext=yes
+else
+ ac_cv_lib_intl_gettext=no
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_setsockopt+:} false; then :
- break
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-done
-if ${ac_cv_search_setsockopt+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
+$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL 1
+_ACEOF
+
+ LIBS="-lintl $LIBS"
-else
- ac_cv_search_setsockopt=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+
+ for ac_func in vprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
+if test "x$ac_cv_func_vprintf" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VPRINTF 1
+_ACEOF
+
+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
+if test "x$ac_cv_func__doprnt" = xyes; then :
+
+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
-$as_echo "$ac_cv_search_setsockopt" >&6; }
-ac_res=$ac_cv_search_setsockopt
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
+done
-# Checks for header files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
+ for ac_header in vfork.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in fork vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if ${ac_cv_func_fork_works+:} false; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_fork_works=cross
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
+$ac_includes_default
int
main ()
{
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_fork_works=yes
else
- ac_cv_header_stdc=no
+ ac_cv_func_fork_works=no
fi
-rm -f core conftest.err 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
else
- ac_cv_header_stdc=no
+ ac_cv_func_fork_works=$ac_cv_func_fork
fi
-rm -f conftest*
-
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if ${ac_cv_func_vfork_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
if test "$cross_compiling" = yes; then :
- :
+ ac_cv_func_vfork_works=cross
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.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))
+/* Thanks to Paul Eggert for this test. */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
-#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))
- return 2;
- return 0;
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test (0);
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ return (
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
-
+ ac_cv_func_vfork_works=yes
else
- ac_cv_header_stdc=no
+ ac_cv_func_vfork_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
-#
-case "$host" in
- *-hp-hpux*)
- for ac_header in net/netmp.h
+fi
+
+ for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
+ strrchr strsignal fchmod fstat chmod
do :
- ac_fn_c_check_header_mongrel "$LINENO" "net/netmp.h" "ac_cv_header_net_netmp_h" "$ac_includes_default"
-if test "x$ac_cv_header_net_netmp_h" = xyes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_NET_NETMP_H 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- netmp_h_works=yes
+
+fi
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- netmp_h_works=no
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
fi
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
- case "$netmp_h_works" in
- no)
- cat >>confdefs.h <<_ACEOF
-#ifndef MPINFOU_PREDECLARED
-# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
- struct pdk_mpinfo *pdkptr;
- struct mpinfo *pikptr;
-} mpinfou_t;
-#endif
+ while :
+ do
+ POSIX_SHELL=`which bash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`which dash`
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=/usr/xpg4/bin/sh
+ test -x "$POSIX_SHELL" && break
+ POSIX_SHELL=`/bin/sh -c '
+ exec 2>/dev/null
+ if ! true ; then exit 1 ; fi
+ echo /bin/sh'`
+ test -x "$POSIX_SHELL" && break
+ as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
+ done
+
+cat >>confdefs.h <<_ACEOF
+#define POSIX_SHELL "${POSIX_SHELL}"
_ACEOF
- ;;
- esac
- ;;
-esac
-for ac_header in netdb.h netinet/in.h stdlib.h string.h strings.h syslog.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+
+
+ LIBOPTS_BUILD_BLOCKED=''
+
+
+ NEED_LIBOPTS_DIR=''
+
+ # Check whether --enable-local-libopts was given.
+if test "${enable_local_libopts+set}" = set; then :
+ enableval=$enable_local_libopts;
+ if test x$enableval = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
+$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
+ LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
+ NEED_LIBOPTS_DIR=true
+ LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
+ fi
fi
-done
-for ac_header in sys/socket.h sys/time.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ # Check whether --enable-libopts-install was given.
+if test "${enable_libopts_install+set}" = set; then :
+ enableval=$enable_libopts_install;
+fi
+ if test "X${enable_libopts_install}" = Xyes; then
+ INSTALL_LIBOPTS_TRUE=
+ INSTALL_LIBOPTS_FALSE='#'
+else
+ INSTALL_LIBOPTS_TRUE='#'
+ INSTALL_LIBOPTS_FALSE=
fi
-done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if ${ac_cv_header_time+:} false; then :
+ if test -z "${NEED_LIBOPTS_DIR}" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
+$as_echo_n "checking whether autoopts-config can be found... " >&6; }
+
+# Check whether --with-autoopts-config was given.
+if test "${with_autoopts_config+set}" = set; then :
+ withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
+$as_echo_n "checking whether autoopts-config is specified... " >&6; }
+if ${lo_cv_with_autoopts_config+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
+ if autoopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=autoopts-config
+ elif libopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=libopts-config
+ else lo_cv_with_autoopts_config=no ; fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
+$as_echo "$lo_cv_with_autoopts_config" >&6; }
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_time=yes
+fi
+ # end of AC_ARG_WITH
+
+ if ${lo_cv_test_autoopts+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_header_time=no
+
+ if test -z "${lo_cv_with_autoopts_config}" \
+ -o X"${lo_cv_with_autoopts_config}" = Xno
+ then
+ if autoopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=autoopts-config
+ elif libopts-config --help 2>/dev/null 1>&2
+ then lo_cv_with_autoopts_config=libopts-config
+ else lo_cv_with_autoopts_config=false ; fi
+ fi
+ lo_cv_test_autoopts=`
+ ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
+ if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
+ then lo_cv_test_autoopts=no ; fi
+
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # end of CACHE_VAL
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
+$as_echo "${lo_cv_test_autoopts}" >&6; }
+
+ if test "X${lo_cv_test_autoopts}" != Xno
+ then
+ LIBOPTS_LDADD="${lo_cv_test_autoopts}"
+ LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
+ else
+ LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
+ LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
+ NEED_LIBOPTS_DIR=true
+ fi
+ fi # end of if test -z "${NEED_LIBOPTS_DIR}"
+ if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
+ NEED_LIBOPTS_DIR=''
+ fi
+ if test -n "${NEED_LIBOPTS_DIR}"; then
+ NEED_LIBOPTS_TRUE=
+ NEED_LIBOPTS_FALSE='#'
+else
+ NEED_LIBOPTS_TRUE='#'
+ NEED_LIBOPTS_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
-fi
+ LIBOPTS_DIR=libopts
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
+
+# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
+
+
+ if test -z "$NEED_LIBOPTS_TRUE"; then :
+
+
+
+ # Check to see if a reg expr header is specified.
+
+
+# Check whether --with-regex-header was given.
+if test "${with_regex_header+set}" = set; then :
+ withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
+$as_echo_n "checking whether a reg expr header is specified... " >&6; }
+if ${libopts_cv_with_regex_header+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ libopts_cv_with_regex_header=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
+$as_echo "$libopts_cv_with_regex_header" >&6; }
-#include <stdbool.h>
-#ifndef bool
- "error: bool is not defined"
-#endif
-#ifndef false
- "error: false is not defined"
-#endif
-#if false
- "error: false is not 0"
-#endif
-#ifndef true
- "error: true is not defined"
-#endif
-#if true != 1
- "error: true is not 1"
-#endif
-#ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
-#endif
+fi
+ # end of AC_ARG_WITH
+ if test "X${libopts_cv_with_regex_header}" != Xno
+ then
+ cat >>confdefs.h <<_ACEOF
+#define REGEX_HEADER <${libopts_cv_with_regex_header}>
+_ACEOF
- struct s { _Bool s: 1; _Bool t; } s;
+ else
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- /* The following fails for
- HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- /* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- */
- _Bool q = true;
- _Bool *pq = &q;
+$as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
-int
-main ()
-{
+ fi
- bool e = &s;
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdbool_h=yes
+
+ # Check to see if a working libregex can be found.
+
+
+# Check whether --with-libregex was given.
+if test "${with_libregex+set}" = set; then :
+ withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
else
- ac_cv_header_stdbool_h=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
+$as_echo_n "checking whether with-libregex was specified... " >&6; }
+if ${libopts_cv_with_libregex_root+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libopts_cv_with_libregex_root=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
+$as_echo "$libopts_cv_with_libregex_root" >&6; }
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
-ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
+ # end of AC_ARG_WITH libregex
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
+ if test "${with_libregex+set}" = set && \
+ test "X${withval}" = Xno
+ then ## disabled by request
+ libopts_cv_with_libregex_root=no
+ libopts_cv_with_libregex_cflags=no
+ libopts_cv_with_libregex_libs=no
+ else
+# Check whether --with-libregex-cflags was given.
+if test "${with_libregex_cflags+set}" = set; then :
+ withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
+$as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
+if ${libopts_cv_with_libregex_cflags+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libopts_cv_with_libregex_cflags=no
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
+$as_echo "$libopts_cv_with_libregex_cflags" >&6; }
-if test $ac_cv_header_stdbool_h = yes; then
+fi
+ # end of AC_ARG_WITH libregex-cflags
-$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+# Check whether --with-libregex-libs was given.
+if test "${with_libregex_libs+set}" = set; then :
+ withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
+$as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
+if ${libopts_cv_with_libregex_libs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libopts_cv_with_libregex_libs=no
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
+$as_echo "$libopts_cv_with_libregex_libs" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
+fi
+ # end of AC_ARG_WITH libregex-libs
+
+ case "X${libopts_cv_with_libregex_cflags}" in
+ Xyes|Xno|X )
+ case "X${libopts_cv_with_libregex_root}" in
+ Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
+ * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
+ esac
+ esac
+ case "X${libopts_cv_with_libregex_libs}" in
+ Xyes|Xno|X )
+ case "X${libopts_cv_with_libregex_root}" in
+ Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
+ * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";;
+ esac
+ esac
+ libopts_save_CPPFLAGS="${CPPFLAGS}"
+ libopts_save_LIBS="${LIBS}"
+ case "X${libopts_cv_with_libregex_cflags}" in
+ Xyes|Xno|X )
+ libopts_cv_with_libregex_cflags="" ;;
+ * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
+ esac
+ case "X${libopts_cv_with_libregex_libs}" in
+ Xyes|Xno|X )
+ libopts_cv_with_libregex_libs="" ;;
+ * )
+ LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
+ esac
+ LIBREGEX_CFLAGS=""
+ LIBREGEX_LIBS=""
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
+$as_echo_n "checking whether libregex functions properly... " >&6; }
+ if ${libopts_cv_with_libregex+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_with_libregex=no
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include REGEX_HEADER
+static regex_t re;
+void comp_re( char const* pzPat ) {
+ int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
+ if (res == 0) return;
+ exit( res ); }
+int main() {
+ regmatch_t m[2];
+ comp_re( "^.*\$" );
+ comp_re( "()|no.*" );
+ comp_re( "." );
+ if (regexec( &re, "X", 2, m, 0 ) != 0) return 1;
+ if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
+ fputs( "error: regex -->.<-- did not match\n", stderr );
+ return 1;
+ }
+ return 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_with_libregex=yes
+else
+ libopts_cv_with_libregex=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ # end of AC_RUN_IFELSE
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset cs;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* 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";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
+fi
+ # end of AC_CACHE_VAL for libopts_cv_with_libregex
+ fi ## disabled by request
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
+$as_echo "${libopts_cv_with_libregex}" >&6; }
+ if test "X${libopts_cv_with_libregex}" != Xno
+ then
- *t++ = 0;
- if (s) return 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;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
-#endif
+$as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
- ;
- return 0;
+ else
+ CPPFLAGS="${libopts_save_CPPFLAGS}"
+ LIBS="${libopts_save_LIBS}"
+ libopts_cv_with_libregex_root=no
+libopts_cv_with_libregex_cflags=no
+libopts_cv_with_libregex_libs=no
+libopts_cv_with_libregex=no
+ fi
+
+
+
+ # Check to see if pathfind(3) works.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
+$as_echo_n "checking whether pathfind(3) works... " >&6; }
+ if ${libopts_cv_run_pathfind+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_run_pathfind=no
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+#include <stdlib.h>
+int main (int argc, char** argv) {
+ char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
+ return (pz == 0) ? 1 : 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_run_pathfind=yes
else
- ac_cv_c_const=no
+ libopts_cv_run_pathfind=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
+ # end of RUN_IFELSE
fi
+ # end of AC_CACHE_VAL for libopts_cv_run_pathfind
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
+$as_echo "${libopts_cv_run_pathfind}" >&6; }
+ if test "X${libopts_cv_run_pathfind}" != Xno
+ then
+
+$as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
+
+ fi
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+
+ # Check to see if /dev/zero is readable device.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
+$as_echo_n "checking whether /dev/zero is readable device... " >&6; }
+ if ${libopts_cv_test_dev_zero+:} false; then :
+ $as_echo_n "(cached) " >&6
else
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+ libopts_cv_test_dev_zero=`exec 2> /dev/null
+dzero=\`ls -lL /dev/zero | egrep ^c......r\`
+test -z "${dzero}" && exit 1
+echo ${dzero}`
+ if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
+ then libopts_cv_test_dev_zero=no
+ fi
fi
+ # end of CACHE_VAL of libopts_cv_test_dev_zero
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
+$as_echo "${libopts_cv_test_dev_zero}" >&6; }
+ if test "X${libopts_cv_test_dev_zero}" != Xno
+ then
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
-if ${ac_cv_sizeof_time_t+:} false; then :
+$as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
+
+ fi
+
+
+
+ # Check to see if we have a functional realpath(3C).
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
+$as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
+ if ${libopts_cv_run_realpath+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then :
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_run_realpath=no
else
- if test "$ac_cv_type_time_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (time_t)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_time_t=0
- fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+#include <stdlib.h>
+int main (int argc, char** argv) {
+#ifndef PATH_MAX
+choke me!!
+#else
+ char zPath[PATH_MAX+1];
+#endif
+ char *pz = realpath(argv[0], zPath);
+ return (pz == zPath) ? 0 : 1;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_run_realpath=yes
+else
+ libopts_cv_run_realpath=no
fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ # end of RUN_IFELSE
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+ # end of AC_CACHE_VAL for libopts_cv_run_realpath
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
+$as_echo "${libopts_cv_run_realpath}" >&6; }
+ if test "X${libopts_cv_run_realpath}" != Xno
+ then
+$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
+ fi
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-_ACEOF
+ # Check to see if strftime() works.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
+$as_echo_n "checking whether strftime() works... " >&6; }
+ if ${libopts_cv_run_strftime+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_run_strftime=no
+
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
-
+#include <time.h>
+#include <string.h>
+char t_buf[ 64 ];
+int main() {
+ static char const z[] = "Thursday Aug 28 240";
+ struct tm tm;
+ tm.tm_sec = 36; /* seconds after the minute [0, 61] */
+ tm.tm_min = 44; /* minutes after the hour [0, 59] */
+ tm.tm_hour = 12; /* hour since midnight [0, 23] */
+ tm.tm_mday = 28; /* day of the month [1, 31] */
+ tm.tm_mon = 7; /* months since January [0, 11] */
+ tm.tm_year = 86; /* years since 1900 */
+ tm.tm_wday = 4; /* days since Sunday [0, 6] */
+ tm.tm_yday = 239; /* days since January 1 [0, 365] */
+ tm.tm_isdst = 1; /* flag for daylight savings time */
+ strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
+ return (strcmp( t_buf, z ) != 0); }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_run_strftime=yes
+else
+ libopts_cv_run_strftime=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
+ # end of RUN_IFELSE
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
+fi
+ # end of AC_CACHE_VAL for libopts_cv_run_strftime
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
+$as_echo "${libopts_cv_run_strftime}" >&6; }
+ if test "X${libopts_cv_run_strftime}" != Xno
+ then
+$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
-case "$ac_cv_c_inline" in
- '')
- ;;
- *)
+ fi
-$as_echo "#define HAVE_INLINE 1" >>confdefs.h
-esac
+ # Check to see if fopen accepts "b" mode.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
-if ${ac_cv_c_char_unsigned+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
+$as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
+ if ${libopts_cv_run_fopen_binary+:} false; then :
$as_echo_n "(cached) " >&6
else
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_run_fopen_binary=no
+
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
+#include <stdio.h>
+int main (int argc, char** argv) {
+FILE* fp = fopen("conftest.$ac_ext", "rb");
+return (fp == NULL) ? 1 : fclose(fp); }
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_char_unsigned=no
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_run_fopen_binary=yes
else
- ac_cv_c_char_unsigned=yes
+ libopts_cv_run_fopen_binary=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
-if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
+ # end of RUN_IFELSE
fi
- # The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
-$as_echo_n "checking size of signed char... " >&6; }
-if ${ac_cv_sizeof_signed_char+:} false; then :
+ # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
+$as_echo "${libopts_cv_run_fopen_binary}" >&6; }
+ if test "X${libopts_cv_run_fopen_binary}" != Xno
+ then
+
+$as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
+
+ else
+
+$as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
+
+ fi
+
+
+
+ # Check to see if fopen accepts "t" mode.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
+$as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
+ if ${libopts_cv_run_fopen_text+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char" "$ac_includes_default"; then :
+
+ if test "$cross_compiling" = yes; then :
+ libopts_cv_run_fopen_text=no
else
- if test "$ac_cv_type_signed_char" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (signed char)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_signed_char=0
- fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int main (int argc, char** argv) {
+FILE* fp = fopen("conftest.$ac_ext", "rt");
+return (fp == NULL) ? 1 : fclose(fp); }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ libopts_cv_run_fopen_text=yes
+else
+ libopts_cv_run_fopen_text=no
fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ # end of RUN_IFELSE
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
-$as_echo "$ac_cv_sizeof_signed_char" >&6; }
+ # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
+$as_echo "${libopts_cv_run_fopen_text}" >&6; }
+ if test "X${libopts_cv_run_fopen_text}" != Xno
+ then
+$as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
+ else
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
-_ACEOF
+$as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
+
+ fi
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+ # Check to see if not wanting optional option args.
+
+ # Check whether --enable-optional-args was given.
+if test "${enable_optional_args+set}" = set; then :
+ enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_int=0
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
+$as_echo_n "checking whether not wanting optional option args... " >&6; }
+if ${libopts_cv_enable_optional_args+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libopts_cv_enable_optional_args=yes
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
+$as_echo "$libopts_cv_enable_optional_args" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+ # end of AC_ARG_ENABLE
+ if test "X${libopts_cv_enable_optional_args}" = Xno
+ then
+$as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
+ fi
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-# The cast to long int 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.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
+
+
+ fi
+ ac_config_files="$ac_config_files libopts/Makefile"
+
+ # end of AC_DEFUN of LIBOPTS_CHECK
+
+
+
+
+ntp_pkgconfig_min_version='0.15.0'
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
+{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
+{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
+case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
-ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
-if test "x$ac_cv_type_s_char" = xyes; then :
-cat >>confdefs.h <<_ACEOF
-#define HAVE_S_CHAR 1
-_ACEOF
+# Check whether --enable-local-libevent was given.
+if test "${enable_local_libevent+set}" = set; then :
+ enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
+else
+ ntp_use_local_libevent=${ntp_use_local_libevent-detect}
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...
+
+
+
+
+
+ if test -z "$BUILD_SNTP_TRUE"; then :
+
+
+
+
+
+ntp_libevent_min_version=2.0.9
+ntp_libevent_tearoff=libevent
+
+
+
+
+case "$ntp_use_local_libevent" in
+ yes)
;;
- no0no)
- # We have signed chars, can't say 'signed char', no s_char typedef.
+ *) # If we have (a good enough) pkg-config, see if it can find libevent
+ case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
+ if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
+ then
+ ntp_use_local_libevent=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
+$as_echo "$as_me: Using the installed libevent" >&6;}
+ CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
+ # HMS: I hope the following is accurate.
+ # We don't need -levent, we only need -levent_core.
+ # While we could grab only the -L stuff, there *might* be
+ # other flags there we want. Originally we just removed -levent
+ # but then somebody decided to install -levent-2.0
+ # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
+ # So now we dance...
+ LDADD_LIBEVENT=
+ for i in `$PKG_CONFIG --libs libevent`
+ do
+ case "$i" in
+ -levent*) ;;
+ *) case "$LDADD_LIBEVENT" in
+ '') LDADD_LIBEVENT="$i" ;;
+ *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
+ esac
+ ;;
+ esac
+ done
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
+ esac
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ ntp_use_local_libevent=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ ntp_use_local_libevent=yes
+ ;;
+ esac
+ ;;
+esac
-$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+case "$ntp_use_local_libevent" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
+$as_echo "$as_me: Using libevent tearoff" >&6;}
+ CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ ;;
+ *)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ esac
+esac
+ if test "x$ntp_use_local_libevent" = "xyes"; then
+ BUILD_LIBEVENT_TRUE=
+ BUILD_LIBEVENT_FALSE='#'
+else
+ BUILD_LIBEVENT_TRUE='#'
+ BUILD_LIBEVENT_FALSE=
+fi
+
+
+
+
+case "$ntp_libevent_tearoff" in
+ libevent)
;;
- no1no)
- # We have signed chars, can say 'signed char', no s_char typedef.
- $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+ *)
+ as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
+ ;;
+esac
+
+case "$ntp_use_local_libevent" in
+ yes)
+ ac_configure_args=" --disable-openssl${ac_configure_args}"
+ ac_configure_args=" --disable-shared${ac_configure_args}"
+ ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
+ ac_configure_args=" --disable-libevent-install${ac_configure_args}"
+ ac_configure_args=" --enable-silent-rules${ac_configure_args}"
+ ac_configure_args=" --enable-function-sections${ac_configure_args}"
+ subdirs="$subdirs libevent"
;;
- yes0no)
- # We have unsigned chars, can't say 'signed char', no s_char typedef.
- as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
+ *)
+ NTP_FORCE_LIBEVENT_DIST=libevent
;;
- yes1no)
- # We have unsigned chars, can say 'signed char', no s_char typedef.
- $as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
+esac
+
+
+ else
+
+
+ntp_libevent_min_version=2.0.9
+ntp_libevent_tearoff=libevent
+
+
+
+
+case "$ntp_use_local_libevent" in
+ yes)
+ ;;
+ *) # If we have (a good enough) pkg-config, see if it can find libevent
+ case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
+$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
+ if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
+ then
+ ntp_use_local_libevent=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using the installed libevent" >&5
+$as_echo "$as_me: Using the installed libevent" >&6;}
+ CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
+ # HMS: I hope the following is accurate.
+ # We don't need -levent, we only need -levent_core.
+ # While we could grab only the -L stuff, there *might* be
+ # other flags there we want. Originally we just removed -levent
+ # but then somebody decided to install -levent-2.0
+ # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
+ # So now we dance...
+ LDADD_LIBEVENT=
+ for i in `$PKG_CONFIG --libs libevent`
+ do
+ case "$i" in
+ -levent*) ;;
+ *) case "$LDADD_LIBEVENT" in
+ '') LDADD_LIBEVENT="$i" ;;
+ *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
+ esac
+ ;;
+ esac
+ done
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
+ esac
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ ntp_use_local_libevent=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ ntp_use_local_libevent=yes
+ ;;
+ esac
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
+
+case "$ntp_use_local_libevent" in
+ yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
+$as_echo "$as_me: Using libevent tearoff" >&6;}
+ CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ ;;
+ *)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ esac
+esac
+
+ if test "x$ntp_use_local_libevent" = "xyes"; then
+ BUILD_LIBEVENT_TRUE=
+ BUILD_LIBEVENT_FALSE='#'
+else
+ BUILD_LIBEVENT_TRUE='#'
+ BUILD_LIBEVENT_FALSE=
+fi
+
+
+
+
+ fi
+
+# Checks for libraries.
+
+
+LIB_SYSLOG=''
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
+$as_echo_n "checking for library containing openlog... " >&6; }
+if ${ac_cv_search_openlog+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openlog ();
+int
+main ()
+{
+return openlog ();
+ ;
+ return 0;
+}
_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
+for ac_lib in '' gen syslog; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_openlog=$ac_res
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_openlog+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_openlog+:} false; then :
+else
+ ac_cv_search_openlog=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
+$as_echo "$ac_cv_search_openlog" >&6; }
+ac_res=$ac_cv_search_openlog
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ case "$ac_cv_search_openlog" in
+ 'none required') ;;
+ no) ;;
+ *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
+ esac
-$as_echo "#define uid_t int" >>confdefs.h
+fi
-$as_echo "#define gid_t int" >>confdefs.h
+# Checks for header files.
+for ac_header in netdb.h string.h strings.h syslog.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
+done
+for ac_header in sysexits.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
+if test "x$ac_cv_header_sysexits_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYSEXITS_H 1
+_ACEOF
+
+else
+
+$as_echo "#define EX_OK 0" >>confdefs.h
+$as_echo "#define EX_SOFTWARE 70" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
-$as_echo_n "checking for openssl library directory... " >&6; }
-# Check whether --with-openssl-libdir was given.
-if test "${with_openssl_libdir+set}" = set; then :
- withval=$with_openssl_libdir; ans=$withval
+fi
+
+done
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
+$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
+if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define SYSLOG_NAMES
+#include <stdlib.h>
+#include <syslog.h>
+int
+main ()
+{
+ void *fnames; fnames = facilitynames;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
+else
+ ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
+$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
+case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
+ yes)
+
+$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
-case "$ans" in
- no)
- ;;
- yes) # Look in:
- ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib /lib"
- ;;
- *) # Look where they said
;;
-esac
-case "$ans" in
no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
+$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
;;
- *) # 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.so -a -f $i/libssl.so && 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
+ cross)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
+$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
-$as_echo_n "checking for openssl include directory... " >&6; }
-# Check whether --with-openssl-incdir was given.
-if test "${with_openssl_incdir+set}" = set; then :
- withval=$with_openssl_incdir; ans=$withval
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+ $as_echo_n "(cached) " >&6
else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
- case "$build" in
- $host) ans=yes ;;
- *) ans=no ;;
- esac
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ /* See body of main program for 'e'. */
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+
+int
+main ()
+{
+
+ bool e = &s;
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdbool_h=yes
+else
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
-case "$ans" in
- no)
- ;;
- yes) # look in:
- ans="/usr/include /usr/sfw/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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
-$as_echo_n "checking if we will use crypto... " >&6; }
+
+
+
+VER_SUFFIX=
+
+
+
# Check whether --with-crypto was given.
if test "${with_crypto+set}" = set; then :
- withval=$with_crypto; ans=$withval
-else
- ans=yes
+ withval=$with_crypto;
+fi
+
+# Check whether --with-openssl-libdir was given.
+if test "${with_openssl_libdir+set}" = set; then :
+ withval=$with_openssl_libdir;
fi
-case "$ans" in
- no)
- ;;
- yes|openssl)
- if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
- then
- ans=no
- else
- ans=yes
- fi
-esac
-ntp_openssl=$ans
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
-$as_echo "$ans" >&6; }
-case "$ntp_openssl" in
+# Check whether --with-openssl-incdir was given.
+if test "${with_openssl_incdir+set}" = set; then :
+ withval=$with_openssl_incdir;
+fi
+
+
+# Check whether --with-rpath was given.
+if test "${with_rpath+set}" = set; then :
+ withval=$with_rpath;
+fi
+
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+with_crypto=${with_crypto:-openssl,libcrypto}
+case "$with_crypto" in
yes)
- # We have OpenSSL inc/lib - use them.
- case "$OPENSSL_INC" in
- /usr/include)
+ with_crypto=openssl,libcrypto
+esac
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
+$as_echo_n "checking pkg-config for $pkg... " >&6; }
+ if $PKG_CONFIG --exists $pkg ; then
+ CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
+ CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
+ LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
+ VER_SUFFIX=o
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+ break
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ done
+esac
+case "$with_crypto:$ntp_openssl" in
+ no:*) ;;
+ *:no)
+ need_dash_r=
+ need_dash_Wlrpath=
+ case "${with_rpath-notgiven}" in
+ yes)
+ # Lame - what to do if we need -Wl... but not -R?
+ need_dash_r=1
;;
- *)
- CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
+ notgiven)
+ case "$host" in
+ *-*-linux*)
+ # This may really only be true for gcc
+ need_dash_Wlrpath=1
+ ;;
+ *-*-netbsd*)
+ need_dash_r=1
+ ;;
+ *-*-solaris*)
+ need_dash_r=1
+ ;;
+ esac
;;
esac
- case "$OPENSSL_LIB" in
- /usr/lib)
- ;;
- *)
- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
- case "$need_dash_r" in
- 1)
- LDFLAGS="$LDFLAGS -R$OPENSSL_LIB"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
+$as_echo_n "checking for openssl library directory... " >&6; }
+ with_openssl_libdir=${with_openssl_libdir-notgiven}
+ case "$with_openssl_libdir" in
+ notgiven)
+ case "$build" in
+ $host)
+ with_openssl_libdir=default
+ ;;
+ *)
+ with_openssl_libdir=no
+ ;;
esac
+ esac
+ case "$with_openssl_libdir" in
+ default)
+ # Look in:
+ with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
+ esac
+ case "$with_openssl_libdir" in
+ no)
+ ;;
+ *) # Look for libcrypto.a and libssl.a:
+ for i in $with_openssl_libdir no
+ do
+ case "$host" in
+ *-*-darwin*)
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+ test -f $i/libcrypto.so -a -f $i/libssl.so && break
+ test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ ;;
+ esac
+ done
+ openssl_libdir=$i
;;
esac
- LCRYPTO=-lcrypto
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
+$as_echo "$openssl_libdir" >&6; }
+ case "$openssl_libdir" in
+ no)
+ openssl_libdir=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
+$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
+$as_echo_n "checking for openssl include directory... " >&6; }
+ with_openssl_incdir=${with_openssl_incdir-notgiven}
+ case "$with_openssl_incdir" in
+ notgiven)
+ # Look in:
+ with_openssl_incdir="/usr/include /usr/sfw/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
+ esac
+ case "$with_openssl_incdir" in
+ no)
+ ;;
+ *) # look for openssl/evp.h:
+ for i in $with_openssl_incdir no
+ do
+ test -f $i/openssl/evp.h && break
+ done
+ openssl_incdir=$i
+ ;;
+ esac
+ { i=; unset i;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
+$as_echo "$openssl_incdir" >&6; }
+ case "$openssl_incdir" in
+ no)
+ openssl_incdir=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
+$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
+ esac
+ if test -z "$openssl_libdir" -o -z "$openssl_incdir"
+ then
+ ntp_openssl=no
+ else
+ ntp_openssl=yes
+ VER_SUFFIX=o
+ fi
+ case "$ntp_openssl" in
+ yes)
+ # We have OpenSSL inc/lib dirs - use them.
+ case "$openssl_incdir" in
+ /usr/include)
+ ;;
+ *)
+ CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
+ ;;
+ esac
+ case "$openssl_libdir" in
+ /usr/lib)
+ ;;
+ *)
+ LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
+ case "$need_dash_r" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
+ esac
+ case "$need_dash_Wlrpath" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
+ esac
+ ;;
+ esac
+ LDADD_NTP="$LDADD_NTP -lcrypto"
+ esac
+esac
-$as_echo "#define OPENSSL 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
+$as_echo_n "checking if we will use crypto... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
+$as_echo "$ntp_openssl" >&6; }
+
+case "$ntp_openssl" in
+ yes)
+$as_echo "#define OPENSSL /**/" >>confdefs.h
+
+ case "$VER_SUFFIX" in
+ *o*) ;;
+ *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
+ esac
+ ;;
esac
+NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
+NTPO_SAVED_LIBS="$LIBS"
+
#
-# check for linking with -lcrypto failure, and try -lz -lcrypto.
+# check for linking with -lcrypto failure, and try -lcrypto -lz.
# Helps m68k-atari-mint
#
-case "$ntp_openssl" in
- yes)
- NTPO_SAVED_LIBS="$LIBS"
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with $LCRYPTO alone works" >&5
-$as_echo_n "checking if linking with $LCRYPTO alone works... " >&6; }
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
+$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
if ${ntp_cv_bare_lcrypto+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14975,9 +25205,9 @@ fi
$as_echo "$ntp_cv_bare_lcrypto" >&6; }
case "$ntp_cv_bare_lcrypto" in
no)
- LIBS="$NTPO_SAVED_LIBS $LCRYPTO -lz"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with $LCRYPTO -lz works" >&5
-$as_echo_n "checking if linking with $LCRYPTO -lz works... " >&6; }
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
+$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
if ${ntp_cv_lcrypto_lz+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15013,11 +25243,9 @@ fi
$as_echo "$ntp_cv_lcrypto_lz" >&6; }
case "$ntp_cv_lcrypto_lz" in
yes)
- LCRYPTO="$LCRYPTO -lz"
+ LDADD_NTP="$LDADD_NTP -lz"
esac
esac
- LIBS="$NTPO_SAVED_LIBS"
- { NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
esac
#
@@ -15034,10 +25262,10 @@ esac
#
#
openssl_triggers_warnings=unknown
-SAVED_CFLAGS="$CFLAGS"
+NTPO_SAVED_CFLAGS="$CFLAGS"
-case "$GCC$ntp_openssl" in
- yesyes)
+case "$ntp_openssl:$GCC" in
+ yes:yes)
CFLAGS="$CFLAGS -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15101,73 +25329,27 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
case "$openssl_triggers_warnings" in
yes)
- CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
;;
*)
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
esac
;;
- yesno)
+ no:yes)
# gcc without OpenSSL
- CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
esac
+CFLAGS="$NTPO_SAVED_CFLAGS"
+CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
+LIBS="$NTPO_SAVED_LIBS"
+{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
+{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
+{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
+{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
+{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
-$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
-if ${ntp_cv_getsockname_socklen_type+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- getsockname_socklen_type_found=no
- for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
- for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
-
-int
-main ()
-{
-
- extern
- getsockname(int, $getsockname_arg2,
- $ntp_cv_getsockname_socklen_type *);
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- getsockname_socklen_type_found=yes ; break 2
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- done
- case "$getsockname_socklen_type_found" in
- no)
- ntp_cv_getsockname_socklen_type='socklen_t'
- esac
- { getsockname_arg2=; unset getsockname_arg2;}
- { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
-$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
-_ACEOF
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
@@ -15214,52 +25396,6 @@ case "$ntp_cv_sockaddr_storage" in
$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.ss_family" >&5
-$as_echo_n "checking for sockaddr_storage.ss_family... " >&6; }
-if ${ntp_cv_have_ss_family+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
-
-int
-main ()
-{
-
- struct sockaddr_storage s;
- s.ss_family = 1;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have_ss_family=yes
-else
- ntp_cv_have_ss_family=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have_ss_family" >&5
-$as_echo "$ntp_cv_have_ss_family" >&6; }
-
-case "$ntp_cv_have_ss_family" in
- no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
if ${ntp_cv_have___ss_family+:} false; then :
@@ -15307,105 +25443,10 @@ $as_echo "$ntp_cv_have___ss_family" >&6; }
$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
esac
-esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.ss_len" >&5
-$as_echo_n "checking for sockaddr_storage.ss_len... " >&6; }
-if ${ntp_cv_have_ss_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
-
-int
-main ()
-{
-
- struct sockaddr_storage s;
- s.ss_len = 1;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have_ss_len=yes
-else
- ntp_cv_have_ss_len=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have_ss_len" >&5
-$as_echo "$ntp_cv_have_ss_len" >&6; }
-
-case "$ntp_cv_have_ss_len" in
- no)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_len" >&5
-$as_echo_n "checking for sockaddr_storage.__ss_len... " >&6; }
-if ${ntp_cv_have___ss_len+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
-
-int
-main ()
-{
-
- struct sockaddr_storage s;
- s.__ss_len = 1;
-
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_have___ss_len=yes
-else
- ntp_cv_have___ss_len=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_len" >&5
-$as_echo "$ntp_cv_have___ss_len" >&6; }
- case "$ntp_cv_have___ss_len" in
- yes)
-
-$as_echo "#define HAVE___SS_LEN_IN_SS 1" >>confdefs.h
-
- esac
esac
-
#
# Look for in_port_t.
#
@@ -15450,30 +25491,32 @@ $as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
-$as_echo_n "checking for multicast IP support... " >&6; }
-if ${ntp_cv_multicast+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
+$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
+if ${ntp_cv_getsockname_socklen_type+:} false; then :
$as_echo_n "(cached) " >&6
else
- ntp_cv_multicast=no
- case "$host" in
- i386-sequent-sysv4)
- ;;
- *)
+ getsockname_socklen_type_found=no
+ for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
+ for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
#endif
int
main ()
{
- struct ip_mreq ipmr;
- ipmr.imr_interface.s_addr = 0;
+ extern
+ getsockname(int, $getsockname_arg2,
+ $ntp_cv_getsockname_socklen_type *);
;
@@ -15481,176 +25524,26 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- ntp_cv_multicast=yes
+ getsockname_socklen_type_found=yes ; break 2
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- esac
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
-$as_echo "$ntp_cv_multicast" >&6; }
-case "$ntp_cv_multicast" in
- yes)
-
-$as_echo "#define MCAST 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
-$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
-if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- case "$host" in
- *-*-netbsd*|*-*-*linux*)
- ntp_cv_typeof_ip_multicast_loop=u_int
- ;;
- *)
- ntp_cv_typeof_ip_multicast_loop=u_char
- esac
+ done
+ done
+ case "$getsockname_socklen_type_found" in
+ no)
+ ntp_cv_getsockname_socklen_type='socklen_t'
+ esac
+ { getsockname_arg2=; unset getsockname_arg2;}
+ { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
-$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
+$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
cat >>confdefs.h <<_ACEOF
-#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
-_ACEOF
-
-esac
-
-# HMS: We don't need res_init, but since we may be using cached
-# values from ntpd we need to test the same way
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
-$as_echo_n "checking for library containing res_init... " >&6; }
-if ${ac_cv_search_res_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_init ();
-int
-main ()
-{
-return res_init ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lsocket -lnsl $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_res_init=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_res_init+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_res_init+:} false; then :
-
-else
- ac_cv_search_res_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
-$as_echo "$ac_cv_search_res_init" >&6; }
-ac_res=$ac_cv_search_res_init
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
-$as_echo_n "checking for library containing inet_ntop... " >&6; }
-if ${ac_cv_search_inet_ntop+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_ntop ();
-int
-main ()
-{
-return inet_ntop ();
- ;
- return 0;
-}
+#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
_ACEOF
-for ac_lib in '' resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib -lsocket -lnsl $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_inet_ntop=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_inet_ntop+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_inet_ntop+:} false; then :
-
-else
- ac_cv_search_inet_ntop=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
-$as_echo "$ac_cv_search_inet_ntop" >&6; }
-ac_res=$ac_cv_search_inet_ntop
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
-if test "x$ac_cv_func_inet_ntop" = xyes; then :
-
-else
-
-$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
-
-fi
-
-ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes; then :
-
-else
-
-$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
-
-fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
@@ -15943,24 +25836,25 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
$as_echo_n "checking for in6addr_any... " >&6; }
-if ${isc_cv_have_in6addr_any+:} false; then :
+if ${isc_cv_in6addr_any_links+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_netinetin6_hack
+ $isc_netinet6in6_hack
int
main ()
{
- struct in6_addr in6;
- in6 = in6addr_any;
+ printf("%x", in6addr_any.s6_addr[15]);
;
@@ -15968,19 +25862,22 @@ main ()
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- isc_cv_have_in6addr_any=yes
+ isc_cv_in6addr_any_links=yes
else
- isc_cv_have_in6addr_any=no
+ isc_cv_in6addr_any_links=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+ LIBS="$SAVED_LIBS"
+ { SAVED_LIBS=; unset SAVED_LIBS;}
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6addr_any" >&5
-$as_echo "$isc_cv_have_in6addr_any" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
+$as_echo "$isc_cv_in6addr_any_links" >&6; }
-case "$isc_cv_have_in6addr_any" in
+case "$isc_cv_in6addr_any_links" in
no)
$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
@@ -16070,6 +25967,199 @@ $as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
+$as_echo_n "checking for multicast IP support... " >&6; }
+if ${ntp_cv_multicast+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ntp_cv_multicast=no
+ case "$host" in
+ i386-sequent-sysv4)
+ ;;
+ *)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+
+int
+main ()
+{
+
+ struct ip_mreq ipmr;
+ ipmr.imr_interface.s_addr = 0;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ntp_cv_multicast=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
+$as_echo "$ntp_cv_multicast" >&6; }
+case "$ntp_cv_multicast" in
+ yes)
+
+$as_echo "#define MCAST 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
+$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
+if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host" in
+ *-*-netbsd*|*-*-*linux*)
+ ntp_cv_typeof_ip_multicast_loop=u_int
+ ;;
+ *)
+ ntp_cv_typeof_ip_multicast_loop=u_char
+ ;;
+ esac
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
+$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
+_ACEOF
+
+esac
+
+# Check whether --enable-getifaddrs was given.
+if test "${enable_getifaddrs+set}" = set; then :
+ enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
+else
+ want_getifaddrs="yes"
+
+fi
+
+
+case $want_getifaddrs in
+ glibc)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
+$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
+esac
+case $want_getifaddrs in
+ no)
+ ;;
+ *)
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ for ac_func in getifaddrs
+do :
+ ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
+if test "x$ac_cv_func_getifaddrs" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETIFADDRS 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$SAVED_LIBS"
+ { SAVED_LIBS=; unset SAVED_LIBS;}
+ ;;
+esac
+
+#
+# Check for if_nametoindex() for IPv6 scoped addresses support
+#
+case "$host" in
+ *-hp-hpux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
+$as_echo_n "checking for library containing if_nametoindex... " >&6; }
+if ${ac_cv_search_if_nametoindex+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char if_nametoindex ();
+int
+main ()
+{
+return if_nametoindex ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ipv6; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_if_nametoindex=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_if_nametoindex+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_if_nametoindex+:} false; then :
+
+else
+ ac_cv_search_if_nametoindex=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
+$as_echo "$ac_cv_search_if_nametoindex" >&6; }
+ac_res=$ac_cv_search_if_nametoindex
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+esac
+SAVED_LIBS="$LIBS"
+LIBS="$LDADD_LIBNTP $LIBS"
+for ac_func in if_nametoindex
+do :
+ ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
+if test "x$ac_cv_func_if_nametoindex" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IF_NAMETOINDEX 1
+_ACEOF
+
+fi
+done
+
+LIBS="$SAVED_LIBS"
+{ SAVED_LIBS=; unset SAVED_LIBS;}
+case "$ac_cv_func_if_nametoindex" in
+ yes)
+
+$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
+
+esac
+
+
###
@@ -16083,55 +26173,3718 @@ $as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
# Checks for library functions.
-for ac_func in socket vsnprintf vsprintf
+for ac_func in socket
do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
+if test "x$ac_cv_func_socket" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SOCKET 1
_ACEOF
fi
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bin subdirectory" >&5
-$as_echo_n "checking for bin subdirectory... " >&6; }
+# HMS: if we don't find c++ we should not look for gtest.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+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
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if ${ac_cv_prog_CXXCPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
-# Check whether --with-binsubdir was given.
-if test "${with_binsubdir+set}" = set; then :
- withval=$with_binsubdir; use_binsubdir="$withval"
else
- use_binsubdir="bin"
+ _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
fi
-case "$use_binsubdir" in
- bin)
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
;;
- sbin)
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
;;
- *)
- as_fn_error $? "<$use_binsubdir> is illegal - must be \"bin\" or \"sbin\"" "$LINENO" 5
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath__CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath__CXX"; then
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ fi
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX=' '
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=yes
+ file_list_spec_CXX='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+ enable_shared_with_static_runtimes_CXX=yes
+ # Don't use ranlib
+ old_postinstall_cmds_CXX='chmod 644 $oldlib'
+ postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ whole_archive_flag_spec_CXX=''
+ fi
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs_CXX=yes
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+ '"$old_archive_cmds_CXX"
+ reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+ '"$reload_cmds_CXX"
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*) ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ ;;
+ esac
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc_CXX=no
+ else
+ lt_cv_archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+ archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_binsubdir" >&5
-$as_echo "$use_binsubdir" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-BINSUBDIR=$use_binsubdir
- if test "bin" = "$BINSUBDIR"; then
- NTP_BINSUBDIR_IS_BIN_TRUE=
- NTP_BINSUBDIR_IS_BIN_FALSE='#'
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
else
- NTP_BINSUBDIR_IS_BIN_TRUE='#'
- NTP_BINSUBDIR_IS_BIN_FALSE=
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+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
+
+
+
+gta=false
+
+# Check whether --with-gtest was given.
+if test "${with_gtest+set}" = set; then :
+ withval=$with_gtest; try_gtest=$withval
+else
+ try_gtest=yes
+
+fi
+
+case "$try_gtest" in
+ yes)
+ # Extract the first word of "gtest-config", so it can be a program name with args.
+set dummy gtest-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GTEST_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GTEST_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GTEST_CONFIG="$GTEST_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GTEST_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GTEST_CONFIG=$ac_cv_path_GTEST_CONFIG
+if test -n "$GTEST_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTEST_CONFIG" >&5
+$as_echo "$GTEST_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ { ac_cv_path_GTEST_CONFIG=; unset ac_cv_path_GTEST_CONFIG;}
+ case x${GTEST_CONFIG} in
+ x) ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtest version" >&5
+$as_echo_n "checking gtest version... " >&6; }
+ gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
+ case "$gtest_version_test" in
+ toolow*)
+ ;;
+ *)
+ GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
+ GTEST_LIBS=`$GTEST_CONFIG --libs`
+ GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
+ GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
+
+
+
+
+ gta=true
+ ;;
+ esac
+ gtest_version=`$GTEST_CONFIG --version`
+ case "$gta" in
+ true)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) ok" >&5
+$as_echo "($gtest_version) ok" >&6; }
+ ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($gtest_version) not ok" >&5
+$as_echo "($gtest_version) not ok" >&6; }
+ ;;
+ esac
+ { gtest_version_test=; unset gtest_version_test;}
+ { gtest_version=; unset gtest_version;}
+ esac
+esac
+ if $gta; then
+ GTEST_AVAILABLE_TRUE=
+ GTEST_AVAILABLE_FALSE='#'
+else
+ GTEST_AVAILABLE_TRUE='#'
+ GTEST_AVAILABLE_FALSE=
+fi
+
+
+
+
+# All libraries should be in various LIB_* variables now.
+#LIBS=
+# Sadly not. There is a gettext() check somewhere, and on Solaris this pulls
+# in -lintl -lgen, outside our "scope".
ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files include/Makefile"
+
+ac_config_files="$ac_config_files scripts/Makefile"
+
+ac_config_files="$ac_config_files tests/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
@@ -16257,6 +30010,35 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
+ as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
+ as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
+ as_fn_error $? "conditional \"PTHREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16265,8 +30047,20 @@ if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${NTP_BINSUBDIR_IS_BIN_TRUE}" && test -z "${NTP_BINSUBDIR_IS_BIN_FALSE}"; then
- as_fn_error $? "conditional \"NTP_BINSUBDIR_IS_BIN\" was never defined.
+if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTEST_AVAILABLE_TRUE}" && test -z "${GTEST_AVAILABLE_FALSE}"; then
+ as_fn_error $? "conditional \"GTEST_AVAILABLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@@ -16678,7 +30472,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sntp $as_me 4.2.6p5, which was
+This file was extended by sntp $as_me 4.2.8, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16738,13 +30532,14 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to the package provider."
+Report bugs to <http://bugs.ntp.org./>.
+sntp home page: <http://www.ntp.org./>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-sntp config.status 4.2.6p5
+sntp config.status 4.2.8
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -16873,26 +30668,26 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
sed_quote_subst='$sed_quote_subst'
double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
-ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
-SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
-Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
-GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
-EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
-FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
-LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
@@ -17003,6 +30798,61 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub
enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
LTCC='$LTCC'
LTCFLAGS='$LTCFLAGS'
@@ -17017,12 +30867,12 @@ _LTECHO_EOF'
}
# Quote evaled strings.
-for var in SHELL \
-ECHO \
-SED \
+for var in SED \
GREP \
EGREP \
FGREP \
+SHELL \
+ECHO \
LD \
NM \
LN_S \
@@ -17081,7 +30931,39 @@ soname_spec \
install_override_mode \
finish_eval \
old_striplib \
-striplib; do
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
@@ -17111,7 +30993,18 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
+sys_lib_dlsearch_path_spec \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
@@ -17142,6 +31035,8 @@ fi
+
+
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -17152,9 +31047,12 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -17895,10 +31793,31 @@ $as_echo X"$file" |
# The names of the tagged configurations supported by this script.
-available_tags=""
+available_tags="CXX "
# ### BEGIN LIBTOOL CONFIG
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
@@ -17915,12 +31834,6 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that protects backslashes.
-ECHO=$lt_ECHO
-
# The host system.
host_alias=$host_alias
host=$host
@@ -17931,21 +31844,6 @@ build_alias=$build_alias
build=$build
build_os=$build_os
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
# A BSD- or MS-compatible name lister.
NM=$lt_NM
@@ -18283,6 +32181,20 @@ file_list_spec=$lt_file_list_spec
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
# ### END LIBTOOL CONFIG
_LT_EOF
@@ -18475,6 +32387,163 @@ fi
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
;;
esac
@@ -18509,6 +32578,151 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || as_fn_exit 1
fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ 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=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $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
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_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 name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
diff --git a/sntp/configure.ac b/sntp/configure.ac
index 63db09dff89a..e10346849697 100644
--- a/sntp/configure.ac
+++ b/sntp/configure.ac
@@ -1,14 +1,20 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-m4_include([../version.m4])
+dnl SNTP subpackage configure.ac -*- Autoconf -*-
+dnl
+m4_include([m4/version.m4])
AC_PREREQ([2.61])
-AC_INIT([sntp], [VERSION_NUMBER])
-AC_CONFIG_MACRO_DIR([../m4])
-AC_CONFIG_AUX_DIR([.])
-
-# Increment sntp_configure_cache_version by one for each change to
-# configure.ac or .m4 files which invalidates cached values from
-# previous versions.
+AC_INIT(
+ [sntp],
+ [VERSION_NUMBER],
+ [http://bugs.ntp.org./],
+ [],
+ [http://www.ntp.org./]dnl
+)
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([libevent/build-aux])
+
+# Bump sntp_configure_cache_version for each change to configure.ac or
+# .m4 files which invalidates cached values from previous configure
+# runs.
#
# If the change affects cache variables used only by the main NTP
# configure.ac, then only its version number should be bumped, while
@@ -18,22 +24,27 @@ AC_CONFIG_AUX_DIR([.])
# bumping.
#
# If a change affects variables shared by all NTP configure scripts,
-# please bump the version numbers of all three. If you are not sure,
-# the safe choice is to bump all three on any cache-invalidating change.
+# please bump the version numbers of each. If you are not sure, the
+# safe choice is to bump all on any cache-invalidating change.
#
# In order to avoid the risk of version stamp collision between -stable
# and -dev branches, do not simply increment the version, instead use
# the date YYYYMMDD optionally with -HHMM if there is more than one
# bump in a day.
-sntp_configure_cache_version=20091117
+sntp_configure_cache_version=20120806
# When the version of config.cache and configure do not
# match, NTP_CACHEVERSION will flush the cache.
NTP_CACHEVERSION([sntp], [$sntp_configure_cache_version])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([1.10 foreign -Wall -Wno-gnu])
+dnl AM_SILENT_RULES req. automake 1.11. [yes] defaults V=0
+m4_ifdef(
+ [AM_SILENT_RULES],
+ [AM_SILENT_RULES([yes])]
+)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
dnl the 'build' machine is where we run configure and compile
@@ -42,89 +53,33 @@ AC_DEFINE_UNQUOTED([STR_SYSTEM], "$host", [canonical system (cpu-vendor-os) of w
AC_CONFIG_HEADER([config.h])
dnl AC_ARG_PROGRAM
-# Checks for programs.
-AM_PROG_CC_C_O
-AC_PROG_CPP
+NTP_PROG_CC
-# AC_PROG_CC_STDC has two functions. It attempts to find a compiler
-# capable of C99, or failing that, for C89. CC is set afterward with
-# the selected invocation, such as "gcc --std=gnu99". Also, the
-# ac_cv_prog_cc_stdc variable is no if the compiler selected for CC
-# does not accept C89.
+NTP_LOCINFO()
-AC_PROG_CC_STDC
+dnl AM_PROG_AR req. automake 1.12
+m4_ifdef(
+ [AM_PROG_AR],
+ [AM_PROG_AR]
+)
-case "$ac_cv_prog_cc_stdc" in
- no)
- AC_MSG_WARN([ANSI C89/ISO C90 is the minimum to compile SNTP ]
- [version 4.2.5 and higher.])
-esac
+NTP_LIBNTP
-AC_CACHE_CHECK(
- [if $CC can handle @%:@warning],
- [ntp_cv_cpp_warning],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[#warning foo]])],
- [ntp_cv_cpp_warning=yes],
- [ntp_cv_cpp_warning=no]
- )]
-)
-case "$ntp_cv_cpp_warning" in
- no)
- AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1],
- [Should we avoid @%:@warning on option name collisions?])
-esac
+AC_DISABLE_SHARED
+AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL_DEPS])
-case "$GCC" in
- yes)
- SAVED_CFLAGS_NTP="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- AC_CACHE_CHECK(
- [if $CC can handle -Wstrict-overflow],
- [ntp_cv_gcc_Wstrict_overflow],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [ntp_cv_gcc_Wstrict_overflow=yes],
- [ntp_cv_gcc_Wstrict_overflow=no]
- ) ]
- )
- #
- # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
- # flag to CFLAGS.
- #
- CFLAGS="$SAVED_CFLAGS_NTP -Winit-self"
- AC_CACHE_CHECK(
- [if $CC can handle -Winit-self],
- [ntp_cv_gcc_Winit_self],
- [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [ntp_cv_gcc_Winit_self=yes],
- [ntp_cv_gcc_Winit_self=no]
- )
- ]
- )
- CFLAGS="$SAVED_CFLAGS_NTP"
- AS_UNSET([SAVED_CFLAGS_NTP])
- #
- # $ntp_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS.
- #
-esac
+NTP_WITHSNTP
-# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
-case "$host" in
- *-*-solaris*)
- # see "man standards".
- # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
- # -D_XOPEN_SOURCE=600 seems OK for c99
- #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- libxnet=-lxnet
+case "$SNTP" in
+ '')
+ SNTP_DB=
+ SNTP_DL=
+ SNTP_DS=
;;
esac
-AC_DISABLE_SHARED
+###
# NTP has (so far) been relying on leading-edge autogen.
# Therefore, by default:
@@ -139,728 +94,35 @@ case "${enable_libopts_install+set}" in
set) ;;
*) enable_libopts_install=no ;;
esac
+enable_nls=no
LIBOPTS_CHECK
-AC_PROG_LIBTOOL
-NTP_DIR_SEP
+AM_COND_IF(
+ [BUILD_SNTP],
+ [NTP_LIBEVENT_CHECK],
+ [NTP_LIBEVENT_CHECK_NOBUILD]
+)
# Checks for libraries.
-NTP_LIB_M
-
-case "$GCC" in
- yes)
- CFLAGS="$CFLAGS -Wall"
- # CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wcast-qual"
- # CFLAGS="$CFLAGS -Wconversion"
- # CFLAGS="$CFLAGS -Werror"
- # CFLAGS="$CFLAGS -Wextra"
- # CFLAGS="$CFLAGS -Wfloat-equal"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
- case "$ntp_cv_gcc_Winit_self" in
- yes)
- CFLAGS="$CFLAGS -Winit-self"
- esac
- case "$ntp_cv_gcc_Wstrict_overflow" in
- yes)
- CFLAGS="$CFLAGS -Wstrict-overflow"
- esac
- # -W[no-]strict-prototypes is added later depending on OpenSSL
-esac
-AC_CHECK_FUNC([gethostent], ,
- [AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket])])
-AC_CHECK_FUNC([openlog], ,
- [AC_SEARCH_LIBS([openlog], [gen], ,
- [AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])])])
+dnl NTP_LIBNTP checks for inet_XtoY
+dnl AC_SEARCH_LIBS([inet_pton], [nsl])
-AC_SEARCH_LIBS([setsockopt], [socket xnet])
+dnl AC_SEARCH_LIBS([openlog], [gen syslog])
+LIB_SYSLOG=''
+AC_SUBST([LIB_SYSLOG])
+HMS_SEARCH_LIBS([LIB_SYSLOG], [openlog], [gen syslog])
# Checks for header files.
-AC_HEADER_STDC
-
-dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4
-dnl due to an incomplete type (a union) mpinfou used in an array. gcc3
-dnl compiles it without complaint. The mpinfou union is defined later
-dnl in the resulting preprocessed source than the spu_info array in
-dnl /usr/include/machine/sys/getppdp.h:
-dnl extern union mpinfou spu_info[];
-dnl triggering the error. Our strategy is on HP-UX only, test for
-dnl net/netmp.h, which is the file included by net/if.h that leads to
-dnl getppdp.h. If it is present but can't be compiled, try adding
-dnl a duplicate definition of mpinfou, which should then allow the
-dnl following net/if.h and net/if6.h tests to proceed normally.
-dnl Using net/netmp.h allows us to avoid polluting test results for
-dnl net/if.h.
-#
-case "$host" in
- *-hp-hpux*)
- AC_CHECK_HEADERS(
- [net/netmp.h],
- [netmp_h_works=yes],
- [netmp_h_works=no]
- )
- case "$netmp_h_works" in
- no)
- cat >>confdefs.h <<_ACEOF
-#ifndef MPINFOU_PREDECLARED
-# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
- struct pdk_mpinfo *pdkptr;
- struct mpinfo *pikptr;
-} mpinfou_t;
-#endif
-_ACEOF
- AH_BOTTOM([
-#ifndef MPINFOU_PREDECLARED
-# define MPINFOU_PREDECLARED
-typedef union mpinfou { /* For lint */
- struct pdk_mpinfo *pdkptr;
- struct mpinfo *pikptr;
-} mpinfou_t;
-#endif
-])
- ;;
- esac
- ;;
-esac
-
-AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h strings.h syslog.h])
-AC_CHECK_HEADERS([sys/socket.h sys/time.h])
-AC_HEADER_TIME
+AC_CHECK_HEADERS([netdb.h string.h strings.h syslog.h])
+NTP_SYSEXITS_H
+NTP_FACILITYNAMES
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF([time_t])
-
-AC_C_INLINE
-
-case "$ac_cv_c_inline" in
- '')
- ;;
- *)
- AC_DEFINE(HAVE_INLINE,1,[inline keyword or macro available])
- AC_SUBST(HAVE_INLINE)
-esac
-
-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
NTP_OPENSSL
-
-AC_CACHE_CHECK(
- [type of socklen arg for getsockname()],
- [ntp_cv_getsockname_socklen_type],
- [
- getsockname_socklen_type_found=no
- for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
- for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- ]], [[
- extern
- getsockname(int, $getsockname_arg2,
- $ntp_cv_getsockname_socklen_type *);
- ]]
- )],
- [getsockname_socklen_type_found=yes ; break 2],
- []
- )
- done
- done
- case "$getsockname_socklen_type_found" in
- no)
- ntp_cv_getsockname_socklen_type='socklen_t'
- esac
- AS_UNSET([getsockname_arg2])
- AS_UNSET([getsockname_socklen_type_found])
- ]
-)
-AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
- $ntp_cv_getsockname_socklen_type,
- [What is getsockname()'s socklen type?])
-
-AC_CACHE_CHECK(
- [for struct sockaddr_storage],
- [ntp_cv_sockaddr_storage],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage n;
- ]]
- )],
- [ntp_cv_sockaddr_storage=yes],
- [ntp_cv_sockaddr_storage=no]
- )]
-)
-case "$ntp_cv_sockaddr_storage" in
- yes)
- AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], [1],
- [Does a system header define struct sockaddr_storage?])
-esac
-
-AC_CACHE_CHECK(
- [for sockaddr_storage.ss_family],
- [ntp_cv_have_ss_family],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.ss_family = 1;
- ]]
- )],
- [ntp_cv_have_ss_family=yes],
- [ntp_cv_have_ss_family=no]
- )]
-)
-
-case "$ntp_cv_have_ss_family" in
- no)
- AC_CACHE_CHECK(
- [for sockaddr_storage.__ss_family],
- [ntp_cv_have___ss_family],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.__ss_family = 1;
- ]]
- )],
- [ntp_cv_have___ss_family=yes],
- [ntp_cv_have___ss_family=no]
- )]
- )
- case "$ntp_cv_have___ss_family" in
- yes)
- AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
- [Does struct sockaddr_storage have __ss_family?])
- esac
-esac
-
-AH_VERBATIM(
- [HAVE___SS_FAMILY_IN_SS_VERBATIM],
- [
- /* Handle sockaddr_storage.__ss_family */
- #ifdef HAVE___SS_FAMILY_IN_SS
- # define ss_family __ss_family
- #endif /* HAVE___SS_FAMILY_IN_SS */
- ]
-)
-
-AC_CACHE_CHECK(
- [for sockaddr_storage.ss_len],
- [ntp_cv_have_ss_len],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.ss_len = 1;
- ]]
- )],
- [ntp_cv_have_ss_len=yes],
- [ntp_cv_have_ss_len=no]
- )]
-)
-
-case "$ntp_cv_have_ss_len" in
- no)
- AC_CACHE_CHECK(
- [for sockaddr_storage.__ss_len],
- [ntp_cv_have___ss_len],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- # include <sys/socket.h>
- #endif
- #ifdef HAVE_NETINET_IN_H
- # include <netinet/in.h>
- #endif
- ]],
- [[
- struct sockaddr_storage s;
- s.__ss_len = 1;
- ]]
- )],
- [ntp_cv_have___ss_len=yes],
- [ntp_cv_have___ss_len=no]
- )]
- )
- case "$ntp_cv_have___ss_len" in
- yes)
- AC_DEFINE([HAVE___SS_LEN_IN_SS], [1],
- [Does struct sockaddr_storage have __ss_len?])
- esac
-esac
-
-AH_VERBATIM(
- [HAVE___SS_LEN_IN_SS_VERBATIM],
- [
- /* Handle sockaddr_storage.__ss_len */
- #ifdef HAVE___SS_LEN_IN_SS
- # define ss_len __ss_len
- #endif /* HAVE___SS_LEN_IN_SS */
- ]
-)
-
-#
-# Look for in_port_t.
-#
-AC_CACHE_CHECK(
- [for in_port_t],
- [isc_cv_have_in_port_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <netinet/in.h>
- ]],
- [[
- in_port_t port = 25;
- return (0);
- ]]
- )],
- [isc_cv_have_in_port_t=yes],
- [isc_cv_have_in_port_t=no]
- )]
-)
-case "$isc_cv_have_in_port_t" in
- no)
- AC_DEFINE([ISC_PLATFORM_NEEDPORTT], [1],
- [Declare in_port_t?])
-esac
-
-AC_CACHE_CHECK(
- [for multicast IP support],
- [ntp_cv_multicast],
- [
- ntp_cv_multicast=no
- case "$host" in
- i386-sequent-sysv4)
- ;;
- *)
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- ]],
- [[
- struct ip_mreq ipmr;
- ipmr.imr_interface.s_addr = 0;
- ]]
- )],
- [ntp_cv_multicast=yes],
- []
- )
- esac
- ]
-)
-case "$ntp_cv_multicast" in
- yes)
- AC_DEFINE([MCAST], [1], [Does the target support multicast IP?])
- AC_CACHE_CHECK(
- [arg type needed for setsockopt() IP*_MULTICAST_LOOP],
- [ntp_cv_typeof_ip_multicast_loop],
- [
- case "$host" in
- *-*-netbsd*|*-*-*linux*)
- ntp_cv_typeof_ip_multicast_loop=u_int
- ;;
- *)
- ntp_cv_typeof_ip_multicast_loop=u_char
- esac
- ]
- )
- AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
- $ntp_cv_typeof_ip_multicast_loop,
- [What type to use for setsockopt])
-esac
-
-# HMS: We don't need res_init, but since we may be using cached
-# values from ntpd we need to test the same way
-AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
-AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lsocket -lnsl])
-AC_CHECK_FUNC([inet_ntop], [],
- [AC_DEFINE([ISC_PLATFORM_NEEDNTOP], [1], [ISC: provide inet_ntop()])])
-AC_CHECK_FUNC([inet_pton], [],
- [AC_DEFINE([ISC_PLATFORM_NEEDPTON], [1], [ISC: provide inet_pton()])])
-
-AC_CACHE_CHECK(
- [struct sockaddr for sa_len],
- [isc_cv_platform_havesalen],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- ]],
- [[
- extern struct sockaddr *ps;
- return ps->sa_len;
- ]]
- )],
- [isc_cv_platform_havesalen=yes],
- [isc_cv_platform_havesalen=no]
- )]
-)
-case "$isc_cv_platform_havesalen" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVESALEN], [1],
- [struct sockaddr has sa_len?])
-esac
-
-AC_ARG_ENABLE(
- [ipv6],
- [AS_HELP_STRING(
- [--enable-ipv6],
- [s use IPv6?]
- )]
-)
-
-case "$enable_ipv6" in
- yes|''|autodetect)
- case "$host" in
- powerpc-ibm-aix4*)
- ;;
- *)
- AC_DEFINE([WANT_IPV6], [1], [configure --enable-ipv6])
- ;;
- esac
- ;;
- no)
- ;;
-esac
-
-
-dnl [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion)
-case "$host" in
- *-*-darwin*)
- AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Are we _special_?])
-esac
-
-
-AC_CACHE_CHECK(
- [for IPv6 structures],
- [isc_cv_found_ipv6],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- ]],
- [[
- struct sockaddr_in6 sin6;
- ]]
- )],
- [isc_cv_found_ipv6=yes],
- [isc_cv_found_ipv6=no]
- )]
-)
-
-#
-# See whether IPv6 support is provided via a Kame add-on.
-# This is done before other IPv6 linking tests so LIBS is properly set.
-#
-AC_MSG_CHECKING([for Kame IPv6 support])
-AC_ARG_WITH(
- [kame],
- [AS_HELP_STRING(
- [--with-kame],
- [- =/usr/local/v6]
- )],
- [use_kame="$withval"],
- [use_kame="no"]
-)
-case "$use_kame" in
- no)
- ;;
- yes)
- kame_path=/usr/local/v6
- ;;
- *)
- kame_path="$use_kame"
- ;;
-esac
-case "$use_kame" in
- no)
- AC_MSG_RESULT([no])
- ;;
- *)
- if test -f $kame_path/lib/libinet6.a; then
- AC_MSG_RESULT([$kame_path/lib/libinet6.a])
- LIBS="-L$kame_path/lib -linet6 $LIBS"
- else
- AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
-
-Please choose the proper path with the following command:
-
- configure --with-kame=PATH
-])
- fi
- ;;
-esac
-
-#
-# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
-# Including it on Kame-using platforms is very bad, though, because
-# Kame uses #error against direct inclusion. So include it on only
-# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
-# This is done before the in6_pktinfo check because that's what
-# netinet6/in6.h is needed for.
-#
-case "$host" in
- *-bsdi4.[[01]]*)
- AC_DEFINE([ISC_PLATFORM_NEEDNETINET6IN6H], [1],
- [Do we need netinet6/in6.h?])
- isc_netinet6in6_hack="#include <netinet6/in6.h>"
- ;;
- *)
- isc_netinet6in6_hack=""
- ;;
-esac
-
-#
-# This is similar to the netinet6/in6.h issue.
-#
-case "$host" in
- *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
- AC_DEFINE([ISC_PLATFORM_FIXIN6ISADDR], [1],
- [Do we need to fix in6isaddr?])
- isc_netinetin6_hack="#include <netinet/in6.h>"
- ;;
- *)
- isc_netinetin6_hack=""
- ;;
-esac
-
-
-case "$isc_cv_found_ipv6" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIPV6], [1], [have IPv6?])
- AC_CACHE_CHECK(
- [for in6_pktinfo],
- [isc_cv_have_in6_pktinfo],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct in6_pktinfo xyzzy;
- ]]
- )],
- [isc_cv_have_in6_pktinfo=yes],
- [isc_cv_have_in6_pktinfo=no]
- )]
- )
- case "$isc_cv_have_in6_pktinfo" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIN6PKTINFO], [1],
- [have struct in6_pktinfo?])
- esac
-
-
- # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
- AC_CACHE_CHECK(
- [for sockaddr_in6.sin6_scope_id],
- [isc_cv_have_sin6_scope_id],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct sockaddr_in6 xyzzy;
- xyzzy.sin6_scope_id = 0;
- ]]
- )],
- [isc_cv_have_sin6_scope_id=yes],
- [isc_cv_have_sin6_scope_id=no]
- )]
- )
-
- case "$isc_cv_have_sin6_scope_id" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVESCOPEID], [1], [sin6_scope_id?])
- esac
-esac
-
-
-# We need this check run even without isc_cv_found_ipv6=yes
-
-AC_CACHE_CHECK(
- [for in6addr_any],
- [isc_cv_have_in6addr_any],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- $isc_netinetin6_hack
- $isc_netinet6in6_hack
- ]],
- [[
- struct in6_addr in6;
- in6 = in6addr_any;
- ]]
- )],
- [isc_cv_have_in6addr_any=yes],
- [isc_cv_have_in6addr_any=no]
- )]
-)
-
-case "$isc_cv_have_in6addr_any" in
- no)
- AC_DEFINE([ISC_PLATFORM_NEEDIN6ADDRANY], [1], [missing in6addr_any?])
-esac
-
-
-AC_CACHE_CHECK(
- [for struct if_laddrconf],
- [isc_cv_struct_if_laddrconf],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <net/if6.h>
- ]],
- [[
- struct if_laddrconf a;
- ]]
- )],
- [isc_cv_struct_if_laddrconf=yes],
- [isc_cv_struct_if_laddrconf=no]
- )]
-)
-
-case "$isc_cv_struct_if_laddrconf" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRCONF], [1],
- [have struct if_laddrconf?])
-esac
-
-AC_CACHE_CHECK(
- [for struct if_laddrreq],
- isc_cv_struct_if_laddrreq,
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <net/if6.h>
- ]],
- [[
- struct if_laddrreq a;
- ]]
- )],
- [isc_cv_struct_if_laddrreq=yes],
- [isc_cv_struct_if_laddrreq=no]
- )]
-)
-
-case "$isc_cv_struct_if_laddrreq" in
- yes)
- AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
- [have struct if_laddrreq?])
-esac
-
+NTP_IPV6
###
@@ -870,32 +132,20 @@ AC_DEFINE([HAVE_NO_NICE], 1, [sntp does not care about 'nice'])
AC_DEFINE([HAVE_TERMIOS], 1, [sntp does not care about TTY stuff])
# Checks for library functions.
-AC_CHECK_FUNCS([socket vsnprintf vsprintf])
+AC_CHECK_FUNCS([socket])
-AC_MSG_CHECKING([for bin subdirectory])
-AC_ARG_WITH(
- [binsubdir],
- [AS_HELP_STRING(
- [--with-binsubdir],
- [bin ={bin,sbin}]
- )],
- [use_binsubdir="$withval"],
- [use_binsubdir="bin"]
-)
-case "$use_binsubdir" in
- bin)
- ;;
- sbin)
- ;;
- *)
- AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
- ;;
-esac
-AC_MSG_RESULT([$use_binsubdir])
+# HMS: if we don't find c++ we should not look for gtest.
+AC_PROG_CXX
+NTP_GOOGLETEST
-BINSUBDIR=$use_binsubdir
-AC_SUBST([BINSUBDIR])
-AM_CONDITIONAL([NTP_BINSUBDIR_IS_BIN], [test "bin" = "$BINSUBDIR"])
+# All libraries should be in various LIB_* variables now.
+#LIBS=
+# Sadly not. There is a gettext() check somewhere, and on Solaris this pulls
+# in -lintl -lgen, outside our "scope".
AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([include/Makefile])
+AC_CONFIG_FILES([scripts/Makefile])
+AC_CONFIG_FILES([tests/Makefile])
+
AC_OUTPUT
diff --git a/sntp/crypto.c b/sntp/crypto.c
index 7a4623291969..aa8d91dd222a 100644
--- a/sntp/crypto.c
+++ b/sntp/crypto.c
@@ -99,12 +99,12 @@ auth_init(
char keystring[129];
if (keyf == NULL) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp auth_init: Couldn't open key file %s for reading!\n", keyfile);
return -1;
}
if (feof(keyf)) {
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("sntp auth_init: Key file %s is empty!\n", keyfile);
fclose(keyf);
return -1;
@@ -112,7 +112,7 @@ auth_init(
key_cnt = 0;
while (!feof(keyf)) {
char * octothorpe;
- struct key *act = emalloc(sizeof(struct key));
+ struct key *act;
int goodline = 0;
if (NULL == fgets(kbuf, sizeof(kbuf), keyf))
@@ -122,6 +122,7 @@ auth_init(
octothorpe = strchr(kbuf, '#');
if (octothorpe)
*octothorpe = '\0';
+ act = emalloc(sizeof(*act));
scan_cnt = sscanf(kbuf, "%d %9s %128s", &act->key_id, act->type, keystring);
if (scan_cnt == 3) {
int len = strlen(keystring);
diff --git a/sntp/crypto.h b/sntp/crypto.h
index 5f184b06b275..39e0e6b66c25 100644
--- a/sntp/crypto.h
+++ b/sntp/crypto.h
@@ -8,11 +8,7 @@
#include <ntp_fp.h>
#include <ntp.h>
#include <ntp_stdlib.h>
-#ifdef OPENSSL
-# include "openssl/evp.h"
-#else
-# include <ntp_md5.h> /* provides clone of OpenSSL MD5 API */
-#endif
+#include <ntp_md5.h> /* provides OpenSSL digest API */
#include "utilities.h"
#include "sntp-opts.h"
diff --git a/sntp/deps-ver b/sntp/deps-ver
index dd28e403adb6..596602f0205b 100644
--- a/sntp/deps-ver
+++ b/sntp/deps-ver
@@ -1 +1 @@
-Fri Nov 13 17:21:31 UTC 2009
+Mon Jan 31 21:14:29 UTC 2011
diff --git a/sntp/depsver.mf b/sntp/depsver.mf
index 3e4a6185a13c..695f7303ce31 100644
--- a/sntp/depsver.mf
+++ b/sntp/depsver.mf
@@ -4,7 +4,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -13,17 +13,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -32,7 +25,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
BUILT_SOURCES += .deps-ver
diff --git a/sntp/header.h b/sntp/header.h
deleted file mode 100644
index 21805f195006..000000000000
--- a/sntp/header.h
+++ /dev/null
@@ -1,88 +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 MAX_SOCKETS 10 /* Maximum number of addresses */
-
-#ifndef LOCKNAME
-# define LOCKNAME "/etc/sntp.pid" /* Stores the pid */
-#endif
-#ifndef SAVENAME
-# define SAVENAME "/etc/sntp.state" /* Stores the recovery state */
-#endif
-
-//#define DEBUG
-
-
-
-/* Defined in main.c */
-
-#define op_client 1 /* Behave as a challenge client */
-#define op_listen 2 /* Behave as a listening client */
-
-/* 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/sntp/include/Makefile.am b/sntp/include/Makefile.am
new file mode 100644
index 000000000000..12227889adf9
--- /dev/null
+++ b/sntp/include/Makefile.am
@@ -0,0 +1,19 @@
+NULL =
+
+EXTRA_DIST = \
+ autogen-version.def \
+ copyright.def \
+ debug-opt.def \
+ homerc.def \
+ ntp.lic \
+ version.def \
+ version.texi \
+ $(NULL)
+
+noinst_HEADERS =
+
+$(srcdir)/version.def: $(srcdir)/../../packageinfo.sh
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) $(abs_top_srcdir)/include/version.def
+
+$(srcdir)/version.texi: $(srcdir)/../../packageinfo.sh
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) $(abs_top_srcdir)/include/version.texi
diff --git a/sntp/include/Makefile.in b/sntp/include/Makefile.in
new file mode 100644
index 000000000000..dd0a84be5e80
--- /dev/null
+++ b/sntp/include/Makefile.in
@@ -0,0 +1,512 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = include
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+ $(top_srcdir)/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/libevent/m4/openldap.m4 \
+ $(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/m4/ntp_compiler.m4 \
+ $(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/m4/ntp_googletest.m4 \
+ $(top_srcdir)/m4/ntp_ipv6.m4 $(top_srcdir)/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/m4/ntp_libevent.m4 \
+ $(top_srcdir)/m4/ntp_libntp.m4 \
+ $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/m4/ntp_openssl.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
+ $(top_srcdir)/m4/ntp_sysexits.m4 \
+ $(top_srcdir)/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+HEADERS = $(noinst_HEADERS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_SYSLOG = @LIB_SYSLOG@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_FORCE_LIBEVENT_DIST = @NTP_FORCE_LIBEVENT_DIST@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+EXTRA_DIST = \
+ autogen-version.def \
+ copyright.def \
+ debug-opt.def \
+ homerc.def \
+ ntp.lic \
+ version.def \
+ version.texi \
+ $(NULL)
+
+noinst_HEADERS =
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+$(srcdir)/version.def: $(srcdir)/../../packageinfo.sh
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) $(abs_top_srcdir)/include/version.def
+
+$(srcdir)/version.texi: $(srcdir)/../../packageinfo.sh
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) $(abs_top_srcdir)/include/version.texi
+
+# 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/sntp/include/autogen-version.def b/sntp/include/autogen-version.def
new file mode 100644
index 000000000000..bbe3f033d469
--- /dev/null
+++ b/sntp/include/autogen-version.def
@@ -0,0 +1,4 @@
+#assert (version-compare >= autogen-version "5.18.4")
+// >= is usually what we want.
+// > is when we need a pre* version
+guard-option-names;
diff --git a/sntp/include/copyright.def b/sntp/include/copyright.def
new file mode 100644
index 000000000000..317ff6d85987
--- /dev/null
+++ b/sntp/include/copyright.def
@@ -0,0 +1,30 @@
+/* -*- Mode: Text -*- */
+
+copyright = {
+ date = "1970-2014";
+ owner = "The University of Delaware";
+ eaddr = "http://bugs.ntp.org, bugs@ntp.org";
+ type = ntp;
+};
+
+long-opts;
+config-header = config.h;
+environrc;
+no-misuse-usage;
+version-proc = ntpOptionPrintVersion;
+
+version = `
+eval VERSION=\`sed -e 's/.*,\\[//' -e 's/\\].*//' < ../sntp/m4/version.m4\`
+[ -z "${VERSION}" ] && echo "Cannot determine VERSION" && kill -TERM $AG_pid
+echo $VERSION`;
+
+version-value = ''; /* Don't use -v as a shortcut for --version */
+
+/*
+ * HMS: man pages already have this, and texi pages can use the
+ * values in sntp/include/version.texi .
+ */
+// doc-sub = {
+// sub-name = version;
+// sub-text = 's/#VERSION#/<<version>>/g';
+// };
diff --git a/sntp/include/debug-opt.def b/sntp/include/debug-opt.def
new file mode 100644
index 000000000000..516163d6ec0c
--- /dev/null
+++ b/sntp/include/debug-opt.def
@@ -0,0 +1,29 @@
+
+include = <<- _EOF_
+ #ifdef __windows
+ extern int atoi(const char*);
+ #else
+ # include <stdlib.h>
+ #endif
+ _EOF_;
+
+flag = {
+ name = debug-level;
+ value = d;
+ max = NOLIMIT;
+ nopreset;
+ flag-code = 'OPT_VALUE_SET_DEBUG_LEVEL++;';
+ descrip = "Increase debug verbosity level";
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
+
+flag = {
+ name = set-debug-level;
+ value = D;
+ max = NOLIMIT;
+ descrip = "Set the debug verbosity level";
+ arg-type = number;
+ doc = <<- _EndOfDoc_
+ _EndOfDoc_;
+};
diff --git a/include/homerc.def b/sntp/include/homerc.def
index 18b4dcb74a98..18b4dcb74a98 100644
--- a/include/homerc.def
+++ b/sntp/include/homerc.def
diff --git a/sntp/include/ntp.lic b/sntp/include/ntp.lic
new file mode 100644
index 000000000000..0e42503a4912
--- /dev/null
+++ b/sntp/include/ntp.lic
@@ -0,0 +1,18 @@
+<PFX>Copyright (C) <years> <owner>, all rights reserved.
+<PFX>This is free software. It is licensed for use, modification and
+<PFX>redistribution under the terms of the NTP License, copies of which
+<PFX>can be seen at:
+<PFX> <http://ntp.org/license>
+<PFX> <http://opensource.org/licenses/ntp-license.php>
+
+<PFX>Permission to use, copy, modify, and distribute this software and its
+<PFX>documentation for any purpose with or without fee is hereby granted,
+<PFX>provided that the above copyright notice appears in all copies and that
+<PFX>both the copyright notice and this permission notice appear in
+<PFX>supporting documentation, and that the name <owner> not be used in
+<PFX>advertising or publicity pertaining to distribution of the software
+<PFX>without specific, written prior permission. <owner> makes no
+<PFX>representations about the suitability this software for any purpose. It
+<PFX>is provided "as is" without express or implied warranty.
+
+the NTP license, <http://ntp.org/license>
diff --git a/sntp/include/version.def b/sntp/include/version.def
new file mode 100644
index 000000000000..b0f0d07a4ffe
--- /dev/null
+++ b/sntp/include/version.def
@@ -0,0 +1 @@
+version = '4.2.8';
diff --git a/sntp/include/version.texi b/sntp/include/version.texi
new file mode 100644
index 000000000000..a43551d2cd01
--- /dev/null
+++ b/sntp/include/version.texi
@@ -0,0 +1,3 @@
+@set UPDATED 19 December 2014
+@set EDITION 4.2.8
+@set VERSION 4.2.8
diff --git a/sntp/includes.mf b/sntp/includes.mf
new file mode 100644
index 000000000000..9ba126df498d
--- /dev/null
+++ b/sntp/includes.mf
@@ -0,0 +1,6 @@
+## includes.mf - automake fragment
+
+SNTP_INCS = -I$(top_srcdir)/../include
+SNTP_INCS += -I$(top_srcdir)/../lib/isc/include
+SNTP_INCS += -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include
+SNTP_INCS += -I$(top_srcdir)/../lib/isc/unix/include
diff --git a/sntp/sntp-opts.menu b/sntp/invoke-sntp.menu
index e3c8d810b5c1..e3c8d810b5c1 100644
--- a/sntp/sntp-opts.menu
+++ b/sntp/invoke-sntp.menu
diff --git a/sntp/invoke-sntp.texi b/sntp/invoke-sntp.texi
new file mode 100644
index 000000000000..68bfc3827b33
--- /dev/null
+++ b/sntp/invoke-sntp.texi
@@ -0,0 +1,427 @@
+@node sntp Invocation
+@section Invoking sntp
+@pindex sntp
+@cindex standard Simple Network Time Protocol client program
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:51:36 AM by AutoGen 5.18.5pre4
+# From the definitions sntp-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+@code{sntp}
+can be used as an SNTP client to query a NTP or SNTP server and either display
+the time or set the local system's time (given suitable privilege). It can be
+run as an interactive command or from a
+@code{cron}
+job.
+
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+
+
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+
+@code{'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'}
+
+where the
+@code{'(+0800)'}
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+@code{'+4.567'}
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+@code{'+/- 0.089'}
+is the reported
+@emph{synchronization} @emph{distance}
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+@code{'+/- ?'}.
+If the
+@emph{host}
+is different from the
+@emph{IP},
+both will be displayed.
+Otherwise, only the
+@emph{IP}
+is displayed.
+Finally, the
+@emph{stratum}
+of the host is reported.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{sntp} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* sntp usage:: sntp help/usage (@option{--help})
+* sntp ipv4:: ipv4 option (-4)
+* sntp ipv6:: ipv6 option (-6)
+* sntp authentication:: authentication option (-a)
+* sntp broadcast:: broadcast option (-b)
+* sntp concurrent:: concurrent option (-c)
+* sntp gap:: gap option (-g)
+* sntp kod:: kod option (-K)
+* sntp keyfile:: keyfile option (-k)
+* sntp logfile:: logfile option (-l)
+* sntp steplimit:: steplimit option (-M)
+* sntp ntpversion:: ntpversion option (-o)
+* sntp usereservedport:: usereservedport option (-r)
+* sntp timeout:: timeout option (-t)
+* sntp wait:: wait option
+* sntp config:: presetting/configuring sntp
+* sntp exit status:: exit status
+* sntp Usage:: Usage
+* sntp Authors:: Authors
+@end menu
+
+@node sntp usage
+@subsection sntp help/usage (@option{--help})
+@cindex sntp help
+
+This is the automatically generated usage text for sntp.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8
+Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
+ [ hostname-or-IP ...]
+ Flg Arg Option-Name Description
+ -4 no ipv4 Force IPv4 DNS name resolution
+ - prohibits the option 'ipv6'
+ -6 no ipv6 Force IPv6 DNS name resolution
+ - prohibits the option 'ipv4'
+ -a Num authentication Enable authentication with the key auth-keynumber
+ -b Str broadcast Listen to the address specified for broadcast time sync
+ - may appear multiple times
+ -c Str concurrent Concurrently query all IPs returned for host-name
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -g Num gap The gap (in milliseconds) between time requests
+ -K Fil kod KoD history filename
+ -k Fil keyfile Look in this file for the key specified with -a
+ -l Fil logfile Log to specified logfile
+ -M Num steplimit Adjustments less than steplimit msec will be slewed
+ - it must be in the range:
+ greater than or equal to 0
+ -o Num ntpversion Send int as our NTP protocol version
+ - it must be in the range:
+ 0 to 7
+ -r no usereservedport Use the NTP Reserved Port (port 123)
+ -S no step OK to 'step' the time with settimeofday(2)
+ -s no slew OK to 'slew' the time with adjtime(2)
+ -t Num timeout The number of seconds to wait for responses
+ no wait Wait for pending replies (if not setting the time)
+ - disabled as '--no-wait'
+ - enabled by default
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -> opt save-opts save the option state to a config file
+ -< Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named SNTP_*
+
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+@end example
+@exampleindent 4
+
+@node sntp ipv4
+@subsection ipv4 option (-4)
+@cindex sntp-ipv4
+
+This is the ``force ipv4 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv6.
+@end itemize
+
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+@node sntp ipv6
+@subsection ipv6 option (-6)
+@cindex sntp-ipv6
+
+This is the ``force ipv6 dns name resolution'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must not appear in combination with any of the following options:
+ipv4.
+@end itemize
+
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+@node sntp authentication
+@subsection authentication option (-a)
+@cindex sntp-authentication
+
+This is the ``enable authentication with the key @var{auth-keynumber}'' option.
+This option takes a number argument @file{auth-keynumber}.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the @option{keyid}, a
+number specified in the @option{keyfile} as this key's identifier.
+See the @option{keyfile} option (@option{-k}) for more details.
+@node sntp broadcast
+@subsection broadcast option (-b)
+@cindex sntp-broadcast
+
+This is the ``listen to the address specified for broadcast time sync'' option.
+This option takes a string argument @file{broadcast-address}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+If specified @code{sntp} will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with @option{-t}.
+@node sntp concurrent
+@subsection concurrent option (-c)
+@cindex sntp-concurrent
+
+This is the ``concurrently query all ips returned for host-name'' option.
+This option takes a string argument @file{host-name}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+@code{ntpd}, and therefore @code{sntp} will send queries to these IPs
+one after another, with a 2-second gap in between each query.
+
+The @option{-c} or @option{--concurrent} flag says that any IPs
+returned for the DNS lookup of the supplied host-name are on
+different machines, so we can send concurrent queries.
+@node sntp gap
+@subsection gap option (-g)
+@cindex sntp-gap
+
+This is the ``the gap (in milliseconds) between time requests'' option.
+This option takes a number argument @file{milliseconds}.
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
+@node sntp kod
+@subsection kod option (-K)
+@cindex sntp-kod
+
+This is the ``kod history filename'' option.
+This option takes a file argument @file{file-name}.
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
+@node sntp keyfile
+@subsection keyfile option (-k)
+@cindex sntp-keyfile
+
+This is the ``look in this file for the key specified with @option{-a}'' option.
+This option takes a file argument @file{file-name}.
+This option specifies the keyfile.
+@code{sntp} will search for the key specified with @option{-a}
+@file{keyno} in this file. See @command{ntp.keys(5)} for more
+information.
+@node sntp logfile
+@subsection logfile option (-l)
+@cindex sntp-logfile
+
+This is the ``log to specified logfile'' option.
+This option takes a file argument @file{file-name}.
+This option causes the client to write log messages to the specified
+@file{logfile}.
+@node sntp steplimit
+@subsection steplimit option (-M)
+@cindex sntp-steplimit
+
+This is the ``adjustments less than @var{steplimit} msec will be slewed'' option.
+This option takes a number argument.
+If the time adjustment is less than @file{steplimit} milliseconds,
+slew the amount using @command{adjtime(2)}. Otherwise, step the
+correction using @command{settimeofday(2)}.
+@node sntp ntpversion
+@subsection ntpversion option (-o)
+@cindex sntp-ntpversion
+
+This is the ``send @var{int} as our ntp protocol version'' option.
+This option takes a number argument.
+When sending requests to a remote server, tell them we are running
+NTP protocol version @file{ntpversion} .
+@node sntp usereservedport
+@subsection usereservedport option (-r)
+@cindex sntp-usereservedport
+
+This is the ``use the ntp reserved port (port 123)'' option.
+Use port 123, which is reserved for NTP, for our network
+communications.
+@node sntp timeout
+@subsection timeout option (-t)
+@cindex sntp-timeout
+
+This is the ``the number of seconds to wait for responses'' option.
+This option takes a number argument @file{seconds}.
+When waiting for a reply, @code{sntp} will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If @code{sntp} is
+only waiting for a broadcast response a longer timeout is
+likely needed.
+@node sntp wait
+@subsection wait option
+@cindex sntp-wait
+
+This is the ``wait for pending replies (if not setting the time)'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+can be disabled with --no-wait.
+@item
+It is enabled by default.
+@end itemize
+
+If we are not setting the time, wait for all pending responses.
+
+
+@node sntp config
+@subsection presetting/configuring sntp
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{SNTP} and @code{SNTP_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{SNTP} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+@noindent
+@code{libopts} will search in 2 places for configuration files:
+@itemize @bullet
+@item
+$HOME
+@item
+$PWD
+@end itemize
+The environment variables @code{HOME}, and @code{PWD}
+are expanded and replaced when @file{sntp} runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named @file{.ntprc} is searched for
+within that directory and processed.
+
+Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+@example
+[SNTP]
+@end example
+@noindent
+or by
+@example
+<?program sntp>
+@end example
+@noindent
+Do not mix these styles within one configuration file.
+
+Compound values and carefully constructed string values may also be
+specified using XML syntax:
+@example
+<option-name>
+ <sub-opt>...&lt;...&gt;...</sub-opt>
+</option-name>
+@end example
+@noindent
+yielding an @code{option-name.sub-opt} string value of
+@example
+"...<...>..."
+@end example
+@code{AutoOpts} does not track suboptions. You simply note that it is a
+hierarchicly valued option. @code{AutoOpts} does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node sntp exit status
+@subsection sntp exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@item 66 (EX_NOINPUT)
+A specified configuration file could not be loaded.
+@item 70 (EX_SOFTWARE)
+libopts had an internal operational error. Please report
+it to autogen-users@@lists.sourceforge.net. Thank you.
+@end table
+@node sntp Usage
+@subsection sntp Usage
+@node sntp Authors
+@subsection sntp Authors
diff --git a/sntp/kod_management.c b/sntp/kod_management.c
index a0cd23c487eb..562163945f57 100644
--- a/sntp/kod_management.c
+++ b/sntp/kod_management.c
@@ -7,7 +7,8 @@
#include "log.h"
#include "sntp-opts.h"
#include "ntp_stdlib.h"
-//#define DEBUG
+#include "ntp_worker.h"
+#include "ntp_debug.h"
int kod_init = 0, kod_db_cnt = 0;
const char *kod_db_file;
@@ -18,10 +19,10 @@ struct kod_entry **kod_db; /* array of pointers to kod_entry */
* Search for a KOD entry
*/
int
-search_entry (
- char *hostname,
- struct kod_entry **dst
- )
+search_entry(
+ const char *hostname,
+ struct kod_entry **dst
+ )
{
register int a, b, resc = 0;
@@ -49,20 +50,18 @@ search_entry (
void
add_entry(
- char *hostname,
- char *type /* 4 bytes not \0 terminated */
+ const char * hostname,
+ const char * type /* 4 bytes not \0 terminated */
)
{
int n;
struct kod_entry *pke;
- pke = emalloc(sizeof(*pke));
+ pke = emalloc_zero(sizeof(*pke));
pke->timestamp = time(NULL);
memcpy(pke->type, type, 4);
pke->type[sizeof(pke->type) - 1] = '\0';
- strncpy(pke->hostname, hostname,
- sizeof(pke->hostname));
- pke->hostname[sizeof(pke->hostname) - 1] = '\0';
+ strlcpy(pke->hostname, hostname, sizeof(pke->hostname));
/*
* insert in address ("hostname") order to find duplicates
@@ -89,11 +88,11 @@ add_entry(
void
delete_entry(
- char *hostname,
- char *type
+ const char * hostname,
+ const char * type
)
{
- register int a;
+ int a;
for (a = 0; a < kod_db_cnt; a++)
if (!strcmp(kod_db[a]->hostname, hostname)
@@ -113,6 +112,17 @@ delete_entry(
void
+atexit_write_kod_db(void)
+{
+#ifdef WORK_FORK
+ if (worker_process)
+ return;
+#endif
+ write_kod_db();
+}
+
+
+int
write_kod_db(void)
{
FILE *db_s;
@@ -133,7 +143,12 @@ write_kod_db(void)
pch = strchr(kod_db_file + 1, DIR_SEP);
while (NULL != pch) {
*pch = '\0';
- mkdir(kod_db_file, dirmode);
+ if (-1 == mkdir(kod_db_file, dirmode)
+ && errno != EEXIST) {
+ msyslog(LOG_ERR, "mkdir(%s) failed: %m",
+ kod_db_file);
+ return FALSE;
+ }
*pch = DIR_SEP;
pch = strchr(pch + 1, DIR_SEP);
}
@@ -141,10 +156,10 @@ write_kod_db(void)
}
if (NULL == db_s) {
- msyslog(LOG_WARNING, "Can't open KOD db file %s for writing!",
+ msyslog(LOG_WARNING, "Can't open KOD db file %s for writing: %m",
kod_db_file);
- return;
+ return FALSE;
}
for (a = 0; a < kod_db_cnt; a++) {
@@ -155,12 +170,15 @@ write_kod_db(void)
fflush(db_s);
fclose(db_s);
+
+ return TRUE;
}
void
kod_init_kod_db(
- const char *db_file
+ const char * db_file,
+ int readonly
)
{
/*
@@ -174,25 +192,20 @@ kod_init_kod_db(
char *str_ptr;
char error = 0;
- atexit(write_kod_db);
-
-#ifdef DEBUG
- printf("Initializing KOD DB...\n");
-#endif
+ TRACE(2, ("Initializing KOD DB...\n"));
kod_db_file = estrdup(db_file);
-
db_s = fopen(db_file, "r");
if (NULL == db_s) {
- msyslog(LOG_WARNING, "kod_init_kod_db(): Cannot open KoD db file %s",
+ msyslog(LOG_WARNING, "kod_init_kod_db(): Cannot open KoD db file %s: %m",
db_file);
return;
}
- if (ENABLED_OPT(NORMALVERBOSE))
+ if (debug)
printf("Starting to read KoD file %s...\n", db_file);
/* First let's see how many entries there are and check for right syntax */
@@ -225,16 +238,11 @@ kod_init_kod_db(
}
if (0 == kod_db_cnt) {
-#ifdef DEBUG
- printf("KoD DB %s empty.\n", db_file);
-#endif
- fclose(db_s);
- return;
+ TRACE(2, ("KoD DB %s empty.\n", db_file));
+ goto wrapup;
}
-#ifdef DEBUG
- printf("KoD DB %s contains %d entries, reading...\n", db_file, kod_db_cnt);
-#endif
+ TRACE(2, ("KoD DB %s contains %d entries, reading...\n", db_file, kod_db_cnt));
rewind(db_s);
@@ -280,12 +288,14 @@ kod_init_kod_db(
return;
}
+ wrapup:
fclose(db_s);
-#ifdef DEBUG
for (a = 0; a < kod_db_cnt; a++)
- printf("KoD entry %d: %s at %llx type %s\n", a,
- kod_db[a]->hostname,
- (unsigned long long)kod_db[a]->timestamp,
- kod_db[a]->type);
-#endif
+ TRACE(2, ("KoD entry %d: %s at %llx type %s\n", a,
+ kod_db[a]->hostname,
+ (unsigned long long)kod_db[a]->timestamp,
+ kod_db[a]->type));
+
+ if (!readonly && write_kod_db())
+ atexit(&atexit_write_kod_db);
}
diff --git a/sntp/kod_management.h b/sntp/kod_management.h
index 70903a52a2e4..37089f2096b8 100644
--- a/sntp/kod_management.h
+++ b/sntp/kod_management.h
@@ -9,12 +9,12 @@ struct kod_entry {
char type[5];
};
-int search_entry(char *hostname, struct kod_entry **dst);
-
-void add_entry(char *hostname, char *type);
-void delete_entry(char *hostname, char *type);
-void kod_init_kod_db(const char *db_file);
-void write_kod_db(void);
+int search_entry(const char *hostname, struct kod_entry **dst);
+void add_entry(const char *hostname, const char *type);
+void delete_entry(const char *hostname, const char *type);
+void kod_init_kod_db(const char *db_file, int readonly);
+int write_kod_db(void);
+void atexit_write_kod_db(void);
#endif
diff --git a/sntp/libevent/ChangeLog b/sntp/libevent/ChangeLog
new file mode 100644
index 000000000000..8bb76cafff4e
--- /dev/null
+++ b/sntp/libevent/ChangeLog
@@ -0,0 +1,736 @@
+Changes in version 2.1.4-beta (?? Dec 2013)
+
+ (As of 735d838b0a537ae04f1e6a2e9cbc5f3f45ebb541)
+
+
+ Bugfixes (evdns)
+ o Checking request nameserver for NULL, before using it. (5c710c0
+ Belobrov Andrey)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (14971a8
+ Azat Khuzhin)
+ o Actually use the log facility for reporting evdns problems. (e1766a1)
+ o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)
+
+ Bugfixes (compilatin)
+ o Fix test compilation with nmake: add the gdi.lib dependency (5ba8ab7)
+ o Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) (8ab612e)
+ o Don't use return since return type is void and build error occurs using clang (838161d Makoto Kato)
+ o Use void casts to suppress some "unchecked return value" warns (7080d55)
+ o rpcgen: Generate regress.gen.[c,h] in build rather than src dir (243386c Ross Lagerwall)
+ o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)
+
+ Bugfixes (locks, synchronization)
+ o Missed lock acquire/release in event_base_cancel_single_callback_()
+ (d3d999a Azat Khuzhin)
+ o Fix locking in bufferevent_get_options_(). (dbc9cd4 Maxime Henrion)
+
+ Bugfixes (leaks)
+ o Avoid leaking segment mappings when offset is not a page multiple (d409514)
+
+ Testing
+ o Add tests for evdns_base_resume(). (1cd9ff5 Azat Khuzhin)
+ o Fix dns/leak_resume_send_err test. (7e876df Azat Khuzhin)
+ o Add checks for evhttp_connection_get_server() in unit tests. (fbc323b Maxime Henrion)
+ o Fix a (failure-only) null dereference in the unit tests (1104d0b)
+ o Fix a logic error in test_evbuffer_freeze (7765884)
+ o Add missing check to test_evbuffer_file_segment_add_cleanup_cb (eba4506)
+ o Fix some crash-on-fail cases in DNS regression tests (87cd6f0)
+ o DNS tests: add a missing check (f314900)
+ o Finalize tests: add a missing check (82b6956)
+ o test_evutil_rtrim: add another missing check. (e193c95)
+ o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset (611e28b Azat Khuzhin)
+ o regress_http: add tests for evhttp_connection_get_addr() (4dd500c Azat Khuzhin)
+
+ Bugfixes (core)
+ o If evsel->del() fails, don't leave the evmap in an inconsistent state
+ (9b5a527 Maxime Henrion)
+ o Move event_debug_note_teardown_ before mm_free. (69b5c64)
+ o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
+ o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)
+
+ Performance tweaks (core)
+ o Avoid redundant syscall to make a nonblocking socket nonblocking
+ (42c03da Maxime Henrion)
+ o Avoid redundant syscall if making a socket cloexec twice (1f29b18)
+ o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)
+
+ Bugfixes (evhttp)
+ o Fix a double close() bug in evhttp when the underlying bufferevent uses
+ BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
+ o Fix an unlikely but possible error case for http connections (f22049e)
+ o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)
+
+ Bugfixes on 2.0 (Windows)
+ o Use windows vsnprintf fixup logic on all windows environments (e826f19)
+ o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)
+
+ Bugfixes (evutil_secure_rng)
+ o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
+ o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
+ o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c)
+ o Really remove RNG seeds from the stack (f5ced88)
+ o Fix another arc4random_buf-related warning (e64a2b0)
+
+ New APIs (core)
+ o Added event_base_get_num_events() (0fa107d Mobai Zhang)
+ o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
+ o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb Mark Ellzey)
+
+ New APIs (evhttp)
+ o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
+ o add a http default content type option (5a5acd9 Nicolas Martyanoff)
+ o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat Khuzhin)
+
+
+ Documentation
+ o Document that arc4random is not a great cryptographic PRNG. (6e49696)
+ o Small doxygen tweaks (6e67b51)
+ o Try another doxygen tweak (ccf432b)
+
+ New APIs (evutil_secure_rng)
+ o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)
+
+ Cleanups
+ o Remove an unreachable return statement in minheap-internal.h (e639a9e)
+
+ Sample code
+ o sample/le-proxy: Fail more gracefully if opening listener fails (44b2491)
+ o sample: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)
+
+
+
+
+
+
+
+
+
+
+
+Changes in version 2.1.3-alpha (1 May 2013)
+
+ Libevent 2.1.3-alpha fixes various bugs, adds new unit tests, and cleans
+ up the code in a couple of places. It has a new callback in evhttp for
+ reporting errors during a request, a new feature for allowing evdns to
+ not keep the event_base looping when there are no requests inflight, and
+ example code for writing an https client.
+
+ Libevent 2.1.3-alpha also has an important new (experimental) event
+ finalization feature to allow safe event teardown in multithreaded
+ programs. This ought to fix the longstanding bug with deadlocks in
+ multithreaded use of SSL-based bufferevents that some people have been
+ experiencing since Libevent 2.0.
+
+
+ Core (event finalization)
+ o Implement event_finalize() and related functions to avoid certain
+ deadlocks (8eedeab)
+ o Use finalization feature so bufferevents can avoid deadlocks (02fbf68)
+ o Always run pending finalizers when event_base_free() is called (e9ebef8)
+ o Remove bufferevent_del_generic_timeout_cbs as now unused (4ea4c6a)
+ o More documentation for finalization feature (a800b91)
+ o Make the event_finalize* functions return an error code (5d11f4f)
+ o Mark the finalize stuff as experiemental in case it needs to
+ change (23e2e29)
+
+ Evdns
+ o evdns: New flag to make evdns not prevent the event loop from
+ exiting (6b7fa62 Azat Khuzhin)
+
+ Bugfixes (Core)
+ o Make event_remove_timer behave correctly with persistent timers (5623e80)
+ o Unit test for event_remove_timer with EV_PERSIST. (96150dd)
+ o Double-check next timeout when adding events (9443868 Nate Rosenblum)
+ o event_base_update_cache_time should be a no-op if the loop isn't
+ running (5e6fa2a)
+
+ Bugfixes (evhttp, crash fix, from 2.0)
+ o fix #73 and fix http_connection_fail_test to catch it (b618204 Greg Hazel)
+
+ Bugfixes (compilation and portability, from 2.0)
+ o Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled (7e45739)
+ o Fix missing AC_PROG_SED on older Autoconfs (9ab2b3f Tay Ray Chuan)
+ o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5)
+ (74d4c44 Kevin Bowling)
+ o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake
+ 1.13 compat (817ea36)
+ o Rename configure.in to configure.ac to appease newer autoconfs (0c79787)
+ o Avoid using top_srcdir in TESTS: new automakes do not like this (a55514e)
+
+ Bugfixes (resource leaks/lock errors on error, from 2.0)
+ o Avoid leaking fds on evconnlistener with no callback set (69db261)
+ o Avoid double-close on getsockname error in evutil_ersatz_socketpair
+ (0a822a6)
+ o Fix a locking error in bufferevent_socket_get_dns_error. (0a5eb2e)
+
+ Documentation Fixes (from 2.0)
+ o Fix a mistake in evbuffer_remove() arguments in example http server code
+ (c322c20 Gyepi Sam)
+ o Fix a typo in a comment in buffer.h. Spotted by Alt_F4 (773b0a5)
+
+ Documentation Fixes
+ o minor documentation typos (809586a Patrick Pelletier)
+ o Fix cut-and-paste err in whatsnew-2.1 (49905ac)
+ o Fix comment to refer to sample/include.am correctly (9e8cdf3 Sebastian
+ Hahn)
+ o Fix typo : Dispatching instead of Dispaching (0c2bacc Volker Lendecke)
+ o fix some hinky indentation in evhttp_make_request (80e220e Patrick
+ Pelletier)
+ o "buffer" spelling (a452811 Patrick Pelletier)
+ o Specify return behavior in header for evbuffer_pullup() in corner case
+ (cf8d1cd Dan Petro)
+ o Clarify an important point about event_base_foreach_event() (920a5e6)
+
+ Compilation Fixes/Tool Support
+ o avoid valgrind false positive by zeroing epoll_event (1258614 Patrick
+ Pelletier)
+ o Fix harmless clang enum warning (b452a43 Sebastian Hahn)
+ o remove all exes on "make clean", not just regress.exe (974bfa0 Patrick
+ Pelletier)
+ o Make --disable-libevent-regress work again (787fd74)
+ o Do not build strlcpy.c when it will have no code. (4914620)
+
+ Portability Fixes
+ o When EWOULDBLOCK is not EAGAIN, treat it as equivalent to it (bf7a0ff)
+ o Preliminary changes for Minix3. (0dda56a Nicholas Heath)
+ o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13
+ compat (bf278b)
+ o Avoid using $(top_srcdir) in TESTS. (2863c83)
+ o build test/test-script.sh on systems with a less-featureful $< (f935e21)
+ o Implement EVUTIL_ERR_IS_EAGAIN on windows. (42aaf4d)
+
+ Evhttp changes:
+ o Fix ipv6 support for http. When URL contain domain, not IP
+ address. (71e709c Azat Khuzhin)
+ o uri decode: fix for warning "use of uninitialised value" (64b6ece Azat
+ Khuzhin)
+ o uri decode: changed the test for the existence of the next character
+ (e1903e3 Azat Khuzhin)
+ o Move prototype of evhttp_decode_uri_internal() to http-internal.h
+ (de8101a Azat Khuzhin)
+ o Test: decoding just part of string with evhttp_decode_uri_internal()
+ (1367653 Azat Khuzhin)
+ o Add new error_cb for actual reporting of HTTP request errors. (7b07719
+ Azat Khuzhin)
+ o Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test() (862c217
+ Azat Khuzhin)
+ o Drop extra header http_struct.h from regress_http.c (54cc800 Azat Khuzhin)
+
+ Testing
+ o Add regress test ipv6_for_domain. (9ec88bd Azat Khuzhin)
+ o Add an environment variable (EVENT_DEBUG_MODE) to run unit tests in debug
+ mode (2fad0f3)
+ o Add a test with an active_later event at event_base_free time. (1c3147f)
+ o Make all tests pass under EVENT_DEBUG_MODE=1 (b1b054f)
+ o Add some verbose notes to bufferevent unit tests (9d893c9)
+ o New test for active_later->active transition on event_active (a153874)
+ o New tests for event_base_foreach_event() (0b096ef)
+ o Unit tests for event_base_gettimeofday_cached() and
+ event_base_update_cache_time() (30ea291)
+ o A test for event_get_assignment() (f09629e)
+ o More unit tests for initializing common timeouts. (d596739)
+ o Fix a bug in the new main/event_foreach test (702c9aa)
+
+ Windows:
+ o use FormatMessage for winsock errors (0c6ec5d, 2078e9b, 4ccdd53, c9ad3af
+ Patrick Pelletier)
+ o a program to print out the error strings for winsock errors (7296512
+ Patrick Pelletier)
+ o Fix a warning introduced in 0c6ec5d8 (eeb700c)
+ o Fix another warning introduced in 0c6ec5d8 (ed26561)
+
+ Examples (http)
+ o Add sample/https-client.c, an example of stacking evhttp as a client on
+ top of bufferevent_ssl. (be46c99 Catalin Patulea)
+ o use ${OPENSSL_LIBS} instead of -lssl -lcrypto (bf31fa5 Patrick Pelletier)
+ o https-client was putting newlines at 256-byte boundaries (42d7441 Patrick
+ Pelletier)
+ o better handling of OpenSSL errors (5754d96 Patrick Pelletier)
+ o use Debian's default root certificate location (aacd674 Patrick Pelletier)
+ o use iSECPartners code to validate hostname in certificate (64d9f16
+ Patrick Pelletier)
+ o avoid sign mismatch warning in openssl_hostname_validation.c (6021cb5
+ Patrick Pelletier)
+ o pull in wildcard matching code from cURL (4db9da6 Patrick Pelletier)
+ o Another tweak to https-client.c (95acdaa)
+ o Remove http_struct.h usage in sample/https-client.c (8a90a85)
+
+
+
+Changes in version 2.1.2-alpha (18 Nov 2012)
+
+ Libevent 2.1.2-alpha includes more portable for monotonic timers,
+ refactors much of Libevent's internal and external infrastructure,
+ closes some longstanding gaps in the interface, makde other
+ improvements. Ths log below tries to organize features by rough area of
+ effect. It omits a few commits which were pure bugfixes on other commits
+ listed below. For more detail, see the git changelogs. For more
+ insight, see the "whatsnew-2.1.txt" document included in the Libevent
+ 2.1.2-alpha distribution.
+
+ Libevent 2.1.2-alpha also includes all changes made in 2.0.19-stable
+ through 2.0.21-stable inclusive.
+
+ Performance (core):
+ o Replace pipe-based notification with EVFILT_USER where possible. This
+ should make multithreaded programs on OSX and *BSD alert the main thread a
+ little faster. (53a07fe)
+ o Make th_base_lock nonrecursive. (9cd5acb)
+
+ New/Changed API Functions:
+ o New event_get_priority() function to return an event's priority (f90e255)
+ o Add a bufferevent_get_priority() function (bd39554)
+ o Add an event_base_loopcontinue() to tell Libevent to rescan for more
+ events right away (7d6aa5e)
+ o Add a new callback to get called on evbuffer_file_segment free
+ (e9f8feb yangacer, 64051b9)
+ o Expose event_base_foreach_event() as a public API. (84fd6d7 Roman
+ Puls, 232055e, ffe1643)
+ o Add an event_remove_timer() to remove timer on an event without
+ deleting it (e3b2e08)
+ o Make bufferevent_set_timeouts(bev, NULL, NULL) have plausible
+ semantics (9dee36b)
+ o Rename event_enable_lock_debuging() to ..._debugging(). (The old name
+ should still work.) (07e132e)
+ o Add missing implementation for event_enable_debug_logging (3b3e21d)
+
+ PORTABLE MONOTONIC TIMERS:
+
+ Libevent 2.1.2 includes internal support for monotonic timers on
+ (nearly) all supported platforms, including Windows, and OSX. Libevent
+ applications should now be more resilient to jumps forwards or backwards
+ in the system clock. Also, on Linux systems with epoll, we now
+ optionally support microsecond-level timeouts (whereas epoll only
+ supports millisecond-precision timeouts).
+
+ o Use mach_absolute_time() for monotonic clock support on OSX. (b8fd6f9)
+ o Do not track use_monotonic field when is no monotonic clock (cb653a0)
+ o EVENT_BASE_FLAG_PRECISE_TIMER indicates we want fine timer precision
+ (ddd69d3)
+ o On Linux, use CLOCK_MONOTONIC_COARSE by default (55780a7)
+ o Implement a GetTickCount-based monotonic timer for Windows (d5e1d5a)
+ o Refactor monotonic timer handling into a new type and set of
+ functions; add a gettimeofday-based ratcheting implementation (f5e4eb0)
+ o Add EVENT_PRECISE_TIMER environment var for selecting precise-but-slow
+ timer (a2598ec)
+ o Implement fast/precise monotonic clocks on Windows (2c47045)
+ o Simple unit tests for monotonic timers (630f077)
+ o Improve the monotonic-time unit test: make it check the step size (7428c78)
+ o When PRECISE_TIMERS is set with epoll, use timerfd for microsecond
+ precision (26c7582)
+ o Split out time-related evutil functions into a new evutil_time.c (c419485)
+ o Split out time-related prototypes into time-internal.h (71bca50)
+ o Add evutil_time.obj to Makefile.nmake (0ba0683)
+ o Avoid giving a spurious warning when timerfd support is unavailable
+ (1aaf9f0 Dave Hart)
+ o Make test_evutil_monotonic a little more tolerant (def3b83)
+ o Avoid unused-var warning on systems with clock_gettime but without
+ CLOCK_MONOTONIC_COARSE (9be5468)
+
+EVENT_BASE_ONCE LEAKS:
+ If a callback added by event_base_once() is never invoked, Libevent no
+ longer leaks internal memory.
+
+ o Free dangling event_once objects on event_base_free() (c17dd59)
+ o Add a unit test in which an event is created with event_base_once()
+ but never fires (4343edf)
+
+TESTING SUPPORT, FIXES AND IMPROVEMENTS:
+
+ Libevent now disables by default its unit tests that would touch the
+ network, or that tend to fail on heavily-loaded systems. To re-enable
+ them, invoke the ./test/regress program with the @all alias.
+
+ o Simplify test.sh code significantly. (9b856fd Ross Lagerwall)
+ o Make all tests that hit the network disabled by default (f2cea87)
+ o Avoid a resource leak on error in http client benchmark (ea92fba)
+ o Update to latest tinytest (911b4f0349377) (ef7c4f7)
+ o Avoid (unlikely) overflow in bench_httpclient.c (5671033)
+ o Shave 700 msec off the persistent_timeout_jump test (21205b8)
+ o Check return value of write() in regress.c (c8009d2)
+ o Make load-dependent monotonic timer tests off-by-default (2b6fe8b)
+ o Add deferred_cb_skew to list of timing-dependent tests (34c8f31)
+ o Avoid test -e; older shs don't have one. (f1bd938)
+ o Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
+ o Fix a couple of compile warnings in the unit tests (5a9a014)
+
+MISC:
+ o Change evutil_weakrand_() to avoid platform random() (e86af4b Nicholas
+ Marriott, 3aa4415)
+
+INFRASTRUCTURE (Active-later events):
+ As a simplification and optimization to Libevent's "deferred callback"
+ logic (introduced in 2.0 to avoid callback recursion), Libevent now
+ treats all of its deferrable callback types using the same logic it uses
+ for active events. Now deferred events no longer cause priority
+ inversion, no longer require special code to cancel them, and so on.
+
+ o Refactor the callback part of an event into its own event_callback
+ type (cba59e5)
+ o Add "active later" event_callbacks to supersede deferred (745a63d)
+ o event_base_assert_ok: check value of event_active_count for
+ correctness (fec8bae)
+ o Replace deferred_cbs with event_callback-based implementation. (ae2b84b)
+ o Replace more deferred_cb names with event_callback (a4079aa)
+ o Give event_base_process_active a single exit path (581b5be)
+ o Restore our priority-inversion-prevention code with deferreds (c0e425a)
+ o Refactor event_persist_closure: raise and extract some common logic
+ (bec22b4)
+ o Remove the unused bits from EVLIST_ALL (9889a3d)
+
+BUILD IMPROVEMENTS:
+ Libevent 2.1.2-alpha modernizes Libevent's use of autotools, and makes
+ numerous other build system. Parallel builds should be faster, and all
+ builds should be quieter.
+
+ o Split long lists in Makefile.am into one-item-per-line (2711cda)
+ o Remove unnecessary code in configure.in. (e65914f Ross Lagerwall)
+ o attempt to support OpenSSL in Makefile.nmake (eba0eb2 Patrick Pelletier)
+ o Use newer syntax for autoconf/automake init (7d60ba8)
+ o Enable silent build rules by default. Override with V=1 (7b18e5c)
+ o Switch to non-recursive makefiles (7092f3b)
+ o Rename subordinate Makefile.ams to include.am (6cdfeeb)
+ o Make quiet build even quieter (371a123)
+ o New --quiet option for event_rpcgen.py (aa59c1e)
+ o Be quiet when making regress.gen.[ch] (607a8ff)
+ o Fix handling of no-python case for nonrecursive make (1e3123d)
+ o We now require automake 1.9 or later. Modernize! (b7f6e89)
+ o Rename configure.in to configure.ac. (b3fea67 Ross Lagerwall)
+ o Use correct openssl libs and includes in pkgconfig file (d70af27)
+ o Use the same CFLAGS for openssl when building unit tests as with
+ libevent (1d9d511)
+
+DOCUMENTATION
+ o Note that make_base_notifiable should not be necessary (26ee5f9)
+ o Be more clear that LEV_OPT_DEFERRED_ACCEPT has tricky prereqs (371efeb)
+ o Add caveat to docs about bufferevent_free() with data in outbuf (6fab9ee)
+ o Make it more clear that NOLOCK means "I promise, no multithreading"
+ (9444524)
+ o Fix a comment in test-fdleak after 077c7e949. (3881d8f Ross Lagerwall)
+ o Make the Makefile.nmake warning slightly less dire (e7bf4c8)
+ o Fix typo : events instead of evets (05f1aca Azat Khuzhin)
+ o Additional comments about OPENSSL_DIR variable, prompted by Dave Hart
+ (6bde2ef Patrick Pelletier)
+
+EVHTTP:
+ o ignore LWS after field-content in headers (370a2c0 Artem Germanov)
+ o Clean up rtrim implementation (aa59d80)
+ o Remove trailing tabs in HTTP headers as well. (ac42519)
+ o Remove internal ws from multiline http headers correctly (c6ff381)
+ o Move evutil_rtrim_lws_ to evutil.c where it belongs (61b93af)
+ o add evhttp_request_get_response_code_line (4f4d0c9 Jay R. Wren)
+ o Use EVUTIL_SOCKET_ERROR() wrapper to save/restore errno in
+ evhttp_connection_fail_ (7afbd60)
+ o preserve errno in evhttp_connection_fail_ for inspection by the
+ callback (36d0ee5 Patrick Pelletier)
+
+BUGFIXES:
+ o Correctly handle running on a system where accept4 doesn't work. (9fbfe9b)
+ o Avoid double-free on error in evbuffer_add_file. Found by
+ coverity. (6a81b1f)
+ o Fix another possible uninitialized read in dns regression tests. Found
+ by coverity. (13525c5)
+ o Add checks for functions in test-ratelim.c; found by Coverity (aa501e1)
+ o Avoid memory leak in test_event_calloc unit test; found by coverity
+ (92817a1)
+ o Fix a shadowed variable in addfile_test_readcb; found by coverity
+ (225344c)
+ o Check return value when using LEV_OPT_DEFERRED_ACCEPT. Found by
+ coverity (6487f63)
+ o Prevent reference leak of bufferevent if getaddrinfo fails. (b757786
+ Joachim Bauch)
+ o Make event_base_getnpriorities work with old "implicit base" code
+ (c46cb9c)
+ o Simplify and correct evutil_open_closeonexec_ (0de587f)
+ o Fix event_dlist definition when sys/queue not included (81b6209
+ Derrick Pallas)
+
+
+
+Changes in version 2.1.1-alpha (4 Apr 2012)
+
+ Libevent 2.1.1-alpha includes a number of new features and performance
+ improvements. The log below tries to organize them by rough area of
+ effect. It omits some commits which were pure bugfixes on other commits
+ listed below. For more detail, see the git changelogs. For more
+ insight, see the "whatsnew-2.1.txt" document included in the Libevent
+ 2.1.1-alpha distribution.
+
+ Performance: Core
+ o Replace several TAILQ users with LIST. LIST can be a little faster than
+ TAILQ for cases where we don't need queue-like behavior. (f9db33d,
+ 6494772, d313c29, 974d004)
+ o Disabled code to optimize the case where we reinsert an existing
+ timeout (e47042f, 09cbc3d)
+ o Remove a needless base-notify when rescheduling the first timeout (77a96fd)
+ o Save a needless comparison when removing/adjusting timeouts (dd5189b)
+ o Possible optimization: split event_queue_insert/remove into
+ separate functions. needs testing (efc4dc5)
+ o Make event_count maintenance branchless at the expense of an
+ extra shift. Needs benchmarking (d1cee3b)
+ o In the 2.1 branch, let's try out lazy gettimeofday/clock_gettime
+ comparison (2a83ecc)
+ o Optimization in event_process_active(): ignore maxcb & endtime
+ for highest priority events. (a9866aa Alexander Drozdov)
+ o Bypass event_add when using event_base_once() for a 0-sec timeout (35c5c95)
+ o Remove the eventqueue list and the ev_next pointers. (604569b 066775e)
+
+ Performance: Evbuffers
+ o Roughly 20% speed increase when line-draining a buffer using
+ EVBUFFER_EOL_CRLF (5dde0f0 Mina Naguib)
+ o Try to squeeze a little more speed out of EVBUFFER_EOL_CRLF (7b9d139)
+ o Fix a bug in the improved EOL_CRLF code (d927965)
+ o Remove a needless branch in evbuffer_drain() (d19a326)
+
+ Performance: Linux
+ o Infrastructure for using faster/fewer syscalls when creating
+ sockets (a1c042b)
+ o Minimize syscalls during socket creation in listener.c (7e9e289)
+ o Use a wrapper function to create the notification
+ pipe/socketpair/eventfd (ca76cd9)
+ o Use pipes for telling signals to main thread when possible (a35f396)
+ o Save syscalls when constructing listener sockets for evhttp (af6c9d8)
+ o Save some syscalls when creating evdns sockets (713e570)
+ o Save some syscalls when constructing a socket for a bufferevent (33fca62)
+ o Prefer epoll_create1 on Linuxen that have it (bac906c)
+
+ Performance: Epoll backend
+ o Use current event set rather than current pending change when
+ deciding whether to no-op a del (04ba27e Mike Smellie)
+ o Replace big chain of if/thens in epoll.c with a table lookup (8c83eb6)
+ o Clean up error handling in epoll_apply_one_change() a little (2d55a19)
+
+ Performance: Evport backend
+ o evport: use evmap_io to track fdinfo status. Should save time and
+ RAM. (4687ce4)
+ o evport: Remove a linear search over recent events when
+ reactivating them (0f77efe)
+ o evport: Use portev_user to remember fdinfo struct (276ec0e)
+ o evport: don't scan more events in ed_pending than needed (849a5cf)
+ o evport: Remove artificial low limit on max events per getn call (c04d927)
+ o Reenable main/many_events_slow_add for evport in 2.1 (e903db3)
+
+ Performance: Windows
+ o Use GetSystemTimeAsFileTime to implement gettimeofday on
+ win32. It's faster and more accurate than our old
+ approach. (b8b8aa5)
+
+ New functions and features: debugging
+ o Add event_enable_debug_logging() to control use of debug logs (e30a82f)
+
+ New functions and features: core
+ o Add event_config function to limit time/callbacks between calls
+ to dispatch (fd4de1e, 9fa56bd, a37a0c0, 3c63edd)
+ o New EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no
+ events are pending (084e68f)
+ o Add event_base_get_npriorities() function. (ee3a4ee Alexander Drozdov)
+ o Make evbase_priority_init() and evbase_get_npriorities()
+ threadsafe (3c55b5e)
+ o New event_base_update_cache_time() to set cached_tv to current
+ time (212533e Abel Mathew)
+ o Add event_self_cbarg() to be used in conjunction with
+ event_new(). (ed36e6a Ross Lagerwall, fa931bb, 09a1906, 1338e6c,
+ 33e43ef)
+ o Add a new libevent_global_shutdown() to free all globals before
+ exiting. (041ca00 Mark Ellzey, f98c158, 15296d0, 55e991b)
+ o Use getifaddrs to detect our interfaces if possible (7085a45)
+ o Add event_base_get_running_event() to get the event* whose cb we
+ are in (c5732fd, 13dad99)
+
+ New functions and features: building
+ o Implement --enable-gcc-hardening configure option (7550267 Sebastian Hahn)
+
+ New functions and features: evbuffers
+ o Add evbuffer_add_file_segment() so one fd can be used efficiently
+ in more than one evbuffer_add_file at a time (e72afae, c2d9884,
+ 3f405d2, 0aad014)
+ o Fix windows file segment mappings (8254de7)
+ o Allow evbuffer_ptr_set to yield a point just after the end of the
+ buffer. (e6fe1da)
+ o Allow evbuffer_ptr to point to position 0 in an empty evbuffer
+ (7aeb2fd Nir Soffer)
+ o Set the special "not found" evbuffer_ptr consistently. (e3e97ae Nir Soffer)
+ o support adding buffers to other buffers non-destructively
+ (9d7368a Joachim Bauch)
+ o prevent nested multicast references, reworked locking (26041a8
+ Joachim Bauch)
+ o New EVBUFFER_EOL_NUL to read NUL-terminated strings from an
+ evbuffer (d7a8b36 Andrea Montefusco, 54142c9)
+ o Make evbuffer_file_segment_types adaptable (c6bbbf1)
+ o Added evbuffer_add_iovec and unit tests. (aaec5ac Mark Ellzey, 27b5398)
+ o Add evbuffer_copyout_from to copy data from the middle of a
+ buffer (27e2225)
+
+ New functions and features: bufferevents
+ o Allow users to set allow_dirty_shutdown (099d27d Catalin Patulea)
+ o Tweak allow_dirty_shutdown documentation (a44cd2b)
+ o Fix two issues in the allow_dirty_shutdown code. (f3b89de)
+ o Add a bufferevent_getcb() to find a bufferevent's current
+ callbacks (a650394)
+ o bufferevent: Add functions to set/get max_single_read/write
+ values. (998c813 Alexander Drozdov)
+ o bev_ssl: Be more specific in event callbacks. evhttp in particular gets
+ confused without at least one of BEV_EVENT_{READING|WRITING}. (f7eb69a
+ Catalin Patulea)
+
+ New functions and features: evconnlisteners
+ o Support TCP_DEFER_ACCEPT sockopts for listeners (5880e4a Mark Ellzey,
+ a270728)
+ o Add another caveat to the TCP_DEFER_ACCEPT documentation (a270728)
+ o Allow evconnlistener to be created in disabled state. (9593a33
+ Alexander Drozdov)
+ o The LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener
+ sockets too (4970329)
+
+ Evhttp:
+ o Add new evhttp_{connection_}set_timeout_tv() functions to set
+ finger-grained http timeouts (6350e6c Constantine Verutin)
+ o Performance tweak to evhttp_parse_request_line. (aee1a97 Mark Ellzey)
+ o Add missing break to evhttp_parse_request_line (0fcc536)
+ o Add evhttp callback for bufferevent creation; this lets evhttp
+ support SSL. (8d3a850)
+ o Remove calls to deprecated bufferevent functions from evhttp.c (4d63758)
+ o evhttp: Add evhttp_foreach_bound_socket. (a2c48e3 Samy Al Bahra)
+
+ Build improvements:
+ o Add AC_USE_SYSTEM_EXTENSIONS to configure.in. Requires follow on
+ patches for correctness and robustness. (1fa7dbe Kevin Bowling)
+ o Filter '# define' statements from autoconf and generate
+ event-private.h (321b558 Kevin Bowling)
+ o Remove internal usage of _GNU_SOURCE (3b26541 Kevin Bowling)
+ o Eliminate a couple more manual internal _GNU_SOURCE defines (c51ef93
+ Kevin Bowling)
+ o Add AC_GNU_SOURCE to the fallback case. (ea8fa4c Kevin Bowling)
+ o Use a Configuration Header Template for evconfig-private.h (868f888
+ Kevin Bowling)
+ o Fix a comment warning and add evconfig-private.h to .gitignore
+ (f6d66bc Kevin Bowling)
+ o Include evconfig-private.h in internal files for great good. (0915ca0
+ Kevin Bowling)
+ o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5)
+ (ad03952 Kevin Bowling)
+ o Prefer the ./configure evconfig-private.h in MinGW, just in
+ case. (f964b72 Kevin Bowling)
+ o Shell hack for weird mkdir -p commands (fd7b5a8 Kevin Bowling)
+ o Add evconfig-private to remaining files (ded0a09 Kevin Bowling)
+ o Allow use of --enable-silent-rules for quieter compilation with
+ automake 1.11 (f1f8514 Dave Hart)
+ o Use "_WIN32", not WIN32: it's standard and we don't need to fake it
+ (9f560b)
+ o In configure, test for _WIN32 not WIN32. (85078b1 Peter Rosin)
+ o Do not define WIN32 in Makefile.nmake (d41f3ea Peter Rosin)
+ o Provide the autoconf m4 macros for the new OpenSSL via pkg-config
+ stuff. (674dc3d Harlan Stenn)
+ o Use pkg-config (if available) to handle OpenSSL. (1c63860 Harlan Stenn)
+ o We need AM_CPPFLAGS when compiling bufferevent_openssl.c (6d2613b
+ Harlan Stenn)
+ o Fix OSX build: $(OPENSSL_INCS) needs to be after
+ $(AM_CPPFLAGS). (46f1769 Zack Weinberg)
+ o Make gcc warnings on by default, and --enable-gcc-warnings only add
+ -Werror (d46517e Sebastian Hahn)
+ o Split up extra-long AC_CHECK_FUNCS/HEADERS lines in configure.in (88a30ad)
+ o Move libevent 1.x headers to include/, to put all public headers in
+ one place. (bbea8d6)
+ o Put #ifdef around some files to support alternate build
+ systems. (76d4c92 Ross Lagerwall)
+ o Also make win32select.c conditional for IDE users (bf2c5a7)
+
+ Debugging:
+ o Add a magic number to debug_locks to better catch lock-coding
+ errors. (b4a29c0 Dave Hart)
+ o munge the debug_lock signature before freeing it: it might help us
+ catch use-after-free (f28084d)
+ o Added --enable-event-debugging in configure (bc7b4e4, a9c2c9a Mark Ellzey)
+ o Debug addition for printing usec on TIMEOUT debugging. (ac43ce0 Mark Ellzey)
+ o Added usec debug in another area for debug (3baab0d Mark Ellzey)
+ o added timeout debug logs to include event ptr. (4b7d298 Mark Ellzey)
+ o more event dbg updates (6727543 Mark Ellzey)
+ o Clarify event_enable_debug_logging a little (6207826)
+ o Make --enable-verbose-debug option match its help text (10c3450)
+ o Add argument checks to some memory functions in `event.c'. (c8953d1
+ Mansour Moufid)
+
+ Testing:
+ o More abstraction in test.sh (cd74c4e)
+ o Add failing test for evbuffer_search_range. (8e26154 Nir Soffer)
+ o Tweaks to return types with end-of-buf ptrs (9ab8ab8)
+ o Add an (internal) usleep function for use by unit tests (f25d9d3)
+ o Synchronize with upstream tinytest (6c81be7)
+ o Make test-changelist faster (7622d26)
+ o Reduce the timeout in the main/fork test. (ab14f7c)
+ o New evhttp function to adjust initial retry timeout (350a3c4)
+ o Make regression tests run over 3x faster. (67a1763)
+ o Use test_timeval_diff_eq more consistently (b77b43f)
+ o Allow more slop in deferred_cb_skew test; freebsd needs it (b9f7e5f)
+ o When including an -internal.h header outside the main tree, do so
+ early (95e2455)
+ o Add a new test: test-fdleak which tests for fd leaks by creating many
+ sockets. (2ef9278 Ross Lagerwall, f7af194, 1c4288f, etc)
+ o Add a unit test for event_base_dump_events() (7afe48a, 8d08cce)
+ o Test more bufferevent_ratelim features (c24f91a)
+
+ Documentation:
+ o Improve evbuffer_ptr documentation (261ba63)
+ o added comments to describe refcounting of multicast chains (ba24f61
+ Joachim Bauch)
+ o Add doxygen for event_base_dump_events (cad5753)
+
+ OSX:
+ o Use "unlimited select" on OSX so that we can have more than
+ FD_SETSIZE fds (1fb5cc6)
+
+ KQueue:
+ o Use SIG_IGN instead of a do-nothing handler for signal events with
+ kqueue (148458e Zack Weinberg)
+
+ evprc:
+ o event_rpcgen.py now prints status information to stdout and errors to
+ stderr. (ffb0ba0 Ross Lagerwall)
+
+ Code improvement and refactoring:
+ o Make event_reinit() more robust and maintainable (272033e)
+ o Restore fast-path event_reinit() for slower backends (2c4b5de)
+ o Check changelist as part of checking representational integrity (39b3f38)
+ o Fix a compile warning in event_reinit (e4a56ed Sebastian Hahn)
+ o Refactor the functions that run over every event. (c89b4e6)
+ o Remove the last vestiges of _EVENT_USE_EVENTLIST (a3cec90)
+ o Make event-config.h depend on Makefile.am (2958a5c)
+
+ Build fixes:
+ o Don't do clang version detection when disabling some flags (083296b
+ Sebastian Hahn)
+
+ C standards conformance:
+ o Check for NULL return on win32 mm_calloc, and set ENOMEM. (af7ba69)
+ o Convert event-config.h macros to avoid reserved identifiers (68120d9)
+ o Generate event-config.h using the correct macros. (f82c57e)
+ o Convert include-guard macro convention to avoid reserved identifiers
+ (3f8c7cd)
+ o Make event_rpcgen.py output conform to identifier conventions (372bff1)
+ o Stop referring to an obsolete include guard in bench_http.h (5c0f7e0)
+ o Make the generated event-config.h use correct include guards (639383a)
+ o Fix all identifiers with names beginning with underscore. (cb9da0b)
+ o Make event_rpcgen.py output conform to identifier conventions, more
+ (bcefd24)
+ o Fix some problems introduced by automated identifier cleanup script
+ (c963534)
+ o Have all visible internal function names end with an underscore. (8ac3c4c)
+ o Apply the naming convention to our EVUTIL_IS* functions (c7848fa)
+ o Clean up lingering _identifiers. (946b584)
+ o Fix doxygen to use new macro conventions (da455e9)
+
+ Bugfixes:
+ o Do not use system EAI/AI values if we are not using the system
+ getaddrinfo. (7bcac07)
+
+ Sample Code:
+ o Fix up sample/event-test.c to use newer interfaces and make it
+ actually work. (19bab4f Ross Lagerwall)
+ o On Unix, remove event.fifo left by sample/event-test.c. (c0dacd2 Ross
+ Lagerwall)
+ o Rename event-test.c to event-read-fifo.c. (a5b370a Ross Lagerwall)
+ o event-read-fifo: Use EV_PERSIST appropriately (24dab0b)
+
+
+
+
diff --git a/sntp/libevent/ChangeLog-1.4 b/sntp/libevent/ChangeLog-1.4
new file mode 100644
index 000000000000..166d30872f81
--- /dev/null
+++ b/sntp/libevent/ChangeLog-1.4
@@ -0,0 +1,231 @@
+Changes in 1.4.14b-stable
+ o Set the VERSION_INFO correctly for 1.4.14
+
+Changes in 1.4.14-stable
+ o Add a .gitignore file for the 1.4 branch. (d014edb)
+ o Backport evbuffer_readln(). (b04cc60 Nicholas Marriott)
+ o Make the evbuffer_readln backport follow the current API (c545485)
+ o Valgrind fix: Clear struct kevent before checking for OSX bug. (5713d5d William Ahern)
+ o Fix a crash when reading badly formatted resolve.conf (5b10d00 Yasuoka Masahiko)
+ o Fix memory-leak of signal handler array with kqueue. [backport] (01f3775)
+ o Update sample/signal-test.c to use newer APIs and not leak. (891765c Evan Jones)
+ o Correct all versions in 1.4 branch (ac0d213)
+ o Make evutil_make_socket_nonblocking() leave any other flags alone. (81c26ba Jardel Weyrich)
+ o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). (5f2e250 Jardel Weyrich)
+ o Correct a debug message in evhttp_parse_request_line (35df59e)
+ o Merge branch 'readln-backport' into patches-1.4 (8771d5b)
+ o Do not send an HTTP error when we've already closed or responded. (4fd2dd9 Pavel Plesov)
+ o Re-add event_siglcb; some old code _was_ still using it. :( (bd03d06)
+ o Make Libevent 1.4 build on win32 with Unicode enabled. (bce58d6 Brodie Thiesfield)
+ o Distribute nmake makefile for 1.4 (20d706d)
+ o do not fail while sending on http connections the client closed. (5c8b446)
+ o make evhttp_send() safe against terminated connections, too (01ea0c5)
+ o Fix a free(NULL) in min_heap.h (2458934)
+ o Fix memory leak when setting up priorities; reported by Alexander Drozdov (cb1a722)
+ o Clean up properly when adding a signal handler fails. (ae6ece0 Gilad Benjamini)
+ o Do not abort HTTP requests missing a reason string. (29d7b32 Pierre Phaneuf)
+ o Fix compile warning in http.c (906d573)
+ o Define _REENTRANT as needed on Solaris, elsewhere (6cbea13)
+
+
+Changes in 1.4.13-stable:
+ o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
+ o Do not allocate the maximum event queue and fd array for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 512K per epoll-based event_base. Resolves bug 2839240.
+ o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
+ o Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
+ o Rename our replacement compat/sys/_time.h header to avoid build a conflict on HPUX; reported by Kathryn Hogg.
+ o Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian.
+ o Fix a problem with excessive memory allocation when using multiple event priorities.
+ o When running set[ug]id, don't check the environment. Based on a patch from OpenBSD.
+
+
+Changes in 1.4.12-stable:
+ o Try to contain degree of failure when running on a win32 version so heavily firewalled that we can't fake a socketpair.
+ o Fix an obscure timing-dependent, allocator-dependent crash in the evdns code.
+ o Use __VA_ARGS__ syntax for varargs macros in event_rpcgen when compiler is not GCC.
+ o Activate fd events in a pseudorandom order with O(N) backends, so that we don't systematically favor low fds (select) or earlier-added fds (poll, win32).
+ o Fix another pair of fencepost bugs in epoll.c. [Patch from Adam Langley.]
+ o Do not break evdns connections to nameservers when our IP changes.
+ o Set truncated flag correctly in evdns server replies.
+ o Disable strict aliasing with GCC: our code is not compliant with it.
+
+Changes in 1.4.11-stable:
+ o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
+ o Remove the limit on size of HTTP headers by removing static buffers.
+ o Fix a nasty dangling pointer bug in epoll.c that could occur after epoll_recalc(). [Patch from Kevin Springborn]
+ o Distribute Win32-Code/event-config.h, not ./event-config.h
+
+Changes in 1.4.10-stable:
+ o clean up buffered http connection data on reset; reported by Brian O'Kelley
+ o bug fix and potential race condition in signal handling; from Alexander Drozdov
+ o rename the Solaris event ports backend to evport
+ o support compilation on Haiku
+ o fix signal processing when a signal callback delivers a signal; from Alexander Drozdov
+ o const-ify some arguments to evdns functions.
+ o off-by-one error in epoll_recalc; reported by Victor Goya
+ o include Doxyfile in tar ball; from Jeff Garzik
+ o correctly parse queries with encoded \r, \n or + characters
+
+Changes in 1.4.9-stable:
+ o event_add would not return error for some backends; from Dean McNamee
+ o Clear the timer cache on entering the event loop; reported by Victor Chang
+ o Only bind the socket on connect when a local address has been provided; reported by Alejo Sanchez
+ o Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones.
+ o Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
+ o Fix a typo in setting the global event base; reported by lance.
+ o Fix a memory leak when reading multi-line headers
+ o Fix a memory leak by not running explicit close detection for server connections
+
+Changes in 1.4.8-stable:
+ o Match the query in DNS replies to the query in the request; from Vsevolod Stakhov.
+ o Fix a merge problem in which name_from_addr returned pointers to the stack; found by Jiang Hong.
+ o Do not remove Accept-Encoding header
+
+Changes in 1.4.7-stable:
+ o Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me.
+
+Changes in 1.4.6-stable:
+ o evutil.h now includes <stdarg.h> directly
+ o switch all uses of [v]snprintf over to evutil
+ o Correct handling of trailing headers in chunked replies; from Scott Lamb.
+ o Support multi-line HTTP headers; based on a patch from Moshe Litvin
+ o Reject negative Content-Length headers; anonymous bug report
+ o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report
+ o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail
+ o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov.
+ o Deal with evbuffer_read() returning -1 on EINTR|EAGAIN; from Adam Langley.
+ o Fix a bug in which the DNS server would incorrectly set the type of a cname reply to a.
+ o Fix a bug where setting the timeout on a bufferevent would take not effect if the event was already pending.
+ o Fix a memory leak when using signals for some event bases; reported by Alexander Drozdov.
+ o Add libevent.vcproj file to distribution to help with Windows build.
+ o Fix a problem with epoll() and reinit; problem report by Alexander Drozdov.
+ o Fix off-by-one errors in devpoll; from Ian Bell
+ o Make event_add not change any state if it fails; reported by Ian Bell.
+ o Do not warn on accept when errno is either EAGAIN or EINTR
+
+Changes in 1.4.5-stable:
+ o Fix connection keep-alive behavior for HTTP/1.0
+ o Fix use of freed memory in event_reinit; pointed out by Peter Postma
+ o Constify struct timeval * where possible; pointed out by Forest Wilkinson
+ o allow min_heap_erase to be called on removed members; from liusifan.
+ o Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT. Retain INPUT/OUTPUT aliases on on-win32 platforms for backwards compatibility.
+ o Do not use SO_REUSEADDR when connecting
+ o Fix Windows build
+ o Fix a bug in event_rpcgen when generated fixed-sized entries
+
+Changes in 1.4.4-stable:
+ o Correct the documentation on buffer printf functions.
+ o Don't warn on unimplemented epoll_create(): this isn't a problem, just a reason to fall back to poll or select.
+ o Correctly handle timeouts larger than 35 minutes on Linux with epoll.c. This is probably a kernel defect, but we'll have to support old kernels anyway even if it gets fixed.
+ o Fix a potential stack corruption bug in tagging on 64-bit CPUs.
+ o expose bufferevent_setwatermark via header files and fix high watermark on read
+ o fix a bug in bufferevent read water marks and add a test for them
+ o introduce bufferevent_setcb and bufferevent_setfd to allow better manipulation of bufferevents
+ o use libevent's internal timercmp on all platforms, to avoid bugs on old platforms where timercmp(a,b,<=) is buggy.
+ o reduce system calls for getting current time by caching it.
+ o fix evhttp_bind_socket() so that multiple sockets can be bound by the same http server.
+ o Build test directory correctly with CPPFLAGS set.
+ o Fix build under Visual C++ 2005.
+ o Expose evhttp_accept_socket() API.
+ o Merge windows gettimeofday() replacement into a new evutil_gettimeofday() function.
+ o Fix autoconf script behavior on IRIX.
+ o Make sure winsock2.h include always comes before windows.h include.
+
+Changes in 1.4.3-stable:
+ o include Content-Length in reply for HTTP/1.0 requests with keep-alive
+ o Patch from Tani Hosokawa: make some functions in http.c threadsafe.
+ o Do not free the kqop file descriptor in other processes, also allow it to be 0; from Andrei Nigmatulin
+ o make event_rpcgen.py generate code include event-config.h; reported by Sam Banks.
+ o make event methods static so that they are not exported; from Andrei Nigmatulin
+ o make RPC replies use application/octet-stream as mime type
+ o do not delete uninitialized timeout event in evdns
+
+Changes in 1.4.2-rc:
+ o remove pending timeouts on event_base_free()
+ o also check EAGAIN for Solaris' event ports; from W.C.A. Wijngaards
+ o devpoll and evport need reinit; tested by W.C.A Wijngaards
+ o event_base_get_method; from Springande Ulv
+ o Send CRLF after each chunk in HTTP output, for compliance with RFC2626. Patch from "propanbutan". Fixes bug 1894184.
+ o Add a int64_t parsing function, with unit tests, so we can apply Scott Lamb's fix to allow large HTTP values.
+ o Use a 64-bit field to hold HTTP content-lengths. Patch from Scott Lamb.
+ o Allow regression code to build even without Python installed
+ o remove NDEBUG ifdefs from evdns.c
+ o update documentation of event_loop and event_base_loop; from Tani Hosokawa.
+ o detect integer types properly on platforms without stdint.h
+ o Remove "AM_MAINTAINER_MODE" declaration in configure.in: now makefiles and configure should get re-generated automatically when Makefile.am or configure.in chanes.
+ o do not insert event into list when evsel->add fails
+
+Changes in 1.4.1-beta:
+ o free minheap on event_base_free(); from Christopher Layne
+ o debug cleanups in signal.c; from Christopher Layne
+ o provide event_base_new() that does not set the current_base global
+ o bufferevent_write now uses a const source argument; report from Charles Kerr
+ o better documentation for event_base_loopexit; from Scott Lamb.
+ o Make kqueue have the same behavior as other backends when a signal is caught between event_add() and event_loop(). Previously, it would catch and ignore such signals.
+ o Make kqueue restore signal handlers correctly when event_del() is called.
+ o provide event_reinit() to reintialize an event_base after fork
+ o small improvements to evhttp documentation
+ o always generate Date and Content-Length headers for HTTP/1.1 replies
+ o set the correct event base for HTTP close events
+ o New function, event_{base_}loopbreak. Like event_loopexit, it makes an event loop stop executing and return. Unlike event_loopexit, it keeps subsequent pending events from getting executed. Patch from Scott Lamb
+ o Removed obsoleted recalc code
+ o pull setters/getters out of RPC structures into a base class to which we just need to store a pointer; this reduces the memory footprint of these structures.
+ o fix a bug with event_rpcgen for integers
+ o move EV_PERSIST handling out of the event backends
+ o support for 32-bit tag numbers in rpc structures; this is wire compatible, but changes the API slightly.
+ o prefix {encode,decode}_tag functions with evtag to avoid collisions
+ o Correctly handle DNS replies with no answers set (Fixes bug 1846282)
+ o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o When building with GCC, use the "format" attribute to verify type correctness of calls to printf-like functions.
+ o removed linger from http server socket; reported by Ilya Martynov
+ o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr.
+ o demote most http warnings to debug messages
+ o Fix Solaris compilation; from Magne Mahre
+ o Add a "Date" header to HTTP responses, as required by HTTP 1.1.
+ o Support specifying the local address of an evhttp_connection using set_local_address
+ o Fix a memory leak in which failed HTTP connections would not free the request object
+ o Make adding of array members in event_rpcgen more efficient, but doubling memory allocation
+ o Fix a memory leak in the DNS server
+ o Fix compilation when DNS_USE_OPENSSL_FOR_ID is enabled
+ o Fix buffer size and string generation in evdns_resolve_reverse_ipv6().
+ o Respond to nonstandard DNS queries with "NOTIMPL" rather than by ignoring them.
+ o In DNS responses, the CD flag should be preserved, not the TC flag.
+ o Fix http.c to compile properly with USE_DEBUG; from Christopher Layne
+ o Handle NULL timeouts correctly on Solaris; from Trond Norbye
+ o Recalculate pending events properly when reallocating event array on Solaris; from Trond Norbye
+ o Add Doxygen documentation to header files; from Mark Heily
+ o Add a evdns_set_transaction_id_fn() function to override the default
+ transaction ID generation code.
+ o Add an evutil module (with header evutil.h) to implement our standard cross-platform hacks, on the theory that somebody else would like to use them too.
+ o Fix signals implementation on windows.
+ o Fix http module on windows to close sockets properly.
+ o Make autogen.sh script run correctly on systems where /bin/sh isn't bash. (Patch from Trond Norbye, rewritten by Hagne Mahre and then Hannah Schroeter.)
+ o Skip calling gettime() in timeout_process if we are not in fact waiting for any events. (Patch from Trond Norbye)
+ o Make test subdirectory compile under mingw.
+ o Fix win32 buffer.c behavior so that it is correct for sockets (which do not like ReadFile and WriteFile).
+ o Make the test.sh script run unit tests for the evpoll method.
+ o Make the entire evdns.h header enclosed in "extern C" as appropriate.
+ o Fix implementation of strsep on platforms that lack it
+ o Fix implementation of getaddrinfo on platforms that lack it; mainly, this will make Windows http.c work better. Original patch by Lubomir Marinov.
+ o Fix evport implementation: port_disassociate called on unassociated events resulting in bogus errors; more efficient memory management; from Trond Norbye and Prakash Sangappa
+ o support for hooks on rpc input and output; can be used to implement rpc independent processing such as compression or authentication.
+ o use a min heap instead of a red-black tree for timeouts; as a result finding the min is a O(1) operation now; from Maxim Yegorushkin
+ o associate an event base with an rpc pool
+ o added two additional libraries: libevent_core and libevent_extra in addition to the regular libevent. libevent_core contains only the event core whereas libevent_extra contains dns, http and rpc support
+ o Begin using libtool's library versioning support correctly. If we don't mess up, this will more or less guarantee binaries linked against old versions of libevent continue working when we make changes to libevent that do not break backward compatibility.
+ o Fix evhttp.h compilation when TAILQ_ENTRY is not defined.
+ o Small code cleanups in epoll_dispatch().
+ o Increase the maximum number of addresses read from a packet in evdns to 32.
+ o Remove support for the rtsig method: it hasn't compiled for a while, and nobody seems to miss it very much. Let us know if there's a good reason to put it back in.
+ o Rename the "class" field in evdns_server_request to dns_question_class, so that it won't break compilation under C++. Use a macro so that old code won't break. Mark the macro as deprecated.
+ o Fix DNS unit tests so that having a DNS server with broken IPv6 support is no longer cause for aborting the unit tests.
+ o Make event_base_free() succeed even if there are pending non-internal events on a base. This may still leak memory and fds, but at least it no longer crashes.
+ o Post-process the config.h file into a new, installed event-config.h file that we can install, and whose macros will be safe to include in header files.
+ o Remove the long-deprecated acconfig.h file.
+ o Do not require #include <sys/types.h> before #include <event.h>.
+ o Add new evutil_timer* functions to wrap (or replace) the regular timeval manipulation functions.
+ o Fix many build issues when using the Microsoft C compiler.
+ o Remove a bash-ism in autogen.sh
+ o When calling event_del on a signal, restore the signal handler's previous value rather than setting it to SIG_DFL. Patch from Christopher Layne.
+ o Make the logic for active events work better with internal events; patch from Christopher Layne.
+ o We do not need to specially remove a timeout before calling event_del; patch from Christopher Layne.
diff --git a/sntp/libevent/ChangeLog-2.0 b/sntp/libevent/ChangeLog-2.0
new file mode 100644
index 000000000000..a925d33b180a
--- /dev/null
+++ b/sntp/libevent/ChangeLog-2.0
@@ -0,0 +1,1280 @@
+Changes in version 2.0.21-stable (18 Nov 2012)
+BUGFIXES:
+ o ssl: Don't discard SSL read event when timeout and read come close together (576b29f)
+ o ssl: Stop looping in "consider_reading" if reading is suspended. (f719b8a Joachim Bauch)
+ o ssl: No need to reserve space if reading is suspended. (1acf2eb Joachim Bauch)
+ o dns: Avoid a memory-leak on OOM in evdns. (73e85dd, f2bff75 George Danchev)
+ o build: Use python2 rather than python (0eb0109 Ross Lagerwall)
+ o build: Compile without warnings on mingw64 (94866c2)
+ o build: Fix compilation on mingw64 with -DUSE_DEBUG (62bd2c4)
+ o build: Make rpcgen_wrapper.sh work on systems without a "python2" binary (f3009e4)
+ o iocp: Close IOCP listener socket on free when LEV_OPT_CLOSE_ON_FREE is set (cb853ea Juan Pablo Fernandez)
+ o core: Avoid crash when event_pending() called with no event_base set on event (e3cccf3)
+ o misc: remove stray 'x' so print_err will compile when uncommented (ac35650 Patrick Pelletier)
+ o tests: Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
+ o tests: Warn when openssl version in unit test mismatches compiled version. (ac009f9)
+
+
+Changes in version 2.0.20-stable (23 Aug 2012)
+BUGFIXES:
+ o core: Make event_pending() threadsafe. (be7a95c Simon Liu)
+ o win32: avoid crash when waiting forever on zero fds. (160e58b)
+ o evhttp: Fix a memory leak on error in evhttp_uriencode (11c8b31)
+ o evbuffer: Avoid possible needless call to writev. Found by coverity. (6a4ec5c)
+ o evdns: memset sockaddr_in before using it. Found by coverity. (a1a0e67)
+ o evhttp: Check more setsockopt return values when binding sockets. Found by coverity (a0912e3)
+ o evdns: Avoid segfault on weird timeout during name lookup. (dc32077 Greg Hazel)
+ o bufferevent_ssl: Correctly invoke callbacks when a SSL bufferevent reads some and then blocks. (606ac43)
+
+
+PORTABILITY FIXES:
+ o check for arc4random_buf at runtime, on OS X (bff5f94 Greg Hazel)
+ o Correctly check for arc4random_buf (fcec3e8 Sebastian Hahn)
+ o Add explicit AC_PROG_SED to configure.in so all autoconfs will expose $(SED) (ca80ea6)
+
+BUILD FIXES:
+ o Add GCC annotations so that the vsprintf functions get checked properly (117e327)
+ o Fix an unused variable warning on *BSD. (c0720c1)
+
+UNIT TEST FIXES:
+ o Fix a couple of memory leaks (found with Valgrind). (3b2529a Ross Lagerwall)
+ o Remove deadcode in http regression tests. Found by coverity. (5553346)
+ o Fix possible uninitialized read in dns regression tests. Found by coverity. (2259777)
+ o Set umask before calling mkstemp in unit tests. Found by coverity (f1ce15d)
+ o Fix various check-after-dereference issues in unit tests: found by coverity (4f3732d)
+ o Fix resource leaks in the unit tests; found by coverity (270f279)
+ o Add some missing null checks to unit tests; found by coverity (f021c3d)
+ o Avoid more crashes/bad calls in unit tests; found by coverity (3cde5bf)
+ o Remove unused variable; spotted by coverity (6355b2a)
+ o Add checks to various return values in unit tests. Found by coverity (b9e7329)
+ o Move assignment outside tt_assert in ssl unit tests. Appeases coverity. (a2006c0)
+
+
+
+Changes in version 2.0.19-stable (3 May 2012)
+BUGFIXES (CORE):
+ o Refactor event_persist_closure: raise and extract some common logic (bec22b4)
+ o If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead (dfd808c)
+ o If a higher-priority event becomes active, don't continue running events of the current priority. (2bfda40)
+
+BUGFIXES (SSL):
+ o Fixed potential double-readcb execution with openssl bufferevents. (4e62cd1 Mark Ellzey)
+
+BUGFIXES (DNS):
+ o Cancel a probe request when the server is freed, and ignore cancelled probe callbacks (94d2336 Greg Hazel)
+ o Remove redundant DNS_ERR_CANCEL check, move comment (46b8060 Greg Hazel)
+ o When retransmitting a timed-out DNS request, pick a fresh nameserver. (3d9e52a)
+
+DOCUMENTATION FIXES:
+ o Fix a typo in the bufferevent documentation (98e9119)
+ o Add missing ) to changelog; spotted by rransom (4c7ee6b)
+ o Fix the website URL in the readme (f775521)
+
+COMPILATION FIXES:
+ o Fix a compilation error with MSVC 2005 due to use of mode_t (336dcae)
+ o Configure with gcc older than 2.95 (4a6fd43 Sebastian Hahn)
+ o Generate event-config.h with a single sed script (30b6f88 Zack Weinberg)
+
+FORWARD-COMPATIBILITY:
+ o Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_* (d1a03b2)
+
+TESTING/DEBUGGING SUPPORT:
+ o dns-example.c can now take a resolv.conf file on the commandline (6610fa5)
+ o Make some evdns.c debug logs more verbose (d873d67)
+ o Work-around a stupid gcov-breaking bug in OSX 10.6 (b3887cd)
+
+
+
+Changes in version 2.0.18-stable (22 Mar 2012)
+BUGFIXES (core):
+ o Make uses of open() close-on-exec safe by introducing an internal evutil_open_closeonexec. (d2b5f72 Ross Lagerwall, 03dce42)
+
+BUGFIXES (kqueue):
+ o Properly zero the kevent in kq_setup_kevent() (c2c7b39 Sebastian Hahn)
+
+BUILD FIXES:
+ o Added OPENSSL_LDFLAGS env variable which is appended to SSL checks. (9278196 Mark Ellzey)
+ o Changed OPENSSL_LDFLAGS to OPENSSL_LIBADD (2d67b63 Mark Ellzey)
+ o Don't do clang version detection when disabling some flags (083296b Sebastian Hahn)
+
+BUGFIXES (dns):
+ o Stop crashing in evdns when nameserver probes give a weird error (bec5068)
+
+
+Changes in version 2.0.17-stable (10 Feb 2012)
+
+BUGFIXES (core):
+ o Be absolutely sure to clear pncalls before leaving event_signal_closure (11f36a5)
+ o check for sysctl before we use it (358c745 Mike Frysinger)
+ o Remove bogus casts of socket to int before calling ev_callback (f032516)
+ o Make evconnlistener work around bug in older Linux when getting nmapped (ecfc720)
+ o Fix a list corruption bug when using event_reinit() with signals present (6e41cdc)
+ o Fix a fd leak in event_reinit() (3f18ad1)
+ o Do a memberwise comparison of threading function tables (c94a5f2 Nate R)
+ o Use C-style comments in C source files (for compatibility with compilers such as xlc on AIX). (d84d917 Greg Hewgill)
+ o Avoid crash when freeing event_iocp and using event_set_mem_functions (19715a6)
+ o In the kqueue backend, do not report EBADF as an EV_READ (5d7bfa1 Nicholas Marriott)
+
+BUGFIXES (evbuffer and bufferevents):
+ o Fix behavior of evbuffer_peek(buf,-1,NULL,NULL,0) (c986f23 Zack Weinberg)
+ o Loop on filtering SSL reads until we are blocked or exhausted. (5b4b812)
+
+BUGFIXES (evhttp):
+ o Force strict validation of HTTP version in response. (790f6b3 Catalin Patulea)
+
+BUGFIXES (evdns):
+ o evdns: fix a bug in circular-queue implementation (d6094b1)
+
+BUILD FIXES:
+ o Fix a silly compilation error with the sun compiler (1927776 Colin Watt)
+ o Suppress a gcc warning from ignoring fwrite return in http-sample.c (7206e8c)
+
+DOCUMENTATION FIXES:
+ o Slightly clarify evbuffer_peek documentation (7bbf6ca)
+ o Update copyright notices to 2012 (e49e289)
+
+NEW APIS:
+ o Backport evhttp_connection_get_bufferevent to Libevent 2.0 (da70fa7 Arno Bakker)
+
+TESTS AND TEST FIXES:
+ o Fix a race condition in the dns/bufferevent_connect_hostname test. (cba48c7)
+ o Add function to check referential integrity of an event_base (27737d5)
+ o Check event_base correctness at end of each unit test (3312b02)
+ o Workaround in the unit tests for an apparent epoll bug in Linux 3.2 (dab9187)
+ o Better workaround for Linux 3.2 edge-triggered epoll bug (9f9e259)
+
+Changes in version 2.0.16-stable (18 Nov 2011)
+BUGFIXES (core):
+ o More detailed message in case of libevent self-debugging failure. (9e6a4ef Leonid Evdokimov)
+ o epoll: close fd on alloc fail at initialization (1aee718 Jamie Iles)
+ o Fix compile warning from saying event2/*.h inside a comment (447b0ba)
+ o Warn when unable to construct base because of failing make_base_notifiable (4e797f3)
+ o Don't try to make notifiable event_base when no threading fns are configured (e787413)
+
+BUGFIXES (evbuffer):
+ o unit test for remove_buffer bug (90bd620 Greg Hazel)
+ o Fix an evbuffer crash in evbuffer_remove_buffer() (c37069c)
+
+BUGFIXES (bufferevent_openssl):
+ o Refactor amount-to-read calculations in buffervent_ssl consider_reading() (a186e73 Mark Ellzey)
+ o Move SSL rate-limit enforcement into bytes_to_read() (96c562f)
+ o Avoid spinning on OpenSSL reads (2aa036f Mark Ellzey)
+
+BUGFIXES (dns)
+ o Empty DNS reply with OK status is another way to say NODATA. (21a08d6 Leonid Evdokimov)
+
+TESTING:
+ o Tests for 94fba5b and f72e8f6 (d58c15e Leonid Evdokimov)
+ o Test for commit aff6ba1 (f7841bf Leonid Evdokimov)
+ o Style and comment tweaks for dns/leak* tests (5e42202)
+ o improve test to remove at least one buffer from src (7eb52eb Greg Hazel)
+
+DOCUMENTATION:
+ o Add note about evhttp_send_reply_end to its doxygen (724bfb5)
+ o Update copyright dates to 2011. (3c824bd)
+ o Fix typo in whatsnew-2.0.txt (674bc6a Mansour Moufid)
+ o Improve win32 behavior of dns-sample.c code (a3f320e Gisle Vanem)
+
+
+
+Changes in version 2.0.15-stable (12 Oct 2011)
+BUGFIXES (DNS):
+ o DNS: add ttl for negative answers using RFC 2308 idea. (f72e8f6 Leonid Evdokimov)
+ o Add DNS_ERR_NODATA error code to handle empty replies. (94fba5b Leonid Evdokimov)
+
+BUFGIXES (bufferevents and evbuffers):
+ o Make evbuffer callbacks get the right n_added value after evbuffer_add (1ef1f68 Alex)
+ o Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL. (0ba0af9)
+
+BUGFIXES (event loop):
+ o When a signal callback is activated to run multiple times, allow event_base_loopbreak to work even before they all have run. (4e8eb6a)
+
+DOCUMENTATION FIXES:
+ o Fix docstring in dns.h (2b6eae5 Leonid Evdokimov)
+ o refer to non-deprecated evdns functions in comments (ba5c27d Greg Hazel)
+
+BUILD AND TESTING FIXES:
+ o le-proxy and regress depend on openssl directly (9ae061a Sergey Avseyev)
+ o Use _SOURCES, not _sources, in sample/Makefile.am (7f82382)
+ o Fixed compiler warnings for unchecked read/write calls. (c3b62fd Mark Ellzey)
+ o Make write-checking fixes use tt_fail_perror (2b76847)
+ o Fix some "value never used" warnings with gcc 4.6.1 (39c0cf7)
+
+
+
+Changes in version 2.0.14-stable (31 Aug 2011)
+BUGFIXES (bufferevents and evbuffers):
+ o Propagate errors on the underlying bufferevent to the user. (4a34394 Joachim Bauch)
+ o Ignore OpenSSL deprecation warnings on OS X (5d1b255 Sebastian Hahn)
+ o Fix handling of group rate limits under 64 bytes of burst (6d5440e)
+ o Solaris sendfile: correctly detect amount of data sent (643922e Michael Herf)
+ o Make rate limiting work with common_timeout logic (5b18f13)
+ o clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes (54f7e61 Joachim Bauch)
+
+BUGFIXES (IOCP):
+ o IOCP: don't launch reads or writes on an unconnected socket (495c227)
+ o Make IOCP rate-limiting group support stricter and less surprising. (a98da7b)
+ o Have test-ratelim.c support IOCP (0ff2c5a)
+ o Make overlapped reads result in evbuffer callbacks getting invoked (6acfbdd)
+ o Correctly terminate IO on an async bufferevent on bufferevent_free (e6af35d)
+
+BUGFIXES (other):
+ o Fix evsig_dealloc memory leak with debugging turned on. (9b724b2 Leonid Evdokimov)
+ o Fix request_finished memory leak with debugging turned on. (aff6ba1 Leonid Evdokimov)
+
+BUILD AND TESTING FIXES:
+ o Allow OS-neutral builds for platforms where some versions have arc4random_buf (b442302 Mitchell Livingston)
+ o Try to fix 'make distcheck' errors when building out-of-tree (04656ea Dave Hart)
+ o Clean up some problems identified by Coverity. (7c11e51 Harlan Stenn)
+
+
+Changes in version 2.0.13-stable (18 Jul 2011)
+BUGFIXES
+ o Avoid race-condition when initializing global locks (b683cae)
+ o Fix bug in SSL bufferevents backed by a bev with a write high-watermarks (e050703 Joachim Bauch)
+ o Speed up invoke_callbacks on evbuffers when there are no callbacks (f87f568 Mark Ellzey)
+ o Avoid a segfault when all methods are disabled or broken (27ce38b)
+ o Fix incorrect results from evbuffer_search_eol(EOL_LF) (4461f1a)
+ o Add some missing checks for mm_calloc failures (89d5e09)
+ o Replace an assertion for event_base_free(NULL) with a check-and-warn (09fe97d)
+ o Report kqueue ebadf, epipe, and eperm as EV_READ events (1fd34ab)
+ o Check if the `evhttp_new_object' function in `http.c' returns NULL. (446cc7a Mansour Moufid)
+ o Use the correct printf args when formatting size_t (3203f88)
+ o Complain if the caller tries to change threading cbs after setting them (cb6ecee)
+
+DOCUMENTATION FIXES AND IMPROVEMENTS
+ o Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy (2888fac)
+ o Update Doxyfile to produce more useful output (aea0555)
+
+TEST FIXES
+ o Fix up test_evutil_snprintf (caf695a)
+ o Fix tinytest invocation from windows shell (57def34 Ed Day)
+
+BUILD FIXES
+ o Use AM_CPPFLAGS in sample/Makefile.am, not AM_CFLAGS (4a5c82d)
+ o Fix select.c compilation on systems with no NFDBITS (49d1136)
+ o Fix a few warnings on OpenBSD (8ee9f9c Nicholas Marriott)
+ o Don't break when building tests from git without python installed (b031adf)
+ o Don't install event_rpcgen.py when --disable-libevent-install is used (e23cda3 Harlan Stenn)
+ o Fix AIX build issue with TAILQ_FOREACH definition (e934096)
+
+
+Changes in version 2.0.12-stable (4 Jun 2011)
+BUGFIXES
+ o Fix a warn-and-fail bug in kqueue by providing kevent() room to report errors (28317a0)
+ o Fix an assert-inducing fencepost bug in the select backend (d90149d)
+ o Fix failing http assertion introducd in commit 0d6622e (0848814 Kevin Ko)
+ o Fix a bug that prevented us from configuring IPv6 nameservers. (74760f1)
+ o Prevent size_t overflow in evhttp_htmlescape. (06c51cd Mansour Moufid)
+ o Added several checks for under/overflow conditions in evhttp_handle_chunked_read (a279272 Mark Ellzey)
+ o Added overflow checks in evhttp_read_body and evhttp_get_body (84560fc Mark Ellzey)
+
+DOCUMENTATION:
+ o Add missing words to EVLOOP_NONBLOCK documentation (9556a7d)
+
+BUILD FIXES
+ o libssl depends on libcrypto, not the other way around. (274dd03 Peter Rosin)
+ o Libtool brings in the dependencies of libevent_openssl.la automatically (7b819f2 Peter Rosin)
+ o Use OPENSSL_LIBS in Makefile.am (292092e Sebastian Hahn)
+ o Move the win32 detection in configure.in (ceb03b9 Sebastian Hahn)
+ o Correctly detect openssl on windows (6619385 Sebastian Hahn)
+ o Fix a compile warning with zlib 1.2.4 and 1.2.5 (5786b91 Sebastian Hahn)
+ o Fix compilation with GCC 2, which had no __builtin_expect (09d39a1 Dave Hart)
+ o Fix new warnings from GCC 4.6 (06a714f)
+ o Link with -lshell32 and -ladvapi32 on Win32. (86090ee Peter Rosin)
+ o Make the tests build when OpenSSL is not available. (07c41be Peter Rosin)
+ o Bring in the compile script from automake, if needed. (f3c7a4c Peter Rosin)
+ o MSVC does not provide S_ISDIR, so provide it manually. (70be7d1 Peter Rosin)
+ o unistd.h and sys/time.h might not exist. (fe93022 Peter Rosin)
+ o Make sure TINYTEST_LOCAL is defined when building tinytest.c (8fa030c Peter Rosin)
+ o Fix winsock2.h #include issues with MSVC (3d768dc Peter Rosin)
+ o Use evutil_gettimeofday instead of relying on the system gettimeofday. (0de87fe Peter Rosin)
+ o Always use evutil_snprintf, even if OS provides it (d1b2d11 Sebastian Hahn)
+ o InitializeCriticalSectionAndSpinCount requires _WIN32_WINNT >= 0x0403. (816115a Peter Rosin)
+ o cygwin: make it possible to build DLLs (d54d3fc)
+
+
+
+Changes in version 2.0.11-stable (27 Apr 2011)
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+BUGFIXES:
+ o Fix evport handling of POLLHUP and POLLERR (b42ce4b)
+ o Fix compilation on Windows with NDEBUG (cb8059d)
+ o Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports (0144886 Trond Norbye)
+ o Detect and handle more allocation failures. (666b096 Jardel Weyrich)
+ o Use event_err() only if the failure is truly unrecoverable. (3f8d22a Jardel Weyrich)
+ o Handle resize failures in the select backend better. (83e805a)
+ o Correctly free selectop fields when select_resize fails in select_init (0c0ec0b)
+ o Make --enable-gcc-warnings a no-op if not using gcc (3267703)
+ o Fix a type error in our (unused) arc4random_stir() (f736198)
+ o Correctly detect and stop non-chunked http requests when the body is too long (63a715e)
+ o Have event_base_gettimeofday_cached() always return wall-clock time (a459ef7)
+ o Workaround for http crash bug 3078187 (5dc5662 Tomash Brechko)
+ o Fix incorrect assertions and possible use-after-free in evrpc_free() (4b8f02f Christophe Fillot)
+ o Reset outgoing http connection when read data in idle state. (272823f Tomash Brechko)
+ o Fix subtle recursion in evhttp_connection_cb_cleanup(). (218cf19 Tomash Brechko)
+ o Fix the case when failed evhttp_make_request() leaved request in the queue. (0d6622e Tomash Brechko)
+ o Fix a crash bug in evdns server circular list code (00e91b3)
+ o Handle calloc failure in evdns. (Found by Dave Hart) (364291e)
+ o Fix a memory leak on win32 socket->event map. (b4f89f0)
+ o Add a forgotten NULL check to evhttp_parse_headers (12311ff Sebastian Hahn)
+ o Fix possible NULL-deref in evdns_cancel_request (5208544 Sebastian Hahn)
+
+PORTABILITY:
+ o Fall back to sscanf if we have no other way to implement strtoll (453317b)
+ o Build correctly on platforms without sockaddr_storage (9184563)
+ o Try to build correctly on platforms with no IPv6 support (713c254)
+ o Build on systems without AI_PASSIVE (cb92113)
+ o Fix http unit test on non-windows platforms without getaddrinfo (6092f12)
+ o Do not check for gethostbyname_r versions if we have getaddrinfo (c1260b0)
+ o Include arpa/inet.h as needed on HPUX (10c834c Harlan Stenn)
+ o Include util-internal.h as needed to build on platforms with no sockaddr_storage (bbf5515 Harlan Stenn)
+ o Check for getservbyname even if not on win32. (af08a94 Harlan Stenn)
+ o Add -D_OSF_SOURCE to fix hpux builds (0b33479 Harlan Stenn)
+ o Check for allocation failures in apply_socktype_protocol_hack (637d17a)
+ o Fix the check for multicast or broadcast addresses in evutil_check_interfaces (1a21d7b)
+ o Avoid a free(NULL) if out-of-memory in evdns_getaddrinfo. Found by Dave Hart (3417f68)
+
+DEFENSIVE PROGRAMMING:
+ o Add compile-time check for AF_UNSPEC==PF_UNSPEC (3c8f4e7)
+
+BUGS IN TESTS:
+ o Fix test.sh output on solaris (b4f89b6 Dave Hart)
+ o Make test-eof fail with a timeout if we never get an eof. (05a2c22 Harlan Stenn)
+ o Use %s with printf in test.sh (039b9bd)
+ o Add an assert to appease clang's static analyzer (b0ff7eb Sebastian Hahn)
+ o Add a forgotten return value check in the unit tests (3819b62 Sebastian Hahn)
+ o Actually send NULL request in http_bad_request_test (b693c32 Sebastian Hahn)
+ o add some (void) casts for unused variables (65707d7 Sebastian Hahn)
+ o Refactor test_getaddrinfo_async_cancel_stress() (48c44a6 Sebastian Hahn)
+ o Be nice and "handle" error return values in sample code (4bac793 Sebastian Hahn)
+ o Check return value of evbuffer_add_cb in tests (93a1abb Sebastian Hahn)
+ o Remote some dead code from dns-example.c (744c745 Sebastian Hahn)
+ o Zero a struct sockaddr_in before using it (646f9fe Sebastian Hahn)
+
+BUILD FIXES:
+ o Fix warnings about AC_LANG_PROGRAM usage (f663112 Sebastian Hahn)
+ o Skip check for zlib if we have no zlib.h (a317c06 Harlan Stenn)
+ o Fix autoconf bracket issues; make check for getaddrinfo include netdb.h (833e5e9 Harlan Stenn)
+ o Correct an AM_CFLAGS to an AM_CPPFLAGS in test/Makefile.am (9c469db Dave Hart)
+ o Fix make distcheck & installation of libevent 1 headers (b5a1f9f Dave Hart)
+ o Fix compilation under LLVM/clang with --enable-gcc-warnings (ad9ff58 Sebastian Hahn)
+
+FEATURES:
+ o Make URI parser able to tolerate nonconformant URIs. (95060b5)
+
+DOCUMENTATION:
+ o Clarify event_set_mem_functions doc (926f816)
+ o Correct evhttp_del_accept_socket documentation on whether socket is closed (f665924)
+ o fix spelling mistake in whatsnew-2.0.txt (deb2f73)
+ o Fix sample/http-server ipv6 fixes (eb692be)
+ o Comment internal headers used in sample code. (4eb281c)
+ o Be explicit about how long event loops run in event.h documentation (f95bafb)
+ o Add comment to configure.in to explain gc-sections test logic (c621359)
+ o Fix a couple of memory leaks in samples/http-server.c. Found by Dave Hart. (2e9f665)
+
+BUILD IMPROVEMENTS:
+ o Use the gcc -ffunction-segments feature to allow gc when linking with static libevent (0965c56 Dave Hart)
+ o Add configure options to disable installation, regression tests (49e9bb7 Dave Hart)
+
+
+
+Changes in version 2.0.10-stable (16 Dec 2010)
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+BUGFIXES
+ o Minor fix for IOCP shutdown handling fix (2599b2d Kelly Brock)
+ o Correctly notify the main thread when activating an event from a subthread (5beeec9)
+ o Reject overlong http requests early when Expect:100-continue is set (d23839f Constantine Verutin)
+ o EVUTIL_ASSERT: Use sizeof() to avoid "unused variable" warnings with -DNDEBUG. (b63ab17 Evan Jones)
+
+CODE CLEANUPS
+ o bufferevent-internal.h: Use the new event2/util.h header, not evutil.h (ef5e65a Evan Jones)
+ o Use relative includes instead of system includes consistently. (fbe64f2 Evan Jones)
+ o Make whitespace more consistent
+
+TESTING
+ o tests: Use new event2 headers instead of old compatibility headers. (4f33209 Evan Jones)
+
+DOCUMENTATION
+ o Document that the cpu_hint is only used on Windows with IOCP for now (57689c4)
+ o Add stuff to "whats new in 2.0" based on reading include changes since August. (18adc3f)
+
+
+Changes in 2.0.9-rc (30 Nov 2010):
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+NEW AND MODIFIED APIs
+ o Add a function to change a listener's callback. (46ee061)
+ o Make evbuffer_add_file take ev_off_t, not off_t (ac7e52d)
+ o Make rate-limits go up to SIZE_MAX/EV_SSIZE_MAX, not just INT32_MAX (2cbb1a1)
+ o Add a bufferevent_get_base function (aab49b6)
+
+MAJOR BUGFIXES
+ o Disable changelist for epoll by default because of Linux dup() bug; add an option and/or an envvar to reenable it for speed. (9531763)
+ o Fix a 100%-CPU bug where an SSL connection would sometimes never stop trying to write (1213d3d)
+ o Fix a nasty bug related to use of dup() with epoll on Linux (c281aba)
+ o Fix bugs in posix thread-id calculation when sizeof(pthread_t) != sizeof(long) (fbaf077)
+ o Fix some ints to evutil_socket_t; make tests pass on win64. (f817bfa Dimitre Piskyulev)
+ o Set _EVENT_SIZEOF_VOID_P correctly on win32 and win64 (1ae82cd Dimitre Piskyulev)
+ o Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL (abf01ed)
+ o Set SO_UPDATE_ACCEPT_CONTEXT on sockets from AcceptEx so that shutdown() can work (52aa419)
+ o When closing a filtering bufferevent, clear callbacks on the underlying bufferevent (fc7b1b0)
+
+NEW AND MODIFIED HTTP APIs
+ o Add evhttp_parse_query_str to be used with evhttp_uri_parse. (2075fbc)
+ o Add evhttp_response_code to remove one more reason to include http_struct.h (22e0a9b)
+ o Define enumerators for all HTTP methods, including PATCH from RFC5789 (75a7341 Felix Nawothnig)
+ o Functions to actually use evhttp_bound_socket with/as evconnlistener. (006efa7)
+ o Add evhttp_request_get_command so code can tell GET from POST without peeking at the struct. (49f4bf7)
+ o Introduce absolute URI parsing helpers. (86dd720 Pavel Plesov)
+ o Revise evhttp_uri_parse implementation to handle more of RFC3986 (eaa5f1d)
+ o Add evhttp_connection_get_base() to get the event_base from an http connection (cd00079)
+ o Let evhttp_parse_query return -1 on failure (b1756d0)
+ o New evhttp_uri(encode|decode) functions to handle + and NUL characters right (a8148ce)
+ o Add evhttp_response_code to remove one more reason to include http_struct.h (22e0a9b)
+ o Tweak interface for allowed methods (f5b391e)
+ o Add evhttp server alias interface, correct flagging of proxy requests. (aab8c38 Christopher Davis)
+
+HTTP BUGFIXES
+ o Add some comments to http.c and make a few functions static. (90b3ed5)
+ o Fix Content-Length when trying send more than 100GB of data (!) on an evhttp. (525da3e)
+ o Fix a bug where we would read too much data in HTTP bodies or requests. (58a1cc6)
+ o Correctly count req->body_size on http usage without Content-Length (8e342e5)
+ o Avoid missed-request bug when entire http request arrives before data is flushed (74c0e86)
+ o reset "chunked" flag when sending non-chunked reply (aa5f55f Joachim Bauch)
+ o evhttp_encode_uri encodes all reserved characters, including !$'()*+,/:=@ (2e63a60)
+ o Replace exact-version checks for HTTP/1.1 with >= or < checks (647e094)
+ o evhttp: Return 501 when we get an unrecognized method, not 400. (536311a)
+ o Don't disable reading from the HTTP connection after sending the request to be notified of connection-close in time (c76640b Felix Nawothnig)
+ o Never call evhttp_readcb while writing. (0512487)
+ o Try to fix an assertion failure related to close detection (0faaa39)
+ o Correctly detect timeouts during http connects (04861d5)
+ o Preliminary support for Continue expectation in evhttp. (fa9305f Christopher Davis)
+
+OTHER BUGFIXES
+ o Correct logic for realigning a chain in evbuffer_add (e4f34e8)
+ o Fix a minor syntax error that most compilers didn't care about (e56ff65)
+ o Fix some uses of int for socket in regress (5d389dc)
+ o Check return value for ioctlsocket on win32 (f5ad31c Trond Norbye)
+ o Fix som event_warns that should have been event_warnx (19c71e7)
+ o Fix signal handler types for win64. (b81217f)
+ o Try to clear up more size_t vs int/long issues. (598d133)
+ o Make sure IOCP evconnlistener uses virtual events. (7b40a00 Christopher Davis)
+ o Don't free evdns_request handles until after the callback is invoked (9ed30de)
+ o Fix some more cancel-related bugs in getaddrinfo_async (c7cfbcf)
+ o Make evdns_getaddrinfo_cancel threadsafe (d51b2fc)
+ o Only clear underlying callbacks when the user hasn't reset them. (1ac5b23)
+ o Fix bug in bufferevent_connect on an openssl bufferevent that already had an fd (4f228a1)
+ o Resolve an evport bug in the thread/forking test (3a67d0b)
+ o Make sure the CLOEXEC flag is set on fds we open for base notification (3ab578f)
+ o Fix IRIX build. sa_family collides with a #define in sys/socket.h on IRIX. (e874982 Kevin Bowling)
+ o If not WIN32, include <sys/socket.h> in event2/util.h. (1cd45e5 Kevin Bowling)
+ o Fix some C99-style comments to work with the xlC compiler. (c2e5e22 Kevin Bowling)
+ o Add some checks since lack of TAILQ_FOREACH doesn't imply lack of FIRST, END, NEXT, or INSERT_BEFORE. Quiet some warnings in XL C. (c4dc335 Kevin Bowling)
+ o Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER. (2e2a3d7 Kevin Bowling)
+ o Take select from <sys/select.h> when testing in autoconf. AIX build fix. (a3a9f6b Kevin Bowling)
+ o Fix snprintf related failures on IRIX. (3239073 Kevin Bowling)
+ o Remove _event_initialized(); make event_initialized() a function(); make it consistent on windows and non-windows (652024b)
+ o Do not let EVLOOP_ONCE exit the loop until all deferred callbacks have run (2d5e1bd)
+ o Make EVLOOP_ONCE ignore internal events (0617a81)
+ o Possible crash fix when freeing an underlying bufferevent of an openssl bufferevent (29f7623)
+
+HTTP CLEANUPS
+ o Stop using Libevent-1 headers in regress_http (1f507d7)
+ o Modernize header usage in bench_http.c (e587069)
+ o fix signed/unsigned warnings in http.c (74a91e5)
+ o Update the HTTP regression tests to use Libevent2 apis for non-http stuff (d9ffa89)
+ o Start porting http tests to not use legacy interfaces (8505a74)
+ o Convert the rest of the http tests to be non-legacy unit tests. (9bb8239)
+ o Rename the confusing "base" static variable in regress_http.c (353402a)
+ o Stop accessing http request struct directly from in the unit tests. (0b137f4)
+ o Refactor http version parsing into a single function (a38140b)
+
+TESTING
+ o Improvements to tinytest_macros.h (ad923a1)
+ o Add a huge pile of tests for the new URI functions, and make them pass. (a5a76e6)
+ o Unit tests for evhttp_uri_set* (bc98f5e)
+ o Increase the skew tolerance to 2 seconds in thread/deferred_cb_skew (f806476 Christopher Davis)
+ o Reorder backends in test.sh to match preference order in event.c (ece974f)
+ o Add a stress test for getaddrinfo_cancel (da1bf52)
+ o Units test for unexpected evhttp methods. (75e3320)
+
+DOCUMENTATION
+ o Document behavior of URI parsing more thoroughly. (3a33462)
+ o Document that two bufferevent functions only work on socket bufferevents (70e1b60)
+ o add a requested docstring for event_rpcgen.CommandLine.__init__ (f1250eb)
+ o Fix a mistake in http documentation found by Julien Blache (229714d)
+ o Add a basic example of how to write a static HTTP server. (4e794d5)
+ o Document event_get_assignment (88be27d)
+ o Note that reentrant calls to libevent from logging cbs may fail badly (e431bcd)
+ o Clarify EVLOOP_* documentation to be more precise. (057a514)
+
+CLEANUPS
+ o Simplify the logic for choosing EPOLL_CTL_ADD vs EPOLL_CTL_MOD (2c66983)
+ o Rename "size" variables in win32select that were really fd counts. (b6a158c)
+ o Fix even more win64 warnings (7484df6)
+ o Fix even more win64 warnings: buffer, event_tagging, http, evdns, evrpc (545a611)
+ o Fix more wn64 warnings. (34b84b9 Christopher Davis)
+ o Use the label_len local variable in evdns instead of recalculating it over and over (ba01456)
+ o Fix some irix compilation warnings spotted by Kevin Bowling (7bcace2)
+
+
+
+Changes in 2.0.8-rc (14 Oct 2010):
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+NEW APIS
+ o Add error callback to evconnlistener (c4be8d8 Simon Perreault)
+ o Add a LEV_OPT_THREADSAFE option for threadsafe evconnlisteners (127d4f2)
+
+CHANGED BEHAVIOR
+ o Correct logic on disabling underlying bufferevents when disabling a filter (ac27eb8)
+
+BUGFIXES
+ o Obey enabled status when unsuspending (040a019 Simon Perreault)
+ o Warn when using the error-prone EV_SIGNAL interface in an error-prone way. Also, fix a couple of race conditions in signal.c (720bd93)
+ O Make default signal backend fully threadsafe (95a7d41)
+ o Put internal events at highest priority (90651b3)
+ o Fix warnings in the main codebase flagged by -Wsigned-compare (9c8db0, 5e4bafb, 5c214a, 6be589a, e06f514)
+ o Fix compile in kqueue.c (b395392 Sebastian Hahn)
+ o Do not search outside of the system directory for windows DLLs (d49b5e3)
+ o Fix a spurious-call bug on epoll.c (0faaee0)
+ o Send a shutdown(SHUT_WR) before closing an http connection (e0fd870 Christopher Davis)
+ o Fix warnings on mingw with gcc 4.5 (5b7a370)
+ o Fix an EINVAL on evbuffer_write_iovec on OpenSolaris. (fdc640b)
+ o Fix allocation error for IOCP listeners. Probably harmless, since struct event is big (481ef92)
+ o Make iocp/listener/error work; don't accept again if lev is disabled. (62b429a Christopher Davis)
+ o Handle rate-limiting for reading on OpenSSL bufferevents correctly. (819b171)
+ o Fix serious bugs in per-bufferevent rate-limiting code (34d64f8)
+ o Avoid spurious reads from just-created open openssl bufferevents (223ee40)
+ o Fix a case where an ssl bufferevent with CLOSE_ON_FREE didn't close its fd (93bb7d8)
+ o The corrected bufferevent filter semantics let us fix our openssl tests (34331e4)
+
+TESTING
+ o Make SSL tests cover enabling/disabling EV_READ. (a5ce9ad)
+ o Bump to the latest version of tinytest (f0bd83e)
+ o Unit tests for listener error callbacks (045eef4)
+ o New unit test for ssl bufferevents starting with connected SSLs. (02f6259)
+
+DEBUGGABILITY
+ o Make debugging output for epoll backend more comprehensive (ec2b05e)
+ o Make event.c debugging messages report fds (e119899)
+ o Make the --enable-gcc-warnings option include signed comparison warnings (d3b096c)
+
+DEADCODE REMOVAL
+ o Remove the now-useless evsig_caught and evsig_process (4858b79)
+ o Remove event_base.evsigbase; nothing used it. (38d0960)
+
+
+
+Changes in 2.0.7-rc (9 Sep 2010):
+ [Autogenerated from the Git log, sorted and cleaned by hand.]
+NEW APIS
+ o Expose a evdns_base_nameserver_sockaddr_add() function to add a nameserver by sockaddr (1952143)
+ o Add event_config_set_num_cpus_hint() for tuning win32 IOCP thread pools, etc. (2447fe8 Christopher Davis)
+
+BUGFIXES
+ o Fix a nasty dangling-event bug when using rate-limiting groups (0bffe43)
+ o Clean up syntax on TAILQ_ENTRY() usage to build correctly with recent MSVC (60433a0 Gilad Benjamini)
+ o Make definition of WIN32_LEAN_AND_MEAN in event.h conditional (3920172 Gilad Benjamini)
+ o Correctly detect failure to delete bufferevent read-timeout event (da6e7cd)
+ o Set close-on-exec bit for filedescriptors created by dns subsystem (d0b8843)
+ o Fix kqueue correctness test on x84_64 (6123d12)
+ o Detect events with no ev_base; warn instead of crashing (f1074b7)
+ o Fix an issue with forking and signal socketpairs in select/poll backends (d61b2f3)
+ o Stop using global arrays to implement the EVUTIL_ctype functions (1fdec20)
+ o On windows, make lock/thread function tables static (5de2bcb)
+ o Close th_notify_fds and open a new pair on reinit (495ed66)
+ o Declare signal handler function as "__cdecl" on Windows (f0056d0)
+ o Use the _func() replacements for open, fstat, etc in evutil.c on win32 (e50c0fc)
+ o Only process up to MAX_DEFERRED deferred_cbs at a time (17a14f1 Christopher Davis)
+
+THREADING BUGFIXES
+ o Avoid deadlock when activating signals (970e6ad)
+ o Add a condition variable backend, with implementations for pthreads and win32 (d4977b5)
+ o Use conditions instead of current_event_lock to fix a deadlock (e0972c2)
+ o Fix logic error in win32 TRY_LOCK that caused problems with rate-limiting (4c32b9d)
+ o Avoid needlessly calling evthread_notify_base() when the loop is not running (c7a06bf)
+ o Minimize calls to base_notify implementation functions, thereby avoiding needless syscalls (4632b78)
+
+IOCP BUGFIXES
+ o IOCP-related evbuffer fixes (03afa20 Christopher Davis)
+ o Stop IOCP when freeing the event_base (d844242 Christopher Davis)
+ o Some IOCP bufferevent tweaks (76f7e7a Christopher Davis)
+
+TESTS
+ o Make the regress_pthread.c tests work on windows with current test APIs (d74ae38)
+ o Add a unit test for conditions (5fb1095)
+ o Allow more than one copy of regression tests to run at once (a97320a)
+ o Fix event_del(0) instance in bench.c (b0f284c Shuo Chen)
+ o Fix a few memory leaks in the tests (1115366)
+ o IOCP-related unit test tweaks (499452f Christopher Davis)
+ o Improve testing of when thread-notification occurs (ce85280)
+
+BUILD AND DISTRIBUTION
+ o Add pkgconfig files for libevent_{openssl,pthreads} (ebcb1f0)
+ o Change include order in Makefile.nmake (4022b28)
+ o Make include/event2/event-config.h not included in source dist (a4af9be)
+ o Honor NDEBUG; build without warnings with NDEBUG; make NDEBUG always-off in unit test code (743f866)
+ o Declare evkeyvalq and event_list even if event_struct.h comes before sys/queue.h (d3ceca8)
+ o Move evkeyvalq into a separate header for evhttp_parse_query users (ca9048f)
+ o Prefer autoreconf -ivf to manual autogen.sh (7ea8e89)
+
+CLEANUP
+ o Completely remove the (mostly-removed) obsolete thread functions (3808168)
+ o Rename regress_pthread.c to regress_thread.c (041989f)
+ o Make defer-internal.h use lock macros, not direct calls to lock fns (5218d2a)
+
+DOCUMENTATION
+ o Document that DNS_NO_SEARCH is an obsolete alias for DNS_QUERY_NO_SEARCH (33200e7)
+ o Update the whatsnew-2.0.txt document (4991669)
+
+
+
+Changes in 2.0.6-rc (6 Aug 2010):
+ [Autogenerated from the Git log, sorted by hand.]
+DOCUMENTATION
+ o Document a change in the semantics of event_get_struct_event_size() (e21f5d1)
+ o Add a comment to describe our plan for library versioning (9659ece)
+ o Fix sentence fragment in docs for event_get_struct_event_size() (7b259b6)
+
+NEW FEATURES AND INTERFACE CHANGES
+ o Remove the obsolete evthread interfaces (c5bab56)
+ o Let evhttp_send_error infer the right error reasons (3990669)
+ o Add a function to retrieve the other side of a bufferevent pair (17a8e2d)
+ o Add bufferevent_lock()/bufferevent_unlock() (215e629)
+ o Stop asserting when asked for a (unsupported) TCP dns port. Just return NULL. (7e87a59)
+ o Replace (unused,always 0) is_tcp argument to evdns_add_server_port*() with flags (e1c1167)
+ o Constify a couple of arguments to evdns_server_request_add_*_reply (cc2379d)
+ o Add an interface to expose min_share in ratelimiting groups (6ae53d6)
+
+BUGFIXES
+ o Avoid event_del on uninitialized event in event_base_free (6d19510)
+ o Add some missing includes to fix Linux build again (75701e8)
+ o Avoid close of uninitialized socket in evbuffer unit test (bda21e7)
+ o Correctly recognize .255 addresses as link-local when looking for interfaces (8c3452b)
+ o If no evdns request can be launched, return NULL, not a handle (b14f151)
+ o Use generic win32 interfaces, not ASCII-only ones, where possible. (899b0a3)
+ o Fix the default HTTP error template (06bd056 Felix Nawothnig)
+ o Close the file in evutil_read_file whether there's an error or not. (0798dd1 Pierre Phaneuf)
+ o Fix possible nullptr dereference in evhttp_send_reply_end() (29b2e23 Felix Nawothnig)
+ o never let bufferevent_rlim functions return negative (0859870)
+ o Make sample/hello_world work on windows (d89fdba)
+ o Fix a deadlock related to event-base notification. Diagnosed by Zhou Li, Avi Bab, and Scott Lamb. (17522d2)
+ o Possible fix to 100% cpu usage with epoll and openssl (cf249e7 Mike Smellie)
+ o Don't race when calling event_active/event_add on a running signal event (fc5e0a2)
+ o Suppress a spurious EPERM warning in epoll.c (e73cbde)
+ o Fix wrong size calculation of iovec buffers when exact=1 (65abdc2 niks)
+ o Change bufferevent_openssl::do_write so it doesn't call SSL_write with a 0 length buffer (c991317 Mike Smellie)
+ o Fixed compilation of sample/le-proxy.c on win32 (13b912e Trond Norbye)
+ o Fix rate-limit calculation on openssl bufferevents. (009f300)
+ o Remember to initialize timeout events for bufferevent_async (de1f5d6 Christopher Davis)
+
+BUILD AND DISTRIBUTION CHANGES
+ o Test the unlocked-deferred callback case of bufferevents (dfb75ab)
+ o Remove the now-unusable EVTHREAD_LOCK/UNLOCK constants (fdfc3fc)
+ o Use -Wlogical-op on gcc 4.5 or higher (d14bb92)
+ o Add the libtool-generated /m4/* stuff to .gitignore (c21c663)
+ o Remove some automake-generated files from version control. (9b14911)
+ o Have autogen.sh pass --force-missing to automake (8a44062)
+ o Set library version for libevent_pthreads correctly (b2d7440)
+ o Really only add libevent_core.la to LIBADD on mingw (1425003 Sebastian Hahn)
+ o Build more cleanly with NetBSDs that dislike toupper(char) (42a8c71)
+ o Fix unit tests with -DUSE_DEBUG enabled (28f31a4)
+ o Fix evdns build with -DUNICODE (5fa30d2)
+ o Move event-config.h to include/event2 (ec347b9)
+
+TESTING
+ o Add options to test-ratelim.c to check its results (2b44dcc)
+ o Make test-ratelim clean up after itself better. (b5bfc44)
+ o Remove the now-obsolete setup_test() and cleanup_test() functions (e73f1d7)
+ o Remove all non-error prints from test/regress.c (8bc1e3d)
+ o Make test.sh exit with nonzero status if tests fail (faf2a04)
+ o Have the unit tests report errors from test.sh (3689bd2)
+ o Fix logic in correcting high values from FIONREAD (3467f2f)
+ o Add test for behavior on remote socket close (44d57ee)
+ o Unit test for event_get_struct_event_size() (7510aac)
+ o Make test/test.sh call test-changelist (7c92691)
+ o Fix badly-behaved subtest of dns/bufferevent_connect_hostname (840a72f Joachim Bauch)
+ o Add option to test-ratelim to test min_share (42f6b62)
+ o Fix an assertion bug in test-ratelim (b2c6202)
+ o Make tests quieter on local dns resolver failure (e996b3d)
+ o Increase the tolerance in our unit tests for sloppy clocks. (170ffd2)
+ o Use AF_INET socketpair to test sendfile on Solaris (9b60209)
+ o Make test-changelist count cpu usage right on win32 (ea1ea3d)
+
+INTERNALS, PERFORMANCE, AND CODE CLEANUPS
+ o Mark the event_err() functions as __attribute__((noreturn)) (33bbbed)
+ o Do not check that event_base is set in EVBASE_ACQUIRE_LOCK (218a3c3)
+ o Replace (safe) use of strcpy with memcpy to appease OpenBSD (caca2f4)
+ o Remove some dead assignments (47c5dfb)
+ o Fix a pedantic gcc 4.4 warning in event2/event.h (276e7ee)
+ o Drain th_notify_fd[0] more bytes at a time. (a5bc15b)
+ o Tidy up the code in evthread_make_base_notifiable a little (61e1eee)
+ o Pass flags to fcntl(F_SETFL) and fcntl(F_SETFD) as int, not long (7c2dea1)
+ o Remove unused variables in test/test-changelist.c (b00d4c0)
+ o Fix whitespace. (cb927a5)
+ o Improve error message for failed epoll to make debugging easier. (9e725f7)
+ o Turn our socketpair() replacement into its own function (57b30cd)
+
+
+
+Changes in 2.0.5-beta (10 May 2010):
+ [Autogenerated from the Git log, sorted by hand.]
+DOCUMENTATION
+ o Update all our copyright notices to say "2010" (17efc1c)
+ o Add Christopher Clark and Maxim Yegorushkin to the LICENSE file (38b7b57)
+ o Clarify Christopher Clark's status as writer of original ht code. (78772c3)
+ o Try to comment some of the event code more (cdd4c49)
+ o Add a few more evmap/changelist comments (c247adc)
+ o Add a comment to explain why evdns_request is now separte from request (ceefbe8)
+ o Document evutil_secure_rng_init() and evutil_secure_rng_add_bytes() (a5bf43a)
+ o Stop distributing and installing manpages: they were too inaccurate (7731ec8)
+
+NEW FEATURES AND INTERFACE CHANGES
+ o Remove signal_assign() and signal_new() macros. (2fac0f7)
+ o Make evdns use the regular logging system by default (b2f2be6)
+ o Allow evbuffer_read() to split across more than 2 iovecs (e470ad3)
+ o Functions to manipulate existing rate limiting groups. (ee41aca)
+ o Functions to track the total bytes sent over a rate limit group. (fb366c1)
+ o Detect and refuse reentrant event_base_loop() calls (b557b17)
+ o Limit the maximum number of events on each socket to 65535 (819f949)
+ o Add evbuffer_copyout to copy data from an evbuffer without draining (eb86c8c)
+ o Expose the request and reply members of rpc_req_generic() (07edf78 Shuo Chen)
+ o Add void* arguments to request_new and reply_new evrpc hooks (755fbf1 Shuo Chen)
+ o Seed the RNG using sysctl() as well as /dev/urandom (71fc3eb)
+ o Make evutil_secure_rng_init() work even with builtin arc4random (f980716)
+ o Report DNS error when lookup fails during bufferevent_socket_connect_hostname. (0ef4070 Christopher Davis)
+ o Release locks on bufferevents while executing callbacks (a5208fe Joachim Bauch) o Make debug mode catch mixed ET and non-ET events on an fd (cb67074)
+ o Catch attempts to enable debug_mode too late (9ecf0d4)
+ o Refuse null keys in evhttp_parse_query() (953e229 Frank Denis)
+
+BUGFIXES
+ o Avoid a spurious close(-1) on Linux (70a44b6)
+ o Do not close(-1) when freeing an uninitialized socket bufferevent (b34abf3)
+ o Free evdns_base->req_heads on evdns_base_free (859af67)
+ o Avoid an (untriggerable so far) crash bug in bufferevent_free() (0cf1431)
+ o Set mem_offset for every bufferevent type (657d1b6)
+ o Fix infrequent memory leak in bufferevent_init_common(). (8398641 Jardel Weyrich)
+ o Make evutil_signal_active() match declaration. (e1e703d Patrick Galbraith)
+ o Fix minheap code to use replacement malloc functions (a527618)
+ o Fix a free(NULL) in minheap-internal.h (6f20492)
+ o Fix critical bug in evbuffer_write when writev is not available (cda56ab)
+ o Make the no_iovecs case of write_atmost compile (8e227b0)
+ o Fix a memory leak when appending/prepending to a buffer with unused space. (45068a3)
+ o Clean up a mistake in pointer manipulation in evbuffer_remove (28bfed4 Christopher Davis)
+ o Always round up when there's a fractional number of msecs. (8f9e60c Christopher Davis)
+ o Fix compiler warnings under WIN32 (d469c50 Giuseppe Scrivano)
+ o Clean up properly when adding a signal handler fails. (b84b598 Gilad Benjamini) o Ensure that evdns_request is a persistent handle. (15bb82d Christopher Davis)
+ o Free search state when finished searching to avoid an infinite loop. (a625840 Christopher Davis)
+ o Assert for valid requests as necessary. (67072f3 Christopher Davis)
+ o do not leak the request object on persistent connections (9d8edf2)
+ o Make evdns logging threadsafe (b1c7950)
+ o Fix a couple of bugs in the BSD sysctl arc4seed logic (a47a4b7)
+ o Remove one last bug in last_with_datap logic. Found with valgrind (d49b92a)
+ o fix a leak when unpausing evrpc requests (94ee125)
+ o Fix a memory leak when unmarshalling RPC object arrays (f6ab2a2)
+ o Fix compilation when openssl support is disabled (40c301b)
+ o Allow empty reason line in HTTP status (739e688 Pierre Phaneuf)
+ o Fix a compile warning introduced in 739e688 (bd1ed5f Sebastian Hahn)
+ o Fix nonstandard TAILQ_FOREACH_REVERSE() definition (71afc52 Frank Denis)
+ o Try /proc on Linux as entropy fallback; use sysctl as last resort (20fda29)
+ o Fix symbol conflict between mm_*() macros and libmm (99e50e9)
+ o Fix some crazy macro mistakes in arc4random.c (90d4225)
+ o Make evbuffer_add_file() work on windows (dcdae6b)
+ o Fix unused-variable warning when building with threads disabled (ad811cd)
+ o Numerous opensolaris compilation fixes (c44de06)
+ o Fix getaddrinfo with protocol unset on Solaris 9. Found by Dagobert Michelsen (2cf2a28)
+ o Fix another nasty solaris getaddrinfo() behavior (3557071)
+ o Define _REENTRANT as needed on Solaris, elsewhere (c1cd32a)
+ o Fix some autoconf issues on OpenBSD (7c519df)
+
+BUILD AND DISTRIBUTION CHANGES
+ o Distribute libevent.pc.in, not libevent.pc (22aff04)
+ o Avoid errors in evutil.c when building with _UNICODE defined (b677032 Brodie Thiesfield)
+ o Avoid errors in http.c when building with VC 2003 .NET (13e4f3b Brodie Thiesfield)
+ o Support the standard 'make check' target in place of 'make verify' (426c8fb)
+ o Remove redundant stuff from EXTRA_DIST (b660edf)
+ o Switch to using AM conditionals in place of AC_LIBOBJ (2e898f5)
+ o Remove an orphaned RELEASE flag in Makefile.am (0794b0d)
+ o Give a better warning for bad automake versions. (77c917d)
+ o Use dist_bin_SCRIPTS, not EXTRA_DIST, to distribute scripts (9eb2fd7)
+ o Never test for select() on windows (3eb044d Trond Norbye)
+ o Do not inhibit automake dependencies generation (10c4c90 Giuseppe Scrivano)
+ o Create shared libraries under Windows (3cbca86 Giuseppe Scrivano)
+ o Add ctags/etags files to .gitignore (0861d17)
+ o Only specify -no-undefined on mingw (25433b9)
+ o Only add libevent_core.la to LIBADD on mingw (fdc6297)
+
+TESTING
+ o Get bench_http to work on Windows; add a switch to enable IOCP. (4ac38a5 Christopher Davis)
+ o VC has no getopt(), so do without in bench_http. (1273d2f Christopher Davis)
+ o Fix an obnoxious typo in the bufferevent_timeout_filter test (0d047c3)
+ o Fix a write of uninitialized RAM in regression tests (68dc742)
+ o Fix some memory leaks in the unit tests (274a7bd)
+ o Make 'main/many_events' test 70 fds, not 64. (33874b0)
+ o Unit-test every evbuffer_add_file() implementation. (06a4443)
+ o Add more unit tests for evbuffer_expand (8c83e99)
+ o Test another case of evbuffer_prepend (1234b95)
+ o Fix a possible double-free bug in SSL bufferevents with CLOSE_ON_FREE (7501895) o Add dns/search_cancel unit test. (39b870b Christopher Davis)
+ o Make http_base_test stop leaking an event_base. (96730d3)
+ o Detect broken unsetenv at unit-test runtime (f37cd4c)
+ o Implement regress_make_tempfile on win32 to test evbuffer_add_file (b4f12a1)
+ o add more (currently skipped) add_file tests on win32 (05de45d)
+ o Fix bench_http build on win32. (384d124)
+ o Make unit test for add_file able to tell "error" from "done" (88a543f)
+ o Make test for bufferevent_connect_hostname system-neutral (f89168e)
+ o Make test.sh support mingw/msys on win32 (0ee6f6c)
+ o Fix test.sh on freebsd (3d9e05b)
+
+INTERNALS, PERFORMANCE, AND AND CODE CLEANUPS
+ o Improve the speed of evbuffer_readln() (cc1600a)
+ o more whitespace normalization (2c2618d)
+ o Revise evbuffer to add last_with_data (2a6d2a1)
+ o Use last_with_data in place of previous_to_last (c8ac57f)
+ o Remove previous_to_last from evbuffer (6f47bd1)
+ o Fix last_with_data compilation on windows (1e7b986)
+ o Add some glass-box tests for the last_with_data code. (17da042)
+ o Improve robustness for refcounting (f1bc125)
+ o Remove a needless min_heap_shift_up_() call (7204b91)
+ o Increase MIN_BUFFER_SIZE to 512 (1024 on 64-bit) (2014ae4)
+ o Do not use evbuffer_expand() to add the first chain to a buffer (5c0ebb3)
+ o Make evbuffer_prepend handle empty buffers better (c87272b)
+ o Replace last_with_data with a slightly smarter version (b7442f8)
+ o Turn the increasingly complex *_CHAIN() macros into functions (96865c4)
+ o Rewrite evbuffer_expand and its users (d5ebcf3)
+ o Add evutil_tv_to_msec for safe conversion of timevals to milliseconds. (850c3ff Christopher Davis)
+ o Initialize last_with_datap correctly in evbuffer_overlapped (a0983b6)
+ o Replace EVUTIL_CLOSESOCKET macro with a function (899c1dc Sebastian Sjöberg)
+ o Move domain search state to evdns_request. (beaa14a Christopher Davis)
+ o Remove redundant checks for lock!=NULL before calling EVLOCK_LOCK (50ec59f)
+ o Rename current_base symbol to event_global_current_base_ (c16e684)
+ o Fix whitespace in evutil.c (935e150)
+ o Replace users of "int fd" with "evutil_socket_t fd" in portable code (c7cf6f0)
+
+
+
+Changes in 2.0.4-alpha (28 Feb 2010):
+ [Autogenerated from the Git log, sorted by hand.]
+DOCUMENTATION
+ o Add stub header for 2.0.4-alpha changelog. (94d0065)
+ o Improve the README with more information and links. (0b42726)
+ o Add more people who wrote patches to the acknowledgments (0af10d5)
+ o Add a warning about the use of event_initialized. (f32b575)
+ o Add a LICENSE file so people can find our license easily (7067006)
+ o Add a new "hello world" sample program (becb9f9)
+ o Clarify status of example programs (d60a1bd)
+ o Update time-test.c to use event2 (f4190bf)
+ o Add the arc4random.c license to the LICENSE file. (e15e1e9)
+
+NEW FEATURES AND INTERFACE CHANGES
+ o Improved optional lock debugging. (0cd3bb9)
+ o Rate-limiting for bufferevents; group and individual limits are supported. (737c9cd)
+ o Testing code for bufferevent rate-limiting. (f0c0124)
+ o Make the initial nameserver probe timeout configurable. (1e56a32)
+ o Revise the locking API: deprecate the old locking callbacks and add trylock. (347952f)
+ o Do not make bufferevent_setfd implicitly disable EV_READ and EV_WRITE. (8274379)
+ o Do not ignore bufferevent_enable(EV_READ) before bufferevent_connect(). (4a5b534)
+ o Introduced evutil_make_socket_closeonexec() to preserve fd flags for F_SETFD. (d0939d2 Jardel Weyrich)
+ o evdns_getaddrinfo() now supports the /etc/hosts file. (72dd666)
+ o Look at the proper /etc/hosts file on windows. (66c02c7)
+ o Allow http connections to use evdns for hostname looksups. (c698b77)
+ o Changelist code to defer event changes until just before dispatch (27308aa)
+ o do not use a function to assign the evdns base; instead assign it via evhttp_connection_base_new() which is a new function introduced in 2.0 (5032e52)
+ o Functions to access more fields of struct event. (0683950)
+ o Make kqueue use changelists. (45e5ae3)
+ o Remove kqueue->pend_changes. (3225dfb)
+ o Minimize epoll_ctl calls by using changelist (c8c6a89)
+ o Add support for a "debug mode" to try to catch common errors. (cd17c3a)
+ o Note a missing ratelim function (361da8f)
+ o Add ev_[u]intptr_t to include/event2/util.h (1fa4c81)
+ o const-ify a few more functions in event.h (d38a7a1)
+ o Deprecate EVENT_FD and EVENT_SIGNAL. (f6b2694)
+ o Remove EVUTIL_CHECK_FMT. (6c21c89)
+ o Add EV_*_MAX macros to event2/util.h to expose limits for ev_* types. (aba1fff) o Functions to view and manipulate rate-limiting buckets. (85047a6)
+ o Add the rest of the integer limits, and add a test for them. (60742d5)
+ o Remove the 'flags' argument from evdns_base_set_option() (1dd7e6d)
+ o Add an arc4random implementation for use by evdns (d4de062)
+ o Use off_t for the length parameter of evbuffer_add_file (3fe60fd)
+ o Construct Windows locks using InitializeCriticalSectionAndSpinCount (32c6f1b)
+ o Expose view of current rate limit as constrained by group limit (162ce8a)
+ o Provide consistent, tested semantics for bufferevent timeouts (d328829)
+
+BUGFIXES AND TESTS
+ o Tolerate code that returns from a fatal_cb. (91fe23f)
+ o Parenthesize macro arguments more aggressively (07e9e9b)
+ o Fix memory-leak of signal handler array with kqueue. (e1ffbb8)
+ o Stop passing EVTHREAD_READ and EVTHREAD_WRITE to non-rw locks. (76cd2b7)
+ o Fix two use-after-free bugs in unit tests spoted by lock debugging (d84d838)
+ o Fix a locking bug in event_base_loop() (da1718b)
+ o Fix an evdns lock violation. (2df1f82 Zhuang Yuyao)
+ o Valgrind fix: Clear struct kevent before checking for OSX bug. (56771a3 William Ahern)
+ o Fix up evthread compilation on windows (bd6f1ba Roman Puls)
+ o Fix regress_iocp.c usage of old lock allocation macros. (31687b4 unknown)
+ o Update nmake makefile to build evthread.c (b62d979 unknown)
+ o Fix a crash when reading badly formatted resolve.conf; from Yasuoka Masahiko (6c7c579 Yasuoka Masahiko)
+ o Fix a snow leopard compile warning in the unit tests. (7ae9445)
+ o Fix compile on Snow Leopard with gcc warnings enabled (70cdfe4 Sebastian Hahn)
+ o Only define _GNU_SOURCE if it is not already defined. (ea6b1df Joachim Bauch)
+ o Update sample/signal-test.c to use newer APIs and not leak. (f6430ac Evan Jones)
+ o Fix a segfault when writing a very fragmented evbuffer onto an SSL (a6adeca Joachim Bauch)
+ o Fix a segfault when freeing SSL bufferevents in an unusual order (a773df5 Joachim Bauch)
+ o Drop install-sh from our git repo: a mismatched version could break "make dist" (6799527)
+ o Set all instances of the version number correctly. (5a112d3)
+ o Fix a few locking issues on windows. (c51bb3c unknown)
+ o Use evutil_socket_t, not int, when logging socket errors. (292467c)
+ o Fix up behavior of never-defered callbacks a little (390e056)
+ o Replace some cases of uint32_t with ev_uint32_t. (a47d88d)
+ o Fix compilation of devpoll.c by adding missing thread includes. (fee2c77 Dagobert Michelsen)
+ o Make evutil_make_socket_nonblocking() leave any other flags alone. (4c8b7cd Jardel Weyrich)
+ o Fix an fd leak in evconnlistener_new_bind(). (24fb502 Jardel Weyrich)
+ o Fix a bogus free in evutil_new_addrinfo() (0d64051 Jardel Weyrich)
+ o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). (4df7dbc Jardel Weyrich)
+ o Fix the code that allowed DNS options to not end with : (ee4953f)
+ o Fix crash bugs when a bufferevent's eventcb is not set. (2e8eeea)
+ o Fix test-ratelim compilation on Linux. (885b427)
+ o Fix compilation of rate-limiting code on win32. (165d30e)
+ o Eradicated the last free() call. Let mm_free() take care of deallocation. (0546ce1 Jardel Weyrich)
+ o Fix byte counts when mixing deferred and non-deferred evbuffer callbacks. (29151e6)
+ o Fixed a memory leak on windows threads implementation. The CRITICAL_SECTION was not being free'd in evthread_win32_lock_free(). (2f33e00 Jardel Weyrich)
+ o Fixed a fd leak in start_accepting(), plus cosmetic changes (4367a33 Jardel Weyrich)
+ o Improved error handling in evconnlistener_new_async(). Also keeping the fd open because it is not opened by this function, so the caller is responsible for closing it. Additionally, since evconnlistener_new_bind() creates a socket and passes it to the function above, it required error checking to close the same socket. (fec66f9 Jardel Weyrich)
+ o Don't use a bind address for nameservers on loopback (8d4aaf9)
+ o Fix compilation of rate-limit code when threading support is disabled (97a8c79)
+ o Detect setenv/unsetenv; skip main/base_environ test if we can't fake them. (7296971)
+ o Check more internal event_add() calls for failure (ff3f6cd)
+ o Fix windows and msvc build (5c7a7bc)
+ o Call event_debug_unassign on internal events (a19b4a0)
+ o Try to fix a warning in hash_debug_entry (137f2c6)
+ o Fix a dumb typo in ev_intptr_t definitions. (27c9a40)
+ o do not fail while sending on http connections the client closed. (93d7369)
+ o make evhttp_send() safe against terminated connections, too (3978180)
+ o Make Libevent 1.4.12 build on win32 with Unicode enabled. (000a33e Brodie Thiesfield)
+ o Fix some additional -DUNICODE issues on win32. (a7a9431)
+ o Add a check to make soure our EVUTIL_AI flags do not conflict with the native ones (c18490e)
+ o Always use our own gai_strerror() replacement. (6810bdb)
+ o Make RNG work when we have arc4random() but not arc4random_buf() (4ec8fea)
+ o validate close cb on server when client connection closes (2f782af)
+ o Fix two unlocked reads in evbuffer. (7116bf2)
+ o When working without a current event base, don't try to use IOCP listeners (cb52838)
+ o Fix getpid() usage on Windows (ff2a134)
+ o Add a unit test for secure rng. (48a29b6)
+ o Add some headers to fix freebsd compilation (b72be50)
+ o When connect() succeeds immediately, don't invoke the callback immediately. (7515de9)
+ o Suspend read/write on bufferevents during hostname lookup (db08f64)
+ o Make bufferevent_free() clear all callbacks immediately. (b2fbeb3)
+ o Fix some race conditions in persistent events and event_reinit (e2642f0)
+ o Fix a bug in resetting timeouts on persistent events when IO triggers. (38ec0a7)
+ o Add a test for timeouts on filtering bufferevents. (c02bfe1)
+ o Add test for periodic timers that get activated for other reasons (8fcb7a1)
+ o Use new timeval diff comparison function in bufferevent test (f3dfe46)
+ o Delete stack-alloced event in new unit test before returning. (7ffd387)
+ o Fix mingw compilation (23170a6)
+ o Try to define a sane _EVENT_SIZEOF_SIZE_T for msvc compilation (1e14f82)
+ o Fix arc4random compilation on MSVC. (98edb89)
+ o deal with connect() failing immediately (7bc48bf)
+ o Small cleanups on freebsd-connect-refused patch. (57b7248)
+
+BUILD AND DISTRIBUTION CHANGES
+ o Remove the contents of WIN32-Prj as unmaintained. (c69d5a5)
+ o Allow the user to redirect the verbose output of test/test.sh to a file (c382de6)
+ o Allow test.sh to be run as ./test/test.sh (7dfbe94)
+ o Never believe that we have pthreads on win32, even if gcc thinks we do. (78ed097)
+ o Make it compile under gcc --std=c89. (e2ca403)
+ o Fix a number of warnings from gcc -pedantic (918e9c5)
+ o Add the msvc-generated .lib files to .gitignore. (e244a2e)
+ o Add the "compile" script to gitignore. (1ba6bed)
+
+INTERNALS AND CODE CLEANUPS
+ o Add a .gitignore file. (ba34071)
+ o New EVTHREAD_TRY_LOCK function to try to grab a lock. (689fc09)
+ o Add the abilitity to mark some buffer callbacks as never-deferred. (438f9ed)
+ o Refactor our 'suspend operation' logic on bufferevents. (0d744aa)
+ o Simplify the read high-watermark checking. (5846bf6)
+ o Improve readability of evutil_unparse_protoname() (5a43df8 Jardel Weyrich)
+ o Expose our cached gettimeofday value with a new interface (47854a8)
+ o Whitespace fixes in test.sh (0b151a9)
+ o Enable branch-prediction hints with EVUTIL_UNLIKELY. (eaaf27f)
+ o Refactor code from evdns into a new internal "read a file" function. (0f7144f)
+ o Comestic changes in evconnlistener_new(), new_accepting_socket(), accepted_socket_invoke_user_cb() and iocp_listener_enable(). (510ab6b Jardel Weyrich)
+ o Add unit-test for bad_request bug fixed in 1.4 recently. (6cc79c6 Pavel Plesov) o Add a comment on evthread_enable_lock_debuging. (b9f43b2)
+ o Fix test.sh on shells without echo -n (94131e9)
+ o More unit tests for getaddrinfo_async: v4timeout and cancel. (a334b31)
+ o Make http use evconnlistener. (ec34533)
+ o move dns utility functions into a separate file so that we can use them for http testing (b822639)
+ o add a test for evhttp_connection_base_new with a dns_base (26714ca)
+ o forgot to add void to test function (78a50fe)
+ o Add a forgotten header (changelist-internal.h) (4b9f307)
+ o Remove some commented-out code in evutil (26e1b6f)
+ o Remove a needless include of rpc_compat.h (70a4a3e)
+ o Use less memory for each entry in a hashtable (a66e947)
+ o Try to untangle the logic in server_port_flush(). (439aea0)
+ o Use ev_[u]intptr_t types in place of [u]intptr_t (cef61a2)
+ o Reduce windows header includes in our own headers. (da6135e)
+ o clean up terminate_chunked test (e8a9782)
+ o Increment the submicro version number. (63e868e)
+ o Update event-config.h version number to match configure.in (aae7db5)
+ o Clean up formatting: Disallow space-before-tab. (8fdf09c)
+ o Clean up formatting: use tabs, not 8-spaces, to indent. (e5bbd40)
+ o Clean up formatting: remove trailing spaces (e5cf987)
+ o Clean up formatting: function/keyword spacing consistency. (4faeaea)
+
+
+
+Changes in 2.0.3-alpha (20 Nov 2009):
+ o Add a new code to support SSL/TLS on bufferevents, using the OpenSSL library (where available).
+ o Fix a bug where we didn't allocate enough memory in event_get_supported_methods().
+ o Avoid segfault during failed allocation of locked evdns_base. (Found by Rocco Carbone.)
+ o Export new evutil_ascii_* functions to perform locale-independent character type operations.
+ o Try to compile better with MSVC: patches from Brodie Thiesfield
+ o New evconnlistener_get_fd function to expose a listener's associated socket.
+ o Expose an ev_socklen_t type for consistent use across platforms.
+ o Make bufferevent_socket_connect() work when the original fd was -1.
+ o Fix a bug in bufferevent_socket_connect() when the connection succeeds too quickly.
+ o Export an evutil_sockaddr_cmp() to compare to sockaddr objects for equality.
+ o Add a bufferevent_get_enabled() to tell what a bufferevent has been configured to do.
+ o Add an evbuffer_search_eol() function to locate the end of a line nondestructively.
+ o Add an evbuffer_search_range() function to search a bounded range of a buffer.
+ o Fix a rare crash bug in evdns.
+ o Have bufferevent_socket_connect() with no arguments put a bufferevent into connecting mode.
+ o Support sendfile on Solaris: patch from Caitlin Mercer.
+ o New functions to explicitly reference a socket used by an evhttp object. Patches from David Reiss.
+ o When we send a BEV_EVENT_CONNECTED to indicate connected status, we no longer invoke the write callback as well unless we actually wrote data too.
+ o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
+ o Do not detect whether we have monotonic clock support every time a new event base is created: instead do it only once. Patch taken from Chromium.
+ o Do not allocate the maximum event queue for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 374K per epoll-based event_base. Resolves bug 2839240.
+ o Treat an event with a negative fd as valid but untriggerable by Libevent. This is useful for applications that want to manually activate events.
+ o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
+ o Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
+ o New event_base_got_exit() and event_base_got_break() functions to tell whether an event loop exited because of an event_base_loopexit() or an event_base_loopbreak(). Patch from Ka-Hing Cheung.
+ o When adding or deleting an event from a non-main thread, only wake up the main thread when its behavior actually needs to change.
+ o Fix some bugs when using the old evdns interfaces to initialize the evdns module.
+ o Detect errors during bufferevent_connect(). Patch from Christopher Davis.
+ o Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai.
+ o Make the event_base_loop() family of functions respect thread-safety better. This should clear up a few hard-to-debug race conditions.
+ o Fix a bug when using a specialized memory allocator on win32.
+ o Have the win32 select() backend label TCP-socket-connected events as EV_WRITE, not EV_READ. This should bring it in line with the other backends, and improve portability. Patch from Christopher Davis.
+ o Stop using enums as arguments or return values when what we mean is a bitfield of enum values. C++ doesn't believe that you can OR two enum values together and get another enum, and C++ takes its typing seriously. Patch from Christopher Davis.
+ o Add an API to replace all fatal calls to exit() with a user-provided panic function.
+ o Replace all assert() calls with a variant that is aware of the user-provided logging and panic functions.
+ o Add a return value to event_assign so that it can fail rather than asserting when the user gives it bad input. event_set still dies on bad input.
+ o The event_base_new() and event_base_new_with_config() functions now never call exit() on failure. For backward "compatibility", event_init() still does, but more consistently.
+ o Remove compat/sys/_time.h. It interfered with system headers on HPUX, and its functionality has been subsumed by event2/util.h and util-internal.h.
+ o Add a new bufferevent_socket_connect_hostname() to encapsulate the resolve-then-connect operation.
+ o Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian.
+ o Alternative queue-based timeout algorithm for programs that use a large number of timeouts with the same value.
+ o New event_base_config option to disable the timeval cache entirely.
+ o Make EV_PERSIST timeouts more accurate: schedule the next event based on the scheduled time of the previous event, not based on the current time.
+ o Allow http.c to handle cases where getaddrinfo returns an IPv6 address. Patch from Ryan Phillips.
+ o Fix a problem with excessive memory allocation when using multiple event priorities.
+ o Default to using arc4random for DNS transaction IDs on systems that have it; from OpenBSD.
+ o Never check the environment when we're running setuid or setgid; from OpenBSD.
+ o Options passed to evdns_set_option() no longer need to end with a colon.
+ o Add an evutil_getaddrinfo() function to clone getaddrinfo on platforms that don't have it.
+ o Add an evdns_getaddrinfo() function to provide a nonblocking getaddrinfo using evdns, so programs can perform useful hostname lookup.
+ o Finally expose the IOCP-based bufferevent backend. It passes its unit tests, but probably still has some bugs remaining. Code by Nick Mathewson and Christopher Davis.
+ o Numerous other bugfixes.
+ o On FreeBSD and other OSes, connect can return ECONREFUSED immediately; instead of failing the function call, pretend with faileld in the callback.
+ o Fix a race condition in the pthreads test case; found by Nick Mathewson
+ o Remove most calls to event_err() in http and deal with memory errors instead
+
+
+
+Changes in 2.0.2-alpha (25 Jul 2009):
+ o Add a new flag to bufferevents to make all callbacks automatically deferred.
+ o Make evdns functionality locked, and automatically defer dns callbacks.
+ o Fix a possible free(NULL) when freeing an event_base with no signals.
+ o Add a flag to disable checking environment varibles when making an event_base
+ o Disallow setting less than 1 priority.
+ o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen]
+ o Use signal.h, not sys/signal.h. [Patch from mmadia]
+ o Try harder to build with certain older c99 compilers.
+ o Make sure that an event_config's flags field is always initialized to 0. [Bug report from Victor Goya]
+ o Avoid data corruption when reading data entirely into the second-to-last chain of an evbuffer. [Bug report from Victor Goya]
+ o Make sendfile work on FreeBSD
+ o Do not use vararg macros for accessing evrpc structures; this is not backwards compatible, but we did not promise any backwards compatibility for the rpc code.
+ o Actually define the event_config_set_flag() function.
+ o Try harder to compile with Visual C++.
+ o Move event_set() and its allies to event2/event_compat.h where they belong.
+ o Remove the event_gotsig code, which has long been deprecated and unused.
+ o Add an event_get_base() function to return the base assigned to an event.
+ o New function to automate connecting on a socket-based bufferevent.
+ o New functions to automate listening for incoming TCP connections.
+ o Do case-insensitive checks with a locale-independent comparison function.
+ o Rename the evbuffercb and everrorcb callbacks to bufferevent_data_cb and bufferevent_event_cb respectively. The old names are available in bufferevent_compat.h.
+ o Rename the EVBUFFER_* codes used by bufferevent event callbacks to BEV_EVENT_*, to avoid namespace collision with evbuffer flags. The old names are available in bufferevent_compat.h.
+ o Move the EVBUFFER_INPUT and EVBUFFER_OUTPUT macros to bufferevent_compat.h
+ o Add a bufferevent_getfd() function to mirror bufferevent_setfd()
+ o Make bufferevent_setfd() return an error code if the operation is not successful.
+ o Shave 22 bytes off struct event on 32-bit platforms by shrinking and re-ordering fields. The savings on 64-bit platforms is likely higher.
+ o Cap the maximum number of priorities at 256.
+ o Change the semantics of evbuffer_cb_set_flags() to be set-flag only; add a new evbuffer_cb_clear_flags() to remove set flags.
+ o Change the interface of evbuffer_add_reference so that the cleanup callback gets more information
+ o Revise the new evbuffer_reserve_space/evbuffer_commit_space() interfaces so that you can use them without causing extraneous copies or leaving gaps in the evbuffer.
+ o Add a new evbuffer_peek() interface to inspect data in an evbuffer without removing it.
+ o Fix a deadlock when suspending reads in a bufferevent due to a full buffer. (Spotted by Joachim Bauch.)
+ o Fix a memory error when freeing a thread-enabled event base with registered events. (Spotted by Joachim Bauch.)
+ o Try to contain degree of failure when running on a win32 version so heavily firewalled that we can't fake a socketpair.
+ o Activate fd events in a pseudorandom order with O(N) backends, so that we don't systematically favor low fds (select) or earlier-added fds (poll, win32).
+ o Replace some read()/write() instances with send()/recv() to work properly on win32.
+ o Set truncated flag correctly in evdns server replies.
+ o Raise RpcGenError in event_rpcgen.py; from jmanison and Zack Weinberg
+ o Fix preamble of rpcgen-generated files to rely on event2 includes; based on work by jmansion; patch from Zack Weinberg.
+ o Allow specifying the output filename for rpcgen; based on work by jmansion; patch from Zack Weinberg.
+ o Allow C identifiers as struct names; allow multiple comments in .rpc files; from Zack Weinberg
+ o Mitigate a race condition when using socket bufferevents in multiple threads.
+ o Use AC_SEARCH_LIBS, not AC_CHECK_LIB to avoid needless library use.
+ o Do not allow event_del(ev) to return while that event's callback is executing in another thread. This fixes a nasty race condition.
+ o event_get_supported_methods() now lists methods that have been disabled with the EVENT_NO* environment options.
+ o Rename encode_int[64] to evtag_encode_int[64] to avoid polluting the global namespace. The old method names are still available as macros in event2/tag_compat.h.
+
+
+
+Changes in 2.0.1-alpha (17 Apr 2009):
+ o free minheap on event_base_free(); from Christopher Layne
+ o debug cleanups in signal.c; from Christopher Layne
+ o provide event_base_new() that does not set the current_base global
+ o bufferevent_write now uses a const source argument; report from Charles Kerr
+ o improve documentation on event_base_loopexit; patch from Scott Lamb
+ o New function, event_{base_}loopbreak. Like event_loopexit, it makes an event loop stop executing and return. Unlike event_loopexit, it keeps subsequent pending events from getting executed. Patch from Scott Lamb
+ o Check return value of event_add in signal.c
+ o provide event_reinit() to reintialize an event_base after fork
+ o New function event_set_mem_functinons. It allows the user to give libevent replacement functions to use for memory management in place of malloc(), free(), etc. This should be generally useful for memory instrumentation, specialized allocators, and so on.
+ o The kqueue implementation now catches signals that are raised after event_add() is called but before the event_loop() call. This makes it match the other implementations.
+ o The kqueue implementation now restores original signal handlers correctly when its signal events are removed.
+ o Check return value of event_add in signal.c
+ o Add a more powerful evbuffer_readln as a replacement for evbuffer_readline. The new function handles more newline styles, and is more useful with buffers that may contain a nul characters.
+ o Do not mangle socket handles on 64-bit windows.
+ o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.)
+ o move EV_PERSIST handling out of the event backends
+ o small improvements to evhttp documentation
+ o always generate Date and Content-Length headers for HTTP/1.1 replies
+ o set the correct event base for HTTP close events
+ o When building with GCC, use the "format" attribute to verify type correctness of calls to printf-like functions.
+ o Rewrite win32.c backend to be O(n lg n) rather than O(n^2).
+ o Removed obsoleted recalc code
+ o support for 32-bit tag numbers in rpc structures; this is wire compatible, but changes the API slightly.
+ o pull setters/getters out of RPC structures into a base class to which we just need to store a pointer; this reduces the memory footprint of these structures.
+ o prefix {encode,decode}_tag functions with evtag to avoid collisions
+ o fix a bug with event_rpcgen for integers
+ o Correctly handle DNS replies with no answers set (Fixes bug 1846282)
+ o add -Wstrict-aliasing to warnings and more cleanup
+ o removed linger from http server socket; reported by Ilya Martynov
+ o event_rpcgen now allows creating integer arrays
+ o support string arrays in event_rpcgen
+ o change evrpc hooking to allow pausing of RPCs; this will make it possible for the hook to do some meaning ful work; this is not backwards compatible.
+ o allow an http request callback to take ownership of a request structure
+ o allow association of meta data with RPC requests for hook processing
+ o associate more context for hooks to query such as the connection object
+ o remove pending timeouts on event_base_free()
+ o also check EAGAIN for Solaris' event ports; from W.C.A. Wijngaards
+ o devpoll and evport need reinit; tested by W.C.A Wijngaards
+ o event_base_get_method; from Springande Ulv
+ o Send CRLF after each chunk in HTTP output, for compliance with RFC2626. Patch from "propanbutan". Fixes bug 1894184.
+ o Add a int64_t parsing function, with unit tests, so we can apply Scott Lamb's fix to allow large HTTP values.
+ o Use a 64-bit field to hold HTTP content-lengths. Patch from Scott Lamb.
+ o Allow regression code to build even without Python installed
+ o remove NDEBUG ifdefs from evdns.c
+ o detect integer types properly on platforms without stdint.h
+ o udpate documentation of event_loop and event_base_loop; from Tani Hosokawa.
+ o simplify evbuffer by removing orig_buffer
+ o do not insert event into list when evsel->add fails
+ o add support for PUT/DELETE requests; from Josh Rotenberg
+ o introduce evhttp_accept_socket() to accept from an already created socket
+ o include Content-Length in reply for HTTP/1.0 requests with keep-alive
+ o increase listen queue for http sockets to 128; if that is not enough the evhttp_accpet_socket() api can be used with a prepared socket.
+ o Patch from Tani Hosokawa: make some functions in http.c threadsafe.
+ o test support for PUT/DELETE requests; from Josh Rotenberg
+ o rewrite of the evbuffer code to reduce memory copies
+ o Some older Solaris versions demand that _REENTRANT be defined to get strtok_r(); do so.
+ o Do not free the kqop file descriptor in other processes, also allow it to be 0; from Andrei Nigmatulin
+ o Provide OpenSSL style support for multiple threads accessing the same event_base
+ o make event_rpcgen.py generate code include event-config.h; reported by Sam Banks.
+ o switch thread support so that locks get allocated as they are needed.
+ o make event methods static so that they are not exported; from Andrei Nigmatulin
+ o make RPC replies use application/octet-stream as mime type
+ o do not delete uninitialized timeout event in evdns
+ o Correct the documentation on buffer printf functions.
+ o Don't warn on unimplemented epoll_create(): this isn't a problem, just a reason to fall back to poll or select.
+ o Correctly handle timeouts larger than 35 minutes on Linux with epoll.c. This is probably a kernel defect, but we'll have to support old kernels anyway even if it gets fixed.
+ o Make name_from_addr() threadsafe in http.c
+ o Add new thread-safe interfaces to evdns functions.
+ o Make all event_tagging interfaces threadsafe.
+ o Rename internal memory management functions.
+ o New functions (event_assign, event_new, event_free) for use by apps that want to be safely threadsafe, or want to remain ignorant of the contents of struct event.
+ o introduce bufferevent_read_buffer; allows reading without memory copy.
+ o expose bufferevent_setwatermark via header files and fix high watermark on read
+ o fix a bug in buffrevent read water marks and add a test for them
+ o fix a bug in which bufferevent_write_buffer would not schedule a write event
+ o provide bufferevent_input and bufferevent_output without requiring knowledge of the structure
+ o introduce bufferevent_setcb and bufferevent_setfd to allow better manipulation of bufferevents
+ o convert evhttp_connection to use bufferevents.
+ o use libevent's internal timercmp on all platforms, to avoid bugs on old platforms where timercmp(a,b,<=) is buggy.
+ o Remove the never-exported, never-used evhttp_hostportfile function.
+ o Support input/output filters for bufferevents; somewhat similar to libio's model. This will allow us to implement SSL, compression, etc, transparently to users of bufferevents such as the http layer.
+ o allow connections to be removed from an rpc pool
+ o add new evtimer_assign, signal_assign, evtimer_new, and signal_new functions to manipulate timer and signal events, analagous to the now-recommended event_assign and event_new
+ o switch internal uses of event_set over to use event_assign.
+ o introduce evbuffer_contiguous_space() api that tells a user how much data is available in the first buffer chain
+ o introduce evbuffer_reserve_space() and evbuffer_commit_space() to make processing in filters more efficient.
+ o reduce system calls for getting current time by caching it.
+ o separate signal events from io events; making the code less complex.
+ o support for periodic timeouts
+ o support for virtual HTTP hosts.
+ o turn event_initialized() into a function, and add function equivalents to EVENT_SIGNAL and EVENT_FD so that people don't need to include event_struct.h
+ o Build test directory correctly with CPPFLAGS set.
+ o Provide an API for retrieving the supported event mechanisms.
+ o event_base_new_with_config() and corresponding config APIs.
+ o migrate the evhttp header to event2/ but accessors are still missing.
+ o deprecate timeout_* event functions by moving them to event_compat.h
+ o Move windows gettimeofday replacement into a new evutil_gettimeofday().
+ o Make configure script work on IRIX.
+ o provide a method for canceling ongoing http requests.
+ o Make vsnprintf() returns consistent on win32.
+ o Fix connection keep-alive behavior for HTTP/1.0
+ o Fix use of freed memory in event_reinit; pointed out by Peter Postma
+ o constify struct timeval * where possible
+ o make event_get_supported_methods obey environment variables
+ o support for edge-triggered events on epoll and kqueue backends: patch from Valery Kholodkov
+ o support for selecting event backends by their features, and for querying the features of a backend.
+ o change failing behavior of event_base_new_with_config: if a config is provided and no backend is selected, return NULL instead of aborting.
+ o deliver partial data to request callbacks when chunked callback is set even if there is no chunking on the http level; allows cancelation of requests from within the chunked callback; from Scott Lamb.
+ o allow min_heap_erase to be called on removed members; from liusifan.
+ o Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT. Retain INPUT/OUTPUT aliases on on-win32 platforms for backwards compatibility.
+ o Do not use SO_REUSEADDR when connecting
+ o Support 64-bit integers in RPC structs
+ o Correct handling of trailing headers in chunked replies; from Scott Lamb.
+ o Support multi-line HTTP headers; based on a patch from Moshe Litvin
+ o Reject negative Content-Length headers; anonymous bug report
+ o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report
+ o Various HTTP correctness fixes from Scott Lamb
+ o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail
+ o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov.
+ o Fix a problem with epoll() and reinit; problem report by Alexander Drozdov.
+ o Fix off-by-one errors in devpoll; from Ian Bell
+ o Make event_add not change any state if it fails; reported by Ian Bell.
+ o Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me.
+ o Match the query in DNS replies to the query in the request; from Vsevolod Stakhov.
+ o Add new utility functions to correctly observe and log winsock errors.
+ o Do not remove Accept-Encoding header
+ o Clear the timer cache on entering the event loop; reported by Victor Chang
+ o Only bind the socket on connect when a local address has been provided; reported by Alejo Sanchez
+ o Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones.
+ o Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
+ o Fix a typo in setting the global event base; reported by lance.
+ o Set the 0x20 bit on outgoing alphabetic characters in DNS requests randomly, and insist on a match in replies. This helps resist DNS poisoning attacks.
+ o Make the http connection close detection work properly with bufferevents and fix a potential memory leak associated with it.
+ o Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal.
+ o Add generic implementations for parsing and emiting IPv6 addresses on platforms that do not have inet_ntop and/or inet_pton.
+ o Allow DNS servers that have IPv6 addresses.
+ o Add an evbuffer_write_atmost() function to write a limited number of bytes to an fd.
+ o Refactor internal notify-main-thread logic to prefer eventfd to pipe, then pipe to socketpair, and only use socketpairs as a last resort.
+ o Try harder to pack all evbuffer reads into as few chains as possible, using readv/WSARecv as appropriate.
+ o New evthread_use_windows_threads() and evthread_use_pthreads() functions to set up the evthread callbacks with reasonable defaults.
+ o Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
+ o sendfile, mmap and memory reference support for evbuffers.
+ o New evutil_make_listen_socket_reuseable() to abstract SO_REUSEADDR.
+ o New bind-to option to allow DNS clients to bind to an arbitrary port for outgoing requests.
+ o evbuffers can now be "frozen" to prevent operations at one or both ends.
+ o Bufferevents now notice external attempts to add data to an inbuf or remove it from an outbuf, and stop them.
+ o Fix parsing of queries where the encoded queries contained \r, \n or +
+ o Do not allow internal events to starve lower-priority events.
+
diff --git a/sntp/libevent/Doxyfile b/sntp/libevent/Doxyfile
new file mode 100644
index 000000000000..d9d6603459c3
--- /dev/null
+++ b/sntp/libevent/Doxyfile
@@ -0,0 +1,257 @@
+# Doxyfile 1.5.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = libevent
+
+# Place all output under 'doxygen/'
+
+OUTPUT_DIRECTORY = doxygen/
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = include/
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = \
+ include/event2/buffer.h \
+ include/event2/buffer_compat.h \
+ include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/dns.h \
+ include/event2/dns_compat.h \
+ include/event2/event.h \
+ include/event2/event_compat.h \
+ include/event2/http.h \
+ include/event2/http_compat.h \
+ include/event2/listener.h \
+ include/event2/rpc.h \
+ include/event2/rpc_compat.h \
+ include/event2/tag.h \
+ include/event2/tag_compat.h \
+ include/event2/thread.h \
+ include/event2/util.h
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED = TAILQ_ENTRY RB_ENTRY EVENT_DEFINED_TQENTRY_ EVENT_IN_DOXYGEN_
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
diff --git a/sntp/libevent/LICENSE b/sntp/libevent/LICENSE
new file mode 100644
index 000000000000..402ca50896cd
--- /dev/null
+++ b/sntp/libevent/LICENSE
@@ -0,0 +1,99 @@
+Libevent is available for use under the following license, commonly known
+as the 3-clause (or "modified") BSD license:
+
+==============================
+Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+
+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. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+==============================
+
+Portions of Libevent are based on works by others, also made available by
+them under the three-clause BSD license above. The copyright notices are
+available in the corresponding source files; the license is as above. Here's
+a list:
+
+log.c:
+ Copyright (c) 2000 Dug Song <dugsong@monkey.org>
+ Copyright (c) 1993 The Regents of the University of California.
+
+strlcpy.c:
+ Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+
+win32select.c:
+ Copyright (c) 2003 Michael A. Davis <mike@datanerds.net>
+
+evport.c:
+ Copyright (c) 2007 Sun Microsystems
+
+ht-internal.h:
+ Copyright (c) 2002 Christopher Clark
+
+minheap-internal.h:
+ Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com>
+
+==============================
+
+The arc4module is available under the following, sometimes called the
+"OpenBSD" license:
+
+ Copyright (c) 1996, David Mazieres <dm@uun.org>
+ Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+
+ 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+
+==============================
+
+The Windows timer code is based on code from libutp, which is
+distributed under this license, sometimes called the "MIT" license.
+
+
+Copyright (c) 2010 BitTorrent, Inc.
+
+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
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/sntp/libevent/Makefile.am b/sntp/libevent/Makefile.am
new file mode 100644
index 000000000000..58f1f016a81d
--- /dev/null
+++ b/sntp/libevent/Makefile.am
@@ -0,0 +1,301 @@
+# Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+# 'foreign' means that we're not enforcing GNU package rules strictly.
+# '1.9' means that we need automake 1.9 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+
+ACLOCAL_AMFLAGS = -I m4
+
+# This is the "Release" of the Libevent ABI. It takes precedence over
+# the VERSION_INFO, so that two versions of Libevent with the same
+# "Release" are never binary-compatible.
+#
+# This number incremented once for the 2.0 release candidate, and
+# will increment for each series until we revise our interfaces enough
+# that we can seriously expect ABI compatibility between series.
+#
+RELEASE = -release 2.1
+
+# This is the version info for the libevent binary API. It has three
+# numbers:
+# Current -- the number of the binary API that we're implementing
+# Revision -- which iteration of the implementation of the binary
+# API are we supplying?
+# Age -- How many previous binary API versions do we also
+# support?
+#
+# To increment a VERSION_INFO (current:revision:age):
+# If the ABI didn't change:
+# Return (current:revision+1:age)
+# If the ABI changed, but it's backward-compatible:
+# Return (current+1:0:age+1)
+# If the ABI changed and it isn't backward-compatible:
+# Return (current+1:0:0)
+#
+# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
+# UNLESS YOU REALLY REALLY HAVE TO.
+VERSION_INFO = 3:0:0
+
+# History: RELEASE VERSION_INFO
+# 2.0.1-alpha -- 2.0 1:0:0
+# 2.0.2-alpha -- 2:0:0
+# 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.)
+# 2.0.4-alpha -- 3:0:0
+# 2.0.5-beta -- 4:0:0
+# 2.0.6-rc -- 2.0 2:0:0
+# 2.0.7-rc -- 2.0 3:0:1
+# 2.0.8-rc -- 2.0 4:0:2
+# 2.0.9-rc -- 2.0 5:0:0 (ABI changed slightly)
+# 2.0.10-stable-- 2.0 5:1:0 (No ABI change)
+# 2.0.11-stable-- 2.0 6:0:1 (ABI changed, backward-compatible)
+# 2.0.12-stable-- 2.0 6:1:1 (No ABI change)
+# 2.0.13-stable-- 2.0 6:2:1 (No ABI change)
+# 2.0.14-stable-- 2.0 6:3:1 (No ABI change)
+# 2.0.15-stable-- 2.0 6:3:1 (Forgot to update :( )
+# 2.0.16-stable-- 2.0 6:4:1 (No ABI change)
+# 2.0.17-stable-- 2.0 6:5:1 (No ABI change)
+# 2.0.18-stable-- 2.0 6:6:1 (No ABI change)
+# 2.0.19-stable-- 2.0 6:7:1 (No ABI change)
+# 2.0.20-stable-- 2.0 6:8:1 (No ABI change)
+# 2.0.21-stable-- 2.0 6:9:1 (No ABI change)
+#
+# For Libevent 2.1:
+# 2.1.1-alpha -- 2.1 1:0:0
+# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
+# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+
+# ABI version history for this package effectively restarts every time
+# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
+#
+# Ideally, we would not be using RELEASE at all; instead we could just
+# use the VERSION_INFO field to label our backward-incompatible ABI
+# changes, and those would be few and far between. Unfortunately,
+# Libevent still exposes far too many volatile structures in its
+# headers, so we pretty much have to assume that most development
+# series will break ABI compatibility. For now, it's simplest just to
+# keep incrementing the RELEASE between series and resetting VERSION_INFO.
+#
+# Eventually, when we get to the point where the structures in the
+# headers are all non-changing (or not there at all!), we can shift to
+# a more normal worldview where backward-incompatible ABI changes are
+# nice and rare. For the next couple of years, though, 'struct event'
+# is user-visible, and so we can pretty much guarantee that release
+# series won't be binary-compatible.
+
+if INSTALL_LIBEVENT
+dist_bin_SCRIPTS = event_rpcgen.py
+endif
+
+pkgconfigdir=$(libdir)/pkgconfig
+LIBEVENT_PKGCONFIG=libevent.pc
+
+# These sources are conditionally added by configure.ac or conditionally
+# included from other files.
+PLATFORM_DEPENDENT_SRC = \
+ arc4random.c \
+ epoll_sub.c
+
+EXTRA_DIST = \
+ ChangeLog-1.4 \
+ ChangeLog-2.0 \
+ Doxyfile \
+ LICENSE \
+ Makefile.nmake test/Makefile.nmake \
+ autogen.sh \
+ event_rpcgen.py \
+ libevent.pc.in \
+ make-event-config.sed \
+ whatsnew-2.0.txt \
+ whatsnew-2.1.txt \
+ $(PLATFORM_DEPENDENT_SRC)
+
+LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
+if PTHREADS
+LIBEVENT_LIBS_LA += libevent_pthreads.la
+LIBEVENT_PKGCONFIG += libevent_pthreads.pc
+endif
+if OPENSSL
+LIBEVENT_LIBS_LA += libevent_openssl.la
+LIBEVENT_PKGCONFIG += libevent_openssl.pc
+endif
+
+if INSTALL_LIBEVENT
+lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
+pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
+else
+noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
+endif
+
+EXTRA_SOURCE=
+noinst_HEADERS=
+noinst_PROGRAMS=
+EXTRA_PROGRAMS=
+CLEANFILES=
+DISTCLEANFILES=
+BUILT_SOURCES =
+include include/include.am
+include sample/include.am
+include test/include.am
+
+if BUILD_WIN32
+
+SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
+SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
+ bufferevent_async.c
+SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
+
+else
+
+SYS_LIBS =
+SYS_SRC =
+SYS_INCLUDES =
+
+endif
+
+if STRLCPY_IMPL
+SYS_SRC += strlcpy.c
+endif
+if SELECT_BACKEND
+SYS_SRC += select.c
+endif
+if POLL_BACKEND
+SYS_SRC += poll.c
+endif
+if DEVPOLL_BACKEND
+SYS_SRC += devpoll.c
+endif
+if KQUEUE_BACKEND
+SYS_SRC += kqueue.c
+endif
+if EPOLL_BACKEND
+SYS_SRC += epoll.c
+endif
+if EVPORT_BACKEND
+SYS_SRC += evport.c
+endif
+if SIGNAL_SUPPORT
+SYS_SRC += signal.c
+endif
+
+BUILT_SOURCES += include/event2/event-config.h
+
+include/event2/event-config.h: config.h make-event-config.sed
+ $(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2
+ $(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T
+ $(AM_V_at)mv -f $@T $@
+
+CORE_SRC = \
+ buffer.c \
+ bufferevent.c \
+ bufferevent_filter.c \
+ bufferevent_pair.c \
+ bufferevent_ratelim.c \
+ bufferevent_sock.c \
+ event.c \
+ evmap.c \
+ evthread.c \
+ evutil.c \
+ evutil_rand.c \
+ evutil_time.c \
+ listener.c \
+ log.c \
+ $(SYS_SRC)
+
+EXTRAS_SRC = \
+ evdns.c \
+ event_tagging.c \
+ evrpc.c \
+ http.c
+
+if BUILD_WITH_NO_UNDEFINED
+NO_UNDEFINED = -no-undefined
+MAYBE_CORE = libevent_core.la
+else
+NO_UNDEFINED =
+MAYBE_CORE =
+endif
+
+GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
+
+libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
+
+libevent_core_la_SOURCES = $(CORE_SRC)
+libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
+
+if PTHREADS
+libevent_pthreads_la_SOURCES = evthread_pthread.c
+libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
+libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
+endif
+
+libevent_extra_la_SOURCES = $(EXTRAS_SRC)
+libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
+libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
+
+if OPENSSL
+libevent_openssl_la_SOURCES = bufferevent_openssl.c
+libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
+libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
+libevent_openssl_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+endif
+
+noinst_HEADERS += \
+ WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h \
+ WIN32-Code/tree.h \
+ bufferevent-internal.h \
+ changelist-internal.h \
+ compat/sys/queue.h \
+ defer-internal.h \
+ epolltable-internal.h \
+ evbuffer-internal.h \
+ evconfig-private.h \
+ event-internal.h \
+ evmap-internal.h \
+ evrpc-internal.h \
+ evsignal-internal.h \
+ evthread-internal.h \
+ ht-internal.h \
+ http-internal.h \
+ iocp-internal.h \
+ ipv6-internal.h \
+ kqueue-internal.h \
+ log-internal.h \
+ minheap-internal.h \
+ mm-internal.h \
+ ratelim-internal.h \
+ ratelim-internal.h \
+ strlcpy-internal.h \
+ time-internal.h \
+ util-internal.h
+
+EVENT1_HDRS = \
+ include/evdns.h \
+ include/event.h \
+ include/evhttp.h \
+ include/evrpc.h \
+ include/evutil.h
+
+if INSTALL_LIBEVENT
+include_HEADERS = $(EVENT1_HDRS)
+else
+noinst_HEADERS += $(EVENT1_HDRS)
+endif
+
+AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
+
+verify: check
+
+doxygen: FORCE
+ doxygen $(srcdir)/Doxyfile
+FORCE:
+
+DISTCLEANFILES += *~ libevent.pc ./include/event2/event-config.h
+
diff --git a/sntp/libevent/Makefile.in b/sntp/libevent/Makefile.in
new file mode 100644
index 000000000000..57b43eb7c725
--- /dev/null
+++ b/sntp/libevent/Makefile.in
@@ -0,0 +1,2293 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+# include/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+# sample/include.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+# test/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+@PTHREADS_TRUE@am__append_1 = libevent_pthreads.la
+@PTHREADS_TRUE@am__append_2 = libevent_pthreads.pc
+@OPENSSL_TRUE@am__append_3 = libevent_openssl.la
+@OPENSSL_TRUE@am__append_4 = libevent_openssl.pc
+noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_5)
+EXTRA_PROGRAMS = $(am__EXEEXT_1)
+DIST_COMMON = README $(am__configure_deps) \
+ $(am__dist_bin_SCRIPTS_DIST) $(am__include_HEADERS_DIST) \
+ $(am__include_event2_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(srcdir)/evconfig-private.h.in \
+ $(srcdir)/include/include.am $(srcdir)/libevent.pc.in \
+ $(srcdir)/libevent_openssl.pc.in \
+ $(srcdir)/libevent_pthreads.pc.in $(srcdir)/sample/include.am \
+ $(srcdir)/test/include.am $(top_srcdir)/configure ChangeLog \
+ build-aux/compile build-aux/config.guess build-aux/config.sub \
+ build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \
+ build-aux/missing epoll_sub.c
+@INSTALL_LIBEVENT_FALSE@am__append_5 = $(EVENT2_EXPORT)
+@OPENSSL_TRUE@am__append_6 = sample/le-proxy sample/https-client
+@OPENSSL_TRUE@am__append_7 = \
+@OPENSSL_TRUE@ sample/hostcheck.h \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.h
+
+@BUILD_REGRESS_TRUE@am__append_8 = $(TESTPROGRAMS)
+@BUILD_REGRESS_TRUE@am__append_9 = test/regress
+@BUILD_REGRESS_TRUE@am__append_10 = test/regress.gen.c test/regress.gen.h
+@PTHREADS_TRUE@am__append_11 = libevent_pthreads.la
+@BUILD_WIN32_TRUE@am__append_12 = test/regress_iocp.c
+@OPENSSL_TRUE@am__append_13 = test/regress_ssl.c
+@OPENSSL_TRUE@am__append_14 = $(OPENSSL_INCS)
+@OPENSSL_TRUE@am__append_15 = libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+@STRLCPY_IMPL_TRUE@am__append_16 = strlcpy.c
+@SELECT_BACKEND_TRUE@am__append_17 = select.c
+@POLL_BACKEND_TRUE@am__append_18 = poll.c
+@DEVPOLL_BACKEND_TRUE@am__append_19 = devpoll.c
+@KQUEUE_BACKEND_TRUE@am__append_20 = kqueue.c
+@EPOLL_BACKEND_TRUE@am__append_21 = epoll.c
+@EVPORT_BACKEND_TRUE@am__append_22 = evport.c
+@SIGNAL_SUPPORT_TRUE@am__append_23 = signal.c
+@INSTALL_LIBEVENT_FALSE@am__append_24 = $(EVENT1_HDRS)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_backport_259_ssizet.m4 \
+ $(top_srcdir)/m4/libevent_openssl.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h evconfig-private.h
+CONFIG_CLEAN_FILES = libevent.pc libevent_openssl.pc \
+ libevent_pthreads.pc
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \
+ "$(DESTDIR)$(include_event2dir)" \
+ "$(DESTDIR)$(include_event2dir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libevent_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1)
+am__libevent_la_SOURCES_DIST = buffer.c bufferevent.c \
+ bufferevent_filter.c bufferevent_pair.c bufferevent_ratelim.c \
+ bufferevent_sock.c event.c evmap.c evthread.c evutil.c \
+ evutil_rand.c evutil_time.c listener.c log.c strlcpy.c \
+ select.c poll.c devpoll.c kqueue.c epoll.c evport.c signal.c \
+ win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
+ bufferevent_async.c evdns.c event_tagging.c evrpc.c http.c
+@STRLCPY_IMPL_TRUE@am__objects_1 = strlcpy.lo
+@SELECT_BACKEND_TRUE@am__objects_2 = select.lo
+@POLL_BACKEND_TRUE@am__objects_3 = poll.lo
+@DEVPOLL_BACKEND_TRUE@am__objects_4 = devpoll.lo
+@KQUEUE_BACKEND_TRUE@am__objects_5 = kqueue.lo
+@EPOLL_BACKEND_TRUE@am__objects_6 = epoll.lo
+@EVPORT_BACKEND_TRUE@am__objects_7 = evport.lo
+@SIGNAL_SUPPORT_TRUE@am__objects_8 = signal.lo
+@BUILD_WIN32_FALSE@am__objects_9 = $(am__objects_1) $(am__objects_2) \
+@BUILD_WIN32_FALSE@ $(am__objects_3) $(am__objects_4) \
+@BUILD_WIN32_FALSE@ $(am__objects_5) $(am__objects_6) \
+@BUILD_WIN32_FALSE@ $(am__objects_7) $(am__objects_8)
+@BUILD_WIN32_TRUE@am__objects_9 = win32select.lo evthread_win32.lo \
+@BUILD_WIN32_TRUE@ buffer_iocp.lo event_iocp.lo \
+@BUILD_WIN32_TRUE@ bufferevent_async.lo $(am__objects_1) \
+@BUILD_WIN32_TRUE@ $(am__objects_2) $(am__objects_3) \
+@BUILD_WIN32_TRUE@ $(am__objects_4) $(am__objects_5) \
+@BUILD_WIN32_TRUE@ $(am__objects_6) $(am__objects_7) \
+@BUILD_WIN32_TRUE@ $(am__objects_8)
+am__objects_10 = buffer.lo bufferevent.lo bufferevent_filter.lo \
+ bufferevent_pair.lo bufferevent_ratelim.lo bufferevent_sock.lo \
+ event.lo evmap.lo evthread.lo evutil.lo evutil_rand.lo \
+ evutil_time.lo listener.lo log.lo $(am__objects_9)
+am__objects_11 = evdns.lo event_tagging.lo evrpc.lo http.lo
+am_libevent_la_OBJECTS = $(am__objects_10) $(am__objects_11)
+libevent_la_OBJECTS = $(am_libevent_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libevent_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libevent_la_LDFLAGS) $(LDFLAGS) -o $@
+@INSTALL_LIBEVENT_FALSE@am_libevent_la_rpath =
+@INSTALL_LIBEVENT_TRUE@am_libevent_la_rpath = -rpath $(libdir)
+libevent_core_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1)
+am__libevent_core_la_SOURCES_DIST = buffer.c bufferevent.c \
+ bufferevent_filter.c bufferevent_pair.c bufferevent_ratelim.c \
+ bufferevent_sock.c event.c evmap.c evthread.c evutil.c \
+ evutil_rand.c evutil_time.c listener.c log.c strlcpy.c \
+ select.c poll.c devpoll.c kqueue.c epoll.c evport.c signal.c \
+ win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
+ bufferevent_async.c
+am_libevent_core_la_OBJECTS = $(am__objects_10)
+libevent_core_la_OBJECTS = $(am_libevent_core_la_OBJECTS)
+libevent_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libevent_core_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+@INSTALL_LIBEVENT_FALSE@am_libevent_core_la_rpath =
+@INSTALL_LIBEVENT_TRUE@am_libevent_core_la_rpath = -rpath $(libdir)
+@BUILD_WITH_NO_UNDEFINED_TRUE@am__DEPENDENCIES_2 = libevent_core.la
+libevent_extra_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+am_libevent_extra_la_OBJECTS = $(am__objects_11)
+libevent_extra_la_OBJECTS = $(am_libevent_extra_la_OBJECTS)
+libevent_extra_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libevent_extra_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+@INSTALL_LIBEVENT_FALSE@am_libevent_extra_la_rpath =
+@INSTALL_LIBEVENT_TRUE@am_libevent_extra_la_rpath = -rpath $(libdir)
+@OPENSSL_TRUE@libevent_openssl_la_DEPENDENCIES = \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+am__libevent_openssl_la_SOURCES_DIST = bufferevent_openssl.c
+@OPENSSL_TRUE@am_libevent_openssl_la_OBJECTS = \
+@OPENSSL_TRUE@ libevent_openssl_la-bufferevent_openssl.lo
+libevent_openssl_la_OBJECTS = $(am_libevent_openssl_la_OBJECTS)
+libevent_openssl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libevent_openssl_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+@INSTALL_LIBEVENT_FALSE@@OPENSSL_TRUE@am_libevent_openssl_la_rpath =
+@INSTALL_LIBEVENT_TRUE@@OPENSSL_TRUE@am_libevent_openssl_la_rpath = \
+@INSTALL_LIBEVENT_TRUE@@OPENSSL_TRUE@ -rpath $(libdir)
+@PTHREADS_TRUE@libevent_pthreads_la_DEPENDENCIES = \
+@PTHREADS_TRUE@ $(am__DEPENDENCIES_2)
+am__libevent_pthreads_la_SOURCES_DIST = evthread_pthread.c
+@PTHREADS_TRUE@am_libevent_pthreads_la_OBJECTS = evthread_pthread.lo
+libevent_pthreads_la_OBJECTS = $(am_libevent_pthreads_la_OBJECTS)
+libevent_pthreads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libevent_pthreads_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+@INSTALL_LIBEVENT_FALSE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath =
+@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@am_libevent_pthreads_la_rpath = \
+@INSTALL_LIBEVENT_TRUE@@PTHREADS_TRUE@ -rpath $(libdir)
+@BUILD_REGRESS_TRUE@am__EXEEXT_1 = test/regress$(EXEEXT)
+@OPENSSL_TRUE@am__EXEEXT_2 = sample/le-proxy$(EXEEXT) \
+@OPENSSL_TRUE@ sample/https-client$(EXEEXT)
+am__EXEEXT_3 = sample/dns-example$(EXEEXT) \
+ sample/event-read-fifo$(EXEEXT) sample/hello-world$(EXEEXT) \
+ sample/http-server$(EXEEXT) sample/signal-test$(EXEEXT) \
+ sample/time-test$(EXEEXT) $(am__EXEEXT_2)
+am__EXEEXT_4 = test/bench$(EXEEXT) test/bench_cascade$(EXEEXT) \
+ test/bench_http$(EXEEXT) test/bench_httpclient$(EXEEXT) \
+ test/test-changelist$(EXEEXT) test/test-dumpevents$(EXEEXT) \
+ test/test-eof$(EXEEXT) test/test-closed$(EXEEXT) \
+ test/test-fdleak$(EXEEXT) test/test-init$(EXEEXT) \
+ test/test-ratelim$(EXEEXT) test/test-time$(EXEEXT) \
+ test/test-weof$(EXEEXT) test/regress$(EXEEXT)
+@BUILD_REGRESS_TRUE@am__EXEEXT_5 = $(am__EXEEXT_4)
+PROGRAMS = $(noinst_PROGRAMS)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_sample_dns_example_OBJECTS = sample/dns-example.$(OBJEXT)
+sample_dns_example_OBJECTS = $(am_sample_dns_example_OBJECTS)
+sample_dns_example_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_event_read_fifo_OBJECTS = sample/event-read-fifo.$(OBJEXT)
+sample_event_read_fifo_OBJECTS = $(am_sample_event_read_fifo_OBJECTS)
+sample_event_read_fifo_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ libevent.la
+am_sample_hello_world_OBJECTS = sample/hello-world.$(OBJEXT)
+sample_hello_world_OBJECTS = $(am_sample_hello_world_OBJECTS)
+sample_hello_world_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_http_server_OBJECTS = sample/http-server.$(OBJEXT)
+sample_http_server_OBJECTS = $(am_sample_http_server_OBJECTS)
+sample_http_server_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am__sample_https_client_SOURCES_DIST = sample/https-client.c \
+ sample/hostcheck.c sample/openssl_hostname_validation.c
+@OPENSSL_TRUE@am_sample_https_client_OBJECTS = \
+@OPENSSL_TRUE@ sample/https-client.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/hostcheck.$(OBJEXT) \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.$(OBJEXT)
+sample_https_client_OBJECTS = $(am_sample_https_client_OBJECTS)
+@OPENSSL_TRUE@sample_https_client_DEPENDENCIES = libevent.la \
+@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
+am__sample_le_proxy_SOURCES_DIST = sample/le-proxy.c
+@OPENSSL_TRUE@am_sample_le_proxy_OBJECTS = sample/le-proxy.$(OBJEXT)
+sample_le_proxy_OBJECTS = $(am_sample_le_proxy_OBJECTS)
+@OPENSSL_TRUE@sample_le_proxy_DEPENDENCIES = libevent.la \
+@OPENSSL_TRUE@ libevent_openssl.la $(am__DEPENDENCIES_1) \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_1)
+am_sample_signal_test_OBJECTS = sample/signal-test.$(OBJEXT)
+sample_signal_test_OBJECTS = $(am_sample_signal_test_OBJECTS)
+sample_signal_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_sample_time_test_OBJECTS = sample/time-test.$(OBJEXT)
+sample_time_test_OBJECTS = $(am_sample_time_test_OBJECTS)
+sample_time_test_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_test_bench_OBJECTS = test/bench.$(OBJEXT)
+test_bench_OBJECTS = $(am_test_bench_OBJECTS)
+test_bench_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_test_bench_cascade_OBJECTS = test/bench_cascade.$(OBJEXT)
+test_bench_cascade_OBJECTS = $(am_test_bench_cascade_OBJECTS)
+test_bench_cascade_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_test_bench_http_OBJECTS = test/bench_http.$(OBJEXT)
+test_bench_http_OBJECTS = $(am_test_bench_http_OBJECTS)
+test_bench_http_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la
+am_test_bench_httpclient_OBJECTS = test/bench_httpclient.$(OBJEXT)
+test_bench_httpclient_OBJECTS = $(am_test_bench_httpclient_OBJECTS)
+test_bench_httpclient_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ libevent_core.la
+am__test_regress_SOURCES_DIST = test/regress.c test/regress.gen.c \
+ test/regress.gen.h test/regress_buffer.c \
+ test/regress_bufferevent.c test/regress_dns.c \
+ test/regress_et.c test/regress_finalize.c test/regress_http.c \
+ test/regress_listener.c test/regress_main.c \
+ test/regress_minheap.c test/regress_rpc.c \
+ test/regress_testutils.c test/regress_testutils.h \
+ test/regress_util.c test/tinytest.c test/regress_thread.c \
+ test/regress_zlib.c test/regress_iocp.c test/regress_ssl.c
+@BUILD_WIN32_FALSE@@PTHREADS_TRUE@am__objects_12 = test/test_regress-regress_thread.$(OBJEXT)
+@BUILD_WIN32_TRUE@am__objects_12 = \
+@BUILD_WIN32_TRUE@ test/test_regress-regress_thread.$(OBJEXT)
+@ZLIB_REGRESS_TRUE@am__objects_13 = \
+@ZLIB_REGRESS_TRUE@ test/test_regress-regress_zlib.$(OBJEXT)
+@BUILD_WIN32_TRUE@am__objects_14 = \
+@BUILD_WIN32_TRUE@ test/test_regress-regress_iocp.$(OBJEXT)
+@OPENSSL_TRUE@am__objects_15 = \
+@OPENSSL_TRUE@ test/test_regress-regress_ssl.$(OBJEXT)
+am_test_regress_OBJECTS = test/test_regress-regress.$(OBJEXT) \
+ test/test_regress-regress.gen.$(OBJEXT) \
+ test/test_regress-regress_buffer.$(OBJEXT) \
+ test/test_regress-regress_bufferevent.$(OBJEXT) \
+ test/test_regress-regress_dns.$(OBJEXT) \
+ test/test_regress-regress_et.$(OBJEXT) \
+ test/test_regress-regress_finalize.$(OBJEXT) \
+ test/test_regress-regress_http.$(OBJEXT) \
+ test/test_regress-regress_listener.$(OBJEXT) \
+ test/test_regress-regress_main.$(OBJEXT) \
+ test/test_regress-regress_minheap.$(OBJEXT) \
+ test/test_regress-regress_rpc.$(OBJEXT) \
+ test/test_regress-regress_testutils.$(OBJEXT) \
+ test/test_regress-regress_util.$(OBJEXT) \
+ test/test_regress-tinytest.$(OBJEXT) $(am__objects_12) \
+ $(am__objects_13) $(am__objects_14) $(am__objects_15)
+test_regress_OBJECTS = $(am_test_regress_OBJECTS)
+am__DEPENDENCIES_3 = $(am__append_11)
+@OPENSSL_TRUE@am__DEPENDENCIES_4 = libevent_openssl.la \
+@OPENSSL_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_regress_DEPENDENCIES = $(am__DEPENDENCIES_1) libevent.la \
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_4)
+test_regress_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(test_regress_LDFLAGS) $(LDFLAGS) -o $@
+am_test_test_changelist_OBJECTS = test/test-changelist.$(OBJEXT)
+test_test_changelist_OBJECTS = $(am_test_test_changelist_OBJECTS)
+test_test_changelist_DEPENDENCIES = libevent_core.la
+am_test_test_closed_OBJECTS = test/test-closed.$(OBJEXT)
+test_test_closed_OBJECTS = $(am_test_test_closed_OBJECTS)
+test_test_closed_DEPENDENCIES = libevent_core.la
+am_test_test_dumpevents_OBJECTS = test/test-dumpevents.$(OBJEXT)
+test_test_dumpevents_OBJECTS = $(am_test_test_dumpevents_OBJECTS)
+test_test_dumpevents_DEPENDENCIES = libevent_core.la
+am_test_test_eof_OBJECTS = test/test-eof.$(OBJEXT)
+test_test_eof_OBJECTS = $(am_test_test_eof_OBJECTS)
+test_test_eof_DEPENDENCIES = libevent_core.la
+am_test_test_fdleak_OBJECTS = test/test-fdleak.$(OBJEXT)
+test_test_fdleak_OBJECTS = $(am_test_test_fdleak_OBJECTS)
+test_test_fdleak_DEPENDENCIES = libevent_core.la
+am_test_test_init_OBJECTS = test/test-init.$(OBJEXT)
+test_test_init_OBJECTS = $(am_test_test_init_OBJECTS)
+test_test_init_DEPENDENCIES = libevent_core.la
+am_test_test_ratelim_OBJECTS = test/test-ratelim.$(OBJEXT)
+test_test_ratelim_OBJECTS = $(am_test_test_ratelim_OBJECTS)
+test_test_ratelim_DEPENDENCIES = libevent_core.la
+am_test_test_time_OBJECTS = test/test-time.$(OBJEXT)
+test_test_time_OBJECTS = $(am_test_test_time_OBJECTS)
+test_test_time_DEPENDENCIES = libevent_core.la
+am_test_test_weof_OBJECTS = test/test-weof.$(OBJEXT)
+test_test_weof_OBJECTS = $(am_test_test_weof_OBJECTS)
+test_test_weof_DEPENDENCIES = libevent_core.la
+am__dist_bin_SCRIPTS_DIST = event_rpcgen.py
+SCRIPTS = $(dist_bin_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libevent_la_SOURCES) $(libevent_core_la_SOURCES) \
+ $(libevent_extra_la_SOURCES) $(libevent_openssl_la_SOURCES) \
+ $(libevent_pthreads_la_SOURCES) $(sample_dns_example_SOURCES) \
+ $(sample_event_read_fifo_SOURCES) \
+ $(sample_hello_world_SOURCES) $(sample_http_server_SOURCES) \
+ $(sample_https_client_SOURCES) $(sample_le_proxy_SOURCES) \
+ $(sample_signal_test_SOURCES) $(sample_time_test_SOURCES) \
+ $(test_bench_SOURCES) $(test_bench_cascade_SOURCES) \
+ $(test_bench_http_SOURCES) $(test_bench_httpclient_SOURCES) \
+ $(test_regress_SOURCES) $(test_test_changelist_SOURCES) \
+ $(test_test_closed_SOURCES) $(test_test_dumpevents_SOURCES) \
+ $(test_test_eof_SOURCES) $(test_test_fdleak_SOURCES) \
+ $(test_test_init_SOURCES) $(test_test_ratelim_SOURCES) \
+ $(test_test_time_SOURCES) $(test_test_weof_SOURCES)
+DIST_SOURCES = $(am__libevent_la_SOURCES_DIST) \
+ $(am__libevent_core_la_SOURCES_DIST) \
+ $(libevent_extra_la_SOURCES) \
+ $(am__libevent_openssl_la_SOURCES_DIST) \
+ $(am__libevent_pthreads_la_SOURCES_DIST) \
+ $(sample_dns_example_SOURCES) \
+ $(sample_event_read_fifo_SOURCES) \
+ $(sample_hello_world_SOURCES) $(sample_http_server_SOURCES) \
+ $(am__sample_https_client_SOURCES_DIST) \
+ $(am__sample_le_proxy_SOURCES_DIST) \
+ $(sample_signal_test_SOURCES) $(sample_time_test_SOURCES) \
+ $(test_bench_SOURCES) $(test_bench_cascade_SOURCES) \
+ $(test_bench_http_SOURCES) $(test_bench_httpclient_SOURCES) \
+ $(am__test_regress_SOURCES_DIST) \
+ $(test_test_changelist_SOURCES) $(test_test_closed_SOURCES) \
+ $(test_test_dumpevents_SOURCES) $(test_test_eof_SOURCES) \
+ $(test_test_fdleak_SOURCES) $(test_test_init_SOURCES) \
+ $(test_test_ratelim_SOURCES) $(test_test_time_SOURCES) \
+ $(test_test_weof_SOURCES)
+DATA = $(pkgconfig_DATA)
+am__include_HEADERS_DIST = include/evdns.h include/event.h \
+ include/evhttp.h include/evrpc.h include/evutil.h
+am__include_event2_HEADERS_DIST = include/event2/buffer.h \
+ include/event2/buffer_compat.h include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h include/event2/dns.h \
+ include/event2/dns_compat.h include/event2/dns_struct.h \
+ include/event2/event.h include/event2/event_compat.h \
+ include/event2/event_struct.h include/event2/http.h \
+ include/event2/http_compat.h include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h include/event2/listener.h \
+ include/event2/rpc.h include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h include/event2/tag.h \
+ include/event2/tag_compat.h include/event2/thread.h \
+ include/event2/util.h include/event2/visibility.h
+am__noinst_HEADERS_DIST = include/event2/buffer.h \
+ include/event2/buffer_compat.h include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h include/event2/dns.h \
+ include/event2/dns_compat.h include/event2/dns_struct.h \
+ include/event2/event.h include/event2/event_compat.h \
+ include/event2/event_struct.h include/event2/http.h \
+ include/event2/http_compat.h include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h include/event2/listener.h \
+ include/event2/rpc.h include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h include/event2/tag.h \
+ include/event2/tag_compat.h include/event2/thread.h \
+ include/event2/util.h include/event2/visibility.h \
+ sample/hostcheck.h sample/openssl_hostname_validation.h \
+ test/regress.h test/regress_thread.h test/tinytest.h \
+ test/tinytest_local.h test/tinytest_macros.h \
+ WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
+ bufferevent-internal.h changelist-internal.h \
+ compat/sys/queue.h defer-internal.h epolltable-internal.h \
+ evbuffer-internal.h evconfig-private.h event-internal.h \
+ evmap-internal.h evrpc-internal.h evsignal-internal.h \
+ evthread-internal.h ht-internal.h http-internal.h \
+ iocp-internal.h ipv6-internal.h kqueue-internal.h \
+ log-internal.h minheap-internal.h mm-internal.h \
+ ratelim-internal.h strlcpy-internal.h time-internal.h \
+ util-internal.h include/evdns.h include/event.h \
+ include/evhttp.h include/evrpc.h include/evutil.h
+HEADERS = $(include_HEADERS) $(include_event2_HEADERS) \
+ $(nodist_include_event2_HEADERS) $(nodist_noinst_HEADERS) \
+ $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+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@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EV_LIB_GDI = @EV_LIB_GDI@
+EV_LIB_WS32 = @EV_LIB_WS32@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBEVENT_GC_SECTIONS = @LIBEVENT_GC_SECTIONS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_INCS = @OPENSSL_INCS@
+OPENSSL_LIBADD = @OPENSSL_LIBADD@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@ $(am__append_11)
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# 'foreign' means that we're not enforcing GNU package rules strictly.
+# '1.9' means that we need automake 1.9 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+ACLOCAL_AMFLAGS = -I m4
+
+# This is the "Release" of the Libevent ABI. It takes precedence over
+# the VERSION_INFO, so that two versions of Libevent with the same
+# "Release" are never binary-compatible.
+#
+# This number incremented once for the 2.0 release candidate, and
+# will increment for each series until we revise our interfaces enough
+# that we can seriously expect ABI compatibility between series.
+#
+RELEASE = -release 2.1
+
+# This is the version info for the libevent binary API. It has three
+# numbers:
+# Current -- the number of the binary API that we're implementing
+# Revision -- which iteration of the implementation of the binary
+# API are we supplying?
+# Age -- How many previous binary API versions do we also
+# support?
+#
+# To increment a VERSION_INFO (current:revision:age):
+# If the ABI didn't change:
+# Return (current:revision+1:age)
+# If the ABI changed, but it's backward-compatible:
+# Return (current+1:0:age+1)
+# If the ABI changed and it isn't backward-compatible:
+# Return (current+1:0:0)
+#
+# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
+# UNLESS YOU REALLY REALLY HAVE TO.
+VERSION_INFO = 3:0:0
+
+# History: RELEASE VERSION_INFO
+# 2.0.1-alpha -- 2.0 1:0:0
+# 2.0.2-alpha -- 2:0:0
+# 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.)
+# 2.0.4-alpha -- 3:0:0
+# 2.0.5-beta -- 4:0:0
+# 2.0.6-rc -- 2.0 2:0:0
+# 2.0.7-rc -- 2.0 3:0:1
+# 2.0.8-rc -- 2.0 4:0:2
+# 2.0.9-rc -- 2.0 5:0:0 (ABI changed slightly)
+# 2.0.10-stable-- 2.0 5:1:0 (No ABI change)
+# 2.0.11-stable-- 2.0 6:0:1 (ABI changed, backward-compatible)
+# 2.0.12-stable-- 2.0 6:1:1 (No ABI change)
+# 2.0.13-stable-- 2.0 6:2:1 (No ABI change)
+# 2.0.14-stable-- 2.0 6:3:1 (No ABI change)
+# 2.0.15-stable-- 2.0 6:3:1 (Forgot to update :( )
+# 2.0.16-stable-- 2.0 6:4:1 (No ABI change)
+# 2.0.17-stable-- 2.0 6:5:1 (No ABI change)
+# 2.0.18-stable-- 2.0 6:6:1 (No ABI change)
+# 2.0.19-stable-- 2.0 6:7:1 (No ABI change)
+# 2.0.20-stable-- 2.0 6:8:1 (No ABI change)
+# 2.0.21-stable-- 2.0 6:9:1 (No ABI change)
+#
+# For Libevent 2.1:
+# 2.1.1-alpha -- 2.1 1:0:0
+# 2.1.2-alpha -- 2.1 1:0:0 (should have been 2:0:1)
+# 2.1.3-alpha -- 2.1 3:0:0 (ABI changed slightly)
+
+# ABI version history for this package effectively restarts every time
+# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
+#
+# Ideally, we would not be using RELEASE at all; instead we could just
+# use the VERSION_INFO field to label our backward-incompatible ABI
+# changes, and those would be few and far between. Unfortunately,
+# Libevent still exposes far too many volatile structures in its
+# headers, so we pretty much have to assume that most development
+# series will break ABI compatibility. For now, it's simplest just to
+# keep incrementing the RELEASE between series and resetting VERSION_INFO.
+#
+# Eventually, when we get to the point where the structures in the
+# headers are all non-changing (or not there at all!), we can shift to
+# a more normal worldview where backward-incompatible ABI changes are
+# nice and rare. For the next couple of years, though, 'struct event'
+# is user-visible, and so we can pretty much guarantee that release
+# series won't be binary-compatible.
+@INSTALL_LIBEVENT_TRUE@dist_bin_SCRIPTS = event_rpcgen.py
+pkgconfigdir = $(libdir)/pkgconfig
+LIBEVENT_PKGCONFIG = libevent.pc $(am__append_2) $(am__append_4)
+
+# These sources are conditionally added by configure.ac or conditionally
+# included from other files.
+PLATFORM_DEPENDENT_SRC = \
+ arc4random.c \
+ epoll_sub.c
+
+EXTRA_DIST = ChangeLog-1.4 ChangeLog-2.0 Doxyfile LICENSE \
+ Makefile.nmake test/Makefile.nmake autogen.sh event_rpcgen.py \
+ libevent.pc.in make-event-config.sed whatsnew-2.0.txt \
+ whatsnew-2.1.txt $(PLATFORM_DEPENDENT_SRC) \
+ test/check-dumpevents.py test/regress.gen.c test/regress.gen.h \
+ test/regress.rpc test/rpcgen_wrapper.sh test/test.sh
+LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la \
+ $(am__append_1) $(am__append_3)
+@INSTALL_LIBEVENT_TRUE@lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
+@INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
+@INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
+EXTRA_SOURCE =
+noinst_HEADERS = $(am__append_5) $(am__append_7) test/regress.h \
+ test/regress_thread.h test/tinytest.h test/tinytest_local.h \
+ test/tinytest_macros.h WIN32-Code/nmake/evconfig-private.h \
+ WIN32-Code/nmake/event2/event-config.h WIN32-Code/tree.h \
+ bufferevent-internal.h changelist-internal.h \
+ compat/sys/queue.h defer-internal.h epolltable-internal.h \
+ evbuffer-internal.h evconfig-private.h event-internal.h \
+ evmap-internal.h evrpc-internal.h evsignal-internal.h \
+ evthread-internal.h ht-internal.h http-internal.h \
+ iocp-internal.h ipv6-internal.h kqueue-internal.h \
+ log-internal.h minheap-internal.h mm-internal.h \
+ ratelim-internal.h ratelim-internal.h strlcpy-internal.h \
+ time-internal.h util-internal.h $(am__append_24)
+CLEANFILES = test/rpcgen-attempted
+DISTCLEANFILES = test/test-script.sh test/regress.gen.c \
+ test/regress.gen.h *~ libevent.pc \
+ ./include/event2/event-config.h
+BUILT_SOURCES = $(am__append_10) include/event2/event-config.h
+include_event2dir = $(includedir)/event2
+EVENT2_EXPORT = \
+ include/event2/buffer.h \
+ include/event2/buffer_compat.h \
+ include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h \
+ include/event2/dns.h \
+ include/event2/dns_compat.h \
+ include/event2/dns_struct.h \
+ include/event2/event.h \
+ include/event2/event_compat.h \
+ include/event2/event_struct.h \
+ include/event2/http.h \
+ include/event2/http_compat.h \
+ include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h \
+ include/event2/listener.h \
+ include/event2/rpc.h \
+ include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h \
+ include/event2/tag.h \
+ include/event2/tag_compat.h \
+ include/event2/thread.h \
+ include/event2/util.h \
+ include/event2/visibility.h
+
+@INSTALL_LIBEVENT_TRUE@include_event2_HEADERS = $(EVENT2_EXPORT)
+@INSTALL_LIBEVENT_TRUE@nodist_include_event2_HEADERS = include/event2/event-config.h
+@INSTALL_LIBEVENT_FALSE@nodist_noinst_HEADERS = include/event2/event-config.h
+SAMPLES = sample/dns-example sample/event-read-fifo sample/hello-world \
+ sample/http-server sample/signal-test sample/time-test \
+ $(am__append_6)
+@OPENSSL_TRUE@sample_le_proxy_SOURCES = sample/le-proxy.c
+@OPENSSL_TRUE@sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+@OPENSSL_TRUE@sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
+@OPENSSL_TRUE@sample_https_client_SOURCES = \
+@OPENSSL_TRUE@ sample/https-client.c \
+@OPENSSL_TRUE@ sample/hostcheck.c \
+@OPENSSL_TRUE@ sample/openssl_hostname_validation.c
+
+@OPENSSL_TRUE@sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+@OPENSSL_TRUE@sample_https_client_INCLUDES = $(OPENSSL_INCS)
+sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
+sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_time_test_SOURCES = sample/time-test.c
+sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_signal_test_SOURCES = sample/signal-test.c
+sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_dns_example_SOURCES = sample/dns-example.c
+sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_hello_world_SOURCES = sample/hello-world.c
+sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_server_SOURCES = sample/http-server.c
+sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+regress_CPPFLAGS = -DTINYTEST_LOCAL
+TESTPROGRAMS = \
+ test/bench \
+ test/bench_cascade \
+ test/bench_http \
+ test/bench_httpclient \
+ test/test-changelist \
+ test/test-dumpevents \
+ test/test-eof \
+ test/test-closed \
+ test/test-fdleak \
+ test/test-init \
+ test/test-ratelim \
+ test/test-time \
+ test/test-weof \
+ test/regress
+
+
+# We need to copy this file, since automake doesn't want us to use top_srcdir
+# in TESTS.
+TESTS = test/test-script.sh
+test_test_init_SOURCES = test/test-init.c
+test_test_init_LDADD = libevent_core.la
+test_test_dumpevents_SOURCES = test/test-dumpevents.c
+test_test_dumpevents_LDADD = libevent_core.la
+test_test_eof_SOURCES = test/test-eof.c
+test_test_eof_LDADD = libevent_core.la
+test_test_closed_SOURCES = test/test-closed.c
+test_test_closed_LDADD = libevent_core.la
+test_test_changelist_SOURCES = test/test-changelist.c
+test_test_changelist_LDADD = libevent_core.la
+test_test_weof_SOURCES = test/test-weof.c
+test_test_weof_LDADD = libevent_core.la
+test_test_time_SOURCES = test/test-time.c
+test_test_time_LDADD = libevent_core.la
+test_test_ratelim_SOURCES = test/test-ratelim.c
+test_test_ratelim_LDADD = libevent_core.la -lm
+test_test_fdleak_SOURCES = test/test-fdleak.c
+test_test_fdleak_LDADD = libevent_core.la
+test_regress_SOURCES = test/regress.c test/regress.gen.c \
+ test/regress.gen.h test/regress_buffer.c \
+ test/regress_bufferevent.c test/regress_dns.c \
+ test/regress_et.c test/regress_finalize.c test/regress_http.c \
+ test/regress_listener.c test/regress_main.c \
+ test/regress_minheap.c test/regress_rpc.c \
+ test/regress_testutils.c test/regress_testutils.h \
+ test/regress_util.c test/tinytest.c $(regress_thread_SOURCES) \
+ $(regress_zlib_SOURCES) $(am__append_12) $(am__append_13)
+@BUILD_WIN32_TRUE@regress_thread_SOURCES = test/regress_thread.c
+@PTHREADS_TRUE@regress_thread_SOURCES = test/regress_thread.c
+@ZLIB_REGRESS_TRUE@regress_zlib_SOURCES = test/regress_zlib.c
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la \
+ $(PTHREAD_LIBS) $(ZLIB_LIBS) $(am__append_15)
+test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) \
+ $(ZLIB_CFLAGS) -Itest $(am__append_14)
+test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
+test_bench_SOURCES = test/bench.c
+test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_cascade_SOURCES = test/bench_cascade.c
+test_bench_cascade_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_http_SOURCES = test/bench_http.c
+test_bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_httpclient_SOURCES = test/bench_httpclient.c
+test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
+@BUILD_WIN32_FALSE@SYS_LIBS =
+@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
+@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_16) $(am__append_17) \
+@BUILD_WIN32_FALSE@ $(am__append_18) $(am__append_19) \
+@BUILD_WIN32_FALSE@ $(am__append_20) $(am__append_21) \
+@BUILD_WIN32_FALSE@ $(am__append_22) $(am__append_23)
+@BUILD_WIN32_TRUE@SYS_SRC = win32select.c evthread_win32.c \
+@BUILD_WIN32_TRUE@ buffer_iocp.c event_iocp.c \
+@BUILD_WIN32_TRUE@ bufferevent_async.c $(am__append_16) \
+@BUILD_WIN32_TRUE@ $(am__append_17) $(am__append_18) \
+@BUILD_WIN32_TRUE@ $(am__append_19) $(am__append_20) \
+@BUILD_WIN32_TRUE@ $(am__append_21) $(am__append_22) \
+@BUILD_WIN32_TRUE@ $(am__append_23)
+@BUILD_WIN32_FALSE@SYS_INCLUDES =
+@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake
+CORE_SRC = \
+ buffer.c \
+ bufferevent.c \
+ bufferevent_filter.c \
+ bufferevent_pair.c \
+ bufferevent_ratelim.c \
+ bufferevent_sock.c \
+ event.c \
+ evmap.c \
+ evthread.c \
+ evutil.c \
+ evutil_rand.c \
+ evutil_time.c \
+ listener.c \
+ log.c \
+ $(SYS_SRC)
+
+EXTRAS_SRC = \
+ evdns.c \
+ event_tagging.c \
+ evrpc.c \
+ http.c
+
+@BUILD_WITH_NO_UNDEFINED_FALSE@NO_UNDEFINED =
+@BUILD_WITH_NO_UNDEFINED_TRUE@NO_UNDEFINED = -no-undefined
+@BUILD_WITH_NO_UNDEFINED_FALSE@MAYBE_CORE =
+@BUILD_WITH_NO_UNDEFINED_TRUE@MAYBE_CORE = libevent_core.la
+GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
+libevent_la_SOURCES = $(CORE_SRC) $(EXTRAS_SRC)
+libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
+libevent_core_la_SOURCES = $(CORE_SRC)
+libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
+libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
+@PTHREADS_TRUE@libevent_pthreads_la_SOURCES = evthread_pthread.c
+@PTHREADS_TRUE@libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
+@PTHREADS_TRUE@libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
+libevent_extra_la_SOURCES = $(EXTRAS_SRC)
+libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
+libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
+@OPENSSL_TRUE@libevent_openssl_la_SOURCES = bufferevent_openssl.c
+@OPENSSL_TRUE@libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
+@OPENSSL_TRUE@libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
+@OPENSSL_TRUE@libevent_openssl_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENSSL_INCS)
+EVENT1_HDRS = \
+ include/evdns.h \
+ include/event.h \
+ include/evhttp.h \
+ include/evrpc.h \
+ include/evutil.h
+
+@INSTALL_LIBEVENT_TRUE@include_HEADERS = $(EVENT1_HDRS)
+AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
+all: $(BUILT_SOURCES) config.h evconfig-private.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/include.am $(srcdir)/sample/include.am $(srcdir)/test/include.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) 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: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+evconfig-private.h: stamp-h2
+ @if test ! -f $@; then \
+ rm -f stamp-h2; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \
+ else :; fi
+
+stamp-h2: $(srcdir)/evconfig-private.h.in $(top_builddir)/config.status
+ @rm -f stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status evconfig-private.h
+
+distclean-hdr:
+ -rm -f config.h stamp-h1 evconfig-private.h stamp-h2
+libevent.pc: $(top_builddir)/config.status $(srcdir)/libevent.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libevent_openssl.pc: $(top_builddir)/config.status $(srcdir)/libevent_openssl.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libevent_pthreads.pc: $(top_builddir)/config.status $(srcdir)/libevent_pthreads.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libevent.la: $(libevent_la_OBJECTS) $(libevent_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libevent_la_LINK) $(am_libevent_la_rpath) $(libevent_la_OBJECTS) $(libevent_la_LIBADD) $(LIBS)
+libevent_core.la: $(libevent_core_la_OBJECTS) $(libevent_core_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libevent_core_la_LINK) $(am_libevent_core_la_rpath) $(libevent_core_la_OBJECTS) $(libevent_core_la_LIBADD) $(LIBS)
+libevent_extra.la: $(libevent_extra_la_OBJECTS) $(libevent_extra_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libevent_extra_la_LINK) $(am_libevent_extra_la_rpath) $(libevent_extra_la_OBJECTS) $(libevent_extra_la_LIBADD) $(LIBS)
+libevent_openssl.la: $(libevent_openssl_la_OBJECTS) $(libevent_openssl_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libevent_openssl_la_LINK) $(am_libevent_openssl_la_rpath) $(libevent_openssl_la_OBJECTS) $(libevent_openssl_la_LIBADD) $(LIBS)
+libevent_pthreads.la: $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libevent_pthreads_la_LINK) $(am_libevent_pthreads_la_rpath) $(libevent_pthreads_la_OBJECTS) $(libevent_pthreads_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+sample/$(am__dirstamp):
+ @$(MKDIR_P) sample
+ @: > sample/$(am__dirstamp)
+sample/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) sample/$(DEPDIR)
+ @: > sample/$(DEPDIR)/$(am__dirstamp)
+sample/dns-example.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/dns-example$(EXEEXT): $(sample_dns_example_OBJECTS) $(sample_dns_example_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/dns-example$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_dns_example_OBJECTS) $(sample_dns_example_LDADD) $(LIBS)
+sample/event-read-fifo.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/event-read-fifo$(EXEEXT): $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/event-read-fifo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_event_read_fifo_OBJECTS) $(sample_event_read_fifo_LDADD) $(LIBS)
+sample/hello-world.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/hello-world$(EXEEXT): $(sample_hello_world_OBJECTS) $(sample_hello_world_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/hello-world$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_hello_world_OBJECTS) $(sample_hello_world_LDADD) $(LIBS)
+sample/http-server.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/http-server$(EXEEXT): $(sample_http_server_OBJECTS) $(sample_http_server_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/http-server$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_http_server_OBJECTS) $(sample_http_server_LDADD) $(LIBS)
+sample/https-client.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/hostcheck.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/openssl_hostname_validation.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/https-client$(EXEEXT): $(sample_https_client_OBJECTS) $(sample_https_client_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/https-client$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_https_client_OBJECTS) $(sample_https_client_LDADD) $(LIBS)
+sample/le-proxy.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/le-proxy$(EXEEXT): $(sample_le_proxy_OBJECTS) $(sample_le_proxy_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/le-proxy$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_le_proxy_OBJECTS) $(sample_le_proxy_LDADD) $(LIBS)
+sample/signal-test.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/signal-test$(EXEEXT): $(sample_signal_test_OBJECTS) $(sample_signal_test_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/signal-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_signal_test_OBJECTS) $(sample_signal_test_LDADD) $(LIBS)
+sample/time-test.$(OBJEXT): sample/$(am__dirstamp) \
+ sample/$(DEPDIR)/$(am__dirstamp)
+sample/time-test$(EXEEXT): $(sample_time_test_OBJECTS) $(sample_time_test_DEPENDENCIES) sample/$(am__dirstamp)
+ @rm -f sample/time-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sample_time_test_OBJECTS) $(sample_time_test_LDADD) $(LIBS)
+test/$(am__dirstamp):
+ @$(MKDIR_P) test
+ @: > test/$(am__dirstamp)
+test/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) test/$(DEPDIR)
+ @: > test/$(DEPDIR)/$(am__dirstamp)
+test/bench.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/bench$(EXEEXT): $(test_bench_OBJECTS) $(test_bench_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/bench$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bench_OBJECTS) $(test_bench_LDADD) $(LIBS)
+test/bench_cascade.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/bench_cascade$(EXEEXT): $(test_bench_cascade_OBJECTS) $(test_bench_cascade_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/bench_cascade$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bench_cascade_OBJECTS) $(test_bench_cascade_LDADD) $(LIBS)
+test/bench_http.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/bench_http$(EXEEXT): $(test_bench_http_OBJECTS) $(test_bench_http_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/bench_http$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bench_http_OBJECTS) $(test_bench_http_LDADD) $(LIBS)
+test/bench_httpclient.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/bench_httpclient$(EXEEXT): $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/bench_httpclient$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bench_httpclient_OBJECTS) $(test_bench_httpclient_LDADD) $(LIBS)
+test/test_regress-regress.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress.gen.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_buffer.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_bufferevent.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_dns.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_et.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_finalize.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_http.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_listener.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_main.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_minheap.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_rpc.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_testutils.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_util.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-tinytest.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_thread.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_zlib.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_iocp.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test_regress-regress_ssl.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/regress$(EXEEXT): $(test_regress_OBJECTS) $(test_regress_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/regress$(EXEEXT)
+ $(AM_V_CCLD)$(test_regress_LINK) $(test_regress_OBJECTS) $(test_regress_LDADD) $(LIBS)
+test/test-changelist.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-changelist$(EXEEXT): $(test_test_changelist_OBJECTS) $(test_test_changelist_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-changelist$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_changelist_OBJECTS) $(test_test_changelist_LDADD) $(LIBS)
+test/test-closed.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-closed$(EXEEXT): $(test_test_closed_OBJECTS) $(test_test_closed_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-closed$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_closed_OBJECTS) $(test_test_closed_LDADD) $(LIBS)
+test/test-dumpevents.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-dumpevents$(EXEEXT): $(test_test_dumpevents_OBJECTS) $(test_test_dumpevents_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-dumpevents$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_dumpevents_OBJECTS) $(test_test_dumpevents_LDADD) $(LIBS)
+test/test-eof.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-eof$(EXEEXT): $(test_test_eof_OBJECTS) $(test_test_eof_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-eof$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_eof_OBJECTS) $(test_test_eof_LDADD) $(LIBS)
+test/test-fdleak.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-fdleak$(EXEEXT): $(test_test_fdleak_OBJECTS) $(test_test_fdleak_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-fdleak$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_fdleak_OBJECTS) $(test_test_fdleak_LDADD) $(LIBS)
+test/test-init.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-init$(EXEEXT): $(test_test_init_OBJECTS) $(test_test_init_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-init$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_init_OBJECTS) $(test_test_init_LDADD) $(LIBS)
+test/test-ratelim.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-ratelim$(EXEEXT): $(test_test_ratelim_OBJECTS) $(test_test_ratelim_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-ratelim$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_ratelim_OBJECTS) $(test_test_ratelim_LDADD) $(LIBS)
+test/test-time.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-time$(EXEEXT): $(test_test_time_OBJECTS) $(test_test_time_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_time_OBJECTS) $(test_test_time_LDADD) $(LIBS)
+test/test-weof.$(OBJEXT): test/$(am__dirstamp) \
+ test/$(DEPDIR)/$(am__dirstamp)
+test/test-weof$(EXEEXT): $(test_test_weof_OBJECTS) $(test_test_weof_DEPENDENCIES) test/$(am__dirstamp)
+ @rm -f test/test-weof$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_test_weof_OBJECTS) $(test_test_weof_LDADD) $(LIBS)
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-dist_binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f sample/dns-example.$(OBJEXT)
+ -rm -f sample/event-read-fifo.$(OBJEXT)
+ -rm -f sample/hello-world.$(OBJEXT)
+ -rm -f sample/hostcheck.$(OBJEXT)
+ -rm -f sample/http-server.$(OBJEXT)
+ -rm -f sample/https-client.$(OBJEXT)
+ -rm -f sample/le-proxy.$(OBJEXT)
+ -rm -f sample/openssl_hostname_validation.$(OBJEXT)
+ -rm -f sample/signal-test.$(OBJEXT)
+ -rm -f sample/time-test.$(OBJEXT)
+ -rm -f test/bench.$(OBJEXT)
+ -rm -f test/bench_cascade.$(OBJEXT)
+ -rm -f test/bench_http.$(OBJEXT)
+ -rm -f test/bench_httpclient.$(OBJEXT)
+ -rm -f test/test-changelist.$(OBJEXT)
+ -rm -f test/test-closed.$(OBJEXT)
+ -rm -f test/test-dumpevents.$(OBJEXT)
+ -rm -f test/test-eof.$(OBJEXT)
+ -rm -f test/test-fdleak.$(OBJEXT)
+ -rm -f test/test-init.$(OBJEXT)
+ -rm -f test/test-ratelim.$(OBJEXT)
+ -rm -f test/test-time.$(OBJEXT)
+ -rm -f test/test-weof.$(OBJEXT)
+ -rm -f test/test_regress-regress.$(OBJEXT)
+ -rm -f test/test_regress-regress.gen.$(OBJEXT)
+ -rm -f test/test_regress-regress_buffer.$(OBJEXT)
+ -rm -f test/test_regress-regress_bufferevent.$(OBJEXT)
+ -rm -f test/test_regress-regress_dns.$(OBJEXT)
+ -rm -f test/test_regress-regress_et.$(OBJEXT)
+ -rm -f test/test_regress-regress_finalize.$(OBJEXT)
+ -rm -f test/test_regress-regress_http.$(OBJEXT)
+ -rm -f test/test_regress-regress_iocp.$(OBJEXT)
+ -rm -f test/test_regress-regress_listener.$(OBJEXT)
+ -rm -f test/test_regress-regress_main.$(OBJEXT)
+ -rm -f test/test_regress-regress_minheap.$(OBJEXT)
+ -rm -f test/test_regress-regress_rpc.$(OBJEXT)
+ -rm -f test/test_regress-regress_ssl.$(OBJEXT)
+ -rm -f test/test_regress-regress_testutils.$(OBJEXT)
+ -rm -f test/test_regress-regress_thread.$(OBJEXT)
+ -rm -f test/test_regress-regress_util.$(OBJEXT)
+ -rm -f test/test_regress-regress_zlib.$(OBJEXT)
+ -rm -f test/test_regress-tinytest.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/epoll_sub.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer_iocp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_async.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_filter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_pair.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_ratelim.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferevent_sock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devpoll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evdns.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_iocp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_tagging.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evrpc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_pthread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evthread_win32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_rand.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evutil_time.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kqueue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32select.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/dns-example.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/event-read-fifo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hello-world.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/hostcheck.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/http-server.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/https-client.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/le-proxy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/openssl_hostname_validation.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/signal-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sample/$(DEPDIR)/time-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_cascade.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_http.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/bench_httpclient.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-changelist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-closed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-dumpevents.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-eof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-fdleak.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-ratelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test-weof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress.gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_buffer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_bufferevent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_dns.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_et.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_finalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_http.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_iocp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_listener.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_minheap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_rpc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_ssl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_testutils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_thread.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-regress_zlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_regress-tinytest.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libevent_openssl_la-bufferevent_openssl.lo: bufferevent_openssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libevent_openssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libevent_openssl_la-bufferevent_openssl.lo -MD -MP -MF $(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Tpo -c -o libevent_openssl_la-bufferevent_openssl.lo `test -f 'bufferevent_openssl.c' || echo '$(srcdir)/'`bufferevent_openssl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Tpo $(DEPDIR)/libevent_openssl_la-bufferevent_openssl.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bufferevent_openssl.c' object='libevent_openssl_la-bufferevent_openssl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libevent_openssl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libevent_openssl_la-bufferevent_openssl.lo `test -f 'bufferevent_openssl.c' || echo '$(srcdir)/'`bufferevent_openssl.c
+
+test/test_regress-regress.o: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress.c' object='test/test_regress-regress.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.o `test -f 'test/regress.c' || echo '$(srcdir)/'`test/regress.c
+
+test/test_regress-regress.obj: test/regress.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.Tpo -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.Tpo test/$(DEPDIR)/test_regress-regress.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress.c' object='test/test_regress-regress.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.obj `if test -f 'test/regress.c'; then $(CYGPATH_W) 'test/regress.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.c'; fi`
+
+test/test_regress-regress.gen.o: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress.gen.c' object='test/test_regress-regress.gen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.o `test -f 'test/regress.gen.c' || echo '$(srcdir)/'`test/regress.gen.c
+
+test/test_regress-regress.gen.obj: test/regress.gen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress.gen.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress.gen.Tpo -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress.gen.Tpo test/$(DEPDIR)/test_regress-regress.gen.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress.gen.c' object='test/test_regress-regress.gen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress.gen.obj `if test -f 'test/regress.gen.c'; then $(CYGPATH_W) 'test/regress.gen.c'; else $(CYGPATH_W) '$(srcdir)/test/regress.gen.c'; fi`
+
+test/test_regress-regress_buffer.o: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_buffer.c' object='test/test_regress-regress_buffer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.o `test -f 'test/regress_buffer.c' || echo '$(srcdir)/'`test/regress_buffer.c
+
+test/test_regress-regress_buffer.obj: test/regress_buffer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_buffer.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_buffer.Tpo -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_buffer.Tpo test/$(DEPDIR)/test_regress-regress_buffer.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_buffer.c' object='test/test_regress-regress_buffer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_buffer.obj `if test -f 'test/regress_buffer.c'; then $(CYGPATH_W) 'test/regress_buffer.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_buffer.c'; fi`
+
+test/test_regress-regress_bufferevent.o: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.o `test -f 'test/regress_bufferevent.c' || echo '$(srcdir)/'`test/regress_bufferevent.c
+
+test/test_regress-regress_bufferevent.obj: test/regress_bufferevent.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_bufferevent.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_bufferevent.Tpo test/$(DEPDIR)/test_regress-regress_bufferevent.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_bufferevent.c' object='test/test_regress-regress_bufferevent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_bufferevent.obj `if test -f 'test/regress_bufferevent.c'; then $(CYGPATH_W) 'test/regress_bufferevent.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_bufferevent.c'; fi`
+
+test/test_regress-regress_dns.o: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_dns.c' object='test/test_regress-regress_dns.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.o `test -f 'test/regress_dns.c' || echo '$(srcdir)/'`test/regress_dns.c
+
+test/test_regress-regress_dns.obj: test/regress_dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_dns.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_dns.Tpo -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_dns.Tpo test/$(DEPDIR)/test_regress-regress_dns.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_dns.c' object='test/test_regress-regress_dns.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_dns.obj `if test -f 'test/regress_dns.c'; then $(CYGPATH_W) 'test/regress_dns.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_dns.c'; fi`
+
+test/test_regress-regress_et.o: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_et.c' object='test/test_regress-regress_et.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.o `test -f 'test/regress_et.c' || echo '$(srcdir)/'`test/regress_et.c
+
+test/test_regress-regress_et.obj: test/regress_et.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_et.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_et.Tpo -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_et.Tpo test/$(DEPDIR)/test_regress-regress_et.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_et.c' object='test/test_regress-regress_et.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_et.obj `if test -f 'test/regress_et.c'; then $(CYGPATH_W) 'test/regress_et.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_et.c'; fi`
+
+test/test_regress-regress_finalize.o: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_finalize.c' object='test/test_regress-regress_finalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.o `test -f 'test/regress_finalize.c' || echo '$(srcdir)/'`test/regress_finalize.c
+
+test/test_regress-regress_finalize.obj: test/regress_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_finalize.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_finalize.Tpo -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_finalize.Tpo test/$(DEPDIR)/test_regress-regress_finalize.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_finalize.c' object='test/test_regress-regress_finalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_finalize.obj `if test -f 'test/regress_finalize.c'; then $(CYGPATH_W) 'test/regress_finalize.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_finalize.c'; fi`
+
+test/test_regress-regress_http.o: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_http.c' object='test/test_regress-regress_http.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.o `test -f 'test/regress_http.c' || echo '$(srcdir)/'`test/regress_http.c
+
+test/test_regress-regress_http.obj: test/regress_http.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_http.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_http.Tpo -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_http.Tpo test/$(DEPDIR)/test_regress-regress_http.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_http.c' object='test/test_regress-regress_http.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_http.obj `if test -f 'test/regress_http.c'; then $(CYGPATH_W) 'test/regress_http.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_http.c'; fi`
+
+test/test_regress-regress_listener.o: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_listener.c' object='test/test_regress-regress_listener.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.o `test -f 'test/regress_listener.c' || echo '$(srcdir)/'`test/regress_listener.c
+
+test/test_regress-regress_listener.obj: test/regress_listener.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_listener.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_listener.Tpo -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_listener.Tpo test/$(DEPDIR)/test_regress-regress_listener.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_listener.c' object='test/test_regress-regress_listener.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_listener.obj `if test -f 'test/regress_listener.c'; then $(CYGPATH_W) 'test/regress_listener.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_listener.c'; fi`
+
+test/test_regress-regress_main.o: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_main.c' object='test/test_regress-regress_main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.o `test -f 'test/regress_main.c' || echo '$(srcdir)/'`test/regress_main.c
+
+test/test_regress-regress_main.obj: test/regress_main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_main.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_main.Tpo -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_main.Tpo test/$(DEPDIR)/test_regress-regress_main.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_main.c' object='test/test_regress-regress_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_main.obj `if test -f 'test/regress_main.c'; then $(CYGPATH_W) 'test/regress_main.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_main.c'; fi`
+
+test/test_regress-regress_minheap.o: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_minheap.c' object='test/test_regress-regress_minheap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.o `test -f 'test/regress_minheap.c' || echo '$(srcdir)/'`test/regress_minheap.c
+
+test/test_regress-regress_minheap.obj: test/regress_minheap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_minheap.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_minheap.Tpo -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_minheap.Tpo test/$(DEPDIR)/test_regress-regress_minheap.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_minheap.c' object='test/test_regress-regress_minheap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_minheap.obj `if test -f 'test/regress_minheap.c'; then $(CYGPATH_W) 'test/regress_minheap.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_minheap.c'; fi`
+
+test/test_regress-regress_rpc.o: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_rpc.c' object='test/test_regress-regress_rpc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.o `test -f 'test/regress_rpc.c' || echo '$(srcdir)/'`test/regress_rpc.c
+
+test/test_regress-regress_rpc.obj: test/regress_rpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_rpc.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_rpc.Tpo -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_rpc.Tpo test/$(DEPDIR)/test_regress-regress_rpc.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_rpc.c' object='test/test_regress-regress_rpc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_rpc.obj `if test -f 'test/regress_rpc.c'; then $(CYGPATH_W) 'test/regress_rpc.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_rpc.c'; fi`
+
+test/test_regress-regress_testutils.o: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_testutils.c' object='test/test_regress-regress_testutils.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.o `test -f 'test/regress_testutils.c' || echo '$(srcdir)/'`test/regress_testutils.c
+
+test/test_regress-regress_testutils.obj: test/regress_testutils.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_testutils.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_testutils.Tpo -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_testutils.Tpo test/$(DEPDIR)/test_regress-regress_testutils.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_testutils.c' object='test/test_regress-regress_testutils.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_testutils.obj `if test -f 'test/regress_testutils.c'; then $(CYGPATH_W) 'test/regress_testutils.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_testutils.c'; fi`
+
+test/test_regress-regress_util.o: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_util.c' object='test/test_regress-regress_util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.o `test -f 'test/regress_util.c' || echo '$(srcdir)/'`test/regress_util.c
+
+test/test_regress-regress_util.obj: test/regress_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_util.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_util.Tpo -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_util.Tpo test/$(DEPDIR)/test_regress-regress_util.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_util.c' object='test/test_regress-regress_util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_util.obj `if test -f 'test/regress_util.c'; then $(CYGPATH_W) 'test/regress_util.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_util.c'; fi`
+
+test/test_regress-tinytest.o: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.o -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/tinytest.c' object='test/test_regress-tinytest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.o `test -f 'test/tinytest.c' || echo '$(srcdir)/'`test/tinytest.c
+
+test/test_regress-tinytest.obj: test/tinytest.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-tinytest.obj -MD -MP -MF test/$(DEPDIR)/test_regress-tinytest.Tpo -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-tinytest.Tpo test/$(DEPDIR)/test_regress-tinytest.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/tinytest.c' object='test/test_regress-tinytest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-tinytest.obj `if test -f 'test/tinytest.c'; then $(CYGPATH_W) 'test/tinytest.c'; else $(CYGPATH_W) '$(srcdir)/test/tinytest.c'; fi`
+
+test/test_regress-regress_thread.o: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_thread.c' object='test/test_regress-regress_thread.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.o `test -f 'test/regress_thread.c' || echo '$(srcdir)/'`test/regress_thread.c
+
+test/test_regress-regress_thread.obj: test/regress_thread.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_thread.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_thread.Tpo -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_thread.Tpo test/$(DEPDIR)/test_regress-regress_thread.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_thread.c' object='test/test_regress-regress_thread.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_thread.obj `if test -f 'test/regress_thread.c'; then $(CYGPATH_W) 'test/regress_thread.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_thread.c'; fi`
+
+test/test_regress-regress_zlib.o: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_zlib.c' object='test/test_regress-regress_zlib.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.o `test -f 'test/regress_zlib.c' || echo '$(srcdir)/'`test/regress_zlib.c
+
+test/test_regress-regress_zlib.obj: test/regress_zlib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_zlib.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_zlib.Tpo -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_zlib.Tpo test/$(DEPDIR)/test_regress-regress_zlib.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_zlib.c' object='test/test_regress-regress_zlib.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_zlib.obj `if test -f 'test/regress_zlib.c'; then $(CYGPATH_W) 'test/regress_zlib.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_zlib.c'; fi`
+
+test/test_regress-regress_iocp.o: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_iocp.c' object='test/test_regress-regress_iocp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.o `test -f 'test/regress_iocp.c' || echo '$(srcdir)/'`test/regress_iocp.c
+
+test/test_regress-regress_iocp.obj: test/regress_iocp.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_iocp.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_iocp.Tpo -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_iocp.Tpo test/$(DEPDIR)/test_regress-regress_iocp.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_iocp.c' object='test/test_regress-regress_iocp.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_iocp.obj `if test -f 'test/regress_iocp.c'; then $(CYGPATH_W) 'test/regress_iocp.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_iocp.c'; fi`
+
+test/test_regress-regress_ssl.o: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.o -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_ssl.c' object='test/test_regress-regress_ssl.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.o `test -f 'test/regress_ssl.c' || echo '$(srcdir)/'`test/regress_ssl.c
+
+test/test_regress-regress_ssl.obj: test/regress_ssl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test/test_regress-regress_ssl.obj -MD -MP -MF test/$(DEPDIR)/test_regress-regress_ssl.Tpo -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_regress-regress_ssl.Tpo test/$(DEPDIR)/test_regress-regress_ssl.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test/regress_ssl.c' object='test/test_regress-regress_ssl.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_regress_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test/test_regress-regress_ssl.obj `if test -f 'test/regress_ssl.c'; then $(CYGPATH_W) 'test/regress_ssl.c'; else $(CYGPATH_W) '$(srcdir)/test/regress_ssl.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf sample/.libs sample/_libs
+ -rm -rf test/.libs test/_libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+ done
+
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(includedir)" && rm -f $$files
+install-include_event2HEADERS: $(include_event2_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(include_event2dir)" || $(MKDIR_P) "$(DESTDIR)$(include_event2dir)"
+ @list='$(include_event2_HEADERS)'; test -n "$(include_event2dir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(include_event2dir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(include_event2dir)" || exit $$?; \
+ done
+
+uninstall-include_event2HEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_event2_HEADERS)'; test -n "$(include_event2dir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(include_event2dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(include_event2dir)" && rm -f $$files
+install-nodist_include_event2HEADERS: $(nodist_include_event2_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(include_event2dir)" || $(MKDIR_P) "$(DESTDIR)$(include_event2dir)"
+ @list='$(nodist_include_event2_HEADERS)'; test -n "$(include_event2dir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(include_event2dir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(include_event2dir)" || exit $$?; \
+ done
+
+uninstall-nodist_include_event2HEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_include_event2_HEADERS)'; test -n "$(include_event2dir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(include_event2dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(include_event2dir)" && rm -f $$files
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) config.h.in evconfig-private.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in evconfig-private.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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) config.h.in evconfig-private.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in evconfig-private.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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -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 $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | 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
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__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 ../.. && umask 077 && mkdir "$$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 \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__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
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
+ $(HEADERS) config.h evconfig-private.h
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_event2dir)" "$(DESTDIR)$(include_event2dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+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_sh_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f sample/$(DEPDIR)/$(am__dirstamp)
+ -rm -f sample/$(am__dirstamp)
+ -rm -f test/$(DEPDIR)/$(am__dirstamp)
+ -rm -f test/$(am__dirstamp)
+ -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-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS install-include_event2HEADERS \
+ install-nodist_include_event2HEADERS install-pkgconfigDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-dist_binSCRIPTS install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf $(DEPDIR) ./$(DEPDIR) sample/$(DEPDIR) test/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
+ uninstall-include_event2HEADERS uninstall-libLTLIBRARIES \
+ uninstall-nodist_include_event2HEADERS uninstall-pkgconfigDATA
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
+ clean clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags dist \
+ dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dist_binSCRIPTS \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-includeHEADERS \
+ install-include_event2HEADERS install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-nodist_include_event2HEADERS install-pdf \
+ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-dist_binSCRIPTS uninstall-includeHEADERS \
+ uninstall-include_event2HEADERS uninstall-libLTLIBRARIES \
+ uninstall-nodist_include_event2HEADERS uninstall-pkgconfigDATA
+
+
+$(SAMPLES) : libevent.la
+
+test/test-script.sh: test/test.sh
+ cp $(top_srcdir)/test/test.sh $@
+
+test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
+
+test/rpcgen-attempted: test/regress.rpc event_rpcgen.py test/rpcgen_wrapper.sh
+ $(AM_V_GEN)date -u > $@
+ $(AM_V_at)if $(srcdir)/test/rpcgen_wrapper.sh $(srcdir)/test; then \
+ true; \
+ else \
+ echo "No Python installed; stubbing out RPC test." >&2; \
+ echo " "> test/regress.gen.c; \
+ echo "#define NO_PYTHON_EXISTS" > test/regress.gen.h; \
+ fi
+
+$(TESTPROGRAMS) : libevent.la
+
+include/event2/event-config.h: config.h make-event-config.sed
+ $(AM_V_GEN)test -d include/event2 || $(MKDIR_P) include/event2
+ $(AM_V_at)$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T
+ $(AM_V_at)mv -f $@T $@
+
+verify: check
+
+doxygen: FORCE
+ doxygen $(srcdir)/Doxyfile
+FORCE:
+
+# 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/sntp/libevent/Makefile.nmake b/sntp/libevent/Makefile.nmake
new file mode 100644
index 000000000000..f27cd61949a2
--- /dev/null
+++ b/sntp/libevent/Makefile.nmake
@@ -0,0 +1,82 @@
+# WATCH OUT! This makefile is a work in progress. -*- makefile -*-
+#
+# I'm not very knowledgeable about MSVC and nmake beyond their most basic
+# aspects. If anything here looks wrong to you, please let me know.
+
+# If OPENSSL_DIR is not set, builds without OpenSSL support. If you want
+# OpenSSL support, you can set the OPENSSL_DIR variable to where you
+# installed OpenSSL. This can be done in the environment:
+# set OPENSSL_DIR=c:\openssl
+# Or on the nmake command line:
+# nmake OPENSSL_DIR=C:\openssl -f Makefile.nmake
+# Or by uncommenting the following line here in the makefile...
+
+# OPENSSL_DIR=c:\openssl
+
+!IFDEF OPENSSL_DIR
+SSL_CFLAGS=/I$(OPENSSL_DIR)\include /DEVENT__HAVE_OPENSSL
+!ELSE
+SSL_CFLAGS=
+!ENDIF
+
+# Needed for correctness
+CFLAGS=/IWIN32-Code /IWIN32-Code/nmake /Iinclude /Icompat /DHAVE_CONFIG_H /I. $(SSL_CFLAGS)
+
+# For optimization and warnings
+CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
+
+# XXXX have a debug mode
+
+LIBFLAGS=/nologo
+
+CORE_OBJS=event.obj buffer.obj bufferevent.obj bufferevent_sock.obj \
+ bufferevent_pair.obj listener.obj evmap.obj log.obj evutil.obj \
+ strlcpy.obj signal.obj bufferevent_filter.obj evthread.obj \
+ bufferevent_ratelim.obj evutil_rand.obj evutil_time.obj
+WIN_OBJS=win32select.obj evthread_win32.obj buffer_iocp.obj \
+ event_iocp.obj bufferevent_async.obj
+EXTRA_OBJS=event_tagging.obj http.obj evdns.obj evrpc.obj
+
+!IFDEF OPENSSL_DIR
+SSL_OBJS=bufferevent_openssl.obj
+SSL_LIBS=libevent_openssl.lib
+!ELSE
+SSL_OBJS=
+SSL_LIBS=
+!ENDIF
+
+ALL_OBJS=$(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS) $(SSL_OBJS)
+STATIC_LIBS=libevent_core.lib libevent_extras.lib libevent.lib $(SSL_LIBS)
+
+
+all: static_libs tests
+
+static_libs: $(STATIC_LIBS)
+
+libevent_core.lib: $(CORE_OBJS) $(WIN_OBJS)
+ lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib
+
+libevent_extras.lib: $(EXTRA_OBJS)
+ lib $(LIBFLAGS) $(EXTRA_OBJS) /out:libevent_extras.lib
+
+libevent.lib: $(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
+ lib $(LIBFLAGS) $(CORE_OBJS) $(EXTRA_OBJS) $(WIN_OBJS) /out:libevent.lib
+
+libevent_openssl.lib: $(SSL_OBJS)
+ lib $(LIBFLAGS) $(SSL_OBJS) /out:libevent_openssl.lib
+
+clean:
+ del $(ALL_OBJS)
+ del $(STATIC_LIBS)
+ cd test
+ $(MAKE) /F Makefile.nmake clean
+ cd ..
+
+tests:
+ cd test
+!IFDEF OPENSSL_DIR
+ $(MAKE) OPENSSL_DIR=$(OPENSSL_DIR) /F Makefile.nmake
+!ELSE
+ $(MAKE) /F Makefile.nmake
+!ENDIF
+ cd ..
diff --git a/sntp/libevent/README b/sntp/libevent/README
new file mode 100644
index 000000000000..2723a2cac0c3
--- /dev/null
+++ b/sntp/libevent/README
@@ -0,0 +1,218 @@
+0. BUILDING AND INSTALLATION (Briefly)
+
+$ ./configure
+$ make
+$ make verify # (optional)
+$ sudo make install
+
+1. BUILDING AND INSTALLATION (In Depth)
+
+To build libevent, type
+
+$ ./configure && make
+
+ (If you got libevent from the git repository, you will
+ first need to run the included "autogen.sh" script in order to
+ generate the configure script.)
+
+You can run the regression tests by running
+
+$ make verify
+
+Install as root via
+
+# make install
+
+Before reporting any problems, please run the regression tests.
+
+To enable the low-level tracing build the library as:
+
+ CFLAGS=-DUSE_DEBUG ./configure [...]
+
+Standard configure flags should work. In particular, see:
+
+ --disable-shared Only build static libraries
+ --prefix Install all files relative to this directory.
+
+
+The configure script also supports the following flags:
+
+ --enable-gcc-warnings Enable extra compiler checking with GCC.
+ --disable-malloc-replacement
+ Don't let applications replace our memory
+ management functions
+ --disable-openssl Disable support for OpenSSL encryption.
+ --disable-thread-support Don't support multithreaded environments.
+
+2. USEFUL LINKS:
+
+For the latest released version of Libevent, see the official website at
+http://libevent.org/ .
+
+There's a pretty good work-in-progress manual up at
+ http://www.wangafu.net/~nickm/libevent-book/ .
+
+For the latest development versions of Libevent, access our Git repository
+via
+ "git clone git://levent.git.sourceforge.net/gitroot/levent/libevent"
+
+You can browse the git repository online at
+http://levent.git.sourceforge.net/git/gitweb-index.cgi .
+
+To report bugs, request features, or submit patches to Libevent,
+use the Sourceforge trackers at
+https://sourceforge.net/tracker/?group_id=50884 .
+
+There's also a libevent-users mailing list for talking about Libevent
+use and development: http://archives.seul.org/libevent/users/
+
+3. ACKNOWLEDGMENTS
+
+The following people have helped with suggestions, ideas, code or
+fixing bugs:
+
+ Samy Al Bahra
+ Jacob Appelbaum
+ Arno Bakker
+ Weston Andros Adamson
+ William Ahern
+ Ivan Andropov
+ Sergey Avseyev
+ Avi Bab
+ Joachim Bauch
+ Gilad Benjamini
+ Stas Bekman
+ Denis Bilenko
+ Julien Blache
+ Kevin Bowling
+ Tomash Brechko
+ Kelly Brock
+ Ralph Castain
+ Adrian Chadd
+ Lawnstein Chan
+ Shuo Chen
+ Ka-Hing Cheung
+ Andrew Cox
+ Paul Croome
+ George Danchev
+ Andrew Danforth
+ Ed Day
+ Christopher Davis
+ Mike Davis
+ Antony Dovgal
+ Mihai Draghicioiu
+ Alexander Drozdov
+ Mark Ellzey
+ Shie Erlich
+ Leonid Evdokimov
+ Juan Pablo Fernandez
+ Christophe Fillot
+ Mike Frysinger
+ Remi Gacogne
+ Artem Germanov
+ Alexander von Gernler
+ Artur Grabowski
+ Diwaker Gupta
+ Sebastian Hahn
+ Dave Hart
+ Greg Hazel
+ Michael Herf
+ Sebastian Hahn
+ Savg He
+ Mark Heily
+ Michael Herf
+ Greg Hewgill
+ Andrew Hochhaus
+ Aaron Hopkins
+ Tani Hosokawa
+ Jamie Iles
+ Claudio Jeker
+ Evan Jones
+ George Kadianakis
+ Phua Keat
+ Azat Khuzhin
+ Alexander Klauer
+ Kevin Ko
+ Brian Koehmstedt
+ Marko Kreen
+ Valery Kyholodov
+ Ross Lagerwall
+ Scott Lamb
+ Christopher Layne
+ Adam Langley
+ Graham Leggett
+ Philip Lewis
+ Zhou Li
+ David Libenzi
+ Yan Lin
+ Moshe Litvin
+ Simon Liu
+ Mitchell Livingston
+ Hagne Mahre
+ Lubomir Marinov
+ Abilio Marques
+ Abel Mathew
+ Nick Mathewson
+ James Mansion
+ Nicholas Marriott
+ Andrey Matveev
+ Caitlin Mercer
+ Dagobert Michelsen
+ Andrea Montefusco
+ Mansour Moufid
+ Mina Naguib
+ Felix Nawothnig
+ Trond Norbye
+ Linus Nordberg
+ Richard Nyberg
+ Jon Oberheide
+ Phil Oleson
+ Dave Pacheco
+ Derrick Pallas
+ Tassilo von Parseval
+ Catalin Patulea
+ Patrick Pelletier
+ Simon Perreault
+ Pierre Phaneuf
+ Amarin Phaosawasdi
+ Ryan Phillips
+ Dimitre Piskyulev
+ Pavel Plesov
+ Jon Poland
+ Roman Puls
+ Nate R
+ Robert Ransom
+ Bert JW Regeer
+ Peter Rosin
+ Maseeb Abdul Qadir
+ Wang Qin
+ Alex S
+ Hanna Schroeter
+ Ralf Schmitt
+ Mike Smellie
+ Kevin Springborn
+ Nir Soffer
+ Harlan Stenn
+ Steve Snyder
+ Dug Song
+ Dongsheng Song
+ Hannes Sowa
+ Ferenc Szalai
+ Brodie Thiesfield
+ Jason Toffaletti
+ Gisle Vanem
+ Bas Verhoeven
+ Constantine Verutin
+ Colin Watt
+ Zack Weinberg
+ Jardel Weyrich
+ Jay R. Wren
+ Zack Weinberg
+ Alejo
+ Alex
+ Taral
+ propanbutan
+ mmadia
+ yangacer
+
+If we have forgotten your name, please contact us.
diff --git a/sntp/libevent/WIN32-Code/nmake/evconfig-private.h b/sntp/libevent/WIN32-Code/nmake/evconfig-private.h
new file mode 100644
index 000000000000..88e206272bf9
--- /dev/null
+++ b/sntp/libevent/WIN32-Code/nmake/evconfig-private.h
@@ -0,0 +1,6 @@
+#if !defined(EVENT_EVCONFIG__PRIVATE_H_) && !defined(__MINGW32__)
+#define EVENT_EVCONFIG__PRIVATE_H_
+
+/* Nothing to see here. Move along. */
+
+#endif
diff --git a/sntp/libevent/WIN32-Code/nmake/event2/event-config.h b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
new file mode 100644
index 000000000000..da550283adf4
--- /dev/null
+++ b/sntp/libevent/WIN32-Code/nmake/event2/event-config.h
@@ -0,0 +1,360 @@
+/* event2/event-config.h
+ *
+ * This file was generated by autoconf when libevent was built, and post-
+ * processed by Libevent so that its macros would have a uniform prefix.
+ *
+ * DO NOT EDIT THIS FILE.
+ *
+ * Do not rely on macros in this file existing in later versions.
+ */
+#ifndef EVENT_CONFIG_H__
+#define EVENT_CONFIG_H__
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define if libevent should not allow replacing the mm functions */
+/* #undef EVENT__DISABLE_MM_REPLACEMENT */
+
+/* Define if libevent should not be compiled with thread support */
+/* #undef EVENT__DISABLE_THREAD_SUPPORT */
+
+/* Define if clock_gettime is available in libc */
+/* #undef _EVENT_DNS_USE_CPU_CLOCK_FOR_ID */
+
+/* Define is no secure id variant is available */
+/* #define _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID 1 */
+#define EVENT_DNS_USE_FTIME_FOR_ID_ 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+/* #undef EVENT__HAVE_ARPA_INET_H */
+
+/* Define to 1 if you have the `clock_gettime' function. */
+/* #undef EVENT__HAVE_CLOCK_GETTIME */
+
+/* Define if /dev/poll is available */
+/* #undef EVENT__HAVE_DEVPOLL */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef EVENT__HAVE_DLFCN_H */
+
+/* Define if your system supports the epoll system calls */
+/* #undef EVENT__HAVE_EPOLL */
+
+/* Define to 1 if you have the `epoll_ctl' function. */
+/* #undef EVENT__HAVE_EPOLL_CTL */
+
+/* Define to 1 if you have the `eventfd' function. */
+/* #undef EVENT__HAVE_EVENTFD */
+
+/* Define if your system supports event ports */
+/* #undef EVENT__HAVE_EVENT_PORTS */
+
+/* Define to 1 if you have the `fcntl' function. */
+/* #undef EVENT__HAVE_FCNTL */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define EVENT__HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#define EVENT__HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#define EVENT__HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#define EVENT__HAVE_GETPROTOBYNUMBER 1
+
+/* Define to 1 if you have the `getservbyname' function. */
+#define EVENT__HAVE_GETSERVBYNAME 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+/* #define EVENT__HAVE_GETTIMEOFDAY 1 */
+
+/* Define to 1 if you have the `inet_ntop' function. */
+/* #undef EVENT__HAVE_INET_NTOP */
+
+/* Define to 1 if you have the `inet_pton' function. */
+/* #undef EVENT__HAVE_INET_PTON */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #define EVENT__HAVE_INTTYPES_H 1 */
+
+/* Define to 1 if you have the `kqueue' function. */
+/* #undef EVENT__HAVE_KQUEUE */
+
+/* Define if the system has zlib */
+/* #undef EVENT__HAVE_LIBZ */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define EVENT__HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mmap' function. */
+/* #undef EVENT__HAVE_MMAP */
+
+/* Define to 1 if you have the <netinet/in6.h> header file. */
+/* #undef EVENT__HAVE_NETINET_IN6_H */
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+/* #undef EVENT__HAVE_NETINET_IN_H */
+
+/* Define to 1 if you have the `pipe' function. */
+/* #undef EVENT__HAVE_PIPE */
+
+/* Define to 1 if you have the `poll' function. */
+/* #undef EVENT__HAVE_POLL */
+
+/* Define to 1 if you have the <poll.h> header file. */
+/* #undef EVENT__HAVE_POLL_H */
+
+/* Define to 1 if you have the `port_create' function. */
+/* #undef EVENT__HAVE_PORT_CREATE */
+
+/* Define to 1 if you have the <port.h> header file. */
+/* #undef EVENT__HAVE_PORT_H */
+
+/* Define if you have POSIX threads libraries and header files. */
+/* #undef EVENT__HAVE_PTHREAD */
+
+/* Define if we have pthreads on this system */
+/* #undef EVENT__HAVE_PTHREADS */
+
+/* Define to 1 if the system has the type `sa_family_t'. */
+/* #undef EVENT__HAVE_SA_FAMILY_T */
+
+/* Define to 1 if you have the `select' function. */
+/* #undef EVENT__HAVE_SELECT */
+
+/* Define to 1 if you have the `sendfile' function. */
+/* #undef EVENT__HAVE_SENDFILE */
+
+/* Define if F_SETFD is defined in <fcntl.h> */
+/* #undef EVENT__HAVE_SETFD */
+
+/* Define to 1 if you have the `sigaction' function. */
+/* #undef EVENT__HAVE_SIGACTION */
+
+/* Define to 1 if you have the `signal' function. */
+#define EVENT__HAVE_SIGNAL 1
+
+/* Define to 1 if you have the `splice' function. */
+/* #undef EVENT__HAVE_SPLICE */
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define EVENT__HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define EVENT__HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #define EVENT__HAVE_STDINT_H 1 */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define EVENT__HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define EVENT__HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define EVENT__HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+/* #undef EVENT__HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strsep' function. */
+/* #undef EVENT__HAVE_STRSEP */
+
+/* Define to 1 if you have the `strtok_r' function. */
+/* #undef EVENT__HAVE_STRTOK_R */
+
+/* Define to 1 if you have the `strtoll' function. */
+/* #define EVENT__HAVE_STRTOLL 1 */
+
+#define EVENT__HAVE_STRUCT_ADDRINFO 1
+
+/* Define to 1 if the system has the type `struct in6_addr'. */
+#define EVENT__HAVE_STRUCT_IN6_ADDR 1
+
+/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
+#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
+
+/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
+#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
+
+/* Define to 1 if the system has the type `struct sockaddr_in6'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
+
+/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
+
+/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
+/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
+
+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
+#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
+
+/* Define to 1 if you have the <sys/devpoll.h> header file. */
+/* #undef EVENT__HAVE_SYS_DEVPOLL_H */
+
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+/* #undef EVENT__HAVE_SYS_EPOLL_H */
+
+/* Define to 1 if you have the <sys/eventfd.h> header file. */
+/* #undef EVENT__HAVE_SYS_EVENTFD_H */
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+/* #undef EVENT__HAVE_SYS_EVENT_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/* #undef EVENT__HAVE_SYS_IOCTL_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+/* #undef EVENT__HAVE_SYS_MMAN_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+/* #define EVENT__HAVE_SYS_PARAM_H 1 */
+
+/* Define to 1 if you have the <sys/queue.h> header file. */
+/* #undef EVENT__HAVE_SYS_QUEUE_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+/* #undef EVENT__HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the <sys/sendfile.h> header file. */
+/* #undef EVENT__HAVE_SYS_SENDFILE_H */
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef EVENT__HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define EVENT__HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+/* #define EVENT__HAVE_SYS_TIME_H 1 */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define EVENT__HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+/* #undef EVENT__HAVE_SYS_UIO_H */
+
+/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
+/* #undef EVENT__HAVE_TAILQFOREACH */
+
+/* Define if timeradd is defined in <sys/time.h> */
+/* #undef EVENT__HAVE_TIMERADD */
+
+/* Define if timerclear is defined in <sys/time.h> */
+#define EVENT__HAVE_TIMERCLEAR 1
+
+/* Define if timercmp is defined in <sys/time.h> */
+#define EVENT__HAVE_TIMERCMP 1
+
+/* Define if timerisset is defined in <sys/time.h> */
+#define EVENT__HAVE_TIMERISSET 1
+
+/* Define to 1 if the system has the type `uint16_t'. */
+/* #define EVENT__HAVE_UINT16_T 1 */
+
+/* Define to 1 if the system has the type `uint32_t'. */
+/* #define EVENT__HAVE_UINT32_T 1 */
+
+/* Define to 1 if the system has the type `uint64_t'. */
+/* #define EVENT__HAVE_UINT64_T 1 */
+
+/* Define to 1 if the system has the type `uint8_t'. */
+/* #define EVENT__HAVE_UINT8_T 1 */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #define EVENT__HAVE_UNISTD_H 1 */
+
+/* Define to 1 if you have the `vasprintf' function. */
+/* #undef EVENT__HAVE_VASPRINTF */
+
+/* Define if kqueue works correctly with pipes */
+/* #undef EVENT__HAVE_WORKING_KQUEUE */
+
+/* Numeric representation of the version */
+#define EVENT__NUMERIC_VERSION 0x02010301
+
+/* Name of package */
+#define EVENT__PACKAGE "libevent"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define EVENT__PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define EVENT__PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define EVENT__PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define EVENT__PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define EVENT__PACKAGE_VERSION ""
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef EVENT__PTHREAD_CREATE_JOINABLE */
+
+/* The size of a `int', as computed by sizeof. */
+#define EVENT__SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG 4
+
+/* The size of a `long long', as computed by sizeof. */
+#define EVENT__SIZEOF_LONG_LONG 8
+
+/* The size of a `short', as computed by sizeof. */
+#define EVENT__SIZEOF_SHORT 2
+
+/* The size of `size_t', as computed by sizeof. */
+#ifdef _WIN64
+#define EVENT__SIZEOF_SIZE_T 8
+#else
+#define EVENT__SIZEOF_SIZE_T 4
+#endif
+
+/* The size of `void *', as computed by sizeof. */
+#ifdef _WIN64
+#define EVENT__SIZEOF_VOID_P 8
+#else
+#define EVENT__SIZEOF_VOID_P 4
+#endif
+
+/* Define to 1 if you have the ANSI C header files. */
+#define EVENT__STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define EVENT__TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define EVENT__VERSION "2.1.3-alpha-dev"
+
+/* Define to appropriate substitue if compiler doesnt have __func__ */
+#define EVENT____func__ __FUNCTION__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef EVENT__const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef _EVENT___cplusplus
+#define EVENT__inline __inline
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef EVENT__pid_t */
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef EVENT__size_t */
+
+/* Define to unsigned int if you dont have it */
+#define EVENT__socklen_t unsigned int
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define EVENT__ssize_t SSIZE_T
+
+#endif
diff --git a/sntp/libevent/WIN32-Code/tree.h b/sntp/libevent/WIN32-Code/tree.h
new file mode 100644
index 000000000000..585618dde0c0
--- /dev/null
+++ b/sntp/libevent/WIN32-Code/tree.h
@@ -0,0 +1,1354 @@
+/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _SYS_TREE_H_
+#define _SYS_TREE_H_
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure. Every operation
+ * on the tree causes a splay to happen. The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree. On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n). The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute. It fulfills a set of conditions:
+ * - every search path from the root to a leaf consists of the
+ * same number of black nodes,
+ * - each red node (except for the root) has a black parent,
+ * - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type) \
+struct name { \
+ struct type *sph_root; /* root of the tree */ \
+}
+
+#define SPLAY_INITIALIZER(root) \
+ { NULL }
+
+#define SPLAY_INIT(root) do { \
+ (root)->sph_root = NULL; \
+} while (0)
+
+#define SPLAY_ENTRY(type) \
+struct { \
+ struct type *spe_left; /* left element */ \
+ struct type *spe_right; /* right element */ \
+}
+
+#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
+#define SPLAY_ROOT(head) (head)->sph_root
+#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do { \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
+} while (0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do { \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
+} while (0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
+ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
+ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
+} while (0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp) \
+void name##_SPLAY(struct name *, struct type *); \
+void name##_SPLAY_MINMAX(struct name *, int); \
+struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
+ \
+/* Finds the node with the same key as elm */ \
+static __inline struct type * \
+name##_SPLAY_FIND(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) \
+ return(NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) \
+ return (head->sph_root); \
+ return (NULL); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_NEXT(struct name *head, struct type *elm) \
+{ \
+ name##_SPLAY(head, elm); \
+ if (SPLAY_RIGHT(elm, field) != NULL) { \
+ elm = SPLAY_RIGHT(elm, field); \
+ while (SPLAY_LEFT(elm, field) != NULL) { \
+ elm = SPLAY_LEFT(elm, field); \
+ } \
+ } else \
+ elm = NULL; \
+ return (elm); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_MIN_MAX(struct name *head, int val) \
+{ \
+ name##_SPLAY_MINMAX(head, val); \
+ return (SPLAY_ROOT(head)); \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp) \
+struct type * \
+name##_SPLAY_INSERT(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) { \
+ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
+ } else { \
+ int __comp; \
+ name##_SPLAY(head, elm); \
+ __comp = (cmp)(elm, (head)->sph_root); \
+ if(__comp < 0) { \
+ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+ SPLAY_RIGHT(elm, field) = (head)->sph_root; \
+ SPLAY_LEFT((head)->sph_root, field) = NULL; \
+ } else if (__comp > 0) { \
+ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT(elm, field) = (head)->sph_root; \
+ SPLAY_RIGHT((head)->sph_root, field) = NULL; \
+ } else \
+ return ((head)->sph_root); \
+ } \
+ (head)->sph_root = (elm); \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *__tmp; \
+ if (SPLAY_EMPTY(head)) \
+ return (NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) { \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+ } else { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+ name##_SPLAY(head, elm); \
+ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
+ } \
+ return (elm); \
+ } \
+ return (NULL); \
+} \
+ \
+void \
+name##_SPLAY(struct name *head, struct type *elm) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+ int __comp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while ((__comp = (cmp)(elm, (head)->sph_root))) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) > 0){ \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+} \
+ \
+/* Splay with either the minimum or the maximum element \
+ * Used to find minimum or maximum element in tree. \
+ */ \
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while (1) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp > 0) { \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+}
+
+#define SPLAY_NEGINF -1
+#define SPLAY_INF 1
+
+#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head) \
+ for ((x) = SPLAY_MIN(name, head); \
+ (x) != NULL; \
+ (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-back tree */
+#define RB_HEAD(name, type) \
+struct name { \
+ struct type *rbh_root; /* root of the tree */ \
+}
+
+#define RB_INITIALIZER(root) \
+ { NULL }
+
+#define RB_INIT(root) do { \
+ (root)->rbh_root = NULL; \
+} while (0)
+
+#define RB_BLACK 0
+#define RB_RED 1
+#define RB_ENTRY(type) \
+struct { \
+ struct type *rbe_left; /* left element */ \
+ struct type *rbe_right; /* right element */ \
+ struct type *rbe_parent; /* parent element */ \
+ int rbe_color; /* node color */ \
+}
+
+#define RB_LEFT(elm, field) (elm)->field.rbe_left
+#define RB_RIGHT(elm, field) (elm)->field.rbe_right
+#define RB_PARENT(elm, field) (elm)->field.rbe_parent
+#define RB_COLOR(elm, field) (elm)->field.rbe_color
+#define RB_ROOT(head) (head)->rbh_root
+#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do { \
+ RB_PARENT(elm, field) = parent; \
+ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
+ RB_COLOR(elm, field) = RB_RED; \
+} while (0)
+
+#define RB_SET_BLACKRED(black, red, field) do { \
+ RB_COLOR(black, field) = RB_BLACK; \
+ RB_COLOR(red, field) = RB_RED; \
+} while (0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
+ (tmp) = RB_RIGHT(elm, field); \
+ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \
+ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_LEFT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
+ (tmp) = RB_LEFT(elm, field); \
+ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \
+ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_RIGHT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp) \
+void name##_RB_INSERT_COLOR(struct name *, struct type *); \
+void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
+struct type *name##_RB_REMOVE(struct name *, struct type *); \
+struct type *name##_RB_INSERT(struct name *, struct type *); \
+struct type *name##_RB_FIND(struct name *, struct type *); \
+struct type *name##_RB_NEXT(struct type *); \
+struct type *name##_RB_MINMAX(struct name *, int); \
+ \
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define RB_GENERATE(name, type, field, cmp) \
+void \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
+{ \
+ struct type *parent, *gparent, *tmp; \
+ while ((parent = RB_PARENT(elm, field)) && \
+ RB_COLOR(parent, field) == RB_RED) { \
+ gparent = RB_PARENT(parent, field); \
+ if (parent == RB_LEFT(gparent, field)) { \
+ tmp = RB_RIGHT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_RIGHT(parent, field) == elm) { \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_RIGHT(head, gparent, tmp, field); \
+ } else { \
+ tmp = RB_LEFT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_LEFT(parent, field) == elm) { \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_LEFT(head, gparent, tmp, field); \
+ } \
+ } \
+ RB_COLOR(head->rbh_root, field) = RB_BLACK; \
+} \
+ \
+void \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{ \
+ struct type *tmp; \
+ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
+ elm != RB_ROOT(head)) { \
+ if (RB_LEFT(parent, field) == elm) { \
+ tmp = RB_RIGHT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+ struct type *oleft; \
+ if ((oleft = RB_LEFT(tmp, field)))\
+ RB_COLOR(oleft, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_RIGHT(tmp, field)) \
+ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } else { \
+ tmp = RB_LEFT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+ struct type *oright; \
+ if ((oright = RB_RIGHT(tmp, field)))\
+ RB_COLOR(oright, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_LEFT(head, tmp, oright, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_LEFT(tmp, field)) \
+ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } \
+ } \
+ if (elm) \
+ RB_COLOR(elm, field) = RB_BLACK; \
+} \
+ \
+struct type * \
+name##_RB_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *child, *parent, *old = elm; \
+ int color; \
+ if (RB_LEFT(elm, field) == NULL) \
+ child = RB_RIGHT(elm, field); \
+ else if (RB_RIGHT(elm, field) == NULL) \
+ child = RB_LEFT(elm, field); \
+ else { \
+ struct type *left; \
+ elm = RB_RIGHT(elm, field); \
+ while ((left = RB_LEFT(elm, field))) \
+ elm = left; \
+ child = RB_RIGHT(elm, field); \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+ if (RB_PARENT(elm, field) == old) \
+ parent = elm; \
+ (elm)->field = (old)->field; \
+ if (RB_PARENT(old, field)) { \
+ if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+ RB_LEFT(RB_PARENT(old, field), field) = elm;\
+ else \
+ RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+ RB_AUGMENT(RB_PARENT(old, field)); \
+ } else \
+ RB_ROOT(head) = elm; \
+ RB_PARENT(RB_LEFT(old, field), field) = elm; \
+ if (RB_RIGHT(old, field)) \
+ RB_PARENT(RB_RIGHT(old, field), field) = elm; \
+ if (parent) { \
+ left = parent; \
+ do { \
+ RB_AUGMENT(left); \
+ } while ((left = RB_PARENT(left, field))); \
+ } \
+ goto color; \
+ } \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+color: \
+ if (color == RB_BLACK) \
+ name##_RB_REMOVE_COLOR(head, parent, child); \
+ return (old); \
+} \
+ \
+/* Inserts a node into the RB tree */ \
+struct type * \
+name##_RB_INSERT(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp; \
+ struct type *parent = NULL; \
+ int comp = 0; \
+ tmp = RB_ROOT(head); \
+ while (tmp) { \
+ parent = tmp; \
+ comp = (cmp)(elm, parent); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ RB_SET(elm, parent, field); \
+ if (parent != NULL) { \
+ if (comp < 0) \
+ RB_LEFT(parent, field) = elm; \
+ else \
+ RB_RIGHT(parent, field) = elm; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = elm; \
+ name##_RB_INSERT_COLOR(head, elm); \
+ return (NULL); \
+} \
+ \
+/* Finds the node with the same key as elm */ \
+struct type * \
+name##_RB_FIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_RB_NEXT(struct type *elm) \
+{ \
+ if (RB_RIGHT(elm, field)) { \
+ elm = RB_RIGHT(elm, field); \
+ while (RB_LEFT(elm, field)) \
+ elm = RB_LEFT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+} \
+ \
+struct type * \
+name##_RB_MINMAX(struct name *head, int val) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *parent = NULL; \
+ while (tmp) { \
+ parent = tmp; \
+ if (val < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else \
+ tmp = RB_RIGHT(tmp, field); \
+ } \
+ return (parent); \
+}
+
+#define RB_NEGINF -1
+#define RB_INF 1
+
+#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
+#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
+#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head) \
+ for ((x) = RB_MIN(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_NEXT(x))
+
+#endif /* _SYS_TREE_H_ */
+/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _SYS_TREE_H_
+#define _SYS_TREE_H_
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure. Every operation
+ * on the tree causes a splay to happen. The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree. On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n). The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute. It fulfills a set of conditions:
+ * - every search path from the root to a leaf consists of the
+ * same number of black nodes,
+ * - each red node (except for the root) has a black parent,
+ * - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type) \
+struct name { \
+ struct type *sph_root; /* root of the tree */ \
+}
+
+#define SPLAY_INITIALIZER(root) \
+ { NULL }
+
+#define SPLAY_INIT(root) do { \
+ (root)->sph_root = NULL; \
+} while (0)
+
+#define SPLAY_ENTRY(type) \
+struct { \
+ struct type *spe_left; /* left element */ \
+ struct type *spe_right; /* right element */ \
+}
+
+#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
+#define SPLAY_ROOT(head) (head)->sph_root
+#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do { \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
+} while (0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do { \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
+} while (0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
+ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
+ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
+} while (0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp) \
+void name##_SPLAY(struct name *, struct type *); \
+void name##_SPLAY_MINMAX(struct name *, int); \
+struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
+ \
+/* Finds the node with the same key as elm */ \
+static __inline struct type * \
+name##_SPLAY_FIND(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) \
+ return(NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) \
+ return (head->sph_root); \
+ return (NULL); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_NEXT(struct name *head, struct type *elm) \
+{ \
+ name##_SPLAY(head, elm); \
+ if (SPLAY_RIGHT(elm, field) != NULL) { \
+ elm = SPLAY_RIGHT(elm, field); \
+ while (SPLAY_LEFT(elm, field) != NULL) { \
+ elm = SPLAY_LEFT(elm, field); \
+ } \
+ } else \
+ elm = NULL; \
+ return (elm); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_MIN_MAX(struct name *head, int val) \
+{ \
+ name##_SPLAY_MINMAX(head, val); \
+ return (SPLAY_ROOT(head)); \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp) \
+struct type * \
+name##_SPLAY_INSERT(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) { \
+ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
+ } else { \
+ int __comp; \
+ name##_SPLAY(head, elm); \
+ __comp = (cmp)(elm, (head)->sph_root); \
+ if(__comp < 0) { \
+ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+ SPLAY_RIGHT(elm, field) = (head)->sph_root; \
+ SPLAY_LEFT((head)->sph_root, field) = NULL; \
+ } else if (__comp > 0) { \
+ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT(elm, field) = (head)->sph_root; \
+ SPLAY_RIGHT((head)->sph_root, field) = NULL; \
+ } else \
+ return ((head)->sph_root); \
+ } \
+ (head)->sph_root = (elm); \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *__tmp; \
+ if (SPLAY_EMPTY(head)) \
+ return (NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) { \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+ } else { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+ name##_SPLAY(head, elm); \
+ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
+ } \
+ return (elm); \
+ } \
+ return (NULL); \
+} \
+ \
+void \
+name##_SPLAY(struct name *head, struct type *elm) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+ int __comp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while ((__comp = (cmp)(elm, (head)->sph_root))) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) > 0){ \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+} \
+ \
+/* Splay with either the minimum or the maximum element \
+ * Used to find minimum or maximum element in tree. \
+ */ \
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while (1) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp > 0) { \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+}
+
+#define SPLAY_NEGINF -1
+#define SPLAY_INF 1
+
+#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head) \
+ for ((x) = SPLAY_MIN(name, head); \
+ (x) != NULL; \
+ (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-back tree */
+#define RB_HEAD(name, type) \
+struct name { \
+ struct type *rbh_root; /* root of the tree */ \
+}
+
+#define RB_INITIALIZER(root) \
+ { NULL }
+
+#define RB_INIT(root) do { \
+ (root)->rbh_root = NULL; \
+} while (0)
+
+#define RB_BLACK 0
+#define RB_RED 1
+#define RB_ENTRY(type) \
+struct { \
+ struct type *rbe_left; /* left element */ \
+ struct type *rbe_right; /* right element */ \
+ struct type *rbe_parent; /* parent element */ \
+ int rbe_color; /* node color */ \
+}
+
+#define RB_LEFT(elm, field) (elm)->field.rbe_left
+#define RB_RIGHT(elm, field) (elm)->field.rbe_right
+#define RB_PARENT(elm, field) (elm)->field.rbe_parent
+#define RB_COLOR(elm, field) (elm)->field.rbe_color
+#define RB_ROOT(head) (head)->rbh_root
+#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do { \
+ RB_PARENT(elm, field) = parent; \
+ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
+ RB_COLOR(elm, field) = RB_RED; \
+} while (0)
+
+#define RB_SET_BLACKRED(black, red, field) do { \
+ RB_COLOR(black, field) = RB_BLACK; \
+ RB_COLOR(red, field) = RB_RED; \
+} while (0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
+ (tmp) = RB_RIGHT(elm, field); \
+ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \
+ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_LEFT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
+ (tmp) = RB_LEFT(elm, field); \
+ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \
+ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_RIGHT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp) \
+void name##_RB_INSERT_COLOR(struct name *, struct type *); \
+void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
+struct type *name##_RB_REMOVE(struct name *, struct type *); \
+struct type *name##_RB_INSERT(struct name *, struct type *); \
+struct type *name##_RB_FIND(struct name *, struct type *); \
+struct type *name##_RB_NEXT(struct type *); \
+struct type *name##_RB_MINMAX(struct name *, int); \
+ \
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define RB_GENERATE(name, type, field, cmp) \
+void \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
+{ \
+ struct type *parent, *gparent, *tmp; \
+ while ((parent = RB_PARENT(elm, field)) && \
+ RB_COLOR(parent, field) == RB_RED) { \
+ gparent = RB_PARENT(parent, field); \
+ if (parent == RB_LEFT(gparent, field)) { \
+ tmp = RB_RIGHT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_RIGHT(parent, field) == elm) { \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_RIGHT(head, gparent, tmp, field); \
+ } else { \
+ tmp = RB_LEFT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_LEFT(parent, field) == elm) { \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_LEFT(head, gparent, tmp, field); \
+ } \
+ } \
+ RB_COLOR(head->rbh_root, field) = RB_BLACK; \
+} \
+ \
+void \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{ \
+ struct type *tmp; \
+ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
+ elm != RB_ROOT(head)) { \
+ if (RB_LEFT(parent, field) == elm) { \
+ tmp = RB_RIGHT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+ struct type *oleft; \
+ if ((oleft = RB_LEFT(tmp, field)))\
+ RB_COLOR(oleft, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_RIGHT(tmp, field)) \
+ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } else { \
+ tmp = RB_LEFT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+ struct type *oright; \
+ if ((oright = RB_RIGHT(tmp, field)))\
+ RB_COLOR(oright, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_LEFT(head, tmp, oright, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_LEFT(tmp, field)) \
+ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } \
+ } \
+ if (elm) \
+ RB_COLOR(elm, field) = RB_BLACK; \
+} \
+ \
+struct type * \
+name##_RB_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *child, *parent, *old = elm; \
+ int color; \
+ if (RB_LEFT(elm, field) == NULL) \
+ child = RB_RIGHT(elm, field); \
+ else if (RB_RIGHT(elm, field) == NULL) \
+ child = RB_LEFT(elm, field); \
+ else { \
+ struct type *left; \
+ elm = RB_RIGHT(elm, field); \
+ while ((left = RB_LEFT(elm, field))) \
+ elm = left; \
+ child = RB_RIGHT(elm, field); \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+ if (RB_PARENT(elm, field) == old) \
+ parent = elm; \
+ (elm)->field = (old)->field; \
+ if (RB_PARENT(old, field)) { \
+ if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+ RB_LEFT(RB_PARENT(old, field), field) = elm;\
+ else \
+ RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+ RB_AUGMENT(RB_PARENT(old, field)); \
+ } else \
+ RB_ROOT(head) = elm; \
+ RB_PARENT(RB_LEFT(old, field), field) = elm; \
+ if (RB_RIGHT(old, field)) \
+ RB_PARENT(RB_RIGHT(old, field), field) = elm; \
+ if (parent) { \
+ left = parent; \
+ do { \
+ RB_AUGMENT(left); \
+ } while ((left = RB_PARENT(left, field))); \
+ } \
+ goto color; \
+ } \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+color: \
+ if (color == RB_BLACK) \
+ name##_RB_REMOVE_COLOR(head, parent, child); \
+ return (old); \
+} \
+ \
+/* Inserts a node into the RB tree */ \
+struct type * \
+name##_RB_INSERT(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp; \
+ struct type *parent = NULL; \
+ int comp = 0; \
+ tmp = RB_ROOT(head); \
+ while (tmp) { \
+ parent = tmp; \
+ comp = (cmp)(elm, parent); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ RB_SET(elm, parent, field); \
+ if (parent != NULL) { \
+ if (comp < 0) \
+ RB_LEFT(parent, field) = elm; \
+ else \
+ RB_RIGHT(parent, field) = elm; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = elm; \
+ name##_RB_INSERT_COLOR(head, elm); \
+ return (NULL); \
+} \
+ \
+/* Finds the node with the same key as elm */ \
+struct type * \
+name##_RB_FIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_RB_NEXT(struct type *elm) \
+{ \
+ if (RB_RIGHT(elm, field)) { \
+ elm = RB_RIGHT(elm, field); \
+ while (RB_LEFT(elm, field)) \
+ elm = RB_LEFT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+} \
+ \
+struct type * \
+name##_RB_MINMAX(struct name *head, int val) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *parent = NULL; \
+ while (tmp) { \
+ parent = tmp; \
+ if (val < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else \
+ tmp = RB_RIGHT(tmp, field); \
+ } \
+ return (parent); \
+}
+
+#define RB_NEGINF -1
+#define RB_INF 1
+
+#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
+#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
+#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head) \
+ for ((x) = RB_MIN(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_NEXT(x))
+
+#endif /* _SYS_TREE_H_ */
diff --git a/sntp/libevent/aclocal.m4 b/sntp/libevent/aclocal.m4
new file mode 100644
index 000000000000..3bba48699b70
--- /dev/null
+++ b/sntp/libevent/aclocal.m4
@@ -0,0 +1,1142 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# serial 9 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2010 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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.
+
+# 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.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 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.
+
+# 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.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# 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.
+
+# serial 10
+
+# 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], UPC, [depcc="$UPC" am_compiler_list=],
+ [$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
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' 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 build
+ --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])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. 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 "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 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.
+
+# serial 16
+
+# 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.
+
+# 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_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+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
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])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)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# 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([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_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
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# 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_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 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.
+
+# serial 2
+
+# 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])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 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.
+
+# serial 4
+
+# 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 this is the am__doit target
+.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
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 6
+
+# 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
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# 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
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 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.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 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.
+
+# serial 4
+
+# _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],
+[m4_foreach_w([_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. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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.
+
+# serial 5
+
+# 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
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# 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)])
+
+# Copyright (C) 2009 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.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# 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="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 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.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/ac_backport_259_ssizet.m4])
+m4_include([m4/libevent_openssl.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/ntp_pkg_config.m4])
+m4_include([m4/openldap-thread-check.m4])
+m4_include([m4/openldap.m4])
diff --git a/sntp/libevent/arc4random.c b/sntp/libevent/arc4random.c
new file mode 100644
index 000000000000..a2338e692a10
--- /dev/null
+++ b/sntp/libevent/arc4random.c
@@ -0,0 +1,556 @@
+/* Portable arc4random.c based on arc4random.c from OpenBSD.
+ * Portable version by Chris Davis, adapted for Libevent by Nick Mathewson
+ * Copyright (c) 2010 Chris Davis, Niels Provos, and Nick Mathewson
+ * Copyright (c) 2010-2012 Niels Provos and Nick Mathewson
+ *
+ * Note that in Libevent, this file isn't compiled directly. Instead,
+ * it's included from evutil_rand.c
+ */
+
+/*
+ * Copyright (c) 1996, David Mazieres <dm@uun.org>
+ * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+ *
+ * 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+/*
+ * Arc4 random number generator for OpenBSD.
+ *
+ * This code is derived from section 17.1 of Applied Cryptography,
+ * second edition, which describes a stream cipher allegedly
+ * compatible with RSA Labs "RC4" cipher (the actual description of
+ * which is a trade secret). The same algorithm is used as a stream
+ * cipher called "arcfour" in Tatu Ylonen's ssh package.
+ *
+ * Here the stream cipher has been modified always to include the time
+ * when initializing the state. That makes it impossible to
+ * regenerate the same random sequence twice, so this can't be used
+ * for encryption, but will generate good random numbers.
+ *
+ * RC4 is a registered trademark of RSA Laboratories.
+ */
+
+#ifndef ARC4RANDOM_EXPORT
+#define ARC4RANDOM_EXPORT
+#endif
+
+#ifndef ARC4RANDOM_UINT32
+#define ARC4RANDOM_UINT32 uint32_t
+#endif
+
+#ifndef ARC4RANDOM_NO_INCLUDES
+#include "evconfig-private.h"
+#ifdef _WIN32
+#include <wincrypt.h>
+#include <process.h>
+#else
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/time.h>
+#ifdef EVENT__HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif
+#endif
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+/* Add platform entropy 32 bytes (256 bits) at a time. */
+#define ADD_ENTROPY 32
+
+/* Re-seed from the platform RNG after generating this many bytes. */
+#define BYTES_BEFORE_RESEED 1600000
+
+struct arc4_stream {
+ unsigned char i;
+ unsigned char j;
+ unsigned char s[256];
+};
+
+#ifdef _WIN32
+#define getpid _getpid
+#define pid_t int
+#endif
+
+static int rs_initialized;
+static struct arc4_stream rs;
+static pid_t arc4_stir_pid;
+static int arc4_count;
+static int arc4_seeded_ok;
+
+static inline unsigned char arc4_getbyte(void);
+
+static inline void
+arc4_init(void)
+{
+ int n;
+
+ for (n = 0; n < 256; n++)
+ rs.s[n] = n;
+ rs.i = 0;
+ rs.j = 0;
+}
+
+static inline void
+arc4_addrandom(const unsigned char *dat, int datlen)
+{
+ int n;
+ unsigned char si;
+
+ rs.i--;
+ for (n = 0; n < 256; n++) {
+ rs.i = (rs.i + 1);
+ si = rs.s[rs.i];
+ rs.j = (rs.j + si + dat[n % datlen]);
+ rs.s[rs.i] = rs.s[rs.j];
+ rs.s[rs.j] = si;
+ }
+ rs.j = rs.i;
+}
+
+#ifndef _WIN32
+static ssize_t
+read_all(int fd, unsigned char *buf, size_t count)
+{
+ size_t numread = 0;
+ ssize_t result;
+
+ while (numread < count) {
+ result = read(fd, buf+numread, count-numread);
+ if (result<0)
+ return -1;
+ else if (result == 0)
+ break;
+ numread += result;
+ }
+
+ return (ssize_t)numread;
+}
+#endif
+
+#ifdef _WIN32
+#define TRY_SEED_WIN32
+static int
+arc4_seed_win32(void)
+{
+ /* This is adapted from Tor's crypto_seed_rng() */
+ static int provider_set = 0;
+ static HCRYPTPROV provider;
+ unsigned char buf[ADD_ENTROPY];
+
+ if (!provider_set) {
+ if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT)) {
+ if (GetLastError() != (DWORD)NTE_BAD_KEYSET)
+ return -1;
+ }
+ provider_set = 1;
+ }
+ if (!CryptGenRandom(provider, sizeof(buf), buf))
+ return -1;
+ arc4_addrandom(buf, sizeof(buf));
+ evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
+ return 0;
+}
+#endif
+
+#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL)
+#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_RANDOM && EVENT__HAVE_DECL_RANDOM_UUID
+#define TRY_SEED_SYSCTL_LINUX
+static int
+arc4_seed_sysctl_linux(void)
+{
+ /* Based on code by William Ahern, this function tries to use the
+ * RANDOM_UUID sysctl to get entropy from the kernel. This can work
+ * even if /dev/urandom is inaccessible for some reason (e.g., we're
+ * running in a chroot). */
+ int mib[] = { CTL_KERN, KERN_RANDOM, RANDOM_UUID };
+ unsigned char buf[ADD_ENTROPY];
+ size_t len, n;
+ unsigned i;
+ int any_set;
+
+ memset(buf, 0, sizeof(buf));
+
+ for (len = 0; len < sizeof(buf); len += n) {
+ n = sizeof(buf) - len;
+
+ if (0 != sysctl(mib, 3, &buf[len], &n, NULL, 0))
+ return -1;
+ }
+ /* make sure that the buffer actually got set. */
+ for (i=0,any_set=0; i<sizeof(buf); ++i) {
+ any_set |= buf[i];
+ }
+ if (!any_set)
+ return -1;
+
+ arc4_addrandom(buf, sizeof(buf));
+ evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
+ return 0;
+}
+#endif
+
+#if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_ARND
+#define TRY_SEED_SYSCTL_BSD
+static int
+arc4_seed_sysctl_bsd(void)
+{
+ /* Based on code from William Ahern and from OpenBSD, this function
+ * tries to use the KERN_ARND syscall to get entropy from the kernel.
+ * This can work even if /dev/urandom is inaccessible for some reason
+ * (e.g., we're running in a chroot). */
+ int mib[] = { CTL_KERN, KERN_ARND };
+ unsigned char buf[ADD_ENTROPY];
+ size_t len, n;
+ int i, any_set;
+
+ memset(buf, 0, sizeof(buf));
+
+ len = sizeof(buf);
+ if (sysctl(mib, 2, buf, &len, NULL, 0) == -1) {
+ for (len = 0; len < sizeof(buf); len += sizeof(unsigned)) {
+ n = sizeof(unsigned);
+ if (n + len > sizeof(buf))
+ n = len - sizeof(buf);
+ if (sysctl(mib, 2, &buf[len], &n, NULL, 0) == -1)
+ return -1;
+ }
+ }
+ /* make sure that the buffer actually got set. */
+ for (i=any_set=0; i<sizeof(buf); ++i) {
+ any_set |= buf[i];
+ }
+ if (!any_set)
+ return -1;
+
+ arc4_addrandom(buf, sizeof(buf));
+ evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
+ return 0;
+}
+#endif
+#endif /* defined(EVENT__HAVE_SYS_SYSCTL_H) */
+
+#ifdef __linux__
+#define TRY_SEED_PROC_SYS_KERNEL_RANDOM_UUID
+static int
+arc4_seed_proc_sys_kernel_random_uuid(void)
+{
+ /* Occasionally, somebody will make /proc/sys accessible in a chroot,
+ * but not /dev/urandom. Let's try /proc/sys/kernel/random/uuid.
+ * Its format is stupid, so we need to decode it from hex.
+ */
+ int fd;
+ char buf[128];
+ unsigned char entropy[64];
+ int bytes, n, i, nybbles;
+ for (bytes = 0; bytes<ADD_ENTROPY; ) {
+ fd = evutil_open_closeonexec_("/proc/sys/kernel/random/uuid", O_RDONLY, 0);
+ if (fd < 0)
+ return -1;
+ n = read(fd, buf, sizeof(buf));
+ close(fd);
+ if (n<=0)
+ return -1;
+ memset(entropy, 0, sizeof(entropy));
+ for (i=nybbles=0; i<n; ++i) {
+ if (EVUTIL_ISXDIGIT_(buf[i])) {
+ int nyb = evutil_hex_char_to_int_(buf[i]);
+ if (nybbles & 1) {
+ entropy[nybbles/2] |= nyb;
+ } else {
+ entropy[nybbles/2] |= nyb<<4;
+ }
+ ++nybbles;
+ }
+ }
+ if (nybbles < 2)
+ return -1;
+ arc4_addrandom(entropy, nybbles/2);
+ bytes += nybbles/2;
+ }
+ evutil_memclear_(entropy, sizeof(entropy));
+ evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
+ return 0;
+}
+#endif
+
+#ifndef _WIN32
+#define TRY_SEED_URANDOM
+static char *arc4random_urandom_filename = NULL;
+
+static int arc4_seed_urandom_helper_(const char *fname)
+{
+ unsigned char buf[ADD_ENTROPY];
+ int fd;
+ size_t n;
+
+ fd = evutil_open_closeonexec_(fname, O_RDONLY, 0);
+ if (fd<0)
+ return -1;
+ n = read_all(fd, buf, sizeof(buf));
+ close(fd);
+ if (n != sizeof(buf))
+ return -1;
+ arc4_addrandom(buf, sizeof(buf));
+ evutil_memclear_(buf, sizeof(buf));
+ arc4_seeded_ok = 1;
+ return 0;
+}
+
+static int
+arc4_seed_urandom(void)
+{
+ /* This is adapted from Tor's crypto_seed_rng() */
+ static const char *filenames[] = {
+ "/dev/srandom", "/dev/urandom", "/dev/random", NULL
+ };
+ int i;
+ if (arc4random_urandom_filename)
+ return arc4_seed_urandom_helper_(arc4random_urandom_filename);
+
+ for (i = 0; filenames[i]; ++i) {
+ if (arc4_seed_urandom_helper_(filenames[i]) == 0) {
+ return 0;
+ }
+ }
+
+ return -1;
+}
+#endif
+
+static int
+arc4_seed(void)
+{
+ int ok = 0;
+ /* We try every method that might work, and don't give up even if one
+ * does seem to work. There's no real harm in over-seeding, and if
+ * one of these sources turns out to be broken, that would be bad. */
+#ifdef TRY_SEED_WIN32
+ if (0 == arc4_seed_win32())
+ ok = 1;
+#endif
+#ifdef TRY_SEED_URANDOM
+ if (0 == arc4_seed_urandom())
+ ok = 1;
+#endif
+#ifdef TRY_SEED_PROC_SYS_KERNEL_RANDOM_UUID
+ if (arc4random_urandom_filename == NULL &&
+ 0 == arc4_seed_proc_sys_kernel_random_uuid())
+ ok = 1;
+#endif
+#ifdef TRY_SEED_SYSCTL_LINUX
+ /* Apparently Linux is deprecating sysctl, and spewing warning
+ * messages when you try to use it. */
+ if (!ok && 0 == arc4_seed_sysctl_linux())
+ ok = 1;
+#endif
+#ifdef TRY_SEED_SYSCTL_BSD
+ if (0 == arc4_seed_sysctl_bsd())
+ ok = 1;
+#endif
+ return ok ? 0 : -1;
+}
+
+static int
+arc4_stir(void)
+{
+ int i;
+
+ if (!rs_initialized) {
+ arc4_init();
+ rs_initialized = 1;
+ }
+
+ arc4_seed();
+ if (!arc4_seeded_ok)
+ return -1;
+
+ /*
+ * Discard early keystream, as per recommendations in
+ * "Weaknesses in the Key Scheduling Algorithm of RC4" by
+ * Scott Fluhrer, Itsik Mantin, and Adi Shamir.
+ * http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
+ *
+ * Ilya Mironov's "(Not So) Random Shuffles of RC4" suggests that
+ * we drop at least 2*256 bytes, with 12*256 as a conservative
+ * value.
+ *
+ * RFC4345 says to drop 6*256.
+ *
+ * At least some versions of this code drop 4*256, in a mistaken
+ * belief that "words" in the Fluhrer/Mantin/Shamir paper refers
+ * to processor words.
+ *
+ * We add another sect to the cargo cult, and choose 12*256.
+ */
+ for (i = 0; i < 12*256; i++)
+ (void)arc4_getbyte();
+
+ arc4_count = BYTES_BEFORE_RESEED;
+
+ return 0;
+}
+
+
+static void
+arc4_stir_if_needed(void)
+{
+ pid_t pid = getpid();
+
+ if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid)
+ {
+ arc4_stir_pid = pid;
+ arc4_stir();
+ }
+}
+
+static inline unsigned char
+arc4_getbyte(void)
+{
+ unsigned char si, sj;
+
+ rs.i = (rs.i + 1);
+ si = rs.s[rs.i];
+ rs.j = (rs.j + si);
+ sj = rs.s[rs.j];
+ rs.s[rs.i] = sj;
+ rs.s[rs.j] = si;
+ return (rs.s[(si + sj) & 0xff]);
+}
+
+static inline unsigned int
+arc4_getword(void)
+{
+ unsigned int val;
+
+ val = arc4_getbyte() << 24;
+ val |= arc4_getbyte() << 16;
+ val |= arc4_getbyte() << 8;
+ val |= arc4_getbyte();
+
+ return val;
+}
+
+#ifndef ARC4RANDOM_NOSTIR
+ARC4RANDOM_EXPORT int
+arc4random_stir(void)
+{
+ int val;
+ ARC4_LOCK_();
+ val = arc4_stir();
+ ARC4_UNLOCK_();
+ return val;
+}
+#endif
+
+#ifndef ARC4RANDOM_NOADDRANDOM
+ARC4RANDOM_EXPORT void
+arc4random_addrandom(const unsigned char *dat, int datlen)
+{
+ int j;
+ ARC4_LOCK_();
+ if (!rs_initialized)
+ arc4_stir();
+ for (j = 0; j < datlen; j += 256) {
+ /* arc4_addrandom() ignores all but the first 256 bytes of
+ * its input. We want to make sure to look at ALL the
+ * data in 'dat', just in case the user is doing something
+ * crazy like passing us all the files in /var/log. */
+ arc4_addrandom(dat + j, datlen - j);
+ }
+ ARC4_UNLOCK_();
+}
+#endif
+
+#ifndef ARC4RANDOM_NORANDOM
+ARC4RANDOM_EXPORT ARC4RANDOM_UINT32
+arc4random(void)
+{
+ ARC4RANDOM_UINT32 val;
+ ARC4_LOCK_();
+ arc4_count -= 4;
+ arc4_stir_if_needed();
+ val = arc4_getword();
+ ARC4_UNLOCK_();
+ return val;
+}
+#endif
+
+ARC4RANDOM_EXPORT void
+arc4random_buf(void *buf_, size_t n)
+{
+ unsigned char *buf = buf_;
+ ARC4_LOCK_();
+ arc4_stir_if_needed();
+ while (n--) {
+ if (--arc4_count <= 0)
+ arc4_stir();
+ buf[n] = arc4_getbyte();
+ }
+ ARC4_UNLOCK_();
+}
+
+#ifndef ARC4RANDOM_NOUNIFORM
+/*
+ * Calculate a uniformly distributed random number less than upper_bound
+ * avoiding "modulo bias".
+ *
+ * Uniformity is achieved by generating new random numbers until the one
+ * returned is outside the range [0, 2**32 % upper_bound). This
+ * guarantees the selected random number will be inside
+ * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
+ * after reduction modulo upper_bound.
+ */
+ARC4RANDOM_EXPORT unsigned int
+arc4random_uniform(unsigned int upper_bound)
+{
+ ARC4RANDOM_UINT32 r, min;
+
+ if (upper_bound < 2)
+ return 0;
+
+#if (UINT_MAX > 0xffffffffUL)
+ min = 0x100000000UL % upper_bound;
+#else
+ /* Calculate (2**32 % upper_bound) avoiding 64-bit math */
+ if (upper_bound > 0x80000000)
+ min = 1 + ~upper_bound; /* 2**32 - upper_bound */
+ else {
+ /* (2**32 - (x * 2)) % x == 2**32 % x when x <= 2**31 */
+ min = ((0xffffffff - (upper_bound * 2)) + 1) % upper_bound;
+ }
+#endif
+
+ /*
+ * This could theoretically loop forever but each retry has
+ * p > 0.5 (worst case, usually far better) of selecting a
+ * number inside the range we need, so it should rarely need
+ * to re-roll.
+ */
+ for (;;) {
+ r = arc4random();
+ if (r >= min)
+ break;
+ }
+
+ return r % upper_bound;
+}
+#endif
diff --git a/sntp/libevent/autogen.sh b/sntp/libevent/autogen.sh
new file mode 100755
index 000000000000..57eeb940b911
--- /dev/null
+++ b/sntp/libevent/autogen.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ -x "`which autoreconf 2>/dev/null`" ] ; then
+ exec autoreconf -ivf
+fi
+
+LIBTOOLIZE=libtoolize
+SYSNAME=`uname`
+if [ "x$SYSNAME" = "xDarwin" ] ; then
+ LIBTOOLIZE=glibtoolize
+fi
+aclocal -I m4 && \
+ autoheader && \
+ $LIBTOOLIZE && \
+ autoconf && \
+ automake --add-missing --force-missing --copy
diff --git a/sntp/libevent/buffer.c b/sntp/libevent/buffer.c
new file mode 100644
index 000000000000..e603be863f01
--- /dev/null
+++ b/sntp/libevent/buffer.c
@@ -0,0 +1,3375 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#include <io.h>
+#endif
+
+#ifdef EVENT__HAVE_VASPRINTF
+/* If we have vasprintf, we need to define _GNU_SOURCE before we include
+ * stdio.h. This comes from evconfig-private.h.
+ */
+#endif
+
+#include <sys/types.h>
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_SENDFILE_H
+#include <sys/sendfile.h>
+#endif
+#ifdef EVENT__HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <limits.h>
+
+#include "event2/event.h"
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_compat.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/thread.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+#include "evthread-internal.h"
+#include "evbuffer-internal.h"
+#include "bufferevent-internal.h"
+
+/* some systems do not have MAP_FAILED */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
+/* send file support */
+#if defined(EVENT__HAVE_SYS_SENDFILE_H) && defined(EVENT__HAVE_SENDFILE) && defined(__linux__)
+#define USE_SENDFILE 1
+#define SENDFILE_IS_LINUX 1
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__FreeBSD__)
+#define USE_SENDFILE 1
+#define SENDFILE_IS_FREEBSD 1
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__APPLE__)
+#define USE_SENDFILE 1
+#define SENDFILE_IS_MACOSX 1
+#elif defined(EVENT__HAVE_SENDFILE) && defined(__sun__) && defined(__svr4__)
+#define USE_SENDFILE 1
+#define SENDFILE_IS_SOLARIS 1
+#endif
+
+/* Mask of user-selectable callback flags. */
+#define EVBUFFER_CB_USER_FLAGS 0xffff
+/* Mask of all internal-use-only flags. */
+#define EVBUFFER_CB_INTERNAL_FLAGS 0xffff0000
+
+/* Flag set if the callback is using the cb_obsolete function pointer */
+#define EVBUFFER_CB_OBSOLETE 0x00040000
+
+/* evbuffer_chain support */
+#define CHAIN_SPACE_PTR(ch) ((ch)->buffer + (ch)->misalign + (ch)->off)
+#define CHAIN_SPACE_LEN(ch) ((ch)->flags & EVBUFFER_IMMUTABLE ? \
+ 0 : (ch)->buffer_len - ((ch)->misalign + (ch)->off))
+
+#define CHAIN_PINNED(ch) (((ch)->flags & EVBUFFER_MEM_PINNED_ANY) != 0)
+#define CHAIN_PINNED_R(ch) (((ch)->flags & EVBUFFER_MEM_PINNED_R) != 0)
+
+/* evbuffer_ptr support */
+#define PTR_NOT_FOUND(ptr) do { \
+ (ptr)->pos = -1; \
+ (ptr)->internal_.chain = NULL; \
+ (ptr)->internal_.pos_in_chain = 0; \
+} while (0)
+
+static void evbuffer_chain_align(struct evbuffer_chain *chain);
+static int evbuffer_chain_should_realign(struct evbuffer_chain *chain,
+ size_t datalen);
+static void evbuffer_deferred_callback(struct event_callback *cb, void *arg);
+static int evbuffer_ptr_memcmp(const struct evbuffer *buf,
+ const struct evbuffer_ptr *pos, const char *mem, size_t len);
+static struct evbuffer_chain *evbuffer_expand_singlechain(struct evbuffer *buf,
+ size_t datlen);
+static int evbuffer_ptr_subtract(struct evbuffer *buf, struct evbuffer_ptr *pos,
+ size_t howfar);
+static int evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg);
+static inline void evbuffer_chain_incref(struct evbuffer_chain *chain);
+
+static struct evbuffer_chain *
+evbuffer_chain_new(size_t size)
+{
+ struct evbuffer_chain *chain;
+ size_t to_alloc;
+
+ size += EVBUFFER_CHAIN_SIZE;
+
+ /* get the next largest memory that can hold the buffer */
+ to_alloc = MIN_BUFFER_SIZE;
+ while (to_alloc < size)
+ to_alloc <<= 1;
+
+ /* we get everything in one chunk */
+ if ((chain = mm_malloc(to_alloc)) == NULL)
+ return (NULL);
+
+ memset(chain, 0, EVBUFFER_CHAIN_SIZE);
+
+ chain->buffer_len = to_alloc - EVBUFFER_CHAIN_SIZE;
+
+ /* this way we can manipulate the buffer to different addresses,
+ * which is required for mmap for example.
+ */
+ chain->buffer = EVBUFFER_CHAIN_EXTRA(u_char, chain);
+
+ chain->refcnt = 1;
+
+ return (chain);
+}
+
+static inline void
+evbuffer_chain_free(struct evbuffer_chain *chain)
+{
+ EVUTIL_ASSERT(chain->refcnt > 0);
+ if (--chain->refcnt > 0) {
+ /* chain is still referenced by other chains */
+ return;
+ }
+
+ if (CHAIN_PINNED(chain)) {
+ /* will get freed once no longer dangling */
+ chain->refcnt++;
+ chain->flags |= EVBUFFER_DANGLING;
+ return;
+ }
+
+ /* safe to release chain, it's either a referencing
+ * chain or all references to it have been freed */
+ if (chain->flags & EVBUFFER_REFERENCE) {
+ struct evbuffer_chain_reference *info =
+ EVBUFFER_CHAIN_EXTRA(
+ struct evbuffer_chain_reference,
+ chain);
+ if (info->cleanupfn)
+ (*info->cleanupfn)(chain->buffer,
+ chain->buffer_len,
+ info->extra);
+ }
+ if (chain->flags & EVBUFFER_FILESEGMENT) {
+ struct evbuffer_chain_file_segment *info =
+ EVBUFFER_CHAIN_EXTRA(
+ struct evbuffer_chain_file_segment,
+ chain);
+ if (info->segment) {
+#ifdef _WIN32
+ if (info->segment->is_mapping)
+ UnmapViewOfFile(chain->buffer);
+#endif
+ evbuffer_file_segment_free(info->segment);
+ }
+ }
+ if (chain->flags & EVBUFFER_MULTICAST) {
+ struct evbuffer_multicast_parent *info =
+ EVBUFFER_CHAIN_EXTRA(
+ struct evbuffer_multicast_parent,
+ chain);
+ /* referencing chain is being freed, decrease
+ * refcounts of source chain and associated
+ * evbuffer (which get freed once both reach
+ * zero) */
+ EVUTIL_ASSERT(info->source != NULL);
+ EVUTIL_ASSERT(info->parent != NULL);
+ EVBUFFER_LOCK(info->source);
+ evbuffer_chain_free(info->parent);
+ evbuffer_decref_and_unlock_(info->source);
+ }
+
+ mm_free(chain);
+}
+
+static void
+evbuffer_free_all_chains(struct evbuffer_chain *chain)
+{
+ struct evbuffer_chain *next;
+ for (; chain; chain = next) {
+ next = chain->next;
+ evbuffer_chain_free(chain);
+ }
+}
+
+#ifndef NDEBUG
+static int
+evbuffer_chains_all_empty(struct evbuffer_chain *chain)
+{
+ for (; chain; chain = chain->next) {
+ if (chain->off)
+ return 0;
+ }
+ return 1;
+}
+#else
+/* The definition is needed for EVUTIL_ASSERT, which uses sizeof to avoid
+"unused variable" warnings. */
+static inline int evbuffer_chains_all_empty(struct evbuffer_chain *chain) {
+ return 1;
+}
+#endif
+
+/* Free all trailing chains in 'buf' that are neither pinned nor empty, prior
+ * to replacing them all with a new chain. Return a pointer to the place
+ * where the new chain will go.
+ *
+ * Internal; requires lock. The caller must fix up buf->last and buf->first
+ * as needed; they might have been freed.
+ */
+static struct evbuffer_chain **
+evbuffer_free_trailing_empty_chains(struct evbuffer *buf)
+{
+ struct evbuffer_chain **ch = buf->last_with_datap;
+ /* Find the first victim chain. It might be *last_with_datap */
+ while ((*ch) && ((*ch)->off != 0 || CHAIN_PINNED(*ch)))
+ ch = &(*ch)->next;
+ if (*ch) {
+ EVUTIL_ASSERT(evbuffer_chains_all_empty(*ch));
+ evbuffer_free_all_chains(*ch);
+ *ch = NULL;
+ }
+ return ch;
+}
+
+/* Add a single chain 'chain' to the end of 'buf', freeing trailing empty
+ * chains as necessary. Requires lock. Does not schedule callbacks.
+ */
+static void
+evbuffer_chain_insert(struct evbuffer *buf,
+ struct evbuffer_chain *chain)
+{
+ ASSERT_EVBUFFER_LOCKED(buf);
+ if (*buf->last_with_datap == NULL) {
+ /* There are no chains data on the buffer at all. */
+ EVUTIL_ASSERT(buf->last_with_datap == &buf->first);
+ EVUTIL_ASSERT(buf->first == NULL);
+ buf->first = buf->last = chain;
+ } else {
+ struct evbuffer_chain **chp;
+ chp = evbuffer_free_trailing_empty_chains(buf);
+ *chp = chain;
+ if (chain->off)
+ buf->last_with_datap = chp;
+ buf->last = chain;
+ }
+ buf->total_len += chain->off;
+}
+
+static inline struct evbuffer_chain *
+evbuffer_chain_insert_new(struct evbuffer *buf, size_t datlen)
+{
+ struct evbuffer_chain *chain;
+ if ((chain = evbuffer_chain_new(datlen)) == NULL)
+ return NULL;
+ evbuffer_chain_insert(buf, chain);
+ return chain;
+}
+
+void
+evbuffer_chain_pin_(struct evbuffer_chain *chain, unsigned flag)
+{
+ EVUTIL_ASSERT((chain->flags & flag) == 0);
+ chain->flags |= flag;
+}
+
+void
+evbuffer_chain_unpin_(struct evbuffer_chain *chain, unsigned flag)
+{
+ EVUTIL_ASSERT((chain->flags & flag) != 0);
+ chain->flags &= ~flag;
+ if (chain->flags & EVBUFFER_DANGLING)
+ evbuffer_chain_free(chain);
+}
+
+static inline void
+evbuffer_chain_incref(struct evbuffer_chain *chain)
+{
+ ++chain->refcnt;
+}
+
+struct evbuffer *
+evbuffer_new(void)
+{
+ struct evbuffer *buffer;
+
+ buffer = mm_calloc(1, sizeof(struct evbuffer));
+ if (buffer == NULL)
+ return (NULL);
+
+ LIST_INIT(&buffer->callbacks);
+ buffer->refcnt = 1;
+ buffer->last_with_datap = &buffer->first;
+
+ return (buffer);
+}
+
+int
+evbuffer_set_flags(struct evbuffer *buf, ev_uint64_t flags)
+{
+ EVBUFFER_LOCK(buf);
+ buf->flags |= (ev_uint32_t)flags;
+ EVBUFFER_UNLOCK(buf);
+ return 0;
+}
+
+int
+evbuffer_clear_flags(struct evbuffer *buf, ev_uint64_t flags)
+{
+ EVBUFFER_LOCK(buf);
+ buf->flags &= ~(ev_uint32_t)flags;
+ EVBUFFER_UNLOCK(buf);
+ return 0;
+}
+
+void
+evbuffer_incref_(struct evbuffer *buf)
+{
+ EVBUFFER_LOCK(buf);
+ ++buf->refcnt;
+ EVBUFFER_UNLOCK(buf);
+}
+
+void
+evbuffer_incref_and_lock_(struct evbuffer *buf)
+{
+ EVBUFFER_LOCK(buf);
+ ++buf->refcnt;
+}
+
+int
+evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base)
+{
+ EVBUFFER_LOCK(buffer);
+ buffer->cb_queue = base;
+ buffer->deferred_cbs = 1;
+ event_deferred_cb_init_(&buffer->deferred,
+ event_base_get_npriorities(base) / 2,
+ evbuffer_deferred_callback, buffer);
+ EVBUFFER_UNLOCK(buffer);
+ return 0;
+}
+
+int
+evbuffer_enable_locking(struct evbuffer *buf, void *lock)
+{
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
+ return -1;
+#else
+ if (buf->lock)
+ return -1;
+
+ if (!lock) {
+ EVTHREAD_ALLOC_LOCK(lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ if (!lock)
+ return -1;
+ buf->lock = lock;
+ buf->own_lock = 1;
+ } else {
+ buf->lock = lock;
+ buf->own_lock = 0;
+ }
+
+ return 0;
+#endif
+}
+
+void
+evbuffer_set_parent_(struct evbuffer *buf, struct bufferevent *bev)
+{
+ EVBUFFER_LOCK(buf);
+ buf->parent = bev;
+ EVBUFFER_UNLOCK(buf);
+}
+
+static void
+evbuffer_run_callbacks(struct evbuffer *buffer, int running_deferred)
+{
+ struct evbuffer_cb_entry *cbent, *next;
+ struct evbuffer_cb_info info;
+ size_t new_size;
+ ev_uint32_t mask, masked_val;
+ int clear = 1;
+
+ if (running_deferred) {
+ mask = EVBUFFER_CB_NODEFER|EVBUFFER_CB_ENABLED;
+ masked_val = EVBUFFER_CB_ENABLED;
+ } else if (buffer->deferred_cbs) {
+ mask = EVBUFFER_CB_NODEFER|EVBUFFER_CB_ENABLED;
+ masked_val = EVBUFFER_CB_NODEFER|EVBUFFER_CB_ENABLED;
+ /* Don't zero-out n_add/n_del, since the deferred callbacks
+ will want to see them. */
+ clear = 0;
+ } else {
+ mask = EVBUFFER_CB_ENABLED;
+ masked_val = EVBUFFER_CB_ENABLED;
+ }
+
+ ASSERT_EVBUFFER_LOCKED(buffer);
+
+ if (LIST_EMPTY(&buffer->callbacks)) {
+ buffer->n_add_for_cb = buffer->n_del_for_cb = 0;
+ return;
+ }
+ if (buffer->n_add_for_cb == 0 && buffer->n_del_for_cb == 0)
+ return;
+
+ new_size = buffer->total_len;
+ info.orig_size = new_size + buffer->n_del_for_cb - buffer->n_add_for_cb;
+ info.n_added = buffer->n_add_for_cb;
+ info.n_deleted = buffer->n_del_for_cb;
+ if (clear) {
+ buffer->n_add_for_cb = 0;
+ buffer->n_del_for_cb = 0;
+ }
+ for (cbent = LIST_FIRST(&buffer->callbacks);
+ cbent != LIST_END(&buffer->callbacks);
+ cbent = next) {
+ /* Get the 'next' pointer now in case this callback decides
+ * to remove itself or something. */
+ next = LIST_NEXT(cbent, next);
+
+ if ((cbent->flags & mask) != masked_val)
+ continue;
+
+ if ((cbent->flags & EVBUFFER_CB_OBSOLETE))
+ cbent->cb.cb_obsolete(buffer,
+ info.orig_size, new_size, cbent->cbarg);
+ else
+ cbent->cb.cb_func(buffer, &info, cbent->cbarg);
+ }
+}
+
+void
+evbuffer_invoke_callbacks_(struct evbuffer *buffer)
+{
+ if (LIST_EMPTY(&buffer->callbacks)) {
+ buffer->n_add_for_cb = buffer->n_del_for_cb = 0;
+ return;
+ }
+
+ if (buffer->deferred_cbs) {
+ if (event_deferred_cb_schedule_(buffer->cb_queue, &buffer->deferred)) {
+ evbuffer_incref_and_lock_(buffer);
+ if (buffer->parent)
+ bufferevent_incref_(buffer->parent);
+ }
+ EVBUFFER_UNLOCK(buffer);
+ }
+
+ evbuffer_run_callbacks(buffer, 0);
+}
+
+static void
+evbuffer_deferred_callback(struct event_callback *cb, void *arg)
+{
+ struct bufferevent *parent = NULL;
+ struct evbuffer *buffer = arg;
+
+ /* XXXX It would be better to run these callbacks without holding the
+ * lock */
+ EVBUFFER_LOCK(buffer);
+ parent = buffer->parent;
+ evbuffer_run_callbacks(buffer, 1);
+ evbuffer_decref_and_unlock_(buffer);
+ if (parent)
+ bufferevent_decref_(parent);
+}
+
+static void
+evbuffer_remove_all_callbacks(struct evbuffer *buffer)
+{
+ struct evbuffer_cb_entry *cbent;
+
+ while ((cbent = LIST_FIRST(&buffer->callbacks))) {
+ LIST_REMOVE(cbent, next);
+ mm_free(cbent);
+ }
+}
+
+void
+evbuffer_decref_and_unlock_(struct evbuffer *buffer)
+{
+ struct evbuffer_chain *chain, *next;
+ ASSERT_EVBUFFER_LOCKED(buffer);
+
+ EVUTIL_ASSERT(buffer->refcnt > 0);
+
+ if (--buffer->refcnt > 0) {
+ EVBUFFER_UNLOCK(buffer);
+ return;
+ }
+
+ for (chain = buffer->first; chain != NULL; chain = next) {
+ next = chain->next;
+ evbuffer_chain_free(chain);
+ }
+ evbuffer_remove_all_callbacks(buffer);
+ if (buffer->deferred_cbs)
+ event_deferred_cb_cancel_(buffer->cb_queue, &buffer->deferred);
+
+ EVBUFFER_UNLOCK(buffer);
+ if (buffer->own_lock)
+ EVTHREAD_FREE_LOCK(buffer->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ mm_free(buffer);
+}
+
+void
+evbuffer_free(struct evbuffer *buffer)
+{
+ EVBUFFER_LOCK(buffer);
+ evbuffer_decref_and_unlock_(buffer);
+}
+
+void
+evbuffer_lock(struct evbuffer *buf)
+{
+ EVBUFFER_LOCK(buf);
+}
+
+void
+evbuffer_unlock(struct evbuffer *buf)
+{
+ EVBUFFER_UNLOCK(buf);
+}
+
+size_t
+evbuffer_get_length(const struct evbuffer *buffer)
+{
+ size_t result;
+
+ EVBUFFER_LOCK(buffer);
+
+ result = (buffer->total_len);
+
+ EVBUFFER_UNLOCK(buffer);
+
+ return result;
+}
+
+size_t
+evbuffer_get_contiguous_space(const struct evbuffer *buf)
+{
+ struct evbuffer_chain *chain;
+ size_t result;
+
+ EVBUFFER_LOCK(buf);
+ chain = buf->first;
+ result = (chain != NULL ? chain->off : 0);
+ EVBUFFER_UNLOCK(buf);
+
+ return result;
+}
+
+size_t
+evbuffer_add_iovec(struct evbuffer * buf, struct evbuffer_iovec * vec, int n_vec) {
+ int n;
+ size_t res;
+ size_t to_alloc;
+
+ EVBUFFER_LOCK(buf);
+
+ res = to_alloc = 0;
+
+ for (n = 0; n < n_vec; n++) {
+ to_alloc += vec[n].iov_len;
+ }
+
+ if (evbuffer_expand_fast_(buf, to_alloc, 2) < 0) {
+ goto done;
+ }
+
+ for (n = 0; n < n_vec; n++) {
+ /* XXX each 'add' call here does a bunch of setup that's
+ * obviated by evbuffer_expand_fast_, and some cleanup that we
+ * would like to do only once. Instead we should just extract
+ * the part of the code that's needed. */
+
+ if (evbuffer_add(buf, vec[n].iov_base, vec[n].iov_len) < 0) {
+ goto done;
+ }
+
+ res += vec[n].iov_len;
+ }
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return res;
+}
+
+int
+evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size,
+ struct evbuffer_iovec *vec, int n_vecs)
+{
+ struct evbuffer_chain *chain, **chainp;
+ int n = -1;
+
+ EVBUFFER_LOCK(buf);
+ if (buf->freeze_end)
+ goto done;
+ if (n_vecs < 1)
+ goto done;
+ if (n_vecs == 1) {
+ if ((chain = evbuffer_expand_singlechain(buf, size)) == NULL)
+ goto done;
+
+ vec[0].iov_base = CHAIN_SPACE_PTR(chain);
+ vec[0].iov_len = (size_t) CHAIN_SPACE_LEN(chain);
+ EVUTIL_ASSERT(size<0 || (size_t)vec[0].iov_len >= (size_t)size);
+ n = 1;
+ } else {
+ if (evbuffer_expand_fast_(buf, size, n_vecs)<0)
+ goto done;
+ n = evbuffer_read_setup_vecs_(buf, size, vec, n_vecs,
+ &chainp, 0);
+ }
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return n;
+
+}
+
+static int
+advance_last_with_data(struct evbuffer *buf)
+{
+ int n = 0;
+ ASSERT_EVBUFFER_LOCKED(buf);
+
+ if (!*buf->last_with_datap)
+ return 0;
+
+ while ((*buf->last_with_datap)->next && (*buf->last_with_datap)->next->off) {
+ buf->last_with_datap = &(*buf->last_with_datap)->next;
+ ++n;
+ }
+ return n;
+}
+
+int
+evbuffer_commit_space(struct evbuffer *buf,
+ struct evbuffer_iovec *vec, int n_vecs)
+{
+ struct evbuffer_chain *chain, **firstchainp, **chainp;
+ int result = -1;
+ size_t added = 0;
+ int i;
+
+ EVBUFFER_LOCK(buf);
+
+ if (buf->freeze_end)
+ goto done;
+ if (n_vecs == 0) {
+ result = 0;
+ goto done;
+ } else if (n_vecs == 1 &&
+ (buf->last && vec[0].iov_base == (void*)CHAIN_SPACE_PTR(buf->last))) {
+ /* The user only got or used one chain; it might not
+ * be the first one with space in it. */
+ if ((size_t)vec[0].iov_len > (size_t)CHAIN_SPACE_LEN(buf->last))
+ goto done;
+ buf->last->off += vec[0].iov_len;
+ added = vec[0].iov_len;
+ if (added)
+ advance_last_with_data(buf);
+ goto okay;
+ }
+
+ /* Advance 'firstchain' to the first chain with space in it. */
+ firstchainp = buf->last_with_datap;
+ if (!*firstchainp)
+ goto done;
+ if (CHAIN_SPACE_LEN(*firstchainp) == 0) {
+ firstchainp = &(*firstchainp)->next;
+ }
+
+ chain = *firstchainp;
+ /* pass 1: make sure that the pointers and lengths of vecs[] are in
+ * bounds before we try to commit anything. */
+ for (i=0; i<n_vecs; ++i) {
+ if (!chain)
+ goto done;
+ if (vec[i].iov_base != (void*)CHAIN_SPACE_PTR(chain) ||
+ (size_t)vec[i].iov_len > CHAIN_SPACE_LEN(chain))
+ goto done;
+ chain = chain->next;
+ }
+ /* pass 2: actually adjust all the chains. */
+ chainp = firstchainp;
+ for (i=0; i<n_vecs; ++i) {
+ (*chainp)->off += vec[i].iov_len;
+ added += vec[i].iov_len;
+ if (vec[i].iov_len) {
+ buf->last_with_datap = chainp;
+ }
+ chainp = &(*chainp)->next;
+ }
+
+okay:
+ buf->total_len += added;
+ buf->n_add_for_cb += added;
+ result = 0;
+ evbuffer_invoke_callbacks_(buf);
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+static inline int
+HAS_PINNED_R(struct evbuffer *buf)
+{
+ return (buf->last && CHAIN_PINNED_R(buf->last));
+}
+
+static inline void
+ZERO_CHAIN(struct evbuffer *dst)
+{
+ ASSERT_EVBUFFER_LOCKED(dst);
+ dst->first = NULL;
+ dst->last = NULL;
+ dst->last_with_datap = &(dst)->first;
+ dst->total_len = 0;
+}
+
+/* Prepares the contents of src to be moved to another buffer by removing
+ * read-pinned chains. The first pinned chain is saved in first, and the
+ * last in last. If src has no read-pinned chains, first and last are set
+ * to NULL. */
+static int
+PRESERVE_PINNED(struct evbuffer *src, struct evbuffer_chain **first,
+ struct evbuffer_chain **last)
+{
+ struct evbuffer_chain *chain, **pinned;
+
+ ASSERT_EVBUFFER_LOCKED(src);
+
+ if (!HAS_PINNED_R(src)) {
+ *first = *last = NULL;
+ return 0;
+ }
+
+ pinned = src->last_with_datap;
+ if (!CHAIN_PINNED_R(*pinned))
+ pinned = &(*pinned)->next;
+ EVUTIL_ASSERT(CHAIN_PINNED_R(*pinned));
+ chain = *first = *pinned;
+ *last = src->last;
+
+ /* If there's data in the first pinned chain, we need to allocate
+ * a new chain and copy the data over. */
+ if (chain->off) {
+ struct evbuffer_chain *tmp;
+
+ EVUTIL_ASSERT(pinned == src->last_with_datap);
+ tmp = evbuffer_chain_new(chain->off);
+ if (!tmp)
+ return -1;
+ memcpy(tmp->buffer, chain->buffer + chain->misalign,
+ chain->off);
+ tmp->off = chain->off;
+ *src->last_with_datap = tmp;
+ src->last = tmp;
+ chain->misalign += chain->off;
+ chain->off = 0;
+ } else {
+ src->last = *src->last_with_datap;
+ *pinned = NULL;
+ }
+
+ return 0;
+}
+
+static inline void
+RESTORE_PINNED(struct evbuffer *src, struct evbuffer_chain *pinned,
+ struct evbuffer_chain *last)
+{
+ ASSERT_EVBUFFER_LOCKED(src);
+
+ if (!pinned) {
+ ZERO_CHAIN(src);
+ return;
+ }
+
+ src->first = pinned;
+ src->last = last;
+ src->last_with_datap = &src->first;
+ src->total_len = 0;
+}
+
+static inline void
+COPY_CHAIN(struct evbuffer *dst, struct evbuffer *src)
+{
+ ASSERT_EVBUFFER_LOCKED(dst);
+ ASSERT_EVBUFFER_LOCKED(src);
+ dst->first = src->first;
+ if (src->last_with_datap == &src->first)
+ dst->last_with_datap = &dst->first;
+ else
+ dst->last_with_datap = src->last_with_datap;
+ dst->last = src->last;
+ dst->total_len = src->total_len;
+}
+
+static void
+APPEND_CHAIN(struct evbuffer *dst, struct evbuffer *src)
+{
+ ASSERT_EVBUFFER_LOCKED(dst);
+ ASSERT_EVBUFFER_LOCKED(src);
+ dst->last->next = src->first;
+ if (src->last_with_datap == &src->first)
+ dst->last_with_datap = &dst->last->next;
+ else
+ dst->last_with_datap = src->last_with_datap;
+ dst->last = src->last;
+ dst->total_len += src->total_len;
+}
+
+static inline void
+APPEND_CHAIN_MULTICAST(struct evbuffer *dst, struct evbuffer *src)
+{
+ struct evbuffer_chain *tmp;
+ struct evbuffer_chain *chain = src->first;
+ struct evbuffer_multicast_parent *extra;
+
+ ASSERT_EVBUFFER_LOCKED(dst);
+ ASSERT_EVBUFFER_LOCKED(src);
+
+ for (; chain; chain = chain->next) {
+ if (!chain->off || chain->flags & EVBUFFER_DANGLING) {
+ /* skip empty chains */
+ continue;
+ }
+
+ tmp = evbuffer_chain_new(sizeof(struct evbuffer_multicast_parent));
+ if (!tmp) {
+ event_warn("%s: out of memory", __func__);
+ return;
+ }
+ extra = EVBUFFER_CHAIN_EXTRA(struct evbuffer_multicast_parent, tmp);
+ /* reference evbuffer containing source chain so it
+ * doesn't get released while the chain is still
+ * being referenced to */
+ evbuffer_incref_(src);
+ extra->source = src;
+ /* reference source chain which now becomes immutable */
+ evbuffer_chain_incref(chain);
+ extra->parent = chain;
+ chain->flags |= EVBUFFER_IMMUTABLE;
+ tmp->buffer_len = chain->buffer_len;
+ tmp->misalign = chain->misalign;
+ tmp->off = chain->off;
+ tmp->flags |= EVBUFFER_MULTICAST|EVBUFFER_IMMUTABLE;
+ tmp->buffer = chain->buffer;
+ evbuffer_chain_insert(dst, tmp);
+ }
+}
+
+static void
+PREPEND_CHAIN(struct evbuffer *dst, struct evbuffer *src)
+{
+ ASSERT_EVBUFFER_LOCKED(dst);
+ ASSERT_EVBUFFER_LOCKED(src);
+ src->last->next = dst->first;
+ dst->first = src->first;
+ dst->total_len += src->total_len;
+ if (*dst->last_with_datap == NULL) {
+ if (src->last_with_datap == &(src)->first)
+ dst->last_with_datap = &dst->first;
+ else
+ dst->last_with_datap = src->last_with_datap;
+ } else if (dst->last_with_datap == &dst->first) {
+ dst->last_with_datap = &src->last->next;
+ }
+}
+
+int
+evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf)
+{
+ struct evbuffer_chain *pinned, *last;
+ size_t in_total_len, out_total_len;
+ int result = 0;
+
+ EVBUFFER_LOCK2(inbuf, outbuf);
+ in_total_len = inbuf->total_len;
+ out_total_len = outbuf->total_len;
+
+ if (in_total_len == 0 || outbuf == inbuf)
+ goto done;
+
+ if (outbuf->freeze_end || inbuf->freeze_start) {
+ result = -1;
+ goto done;
+ }
+
+ if (PRESERVE_PINNED(inbuf, &pinned, &last) < 0) {
+ result = -1;
+ goto done;
+ }
+
+ if (out_total_len == 0) {
+ /* There might be an empty chain at the start of outbuf; free
+ * it. */
+ evbuffer_free_all_chains(outbuf->first);
+ COPY_CHAIN(outbuf, inbuf);
+ } else {
+ APPEND_CHAIN(outbuf, inbuf);
+ }
+
+ RESTORE_PINNED(inbuf, pinned, last);
+
+ inbuf->n_del_for_cb += in_total_len;
+ outbuf->n_add_for_cb += in_total_len;
+
+ evbuffer_invoke_callbacks_(inbuf);
+ evbuffer_invoke_callbacks_(outbuf);
+
+done:
+ EVBUFFER_UNLOCK2(inbuf, outbuf);
+ return result;
+}
+
+int
+evbuffer_add_buffer_reference(struct evbuffer *outbuf, struct evbuffer *inbuf)
+{
+ size_t in_total_len, out_total_len;
+ struct evbuffer_chain *chain;
+ int result = 0;
+
+ EVBUFFER_LOCK2(inbuf, outbuf);
+ in_total_len = inbuf->total_len;
+ out_total_len = outbuf->total_len;
+ chain = inbuf->first;
+
+ if (in_total_len == 0)
+ goto done;
+
+ if (outbuf->freeze_end || outbuf == inbuf) {
+ result = -1;
+ goto done;
+ }
+
+ for (; chain; chain = chain->next) {
+ if ((chain->flags & (EVBUFFER_FILESEGMENT|EVBUFFER_SENDFILE|EVBUFFER_MULTICAST)) != 0) {
+ /* chain type can not be referenced */
+ result = -1;
+ goto done;
+ }
+ }
+
+ if (out_total_len == 0) {
+ /* There might be an empty chain at the start of outbuf; free
+ * it. */
+ evbuffer_free_all_chains(outbuf->first);
+ }
+ APPEND_CHAIN_MULTICAST(outbuf, inbuf);
+
+ outbuf->n_add_for_cb += in_total_len;
+ evbuffer_invoke_callbacks_(outbuf);
+
+done:
+ EVBUFFER_UNLOCK2(inbuf, outbuf);
+ return result;
+}
+
+int
+evbuffer_prepend_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf)
+{
+ struct evbuffer_chain *pinned, *last;
+ size_t in_total_len, out_total_len;
+ int result = 0;
+
+ EVBUFFER_LOCK2(inbuf, outbuf);
+
+ in_total_len = inbuf->total_len;
+ out_total_len = outbuf->total_len;
+
+ if (!in_total_len || inbuf == outbuf)
+ goto done;
+
+ if (outbuf->freeze_start || inbuf->freeze_start) {
+ result = -1;
+ goto done;
+ }
+
+ if (PRESERVE_PINNED(inbuf, &pinned, &last) < 0) {
+ result = -1;
+ goto done;
+ }
+
+ if (out_total_len == 0) {
+ /* There might be an empty chain at the start of outbuf; free
+ * it. */
+ evbuffer_free_all_chains(outbuf->first);
+ COPY_CHAIN(outbuf, inbuf);
+ } else {
+ PREPEND_CHAIN(outbuf, inbuf);
+ }
+
+ RESTORE_PINNED(inbuf, pinned, last);
+
+ inbuf->n_del_for_cb += in_total_len;
+ outbuf->n_add_for_cb += in_total_len;
+
+ evbuffer_invoke_callbacks_(inbuf);
+ evbuffer_invoke_callbacks_(outbuf);
+done:
+ EVBUFFER_UNLOCK2(inbuf, outbuf);
+ return result;
+}
+
+int
+evbuffer_drain(struct evbuffer *buf, size_t len)
+{
+ struct evbuffer_chain *chain, *next;
+ size_t remaining, old_len;
+ int result = 0;
+
+ EVBUFFER_LOCK(buf);
+ old_len = buf->total_len;
+
+ if (old_len == 0)
+ goto done;
+
+ if (buf->freeze_start) {
+ result = -1;
+ goto done;
+ }
+
+ if (len >= old_len && !HAS_PINNED_R(buf)) {
+ len = old_len;
+ for (chain = buf->first; chain != NULL; chain = next) {
+ next = chain->next;
+ evbuffer_chain_free(chain);
+ }
+
+ ZERO_CHAIN(buf);
+ } else {
+ if (len >= old_len)
+ len = old_len;
+
+ buf->total_len -= len;
+ remaining = len;
+ for (chain = buf->first;
+ remaining >= chain->off;
+ chain = next) {
+ next = chain->next;
+ remaining -= chain->off;
+
+ if (chain == *buf->last_with_datap) {
+ buf->last_with_datap = &buf->first;
+ }
+ if (&chain->next == buf->last_with_datap)
+ buf->last_with_datap = &buf->first;
+
+ if (CHAIN_PINNED_R(chain)) {
+ EVUTIL_ASSERT(remaining == 0);
+ chain->misalign += chain->off;
+ chain->off = 0;
+ break;
+ } else
+ evbuffer_chain_free(chain);
+ }
+
+ buf->first = chain;
+ chain->misalign += remaining;
+ chain->off -= remaining;
+ }
+
+ buf->n_del_for_cb += len;
+ /* Tell someone about changes in this buffer */
+ evbuffer_invoke_callbacks_(buf);
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+/* Reads data from an event buffer and drains the bytes read */
+int
+evbuffer_remove(struct evbuffer *buf, void *data_out, size_t datlen)
+{
+ ev_ssize_t n;
+ EVBUFFER_LOCK(buf);
+ n = evbuffer_copyout_from(buf, NULL, data_out, datlen);
+ if (n > 0) {
+ if (evbuffer_drain(buf, n)<0)
+ n = -1;
+ }
+ EVBUFFER_UNLOCK(buf);
+ return (int)n;
+}
+
+ev_ssize_t
+evbuffer_copyout(struct evbuffer *buf, void *data_out, size_t datlen)
+{
+ return evbuffer_copyout_from(buf, NULL, data_out, datlen);
+}
+
+ev_ssize_t
+evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos,
+ void *data_out, size_t datlen)
+{
+ /*XXX fails badly on sendfile case. */
+ struct evbuffer_chain *chain;
+ char *data = data_out;
+ size_t nread;
+ ev_ssize_t result = 0;
+ size_t pos_in_chain;
+
+ EVBUFFER_LOCK(buf);
+
+ if (pos) {
+ chain = pos->internal_.chain;
+ pos_in_chain = pos->internal_.pos_in_chain;
+ if (datlen + pos->pos > buf->total_len)
+ datlen = buf->total_len - pos->pos;
+ } else {
+ chain = buf->first;
+ pos_in_chain = 0;
+ if (datlen > buf->total_len)
+ datlen = buf->total_len;
+ }
+
+
+ if (datlen == 0)
+ goto done;
+
+ if (buf->freeze_start) {
+ result = -1;
+ goto done;
+ }
+
+ nread = datlen;
+
+ while (datlen && datlen >= chain->off - pos_in_chain) {
+ size_t copylen = chain->off - pos_in_chain;
+ memcpy(data,
+ chain->buffer + chain->misalign + pos_in_chain,
+ copylen);
+ data += copylen;
+ datlen -= copylen;
+
+ chain = chain->next;
+ pos_in_chain = 0;
+ EVUTIL_ASSERT(chain || datlen==0);
+ }
+
+ if (datlen) {
+ EVUTIL_ASSERT(chain);
+ memcpy(data, chain->buffer + chain->misalign + pos_in_chain,
+ datlen);
+ }
+
+ result = nread;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+/* reads data from the src buffer to the dst buffer, avoids memcpy as
+ * possible. */
+/* XXXX should return ev_ssize_t */
+int
+evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst,
+ size_t datlen)
+{
+ /*XXX We should have an option to force this to be zero-copy.*/
+
+ /*XXX can fail badly on sendfile case. */
+ struct evbuffer_chain *chain, *previous;
+ size_t nread = 0;
+ int result;
+
+ EVBUFFER_LOCK2(src, dst);
+
+ chain = previous = src->first;
+
+ if (datlen == 0 || dst == src) {
+ result = 0;
+ goto done;
+ }
+
+ if (dst->freeze_end || src->freeze_start) {
+ result = -1;
+ goto done;
+ }
+
+ /* short-cut if there is no more data buffered */
+ if (datlen >= src->total_len) {
+ datlen = src->total_len;
+ evbuffer_add_buffer(dst, src);
+ result = (int)datlen; /*XXXX should return ev_ssize_t*/
+ goto done;
+ }
+
+ /* removes chains if possible */
+ while (chain->off <= datlen) {
+ /* We can't remove the last with data from src unless we
+ * remove all chains, in which case we would have done the if
+ * block above */
+ EVUTIL_ASSERT(chain != *src->last_with_datap);
+ nread += chain->off;
+ datlen -= chain->off;
+ previous = chain;
+ if (src->last_with_datap == &chain->next)
+ src->last_with_datap = &src->first;
+ chain = chain->next;
+ }
+
+ if (nread) {
+ /* we can remove the chain */
+ struct evbuffer_chain **chp;
+ chp = evbuffer_free_trailing_empty_chains(dst);
+
+ if (dst->first == NULL) {
+ dst->first = src->first;
+ } else {
+ *chp = src->first;
+ }
+ dst->last = previous;
+ previous->next = NULL;
+ src->first = chain;
+ advance_last_with_data(dst);
+
+ dst->total_len += nread;
+ dst->n_add_for_cb += nread;
+ }
+
+ /* we know that there is more data in the src buffer than
+ * we want to read, so we manually drain the chain */
+ evbuffer_add(dst, chain->buffer + chain->misalign, datlen);
+ chain->misalign += datlen;
+ chain->off -= datlen;
+ nread += datlen;
+
+ /* You might think we would want to increment dst->n_add_for_cb
+ * here too. But evbuffer_add above already took care of that.
+ */
+ src->total_len -= nread;
+ src->n_del_for_cb += nread;
+
+ if (nread) {
+ evbuffer_invoke_callbacks_(dst);
+ evbuffer_invoke_callbacks_(src);
+ }
+ result = (int)nread;/*XXXX should change return type */
+
+done:
+ EVBUFFER_UNLOCK2(src, dst);
+ return result;
+}
+
+unsigned char *
+evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size)
+{
+ struct evbuffer_chain *chain, *next, *tmp, *last_with_data;
+ unsigned char *buffer, *result = NULL;
+ ev_ssize_t remaining;
+ int removed_last_with_data = 0;
+ int removed_last_with_datap = 0;
+
+ EVBUFFER_LOCK(buf);
+
+ chain = buf->first;
+
+ if (size < 0)
+ size = buf->total_len;
+ /* if size > buf->total_len, we cannot guarantee to the user that she
+ * is going to have a long enough buffer afterwards; so we return
+ * NULL */
+ if (size == 0 || (size_t)size > buf->total_len)
+ goto done;
+
+ /* No need to pull up anything; the first size bytes are
+ * already here. */
+ if (chain->off >= (size_t)size) {
+ result = chain->buffer + chain->misalign;
+ goto done;
+ }
+
+ /* Make sure that none of the chains we need to copy from is pinned. */
+ remaining = size - chain->off;
+ EVUTIL_ASSERT(remaining >= 0);
+ for (tmp=chain->next; tmp; tmp=tmp->next) {
+ if (CHAIN_PINNED(tmp))
+ goto done;
+ if (tmp->off >= (size_t)remaining)
+ break;
+ remaining -= tmp->off;
+ }
+
+ if (CHAIN_PINNED(chain)) {
+ size_t old_off = chain->off;
+ if (CHAIN_SPACE_LEN(chain) < size - chain->off) {
+ /* not enough room at end of chunk. */
+ goto done;
+ }
+ buffer = CHAIN_SPACE_PTR(chain);
+ tmp = chain;
+ tmp->off = size;
+ size -= old_off;
+ chain = chain->next;
+ } else if (chain->buffer_len - chain->misalign >= (size_t)size) {
+ /* already have enough space in the first chain */
+ size_t old_off = chain->off;
+ buffer = chain->buffer + chain->misalign + chain->off;
+ tmp = chain;
+ tmp->off = size;
+ size -= old_off;
+ chain = chain->next;
+ } else {
+ if ((tmp = evbuffer_chain_new(size)) == NULL) {
+ event_warn("%s: out of memory", __func__);
+ goto done;
+ }
+ buffer = tmp->buffer;
+ tmp->off = size;
+ buf->first = tmp;
+ }
+
+ /* TODO(niels): deal with buffers that point to NULL like sendfile */
+
+ /* Copy and free every chunk that will be entirely pulled into tmp */
+ last_with_data = *buf->last_with_datap;
+ for (; chain != NULL && (size_t)size >= chain->off; chain = next) {
+ next = chain->next;
+
+ memcpy(buffer, chain->buffer + chain->misalign, chain->off);
+ size -= chain->off;
+ buffer += chain->off;
+ if (chain == last_with_data)
+ removed_last_with_data = 1;
+ if (&chain->next == buf->last_with_datap)
+ removed_last_with_datap = 1;
+
+ evbuffer_chain_free(chain);
+ }
+
+ if (chain != NULL) {
+ memcpy(buffer, chain->buffer + chain->misalign, size);
+ chain->misalign += size;
+ chain->off -= size;
+ } else {
+ buf->last = tmp;
+ }
+
+ tmp->next = chain;
+
+ if (removed_last_with_data) {
+ buf->last_with_datap = &buf->first;
+ } else if (removed_last_with_datap) {
+ if (buf->first->next && buf->first->next->off)
+ buf->last_with_datap = &buf->first->next;
+ else
+ buf->last_with_datap = &buf->first;
+ }
+
+ result = (tmp->buffer + tmp->misalign);
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+/*
+ * Reads a line terminated by either '\r\n', '\n\r' or '\r' or '\n'.
+ * The returned buffer needs to be freed by the called.
+ */
+char *
+evbuffer_readline(struct evbuffer *buffer)
+{
+ return evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY);
+}
+
+static inline ev_ssize_t
+evbuffer_strchr(struct evbuffer_ptr *it, const char chr)
+{
+ struct evbuffer_chain *chain = it->internal_.chain;
+ size_t i = it->internal_.pos_in_chain;
+ while (chain != NULL) {
+ char *buffer = (char *)chain->buffer + chain->misalign;
+ char *cp = memchr(buffer+i, chr, chain->off-i);
+ if (cp) {
+ it->internal_.chain = chain;
+ it->internal_.pos_in_chain = cp - buffer;
+ it->pos += (cp - buffer - i);
+ return it->pos;
+ }
+ it->pos += chain->off - i;
+ i = 0;
+ chain = chain->next;
+ }
+
+ return (-1);
+}
+
+static inline char *
+find_eol_char(char *s, size_t len)
+{
+#define CHUNK_SZ 128
+ /* Lots of benchmarking found this approach to be faster in practice
+ * than doing two memchrs over the whole buffer, doin a memchr on each
+ * char of the buffer, or trying to emulate memchr by hand. */
+ char *s_end, *cr, *lf;
+ s_end = s+len;
+ while (s < s_end) {
+ size_t chunk = (s + CHUNK_SZ < s_end) ? CHUNK_SZ : (s_end - s);
+ cr = memchr(s, '\r', chunk);
+ lf = memchr(s, '\n', chunk);
+ if (cr) {
+ if (lf && lf < cr)
+ return lf;
+ return cr;
+ } else if (lf) {
+ return lf;
+ }
+ s += CHUNK_SZ;
+ }
+
+ return NULL;
+#undef CHUNK_SZ
+}
+
+static ev_ssize_t
+evbuffer_find_eol_char(struct evbuffer_ptr *it)
+{
+ struct evbuffer_chain *chain = it->internal_.chain;
+ size_t i = it->internal_.pos_in_chain;
+ while (chain != NULL) {
+ char *buffer = (char *)chain->buffer + chain->misalign;
+ char *cp = find_eol_char(buffer+i, chain->off-i);
+ if (cp) {
+ it->internal_.chain = chain;
+ it->internal_.pos_in_chain = cp - buffer;
+ it->pos += (cp - buffer) - i;
+ return it->pos;
+ }
+ it->pos += chain->off - i;
+ i = 0;
+ chain = chain->next;
+ }
+
+ return (-1);
+}
+
+static inline int
+evbuffer_strspn(
+ struct evbuffer_ptr *ptr, const char *chrset)
+{
+ int count = 0;
+ struct evbuffer_chain *chain = ptr->internal_.chain;
+ size_t i = ptr->internal_.pos_in_chain;
+
+ if (!chain)
+ return 0;
+
+ while (1) {
+ char *buffer = (char *)chain->buffer + chain->misalign;
+ for (; i < chain->off; ++i) {
+ const char *p = chrset;
+ while (*p) {
+ if (buffer[i] == *p++)
+ goto next;
+ }
+ ptr->internal_.chain = chain;
+ ptr->internal_.pos_in_chain = i;
+ ptr->pos += count;
+ return count;
+ next:
+ ++count;
+ }
+ i = 0;
+
+ if (! chain->next) {
+ ptr->internal_.chain = chain;
+ ptr->internal_.pos_in_chain = i;
+ ptr->pos += count;
+ return count;
+ }
+
+ chain = chain->next;
+ }
+}
+
+
+static inline int
+evbuffer_getchr(struct evbuffer_ptr *it)
+{
+ struct evbuffer_chain *chain = it->internal_.chain;
+ size_t off = it->internal_.pos_in_chain;
+
+ if (chain == NULL)
+ return -1;
+
+ return (unsigned char)chain->buffer[chain->misalign + off];
+}
+
+struct evbuffer_ptr
+evbuffer_search_eol(struct evbuffer *buffer,
+ struct evbuffer_ptr *start, size_t *eol_len_out,
+ enum evbuffer_eol_style eol_style)
+{
+ struct evbuffer_ptr it, it2;
+ size_t extra_drain = 0;
+ int ok = 0;
+
+ /* Avoid locking in trivial edge cases */
+ if (start && start->internal_.chain == NULL) {
+ PTR_NOT_FOUND(&it);
+ if (eol_len_out)
+ *eol_len_out = extra_drain;
+ return it;
+ }
+
+ EVBUFFER_LOCK(buffer);
+
+ if (start) {
+ memcpy(&it, start, sizeof(it));
+ } else {
+ it.pos = 0;
+ it.internal_.chain = buffer->first;
+ it.internal_.pos_in_chain = 0;
+ }
+
+ /* the eol_style determines our first stop character and how many
+ * characters we are going to drain afterwards. */
+ switch (eol_style) {
+ case EVBUFFER_EOL_ANY:
+ if (evbuffer_find_eol_char(&it) < 0)
+ goto done;
+ memcpy(&it2, &it, sizeof(it));
+ extra_drain = evbuffer_strspn(&it2, "\r\n");
+ break;
+ case EVBUFFER_EOL_CRLF_STRICT: {
+ it = evbuffer_search(buffer, "\r\n", 2, &it);
+ if (it.pos < 0)
+ goto done;
+ extra_drain = 2;
+ break;
+ }
+ case EVBUFFER_EOL_CRLF: {
+ ev_ssize_t start_pos = it.pos;
+ /* Look for a LF ... */
+ if (evbuffer_strchr(&it, '\n') < 0)
+ goto done;
+ extra_drain = 1;
+ /* ... optionally preceeded by a CR. */
+ if (it.pos == start_pos)
+ break; /* If the first character is \n, don't back up */
+ /* This potentially does an extra linear walk over the first
+ * few chains. Probably, that's not too expensive unless you
+ * have a really pathological setup. */
+ memcpy(&it2, &it, sizeof(it));
+ if (evbuffer_ptr_subtract(buffer, &it2, 1)<0)
+ break;
+ if (evbuffer_getchr(&it2) == '\r') {
+ memcpy(&it, &it2, sizeof(it));
+ extra_drain = 2;
+ }
+ break;
+ }
+ case EVBUFFER_EOL_LF:
+ if (evbuffer_strchr(&it, '\n') < 0)
+ goto done;
+ extra_drain = 1;
+ break;
+ case EVBUFFER_EOL_NUL:
+ if (evbuffer_strchr(&it, '\0') < 0)
+ goto done;
+ extra_drain = 1;
+ break;
+ default:
+ goto done;
+ }
+
+ ok = 1;
+done:
+ EVBUFFER_UNLOCK(buffer);
+
+ if (!ok)
+ PTR_NOT_FOUND(&it);
+ if (eol_len_out)
+ *eol_len_out = extra_drain;
+
+ return it;
+}
+
+char *
+evbuffer_readln(struct evbuffer *buffer, size_t *n_read_out,
+ enum evbuffer_eol_style eol_style)
+{
+ struct evbuffer_ptr it;
+ char *line;
+ size_t n_to_copy=0, extra_drain=0;
+ char *result = NULL;
+
+ EVBUFFER_LOCK(buffer);
+
+ if (buffer->freeze_start) {
+ goto done;
+ }
+
+ it = evbuffer_search_eol(buffer, NULL, &extra_drain, eol_style);
+ if (it.pos < 0)
+ goto done;
+ n_to_copy = it.pos;
+
+ if ((line = mm_malloc(n_to_copy+1)) == NULL) {
+ event_warn("%s: out of memory", __func__);
+ goto done;
+ }
+
+ evbuffer_remove(buffer, line, n_to_copy);
+ line[n_to_copy] = '\0';
+
+ evbuffer_drain(buffer, extra_drain);
+ result = line;
+done:
+ EVBUFFER_UNLOCK(buffer);
+
+ if (n_read_out)
+ *n_read_out = result ? n_to_copy : 0;
+
+ return result;
+}
+
+#define EVBUFFER_CHAIN_MAX_AUTO_SIZE 4096
+
+/* Adds data to an event buffer */
+
+int
+evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen)
+{
+ struct evbuffer_chain *chain, *tmp;
+ const unsigned char *data = data_in;
+ size_t remain, to_alloc;
+ int result = -1;
+
+ EVBUFFER_LOCK(buf);
+
+ if (buf->freeze_end) {
+ goto done;
+ }
+
+ chain = buf->last;
+
+ /* If there are no chains allocated for this buffer, allocate one
+ * big enough to hold all the data. */
+ if (chain == NULL) {
+ chain = evbuffer_chain_new(datlen);
+ if (!chain)
+ goto done;
+ evbuffer_chain_insert(buf, chain);
+ }
+
+ if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
+ remain = (size_t)(chain->buffer_len - chain->misalign - chain->off);
+ if (remain >= datlen) {
+ /* there's enough space to hold all the data in the
+ * current last chain */
+ memcpy(chain->buffer + chain->misalign + chain->off,
+ data, datlen);
+ chain->off += datlen;
+ buf->total_len += datlen;
+ buf->n_add_for_cb += datlen;
+ goto out;
+ } else if (!CHAIN_PINNED(chain) &&
+ evbuffer_chain_should_realign(chain, datlen)) {
+ /* we can fit the data into the misalignment */
+ evbuffer_chain_align(chain);
+
+ memcpy(chain->buffer + chain->off, data, datlen);
+ chain->off += datlen;
+ buf->total_len += datlen;
+ buf->n_add_for_cb += datlen;
+ goto out;
+ }
+ } else {
+ /* we cannot write any data to the last chain */
+ remain = 0;
+ }
+
+ /* we need to add another chain */
+ to_alloc = chain->buffer_len;
+ if (to_alloc <= EVBUFFER_CHAIN_MAX_AUTO_SIZE/2)
+ to_alloc <<= 1;
+ if (datlen > to_alloc)
+ to_alloc = datlen;
+ tmp = evbuffer_chain_new(to_alloc);
+ if (tmp == NULL)
+ goto done;
+
+ if (remain) {
+ memcpy(chain->buffer + chain->misalign + chain->off,
+ data, remain);
+ chain->off += remain;
+ buf->total_len += remain;
+ buf->n_add_for_cb += remain;
+ }
+
+ data += remain;
+ datlen -= remain;
+
+ memcpy(tmp->buffer, data, datlen);
+ tmp->off = datlen;
+ evbuffer_chain_insert(buf, tmp);
+ buf->n_add_for_cb += datlen;
+
+out:
+ evbuffer_invoke_callbacks_(buf);
+ result = 0;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+int
+evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen)
+{
+ struct evbuffer_chain *chain, *tmp;
+ int result = -1;
+
+ EVBUFFER_LOCK(buf);
+
+ if (buf->freeze_start) {
+ goto done;
+ }
+
+ chain = buf->first;
+
+ if (chain == NULL) {
+ chain = evbuffer_chain_new(datlen);
+ if (!chain)
+ goto done;
+ evbuffer_chain_insert(buf, chain);
+ }
+
+ /* we cannot touch immutable buffers */
+ if ((chain->flags & EVBUFFER_IMMUTABLE) == 0) {
+ /* If this chain is empty, we can treat it as
+ * 'empty at the beginning' rather than 'empty at the end' */
+ if (chain->off == 0)
+ chain->misalign = chain->buffer_len;
+
+ if ((size_t)chain->misalign >= datlen) {
+ /* we have enough space to fit everything */
+ memcpy(chain->buffer + chain->misalign - datlen,
+ data, datlen);
+ chain->off += datlen;
+ chain->misalign -= datlen;
+ buf->total_len += datlen;
+ buf->n_add_for_cb += datlen;
+ goto out;
+ } else if (chain->misalign) {
+ /* we can only fit some of the data. */
+ memcpy(chain->buffer,
+ (char*)data + datlen - chain->misalign,
+ (size_t)chain->misalign);
+ chain->off += (size_t)chain->misalign;
+ buf->total_len += (size_t)chain->misalign;
+ buf->n_add_for_cb += (size_t)chain->misalign;
+ datlen -= (size_t)chain->misalign;
+ chain->misalign = 0;
+ }
+ }
+
+ /* we need to add another chain */
+ if ((tmp = evbuffer_chain_new(datlen)) == NULL)
+ goto done;
+ buf->first = tmp;
+ if (buf->last_with_datap == &buf->first)
+ buf->last_with_datap = &tmp->next;
+
+ tmp->next = chain;
+
+ tmp->off = datlen;
+ tmp->misalign = tmp->buffer_len - datlen;
+
+ memcpy(tmp->buffer + tmp->misalign, data, datlen);
+ buf->total_len += datlen;
+ buf->n_add_for_cb += (size_t)chain->misalign;
+
+out:
+ evbuffer_invoke_callbacks_(buf);
+ result = 0;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+/** Helper: realigns the memory in chain->buffer so that misalign is 0. */
+static void
+evbuffer_chain_align(struct evbuffer_chain *chain)
+{
+ EVUTIL_ASSERT(!(chain->flags & EVBUFFER_IMMUTABLE));
+ EVUTIL_ASSERT(!(chain->flags & EVBUFFER_MEM_PINNED_ANY));
+ memmove(chain->buffer, chain->buffer + chain->misalign, chain->off);
+ chain->misalign = 0;
+}
+
+#define MAX_TO_COPY_IN_EXPAND 4096
+#define MAX_TO_REALIGN_IN_EXPAND 2048
+
+/** Helper: return true iff we should realign chain to fit datalen bytes of
+ data in it. */
+static int
+evbuffer_chain_should_realign(struct evbuffer_chain *chain,
+ size_t datlen)
+{
+ return chain->buffer_len - chain->off >= datlen &&
+ (chain->off < chain->buffer_len / 2) &&
+ (chain->off <= MAX_TO_REALIGN_IN_EXPAND);
+}
+
+/* Expands the available space in the event buffer to at least datlen, all in
+ * a single chunk. Return that chunk. */
+static struct evbuffer_chain *
+evbuffer_expand_singlechain(struct evbuffer *buf, size_t datlen)
+{
+ struct evbuffer_chain *chain, **chainp;
+ struct evbuffer_chain *result = NULL;
+ ASSERT_EVBUFFER_LOCKED(buf);
+
+ chainp = buf->last_with_datap;
+
+ /* XXX If *chainp is no longer writeable, but has enough space in its
+ * misalign, this might be a bad idea: we could still use *chainp, not
+ * (*chainp)->next. */
+ if (*chainp && CHAIN_SPACE_LEN(*chainp) == 0)
+ chainp = &(*chainp)->next;
+
+ /* 'chain' now points to the first chain with writable space (if any)
+ * We will either use it, realign it, replace it, or resize it. */
+ chain = *chainp;
+
+ if (chain == NULL ||
+ (chain->flags & (EVBUFFER_IMMUTABLE|EVBUFFER_MEM_PINNED_ANY))) {
+ /* We can't use the last_with_data chain at all. Just add a
+ * new one that's big enough. */
+ goto insert_new;
+ }
+
+ /* If we can fit all the data, then we don't have to do anything */
+ if (CHAIN_SPACE_LEN(chain) >= datlen) {
+ result = chain;
+ goto ok;
+ }
+
+ /* If the chain is completely empty, just replace it by adding a new
+ * empty chain. */
+ if (chain->off == 0) {
+ goto insert_new;
+ }
+
+ /* If the misalignment plus the remaining space fulfills our data
+ * needs, we could just force an alignment to happen. Afterwards, we
+ * have enough space. But only do this if we're saving a lot of space
+ * and not moving too much data. Otherwise the space savings are
+ * probably offset by the time lost in copying.
+ */
+ if (evbuffer_chain_should_realign(chain, datlen)) {
+ evbuffer_chain_align(chain);
+ result = chain;
+ goto ok;
+ }
+
+ /* At this point, we can either resize the last chunk with space in
+ * it, use the next chunk after it, or If we add a new chunk, we waste
+ * CHAIN_SPACE_LEN(chain) bytes in the former last chunk. If we
+ * resize, we have to copy chain->off bytes.
+ */
+
+ /* Would expanding this chunk be affordable and worthwhile? */
+ if (CHAIN_SPACE_LEN(chain) < chain->buffer_len / 8 ||
+ chain->off > MAX_TO_COPY_IN_EXPAND) {
+ /* It's not worth resizing this chain. Can the next one be
+ * used? */
+ if (chain->next && CHAIN_SPACE_LEN(chain->next) >= datlen) {
+ /* Yes, we can just use the next chain (which should
+ * be empty. */
+ result = chain->next;
+ goto ok;
+ } else {
+ /* No; append a new chain (which will free all
+ * terminal empty chains.) */
+ goto insert_new;
+ }
+ } else {
+ /* Okay, we're going to try to resize this chain: Not doing so
+ * would waste at least 1/8 of its current allocation, and we
+ * can do so without having to copy more than
+ * MAX_TO_COPY_IN_EXPAND bytes. */
+ /* figure out how much space we need */
+ size_t length = chain->off + datlen;
+ struct evbuffer_chain *tmp = evbuffer_chain_new(length);
+ if (tmp == NULL)
+ goto err;
+
+ /* copy the data over that we had so far */
+ tmp->off = chain->off;
+ memcpy(tmp->buffer, chain->buffer + chain->misalign,
+ chain->off);
+ /* fix up the list */
+ EVUTIL_ASSERT(*chainp == chain);
+ result = *chainp = tmp;
+
+ if (buf->last == chain)
+ buf->last = tmp;
+
+ tmp->next = chain->next;
+ evbuffer_chain_free(chain);
+ goto ok;
+ }
+
+insert_new:
+ result = evbuffer_chain_insert_new(buf, datlen);
+ if (!result)
+ goto err;
+ok:
+ EVUTIL_ASSERT(result);
+ EVUTIL_ASSERT(CHAIN_SPACE_LEN(result) >= datlen);
+err:
+ return result;
+}
+
+/* Make sure that datlen bytes are available for writing in the last n
+ * chains. Never copies or moves data. */
+int
+evbuffer_expand_fast_(struct evbuffer *buf, size_t datlen, int n)
+{
+ struct evbuffer_chain *chain = buf->last, *tmp, *next;
+ size_t avail;
+ int used;
+
+ ASSERT_EVBUFFER_LOCKED(buf);
+ EVUTIL_ASSERT(n >= 2);
+
+ if (chain == NULL || (chain->flags & EVBUFFER_IMMUTABLE)) {
+ /* There is no last chunk, or we can't touch the last chunk.
+ * Just add a new chunk. */
+ chain = evbuffer_chain_new(datlen);
+ if (chain == NULL)
+ return (-1);
+
+ evbuffer_chain_insert(buf, chain);
+ return (0);
+ }
+
+ used = 0; /* number of chains we're using space in. */
+ avail = 0; /* how much space they have. */
+ /* How many bytes can we stick at the end of buffer as it is? Iterate
+ * over the chains at the end of the buffer, tring to see how much
+ * space we have in the first n. */
+ for (chain = *buf->last_with_datap; chain; chain = chain->next) {
+ if (chain->off) {
+ size_t space = (size_t) CHAIN_SPACE_LEN(chain);
+ EVUTIL_ASSERT(chain == *buf->last_with_datap);
+ if (space) {
+ avail += space;
+ ++used;
+ }
+ } else {
+ /* No data in chain; realign it. */
+ chain->misalign = 0;
+ avail += chain->buffer_len;
+ ++used;
+ }
+ if (avail >= datlen) {
+ /* There is already enough space. Just return */
+ return (0);
+ }
+ if (used == n)
+ break;
+ }
+
+ /* There wasn't enough space in the first n chains with space in
+ * them. Either add a new chain with enough space, or replace all
+ * empty chains with one that has enough space, depending on n. */
+ if (used < n) {
+ /* The loop ran off the end of the chains before it hit n
+ * chains; we can add another. */
+ EVUTIL_ASSERT(chain == NULL);
+
+ tmp = evbuffer_chain_new(datlen - avail);
+ if (tmp == NULL)
+ return (-1);
+
+ buf->last->next = tmp;
+ buf->last = tmp;
+ /* (we would only set last_with_data if we added the first
+ * chain. But if the buffer had no chains, we would have
+ * just allocated a new chain earlier) */
+ return (0);
+ } else {
+ /* Nuke _all_ the empty chains. */
+ int rmv_all = 0; /* True iff we removed last_with_data. */
+ chain = *buf->last_with_datap;
+ if (!chain->off) {
+ EVUTIL_ASSERT(chain == buf->first);
+ rmv_all = 1;
+ avail = 0;
+ } else {
+ avail = (size_t) CHAIN_SPACE_LEN(chain);
+ chain = chain->next;
+ }
+
+
+ for (; chain; chain = next) {
+ next = chain->next;
+ EVUTIL_ASSERT(chain->off == 0);
+ evbuffer_chain_free(chain);
+ }
+ tmp = evbuffer_chain_new(datlen - avail);
+ if (tmp == NULL) {
+ if (rmv_all) {
+ ZERO_CHAIN(buf);
+ } else {
+ buf->last = *buf->last_with_datap;
+ (*buf->last_with_datap)->next = NULL;
+ }
+ return (-1);
+ }
+
+ if (rmv_all) {
+ buf->first = buf->last = tmp;
+ buf->last_with_datap = &buf->first;
+ } else {
+ (*buf->last_with_datap)->next = tmp;
+ buf->last = tmp;
+ }
+ return (0);
+ }
+}
+
+int
+evbuffer_expand(struct evbuffer *buf, size_t datlen)
+{
+ struct evbuffer_chain *chain;
+
+ EVBUFFER_LOCK(buf);
+ chain = evbuffer_expand_singlechain(buf, datlen);
+ EVBUFFER_UNLOCK(buf);
+ return chain ? 0 : -1;
+}
+
+/*
+ * Reads data from a file descriptor into a buffer.
+ */
+
+#if defined(EVENT__HAVE_SYS_UIO_H) || defined(_WIN32)
+#define USE_IOVEC_IMPL
+#endif
+
+#ifdef USE_IOVEC_IMPL
+
+#ifdef EVENT__HAVE_SYS_UIO_H
+/* number of iovec we use for writev, fragmentation is going to determine
+ * how much we end up writing */
+
+#define DEFAULT_WRITE_IOVEC 128
+
+#if defined(UIO_MAXIOV) && UIO_MAXIOV < DEFAULT_WRITE_IOVEC
+#define NUM_WRITE_IOVEC UIO_MAXIOV
+#elif defined(IOV_MAX) && IOV_MAX < DEFAULT_WRITE_IOVEC
+#define NUM_WRITE_IOVEC IOV_MAX
+#else
+#define NUM_WRITE_IOVEC DEFAULT_WRITE_IOVEC
+#endif
+
+#define IOV_TYPE struct iovec
+#define IOV_PTR_FIELD iov_base
+#define IOV_LEN_FIELD iov_len
+#define IOV_LEN_TYPE size_t
+#else
+#define NUM_WRITE_IOVEC 16
+#define IOV_TYPE WSABUF
+#define IOV_PTR_FIELD buf
+#define IOV_LEN_FIELD len
+#define IOV_LEN_TYPE unsigned long
+#endif
+#endif
+#define NUM_READ_IOVEC 4
+
+#define EVBUFFER_MAX_READ 4096
+
+/** Helper function to figure out which space to use for reading data into
+ an evbuffer. Internal use only.
+
+ @param buf The buffer to read into
+ @param howmuch How much we want to read.
+ @param vecs An array of two or more iovecs or WSABUFs.
+ @param n_vecs_avail The length of vecs
+ @param chainp A pointer to a variable to hold the first chain we're
+ reading into.
+ @param exact Boolean: if true, we do not provide more than 'howmuch'
+ space in the vectors, even if more space is available.
+ @return The number of buffers we're using.
+ */
+int
+evbuffer_read_setup_vecs_(struct evbuffer *buf, ev_ssize_t howmuch,
+ struct evbuffer_iovec *vecs, int n_vecs_avail,
+ struct evbuffer_chain ***chainp, int exact)
+{
+ struct evbuffer_chain *chain;
+ struct evbuffer_chain **firstchainp;
+ size_t so_far;
+ int i;
+ ASSERT_EVBUFFER_LOCKED(buf);
+
+ if (howmuch < 0)
+ return -1;
+
+ so_far = 0;
+ /* Let firstchain be the first chain with any space on it */
+ firstchainp = buf->last_with_datap;
+ if (CHAIN_SPACE_LEN(*firstchainp) == 0) {
+ firstchainp = &(*firstchainp)->next;
+ }
+
+ chain = *firstchainp;
+ for (i = 0; i < n_vecs_avail && so_far < (size_t)howmuch; ++i) {
+ size_t avail = (size_t) CHAIN_SPACE_LEN(chain);
+ if (avail > (howmuch - so_far) && exact)
+ avail = howmuch - so_far;
+ vecs[i].iov_base = CHAIN_SPACE_PTR(chain);
+ vecs[i].iov_len = avail;
+ so_far += avail;
+ chain = chain->next;
+ }
+
+ *chainp = firstchainp;
+ return i;
+}
+
+static int
+get_n_bytes_readable_on_socket(evutil_socket_t fd)
+{
+#if defined(FIONREAD) && defined(_WIN32)
+ unsigned long lng = EVBUFFER_MAX_READ;
+ if (ioctlsocket(fd, FIONREAD, &lng) < 0)
+ return -1;
+ return (int)lng;
+#elif defined(FIONREAD)
+ int n = EVBUFFER_MAX_READ;
+ if (ioctl(fd, FIONREAD, &n) < 0)
+ return -1;
+ return n;
+#else
+ return EVBUFFER_MAX_READ;
+#endif
+}
+
+/* TODO(niels): should this function return ev_ssize_t and take ev_ssize_t
+ * as howmuch? */
+int
+evbuffer_read(struct evbuffer *buf, evutil_socket_t fd, int howmuch)
+{
+ struct evbuffer_chain **chainp;
+ int n;
+ int result;
+
+#ifdef USE_IOVEC_IMPL
+ int nvecs, i, remaining;
+#else
+ struct evbuffer_chain *chain;
+ unsigned char *p;
+#endif
+
+ EVBUFFER_LOCK(buf);
+
+ if (buf->freeze_end) {
+ result = -1;
+ goto done;
+ }
+
+ n = get_n_bytes_readable_on_socket(fd);
+ if (n <= 0 || n > EVBUFFER_MAX_READ)
+ n = EVBUFFER_MAX_READ;
+ if (howmuch < 0 || howmuch > n)
+ howmuch = n;
+
+#ifdef USE_IOVEC_IMPL
+ /* Since we can use iovecs, we're willing to use the last
+ * NUM_READ_IOVEC chains. */
+ if (evbuffer_expand_fast_(buf, howmuch, NUM_READ_IOVEC) == -1) {
+ result = -1;
+ goto done;
+ } else {
+ IOV_TYPE vecs[NUM_READ_IOVEC];
+#ifdef EVBUFFER_IOVEC_IS_NATIVE_
+ nvecs = evbuffer_read_setup_vecs_(buf, howmuch, vecs,
+ NUM_READ_IOVEC, &chainp, 1);
+#else
+ /* We aren't using the native struct iovec. Therefore,
+ we are on win32. */
+ struct evbuffer_iovec ev_vecs[NUM_READ_IOVEC];
+ nvecs = evbuffer_read_setup_vecs_(buf, howmuch, ev_vecs, 2,
+ &chainp, 1);
+
+ for (i=0; i < nvecs; ++i)
+ WSABUF_FROM_EVBUFFER_IOV(&vecs[i], &ev_vecs[i]);
+#endif
+
+#ifdef _WIN32
+ {
+ DWORD bytesRead;
+ DWORD flags=0;
+ if (WSARecv(fd, vecs, nvecs, &bytesRead, &flags, NULL, NULL)) {
+ /* The read failed. It might be a close,
+ * or it might be an error. */
+ if (WSAGetLastError() == WSAECONNABORTED)
+ n = 0;
+ else
+ n = -1;
+ } else
+ n = bytesRead;
+ }
+#else
+ n = readv(fd, vecs, nvecs);
+#endif
+ }
+
+#else /*!USE_IOVEC_IMPL*/
+ /* If we don't have FIONREAD, we might waste some space here */
+ /* XXX we _will_ waste some space here if there is any space left
+ * over on buf->last. */
+ if ((chain = evbuffer_expand_singlechain(buf, howmuch)) == NULL) {
+ result = -1;
+ goto done;
+ }
+
+ /* We can append new data at this point */
+ p = chain->buffer + chain->misalign + chain->off;
+
+#ifndef _WIN32
+ n = read(fd, p, howmuch);
+#else
+ n = recv(fd, p, howmuch, 0);
+#endif
+#endif /* USE_IOVEC_IMPL */
+
+ if (n == -1) {
+ result = -1;
+ goto done;
+ }
+ if (n == 0) {
+ result = 0;
+ goto done;
+ }
+
+#ifdef USE_IOVEC_IMPL
+ remaining = n;
+ for (i=0; i < nvecs; ++i) {
+ ev_ssize_t space = (ev_ssize_t) CHAIN_SPACE_LEN(*chainp);
+ if (space < remaining) {
+ (*chainp)->off += space;
+ remaining -= (int)space;
+ } else {
+ (*chainp)->off += remaining;
+ buf->last_with_datap = chainp;
+ break;
+ }
+ chainp = &(*chainp)->next;
+ }
+#else
+ chain->off += n;
+ advance_last_with_data(buf);
+#endif
+ buf->total_len += n;
+ buf->n_add_for_cb += n;
+
+ /* Tell someone about changes in this buffer */
+ evbuffer_invoke_callbacks_(buf);
+ result = n;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+#ifdef USE_IOVEC_IMPL
+static inline int
+evbuffer_write_iovec(struct evbuffer *buffer, evutil_socket_t fd,
+ ev_ssize_t howmuch)
+{
+ IOV_TYPE iov[NUM_WRITE_IOVEC];
+ struct evbuffer_chain *chain = buffer->first;
+ int n, i = 0;
+
+ if (howmuch < 0)
+ return -1;
+
+ ASSERT_EVBUFFER_LOCKED(buffer);
+ /* XXX make this top out at some maximal data length? if the
+ * buffer has (say) 1MB in it, split over 128 chains, there's
+ * no way it all gets written in one go. */
+ while (chain != NULL && i < NUM_WRITE_IOVEC && howmuch) {
+#ifdef USE_SENDFILE
+ /* we cannot write the file info via writev */
+ if (chain->flags & EVBUFFER_SENDFILE)
+ break;
+#endif
+ iov[i].IOV_PTR_FIELD = (void *) (chain->buffer + chain->misalign);
+ if ((size_t)howmuch >= chain->off) {
+ /* XXXcould be problematic when windows supports mmap*/
+ iov[i++].IOV_LEN_FIELD = (IOV_LEN_TYPE)chain->off;
+ howmuch -= chain->off;
+ } else {
+ /* XXXcould be problematic when windows supports mmap*/
+ iov[i++].IOV_LEN_FIELD = (IOV_LEN_TYPE)howmuch;
+ break;
+ }
+ chain = chain->next;
+ }
+ if (! i)
+ return 0;
+
+#ifdef _WIN32
+ {
+ DWORD bytesSent;
+ if (WSASend(fd, iov, i, &bytesSent, 0, NULL, NULL))
+ n = -1;
+ else
+ n = bytesSent;
+ }
+#else
+ n = writev(fd, iov, i);
+#endif
+ return (n);
+}
+#endif
+
+#ifdef USE_SENDFILE
+static inline int
+evbuffer_write_sendfile(struct evbuffer *buffer, evutil_socket_t dest_fd,
+ ev_ssize_t howmuch)
+{
+ struct evbuffer_chain *chain = buffer->first;
+ struct evbuffer_chain_file_segment *info =
+ EVBUFFER_CHAIN_EXTRA(struct evbuffer_chain_file_segment,
+ chain);
+ const int source_fd = info->segment->fd;
+#if defined(SENDFILE_IS_MACOSX) || defined(SENDFILE_IS_FREEBSD)
+ int res;
+ ev_off_t len = chain->off;
+#elif defined(SENDFILE_IS_LINUX) || defined(SENDFILE_IS_SOLARIS)
+ ev_ssize_t res;
+ ev_off_t offset = chain->misalign;
+#endif
+
+ ASSERT_EVBUFFER_LOCKED(buffer);
+
+#if defined(SENDFILE_IS_MACOSX)
+ res = sendfile(source_fd, dest_fd, chain->misalign, &len, NULL, 0);
+ if (res == -1 && !EVUTIL_ERR_RW_RETRIABLE(errno))
+ return (-1);
+
+ return (len);
+#elif defined(SENDFILE_IS_FREEBSD)
+ res = sendfile(source_fd, dest_fd, chain->misalign, chain->off, NULL, &len, 0);
+ if (res == -1 && !EVUTIL_ERR_RW_RETRIABLE(errno))
+ return (-1);
+
+ return (len);
+#elif defined(SENDFILE_IS_LINUX)
+ /* TODO(niels): implement splice */
+ res = sendfile(dest_fd, source_fd, &offset, chain->off);
+ if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) {
+ /* if this is EAGAIN or EINTR return 0; otherwise, -1 */
+ return (0);
+ }
+ return (res);
+#elif defined(SENDFILE_IS_SOLARIS)
+ {
+ const off_t offset_orig = offset;
+ res = sendfile(dest_fd, source_fd, &offset, chain->off);
+ if (res == -1 && EVUTIL_ERR_RW_RETRIABLE(errno)) {
+ if (offset - offset_orig)
+ return offset - offset_orig;
+ /* if this is EAGAIN or EINTR and no bytes were
+ * written, return 0 */
+ return (0);
+ }
+ return (res);
+ }
+#endif
+}
+#endif
+
+int
+evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
+ ev_ssize_t howmuch)
+{
+ int n = -1;
+
+ EVBUFFER_LOCK(buffer);
+
+ if (buffer->freeze_start) {
+ goto done;
+ }
+
+ if (howmuch < 0 || (size_t)howmuch > buffer->total_len)
+ howmuch = buffer->total_len;
+
+ if (howmuch > 0) {
+#ifdef USE_SENDFILE
+ struct evbuffer_chain *chain = buffer->first;
+ if (chain != NULL && (chain->flags & EVBUFFER_SENDFILE))
+ n = evbuffer_write_sendfile(buffer, fd, howmuch);
+ else {
+#endif
+#ifdef USE_IOVEC_IMPL
+ n = evbuffer_write_iovec(buffer, fd, howmuch);
+#elif defined(_WIN32)
+ /* XXX(nickm) Don't disable this code until we know if
+ * the WSARecv code above works. */
+ void *p = evbuffer_pullup(buffer, howmuch);
+ n = send(fd, p, howmuch, 0);
+#else
+ void *p = evbuffer_pullup(buffer, howmuch);
+ n = write(fd, p, howmuch);
+#endif
+#ifdef USE_SENDFILE
+ }
+#endif
+ }
+
+ if (n > 0)
+ evbuffer_drain(buffer, n);
+
+done:
+ EVBUFFER_UNLOCK(buffer);
+ return (n);
+}
+
+int
+evbuffer_write(struct evbuffer *buffer, evutil_socket_t fd)
+{
+ return evbuffer_write_atmost(buffer, fd, -1);
+}
+
+unsigned char *
+evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len)
+{
+ unsigned char *search;
+ struct evbuffer_ptr ptr;
+
+ EVBUFFER_LOCK(buffer);
+
+ ptr = evbuffer_search(buffer, (const char *)what, len, NULL);
+ if (ptr.pos < 0) {
+ search = NULL;
+ } else {
+ search = evbuffer_pullup(buffer, ptr.pos + len);
+ if (search)
+ search += ptr.pos;
+ }
+ EVBUFFER_UNLOCK(buffer);
+ return search;
+}
+
+/* Subract <b>howfar</b> from the position of <b>pos</b> within
+ * <b>buf</b>. Returns 0 on success, -1 on failure.
+ *
+ * This isn't exposed yet, because of potential inefficiency issues.
+ * Maybe it should be. */
+static int
+evbuffer_ptr_subtract(struct evbuffer *buf, struct evbuffer_ptr *pos,
+ size_t howfar)
+{
+ if (howfar > (size_t)pos->pos)
+ return -1;
+ if (pos->internal_.chain && howfar <= pos->internal_.pos_in_chain) {
+ pos->internal_.pos_in_chain -= howfar;
+ pos->pos -= howfar;
+ return 0;
+ } else {
+ const size_t newpos = pos->pos - howfar;
+ /* Here's the inefficient part: it walks over the
+ * chains until we hit newpos. */
+ return evbuffer_ptr_set(buf, pos, newpos, EVBUFFER_PTR_SET);
+ }
+}
+
+int
+evbuffer_ptr_set(struct evbuffer *buf, struct evbuffer_ptr *pos,
+ size_t position, enum evbuffer_ptr_how how)
+{
+ size_t left = position;
+ struct evbuffer_chain *chain = NULL;
+ int result = 0;
+
+ EVBUFFER_LOCK(buf);
+
+ switch (how) {
+ case EVBUFFER_PTR_SET:
+ chain = buf->first;
+ pos->pos = position;
+ position = 0;
+ break;
+ case EVBUFFER_PTR_ADD:
+ /* this avoids iterating over all previous chains if
+ we just want to advance the position */
+ chain = pos->internal_.chain;
+ pos->pos += position;
+ position = pos->internal_.pos_in_chain;
+ break;
+ }
+
+ while (chain && position + left >= chain->off) {
+ left -= chain->off - position;
+ chain = chain->next;
+ position = 0;
+ }
+ if (chain) {
+ pos->internal_.chain = chain;
+ pos->internal_.pos_in_chain = position + left;
+ } else if (left == 0) {
+ /* The first byte in the (nonexistent) chain after the last chain */
+ pos->internal_.chain = NULL;
+ pos->internal_.pos_in_chain = 0;
+ } else {
+ PTR_NOT_FOUND(pos);
+ result = -1;
+ }
+
+ EVBUFFER_UNLOCK(buf);
+
+ return result;
+}
+
+/**
+ Compare the bytes in buf at position pos to the len bytes in mem. Return
+ less than 0, 0, or greater than 0 as memcmp.
+ */
+static int
+evbuffer_ptr_memcmp(const struct evbuffer *buf, const struct evbuffer_ptr *pos,
+ const char *mem, size_t len)
+{
+ struct evbuffer_chain *chain;
+ size_t position;
+ int r;
+
+ ASSERT_EVBUFFER_LOCKED(buf);
+
+ if (pos->pos + len > buf->total_len)
+ return -1;
+
+ chain = pos->internal_.chain;
+ position = pos->internal_.pos_in_chain;
+ while (len && chain) {
+ size_t n_comparable;
+ if (len + position > chain->off)
+ n_comparable = chain->off - position;
+ else
+ n_comparable = len;
+ r = memcmp(chain->buffer + chain->misalign + position, mem,
+ n_comparable);
+ if (r)
+ return r;
+ mem += n_comparable;
+ len -= n_comparable;
+ position = 0;
+ chain = chain->next;
+ }
+
+ return 0;
+}
+
+struct evbuffer_ptr
+evbuffer_search(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start)
+{
+ return evbuffer_search_range(buffer, what, len, start, NULL);
+}
+
+struct evbuffer_ptr
+evbuffer_search_range(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start, const struct evbuffer_ptr *end)
+{
+ struct evbuffer_ptr pos;
+ struct evbuffer_chain *chain, *last_chain = NULL;
+ const unsigned char *p;
+ char first;
+
+ EVBUFFER_LOCK(buffer);
+
+ if (start) {
+ memcpy(&pos, start, sizeof(pos));
+ chain = pos.internal_.chain;
+ } else {
+ pos.pos = 0;
+ chain = pos.internal_.chain = buffer->first;
+ pos.internal_.pos_in_chain = 0;
+ }
+
+ if (end)
+ last_chain = end->internal_.chain;
+
+ if (!len || len > EV_SSIZE_MAX)
+ goto done;
+
+ first = what[0];
+
+ while (chain) {
+ const unsigned char *start_at =
+ chain->buffer + chain->misalign +
+ pos.internal_.pos_in_chain;
+ p = memchr(start_at, first,
+ chain->off - pos.internal_.pos_in_chain);
+ if (p) {
+ pos.pos += p - start_at;
+ pos.internal_.pos_in_chain += p - start_at;
+ if (!evbuffer_ptr_memcmp(buffer, &pos, what, len)) {
+ if (end && pos.pos + (ev_ssize_t)len > end->pos)
+ goto not_found;
+ else
+ goto done;
+ }
+ ++pos.pos;
+ ++pos.internal_.pos_in_chain;
+ if (pos.internal_.pos_in_chain == chain->off) {
+ chain = pos.internal_.chain = chain->next;
+ pos.internal_.pos_in_chain = 0;
+ }
+ } else {
+ if (chain == last_chain)
+ goto not_found;
+ pos.pos += chain->off - pos.internal_.pos_in_chain;
+ chain = pos.internal_.chain = chain->next;
+ pos.internal_.pos_in_chain = 0;
+ }
+ }
+
+not_found:
+ PTR_NOT_FOUND(&pos);
+done:
+ EVBUFFER_UNLOCK(buffer);
+ return pos;
+}
+
+int
+evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
+ struct evbuffer_ptr *start_at,
+ struct evbuffer_iovec *vec, int n_vec)
+{
+ struct evbuffer_chain *chain;
+ int idx = 0;
+ ev_ssize_t len_so_far = 0;
+
+ /* Avoid locking in trivial edge cases */
+ if (start_at && start_at->internal_.chain == NULL)
+ return 0;
+
+ EVBUFFER_LOCK(buffer);
+
+ if (start_at) {
+ chain = start_at->internal_.chain;
+ len_so_far = chain->off
+ - start_at->internal_.pos_in_chain;
+ idx = 1;
+ if (n_vec > 0) {
+ vec[0].iov_base = chain->buffer + chain->misalign
+ + start_at->internal_.pos_in_chain;
+ vec[0].iov_len = len_so_far;
+ }
+ chain = chain->next;
+ } else {
+ chain = buffer->first;
+ }
+
+ if (n_vec == 0 && len < 0) {
+ /* If no vectors are provided and they asked for "everything",
+ * pretend they asked for the actual available amount. */
+ len = buffer->total_len - len_so_far;
+ }
+
+ while (chain) {
+ if (len >= 0 && len_so_far >= len)
+ break;
+ if (idx<n_vec) {
+ vec[idx].iov_base = chain->buffer + chain->misalign;
+ vec[idx].iov_len = chain->off;
+ } else if (len<0) {
+ break;
+ }
+ ++idx;
+ len_so_far += chain->off;
+ chain = chain->next;
+ }
+
+ EVBUFFER_UNLOCK(buffer);
+
+ return idx;
+}
+
+
+int
+evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
+{
+ char *buffer;
+ size_t space;
+ int sz, result = -1;
+ va_list aq;
+ struct evbuffer_chain *chain;
+
+
+ EVBUFFER_LOCK(buf);
+
+ if (buf->freeze_end) {
+ goto done;
+ }
+
+ /* make sure that at least some space is available */
+ if ((chain = evbuffer_expand_singlechain(buf, 64)) == NULL)
+ goto done;
+
+ for (;;) {
+#if 0
+ size_t used = chain->misalign + chain->off;
+ buffer = (char *)chain->buffer + chain->misalign + chain->off;
+ EVUTIL_ASSERT(chain->buffer_len >= used);
+ space = chain->buffer_len - used;
+#endif
+ buffer = (char*) CHAIN_SPACE_PTR(chain);
+ space = (size_t) CHAIN_SPACE_LEN(chain);
+
+#ifndef va_copy
+#define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list))
+#endif
+ va_copy(aq, ap);
+
+ sz = evutil_vsnprintf(buffer, space, fmt, aq);
+
+ va_end(aq);
+
+ if (sz < 0)
+ goto done;
+ if ((size_t)sz < space) {
+ chain->off += sz;
+ buf->total_len += sz;
+ buf->n_add_for_cb += sz;
+
+ advance_last_with_data(buf);
+ evbuffer_invoke_callbacks_(buf);
+ result = sz;
+ goto done;
+ }
+ if ((chain = evbuffer_expand_singlechain(buf, sz + 1)) == NULL)
+ goto done;
+ }
+ /* NOTREACHED */
+
+done:
+ EVBUFFER_UNLOCK(buf);
+ return result;
+}
+
+int
+evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...)
+{
+ int res = -1;
+ va_list ap;
+
+ va_start(ap, fmt);
+ res = evbuffer_add_vprintf(buf, fmt, ap);
+ va_end(ap);
+
+ return (res);
+}
+
+int
+evbuffer_add_reference(struct evbuffer *outbuf,
+ const void *data, size_t datlen,
+ evbuffer_ref_cleanup_cb cleanupfn, void *extra)
+{
+ struct evbuffer_chain *chain;
+ struct evbuffer_chain_reference *info;
+ int result = -1;
+
+ chain = evbuffer_chain_new(sizeof(struct evbuffer_chain_reference));
+ if (!chain)
+ return (-1);
+ chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
+ chain->buffer = (u_char *)data;
+ chain->buffer_len = datlen;
+ chain->off = datlen;
+
+ info = EVBUFFER_CHAIN_EXTRA(struct evbuffer_chain_reference, chain);
+ info->cleanupfn = cleanupfn;
+ info->extra = extra;
+
+ EVBUFFER_LOCK(outbuf);
+ if (outbuf->freeze_end) {
+ /* don't call chain_free; we do not want to actually invoke
+ * the cleanup function */
+ mm_free(chain);
+ goto done;
+ }
+ evbuffer_chain_insert(outbuf, chain);
+ outbuf->n_add_for_cb += datlen;
+
+ evbuffer_invoke_callbacks_(outbuf);
+
+ result = 0;
+done:
+ EVBUFFER_UNLOCK(outbuf);
+
+ return result;
+}
+
+/* TODO(niels): we may want to add to automagically convert to mmap, in
+ * case evbuffer_remove() or evbuffer_pullup() are being used.
+ */
+struct evbuffer_file_segment *
+evbuffer_file_segment_new(
+ int fd, ev_off_t offset, ev_off_t length, unsigned flags)
+{
+ struct evbuffer_file_segment *seg =
+ mm_calloc(sizeof(struct evbuffer_file_segment), 1);
+ if (!seg)
+ return NULL;
+ seg->refcnt = 1;
+ seg->fd = fd;
+ seg->flags = flags;
+ seg->file_offset = offset;
+ seg->cleanup_cb = NULL;
+ seg->cleanup_cb_arg = NULL;
+#ifdef _WIN32
+#ifndef lseek
+#define lseek _lseeki64
+#endif
+#ifndef fstat
+#define fstat _fstat
+#endif
+#ifndef stat
+#define stat _stat
+#endif
+#endif
+ if (length == -1) {
+ struct stat st;
+ if (fstat(fd, &st) < 0)
+ goto err;
+ length = st.st_size;
+ }
+ seg->length = length;
+
+#if defined(USE_SENDFILE)
+ if (!(flags & EVBUF_FS_DISABLE_SENDFILE)) {
+ seg->can_sendfile = 1;
+ goto done;
+ }
+#endif
+
+ if (evbuffer_file_segment_materialize(seg)<0)
+ goto err;
+
+#if defined(USE_SENDFILE)
+done:
+#endif
+ if (!(flags & EVBUF_FS_DISABLE_LOCKING)) {
+ EVTHREAD_ALLOC_LOCK(seg->lock, 0);
+ }
+ return seg;
+err:
+ mm_free(seg);
+ return NULL;
+}
+
+#ifdef EVENT__HAVE_MMAP
+static long
+get_page_size(void)
+{
+#ifdef SC_PAGE_SIZE
+ return sysconf(SC_PAGE_SIZE);
+#elif defined(_SC_PAGE_SIZE)
+ return sysconf(_SC_PAGE_SIZE);
+#else
+ return 1;
+#endif
+}
+#endif
+
+/* DOCDOC */
+/* Requires lock */
+static int
+evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg)
+{
+ const unsigned flags = seg->flags;
+ const int fd = seg->fd;
+ const ev_off_t length = seg->length;
+ const ev_off_t offset = seg->file_offset;
+
+ if (seg->contents)
+ return 0; /* already materialized */
+
+#if defined(EVENT__HAVE_MMAP)
+ if (!(flags & EVBUF_FS_DISABLE_MMAP)) {
+ off_t offset_rounded = 0, offset_leftover = 0;
+ void *mapped;
+ if (offset) {
+ /* mmap implementations don't generally like us
+ * to have an offset that isn't a round */
+ long page_size = get_page_size();
+ if (page_size == -1)
+ goto err;
+ offset_leftover = offset % page_size;
+ offset_rounded = offset - offset_leftover;
+ }
+ mapped = mmap(NULL, length + offset_leftover,
+ PROT_READ,
+#ifdef MAP_NOCACHE
+ MAP_NOCACHE | /* ??? */
+#endif
+#ifdef MAP_FILE
+ MAP_FILE |
+#endif
+ MAP_PRIVATE,
+ fd, offset_rounded);
+ if (mapped == MAP_FAILED) {
+ event_warn("%s: mmap(%d, %d, %zu) failed",
+ __func__, fd, 0, (size_t)(offset + length));
+ } else {
+ seg->mapping = mapped;
+ seg->contents = (char*)mapped+offset_leftover;
+ seg->mmap_offset = 0;
+ seg->is_mapping = 1;
+ goto done;
+ }
+ }
+#endif
+#ifdef _WIN32
+ if (!(flags & EVBUF_FS_DISABLE_MMAP)) {
+ intptr_t h = _get_osfhandle(fd);
+ HANDLE m;
+ ev_uint64_t total_size = length+offset;
+ if ((HANDLE)h == INVALID_HANDLE_VALUE)
+ goto err;
+ m = CreateFileMapping((HANDLE)h, NULL, PAGE_READONLY,
+ (total_size >> 32), total_size & 0xfffffffful,
+ NULL);
+ if (m != INVALID_HANDLE_VALUE) { /* Does h leak? */
+ seg->mapping_handle = m;
+ seg->mmap_offset = offset;
+ seg->is_mapping = 1;
+ goto done;
+ }
+ }
+#endif
+ {
+ ev_off_t start_pos = lseek(fd, 0, SEEK_CUR), pos;
+ ev_off_t read_so_far = 0;
+ char *mem;
+ int e;
+ ev_ssize_t n = 0;
+ if (!(mem = mm_malloc(length)))
+ goto err;
+ if (start_pos < 0) {
+ mm_free(mem);
+ goto err;
+ }
+ if (lseek(fd, offset, SEEK_SET) < 0) {
+ mm_free(mem);
+ goto err;
+ }
+ while (read_so_far < length) {
+ n = read(fd, mem+read_so_far, length-read_so_far);
+ if (n <= 0)
+ break;
+ read_so_far += n;
+ }
+
+ e = errno;
+ pos = lseek(fd, start_pos, SEEK_SET);
+ if (n < 0 || (n == 0 && length > read_so_far)) {
+ mm_free(mem);
+ errno = e;
+ goto err;
+ } else if (pos < 0) {
+ mm_free(mem);
+ goto err;
+ }
+
+ seg->contents = mem;
+ }
+
+done:
+ return 0;
+err:
+ return -1;
+}
+
+void evbuffer_file_segment_add_cleanup_cb(struct evbuffer_file_segment *seg,
+ evbuffer_file_segment_cleanup_cb cb, void* arg)
+{
+ EVUTIL_ASSERT(seg->refcnt > 0);
+ seg->cleanup_cb = cb;
+ seg->cleanup_cb_arg = arg;
+}
+
+void
+evbuffer_file_segment_free(struct evbuffer_file_segment *seg)
+{
+ int refcnt;
+ EVLOCK_LOCK(seg->lock, 0);
+ refcnt = --seg->refcnt;
+ EVLOCK_UNLOCK(seg->lock, 0);
+ if (refcnt > 0)
+ return;
+ EVUTIL_ASSERT(refcnt == 0);
+
+ if (seg->is_mapping) {
+#ifdef _WIN32
+ CloseHandle(seg->mapping_handle);
+#elif defined (EVENT__HAVE_MMAP)
+ off_t offset_leftover;
+ offset_leftover = seg->file_offset % get_page_size();
+ if (munmap(seg->mapping, seg->length + offset_leftover) == -1)
+ event_warn("%s: munmap failed", __func__);
+#endif
+ } else if (seg->contents) {
+ mm_free(seg->contents);
+ }
+
+ if ((seg->flags & EVBUF_FS_CLOSE_ON_FREE) && seg->fd >= 0) {
+ close(seg->fd);
+ }
+
+ if (seg->cleanup_cb) {
+ (*seg->cleanup_cb)((struct evbuffer_file_segment const*)seg,
+ seg->flags, seg->cleanup_cb_arg);
+ seg->cleanup_cb = NULL;
+ seg->cleanup_cb_arg = NULL;
+ }
+
+ EVTHREAD_FREE_LOCK(seg->lock, 0);
+ mm_free(seg);
+}
+
+int
+evbuffer_add_file_segment(struct evbuffer *buf,
+ struct evbuffer_file_segment *seg, ev_off_t offset, ev_off_t length)
+{
+ struct evbuffer_chain *chain;
+ struct evbuffer_chain_file_segment *extra;
+ int can_use_sendfile = 0;
+
+ EVBUFFER_LOCK(buf);
+ EVLOCK_LOCK(seg->lock, 0);
+ if (buf->flags & EVBUFFER_FLAG_DRAINS_TO_FD) {
+ can_use_sendfile = 1;
+ } else {
+ if (!seg->contents) {
+ if (evbuffer_file_segment_materialize(seg)<0) {
+ EVLOCK_UNLOCK(seg->lock, 0);
+ EVBUFFER_UNLOCK(buf);
+ return -1;
+ }
+ }
+ }
+ ++seg->refcnt;
+ EVLOCK_UNLOCK(seg->lock, 0);
+
+ if (buf->freeze_end)
+ goto err;
+
+ if (length < 0) {
+ if (offset > seg->length)
+ goto err;
+ length = seg->length - offset;
+ }
+
+ /* Can we actually add this? */
+ if (offset+length > seg->length)
+ goto err;
+
+ chain = evbuffer_chain_new(sizeof(struct evbuffer_chain_file_segment));
+ if (!chain)
+ goto err;
+ extra = EVBUFFER_CHAIN_EXTRA(struct evbuffer_chain_file_segment, chain);
+
+ chain->flags |= EVBUFFER_IMMUTABLE|EVBUFFER_FILESEGMENT;
+ if (can_use_sendfile && seg->can_sendfile) {
+ chain->flags |= EVBUFFER_SENDFILE;
+ chain->misalign = seg->file_offset + offset;
+ chain->off = length;
+ chain->buffer_len = chain->misalign + length;
+ } else if (seg->is_mapping) {
+#ifdef _WIN32
+ ev_uint64_t total_offset = seg->mmap_offset+offset;
+ ev_uint64_t offset_rounded=0, offset_remaining=0;
+ LPVOID data;
+ if (total_offset) {
+ SYSTEM_INFO si;
+ memset(&si, 0, sizeof(si)); /* cargo cult */
+ GetSystemInfo(&si);
+ offset_remaining = total_offset % si.dwAllocationGranularity;
+ offset_rounded = total_offset - offset_remaining;
+ }
+ data = MapViewOfFile(
+ seg->mapping_handle,
+ FILE_MAP_READ,
+ offset_rounded >> 32,
+ offset_rounded & 0xfffffffful,
+ length + offset_remaining);
+ if (data == NULL) {
+ mm_free(chain);
+ goto err;
+ }
+ chain->buffer = (unsigned char*) data;
+ chain->buffer_len = length+offset_remaining;
+ chain->misalign = offset_remaining;
+ chain->off = length;
+#else
+ chain->buffer = (unsigned char*)(seg->contents + offset);
+ chain->buffer_len = length;
+ chain->off = length;
+#endif
+ } else {
+ chain->buffer = (unsigned char*)(seg->contents + offset);
+ chain->buffer_len = length;
+ chain->off = length;
+ }
+
+ extra->segment = seg;
+ buf->n_add_for_cb += length;
+ evbuffer_chain_insert(buf, chain);
+
+ evbuffer_invoke_callbacks_(buf);
+
+ EVBUFFER_UNLOCK(buf);
+
+ return 0;
+err:
+ EVBUFFER_UNLOCK(buf);
+ evbuffer_file_segment_free(seg);
+ return -1;
+}
+
+int
+evbuffer_add_file(struct evbuffer *buf, int fd, ev_off_t offset, ev_off_t length)
+{
+ struct evbuffer_file_segment *seg;
+ unsigned flags = EVBUF_FS_CLOSE_ON_FREE;
+ int r;
+
+ seg = evbuffer_file_segment_new(fd, offset, length, flags);
+ if (!seg)
+ return -1;
+ r = evbuffer_add_file_segment(buf, seg, 0, length);
+ if (r == 0)
+ evbuffer_file_segment_free(seg);
+ return r;
+}
+
+void
+evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
+{
+ EVBUFFER_LOCK(buffer);
+
+ if (!LIST_EMPTY(&buffer->callbacks))
+ evbuffer_remove_all_callbacks(buffer);
+
+ if (cb) {
+ struct evbuffer_cb_entry *ent =
+ evbuffer_add_cb(buffer, NULL, cbarg);
+ ent->cb.cb_obsolete = cb;
+ ent->flags |= EVBUFFER_CB_OBSOLETE;
+ }
+ EVBUFFER_UNLOCK(buffer);
+}
+
+struct evbuffer_cb_entry *
+evbuffer_add_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg)
+{
+ struct evbuffer_cb_entry *e;
+ if (! (e = mm_calloc(1, sizeof(struct evbuffer_cb_entry))))
+ return NULL;
+ EVBUFFER_LOCK(buffer);
+ e->cb.cb_func = cb;
+ e->cbarg = cbarg;
+ e->flags = EVBUFFER_CB_ENABLED;
+ LIST_INSERT_HEAD(&buffer->callbacks, e, next);
+ EVBUFFER_UNLOCK(buffer);
+ return e;
+}
+
+int
+evbuffer_remove_cb_entry(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *ent)
+{
+ EVBUFFER_LOCK(buffer);
+ LIST_REMOVE(ent, next);
+ EVBUFFER_UNLOCK(buffer);
+ mm_free(ent);
+ return 0;
+}
+
+int
+evbuffer_remove_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg)
+{
+ struct evbuffer_cb_entry *cbent;
+ int result = -1;
+ EVBUFFER_LOCK(buffer);
+ LIST_FOREACH(cbent, &buffer->callbacks, next) {
+ if (cb == cbent->cb.cb_func && cbarg == cbent->cbarg) {
+ result = evbuffer_remove_cb_entry(buffer, cbent);
+ goto done;
+ }
+ }
+done:
+ EVBUFFER_UNLOCK(buffer);
+ return result;
+}
+
+int
+evbuffer_cb_set_flags(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *cb, ev_uint32_t flags)
+{
+ /* the user isn't allowed to mess with these. */
+ flags &= ~EVBUFFER_CB_INTERNAL_FLAGS;
+ EVBUFFER_LOCK(buffer);
+ cb->flags |= flags;
+ EVBUFFER_UNLOCK(buffer);
+ return 0;
+}
+
+int
+evbuffer_cb_clear_flags(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *cb, ev_uint32_t flags)
+{
+ /* the user isn't allowed to mess with these. */
+ flags &= ~EVBUFFER_CB_INTERNAL_FLAGS;
+ EVBUFFER_LOCK(buffer);
+ cb->flags &= ~flags;
+ EVBUFFER_UNLOCK(buffer);
+ return 0;
+}
+
+int
+evbuffer_freeze(struct evbuffer *buffer, int start)
+{
+ EVBUFFER_LOCK(buffer);
+ if (start)
+ buffer->freeze_start = 1;
+ else
+ buffer->freeze_end = 1;
+ EVBUFFER_UNLOCK(buffer);
+ return 0;
+}
+
+int
+evbuffer_unfreeze(struct evbuffer *buffer, int start)
+{
+ EVBUFFER_LOCK(buffer);
+ if (start)
+ buffer->freeze_start = 0;
+ else
+ buffer->freeze_end = 0;
+ EVBUFFER_UNLOCK(buffer);
+ return 0;
+}
+
+#if 0
+void
+evbuffer_cb_suspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb)
+{
+ if (!(cb->flags & EVBUFFER_CB_SUSPENDED)) {
+ cb->size_before_suspend = evbuffer_get_length(buffer);
+ cb->flags |= EVBUFFER_CB_SUSPENDED;
+ }
+}
+
+void
+evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb)
+{
+ if ((cb->flags & EVBUFFER_CB_SUSPENDED)) {
+ unsigned call = (cb->flags & EVBUFFER_CB_CALL_ON_UNSUSPEND);
+ size_t sz = cb->size_before_suspend;
+ cb->flags &= ~(EVBUFFER_CB_SUSPENDED|
+ EVBUFFER_CB_CALL_ON_UNSUSPEND);
+ cb->size_before_suspend = 0;
+ if (call && (cb->flags & EVBUFFER_CB_ENABLED)) {
+ cb->cb(buffer, sz, evbuffer_get_length(buffer), cb->cbarg);
+ }
+ }
+}
+#endif
+
+int
+evbuffer_get_callbacks_(struct evbuffer *buffer, struct event_callback **cbs,
+ int max_cbs)
+{
+ int r = 0;
+ EVBUFFER_LOCK(buffer);
+ if (buffer->deferred_cbs) {
+ if (max_cbs < 1) {
+ r = -1;
+ goto done;
+ }
+ cbs[0] = &buffer->deferred;
+ r = 1;
+ }
+done:
+ EVBUFFER_UNLOCK(buffer);
+ return r;
+}
diff --git a/sntp/libevent/buffer_iocp.c b/sntp/libevent/buffer_iocp.c
new file mode 100644
index 000000000000..2d76a90e7702
--- /dev/null
+++ b/sntp/libevent/buffer_iocp.c
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/**
+ @file buffer_iocp.c
+
+ This module implements overlapped read and write functions for evbuffer
+ objects on Windows.
+*/
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/util.h"
+#include "event2/thread.h"
+#include "util-internal.h"
+#include "evthread-internal.h"
+#include "evbuffer-internal.h"
+#include "iocp-internal.h"
+#include "mm-internal.h"
+
+#include <winsock2.h>
+#include <windows.h>
+#include <stdio.h>
+
+#define MAX_WSABUFS 16
+
+/** An evbuffer that can handle overlapped IO. */
+struct evbuffer_overlapped {
+ struct evbuffer buffer;
+ /** The socket that we're doing overlapped IO on. */
+ evutil_socket_t fd;
+
+ /** pending I/O type */
+ unsigned read_in_progress : 1;
+ unsigned write_in_progress : 1;
+
+ /** The first pinned chain in the buffer. */
+ struct evbuffer_chain *first_pinned;
+
+ /** How many chains are pinned; how many of the fields in buffers
+ * are we using. */
+ int n_buffers;
+ WSABUF buffers[MAX_WSABUFS];
+};
+
+/** Given an evbuffer, return the correponding evbuffer structure, or NULL if
+ * the evbuffer isn't overlapped. */
+static inline struct evbuffer_overlapped *
+upcast_evbuffer(struct evbuffer *buf)
+{
+ if (!buf || !buf->is_overlapped)
+ return NULL;
+ return EVUTIL_UPCAST(buf, struct evbuffer_overlapped, buffer);
+}
+
+/** Unpin all the chains noted as pinned in 'eo'. */
+static void
+pin_release(struct evbuffer_overlapped *eo, unsigned flag)
+{
+ int i;
+ struct evbuffer_chain *next, *chain = eo->first_pinned;
+
+ for (i = 0; i < eo->n_buffers; ++i) {
+ EVUTIL_ASSERT(chain);
+ next = chain->next;
+ evbuffer_chain_unpin_(chain, flag);
+ chain = next;
+ }
+}
+
+void
+evbuffer_commit_read_(struct evbuffer *evbuf, ev_ssize_t nBytes)
+{
+ struct evbuffer_overlapped *buf = upcast_evbuffer(evbuf);
+ struct evbuffer_chain **chainp;
+ size_t remaining, len;
+ unsigned i;
+
+ EVBUFFER_LOCK(evbuf);
+ EVUTIL_ASSERT(buf->read_in_progress && !buf->write_in_progress);
+ EVUTIL_ASSERT(nBytes >= 0); /* XXXX Can this be false? */
+
+ evbuffer_unfreeze(evbuf, 0);
+
+ chainp = evbuf->last_with_datap;
+ if (!((*chainp)->flags & EVBUFFER_MEM_PINNED_R))
+ chainp = &(*chainp)->next;
+ remaining = nBytes;
+ for (i = 0; remaining > 0 && i < (unsigned)buf->n_buffers; ++i) {
+ EVUTIL_ASSERT(*chainp);
+ len = buf->buffers[i].len;
+ if (remaining < len)
+ len = remaining;
+ (*chainp)->off += len;
+ evbuf->last_with_datap = chainp;
+ remaining -= len;
+ chainp = &(*chainp)->next;
+ }
+
+ pin_release(buf, EVBUFFER_MEM_PINNED_R);
+
+ buf->read_in_progress = 0;
+
+ evbuf->total_len += nBytes;
+ evbuf->n_add_for_cb += nBytes;
+
+ evbuffer_invoke_callbacks_(evbuf);
+
+ evbuffer_decref_and_unlock_(evbuf);
+}
+
+void
+evbuffer_commit_write_(struct evbuffer *evbuf, ev_ssize_t nBytes)
+{
+ struct evbuffer_overlapped *buf = upcast_evbuffer(evbuf);
+
+ EVBUFFER_LOCK(evbuf);
+ EVUTIL_ASSERT(buf->write_in_progress && !buf->read_in_progress);
+ evbuffer_unfreeze(evbuf, 1);
+ evbuffer_drain(evbuf, nBytes);
+ pin_release(buf,EVBUFFER_MEM_PINNED_W);
+ buf->write_in_progress = 0;
+ evbuffer_decref_and_unlock_(evbuf);
+}
+
+struct evbuffer *
+evbuffer_overlapped_new_(evutil_socket_t fd)
+{
+ struct evbuffer_overlapped *evo;
+
+ evo = mm_calloc(1, sizeof(struct evbuffer_overlapped));
+ if (!evo)
+ return NULL;
+
+ LIST_INIT(&evo->buffer.callbacks);
+ evo->buffer.refcnt = 1;
+ evo->buffer.last_with_datap = &evo->buffer.first;
+
+ evo->buffer.is_overlapped = 1;
+ evo->fd = fd;
+
+ return &evo->buffer;
+}
+
+int
+evbuffer_launch_write_(struct evbuffer *buf, ev_ssize_t at_most,
+ struct event_overlapped *ol)
+{
+ struct evbuffer_overlapped *buf_o = upcast_evbuffer(buf);
+ int r = -1;
+ int i;
+ struct evbuffer_chain *chain;
+ DWORD bytesSent;
+
+ if (!buf) {
+ /* No buffer, or it isn't overlapped */
+ return -1;
+ }
+
+ EVBUFFER_LOCK(buf);
+ EVUTIL_ASSERT(!buf_o->read_in_progress);
+ if (buf->freeze_start || buf_o->write_in_progress)
+ goto done;
+ if (!buf->total_len) {
+ /* Nothing to write */
+ r = 0;
+ goto done;
+ } else if (at_most < 0 || (size_t)at_most > buf->total_len) {
+ at_most = buf->total_len;
+ }
+ evbuffer_freeze(buf, 1);
+
+ buf_o->first_pinned = NULL;
+ buf_o->n_buffers = 0;
+ memset(buf_o->buffers, 0, sizeof(buf_o->buffers));
+
+ chain = buf_o->first_pinned = buf->first;
+
+ for (i=0; i < MAX_WSABUFS && chain; ++i, chain=chain->next) {
+ WSABUF *b = &buf_o->buffers[i];
+ b->buf = (char*)( chain->buffer + chain->misalign );
+ evbuffer_chain_pin_(chain, EVBUFFER_MEM_PINNED_W);
+
+ if ((size_t)at_most > chain->off) {
+ /* XXXX Cast is safe for now, since win32 has no
+ mmaped chains. But later, we need to have this
+ add more WSAbufs if chain->off is greater than
+ ULONG_MAX */
+ b->len = (unsigned long)chain->off;
+ at_most -= chain->off;
+ } else {
+ b->len = (unsigned long)at_most;
+ ++i;
+ break;
+ }
+ }
+
+ buf_o->n_buffers = i;
+ evbuffer_incref_(buf);
+ if (WSASend(buf_o->fd, buf_o->buffers, i, &bytesSent, 0,
+ &ol->overlapped, NULL)) {
+ int error = WSAGetLastError();
+ if (error != WSA_IO_PENDING) {
+ /* An actual error. */
+ pin_release(buf_o, EVBUFFER_MEM_PINNED_W);
+ evbuffer_unfreeze(buf, 1);
+ evbuffer_free(buf); /* decref */
+ goto done;
+ }
+ }
+
+ buf_o->write_in_progress = 1;
+ r = 0;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return r;
+}
+
+int
+evbuffer_launch_read_(struct evbuffer *buf, size_t at_most,
+ struct event_overlapped *ol)
+{
+ struct evbuffer_overlapped *buf_o = upcast_evbuffer(buf);
+ int r = -1, i;
+ int nvecs;
+ int npin=0;
+ struct evbuffer_chain *chain=NULL, **chainp;
+ DWORD bytesRead;
+ DWORD flags = 0;
+ struct evbuffer_iovec vecs[MAX_WSABUFS];
+
+ if (!buf_o)
+ return -1;
+ EVBUFFER_LOCK(buf);
+ EVUTIL_ASSERT(!buf_o->write_in_progress);
+ if (buf->freeze_end || buf_o->read_in_progress)
+ goto done;
+
+ buf_o->first_pinned = NULL;
+ buf_o->n_buffers = 0;
+ memset(buf_o->buffers, 0, sizeof(buf_o->buffers));
+
+ if (evbuffer_expand_fast_(buf, at_most, MAX_WSABUFS) == -1)
+ goto done;
+ evbuffer_freeze(buf, 0);
+
+ nvecs = evbuffer_read_setup_vecs_(buf, at_most,
+ vecs, MAX_WSABUFS, &chainp, 1);
+ for (i=0;i<nvecs;++i) {
+ WSABUF_FROM_EVBUFFER_IOV(
+ &buf_o->buffers[i],
+ &vecs[i]);
+ }
+
+ buf_o->n_buffers = nvecs;
+ buf_o->first_pinned = chain = *chainp;
+
+ npin=0;
+ for ( ; chain; chain = chain->next) {
+ evbuffer_chain_pin_(chain, EVBUFFER_MEM_PINNED_R);
+ ++npin;
+ }
+ EVUTIL_ASSERT(npin == nvecs);
+
+ evbuffer_incref_(buf);
+ if (WSARecv(buf_o->fd, buf_o->buffers, nvecs, &bytesRead, &flags,
+ &ol->overlapped, NULL)) {
+ int error = WSAGetLastError();
+ if (error != WSA_IO_PENDING) {
+ /* An actual error. */
+ pin_release(buf_o, EVBUFFER_MEM_PINNED_R);
+ evbuffer_unfreeze(buf, 0);
+ evbuffer_free(buf); /* decref */
+ goto done;
+ }
+ }
+
+ buf_o->read_in_progress = 1;
+ r = 0;
+done:
+ EVBUFFER_UNLOCK(buf);
+ return r;
+}
+
+evutil_socket_t
+evbuffer_overlapped_get_fd_(struct evbuffer *buf)
+{
+ struct evbuffer_overlapped *buf_o = upcast_evbuffer(buf);
+ return buf_o ? buf_o->fd : -1;
+}
+
+void
+evbuffer_overlapped_set_fd_(struct evbuffer *buf, evutil_socket_t fd)
+{
+ struct evbuffer_overlapped *buf_o = upcast_evbuffer(buf);
+ EVBUFFER_LOCK(buf);
+ /* XXX is this right?, should it cancel current I/O operations? */
+ if (buf_o)
+ buf_o->fd = fd;
+ EVBUFFER_UNLOCK(buf);
+}
diff --git a/sntp/libevent/bufferevent-internal.h b/sntp/libevent/bufferevent-internal.h
new file mode 100644
index 000000000000..134bb337521c
--- /dev/null
+++ b/sntp/libevent/bufferevent-internal.h
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 BUFFEREVENT_INTERNAL_H_INCLUDED_
+#define BUFFEREVENT_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "event2/event_struct.h"
+#include "evconfig-private.h"
+#include "event2/util.h"
+#include "defer-internal.h"
+#include "evthread-internal.h"
+#include "event2/thread.h"
+#include "ratelim-internal.h"
+#include "event2/bufferevent_struct.h"
+
+/* These flags are reasons that we might be declining to actually enable
+ reading or writing on a bufferevent.
+ */
+
+/* On a all bufferevents, for reading: used when we have read up to the
+ watermark value.
+
+ On a filtering bufferevent, for writing: used when the underlying
+ bufferevent's write buffer has been filled up to its watermark
+ value.
+*/
+#define BEV_SUSPEND_WM 0x01
+/* On a base bufferevent: when we have emptied a bandwidth buckets */
+#define BEV_SUSPEND_BW 0x02
+/* On a base bufferevent: when we have emptied the group's bandwidth bucket. */
+#define BEV_SUSPEND_BW_GROUP 0x04
+/* On a socket bufferevent: can't do any operations while we're waiting for
+ * name lookup to finish. */
+#define BEV_SUSPEND_LOOKUP 0x08
+/* On a base bufferevent, for reading: used when a filter has choked this
+ * (underlying) bufferevent because it has stopped reading from it. */
+#define BEV_SUSPEND_FILT_READ 0x10
+
+typedef ev_uint16_t bufferevent_suspend_flags;
+
+struct bufferevent_rate_limit_group {
+ /** List of all members in the group */
+ LIST_HEAD(rlim_group_member_list, bufferevent_private) members;
+ /** Current limits for the group. */
+ struct ev_token_bucket rate_limit;
+ struct ev_token_bucket_cfg rate_limit_cfg;
+
+ /** True iff we don't want to read from any member of the group.until
+ * the token bucket refills. */
+ unsigned read_suspended : 1;
+ /** True iff we don't want to write from any member of the group.until
+ * the token bucket refills. */
+ unsigned write_suspended : 1;
+ /** True iff we were unable to suspend one of the bufferevents in the
+ * group for reading the last time we tried, and we should try
+ * again. */
+ unsigned pending_unsuspend_read : 1;
+ /** True iff we were unable to suspend one of the bufferevents in the
+ * group for writing the last time we tried, and we should try
+ * again. */
+ unsigned pending_unsuspend_write : 1;
+
+ /*@{*/
+ /** Total number of bytes read or written in this group since last
+ * reset. */
+ ev_uint64_t total_read;
+ ev_uint64_t total_written;
+ /*@}*/
+
+ /** The number of bufferevents in the group. */
+ int n_members;
+
+ /** The smallest number of bytes that any member of the group should
+ * be limited to read or write at a time. */
+ ev_ssize_t min_share;
+ ev_ssize_t configured_min_share;
+
+ /** Timeout event that goes off once a tick, when the bucket is ready
+ * to refill. */
+ struct event master_refill_event;
+
+ /** Seed for weak random number generator. Protected by 'lock' */
+ struct evutil_weakrand_state weakrand_seed;
+
+ /** Lock to protect the members of this group. This lock should nest
+ * within every bufferevent lock: if you are holding this lock, do
+ * not assume you can lock another bufferevent. */
+ void *lock;
+};
+
+/** Fields for rate-limiting a single bufferevent. */
+struct bufferevent_rate_limit {
+ /* Linked-list elements for storing this bufferevent_private in a
+ * group.
+ *
+ * Note that this field is supposed to be protected by the group
+ * lock */
+ LIST_ENTRY(bufferevent_private) next_in_group;
+ /** The rate-limiting group for this bufferevent, or NULL if it is
+ * only rate-limited on its own. */
+ struct bufferevent_rate_limit_group *group;
+
+ /* This bufferevent's current limits. */
+ struct ev_token_bucket limit;
+ /* Pointer to the rate-limit configuration for this bufferevent.
+ * Can be shared. XXX reference-count this? */
+ struct ev_token_bucket_cfg *cfg;
+
+ /* Timeout event used when one this bufferevent's buckets are
+ * empty. */
+ struct event refill_bucket_event;
+};
+
+/** Parts of the bufferevent structure that are shared among all bufferevent
+ * types, but not exposed in bufferevent_struct.h. */
+struct bufferevent_private {
+ /** The underlying bufferevent structure. */
+ struct bufferevent bev;
+
+ /** Evbuffer callback to enforce watermarks on input. */
+ struct evbuffer_cb_entry *read_watermarks_cb;
+
+ /** If set, we should free the lock when we free the bufferevent. */
+ unsigned own_lock : 1;
+
+ /** Flag: set if we have deferred callbacks and a read callback is
+ * pending. */
+ unsigned readcb_pending : 1;
+ /** Flag: set if we have deferred callbacks and a write callback is
+ * pending. */
+ unsigned writecb_pending : 1;
+ /** Flag: set if we are currently busy connecting. */
+ unsigned connecting : 1;
+ /** Flag: set if a connect failed prematurely; this is a hack for
+ * getting around the bufferevent abstraction. */
+ unsigned connection_refused : 1;
+ /** Set to the events pending if we have deferred callbacks and
+ * an events callback is pending. */
+ short eventcb_pending;
+
+ /** If set, read is suspended until one or more conditions are over.
+ * The actual value here is a bitfield of those conditions; see the
+ * BEV_SUSPEND_* flags above. */
+ bufferevent_suspend_flags read_suspended;
+
+ /** If set, writing is suspended until one or more conditions are over.
+ * The actual value here is a bitfield of those conditions; see the
+ * BEV_SUSPEND_* flags above. */
+ bufferevent_suspend_flags write_suspended;
+
+ /** Set to the current socket errno if we have deferred callbacks and
+ * an events callback is pending. */
+ int errno_pending;
+
+ /** The DNS error code for bufferevent_socket_connect_hostname */
+ int dns_error;
+
+ /** Used to implement deferred callbacks */
+ struct event_callback deferred;
+
+ /** The options this bufferevent was constructed with */
+ enum bufferevent_options options;
+
+ /** Current reference count for this bufferevent. */
+ int refcnt;
+
+ /** Lock for this bufferevent. Shared by the inbuf and the outbuf.
+ * If NULL, locking is disabled. */
+ void *lock;
+
+ /** No matter how big our bucket gets, don't try to read more than this
+ * much in a single read operation. */
+ ev_ssize_t max_single_read;
+
+ /** No matter how big our bucket gets, don't try to write more than this
+ * much in a single write operation. */
+ ev_ssize_t max_single_write;
+
+ /** Rate-limiting information for this bufferevent */
+ struct bufferevent_rate_limit *rate_limiting;
+};
+
+/** Possible operations for a control callback. */
+enum bufferevent_ctrl_op {
+ BEV_CTRL_SET_FD,
+ BEV_CTRL_GET_FD,
+ BEV_CTRL_GET_UNDERLYING,
+ BEV_CTRL_CANCEL_ALL
+};
+
+/** Possible data types for a control callback */
+union bufferevent_ctrl_data {
+ void *ptr;
+ evutil_socket_t fd;
+};
+
+/**
+ Implementation table for a bufferevent: holds function pointers and other
+ information to make the various bufferevent types work.
+*/
+struct bufferevent_ops {
+ /** The name of the bufferevent's type. */
+ const char *type;
+ /** At what offset into the implementation type will we find a
+ bufferevent structure?
+
+ Example: if the type is implemented as
+ struct bufferevent_x {
+ int extra_data;
+ struct bufferevent bev;
+ }
+ then mem_offset should be offsetof(struct bufferevent_x, bev)
+ */
+ off_t mem_offset;
+
+ /** Enables one or more of EV_READ|EV_WRITE on a bufferevent. Does
+ not need to adjust the 'enabled' field. Returns 0 on success, -1
+ on failure.
+ */
+ int (*enable)(struct bufferevent *, short);
+
+ /** Disables one or more of EV_READ|EV_WRITE on a bufferevent. Does
+ not need to adjust the 'enabled' field. Returns 0 on success, -1
+ on failure.
+ */
+ int (*disable)(struct bufferevent *, short);
+
+ /** Detatches the bufferevent from related data structures. Called as
+ * soon as its reference count reaches 0. */
+ void (*unlink)(struct bufferevent *);
+
+ /** Free any storage and deallocate any extra data or structures used
+ in this implementation. Called when the bufferevent is
+ finalized.
+ */
+ void (*destruct)(struct bufferevent *);
+
+ /** Called when the timeouts on the bufferevent have changed.*/
+ int (*adj_timeouts)(struct bufferevent *);
+
+ /** Called to flush data. */
+ int (*flush)(struct bufferevent *, short, enum bufferevent_flush_mode);
+
+ /** Called to access miscellaneous fields. */
+ int (*ctrl)(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+
+};
+
+extern const struct bufferevent_ops bufferevent_ops_socket;
+extern const struct bufferevent_ops bufferevent_ops_filter;
+extern const struct bufferevent_ops bufferevent_ops_pair;
+
+#define BEV_IS_SOCKET(bevp) ((bevp)->be_ops == &bufferevent_ops_socket)
+#define BEV_IS_FILTER(bevp) ((bevp)->be_ops == &bufferevent_ops_filter)
+#define BEV_IS_PAIR(bevp) ((bevp)->be_ops == &bufferevent_ops_pair)
+
+#ifdef _WIN32
+extern const struct bufferevent_ops bufferevent_ops_async;
+#define BEV_IS_ASYNC(bevp) ((bevp)->be_ops == &bufferevent_ops_async)
+#else
+#define BEV_IS_ASYNC(bevp) 0
+#endif
+
+/** Initialize the shared parts of a bufferevent. */
+int bufferevent_init_common_(struct bufferevent_private *, struct event_base *, const struct bufferevent_ops *, enum bufferevent_options options);
+
+/** For internal use: temporarily stop all reads on bufev, until the conditions
+ * in 'what' are over. */
+void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
+/** For internal use: clear the conditions 'what' on bufev, and re-enable
+ * reading if there are no conditions left. */
+void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
+
+/** For internal use: temporarily stop all writes on bufev, until the conditions
+ * in 'what' are over. */
+void bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
+/** For internal use: clear the conditions 'what' on bufev, and re-enable
+ * writing if there are no conditions left. */
+void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
+
+#define bufferevent_wm_suspend_read(b) \
+ bufferevent_suspend_read_((b), BEV_SUSPEND_WM)
+#define bufferevent_wm_unsuspend_read(b) \
+ bufferevent_unsuspend_read_((b), BEV_SUSPEND_WM)
+
+/*
+ Disable a bufferevent. Equivalent to bufferevent_disable(), but
+ first resets 'connecting' flag to force EV_WRITE down for sure.
+
+ XXXX this method will go away in the future; try not to add new users.
+ See comment in evhttp_connection_reset_() for discussion.
+
+ @param bufev the bufferevent to be disabled
+ @param event any combination of EV_READ | EV_WRITE.
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_disable()
+ */
+int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
+
+/** Internal: Set up locking on a bufferevent. If lock is set, use it.
+ * Otherwise, use a new lock. */
+int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
+/** Internal: Increment the reference count on bufev. */
+void bufferevent_incref_(struct bufferevent *bufev);
+/** Internal: Lock bufev and increase its reference count.
+ * unlocking it otherwise. */
+void bufferevent_incref_and_lock_(struct bufferevent *bufev);
+/** Internal: Decrement the reference count on bufev. Returns 1 if it freed
+ * the bufferevent.*/
+int bufferevent_decref_(struct bufferevent *bufev);
+/** Internal: Drop the reference count on bufev, freeing as necessary, and
+ * unlocking it otherwise. Returns 1 if it freed the bufferevent. */
+int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
+
+/** Internal: If callbacks are deferred and we have a read callback, schedule
+ * a readcb. Otherwise just run the readcb. Ignores watermarks. */
+void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
+/** Internal: If callbacks are deferred and we have a write callback, schedule
+ * a writecb. Otherwise just run the writecb. Ignores watermarks. */
+void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
+/** Internal: If callbacks are deferred and we have an eventcb, schedule
+ * it to run with events "what". Otherwise just run the eventcb.
+ * See bufferevent_trigger_event for meaning of "options". */
+void bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options);
+
+/** Internal: Run or schedule (if deferred or options contain
+ * BEV_TRIG_DEFER_CALLBACKS) I/O callbacks specified in iotype.
+ * Must already hold the bufev lock. Honors watermarks unless
+ * BEV_TRIG_IGNORE_WATERMARKS is in options. */
+static inline void bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options);
+
+/* Making this inline since all of the common-case calls to this function in
+ * libevent use constant arguments. */
+static inline void
+bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options)
+{
+ if ((iotype & EV_READ) && ((options & BEV_TRIG_IGNORE_WATERMARKS) ||
+ evbuffer_get_length(bufev->input) >= bufev->wm_read.low))
+ bufferevent_run_readcb_(bufev, options);
+ if ((iotype & EV_WRITE) && ((options & BEV_TRIG_IGNORE_WATERMARKS) ||
+ evbuffer_get_length(bufev->output) <= bufev->wm_write.low))
+ bufferevent_run_writecb_(bufev, options);
+}
+
+/** Internal: Add the event 'ev' with timeout tv, unless tv is set to 0, in
+ * which case add ev with no timeout. */
+int bufferevent_add_event_(struct event *ev, const struct timeval *tv);
+
+/* =========
+ * These next functions implement timeouts for bufferevents that aren't doing
+ * anything else with ev_read and ev_write, to handle timeouts.
+ * ========= */
+/** Internal use: Set up the ev_read and ev_write callbacks so that
+ * the other "generic_timeout" functions will work on it. Call this from
+ * the constructor function. */
+void bufferevent_init_generic_timeout_cbs_(struct bufferevent *bev);
+/** Internal use: Add or delete the generic timeout events as appropriate.
+ * (If an event is enabled and a timeout is set, we add the event. Otherwise
+ * we delete it.) Call this from anything that changes the timeout values,
+ * that enabled EV_READ or EV_WRITE, or that disables EV_READ or EV_WRITE. */
+int bufferevent_generic_adj_timeouts_(struct bufferevent *bev);
+
+enum bufferevent_options bufferevent_get_options_(struct bufferevent *bev);
+
+/** Internal use: We have just successfully read data into an inbuf, so
+ * reset the read timeout (if any). */
+#define BEV_RESET_GENERIC_READ_TIMEOUT(bev) \
+ do { \
+ if (evutil_timerisset(&(bev)->timeout_read)) \
+ event_add(&(bev)->ev_read, &(bev)->timeout_read); \
+ } while (0)
+/** Internal use: We have just successfully written data from an inbuf, so
+ * reset the read timeout (if any). */
+#define BEV_RESET_GENERIC_WRITE_TIMEOUT(bev) \
+ do { \
+ if (evutil_timerisset(&(bev)->timeout_write)) \
+ event_add(&(bev)->ev_write, &(bev)->timeout_write); \
+ } while (0)
+#define BEV_DEL_GENERIC_READ_TIMEOUT(bev) \
+ event_del(&(bev)->ev_read)
+#define BEV_DEL_GENERIC_WRITE_TIMEOUT(bev) \
+ event_del(&(bev)->ev_write)
+
+
+/** Internal: Given a bufferevent, return its corresponding
+ * bufferevent_private. */
+#define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
+
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
+#define BEV_LOCK(b) EVUTIL_NIL_STMT_
+#define BEV_UNLOCK(b) EVUTIL_NIL_STMT_
+#else
+/** Internal: Grab the lock (if any) on a bufferevent */
+#define BEV_LOCK(b) do { \
+ struct bufferevent_private *locking = BEV_UPCAST(b); \
+ EVLOCK_LOCK(locking->lock, 0); \
+ } while (0)
+
+/** Internal: Release the lock (if any) on a bufferevent */
+#define BEV_UNLOCK(b) do { \
+ struct bufferevent_private *locking = BEV_UPCAST(b); \
+ EVLOCK_UNLOCK(locking->lock, 0); \
+ } while (0)
+#endif
+
+
+/* ==== For rate-limiting. */
+
+int bufferevent_decrement_write_buckets_(struct bufferevent_private *bev,
+ ev_ssize_t bytes);
+int bufferevent_decrement_read_buckets_(struct bufferevent_private *bev,
+ ev_ssize_t bytes);
+ev_ssize_t bufferevent_get_read_max_(struct bufferevent_private *bev);
+ev_ssize_t bufferevent_get_write_max_(struct bufferevent_private *bev);
+
+int bufferevent_ratelim_init_(struct bufferevent_private *bev);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* BUFFEREVENT_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/bufferevent.c b/sntp/libevent/bufferevent.c
new file mode 100644
index 000000000000..588461a33e1a
--- /dev/null
+++ b/sntp/libevent/bufferevent.c
@@ -0,0 +1,984 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+#include <errno.h>
+
+#include "event2/util.h"
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/bufferevent_compat.h"
+#include "event2/event.h"
+#include "event-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+#include "evbuffer-internal.h"
+#include "util-internal.h"
+
+static void bufferevent_cancel_all_(struct bufferevent *bev);
+static void bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_);
+
+void
+bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ BEV_LOCK(bufev);
+ if (!bufev_private->read_suspended)
+ bufev->be_ops->disable(bufev, EV_READ);
+ bufev_private->read_suspended |= what;
+ BEV_UNLOCK(bufev);
+}
+
+void
+bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ BEV_LOCK(bufev);
+ bufev_private->read_suspended &= ~what;
+ if (!bufev_private->read_suspended && (bufev->enabled & EV_READ))
+ bufev->be_ops->enable(bufev, EV_READ);
+ BEV_UNLOCK(bufev);
+}
+
+void
+bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ BEV_LOCK(bufev);
+ if (!bufev_private->write_suspended)
+ bufev->be_ops->disable(bufev, EV_WRITE);
+ bufev_private->write_suspended |= what;
+ BEV_UNLOCK(bufev);
+}
+
+void
+bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ BEV_LOCK(bufev);
+ bufev_private->write_suspended &= ~what;
+ if (!bufev_private->write_suspended && (bufev->enabled & EV_WRITE))
+ bufev->be_ops->enable(bufev, EV_WRITE);
+ BEV_UNLOCK(bufev);
+}
+
+
+/* Callback to implement watermarks on the input buffer. Only enabled
+ * if the watermark is set. */
+static void
+bufferevent_inbuf_wm_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+ struct bufferevent *bufev = arg;
+ size_t size;
+
+ size = evbuffer_get_length(buf);
+
+ if (size >= bufev->wm_read.high)
+ bufferevent_wm_suspend_read(bufev);
+ else
+ bufferevent_wm_unsuspend_read(bufev);
+}
+
+static void
+bufferevent_run_deferred_callbacks_locked(struct event_callback *cb, void *arg)
+{
+ struct bufferevent_private *bufev_private = arg;
+ struct bufferevent *bufev = &bufev_private->bev;
+
+ BEV_LOCK(bufev);
+ if ((bufev_private->eventcb_pending & BEV_EVENT_CONNECTED) &&
+ bufev->errorcb) {
+ /* The "connected" happened before any reads or writes, so
+ send it first. */
+ bufev_private->eventcb_pending &= ~BEV_EVENT_CONNECTED;
+ bufev->errorcb(bufev, BEV_EVENT_CONNECTED, bufev->cbarg);
+ }
+ if (bufev_private->readcb_pending && bufev->readcb) {
+ bufev_private->readcb_pending = 0;
+ bufev->readcb(bufev, bufev->cbarg);
+ }
+ if (bufev_private->writecb_pending && bufev->writecb) {
+ bufev_private->writecb_pending = 0;
+ bufev->writecb(bufev, bufev->cbarg);
+ }
+ if (bufev_private->eventcb_pending && bufev->errorcb) {
+ short what = bufev_private->eventcb_pending;
+ int err = bufev_private->errno_pending;
+ bufev_private->eventcb_pending = 0;
+ bufev_private->errno_pending = 0;
+ EVUTIL_SET_SOCKET_ERROR(err);
+ bufev->errorcb(bufev, what, bufev->cbarg);
+ }
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+static void
+bufferevent_run_deferred_callbacks_unlocked(struct event_callback *cb, void *arg)
+{
+ struct bufferevent_private *bufev_private = arg;
+ struct bufferevent *bufev = &bufev_private->bev;
+
+ BEV_LOCK(bufev);
+#define UNLOCKED(stmt) \
+ do { BEV_UNLOCK(bufev); stmt; BEV_LOCK(bufev); } while(0)
+
+ if ((bufev_private->eventcb_pending & BEV_EVENT_CONNECTED) &&
+ bufev->errorcb) {
+ /* The "connected" happened before any reads or writes, so
+ send it first. */
+ bufferevent_event_cb errorcb = bufev->errorcb;
+ void *cbarg = bufev->cbarg;
+ bufev_private->eventcb_pending &= ~BEV_EVENT_CONNECTED;
+ UNLOCKED(errorcb(bufev, BEV_EVENT_CONNECTED, cbarg));
+ }
+ if (bufev_private->readcb_pending && bufev->readcb) {
+ bufferevent_data_cb readcb = bufev->readcb;
+ void *cbarg = bufev->cbarg;
+ bufev_private->readcb_pending = 0;
+ UNLOCKED(readcb(bufev, cbarg));
+ }
+ if (bufev_private->writecb_pending && bufev->writecb) {
+ bufferevent_data_cb writecb = bufev->writecb;
+ void *cbarg = bufev->cbarg;
+ bufev_private->writecb_pending = 0;
+ UNLOCKED(writecb(bufev, cbarg));
+ }
+ if (bufev_private->eventcb_pending && bufev->errorcb) {
+ bufferevent_event_cb errorcb = bufev->errorcb;
+ void *cbarg = bufev->cbarg;
+ short what = bufev_private->eventcb_pending;
+ int err = bufev_private->errno_pending;
+ bufev_private->eventcb_pending = 0;
+ bufev_private->errno_pending = 0;
+ EVUTIL_SET_SOCKET_ERROR(err);
+ UNLOCKED(errorcb(bufev,what,cbarg));
+ }
+ bufferevent_decref_and_unlock_(bufev);
+#undef UNLOCKED
+}
+
+#define SCHEDULE_DEFERRED(bevp) \
+ do { \
+ if (event_deferred_cb_schedule_( \
+ (bevp)->bev.ev_base, \
+ &(bevp)->deferred)) \
+ bufferevent_incref_(&(bevp)->bev); \
+ } while (0)
+
+
+void
+bufferevent_run_readcb_(struct bufferevent *bufev, int options)
+{
+ /* Requires that we hold the lock and a reference */
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ if (bufev->readcb == NULL)
+ return;
+ if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
+ p->readcb_pending = 1;
+ SCHEDULE_DEFERRED(p);
+ } else {
+ bufev->readcb(bufev, bufev->cbarg);
+ }
+}
+
+void
+bufferevent_run_writecb_(struct bufferevent *bufev, int options)
+{
+ /* Requires that we hold the lock and a reference */
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ if (bufev->writecb == NULL)
+ return;
+ if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
+ p->writecb_pending = 1;
+ SCHEDULE_DEFERRED(p);
+ } else {
+ bufev->writecb(bufev, bufev->cbarg);
+ }
+}
+
+#define BEV_TRIG_ALL_OPTS ( \
+ BEV_TRIG_IGNORE_WATERMARKS| \
+ BEV_TRIG_DEFER_CALLBACKS \
+ )
+
+void
+bufferevent_trigger(struct bufferevent *bufev, short iotype, int options)
+{
+ bufferevent_incref_and_lock_(bufev);
+ bufferevent_trigger_nolock_(bufev, iotype, options&BEV_TRIG_ALL_OPTS);
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+void
+bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options)
+{
+ /* Requires that we hold the lock and a reference */
+ struct bufferevent_private *p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ if (bufev->errorcb == NULL)
+ return;
+ if ((p->options|options) & BEV_OPT_DEFER_CALLBACKS) {
+ p->eventcb_pending |= what;
+ p->errno_pending = EVUTIL_SOCKET_ERROR();
+ SCHEDULE_DEFERRED(p);
+ } else {
+ bufev->errorcb(bufev, what, bufev->cbarg);
+ }
+}
+
+void
+bufferevent_trigger_event(struct bufferevent *bufev, short what, int options)
+{
+ bufferevent_incref_and_lock_(bufev);
+ bufferevent_run_eventcb_(bufev, what, options&BEV_TRIG_ALL_OPTS);
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+int
+bufferevent_init_common_(struct bufferevent_private *bufev_private,
+ struct event_base *base,
+ const struct bufferevent_ops *ops,
+ enum bufferevent_options options)
+{
+ struct bufferevent *bufev = &bufev_private->bev;
+
+ if (!bufev->input) {
+ if ((bufev->input = evbuffer_new()) == NULL)
+ return -1;
+ }
+
+ if (!bufev->output) {
+ if ((bufev->output = evbuffer_new()) == NULL) {
+ evbuffer_free(bufev->input);
+ return -1;
+ }
+ }
+
+ bufev_private->refcnt = 1;
+ bufev->ev_base = base;
+
+ /* Disable timeouts. */
+ evutil_timerclear(&bufev->timeout_read);
+ evutil_timerclear(&bufev->timeout_write);
+
+ bufev->be_ops = ops;
+
+ bufferevent_ratelim_init_(bufev_private);
+
+ /*
+ * Set to EV_WRITE so that using bufferevent_write is going to
+ * trigger a callback. Reading needs to be explicitly enabled
+ * because otherwise no data will be available.
+ */
+ bufev->enabled = EV_WRITE;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (options & BEV_OPT_THREADSAFE) {
+ if (bufferevent_enable_locking_(bufev, NULL) < 0) {
+ /* cleanup */
+ evbuffer_free(bufev->input);
+ evbuffer_free(bufev->output);
+ bufev->input = NULL;
+ bufev->output = NULL;
+ return -1;
+ }
+ }
+#endif
+ if ((options & (BEV_OPT_DEFER_CALLBACKS|BEV_OPT_UNLOCK_CALLBACKS))
+ == BEV_OPT_UNLOCK_CALLBACKS) {
+ event_warnx("UNLOCK_CALLBACKS requires DEFER_CALLBACKS");
+ return -1;
+ }
+ if (options & BEV_OPT_UNLOCK_CALLBACKS)
+ event_deferred_cb_init_(
+ &bufev_private->deferred,
+ event_base_get_npriorities(base) / 2,
+ bufferevent_run_deferred_callbacks_unlocked,
+ bufev_private);
+ else
+ event_deferred_cb_init_(
+ &bufev_private->deferred,
+ event_base_get_npriorities(base) / 2,
+ bufferevent_run_deferred_callbacks_locked,
+ bufev_private);
+
+ bufev_private->options = options;
+
+ evbuffer_set_parent_(bufev->input, bufev);
+ evbuffer_set_parent_(bufev->output, bufev);
+
+ return 0;
+}
+
+void
+bufferevent_setcb(struct bufferevent *bufev,
+ bufferevent_data_cb readcb, bufferevent_data_cb writecb,
+ bufferevent_event_cb eventcb, void *cbarg)
+{
+ BEV_LOCK(bufev);
+
+ bufev->readcb = readcb;
+ bufev->writecb = writecb;
+ bufev->errorcb = eventcb;
+
+ bufev->cbarg = cbarg;
+ BEV_UNLOCK(bufev);
+}
+
+void
+bufferevent_getcb(struct bufferevent *bufev,
+ bufferevent_data_cb *readcb_ptr,
+ bufferevent_data_cb *writecb_ptr,
+ bufferevent_event_cb *eventcb_ptr,
+ void **cbarg_ptr)
+{
+ BEV_LOCK(bufev);
+ if (readcb_ptr)
+ *readcb_ptr = bufev->readcb;
+ if (writecb_ptr)
+ *writecb_ptr = bufev->writecb;
+ if (eventcb_ptr)
+ *eventcb_ptr = bufev->errorcb;
+ if (cbarg_ptr)
+ *cbarg_ptr = bufev->cbarg;
+
+ BEV_UNLOCK(bufev);
+}
+
+struct evbuffer *
+bufferevent_get_input(struct bufferevent *bufev)
+{
+ return bufev->input;
+}
+
+struct evbuffer *
+bufferevent_get_output(struct bufferevent *bufev)
+{
+ return bufev->output;
+}
+
+struct event_base *
+bufferevent_get_base(struct bufferevent *bufev)
+{
+ return bufev->ev_base;
+}
+
+int
+bufferevent_get_priority(const struct bufferevent *bufev)
+{
+ if (event_initialized(&bufev->ev_read)) {
+ return event_get_priority(&bufev->ev_read);
+ } else {
+ return event_base_get_npriorities(bufev->ev_base) / 2;
+ }
+}
+
+int
+bufferevent_write(struct bufferevent *bufev, const void *data, size_t size)
+{
+ if (evbuffer_add(bufev->output, data, size) == -1)
+ return (-1);
+
+ return 0;
+}
+
+int
+bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf)
+{
+ if (evbuffer_add_buffer(bufev->output, buf) == -1)
+ return (-1);
+
+ return 0;
+}
+
+size_t
+bufferevent_read(struct bufferevent *bufev, void *data, size_t size)
+{
+ return (evbuffer_remove(bufev->input, data, size));
+}
+
+int
+bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf)
+{
+ return (evbuffer_add_buffer(buf, bufev->input));
+}
+
+int
+bufferevent_enable(struct bufferevent *bufev, short event)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ short impl_events = event;
+ int r = 0;
+
+ bufferevent_incref_and_lock_(bufev);
+ if (bufev_private->read_suspended)
+ impl_events &= ~EV_READ;
+ if (bufev_private->write_suspended)
+ impl_events &= ~EV_WRITE;
+
+ bufev->enabled |= event;
+
+ if (impl_events && bufev->be_ops->enable(bufev, impl_events) < 0)
+ r = -1;
+
+ bufferevent_decref_and_unlock_(bufev);
+ return r;
+}
+
+int
+bufferevent_set_timeouts(struct bufferevent *bufev,
+ const struct timeval *tv_read,
+ const struct timeval *tv_write)
+{
+ int r = 0;
+ BEV_LOCK(bufev);
+ if (tv_read) {
+ bufev->timeout_read = *tv_read;
+ } else {
+ evutil_timerclear(&bufev->timeout_read);
+ }
+ if (tv_write) {
+ bufev->timeout_write = *tv_write;
+ } else {
+ evutil_timerclear(&bufev->timeout_write);
+ }
+
+ if (bufev->be_ops->adj_timeouts)
+ r = bufev->be_ops->adj_timeouts(bufev);
+ BEV_UNLOCK(bufev);
+
+ return r;
+}
+
+
+/* Obsolete; use bufferevent_set_timeouts */
+void
+bufferevent_settimeout(struct bufferevent *bufev,
+ int timeout_read, int timeout_write)
+{
+ struct timeval tv_read, tv_write;
+ struct timeval *ptv_read = NULL, *ptv_write = NULL;
+
+ memset(&tv_read, 0, sizeof(tv_read));
+ memset(&tv_write, 0, sizeof(tv_write));
+
+ if (timeout_read) {
+ tv_read.tv_sec = timeout_read;
+ ptv_read = &tv_read;
+ }
+ if (timeout_write) {
+ tv_write.tv_sec = timeout_write;
+ ptv_write = &tv_write;
+ }
+
+ bufferevent_set_timeouts(bufev, ptv_read, ptv_write);
+}
+
+
+int
+bufferevent_disable_hard_(struct bufferevent *bufev, short event)
+{
+ int r = 0;
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bufev);
+ bufev->enabled &= ~event;
+
+ bufev_private->connecting = 0;
+ if (bufev->be_ops->disable(bufev, event) < 0)
+ r = -1;
+
+ BEV_UNLOCK(bufev);
+ return r;
+}
+
+int
+bufferevent_disable(struct bufferevent *bufev, short event)
+{
+ int r = 0;
+
+ BEV_LOCK(bufev);
+ bufev->enabled &= ~event;
+
+ if (bufev->be_ops->disable(bufev, event) < 0)
+ r = -1;
+
+ BEV_UNLOCK(bufev);
+ return r;
+}
+
+/*
+ * Sets the water marks
+ */
+
+void
+bufferevent_setwatermark(struct bufferevent *bufev, short events,
+ size_t lowmark, size_t highmark)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bufev);
+ if (events & EV_WRITE) {
+ bufev->wm_write.low = lowmark;
+ bufev->wm_write.high = highmark;
+ }
+
+ if (events & EV_READ) {
+ bufev->wm_read.low = lowmark;
+ bufev->wm_read.high = highmark;
+
+ if (highmark) {
+ /* There is now a new high-water mark for read.
+ enable the callback if needed, and see if we should
+ suspend/bufferevent_wm_unsuspend. */
+
+ if (bufev_private->read_watermarks_cb == NULL) {
+ bufev_private->read_watermarks_cb =
+ evbuffer_add_cb(bufev->input,
+ bufferevent_inbuf_wm_cb,
+ bufev);
+ }
+ evbuffer_cb_set_flags(bufev->input,
+ bufev_private->read_watermarks_cb,
+ EVBUFFER_CB_ENABLED|EVBUFFER_CB_NODEFER);
+
+ if (evbuffer_get_length(bufev->input) > highmark)
+ bufferevent_wm_suspend_read(bufev);
+ else if (evbuffer_get_length(bufev->input) < highmark)
+ bufferevent_wm_unsuspend_read(bufev);
+ } else {
+ /* There is now no high-water mark for read. */
+ if (bufev_private->read_watermarks_cb)
+ evbuffer_cb_clear_flags(bufev->input,
+ bufev_private->read_watermarks_cb,
+ EVBUFFER_CB_ENABLED);
+ bufferevent_wm_unsuspend_read(bufev);
+ }
+ }
+ BEV_UNLOCK(bufev);
+}
+
+void
+bufferevent_getwatermark(struct bufferevent *bufev, short events,
+ size_t *lowmark, size_t *highmark)
+{
+ BEV_LOCK(bufev);
+ if (events == EV_WRITE) {
+ if (lowmark)
+ *lowmark = bufev->wm_write.low;
+ if (highmark)
+ *highmark = bufev->wm_write.high;
+ }
+
+ if (events == EV_READ) {
+ if (lowmark)
+ *lowmark = bufev->wm_read.low;
+ if (highmark)
+ *highmark = bufev->wm_read.high;
+ }
+ BEV_UNLOCK(bufev);
+}
+
+int
+bufferevent_flush(struct bufferevent *bufev,
+ short iotype,
+ enum bufferevent_flush_mode mode)
+{
+ int r = -1;
+ BEV_LOCK(bufev);
+ if (bufev->be_ops->flush)
+ r = bufev->be_ops->flush(bufev, iotype, mode);
+ BEV_UNLOCK(bufev);
+ return r;
+}
+
+void
+bufferevent_incref_and_lock_(struct bufferevent *bufev)
+{
+ struct bufferevent_private *bufev_private =
+ BEV_UPCAST(bufev);
+ BEV_LOCK(bufev);
+ ++bufev_private->refcnt;
+}
+
+#if 0
+static void
+bufferevent_transfer_lock_ownership_(struct bufferevent *donor,
+ struct bufferevent *recipient)
+{
+ struct bufferevent_private *d = BEV_UPCAST(donor);
+ struct bufferevent_private *r = BEV_UPCAST(recipient);
+ if (d->lock != r->lock)
+ return;
+ if (r->own_lock)
+ return;
+ if (d->own_lock) {
+ d->own_lock = 0;
+ r->own_lock = 1;
+ }
+}
+#endif
+
+int
+bufferevent_decref_and_unlock_(struct bufferevent *bufev)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ int n_cbs = 0;
+#define MAX_CBS 16
+ struct event_callback *cbs[MAX_CBS];
+
+ EVUTIL_ASSERT(bufev_private->refcnt > 0);
+
+ if (--bufev_private->refcnt) {
+ BEV_UNLOCK(bufev);
+ return 0;
+ }
+
+ if (bufev->be_ops->unlink)
+ bufev->be_ops->unlink(bufev);
+
+ /* Okay, we're out of references. Let's finalize this once all the
+ * callbacks are done running. */
+ cbs[0] = &bufev->ev_read.ev_evcallback;
+ cbs[1] = &bufev->ev_write.ev_evcallback;
+ cbs[2] = &bufev_private->deferred;
+ n_cbs = 3;
+ if (bufev_private->rate_limiting) {
+ struct event *e = &bufev_private->rate_limiting->refill_bucket_event;
+ if (event_initialized(e))
+ cbs[n_cbs++] = &e->ev_evcallback;
+ }
+ n_cbs += evbuffer_get_callbacks_(bufev->input, cbs+n_cbs, MAX_CBS-n_cbs);
+ n_cbs += evbuffer_get_callbacks_(bufev->output, cbs+n_cbs, MAX_CBS-n_cbs);
+
+ event_callback_finalize_many_(bufev->ev_base, n_cbs, cbs,
+ bufferevent_finalize_cb_);
+
+#undef MAX_CBS
+ BEV_UNLOCK(bufev);
+
+ return 1;
+}
+
+static void
+bufferevent_finalize_cb_(struct event_callback *evcb, void *arg_)
+{
+ struct bufferevent *bufev = arg_;
+ struct bufferevent *underlying;
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bufev);
+ underlying = bufferevent_get_underlying(bufev);
+
+ /* Clean up the shared info */
+ if (bufev->be_ops->destruct)
+ bufev->be_ops->destruct(bufev);
+
+ /* XXX what happens if refcnt for these buffers is > 1?
+ * The buffers can share a lock with this bufferevent object,
+ * but the lock might be destroyed below. */
+ /* evbuffer will free the callbacks */
+ evbuffer_free(bufev->input);
+ evbuffer_free(bufev->output);
+
+ if (bufev_private->rate_limiting) {
+ if (bufev_private->rate_limiting->group)
+ bufferevent_remove_from_rate_limit_group_internal_(bufev,0);
+ mm_free(bufev_private->rate_limiting);
+ bufev_private->rate_limiting = NULL;
+ }
+
+
+ BEV_UNLOCK(bufev);
+
+ if (bufev_private->own_lock)
+ EVTHREAD_FREE_LOCK(bufev_private->lock,
+ EVTHREAD_LOCKTYPE_RECURSIVE);
+
+ /* Free the actual allocated memory. */
+ mm_free(((char*)bufev) - bufev->be_ops->mem_offset);
+
+ /* Release the reference to underlying now that we no longer need the
+ * reference to it. We wait this long mainly in case our lock is
+ * shared with underlying.
+ *
+ * The 'destruct' function will also drop a reference to underlying
+ * if BEV_OPT_CLOSE_ON_FREE is set.
+ *
+ * XXX Should we/can we just refcount evbuffer/bufferevent locks?
+ * It would probably save us some headaches.
+ */
+ if (underlying)
+ bufferevent_decref_(underlying);
+}
+
+int
+bufferevent_decref_(struct bufferevent *bufev)
+{
+ BEV_LOCK(bufev);
+ return bufferevent_decref_and_unlock_(bufev);
+}
+
+void
+bufferevent_free(struct bufferevent *bufev)
+{
+ BEV_LOCK(bufev);
+ bufferevent_setcb(bufev, NULL, NULL, NULL, NULL);
+ bufferevent_cancel_all_(bufev);
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+void
+bufferevent_incref_(struct bufferevent *bufev)
+{
+ struct bufferevent_private *bufev_private =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bufev);
+ ++bufev_private->refcnt;
+ BEV_UNLOCK(bufev);
+}
+
+int
+bufferevent_enable_locking_(struct bufferevent *bufev, void *lock)
+{
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
+ return -1;
+#else
+ struct bufferevent *underlying;
+
+ if (BEV_UPCAST(bufev)->lock)
+ return -1;
+ underlying = bufferevent_get_underlying(bufev);
+
+ if (!lock && underlying && BEV_UPCAST(underlying)->lock) {
+ lock = BEV_UPCAST(underlying)->lock;
+ BEV_UPCAST(bufev)->lock = lock;
+ BEV_UPCAST(bufev)->own_lock = 0;
+ } else if (!lock) {
+ EVTHREAD_ALLOC_LOCK(lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ if (!lock)
+ return -1;
+ BEV_UPCAST(bufev)->lock = lock;
+ BEV_UPCAST(bufev)->own_lock = 1;
+ } else {
+ BEV_UPCAST(bufev)->lock = lock;
+ BEV_UPCAST(bufev)->own_lock = 0;
+ }
+ evbuffer_enable_locking(bufev->input, lock);
+ evbuffer_enable_locking(bufev->output, lock);
+
+ if (underlying && !BEV_UPCAST(underlying)->lock)
+ bufferevent_enable_locking_(underlying, lock);
+
+ return 0;
+#endif
+}
+
+int
+bufferevent_setfd(struct bufferevent *bev, evutil_socket_t fd)
+{
+ union bufferevent_ctrl_data d;
+ int res = -1;
+ d.fd = fd;
+ BEV_LOCK(bev);
+ if (bev->be_ops->ctrl)
+ res = bev->be_ops->ctrl(bev, BEV_CTRL_SET_FD, &d);
+ BEV_UNLOCK(bev);
+ return res;
+}
+
+evutil_socket_t
+bufferevent_getfd(struct bufferevent *bev)
+{
+ union bufferevent_ctrl_data d;
+ int res = -1;
+ d.fd = -1;
+ BEV_LOCK(bev);
+ if (bev->be_ops->ctrl)
+ res = bev->be_ops->ctrl(bev, BEV_CTRL_GET_FD, &d);
+ BEV_UNLOCK(bev);
+ return (res<0) ? -1 : d.fd;
+}
+
+enum bufferevent_options
+bufferevent_get_options_(struct bufferevent *bev)
+{
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ enum bufferevent_options options;
+
+ BEV_LOCK(bev);
+ options = bev_p->options;
+ BEV_UNLOCK(bev);
+ return options;
+}
+
+
+static void
+bufferevent_cancel_all_(struct bufferevent *bev)
+{
+ union bufferevent_ctrl_data d;
+ memset(&d, 0, sizeof(d));
+ BEV_LOCK(bev);
+ if (bev->be_ops->ctrl)
+ bev->be_ops->ctrl(bev, BEV_CTRL_CANCEL_ALL, &d);
+ BEV_UNLOCK(bev);
+}
+
+short
+bufferevent_get_enabled(struct bufferevent *bufev)
+{
+ short r;
+ BEV_LOCK(bufev);
+ r = bufev->enabled;
+ BEV_UNLOCK(bufev);
+ return r;
+}
+
+struct bufferevent *
+bufferevent_get_underlying(struct bufferevent *bev)
+{
+ union bufferevent_ctrl_data d;
+ int res = -1;
+ d.ptr = NULL;
+ BEV_LOCK(bev);
+ if (bev->be_ops->ctrl)
+ res = bev->be_ops->ctrl(bev, BEV_CTRL_GET_UNDERLYING, &d);
+ BEV_UNLOCK(bev);
+ return (res<0) ? NULL : d.ptr;
+}
+
+static void
+bufferevent_generic_read_timeout_cb(evutil_socket_t fd, short event, void *ctx)
+{
+ struct bufferevent *bev = ctx;
+ bufferevent_incref_and_lock_(bev);
+ bufferevent_disable(bev, EV_READ);
+ bufferevent_run_eventcb_(bev, BEV_EVENT_TIMEOUT|BEV_EVENT_READING, 0);
+ bufferevent_decref_and_unlock_(bev);
+}
+static void
+bufferevent_generic_write_timeout_cb(evutil_socket_t fd, short event, void *ctx)
+{
+ struct bufferevent *bev = ctx;
+ bufferevent_incref_and_lock_(bev);
+ bufferevent_disable(bev, EV_WRITE);
+ bufferevent_run_eventcb_(bev, BEV_EVENT_TIMEOUT|BEV_EVENT_WRITING, 0);
+ bufferevent_decref_and_unlock_(bev);
+}
+
+void
+bufferevent_init_generic_timeout_cbs_(struct bufferevent *bev)
+{
+ event_assign(&bev->ev_read, bev->ev_base, -1, EV_FINALIZE,
+ bufferevent_generic_read_timeout_cb, bev);
+ event_assign(&bev->ev_write, bev->ev_base, -1, EV_FINALIZE,
+ bufferevent_generic_write_timeout_cb, bev);
+}
+
+int
+bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
+{
+ const short enabled = bev->enabled;
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ int r1=0, r2=0;
+ if ((enabled & EV_READ) && !bev_p->read_suspended &&
+ evutil_timerisset(&bev->timeout_read))
+ r1 = event_add(&bev->ev_read, &bev->timeout_read);
+ else
+ r1 = event_del(&bev->ev_read);
+
+ if ((enabled & EV_WRITE) && !bev_p->write_suspended &&
+ evutil_timerisset(&bev->timeout_write) &&
+ evbuffer_get_length(bev->output))
+ r2 = event_add(&bev->ev_write, &bev->timeout_write);
+ else
+ r2 = event_del(&bev->ev_write);
+ if (r1 < 0 || r2 < 0)
+ return -1;
+ return 0;
+}
+
+int
+bufferevent_add_event_(struct event *ev, const struct timeval *tv)
+{
+ if (tv->tv_sec == 0 && tv->tv_usec == 0)
+ return event_add(ev, NULL);
+ else
+ return event_add(ev, tv);
+}
+
+/* For use by user programs only; internally, we should be calling
+ either bufferevent_incref_and_lock_(), or BEV_LOCK. */
+void
+bufferevent_lock(struct bufferevent *bev)
+{
+ bufferevent_incref_and_lock_(bev);
+}
+
+void
+bufferevent_unlock(struct bufferevent *bev)
+{
+ bufferevent_decref_and_unlock_(bev);
+}
diff --git a/sntp/libevent/bufferevent_async.c b/sntp/libevent/bufferevent_async.c
new file mode 100644
index 000000000000..137ad24797fe
--- /dev/null
+++ b/sntp/libevent/bufferevent_async.c
@@ -0,0 +1,684 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
+#include <sys/queue.h>
+
+#include "event2/util.h"
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/event.h"
+#include "event2/util.h"
+#include "event-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+#include "util-internal.h"
+#include "iocp-internal.h"
+
+#ifndef SO_UPDATE_CONNECT_CONTEXT
+/* Mingw is sometimes missing this */
+#define SO_UPDATE_CONNECT_CONTEXT 0x7010
+#endif
+
+/* prototypes */
+static int be_async_enable(struct bufferevent *, short);
+static int be_async_disable(struct bufferevent *, short);
+static void be_async_destruct(struct bufferevent *);
+static int be_async_flush(struct bufferevent *, short, enum bufferevent_flush_mode);
+static int be_async_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+
+struct bufferevent_async {
+ struct bufferevent_private bev;
+ struct event_overlapped connect_overlapped;
+ struct event_overlapped read_overlapped;
+ struct event_overlapped write_overlapped;
+ size_t read_in_progress;
+ size_t write_in_progress;
+ unsigned ok : 1;
+ unsigned read_added : 1;
+ unsigned write_added : 1;
+};
+
+const struct bufferevent_ops bufferevent_ops_async = {
+ "socket_async",
+ evutil_offsetof(struct bufferevent_async, bev.bev),
+ be_async_enable,
+ be_async_disable,
+ NULL, /* Unlink */
+ be_async_destruct,
+ bufferevent_generic_adj_timeouts_,
+ be_async_flush,
+ be_async_ctrl,
+};
+
+static inline struct bufferevent_async *
+upcast(struct bufferevent *bev)
+{
+ struct bufferevent_async *bev_a;
+ if (bev->be_ops != &bufferevent_ops_async)
+ return NULL;
+ bev_a = EVUTIL_UPCAST(bev, struct bufferevent_async, bev.bev);
+ return bev_a;
+}
+
+static inline struct bufferevent_async *
+upcast_connect(struct event_overlapped *eo)
+{
+ struct bufferevent_async *bev_a;
+ bev_a = EVUTIL_UPCAST(eo, struct bufferevent_async, connect_overlapped);
+ EVUTIL_ASSERT(BEV_IS_ASYNC(&bev_a->bev.bev));
+ return bev_a;
+}
+
+static inline struct bufferevent_async *
+upcast_read(struct event_overlapped *eo)
+{
+ struct bufferevent_async *bev_a;
+ bev_a = EVUTIL_UPCAST(eo, struct bufferevent_async, read_overlapped);
+ EVUTIL_ASSERT(BEV_IS_ASYNC(&bev_a->bev.bev));
+ return bev_a;
+}
+
+static inline struct bufferevent_async *
+upcast_write(struct event_overlapped *eo)
+{
+ struct bufferevent_async *bev_a;
+ bev_a = EVUTIL_UPCAST(eo, struct bufferevent_async, write_overlapped);
+ EVUTIL_ASSERT(BEV_IS_ASYNC(&bev_a->bev.bev));
+ return bev_a;
+}
+
+static void
+bev_async_del_write(struct bufferevent_async *beva)
+{
+ struct bufferevent *bev = &beva->bev.bev;
+
+ if (beva->write_added) {
+ beva->write_added = 0;
+ event_base_del_virtual_(bev->ev_base);
+ }
+}
+
+static void
+bev_async_del_read(struct bufferevent_async *beva)
+{
+ struct bufferevent *bev = &beva->bev.bev;
+
+ if (beva->read_added) {
+ beva->read_added = 0;
+ event_base_del_virtual_(bev->ev_base);
+ }
+}
+
+static void
+bev_async_add_write(struct bufferevent_async *beva)
+{
+ struct bufferevent *bev = &beva->bev.bev;
+
+ if (!beva->write_added) {
+ beva->write_added = 1;
+ event_base_add_virtual_(bev->ev_base);
+ }
+}
+
+static void
+bev_async_add_read(struct bufferevent_async *beva)
+{
+ struct bufferevent *bev = &beva->bev.bev;
+
+ if (!beva->read_added) {
+ beva->read_added = 1;
+ event_base_add_virtual_(bev->ev_base);
+ }
+}
+
+static void
+bev_async_consider_writing(struct bufferevent_async *beva)
+{
+ size_t at_most;
+ int limit;
+ struct bufferevent *bev = &beva->bev.bev;
+
+ /* Don't write if there's a write in progress, or we do not
+ * want to write, or when there's nothing left to write. */
+ if (beva->write_in_progress || beva->bev.connecting)
+ return;
+ if (!beva->ok || !(bev->enabled&EV_WRITE) ||
+ !evbuffer_get_length(bev->output)) {
+ bev_async_del_write(beva);
+ return;
+ }
+
+ at_most = evbuffer_get_length(bev->output);
+
+ /* This is safe so long as bufferevent_get_write_max never returns
+ * more than INT_MAX. That's true for now. XXXX */
+ limit = (int)bufferevent_get_write_max_(&beva->bev);
+ if (at_most >= (size_t)limit && limit >= 0)
+ at_most = limit;
+
+ if (beva->bev.write_suspended) {
+ bev_async_del_write(beva);
+ return;
+ }
+
+ /* XXXX doesn't respect low-water mark very well. */
+ bufferevent_incref_(bev);
+ if (evbuffer_launch_write_(bev->output, at_most,
+ &beva->write_overlapped)) {
+ bufferevent_decref_(bev);
+ beva->ok = 0;
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ } else {
+ beva->write_in_progress = at_most;
+ bufferevent_decrement_write_buckets_(&beva->bev, at_most);
+ bev_async_add_write(beva);
+ }
+}
+
+static void
+bev_async_consider_reading(struct bufferevent_async *beva)
+{
+ size_t cur_size;
+ size_t read_high;
+ size_t at_most;
+ int limit;
+ struct bufferevent *bev = &beva->bev.bev;
+
+ /* Don't read if there is a read in progress, or we do not
+ * want to read. */
+ if (beva->read_in_progress || beva->bev.connecting)
+ return;
+ if (!beva->ok || !(bev->enabled&EV_READ)) {
+ bev_async_del_read(beva);
+ return;
+ }
+
+ /* Don't read if we're full */
+ cur_size = evbuffer_get_length(bev->input);
+ read_high = bev->wm_read.high;
+ if (read_high) {
+ if (cur_size >= read_high) {
+ bev_async_del_read(beva);
+ return;
+ }
+ at_most = read_high - cur_size;
+ } else {
+ at_most = 16384; /* FIXME totally magic. */
+ }
+
+ /* XXXX This over-commits. */
+ /* XXXX see also not above on cast on bufferevent_get_write_max_() */
+ limit = (int)bufferevent_get_read_max_(&beva->bev);
+ if (at_most >= (size_t)limit && limit >= 0)
+ at_most = limit;
+
+ if (beva->bev.read_suspended) {
+ bev_async_del_read(beva);
+ return;
+ }
+
+ bufferevent_incref_(bev);
+ if (evbuffer_launch_read_(bev->input, at_most, &beva->read_overlapped)) {
+ beva->ok = 0;
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ bufferevent_decref_(bev);
+ } else {
+ beva->read_in_progress = at_most;
+ bufferevent_decrement_read_buckets_(&beva->bev, at_most);
+ bev_async_add_read(beva);
+ }
+
+ return;
+}
+
+static void
+be_async_outbuf_callback(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+ struct bufferevent *bev = arg;
+ struct bufferevent_async *bev_async = upcast(bev);
+
+ /* If we added data to the outbuf and were not writing before,
+ * we may want to write now. */
+
+ bufferevent_incref_and_lock_(bev);
+
+ if (cbinfo->n_added)
+ bev_async_consider_writing(bev_async);
+
+ bufferevent_decref_and_unlock_(bev);
+}
+
+static void
+be_async_inbuf_callback(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+ struct bufferevent *bev = arg;
+ struct bufferevent_async *bev_async = upcast(bev);
+
+ /* If we drained data from the inbuf and were not reading before,
+ * we may want to read now */
+
+ bufferevent_incref_and_lock_(bev);
+
+ if (cbinfo->n_deleted)
+ bev_async_consider_reading(bev_async);
+
+ bufferevent_decref_and_unlock_(bev);
+}
+
+static int
+be_async_enable(struct bufferevent *buf, short what)
+{
+ struct bufferevent_async *bev_async = upcast(buf);
+
+ if (!bev_async->ok)
+ return -1;
+
+ if (bev_async->bev.connecting) {
+ /* Don't launch anything during connection attempts. */
+ return 0;
+ }
+
+ if (what & EV_READ)
+ BEV_RESET_GENERIC_READ_TIMEOUT(buf);
+ if (what & EV_WRITE)
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(buf);
+
+ /* If we newly enable reading or writing, and we aren't reading or
+ writing already, consider launching a new read or write. */
+
+ if (what & EV_READ)
+ bev_async_consider_reading(bev_async);
+ if (what & EV_WRITE)
+ bev_async_consider_writing(bev_async);
+ return 0;
+}
+
+static int
+be_async_disable(struct bufferevent *bev, short what)
+{
+ struct bufferevent_async *bev_async = upcast(bev);
+ /* XXXX If we disable reading or writing, we may want to consider
+ * canceling any in-progress read or write operation, though it might
+ * not work. */
+
+ if (what & EV_READ) {
+ BEV_DEL_GENERIC_READ_TIMEOUT(bev);
+ bev_async_del_read(bev_async);
+ }
+ if (what & EV_WRITE) {
+ BEV_DEL_GENERIC_WRITE_TIMEOUT(bev);
+ bev_async_del_write(bev_async);
+ }
+
+ return 0;
+}
+
+static void
+be_async_destruct(struct bufferevent *bev)
+{
+ struct bufferevent_async *bev_async = upcast(bev);
+ struct bufferevent_private *bev_p = BEV_UPCAST(bev);
+ evutil_socket_t fd;
+
+ EVUTIL_ASSERT(!upcast(bev)->write_in_progress &&
+ !upcast(bev)->read_in_progress);
+
+ bev_async_del_read(bev_async);
+ bev_async_del_write(bev_async);
+
+ fd = evbuffer_overlapped_get_fd_(bev->input);
+ if (bev_p->options & BEV_OPT_CLOSE_ON_FREE) {
+ /* XXXX possible double-close */
+ evutil_closesocket(fd);
+ }
+}
+
+/* GetQueuedCompletionStatus doesn't reliably yield WSA error codes, so
+ * we use WSAGetOverlappedResult to translate. */
+static void
+bev_async_set_wsa_error(struct bufferevent *bev, struct event_overlapped *eo)
+{
+ DWORD bytes, flags;
+ evutil_socket_t fd;
+
+ fd = evbuffer_overlapped_get_fd_(bev->input);
+ WSAGetOverlappedResult(fd, &eo->overlapped, &bytes, FALSE, &flags);
+}
+
+static int
+be_async_flush(struct bufferevent *bev, short what,
+ enum bufferevent_flush_mode mode)
+{
+ return 0;
+}
+
+static void
+connect_complete(struct event_overlapped *eo, ev_uintptr_t key,
+ ev_ssize_t nbytes, int ok)
+{
+ struct bufferevent_async *bev_a = upcast_connect(eo);
+ struct bufferevent *bev = &bev_a->bev.bev;
+ evutil_socket_t sock;
+
+ BEV_LOCK(bev);
+
+ EVUTIL_ASSERT(bev_a->bev.connecting);
+ bev_a->bev.connecting = 0;
+ sock = evbuffer_overlapped_get_fd_(bev_a->bev.bev.input);
+ /* XXXX Handle error? */
+ setsockopt(sock, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0);
+
+ if (ok)
+ bufferevent_async_set_connected_(bev);
+ else
+ bev_async_set_wsa_error(bev, eo);
+
+ bufferevent_run_eventcb_(bev,
+ ok? BEV_EVENT_CONNECTED : BEV_EVENT_ERROR, 0);
+
+ event_base_del_virtual_(bev->ev_base);
+
+ bufferevent_decref_and_unlock_(bev);
+}
+
+static void
+read_complete(struct event_overlapped *eo, ev_uintptr_t key,
+ ev_ssize_t nbytes, int ok)
+{
+ struct bufferevent_async *bev_a = upcast_read(eo);
+ struct bufferevent *bev = &bev_a->bev.bev;
+ short what = BEV_EVENT_READING;
+ ev_ssize_t amount_unread;
+ BEV_LOCK(bev);
+ EVUTIL_ASSERT(bev_a->read_in_progress);
+
+ amount_unread = bev_a->read_in_progress - nbytes;
+ evbuffer_commit_read_(bev->input, nbytes);
+ bev_a->read_in_progress = 0;
+ if (amount_unread)
+ bufferevent_decrement_read_buckets_(&bev_a->bev, -amount_unread);
+
+ if (!ok)
+ bev_async_set_wsa_error(bev, eo);
+
+ if (bev_a->ok) {
+ if (ok && nbytes) {
+ BEV_RESET_GENERIC_READ_TIMEOUT(bev);
+ bufferevent_trigger_nolock_(bev, EV_READ, 0);
+ bev_async_consider_reading(bev_a);
+ } else if (!ok) {
+ what |= BEV_EVENT_ERROR;
+ bev_a->ok = 0;
+ bufferevent_run_eventcb_(bev, what, 0);
+ } else if (!nbytes) {
+ what |= BEV_EVENT_EOF;
+ bev_a->ok = 0;
+ bufferevent_run_eventcb_(bev, what, 0);
+ }
+ }
+
+ bufferevent_decref_and_unlock_(bev);
+}
+
+static void
+write_complete(struct event_overlapped *eo, ev_uintptr_t key,
+ ev_ssize_t nbytes, int ok)
+{
+ struct bufferevent_async *bev_a = upcast_write(eo);
+ struct bufferevent *bev = &bev_a->bev.bev;
+ short what = BEV_EVENT_WRITING;
+ ev_ssize_t amount_unwritten;
+
+ BEV_LOCK(bev);
+ EVUTIL_ASSERT(bev_a->write_in_progress);
+
+ amount_unwritten = bev_a->write_in_progress - nbytes;
+ evbuffer_commit_write_(bev->output, nbytes);
+ bev_a->write_in_progress = 0;
+
+ if (amount_unwritten)
+ bufferevent_decrement_write_buckets_(&bev_a->bev,
+ -amount_unwritten);
+
+
+ if (!ok)
+ bev_async_set_wsa_error(bev, eo);
+
+ if (bev_a->ok) {
+ if (ok && nbytes) {
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
+ bufferevent_trigger_nolock_(bev, EV_WRITE, 0);
+ bev_async_consider_writing(bev_a);
+ } else if (!ok) {
+ what |= BEV_EVENT_ERROR;
+ bev_a->ok = 0;
+ bufferevent_run_eventcb_(bev, what, 0);
+ } else if (!nbytes) {
+ what |= BEV_EVENT_EOF;
+ bev_a->ok = 0;
+ bufferevent_run_eventcb_(bev, what, 0);
+ }
+ }
+
+ bufferevent_decref_and_unlock_(bev);
+}
+
+struct bufferevent *
+bufferevent_async_new_(struct event_base *base,
+ evutil_socket_t fd, int options)
+{
+ struct bufferevent_async *bev_a;
+ struct bufferevent *bev;
+ struct event_iocp_port *iocp;
+
+ options |= BEV_OPT_THREADSAFE;
+
+ if (!(iocp = event_base_get_iocp_(base)))
+ return NULL;
+
+ if (fd >= 0 && event_iocp_port_associate_(iocp, fd, 1)<0) {
+ int err = GetLastError();
+ /* We may have alrady associated this fd with a port.
+ * Let's hope it's this port, and that the error code
+ * for doing this neer changes. */
+ if (err != ERROR_INVALID_PARAMETER)
+ return NULL;
+ }
+
+ if (!(bev_a = mm_calloc(1, sizeof(struct bufferevent_async))))
+ return NULL;
+
+ bev = &bev_a->bev.bev;
+ if (!(bev->input = evbuffer_overlapped_new_(fd))) {
+ mm_free(bev_a);
+ return NULL;
+ }
+ if (!(bev->output = evbuffer_overlapped_new_(fd))) {
+ evbuffer_free(bev->input);
+ mm_free(bev_a);
+ return NULL;
+ }
+
+ if (bufferevent_init_common_(&bev_a->bev, base, &bufferevent_ops_async,
+ options)<0)
+ goto err;
+
+ evbuffer_add_cb(bev->input, be_async_inbuf_callback, bev);
+ evbuffer_add_cb(bev->output, be_async_outbuf_callback, bev);
+
+ event_overlapped_init_(&bev_a->connect_overlapped, connect_complete);
+ event_overlapped_init_(&bev_a->read_overlapped, read_complete);
+ event_overlapped_init_(&bev_a->write_overlapped, write_complete);
+
+ bev_a->ok = fd >= 0;
+ if (bev_a->ok)
+ bufferevent_init_generic_timeout_cbs_(bev);
+
+ return bev;
+err:
+ bufferevent_free(&bev_a->bev.bev);
+ return NULL;
+}
+
+void
+bufferevent_async_set_connected_(struct bufferevent *bev)
+{
+ struct bufferevent_async *bev_async = upcast(bev);
+ bev_async->ok = 1;
+ bufferevent_init_generic_timeout_cbs_(bev);
+ /* Now's a good time to consider reading/writing */
+ be_async_enable(bev, bev->enabled);
+}
+
+int
+bufferevent_async_can_connect_(struct bufferevent *bev)
+{
+ const struct win32_extension_fns *ext =
+ event_get_win32_extension_fns_();
+
+ if (BEV_IS_ASYNC(bev) &&
+ event_base_get_iocp_(bev->ev_base) &&
+ ext && ext->ConnectEx)
+ return 1;
+
+ return 0;
+}
+
+int
+bufferevent_async_connect_(struct bufferevent *bev, evutil_socket_t fd,
+ const struct sockaddr *sa, int socklen)
+{
+ BOOL rc;
+ struct bufferevent_async *bev_async = upcast(bev);
+ struct sockaddr_storage ss;
+ const struct win32_extension_fns *ext =
+ event_get_win32_extension_fns_();
+
+ EVUTIL_ASSERT(ext && ext->ConnectEx && fd >= 0 && sa != NULL);
+
+ /* ConnectEx() requires that the socket be bound to an address
+ * with bind() before using, otherwise it will fail. We attempt
+ * to issue a bind() here, taking into account that the error
+ * code is set to WSAEINVAL when the socket is already bound. */
+ memset(&ss, 0, sizeof(ss));
+ if (sa->sa_family == AF_INET) {
+ struct sockaddr_in *sin = (struct sockaddr_in *)&ss;
+ sin->sin_family = AF_INET;
+ sin->sin_addr.s_addr = INADDR_ANY;
+ } else if (sa->sa_family == AF_INET6) {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&ss;
+ sin6->sin6_family = AF_INET6;
+ sin6->sin6_addr = in6addr_any;
+ } else {
+ /* Well, the user will have to bind() */
+ return -1;
+ }
+ if (bind(fd, (struct sockaddr *)&ss, sizeof(ss)) < 0 &&
+ WSAGetLastError() != WSAEINVAL)
+ return -1;
+
+ event_base_add_virtual_(bev->ev_base);
+ bufferevent_incref_(bev);
+ rc = ext->ConnectEx(fd, sa, socklen, NULL, 0, NULL,
+ &bev_async->connect_overlapped.overlapped);
+ if (rc || WSAGetLastError() == ERROR_IO_PENDING)
+ return 0;
+
+ event_base_del_virtual_(bev->ev_base);
+ bufferevent_decref_(bev);
+
+ return -1;
+}
+
+static int
+be_async_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
+ union bufferevent_ctrl_data *data)
+{
+ switch (op) {
+ case BEV_CTRL_GET_FD:
+ data->fd = evbuffer_overlapped_get_fd_(bev->input);
+ return 0;
+ case BEV_CTRL_SET_FD: {
+ struct event_iocp_port *iocp;
+
+ if (data->fd == evbuffer_overlapped_get_fd_(bev->input))
+ return 0;
+ if (!(iocp = event_base_get_iocp_(bev->ev_base)))
+ return -1;
+ if (event_iocp_port_associate_(iocp, data->fd, 1) < 0)
+ return -1;
+ evbuffer_overlapped_set_fd_(bev->input, data->fd);
+ evbuffer_overlapped_set_fd_(bev->output, data->fd);
+ return 0;
+ }
+ case BEV_CTRL_CANCEL_ALL: {
+ struct bufferevent_async *bev_a = upcast(bev);
+ evutil_socket_t fd = evbuffer_overlapped_get_fd_(bev->input);
+ if (fd != (evutil_socket_t)INVALID_SOCKET &&
+ (bev_a->bev.options & BEV_OPT_CLOSE_ON_FREE)) {
+ closesocket(fd);
+ }
+ bev_a->ok = 0;
+ return 0;
+ }
+ case BEV_CTRL_GET_UNDERLYING:
+ default:
+ return -1;
+ }
+}
+
+
diff --git a/sntp/libevent/bufferevent_filter.c b/sntp/libevent/bufferevent_filter.c
new file mode 100644
index 000000000000..af71ebeeae91
--- /dev/null
+++ b/sntp/libevent/bufferevent_filter.c
@@ -0,0 +1,518 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ * Copyright (c) 2002-2006 Niels Provos <provos@citi.umich.edu>
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#include "event2/event-config.h"
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+#include "event2/util.h"
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/event.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+#include "util-internal.h"
+
+/* prototypes */
+static int be_filter_enable(struct bufferevent *, short);
+static int be_filter_disable(struct bufferevent *, short);
+static void be_filter_unlink(struct bufferevent *);
+static void be_filter_destruct(struct bufferevent *);
+
+static void be_filter_readcb(struct bufferevent *, void *);
+static void be_filter_writecb(struct bufferevent *, void *);
+static void be_filter_eventcb(struct bufferevent *, short, void *);
+static int be_filter_flush(struct bufferevent *bufev,
+ short iotype, enum bufferevent_flush_mode mode);
+static int be_filter_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+
+static void bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *info, void *arg);
+
+struct bufferevent_filtered {
+ struct bufferevent_private bev;
+
+ /** The bufferevent that we read/write filtered data from/to. */
+ struct bufferevent *underlying;
+ /** A callback on our outbuf to notice when somebody adds data */
+ struct evbuffer_cb_entry *outbuf_cb;
+ /** True iff we have received an EOF callback from the underlying
+ * bufferevent. */
+ unsigned got_eof;
+
+ /** Function to free context when we're done. */
+ void (*free_context)(void *);
+ /** Input filter */
+ bufferevent_filter_cb process_in;
+ /** Output filter */
+ bufferevent_filter_cb process_out;
+ /** User-supplied argument to the filters. */
+ void *context;
+};
+
+const struct bufferevent_ops bufferevent_ops_filter = {
+ "filter",
+ evutil_offsetof(struct bufferevent_filtered, bev.bev),
+ be_filter_enable,
+ be_filter_disable,
+ be_filter_unlink,
+ be_filter_destruct,
+ bufferevent_generic_adj_timeouts_,
+ be_filter_flush,
+ be_filter_ctrl,
+};
+
+/* Given a bufferevent that's really the bev filter of a bufferevent_filtered,
+ * return that bufferevent_filtered. Returns NULL otherwise.*/
+static inline struct bufferevent_filtered *
+upcast(struct bufferevent *bev)
+{
+ struct bufferevent_filtered *bev_f;
+ if (bev->be_ops != &bufferevent_ops_filter)
+ return NULL;
+ bev_f = (void*)( ((char*)bev) -
+ evutil_offsetof(struct bufferevent_filtered, bev.bev));
+ EVUTIL_ASSERT(bev_f->bev.bev.be_ops == &bufferevent_ops_filter);
+ return bev_f;
+}
+
+#define downcast(bev_f) (&(bev_f)->bev.bev)
+
+/** Return 1 iff bevf's underlying bufferevent's output buffer is at or
+ * over its high watermark such that we should not write to it in a given
+ * flush mode. */
+static int
+be_underlying_writebuf_full(struct bufferevent_filtered *bevf,
+ enum bufferevent_flush_mode state)
+{
+ struct bufferevent *u = bevf->underlying;
+ return state == BEV_NORMAL &&
+ u->wm_write.high &&
+ evbuffer_get_length(u->output) >= u->wm_write.high;
+}
+
+/** Return 1 if our input buffer is at or over its high watermark such that we
+ * should not write to it in a given flush mode. */
+static int
+be_readbuf_full(struct bufferevent_filtered *bevf,
+ enum bufferevent_flush_mode state)
+{
+ struct bufferevent *bufev = downcast(bevf);
+ return state == BEV_NORMAL &&
+ bufev->wm_read.high &&
+ evbuffer_get_length(bufev->input) >= bufev->wm_read.high;
+}
+
+
+/* Filter to use when we're created with a NULL filter. */
+static enum bufferevent_filter_result
+be_null_filter(struct evbuffer *src, struct evbuffer *dst, ev_ssize_t lim,
+ enum bufferevent_flush_mode state, void *ctx)
+{
+ (void)state;
+ if (evbuffer_remove_buffer(src, dst, lim) == 0)
+ return BEV_OK;
+ else
+ return BEV_ERROR;
+}
+
+struct bufferevent *
+bufferevent_filter_new(struct bufferevent *underlying,
+ bufferevent_filter_cb input_filter,
+ bufferevent_filter_cb output_filter,
+ int options,
+ void (*free_context)(void *),
+ void *ctx)
+{
+ struct bufferevent_filtered *bufev_f;
+ int tmp_options = options & ~BEV_OPT_THREADSAFE;
+
+ if (!underlying)
+ return NULL;
+
+ if (!input_filter)
+ input_filter = be_null_filter;
+ if (!output_filter)
+ output_filter = be_null_filter;
+
+ bufev_f = mm_calloc(1, sizeof(struct bufferevent_filtered));
+ if (!bufev_f)
+ return NULL;
+
+ if (bufferevent_init_common_(&bufev_f->bev, underlying->ev_base,
+ &bufferevent_ops_filter, tmp_options) < 0) {
+ mm_free(bufev_f);
+ return NULL;
+ }
+ if (options & BEV_OPT_THREADSAFE) {
+ bufferevent_enable_locking_(downcast(bufev_f), NULL);
+ }
+
+ bufev_f->underlying = underlying;
+
+ bufev_f->process_in = input_filter;
+ bufev_f->process_out = output_filter;
+ bufev_f->free_context = free_context;
+ bufev_f->context = ctx;
+
+ bufferevent_setcb(bufev_f->underlying,
+ be_filter_readcb, be_filter_writecb, be_filter_eventcb, bufev_f);
+
+ bufev_f->outbuf_cb = evbuffer_add_cb(downcast(bufev_f)->output,
+ bufferevent_filtered_outbuf_cb, bufev_f);
+
+ bufferevent_init_generic_timeout_cbs_(downcast(bufev_f));
+ bufferevent_incref_(underlying);
+
+ bufferevent_enable(underlying, EV_READ|EV_WRITE);
+ bufferevent_suspend_read_(underlying, BEV_SUSPEND_FILT_READ);
+
+ return downcast(bufev_f);
+}
+
+static void
+be_filter_unlink(struct bufferevent *bev)
+{
+ struct bufferevent_filtered *bevf = upcast(bev);
+ EVUTIL_ASSERT(bevf);
+
+ if (bevf->bev.options & BEV_OPT_CLOSE_ON_FREE) {
+ /* Yes, there is also a decref in bufferevent_decref_.
+ * That decref corresponds to the incref when we set
+ * underlying for the first time. This decref is an
+ * extra one to remove the last reference.
+ */
+ if (BEV_UPCAST(bevf->underlying)->refcnt < 2) {
+ event_warnx("BEV_OPT_CLOSE_ON_FREE set on an "
+ "bufferevent with too few references");
+ } else {
+ bufferevent_free(bevf->underlying);
+ }
+ } else {
+ if (bevf->underlying) {
+ if (bevf->underlying->errorcb == be_filter_eventcb)
+ bufferevent_setcb(bevf->underlying,
+ NULL, NULL, NULL, NULL);
+ bufferevent_unsuspend_read_(bevf->underlying,
+ BEV_SUSPEND_FILT_READ);
+ }
+ }
+}
+
+static void
+be_filter_destruct(struct bufferevent *bev)
+{
+ struct bufferevent_filtered *bevf = upcast(bev);
+ EVUTIL_ASSERT(bevf);
+ if (bevf->free_context)
+ bevf->free_context(bevf->context);
+}
+
+static int
+be_filter_enable(struct bufferevent *bev, short event)
+{
+ struct bufferevent_filtered *bevf = upcast(bev);
+ if (event & EV_WRITE)
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
+
+ if (event & EV_READ) {
+ BEV_RESET_GENERIC_READ_TIMEOUT(bev);
+ bufferevent_unsuspend_read_(bevf->underlying,
+ BEV_SUSPEND_FILT_READ);
+ }
+ return 0;
+}
+
+static int
+be_filter_disable(struct bufferevent *bev, short event)
+{
+ struct bufferevent_filtered *bevf = upcast(bev);
+ if (event & EV_WRITE)
+ BEV_DEL_GENERIC_WRITE_TIMEOUT(bev);
+ if (event & EV_READ) {
+ BEV_DEL_GENERIC_READ_TIMEOUT(bev);
+ bufferevent_suspend_read_(bevf->underlying,
+ BEV_SUSPEND_FILT_READ);
+ }
+ return 0;
+}
+
+static enum bufferevent_filter_result
+be_filter_process_input(struct bufferevent_filtered *bevf,
+ enum bufferevent_flush_mode state,
+ int *processed_out)
+{
+ enum bufferevent_filter_result res;
+ struct bufferevent *bev = downcast(bevf);
+
+ if (state == BEV_NORMAL) {
+ /* If we're in 'normal' mode, don't urge data on the filter
+ * unless we're reading data and under our high-water mark.*/
+ if (!(bev->enabled & EV_READ) ||
+ be_readbuf_full(bevf, state))
+ return BEV_OK;
+ }
+
+ do {
+ ev_ssize_t limit = -1;
+ if (state == BEV_NORMAL && bev->wm_read.high)
+ limit = bev->wm_read.high -
+ evbuffer_get_length(bev->input);
+
+ res = bevf->process_in(bevf->underlying->input,
+ bev->input, limit, state, bevf->context);
+
+ if (res == BEV_OK)
+ *processed_out = 1;
+ } while (res == BEV_OK &&
+ (bev->enabled & EV_READ) &&
+ evbuffer_get_length(bevf->underlying->input) &&
+ !be_readbuf_full(bevf, state));
+
+ if (*processed_out)
+ BEV_RESET_GENERIC_READ_TIMEOUT(bev);
+
+ return res;
+}
+
+
+static enum bufferevent_filter_result
+be_filter_process_output(struct bufferevent_filtered *bevf,
+ enum bufferevent_flush_mode state,
+ int *processed_out)
+{
+ /* Requires references and lock: might call writecb */
+ enum bufferevent_filter_result res = BEV_OK;
+ struct bufferevent *bufev = downcast(bevf);
+ int again = 0;
+
+ if (state == BEV_NORMAL) {
+ /* If we're in 'normal' mode, don't urge data on the
+ * filter unless we're writing data, and the underlying
+ * bufferevent is accepting data, and we have data to
+ * give the filter. If we're in 'flush' or 'finish',
+ * call the filter no matter what. */
+ if (!(bufev->enabled & EV_WRITE) ||
+ be_underlying_writebuf_full(bevf, state) ||
+ !evbuffer_get_length(bufev->output))
+ return BEV_OK;
+ }
+
+ /* disable the callback that calls this function
+ when the user adds to the output buffer. */
+ evbuffer_cb_set_flags(bufev->output, bevf->outbuf_cb, 0);
+
+ do {
+ int processed = 0;
+ again = 0;
+
+ do {
+ ev_ssize_t limit = -1;
+ if (state == BEV_NORMAL &&
+ bevf->underlying->wm_write.high)
+ limit = bevf->underlying->wm_write.high -
+ evbuffer_get_length(bevf->underlying->output);
+
+ res = bevf->process_out(downcast(bevf)->output,
+ bevf->underlying->output,
+ limit,
+ state,
+ bevf->context);
+
+ if (res == BEV_OK)
+ processed = *processed_out = 1;
+ } while (/* Stop if the filter wasn't successful...*/
+ res == BEV_OK &&
+ /* Or if we aren't writing any more. */
+ (bufev->enabled & EV_WRITE) &&
+ /* Of if we have nothing more to write and we are
+ * not flushing. */
+ evbuffer_get_length(bufev->output) &&
+ /* Or if we have filled the underlying output buffer. */
+ !be_underlying_writebuf_full(bevf,state));
+
+ if (processed) {
+ /* call the write callback.*/
+ bufferevent_trigger_nolock_(bufev, EV_WRITE, 0);
+
+ if (res == BEV_OK &&
+ (bufev->enabled & EV_WRITE) &&
+ evbuffer_get_length(bufev->output) &&
+ !be_underlying_writebuf_full(bevf, state)) {
+ again = 1;
+ }
+ }
+ } while (again);
+
+ /* reenable the outbuf_cb */
+ evbuffer_cb_set_flags(bufev->output,bevf->outbuf_cb,
+ EVBUFFER_CB_ENABLED);
+
+ if (*processed_out)
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bufev);
+
+ return res;
+}
+
+/* Called when the size of our outbuf changes. */
+static void
+bufferevent_filtered_outbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo, void *arg)
+{
+ struct bufferevent_filtered *bevf = arg;
+ struct bufferevent *bev = downcast(bevf);
+
+ if (cbinfo->n_added) {
+ int processed_any = 0;
+ /* Somebody added more data to the output buffer. Try to
+ * process it, if we should. */
+ bufferevent_incref_and_lock_(bev);
+ be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
+ bufferevent_decref_and_unlock_(bev);
+ }
+}
+
+/* Called when the underlying socket has read. */
+static void
+be_filter_readcb(struct bufferevent *underlying, void *me_)
+{
+ struct bufferevent_filtered *bevf = me_;
+ enum bufferevent_filter_result res;
+ enum bufferevent_flush_mode state;
+ struct bufferevent *bufev = downcast(bevf);
+ int processed_any = 0;
+
+ bufferevent_incref_and_lock_(bufev);
+
+ if (bevf->got_eof)
+ state = BEV_FINISHED;
+ else
+ state = BEV_NORMAL;
+
+ /* XXXX use return value */
+ res = be_filter_process_input(bevf, state, &processed_any);
+ (void)res;
+
+ /* XXX This should be in process_input, not here. There are
+ * other places that can call process-input, and they should
+ * force readcb calls as needed. */
+ if (processed_any)
+ bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+/* Called when the underlying socket has drained enough that we can write to
+ it. */
+static void
+be_filter_writecb(struct bufferevent *underlying, void *me_)
+{
+ struct bufferevent_filtered *bevf = me_;
+ struct bufferevent *bev = downcast(bevf);
+ int processed_any = 0;
+
+ bufferevent_incref_and_lock_(bev);
+ be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
+ bufferevent_decref_and_unlock_(bev);
+}
+
+/* Called when the underlying socket has given us an error */
+static void
+be_filter_eventcb(struct bufferevent *underlying, short what, void *me_)
+{
+ struct bufferevent_filtered *bevf = me_;
+ struct bufferevent *bev = downcast(bevf);
+
+ bufferevent_incref_and_lock_(bev);
+ /* All we can really to is tell our own eventcb. */
+ bufferevent_run_eventcb_(bev, what, 0);
+ bufferevent_decref_and_unlock_(bev);
+}
+
+static int
+be_filter_flush(struct bufferevent *bufev,
+ short iotype, enum bufferevent_flush_mode mode)
+{
+ struct bufferevent_filtered *bevf = upcast(bufev);
+ int processed_any = 0;
+ EVUTIL_ASSERT(bevf);
+
+ bufferevent_incref_and_lock_(bufev);
+
+ if (iotype & EV_READ) {
+ be_filter_process_input(bevf, mode, &processed_any);
+ }
+ if (iotype & EV_WRITE) {
+ be_filter_process_output(bevf, mode, &processed_any);
+ }
+ /* XXX check the return value? */
+ /* XXX does this want to recursively call lower-level flushes? */
+ bufferevent_flush(bevf->underlying, iotype, mode);
+
+ bufferevent_decref_and_unlock_(bufev);
+
+ return processed_any;
+}
+
+static int
+be_filter_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
+ union bufferevent_ctrl_data *data)
+{
+ struct bufferevent_filtered *bevf;
+ switch (op) {
+ case BEV_CTRL_GET_UNDERLYING:
+ bevf = upcast(bev);
+ data->ptr = bevf->underlying;
+ return 0;
+ case BEV_CTRL_GET_FD:
+ case BEV_CTRL_SET_FD:
+ case BEV_CTRL_CANCEL_ALL:
+ default:
+ return -1;
+ }
+}
diff --git a/sntp/libevent/bufferevent_openssl.c b/sntp/libevent/bufferevent_openssl.c
new file mode 100644
index 000000000000..423b34f10097
--- /dev/null
+++ b/sntp/libevent/bufferevent_openssl.c
@@ -0,0 +1,1502 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/bufferevent_ssl.h"
+#include "event2/buffer.h"
+#include "event2/event.h"
+
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+#include "log-internal.h"
+
+#include <openssl/bio.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+
+/*
+ * Define an OpenSSL bio that targets a bufferevent.
+ */
+
+/* --------------------
+ A BIO is an OpenSSL abstraction that handles reading and writing data. The
+ library will happily speak SSL over anything that implements a BIO
+ interface.
+
+ Here we define a BIO implementation that directs its output to a
+ bufferevent. We'll want to use this only when none of OpenSSL's built-in
+ IO mechanisms work for us.
+ -------------------- */
+
+/* every BIO type needs its own integer type value. */
+#define BIO_TYPE_LIBEVENT 57
+/* ???? Arguably, we should set BIO_TYPE_FILTER or BIO_TYPE_SOURCE_SINK on
+ * this. */
+
+#if 0
+static void
+print_err(int val)
+{
+ int err;
+ printf("Error was %d\n", val);
+
+ while ((err = ERR_get_error())) {
+ const char *msg = (const char*)ERR_reason_error_string(err);
+ const char *lib = (const char*)ERR_lib_error_string(err);
+ const char *func = (const char*)ERR_func_error_string(err);
+
+ printf("%s in %s %s\n", msg, lib, func);
+ }
+}
+#else
+#define print_err(v) ((void)0)
+#endif
+
+/* Called to initialize a new BIO */
+static int
+bio_bufferevent_new(BIO *b)
+{
+ b->init = 0;
+ b->num = -1;
+ b->ptr = NULL; /* We'll be putting the bufferevent in this field.*/
+ b->flags = 0;
+ return 1;
+}
+
+/* Called to uninitialize the BIO. */
+static int
+bio_bufferevent_free(BIO *b)
+{
+ if (!b)
+ return 0;
+ if (b->shutdown) {
+ if (b->init && b->ptr)
+ bufferevent_free(b->ptr);
+ b->init = 0;
+ b->flags = 0;
+ b->ptr = NULL;
+ }
+ return 1;
+}
+
+/* Called to extract data from the BIO. */
+static int
+bio_bufferevent_read(BIO *b, char *out, int outlen)
+{
+ int r = 0;
+ struct evbuffer *input;
+
+ BIO_clear_retry_flags(b);
+
+ if (!out)
+ return 0;
+ if (!b->ptr)
+ return -1;
+
+ input = bufferevent_get_input(b->ptr);
+ if (evbuffer_get_length(input) == 0) {
+ /* If there's no data to read, say so. */
+ BIO_set_retry_read(b);
+ return -1;
+ } else {
+ r = evbuffer_remove(input, out, outlen);
+ }
+
+ return r;
+}
+
+/* Called to write data info the BIO */
+static int
+bio_bufferevent_write(BIO *b, const char *in, int inlen)
+{
+ struct bufferevent *bufev = b->ptr;
+ struct evbuffer *output;
+ size_t outlen;
+
+ BIO_clear_retry_flags(b);
+
+ if (!b->ptr)
+ return -1;
+
+ output = bufferevent_get_output(bufev);
+ outlen = evbuffer_get_length(output);
+
+ /* Copy only as much data onto the output buffer as can fit under the
+ * high-water mark. */
+ if (bufev->wm_write.high && bufev->wm_write.high <= (outlen+inlen)) {
+ if (bufev->wm_write.high <= outlen) {
+ /* If no data can fit, we'll need to retry later. */
+ BIO_set_retry_write(b);
+ return -1;
+ }
+ inlen = bufev->wm_write.high - outlen;
+ }
+
+ EVUTIL_ASSERT(inlen > 0);
+ evbuffer_add(output, in, inlen);
+ return inlen;
+}
+
+/* Called to handle various requests */
+static long
+bio_bufferevent_ctrl(BIO *b, int cmd, long num, void *ptr)
+{
+ struct bufferevent *bufev = b->ptr;
+ long ret = 1;
+
+ switch (cmd) {
+ case BIO_CTRL_GET_CLOSE:
+ ret = b->shutdown;
+ break;
+ case BIO_CTRL_SET_CLOSE:
+ b->shutdown = (int)num;
+ break;
+ case BIO_CTRL_PENDING:
+ ret = evbuffer_get_length(bufferevent_get_input(bufev)) != 0;
+ break;
+ case BIO_CTRL_WPENDING:
+ ret = evbuffer_get_length(bufferevent_get_output(bufev)) != 0;
+ break;
+ /* XXXX These two are given a special-case treatment because
+ * of cargo-cultism. I should come up with a better reason. */
+ case BIO_CTRL_DUP:
+ case BIO_CTRL_FLUSH:
+ ret = 1;
+ break;
+ default:
+ ret = 0;
+ break;
+ }
+ return ret;
+}
+
+/* Called to write a string to the BIO */
+static int
+bio_bufferevent_puts(BIO *b, const char *s)
+{
+ return bio_bufferevent_write(b, s, strlen(s));
+}
+
+/* Method table for the bufferevent BIO */
+static BIO_METHOD methods_bufferevent = {
+ BIO_TYPE_LIBEVENT, "bufferevent",
+ bio_bufferevent_write,
+ bio_bufferevent_read,
+ bio_bufferevent_puts,
+ NULL /* bio_bufferevent_gets */,
+ bio_bufferevent_ctrl,
+ bio_bufferevent_new,
+ bio_bufferevent_free,
+ NULL /* callback_ctrl */,
+};
+
+/* Return the method table for the bufferevents BIO */
+static BIO_METHOD *
+BIO_s_bufferevent(void)
+{
+ return &methods_bufferevent;
+}
+
+/* Create a new BIO to wrap communication around a bufferevent. If close_flag
+ * is true, the bufferevent will be freed when the BIO is closed. */
+static BIO *
+BIO_new_bufferevent(struct bufferevent *bufferevent, int close_flag)
+{
+ BIO *result;
+ if (!bufferevent)
+ return NULL;
+ if (!(result = BIO_new(BIO_s_bufferevent())))
+ return NULL;
+ result->init = 1;
+ result->ptr = bufferevent;
+ result->shutdown = close_flag ? 1 : 0;
+ return result;
+}
+
+/* --------------------
+ Now, here's the OpenSSL-based implementation of bufferevent.
+
+ The implementation comes in two flavors: one that connects its SSL object
+ to an underlying bufferevent using a BIO_bufferevent, and one that has the
+ SSL object connect to a socket directly. The latter should generally be
+ faster, except on Windows, where your best bet is using a
+ bufferevent_async.
+
+ (OpenSSL supports many other BIO types, too. But we can't use any unless
+ we have a good way to get notified when they become readable/writable.)
+ -------------------- */
+
+struct bio_data_counts {
+ unsigned long n_written;
+ unsigned long n_read;
+};
+
+struct bufferevent_openssl {
+ /* Shared fields with common bufferevent implementation code.
+ If we were set up with an underlying bufferevent, we use the
+ events here as timers only. If we have an SSL, then we use
+ the events as socket events.
+ */
+ struct bufferevent_private bev;
+ /* An underlying bufferevent that we're directing our output to.
+ If it's NULL, then we're connected to an fd, not an evbuffer. */
+ struct bufferevent *underlying;
+ /* The SSL object doing our encryption. */
+ SSL *ssl;
+
+ /* A callback that's invoked when data arrives on our outbuf so we
+ know to write data to the SSL. */
+ struct evbuffer_cb_entry *outbuf_cb;
+
+ /* A count of how much data the bios have read/written total. Used
+ for rate-limiting. */
+ struct bio_data_counts counts;
+
+ /* If this value is greater than 0, then the last SSL_write blocked,
+ * and we need to try it again with this many bytes. */
+ ev_ssize_t last_write;
+
+#define NUM_ERRORS 3
+ ev_uint32_t errors[NUM_ERRORS];
+
+ /* When we next get available space, we should say "read" instead of
+ "write". This can happen if there's a renegotiation during a read
+ operation. */
+ unsigned read_blocked_on_write : 1;
+ /* When we next get data, we should say "write" instead of "read". */
+ unsigned write_blocked_on_read : 1;
+ /* Treat TCP close before SSL close on SSL >= v3 as clean EOF. */
+ unsigned allow_dirty_shutdown : 1;
+ /* XXXX */
+ unsigned fd_is_set : 1;
+ /* XXX */
+ unsigned n_errors : 2;
+
+ /* Are we currently connecting, accepting, or doing IO? */
+ unsigned state : 2;
+};
+
+static int be_openssl_enable(struct bufferevent *, short);
+static int be_openssl_disable(struct bufferevent *, short);
+static void be_openssl_unlink(struct bufferevent *);
+static void be_openssl_destruct(struct bufferevent *);
+static int be_openssl_adj_timeouts(struct bufferevent *);
+static int be_openssl_flush(struct bufferevent *bufev,
+ short iotype, enum bufferevent_flush_mode mode);
+static int be_openssl_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+
+const struct bufferevent_ops bufferevent_ops_openssl = {
+ "ssl",
+ evutil_offsetof(struct bufferevent_openssl, bev.bev),
+ be_openssl_enable,
+ be_openssl_disable,
+ be_openssl_unlink,
+ be_openssl_destruct,
+ be_openssl_adj_timeouts,
+ be_openssl_flush,
+ be_openssl_ctrl,
+};
+
+/* Given a bufferevent, return a pointer to the bufferevent_openssl that
+ * contains it, if any. */
+static inline struct bufferevent_openssl *
+upcast(struct bufferevent *bev)
+{
+ struct bufferevent_openssl *bev_o;
+ if (bev->be_ops != &bufferevent_ops_openssl)
+ return NULL;
+ bev_o = (void*)( ((char*)bev) -
+ evutil_offsetof(struct bufferevent_openssl, bev.bev));
+ EVUTIL_ASSERT(bev_o->bev.bev.be_ops == &bufferevent_ops_openssl);
+ return bev_o;
+}
+
+static inline void
+put_error(struct bufferevent_openssl *bev_ssl, unsigned long err)
+{
+ if (bev_ssl->n_errors == NUM_ERRORS)
+ return;
+ /* The error type according to openssl is "unsigned long", but
+ openssl never uses more than 32 bits of it. It _can't_ use more
+ than 32 bits of it, since it needs to report errors on systems
+ where long is only 32 bits.
+ */
+ bev_ssl->errors[bev_ssl->n_errors++] = (ev_uint32_t) err;
+}
+
+/* Have the base communications channel (either the underlying bufferevent or
+ * ev_read and ev_write) start reading. Take the read-blocked-on-write flag
+ * into account. */
+static int
+start_reading(struct bufferevent_openssl *bev_ssl)
+{
+ if (bev_ssl->underlying) {
+ bufferevent_unsuspend_read_(bev_ssl->underlying,
+ BEV_SUSPEND_FILT_READ);
+ return 0;
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ int r;
+ r = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
+ if (r == 0 && bev_ssl->read_blocked_on_write)
+ r = bufferevent_add_event_(&bev->ev_write,
+ &bev->timeout_write);
+ return r;
+ }
+}
+
+/* Have the base communications channel (either the underlying bufferevent or
+ * ev_read and ev_write) start writing. Take the write-blocked-on-read flag
+ * into account. */
+static int
+start_writing(struct bufferevent_openssl *bev_ssl)
+{
+ int r = 0;
+ if (bev_ssl->underlying) {
+ ;
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ r = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
+ if (!r && bev_ssl->write_blocked_on_read)
+ r = bufferevent_add_event_(&bev->ev_read,
+ &bev->timeout_read);
+ }
+ return r;
+}
+
+static void
+stop_reading(struct bufferevent_openssl *bev_ssl)
+{
+ if (bev_ssl->write_blocked_on_read)
+ return;
+ if (bev_ssl->underlying) {
+ bufferevent_suspend_read_(bev_ssl->underlying,
+ BEV_SUSPEND_FILT_READ);
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ event_del(&bev->ev_read);
+ }
+}
+
+static void
+stop_writing(struct bufferevent_openssl *bev_ssl)
+{
+ if (bev_ssl->read_blocked_on_write)
+ return;
+ if (bev_ssl->underlying) {
+ ;
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ event_del(&bev->ev_write);
+ }
+}
+
+static int
+set_rbow(struct bufferevent_openssl *bev_ssl)
+{
+ if (!bev_ssl->underlying)
+ stop_reading(bev_ssl);
+ bev_ssl->read_blocked_on_write = 1;
+ return start_writing(bev_ssl);
+}
+
+static int
+set_wbor(struct bufferevent_openssl *bev_ssl)
+{
+ if (!bev_ssl->underlying)
+ stop_writing(bev_ssl);
+ bev_ssl->write_blocked_on_read = 1;
+ return start_reading(bev_ssl);
+}
+
+static int
+clear_rbow(struct bufferevent_openssl *bev_ssl)
+{
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ int r = 0;
+ bev_ssl->read_blocked_on_write = 0;
+ if (!(bev->enabled & EV_WRITE))
+ stop_writing(bev_ssl);
+ if (bev->enabled & EV_READ)
+ r = start_reading(bev_ssl);
+ return r;
+}
+
+
+static int
+clear_wbor(struct bufferevent_openssl *bev_ssl)
+{
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ int r = 0;
+ bev_ssl->write_blocked_on_read = 0;
+ if (!(bev->enabled & EV_READ))
+ stop_reading(bev_ssl);
+ if (bev->enabled & EV_WRITE)
+ r = start_writing(bev_ssl);
+ return r;
+}
+
+static void
+conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
+{
+ int event = BEV_EVENT_ERROR;
+ int dirty_shutdown = 0;
+ unsigned long err;
+
+ switch (errcode) {
+ case SSL_ERROR_ZERO_RETURN:
+ /* Possibly a clean shutdown. */
+ if (SSL_get_shutdown(bev_ssl->ssl) & SSL_RECEIVED_SHUTDOWN)
+ event = BEV_EVENT_EOF;
+ else
+ dirty_shutdown = 1;
+ break;
+ case SSL_ERROR_SYSCALL:
+ /* IO error; possibly a dirty shutdown. */
+ if (ret == 0 && ERR_peek_error() == 0)
+ dirty_shutdown = 1;
+ break;
+ case SSL_ERROR_SSL:
+ /* Protocol error. */
+ break;
+ case SSL_ERROR_WANT_X509_LOOKUP:
+ /* XXXX handle this. */
+ break;
+ case SSL_ERROR_NONE:
+ case SSL_ERROR_WANT_READ:
+ case SSL_ERROR_WANT_WRITE:
+ case SSL_ERROR_WANT_CONNECT:
+ case SSL_ERROR_WANT_ACCEPT:
+ default:
+ /* should be impossible; treat as normal error. */
+ event_warnx("BUG: Unexpected OpenSSL error code %d", errcode);
+ break;
+ }
+
+ while ((err = ERR_get_error())) {
+ put_error(bev_ssl, err);
+ }
+
+ if (dirty_shutdown && bev_ssl->allow_dirty_shutdown)
+ event = BEV_EVENT_EOF;
+
+ stop_reading(bev_ssl);
+ stop_writing(bev_ssl);
+
+ /* when is BEV_EVENT_{READING|WRITING} */
+ event = when | event;
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev, event, 0);
+}
+
+static void
+init_bio_counts(struct bufferevent_openssl *bev_ssl)
+{
+ bev_ssl->counts.n_written =
+ BIO_number_written(SSL_get_wbio(bev_ssl->ssl));
+ bev_ssl->counts.n_read =
+ BIO_number_read(SSL_get_rbio(bev_ssl->ssl));
+}
+
+static inline void
+decrement_buckets(struct bufferevent_openssl *bev_ssl)
+{
+ unsigned long num_w = BIO_number_written(SSL_get_wbio(bev_ssl->ssl));
+ unsigned long num_r = BIO_number_read(SSL_get_rbio(bev_ssl->ssl));
+ /* These next two subtractions can wrap around. That's okay. */
+ unsigned long w = num_w - bev_ssl->counts.n_written;
+ unsigned long r = num_r - bev_ssl->counts.n_read;
+ if (w)
+ bufferevent_decrement_write_buckets_(&bev_ssl->bev, w);
+ if (r)
+ bufferevent_decrement_read_buckets_(&bev_ssl->bev, r);
+ bev_ssl->counts.n_written = num_w;
+ bev_ssl->counts.n_read = num_r;
+}
+
+#define OP_MADE_PROGRESS 1
+#define OP_BLOCKED 2
+#define OP_ERR 4
+
+/* Return a bitmask of OP_MADE_PROGRESS (if we read anything); OP_BLOCKED (if
+ we're now blocked); and OP_ERR (if an error occurred). */
+static int
+do_read(struct bufferevent_openssl *bev_ssl, int n_to_read) {
+ /* Requires lock */
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ struct evbuffer *input = bev->input;
+ int r, n, i, n_used = 0, atmost;
+ struct evbuffer_iovec space[2];
+ int result = 0;
+
+ if (bev_ssl->bev.read_suspended)
+ return 0;
+
+ atmost = bufferevent_get_read_max_(&bev_ssl->bev);
+ if (n_to_read > atmost)
+ n_to_read = atmost;
+
+ n = evbuffer_reserve_space(input, n_to_read, space, 2);
+ if (n < 0)
+ return OP_ERR;
+
+ for (i=0; i<n; ++i) {
+ if (bev_ssl->bev.read_suspended)
+ break;
+ r = SSL_read(bev_ssl->ssl, space[i].iov_base, space[i].iov_len);
+ if (r>0) {
+ result |= OP_MADE_PROGRESS;
+ if (bev_ssl->read_blocked_on_write)
+ if (clear_rbow(bev_ssl) < 0)
+ return OP_ERR | result;
+ ++n_used;
+ space[i].iov_len = r;
+ decrement_buckets(bev_ssl);
+ } else {
+ int err = SSL_get_error(bev_ssl->ssl, r);
+ print_err(err);
+ switch (err) {
+ case SSL_ERROR_WANT_READ:
+ /* Can't read until underlying has more data. */
+ if (bev_ssl->read_blocked_on_write)
+ if (clear_rbow(bev_ssl) < 0)
+ return OP_ERR | result;
+ break;
+ case SSL_ERROR_WANT_WRITE:
+ /* This read operation requires a write, and the
+ * underlying is full */
+ if (!bev_ssl->read_blocked_on_write)
+ if (set_rbow(bev_ssl) < 0)
+ return OP_ERR | result;
+ break;
+ default:
+ conn_closed(bev_ssl, BEV_EVENT_READING, err, r);
+ break;
+ }
+ result |= OP_BLOCKED;
+ break; /* out of the loop */
+ }
+ }
+
+ if (n_used) {
+ evbuffer_commit_space(input, space, n_used);
+ if (bev_ssl->underlying)
+ BEV_RESET_GENERIC_READ_TIMEOUT(bev);
+ }
+
+ return result;
+}
+
+/* Return a bitmask of OP_MADE_PROGRESS (if we wrote anything); OP_BLOCKED (if
+ we're now blocked); and OP_ERR (if an error occurred). */
+static int
+do_write(struct bufferevent_openssl *bev_ssl, int atmost)
+{
+ int i, r, n, n_written = 0;
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ struct evbuffer *output = bev->output;
+ struct evbuffer_iovec space[8];
+ int result = 0;
+
+ if (bev_ssl->last_write > 0)
+ atmost = bev_ssl->last_write;
+ else
+ atmost = bufferevent_get_write_max_(&bev_ssl->bev);
+
+ n = evbuffer_peek(output, atmost, NULL, space, 8);
+ if (n < 0)
+ return OP_ERR | result;
+
+ if (n > 8)
+ n = 8;
+ for (i=0; i < n; ++i) {
+ if (bev_ssl->bev.write_suspended)
+ break;
+
+ /* SSL_write will (reasonably) return 0 if we tell it to
+ send 0 data. Skip this case so we don't interpret the
+ result as an error */
+ if (space[i].iov_len == 0)
+ continue;
+
+ r = SSL_write(bev_ssl->ssl, space[i].iov_base,
+ space[i].iov_len);
+ if (r > 0) {
+ result |= OP_MADE_PROGRESS;
+ if (bev_ssl->write_blocked_on_read)
+ if (clear_wbor(bev_ssl) < 0)
+ return OP_ERR | result;
+ n_written += r;
+ bev_ssl->last_write = -1;
+ decrement_buckets(bev_ssl);
+ } else {
+ int err = SSL_get_error(bev_ssl->ssl, r);
+ print_err(err);
+ switch (err) {
+ case SSL_ERROR_WANT_WRITE:
+ /* Can't read until underlying has more data. */
+ if (bev_ssl->write_blocked_on_read)
+ if (clear_wbor(bev_ssl) < 0)
+ return OP_ERR | result;
+ bev_ssl->last_write = space[i].iov_len;
+ break;
+ case SSL_ERROR_WANT_READ:
+ /* This read operation requires a write, and the
+ * underlying is full */
+ if (!bev_ssl->write_blocked_on_read)
+ if (set_wbor(bev_ssl) < 0)
+ return OP_ERR | result;
+ bev_ssl->last_write = space[i].iov_len;
+ break;
+ default:
+ conn_closed(bev_ssl, BEV_EVENT_WRITING, err, r);
+ bev_ssl->last_write = -1;
+ break;
+ }
+ result |= OP_BLOCKED;
+ break;
+ }
+ }
+ if (n_written) {
+ evbuffer_drain(output, n_written);
+ if (bev_ssl->underlying)
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
+
+ bufferevent_trigger_nolock_(bev, EV_WRITE, 0);
+ }
+ return result;
+}
+
+#define WRITE_FRAME 15000
+
+#define READ_DEFAULT 4096
+
+/* Try to figure out how many bytes to read; return 0 if we shouldn't be
+ * reading. */
+static int
+bytes_to_read(struct bufferevent_openssl *bev)
+{
+ struct evbuffer *input = bev->bev.bev.input;
+ struct event_watermark *wm = &bev->bev.bev.wm_read;
+ int result = READ_DEFAULT;
+ ev_ssize_t limit;
+ /* XXX 99% of this is generic code that nearly all bufferevents will
+ * want. */
+
+ if (bev->write_blocked_on_read) {
+ return 0;
+ }
+
+ if (! (bev->bev.bev.enabled & EV_READ)) {
+ return 0;
+ }
+
+ if (bev->bev.read_suspended) {
+ return 0;
+ }
+
+ if (wm->high) {
+ if (evbuffer_get_length(input) >= wm->high) {
+ return 0;
+ }
+
+ result = wm->high - evbuffer_get_length(input);
+ } else {
+ result = READ_DEFAULT;
+ }
+
+ /* Respect the rate limit */
+ limit = bufferevent_get_read_max_(&bev->bev);
+ if (result > limit) {
+ result = limit;
+ }
+
+ return result;
+}
+
+
+/* Things look readable. If write is blocked on read, write till it isn't.
+ * Read from the underlying buffer until we block or we hit our high-water
+ * mark.
+ */
+static void
+consider_reading(struct bufferevent_openssl *bev_ssl)
+{
+ int r;
+ int n_to_read;
+ int all_result_flags = 0;
+
+ while (bev_ssl->write_blocked_on_read) {
+ r = do_write(bev_ssl, WRITE_FRAME);
+ if (r & (OP_BLOCKED|OP_ERR))
+ break;
+ }
+ if (bev_ssl->write_blocked_on_read)
+ return;
+
+ n_to_read = bytes_to_read(bev_ssl);
+
+ while (n_to_read) {
+ r = do_read(bev_ssl, n_to_read);
+ all_result_flags |= r;
+
+ if (r & (OP_BLOCKED|OP_ERR))
+ break;
+
+ if (bev_ssl->bev.read_suspended)
+ break;
+
+ /* Read all pending data. This won't hit the network
+ * again, and will (most importantly) put us in a state
+ * where we don't need to read anything else until the
+ * socket is readable again. It'll potentially make us
+ * overrun our read high-watermark (somewhat
+ * regrettable). The damage to the rate-limit has
+ * already been done, since OpenSSL went and read a
+ * whole SSL record anyway. */
+ n_to_read = SSL_pending(bev_ssl->ssl);
+
+ /* XXX This if statement is actually a bad bug, added to avoid
+ * XXX a worse bug.
+ *
+ * The bad bug: It can potentially cause resource unfairness
+ * by reading too much data from the underlying bufferevent;
+ * it can potentially cause read looping if the underlying
+ * bufferevent is a bufferevent_pair and deferred callbacks
+ * aren't used.
+ *
+ * The worse bug: If we didn't do this, then we would
+ * potentially not read any more from bev_ssl->underlying
+ * until more data arrived there, which could lead to us
+ * waiting forever.
+ */
+ if (!n_to_read && bev_ssl->underlying)
+ n_to_read = bytes_to_read(bev_ssl);
+ }
+
+ if (all_result_flags & OP_MADE_PROGRESS) {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+
+ bufferevent_trigger_nolock_(bev, EV_READ, 0);
+ }
+
+ if (!bev_ssl->underlying) {
+ /* Should be redundant, but let's avoid busy-looping */
+ if (bev_ssl->bev.read_suspended ||
+ !(bev_ssl->bev.bev.enabled & EV_READ)) {
+ event_del(&bev_ssl->bev.bev.ev_read);
+ }
+ }
+}
+
+static void
+consider_writing(struct bufferevent_openssl *bev_ssl)
+{
+ int r;
+ struct evbuffer *output = bev_ssl->bev.bev.output;
+ struct evbuffer *target = NULL;
+ struct event_watermark *wm = NULL;
+
+ while (bev_ssl->read_blocked_on_write) {
+ r = do_read(bev_ssl, 1024); /* XXXX 1024 is a hack */
+ if (r & OP_MADE_PROGRESS) {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+
+ bufferevent_trigger_nolock_(bev, EV_READ, 0);
+ }
+ if (r & (OP_ERR|OP_BLOCKED))
+ break;
+ }
+ if (bev_ssl->read_blocked_on_write)
+ return;
+ if (bev_ssl->underlying) {
+ target = bev_ssl->underlying->output;
+ wm = &bev_ssl->underlying->wm_write;
+ }
+ while ((bev_ssl->bev.bev.enabled & EV_WRITE) &&
+ (! bev_ssl->bev.write_suspended) &&
+ evbuffer_get_length(output) &&
+ (!target || (! wm->high || evbuffer_get_length(target) < wm->high))) {
+ int n_to_write;
+ if (wm && wm->high)
+ n_to_write = wm->high - evbuffer_get_length(target);
+ else
+ n_to_write = WRITE_FRAME;
+ r = do_write(bev_ssl, n_to_write);
+ if (r & (OP_BLOCKED|OP_ERR))
+ break;
+ }
+
+ if (!bev_ssl->underlying) {
+ if (evbuffer_get_length(output) == 0) {
+ event_del(&bev_ssl->bev.bev.ev_write);
+ } else if (bev_ssl->bev.write_suspended ||
+ !(bev_ssl->bev.bev.enabled & EV_WRITE)) {
+ /* Should be redundant, but let's avoid busy-looping */
+ event_del(&bev_ssl->bev.bev.ev_write);
+ }
+ }
+}
+
+static void
+be_openssl_readcb(struct bufferevent *bev_base, void *ctx)
+{
+ struct bufferevent_openssl *bev_ssl = ctx;
+ consider_reading(bev_ssl);
+}
+
+static void
+be_openssl_writecb(struct bufferevent *bev_base, void *ctx)
+{
+ struct bufferevent_openssl *bev_ssl = ctx;
+ consider_writing(bev_ssl);
+}
+
+static void
+be_openssl_eventcb(struct bufferevent *bev_base, short what, void *ctx)
+{
+ struct bufferevent_openssl *bev_ssl = ctx;
+ int event = 0;
+
+ if (what & BEV_EVENT_EOF) {
+ if (bev_ssl->allow_dirty_shutdown)
+ event = BEV_EVENT_EOF;
+ else
+ event = BEV_EVENT_ERROR;
+ } else if (what & BEV_EVENT_TIMEOUT) {
+ /* We sure didn't set this. Propagate it to the user. */
+ event = what;
+ } else if (what & BEV_EVENT_ERROR) {
+ /* An error occurred on the connection. Propagate it to the user. */
+ event = what;
+ } else if (what & BEV_EVENT_CONNECTED) {
+ /* Ignore it. We're saying SSL_connect() already, which will
+ eat it. */
+ }
+ if (event)
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev, event, 0);
+}
+
+static void
+be_openssl_readeventcb(evutil_socket_t fd, short what, void *ptr)
+{
+ struct bufferevent_openssl *bev_ssl = ptr;
+ bufferevent_incref_and_lock_(&bev_ssl->bev.bev);
+ if (what == EV_TIMEOUT) {
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev,
+ BEV_EVENT_TIMEOUT|BEV_EVENT_READING, 0);
+ } else {
+ consider_reading(bev_ssl);
+ }
+ bufferevent_decref_and_unlock_(&bev_ssl->bev.bev);
+}
+
+static void
+be_openssl_writeeventcb(evutil_socket_t fd, short what, void *ptr)
+{
+ struct bufferevent_openssl *bev_ssl = ptr;
+ bufferevent_incref_and_lock_(&bev_ssl->bev.bev);
+ if (what == EV_TIMEOUT) {
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev,
+ BEV_EVENT_TIMEOUT|BEV_EVENT_WRITING, 0);
+ } else {
+ consider_writing(bev_ssl);
+ }
+ bufferevent_decref_and_unlock_(&bev_ssl->bev.bev);
+}
+
+static int
+set_open_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
+{
+ if (bev_ssl->underlying) {
+ bufferevent_setcb(bev_ssl->underlying,
+ be_openssl_readcb, be_openssl_writecb, be_openssl_eventcb,
+ bev_ssl);
+ return 0;
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ int rpending=0, wpending=0, r1=0, r2=0;
+ if (fd < 0 && bev_ssl->fd_is_set)
+ fd = event_get_fd(&bev->ev_read);
+ if (bev_ssl->fd_is_set) {
+ rpending = event_pending(&bev->ev_read, EV_READ, NULL);
+ wpending = event_pending(&bev->ev_write, EV_WRITE, NULL);
+ event_del(&bev->ev_read);
+ event_del(&bev->ev_write);
+ }
+ event_assign(&bev->ev_read, bev->ev_base, fd,
+ EV_READ|EV_PERSIST|EV_FINALIZE,
+ be_openssl_readeventcb, bev_ssl);
+ event_assign(&bev->ev_write, bev->ev_base, fd,
+ EV_WRITE|EV_PERSIST|EV_FINALIZE,
+ be_openssl_writeeventcb, bev_ssl);
+ if (rpending)
+ r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
+ if (wpending)
+ r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
+ if (fd >= 0) {
+ bev_ssl->fd_is_set = 1;
+ }
+ return (r1<0 || r2<0) ? -1 : 0;
+ }
+}
+
+static int
+do_handshake(struct bufferevent_openssl *bev_ssl)
+{
+ int r;
+
+ switch (bev_ssl->state) {
+ default:
+ case BUFFEREVENT_SSL_OPEN:
+ EVUTIL_ASSERT(0);
+ return -1;
+ case BUFFEREVENT_SSL_CONNECTING:
+ case BUFFEREVENT_SSL_ACCEPTING:
+ r = SSL_do_handshake(bev_ssl->ssl);
+ break;
+ }
+ decrement_buckets(bev_ssl);
+
+ if (r==1) {
+ /* We're done! */
+ bev_ssl->state = BUFFEREVENT_SSL_OPEN;
+ set_open_callbacks(bev_ssl, -1); /* XXXX handle failure */
+ /* Call do_read and do_write as needed */
+ bufferevent_enable(&bev_ssl->bev.bev, bev_ssl->bev.bev.enabled);
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev,
+ BEV_EVENT_CONNECTED, 0);
+ return 1;
+ } else {
+ int err = SSL_get_error(bev_ssl->ssl, r);
+ print_err(err);
+ switch (err) {
+ case SSL_ERROR_WANT_WRITE:
+ if (!bev_ssl->underlying) {
+ stop_reading(bev_ssl);
+ return start_writing(bev_ssl);
+ }
+ return 0;
+ case SSL_ERROR_WANT_READ:
+ if (!bev_ssl->underlying) {
+ stop_writing(bev_ssl);
+ return start_reading(bev_ssl);
+ }
+ return 0;
+ default:
+ conn_closed(bev_ssl, BEV_EVENT_READING, err, r);
+ return -1;
+ }
+ }
+}
+
+static void
+be_openssl_handshakecb(struct bufferevent *bev_base, void *ctx)
+{
+ struct bufferevent_openssl *bev_ssl = ctx;
+ do_handshake(bev_ssl);/* XXX handle failure */
+}
+
+static void
+be_openssl_handshakeeventcb(evutil_socket_t fd, short what, void *ptr)
+{
+ struct bufferevent_openssl *bev_ssl = ptr;
+
+ bufferevent_incref_and_lock_(&bev_ssl->bev.bev);
+ if (what & EV_TIMEOUT) {
+ bufferevent_run_eventcb_(&bev_ssl->bev.bev, BEV_EVENT_TIMEOUT, 0);
+ } else
+ do_handshake(bev_ssl);/* XXX handle failure */
+ bufferevent_decref_and_unlock_(&bev_ssl->bev.bev);
+}
+
+static int
+set_handshake_callbacks(struct bufferevent_openssl *bev_ssl, evutil_socket_t fd)
+{
+ if (bev_ssl->underlying) {
+ bufferevent_setcb(bev_ssl->underlying,
+ be_openssl_handshakecb, be_openssl_handshakecb,
+ be_openssl_eventcb,
+ bev_ssl);
+ return do_handshake(bev_ssl);
+ } else {
+ struct bufferevent *bev = &bev_ssl->bev.bev;
+ int r1=0, r2=0;
+ if (fd < 0 && bev_ssl->fd_is_set)
+ fd = event_get_fd(&bev->ev_read);
+ if (bev_ssl->fd_is_set) {
+ event_del(&bev->ev_read);
+ event_del(&bev->ev_write);
+ }
+ event_assign(&bev->ev_read, bev->ev_base, fd,
+ EV_READ|EV_PERSIST|EV_FINALIZE,
+ be_openssl_handshakeeventcb, bev_ssl);
+ event_assign(&bev->ev_write, bev->ev_base, fd,
+ EV_WRITE|EV_PERSIST|EV_FINALIZE,
+ be_openssl_handshakeeventcb, bev_ssl);
+ if (fd >= 0) {
+ r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
+ r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
+ bev_ssl->fd_is_set = 1;
+ }
+ return (r1<0 || r2<0) ? -1 : 0;
+ }
+}
+
+int
+bufferevent_ssl_renegotiate(struct bufferevent *bev)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+ if (!bev_ssl)
+ return -1;
+ if (SSL_renegotiate(bev_ssl->ssl) < 0)
+ return -1;
+ bev_ssl->state = BUFFEREVENT_SSL_CONNECTING;
+ if (set_handshake_callbacks(bev_ssl, -1) < 0)
+ return -1;
+ if (!bev_ssl->underlying)
+ return do_handshake(bev_ssl);
+ return 0;
+}
+
+static void
+be_openssl_outbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo, void *arg)
+{
+ struct bufferevent_openssl *bev_ssl = arg;
+ int r = 0;
+ /* XXX need to hold a reference here. */
+
+ if (cbinfo->n_added && bev_ssl->state == BUFFEREVENT_SSL_OPEN) {
+ if (cbinfo->orig_size == 0)
+ r = bufferevent_add_event_(&bev_ssl->bev.bev.ev_write,
+ &bev_ssl->bev.bev.timeout_write);
+ consider_writing(bev_ssl);
+ }
+ /* XXX Handle r < 0 */
+ (void)r;
+}
+
+
+static int
+be_openssl_enable(struct bufferevent *bev, short events)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+ int r1 = 0, r2 = 0;
+
+ if (bev_ssl->state != BUFFEREVENT_SSL_OPEN)
+ return 0;
+
+ if (events & EV_READ)
+ r1 = start_reading(bev_ssl);
+ if (events & EV_WRITE)
+ r2 = start_writing(bev_ssl);
+
+ if (bev_ssl->underlying) {
+ if (events & EV_READ)
+ BEV_RESET_GENERIC_READ_TIMEOUT(bev);
+ if (events & EV_WRITE)
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);
+
+ if (events & EV_READ)
+ consider_reading(bev_ssl);
+ if (events & EV_WRITE)
+ consider_writing(bev_ssl);
+ }
+ return (r1 < 0 || r2 < 0) ? -1 : 0;
+}
+
+static int
+be_openssl_disable(struct bufferevent *bev, short events)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+ if (bev_ssl->state != BUFFEREVENT_SSL_OPEN)
+ return 0;
+
+ if (events & EV_READ)
+ stop_reading(bev_ssl);
+ if (events & EV_WRITE)
+ stop_writing(bev_ssl);
+
+ if (bev_ssl->underlying) {
+ if (events & EV_READ)
+ BEV_DEL_GENERIC_READ_TIMEOUT(bev);
+ if (events & EV_WRITE)
+ BEV_DEL_GENERIC_WRITE_TIMEOUT(bev);
+ }
+ return 0;
+}
+
+static void
+be_openssl_unlink(struct bufferevent *bev)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+
+ if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) {
+ if (bev_ssl->underlying) {
+ if (BEV_UPCAST(bev_ssl->underlying)->refcnt < 2) {
+ event_warnx("BEV_OPT_CLOSE_ON_FREE set on an "
+ "bufferevent with too few references");
+ } else {
+ bufferevent_free(bev_ssl->underlying);
+ /* We still have a reference to it, via our
+ * BIO. So we don't drop this. */
+ // bev_ssl->underlying = NULL;
+ }
+ }
+ } else {
+ if (bev_ssl->underlying) {
+ if (bev_ssl->underlying->errorcb == be_openssl_eventcb)
+ bufferevent_setcb(bev_ssl->underlying,
+ NULL,NULL,NULL,NULL);
+ bufferevent_unsuspend_read_(bev_ssl->underlying,
+ BEV_SUSPEND_FILT_READ);
+ }
+ }
+}
+
+static void
+be_openssl_destruct(struct bufferevent *bev)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+
+ if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) {
+ if (! bev_ssl->underlying) {
+ evutil_socket_t fd = -1;
+ BIO *bio = SSL_get_wbio(bev_ssl->ssl);
+ if (bio)
+ fd = BIO_get_fd(bio, NULL);
+ if (fd >= 0)
+ evutil_closesocket(fd);
+ }
+ SSL_free(bev_ssl->ssl);
+ }
+}
+
+static int
+be_openssl_adj_timeouts(struct bufferevent *bev)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+
+ if (bev_ssl->underlying) {
+ return bufferevent_generic_adj_timeouts_(bev);
+ } else {
+ int r1=0, r2=0;
+ if (event_pending(&bev->ev_read, EV_READ, NULL)) {
+ if (evutil_timerisset(&bev->timeout_read)) {
+ r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read);
+ } else {
+ event_remove_timer(&bev->ev_read);
+ }
+ }
+ if (event_pending(&bev->ev_write, EV_WRITE, NULL)) {
+ if (evutil_timerisset(&bev->timeout_write)) {
+ r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write);
+ } else {
+ event_remove_timer(&bev->ev_write);
+ }
+ }
+
+ return (r1<0 || r2<0) ? -1 : 0;
+ }
+}
+
+static int
+be_openssl_flush(struct bufferevent *bufev,
+ short iotype, enum bufferevent_flush_mode mode)
+{
+ /* XXXX Implement this. */
+ return 0;
+}
+
+static int
+be_openssl_ctrl(struct bufferevent *bev,
+ enum bufferevent_ctrl_op op, union bufferevent_ctrl_data *data)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bev);
+ switch (op) {
+ case BEV_CTRL_SET_FD:
+ if (bev_ssl->underlying)
+ return -1;
+ {
+ BIO *bio;
+ bio = BIO_new_socket(data->fd, 0);
+ SSL_set_bio(bev_ssl->ssl, bio, bio);
+ bev_ssl->fd_is_set = 1;
+ }
+ if (bev_ssl->state == BUFFEREVENT_SSL_OPEN)
+ return set_open_callbacks(bev_ssl, data->fd);
+ else {
+ return set_handshake_callbacks(bev_ssl, data->fd);
+ }
+ case BEV_CTRL_GET_FD:
+ if (bev_ssl->underlying)
+ return -1;
+ if (!bev_ssl->fd_is_set)
+ return -1;
+ data->fd = event_get_fd(&bev->ev_read);
+ return 0;
+ case BEV_CTRL_GET_UNDERLYING:
+ if (!bev_ssl->underlying)
+ return -1;
+ data->ptr = bev_ssl->underlying;
+ return 0;
+ case BEV_CTRL_CANCEL_ALL:
+ default:
+ return -1;
+ }
+}
+
+SSL *
+bufferevent_openssl_get_ssl(struct bufferevent *bufev)
+{
+ struct bufferevent_openssl *bev_ssl = upcast(bufev);
+ if (!bev_ssl)
+ return NULL;
+ return bev_ssl->ssl;
+}
+
+static struct bufferevent *
+bufferevent_openssl_new_impl(struct event_base *base,
+ struct bufferevent *underlying,
+ evutil_socket_t fd,
+ SSL *ssl,
+ enum bufferevent_ssl_state state,
+ int options)
+{
+ struct bufferevent_openssl *bev_ssl = NULL;
+ struct bufferevent_private *bev_p = NULL;
+ int tmp_options = options & ~BEV_OPT_THREADSAFE;
+
+ if (underlying != NULL && fd >= 0)
+ return NULL; /* Only one can be set. */
+
+ if (!(bev_ssl = mm_calloc(1, sizeof(struct bufferevent_openssl))))
+ goto err;
+
+ bev_p = &bev_ssl->bev;
+
+ if (bufferevent_init_common_(bev_p, base,
+ &bufferevent_ops_openssl, tmp_options) < 0)
+ goto err;
+
+ /* Don't explode if we decide to realloc a chunk we're writing from in
+ * the output buffer. */
+ SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+
+ bev_ssl->underlying = underlying;
+ bev_ssl->ssl = ssl;
+
+ bev_ssl->outbuf_cb = evbuffer_add_cb(bev_p->bev.output,
+ be_openssl_outbuf_cb, bev_ssl);
+
+ if (options & BEV_OPT_THREADSAFE)
+ bufferevent_enable_locking_(&bev_ssl->bev.bev, NULL);
+
+ if (underlying) {
+ bufferevent_init_generic_timeout_cbs_(&bev_ssl->bev.bev);
+ bufferevent_incref_(underlying);
+ }
+
+ bev_ssl->state = state;
+ bev_ssl->last_write = -1;
+
+ init_bio_counts(bev_ssl);
+
+ switch (state) {
+ case BUFFEREVENT_SSL_ACCEPTING:
+ SSL_set_accept_state(bev_ssl->ssl);
+ if (set_handshake_callbacks(bev_ssl, fd) < 0)
+ goto err;
+ break;
+ case BUFFEREVENT_SSL_CONNECTING:
+ SSL_set_connect_state(bev_ssl->ssl);
+ if (set_handshake_callbacks(bev_ssl, fd) < 0)
+ goto err;
+ break;
+ case BUFFEREVENT_SSL_OPEN:
+ if (set_open_callbacks(bev_ssl, fd) < 0)
+ goto err;
+ break;
+ default:
+ goto err;
+ }
+
+ if (underlying) {
+ bufferevent_setwatermark(underlying, EV_READ, 0, 0);
+ bufferevent_enable(underlying, EV_READ|EV_WRITE);
+ if (state == BUFFEREVENT_SSL_OPEN)
+ bufferevent_suspend_read_(underlying,
+ BEV_SUSPEND_FILT_READ);
+ } else {
+ bev_ssl->bev.bev.enabled = EV_READ|EV_WRITE;
+ if (bev_ssl->fd_is_set) {
+ if (state != BUFFEREVENT_SSL_OPEN)
+ if (event_add(&bev_ssl->bev.bev.ev_read, NULL) < 0)
+ goto err;
+ if (event_add(&bev_ssl->bev.bev.ev_write, NULL) < 0)
+ goto err;
+ }
+ }
+
+ return &bev_ssl->bev.bev;
+err:
+ if (bev_ssl)
+ bufferevent_free(&bev_ssl->bev.bev);
+ return NULL;
+}
+
+struct bufferevent *
+bufferevent_openssl_filter_new(struct event_base *base,
+ struct bufferevent *underlying,
+ SSL *ssl,
+ enum bufferevent_ssl_state state,
+ int options)
+{
+ /* We don't tell the BIO to close the bufferevent; we do it ourselves
+ * on be_openssl_destruct */
+ int close_flag = 0; /* options & BEV_OPT_CLOSE_ON_FREE; */
+ BIO *bio;
+ if (!underlying)
+ return NULL;
+ if (!(bio = BIO_new_bufferevent(underlying, close_flag)))
+ return NULL;
+
+ SSL_set_bio(ssl, bio, bio);
+
+ return bufferevent_openssl_new_impl(
+ base, underlying, -1, ssl, state, options);
+}
+
+struct bufferevent *
+bufferevent_openssl_socket_new(struct event_base *base,
+ evutil_socket_t fd,
+ SSL *ssl,
+ enum bufferevent_ssl_state state,
+ int options)
+{
+ /* Does the SSL already have an fd? */
+ BIO *bio = SSL_get_wbio(ssl);
+ long have_fd = -1;
+
+ if (bio)
+ have_fd = BIO_get_fd(bio, NULL);
+
+ if (have_fd >= 0) {
+ /* The SSL is already configured with an fd. */
+ if (fd < 0) {
+ /* We should learn the fd from the SSL. */
+ fd = (evutil_socket_t) have_fd;
+ } else if (have_fd == (long)fd) {
+ /* We already know the fd from the SSL; do nothing */
+ } else {
+ /* We specified an fd different from that of the SSL.
+ This is probably an error on our part. Fail. */
+ return NULL;
+ }
+ (void) BIO_set_close(bio, 0);
+ } else {
+ /* The SSL isn't configured with a BIO with an fd. */
+ if (fd >= 0) {
+ /* ... and we have an fd we want to use. */
+ bio = BIO_new_socket(fd, 0);
+ SSL_set_bio(ssl, bio, bio);
+ } else {
+ /* Leave the fd unset. */
+ }
+ }
+
+ return bufferevent_openssl_new_impl(
+ base, NULL, fd, ssl, state, options);
+}
+
+int
+bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev)
+{
+ int allow_dirty_shutdown = -1;
+ struct bufferevent_openssl *bev_ssl;
+ BEV_LOCK(bev);
+ bev_ssl = upcast(bev);
+ if (bev_ssl)
+ allow_dirty_shutdown = bev_ssl->allow_dirty_shutdown;
+ BEV_UNLOCK(bev);
+ return allow_dirty_shutdown;
+}
+
+void
+bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev,
+ int allow_dirty_shutdown)
+{
+ struct bufferevent_openssl *bev_ssl;
+ BEV_LOCK(bev);
+ bev_ssl = upcast(bev);
+ if (bev_ssl)
+ bev_ssl->allow_dirty_shutdown = !!allow_dirty_shutdown;
+ BEV_UNLOCK(bev);
+}
+
+unsigned long
+bufferevent_get_openssl_error(struct bufferevent *bev)
+{
+ unsigned long err = 0;
+ struct bufferevent_openssl *bev_ssl;
+ BEV_LOCK(bev);
+ bev_ssl = upcast(bev);
+ if (bev_ssl && bev_ssl->n_errors) {
+ err = bev_ssl->errors[--bev_ssl->n_errors];
+ }
+ BEV_UNLOCK(bev);
+ return err;
+}
diff --git a/sntp/libevent/bufferevent_pair.c b/sntp/libevent/bufferevent_pair.c
new file mode 100644
index 000000000000..4340f23723c0
--- /dev/null
+++ b/sntp/libevent/bufferevent_pair.c
@@ -0,0 +1,327 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+#include "event2/util.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/event.h"
+#include "defer-internal.h"
+#include "bufferevent-internal.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+
+struct bufferevent_pair {
+ struct bufferevent_private bev;
+ struct bufferevent_pair *partner;
+};
+
+
+/* Given a bufferevent that's really a bev part of a bufferevent_pair,
+ * return that bufferevent_filtered. Returns NULL otherwise.*/
+static inline struct bufferevent_pair *
+upcast(struct bufferevent *bev)
+{
+ struct bufferevent_pair *bev_p;
+ if (bev->be_ops != &bufferevent_ops_pair)
+ return NULL;
+ bev_p = EVUTIL_UPCAST(bev, struct bufferevent_pair, bev.bev);
+ EVUTIL_ASSERT(bev_p->bev.bev.be_ops == &bufferevent_ops_pair);
+ return bev_p;
+}
+
+#define downcast(bev_pair) (&(bev_pair)->bev.bev)
+
+static inline void
+incref_and_lock(struct bufferevent *b)
+{
+ struct bufferevent_pair *bevp;
+ bufferevent_incref_and_lock_(b);
+ bevp = upcast(b);
+ if (bevp->partner)
+ bufferevent_incref_and_lock_(downcast(bevp->partner));
+}
+
+static inline void
+decref_and_unlock(struct bufferevent *b)
+{
+ struct bufferevent_pair *bevp = upcast(b);
+ if (bevp->partner)
+ bufferevent_decref_and_unlock_(downcast(bevp->partner));
+ bufferevent_decref_and_unlock_(b);
+}
+
+/* XXX Handle close */
+
+static void be_pair_outbuf_cb(struct evbuffer *,
+ const struct evbuffer_cb_info *, void *);
+
+static struct bufferevent_pair *
+bufferevent_pair_elt_new(struct event_base *base,
+ int options)
+{
+ struct bufferevent_pair *bufev;
+ if (! (bufev = mm_calloc(1, sizeof(struct bufferevent_pair))))
+ return NULL;
+ if (bufferevent_init_common_(&bufev->bev, base, &bufferevent_ops_pair,
+ options)) {
+ mm_free(bufev);
+ return NULL;
+ }
+ if (!evbuffer_add_cb(bufev->bev.bev.output, be_pair_outbuf_cb, bufev)) {
+ bufferevent_free(downcast(bufev));
+ return NULL;
+ }
+
+ bufferevent_init_generic_timeout_cbs_(&bufev->bev.bev);
+
+ return bufev;
+}
+
+int
+bufferevent_pair_new(struct event_base *base, int options,
+ struct bufferevent *pair[2])
+{
+ struct bufferevent_pair *bufev1 = NULL, *bufev2 = NULL;
+ int tmp_options;
+
+ options |= BEV_OPT_DEFER_CALLBACKS;
+ tmp_options = options & ~BEV_OPT_THREADSAFE;
+
+ bufev1 = bufferevent_pair_elt_new(base, options);
+ if (!bufev1)
+ return -1;
+ bufev2 = bufferevent_pair_elt_new(base, tmp_options);
+ if (!bufev2) {
+ bufferevent_free(downcast(bufev1));
+ return -1;
+ }
+
+ if (options & BEV_OPT_THREADSAFE) {
+ /*XXXX check return */
+ bufferevent_enable_locking_(downcast(bufev2), bufev1->bev.lock);
+ }
+
+ bufev1->partner = bufev2;
+ bufev2->partner = bufev1;
+
+ evbuffer_freeze(downcast(bufev1)->input, 0);
+ evbuffer_freeze(downcast(bufev1)->output, 1);
+ evbuffer_freeze(downcast(bufev2)->input, 0);
+ evbuffer_freeze(downcast(bufev2)->output, 1);
+
+ pair[0] = downcast(bufev1);
+ pair[1] = downcast(bufev2);
+
+ return 0;
+}
+
+static void
+be_pair_transfer(struct bufferevent *src, struct bufferevent *dst,
+ int ignore_wm)
+{
+ size_t dst_size;
+ size_t n;
+
+ evbuffer_unfreeze(src->output, 1);
+ evbuffer_unfreeze(dst->input, 0);
+
+ if (dst->wm_read.high) {
+ dst_size = evbuffer_get_length(dst->input);
+ if (dst_size < dst->wm_read.high) {
+ n = dst->wm_read.high - dst_size;
+ evbuffer_remove_buffer(src->output, dst->input, n);
+ } else {
+ if (!ignore_wm)
+ goto done;
+ n = evbuffer_get_length(src->output);
+ evbuffer_add_buffer(dst->input, src->output);
+ }
+ } else {
+ n = evbuffer_get_length(src->output);
+ evbuffer_add_buffer(dst->input, src->output);
+ }
+
+ if (n) {
+ BEV_RESET_GENERIC_READ_TIMEOUT(dst);
+
+ if (evbuffer_get_length(dst->output))
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(dst);
+ else
+ BEV_DEL_GENERIC_WRITE_TIMEOUT(dst);
+ }
+
+ bufferevent_trigger_nolock_(dst, EV_READ, 0);
+ bufferevent_trigger_nolock_(src, EV_WRITE, 0);
+done:
+ evbuffer_freeze(src->output, 1);
+ evbuffer_freeze(dst->input, 0);
+}
+
+static inline int
+be_pair_wants_to_talk(struct bufferevent_pair *src,
+ struct bufferevent_pair *dst)
+{
+ return (downcast(src)->enabled & EV_WRITE) &&
+ (downcast(dst)->enabled & EV_READ) &&
+ !dst->bev.read_suspended &&
+ evbuffer_get_length(downcast(src)->output);
+}
+
+static void
+be_pair_outbuf_cb(struct evbuffer *outbuf,
+ const struct evbuffer_cb_info *info, void *arg)
+{
+ struct bufferevent_pair *bev_pair = arg;
+ struct bufferevent_pair *partner = bev_pair->partner;
+
+ incref_and_lock(downcast(bev_pair));
+
+ if (info->n_added > info->n_deleted && partner) {
+ /* We got more data. If the other side's reading, then
+ hand it over. */
+ if (be_pair_wants_to_talk(bev_pair, partner)) {
+ be_pair_transfer(downcast(bev_pair), downcast(partner), 0);
+ }
+ }
+
+ decref_and_unlock(downcast(bev_pair));
+}
+
+static int
+be_pair_enable(struct bufferevent *bufev, short events)
+{
+ struct bufferevent_pair *bev_p = upcast(bufev);
+ struct bufferevent_pair *partner = bev_p->partner;
+
+ incref_and_lock(bufev);
+
+ if (events & EV_READ) {
+ BEV_RESET_GENERIC_READ_TIMEOUT(bufev);
+ }
+ if ((events & EV_WRITE) && evbuffer_get_length(bufev->output))
+ BEV_RESET_GENERIC_WRITE_TIMEOUT(bufev);
+
+ /* We're starting to read! Does the other side have anything to write?*/
+ if ((events & EV_READ) && partner &&
+ be_pair_wants_to_talk(partner, bev_p)) {
+ be_pair_transfer(downcast(partner), bufev, 0);
+ }
+ /* We're starting to write! Does the other side want to read? */
+ if ((events & EV_WRITE) && partner &&
+ be_pair_wants_to_talk(bev_p, partner)) {
+ be_pair_transfer(bufev, downcast(partner), 0);
+ }
+ decref_and_unlock(bufev);
+ return 0;
+}
+
+static int
+be_pair_disable(struct bufferevent *bev, short events)
+{
+ if (events & EV_READ) {
+ BEV_DEL_GENERIC_READ_TIMEOUT(bev);
+ }
+ if (events & EV_WRITE) {
+ BEV_DEL_GENERIC_WRITE_TIMEOUT(bev);
+ }
+ return 0;
+}
+
+static void
+be_pair_unlink(struct bufferevent *bev)
+{
+ struct bufferevent_pair *bev_p = upcast(bev);
+
+ if (bev_p->partner) {
+ bev_p->partner->partner = NULL;
+ bev_p->partner = NULL;
+ }
+}
+
+static int
+be_pair_flush(struct bufferevent *bev, short iotype,
+ enum bufferevent_flush_mode mode)
+{
+ struct bufferevent_pair *bev_p = upcast(bev);
+ struct bufferevent *partner;
+ incref_and_lock(bev);
+ if (!bev_p->partner)
+ return -1;
+
+ partner = downcast(bev_p->partner);
+
+ if (mode == BEV_NORMAL)
+ return 0;
+
+ if ((iotype & EV_READ) != 0)
+ be_pair_transfer(partner, bev, 1);
+
+ if ((iotype & EV_WRITE) != 0)
+ be_pair_transfer(bev, partner, 1);
+
+ if (mode == BEV_FINISHED) {
+ bufferevent_run_eventcb_(partner, iotype|BEV_EVENT_EOF, 0);
+ }
+ decref_and_unlock(bev);
+ return 0;
+}
+
+struct bufferevent *
+bufferevent_pair_get_partner(struct bufferevent *bev)
+{
+ struct bufferevent_pair *bev_p;
+ struct bufferevent *partner = NULL;
+ bev_p = upcast(bev);
+ if (! bev_p)
+ return NULL;
+
+ incref_and_lock(bev);
+ if (bev_p->partner)
+ partner = downcast(bev_p->partner);
+ decref_and_unlock(bev);
+ return partner;
+}
+
+const struct bufferevent_ops bufferevent_ops_pair = {
+ "pair_elt",
+ evutil_offsetof(struct bufferevent_pair, bev.bev),
+ be_pair_enable,
+ be_pair_disable,
+ be_pair_unlink,
+ NULL, /* be_pair_destruct, */
+ bufferevent_generic_adj_timeouts_,
+ be_pair_flush,
+ NULL, /* ctrl */
+};
diff --git a/sntp/libevent/bufferevent_ratelim.c b/sntp/libevent/bufferevent_ratelim.c
new file mode 100644
index 000000000000..bde192021be1
--- /dev/null
+++ b/sntp/libevent/bufferevent_ratelim.c
@@ -0,0 +1,1092 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ * Copyright (c) 2002-2006 Niels Provos <provos@citi.umich.edu>
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+#include <limits.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/util.h"
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/buffer.h"
+
+#include "ratelim-internal.h"
+
+#include "bufferevent-internal.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+#include "event-internal.h"
+
+int
+ev_token_bucket_init_(struct ev_token_bucket *bucket,
+ const struct ev_token_bucket_cfg *cfg,
+ ev_uint32_t current_tick,
+ int reinitialize)
+{
+ if (reinitialize) {
+ /* on reinitialization, we only clip downwards, since we've
+ already used who-knows-how-much bandwidth this tick. We
+ leave "last_updated" as it is; the next update will add the
+ appropriate amount of bandwidth to the bucket.
+ */
+ if (bucket->read_limit > (ev_int64_t) cfg->read_maximum)
+ bucket->read_limit = cfg->read_maximum;
+ if (bucket->write_limit > (ev_int64_t) cfg->write_maximum)
+ bucket->write_limit = cfg->write_maximum;
+ } else {
+ bucket->read_limit = cfg->read_rate;
+ bucket->write_limit = cfg->write_rate;
+ bucket->last_updated = current_tick;
+ }
+ return 0;
+}
+
+int
+ev_token_bucket_update_(struct ev_token_bucket *bucket,
+ const struct ev_token_bucket_cfg *cfg,
+ ev_uint32_t current_tick)
+{
+ /* It's okay if the tick number overflows, since we'll just
+ * wrap around when we do the unsigned substraction. */
+ unsigned n_ticks = current_tick - bucket->last_updated;
+
+ /* Make sure some ticks actually happened, and that time didn't
+ * roll back. */
+ if (n_ticks == 0 || n_ticks > INT_MAX)
+ return 0;
+
+ /* Naively, we would say
+ bucket->limit += n_ticks * cfg->rate;
+
+ if (bucket->limit > cfg->maximum)
+ bucket->limit = cfg->maximum;
+
+ But we're worried about overflow, so we do it like this:
+ */
+
+ if ((cfg->read_maximum - bucket->read_limit) / n_ticks < cfg->read_rate)
+ bucket->read_limit = cfg->read_maximum;
+ else
+ bucket->read_limit += n_ticks * cfg->read_rate;
+
+
+ if ((cfg->write_maximum - bucket->write_limit) / n_ticks < cfg->write_rate)
+ bucket->write_limit = cfg->write_maximum;
+ else
+ bucket->write_limit += n_ticks * cfg->write_rate;
+
+
+ bucket->last_updated = current_tick;
+
+ return 1;
+}
+
+static inline void
+bufferevent_update_buckets(struct bufferevent_private *bev)
+{
+ /* Must hold lock on bev. */
+ struct timeval now;
+ unsigned tick;
+ event_base_gettimeofday_cached(bev->bev.ev_base, &now);
+ tick = ev_token_bucket_get_tick_(&now, bev->rate_limiting->cfg);
+ if (tick != bev->rate_limiting->limit.last_updated)
+ ev_token_bucket_update_(&bev->rate_limiting->limit,
+ bev->rate_limiting->cfg, tick);
+}
+
+ev_uint32_t
+ev_token_bucket_get_tick_(const struct timeval *tv,
+ const struct ev_token_bucket_cfg *cfg)
+{
+ /* This computation uses two multiplies and a divide. We could do
+ * fewer if we knew that the tick length was an integer number of
+ * seconds, or if we knew it divided evenly into a second. We should
+ * investigate that more.
+ */
+
+ /* We cast to an ev_uint64_t first, since we don't want to overflow
+ * before we do the final divide. */
+ ev_uint64_t msec = (ev_uint64_t)tv->tv_sec * 1000 + tv->tv_usec / 1000;
+ return (unsigned)(msec / cfg->msec_per_tick);
+}
+
+struct ev_token_bucket_cfg *
+ev_token_bucket_cfg_new(size_t read_rate, size_t read_burst,
+ size_t write_rate, size_t write_burst,
+ const struct timeval *tick_len)
+{
+ struct ev_token_bucket_cfg *r;
+ struct timeval g;
+ if (! tick_len) {
+ g.tv_sec = 1;
+ g.tv_usec = 0;
+ tick_len = &g;
+ }
+ if (read_rate > read_burst || write_rate > write_burst ||
+ read_rate < 1 || write_rate < 1)
+ return NULL;
+ if (read_rate > EV_RATE_LIMIT_MAX ||
+ write_rate > EV_RATE_LIMIT_MAX ||
+ read_burst > EV_RATE_LIMIT_MAX ||
+ write_burst > EV_RATE_LIMIT_MAX)
+ return NULL;
+ r = mm_calloc(1, sizeof(struct ev_token_bucket_cfg));
+ if (!r)
+ return NULL;
+ r->read_rate = read_rate;
+ r->write_rate = write_rate;
+ r->read_maximum = read_burst;
+ r->write_maximum = write_burst;
+ memcpy(&r->tick_timeout, tick_len, sizeof(struct timeval));
+ r->msec_per_tick = (tick_len->tv_sec * 1000) +
+ (tick_len->tv_usec & COMMON_TIMEOUT_MICROSECONDS_MASK)/1000;
+ return r;
+}
+
+void
+ev_token_bucket_cfg_free(struct ev_token_bucket_cfg *cfg)
+{
+ mm_free(cfg);
+}
+
+/* Default values for max_single_read & max_single_write variables. */
+#define MAX_SINGLE_READ_DEFAULT 16384
+#define MAX_SINGLE_WRITE_DEFAULT 16384
+
+#define LOCK_GROUP(g) EVLOCK_LOCK((g)->lock, 0)
+#define UNLOCK_GROUP(g) EVLOCK_UNLOCK((g)->lock, 0)
+
+static int bev_group_suspend_reading_(struct bufferevent_rate_limit_group *g);
+static int bev_group_suspend_writing_(struct bufferevent_rate_limit_group *g);
+static void bev_group_unsuspend_reading_(struct bufferevent_rate_limit_group *g);
+static void bev_group_unsuspend_writing_(struct bufferevent_rate_limit_group *g);
+
+/** Helper: figure out the maximum amount we should write if is_write, or
+ the maximum amount we should read if is_read. Return that maximum, or
+ 0 if our bucket is wholly exhausted.
+ */
+static inline ev_ssize_t
+bufferevent_get_rlim_max_(struct bufferevent_private *bev, int is_write)
+{
+ /* needs lock on bev. */
+ ev_ssize_t max_so_far = is_write?bev->max_single_write:bev->max_single_read;
+
+#define LIM(x) \
+ (is_write ? (x).write_limit : (x).read_limit)
+
+#define GROUP_SUSPENDED(g) \
+ (is_write ? (g)->write_suspended : (g)->read_suspended)
+
+ /* Sets max_so_far to MIN(x, max_so_far) */
+#define CLAMPTO(x) \
+ do { \
+ if (max_so_far > (x)) \
+ max_so_far = (x); \
+ } while (0);
+
+ if (!bev->rate_limiting)
+ return max_so_far;
+
+ /* If rate-limiting is enabled at all, update the appropriate
+ bucket, and take the smaller of our rate limit and the group
+ rate limit.
+ */
+
+ if (bev->rate_limiting->cfg) {
+ bufferevent_update_buckets(bev);
+ max_so_far = LIM(bev->rate_limiting->limit);
+ }
+ if (bev->rate_limiting->group) {
+ struct bufferevent_rate_limit_group *g =
+ bev->rate_limiting->group;
+ ev_ssize_t share;
+ LOCK_GROUP(g);
+ if (GROUP_SUSPENDED(g)) {
+ /* We can get here if we failed to lock this
+ * particular bufferevent while suspending the whole
+ * group. */
+ if (is_write)
+ bufferevent_suspend_write_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ else
+ bufferevent_suspend_read_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ share = 0;
+ } else {
+ /* XXXX probably we should divide among the active
+ * members, not the total members. */
+ share = LIM(g->rate_limit) / g->n_members;
+ if (share < g->min_share)
+ share = g->min_share;
+ }
+ UNLOCK_GROUP(g);
+ CLAMPTO(share);
+ }
+
+ if (max_so_far < 0)
+ max_so_far = 0;
+ return max_so_far;
+}
+
+ev_ssize_t
+bufferevent_get_read_max_(struct bufferevent_private *bev)
+{
+ return bufferevent_get_rlim_max_(bev, 0);
+}
+
+ev_ssize_t
+bufferevent_get_write_max_(struct bufferevent_private *bev)
+{
+ return bufferevent_get_rlim_max_(bev, 1);
+}
+
+int
+bufferevent_decrement_read_buckets_(struct bufferevent_private *bev, ev_ssize_t bytes)
+{
+ /* XXXXX Make sure all users of this function check its return value */
+ int r = 0;
+ /* need to hold lock on bev */
+ if (!bev->rate_limiting)
+ return 0;
+
+ if (bev->rate_limiting->cfg) {
+ bev->rate_limiting->limit.read_limit -= bytes;
+ if (bev->rate_limiting->limit.read_limit <= 0) {
+ bufferevent_suspend_read_(&bev->bev, BEV_SUSPEND_BW);
+ if (event_add(&bev->rate_limiting->refill_bucket_event,
+ &bev->rate_limiting->cfg->tick_timeout) < 0)
+ r = -1;
+ } else if (bev->read_suspended & BEV_SUSPEND_BW) {
+ if (!(bev->write_suspended & BEV_SUSPEND_BW))
+ event_del(&bev->rate_limiting->refill_bucket_event);
+ bufferevent_unsuspend_read_(&bev->bev, BEV_SUSPEND_BW);
+ }
+ }
+
+ if (bev->rate_limiting->group) {
+ LOCK_GROUP(bev->rate_limiting->group);
+ bev->rate_limiting->group->rate_limit.read_limit -= bytes;
+ bev->rate_limiting->group->total_read += bytes;
+ if (bev->rate_limiting->group->rate_limit.read_limit <= 0) {
+ bev_group_suspend_reading_(bev->rate_limiting->group);
+ } else if (bev->rate_limiting->group->read_suspended) {
+ bev_group_unsuspend_reading_(bev->rate_limiting->group);
+ }
+ UNLOCK_GROUP(bev->rate_limiting->group);
+ }
+
+ return r;
+}
+
+int
+bufferevent_decrement_write_buckets_(struct bufferevent_private *bev, ev_ssize_t bytes)
+{
+ /* XXXXX Make sure all users of this function check its return value */
+ int r = 0;
+ /* need to hold lock */
+ if (!bev->rate_limiting)
+ return 0;
+
+ if (bev->rate_limiting->cfg) {
+ bev->rate_limiting->limit.write_limit -= bytes;
+ if (bev->rate_limiting->limit.write_limit <= 0) {
+ bufferevent_suspend_write_(&bev->bev, BEV_SUSPEND_BW);
+ if (event_add(&bev->rate_limiting->refill_bucket_event,
+ &bev->rate_limiting->cfg->tick_timeout) < 0)
+ r = -1;
+ } else if (bev->write_suspended & BEV_SUSPEND_BW) {
+ if (!(bev->read_suspended & BEV_SUSPEND_BW))
+ event_del(&bev->rate_limiting->refill_bucket_event);
+ bufferevent_unsuspend_write_(&bev->bev, BEV_SUSPEND_BW);
+ }
+ }
+
+ if (bev->rate_limiting->group) {
+ LOCK_GROUP(bev->rate_limiting->group);
+ bev->rate_limiting->group->rate_limit.write_limit -= bytes;
+ bev->rate_limiting->group->total_written += bytes;
+ if (bev->rate_limiting->group->rate_limit.write_limit <= 0) {
+ bev_group_suspend_writing_(bev->rate_limiting->group);
+ } else if (bev->rate_limiting->group->write_suspended) {
+ bev_group_unsuspend_writing_(bev->rate_limiting->group);
+ }
+ UNLOCK_GROUP(bev->rate_limiting->group);
+ }
+
+ return r;
+}
+
+/** Stop reading on every bufferevent in <b>g</b> */
+static int
+bev_group_suspend_reading_(struct bufferevent_rate_limit_group *g)
+{
+ /* Needs group lock */
+ struct bufferevent_private *bev;
+ g->read_suspended = 1;
+ g->pending_unsuspend_read = 0;
+
+ /* Note that in this loop we call EVLOCK_TRY_LOCK_ instead of BEV_LOCK,
+ to prevent a deadlock. (Ordinarily, the group lock nests inside
+ the bufferevent locks. If we are unable to lock any individual
+ bufferevent, it will find out later when it looks at its limit
+ and sees that its group is suspended.)
+ */
+ LIST_FOREACH(bev, &g->members, rate_limiting->next_in_group) {
+ if (EVLOCK_TRY_LOCK_(bev->lock)) {
+ bufferevent_suspend_read_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ EVLOCK_UNLOCK(bev->lock, 0);
+ }
+ }
+ return 0;
+}
+
+/** Stop writing on every bufferevent in <b>g</b> */
+static int
+bev_group_suspend_writing_(struct bufferevent_rate_limit_group *g)
+{
+ /* Needs group lock */
+ struct bufferevent_private *bev;
+ g->write_suspended = 1;
+ g->pending_unsuspend_write = 0;
+ LIST_FOREACH(bev, &g->members, rate_limiting->next_in_group) {
+ if (EVLOCK_TRY_LOCK_(bev->lock)) {
+ bufferevent_suspend_write_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ EVLOCK_UNLOCK(bev->lock, 0);
+ }
+ }
+ return 0;
+}
+
+/** Timer callback invoked on a single bufferevent with one or more exhausted
+ buckets when they are ready to refill. */
+static void
+bev_refill_callback_(evutil_socket_t fd, short what, void *arg)
+{
+ unsigned tick;
+ struct timeval now;
+ struct bufferevent_private *bev = arg;
+ int again = 0;
+ BEV_LOCK(&bev->bev);
+ if (!bev->rate_limiting || !bev->rate_limiting->cfg) {
+ BEV_UNLOCK(&bev->bev);
+ return;
+ }
+
+ /* First, update the bucket */
+ event_base_gettimeofday_cached(bev->bev.ev_base, &now);
+ tick = ev_token_bucket_get_tick_(&now,
+ bev->rate_limiting->cfg);
+ ev_token_bucket_update_(&bev->rate_limiting->limit,
+ bev->rate_limiting->cfg,
+ tick);
+
+ /* Now unsuspend any read/write operations as appropriate. */
+ if ((bev->read_suspended & BEV_SUSPEND_BW)) {
+ if (bev->rate_limiting->limit.read_limit > 0)
+ bufferevent_unsuspend_read_(&bev->bev, BEV_SUSPEND_BW);
+ else
+ again = 1;
+ }
+ if ((bev->write_suspended & BEV_SUSPEND_BW)) {
+ if (bev->rate_limiting->limit.write_limit > 0)
+ bufferevent_unsuspend_write_(&bev->bev, BEV_SUSPEND_BW);
+ else
+ again = 1;
+ }
+ if (again) {
+ /* One or more of the buckets may need another refill if they
+ started negative.
+
+ XXXX if we need to be quiet for more ticks, we should
+ maybe figure out what timeout we really want.
+ */
+ /* XXXX Handle event_add failure somehow */
+ event_add(&bev->rate_limiting->refill_bucket_event,
+ &bev->rate_limiting->cfg->tick_timeout);
+ }
+ BEV_UNLOCK(&bev->bev);
+}
+
+/** Helper: grab a random element from a bufferevent group.
+ *
+ * Requires that we hold the lock on the group.
+ */
+static struct bufferevent_private *
+bev_group_random_element_(struct bufferevent_rate_limit_group *group)
+{
+ int which;
+ struct bufferevent_private *bev;
+
+ /* requires group lock */
+
+ if (!group->n_members)
+ return NULL;
+
+ EVUTIL_ASSERT(! LIST_EMPTY(&group->members));
+
+ which = evutil_weakrand_range_(&group->weakrand_seed, group->n_members);
+
+ bev = LIST_FIRST(&group->members);
+ while (which--)
+ bev = LIST_NEXT(bev, rate_limiting->next_in_group);
+
+ return bev;
+}
+
+/** Iterate over the elements of a rate-limiting group 'g' with a random
+ starting point, assigning each to the variable 'bev', and executing the
+ block 'block'.
+
+ We do this in a half-baked effort to get fairness among group members.
+ XXX Round-robin or some kind of priority queue would be even more fair.
+ */
+#define FOREACH_RANDOM_ORDER(block) \
+ do { \
+ first = bev_group_random_element_(g); \
+ for (bev = first; bev != LIST_END(&g->members); \
+ bev = LIST_NEXT(bev, rate_limiting->next_in_group)) { \
+ block ; \
+ } \
+ for (bev = LIST_FIRST(&g->members); bev && bev != first; \
+ bev = LIST_NEXT(bev, rate_limiting->next_in_group)) { \
+ block ; \
+ } \
+ } while (0)
+
+static void
+bev_group_unsuspend_reading_(struct bufferevent_rate_limit_group *g)
+{
+ int again = 0;
+ struct bufferevent_private *bev, *first;
+
+ g->read_suspended = 0;
+ FOREACH_RANDOM_ORDER({
+ if (EVLOCK_TRY_LOCK_(bev->lock)) {
+ bufferevent_unsuspend_read_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ EVLOCK_UNLOCK(bev->lock, 0);
+ } else {
+ again = 1;
+ }
+ });
+ g->pending_unsuspend_read = again;
+}
+
+static void
+bev_group_unsuspend_writing_(struct bufferevent_rate_limit_group *g)
+{
+ int again = 0;
+ struct bufferevent_private *bev, *first;
+ g->write_suspended = 0;
+
+ FOREACH_RANDOM_ORDER({
+ if (EVLOCK_TRY_LOCK_(bev->lock)) {
+ bufferevent_unsuspend_write_(&bev->bev,
+ BEV_SUSPEND_BW_GROUP);
+ EVLOCK_UNLOCK(bev->lock, 0);
+ } else {
+ again = 1;
+ }
+ });
+ g->pending_unsuspend_write = again;
+}
+
+/** Callback invoked every tick to add more elements to the group bucket
+ and unsuspend group members as needed.
+ */
+static void
+bev_group_refill_callback_(evutil_socket_t fd, short what, void *arg)
+{
+ struct bufferevent_rate_limit_group *g = arg;
+ unsigned tick;
+ struct timeval now;
+
+ event_base_gettimeofday_cached(event_get_base(&g->master_refill_event), &now);
+
+ LOCK_GROUP(g);
+
+ tick = ev_token_bucket_get_tick_(&now, &g->rate_limit_cfg);
+ ev_token_bucket_update_(&g->rate_limit, &g->rate_limit_cfg, tick);
+
+ if (g->pending_unsuspend_read ||
+ (g->read_suspended && (g->rate_limit.read_limit >= g->min_share))) {
+ bev_group_unsuspend_reading_(g);
+ }
+ if (g->pending_unsuspend_write ||
+ (g->write_suspended && (g->rate_limit.write_limit >= g->min_share))){
+ bev_group_unsuspend_writing_(g);
+ }
+
+ /* XXXX Rather than waiting to the next tick to unsuspend stuff
+ * with pending_unsuspend_write/read, we should do it on the
+ * next iteration of the mainloop.
+ */
+
+ UNLOCK_GROUP(g);
+}
+
+int
+bufferevent_set_rate_limit(struct bufferevent *bev,
+ struct ev_token_bucket_cfg *cfg)
+{
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ int r = -1;
+ struct bufferevent_rate_limit *rlim;
+ struct timeval now;
+ ev_uint32_t tick;
+ int reinit = 0, suspended = 0;
+ /* XXX reference-count cfg */
+
+ BEV_LOCK(bev);
+
+ if (cfg == NULL) {
+ if (bevp->rate_limiting) {
+ rlim = bevp->rate_limiting;
+ rlim->cfg = NULL;
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_BW);
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_BW);
+ if (event_initialized(&rlim->refill_bucket_event))
+ event_del(&rlim->refill_bucket_event);
+ }
+ r = 0;
+ goto done;
+ }
+
+ event_base_gettimeofday_cached(bev->ev_base, &now);
+ tick = ev_token_bucket_get_tick_(&now, cfg);
+
+ if (bevp->rate_limiting && bevp->rate_limiting->cfg == cfg) {
+ /* no-op */
+ r = 0;
+ goto done;
+ }
+ if (bevp->rate_limiting == NULL) {
+ rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit));
+ if (!rlim)
+ goto done;
+ bevp->rate_limiting = rlim;
+ } else {
+ rlim = bevp->rate_limiting;
+ }
+ reinit = rlim->cfg != NULL;
+
+ rlim->cfg = cfg;
+ ev_token_bucket_init_(&rlim->limit, cfg, tick, reinit);
+
+ if (reinit) {
+ EVUTIL_ASSERT(event_initialized(&rlim->refill_bucket_event));
+ event_del(&rlim->refill_bucket_event);
+ }
+ event_assign(&rlim->refill_bucket_event, bev->ev_base,
+ -1, EV_FINALIZE, bev_refill_callback_, bevp);
+
+ if (rlim->limit.read_limit > 0) {
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_BW);
+ } else {
+ bufferevent_suspend_read_(bev, BEV_SUSPEND_BW);
+ suspended=1;
+ }
+ if (rlim->limit.write_limit > 0) {
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_BW);
+ } else {
+ bufferevent_suspend_write_(bev, BEV_SUSPEND_BW);
+ suspended = 1;
+ }
+
+ if (suspended)
+ event_add(&rlim->refill_bucket_event, &cfg->tick_timeout);
+
+ r = 0;
+
+done:
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+struct bufferevent_rate_limit_group *
+bufferevent_rate_limit_group_new(struct event_base *base,
+ const struct ev_token_bucket_cfg *cfg)
+{
+ struct bufferevent_rate_limit_group *g;
+ struct timeval now;
+ ev_uint32_t tick;
+
+ event_base_gettimeofday_cached(base, &now);
+ tick = ev_token_bucket_get_tick_(&now, cfg);
+
+ g = mm_calloc(1, sizeof(struct bufferevent_rate_limit_group));
+ if (!g)
+ return NULL;
+ memcpy(&g->rate_limit_cfg, cfg, sizeof(g->rate_limit_cfg));
+ LIST_INIT(&g->members);
+
+ ev_token_bucket_init_(&g->rate_limit, cfg, tick, 0);
+
+ event_assign(&g->master_refill_event, base, -1, EV_PERSIST|EV_FINALIZE,
+ bev_group_refill_callback_, g);
+ /*XXXX handle event_add failure */
+ event_add(&g->master_refill_event, &cfg->tick_timeout);
+
+ EVTHREAD_ALLOC_LOCK(g->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+
+ bufferevent_rate_limit_group_set_min_share(g, 64);
+
+ evutil_weakrand_seed_(&g->weakrand_seed,
+ (ev_uint32_t) ((now.tv_sec + now.tv_usec) + (ev_intptr_t)g));
+
+ return g;
+}
+
+int
+bufferevent_rate_limit_group_set_cfg(
+ struct bufferevent_rate_limit_group *g,
+ const struct ev_token_bucket_cfg *cfg)
+{
+ int same_tick;
+ if (!g || !cfg)
+ return -1;
+
+ LOCK_GROUP(g);
+ same_tick = evutil_timercmp(
+ &g->rate_limit_cfg.tick_timeout, &cfg->tick_timeout, ==);
+ memcpy(&g->rate_limit_cfg, cfg, sizeof(g->rate_limit_cfg));
+
+ if (g->rate_limit.read_limit > (ev_ssize_t)cfg->read_maximum)
+ g->rate_limit.read_limit = cfg->read_maximum;
+ if (g->rate_limit.write_limit > (ev_ssize_t)cfg->write_maximum)
+ g->rate_limit.write_limit = cfg->write_maximum;
+
+ if (!same_tick) {
+ /* This can cause a hiccup in the schedule */
+ event_add(&g->master_refill_event, &cfg->tick_timeout);
+ }
+
+ /* The new limits might force us to adjust min_share differently. */
+ bufferevent_rate_limit_group_set_min_share(g, g->configured_min_share);
+
+ UNLOCK_GROUP(g);
+ return 0;
+}
+
+int
+bufferevent_rate_limit_group_set_min_share(
+ struct bufferevent_rate_limit_group *g,
+ size_t share)
+{
+ if (share > EV_SSIZE_MAX)
+ return -1;
+
+ g->configured_min_share = share;
+
+ /* Can't set share to less than the one-tick maximum. IOW, at steady
+ * state, at least one connection can go per tick. */
+ if (share > g->rate_limit_cfg.read_rate)
+ share = g->rate_limit_cfg.read_rate;
+ if (share > g->rate_limit_cfg.write_rate)
+ share = g->rate_limit_cfg.write_rate;
+
+ g->min_share = share;
+ return 0;
+}
+
+void
+bufferevent_rate_limit_group_free(struct bufferevent_rate_limit_group *g)
+{
+ LOCK_GROUP(g);
+ EVUTIL_ASSERT(0 == g->n_members);
+ event_del(&g->master_refill_event);
+ UNLOCK_GROUP(g);
+ EVTHREAD_FREE_LOCK(g->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ mm_free(g);
+}
+
+int
+bufferevent_add_to_rate_limit_group(struct bufferevent *bev,
+ struct bufferevent_rate_limit_group *g)
+{
+ int wsuspend, rsuspend;
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ BEV_LOCK(bev);
+
+ if (!bevp->rate_limiting) {
+ struct bufferevent_rate_limit *rlim;
+ rlim = mm_calloc(1, sizeof(struct bufferevent_rate_limit));
+ if (!rlim) {
+ BEV_UNLOCK(bev);
+ return -1;
+ }
+ event_assign(&rlim->refill_bucket_event, bev->ev_base,
+ -1, EV_FINALIZE, bev_refill_callback_, bevp);
+ bevp->rate_limiting = rlim;
+ }
+
+ if (bevp->rate_limiting->group == g) {
+ BEV_UNLOCK(bev);
+ return 0;
+ }
+ if (bevp->rate_limiting->group)
+ bufferevent_remove_from_rate_limit_group(bev);
+
+ LOCK_GROUP(g);
+ bevp->rate_limiting->group = g;
+ ++g->n_members;
+ LIST_INSERT_HEAD(&g->members, bevp, rate_limiting->next_in_group);
+
+ rsuspend = g->read_suspended;
+ wsuspend = g->write_suspended;
+
+ UNLOCK_GROUP(g);
+
+ if (rsuspend)
+ bufferevent_suspend_read_(bev, BEV_SUSPEND_BW_GROUP);
+ if (wsuspend)
+ bufferevent_suspend_write_(bev, BEV_SUSPEND_BW_GROUP);
+
+ BEV_UNLOCK(bev);
+ return 0;
+}
+
+int
+bufferevent_remove_from_rate_limit_group(struct bufferevent *bev)
+{
+ return bufferevent_remove_from_rate_limit_group_internal_(bev, 1);
+}
+
+int
+bufferevent_remove_from_rate_limit_group_internal_(struct bufferevent *bev,
+ int unsuspend)
+{
+ struct bufferevent_private *bevp =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ BEV_LOCK(bev);
+ if (bevp->rate_limiting && bevp->rate_limiting->group) {
+ struct bufferevent_rate_limit_group *g =
+ bevp->rate_limiting->group;
+ LOCK_GROUP(g);
+ bevp->rate_limiting->group = NULL;
+ --g->n_members;
+ LIST_REMOVE(bevp, rate_limiting->next_in_group);
+ UNLOCK_GROUP(g);
+ }
+ if (unsuspend) {
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_BW_GROUP);
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_BW_GROUP);
+ }
+ BEV_UNLOCK(bev);
+ return 0;
+}
+
+/* ===
+ * API functions to expose rate limits.
+ *
+ * Don't use these from inside Libevent; they're meant to be for use by
+ * the program.
+ * === */
+
+/* Mostly you don't want to use this function from inside libevent;
+ * bufferevent_get_read_max_() is more likely what you want*/
+ev_ssize_t
+bufferevent_get_read_limit(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ if (bevp->rate_limiting && bevp->rate_limiting->cfg) {
+ bufferevent_update_buckets(bevp);
+ r = bevp->rate_limiting->limit.read_limit;
+ } else {
+ r = EV_SSIZE_MAX;
+ }
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+/* Mostly you don't want to use this function from inside libevent;
+ * bufferevent_get_write_max_() is more likely what you want*/
+ev_ssize_t
+bufferevent_get_write_limit(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ if (bevp->rate_limiting && bevp->rate_limiting->cfg) {
+ bufferevent_update_buckets(bevp);
+ r = bevp->rate_limiting->limit.write_limit;
+ } else {
+ r = EV_SSIZE_MAX;
+ }
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+int
+bufferevent_set_max_single_read(struct bufferevent *bev, size_t size)
+{
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ if (size == 0 || size > EV_SSIZE_MAX)
+ bevp->max_single_read = MAX_SINGLE_READ_DEFAULT;
+ else
+ bevp->max_single_read = size;
+ BEV_UNLOCK(bev);
+ return 0;
+}
+
+int
+bufferevent_set_max_single_write(struct bufferevent *bev, size_t size)
+{
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ if (size == 0 || size > EV_SSIZE_MAX)
+ bevp->max_single_write = MAX_SINGLE_WRITE_DEFAULT;
+ else
+ bevp->max_single_write = size;
+ BEV_UNLOCK(bev);
+ return 0;
+}
+
+ev_ssize_t
+bufferevent_get_max_single_read(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+
+ BEV_LOCK(bev);
+ r = BEV_UPCAST(bev)->max_single_read;
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+ev_ssize_t
+bufferevent_get_max_single_write(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+
+ BEV_LOCK(bev);
+ r = BEV_UPCAST(bev)->max_single_write;
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+ev_ssize_t
+bufferevent_get_max_to_read(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+ BEV_LOCK(bev);
+ r = bufferevent_get_read_max_(BEV_UPCAST(bev));
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+ev_ssize_t
+bufferevent_get_max_to_write(struct bufferevent *bev)
+{
+ ev_ssize_t r;
+ BEV_LOCK(bev);
+ r = bufferevent_get_write_max_(BEV_UPCAST(bev));
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+const struct ev_token_bucket_cfg *
+bufferevent_get_token_bucket_cfg(const struct bufferevent *bev) {
+ struct bufferevent_private *bufev_private = BEV_UPCAST(bev);
+ struct ev_token_bucket_cfg *cfg;
+
+ BEV_LOCK(bev);
+
+ if (bufev_private->rate_limiting) {
+ cfg = bufev_private->rate_limiting->cfg;
+ } else {
+ cfg = NULL;
+ }
+
+ BEV_UNLOCK(bev);
+
+ return cfg;
+}
+
+/* Mostly you don't want to use this function from inside libevent;
+ * bufferevent_get_read_max_() is more likely what you want*/
+ev_ssize_t
+bufferevent_rate_limit_group_get_read_limit(
+ struct bufferevent_rate_limit_group *grp)
+{
+ ev_ssize_t r;
+ LOCK_GROUP(grp);
+ r = grp->rate_limit.read_limit;
+ UNLOCK_GROUP(grp);
+ return r;
+}
+
+/* Mostly you don't want to use this function from inside libevent;
+ * bufferevent_get_write_max_() is more likely what you want. */
+ev_ssize_t
+bufferevent_rate_limit_group_get_write_limit(
+ struct bufferevent_rate_limit_group *grp)
+{
+ ev_ssize_t r;
+ LOCK_GROUP(grp);
+ r = grp->rate_limit.write_limit;
+ UNLOCK_GROUP(grp);
+ return r;
+}
+
+int
+bufferevent_decrement_read_limit(struct bufferevent *bev, ev_ssize_t decr)
+{
+ int r = 0;
+ ev_ssize_t old_limit, new_limit;
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ EVUTIL_ASSERT(bevp->rate_limiting && bevp->rate_limiting->cfg);
+ old_limit = bevp->rate_limiting->limit.read_limit;
+
+ new_limit = (bevp->rate_limiting->limit.read_limit -= decr);
+ if (old_limit > 0 && new_limit <= 0) {
+ bufferevent_suspend_read_(bev, BEV_SUSPEND_BW);
+ if (event_add(&bevp->rate_limiting->refill_bucket_event,
+ &bevp->rate_limiting->cfg->tick_timeout) < 0)
+ r = -1;
+ } else if (old_limit <= 0 && new_limit > 0) {
+ if (!(bevp->write_suspended & BEV_SUSPEND_BW))
+ event_del(&bevp->rate_limiting->refill_bucket_event);
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_BW);
+ }
+
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+int
+bufferevent_decrement_write_limit(struct bufferevent *bev, ev_ssize_t decr)
+{
+ /* XXXX this is mostly copy-and-paste from
+ * bufferevent_decrement_read_limit */
+ int r = 0;
+ ev_ssize_t old_limit, new_limit;
+ struct bufferevent_private *bevp;
+ BEV_LOCK(bev);
+ bevp = BEV_UPCAST(bev);
+ EVUTIL_ASSERT(bevp->rate_limiting && bevp->rate_limiting->cfg);
+ old_limit = bevp->rate_limiting->limit.write_limit;
+
+ new_limit = (bevp->rate_limiting->limit.write_limit -= decr);
+ if (old_limit > 0 && new_limit <= 0) {
+ bufferevent_suspend_write_(bev, BEV_SUSPEND_BW);
+ if (event_add(&bevp->rate_limiting->refill_bucket_event,
+ &bevp->rate_limiting->cfg->tick_timeout) < 0)
+ r = -1;
+ } else if (old_limit <= 0 && new_limit > 0) {
+ if (!(bevp->read_suspended & BEV_SUSPEND_BW))
+ event_del(&bevp->rate_limiting->refill_bucket_event);
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_BW);
+ }
+
+ BEV_UNLOCK(bev);
+ return r;
+}
+
+int
+bufferevent_rate_limit_group_decrement_read(
+ struct bufferevent_rate_limit_group *grp, ev_ssize_t decr)
+{
+ int r = 0;
+ ev_ssize_t old_limit, new_limit;
+ LOCK_GROUP(grp);
+ old_limit = grp->rate_limit.read_limit;
+ new_limit = (grp->rate_limit.read_limit -= decr);
+
+ if (old_limit > 0 && new_limit <= 0) {
+ bev_group_suspend_reading_(grp);
+ } else if (old_limit <= 0 && new_limit > 0) {
+ bev_group_unsuspend_reading_(grp);
+ }
+
+ UNLOCK_GROUP(grp);
+ return r;
+}
+
+int
+bufferevent_rate_limit_group_decrement_write(
+ struct bufferevent_rate_limit_group *grp, ev_ssize_t decr)
+{
+ int r = 0;
+ ev_ssize_t old_limit, new_limit;
+ LOCK_GROUP(grp);
+ old_limit = grp->rate_limit.write_limit;
+ new_limit = (grp->rate_limit.write_limit -= decr);
+
+ if (old_limit > 0 && new_limit <= 0) {
+ bev_group_suspend_writing_(grp);
+ } else if (old_limit <= 0 && new_limit > 0) {
+ bev_group_unsuspend_writing_(grp);
+ }
+
+ UNLOCK_GROUP(grp);
+ return r;
+}
+
+void
+bufferevent_rate_limit_group_get_totals(struct bufferevent_rate_limit_group *grp,
+ ev_uint64_t *total_read_out, ev_uint64_t *total_written_out)
+{
+ EVUTIL_ASSERT(grp != NULL);
+ if (total_read_out)
+ *total_read_out = grp->total_read;
+ if (total_written_out)
+ *total_written_out = grp->total_written;
+}
+
+void
+bufferevent_rate_limit_group_reset_totals(struct bufferevent_rate_limit_group *grp)
+{
+ grp->total_read = grp->total_written = 0;
+}
+
+int
+bufferevent_ratelim_init_(struct bufferevent_private *bev)
+{
+ bev->rate_limiting = NULL;
+ bev->max_single_read = MAX_SINGLE_READ_DEFAULT;
+ bev->max_single_write = MAX_SINGLE_WRITE_DEFAULT;
+
+ return 0;
+}
diff --git a/sntp/libevent/bufferevent_sock.c b/sntp/libevent/bufferevent_sock.c
new file mode 100644
index 000000000000..49ebc0bef8ff
--- /dev/null
+++ b/sntp/libevent/bufferevent_sock.c
@@ -0,0 +1,709 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ * Copyright (c) 2002-2006 Niels Provos <provos@citi.umich.edu>
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+
+#include "event2/util.h"
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/bufferevent_compat.h"
+#include "event2/event.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+#include "util-internal.h"
+#ifdef _WIN32
+#include "iocp-internal.h"
+#endif
+
+/* prototypes */
+static int be_socket_enable(struct bufferevent *, short);
+static int be_socket_disable(struct bufferevent *, short);
+static void be_socket_destruct(struct bufferevent *);
+static int be_socket_adj_timeouts(struct bufferevent *);
+static int be_socket_flush(struct bufferevent *, short, enum bufferevent_flush_mode);
+static int be_socket_ctrl(struct bufferevent *, enum bufferevent_ctrl_op, union bufferevent_ctrl_data *);
+
+static void be_socket_setfd(struct bufferevent *, evutil_socket_t);
+
+const struct bufferevent_ops bufferevent_ops_socket = {
+ "socket",
+ evutil_offsetof(struct bufferevent_private, bev),
+ be_socket_enable,
+ be_socket_disable,
+ NULL, /* unlink */
+ be_socket_destruct,
+ be_socket_adj_timeouts,
+ be_socket_flush,
+ be_socket_ctrl,
+};
+
+#define be_socket_add(ev, t) \
+ bufferevent_add_event_((ev), (t))
+
+static void
+bufferevent_socket_outbuf_cb(struct evbuffer *buf,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+ struct bufferevent *bufev = arg;
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ if (cbinfo->n_added &&
+ (bufev->enabled & EV_WRITE) &&
+ !event_pending(&bufev->ev_write, EV_WRITE, NULL) &&
+ !bufev_p->write_suspended) {
+ /* Somebody added data to the buffer, and we would like to
+ * write, and we were not writing. So, start writing. */
+ if (be_socket_add(&bufev->ev_write, &bufev->timeout_write) == -1) {
+ /* Should we log this? */
+ }
+ }
+}
+
+static void
+bufferevent_readcb(evutil_socket_t fd, short event, void *arg)
+{
+ struct bufferevent *bufev = arg;
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ struct evbuffer *input;
+ int res = 0;
+ short what = BEV_EVENT_READING;
+ ev_ssize_t howmuch = -1, readmax=-1;
+
+ bufferevent_incref_and_lock_(bufev);
+
+ if (event == EV_TIMEOUT) {
+ /* Note that we only check for event==EV_TIMEOUT. If
+ * event==EV_TIMEOUT|EV_READ, we can safely ignore the
+ * timeout, since a read has occurred */
+ what |= BEV_EVENT_TIMEOUT;
+ goto error;
+ }
+
+ input = bufev->input;
+
+ /*
+ * If we have a high watermark configured then we don't want to
+ * read more data than would make us reach the watermark.
+ */
+ if (bufev->wm_read.high != 0) {
+ howmuch = bufev->wm_read.high - evbuffer_get_length(input);
+ /* we somehow lowered the watermark, stop reading */
+ if (howmuch <= 0) {
+ bufferevent_wm_suspend_read(bufev);
+ goto done;
+ }
+ }
+ readmax = bufferevent_get_read_max_(bufev_p);
+ if (howmuch < 0 || howmuch > readmax) /* The use of -1 for "unlimited"
+ * uglifies this code. XXXX */
+ howmuch = readmax;
+ if (bufev_p->read_suspended)
+ goto done;
+
+ evbuffer_unfreeze(input, 0);
+ res = evbuffer_read(input, fd, (int)howmuch); /* XXXX evbuffer_read would do better to take and return ev_ssize_t */
+ evbuffer_freeze(input, 0);
+
+ if (res == -1) {
+ int err = evutil_socket_geterror(fd);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ goto reschedule;
+ /* error case */
+ what |= BEV_EVENT_ERROR;
+ } else if (res == 0) {
+ /* eof case */
+ what |= BEV_EVENT_EOF;
+ }
+
+ if (res <= 0)
+ goto error;
+
+ bufferevent_decrement_read_buckets_(bufev_p, res);
+
+ /* Invoke the user callback - must always be called last */
+ bufferevent_trigger_nolock_(bufev, EV_READ, 0);
+
+ goto done;
+
+ reschedule:
+ goto done;
+
+ error:
+ bufferevent_disable(bufev, EV_READ);
+ bufferevent_run_eventcb_(bufev, what, 0);
+
+ done:
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+static void
+bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
+{
+ struct bufferevent *bufev = arg;
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ int res = 0;
+ short what = BEV_EVENT_WRITING;
+ int connected = 0;
+ ev_ssize_t atmost = -1;
+
+ bufferevent_incref_and_lock_(bufev);
+
+ if (event == EV_TIMEOUT) {
+ /* Note that we only check for event==EV_TIMEOUT. If
+ * event==EV_TIMEOUT|EV_WRITE, we can safely ignore the
+ * timeout, since a read has occurred */
+ what |= BEV_EVENT_TIMEOUT;
+ goto error;
+ }
+ if (bufev_p->connecting) {
+ int c = evutil_socket_finished_connecting_(fd);
+ /* we need to fake the error if the connection was refused
+ * immediately - usually connection to localhost on BSD */
+ if (bufev_p->connection_refused) {
+ bufev_p->connection_refused = 0;
+ c = -1;
+ }
+
+ if (c == 0)
+ goto done;
+
+ bufev_p->connecting = 0;
+ if (c < 0) {
+ event_del(&bufev->ev_write);
+ event_del(&bufev->ev_read);
+ bufferevent_run_eventcb_(bufev, BEV_EVENT_ERROR, 0);
+ goto done;
+ } else {
+ connected = 1;
+#ifdef _WIN32
+ if (BEV_IS_ASYNC(bufev)) {
+ event_del(&bufev->ev_write);
+ bufferevent_async_set_connected_(bufev);
+ bufferevent_run_eventcb_(bufev,
+ BEV_EVENT_CONNECTED, 0);
+ goto done;
+ }
+#endif
+ bufferevent_run_eventcb_(bufev,
+ BEV_EVENT_CONNECTED, 0);
+ if (!(bufev->enabled & EV_WRITE) ||
+ bufev_p->write_suspended) {
+ event_del(&bufev->ev_write);
+ goto done;
+ }
+ }
+ }
+
+ atmost = bufferevent_get_write_max_(bufev_p);
+
+ if (bufev_p->write_suspended)
+ goto done;
+
+ if (evbuffer_get_length(bufev->output)) {
+ evbuffer_unfreeze(bufev->output, 1);
+ res = evbuffer_write_atmost(bufev->output, fd, atmost);
+ evbuffer_freeze(bufev->output, 1);
+ if (res == -1) {
+ int err = evutil_socket_geterror(fd);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ goto reschedule;
+ what |= BEV_EVENT_ERROR;
+ } else if (res == 0) {
+ /* eof case
+ XXXX Actually, a 0 on write doesn't indicate
+ an EOF. An ECONNRESET might be more typical.
+ */
+ what |= BEV_EVENT_EOF;
+ }
+ if (res <= 0)
+ goto error;
+
+ bufferevent_decrement_write_buckets_(bufev_p, res);
+ }
+
+ if (evbuffer_get_length(bufev->output) == 0) {
+ event_del(&bufev->ev_write);
+ }
+
+ /*
+ * Invoke the user callback if our buffer is drained or below the
+ * low watermark.
+ */
+ if (res || !connected) {
+ bufferevent_trigger_nolock_(bufev, EV_WRITE, 0);
+ }
+
+ goto done;
+
+ reschedule:
+ if (evbuffer_get_length(bufev->output) == 0) {
+ event_del(&bufev->ev_write);
+ }
+ goto done;
+
+ error:
+ bufferevent_disable(bufev, EV_WRITE);
+ bufferevent_run_eventcb_(bufev, what, 0);
+
+ done:
+ bufferevent_decref_and_unlock_(bufev);
+}
+
+struct bufferevent *
+bufferevent_socket_new(struct event_base *base, evutil_socket_t fd,
+ int options)
+{
+ struct bufferevent_private *bufev_p;
+ struct bufferevent *bufev;
+
+#ifdef _WIN32
+ if (base && event_base_get_iocp_(base))
+ return bufferevent_async_new_(base, fd, options);
+#endif
+
+ if ((bufev_p = mm_calloc(1, sizeof(struct bufferevent_private)))== NULL)
+ return NULL;
+
+ if (bufferevent_init_common_(bufev_p, base, &bufferevent_ops_socket,
+ options) < 0) {
+ mm_free(bufev_p);
+ return NULL;
+ }
+ bufev = &bufev_p->bev;
+ evbuffer_set_flags(bufev->output, EVBUFFER_FLAG_DRAINS_TO_FD);
+
+ event_assign(&bufev->ev_read, bufev->ev_base, fd,
+ EV_READ|EV_PERSIST|EV_FINALIZE, bufferevent_readcb, bufev);
+ event_assign(&bufev->ev_write, bufev->ev_base, fd,
+ EV_WRITE|EV_PERSIST|EV_FINALIZE, bufferevent_writecb, bufev);
+
+ evbuffer_add_cb(bufev->output, bufferevent_socket_outbuf_cb, bufev);
+
+ evbuffer_freeze(bufev->input, 0);
+ evbuffer_freeze(bufev->output, 1);
+
+ return bufev;
+}
+
+int
+bufferevent_socket_connect(struct bufferevent *bev,
+ struct sockaddr *sa, int socklen)
+{
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+
+ evutil_socket_t fd;
+ int r = 0;
+ int result=-1;
+ int ownfd = 0;
+
+ bufferevent_incref_and_lock_(bev);
+
+ if (!bufev_p)
+ goto done;
+
+ fd = bufferevent_getfd(bev);
+ if (fd < 0) {
+ if (!sa)
+ goto done;
+ fd = evutil_socket_(sa->sa_family,
+ SOCK_STREAM|EVUTIL_SOCK_NONBLOCK, 0);
+ if (fd < 0)
+ goto done;
+ ownfd = 1;
+ }
+ if (sa) {
+#ifdef _WIN32
+ if (bufferevent_async_can_connect_(bev)) {
+ bufferevent_setfd(bev, fd);
+ r = bufferevent_async_connect_(bev, fd, sa, socklen);
+ if (r < 0)
+ goto freesock;
+ bufev_p->connecting = 1;
+ result = 0;
+ goto done;
+ } else
+#endif
+ r = evutil_socket_connect_(&fd, sa, socklen);
+ if (r < 0)
+ goto freesock;
+ }
+#ifdef _WIN32
+ /* ConnectEx() isn't always around, even when IOCP is enabled.
+ * Here, we borrow the socket object's write handler to fall back
+ * on a non-blocking connect() when ConnectEx() is unavailable. */
+ if (BEV_IS_ASYNC(bev)) {
+ event_assign(&bev->ev_write, bev->ev_base, fd,
+ EV_WRITE|EV_PERSIST|EV_FINALIZE, bufferevent_writecb, bev);
+ }
+#endif
+ bufferevent_setfd(bev, fd);
+ if (r == 0) {
+ if (! be_socket_enable(bev, EV_WRITE)) {
+ bufev_p->connecting = 1;
+ result = 0;
+ goto done;
+ }
+ } else if (r == 1) {
+ /* The connect succeeded already. How very BSD of it. */
+ result = 0;
+ bufev_p->connecting = 1;
+ event_active(&bev->ev_write, EV_WRITE, 1);
+ } else {
+ /* The connect failed already. How very BSD of it. */
+ bufev_p->connection_refused = 1;
+ bufev_p->connecting = 1;
+ result = 0;
+ event_active(&bev->ev_write, EV_WRITE, 1);
+ }
+
+ goto done;
+
+freesock:
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ if (ownfd)
+ evutil_closesocket(fd);
+ /* do something about the error? */
+done:
+ bufferevent_decref_and_unlock_(bev);
+ return result;
+}
+
+static void
+bufferevent_connect_getaddrinfo_cb(int result, struct evutil_addrinfo *ai,
+ void *arg)
+{
+ struct bufferevent *bev = arg;
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+ int r;
+ BEV_LOCK(bev);
+
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_LOOKUP);
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_LOOKUP);
+
+ if (result != 0) {
+ bev_p->dns_error = result;
+ bufferevent_run_eventcb_(bev, BEV_EVENT_ERROR, 0);
+ bufferevent_decref_and_unlock_(bev);
+ if (ai)
+ evutil_freeaddrinfo(ai);
+ return;
+ }
+
+ /* XXX use the other addrinfos? */
+ /* XXX use this return value */
+ r = bufferevent_socket_connect(bev, ai->ai_addr, (int)ai->ai_addrlen);
+ (void)r;
+ bufferevent_decref_and_unlock_(bev);
+ evutil_freeaddrinfo(ai);
+}
+
+int
+bufferevent_socket_connect_hostname(struct bufferevent *bev,
+ struct evdns_base *evdns_base, int family, const char *hostname, int port)
+{
+ char portbuf[10];
+ struct evutil_addrinfo hint;
+ int err;
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+
+ if (family != AF_INET && family != AF_INET6 && family != AF_UNSPEC)
+ return -1;
+ if (port < 1 || port > 65535)
+ return -1;
+
+ BEV_LOCK(bev);
+ bev_p->dns_error = 0;
+ BEV_UNLOCK(bev);
+
+ evutil_snprintf(portbuf, sizeof(portbuf), "%d", port);
+
+ memset(&hint, 0, sizeof(hint));
+ hint.ai_family = family;
+ hint.ai_protocol = IPPROTO_TCP;
+ hint.ai_socktype = SOCK_STREAM;
+
+ bufferevent_suspend_write_(bev, BEV_SUSPEND_LOOKUP);
+ bufferevent_suspend_read_(bev, BEV_SUSPEND_LOOKUP);
+
+ bufferevent_incref_(bev);
+ err = evutil_getaddrinfo_async_(evdns_base, hostname, portbuf,
+ &hint, bufferevent_connect_getaddrinfo_cb, bev);
+
+ if (err == 0) {
+ return 0;
+ } else {
+ bufferevent_unsuspend_write_(bev, BEV_SUSPEND_LOOKUP);
+ bufferevent_unsuspend_read_(bev, BEV_SUSPEND_LOOKUP);
+ bufferevent_decref_(bev);
+ return -1;
+ }
+}
+
+int
+bufferevent_socket_get_dns_error(struct bufferevent *bev)
+{
+ int rv;
+ struct bufferevent_private *bev_p =
+ EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bev);
+ rv = bev_p->dns_error;
+ BEV_UNLOCK(bev);
+
+ return rv;
+}
+
+/*
+ * Create a new buffered event object.
+ *
+ * The read callback is invoked whenever we read new data.
+ * The write callback is invoked whenever the output buffer is drained.
+ * The error callback is invoked on a write/read error or on EOF.
+ *
+ * Both read and write callbacks maybe NULL. The error callback is not
+ * allowed to be NULL and have to be provided always.
+ */
+
+struct bufferevent *
+bufferevent_new(evutil_socket_t fd,
+ bufferevent_data_cb readcb, bufferevent_data_cb writecb,
+ bufferevent_event_cb eventcb, void *cbarg)
+{
+ struct bufferevent *bufev;
+
+ if (!(bufev = bufferevent_socket_new(NULL, fd, 0)))
+ return NULL;
+
+ bufferevent_setcb(bufev, readcb, writecb, eventcb, cbarg);
+
+ return bufev;
+}
+
+
+static int
+be_socket_enable(struct bufferevent *bufev, short event)
+{
+ if (event & EV_READ) {
+ if (be_socket_add(&bufev->ev_read,&bufev->timeout_read) == -1)
+ return -1;
+ }
+ if (event & EV_WRITE) {
+ if (be_socket_add(&bufev->ev_write,&bufev->timeout_write) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+static int
+be_socket_disable(struct bufferevent *bufev, short event)
+{
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ if (event & EV_READ) {
+ if (event_del(&bufev->ev_read) == -1)
+ return -1;
+ }
+ /* Don't actually disable the write if we are trying to connect. */
+ if ((event & EV_WRITE) && ! bufev_p->connecting) {
+ if (event_del(&bufev->ev_write) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+static void
+be_socket_destruct(struct bufferevent *bufev)
+{
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+ evutil_socket_t fd;
+ EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
+
+ fd = event_get_fd(&bufev->ev_read);
+
+ if ((bufev_p->options & BEV_OPT_CLOSE_ON_FREE) && fd >= 0)
+ EVUTIL_CLOSESOCKET(fd);
+}
+
+static int
+be_socket_adj_timeouts(struct bufferevent *bufev)
+{
+ int r = 0;
+ if (event_pending(&bufev->ev_read, EV_READ, NULL)) {
+ if (evutil_timerisset(&bufev->timeout_read)) {
+ if (be_socket_add(&bufev->ev_read, &bufev->timeout_read) < 0)
+ r = -1;
+ } else {
+ event_remove_timer(&bufev->ev_read);
+ }
+ }
+ if (event_pending(&bufev->ev_write, EV_WRITE, NULL)) {
+ if (evutil_timerisset(&bufev->timeout_write)) {
+ if (be_socket_add(&bufev->ev_write, &bufev->timeout_write) < 0)
+ r = -1;
+ } else {
+ event_remove_timer(&bufev->ev_write);
+ }
+ }
+ return r;
+}
+
+static int
+be_socket_flush(struct bufferevent *bev, short iotype,
+ enum bufferevent_flush_mode mode)
+{
+ return 0;
+}
+
+
+static void
+be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
+{
+ BEV_LOCK(bufev);
+ EVUTIL_ASSERT(bufev->be_ops == &bufferevent_ops_socket);
+
+ event_del(&bufev->ev_read);
+ event_del(&bufev->ev_write);
+
+ event_assign(&bufev->ev_read, bufev->ev_base, fd,
+ EV_READ|EV_PERSIST|EV_FINALIZE, bufferevent_readcb, bufev);
+ event_assign(&bufev->ev_write, bufev->ev_base, fd,
+ EV_WRITE|EV_PERSIST|EV_FINALIZE, bufferevent_writecb, bufev);
+
+ if (fd >= 0)
+ bufferevent_enable(bufev, bufev->enabled);
+
+ BEV_UNLOCK(bufev);
+}
+
+/* XXXX Should non-socket bufferevents support this? */
+int
+bufferevent_priority_set(struct bufferevent *bufev, int priority)
+{
+ int r = -1;
+ struct bufferevent_private *bufev_p =
+ EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
+
+ BEV_LOCK(bufev);
+ if (bufev->be_ops != &bufferevent_ops_socket)
+ goto done;
+
+ if (event_priority_set(&bufev->ev_read, priority) == -1)
+ goto done;
+ if (event_priority_set(&bufev->ev_write, priority) == -1)
+ goto done;
+
+ event_deferred_cb_set_priority_(&bufev_p->deferred, priority);
+
+ r = 0;
+done:
+ BEV_UNLOCK(bufev);
+ return r;
+}
+
+/* XXXX Should non-socket bufferevents support this? */
+int
+bufferevent_base_set(struct event_base *base, struct bufferevent *bufev)
+{
+ int res = -1;
+
+ BEV_LOCK(bufev);
+ if (bufev->be_ops != &bufferevent_ops_socket)
+ goto done;
+
+ bufev->ev_base = base;
+
+ res = event_base_set(base, &bufev->ev_read);
+ if (res == -1)
+ goto done;
+
+ res = event_base_set(base, &bufev->ev_write);
+done:
+ BEV_UNLOCK(bufev);
+ return res;
+}
+
+static int
+be_socket_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
+ union bufferevent_ctrl_data *data)
+{
+ switch (op) {
+ case BEV_CTRL_SET_FD:
+ be_socket_setfd(bev, data->fd);
+ return 0;
+ case BEV_CTRL_GET_FD:
+ data->fd = event_get_fd(&bev->ev_read);
+ return 0;
+ case BEV_CTRL_GET_UNDERLYING:
+ case BEV_CTRL_CANCEL_ALL:
+ default:
+ return -1;
+ }
+}
diff --git a/sntp/libevent/build-aux/compile b/sntp/libevent/build-aux/compile
new file mode 100755
index 000000000000..c0096a7b5632
--- /dev/null
+++ b/sntp/libevent/build-aux/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ 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 "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; 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.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/sntp/libevent/build-aux/config.guess b/sntp/libevent/build-aux/config.guess
new file mode 100755
index 000000000000..b02565c7b2fc
--- /dev/null
+++ b/sntp/libevent/build-aux/config.guess
@@ -0,0 +1,1517 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a 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.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # 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 "$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 ; set_cc_for_build= ;'
+
+# 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 ;;
+ sh5el) machine=sh5le-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 -q __ELF__
+ 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 ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # 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 Pn.n version is a patched version.
+ # 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/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ 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 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ 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 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ 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 ;;
+ 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 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ 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 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # 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 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ 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 &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ 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 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ 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 ;;
+ *: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
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ 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 ;;
+ *:AIX:*:[4567])
+ 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 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 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
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 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 && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ 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 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ 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 ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ 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 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ 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 -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #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; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ 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 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ 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 ;;
+ 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 ;;
+ 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 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ 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 ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ 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 ;;
+ 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 ;;
+ 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 i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ 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 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*: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 | S7501*:*: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; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ 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; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *: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 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ 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 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *: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 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *: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 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+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\n"); 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 && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# 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 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ 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
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+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/sntp/libevent/build-aux/config.sub b/sntp/libevent/build-aux/config.sub
new file mode 100755
index 000000000000..f9fcdc8796e4
--- /dev/null
+++ b/sntp/libevent/build-aux/config.sub
@@ -0,0 +1,1756 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+timestamp='2011-06-03'
+
+# 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., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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 GNU 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.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # 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 ;;
+
+ * )
+ 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* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-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 | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -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
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -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/'`
+ ;;
+ -sco5v6*)
+ # 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] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # 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-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # 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
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ 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
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ 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
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ 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
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ 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
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ 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
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ 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
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ 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
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ 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
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ 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 | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ 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
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ 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
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ 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
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ 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
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ 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
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-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
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ 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
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ 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.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -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* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -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* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # 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* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -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
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -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
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -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
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -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
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ 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
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ 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
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-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
+ ;;
+ -cnk*|-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
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -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
+
+# 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/sntp/libevent/build-aux/depcomp b/sntp/libevent/build-aux/depcomp
new file mode 100755
index 000000000000..df8eea7e4ce8
--- /dev/null
+++ b/sntp/libevent/build-aux/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+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
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+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
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+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.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ 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. In older versions, 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.
+ # Version 6 uses the directory in both cases.
+ 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$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ 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$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+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
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space 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 preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--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 "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ 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.
+ -arch)
+ eat=yes ;;
+ -*|$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 preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [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 preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # 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
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/sntp/libevent/build-aux/install-sh b/sntp/libevent/build-aux/install-sh
new file mode 100755
index 000000000000..6781b987bdbc
--- /dev/null
+++ b/sntp/libevent/build-aux/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# 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.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$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 $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # 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.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/sntp/libevent/build-aux/ltmain.sh b/sntp/libevent/build-aux/ltmain.sh
new file mode 100755
index 000000000000..3061e3c5a2f7
--- /dev/null
+++ b/sntp/libevent/build-aux/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 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.
+
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# 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+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_append_quoted lastarg "$arg"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# 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+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps ; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_apped perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd1 in $cmds; do
+ IFS="$save_ifs"
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case "$opt_mode" in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/sntp/libevent/build-aux/missing b/sntp/libevent/build-aux/missing
new file mode 100755
index 000000000000..28055d2ae6f2
--- /dev/null
+++ b/sntp/libevent/build-aux/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# 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
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -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'
+ autom4te touch the output file, or create a stub one
+ 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]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ 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' $msg. 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 test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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 test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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 "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar*)
+ shift
+
+ # 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 is $msg.
+ 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 prerequisites 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
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/sntp/libevent/build-aux/ylwrap b/sntp/libevent/build-aux/ylwrap
new file mode 100755
index 000000000000..84d563405e6e
--- /dev/null
+++ b/sntp/libevent/build-aux/ylwrap
@@ -0,0 +1,222 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2007, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case "$1" in
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+ INPUT is the input file
+ OUTPUT is one file PROG generates
+ DESIRED is the file we actually want instead of OUTPUT
+ PROGRAM is program to run
+ ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v|--v*)
+ echo "ylwrap $scriptversion"
+ exit $?
+ ;;
+esac
+
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ [\\/]* | ?:[\\/]*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Relative path. Make it absolute.
+ input="`pwd`/$input"
+ ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines. But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+ 0) "$prog" "$input" ;;
+ *) "$prog" "$@" "$input" ;;
+esac
+ret=$?
+
+if test $ret -eq 0; then
+ set X $pairlist
+ shift
+ first=yes
+ # Since DOS filename conventions don't allow two dots,
+ # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+ # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+ y_tab_nodot="no"
+ if test -f y_tab.c || test -f y_tab.h; then
+ y_tab_nodot="yes"
+ fi
+
+ # The directory holding the input.
+ input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+ # Quote $INPUT_DIR so we can use it in a regexp.
+ # FIXME: really we should care about more than `.' and `\'.
+ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+ while test "$#" -ne 0; do
+ from="$1"
+ # Handle y_tab.c and y_tab.h output by DOS
+ if test $y_tab_nodot = "yes"; then
+ if test $from = "y.tab.c"; then
+ from="y_tab.c"
+ else
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
+ fi
+ fi
+ if test -f "$from"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
+ esac
+
+ # We do not want to overwrite a header file if it hasn't
+ # changed. This avoid useless recompilations. However the
+ # parser itself (the first file) should always be updated,
+ # because it is the destination of the .y.c rule in the
+ # Makefile. Divert the output of all other files to a temporary
+ # file so we can compare them to existing versions.
+ if test $first = no; then
+ realtarget="$target"
+ target="tmp-`echo $target | sed s/.*[\\/]//g`"
+ fi
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ FROM=`echo "$from" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ TARGET=`echo "$2" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+
+ sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
+ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
+
+ # Check whether header files must be updated.
+ if test $first = no; then
+ if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+ echo "$2" is unchanged
+ rm -f "$target"
+ else
+ echo updating "$2"
+ mv -f "$target" "$realtarget"
+ fi
+ fi
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ ret=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
+else
+ ret=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/sntp/libevent/changelist-internal.h b/sntp/libevent/changelist-internal.h
new file mode 100644
index 000000000000..98fc52aebfa7
--- /dev/null
+++ b/sntp/libevent/changelist-internal.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 CHANGELIST_INTERNAL_H_INCLUDED_
+#define CHANGELIST_INTERNAL_H_INCLUDED_
+
+/*
+ A "changelist" is a list of all the fd status changes that should be made
+ between calls to the backend's dispatch function. There are a few reasons
+ that a backend would want to queue changes like this rather than processing
+ them immediately.
+
+ 1) Sometimes applications will add and delete the same event more than
+ once between calls to dispatch. Processing these changes immediately
+ is needless, and potentially expensive (especially if we're on a system
+ that makes one syscall per changed event).
+
+ 2) Sometimes we can coalesce multiple changes on the same fd into a single
+ syscall if we know about them in advance. For example, epoll can do an
+ add and a delete at the same time, but only if we have found out about
+ both of them before we tell epoll.
+
+ 3) Sometimes adding an event that we immediately delete can cause
+ unintended consequences: in kqueue, this makes pending events get
+ reported spuriously.
+ */
+
+#include "event2/util.h"
+
+/** Represents a */
+struct event_change {
+ /** The fd or signal whose events are to be changed */
+ evutil_socket_t fd;
+ /* The events that were enabled on the fd before any of these changes
+ were made. May include EV_READ or EV_WRITE. */
+ short old_events;
+
+ /* The changes that we want to make in reading and writing on this fd.
+ * If this is a signal, then read_change has EV_CHANGE_SIGNAL set,
+ * and write_change is unused. */
+ ev_uint8_t read_change;
+ ev_uint8_t write_change;
+ ev_uint8_t close_change;
+};
+
+/* Flags for read_change and write_change. */
+
+/* If set, add the event. */
+#define EV_CHANGE_ADD 0x01
+/* If set, delete the event. Exclusive with EV_CHANGE_ADD */
+#define EV_CHANGE_DEL 0x02
+/* If set, this event refers a signal, not an fd. */
+#define EV_CHANGE_SIGNAL EV_SIGNAL
+/* Set for persistent events. Currently not used. */
+#define EV_CHANGE_PERSIST EV_PERSIST
+/* Set for adding edge-triggered events. */
+#define EV_CHANGE_ET EV_ET
+
+/* The value of fdinfo_size that a backend should use if it is letting
+ * changelist handle its add and delete functions. */
+#define EVENT_CHANGELIST_FDINFO_SIZE sizeof(int)
+
+/** Set up the data fields in a changelist. */
+void event_changelist_init_(struct event_changelist *changelist);
+/** Remove every change in the changelist, and make corresponding changes
+ * in the event maps in the base. This function is generally used right
+ * after making all the changes in the changelist. */
+void event_changelist_remove_all_(struct event_changelist *changelist,
+ struct event_base *base);
+/** Free all memory held in a changelist. */
+void event_changelist_freemem_(struct event_changelist *changelist);
+
+/** Implementation of eventop_add that queues the event in a changelist. */
+int event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, short events,
+ void *p);
+/** Implementation of eventop_del that queues the event in a changelist. */
+int event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, short events,
+ void *p);
+
+#endif
diff --git a/sntp/libevent/compat/sys/queue.h b/sntp/libevent/compat/sys/queue.h
new file mode 100644
index 000000000000..c387bdcf5049
--- /dev/null
+++ b/sntp/libevent/compat/sys/queue.h
@@ -0,0 +1,488 @@
+/* $OpenBSD: queue.h,v 1.16 2000/09/07 19:47:59 art Exp $ */
+/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
+
+/*
+ * Copyright (c) 1991, 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. 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.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef SYS_QUEUE_H__
+#define SYS_QUEUE_H__
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ *
+ * A singly-linked list is headed by a single forward pointer. The elements
+ * are singly linked for minimum space and pointer manipulation overhead at
+ * the expense of O(n) removal for arbitrary elements. New elements can be
+ * added to the list after an existing element or at the head of the list.
+ * Elements being removed from the head of the list should use the explicit
+ * macro for this purpose for optimum efficiency. A singly-linked list may
+ * only be traversed in the forward direction. Singly-linked lists are ideal
+ * for applications with large datasets and few or no removals or for
+ * implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#ifndef _WIN32
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+#endif
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_END(head) NULL
+#define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head))
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = SLIST_FIRST(head); \
+ (var) != SLIST_END(head); \
+ (var) = SLIST_NEXT(var, field))
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) { \
+ SLIST_FIRST(head) = SLIST_END(head); \
+}
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (0)
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List access methods
+ */
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_END(head) NULL
+#define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head))
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+#define LIST_FOREACH(var, head, field) \
+ for((var) = LIST_FIRST(head); \
+ (var)!= LIST_END(head); \
+ (var) = LIST_NEXT(var, field))
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ LIST_FIRST(head) = LIST_END(head); \
+} while (0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (0)
+
+#define LIST_REPLACE(elm, elm2, field) do { \
+ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
+ (elm2)->field.le_next->field.le_prev = \
+ &(elm2)->field.le_next; \
+ (elm2)->field.le_prev = (elm)->field.le_prev; \
+ *(elm2)->field.le_prev = (elm2); \
+} while (0)
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_END(head) NULL
+#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for((var) = SIMPLEQ_FIRST(head); \
+ (var) != SIMPLEQ_END(head); \
+ (var) = SIMPLEQ_NEXT(var, field))
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, elm, field) do { \
+ if (((head)->sqh_first = (elm)->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (0)
+
+/*
+ * Tail queue definitions.
+ */
+#define TAILQ_HEAD(name, type) \
+struct name { \
+ struct type *tqh_first; /* first element */ \
+ struct type **tqh_last; /* addr of last next element */ \
+}
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define TAILQ_ENTRY(type) \
+struct { \
+ struct type *tqe_next; /* next element */ \
+ struct type **tqe_prev; /* address of previous next element */ \
+}
+
+/*
+ * tail queue access methods
+ */
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_END(head) NULL
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+/* XXX */
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+#define TAILQ_EMPTY(head) \
+ (TAILQ_FIRST(head) == TAILQ_END(head))
+
+#define TAILQ_FOREACH(var, head, field) \
+ for((var) = TAILQ_FIRST(head); \
+ (var) != TAILQ_END(head); \
+ (var) = TAILQ_NEXT(var, field))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for((var) = TAILQ_LAST(head, headname); \
+ (var) != TAILQ_END(head); \
+ (var) = TAILQ_PREV(var, headname, field))
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (0)
+
+#define TAILQ_REPLACE(head, elm, elm2, field) do { \
+ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
+ (elm2)->field.tqe_next->field.tqe_prev = \
+ &(elm2)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm2)->field.tqe_next; \
+ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
+ *(elm2)->field.tqe_prev = (elm2); \
+} while (0)
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue access methods
+ */
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_END(head) ((void *)(head))
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+#define CIRCLEQ_EMPTY(head) \
+ (CIRCLEQ_FIRST(head) == CIRCLEQ_END(head))
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for((var) = CIRCLEQ_FIRST(head); \
+ (var) != CIRCLEQ_END(head); \
+ (var) = CIRCLEQ_NEXT(var, field))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for((var) = CIRCLEQ_LAST(head); \
+ (var) != CIRCLEQ_END(head); \
+ (var) = CIRCLEQ_PREV(var, field))
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = CIRCLEQ_END(head); \
+ (head)->cqh_last = CIRCLEQ_END(head); \
+} while (0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = CIRCLEQ_END(head); \
+ if ((head)->cqh_last == CIRCLEQ_END(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = CIRCLEQ_END(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == CIRCLEQ_END(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (0)
+
+#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \
+ if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \
+ CIRCLEQ_END(head)) \
+ (head).cqh_last = (elm2); \
+ else \
+ (elm2)->field.cqe_next->field.cqe_prev = (elm2); \
+ if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \
+ CIRCLEQ_END(head)) \
+ (head).cqh_first = (elm2); \
+ else \
+ (elm2)->field.cqe_prev->field.cqe_next = (elm2); \
+} while (0)
+
+#endif /* !SYS_QUEUE_H__ */
diff --git a/sntp/libevent/config.h.in b/sntp/libevent/config.h.in
new file mode 100644
index 000000000000..74466761e9f4
--- /dev/null
+++ b/sntp/libevent/config.h.in
@@ -0,0 +1,632 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if libevent should build without support for a debug mode */
+#undef DISABLE_DEBUG_MODE
+
+/* Define if libevent should not allow replacing the mm functions */
+#undef DISABLE_MM_REPLACEMENT
+
+/* Define if libevent should not be compiled with thread support */
+#undef DISABLE_THREAD_SUPPORT
+
+/* Define to 1 if you have the `accept4' function. */
+#undef HAVE_ACCEPT4
+
+/* Define to 1 if you have the `arc4random' function. */
+#undef HAVE_ARC4RANDOM
+
+/* Define to 1 if you have the `arc4random_buf' function. */
+#undef HAVE_ARC4RANDOM_BUF
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the <cthreads.h> header file. */
+#undef HAVE_CTHREADS_H
+
+/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you
+ don't. */
+#undef HAVE_DECL_CTL_KERN
+
+/* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you
+ don't. */
+#undef HAVE_DECL_KERN_ARND
+
+/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you
+ don't. */
+#undef HAVE_DECL_KERN_RANDOM
+
+/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you
+ don't. */
+#undef HAVE_DECL_RANDOM_UUID
+
+/* Define if /dev/poll is available */
+#undef HAVE_DEVPOLL
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if your system supports the epoll system calls */
+#undef HAVE_EPOLL
+
+/* Define to 1 if you have the `epoll_create1' function. */
+#undef HAVE_EPOLL_CREATE1
+
+/* Define to 1 if you have the `epoll_ctl' function. */
+#undef HAVE_EPOLL_CTL
+
+/* Define to 1 if you have the `eventfd' function. */
+#undef HAVE_EVENTFD
+
+/* Define if your system supports event ports */
+#undef HAVE_EVENT_PORTS
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if the system has the type `fd_mask'. */
+#undef HAVE_FD_MASK
+
+/* Do we have getaddrinfo()? */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define this if you have any gethostbyname_r() */
+#undef HAVE_GETHOSTBYNAME_R
+
+/* Define this if gethostbyname_r takes 3 arguments */
+#undef HAVE_GETHOSTBYNAME_R_3_ARG
+
+/* Define this if gethostbyname_r takes 5 arguments */
+#undef HAVE_GETHOSTBYNAME_R_5_ARG
+
+/* Define this if gethostbyname_r takes 6 arguments */
+#undef HAVE_GETHOSTBYNAME_R_6_ARG
+
+/* Define to 1 if you have the `getifaddrs' function. */
+#undef HAVE_GETIFADDRS
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#undef HAVE_GETNAMEINFO
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#undef HAVE_GETPROTOBYNUMBER
+
+/* Define to 1 if you have the `getservbyname' function. */
+#undef HAVE_GETSERVBYNAME
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* if you have GNU Pth */
+#undef HAVE_GNU_PTH
+
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#undef HAVE_IFADDRS_H
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#undef HAVE_INET_NTOP
+
+/* Define to 1 if you have the `inet_pton' function. */
+#undef HAVE_INET_PTON
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `issetugid' function. */
+#undef HAVE_ISSETUGID
+
+/* Define to 1 if you have the `kqueue' function. */
+#undef HAVE_KQUEUE
+
+/* Define if the system has zlib */
+#undef HAVE_LIBZ
+
+/* if you have LinuxThreads */
+#undef HAVE_LINUX_THREADS
+
+/* if you have SunOS LWP package */
+#undef HAVE_LWP
+
+/* Define to 1 if you have the <lwp/lwp.h> header file. */
+#undef HAVE_LWP_LWP_H
+
+/* Define to 1 if you have the `mach_absolute_time' function. */
+#undef HAVE_MACH_ABSOLUTE_TIME
+
+/* define if you have Mach Cthreads */
+#undef HAVE_MACH_CTHREADS
+
+/* Define to 1 if you have the <mach/cthreads.h> header file. */
+#undef HAVE_MACH_CTHREADS_H
+
+/* Define to 1 if you have the <mach/mach_time.h> header file. */
+#undef HAVE_MACH_MACH_TIME_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `nanosleep' function. */
+#undef HAVE_NANOSLEEP
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in6.h> header file. */
+#undef HAVE_NETINET_IN6_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/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
+/* if you have NT Event Log */
+#undef HAVE_NT_EVENT_LOG
+
+/* if you have NT Service Manager */
+#undef HAVE_NT_SERVICE_MANAGER
+
+/* if you have NT Threads */
+#undef HAVE_NT_THREADS
+
+/* Define if the system has openssl */
+#undef HAVE_OPENSSL
+
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
+/* Define to 1 if you have the `pipe2' function. */
+#undef HAVE_PIPE2
+
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the `port_create' function. */
+#undef HAVE_PORT_CREATE
+
+/* Define to 1 if you have the <port.h> header file. */
+#undef HAVE_PORT_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* define to pthreads API spec revision */
+#undef HAVE_PTHREADS
+
+/* define if you have pthread_detach function */
+#undef HAVE_PTHREAD_DETACH
+
+/* Define to 1 if you have the `pthread_getconcurrency' function. */
+#undef HAVE_PTHREAD_GETCONCURRENCY
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `pthread_kill' function. */
+#undef HAVE_PTHREAD_KILL
+
+/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */
+#undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP
+
+/* define if you have pthread_rwlock_destroy function */
+#undef HAVE_PTHREAD_RWLOCK_DESTROY
+
+/* Define to 1 if you have the `pthread_setconcurrency' function. */
+#undef HAVE_PTHREAD_SETCONCURRENCY
+
+/* Define to 1 if you have the `pthread_yield' function. */
+#undef HAVE_PTHREAD_YIELD
+
+/* Define to 1 if you have the <pth.h> header file. */
+#undef HAVE_PTH_H
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if the system has the type `sa_family_t'. */
+#undef HAVE_SA_FAMILY_T
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `sendfile' function. */
+#undef HAVE_SENDFILE
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define if F_SETFD is defined in <fcntl.h> */
+#undef HAVE_SETFD
+
+/* Define to 1 if you have the `setrlimit' function. */
+#undef HAVE_SETRLIMIT
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the `splice' function. */
+#undef HAVE_SPLICE
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* 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 <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 `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the `strsep' function. */
+#undef HAVE_STRSEP
+
+/* Define to 1 if you have the `strtok_r' function. */
+#undef HAVE_STRTOK_R
+
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
+
+/* Define to 1 if the system has the type `struct in6_addr'. */
+#undef HAVE_STRUCT_IN6_ADDR
+
+/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */
+#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR16
+
+/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
+#undef HAVE_STRUCT_IN6_ADDR_S6_ADDR32
+
+/* Define to 1 if the system has the type `struct sockaddr_in6'. */
+#undef HAVE_STRUCT_SOCKADDR_IN6
+
+/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */
+#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
+
+/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */
+#undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+
+/* Define to 1 if the system has the type `struct sockaddr_storage'. */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE
+
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
+
+/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
+#undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
+
+/* Define to 1 if the system has the type `struct so_linger'. */
+#undef HAVE_STRUCT_SO_LINGER
+
+/* Define to 1 if you have the <synch.h> header file. */
+#undef HAVE_SYNCH_H
+
+/* Define to 1 if you have the `sysctl' function. */
+#undef HAVE_SYSCTL
+
+/* Define to 1 if you have the <sys/devpoll.h> header file. */
+#undef HAVE_SYS_DEVPOLL_H
+
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+#undef HAVE_SYS_EPOLL_H
+
+/* Define to 1 if you have the <sys/eventfd.h> header file. */
+#undef HAVE_SYS_EVENTFD_H
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#undef HAVE_SYS_EVENT_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/mman.h> header file. */
+#undef HAVE_SYS_MMAN_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/queue.h> header file. */
+#undef HAVE_SYS_QUEUE_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/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/sendfile.h> header file. */
+#undef HAVE_SYS_SENDFILE_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_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/sysctl.h> header file. */
+#undef HAVE_SYS_SYSCTL_H
+
+/* Define to 1 if you have the <sys/timerfd.h> header file. */
+#undef HAVE_SYS_TIMERFD_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/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
+#undef HAVE_TAILQFOREACH
+
+/* if you have Solaris LWP (thr) package */
+#undef HAVE_THR
+
+/* Define to 1 if you have the <thread.h> header file. */
+#undef HAVE_THREAD_H
+
+/* Define to 1 if you have the `thr_getconcurrency' function. */
+#undef HAVE_THR_GETCONCURRENCY
+
+/* Define to 1 if you have the `thr_setconcurrency' function. */
+#undef HAVE_THR_SETCONCURRENCY
+
+/* Define to 1 if you have the `thr_yield' function. */
+#undef HAVE_THR_YIELD
+
+/* Define if timeradd is defined in <sys/time.h> */
+#undef HAVE_TIMERADD
+
+/* Define if timerclear is defined in <sys/time.h> */
+#undef HAVE_TIMERCLEAR
+
+/* Define if timercmp is defined in <sys/time.h> */
+#undef HAVE_TIMERCMP
+
+/* Define to 1 if you have the `timerfd_create' function. */
+#undef HAVE_TIMERFD_CREATE
+
+/* Define if timerisset is defined in <sys/time.h> */
+#undef HAVE_TIMERISSET
+
+/* Define to 1 if the system has the type `uint16_t'. */
+#undef HAVE_UINT16_T
+
+/* Define to 1 if the system has the type `uint32_t'. */
+#undef HAVE_UINT32_T
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#undef HAVE_UINT64_T
+
+/* Define to 1 if the system has the type `uint8_t'. */
+#undef HAVE_UINT8_T
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#undef HAVE_UINTPTR_T
+
+/* Define to 1 if you have the `umask' function. */
+#undef HAVE_UMASK
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define if kqueue works correctly with pipes */
+#undef HAVE_WORKING_KQUEUE
+
+/* define if select implicitly yields */
+#undef HAVE_YIELDING_SELECT
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* define to 1 if library is thread safe */
+#undef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* define if you have (or want) no threads */
+#undef NO_THREADS
+
+/* Numeric representation of the version */
+#undef NUMERIC_VERSION
+
+/* 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 home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* enable thread safety */
+#undef REENTRANT
+
+/* define if sched_yield yields the entire process */
+#undef REPLACE_BROKEN_YIELD
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of `off_t', as computed by sizeof. */
+#undef SIZEOF_OFF_T
+
+/* The size of `pthread_t', as computed by sizeof. */
+#undef SIZEOF_PTHREAD_T
+
+/* The size of `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* enable thread safety */
+#undef THREADSAFE
+
+/* enable thread safety */
+#undef THREAD_SAFE
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* 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
+
+/* enable thread safety */
+#undef _REENTRANT
+
+/* enable thread safety */
+#undef _SGI_MP_SOURCE
+
+/* enable thread safety */
+#undef _THREADSAFE
+
+/* enable thread safety */
+#undef _THREAD_SAFE
+
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to appropriate substitue if compiler doesnt have __func__ */
+#undef __func__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to unsigned int if you dont have it */
+#undef socklen_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef ssize_t
diff --git a/sntp/libevent/configure b/sntp/libevent/configure
new file mode 100755
index 000000000000..09d6eedb5cd0
--- /dev/null
+++ b/sntp/libevent/configure
@@ -0,0 +1,22030 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for libevent 2.1.3-alpha-dev.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+ ;;
+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
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# 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
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='libevent'
+PACKAGE_TARNAME='libevent'
+PACKAGE_VERSION='2.1.3-alpha-dev'
+PACKAGE_STRING='libevent 2.1.3-alpha-dev'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="event.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+INSTALL_LIBEVENT_FALSE
+INSTALL_LIBEVENT_TRUE
+LIBEVENT_GC_SECTIONS
+PTHREADS_FALSE
+PTHREADS_TRUE
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+SIGNAL_SUPPORT_FALSE
+SIGNAL_SUPPORT_TRUE
+EVPORT_BACKEND_FALSE
+EVPORT_BACKEND_TRUE
+EPOLL_BACKEND_FALSE
+EPOLL_BACKEND_TRUE
+LIBOBJS
+KQUEUE_BACKEND_FALSE
+KQUEUE_BACKEND_TRUE
+DEVPOLL_BACKEND_FALSE
+DEVPOLL_BACKEND_TRUE
+POLL_BACKEND_FALSE
+POLL_BACKEND_TRUE
+SELECT_BACKEND_FALSE
+SELECT_BACKEND_TRUE
+STRLCPY_IMPL_FALSE
+STRLCPY_IMPL_TRUE
+BUILD_WITH_NO_UNDEFINED_FALSE
+BUILD_WITH_NO_UNDEFINED_TRUE
+BUILD_CYGWIN_FALSE
+BUILD_CYGWIN_TRUE
+BUILD_WIN32_FALSE
+BUILD_WIN32_TRUE
+OPENSSL_FALSE
+OPENSSL_TRUE
+OPENSSL_LIBS
+OPENSSL_INCS
+PKG_CONFIG
+OPENSSL_LIBADD
+EV_LIB_GDI
+EV_LIB_WS32
+ZLIB_REGRESS_FALSE
+ZLIB_REGRESS_TRUE
+ZLIB_LIBS
+BUILD_REGRESS_FALSE
+BUILD_REGRESS_TRUE
+LIBTOOL_DEPS
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+LIBTOOL
+SED
+LN_S
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_gcc_warnings
+enable_gcc_hardening
+enable_thread_support
+enable_malloc_replacement
+enable_openssl
+enable_debug_mode
+enable_libevent_install
+enable_libevent_regress
+enable_function_sections
+enable_verbose_debug
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_largefile
+with_threads
+with_yielding_select
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# 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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+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
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -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)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$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 ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$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 ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ 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 ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=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 ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_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'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+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
+ $as_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
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# 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 the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ 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
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# 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 libevent 2.1.3-alpha-dev 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 \`..']
+
+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]
+ --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]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/libevent]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_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]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of libevent 2.1.3-alpha-dev:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-gcc-warnings disable verbose warnings with GCC
+ --enable-gcc-hardening enable compiler security checks
+ --disable-thread-support
+ disable support for threading
+ --disable-malloc-replacement
+ disable support for replacing the memory mgt
+ functions
+ --disable-openssl disable support for openssl encryption
+ --disable-debug-mode disable support for running in debug mode
+ --disable-libevent-install, disable installation of libevent
+
+ --disable-libevent-regress, skip regress in make check
+
+ --enable-function-sections, make static library allow smaller binaries with --gc-sections
+
+ --enable-verbose-debug, verbose debug logging
+
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-largefile omit support for large files
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
+ --with-threads with threads [auto]
+ --with-yielding-select with yielding select [auto]
+
+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>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) 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.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested 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
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+libevent configure 2.1.3-alpha-dev
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 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
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); 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
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libevent $as_me 2.1.3-alpha-dev, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo = `(/usr/bin/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=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append 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
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ 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. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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 $ac_precious_vars; 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,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_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.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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 build-aux "$srcdir"/build-aux; 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
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+am__api_version='1.11'
+
+# 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"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&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/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+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. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$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'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# 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".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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 $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+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='libevent'
+ VERSION='2.1.3-alpha-dev'
+
+
+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"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+ac_config_headers="$ac_config_headers config.h evconfig-private.h:evconfig-private.h.in"
+
+
+$as_echo "#define NUMERIC_VERSION 0x02010301" >>confdefs.h
+
+
+if test "$prefix" = "NONE"; then
+ prefix="/usr/local"
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.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))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+#case "$host_os" in
+#
+# osf5*)
+# CFLAGS="$CFLAGS -D_OSF_SOURCE"
+# ;;
+#esac
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
+
+# AC_PROG_SED is only available in Autoconf >= 2.59b; workaround for older
+# versions
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+
+# We need to test for at least gcc 2.95 here, because older versions don't
+# have -fno-strict-aliasing
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
+#error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_gcc295=yes
+else
+ have_gcc295=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test "$GCC" = "yes" ; then
+ # Enable many gcc warnings by default...
+ CFLAGS="$CFLAGS -Wall"
+ # And disable the strict-aliasing optimization, since it breaks
+ # our sockaddr-handling code in strange ways.
+ if test x$have_gcc295 = xyes; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ fi
+fi
+
+# OS X Lion started deprecating the system openssl. Let's just disable
+# all deprecation warnings on OS X.
+case "$host_os" in
+
+ darwin*)
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+ ;;
+esac
+
+# Check whether --enable-gcc-warnings was given.
+if test "${enable_gcc_warnings+set}" = set; then :
+ enableval=$enable_gcc_warnings;
+fi
+
+
+# Check whether --enable-gcc-hardening was given.
+if test "${enable_gcc_hardening+set}" = set; then :
+ enableval=$enable_gcc_hardening; if test x$enableval = xyes; then
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
+ CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
+ CFLAGS="$CFLAGS --param ssp-buffer-size=1"
+fi
+fi
+
+
+# Check whether --enable-thread-support was given.
+if test "${enable_thread_support+set}" = set; then :
+ enableval=$enable_thread_support;
+else
+ enable_thread_support=yes
+fi
+
+# Check whether --enable-malloc-replacement was given.
+if test "${enable_malloc_replacement+set}" = set; then :
+ enableval=$enable_malloc_replacement;
+else
+ enable_malloc_replacement=yes
+fi
+
+# Check whether --enable-openssl was given.
+if test "${enable_openssl+set}" = set; then :
+ enableval=$enable_openssl;
+else
+ enable_openssl=yes
+fi
+
+# Check whether --enable-debug-mode was given.
+if test "${enable_debug_mode+set}" = set; then :
+ enableval=$enable_debug_mode;
+else
+ enable_debug_mode=yes
+fi
+
+# Check whether --enable-libevent-install was given.
+if test "${enable_libevent_install+set}" = set; then :
+ enableval=$enable_libevent_install;
+else
+ enable_libevent_install=yes
+fi
+
+# Check whether --enable-libevent-regress was given.
+if test "${enable_libevent_regress+set}" = set; then :
+ enableval=$enable_libevent_regress;
+else
+ enable_libevent_regress=yes
+fi
+
+# Check whether --enable-function-sections was given.
+if test "${enable_function_sections+set}" = set; then :
+ enableval=$enable_function_sections;
+else
+ enable_function_sections=no
+fi
+
+# Check whether --enable-verbose-debug was given.
+if test "${enable_verbose_debug+set}" = set; then :
+ enableval=$enable_verbose_debug;
+else
+ enable_verbose_debug=no
+fi
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4'
+macro_revision='1.3293'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext 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
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+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
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ lt_prog_compiler_pic='-Xcompiler -fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='${wl}--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+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
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+
+ if test "$enable_libevent_regress" = "yes"; then
+ BUILD_REGRESS_TRUE=
+ BUILD_REGRESS_FALSE='#'
+else
+ BUILD_REGRESS_TRUE='#'
+ BUILD_REGRESS_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5
+$as_echo_n "checking for library containing inet_ntoa... " >&6; }
+if ${ac_cv_search_inet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_ntoa ();
+int
+main ()
+{
+return inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_ntoa=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_ntoa+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_ntoa+:} false; then :
+
+else
+ ac_cv_search_inet_ntoa=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5
+$as_echo "$ac_cv_search_inet_ntoa" >&6; }
+ac_res=$ac_cv_search_inet_ntoa
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+$as_echo_n "checking for library containing socket... " >&6; }
+if ${ac_cv_search_socket+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
+int
+main ()
+{
+return socket ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' socket; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_socket=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_socket+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_socket+:} false; then :
+
+else
+ ac_cv_search_socket=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+$as_echo "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_aton" >&5
+$as_echo_n "checking for library containing inet_aton... " >&6; }
+if ${ac_cv_search_inet_aton+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inet_aton ();
+int
+main ()
+{
+return inet_aton ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inet_aton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inet_aton+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inet_aton+:} false; then :
+
+else
+ ac_cv_search_inet_aton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_aton" >&5
+$as_echo "$ac_cv_search_inet_aton" >&6; }
+ac_res=$ac_cv_search_inet_aton
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sendfile" >&5
+$as_echo_n "checking for library containing sendfile... " >&6; }
+if ${ac_cv_search_sendfile+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sendfile ();
+int
+main ()
+{
+return sendfile ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' sendfile; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_sendfile=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_sendfile+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_sendfile+:} false; then :
+
+else
+ ac_cv_search_sendfile=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfile" >&5
+$as_echo "$ac_cv_search_sendfile" >&6; }
+ac_res=$ac_cv_search_sendfile
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WIN32" >&5
+$as_echo_n "checking for WIN32... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef _WIN32
+die horribly
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ bwin32=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ bwin32=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN" >&5
+$as_echo_n "checking for CYGWIN... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __CYGWIN__
+die horribly
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cygwin=true; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ cygwin=false; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+for ac_header in zlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "x$ac_cv_header_zlib_h" = "xyes"; then
+save_LIBS="$LIBS"
+LIBS=""
+ZLIB_LIBS=""
+have_zlib=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
+$as_echo_n "checking for library containing inflateEnd... " >&6; }
+if ${ac_cv_search_inflateEnd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateEnd ();
+int
+main ()
+{
+return inflateEnd ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' z; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_inflateEnd=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_inflateEnd+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_inflateEnd+:} false; then :
+
+else
+ ac_cv_search_inflateEnd=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
+$as_echo "$ac_cv_search_inflateEnd" >&6; }
+ac_res=$ac_cv_search_inflateEnd
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ have_zlib=yes
+ ZLIB_LIBS="$LIBS"
+
+$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+fi
+
+LIBS="$save_LIBS"
+
+fi
+ if test "$have_zlib" = "yes"; then
+ ZLIB_REGRESS_TRUE=
+ ZLIB_REGRESS_FALSE='#'
+else
+ ZLIB_REGRESS_TRUE='#'
+ ZLIB_REGRESS_FALSE=
+fi
+
+
+if test "$bwin32" = true; then
+ EV_LIB_WS32=-lws2_32
+ EV_LIB_GDI=-lgdi32
+else
+ EV_LIB_WS32=
+ EV_LIB_GDI=
+fi
+
+
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if ${ac_cv_sys_file_offset_bits+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if ${ac_cv_sys_large_files+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+
+
+
+ntp_pkgconfig_min_version='0.15.0'
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
+{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
+
+case "$PKG_CONFIG" in
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
+$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+
+
+
+case "$enable_openssl" in
+ yes)
+ have_openssl=no
+ case "$PKG_CONFIG" in
+ '')
+ ;;
+ *)
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl 2>/dev/null`
+ case "$OPENSSL_LIBS" in
+ '') ;;
+ *) OPENSSL_LIBS="$OPENSSL_LIBS $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"
+ have_openssl=yes
+ ;;
+ esac
+ OPENSSL_INCS=`$PKG_CONFIG --cflags openssl 2>/dev/null`
+ ;;
+ esac
+ case "$have_openssl" in
+ yes) ;;
+ *)
+ save_LIBS="$LIBS"
+ LIBS=""
+ OPENSSL_LIBS=""
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
+$as_echo_n "checking for library containing SSL_new... " >&6; }
+if ${ac_cv_search_SSL_new+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_new ();
+int
+main ()
+{
+return SSL_new ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ssl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_SSL_new=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_SSL_new+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_SSL_new+:} false; then :
+
+else
+ ac_cv_search_SSL_new=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
+$as_echo "$ac_cv_search_SSL_new" >&6; }
+ac_res=$ac_cv_search_SSL_new
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ have_openssl=yes
+ OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"
+else
+ have_openssl=no
+fi
+
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+
+ case "$have_openssl" in
+ yes)
+$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
+ ;;
+ esac
+ ;;
+esac
+
+# check if we have and should use openssl
+ if test "$enable_openssl" != "no" && test "$have_openssl" = "yes"; then
+ OPENSSL_TRUE=
+ OPENSSL_FALSE='#'
+else
+ OPENSSL_TRUE='#'
+ OPENSSL_FALSE=
+fi
+
+
+
+for ac_header in \
+ arpa/inet.h \
+ fcntl.h \
+ ifaddrs.h \
+ mach/mach_time.h \
+ netdb.h \
+ netinet/in.h \
+ netinet/in6.h \
+ netinet/tcp.h \
+ poll.h \
+ port.h \
+ stdarg.h \
+ stddef.h \
+ sys/devpoll.h \
+ sys/epoll.h \
+ sys/event.h \
+ sys/eventfd.h \
+ sys/ioctl.h \
+ sys/mman.h \
+ sys/param.h \
+ sys/queue.h \
+ sys/resource.h \
+ sys/select.h \
+ sys/sendfile.h \
+ sys/socket.h \
+ sys/stat.h \
+ sys/time.h \
+ sys/timerfd.h \
+ sys/uio.h \
+ sys/wait.h \
+
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/sysctl.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+"
+if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SYSCTL_H 1
+_ACEOF
+
+fi
+
+done
+
+if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAILQ_FOREACH in sys/queue.h" >&5
+$as_echo_n "checking for TAILQ_FOREACH in sys/queue.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/queue.h>
+#ifdef TAILQ_FOREACH
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_TAILQFOREACH 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f conftest*
+
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timeradd in sys/time.h" >&5
+$as_echo_n "checking for timeradd in sys/time.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/time.h>
+#ifdef timeradd
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+$as_echo "#define HAVE_TIMERADD 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f conftest*
+
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timercmp in sys/time.h" >&5
+$as_echo_n "checking for timercmp in sys/time.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/time.h>
+#ifdef timercmp
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+$as_echo "#define HAVE_TIMERCMP 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f conftest*
+
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerclear in sys/time.h" >&5
+$as_echo_n "checking for timerclear in sys/time.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/time.h>
+#ifdef timerclear
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+$as_echo "#define HAVE_TIMERCLEAR 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f conftest*
+
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerisset in sys/time.h" >&5
+$as_echo_n "checking for timerisset in sys/time.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/time.h>
+#ifdef timerisset
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+$as_echo "#define HAVE_TIMERISSET 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f conftest*
+
+fi
+
+if test "x$ac_cv_header_sys_sysctl_h" = "xyes"; then
+ ac_fn_c_check_decl "$LINENO" "CTL_KERN" "ac_cv_have_decl_CTL_KERN" "#include <sys/types.h>
+ #include <sys/sysctl.h>
+
+"
+if test "x$ac_cv_have_decl_CTL_KERN" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CTL_KERN $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "KERN_RANDOM" "ac_cv_have_decl_KERN_RANDOM" "#include <sys/types.h>
+ #include <sys/sysctl.h>
+
+"
+if test "x$ac_cv_have_decl_KERN_RANDOM" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_KERN_RANDOM $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "RANDOM_UUID" "ac_cv_have_decl_RANDOM_UUID" "#include <sys/types.h>
+ #include <sys/sysctl.h>
+
+"
+if test "x$ac_cv_have_decl_RANDOM_UUID" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_RANDOM_UUID $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "KERN_ARND" "ac_cv_have_decl_KERN_ARND" "#include <sys/types.h>
+ #include <sys/sysctl.h>
+
+"
+if test "x$ac_cv_have_decl_KERN_ARND" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_KERN_ARND $ac_have_decl
+_ACEOF
+
+fi
+
+ if test x$bwin32 = xtrue; then
+ BUILD_WIN32_TRUE=
+ BUILD_WIN32_FALSE='#'
+else
+ BUILD_WIN32_TRUE='#'
+ BUILD_WIN32_FALSE=
+fi
+
+ if test x$cygwin = xtrue; then
+ BUILD_CYGWIN_TRUE=
+ BUILD_CYGWIN_FALSE='#'
+else
+ BUILD_CYGWIN_TRUE='#'
+ BUILD_CYGWIN_FALSE=
+fi
+
+ if test x$bwin32 = xtrue || test x$cygwin = xtrue; then
+ BUILD_WITH_NO_UNDEFINED_TRUE=
+ BUILD_WITH_NO_UNDEFINED_FALSE='#'
+else
+ BUILD_WITH_NO_UNDEFINED_TRUE='#'
+ BUILD_WITH_NO_UNDEFINED_FALSE=
+fi
+
+
+if test x$bwin32 = xtrue; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
+$as_echo_n "checking for library containing getservbyname... " >&6; }
+if ${ac_cv_search_getservbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getservbyname ();
+int
+main ()
+{
+return getservbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ws2_32; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_getservbyname=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_getservbyname+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_getservbyname+:} false; then :
+
+else
+ ac_cv_search_getservbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
+$as_echo "$ac_cv_search_getservbyname" >&6; }
+ac_res=$ac_cv_search_getservbyname
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* 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";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 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;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_time=yes
+else
+ ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+
+for ac_func in \
+ accept4 \
+ arc4random \
+ arc4random_buf \
+ clock_gettime \
+ eventfd \
+ epoll_create1 \
+ fcntl \
+ getegid \
+ geteuid \
+ getifaddrs \
+ getnameinfo \
+ getprotobynumber \
+ gettimeofday \
+ inet_ntop \
+ inet_pton \
+ issetugid \
+ mach_absolute_time \
+ mmap \
+ nanosleep \
+ pipe \
+ pipe2 \
+ putenv \
+ sendfile \
+ setenv \
+ setrlimit \
+ sigaction \
+ signal \
+ splice \
+ strlcpy \
+ strsep \
+ strtok_r \
+ strtoll \
+ sysctl \
+ timerfd_create \
+ umask \
+ unsetenv \
+ usleep \
+ vasprintf \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ if test x"$ac_cv_func_strlcpy" = xno; then
+ STRLCPY_IMPL_TRUE=
+ STRLCPY_IMPL_FALSE='#'
+else
+ STRLCPY_IMPL_TRUE='#'
+ STRLCPY_IMPL_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
+$as_echo_n "checking for getaddrinfo... " >&6; }
+if ${libevent_cv_getaddrinfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+
+int
+main ()
+{
+
+ getaddrinfo;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ libevent_cv_getaddrinfo=yes
+else
+ libevent_cv_getaddrinfo=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_getaddrinfo" >&5
+$as_echo "$libevent_cv_getaddrinfo" >&6; }
+if test "$libevent_cv_getaddrinfo" = "yes" ; then
+
+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+else
+
+for ac_func in getservbyname
+do :
+ ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
+if test "x$ac_cv_func_getservbyname" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETSERVBYNAME 1
+_ACEOF
+
+fi
+done
+
+# Check for gethostbyname_r in all its glorious incompatible versions.
+# (This is cut-and-pasted from Tor, which based its logic on
+# Python's configure.in.)
+
+
+ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
+if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() wants" >&5
+$as_echo_n "checking how many arguments gethostbyname_r() wants... " >&6; }
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <netdb.h>
+
+int
+main ()
+{
+
+ char *cp1, *cp2;
+ struct hostent *h1, *h2;
+ int i1, i2;
+ (void)gethostbyname_r(cp1,h1,cp2,i1,&h2,&i2);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6" >&5
+$as_echo "6" >&6; }
+
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <netdb.h>
+
+int
+main ()
+{
+
+ char *cp1, *cp2;
+ struct hostent *h1;
+ int i1, i2;
+ (void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 5" >&5
+$as_echo "5" >&6; }
+
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <netdb.h>
+
+int
+main ()
+{
+
+ char *cp1;
+ struct hostent *h1;
+ struct hostent_data hd;
+ (void) gethostbyname_r(cp1,h1,&hd);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 3" >&5
+$as_echo "3" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0" >&5
+$as_echo "0" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$OLD_CFLAGS
+
+fi
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETFD in fcntl.h" >&5
+$as_echo_n "checking for F_SETFD in fcntl.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _GNU_SOURCE
+#include <fcntl.h>
+#ifdef F_SETFD
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+
+$as_echo "#define HAVE_SETFD 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f conftest*
+
+
+needsignal=no
+haveselect=no
+if test x$bwin32 != xtrue; then
+ for ac_func in select
+do :
+ ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
+if test "x$ac_cv_func_select" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SELECT 1
+_ACEOF
+ haveselect=yes
+fi
+done
+
+ if test "x$haveselect" = "xyes" ; then
+ needsignal=yes
+ fi
+fi
+ if test "x$haveselect" = "xyes"; then
+ SELECT_BACKEND_TRUE=
+ SELECT_BACKEND_FALSE='#'
+else
+ SELECT_BACKEND_TRUE='#'
+ SELECT_BACKEND_FALSE=
+fi
+
+
+havepoll=no
+for ac_func in poll
+do :
+ ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+ havepoll=yes
+fi
+done
+
+if test "x$havepoll" = "xyes" ; then
+ needsignal=yes
+fi
+ if test "x$havepoll" = "xyes"; then
+ POLL_BACKEND_TRUE=
+ POLL_BACKEND_FALSE='#'
+else
+ POLL_BACKEND_TRUE='#'
+ POLL_BACKEND_FALSE=
+fi
+
+
+havedevpoll=no
+if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
+
+$as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
+
+fi
+ if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
+ DEVPOLL_BACKEND_TRUE=
+ DEVPOLL_BACKEND_FALSE='#'
+else
+ DEVPOLL_BACKEND_TRUE='#'
+ DEVPOLL_BACKEND_FALSE=
+fi
+
+
+havekqueue=no
+if test "x$ac_cv_header_sys_event_h" = "xyes"; then
+ for ac_func in kqueue
+do :
+ ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue"
+if test "x$ac_cv_func_kqueue" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_KQUEUE 1
+_ACEOF
+ havekqueue=yes
+fi
+done
+
+ if test "x$havekqueue" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working kqueue" >&5
+$as_echo_n "checking for working kqueue... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/event.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int
+main(int argc, char **argv)
+{
+ int kq;
+ int n;
+ int fd[2];
+ struct kevent ev;
+ struct timespec ts;
+ char buf[8000];
+
+ if (pipe(fd) == -1)
+ exit(1);
+ if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1)
+ exit(1);
+
+ while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf))
+ ;
+
+ if ((kq = kqueue()) == -1)
+ exit(1);
+
+ memset(&ev, 0, sizeof(ev));
+ ev.ident = fd[1];
+ ev.filter = EVFILT_WRITE;
+ ev.flags = EV_ADD | EV_ENABLE;
+ n = kevent(kq, &ev, 1, NULL, 0, NULL);
+ if (n == -1)
+ exit(1);
+
+ read(fd[0], buf, sizeof(buf));
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ n = kevent(kq, NULL, 0, &ev, 1, &ts);
+ if (n == -1 || n == 0)
+ exit(1);
+
+ exit(0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_WORKING_KQUEUE 1" >>confdefs.h
+
+ havekqueue=yes
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+ if test "x$havekqueue" = "xyes"; then
+ KQUEUE_BACKEND_TRUE=
+ KQUEUE_BACKEND_FALSE='#'
+else
+ KQUEUE_BACKEND_TRUE='#'
+ KQUEUE_BACKEND_FALSE=
+fi
+
+
+haveepollsyscall=no
+haveepoll=no
+for ac_func in epoll_ctl
+do :
+ ac_fn_c_check_func "$LINENO" "epoll_ctl" "ac_cv_func_epoll_ctl"
+if test "x$ac_cv_func_epoll_ctl" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_EPOLL_CTL 1
+_ACEOF
+ haveepoll=yes
+fi
+done
+
+if test "x$haveepoll" = "xyes" ; then
+
+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+
+ needsignal=yes
+fi
+if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
+ if test "x$haveepoll" = "xno" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
+$as_echo_n "checking for epoll system call... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/epoll.h>
+#include <unistd.h>
+
+int
+epoll_create(int size)
+{
+ return (syscall(__NR_epoll_create, size));
+}
+
+int
+main(int argc, char **argv)
+{
+ int epfd;
+
+ epfd = epoll_create(256);
+ exit (epfd == -1 ? 1 : 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+
+ needsignal=yes
+ have_epoll=yes
+ case " $LIBOBJS " in
+ *" epoll_sub.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS epoll_sub.$ac_objext"
+ ;;
+esac
+
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+ if test "x$haveepoll" = "xyes"; then
+ EPOLL_BACKEND_TRUE=
+ EPOLL_BACKEND_FALSE='#'
+else
+ EPOLL_BACKEND_TRUE='#'
+ EPOLL_BACKEND_FALSE=
+fi
+
+
+haveeventports=no
+for ac_func in port_create
+do :
+ ac_fn_c_check_func "$LINENO" "port_create" "ac_cv_func_port_create"
+if test "x$ac_cv_func_port_create" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PORT_CREATE 1
+_ACEOF
+ haveeventports=yes
+fi
+done
+
+if test "x$haveeventports" = "xyes" ; then
+
+$as_echo "#define HAVE_EVENT_PORTS 1" >>confdefs.h
+
+ needsignal=yes
+fi
+ if test "x$haveeventports" = "xyes"; then
+ EVPORT_BACKEND_TRUE=
+ EVPORT_BACKEND_FALSE='#'
+else
+ EVPORT_BACKEND_TRUE='#'
+ EVPORT_BACKEND_FALSE=
+fi
+
+
+if test "x$bwin32" = "xtrue"; then
+ needsignal=yes
+fi
+
+ if test "x$needsignal" = "xyes"; then
+ SIGNAL_SUPPORT_TRUE=
+ SIGNAL_SUPPORT_FALSE='#'
+else
+ SIGNAL_SUPPORT_TRUE='#'
+ SIGNAL_SUPPORT_FALSE=
+fi
+
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+"
+if test "x$ac_cv_type_uint64_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT64_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+"
+if test "x$ac_cv_type_uint32_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT32_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+"
+if test "x$ac_cv_type_uint16_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT16_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+"
+if test "x$ac_cv_type_uint8_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT8_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+"
+if test "x$ac_cv_type_fd_mask" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FD_MASK 1
+_ACEOF
+
+
+fi
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if ${ac_cv_sizeof_long_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+$as_echo_n "checking size of size_t... " >&6; }
+if ${ac_cv_sizeof_size_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_size_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if ${ac_cv_sizeof_void_p+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (void *)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_void_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+# The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
+$as_echo_n "checking size of off_t... " >&6; }
+if ${ac_cv_sizeof_off_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (off_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
+$as_echo "$ac_cv_sizeof_off_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+_ACEOF
+
+
+
+ac_fn_c_check_type "$LINENO" "struct in6_addr" "ac_cv_type_struct_in6_addr" "#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_struct_in6_addr" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_IN6 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_sa_family_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SA_FAMILY_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ADDRINFO 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
+_ACEOF
+
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct in6_addr" "s6_addr32" "ac_cv_member_struct_in6_addr_s6_addr32" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_in6_addr_s6_addr32" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct in6_addr" "s6_addr16" "ac_cv_member_struct_in6_addr_s6_addr16" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_in6_addr_s6_addr16" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_len" "ac_cv_member_struct_sockaddr_in6_sin6_len" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_in6_sin6_len" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+"
+if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
+_ACEOF
+
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "struct so_linger" "ac_cv_type_struct_so_linger" "
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+"
+if test "x$ac_cv_type_struct_so_linger" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SO_LINGER 1
+_ACEOF
+
+#define HAVE_SO_LINGER
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
+$as_echo_n "checking for socklen_t... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+int
+main ()
+{
+socklen_t x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define socklen_t unsigned int" >>confdefs.h
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __func__" >&5
+$as_echo_n "checking whether our compiler supports __func__... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+ const char *cp = __func__;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether our compiler supports __FUNCTION__" >&5
+$as_echo_n "checking whether our compiler supports __FUNCTION__... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+ const char *cp = __FUNCTION__;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define __func__ __FUNCTION__" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define __func__ __FILE__" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+# check if we can compile with pthreads
+have_pthreads=no
+if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
+
+
+
+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
+
+# OpenLDAP --with-threads
+
+# Check whether --with-threads was given.
+if test "${with_threads+set}" = set; then :
+ withval=$with_threads;
+ ol_arg=invalid
+ for ol_val in auto nt posix mach pth lwp yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
+ fi
+ ol_with_threads="$ol_arg"
+
+else
+ ol_with_threads="auto"
+fi
+# end --with-threads
+
+
+case "$ol_with_threads$host" in
+ auto*-*-solaris2.[0-6])
+ ol_with_threads=no
+ ;;
+esac
+
+
+ol_aix_threads=no
+case "$host" in
+*-*-aix*) if test -z "$CC" ; then
+ case "$ol_with_threads" in
+ auto | yes | posix) ol_aix_threads=yes ;;
+ esac
+ fi
+;;
+esac
+
+if test $ol_aix_threads = yes ; then
+ if test -z "${CC}" ; then
+ for ac_prog in cc_r xlc_r cc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+done
+
+
+ if test "$CC" = cc ; then
+ if test $ol_with_threads != auto ; then
+ as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
+$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+ fi
+ ol_with_threads=no
+ fi
+ fi
+
+ case ${CC} in cc_r | xlc_r)
+ ol_with_threads=posix
+ ol_cv_pthread_create=yes
+ ;;
+ esac
+fi
+
+ol_link_threads=no
+# OpenLDAP --with-yielding_select
+
+# Check whether --with-yielding_select was given.
+if test "${with_yielding_select+set}" = set; then :
+ withval=$with_yielding_select;
+ ol_arg=invalid
+ for ol_val in auto yes no manual ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
+ fi
+ ol_with_yielding_select="$ol_arg"
+
+else
+ ol_with_yielding_select="auto"
+fi
+# end --with-yielding_select
+
+
+case $ol_with_threads in auto | yes | nt)
+
+
+ ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
+if test "x$ac_cv_func__beginthread" = xyes; then :
+
+fi
+
+
+ if test $ac_cv_func__beginthread = yes ; then
+
+$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
+
+ ol_cv_nt_threads=yes
+ fi
+
+
+ if test "$ol_cv_nt_threads" = yes ; then
+ ol_link_threads=nt
+ ol_with_threads=found
+ ol_with_yielding_select=yes
+
+
+$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
+
+ fi
+
+ if test $ol_with_threads = nt ; then
+ as_fn_error $? "could not locate NT Threads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | posix)
+
+ for ac_header in pthread.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_pthread_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
+$as_echo_n "checking POSIX thread version... " >&6; }
+if ${ol_cv_pthread_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+
+int
+main ()
+{
+
+ int i = PTHREAD_CREATE_JOINABLE;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_detach" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=10
+else
+ ol_cv_pthread_version=8
+fi
+rm -f conftest*
+
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+# ifdef PTHREAD_CREATE_UNDETACHED
+ draft7
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft7" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=7
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <pthread.h>
+#ifdef PTHREAD_MUTEX_INITIALIZER
+ draft5
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "draft5" >/dev/null 2>&1; then :
+ ol_cv_pthread_version=5
+else
+ ol_cv_pthread_version=4
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
+$as_echo "$ol_cv_pthread_version" >&6; }
+
+
+ if test $ol_cv_pthread_version != 0 ; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREADS $ol_cv_pthread_version
+_ACEOF
+
+ else
+ as_fn_error $? "unknown pthread version" "$LINENO" 5
+ fi
+
+ # consider threads found
+ ol_with_threads=found
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
+else
+ ol_cv_header_linux_threads=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
+
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
+$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
+if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+#ifdef _POSIX_THREAD_IS_GNU_PTH
+ __gnu_pth__;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
+ ol_cv_header_gnu_pth_pthread_h=yes
+else
+ ol_cv_header_gnu_pth_pthread_h=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
+$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
+
+
+ if test $ol_cv_header_gnu_pth_pthread_h = no ; then
+ for ac_header in sched.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
+if test "x$ac_cv_header_sched_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SCHED_H 1
+_ACEOF
+
+fi
+
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
+$as_echo_n "checking for pthread_create in default libraries... " >&6; }
+if ${ol_cv_pthread_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_create=yes
+else
+ ol_cv_pthread_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_create=yes
+else
+ ol_cv_pthread_create=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
+$as_echo "$ol_cv_pthread_create" >&6; }
+
+ if test $ol_cv_pthread_create != no ; then
+ ol_link_threads=posix
+ ol_link_pthreads=""
+ fi
+
+ # Pthread try link: -kthread (ol_cv_pthread_kthread)
+if test "$ol_link_threads" = no ; then
+ # try -kthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
+$as_echo_n "checking for pthread link with -kthread... " >&6; }
+if ${ol_cv_pthread_kthread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-kthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_kthread=yes
+else
+ ol_cv_pthread_kthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_kthread=yes
+else
+ ol_cv_pthread_kthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
+$as_echo "$ol_cv_pthread_kthread" >&6; }
+
+ if test $ol_cv_pthread_kthread = yes ; then
+ ol_link_pthreads="-kthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -pthread (ol_cv_pthread_pthread)
+if test "$ol_link_threads" = no ; then
+ # try -pthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
+$as_echo_n "checking for pthread link with -pthread... " >&6; }
+if ${ol_cv_pthread_pthread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_pthread=yes
+else
+ ol_cv_pthread_pthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_pthread=yes
+else
+ ol_cv_pthread_pthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
+$as_echo "$ol_cv_pthread_pthread" >&6; }
+
+ if test $ol_cv_pthread_pthread = yes ; then
+ ol_link_pthreads="-pthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
+if test "$ol_link_threads" = no ; then
+ # try -pthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
+$as_echo_n "checking for pthread link with -pthreads... " >&6; }
+if ${ol_cv_pthread_pthreads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-pthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_pthreads=yes
+else
+ ol_cv_pthread_pthreads=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_pthreads=yes
+else
+ ol_cv_pthread_pthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
+$as_echo "$ol_cv_pthread_pthreads" >&6; }
+
+ if test $ol_cv_pthread_pthreads = yes ; then
+ ol_link_pthreads="-pthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
+if test "$ol_link_threads" = no ; then
+ # try -mthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
+$as_echo_n "checking for pthread link with -mthreads... " >&6; }
+if ${ol_cv_pthread_mthreads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-mthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
+else
+ ol_cv_pthread_mthreads=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_mthreads=yes
+else
+ ol_cv_pthread_mthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
+$as_echo "$ol_cv_pthread_mthreads" >&6; }
+
+ if test $ol_cv_pthread_mthreads = yes ; then
+ ol_link_pthreads="-mthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -thread (ol_cv_pthread_thread)
+if test "$ol_link_threads" = no ; then
+ # try -thread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
+$as_echo_n "checking for pthread link with -thread... " >&6; }
+if ${ol_cv_pthread_thread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-thread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_thread=yes
+else
+ ol_cv_pthread_thread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_thread=yes
+else
+ ol_cv_pthread_thread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
+$as_echo "$ol_cv_pthread_thread" >&6; }
+
+ if test $ol_cv_pthread_thread = yes ; then
+ ol_link_pthreads="-thread"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -lmach -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthread_lmach_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
+
+ if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthread -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread -Wl,-woff,85
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
+if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread -Wl,-woff,85 $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
+else
+ ol_cv_pthread_lib_lpthread_woff=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lib_lpthread_woff=yes
+else
+ ol_cv_pthread_lib_lpthread_woff=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
+$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
+
+ if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
+ ol_link_pthreads="-lpthread -Wl,-woff,85"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
+if test "$ol_link_threads" = no ; then
+ # try -lpthread
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
+$as_echo_n "checking for pthread link with -lpthread... " >&6; }
+if ${ol_cv_pthread_lpthread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthread $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
+else
+ ol_cv_pthread_lpthread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthread=yes
+else
+ ol_cv_pthread_lpthread=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
+$as_echo "$ol_cv_pthread_lpthread" >&6; }
+
+ if test $ol_cv_pthread_lpthread = yes ; then
+ ol_link_pthreads="-lpthread"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
+$as_echo_n "checking for pthread link with -lc_r... " >&6; }
+if ${ol_cv_pthread_lc_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lc_r=yes
+else
+ ol_cv_pthread_lc_r=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lc_r=yes
+else
+ ol_cv_pthread_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
+$as_echo "$ol_cv_pthread_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lc_r = yes ; then
+ ol_link_pthreads="-lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -threads (ol_cv_pthread_threads)
+if test "$ol_link_threads" = no ; then
+ # try -threads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
+$as_echo_n "checking for pthread link with -threads... " >&6; }
+if ${ol_cv_pthread_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-threads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_threads=yes
+else
+ ol_cv_pthread_threads=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_threads=yes
+else
+ ol_cv_pthread_threads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
+$as_echo "$ol_cv_pthread_threads" >&6; }
+
+ if test $ol_cv_pthread_threads = yes ; then
+ ol_link_pthreads="-threads"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc -lc_r
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
+
+ if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lmach -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lmach -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lmach_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lmach_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
+
+ if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lmach -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+ # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads -lexc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
+$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
+if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads -lexc $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lexc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lpthreads_lexc=yes
+else
+ ol_cv_pthread_lpthreads_lexc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
+$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
+
+ if test $ol_cv_pthread_lpthreads_lexc = yes ; then
+ ol_link_pthreads="-lpthreads -lexc"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
+if test "$ol_link_threads" = no ; then
+ # try -lpthreads
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
+$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
+if ${ol_cv_pthread_lib_lpthreads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="-lpthreads $LIBS"
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+int
+main ()
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_pthread_lib_lpthreads=yes
+else
+ ol_cv_pthread_lib_lpthreads=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_lib_lpthreads=yes
+else
+ ol_cv_pthread_lib_lpthreads=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
+$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
+
+ if test $ol_cv_pthread_lib_lpthreads = yes ; then
+ ol_link_pthreads="-lpthreads"
+ ol_link_threads=posix
+ fi
+fi
+
+
+ if test $ol_link_threads != no ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
+
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+
+ for ac_func in sched_yield pthread_yield thr_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test $ac_cv_func_thr_yield = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rt_sched_yield=yes
+else
+ ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+ LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+
+$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
+
+ ac_cv_func_sched_yield=yes
+else
+ ac_cv_func_sched_yield=no
+fi
+
+ fi
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test "$ac_cv_func_thr_yield" = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
+$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+ fi
+
+ for ac_func in pthread_kill
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
+if test "x$ac_cv_func_pthread_kill" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL 1
+_ACEOF
+
+fi
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
+$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <pthread.h>
+pthread_rwlock_t rwlock;
+
+int
+main ()
+{
+pthread_rwlock_destroy(&rwlock);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_rwlock_destroy=yes
+else
+ ol_cv_func_pthread_rwlock_destroy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
+$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
+ if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
+
+$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
+$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
+if ${ol_cv_func_pthread_detach+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+int
+main ()
+{
+pthread_detach(NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_func_pthread_detach=yes
+else
+ ol_cv_func_pthread_detach=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
+$as_echo "$ol_cv_func_pthread_detach" >&6; }
+
+ if test $ol_cv_func_pthread_detach = no ; then
+ as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
+ fi
+
+
+$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
+
+
+ for ac_func in \
+ pthread_setconcurrency \
+ pthread_getconcurrency \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+ for ac_func in pthread_kill_other_threads_np
+do :
+ ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
+if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
+_ACEOF
+
+fi
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
+$as_echo_n "checking for LinuxThreads implementation... " >&6; }
+if ${ol_cv_sys_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
+$as_echo "$ol_cv_sys_linux_threads" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
+$as_echo_n "checking for LinuxThreads consistency... " >&6; }
+if ${ol_cv_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ol_cv_header_linux_threads = yes &&
+ test $ol_cv_sys_linux_threads = yes; then
+ ol_cv_linux_threads=yes
+ elif test $ol_cv_header_linux_threads = no &&
+ test $ol_cv_sys_linux_threads = no; then
+ ol_cv_linux_threads=no
+ else
+ ol_cv_linux_threads=error
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
+$as_echo "$ol_cv_linux_threads" >&6; }
+
+
+ if test $ol_cv_linux_threads = error; then
+ as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
+$as_echo_n "checking if pthread_create() works... " >&6; }
+if ${ol_cv_pthread_create_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_create_works=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_create_works=yes
+else
+ ol_cv_pthread_create_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
+$as_echo "$ol_cv_pthread_create_works" >&6; }
+
+ if test $ol_cv_pthread_create_works = no ; then
+ as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
+ fi
+
+ ol_replace_broken_yield=no
+
+ if test $ol_replace_broken_yield = yes ; then
+
+$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
+
+ fi
+
+ if test x$ol_with_yielding_select = xauto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
+$as_echo_n "checking if select yields when using pthreads... " >&6; }
+if ${ol_cv_pthread_select_yields+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ ol_cv_pthread_select_yields=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*) 0
+#endif
+
+static int fildes[2];
+
+static void *task(p)
+ void *p;
+{
+ int i;
+ struct timeval tv;
+
+ fd_set rfds;
+
+ tv.tv_sec=10;
+ tv.tv_usec=0;
+
+ FD_ZERO(&rfds);
+ FD_SET(fildes[0], &rfds);
+
+ /* we're not interested in any fds */
+ i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
+
+ if(i < 0) {
+ perror("select");
+ exit(10);
+ }
+
+ exit(0); /* if we exit here, the select blocked the whole process */
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t t;
+
+ /* create a pipe to select */
+ if(pipe(&fildes[0])) {
+ perror("select");
+ exit(1);
+ }
+
+#ifdef HAVE_PTHREAD_SETCONCURRENCY
+ (void) pthread_setconcurrency(2);
+#else
+#ifdef HAVE_THR_SETCONCURRENCY
+ /* Set Solaris LWP concurrency to 2 */
+ thr_setconcurrency(2);
+#endif
+#endif
+
+#if HAVE_PTHREADS < 6
+ pthread_create(&t, pthread_attr_default, task, NULL);
+#else
+ pthread_create(&t, NULL, task, NULL);
+#endif
+
+ /* make sure task runs first */
+#ifdef HAVE_THR_YIELD
+ thr_yield();
+#elif defined( HAVE_SCHED_YIELD )
+ sched_yield();
+#elif defined( HAVE_PTHREAD_YIELD )
+ pthread_yield();
+#endif
+
+ exit(2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ol_cv_pthread_select_yields=no
+else
+ ol_cv_pthread_select_yields=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
+$as_echo "$ol_cv_pthread_select_yields" >&6; }
+
+ if test $ol_cv_pthread_select_yields = cross ; then
+ as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
+ fi
+
+ if test $ol_cv_pthread_select_yields = yes ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
+ fi
+ fi
+
+ if test $ol_with_threads = posix ; then
+ as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | mach)
+
+ for ac_header in mach/cthreads.h cthreads.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_mach_cthreads_h = yes ; then
+ ol_with_threads=found
+
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
+fi
+
+
+ if test $ol_link_threads = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
+$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
+if ${ol_cv_cthread_all_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ save_LIBS="$LIBS"
+ LIBS="-all_load $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <mach/cthreads.h>
+int
+main ()
+{
+
+ cthread_fork((void *)0, (void *)0);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_cthread_all_load=yes
+else
+ ol_cv_cthread_all_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
+$as_echo "$ol_cv_cthread_all_load" >&6; }
+
+ if test $ol_cv_cthread_all_load = yes ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
+ ol_link_threads=mach
+ ol_with_threads=found
+ fi
+ fi
+
+ elif test $ac_cv_header_cthreads_h = yes ; then
+
+ ol_with_threads=found
+
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lthreads"
+ ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
+if test "x$ac_cv_func_cthread_fork" = xyes; then :
+ ol_link_threads=yes
+fi
+
+ LIBS="$save_LIBS"
+
+ if test $ol_link_threads = yes ; then
+ LTHREAD_LIBS="-lthreads"
+ ol_link_threads=mach
+ ol_with_threads=found
+ else
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+
+ elif test $ol_with_threads = mach ; then
+ as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
+ fi
+
+ if test $ol_link_threads = mach ; then
+
+$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
+
+ elif test $ol_with_threads = found ; then
+ as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | pth)
+
+ for ac_header in pth.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PTH_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_pth_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
+$as_echo_n "checking for pth_version in -lpth... " >&6; }
+if ${ac_cv_lib_pth_pth_version+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpth $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pth_version ();
+int
+main ()
+{
+return pth_version ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pth_pth_version=yes
+else
+ ac_cv_lib_pth_pth_version=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
+$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
+if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
+ have_pth=yes
+else
+ have_pth=no
+fi
+
+
+ if test $have_pth = yes ; then
+
+$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
+ ol_link_threads=pth
+ ol_with_threads=found
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | lwp)
+
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_thread_h = yes &&
+ test $ac_cv_header_synch_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
+$as_echo_n "checking for thr_create in -lthread... " >&6; }
+if ${ac_cv_lib_thread_thr_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char thr_create ();
+int
+main ()
+{
+return thr_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_thread_thr_create=yes
+else
+ ac_cv_lib_thread_thr_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
+$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
+if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
+ have_thr=yes
+else
+ have_thr=no
+fi
+
+
+ if test $have_thr = yes ; then
+
+$as_echo "#define HAVE_THR 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
+ ol_link_threads=thr
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+
+ for ac_func in \
+ thr_setconcurrency \
+ thr_getconcurrency \
+
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+ fi
+
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_lwp_lwp_h = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
+$as_echo_n "checking for lwp_create in -llwp... " >&6; }
+if ${ac_cv_lib_lwp_lwp_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llwp $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lwp_create ();
+int
+main ()
+{
+return lwp_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lwp_lwp_create=yes
+else
+ ac_cv_lib_lwp_lwp_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
+$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
+if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
+ have_lwp=yes
+else
+ have_lwp=no
+fi
+
+
+ if test $have_lwp = yes ; then
+
+$as_echo "#define HAVE_LWP 1" >>confdefs.h
+
+ LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
+ ol_link_threads=lwp
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=no
+ fi
+ fi
+ fi
+ ;;
+esac
+
+if test $ol_with_yielding_select = yes ; then
+
+$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
+
+fi
+
+if test $ol_with_threads = manual ; then
+ ol_link_threads=yes
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
+$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
+
+ for ac_header in pthread.h sched.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in sched_yield pthread_yield
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
+$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
+if ${ol_cv_header_linux_threads+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
+ ol_cv_header_linux_threads=yes
+else
+ ol_cv_header_linux_threads=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
+$as_echo "$ol_cv_header_linux_threads" >&6; }
+ if test $ol_cv_header_linux_threads = yes; then
+
+$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
+
+ fi
+
+
+ for ac_header in mach/cthreads.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
+if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MACH_CTHREADS_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in lwp/lwp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
+if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LWP_LWP_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in thread.h synch.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+fi
+
+if test $ol_link_threads != no && test $ol_link_threads != nt ; then
+
+$as_echo "#define REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define _REENTRANT 1" >>confdefs.h
+
+
+$as_echo "#define THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
+
+
+$as_echo "#define THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _THREADSAFE 1" >>confdefs.h
+
+
+$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
+$as_echo_n "checking for thread specific errno... " >&6; }
+if ${ol_cv_errno_thread_specific+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+errno = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_errno_thread_specific=yes
+else
+ ol_cv_errno_thread_specific=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
+$as_echo "$ol_cv_errno_thread_specific" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
+$as_echo_n "checking for thread specific h_errno... " >&6; }
+if ${ol_cv_h_errno_thread_specific+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netdb.h>
+int
+main ()
+{
+h_errno = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ol_cv_h_errno_thread_specific=yes
+else
+ ol_cv_h_errno_thread_specific=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
+$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
+
+ if test $ol_cv_errno_thread_specific != yes ||
+ test $ol_cv_h_errno_thread_specific != yes ; then
+ LIBS="$LTHREAD_LIBS $LIBS"
+ LTHREAD_LIBS=""
+ fi
+
+fi
+
+if test $ol_link_threads = no ; then
+ if test $ol_with_threads = yes ; then
+ as_fn_error $? "no suitable thread support" "$LINENO" 5
+ fi
+
+ if test $ol_with_threads = auto ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
+$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+ ol_with_threads=no
+ fi
+
+
+$as_echo "#define NO_THREADS 1" >>confdefs.h
+
+ LTHREAD_LIBS=""
+ BUILD_THREAD=no
+else
+ BUILD_THREAD=yes
+fi
+
+if test $ol_link_threads != no ; then
+
+$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
+
+fi
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+case "$ol_with_threads" in
+ no)
+ ol_pthread_ok=no
+
+ ;;
+ *)
+
+ have_pthreads=yes
+ PTHREAD_LIBS="$LTHREAD_LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ # The cast to long int 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
+$as_echo_n "checking size of pthread_t... " >&6; }
+if ${ac_cv_sizeof_pthread_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
+ $ac_includes_default
+ #include <pthread.h>
+
+
+"; then :
+
+else
+ if test "$ac_cv_type_pthread_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (pthread_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_pthread_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
+$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
+_ACEOF
+
+
+
+ ;;
+esac
+
+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
+
+
+fi
+
+
+ if test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"; then
+ PTHREADS_TRUE=
+ PTHREADS_FALSE='#'
+else
+ PTHREADS_TRUE='#'
+ PTHREADS_FALSE=
+fi
+
+
+# check if we should compile locking into the library
+if test x$enable_thread_support = xno; then
+
+$as_echo "#define DISABLE_THREAD_SUPPORT 1" >>confdefs.h
+
+fi
+
+# check if we should hard-code the mm functions.
+if test x$enable_malloc_replacement = xno; then
+
+$as_echo "#define DISABLE_MM_REPLACEMENT 1" >>confdefs.h
+
+fi
+
+# check if we should hard-code debugging out
+if test x$enable_debug_mode = xno; then
+
+$as_echo "#define DISABLE_DEBUG_MODE 1" >>confdefs.h
+
+fi
+
+# check if we should enable verbose debugging
+if test x$enable_verbose_debug = xyes; then
+ CFLAGS="$CFLAGS -DUSE_DEBUG"
+fi
+
+# check if we have and should use openssl
+ if test "$enable_openssl" != "no" && test "$have_openssl" = "yes"; then
+ OPENSSL_TRUE=
+ OPENSSL_FALSE='#'
+else
+ OPENSSL_TRUE='#'
+ OPENSSL_FALSE=
+fi
+
+
+# Add some more warnings which we use in development but not in the
+# released versions. (Some relevant gcc versions can't handle these.)
+if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__GNUC__) || (__GNUC__ < 4)
+#error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_gcc4=yes
+else
+ have_gcc4=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
+#error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_gcc42=yes
+else
+ have_gcc42=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+#error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_gcc45=yes
+else
+ have_gcc45=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__clang__)
+#error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_clang=yes
+else
+ have_clang=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ if test x$enable_gcc_warnings = xyes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+
+ CFLAGS="$CFLAGS -Wno-unused-parameter -Wstrict-aliasing"
+
+ if test x$have_gcc4 = xyes ; then
+ # These warnings break gcc 3.3.5 and work on gcc 4.0.2
+ CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement"
+ #CFLAGS="$CFLAGS -Wold-style-definition"
+ fi
+
+ if test x$have_gcc42 = xyes ; then
+ # These warnings break gcc 4.0.2 and work on gcc 4.2
+ CFLAGS="$CFLAGS -Waddress"
+ fi
+
+ if test x$have_gcc42 = xyes && test x$have_clang = xno; then
+ # These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
+ CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
+ fi
+
+ if test x$have_gcc45 = xyes ; then
+ # These warnings work on gcc 4.5
+ CFLAGS="$CFLAGS -Wlogical-op"
+ fi
+
+ if test x$have_clang = xyes; then
+ # Disable the unused-function warnings, because these trigger
+ # for minheap-internal.h related code.
+ CFLAGS="$CFLAGS -Wno-unused-function"
+
+ # clang on macosx emits warnigns for each directory specified which
+ # isn't "used" generating a lot of build noise (typically 3 warnings
+ # per file
+ case "$host_os" in
+ darwin*)
+ CFLAGS="$CFLAGS -Qunused-arguments"
+ ;;
+ esac
+ fi
+
+##This will break the world on some 64-bit architectures
+# CFLAGS="$CFLAGS -Winline"
+
+fi
+
+LIBEVENT_GC_SECTIONS=
+if test "$GCC" = yes && test "$enable_function_sections" = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
+$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
+if ${libevent_cv_gc_sections_runs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ origCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wl,--gc-sections"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <stdio.h>
+
+int
+main ()
+{
+
+ FILE * fpC;
+ char buf[32];
+ size_t cch;
+ int read_success_once;
+
+ fpC = fopen("conftest.c", "r");
+ if (NULL == fpC)
+ exit(1);
+ do {
+ cch = fread(buf, sizeof(buf), 1, fpC);
+ read_success_once |= (0 != cch);
+ } while (0 != cch);
+ if (!read_success_once)
+ exit(2);
+ if (!feof(fpC))
+ exit(3);
+ if (0 != fclose(fpC))
+ exit(4);
+
+ exit(EXIT_SUCCESS);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
+ libevent_cv_gc_sections_runs=no
+ else
+ libevent_cv_gc_sections_runs=no
+ ./conftest >/dev/null 2>&1 && libevent_cv_gc_sections_runs=yes
+ fi
+
+else
+ libevent_cv_gc_sections_runs=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$origCFLAGS"
+ { origCFLAGS=; unset origCFLAGS;}
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libevent_cv_gc_sections_runs" >&5
+$as_echo "$libevent_cv_gc_sections_runs" >&6; }
+ case "$libevent_cv_gc_sections_runs" in
+ yes)
+ CFLAGS="-ffunction-sections -fdata-sections $CFLAGS"
+ LIBEVENT_GC_SECTIONS="-Wl,--gc-sections"
+ ;;
+ esac
+fi
+
+
+ if test "$enable_libevent_install" = "yes"; then
+ INSTALL_LIBEVENT_TRUE=
+ INSTALL_LIBEVENT_FALSE='#'
+else
+ INSTALL_LIBEVENT_TRUE='#'
+ INSTALL_LIBEVENT_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files libevent.pc libevent_openssl.pc libevent_pthreads.pc"
+
+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, we kill variables containing newlines.
+# 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.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ 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}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_REGRESS_TRUE}" && test -z "${BUILD_REGRESS_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_REGRESS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ZLIB_REGRESS_TRUE}" && test -z "${ZLIB_REGRESS_FALSE}"; then
+ as_fn_error $? "conditional \"ZLIB_REGRESS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${OPENSSL_TRUE}" && test -z "${OPENSSL_FALSE}"; then
+ as_fn_error $? "conditional \"OPENSSL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_WIN32_TRUE}" && test -z "${BUILD_WIN32_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_CYGWIN_TRUE}" && test -z "${BUILD_CYGWIN_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_CYGWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_WITH_NO_UNDEFINED_TRUE}" && test -z "${BUILD_WITH_NO_UNDEFINED_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_WITH_NO_UNDEFINED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${STRLCPY_IMPL_TRUE}" && test -z "${STRLCPY_IMPL_FALSE}"; then
+ as_fn_error $? "conditional \"STRLCPY_IMPL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SELECT_BACKEND_TRUE}" && test -z "${SELECT_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"SELECT_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${POLL_BACKEND_TRUE}" && test -z "${POLL_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"POLL_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DEVPOLL_BACKEND_TRUE}" && test -z "${DEVPOLL_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"DEVPOLL_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${KQUEUE_BACKEND_TRUE}" && test -z "${KQUEUE_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"KQUEUE_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${EPOLL_BACKEND_TRUE}" && test -z "${EPOLL_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"EPOLL_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${EVPORT_BACKEND_TRUE}" && test -z "${EVPORT_BACKEND_FALSE}"; then
+ as_fn_error $? "conditional \"EVPORT_BACKEND\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${SIGNAL_SUPPORT_TRUE}" && test -z "${SIGNAL_SUPPORT_FALSE}"; then
+ as_fn_error $? "conditional \"SIGNAL_SUPPORT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
+ as_fn_error $? "conditional \"PTHREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${OPENSSL_TRUE}" && test -z "${OPENSSL_FALSE}"; then
+ as_fn_error $? "conditional \"OPENSSL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_LIBEVENT_TRUE}" && test -z "${INSTALL_LIBEVENT_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_LIBEVENT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $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}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+ ;;
+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
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# 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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by libevent $as_me 2.1.3-alpha-dev, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ 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 the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+libevent config.status 2.1.3-alpha-dev
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ 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 || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "evconfig-private.h") CONFIG_HEADERS="$CONFIG_HEADERS evconfig-private.h:evconfig-private.h.in" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "libevent.pc") CONFIG_FILES="$CONFIG_FILES libevent.pc" ;;
+ "libevent_openssl.pc") CONFIG_FILES="$CONFIG_FILES libevent_openssl.pc" ;;
+ "libevent_pthreads.pc") CONFIG_FILES="$CONFIG_FILES libevent_pthreads.pc" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ 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 against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #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.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # 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. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_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
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. 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 "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# 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 || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/sntp/libevent/configure.ac b/sntp/libevent/configure.ac
new file mode 100644
index 000000000000..c60c7ace87f6
--- /dev/null
+++ b/sntp/libevent/configure.ac
@@ -0,0 +1,919 @@
+dnl Copyright 2000-2007 Niels Provos
+dnl Copyright 2007-2012 Niels Provos and Nick Mathewson
+dnl
+dnl See LICENSE for copying information.
+dnl
+dnl Original version Dug Song <dugsong@monkey.org>
+
+AC_INIT(libevent,2.1.3-alpha-dev)
+AC_PREREQ(2.59)
+AC_CONFIG_SRCDIR(event.c)
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE
+dnl AM_SILENT_RULES req. automake 1.11. [no] defaults V=1
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_CONFIG_HEADERS(config.h evconfig-private.h:evconfig-private.h.in)
+AC_DEFINE(NUMERIC_VERSION, 0x02010301, [Numeric representation of the version])
+
+dnl Initialize prefix.
+if test "$prefix" = "NONE"; then
+ prefix="/usr/local"
+fi
+
+dnl Try and get a full POSIX environment on obscure systems
+ifdef([AC_USE_SYSTEM_EXTENSIONS], [
+AC_USE_SYSTEM_EXTENSIONS
+], [
+AC_AIX
+AC_GNU_SOURCE
+AC_MINIX
+])
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+dnl the 'build' machine is where we run configure and compile
+dnl the 'host' machine is where the resulting stuff runs.
+
+#case "$host_os" in
+#
+# osf5*)
+# CFLAGS="$CFLAGS -D_OSF_SOURCE"
+# ;;
+#esac
+
+dnl Checks for programs.
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+AC_PROG_LN_S
+# AC_PROG_MKDIR_P - $(MKDIR_P) should be defined by AM_INIT_AUTOMAKE
+
+# AC_PROG_SED is only available in Autoconf >= 2.59b; workaround for older
+# versions
+ifdef([AC_PROG_SED], [AC_PROG_SED], [
+AC_CHECK_PROGS(SED, [gsed sed])
+])
+
+AC_PROG_GCC_TRADITIONAL
+
+# We need to test for at least gcc 2.95 here, because older versions don't
+# have -fno-strict-aliasing
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 95)
+#error
+#endif])], have_gcc295=yes, have_gcc295=no)
+
+if test "$GCC" = "yes" ; then
+ # Enable many gcc warnings by default...
+ CFLAGS="$CFLAGS -Wall"
+ # And disable the strict-aliasing optimization, since it breaks
+ # our sockaddr-handling code in strange ways.
+ if test x$have_gcc295 = xyes; then
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
+ fi
+fi
+
+# OS X Lion started deprecating the system openssl. Let's just disable
+# all deprecation warnings on OS X.
+case "$host_os" in
+
+ darwin*)
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+ ;;
+esac
+
+AC_ARG_ENABLE(gcc-warnings,
+ AS_HELP_STRING(--disable-gcc-warnings, disable verbose warnings with GCC))
+
+AC_ARG_ENABLE(gcc-hardening,
+ AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
+[if test x$enableval = xyes; then
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
+ CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
+ CFLAGS="$CFLAGS --param ssp-buffer-size=1"
+fi])
+
+AC_ARG_ENABLE(thread-support,
+ AS_HELP_STRING(--disable-thread-support, disable support for threading),
+ [], [enable_thread_support=yes])
+AC_ARG_ENABLE(malloc-replacement,
+ AS_HELP_STRING(--disable-malloc-replacement, disable support for replacing the memory mgt functions),
+ [], [enable_malloc_replacement=yes])
+AC_ARG_ENABLE(openssl,
+ AS_HELP_STRING(--disable-openssl, disable support for openssl encryption),
+ [], [enable_openssl=yes])
+AC_ARG_ENABLE(debug-mode,
+ AS_HELP_STRING(--disable-debug-mode, disable support for running in debug mode),
+ [], [enable_debug_mode=yes])
+AC_ARG_ENABLE([libevent-install],
+ AS_HELP_STRING([--disable-libevent-install, disable installation of libevent]),
+ [], [enable_libevent_install=yes])
+AC_ARG_ENABLE([libevent-regress],
+ AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]),
+ [], [enable_libevent_regress=yes])
+AC_ARG_ENABLE([function-sections],
+ AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-sections]),
+ [], [enable_function_sections=no])
+AC_ARG_ENABLE([verbose-debug],
+ AS_HELP_STRING([--enable-verbose-debug, verbose debug logging]),
+ [], [enable_verbose_debug=no])
+
+
+AC_PROG_LIBTOOL
+
+dnl Uncomment "AC_DISABLE_SHARED" to make shared libraries not get
+dnl built by default. You can also turn shared libs on and off from
+dnl the command line with --enable-shared and --disable-shared.
+dnl AC_DISABLE_SHARED
+AC_SUBST(LIBTOOL_DEPS)
+
+AM_CONDITIONAL([BUILD_REGRESS], [test "$enable_libevent_regress" = "yes"])
+
+dnl Checks for libraries.
+AC_SEARCH_LIBS([inet_ntoa], [nsl])
+AC_SEARCH_LIBS([socket], [socket])
+AC_SEARCH_LIBS([inet_aton], [resolv])
+AC_SEARCH_LIBS([clock_gettime], [rt])
+AC_SEARCH_LIBS([sendfile], [sendfile])
+
+dnl - check if the macro _WIN32 is defined on this compiler.
+dnl - (this is how we check for a windows compiler)
+AC_MSG_CHECKING(for WIN32)
+AC_TRY_COMPILE(,
+ [
+#ifndef _WIN32
+die horribly
+#endif
+ ],
+ bwin32=true; AC_MSG_RESULT(yes),
+ bwin32=false; AC_MSG_RESULT(no),
+)
+
+dnl - check if the macro __CYGWIN__ is defined on this compiler.
+dnl - (this is how we check for a cygwin version of GCC)
+AC_MSG_CHECKING(for CYGWIN)
+AC_TRY_COMPILE(,
+ [
+#ifndef __CYGWIN__
+die horribly
+#endif
+ ],
+ cygwin=true; AC_MSG_RESULT(yes),
+ cygwin=false; AC_MSG_RESULT(no),
+)
+
+AC_CHECK_HEADERS([zlib.h])
+
+if test "x$ac_cv_header_zlib_h" = "xyes"; then
+dnl Determine if we have zlib for regression tests
+dnl Don't put this one in LIBS
+save_LIBS="$LIBS"
+LIBS=""
+ZLIB_LIBS=""
+have_zlib=no
+AC_SEARCH_LIBS([inflateEnd], [z],
+ [have_zlib=yes
+ ZLIB_LIBS="$LIBS"
+ AC_DEFINE(HAVE_LIBZ, 1, [Define if the system has zlib])])
+LIBS="$save_LIBS"
+AC_SUBST(ZLIB_LIBS)
+fi
+AM_CONDITIONAL(ZLIB_REGRESS, [test "$have_zlib" = "yes"])
+
+dnl See if we have openssl. This doesn't go in LIBS either.
+if test "$bwin32" = true; then
+ EV_LIB_WS32=-lws2_32
+ EV_LIB_GDI=-lgdi32
+else
+ EV_LIB_WS32=
+ EV_LIB_GDI=
+fi
+AC_SUBST(EV_LIB_WS32)
+AC_SUBST(EV_LIB_GDI)
+AC_SUBST(OPENSSL_LIBADD)
+
+AC_SYS_LARGEFILE
+
+LIBEVENT_OPENSSL
+
+dnl Checks for header files.
+AC_CHECK_HEADERS([ \
+ arpa/inet.h \
+ fcntl.h \
+ ifaddrs.h \
+ mach/mach_time.h \
+ netdb.h \
+ netinet/in.h \
+ netinet/in6.h \
+ netinet/tcp.h \
+ poll.h \
+ port.h \
+ stdarg.h \
+ stddef.h \
+ sys/devpoll.h \
+ sys/epoll.h \
+ sys/event.h \
+ sys/eventfd.h \
+ sys/ioctl.h \
+ sys/mman.h \
+ sys/param.h \
+ sys/queue.h \
+ sys/resource.h \
+ sys/select.h \
+ sys/sendfile.h \
+ sys/socket.h \
+ sys/stat.h \
+ sys/time.h \
+ sys/timerfd.h \
+ sys/uio.h \
+ sys/wait.h \
+])
+
+AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+])
+if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
+ AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/queue.h>
+#ifdef TAILQ_FOREACH
+ yes
+#endif
+], [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TAILQFOREACH, 1,
+ [Define if TAILQ_FOREACH is defined in <sys/queue.h>])],
+ AC_MSG_RESULT(no)
+ )
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timeradd in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timeradd
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERADD, 1,
+ [Define if timeradd is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timercmp in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timercmp
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERCMP, 1,
+ [Define if timercmp is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timerclear in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timerclear
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERCLEAR, 1,
+ [Define if timerclear is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_time_h" = "xyes"; then
+ AC_MSG_CHECKING(for timerisset in sys/time.h)
+ AC_EGREP_CPP(yes,
+[
+#include <sys/time.h>
+#ifdef timerisset
+ yes
+#endif
+], [ AC_DEFINE(HAVE_TIMERISSET, 1,
+ [Define if timerisset is defined in <sys/time.h>])
+ AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no)
+)
+fi
+
+if test "x$ac_cv_header_sys_sysctl_h" = "xyes"; then
+ AC_CHECK_DECLS([CTL_KERN, KERN_RANDOM, RANDOM_UUID, KERN_ARND], [], [],
+ [[#include <sys/types.h>
+ #include <sys/sysctl.h>]]
+ )
+fi
+
+AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue)
+AM_CONDITIONAL(BUILD_CYGWIN, test x$cygwin = xtrue)
+AM_CONDITIONAL(BUILD_WITH_NO_UNDEFINED, test x$bwin32 = xtrue || test x$cygwin = xtrue)
+
+if test x$bwin32 = xtrue; then
+ AC_SEARCH_LIBS([getservbyname],[ws2_32])
+fi
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_HEADER_TIME
+
+dnl Checks for library functions.
+AC_CHECK_FUNCS([ \
+ accept4 \
+ arc4random \
+ arc4random_buf \
+ clock_gettime \
+ eventfd \
+ epoll_create1 \
+ fcntl \
+ getegid \
+ geteuid \
+ getifaddrs \
+ getnameinfo \
+ getprotobynumber \
+ gettimeofday \
+ inet_ntop \
+ inet_pton \
+ issetugid \
+ mach_absolute_time \
+ mmap \
+ nanosleep \
+ pipe \
+ pipe2 \
+ putenv \
+ sendfile \
+ setenv \
+ setrlimit \
+ sigaction \
+ signal \
+ splice \
+ strlcpy \
+ strsep \
+ strtok_r \
+ strtoll \
+ sysctl \
+ timerfd_create \
+ umask \
+ unsetenv \
+ usleep \
+ vasprintf \
+])
+AM_CONDITIONAL(STRLCPY_IMPL, [test x"$ac_cv_func_strlcpy" = xno])
+
+AC_CACHE_CHECK(
+ [for getaddrinfo],
+ [libevent_cv_getaddrinfo],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+ ]],
+ [[
+ getaddrinfo;
+ ]]
+ )],
+ [libevent_cv_getaddrinfo=yes],
+ [libevent_cv_getaddrinfo=no]
+ )]
+)
+if test "$libevent_cv_getaddrinfo" = "yes" ; then
+ AC_DEFINE([HAVE_GETADDRINFO], [1], [Do we have getaddrinfo()?])
+else
+
+AC_CHECK_FUNCS([getservbyname])
+# Check for gethostbyname_r in all its glorious incompatible versions.
+# (This is cut-and-pasted from Tor, which based its logic on
+# Python's configure.in.)
+AH_TEMPLATE(HAVE_GETHOSTBYNAME_R,
+ [Define this if you have any gethostbyname_r()])
+
+AC_CHECK_FUNC(gethostbyname_r, [
+ AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <netdb.h>
+ ], [[
+ char *cp1, *cp2;
+ struct hostent *h1, *h2;
+ int i1, i2;
+ (void)gethostbyname_r(cp1,h1,cp2,i1,&h2,&i2);
+ ]])],[
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R)
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
+ [Define this if gethostbyname_r takes 6 arguments])
+ AC_MSG_RESULT(6)
+ ], [
+ AC_TRY_COMPILE([
+#include <netdb.h>
+ ], [
+ char *cp1, *cp2;
+ struct hostent *h1;
+ int i1, i2;
+ (void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
+ ], [
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R)
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
+ [Define this if gethostbyname_r takes 5 arguments])
+ AC_MSG_RESULT(5)
+ ], [
+ AC_TRY_COMPILE([
+#include <netdb.h>
+ ], [
+ char *cp1;
+ struct hostent *h1;
+ struct hostent_data hd;
+ (void) gethostbyname_r(cp1,h1,&hd);
+ ], [
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R)
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
+ [Define this if gethostbyname_r takes 3 arguments])
+ AC_MSG_RESULT(3)
+ ], [
+ AC_MSG_RESULT(0)
+ ])
+ ])
+ ])
+ CFLAGS=$OLD_CFLAGS
+])
+
+fi
+
+AC_MSG_CHECKING(for F_SETFD in fcntl.h)
+AC_EGREP_CPP(yes,
+[
+#define _GNU_SOURCE
+#include <fcntl.h>
+#ifdef F_SETFD
+yes
+#endif
+], [ AC_DEFINE(HAVE_SETFD, 1,
+ [Define if F_SETFD is defined in <fcntl.h>])
+ AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))
+
+needsignal=no
+haveselect=no
+if test x$bwin32 != xtrue; then
+ AC_CHECK_FUNCS(select, [haveselect=yes], )
+ if test "x$haveselect" = "xyes" ; then
+ needsignal=yes
+ fi
+fi
+AM_CONDITIONAL(SELECT_BACKEND, [test "x$haveselect" = "xyes"])
+
+havepoll=no
+AC_CHECK_FUNCS(poll, [havepoll=yes], )
+if test "x$havepoll" = "xyes" ; then
+ needsignal=yes
+fi
+AM_CONDITIONAL(POLL_BACKEND, [test "x$havepoll" = "xyes"])
+
+havedevpoll=no
+if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
+ AC_DEFINE(HAVE_DEVPOLL, 1,
+ [Define if /dev/poll is available])
+fi
+AM_CONDITIONAL(DEVPOLL_BACKEND, [test "x$ac_cv_header_sys_devpoll_h" = "xyes"])
+
+havekqueue=no
+if test "x$ac_cv_header_sys_event_h" = "xyes"; then
+ AC_CHECK_FUNCS(kqueue, [havekqueue=yes], )
+ if test "x$havekqueue" = "xyes" ; then
+ AC_MSG_CHECKING(for working kqueue)
+ AC_TRY_RUN(
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/event.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+int
+main(int argc, char **argv)
+{
+ int kq;
+ int n;
+ int fd[[2]];
+ struct kevent ev;
+ struct timespec ts;
+ char buf[[8000]];
+
+ if (pipe(fd) == -1)
+ exit(1);
+ if (fcntl(fd[[1]], F_SETFL, O_NONBLOCK) == -1)
+ exit(1);
+
+ while ((n = write(fd[[1]], buf, sizeof(buf))) == sizeof(buf))
+ ;
+
+ if ((kq = kqueue()) == -1)
+ exit(1);
+
+ memset(&ev, 0, sizeof(ev));
+ ev.ident = fd[[1]];
+ ev.filter = EVFILT_WRITE;
+ ev.flags = EV_ADD | EV_ENABLE;
+ n = kevent(kq, &ev, 1, NULL, 0, NULL);
+ if (n == -1)
+ exit(1);
+
+ read(fd[[0]], buf, sizeof(buf));
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ n = kevent(kq, NULL, 0, &ev, 1, &ts);
+ if (n == -1 || n == 0)
+ exit(1);
+
+ exit(0);
+}, [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
+ [Define if kqueue works correctly with pipes])
+ havekqueue=yes
+ ], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+ fi
+fi
+AM_CONDITIONAL(KQUEUE_BACKEND, [test "x$havekqueue" = "xyes"])
+
+haveepollsyscall=no
+haveepoll=no
+AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
+if test "x$haveepoll" = "xyes" ; then
+ AC_DEFINE(HAVE_EPOLL, 1,
+ [Define if your system supports the epoll system calls])
+ needsignal=yes
+fi
+if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
+ if test "x$haveepoll" = "xno" ; then
+ AC_MSG_CHECKING(for epoll system call)
+ AC_TRY_RUN(
+#include <stdint.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/epoll.h>
+#include <unistd.h>
+
+int
+epoll_create(int size)
+{
+ return (syscall(__NR_epoll_create, size));
+}
+
+int
+main(int argc, char **argv)
+{
+ int epfd;
+
+ epfd = epoll_create(256);
+ exit (epfd == -1 ? 1 : 0);
+}, [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_EPOLL, 1,
+ [Define if your system supports the epoll system calls])
+ needsignal=yes
+ have_epoll=yes
+ AC_LIBOBJ(epoll_sub)
+ ], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+ fi
+fi
+AM_CONDITIONAL(EPOLL_BACKEND, [test "x$haveepoll" = "xyes"])
+
+haveeventports=no
+AC_CHECK_FUNCS(port_create, [haveeventports=yes], )
+if test "x$haveeventports" = "xyes" ; then
+ AC_DEFINE(HAVE_EVENT_PORTS, 1,
+ [Define if your system supports event ports])
+ needsignal=yes
+fi
+AM_CONDITIONAL(EVPORT_BACKEND, [test "x$haveeventports" = "xyes"])
+
+if test "x$bwin32" = "xtrue"; then
+ needsignal=yes
+fi
+
+AM_CONDITIONAL(SIGNAL_SUPPORT, [test "x$needsignal" = "xyes"])
+
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+
+AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t, uintptr_t], , ,
+[#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif])
+
+AC_CHECK_TYPES([fd_mask], , ,
+[#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif])
+
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(off_t)
+
+AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+[#define _GNU_SOURCE
+#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+])
+AC_CHECK_MEMBERS([struct in6_addr.s6_addr32, struct in6_addr.s6_addr16, struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len, struct sockaddr_storage.ss_family, struct sockaddr_storage.__ss_family], , ,
+[#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef _WIN32
+#define WIN32_WINNT 0x400
+#define _WIN32_WINNT 0x400
+#define WIN32_LEAN_AND_MEAN
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+#include <winsock.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+])
+
+AC_CHECK_TYPES([struct so_linger],
+[#define HAVE_SO_LINGER], ,
+[
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+])
+
+AC_MSG_CHECKING([for socklen_t])
+AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>],
+ [socklen_t x;],
+ AC_MSG_RESULT([yes]),
+ [AC_MSG_RESULT([no])
+ AC_DEFINE(socklen_t, unsigned int,
+ [Define to unsigned int if you dont have it])]
+)
+
+AC_MSG_CHECKING([whether our compiler supports __func__])
+AC_TRY_COMPILE([],
+ [ const char *cp = __func__; ],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
+ AC_TRY_COMPILE([],
+ [ const char *cp = __FUNCTION__; ],
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(__func__, __FUNCTION__,
+ [Define to appropriate substitue if compiler doesnt have __func__]),
+ AC_MSG_RESULT([no])
+ AC_DEFINE(__func__, __FILE__,
+ [Define to appropriate substitue if compiler doesnt have __func__])))
+
+
+# check if we can compile with pthreads
+have_pthreads=no
+if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
+ OL_THREAD_CHECK([
+ have_pthreads=yes
+ PTHREAD_LIBS="$LTHREAD_LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_CHECK_SIZEOF(
+ [pthread_t],
+ [],
+ [
+ AC_INCLUDES_DEFAULT()
+ #include <pthread.h>
+ ]
+ )
+ ])
+fi
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"])
+
+# check if we should compile locking into the library
+if test x$enable_thread_support = xno; then
+ AC_DEFINE(DISABLE_THREAD_SUPPORT, 1,
+ [Define if libevent should not be compiled with thread support])
+fi
+
+# check if we should hard-code the mm functions.
+if test x$enable_malloc_replacement = xno; then
+ AC_DEFINE(DISABLE_MM_REPLACEMENT, 1,
+ [Define if libevent should not allow replacing the mm functions])
+fi
+
+# check if we should hard-code debugging out
+if test x$enable_debug_mode = xno; then
+ AC_DEFINE(DISABLE_DEBUG_MODE, 1,
+ [Define if libevent should build without support for a debug mode])
+fi
+
+# check if we should enable verbose debugging
+if test x$enable_verbose_debug = xyes; then
+ CFLAGS="$CFLAGS -DUSE_DEBUG"
+fi
+
+# check if we have and should use openssl
+AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
+
+# Add some more warnings which we use in development but not in the
+# released versions. (Some relevant gcc versions can't handle these.)
+if test x$enable_gcc_warnings != xno && test "$GCC" = "yes"; then
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__GNUC__) || (__GNUC__ < 4)
+#error
+#endif])], have_gcc4=yes, have_gcc4=no)
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
+#error
+#endif])], have_gcc42=yes, have_gcc42=no)
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+#error
+#endif])], have_gcc45=yes, have_gcc45=no)
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
+#if !defined(__clang__)
+#error
+#endif])], have_clang=yes, have_clang=no)
+
+ CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+ if test x$enable_gcc_warnings = xyes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+
+ CFLAGS="$CFLAGS -Wno-unused-parameter -Wstrict-aliasing"
+
+ if test x$have_gcc4 = xyes ; then
+ # These warnings break gcc 3.3.5 and work on gcc 4.0.2
+ CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement"
+ #CFLAGS="$CFLAGS -Wold-style-definition"
+ fi
+
+ if test x$have_gcc42 = xyes ; then
+ # These warnings break gcc 4.0.2 and work on gcc 4.2
+ CFLAGS="$CFLAGS -Waddress"
+ fi
+
+ if test x$have_gcc42 = xyes && test x$have_clang = xno; then
+ # These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
+ CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
+ fi
+
+ if test x$have_gcc45 = xyes ; then
+ # These warnings work on gcc 4.5
+ CFLAGS="$CFLAGS -Wlogical-op"
+ fi
+
+ if test x$have_clang = xyes; then
+ # Disable the unused-function warnings, because these trigger
+ # for minheap-internal.h related code.
+ CFLAGS="$CFLAGS -Wno-unused-function"
+
+ # clang on macosx emits warnigns for each directory specified which
+ # isn't "used" generating a lot of build noise (typically 3 warnings
+ # per file
+ case "$host_os" in
+ darwin*)
+ CFLAGS="$CFLAGS -Qunused-arguments"
+ ;;
+ esac
+ fi
+
+##This will break the world on some 64-bit architectures
+# CFLAGS="$CFLAGS -Winline"
+
+fi
+
+LIBEVENT_GC_SECTIONS=
+if test "$GCC" = yes && test "$enable_function_sections" = yes ; then
+ AC_CACHE_CHECK(
+ [if linker supports omitting unused code and data],
+ [libevent_cv_gc_sections_runs],
+ [
+ dnl NetBSD will link but likely not run with --gc-sections
+ dnl http://bugs.ntp.org/1844
+ dnl http://gnats.netbsd.org/40401
+ dnl --gc-sections causes attempt to load as linux elf, with
+ dnl wrong syscalls in place. Test a little gauntlet of
+ dnl simple stdio read code checking for errors, expecting
+ dnl enough syscall differences that the NetBSD code will
+ dnl fail even with Linux emulation working as designed.
+ dnl A shorter test could be refined by someone with access
+ dnl to a NetBSD host with Linux emulation working.
+ origCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wl,--gc-sections"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <stdlib.h>
+ #include <stdio.h>
+ ]],
+ [[
+ FILE * fpC;
+ char buf[32];
+ size_t cch;
+ int read_success_once;
+
+ fpC = fopen("conftest.c", "r");
+ if (NULL == fpC)
+ exit(1);
+ do {
+ cch = fread(buf, sizeof(buf), 1, fpC);
+ read_success_once |= (0 != cch);
+ } while (0 != cch);
+ if (!read_success_once)
+ exit(2);
+ if (!feof(fpC))
+ exit(3);
+ if (0 != fclose(fpC))
+ exit(4);
+
+ exit(EXIT_SUCCESS);
+ ]]
+ )],
+ [
+ dnl We have to do this invocation manually so that we can
+ dnl get the output of conftest.err to make sure it doesn't
+ dnl mention gc-sections.
+ if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
+ libevent_cv_gc_sections_runs=no
+ else
+ libevent_cv_gc_sections_runs=no
+ ./conftest >/dev/null 2>&1 && libevent_cv_gc_sections_runs=yes
+ fi
+ ],
+ [libevent_cv_gc_sections_runs=no]
+ )
+ CFLAGS="$origCFLAGS"
+ AS_UNSET([origCFLAGS])
+ ]
+ )
+ case "$libevent_cv_gc_sections_runs" in
+ yes)
+ CFLAGS="-ffunction-sections -fdata-sections $CFLAGS"
+ LIBEVENT_GC_SECTIONS="-Wl,--gc-sections"
+ ;;
+ esac
+fi
+AC_SUBST([LIBEVENT_GC_SECTIONS])
+
+AM_CONDITIONAL([INSTALL_LIBEVENT], [test "$enable_libevent_install" = "yes"])
+
+AC_CONFIG_FILES( [libevent.pc libevent_openssl.pc libevent_pthreads.pc] )
+AC_OUTPUT(Makefile)
diff --git a/sntp/libevent/defer-internal.h b/sntp/libevent/defer-internal.h
new file mode 100644
index 000000000000..d8cf32f443a1
--- /dev/null
+++ b/sntp/libevent/defer-internal.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 DEFER_INTERNAL_H_INCLUDED_
+#define DEFER_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/queue.h>
+
+struct event_callback;
+typedef void (*deferred_cb_fn)(struct event_callback *, void *);
+
+/**
+ Initialize an empty, non-pending event_callback.
+
+ @param deferred The struct event_callback structure to initialize.
+ @param priority The priority that the callback should run at.
+ @param cb The function to run when the struct event_callback executes.
+ @param arg The function's second argument.
+ */
+void event_deferred_cb_init_(struct event_callback *, ev_uint8_t, deferred_cb_fn, void *);
+/**
+ Change the priority of a non-pending event_callback.
+ */
+void event_deferred_cb_set_priority_(struct event_callback *, ev_uint8_t);
+/**
+ Cancel a struct event_callback if it is currently scheduled in an event_base.
+ */
+void event_deferred_cb_cancel_(struct event_base *, struct event_callback *);
+/**
+ Activate a struct event_callback if it is not currently scheduled in an event_base.
+
+ Return true iff it was not previously scheduled.
+ */
+int event_deferred_cb_schedule_(struct event_base *, struct event_callback *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT_INTERNAL_H_INCLUDED_ */
+
diff --git a/sntp/libevent/devpoll.c b/sntp/libevent/devpoll.c
new file mode 100644
index 000000000000..3a2f86d6f1aa
--- /dev/null
+++ b/sntp/libevent/devpoll.c
@@ -0,0 +1,311 @@
+/*
+ * Copyright 2000-2009 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_DEVPOLL
+
+#include <sys/types.h>
+#include <sys/resource.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <sys/devpoll.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/thread.h"
+#include "event-internal.h"
+#include "evsignal-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "evthread-internal.h"
+
+struct devpollop {
+ struct pollfd *events;
+ int nevents;
+ int dpfd;
+ struct pollfd *changes;
+ int nchanges;
+};
+
+static void *devpoll_init(struct event_base *);
+static int devpoll_add(struct event_base *, int fd, short old, short events, void *);
+static int devpoll_del(struct event_base *, int fd, short old, short events, void *);
+static int devpoll_dispatch(struct event_base *, struct timeval *);
+static void devpoll_dealloc(struct event_base *);
+
+const struct eventop devpollops = {
+ "devpoll",
+ devpoll_init,
+ devpoll_add,
+ devpoll_del,
+ devpoll_dispatch,
+ devpoll_dealloc,
+ 1, /* need reinit */
+ EV_FEATURE_FDS|EV_FEATURE_O1,
+ 0
+};
+
+#define NEVENT 32000
+
+static int
+devpoll_commit(struct devpollop *devpollop)
+{
+ /*
+ * Due to a bug in Solaris, we have to use pwrite with an offset of 0.
+ * Write is limited to 2GB of data, until it will fail.
+ */
+ if (pwrite(devpollop->dpfd, devpollop->changes,
+ sizeof(struct pollfd) * devpollop->nchanges, 0) == -1)
+ return (-1);
+
+ devpollop->nchanges = 0;
+ return (0);
+}
+
+static int
+devpoll_queue(struct devpollop *devpollop, int fd, int events) {
+ struct pollfd *pfd;
+
+ if (devpollop->nchanges >= devpollop->nevents) {
+ /*
+ * Change buffer is full, must commit it to /dev/poll before
+ * adding more
+ */
+ if (devpoll_commit(devpollop) != 0)
+ return (-1);
+ }
+
+ pfd = &devpollop->changes[devpollop->nchanges++];
+ pfd->fd = fd;
+ pfd->events = events;
+ pfd->revents = 0;
+
+ return (0);
+}
+
+static void *
+devpoll_init(struct event_base *base)
+{
+ int dpfd, nfiles = NEVENT;
+ struct rlimit rl;
+ struct devpollop *devpollop;
+
+ if (!(devpollop = mm_calloc(1, sizeof(struct devpollop))))
+ return (NULL);
+
+ if (getrlimit(RLIMIT_NOFILE, &rl) == 0 &&
+ rl.rlim_cur != RLIM_INFINITY)
+ nfiles = rl.rlim_cur;
+
+ /* Initialize the kernel queue */
+ if ((dpfd = evutil_open_closeonexec_("/dev/poll", O_RDWR, 0)) == -1) {
+ event_warn("open: /dev/poll");
+ mm_free(devpollop);
+ return (NULL);
+ }
+
+ devpollop->dpfd = dpfd;
+
+ /* Initialize fields */
+ /* FIXME: allocating 'nfiles' worth of space here can be
+ * expensive and unnecessary. See how epoll.c does it instead. */
+ devpollop->events = mm_calloc(nfiles, sizeof(struct pollfd));
+ if (devpollop->events == NULL) {
+ mm_free(devpollop);
+ close(dpfd);
+ return (NULL);
+ }
+ devpollop->nevents = nfiles;
+
+ devpollop->changes = mm_calloc(nfiles, sizeof(struct pollfd));
+ if (devpollop->changes == NULL) {
+ mm_free(devpollop->events);
+ mm_free(devpollop);
+ close(dpfd);
+ return (NULL);
+ }
+
+ evsig_init_(base);
+
+ return (devpollop);
+}
+
+static int
+devpoll_dispatch(struct event_base *base, struct timeval *tv)
+{
+ struct devpollop *devpollop = base->evbase;
+ struct pollfd *events = devpollop->events;
+ struct dvpoll dvp;
+ int i, res, timeout = -1;
+
+ if (devpollop->nchanges)
+ devpoll_commit(devpollop);
+
+ if (tv != NULL)
+ timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000;
+
+ dvp.dp_fds = devpollop->events;
+ dvp.dp_nfds = devpollop->nevents;
+ dvp.dp_timeout = timeout;
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = ioctl(devpollop->dpfd, DP_POLL, &dvp);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (res == -1) {
+ if (errno != EINTR) {
+ event_warn("ioctl: DP_POLL");
+ return (-1);
+ }
+
+ return (0);
+ }
+
+ event_debug(("%s: devpoll_wait reports %d", __func__, res));
+
+ for (i = 0; i < res; i++) {
+ int which = 0;
+ int what = events[i].revents;
+
+ if (what & POLLHUP)
+ what |= POLLIN | POLLOUT;
+ else if (what & POLLERR)
+ what |= POLLIN | POLLOUT;
+
+ if (what & POLLIN)
+ which |= EV_READ;
+ if (what & POLLOUT)
+ which |= EV_WRITE;
+
+ if (!which)
+ continue;
+
+ /* XXX(niels): not sure if this works for devpoll */
+ evmap_io_active_(base, events[i].fd, which);
+ }
+
+ return (0);
+}
+
+
+static int
+devpoll_add(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct devpollop *devpollop = base->evbase;
+ int res;
+ (void)p;
+
+ /*
+ * It's not necessary to OR the existing read/write events that we
+ * are currently interested in with the new event we are adding.
+ * The /dev/poll driver ORs any new events with the existing events
+ * that it has cached for the fd.
+ */
+
+ res = 0;
+ if (events & EV_READ)
+ res |= POLLIN;
+ if (events & EV_WRITE)
+ res |= POLLOUT;
+
+ if (devpoll_queue(devpollop, fd, res) != 0)
+ return (-1);
+
+ return (0);
+}
+
+static int
+devpoll_del(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct devpollop *devpollop = base->evbase;
+ int res;
+ (void)p;
+
+ res = 0;
+ if (events & EV_READ)
+ res |= POLLIN;
+ if (events & EV_WRITE)
+ res |= POLLOUT;
+
+ /*
+ * The only way to remove an fd from the /dev/poll monitored set is
+ * to use POLLREMOVE by itself. This removes ALL events for the fd
+ * provided so if we care about two events and are only removing one
+ * we must re-add the other event after POLLREMOVE.
+ */
+
+ if (devpoll_queue(devpollop, fd, POLLREMOVE) != 0)
+ return (-1);
+
+ if ((res & (POLLIN|POLLOUT)) != (POLLIN|POLLOUT)) {
+ /*
+ * We're not deleting all events, so we must resubmit the
+ * event that we are still interested in if one exists.
+ */
+
+ if ((res & POLLIN) && (old & EV_WRITE)) {
+ /* Deleting read, still care about write */
+ devpoll_queue(devpollop, fd, POLLOUT);
+ } else if ((res & POLLOUT) && (old & EV_READ)) {
+ /* Deleting write, still care about read */
+ devpoll_queue(devpollop, fd, POLLIN);
+ }
+ }
+
+ return (0);
+}
+
+static void
+devpoll_dealloc(struct event_base *base)
+{
+ struct devpollop *devpollop = base->evbase;
+
+ evsig_dealloc_(base);
+ if (devpollop->events)
+ mm_free(devpollop->events);
+ if (devpollop->changes)
+ mm_free(devpollop->changes);
+ if (devpollop->dpfd >= 0)
+ close(devpollop->dpfd);
+
+ memset(devpollop, 0, sizeof(struct devpollop));
+ mm_free(devpollop);
+}
+
+#endif /* EVENT__HAVE_DEVPOLL */
diff --git a/sntp/libevent/epoll.c b/sntp/libevent/epoll.c
new file mode 100644
index 000000000000..aa41f84e027e
--- /dev/null
+++ b/sntp/libevent/epoll.c
@@ -0,0 +1,541 @@
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_EPOLL
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/resource.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <sys/epoll.h>
+#include <signal.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIMERFD_H
+#include <sys/timerfd.h>
+#endif
+
+#include "event-internal.h"
+#include "evsignal-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "changelist-internal.h"
+#include "time-internal.h"
+
+/* Since Linux 2.6.17, epoll is able to report about peer half-closed connection
+ using special EPOLLRDHUP flag on a read event.
+*/
+#if !defined(EPOLLRDHUP)
+#define EPOLLRDHUP 0
+#define EARLY_CLOSE_IF_HAVE_RDHUP 0
+#else
+#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE
+#endif
+
+#include "epolltable-internal.h"
+
+#if defined(EVENT__HAVE_SYS_TIMERFD_H) && \
+ defined(EVENT__HAVE_TIMERFD_CREATE) && \
+ defined(HAVE_POSIX_MONOTONIC) && defined(TFD_NONBLOCK) && \
+ defined(TFD_CLOEXEC)
+/* Note that we only use timerfd if TFD_NONBLOCK and TFD_CLOEXEC are available
+ and working. This means that we can't support it on 2.6.25 (where timerfd
+ was introduced) or 2.6.26, since 2.6.27 introduced those flags.
+ */
+#define USING_TIMERFD
+#endif
+
+struct epollop {
+ struct epoll_event *events;
+ int nevents;
+ int epfd;
+#ifdef USING_TIMERFD
+ int timerfd;
+#endif
+};
+
+static void *epoll_init(struct event_base *);
+static int epoll_dispatch(struct event_base *, struct timeval *);
+static void epoll_dealloc(struct event_base *);
+
+static const struct eventop epollops_changelist = {
+ "epoll (with changelist)",
+ epoll_init,
+ event_changelist_add_,
+ event_changelist_del_,
+ epoll_dispatch,
+ epoll_dealloc,
+ 1, /* need reinit */
+ EV_FEATURE_ET|EV_FEATURE_O1| EARLY_CLOSE_IF_HAVE_RDHUP,
+ EVENT_CHANGELIST_FDINFO_SIZE
+};
+
+
+static int epoll_nochangelist_add(struct event_base *base, evutil_socket_t fd,
+ short old, short events, void *p);
+static int epoll_nochangelist_del(struct event_base *base, evutil_socket_t fd,
+ short old, short events, void *p);
+
+const struct eventop epollops = {
+ "epoll",
+ epoll_init,
+ epoll_nochangelist_add,
+ epoll_nochangelist_del,
+ epoll_dispatch,
+ epoll_dealloc,
+ 1, /* need reinit */
+ EV_FEATURE_ET|EV_FEATURE_O1|EV_FEATURE_EARLY_CLOSE,
+ 0
+};
+
+#define INITIAL_NEVENT 32
+#define MAX_NEVENT 4096
+
+/* On Linux kernels at least up to 2.6.24.4, epoll can't handle timeout
+ * values bigger than (LONG_MAX - 999ULL)/HZ. HZ in the wild can be
+ * as big as 1000, and LONG_MAX can be as small as (1<<31)-1, so the
+ * largest number of msec we can support here is 2147482. Let's
+ * round that down by 47 seconds.
+ */
+#define MAX_EPOLL_TIMEOUT_MSEC (35*60*1000)
+
+static void *
+epoll_init(struct event_base *base)
+{
+ int epfd = -1;
+ struct epollop *epollop;
+
+#ifdef EVENT__HAVE_EPOLL_CREATE1
+ /* First, try the shiny new epoll_create1 interface, if we have it. */
+ epfd = epoll_create1(EPOLL_CLOEXEC);
+#endif
+ if (epfd == -1) {
+ /* Initialize the kernel queue using the old interface. (The
+ size field is ignored since 2.6.8.) */
+ if ((epfd = epoll_create(32000)) == -1) {
+ if (errno != ENOSYS)
+ event_warn("epoll_create");
+ return (NULL);
+ }
+ evutil_make_socket_closeonexec(epfd);
+ }
+
+ if (!(epollop = mm_calloc(1, sizeof(struct epollop)))) {
+ close(epfd);
+ return (NULL);
+ }
+
+ epollop->epfd = epfd;
+
+ /* Initialize fields */
+ epollop->events = mm_calloc(INITIAL_NEVENT, sizeof(struct epoll_event));
+ if (epollop->events == NULL) {
+ mm_free(epollop);
+ close(epfd);
+ return (NULL);
+ }
+ epollop->nevents = INITIAL_NEVENT;
+
+ if ((base->flags & EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST) != 0 ||
+ ((base->flags & EVENT_BASE_FLAG_IGNORE_ENV) == 0 &&
+ evutil_getenv_("EVENT_EPOLL_USE_CHANGELIST") != NULL)) {
+
+ base->evsel = &epollops_changelist;
+ }
+
+#ifdef USING_TIMERFD
+ /*
+ The epoll interface ordinarily gives us one-millisecond precision,
+ so on Linux it makes perfect sense to use the CLOCK_MONOTONIC_COARSE
+ timer. But when the user has set the new PRECISE_TIMER flag for an
+ event_base, we can try to use timerfd to give them finer granularity.
+ */
+ if ((base->flags & EVENT_BASE_FLAG_PRECISE_TIMER) &&
+ base->monotonic_timer.monotonic_clock == CLOCK_MONOTONIC) {
+ int fd;
+ fd = epollop->timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC);
+ if (epollop->timerfd >= 0) {
+ struct epoll_event epev;
+ memset(&epev, 0, sizeof(epev));
+ epev.data.fd = epollop->timerfd;
+ epev.events = EPOLLIN;
+ if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, fd, &epev) < 0) {
+ event_warn("epoll_ctl(timerfd)");
+ close(fd);
+ epollop->timerfd = -1;
+ }
+ } else {
+ if (errno != EINVAL && errno != ENOSYS) {
+ /* These errors probably mean that we were
+ * compiled with timerfd/TFD_* support, but
+ * we're running on a kernel that lacks those.
+ */
+ event_warn("timerfd_create");
+ }
+ epollop->timerfd = -1;
+ }
+ } else {
+ epollop->timerfd = -1;
+ }
+#endif
+
+ evsig_init_(base);
+
+ return (epollop);
+}
+
+static const char *
+change_to_string(int change)
+{
+ change &= (EV_CHANGE_ADD|EV_CHANGE_DEL);
+ if (change == EV_CHANGE_ADD) {
+ return "add";
+ } else if (change == EV_CHANGE_DEL) {
+ return "del";
+ } else if (change == 0) {
+ return "none";
+ } else {
+ return "???";
+ }
+}
+
+static const char *
+epoll_op_to_string(int op)
+{
+ return op == EPOLL_CTL_ADD?"ADD":
+ op == EPOLL_CTL_DEL?"DEL":
+ op == EPOLL_CTL_MOD?"MOD":
+ "???";
+}
+
+static int
+epoll_apply_one_change(struct event_base *base,
+ struct epollop *epollop,
+ const struct event_change *ch)
+{
+ struct epoll_event epev;
+ int op, events = 0;
+ int idx;
+
+ idx = EPOLL_OP_TABLE_INDEX(ch);
+ op = epoll_op_table[idx].op;
+ events = epoll_op_table[idx].events;
+
+ if (!events) {
+ EVUTIL_ASSERT(op == 0);
+ return 0;
+ }
+
+ if ((ch->read_change|ch->write_change) & EV_CHANGE_ET)
+ events |= EPOLLET;
+
+ memset(&epev, 0, sizeof(epev));
+ epev.data.fd = ch->fd;
+ epev.events = events;
+ if (epoll_ctl(epollop->epfd, op, ch->fd, &epev) == 0) {
+ event_debug(("Epoll %s(%d) on fd %d okay. [old events were %d; read change was %d; write change was %d; close change was %d]",
+ epoll_op_to_string(op),
+ (int)epev.events,
+ (int)ch->fd,
+ ch->old_events,
+ ch->read_change,
+ ch->write_change,
+ ch->close_change));
+ return 0;
+ }
+
+ switch (op) {
+ case EPOLL_CTL_MOD:
+ if (errno == ENOENT) {
+ /* If a MOD operation fails with ENOENT, the
+ * fd was probably closed and re-opened. We
+ * should retry the operation as an ADD.
+ */
+ if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, ch->fd, &epev) == -1) {
+ event_warn("Epoll MOD(%d) on %d retried as ADD; that failed too",
+ (int)epev.events, ch->fd);
+ return -1;
+ } else {
+ event_debug(("Epoll MOD(%d) on %d retried as ADD; succeeded.",
+ (int)epev.events,
+ ch->fd));
+ return 0;
+ }
+ }
+ break;
+ case EPOLL_CTL_ADD:
+ if (errno == EEXIST) {
+ /* If an ADD operation fails with EEXIST,
+ * either the operation was redundant (as with a
+ * precautionary add), or we ran into a fun
+ * kernel bug where using dup*() to duplicate the
+ * same file into the same fd gives you the same epitem
+ * rather than a fresh one. For the second case,
+ * we must retry with MOD. */
+ if (epoll_ctl(epollop->epfd, EPOLL_CTL_MOD, ch->fd, &epev) == -1) {
+ event_warn("Epoll ADD(%d) on %d retried as MOD; that failed too",
+ (int)epev.events, ch->fd);
+ return -1;
+ } else {
+ event_debug(("Epoll ADD(%d) on %d retried as MOD; succeeded.",
+ (int)epev.events,
+ ch->fd));
+ return 0;
+ }
+ }
+ break;
+ case EPOLL_CTL_DEL:
+ if (errno == ENOENT || errno == EBADF || errno == EPERM) {
+ /* If a delete fails with one of these errors,
+ * that's fine too: we closed the fd before we
+ * got around to calling epoll_dispatch. */
+ event_debug(("Epoll DEL(%d) on fd %d gave %s: DEL was unnecessary.",
+ (int)epev.events,
+ ch->fd,
+ strerror(errno)));
+ return 0;
+ }
+ break;
+ default:
+ break;
+ }
+
+ event_warn("Epoll %s(%d) on fd %d failed. Old events were %d; read change was %d (%s); write change was %d (%s); close change was %d (%s)",
+ epoll_op_to_string(op),
+ (int)epev.events,
+ ch->fd,
+ ch->old_events,
+ ch->read_change,
+ change_to_string(ch->read_change),
+ ch->write_change,
+ change_to_string(ch->write_change),
+ ch->close_change,
+ change_to_string(ch->close_change));
+
+ return -1;
+}
+
+static int
+epoll_apply_changes(struct event_base *base)
+{
+ struct event_changelist *changelist = &base->changelist;
+ struct epollop *epollop = base->evbase;
+ struct event_change *ch;
+
+ int r = 0;
+ int i;
+
+ for (i = 0; i < changelist->n_changes; ++i) {
+ ch = &changelist->changes[i];
+ if (epoll_apply_one_change(base, epollop, ch) < 0)
+ r = -1;
+ }
+
+ return (r);
+}
+
+static int
+epoll_nochangelist_add(struct event_base *base, evutil_socket_t fd,
+ short old, short events, void *p)
+{
+ struct event_change ch;
+ ch.fd = fd;
+ ch.old_events = old;
+ ch.read_change = ch.write_change = ch.close_change = 0;
+ if (events & EV_WRITE)
+ ch.write_change = EV_CHANGE_ADD |
+ (events & EV_ET);
+ if (events & EV_READ)
+ ch.read_change = EV_CHANGE_ADD |
+ (events & EV_ET);
+ if (events & EV_CLOSED)
+ ch.close_change = EV_CHANGE_ADD |
+ (events & EV_ET);
+
+ return epoll_apply_one_change(base, base->evbase, &ch);
+}
+
+static int
+epoll_nochangelist_del(struct event_base *base, evutil_socket_t fd,
+ short old, short events, void *p)
+{
+ struct event_change ch;
+ ch.fd = fd;
+ ch.old_events = old;
+ ch.read_change = ch.write_change = ch.close_change = 0;
+ if (events & EV_WRITE)
+ ch.write_change = EV_CHANGE_DEL;
+ if (events & EV_READ)
+ ch.read_change = EV_CHANGE_DEL;
+ if (events & EV_CLOSED)
+ ch.close_change = EV_CHANGE_DEL;
+
+ return epoll_apply_one_change(base, base->evbase, &ch);
+}
+
+static int
+epoll_dispatch(struct event_base *base, struct timeval *tv)
+{
+ struct epollop *epollop = base->evbase;
+ struct epoll_event *events = epollop->events;
+ int i, res;
+ long timeout = -1;
+
+#ifdef USING_TIMERFD
+ if (epollop->timerfd >= 0) {
+ struct itimerspec is;
+ is.it_interval.tv_sec = 0;
+ is.it_interval.tv_nsec = 0;
+ if (tv == NULL) {
+ /* No timeout; disarm the timer. */
+ is.it_value.tv_sec = 0;
+ is.it_value.tv_nsec = 0;
+ } else {
+ if (tv->tv_sec == 0 && tv->tv_usec == 0) {
+ /* we need to exit immediately; timerfd can't
+ * do that. */
+ timeout = 0;
+ }
+ is.it_value.tv_sec = tv->tv_sec;
+ is.it_value.tv_nsec = tv->tv_usec * 1000;
+ }
+ /* TODO: we could avoid unnecessary syscalls here by only
+ calling timerfd_settime when the top timeout changes, or
+ when we're called with a different timeval.
+ */
+ if (timerfd_settime(epollop->timerfd, 0, &is, NULL) < 0) {
+ event_warn("timerfd_settime");
+ }
+ } else
+#endif
+ if (tv != NULL) {
+ timeout = evutil_tv_to_msec_(tv);
+ if (timeout < 0 || timeout > MAX_EPOLL_TIMEOUT_MSEC) {
+ /* Linux kernels can wait forever if the timeout is
+ * too big; see comment on MAX_EPOLL_TIMEOUT_MSEC. */
+ timeout = MAX_EPOLL_TIMEOUT_MSEC;
+ }
+ }
+
+ epoll_apply_changes(base);
+ event_changelist_remove_all_(&base->changelist, base);
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (res == -1) {
+ if (errno != EINTR) {
+ event_warn("epoll_wait");
+ return (-1);
+ }
+
+ return (0);
+ }
+
+ event_debug(("%s: epoll_wait reports %d", __func__, res));
+ EVUTIL_ASSERT(res <= epollop->nevents);
+
+ for (i = 0; i < res; i++) {
+ int what = events[i].events;
+ short ev = 0;
+#ifdef USING_TIMERFD
+ if (events[i].data.fd == epollop->timerfd)
+ continue;
+#endif
+
+ if (what & (EPOLLHUP|EPOLLERR)) {
+ ev = EV_READ | EV_WRITE;
+ } else {
+ if (what & EPOLLIN)
+ ev |= EV_READ;
+ if (what & EPOLLOUT)
+ ev |= EV_WRITE;
+ if (what & EPOLLRDHUP)
+ ev |= EV_CLOSED;
+ }
+
+ if (!ev)
+ continue;
+
+ evmap_io_active_(base, events[i].data.fd, ev | EV_ET);
+ }
+
+ if (res == epollop->nevents && epollop->nevents < MAX_NEVENT) {
+ /* We used all of the event space this time. We should
+ be ready for more events next time. */
+ int new_nevents = epollop->nevents * 2;
+ struct epoll_event *new_events;
+
+ new_events = mm_realloc(epollop->events,
+ new_nevents * sizeof(struct epoll_event));
+ if (new_events) {
+ epollop->events = new_events;
+ epollop->nevents = new_nevents;
+ }
+ }
+
+ return (0);
+}
+
+
+static void
+epoll_dealloc(struct event_base *base)
+{
+ struct epollop *epollop = base->evbase;
+
+ evsig_dealloc_(base);
+ if (epollop->events)
+ mm_free(epollop->events);
+ if (epollop->epfd >= 0)
+ close(epollop->epfd);
+#ifdef USING_TIMERFD
+ if (epollop->timerfd >= 0)
+ close(epollop->timerfd);
+#endif
+
+ memset(epollop, 0, sizeof(struct epollop));
+ mm_free(epollop);
+}
+
+#endif /* EVENT__HAVE_EPOLL */
diff --git a/sntp/libevent/epoll_sub.c b/sntp/libevent/epoll_sub.c
new file mode 100644
index 000000000000..3f01f6a69959
--- /dev/null
+++ b/sntp/libevent/epoll_sub.c
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2003-2009 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "evconfig-private.h"
+#include <stdint.h>
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/epoll.h>
+#include <unistd.h>
+#include <errno.h>
+
+int
+epoll_create(int size)
+{
+#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1)
+ if (size <= 0) {
+ errno = EINVAL;
+ return -1;
+ }
+ return (syscall(__NR_epoll_create1, 0));
+#else
+ return (syscall(__NR_epoll_create, size));
+#endif
+}
+
+int
+epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
+{
+
+ return (syscall(__NR_epoll_ctl, epfd, op, fd, event));
+}
+
+int
+epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
+{
+#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait)
+ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0));
+#else
+ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout));
+#endif
+}
diff --git a/sntp/libevent/epolltable-internal.h b/sntp/libevent/epolltable-internal.h
new file mode 100644
index 000000000000..da30e0973a27
--- /dev/null
+++ b/sntp/libevent/epolltable-internal.h
@@ -0,0 +1,1166 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EPOLLTABLE_INTERNAL_H_INCLUDED_
+#define EPOLLTABLE_INTERNAL_H_INCLUDED_
+
+/*
+ Here are the values we're masking off to decide what operations to do.
+ Note that since EV_READ|EV_WRITE.
+
+ Note also that this table is a little sparse, since ADD+DEL is
+ nonsensical ("xxx" in the list below.)
+
+ Note also also that we are shifting old_events by only 5 bits, since
+ EV_READ is 2 and EV_WRITE is 4.
+
+ The table was auto-generated with a python script, according to this
+ pseudocode:[*0]
+
+ If either the read or the write change is add+del:
+ This is impossible; Set op==-1, events=0.
+ Else, if either the read or the write change is add:
+ Set events to 0.
+ If the read change is add, or
+ (the read change is not del, and ev_read is in old_events):
+ Add EPOLLIN to events.
+ If the write change is add, or
+ (the write change is not del, and ev_write is in old_events):
+ Add EPOLLOUT to events.
+
+ If old_events is set:
+ Set op to EPOLL_CTL_MOD [*1,*2]
+ Else:
+ Set op to EPOLL_CTL_ADD [*3]
+
+ Else, if the read or the write change is del:
+ Set op to EPOLL_CTL_DEL.
+ If the read change is del:
+ If the write change is del:
+ Set events to EPOLLIN|EPOLLOUT
+ Else if ev_write is in old_events:
+ Set events to EPOLLOUT
+ Set op to EPOLL_CTL_MOD
+ Else
+ Set events to EPOLLIN
+ Else:
+ {The write change is del.}
+ If ev_read is in old_events:
+ Set events to EPOLLIN
+ Set op to EPOLL_CTL_MOD
+ Else:
+ Set the events to EPOLLOUT
+
+ Else:
+ There is no read or write change; set op to 0 and events to 0.
+
+ The logic is a little tricky, since we had no events set on the fd before,
+ we need to set op="ADD" and set events=the events we want to add. If we
+ had any events set on the fd before, and we want any events to remain on
+ the fd, we need to say op="MOD" and set events=the events we want to
+ remain. But if we want to delete the last event, we say op="DEL" and
+ set events=(any non-null pointer).
+
+ [*0] Actually, the Python script has gotten a bit more complicated, to
+ support EPOLLRDHUP.
+
+ [*1] This MOD is only a guess. MOD might fail with ENOENT if the file was
+ closed and a new file was opened with the same fd. If so, we'll retry
+ with ADD.
+
+ [*2] We can't replace this with a no-op even if old_events is the same as
+ the new events: if the file was closed and reopened, we need to retry
+ with an ADD. (We do a MOD in this case since "no change" is more
+ common than "close and reopen", so we'll usually wind up doing 1
+ syscalls instead of 2.)
+
+ [*3] This ADD is only a guess. There is a fun Linux kernel issue where if
+ you have two fds for the same file (via dup) and you ADD one to an
+ epfd, then close it, then re-create it with the same fd (via dup2 or an
+ unlucky dup), then try to ADD it again, you'll get an EEXIST, since the
+ struct epitem is not actually removed from the struct eventpoll until
+ the file itself is closed.
+
+ EV_CHANGE_ADD==1
+ EV_CHANGE_DEL==2
+ EV_READ ==2
+ EV_WRITE ==4
+ EV_CLOSED ==0x80
+
+ Bit 0: close change is add
+ Bit 1: close change is del
+ Bit 2: read change is add
+ Bit 3: read change is del
+ Bit 4: write change is add
+ Bit 5: write change is del
+ Bit 6: old events had EV_READ
+ Bit 7: old events had EV_WRITE
+ Bit 8: old events had EV_CLOSED
+*/
+
+#define EPOLL_OP_TABLE_INDEX(c) \
+ ( (((c)->close_change&(EV_CHANGE_ADD|EV_CHANGE_DEL))) | \
+ (((c)->read_change&(EV_CHANGE_ADD|EV_CHANGE_DEL)) << 2) | \
+ (((c)->write_change&(EV_CHANGE_ADD|EV_CHANGE_DEL)) << 4) | \
+ (((c)->old_events&(EV_READ|EV_WRITE)) << 5) | \
+ (((c)->old_events&(EV_CLOSED)) << 1) \
+ )
+
+#if EV_READ != 2 || EV_WRITE != 4 || EV_CLOSED != 0x80 || EV_CHANGE_ADD != 1 || EV_CHANGE_DEL != 2
+#error "Libevent's internals changed! Regenerate the op_table in epolltable-internal.h"
+#endif
+
+static const struct operation {
+ int events;
+ int op;
+} epoll_op_table[] = {
+ /* old= 0, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= 0, write: 0, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write: 0, read: 0, close:del */
+ { EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= 0, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= 0, write: 0, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_ADD },
+ /* old= 0, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write: 0, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_ADD },
+ /* old= 0, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= 0, write: 0, read:del, close: 0 */
+ { EPOLLIN, EPOLL_CTL_DEL },
+ /* old= 0, write: 0, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write: 0, read:del, close:del */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= 0, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= 0, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= 0, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= 0, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= 0, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:add, read: 0, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:add, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_ADD },
+ /* old= 0, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= 0, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= 0, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:del, read: 0, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= 0, write:del, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:del, read: 0, close:del */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= 0, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:del, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_ADD },
+ /* old= 0, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_ADD },
+ /* old= 0, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:del, read:del, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= 0, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_ADD },
+ /* old= 0, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= 0, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= 0, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= 0, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= 0, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= 0, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= 0, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= r, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= r, write: 0, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= r, write: 0, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= r, write: 0, read:del, close: 0 */
+ { EPOLLIN, EPOLL_CTL_DEL },
+ /* old= r, write: 0, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write: 0, read:del, close:del */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= r, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= r, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= r, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= r, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= r, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= r, write:add, read: 0, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:add, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= r, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= r, write:add, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= r, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= r, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= r, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= r, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= r, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= r, write:del, read: 0, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write:del, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:del, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= r, write:del, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= r, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= r, write:del, read:del, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= r, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= r, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= r, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= r, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= r, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= r, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= r, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= r, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= r, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= r, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= r, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= r, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= r, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= r, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= r, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= r, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= r, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= r, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= r, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= r, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= r, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= r, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= r, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= w, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= w, write: 0, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= w, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= w, write: 0, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= w, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= w, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= w, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= w, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= w, write:add, read: 0, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:add, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= w, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= w, write:add, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= w, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= w, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= w, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= w, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= w, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= w, write:del, read: 0, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= w, write:del, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:del, read: 0, close:del */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= w, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= w, write:del, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= w, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= w, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= w, write:del, read:del, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= w, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= w, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= w, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= w, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= w, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= w, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= w, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= w, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= w, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= w, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= w, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= w, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= w, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= w, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= w, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= w, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= w, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= w, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= w, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= w, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= w, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= w, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= w, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= rw, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= rw, write: 0, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= rw, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= rw, write: 0, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= rw, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= rw, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= rw, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= rw, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:add, read: 0, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:add, read:del, close: 0 */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= rw, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= rw, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= rw, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:del, read: 0, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:del, read:add, close: 0 */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:del, read:del, close: 0 */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
+ /* old= rw, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= rw, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= rw, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= rw, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= rw, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= rw, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= rw, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= rw, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= c, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= c, write: 0, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read: 0, close:del */
+ { EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= c, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= c, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= c, write: 0, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write: 0, read:del, close:del */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= c, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= c, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= c, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= c, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= c, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= c, write:add, read: 0, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= c, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= c, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= c, write:add, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= c, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= c, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= c, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= c, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= c, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= c, write:del, read: 0, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read: 0, close:del */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= c, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= c, write:del, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= c, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= c, write:del, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= c, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= c, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= c, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= c, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= c, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= c, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= c, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= c, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= c, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= c, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= c, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= c, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= c, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= c, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= c, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= c, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= c, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= c, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= c, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= c, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= c, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= c, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cr, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= cr, write: 0, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cr, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cr, write: 0, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write: 0, read:del, close:del */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= cr, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cr, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cr, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cr, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cr, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:add, read: 0, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:add, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cr, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cr, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cr, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:del, read: 0, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:del, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:del, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cr, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= cr, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cr, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cr, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= cr, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= cr, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cr, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cw, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old= cw, write: 0, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cw, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cw, write: 0, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cw, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cw, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cw, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cw, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:add, read: 0, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read: 0, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read: 0, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:add, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old= cw, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cw, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cw, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:del, read: 0, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read: 0, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read: 0, close:del */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= cw, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:del, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:del, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old= cw, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old= cw, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cw, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cw, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old= cw, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old= cw, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old= cw, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old=crw, write: 0, read: 0, close: 0 */
+ { 0, 0 },
+ /* old=crw, write: 0, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read: 0, close:xxx */
+ { 0, 255 },
+ /* old=crw, write: 0, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:add, close:xxx */
+ { 0, 255 },
+ /* old=crw, write: 0, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write: 0, read:del, close:xxx */
+ { 0, 255 },
+ /* old=crw, write: 0, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old=crw, write: 0, read:xxx, close:add */
+ { 0, 255 },
+ /* old=crw, write: 0, read:xxx, close:del */
+ { 0, 255 },
+ /* old=crw, write: 0, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:add, read: 0, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read: 0, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read: 0, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read: 0, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:add, read:add, close: 0 */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:add, close:add */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:add, close:del */
+ { EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:add, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:add, read:del, close: 0 */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:del, close:add */
+ { EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:del, close:del */
+ { EPOLLOUT, EPOLL_CTL_MOD },
+ /* old=crw, write:add, read:del, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:add, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:add, read:xxx, close:add */
+ { 0, 255 },
+ /* old=crw, write:add, read:xxx, close:del */
+ { 0, 255 },
+ /* old=crw, write:add, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:del, read: 0, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read: 0, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read: 0, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read: 0, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:del, read:add, close: 0 */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read:add, close:add */
+ { EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read:add, close:del */
+ { EPOLLIN, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read:add, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:del, read:del, close: 0 */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read:del, close:add */
+ { EPOLLRDHUP, EPOLL_CTL_MOD },
+ /* old=crw, write:del, read:del, close:del */
+ { EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
+ /* old=crw, write:del, read:del, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:del, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:del, read:xxx, close:add */
+ { 0, 255 },
+ /* old=crw, write:del, read:xxx, close:del */
+ { 0, 255 },
+ /* old=crw, write:del, read:xxx, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:xxx, read: 0, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:xxx, read: 0, close:add */
+ { 0, 255 },
+ /* old=crw, write:xxx, read: 0, close:del */
+ { 0, 255 },
+ /* old=crw, write:xxx, read: 0, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:add, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:add, close:add */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:add, close:del */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:add, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:del, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:del, close:add */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:del, close:del */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:del, close:xxx */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:xxx, close: 0 */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:xxx, close:add */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:xxx, close:del */
+ { 0, 255 },
+ /* old=crw, write:xxx, read:xxx, close:xxx */
+ { 0, 255 },
+};
+
+#endif
diff --git a/sntp/libevent/evbuffer-internal.h b/sntp/libevent/evbuffer-internal.h
new file mode 100644
index 000000000000..fb67ec095725
--- /dev/null
+++ b/sntp/libevent/evbuffer-internal.h
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVBUFFER_INTERNAL_H_INCLUDED_
+#define EVBUFFER_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+#include "event2/util.h"
+#include "event2/event_struct.h"
+#include "util-internal.h"
+#include "defer-internal.h"
+
+/* Experimental cb flag: "never deferred." Implementation note:
+ * these callbacks may get an inaccurate view of n_del/n_added in their
+ * arguments. */
+#define EVBUFFER_CB_NODEFER 2
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+#include <sys/queue.h>
+
+/* Minimum allocation for a chain. We define this so that we're burning no
+ * more than 5% of each allocation on overhead. It would be nice to lose even
+ * less space, though. */
+#if EVENT__SIZEOF_VOID_P < 8
+#define MIN_BUFFER_SIZE 512
+#else
+#define MIN_BUFFER_SIZE 1024
+#endif
+
+/** A single evbuffer callback for an evbuffer. This function will be invoked
+ * when bytes are added to or removed from the evbuffer. */
+struct evbuffer_cb_entry {
+ /** Structures to implement a doubly-linked queue of callbacks */
+ LIST_ENTRY(evbuffer_cb_entry) next;
+ /** The callback function to invoke when this callback is called.
+ If EVBUFFER_CB_OBSOLETE is set in flags, the cb_obsolete field is
+ valid; otherwise, cb_func is valid. */
+ union {
+ evbuffer_cb_func cb_func;
+ evbuffer_cb cb_obsolete;
+ } cb;
+ /** Argument to pass to cb. */
+ void *cbarg;
+ /** Currently set flags on this callback. */
+ ev_uint32_t flags;
+};
+
+struct bufferevent;
+struct evbuffer_chain;
+struct evbuffer {
+ /** The first chain in this buffer's linked list of chains. */
+ struct evbuffer_chain *first;
+ /** The last chain in this buffer's linked list of chains. */
+ struct evbuffer_chain *last;
+
+ /** Pointer to the next pointer pointing at the 'last_with_data' chain.
+ *
+ * To unpack:
+ *
+ * The last_with_data chain is the last chain that has any data in it.
+ * If all chains in the buffer are empty, it is the first chain.
+ * If the buffer has no chains, it is NULL.
+ *
+ * The last_with_datap pointer points at _whatever 'next' pointer_
+ * points at the last_with_datap chain. If the last_with_data chain
+ * is the first chain, or it is NULL, then the last_with_datap pointer
+ * is &buf->first.
+ */
+ struct evbuffer_chain **last_with_datap;
+
+ /** Total amount of bytes stored in all chains.*/
+ size_t total_len;
+
+ /** Number of bytes we have added to the buffer since we last tried to
+ * invoke callbacks. */
+ size_t n_add_for_cb;
+ /** Number of bytes we have removed from the buffer since we last
+ * tried to invoke callbacks. */
+ size_t n_del_for_cb;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ /** A lock used to mediate access to this buffer. */
+ void *lock;
+#endif
+ /** True iff we should free the lock field when we free this
+ * evbuffer. */
+ unsigned own_lock : 1;
+ /** True iff we should not allow changes to the front of the buffer
+ * (drains or prepends). */
+ unsigned freeze_start : 1;
+ /** True iff we should not allow changes to the end of the buffer
+ * (appends) */
+ unsigned freeze_end : 1;
+ /** True iff this evbuffer's callbacks are not invoked immediately
+ * upon a change in the buffer, but instead are deferred to be invoked
+ * from the event_base's loop. Useful for preventing enormous stack
+ * overflows when we have mutually recursive callbacks, and for
+ * serializing callbacks in a single thread. */
+ unsigned deferred_cbs : 1;
+#ifdef _WIN32
+ /** True iff this buffer is set up for overlapped IO. */
+ unsigned is_overlapped : 1;
+#endif
+ /** Zero or more EVBUFFER_FLAG_* bits */
+ ev_uint32_t flags;
+
+ /** Used to implement deferred callbacks. */
+ struct event_base *cb_queue;
+
+ /** A reference count on this evbuffer. When the reference count
+ * reaches 0, the buffer is destroyed. Manipulated with
+ * evbuffer_incref and evbuffer_decref_and_unlock and
+ * evbuffer_free. */
+ int refcnt;
+
+ /** A struct event_callback handle to make all of this buffer's callbacks
+ * invoked from the event loop. */
+ struct event_callback deferred;
+
+ /** A doubly-linked-list of callback functions */
+ LIST_HEAD(evbuffer_cb_queue, evbuffer_cb_entry) callbacks;
+
+ /** The parent bufferevent object this evbuffer belongs to.
+ * NULL if the evbuffer stands alone. */
+ struct bufferevent *parent;
+};
+
+/** A single item in an evbuffer. */
+struct evbuffer_chain {
+ /** points to next buffer in the chain */
+ struct evbuffer_chain *next;
+
+ /** total allocation available in the buffer field. */
+ size_t buffer_len;
+
+ /** unused space at the beginning of buffer or an offset into a
+ * file for sendfile buffers. */
+ ev_off_t misalign;
+
+ /** Offset into buffer + misalign at which to start writing.
+ * In other words, the total number of bytes actually stored
+ * in buffer. */
+ size_t off;
+
+ /** Set if special handling is required for this chain */
+ unsigned flags;
+#define EVBUFFER_FILESEGMENT 0x0001 /**< A chain used for a file segment */
+#define EVBUFFER_SENDFILE 0x0002 /**< a chain used with sendfile */
+#define EVBUFFER_REFERENCE 0x0004 /**< a chain with a mem reference */
+#define EVBUFFER_IMMUTABLE 0x0008 /**< read-only chain */
+ /** a chain that mustn't be reallocated or freed, or have its contents
+ * memmoved, until the chain is un-pinned. */
+#define EVBUFFER_MEM_PINNED_R 0x0010
+#define EVBUFFER_MEM_PINNED_W 0x0020
+#define EVBUFFER_MEM_PINNED_ANY (EVBUFFER_MEM_PINNED_R|EVBUFFER_MEM_PINNED_W)
+ /** a chain that should be freed, but can't be freed until it is
+ * un-pinned. */
+#define EVBUFFER_DANGLING 0x0040
+ /** a chain that is a referenced copy of another chain */
+#define EVBUFFER_MULTICAST 0x0080
+
+ /** number of references to this chain */
+ int refcnt;
+
+ /** Usually points to the read-write memory belonging to this
+ * buffer allocated as part of the evbuffer_chain allocation.
+ * For mmap, this can be a read-only buffer and
+ * EVBUFFER_IMMUTABLE will be set in flags. For sendfile, it
+ * may point to NULL.
+ */
+ unsigned char *buffer;
+};
+
+/** callback for a reference chain; lets us know what to do with it when
+ * we're done with it. Lives at the end of an evbuffer_chain with the
+ * EVBUFFER_REFERENCE flag set */
+struct evbuffer_chain_reference {
+ evbuffer_ref_cleanup_cb cleanupfn;
+ void *extra;
+};
+
+/** File segment for a file-segment chain. Lives at the end of an
+ * evbuffer_chain with the EVBUFFER_FILESEGMENT flag set. */
+struct evbuffer_chain_file_segment {
+ struct evbuffer_file_segment *segment;
+#ifdef _WIN32
+ /** If we're using CreateFileMapping, this is the handle to the view. */
+ HANDLE view_handle;
+#endif
+};
+
+/* Declared in event2/buffer.h; defined here. */
+struct evbuffer_file_segment {
+ void *lock; /**< lock prevent concurrent access to refcnt */
+ int refcnt; /**< Reference count for this file segment */
+ unsigned flags; /**< combination of EVBUF_FS_* flags */
+
+ /** What kind of file segment is this? */
+ unsigned can_sendfile : 1;
+ unsigned is_mapping : 1;
+
+ /** The fd that we read the data from. */
+ int fd;
+ /** If we're using mmap, this is the raw mapped memory. */
+ void *mapping;
+#ifdef _WIN32
+ /** If we're using CreateFileMapping, this is the mapping */
+ HANDLE mapping_handle;
+#endif
+ /** If we're using mmap or IO, this is the content of the file
+ * segment. */
+ char *contents;
+ /** Position of this segment within the file. */
+ ev_off_t file_offset;
+ /** If we're using mmap, this is the offset within 'mapping' where
+ * this data segment begins. */
+ ev_off_t mmap_offset;
+ /** The length of this segment. */
+ ev_off_t length;
+ /** Cleanup callback function */
+ evbuffer_file_segment_cleanup_cb cleanup_cb;
+ /** Argument to be pass to cleanup callback function */
+ void *cleanup_cb_arg;
+};
+
+/** Information about the multicast parent of a chain. Lives at the
+ * end of an evbuffer_chain with the EVBUFFER_MULTICAST flag set. */
+struct evbuffer_multicast_parent {
+ /** source buffer the multicast parent belongs to */
+ struct evbuffer *source;
+ /** multicast parent for this chain */
+ struct evbuffer_chain *parent;
+};
+
+#define EVBUFFER_CHAIN_SIZE sizeof(struct evbuffer_chain)
+/** Return a pointer to extra data allocated along with an evbuffer. */
+#define EVBUFFER_CHAIN_EXTRA(t, c) (t *)((struct evbuffer_chain *)(c) + 1)
+
+/** Assert that we are holding the lock on an evbuffer */
+#define ASSERT_EVBUFFER_LOCKED(buffer) \
+ EVLOCK_ASSERT_LOCKED((buffer)->lock)
+
+#define EVBUFFER_LOCK(buffer) \
+ do { \
+ EVLOCK_LOCK((buffer)->lock, 0); \
+ } while (0)
+#define EVBUFFER_UNLOCK(buffer) \
+ do { \
+ EVLOCK_UNLOCK((buffer)->lock, 0); \
+ } while (0)
+#define EVBUFFER_LOCK2(buffer1, buffer2) \
+ do { \
+ EVLOCK_LOCK2((buffer1)->lock, (buffer2)->lock, 0, 0); \
+ } while (0)
+#define EVBUFFER_UNLOCK2(buffer1, buffer2) \
+ do { \
+ EVLOCK_UNLOCK2((buffer1)->lock, (buffer2)->lock, 0, 0); \
+ } while (0)
+
+/** Increase the reference count of buf by one. */
+void evbuffer_incref_(struct evbuffer *buf);
+/** Increase the reference count of buf by one and acquire the lock. */
+void evbuffer_incref_and_lock_(struct evbuffer *buf);
+/** Pin a single buffer chain using a given flag. A pinned chunk may not be
+ * moved or freed until it is unpinned. */
+void evbuffer_chain_pin_(struct evbuffer_chain *chain, unsigned flag);
+/** Unpin a single buffer chain using a given flag. */
+void evbuffer_chain_unpin_(struct evbuffer_chain *chain, unsigned flag);
+/** As evbuffer_free, but requires that we hold a lock on the buffer, and
+ * releases the lock before freeing it and the buffer. */
+void evbuffer_decref_and_unlock_(struct evbuffer *buffer);
+
+/** As evbuffer_expand, but does not guarantee that the newly allocated memory
+ * is contiguous. Instead, it may be split across two or more chunks. */
+int evbuffer_expand_fast_(struct evbuffer *, size_t, int);
+
+/** Helper: prepares for a readv/WSARecv call by expanding the buffer to
+ * hold enough memory to read 'howmuch' bytes in possibly noncontiguous memory.
+ * Sets up the one or two iovecs in 'vecs' to point to the free memory and its
+ * extent, and *chainp to point to the first chain that we'll try to read into.
+ * Returns the number of vecs used.
+ */
+int evbuffer_read_setup_vecs_(struct evbuffer *buf, ev_ssize_t howmuch,
+ struct evbuffer_iovec *vecs, int n_vecs, struct evbuffer_chain ***chainp,
+ int exact);
+
+/* Helper macro: copies an evbuffer_iovec in ei to a win32 WSABUF in i. */
+#define WSABUF_FROM_EVBUFFER_IOV(i,ei) do { \
+ (i)->buf = (ei)->iov_base; \
+ (i)->len = (unsigned long)(ei)->iov_len; \
+ } while (0)
+/* XXXX the cast above is safe for now, but not if we allow mmaps on win64.
+ * See note in buffer_iocp's launch_write function */
+
+/** Set the parent bufferevent object for buf to bev */
+void evbuffer_set_parent_(struct evbuffer *buf, struct bufferevent *bev);
+
+void evbuffer_invoke_callbacks_(struct evbuffer *buf);
+
+
+int evbuffer_get_callbacks_(struct evbuffer *buffer,
+ struct event_callback **cbs,
+ int max_cbs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVBUFFER_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/evconfig-private.h b/sntp/libevent/evconfig-private.h
new file mode 100644
index 000000000000..ea4940d5e8f9
--- /dev/null
+++ b/sntp/libevent/evconfig-private.h
@@ -0,0 +1,49 @@
+/* evconfig-private.h. Generated from evconfig-private.h.in by configure. */
+/* evconfig-private.h template - see "Configuration Header Templates" */
+/* in AC manual. Kevin Bowling <kevin.bowling@kev009.com */
+#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
+#define EVCONFIG_PRIVATE_H_INCLUDED_
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to 1 if on MINIX. */
+#ifndef _MINIX
+/* #undef _MINIX */
+#endif
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#ifndef _POSIX_1_SOURCE
+/* #undef _POSIX_1_SOURCE */
+#endif
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#ifndef _POSIX_SOURCE
+/* #undef _POSIX_SOURCE */
+#endif
+
+#endif
diff --git a/sntp/libevent/evconfig-private.h.in b/sntp/libevent/evconfig-private.h.in
new file mode 100644
index 000000000000..7b3dfdb10e90
--- /dev/null
+++ b/sntp/libevent/evconfig-private.h.in
@@ -0,0 +1,48 @@
+/* evconfig-private.h template - see "Configuration Header Templates" */
+/* in AC manual. Kevin Bowling <kevin.bowling@kev009.com */
+#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
+#define EVCONFIG_PRIVATE_H_INCLUDED_
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#ifndef _MINIX
+#undef _MINIX
+#endif
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#ifndef _POSIX_1_SOURCE
+#undef _POSIX_1_SOURCE
+#endif
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#ifndef _POSIX_SOURCE
+#undef _POSIX_SOURCE
+#endif
+
+#endif
diff --git a/sntp/libevent/evdns.c b/sntp/libevent/evdns.c
new file mode 100644
index 000000000000..59c3abe18655
--- /dev/null
+++ b/sntp/libevent/evdns.c
@@ -0,0 +1,4709 @@
+/* Copyright 2006-2007 Niels Provos
+ * Copyright 2007-2012 Nick Mathewson and Niels Provos
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/* Based on software by Adam Langly. Adam's original message:
+ *
+ * Async DNS Library
+ * Adam Langley <agl@imperialviolet.org>
+ * http://www.imperialviolet.org/eventdns.html
+ * Public Domain code
+ *
+ * This software is Public Domain. To view a copy of the public domain dedication,
+ * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
+ * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+ *
+ * I ask and expect, but do not require, that all derivative works contain an
+ * attribution similar to:
+ * Parts developed by Adam Langley <agl@imperialviolet.org>
+ *
+ * You may wish to replace the word "Parts" with something else depending on
+ * the amount of original code.
+ *
+ * (Derivative works does not include programs which link against, run or include
+ * the source verbatim in their source distributions)
+ *
+ * Version: 0.1b
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifndef _FORTIFY_SOURCE
+#define _FORTIFY_SOURCE 3
+#endif
+
+#include <string.h>
+#include <fcntl.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <limits.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdarg.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x400
+#endif
+#include <shlobj.h>
+#endif
+
+#include "event2/dns.h"
+#include "event2/dns_struct.h"
+#include "event2/dns_compat.h"
+#include "event2/util.h"
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/thread.h"
+
+#include "defer-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "strlcpy-internal.h"
+#include "ipv6-internal.h"
+#include "util-internal.h"
+#include "evthread-internal.h"
+#ifdef _WIN32
+#include <ctype.h>
+#include <winsock2.h>
+#include <windows.h>
+#include <iphlpapi.h>
+#include <io.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+
+#define EVDNS_LOG_DEBUG EVENT_LOG_DEBUG
+#define EVDNS_LOG_WARN EVENT_LOG_WARN
+#define EVDNS_LOG_MSG EVENT_LOG_MSG
+
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 255
+#endif
+
+#include <stdio.h>
+
+#undef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#define ASSERT_VALID_REQUEST(req) \
+ EVUTIL_ASSERT((req)->handle && (req)->handle->current_req == (req))
+
+#define u64 ev_uint64_t
+#define u32 ev_uint32_t
+#define u16 ev_uint16_t
+#define u8 ev_uint8_t
+
+/* maximum number of addresses from a single packet */
+/* that we bother recording */
+#define MAX_V4_ADDRS 32
+#define MAX_V6_ADDRS 32
+
+
+#define TYPE_A EVDNS_TYPE_A
+#define TYPE_CNAME 5
+#define TYPE_PTR EVDNS_TYPE_PTR
+#define TYPE_SOA EVDNS_TYPE_SOA
+#define TYPE_AAAA EVDNS_TYPE_AAAA
+
+#define CLASS_INET EVDNS_CLASS_INET
+
+/* Persistent handle. We keep this separate from 'struct request' since we
+ * need some object to last for as long as an evdns_request is outstanding so
+ * that it can be canceled, whereas a search request can lead to multiple
+ * 'struct request' instances being created over its lifetime. */
+struct evdns_request {
+ struct request *current_req;
+ struct evdns_base *base;
+
+ int pending_cb; /* Waiting for its callback to be invoked; not
+ * owned by event base any more. */
+
+ /* elements used by the searching code */
+ int search_index;
+ struct search_state *search_state;
+ char *search_origname; /* needs to be free()ed */
+ int search_flags;
+};
+
+struct request {
+ u8 *request; /* the dns packet data */
+ u8 request_type; /* TYPE_PTR or TYPE_A or TYPE_AAAA */
+ unsigned int request_len;
+ int reissue_count;
+ int tx_count; /* the number of times that this packet has been sent */
+ void *user_pointer; /* the pointer given to us for this request */
+ evdns_callback_type user_callback;
+ struct nameserver *ns; /* the server which we last sent it */
+
+ /* these objects are kept in a circular list */
+ /* XXX We could turn this into a CIRCLEQ. */
+ struct request *next, *prev;
+
+ struct event timeout_event;
+
+ u16 trans_id; /* the transaction id */
+ unsigned request_appended :1; /* true if the request pointer is data which follows this struct */
+ unsigned transmit_me :1; /* needs to be transmitted */
+
+ /* XXXX This is a horrible hack. */
+ char **put_cname_in_ptr; /* store the cname here if we get one. */
+
+ struct evdns_base *base;
+
+ struct evdns_request *handle;
+};
+
+struct reply {
+ unsigned int type;
+ unsigned int have_answer : 1;
+ union {
+ struct {
+ u32 addrcount;
+ u32 addresses[MAX_V4_ADDRS];
+ } a;
+ struct {
+ u32 addrcount;
+ struct in6_addr addresses[MAX_V6_ADDRS];
+ } aaaa;
+ struct {
+ char name[HOST_NAME_MAX];
+ } ptr;
+ } data;
+};
+
+struct nameserver {
+ evutil_socket_t socket; /* a connected UDP socket */
+ struct sockaddr_storage address;
+ ev_socklen_t addrlen;
+ int failed_times; /* number of times which we have given this server a chance */
+ int timedout; /* number of times in a row a request has timed out */
+ struct event event;
+ /* these objects are kept in a circular list */
+ struct nameserver *next, *prev;
+ struct event timeout_event; /* used to keep the timeout for */
+ /* when we next probe this server. */
+ /* Valid if state == 0 */
+ /* Outstanding probe request for this nameserver, if any */
+ struct evdns_request *probe_request;
+ char state; /* zero if we think that this server is down */
+ char choked; /* true if we have an EAGAIN from this server's socket */
+ char write_waiting; /* true if we are waiting for EV_WRITE events */
+ struct evdns_base *base;
+
+ /* Number of currently inflight requests: used
+ * to track when we should add/del the event. */
+ int requests_inflight;
+};
+
+
+/* Represents a local port where we're listening for DNS requests. Right now, */
+/* only UDP is supported. */
+struct evdns_server_port {
+ evutil_socket_t socket; /* socket we use to read queries and write replies. */
+ int refcnt; /* reference count. */
+ char choked; /* Are we currently blocked from writing? */
+ char closing; /* Are we trying to close this port, pending writes? */
+ evdns_request_callback_fn_type user_callback; /* Fn to handle requests */
+ void *user_data; /* Opaque pointer passed to user_callback */
+ struct event event; /* Read/write event */
+ /* circular list of replies that we want to write. */
+ struct server_request *pending_replies;
+ struct event_base *event_base;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ void *lock;
+#endif
+};
+
+/* Represents part of a reply being built. (That is, a single RR.) */
+struct server_reply_item {
+ struct server_reply_item *next; /* next item in sequence. */
+ char *name; /* name part of the RR */
+ u16 type; /* The RR type */
+ u16 class; /* The RR class (usually CLASS_INET) */
+ u32 ttl; /* The RR TTL */
+ char is_name; /* True iff data is a label */
+ u16 datalen; /* Length of data; -1 if data is a label */
+ void *data; /* The contents of the RR */
+};
+
+/* Represents a request that we've received as a DNS server, and holds */
+/* the components of the reply as we're constructing it. */
+struct server_request {
+ /* Pointers to the next and previous entries on the list of replies */
+ /* that we're waiting to write. Only set if we have tried to respond */
+ /* and gotten EAGAIN. */
+ struct server_request *next_pending;
+ struct server_request *prev_pending;
+
+ u16 trans_id; /* Transaction id. */
+ struct evdns_server_port *port; /* Which port received this request on? */
+ struct sockaddr_storage addr; /* Where to send the response */
+ ev_socklen_t addrlen; /* length of addr */
+
+ int n_answer; /* how many answer RRs have been set? */
+ int n_authority; /* how many authority RRs have been set? */
+ int n_additional; /* how many additional RRs have been set? */
+
+ struct server_reply_item *answer; /* linked list of answer RRs */
+ struct server_reply_item *authority; /* linked list of authority RRs */
+ struct server_reply_item *additional; /* linked list of additional RRs */
+
+ /* Constructed response. Only set once we're ready to send a reply. */
+ /* Once this is set, the RR fields are cleared, and no more should be set. */
+ char *response;
+ size_t response_len;
+
+ /* Caller-visible fields: flags, questions. */
+ struct evdns_server_request base;
+};
+
+struct evdns_base {
+ /* An array of n_req_heads circular lists for inflight requests.
+ * Each inflight request req is in req_heads[req->trans_id % n_req_heads].
+ */
+ struct request **req_heads;
+ /* A circular list of requests that we're waiting to send, but haven't
+ * sent yet because there are too many requests inflight */
+ struct request *req_waiting_head;
+ /* A circular list of nameservers. */
+ struct nameserver *server_head;
+ int n_req_heads;
+
+ struct event_base *event_base;
+
+ /* The number of good nameservers that we have */
+ int global_good_nameservers;
+
+ /* inflight requests are contained in the req_head list */
+ /* and are actually going out across the network */
+ int global_requests_inflight;
+ /* requests which aren't inflight are in the waiting list */
+ /* and are counted here */
+ int global_requests_waiting;
+
+ int global_max_requests_inflight;
+
+ struct timeval global_timeout; /* 5 seconds by default */
+ int global_max_reissues; /* a reissue occurs when we get some errors from the server */
+ int global_max_retransmits; /* number of times we'll retransmit a request which timed out */
+ /* number of timeouts in a row before we consider this server to be down */
+ int global_max_nameserver_timeout;
+ /* true iff we will use the 0x20 hack to prevent poisoning attacks. */
+ int global_randomize_case;
+
+ /* The first time that a nameserver fails, how long do we wait before
+ * probing to see if it has returned? */
+ struct timeval global_nameserver_probe_initial_timeout;
+
+ /** Port to bind to for outgoing DNS packets. */
+ struct sockaddr_storage global_outgoing_address;
+ /** ev_socklen_t for global_outgoing_address. 0 if it isn't set. */
+ ev_socklen_t global_outgoing_addrlen;
+
+ struct timeval global_getaddrinfo_allow_skew;
+
+ int getaddrinfo_ipv4_timeouts;
+ int getaddrinfo_ipv6_timeouts;
+ int getaddrinfo_ipv4_answered;
+ int getaddrinfo_ipv6_answered;
+
+ struct search_state *global_search_state;
+
+ TAILQ_HEAD(hosts_list, hosts_entry) hostsdb;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ void *lock;
+#endif
+
+ int disable_when_inactive;
+};
+
+struct hosts_entry {
+ TAILQ_ENTRY(hosts_entry) next;
+ union {
+ struct sockaddr sa;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ } addr;
+ int addrlen;
+ char hostname[1];
+};
+
+static struct evdns_base *current_base = NULL;
+
+struct evdns_base *
+evdns_get_global_base(void)
+{
+ return current_base;
+}
+
+/* Given a pointer to an evdns_server_request, get the corresponding */
+/* server_request. */
+#define TO_SERVER_REQUEST(base_ptr) \
+ ((struct server_request*) \
+ (((char*)(base_ptr) - evutil_offsetof(struct server_request, base))))
+
+#define REQ_HEAD(base, id) ((base)->req_heads[id % (base)->n_req_heads])
+
+static struct nameserver *nameserver_pick(struct evdns_base *base);
+static void evdns_request_insert(struct request *req, struct request **head);
+static void evdns_request_remove(struct request *req, struct request **head);
+static void nameserver_ready_callback(evutil_socket_t fd, short events, void *arg);
+static int evdns_transmit(struct evdns_base *base);
+static int evdns_request_transmit(struct request *req);
+static void nameserver_send_probe(struct nameserver *const ns);
+static void search_request_finished(struct evdns_request *const);
+static int search_try_next(struct evdns_request *const req);
+static struct request *search_request_new(struct evdns_base *base, struct evdns_request *handle, int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg);
+static void evdns_requests_pump_waiting_queue(struct evdns_base *base);
+static u16 transaction_id_pick(struct evdns_base *base);
+static struct request *request_new(struct evdns_base *base, struct evdns_request *handle, int type, const char *name, int flags, evdns_callback_type callback, void *ptr);
+static void request_submit(struct request *const req);
+
+static int server_request_free(struct server_request *req);
+static void server_request_free_answers(struct server_request *req);
+static void server_port_free(struct evdns_server_port *port);
+static void server_port_ready_callback(evutil_socket_t fd, short events, void *arg);
+static int evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char *const filename);
+static int evdns_base_set_option_impl(struct evdns_base *base,
+ const char *option, const char *val, int flags);
+static void evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests);
+static void evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg);
+
+static int strtoint(const char *const str);
+
+#ifdef EVENT__DISABLE_THREAD_SUPPORT
+#define EVDNS_LOCK(base) EVUTIL_NIL_STMT_
+#define EVDNS_UNLOCK(base) EVUTIL_NIL_STMT_
+#define ASSERT_LOCKED(base) EVUTIL_NIL_STMT_
+#else
+#define EVDNS_LOCK(base) \
+ EVLOCK_LOCK((base)->lock, 0)
+#define EVDNS_UNLOCK(base) \
+ EVLOCK_UNLOCK((base)->lock, 0)
+#define ASSERT_LOCKED(base) \
+ EVLOCK_ASSERT_LOCKED((base)->lock)
+#endif
+
+static evdns_debug_log_fn_type evdns_log_fn = NULL;
+
+void
+evdns_set_log_fn(evdns_debug_log_fn_type fn)
+{
+ evdns_log_fn = fn;
+}
+
+#ifdef __GNUC__
+#define EVDNS_LOG_CHECK __attribute__ ((format(printf, 2, 3)))
+#else
+#define EVDNS_LOG_CHECK
+#endif
+
+static void evdns_log_(int severity, const char *fmt, ...) EVDNS_LOG_CHECK;
+static void
+evdns_log_(int severity, const char *fmt, ...)
+{
+ va_list args;
+ va_start(args,fmt);
+ if (evdns_log_fn) {
+ char buf[512];
+ int is_warn = (severity == EVDNS_LOG_WARN);
+ evutil_vsnprintf(buf, sizeof(buf), fmt, args);
+ evdns_log_fn(is_warn, buf);
+ } else {
+ event_logv_(severity, NULL, fmt, args);
+ }
+ va_end(args);
+}
+
+#define log evdns_log_
+
+/* This walks the list of inflight requests to find the */
+/* one with a matching transaction id. Returns NULL on */
+/* failure */
+static struct request *
+request_find_from_trans_id(struct evdns_base *base, u16 trans_id) {
+ struct request *req = REQ_HEAD(base, trans_id);
+ struct request *const started_at = req;
+
+ ASSERT_LOCKED(base);
+
+ if (req) {
+ do {
+ if (req->trans_id == trans_id) return req;
+ req = req->next;
+ } while (req != started_at);
+ }
+
+ return NULL;
+}
+
+/* a libevent callback function which is called when a nameserver */
+/* has gone down and we want to test if it has came back to life yet */
+static void
+nameserver_prod_callback(evutil_socket_t fd, short events, void *arg) {
+ struct nameserver *const ns = (struct nameserver *) arg;
+ (void)fd;
+ (void)events;
+
+ EVDNS_LOCK(ns->base);
+ nameserver_send_probe(ns);
+ EVDNS_UNLOCK(ns->base);
+}
+
+/* a libevent callback which is called when a nameserver probe (to see if */
+/* it has come back to life) times out. We increment the count of failed_times */
+/* and wait longer to send the next probe packet. */
+static void
+nameserver_probe_failed(struct nameserver *const ns) {
+ struct timeval timeout;
+ int i;
+
+ ASSERT_LOCKED(ns->base);
+ (void) evtimer_del(&ns->timeout_event);
+ if (ns->state == 1) {
+ /* This can happen if the nameserver acts in a way which makes us mark */
+ /* it as bad and then starts sending good replies. */
+ return;
+ }
+
+#define MAX_PROBE_TIMEOUT 3600
+#define TIMEOUT_BACKOFF_FACTOR 3
+
+ memcpy(&timeout, &ns->base->global_nameserver_probe_initial_timeout,
+ sizeof(struct timeval));
+ for (i=ns->failed_times; i > 0 && timeout.tv_sec < MAX_PROBE_TIMEOUT; --i) {
+ timeout.tv_sec *= TIMEOUT_BACKOFF_FACTOR;
+ timeout.tv_usec *= TIMEOUT_BACKOFF_FACTOR;
+ if (timeout.tv_usec > 1000000) {
+ timeout.tv_sec += timeout.tv_usec / 1000000;
+ timeout.tv_usec %= 1000000;
+ }
+ }
+ if (timeout.tv_sec > MAX_PROBE_TIMEOUT) {
+ timeout.tv_sec = MAX_PROBE_TIMEOUT;
+ timeout.tv_usec = 0;
+ }
+
+ ns->failed_times++;
+
+ if (evtimer_add(&ns->timeout_event, &timeout) < 0) {
+ char addrbuf[128];
+ log(EVDNS_LOG_WARN,
+ "Error from libevent when adding timer event for %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)));
+ }
+}
+
+/* called when a nameserver has been deemed to have failed. For example, too */
+/* many packets have timed out etc */
+static void
+nameserver_failed(struct nameserver *const ns, const char *msg) {
+ struct request *req, *started_at;
+ struct evdns_base *base = ns->base;
+ int i;
+ char addrbuf[128];
+
+ ASSERT_LOCKED(base);
+ /* if this nameserver has already been marked as failed */
+ /* then don't do anything */
+ if (!ns->state) return;
+
+ log(EVDNS_LOG_MSG, "Nameserver %s has failed: %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)),
+ msg);
+
+ base->global_good_nameservers--;
+ EVUTIL_ASSERT(base->global_good_nameservers >= 0);
+ if (base->global_good_nameservers == 0) {
+ log(EVDNS_LOG_MSG, "All nameservers have failed");
+ }
+
+ ns->state = 0;
+ ns->failed_times = 1;
+
+ if (evtimer_add(&ns->timeout_event,
+ &base->global_nameserver_probe_initial_timeout) < 0) {
+ log(EVDNS_LOG_WARN,
+ "Error from libevent when adding timer event for %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)));
+ /* ???? Do more? */
+ }
+
+ /* walk the list of inflight requests to see if any can be reassigned to */
+ /* a different server. Requests in the waiting queue don't have a */
+ /* nameserver assigned yet */
+
+ /* if we don't have *any* good nameservers then there's no point */
+ /* trying to reassign requests to one */
+ if (!base->global_good_nameservers) return;
+
+ for (i = 0; i < base->n_req_heads; ++i) {
+ req = started_at = base->req_heads[i];
+ if (req) {
+ do {
+ if (req->tx_count == 0 && req->ns == ns) {
+ /* still waiting to go out, can be moved */
+ /* to another server */
+ req->ns = nameserver_pick(base);
+ }
+ req = req->next;
+ } while (req != started_at);
+ }
+ }
+}
+
+static void
+nameserver_up(struct nameserver *const ns)
+{
+ char addrbuf[128];
+ ASSERT_LOCKED(ns->base);
+ if (ns->state) return;
+ log(EVDNS_LOG_MSG, "Nameserver %s is back up",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)));
+ evtimer_del(&ns->timeout_event);
+ if (ns->probe_request) {
+ evdns_cancel_request(ns->base, ns->probe_request);
+ ns->probe_request = NULL;
+ }
+ ns->state = 1;
+ ns->failed_times = 0;
+ ns->timedout = 0;
+ ns->base->global_good_nameservers++;
+}
+
+static void
+request_trans_id_set(struct request *const req, const u16 trans_id) {
+ req->trans_id = trans_id;
+ *((u16 *) req->request) = htons(trans_id);
+}
+
+/* Called to remove a request from a list and dealloc it. */
+/* head is a pointer to the head of the list it should be */
+/* removed from or NULL if the request isn't in a list. */
+/* when free_handle is one, free the handle as well. */
+static void
+request_finished(struct request *const req, struct request **head, int free_handle) {
+ struct evdns_base *base = req->base;
+ int was_inflight = (head != &base->req_waiting_head);
+ EVDNS_LOCK(base);
+ ASSERT_VALID_REQUEST(req);
+
+ if (head)
+ evdns_request_remove(req, head);
+
+ log(EVDNS_LOG_DEBUG, "Removing timeout for request %p", req);
+ if (was_inflight) {
+ evtimer_del(&req->timeout_event);
+ base->global_requests_inflight--;
+ req->ns->requests_inflight--;
+ } else {
+ base->global_requests_waiting--;
+ }
+ /* it was initialized during request_new / evtimer_assign */
+ event_debug_unassign(&req->timeout_event);
+
+ if (req->ns &&
+ req->ns->requests_inflight == 0 &&
+ req->base->disable_when_inactive) {
+ event_del(&req->ns->event);
+ }
+
+ if (!req->request_appended) {
+ /* need to free the request data on it's own */
+ mm_free(req->request);
+ } else {
+ /* the request data is appended onto the header */
+ /* so everything gets free()ed when we: */
+ }
+
+ if (req->handle) {
+ EVUTIL_ASSERT(req->handle->current_req == req);
+
+ if (free_handle) {
+ search_request_finished(req->handle);
+ req->handle->current_req = NULL;
+ if (! req->handle->pending_cb) {
+ /* If we're planning to run the callback,
+ * don't free the handle until later. */
+ mm_free(req->handle);
+ }
+ req->handle = NULL; /* If we have a bug, let's crash
+ * early */
+ } else {
+ req->handle->current_req = NULL;
+ }
+ }
+
+ mm_free(req);
+
+ evdns_requests_pump_waiting_queue(base);
+ EVDNS_UNLOCK(base);
+}
+
+/* This is called when a server returns a funny error code. */
+/* We try the request again with another server. */
+/* */
+/* return: */
+/* 0 ok */
+/* 1 failed/reissue is pointless */
+static int
+request_reissue(struct request *req) {
+ const struct nameserver *const last_ns = req->ns;
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+ /* the last nameserver should have been marked as failing */
+ /* by the caller of this function, therefore pick will try */
+ /* not to return it */
+ req->ns = nameserver_pick(req->base);
+ if (req->ns == last_ns) {
+ /* ... but pick did return it */
+ /* not a lot of point in trying again with the */
+ /* same server */
+ return 1;
+ }
+
+ req->reissue_count++;
+ req->tx_count = 0;
+ req->transmit_me = 1;
+
+ return 0;
+}
+
+/* this function looks for space on the inflight queue and promotes */
+/* requests from the waiting queue if it can. */
+/* */
+/* TODO: */
+/* add return code, see at nameserver_pick() and other functions. */
+static void
+evdns_requests_pump_waiting_queue(struct evdns_base *base) {
+ ASSERT_LOCKED(base);
+ while (base->global_requests_inflight < base->global_max_requests_inflight &&
+ base->global_requests_waiting) {
+ struct request *req;
+
+ EVUTIL_ASSERT(base->req_waiting_head);
+ req = base->req_waiting_head;
+
+ req->ns = nameserver_pick(base);
+ if (!req->ns)
+ return;
+
+ /* move a request from the waiting queue to the inflight queue */
+ req->ns->requests_inflight++;
+
+ evdns_request_remove(req, &base->req_waiting_head);
+
+ base->global_requests_waiting--;
+ base->global_requests_inflight++;
+
+ request_trans_id_set(req, transaction_id_pick(base));
+
+ evdns_request_insert(req, &REQ_HEAD(base, req->trans_id));
+ evdns_request_transmit(req);
+ evdns_transmit(base);
+ }
+}
+
+/* TODO(nickm) document */
+struct deferred_reply_callback {
+ struct event_callback deferred;
+ struct evdns_request *handle;
+ u8 request_type;
+ u8 have_reply;
+ u32 ttl;
+ u32 err;
+ evdns_callback_type user_callback;
+ struct reply reply;
+};
+
+static void
+reply_run_callback(struct event_callback *d, void *user_pointer)
+{
+ struct deferred_reply_callback *cb =
+ EVUTIL_UPCAST(d, struct deferred_reply_callback, deferred);
+
+ switch (cb->request_type) {
+ case TYPE_A:
+ if (cb->have_reply)
+ cb->user_callback(DNS_ERR_NONE, DNS_IPv4_A,
+ cb->reply.data.a.addrcount, cb->ttl,
+ cb->reply.data.a.addresses,
+ user_pointer);
+ else
+ cb->user_callback(cb->err, 0, 0, cb->ttl, NULL, user_pointer);
+ break;
+ case TYPE_PTR:
+ if (cb->have_reply) {
+ char *name = cb->reply.data.ptr.name;
+ cb->user_callback(DNS_ERR_NONE, DNS_PTR, 1, cb->ttl,
+ &name, user_pointer);
+ } else {
+ cb->user_callback(cb->err, 0, 0, cb->ttl, NULL, user_pointer);
+ }
+ break;
+ case TYPE_AAAA:
+ if (cb->have_reply)
+ cb->user_callback(DNS_ERR_NONE, DNS_IPv6_AAAA,
+ cb->reply.data.aaaa.addrcount, cb->ttl,
+ cb->reply.data.aaaa.addresses,
+ user_pointer);
+ else
+ cb->user_callback(cb->err, 0, 0, cb->ttl, NULL, user_pointer);
+ break;
+ default:
+ EVUTIL_ASSERT(0);
+ }
+
+ if (cb->handle && cb->handle->pending_cb) {
+ mm_free(cb->handle);
+ }
+
+ mm_free(cb);
+}
+
+static void
+reply_schedule_callback(struct request *const req, u32 ttl, u32 err, struct reply *reply)
+{
+ struct deferred_reply_callback *d = mm_calloc(1, sizeof(*d));
+
+ if (!d) {
+ event_warn("%s: Couldn't allocate space for deferred callback.",
+ __func__);
+ return;
+ }
+
+ ASSERT_LOCKED(req->base);
+
+ d->request_type = req->request_type;
+ d->user_callback = req->user_callback;
+ d->ttl = ttl;
+ d->err = err;
+ if (reply) {
+ d->have_reply = 1;
+ memcpy(&d->reply, reply, sizeof(struct reply));
+ }
+
+ if (req->handle) {
+ req->handle->pending_cb = 1;
+ d->handle = req->handle;
+ }
+
+ event_deferred_cb_init_(
+ &d->deferred,
+ event_get_priority(&req->timeout_event),
+ reply_run_callback,
+ req->user_pointer);
+ event_deferred_cb_schedule_(
+ req->base->event_base,
+ &d->deferred);
+}
+
+/* this processes a parsed reply packet */
+static void
+reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) {
+ int error;
+ char addrbuf[128];
+ static const int error_codes[] = {
+ DNS_ERR_FORMAT, DNS_ERR_SERVERFAILED, DNS_ERR_NOTEXIST,
+ DNS_ERR_NOTIMPL, DNS_ERR_REFUSED
+ };
+
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+
+ if (flags & 0x020f || !reply || !reply->have_answer) {
+ /* there was an error */
+ if (flags & 0x0200) {
+ error = DNS_ERR_TRUNCATED;
+ } else if (flags & 0x000f) {
+ u16 error_code = (flags & 0x000f) - 1;
+ if (error_code > 4) {
+ error = DNS_ERR_UNKNOWN;
+ } else {
+ error = error_codes[error_code];
+ }
+ } else if (reply && !reply->have_answer) {
+ error = DNS_ERR_NODATA;
+ } else {
+ error = DNS_ERR_UNKNOWN;
+ }
+
+ switch (error) {
+ case DNS_ERR_NOTIMPL:
+ case DNS_ERR_REFUSED:
+ /* we regard these errors as marking a bad nameserver */
+ if (req->reissue_count < req->base->global_max_reissues) {
+ char msg[64];
+ evutil_snprintf(msg, sizeof(msg), "Bad response %d (%s)",
+ error, evdns_err_to_string(error));
+ nameserver_failed(req->ns, msg);
+ if (!request_reissue(req)) return;
+ }
+ break;
+ case DNS_ERR_SERVERFAILED:
+ /* rcode 2 (servfailed) sometimes means "we
+ * are broken" and sometimes (with some binds)
+ * means "that request was very confusing."
+ * Treat this as a timeout, not a failure.
+ */
+ log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver"
+ "at %s; will allow the request to time out.",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&req->ns->address,
+ addrbuf, sizeof(addrbuf)));
+ /* Call the timeout function */
+ evdns_request_timeout_callback(0, 0, req);
+ return;
+ default:
+ /* we got a good reply from the nameserver: it is up. */
+ if (req->handle == req->ns->probe_request) {
+ /* Avoid double-free */
+ req->ns->probe_request = NULL;
+ }
+
+ nameserver_up(req->ns);
+ }
+
+ if (req->handle->search_state &&
+ req->request_type != TYPE_PTR) {
+ /* if we have a list of domains to search in,
+ * try the next one */
+ if (!search_try_next(req->handle)) {
+ /* a new request was issued so this
+ * request is finished and */
+ /* the user callback will be made when
+ * that request (or a */
+ /* child of it) finishes. */
+ return;
+ }
+ }
+
+ /* all else failed. Pass the failure up */
+ reply_schedule_callback(req, ttl, error, NULL);
+ request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1);
+ } else {
+ /* all ok, tell the user */
+ reply_schedule_callback(req, ttl, 0, reply);
+ if (req->handle == req->ns->probe_request)
+ req->ns->probe_request = NULL; /* Avoid double-free */
+ nameserver_up(req->ns);
+ request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1);
+ }
+}
+
+static int
+name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
+ int name_end = -1;
+ int j = *idx;
+ int ptr_count = 0;
+#define GET32(x) do { if (j + 4 > length) goto err; memcpy(&t32_, packet + j, 4); j += 4; x = ntohl(t32_); } while (0)
+#define GET16(x) do { if (j + 2 > length) goto err; memcpy(&t_, packet + j, 2); j += 2; x = ntohs(t_); } while (0)
+#define GET8(x) do { if (j >= length) goto err; x = packet[j++]; } while (0)
+
+ char *cp = name_out;
+ const char *const end = name_out + name_out_len;
+
+ /* Normally, names are a series of length prefixed strings terminated */
+ /* with a length of 0 (the lengths are u8's < 63). */
+ /* However, the length can start with a pair of 1 bits and that */
+ /* means that the next 14 bits are a pointer within the current */
+ /* packet. */
+
+ for (;;) {
+ u8 label_len;
+ if (j >= length) return -1;
+ GET8(label_len);
+ if (!label_len) break;
+ if (label_len & 0xc0) {
+ u8 ptr_low;
+ GET8(ptr_low);
+ if (name_end < 0) name_end = j;
+ j = (((int)label_len & 0x3f) << 8) + ptr_low;
+ /* Make sure that the target offset is in-bounds. */
+ if (j < 0 || j >= length) return -1;
+ /* If we've jumped more times than there are characters in the
+ * message, we must have a loop. */
+ if (++ptr_count > length) return -1;
+ continue;
+ }
+ if (label_len > 63) return -1;
+ if (cp != name_out) {
+ if (cp + 1 >= end) return -1;
+ *cp++ = '.';
+ }
+ if (cp + label_len >= end) return -1;
+ memcpy(cp, packet + j, label_len);
+ cp += label_len;
+ j += label_len;
+ }
+ if (cp >= end) return -1;
+ *cp = '\0';
+ if (name_end < 0)
+ *idx = j;
+ else
+ *idx = name_end;
+ return 0;
+ err:
+ return -1;
+}
+
+/* parses a raw request from a nameserver */
+static int
+reply_parse(struct evdns_base *base, u8 *packet, int length) {
+ int j = 0, k = 0; /* index into packet */
+ u16 t_; /* used by the macros */
+ u32 t32_; /* used by the macros */
+ char tmp_name[256], cmp_name[256]; /* used by the macros */
+ int name_matches = 0;
+
+ u16 trans_id, questions, answers, authority, additional, datalength;
+ u16 flags = 0;
+ u32 ttl, ttl_r = 0xffffffff;
+ struct reply reply;
+ struct request *req = NULL;
+ unsigned int i;
+
+ ASSERT_LOCKED(base);
+
+ GET16(trans_id);
+ GET16(flags);
+ GET16(questions);
+ GET16(answers);
+ GET16(authority);
+ GET16(additional);
+ (void) authority; /* suppress "unused variable" warnings. */
+ (void) additional; /* suppress "unused variable" warnings. */
+
+ req = request_find_from_trans_id(base, trans_id);
+ if (!req) return -1;
+ EVUTIL_ASSERT(req->base == base);
+
+ memset(&reply, 0, sizeof(reply));
+
+ /* If it's not an answer, it doesn't correspond to any request. */
+ if (!(flags & 0x8000)) return -1; /* must be an answer */
+ if ((flags & 0x020f) && (flags & 0x020f) != DNS_ERR_NOTEXIST) {
+ /* there was an error and it's not NXDOMAIN */
+ goto err;
+ }
+ /* if (!answers) return; */ /* must have an answer of some form */
+
+ /* This macro skips a name in the DNS reply. */
+#define SKIP_NAME \
+ do { tmp_name[0] = '\0'; \
+ if (name_parse(packet, length, &j, tmp_name, \
+ sizeof(tmp_name))<0) \
+ goto err; \
+ } while (0)
+#define TEST_NAME \
+ do { tmp_name[0] = '\0'; \
+ cmp_name[0] = '\0'; \
+ k = j; \
+ if (name_parse(packet, length, &j, tmp_name, \
+ sizeof(tmp_name))<0) \
+ goto err; \
+ if (name_parse(req->request, req->request_len, &k, \
+ cmp_name, sizeof(cmp_name))<0) \
+ goto err; \
+ if (base->global_randomize_case) { \
+ if (strcmp(tmp_name, cmp_name) == 0) \
+ name_matches = 1; \
+ } else { \
+ if (evutil_ascii_strcasecmp(tmp_name, cmp_name) == 0) \
+ name_matches = 1; \
+ } \
+ } while (0)
+
+ reply.type = req->request_type;
+
+ /* skip over each question in the reply */
+ for (i = 0; i < questions; ++i) {
+ /* the question looks like
+ * <label:name><u16:type><u16:class>
+ */
+ TEST_NAME;
+ j += 4;
+ if (j > length) goto err;
+ }
+
+ if (!name_matches)
+ goto err;
+
+ /* now we have the answer section which looks like
+ * <label:name><u16:type><u16:class><u32:ttl><u16:len><data...>
+ */
+
+ for (i = 0; i < answers; ++i) {
+ u16 type, class;
+
+ SKIP_NAME;
+ GET16(type);
+ GET16(class);
+ GET32(ttl);
+ GET16(datalength);
+
+ if (type == TYPE_A && class == CLASS_INET) {
+ int addrcount, addrtocopy;
+ if (req->request_type != TYPE_A) {
+ j += datalength; continue;
+ }
+ if ((datalength & 3) != 0) /* not an even number of As. */
+ goto err;
+ addrcount = datalength >> 2;
+ addrtocopy = MIN(MAX_V4_ADDRS - reply.data.a.addrcount, (unsigned)addrcount);
+
+ ttl_r = MIN(ttl_r, ttl);
+ /* we only bother with the first four addresses. */
+ if (j + 4*addrtocopy > length) goto err;
+ memcpy(&reply.data.a.addresses[reply.data.a.addrcount],
+ packet + j, 4*addrtocopy);
+ j += 4*addrtocopy;
+ reply.data.a.addrcount += addrtocopy;
+ reply.have_answer = 1;
+ if (reply.data.a.addrcount == MAX_V4_ADDRS) break;
+ } else if (type == TYPE_PTR && class == CLASS_INET) {
+ if (req->request_type != TYPE_PTR) {
+ j += datalength; continue;
+ }
+ if (name_parse(packet, length, &j, reply.data.ptr.name,
+ sizeof(reply.data.ptr.name))<0)
+ goto err;
+ ttl_r = MIN(ttl_r, ttl);
+ reply.have_answer = 1;
+ break;
+ } else if (type == TYPE_CNAME) {
+ char cname[HOST_NAME_MAX];
+ if (!req->put_cname_in_ptr || *req->put_cname_in_ptr) {
+ j += datalength; continue;
+ }
+ if (name_parse(packet, length, &j, cname,
+ sizeof(cname))<0)
+ goto err;
+ *req->put_cname_in_ptr = mm_strdup(cname);
+ } else if (type == TYPE_AAAA && class == CLASS_INET) {
+ int addrcount, addrtocopy;
+ if (req->request_type != TYPE_AAAA) {
+ j += datalength; continue;
+ }
+ if ((datalength & 15) != 0) /* not an even number of AAAAs. */
+ goto err;
+ addrcount = datalength >> 4; /* each address is 16 bytes long */
+ addrtocopy = MIN(MAX_V6_ADDRS - reply.data.aaaa.addrcount, (unsigned)addrcount);
+ ttl_r = MIN(ttl_r, ttl);
+
+ /* we only bother with the first four addresses. */
+ if (j + 16*addrtocopy > length) goto err;
+ memcpy(&reply.data.aaaa.addresses[reply.data.aaaa.addrcount],
+ packet + j, 16*addrtocopy);
+ reply.data.aaaa.addrcount += addrtocopy;
+ j += 16*addrtocopy;
+ reply.have_answer = 1;
+ if (reply.data.aaaa.addrcount == MAX_V6_ADDRS) break;
+ } else {
+ /* skip over any other type of resource */
+ j += datalength;
+ }
+ }
+
+ if (!reply.have_answer) {
+ for (i = 0; i < authority; ++i) {
+ u16 type, class;
+ SKIP_NAME;
+ GET16(type);
+ GET16(class);
+ GET32(ttl);
+ GET16(datalength);
+ if (type == TYPE_SOA && class == CLASS_INET) {
+ u32 serial, refresh, retry, expire, minimum;
+ SKIP_NAME;
+ SKIP_NAME;
+ GET32(serial);
+ GET32(refresh);
+ GET32(retry);
+ GET32(expire);
+ GET32(minimum);
+ (void)expire;
+ (void)retry;
+ (void)refresh;
+ (void)serial;
+ ttl_r = MIN(ttl_r, ttl);
+ ttl_r = MIN(ttl_r, minimum);
+ } else {
+ /* skip over any other type of resource */
+ j += datalength;
+ }
+ }
+ }
+
+ if (ttl_r == 0xffffffff)
+ ttl_r = 0;
+
+ reply_handle(req, flags, ttl_r, &reply);
+ return 0;
+ err:
+ if (req)
+ reply_handle(req, flags, 0, NULL);
+ return -1;
+}
+
+/* Parse a raw request (packet,length) sent to a nameserver port (port) from */
+/* a DNS client (addr,addrlen), and if it's well-formed, call the corresponding */
+/* callback. */
+static int
+request_parse(u8 *packet, int length, struct evdns_server_port *port, struct sockaddr *addr, ev_socklen_t addrlen)
+{
+ int j = 0; /* index into packet */
+ u16 t_; /* used by the macros */
+ char tmp_name[256]; /* used by the macros */
+
+ int i;
+ u16 trans_id, flags, questions, answers, authority, additional;
+ struct server_request *server_req = NULL;
+
+ ASSERT_LOCKED(port);
+
+ /* Get the header fields */
+ GET16(trans_id);
+ GET16(flags);
+ GET16(questions);
+ GET16(answers);
+ GET16(authority);
+ GET16(additional);
+ (void)answers;
+ (void)additional;
+ (void)authority;
+
+ if (flags & 0x8000) return -1; /* Must not be an answer. */
+ flags &= 0x0110; /* Only RD and CD get preserved. */
+
+ server_req = mm_malloc(sizeof(struct server_request));
+ if (server_req == NULL) return -1;
+ memset(server_req, 0, sizeof(struct server_request));
+
+ server_req->trans_id = trans_id;
+ memcpy(&server_req->addr, addr, addrlen);
+ server_req->addrlen = addrlen;
+
+ server_req->base.flags = flags;
+ server_req->base.nquestions = 0;
+ server_req->base.questions = mm_calloc(sizeof(struct evdns_server_question *), questions);
+ if (server_req->base.questions == NULL)
+ goto err;
+
+ for (i = 0; i < questions; ++i) {
+ u16 type, class;
+ struct evdns_server_question *q;
+ int namelen;
+ if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0)
+ goto err;
+ GET16(type);
+ GET16(class);
+ namelen = (int)strlen(tmp_name);
+ q = mm_malloc(sizeof(struct evdns_server_question) + namelen);
+ if (!q)
+ goto err;
+ q->type = type;
+ q->dns_question_class = class;
+ memcpy(q->name, tmp_name, namelen+1);
+ server_req->base.questions[server_req->base.nquestions++] = q;
+ }
+
+ /* Ignore answers, authority, and additional. */
+
+ server_req->port = port;
+ port->refcnt++;
+
+ /* Only standard queries are supported. */
+ if (flags & 0x7800) {
+ evdns_server_request_respond(&(server_req->base), DNS_ERR_NOTIMPL);
+ return -1;
+ }
+
+ port->user_callback(&(server_req->base), port->user_data);
+
+ return 0;
+err:
+ if (server_req) {
+ if (server_req->base.questions) {
+ for (i = 0; i < server_req->base.nquestions; ++i)
+ mm_free(server_req->base.questions[i]);
+ mm_free(server_req->base.questions);
+ }
+ mm_free(server_req);
+ }
+ return -1;
+
+#undef SKIP_NAME
+#undef GET32
+#undef GET16
+#undef GET8
+}
+
+
+void
+evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void))
+{
+}
+
+void
+evdns_set_random_bytes_fn(void (*fn)(char *, size_t))
+{
+}
+
+/* Try to choose a strong transaction id which isn't already in flight */
+static u16
+transaction_id_pick(struct evdns_base *base) {
+ ASSERT_LOCKED(base);
+ for (;;) {
+ u16 trans_id;
+ evutil_secure_rng_get_bytes(&trans_id, sizeof(trans_id));
+
+ if (trans_id == 0xffff) continue;
+ /* now check to see if that id is already inflight */
+ if (request_find_from_trans_id(base, trans_id) == NULL)
+ return trans_id;
+ }
+}
+
+/* choose a namesever to use. This function will try to ignore */
+/* nameservers which we think are down and load balance across the rest */
+/* by updating the server_head global each time. */
+static struct nameserver *
+nameserver_pick(struct evdns_base *base) {
+ struct nameserver *started_at = base->server_head, *picked;
+ ASSERT_LOCKED(base);
+ if (!base->server_head) return NULL;
+
+ /* if we don't have any good nameservers then there's no */
+ /* point in trying to find one. */
+ if (!base->global_good_nameservers) {
+ base->server_head = base->server_head->next;
+ return base->server_head;
+ }
+
+ /* remember that nameservers are in a circular list */
+ for (;;) {
+ if (base->server_head->state) {
+ /* we think this server is currently good */
+ picked = base->server_head;
+ base->server_head = base->server_head->next;
+ return picked;
+ }
+
+ base->server_head = base->server_head->next;
+ if (base->server_head == started_at) {
+ /* all the nameservers seem to be down */
+ /* so we just return this one and hope for the */
+ /* best */
+ EVUTIL_ASSERT(base->global_good_nameservers == 0);
+ picked = base->server_head;
+ base->server_head = base->server_head->next;
+ return picked;
+ }
+ }
+}
+
+/* this is called when a namesever socket is ready for reading */
+static void
+nameserver_read(struct nameserver *ns) {
+ struct sockaddr_storage ss;
+ ev_socklen_t addrlen = sizeof(ss);
+ u8 packet[1500];
+ char addrbuf[128];
+ ASSERT_LOCKED(ns->base);
+
+ for (;;) {
+ const int r = recvfrom(ns->socket, (void*)packet,
+ sizeof(packet), 0,
+ (struct sockaddr*)&ss, &addrlen);
+ if (r < 0) {
+ int err = evutil_socket_geterror(ns->socket);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ return;
+ nameserver_failed(ns,
+ evutil_socket_error_to_string(err));
+ return;
+ }
+ if (evutil_sockaddr_cmp((struct sockaddr*)&ss,
+ (struct sockaddr*)&ns->address, 0)) {
+ log(EVDNS_LOG_WARN, "Address mismatch on received "
+ "DNS packet. Apparent source was %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ss,
+ addrbuf, sizeof(addrbuf)));
+ return;
+ }
+
+ ns->timedout = 0;
+ reply_parse(ns->base, packet, r);
+ }
+}
+
+/* Read a packet from a DNS client on a server port s, parse it, and */
+/* act accordingly. */
+static void
+server_port_read(struct evdns_server_port *s) {
+ u8 packet[1500];
+ struct sockaddr_storage addr;
+ ev_socklen_t addrlen;
+ int r;
+ ASSERT_LOCKED(s);
+
+ for (;;) {
+ addrlen = sizeof(struct sockaddr_storage);
+ r = recvfrom(s->socket, (void*)packet, sizeof(packet), 0,
+ (struct sockaddr*) &addr, &addrlen);
+ if (r < 0) {
+ int err = evutil_socket_geterror(s->socket);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ return;
+ log(EVDNS_LOG_WARN,
+ "Error %s (%d) while reading request.",
+ evutil_socket_error_to_string(err), err);
+ return;
+ }
+ request_parse(packet, r, s, (struct sockaddr*) &addr, addrlen);
+ }
+}
+
+/* Try to write all pending replies on a given DNS server port. */
+static void
+server_port_flush(struct evdns_server_port *port)
+{
+ struct server_request *req = port->pending_replies;
+ ASSERT_LOCKED(port);
+ while (req) {
+ int r = sendto(port->socket, req->response, (int)req->response_len, 0,
+ (struct sockaddr*) &req->addr, (ev_socklen_t)req->addrlen);
+ if (r < 0) {
+ int err = evutil_socket_geterror(port->socket);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ return;
+ log(EVDNS_LOG_WARN, "Error %s (%d) while writing response to port; dropping", evutil_socket_error_to_string(err), err);
+ }
+ if (server_request_free(req)) {
+ /* we released the last reference to req->port. */
+ return;
+ } else {
+ EVUTIL_ASSERT(req != port->pending_replies);
+ req = port->pending_replies;
+ }
+ }
+
+ /* We have no more pending requests; stop listening for 'writeable' events. */
+ (void) event_del(&port->event);
+ event_assign(&port->event, port->event_base,
+ port->socket, EV_READ | EV_PERSIST,
+ server_port_ready_callback, port);
+
+ if (event_add(&port->event, NULL) < 0) {
+ log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server.");
+ /* ???? Do more? */
+ }
+}
+
+/* set if we are waiting for the ability to write to this server. */
+/* if waiting is true then we ask libevent for EV_WRITE events, otherwise */
+/* we stop these events. */
+static void
+nameserver_write_waiting(struct nameserver *ns, char waiting) {
+ ASSERT_LOCKED(ns->base);
+ if (ns->write_waiting == waiting) return;
+
+ ns->write_waiting = waiting;
+ (void) event_del(&ns->event);
+ event_assign(&ns->event, ns->base->event_base,
+ ns->socket, EV_READ | (waiting ? EV_WRITE : 0) | EV_PERSIST,
+ nameserver_ready_callback, ns);
+ if (event_add(&ns->event, NULL) < 0) {
+ char addrbuf[128];
+ log(EVDNS_LOG_WARN, "Error from libevent when adding event for %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)));
+ /* ???? Do more? */
+ }
+}
+
+/* a callback function. Called by libevent when the kernel says that */
+/* a nameserver socket is ready for writing or reading */
+static void
+nameserver_ready_callback(evutil_socket_t fd, short events, void *arg) {
+ struct nameserver *ns = (struct nameserver *) arg;
+ (void)fd;
+
+ EVDNS_LOCK(ns->base);
+ if (events & EV_WRITE) {
+ ns->choked = 0;
+ if (!evdns_transmit(ns->base)) {
+ nameserver_write_waiting(ns, 0);
+ }
+ }
+ if (events & EV_READ) {
+ nameserver_read(ns);
+ }
+ EVDNS_UNLOCK(ns->base);
+}
+
+/* a callback function. Called by libevent when the kernel says that */
+/* a server socket is ready for writing or reading. */
+static void
+server_port_ready_callback(evutil_socket_t fd, short events, void *arg) {
+ struct evdns_server_port *port = (struct evdns_server_port *) arg;
+ (void) fd;
+
+ EVDNS_LOCK(port);
+ if (events & EV_WRITE) {
+ port->choked = 0;
+ server_port_flush(port);
+ }
+ if (events & EV_READ) {
+ server_port_read(port);
+ }
+ EVDNS_UNLOCK(port);
+}
+
+/* This is an inefficient representation; only use it via the dnslabel_table_*
+ * functions, so that is can be safely replaced with something smarter later. */
+#define MAX_LABELS 128
+/* Structures used to implement name compression */
+struct dnslabel_entry { char *v; off_t pos; };
+struct dnslabel_table {
+ int n_labels; /* number of current entries */
+ /* map from name to position in message */
+ struct dnslabel_entry labels[MAX_LABELS];
+};
+
+/* Initialize dnslabel_table. */
+static void
+dnslabel_table_init(struct dnslabel_table *table)
+{
+ table->n_labels = 0;
+}
+
+/* Free all storage held by table, but not the table itself. */
+static void
+dnslabel_clear(struct dnslabel_table *table)
+{
+ int i;
+ for (i = 0; i < table->n_labels; ++i)
+ mm_free(table->labels[i].v);
+ table->n_labels = 0;
+}
+
+/* return the position of the label in the current message, or -1 if the label */
+/* hasn't been used yet. */
+static int
+dnslabel_table_get_pos(const struct dnslabel_table *table, const char *label)
+{
+ int i;
+ for (i = 0; i < table->n_labels; ++i) {
+ if (!strcmp(label, table->labels[i].v))
+ return table->labels[i].pos;
+ }
+ return -1;
+}
+
+/* remember that we've used the label at position pos */
+static int
+dnslabel_table_add(struct dnslabel_table *table, const char *label, off_t pos)
+{
+ char *v;
+ int p;
+ if (table->n_labels == MAX_LABELS)
+ return (-1);
+ v = mm_strdup(label);
+ if (v == NULL)
+ return (-1);
+ p = table->n_labels++;
+ table->labels[p].v = v;
+ table->labels[p].pos = pos;
+
+ return (0);
+}
+
+/* Converts a string to a length-prefixed set of DNS labels, starting */
+/* at buf[j]. name and buf must not overlap. name_len should be the length */
+/* of name. table is optional, and is used for compression. */
+/* */
+/* Input: abc.def */
+/* Output: <3>abc<3>def<0> */
+/* */
+/* Returns the first index after the encoded name, or negative on error. */
+/* -1 label was > 63 bytes */
+/* -2 name too long to fit in buffer. */
+/* */
+static off_t
+dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j,
+ const char *name, const size_t name_len,
+ struct dnslabel_table *table) {
+ const char *end = name + name_len;
+ int ref = 0;
+ u16 t_;
+
+#define APPEND16(x) do { \
+ if (j + 2 > (off_t)buf_len) \
+ goto overflow; \
+ t_ = htons(x); \
+ memcpy(buf + j, &t_, 2); \
+ j += 2; \
+ } while (0)
+#define APPEND32(x) do { \
+ if (j + 4 > (off_t)buf_len) \
+ goto overflow; \
+ t32_ = htonl(x); \
+ memcpy(buf + j, &t32_, 4); \
+ j += 4; \
+ } while (0)
+
+ if (name_len > 255) return -2;
+
+ for (;;) {
+ const char *const start = name;
+ if (table && (ref = dnslabel_table_get_pos(table, name)) >= 0) {
+ APPEND16(ref | 0xc000);
+ return j;
+ }
+ name = strchr(name, '.');
+ if (!name) {
+ const size_t label_len = end - start;
+ if (label_len > 63) return -1;
+ if ((size_t)(j+label_len+1) > buf_len) return -2;
+ if (table) dnslabel_table_add(table, start, j);
+ buf[j++] = (ev_uint8_t)label_len;
+
+ memcpy(buf + j, start, label_len);
+ j += (int) label_len;
+ break;
+ } else {
+ /* append length of the label. */
+ const size_t label_len = name - start;
+ if (label_len > 63) return -1;
+ if ((size_t)(j+label_len+1) > buf_len) return -2;
+ if (table) dnslabel_table_add(table, start, j);
+ buf[j++] = (ev_uint8_t)label_len;
+
+ memcpy(buf + j, start, label_len);
+ j += (int) label_len;
+ /* hop over the '.' */
+ name++;
+ }
+ }
+
+ /* the labels must be terminated by a 0. */
+ /* It's possible that the name ended in a . */
+ /* in which case the zero is already there */
+ if (!j || buf[j-1]) buf[j++] = 0;
+ return j;
+ overflow:
+ return (-2);
+}
+
+/* Finds the length of a dns request for a DNS name of the given */
+/* length. The actual request may be smaller than the value returned */
+/* here */
+static size_t
+evdns_request_len(const size_t name_len) {
+ return 96 + /* length of the DNS standard header */
+ name_len + 2 +
+ 4; /* space for the resource type */
+}
+
+/* build a dns request packet into buf. buf should be at least as long */
+/* as evdns_request_len told you it should be. */
+/* */
+/* Returns the amount of space used. Negative on error. */
+static int
+evdns_request_data_build(const char *const name, const size_t name_len,
+ const u16 trans_id, const u16 type, const u16 class,
+ u8 *const buf, size_t buf_len) {
+ off_t j = 0; /* current offset into buf */
+ u16 t_; /* used by the macros */
+
+ APPEND16(trans_id);
+ APPEND16(0x0100); /* standard query, recusion needed */
+ APPEND16(1); /* one question */
+ APPEND16(0); /* no answers */
+ APPEND16(0); /* no authority */
+ APPEND16(0); /* no additional */
+
+ j = dnsname_to_labels(buf, buf_len, j, name, name_len, NULL);
+ if (j < 0) {
+ return (int)j;
+ }
+
+ APPEND16(type);
+ APPEND16(class);
+
+ return (int)j;
+ overflow:
+ return (-1);
+}
+
+/* exported function */
+struct evdns_server_port *
+evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type cb, void *user_data)
+{
+ struct evdns_server_port *port;
+ if (flags)
+ return NULL; /* flags not yet implemented */
+ if (!(port = mm_malloc(sizeof(struct evdns_server_port))))
+ return NULL;
+ memset(port, 0, sizeof(struct evdns_server_port));
+
+
+ port->socket = socket;
+ port->refcnt = 1;
+ port->choked = 0;
+ port->closing = 0;
+ port->user_callback = cb;
+ port->user_data = user_data;
+ port->pending_replies = NULL;
+ port->event_base = base;
+
+ event_assign(&port->event, port->event_base,
+ port->socket, EV_READ | EV_PERSIST,
+ server_port_ready_callback, port);
+ if (event_add(&port->event, NULL) < 0) {
+ mm_free(port);
+ return NULL;
+ }
+ EVTHREAD_ALLOC_LOCK(port->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ return port;
+}
+
+struct evdns_server_port *
+evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type cb, void *user_data)
+{
+ return evdns_add_server_port_with_base(NULL, socket, flags, cb, user_data);
+}
+
+/* exported function */
+void
+evdns_close_server_port(struct evdns_server_port *port)
+{
+ EVDNS_LOCK(port);
+ if (--port->refcnt == 0) {
+ EVDNS_UNLOCK(port);
+ server_port_free(port);
+ } else {
+ port->closing = 1;
+ }
+}
+
+/* exported function */
+int
+evdns_server_request_add_reply(struct evdns_server_request *req_, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data)
+{
+ struct server_request *req = TO_SERVER_REQUEST(req_);
+ struct server_reply_item **itemp, *item;
+ int *countp;
+ int result = -1;
+
+ EVDNS_LOCK(req->port);
+ if (req->response) /* have we already answered? */
+ goto done;
+
+ switch (section) {
+ case EVDNS_ANSWER_SECTION:
+ itemp = &req->answer;
+ countp = &req->n_answer;
+ break;
+ case EVDNS_AUTHORITY_SECTION:
+ itemp = &req->authority;
+ countp = &req->n_authority;
+ break;
+ case EVDNS_ADDITIONAL_SECTION:
+ itemp = &req->additional;
+ countp = &req->n_additional;
+ break;
+ default:
+ goto done;
+ }
+ while (*itemp) {
+ itemp = &((*itemp)->next);
+ }
+ item = mm_malloc(sizeof(struct server_reply_item));
+ if (!item)
+ goto done;
+ item->next = NULL;
+ if (!(item->name = mm_strdup(name))) {
+ mm_free(item);
+ goto done;
+ }
+ item->type = type;
+ item->dns_question_class = class;
+ item->ttl = ttl;
+ item->is_name = is_name != 0;
+ item->datalen = 0;
+ item->data = NULL;
+ if (data) {
+ if (item->is_name) {
+ if (!(item->data = mm_strdup(data))) {
+ mm_free(item->name);
+ mm_free(item);
+ goto done;
+ }
+ item->datalen = (u16)-1;
+ } else {
+ if (!(item->data = mm_malloc(datalen))) {
+ mm_free(item->name);
+ mm_free(item);
+ goto done;
+ }
+ item->datalen = datalen;
+ memcpy(item->data, data, datalen);
+ }
+ }
+
+ *itemp = item;
+ ++(*countp);
+ result = 0;
+done:
+ EVDNS_UNLOCK(req->port);
+ return result;
+}
+
+/* exported function */
+int
+evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
+{
+ return evdns_server_request_add_reply(
+ req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET,
+ ttl, n*4, 0, addrs);
+}
+
+/* exported function */
+int
+evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
+{
+ return evdns_server_request_add_reply(
+ req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET,
+ ttl, n*16, 0, addrs);
+}
+
+/* exported function */
+int
+evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl)
+{
+ u32 a;
+ char buf[32];
+ if (in && inaddr_name)
+ return -1;
+ else if (!in && !inaddr_name)
+ return -1;
+ if (in) {
+ a = ntohl(in->s_addr);
+ evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa",
+ (int)(u8)((a )&0xff),
+ (int)(u8)((a>>8 )&0xff),
+ (int)(u8)((a>>16)&0xff),
+ (int)(u8)((a>>24)&0xff));
+ inaddr_name = buf;
+ }
+ return evdns_server_request_add_reply(
+ req, EVDNS_ANSWER_SECTION, inaddr_name, TYPE_PTR, CLASS_INET,
+ ttl, -1, 1, hostname);
+}
+
+/* exported function */
+int
+evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl)
+{
+ return evdns_server_request_add_reply(
+ req, EVDNS_ANSWER_SECTION, name, TYPE_CNAME, CLASS_INET,
+ ttl, -1, 1, cname);
+}
+
+/* exported function */
+void
+evdns_server_request_set_flags(struct evdns_server_request *exreq, int flags)
+{
+ struct server_request *req = TO_SERVER_REQUEST(exreq);
+ req->base.flags &= ~(EVDNS_FLAGS_AA|EVDNS_FLAGS_RD);
+ req->base.flags |= flags;
+}
+
+static int
+evdns_server_request_format_response(struct server_request *req, int err)
+{
+ unsigned char buf[1500];
+ size_t buf_len = sizeof(buf);
+ off_t j = 0, r;
+ u16 t_;
+ u32 t32_;
+ int i;
+ u16 flags;
+ struct dnslabel_table table;
+
+ if (err < 0 || err > 15) return -1;
+
+ /* Set response bit and error code; copy OPCODE and RD fields from
+ * question; copy RA and AA if set by caller. */
+ flags = req->base.flags;
+ flags |= (0x8000 | err);
+
+ dnslabel_table_init(&table);
+ APPEND16(req->trans_id);
+ APPEND16(flags);
+ APPEND16(req->base.nquestions);
+ APPEND16(req->n_answer);
+ APPEND16(req->n_authority);
+ APPEND16(req->n_additional);
+
+ /* Add questions. */
+ for (i=0; i < req->base.nquestions; ++i) {
+ const char *s = req->base.questions[i]->name;
+ j = dnsname_to_labels(buf, buf_len, j, s, strlen(s), &table);
+ if (j < 0) {
+ dnslabel_clear(&table);
+ return (int) j;
+ }
+ APPEND16(req->base.questions[i]->type);
+ APPEND16(req->base.questions[i]->dns_question_class);
+ }
+
+ /* Add answer, authority, and additional sections. */
+ for (i=0; i<3; ++i) {
+ struct server_reply_item *item;
+ if (i==0)
+ item = req->answer;
+ else if (i==1)
+ item = req->authority;
+ else
+ item = req->additional;
+ while (item) {
+ r = dnsname_to_labels(buf, buf_len, j, item->name, strlen(item->name), &table);
+ if (r < 0)
+ goto overflow;
+ j = r;
+
+ APPEND16(item->type);
+ APPEND16(item->dns_question_class);
+ APPEND32(item->ttl);
+ if (item->is_name) {
+ off_t len_idx = j, name_start;
+ j += 2;
+ name_start = j;
+ r = dnsname_to_labels(buf, buf_len, j, item->data, strlen(item->data), &table);
+ if (r < 0)
+ goto overflow;
+ j = r;
+ t_ = htons( (short) (j-name_start) );
+ memcpy(buf+len_idx, &t_, 2);
+ } else {
+ APPEND16(item->datalen);
+ if (j+item->datalen > (off_t)buf_len)
+ goto overflow;
+ memcpy(buf+j, item->data, item->datalen);
+ j += item->datalen;
+ }
+ item = item->next;
+ }
+ }
+
+ if (j > 512) {
+overflow:
+ j = 512;
+ buf[2] |= 0x02; /* set the truncated bit. */
+ }
+
+ req->response_len = j;
+
+ if (!(req->response = mm_malloc(req->response_len))) {
+ server_request_free_answers(req);
+ dnslabel_clear(&table);
+ return (-1);
+ }
+ memcpy(req->response, buf, req->response_len);
+ server_request_free_answers(req);
+ dnslabel_clear(&table);
+ return (0);
+}
+
+/* exported function */
+int
+evdns_server_request_respond(struct evdns_server_request *req_, int err)
+{
+ struct server_request *req = TO_SERVER_REQUEST(req_);
+ struct evdns_server_port *port = req->port;
+ int r = -1;
+
+ EVDNS_LOCK(port);
+ if (!req->response) {
+ if ((r = evdns_server_request_format_response(req, err))<0)
+ goto done;
+ }
+
+ r = sendto(port->socket, req->response, (int)req->response_len, 0,
+ (struct sockaddr*) &req->addr, (ev_socklen_t)req->addrlen);
+ if (r<0) {
+ int sock_err = evutil_socket_geterror(port->socket);
+ if (EVUTIL_ERR_RW_RETRIABLE(sock_err))
+ goto done;
+
+ if (port->pending_replies) {
+ req->prev_pending = port->pending_replies->prev_pending;
+ req->next_pending = port->pending_replies;
+ req->prev_pending->next_pending =
+ req->next_pending->prev_pending = req;
+ } else {
+ req->prev_pending = req->next_pending = req;
+ port->pending_replies = req;
+ port->choked = 1;
+
+ (void) event_del(&port->event);
+ event_assign(&port->event, port->event_base, port->socket, (port->closing?0:EV_READ) | EV_WRITE | EV_PERSIST, server_port_ready_callback, port);
+
+ if (event_add(&port->event, NULL) < 0) {
+ log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server");
+ }
+
+ }
+
+ r = 1;
+ goto done;
+ }
+ if (server_request_free(req)) {
+ r = 0;
+ goto done;
+ }
+
+ if (port->pending_replies)
+ server_port_flush(port);
+
+ r = 0;
+done:
+ EVDNS_UNLOCK(port);
+ return r;
+}
+
+/* Free all storage held by RRs in req. */
+static void
+server_request_free_answers(struct server_request *req)
+{
+ struct server_reply_item *victim, *next, **list;
+ int i;
+ for (i = 0; i < 3; ++i) {
+ if (i==0)
+ list = &req->answer;
+ else if (i==1)
+ list = &req->authority;
+ else
+ list = &req->additional;
+
+ victim = *list;
+ while (victim) {
+ next = victim->next;
+ mm_free(victim->name);
+ if (victim->data)
+ mm_free(victim->data);
+ mm_free(victim);
+ victim = next;
+ }
+ *list = NULL;
+ }
+}
+
+/* Free all storage held by req, and remove links to it. */
+/* return true iff we just wound up freeing the server_port. */
+static int
+server_request_free(struct server_request *req)
+{
+ int i, rc=1, lock=0;
+ if (req->base.questions) {
+ for (i = 0; i < req->base.nquestions; ++i)
+ mm_free(req->base.questions[i]);
+ mm_free(req->base.questions);
+ }
+
+ if (req->port) {
+ EVDNS_LOCK(req->port);
+ lock=1;
+ if (req->port->pending_replies == req) {
+ if (req->next_pending && req->next_pending != req)
+ req->port->pending_replies = req->next_pending;
+ else
+ req->port->pending_replies = NULL;
+ }
+ rc = --req->port->refcnt;
+ }
+
+ if (req->response) {
+ mm_free(req->response);
+ }
+
+ server_request_free_answers(req);
+
+ if (req->next_pending && req->next_pending != req) {
+ req->next_pending->prev_pending = req->prev_pending;
+ req->prev_pending->next_pending = req->next_pending;
+ }
+
+ if (rc == 0) {
+ EVDNS_UNLOCK(req->port); /* ????? nickm */
+ server_port_free(req->port);
+ mm_free(req);
+ return (1);
+ }
+ if (lock)
+ EVDNS_UNLOCK(req->port);
+ mm_free(req);
+ return (0);
+}
+
+/* Free all storage held by an evdns_server_port. Only called when */
+static void
+server_port_free(struct evdns_server_port *port)
+{
+ EVUTIL_ASSERT(port);
+ EVUTIL_ASSERT(!port->refcnt);
+ EVUTIL_ASSERT(!port->pending_replies);
+ if (port->socket > 0) {
+ evutil_closesocket(port->socket);
+ port->socket = -1;
+ }
+ (void) event_del(&port->event);
+ event_debug_unassign(&port->event);
+ EVTHREAD_FREE_LOCK(port->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ mm_free(port);
+}
+
+/* exported function */
+int
+evdns_server_request_drop(struct evdns_server_request *req_)
+{
+ struct server_request *req = TO_SERVER_REQUEST(req_);
+ server_request_free(req);
+ return 0;
+}
+
+/* exported function */
+int
+evdns_server_request_get_requesting_addr(struct evdns_server_request *req_, struct sockaddr *sa, int addr_len)
+{
+ struct server_request *req = TO_SERVER_REQUEST(req_);
+ if (addr_len < (int)req->addrlen)
+ return -1;
+ memcpy(sa, &(req->addr), req->addrlen);
+ return req->addrlen;
+}
+
+#undef APPEND16
+#undef APPEND32
+
+/* this is a libevent callback function which is called when a request */
+/* has timed out. */
+static void
+evdns_request_timeout_callback(evutil_socket_t fd, short events, void *arg) {
+ struct request *const req = (struct request *) arg;
+ struct evdns_base *base = req->base;
+
+ (void) fd;
+ (void) events;
+
+ log(EVDNS_LOG_DEBUG, "Request %p timed out", arg);
+ EVDNS_LOCK(base);
+
+ req->ns->timedout++;
+ if (req->ns->timedout > req->base->global_max_nameserver_timeout) {
+ req->ns->timedout = 0;
+ nameserver_failed(req->ns, "request timed out.");
+ }
+
+ if (req->tx_count >= req->base->global_max_retransmits) {
+ /* this request has failed */
+ log(EVDNS_LOG_DEBUG, "Giving up on request %p; tx_count==%d",
+ arg, req->tx_count);
+ reply_schedule_callback(req, 0, DNS_ERR_TIMEOUT, NULL);
+ request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1);
+ } else {
+ /* retransmit it */
+ struct nameserver *new_ns;
+ log(EVDNS_LOG_DEBUG, "Retransmitting request %p; tx_count==%d",
+ arg, req->tx_count);
+ (void) evtimer_del(&req->timeout_event);
+ new_ns = nameserver_pick(base);
+ if (new_ns)
+ req->ns = new_ns;
+ evdns_request_transmit(req);
+ }
+ EVDNS_UNLOCK(base);
+}
+
+/* try to send a request to a given server. */
+/* */
+/* return: */
+/* 0 ok */
+/* 1 temporary failure */
+/* 2 other failure */
+static int
+evdns_request_transmit_to(struct request *req, struct nameserver *server) {
+ int r;
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+
+ if (server->requests_inflight == 1 &&
+ req->base->disable_when_inactive &&
+ event_add(&server->event, NULL) < 0) {
+ return 1;
+ }
+
+ r = sendto(server->socket, (void*)req->request, req->request_len, 0,
+ (struct sockaddr *)&server->address, server->addrlen);
+ if (r < 0) {
+ int err = evutil_socket_geterror(server->socket);
+ if (EVUTIL_ERR_RW_RETRIABLE(err))
+ return 1;
+ nameserver_failed(req->ns, evutil_socket_error_to_string(err));
+ return 2;
+ } else if (r != (int)req->request_len) {
+ return 1; /* short write */
+ } else {
+ return 0;
+ }
+}
+
+/* try to send a request, updating the fields of the request */
+/* as needed */
+/* */
+/* return: */
+/* 0 ok */
+/* 1 failed */
+static int
+evdns_request_transmit(struct request *req) {
+ int retcode = 0, r;
+
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+ /* if we fail to send this packet then this flag marks it */
+ /* for evdns_transmit */
+ req->transmit_me = 1;
+ EVUTIL_ASSERT(req->trans_id != 0xffff);
+
+ if (!req->ns)
+ {
+ /* unable to transmit request if no nameservers */
+ return 1;
+ }
+
+ if (req->ns->choked) {
+ /* don't bother trying to write to a socket */
+ /* which we have had EAGAIN from */
+ return 1;
+ }
+
+ r = evdns_request_transmit_to(req, req->ns);
+ switch (r) {
+ case 1:
+ /* temp failure */
+ req->ns->choked = 1;
+ nameserver_write_waiting(req->ns, 1);
+ return 1;
+ case 2:
+ /* failed to transmit the request entirely. */
+ retcode = 1;
+ /* fall through: we'll set a timeout, which will time out,
+ * and make us retransmit the request anyway. */
+ default:
+ /* all ok */
+ log(EVDNS_LOG_DEBUG,
+ "Setting timeout for request %p, sent to nameserver %p", req, req->ns);
+ if (evtimer_add(&req->timeout_event, &req->base->global_timeout) < 0) {
+ log(EVDNS_LOG_WARN,
+ "Error from libevent when adding timer for request %p",
+ req);
+ /* ???? Do more? */
+ }
+ req->tx_count++;
+ req->transmit_me = 0;
+ return retcode;
+ }
+}
+
+static void
+nameserver_probe_callback(int result, char type, int count, int ttl, void *addresses, void *arg) {
+ struct nameserver *const ns = (struct nameserver *) arg;
+ (void) type;
+ (void) count;
+ (void) ttl;
+ (void) addresses;
+
+ if (result == DNS_ERR_CANCEL) {
+ /* We canceled this request because the nameserver came up
+ * for some other reason. Do not change our opinion about
+ * the nameserver. */
+ return;
+ }
+
+ EVDNS_LOCK(ns->base);
+ ns->probe_request = NULL;
+ if (result == DNS_ERR_NONE || result == DNS_ERR_NOTEXIST) {
+ /* this is a good reply */
+ nameserver_up(ns);
+ } else {
+ nameserver_probe_failed(ns);
+ }
+ EVDNS_UNLOCK(ns->base);
+}
+
+static void
+nameserver_send_probe(struct nameserver *const ns) {
+ struct evdns_request *handle;
+ struct request *req;
+ char addrbuf[128];
+ /* here we need to send a probe to a given nameserver */
+ /* in the hope that it is up now. */
+
+ ASSERT_LOCKED(ns->base);
+ log(EVDNS_LOG_DEBUG, "Sending probe to %s",
+ evutil_format_sockaddr_port_(
+ (struct sockaddr *)&ns->address,
+ addrbuf, sizeof(addrbuf)));
+ handle = mm_calloc(1, sizeof(*handle));
+ if (!handle) return;
+ req = request_new(ns->base, handle, TYPE_A, "google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns);
+ if (!req) {
+ mm_free(handle);
+ return;
+ }
+ ns->probe_request = handle;
+ /* we force this into the inflight queue no matter what */
+ request_trans_id_set(req, transaction_id_pick(ns->base));
+ req->ns = ns;
+ request_submit(req);
+}
+
+/* returns: */
+/* 0 didn't try to transmit anything */
+/* 1 tried to transmit something */
+static int
+evdns_transmit(struct evdns_base *base) {
+ char did_try_to_transmit = 0;
+ int i;
+
+ ASSERT_LOCKED(base);
+ for (i = 0; i < base->n_req_heads; ++i) {
+ if (base->req_heads[i]) {
+ struct request *const started_at = base->req_heads[i], *req = started_at;
+ /* first transmit all the requests which are currently waiting */
+ do {
+ if (req->transmit_me) {
+ did_try_to_transmit = 1;
+ evdns_request_transmit(req);
+ }
+
+ req = req->next;
+ } while (req != started_at);
+ }
+ }
+
+ return did_try_to_transmit;
+}
+
+/* exported function */
+int
+evdns_base_count_nameservers(struct evdns_base *base)
+{
+ const struct nameserver *server;
+ int n = 0;
+
+ EVDNS_LOCK(base);
+ server = base->server_head;
+ if (!server)
+ goto done;
+ do {
+ ++n;
+ server = server->next;
+ } while (server != base->server_head);
+done:
+ EVDNS_UNLOCK(base);
+ return n;
+}
+
+int
+evdns_count_nameservers(void)
+{
+ return evdns_base_count_nameservers(current_base);
+}
+
+/* exported function */
+int
+evdns_base_clear_nameservers_and_suspend(struct evdns_base *base)
+{
+ struct nameserver *server, *started_at;
+ int i;
+
+ EVDNS_LOCK(base);
+ server = base->server_head;
+ started_at = base->server_head;
+ if (!server) {
+ EVDNS_UNLOCK(base);
+ return 0;
+ }
+ while (1) {
+ struct nameserver *next = server->next;
+ (void) event_del(&server->event);
+ if (evtimer_initialized(&server->timeout_event))
+ (void) evtimer_del(&server->timeout_event);
+ if (server->probe_request) {
+ evdns_cancel_request(server->base, server->probe_request);
+ server->probe_request = NULL;
+ }
+ if (server->socket >= 0)
+ evutil_closesocket(server->socket);
+ mm_free(server);
+ if (next == started_at)
+ break;
+ server = next;
+ }
+ base->server_head = NULL;
+ base->global_good_nameservers = 0;
+
+ for (i = 0; i < base->n_req_heads; ++i) {
+ struct request *req, *req_started_at;
+ req = req_started_at = base->req_heads[i];
+ while (req) {
+ struct request *next = req->next;
+ req->tx_count = req->reissue_count = 0;
+ req->ns = NULL;
+ /* ???? What to do about searches? */
+ (void) evtimer_del(&req->timeout_event);
+ req->trans_id = 0;
+ req->transmit_me = 0;
+
+ base->global_requests_waiting++;
+ evdns_request_insert(req, &base->req_waiting_head);
+ /* We want to insert these suspended elements at the front of
+ * the waiting queue, since they were pending before any of
+ * the waiting entries were added. This is a circular list,
+ * so we can just shift the start back by one.*/
+ base->req_waiting_head = base->req_waiting_head->prev;
+
+ if (next == req_started_at)
+ break;
+ req = next;
+ }
+ base->req_heads[i] = NULL;
+ }
+
+ base->global_requests_inflight = 0;
+
+ EVDNS_UNLOCK(base);
+ return 0;
+}
+
+int
+evdns_clear_nameservers_and_suspend(void)
+{
+ return evdns_base_clear_nameservers_and_suspend(current_base);
+}
+
+
+/* exported function */
+int
+evdns_base_resume(struct evdns_base *base)
+{
+ EVDNS_LOCK(base);
+ evdns_requests_pump_waiting_queue(base);
+ EVDNS_UNLOCK(base);
+
+ return 0;
+}
+
+int
+evdns_resume(void)
+{
+ return evdns_base_resume(current_base);
+}
+
+static int
+evdns_nameserver_add_impl_(struct evdns_base *base, const struct sockaddr *address, int addrlen) {
+ /* first check to see if we already have this nameserver */
+
+ const struct nameserver *server = base->server_head, *const started_at = base->server_head;
+ struct nameserver *ns;
+ int err = 0;
+ char addrbuf[128];
+
+ ASSERT_LOCKED(base);
+ if (server) {
+ do {
+ if (!evutil_sockaddr_cmp((struct sockaddr*)&server->address, address, 1)) return 3;
+ server = server->next;
+ } while (server != started_at);
+ }
+ if (addrlen > (int)sizeof(ns->address)) {
+ log(EVDNS_LOG_DEBUG, "Addrlen %d too long.", (int)addrlen);
+ return 2;
+ }
+
+ ns = (struct nameserver *) mm_malloc(sizeof(struct nameserver));
+ if (!ns) return -1;
+
+ memset(ns, 0, sizeof(struct nameserver));
+ ns->base = base;
+
+ evtimer_assign(&ns->timeout_event, ns->base->event_base, nameserver_prod_callback, ns);
+
+ ns->socket = evutil_socket_(address->sa_family,
+ SOCK_DGRAM|EVUTIL_SOCK_NONBLOCK|EVUTIL_SOCK_CLOEXEC, 0);
+ if (ns->socket < 0) { err = 1; goto out1; }
+
+ if (base->global_outgoing_addrlen &&
+ !evutil_sockaddr_is_loopback_(address)) {
+ if (bind(ns->socket,
+ (struct sockaddr*)&base->global_outgoing_address,
+ base->global_outgoing_addrlen) < 0) {
+ log(EVDNS_LOG_WARN,"Couldn't bind to outgoing address");
+ err = 2;
+ goto out2;
+ }
+ }
+
+ memcpy(&ns->address, address, addrlen);
+ ns->addrlen = addrlen;
+ ns->state = 1;
+ event_assign(&ns->event, ns->base->event_base, ns->socket,
+ EV_READ | EV_PERSIST, nameserver_ready_callback, ns);
+ if (!base->disable_when_inactive && event_add(&ns->event, NULL) < 0) {
+ err = 2;
+ goto out2;
+ }
+
+ log(EVDNS_LOG_DEBUG, "Added nameserver %s as %p",
+ evutil_format_sockaddr_port_(address, addrbuf, sizeof(addrbuf)), ns);
+
+ /* insert this nameserver into the list of them */
+ if (!base->server_head) {
+ ns->next = ns->prev = ns;
+ base->server_head = ns;
+ } else {
+ ns->next = base->server_head->next;
+ ns->prev = base->server_head;
+ base->server_head->next = ns;
+ ns->next->prev = ns;
+ }
+
+ base->global_good_nameservers++;
+
+ return 0;
+
+out2:
+ evutil_closesocket(ns->socket);
+out1:
+ event_debug_unassign(&ns->event);
+ mm_free(ns);
+ log(EVDNS_LOG_WARN, "Unable to add nameserver %s: error %d",
+ evutil_format_sockaddr_port_(address, addrbuf, sizeof(addrbuf)), err);
+ return err;
+}
+
+/* exported function */
+int
+evdns_base_nameserver_add(struct evdns_base *base, unsigned long int address)
+{
+ struct sockaddr_in sin;
+ int res;
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_addr.s_addr = address;
+ sin.sin_port = htons(53);
+ sin.sin_family = AF_INET;
+ EVDNS_LOCK(base);
+ res = evdns_nameserver_add_impl_(base, (struct sockaddr*)&sin, sizeof(sin));
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+int
+evdns_nameserver_add(unsigned long int address) {
+ if (!current_base)
+ current_base = evdns_base_new(NULL, 0);
+ return evdns_base_nameserver_add(current_base, address);
+}
+
+static void
+sockaddr_setport(struct sockaddr *sa, ev_uint16_t port)
+{
+ if (sa->sa_family == AF_INET) {
+ ((struct sockaddr_in *)sa)->sin_port = htons(port);
+ } else if (sa->sa_family == AF_INET6) {
+ ((struct sockaddr_in6 *)sa)->sin6_port = htons(port);
+ }
+}
+
+static ev_uint16_t
+sockaddr_getport(struct sockaddr *sa)
+{
+ if (sa->sa_family == AF_INET) {
+ return ntohs(((struct sockaddr_in *)sa)->sin_port);
+ } else if (sa->sa_family == AF_INET6) {
+ return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
+ } else {
+ return 0;
+ }
+}
+
+/* exported function */
+int
+evdns_base_nameserver_ip_add(struct evdns_base *base, const char *ip_as_string) {
+ struct sockaddr_storage ss;
+ struct sockaddr *sa;
+ int len = sizeof(ss);
+ int res;
+ if (evutil_parse_sockaddr_port(ip_as_string, (struct sockaddr *)&ss,
+ &len)) {
+ log(EVDNS_LOG_WARN, "Unable to parse nameserver address %s",
+ ip_as_string);
+ return 4;
+ }
+ sa = (struct sockaddr *) &ss;
+ if (sockaddr_getport(sa) == 0)
+ sockaddr_setport(sa, 53);
+
+ EVDNS_LOCK(base);
+ res = evdns_nameserver_add_impl_(base, sa, len);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+int
+evdns_nameserver_ip_add(const char *ip_as_string) {
+ if (!current_base)
+ current_base = evdns_base_new(NULL, 0);
+ return evdns_base_nameserver_ip_add(current_base, ip_as_string);
+}
+
+int
+evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
+ const struct sockaddr *sa, ev_socklen_t len, unsigned flags)
+{
+ int res;
+ EVUTIL_ASSERT(base);
+ EVDNS_LOCK(base);
+ res = evdns_nameserver_add_impl_(base, sa, len);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+/* remove from the queue */
+static void
+evdns_request_remove(struct request *req, struct request **head)
+{
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+
+#if 0
+ {
+ struct request *ptr;
+ int found = 0;
+ EVUTIL_ASSERT(*head != NULL);
+
+ ptr = *head;
+ do {
+ if (ptr == req) {
+ found = 1;
+ break;
+ }
+ ptr = ptr->next;
+ } while (ptr != *head);
+ EVUTIL_ASSERT(found);
+
+ EVUTIL_ASSERT(req->next);
+ }
+#endif
+
+ if (req->next == req) {
+ /* only item in the list */
+ *head = NULL;
+ } else {
+ req->next->prev = req->prev;
+ req->prev->next = req->next;
+ if (*head == req) *head = req->next;
+ }
+ req->next = req->prev = NULL;
+}
+
+/* insert into the tail of the queue */
+static void
+evdns_request_insert(struct request *req, struct request **head) {
+ ASSERT_LOCKED(req->base);
+ ASSERT_VALID_REQUEST(req);
+ if (!*head) {
+ *head = req;
+ req->next = req->prev = req;
+ return;
+ }
+
+ req->prev = (*head)->prev;
+ req->prev->next = req;
+ req->next = *head;
+ (*head)->prev = req;
+}
+
+static int
+string_num_dots(const char *s) {
+ int count = 0;
+ while ((s = strchr(s, '.'))) {
+ s++;
+ count++;
+ }
+ return count;
+}
+
+static struct request *
+request_new(struct evdns_base *base, struct evdns_request *handle, int type,
+ const char *name, int flags, evdns_callback_type callback,
+ void *user_ptr) {
+
+ const char issuing_now =
+ (base->global_requests_inflight < base->global_max_requests_inflight) ? 1 : 0;
+
+ const size_t name_len = strlen(name);
+ const size_t request_max_len = evdns_request_len(name_len);
+ const u16 trans_id = issuing_now ? transaction_id_pick(base) : 0xffff;
+ /* the request data is alloced in a single block with the header */
+ struct request *const req =
+ mm_malloc(sizeof(struct request) + request_max_len);
+ int rlen;
+ char namebuf[256];
+ (void) flags;
+
+ ASSERT_LOCKED(base);
+
+ if (!req) return NULL;
+
+ if (name_len >= sizeof(namebuf)) {
+ mm_free(req);
+ return NULL;
+ }
+
+ memset(req, 0, sizeof(struct request));
+ req->base = base;
+
+ evtimer_assign(&req->timeout_event, req->base->event_base, evdns_request_timeout_callback, req);
+
+ if (base->global_randomize_case) {
+ unsigned i;
+ char randbits[(sizeof(namebuf)+7)/8];
+ strlcpy(namebuf, name, sizeof(namebuf));
+ evutil_secure_rng_get_bytes(randbits, (name_len+7)/8);
+ for (i = 0; i < name_len; ++i) {
+ if (EVUTIL_ISALPHA_(namebuf[i])) {
+ if ((randbits[i >> 3] & (1<<(i & 7))))
+ namebuf[i] |= 0x20;
+ else
+ namebuf[i] &= ~0x20;
+ }
+ }
+ name = namebuf;
+ }
+
+ /* request data lives just after the header */
+ req->request = ((u8 *) req) + sizeof(struct request);
+ /* denotes that the request data shouldn't be free()ed */
+ req->request_appended = 1;
+ rlen = evdns_request_data_build(name, name_len, trans_id,
+ type, CLASS_INET, req->request, request_max_len);
+ if (rlen < 0)
+ goto err1;
+
+ req->request_len = rlen;
+ req->trans_id = trans_id;
+ req->tx_count = 0;
+ req->request_type = type;
+ req->user_pointer = user_ptr;
+ req->user_callback = callback;
+ req->ns = issuing_now ? nameserver_pick(base) : NULL;
+ req->next = req->prev = NULL;
+ req->handle = handle;
+ if (handle) {
+ handle->current_req = req;
+ handle->base = base;
+ }
+
+ return req;
+err1:
+ mm_free(req);
+ return NULL;
+}
+
+static void
+request_submit(struct request *const req) {
+ struct evdns_base *base = req->base;
+ ASSERT_LOCKED(base);
+ ASSERT_VALID_REQUEST(req);
+ if (req->ns) {
+ /* if it has a nameserver assigned then this is going */
+ /* straight into the inflight queue */
+ evdns_request_insert(req, &REQ_HEAD(base, req->trans_id));
+
+ base->global_requests_inflight++;
+ req->ns->requests_inflight++;
+
+ evdns_request_transmit(req);
+ } else {
+ evdns_request_insert(req, &base->req_waiting_head);
+ base->global_requests_waiting++;
+ }
+}
+
+/* exported function */
+void
+evdns_cancel_request(struct evdns_base *base, struct evdns_request *handle)
+{
+ struct request *req;
+
+ if (!handle->current_req)
+ return;
+
+ if (!base) {
+ /* This redundancy is silly; can we fix it? (Not for 2.0) XXXX */
+ base = handle->base;
+ if (!base)
+ base = handle->current_req->base;
+ }
+
+ EVDNS_LOCK(base);
+ if (handle->pending_cb) {
+ EVDNS_UNLOCK(base);
+ return;
+ }
+
+ req = handle->current_req;
+ ASSERT_VALID_REQUEST(req);
+
+ reply_schedule_callback(req, 0, DNS_ERR_CANCEL, NULL);
+ if (req->ns) {
+ /* remove from inflight queue */
+ request_finished(req, &REQ_HEAD(base, req->trans_id), 1);
+ } else {
+ /* remove from global_waiting head */
+ request_finished(req, &base->req_waiting_head, 1);
+ }
+ EVDNS_UNLOCK(base);
+}
+
+/* exported function */
+struct evdns_request *
+evdns_base_resolve_ipv4(struct evdns_base *base, const char *name, int flags,
+ evdns_callback_type callback, void *ptr) {
+ struct evdns_request *handle;
+ struct request *req;
+ log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name);
+ handle = mm_calloc(1, sizeof(*handle));
+ if (handle == NULL)
+ return NULL;
+ EVDNS_LOCK(base);
+ if (flags & DNS_QUERY_NO_SEARCH) {
+ req =
+ request_new(base, handle, TYPE_A, name, flags,
+ callback, ptr);
+ if (req)
+ request_submit(req);
+ } else {
+ search_request_new(base, handle, TYPE_A, name, flags,
+ callback, ptr);
+ }
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
+ EVDNS_UNLOCK(base);
+ return handle;
+}
+
+int evdns_resolve_ipv4(const char *name, int flags,
+ evdns_callback_type callback, void *ptr)
+{
+ return evdns_base_resolve_ipv4(current_base, name, flags, callback, ptr)
+ ? 0 : -1;
+}
+
+
+/* exported function */
+struct evdns_request *
+evdns_base_resolve_ipv6(struct evdns_base *base,
+ const char *name, int flags,
+ evdns_callback_type callback, void *ptr)
+{
+ struct evdns_request *handle;
+ struct request *req;
+ log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name);
+ handle = mm_calloc(1, sizeof(*handle));
+ if (handle == NULL)
+ return NULL;
+ EVDNS_LOCK(base);
+ if (flags & DNS_QUERY_NO_SEARCH) {
+ req = request_new(base, handle, TYPE_AAAA, name, flags,
+ callback, ptr);
+ if (req)
+ request_submit(req);
+ } else {
+ search_request_new(base, handle, TYPE_AAAA, name, flags,
+ callback, ptr);
+ }
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
+ EVDNS_UNLOCK(base);
+ return handle;
+}
+
+int evdns_resolve_ipv6(const char *name, int flags,
+ evdns_callback_type callback, void *ptr) {
+ return evdns_base_resolve_ipv6(current_base, name, flags, callback, ptr)
+ ? 0 : -1;
+}
+
+struct evdns_request *
+evdns_base_resolve_reverse(struct evdns_base *base, const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr) {
+ char buf[32];
+ struct evdns_request *handle;
+ struct request *req;
+ u32 a;
+ EVUTIL_ASSERT(in);
+ a = ntohl(in->s_addr);
+ evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa",
+ (int)(u8)((a )&0xff),
+ (int)(u8)((a>>8 )&0xff),
+ (int)(u8)((a>>16)&0xff),
+ (int)(u8)((a>>24)&0xff));
+ handle = mm_calloc(1, sizeof(*handle));
+ if (handle == NULL)
+ return NULL;
+ log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf);
+ EVDNS_LOCK(base);
+ req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr);
+ if (req)
+ request_submit(req);
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
+ EVDNS_UNLOCK(base);
+ return (handle);
+}
+
+int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr) {
+ return evdns_base_resolve_reverse(current_base, in, flags, callback, ptr)
+ ? 0 : -1;
+}
+
+struct evdns_request *
+evdns_base_resolve_reverse_ipv6(struct evdns_base *base, const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) {
+ /* 32 nybbles, 32 periods, "ip6.arpa", NUL. */
+ char buf[73];
+ char *cp;
+ struct evdns_request *handle;
+ struct request *req;
+ int i;
+ EVUTIL_ASSERT(in);
+ cp = buf;
+ for (i=15; i >= 0; --i) {
+ u8 byte = in->s6_addr[i];
+ *cp++ = "0123456789abcdef"[byte & 0x0f];
+ *cp++ = '.';
+ *cp++ = "0123456789abcdef"[byte >> 4];
+ *cp++ = '.';
+ }
+ EVUTIL_ASSERT(cp + strlen("ip6.arpa") < buf+sizeof(buf));
+ memcpy(cp, "ip6.arpa", strlen("ip6.arpa")+1);
+ handle = mm_calloc(1, sizeof(*handle));
+ if (handle == NULL)
+ return NULL;
+ log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf);
+ EVDNS_LOCK(base);
+ req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr);
+ if (req)
+ request_submit(req);
+ if (handle->current_req == NULL) {
+ mm_free(handle);
+ handle = NULL;
+ }
+ EVDNS_UNLOCK(base);
+ return (handle);
+}
+
+int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) {
+ return evdns_base_resolve_reverse_ipv6(current_base, in, flags, callback, ptr)
+ ? 0 : -1;
+}
+
+/* ================================================================= */
+/* Search support */
+/* */
+/* the libc resolver has support for searching a number of domains */
+/* to find a name. If nothing else then it takes the single domain */
+/* from the gethostname() call. */
+/* */
+/* It can also be configured via the domain and search options in a */
+/* resolv.conf. */
+/* */
+/* The ndots option controls how many dots it takes for the resolver */
+/* to decide that a name is non-local and so try a raw lookup first. */
+
+struct search_domain {
+ int len;
+ struct search_domain *next;
+ /* the text string is appended to this structure */
+};
+
+struct search_state {
+ int refcount;
+ int ndots;
+ int num_domains;
+ struct search_domain *head;
+};
+
+static void
+search_state_decref(struct search_state *const state) {
+ if (!state) return;
+ state->refcount--;
+ if (!state->refcount) {
+ struct search_domain *next, *dom;
+ for (dom = state->head; dom; dom = next) {
+ next = dom->next;
+ mm_free(dom);
+ }
+ mm_free(state);
+ }
+}
+
+static struct search_state *
+search_state_new(void) {
+ struct search_state *state = (struct search_state *) mm_malloc(sizeof(struct search_state));
+ if (!state) return NULL;
+ memset(state, 0, sizeof(struct search_state));
+ state->refcount = 1;
+ state->ndots = 1;
+
+ return state;
+}
+
+static void
+search_postfix_clear(struct evdns_base *base) {
+ search_state_decref(base->global_search_state);
+
+ base->global_search_state = search_state_new();
+}
+
+/* exported function */
+void
+evdns_base_search_clear(struct evdns_base *base)
+{
+ EVDNS_LOCK(base);
+ search_postfix_clear(base);
+ EVDNS_UNLOCK(base);
+}
+
+void
+evdns_search_clear(void) {
+ evdns_base_search_clear(current_base);
+}
+
+static void
+search_postfix_add(struct evdns_base *base, const char *domain) {
+ size_t domain_len;
+ struct search_domain *sdomain;
+ while (domain[0] == '.') domain++;
+ domain_len = strlen(domain);
+
+ ASSERT_LOCKED(base);
+ if (!base->global_search_state) base->global_search_state = search_state_new();
+ if (!base->global_search_state) return;
+ base->global_search_state->num_domains++;
+
+ sdomain = (struct search_domain *) mm_malloc(sizeof(struct search_domain) + domain_len);
+ if (!sdomain) return;
+ memcpy( ((u8 *) sdomain) + sizeof(struct search_domain), domain, domain_len);
+ sdomain->next = base->global_search_state->head;
+ sdomain->len = (int) domain_len;
+
+ base->global_search_state->head = sdomain;
+}
+
+/* reverse the order of members in the postfix list. This is needed because, */
+/* when parsing resolv.conf we push elements in the wrong order */
+static void
+search_reverse(struct evdns_base *base) {
+ struct search_domain *cur, *prev = NULL, *next;
+ ASSERT_LOCKED(base);
+ cur = base->global_search_state->head;
+ while (cur) {
+ next = cur->next;
+ cur->next = prev;
+ prev = cur;
+ cur = next;
+ }
+
+ base->global_search_state->head = prev;
+}
+
+/* exported function */
+void
+evdns_base_search_add(struct evdns_base *base, const char *domain) {
+ EVDNS_LOCK(base);
+ search_postfix_add(base, domain);
+ EVDNS_UNLOCK(base);
+}
+void
+evdns_search_add(const char *domain) {
+ evdns_base_search_add(current_base, domain);
+}
+
+/* exported function */
+void
+evdns_base_search_ndots_set(struct evdns_base *base, const int ndots) {
+ EVDNS_LOCK(base);
+ if (!base->global_search_state) base->global_search_state = search_state_new();
+ if (base->global_search_state)
+ base->global_search_state->ndots = ndots;
+ EVDNS_UNLOCK(base);
+}
+void
+evdns_search_ndots_set(const int ndots) {
+ evdns_base_search_ndots_set(current_base, ndots);
+}
+
+static void
+search_set_from_hostname(struct evdns_base *base) {
+ char hostname[HOST_NAME_MAX + 1], *domainname;
+
+ ASSERT_LOCKED(base);
+ search_postfix_clear(base);
+ if (gethostname(hostname, sizeof(hostname))) return;
+ domainname = strchr(hostname, '.');
+ if (!domainname) return;
+ search_postfix_add(base, domainname);
+}
+
+/* warning: returns malloced string */
+static char *
+search_make_new(const struct search_state *const state, int n, const char *const base_name) {
+ const size_t base_len = strlen(base_name);
+ const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+ struct search_domain *dom;
+
+ for (dom = state->head; dom; dom = dom->next) {
+ if (!n--) {
+ /* this is the postfix we want */
+ /* the actual postfix string is kept at the end of the structure */
+ const u8 *const postfix = ((u8 *) dom) + sizeof(struct search_domain);
+ const int postfix_len = dom->len;
+ char *const newname = (char *) mm_malloc(base_len + need_to_append_dot + postfix_len + 1);
+ if (!newname) return NULL;
+ memcpy(newname, base_name, base_len);
+ if (need_to_append_dot) newname[base_len] = '.';
+ memcpy(newname + base_len + need_to_append_dot, postfix, postfix_len);
+ newname[base_len + need_to_append_dot + postfix_len] = 0;
+ return newname;
+ }
+ }
+
+ /* we ran off the end of the list and still didn't find the requested string */
+ EVUTIL_ASSERT(0);
+ return NULL; /* unreachable; stops warnings in some compilers. */
+}
+
+static struct request *
+search_request_new(struct evdns_base *base, struct evdns_request *handle,
+ int type, const char *const name, int flags,
+ evdns_callback_type user_callback, void *user_arg) {
+ ASSERT_LOCKED(base);
+ EVUTIL_ASSERT(type == TYPE_A || type == TYPE_AAAA);
+ EVUTIL_ASSERT(handle->current_req == NULL);
+ if ( ((flags & DNS_QUERY_NO_SEARCH) == 0) &&
+ base->global_search_state &&
+ base->global_search_state->num_domains) {
+ /* we have some domains to search */
+ struct request *req;
+ if (string_num_dots(name) >= base->global_search_state->ndots) {
+ req = request_new(base, handle, type, name, flags, user_callback, user_arg);
+ if (!req) return NULL;
+ handle->search_index = -1;
+ } else {
+ char *const new_name = search_make_new(base->global_search_state, 0, name);
+ if (!new_name) return NULL;
+ req = request_new(base, handle, type, new_name, flags, user_callback, user_arg);
+ mm_free(new_name);
+ if (!req) return NULL;
+ handle->search_index = 0;
+ }
+ EVUTIL_ASSERT(handle->search_origname == NULL);
+ handle->search_origname = mm_strdup(name);
+ if (handle->search_origname == NULL) {
+ /* XXX Should we dealloc req? If yes, how? */
+ if (req)
+ mm_free(req);
+ return NULL;
+ }
+ handle->search_state = base->global_search_state;
+ handle->search_flags = flags;
+ base->global_search_state->refcount++;
+ request_submit(req);
+ return req;
+ } else {
+ struct request *const req = request_new(base, handle, type, name, flags, user_callback, user_arg);
+ if (!req) return NULL;
+ request_submit(req);
+ return req;
+ }
+}
+
+/* this is called when a request has failed to find a name. We need to check */
+/* if it is part of a search and, if so, try the next name in the list */
+/* returns: */
+/* 0 another request has been submitted */
+/* 1 no more requests needed */
+static int
+search_try_next(struct evdns_request *const handle) {
+ struct request *req = handle->current_req;
+ struct evdns_base *base = req->base;
+ struct request *newreq;
+ ASSERT_LOCKED(base);
+ if (handle->search_state) {
+ /* it is part of a search */
+ char *new_name;
+ handle->search_index++;
+ if (handle->search_index >= handle->search_state->num_domains) {
+ /* no more postfixes to try, however we may need to try */
+ /* this name without a postfix */
+ if (string_num_dots(handle->search_origname) < handle->search_state->ndots) {
+ /* yep, we need to try it raw */
+ newreq = request_new(base, NULL, req->request_type, handle->search_origname, handle->search_flags, req->user_callback, req->user_pointer);
+ log(EVDNS_LOG_DEBUG, "Search: trying raw query %s", handle->search_origname);
+ if (newreq) {
+ search_request_finished(handle);
+ goto submit_next;
+ }
+ }
+ return 1;
+ }
+
+ new_name = search_make_new(handle->search_state, handle->search_index, handle->search_origname);
+ if (!new_name) return 1;
+ log(EVDNS_LOG_DEBUG, "Search: now trying %s (%d)", new_name, handle->search_index);
+ newreq = request_new(base, NULL, req->request_type, new_name, handle->search_flags, req->user_callback, req->user_pointer);
+ mm_free(new_name);
+ if (!newreq) return 1;
+ goto submit_next;
+ }
+ return 1;
+
+submit_next:
+ request_finished(req, &REQ_HEAD(req->base, req->trans_id), 0);
+ handle->current_req = newreq;
+ newreq->handle = handle;
+ request_submit(newreq);
+ return 0;
+}
+
+static void
+search_request_finished(struct evdns_request *const handle) {
+ ASSERT_LOCKED(handle->current_req->base);
+ if (handle->search_state) {
+ search_state_decref(handle->search_state);
+ handle->search_state = NULL;
+ }
+ if (handle->search_origname) {
+ mm_free(handle->search_origname);
+ handle->search_origname = NULL;
+ }
+}
+
+/* ================================================================= */
+/* Parsing resolv.conf files */
+
+static void
+evdns_resolv_set_defaults(struct evdns_base *base, int flags) {
+ /* if the file isn't found then we assume a local resolver */
+ ASSERT_LOCKED(base);
+ if (flags & DNS_OPTION_SEARCH) search_set_from_hostname(base);
+ if (flags & DNS_OPTION_NAMESERVERS) evdns_base_nameserver_ip_add(base,"127.0.0.1");
+}
+
+#ifndef EVENT__HAVE_STRTOK_R
+static char *
+strtok_r(char *s, const char *delim, char **state) {
+ char *cp, *start;
+ start = cp = s ? s : *state;
+ if (!cp)
+ return NULL;
+ while (*cp && !strchr(delim, *cp))
+ ++cp;
+ if (!*cp) {
+ if (cp == start)
+ return NULL;
+ *state = NULL;
+ return start;
+ } else {
+ *cp++ = '\0';
+ *state = cp;
+ return start;
+ }
+}
+#endif
+
+/* helper version of atoi which returns -1 on error */
+static int
+strtoint(const char *const str)
+{
+ char *endptr;
+ const int r = strtol(str, &endptr, 10);
+ if (*endptr) return -1;
+ return r;
+}
+
+/* Parse a number of seconds into a timeval; return -1 on error. */
+static int
+strtotimeval(const char *const str, struct timeval *out)
+{
+ double d;
+ char *endptr;
+ d = strtod(str, &endptr);
+ if (*endptr) return -1;
+ if (d < 0) return -1;
+ out->tv_sec = (int) d;
+ out->tv_usec = (int) ((d - (int) d)*1000000);
+ if (out->tv_sec == 0 && out->tv_usec < 1000) /* less than 1 msec */
+ return -1;
+ return 0;
+}
+
+/* helper version of atoi that returns -1 on error and clips to bounds. */
+static int
+strtoint_clipped(const char *const str, int min, int max)
+{
+ int r = strtoint(str);
+ if (r == -1)
+ return r;
+ else if (r<min)
+ return min;
+ else if (r>max)
+ return max;
+ else
+ return r;
+}
+
+static int
+evdns_base_set_max_requests_inflight(struct evdns_base *base, int maxinflight)
+{
+ int old_n_heads = base->n_req_heads, n_heads;
+ struct request **old_heads = base->req_heads, **new_heads, *req;
+ int i;
+
+ ASSERT_LOCKED(base);
+ if (maxinflight < 1)
+ maxinflight = 1;
+ n_heads = (maxinflight+4) / 5;
+ EVUTIL_ASSERT(n_heads > 0);
+ new_heads = mm_calloc(n_heads, sizeof(struct request*));
+ if (!new_heads)
+ return (-1);
+ if (old_heads) {
+ for (i = 0; i < old_n_heads; ++i) {
+ while (old_heads[i]) {
+ req = old_heads[i];
+ evdns_request_remove(req, &old_heads[i]);
+ evdns_request_insert(req, &new_heads[req->trans_id % n_heads]);
+ }
+ }
+ mm_free(old_heads);
+ }
+ base->req_heads = new_heads;
+ base->n_req_heads = n_heads;
+ base->global_max_requests_inflight = maxinflight;
+ return (0);
+}
+
+/* exported function */
+int
+evdns_base_set_option(struct evdns_base *base,
+ const char *option, const char *val)
+{
+ int res;
+ EVDNS_LOCK(base);
+ res = evdns_base_set_option_impl(base, option, val, DNS_OPTIONS_ALL);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+static inline int
+str_matches_option(const char *s1, const char *optionname)
+{
+ /* Option names are given as "option:" We accept either 'option' in
+ * s1, or 'option:randomjunk'. The latter form is to implement the
+ * resolv.conf parser. */
+ size_t optlen = strlen(optionname);
+ size_t slen = strlen(s1);
+ if (slen == optlen || slen == optlen - 1)
+ return !strncmp(s1, optionname, slen);
+ else if (slen > optlen)
+ return !strncmp(s1, optionname, optlen);
+ else
+ return 0;
+}
+
+static int
+evdns_base_set_option_impl(struct evdns_base *base,
+ const char *option, const char *val, int flags)
+{
+ ASSERT_LOCKED(base);
+ if (str_matches_option(option, "ndots:")) {
+ const int ndots = strtoint(val);
+ if (ndots == -1) return -1;
+ if (!(flags & DNS_OPTION_SEARCH)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting ndots to %d", ndots);
+ if (!base->global_search_state) base->global_search_state = search_state_new();
+ if (!base->global_search_state) return -1;
+ base->global_search_state->ndots = ndots;
+ } else if (str_matches_option(option, "timeout:")) {
+ struct timeval tv;
+ if (strtotimeval(val, &tv) == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting timeout to %s", val);
+ memcpy(&base->global_timeout, &tv, sizeof(struct timeval));
+ } else if (str_matches_option(option, "getaddrinfo-allow-skew:")) {
+ struct timeval tv;
+ if (strtotimeval(val, &tv) == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting getaddrinfo-allow-skew to %s",
+ val);
+ memcpy(&base->global_getaddrinfo_allow_skew, &tv,
+ sizeof(struct timeval));
+ } else if (str_matches_option(option, "max-timeouts:")) {
+ const int maxtimeout = strtoint_clipped(val, 1, 255);
+ if (maxtimeout == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting maximum allowed timeouts to %d",
+ maxtimeout);
+ base->global_max_nameserver_timeout = maxtimeout;
+ } else if (str_matches_option(option, "max-inflight:")) {
+ const int maxinflight = strtoint_clipped(val, 1, 65000);
+ if (maxinflight == -1) return -1;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting maximum inflight requests to %d",
+ maxinflight);
+ evdns_base_set_max_requests_inflight(base, maxinflight);
+ } else if (str_matches_option(option, "attempts:")) {
+ int retries = strtoint(val);
+ if (retries == -1) return -1;
+ if (retries > 255) retries = 255;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting retries to %d", retries);
+ base->global_max_retransmits = retries;
+ } else if (str_matches_option(option, "randomize-case:")) {
+ int randcase = strtoint(val);
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ base->global_randomize_case = randcase;
+ } else if (str_matches_option(option, "bind-to:")) {
+ /* XXX This only applies to successive nameservers, not
+ * to already-configured ones. We might want to fix that. */
+ int len = sizeof(base->global_outgoing_address);
+ if (!(flags & DNS_OPTION_NAMESERVERS)) return 0;
+ if (evutil_parse_sockaddr_port(val,
+ (struct sockaddr*)&base->global_outgoing_address, &len))
+ return -1;
+ base->global_outgoing_addrlen = len;
+ } else if (str_matches_option(option, "initial-probe-timeout:")) {
+ struct timeval tv;
+ if (strtotimeval(val, &tv) == -1) return -1;
+ if (tv.tv_sec > 3600)
+ tv.tv_sec = 3600;
+ if (!(flags & DNS_OPTION_MISC)) return 0;
+ log(EVDNS_LOG_DEBUG, "Setting initial probe timeout to %s",
+ val);
+ memcpy(&base->global_nameserver_probe_initial_timeout, &tv,
+ sizeof(tv));
+ }
+ return 0;
+}
+
+int
+evdns_set_option(const char *option, const char *val, int flags)
+{
+ if (!current_base)
+ current_base = evdns_base_new(NULL, 0);
+ return evdns_base_set_option(current_base, option, val);
+}
+
+static void
+resolv_conf_parse_line(struct evdns_base *base, char *const start, int flags) {
+ char *strtok_state;
+ static const char *const delims = " \t";
+#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state)
+
+
+ char *const first_token = strtok_r(start, delims, &strtok_state);
+ ASSERT_LOCKED(base);
+ if (!first_token) return;
+
+ if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) {
+ const char *const nameserver = NEXT_TOKEN;
+
+ if (nameserver)
+ evdns_base_nameserver_ip_add(base, nameserver);
+ } else if (!strcmp(first_token, "domain") && (flags & DNS_OPTION_SEARCH)) {
+ const char *const domain = NEXT_TOKEN;
+ if (domain) {
+ search_postfix_clear(base);
+ search_postfix_add(base, domain);
+ }
+ } else if (!strcmp(first_token, "search") && (flags & DNS_OPTION_SEARCH)) {
+ const char *domain;
+ search_postfix_clear(base);
+
+ while ((domain = NEXT_TOKEN)) {
+ search_postfix_add(base, domain);
+ }
+ search_reverse(base);
+ } else if (!strcmp(first_token, "options")) {
+ const char *option;
+ while ((option = NEXT_TOKEN)) {
+ const char *val = strchr(option, ':');
+ evdns_base_set_option_impl(base, option, val ? val+1 : "", flags);
+ }
+ }
+#undef NEXT_TOKEN
+}
+
+/* exported function */
+/* returns: */
+/* 0 no errors */
+/* 1 failed to open file */
+/* 2 failed to stat file */
+/* 3 file too large */
+/* 4 out of memory */
+/* 5 short read from file */
+int
+evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char *const filename) {
+ int res;
+ EVDNS_LOCK(base);
+ res = evdns_base_resolv_conf_parse_impl(base, flags, filename);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+static char *
+evdns_get_default_hosts_filename(void)
+{
+#ifdef _WIN32
+ /* Windows is a little coy about where it puts its configuration
+ * files. Sure, they're _usually_ in C:\windows\system32, but
+ * there's no reason in principle they couldn't be in
+ * W:\hoboken chicken emergency\
+ */
+ char path[MAX_PATH+1];
+ static const char hostfile[] = "\\drivers\\etc\\hosts";
+ char *path_out;
+ size_t len_out;
+
+ if (! SHGetSpecialFolderPathA(NULL, path, CSIDL_SYSTEM, 0))
+ return NULL;
+ len_out = strlen(path)+strlen(hostfile);
+ path_out = mm_malloc(len_out+1);
+ evutil_snprintf(path_out, len_out, "%s%s", path, hostfile);
+ return path_out;
+#else
+ return mm_strdup("/etc/hosts");
+#endif
+}
+
+static int
+evdns_base_resolv_conf_parse_impl(struct evdns_base *base, int flags, const char *const filename) {
+ size_t n;
+ char *resolv;
+ char *start;
+ int err = 0;
+
+ log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename);
+
+ if (flags & DNS_OPTION_HOSTSFILE) {
+ char *fname = evdns_get_default_hosts_filename();
+ evdns_base_load_hosts(base, fname);
+ if (fname)
+ mm_free(fname);
+ }
+
+ if ((err = evutil_read_file_(filename, &resolv, &n, 0)) < 0) {
+ if (err == -1) {
+ /* No file. */
+ evdns_resolv_set_defaults(base, flags);
+ return 1;
+ } else {
+ return 2;
+ }
+ }
+
+ start = resolv;
+ for (;;) {
+ char *const newline = strchr(start, '\n');
+ if (!newline) {
+ resolv_conf_parse_line(base, start, flags);
+ break;
+ } else {
+ *newline = 0;
+ resolv_conf_parse_line(base, start, flags);
+ start = newline + 1;
+ }
+ }
+
+ if (!base->server_head && (flags & DNS_OPTION_NAMESERVERS)) {
+ /* no nameservers were configured. */
+ evdns_base_nameserver_ip_add(base, "127.0.0.1");
+ err = 6;
+ }
+ if (flags & DNS_OPTION_SEARCH && (!base->global_search_state || base->global_search_state->num_domains == 0)) {
+ search_set_from_hostname(base);
+ }
+
+ mm_free(resolv);
+ return err;
+}
+
+int
+evdns_resolv_conf_parse(int flags, const char *const filename) {
+ if (!current_base)
+ current_base = evdns_base_new(NULL, 0);
+ return evdns_base_resolv_conf_parse(current_base, flags, filename);
+}
+
+
+#ifdef _WIN32
+/* Add multiple nameservers from a space-or-comma-separated list. */
+static int
+evdns_nameserver_ip_add_line(struct evdns_base *base, const char *ips) {
+ const char *addr;
+ char *buf;
+ int r;
+ ASSERT_LOCKED(base);
+ while (*ips) {
+ while (isspace(*ips) || *ips == ',' || *ips == '\t')
+ ++ips;
+ addr = ips;
+ while (isdigit(*ips) || *ips == '.' || *ips == ':' ||
+ *ips=='[' || *ips==']')
+ ++ips;
+ buf = mm_malloc(ips-addr+1);
+ if (!buf) return 4;
+ memcpy(buf, addr, ips-addr);
+ buf[ips-addr] = '\0';
+ r = evdns_base_nameserver_ip_add(base, buf);
+ mm_free(buf);
+ if (r) return r;
+ }
+ return 0;
+}
+
+typedef DWORD(WINAPI *GetNetworkParams_fn_t)(FIXED_INFO *, DWORD*);
+
+/* Use the windows GetNetworkParams interface in iphlpapi.dll to */
+/* figure out what our nameservers are. */
+static int
+load_nameservers_with_getnetworkparams(struct evdns_base *base)
+{
+ /* Based on MSDN examples and inspection of c-ares code. */
+ FIXED_INFO *fixed;
+ HMODULE handle = 0;
+ ULONG size = sizeof(FIXED_INFO);
+ void *buf = NULL;
+ int status = 0, r, added_any;
+ IP_ADDR_STRING *ns;
+ GetNetworkParams_fn_t fn;
+
+ ASSERT_LOCKED(base);
+ if (!(handle = evutil_load_windows_system_library_(
+ TEXT("iphlpapi.dll")))) {
+ log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll");
+ status = -1;
+ goto done;
+ }
+ if (!(fn = (GetNetworkParams_fn_t) GetProcAddress(handle, "GetNetworkParams"))) {
+ log(EVDNS_LOG_WARN, "Could not get address of function.");
+ status = -1;
+ goto done;
+ }
+
+ buf = mm_malloc(size);
+ if (!buf) { status = 4; goto done; }
+ fixed = buf;
+ r = fn(fixed, &size);
+ if (r != ERROR_SUCCESS && r != ERROR_BUFFER_OVERFLOW) {
+ status = -1;
+ goto done;
+ }
+ if (r != ERROR_SUCCESS) {
+ mm_free(buf);
+ buf = mm_malloc(size);
+ if (!buf) { status = 4; goto done; }
+ fixed = buf;
+ r = fn(fixed, &size);
+ if (r != ERROR_SUCCESS) {
+ log(EVDNS_LOG_DEBUG, "fn() failed.");
+ status = -1;
+ goto done;
+ }
+ }
+
+ EVUTIL_ASSERT(fixed);
+ added_any = 0;
+ ns = &(fixed->DnsServerList);
+ while (ns) {
+ r = evdns_nameserver_ip_add_line(base, ns->IpAddress.String);
+ if (r) {
+ log(EVDNS_LOG_DEBUG,"Could not add nameserver %s to list,error: %d",
+ (ns->IpAddress.String),(int)GetLastError());
+ status = r;
+ } else {
+ ++added_any;
+ log(EVDNS_LOG_DEBUG,"Successfully added %s as nameserver",ns->IpAddress.String);
+ }
+
+ ns = ns->Next;
+ }
+
+ if (!added_any) {
+ log(EVDNS_LOG_DEBUG, "No nameservers added.");
+ if (status == 0)
+ status = -1;
+ } else {
+ status = 0;
+ }
+
+ done:
+ if (buf)
+ mm_free(buf);
+ if (handle)
+ FreeLibrary(handle);
+ return status;
+}
+
+static int
+config_nameserver_from_reg_key(struct evdns_base *base, HKEY key, const TCHAR *subkey)
+{
+ char *buf;
+ DWORD bufsz = 0, type = 0;
+ int status = 0;
+
+ ASSERT_LOCKED(base);
+ if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz)
+ != ERROR_MORE_DATA)
+ return -1;
+ if (!(buf = mm_malloc(bufsz)))
+ return -1;
+
+ if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz)
+ == ERROR_SUCCESS && bufsz > 1) {
+ status = evdns_nameserver_ip_add_line(base,buf);
+ }
+
+ mm_free(buf);
+ return status;
+}
+
+#define SERVICES_KEY TEXT("System\\CurrentControlSet\\Services\\")
+#define WIN_NS_9X_KEY SERVICES_KEY TEXT("VxD\\MSTCP")
+#define WIN_NS_NT_KEY SERVICES_KEY TEXT("Tcpip\\Parameters")
+
+static int
+load_nameservers_from_registry(struct evdns_base *base)
+{
+ int found = 0;
+ int r;
+#define TRY(k, name) \
+ if (!found && config_nameserver_from_reg_key(base,k,TEXT(name)) == 0) { \
+ log(EVDNS_LOG_DEBUG,"Found nameservers in %s/%s",#k,name); \
+ found = 1; \
+ } else if (!found) { \
+ log(EVDNS_LOG_DEBUG,"Didn't find nameservers in %s/%s", \
+ #k,#name); \
+ }
+
+ ASSERT_LOCKED(base);
+
+ if (((int)GetVersion()) > 0) { /* NT */
+ HKEY nt_key = 0, interfaces_key = 0;
+
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
+ KEY_READ, &nt_key) != ERROR_SUCCESS) {
+ log(EVDNS_LOG_DEBUG,"Couldn't open nt key, %d",(int)GetLastError());
+ return -1;
+ }
+ r = RegOpenKeyEx(nt_key, TEXT("Interfaces"), 0,
+ KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,
+ &interfaces_key);
+ if (r != ERROR_SUCCESS) {
+ log(EVDNS_LOG_DEBUG,"Couldn't open interfaces key, %d",(int)GetLastError());
+ return -1;
+ }
+ TRY(nt_key, "NameServer");
+ TRY(nt_key, "DhcpNameServer");
+ TRY(interfaces_key, "NameServer");
+ TRY(interfaces_key, "DhcpNameServer");
+ RegCloseKey(interfaces_key);
+ RegCloseKey(nt_key);
+ } else {
+ HKEY win_key = 0;
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0,
+ KEY_READ, &win_key) != ERROR_SUCCESS) {
+ log(EVDNS_LOG_DEBUG, "Couldn't open registry key, %d", (int)GetLastError());
+ return -1;
+ }
+ TRY(win_key, "NameServer");
+ RegCloseKey(win_key);
+ }
+
+ if (found == 0) {
+ log(EVDNS_LOG_WARN,"Didn't find any nameservers.");
+ }
+
+ return found ? 0 : -1;
+#undef TRY
+}
+
+int
+evdns_base_config_windows_nameservers(struct evdns_base *base)
+{
+ int r;
+ char *fname;
+ if (base == NULL)
+ base = current_base;
+ if (base == NULL)
+ return -1;
+ EVDNS_LOCK(base);
+ if (load_nameservers_with_getnetworkparams(base) == 0) {
+ EVDNS_UNLOCK(base);
+ return 0;
+ }
+ r = load_nameservers_from_registry(base);
+
+ fname = evdns_get_default_hosts_filename();
+ evdns_base_load_hosts(base, fname);
+ if (fname)
+ mm_free(fname);
+
+ EVDNS_UNLOCK(base);
+ return r;
+}
+
+int
+evdns_config_windows_nameservers(void)
+{
+ if (!current_base) {
+ current_base = evdns_base_new(NULL, 1);
+ return current_base == NULL ? -1 : 0;
+ } else {
+ return evdns_base_config_windows_nameservers(current_base);
+ }
+}
+#endif
+
+struct evdns_base *
+evdns_base_new(struct event_base *event_base, int flags)
+{
+ struct evdns_base *base;
+
+ if (evutil_secure_rng_init() < 0) {
+ log(EVDNS_LOG_WARN, "Unable to seed random number generator; "
+ "DNS can't run.");
+ return NULL;
+ }
+
+ /* Give the evutil library a hook into its evdns-enabled
+ * functionality. We can't just call evdns_getaddrinfo directly or
+ * else libevent-core will depend on libevent-extras. */
+ evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo);
+
+ base = mm_malloc(sizeof(struct evdns_base));
+ if (base == NULL)
+ return (NULL);
+ memset(base, 0, sizeof(struct evdns_base));
+ base->req_waiting_head = NULL;
+
+ EVTHREAD_ALLOC_LOCK(base->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVDNS_LOCK(base);
+
+ /* Set max requests inflight and allocate req_heads. */
+ base->req_heads = NULL;
+
+ evdns_base_set_max_requests_inflight(base, 64);
+
+ base->server_head = NULL;
+ base->event_base = event_base;
+ base->global_good_nameservers = base->global_requests_inflight =
+ base->global_requests_waiting = 0;
+
+ base->global_timeout.tv_sec = 5;
+ base->global_timeout.tv_usec = 0;
+ base->global_max_reissues = 1;
+ base->global_max_retransmits = 3;
+ base->global_max_nameserver_timeout = 3;
+ base->global_search_state = NULL;
+ base->global_randomize_case = 1;
+ base->global_getaddrinfo_allow_skew.tv_sec = 3;
+ base->global_getaddrinfo_allow_skew.tv_usec = 0;
+ base->global_nameserver_probe_initial_timeout.tv_sec = 10;
+ base->global_nameserver_probe_initial_timeout.tv_usec = 0;
+
+ TAILQ_INIT(&base->hostsdb);
+
+#define EVDNS_BASE_ALL_FLAGS (0x8001)
+ if (flags & ~EVDNS_BASE_ALL_FLAGS) {
+ flags = EVDNS_BASE_INITIALIZE_NAMESERVERS;
+ log(EVDNS_LOG_WARN,
+ "Unrecognized flag passed to evdns_base_new(). Assuming "
+ "you meant EVDNS_BASE_INITIALIZE_NAMESERVERS.");
+ }
+#undef EVDNS_BASE_ALL_FLAGS
+
+ if (flags & EVDNS_BASE_INITIALIZE_NAMESERVERS) {
+ int r;
+#ifdef _WIN32
+ r = evdns_base_config_windows_nameservers(base);
+#else
+ r = evdns_base_resolv_conf_parse(base, DNS_OPTIONS_ALL, "/etc/resolv.conf");
+#endif
+ if (r == -1) {
+ evdns_base_free_and_unlock(base, 0);
+ return NULL;
+ }
+ }
+ if (flags & EVDNS_BASE_DISABLE_WHEN_INACTIVE) {
+ base->disable_when_inactive = 1;
+ }
+
+ EVDNS_UNLOCK(base);
+ return base;
+}
+
+int
+evdns_init(void)
+{
+ struct evdns_base *base = evdns_base_new(NULL, 1);
+ if (base) {
+ current_base = base;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+const char *
+evdns_err_to_string(int err)
+{
+ switch (err) {
+ case DNS_ERR_NONE: return "no error";
+ case DNS_ERR_FORMAT: return "misformatted query";
+ case DNS_ERR_SERVERFAILED: return "server failed";
+ case DNS_ERR_NOTEXIST: return "name does not exist";
+ case DNS_ERR_NOTIMPL: return "query not implemented";
+ case DNS_ERR_REFUSED: return "refused";
+
+ case DNS_ERR_TRUNCATED: return "reply truncated or ill-formed";
+ case DNS_ERR_UNKNOWN: return "unknown";
+ case DNS_ERR_TIMEOUT: return "request timed out";
+ case DNS_ERR_SHUTDOWN: return "dns subsystem shut down";
+ case DNS_ERR_CANCEL: return "dns request canceled";
+ case DNS_ERR_NODATA: return "no records in the reply";
+ default: return "[Unknown error code]";
+ }
+}
+
+static void
+evdns_nameserver_free(struct nameserver *server)
+{
+ if (server->socket >= 0)
+ evutil_closesocket(server->socket);
+ (void) event_del(&server->event);
+ event_debug_unassign(&server->event);
+ if (server->state == 0)
+ (void) event_del(&server->timeout_event);
+ event_debug_unassign(&server->timeout_event);
+ mm_free(server);
+}
+
+static void
+evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests)
+{
+ struct nameserver *server, *server_next;
+ struct search_domain *dom, *dom_next;
+ int i;
+
+ /* Requires that we hold the lock. */
+
+ /* TODO(nickm) we might need to refcount here. */
+
+ for (i = 0; i < base->n_req_heads; ++i) {
+ while (base->req_heads[i]) {
+ if (fail_requests)
+ reply_schedule_callback(base->req_heads[i], 0, DNS_ERR_SHUTDOWN, NULL);
+ request_finished(base->req_heads[i], &REQ_HEAD(base, base->req_heads[i]->trans_id), 1);
+ }
+ }
+ while (base->req_waiting_head) {
+ if (fail_requests)
+ reply_schedule_callback(base->req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL);
+ request_finished(base->req_waiting_head, &base->req_waiting_head, 1);
+ }
+ base->global_requests_inflight = base->global_requests_waiting = 0;
+
+ for (server = base->server_head; server; server = server_next) {
+ server_next = server->next;
+ evdns_nameserver_free(server);
+ if (server_next == base->server_head)
+ break;
+ }
+ base->server_head = NULL;
+ base->global_good_nameservers = 0;
+
+ if (base->global_search_state) {
+ for (dom = base->global_search_state->head; dom; dom = dom_next) {
+ dom_next = dom->next;
+ mm_free(dom);
+ }
+ mm_free(base->global_search_state);
+ base->global_search_state = NULL;
+ }
+
+ {
+ struct hosts_entry *victim;
+ while ((victim = TAILQ_FIRST(&base->hostsdb))) {
+ TAILQ_REMOVE(&base->hostsdb, victim, next);
+ mm_free(victim);
+ }
+ }
+
+ mm_free(base->req_heads);
+
+ EVDNS_UNLOCK(base);
+ EVTHREAD_FREE_LOCK(base->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+
+ mm_free(base);
+}
+
+void
+evdns_base_free(struct evdns_base *base, int fail_requests)
+{
+ EVDNS_LOCK(base);
+ evdns_base_free_and_unlock(base, fail_requests);
+}
+
+void
+evdns_base_clear_host_addresses(struct evdns_base *base)
+{
+ struct hosts_entry *victim;
+ EVDNS_LOCK(base);
+ while ((victim = TAILQ_FIRST(&base->hostsdb))) {
+ TAILQ_REMOVE(&base->hostsdb, victim, next);
+ mm_free(victim);
+ }
+ EVDNS_UNLOCK(base);
+}
+
+void
+evdns_shutdown(int fail_requests)
+{
+ if (current_base) {
+ struct evdns_base *b = current_base;
+ current_base = NULL;
+ evdns_base_free(b, fail_requests);
+ }
+ evdns_log_fn = NULL;
+}
+
+static int
+evdns_base_parse_hosts_line(struct evdns_base *base, char *line)
+{
+ char *strtok_state;
+ static const char *const delims = " \t";
+ char *const addr = strtok_r(line, delims, &strtok_state);
+ char *hostname, *hash;
+ struct sockaddr_storage ss;
+ int socklen = sizeof(ss);
+ ASSERT_LOCKED(base);
+
+#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state)
+
+ if (!addr || *addr == '#')
+ return 0;
+
+ memset(&ss, 0, sizeof(ss));
+ if (evutil_parse_sockaddr_port(addr, (struct sockaddr*)&ss, &socklen)<0)
+ return -1;
+ if (socklen > (int)sizeof(struct sockaddr_in6))
+ return -1;
+
+ if (sockaddr_getport((struct sockaddr*)&ss))
+ return -1;
+
+ while ((hostname = NEXT_TOKEN)) {
+ struct hosts_entry *he;
+ size_t namelen;
+ if ((hash = strchr(hostname, '#'))) {
+ if (hash == hostname)
+ return 0;
+ *hash = '\0';
+ }
+
+ namelen = strlen(hostname);
+
+ he = mm_calloc(1, sizeof(struct hosts_entry)+namelen);
+ if (!he)
+ return -1;
+ EVUTIL_ASSERT(socklen <= (int)sizeof(he->addr));
+ memcpy(&he->addr, &ss, socklen);
+ memcpy(he->hostname, hostname, namelen+1);
+ he->addrlen = socklen;
+
+ TAILQ_INSERT_TAIL(&base->hostsdb, he, next);
+
+ if (hash)
+ return 0;
+ }
+
+ return 0;
+#undef NEXT_TOKEN
+}
+
+static int
+evdns_base_load_hosts_impl(struct evdns_base *base, const char *hosts_fname)
+{
+ char *str=NULL, *cp, *eol;
+ size_t len;
+ int err=0;
+
+ ASSERT_LOCKED(base);
+
+ if (hosts_fname == NULL ||
+ (err = evutil_read_file_(hosts_fname, &str, &len, 0)) < 0) {
+ char tmp[64];
+ strlcpy(tmp, "127.0.0.1 localhost", sizeof(tmp));
+ evdns_base_parse_hosts_line(base, tmp);
+ strlcpy(tmp, "::1 localhost", sizeof(tmp));
+ evdns_base_parse_hosts_line(base, tmp);
+ return err ? -1 : 0;
+ }
+
+ /* This will break early if there is a NUL in the hosts file.
+ * Probably not a problem.*/
+ cp = str;
+ for (;;) {
+ eol = strchr(cp, '\n');
+
+ if (eol) {
+ *eol = '\0';
+ evdns_base_parse_hosts_line(base, cp);
+ cp = eol+1;
+ } else {
+ evdns_base_parse_hosts_line(base, cp);
+ break;
+ }
+ }
+
+ mm_free(str);
+ return 0;
+}
+
+int
+evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname)
+{
+ int res;
+ if (!base)
+ base = current_base;
+ EVDNS_LOCK(base);
+ res = evdns_base_load_hosts_impl(base, hosts_fname);
+ EVDNS_UNLOCK(base);
+ return res;
+}
+
+/* A single request for a getaddrinfo, either v4 or v6. */
+struct getaddrinfo_subrequest {
+ struct evdns_request *r;
+ ev_uint32_t type;
+};
+
+/* State data used to implement an in-progress getaddrinfo. */
+struct evdns_getaddrinfo_request {
+ struct evdns_base *evdns_base;
+ /* Copy of the modified 'hints' data that we'll use to build
+ * answers. */
+ struct evutil_addrinfo hints;
+ /* The callback to invoke when we're done */
+ evdns_getaddrinfo_cb user_cb;
+ /* User-supplied data to give to the callback. */
+ void *user_data;
+ /* The port to use when building sockaddrs. */
+ ev_uint16_t port;
+ /* The sub_request for an A record (if any) */
+ struct getaddrinfo_subrequest ipv4_request;
+ /* The sub_request for an AAAA record (if any) */
+ struct getaddrinfo_subrequest ipv6_request;
+
+ /* The cname result that we were told (if any) */
+ char *cname_result;
+
+ /* If we have one request answered and one request still inflight,
+ * then this field holds the answer from the first request... */
+ struct evutil_addrinfo *pending_result;
+ /* And this event is a timeout that will tell us to cancel the second
+ * request if it's taking a long time. */
+ struct event timeout;
+
+ /* And this field holds the error code from the first request... */
+ int pending_error;
+ /* If this is set, the user canceled this request. */
+ unsigned user_canceled : 1;
+ /* If this is set, the user can no longer cancel this request; we're
+ * just waiting for the free. */
+ unsigned request_done : 1;
+};
+
+/* Convert an evdns errors to the equivalent getaddrinfo error. */
+static int
+evdns_err_to_getaddrinfo_err(int e1)
+{
+ /* XXX Do this better! */
+ if (e1 == DNS_ERR_NONE)
+ return 0;
+ else if (e1 == DNS_ERR_NOTEXIST)
+ return EVUTIL_EAI_NONAME;
+ else
+ return EVUTIL_EAI_FAIL;
+}
+
+/* Return the more informative of two getaddrinfo errors. */
+static int
+getaddrinfo_merge_err(int e1, int e2)
+{
+ /* XXXX be cleverer here. */
+ if (e1 == 0)
+ return e2;
+ else
+ return e1;
+}
+
+static void
+free_getaddrinfo_request(struct evdns_getaddrinfo_request *data)
+{
+ /* DO NOT CALL this if either of the requests is pending. Only once
+ * both callbacks have been invoked is it safe to free the request */
+ if (data->pending_result)
+ evutil_freeaddrinfo(data->pending_result);
+ if (data->cname_result)
+ mm_free(data->cname_result);
+ event_del(&data->timeout);
+ mm_free(data);
+ return;
+}
+
+static void
+add_cname_to_reply(struct evdns_getaddrinfo_request *data,
+ struct evutil_addrinfo *ai)
+{
+ if (data->cname_result && ai) {
+ ai->ai_canonname = data->cname_result;
+ data->cname_result = NULL;
+ }
+}
+
+/* Callback: invoked when one request in a mixed-format A/AAAA getaddrinfo
+ * request has finished, but the other one took too long to answer. Pass
+ * along the answer we got, and cancel the other request.
+ */
+static void
+evdns_getaddrinfo_timeout_cb(evutil_socket_t fd, short what, void *ptr)
+{
+ int v4_timedout = 0, v6_timedout = 0;
+ struct evdns_getaddrinfo_request *data = ptr;
+
+ /* Cancel any pending requests, and note which one */
+ if (data->ipv4_request.r) {
+ /* XXXX This does nothing if the request's callback is already
+ * running (pending_cb is set). */
+ evdns_cancel_request(NULL, data->ipv4_request.r);
+ v4_timedout = 1;
+ EVDNS_LOCK(data->evdns_base);
+ ++data->evdns_base->getaddrinfo_ipv4_timeouts;
+ EVDNS_UNLOCK(data->evdns_base);
+ }
+ if (data->ipv6_request.r) {
+ /* XXXX This does nothing if the request's callback is already
+ * running (pending_cb is set). */
+ evdns_cancel_request(NULL, data->ipv6_request.r);
+ v6_timedout = 1;
+ EVDNS_LOCK(data->evdns_base);
+ ++data->evdns_base->getaddrinfo_ipv6_timeouts;
+ EVDNS_UNLOCK(data->evdns_base);
+ }
+
+ /* We only use this timeout callback when we have an answer for
+ * one address. */
+ EVUTIL_ASSERT(!v4_timedout || !v6_timedout);
+
+ /* Report the outcome of the other request that didn't time out. */
+ if (data->pending_result) {
+ add_cname_to_reply(data, data->pending_result);
+ data->user_cb(0, data->pending_result, data->user_data);
+ data->pending_result = NULL;
+ } else {
+ int e = data->pending_error;
+ if (!e)
+ e = EVUTIL_EAI_AGAIN;
+ data->user_cb(e, NULL, data->user_data);
+ }
+
+ data->user_cb = NULL; /* prevent double-call if evdns callbacks are
+ * in-progress. XXXX It would be better if this
+ * weren't necessary. */
+
+ if (!v4_timedout && !v6_timedout) {
+ /* should be impossible? XXXX */
+ free_getaddrinfo_request(data);
+ }
+}
+
+static int
+evdns_getaddrinfo_set_timeout(struct evdns_base *evdns_base,
+ struct evdns_getaddrinfo_request *data)
+{
+ return event_add(&data->timeout, &evdns_base->global_getaddrinfo_allow_skew);
+}
+
+static inline int
+evdns_result_is_answer(int result)
+{
+ return (result != DNS_ERR_NOTIMPL && result != DNS_ERR_REFUSED &&
+ result != DNS_ERR_SERVERFAILED && result != DNS_ERR_CANCEL);
+}
+
+static void
+evdns_getaddrinfo_gotresolve(int result, char type, int count,
+ int ttl, void *addresses, void *arg)
+{
+ int i;
+ struct getaddrinfo_subrequest *req = arg;
+ struct getaddrinfo_subrequest *other_req;
+ struct evdns_getaddrinfo_request *data;
+
+ struct evutil_addrinfo *res;
+
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ struct sockaddr *sa;
+ int socklen, addrlen;
+ void *addrp;
+ int err;
+ int user_canceled;
+
+ EVUTIL_ASSERT(req->type == DNS_IPv4_A || req->type == DNS_IPv6_AAAA);
+ if (req->type == DNS_IPv4_A) {
+ data = EVUTIL_UPCAST(req, struct evdns_getaddrinfo_request, ipv4_request);
+ other_req = &data->ipv6_request;
+ } else {
+ data = EVUTIL_UPCAST(req, struct evdns_getaddrinfo_request, ipv6_request);
+ other_req = &data->ipv4_request;
+ }
+
+ EVDNS_LOCK(data->evdns_base);
+ if (evdns_result_is_answer(result)) {
+ if (req->type == DNS_IPv4_A)
+ ++data->evdns_base->getaddrinfo_ipv4_answered;
+ else
+ ++data->evdns_base->getaddrinfo_ipv6_answered;
+ }
+ user_canceled = data->user_canceled;
+ if (other_req->r == NULL)
+ data->request_done = 1;
+ EVDNS_UNLOCK(data->evdns_base);
+
+ req->r = NULL;
+
+ if (result == DNS_ERR_CANCEL && ! user_canceled) {
+ /* Internal cancel request from timeout or internal error.
+ * we already answered the user. */
+ if (other_req->r == NULL)
+ free_getaddrinfo_request(data);
+ return;
+ }
+
+ if (data->user_cb == NULL) {
+ /* We already answered. XXXX This shouldn't be needed; see
+ * comments in evdns_getaddrinfo_timeout_cb */
+ free_getaddrinfo_request(data);
+ return;
+ }
+
+ if (result == DNS_ERR_NONE) {
+ if (count == 0)
+ err = EVUTIL_EAI_NODATA;
+ else
+ err = 0;
+ } else {
+ err = evdns_err_to_getaddrinfo_err(result);
+ }
+
+ if (err) {
+ /* Looks like we got an error. */
+ if (other_req->r) {
+ /* The other request is still working; maybe it will
+ * succeed. */
+ /* XXXX handle failure from set_timeout */
+ evdns_getaddrinfo_set_timeout(data->evdns_base, data);
+ data->pending_error = err;
+ return;
+ }
+
+ if (user_canceled) {
+ data->user_cb(EVUTIL_EAI_CANCEL, NULL, data->user_data);
+ } else if (data->pending_result) {
+ /* If we have an answer waiting, and we weren't
+ * canceled, ignore this error. */
+ add_cname_to_reply(data, data->pending_result);
+ data->user_cb(0, data->pending_result, data->user_data);
+ data->pending_result = NULL;
+ } else {
+ if (data->pending_error)
+ err = getaddrinfo_merge_err(err,
+ data->pending_error);
+ data->user_cb(err, NULL, data->user_data);
+ }
+ free_getaddrinfo_request(data);
+ return;
+ } else if (user_canceled) {
+ if (other_req->r) {
+ /* The other request is still working; let it hit this
+ * callback with EVUTIL_EAI_CANCEL callback and report
+ * the failure. */
+ return;
+ }
+ data->user_cb(EVUTIL_EAI_CANCEL, NULL, data->user_data);
+ free_getaddrinfo_request(data);
+ return;
+ }
+
+ /* Looks like we got some answers. We should turn them into addrinfos
+ * and then either queue those or return them all. */
+ EVUTIL_ASSERT(type == DNS_IPv4_A || type == DNS_IPv6_AAAA);
+
+ if (type == DNS_IPv4_A) {
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(data->port);
+
+ sa = (struct sockaddr *)&sin;
+ socklen = sizeof(sin);
+ addrlen = 4;
+ addrp = &sin.sin_addr.s_addr;
+ } else {
+ memset(&sin6, 0, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(data->port);
+
+ sa = (struct sockaddr *)&sin6;
+ socklen = sizeof(sin6);
+ addrlen = 16;
+ addrp = &sin6.sin6_addr.s6_addr;
+ }
+
+ res = NULL;
+ for (i=0; i < count; ++i) {
+ struct evutil_addrinfo *ai;
+ memcpy(addrp, ((char*)addresses)+i*addrlen, addrlen);
+ ai = evutil_new_addrinfo_(sa, socklen, &data->hints);
+ if (!ai) {
+ if (other_req->r) {
+ evdns_cancel_request(NULL, other_req->r);
+ }
+ data->user_cb(EVUTIL_EAI_MEMORY, NULL, data->user_data);
+ if (res)
+ evutil_freeaddrinfo(res);
+
+ if (other_req->r == NULL)
+ free_getaddrinfo_request(data);
+ return;
+ }
+ res = evutil_addrinfo_append_(res, ai);
+ }
+
+ if (other_req->r) {
+ /* The other request is still in progress; wait for it */
+ /* XXXX handle failure from set_timeout */
+ evdns_getaddrinfo_set_timeout(data->evdns_base, data);
+ data->pending_result = res;
+ return;
+ } else {
+ /* The other request is done or never started; append its
+ * results (if any) and return them. */
+ if (data->pending_result) {
+ if (req->type == DNS_IPv4_A)
+ res = evutil_addrinfo_append_(res,
+ data->pending_result);
+ else
+ res = evutil_addrinfo_append_(
+ data->pending_result, res);
+ data->pending_result = NULL;
+ }
+
+ /* Call the user callback. */
+ add_cname_to_reply(data, res);
+ data->user_cb(0, res, data->user_data);
+
+ /* Free data. */
+ free_getaddrinfo_request(data);
+ }
+}
+
+static struct hosts_entry *
+find_hosts_entry(struct evdns_base *base, const char *hostname,
+ struct hosts_entry *find_after)
+{
+ struct hosts_entry *e;
+
+ if (find_after)
+ e = TAILQ_NEXT(find_after, next);
+ else
+ e = TAILQ_FIRST(&base->hostsdb);
+
+ for (; e; e = TAILQ_NEXT(e, next)) {
+ if (!evutil_ascii_strcasecmp(e->hostname, hostname))
+ return e;
+ }
+ return NULL;
+}
+
+static int
+evdns_getaddrinfo_fromhosts(struct evdns_base *base,
+ const char *nodename, struct evutil_addrinfo *hints, ev_uint16_t port,
+ struct evutil_addrinfo **res)
+{
+ int n_found = 0;
+ struct hosts_entry *e;
+ struct evutil_addrinfo *ai=NULL;
+ int f = hints->ai_family;
+
+ EVDNS_LOCK(base);
+ for (e = find_hosts_entry(base, nodename, NULL); e;
+ e = find_hosts_entry(base, nodename, e)) {
+ struct evutil_addrinfo *ai_new;
+ ++n_found;
+ if ((e->addr.sa.sa_family == AF_INET && f == PF_INET6) ||
+ (e->addr.sa.sa_family == AF_INET6 && f == PF_INET))
+ continue;
+ ai_new = evutil_new_addrinfo_(&e->addr.sa, e->addrlen, hints);
+ if (!ai_new) {
+ n_found = 0;
+ goto out;
+ }
+ sockaddr_setport(ai_new->ai_addr, port);
+ ai = evutil_addrinfo_append_(ai, ai_new);
+ }
+ EVDNS_UNLOCK(base);
+out:
+ if (n_found) {
+ /* Note that we return an empty answer if we found entries for
+ * this hostname but none were of the right address type. */
+ *res = ai;
+ return 0;
+ } else {
+ if (ai)
+ evutil_freeaddrinfo(ai);
+ return -1;
+ }
+}
+
+struct evdns_getaddrinfo_request *
+evdns_getaddrinfo(struct evdns_base *dns_base,
+ const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in,
+ evdns_getaddrinfo_cb cb, void *arg)
+{
+ struct evdns_getaddrinfo_request *data;
+ struct evutil_addrinfo hints;
+ struct evutil_addrinfo *res = NULL;
+ int err;
+ int port = 0;
+ int want_cname = 0;
+
+ if (!dns_base) {
+ dns_base = current_base;
+ if (!dns_base) {
+ log(EVDNS_LOG_WARN,
+ "Call to getaddrinfo_async with no "
+ "evdns_base configured.");
+ cb(EVUTIL_EAI_FAIL, NULL, arg); /* ??? better error? */
+ return NULL;
+ }
+ }
+
+ /* If we _must_ answer this immediately, do so. */
+ if ((hints_in && (hints_in->ai_flags & EVUTIL_AI_NUMERICHOST))) {
+ res = NULL;
+ err = evutil_getaddrinfo(nodename, servname, hints_in, &res);
+ cb(err, res, arg);
+ return NULL;
+ }
+
+ if (hints_in) {
+ memcpy(&hints, hints_in, sizeof(hints));
+ } else {
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ }
+
+ evutil_adjust_hints_for_addrconfig_(&hints);
+
+ /* Now try to see if we _can_ answer immediately. */
+ /* (It would be nice to do this by calling getaddrinfo directly, with
+ * AI_NUMERICHOST, on plaforms that have it, but we can't: there isn't
+ * a reliable way to distinguish the "that wasn't a numeric host!" case
+ * from any other EAI_NONAME cases.) */
+ err = evutil_getaddrinfo_common_(nodename, servname, &hints, &res, &port);
+ if (err != EVUTIL_EAI_NEED_RESOLVE) {
+ cb(err, res, arg);
+ return NULL;
+ }
+
+ /* If there is an entry in the hosts file, we should give it now. */
+ if (!evdns_getaddrinfo_fromhosts(dns_base, nodename, &hints, port, &res)) {
+ cb(0, res, arg);
+ return NULL;
+ }
+
+ /* Okay, things are serious now. We're going to need to actually
+ * launch a request.
+ */
+ data = mm_calloc(1,sizeof(struct evdns_getaddrinfo_request));
+ if (!data) {
+ cb(EVUTIL_EAI_MEMORY, NULL, arg);
+ return NULL;
+ }
+
+ memcpy(&data->hints, &hints, sizeof(data->hints));
+ data->port = (ev_uint16_t)port;
+ data->ipv4_request.type = DNS_IPv4_A;
+ data->ipv6_request.type = DNS_IPv6_AAAA;
+ data->user_cb = cb;
+ data->user_data = arg;
+ data->evdns_base = dns_base;
+
+ want_cname = (hints.ai_flags & EVUTIL_AI_CANONNAME);
+
+ /* If we are asked for a PF_UNSPEC address, we launch two requests in
+ * parallel: one for an A address and one for an AAAA address. We
+ * can't send just one request, since many servers only answer one
+ * question per DNS request.
+ *
+ * Once we have the answer to one request, we allow for a short
+ * timeout before we report it, to see if the other one arrives. If
+ * they both show up in time, then we report both the answers.
+ *
+ * If too many addresses of one type time out or fail, we should stop
+ * launching those requests. (XXX we don't do that yet.)
+ */
+
+ if (hints.ai_family != PF_INET6) {
+ log(EVDNS_LOG_DEBUG, "Sending request for %s on ipv4 as %p",
+ nodename, &data->ipv4_request);
+
+ data->ipv4_request.r = evdns_base_resolve_ipv4(dns_base,
+ nodename, 0, evdns_getaddrinfo_gotresolve,
+ &data->ipv4_request);
+ if (want_cname)
+ data->ipv4_request.r->current_req->put_cname_in_ptr =
+ &data->cname_result;
+ }
+ if (hints.ai_family != PF_INET) {
+ log(EVDNS_LOG_DEBUG, "Sending request for %s on ipv6 as %p",
+ nodename, &data->ipv6_request);
+
+ data->ipv6_request.r = evdns_base_resolve_ipv6(dns_base,
+ nodename, 0, evdns_getaddrinfo_gotresolve,
+ &data->ipv6_request);
+ if (want_cname)
+ data->ipv6_request.r->current_req->put_cname_in_ptr =
+ &data->cname_result;
+ }
+
+ evtimer_assign(&data->timeout, dns_base->event_base,
+ evdns_getaddrinfo_timeout_cb, data);
+
+ if (data->ipv4_request.r || data->ipv6_request.r) {
+ return data;
+ } else {
+ mm_free(data);
+ cb(EVUTIL_EAI_FAIL, NULL, arg);
+ return NULL;
+ }
+}
+
+void
+evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *data)
+{
+ EVDNS_LOCK(data->evdns_base);
+ if (data->request_done) {
+ EVDNS_UNLOCK(data->evdns_base);
+ return;
+ }
+ event_del(&data->timeout);
+ data->user_canceled = 1;
+ if (data->ipv4_request.r)
+ evdns_cancel_request(data->evdns_base, data->ipv4_request.r);
+ if (data->ipv6_request.r)
+ evdns_cancel_request(data->evdns_base, data->ipv6_request.r);
+ EVDNS_UNLOCK(data->evdns_base);
+}
diff --git a/sntp/libevent/event-internal.h b/sntp/libevent/event-internal.h
new file mode 100644
index 000000000000..5208fbe0874e
--- /dev/null
+++ b/sntp/libevent/event-internal.h
@@ -0,0 +1,474 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT_INTERNAL_H_INCLUDED_
+#define EVENT_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <time.h>
+#include <sys/queue.h>
+#include "event2/event_struct.h"
+#include "minheap-internal.h"
+#include "evsignal-internal.h"
+#include "mm-internal.h"
+#include "defer-internal.h"
+
+/* map union members back */
+
+/* mutually exclusive */
+#define ev_signal_next ev_.ev_signal.ev_signal_next
+#define ev_io_next ev_.ev_io.ev_io_next
+#define ev_io_timeout ev_.ev_io.ev_timeout
+
+/* used only by signals */
+#define ev_ncalls ev_.ev_signal.ev_ncalls
+#define ev_pncalls ev_.ev_signal.ev_pncalls
+
+#define ev_pri ev_evcallback.evcb_pri
+#define ev_flags ev_evcallback.evcb_flags
+#define ev_closure ev_evcallback.evcb_closure
+#define ev_callback ev_evcallback.evcb_cb_union.evcb_callback
+#define ev_arg ev_evcallback.evcb_arg
+
+/** @name Event closure codes
+
+ Possible values for evcb_closure in struct event_callback
+
+ @{
+ */
+/** A regular event. Uses the evcb_callback callback */
+#define EV_CLOSURE_EVENT 0
+/** A signal event. Uses the evcb_callback callback */
+#define EV_CLOSURE_EVENT_SIGNAL 1
+/** A persistent non-signal event. Uses the evcb_callback callback */
+#define EV_CLOSURE_EVENT_PERSIST 2
+/** A simple callback. Uses the evcb_selfcb callback. */
+#define EV_CLOSURE_CB_SELF 3
+/** A finalizing callback. Uses the evcb_cbfinalize callback. */
+#define EV_CLOSURE_CB_FINALIZE 4
+/** A finalizing event. Uses the evcb_evfinalize callback. */
+#define EV_CLOSURE_EVENT_FINALIZE 5
+/** A finalizing event that should get freed after. Uses the evcb_evfinalize
+ * callback. */
+#define EV_CLOSURE_EVENT_FINALIZE_FREE 6
+/** @} */
+
+/** Structure to define the backend of a given event_base. */
+struct eventop {
+ /** The name of this backend. */
+ const char *name;
+ /** Function to set up an event_base to use this backend. It should
+ * create a new structure holding whatever information is needed to
+ * run the backend, and return it. The returned pointer will get
+ * stored by event_init into the event_base.evbase field. On failure,
+ * this function should return NULL. */
+ void *(*init)(struct event_base *);
+ /** Enable reading/writing on a given fd or signal. 'events' will be
+ * the events that we're trying to enable: one or more of EV_READ,
+ * EV_WRITE, EV_SIGNAL, and EV_ET. 'old' will be those events that
+ * were enabled on this fd previously. 'fdinfo' will be a structure
+ * associated with the fd by the evmap; its size is defined by the
+ * fdinfo field below. It will be set to 0 the first time the fd is
+ * added. The function should return 0 on success and -1 on error.
+ */
+ int (*add)(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo);
+ /** As "add", except 'events' contains the events we mean to disable. */
+ int (*del)(struct event_base *, evutil_socket_t fd, short old, short events, void *fdinfo);
+ /** Function to implement the core of an event loop. It must see which
+ added events are ready, and cause event_active to be called for each
+ active event (usually via event_io_active or such). It should
+ return 0 on success and -1 on error.
+ */
+ int (*dispatch)(struct event_base *, struct timeval *);
+ /** Function to clean up and free our data from the event_base. */
+ void (*dealloc)(struct event_base *);
+ /** Flag: set if we need to reinitialize the event base after we fork.
+ */
+ int need_reinit;
+ /** Bit-array of supported event_method_features that this backend can
+ * provide. */
+ enum event_method_feature features;
+ /** Length of the extra information we should record for each fd that
+ has one or more active events. This information is recorded
+ as part of the evmap entry for each fd, and passed as an argument
+ to the add and del functions above.
+ */
+ size_t fdinfo_len;
+};
+
+#ifdef _WIN32
+/* If we're on win32, then file descriptors are not nice low densely packed
+ integers. Instead, they are pointer-like windows handles, and we want to
+ use a hashtable instead of an array to map fds to events.
+*/
+#define EVMAP_USE_HT
+#endif
+
+/* #define HT_CACHE_HASH_VALS */
+
+#ifdef EVMAP_USE_HT
+#define HT_NO_CACHE_HASH_VALUES
+#include "ht-internal.h"
+struct event_map_entry;
+HT_HEAD(event_io_map, event_map_entry);
+#else
+#define event_io_map event_signal_map
+#endif
+
+/* Used to map signal numbers to a list of events. If EVMAP_USE_HT is not
+ defined, this structure is also used as event_io_map, which maps fds to a
+ list of events.
+*/
+struct event_signal_map {
+ /* An array of evmap_io * or of evmap_signal *; empty entries are
+ * set to NULL. */
+ void **entries;
+ /* The number of entries available in entries */
+ int nentries;
+};
+
+/* A list of events waiting on a given 'common' timeout value. Ordinarily,
+ * events waiting for a timeout wait on a minheap. Sometimes, however, a
+ * queue can be faster.
+ **/
+struct common_timeout_list {
+ /* List of events currently waiting in the queue. */
+ struct event_list events;
+ /* 'magic' timeval used to indicate the duration of events in this
+ * queue. */
+ struct timeval duration;
+ /* Event that triggers whenever one of the events in the queue is
+ * ready to activate */
+ struct event timeout_event;
+ /* The event_base that this timeout list is part of */
+ struct event_base *base;
+};
+
+/** Mask used to get the real tv_usec value from a common timeout. */
+#define COMMON_TIMEOUT_MICROSECONDS_MASK 0x000fffff
+
+struct event_change;
+
+/* List of 'changes' since the last call to eventop.dispatch. Only maintained
+ * if the backend is using changesets. */
+struct event_changelist {
+ struct event_change *changes;
+ int n_changes;
+ int changes_size;
+};
+
+#ifndef EVENT__DISABLE_DEBUG_MODE
+/* Global internal flag: set to one if debug mode is on. */
+extern int event_debug_mode_on_;
+#define EVENT_DEBUG_MODE_IS_ON() (event_debug_mode_on_)
+#else
+#define EVENT_DEBUG_MODE_IS_ON() (0)
+#endif
+
+TAILQ_HEAD(evcallback_list, event_callback);
+
+/* Sets up an event for processing once */
+struct event_once {
+ LIST_ENTRY(event_once) next_once;
+ struct event ev;
+
+ void (*cb)(evutil_socket_t, short, void *);
+ void *arg;
+};
+
+struct event_base {
+ /** Function pointers and other data to describe this event_base's
+ * backend. */
+ const struct eventop *evsel;
+ /** Pointer to backend-specific data. */
+ void *evbase;
+
+ /** List of changes to tell backend about at next dispatch. Only used
+ * by the O(1) backends. */
+ struct event_changelist changelist;
+
+ /** Function pointers used to describe the backend that this event_base
+ * uses for signals */
+ const struct eventop *evsigsel;
+ /** Data to implement the common signal handelr code. */
+ struct evsig_info sig;
+
+ /** Number of virtual events */
+ int virtual_event_count;
+ /** Maximum number of virtual events active */
+ int virtual_event_count_max;
+ /** Number of total events added to this event_base */
+ int event_count;
+ /** Maximum number of total events added to this event_base */
+ int event_count_max;
+ /** Number of total events active in this event_base */
+ int event_count_active;
+ /** Maximum number of total events active in this event_base */
+ int event_count_active_max;
+
+ /** Set if we should terminate the loop once we're done processing
+ * events. */
+ int event_gotterm;
+ /** Set if we should terminate the loop immediately */
+ int event_break;
+ /** Set if we should start a new instance of the loop immediately. */
+ int event_continue;
+
+ /** The currently running priority of events */
+ int event_running_priority;
+
+ /** Set if we're running the event_base_loop function, to prevent
+ * reentrant invocation. */
+ int running_loop;
+
+ /** Set to the number of deferred_cbs we've made 'active' in the
+ * loop. This is a hack to prevent starvation; it would be smarter
+ * to just use event_config_set_max_dispatch_interval's max_callbacks
+ * feature */
+ int n_deferreds_queued;
+
+ /* Active event management. */
+ /** An array of nactivequeues queues for active event_callbacks (ones
+ * that have triggered, and whose callbacks need to be called). Low
+ * priority numbers are more important, and stall higher ones.
+ */
+ struct evcallback_list *activequeues;
+ /** The length of the activequeues array */
+ int nactivequeues;
+ /** A list of event_callbacks that should become active the next time
+ * we process events, but not this time. */
+ struct evcallback_list active_later_queue;
+
+ /* common timeout logic */
+
+ /** An array of common_timeout_list* for all of the common timeout
+ * values we know. */
+ struct common_timeout_list **common_timeout_queues;
+ /** The number of entries used in common_timeout_queues */
+ int n_common_timeouts;
+ /** The total size of common_timeout_queues. */
+ int n_common_timeouts_allocated;
+
+ /** Mapping from file descriptors to enabled (added) events */
+ struct event_io_map io;
+
+ /** Mapping from signal numbers to enabled (added) events. */
+ struct event_signal_map sigmap;
+
+ /** Priority queue of events with timeouts. */
+ struct min_heap timeheap;
+
+ /** Stored timeval: used to avoid calling gettimeofday/clock_gettime
+ * too often. */
+ struct timeval tv_cache;
+
+ struct evutil_monotonic_timer monotonic_timer;
+
+ /** Difference between internal time (maybe from clock_gettime) and
+ * gettimeofday. */
+ struct timeval tv_clock_diff;
+ /** Second in which we last updated tv_clock_diff, in monotonic time. */
+ time_t last_updated_clock_diff;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ /* threading support */
+ /** The thread currently running the event_loop for this base */
+ unsigned long th_owner_id;
+ /** A lock to prevent conflicting accesses to this event_base */
+ void *th_base_lock;
+ /** A condition that gets signalled when we're done processing an
+ * event with waiters on it. */
+ void *current_event_cond;
+ /** Number of threads blocking on current_event_cond. */
+ int current_event_waiters;
+#endif
+ /** The event whose callback is executing right now */
+ struct event_callback *current_event;
+
+#ifdef _WIN32
+ /** IOCP support structure, if IOCP is enabled. */
+ struct event_iocp_port *iocp;
+#endif
+
+ /** Flags that this base was configured with */
+ enum event_base_config_flag flags;
+
+ struct timeval max_dispatch_time;
+ int max_dispatch_callbacks;
+ int limit_callbacks_after_prio;
+
+ /* Notify main thread to wake up break, etc. */
+ /** True if the base already has a pending notify, and we don't need
+ * to add any more. */
+ int is_notify_pending;
+ /** A socketpair used by some th_notify functions to wake up the main
+ * thread. */
+ evutil_socket_t th_notify_fd[2];
+ /** An event used by some th_notify functions to wake up the main
+ * thread. */
+ struct event th_notify;
+ /** A function used to wake up the main thread from another thread. */
+ int (*th_notify_fn)(struct event_base *base);
+
+ /** Saved seed for weak random number generator. Some backends use
+ * this to produce fairness among sockets. Protected by th_base_lock. */
+ struct evutil_weakrand_state weakrand_seed;
+
+ /** List of event_onces that have not yet fired. */
+ LIST_HEAD(once_event_list, event_once) once_events;
+
+};
+
+struct event_config_entry {
+ TAILQ_ENTRY(event_config_entry) next;
+
+ const char *avoid_method;
+};
+
+/** Internal structure: describes the configuration we want for an event_base
+ * that we're about to allocate. */
+struct event_config {
+ TAILQ_HEAD(event_configq, event_config_entry) entries;
+
+ int n_cpus_hint;
+ struct timeval max_dispatch_interval;
+ int max_dispatch_callbacks;
+ int limit_callbacks_after_prio;
+ enum event_method_feature require_features;
+ enum event_base_config_flag flags;
+};
+
+/* Internal use only: Functions that might be missing from <sys/queue.h> */
+#if defined(EVENT__HAVE_SYS_QUEUE_H) && !defined(EVENT__HAVE_TAILQFOREACH)
+#ifndef TAILQ_FIRST
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#endif
+#ifndef TAILQ_END
+#define TAILQ_END(head) NULL
+#endif
+#ifndef TAILQ_NEXT
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+#endif
+
+#ifndef TAILQ_FOREACH
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = TAILQ_FIRST(head); \
+ (var) != TAILQ_END(head); \
+ (var) = TAILQ_NEXT(var, field))
+#endif
+
+#ifndef TAILQ_INSERT_BEFORE
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (0)
+#endif
+#endif /* TAILQ_FOREACH */
+
+#define N_ACTIVE_CALLBACKS(base) \
+ ((base)->event_count_active)
+
+int evsig_set_handler_(struct event_base *base, int evsignal,
+ void (*fn)(int));
+int evsig_restore_handler_(struct event_base *base, int evsignal);
+
+int event_add_nolock_(struct event *ev,
+ const struct timeval *tv, int tv_is_absolute);
+/** Argument for event_del_nolock_. Tells event_del not to block on the event
+ * if it's running in another thread. */
+#define EVENT_DEL_NOBLOCK 0
+/** Argument for event_del_nolock_. Tells event_del to block on the event
+ * if it's running in another thread, regardless of its value for EV_FINALIZE
+ */
+#define EVENT_DEL_BLOCK 1
+/** Argument for event_del_nolock_. Tells event_del to block on the event
+ * if it is running in another thread and it doesn't have EV_FINALIZE set.
+ */
+#define EVENT_DEL_AUTOBLOCK 2
+/** Argument for event_del_nolock_. Tells event_del to procede even if the
+ * event is set up for finalization rather for regular use.*/
+#define EVENT_DEL_EVEN_IF_FINALIZING 3
+int event_del_nolock_(struct event *ev, int blocking);
+int event_remove_timer_nolock_(struct event *ev);
+
+void event_active_nolock_(struct event *ev, int res, short count);
+int event_callback_activate_(struct event_base *, struct event_callback *);
+int event_callback_activate_nolock_(struct event_base *, struct event_callback *);
+int event_callback_cancel_(struct event_base *base,
+ struct event_callback *evcb);
+
+void event_callback_finalize_nolock_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
+void event_callback_finalize_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *));
+int event_callback_finalize_many_(struct event_base *base, int n_cbs, struct event_callback **evcb, void (*cb)(struct event_callback *, void *));
+
+
+void event_active_later_(struct event *ev, int res);
+void event_active_later_nolock_(struct event *ev, int res);
+void event_callback_activate_later_nolock_(struct event_base *base,
+ struct event_callback *evcb);
+int event_callback_cancel_nolock_(struct event_base *base,
+ struct event_callback *evcb, int even_if_finalizing);
+void event_callback_init_(struct event_base *base,
+ struct event_callback *cb);
+
+/* FIXME document. */
+void event_base_add_virtual_(struct event_base *base);
+void event_base_del_virtual_(struct event_base *base);
+
+/** For debugging: unless assertions are disabled, verify the referential
+ integrity of the internal data structures of 'base'. This operation can
+ be expensive.
+
+ Returns on success; aborts on failure.
+*/
+void event_base_assert_ok_(struct event_base *base);
+void event_base_assert_ok_nolock_(struct event_base *base);
+
+
+/* Helper function: Call 'fn' exactly once every inserted or active event in
+ * the event_base 'base'.
+ *
+ * If fn returns 0, continue on to the next event. Otherwise, return the same
+ * value that fn returned.
+ *
+ * Requires that 'base' be locked.
+ */
+int event_base_foreach_event_nolock_(struct event_base *base,
+ event_base_foreach_event_cb cb, void *arg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/event.c b/sntp/libevent/event.c
new file mode 100644
index 000000000000..01f0e14226c9
--- /dev/null
+++ b/sntp/libevent/event.c
@@ -0,0 +1,3862 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+#include <sys/types.h>
+#if !defined(_WIN32) && defined(EVENT__HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <ctype.h>
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <limits.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/event_compat.h"
+#include "event-internal.h"
+#include "defer-internal.h"
+#include "evthread-internal.h"
+#include "event2/thread.h"
+#include "event2/util.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "iocp-internal.h"
+#include "changelist-internal.h"
+#define HT_NO_CACHE_HASH_VALUES
+#include "ht-internal.h"
+#include "util-internal.h"
+
+
+#ifdef EVENT__HAVE_WORKING_KQUEUE
+#include "kqueue-internal.h"
+#endif
+
+#ifdef EVENT__HAVE_EVENT_PORTS
+extern const struct eventop evportops;
+#endif
+#ifdef EVENT__HAVE_SELECT
+extern const struct eventop selectops;
+#endif
+#ifdef EVENT__HAVE_POLL
+extern const struct eventop pollops;
+#endif
+#ifdef EVENT__HAVE_EPOLL
+extern const struct eventop epollops;
+#endif
+#ifdef EVENT__HAVE_WORKING_KQUEUE
+extern const struct eventop kqops;
+#endif
+#ifdef EVENT__HAVE_DEVPOLL
+extern const struct eventop devpollops;
+#endif
+#ifdef _WIN32
+extern const struct eventop win32ops;
+#endif
+
+/* Array of backends in order of preference. */
+static const struct eventop *eventops[] = {
+#ifdef EVENT__HAVE_EVENT_PORTS
+ &evportops,
+#endif
+#ifdef EVENT__HAVE_WORKING_KQUEUE
+ &kqops,
+#endif
+#ifdef EVENT__HAVE_EPOLL
+ &epollops,
+#endif
+#ifdef EVENT__HAVE_DEVPOLL
+ &devpollops,
+#endif
+#ifdef EVENT__HAVE_POLL
+ &pollops,
+#endif
+#ifdef EVENT__HAVE_SELECT
+ &selectops,
+#endif
+#ifdef _WIN32
+ &win32ops,
+#endif
+ NULL
+};
+
+/* Global state; deprecated */
+struct event_base *event_global_current_base_ = NULL;
+#define current_base event_global_current_base_
+
+/* Global state */
+
+static void *event_self_cbarg_ptr_ = NULL;
+
+/* Prototypes */
+static void event_queue_insert_active(struct event_base *, struct event_callback *);
+static void event_queue_insert_active_later(struct event_base *, struct event_callback *);
+static void event_queue_insert_timeout(struct event_base *, struct event *);
+static void event_queue_insert_inserted(struct event_base *, struct event *);
+static void event_queue_remove_active(struct event_base *, struct event_callback *);
+static void event_queue_remove_active_later(struct event_base *, struct event_callback *);
+static void event_queue_remove_timeout(struct event_base *, struct event *);
+static void event_queue_remove_inserted(struct event_base *, struct event *);
+static void event_queue_make_later_events_active(struct event_base *base);
+
+static int evthread_make_base_notifiable_nolock_(struct event_base *base);
+static int event_del_(struct event *ev, int blocking);
+
+#ifdef USE_REINSERT_TIMEOUT
+/* This code seems buggy; only turn it on if we find out what the trouble is. */
+static void event_queue_reinsert_timeout(struct event_base *,struct event *, int was_common, int is_common, int old_timeout_idx);
+#endif
+
+static int event_haveevents(struct event_base *);
+
+static int event_process_active(struct event_base *);
+
+static int timeout_next(struct event_base *, struct timeval **);
+static void timeout_process(struct event_base *);
+
+static inline void event_signal_closure(struct event_base *, struct event *ev);
+static inline void event_persist_closure(struct event_base *, struct event *ev);
+
+static int evthread_notify_base(struct event_base *base);
+
+static void insert_common_timeout_inorder(struct common_timeout_list *ctl,
+ struct event *ev);
+
+#ifndef EVENT__DISABLE_DEBUG_MODE
+/* These functions implement a hashtable of which 'struct event *' structures
+ * have been setup or added. We don't want to trust the content of the struct
+ * event itself, since we're trying to work through cases where an event gets
+ * clobbered or freed. Instead, we keep a hashtable indexed by the pointer.
+ */
+
+struct event_debug_entry {
+ HT_ENTRY(event_debug_entry) node;
+ const struct event *ptr;
+ unsigned added : 1;
+};
+
+static inline unsigned
+hash_debug_entry(const struct event_debug_entry *e)
+{
+ /* We need to do this silliness to convince compilers that we
+ * honestly mean to cast e->ptr to an integer, and discard any
+ * part of it that doesn't fit in an unsigned.
+ */
+ unsigned u = (unsigned) ((ev_uintptr_t) e->ptr);
+ /* Our hashtable implementation is pretty sensitive to low bits,
+ * and every struct event is over 64 bytes in size, so we can
+ * just say >>6. */
+ return (u >> 6);
+}
+
+static inline int
+eq_debug_entry(const struct event_debug_entry *a,
+ const struct event_debug_entry *b)
+{
+ return a->ptr == b->ptr;
+}
+
+int event_debug_mode_on_ = 0;
+/* Set if it's too late to enable event_debug_mode. */
+static int event_debug_mode_too_late = 0;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+static void *event_debug_map_lock_ = NULL;
+#endif
+static HT_HEAD(event_debug_map, event_debug_entry) global_debug_map =
+ HT_INITIALIZER();
+
+HT_PROTOTYPE(event_debug_map, event_debug_entry, node, hash_debug_entry,
+ eq_debug_entry)
+HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
+ eq_debug_entry, 0.5, mm_malloc, mm_realloc, mm_free)
+
+/* Macro: record that ev is now setup (that is, ready for an add) */
+#define event_debug_note_setup_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 0; \
+ } else { \
+ dent = mm_malloc(sizeof(*dent)); \
+ if (!dent) \
+ event_err(1, \
+ "Out of memory in debugging code"); \
+ dent->ptr = (ev); \
+ dent->added = 0; \
+ HT_INSERT(event_debug_map, &global_debug_map, dent); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: record that ev is no longer setup */
+#define event_debug_note_teardown_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_REMOVE(event_debug_map, &global_debug_map, &find); \
+ if (dent) \
+ mm_free(dent); \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: record that ev is now added */
+#define event_debug_note_add_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 1; \
+ } else { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s: noting an add on a non-setup event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT \
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: record that ev is no longer added */
+#define event_debug_note_del_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent) { \
+ dent->added = 0; \
+ } else { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s: noting a del on a non-setup event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT \
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ event_debug_mode_too_late = 1; \
+ } while (0)
+/* Macro: assert that ev is setup (i.e., okay to add or inspect) */
+#define event_debug_assert_is_setup_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (!dent) { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s called on a non-initialized event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT\
+ ", flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ } while (0)
+/* Macro: assert that ev is not added (i.e., okay to tear down or set
+ * up again) */
+#define event_debug_assert_not_added_(ev) do { \
+ if (event_debug_mode_on_) { \
+ struct event_debug_entry *dent,find; \
+ find.ptr = (ev); \
+ EVLOCK_LOCK(event_debug_map_lock_, 0); \
+ dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
+ if (dent && dent->added) { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s called on an already added event %p" \
+ " (events: 0x%x, fd: "EV_SOCK_FMT", " \
+ "flags: 0x%x)", \
+ __func__, (ev), (ev)->ev_events, \
+ EV_SOCK_ARG((ev)->ev_fd), (ev)->ev_flags); \
+ } \
+ EVLOCK_UNLOCK(event_debug_map_lock_, 0); \
+ } \
+ } while (0)
+#else
+#define event_debug_note_setup_(ev) \
+ ((void)0)
+#define event_debug_note_teardown_(ev) \
+ ((void)0)
+#define event_debug_note_add_(ev) \
+ ((void)0)
+#define event_debug_note_del_(ev) \
+ ((void)0)
+#define event_debug_assert_is_setup_(ev) \
+ ((void)0)
+#define event_debug_assert_not_added_(ev) \
+ ((void)0)
+#endif
+
+#define EVENT_BASE_ASSERT_LOCKED(base) \
+ EVLOCK_ASSERT_LOCKED((base)->th_base_lock)
+
+/* How often (in seconds) do we check for changes in wall clock time relative
+ * to monotonic time? Set this to -1 for 'never.' */
+#define CLOCK_SYNC_INTERVAL 5
+
+/** Set 'tp' to the current time according to 'base'. We must hold the lock
+ * on 'base'. If there is a cached time, return it. Otherwise, use
+ * clock_gettime or gettimeofday as appropriate to find out the right time.
+ * Return 0 on success, -1 on failure.
+ */
+static int
+gettime(struct event_base *base, struct timeval *tp)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (base->tv_cache.tv_sec) {
+ *tp = base->tv_cache;
+ return (0);
+ }
+
+ if (evutil_gettime_monotonic_(&base->monotonic_timer, tp) == -1) {
+ return -1;
+ }
+
+ if (base->last_updated_clock_diff + CLOCK_SYNC_INTERVAL
+ < tp->tv_sec) {
+ struct timeval tv;
+ evutil_gettimeofday(&tv,NULL);
+ evutil_timersub(&tv, tp, &base->tv_clock_diff);
+ base->last_updated_clock_diff = tp->tv_sec;
+ }
+
+ return 0;
+}
+
+int
+event_base_gettimeofday_cached(struct event_base *base, struct timeval *tv)
+{
+ int r;
+ if (!base) {
+ base = current_base;
+ if (!current_base)
+ return evutil_gettimeofday(tv, NULL);
+ }
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (base->tv_cache.tv_sec == 0) {
+ r = evutil_gettimeofday(tv, NULL);
+ } else {
+ evutil_timeradd(&base->tv_cache, &base->tv_clock_diff, tv);
+ r = 0;
+ }
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+/** Make 'base' have no current cached time. */
+static inline void
+clear_time_cache(struct event_base *base)
+{
+ base->tv_cache.tv_sec = 0;
+}
+
+/** Replace the cached time in 'base' with the current time. */
+static inline void
+update_time_cache(struct event_base *base)
+{
+ base->tv_cache.tv_sec = 0;
+ if (!(base->flags & EVENT_BASE_FLAG_NO_CACHE_TIME))
+ gettime(base, &base->tv_cache);
+}
+
+int
+event_base_update_cache_time(struct event_base *base)
+{
+
+ if (!base) {
+ base = current_base;
+ if (!current_base)
+ return -1;
+ }
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (base->running_loop)
+ update_time_cache(base);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return 0;
+}
+
+static inline struct event *
+event_callback_to_event(struct event_callback *evcb)
+{
+ EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_INIT));
+ return EVUTIL_UPCAST(evcb, struct event, ev_evcallback);
+}
+
+static inline struct event_callback *
+event_to_event_callback(struct event *ev)
+{
+ return &ev->ev_evcallback;
+}
+
+struct event_base *
+event_init(void)
+{
+ struct event_base *base = event_base_new_with_config(NULL);
+
+ if (base == NULL) {
+ event_errx(1, "%s: Unable to construct event_base", __func__);
+ return NULL;
+ }
+
+ current_base = base;
+
+ return (base);
+}
+
+struct event_base *
+event_base_new(void)
+{
+ struct event_base *base = NULL;
+ struct event_config *cfg = event_config_new();
+ if (cfg) {
+ base = event_base_new_with_config(cfg);
+ event_config_free(cfg);
+ }
+ return base;
+}
+
+/** Return true iff 'method' is the name of a method that 'cfg' tells us to
+ * avoid. */
+static int
+event_config_is_avoided_method(const struct event_config *cfg,
+ const char *method)
+{
+ struct event_config_entry *entry;
+
+ TAILQ_FOREACH(entry, &cfg->entries, next) {
+ if (entry->avoid_method != NULL &&
+ strcmp(entry->avoid_method, method) == 0)
+ return (1);
+ }
+
+ return (0);
+}
+
+/** Return true iff 'method' is disabled according to the environment. */
+static int
+event_is_method_disabled(const char *name)
+{
+ char environment[64];
+ int i;
+
+ evutil_snprintf(environment, sizeof(environment), "EVENT_NO%s", name);
+ for (i = 8; environment[i] != '\0'; ++i)
+ environment[i] = EVUTIL_TOUPPER_(environment[i]);
+ /* Note that evutil_getenv_() ignores the environment entirely if
+ * we're setuid */
+ return (evutil_getenv_(environment) != NULL);
+}
+
+int
+event_base_get_features(const struct event_base *base)
+{
+ return base->evsel->features;
+}
+
+void
+event_enable_debug_mode(void)
+{
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_mode_on_)
+ event_errx(1, "%s was called twice!", __func__);
+ if (event_debug_mode_too_late)
+ event_errx(1, "%s must be called *before* creating any events "
+ "or event_bases",__func__);
+
+ event_debug_mode_on_ = 1;
+
+ HT_INIT(event_debug_map, &global_debug_map);
+#endif
+}
+
+#if 0
+void
+event_disable_debug_mode(void)
+{
+ struct event_debug_entry **ent, *victim;
+
+ EVLOCK_LOCK(event_debug_map_lock_, 0);
+ for (ent = HT_START(event_debug_map, &global_debug_map); ent; ) {
+ victim = *ent;
+ ent = HT_NEXT_RMV(event_debug_map,&global_debug_map, ent);
+ mm_free(victim);
+ }
+ HT_CLEAR(event_debug_map, &global_debug_map);
+ EVLOCK_UNLOCK(event_debug_map_lock_ , 0);
+}
+#endif
+
+struct event_base *
+event_base_new_with_config(const struct event_config *cfg)
+{
+ int i;
+ struct event_base *base;
+ int should_check_environment;
+
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ event_debug_mode_too_late = 1;
+#endif
+
+ if ((base = mm_calloc(1, sizeof(struct event_base))) == NULL) {
+ event_warn("%s: calloc", __func__);
+ return NULL;
+ }
+
+ if (cfg)
+ base->flags = cfg->flags;
+
+ should_check_environment =
+ !(cfg && (cfg->flags & EVENT_BASE_FLAG_IGNORE_ENV));
+
+ {
+ struct timeval tmp;
+ int precise_time =
+ cfg && (cfg->flags & EVENT_BASE_FLAG_PRECISE_TIMER);
+ int flags;
+ if (should_check_environment && !precise_time) {
+ precise_time = evutil_getenv_("EVENT_PRECISE_TIMER") != NULL;
+ base->flags |= EVENT_BASE_FLAG_PRECISE_TIMER;
+ }
+ flags = precise_time ? EV_MONOT_PRECISE : 0;
+ evutil_configure_monotonic_time_(&base->monotonic_timer, flags);
+
+ gettime(base, &tmp);
+ }
+
+ min_heap_ctor_(&base->timeheap);
+
+ base->sig.ev_signal_pair[0] = -1;
+ base->sig.ev_signal_pair[1] = -1;
+ base->th_notify_fd[0] = -1;
+ base->th_notify_fd[1] = -1;
+
+ TAILQ_INIT(&base->active_later_queue);
+
+ evmap_io_initmap_(&base->io);
+ evmap_signal_initmap_(&base->sigmap);
+ event_changelist_init_(&base->changelist);
+
+ base->evbase = NULL;
+
+ if (cfg) {
+ memcpy(&base->max_dispatch_time,
+ &cfg->max_dispatch_interval, sizeof(struct timeval));
+ base->limit_callbacks_after_prio =
+ cfg->limit_callbacks_after_prio;
+ } else {
+ base->max_dispatch_time.tv_sec = -1;
+ base->limit_callbacks_after_prio = 1;
+ }
+ if (cfg && cfg->max_dispatch_callbacks >= 0) {
+ base->max_dispatch_callbacks = cfg->max_dispatch_callbacks;
+ } else {
+ base->max_dispatch_callbacks = INT_MAX;
+ }
+ if (base->max_dispatch_callbacks == INT_MAX &&
+ base->max_dispatch_time.tv_sec == -1)
+ base->limit_callbacks_after_prio = INT_MAX;
+
+ for (i = 0; eventops[i] && !base->evbase; i++) {
+ if (cfg != NULL) {
+ /* determine if this backend should be avoided */
+ if (event_config_is_avoided_method(cfg,
+ eventops[i]->name))
+ continue;
+ if ((eventops[i]->features & cfg->require_features)
+ != cfg->require_features)
+ continue;
+ }
+
+ /* also obey the environment variables */
+ if (should_check_environment &&
+ event_is_method_disabled(eventops[i]->name))
+ continue;
+
+ base->evsel = eventops[i];
+
+ base->evbase = base->evsel->init(base);
+ }
+
+ if (base->evbase == NULL) {
+ event_warnx("%s: no event mechanism available",
+ __func__);
+ base->evsel = NULL;
+ event_base_free(base);
+ return NULL;
+ }
+
+ if (evutil_getenv_("EVENT_SHOW_METHOD"))
+ event_msgx("libevent using: %s", base->evsel->name);
+
+ /* allocate a single active event queue */
+ if (event_base_priority_init(base, 1) < 0) {
+ event_base_free(base);
+ return NULL;
+ }
+
+ /* prepare for threading */
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (EVTHREAD_LOCKING_ENABLED() &&
+ (!cfg || !(cfg->flags & EVENT_BASE_FLAG_NOLOCK))) {
+ int r;
+ EVTHREAD_ALLOC_LOCK(base->th_base_lock, 0);
+ EVTHREAD_ALLOC_COND(base->current_event_cond);
+ r = evthread_make_base_notifiable(base);
+ if (r<0) {
+ event_warnx("%s: Unable to make base notifiable.", __func__);
+ event_base_free(base);
+ return NULL;
+ }
+ }
+#endif
+
+#ifdef _WIN32
+ if (cfg && (cfg->flags & EVENT_BASE_FLAG_STARTUP_IOCP))
+ event_base_start_iocp_(base, cfg->n_cpus_hint);
+#endif
+
+ return (base);
+}
+
+int
+event_base_start_iocp_(struct event_base *base, int n_cpus)
+{
+#ifdef _WIN32
+ if (base->iocp)
+ return 0;
+ base->iocp = event_iocp_port_launch_(n_cpus);
+ if (!base->iocp) {
+ event_warnx("%s: Couldn't launch IOCP", __func__);
+ return -1;
+ }
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+void
+event_base_stop_iocp_(struct event_base *base)
+{
+#ifdef _WIN32
+ int rv;
+
+ if (!base->iocp)
+ return;
+ rv = event_iocp_shutdown_(base->iocp, -1);
+ EVUTIL_ASSERT(rv >= 0);
+ base->iocp = NULL;
+#endif
+}
+
+static int
+event_base_cancel_single_callback_(struct event_base *base,
+ struct event_callback *evcb,
+ int run_finalizers)
+{
+ int result = 0;
+
+ if (evcb->evcb_flags & EVLIST_INIT) {
+ struct event *ev = event_callback_to_event(evcb);
+ if (!(ev->ev_flags & EVLIST_INTERNAL)) {
+ event_del_(ev, EVENT_DEL_EVEN_IF_FINALIZING);
+ result = 1;
+ }
+ } else {
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ event_callback_cancel_nolock_(base, evcb, 1);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ result = 1;
+ }
+
+ if (run_finalizers && (evcb->evcb_flags & EVLIST_FINALIZING)) {
+ switch (evcb->evcb_closure) {
+ case EV_CLOSURE_EVENT_FINALIZE:
+ case EV_CLOSURE_EVENT_FINALIZE_FREE: {
+ struct event *ev = event_callback_to_event(evcb);
+ ev->ev_evcallback.evcb_cb_union.evcb_evfinalize(ev, ev->ev_arg);
+ if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
+ mm_free(ev);
+ break;
+ }
+ case EV_CLOSURE_CB_FINALIZE:
+ evcb->evcb_cb_union.evcb_cbfinalize(evcb, evcb->evcb_arg);
+ break;
+ default:
+ break;
+ }
+ }
+ return result;
+}
+
+static void
+event_base_free_(struct event_base *base, int run_finalizers)
+{
+ int i, n_deleted=0;
+ struct event *ev;
+ /* XXXX grab the lock? If there is contention when one thread frees
+ * the base, then the contending thread will be very sad soon. */
+
+ /* event_base_free(NULL) is how to free the current_base if we
+ * made it with event_init and forgot to hold a reference to it. */
+ if (base == NULL && current_base)
+ base = current_base;
+ /* Don't actually free NULL. */
+ if (base == NULL) {
+ event_warnx("%s: no base to free", __func__);
+ return;
+ }
+ /* XXX(niels) - check for internal events first */
+
+#ifdef _WIN32
+ event_base_stop_iocp_(base);
+#endif
+
+ /* threading fds if we have them */
+ if (base->th_notify_fd[0] != -1) {
+ event_del(&base->th_notify);
+ EVUTIL_CLOSESOCKET(base->th_notify_fd[0]);
+ if (base->th_notify_fd[1] != -1)
+ EVUTIL_CLOSESOCKET(base->th_notify_fd[1]);
+ base->th_notify_fd[0] = -1;
+ base->th_notify_fd[1] = -1;
+ event_debug_unassign(&base->th_notify);
+ }
+
+ /* Delete all non-internal events. */
+ evmap_delete_all_(base);
+
+ while ((ev = min_heap_top_(&base->timeheap)) != NULL) {
+ event_del(ev);
+ ++n_deleted;
+ }
+ for (i = 0; i < base->n_common_timeouts; ++i) {
+ struct common_timeout_list *ctl =
+ base->common_timeout_queues[i];
+ event_del(&ctl->timeout_event); /* Internal; doesn't count */
+ event_debug_unassign(&ctl->timeout_event);
+ for (ev = TAILQ_FIRST(&ctl->events); ev; ) {
+ struct event *next = TAILQ_NEXT(ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+ if (!(ev->ev_flags & EVLIST_INTERNAL)) {
+ event_del(ev);
+ ++n_deleted;
+ }
+ ev = next;
+ }
+ mm_free(ctl);
+ }
+ if (base->common_timeout_queues)
+ mm_free(base->common_timeout_queues);
+
+ for (i = 0; i < base->nactivequeues; ++i) {
+ struct event_callback *evcb, *next;
+ for (evcb = TAILQ_FIRST(&base->activequeues[i]); evcb; ) {
+ next = TAILQ_NEXT(evcb, evcb_active_next);
+ n_deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
+ evcb = next;
+ }
+ }
+ {
+ struct event_callback *evcb;
+ while ((evcb = TAILQ_FIRST(&base->active_later_queue))) {
+ n_deleted += event_base_cancel_single_callback_(base, evcb, run_finalizers);
+ }
+ }
+
+
+ if (n_deleted)
+ event_debug(("%s: %d events were still set in base",
+ __func__, n_deleted));
+
+ while (LIST_FIRST(&base->once_events)) {
+ struct event_once *eonce = LIST_FIRST(&base->once_events);
+ LIST_REMOVE(eonce, next_once);
+ mm_free(eonce);
+ }
+
+ if (base->evsel != NULL && base->evsel->dealloc != NULL)
+ base->evsel->dealloc(base);
+
+ for (i = 0; i < base->nactivequeues; ++i)
+ EVUTIL_ASSERT(TAILQ_EMPTY(&base->activequeues[i]));
+
+ EVUTIL_ASSERT(min_heap_empty_(&base->timeheap));
+ min_heap_dtor_(&base->timeheap);
+
+ mm_free(base->activequeues);
+
+ evmap_io_clear_(&base->io);
+ evmap_signal_clear_(&base->sigmap);
+ event_changelist_freemem_(&base->changelist);
+
+ EVTHREAD_FREE_LOCK(base->th_base_lock, 0);
+ EVTHREAD_FREE_COND(base->current_event_cond);
+
+ /* If we're freeing current_base, there won't be a current_base. */
+ if (base == current_base)
+ current_base = NULL;
+ mm_free(base);
+}
+
+void
+event_base_free_nofinalize(struct event_base *base)
+{
+ event_base_free_(base, 0);
+}
+
+void
+event_base_free(struct event_base *base)
+{
+ event_base_free_(base, 1);
+}
+
+/* Fake eventop; used to disable the backend temporarily inside event_reinit
+ * so that we can call event_del() on an event without telling the backend.
+ */
+static int
+nil_backend_del(struct event_base *b, evutil_socket_t fd, short old,
+ short events, void *fdinfo)
+{
+ return 0;
+}
+const struct eventop nil_eventop = {
+ "nil",
+ NULL, /* init: unused. */
+ NULL, /* add: unused. */
+ nil_backend_del, /* del: used, so needs to be killed. */
+ NULL, /* dispatch: unused. */
+ NULL, /* dealloc: unused. */
+ 0, 0, 0
+};
+
+/* reinitialize the event base after a fork */
+int
+event_reinit(struct event_base *base)
+{
+ const struct eventop *evsel;
+ int res = 0;
+ int was_notifiable = 0;
+ int had_signal_added = 0;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ evsel = base->evsel;
+
+ /* check if this event mechanism requires reinit on the backend */
+ if (evsel->need_reinit) {
+ /* We're going to call event_del() on our notify events (the
+ * ones that tell about signals and wakeup events). But we
+ * don't actually want to tell the backend to change its
+ * state, since it might still share some resource (a kqueue,
+ * an epoll fd) with the parent process, and we don't want to
+ * delete the fds from _that_ backend, we temporarily stub out
+ * the evsel with a replacement.
+ */
+ base->evsel = &nil_eventop;
+ }
+
+ /* We need to re-create a new signal-notification fd and a new
+ * thread-notification fd. Otherwise, we'll still share those with
+ * the parent process, which would make any notification sent to them
+ * get received by one or both of the event loops, more or less at
+ * random.
+ */
+ if (base->sig.ev_signal_added) {
+ event_del_nolock_(&base->sig.ev_signal, EVENT_DEL_AUTOBLOCK);
+ event_debug_unassign(&base->sig.ev_signal);
+ memset(&base->sig.ev_signal, 0, sizeof(base->sig.ev_signal));
+ if (base->sig.ev_signal_pair[0] != -1)
+ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
+ if (base->sig.ev_signal_pair[1] != -1)
+ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
+ had_signal_added = 1;
+ base->sig.ev_signal_added = 0;
+ }
+ if (base->th_notify_fn != NULL) {
+ was_notifiable = 1;
+ base->th_notify_fn = NULL;
+ }
+ if (base->th_notify_fd[0] != -1) {
+ event_del_nolock_(&base->th_notify, EVENT_DEL_AUTOBLOCK);
+ EVUTIL_CLOSESOCKET(base->th_notify_fd[0]);
+ if (base->th_notify_fd[1] != -1)
+ EVUTIL_CLOSESOCKET(base->th_notify_fd[1]);
+ base->th_notify_fd[0] = -1;
+ base->th_notify_fd[1] = -1;
+ event_debug_unassign(&base->th_notify);
+ }
+
+ /* Replace the original evsel. */
+ base->evsel = evsel;
+
+ if (evsel->need_reinit) {
+ /* Reconstruct the backend through brute-force, so that we do
+ * not share any structures with the parent process. For some
+ * backends, this is necessary: epoll and kqueue, for
+ * instance, have events associated with a kernel
+ * structure. If didn't reinitialize, we'd share that
+ * structure with the parent process, and any changes made by
+ * the parent would affect our backend's behavior (and vice
+ * versa).
+ */
+ if (base->evsel->dealloc != NULL)
+ base->evsel->dealloc(base);
+ base->evbase = evsel->init(base);
+ if (base->evbase == NULL) {
+ event_errx(1,
+ "%s: could not reinitialize event mechanism",
+ __func__);
+ res = -1;
+ goto done;
+ }
+
+ /* Empty out the changelist (if any): we are starting from a
+ * blank slate. */
+ event_changelist_freemem_(&base->changelist);
+
+ /* Tell the event maps to re-inform the backend about all
+ * pending events. This will make the signal notification
+ * event get re-created if necessary. */
+ if (evmap_reinit_(base) < 0)
+ res = -1;
+ } else {
+ if (had_signal_added)
+ res = evsig_init_(base);
+ }
+
+ /* If we were notifiable before, and nothing just exploded, become
+ * notifiable again. */
+ if (was_notifiable && res == 0)
+ res = evthread_make_base_notifiable_nolock_(base);
+
+done:
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return (res);
+}
+
+const char **
+event_get_supported_methods(void)
+{
+ static const char **methods = NULL;
+ const struct eventop **method;
+ const char **tmp;
+ int i = 0, k;
+
+ /* count all methods */
+ for (method = &eventops[0]; *method != NULL; ++method) {
+ ++i;
+ }
+
+ /* allocate one more than we need for the NULL pointer */
+ tmp = mm_calloc((i + 1), sizeof(char *));
+ if (tmp == NULL)
+ return (NULL);
+
+ /* populate the array with the supported methods */
+ for (k = 0, i = 0; eventops[k] != NULL; ++k) {
+ tmp[i++] = eventops[k]->name;
+ }
+ tmp[i] = NULL;
+
+ if (methods != NULL)
+ mm_free((char**)methods);
+
+ methods = tmp;
+
+ return (methods);
+}
+
+struct event_config *
+event_config_new(void)
+{
+ struct event_config *cfg = mm_calloc(1, sizeof(*cfg));
+
+ if (cfg == NULL)
+ return (NULL);
+
+ TAILQ_INIT(&cfg->entries);
+ cfg->max_dispatch_interval.tv_sec = -1;
+ cfg->max_dispatch_callbacks = INT_MAX;
+ cfg->limit_callbacks_after_prio = 1;
+
+ return (cfg);
+}
+
+static void
+event_config_entry_free(struct event_config_entry *entry)
+{
+ if (entry->avoid_method != NULL)
+ mm_free((char *)entry->avoid_method);
+ mm_free(entry);
+}
+
+void
+event_config_free(struct event_config *cfg)
+{
+ struct event_config_entry *entry;
+
+ while ((entry = TAILQ_FIRST(&cfg->entries)) != NULL) {
+ TAILQ_REMOVE(&cfg->entries, entry, next);
+ event_config_entry_free(entry);
+ }
+ mm_free(cfg);
+}
+
+int
+event_config_set_flag(struct event_config *cfg, int flag)
+{
+ if (!cfg)
+ return -1;
+ cfg->flags |= flag;
+ return 0;
+}
+
+int
+event_config_avoid_method(struct event_config *cfg, const char *method)
+{
+ struct event_config_entry *entry = mm_malloc(sizeof(*entry));
+ if (entry == NULL)
+ return (-1);
+
+ if ((entry->avoid_method = mm_strdup(method)) == NULL) {
+ mm_free(entry);
+ return (-1);
+ }
+
+ TAILQ_INSERT_TAIL(&cfg->entries, entry, next);
+
+ return (0);
+}
+
+int
+event_config_require_features(struct event_config *cfg,
+ int features)
+{
+ if (!cfg)
+ return (-1);
+ cfg->require_features = features;
+ return (0);
+}
+
+int
+event_config_set_num_cpus_hint(struct event_config *cfg, int cpus)
+{
+ if (!cfg)
+ return (-1);
+ cfg->n_cpus_hint = cpus;
+ return (0);
+}
+
+int
+event_config_set_max_dispatch_interval(struct event_config *cfg,
+ const struct timeval *max_interval, int max_callbacks, int min_priority)
+{
+ if (max_interval)
+ memcpy(&cfg->max_dispatch_interval, max_interval,
+ sizeof(struct timeval));
+ else
+ cfg->max_dispatch_interval.tv_sec = -1;
+ cfg->max_dispatch_callbacks =
+ max_callbacks >= 0 ? max_callbacks : INT_MAX;
+ if (min_priority < 0)
+ min_priority = 0;
+ cfg->limit_callbacks_after_prio = min_priority;
+ return (0);
+}
+
+int
+event_priority_init(int npriorities)
+{
+ return event_base_priority_init(current_base, npriorities);
+}
+
+int
+event_base_priority_init(struct event_base *base, int npriorities)
+{
+ int i, r;
+ r = -1;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (N_ACTIVE_CALLBACKS(base) || npriorities < 1
+ || npriorities >= EVENT_MAX_PRIORITIES)
+ goto err;
+
+ if (npriorities == base->nactivequeues)
+ goto ok;
+
+ if (base->nactivequeues) {
+ mm_free(base->activequeues);
+ base->nactivequeues = 0;
+ }
+
+ /* Allocate our priority queues */
+ base->activequeues = (struct evcallback_list *)
+ mm_calloc(npriorities, sizeof(struct evcallback_list));
+ if (base->activequeues == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto err;
+ }
+ base->nactivequeues = npriorities;
+
+ for (i = 0; i < base->nactivequeues; ++i) {
+ TAILQ_INIT(&base->activequeues[i]);
+ }
+
+ok:
+ r = 0;
+err:
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return (r);
+}
+
+int
+event_base_get_npriorities(struct event_base *base)
+{
+
+ int n;
+ if (base == NULL)
+ base = current_base;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ n = base->nactivequeues;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return (n);
+}
+
+int
+event_base_get_num_events(struct event_base *base, unsigned int type)
+{
+ int r = 0;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (type & EVENT_BASE_COUNT_ACTIVE)
+ r += base->event_count_active;
+
+ if (type & EVENT_BASE_COUNT_VIRTUAL)
+ r += base->virtual_event_count;
+
+ if (type & EVENT_BASE_COUNT_ADDED)
+ r += base->event_count;
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ return r;
+}
+
+int
+event_base_get_max_events(struct event_base *base, unsigned int type, int clear)
+{
+ int r = 0;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (type & EVENT_BASE_COUNT_ACTIVE) {
+ r += base->event_count_active_max;
+ if (clear)
+ base->event_count_active_max = 0;
+ }
+
+ if (type & EVENT_BASE_COUNT_VIRTUAL) {
+ r += base->virtual_event_count_max;
+ if (clear)
+ base->virtual_event_count_max = 0;
+ }
+
+ if (type & EVENT_BASE_COUNT_ADDED) {
+ r += base->event_count_max;
+ if (clear)
+ base->event_count_max = 0;
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ return r;
+}
+
+/* Returns true iff we're currently watching any events. */
+static int
+event_haveevents(struct event_base *base)
+{
+ /* Caller must hold th_base_lock */
+ return (base->virtual_event_count > 0 || base->event_count > 0);
+}
+
+/* "closure" function called when processing active signal events */
+static inline void
+event_signal_closure(struct event_base *base, struct event *ev)
+{
+ short ncalls;
+ int should_break;
+
+ /* Allows deletes to work */
+ ncalls = ev->ev_ncalls;
+ if (ncalls != 0)
+ ev->ev_pncalls = &ncalls;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ while (ncalls) {
+ ncalls--;
+ ev->ev_ncalls = ncalls;
+ if (ncalls == 0)
+ ev->ev_pncalls = NULL;
+ (*ev->ev_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ should_break = base->event_break;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ if (should_break) {
+ if (ncalls != 0)
+ ev->ev_pncalls = NULL;
+ return;
+ }
+ }
+}
+
+/* Common timeouts are special timeouts that are handled as queues rather than
+ * in the minheap. This is more efficient than the minheap if we happen to
+ * know that we're going to get several thousands of timeout events all with
+ * the same timeout value.
+ *
+ * Since all our timeout handling code assumes timevals can be copied,
+ * assigned, etc, we can't use "magic pointer" to encode these common
+ * timeouts. Searching through a list to see if every timeout is common could
+ * also get inefficient. Instead, we take advantage of the fact that tv_usec
+ * is 32 bits long, but only uses 20 of those bits (since it can never be over
+ * 999999.) We use the top bits to encode 4 bites of magic number, and 8 bits
+ * of index into the event_base's aray of common timeouts.
+ */
+
+#define MICROSECONDS_MASK COMMON_TIMEOUT_MICROSECONDS_MASK
+#define COMMON_TIMEOUT_IDX_MASK 0x0ff00000
+#define COMMON_TIMEOUT_IDX_SHIFT 20
+#define COMMON_TIMEOUT_MASK 0xf0000000
+#define COMMON_TIMEOUT_MAGIC 0x50000000
+
+#define COMMON_TIMEOUT_IDX(tv) \
+ (((tv)->tv_usec & COMMON_TIMEOUT_IDX_MASK)>>COMMON_TIMEOUT_IDX_SHIFT)
+
+/** Return true iff if 'tv' is a common timeout in 'base' */
+static inline int
+is_common_timeout(const struct timeval *tv,
+ const struct event_base *base)
+{
+ int idx;
+ if ((tv->tv_usec & COMMON_TIMEOUT_MASK) != COMMON_TIMEOUT_MAGIC)
+ return 0;
+ idx = COMMON_TIMEOUT_IDX(tv);
+ return idx < base->n_common_timeouts;
+}
+
+/* True iff tv1 and tv2 have the same common-timeout index, or if neither
+ * one is a common timeout. */
+static inline int
+is_same_common_timeout(const struct timeval *tv1, const struct timeval *tv2)
+{
+ return (tv1->tv_usec & ~MICROSECONDS_MASK) ==
+ (tv2->tv_usec & ~MICROSECONDS_MASK);
+}
+
+/** Requires that 'tv' is a common timeout. Return the corresponding
+ * common_timeout_list. */
+static inline struct common_timeout_list *
+get_common_timeout_list(struct event_base *base, const struct timeval *tv)
+{
+ return base->common_timeout_queues[COMMON_TIMEOUT_IDX(tv)];
+}
+
+#if 0
+static inline int
+common_timeout_ok(const struct timeval *tv,
+ struct event_base *base)
+{
+ const struct timeval *expect =
+ &get_common_timeout_list(base, tv)->duration;
+ return tv->tv_sec == expect->tv_sec &&
+ tv->tv_usec == expect->tv_usec;
+}
+#endif
+
+/* Add the timeout for the first event in given common timeout list to the
+ * event_base's minheap. */
+static void
+common_timeout_schedule(struct common_timeout_list *ctl,
+ const struct timeval *now, struct event *head)
+{
+ struct timeval timeout = head->ev_timeout;
+ timeout.tv_usec &= MICROSECONDS_MASK;
+ event_add_nolock_(&ctl->timeout_event, &timeout, 1);
+}
+
+/* Callback: invoked when the timeout for a common timeout queue triggers.
+ * This means that (at least) the first event in that queue should be run,
+ * and the timeout should be rescheduled if there are more events. */
+static void
+common_timeout_callback(evutil_socket_t fd, short what, void *arg)
+{
+ struct timeval now;
+ struct common_timeout_list *ctl = arg;
+ struct event_base *base = ctl->base;
+ struct event *ev = NULL;
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ gettime(base, &now);
+ while (1) {
+ ev = TAILQ_FIRST(&ctl->events);
+ if (!ev || ev->ev_timeout.tv_sec > now.tv_sec ||
+ (ev->ev_timeout.tv_sec == now.tv_sec &&
+ (ev->ev_timeout.tv_usec&MICROSECONDS_MASK) > now.tv_usec))
+ break;
+ event_del_nolock_(ev, EVENT_DEL_NOBLOCK);
+ event_active_nolock_(ev, EV_TIMEOUT, 1);
+ }
+ if (ev)
+ common_timeout_schedule(ctl, &now, ev);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+#define MAX_COMMON_TIMEOUTS 256
+
+const struct timeval *
+event_base_init_common_timeout(struct event_base *base,
+ const struct timeval *duration)
+{
+ int i;
+ struct timeval tv;
+ const struct timeval *result=NULL;
+ struct common_timeout_list *new_ctl;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (duration->tv_usec > 1000000) {
+ memcpy(&tv, duration, sizeof(struct timeval));
+ if (is_common_timeout(duration, base))
+ tv.tv_usec &= MICROSECONDS_MASK;
+ tv.tv_sec += tv.tv_usec / 1000000;
+ tv.tv_usec %= 1000000;
+ duration = &tv;
+ }
+ for (i = 0; i < base->n_common_timeouts; ++i) {
+ const struct common_timeout_list *ctl =
+ base->common_timeout_queues[i];
+ if (duration->tv_sec == ctl->duration.tv_sec &&
+ duration->tv_usec ==
+ (ctl->duration.tv_usec & MICROSECONDS_MASK)) {
+ EVUTIL_ASSERT(is_common_timeout(&ctl->duration, base));
+ result = &ctl->duration;
+ goto done;
+ }
+ }
+ if (base->n_common_timeouts == MAX_COMMON_TIMEOUTS) {
+ event_warnx("%s: Too many common timeouts already in use; "
+ "we only support %d per event_base", __func__,
+ MAX_COMMON_TIMEOUTS);
+ goto done;
+ }
+ if (base->n_common_timeouts_allocated == base->n_common_timeouts) {
+ int n = base->n_common_timeouts < 16 ? 16 :
+ base->n_common_timeouts*2;
+ struct common_timeout_list **newqueues =
+ mm_realloc(base->common_timeout_queues,
+ n*sizeof(struct common_timeout_queue *));
+ if (!newqueues) {
+ event_warn("%s: realloc",__func__);
+ goto done;
+ }
+ base->n_common_timeouts_allocated = n;
+ base->common_timeout_queues = newqueues;
+ }
+ new_ctl = mm_calloc(1, sizeof(struct common_timeout_list));
+ if (!new_ctl) {
+ event_warn("%s: calloc",__func__);
+ goto done;
+ }
+ TAILQ_INIT(&new_ctl->events);
+ new_ctl->duration.tv_sec = duration->tv_sec;
+ new_ctl->duration.tv_usec =
+ duration->tv_usec | COMMON_TIMEOUT_MAGIC |
+ (base->n_common_timeouts << COMMON_TIMEOUT_IDX_SHIFT);
+ evtimer_assign(&new_ctl->timeout_event, base,
+ common_timeout_callback, new_ctl);
+ new_ctl->timeout_event.ev_flags |= EVLIST_INTERNAL;
+ event_priority_set(&new_ctl->timeout_event, 0);
+ new_ctl->base = base;
+ base->common_timeout_queues[base->n_common_timeouts++] = new_ctl;
+ result = &new_ctl->duration;
+
+done:
+ if (result)
+ EVUTIL_ASSERT(is_common_timeout(result, base));
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return result;
+}
+
+/* Closure function invoked when we're activating a persistent event. */
+static inline void
+event_persist_closure(struct event_base *base, struct event *ev)
+{
+
+ // Define our callback, we use this to store our callback before it's executed
+ void (*evcb_callback)(evutil_socket_t, short, void *);
+
+ /* reschedule the persistent event if we have a timeout. */
+ if (ev->ev_io_timeout.tv_sec || ev->ev_io_timeout.tv_usec) {
+ /* If there was a timeout, we want it to run at an interval of
+ * ev_io_timeout after the last time it was _scheduled_ for,
+ * not ev_io_timeout after _now_. If it fired for another
+ * reason, though, the timeout ought to start ticking _now_. */
+ struct timeval run_at, relative_to, delay, now;
+ ev_uint32_t usec_mask = 0;
+ EVUTIL_ASSERT(is_same_common_timeout(&ev->ev_timeout,
+ &ev->ev_io_timeout));
+ gettime(base, &now);
+ if (is_common_timeout(&ev->ev_timeout, base)) {
+ delay = ev->ev_io_timeout;
+ usec_mask = delay.tv_usec & ~MICROSECONDS_MASK;
+ delay.tv_usec &= MICROSECONDS_MASK;
+ if (ev->ev_res & EV_TIMEOUT) {
+ relative_to = ev->ev_timeout;
+ relative_to.tv_usec &= MICROSECONDS_MASK;
+ } else {
+ relative_to = now;
+ }
+ } else {
+ delay = ev->ev_io_timeout;
+ if (ev->ev_res & EV_TIMEOUT) {
+ relative_to = ev->ev_timeout;
+ } else {
+ relative_to = now;
+ }
+ }
+ evutil_timeradd(&relative_to, &delay, &run_at);
+ if (evutil_timercmp(&run_at, &now, <)) {
+ /* Looks like we missed at least one invocation due to
+ * a clock jump, not running the event loop for a
+ * while, really slow callbacks, or
+ * something. Reschedule relative to now.
+ */
+ evutil_timeradd(&now, &delay, &run_at);
+ }
+ run_at.tv_usec |= usec_mask;
+ event_add_nolock_(ev, &run_at, 1);
+ }
+
+ // Save our callback before we release the lock
+ evcb_callback = *ev->ev_callback;
+
+ // Release the lock
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ // Execute the callback
+ (evcb_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
+}
+
+/*
+ Helper for event_process_active to process all the events in a single queue,
+ releasing the lock as we go. This function requires that the lock be held
+ when it's invoked. Returns -1 if we get a signal or an event_break that
+ means we should stop processing any active events now. Otherwise returns
+ the number of non-internal event_callbacks that we processed.
+*/
+static int
+event_process_active_single_queue(struct event_base *base,
+ struct evcallback_list *activeq,
+ int max_to_process, const struct timeval *endtime)
+{
+ struct event_callback *evcb;
+ int count = 0;
+
+ EVUTIL_ASSERT(activeq != NULL);
+
+ for (evcb = TAILQ_FIRST(activeq); evcb; evcb = TAILQ_FIRST(activeq)) {
+ struct event *ev=NULL;
+ if (evcb->evcb_flags & EVLIST_INIT) {
+ ev = event_callback_to_event(evcb);
+
+ if (ev->ev_events & EV_PERSIST || ev->ev_flags & EVLIST_FINALIZING)
+ event_queue_remove_active(base, evcb);
+ else
+ event_del_nolock_(ev, EVENT_DEL_NOBLOCK);
+ event_debug((
+ "event_process_active: event: %p, %s%s%scall %p",
+ ev,
+ ev->ev_res & EV_READ ? "EV_READ " : " ",
+ ev->ev_res & EV_WRITE ? "EV_WRITE " : " ",
+ ev->ev_res & EV_CLOSED ? "EV_CLOSED " : " ",
+ ev->ev_callback));
+ } else {
+ event_queue_remove_active(base, evcb);
+ event_debug(("event_process_active: event_callback %p, "
+ "closure %d, call %p",
+ evcb, evcb->evcb_closure, evcb->evcb_cb_union.evcb_callback));
+ }
+
+ if (!(evcb->evcb_flags & EVLIST_INTERNAL))
+ ++count;
+
+
+ base->current_event = evcb;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ base->current_event_waiters = 0;
+#endif
+
+ switch (evcb->evcb_closure) {
+ case EV_CLOSURE_EVENT_SIGNAL:
+ EVUTIL_ASSERT(ev != NULL);
+ event_signal_closure(base, ev);
+ break;
+ case EV_CLOSURE_EVENT_PERSIST:
+ EVUTIL_ASSERT(ev != NULL);
+ event_persist_closure(base, ev);
+ break;
+ case EV_CLOSURE_EVENT: {
+ EVUTIL_ASSERT(ev != NULL);
+ void (*evcb_callback)(evutil_socket_t, short, void *) = *ev->ev_callback;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg);
+ }
+ break;
+ case EV_CLOSURE_CB_SELF: {
+ void (*evcb_selfcb)(struct event_callback *, void *) = evcb->evcb_cb_union.evcb_selfcb;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ evcb_selfcb(evcb, evcb->evcb_arg);
+ }
+ break;
+ case EV_CLOSURE_EVENT_FINALIZE:
+ case EV_CLOSURE_EVENT_FINALIZE_FREE: {
+ EVUTIL_ASSERT(ev != NULL);
+ void (*evcb_evfinalize)(struct event *, void *) = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize;
+ base->current_event = NULL;
+ EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING));
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ evcb_evfinalize(ev, ev->ev_arg);
+ event_debug_note_teardown_(ev);
+ if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE)
+ mm_free(ev);
+ }
+ break;
+ case EV_CLOSURE_CB_FINALIZE: {
+ void (*evcb_cbfinalize)(struct event_callback *, void *) = evcb->evcb_cb_union.evcb_cbfinalize;
+ base->current_event = NULL;
+ EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING));
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ evcb_cbfinalize(evcb, evcb->evcb_arg);
+ }
+ break;
+ default:
+ EVUTIL_ASSERT(0);
+ }
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ base->current_event = NULL;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (base->current_event_waiters) {
+ base->current_event_waiters = 0;
+ EVTHREAD_COND_BROADCAST(base->current_event_cond);
+ }
+#endif
+
+ if (base->event_break)
+ return -1;
+ if (count >= max_to_process)
+ return count;
+ if (count && endtime) {
+ struct timeval now;
+ update_time_cache(base);
+ gettime(base, &now);
+ if (evutil_timercmp(&now, endtime, >=))
+ return count;
+ }
+ if (base->event_continue)
+ break;
+ }
+ return count;
+}
+
+/*
+ * Active events are stored in priority queues. Lower priorities are always
+ * process before higher priorities. Low priority events can starve high
+ * priority ones.
+ */
+
+static int
+event_process_active(struct event_base *base)
+{
+ /* Caller must hold th_base_lock */
+ struct evcallback_list *activeq = NULL;
+ int i, c = 0;
+ const struct timeval *endtime;
+ struct timeval tv;
+ const int maxcb = base->max_dispatch_callbacks;
+ const int limit_after_prio = base->limit_callbacks_after_prio;
+ if (base->max_dispatch_time.tv_sec >= 0) {
+ update_time_cache(base);
+ gettime(base, &tv);
+ evutil_timeradd(&base->max_dispatch_time, &tv, &tv);
+ endtime = &tv;
+ } else {
+ endtime = NULL;
+ }
+
+ for (i = 0; i < base->nactivequeues; ++i) {
+ if (TAILQ_FIRST(&base->activequeues[i]) != NULL) {
+ base->event_running_priority = i;
+ activeq = &base->activequeues[i];
+ if (i < limit_after_prio)
+ c = event_process_active_single_queue(base, activeq,
+ INT_MAX, NULL);
+ else
+ c = event_process_active_single_queue(base, activeq,
+ maxcb, endtime);
+ if (c < 0) {
+ goto done;
+ } else if (c > 0)
+ break; /* Processed a real event; do not
+ * consider lower-priority events */
+ /* If we get here, all of the events we processed
+ * were internal. Continue. */
+ }
+ }
+
+done:
+ base->event_running_priority = -1;
+
+ return c;
+}
+
+/*
+ * Wait continuously for events. We exit only if no events are left.
+ */
+
+int
+event_dispatch(void)
+{
+ return (event_loop(0));
+}
+
+int
+event_base_dispatch(struct event_base *event_base)
+{
+ return (event_base_loop(event_base, 0));
+}
+
+const char *
+event_base_get_method(const struct event_base *base)
+{
+ EVUTIL_ASSERT(base);
+ return (base->evsel->name);
+}
+
+/** Callback: used to implement event_base_loopexit by telling the event_base
+ * that it's time to exit its loop. */
+static void
+event_loopexit_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct event_base *base = arg;
+ base->event_gotterm = 1;
+}
+
+int
+event_loopexit(const struct timeval *tv)
+{
+ return (event_once(-1, EV_TIMEOUT, event_loopexit_cb,
+ current_base, tv));
+}
+
+int
+event_base_loopexit(struct event_base *event_base, const struct timeval *tv)
+{
+ return (event_base_once(event_base, -1, EV_TIMEOUT, event_loopexit_cb,
+ event_base, tv));
+}
+
+int
+event_loopbreak(void)
+{
+ return (event_base_loopbreak(current_base));
+}
+
+int
+event_base_loopbreak(struct event_base *event_base)
+{
+ int r = 0;
+ if (event_base == NULL)
+ return (-1);
+
+ EVBASE_ACQUIRE_LOCK(event_base, th_base_lock);
+ event_base->event_break = 1;
+
+ if (EVBASE_NEED_NOTIFY(event_base)) {
+ r = evthread_notify_base(event_base);
+ } else {
+ r = (0);
+ }
+ EVBASE_RELEASE_LOCK(event_base, th_base_lock);
+ return r;
+}
+
+int
+event_base_loopcontinue(struct event_base *event_base)
+{
+ int r = 0;
+ if (event_base == NULL)
+ return (-1);
+
+ EVBASE_ACQUIRE_LOCK(event_base, th_base_lock);
+ event_base->event_continue = 1;
+
+ if (EVBASE_NEED_NOTIFY(event_base)) {
+ r = evthread_notify_base(event_base);
+ } else {
+ r = (0);
+ }
+ EVBASE_RELEASE_LOCK(event_base, th_base_lock);
+ return r;
+}
+
+int
+event_base_got_break(struct event_base *event_base)
+{
+ int res;
+ EVBASE_ACQUIRE_LOCK(event_base, th_base_lock);
+ res = event_base->event_break;
+ EVBASE_RELEASE_LOCK(event_base, th_base_lock);
+ return res;
+}
+
+int
+event_base_got_exit(struct event_base *event_base)
+{
+ int res;
+ EVBASE_ACQUIRE_LOCK(event_base, th_base_lock);
+ res = event_base->event_gotterm;
+ EVBASE_RELEASE_LOCK(event_base, th_base_lock);
+ return res;
+}
+
+/* not thread safe */
+
+int
+event_loop(int flags)
+{
+ return event_base_loop(current_base, flags);
+}
+
+int
+event_base_loop(struct event_base *base, int flags)
+{
+ const struct eventop *evsel = base->evsel;
+ struct timeval tv;
+ struct timeval *tv_p;
+ int res, done, retval = 0;
+
+ /* Grab the lock. We will release it inside evsel.dispatch, and again
+ * as we invoke user callbacks. */
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (base->running_loop) {
+ event_warnx("%s: reentrant invocation. Only one event_base_loop"
+ " can run on each event_base at once.", __func__);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return -1;
+ }
+
+ base->running_loop = 1;
+
+ clear_time_cache(base);
+
+ if (base->sig.ev_signal_added && base->sig.ev_n_signals_added)
+ evsig_set_base_(base);
+
+ done = 0;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ base->th_owner_id = EVTHREAD_GET_ID();
+#endif
+
+ base->event_gotterm = base->event_break = 0;
+
+ while (!done) {
+ base->event_continue = 0;
+ base->n_deferreds_queued = 0;
+
+ /* Terminate the loop if we have been asked to */
+ if (base->event_gotterm) {
+ break;
+ }
+
+ if (base->event_break) {
+ break;
+ }
+
+ tv_p = &tv;
+ if (!N_ACTIVE_CALLBACKS(base) && !(flags & EVLOOP_NONBLOCK)) {
+ timeout_next(base, &tv_p);
+ } else {
+ /*
+ * if we have active events, we just poll new events
+ * without waiting.
+ */
+ evutil_timerclear(&tv);
+ }
+
+ /* If we have no events, we just exit */
+ if (0==(flags&EVLOOP_NO_EXIT_ON_EMPTY) &&
+ !event_haveevents(base) && !N_ACTIVE_CALLBACKS(base)) {
+ event_debug(("%s: no events registered.", __func__));
+ retval = 1;
+ goto done;
+ }
+
+ event_queue_make_later_events_active(base);
+
+ clear_time_cache(base);
+
+ res = evsel->dispatch(base, tv_p);
+
+ if (res == -1) {
+ event_debug(("%s: dispatch returned unsuccessfully.",
+ __func__));
+ retval = -1;
+ goto done;
+ }
+
+ update_time_cache(base);
+
+ timeout_process(base);
+
+ if (N_ACTIVE_CALLBACKS(base)) {
+ int n = event_process_active(base);
+ if ((flags & EVLOOP_ONCE)
+ && N_ACTIVE_CALLBACKS(base) == 0
+ && n != 0)
+ done = 1;
+ } else if (flags & EVLOOP_NONBLOCK)
+ done = 1;
+ }
+ event_debug(("%s: asked to terminate loop.", __func__));
+
+done:
+ clear_time_cache(base);
+ base->running_loop = 0;
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ return (retval);
+}
+
+/* One-time callback to implement event_base_once: invokes the user callback,
+ * then deletes the allocated storage */
+static void
+event_once_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct event_once *eonce = arg;
+
+ (*eonce->cb)(fd, events, eonce->arg);
+ EVBASE_ACQUIRE_LOCK(eonce->ev.ev_base, th_base_lock);
+ LIST_REMOVE(eonce, next_once);
+ EVBASE_RELEASE_LOCK(eonce->ev.ev_base, th_base_lock);
+ event_debug_unassign(&eonce->ev);
+ mm_free(eonce);
+}
+
+/* not threadsafe, event scheduled once. */
+int
+event_once(evutil_socket_t fd, short events,
+ void (*callback)(evutil_socket_t, short, void *),
+ void *arg, const struct timeval *tv)
+{
+ return event_base_once(current_base, fd, events, callback, arg, tv);
+}
+
+/* Schedules an event once */
+int
+event_base_once(struct event_base *base, evutil_socket_t fd, short events,
+ void (*callback)(evutil_socket_t, short, void *),
+ void *arg, const struct timeval *tv)
+{
+ struct event_once *eonce;
+ int res = 0;
+ int activate = 0;
+
+ /* We cannot support signals that just fire once, or persistent
+ * events. */
+ if (events & (EV_SIGNAL|EV_PERSIST))
+ return (-1);
+
+ if ((eonce = mm_calloc(1, sizeof(struct event_once))) == NULL)
+ return (-1);
+
+ eonce->cb = callback;
+ eonce->arg = arg;
+
+ if ((events & (EV_TIMEOUT|EV_SIGNAL|EV_READ|EV_WRITE|EV_CLOSED)) == EV_TIMEOUT) {
+ evtimer_assign(&eonce->ev, base, event_once_cb, eonce);
+
+ if (tv == NULL || ! evutil_timerisset(tv)) {
+ /* If the event is going to become active immediately,
+ * don't put it on the timeout queue. This is one
+ * idiom for scheduling a callback, so let's make
+ * it fast (and order-preserving). */
+ activate = 1;
+ }
+ } else if (events & (EV_READ|EV_WRITE|EV_CLOSED)) {
+ events &= EV_READ|EV_WRITE|EV_CLOSED;
+
+ event_assign(&eonce->ev, base, fd, events, event_once_cb, eonce);
+ } else {
+ /* Bad event combination */
+ mm_free(eonce);
+ return (-1);
+ }
+
+ if (res == 0) {
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (activate)
+ event_active_nolock_(&eonce->ev, EV_TIMEOUT, 1);
+ else
+ res = event_add_nolock_(&eonce->ev, tv, 0);
+
+ if (res != 0) {
+ mm_free(eonce);
+ return (res);
+ } else {
+ LIST_INSERT_HEAD(&base->once_events, eonce, next_once);
+ }
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ }
+
+ return (0);
+}
+
+int
+event_assign(struct event *ev, struct event_base *base, evutil_socket_t fd, short events, void (*callback)(evutil_socket_t, short, void *), void *arg)
+{
+ if (!base)
+ base = current_base;
+ if (arg == &event_self_cbarg_ptr_)
+ arg = ev;
+
+ event_debug_assert_not_added_(ev);
+
+ ev->ev_base = base;
+
+ ev->ev_callback = callback;
+ ev->ev_arg = arg;
+ ev->ev_fd = fd;
+ ev->ev_events = events;
+ ev->ev_res = 0;
+ ev->ev_flags = EVLIST_INIT;
+ ev->ev_ncalls = 0;
+ ev->ev_pncalls = NULL;
+
+ if (events & EV_SIGNAL) {
+ if ((events & (EV_READ|EV_WRITE|EV_CLOSED)) != 0) {
+ event_warnx("%s: EV_SIGNAL is not compatible with "
+ "EV_READ, EV_WRITE or EV_CLOSED", __func__);
+ return -1;
+ }
+ ev->ev_closure = EV_CLOSURE_EVENT_SIGNAL;
+ } else {
+ if (events & EV_PERSIST) {
+ evutil_timerclear(&ev->ev_io_timeout);
+ ev->ev_closure = EV_CLOSURE_EVENT_PERSIST;
+ } else {
+ ev->ev_closure = EV_CLOSURE_EVENT;
+ }
+ }
+
+ min_heap_elem_init_(ev);
+
+ if (base != NULL) {
+ /* by default, we put new events into the middle priority */
+ ev->ev_pri = base->nactivequeues / 2;
+ }
+
+ event_debug_note_setup_(ev);
+
+ return 0;
+}
+
+int
+event_base_set(struct event_base *base, struct event *ev)
+{
+ /* Only innocent events may be assigned to a different base */
+ if (ev->ev_flags != EVLIST_INIT)
+ return (-1);
+
+ event_debug_assert_is_setup_(ev);
+
+ ev->ev_base = base;
+ ev->ev_pri = base->nactivequeues/2;
+
+ return (0);
+}
+
+void
+event_set(struct event *ev, evutil_socket_t fd, short events,
+ void (*callback)(evutil_socket_t, short, void *), void *arg)
+{
+ int r;
+ r = event_assign(ev, current_base, fd, events, callback, arg);
+ EVUTIL_ASSERT(r == 0);
+}
+
+void *
+event_self_cbarg(void)
+{
+ return &event_self_cbarg_ptr_;
+}
+
+struct event *
+event_base_get_running_event(struct event_base *base)
+{
+ struct event *ev = NULL;
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (EVBASE_IN_THREAD(base)) {
+ struct event_callback *evcb = base->current_event;
+ if (evcb->evcb_flags & EVLIST_INIT)
+ ev = event_callback_to_event(evcb);
+ }
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return ev;
+}
+
+struct event *
+event_new(struct event_base *base, evutil_socket_t fd, short events, void (*cb)(evutil_socket_t, short, void *), void *arg)
+{
+ struct event *ev;
+ ev = mm_malloc(sizeof(struct event));
+ if (ev == NULL)
+ return (NULL);
+ if (event_assign(ev, base, fd, events, cb, arg) < 0) {
+ mm_free(ev);
+ return (NULL);
+ }
+
+ return (ev);
+}
+
+void
+event_free(struct event *ev)
+{
+ /* This is disabled, so that events which have been finalized be a
+ * valid target for event_free(). That's */
+ // event_debug_assert_is_setup_(ev);
+
+ /* make sure that this event won't be coming back to haunt us. */
+ event_del(ev);
+ event_debug_note_teardown_(ev);
+ mm_free(ev);
+
+}
+
+void
+event_debug_unassign(struct event *ev)
+{
+ event_debug_assert_not_added_(ev);
+ event_debug_note_teardown_(ev);
+
+ ev->ev_flags &= ~EVLIST_INIT;
+}
+
+#define EVENT_FINALIZE_FREE_ 0x10000
+static int
+event_finalize_nolock_(struct event_base *base, unsigned flags, struct event *ev, event_finalize_callback_fn cb)
+{
+ ev_uint8_t closure = (flags & EVENT_FINALIZE_FREE_) ?
+ EV_CLOSURE_EVENT_FINALIZE_FREE : EV_CLOSURE_EVENT_FINALIZE;
+
+ event_del_nolock_(ev, EVENT_DEL_NOBLOCK);
+ ev->ev_closure = closure;
+ ev->ev_evcallback.evcb_cb_union.evcb_evfinalize = cb;
+ event_active_nolock_(ev, EV_FINALIZE, 1);
+ ev->ev_flags |= EVLIST_FINALIZING;
+ return 0;
+}
+
+static int
+event_finalize_impl_(unsigned flags, struct event *ev, event_finalize_callback_fn cb)
+{
+ int r;
+ struct event_base *base = ev->ev_base;
+ if (EVUTIL_FAILURE_CHECK(!base)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return -1;
+ }
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ r = event_finalize_nolock_(base, flags, ev, cb);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+int
+event_finalize(unsigned flags, struct event *ev, event_finalize_callback_fn cb)
+{
+ return event_finalize_impl_(flags, ev, cb);
+}
+
+int
+event_free_finalize(unsigned flags, struct event *ev, event_finalize_callback_fn cb)
+{
+ return event_finalize_impl_(flags|EVENT_FINALIZE_FREE_, ev, cb);
+}
+
+void
+event_callback_finalize_nolock_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *))
+{
+ struct event *ev = NULL;
+ if (evcb->evcb_flags & EVLIST_INIT) {
+ ev = event_callback_to_event(evcb);
+ event_del_nolock_(ev, EVENT_DEL_NOBLOCK);
+ } else {
+ event_callback_cancel_nolock_(base, evcb, 0); /*XXX can this fail?*/
+ }
+
+ evcb->evcb_closure = EV_CLOSURE_CB_FINALIZE;
+ evcb->evcb_cb_union.evcb_cbfinalize = cb;
+ event_callback_activate_nolock_(base, evcb); /* XXX can this really fail?*/
+ evcb->evcb_flags |= EVLIST_FINALIZING;
+}
+
+void
+event_callback_finalize_(struct event_base *base, unsigned flags, struct event_callback *evcb, void (*cb)(struct event_callback *, void *))
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ event_callback_finalize_nolock_(base, flags, evcb, cb);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+/** Internal: Finalize all of the n_cbs callbacks in evcbs. The provided
+ * callback will be invoked on *one of them*, after they have *all* been
+ * finalized. */
+int
+event_callback_finalize_many_(struct event_base *base, int n_cbs, struct event_callback **evcbs, void (*cb)(struct event_callback *, void *))
+{
+ int n_pending = 0, i;
+
+ if (base == NULL)
+ base = current_base;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ event_debug(("%s: %d events finalizing", __func__, n_cbs));
+
+ /* At most one can be currently executing; the rest we just
+ * cancel... But we always make sure that the finalize callback
+ * runs. */
+ for (i = 0; i < n_cbs; ++i) {
+ struct event_callback *evcb = evcbs[i];
+ if (evcb == base->current_event) {
+ event_callback_finalize_nolock_(base, 0, evcb, cb);
+ ++n_pending;
+ } else {
+ event_callback_cancel_nolock_(base, evcb, 0);
+ }
+ }
+
+ if (n_pending == 0) {
+ /* Just do the first one. */
+ event_callback_finalize_nolock_(base, 0, evcbs[0], cb);
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return 0;
+}
+
+/*
+ * Set's the priority of an event - if an event is already scheduled
+ * changing the priority is going to fail.
+ */
+
+int
+event_priority_set(struct event *ev, int pri)
+{
+ event_debug_assert_is_setup_(ev);
+
+ if (ev->ev_flags & EVLIST_ACTIVE)
+ return (-1);
+ if (pri < 0 || pri >= ev->ev_base->nactivequeues)
+ return (-1);
+
+ ev->ev_pri = pri;
+
+ return (0);
+}
+
+/*
+ * Checks if a specific event is pending or scheduled.
+ */
+
+int
+event_pending(const struct event *ev, short event, struct timeval *tv)
+{
+ int flags = 0;
+
+ if (EVUTIL_FAILURE_CHECK(ev->ev_base == NULL)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return 0;
+ }
+
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+ event_debug_assert_is_setup_(ev);
+
+ if (ev->ev_flags & EVLIST_INSERTED)
+ flags |= (ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED|EV_SIGNAL));
+ if (ev->ev_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))
+ flags |= ev->ev_res;
+ if (ev->ev_flags & EVLIST_TIMEOUT)
+ flags |= EV_TIMEOUT;
+
+ event &= (EV_TIMEOUT|EV_READ|EV_WRITE|EV_CLOSED|EV_SIGNAL);
+
+ /* See if there is a timeout that we should report */
+ if (tv != NULL && (flags & event & EV_TIMEOUT)) {
+ struct timeval tmp = ev->ev_timeout;
+ tmp.tv_usec &= MICROSECONDS_MASK;
+ /* correctly remamp to real time */
+ evutil_timeradd(&ev->ev_base->tv_clock_diff, &tmp, tv);
+ }
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+
+ return (flags & event);
+}
+
+int
+event_initialized(const struct event *ev)
+{
+ if (!(ev->ev_flags & EVLIST_INIT))
+ return 0;
+
+ return 1;
+}
+
+void
+event_get_assignment(const struct event *event, struct event_base **base_out, evutil_socket_t *fd_out, short *events_out, event_callback_fn *callback_out, void **arg_out)
+{
+ event_debug_assert_is_setup_(event);
+
+ if (base_out)
+ *base_out = event->ev_base;
+ if (fd_out)
+ *fd_out = event->ev_fd;
+ if (events_out)
+ *events_out = event->ev_events;
+ if (callback_out)
+ *callback_out = event->ev_callback;
+ if (arg_out)
+ *arg_out = event->ev_arg;
+}
+
+size_t
+event_get_struct_event_size(void)
+{
+ return sizeof(struct event);
+}
+
+evutil_socket_t
+event_get_fd(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_fd;
+}
+
+struct event_base *
+event_get_base(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_base;
+}
+
+short
+event_get_events(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_events;
+}
+
+event_callback_fn
+event_get_callback(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_callback;
+}
+
+void *
+event_get_callback_arg(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_arg;
+}
+
+int
+event_get_priority(const struct event *ev)
+{
+ event_debug_assert_is_setup_(ev);
+ return ev->ev_pri;
+}
+
+int
+event_add(struct event *ev, const struct timeval *tv)
+{
+ int res;
+
+ if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return -1;
+ }
+
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+
+ res = event_add_nolock_(ev, tv, 0);
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+
+ return (res);
+}
+
+/* Helper callback: wake an event_base from another thread. This version
+ * works by writing a byte to one end of a socketpair, so that the event_base
+ * listening on the other end will wake up as the corresponding event
+ * triggers */
+static int
+evthread_notify_base_default(struct event_base *base)
+{
+ char buf[1];
+ int r;
+ buf[0] = (char) 0;
+#ifdef _WIN32
+ r = send(base->th_notify_fd[1], buf, 1, 0);
+#else
+ r = write(base->th_notify_fd[1], buf, 1);
+#endif
+ return (r < 0 && ! EVUTIL_ERR_IS_EAGAIN(errno)) ? -1 : 0;
+}
+
+#ifdef EVENT__HAVE_EVENTFD
+/* Helper callback: wake an event_base from another thread. This version
+ * assumes that you have a working eventfd() implementation. */
+static int
+evthread_notify_base_eventfd(struct event_base *base)
+{
+ ev_uint64_t msg = 1;
+ int r;
+ do {
+ r = write(base->th_notify_fd[0], (void*) &msg, sizeof(msg));
+ } while (r < 0 && errno == EAGAIN);
+
+ return (r < 0) ? -1 : 0;
+}
+#endif
+
+
+/** Tell the thread currently running the event_loop for base (if any) that it
+ * needs to stop waiting in its dispatch function (if it is) and process all
+ * active callbacks. */
+static int
+evthread_notify_base(struct event_base *base)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (!base->th_notify_fn)
+ return -1;
+ if (base->is_notify_pending)
+ return 0;
+ base->is_notify_pending = 1;
+ return base->th_notify_fn(base);
+}
+
+/* Implementation function to remove a timeout on a currently pending event.
+ */
+int
+event_remove_timer_nolock_(struct event *ev)
+{
+ struct event_base *base = ev->ev_base;
+
+ EVENT_BASE_ASSERT_LOCKED(base);
+ event_debug_assert_is_setup_(ev);
+
+ event_debug(("event_remove_timer_nolock: event: %p", ev));
+
+ /* If it's not pending on a timeout, we don't need to do anything. */
+ if (ev->ev_flags & EVLIST_TIMEOUT) {
+ event_queue_remove_timeout(base, ev);
+ evutil_timerclear(&ev->ev_.ev_io.ev_timeout);
+ }
+
+ return (0);
+}
+
+int
+event_remove_timer(struct event *ev)
+{
+ int res;
+
+ if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return -1;
+ }
+
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+
+ res = event_remove_timer_nolock_(ev);
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+
+ return (res);
+}
+
+/* Implementation function to add an event. Works just like event_add,
+ * except: 1) it requires that we have the lock. 2) if tv_is_absolute is set,
+ * we treat tv as an absolute time, not as an interval to add to the current
+ * time */
+int
+event_add_nolock_(struct event *ev, const struct timeval *tv,
+ int tv_is_absolute)
+{
+ struct event_base *base = ev->ev_base;
+ int res = 0;
+ int notify = 0;
+
+ EVENT_BASE_ASSERT_LOCKED(base);
+ event_debug_assert_is_setup_(ev);
+
+ event_debug((
+ "event_add: event: %p (fd "EV_SOCK_FMT"), %s%s%s%scall %p",
+ ev,
+ EV_SOCK_ARG(ev->ev_fd),
+ ev->ev_events & EV_READ ? "EV_READ " : " ",
+ ev->ev_events & EV_WRITE ? "EV_WRITE " : " ",
+ ev->ev_events & EV_CLOSED ? "EV_CLOSED " : " ",
+ tv ? "EV_TIMEOUT " : " ",
+ ev->ev_callback));
+
+ EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL));
+
+ if (ev->ev_flags & EVLIST_FINALIZING) {
+ /* XXXX debug */
+ return (-1);
+ }
+
+ /*
+ * prepare for timeout insertion further below, if we get a
+ * failure on any step, we should not change any state.
+ */
+ if (tv != NULL && !(ev->ev_flags & EVLIST_TIMEOUT)) {
+ if (min_heap_reserve_(&base->timeheap,
+ 1 + min_heap_size_(&base->timeheap)) == -1)
+ return (-1); /* ENOMEM == errno */
+ }
+
+ /* If the main thread is currently executing a signal event's
+ * callback, and we are not the main thread, then we want to wait
+ * until the callback is done before we mess with the event, or else
+ * we can race on ev_ncalls and ev_pncalls below. */
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (base->current_event == event_to_event_callback(ev) &&
+ (ev->ev_events & EV_SIGNAL)
+ && !EVBASE_IN_THREAD(base)) {
+ ++base->current_event_waiters;
+ EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
+ }
+#endif
+
+ if ((ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED|EV_SIGNAL)) &&
+ !(ev->ev_flags & (EVLIST_INSERTED|EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))) {
+ if (ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED))
+ res = evmap_io_add_(base, ev->ev_fd, ev);
+ else if (ev->ev_events & EV_SIGNAL)
+ res = evmap_signal_add_(base, (int)ev->ev_fd, ev);
+ if (res != -1)
+ event_queue_insert_inserted(base, ev);
+ if (res == 1) {
+ /* evmap says we need to notify the main thread. */
+ notify = 1;
+ res = 0;
+ }
+ }
+
+ /*
+ * we should change the timeout state only if the previous event
+ * addition succeeded.
+ */
+ if (res != -1 && tv != NULL) {
+ struct timeval now;
+ int common_timeout;
+#ifdef USE_REINSERT_TIMEOUT
+ int was_common;
+ int old_timeout_idx;
+#endif
+
+ /*
+ * for persistent timeout events, we remember the
+ * timeout value and re-add the event.
+ *
+ * If tv_is_absolute, this was already set.
+ */
+ if (ev->ev_closure == EV_CLOSURE_EVENT_PERSIST && !tv_is_absolute)
+ ev->ev_io_timeout = *tv;
+
+#ifndef USE_REINSERT_TIMEOUT
+ if (ev->ev_flags & EVLIST_TIMEOUT) {
+ event_queue_remove_timeout(base, ev);
+ }
+#endif
+
+ /* Check if it is active due to a timeout. Rescheduling
+ * this timeout before the callback can be executed
+ * removes it from the active list. */
+ if ((ev->ev_flags & EVLIST_ACTIVE) &&
+ (ev->ev_res & EV_TIMEOUT)) {
+ if (ev->ev_events & EV_SIGNAL) {
+ /* See if we are just active executing
+ * this event in a loop
+ */
+ if (ev->ev_ncalls && ev->ev_pncalls) {
+ /* Abort loop */
+ *ev->ev_pncalls = 0;
+ }
+ }
+
+ event_queue_remove_active(base, event_to_event_callback(ev));
+ }
+
+ gettime(base, &now);
+
+ common_timeout = is_common_timeout(tv, base);
+#ifdef USE_REINSERT_TIMEOUT
+ was_common = is_common_timeout(&ev->ev_timeout, base);
+ old_timeout_idx = COMMON_TIMEOUT_IDX(&ev->ev_timeout);
+#endif
+
+ if (tv_is_absolute) {
+ ev->ev_timeout = *tv;
+ } else if (common_timeout) {
+ struct timeval tmp = *tv;
+ tmp.tv_usec &= MICROSECONDS_MASK;
+ evutil_timeradd(&now, &tmp, &ev->ev_timeout);
+ ev->ev_timeout.tv_usec |=
+ (tv->tv_usec & ~MICROSECONDS_MASK);
+ } else {
+ evutil_timeradd(&now, tv, &ev->ev_timeout);
+ }
+
+ event_debug((
+ "event_add: event %p, timeout in %d seconds %d useconds, call %p",
+ ev, (int)tv->tv_sec, (int)tv->tv_usec, ev->ev_callback));
+
+#ifdef USE_REINSERT_TIMEOUT
+ event_queue_reinsert_timeout(base, ev, was_common, common_timeout, old_timeout_idx);
+#else
+ event_queue_insert_timeout(base, ev);
+#endif
+
+ if (common_timeout) {
+ struct common_timeout_list *ctl =
+ get_common_timeout_list(base, &ev->ev_timeout);
+ if (ev == TAILQ_FIRST(&ctl->events)) {
+ common_timeout_schedule(ctl, &now, ev);
+ }
+ } else {
+ struct event* top = NULL;
+ /* See if the earliest timeout is now earlier than it
+ * was before: if so, we will need to tell the main
+ * thread to wake up earlier than it would otherwise.
+ * We double check the timeout of the top element to
+ * handle time distortions due to system suspension.
+ */
+ if (min_heap_elt_is_top_(ev))
+ notify = 1;
+ else if ((top = min_heap_top_(&base->timeheap)) != NULL &&
+ evutil_timercmp(&top->ev_timeout, &now, <))
+ notify = 1;
+ }
+ }
+
+ /* if we are not in the right thread, we need to wake up the loop */
+ if (res != -1 && notify && EVBASE_NEED_NOTIFY(base))
+ evthread_notify_base(base);
+
+ event_debug_note_add_(ev);
+
+ return (res);
+}
+
+static int
+event_del_(struct event *ev, int blocking)
+{
+ int res;
+
+ if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return -1;
+ }
+
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+
+ res = event_del_nolock_(ev, blocking);
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+
+ return (res);
+}
+
+int
+event_del(struct event *ev)
+{
+ return event_del_(ev, EVENT_DEL_AUTOBLOCK);
+}
+
+int
+event_del_block(struct event *ev)
+{
+ return event_del_(ev, EVENT_DEL_BLOCK);
+}
+
+int
+event_del_noblock(struct event *ev)
+{
+ return event_del_(ev, EVENT_DEL_NOBLOCK);
+}
+
+/** Helper for event_del: always called with th_base_lock held.
+ *
+ * "blocking" must be one of the EVENT_DEL_{BLOCK, NOBLOCK, AUTOBLOCK,
+ * EVEN_IF_FINALIZING} values. See those for more information.
+ */
+int
+event_del_nolock_(struct event *ev, int blocking)
+{
+ struct event_base *base;
+ int res = 0, notify = 0;
+
+ event_debug(("event_del: %p (fd "EV_SOCK_FMT"), callback %p",
+ ev, EV_SOCK_ARG(ev->ev_fd), ev->ev_callback));
+
+ /* An event without a base has not been added */
+ if (ev->ev_base == NULL)
+ return (-1);
+
+ EVENT_BASE_ASSERT_LOCKED(ev->ev_base);
+
+ if (blocking != EVENT_DEL_EVEN_IF_FINALIZING) {
+ if (ev->ev_flags & EVLIST_FINALIZING) {
+ /* XXXX Debug */
+ return 0;
+ }
+ }
+
+ /* If the main thread is currently executing this event's callback,
+ * and we are not the main thread, then we want to wait until the
+ * callback is done before we start removing the event. That way,
+ * when this function returns, it will be safe to free the
+ * user-supplied argument. */
+ base = ev->ev_base;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (blocking != EVENT_DEL_NOBLOCK &&
+ base->current_event == event_to_event_callback(ev) &&
+ !EVBASE_IN_THREAD(base) &&
+ (blocking == EVENT_DEL_BLOCK || !(ev->ev_events & EV_FINALIZE))) {
+ ++base->current_event_waiters;
+ EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
+ }
+#endif
+
+ EVUTIL_ASSERT(!(ev->ev_flags & ~EVLIST_ALL));
+
+ /* See if we are just active executing this event in a loop */
+ if (ev->ev_events & EV_SIGNAL) {
+ if (ev->ev_ncalls && ev->ev_pncalls) {
+ /* Abort loop */
+ *ev->ev_pncalls = 0;
+ }
+ }
+
+ if (ev->ev_flags & EVLIST_TIMEOUT) {
+ /* NOTE: We never need to notify the main thread because of a
+ * deleted timeout event: all that could happen if we don't is
+ * that the dispatch loop might wake up too early. But the
+ * point of notifying the main thread _is_ to wake up the
+ * dispatch loop early anyway, so we wouldn't gain anything by
+ * doing it.
+ */
+ event_queue_remove_timeout(base, ev);
+ }
+
+ if (ev->ev_flags & EVLIST_ACTIVE)
+ event_queue_remove_active(base, event_to_event_callback(ev));
+ else if (ev->ev_flags & EVLIST_ACTIVE_LATER)
+ event_queue_remove_active_later(base, event_to_event_callback(ev));
+
+ if (ev->ev_flags & EVLIST_INSERTED) {
+ event_queue_remove_inserted(base, ev);
+ if (ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED))
+ res = evmap_io_del_(base, ev->ev_fd, ev);
+ else
+ res = evmap_signal_del_(base, (int)ev->ev_fd, ev);
+ if (res == 1) {
+ /* evmap says we need to notify the main thread. */
+ notify = 1;
+ res = 0;
+ }
+ }
+
+ /* if we are not in the right thread, we need to wake up the loop */
+ if (res != -1 && notify && EVBASE_NEED_NOTIFY(base))
+ evthread_notify_base(base);
+
+ event_debug_note_del_(ev);
+
+ return (res);
+}
+
+void
+event_active(struct event *ev, int res, short ncalls)
+{
+ if (EVUTIL_FAILURE_CHECK(!ev->ev_base)) {
+ event_warnx("%s: event has no event_base set.", __func__);
+ return;
+ }
+
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+
+ event_debug_assert_is_setup_(ev);
+
+ event_active_nolock_(ev, res, ncalls);
+
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+}
+
+
+void
+event_active_nolock_(struct event *ev, int res, short ncalls)
+{
+ struct event_base *base;
+
+ event_debug(("event_active: %p (fd "EV_SOCK_FMT"), res %d, callback %p",
+ ev, EV_SOCK_ARG(ev->ev_fd), (int)res, ev->ev_callback));
+
+ base = ev->ev_base;
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (ev->ev_flags & EVLIST_FINALIZING) {
+ /* XXXX debug */
+ return;
+ }
+
+ switch ((ev->ev_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))) {
+ default:
+ case EVLIST_ACTIVE|EVLIST_ACTIVE_LATER:
+ EVUTIL_ASSERT(0);
+ break;
+ case EVLIST_ACTIVE:
+ /* We get different kinds of events, add them together */
+ ev->ev_res |= res;
+ return;
+ case EVLIST_ACTIVE_LATER:
+ ev->ev_res |= res;
+ break;
+ case 0:
+ ev->ev_res = res;
+ break;
+ }
+
+ if (ev->ev_pri < base->event_running_priority)
+ base->event_continue = 1;
+
+ if (ev->ev_events & EV_SIGNAL) {
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (base->current_event == event_to_event_callback(ev) &&
+ !EVBASE_IN_THREAD(base)) {
+ ++base->current_event_waiters;
+ EVTHREAD_COND_WAIT(base->current_event_cond, base->th_base_lock);
+ }
+#endif
+ ev->ev_ncalls = ncalls;
+ ev->ev_pncalls = NULL;
+ }
+
+ event_callback_activate_nolock_(base, event_to_event_callback(ev));
+}
+
+void
+event_active_later_(struct event *ev, int res)
+{
+ EVBASE_ACQUIRE_LOCK(ev->ev_base, th_base_lock);
+ event_active_later_nolock_(ev, res);
+ EVBASE_RELEASE_LOCK(ev->ev_base, th_base_lock);
+}
+
+void
+event_active_later_nolock_(struct event *ev, int res)
+{
+ struct event_base *base = ev->ev_base;
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (ev->ev_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) {
+ /* We get different kinds of events, add them together */
+ ev->ev_res |= res;
+ return;
+ }
+
+ ev->ev_res = res;
+
+ event_callback_activate_later_nolock_(base, event_to_event_callback(ev));
+}
+
+int
+event_callback_activate_(struct event_base *base,
+ struct event_callback *evcb)
+{
+ int r;
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ r = event_callback_activate_nolock_(base, evcb);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+int
+event_callback_activate_nolock_(struct event_base *base,
+ struct event_callback *evcb)
+{
+ int r = 1;
+
+ if (evcb->evcb_flags & EVLIST_FINALIZING)
+ return 0;
+
+ switch (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) {
+ default:
+ EVUTIL_ASSERT(0);
+ case EVLIST_ACTIVE_LATER:
+ event_queue_remove_active_later(base, evcb);
+ r = 0;
+ break;
+ case EVLIST_ACTIVE:
+ return 0;
+ case 0:
+ break;
+ }
+
+ event_queue_insert_active(base, evcb);
+
+ if (EVBASE_NEED_NOTIFY(base))
+ evthread_notify_base(base);
+
+ return r;
+}
+
+void
+event_callback_activate_later_nolock_(struct event_base *base,
+ struct event_callback *evcb)
+{
+ if (evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))
+ return;
+
+ event_queue_insert_active_later(base, evcb);
+ if (EVBASE_NEED_NOTIFY(base))
+ evthread_notify_base(base);
+}
+
+void
+event_callback_init_(struct event_base *base,
+ struct event_callback *cb)
+{
+ memset(cb, 0, sizeof(*cb));
+ cb->evcb_pri = base->nactivequeues - 1;
+}
+
+int
+event_callback_cancel_(struct event_base *base,
+ struct event_callback *evcb)
+{
+ int r;
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ r = event_callback_cancel_nolock_(base, evcb, 0);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+int
+event_callback_cancel_nolock_(struct event_base *base,
+ struct event_callback *evcb, int even_if_finalizing)
+{
+ if ((evcb->evcb_flags & EVLIST_FINALIZING) && !even_if_finalizing)
+ return 0;
+
+ if (evcb->evcb_flags & EVLIST_INIT)
+ return event_del_nolock_(event_callback_to_event(evcb),
+ even_if_finalizing ? EVENT_DEL_EVEN_IF_FINALIZING : EVENT_DEL_AUTOBLOCK);
+
+ switch ((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER))) {
+ default:
+ case EVLIST_ACTIVE|EVLIST_ACTIVE_LATER:
+ EVUTIL_ASSERT(0);
+ break;
+ case EVLIST_ACTIVE:
+ /* We get different kinds of events, add them together */
+ event_queue_remove_active(base, evcb);
+ return 0;
+ case EVLIST_ACTIVE_LATER:
+ event_queue_remove_active_later(base, evcb);
+ break;
+ case 0:
+ break;
+ }
+
+ return 0;
+}
+
+void
+event_deferred_cb_init_(struct event_callback *cb, ev_uint8_t priority, deferred_cb_fn fn, void *arg)
+{
+ memset(cb, 0, sizeof(*cb));
+ cb->evcb_cb_union.evcb_selfcb = fn;
+ cb->evcb_arg = arg;
+ cb->evcb_pri = priority;
+ cb->evcb_closure = EV_CLOSURE_CB_SELF;
+}
+
+void
+event_deferred_cb_set_priority_(struct event_callback *cb, ev_uint8_t priority)
+{
+ cb->evcb_pri = priority;
+}
+
+void
+event_deferred_cb_cancel_(struct event_base *base, struct event_callback *cb)
+{
+ if (!base)
+ base = current_base;
+ event_callback_cancel_(base, cb);
+}
+
+#define MAX_DEFERREDS_QUEUED 32
+int
+event_deferred_cb_schedule_(struct event_base *base, struct event_callback *cb)
+{
+ int r = 1;
+ if (!base)
+ base = current_base;
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ if (base->n_deferreds_queued > MAX_DEFERREDS_QUEUED) {
+ event_callback_activate_later_nolock_(base, cb);
+ } else {
+ ++base->n_deferreds_queued;
+ r = event_callback_activate_nolock_(base, cb);
+ }
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+static int
+timeout_next(struct event_base *base, struct timeval **tv_p)
+{
+ /* Caller must hold th_base_lock */
+ struct timeval now;
+ struct event *ev;
+ struct timeval *tv = *tv_p;
+ int res = 0;
+
+ ev = min_heap_top_(&base->timeheap);
+
+ if (ev == NULL) {
+ /* if no time-based events are active wait for I/O */
+ *tv_p = NULL;
+ goto out;
+ }
+
+ if (gettime(base, &now) == -1) {
+ res = -1;
+ goto out;
+ }
+
+ if (evutil_timercmp(&ev->ev_timeout, &now, <=)) {
+ evutil_timerclear(tv);
+ goto out;
+ }
+
+ evutil_timersub(&ev->ev_timeout, &now, tv);
+
+ EVUTIL_ASSERT(tv->tv_sec >= 0);
+ EVUTIL_ASSERT(tv->tv_usec >= 0);
+ event_debug(("timeout_next: event: %p, in %d seconds, %d useconds", ev, (int)tv->tv_sec, (int)tv->tv_usec));
+
+out:
+ return (res);
+}
+
+/* Activate every event whose timeout has elapsed. */
+static void
+timeout_process(struct event_base *base)
+{
+ /* Caller must hold lock. */
+ struct timeval now;
+ struct event *ev;
+
+ if (min_heap_empty_(&base->timeheap)) {
+ return;
+ }
+
+ gettime(base, &now);
+
+ while ((ev = min_heap_top_(&base->timeheap))) {
+ if (evutil_timercmp(&ev->ev_timeout, &now, >))
+ break;
+
+ /* delete this event from the I/O queues */
+ event_del_nolock_(ev, EVENT_DEL_NOBLOCK);
+
+ event_debug(("timeout_process: event: %p, call %p",
+ ev, ev->ev_callback));
+ event_active_nolock_(ev, EV_TIMEOUT, 1);
+ }
+}
+
+#if (EVLIST_INTERNAL >> 4) != 1
+#error "Mismatch for value of EVLIST_INTERNAL"
+#endif
+
+#ifndef MAX
+#define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+
+#define MAX_EVENT_COUNT(var, v) var = MAX(var, v)
+
+/* These are a fancy way to spell
+ if (flags & EVLIST_INTERNAL)
+ base->event_count--/++;
+*/
+#define DECR_EVENT_COUNT(base,flags) \
+ ((base)->event_count -= (~((flags) >> 4) & 1))
+#define INCR_EVENT_COUNT(base,flags) do { \
+ ((base)->event_count += (~((flags) >> 4) & 1)); \
+ MAX_EVENT_COUNT((base)->event_count_max, (base)->event_count); \
+} while (0)
+
+static void
+event_queue_remove_inserted(struct event_base *base, struct event *ev)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (EVUTIL_FAILURE_CHECK(!(ev->ev_flags & EVLIST_INSERTED))) {
+ event_errx(1, "%s: %p(fd "EV_SOCK_FMT") not on queue %x", __func__,
+ ev, EV_SOCK_ARG(ev->ev_fd), EVLIST_INSERTED);
+ return;
+ }
+ DECR_EVENT_COUNT(base, ev->ev_flags);
+ ev->ev_flags &= ~EVLIST_INSERTED;
+}
+static void
+event_queue_remove_active(struct event_base *base, struct event_callback *evcb)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (EVUTIL_FAILURE_CHECK(!(evcb->evcb_flags & EVLIST_ACTIVE))) {
+ event_errx(1, "%s: %p not on queue %x", __func__,
+ evcb, EVLIST_ACTIVE);
+ return;
+ }
+ DECR_EVENT_COUNT(base, evcb->evcb_flags);
+ evcb->evcb_flags &= ~EVLIST_ACTIVE;
+ base->event_count_active--;
+
+ TAILQ_REMOVE(&base->activequeues[evcb->evcb_pri],
+ evcb, evcb_active_next);
+}
+static void
+event_queue_remove_active_later(struct event_base *base, struct event_callback *evcb)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (EVUTIL_FAILURE_CHECK(!(evcb->evcb_flags & EVLIST_ACTIVE_LATER))) {
+ event_errx(1, "%s: %p not on queue %x", __func__,
+ evcb, EVLIST_ACTIVE_LATER);
+ return;
+ }
+ DECR_EVENT_COUNT(base, evcb->evcb_flags);
+ evcb->evcb_flags &= ~EVLIST_ACTIVE_LATER;
+ base->event_count_active--;
+
+ TAILQ_REMOVE(&base->active_later_queue, evcb, evcb_active_next);
+}
+static void
+event_queue_remove_timeout(struct event_base *base, struct event *ev)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (EVUTIL_FAILURE_CHECK(!(ev->ev_flags & EVLIST_TIMEOUT))) {
+ event_errx(1, "%s: %p(fd "EV_SOCK_FMT") not on queue %x", __func__,
+ ev, EV_SOCK_ARG(ev->ev_fd), EVLIST_TIMEOUT);
+ return;
+ }
+ DECR_EVENT_COUNT(base, ev->ev_flags);
+ ev->ev_flags &= ~EVLIST_TIMEOUT;
+
+ if (is_common_timeout(&ev->ev_timeout, base)) {
+ struct common_timeout_list *ctl =
+ get_common_timeout_list(base, &ev->ev_timeout);
+ TAILQ_REMOVE(&ctl->events, ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+ } else {
+ min_heap_erase_(&base->timeheap, ev);
+ }
+}
+
+#ifdef USE_REINSERT_TIMEOUT
+/* Remove and reinsert 'ev' into the timeout queue. */
+static void
+event_queue_reinsert_timeout(struct event_base *base, struct event *ev,
+ int was_common, int is_common, int old_timeout_idx)
+{
+ struct common_timeout_list *ctl;
+ if (!(ev->ev_flags & EVLIST_TIMEOUT)) {
+ event_queue_insert_timeout(base, ev);
+ return;
+ }
+
+ switch ((was_common<<1) | is_common) {
+ case 3: /* Changing from one common timeout to another */
+ ctl = base->common_timeout_queues[old_timeout_idx];
+ TAILQ_REMOVE(&ctl->events, ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+ ctl = get_common_timeout_list(base, &ev->ev_timeout);
+ insert_common_timeout_inorder(ctl, ev);
+ break;
+ case 2: /* Was common; is no longer common */
+ ctl = base->common_timeout_queues[old_timeout_idx];
+ TAILQ_REMOVE(&ctl->events, ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+ min_heap_push_(&base->timeheap, ev);
+ break;
+ case 1: /* Wasn't common; has become common. */
+ min_heap_erase_(&base->timeheap, ev);
+ ctl = get_common_timeout_list(base, &ev->ev_timeout);
+ insert_common_timeout_inorder(ctl, ev);
+ break;
+ case 0: /* was in heap; is still on heap. */
+ min_heap_adjust_(&base->timeheap, ev);
+ break;
+ default:
+ EVUTIL_ASSERT(0); /* unreachable */
+ break;
+ }
+}
+#endif
+
+/* Add 'ev' to the common timeout list in 'ev'. */
+static void
+insert_common_timeout_inorder(struct common_timeout_list *ctl,
+ struct event *ev)
+{
+ struct event *e;
+ /* By all logic, we should just be able to append 'ev' to the end of
+ * ctl->events, since the timeout on each 'ev' is set to {the common
+ * timeout} + {the time when we add the event}, and so the events
+ * should arrive in order of their timeeouts. But just in case
+ * there's some wacky threading issue going on, we do a search from
+ * the end of 'ev' to find the right insertion point.
+ */
+ TAILQ_FOREACH_REVERSE(e, &ctl->events,
+ event_list, ev_timeout_pos.ev_next_with_common_timeout) {
+ /* This timercmp is a little sneaky, since both ev and e have
+ * magic values in tv_usec. Fortunately, they ought to have
+ * the _same_ magic values in tv_usec. Let's assert for that.
+ */
+ EVUTIL_ASSERT(
+ is_same_common_timeout(&e->ev_timeout, &ev->ev_timeout));
+ if (evutil_timercmp(&ev->ev_timeout, &e->ev_timeout, >=)) {
+ TAILQ_INSERT_AFTER(&ctl->events, e, ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+ return;
+ }
+ }
+ TAILQ_INSERT_HEAD(&ctl->events, ev,
+ ev_timeout_pos.ev_next_with_common_timeout);
+}
+
+static void
+event_queue_insert_inserted(struct event_base *base, struct event *ev)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (EVUTIL_FAILURE_CHECK(ev->ev_flags & EVLIST_INSERTED)) {
+ event_errx(1, "%s: %p(fd "EV_SOCK_FMT") already inserted", __func__,
+ ev, EV_SOCK_ARG(ev->ev_fd));
+ return;
+ }
+
+ INCR_EVENT_COUNT(base, ev->ev_flags);
+
+ ev->ev_flags |= EVLIST_INSERTED;
+}
+
+static void
+event_queue_insert_active(struct event_base *base, struct event_callback *evcb)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (evcb->evcb_flags & EVLIST_ACTIVE) {
+ /* Double insertion is possible for active events */
+ return;
+ }
+
+ INCR_EVENT_COUNT(base, evcb->evcb_flags);
+
+ evcb->evcb_flags |= EVLIST_ACTIVE;
+
+ base->event_count_active++;
+ MAX_EVENT_COUNT(base->event_count_active_max, base->event_count_active);
+ EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues);
+ TAILQ_INSERT_TAIL(&base->activequeues[evcb->evcb_pri],
+ evcb, evcb_active_next);
+}
+
+static void
+event_queue_insert_active_later(struct event_base *base, struct event_callback *evcb)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+ if (evcb->evcb_flags & (EVLIST_ACTIVE_LATER|EVLIST_ACTIVE)) {
+ /* Double insertion is possible */
+ return;
+ }
+
+ INCR_EVENT_COUNT(base, evcb->evcb_flags);
+ evcb->evcb_flags |= EVLIST_ACTIVE_LATER;
+ base->event_count_active++;
+ MAX_EVENT_COUNT(base->event_count_active_max, base->event_count_active);
+ EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues);
+ TAILQ_INSERT_TAIL(&base->active_later_queue, evcb, evcb_active_next);
+}
+
+static void
+event_queue_insert_timeout(struct event_base *base, struct event *ev)
+{
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ if (EVUTIL_FAILURE_CHECK(ev->ev_flags & EVLIST_TIMEOUT)) {
+ event_errx(1, "%s: %p(fd "EV_SOCK_FMT") already on timeout", __func__,
+ ev, EV_SOCK_ARG(ev->ev_fd));
+ return;
+ }
+
+ INCR_EVENT_COUNT(base, ev->ev_flags);
+
+ ev->ev_flags |= EVLIST_TIMEOUT;
+
+ if (is_common_timeout(&ev->ev_timeout, base)) {
+ struct common_timeout_list *ctl =
+ get_common_timeout_list(base, &ev->ev_timeout);
+ insert_common_timeout_inorder(ctl, ev);
+ } else {
+ min_heap_push_(&base->timeheap, ev);
+ }
+}
+
+static void
+event_queue_make_later_events_active(struct event_base *base)
+{
+ struct event_callback *evcb;
+ EVENT_BASE_ASSERT_LOCKED(base);
+
+ while ((evcb = TAILQ_FIRST(&base->active_later_queue))) {
+ TAILQ_REMOVE(&base->active_later_queue, evcb, evcb_active_next);
+ evcb->evcb_flags = (evcb->evcb_flags & ~EVLIST_ACTIVE_LATER) | EVLIST_ACTIVE;
+ EVUTIL_ASSERT(evcb->evcb_pri < base->nactivequeues);
+ TAILQ_INSERT_TAIL(&base->activequeues[evcb->evcb_pri], evcb, evcb_active_next);
+ base->n_deferreds_queued += (evcb->evcb_closure == EV_CLOSURE_CB_SELF);
+ }
+}
+
+/* Functions for debugging */
+
+const char *
+event_get_version(void)
+{
+ return (EVENT__VERSION);
+}
+
+ev_uint32_t
+event_get_version_number(void)
+{
+ return (EVENT__NUMERIC_VERSION);
+}
+
+/*
+ * No thread-safe interface needed - the information should be the same
+ * for all threads.
+ */
+
+const char *
+event_get_method(void)
+{
+ return (current_base->evsel->name);
+}
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+static void *(*mm_malloc_fn_)(size_t sz) = NULL;
+static void *(*mm_realloc_fn_)(void *p, size_t sz) = NULL;
+static void (*mm_free_fn_)(void *p) = NULL;
+
+void *
+event_mm_malloc_(size_t sz)
+{
+ if (sz == 0)
+ return NULL;
+
+ if (mm_malloc_fn_)
+ return mm_malloc_fn_(sz);
+ else
+ return malloc(sz);
+}
+
+void *
+event_mm_calloc_(size_t count, size_t size)
+{
+ if (count == 0 || size == 0)
+ return NULL;
+
+ if (mm_malloc_fn_) {
+ size_t sz = count * size;
+ void *p = NULL;
+ if (count > EV_SIZE_MAX / size)
+ goto error;
+ p = mm_malloc_fn_(sz);
+ if (p)
+ return memset(p, 0, sz);
+ } else {
+ void *p = calloc(count, size);
+#ifdef _WIN32
+ /* Windows calloc doesn't reliably set ENOMEM */
+ if (p == NULL)
+ goto error;
+#endif
+ return p;
+ }
+
+error:
+ errno = ENOMEM;
+ return NULL;
+}
+
+char *
+event_mm_strdup_(const char *str)
+{
+ if (!str) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ if (mm_malloc_fn_) {
+ size_t ln = strlen(str);
+ void *p = NULL;
+ if (ln == EV_SIZE_MAX)
+ goto error;
+ p = mm_malloc_fn_(ln+1);
+ if (p)
+ return memcpy(p, str, ln+1);
+ } else
+#ifdef _WIN32
+ return _strdup(str);
+#else
+ return strdup(str);
+#endif
+
+error:
+ errno = ENOMEM;
+ return NULL;
+}
+
+void *
+event_mm_realloc_(void *ptr, size_t sz)
+{
+ if (mm_realloc_fn_)
+ return mm_realloc_fn_(ptr, sz);
+ else
+ return realloc(ptr, sz);
+}
+
+void
+event_mm_free_(void *ptr)
+{
+ if (mm_free_fn_)
+ mm_free_fn_(ptr);
+ else
+ free(ptr);
+}
+
+void
+event_set_mem_functions(void *(*malloc_fn)(size_t sz),
+ void *(*realloc_fn)(void *ptr, size_t sz),
+ void (*free_fn)(void *ptr))
+{
+ mm_malloc_fn_ = malloc_fn;
+ mm_realloc_fn_ = realloc_fn;
+ mm_free_fn_ = free_fn;
+}
+#endif
+
+#ifdef EVENT__HAVE_EVENTFD
+static void
+evthread_notify_drain_eventfd(evutil_socket_t fd, short what, void *arg)
+{
+ ev_uint64_t msg;
+ ev_ssize_t r;
+ struct event_base *base = arg;
+
+ r = read(fd, (void*) &msg, sizeof(msg));
+ if (r<0 && errno != EAGAIN) {
+ event_sock_warn(fd, "Error reading from eventfd");
+ }
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ base->is_notify_pending = 0;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+#endif
+
+static void
+evthread_notify_drain_default(evutil_socket_t fd, short what, void *arg)
+{
+ unsigned char buf[1024];
+ struct event_base *base = arg;
+#ifdef _WIN32
+ while (recv(fd, (char*)buf, sizeof(buf), 0) > 0)
+ ;
+#else
+ while (read(fd, (char*)buf, sizeof(buf)) > 0)
+ ;
+#endif
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ base->is_notify_pending = 0;
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+int
+evthread_make_base_notifiable(struct event_base *base)
+{
+ int r;
+ if (!base)
+ return -1;
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ r = evthread_make_base_notifiable_nolock_(base);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+static int
+evthread_make_base_notifiable_nolock_(struct event_base *base)
+{
+ void (*cb)(evutil_socket_t, short, void *);
+ int (*notify)(struct event_base *);
+
+ if (base->th_notify_fn != NULL) {
+ /* The base is already notifiable: we're doing fine. */
+ return 0;
+ }
+
+#if defined(EVENT__HAVE_WORKING_KQUEUE)
+ if (base->evsel == &kqops && event_kq_add_notify_event_(base) == 0) {
+ base->th_notify_fn = event_kq_notify_base_;
+ /* No need to add an event here; the backend can wake
+ * itself up just fine. */
+ return 0;
+ }
+#endif
+
+#ifdef EVENT__HAVE_EVENTFD
+ base->th_notify_fd[0] = evutil_eventfd_(0,
+ EVUTIL_EFD_CLOEXEC|EVUTIL_EFD_NONBLOCK);
+ if (base->th_notify_fd[0] >= 0) {
+ base->th_notify_fd[1] = -1;
+ notify = evthread_notify_base_eventfd;
+ cb = evthread_notify_drain_eventfd;
+ } else
+#endif
+ if (evutil_make_internal_pipe_(base->th_notify_fd) == 0) {
+ notify = evthread_notify_base_default;
+ cb = evthread_notify_drain_default;
+ } else {
+ return -1;
+ }
+
+ base->th_notify_fn = notify;
+
+ /* prepare an event that we can use for wakeup */
+ event_assign(&base->th_notify, base, base->th_notify_fd[0],
+ EV_READ|EV_PERSIST, cb, base);
+
+ /* we need to mark this as internal event */
+ base->th_notify.ev_flags |= EVLIST_INTERNAL;
+ event_priority_set(&base->th_notify, 0);
+
+ return event_add_nolock_(&base->th_notify, NULL, 0);
+}
+
+int
+event_base_foreach_event_nolock_(struct event_base *base,
+ event_base_foreach_event_cb fn, void *arg)
+{
+ int r, i;
+ unsigned u;
+ struct event *ev;
+
+ /* Start out with all the EVLIST_INSERTED events. */
+ if ((r = evmap_foreach_event_(base, fn, arg)))
+ return r;
+
+ /* Okay, now we deal with those events that have timeouts and are in
+ * the min-heap. */
+ for (u = 0; u < base->timeheap.n; ++u) {
+ ev = base->timeheap.p[u];
+ if (ev->ev_flags & EVLIST_INSERTED) {
+ /* we already processed this one */
+ continue;
+ }
+ if ((r = fn(base, ev, arg)))
+ return r;
+ }
+
+ /* Now for the events in one of the timeout queues.
+ * the min-heap. */
+ for (i = 0; i < base->n_common_timeouts; ++i) {
+ struct common_timeout_list *ctl =
+ base->common_timeout_queues[i];
+ TAILQ_FOREACH(ev, &ctl->events,
+ ev_timeout_pos.ev_next_with_common_timeout) {
+ if (ev->ev_flags & EVLIST_INSERTED) {
+ /* we already processed this one */
+ continue;
+ }
+ if ((r = fn(base, ev, arg)))
+ return r;
+ }
+ }
+
+ /* Finally, we deal wit all the active events that we haven't touched
+ * yet. */
+ for (i = 0; i < base->nactivequeues; ++i) {
+ struct event_callback *evcb;
+ TAILQ_FOREACH(evcb, &base->activequeues[i], evcb_active_next) {
+ if ((evcb->evcb_flags & (EVLIST_INIT|EVLIST_INSERTED|EVLIST_TIMEOUT)) != EVLIST_INIT) {
+ /* This isn't an event (evlist_init clear), or
+ * we already processed it. (inserted or
+ * timeout set */
+ continue;
+ }
+ ev = event_callback_to_event(evcb);
+ if ((r = fn(base, ev, arg)))
+ return r;
+ }
+ }
+
+ return 0;
+}
+
+/* Helper for event_base_dump_events: called on each event in the event base;
+ * dumps only the inserted events. */
+static int
+dump_inserted_event_fn(const struct event_base *base, const struct event *e, void *arg)
+{
+ FILE *output = arg;
+ const char *gloss = (e->ev_events & EV_SIGNAL) ?
+ "sig" : "fd ";
+
+ if (! (e->ev_flags & (EVLIST_INSERTED|EVLIST_TIMEOUT)))
+ return 0;
+
+ fprintf(output, " %p [%s "EV_SOCK_FMT"]%s%s%s%s%s%s",
+ (void*)e, gloss, EV_SOCK_ARG(e->ev_fd),
+ (e->ev_events&EV_READ)?" Read":"",
+ (e->ev_events&EV_WRITE)?" Write":"",
+ (e->ev_events&EV_CLOSED)?" EOF":"",
+ (e->ev_events&EV_SIGNAL)?" Signal":"",
+ (e->ev_events&EV_PERSIST)?" Persist":"",
+ (e->ev_flags&EVLIST_INTERNAL)?" Internal":"");
+ if (e->ev_flags & EVLIST_TIMEOUT) {
+ struct timeval tv;
+ tv.tv_sec = e->ev_timeout.tv_sec;
+ tv.tv_usec = e->ev_timeout.tv_usec & MICROSECONDS_MASK;
+ evutil_timeradd(&tv, &base->tv_clock_diff, &tv);
+ fprintf(output, " Timeout=%ld.%06d",
+ (long)tv.tv_sec, (int)(tv.tv_usec & MICROSECONDS_MASK));
+ }
+ fputc('\n', output);
+
+ return 0;
+}
+
+/* Helper for event_base_dump_events: called on each event in the event base;
+ * dumps only the active events. */
+static int
+dump_active_event_fn(const struct event_base *base, const struct event *e, void *arg)
+{
+ FILE *output = arg;
+ const char *gloss = (e->ev_events & EV_SIGNAL) ?
+ "sig" : "fd ";
+
+ if (! (e->ev_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)))
+ return 0;
+
+ fprintf(output, " %p [%s "EV_SOCK_FMT", priority=%d]%s%s%s%s%s active%s%s\n",
+ (void*)e, gloss, EV_SOCK_ARG(e->ev_fd), e->ev_pri,
+ (e->ev_res&EV_READ)?" Read":"",
+ (e->ev_res&EV_WRITE)?" Write":"",
+ (e->ev_res&EV_CLOSED)?" EOF":"",
+ (e->ev_res&EV_SIGNAL)?" Signal":"",
+ (e->ev_res&EV_TIMEOUT)?" Timeout":"",
+ (e->ev_flags&EVLIST_INTERNAL)?" [Internal]":"",
+ (e->ev_flags&EVLIST_ACTIVE_LATER)?" [NextTime]":"");
+
+ return 0;
+}
+
+int
+event_base_foreach_event(struct event_base *base,
+ event_base_foreach_event_cb fn, void *arg)
+{
+ int r;
+ if ((!fn) || (!base)) {
+ return -1;
+ }
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ r = event_base_foreach_event_nolock_(base, fn, arg);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+ return r;
+}
+
+
+void
+event_base_dump_events(struct event_base *base, FILE *output)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ fprintf(output, "Inserted events:\n");
+ event_base_foreach_event_nolock_(base, dump_inserted_event_fn, output);
+
+ fprintf(output, "Active events:\n");
+ event_base_foreach_event_nolock_(base, dump_active_event_fn, output);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+void
+event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ evmap_io_active_(base, fd, events & (EV_READ|EV_WRITE|EV_CLOSED));
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+void
+event_base_active_by_signal(struct event_base *base, int sig)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ evmap_signal_active_(base, sig, 1);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+
+void
+event_base_add_virtual_(struct event_base *base)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ base->virtual_event_count++;
+ MAX_EVENT_COUNT(base->virtual_event_count_max, base->virtual_event_count);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+void
+event_base_del_virtual_(struct event_base *base)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ EVUTIL_ASSERT(base->virtual_event_count > 0);
+ base->virtual_event_count--;
+ if (base->virtual_event_count == 0 && EVBASE_NEED_NOTIFY(base))
+ evthread_notify_base(base);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+static void
+event_free_debug_globals_locks(void)
+{
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ if (event_debug_map_lock_ != NULL) {
+ EVTHREAD_FREE_LOCK(event_debug_map_lock_, 0);
+ event_debug_map_lock_ = NULL;
+ }
+#endif /* EVENT__DISABLE_DEBUG_MODE */
+#endif /* EVENT__DISABLE_THREAD_SUPPORT */
+ return;
+}
+
+static void
+event_free_debug_globals(void)
+{
+ event_free_debug_globals_locks();
+}
+
+static void
+event_free_evsig_globals(void)
+{
+ evsig_free_globals_();
+}
+
+static void
+event_free_evutil_globals(void)
+{
+ evutil_free_globals_();
+}
+
+static void
+event_free_globals(void)
+{
+ event_free_debug_globals();
+ event_free_evsig_globals();
+ event_free_evutil_globals();
+}
+
+void
+libevent_global_shutdown(void)
+{
+ event_free_globals();
+}
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+event_global_setup_locks_(const int enable_locks)
+{
+#ifndef EVENT__DISABLE_DEBUG_MODE
+ EVTHREAD_SETUP_GLOBAL_LOCK(event_debug_map_lock_, 0);
+#endif
+ if (evsig_global_setup_locks_(enable_locks) < 0)
+ return -1;
+ if (evutil_global_setup_locks_(enable_locks) < 0)
+ return -1;
+ if (evutil_secure_rng_global_setup_locks_(enable_locks) < 0)
+ return -1;
+ return 0;
+}
+#endif
+
+void
+event_base_assert_ok_(struct event_base *base)
+{
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ event_base_assert_ok_nolock_(base);
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+void
+event_base_assert_ok_nolock_(struct event_base *base)
+{
+ int i;
+ int count;
+
+ /* First do checks on the per-fd and per-signal lists */
+ evmap_check_integrity_(base);
+
+ /* Check the heap property */
+ for (i = 1; i < (int)base->timeheap.n; ++i) {
+ int parent = (i - 1) / 2;
+ struct event *ev, *p_ev;
+ ev = base->timeheap.p[i];
+ p_ev = base->timeheap.p[parent];
+ EVUTIL_ASSERT(ev->ev_flags & EVLIST_TIMEOUT);
+ EVUTIL_ASSERT(evutil_timercmp(&p_ev->ev_timeout, &ev->ev_timeout, <=));
+ EVUTIL_ASSERT(ev->ev_timeout_pos.min_heap_idx == i);
+ }
+
+ /* Check that the common timeouts are fine */
+ for (i = 0; i < base->n_common_timeouts; ++i) {
+ struct common_timeout_list *ctl = base->common_timeout_queues[i];
+ struct event *last=NULL, *ev;
+
+ EVUTIL_ASSERT_TAILQ_OK(&ctl->events, event, ev_timeout_pos.ev_next_with_common_timeout);
+
+ TAILQ_FOREACH(ev, &ctl->events, ev_timeout_pos.ev_next_with_common_timeout) {
+ if (last)
+ EVUTIL_ASSERT(evutil_timercmp(&last->ev_timeout, &ev->ev_timeout, <=));
+ EVUTIL_ASSERT(ev->ev_flags & EVLIST_TIMEOUT);
+ EVUTIL_ASSERT(is_common_timeout(&ev->ev_timeout,base));
+ EVUTIL_ASSERT(COMMON_TIMEOUT_IDX(&ev->ev_timeout) == i);
+ last = ev;
+ }
+ }
+
+ /* Check the active queues. */
+ count = 0;
+ for (i = 0; i < base->nactivequeues; ++i) {
+ struct event_callback *evcb;
+ EVUTIL_ASSERT_TAILQ_OK(&base->activequeues[i], event_callback, evcb_active_next);
+ TAILQ_FOREACH(evcb, &base->activequeues[i], evcb_active_next) {
+ EVUTIL_ASSERT((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) == EVLIST_ACTIVE);
+ EVUTIL_ASSERT(evcb->evcb_pri == i);
+ ++count;
+ }
+ }
+
+ {
+ struct event_callback *evcb;
+ TAILQ_FOREACH(evcb, &base->active_later_queue, evcb_active_next) {
+ EVUTIL_ASSERT((evcb->evcb_flags & (EVLIST_ACTIVE|EVLIST_ACTIVE_LATER)) == EVLIST_ACTIVE_LATER);
+ ++count;
+ }
+ }
+ EVUTIL_ASSERT(count == base->event_count_active);
+}
diff --git a/sntp/libevent/event_iocp.c b/sntp/libevent/event_iocp.c
new file mode 100644
index 000000000000..a9902fbc426e
--- /dev/null
+++ b/sntp/libevent/event_iocp.c
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "evconfig-private.h"
+
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
+#include <winsock2.h>
+#include <windows.h>
+#include <process.h>
+#include <stdio.h>
+#include <mswsock.h>
+
+#include "event2/util.h"
+#include "util-internal.h"
+#include "iocp-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "event-internal.h"
+#include "evthread-internal.h"
+
+#define NOTIFICATION_KEY ((ULONG_PTR)-1)
+
+void
+event_overlapped_init_(struct event_overlapped *o, iocp_callback cb)
+{
+ memset(o, 0, sizeof(struct event_overlapped));
+ o->cb = cb;
+}
+
+static void
+handle_entry(OVERLAPPED *o, ULONG_PTR completion_key, DWORD nBytes, int ok)
+{
+ struct event_overlapped *eo =
+ EVUTIL_UPCAST(o, struct event_overlapped, overlapped);
+ eo->cb(eo, completion_key, nBytes, ok);
+}
+
+static void
+loop(void *port_)
+{
+ struct event_iocp_port *port = port_;
+ long ms = port->ms;
+ HANDLE p = port->port;
+
+ if (ms <= 0)
+ ms = INFINITE;
+
+ while (1) {
+ OVERLAPPED *overlapped=NULL;
+ ULONG_PTR key=0;
+ DWORD bytes=0;
+ int ok = GetQueuedCompletionStatus(p, &bytes, &key,
+ &overlapped, ms);
+ EnterCriticalSection(&port->lock);
+ if (port->shutdown) {
+ if (--port->n_live_threads == 0)
+ ReleaseSemaphore(port->shutdownSemaphore, 1,
+ NULL);
+ LeaveCriticalSection(&port->lock);
+ return;
+ }
+ LeaveCriticalSection(&port->lock);
+
+ if (key != NOTIFICATION_KEY && overlapped)
+ handle_entry(overlapped, key, bytes, ok);
+ else if (!overlapped)
+ break;
+ }
+ event_warnx("GetQueuedCompletionStatus exited with no event.");
+ EnterCriticalSection(&port->lock);
+ if (--port->n_live_threads == 0)
+ ReleaseSemaphore(port->shutdownSemaphore, 1, NULL);
+ LeaveCriticalSection(&port->lock);
+}
+
+int
+event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
+ ev_uintptr_t key)
+{
+ HANDLE h;
+ h = CreateIoCompletionPort((HANDLE)fd, port->port, key, port->n_threads);
+ if (!h)
+ return -1;
+ return 0;
+}
+
+static void *
+get_extension_function(SOCKET s, const GUID *which_fn)
+{
+ void *ptr = NULL;
+ DWORD bytes=0;
+ WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER,
+ (GUID*)which_fn, sizeof(*which_fn),
+ &ptr, sizeof(ptr),
+ &bytes, NULL, NULL);
+
+ /* No need to detect errors here: if ptr is set, then we have a good
+ function pointer. Otherwise, we should behave as if we had no
+ function pointer.
+ */
+ return ptr;
+}
+
+/* Mingw doesn't have these in its mswsock.h. The values are copied from
+ wine.h. Perhaps if we copy them exactly, the cargo will come again.
+*/
+#ifndef WSAID_ACCEPTEX
+#define WSAID_ACCEPTEX \
+ {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
+#endif
+#ifndef WSAID_CONNECTEX
+#define WSAID_CONNECTEX \
+ {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}
+#endif
+#ifndef WSAID_GETACCEPTEXSOCKADDRS
+#define WSAID_GETACCEPTEXSOCKADDRS \
+ {0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
+#endif
+
+static int extension_fns_initialized = 0;
+
+static void
+init_extension_functions(struct win32_extension_fns *ext)
+{
+ const GUID acceptex = WSAID_ACCEPTEX;
+ const GUID connectex = WSAID_CONNECTEX;
+ const GUID getacceptexsockaddrs = WSAID_GETACCEPTEXSOCKADDRS;
+ SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s == INVALID_SOCKET)
+ return;
+ ext->AcceptEx = get_extension_function(s, &acceptex);
+ ext->ConnectEx = get_extension_function(s, &connectex);
+ ext->GetAcceptExSockaddrs = get_extension_function(s,
+ &getacceptexsockaddrs);
+ closesocket(s);
+
+ extension_fns_initialized = 1;
+}
+
+static struct win32_extension_fns the_extension_fns;
+
+const struct win32_extension_fns *
+event_get_win32_extension_fns_(void)
+{
+ return &the_extension_fns;
+}
+
+#define N_CPUS_DEFAULT 2
+
+struct event_iocp_port *
+event_iocp_port_launch_(int n_cpus)
+{
+ struct event_iocp_port *port;
+ int i;
+
+ if (!extension_fns_initialized)
+ init_extension_functions(&the_extension_fns);
+
+ if (!(port = mm_calloc(1, sizeof(struct event_iocp_port))))
+ return NULL;
+
+ if (n_cpus <= 0)
+ n_cpus = N_CPUS_DEFAULT;
+ port->n_threads = n_cpus * 2;
+ port->threads = mm_calloc(port->n_threads, sizeof(HANDLE));
+ if (!port->threads)
+ goto err;
+
+ port->port = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0,
+ n_cpus);
+ port->ms = -1;
+ if (!port->port)
+ goto err;
+
+ port->shutdownSemaphore = CreateSemaphore(NULL, 0, 1, NULL);
+ if (!port->shutdownSemaphore)
+ goto err;
+
+ for (i=0; i<port->n_threads; ++i) {
+ ev_uintptr_t th = _beginthread(loop, 0, port);
+ if (th == (ev_uintptr_t)-1)
+ goto err;
+ port->threads[i] = (HANDLE)th;
+ ++port->n_live_threads;
+ }
+
+ InitializeCriticalSectionAndSpinCount(&port->lock, 1000);
+
+ return port;
+err:
+ if (port->port)
+ CloseHandle(port->port);
+ if (port->threads)
+ mm_free(port->threads);
+ if (port->shutdownSemaphore)
+ CloseHandle(port->shutdownSemaphore);
+ mm_free(port);
+ return NULL;
+}
+
+static void
+event_iocp_port_unlock_and_free_(struct event_iocp_port *port)
+{
+ DeleteCriticalSection(&port->lock);
+ CloseHandle(port->port);
+ CloseHandle(port->shutdownSemaphore);
+ mm_free(port->threads);
+ mm_free(port);
+}
+
+static int
+event_iocp_notify_all(struct event_iocp_port *port)
+{
+ int i, r, ok=1;
+ for (i=0; i<port->n_threads; ++i) {
+ r = PostQueuedCompletionStatus(port->port, 0, NOTIFICATION_KEY,
+ NULL);
+ if (!r)
+ ok = 0;
+ }
+ return ok ? 0 : -1;
+}
+
+int
+event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec)
+{
+ DWORD ms = INFINITE;
+ int n;
+
+ EnterCriticalSection(&port->lock);
+ port->shutdown = 1;
+ LeaveCriticalSection(&port->lock);
+ event_iocp_notify_all(port);
+
+ if (waitMsec >= 0)
+ ms = waitMsec;
+
+ WaitForSingleObject(port->shutdownSemaphore, ms);
+ EnterCriticalSection(&port->lock);
+ n = port->n_live_threads;
+ LeaveCriticalSection(&port->lock);
+ if (n == 0) {
+ event_iocp_port_unlock_and_free_(port);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+int
+event_iocp_activate_overlapped_(
+ struct event_iocp_port *port, struct event_overlapped *o,
+ ev_uintptr_t key, ev_uint32_t n)
+{
+ BOOL r;
+
+ r = PostQueuedCompletionStatus(port->port, n, key, &o->overlapped);
+ return (r==0) ? -1 : 0;
+}
+
+struct event_iocp_port *
+event_base_get_iocp_(struct event_base *base)
+{
+#ifdef _WIN32
+ return base->iocp;
+#else
+ return NULL;
+#endif
+}
diff --git a/sntp/libevent/event_rpcgen.py b/sntp/libevent/event_rpcgen.py
new file mode 100755
index 000000000000..c5375656969e
--- /dev/null
+++ b/sntp/libevent/event_rpcgen.py
@@ -0,0 +1,1728 @@
+#!/usr/bin/env python2
+#
+# Copyright (c) 2005-2007 Niels Provos <provos@citi.umich.edu>
+# Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+# All rights reserved.
+#
+# Generates marshaling code based on libevent.
+
+# TODO:
+# 1) use optparse to allow the strategy shell to parse options, and
+# to allow the instantiated factory (for the specific output language)
+# to parse remaining options
+# 2) move the globals into a class that manages execution (including the
+# progress outputs that space stderr at the moment)
+# 3) emit other languages
+
+import sys
+import re
+
+_NAME = "event_rpcgen.py"
+_VERSION = "0.1"
+
+# Globals
+line_count = 0
+
+white = re.compile(r'\s+')
+cppcomment = re.compile(r'\/\/.*$')
+nonident = re.compile(r'[^a-zA-Z0-9_]')
+structref = re.compile(r'^struct\[([a-zA-Z_][a-zA-Z0-9_]*)\]$')
+structdef = re.compile(r'^struct +[a-zA-Z_][a-zA-Z0-9_]* *{$')
+
+headerdirect = []
+cppdirect = []
+
+QUIETLY = 0
+
+def declare(s):
+ if not QUIETLY:
+ print s
+
+def TranslateList(mylist, mydict):
+ return map(lambda x: x % mydict, mylist)
+
+# Exception class for parse errors
+class RpcGenError(Exception):
+ def __init__(self, why):
+ self.why = why
+ def __str__(self):
+ return str(self.why)
+
+# Holds everything that makes a struct
+class Struct:
+ def __init__(self, name):
+ self._name = name
+ self._entries = []
+ self._tags = {}
+ declare(' Created struct: %s' % name)
+
+ def AddEntry(self, entry):
+ if self._tags.has_key(entry.Tag()):
+ raise RpcGenError(
+ 'Entry "%s" duplicates tag number %d from "%s" '
+ 'around line %d' % (entry.Name(), entry.Tag(),
+ self._tags[entry.Tag()], line_count))
+ self._entries.append(entry)
+ self._tags[entry.Tag()] = entry.Name()
+ declare(' Added entry: %s' % entry.Name())
+
+ def Name(self):
+ return self._name
+
+ def EntryTagName(self, entry):
+ """Creates the name inside an enumeration for distinguishing data
+ types."""
+ name = "%s_%s" % (self._name, entry.Name())
+ return name.upper()
+
+ def PrintIndented(self, file, ident, code):
+ """Takes an array, add indentation to each entry and prints it."""
+ for entry in code:
+ print >>file, '%s%s' % (ident, entry)
+
+class StructCCode(Struct):
+ """ Knows how to generate C code for a struct """
+
+ def __init__(self, name):
+ Struct.__init__(self, name)
+
+ def PrintTags(self, file):
+ """Prints the tag definitions for a structure."""
+ print >>file, '/* Tag definition for %s */' % self._name
+ print >>file, 'enum %s_ {' % self._name.lower()
+ for entry in self._entries:
+ print >>file, ' %s=%d,' % (self.EntryTagName(entry),
+ entry.Tag())
+ print >>file, ' %s_MAX_TAGS' % (self._name.upper())
+ print >>file, '};\n'
+
+ def PrintForwardDeclaration(self, file):
+ print >>file, 'struct %s;' % self._name
+
+ def PrintDeclaration(self, file):
+ print >>file, '/* Structure declaration for %s */' % self._name
+ print >>file, 'struct %s_access_ {' % self._name
+ for entry in self._entries:
+ dcl = entry.AssignDeclaration('(*%s_assign)' % entry.Name())
+ dcl.extend(
+ entry.GetDeclaration('(*%s_get)' % entry.Name()))
+ if entry.Array():
+ dcl.extend(
+ entry.AddDeclaration('(*%s_add)' % entry.Name()))
+ self.PrintIndented(file, ' ', dcl)
+ print >>file, '};\n'
+
+ print >>file, 'struct %s {' % self._name
+ print >>file, ' struct %s_access_ *base;\n' % self._name
+ for entry in self._entries:
+ dcl = entry.Declaration()
+ self.PrintIndented(file, ' ', dcl)
+ print >>file, ''
+ for entry in self._entries:
+ print >>file, ' ev_uint8_t %s_set;' % entry.Name()
+ print >>file, '};\n'
+
+ print >>file, \
+"""struct %(name)s *%(name)s_new(void);
+struct %(name)s *%(name)s_new_with_arg(void *);
+void %(name)s_free(struct %(name)s *);
+void %(name)s_clear(struct %(name)s *);
+void %(name)s_marshal(struct evbuffer *, const struct %(name)s *);
+int %(name)s_unmarshal(struct %(name)s *, struct evbuffer *);
+int %(name)s_complete(struct %(name)s *);
+void evtag_marshal_%(name)s(struct evbuffer *, ev_uint32_t,
+ const struct %(name)s *);
+int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t,
+ struct %(name)s *);""" % { 'name' : self._name }
+
+
+ # Write a setting function of every variable
+ for entry in self._entries:
+ self.PrintIndented(file, '', entry.AssignDeclaration(
+ entry.AssignFuncName()))
+ self.PrintIndented(file, '', entry.GetDeclaration(
+ entry.GetFuncName()))
+ if entry.Array():
+ self.PrintIndented(file, '', entry.AddDeclaration(
+ entry.AddFuncName()))
+
+ print >>file, '/* --- %s done --- */\n' % self._name
+
+ def PrintCode(self, file):
+ print >>file, ('/*\n'
+ ' * Implementation of %s\n'
+ ' */\n') % self._name
+
+ print >>file, \
+ 'static struct %(name)s_access_ %(name)s_base__ = {' % \
+ { 'name' : self._name }
+ for entry in self._entries:
+ self.PrintIndented(file, ' ', entry.CodeBase())
+ print >>file, '};\n'
+
+ # Creation
+ print >>file, (
+ 'struct %(name)s *\n'
+ '%(name)s_new(void)\n'
+ '{\n'
+ ' return %(name)s_new_with_arg(NULL);\n'
+ '}\n'
+ '\n'
+ 'struct %(name)s *\n'
+ '%(name)s_new_with_arg(void *unused)\n'
+ '{\n'
+ ' struct %(name)s *tmp;\n'
+ ' if ((tmp = malloc(sizeof(struct %(name)s))) == NULL) {\n'
+ ' event_warn("%%s: malloc", __func__);\n'
+ ' return (NULL);\n'
+ ' }\n'
+ ' tmp->base = &%(name)s_base__;\n') % { 'name' : self._name }
+
+ for entry in self._entries:
+ self.PrintIndented(file, ' ', entry.CodeInitialize('tmp'))
+ print >>file, ' tmp->%s_set = 0;\n' % entry.Name()
+
+ print >>file, (
+ ' return (tmp);\n'
+ '}\n')
+
+ # Adding
+ for entry in self._entries:
+ if entry.Array():
+ self.PrintIndented(file, '', entry.CodeAdd())
+ print >>file, ''
+
+ # Assigning
+ for entry in self._entries:
+ self.PrintIndented(file, '', entry.CodeAssign())
+ print >>file, ''
+
+ # Getting
+ for entry in self._entries:
+ self.PrintIndented(file, '', entry.CodeGet())
+ print >>file, ''
+
+ # Clearing
+ print >>file, ( 'void\n'
+ '%(name)s_clear(struct %(name)s *tmp)\n'
+ '{'
+ ) % { 'name' : self._name }
+ for entry in self._entries:
+ self.PrintIndented(file, ' ', entry.CodeClear('tmp'))
+
+ print >>file, '}\n'
+
+ # Freeing
+ print >>file, ( 'void\n'
+ '%(name)s_free(struct %(name)s *tmp)\n'
+ '{'
+ ) % { 'name' : self._name }
+
+ for entry in self._entries:
+ self.PrintIndented(file, ' ', entry.CodeFree('tmp'))
+
+ print >>file, (' free(tmp);\n'
+ '}\n')
+
+ # Marshaling
+ print >>file, ('void\n'
+ '%(name)s_marshal(struct evbuffer *evbuf, '
+ 'const struct %(name)s *tmp)'
+ '{') % { 'name' : self._name }
+ for entry in self._entries:
+ indent = ' '
+ # Optional entries do not have to be set
+ if entry.Optional():
+ indent += ' '
+ print >>file, ' if (tmp->%s_set) {' % entry.Name()
+ self.PrintIndented(
+ file, indent,
+ entry.CodeMarshal('evbuf', self.EntryTagName(entry),
+ entry.GetVarName('tmp'),
+ entry.GetVarLen('tmp')))
+ if entry.Optional():
+ print >>file, ' }'
+
+ print >>file, '}\n'
+
+ # Unmarshaling
+ print >>file, ('int\n'
+ '%(name)s_unmarshal(struct %(name)s *tmp, '
+ ' struct evbuffer *evbuf)\n'
+ '{\n'
+ ' ev_uint32_t tag;\n'
+ ' while (evbuffer_get_length(evbuf) > 0) {\n'
+ ' if (evtag_peek(evbuf, &tag) == -1)\n'
+ ' return (-1);\n'
+ ' switch (tag) {\n'
+ ) % { 'name' : self._name }
+ for entry in self._entries:
+ print >>file, ' case %s:\n' % self.EntryTagName(entry)
+ if not entry.Array():
+ print >>file, (
+ ' if (tmp->%s_set)\n'
+ ' return (-1);'
+ ) % (entry.Name())
+
+ self.PrintIndented(
+ file, ' ',
+ entry.CodeUnmarshal('evbuf',
+ self.EntryTagName(entry),
+ entry.GetVarName('tmp'),
+ entry.GetVarLen('tmp')))
+
+ print >>file, ( ' tmp->%s_set = 1;\n' % entry.Name() +
+ ' break;\n' )
+ print >>file, ( ' default:\n'
+ ' return -1;\n'
+ ' }\n'
+ ' }\n' )
+ # Check if it was decoded completely
+ print >>file, ( ' if (%(name)s_complete(tmp) == -1)\n'
+ ' return (-1);'
+ ) % { 'name' : self._name }
+
+ # Successfully decoded
+ print >>file, ( ' return (0);\n'
+ '}\n')
+
+ # Checking if a structure has all the required data
+ print >>file, (
+ 'int\n'
+ '%(name)s_complete(struct %(name)s *msg)\n'
+ '{' ) % { 'name' : self._name }
+ for entry in self._entries:
+ if not entry.Optional():
+ code = [
+ 'if (!msg->%(name)s_set)',
+ ' return (-1);' ]
+ code = TranslateList(code, entry.GetTranslation())
+ self.PrintIndented(
+ file, ' ', code)
+
+ self.PrintIndented(
+ file, ' ',
+ entry.CodeComplete('msg', entry.GetVarName('msg')))
+ print >>file, (
+ ' return (0);\n'
+ '}\n' )
+
+ # Complete message unmarshaling
+ print >>file, (
+ 'int\n'
+ 'evtag_unmarshal_%(name)s(struct evbuffer *evbuf, '
+ 'ev_uint32_t need_tag, struct %(name)s *msg)\n'
+ '{\n'
+ ' ev_uint32_t tag;\n'
+ ' int res = -1;\n'
+ '\n'
+ ' struct evbuffer *tmp = evbuffer_new();\n'
+ '\n'
+ ' if (evtag_unmarshal(evbuf, &tag, tmp) == -1'
+ ' || tag != need_tag)\n'
+ ' goto error;\n'
+ '\n'
+ ' if (%(name)s_unmarshal(msg, tmp) == -1)\n'
+ ' goto error;\n'
+ '\n'
+ ' res = 0;\n'
+ '\n'
+ ' error:\n'
+ ' evbuffer_free(tmp);\n'
+ ' return (res);\n'
+ '}\n' ) % { 'name' : self._name }
+
+ # Complete message marshaling
+ print >>file, (
+ 'void\n'
+ 'evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag, '
+ 'const struct %(name)s *msg)\n'
+ '{\n'
+ ' struct evbuffer *buf_ = evbuffer_new();\n'
+ ' assert(buf_ != NULL);\n'
+ ' %(name)s_marshal(buf_, msg);\n'
+ ' evtag_marshal_buffer(evbuf, tag, buf_);\n '
+ ' evbuffer_free(buf_);\n'
+ '}\n' ) % { 'name' : self._name }
+
+class Entry:
+ def __init__(self, type, name, tag):
+ self._type = type
+ self._name = name
+ self._tag = int(tag)
+ self._ctype = type
+ self._optional = 0
+ self._can_be_array = 0
+ self._array = 0
+ self._line_count = -1
+ self._struct = None
+ self._refname = None
+
+ self._optpointer = True
+ self._optaddarg = True
+
+ def GetInitializer(self):
+ assert 0, "Entry does not provide initializer"
+
+ def SetStruct(self, struct):
+ self._struct = struct
+
+ def LineCount(self):
+ assert self._line_count != -1
+ return self._line_count
+
+ def SetLineCount(self, number):
+ self._line_count = number
+
+ def Array(self):
+ return self._array
+
+ def Optional(self):
+ return self._optional
+
+ def Tag(self):
+ return self._tag
+
+ def Name(self):
+ return self._name
+
+ def Type(self):
+ return self._type
+
+ def MakeArray(self, yes=1):
+ self._array = yes
+
+ def MakeOptional(self):
+ self._optional = 1
+
+ def Verify(self):
+ if self.Array() and not self._can_be_array:
+ raise RpcGenError(
+ 'Entry "%s" cannot be created as an array '
+ 'around line %d' % (self._name, self.LineCount()))
+ if not self._struct:
+ raise RpcGenError(
+ 'Entry "%s" does not know which struct it belongs to '
+ 'around line %d' % (self._name, self.LineCount()))
+ if self._optional and self._array:
+ raise RpcGenError(
+ 'Entry "%s" has illegal combination of optional and array '
+ 'around line %d' % (self._name, self.LineCount()))
+
+ def GetTranslation(self, extradict = {}):
+ mapping = {
+ "parent_name" : self._struct.Name(),
+ "name" : self._name,
+ "ctype" : self._ctype,
+ "refname" : self._refname,
+ "optpointer" : self._optpointer and "*" or "",
+ "optreference" : self._optpointer and "&" or "",
+ "optaddarg" :
+ self._optaddarg and ", const %s value" % self._ctype or ""
+ }
+ for (k, v) in extradict.items():
+ mapping[k] = v
+
+ return mapping
+
+ def GetVarName(self, var):
+ return '%(var)s->%(name)s_data' % self.GetTranslation({ 'var' : var })
+
+ def GetVarLen(self, var):
+ return 'sizeof(%s)' % self._ctype
+
+ def GetFuncName(self):
+ return '%s_%s_get' % (self._struct.Name(), self._name)
+
+ def GetDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, %s *);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def CodeGet(self):
+ code = (
+ 'int',
+ '%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, '
+ '%(ctype)s *value)',
+ '{',
+ ' if (msg->%(name)s_set != 1)',
+ ' return (-1);',
+ ' *value = msg->%(name)s_data;',
+ ' return (0);',
+ '}' )
+ code = '\n'.join(code)
+ code = code % self.GetTranslation()
+ return code.split('\n')
+
+ def AssignFuncName(self):
+ return '%s_%s_assign' % (self._struct.Name(), self._name)
+
+ def AddFuncName(self):
+ return '%s_%s_add' % (self._struct.Name(), self._name)
+
+ def AssignDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, const %s);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def CodeAssign(self):
+ code = [ 'int',
+ '%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,'
+ ' const %(ctype)s value)',
+ '{',
+ ' msg->%(name)s_set = 1;',
+ ' msg->%(name)s_data = value;',
+ ' return (0);',
+ '}' ]
+ code = '\n'.join(code)
+ code = code % self.GetTranslation()
+ return code.split('\n')
+
+ def CodeClear(self, structname):
+ code = [ '%s->%s_set = 0;' % (structname, self.Name()) ]
+
+ return code
+
+ def CodeComplete(self, structname, var_name):
+ return []
+
+ def CodeFree(self, name):
+ return []
+
+ def CodeBase(self):
+ code = [
+ '%(parent_name)s_%(name)s_assign,',
+ '%(parent_name)s_%(name)s_get,'
+ ]
+ if self.Array():
+ code.append('%(parent_name)s_%(name)s_add,')
+
+ code = '\n'.join(code)
+ code = code % self.GetTranslation()
+ return code.split('\n')
+
+class EntryBytes(Entry):
+ def __init__(self, type, name, tag, length):
+ # Init base class
+ Entry.__init__(self, type, name, tag)
+
+ self._length = length
+ self._ctype = 'ev_uint8_t'
+
+ def GetInitializer(self):
+ return "NULL"
+
+ def GetVarLen(self, var):
+ return '(%s)' % self._length
+
+ def CodeArrayAdd(self, varname, value):
+ # XXX: copy here
+ return [ '%(varname)s = NULL;' % { 'varname' : varname } ]
+
+ def GetDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, %s **);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def AssignDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, const %s *);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def Declaration(self):
+ dcl = ['ev_uint8_t %s_data[%s];' % (self._name, self._length)]
+
+ return dcl
+
+ def CodeGet(self):
+ name = self._name
+ code = [ 'int',
+ '%s_%s_get(struct %s *msg, %s **value)' % (
+ self._struct.Name(), name,
+ self._struct.Name(), self._ctype),
+ '{',
+ ' if (msg->%s_set != 1)' % name,
+ ' return (-1);',
+ ' *value = msg->%s_data;' % name,
+ ' return (0);',
+ '}' ]
+ return code
+
+ def CodeAssign(self):
+ name = self._name
+ code = [ 'int',
+ '%s_%s_assign(struct %s *msg, const %s *value)' % (
+ self._struct.Name(), name,
+ self._struct.Name(), self._ctype),
+ '{',
+ ' msg->%s_set = 1;' % name,
+ ' memcpy(msg->%s_data, value, %s);' % (
+ name, self._length),
+ ' return (0);',
+ '}' ]
+ return code
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ code = [ 'if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, '
+ '%(var)s, %(varlen)s) == -1) {',
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ ' return (-1);',
+ '}'
+ ]
+ return TranslateList(code,
+ self.GetTranslation({
+ 'var' : var_name,
+ 'varlen' : var_len,
+ 'buf' : buf,
+ 'tag' : tag_name }))
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = ['evtag_marshal(%s, %s, %s, %s);' % (
+ buf, tag_name, var_name, var_len)]
+ return code
+
+ def CodeClear(self, structname):
+ code = [ '%s->%s_set = 0;' % (structname, self.Name()),
+ 'memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
+ structname, self._name, structname, self._name)]
+
+ return code
+
+ def CodeInitialize(self, name):
+ code = ['memset(%s->%s_data, 0, sizeof(%s->%s_data));' % (
+ name, self._name, name, self._name)]
+ return code
+
+ def Verify(self):
+ if not self._length:
+ raise RpcGenError(
+ 'Entry "%s" needs a length '
+ 'around line %d' % (self._name, self.LineCount()))
+
+ Entry.Verify(self)
+
+class EntryInt(Entry):
+ def __init__(self, type, name, tag, bits=32):
+ # Init base class
+ Entry.__init__(self, type, name, tag)
+
+ self._can_be_array = 1
+ if bits == 32:
+ self._ctype = 'ev_uint32_t'
+ self._marshal_type = 'int'
+ if bits == 64:
+ self._ctype = 'ev_uint64_t'
+ self._marshal_type = 'int64'
+
+ def GetInitializer(self):
+ return "0"
+
+ def CodeArrayFree(self, var):
+ return []
+
+ def CodeArrayAssign(self, varname, srcvar):
+ return [ '%(varname)s = %(srcvar)s;' % { 'varname' : varname,
+ 'srcvar' : srcvar } ]
+
+ def CodeArrayAdd(self, varname, value):
+ """Returns a new entry of this type."""
+ return [ '%(varname)s = %(value)s;' % { 'varname' : varname,
+ 'value' : value } ]
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ code = [
+ 'if (evtag_unmarshal_%(ma)s(%(buf)s, %(tag)s, &%(var)s) == -1) {',
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ ' return (-1);',
+ '}' ]
+ code = '\n'.join(code) % self.GetTranslation({
+ 'ma' : self._marshal_type,
+ 'buf' : buf,
+ 'tag' : tag_name,
+ 'var' : var_name })
+ return code.split('\n')
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = [
+ 'evtag_marshal_%s(%s, %s, %s);' % (
+ self._marshal_type, buf, tag_name, var_name)]
+ return code
+
+ def Declaration(self):
+ dcl = ['%s %s_data;' % (self._ctype, self._name)]
+
+ return dcl
+
+ def CodeInitialize(self, name):
+ code = ['%s->%s_data = 0;' % (name, self._name)]
+ return code
+
+class EntryString(Entry):
+ def __init__(self, type, name, tag):
+ # Init base class
+ Entry.__init__(self, type, name, tag)
+
+ self._can_be_array = 1
+ self._ctype = 'char *'
+
+ def GetInitializer(self):
+ return "NULL"
+
+ def CodeArrayFree(self, varname):
+ code = [
+ 'if (%(var)s != NULL) free(%(var)s);' ]
+
+ return TranslateList(code, { 'var' : varname })
+
+ def CodeArrayAssign(self, varname, srcvar):
+ code = [
+ 'if (%(var)s != NULL)',
+ ' free(%(var)s);',
+ '%(var)s = strdup(%(srcvar)s);',
+ 'if (%(var)s == NULL) {',
+ ' event_warnx("%%s: strdup", __func__);',
+ ' return (-1);',
+ '}' ]
+
+ return TranslateList(code, { 'var' : varname,
+ 'srcvar' : srcvar })
+
+ def CodeArrayAdd(self, varname, value):
+ code = [
+ 'if (%(value)s != NULL) {',
+ ' %(var)s = strdup(%(value)s);',
+ ' if (%(var)s == NULL) {',
+ ' goto error;',
+ ' }',
+ '} else {',
+ ' %(var)s = NULL;',
+ '}' ]
+
+ return TranslateList(code, { 'var' : varname,
+ 'value' : value })
+
+ def GetVarLen(self, var):
+ return 'strlen(%s)' % self.GetVarName(var)
+
+ def CodeMakeInitalize(self, varname):
+ return '%(varname)s = NULL;' % { 'varname' : varname }
+
+ def CodeAssign(self):
+ name = self._name
+ code = """int
+%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,
+ const %(ctype)s value)
+{
+ if (msg->%(name)s_data != NULL)
+ free(msg->%(name)s_data);
+ if ((msg->%(name)s_data = strdup(value)) == NULL)
+ return (-1);
+ msg->%(name)s_set = 1;
+ return (0);
+}""" % self.GetTranslation()
+
+ return code.split('\n')
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ code = ['if (evtag_unmarshal_string(%(buf)s, %(tag)s, &%(var)s) == -1) {',
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ ' return (-1);',
+ '}'
+ ]
+ code = '\n'.join(code) % self.GetTranslation({
+ 'buf' : buf,
+ 'tag' : tag_name,
+ 'var' : var_name })
+ return code.split('\n')
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = ['evtag_marshal_string(%s, %s, %s);' % (
+ buf, tag_name, var_name)]
+ return code
+
+ def CodeClear(self, structname):
+ code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
+ ' free(%s->%s_data);' % (structname, self.Name()),
+ ' %s->%s_data = NULL;' % (structname, self.Name()),
+ ' %s->%s_set = 0;' % (structname, self.Name()),
+ '}'
+ ]
+
+ return code
+
+ def CodeInitialize(self, name):
+ code = ['%s->%s_data = NULL;' % (name, self._name)]
+ return code
+
+ def CodeFree(self, name):
+ code = ['if (%s->%s_data != NULL)' % (name, self._name),
+ ' free (%s->%s_data);' % (name, self._name)]
+
+ return code
+
+ def Declaration(self):
+ dcl = ['char *%s_data;' % self._name]
+
+ return dcl
+
+class EntryStruct(Entry):
+ def __init__(self, type, name, tag, refname):
+ # Init base class
+ Entry.__init__(self, type, name, tag)
+
+ self._optpointer = False
+ self._can_be_array = 1
+ self._refname = refname
+ self._ctype = 'struct %s*' % refname
+ self._optaddarg = False
+
+ def GetInitializer(self):
+ return "NULL"
+
+ def GetVarLen(self, var):
+ return '-1'
+
+ def CodeArrayAdd(self, varname, value):
+ code = [
+ '%(varname)s = %(refname)s_new();',
+ 'if (%(varname)s == NULL)',
+ ' goto error;' ]
+
+ return TranslateList(code, self.GetTranslation({ 'varname' : varname }))
+
+ def CodeArrayFree(self, var):
+ code = [ '%(refname)s_free(%(var)s);' % self.GetTranslation(
+ { 'var' : var }) ]
+ return code
+
+ def CodeArrayAssign(self, var, srcvar):
+ code = [
+ 'int had_error = 0;',
+ 'struct evbuffer *tmp = NULL;',
+ '%(refname)s_clear(%(var)s);',
+ 'if ((tmp = evbuffer_new()) == NULL) {',
+ ' event_warn("%%s: evbuffer_new()", __func__);',
+ ' had_error = 1;',
+ ' goto done;',
+ '}',
+ '%(refname)s_marshal(tmp, %(srcvar)s);',
+ 'if (%(refname)s_unmarshal(%(var)s, tmp) == -1) {',
+ ' event_warnx("%%s: %(refname)s_unmarshal", __func__);',
+ ' had_error = 1;',
+ ' goto done;',
+ '}',
+ 'done:'
+ 'if (tmp != NULL)',
+ ' evbuffer_free(tmp);',
+ 'if (had_error) {',
+ ' %(refname)s_clear(%(var)s);',
+ ' return (-1);',
+ '}' ]
+
+ return TranslateList(code, self.GetTranslation({
+ 'var' : var,
+ 'srcvar' : srcvar}))
+
+ def CodeGet(self):
+ name = self._name
+ code = [ 'int',
+ '%s_%s_get(struct %s *msg, %s *value)' % (
+ self._struct.Name(), name,
+ self._struct.Name(), self._ctype),
+ '{',
+ ' if (msg->%s_set != 1) {' % name,
+ ' msg->%s_data = %s_new();' % (name, self._refname),
+ ' if (msg->%s_data == NULL)' % name,
+ ' return (-1);',
+ ' msg->%s_set = 1;' % name,
+ ' }',
+ ' *value = msg->%s_data;' % name,
+ ' return (0);',
+ '}' ]
+ return code
+
+ def CodeAssign(self):
+ name = self._name
+ code = """int
+%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,
+ const %(ctype)s value)
+{
+ struct evbuffer *tmp = NULL;
+ if (msg->%(name)s_set) {
+ %(refname)s_clear(msg->%(name)s_data);
+ msg->%(name)s_set = 0;
+ } else {
+ msg->%(name)s_data = %(refname)s_new();
+ if (msg->%(name)s_data == NULL) {
+ event_warn("%%s: %(refname)s_new()", __func__);
+ goto error;
+ }
+ }
+ if ((tmp = evbuffer_new()) == NULL) {
+ event_warn("%%s: evbuffer_new()", __func__);
+ goto error;
+ }
+ %(refname)s_marshal(tmp, value);
+ if (%(refname)s_unmarshal(msg->%(name)s_data, tmp) == -1) {
+ event_warnx("%%s: %(refname)s_unmarshal", __func__);
+ goto error;
+ }
+ msg->%(name)s_set = 1;
+ evbuffer_free(tmp);
+ return (0);
+ error:
+ if (tmp != NULL)
+ evbuffer_free(tmp);
+ if (msg->%(name)s_data != NULL) {
+ %(refname)s_free(msg->%(name)s_data);
+ msg->%(name)s_data = NULL;
+ }
+ return (-1);
+}""" % self.GetTranslation()
+ return code.split('\n')
+
+ def CodeComplete(self, structname, var_name):
+ code = [ 'if (%(structname)s->%(name)s_set && '
+ '%(refname)s_complete(%(var)s) == -1)',
+ ' return (-1);' ]
+
+ return TranslateList(code, self.GetTranslation({
+ 'structname' : structname,
+ 'var' : var_name }))
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ code = ['%(var)s = %(refname)s_new();',
+ 'if (%(var)s == NULL)',
+ ' return (-1);',
+ 'if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag)s, '
+ '%(var)s) == -1) {',
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ ' return (-1);',
+ '}'
+ ]
+ code = '\n'.join(code) % self.GetTranslation({
+ 'buf' : buf,
+ 'tag' : tag_name,
+ 'var' : var_name })
+ return code.split('\n')
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = ['evtag_marshal_%s(%s, %s, %s);' % (
+ self._refname, buf, tag_name, var_name)]
+ return code
+
+ def CodeClear(self, structname):
+ code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
+ ' %s_free(%s->%s_data);' % (
+ self._refname, structname, self.Name()),
+ ' %s->%s_data = NULL;' % (structname, self.Name()),
+ ' %s->%s_set = 0;' % (structname, self.Name()),
+ '}'
+ ]
+
+ return code
+
+ def CodeInitialize(self, name):
+ code = ['%s->%s_data = NULL;' % (name, self._name)]
+ return code
+
+ def CodeFree(self, name):
+ code = ['if (%s->%s_data != NULL)' % (name, self._name),
+ ' %s_free(%s->%s_data);' % (
+ self._refname, name, self._name)]
+
+ return code
+
+ def Declaration(self):
+ dcl = ['%s %s_data;' % (self._ctype, self._name)]
+
+ return dcl
+
+class EntryVarBytes(Entry):
+ def __init__(self, type, name, tag):
+ # Init base class
+ Entry.__init__(self, type, name, tag)
+
+ self._ctype = 'ev_uint8_t *'
+
+ def GetInitializer(self):
+ return "NULL"
+
+ def GetVarLen(self, var):
+ return '%(var)s->%(name)s_length' % self.GetTranslation({ 'var' : var })
+
+ def CodeArrayAdd(self, varname, value):
+ # xxx: copy
+ return [ '%(varname)s = NULL;' % { 'varname' : varname } ]
+
+ def GetDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, %s *, ev_uint32_t *);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def AssignDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, const %s, ev_uint32_t);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def CodeAssign(self):
+ name = self._name
+ code = [ 'int',
+ '%s_%s_assign(struct %s *msg, '
+ 'const %s value, ev_uint32_t len)' % (
+ self._struct.Name(), name,
+ self._struct.Name(), self._ctype),
+ '{',
+ ' if (msg->%s_data != NULL)' % name,
+ ' free (msg->%s_data);' % name,
+ ' msg->%s_data = malloc(len);' % name,
+ ' if (msg->%s_data == NULL)' % name,
+ ' return (-1);',
+ ' msg->%s_set = 1;' % name,
+ ' msg->%s_length = len;' % name,
+ ' memcpy(msg->%s_data, value, len);' % name,
+ ' return (0);',
+ '}' ]
+ return code
+
+ def CodeGet(self):
+ name = self._name
+ code = [ 'int',
+ '%s_%s_get(struct %s *msg, %s *value, ev_uint32_t *plen)' % (
+ self._struct.Name(), name,
+ self._struct.Name(), self._ctype),
+ '{',
+ ' if (msg->%s_set != 1)' % name,
+ ' return (-1);',
+ ' *value = msg->%s_data;' % name,
+ ' *plen = msg->%s_length;' % name,
+ ' return (0);',
+ '}' ]
+ return code
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ code = ['if (evtag_payload_length(%(buf)s, &%(varlen)s) == -1)',
+ ' return (-1);',
+ # We do not want DoS opportunities
+ 'if (%(varlen)s > evbuffer_get_length(%(buf)s))',
+ ' return (-1);',
+ 'if ((%(var)s = malloc(%(varlen)s)) == NULL)',
+ ' return (-1);',
+ 'if (evtag_unmarshal_fixed(%(buf)s, %(tag)s, %(var)s, '
+ '%(varlen)s) == -1) {',
+ ' event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
+ ' return (-1);',
+ '}'
+ ]
+ code = '\n'.join(code) % self.GetTranslation({
+ 'buf' : buf,
+ 'tag' : tag_name,
+ 'var' : var_name,
+ 'varlen' : var_len })
+ return code.split('\n')
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = ['evtag_marshal(%s, %s, %s, %s);' % (
+ buf, tag_name, var_name, var_len)]
+ return code
+
+ def CodeClear(self, structname):
+ code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
+ ' free (%s->%s_data);' % (structname, self.Name()),
+ ' %s->%s_data = NULL;' % (structname, self.Name()),
+ ' %s->%s_length = 0;' % (structname, self.Name()),
+ ' %s->%s_set = 0;' % (structname, self.Name()),
+ '}'
+ ]
+
+ return code
+
+ def CodeInitialize(self, name):
+ code = ['%s->%s_data = NULL;' % (name, self._name),
+ '%s->%s_length = 0;' % (name, self._name) ]
+ return code
+
+ def CodeFree(self, name):
+ code = ['if (%s->%s_data != NULL)' % (name, self._name),
+ ' free(%s->%s_data);' % (name, self._name)]
+
+ return code
+
+ def Declaration(self):
+ dcl = ['ev_uint8_t *%s_data;' % self._name,
+ 'ev_uint32_t %s_length;' % self._name]
+
+ return dcl
+
+class EntryArray(Entry):
+ def __init__(self, entry):
+ # Init base class
+ Entry.__init__(self, entry._type, entry._name, entry._tag)
+
+ self._entry = entry
+ self._refname = entry._refname
+ self._ctype = self._entry._ctype
+ self._optional = True
+ self._optpointer = self._entry._optpointer
+ self._optaddarg = self._entry._optaddarg
+
+ # provide a new function for accessing the variable name
+ def GetVarName(var_name):
+ return '%(var)s->%(name)s_data[%(index)s]' % \
+ self._entry.GetTranslation({'var' : var_name,
+ 'index' : self._index})
+ self._entry.GetVarName = GetVarName
+
+ def GetInitializer(self):
+ return "NULL"
+
+ def GetVarName(self, var_name):
+ return var_name
+
+ def GetVarLen(self, var_name):
+ return '-1'
+
+ def GetDeclaration(self, funcname):
+ """Allows direct access to elements of the array."""
+ code = [
+ 'int %(funcname)s(struct %(parent_name)s *, int, %(ctype)s *);' %
+ self.GetTranslation({ 'funcname' : funcname }) ]
+ return code
+
+ def AssignDeclaration(self, funcname):
+ code = [ 'int %s(struct %s *, int, const %s);' % (
+ funcname, self._struct.Name(), self._ctype ) ]
+ return code
+
+ def AddDeclaration(self, funcname):
+ code = [
+ '%(ctype)s %(optpointer)s '
+ '%(funcname)s(struct %(parent_name)s *msg%(optaddarg)s);' % \
+ self.GetTranslation({ 'funcname' : funcname }) ]
+ return code
+
+ def CodeGet(self):
+ code = """int
+%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, int offset,
+ %(ctype)s *value)
+{
+ if (!msg->%(name)s_set || offset < 0 || offset >= msg->%(name)s_length)
+ return (-1);
+ *value = msg->%(name)s_data[offset];
+ return (0);
+}""" % self.GetTranslation()
+
+ return code.split('\n')
+
+ def CodeAssign(self):
+ code = [
+ 'int',
+ '%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, int off,',
+ ' const %(ctype)s value)',
+ '{',
+ ' if (!msg->%(name)s_set || off < 0 || off >= msg->%(name)s_length)',
+ ' return (-1);\n',
+ ' {' ]
+ code = TranslateList(code, self.GetTranslation())
+
+ codearrayassign = self._entry.CodeArrayAssign(
+ 'msg->%(name)s_data[off]' % self.GetTranslation(), 'value')
+ code += map(lambda x: ' ' + x, codearrayassign)
+
+ code += TranslateList([
+ ' }',
+ ' return (0);',
+ '}' ], self.GetTranslation())
+
+ return code
+
+ def CodeAdd(self):
+ codearrayadd = self._entry.CodeArrayAdd(
+ 'msg->%(name)s_data[msg->%(name)s_length - 1]' % self.GetTranslation(),
+ 'value')
+ code = [
+ 'static int',
+ '%(parent_name)s_%(name)s_expand_to_hold_more('
+ 'struct %(parent_name)s *msg)',
+ '{',
+ ' int tobe_allocated = msg->%(name)s_num_allocated;',
+ ' %(ctype)s* new_data = NULL;',
+ ' tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1;',
+ ' new_data = (%(ctype)s*) realloc(msg->%(name)s_data,',
+ ' tobe_allocated * sizeof(%(ctype)s));',
+ ' if (new_data == NULL)',
+ ' return -1;',
+ ' msg->%(name)s_data = new_data;',
+ ' msg->%(name)s_num_allocated = tobe_allocated;',
+ ' return 0;'
+ '}',
+ '',
+ '%(ctype)s %(optpointer)s',
+ '%(parent_name)s_%(name)s_add('
+ 'struct %(parent_name)s *msg%(optaddarg)s)',
+ '{',
+ ' if (++msg->%(name)s_length >= msg->%(name)s_num_allocated) {',
+ ' if (%(parent_name)s_%(name)s_expand_to_hold_more(msg)<0)',
+ ' goto error;',
+ ' }' ]
+
+ code = TranslateList(code, self.GetTranslation())
+
+ code += map(lambda x: ' ' + x, codearrayadd)
+
+ code += TranslateList([
+ ' msg->%(name)s_set = 1;',
+ ' return %(optreference)s(msg->%(name)s_data['
+ 'msg->%(name)s_length - 1]);',
+ 'error:',
+ ' --msg->%(name)s_length;',
+ ' return (NULL);',
+ '}' ], self.GetTranslation())
+
+ return code
+
+ def CodeComplete(self, structname, var_name):
+ self._index = 'i'
+ tmp = self._entry.CodeComplete(structname, self._entry.GetVarName(var_name))
+ # skip the whole loop if there is nothing to check
+ if not tmp:
+ return []
+
+ translate = self.GetTranslation({ 'structname' : structname })
+ code = [
+ '{',
+ ' int i;',
+ ' for (i = 0; i < %(structname)s->%(name)s_length; ++i) {' ]
+
+ code = TranslateList(code, translate)
+
+ code += map(lambda x: ' ' + x, tmp)
+
+ code += [
+ ' }',
+ '}' ]
+
+ return code
+
+ def CodeUnmarshal(self, buf, tag_name, var_name, var_len):
+ translate = self.GetTranslation({ 'var' : var_name,
+ 'buf' : buf,
+ 'tag' : tag_name,
+ 'init' : self._entry.GetInitializer()})
+ code = [
+ 'if (%(var)s->%(name)s_length >= %(var)s->%(name)s_num_allocated &&',
+ ' %(parent_name)s_%(name)s_expand_to_hold_more(%(var)s) < 0) {',
+ ' puts("HEY NOW");',
+ ' return (-1);',
+ '}']
+
+ # the unmarshal code directly returns
+ code = TranslateList(code, translate)
+
+ self._index = '%(var)s->%(name)s_length' % translate
+ code += self._entry.CodeUnmarshal(buf, tag_name,
+ self._entry.GetVarName(var_name),
+ self._entry.GetVarLen(var_name))
+
+ code += [ '++%(var)s->%(name)s_length;' % translate ]
+
+ return code
+
+ def CodeMarshal(self, buf, tag_name, var_name, var_len):
+ code = ['{',
+ ' int i;',
+ ' for (i = 0; i < %(var)s->%(name)s_length; ++i) {' ]
+
+ self._index = 'i'
+ code += self._entry.CodeMarshal(buf, tag_name,
+ self._entry.GetVarName(var_name),
+ self._entry.GetVarLen(var_name))
+ code += [' }',
+ '}'
+ ]
+
+ code = "\n".join(code) % self.GetTranslation({ 'var' : var_name })
+
+ return code.split('\n')
+
+ def CodeClear(self, structname):
+ translate = self.GetTranslation({ 'structname' : structname })
+ codearrayfree = self._entry.CodeArrayFree(
+ '%(structname)s->%(name)s_data[i]' % self.GetTranslation(
+ { 'structname' : structname } ))
+
+ code = [ 'if (%(structname)s->%(name)s_set == 1) {' ]
+
+ if codearrayfree:
+ code += [
+ ' int i;',
+ ' for (i = 0; i < %(structname)s->%(name)s_length; ++i) {' ]
+
+ code = TranslateList(code, translate)
+
+ if codearrayfree:
+ code += map(lambda x: ' ' + x, codearrayfree)
+ code += [
+ ' }' ]
+
+ code += TranslateList([
+ ' free(%(structname)s->%(name)s_data);',
+ ' %(structname)s->%(name)s_data = NULL;',
+ ' %(structname)s->%(name)s_set = 0;',
+ ' %(structname)s->%(name)s_length = 0;',
+ ' %(structname)s->%(name)s_num_allocated = 0;',
+ '}'
+ ], translate)
+
+ return code
+
+ def CodeInitialize(self, name):
+ code = ['%s->%s_data = NULL;' % (name, self._name),
+ '%s->%s_length = 0;' % (name, self._name),
+ '%s->%s_num_allocated = 0;' % (name, self._name)]
+ return code
+
+ def CodeFree(self, structname):
+ code = self.CodeClear(structname);
+
+ code += TranslateList([
+ 'free(%(structname)s->%(name)s_data);' ],
+ self.GetTranslation({'structname' : structname }))
+
+ return code
+
+ def Declaration(self):
+ dcl = ['%s *%s_data;' % (self._ctype, self._name),
+ 'int %s_length;' % self._name,
+ 'int %s_num_allocated;' % self._name ]
+
+ return dcl
+
+def NormalizeLine(line):
+ global white
+ global cppcomment
+
+ line = cppcomment.sub('', line)
+ line = line.strip()
+ line = white.sub(' ', line)
+
+ return line
+
+def ProcessOneEntry(factory, newstruct, entry):
+ optional = 0
+ array = 0
+ entry_type = ''
+ name = ''
+ tag = ''
+ tag_set = None
+ separator = ''
+ fixed_length = ''
+
+ tokens = entry.split(' ')
+ while tokens:
+ token = tokens[0]
+ tokens = tokens[1:]
+
+ if not entry_type:
+ if not optional and token == 'optional':
+ optional = 1
+ continue
+
+ if not array and token == 'array':
+ array = 1
+ continue
+
+ if not entry_type:
+ entry_type = token
+ continue
+
+ if not name:
+ res = re.match(r'^([^\[\]]+)(\[.*\])?$', token)
+ if not res:
+ raise RpcGenError(
+ 'Cannot parse name: \"%s\" '
+ 'around line %d' % (entry, line_count))
+ name = res.group(1)
+ fixed_length = res.group(2)
+ if fixed_length:
+ fixed_length = fixed_length[1:-1]
+ continue
+
+ if not separator:
+ separator = token
+ if separator != '=':
+ raise RpcGenError('Expected "=" after name \"%s\" got %s'
+ % (name, token))
+ continue
+
+ if not tag_set:
+ tag_set = 1
+ if not re.match(r'^(0x)?[0-9]+$', token):
+ raise RpcGenError('Expected tag number: \"%s\"' % entry)
+ tag = int(token, 0)
+ continue
+
+ raise RpcGenError('Cannot parse \"%s\"' % entry)
+
+ if not tag_set:
+ raise RpcGenError('Need tag number: \"%s\"' % entry)
+
+ # Create the right entry
+ if entry_type == 'bytes':
+ if fixed_length:
+ newentry = factory.EntryBytes(entry_type, name, tag, fixed_length)
+ else:
+ newentry = factory.EntryVarBytes(entry_type, name, tag)
+ elif entry_type == 'int' and not fixed_length:
+ newentry = factory.EntryInt(entry_type, name, tag)
+ elif entry_type == 'int64' and not fixed_length:
+ newentry = factory.EntryInt(entry_type, name, tag, bits=64)
+ elif entry_type == 'string' and not fixed_length:
+ newentry = factory.EntryString(entry_type, name, tag)
+ else:
+ res = structref.match(entry_type)
+ if res:
+ # References another struct defined in our file
+ newentry = factory.EntryStruct(entry_type, name, tag, res.group(1))
+ else:
+ raise RpcGenError('Bad type: "%s" in "%s"' % (entry_type, entry))
+
+ structs = []
+
+ if optional:
+ newentry.MakeOptional()
+ if array:
+ newentry.MakeArray()
+
+ newentry.SetStruct(newstruct)
+ newentry.SetLineCount(line_count)
+ newentry.Verify()
+
+ if array:
+ # We need to encapsulate this entry into a struct
+ newname = newentry.Name()+ '_array'
+
+ # Now borgify the new entry.
+ newentry = factory.EntryArray(newentry)
+ newentry.SetStruct(newstruct)
+ newentry.SetLineCount(line_count)
+ newentry.MakeArray()
+
+ newstruct.AddEntry(newentry)
+
+ return structs
+
+def ProcessStruct(factory, data):
+ tokens = data.split(' ')
+
+ # First three tokens are: 'struct' 'name' '{'
+ newstruct = factory.Struct(tokens[1])
+
+ inside = ' '.join(tokens[3:-1])
+
+ tokens = inside.split(';')
+
+ structs = []
+
+ for entry in tokens:
+ entry = NormalizeLine(entry)
+ if not entry:
+ continue
+
+ # It's possible that new structs get defined in here
+ structs.extend(ProcessOneEntry(factory, newstruct, entry))
+
+ structs.append(newstruct)
+ return structs
+
+def GetNextStruct(file):
+ global line_count
+ global cppdirect
+
+ got_struct = 0
+
+ processed_lines = []
+
+ have_c_comment = 0
+ data = ''
+ while 1:
+ line = file.readline()
+ if not line:
+ break
+
+ line_count += 1
+ line = line[:-1]
+
+ if not have_c_comment and re.search(r'/\*', line):
+ if re.search(r'/\*.*?\*/', line):
+ line = re.sub(r'/\*.*?\*/', '', line)
+ else:
+ line = re.sub(r'/\*.*$', '', line)
+ have_c_comment = 1
+
+ if have_c_comment:
+ if not re.search(r'\*/', line):
+ continue
+ have_c_comment = 0
+ line = re.sub(r'^.*\*/', '', line)
+
+ line = NormalizeLine(line)
+
+ if not line:
+ continue
+
+ if not got_struct:
+ if re.match(r'#include ["<].*[>"]', line):
+ cppdirect.append(line)
+ continue
+
+ if re.match(r'^#(if( |def)|endif)', line):
+ cppdirect.append(line)
+ continue
+
+ if re.match(r'^#define', line):
+ headerdirect.append(line)
+ continue
+
+ if not structdef.match(line):
+ raise RpcGenError('Missing struct on line %d: %s'
+ % (line_count, line))
+ else:
+ got_struct = 1
+ data += line
+ continue
+
+ # We are inside the struct
+ tokens = line.split('}')
+ if len(tokens) == 1:
+ data += ' ' + line
+ continue
+
+ if len(tokens[1]):
+ raise RpcGenError('Trailing garbage after struct on line %d'
+ % line_count)
+
+ # We found the end of the struct
+ data += ' %s}' % tokens[0]
+ break
+
+ # Remove any comments, that might be in there
+ data = re.sub(r'/\*.*\*/', '', data)
+
+ return data
+
+
+def Parse(factory, file):
+ """
+ Parses the input file and returns C code and corresponding header file.
+ """
+
+ entities = []
+
+ while 1:
+ # Just gets the whole struct nicely formatted
+ data = GetNextStruct(file)
+
+ if not data:
+ break
+
+ entities.extend(ProcessStruct(factory, data))
+
+ return entities
+
+class CCodeGenerator:
+ def __init__(self):
+ pass
+
+ def GuardName(self, name):
+ # Use the complete provided path to the input file, with all
+ # non-identifier characters replaced with underscores, to
+ # reduce the chance of a collision between guard macros.
+ return 'EVENT_RPCOUT_' + nonident.sub('_', name).upper() + '_'
+
+ def HeaderPreamble(self, name):
+ guard = self.GuardName(name)
+ pre = (
+ '/*\n'
+ ' * Automatically generated from %s\n'
+ ' */\n\n'
+ '#ifndef %s\n'
+ '#define %s\n\n' ) % (
+ name, guard, guard)
+
+ for statement in headerdirect:
+ pre += '%s\n' % statement
+ if headerdirect:
+ pre += '\n'
+
+ pre += (
+ '#include <event2/util.h> /* for ev_uint*_t */\n'
+ '#include <event2/rpc.h>\n'
+ )
+
+ return pre
+
+ def HeaderPostamble(self, name):
+ guard = self.GuardName(name)
+ return '#endif /* %s */' % guard
+
+ def BodyPreamble(self, name, header_file):
+ global _NAME
+ global _VERSION
+
+ slash = header_file.rfind('/')
+ if slash != -1:
+ header_file = header_file[slash+1:]
+
+ pre = ( '/*\n'
+ ' * Automatically generated from %s\n'
+ ' * by %s/%s. DO NOT EDIT THIS FILE.\n'
+ ' */\n\n' ) % (name, _NAME, _VERSION)
+ pre += ( '#include <stdlib.h>\n'
+ '#include <string.h>\n'
+ '#include <assert.h>\n'
+ '#include <event2/event-config.h>\n'
+ '#include <event2/event.h>\n'
+ '#include <event2/buffer.h>\n'
+ '#include <event2/tag.h>\n\n'
+ '#ifdef EVENT____func__\n'
+ '#define __func__ EVENT____func__\n'
+ '#endif\n\n'
+ )
+
+ for statement in cppdirect:
+ pre += '%s\n' % statement
+
+ pre += '\n#include "%s"\n\n' % header_file
+
+ pre += 'void event_warn(const char *fmt, ...);\n'
+ pre += 'void event_warnx(const char *fmt, ...);\n\n'
+
+ return pre
+
+ def HeaderFilename(self, filename):
+ return '.'.join(filename.split('.')[:-1]) + '.h'
+
+ def CodeFilename(self, filename):
+ return '.'.join(filename.split('.')[:-1]) + '.gen.c'
+
+ def Struct(self, name):
+ return StructCCode(name)
+
+ def EntryBytes(self, entry_type, name, tag, fixed_length):
+ return EntryBytes(entry_type, name, tag, fixed_length)
+
+ def EntryVarBytes(self, entry_type, name, tag):
+ return EntryVarBytes(entry_type, name, tag)
+
+ def EntryInt(self, entry_type, name, tag, bits=32):
+ return EntryInt(entry_type, name, tag, bits)
+
+ def EntryString(self, entry_type, name, tag):
+ return EntryString(entry_type, name, tag)
+
+ def EntryStruct(self, entry_type, name, tag, struct_name):
+ return EntryStruct(entry_type, name, tag, struct_name)
+
+ def EntryArray(self, entry):
+ return EntryArray(entry)
+
+class Usage(RpcGenError):
+ def __init__(self, argv0):
+ RpcGenError.__init__("usage: %s input.rpc [[output.h] output.c]"
+ % argv0)
+
+class CommandLine:
+ def __init__(self, argv):
+ """Initialize a command-line to launch event_rpcgen, as if
+ from a command-line with CommandLine(sys.argv). If you're
+ calling this directly, remember to provide a dummy value
+ for sys.argv[0]
+ """
+ self.filename = None
+ self.header_file = None
+ self.impl_file = None
+ self.factory = CCodeGenerator()
+
+ if len(argv) >= 2 and argv[1] == '--quiet':
+ global QUIETLY
+ QUIETLY = 1
+ del argv[1]
+
+ if len(argv) < 2 or len(argv) > 4:
+ raise Usage(argv[0])
+
+ self.filename = argv[1].replace('\\', '/')
+ if len(argv) == 3:
+ self.impl_file = argv[2].replace('\\', '/')
+ if len(argv) == 4:
+ self.header_file = argv[2].replace('\\', '/')
+ self.impl_file = argv[3].replace('\\', '/')
+
+ if not self.filename:
+ raise Usage(argv[0])
+
+ if not self.impl_file:
+ self.impl_file = self.factory.CodeFilename(self.filename)
+
+ if not self.header_file:
+ self.header_file = self.factory.HeaderFilename(self.impl_file)
+
+ if not self.impl_file.endswith('.c'):
+ raise RpcGenError("can only generate C implementation files")
+ if not self.header_file.endswith('.h'):
+ raise RpcGenError("can only generate C header files")
+
+ def run(self):
+ filename = self.filename
+ header_file = self.header_file
+ impl_file = self.impl_file
+ factory = self.factory
+
+ declare('Reading \"%s\"' % filename)
+
+ fp = open(filename, 'r')
+ entities = Parse(factory, fp)
+ fp.close()
+
+ declare('... creating "%s"' % header_file)
+ header_fp = open(header_file, 'w')
+ print >>header_fp, factory.HeaderPreamble(filename)
+
+ # Create forward declarations: allows other structs to reference
+ # each other
+ for entry in entities:
+ entry.PrintForwardDeclaration(header_fp)
+ print >>header_fp, ''
+
+ for entry in entities:
+ entry.PrintTags(header_fp)
+ entry.PrintDeclaration(header_fp)
+ print >>header_fp, factory.HeaderPostamble(filename)
+ header_fp.close()
+
+ declare('... creating "%s"' % impl_file)
+ impl_fp = open(impl_file, 'w')
+ print >>impl_fp, factory.BodyPreamble(filename, header_file)
+ for entry in entities:
+ entry.PrintCode(impl_fp)
+ impl_fp.close()
+
+if __name__ == '__main__':
+ try:
+ CommandLine(sys.argv).run()
+ sys.exit(0)
+
+ except RpcGenError, e:
+ print >>sys.stderr, e
+ sys.exit(1)
+
+ except EnvironmentError, e:
+ if e.filename and e.strerror:
+ print >>sys.stderr, "%s: %s" % (e.filename, e.strerror)
+ sys.exit(1)
+ elif e.strerror:
+ print >> sys.stderr, e.strerror
+ sys.exit(1)
+ else:
+ raise
diff --git a/sntp/libevent/event_tagging.c b/sntp/libevent/event_tagging.c
new file mode 100644
index 000000000000..7edd3da5d956
--- /dev/null
+++ b/sntp/libevent/event_tagging.c
@@ -0,0 +1,591 @@
+/*
+ * Copyright (c) 2003-2009 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#else
+#include <sys/ioctl.h>
+#endif
+
+#include <sys/queue.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _WIN32
+#include <syslog.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <limits.h>
+
+#include "event2/event.h"
+#include "event2/tag.h"
+#include "event2/buffer.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+
+/*
+ Here's our wire format:
+
+ Stream = TaggedData*
+
+ TaggedData = Tag Length Data
+ where the integer value of 'Length' is the length of 'data'.
+
+ Tag = HByte* LByte
+ where HByte is a byte with the high bit set, and LByte is a byte
+ with the high bit clear. The integer value of the tag is taken
+ by concatenating the lower 7 bits from all the tags. So for example,
+ the tag 0x66 is encoded as [66], whereas the tag 0x166 is encoded as
+ [82 66]
+
+ Length = Integer
+
+ Integer = NNibbles Nibble* Padding?
+ where NNibbles is a 4-bit value encoding the number of nibbles-1,
+ and each Nibble is 4 bits worth of encoded integer, in big-endian
+ order. If the total encoded integer size is an odd number of nibbles,
+ a final padding nibble with value 0 is appended.
+*/
+
+int evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf);
+int evtag_decode_int64(ev_uint64_t *pnumber, struct evbuffer *evbuf);
+int evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag);
+int evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf);
+
+void
+evtag_init(void)
+{
+}
+
+/*
+ * We encode integers by nibbles; the first nibble contains the number
+ * of significant nibbles - 1; this allows us to encode up to 64-bit
+ * integers. This function is byte-order independent.
+ *
+ * @param number a 32-bit unsigned integer to encode
+ * @param data a pointer to where the data should be written. Must
+ * have at least 5 bytes free.
+ * @return the number of bytes written into data.
+ */
+
+#define ENCODE_INT_INTERNAL(data, number) do { \
+ int off = 1, nibbles = 0; \
+ \
+ memset(data, 0, sizeof(number)+1); \
+ while (number) { \
+ if (off & 0x1) \
+ data[off/2] = (data[off/2] & 0xf0) | (number & 0x0f); \
+ else \
+ data[off/2] = (data[off/2] & 0x0f) | \
+ ((number & 0x0f) << 4); \
+ number >>= 4; \
+ off++; \
+ } \
+ \
+ if (off > 2) \
+ nibbles = off - 2; \
+ \
+ /* Off - 1 is the number of encoded nibbles */ \
+ data[0] = (data[0] & 0x0f) | ((nibbles & 0x0f) << 4); \
+ \
+ return ((off + 1) / 2); \
+} while (0)
+
+static inline int
+encode_int_internal(ev_uint8_t *data, ev_uint32_t number)
+{
+ ENCODE_INT_INTERNAL(data, number);
+}
+
+static inline int
+encode_int64_internal(ev_uint8_t *data, ev_uint64_t number)
+{
+ ENCODE_INT_INTERNAL(data, number);
+}
+
+void
+evtag_encode_int(struct evbuffer *evbuf, ev_uint32_t number)
+{
+ ev_uint8_t data[5];
+ int len = encode_int_internal(data, number);
+ evbuffer_add(evbuf, data, len);
+}
+
+void
+evtag_encode_int64(struct evbuffer *evbuf, ev_uint64_t number)
+{
+ ev_uint8_t data[9];
+ int len = encode_int64_internal(data, number);
+ evbuffer_add(evbuf, data, len);
+}
+
+/*
+ * Support variable length encoding of tags; we use the high bit in each
+ * octet as a continuation signal.
+ */
+
+int
+evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag)
+{
+ int bytes = 0;
+ ev_uint8_t data[5];
+
+ memset(data, 0, sizeof(data));
+ do {
+ ev_uint8_t lower = tag & 0x7f;
+ tag >>= 7;
+
+ if (tag)
+ lower |= 0x80;
+
+ data[bytes++] = lower;
+ } while (tag);
+
+ if (evbuf != NULL)
+ evbuffer_add(evbuf, data, bytes);
+
+ return (bytes);
+}
+
+static int
+decode_tag_internal(ev_uint32_t *ptag, struct evbuffer *evbuf, int dodrain)
+{
+ ev_uint32_t number = 0;
+ size_t len = evbuffer_get_length(evbuf);
+ ev_uint8_t *data;
+ size_t count = 0;
+ int shift = 0, done = 0;
+
+ /*
+ * the encoding of a number is at most one byte more than its
+ * storage size. however, it may also be much smaller.
+ */
+ data = evbuffer_pullup(
+ evbuf, len < sizeof(number) + 1 ? len : sizeof(number) + 1);
+
+ while (count++ < len) {
+ ev_uint8_t lower = *data++;
+ number |= (lower & 0x7f) << shift;
+ shift += 7;
+
+ if (!(lower & 0x80)) {
+ done = 1;
+ break;
+ }
+ }
+
+ if (!done)
+ return (-1);
+
+ if (dodrain)
+ evbuffer_drain(evbuf, count);
+
+ if (ptag != NULL)
+ *ptag = number;
+
+ return count > INT_MAX ? INT_MAX : (int)(count);
+}
+
+int
+evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf)
+{
+ return (decode_tag_internal(ptag, evbuf, 1 /* dodrain */));
+}
+
+/*
+ * Marshal a data type, the general format is as follows:
+ *
+ * tag number: one byte; length: var bytes; payload: var bytes
+ */
+
+void
+evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag,
+ const void *data, ev_uint32_t len)
+{
+ evtag_encode_tag(evbuf, tag);
+ evtag_encode_int(evbuf, len);
+ evbuffer_add(evbuf, (void *)data, len);
+}
+
+void
+evtag_marshal_buffer(struct evbuffer *evbuf, ev_uint32_t tag,
+ struct evbuffer *data)
+{
+ evtag_encode_tag(evbuf, tag);
+ /* XXX support more than UINT32_MAX data */
+ evtag_encode_int(evbuf, (ev_uint32_t)evbuffer_get_length(data));
+ evbuffer_add_buffer(evbuf, data);
+}
+
+/* Marshaling for integers */
+void
+evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag, ev_uint32_t integer)
+{
+ ev_uint8_t data[5];
+ int len = encode_int_internal(data, integer);
+
+ evtag_encode_tag(evbuf, tag);
+ evtag_encode_int(evbuf, len);
+ evbuffer_add(evbuf, data, len);
+}
+
+void
+evtag_marshal_int64(struct evbuffer *evbuf, ev_uint32_t tag,
+ ev_uint64_t integer)
+{
+ ev_uint8_t data[9];
+ int len = encode_int64_internal(data, integer);
+
+ evtag_encode_tag(evbuf, tag);
+ evtag_encode_int(evbuf, len);
+ evbuffer_add(evbuf, data, len);
+}
+
+void
+evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag, const char *string)
+{
+ /* TODO support strings longer than UINT32_MAX ? */
+ evtag_marshal(buf, tag, string, (ev_uint32_t)strlen(string));
+}
+
+void
+evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag, struct timeval *tv)
+{
+ ev_uint8_t data[10];
+ int len = encode_int_internal(data, tv->tv_sec);
+ len += encode_int_internal(data + len, tv->tv_usec);
+ evtag_marshal(evbuf, tag, data, len);
+}
+
+#define DECODE_INT_INTERNAL(number, maxnibbles, pnumber, evbuf, offset) \
+do { \
+ ev_uint8_t *data; \
+ ev_ssize_t len = evbuffer_get_length(evbuf) - offset; \
+ int nibbles = 0; \
+ \
+ if (len <= 0) \
+ return (-1); \
+ \
+ /* XXX(niels): faster? */ \
+ data = evbuffer_pullup(evbuf, offset + 1) + offset; \
+ \
+ nibbles = ((data[0] & 0xf0) >> 4) + 1; \
+ if (nibbles > maxnibbles || (nibbles >> 1) + 1 > len) \
+ return (-1); \
+ len = (nibbles >> 1) + 1; \
+ \
+ data = evbuffer_pullup(evbuf, offset + len) + offset; \
+ \
+ while (nibbles > 0) { \
+ number <<= 4; \
+ if (nibbles & 0x1) \
+ number |= data[nibbles >> 1] & 0x0f; \
+ else \
+ number |= (data[nibbles >> 1] & 0xf0) >> 4; \
+ nibbles--; \
+ } \
+ \
+ *pnumber = number; \
+ \
+ return (int)(len); \
+} while (0)
+
+/* Internal: decode an integer from an evbuffer, without draining it.
+ * Only integers up to 32-bits are supported.
+ *
+ * @param evbuf the buffer to read from
+ * @param offset an index into the buffer at which we should start reading.
+ * @param pnumber a pointer to receive the integer.
+ * @return The length of the number as encoded, or -1 on error.
+ */
+
+static int
+decode_int_internal(ev_uint32_t *pnumber, struct evbuffer *evbuf, int offset)
+{
+ ev_uint32_t number = 0;
+ DECODE_INT_INTERNAL(number, 8, pnumber, evbuf, offset);
+}
+
+static int
+decode_int64_internal(ev_uint64_t *pnumber, struct evbuffer *evbuf, int offset)
+{
+ ev_uint64_t number = 0;
+ DECODE_INT_INTERNAL(number, 16, pnumber, evbuf, offset);
+}
+
+int
+evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf)
+{
+ int res = decode_int_internal(pnumber, evbuf, 0);
+ if (res != -1)
+ evbuffer_drain(evbuf, res);
+
+ return (res == -1 ? -1 : 0);
+}
+
+int
+evtag_decode_int64(ev_uint64_t *pnumber, struct evbuffer *evbuf)
+{
+ int res = decode_int64_internal(pnumber, evbuf, 0);
+ if (res != -1)
+ evbuffer_drain(evbuf, res);
+
+ return (res == -1 ? -1 : 0);
+}
+
+int
+evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag)
+{
+ return (decode_tag_internal(ptag, evbuf, 0 /* dodrain */));
+}
+
+int
+evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength)
+{
+ int res, len;
+
+ len = decode_tag_internal(NULL, evbuf, 0 /* dodrain */);
+ if (len == -1)
+ return (-1);
+
+ res = decode_int_internal(plength, evbuf, len);
+ if (res == -1)
+ return (-1);
+
+ *plength += res + len;
+
+ return (0);
+}
+
+int
+evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength)
+{
+ int res, len;
+
+ len = decode_tag_internal(NULL, evbuf, 0 /* dodrain */);
+ if (len == -1)
+ return (-1);
+
+ res = decode_int_internal(plength, evbuf, len);
+ if (res == -1)
+ return (-1);
+
+ return (0);
+}
+
+/* just unmarshals the header and returns the length of the remaining data */
+
+int
+evtag_unmarshal_header(struct evbuffer *evbuf, ev_uint32_t *ptag)
+{
+ ev_uint32_t len;
+
+ if (decode_tag_internal(ptag, evbuf, 1 /* dodrain */) == -1)
+ return (-1);
+ if (evtag_decode_int(&len, evbuf) == -1)
+ return (-1);
+
+ if (evbuffer_get_length(evbuf) < len)
+ return (-1);
+
+ return (len);
+}
+
+int
+evtag_consume(struct evbuffer *evbuf)
+{
+ int len;
+ if ((len = evtag_unmarshal_header(evbuf, NULL)) == -1)
+ return (-1);
+ evbuffer_drain(evbuf, len);
+
+ return (0);
+}
+
+/* Reads the data type from an event buffer */
+
+int
+evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag, struct evbuffer *dst)
+{
+ int len;
+
+ if ((len = evtag_unmarshal_header(src, ptag)) == -1)
+ return (-1);
+
+ if (evbuffer_add(dst, evbuffer_pullup(src, len), len) == -1)
+ return (-1);
+
+ evbuffer_drain(src, len);
+
+ return (len);
+}
+
+/* Marshaling for integers */
+
+int
+evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ ev_uint32_t *pinteger)
+{
+ ev_uint32_t tag;
+ ev_uint32_t len;
+ int result;
+
+ if (decode_tag_internal(&tag, evbuf, 1 /* dodrain */) == -1)
+ return (-1);
+ if (need_tag != tag)
+ return (-1);
+ if (evtag_decode_int(&len, evbuf) == -1)
+ return (-1);
+
+ if (evbuffer_get_length(evbuf) < len)
+ return (-1);
+
+ result = decode_int_internal(pinteger, evbuf, 0);
+ evbuffer_drain(evbuf, len);
+ if (result < 0 || (size_t)result > len) /* XXX Should this be != rather than > ?*/
+ return (-1);
+ else
+ return result;
+}
+
+int
+evtag_unmarshal_int64(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ ev_uint64_t *pinteger)
+{
+ ev_uint32_t tag;
+ ev_uint32_t len;
+ int result;
+
+ if (decode_tag_internal(&tag, evbuf, 1 /* dodrain */) == -1)
+ return (-1);
+ if (need_tag != tag)
+ return (-1);
+ if (evtag_decode_int(&len, evbuf) == -1)
+ return (-1);
+
+ if (evbuffer_get_length(evbuf) < len)
+ return (-1);
+
+ result = decode_int64_internal(pinteger, evbuf, 0);
+ evbuffer_drain(evbuf, len);
+ if (result < 0 || (size_t)result > len) /* XXX Should this be != rather than > ?*/
+ return (-1);
+ else
+ return result;
+}
+
+/* Unmarshal a fixed length tag */
+
+int
+evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag, void *data,
+ size_t len)
+{
+ ev_uint32_t tag;
+ int tag_len;
+
+ /* Now unmarshal a tag and check that it matches the tag we want */
+ if ((tag_len = evtag_unmarshal_header(src, &tag)) < 0 ||
+ tag != need_tag)
+ return (-1);
+
+ if ((size_t)tag_len != len)
+ return (-1);
+
+ evbuffer_remove(src, data, len);
+ return (0);
+}
+
+int
+evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ char **pstring)
+{
+ ev_uint32_t tag;
+ int tag_len;
+
+ if ((tag_len = evtag_unmarshal_header(evbuf, &tag)) == -1 ||
+ tag != need_tag)
+ return (-1);
+
+ *pstring = mm_malloc(tag_len + 1);
+ if (*pstring == NULL) {
+ event_warn("%s: malloc", __func__);
+ return -1;
+ }
+ evbuffer_remove(evbuf, *pstring, tag_len);
+ (*pstring)[tag_len] = '\0';
+
+ return (0);
+}
+
+int
+evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct timeval *ptv)
+{
+ ev_uint32_t tag;
+ ev_uint32_t integer;
+ int len, offset, offset2;
+ int result = -1;
+
+ if ((len = evtag_unmarshal_header(evbuf, &tag)) == -1)
+ return (-1);
+ if (tag != need_tag)
+ goto done;
+ if ((offset = decode_int_internal(&integer, evbuf, 0)) == -1)
+ goto done;
+ ptv->tv_sec = integer;
+ if ((offset2 = decode_int_internal(&integer, evbuf, offset)) == -1)
+ goto done;
+ ptv->tv_usec = integer;
+ if (offset + offset2 > len) /* XXX Should this be != instead of > ? */
+ goto done;
+
+ result = 0;
+ done:
+ evbuffer_drain(evbuf, len);
+ return result;
+}
diff --git a/sntp/libevent/evmap-internal.h b/sntp/libevent/evmap-internal.h
new file mode 100644
index 000000000000..dfc81d5087a9
--- /dev/null
+++ b/sntp/libevent/evmap-internal.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVMAP_INTERNAL_H_INCLUDED_
+#define EVMAP_INTERNAL_H_INCLUDED_
+
+/** @file evmap-internal.h
+ *
+ * An event_map is a utility structure to map each fd or signal to zero or
+ * more events. Functions to manipulate event_maps should only be used from
+ * inside libevent. They generally need to hold the lock on the corresponding
+ * event_base.
+ **/
+
+struct event_base;
+struct event;
+
+/** Initialize an event_map for use.
+ */
+void evmap_io_initmap_(struct event_io_map* ctx);
+void evmap_signal_initmap_(struct event_signal_map* ctx);
+
+/** Remove all entries from an event_map.
+
+ @param ctx the map to clear.
+ */
+void evmap_io_clear_(struct event_io_map* ctx);
+void evmap_signal_clear_(struct event_signal_map* ctx);
+
+/** Add an IO event (some combination of EV_READ or EV_WRITE) to an
+ event_base's list of events on a given file descriptor, and tell the
+ underlying eventops about the fd if its state has changed.
+
+ Requires that ev is not already added.
+
+ @param base the event_base to operate on.
+ @param fd the file descriptor corresponding to ev.
+ @param ev the event to add.
+*/
+int evmap_io_add_(struct event_base *base, evutil_socket_t fd, struct event *ev);
+/** Remove an IO event (some combination of EV_READ or EV_WRITE) to an
+ event_base's list of events on a given file descriptor, and tell the
+ underlying eventops about the fd if its state has changed.
+
+ @param base the event_base to operate on.
+ @param fd the file descriptor corresponding to ev.
+ @param ev the event to remove.
+ */
+int evmap_io_del_(struct event_base *base, evutil_socket_t fd, struct event *ev);
+/** Active the set of events waiting on an event_base for a given fd.
+
+ @param base the event_base to operate on.
+ @param fd the file descriptor that has become active.
+ @param events a bitmask of EV_READ|EV_WRITE|EV_ET.
+*/
+void evmap_io_active_(struct event_base *base, evutil_socket_t fd, short events);
+
+
+/* These functions behave in the same way as evmap_io_*, except they work on
+ * signals rather than fds. signals use a linear map everywhere; fds use
+ * either a linear map or a hashtable. */
+int evmap_signal_add_(struct event_base *base, int signum, struct event *ev);
+int evmap_signal_del_(struct event_base *base, int signum, struct event *ev);
+void evmap_signal_active_(struct event_base *base, evutil_socket_t signum, int ncalls);
+
+/* Return the fdinfo object associated with a given fd. If the fd has no
+ * events associated with it, the result may be NULL.
+ */
+void *evmap_io_get_fdinfo_(struct event_io_map *ctx, evutil_socket_t fd);
+
+/* Helper for event_reinit(): Tell the backend to re-add every fd and signal
+ * for which we have a pending event.
+ */
+int evmap_reinit_(struct event_base *base);
+
+/* Helper for event_base_free(): Call event_del() on every pending fd and
+ * signal event.
+ */
+void evmap_delete_all_(struct event_base *base);
+
+/* Helper for event_base_assert_ok_(): Check referential integrity of the
+ * evmaps.
+ */
+void evmap_check_integrity_(struct event_base *base);
+
+/* Helper: Call fn on every fd or signal event, passing as its arguments the
+ * provided event_base, the event, and arg. If fn returns 0, process the next
+ * event. If it returns any other value, return that value and process no
+ * more events.
+ */
+int evmap_foreach_event_(struct event_base *base,
+ event_base_foreach_event_cb fn,
+ void *arg);
+
+#endif /* EVMAP_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/evmap.c b/sntp/libevent/evmap.c
new file mode 100644
index 000000000000..3f76dd0ae1f7
--- /dev/null
+++ b/sntp/libevent/evmap.c
@@ -0,0 +1,1055 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+#include <sys/types.h>
+#if !defined(_WIN32) && defined(EVENT__HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+
+#include "event-internal.h"
+#include "evmap-internal.h"
+#include "mm-internal.h"
+#include "changelist-internal.h"
+
+/** An entry for an evmap_io list: notes all the events that want to read or
+ write on a given fd, and the number of each.
+ */
+struct evmap_io {
+ struct event_dlist events;
+ ev_uint16_t nread;
+ ev_uint16_t nwrite;
+ ev_uint16_t nclose;
+};
+
+/* An entry for an evmap_signal list: notes all the events that want to know
+ when a signal triggers. */
+struct evmap_signal {
+ struct event_dlist events;
+};
+
+/* On some platforms, fds start at 0 and increment by 1 as they are
+ allocated, and old numbers get used. For these platforms, we
+ implement io maps just like signal maps: as an array of pointers to
+ struct evmap_io. But on other platforms (windows), sockets are not
+ 0-indexed, not necessarily consecutive, and not necessarily reused.
+ There, we use a hashtable to implement evmap_io.
+*/
+#ifdef EVMAP_USE_HT
+struct event_map_entry {
+ HT_ENTRY(event_map_entry) map_node;
+ evutil_socket_t fd;
+ union { /* This is a union in case we need to make more things that can
+ be in the hashtable. */
+ struct evmap_io evmap_io;
+ } ent;
+};
+
+/* Helper used by the event_io_map hashtable code; tries to return a good hash
+ * of the fd in e->fd. */
+static inline unsigned
+hashsocket(struct event_map_entry *e)
+{
+ /* On win32, in practice, the low 2-3 bits of a SOCKET seem not to
+ * matter. Our hashtable implementation really likes low-order bits,
+ * though, so let's do the rotate-and-add trick. */
+ unsigned h = (unsigned) e->fd;
+ h += (h >> 2) | (h << 30);
+ return h;
+}
+
+/* Helper used by the event_io_map hashtable code; returns true iff e1 and e2
+ * have the same e->fd. */
+static inline int
+eqsocket(struct event_map_entry *e1, struct event_map_entry *e2)
+{
+ return e1->fd == e2->fd;
+}
+
+HT_PROTOTYPE(event_io_map, event_map_entry, map_node, hashsocket, eqsocket)
+HT_GENERATE(event_io_map, event_map_entry, map_node, hashsocket, eqsocket,
+ 0.5, mm_malloc, mm_realloc, mm_free)
+
+#define GET_IO_SLOT(x, map, slot, type) \
+ do { \
+ struct event_map_entry key_, *ent_; \
+ key_.fd = slot; \
+ ent_ = HT_FIND(event_io_map, map, &key_); \
+ (x) = ent_ ? &ent_->ent.type : NULL; \
+ } while (0);
+
+#define GET_IO_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \
+ do { \
+ struct event_map_entry key_, *ent_; \
+ key_.fd = slot; \
+ HT_FIND_OR_INSERT_(event_io_map, map_node, hashsocket, map, \
+ event_map_entry, &key_, ptr, \
+ { \
+ ent_ = *ptr; \
+ }, \
+ { \
+ ent_ = mm_calloc(1,sizeof(struct event_map_entry)+fdinfo_len); \
+ if (EVUTIL_UNLIKELY(ent_ == NULL)) \
+ return (-1); \
+ ent_->fd = slot; \
+ (ctor)(&ent_->ent.type); \
+ HT_FOI_INSERT_(map_node, map, &key_, ent_, ptr) \
+ }); \
+ (x) = &ent_->ent.type; \
+ } while (0)
+
+void evmap_io_initmap_(struct event_io_map *ctx)
+{
+ HT_INIT(event_io_map, ctx);
+}
+
+void evmap_io_clear_(struct event_io_map *ctx)
+{
+ struct event_map_entry **ent, **next, *this;
+ for (ent = HT_START(event_io_map, ctx); ent; ent = next) {
+ this = *ent;
+ next = HT_NEXT_RMV(event_io_map, ctx, ent);
+ mm_free(this);
+ }
+ HT_CLEAR(event_io_map, ctx); /* remove all storage held by the ctx. */
+}
+#endif
+
+/* Set the variable 'x' to the field in event_map 'map' with fields of type
+ 'struct type *' corresponding to the fd or signal 'slot'. Set 'x' to NULL
+ if there are no entries for 'slot'. Does no bounds-checking. */
+#define GET_SIGNAL_SLOT(x, map, slot, type) \
+ (x) = (struct type *)((map)->entries[slot])
+/* As GET_SLOT, but construct the entry for 'slot' if it is not present,
+ by allocating enough memory for a 'struct type', and initializing the new
+ value by calling the function 'ctor' on it. Makes the function
+ return -1 on allocation failure.
+ */
+#define GET_SIGNAL_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \
+ do { \
+ if ((map)->entries[slot] == NULL) { \
+ (map)->entries[slot] = \
+ mm_calloc(1,sizeof(struct type)+fdinfo_len); \
+ if (EVUTIL_UNLIKELY((map)->entries[slot] == NULL)) \
+ return (-1); \
+ (ctor)((struct type *)(map)->entries[slot]); \
+ } \
+ (x) = (struct type *)((map)->entries[slot]); \
+ } while (0)
+
+/* If we aren't using hashtables, then define the IO_SLOT macros and functions
+ as thin aliases over the SIGNAL_SLOT versions. */
+#ifndef EVMAP_USE_HT
+#define GET_IO_SLOT(x,map,slot,type) GET_SIGNAL_SLOT(x,map,slot,type)
+#define GET_IO_SLOT_AND_CTOR(x,map,slot,type,ctor,fdinfo_len) \
+ GET_SIGNAL_SLOT_AND_CTOR(x,map,slot,type,ctor,fdinfo_len)
+#define FDINFO_OFFSET sizeof(struct evmap_io)
+void
+evmap_io_initmap_(struct event_io_map* ctx)
+{
+ evmap_signal_initmap_(ctx);
+}
+void
+evmap_io_clear_(struct event_io_map* ctx)
+{
+ evmap_signal_clear_(ctx);
+}
+#endif
+
+
+/** Expand 'map' with new entries of width 'msize' until it is big enough
+ to store a value in 'slot'.
+ */
+static int
+evmap_make_space(struct event_signal_map *map, int slot, int msize)
+{
+ if (map->nentries <= slot) {
+ int nentries = map->nentries ? map->nentries : 32;
+ void **tmp;
+
+ while (nentries <= slot)
+ nentries <<= 1;
+
+ tmp = (void **)mm_realloc(map->entries, nentries * msize);
+ if (tmp == NULL)
+ return (-1);
+
+ memset(&tmp[map->nentries], 0,
+ (nentries - map->nentries) * msize);
+
+ map->nentries = nentries;
+ map->entries = tmp;
+ }
+
+ return (0);
+}
+
+void
+evmap_signal_initmap_(struct event_signal_map *ctx)
+{
+ ctx->nentries = 0;
+ ctx->entries = NULL;
+}
+
+void
+evmap_signal_clear_(struct event_signal_map *ctx)
+{
+ if (ctx->entries != NULL) {
+ int i;
+ for (i = 0; i < ctx->nentries; ++i) {
+ if (ctx->entries[i] != NULL)
+ mm_free(ctx->entries[i]);
+ }
+ mm_free(ctx->entries);
+ ctx->entries = NULL;
+ }
+ ctx->nentries = 0;
+}
+
+
+/* code specific to file descriptors */
+
+/** Constructor for struct evmap_io */
+static void
+evmap_io_init(struct evmap_io *entry)
+{
+ LIST_INIT(&entry->events);
+ entry->nread = 0;
+ entry->nwrite = 0;
+ entry->nclose = 0;
+}
+
+
+/* return -1 on error, 0 on success if nothing changed in the event backend,
+ * and 1 on success if something did. */
+int
+evmap_io_add_(struct event_base *base, evutil_socket_t fd, struct event *ev)
+{
+ const struct eventop *evsel = base->evsel;
+ struct event_io_map *io = &base->io;
+ struct evmap_io *ctx = NULL;
+ int nread, nwrite, nclose, retval = 0;
+ short res = 0, old = 0;
+ struct event *old_ev;
+
+ EVUTIL_ASSERT(fd == ev->ev_fd);
+
+ if (fd < 0)
+ return 0;
+
+#ifndef EVMAP_USE_HT
+ if (fd >= io->nentries) {
+ if (evmap_make_space(io, fd, sizeof(struct evmap_io *)) == -1)
+ return (-1);
+ }
+#endif
+ GET_IO_SLOT_AND_CTOR(ctx, io, fd, evmap_io, evmap_io_init,
+ evsel->fdinfo_len);
+
+ nread = ctx->nread;
+ nwrite = ctx->nwrite;
+ nclose = ctx->nclose;
+
+ if (nread)
+ old |= EV_READ;
+ if (nwrite)
+ old |= EV_WRITE;
+ if (nclose)
+ old |= EV_CLOSED;
+
+ if (ev->ev_events & EV_READ) {
+ if (++nread == 1)
+ res |= EV_READ;
+ }
+ if (ev->ev_events & EV_WRITE) {
+ if (++nwrite == 1)
+ res |= EV_WRITE;
+ }
+ if (ev->ev_events & EV_CLOSED) {
+ if (++nclose == 1)
+ res |= EV_CLOSED;
+ }
+ if (EVUTIL_UNLIKELY(nread > 0xffff || nwrite > 0xffff || nclose > 0xffff)) {
+ event_warnx("Too many events reading or writing on fd %d",
+ (int)fd);
+ return -1;
+ }
+ if (EVENT_DEBUG_MODE_IS_ON() &&
+ (old_ev = LIST_FIRST(&ctx->events)) &&
+ (old_ev->ev_events&EV_ET) != (ev->ev_events&EV_ET)) {
+ event_warnx("Tried to mix edge-triggered and non-edge-triggered"
+ " events on fd %d", (int)fd);
+ return -1;
+ }
+
+ if (res) {
+ void *extra = ((char*)ctx) + sizeof(struct evmap_io);
+ /* XXX(niels): we cannot mix edge-triggered and
+ * level-triggered, we should probably assert on
+ * this. */
+ if (evsel->add(base, ev->ev_fd,
+ old, (ev->ev_events & EV_ET) | res, extra) == -1)
+ return (-1);
+ retval = 1;
+ }
+
+ ctx->nread = (ev_uint16_t) nread;
+ ctx->nwrite = (ev_uint16_t) nwrite;
+ ctx->nclose = (ev_uint16_t) nclose;
+ LIST_INSERT_HEAD(&ctx->events, ev, ev_io_next);
+
+ return (retval);
+}
+
+/* return -1 on error, 0 on success if nothing changed in the event backend,
+ * and 1 on success if something did. */
+int
+evmap_io_del_(struct event_base *base, evutil_socket_t fd, struct event *ev)
+{
+ const struct eventop *evsel = base->evsel;
+ struct event_io_map *io = &base->io;
+ struct evmap_io *ctx;
+ int nread, nwrite, nclose, retval = 0;
+ short res = 0, old = 0;
+
+ if (fd < 0)
+ return 0;
+
+ EVUTIL_ASSERT(fd == ev->ev_fd);
+
+#ifndef EVMAP_USE_HT
+ if (fd >= io->nentries)
+ return (-1);
+#endif
+
+ GET_IO_SLOT(ctx, io, fd, evmap_io);
+
+ nread = ctx->nread;
+ nwrite = ctx->nwrite;
+ nclose = ctx->nclose;
+
+ if (nread)
+ old |= EV_READ;
+ if (nwrite)
+ old |= EV_WRITE;
+ if (nclose)
+ old |= EV_CLOSED;
+
+ if (ev->ev_events & EV_READ) {
+ if (--nread == 0)
+ res |= EV_READ;
+ EVUTIL_ASSERT(nread >= 0);
+ }
+ if (ev->ev_events & EV_WRITE) {
+ if (--nwrite == 0)
+ res |= EV_WRITE;
+ EVUTIL_ASSERT(nwrite >= 0);
+ }
+ if (ev->ev_events & EV_CLOSED) {
+ if (--nclose == 0)
+ res |= EV_CLOSED;
+ EVUTIL_ASSERT(nclose >= 0);
+ }
+
+ if (res) {
+ void *extra = ((char*)ctx) + sizeof(struct evmap_io);
+ if (evsel->del(base, ev->ev_fd, old, res, extra) == -1) {
+ retval = -1;
+ } else {
+ retval = 1;
+ }
+ }
+
+ ctx->nread = nread;
+ ctx->nwrite = nwrite;
+ ctx->nclose = nclose;
+ LIST_REMOVE(ev, ev_io_next);
+
+ return (retval);
+}
+
+void
+evmap_io_active_(struct event_base *base, evutil_socket_t fd, short events)
+{
+ struct event_io_map *io = &base->io;
+ struct evmap_io *ctx;
+ struct event *ev;
+
+#ifndef EVMAP_USE_HT
+ if (fd < 0 || fd >= io->nentries)
+ return;
+#endif
+ GET_IO_SLOT(ctx, io, fd, evmap_io);
+
+ if (NULL == ctx)
+ return;
+ LIST_FOREACH(ev, &ctx->events, ev_io_next) {
+ if (ev->ev_events & events)
+ event_active_nolock_(ev, ev->ev_events & events, 1);
+ }
+}
+
+/* code specific to signals */
+
+static void
+evmap_signal_init(struct evmap_signal *entry)
+{
+ LIST_INIT(&entry->events);
+}
+
+
+int
+evmap_signal_add_(struct event_base *base, int sig, struct event *ev)
+{
+ const struct eventop *evsel = base->evsigsel;
+ struct event_signal_map *map = &base->sigmap;
+ struct evmap_signal *ctx = NULL;
+
+ if (sig >= map->nentries) {
+ if (evmap_make_space(
+ map, sig, sizeof(struct evmap_signal *)) == -1)
+ return (-1);
+ }
+ GET_SIGNAL_SLOT_AND_CTOR(ctx, map, sig, evmap_signal, evmap_signal_init,
+ base->evsigsel->fdinfo_len);
+
+ if (LIST_EMPTY(&ctx->events)) {
+ if (evsel->add(base, ev->ev_fd, 0, EV_SIGNAL, NULL)
+ == -1)
+ return (-1);
+ }
+
+ LIST_INSERT_HEAD(&ctx->events, ev, ev_signal_next);
+
+ return (1);
+}
+
+int
+evmap_signal_del_(struct event_base *base, int sig, struct event *ev)
+{
+ const struct eventop *evsel = base->evsigsel;
+ struct event_signal_map *map = &base->sigmap;
+ struct evmap_signal *ctx;
+
+ if (sig >= map->nentries)
+ return (-1);
+
+ GET_SIGNAL_SLOT(ctx, map, sig, evmap_signal);
+
+ LIST_REMOVE(ev, ev_signal_next);
+
+ if (LIST_FIRST(&ctx->events) == NULL) {
+ if (evsel->del(base, ev->ev_fd, 0, EV_SIGNAL, NULL) == -1)
+ return (-1);
+ }
+
+ return (1);
+}
+
+void
+evmap_signal_active_(struct event_base *base, evutil_socket_t sig, int ncalls)
+{
+ struct event_signal_map *map = &base->sigmap;
+ struct evmap_signal *ctx;
+ struct event *ev;
+
+ if (sig < 0 || sig >= map->nentries)
+ return;
+ GET_SIGNAL_SLOT(ctx, map, sig, evmap_signal);
+
+ if (!ctx)
+ return;
+ LIST_FOREACH(ev, &ctx->events, ev_signal_next)
+ event_active_nolock_(ev, EV_SIGNAL, ncalls);
+}
+
+void *
+evmap_io_get_fdinfo_(struct event_io_map *map, evutil_socket_t fd)
+{
+ struct evmap_io *ctx;
+ GET_IO_SLOT(ctx, map, fd, evmap_io);
+ if (ctx)
+ return ((char*)ctx) + sizeof(struct evmap_io);
+ else
+ return NULL;
+}
+
+/* Callback type for evmap_io_foreach_fd */
+typedef int (*evmap_io_foreach_fd_cb)(
+ struct event_base *, evutil_socket_t, struct evmap_io *, void *);
+
+/* Multipurpose helper function: Iterate over every file descriptor event_base
+ * for which we could have EV_READ or EV_WRITE events. For each such fd, call
+ * fn(base, signum, evmap_io, arg), where fn is the user-provided
+ * function, base is the event_base, signum is the signal number, evmap_io
+ * is an evmap_io structure containing a list of events pending on the
+ * file descriptor, and arg is the user-supplied argument.
+ *
+ * If fn returns 0, continue on to the next signal. Otherwise, return the same
+ * value that fn returned.
+ *
+ * Note that there is no guarantee that the file descriptors will be processed
+ * in any particular order.
+ */
+static int
+evmap_io_foreach_fd(struct event_base *base,
+ evmap_io_foreach_fd_cb fn,
+ void *arg)
+{
+ evutil_socket_t fd;
+ struct event_io_map *iomap = &base->io;
+ int r = 0;
+#ifdef EVMAP_USE_HT
+ struct event_map_entry **mapent;
+ HT_FOREACH(mapent, event_io_map, iomap) {
+ struct evmap_io *ctx = &(*mapent)->ent.evmap_io;
+ fd = (*mapent)->fd;
+#else
+ for (fd = 0; fd < iomap->nentries; ++fd) {
+ struct evmap_io *ctx = iomap->entries[fd];
+ if (!ctx)
+ continue;
+#endif
+ if ((r = fn(base, fd, ctx, arg)))
+ break;
+ }
+ return r;
+}
+
+/* Callback type for evmap_signal_foreach_signal */
+typedef int (*evmap_signal_foreach_signal_cb)(
+ struct event_base *, int, struct evmap_signal *, void *);
+
+/* Multipurpose helper function: Iterate over every signal number in the
+ * event_base for which we could have signal events. For each such signal,
+ * call fn(base, signum, evmap_signal, arg), where fn is the user-provided
+ * function, base is the event_base, signum is the signal number, evmap_signal
+ * is an evmap_signal structure containing a list of events pending on the
+ * signal, and arg is the user-supplied argument.
+ *
+ * If fn returns 0, continue on to the next signal. Otherwise, return the same
+ * value that fn returned.
+ */
+static int
+evmap_signal_foreach_signal(struct event_base *base,
+ evmap_signal_foreach_signal_cb fn,
+ void *arg)
+{
+ struct event_signal_map *sigmap = &base->sigmap;
+ int r = 0;
+ int signum;
+
+ for (signum = 0; signum < sigmap->nentries; ++signum) {
+ struct evmap_signal *ctx = sigmap->entries[signum];
+ if (!ctx)
+ continue;
+ if ((r = fn(base, signum, ctx, arg)))
+ break;
+ }
+ return r;
+}
+
+/* Helper for evmap_reinit_: tell the backend to add every fd for which we have
+ * pending events, with the appropriate combination of EV_READ, EV_WRITE, and
+ * EV_ET. */
+static int
+evmap_io_reinit_iter_fn(struct event_base *base, evutil_socket_t fd,
+ struct evmap_io *ctx, void *arg)
+{
+ const struct eventop *evsel = base->evsel;
+ void *extra;
+ int *result = arg;
+ short events = 0;
+ struct event *ev;
+ EVUTIL_ASSERT(ctx);
+
+ extra = ((char*)ctx) + sizeof(struct evmap_io);
+ if (ctx->nread)
+ events |= EV_READ;
+ if (ctx->nwrite)
+ events |= EV_WRITE;
+ if (ctx->nclose)
+ events |= EV_CLOSED;
+ if (evsel->fdinfo_len)
+ memset(extra, 0, evsel->fdinfo_len);
+ if (events &&
+ (ev = LIST_FIRST(&ctx->events)) &&
+ (ev->ev_events & EV_ET))
+ events |= EV_ET;
+ if (evsel->add(base, fd, 0, events, extra) == -1)
+ *result = -1;
+
+ return 0;
+}
+
+/* Helper for evmap_reinit_: tell the backend to add every signal for which we
+ * have pending events. */
+static int
+evmap_signal_reinit_iter_fn(struct event_base *base,
+ int signum, struct evmap_signal *ctx, void *arg)
+{
+ const struct eventop *evsel = base->evsigsel;
+ int *result = arg;
+
+ if (!LIST_EMPTY(&ctx->events)) {
+ if (evsel->add(base, signum, 0, EV_SIGNAL, NULL) == -1)
+ *result = -1;
+ }
+ return 0;
+}
+
+int
+evmap_reinit_(struct event_base *base)
+{
+ int result = 0;
+
+ evmap_io_foreach_fd(base, evmap_io_reinit_iter_fn, &result);
+ if (result < 0)
+ return -1;
+ evmap_signal_foreach_signal(base, evmap_signal_reinit_iter_fn, &result);
+ if (result < 0)
+ return -1;
+ return 0;
+}
+
+/* Helper for evmap_delete_all_: delete every event in an event_dlist. */
+static int
+delete_all_in_dlist(struct event_dlist *dlist)
+{
+ struct event *ev;
+ while ((ev = LIST_FIRST(dlist)))
+ event_del(ev);
+ return 0;
+}
+
+/* Helper for evmap_delete_all_: delete every event pending on an fd. */
+static int
+evmap_io_delete_all_iter_fn(struct event_base *base, evutil_socket_t fd,
+ struct evmap_io *io_info, void *arg)
+{
+ return delete_all_in_dlist(&io_info->events);
+}
+
+/* Helper for evmap_delete_all_: delete every event pending on a signal. */
+static int
+evmap_signal_delete_all_iter_fn(struct event_base *base, int signum,
+ struct evmap_signal *sig_info, void *arg)
+{
+ return delete_all_in_dlist(&sig_info->events);
+}
+
+void
+evmap_delete_all_(struct event_base *base)
+{
+ evmap_signal_foreach_signal(base, evmap_signal_delete_all_iter_fn, NULL);
+ evmap_io_foreach_fd(base, evmap_io_delete_all_iter_fn, NULL);
+}
+
+/** Per-fd structure for use with changelists. It keeps track, for each fd or
+ * signal using the changelist, of where its entry in the changelist is.
+ */
+struct event_changelist_fdinfo {
+ int idxplus1; /* this is the index +1, so that memset(0) will make it
+ * a no-such-element */
+};
+
+void
+event_changelist_init_(struct event_changelist *changelist)
+{
+ changelist->changes = NULL;
+ changelist->changes_size = 0;
+ changelist->n_changes = 0;
+}
+
+/** Helper: return the changelist_fdinfo corresponding to a given change. */
+static inline struct event_changelist_fdinfo *
+event_change_get_fdinfo(struct event_base *base,
+ const struct event_change *change)
+{
+ char *ptr;
+ if (change->read_change & EV_CHANGE_SIGNAL) {
+ struct evmap_signal *ctx;
+ GET_SIGNAL_SLOT(ctx, &base->sigmap, change->fd, evmap_signal);
+ ptr = ((char*)ctx) + sizeof(struct evmap_signal);
+ } else {
+ struct evmap_io *ctx;
+ GET_IO_SLOT(ctx, &base->io, change->fd, evmap_io);
+ ptr = ((char*)ctx) + sizeof(struct evmap_io);
+ }
+ return (void*)ptr;
+}
+
+/** Callback helper for event_changelist_assert_ok */
+static int
+event_changelist_assert_ok_foreach_iter_fn(
+ struct event_base *base,
+ evutil_socket_t fd, struct evmap_io *io, void *arg)
+{
+ struct event_changelist *changelist = &base->changelist;
+ struct event_changelist_fdinfo *f;
+ f = (void*)
+ ( ((char*)io) + sizeof(struct evmap_io) );
+ if (f->idxplus1) {
+ struct event_change *c = &changelist->changes[f->idxplus1 - 1];
+ EVUTIL_ASSERT(c->fd == fd);
+ }
+ return 0;
+}
+
+/** Make sure that the changelist is consistent with the evmap structures. */
+static void
+event_changelist_assert_ok(struct event_base *base)
+{
+ int i;
+ struct event_changelist *changelist = &base->changelist;
+
+ EVUTIL_ASSERT(changelist->changes_size >= changelist->n_changes);
+ for (i = 0; i < changelist->n_changes; ++i) {
+ struct event_change *c = &changelist->changes[i];
+ struct event_changelist_fdinfo *f;
+ EVUTIL_ASSERT(c->fd >= 0);
+ f = event_change_get_fdinfo(base, c);
+ EVUTIL_ASSERT(f);
+ EVUTIL_ASSERT(f->idxplus1 == i + 1);
+ }
+
+ evmap_io_foreach_fd(base,
+ event_changelist_assert_ok_foreach_iter_fn,
+ NULL);
+}
+
+#ifdef DEBUG_CHANGELIST
+#define event_changelist_check(base) event_changelist_assert_ok((base))
+#else
+#define event_changelist_check(base) ((void)0)
+#endif
+
+void
+event_changelist_remove_all_(struct event_changelist *changelist,
+ struct event_base *base)
+{
+ int i;
+
+ event_changelist_check(base);
+
+ for (i = 0; i < changelist->n_changes; ++i) {
+ struct event_change *ch = &changelist->changes[i];
+ struct event_changelist_fdinfo *fdinfo =
+ event_change_get_fdinfo(base, ch);
+ EVUTIL_ASSERT(fdinfo->idxplus1 == i + 1);
+ fdinfo->idxplus1 = 0;
+ }
+
+ changelist->n_changes = 0;
+
+ event_changelist_check(base);
+}
+
+void
+event_changelist_freemem_(struct event_changelist *changelist)
+{
+ if (changelist->changes)
+ mm_free(changelist->changes);
+ event_changelist_init_(changelist); /* zero it all out. */
+}
+
+/** Increase the size of 'changelist' to hold more changes. */
+static int
+event_changelist_grow(struct event_changelist *changelist)
+{
+ int new_size;
+ struct event_change *new_changes;
+ if (changelist->changes_size < 64)
+ new_size = 64;
+ else
+ new_size = changelist->changes_size * 2;
+
+ new_changes = mm_realloc(changelist->changes,
+ new_size * sizeof(struct event_change));
+
+ if (EVUTIL_UNLIKELY(new_changes == NULL))
+ return (-1);
+
+ changelist->changes = new_changes;
+ changelist->changes_size = new_size;
+
+ return (0);
+}
+
+/** Return a pointer to the changelist entry for the file descriptor or signal
+ * 'fd', whose fdinfo is 'fdinfo'. If none exists, construct it, setting its
+ * old_events field to old_events.
+ */
+static struct event_change *
+event_changelist_get_or_construct(struct event_changelist *changelist,
+ evutil_socket_t fd,
+ short old_events,
+ struct event_changelist_fdinfo *fdinfo)
+{
+ struct event_change *change;
+
+ if (fdinfo->idxplus1 == 0) {
+ int idx;
+ EVUTIL_ASSERT(changelist->n_changes <= changelist->changes_size);
+
+ if (changelist->n_changes == changelist->changes_size) {
+ if (event_changelist_grow(changelist) < 0)
+ return NULL;
+ }
+
+ idx = changelist->n_changes++;
+ change = &changelist->changes[idx];
+ fdinfo->idxplus1 = idx + 1;
+
+ memset(change, 0, sizeof(struct event_change));
+ change->fd = fd;
+ change->old_events = old_events;
+ } else {
+ change = &changelist->changes[fdinfo->idxplus1 - 1];
+ EVUTIL_ASSERT(change->fd == fd);
+ }
+ return change;
+}
+
+int
+event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, short events,
+ void *p)
+{
+ struct event_changelist *changelist = &base->changelist;
+ struct event_changelist_fdinfo *fdinfo = p;
+ struct event_change *change;
+
+ event_changelist_check(base);
+
+ change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
+ if (!change)
+ return -1;
+
+ /* An add replaces any previous delete, but doesn't result in a no-op,
+ * since the delete might fail (because the fd had been closed since
+ * the last add, for instance. */
+
+ if (events & (EV_READ|EV_SIGNAL)) {
+ change->read_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
+ if (events & EV_WRITE) {
+ change->write_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
+ if (events & EV_CLOSED) {
+ change->close_change = EV_CHANGE_ADD |
+ (events & (EV_ET|EV_PERSIST|EV_SIGNAL));
+ }
+
+ event_changelist_check(base);
+ return (0);
+}
+
+int
+event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, short events,
+ void *p)
+{
+ struct event_changelist *changelist = &base->changelist;
+ struct event_changelist_fdinfo *fdinfo = p;
+ struct event_change *change;
+
+ event_changelist_check(base);
+ change = event_changelist_get_or_construct(changelist, fd, old, fdinfo);
+ event_changelist_check(base);
+ if (!change)
+ return -1;
+
+ /* A delete on an event set that doesn't contain the event to be
+ deleted produces a no-op. This effectively emoves any previous
+ uncommitted add, rather than replacing it: on those platforms where
+ "add, delete, dispatch" is not the same as "no-op, dispatch", we
+ want the no-op behavior.
+
+ If we have a no-op item, we could remove it it from the list
+ entirely, but really there's not much point: skipping the no-op
+ change when we do the dispatch later is far cheaper than rejuggling
+ the array now.
+
+ As this stands, it also lets through deletions of events that are
+ not currently set.
+ */
+
+ if (events & (EV_READ|EV_SIGNAL)) {
+ if (!(change->old_events & (EV_READ | EV_SIGNAL)))
+ change->read_change = 0;
+ else
+ change->read_change = EV_CHANGE_DEL;
+ }
+ if (events & EV_WRITE) {
+ if (!(change->old_events & EV_WRITE))
+ change->write_change = 0;
+ else
+ change->write_change = EV_CHANGE_DEL;
+ }
+ if (events & EV_CLOSED) {
+ if (!(change->old_events & EV_CLOSED))
+ change->close_change = 0;
+ else
+ change->close_change = EV_CHANGE_DEL;
+ }
+
+ event_changelist_check(base);
+ return (0);
+}
+
+/* Helper for evmap_check_integrity_: verify that all of the events pending on
+ * given fd are set up correctly, and that the nread and nwrite counts on that
+ * fd are correct. */
+static int
+evmap_io_check_integrity_fn(struct event_base *base, evutil_socket_t fd,
+ struct evmap_io *io_info, void *arg)
+{
+ struct event *ev;
+ int n_read = 0, n_write = 0, n_close = 0;
+
+ /* First, make sure the list itself isn't corrupt. Otherwise,
+ * running LIST_FOREACH could be an exciting adventure. */
+ EVUTIL_ASSERT_LIST_OK(&io_info->events, event, ev_io_next);
+
+ LIST_FOREACH(ev, &io_info->events, ev_io_next) {
+ EVUTIL_ASSERT(ev->ev_flags & EVLIST_INSERTED);
+ EVUTIL_ASSERT(ev->ev_fd == fd);
+ EVUTIL_ASSERT(!(ev->ev_events & EV_SIGNAL));
+ EVUTIL_ASSERT((ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED)));
+ if (ev->ev_events & EV_READ)
+ ++n_read;
+ if (ev->ev_events & EV_WRITE)
+ ++n_write;
+ if (ev->ev_events & EV_CLOSED)
+ ++n_close;
+ }
+
+ EVUTIL_ASSERT(n_read == io_info->nread);
+ EVUTIL_ASSERT(n_write == io_info->nwrite);
+ EVUTIL_ASSERT(n_close == io_info->nclose);
+
+ return 0;
+}
+
+/* Helper for evmap_check_integrity_: verify that all of the events pending
+ * on given signal are set up correctly. */
+static int
+evmap_signal_check_integrity_fn(struct event_base *base,
+ int signum, struct evmap_signal *sig_info, void *arg)
+{
+ struct event *ev;
+ /* First, make sure the list itself isn't corrupt. */
+ EVUTIL_ASSERT_LIST_OK(&sig_info->events, event, ev_signal_next);
+
+ LIST_FOREACH(ev, &sig_info->events, ev_io_next) {
+ EVUTIL_ASSERT(ev->ev_flags & EVLIST_INSERTED);
+ EVUTIL_ASSERT(ev->ev_fd == signum);
+ EVUTIL_ASSERT((ev->ev_events & EV_SIGNAL));
+ EVUTIL_ASSERT(!(ev->ev_events & (EV_READ|EV_WRITE|EV_CLOSED)));
+ }
+ return 0;
+}
+
+void
+evmap_check_integrity_(struct event_base *base)
+{
+ evmap_io_foreach_fd(base, evmap_io_check_integrity_fn, NULL);
+ evmap_signal_foreach_signal(base, evmap_signal_check_integrity_fn, NULL);
+
+ if (base->evsel->add == event_changelist_add_)
+ event_changelist_assert_ok(base);
+}
+
+/* Helper type for evmap_foreach_event_: Bundles a function to call on every
+ * event, and the user-provided void* to use as its third argument. */
+struct evmap_foreach_event_helper {
+ event_base_foreach_event_cb fn;
+ void *arg;
+};
+
+/* Helper for evmap_foreach_event_: calls a provided function on every event
+ * pending on a given fd. */
+static int
+evmap_io_foreach_event_fn(struct event_base *base, evutil_socket_t fd,
+ struct evmap_io *io_info, void *arg)
+{
+ struct evmap_foreach_event_helper *h = arg;
+ struct event *ev;
+ int r;
+ LIST_FOREACH(ev, &io_info->events, ev_io_next) {
+ if ((r = h->fn(base, ev, h->arg)))
+ return r;
+ }
+ return 0;
+}
+
+/* Helper for evmap_foreach_event_: calls a provided function on every event
+ * pending on a given signal. */
+static int
+evmap_signal_foreach_event_fn(struct event_base *base, int signum,
+ struct evmap_signal *sig_info, void *arg)
+{
+ struct event *ev;
+ struct evmap_foreach_event_helper *h = arg;
+ int r;
+ LIST_FOREACH(ev, &sig_info->events, ev_signal_next) {
+ if ((r = h->fn(base, ev, h->arg)))
+ return r;
+ }
+ return 0;
+}
+
+int
+evmap_foreach_event_(struct event_base *base,
+ event_base_foreach_event_cb fn, void *arg)
+{
+ struct evmap_foreach_event_helper h;
+ int r;
+ h.fn = fn;
+ h.arg = arg;
+ if ((r = evmap_io_foreach_fd(base, evmap_io_foreach_event_fn, &h)))
+ return r;
+ return evmap_signal_foreach_signal(base, evmap_signal_foreach_event_fn, &h);
+}
+
diff --git a/sntp/libevent/evport.c b/sntp/libevent/evport.c
new file mode 100644
index 000000000000..a014386bfe31
--- /dev/null
+++ b/sntp/libevent/evport.c
@@ -0,0 +1,451 @@
+/*
+ * Submitted by David Pacheco (dp.spambait@gmail.com)
+ *
+ * Copyright 2006-2007 Niels Provos
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ``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 SUN MICROSYSTEMS, INC. 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) 2007 Sun Microsystems. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * evport.c: event backend using Solaris 10 event ports. See port_create(3C).
+ * This implementation is loosely modeled after the one used for select(2) (in
+ * select.c).
+ *
+ * The outstanding events are tracked in a data structure called evport_data.
+ * Each entry in the ed_fds array corresponds to a file descriptor, and contains
+ * pointers to the read and write events that correspond to that fd. (That is,
+ * when the file is readable, the "read" event should handle it, etc.)
+ *
+ * evport_add and evport_del update this data structure. evport_dispatch uses it
+ * to determine where to callback when an event occurs (which it gets from
+ * port_getn).
+ *
+ * Helper functions are used: grow() grows the file descriptor array as
+ * necessary when large fd's come in. reassociate() takes care of maintaining
+ * the proper file-descriptor/event-port associations.
+ *
+ * As in the select(2) implementation, signals are handled by evsignal.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_EVENT_PORTS
+
+#include <sys/time.h>
+#include <sys/queue.h>
+#include <errno.h>
+#include <poll.h>
+#include <port.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "event2/thread.h"
+
+#include "evthread-internal.h"
+#include "event-internal.h"
+#include "log-internal.h"
+#include "evsignal-internal.h"
+#include "evmap-internal.h"
+
+#define INITIAL_EVENTS_PER_GETN 8
+#define MAX_EVENTS_PER_GETN 4096
+
+/*
+ * Per-file-descriptor information about what events we're subscribed to. These
+ * fields are NULL if no event is subscribed to either of them.
+ */
+
+struct fd_info {
+ /* combinations of EV_READ and EV_WRITE */
+ short fdi_what;
+ /* Index of this fd within ed_pending, plus 1. Zero if this fd is
+ * not in ed_pending. (The +1 is a hack so that memset(0) will set
+ * it to a nil index. */
+ int pending_idx_plus_1;
+};
+
+#define FDI_HAS_READ(fdi) ((fdi)->fdi_what & EV_READ)
+#define FDI_HAS_WRITE(fdi) ((fdi)->fdi_what & EV_WRITE)
+#define FDI_HAS_EVENTS(fdi) (FDI_HAS_READ(fdi) || FDI_HAS_WRITE(fdi))
+#define FDI_TO_SYSEVENTS(fdi) (FDI_HAS_READ(fdi) ? POLLIN : 0) | \
+ (FDI_HAS_WRITE(fdi) ? POLLOUT : 0)
+
+struct evport_data {
+ int ed_port; /* event port for system events */
+ /* How many elements of ed_pending should we look at? */
+ int ed_npending;
+ /* How many elements are allocated in ed_pending and pevtlist? */
+ int ed_maxevents;
+ /* fdi's that we need to reassoc */
+ int *ed_pending;
+ /* storage space for incoming events. */
+ port_event_t *ed_pevtlist;
+
+};
+
+static void* evport_init(struct event_base *);
+static int evport_add(struct event_base *, int fd, short old, short events, void *);
+static int evport_del(struct event_base *, int fd, short old, short events, void *);
+static int evport_dispatch(struct event_base *, struct timeval *);
+static void evport_dealloc(struct event_base *);
+static int grow(struct evport_data *, int min_events);
+
+const struct eventop evportops = {
+ "evport",
+ evport_init,
+ evport_add,
+ evport_del,
+ evport_dispatch,
+ evport_dealloc,
+ 1, /* need reinit */
+ 0, /* features */
+ sizeof(struct fd_info), /* fdinfo length */
+};
+
+/*
+ * Initialize the event port implementation.
+ */
+
+static void*
+evport_init(struct event_base *base)
+{
+ struct evport_data *evpd;
+
+ if (!(evpd = mm_calloc(1, sizeof(struct evport_data))))
+ return (NULL);
+
+ if ((evpd->ed_port = port_create()) == -1) {
+ mm_free(evpd);
+ return (NULL);
+ }
+
+ if (grow(evpd, INITIAL_EVENTS_PER_GETN) < 0) {
+ close(evpd->ed_port);
+ mm_free(evpd);
+ return NULL;
+ }
+
+ evpd->ed_npending = 0;
+
+ evsig_init_(base);
+
+ return (evpd);
+}
+
+static int
+grow(struct evport_data *data, int min_events)
+{
+ int newsize;
+ int *new_pending;
+ port_event_t *new_pevtlist;
+ if (data->ed_maxevents) {
+ newsize = data->ed_maxevents;
+ do {
+ newsize *= 2;
+ } while (newsize < min_events);
+ } else {
+ newsize = min_events;
+ }
+
+ new_pending = mm_realloc(data->ed_pending, sizeof(int)*newsize);
+ if (new_pending == NULL)
+ return -1;
+ data->ed_pending = new_pending;
+ new_pevtlist = mm_realloc(data->ed_pevtlist, sizeof(port_event_t)*newsize);
+ if (new_pevtlist == NULL)
+ return -1;
+ data->ed_pevtlist = new_pevtlist;
+
+ data->ed_maxevents = newsize;
+ return 0;
+}
+
+#ifdef CHECK_INVARIANTS
+/*
+ * Checks some basic properties about the evport_data structure. Because it
+ * checks all file descriptors, this function can be expensive when the maximum
+ * file descriptor ever used is rather large.
+ */
+
+static void
+check_evportop(struct evport_data *evpd)
+{
+ EVUTIL_ASSERT(evpd);
+ EVUTIL_ASSERT(evpd->ed_port > 0);
+}
+
+/*
+ * Verifies very basic integrity of a given port_event.
+ */
+static void
+check_event(port_event_t* pevt)
+{
+ /*
+ * We've only registered for PORT_SOURCE_FD events. The only
+ * other thing we can legitimately receive is PORT_SOURCE_ALERT,
+ * but since we're not using port_alert either, we can assume
+ * PORT_SOURCE_FD.
+ */
+ EVUTIL_ASSERT(pevt->portev_source == PORT_SOURCE_FD);
+}
+
+#else
+#define check_evportop(epop)
+#define check_event(pevt)
+#endif /* CHECK_INVARIANTS */
+
+/*
+ * (Re)associates the given file descriptor with the event port. The OS events
+ * are specified (implicitly) from the fd_info struct.
+ */
+static int
+reassociate(struct evport_data *epdp, struct fd_info *fdip, int fd)
+{
+ int sysevents = FDI_TO_SYSEVENTS(fdip);
+
+ if (sysevents != 0) {
+ if (port_associate(epdp->ed_port, PORT_SOURCE_FD,
+ fd, sysevents, fdip) == -1) {
+ event_warn("port_associate");
+ return (-1);
+ }
+ }
+
+ check_evportop(epdp);
+
+ return (0);
+}
+
+/*
+ * Main event loop - polls port_getn for some number of events, and processes
+ * them.
+ */
+
+static int
+evport_dispatch(struct event_base *base, struct timeval *tv)
+{
+ int i, res;
+ struct evport_data *epdp = base->evbase;
+ port_event_t *pevtlist = epdp->ed_pevtlist;
+
+ /*
+ * port_getn will block until it has at least nevents events. It will
+ * also return how many it's given us (which may be more than we asked
+ * for, as long as it's less than our maximum (ed_maxevents)) in
+ * nevents.
+ */
+ int nevents = 1;
+
+ /*
+ * We have to convert a struct timeval to a struct timespec
+ * (only difference is nanoseconds vs. microseconds). If no time-based
+ * events are active, we should wait for I/O (and tv == NULL).
+ */
+ struct timespec ts;
+ struct timespec *ts_p = NULL;
+ if (tv != NULL) {
+ ts.tv_sec = tv->tv_sec;
+ ts.tv_nsec = tv->tv_usec * 1000;
+ ts_p = &ts;
+ }
+
+ /*
+ * Before doing anything else, we need to reassociate the events we hit
+ * last time which need reassociation. See comment at the end of the
+ * loop below.
+ */
+ for (i = 0; i < epdp->ed_npending; ++i) {
+ struct fd_info *fdi = NULL;
+ const int fd = epdp->ed_pending[i];
+ if (fd != -1) {
+ /* We might have cleared out this event; we need
+ * to be sure that it's still set. */
+ fdi = evmap_io_get_fdinfo_(&base->io, fd);
+ }
+
+ if (fdi != NULL && FDI_HAS_EVENTS(fdi)) {
+ reassociate(epdp, fdi, fd);
+ /* epdp->ed_pending[i] = -1; */
+ fdi->pending_idx_plus_1 = 0;
+ }
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = port_getn(epdp->ed_port, pevtlist, epdp->ed_maxevents,
+ (unsigned int *) &nevents, ts_p);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (res == -1) {
+ if (errno == EINTR || errno == EAGAIN) {
+ return (0);
+ } else if (errno == ETIME) {
+ if (nevents == 0)
+ return (0);
+ } else {
+ event_warn("port_getn");
+ return (-1);
+ }
+ }
+
+ event_debug(("%s: port_getn reports %d events", __func__, nevents));
+
+ for (i = 0; i < nevents; ++i) {
+ port_event_t *pevt = &pevtlist[i];
+ int fd = (int) pevt->portev_object;
+ struct fd_info *fdi = pevt->portev_user;
+ /*EVUTIL_ASSERT(evmap_io_get_fdinfo_(&base->io, fd) == fdi);*/
+
+ check_evportop(epdp);
+ check_event(pevt);
+ epdp->ed_pending[i] = fd;
+ fdi->pending_idx_plus_1 = i + 1;
+
+ /*
+ * Figure out what kind of event it was
+ * (because we have to pass this to the callback)
+ */
+ res = 0;
+ if (pevt->portev_events & (POLLERR|POLLHUP)) {
+ res = EV_READ | EV_WRITE;
+ } else {
+ if (pevt->portev_events & POLLIN)
+ res |= EV_READ;
+ if (pevt->portev_events & POLLOUT)
+ res |= EV_WRITE;
+ }
+
+ /*
+ * Check for the error situations or a hangup situation
+ */
+ if (pevt->portev_events & (POLLERR|POLLHUP|POLLNVAL))
+ res |= EV_READ|EV_WRITE;
+
+ evmap_io_active_(base, fd, res);
+ } /* end of all events gotten */
+ epdp->ed_npending = nevents;
+
+ if (nevents == epdp->ed_maxevents &&
+ epdp->ed_maxevents < MAX_EVENTS_PER_GETN) {
+ /* we used all the space this time. We should be ready
+ * for more events next time around. */
+ grow(epdp, epdp->ed_maxevents * 2);
+ }
+
+ check_evportop(epdp);
+
+ return (0);
+}
+
+
+/*
+ * Adds the given event (so that you will be notified when it happens via
+ * the callback function).
+ */
+
+static int
+evport_add(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct evport_data *evpd = base->evbase;
+ struct fd_info *fdi = p;
+
+ check_evportop(evpd);
+
+ fdi->fdi_what |= events;
+
+ return reassociate(evpd, fdi, fd);
+}
+
+/*
+ * Removes the given event from the list of events to wait for.
+ */
+
+static int
+evport_del(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct evport_data *evpd = base->evbase;
+ struct fd_info *fdi = p;
+ int associated = ! fdi->pending_idx_plus_1;
+
+ check_evportop(evpd);
+
+ fdi->fdi_what &= ~(events &(EV_READ|EV_WRITE));
+
+ if (associated) {
+ if (!FDI_HAS_EVENTS(fdi) &&
+ port_dissociate(evpd->ed_port, PORT_SOURCE_FD, fd) == -1) {
+ /*
+ * Ignore EBADFD error the fd could have been closed
+ * before event_del() was called.
+ */
+ if (errno != EBADFD) {
+ event_warn("port_dissociate");
+ return (-1);
+ }
+ } else {
+ if (FDI_HAS_EVENTS(fdi)) {
+ return (reassociate(evpd, fdi, fd));
+ }
+ }
+ } else {
+ if ((fdi->fdi_what & (EV_READ|EV_WRITE)) == 0) {
+ const int i = fdi->pending_idx_plus_1 - 1;
+ EVUTIL_ASSERT(evpd->ed_pending[i] == fd);
+ evpd->ed_pending[i] = -1;
+ fdi->pending_idx_plus_1 = 0;
+ }
+ }
+ return 0;
+}
+
+
+static void
+evport_dealloc(struct event_base *base)
+{
+ struct evport_data *evpd = base->evbase;
+
+ evsig_dealloc_(base);
+
+ close(evpd->ed_port);
+
+ if (evpd->ed_pending)
+ mm_free(evpd->ed_pending);
+ if (evpd->ed_pevtlist)
+ mm_free(evpd->ed_pevtlist);
+
+ mm_free(evpd);
+}
+
+#endif /* EVENT__HAVE_EVENT_PORTS */
diff --git a/sntp/libevent/evrpc-internal.h b/sntp/libevent/evrpc-internal.h
new file mode 100644
index 000000000000..e53d06e0f40c
--- /dev/null
+++ b/sntp/libevent/evrpc-internal.h
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVRPC_INTERNAL_H_INCLUDED_
+#define EVRPC_INTERNAL_H_INCLUDED_
+
+#include "http-internal.h"
+
+struct evrpc;
+struct evrpc_request_wrapper;
+
+#define EVRPC_URI_PREFIX "/.rpc."
+
+struct evrpc_hook {
+ TAILQ_ENTRY(evrpc_hook) next;
+
+ /* returns EVRPC_TERMINATE; if the rpc should be aborted.
+ * a hook is is allowed to rewrite the evbuffer
+ */
+ int (*process)(void *, struct evhttp_request *,
+ struct evbuffer *, void *);
+ void *process_arg;
+};
+
+TAILQ_HEAD(evrpc_hook_list, evrpc_hook);
+
+/*
+ * this is shared between the base and the pool, so that we can reuse
+ * the hook adding functions; we alias both evrpc_pool and evrpc_base
+ * to this common structure.
+ */
+
+struct evrpc_hook_ctx;
+TAILQ_HEAD(evrpc_pause_list, evrpc_hook_ctx);
+
+struct evrpc_hooks_ {
+ /* hooks for processing outbound and inbound rpcs */
+ struct evrpc_hook_list in_hooks;
+ struct evrpc_hook_list out_hooks;
+
+ struct evrpc_pause_list pause_requests;
+};
+
+#define input_hooks common.in_hooks
+#define output_hooks common.out_hooks
+#define paused_requests common.pause_requests
+
+struct evrpc_base {
+ struct evrpc_hooks_ common;
+
+ /* the HTTP server under which we register our RPC calls */
+ struct evhttp* http_server;
+
+ /* a list of all RPCs registered with us */
+ TAILQ_HEAD(evrpc_list, evrpc) registered_rpcs;
+};
+
+struct evrpc_req_generic;
+void evrpc_reqstate_free_(struct evrpc_req_generic* rpc_state);
+
+/* A pool for holding evhttp_connection objects */
+struct evrpc_pool {
+ struct evrpc_hooks_ common;
+
+ struct event_base *base;
+
+ struct evconq connections;
+
+ int timeout;
+
+ TAILQ_HEAD(evrpc_requestq, evrpc_request_wrapper) (requests);
+};
+
+struct evrpc_hook_ctx {
+ TAILQ_ENTRY(evrpc_hook_ctx) next;
+
+ void *ctx;
+ void (*cb)(void *, enum EVRPC_HOOK_RESULT);
+};
+
+struct evrpc_meta {
+ TAILQ_ENTRY(evrpc_meta) next;
+ char *key;
+
+ void *data;
+ size_t data_size;
+};
+
+TAILQ_HEAD(evrpc_meta_list, evrpc_meta);
+
+struct evrpc_hook_meta {
+ struct evrpc_meta_list meta_data;
+ struct evhttp_connection *evcon;
+};
+
+/* allows association of meta data with a request */
+static void evrpc_hook_associate_meta_(struct evrpc_hook_meta **pctx,
+ struct evhttp_connection *evcon);
+
+/* creates a new meta data store */
+static struct evrpc_hook_meta *evrpc_hook_meta_new_(void);
+
+/* frees the meta data associated with a request */
+static void evrpc_hook_context_free_(struct evrpc_hook_meta *ctx);
+
+/* the server side of an rpc */
+
+/* We alias the RPC specific structs to this voided one */
+struct evrpc_req_generic {
+ /*
+ * allows association of meta data via hooks - needs to be
+ * synchronized with evrpc_request_wrapper
+ */
+ struct evrpc_hook_meta *hook_meta;
+
+ /* the unmarshaled request object */
+ void *request;
+
+ /* the empty reply object that needs to be filled in */
+ void *reply;
+
+ /*
+ * the static structure for this rpc; that can be used to
+ * automatically unmarshal and marshal the http buffers.
+ */
+ struct evrpc *rpc;
+
+ /*
+ * the http request structure on which we need to answer.
+ */
+ struct evhttp_request* http_req;
+
+ /*
+ * Temporary data store for marshaled data
+ */
+ struct evbuffer* rpc_data;
+};
+
+/* the client side of an rpc request */
+struct evrpc_request_wrapper {
+ /*
+ * allows association of meta data via hooks - needs to be
+ * synchronized with evrpc_req_generic.
+ */
+ struct evrpc_hook_meta *hook_meta;
+
+ TAILQ_ENTRY(evrpc_request_wrapper) next;
+
+ /* pool on which this rpc request is being made */
+ struct evrpc_pool *pool;
+
+ /* connection on which the request is being sent */
+ struct evhttp_connection *evcon;
+
+ /* the actual request */
+ struct evhttp_request *req;
+
+ /* event for implementing request timeouts */
+ struct event ev_timeout;
+
+ /* the name of the rpc */
+ char *name;
+
+ /* callback */
+ void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg);
+ void *cb_arg;
+
+ void *request;
+ void *reply;
+
+ /* unmarshals the buffer into the proper request structure */
+ void (*request_marshal)(struct evbuffer *, void *);
+
+ /* removes all stored state in the reply */
+ void (*reply_clear)(void *);
+
+ /* marshals the reply into a buffer */
+ int (*reply_unmarshal)(void *, struct evbuffer*);
+};
+
+#endif /* EVRPC_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/evrpc.c b/sntp/libevent/evrpc.c
new file mode 100644
index 000000000000..2443ab27937a
--- /dev/null
+++ b/sntp/libevent/evrpc.c
@@ -0,0 +1,1171 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+
+#include <sys/queue.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/rpc.h"
+#include "event2/rpc_struct.h"
+#include "evrpc-internal.h"
+#include "event2/http.h"
+#include "event2/buffer.h"
+#include "event2/tag.h"
+#include "event2/http_struct.h"
+#include "event2/http_compat.h"
+#include "event2/util.h"
+#include "util-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+
+struct evrpc_base *
+evrpc_init(struct evhttp *http_server)
+{
+ struct evrpc_base* base = mm_calloc(1, sizeof(struct evrpc_base));
+ if (base == NULL)
+ return (NULL);
+
+ /* we rely on the tagging sub system */
+ evtag_init();
+
+ TAILQ_INIT(&base->registered_rpcs);
+ TAILQ_INIT(&base->input_hooks);
+ TAILQ_INIT(&base->output_hooks);
+
+ TAILQ_INIT(&base->paused_requests);
+
+ base->http_server = http_server;
+
+ return (base);
+}
+
+void
+evrpc_free(struct evrpc_base *base)
+{
+ struct evrpc *rpc;
+ struct evrpc_hook *hook;
+ struct evrpc_hook_ctx *pause;
+ int r;
+
+ while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) {
+ r = evrpc_unregister_rpc(base, rpc->uri);
+ EVUTIL_ASSERT(r == 0);
+ }
+ while ((pause = TAILQ_FIRST(&base->paused_requests)) != NULL) {
+ TAILQ_REMOVE(&base->paused_requests, pause, next);
+ mm_free(pause);
+ }
+ while ((hook = TAILQ_FIRST(&base->input_hooks)) != NULL) {
+ r = evrpc_remove_hook(base, EVRPC_INPUT, hook);
+ EVUTIL_ASSERT(r);
+ }
+ while ((hook = TAILQ_FIRST(&base->output_hooks)) != NULL) {
+ r = evrpc_remove_hook(base, EVRPC_OUTPUT, hook);
+ EVUTIL_ASSERT(r);
+ }
+ mm_free(base);
+}
+
+void *
+evrpc_add_hook(void *vbase,
+ enum EVRPC_HOOK_TYPE hook_type,
+ int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *),
+ void *cb_arg)
+{
+ struct evrpc_hooks_ *base = vbase;
+ struct evrpc_hook_list *head = NULL;
+ struct evrpc_hook *hook = NULL;
+ switch (hook_type) {
+ case EVRPC_INPUT:
+ head = &base->in_hooks;
+ break;
+ case EVRPC_OUTPUT:
+ head = &base->out_hooks;
+ break;
+ default:
+ EVUTIL_ASSERT(hook_type == EVRPC_INPUT || hook_type == EVRPC_OUTPUT);
+ }
+
+ hook = mm_calloc(1, sizeof(struct evrpc_hook));
+ EVUTIL_ASSERT(hook != NULL);
+
+ hook->process = cb;
+ hook->process_arg = cb_arg;
+ TAILQ_INSERT_TAIL(head, hook, next);
+
+ return (hook);
+}
+
+static int
+evrpc_remove_hook_internal(struct evrpc_hook_list *head, void *handle)
+{
+ struct evrpc_hook *hook = NULL;
+ TAILQ_FOREACH(hook, head, next) {
+ if (hook == handle) {
+ TAILQ_REMOVE(head, hook, next);
+ mm_free(hook);
+ return (1);
+ }
+ }
+
+ return (0);
+}
+
+/*
+ * remove the hook specified by the handle
+ */
+
+int
+evrpc_remove_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, void *handle)
+{
+ struct evrpc_hooks_ *base = vbase;
+ struct evrpc_hook_list *head = NULL;
+ switch (hook_type) {
+ case EVRPC_INPUT:
+ head = &base->in_hooks;
+ break;
+ case EVRPC_OUTPUT:
+ head = &base->out_hooks;
+ break;
+ default:
+ EVUTIL_ASSERT(hook_type == EVRPC_INPUT || hook_type == EVRPC_OUTPUT);
+ }
+
+ return (evrpc_remove_hook_internal(head, handle));
+}
+
+static int
+evrpc_process_hooks(struct evrpc_hook_list *head, void *ctx,
+ struct evhttp_request *req, struct evbuffer *evbuf)
+{
+ struct evrpc_hook *hook;
+ TAILQ_FOREACH(hook, head, next) {
+ int res = hook->process(ctx, req, evbuf, hook->process_arg);
+ if (res != EVRPC_CONTINUE)
+ return (res);
+ }
+
+ return (EVRPC_CONTINUE);
+}
+
+static void evrpc_pool_schedule(struct evrpc_pool *pool);
+static void evrpc_request_cb(struct evhttp_request *, void *);
+
+/*
+ * Registers a new RPC with the HTTP server. The evrpc object is expected
+ * to have been filled in via the EVRPC_REGISTER_OBJECT macro which in turn
+ * calls this function.
+ */
+
+static char *
+evrpc_construct_uri(const char *uri)
+{
+ char *constructed_uri;
+ size_t constructed_uri_len;
+
+ constructed_uri_len = strlen(EVRPC_URI_PREFIX) + strlen(uri) + 1;
+ if ((constructed_uri = mm_malloc(constructed_uri_len)) == NULL)
+ event_err(1, "%s: failed to register rpc at %s",
+ __func__, uri);
+ memcpy(constructed_uri, EVRPC_URI_PREFIX, strlen(EVRPC_URI_PREFIX));
+ memcpy(constructed_uri + strlen(EVRPC_URI_PREFIX), uri, strlen(uri));
+ constructed_uri[constructed_uri_len - 1] = '\0';
+
+ return (constructed_uri);
+}
+
+int
+evrpc_register_rpc(struct evrpc_base *base, struct evrpc *rpc,
+ void (*cb)(struct evrpc_req_generic *, void *), void *cb_arg)
+{
+ char *constructed_uri = evrpc_construct_uri(rpc->uri);
+
+ rpc->base = base;
+ rpc->cb = cb;
+ rpc->cb_arg = cb_arg;
+
+ TAILQ_INSERT_TAIL(&base->registered_rpcs, rpc, next);
+
+ evhttp_set_cb(base->http_server,
+ constructed_uri,
+ evrpc_request_cb,
+ rpc);
+
+ mm_free(constructed_uri);
+
+ return (0);
+}
+
+int
+evrpc_unregister_rpc(struct evrpc_base *base, const char *name)
+{
+ char *registered_uri = NULL;
+ struct evrpc *rpc;
+ int r;
+
+ /* find the right rpc; linear search might be slow */
+ TAILQ_FOREACH(rpc, &base->registered_rpcs, next) {
+ if (strcmp(rpc->uri, name) == 0)
+ break;
+ }
+ if (rpc == NULL) {
+ /* We did not find an RPC with this name */
+ return (-1);
+ }
+ TAILQ_REMOVE(&base->registered_rpcs, rpc, next);
+
+ registered_uri = evrpc_construct_uri(name);
+
+ /* remove the http server callback */
+ r = evhttp_del_cb(base->http_server, registered_uri);
+ EVUTIL_ASSERT(r == 0);
+
+ mm_free(registered_uri);
+
+ mm_free((char *)rpc->uri);
+ mm_free(rpc);
+ return (0);
+}
+
+static int evrpc_pause_request(void *vbase, void *ctx,
+ void (*cb)(void *, enum EVRPC_HOOK_RESULT));
+static void evrpc_request_cb_closure(void *, enum EVRPC_HOOK_RESULT);
+
+static void
+evrpc_request_cb(struct evhttp_request *req, void *arg)
+{
+ struct evrpc *rpc = arg;
+ struct evrpc_req_generic *rpc_state = NULL;
+
+ /* let's verify the outside parameters */
+ if (req->type != EVHTTP_REQ_POST ||
+ evbuffer_get_length(req->input_buffer) <= 0)
+ goto error;
+
+ rpc_state = mm_calloc(1, sizeof(struct evrpc_req_generic));
+ if (rpc_state == NULL)
+ goto error;
+ rpc_state->rpc = rpc;
+ rpc_state->http_req = req;
+ rpc_state->rpc_data = NULL;
+
+ if (TAILQ_FIRST(&rpc->base->input_hooks) != NULL) {
+ int hook_res;
+
+ evrpc_hook_associate_meta_(&rpc_state->hook_meta, req->evcon);
+
+ /*
+ * allow hooks to modify the outgoing request
+ */
+ hook_res = evrpc_process_hooks(&rpc->base->input_hooks,
+ rpc_state, req, req->input_buffer);
+ switch (hook_res) {
+ case EVRPC_TERMINATE:
+ goto error;
+ case EVRPC_PAUSE:
+ evrpc_pause_request(rpc->base, rpc_state,
+ evrpc_request_cb_closure);
+ return;
+ case EVRPC_CONTINUE:
+ break;
+ default:
+ EVUTIL_ASSERT(hook_res == EVRPC_TERMINATE ||
+ hook_res == EVRPC_CONTINUE ||
+ hook_res == EVRPC_PAUSE);
+ }
+ }
+
+ evrpc_request_cb_closure(rpc_state, EVRPC_CONTINUE);
+ return;
+
+error:
+ evrpc_reqstate_free_(rpc_state);
+ evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
+ return;
+}
+
+static void
+evrpc_request_cb_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
+{
+ struct evrpc_req_generic *rpc_state = arg;
+ struct evrpc *rpc;
+ struct evhttp_request *req;
+
+ EVUTIL_ASSERT(rpc_state);
+ rpc = rpc_state->rpc;
+ req = rpc_state->http_req;
+
+ if (hook_res == EVRPC_TERMINATE)
+ goto error;
+
+ /* let's check that we can parse the request */
+ rpc_state->request = rpc->request_new(rpc->request_new_arg);
+ if (rpc_state->request == NULL)
+ goto error;
+
+ if (rpc->request_unmarshal(
+ rpc_state->request, req->input_buffer) == -1) {
+ /* we failed to parse the request; that's a bummer */
+ goto error;
+ }
+
+ /* at this point, we have a well formed request, prepare the reply */
+
+ rpc_state->reply = rpc->reply_new(rpc->reply_new_arg);
+ if (rpc_state->reply == NULL)
+ goto error;
+
+ /* give the rpc to the user; they can deal with it */
+ rpc->cb(rpc_state, rpc->cb_arg);
+
+ return;
+
+error:
+ evrpc_reqstate_free_(rpc_state);
+ evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
+ return;
+}
+
+
+void
+evrpc_reqstate_free_(struct evrpc_req_generic* rpc_state)
+{
+ struct evrpc *rpc;
+ EVUTIL_ASSERT(rpc_state != NULL);
+ rpc = rpc_state->rpc;
+
+ /* clean up all memory */
+ if (rpc_state->hook_meta != NULL)
+ evrpc_hook_context_free_(rpc_state->hook_meta);
+ if (rpc_state->request != NULL)
+ rpc->request_free(rpc_state->request);
+ if (rpc_state->reply != NULL)
+ rpc->reply_free(rpc_state->reply);
+ if (rpc_state->rpc_data != NULL)
+ evbuffer_free(rpc_state->rpc_data);
+ mm_free(rpc_state);
+}
+
+static void
+evrpc_request_done_closure(void *, enum EVRPC_HOOK_RESULT);
+
+void
+evrpc_request_done(struct evrpc_req_generic *rpc_state)
+{
+ struct evhttp_request *req;
+ struct evrpc *rpc;
+
+ EVUTIL_ASSERT(rpc_state);
+
+ req = rpc_state->http_req;
+ rpc = rpc_state->rpc;
+
+ if (rpc->reply_complete(rpc_state->reply) == -1) {
+ /* the reply was not completely filled in. error out */
+ goto error;
+ }
+
+ if ((rpc_state->rpc_data = evbuffer_new()) == NULL) {
+ /* out of memory */
+ goto error;
+ }
+
+ /* serialize the reply */
+ rpc->reply_marshal(rpc_state->rpc_data, rpc_state->reply);
+
+ if (TAILQ_FIRST(&rpc->base->output_hooks) != NULL) {
+ int hook_res;
+
+ evrpc_hook_associate_meta_(&rpc_state->hook_meta, req->evcon);
+
+ /* do hook based tweaks to the request */
+ hook_res = evrpc_process_hooks(&rpc->base->output_hooks,
+ rpc_state, req, rpc_state->rpc_data);
+ switch (hook_res) {
+ case EVRPC_TERMINATE:
+ goto error;
+ case EVRPC_PAUSE:
+ if (evrpc_pause_request(rpc->base, rpc_state,
+ evrpc_request_done_closure) == -1)
+ goto error;
+ return;
+ case EVRPC_CONTINUE:
+ break;
+ default:
+ EVUTIL_ASSERT(hook_res == EVRPC_TERMINATE ||
+ hook_res == EVRPC_CONTINUE ||
+ hook_res == EVRPC_PAUSE);
+ }
+ }
+
+ evrpc_request_done_closure(rpc_state, EVRPC_CONTINUE);
+ return;
+
+error:
+ evrpc_reqstate_free_(rpc_state);
+ evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
+ return;
+}
+
+void *
+evrpc_get_request(struct evrpc_req_generic *req)
+{
+ return req->request;
+}
+
+void *
+evrpc_get_reply(struct evrpc_req_generic *req)
+{
+ return req->reply;
+}
+
+static void
+evrpc_request_done_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
+{
+ struct evrpc_req_generic *rpc_state = arg;
+ struct evhttp_request *req;
+ EVUTIL_ASSERT(rpc_state);
+ req = rpc_state->http_req;
+
+ if (hook_res == EVRPC_TERMINATE)
+ goto error;
+
+ /* on success, we are going to transmit marshaled binary data */
+ if (evhttp_find_header(req->output_headers, "Content-Type") == NULL) {
+ evhttp_add_header(req->output_headers,
+ "Content-Type", "application/octet-stream");
+ }
+ evhttp_send_reply(req, HTTP_OK, "OK", rpc_state->rpc_data);
+
+ evrpc_reqstate_free_(rpc_state);
+
+ return;
+
+error:
+ evrpc_reqstate_free_(rpc_state);
+ evhttp_send_error(req, HTTP_SERVUNAVAIL, NULL);
+ return;
+}
+
+
+/* Client implementation of RPC site */
+
+static int evrpc_schedule_request(struct evhttp_connection *connection,
+ struct evrpc_request_wrapper *ctx);
+
+struct evrpc_pool *
+evrpc_pool_new(struct event_base *base)
+{
+ struct evrpc_pool *pool = mm_calloc(1, sizeof(struct evrpc_pool));
+ if (pool == NULL)
+ return (NULL);
+
+ TAILQ_INIT(&pool->connections);
+ TAILQ_INIT(&pool->requests);
+
+ TAILQ_INIT(&pool->paused_requests);
+
+ TAILQ_INIT(&pool->input_hooks);
+ TAILQ_INIT(&pool->output_hooks);
+
+ pool->base = base;
+ pool->timeout = -1;
+
+ return (pool);
+}
+
+static void
+evrpc_request_wrapper_free(struct evrpc_request_wrapper *request)
+{
+ if (request->hook_meta != NULL)
+ evrpc_hook_context_free_(request->hook_meta);
+ mm_free(request->name);
+ mm_free(request);
+}
+
+void
+evrpc_pool_free(struct evrpc_pool *pool)
+{
+ struct evhttp_connection *connection;
+ struct evrpc_request_wrapper *request;
+ struct evrpc_hook_ctx *pause;
+ struct evrpc_hook *hook;
+ int r;
+
+ while ((request = TAILQ_FIRST(&pool->requests)) != NULL) {
+ TAILQ_REMOVE(&pool->requests, request, next);
+ evrpc_request_wrapper_free(request);
+ }
+
+ while ((pause = TAILQ_FIRST(&pool->paused_requests)) != NULL) {
+ TAILQ_REMOVE(&pool->paused_requests, pause, next);
+ mm_free(pause);
+ }
+
+ while ((connection = TAILQ_FIRST(&pool->connections)) != NULL) {
+ TAILQ_REMOVE(&pool->connections, connection, next);
+ evhttp_connection_free(connection);
+ }
+
+ while ((hook = TAILQ_FIRST(&pool->input_hooks)) != NULL) {
+ r = evrpc_remove_hook(pool, EVRPC_INPUT, hook);
+ EVUTIL_ASSERT(r);
+ }
+
+ while ((hook = TAILQ_FIRST(&pool->output_hooks)) != NULL) {
+ r = evrpc_remove_hook(pool, EVRPC_OUTPUT, hook);
+ EVUTIL_ASSERT(r);
+ }
+
+ mm_free(pool);
+}
+
+/*
+ * Add a connection to the RPC pool. A request scheduled on the pool
+ * may use any available connection.
+ */
+
+void
+evrpc_pool_add_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *connection)
+{
+ EVUTIL_ASSERT(connection->http_server == NULL);
+ TAILQ_INSERT_TAIL(&pool->connections, connection, next);
+
+ /*
+ * associate an event base with this connection
+ */
+ if (pool->base != NULL)
+ evhttp_connection_set_base(connection, pool->base);
+
+ /*
+ * unless a timeout was specifically set for a connection,
+ * the connection inherits the timeout from the pool.
+ */
+ if (!evutil_timerisset(&connection->timeout))
+ evhttp_connection_set_timeout(connection, pool->timeout);
+
+ /*
+ * if we have any requests pending, schedule them with the new
+ * connections.
+ */
+
+ if (TAILQ_FIRST(&pool->requests) != NULL) {
+ struct evrpc_request_wrapper *request =
+ TAILQ_FIRST(&pool->requests);
+ TAILQ_REMOVE(&pool->requests, request, next);
+ evrpc_schedule_request(connection, request);
+ }
+}
+
+void
+evrpc_pool_remove_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *connection)
+{
+ TAILQ_REMOVE(&pool->connections, connection, next);
+}
+
+void
+evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs)
+{
+ struct evhttp_connection *evcon;
+ TAILQ_FOREACH(evcon, &pool->connections, next) {
+ evhttp_connection_set_timeout(evcon, timeout_in_secs);
+ }
+ pool->timeout = timeout_in_secs;
+}
+
+
+static void evrpc_reply_done(struct evhttp_request *, void *);
+static void evrpc_request_timeout(evutil_socket_t, short, void *);
+
+/*
+ * Finds a connection object associated with the pool that is currently
+ * idle and can be used to make a request.
+ */
+static struct evhttp_connection *
+evrpc_pool_find_connection(struct evrpc_pool *pool)
+{
+ struct evhttp_connection *connection;
+ TAILQ_FOREACH(connection, &pool->connections, next) {
+ if (TAILQ_FIRST(&connection->requests) == NULL)
+ return (connection);
+ }
+
+ return (NULL);
+}
+
+/*
+ * Prototypes responsible for evrpc scheduling and hooking
+ */
+
+static void evrpc_schedule_request_closure(void *ctx, enum EVRPC_HOOK_RESULT);
+
+/*
+ * We assume that the ctx is no longer queued on the pool.
+ */
+static int
+evrpc_schedule_request(struct evhttp_connection *connection,
+ struct evrpc_request_wrapper *ctx)
+{
+ struct evhttp_request *req = NULL;
+ struct evrpc_pool *pool = ctx->pool;
+ struct evrpc_status status;
+
+ if ((req = evhttp_request_new(evrpc_reply_done, ctx)) == NULL)
+ goto error;
+
+ /* serialize the request data into the output buffer */
+ ctx->request_marshal(req->output_buffer, ctx->request);
+
+ /* we need to know the connection that we might have to abort */
+ ctx->evcon = connection;
+
+ /* if we get paused we also need to know the request */
+ ctx->req = req;
+
+ if (TAILQ_FIRST(&pool->output_hooks) != NULL) {
+ int hook_res;
+
+ evrpc_hook_associate_meta_(&ctx->hook_meta, connection);
+
+ /* apply hooks to the outgoing request */
+ hook_res = evrpc_process_hooks(&pool->output_hooks,
+ ctx, req, req->output_buffer);
+
+ switch (hook_res) {
+ case EVRPC_TERMINATE:
+ goto error;
+ case EVRPC_PAUSE:
+ /* we need to be explicitly resumed */
+ if (evrpc_pause_request(pool, ctx,
+ evrpc_schedule_request_closure) == -1)
+ goto error;
+ return (0);
+ case EVRPC_CONTINUE:
+ /* we can just continue */
+ break;
+ default:
+ EVUTIL_ASSERT(hook_res == EVRPC_TERMINATE ||
+ hook_res == EVRPC_CONTINUE ||
+ hook_res == EVRPC_PAUSE);
+ }
+ }
+
+ evrpc_schedule_request_closure(ctx, EVRPC_CONTINUE);
+ return (0);
+
+error:
+ memset(&status, 0, sizeof(status));
+ status.error = EVRPC_STATUS_ERR_UNSTARTED;
+ (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg);
+ evrpc_request_wrapper_free(ctx);
+ return (-1);
+}
+
+static void
+evrpc_schedule_request_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
+{
+ struct evrpc_request_wrapper *ctx = arg;
+ struct evhttp_connection *connection = ctx->evcon;
+ struct evhttp_request *req = ctx->req;
+ struct evrpc_pool *pool = ctx->pool;
+ struct evrpc_status status;
+ char *uri = NULL;
+ int res = 0;
+
+ if (hook_res == EVRPC_TERMINATE)
+ goto error;
+
+ uri = evrpc_construct_uri(ctx->name);
+ if (uri == NULL)
+ goto error;
+
+ if (pool->timeout > 0) {
+ /*
+ * a timeout after which the whole rpc is going to be aborted.
+ */
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = pool->timeout;
+ evtimer_add(&ctx->ev_timeout, &tv);
+ }
+
+ /* start the request over the connection */
+ res = evhttp_make_request(connection, req, EVHTTP_REQ_POST, uri);
+ mm_free(uri);
+
+ if (res == -1)
+ goto error;
+
+ return;
+
+error:
+ memset(&status, 0, sizeof(status));
+ status.error = EVRPC_STATUS_ERR_UNSTARTED;
+ (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg);
+ evrpc_request_wrapper_free(ctx);
+}
+
+/* we just queue the paused request on the pool under the req object */
+static int
+evrpc_pause_request(void *vbase, void *ctx,
+ void (*cb)(void *, enum EVRPC_HOOK_RESULT))
+{
+ struct evrpc_hooks_ *base = vbase;
+ struct evrpc_hook_ctx *pause = mm_malloc(sizeof(*pause));
+ if (pause == NULL)
+ return (-1);
+
+ pause->ctx = ctx;
+ pause->cb = cb;
+
+ TAILQ_INSERT_TAIL(&base->pause_requests, pause, next);
+ return (0);
+}
+
+int
+evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res)
+{
+ struct evrpc_hooks_ *base = vbase;
+ struct evrpc_pause_list *head = &base->pause_requests;
+ struct evrpc_hook_ctx *pause;
+
+ TAILQ_FOREACH(pause, head, next) {
+ if (pause->ctx == ctx)
+ break;
+ }
+
+ if (pause == NULL)
+ return (-1);
+
+ (*pause->cb)(pause->ctx, res);
+ TAILQ_REMOVE(head, pause, next);
+ mm_free(pause);
+ return (0);
+}
+
+int
+evrpc_make_request(struct evrpc_request_wrapper *ctx)
+{
+ struct evrpc_pool *pool = ctx->pool;
+
+ /* initialize the event structure for this rpc */
+ evtimer_assign(&ctx->ev_timeout, pool->base, evrpc_request_timeout, ctx);
+
+ /* we better have some available connections on the pool */
+ EVUTIL_ASSERT(TAILQ_FIRST(&pool->connections) != NULL);
+
+ /*
+ * if no connection is available, we queue the request on the pool,
+ * the next time a connection is empty, the rpc will be send on that.
+ */
+ TAILQ_INSERT_TAIL(&pool->requests, ctx, next);
+
+ evrpc_pool_schedule(pool);
+
+ return (0);
+}
+
+
+struct evrpc_request_wrapper *
+evrpc_make_request_ctx(
+ struct evrpc_pool *pool, void *request, void *reply,
+ const char *rpcname,
+ void (*req_marshal)(struct evbuffer*, void *),
+ void (*rpl_clear)(void *),
+ int (*rpl_unmarshal)(void *, struct evbuffer *),
+ void (*cb)(struct evrpc_status *, void *, void *, void *),
+ void *cbarg)
+{
+ struct evrpc_request_wrapper *ctx = (struct evrpc_request_wrapper *)
+ mm_malloc(sizeof(struct evrpc_request_wrapper));
+ if (ctx == NULL)
+ return (NULL);
+
+ ctx->pool = pool;
+ ctx->hook_meta = NULL;
+ ctx->evcon = NULL;
+ ctx->name = mm_strdup(rpcname);
+ if (ctx->name == NULL) {
+ mm_free(ctx);
+ return (NULL);
+ }
+ ctx->cb = cb;
+ ctx->cb_arg = cbarg;
+ ctx->request = request;
+ ctx->reply = reply;
+ ctx->request_marshal = req_marshal;
+ ctx->reply_clear = rpl_clear;
+ ctx->reply_unmarshal = rpl_unmarshal;
+
+ return (ctx);
+}
+
+static void
+evrpc_reply_done_closure(void *, enum EVRPC_HOOK_RESULT);
+
+static void
+evrpc_reply_done(struct evhttp_request *req, void *arg)
+{
+ struct evrpc_request_wrapper *ctx = arg;
+ struct evrpc_pool *pool = ctx->pool;
+ int hook_res = EVRPC_CONTINUE;
+
+ /* cancel any timeout we might have scheduled */
+ event_del(&ctx->ev_timeout);
+
+ ctx->req = req;
+
+ /* we need to get the reply now */
+ if (req == NULL) {
+ evrpc_reply_done_closure(ctx, EVRPC_CONTINUE);
+ return;
+ }
+
+ if (TAILQ_FIRST(&pool->input_hooks) != NULL) {
+ evrpc_hook_associate_meta_(&ctx->hook_meta, ctx->evcon);
+
+ /* apply hooks to the incoming request */
+ hook_res = evrpc_process_hooks(&pool->input_hooks,
+ ctx, req, req->input_buffer);
+
+ switch (hook_res) {
+ case EVRPC_TERMINATE:
+ case EVRPC_CONTINUE:
+ break;
+ case EVRPC_PAUSE:
+ /*
+ * if we get paused we also need to know the
+ * request. unfortunately, the underlying
+ * layer is going to free it. we need to
+ * request ownership explicitly
+ */
+ if (req != NULL)
+ evhttp_request_own(req);
+
+ evrpc_pause_request(pool, ctx,
+ evrpc_reply_done_closure);
+ return;
+ default:
+ EVUTIL_ASSERT(hook_res == EVRPC_TERMINATE ||
+ hook_res == EVRPC_CONTINUE ||
+ hook_res == EVRPC_PAUSE);
+ }
+ }
+
+ evrpc_reply_done_closure(ctx, hook_res);
+
+ /* http request is being freed by underlying layer */
+}
+
+static void
+evrpc_reply_done_closure(void *arg, enum EVRPC_HOOK_RESULT hook_res)
+{
+ struct evrpc_request_wrapper *ctx = arg;
+ struct evhttp_request *req = ctx->req;
+ struct evrpc_pool *pool = ctx->pool;
+ struct evrpc_status status;
+ int res = -1;
+
+ memset(&status, 0, sizeof(status));
+ status.http_req = req;
+
+ /* we need to get the reply now */
+ if (req == NULL) {
+ status.error = EVRPC_STATUS_ERR_TIMEOUT;
+ } else if (hook_res == EVRPC_TERMINATE) {
+ status.error = EVRPC_STATUS_ERR_HOOKABORTED;
+ } else {
+ res = ctx->reply_unmarshal(ctx->reply, req->input_buffer);
+ if (res == -1)
+ status.error = EVRPC_STATUS_ERR_BADPAYLOAD;
+ }
+
+ if (res == -1) {
+ /* clear everything that we might have written previously */
+ ctx->reply_clear(ctx->reply);
+ }
+
+ (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg);
+
+ evrpc_request_wrapper_free(ctx);
+
+ /* the http layer owned the original request structure, but if we
+ * got paused, we asked for ownership and need to free it here. */
+ if (req != NULL && evhttp_request_is_owned(req))
+ evhttp_request_free(req);
+
+ /* see if we can schedule another request */
+ evrpc_pool_schedule(pool);
+}
+
+static void
+evrpc_pool_schedule(struct evrpc_pool *pool)
+{
+ struct evrpc_request_wrapper *ctx = TAILQ_FIRST(&pool->requests);
+ struct evhttp_connection *evcon;
+
+ /* if no requests are pending, we have no work */
+ if (ctx == NULL)
+ return;
+
+ if ((evcon = evrpc_pool_find_connection(pool)) != NULL) {
+ TAILQ_REMOVE(&pool->requests, ctx, next);
+ evrpc_schedule_request(evcon, ctx);
+ }
+}
+
+static void
+evrpc_request_timeout(evutil_socket_t fd, short what, void *arg)
+{
+ struct evrpc_request_wrapper *ctx = arg;
+ struct evhttp_connection *evcon = ctx->evcon;
+ EVUTIL_ASSERT(evcon != NULL);
+
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_TIMEOUT);
+}
+
+/*
+ * frees potential meta data associated with a request.
+ */
+
+static void
+evrpc_meta_data_free(struct evrpc_meta_list *meta_data)
+{
+ struct evrpc_meta *entry;
+ EVUTIL_ASSERT(meta_data != NULL);
+
+ while ((entry = TAILQ_FIRST(meta_data)) != NULL) {
+ TAILQ_REMOVE(meta_data, entry, next);
+ mm_free(entry->key);
+ mm_free(entry->data);
+ mm_free(entry);
+ }
+}
+
+static struct evrpc_hook_meta *
+evrpc_hook_meta_new_(void)
+{
+ struct evrpc_hook_meta *ctx;
+ ctx = mm_malloc(sizeof(struct evrpc_hook_meta));
+ EVUTIL_ASSERT(ctx != NULL);
+
+ TAILQ_INIT(&ctx->meta_data);
+ ctx->evcon = NULL;
+
+ return (ctx);
+}
+
+static void
+evrpc_hook_associate_meta_(struct evrpc_hook_meta **pctx,
+ struct evhttp_connection *evcon)
+{
+ struct evrpc_hook_meta *ctx = *pctx;
+ if (ctx == NULL)
+ *pctx = ctx = evrpc_hook_meta_new_();
+ ctx->evcon = evcon;
+}
+
+static void
+evrpc_hook_context_free_(struct evrpc_hook_meta *ctx)
+{
+ evrpc_meta_data_free(&ctx->meta_data);
+ mm_free(ctx);
+}
+
+/* Adds meta data */
+void
+evrpc_hook_add_meta(void *ctx, const char *key,
+ const void *data, size_t data_size)
+{
+ struct evrpc_request_wrapper *req = ctx;
+ struct evrpc_hook_meta *store = NULL;
+ struct evrpc_meta *meta = NULL;
+
+ if ((store = req->hook_meta) == NULL)
+ store = req->hook_meta = evrpc_hook_meta_new_();
+
+ meta = mm_malloc(sizeof(struct evrpc_meta));
+ EVUTIL_ASSERT(meta != NULL);
+ meta->key = mm_strdup(key);
+ EVUTIL_ASSERT(meta->key != NULL);
+ meta->data_size = data_size;
+ meta->data = mm_malloc(data_size);
+ EVUTIL_ASSERT(meta->data != NULL);
+ memcpy(meta->data, data, data_size);
+
+ TAILQ_INSERT_TAIL(&store->meta_data, meta, next);
+}
+
+int
+evrpc_hook_find_meta(void *ctx, const char *key, void **data, size_t *data_size)
+{
+ struct evrpc_request_wrapper *req = ctx;
+ struct evrpc_meta *meta = NULL;
+
+ if (req->hook_meta == NULL)
+ return (-1);
+
+ TAILQ_FOREACH(meta, &req->hook_meta->meta_data, next) {
+ if (strcmp(meta->key, key) == 0) {
+ *data = meta->data;
+ *data_size = meta->data_size;
+ return (0);
+ }
+ }
+
+ return (-1);
+}
+
+struct evhttp_connection *
+evrpc_hook_get_connection(void *ctx)
+{
+ struct evrpc_request_wrapper *req = ctx;
+ return (req->hook_meta != NULL ? req->hook_meta->evcon : NULL);
+}
+
+int
+evrpc_send_request_generic(struct evrpc_pool *pool,
+ void *request, void *reply,
+ void (*cb)(struct evrpc_status *, void *, void *, void *),
+ void *cb_arg,
+ const char *rpcname,
+ void (*req_marshal)(struct evbuffer *, void *),
+ void (*rpl_clear)(void *),
+ int (*rpl_unmarshal)(void *, struct evbuffer *))
+{
+ struct evrpc_status status;
+ struct evrpc_request_wrapper *ctx;
+ ctx = evrpc_make_request_ctx(pool, request, reply,
+ rpcname, req_marshal, rpl_clear, rpl_unmarshal, cb, cb_arg);
+ if (ctx == NULL)
+ goto error;
+ return (evrpc_make_request(ctx));
+error:
+ memset(&status, 0, sizeof(status));
+ status.error = EVRPC_STATUS_ERR_UNSTARTED;
+ (*(cb))(&status, request, reply, cb_arg);
+ return (-1);
+}
+
+/** Takes a request object and fills it in with the right magic */
+static struct evrpc *
+evrpc_register_object(const char *name,
+ void *(*req_new)(void*), void *req_new_arg, void (*req_free)(void *),
+ int (*req_unmarshal)(void *, struct evbuffer *),
+ void *(*rpl_new)(void*), void *rpl_new_arg, void (*rpl_free)(void *),
+ int (*rpl_complete)(void *),
+ void (*rpl_marshal)(struct evbuffer *, void *))
+{
+ struct evrpc* rpc = (struct evrpc *)mm_calloc(1, sizeof(struct evrpc));
+ if (rpc == NULL)
+ return (NULL);
+ rpc->uri = mm_strdup(name);
+ if (rpc->uri == NULL) {
+ mm_free(rpc);
+ return (NULL);
+ }
+ rpc->request_new = req_new;
+ rpc->request_new_arg = req_new_arg;
+ rpc->request_free = req_free;
+ rpc->request_unmarshal = req_unmarshal;
+ rpc->reply_new = rpl_new;
+ rpc->reply_new_arg = rpl_new_arg;
+ rpc->reply_free = rpl_free;
+ rpc->reply_complete = rpl_complete;
+ rpc->reply_marshal = rpl_marshal;
+ return (rpc);
+}
+
+int
+evrpc_register_generic(struct evrpc_base *base, const char *name,
+ void (*callback)(struct evrpc_req_generic *, void *), void *cbarg,
+ void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *),
+ int (*req_unmarshal)(void *, struct evbuffer *),
+ void *(*rpl_new)(void *), void *rpl_new_arg, void (*rpl_free)(void *),
+ int (*rpl_complete)(void *),
+ void (*rpl_marshal)(struct evbuffer *, void *))
+{
+ struct evrpc* rpc =
+ evrpc_register_object(name, req_new, req_new_arg, req_free, req_unmarshal,
+ rpl_new, rpl_new_arg, rpl_free, rpl_complete, rpl_marshal);
+ if (rpc == NULL)
+ return (-1);
+ evrpc_register_rpc(base, rpc,
+ (void (*)(struct evrpc_req_generic*, void *))callback, cbarg);
+ return (0);
+}
+
+/** accessors for obscure and undocumented functionality */
+struct evrpc_pool *
+evrpc_request_get_pool(struct evrpc_request_wrapper *ctx)
+{
+ return (ctx->pool);
+}
+
+void
+evrpc_request_set_pool(struct evrpc_request_wrapper *ctx,
+ struct evrpc_pool *pool)
+{
+ ctx->pool = pool;
+}
+
+void
+evrpc_request_set_cb(struct evrpc_request_wrapper *ctx,
+ void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg),
+ void *cb_arg)
+{
+ ctx->cb = cb;
+ ctx->cb_arg = cb_arg;
+}
diff --git a/sntp/libevent/evsignal-internal.h b/sntp/libevent/evsignal-internal.h
new file mode 100644
index 000000000000..5cff03b52555
--- /dev/null
+++ b/sntp/libevent/evsignal-internal.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVSIGNAL_INTERNAL_H_INCLUDED_
+#define EVSIGNAL_INTERNAL_H_INCLUDED_
+
+#ifndef evutil_socket_t
+#include "event2/util.h"
+#endif
+#include <signal.h>
+
+typedef void (*ev_sighandler_t)(int);
+
+/* Data structure for the default signal-handling implementation in signal.c
+ */
+struct evsig_info {
+ /* Event watching ev_signal_pair[1] */
+ struct event ev_signal;
+ /* Socketpair used to send notifications from the signal handler */
+ evutil_socket_t ev_signal_pair[2];
+ /* True iff we've added the ev_signal event yet. */
+ int ev_signal_added;
+ /* Count of the number of signals we're currently watching. */
+ int ev_n_signals_added;
+
+ /* Array of previous signal handler objects before Libevent started
+ * messing with them. Used to restore old signal handlers. */
+#ifdef EVENT__HAVE_SIGACTION
+ struct sigaction **sh_old;
+#else
+ ev_sighandler_t **sh_old;
+#endif
+ /* Size of sh_old. */
+ int sh_old_max;
+};
+int evsig_init_(struct event_base *);
+void evsig_dealloc_(struct event_base *);
+
+void evsig_set_base_(struct event_base *base);
+void evsig_free_globals_(void);
+
+#endif /* EVSIGNAL_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/evthread-internal.h b/sntp/libevent/evthread-internal.h
new file mode 100644
index 000000000000..346b2bb92774
--- /dev/null
+++ b/sntp/libevent/evthread-internal.h
@@ -0,0 +1,385 @@
+/*
+ * Copyright (c) 2008-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVTHREAD_INTERNAL_H_INCLUDED_
+#define EVTHREAD_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include "event2/thread.h"
+#include "util-internal.h"
+
+struct event_base;
+
+#ifndef _WIN32
+/* On Windows, the way we currently make DLLs, it's not allowed for us to
+ * have shared global structures. Thus, we only do the direct-call-to-function
+ * code path if we know that the local shared library system supports it.
+ */
+#define EVTHREAD_EXPOSE_STRUCTS
+#endif
+
+#if ! defined(EVENT__DISABLE_THREAD_SUPPORT) && defined(EVTHREAD_EXPOSE_STRUCTS)
+/* Global function pointers to lock-related functions. NULL if locking isn't
+ enabled. */
+extern struct evthread_lock_callbacks evthread_lock_fns_;
+extern struct evthread_condition_callbacks evthread_cond_fns_;
+extern unsigned long (*evthread_id_fn_)(void);
+extern int evthread_lock_debugging_enabled_;
+
+/** Return the ID of the current thread, or 1 if threading isn't enabled. */
+#define EVTHREAD_GET_ID() \
+ (evthread_id_fn_ ? evthread_id_fn_() : 1)
+
+/** Return true iff we're in the thread that is currently (or most recently)
+ * running a given event_base's loop. Requires lock. */
+#define EVBASE_IN_THREAD(base) \
+ (evthread_id_fn_ == NULL || \
+ (base)->th_owner_id == evthread_id_fn_())
+
+/** Return true iff we need to notify the base's main thread about changes to
+ * its state, because it's currently running the main loop in another
+ * thread. Requires lock. */
+#define EVBASE_NEED_NOTIFY(base) \
+ (evthread_id_fn_ != NULL && \
+ (base)->running_loop && \
+ (base)->th_owner_id != evthread_id_fn_())
+
+/** Allocate a new lock, and store it in lockvar, a void*. Sets lockvar to
+ NULL if locking is not enabled. */
+#define EVTHREAD_ALLOC_LOCK(lockvar, locktype) \
+ ((lockvar) = evthread_lock_fns_.alloc ? \
+ evthread_lock_fns_.alloc(locktype) : NULL)
+
+/** Free a given lock, if it is present and locking is enabled. */
+#define EVTHREAD_FREE_LOCK(lockvar, locktype) \
+ do { \
+ void *lock_tmp_ = (lockvar); \
+ if (lock_tmp_ && evthread_lock_fns_.free) \
+ evthread_lock_fns_.free(lock_tmp_, (locktype)); \
+ } while (0)
+
+/** Acquire a lock. */
+#define EVLOCK_LOCK(lockvar,mode) \
+ do { \
+ if (lockvar) \
+ evthread_lock_fns_.lock(mode, lockvar); \
+ } while (0)
+
+/** Release a lock */
+#define EVLOCK_UNLOCK(lockvar,mode) \
+ do { \
+ if (lockvar) \
+ evthread_lock_fns_.unlock(mode, lockvar); \
+ } while (0)
+
+/** Helper: put lockvar1 and lockvar2 into pointerwise ascending order. */
+#define EVLOCK_SORTLOCKS_(lockvar1, lockvar2) \
+ do { \
+ if (lockvar1 && lockvar2 && lockvar1 > lockvar2) { \
+ void *tmp = lockvar1; \
+ lockvar1 = lockvar2; \
+ lockvar2 = tmp; \
+ } \
+ } while (0)
+
+/** Lock an event_base, if it is set up for locking. Acquires the lock
+ in the base structure whose field is named 'lockvar'. */
+#define EVBASE_ACQUIRE_LOCK(base, lockvar) do { \
+ EVLOCK_LOCK((base)->lockvar, 0); \
+ } while (0)
+
+/** Unlock an event_base, if it is set up for locking. */
+#define EVBASE_RELEASE_LOCK(base, lockvar) do { \
+ EVLOCK_UNLOCK((base)->lockvar, 0); \
+ } while (0)
+
+/** If lock debugging is enabled, and lock is non-null, assert that 'lock' is
+ * locked and held by us. */
+#define EVLOCK_ASSERT_LOCKED(lock) \
+ do { \
+ if ((lock) && evthread_lock_debugging_enabled_) { \
+ EVUTIL_ASSERT(evthread_is_debug_lock_held_(lock)); \
+ } \
+ } while (0)
+
+/** Try to grab the lock for 'lockvar' without blocking, and return 1 if we
+ * manage to get it. */
+static inline int EVLOCK_TRY_LOCK_(void *lock);
+static inline int
+EVLOCK_TRY_LOCK_(void *lock)
+{
+ if (lock && evthread_lock_fns_.lock) {
+ int r = evthread_lock_fns_.lock(EVTHREAD_TRY, lock);
+ return !r;
+ } else {
+ /* Locking is disabled either globally or for this thing;
+ * of course we count as having the lock. */
+ return 1;
+ }
+}
+
+/** Allocate a new condition variable and store it in the void *, condvar */
+#define EVTHREAD_ALLOC_COND(condvar) \
+ do { \
+ (condvar) = evthread_cond_fns_.alloc_condition ? \
+ evthread_cond_fns_.alloc_condition(0) : NULL; \
+ } while (0)
+/** Deallocate and free a condition variable in condvar */
+#define EVTHREAD_FREE_COND(cond) \
+ do { \
+ if (cond) \
+ evthread_cond_fns_.free_condition((cond)); \
+ } while (0)
+/** Signal one thread waiting on cond */
+#define EVTHREAD_COND_SIGNAL(cond) \
+ ( (cond) ? evthread_cond_fns_.signal_condition((cond), 0) : 0 )
+/** Signal all threads waiting on cond */
+#define EVTHREAD_COND_BROADCAST(cond) \
+ ( (cond) ? evthread_cond_fns_.signal_condition((cond), 1) : 0 )
+/** Wait until the condition 'cond' is signalled. Must be called while
+ * holding 'lock'. The lock will be released until the condition is
+ * signalled, at which point it will be acquired again. Returns 0 for
+ * success, -1 for failure. */
+#define EVTHREAD_COND_WAIT(cond, lock) \
+ ( (cond) ? evthread_cond_fns_.wait_condition((cond), (lock), NULL) : 0 )
+/** As EVTHREAD_COND_WAIT, but gives up after 'tv' has elapsed. Returns 1
+ * on timeout. */
+#define EVTHREAD_COND_WAIT_TIMED(cond, lock, tv) \
+ ( (cond) ? evthread_cond_fns_.wait_condition((cond), (lock), (tv)) : 0 )
+
+/** True iff locking functions have been configured. */
+#define EVTHREAD_LOCKING_ENABLED() \
+ (evthread_lock_fns_.lock != NULL)
+
+#elif ! defined(EVENT__DISABLE_THREAD_SUPPORT)
+
+unsigned long evthreadimpl_get_id_(void);
+int evthreadimpl_is_lock_debugging_enabled_(void);
+void *evthreadimpl_lock_alloc_(unsigned locktype);
+void evthreadimpl_lock_free_(void *lock, unsigned locktype);
+int evthreadimpl_lock_lock_(unsigned mode, void *lock);
+int evthreadimpl_lock_unlock_(unsigned mode, void *lock);
+void *evthreadimpl_cond_alloc_(unsigned condtype);
+void evthreadimpl_cond_free_(void *cond);
+int evthreadimpl_cond_signal_(void *cond, int broadcast);
+int evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv);
+int evthreadimpl_locking_enabled_(void);
+
+#define EVTHREAD_GET_ID() evthreadimpl_get_id_()
+#define EVBASE_IN_THREAD(base) \
+ ((base)->th_owner_id == evthreadimpl_get_id_())
+#define EVBASE_NEED_NOTIFY(base) \
+ ((base)->running_loop && \
+ ((base)->th_owner_id != evthreadimpl_get_id_()))
+
+#define EVTHREAD_ALLOC_LOCK(lockvar, locktype) \
+ ((lockvar) = evthreadimpl_lock_alloc_(locktype))
+
+#define EVTHREAD_FREE_LOCK(lockvar, locktype) \
+ do { \
+ void *lock_tmp_ = (lockvar); \
+ if (lock_tmp_) \
+ evthreadimpl_lock_free_(lock_tmp_, (locktype)); \
+ } while (0)
+
+/** Acquire a lock. */
+#define EVLOCK_LOCK(lockvar,mode) \
+ do { \
+ if (lockvar) \
+ evthreadimpl_lock_lock_(mode, lockvar); \
+ } while (0)
+
+/** Release a lock */
+#define EVLOCK_UNLOCK(lockvar,mode) \
+ do { \
+ if (lockvar) \
+ evthreadimpl_lock_unlock_(mode, lockvar); \
+ } while (0)
+
+/** Lock an event_base, if it is set up for locking. Acquires the lock
+ in the base structure whose field is named 'lockvar'. */
+#define EVBASE_ACQUIRE_LOCK(base, lockvar) do { \
+ EVLOCK_LOCK((base)->lockvar, 0); \
+ } while (0)
+
+/** Unlock an event_base, if it is set up for locking. */
+#define EVBASE_RELEASE_LOCK(base, lockvar) do { \
+ EVLOCK_UNLOCK((base)->lockvar, 0); \
+ } while (0)
+
+/** If lock debugging is enabled, and lock is non-null, assert that 'lock' is
+ * locked and held by us. */
+#define EVLOCK_ASSERT_LOCKED(lock) \
+ do { \
+ if ((lock) && evthreadimpl_is_lock_debugging_enabled_()) { \
+ EVUTIL_ASSERT(evthread_is_debug_lock_held_(lock)); \
+ } \
+ } while (0)
+
+/** Try to grab the lock for 'lockvar' without blocking, and return 1 if we
+ * manage to get it. */
+static inline int EVLOCK_TRY_LOCK_(void *lock);
+static inline int
+EVLOCK_TRY_LOCK_(void *lock)
+{
+ if (lock) {
+ int r = evthreadimpl_lock_lock_(EVTHREAD_TRY, lock);
+ return !r;
+ } else {
+ /* Locking is disabled either globally or for this thing;
+ * of course we count as having the lock. */
+ return 1;
+ }
+}
+
+/** Allocate a new condition variable and store it in the void *, condvar */
+#define EVTHREAD_ALLOC_COND(condvar) \
+ do { \
+ (condvar) = evthreadimpl_cond_alloc_(0); \
+ } while (0)
+/** Deallocate and free a condition variable in condvar */
+#define EVTHREAD_FREE_COND(cond) \
+ do { \
+ if (cond) \
+ evthreadimpl_cond_free_((cond)); \
+ } while (0)
+/** Signal one thread waiting on cond */
+#define EVTHREAD_COND_SIGNAL(cond) \
+ ( (cond) ? evthreadimpl_cond_signal_((cond), 0) : 0 )
+/** Signal all threads waiting on cond */
+#define EVTHREAD_COND_BROADCAST(cond) \
+ ( (cond) ? evthreadimpl_cond_signal_((cond), 1) : 0 )
+/** Wait until the condition 'cond' is signalled. Must be called while
+ * holding 'lock'. The lock will be released until the condition is
+ * signalled, at which point it will be acquired again. Returns 0 for
+ * success, -1 for failure. */
+#define EVTHREAD_COND_WAIT(cond, lock) \
+ ( (cond) ? evthreadimpl_cond_wait_((cond), (lock), NULL) : 0 )
+/** As EVTHREAD_COND_WAIT, but gives up after 'tv' has elapsed. Returns 1
+ * on timeout. */
+#define EVTHREAD_COND_WAIT_TIMED(cond, lock, tv) \
+ ( (cond) ? evthreadimpl_cond_wait_((cond), (lock), (tv)) : 0 )
+
+#define EVTHREAD_LOCKING_ENABLED() \
+ (evthreadimpl_locking_enabled_())
+
+#else /* EVENT__DISABLE_THREAD_SUPPORT */
+
+#define EVTHREAD_GET_ID() 1
+#define EVTHREAD_ALLOC_LOCK(lockvar, locktype) EVUTIL_NIL_STMT_
+#define EVTHREAD_FREE_LOCK(lockvar, locktype) EVUTIL_NIL_STMT_
+
+#define EVLOCK_LOCK(lockvar, mode) EVUTIL_NIL_STMT_
+#define EVLOCK_UNLOCK(lockvar, mode) EVUTIL_NIL_STMT_
+#define EVLOCK_LOCK2(lock1,lock2,mode1,mode2) EVUTIL_NIL_STMT_
+#define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2) EVUTIL_NIL_STMT_
+
+#define EVBASE_IN_THREAD(base) 1
+#define EVBASE_NEED_NOTIFY(base) 0
+#define EVBASE_ACQUIRE_LOCK(base, lock) EVUTIL_NIL_STMT_
+#define EVBASE_RELEASE_LOCK(base, lock) EVUTIL_NIL_STMT_
+#define EVLOCK_ASSERT_LOCKED(lock) EVUTIL_NIL_STMT_
+
+#define EVLOCK_TRY_LOCK_(lock) 1
+
+#define EVTHREAD_ALLOC_COND(condvar) EVUTIL_NIL_STMT_
+#define EVTHREAD_FREE_COND(cond) EVUTIL_NIL_STMT_
+#define EVTHREAD_COND_SIGNAL(cond) EVUTIL_NIL_STMT_
+#define EVTHREAD_COND_BROADCAST(cond) EVUTIL_NIL_STMT_
+#define EVTHREAD_COND_WAIT(cond, lock) EVUTIL_NIL_STMT_
+#define EVTHREAD_COND_WAIT_TIMED(cond, lock, howlong) EVUTIL_NIL_STMT_
+
+#define EVTHREAD_LOCKING_ENABLED() 0
+
+#endif
+
+/* This code is shared between both lock impls */
+#if ! defined(EVENT__DISABLE_THREAD_SUPPORT)
+/** Helper: put lockvar1 and lockvar2 into pointerwise ascending order. */
+#define EVLOCK_SORTLOCKS_(lockvar1, lockvar2) \
+ do { \
+ if (lockvar1 && lockvar2 && lockvar1 > lockvar2) { \
+ void *tmp = lockvar1; \
+ lockvar1 = lockvar2; \
+ lockvar2 = tmp; \
+ } \
+ } while (0)
+
+/** Acquire both lock1 and lock2. Always allocates locks in the same order,
+ * so that two threads locking two locks with LOCK2 will not deadlock. */
+#define EVLOCK_LOCK2(lock1,lock2,mode1,mode2) \
+ do { \
+ void *lock1_tmplock_ = (lock1); \
+ void *lock2_tmplock_ = (lock2); \
+ EVLOCK_SORTLOCKS_(lock1_tmplock_,lock2_tmplock_); \
+ EVLOCK_LOCK(lock1_tmplock_,mode1); \
+ if (lock2_tmplock_ != lock1_tmplock_) \
+ EVLOCK_LOCK(lock2_tmplock_,mode2); \
+ } while (0)
+/** Release both lock1 and lock2. */
+#define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2) \
+ do { \
+ void *lock1_tmplock_ = (lock1); \
+ void *lock2_tmplock_ = (lock2); \
+ EVLOCK_SORTLOCKS_(lock1_tmplock_,lock2_tmplock_); \
+ if (lock2_tmplock_ != lock1_tmplock_) \
+ EVLOCK_UNLOCK(lock2_tmplock_,mode2); \
+ EVLOCK_UNLOCK(lock1_tmplock_,mode1); \
+ } while (0)
+
+int evthread_is_debug_lock_held_(void *lock);
+void *evthread_debug_get_real_lock_(void *lock);
+
+void *evthread_setup_global_lock_(void *lock_, unsigned locktype,
+ int enable_locks);
+
+#define EVTHREAD_SETUP_GLOBAL_LOCK(lockvar, locktype) \
+ do { \
+ lockvar = evthread_setup_global_lock_(lockvar, \
+ (locktype), enable_locks); \
+ if (!lockvar) { \
+ event_warn("Couldn't allocate %s", #lockvar); \
+ return -1; \
+ } \
+ } while (0);
+
+int event_global_setup_locks_(const int enable_locks);
+int evsig_global_setup_locks_(const int enable_locks);
+int evutil_global_setup_locks_(const int enable_locks);
+int evutil_secure_rng_global_setup_locks_(const int enable_locks);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVTHREAD_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/evthread.c b/sntp/libevent/evthread.c
new file mode 100644
index 000000000000..4da5d24e8040
--- /dev/null
+++ b/sntp/libevent/evthread.c
@@ -0,0 +1,464 @@
+/*
+ * Copyright (c) 2008-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+
+#include "event2/thread.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+#include "evthread-internal.h"
+
+#ifdef EVTHREAD_EXPOSE_STRUCTS
+#define GLOBAL
+#else
+#define GLOBAL static
+#endif
+
+/* globals */
+GLOBAL int evthread_lock_debugging_enabled_ = 0;
+GLOBAL struct evthread_lock_callbacks evthread_lock_fns_ = {
+ 0, 0, NULL, NULL, NULL, NULL
+};
+GLOBAL unsigned long (*evthread_id_fn_)(void) = NULL;
+GLOBAL struct evthread_condition_callbacks evthread_cond_fns_ = {
+ 0, NULL, NULL, NULL, NULL
+};
+
+/* Used for debugging */
+static struct evthread_lock_callbacks original_lock_fns_ = {
+ 0, 0, NULL, NULL, NULL, NULL
+};
+static struct evthread_condition_callbacks original_cond_fns_ = {
+ 0, NULL, NULL, NULL, NULL
+};
+
+void
+evthread_set_id_callback(unsigned long (*id_fn)(void))
+{
+ evthread_id_fn_ = id_fn;
+}
+
+int
+evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs)
+{
+ struct evthread_lock_callbacks *target =
+ evthread_lock_debugging_enabled_
+ ? &original_lock_fns_ : &evthread_lock_fns_;
+
+ if (!cbs) {
+ if (target->alloc)
+ event_warnx("Trying to disable lock functions after "
+ "they have been set up will probaby not work.");
+ memset(target, 0, sizeof(evthread_lock_fns_));
+ return 0;
+ }
+ if (target->alloc) {
+ /* Uh oh; we already had locking callbacks set up.*/
+ if (target->lock_api_version == cbs->lock_api_version &&
+ target->supported_locktypes == cbs->supported_locktypes &&
+ target->alloc == cbs->alloc &&
+ target->free == cbs->free &&
+ target->lock == cbs->lock &&
+ target->unlock == cbs->unlock) {
+ /* no change -- allow this. */
+ return 0;
+ }
+ event_warnx("Can't change lock callbacks once they have been "
+ "initialized.");
+ return -1;
+ }
+ if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) {
+ memcpy(target, cbs, sizeof(evthread_lock_fns_));
+ return event_global_setup_locks_(1);
+ } else {
+ return -1;
+ }
+}
+
+int
+evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs)
+{
+ struct evthread_condition_callbacks *target =
+ evthread_lock_debugging_enabled_
+ ? &original_cond_fns_ : &evthread_cond_fns_;
+
+ if (!cbs) {
+ if (target->alloc_condition)
+ event_warnx("Trying to disable condition functions "
+ "after they have been set up will probaby not "
+ "work.");
+ memset(target, 0, sizeof(evthread_cond_fns_));
+ return 0;
+ }
+ if (target->alloc_condition) {
+ /* Uh oh; we already had condition callbacks set up.*/
+ if (target->condition_api_version == cbs->condition_api_version &&
+ target->alloc_condition == cbs->alloc_condition &&
+ target->free_condition == cbs->free_condition &&
+ target->signal_condition == cbs->signal_condition &&
+ target->wait_condition == cbs->wait_condition) {
+ /* no change -- allow this. */
+ return 0;
+ }
+ event_warnx("Can't change condition callbacks once they "
+ "have been initialized.");
+ return -1;
+ }
+ if (cbs->alloc_condition && cbs->free_condition &&
+ cbs->signal_condition && cbs->wait_condition) {
+ memcpy(target, cbs, sizeof(evthread_cond_fns_));
+ }
+ if (evthread_lock_debugging_enabled_) {
+ evthread_cond_fns_.alloc_condition = cbs->alloc_condition;
+ evthread_cond_fns_.free_condition = cbs->free_condition;
+ evthread_cond_fns_.signal_condition = cbs->signal_condition;
+ }
+ return 0;
+}
+
+#define DEBUG_LOCK_SIG 0xdeb0b10c
+
+struct debug_lock {
+ unsigned signature;
+ unsigned locktype;
+ unsigned long held_by;
+ /* XXXX if we ever use read-write locks, we will need a separate
+ * lock to protect count. */
+ int count;
+ void *lock;
+};
+
+static void *
+debug_lock_alloc(unsigned locktype)
+{
+ struct debug_lock *result = mm_malloc(sizeof(struct debug_lock));
+ if (!result)
+ return NULL;
+ if (original_lock_fns_.alloc) {
+ if (!(result->lock = original_lock_fns_.alloc(
+ locktype|EVTHREAD_LOCKTYPE_RECURSIVE))) {
+ mm_free(result);
+ return NULL;
+ }
+ } else {
+ result->lock = NULL;
+ }
+ result->signature = DEBUG_LOCK_SIG;
+ result->locktype = locktype;
+ result->count = 0;
+ result->held_by = 0;
+ return result;
+}
+
+static void
+debug_lock_free(void *lock_, unsigned locktype)
+{
+ struct debug_lock *lock = lock_;
+ EVUTIL_ASSERT(lock->count == 0);
+ EVUTIL_ASSERT(locktype == lock->locktype);
+ EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature);
+ if (original_lock_fns_.free) {
+ original_lock_fns_.free(lock->lock,
+ lock->locktype|EVTHREAD_LOCKTYPE_RECURSIVE);
+ }
+ lock->lock = NULL;
+ lock->count = -100;
+ lock->signature = 0x12300fda;
+ mm_free(lock);
+}
+
+static void
+evthread_debug_lock_mark_locked(unsigned mode, struct debug_lock *lock)
+{
+ EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature);
+ ++lock->count;
+ if (!(lock->locktype & EVTHREAD_LOCKTYPE_RECURSIVE))
+ EVUTIL_ASSERT(lock->count == 1);
+ if (evthread_id_fn_) {
+ unsigned long me;
+ me = evthread_id_fn_();
+ if (lock->count > 1)
+ EVUTIL_ASSERT(lock->held_by == me);
+ lock->held_by = me;
+ }
+}
+
+static int
+debug_lock_lock(unsigned mode, void *lock_)
+{
+ struct debug_lock *lock = lock_;
+ int res = 0;
+ if (lock->locktype & EVTHREAD_LOCKTYPE_READWRITE)
+ EVUTIL_ASSERT(mode & (EVTHREAD_READ|EVTHREAD_WRITE));
+ else
+ EVUTIL_ASSERT((mode & (EVTHREAD_READ|EVTHREAD_WRITE)) == 0);
+ if (original_lock_fns_.lock)
+ res = original_lock_fns_.lock(mode, lock->lock);
+ if (!res) {
+ evthread_debug_lock_mark_locked(mode, lock);
+ }
+ return res;
+}
+
+static void
+evthread_debug_lock_mark_unlocked(unsigned mode, struct debug_lock *lock)
+{
+ EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature);
+ if (lock->locktype & EVTHREAD_LOCKTYPE_READWRITE)
+ EVUTIL_ASSERT(mode & (EVTHREAD_READ|EVTHREAD_WRITE));
+ else
+ EVUTIL_ASSERT((mode & (EVTHREAD_READ|EVTHREAD_WRITE)) == 0);
+ if (evthread_id_fn_) {
+ unsigned long me;
+ me = evthread_id_fn_();
+ EVUTIL_ASSERT(lock->held_by == me);
+ if (lock->count == 1)
+ lock->held_by = 0;
+ }
+ --lock->count;
+ EVUTIL_ASSERT(lock->count >= 0);
+}
+
+static int
+debug_lock_unlock(unsigned mode, void *lock_)
+{
+ struct debug_lock *lock = lock_;
+ int res = 0;
+ evthread_debug_lock_mark_unlocked(mode, lock);
+ if (original_lock_fns_.unlock)
+ res = original_lock_fns_.unlock(mode, lock->lock);
+ return res;
+}
+
+static int
+debug_cond_wait(void *cond_, void *lock_, const struct timeval *tv)
+{
+ int r;
+ struct debug_lock *lock = lock_;
+ EVUTIL_ASSERT(lock);
+ EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature);
+ EVLOCK_ASSERT_LOCKED(lock_);
+ evthread_debug_lock_mark_unlocked(0, lock);
+ r = original_cond_fns_.wait_condition(cond_, lock->lock, tv);
+ evthread_debug_lock_mark_locked(0, lock);
+ return r;
+}
+
+/* misspelled version for backward compatibility */
+void
+evthread_enable_lock_debuging(void)
+{
+ evthread_enable_lock_debugging();
+}
+
+void
+evthread_enable_lock_debugging(void)
+{
+ struct evthread_lock_callbacks cbs = {
+ EVTHREAD_LOCK_API_VERSION,
+ EVTHREAD_LOCKTYPE_RECURSIVE,
+ debug_lock_alloc,
+ debug_lock_free,
+ debug_lock_lock,
+ debug_lock_unlock
+ };
+ if (evthread_lock_debugging_enabled_)
+ return;
+ memcpy(&original_lock_fns_, &evthread_lock_fns_,
+ sizeof(struct evthread_lock_callbacks));
+ memcpy(&evthread_lock_fns_, &cbs,
+ sizeof(struct evthread_lock_callbacks));
+
+ memcpy(&original_cond_fns_, &evthread_cond_fns_,
+ sizeof(struct evthread_condition_callbacks));
+ evthread_cond_fns_.wait_condition = debug_cond_wait;
+ evthread_lock_debugging_enabled_ = 1;
+
+ /* XXX return value should get checked. */
+ event_global_setup_locks_(0);
+}
+
+int
+evthread_is_debug_lock_held_(void *lock_)
+{
+ struct debug_lock *lock = lock_;
+ if (! lock->count)
+ return 0;
+ if (evthread_id_fn_) {
+ unsigned long me = evthread_id_fn_();
+ if (lock->held_by != me)
+ return 0;
+ }
+ return 1;
+}
+
+void *
+evthread_debug_get_real_lock_(void *lock_)
+{
+ struct debug_lock *lock = lock_;
+ return lock->lock;
+}
+
+void *
+evthread_setup_global_lock_(void *lock_, unsigned locktype, int enable_locks)
+{
+ /* there are four cases here:
+ 1) we're turning on debugging; locking is not on.
+ 2) we're turning on debugging; locking is on.
+ 3) we're turning on locking; debugging is not on.
+ 4) we're turning on locking; debugging is on. */
+
+ if (!enable_locks && original_lock_fns_.alloc == NULL) {
+ /* Case 1: allocate a debug lock. */
+ EVUTIL_ASSERT(lock_ == NULL);
+ return debug_lock_alloc(locktype);
+ } else if (!enable_locks && original_lock_fns_.alloc != NULL) {
+ /* Case 2: wrap the lock in a debug lock. */
+ struct debug_lock *lock;
+ EVUTIL_ASSERT(lock_ != NULL);
+
+ if (!(locktype & EVTHREAD_LOCKTYPE_RECURSIVE)) {
+ /* We can't wrap it: We need a recursive lock */
+ original_lock_fns_.free(lock_, locktype);
+ return debug_lock_alloc(locktype);
+ }
+ lock = mm_malloc(sizeof(struct debug_lock));
+ if (!lock) {
+ original_lock_fns_.free(lock_, locktype);
+ return NULL;
+ }
+ lock->lock = lock_;
+ lock->locktype = locktype;
+ lock->count = 0;
+ lock->held_by = 0;
+ return lock;
+ } else if (enable_locks && ! evthread_lock_debugging_enabled_) {
+ /* Case 3: allocate a regular lock */
+ EVUTIL_ASSERT(lock_ == NULL);
+ return evthread_lock_fns_.alloc(locktype);
+ } else {
+ /* Case 4: Fill in a debug lock with a real lock */
+ struct debug_lock *lock = lock_;
+ EVUTIL_ASSERT(enable_locks &&
+ evthread_lock_debugging_enabled_);
+ EVUTIL_ASSERT(lock->locktype == locktype);
+ EVUTIL_ASSERT(lock->lock == NULL);
+ lock->lock = original_lock_fns_.alloc(
+ locktype|EVTHREAD_LOCKTYPE_RECURSIVE);
+ if (!lock->lock) {
+ lock->count = -200;
+ mm_free(lock);
+ return NULL;
+ }
+ return lock;
+ }
+}
+
+
+#ifndef EVTHREAD_EXPOSE_STRUCTS
+unsigned long
+evthreadimpl_get_id_()
+{
+ return evthread_id_fn_ ? evthread_id_fn_() : 1;
+}
+void *
+evthreadimpl_lock_alloc_(unsigned locktype)
+{
+ return evthread_lock_fns_.alloc ?
+ evthread_lock_fns_.alloc(locktype) : NULL;
+}
+void
+evthreadimpl_lock_free_(void *lock, unsigned locktype)
+{
+ if (evthread_lock_fns_.free)
+ evthread_lock_fns_.free(lock, locktype);
+}
+int
+evthreadimpl_lock_lock_(unsigned mode, void *lock)
+{
+ if (evthread_lock_fns_.lock)
+ return evthread_lock_fns_.lock(mode, lock);
+ else
+ return 0;
+}
+int
+evthreadimpl_lock_unlock_(unsigned mode, void *lock)
+{
+ if (evthread_lock_fns_.unlock)
+ return evthread_lock_fns_.unlock(mode, lock);
+ else
+ return 0;
+}
+void *
+evthreadimpl_cond_alloc_(unsigned condtype)
+{
+ return evthread_cond_fns_.alloc_condition ?
+ evthread_cond_fns_.alloc_condition(condtype) : NULL;
+}
+void
+evthreadimpl_cond_free_(void *cond)
+{
+ if (evthread_cond_fns_.free_condition)
+ evthread_cond_fns_.free_condition(cond);
+}
+int
+evthreadimpl_cond_signal_(void *cond, int broadcast)
+{
+ if (evthread_cond_fns_.signal_condition)
+ return evthread_cond_fns_.signal_condition(cond, broadcast);
+ else
+ return 0;
+}
+int
+evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv)
+{
+ if (evthread_cond_fns_.wait_condition)
+ return evthread_cond_fns_.wait_condition(cond, lock, tv);
+ else
+ return 0;
+}
+int
+evthreadimpl_is_lock_debugging_enabled_(void)
+{
+ return evthread_lock_debugging_enabled_;
+}
+
+int
+evthreadimpl_locking_enabled_(void)
+{
+ return evthread_lock_fns_.lock != NULL;
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/evthread_pthread.c b/sntp/libevent/evthread_pthread.c
new file mode 100644
index 000000000000..4e11f74970ab
--- /dev/null
+++ b/sntp/libevent/evthread_pthread.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+/* With glibc we need to define _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE.
+ * This comes from evconfig-private.h
+ */
+#include <pthread.h>
+
+struct event_base;
+#include "event2/thread.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include "mm-internal.h"
+#include "evthread-internal.h"
+
+static pthread_mutexattr_t attr_recursive;
+
+static void *
+evthread_posix_lock_alloc(unsigned locktype)
+{
+ pthread_mutexattr_t *attr = NULL;
+ pthread_mutex_t *lock = mm_malloc(sizeof(pthread_mutex_t));
+ if (!lock)
+ return NULL;
+ if (locktype & EVTHREAD_LOCKTYPE_RECURSIVE)
+ attr = &attr_recursive;
+ if (pthread_mutex_init(lock, attr)) {
+ mm_free(lock);
+ return NULL;
+ }
+ return lock;
+}
+
+static void
+evthread_posix_lock_free(void *lock_, unsigned locktype)
+{
+ pthread_mutex_t *lock = lock_;
+ pthread_mutex_destroy(lock);
+ mm_free(lock);
+}
+
+static int
+evthread_posix_lock(unsigned mode, void *lock_)
+{
+ pthread_mutex_t *lock = lock_;
+ if (mode & EVTHREAD_TRY)
+ return pthread_mutex_trylock(lock);
+ else
+ return pthread_mutex_lock(lock);
+}
+
+static int
+evthread_posix_unlock(unsigned mode, void *lock_)
+{
+ pthread_mutex_t *lock = lock_;
+ return pthread_mutex_unlock(lock);
+}
+
+static unsigned long
+evthread_posix_get_id(void)
+{
+ union {
+ pthread_t thr;
+#if EVENT__SIZEOF_PTHREAD_T > EVENT__SIZEOF_LONG
+ ev_uint64_t id;
+#else
+ unsigned long id;
+#endif
+ } r;
+#if EVENT__SIZEOF_PTHREAD_T < EVENT__SIZEOF_LONG
+ memset(&r, 0, sizeof(r));
+#endif
+ r.thr = pthread_self();
+ return (unsigned long)r.id;
+}
+
+static void *
+evthread_posix_cond_alloc(unsigned condflags)
+{
+ pthread_cond_t *cond = mm_malloc(sizeof(pthread_cond_t));
+ if (!cond)
+ return NULL;
+ if (pthread_cond_init(cond, NULL)) {
+ mm_free(cond);
+ return NULL;
+ }
+ return cond;
+}
+
+static void
+evthread_posix_cond_free(void *cond_)
+{
+ pthread_cond_t *cond = cond_;
+ pthread_cond_destroy(cond);
+ mm_free(cond);
+}
+
+static int
+evthread_posix_cond_signal(void *cond_, int broadcast)
+{
+ pthread_cond_t *cond = cond_;
+ int r;
+ if (broadcast)
+ r = pthread_cond_broadcast(cond);
+ else
+ r = pthread_cond_signal(cond);
+ return r ? -1 : 0;
+}
+
+static int
+evthread_posix_cond_wait(void *cond_, void *lock_, const struct timeval *tv)
+{
+ int r;
+ pthread_cond_t *cond = cond_;
+ pthread_mutex_t *lock = lock_;
+
+ if (tv) {
+ struct timeval now, abstime;
+ struct timespec ts;
+ evutil_gettimeofday(&now, NULL);
+ evutil_timeradd(&now, tv, &abstime);
+ ts.tv_sec = abstime.tv_sec;
+ ts.tv_nsec = abstime.tv_usec*1000;
+ r = pthread_cond_timedwait(cond, lock, &ts);
+ if (r == ETIMEDOUT)
+ return 1;
+ else if (r)
+ return -1;
+ else
+ return 0;
+ } else {
+ r = pthread_cond_wait(cond, lock);
+ return r ? -1 : 0;
+ }
+}
+
+int
+evthread_use_pthreads(void)
+{
+ struct evthread_lock_callbacks cbs = {
+ EVTHREAD_LOCK_API_VERSION,
+ EVTHREAD_LOCKTYPE_RECURSIVE,
+ evthread_posix_lock_alloc,
+ evthread_posix_lock_free,
+ evthread_posix_lock,
+ evthread_posix_unlock
+ };
+ struct evthread_condition_callbacks cond_cbs = {
+ EVTHREAD_CONDITION_API_VERSION,
+ evthread_posix_cond_alloc,
+ evthread_posix_cond_free,
+ evthread_posix_cond_signal,
+ evthread_posix_cond_wait
+ };
+ /* Set ourselves up to get recursive locks. */
+ if (pthread_mutexattr_init(&attr_recursive))
+ return -1;
+ if (pthread_mutexattr_settype(&attr_recursive, PTHREAD_MUTEX_RECURSIVE))
+ return -1;
+
+ evthread_set_lock_callbacks(&cbs);
+ evthread_set_condition_callbacks(&cond_cbs);
+ evthread_set_id_callback(evthread_posix_get_id);
+ return 0;
+}
diff --git a/sntp/libevent/evthread_win32.c b/sntp/libevent/evthread_win32.c
new file mode 100644
index 000000000000..2ec80560a5c9
--- /dev/null
+++ b/sntp/libevent/evthread_win32.c
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <sys/locking.h>
+#endif
+
+struct event_base;
+#include "event2/thread.h"
+
+#include "mm-internal.h"
+#include "evthread-internal.h"
+#include "time-internal.h"
+
+#define SPIN_COUNT 2000
+
+static void *
+evthread_win32_lock_create(unsigned locktype)
+{
+ CRITICAL_SECTION *lock = mm_malloc(sizeof(CRITICAL_SECTION));
+ if (!lock)
+ return NULL;
+ if (InitializeCriticalSectionAndSpinCount(lock, SPIN_COUNT) == 0) {
+ mm_free(lock);
+ return NULL;
+ }
+ return lock;
+}
+
+static void
+evthread_win32_lock_free(void *lock_, unsigned locktype)
+{
+ CRITICAL_SECTION *lock = lock_;
+ DeleteCriticalSection(lock);
+ mm_free(lock);
+}
+
+static int
+evthread_win32_lock(unsigned mode, void *lock_)
+{
+ CRITICAL_SECTION *lock = lock_;
+ if ((mode & EVTHREAD_TRY)) {
+ return ! TryEnterCriticalSection(lock);
+ } else {
+ EnterCriticalSection(lock);
+ return 0;
+ }
+}
+
+static int
+evthread_win32_unlock(unsigned mode, void *lock_)
+{
+ CRITICAL_SECTION *lock = lock_;
+ LeaveCriticalSection(lock);
+ return 0;
+}
+
+static unsigned long
+evthread_win32_get_id(void)
+{
+ return (unsigned long) GetCurrentThreadId();
+}
+
+#ifdef WIN32_HAVE_CONDITION_VARIABLES
+static void WINAPI (*InitializeConditionVariable_fn)(PCONDITION_VARIABLE)
+ = NULL;
+static BOOL WINAPI (*SleepConditionVariableCS_fn)(
+ PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD) = NULL;
+static void WINAPI (*WakeAllConditionVariable_fn)(PCONDITION_VARIABLE) = NULL;
+static void WINAPI (*WakeConditionVariable_fn)(PCONDITION_VARIABLE) = NULL;
+
+static int
+evthread_win32_condvar_init(void)
+{
+ HANDLE lib;
+
+ lib = GetModuleHandle(TEXT("kernel32.dll"));
+ if (lib == NULL)
+ return 0;
+
+#define LOAD(name) \
+ name##_fn = GetProcAddress(lib, #name)
+ LOAD(InitializeConditionVariable);
+ LOAD(SleepConditionVariableCS);
+ LOAD(WakeAllConditionVariable);
+ LOAD(WakeConditionVariable);
+
+ return InitializeConditionVariable_fn && SleepConditionVariableCS_fn &&
+ WakeAllConditionVariable_fn && WakeConditionVariable_fn;
+}
+
+/* XXXX Even if we can build this, we don't necessarily want to: the functions
+ * in question didn't exist before Vista, so we'd better LoadProc them. */
+static void *
+evthread_win32_condvar_alloc(unsigned condflags)
+{
+ CONDITION_VARIABLE *cond = mm_malloc(sizeof(CONDITION_VARIABLE));
+ if (!cond)
+ return NULL;
+ InitializeConditionVariable_fn(cond);
+ return cond;
+}
+
+static void
+evthread_win32_condvar_free(void *cond_)
+{
+ CONDITION_VARIABLE *cond = cond_;
+ /* There doesn't _seem_ to be a cleaup fn here... */
+ mm_free(cond);
+}
+
+static int
+evthread_win32_condvar_signal(void *cond, int broadcast)
+{
+ CONDITION_VARIABLE *cond = cond_;
+ if (broadcast)
+ WakeAllConditionVariable_fn(cond);
+ else
+ WakeConditionVariable_fn(cond);
+ return 0;
+}
+
+static int
+evthread_win32_condvar_wait(void *cond_, void *lock_, const struct timeval *tv)
+{
+ CONDITION_VARIABLE *cond = cond_;
+ CRITICAL_SECTION *lock = lock_;
+ DWORD ms, err;
+ BOOL result;
+
+ if (tv)
+ ms = evutil_tv_to_msec_(tv);
+ else
+ ms = INFINITE;
+ result = SleepConditionVariableCS_fn(cond, lock, ms);
+ if (result) {
+ if (GetLastError() == WAIT_TIMEOUT)
+ return 1;
+ else
+ return -1;
+ } else {
+ return 0;
+ }
+}
+#endif
+
+struct evthread_win32_cond {
+ HANDLE event;
+
+ CRITICAL_SECTION lock;
+ int n_waiting;
+ int n_to_wake;
+ int generation;
+};
+
+static void *
+evthread_win32_cond_alloc(unsigned flags)
+{
+ struct evthread_win32_cond *cond;
+ if (!(cond = mm_malloc(sizeof(struct evthread_win32_cond))))
+ return NULL;
+ if (InitializeCriticalSectionAndSpinCount(&cond->lock, SPIN_COUNT)==0) {
+ mm_free(cond);
+ return NULL;
+ }
+ if ((cond->event = CreateEvent(NULL,TRUE,FALSE,NULL)) == NULL) {
+ DeleteCriticalSection(&cond->lock);
+ mm_free(cond);
+ return NULL;
+ }
+ cond->n_waiting = cond->n_to_wake = cond->generation = 0;
+ return cond;
+}
+
+static void
+evthread_win32_cond_free(void *cond_)
+{
+ struct evthread_win32_cond *cond = cond_;
+ DeleteCriticalSection(&cond->lock);
+ CloseHandle(cond->event);
+ mm_free(cond);
+}
+
+static int
+evthread_win32_cond_signal(void *cond_, int broadcast)
+{
+ struct evthread_win32_cond *cond = cond_;
+ EnterCriticalSection(&cond->lock);
+ if (broadcast)
+ cond->n_to_wake = cond->n_waiting;
+ else
+ ++cond->n_to_wake;
+ cond->generation++;
+ SetEvent(cond->event);
+ LeaveCriticalSection(&cond->lock);
+ return 0;
+}
+
+static int
+evthread_win32_cond_wait(void *cond_, void *lock_, const struct timeval *tv)
+{
+ struct evthread_win32_cond *cond = cond_;
+ CRITICAL_SECTION *lock = lock_;
+ int generation_at_start;
+ int waiting = 1;
+ int result = -1;
+ DWORD ms = INFINITE, ms_orig = INFINITE, startTime, endTime;
+ if (tv)
+ ms_orig = ms = evutil_tv_to_msec_(tv);
+
+ EnterCriticalSection(&cond->lock);
+ ++cond->n_waiting;
+ generation_at_start = cond->generation;
+ LeaveCriticalSection(&cond->lock);
+
+ LeaveCriticalSection(lock);
+
+ startTime = GetTickCount();
+ do {
+ DWORD res;
+ res = WaitForSingleObject(cond->event, ms);
+ EnterCriticalSection(&cond->lock);
+ if (cond->n_to_wake &&
+ cond->generation != generation_at_start) {
+ --cond->n_to_wake;
+ --cond->n_waiting;
+ result = 0;
+ waiting = 0;
+ goto out;
+ } else if (res != WAIT_OBJECT_0) {
+ result = (res==WAIT_TIMEOUT) ? 1 : -1;
+ --cond->n_waiting;
+ waiting = 0;
+ goto out;
+ } else if (ms != INFINITE) {
+ endTime = GetTickCount();
+ if (startTime + ms_orig <= endTime) {
+ result = 1; /* Timeout */
+ --cond->n_waiting;
+ waiting = 0;
+ goto out;
+ } else {
+ ms = startTime + ms_orig - endTime;
+ }
+ }
+ /* If we make it here, we are still waiting. */
+ if (cond->n_to_wake == 0) {
+ /* There is nobody else who should wake up; reset
+ * the event. */
+ ResetEvent(cond->event);
+ }
+ out:
+ LeaveCriticalSection(&cond->lock);
+ } while (waiting);
+
+ EnterCriticalSection(lock);
+
+ EnterCriticalSection(&cond->lock);
+ if (!cond->n_waiting)
+ ResetEvent(cond->event);
+ LeaveCriticalSection(&cond->lock);
+
+ return result;
+}
+
+int
+evthread_use_windows_threads(void)
+{
+ struct evthread_lock_callbacks cbs = {
+ EVTHREAD_LOCK_API_VERSION,
+ EVTHREAD_LOCKTYPE_RECURSIVE,
+ evthread_win32_lock_create,
+ evthread_win32_lock_free,
+ evthread_win32_lock,
+ evthread_win32_unlock
+ };
+
+
+ struct evthread_condition_callbacks cond_cbs = {
+ EVTHREAD_CONDITION_API_VERSION,
+ evthread_win32_cond_alloc,
+ evthread_win32_cond_free,
+ evthread_win32_cond_signal,
+ evthread_win32_cond_wait
+ };
+#ifdef WIN32_HAVE_CONDITION_VARIABLES
+ struct evthread_condition_callbacks condvar_cbs = {
+ EVTHREAD_CONDITION_API_VERSION,
+ evthread_win32_condvar_alloc,
+ evthread_win32_condvar_free,
+ evthread_win32_condvar_signal,
+ evthread_win32_condvar_wait
+ };
+#endif
+
+ evthread_set_lock_callbacks(&cbs);
+ evthread_set_id_callback(evthread_win32_get_id);
+#ifdef WIN32_HAVE_CONDITION_VARIABLES
+ if (evthread_win32_condvar_init()) {
+ evthread_set_condition_callbacks(&condvar_cbs);
+ return 0;
+ }
+#endif
+ evthread_set_condition_callbacks(&cond_cbs);
+
+ return 0;
+}
+
diff --git a/sntp/libevent/evutil.c b/sntp/libevent/evutil.c
new file mode 100644
index 000000000000..c28caded59ca
--- /dev/null
+++ b/sntp/libevent/evutil.c
@@ -0,0 +1,2649 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <io.h>
+#include <tchar.h>
+#include <process.h>
+#undef _WIN32_WINNT
+/* For structs needed by GetAdaptersAddresses */
+#define _WIN32_WINNT 0x0501
+#include <iphlpapi.h>
+#endif
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef EVENT__HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+#ifdef EVENT__HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#include <time.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_IFADDRS_H
+#include <ifaddrs.h>
+#endif
+
+#include "event2/util.h"
+#include "util-internal.h"
+#include "log-internal.h"
+#include "mm-internal.h"
+#include "evthread-internal.h"
+
+#include "strlcpy-internal.h"
+#include "ipv6-internal.h"
+
+#ifdef _WIN32
+#define HT_NO_CACHE_HASH_VALUES
+#include "ht-internal.h"
+#define open _open
+#define read _read
+#define close _close
+#ifndef fstat
+#define fstat _fstati64
+#endif
+#ifndef stat
+#define stat _stati64
+#endif
+#define mode_t int
+#endif
+
+int
+evutil_open_closeonexec_(const char *pathname, int flags, unsigned mode)
+{
+ int fd;
+
+#ifdef O_CLOEXEC
+ fd = open(pathname, flags|O_CLOEXEC, (mode_t)mode);
+ if (fd >= 0 || errno == EINVAL)
+ return fd;
+ /* If we got an EINVAL, fall through and try without O_CLOEXEC */
+#endif
+ fd = open(pathname, flags, (mode_t)mode);
+ if (fd < 0)
+ return -1;
+
+#if defined(FD_CLOEXEC)
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) {
+ close(fd);
+ return -1;
+ }
+#endif
+
+ return fd;
+}
+
+/**
+ Read the contents of 'filename' into a newly allocated NUL-terminated
+ string. Set *content_out to hold this string, and *len_out to hold its
+ length (not including the appended NUL). If 'is_binary', open the file in
+ binary mode.
+
+ Returns 0 on success, -1 if the open fails, and -2 for all other failures.
+
+ Used internally only; may go away in a future version.
+ */
+int
+evutil_read_file_(const char *filename, char **content_out, size_t *len_out,
+ int is_binary)
+{
+ int fd, r;
+ struct stat st;
+ char *mem;
+ size_t read_so_far=0;
+ int mode = O_RDONLY;
+
+ EVUTIL_ASSERT(content_out);
+ EVUTIL_ASSERT(len_out);
+ *content_out = NULL;
+ *len_out = 0;
+
+#ifdef O_BINARY
+ if (is_binary)
+ mode |= O_BINARY;
+#endif
+
+ fd = evutil_open_closeonexec_(filename, mode, 0);
+ if (fd < 0)
+ return -1;
+ if (fstat(fd, &st) || st.st_size < 0 ||
+ st.st_size > EV_SSIZE_MAX-1 ) {
+ close(fd);
+ return -2;
+ }
+ mem = mm_malloc((size_t)st.st_size + 1);
+ if (!mem) {
+ close(fd);
+ return -2;
+ }
+ read_so_far = 0;
+#ifdef _WIN32
+#define N_TO_READ(x) ((x) > INT_MAX) ? INT_MAX : ((int)(x))
+#else
+#define N_TO_READ(x) (x)
+#endif
+ while ((r = read(fd, mem+read_so_far, N_TO_READ(st.st_size - read_so_far))) > 0) {
+ read_so_far += r;
+ if (read_so_far >= (size_t)st.st_size)
+ break;
+ EVUTIL_ASSERT(read_so_far < (size_t)st.st_size);
+ }
+ close(fd);
+ if (r < 0) {
+ mm_free(mem);
+ return -2;
+ }
+ mem[read_so_far] = 0;
+
+ *len_out = read_so_far;
+ *content_out = mem;
+ return 0;
+}
+
+int
+evutil_socketpair(int family, int type, int protocol, evutil_socket_t fd[2])
+{
+#ifndef _WIN32
+ return socketpair(family, type, protocol, fd);
+#else
+ return evutil_ersatz_socketpair_(family, type, protocol, fd);
+#endif
+}
+
+int
+evutil_ersatz_socketpair_(int family, int type, int protocol,
+ evutil_socket_t fd[2])
+{
+ /* This code is originally from Tor. Used with permission. */
+
+ /* This socketpair does not work when localhost is down. So
+ * it's really not the same thing at all. But it's close enough
+ * for now, and really, when localhost is down sometimes, we
+ * have other problems too.
+ */
+#ifdef _WIN32
+#define ERR(e) WSA##e
+#else
+#define ERR(e) e
+#endif
+ evutil_socket_t listener = -1;
+ evutil_socket_t connector = -1;
+ evutil_socket_t acceptor = -1;
+ struct sockaddr_in listen_addr;
+ struct sockaddr_in connect_addr;
+ ev_socklen_t size;
+ int saved_errno = -1;
+
+ if (protocol
+ || (family != AF_INET
+#ifdef AF_UNIX
+ && family != AF_UNIX
+#endif
+ )) {
+ EVUTIL_SET_SOCKET_ERROR(ERR(EAFNOSUPPORT));
+ return -1;
+ }
+ if (!fd) {
+ EVUTIL_SET_SOCKET_ERROR(ERR(EINVAL));
+ return -1;
+ }
+
+ listener = socket(AF_INET, type, 0);
+ if (listener < 0)
+ return -1;
+ memset(&listen_addr, 0, sizeof(listen_addr));
+ listen_addr.sin_family = AF_INET;
+ listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ listen_addr.sin_port = 0; /* kernel chooses port. */
+ if (bind(listener, (struct sockaddr *) &listen_addr, sizeof (listen_addr))
+ == -1)
+ goto tidy_up_and_fail;
+ if (listen(listener, 1) == -1)
+ goto tidy_up_and_fail;
+
+ connector = socket(AF_INET, type, 0);
+ if (connector < 0)
+ goto tidy_up_and_fail;
+ /* We want to find out the port number to connect to. */
+ size = sizeof(connect_addr);
+ if (getsockname(listener, (struct sockaddr *) &connect_addr, &size) == -1)
+ goto tidy_up_and_fail;
+ if (size != sizeof (connect_addr))
+ goto abort_tidy_up_and_fail;
+ if (connect(connector, (struct sockaddr *) &connect_addr,
+ sizeof(connect_addr)) == -1)
+ goto tidy_up_and_fail;
+
+ size = sizeof(listen_addr);
+ acceptor = accept(listener, (struct sockaddr *) &listen_addr, &size);
+ if (acceptor < 0)
+ goto tidy_up_and_fail;
+ if (size != sizeof(listen_addr))
+ goto abort_tidy_up_and_fail;
+ /* Now check we are talking to ourself by matching port and host on the
+ two sockets. */
+ if (getsockname(connector, (struct sockaddr *) &connect_addr, &size) == -1)
+ goto tidy_up_and_fail;
+ if (size != sizeof (connect_addr)
+ || listen_addr.sin_family != connect_addr.sin_family
+ || listen_addr.sin_addr.s_addr != connect_addr.sin_addr.s_addr
+ || listen_addr.sin_port != connect_addr.sin_port)
+ goto abort_tidy_up_and_fail;
+ evutil_closesocket(listener);
+ fd[0] = connector;
+ fd[1] = acceptor;
+
+ return 0;
+
+ abort_tidy_up_and_fail:
+ saved_errno = ERR(ECONNABORTED);
+ tidy_up_and_fail:
+ if (saved_errno < 0)
+ saved_errno = EVUTIL_SOCKET_ERROR();
+ if (listener != -1)
+ evutil_closesocket(listener);
+ if (connector != -1)
+ evutil_closesocket(connector);
+ if (acceptor != -1)
+ evutil_closesocket(acceptor);
+
+ EVUTIL_SET_SOCKET_ERROR(saved_errno);
+ return -1;
+#undef ERR
+}
+
+int
+evutil_make_socket_nonblocking(evutil_socket_t fd)
+{
+#ifdef _WIN32
+ {
+ u_long nonblocking = 1;
+ if (ioctlsocket(fd, FIONBIO, &nonblocking) == SOCKET_ERROR) {
+ event_sock_warn(fd, "fcntl(%d, F_GETFL)", (int)fd);
+ return -1;
+ }
+ }
+#else
+ {
+ int flags;
+ if ((flags = fcntl(fd, F_GETFL, NULL)) < 0) {
+ event_warn("fcntl(%d, F_GETFL)", fd);
+ return -1;
+ }
+ if (!(flags & O_NONBLOCK)) {
+ if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
+ event_warn("fcntl(%d, F_SETFL)", fd);
+ return -1;
+ }
+ }
+ }
+#endif
+ return 0;
+}
+
+/* Faster version of evutil_make_socket_nonblocking for internal use.
+ *
+ * Requires that no F_SETFL flags were previously set on the fd.
+ */
+static int
+evutil_fast_socket_nonblocking(evutil_socket_t fd)
+{
+#ifdef _WIN32
+ return evutil_make_socket_nonblocking(fd);
+#else
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
+ event_warn("fcntl(%d, F_SETFL)", fd);
+ return -1;
+ }
+ return 0;
+#endif
+}
+
+int
+evutil_make_listen_socket_reuseable(evutil_socket_t sock)
+{
+#ifndef _WIN32
+ int one = 1;
+ /* REUSEADDR on Unix means, "don't hang on to this address after the
+ * listener is closed." On Windows, though, it means "don't keep other
+ * processes from binding to this address while we're using it. */
+ return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &one,
+ (ev_socklen_t)sizeof(one));
+#else
+ return 0;
+#endif
+}
+
+int
+evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock)
+{
+#if defined(EVENT__HAVE_NETINET_TCP_H) && defined(TCP_DEFER_ACCEPT)
+ int one = 1;
+
+ /* TCP_DEFER_ACCEPT tells the kernel to call defer accept() only after data
+ * has arrived and ready to read */
+ return setsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &one,
+ (ev_socklen_t)sizeof(one));
+#endif
+ return 0;
+}
+
+int
+evutil_make_socket_closeonexec(evutil_socket_t fd)
+{
+#if !defined(_WIN32) && defined(EVENT__HAVE_SETFD)
+ int flags;
+ if ((flags = fcntl(fd, F_GETFD, NULL)) < 0) {
+ event_warn("fcntl(%d, F_GETFD)", fd);
+ return -1;
+ }
+ if (!(flags & FD_CLOEXEC)) {
+ if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) {
+ event_warn("fcntl(%d, F_SETFD)", fd);
+ return -1;
+ }
+ }
+#endif
+ return 0;
+}
+
+/* Faster version of evutil_make_socket_closeonexec for internal use.
+ *
+ * Requires that no F_SETFD flags were previously set on the fd.
+ */
+static int
+evutil_fast_socket_closeonexec(evutil_socket_t fd)
+{
+#if !defined(_WIN32) && defined(EVENT__HAVE_SETFD)
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
+ event_warn("fcntl(%d, F_SETFD)", fd);
+ return -1;
+ }
+#endif
+ return 0;
+}
+
+int
+evutil_closesocket(evutil_socket_t sock)
+{
+#ifndef _WIN32
+ return close(sock);
+#else
+ return closesocket(sock);
+#endif
+}
+
+ev_int64_t
+evutil_strtoll(const char *s, char **endptr, int base)
+{
+#ifdef EVENT__HAVE_STRTOLL
+ return (ev_int64_t)strtoll(s, endptr, base);
+#elif EVENT__SIZEOF_LONG == 8
+ return (ev_int64_t)strtol(s, endptr, base);
+#elif defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1300
+ /* XXXX on old versions of MS APIs, we only support base
+ * 10. */
+ ev_int64_t r;
+ if (base != 10)
+ return 0;
+ r = (ev_int64_t) _atoi64(s);
+ while (isspace(*s))
+ ++s;
+ if (*s == '-')
+ ++s;
+ while (isdigit(*s))
+ ++s;
+ if (endptr)
+ *endptr = (char*) s;
+ return r;
+#elif defined(_WIN32)
+ return (ev_int64_t) _strtoi64(s, endptr, base);
+#elif defined(EVENT__SIZEOF_LONG_LONG) && EVENT__SIZEOF_LONG_LONG == 8
+ long long r;
+ int n;
+ if (base != 10 && base != 16)
+ return 0;
+ if (base == 10) {
+ n = sscanf(s, "%lld", &r);
+ } else {
+ unsigned long long ru=0;
+ n = sscanf(s, "%llx", &ru);
+ if (ru > EV_INT64_MAX)
+ return 0;
+ r = (long long) ru;
+ }
+ if (n != 1)
+ return 0;
+ while (EVUTIL_ISSPACE_(*s))
+ ++s;
+ if (*s == '-')
+ ++s;
+ if (base == 10) {
+ while (EVUTIL_ISDIGIT_(*s))
+ ++s;
+ } else {
+ while (EVUTIL_ISXDIGIT_(*s))
+ ++s;
+ }
+ if (endptr)
+ *endptr = (char*) s;
+ return r;
+#else
+#error "I don't know how to parse 64-bit integers."
+#endif
+}
+
+#ifdef _WIN32
+int
+evutil_socket_geterror(evutil_socket_t sock)
+{
+ int optval, optvallen=sizeof(optval);
+ int err = WSAGetLastError();
+ if (err == WSAEWOULDBLOCK && sock >= 0) {
+ if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)&optval,
+ &optvallen))
+ return err;
+ if (optval)
+ return optval;
+ }
+ return err;
+}
+#endif
+
+/* XXX we should use an enum here. */
+/* 2 for connection refused, 1 for connected, 0 for not yet, -1 for error. */
+int
+evutil_socket_connect_(evutil_socket_t *fd_ptr, struct sockaddr *sa, int socklen)
+{
+ int made_fd = 0;
+
+ if (*fd_ptr < 0) {
+ if ((*fd_ptr = socket(sa->sa_family, SOCK_STREAM, 0)) < 0)
+ goto err;
+ made_fd = 1;
+ if (evutil_make_socket_nonblocking(*fd_ptr) < 0) {
+ goto err;
+ }
+ }
+
+ if (connect(*fd_ptr, sa, socklen) < 0) {
+ int e = evutil_socket_geterror(*fd_ptr);
+ if (EVUTIL_ERR_CONNECT_RETRIABLE(e))
+ return 0;
+ if (EVUTIL_ERR_CONNECT_REFUSED(e))
+ return 2;
+ goto err;
+ } else {
+ return 1;
+ }
+
+err:
+ if (made_fd) {
+ evutil_closesocket(*fd_ptr);
+ *fd_ptr = -1;
+ }
+ return -1;
+}
+
+/* Check whether a socket on which we called connect() is done
+ connecting. Return 1 for connected, 0 for not yet, -1 for error. In the
+ error case, set the current socket errno to the error that happened during
+ the connect operation. */
+int
+evutil_socket_finished_connecting_(evutil_socket_t fd)
+{
+ int e;
+ ev_socklen_t elen = sizeof(e);
+
+ if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&e, &elen) < 0)
+ return -1;
+
+ if (e) {
+ if (EVUTIL_ERR_CONNECT_RETRIABLE(e))
+ return 0;
+ EVUTIL_SET_SOCKET_ERROR(e);
+ return -1;
+ }
+
+ return 1;
+}
+
+#if (EVUTIL_AI_PASSIVE|EVUTIL_AI_CANONNAME|EVUTIL_AI_NUMERICHOST| \
+ EVUTIL_AI_NUMERICSERV|EVUTIL_AI_V4MAPPED|EVUTIL_AI_ALL| \
+ EVUTIL_AI_ADDRCONFIG) != \
+ (EVUTIL_AI_PASSIVE^EVUTIL_AI_CANONNAME^EVUTIL_AI_NUMERICHOST^ \
+ EVUTIL_AI_NUMERICSERV^EVUTIL_AI_V4MAPPED^EVUTIL_AI_ALL^ \
+ EVUTIL_AI_ADDRCONFIG)
+#error "Some of our EVUTIL_AI_* flags seem to overlap with system AI_* flags"
+#endif
+
+/* We sometimes need to know whether we have an ipv4 address and whether we
+ have an ipv6 address. If 'have_checked_interfaces', then we've already done
+ the test. If 'had_ipv4_address', then it turns out we had an ipv4 address.
+ If 'had_ipv6_address', then it turns out we had an ipv6 address. These are
+ set by evutil_check_interfaces. */
+static int have_checked_interfaces, had_ipv4_address, had_ipv6_address;
+
+/* Macro: True iff the IPv4 address 'addr', in host order, is in 127.0.0.0/8
+ */
+#define EVUTIL_V4ADDR_IS_LOCALHOST(addr) (((addr)>>24) == 127)
+
+/* Macro: True iff the IPv4 address 'addr', in host order, is a class D
+ * (multiclass) address.
+ */
+#define EVUTIL_V4ADDR_IS_CLASSD(addr) ((((addr)>>24) & 0xf0) == 0xe0)
+
+static void
+evutil_found_ifaddr(const struct sockaddr *sa)
+{
+ const char ZEROES[] = "\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+ if (sa->sa_family == AF_INET) {
+ const struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+ ev_uint32_t addr = ntohl(sin->sin_addr.s_addr);
+ if (addr == 0 ||
+ EVUTIL_V4ADDR_IS_LOCALHOST(addr) ||
+ EVUTIL_V4ADDR_IS_CLASSD(addr)) {
+ /* Not actually a usable external address. */
+ } else {
+ event_debug(("Detected an IPv4 interface"));
+ had_ipv4_address = 1;
+ }
+ } else if (sa->sa_family == AF_INET6) {
+ const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
+ const unsigned char *addr =
+ (unsigned char*)sin6->sin6_addr.s6_addr;
+ if (!memcmp(addr, ZEROES, 8) ||
+ ((addr[0] & 0xfe) == 0xfc) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0x80) ||
+ (addr[0] == 0xfe && (addr[1] & 0xc0) == 0xc0) ||
+ (addr[0] == 0xff)) {
+ /* This is a reserved, ipv4compat, ipv4map, loopback,
+ * link-local, multicast, or unspecified address. */
+ } else {
+ event_debug(("Detected an IPv6 interface"));
+ had_ipv6_address = 1;
+ }
+ }
+}
+
+#ifdef _WIN32
+typedef ULONG (WINAPI *GetAdaptersAddresses_fn_t)(
+ ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG);
+#endif
+
+static int
+evutil_check_ifaddrs(void)
+{
+#if defined(EVENT__HAVE_GETIFADDRS)
+ /* Most free Unixy systems provide getifaddrs, which gives us a linked list
+ * of struct ifaddrs. */
+ struct ifaddrs *ifa = NULL;
+ const struct ifaddrs *i;
+ if (getifaddrs(&ifa) < 0) {
+ event_warn("Unable to call getifaddrs()");
+ return -1;
+ }
+
+ for (i = ifa; i; i = i->ifa_next) {
+ if (!i->ifa_addr)
+ continue;
+ evutil_found_ifaddr(i->ifa_addr);
+ }
+
+ freeifaddrs(ifa);
+ return 0;
+#elif defined(_WIN32)
+ /* Windows XP began to provide GetAdaptersAddresses. Windows 2000 had a
+ "GetAdaptersInfo", but that's deprecated; let's just try
+ GetAdaptersAddresses and fall back to connect+getsockname.
+ */
+ HANDLE lib = evutil_load_windows_system_library_(TEXT("ihplapi.dll"));
+ GetAdaptersAddresses_fn_t fn;
+ ULONG size, res;
+ IP_ADAPTER_ADDRESSES *addresses = NULL, *address;
+ int result = -1;
+
+#define FLAGS (GAA_FLAG_SKIP_ANYCAST | \
+ GAA_FLAG_SKIP_MULTICAST | \
+ GAA_FLAG_SKIP_DNS_SERVER)
+
+ if (!lib)
+ goto done;
+
+ if (!(fn = (GetAdaptersAddresses_fn_t) GetProcAddress(lib, "GetAdaptersAddresses")))
+ goto done;
+
+ /* Guess how much space we need. */
+ size = 15*1024;
+ addresses = mm_malloc(size);
+ if (!addresses)
+ goto done;
+ res = fn(AF_UNSPEC, FLAGS, NULL, addresses, &size);
+ if (res == ERROR_BUFFER_OVERFLOW) {
+ /* we didn't guess that we needed enough space; try again */
+ mm_free(addresses);
+ addresses = mm_malloc(size);
+ if (!addresses)
+ goto done;
+ res = fn(AF_UNSPEC, FLAGS, NULL, addresses, &size);
+ }
+ if (res != NO_ERROR)
+ goto done;
+
+ for (address = addresses; address; address = address->Next) {
+ IP_ADAPTER_UNICAST_ADDRESS *a;
+ for (a = address->FirstUnicastAddress; a; a = a->Next) {
+ /* Yes, it's a linked list inside a linked list */
+ struct sockaddr *sa = a->Address.lpSockaddr;
+ evutil_found_ifaddr(sa);
+ }
+ }
+
+ result = 0;
+done:
+ if (lib)
+ FreeLibrary(lib);
+ if (addresses)
+ mm_free(addresses);
+ return result;
+#else
+ return -1;
+#endif
+}
+
+/* Test whether we have an ipv4 interface and an ipv6 interface. Return 0 if
+ * the test seemed successful. */
+static int
+evutil_check_interfaces(int force_recheck)
+{
+ evutil_socket_t fd = -1;
+ struct sockaddr_in sin, sin_out;
+ struct sockaddr_in6 sin6, sin6_out;
+ ev_socklen_t sin_out_len = sizeof(sin_out);
+ ev_socklen_t sin6_out_len = sizeof(sin6_out);
+ int r;
+ if (have_checked_interfaces && !force_recheck)
+ return 0;
+
+ if (evutil_check_ifaddrs() == 0) {
+ /* Use a nice sane interface, if this system has one. */
+ return 0;
+ }
+
+ /* Ugh. There was no nice sane interface. So to check whether we have
+ * an interface open for a given protocol, will try to make a UDP
+ * 'connection' to a remote host on the internet. We don't actually
+ * use it, so the address doesn't matter, but we want to pick one that
+ * keep us from using a host- or link-local interface. */
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(53);
+ r = evutil_inet_pton(AF_INET, "18.244.0.188", &sin.sin_addr);
+ EVUTIL_ASSERT(r);
+
+ memset(&sin6, 0, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(53);
+ r = evutil_inet_pton(AF_INET6, "2001:4860:b002::68", &sin6.sin6_addr);
+ EVUTIL_ASSERT(r);
+
+ memset(&sin_out, 0, sizeof(sin_out));
+ memset(&sin6_out, 0, sizeof(sin6_out));
+
+ /* XXX some errnos mean 'no address'; some mean 'not enough sockets'. */
+ if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) >= 0 &&
+ connect(fd, (struct sockaddr*)&sin, sizeof(sin)) == 0 &&
+ getsockname(fd, (struct sockaddr*)&sin_out, &sin_out_len) == 0) {
+ /* We might have an IPv4 interface. */
+ evutil_found_ifaddr((struct sockaddr*) &sin_out);
+ }
+ if (fd >= 0)
+ evutil_closesocket(fd);
+
+ if ((fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP)) >= 0 &&
+ connect(fd, (struct sockaddr*)&sin6, sizeof(sin6)) == 0 &&
+ getsockname(fd, (struct sockaddr*)&sin6_out, &sin6_out_len) == 0) {
+ /* We might have an IPv6 interface. */
+ evutil_found_ifaddr((struct sockaddr*) &sin6_out);
+ }
+
+ if (fd >= 0)
+ evutil_closesocket(fd);
+
+ return 0;
+}
+
+/* Internal addrinfo flag. This one is set when we allocate the addrinfo from
+ * inside libevent. Otherwise, the built-in getaddrinfo() function allocated
+ * it, and we should trust what they said.
+ **/
+#define EVUTIL_AI_LIBEVENT_ALLOCATED 0x80000000
+
+/* Helper: construct a new addrinfo containing the socket address in
+ * 'sa', which must be a sockaddr_in or a sockaddr_in6. Take the
+ * socktype and protocol info from hints. If they weren't set, then
+ * allocate both a TCP and a UDP addrinfo.
+ */
+struct evutil_addrinfo *
+evutil_new_addrinfo_(struct sockaddr *sa, ev_socklen_t socklen,
+ const struct evutil_addrinfo *hints)
+{
+ struct evutil_addrinfo *res;
+ EVUTIL_ASSERT(hints);
+
+ if (hints->ai_socktype == 0 && hints->ai_protocol == 0) {
+ /* Indecisive user! Give them a UDP and a TCP. */
+ struct evutil_addrinfo *r1, *r2;
+ struct evutil_addrinfo tmp;
+ memcpy(&tmp, hints, sizeof(tmp));
+ tmp.ai_socktype = SOCK_STREAM; tmp.ai_protocol = IPPROTO_TCP;
+ r1 = evutil_new_addrinfo_(sa, socklen, &tmp);
+ if (!r1)
+ return NULL;
+ tmp.ai_socktype = SOCK_DGRAM; tmp.ai_protocol = IPPROTO_UDP;
+ r2 = evutil_new_addrinfo_(sa, socklen, &tmp);
+ if (!r2) {
+ evutil_freeaddrinfo(r1);
+ return NULL;
+ }
+ r1->ai_next = r2;
+ return r1;
+ }
+
+ /* We're going to allocate extra space to hold the sockaddr. */
+ res = mm_calloc(1,sizeof(struct evutil_addrinfo)+socklen);
+ if (!res)
+ return NULL;
+ res->ai_addr = (struct sockaddr*)
+ (((char*)res) + sizeof(struct evutil_addrinfo));
+ memcpy(res->ai_addr, sa, socklen);
+ res->ai_addrlen = socklen;
+ res->ai_family = sa->sa_family; /* Same or not? XXX */
+ res->ai_flags = EVUTIL_AI_LIBEVENT_ALLOCATED;
+ res->ai_socktype = hints->ai_socktype;
+ res->ai_protocol = hints->ai_protocol;
+
+ return res;
+}
+
+/* Append the addrinfo 'append' to the end of 'first', and return the start of
+ * the list. Either element can be NULL, in which case we return the element
+ * that is not NULL. */
+struct evutil_addrinfo *
+evutil_addrinfo_append_(struct evutil_addrinfo *first,
+ struct evutil_addrinfo *append)
+{
+ struct evutil_addrinfo *ai = first;
+ if (!ai)
+ return append;
+ while (ai->ai_next)
+ ai = ai->ai_next;
+ ai->ai_next = append;
+
+ return first;
+}
+
+static int
+parse_numeric_servname(const char *servname)
+{
+ int n;
+ char *endptr=NULL;
+ n = (int) strtol(servname, &endptr, 10);
+ if (n>=0 && n <= 65535 && servname[0] && endptr && !endptr[0])
+ return n;
+ else
+ return -1;
+}
+
+/** Parse a service name in 'servname', which can be a decimal port.
+ * Return the port number, or -1 on error.
+ */
+static int
+evutil_parse_servname(const char *servname, const char *protocol,
+ const struct evutil_addrinfo *hints)
+{
+ int n = parse_numeric_servname(servname);
+ if (n>=0)
+ return n;
+#if defined(EVENT__HAVE_GETSERVBYNAME) || defined(_WIN32)
+ if (!(hints->ai_flags & EVUTIL_AI_NUMERICSERV)) {
+ struct servent *ent = getservbyname(servname, protocol);
+ if (ent) {
+ return ntohs(ent->s_port);
+ }
+ }
+#endif
+ return -1;
+}
+
+/* Return a string corresponding to a protocol number that we can pass to
+ * getservyname. */
+static const char *
+evutil_unparse_protoname(int proto)
+{
+ switch (proto) {
+ case 0:
+ return NULL;
+ case IPPROTO_TCP:
+ return "tcp";
+ case IPPROTO_UDP:
+ return "udp";
+#ifdef IPPROTO_SCTP
+ case IPPROTO_SCTP:
+ return "sctp";
+#endif
+ default:
+#ifdef EVENT__HAVE_GETPROTOBYNUMBER
+ {
+ struct protoent *ent = getprotobynumber(proto);
+ if (ent)
+ return ent->p_name;
+ }
+#endif
+ return NULL;
+ }
+}
+
+static void
+evutil_getaddrinfo_infer_protocols(struct evutil_addrinfo *hints)
+{
+ /* If we can guess the protocol from the socktype, do so. */
+ if (!hints->ai_protocol && hints->ai_socktype) {
+ if (hints->ai_socktype == SOCK_DGRAM)
+ hints->ai_protocol = IPPROTO_UDP;
+ else if (hints->ai_socktype == SOCK_STREAM)
+ hints->ai_protocol = IPPROTO_TCP;
+ }
+
+ /* Set the socktype if it isn't set. */
+ if (!hints->ai_socktype && hints->ai_protocol) {
+ if (hints->ai_protocol == IPPROTO_UDP)
+ hints->ai_socktype = SOCK_DGRAM;
+ else if (hints->ai_protocol == IPPROTO_TCP)
+ hints->ai_socktype = SOCK_STREAM;
+#ifdef IPPROTO_SCTP
+ else if (hints->ai_protocol == IPPROTO_SCTP)
+ hints->ai_socktype = SOCK_STREAM;
+#endif
+ }
+}
+
+#if AF_UNSPEC != PF_UNSPEC
+#error "I cannot build on a system where AF_UNSPEC != PF_UNSPEC"
+#endif
+
+/** Implements the part of looking up hosts by name that's common to both
+ * the blocking and nonblocking resolver:
+ * - Adjust 'hints' to have a reasonable socktype and protocol.
+ * - Look up the port based on 'servname', and store it in *portnum,
+ * - Handle the nodename==NULL case
+ * - Handle some invalid arguments cases.
+ * - Handle the cases where nodename is an IPv4 or IPv6 address.
+ *
+ * If we need the resolver to look up the hostname, we return
+ * EVUTIL_EAI_NEED_RESOLVE. Otherwise, we can completely implement
+ * getaddrinfo: we return 0 or an appropriate EVUTIL_EAI_* error, and
+ * set *res as getaddrinfo would.
+ */
+int
+evutil_getaddrinfo_common_(const char *nodename, const char *servname,
+ struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum)
+{
+ int port = 0;
+ const char *pname;
+
+ if (nodename == NULL && servname == NULL)
+ return EVUTIL_EAI_NONAME;
+
+ /* We only understand 3 families */
+ if (hints->ai_family != PF_UNSPEC && hints->ai_family != PF_INET &&
+ hints->ai_family != PF_INET6)
+ return EVUTIL_EAI_FAMILY;
+
+ evutil_getaddrinfo_infer_protocols(hints);
+
+ /* Look up the port number and protocol, if possible. */
+ pname = evutil_unparse_protoname(hints->ai_protocol);
+ if (servname) {
+ /* XXXX We could look at the protocol we got back from
+ * getservbyname, but it doesn't seem too useful. */
+ port = evutil_parse_servname(servname, pname, hints);
+ if (port < 0) {
+ return EVUTIL_EAI_NONAME;
+ }
+ }
+
+ /* If we have no node name, then we're supposed to bind to 'any' and
+ * connect to localhost. */
+ if (nodename == NULL) {
+ struct evutil_addrinfo *res4=NULL, *res6=NULL;
+ if (hints->ai_family != PF_INET) { /* INET6 or UNSPEC. */
+ struct sockaddr_in6 sin6;
+ memset(&sin6, 0, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(port);
+ if (hints->ai_flags & EVUTIL_AI_PASSIVE) {
+ /* Bind to :: */
+ } else {
+ /* connect to ::1 */
+ sin6.sin6_addr.s6_addr[15] = 1;
+ }
+ res6 = evutil_new_addrinfo_((struct sockaddr*)&sin6,
+ sizeof(sin6), hints);
+ if (!res6)
+ return EVUTIL_EAI_MEMORY;
+ }
+
+ if (hints->ai_family != PF_INET6) { /* INET or UNSPEC */
+ struct sockaddr_in sin;
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(port);
+ if (hints->ai_flags & EVUTIL_AI_PASSIVE) {
+ /* Bind to 0.0.0.0 */
+ } else {
+ /* connect to 127.0.0.1 */
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+ }
+ res4 = evutil_new_addrinfo_((struct sockaddr*)&sin,
+ sizeof(sin), hints);
+ if (!res4) {
+ if (res6)
+ evutil_freeaddrinfo(res6);
+ return EVUTIL_EAI_MEMORY;
+ }
+ }
+ *res = evutil_addrinfo_append_(res4, res6);
+ return 0;
+ }
+
+ /* If we can, we should try to parse the hostname without resolving
+ * it. */
+ /* Try ipv6. */
+ if (hints->ai_family == PF_INET6 || hints->ai_family == PF_UNSPEC) {
+ struct sockaddr_in6 sin6;
+ memset(&sin6, 0, sizeof(sin6));
+ if (1==evutil_inet_pton(AF_INET6, nodename, &sin6.sin6_addr)) {
+ /* Got an ipv6 address. */
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(port);
+ *res = evutil_new_addrinfo_((struct sockaddr*)&sin6,
+ sizeof(sin6), hints);
+ if (!*res)
+ return EVUTIL_EAI_MEMORY;
+ return 0;
+ }
+ }
+
+ /* Try ipv4. */
+ if (hints->ai_family == PF_INET || hints->ai_family == PF_UNSPEC) {
+ struct sockaddr_in sin;
+ memset(&sin, 0, sizeof(sin));
+ if (1==evutil_inet_pton(AF_INET, nodename, &sin.sin_addr)) {
+ /* Got an ipv6 address. */
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(port);
+ *res = evutil_new_addrinfo_((struct sockaddr*)&sin,
+ sizeof(sin), hints);
+ if (!*res)
+ return EVUTIL_EAI_MEMORY;
+ return 0;
+ }
+ }
+
+
+ /* If we have reached this point, we definitely need to do a DNS
+ * lookup. */
+ if ((hints->ai_flags & EVUTIL_AI_NUMERICHOST)) {
+ /* If we're not allowed to do one, then say so. */
+ return EVUTIL_EAI_NONAME;
+ }
+ *portnum = port;
+ return EVUTIL_EAI_NEED_RESOLVE;
+}
+
+#ifdef EVENT__HAVE_GETADDRINFO
+#define USE_NATIVE_GETADDRINFO
+#endif
+
+#ifdef USE_NATIVE_GETADDRINFO
+/* A mask of all the flags that we declare, so we can clear them before calling
+ * the native getaddrinfo */
+static const unsigned int ALL_NONNATIVE_AI_FLAGS =
+#ifndef AI_PASSIVE
+ EVUTIL_AI_PASSIVE |
+#endif
+#ifndef AI_CANONNAME
+ EVUTIL_AI_CANONNAME |
+#endif
+#ifndef AI_NUMERICHOST
+ EVUTIL_AI_NUMERICHOST |
+#endif
+#ifndef AI_NUMERICSERV
+ EVUTIL_AI_NUMERICSERV |
+#endif
+#ifndef AI_ADDRCONFIG
+ EVUTIL_AI_ADDRCONFIG |
+#endif
+#ifndef AI_ALL
+ EVUTIL_AI_ALL |
+#endif
+#ifndef AI_V4MAPPED
+ EVUTIL_AI_V4MAPPED |
+#endif
+ EVUTIL_AI_LIBEVENT_ALLOCATED;
+
+static const unsigned int ALL_NATIVE_AI_FLAGS =
+#ifdef AI_PASSIVE
+ AI_PASSIVE |
+#endif
+#ifdef AI_CANONNAME
+ AI_CANONNAME |
+#endif
+#ifdef AI_NUMERICHOST
+ AI_NUMERICHOST |
+#endif
+#ifdef AI_NUMERICSERV
+ AI_NUMERICSERV |
+#endif
+#ifdef AI_ADDRCONFIG
+ AI_ADDRCONFIG |
+#endif
+#ifdef AI_ALL
+ AI_ALL |
+#endif
+#ifdef AI_V4MAPPED
+ AI_V4MAPPED |
+#endif
+ 0;
+#endif
+
+#ifndef USE_NATIVE_GETADDRINFO
+/* Helper for systems with no getaddrinfo(): make one or more addrinfos out of
+ * a struct hostent.
+ */
+static struct evutil_addrinfo *
+addrinfo_from_hostent(const struct hostent *ent,
+ int port, const struct evutil_addrinfo *hints)
+{
+ int i;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ struct sockaddr *sa;
+ int socklen;
+ struct evutil_addrinfo *res=NULL, *ai;
+ void *addrp;
+
+ if (ent->h_addrtype == PF_INET) {
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(port);
+ sa = (struct sockaddr *)&sin;
+ socklen = sizeof(struct sockaddr_in);
+ addrp = &sin.sin_addr;
+ if (ent->h_length != sizeof(sin.sin_addr)) {
+ event_warnx("Weird h_length from gethostbyname");
+ return NULL;
+ }
+ } else if (ent->h_addrtype == PF_INET6) {
+ memset(&sin6, 0, sizeof(sin6));
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(port);
+ sa = (struct sockaddr *)&sin6;
+ socklen = sizeof(struct sockaddr_in);
+ addrp = &sin6.sin6_addr;
+ if (ent->h_length != sizeof(sin6.sin6_addr)) {
+ event_warnx("Weird h_length from gethostbyname");
+ return NULL;
+ }
+ } else
+ return NULL;
+
+ for (i = 0; ent->h_addr_list[i]; ++i) {
+ memcpy(addrp, ent->h_addr_list[i], ent->h_length);
+ ai = evutil_new_addrinfo_(sa, socklen, hints);
+ if (!ai) {
+ evutil_freeaddrinfo(res);
+ return NULL;
+ }
+ res = evutil_addrinfo_append_(res, ai);
+ }
+
+ if (res && ((hints->ai_flags & EVUTIL_AI_CANONNAME) && ent->h_name)) {
+ res->ai_canonname = mm_strdup(ent->h_name);
+ if (res->ai_canonname == NULL) {
+ evutil_freeaddrinfo(res);
+ return NULL;
+ }
+ }
+
+ return res;
+}
+#endif
+
+/* If the EVUTIL_AI_ADDRCONFIG flag is set on hints->ai_flags, and
+ * hints->ai_family is PF_UNSPEC, then revise the value of hints->ai_family so
+ * that we'll only get addresses we could maybe connect to.
+ */
+void
+evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints)
+{
+ if (!(hints->ai_flags & EVUTIL_AI_ADDRCONFIG))
+ return;
+ if (hints->ai_family != PF_UNSPEC)
+ return;
+ if (!have_checked_interfaces)
+ evutil_check_interfaces(0);
+ if (had_ipv4_address && !had_ipv6_address) {
+ hints->ai_family = PF_INET;
+ } else if (!had_ipv4_address && had_ipv6_address) {
+ hints->ai_family = PF_INET6;
+ }
+}
+
+#ifdef USE_NATIVE_GETADDRINFO
+static int need_numeric_port_hack_=0;
+static int need_socktype_protocol_hack_=0;
+static int tested_for_getaddrinfo_hacks=0;
+
+/* Some older BSDs (like OpenBSD up to 4.6) used to believe that
+ giving a numeric port without giving an ai_socktype was verboten.
+ We test for this so we can apply an appropriate workaround. If it
+ turns out that the bug is present, then:
+
+ - If nodename==NULL and servname is numeric, we build an answer
+ ourselves using evutil_getaddrinfo_common_().
+
+ - If nodename!=NULL and servname is numeric, then we set
+ servname=NULL when calling getaddrinfo, and post-process the
+ result to set the ports on it.
+
+ We test for this bug at runtime, since otherwise we can't have the
+ same binary run on multiple BSD versions.
+
+ - Some versions of Solaris believe that it's nice to leave to protocol
+ field set to 0. We test for this so we can apply an appropriate
+ workaround.
+*/
+static void
+test_for_getaddrinfo_hacks(void)
+{
+ int r, r2;
+ struct evutil_addrinfo *ai=NULL, *ai2=NULL;
+ struct evutil_addrinfo hints;
+
+ memset(&hints,0,sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_flags =
+#ifdef AI_NUMERICHOST
+ AI_NUMERICHOST |
+#endif
+#ifdef AI_NUMERICSERV
+ AI_NUMERICSERV |
+#endif
+ 0;
+ r = getaddrinfo("1.2.3.4", "80", &hints, &ai);
+ hints.ai_socktype = SOCK_STREAM;
+ r2 = getaddrinfo("1.2.3.4", "80", &hints, &ai2);
+ if (r2 == 0 && r != 0) {
+ need_numeric_port_hack_=1;
+ }
+ if (ai2 && ai2->ai_protocol == 0) {
+ need_socktype_protocol_hack_=1;
+ }
+
+ if (ai)
+ freeaddrinfo(ai);
+ if (ai2)
+ freeaddrinfo(ai2);
+ tested_for_getaddrinfo_hacks=1;
+}
+
+static inline int
+need_numeric_port_hack(void)
+{
+ if (!tested_for_getaddrinfo_hacks)
+ test_for_getaddrinfo_hacks();
+ return need_numeric_port_hack_;
+}
+
+static inline int
+need_socktype_protocol_hack(void)
+{
+ if (!tested_for_getaddrinfo_hacks)
+ test_for_getaddrinfo_hacks();
+ return need_socktype_protocol_hack_;
+}
+
+static void
+apply_numeric_port_hack(int port, struct evutil_addrinfo **ai)
+{
+ /* Now we run through the list and set the ports on all of the
+ * results where ports would make sense. */
+ for ( ; *ai; ai = &(*ai)->ai_next) {
+ struct sockaddr *sa = (*ai)->ai_addr;
+ if (sa && sa->sa_family == AF_INET) {
+ struct sockaddr_in *sin = (struct sockaddr_in*)sa;
+ sin->sin_port = htons(port);
+ } else if (sa && sa->sa_family == AF_INET6) {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)sa;
+ sin6->sin6_port = htons(port);
+ } else {
+ /* A numeric port makes no sense here; remove this one
+ * from the list. */
+ struct evutil_addrinfo *victim = *ai;
+ *ai = victim->ai_next;
+ victim->ai_next = NULL;
+ freeaddrinfo(victim);
+ }
+ }
+}
+
+static int
+apply_socktype_protocol_hack(struct evutil_addrinfo *ai)
+{
+ struct evutil_addrinfo *ai_new;
+ for (; ai; ai = ai->ai_next) {
+ evutil_getaddrinfo_infer_protocols(ai);
+ if (ai->ai_socktype || ai->ai_protocol)
+ continue;
+ ai_new = mm_malloc(sizeof(*ai_new));
+ if (!ai_new)
+ return -1;
+ memcpy(ai_new, ai, sizeof(*ai_new));
+ ai->ai_socktype = SOCK_STREAM;
+ ai->ai_protocol = IPPROTO_TCP;
+ ai_new->ai_socktype = SOCK_DGRAM;
+ ai_new->ai_protocol = IPPROTO_UDP;
+
+ ai_new->ai_next = ai->ai_next;
+ ai->ai_next = ai_new;
+ }
+ return 0;
+}
+#endif
+
+int
+evutil_getaddrinfo(const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res)
+{
+#ifdef USE_NATIVE_GETADDRINFO
+ struct evutil_addrinfo hints;
+ int portnum=-1, need_np_hack, err;
+
+ if (hints_in) {
+ memcpy(&hints, hints_in, sizeof(hints));
+ } else {
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ }
+
+#ifndef AI_ADDRCONFIG
+ /* Not every system has AI_ADDRCONFIG, so fake it. */
+ if (hints.ai_family == PF_UNSPEC &&
+ (hints.ai_flags & EVUTIL_AI_ADDRCONFIG)) {
+ evutil_adjust_hints_for_addrconfig_(&hints);
+ }
+#endif
+
+#ifndef AI_NUMERICSERV
+ /* Not every system has AI_NUMERICSERV, so fake it. */
+ if (hints.ai_flags & EVUTIL_AI_NUMERICSERV) {
+ if (servname && parse_numeric_servname(servname)<0)
+ return EVUTIL_EAI_NONAME;
+ }
+#endif
+
+ /* Enough operating systems handle enough common non-resolve
+ * cases here weirdly enough that we are better off just
+ * overriding them. For example:
+ *
+ * - Windows doesn't like to infer the protocol from the
+ * socket type, or fill in socket or protocol types much at
+ * all. It also seems to do its own broken implicit
+ * always-on version of AI_ADDRCONFIG that keeps it from
+ * ever resolving even a literal IPv6 address when
+ * ai_addrtype is PF_UNSPEC.
+ */
+#ifdef _WIN32
+ {
+ int tmp_port;
+ err = evutil_getaddrinfo_common_(nodename,servname,&hints,
+ res, &tmp_port);
+ if (err == 0 ||
+ err == EVUTIL_EAI_MEMORY ||
+ err == EVUTIL_EAI_NONAME)
+ return err;
+ /* If we make it here, the system getaddrinfo can
+ * have a crack at it. */
+ }
+#endif
+
+ /* See documentation for need_numeric_port_hack above.*/
+ need_np_hack = need_numeric_port_hack() && servname && !hints.ai_socktype
+ && ((portnum=parse_numeric_servname(servname)) >= 0);
+ if (need_np_hack) {
+ if (!nodename)
+ return evutil_getaddrinfo_common_(
+ NULL,servname,&hints, res, &portnum);
+ servname = NULL;
+ }
+
+ if (need_socktype_protocol_hack()) {
+ evutil_getaddrinfo_infer_protocols(&hints);
+ }
+
+ /* Make sure that we didn't actually steal any AI_FLAGS values that
+ * the system is using. (This is a constant expression, and should ge
+ * optimized out.)
+ *
+ * XXXX Turn this into a compile-time failure rather than a run-time
+ * failure.
+ */
+ EVUTIL_ASSERT((ALL_NONNATIVE_AI_FLAGS & ALL_NATIVE_AI_FLAGS) == 0);
+
+ /* Clear any flags that only libevent understands. */
+ hints.ai_flags &= ~ALL_NONNATIVE_AI_FLAGS;
+
+ err = getaddrinfo(nodename, servname, &hints, res);
+ if (need_np_hack)
+ apply_numeric_port_hack(portnum, res);
+
+ if (need_socktype_protocol_hack()) {
+ if (apply_socktype_protocol_hack(*res) < 0) {
+ evutil_freeaddrinfo(*res);
+ *res = NULL;
+ return EVUTIL_EAI_MEMORY;
+ }
+ }
+ return err;
+#else
+ int port=0, err;
+ struct hostent *ent = NULL;
+ struct evutil_addrinfo hints;
+
+ if (hints_in) {
+ memcpy(&hints, hints_in, sizeof(hints));
+ } else {
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ }
+
+ evutil_adjust_hints_for_addrconfig_(&hints);
+
+ err = evutil_getaddrinfo_common_(nodename, servname, &hints, res, &port);
+ if (err != EVUTIL_EAI_NEED_RESOLVE) {
+ /* We either succeeded or failed. No need to continue */
+ return err;
+ }
+
+ err = 0;
+ /* Use any of the various gethostbyname_r variants as available. */
+ {
+#ifdef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG
+ /* This one is what glibc provides. */
+ char buf[2048];
+ struct hostent hostent;
+ int r;
+ r = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), &ent,
+ &err);
+#elif defined(EVENT__HAVE_GETHOSTBYNAME_R_5_ARG)
+ char buf[2048];
+ struct hostent hostent;
+ ent = gethostbyname_r(nodename, &hostent, buf, sizeof(buf),
+ &err);
+#elif defined(EVENT__HAVE_GETHOSTBYNAME_R_3_ARG)
+ struct hostent_data data;
+ struct hostent hostent;
+ memset(&data, 0, sizeof(data));
+ err = gethostbyname_r(nodename, &hostent, &data);
+ ent = err ? NULL : &hostent;
+#else
+ /* fall back to gethostbyname. */
+ /* XXXX This needs a lock everywhere but Windows. */
+ ent = gethostbyname(nodename);
+#ifdef _WIN32
+ err = WSAGetLastError();
+#else
+ err = h_errno;
+#endif
+#endif
+
+ /* Now we have either ent or err set. */
+ if (!ent) {
+ /* XXX is this right for windows ? */
+ switch (err) {
+ case TRY_AGAIN:
+ return EVUTIL_EAI_AGAIN;
+ case NO_RECOVERY:
+ default:
+ return EVUTIL_EAI_FAIL;
+ case HOST_NOT_FOUND:
+ return EVUTIL_EAI_NONAME;
+ case NO_ADDRESS:
+#if NO_DATA != NO_ADDRESS
+ case NO_DATA:
+#endif
+ return EVUTIL_EAI_NODATA;
+ }
+ }
+
+ if (ent->h_addrtype != hints.ai_family &&
+ hints.ai_family != PF_UNSPEC) {
+ /* This wasn't the type we were hoping for. Too bad
+ * we never had a chance to ask gethostbyname for what
+ * we wanted. */
+ return EVUTIL_EAI_NONAME;
+ }
+
+ /* Make sure we got _some_ answers. */
+ if (ent->h_length == 0)
+ return EVUTIL_EAI_NODATA;
+
+ /* If we got an address type we don't know how to make a
+ sockaddr for, give up. */
+ if (ent->h_addrtype != PF_INET && ent->h_addrtype != PF_INET6)
+ return EVUTIL_EAI_FAMILY;
+
+ *res = addrinfo_from_hostent(ent, port, &hints);
+ if (! *res)
+ return EVUTIL_EAI_MEMORY;
+ }
+
+ return 0;
+#endif
+}
+
+void
+evutil_freeaddrinfo(struct evutil_addrinfo *ai)
+{
+#ifdef EVENT__HAVE_GETADDRINFO
+ if (!(ai->ai_flags & EVUTIL_AI_LIBEVENT_ALLOCATED)) {
+ freeaddrinfo(ai);
+ return;
+ }
+#endif
+ while (ai) {
+ struct evutil_addrinfo *next = ai->ai_next;
+ if (ai->ai_canonname)
+ mm_free(ai->ai_canonname);
+ mm_free(ai);
+ ai = next;
+ }
+}
+
+static evdns_getaddrinfo_fn evdns_getaddrinfo_impl = NULL;
+
+void
+evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn)
+{
+ if (!evdns_getaddrinfo_impl)
+ evdns_getaddrinfo_impl = fn;
+}
+
+/* Internal helper function: act like evdns_getaddrinfo if dns_base is set;
+ * otherwise do a blocking resolve and pass the result to the callback in the
+ * way that evdns_getaddrinfo would.
+ */
+int
+evutil_getaddrinfo_async_(struct evdns_base *dns_base,
+ const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in,
+ void (*cb)(int, struct evutil_addrinfo *, void *), void *arg)
+{
+ if (dns_base && evdns_getaddrinfo_impl) {
+ evdns_getaddrinfo_impl(
+ dns_base, nodename, servname, hints_in, cb, arg);
+ } else {
+ struct evutil_addrinfo *ai=NULL;
+ int err;
+ err = evutil_getaddrinfo(nodename, servname, hints_in, &ai);
+ cb(err, ai, arg);
+ }
+ return 0;
+}
+
+const char *
+evutil_gai_strerror(int err)
+{
+ /* As a sneaky side-benefit, this case statement will get most
+ * compilers to tell us if any of the error codes we defined
+ * conflict with the platform's native error codes. */
+ switch (err) {
+ case EVUTIL_EAI_CANCEL:
+ return "Request canceled";
+ case 0:
+ return "No error";
+
+ case EVUTIL_EAI_ADDRFAMILY:
+ return "address family for nodename not supported";
+ case EVUTIL_EAI_AGAIN:
+ return "temporary failure in name resolution";
+ case EVUTIL_EAI_BADFLAGS:
+ return "invalid value for ai_flags";
+ case EVUTIL_EAI_FAIL:
+ return "non-recoverable failure in name resolution";
+ case EVUTIL_EAI_FAMILY:
+ return "ai_family not supported";
+ case EVUTIL_EAI_MEMORY:
+ return "memory allocation failure";
+ case EVUTIL_EAI_NODATA:
+ return "no address associated with nodename";
+ case EVUTIL_EAI_NONAME:
+ return "nodename nor servname provided, or not known";
+ case EVUTIL_EAI_SERVICE:
+ return "servname not supported for ai_socktype";
+ case EVUTIL_EAI_SOCKTYPE:
+ return "ai_socktype not supported";
+ case EVUTIL_EAI_SYSTEM:
+ return "system error";
+ default:
+#if defined(USE_NATIVE_GETADDRINFO) && defined(_WIN32)
+ return gai_strerrorA(err);
+#elif defined(USE_NATIVE_GETADDRINFO)
+ return gai_strerror(err);
+#else
+ return "Unknown error code";
+#endif
+ }
+}
+
+#ifdef _WIN32
+/* destructively remove a trailing line terminator from s */
+static void
+chomp (char *s)
+{
+ size_t len;
+ if (s && (len = strlen (s)) > 0 && s[len - 1] == '\n') {
+ s[--len] = 0;
+ if (len > 0 && s[len - 1] == '\r')
+ s[--len] = 0;
+ }
+}
+
+/* FormatMessage returns allocated strings, but evutil_socket_error_to_string
+ * is supposed to return a string which is good indefinitely without having
+ * to be freed. To make this work without leaking memory, we cache the
+ * string the first time FormatMessage is called on a particular error
+ * code, and then return the cached string on subsequent calls with the
+ * same code. The strings aren't freed until libevent_global_shutdown
+ * (or never). We use a linked list to cache the errors, because we
+ * only expect there to be a few dozen, and that should be fast enough.
+ */
+
+struct cached_sock_errs_entry {
+ HT_ENTRY(cached_sock_errs_entry) node;
+ DWORD code;
+ char *msg; /* allocated with LocalAlloc; free with LocalFree */
+};
+
+static inline unsigned
+hash_cached_sock_errs(const struct cached_sock_errs_entry *e)
+{
+ /* Use Murmur3's 32-bit finalizer as an integer hash function */
+ DWORD h = e->code;
+ h ^= h >> 16;
+ h *= 0x85ebca6b;
+ h ^= h >> 13;
+ h *= 0xc2b2ae35;
+ h ^= h >> 16;
+ return h;
+}
+
+static inline int
+eq_cached_sock_errs(const struct cached_sock_errs_entry *a,
+ const struct cached_sock_errs_entry *b)
+{
+ return a->code == b->code;
+}
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+static void *windows_socket_errors_lock_ = NULL;
+#endif
+
+static HT_HEAD(cached_sock_errs_map, cached_sock_errs_entry)
+ windows_socket_errors = HT_INITIALIZER();
+
+HT_PROTOTYPE(cached_sock_errs_map,
+ cached_sock_errs_entry,
+ node,
+ hash_cached_sock_errs,
+ eq_cached_sock_errs);
+
+HT_GENERATE(cached_sock_errs_map,
+ cached_sock_errs_entry,
+ node,
+ hash_cached_sock_errs,
+ eq_cached_sock_errs,
+ 0.5,
+ mm_malloc,
+ mm_realloc,
+ mm_free);
+
+/** Equivalent to strerror, but for windows socket errors. */
+const char *
+evutil_socket_error_to_string(int errcode)
+{
+ struct cached_sock_errs_entry *errs, *newerr, find;
+ char *msg = NULL;
+
+ EVLOCK_LOCK(windows_socket_errors_lock_, 0);
+
+ find.code = errcode;
+ errs = HT_FIND(cached_sock_errs_map, &windows_socket_errors, &find);
+ if (errs) {
+ msg = errs->msg;
+ goto done;
+ }
+
+ if (0 != FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS |
+ FORMAT_MESSAGE_ALLOCATE_BUFFER,
+ NULL, errcode, 0, (LPTSTR)&msg, 0, NULL))
+ chomp (msg); /* because message has trailing newline */
+ else {
+ size_t len = 50;
+ /* use LocalAlloc because FormatMessage does */
+ msg = LocalAlloc(LMEM_FIXED, len);
+ if (!msg) {
+ msg = (char *)"LocalAlloc failed during Winsock error";
+ goto done;
+ }
+ evutil_snprintf(msg, len, "winsock error 0x%08x", errcode);
+ }
+
+ newerr = (struct cached_sock_errs_entry *)
+ mm_malloc(sizeof (struct cached_sock_errs_entry));
+
+ if (!newerr) {
+ LocalFree(msg);
+ msg = (char *)"malloc failed during Winsock error";
+ goto done;
+ }
+
+ newerr->code = errcode;
+ newerr->msg = msg;
+ HT_INSERT(cached_sock_errs_map, &windows_socket_errors, newerr);
+
+ done:
+ EVLOCK_UNLOCK(windows_socket_errors_lock_, 0);
+
+ return msg;
+}
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+evutil_global_setup_locks_(const int enable_locks)
+{
+ EVTHREAD_SETUP_GLOBAL_LOCK(windows_socket_errors_lock_, 0);
+ return 0;
+}
+#endif
+
+static void
+evutil_free_sock_err_globals(void)
+{
+ struct cached_sock_errs_entry **errs, *tofree;
+
+ for (errs = HT_START(cached_sock_errs_map, &windows_socket_errors)
+ ; errs; ) {
+ tofree = *errs;
+ errs = HT_NEXT_RMV(cached_sock_errs_map,
+ &windows_socket_errors,
+ errs);
+ LocalFree(tofree->msg);
+ mm_free(tofree);
+ }
+
+ HT_CLEAR(cached_sock_errs_map, &windows_socket_errors);
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (windows_socket_errors_lock_ != NULL) {
+ EVTHREAD_FREE_LOCK(windows_socket_errors_lock_, 0);
+ windows_socket_errors_lock_ = NULL;
+ }
+#endif
+}
+
+#else
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+evutil_global_setup_locks_(const int enable_locks)
+{
+ return 0;
+}
+#endif
+
+static void
+evutil_free_sock_err_globals(void)
+{
+}
+
+#endif
+
+int
+evutil_snprintf(char *buf, size_t buflen, const char *format, ...)
+{
+ int r;
+ va_list ap;
+ va_start(ap, format);
+ r = evutil_vsnprintf(buf, buflen, format, ap);
+ va_end(ap);
+ return r;
+}
+
+int
+evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
+{
+ int r;
+ if (!buflen)
+ return 0;
+#if defined(_MSC_VER) || defined(_WIN32)
+ r = _vsnprintf(buf, buflen, format, ap);
+ if (r < 0)
+ r = _vscprintf(format, ap);
+#elif defined(sgi)
+ /* Make sure we always use the correct vsnprintf on IRIX */
+ extern int _xpg5_vsnprintf(char * __restrict,
+ __SGI_LIBC_NAMESPACE_QUALIFIER size_t,
+ const char * __restrict, /* va_list */ char *);
+
+ r = _xpg5_vsnprintf(buf, buflen, format, ap);
+#else
+ r = vsnprintf(buf, buflen, format, ap);
+#endif
+ buf[buflen-1] = '\0';
+ return r;
+}
+
+#define USE_INTERNAL_NTOP
+#define USE_INTERNAL_PTON
+
+const char *
+evutil_inet_ntop(int af, const void *src, char *dst, size_t len)
+{
+#if defined(EVENT__HAVE_INET_NTOP) && !defined(USE_INTERNAL_NTOP)
+ return inet_ntop(af, src, dst, len);
+#else
+ if (af == AF_INET) {
+ const struct in_addr *in = src;
+ const ev_uint32_t a = ntohl(in->s_addr);
+ int r;
+ r = evutil_snprintf(dst, len, "%d.%d.%d.%d",
+ (int)(ev_uint8_t)((a>>24)&0xff),
+ (int)(ev_uint8_t)((a>>16)&0xff),
+ (int)(ev_uint8_t)((a>>8 )&0xff),
+ (int)(ev_uint8_t)((a )&0xff));
+ if (r<0||(size_t)r>=len)
+ return NULL;
+ else
+ return dst;
+#ifdef AF_INET6
+ } else if (af == AF_INET6) {
+ const struct in6_addr *addr = src;
+ char buf[64], *cp;
+ int longestGapLen = 0, longestGapPos = -1, i,
+ curGapPos = -1, curGapLen = 0;
+ ev_uint16_t words[8];
+ for (i = 0; i < 8; ++i) {
+ words[i] =
+ (((ev_uint16_t)addr->s6_addr[2*i])<<8) + addr->s6_addr[2*i+1];
+ }
+ if (words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 &&
+ words[4] == 0 && ((words[5] == 0 && words[6] && words[7]) ||
+ (words[5] == 0xffff))) {
+ /* This is an IPv4 address. */
+ if (words[5] == 0) {
+ evutil_snprintf(buf, sizeof(buf), "::%d.%d.%d.%d",
+ addr->s6_addr[12], addr->s6_addr[13],
+ addr->s6_addr[14], addr->s6_addr[15]);
+ } else {
+ evutil_snprintf(buf, sizeof(buf), "::%x:%d.%d.%d.%d", words[5],
+ addr->s6_addr[12], addr->s6_addr[13],
+ addr->s6_addr[14], addr->s6_addr[15]);
+ }
+ if (strlen(buf) > len)
+ return NULL;
+ strlcpy(dst, buf, len);
+ return dst;
+ }
+ i = 0;
+ while (i < 8) {
+ if (words[i] == 0) {
+ curGapPos = i++;
+ curGapLen = 1;
+ while (i<8 && words[i] == 0) {
+ ++i; ++curGapLen;
+ }
+ if (curGapLen > longestGapLen) {
+ longestGapPos = curGapPos;
+ longestGapLen = curGapLen;
+ }
+ } else {
+ ++i;
+ }
+ }
+ if (longestGapLen<=1)
+ longestGapPos = -1;
+
+ cp = buf;
+ for (i = 0; i < 8; ++i) {
+ if (words[i] == 0 && longestGapPos == i) {
+ if (i == 0)
+ *cp++ = ':';
+ *cp++ = ':';
+ while (i < 8 && words[i] == 0)
+ ++i;
+ --i; /* to compensate for loop increment. */
+ } else {
+ evutil_snprintf(cp,
+ sizeof(buf)-(cp-buf), "%x", (unsigned)words[i]);
+ cp += strlen(cp);
+ if (i != 7)
+ *cp++ = ':';
+ }
+ }
+ *cp = '\0';
+ if (strlen(buf) > len)
+ return NULL;
+ strlcpy(dst, buf, len);
+ return dst;
+#endif
+ } else {
+ return NULL;
+ }
+#endif
+}
+
+int
+evutil_inet_pton(int af, const char *src, void *dst)
+{
+#if defined(EVENT__HAVE_INET_PTON) && !defined(USE_INTERNAL_PTON)
+ return inet_pton(af, src, dst);
+#else
+ if (af == AF_INET) {
+ int a,b,c,d;
+ char more;
+ struct in_addr *addr = dst;
+ if (sscanf(src, "%d.%d.%d.%d%c", &a,&b,&c,&d,&more) != 4)
+ return 0;
+ if (a < 0 || a > 255) return 0;
+ if (b < 0 || b > 255) return 0;
+ if (c < 0 || c > 255) return 0;
+ if (d < 0 || d > 255) return 0;
+ addr->s_addr = htonl((a<<24) | (b<<16) | (c<<8) | d);
+ return 1;
+#ifdef AF_INET6
+ } else if (af == AF_INET6) {
+ struct in6_addr *out = dst;
+ ev_uint16_t words[8];
+ int gapPos = -1, i, setWords=0;
+ const char *dot = strchr(src, '.');
+ const char *eow; /* end of words. */
+ if (dot == src)
+ return 0;
+ else if (!dot)
+ eow = src+strlen(src);
+ else {
+ int byte1,byte2,byte3,byte4;
+ char more;
+ for (eow = dot-1; eow >= src && EVUTIL_ISDIGIT_(*eow); --eow)
+ ;
+ ++eow;
+
+ /* We use "scanf" because some platform inet_aton()s are too lax
+ * about IPv4 addresses of the form "1.2.3" */
+ if (sscanf(eow, "%d.%d.%d.%d%c",
+ &byte1,&byte2,&byte3,&byte4,&more) != 4)
+ return 0;
+
+ if (byte1 > 255 || byte1 < 0 ||
+ byte2 > 255 || byte2 < 0 ||
+ byte3 > 255 || byte3 < 0 ||
+ byte4 > 255 || byte4 < 0)
+ return 0;
+
+ words[6] = (byte1<<8) | byte2;
+ words[7] = (byte3<<8) | byte4;
+ setWords += 2;
+ }
+
+ i = 0;
+ while (src < eow) {
+ if (i > 7)
+ return 0;
+ if (EVUTIL_ISXDIGIT_(*src)) {
+ char *next;
+ long r = strtol(src, &next, 16);
+ if (next > 4+src)
+ return 0;
+ if (next == src)
+ return 0;
+ if (r<0 || r>65536)
+ return 0;
+
+ words[i++] = (ev_uint16_t)r;
+ setWords++;
+ src = next;
+ if (*src != ':' && src != eow)
+ return 0;
+ ++src;
+ } else if (*src == ':' && i > 0 && gapPos==-1) {
+ gapPos = i;
+ ++src;
+ } else if (*src == ':' && i == 0 && src[1] == ':' && gapPos==-1) {
+ gapPos = i;
+ src += 2;
+ } else {
+ return 0;
+ }
+ }
+
+ if (setWords > 8 ||
+ (setWords == 8 && gapPos != -1) ||
+ (setWords < 8 && gapPos == -1))
+ return 0;
+
+ if (gapPos >= 0) {
+ int nToMove = setWords - (dot ? 2 : 0) - gapPos;
+ int gapLen = 8 - setWords;
+ /* assert(nToMove >= 0); */
+ if (nToMove < 0)
+ return -1; /* should be impossible */
+ memmove(&words[gapPos+gapLen], &words[gapPos],
+ sizeof(ev_uint16_t)*nToMove);
+ memset(&words[gapPos], 0, sizeof(ev_uint16_t)*gapLen);
+ }
+ for (i = 0; i < 8; ++i) {
+ out->s6_addr[2*i ] = words[i] >> 8;
+ out->s6_addr[2*i+1] = words[i] & 0xff;
+ }
+
+ return 1;
+#endif
+ } else {
+ return -1;
+ }
+#endif
+}
+
+int
+evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *outlen)
+{
+ int port;
+ char buf[128];
+ const char *cp, *addr_part, *port_part;
+ int is_ipv6;
+ /* recognized formats are:
+ * [ipv6]:port
+ * ipv6
+ * [ipv6]
+ * ipv4:port
+ * ipv4
+ */
+
+ cp = strchr(ip_as_string, ':');
+ if (*ip_as_string == '[') {
+ int len;
+ if (!(cp = strchr(ip_as_string, ']'))) {
+ return -1;
+ }
+ len = (int) ( cp-(ip_as_string + 1) );
+ if (len > (int)sizeof(buf)-1) {
+ return -1;
+ }
+ memcpy(buf, ip_as_string+1, len);
+ buf[len] = '\0';
+ addr_part = buf;
+ if (cp[1] == ':')
+ port_part = cp+2;
+ else
+ port_part = NULL;
+ is_ipv6 = 1;
+ } else if (cp && strchr(cp+1, ':')) {
+ is_ipv6 = 1;
+ addr_part = ip_as_string;
+ port_part = NULL;
+ } else if (cp) {
+ is_ipv6 = 0;
+ if (cp - ip_as_string > (int)sizeof(buf)-1) {
+ return -1;
+ }
+ memcpy(buf, ip_as_string, cp-ip_as_string);
+ buf[cp-ip_as_string] = '\0';
+ addr_part = buf;
+ port_part = cp+1;
+ } else {
+ addr_part = ip_as_string;
+ port_part = NULL;
+ is_ipv6 = 0;
+ }
+
+ if (port_part == NULL) {
+ port = 0;
+ } else {
+ port = atoi(port_part);
+ if (port <= 0 || port > 65535) {
+ return -1;
+ }
+ }
+
+ if (!addr_part)
+ return -1; /* Should be impossible. */
+#ifdef AF_INET6
+ if (is_ipv6)
+ {
+ struct sockaddr_in6 sin6;
+ memset(&sin6, 0, sizeof(sin6));
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
+ sin6.sin6_len = sizeof(sin6);
+#endif
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(port);
+ if (1 != evutil_inet_pton(AF_INET6, addr_part, &sin6.sin6_addr))
+ return -1;
+ if ((int)sizeof(sin6) > *outlen)
+ return -1;
+ memset(out, 0, *outlen);
+ memcpy(out, &sin6, sizeof(sin6));
+ *outlen = sizeof(sin6);
+ return 0;
+ }
+ else
+#endif
+ {
+ struct sockaddr_in sin;
+ memset(&sin, 0, sizeof(sin));
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+ sin.sin_len = sizeof(sin);
+#endif
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(port);
+ if (1 != evutil_inet_pton(AF_INET, addr_part, &sin.sin_addr))
+ return -1;
+ if ((int)sizeof(sin) > *outlen)
+ return -1;
+ memset(out, 0, *outlen);
+ memcpy(out, &sin, sizeof(sin));
+ *outlen = sizeof(sin);
+ return 0;
+ }
+}
+
+const char *
+evutil_format_sockaddr_port_(const struct sockaddr *sa, char *out, size_t outlen)
+{
+ char b[128];
+ const char *res=NULL;
+ int port;
+ if (sa->sa_family == AF_INET) {
+ const struct sockaddr_in *sin = (const struct sockaddr_in*)sa;
+ res = evutil_inet_ntop(AF_INET, &sin->sin_addr,b,sizeof(b));
+ port = ntohs(sin->sin_port);
+ if (res) {
+ evutil_snprintf(out, outlen, "%s:%d", b, port);
+ return out;
+ }
+ } else if (sa->sa_family == AF_INET6) {
+ const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6*)sa;
+ res = evutil_inet_ntop(AF_INET6, &sin6->sin6_addr,b,sizeof(b));
+ port = ntohs(sin6->sin6_port);
+ if (res) {
+ evutil_snprintf(out, outlen, "[%s]:%d", b, port);
+ return out;
+ }
+ }
+
+ evutil_snprintf(out, outlen, "<addr with socktype %d>",
+ (int)sa->sa_family);
+ return out;
+}
+
+int
+evutil_sockaddr_cmp(const struct sockaddr *sa1, const struct sockaddr *sa2,
+ int include_port)
+{
+ int r;
+ if (0 != (r = (sa1->sa_family - sa2->sa_family)))
+ return r;
+
+ if (sa1->sa_family == AF_INET) {
+ const struct sockaddr_in *sin1, *sin2;
+ sin1 = (const struct sockaddr_in *)sa1;
+ sin2 = (const struct sockaddr_in *)sa2;
+ if (sin1->sin_addr.s_addr < sin2->sin_addr.s_addr)
+ return -1;
+ else if (sin1->sin_addr.s_addr > sin2->sin_addr.s_addr)
+ return 1;
+ else if (include_port &&
+ (r = ((int)sin1->sin_port - (int)sin2->sin_port)))
+ return r;
+ else
+ return 0;
+ }
+#ifdef AF_INET6
+ else if (sa1->sa_family == AF_INET6) {
+ const struct sockaddr_in6 *sin1, *sin2;
+ sin1 = (const struct sockaddr_in6 *)sa1;
+ sin2 = (const struct sockaddr_in6 *)sa2;
+ if ((r = memcmp(sin1->sin6_addr.s6_addr, sin2->sin6_addr.s6_addr, 16)))
+ return r;
+ else if (include_port &&
+ (r = ((int)sin1->sin6_port - (int)sin2->sin6_port)))
+ return r;
+ else
+ return 0;
+ }
+#endif
+ return 1;
+}
+
+/* Tables to implement ctypes-replacement EVUTIL_IS*() functions. Each table
+ * has 256 bits to look up whether a character is in some set or not. This
+ * fails on non-ASCII platforms, but so does every other place where we
+ * take a char and write it onto the network.
+ **/
+static const ev_uint32_t EVUTIL_ISALPHA_TABLE[8] =
+ { 0, 0, 0x7fffffe, 0x7fffffe, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISALNUM_TABLE[8] =
+ { 0, 0x3ff0000, 0x7fffffe, 0x7fffffe, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISSPACE_TABLE[8] = { 0x3e00, 0x1, 0, 0, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISXDIGIT_TABLE[8] =
+ { 0, 0x3ff0000, 0x7e, 0x7e, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISDIGIT_TABLE[8] = { 0, 0x3ff0000, 0, 0, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISPRINT_TABLE[8] =
+ { 0, 0xffffffff, 0xffffffff, 0x7fffffff, 0, 0, 0, 0x0 };
+static const ev_uint32_t EVUTIL_ISUPPER_TABLE[8] = { 0, 0, 0x7fffffe, 0, 0, 0, 0, 0 };
+static const ev_uint32_t EVUTIL_ISLOWER_TABLE[8] = { 0, 0, 0, 0x7fffffe, 0, 0, 0, 0 };
+/* Upper-casing and lowercasing tables to map characters to upper/lowercase
+ * equivalents. */
+static const unsigned char EVUTIL_TOUPPER_TABLE[256] = {
+ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+ 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
+ 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,
+ 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,
+ 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,
+ 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,
+ 96,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,
+ 80,81,82,83,84,85,86,87,88,89,90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+};
+static const unsigned char EVUTIL_TOLOWER_TABLE[256] = {
+ 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+ 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
+ 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,
+ 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,
+ 64,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,91,92,93,94,95,
+ 96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+};
+
+#define IMPL_CTYPE_FN(name) \
+ int EVUTIL_##name##_(char c) { \
+ ev_uint8_t u = c; \
+ return !!(EVUTIL_##name##_TABLE[(u >> 5) & 7] & (1 << (u & 31))); \
+ }
+IMPL_CTYPE_FN(ISALPHA)
+IMPL_CTYPE_FN(ISALNUM)
+IMPL_CTYPE_FN(ISSPACE)
+IMPL_CTYPE_FN(ISDIGIT)
+IMPL_CTYPE_FN(ISXDIGIT)
+IMPL_CTYPE_FN(ISPRINT)
+IMPL_CTYPE_FN(ISLOWER)
+IMPL_CTYPE_FN(ISUPPER)
+
+char EVUTIL_TOLOWER_(char c)
+{
+ return ((char)EVUTIL_TOLOWER_TABLE[(ev_uint8_t)c]);
+}
+char EVUTIL_TOUPPER_(char c)
+{
+ return ((char)EVUTIL_TOUPPER_TABLE[(ev_uint8_t)c]);
+}
+int
+evutil_ascii_strcasecmp(const char *s1, const char *s2)
+{
+ char c1, c2;
+ while (1) {
+ c1 = EVUTIL_TOLOWER_(*s1++);
+ c2 = EVUTIL_TOLOWER_(*s2++);
+ if (c1 < c2)
+ return -1;
+ else if (c1 > c2)
+ return 1;
+ else if (c1 == 0)
+ return 0;
+ }
+}
+int evutil_ascii_strncasecmp(const char *s1, const char *s2, size_t n)
+{
+ char c1, c2;
+ while (n--) {
+ c1 = EVUTIL_TOLOWER_(*s1++);
+ c2 = EVUTIL_TOLOWER_(*s2++);
+ if (c1 < c2)
+ return -1;
+ else if (c1 > c2)
+ return 1;
+ else if (c1 == 0)
+ return 0;
+ }
+ return 0;
+}
+
+void
+evutil_rtrim_lws_(char *str)
+{
+ char *cp;
+
+ if (str == NULL)
+ return;
+
+ if ((cp = strchr(str, '\0')) == NULL || (cp == str))
+ return;
+
+ --cp;
+
+ while (*cp == ' ' || *cp == '\t') {
+ *cp = '\0';
+ if (cp == str)
+ break;
+ --cp;
+ }
+}
+
+static int
+evutil_issetugid(void)
+{
+#ifdef EVENT__HAVE_ISSETUGID
+ return issetugid();
+#else
+
+#ifdef EVENT__HAVE_GETEUID
+ if (getuid() != geteuid())
+ return 1;
+#endif
+#ifdef EVENT__HAVE_GETEGID
+ if (getgid() != getegid())
+ return 1;
+#endif
+ return 0;
+#endif
+}
+
+const char *
+evutil_getenv_(const char *varname)
+{
+ if (evutil_issetugid())
+ return NULL;
+
+ return getenv(varname);
+}
+
+ev_uint32_t
+evutil_weakrand_seed_(struct evutil_weakrand_state *state, ev_uint32_t seed)
+{
+ if (seed == 0) {
+ struct timeval tv;
+ evutil_gettimeofday(&tv, NULL);
+ seed = (ev_uint32_t)tv.tv_sec + (ev_uint32_t)tv.tv_usec;
+#ifdef _WIN32
+ seed += (ev_uint32_t) _getpid();
+#else
+ seed += (ev_uint32_t) getpid();
+#endif
+ }
+ state->seed = seed;
+ return seed;
+}
+
+ev_int32_t
+evutil_weakrand_(struct evutil_weakrand_state *state)
+{
+ /* This RNG implementation is a linear congruential generator, with
+ * modulus 2^31, multiplier 1103515245, and addend 12345. It's also
+ * used by OpenBSD, and by Glibc's TYPE_0 RNG.
+ *
+ * The linear congruential generator is not an industrial-strength
+ * RNG! It's fast, but it can have higher-order patterns. Notably,
+ * the low bits tend to have periodicity.
+ */
+ state->seed = ((state->seed) * 1103515245 + 12345) & 0x7fffffff;
+ return (ev_int32_t)(state->seed);
+}
+
+ev_int32_t
+evutil_weakrand_range_(struct evutil_weakrand_state *state, ev_int32_t top)
+{
+ ev_int32_t divisor, result;
+
+ /* We can't just do weakrand() % top, since the low bits of the LCG
+ * are less random than the high ones. (Specifically, since the LCG
+ * modulus is 2^N, every 2^m for m<N will divide the modulus, and so
+ * therefore the low m bits of the LCG will have period 2^m.) */
+ divisor = EVUTIL_WEAKRAND_MAX / top;
+ do {
+ result = evutil_weakrand_(state) / divisor;
+ } while (result >= top);
+ return result;
+}
+
+/**
+ * Volatile pointer to memset: we use this to keep the compiler from
+ * eliminating our call to memset.
+ */
+void * (*volatile evutil_memset_volatile_)(void *, int, size_t) = memset;
+
+void
+evutil_memclear_(void *mem, size_t len)
+{
+ evutil_memset_volatile_(mem, 0, len);
+}
+
+int
+evutil_sockaddr_is_loopback_(const struct sockaddr *addr)
+{
+ static const char LOOPBACK_S6[16] =
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1";
+ if (addr->sa_family == AF_INET) {
+ struct sockaddr_in *sin = (struct sockaddr_in *)addr;
+ return (ntohl(sin->sin_addr.s_addr) & 0xff000000) == 0x7f000000;
+ } else if (addr->sa_family == AF_INET6) {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)addr;
+ return !memcmp(sin6->sin6_addr.s6_addr, LOOPBACK_S6, 16);
+ }
+ return 0;
+}
+
+int
+evutil_hex_char_to_int_(char c)
+{
+ switch(c)
+ {
+ case '0': return 0;
+ case '1': return 1;
+ case '2': return 2;
+ case '3': return 3;
+ case '4': return 4;
+ case '5': return 5;
+ case '6': return 6;
+ case '7': return 7;
+ case '8': return 8;
+ case '9': return 9;
+ case 'A': case 'a': return 10;
+ case 'B': case 'b': return 11;
+ case 'C': case 'c': return 12;
+ case 'D': case 'd': return 13;
+ case 'E': case 'e': return 14;
+ case 'F': case 'f': return 15;
+ }
+ return -1;
+}
+
+#ifdef _WIN32
+HANDLE
+evutil_load_windows_system_library_(const TCHAR *library_name)
+{
+ TCHAR path[MAX_PATH];
+ unsigned n;
+ n = GetSystemDirectory(path, MAX_PATH);
+ if (n == 0 || n + _tcslen(library_name) + 2 >= MAX_PATH)
+ return 0;
+ _tcscat(path, TEXT("\\"));
+ _tcscat(path, library_name);
+ return LoadLibrary(path);
+}
+#endif
+
+/* Internal wrapper around 'socket' to provide Linux-style support for
+ * syscall-saving methods where available.
+ *
+ * In addition to regular socket behavior, you can use a bitwise or to set the
+ * flags EVUTIL_SOCK_NONBLOCK and EVUTIL_SOCK_CLOEXEC in the 'type' argument,
+ * to make the socket nonblocking or close-on-exec with as few syscalls as
+ * possible.
+ */
+evutil_socket_t
+evutil_socket_(int domain, int type, int protocol)
+{
+ evutil_socket_t r;
+#if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC)
+ r = socket(domain, type, protocol);
+ if (r >= 0)
+ return r;
+ else if ((type & (SOCK_NONBLOCK|SOCK_CLOEXEC)) == 0)
+ return -1;
+#endif
+#define SOCKET_TYPE_MASK (~(EVUTIL_SOCK_NONBLOCK|EVUTIL_SOCK_CLOEXEC))
+ r = socket(domain, type & SOCKET_TYPE_MASK, protocol);
+ if (r < 0)
+ return -1;
+ if (type & EVUTIL_SOCK_NONBLOCK) {
+ if (evutil_fast_socket_nonblocking(r) < 0) {
+ evutil_closesocket(r);
+ return -1;
+ }
+ }
+ if (type & EVUTIL_SOCK_CLOEXEC) {
+ if (evutil_fast_socket_closeonexec(r) < 0) {
+ evutil_closesocket(r);
+ return -1;
+ }
+ }
+ return r;
+}
+
+/* Internal wrapper around 'accept' or 'accept4' to provide Linux-style
+ * support for syscall-saving methods where available.
+ *
+ * In addition to regular accept behavior, you can set one or more of flags
+ * EVUTIL_SOCK_NONBLOCK and EVUTIL_SOCK_CLOEXEC in the 'flags' argument, to
+ * make the socket nonblocking or close-on-exec with as few syscalls as
+ * possible.
+ */
+evutil_socket_t
+evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
+ ev_socklen_t *addrlen, int flags)
+{
+ evutil_socket_t result;
+#if defined(EVENT__HAVE_ACCEPT4) && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
+ result = accept4(sockfd, addr, addrlen, flags);
+ if (result >= 0 || (errno != EINVAL && errno != ENOSYS)) {
+ /* A nonnegative result means that we succeeded, so return.
+ * Failing with EINVAL means that an option wasn't supported,
+ * and failing with ENOSYS means that the syscall wasn't
+ * there: in those cases we want to fall back. Otherwise, we
+ * got a real error, and we should return. */
+ return result;
+ }
+#endif
+ result = accept(sockfd, addr, addrlen);
+ if (result < 0)
+ return result;
+
+ if (flags & EVUTIL_SOCK_CLOEXEC) {
+ if (evutil_fast_socket_closeonexec(result) < 0) {
+ evutil_closesocket(result);
+ return -1;
+ }
+ }
+ if (flags & EVUTIL_SOCK_NONBLOCK) {
+ if (evutil_fast_socket_nonblocking(result) < 0) {
+ evutil_closesocket(result);
+ return -1;
+ }
+ }
+ return result;
+}
+
+/* Internal function: Set fd[0] and fd[1] to a pair of fds such that writes on
+ * fd[0] get read from fd[1]. Make both fds nonblocking and close-on-exec.
+ * Return 0 on success, -1 on failure.
+ */
+int
+evutil_make_internal_pipe_(evutil_socket_t fd[2])
+{
+ /*
+ Making the second socket nonblocking is a bit subtle, given that we
+ ignore any EAGAIN returns when writing to it, and you don't usally
+ do that for a nonblocking socket. But if the kernel gives us EAGAIN,
+ then there's no need to add any more data to the buffer, since
+ the main thread is already either about to wake up and drain it,
+ or woken up and in the process of draining it.
+ */
+
+#if defined(EVENT__HAVE_PIPE2)
+ if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
+ return 0;
+#endif
+#if defined(EVENT__HAVE_PIPE)
+ if (pipe(fd) == 0) {
+ if (evutil_fast_socket_nonblocking(fd[0]) < 0 ||
+ evutil_fast_socket_nonblocking(fd[1]) < 0 ||
+ evutil_fast_socket_closeonexec(fd[0]) < 0 ||
+ evutil_fast_socket_closeonexec(fd[1]) < 0) {
+ close(fd[0]);
+ close(fd[1]);
+ fd[0] = fd[1] = -1;
+ return -1;
+ }
+ return 0;
+ } else {
+ event_warn("%s: pipe", __func__);
+ }
+#endif
+
+#ifdef _WIN32
+#define LOCAL_SOCKETPAIR_AF AF_INET
+#else
+#define LOCAL_SOCKETPAIR_AF AF_UNIX
+#endif
+ if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, fd) == 0) {
+ if (evutil_fast_socket_nonblocking(fd[0]) < 0 ||
+ evutil_fast_socket_nonblocking(fd[1]) < 0 ||
+ evutil_fast_socket_closeonexec(fd[0]) < 0 ||
+ evutil_fast_socket_closeonexec(fd[1]) < 0) {
+ evutil_closesocket(fd[0]);
+ evutil_closesocket(fd[1]);
+ fd[0] = fd[1] = -1;
+ return -1;
+ }
+ return 0;
+ }
+ fd[0] = fd[1] = -1;
+ return -1;
+}
+
+/* Wrapper around eventfd on systems that provide it. Unlike the system
+ * eventfd, it always supports EVUTIL_EFD_CLOEXEC and EVUTIL_EFD_NONBLOCK as
+ * flags. Returns -1 on error or if eventfd is not supported.
+ */
+evutil_socket_t
+evutil_eventfd_(unsigned initval, int flags)
+{
+#if defined(EVENT__HAVE_EVENTFD) && defined(EVENT__HAVE_SYS_EVENTFD_H)
+ int r;
+#if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ r = eventfd(initval, flags);
+ if (r >= 0 || flags == 0)
+ return r;
+#endif
+ r = eventfd(initval, 0);
+ if (r < 0)
+ return r;
+ if (flags & EVUTIL_EFD_CLOEXEC) {
+ if (evutil_fast_socket_closeonexec(r) < 0) {
+ evutil_closesocket(r);
+ return -1;
+ }
+ }
+ if (flags & EVUTIL_EFD_NONBLOCK) {
+ if (evutil_fast_socket_nonblocking(r) < 0) {
+ evutil_closesocket(r);
+ return -1;
+ }
+ }
+ return r;
+#else
+ return -1;
+#endif
+}
+
+void
+evutil_free_globals_(void)
+{
+ evutil_free_secure_rng_globals_();
+ evutil_free_sock_err_globals();
+}
diff --git a/sntp/libevent/evutil_rand.c b/sntp/libevent/evutil_rand.c
new file mode 100644
index 000000000000..046a14b07a9a
--- /dev/null
+++ b/sntp/libevent/evutil_rand.c
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/* This file has our secure PRNG code. On platforms that have arc4random(),
+ * we just use that. Otherwise, we include arc4random.c as a bunch of static
+ * functions, and wrap it lightly. We don't expose the arc4random*() APIs
+ * because A) they aren't in our namespace, and B) it's not nice to name your
+ * APIs after their implementations. We keep them in a separate file
+ * so that other people can rip it out and use it for whatever.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <limits.h>
+
+#include "util-internal.h"
+#include "evthread-internal.h"
+
+#ifdef EVENT__HAVE_ARC4RANDOM
+#include <stdlib.h>
+#include <string.h>
+int
+evutil_secure_rng_set_urandom_device_file(char *fname)
+{
+ (void) fname;
+ return -1;
+}
+int
+evutil_secure_rng_init(void)
+{
+ /* call arc4random() now to force it to self-initialize */
+ (void) arc4random();
+ return 0;
+}
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+evutil_secure_rng_global_setup_locks_(const int enable_locks)
+{
+ return 0;
+}
+#endif
+static void
+evutil_free_secure_rng_globals_locks(void)
+{
+}
+
+static void
+ev_arc4random_buf(void *buf, size_t n)
+{
+#if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__)
+ arc4random_buf(buf, n);
+ return;
+#else
+ unsigned char *b = buf;
+
+#if defined(EVENT__HAVE_ARC4RANDOM_BUF)
+ /* OSX 10.7 introducd arc4random_buf, so if you build your program
+ * there, you'll get surprised when older versions of OSX fail to run.
+ * To solve this, we can check whether the function pointer is set,
+ * and fall back otherwise. (OSX does this using some linker
+ * trickery.)
+ */
+ {
+ void (*tptr)(void *,size_t) =
+ (void (*)(void*,size_t))arc4random_buf;
+ if (tptr != NULL) {
+ arc4random_buf(buf, n);
+ return;
+ }
+ }
+#endif
+ /* Make sure that we start out with b at a 4-byte alignment; plenty
+ * of CPUs care about this for 32-bit access. */
+ if (n >= 4 && ((ev_uintptr_t)b) & 3) {
+ ev_uint32_t u = arc4random();
+ int n_bytes = 4 - (((ev_uintptr_t)b) & 3);
+ memcpy(b, &u, n_bytes);
+ b += n_bytes;
+ n -= n_bytes;
+ }
+ while (n >= 4) {
+ *(ev_uint32_t*)b = arc4random();
+ b += 4;
+ n -= 4;
+ }
+ if (n) {
+ ev_uint32_t u = arc4random();
+ memcpy(b, &u, n);
+ }
+#endif
+}
+
+#else /* !EVENT__HAVE_ARC4RANDOM { */
+
+#ifdef EVENT__ssize_t
+#define ssize_t EVENT__ssize_t
+#endif
+#define ARC4RANDOM_EXPORT static
+#define ARC4_LOCK_() EVLOCK_LOCK(arc4rand_lock, 0)
+#define ARC4_UNLOCK_() EVLOCK_UNLOCK(arc4rand_lock, 0)
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+static void *arc4rand_lock;
+#endif
+
+#define ARC4RANDOM_UINT32 ev_uint32_t
+#define ARC4RANDOM_NOSTIR
+#define ARC4RANDOM_NORANDOM
+#define ARC4RANDOM_NOUNIFORM
+
+#include "./arc4random.c"
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+evutil_secure_rng_global_setup_locks_(const int enable_locks)
+{
+ EVTHREAD_SETUP_GLOBAL_LOCK(arc4rand_lock, 0);
+ return 0;
+}
+#endif
+
+static void
+evutil_free_secure_rng_globals_locks(void)
+{
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (arc4rand_lock != NULL) {
+ EVTHREAD_FREE_LOCK(arc4rand_lock, 0);
+ arc4rand_lock = NULL;
+ }
+#endif
+ return;
+}
+
+int
+evutil_secure_rng_set_urandom_device_file(char *fname)
+{
+#ifdef TRY_SEED_URANDOM
+ ARC4_LOCK_();
+ arc4random_urandom_filename = fname;
+ ARC4_UNLOCK_();
+#endif
+ return 0;
+}
+
+int
+evutil_secure_rng_init(void)
+{
+ int val;
+
+ ARC4_LOCK_();
+ if (!arc4_seeded_ok)
+ arc4_stir();
+ val = arc4_seeded_ok ? 0 : -1;
+ ARC4_UNLOCK_();
+ return val;
+}
+
+static void
+ev_arc4random_buf(void *buf, size_t n)
+{
+ arc4random_buf(buf, n);
+}
+
+#endif /* } !EVENT__HAVE_ARC4RANDOM */
+
+void
+evutil_secure_rng_get_bytes(void *buf, size_t n)
+{
+ ev_arc4random_buf(buf, n);
+}
+
+void
+evutil_secure_rng_add_bytes(const char *buf, size_t n)
+{
+ arc4random_addrandom((unsigned char*)buf,
+ n>(size_t)INT_MAX ? INT_MAX : (int)n);
+}
+
+void
+evutil_free_secure_rng_globals_(void)
+{
+ evutil_free_secure_rng_globals_locks();
+}
diff --git a/sntp/libevent/evutil_time.c b/sntp/libevent/evutil_time.c
new file mode 100644
index 000000000000..e433043e4d2b
--- /dev/null
+++ b/sntp/libevent/evutil_time.c
@@ -0,0 +1,488 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <errno.h>
+#include <limits.h>
+#ifndef EVENT__HAVE_GETTIMEOFDAY
+#include <sys/timeb.h>
+#endif
+#if !defined(EVENT__HAVE_NANOSLEEP) && !defined(EVENT_HAVE_USLEEP) && \
+ !defined(_WIN32)
+#include <sys/select.h>
+#endif
+#include <time.h>
+#include <sys/stat.h>
+#include <string.h>
+
+#include "event2/util.h"
+#include "util-internal.h"
+#include "log-internal.h"
+
+#ifndef EVENT__HAVE_GETTIMEOFDAY
+/* No gettimeofday; this must be windows. */
+int
+evutil_gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+#ifdef _MSC_VER
+#define U64_LITERAL(n) n##ui64
+#else
+#define U64_LITERAL(n) n##llu
+#endif
+
+ /* Conversion logic taken from Tor, which in turn took it
+ * from Perl. GetSystemTimeAsFileTime returns its value as
+ * an unaligned (!) 64-bit value containing the number of
+ * 100-nanosecond intervals since 1 January 1601 UTC. */
+#define EPOCH_BIAS U64_LITERAL(116444736000000000)
+#define UNITS_PER_SEC U64_LITERAL(10000000)
+#define USEC_PER_SEC U64_LITERAL(1000000)
+#define UNITS_PER_USEC U64_LITERAL(10)
+ union {
+ FILETIME ft_ft;
+ ev_uint64_t ft_64;
+ } ft;
+
+ if (tv == NULL)
+ return -1;
+
+ GetSystemTimeAsFileTime(&ft.ft_ft);
+
+ if (EVUTIL_UNLIKELY(ft.ft_64 < EPOCH_BIAS)) {
+ /* Time before the unix epoch. */
+ return -1;
+ }
+ ft.ft_64 -= EPOCH_BIAS;
+ tv->tv_sec = (long) (ft.ft_64 / UNITS_PER_SEC);
+ tv->tv_usec = (long) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC);
+ return 0;
+}
+#endif
+
+#define MAX_SECONDS_IN_MSEC_LONG \
+ (((LONG_MAX) - 999) / 1000)
+
+long
+evutil_tv_to_msec_(const struct timeval *tv)
+{
+ if (tv->tv_usec > 1000000 || tv->tv_sec > MAX_SECONDS_IN_MSEC_LONG)
+ return -1;
+
+ return (tv->tv_sec * 1000) + ((tv->tv_usec + 999) / 1000);
+}
+
+/*
+ Replacement for usleep on platforms that don't have one. Not guaranteed to
+ be any more finegrained than 1 msec.
+ */
+void
+evutil_usleep_(const struct timeval *tv)
+{
+ if (!tv)
+ return;
+#if defined(_WIN32)
+ {
+ long msec = evutil_tv_to_msec_(tv);
+ Sleep((DWORD)msec);
+ }
+#elif defined(EVENT__HAVE_NANOSLEEP)
+ {
+ struct timespec ts;
+ ts.tv_sec = tv->tv_sec;
+ ts.tv_nsec = tv->tv_usec*1000;
+ nanosleep(&ts, NULL);
+ }
+#elif defined(EVENT__HAVE_USLEEP)
+ /* Some systems don't like to usleep more than 999999 usec */
+ sleep(tv->tv_sec);
+ usleep(tv->tv_usec);
+#else
+ select(0, NULL, NULL, NULL, tv);
+#endif
+}
+
+/*
+ This function assumes it's called repeatedly with a
+ not-actually-so-monotonic time source whose outputs are in 'tv'. It
+ implements a trivial ratcheting mechanism so that the values never go
+ backwards.
+ */
+static void
+adjust_monotonic_time(struct evutil_monotonic_timer *base,
+ struct timeval *tv)
+{
+ evutil_timeradd(tv, &base->adjust_monotonic_clock, tv);
+
+ if (evutil_timercmp(tv, &base->last_time, <)) {
+ /* Guess it wasn't monotonic after all. */
+ struct timeval adjust;
+ evutil_timersub(&base->last_time, tv, &adjust);
+ evutil_timeradd(&adjust, &base->adjust_monotonic_clock,
+ &base->adjust_monotonic_clock);
+ *tv = base->last_time;
+ }
+ base->last_time = *tv;
+}
+
+#if defined(HAVE_POSIX_MONOTONIC)
+/* =====
+ The POSIX clock_gettime() interface provides a few ways to get at a
+ monotonic clock. CLOCK_MONOTONIC is most widely supported. Linux also
+ provides a CLOCK_MONOTONIC_COARSE with accuracy of about 1-4 msec.
+
+ On all platforms I'm aware of, CLOCK_MONOTONIC really is monotonic.
+ Platforms don't agree about whether it should jump on a sleep/resume.
+ */
+
+int
+evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
+ int flags)
+{
+ /* CLOCK_MONOTONIC exists on FreeBSD, Linux, and Solaris. You need to
+ * check for it at runtime, because some older kernel versions won't
+ * have it working. */
+#ifdef CLOCK_MONOTONIC_COARSE
+ const int precise = flags & EV_MONOT_PRECISE;
+#endif
+ const int fallback = flags & EV_MONOT_FALLBACK;
+ struct timespec ts;
+
+#ifdef CLOCK_MONOTONIC_COARSE
+ if (CLOCK_MONOTONIC_COARSE < 0) {
+ /* Technically speaking, nothing keeps CLOCK_* from being
+ * negative (as far as I know). This check and the one below
+ * make sure that it's safe for us to use -1 as an "unset"
+ * value. */
+ event_errx(1,"I didn't expect CLOCK_MONOTONIC_COARSE to be < 0");
+ }
+ if (! precise && ! fallback) {
+ if (clock_gettime(CLOCK_MONOTONIC_COARSE, &ts) == 0) {
+ base->monotonic_clock = CLOCK_MONOTONIC_COARSE;
+ return 0;
+ }
+ }
+#endif
+ if (!fallback && clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
+ base->monotonic_clock = CLOCK_MONOTONIC;
+ return 0;
+ }
+
+ if (CLOCK_MONOTONIC < 0) {
+ event_errx(1,"I didn't expect CLOCK_MONOTONIC to be < 0");
+ }
+
+ base->monotonic_clock = -1;
+ return 0;
+}
+
+int
+evutil_gettime_monotonic_(struct evutil_monotonic_timer *base,
+ struct timeval *tp)
+{
+ struct timespec ts;
+
+ if (base->monotonic_clock < 0) {
+ if (evutil_gettimeofday(tp, NULL) < 0)
+ return -1;
+ adjust_monotonic_time(base, tp);
+ return 0;
+ }
+
+ if (clock_gettime(base->monotonic_clock, &ts) == -1)
+ return -1;
+ tp->tv_sec = ts.tv_sec;
+ tp->tv_usec = ts.tv_nsec / 1000;
+
+ return 0;
+}
+#endif
+
+#if defined(HAVE_MACH_MONOTONIC)
+/* ======
+ Apple is a little late to the POSIX party. And why not? Instead of
+ clock_gettime(), they provide mach_absolute_time(). Its units are not
+ fixed; we need to use mach_timebase_info() to get the right functions to
+ convert its units into nanoseconds.
+
+ To all appearances, mach_absolute_time() seems to be honest-to-goodness
+ monotonic. Whether it stops during sleep or not is unspecified in
+ principle, and dependent on CPU architecture in practice.
+ */
+
+int
+evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
+ int flags)
+{
+ const int fallback = flags & EV_MONOT_FALLBACK;
+ struct mach_timebase_info mi;
+ memset(base, 0, sizeof(*base));
+ /* OSX has mach_absolute_time() */
+ if (!fallback &&
+ mach_timebase_info(&mi) == 0 &&
+ mach_absolute_time() != 0) {
+ /* mach_timebase_info tells us how to convert
+ * mach_absolute_time() into nanoseconds, but we
+ * want to use microseconds instead. */
+ mi.denom *= 1000;
+ memcpy(&base->mach_timebase_units, &mi, sizeof(mi));
+ } else {
+ base->mach_timebase_units.numer = 0;
+ }
+ return 0;
+}
+
+int
+evutil_gettime_monotonic_(struct evutil_monotonic_timer *base,
+ struct timeval *tp)
+{
+ ev_uint64_t abstime, usec;
+ if (base->mach_timebase_units.numer == 0) {
+ if (evutil_gettimeofday(tp, NULL) < 0)
+ return -1;
+ adjust_monotonic_time(base, tp);
+ return 0;
+ }
+
+ abstime = mach_absolute_time();
+ usec = (abstime * base->mach_timebase_units.numer)
+ / (base->mach_timebase_units.denom);
+ tp->tv_sec = usec / 1000000;
+ tp->tv_usec = usec % 1000000;
+
+ return 0;
+}
+#endif
+
+#if defined(HAVE_WIN32_MONOTONIC)
+/* =====
+ Turn we now to Windows. Want monontonic time on Windows?
+
+ Windows has QueryPerformanceCounter(), which gives time most high-
+ resolution time. It's a pity it's not so monotonic in practice; it's
+ also got some fun bugs, especially: with older Windowses, under
+ virtualizations, with funny hardware, on multiprocessor systems, and so
+ on. PEP418 [1] has a nice roundup of the issues here.
+
+ There's GetTickCount64() on Vista and later, which gives a number of 1-msec
+ ticks since startup. The accuracy here might be as bad as 10-20 msec, I
+ hear. There's an undocumented function (NtSetTimerResolution) that
+ allegedly increases the accuracy. Good luck!
+
+ There's also GetTickCount(), which is only 32 bits, but seems to be
+ supported on pre-Vista versions of Windows. Apparently, you can coax
+ another 14 bits out of it, giving you 2231 years before rollover.
+
+ The less said about timeGetTime() the better.
+
+ "We don't care. We don't have to. We're the Phone Company."
+ -- Lily Tomlin, SNL
+
+ Our strategy, if precise timers are turned off, is to just use the best
+ GetTickCount equivalent available. If we've been asked for precise timing,
+ then we mostly[2] assume that GetTickCount is monotonic, and correct
+ GetPerformanceCounter to approximate it.
+
+ [1] http://www.python.org/dev/peps/pep-0418
+ [2] Of course, we feed the Windows stuff into adjust_monotonic_time()
+ anyway, just in case it isn't.
+
+ */
+/*
+ Parts of our logic in the win32 timer code here are closely based on
+ BitTorrent's libUTP library. That code is subject to the following
+ license:
+
+ Copyright (c) 2010 BitTorrent, Inc.
+
+ 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 AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+static ev_uint64_t
+evutil_GetTickCount_(struct evutil_monotonic_timer *base)
+{
+ if (base->GetTickCount64_fn) {
+ /* Let's just use GetTickCount64 if we can. */
+ return base->GetTickCount64_fn();
+ } else if (base->GetTickCount_fn) {
+ /* Greg Hazel assures me that this works, that BitTorrent has
+ * done it for years, and this it won't turn around and
+ * bite us. He says they found it on some game programmers'
+ * forum some time around 2007.
+ */
+ ev_uint64_t v = base->GetTickCount_fn();
+ return (DWORD)v | ((v >> 18) & 0xFFFFFFFF00000000);
+ } else {
+ /* Here's the fallback implementation. We have to use
+ * GetTickCount() with its given signature, so we only get
+ * 32 bits worth of milliseconds, which will roll ove every
+ * 49 days or so. */
+ DWORD ticks = GetTickCount();
+ if (ticks < base->last_tick_count) {
+ base->adjust_tick_count += ((ev_uint64_t)1) << 32;
+ }
+ base->last_tick_count = ticks;
+ return ticks + base->adjust_tick_count;
+ }
+}
+
+int
+evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
+ int flags)
+{
+ const int precise = flags & EV_MONOT_PRECISE;
+ const int fallback = flags & EV_MONOT_FALLBACK;
+ HANDLE h;
+ memset(base, 0, sizeof(*base));
+
+ h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
+ if (h != NULL && !fallback) {
+ base->GetTickCount64_fn = (ev_GetTickCount_func)GetProcAddress(h, "GetTickCount64");
+ base->GetTickCount_fn = (ev_GetTickCount_func)GetProcAddress(h, "GetTickCount");
+ }
+
+ base->first_tick = base->last_tick_count = evutil_GetTickCount_(base);
+ if (precise && !fallback) {
+ LARGE_INTEGER freq;
+ if (QueryPerformanceFrequency(&freq)) {
+ LARGE_INTEGER counter;
+ QueryPerformanceCounter(&counter);
+ base->first_counter = counter.QuadPart;
+ base->usec_per_count = 1.0e6 / freq.QuadPart;
+ base->use_performance_counter = 1;
+ }
+ }
+
+ return 0;
+}
+
+static inline ev_int64_t
+abs64(ev_int64_t i)
+{
+ return i < 0 ? -i : i;
+}
+
+
+int
+evutil_gettime_monotonic_(struct evutil_monotonic_timer *base,
+ struct timeval *tp)
+{
+ ev_uint64_t ticks = evutil_GetTickCount_(base);
+ if (base->use_performance_counter) {
+ /* Here's a trick we took from BitTorrent's libutp, at Greg
+ * Hazel's recommendation. We use QueryPerformanceCounter for
+ * our high-resolution timer, but use GetTickCount*() to keep
+ * it sane, and adjust_monotonic_time() to keep it monotonic.
+ */
+ LARGE_INTEGER counter;
+ ev_int64_t counter_elapsed, counter_usec_elapsed, ticks_elapsed;
+ QueryPerformanceCounter(&counter);
+ counter_elapsed = (ev_int64_t)
+ (counter.QuadPart - base->first_counter);
+ ticks_elapsed = ticks - base->first_tick;
+ /* TODO: This may upset VC6. If you need this to work with
+ * VC6, please supply an appropriate patch. */
+ counter_usec_elapsed = (ev_int64_t)
+ (counter_elapsed * base->usec_per_count);
+
+ if (abs64(ticks_elapsed*1000 - counter_usec_elapsed) > 1000000) {
+ /* It appears that the QueryPerformanceCounter()
+ * result is more than 1 second away from
+ * GetTickCount() result. Let's adjust it to be as
+ * accurate as we can; adjust_monotnonic_time() below
+ * will keep it monotonic. */
+ counter_usec_elapsed = ticks_elapsed * 1000;
+ base->first_counter = (ev_uint64_t) (counter.QuadPart - counter_usec_elapsed / base->usec_per_count);
+ }
+ tp->tv_sec = (time_t) (counter_usec_elapsed / 1000000);
+ tp->tv_usec = counter_usec_elapsed % 1000000;
+
+ } else {
+ /* We're just using GetTickCount(). */
+ tp->tv_sec = (time_t) (ticks / 1000);
+ tp->tv_usec = (ticks % 1000) * 1000;
+ }
+ adjust_monotonic_time(base, tp);
+
+ return 0;
+}
+#endif
+
+#if defined(HAVE_FALLBACK_MONOTONIC)
+/* =====
+ And if none of the other options work, let's just use gettimeofday(), and
+ ratchet it forward so that it acts like a monotonic timer, whether it
+ wants to or not.
+ */
+
+int
+evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
+ int precise)
+{
+ memset(base, 0, sizeof(*base));
+ return 0;
+}
+
+int
+evutil_gettime_monotonic_(struct evutil_monotonic_timer *base,
+ struct timeval *tp)
+{
+ if (evutil_gettimeofday(tp, NULL) < 0)
+ return -1;
+ adjust_monotonic_time(base, tp);
+ return 0;
+
+}
+#endif
diff --git a/sntp/libevent/ht-internal.h b/sntp/libevent/ht-internal.h
new file mode 100644
index 000000000000..8842f4cd75b2
--- /dev/null
+++ b/sntp/libevent/ht-internal.h
@@ -0,0 +1,488 @@
+/* Copyright 2002 Christopher Clark */
+/* Copyright 2005-2012 Nick Mathewson */
+/* Copyright 2009-2012 Niels Provos and Nick Mathewson */
+/* See license at end. */
+
+/* Based on ideas by Christopher Clark and interfaces from Niels Provos. */
+
+#ifndef HT_INTERNAL_H_INCLUDED_
+#define HT_INTERNAL_H_INCLUDED_
+
+#define HT_HEAD(name, type) \
+ struct name { \
+ /* The hash table itself. */ \
+ struct type **hth_table; \
+ /* How long is the hash table? */ \
+ unsigned hth_table_length; \
+ /* How many elements does the table contain? */ \
+ unsigned hth_n_entries; \
+ /* How many elements will we allow in the table before resizing it? */ \
+ unsigned hth_load_limit; \
+ /* Position of hth_table_length in the primes table. */ \
+ int hth_prime_idx; \
+ }
+
+#define HT_INITIALIZER() \
+ { NULL, 0, 0, 0, -1 }
+
+#ifdef HT_NO_CACHE_HASH_VALUES
+#define HT_ENTRY(type) \
+ struct { \
+ struct type *hte_next; \
+ }
+#else
+#define HT_ENTRY(type) \
+ struct { \
+ struct type *hte_next; \
+ unsigned hte_hash; \
+ }
+#endif
+
+#define HT_EMPTY(head) \
+ ((head)->hth_n_entries == 0)
+
+/* How many elements in 'head'? */
+#define HT_SIZE(head) \
+ ((head)->hth_n_entries)
+
+/* Return memory usage for a hashtable (not counting the entries themselves) */
+#define HT_MEM_USAGE(head) \
+ (sizeof(*head) + (head)->hth_table_length * sizeof(void*))
+
+#define HT_FIND(name, head, elm) name##_HT_FIND((head), (elm))
+#define HT_INSERT(name, head, elm) name##_HT_INSERT((head), (elm))
+#define HT_REPLACE(name, head, elm) name##_HT_REPLACE((head), (elm))
+#define HT_REMOVE(name, head, elm) name##_HT_REMOVE((head), (elm))
+#define HT_START(name, head) name##_HT_START(head)
+#define HT_NEXT(name, head, elm) name##_HT_NEXT((head), (elm))
+#define HT_NEXT_RMV(name, head, elm) name##_HT_NEXT_RMV((head), (elm))
+#define HT_CLEAR(name, head) name##_HT_CLEAR(head)
+#define HT_INIT(name, head) name##_HT_INIT(head)
+/* Helper: */
+static inline unsigned
+ht_improve_hash_(unsigned h)
+{
+ /* Aim to protect against poor hash functions by adding logic here
+ * - logic taken from java 1.4 hashtable source */
+ h += ~(h << 9);
+ h ^= ((h >> 14) | (h << 18)); /* >>> */
+ h += (h << 4);
+ h ^= ((h >> 10) | (h << 22)); /* >>> */
+ return h;
+}
+
+#if 0
+/** Basic string hash function, from Java standard String.hashCode(). */
+static inline unsigned
+ht_string_hash_(const char *s)
+{
+ unsigned h = 0;
+ int m = 1;
+ while (*s) {
+ h += ((signed char)*s++)*m;
+ m = (m<<5)-1; /* m *= 31 */
+ }
+ return h;
+}
+#endif
+
+/** Basic string hash function, from Python's str.__hash__() */
+static inline unsigned
+ht_string_hash_(const char *s)
+{
+ unsigned h;
+ const unsigned char *cp = (const unsigned char *)s;
+ h = *cp << 7;
+ while (*cp) {
+ h = (1000003*h) ^ *cp++;
+ }
+ /* This conversion truncates the length of the string, but that's ok. */
+ h ^= (unsigned)(cp-(const unsigned char*)s);
+ return h;
+}
+
+#ifndef HT_NO_CACHE_HASH_VALUES
+#define HT_SET_HASH_(elm, field, hashfn) \
+ do { (elm)->field.hte_hash = hashfn(elm); } while (0)
+#define HT_SET_HASHVAL_(elm, field, val) \
+ do { (elm)->field.hte_hash = (val); } while (0)
+#define HT_ELT_HASH_(elm, field, hashfn) \
+ ((elm)->field.hte_hash)
+#else
+#define HT_SET_HASH_(elm, field, hashfn) \
+ ((void)0)
+#define HT_ELT_HASH_(elm, field, hashfn) \
+ (hashfn(elm))
+#define HT_SET_HASHVAL_(elm, field, val) \
+ ((void)0)
+#endif
+
+/* Helper: alias for the bucket containing 'elm'. */
+#define HT_BUCKET_(head, field, elm, hashfn) \
+ ((head)->hth_table[HT_ELT_HASH_(elm,field,hashfn) % head->hth_table_length])
+
+#define HT_FOREACH(x, name, head) \
+ for ((x) = HT_START(name, head); \
+ (x) != NULL; \
+ (x) = HT_NEXT(name, head, x))
+
+#define HT_PROTOTYPE(name, type, field, hashfn, eqfn) \
+ int name##_HT_GROW(struct name *ht, unsigned min_capacity); \
+ void name##_HT_CLEAR(struct name *ht); \
+ int name##_HT_REP_IS_BAD_(const struct name *ht); \
+ static inline void \
+ name##_HT_INIT(struct name *head) { \
+ head->hth_table_length = 0; \
+ head->hth_table = NULL; \
+ head->hth_n_entries = 0; \
+ head->hth_load_limit = 0; \
+ head->hth_prime_idx = -1; \
+ } \
+ /* Helper: returns a pointer to the right location in the table \
+ * 'head' to find or insert the element 'elm'. */ \
+ static inline struct type ** \
+ name##_HT_FIND_P_(struct name *head, struct type *elm) \
+ { \
+ struct type **p; \
+ if (!head->hth_table) \
+ return NULL; \
+ p = &HT_BUCKET_(head, field, elm, hashfn); \
+ while (*p) { \
+ if (eqfn(*p, elm)) \
+ return p; \
+ p = &(*p)->field.hte_next; \
+ } \
+ return p; \
+ } \
+ /* Return a pointer to the element in the table 'head' matching 'elm', \
+ * or NULL if no such element exists */ \
+ static inline struct type * \
+ name##_HT_FIND(const struct name *head, struct type *elm) \
+ { \
+ struct type **p; \
+ struct name *h = (struct name *) head; \
+ HT_SET_HASH_(elm, field, hashfn); \
+ p = name##_HT_FIND_P_(h, elm); \
+ return p ? *p : NULL; \
+ } \
+ /* Insert the element 'elm' into the table 'head'. Do not call this \
+ * function if the table might already contain a matching element. */ \
+ static inline void \
+ name##_HT_INSERT(struct name *head, struct type *elm) \
+ { \
+ struct type **p; \
+ if (!head->hth_table || head->hth_n_entries >= head->hth_load_limit) \
+ name##_HT_GROW(head, head->hth_n_entries+1); \
+ ++head->hth_n_entries; \
+ HT_SET_HASH_(elm, field, hashfn); \
+ p = &HT_BUCKET_(head, field, elm, hashfn); \
+ elm->field.hte_next = *p; \
+ *p = elm; \
+ } \
+ /* Insert the element 'elm' into the table 'head'. If there already \
+ * a matching element in the table, replace that element and return \
+ * it. */ \
+ static inline struct type * \
+ name##_HT_REPLACE(struct name *head, struct type *elm) \
+ { \
+ struct type **p, *r; \
+ if (!head->hth_table || head->hth_n_entries >= head->hth_load_limit) \
+ name##_HT_GROW(head, head->hth_n_entries+1); \
+ HT_SET_HASH_(elm, field, hashfn); \
+ p = name##_HT_FIND_P_(head, elm); \
+ r = *p; \
+ *p = elm; \
+ if (r && (r!=elm)) { \
+ elm->field.hte_next = r->field.hte_next; \
+ r->field.hte_next = NULL; \
+ return r; \
+ } else { \
+ ++head->hth_n_entries; \
+ return NULL; \
+ } \
+ } \
+ /* Remove any element matching 'elm' from the table 'head'. If such \
+ * an element is found, return it; otherwise return NULL. */ \
+ static inline struct type * \
+ name##_HT_REMOVE(struct name *head, struct type *elm) \
+ { \
+ struct type **p, *r; \
+ HT_SET_HASH_(elm, field, hashfn); \
+ p = name##_HT_FIND_P_(head,elm); \
+ if (!p || !*p) \
+ return NULL; \
+ r = *p; \
+ *p = r->field.hte_next; \
+ r->field.hte_next = NULL; \
+ --head->hth_n_entries; \
+ return r; \
+ } \
+ /* Invoke the function 'fn' on every element of the table 'head', \
+ * using 'data' as its second argument. If the function returns \
+ * nonzero, remove the most recently examined element before invoking \
+ * the function again. */ \
+ static inline void \
+ name##_HT_FOREACH_FN(struct name *head, \
+ int (*fn)(struct type *, void *), \
+ void *data) \
+ { \
+ unsigned idx; \
+ struct type **p, **nextp, *next; \
+ if (!head->hth_table) \
+ return; \
+ for (idx=0; idx < head->hth_table_length; ++idx) { \
+ p = &head->hth_table[idx]; \
+ while (*p) { \
+ nextp = &(*p)->field.hte_next; \
+ next = *nextp; \
+ if (fn(*p, data)) { \
+ --head->hth_n_entries; \
+ *p = next; \
+ } else { \
+ p = nextp; \
+ } \
+ } \
+ } \
+ } \
+ /* Return a pointer to the first element in the table 'head', under \
+ * an arbitrary order. This order is stable under remove operations, \
+ * but not under others. If the table is empty, return NULL. */ \
+ static inline struct type ** \
+ name##_HT_START(struct name *head) \
+ { \
+ unsigned b = 0; \
+ while (b < head->hth_table_length) { \
+ if (head->hth_table[b]) \
+ return &head->hth_table[b]; \
+ ++b; \
+ } \
+ return NULL; \
+ } \
+ /* Return the next element in 'head' after 'elm', under the arbitrary \
+ * order used by HT_START. If there are no more elements, return \
+ * NULL. If 'elm' is to be removed from the table, you must call \
+ * this function for the next value before you remove it. \
+ */ \
+ static inline struct type ** \
+ name##_HT_NEXT(struct name *head, struct type **elm) \
+ { \
+ if ((*elm)->field.hte_next) { \
+ return &(*elm)->field.hte_next; \
+ } else { \
+ unsigned b = (HT_ELT_HASH_(*elm, field, hashfn) % head->hth_table_length)+1; \
+ while (b < head->hth_table_length) { \
+ if (head->hth_table[b]) \
+ return &head->hth_table[b]; \
+ ++b; \
+ } \
+ return NULL; \
+ } \
+ } \
+ static inline struct type ** \
+ name##_HT_NEXT_RMV(struct name *head, struct type **elm) \
+ { \
+ unsigned h = HT_ELT_HASH_(*elm, field, hashfn); \
+ *elm = (*elm)->field.hte_next; \
+ --head->hth_n_entries; \
+ if (*elm) { \
+ return elm; \
+ } else { \
+ unsigned b = (h % head->hth_table_length)+1; \
+ while (b < head->hth_table_length) { \
+ if (head->hth_table[b]) \
+ return &head->hth_table[b]; \
+ ++b; \
+ } \
+ return NULL; \
+ } \
+ }
+
+#define HT_GENERATE(name, type, field, hashfn, eqfn, load, mallocfn, \
+ reallocfn, freefn) \
+ static unsigned name##_PRIMES[] = { \
+ 53, 97, 193, 389, \
+ 769, 1543, 3079, 6151, \
+ 12289, 24593, 49157, 98317, \
+ 196613, 393241, 786433, 1572869, \
+ 3145739, 6291469, 12582917, 25165843, \
+ 50331653, 100663319, 201326611, 402653189, \
+ 805306457, 1610612741 \
+ }; \
+ static unsigned name##_N_PRIMES = \
+ (unsigned)(sizeof(name##_PRIMES)/sizeof(name##_PRIMES[0])); \
+ /* Expand the internal table of 'head' until it is large enough to \
+ * hold 'size' elements. Return 0 on success, -1 on allocation \
+ * failure. */ \
+ int \
+ name##_HT_GROW(struct name *head, unsigned size) \
+ { \
+ unsigned new_len, new_load_limit; \
+ int prime_idx; \
+ struct type **new_table; \
+ if (head->hth_prime_idx == (int)name##_N_PRIMES - 1) \
+ return 0; \
+ if (head->hth_load_limit > size) \
+ return 0; \
+ prime_idx = head->hth_prime_idx; \
+ do { \
+ new_len = name##_PRIMES[++prime_idx]; \
+ new_load_limit = (unsigned)(load*new_len); \
+ } while (new_load_limit <= size && \
+ prime_idx < (int)name##_N_PRIMES); \
+ if ((new_table = mallocfn(new_len*sizeof(struct type*)))) { \
+ unsigned b; \
+ memset(new_table, 0, new_len*sizeof(struct type*)); \
+ for (b = 0; b < head->hth_table_length; ++b) { \
+ struct type *elm, *next; \
+ unsigned b2; \
+ elm = head->hth_table[b]; \
+ while (elm) { \
+ next = elm->field.hte_next; \
+ b2 = HT_ELT_HASH_(elm, field, hashfn) % new_len; \
+ elm->field.hte_next = new_table[b2]; \
+ new_table[b2] = elm; \
+ elm = next; \
+ } \
+ } \
+ if (head->hth_table) \
+ freefn(head->hth_table); \
+ head->hth_table = new_table; \
+ } else { \
+ unsigned b, b2; \
+ new_table = reallocfn(head->hth_table, new_len*sizeof(struct type*)); \
+ if (!new_table) return -1; \
+ memset(new_table + head->hth_table_length, 0, \
+ (new_len - head->hth_table_length)*sizeof(struct type*)); \
+ for (b=0; b < head->hth_table_length; ++b) { \
+ struct type *e, **pE; \
+ for (pE = &new_table[b], e = *pE; e != NULL; e = *pE) { \
+ b2 = HT_ELT_HASH_(e, field, hashfn) % new_len; \
+ if (b2 == b) { \
+ pE = &e->field.hte_next; \
+ } else { \
+ *pE = e->field.hte_next; \
+ e->field.hte_next = new_table[b2]; \
+ new_table[b2] = e; \
+ } \
+ } \
+ } \
+ head->hth_table = new_table; \
+ } \
+ head->hth_table_length = new_len; \
+ head->hth_prime_idx = prime_idx; \
+ head->hth_load_limit = new_load_limit; \
+ return 0; \
+ } \
+ /* Free all storage held by 'head'. Does not free 'head' itself, or \
+ * individual elements. */ \
+ void \
+ name##_HT_CLEAR(struct name *head) \
+ { \
+ if (head->hth_table) \
+ freefn(head->hth_table); \
+ head->hth_table_length = 0; \
+ name##_HT_INIT(head); \
+ } \
+ /* Debugging helper: return false iff the representation of 'head' is \
+ * internally consistent. */ \
+ int \
+ name##_HT_REP_IS_BAD_(const struct name *head) \
+ { \
+ unsigned n, i; \
+ struct type *elm; \
+ if (!head->hth_table_length) { \
+ if (!head->hth_table && !head->hth_n_entries && \
+ !head->hth_load_limit && head->hth_prime_idx == -1) \
+ return 0; \
+ else \
+ return 1; \
+ } \
+ if (!head->hth_table || head->hth_prime_idx < 0 || \
+ !head->hth_load_limit) \
+ return 2; \
+ if (head->hth_n_entries > head->hth_load_limit) \
+ return 3; \
+ if (head->hth_table_length != name##_PRIMES[head->hth_prime_idx]) \
+ return 4; \
+ if (head->hth_load_limit != (unsigned)(load*head->hth_table_length)) \
+ return 5; \
+ for (n = i = 0; i < head->hth_table_length; ++i) { \
+ for (elm = head->hth_table[i]; elm; elm = elm->field.hte_next) { \
+ if (HT_ELT_HASH_(elm, field, hashfn) != hashfn(elm)) \
+ return 1000 + i; \
+ if ((HT_ELT_HASH_(elm, field, hashfn) % head->hth_table_length) != i) \
+ return 10000 + i; \
+ ++n; \
+ } \
+ } \
+ if (n != head->hth_n_entries) \
+ return 6; \
+ return 0; \
+ }
+
+/** Implements an over-optimized "find and insert if absent" block;
+ * not meant for direct usage by typical code, or usage outside the critical
+ * path.*/
+#define HT_FIND_OR_INSERT_(name, field, hashfn, head, eltype, elm, var, y, n) \
+ { \
+ struct name *var##_head_ = head; \
+ struct eltype **var; \
+ if (!var##_head_->hth_table || \
+ var##_head_->hth_n_entries >= var##_head_->hth_load_limit) \
+ name##_HT_GROW(var##_head_, var##_head_->hth_n_entries+1); \
+ HT_SET_HASH_((elm), field, hashfn); \
+ var = name##_HT_FIND_P_(var##_head_, (elm)); \
+ if (*var) { \
+ y; \
+ } else { \
+ n; \
+ } \
+ }
+#define HT_FOI_INSERT_(field, head, elm, newent, var) \
+ { \
+ HT_SET_HASHVAL_(newent, field, (elm)->field.hte_hash); \
+ newent->field.hte_next = NULL; \
+ *var = newent; \
+ ++((head)->hth_n_entries); \
+ }
+
+/*
+ * Copyright 2005, Nick Mathewson. Implementation logic is adapted from code
+ * by Christopher Clark, retrofit to allow drop-in memory management, and to
+ * use the same interface as Niels Provos's tree.h. This is probably still
+ * a derived work, so the original license below still applies.
+ *
+ * Copyright (c) 2002, Christopher Clark
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * 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.
+ *
+ * * Neither the name of the original author; nor the names of any contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER
+ * 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.
+*/
+
+#endif
+
diff --git a/sntp/libevent/http-internal.h b/sntp/libevent/http-internal.h
new file mode 100644
index 000000000000..82dd402a0626
--- /dev/null
+++ b/sntp/libevent/http-internal.h
@@ -0,0 +1,204 @@
+/*
+ * Copyright 2001-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * This header file contains definitions for dealing with HTTP requests
+ * that are internal to libevent. As user of the library, you should not
+ * need to know about these.
+ */
+
+#ifndef HTTP_INTERNAL_H_INCLUDED_
+#define HTTP_INTERNAL_H_INCLUDED_
+
+#include "event2/event_struct.h"
+#include "util-internal.h"
+#include "defer-internal.h"
+
+#define HTTP_CONNECT_TIMEOUT 45
+#define HTTP_WRITE_TIMEOUT 50
+#define HTTP_READ_TIMEOUT 50
+
+#define HTTP_PREFIX "http://"
+#define HTTP_DEFAULTPORT 80
+
+enum message_read_status {
+ ALL_DATA_READ = 1,
+ MORE_DATA_EXPECTED = 0,
+ DATA_CORRUPTED = -1,
+ REQUEST_CANCELED = -2,
+ DATA_TOO_LONG = -3
+};
+
+struct evbuffer;
+struct addrinfo;
+struct evhttp_request;
+
+/* Indicates an unknown request method. */
+#define EVHTTP_REQ_UNKNOWN_ (1<<15)
+
+enum evhttp_connection_state {
+ EVCON_DISCONNECTED, /**< not currently connected not trying either*/
+ EVCON_CONNECTING, /**< tries to currently connect */
+ EVCON_IDLE, /**< connection is established */
+ EVCON_READING_FIRSTLINE,/**< reading Request-Line (incoming conn) or
+ **< Status-Line (outgoing conn) */
+ EVCON_READING_HEADERS, /**< reading request/response headers */
+ EVCON_READING_BODY, /**< reading request/response body */
+ EVCON_READING_TRAILER, /**< reading request/response chunked trailer */
+ EVCON_WRITING /**< writing request/response headers/body */
+};
+
+struct event_base;
+
+/* A client or server connection. */
+struct evhttp_connection {
+ /* we use this tailq only if this connection was created for an http
+ * server */
+ TAILQ_ENTRY(evhttp_connection) next;
+
+ evutil_socket_t fd;
+ struct bufferevent *bufev;
+
+ struct event retry_ev; /* for retrying connects */
+
+ char *bind_address; /* address to use for binding the src */
+ u_short bind_port; /* local port for binding the src */
+
+ char *address; /* address to connect to */
+ u_short port;
+
+ size_t max_headers_size;
+ ev_uint64_t max_body_size;
+
+ int flags;
+#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
+#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */
+#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */
+
+ struct timeval timeout; /* timeout for events */
+ int retry_cnt; /* retry count */
+ int retry_max; /* maximum number of retries */
+ struct timeval initial_retry_timeout; /* Timeout for low long to wait
+ * after first failing attempt
+ * before retry */
+
+ enum evhttp_connection_state state;
+
+ /* for server connections, the http server they are connected with */
+ struct evhttp *http_server;
+
+ TAILQ_HEAD(evcon_requestq, evhttp_request) requests;
+
+ void (*cb)(struct evhttp_connection *, void *);
+ void *cb_arg;
+
+ void (*closecb)(struct evhttp_connection *, void *);
+ void *closecb_arg;
+
+ struct event_callback read_more_deferred_cb;
+
+ struct event_base *base;
+ struct evdns_base *dns_base;
+
+ /* Saved conn_addr, to extract IP address from it.
+ *
+ * Because some servers may reset/close connection without waiting clients,
+ * in that case we can't extract IP address even in close_cb.
+ * So we need to save it, just after we connected to remote server. */
+ struct sockaddr_storage *conn_address;
+};
+
+/* A callback for an http server */
+struct evhttp_cb {
+ TAILQ_ENTRY(evhttp_cb) next;
+
+ char *what;
+
+ void (*cb)(struct evhttp_request *req, void *);
+ void *cbarg;
+};
+
+/* both the http server as well as the rpc system need to queue connections */
+TAILQ_HEAD(evconq, evhttp_connection);
+
+/* each bound socket is stored in one of these */
+struct evhttp_bound_socket {
+ TAILQ_ENTRY(evhttp_bound_socket) next;
+
+ struct evconnlistener *listener;
+};
+
+/* server alias list item. */
+struct evhttp_server_alias {
+ TAILQ_ENTRY(evhttp_server_alias) next;
+
+ char *alias; /* the server alias. */
+};
+
+struct evhttp {
+ /* Next vhost, if this is a vhost. */
+ TAILQ_ENTRY(evhttp) next_vhost;
+
+ /* All listeners for this host */
+ TAILQ_HEAD(boundq, evhttp_bound_socket) sockets;
+
+ TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
+
+ /* All live connections on this host. */
+ struct evconq connections;
+
+ TAILQ_HEAD(vhostsq, evhttp) virtualhosts;
+
+ TAILQ_HEAD(aliasq, evhttp_server_alias) aliases;
+
+ /* NULL if this server is not a vhost */
+ char *vhost_pattern;
+
+ struct timeval timeout;
+
+ size_t default_max_headers_size;
+ ev_uint64_t default_max_body_size;
+ const char *default_content_type;
+
+ /* Bitmask of all HTTP methods that we accept and pass to user
+ * callbacks. */
+ ev_uint16_t allowed_methods;
+
+ /* Fallback callback if all the other callbacks for this connection
+ don't match. */
+ void (*gencb)(struct evhttp_request *req, void *);
+ void *gencbarg;
+ struct bufferevent* (*bevcb)(struct event_base *, void *);
+ void *bevcbarg;
+
+ struct event_base *base;
+};
+
+/* XXX most of these functions could be static. */
+
+/* resets the connection; can be reused for more requests */
+void evhttp_connection_reset_(struct evhttp_connection *);
+
+/* connects if necessary */
+int evhttp_connection_connect_(struct evhttp_connection *);
+
+enum evhttp_request_error;
+/* notifies the current request that it failed; resets connection */
+void evhttp_connection_fail_(struct evhttp_connection *,
+ enum evhttp_request_error error);
+
+enum message_read_status;
+
+enum message_read_status evhttp_parse_firstline_(struct evhttp_request *, struct evbuffer*);
+enum message_read_status evhttp_parse_headers_(struct evhttp_request *, struct evbuffer*);
+
+void evhttp_start_read_(struct evhttp_connection *);
+
+/* response sending HTML the data in the buffer */
+void evhttp_response_code_(struct evhttp_request *, int, const char *);
+void evhttp_send_page_(struct evhttp_request *, struct evbuffer *);
+
+int evhttp_decode_uri_internal(const char *uri, size_t length,
+ char *ret, int decode_plus);
+
+#endif /* _HTTP_H */
diff --git a/sntp/libevent/http.c b/sntp/libevent/http.c
new file mode 100644
index 000000000000..51470225e9bb
--- /dev/null
+++ b/sntp/libevent/http.c
@@ -0,0 +1,4814 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
+#ifndef _WIN32
+#include <sys/resource.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
+#include <sys/queue.h>
+
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef EVENT__HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef EVENT__HAVE_NETDB_H
+#include <netdb.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef _WIN32
+#include <syslog.h>
+#endif
+#include <signal.h>
+#include <time.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#undef timeout_pending
+#undef timeout_initialized
+
+#include "strlcpy-internal.h"
+#include "event2/http.h"
+#include "event2/event.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent.h"
+#include "event2/http_struct.h"
+#include "event2/http_compat.h"
+#include "event2/util.h"
+#include "event2/listener.h"
+#include "log-internal.h"
+#include "util-internal.h"
+#include "http-internal.h"
+#include "mm-internal.h"
+#include "bufferevent-internal.h"
+
+#ifndef EVENT__HAVE_GETNAMEINFO
+#define NI_MAXSERV 32
+#define NI_MAXHOST 1025
+
+#ifndef NI_NUMERICHOST
+#define NI_NUMERICHOST 1
+#endif
+
+#ifndef NI_NUMERICSERV
+#define NI_NUMERICSERV 2
+#endif
+
+static int
+fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
+ size_t hostlen, char *serv, size_t servlen, int flags)
+{
+ struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+
+ if (serv != NULL) {
+ char tmpserv[16];
+ evutil_snprintf(tmpserv, sizeof(tmpserv),
+ "%d", ntohs(sin->sin_port));
+ if (strlcpy(serv, tmpserv, servlen) >= servlen)
+ return (-1);
+ }
+
+ if (host != NULL) {
+ if (flags & NI_NUMERICHOST) {
+ if (strlcpy(host, inet_ntoa(sin->sin_addr),
+ hostlen) >= hostlen)
+ return (-1);
+ else
+ return (0);
+ } else {
+ struct hostent *hp;
+ hp = gethostbyaddr((char *)&sin->sin_addr,
+ sizeof(struct in_addr), AF_INET);
+ if (hp == NULL)
+ return (-2);
+
+ if (strlcpy(host, hp->h_name, hostlen) >= hostlen)
+ return (-1);
+ else
+ return (0);
+ }
+ }
+ return (0);
+}
+
+#endif
+
+#define REQ_VERSION_BEFORE(req, major_v, minor_v) \
+ ((req)->major < (major_v) || \
+ ((req)->major == (major_v) && (req)->minor < (minor_v)))
+
+#define REQ_VERSION_ATLEAST(req, major_v, minor_v) \
+ ((req)->major > (major_v) || \
+ ((req)->major == (major_v) && (req)->minor >= (minor_v)))
+
+#ifndef MIN
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+
+extern int debug;
+
+static evutil_socket_t bind_socket_ai(struct evutil_addrinfo *, int reuse);
+static evutil_socket_t bind_socket(const char *, ev_uint16_t, int reuse);
+static void name_from_addr(struct sockaddr *, ev_socklen_t, char **, char **);
+static int evhttp_associate_new_request_with_connection(
+ struct evhttp_connection *evcon);
+static void evhttp_connection_start_detectclose(
+ struct evhttp_connection *evcon);
+static void evhttp_connection_stop_detectclose(
+ struct evhttp_connection *evcon);
+static void evhttp_request_dispatch(struct evhttp_connection* evcon);
+static void evhttp_read_firstline(struct evhttp_connection *evcon,
+ struct evhttp_request *req);
+static void evhttp_read_header(struct evhttp_connection *evcon,
+ struct evhttp_request *req);
+static int evhttp_add_header_internal(struct evkeyvalq *headers,
+ const char *key, const char *value);
+static const char *evhttp_response_phrase_internal(int code);
+static void evhttp_get_request(struct evhttp *, evutil_socket_t, struct sockaddr *, ev_socklen_t);
+static void evhttp_write_buffer(struct evhttp_connection *,
+ void (*)(struct evhttp_connection *, void *), void *);
+static void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *);
+
+/* callbacks for bufferevent */
+static void evhttp_read_cb(struct bufferevent *, void *);
+static void evhttp_write_cb(struct bufferevent *, void *);
+static void evhttp_error_cb(struct bufferevent *bufev, short what, void *arg);
+static int evhttp_find_vhost(struct evhttp *http, struct evhttp **outhttp,
+ const char *hostname);
+
+#ifndef EVENT__HAVE_STRSEP
+/* strsep replacement for platforms that lack it. Only works if
+ * del is one character long. */
+static char *
+strsep(char **s, const char *del)
+{
+ char *d, *tok;
+ EVUTIL_ASSERT(strlen(del) == 1);
+ if (!s || !*s)
+ return NULL;
+ tok = *s;
+ d = strstr(tok, del);
+ if (d) {
+ *d = '\0';
+ *s = d + 1;
+ } else
+ *s = NULL;
+ return tok;
+}
+#endif
+
+static size_t
+html_replace(const char ch, const char **escaped)
+{
+ switch (ch) {
+ case '<':
+ *escaped = "&lt;";
+ return 4;
+ case '>':
+ *escaped = "&gt;";
+ return 4;
+ case '"':
+ *escaped = "&quot;";
+ return 6;
+ case '\'':
+ *escaped = "&#039;";
+ return 6;
+ case '&':
+ *escaped = "&amp;";
+ return 5;
+ default:
+ break;
+ }
+
+ return 1;
+}
+
+/*
+ * Replaces <, >, ", ' and & with &lt;, &gt;, &quot;,
+ * &#039; and &amp; correspondingly.
+ *
+ * The returned string needs to be freed by the caller.
+ */
+
+char *
+evhttp_htmlescape(const char *html)
+{
+ size_t i;
+ size_t new_size = 0, old_size = 0;
+ char *escaped_html, *p;
+
+ if (html == NULL)
+ return (NULL);
+
+ old_size = strlen(html);
+ for (i = 0; i < old_size; ++i) {
+ const char *replaced = NULL;
+ const size_t replace_size = html_replace(html[i], &replaced);
+ if (replace_size > EV_SIZE_MAX - new_size) {
+ event_warn("%s: html_replace overflow", __func__);
+ return (NULL);
+ }
+ new_size += replace_size;
+ }
+
+ if (new_size == EV_SIZE_MAX)
+ return (NULL);
+ p = escaped_html = mm_malloc(new_size + 1);
+ if (escaped_html == NULL) {
+ event_warn("%s: malloc(%lu)", __func__,
+ (unsigned long)(new_size + 1));
+ return (NULL);
+ }
+ for (i = 0; i < old_size; ++i) {
+ const char *replaced = &html[i];
+ const size_t len = html_replace(html[i], &replaced);
+ memcpy(p, replaced, len);
+ p += len;
+ }
+
+ *p = '\0';
+
+ return (escaped_html);
+}
+
+/** Given an evhttp_cmd_type, returns a constant string containing the
+ * equivalent HTTP command, or NULL if the evhttp_command_type is
+ * unrecognized. */
+static const char *
+evhttp_method(enum evhttp_cmd_type type)
+{
+ const char *method;
+
+ switch (type) {
+ case EVHTTP_REQ_GET:
+ method = "GET";
+ break;
+ case EVHTTP_REQ_POST:
+ method = "POST";
+ break;
+ case EVHTTP_REQ_HEAD:
+ method = "HEAD";
+ break;
+ case EVHTTP_REQ_PUT:
+ method = "PUT";
+ break;
+ case EVHTTP_REQ_DELETE:
+ method = "DELETE";
+ break;
+ case EVHTTP_REQ_OPTIONS:
+ method = "OPTIONS";
+ break;
+ case EVHTTP_REQ_TRACE:
+ method = "TRACE";
+ break;
+ case EVHTTP_REQ_CONNECT:
+ method = "CONNECT";
+ break;
+ case EVHTTP_REQ_PATCH:
+ method = "PATCH";
+ break;
+ default:
+ method = NULL;
+ break;
+ }
+
+ return (method);
+}
+
+/**
+ * Determines if a response should have a body.
+ * Follows the rules in RFC 2616 section 4.3.
+ * @return 1 if the response MUST have a body; 0 if the response MUST NOT have
+ * a body.
+ */
+static int
+evhttp_response_needs_body(struct evhttp_request *req)
+{
+ return (req->response_code != HTTP_NOCONTENT &&
+ req->response_code != HTTP_NOTMODIFIED &&
+ (req->response_code < 100 || req->response_code >= 200) &&
+ req->type != EVHTTP_REQ_HEAD);
+}
+
+/** Helper: called after we've added some data to an evcon's bufferevent's
+ * output buffer. Sets the evconn's writing-is-done callback, and puts
+ * the bufferevent into writing mode.
+ */
+static void
+evhttp_write_buffer(struct evhttp_connection *evcon,
+ void (*cb)(struct evhttp_connection *, void *), void *arg)
+{
+ event_debug(("%s: preparing to write buffer\n", __func__));
+
+ /* Set call back */
+ evcon->cb = cb;
+ evcon->cb_arg = arg;
+
+ /* Disable the read callback: we don't actually care about data;
+ * we only care about close detection. (We don't disable reading,
+ * since we *do* want to learn about any close events.) */
+ bufferevent_setcb(evcon->bufev,
+ NULL, /*read*/
+ evhttp_write_cb,
+ evhttp_error_cb,
+ evcon);
+
+ bufferevent_enable(evcon->bufev, EV_WRITE);
+}
+
+static void
+evhttp_send_continue_done(struct evhttp_connection *evcon, void *arg)
+{
+ bufferevent_disable(evcon->bufev, EV_WRITE);
+}
+
+static void
+evhttp_send_continue(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ bufferevent_enable(evcon->bufev, EV_WRITE);
+ evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
+ "HTTP/%d.%d 100 Continue\r\n\r\n",
+ req->major, req->minor);
+ evcon->cb = evhttp_send_continue_done;
+ evcon->cb_arg = NULL;
+ bufferevent_setcb(evcon->bufev,
+ evhttp_read_cb,
+ evhttp_write_cb,
+ evhttp_error_cb,
+ evcon);
+}
+
+/** Helper: returns true iff evconn is in any connected state. */
+static int
+evhttp_connected(struct evhttp_connection *evcon)
+{
+ switch (evcon->state) {
+ case EVCON_DISCONNECTED:
+ case EVCON_CONNECTING:
+ return (0);
+ case EVCON_IDLE:
+ case EVCON_READING_FIRSTLINE:
+ case EVCON_READING_HEADERS:
+ case EVCON_READING_BODY:
+ case EVCON_READING_TRAILER:
+ case EVCON_WRITING:
+ default:
+ return (1);
+ }
+}
+
+/* Create the headers needed for an outgoing HTTP request, adds them to
+ * the request's header list, and writes the request line to the
+ * connection's output buffer.
+ */
+static void
+evhttp_make_header_request(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ const char *method;
+
+ evhttp_remove_header(req->output_headers, "Proxy-Connection");
+
+ /* Generate request line */
+ method = evhttp_method(req->type);
+ evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
+ "%s %s HTTP/%d.%d\r\n",
+ method, req->uri, req->major, req->minor);
+
+ /* Add the content length on a post or put request if missing */
+ if ((req->type == EVHTTP_REQ_POST || req->type == EVHTTP_REQ_PUT) &&
+ evhttp_find_header(req->output_headers, "Content-Length") == NULL){
+ char size[22];
+ evutil_snprintf(size, sizeof(size), EV_SIZE_FMT,
+ EV_SIZE_ARG(evbuffer_get_length(req->output_buffer)));
+ evhttp_add_header(req->output_headers, "Content-Length", size);
+ }
+}
+
+/** Return true if the list of headers in 'headers', intepreted with respect
+ * to flags, means that we should send a "connection: close" when the request
+ * is done. */
+static int
+evhttp_is_connection_close(int flags, struct evkeyvalq* headers)
+{
+ if (flags & EVHTTP_PROXY_REQUEST) {
+ /* proxy connection */
+ const char *connection = evhttp_find_header(headers, "Proxy-Connection");
+ return (connection == NULL || evutil_ascii_strcasecmp(connection, "keep-alive") != 0);
+ } else {
+ const char *connection = evhttp_find_header(headers, "Connection");
+ return (connection != NULL && evutil_ascii_strcasecmp(connection, "close") == 0);
+ }
+}
+
+/* Return true iff 'headers' contains 'Connection: keep-alive' */
+static int
+evhttp_is_connection_keepalive(struct evkeyvalq* headers)
+{
+ const char *connection = evhttp_find_header(headers, "Connection");
+ return (connection != NULL
+ && evutil_ascii_strncasecmp(connection, "keep-alive", 10) == 0);
+}
+
+/* Add a correct "Date" header to headers, unless it already has one. */
+static void
+evhttp_maybe_add_date_header(struct evkeyvalq *headers)
+{
+ if (evhttp_find_header(headers, "Date") == NULL) {
+ char date[50];
+#ifndef _WIN32
+ struct tm cur;
+#endif
+ struct tm *cur_p;
+ time_t t = time(NULL);
+#ifdef _WIN32
+ cur_p = gmtime(&t);
+#else
+ gmtime_r(&t, &cur);
+ cur_p = &cur;
+#endif
+ if (strftime(date, sizeof(date),
+ "%a, %d %b %Y %H:%M:%S GMT", cur_p) != 0) {
+ evhttp_add_header(headers, "Date", date);
+ }
+ }
+}
+
+/* Add a "Content-Length" header with value 'content_length' to headers,
+ * unless it already has a content-length or transfer-encoding header. */
+static void
+evhttp_maybe_add_content_length_header(struct evkeyvalq *headers,
+ size_t content_length)
+{
+ if (evhttp_find_header(headers, "Transfer-Encoding") == NULL &&
+ evhttp_find_header(headers, "Content-Length") == NULL) {
+ char len[22];
+ evutil_snprintf(len, sizeof(len), EV_SIZE_FMT,
+ EV_SIZE_ARG(content_length));
+ evhttp_add_header(headers, "Content-Length", len);
+ }
+}
+
+/*
+ * Create the headers needed for an HTTP reply in req->output_headers,
+ * and write the first HTTP response for req line to evcon.
+ */
+static void
+evhttp_make_header_response(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ int is_keepalive = evhttp_is_connection_keepalive(req->input_headers);
+ evbuffer_add_printf(bufferevent_get_output(evcon->bufev),
+ "HTTP/%d.%d %d %s\r\n",
+ req->major, req->minor, req->response_code,
+ req->response_code_line);
+
+ if (req->major == 1) {
+ if (req->minor >= 1)
+ evhttp_maybe_add_date_header(req->output_headers);
+
+ /*
+ * if the protocol is 1.0; and the connection was keep-alive
+ * we need to add a keep-alive header, too.
+ */
+ if (req->minor == 0 && is_keepalive)
+ evhttp_add_header(req->output_headers,
+ "Connection", "keep-alive");
+
+ if ((req->minor >= 1 || is_keepalive) &&
+ evhttp_response_needs_body(req)) {
+ /*
+ * we need to add the content length if the
+ * user did not give it, this is required for
+ * persistent connections to work.
+ */
+ evhttp_maybe_add_content_length_header(
+ req->output_headers,
+ evbuffer_get_length(req->output_buffer));
+ }
+ }
+
+ /* Potentially add headers for unidentified content. */
+ if (evhttp_response_needs_body(req)) {
+ if (evhttp_find_header(req->output_headers,
+ "Content-Type") == NULL
+ && evcon->http_server->default_content_type) {
+ evhttp_add_header(req->output_headers,
+ "Content-Type",
+ evcon->http_server->default_content_type);
+ }
+ }
+
+ /* if the request asked for a close, we send a close, too */
+ if (evhttp_is_connection_close(req->flags, req->input_headers)) {
+ evhttp_remove_header(req->output_headers, "Connection");
+ if (!(req->flags & EVHTTP_PROXY_REQUEST))
+ evhttp_add_header(req->output_headers, "Connection", "close");
+ evhttp_remove_header(req->output_headers, "Proxy-Connection");
+ }
+}
+
+/** Generate all headers appropriate for sending the http request in req (or
+ * the response, if we're sending a response), and write them to evcon's
+ * bufferevent. Also writes all data from req->output_buffer */
+static void
+evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req)
+{
+ struct evkeyval *header;
+ struct evbuffer *output = bufferevent_get_output(evcon->bufev);
+
+ /*
+ * Depending if this is a HTTP request or response, we might need to
+ * add some new headers or remove existing headers.
+ */
+ if (req->kind == EVHTTP_REQUEST) {
+ evhttp_make_header_request(evcon, req);
+ } else {
+ evhttp_make_header_response(evcon, req);
+ }
+
+ TAILQ_FOREACH(header, req->output_headers, next) {
+ evbuffer_add_printf(output, "%s: %s\r\n",
+ header->key, header->value);
+ }
+ evbuffer_add(output, "\r\n", 2);
+
+ if (evbuffer_get_length(req->output_buffer) > 0) {
+ /*
+ * For a request, we add the POST data, for a reply, this
+ * is the regular data.
+ */
+ /* XXX We might want to support waiting (a limited amount of
+ time) for a continue status line from the server before
+ sending POST/PUT message bodies. */
+ evbuffer_add_buffer(output, req->output_buffer);
+ }
+}
+
+void
+evhttp_connection_set_max_headers_size(struct evhttp_connection *evcon,
+ ev_ssize_t new_max_headers_size)
+{
+ if (new_max_headers_size<0)
+ evcon->max_headers_size = EV_SIZE_MAX;
+ else
+ evcon->max_headers_size = new_max_headers_size;
+}
+void
+evhttp_connection_set_max_body_size(struct evhttp_connection* evcon,
+ ev_ssize_t new_max_body_size)
+{
+ if (new_max_body_size<0)
+ evcon->max_body_size = EV_UINT64_MAX;
+ else
+ evcon->max_body_size = new_max_body_size;
+}
+
+static int
+evhttp_connection_incoming_fail(struct evhttp_request *req,
+ enum evhttp_request_error error)
+{
+ switch (error) {
+ case EVREQ_HTTP_TIMEOUT:
+ case EVREQ_HTTP_EOF:
+ /*
+ * these are cases in which we probably should just
+ * close the connection and not send a reply. this
+ * case may happen when a browser keeps a persistent
+ * connection open and we timeout on the read. when
+ * the request is still being used for sending, we
+ * need to disassociated it from the connection here.
+ */
+ if (!req->userdone) {
+ /* remove it so that it will not be freed */
+ TAILQ_REMOVE(&req->evcon->requests, req, next);
+ /* indicate that this request no longer has a
+ * connection object
+ */
+ req->evcon = NULL;
+ }
+ return (-1);
+ case EVREQ_HTTP_INVALID_HEADER:
+ case EVREQ_HTTP_BUFFER_ERROR:
+ case EVREQ_HTTP_REQUEST_CANCEL:
+ case EVREQ_HTTP_DATA_TOO_LONG:
+ default: /* xxx: probably should just error on default */
+ /* the callback looks at the uri to determine errors */
+ if (req->uri) {
+ mm_free(req->uri);
+ req->uri = NULL;
+ }
+ if (req->uri_elems) {
+ evhttp_uri_free(req->uri_elems);
+ req->uri_elems = NULL;
+ }
+
+ /*
+ * the callback needs to send a reply, once the reply has
+ * been send, the connection should get freed.
+ */
+ (*req->cb)(req, req->cb_arg);
+ }
+
+ return (0);
+}
+
+/* Called when evcon has experienced a (non-recoverable? -NM) error, as
+ * given in error. If it's an outgoing connection, reset the connection,
+ * retry any pending requests, and inform the user. If it's incoming,
+ * delegates to evhttp_connection_incoming_fail(). */
+void
+evhttp_connection_fail_(struct evhttp_connection *evcon,
+ enum evhttp_request_error error)
+{
+ const int errsave = EVUTIL_SOCKET_ERROR();
+ struct evhttp_request* req = TAILQ_FIRST(&evcon->requests);
+ void (*cb)(struct evhttp_request *, void *);
+ void *cb_arg;
+ void (*error_cb)(enum evhttp_request_error, void *);
+ void *error_cb_arg;
+ EVUTIL_ASSERT(req != NULL);
+
+ bufferevent_disable(evcon->bufev, EV_READ|EV_WRITE);
+
+ if (evcon->flags & EVHTTP_CON_INCOMING) {
+ /*
+ * for incoming requests, there are two different
+ * failure cases. it's either a network level error
+ * or an http layer error. for problems on the network
+ * layer like timeouts we just drop the connections.
+ * For HTTP problems, we might have to send back a
+ * reply before the connection can be freed.
+ */
+ if (evhttp_connection_incoming_fail(req, error) == -1)
+ evhttp_connection_free(evcon);
+ return;
+ }
+
+ error_cb = req->error_cb;
+ error_cb_arg = req->cb_arg;
+ /* when the request was canceled, the callback is not executed */
+ if (error != EVREQ_HTTP_REQUEST_CANCEL) {
+ /* save the callback for later; the cb might free our object */
+ cb = req->cb;
+ cb_arg = req->cb_arg;
+ } else {
+ cb = NULL;
+ cb_arg = NULL;
+ }
+
+ /* do not fail all requests; the next request is going to get
+ * send over a new connection. when a user cancels a request,
+ * all other pending requests should be processed as normal
+ */
+ TAILQ_REMOVE(&evcon->requests, req, next);
+ evhttp_request_free(req);
+
+ /* reset the connection */
+ evhttp_connection_reset_(evcon);
+
+ /* We are trying the next request that was queued on us */
+ if (TAILQ_FIRST(&evcon->requests) != NULL)
+ evhttp_connection_connect_(evcon);
+
+ /* The call to evhttp_connection_reset_ overwrote errno.
+ * Let's restore the original errno, so that the user's
+ * callback can have a better idea of what the error was.
+ */
+ EVUTIL_SET_SOCKET_ERROR(errsave);
+
+ /* inform the user */
+ if (error_cb != NULL)
+ error_cb(error, error_cb_arg);
+ if (cb != NULL)
+ (*cb)(NULL, cb_arg);
+}
+
+/* Bufferevent callback: invoked when any data has been written from an
+ * http connection's bufferevent */
+static void
+evhttp_write_cb(struct bufferevent *bufev, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+
+ /* Activate our call back */
+ if (evcon->cb != NULL)
+ (*evcon->cb)(evcon, evcon->cb_arg);
+}
+
+/**
+ * Advance the connection state.
+ * - If this is an outgoing connection, we've just processed the response;
+ * idle or close the connection.
+ * - If this is an incoming connection, we've just processed the request;
+ * respond.
+ */
+static void
+evhttp_connection_done(struct evhttp_connection *evcon)
+{
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+ int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING;
+
+ if (con_outgoing) {
+ /* idle or close the connection */
+ int need_close;
+ TAILQ_REMOVE(&evcon->requests, req, next);
+ req->evcon = NULL;
+
+ evcon->state = EVCON_IDLE;
+
+ need_close =
+ evhttp_is_connection_close(req->flags, req->input_headers)||
+ evhttp_is_connection_close(req->flags, req->output_headers);
+
+ /* check if we got asked to close the connection */
+ if (need_close)
+ evhttp_connection_reset_(evcon);
+
+ if (TAILQ_FIRST(&evcon->requests) != NULL) {
+ /*
+ * We have more requests; reset the connection
+ * and deal with the next request.
+ */
+ if (!evhttp_connected(evcon))
+ evhttp_connection_connect_(evcon);
+ else
+ evhttp_request_dispatch(evcon);
+ } else if (!need_close) {
+ /*
+ * The connection is going to be persistent, but we
+ * need to detect if the other side closes it.
+ */
+ evhttp_connection_start_detectclose(evcon);
+ }
+ } else {
+ /*
+ * incoming connection - we need to leave the request on the
+ * connection so that we can reply to it.
+ */
+ evcon->state = EVCON_WRITING;
+ }
+
+ /* notify the user of the request */
+ (*req->cb)(req, req->cb_arg);
+
+ /* if this was an outgoing request, we own and it's done. so free it.
+ * unless the callback specifically requested to own the request.
+ */
+ if (con_outgoing && ((req->flags & EVHTTP_USER_OWNED) == 0)) {
+ evhttp_request_free(req);
+ }
+}
+
+/*
+ * Handles reading from a chunked request.
+ * return ALL_DATA_READ:
+ * all data has been read
+ * return MORE_DATA_EXPECTED:
+ * more data is expected
+ * return DATA_CORRUPTED:
+ * data is corrupted
+ * return REQUEST_CANCELED:
+ * request was canceled by the user calling evhttp_cancel_request
+ * return DATA_TOO_LONG:
+ * ran over the maximum limit
+ */
+
+static enum message_read_status
+evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
+{
+ if (req == NULL || buf == NULL) {
+ return DATA_CORRUPTED;
+ }
+
+ while (1) {
+ size_t buflen;
+
+ if ((buflen = evbuffer_get_length(buf)) == 0) {
+ break;
+ }
+
+ /* evbuffer_get_length returns size_t, but len variable is ssize_t,
+ * check for overflow conditions */
+ if (buflen > EV_SSIZE_MAX) {
+ return DATA_CORRUPTED;
+ }
+
+ if (req->ntoread < 0) {
+ /* Read chunk size */
+ ev_int64_t ntoread;
+ char *p = evbuffer_readln(buf, NULL, EVBUFFER_EOL_CRLF);
+ char *endp;
+ int error;
+ if (p == NULL)
+ break;
+ /* the last chunk is on a new line? */
+ if (strlen(p) == 0) {
+ mm_free(p);
+ continue;
+ }
+ ntoread = evutil_strtoll(p, &endp, 16);
+ error = (*p == '\0' ||
+ (*endp != '\0' && *endp != ' ') ||
+ ntoread < 0);
+ mm_free(p);
+ if (error) {
+ /* could not get chunk size */
+ return (DATA_CORRUPTED);
+ }
+
+ /* ntoread is signed int64, body_size is unsigned size_t, check for under/overflow conditions */
+ if ((ev_uint64_t)ntoread > EV_SIZE_MAX - req->body_size) {
+ return DATA_CORRUPTED;
+ }
+
+ if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) {
+ /* failed body length test */
+ event_debug(("Request body is too long"));
+ return (DATA_TOO_LONG);
+ }
+
+ req->body_size += (size_t)ntoread;
+ req->ntoread = ntoread;
+ if (req->ntoread == 0) {
+ /* Last chunk */
+ return (ALL_DATA_READ);
+ }
+ continue;
+ }
+
+ /* req->ntoread is signed int64, len is ssize_t, based on arch,
+ * ssize_t could only be 32b, check for these conditions */
+ if (req->ntoread > EV_SSIZE_MAX) {
+ return DATA_CORRUPTED;
+ }
+
+ /* don't have enough to complete a chunk; wait for more */
+ if (req->ntoread > 0 && buflen < (ev_uint64_t)req->ntoread)
+ return (MORE_DATA_EXPECTED);
+
+ /* Completed chunk */
+ evbuffer_remove_buffer(buf, req->input_buffer, (size_t)req->ntoread);
+ req->ntoread = -1;
+ if (req->chunk_cb != NULL) {
+ req->flags |= EVHTTP_REQ_DEFER_FREE;
+ (*req->chunk_cb)(req, req->cb_arg);
+ evbuffer_drain(req->input_buffer,
+ evbuffer_get_length(req->input_buffer));
+ req->flags &= ~EVHTTP_REQ_DEFER_FREE;
+ if ((req->flags & EVHTTP_REQ_NEEDS_FREE) != 0) {
+ return (REQUEST_CANCELED);
+ }
+ }
+ }
+
+ return (MORE_DATA_EXPECTED);
+}
+
+static void
+evhttp_read_trailer(struct evhttp_connection *evcon, struct evhttp_request *req)
+{
+ struct evbuffer *buf = bufferevent_get_input(evcon->bufev);
+
+ switch (evhttp_parse_headers_(req, buf)) {
+ case DATA_CORRUPTED:
+ case DATA_TOO_LONG:
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_DATA_TOO_LONG);
+ break;
+ case ALL_DATA_READ:
+ bufferevent_disable(evcon->bufev, EV_READ);
+ evhttp_connection_done(evcon);
+ break;
+ case MORE_DATA_EXPECTED:
+ case REQUEST_CANCELED: /* ??? */
+ default:
+ bufferevent_enable(evcon->bufev, EV_READ);
+ break;
+ }
+}
+
+static void
+evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
+{
+ struct evbuffer *buf = bufferevent_get_input(evcon->bufev);
+
+ if (req->chunked) {
+ switch (evhttp_handle_chunked_read(req, buf)) {
+ case ALL_DATA_READ:
+ /* finished last chunk */
+ evcon->state = EVCON_READING_TRAILER;
+ evhttp_read_trailer(evcon, req);
+ return;
+ case DATA_CORRUPTED:
+ case DATA_TOO_LONG:
+ /* corrupted data */
+ evhttp_connection_fail_(evcon,
+ EVREQ_HTTP_DATA_TOO_LONG);
+ return;
+ case REQUEST_CANCELED:
+ /* request canceled */
+ evhttp_request_free(req);
+ return;
+ case MORE_DATA_EXPECTED:
+ default:
+ break;
+ }
+ } else if (req->ntoread < 0) {
+ /* Read until connection close. */
+ if ((size_t)(req->body_size + evbuffer_get_length(buf)) < req->body_size) {
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_INVALID_HEADER);
+ return;
+ }
+
+ req->body_size += evbuffer_get_length(buf);
+ evbuffer_add_buffer(req->input_buffer, buf);
+ } else if (req->chunk_cb != NULL || evbuffer_get_length(buf) >= (size_t)req->ntoread) {
+ /* XXX: the above get_length comparison has to be fixed for overflow conditions! */
+ /* We've postponed moving the data until now, but we're
+ * about to use it. */
+ size_t n = evbuffer_get_length(buf);
+
+ if (n > (size_t) req->ntoread)
+ n = (size_t) req->ntoread;
+ req->ntoread -= n;
+ req->body_size += n;
+ evbuffer_remove_buffer(buf, req->input_buffer, n);
+ }
+
+ if (req->body_size > req->evcon->max_body_size ||
+ (!req->chunked && req->ntoread >= 0 &&
+ (size_t)req->ntoread > req->evcon->max_body_size)) {
+ /* XXX: The above casted comparison must checked for overflow */
+ /* failed body length test */
+ event_debug(("Request body is too long"));
+ evhttp_connection_fail_(evcon,
+ EVREQ_HTTP_DATA_TOO_LONG);
+ return;
+ }
+
+ if (evbuffer_get_length(req->input_buffer) > 0 && req->chunk_cb != NULL) {
+ req->flags |= EVHTTP_REQ_DEFER_FREE;
+ (*req->chunk_cb)(req, req->cb_arg);
+ req->flags &= ~EVHTTP_REQ_DEFER_FREE;
+ evbuffer_drain(req->input_buffer,
+ evbuffer_get_length(req->input_buffer));
+ if ((req->flags & EVHTTP_REQ_NEEDS_FREE) != 0) {
+ evhttp_request_free(req);
+ return;
+ }
+ }
+
+ if (req->ntoread == 0) {
+ bufferevent_disable(evcon->bufev, EV_READ);
+ /* Completed content length */
+ evhttp_connection_done(evcon);
+ return;
+ }
+
+ /* Read more! */
+ bufferevent_enable(evcon->bufev, EV_READ);
+}
+
+#define get_deferred_queue(evcon) \
+ ((evcon)->base)
+
+/*
+ * Gets called when more data becomes available
+ */
+
+static void
+evhttp_read_cb(struct bufferevent *bufev, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+
+ /* Cancel if it's pending. */
+ event_deferred_cb_cancel_(get_deferred_queue(evcon),
+ &evcon->read_more_deferred_cb);
+
+ switch (evcon->state) {
+ case EVCON_READING_FIRSTLINE:
+ evhttp_read_firstline(evcon, req);
+ /* note the request may have been freed in
+ * evhttp_read_body */
+ break;
+ case EVCON_READING_HEADERS:
+ evhttp_read_header(evcon, req);
+ /* note the request may have been freed in
+ * evhttp_read_body */
+ break;
+ case EVCON_READING_BODY:
+ evhttp_read_body(evcon, req);
+ /* note the request may have been freed in
+ * evhttp_read_body */
+ break;
+ case EVCON_READING_TRAILER:
+ evhttp_read_trailer(evcon, req);
+ break;
+ case EVCON_IDLE:
+ {
+#ifdef USE_DEBUG
+ struct evbuffer *input;
+ size_t total_len;
+
+ input = bufferevent_get_input(evcon->bufev);
+ total_len = evbuffer_get_length(input);
+ event_debug(("%s: read "EV_SIZE_FMT
+ " bytes in EVCON_IDLE state,"
+ " resetting connection",
+ __func__, EV_SIZE_ARG(total_len)));
+#endif
+
+ evhttp_connection_reset_(evcon);
+ }
+ break;
+ case EVCON_DISCONNECTED:
+ case EVCON_CONNECTING:
+ case EVCON_WRITING:
+ default:
+ event_errx(1, "%s: illegal connection state %d",
+ __func__, evcon->state);
+ }
+}
+
+static void
+evhttp_deferred_read_cb(struct event_callback *cb, void *data)
+{
+ struct evhttp_connection *evcon = data;
+ evhttp_read_cb(evcon->bufev, evcon);
+}
+
+static void
+evhttp_write_connectioncb(struct evhttp_connection *evcon, void *arg)
+{
+ /* This is after writing the request to the server */
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+ EVUTIL_ASSERT(req != NULL);
+
+ EVUTIL_ASSERT(evcon->state == EVCON_WRITING);
+
+ /* We are done writing our header and are now expecting the response */
+ req->kind = EVHTTP_RESPONSE;
+
+ evhttp_start_read_(evcon);
+}
+
+/*
+ * Clean up a connection object
+ */
+
+void
+evhttp_connection_free(struct evhttp_connection *evcon)
+{
+ struct evhttp_request *req;
+
+ /* notify interested parties that this connection is going down */
+ if (evcon->fd != -1) {
+ if (evhttp_connected(evcon) && evcon->closecb != NULL)
+ (*evcon->closecb)(evcon, evcon->closecb_arg);
+ }
+
+ /* remove all requests that might be queued on this
+ * connection. for server connections, this should be empty.
+ * because it gets dequeued either in evhttp_connection_done or
+ * evhttp_connection_fail_.
+ */
+ while ((req = TAILQ_FIRST(&evcon->requests)) != NULL) {
+ TAILQ_REMOVE(&evcon->requests, req, next);
+ evhttp_request_free(req);
+ }
+
+ if (evcon->http_server != NULL) {
+ struct evhttp *http = evcon->http_server;
+ TAILQ_REMOVE(&http->connections, evcon, next);
+ }
+
+ if (event_initialized(&evcon->retry_ev)) {
+ event_del(&evcon->retry_ev);
+ event_debug_unassign(&evcon->retry_ev);
+ }
+
+ if (evcon->bufev != NULL)
+ bufferevent_free(evcon->bufev);
+
+ event_deferred_cb_cancel_(get_deferred_queue(evcon),
+ &evcon->read_more_deferred_cb);
+
+ if (evcon->fd != -1) {
+ shutdown(evcon->fd, EVUTIL_SHUT_WR);
+ if (!(bufferevent_get_options_(evcon->bufev) & BEV_OPT_CLOSE_ON_FREE)) {
+ evutil_closesocket(evcon->fd);
+ }
+ }
+
+ if (evcon->bind_address != NULL)
+ mm_free(evcon->bind_address);
+
+ if (evcon->address != NULL)
+ mm_free(evcon->address);
+
+ if (evcon->conn_address != NULL)
+ mm_free(evcon->conn_address);
+
+ mm_free(evcon);
+}
+
+void
+evhttp_connection_set_local_address(struct evhttp_connection *evcon,
+ const char *address)
+{
+ EVUTIL_ASSERT(evcon->state == EVCON_DISCONNECTED);
+ if (evcon->bind_address)
+ mm_free(evcon->bind_address);
+ if ((evcon->bind_address = mm_strdup(address)) == NULL)
+ event_warn("%s: strdup", __func__);
+}
+
+void
+evhttp_connection_set_local_port(struct evhttp_connection *evcon,
+ ev_uint16_t port)
+{
+ EVUTIL_ASSERT(evcon->state == EVCON_DISCONNECTED);
+ evcon->bind_port = port;
+}
+
+static void
+evhttp_request_dispatch(struct evhttp_connection* evcon)
+{
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+
+ /* this should not usually happy but it's possible */
+ if (req == NULL)
+ return;
+
+ /* delete possible close detection events */
+ evhttp_connection_stop_detectclose(evcon);
+
+ /* we assume that the connection is connected already */
+ EVUTIL_ASSERT(evcon->state == EVCON_IDLE);
+
+ evcon->state = EVCON_WRITING;
+
+ /* Create the header from the store arguments */
+ evhttp_make_header(evcon, req);
+
+ evhttp_write_buffer(evcon, evhttp_write_connectioncb, NULL);
+}
+
+/* Reset our connection state: disables reading/writing, closes our fd (if
+* any), clears out buffers, and puts us in state DISCONNECTED. */
+void
+evhttp_connection_reset_(struct evhttp_connection *evcon)
+{
+ struct evbuffer *tmp;
+
+ /* XXXX This is not actually an optimal fix. Instead we ought to have
+ an API for "stop connecting", or use bufferevent_setfd to turn off
+ connecting. But for Libevent 2.0, this seems like a minimal change
+ least likely to disrupt the rest of the bufferevent and http code.
+
+ Why is this here? If the fd is set in the bufferevent, and the
+ bufferevent is connecting, then you can't actually stop the
+ bufferevent from trying to connect with bufferevent_disable(). The
+ connect will never trigger, since we close the fd, but the timeout
+ might. That caused an assertion failure in evhttp_connection_fail_.
+ */
+ bufferevent_disable_hard_(evcon->bufev, EV_READ|EV_WRITE);
+
+ if (evcon->fd != -1) {
+ /* inform interested parties about connection close */
+ if (evhttp_connected(evcon) && evcon->closecb != NULL)
+ (*evcon->closecb)(evcon, evcon->closecb_arg);
+
+ shutdown(evcon->fd, EVUTIL_SHUT_WR);
+ evutil_closesocket(evcon->fd);
+ evcon->fd = -1;
+ }
+
+ /* we need to clean up any buffered data */
+ tmp = bufferevent_get_output(evcon->bufev);
+ evbuffer_drain(tmp, evbuffer_get_length(tmp));
+ tmp = bufferevent_get_input(evcon->bufev);
+ evbuffer_drain(tmp, evbuffer_get_length(tmp));
+
+ evcon->state = EVCON_DISCONNECTED;
+}
+
+static void
+evhttp_connection_start_detectclose(struct evhttp_connection *evcon)
+{
+ evcon->flags |= EVHTTP_CON_CLOSEDETECT;
+
+ bufferevent_enable(evcon->bufev, EV_READ);
+}
+
+static void
+evhttp_connection_stop_detectclose(struct evhttp_connection *evcon)
+{
+ evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
+
+ bufferevent_disable(evcon->bufev, EV_READ);
+}
+
+static void
+evhttp_connection_retry(evutil_socket_t fd, short what, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+
+ evcon->state = EVCON_DISCONNECTED;
+ evhttp_connection_connect_(evcon);
+}
+
+static void
+evhttp_connection_cb_cleanup(struct evhttp_connection *evcon)
+{
+ struct evcon_requestq requests;
+
+ if (evcon->retry_max < 0 || evcon->retry_cnt < evcon->retry_max) {
+ struct timeval tv_retry = evcon->initial_retry_timeout;
+ int i;
+ evtimer_assign(&evcon->retry_ev, evcon->base, evhttp_connection_retry, evcon);
+ /* XXXX handle failure from evhttp_add_event */
+ for (i=0; i < evcon->retry_cnt; ++i) {
+ tv_retry.tv_usec *= 2;
+ if (tv_retry.tv_usec > 1000000) {
+ tv_retry.tv_usec -= 1000000;
+ tv_retry.tv_sec += 1;
+ }
+ tv_retry.tv_sec *= 2;
+ if (tv_retry.tv_sec > 3600) {
+ tv_retry.tv_sec = 3600;
+ tv_retry.tv_usec = 0;
+ }
+ }
+ event_add(&evcon->retry_ev, &tv_retry);
+ evcon->retry_cnt++;
+ return;
+ }
+ evhttp_connection_reset_(evcon);
+
+ /*
+ * User callback can do evhttp_make_request() on the same
+ * evcon so new request will be added to evcon->requests. To
+ * avoid freeing it prematurely we iterate over the copy of
+ * the queue.
+ */
+ TAILQ_INIT(&requests);
+ while (TAILQ_FIRST(&evcon->requests) != NULL) {
+ struct evhttp_request *request = TAILQ_FIRST(&evcon->requests);
+ TAILQ_REMOVE(&evcon->requests, request, next);
+ TAILQ_INSERT_TAIL(&requests, request, next);
+ }
+
+ /* for now, we just signal all requests by executing their callbacks */
+ while (TAILQ_FIRST(&requests) != NULL) {
+ struct evhttp_request *request = TAILQ_FIRST(&requests);
+ TAILQ_REMOVE(&requests, request, next);
+ request->evcon = NULL;
+
+ /* we might want to set an error here */
+ request->cb(request, request->cb_arg);
+ evhttp_request_free(request);
+ }
+}
+
+static void
+evhttp_error_cb(struct bufferevent *bufev, short what, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+
+ if (evcon->fd == -1)
+ evcon->fd = bufferevent_getfd(bufev);
+
+ switch (evcon->state) {
+ case EVCON_CONNECTING:
+ if (what & BEV_EVENT_TIMEOUT) {
+ event_debug(("%s: connection timeout for \"%s:%d\" on "
+ EV_SOCK_FMT,
+ __func__, evcon->address, evcon->port,
+ EV_SOCK_ARG(evcon->fd)));
+ evhttp_connection_cb_cleanup(evcon);
+ return;
+ }
+ break;
+
+ case EVCON_READING_BODY:
+ if (!req->chunked && req->ntoread < 0
+ && what == (BEV_EVENT_READING|BEV_EVENT_EOF)) {
+ /* EOF on read can be benign */
+ evhttp_connection_done(evcon);
+ return;
+ }
+ break;
+
+ case EVCON_DISCONNECTED:
+ case EVCON_IDLE:
+ case EVCON_READING_FIRSTLINE:
+ case EVCON_READING_HEADERS:
+ case EVCON_READING_TRAILER:
+ case EVCON_WRITING:
+ default:
+ break;
+ }
+
+ /* when we are in close detect mode, a read error means that
+ * the other side closed their connection.
+ */
+ if (evcon->flags & EVHTTP_CON_CLOSEDETECT) {
+ evcon->flags &= ~EVHTTP_CON_CLOSEDETECT;
+ EVUTIL_ASSERT(evcon->http_server == NULL);
+ /* For connections from the client, we just
+ * reset the connection so that it becomes
+ * disconnected.
+ */
+ EVUTIL_ASSERT(evcon->state == EVCON_IDLE);
+ evhttp_connection_reset_(evcon);
+ return;
+ }
+
+ if (what & BEV_EVENT_TIMEOUT) {
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_TIMEOUT);
+ } else if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_EOF);
+ } else if (what == BEV_EVENT_CONNECTED) {
+ } else {
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_BUFFER_ERROR);
+ }
+}
+
+/*
+ * Event callback for asynchronous connection attempt.
+ */
+static void
+evhttp_connection_cb(struct bufferevent *bufev, short what, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ int error;
+ ev_socklen_t errsz = sizeof(error);
+ socklen_t conn_address_len = sizeof(*evcon->conn_address);
+
+ if (evcon->fd == -1)
+ evcon->fd = bufferevent_getfd(bufev);
+
+ if (!(what & BEV_EVENT_CONNECTED)) {
+ /* some operating systems return ECONNREFUSED immediately
+ * when connecting to a local address. the cleanup is going
+ * to reschedule this function call.
+ */
+#ifndef _WIN32
+ if (errno == ECONNREFUSED)
+ goto cleanup;
+#endif
+ evhttp_error_cb(bufev, what, arg);
+ return;
+ }
+
+ if (evcon->fd == -1) {
+ event_debug(("%s: bufferevent_getfd returned -1",
+ __func__));
+ goto cleanup;
+ }
+
+ /* Check if the connection completed */
+ if (getsockopt(evcon->fd, SOL_SOCKET, SO_ERROR, (void*)&error,
+ &errsz) == -1) {
+ event_debug(("%s: getsockopt for \"%s:%d\" on "EV_SOCK_FMT,
+ __func__, evcon->address, evcon->port,
+ EV_SOCK_ARG(evcon->fd)));
+ goto cleanup;
+ }
+
+ if (error) {
+ event_debug(("%s: connect failed for \"%s:%d\" on "
+ EV_SOCK_FMT": %s",
+ __func__, evcon->address, evcon->port,
+ EV_SOCK_ARG(evcon->fd),
+ evutil_socket_error_to_string(error)));
+ goto cleanup;
+ }
+
+ /* We are connected to the server now */
+ event_debug(("%s: connected to \"%s:%d\" on "EV_SOCK_FMT"\n",
+ __func__, evcon->address, evcon->port,
+ EV_SOCK_ARG(evcon->fd)));
+
+ /* Reset the retry count as we were successful in connecting */
+ evcon->retry_cnt = 0;
+ evcon->state = EVCON_IDLE;
+
+ if (!evcon->conn_address) {
+ evcon->conn_address = mm_malloc(sizeof(*evcon->conn_address));
+ }
+ if (getpeername(evcon->fd, (struct sockaddr *)evcon->conn_address, &conn_address_len)) {
+ mm_free(evcon->conn_address);
+ evcon->conn_address = NULL;
+ }
+
+ /* reset the bufferevent cbs */
+ bufferevent_setcb(evcon->bufev,
+ evhttp_read_cb,
+ evhttp_write_cb,
+ evhttp_error_cb,
+ evcon);
+
+ if (!evutil_timerisset(&evcon->timeout)) {
+ const struct timeval read_tv = { HTTP_READ_TIMEOUT, 0 };
+ const struct timeval write_tv = { HTTP_WRITE_TIMEOUT, 0 };
+ bufferevent_set_timeouts(evcon->bufev, &read_tv, &write_tv);
+ } else {
+ bufferevent_set_timeouts(evcon->bufev, &evcon->timeout, &evcon->timeout);
+ }
+
+ /* try to start requests that have queued up on this connection */
+ evhttp_request_dispatch(evcon);
+ return;
+
+ cleanup:
+ evhttp_connection_cb_cleanup(evcon);
+}
+
+/*
+ * Check if we got a valid response code.
+ */
+
+static int
+evhttp_valid_response_code(int code)
+{
+ if (code == 0)
+ return (0);
+
+ return (1);
+}
+
+static int
+evhttp_parse_http_version(const char *version, struct evhttp_request *req)
+{
+ int major, minor;
+ char ch;
+ int n = sscanf(version, "HTTP/%d.%d%c", &major, &minor, &ch);
+ if (n != 2 || major > 1) {
+ event_debug(("%s: bad version %s on message %p from %s",
+ __func__, version, req, req->remote_host));
+ return (-1);
+ }
+ req->major = major;
+ req->minor = minor;
+ return (0);
+}
+
+/* Parses the status line of a web server */
+
+static int
+evhttp_parse_response_line(struct evhttp_request *req, char *line)
+{
+ char *protocol;
+ char *number;
+ const char *readable = "";
+
+ protocol = strsep(&line, " ");
+ if (line == NULL)
+ return (-1);
+ number = strsep(&line, " ");
+ if (line != NULL)
+ readable = line;
+
+ if (evhttp_parse_http_version(protocol, req) < 0)
+ return (-1);
+
+ req->response_code = atoi(number);
+ if (!evhttp_valid_response_code(req->response_code)) {
+ event_debug(("%s: bad response code \"%s\"",
+ __func__, number));
+ return (-1);
+ }
+
+ if ((req->response_code_line = mm_strdup(readable)) == NULL) {
+ event_warn("%s: strdup", __func__);
+ return (-1);
+ }
+
+ return (0);
+}
+
+/* Parse the first line of a HTTP request */
+
+static int
+evhttp_parse_request_line(struct evhttp_request *req, char *line)
+{
+ char *method;
+ char *uri;
+ char *version;
+ const char *hostname;
+ const char *scheme;
+ size_t method_len;
+ enum evhttp_cmd_type type;
+
+ /* Parse the request line */
+ method = strsep(&line, " ");
+ if (line == NULL)
+ return (-1);
+ uri = strsep(&line, " ");
+ if (line == NULL)
+ return (-1);
+ version = strsep(&line, " ");
+ if (line != NULL)
+ return (-1);
+
+ method_len = (uri - method) - 1;
+ type = EVHTTP_REQ_UNKNOWN_;
+
+ /* First line */
+ switch (method_len) {
+ case 3:
+ /* The length of the method string is 3, meaning it can only be one of two methods: GET or PUT */
+
+ /* Since both GET and PUT share the same character 'T' at the end,
+ * if the string doesn't have 'T', we can immediately determine this
+ * is an invalid HTTP method */
+
+ if (method[2] != 'T') {
+ break;
+ }
+
+ switch (*method) {
+ case 'G':
+ /* This first byte is 'G', so make sure the next byte is
+ * 'E', if it isn't then this isn't a valid method */
+
+ if (method[1] == 'E') {
+ type = EVHTTP_REQ_GET;
+ }
+
+ break;
+ case 'P':
+ /* First byte is P, check second byte for 'U', if not,
+ * we know it's an invalid method */
+ if (method[1] == 'U') {
+ type = EVHTTP_REQ_PUT;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case 4:
+ /* The method length is 4 bytes, leaving only the methods "POST" and "HEAD" */
+ switch (*method) {
+ case 'P':
+ if (method[3] == 'T' && method[2] == 'S' && method[1] == 'O') {
+ type = EVHTTP_REQ_POST;
+ }
+ break;
+ case 'H':
+ if (method[3] == 'D' && method[2] == 'A' && method[1] == 'E') {
+ type = EVHTTP_REQ_HEAD;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case 5:
+ /* Method length is 5 bytes, which can only encompass PATCH and TRACE */
+ switch (*method) {
+ case 'P':
+ if (method[4] == 'H' && method[3] == 'C' && method[2] == 'T' && method[1] == 'A') {
+ type = EVHTTP_REQ_PATCH;
+ }
+ break;
+ case 'T':
+ if (method[4] == 'E' && method[3] == 'C' && method[2] == 'A' && method[1] == 'R') {
+ type = EVHTTP_REQ_TRACE;
+ }
+
+ break;
+ default:
+ break;
+ }
+ break;
+ case 6:
+ /* Method length is 6, only valid method 6 bytes in length is DELEte */
+
+ /* If the first byte isn't 'D' then it's invalid */
+ if (*method != 'D') {
+ break;
+ }
+
+ if (method[5] == 'E' && method[4] == 'T' && method[3] == 'E' && method[2] == 'L' && method[1] == 'E') {
+ type = EVHTTP_REQ_DELETE;
+ }
+
+ break;
+ case 7:
+ /* Method length is 7, only valid methods are "OPTIONS" and "CONNECT" */
+ switch (*method) {
+ case 'O':
+ if (method[6] == 'S' && method[5] == 'N' && method[4] == 'O' &&
+ method[3] == 'I' && method[2] == 'T' && method[1] == 'P') {
+ type = EVHTTP_REQ_OPTIONS;
+ }
+
+ break;
+ case 'C':
+ if (method[6] == 'T' && method[5] == 'C' && method[4] == 'E' &&
+ method[3] == 'N' && method[2] == 'N' && method[1] == 'O') {
+ type = EVHTTP_REQ_CONNECT;
+ }
+
+ break;
+ default:
+ break;
+ }
+ break;
+ } /* switch */
+
+ if ((int)type == EVHTTP_REQ_UNKNOWN_) {
+ event_debug(("%s: bad method %s on request %p from %s",
+ __func__, method, req, req->remote_host));
+ /* No error yet; we'll give a better error later when
+ * we see that req->type is unsupported. */
+ }
+
+ req->type = type;
+
+ if (evhttp_parse_http_version(version, req) < 0)
+ return (-1);
+
+ if ((req->uri = mm_strdup(uri)) == NULL) {
+ event_debug(("%s: mm_strdup", __func__));
+ return (-1);
+ }
+
+ if ((req->uri_elems = evhttp_uri_parse_with_flags(req->uri,
+ EVHTTP_URI_NONCONFORMANT)) == NULL) {
+ return -1;
+ }
+
+ /* If we have an absolute-URI, check to see if it is an http request
+ for a known vhost or server alias. If we don't know about this
+ host, we consider it a proxy request. */
+ scheme = evhttp_uri_get_scheme(req->uri_elems);
+ hostname = evhttp_uri_get_host(req->uri_elems);
+ if (scheme && (!evutil_ascii_strcasecmp(scheme, "http") ||
+ !evutil_ascii_strcasecmp(scheme, "https")) &&
+ hostname &&
+ !evhttp_find_vhost(req->evcon->http_server, NULL, hostname))
+ req->flags |= EVHTTP_PROXY_REQUEST;
+
+ return (0);
+}
+
+const char *
+evhttp_find_header(const struct evkeyvalq *headers, const char *key)
+{
+ struct evkeyval *header;
+
+ TAILQ_FOREACH(header, headers, next) {
+ if (evutil_ascii_strcasecmp(header->key, key) == 0)
+ return (header->value);
+ }
+
+ return (NULL);
+}
+
+void
+evhttp_clear_headers(struct evkeyvalq *headers)
+{
+ struct evkeyval *header;
+
+ for (header = TAILQ_FIRST(headers);
+ header != NULL;
+ header = TAILQ_FIRST(headers)) {
+ TAILQ_REMOVE(headers, header, next);
+ mm_free(header->key);
+ mm_free(header->value);
+ mm_free(header);
+ }
+}
+
+/*
+ * Returns 0, if the header was successfully removed.
+ * Returns -1, if the header could not be found.
+ */
+
+int
+evhttp_remove_header(struct evkeyvalq *headers, const char *key)
+{
+ struct evkeyval *header;
+
+ TAILQ_FOREACH(header, headers, next) {
+ if (evutil_ascii_strcasecmp(header->key, key) == 0)
+ break;
+ }
+
+ if (header == NULL)
+ return (-1);
+
+ /* Free and remove the header that we found */
+ TAILQ_REMOVE(headers, header, next);
+ mm_free(header->key);
+ mm_free(header->value);
+ mm_free(header);
+
+ return (0);
+}
+
+static int
+evhttp_header_is_valid_value(const char *value)
+{
+ const char *p = value;
+
+ while ((p = strpbrk(p, "\r\n")) != NULL) {
+ /* we really expect only one new line */
+ p += strspn(p, "\r\n");
+ /* we expect a space or tab for continuation */
+ if (*p != ' ' && *p != '\t')
+ return (0);
+ }
+ return (1);
+}
+
+int
+evhttp_add_header(struct evkeyvalq *headers,
+ const char *key, const char *value)
+{
+ event_debug(("%s: key: %s val: %s\n", __func__, key, value));
+
+ if (strchr(key, '\r') != NULL || strchr(key, '\n') != NULL) {
+ /* drop illegal headers */
+ event_debug(("%s: dropping illegal header key\n", __func__));
+ return (-1);
+ }
+
+ if (!evhttp_header_is_valid_value(value)) {
+ event_debug(("%s: dropping illegal header value\n", __func__));
+ return (-1);
+ }
+
+ return (evhttp_add_header_internal(headers, key, value));
+}
+
+static int
+evhttp_add_header_internal(struct evkeyvalq *headers,
+ const char *key, const char *value)
+{
+ struct evkeyval *header = mm_calloc(1, sizeof(struct evkeyval));
+ if (header == NULL) {
+ event_warn("%s: calloc", __func__);
+ return (-1);
+ }
+ if ((header->key = mm_strdup(key)) == NULL) {
+ mm_free(header);
+ event_warn("%s: strdup", __func__);
+ return (-1);
+ }
+ if ((header->value = mm_strdup(value)) == NULL) {
+ mm_free(header->key);
+ mm_free(header);
+ event_warn("%s: strdup", __func__);
+ return (-1);
+ }
+
+ TAILQ_INSERT_TAIL(headers, header, next);
+
+ return (0);
+}
+
+/*
+ * Parses header lines from a request or a response into the specified
+ * request object given an event buffer.
+ *
+ * Returns
+ * DATA_CORRUPTED on error
+ * MORE_DATA_EXPECTED when we need to read more headers
+ * ALL_DATA_READ when all headers have been read.
+ */
+
+enum message_read_status
+evhttp_parse_firstline_(struct evhttp_request *req, struct evbuffer *buffer)
+{
+ char *line;
+ enum message_read_status status = ALL_DATA_READ;
+
+ size_t line_length;
+ /* XXX try */
+ line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF);
+ if (line == NULL) {
+ if (req->evcon != NULL &&
+ evbuffer_get_length(buffer) > req->evcon->max_headers_size)
+ return (DATA_TOO_LONG);
+ else
+ return (MORE_DATA_EXPECTED);
+ }
+
+ if (req->evcon != NULL &&
+ line_length > req->evcon->max_headers_size) {
+ mm_free(line);
+ return (DATA_TOO_LONG);
+ }
+
+ req->headers_size = line_length;
+
+ switch (req->kind) {
+ case EVHTTP_REQUEST:
+ if (evhttp_parse_request_line(req, line) == -1)
+ status = DATA_CORRUPTED;
+ break;
+ case EVHTTP_RESPONSE:
+ if (evhttp_parse_response_line(req, line) == -1)
+ status = DATA_CORRUPTED;
+ break;
+ default:
+ status = DATA_CORRUPTED;
+ }
+
+ mm_free(line);
+ return (status);
+}
+
+static int
+evhttp_append_to_last_header(struct evkeyvalq *headers, char *line)
+{
+ struct evkeyval *header = TAILQ_LAST(headers, evkeyvalq);
+ char *newval;
+ size_t old_len, line_len;
+
+ if (header == NULL)
+ return (-1);
+
+ old_len = strlen(header->value);
+
+ /* Strip space from start and end of line. */
+ while (*line == ' ' || *line == '\t')
+ ++line;
+ evutil_rtrim_lws_(line);
+
+ line_len = strlen(line);
+
+ newval = mm_realloc(header->value, old_len + line_len + 2);
+ if (newval == NULL)
+ return (-1);
+
+ newval[old_len] = ' ';
+ memcpy(newval + old_len + 1, line, line_len + 1);
+ header->value = newval;
+
+ return (0);
+}
+
+enum message_read_status
+evhttp_parse_headers_(struct evhttp_request *req, struct evbuffer* buffer)
+{
+ enum message_read_status errcode = DATA_CORRUPTED;
+ char *line;
+ enum message_read_status status = MORE_DATA_EXPECTED;
+
+ struct evkeyvalq* headers = req->input_headers;
+ size_t line_length;
+ while ((line = evbuffer_readln(buffer, &line_length, EVBUFFER_EOL_CRLF))
+ != NULL) {
+ char *skey, *svalue;
+
+ req->headers_size += line_length;
+
+ if (req->evcon != NULL &&
+ req->headers_size > req->evcon->max_headers_size) {
+ errcode = DATA_TOO_LONG;
+ goto error;
+ }
+
+ if (*line == '\0') { /* Last header - Done */
+ status = ALL_DATA_READ;
+ mm_free(line);
+ break;
+ }
+
+ /* Check if this is a continuation line */
+ if (*line == ' ' || *line == '\t') {
+ if (evhttp_append_to_last_header(headers, line) == -1)
+ goto error;
+ mm_free(line);
+ continue;
+ }
+
+ /* Processing of header lines */
+ svalue = line;
+ skey = strsep(&svalue, ":");
+ if (svalue == NULL)
+ goto error;
+
+ svalue += strspn(svalue, " ");
+ evutil_rtrim_lws_(svalue);
+
+ if (evhttp_add_header(headers, skey, svalue) == -1)
+ goto error;
+
+ mm_free(line);
+ }
+
+ if (status == MORE_DATA_EXPECTED) {
+ if (req->evcon != NULL &&
+ req->headers_size + evbuffer_get_length(buffer) > req->evcon->max_headers_size)
+ return (DATA_TOO_LONG);
+ }
+
+ return (status);
+
+ error:
+ mm_free(line);
+ return (errcode);
+}
+
+static int
+evhttp_get_body_length(struct evhttp_request *req)
+{
+ struct evkeyvalq *headers = req->input_headers;
+ const char *content_length;
+ const char *connection;
+
+ content_length = evhttp_find_header(headers, "Content-Length");
+ connection = evhttp_find_header(headers, "Connection");
+
+ if (content_length == NULL && connection == NULL)
+ req->ntoread = -1;
+ else if (content_length == NULL &&
+ evutil_ascii_strcasecmp(connection, "Close") != 0) {
+ /* Bad combination, we don't know when it will end */
+ event_warnx("%s: we got no content length, but the "
+ "server wants to keep the connection open: %s.",
+ __func__, connection);
+ return (-1);
+ } else if (content_length == NULL) {
+ req->ntoread = -1;
+ } else {
+ char *endp;
+ ev_int64_t ntoread = evutil_strtoll(content_length, &endp, 10);
+ if (*content_length == '\0' || *endp != '\0' || ntoread < 0) {
+ event_debug(("%s: illegal content length: %s",
+ __func__, content_length));
+ return (-1);
+ }
+ req->ntoread = ntoread;
+ }
+
+ event_debug(("%s: bytes to read: "EV_I64_FMT" (in buffer "EV_SIZE_FMT")\n",
+ __func__, EV_I64_ARG(req->ntoread),
+ EV_SIZE_ARG(evbuffer_get_length(bufferevent_get_input(req->evcon->bufev)))));
+
+ return (0);
+}
+
+static int
+evhttp_method_may_have_body(enum evhttp_cmd_type type)
+{
+ switch (type) {
+ case EVHTTP_REQ_POST:
+ case EVHTTP_REQ_PUT:
+ case EVHTTP_REQ_PATCH:
+ return 1;
+ case EVHTTP_REQ_TRACE:
+ return 0;
+ /* XXX May any of the below methods have a body? */
+ case EVHTTP_REQ_GET:
+ case EVHTTP_REQ_HEAD:
+ case EVHTTP_REQ_DELETE:
+ case EVHTTP_REQ_OPTIONS:
+ case EVHTTP_REQ_CONNECT:
+ return 0;
+ default:
+ return 0;
+ }
+}
+
+static void
+evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
+{
+ const char *xfer_enc;
+
+ /* If this is a request without a body, then we are done */
+ if (req->kind == EVHTTP_REQUEST &&
+ !evhttp_method_may_have_body(req->type)) {
+ evhttp_connection_done(evcon);
+ return;
+ }
+ evcon->state = EVCON_READING_BODY;
+ xfer_enc = evhttp_find_header(req->input_headers, "Transfer-Encoding");
+ if (xfer_enc != NULL && evutil_ascii_strcasecmp(xfer_enc, "chunked") == 0) {
+ req->chunked = 1;
+ req->ntoread = -1;
+ } else {
+ if (evhttp_get_body_length(req) == -1) {
+ evhttp_connection_fail_(evcon,
+ EVREQ_HTTP_INVALID_HEADER);
+ return;
+ }
+ if (req->kind == EVHTTP_REQUEST && req->ntoread < 1) {
+ /* An incoming request with no content-length and no
+ * transfer-encoding has no body. */
+ evhttp_connection_done(evcon);
+ return;
+ }
+ }
+
+ /* Should we send a 100 Continue status line? */
+ if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) {
+ const char *expect;
+
+ expect = evhttp_find_header(req->input_headers, "Expect");
+ if (expect) {
+ if (!evutil_ascii_strcasecmp(expect, "100-continue")) {
+ /* XXX It would be nice to do some sanity
+ checking here. Does the resource exist?
+ Should the resource accept post requests? If
+ no, we should respond with an error. For
+ now, just optimistically tell the client to
+ send their message body. */
+ if (req->ntoread > 0) {
+ /* ntoread is ev_int64_t, max_body_size is ev_uint64_t */
+ if ((req->evcon->max_body_size <= EV_INT64_MAX) && (ev_uint64_t)req->ntoread > req->evcon->max_body_size) {
+ evhttp_send_error(req, HTTP_ENTITYTOOLARGE, NULL);
+ return;
+ }
+ }
+ if (!evbuffer_get_length(bufferevent_get_input(evcon->bufev)))
+ evhttp_send_continue(evcon, req);
+ } else {
+ evhttp_send_error(req, HTTP_EXPECTATIONFAILED,
+ NULL);
+ return;
+ }
+ }
+ }
+
+ evhttp_read_body(evcon, req);
+ /* note the request may have been freed in evhttp_read_body */
+}
+
+static void
+evhttp_read_firstline(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ enum message_read_status res;
+
+ res = evhttp_parse_firstline_(req, bufferevent_get_input(evcon->bufev));
+ if (res == DATA_CORRUPTED || res == DATA_TOO_LONG) {
+ /* Error while reading, terminate */
+ event_debug(("%s: bad header lines on "EV_SOCK_FMT"\n",
+ __func__, EV_SOCK_ARG(evcon->fd)));
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_INVALID_HEADER);
+ return;
+ } else if (res == MORE_DATA_EXPECTED) {
+ /* Need more header lines */
+ return;
+ }
+
+ evcon->state = EVCON_READING_HEADERS;
+ evhttp_read_header(evcon, req);
+}
+
+static void
+evhttp_read_header(struct evhttp_connection *evcon,
+ struct evhttp_request *req)
+{
+ enum message_read_status res;
+ evutil_socket_t fd = evcon->fd;
+
+ res = evhttp_parse_headers_(req, bufferevent_get_input(evcon->bufev));
+ if (res == DATA_CORRUPTED || res == DATA_TOO_LONG) {
+ /* Error while reading, terminate */
+ event_debug(("%s: bad header lines on "EV_SOCK_FMT"\n",
+ __func__, EV_SOCK_ARG(fd)));
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_INVALID_HEADER);
+ return;
+ } else if (res == MORE_DATA_EXPECTED) {
+ /* Need more header lines */
+ return;
+ }
+
+ /* Disable reading for now */
+ bufferevent_disable(evcon->bufev, EV_READ);
+
+ /* Callback can shut down connection with negative return value */
+ if (req->header_cb != NULL) {
+ if ((*req->header_cb)(req, req->cb_arg) < 0) {
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_EOF);
+ return;
+ }
+ }
+
+ /* Done reading headers, do the real work */
+ switch (req->kind) {
+ case EVHTTP_REQUEST:
+ event_debug(("%s: checking for post data on "EV_SOCK_FMT"\n",
+ __func__, EV_SOCK_ARG(fd)));
+ evhttp_get_body(evcon, req);
+ /* note the request may have been freed in evhttp_get_body */
+ break;
+
+ case EVHTTP_RESPONSE:
+ /* Start over if we got a 100 Continue response. */
+ if (req->response_code == 100) {
+ evhttp_start_read_(evcon);
+ return;
+ }
+ if (!evhttp_response_needs_body(req)) {
+ event_debug(("%s: skipping body for code %d\n",
+ __func__, req->response_code));
+ evhttp_connection_done(evcon);
+ } else {
+ event_debug(("%s: start of read body for %s on "
+ EV_SOCK_FMT"\n",
+ __func__, req->remote_host, EV_SOCK_ARG(fd)));
+ evhttp_get_body(evcon, req);
+ /* note the request may have been freed in
+ * evhttp_get_body */
+ }
+ break;
+
+ default:
+ event_warnx("%s: bad header on "EV_SOCK_FMT, __func__,
+ EV_SOCK_ARG(fd));
+ evhttp_connection_fail_(evcon, EVREQ_HTTP_INVALID_HEADER);
+ break;
+ }
+ /* request may have been freed above */
+}
+
+/*
+ * Creates a TCP connection to the specified port and executes a callback
+ * when finished. Failure or success is indicate by the passed connection
+ * object.
+ *
+ * Although this interface accepts a hostname, it is intended to take
+ * only numeric hostnames so that non-blocking DNS resolution can
+ * happen elsewhere.
+ */
+
+struct evhttp_connection *
+evhttp_connection_new(const char *address, unsigned short port)
+{
+ return (evhttp_connection_base_new(NULL, NULL, address, port));
+}
+
+struct evhttp_connection *
+evhttp_connection_base_bufferevent_new(struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev,
+ const char *address, unsigned short port)
+{
+ struct evhttp_connection *evcon = NULL;
+
+ event_debug(("Attempting connection to %s:%d\n", address, port));
+
+ if ((evcon = mm_calloc(1, sizeof(struct evhttp_connection))) == NULL) {
+ event_warn("%s: calloc failed", __func__);
+ goto error;
+ }
+
+ evcon->fd = -1;
+ evcon->port = port;
+
+ evcon->max_headers_size = EV_SIZE_MAX;
+ evcon->max_body_size = EV_SIZE_MAX;
+
+ evutil_timerclear(&evcon->timeout);
+ evcon->retry_cnt = evcon->retry_max = 0;
+
+ if ((evcon->address = mm_strdup(address)) == NULL) {
+ event_warn("%s: strdup failed", __func__);
+ goto error;
+ }
+
+ if (bev == NULL) {
+ if (!(bev = bufferevent_socket_new(base, -1, 0))) {
+ event_warn("%s: bufferevent_socket_new failed", __func__);
+ goto error;
+ }
+ }
+
+ bufferevent_setcb(bev, evhttp_read_cb, evhttp_write_cb, evhttp_error_cb, evcon);
+ evcon->bufev = bev;
+
+ evcon->state = EVCON_DISCONNECTED;
+ TAILQ_INIT(&evcon->requests);
+
+ evcon->initial_retry_timeout.tv_sec = 2;
+ evcon->initial_retry_timeout.tv_usec = 0;
+
+ if (base != NULL) {
+ evcon->base = base;
+ if (bufferevent_get_base(bev) != base)
+ bufferevent_base_set(base, evcon->bufev);
+ }
+
+ event_deferred_cb_init_(
+ &evcon->read_more_deferred_cb,
+ bufferevent_get_priority(bev),
+ evhttp_deferred_read_cb, evcon);
+
+ evcon->dns_base = dnsbase;
+
+ return (evcon);
+
+ error:
+ if (evcon != NULL)
+ evhttp_connection_free(evcon);
+ return (NULL);
+}
+
+struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *evcon)
+{
+ return evcon->bufev;
+}
+
+struct evhttp *
+evhttp_connection_get_server(struct evhttp_connection *evcon)
+{
+ return evcon->http_server;
+}
+
+struct evhttp_connection *
+evhttp_connection_base_new(struct event_base *base, struct evdns_base *dnsbase,
+ const char *address, unsigned short port)
+{
+ return evhttp_connection_base_bufferevent_new(base, dnsbase, NULL, address, port);
+}
+
+void
+evhttp_connection_set_base(struct evhttp_connection *evcon,
+ struct event_base *base)
+{
+ EVUTIL_ASSERT(evcon->base == NULL);
+ EVUTIL_ASSERT(evcon->state == EVCON_DISCONNECTED);
+ evcon->base = base;
+ bufferevent_base_set(base, evcon->bufev);
+}
+
+void
+evhttp_connection_set_timeout(struct evhttp_connection *evcon,
+ int timeout_in_secs)
+{
+ if (timeout_in_secs == -1)
+ evhttp_connection_set_timeout_tv(evcon, NULL);
+ else {
+ struct timeval tv;
+ tv.tv_sec = timeout_in_secs;
+ tv.tv_usec = 0;
+ evhttp_connection_set_timeout_tv(evcon, &tv);
+ }
+}
+
+void
+evhttp_connection_set_timeout_tv(struct evhttp_connection *evcon,
+ const struct timeval* tv)
+{
+ if (tv) {
+ evcon->timeout = *tv;
+ bufferevent_set_timeouts(evcon->bufev, &evcon->timeout, &evcon->timeout);
+ } else {
+ const struct timeval read_tv = { HTTP_READ_TIMEOUT, 0 };
+ const struct timeval write_tv = { HTTP_WRITE_TIMEOUT, 0 };
+ evutil_timerclear(&evcon->timeout);
+ bufferevent_set_timeouts(evcon->bufev, &read_tv, &write_tv);
+ }
+}
+
+void
+evhttp_connection_set_initial_retry_tv(struct evhttp_connection *evcon,
+ const struct timeval *tv)
+{
+ if (tv) {
+ evcon->initial_retry_timeout = *tv;
+ } else {
+ evutil_timerclear(&evcon->initial_retry_timeout);
+ evcon->initial_retry_timeout.tv_sec = 2;
+ }
+}
+
+void
+evhttp_connection_set_retries(struct evhttp_connection *evcon,
+ int retry_max)
+{
+ evcon->retry_max = retry_max;
+}
+
+void
+evhttp_connection_set_closecb(struct evhttp_connection *evcon,
+ void (*cb)(struct evhttp_connection *, void *), void *cbarg)
+{
+ evcon->closecb = cb;
+ evcon->closecb_arg = cbarg;
+}
+
+void
+evhttp_connection_get_peer(struct evhttp_connection *evcon,
+ char **address, ev_uint16_t *port)
+{
+ *address = evcon->address;
+ *port = evcon->port;
+}
+
+const struct sockaddr*
+evhttp_connection_get_addr(struct evhttp_connection *evcon)
+{
+ return (struct sockaddr *)evcon->conn_address;
+}
+
+int
+evhttp_connection_connect_(struct evhttp_connection *evcon)
+{
+ int old_state = evcon->state;
+
+ if (evcon->state == EVCON_CONNECTING)
+ return (0);
+
+ evhttp_connection_reset_(evcon);
+
+ EVUTIL_ASSERT(!(evcon->flags & EVHTTP_CON_INCOMING));
+ evcon->flags |= EVHTTP_CON_OUTGOING;
+
+ if (evcon->bind_address || evcon->bind_port) {
+ evcon->fd = bind_socket(
+ evcon->bind_address, evcon->bind_port, 0 /*reuse*/);
+ if (evcon->fd == -1) {
+ event_debug(("%s: failed to bind to \"%s\"",
+ __func__, evcon->bind_address));
+ return (-1);
+ }
+
+ bufferevent_setfd(evcon->bufev, evcon->fd);
+ } else {
+ bufferevent_setfd(evcon->bufev, -1);
+ }
+
+ /* Set up a callback for successful connection setup */
+ bufferevent_setcb(evcon->bufev,
+ NULL /* evhttp_read_cb */,
+ NULL /* evhttp_write_cb */,
+ evhttp_connection_cb,
+ evcon);
+ if (!evutil_timerisset(&evcon->timeout)) {
+ const struct timeval conn_tv = { HTTP_CONNECT_TIMEOUT, 0 };
+ bufferevent_set_timeouts(evcon->bufev, NULL, &conn_tv);
+ } else {
+ bufferevent_set_timeouts(evcon->bufev, NULL, &evcon->timeout);
+ }
+ /* make sure that we get a write callback */
+ bufferevent_enable(evcon->bufev, EV_WRITE);
+
+ evcon->state = EVCON_CONNECTING;
+
+ if (bufferevent_socket_connect_hostname(evcon->bufev, evcon->dns_base,
+ AF_UNSPEC, evcon->address, evcon->port) < 0) {
+ evcon->state = old_state;
+ event_sock_warn(evcon->fd, "%s: connection to \"%s\" failed",
+ __func__, evcon->address);
+ /* some operating systems return ECONNREFUSED immediately
+ * when connecting to a local address. the cleanup is going
+ * to reschedule this function call.
+ */
+ evhttp_connection_cb_cleanup(evcon);
+ return (0);
+ }
+
+ return (0);
+}
+
+/*
+ * Starts an HTTP request on the provided evhttp_connection object.
+ * If the connection object is not connected to the web server already,
+ * this will start the connection.
+ */
+
+int
+evhttp_make_request(struct evhttp_connection *evcon,
+ struct evhttp_request *req,
+ enum evhttp_cmd_type type, const char *uri)
+{
+ /* We are making a request */
+ req->kind = EVHTTP_REQUEST;
+ req->type = type;
+ if (req->uri != NULL)
+ mm_free(req->uri);
+ if ((req->uri = mm_strdup(uri)) == NULL) {
+ event_warn("%s: strdup", __func__);
+ evhttp_request_free(req);
+ return (-1);
+ }
+
+ /* Set the protocol version if it is not supplied */
+ if (!req->major && !req->minor) {
+ req->major = 1;
+ req->minor = 1;
+ }
+
+ EVUTIL_ASSERT(req->evcon == NULL);
+ req->evcon = evcon;
+ EVUTIL_ASSERT(!(req->flags & EVHTTP_REQ_OWN_CONNECTION));
+
+ TAILQ_INSERT_TAIL(&evcon->requests, req, next);
+
+ /* If the connection object is not connected; make it so */
+ if (!evhttp_connected(evcon)) {
+ int res = evhttp_connection_connect_(evcon);
+ /* evhttp_connection_fail_(), which is called through
+ * evhttp_connection_connect_(), assumes that req lies in
+ * evcon->requests. Thus, enqueue the request in advance and
+ * remove it in the error case. */
+ if (res != 0)
+ TAILQ_REMOVE(&evcon->requests, req, next);
+
+ return res;
+ }
+
+ /*
+ * If it's connected already and we are the first in the queue,
+ * then we can dispatch this request immediately. Otherwise, it
+ * will be dispatched once the pending requests are completed.
+ */
+ if (TAILQ_FIRST(&evcon->requests) == req)
+ evhttp_request_dispatch(evcon);
+
+ return (0);
+}
+
+void
+evhttp_cancel_request(struct evhttp_request *req)
+{
+ struct evhttp_connection *evcon = req->evcon;
+ if (evcon != NULL) {
+ /* We need to remove it from the connection */
+ if (TAILQ_FIRST(&evcon->requests) == req) {
+ /* it's currently being worked on, so reset
+ * the connection.
+ */
+ evhttp_connection_fail_(evcon,
+ EVREQ_HTTP_REQUEST_CANCEL);
+
+ /* connection fail freed the request */
+ return;
+ } else {
+ /* otherwise, we can just remove it from the
+ * queue
+ */
+ TAILQ_REMOVE(&evcon->requests, req, next);
+ }
+ }
+
+ evhttp_request_free(req);
+}
+
+/*
+ * Reads data from file descriptor into request structure
+ * Request structure needs to be set up correctly.
+ */
+
+void
+evhttp_start_read_(struct evhttp_connection *evcon)
+{
+ /* Set up an event to read the headers */
+ bufferevent_disable(evcon->bufev, EV_WRITE);
+ bufferevent_enable(evcon->bufev, EV_READ);
+ evcon->state = EVCON_READING_FIRSTLINE;
+ /* Reset the bufferevent callbacks */
+ bufferevent_setcb(evcon->bufev,
+ evhttp_read_cb,
+ evhttp_write_cb,
+ evhttp_error_cb,
+ evcon);
+
+ /* If there's still data pending, process it next time through the
+ * loop. Don't do it now; that could get recusive. */
+ if (evbuffer_get_length(bufferevent_get_input(evcon->bufev))) {
+ event_deferred_cb_schedule_(get_deferred_queue(evcon),
+ &evcon->read_more_deferred_cb);
+ }
+}
+
+static void
+evhttp_send_done(struct evhttp_connection *evcon, void *arg)
+{
+ int need_close;
+ struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+ TAILQ_REMOVE(&evcon->requests, req, next);
+
+ if (req->on_complete_cb != NULL) {
+ req->on_complete_cb(req, req->on_complete_cb_arg);
+ }
+
+ need_close =
+ (REQ_VERSION_BEFORE(req, 1, 1) &&
+ !evhttp_is_connection_keepalive(req->input_headers))||
+ evhttp_is_connection_close(req->flags, req->input_headers) ||
+ evhttp_is_connection_close(req->flags, req->output_headers);
+
+ EVUTIL_ASSERT(req->flags & EVHTTP_REQ_OWN_CONNECTION);
+ evhttp_request_free(req);
+
+ if (need_close) {
+ evhttp_connection_free(evcon);
+ return;
+ }
+
+ /* we have a persistent connection; try to accept another request. */
+ if (evhttp_associate_new_request_with_connection(evcon) == -1) {
+ evhttp_connection_free(evcon);
+ }
+}
+
+/*
+ * Returns an error page.
+ */
+
+void
+evhttp_send_error(struct evhttp_request *req, int error, const char *reason)
+{
+
+#define ERR_FORMAT "<HTML><HEAD>\n" \
+ "<TITLE>%d %s</TITLE>\n" \
+ "</HEAD><BODY>\n" \
+ "<H1>%s</H1>\n" \
+ "</BODY></HTML>\n"
+
+ struct evbuffer *buf = evbuffer_new();
+ if (buf == NULL) {
+ /* if we cannot allocate memory; we just drop the connection */
+ evhttp_connection_free(req->evcon);
+ return;
+ }
+ if (reason == NULL) {
+ reason = evhttp_response_phrase_internal(error);
+ }
+
+ evhttp_response_code_(req, error, reason);
+
+ evbuffer_add_printf(buf, ERR_FORMAT, error, reason, reason);
+
+ evhttp_send_page_(req, buf);
+
+ evbuffer_free(buf);
+#undef ERR_FORMAT
+}
+
+/* Requires that headers and response code are already set up */
+
+static inline void
+evhttp_send(struct evhttp_request *req, struct evbuffer *databuf)
+{
+ struct evhttp_connection *evcon = req->evcon;
+
+ if (evcon == NULL) {
+ evhttp_request_free(req);
+ return;
+ }
+
+ EVUTIL_ASSERT(TAILQ_FIRST(&evcon->requests) == req);
+
+ /* we expect no more calls form the user on this request */
+ req->userdone = 1;
+
+ /* xxx: not sure if we really should expose the data buffer this way */
+ if (databuf != NULL)
+ evbuffer_add_buffer(req->output_buffer, databuf);
+
+ /* Adds headers to the response */
+ evhttp_make_header(evcon, req);
+
+ evhttp_write_buffer(evcon, evhttp_send_done, NULL);
+}
+
+void
+evhttp_send_reply(struct evhttp_request *req, int code, const char *reason,
+ struct evbuffer *databuf)
+{
+ evhttp_response_code_(req, code, reason);
+
+ evhttp_send(req, databuf);
+}
+
+void
+evhttp_send_reply_start(struct evhttp_request *req, int code,
+ const char *reason)
+{
+ evhttp_response_code_(req, code, reason);
+ if (evhttp_find_header(req->output_headers, "Content-Length") == NULL &&
+ REQ_VERSION_ATLEAST(req, 1, 1) &&
+ evhttp_response_needs_body(req)) {
+ /*
+ * prefer HTTP/1.1 chunked encoding to closing the connection;
+ * note RFC 2616 section 4.4 forbids it with Content-Length:
+ * and it's not necessary then anyway.
+ */
+ evhttp_add_header(req->output_headers, "Transfer-Encoding",
+ "chunked");
+ req->chunked = 1;
+ } else {
+ req->chunked = 0;
+ }
+ evhttp_make_header(req->evcon, req);
+ evhttp_write_buffer(req->evcon, NULL, NULL);
+}
+
+void
+evhttp_send_reply_chunk_with_cb(struct evhttp_request *req, struct evbuffer *databuf,
+ void (*cb)(struct evhttp_connection *, void *), void *arg)
+{
+ struct evhttp_connection *evcon = req->evcon;
+ struct evbuffer *output;
+
+ if (evcon == NULL)
+ return;
+
+ output = bufferevent_get_output(evcon->bufev);
+
+ if (evbuffer_get_length(databuf) == 0)
+ return;
+ if (!evhttp_response_needs_body(req))
+ return;
+ if (req->chunked) {
+ evbuffer_add_printf(output, "%x\r\n",
+ (unsigned)evbuffer_get_length(databuf));
+ }
+ evbuffer_add_buffer(output, databuf);
+ if (req->chunked) {
+ evbuffer_add(output, "\r\n", 2);
+ }
+ evhttp_write_buffer(evcon, cb, arg);
+}
+
+void
+evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer *databuf)
+{
+ evhttp_send_reply_chunk_with_cb(req, databuf, NULL, NULL);
+}
+void
+evhttp_send_reply_end(struct evhttp_request *req)
+{
+ struct evhttp_connection *evcon = req->evcon;
+ struct evbuffer *output;
+
+ if (evcon == NULL) {
+ evhttp_request_free(req);
+ return;
+ }
+
+ output = bufferevent_get_output(evcon->bufev);
+
+ /* we expect no more calls form the user on this request */
+ req->userdone = 1;
+
+ if (req->chunked) {
+ evbuffer_add(output, "0\r\n\r\n", 5);
+ evhttp_write_buffer(req->evcon, evhttp_send_done, NULL);
+ req->chunked = 0;
+ } else if (evbuffer_get_length(output) == 0) {
+ /* let the connection know that we are done with the request */
+ evhttp_send_done(evcon, NULL);
+ } else {
+ /* make the callback execute after all data has been written */
+ evcon->cb = evhttp_send_done;
+ evcon->cb_arg = NULL;
+ }
+}
+
+static const char *informational_phrases[] = {
+ /* 100 */ "Continue",
+ /* 101 */ "Switching Protocols"
+};
+
+static const char *success_phrases[] = {
+ /* 200 */ "OK",
+ /* 201 */ "Created",
+ /* 202 */ "Accepted",
+ /* 203 */ "Non-Authoritative Information",
+ /* 204 */ "No Content",
+ /* 205 */ "Reset Content",
+ /* 206 */ "Partial Content"
+};
+
+static const char *redirection_phrases[] = {
+ /* 300 */ "Multiple Choices",
+ /* 301 */ "Moved Permanently",
+ /* 302 */ "Found",
+ /* 303 */ "See Other",
+ /* 304 */ "Not Modified",
+ /* 305 */ "Use Proxy",
+ /* 307 */ "Temporary Redirect"
+};
+
+static const char *client_error_phrases[] = {
+ /* 400 */ "Bad Request",
+ /* 401 */ "Unauthorized",
+ /* 402 */ "Payment Required",
+ /* 403 */ "Forbidden",
+ /* 404 */ "Not Found",
+ /* 405 */ "Method Not Allowed",
+ /* 406 */ "Not Acceptable",
+ /* 407 */ "Proxy Authentication Required",
+ /* 408 */ "Request Time-out",
+ /* 409 */ "Conflict",
+ /* 410 */ "Gone",
+ /* 411 */ "Length Required",
+ /* 412 */ "Precondition Failed",
+ /* 413 */ "Request Entity Too Large",
+ /* 414 */ "Request-URI Too Large",
+ /* 415 */ "Unsupported Media Type",
+ /* 416 */ "Requested range not satisfiable",
+ /* 417 */ "Expectation Failed"
+};
+
+static const char *server_error_phrases[] = {
+ /* 500 */ "Internal Server Error",
+ /* 501 */ "Not Implemented",
+ /* 502 */ "Bad Gateway",
+ /* 503 */ "Service Unavailable",
+ /* 504 */ "Gateway Time-out",
+ /* 505 */ "HTTP Version not supported"
+};
+
+struct response_class {
+ const char *name;
+ size_t num_responses;
+ const char **responses;
+};
+
+#ifndef MEMBERSOF
+#define MEMBERSOF(x) (sizeof(x)/sizeof(x[0]))
+#endif
+
+static const struct response_class response_classes[] = {
+ /* 1xx */ { "Informational", MEMBERSOF(informational_phrases), informational_phrases },
+ /* 2xx */ { "Success", MEMBERSOF(success_phrases), success_phrases },
+ /* 3xx */ { "Redirection", MEMBERSOF(redirection_phrases), redirection_phrases },
+ /* 4xx */ { "Client Error", MEMBERSOF(client_error_phrases), client_error_phrases },
+ /* 5xx */ { "Server Error", MEMBERSOF(server_error_phrases), server_error_phrases }
+};
+
+static const char *
+evhttp_response_phrase_internal(int code)
+{
+ int klass = code / 100 - 1;
+ int subcode = code % 100;
+
+ /* Unknown class - can't do any better here */
+ if (klass < 0 || klass >= (int) MEMBERSOF(response_classes))
+ return "Unknown Status Class";
+
+ /* Unknown sub-code, return class name at least */
+ if (subcode >= (int) response_classes[klass].num_responses)
+ return response_classes[klass].name;
+
+ return response_classes[klass].responses[subcode];
+}
+
+void
+evhttp_response_code_(struct evhttp_request *req, int code, const char *reason)
+{
+ req->kind = EVHTTP_RESPONSE;
+ req->response_code = code;
+ if (req->response_code_line != NULL)
+ mm_free(req->response_code_line);
+ if (reason == NULL)
+ reason = evhttp_response_phrase_internal(code);
+ req->response_code_line = mm_strdup(reason);
+ if (req->response_code_line == NULL) {
+ event_warn("%s: strdup", __func__);
+ /* XXX what else can we do? */
+ }
+}
+
+void
+evhttp_send_page_(struct evhttp_request *req, struct evbuffer *databuf)
+{
+ if (!req->major || !req->minor) {
+ req->major = 1;
+ req->minor = 1;
+ }
+
+ if (req->kind != EVHTTP_RESPONSE)
+ evhttp_response_code_(req, 200, "OK");
+
+ evhttp_clear_headers(req->output_headers);
+ evhttp_add_header(req->output_headers, "Content-Type", "text/html");
+ evhttp_add_header(req->output_headers, "Connection", "close");
+
+ evhttp_send(req, databuf);
+}
+
+static const char uri_chars[256] = {
+ /* 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, 1, 1, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
+ /* 64 */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0,
+ /* 128 */
+ 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, 0,
+ /* 192 */
+ 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, 0,
+};
+
+#define CHAR_IS_UNRESERVED(c) \
+ (uri_chars[(unsigned char)(c)])
+
+/*
+ * Helper functions to encode/decode a string for inclusion in a URI.
+ * The returned string must be freed by the caller.
+ */
+char *
+evhttp_uriencode(const char *uri, ev_ssize_t len, int space_as_plus)
+{
+ struct evbuffer *buf = evbuffer_new();
+ const char *p, *end;
+ char *result;
+
+ if (buf == NULL)
+ return (NULL);
+
+ if (len >= 0)
+ end = uri+len;
+ else
+ end = uri+strlen(uri);
+
+ for (p = uri; p < end; p++) {
+ if (CHAR_IS_UNRESERVED(*p)) {
+ evbuffer_add(buf, p, 1);
+ } else if (*p == ' ' && space_as_plus) {
+ evbuffer_add(buf, "+", 1);
+ } else {
+ evbuffer_add_printf(buf, "%%%02X", (unsigned char)(*p));
+ }
+ }
+ evbuffer_add(buf, "", 1); /* NUL-terminator. */
+ result = mm_malloc(evbuffer_get_length(buf));
+ if (result)
+ evbuffer_remove(buf, result, evbuffer_get_length(buf));
+ evbuffer_free(buf);
+
+ return (result);
+}
+
+char *
+evhttp_encode_uri(const char *str)
+{
+ return evhttp_uriencode(str, -1, 0);
+}
+
+/*
+ * @param decode_plus_ctl: if 1, we decode plus into space. If 0, we don't.
+ * If -1, when true we transform plus to space only after we've seen
+ * a ?. -1 is deprecated.
+ * @return the number of bytes written to 'ret'.
+ */
+int
+evhttp_decode_uri_internal(
+ const char *uri, size_t length, char *ret, int decode_plus_ctl)
+{
+ char c;
+ int j;
+ int decode_plus = (decode_plus_ctl == 1) ? 1: 0;
+ unsigned i;
+
+ for (i = j = 0; i < length; i++) {
+ c = uri[i];
+ if (c == '?') {
+ if (decode_plus_ctl < 0)
+ decode_plus = 1;
+ } else if (c == '+' && decode_plus) {
+ c = ' ';
+ } else if ((i + 2) < length && c == '%' &&
+ EVUTIL_ISXDIGIT_(uri[i+1]) && EVUTIL_ISXDIGIT_(uri[i+2])) {
+ char tmp[3];
+ tmp[0] = uri[i+1];
+ tmp[1] = uri[i+2];
+ tmp[2] = '\0';
+ c = (char)strtol(tmp, NULL, 16);
+ i += 2;
+ }
+ ret[j++] = c;
+ }
+ ret[j] = '\0';
+
+ return (j);
+}
+
+/* deprecated */
+char *
+evhttp_decode_uri(const char *uri)
+{
+ char *ret;
+
+ if ((ret = mm_malloc(strlen(uri) + 1)) == NULL) {
+ event_warn("%s: malloc(%lu)", __func__,
+ (unsigned long)(strlen(uri) + 1));
+ return (NULL);
+ }
+
+ evhttp_decode_uri_internal(uri, strlen(uri),
+ ret, -1 /*always_decode_plus*/);
+
+ return (ret);
+}
+
+char *
+evhttp_uridecode(const char *uri, int decode_plus, size_t *size_out)
+{
+ char *ret;
+ int n;
+
+ if ((ret = mm_malloc(strlen(uri) + 1)) == NULL) {
+ event_warn("%s: malloc(%lu)", __func__,
+ (unsigned long)(strlen(uri) + 1));
+ return (NULL);
+ }
+
+ n = evhttp_decode_uri_internal(uri, strlen(uri),
+ ret, !!decode_plus/*always_decode_plus*/);
+
+ if (size_out) {
+ EVUTIL_ASSERT(n >= 0);
+ *size_out = (size_t)n;
+ }
+
+ return (ret);
+}
+
+/*
+ * Helper function to parse out arguments in a query.
+ * The arguments are separated by key and value.
+ */
+
+static int
+evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
+ int is_whole_uri)
+{
+ char *line=NULL;
+ char *argument;
+ char *p;
+ const char *query_part;
+ int result = -1;
+ struct evhttp_uri *uri=NULL;
+
+ TAILQ_INIT(headers);
+
+ if (is_whole_uri) {
+ uri = evhttp_uri_parse(str);
+ if (!uri)
+ goto error;
+ query_part = evhttp_uri_get_query(uri);
+ } else {
+ query_part = str;
+ }
+
+ /* No arguments - we are done */
+ if (!query_part || !strlen(query_part)) {
+ result = 0;
+ goto done;
+ }
+
+ if ((line = mm_strdup(query_part)) == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto error;
+ }
+
+ p = argument = line;
+ while (p != NULL && *p != '\0') {
+ char *key, *value, *decoded_value;
+ argument = strsep(&p, "&");
+
+ value = argument;
+ key = strsep(&value, "=");
+ if (value == NULL || *key == '\0') {
+ goto error;
+ }
+
+ if ((decoded_value = mm_malloc(strlen(value) + 1)) == NULL) {
+ event_warn("%s: mm_malloc", __func__);
+ goto error;
+ }
+ evhttp_decode_uri_internal(value, strlen(value),
+ decoded_value, 1 /*always_decode_plus*/);
+ event_debug(("Query Param: %s -> %s\n", key, decoded_value));
+ evhttp_add_header_internal(headers, key, decoded_value);
+ mm_free(decoded_value);
+ }
+
+ result = 0;
+ goto done;
+error:
+ evhttp_clear_headers(headers);
+done:
+ if (line)
+ mm_free(line);
+ if (uri)
+ evhttp_uri_free(uri);
+ return result;
+}
+
+int
+evhttp_parse_query(const char *uri, struct evkeyvalq *headers)
+{
+ return evhttp_parse_query_impl(uri, headers, 1);
+}
+int
+evhttp_parse_query_str(const char *uri, struct evkeyvalq *headers)
+{
+ return evhttp_parse_query_impl(uri, headers, 0);
+}
+
+static struct evhttp_cb *
+evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req)
+{
+ struct evhttp_cb *cb;
+ size_t offset = 0;
+ char *translated;
+ const char *path;
+
+ /* Test for different URLs */
+ path = evhttp_uri_get_path(req->uri_elems);
+ offset = strlen(path);
+ if ((translated = mm_malloc(offset + 1)) == NULL)
+ return (NULL);
+ evhttp_decode_uri_internal(path, offset, translated,
+ 0 /* decode_plus */);
+
+ TAILQ_FOREACH(cb, callbacks, next) {
+ if (!strcmp(cb->what, translated)) {
+ mm_free(translated);
+ return (cb);
+ }
+ }
+
+ mm_free(translated);
+ return (NULL);
+}
+
+
+static int
+prefix_suffix_match(const char *pattern, const char *name, int ignorecase)
+{
+ char c;
+
+ while (1) {
+ switch (c = *pattern++) {
+ case '\0':
+ return *name == '\0';
+
+ case '*':
+ while (*name != '\0') {
+ if (prefix_suffix_match(pattern, name,
+ ignorecase))
+ return (1);
+ ++name;
+ }
+ return (0);
+ default:
+ if (c != *name) {
+ if (!ignorecase ||
+ EVUTIL_TOLOWER_(c) != EVUTIL_TOLOWER_(*name))
+ return (0);
+ }
+ ++name;
+ }
+ }
+ /* NOTREACHED */
+}
+
+/*
+ Search the vhost hierarchy beginning with http for a server alias
+ matching hostname. If a match is found, and outhttp is non-null,
+ outhttp is set to the matching http object and 1 is returned.
+*/
+
+static int
+evhttp_find_alias(struct evhttp *http, struct evhttp **outhttp,
+ const char *hostname)
+{
+ struct evhttp_server_alias *alias;
+ struct evhttp *vhost;
+
+ TAILQ_FOREACH(alias, &http->aliases, next) {
+ /* XXX Do we need to handle IP addresses? */
+ if (!evutil_ascii_strcasecmp(alias->alias, hostname)) {
+ if (outhttp)
+ *outhttp = http;
+ return 1;
+ }
+ }
+
+ /* XXX It might be good to avoid recursion here, but I don't
+ see a way to do that w/o a list. */
+ TAILQ_FOREACH(vhost, &http->virtualhosts, next_vhost) {
+ if (evhttp_find_alias(vhost, outhttp, hostname))
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ Attempts to find the best http object to handle a request for a hostname.
+ All aliases for the root http object and vhosts are searched for an exact
+ match. Then, the vhost hierarchy is traversed again for a matching
+ pattern.
+
+ If an alias or vhost is matched, 1 is returned, and outhttp, if non-null,
+ is set with the best matching http object. If there are no matches, the
+ root http object is stored in outhttp and 0 is returned.
+*/
+
+static int
+evhttp_find_vhost(struct evhttp *http, struct evhttp **outhttp,
+ const char *hostname)
+{
+ struct evhttp *vhost;
+ struct evhttp *oldhttp;
+ int match_found = 0;
+
+ if (evhttp_find_alias(http, outhttp, hostname))
+ return 1;
+
+ do {
+ oldhttp = http;
+ TAILQ_FOREACH(vhost, &http->virtualhosts, next_vhost) {
+ if (prefix_suffix_match(vhost->vhost_pattern,
+ hostname, 1 /* ignorecase */)) {
+ http = vhost;
+ match_found = 1;
+ break;
+ }
+ }
+ } while (oldhttp != http);
+
+ if (outhttp)
+ *outhttp = http;
+
+ return match_found;
+}
+
+static void
+evhttp_handle_request(struct evhttp_request *req, void *arg)
+{
+ struct evhttp *http = arg;
+ struct evhttp_cb *cb = NULL;
+ const char *hostname;
+
+ /* we have a new request on which the user needs to take action */
+ req->userdone = 0;
+
+ if (req->type == 0 || req->uri == NULL) {
+ evhttp_send_error(req, HTTP_BADREQUEST, NULL);
+ return;
+ }
+
+ if ((http->allowed_methods & req->type) == 0) {
+ event_debug(("Rejecting disallowed method %x (allowed: %x)\n",
+ (unsigned)req->type, (unsigned)http->allowed_methods));
+ evhttp_send_error(req, HTTP_NOTIMPLEMENTED, NULL);
+ return;
+ }
+
+ /* handle potential virtual hosts */
+ hostname = evhttp_request_get_host(req);
+ if (hostname != NULL) {
+ evhttp_find_vhost(http, &http, hostname);
+ }
+
+ if ((cb = evhttp_dispatch_callback(&http->callbacks, req)) != NULL) {
+ (*cb->cb)(req, cb->cbarg);
+ return;
+ }
+
+ /* Generic call back */
+ if (http->gencb) {
+ (*http->gencb)(req, http->gencbarg);
+ return;
+ } else {
+ /* We need to send a 404 here */
+#define ERR_FORMAT "<html><head>" \
+ "<title>404 Not Found</title>" \
+ "</head><body>" \
+ "<h1>Not Found</h1>" \
+ "<p>The requested URL %s was not found on this server.</p>"\
+ "</body></html>\n"
+
+ char *escaped_html;
+ struct evbuffer *buf;
+
+ if ((escaped_html = evhttp_htmlescape(req->uri)) == NULL) {
+ evhttp_connection_free(req->evcon);
+ return;
+ }
+
+ if ((buf = evbuffer_new()) == NULL) {
+ mm_free(escaped_html);
+ evhttp_connection_free(req->evcon);
+ return;
+ }
+
+ evhttp_response_code_(req, HTTP_NOTFOUND, "Not Found");
+
+ evbuffer_add_printf(buf, ERR_FORMAT, escaped_html);
+
+ mm_free(escaped_html);
+
+ evhttp_send_page_(req, buf);
+
+ evbuffer_free(buf);
+#undef ERR_FORMAT
+ }
+}
+
+/* Listener callback when a connection arrives at a server. */
+static void
+accept_socket_cb(struct evconnlistener *listener, evutil_socket_t nfd, struct sockaddr *peer_sa, int peer_socklen, void *arg)
+{
+ struct evhttp *http = arg;
+
+ evhttp_get_request(http, nfd, peer_sa, peer_socklen);
+}
+
+int
+evhttp_bind_socket(struct evhttp *http, const char *address, ev_uint16_t port)
+{
+ struct evhttp_bound_socket *bound =
+ evhttp_bind_socket_with_handle(http, address, port);
+ if (bound == NULL)
+ return (-1);
+ return (0);
+}
+
+struct evhttp_bound_socket *
+evhttp_bind_socket_with_handle(struct evhttp *http, const char *address, ev_uint16_t port)
+{
+ evutil_socket_t fd;
+ struct evhttp_bound_socket *bound;
+
+ if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1)
+ return (NULL);
+
+ if (listen(fd, 128) == -1) {
+ event_sock_warn(fd, "%s: listen", __func__);
+ evutil_closesocket(fd);
+ return (NULL);
+ }
+
+ bound = evhttp_accept_socket_with_handle(http, fd);
+
+ if (bound != NULL) {
+ event_debug(("Bound to port %d - Awaiting connections ... ",
+ port));
+ return (bound);
+ }
+
+ return (NULL);
+}
+
+int
+evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd)
+{
+ struct evhttp_bound_socket *bound =
+ evhttp_accept_socket_with_handle(http, fd);
+ if (bound == NULL)
+ return (-1);
+ return (0);
+}
+
+void
+evhttp_foreach_bound_socket(struct evhttp *http,
+ evhttp_bound_socket_foreach_fn *function,
+ void *argument)
+{
+ struct evhttp_bound_socket *bound;
+
+ TAILQ_FOREACH(bound, &http->sockets, next)
+ function(bound, argument);
+}
+
+struct evhttp_bound_socket *
+evhttp_accept_socket_with_handle(struct evhttp *http, evutil_socket_t fd)
+{
+ struct evhttp_bound_socket *bound;
+ struct evconnlistener *listener;
+ const int flags =
+ LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_EXEC|LEV_OPT_CLOSE_ON_FREE;
+
+ listener = evconnlistener_new(http->base, NULL, NULL,
+ flags,
+ 0, /* Backlog is '0' because we already said 'listen' */
+ fd);
+ if (!listener)
+ return (NULL);
+
+ bound = evhttp_bind_listener(http, listener);
+ if (!bound) {
+ evconnlistener_free(listener);
+ return (NULL);
+ }
+ return (bound);
+}
+
+struct evhttp_bound_socket *
+evhttp_bind_listener(struct evhttp *http, struct evconnlistener *listener)
+{
+ struct evhttp_bound_socket *bound;
+
+ bound = mm_malloc(sizeof(struct evhttp_bound_socket));
+ if (bound == NULL)
+ return (NULL);
+
+ bound->listener = listener;
+ TAILQ_INSERT_TAIL(&http->sockets, bound, next);
+
+ evconnlistener_set_cb(listener, accept_socket_cb, http);
+ return bound;
+}
+
+evutil_socket_t
+evhttp_bound_socket_get_fd(struct evhttp_bound_socket *bound)
+{
+ return evconnlistener_get_fd(bound->listener);
+}
+
+struct evconnlistener *
+evhttp_bound_socket_get_listener(struct evhttp_bound_socket *bound)
+{
+ return bound->listener;
+}
+
+void
+evhttp_del_accept_socket(struct evhttp *http, struct evhttp_bound_socket *bound)
+{
+ TAILQ_REMOVE(&http->sockets, bound, next);
+ evconnlistener_free(bound->listener);
+ mm_free(bound);
+}
+
+static struct evhttp*
+evhttp_new_object(void)
+{
+ struct evhttp *http = NULL;
+
+ if ((http = mm_calloc(1, sizeof(struct evhttp))) == NULL) {
+ event_warn("%s: calloc", __func__);
+ return (NULL);
+ }
+
+ evutil_timerclear(&http->timeout);
+ evhttp_set_max_headers_size(http, EV_SIZE_MAX);
+ evhttp_set_max_body_size(http, EV_SIZE_MAX);
+ evhttp_set_default_content_type(http, "text/html; charset=ISO-8859-1");
+ evhttp_set_allowed_methods(http,
+ EVHTTP_REQ_GET |
+ EVHTTP_REQ_POST |
+ EVHTTP_REQ_HEAD |
+ EVHTTP_REQ_PUT |
+ EVHTTP_REQ_DELETE);
+
+ TAILQ_INIT(&http->sockets);
+ TAILQ_INIT(&http->callbacks);
+ TAILQ_INIT(&http->connections);
+ TAILQ_INIT(&http->virtualhosts);
+ TAILQ_INIT(&http->aliases);
+
+ return (http);
+}
+
+struct evhttp *
+evhttp_new(struct event_base *base)
+{
+ struct evhttp *http = NULL;
+
+ http = evhttp_new_object();
+ if (http == NULL)
+ return (NULL);
+ http->base = base;
+
+ return (http);
+}
+
+/*
+ * Start a web server on the specified address and port.
+ */
+
+struct evhttp *
+evhttp_start(const char *address, unsigned short port)
+{
+ struct evhttp *http = NULL;
+
+ http = evhttp_new_object();
+ if (http == NULL)
+ return (NULL);
+ if (evhttp_bind_socket(http, address, port) == -1) {
+ mm_free(http);
+ return (NULL);
+ }
+
+ return (http);
+}
+
+void
+evhttp_free(struct evhttp* http)
+{
+ struct evhttp_cb *http_cb;
+ struct evhttp_connection *evcon;
+ struct evhttp_bound_socket *bound;
+ struct evhttp* vhost;
+ struct evhttp_server_alias *alias;
+
+ /* Remove the accepting part */
+ while ((bound = TAILQ_FIRST(&http->sockets)) != NULL) {
+ TAILQ_REMOVE(&http->sockets, bound, next);
+
+ evconnlistener_free(bound->listener);
+
+ mm_free(bound);
+ }
+
+ while ((evcon = TAILQ_FIRST(&http->connections)) != NULL) {
+ /* evhttp_connection_free removes the connection */
+ evhttp_connection_free(evcon);
+ }
+
+ while ((http_cb = TAILQ_FIRST(&http->callbacks)) != NULL) {
+ TAILQ_REMOVE(&http->callbacks, http_cb, next);
+ mm_free(http_cb->what);
+ mm_free(http_cb);
+ }
+
+ while ((vhost = TAILQ_FIRST(&http->virtualhosts)) != NULL) {
+ TAILQ_REMOVE(&http->virtualhosts, vhost, next_vhost);
+
+ evhttp_free(vhost);
+ }
+
+ if (http->vhost_pattern != NULL)
+ mm_free(http->vhost_pattern);
+
+ while ((alias = TAILQ_FIRST(&http->aliases)) != NULL) {
+ TAILQ_REMOVE(&http->aliases, alias, next);
+ mm_free(alias->alias);
+ mm_free(alias);
+ }
+
+ mm_free(http);
+}
+
+int
+evhttp_add_virtual_host(struct evhttp* http, const char *pattern,
+ struct evhttp* vhost)
+{
+ /* a vhost can only be a vhost once and should not have bound sockets */
+ if (vhost->vhost_pattern != NULL ||
+ TAILQ_FIRST(&vhost->sockets) != NULL)
+ return (-1);
+
+ vhost->vhost_pattern = mm_strdup(pattern);
+ if (vhost->vhost_pattern == NULL)
+ return (-1);
+
+ TAILQ_INSERT_TAIL(&http->virtualhosts, vhost, next_vhost);
+
+ return (0);
+}
+
+int
+evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost)
+{
+ if (vhost->vhost_pattern == NULL)
+ return (-1);
+
+ TAILQ_REMOVE(&http->virtualhosts, vhost, next_vhost);
+
+ mm_free(vhost->vhost_pattern);
+ vhost->vhost_pattern = NULL;
+
+ return (0);
+}
+
+int
+evhttp_add_server_alias(struct evhttp *http, const char *alias)
+{
+ struct evhttp_server_alias *evalias;
+
+ evalias = mm_calloc(1, sizeof(*evalias));
+ if (!evalias)
+ return -1;
+
+ evalias->alias = mm_strdup(alias);
+ if (!evalias->alias) {
+ mm_free(evalias);
+ return -1;
+ }
+
+ TAILQ_INSERT_TAIL(&http->aliases, evalias, next);
+
+ return 0;
+}
+
+int
+evhttp_remove_server_alias(struct evhttp *http, const char *alias)
+{
+ struct evhttp_server_alias *evalias;
+
+ TAILQ_FOREACH(evalias, &http->aliases, next) {
+ if (evutil_ascii_strcasecmp(evalias->alias, alias) == 0) {
+ TAILQ_REMOVE(&http->aliases, evalias, next);
+ mm_free(evalias->alias);
+ mm_free(evalias);
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+void
+evhttp_set_timeout(struct evhttp* http, int timeout_in_secs)
+{
+ if (timeout_in_secs == -1) {
+ evhttp_set_timeout_tv(http, NULL);
+ } else {
+ struct timeval tv;
+ tv.tv_sec = timeout_in_secs;
+ tv.tv_usec = 0;
+ evhttp_set_timeout_tv(http, &tv);
+ }
+}
+
+void
+evhttp_set_timeout_tv(struct evhttp* http, const struct timeval* tv)
+{
+ if (tv) {
+ http->timeout = *tv;
+ } else {
+ evutil_timerclear(&http->timeout);
+ }
+}
+
+void
+evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size)
+{
+ if (max_headers_size < 0)
+ http->default_max_headers_size = EV_SIZE_MAX;
+ else
+ http->default_max_headers_size = max_headers_size;
+}
+
+void
+evhttp_set_max_body_size(struct evhttp* http, ev_ssize_t max_body_size)
+{
+ if (max_body_size < 0)
+ http->default_max_body_size = EV_UINT64_MAX;
+ else
+ http->default_max_body_size = max_body_size;
+}
+
+void
+evhttp_set_default_content_type(struct evhttp *http,
+ const char *content_type) {
+ http->default_content_type = content_type;
+}
+
+void
+evhttp_set_allowed_methods(struct evhttp* http, ev_uint16_t methods)
+{
+ http->allowed_methods = methods;
+}
+
+int
+evhttp_set_cb(struct evhttp *http, const char *uri,
+ void (*cb)(struct evhttp_request *, void *), void *cbarg)
+{
+ struct evhttp_cb *http_cb;
+
+ TAILQ_FOREACH(http_cb, &http->callbacks, next) {
+ if (strcmp(http_cb->what, uri) == 0)
+ return (-1);
+ }
+
+ if ((http_cb = mm_calloc(1, sizeof(struct evhttp_cb))) == NULL) {
+ event_warn("%s: calloc", __func__);
+ return (-2);
+ }
+
+ http_cb->what = mm_strdup(uri);
+ if (http_cb->what == NULL) {
+ event_warn("%s: strdup", __func__);
+ mm_free(http_cb);
+ return (-3);
+ }
+ http_cb->cb = cb;
+ http_cb->cbarg = cbarg;
+
+ TAILQ_INSERT_TAIL(&http->callbacks, http_cb, next);
+
+ return (0);
+}
+
+int
+evhttp_del_cb(struct evhttp *http, const char *uri)
+{
+ struct evhttp_cb *http_cb;
+
+ TAILQ_FOREACH(http_cb, &http->callbacks, next) {
+ if (strcmp(http_cb->what, uri) == 0)
+ break;
+ }
+ if (http_cb == NULL)
+ return (-1);
+
+ TAILQ_REMOVE(&http->callbacks, http_cb, next);
+ mm_free(http_cb->what);
+ mm_free(http_cb);
+
+ return (0);
+}
+
+void
+evhttp_set_gencb(struct evhttp *http,
+ void (*cb)(struct evhttp_request *, void *), void *cbarg)
+{
+ http->gencb = cb;
+ http->gencbarg = cbarg;
+}
+
+void
+evhttp_set_bevcb(struct evhttp *http,
+ struct bufferevent* (*cb)(struct event_base *, void *), void *cbarg)
+{
+ http->bevcb = cb;
+ http->bevcbarg = cbarg;
+}
+
+/*
+ * Request related functions
+ */
+
+struct evhttp_request *
+evhttp_request_new(void (*cb)(struct evhttp_request *, void *), void *arg)
+{
+ struct evhttp_request *req = NULL;
+
+ /* Allocate request structure */
+ if ((req = mm_calloc(1, sizeof(struct evhttp_request))) == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto error;
+ }
+
+ req->headers_size = 0;
+ req->body_size = 0;
+
+ req->kind = EVHTTP_RESPONSE;
+ req->input_headers = mm_calloc(1, sizeof(struct evkeyvalq));
+ if (req->input_headers == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto error;
+ }
+ TAILQ_INIT(req->input_headers);
+
+ req->output_headers = mm_calloc(1, sizeof(struct evkeyvalq));
+ if (req->output_headers == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto error;
+ }
+ TAILQ_INIT(req->output_headers);
+
+ if ((req->input_buffer = evbuffer_new()) == NULL) {
+ event_warn("%s: evbuffer_new", __func__);
+ goto error;
+ }
+
+ if ((req->output_buffer = evbuffer_new()) == NULL) {
+ event_warn("%s: evbuffer_new", __func__);
+ goto error;
+ }
+
+ req->cb = cb;
+ req->cb_arg = arg;
+
+ return (req);
+
+ error:
+ if (req != NULL)
+ evhttp_request_free(req);
+ return (NULL);
+}
+
+void
+evhttp_request_free(struct evhttp_request *req)
+{
+ if ((req->flags & EVHTTP_REQ_DEFER_FREE) != 0) {
+ req->flags |= EVHTTP_REQ_NEEDS_FREE;
+ return;
+ }
+
+ if (req->remote_host != NULL)
+ mm_free(req->remote_host);
+ if (req->uri != NULL)
+ mm_free(req->uri);
+ if (req->uri_elems != NULL)
+ evhttp_uri_free(req->uri_elems);
+ if (req->response_code_line != NULL)
+ mm_free(req->response_code_line);
+ if (req->host_cache != NULL)
+ mm_free(req->host_cache);
+
+ evhttp_clear_headers(req->input_headers);
+ mm_free(req->input_headers);
+
+ evhttp_clear_headers(req->output_headers);
+ mm_free(req->output_headers);
+
+ if (req->input_buffer != NULL)
+ evbuffer_free(req->input_buffer);
+
+ if (req->output_buffer != NULL)
+ evbuffer_free(req->output_buffer);
+
+ mm_free(req);
+}
+
+void
+evhttp_request_own(struct evhttp_request *req)
+{
+ req->flags |= EVHTTP_USER_OWNED;
+}
+
+int
+evhttp_request_is_owned(struct evhttp_request *req)
+{
+ return (req->flags & EVHTTP_USER_OWNED) != 0;
+}
+
+struct evhttp_connection *
+evhttp_request_get_connection(struct evhttp_request *req)
+{
+ return req->evcon;
+}
+
+struct event_base *
+evhttp_connection_get_base(struct evhttp_connection *conn)
+{
+ return conn->base;
+}
+
+void
+evhttp_request_set_chunked_cb(struct evhttp_request *req,
+ void (*cb)(struct evhttp_request *, void *))
+{
+ req->chunk_cb = cb;
+}
+
+void
+evhttp_request_set_header_cb(struct evhttp_request *req,
+ int (*cb)(struct evhttp_request *, void *))
+{
+ req->header_cb = cb;
+}
+
+void
+evhttp_request_set_error_cb(struct evhttp_request *req,
+ void (*cb)(enum evhttp_request_error, void *))
+{
+ req->error_cb = cb;
+}
+
+void
+evhttp_request_set_on_complete_cb(struct evhttp_request *req,
+ void (*cb)(struct evhttp_request *, void *), void *cb_arg)
+{
+ req->on_complete_cb = cb;
+ req->on_complete_cb_arg = cb_arg;
+}
+
+/*
+ * Allows for inspection of the request URI
+ */
+
+const char *
+evhttp_request_get_uri(const struct evhttp_request *req) {
+ if (req->uri == NULL)
+ event_debug(("%s: request %p has no uri\n", __func__, req));
+ return (req->uri);
+}
+
+const struct evhttp_uri *
+evhttp_request_get_evhttp_uri(const struct evhttp_request *req) {
+ if (req->uri_elems == NULL)
+ event_debug(("%s: request %p has no uri elems\n",
+ __func__, req));
+ return (req->uri_elems);
+}
+
+const char *
+evhttp_request_get_host(struct evhttp_request *req)
+{
+ const char *host = NULL;
+
+ if (req->host_cache)
+ return req->host_cache;
+
+ if (req->uri_elems)
+ host = evhttp_uri_get_host(req->uri_elems);
+ if (!host && req->input_headers) {
+ const char *p;
+ size_t len;
+
+ host = evhttp_find_header(req->input_headers, "Host");
+ /* The Host: header may include a port. Remove it here
+ to be consistent with uri_elems case above. */
+ if (host) {
+ p = host + strlen(host) - 1;
+ while (p > host && EVUTIL_ISDIGIT_(*p))
+ --p;
+ if (p > host && *p == ':') {
+ len = p - host;
+ req->host_cache = mm_malloc(len + 1);
+ if (!req->host_cache) {
+ event_warn("%s: malloc", __func__);
+ return NULL;
+ }
+ memcpy(req->host_cache, host, len);
+ req->host_cache[len] = '\0';
+ host = req->host_cache;
+ }
+ }
+ }
+
+ return host;
+}
+
+enum evhttp_cmd_type
+evhttp_request_get_command(const struct evhttp_request *req) {
+ return (req->type);
+}
+
+int
+evhttp_request_get_response_code(const struct evhttp_request *req)
+{
+ return req->response_code;
+}
+
+const char *
+evhttp_request_get_response_code_line(const struct evhttp_request *req)
+{
+ return req->response_code_line;
+}
+
+/** Returns the input headers */
+struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req)
+{
+ return (req->input_headers);
+}
+
+/** Returns the output headers */
+struct evkeyvalq *evhttp_request_get_output_headers(struct evhttp_request *req)
+{
+ return (req->output_headers);
+}
+
+/** Returns the input buffer */
+struct evbuffer *evhttp_request_get_input_buffer(struct evhttp_request *req)
+{
+ return (req->input_buffer);
+}
+
+/** Returns the output buffer */
+struct evbuffer *evhttp_request_get_output_buffer(struct evhttp_request *req)
+{
+ return (req->output_buffer);
+}
+
+
+/*
+ * Takes a file descriptor to read a request from.
+ * The callback is executed once the whole request has been read.
+ */
+
+static struct evhttp_connection*
+evhttp_get_request_connection(
+ struct evhttp* http,
+ evutil_socket_t fd, struct sockaddr *sa, ev_socklen_t salen)
+{
+ struct evhttp_connection *evcon;
+ char *hostname = NULL, *portname = NULL;
+ struct bufferevent* bev = NULL;
+
+ name_from_addr(sa, salen, &hostname, &portname);
+ if (hostname == NULL || portname == NULL) {
+ if (hostname) mm_free(hostname);
+ if (portname) mm_free(portname);
+ return (NULL);
+ }
+
+ event_debug(("%s: new request from %s:%s on "EV_SOCK_FMT"\n",
+ __func__, hostname, portname, EV_SOCK_ARG(fd)));
+
+ /* we need a connection object to put the http request on */
+ if (http->bevcb != NULL) {
+ bev = (*http->bevcb)(http->base, http->bevcbarg);
+ }
+ evcon = evhttp_connection_base_bufferevent_new(
+ http->base, NULL, bev, hostname, atoi(portname));
+ mm_free(hostname);
+ mm_free(portname);
+ if (evcon == NULL)
+ return (NULL);
+
+ evcon->max_headers_size = http->default_max_headers_size;
+ evcon->max_body_size = http->default_max_body_size;
+
+ evcon->flags |= EVHTTP_CON_INCOMING;
+ evcon->state = EVCON_READING_FIRSTLINE;
+
+ evcon->fd = fd;
+
+ bufferevent_setfd(evcon->bufev, fd);
+
+ return (evcon);
+}
+
+static int
+evhttp_associate_new_request_with_connection(struct evhttp_connection *evcon)
+{
+ struct evhttp *http = evcon->http_server;
+ struct evhttp_request *req;
+ if ((req = evhttp_request_new(evhttp_handle_request, http)) == NULL)
+ return (-1);
+
+ if ((req->remote_host = mm_strdup(evcon->address)) == NULL) {
+ event_warn("%s: strdup", __func__);
+ evhttp_request_free(req);
+ return (-1);
+ }
+ req->remote_port = evcon->port;
+
+ req->evcon = evcon; /* the request ends up owning the connection */
+ req->flags |= EVHTTP_REQ_OWN_CONNECTION;
+
+ /* We did not present the request to the user user yet, so treat it as
+ * if the user was done with the request. This allows us to free the
+ * request on a persistent connection if the client drops it without
+ * sending a request.
+ */
+ req->userdone = 1;
+
+ TAILQ_INSERT_TAIL(&evcon->requests, req, next);
+
+ req->kind = EVHTTP_REQUEST;
+
+
+ evhttp_start_read_(evcon);
+
+ return (0);
+}
+
+static void
+evhttp_get_request(struct evhttp *http, evutil_socket_t fd,
+ struct sockaddr *sa, ev_socklen_t salen)
+{
+ struct evhttp_connection *evcon;
+
+ evcon = evhttp_get_request_connection(http, fd, sa, salen);
+ if (evcon == NULL) {
+ event_sock_warn(fd, "%s: cannot get connection on "EV_SOCK_FMT,
+ __func__, EV_SOCK_ARG(fd));
+ evutil_closesocket(fd);
+ return;
+ }
+
+ /* the timeout can be used by the server to close idle connections */
+ if (evutil_timerisset(&http->timeout))
+ evhttp_connection_set_timeout_tv(evcon, &http->timeout);
+
+ /*
+ * if we want to accept more than one request on a connection,
+ * we need to know which http server it belongs to.
+ */
+ evcon->http_server = http;
+ TAILQ_INSERT_TAIL(&http->connections, evcon, next);
+
+ if (evhttp_associate_new_request_with_connection(evcon) == -1)
+ evhttp_connection_free(evcon);
+}
+
+
+/*
+ * Network helper functions that we do not want to export to the rest of
+ * the world.
+ */
+
+static void
+name_from_addr(struct sockaddr *sa, ev_socklen_t salen,
+ char **phost, char **pport)
+{
+ char ntop[NI_MAXHOST];
+ char strport[NI_MAXSERV];
+ int ni_result;
+
+#ifdef EVENT__HAVE_GETNAMEINFO
+ ni_result = getnameinfo(sa, salen,
+ ntop, sizeof(ntop), strport, sizeof(strport),
+ NI_NUMERICHOST|NI_NUMERICSERV);
+
+ if (ni_result != 0) {
+#ifdef EAI_SYSTEM
+ /* Windows doesn't have an EAI_SYSTEM. */
+ if (ni_result == EAI_SYSTEM)
+ event_err(1, "getnameinfo failed");
+ else
+#endif
+ event_errx(1, "getnameinfo failed: %s", gai_strerror(ni_result));
+ return;
+ }
+#else
+ ni_result = fake_getnameinfo(sa, salen,
+ ntop, sizeof(ntop), strport, sizeof(strport),
+ NI_NUMERICHOST|NI_NUMERICSERV);
+ if (ni_result != 0)
+ return;
+#endif
+
+ *phost = mm_strdup(ntop);
+ *pport = mm_strdup(strport);
+}
+
+/* Create a non-blocking socket and bind it */
+/* todo: rename this function */
+static evutil_socket_t
+bind_socket_ai(struct evutil_addrinfo *ai, int reuse)
+{
+ evutil_socket_t fd;
+
+ int on = 1, r;
+ int serrno;
+
+ /* Create listen socket */
+ fd = evutil_socket_(ai ? ai->ai_family : AF_INET,
+ SOCK_STREAM|EVUTIL_SOCK_NONBLOCK|EVUTIL_SOCK_CLOEXEC, 0);
+ if (fd == -1) {
+ event_sock_warn(-1, "socket");
+ return (-1);
+ }
+
+ if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on))<0)
+ goto out;
+ if (reuse) {
+ if (evutil_make_listen_socket_reuseable(fd) < 0)
+ goto out;
+ }
+
+ if (ai != NULL) {
+ r = bind(fd, ai->ai_addr, (ev_socklen_t)ai->ai_addrlen);
+ if (r == -1)
+ goto out;
+ }
+
+ return (fd);
+
+ out:
+ serrno = EVUTIL_SOCKET_ERROR();
+ evutil_closesocket(fd);
+ EVUTIL_SET_SOCKET_ERROR(serrno);
+ return (-1);
+}
+
+static struct evutil_addrinfo *
+make_addrinfo(const char *address, ev_uint16_t port)
+{
+ struct evutil_addrinfo *ai = NULL;
+
+ struct evutil_addrinfo hints;
+ char strport[NI_MAXSERV];
+ int ai_result;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ /* turn NULL hostname into INADDR_ANY, and skip looking up any address
+ * types we don't have an interface to connect to. */
+ hints.ai_flags = EVUTIL_AI_PASSIVE|EVUTIL_AI_ADDRCONFIG;
+ evutil_snprintf(strport, sizeof(strport), "%d", port);
+ if ((ai_result = evutil_getaddrinfo(address, strport, &hints, &ai))
+ != 0) {
+ if (ai_result == EVUTIL_EAI_SYSTEM)
+ event_warn("getaddrinfo");
+ else
+ event_warnx("getaddrinfo: %s",
+ evutil_gai_strerror(ai_result));
+ return (NULL);
+ }
+
+ return (ai);
+}
+
+static evutil_socket_t
+bind_socket(const char *address, ev_uint16_t port, int reuse)
+{
+ evutil_socket_t fd;
+ struct evutil_addrinfo *aitop = NULL;
+
+ /* just create an unbound socket */
+ if (address == NULL && port == 0)
+ return bind_socket_ai(NULL, 0);
+
+ aitop = make_addrinfo(address, port);
+
+ if (aitop == NULL)
+ return (-1);
+
+ fd = bind_socket_ai(aitop, reuse);
+
+ evutil_freeaddrinfo(aitop);
+
+ return (fd);
+}
+
+struct evhttp_uri {
+ unsigned flags;
+ char *scheme; /* scheme; e.g http, ftp etc */
+ char *userinfo; /* userinfo (typically username:pass), or NULL */
+ char *host; /* hostname, IP address, or NULL */
+ int port; /* port, or zero */
+ char *path; /* path, or "". */
+ char *query; /* query, or NULL */
+ char *fragment; /* fragment or NULL */
+};
+
+struct evhttp_uri *
+evhttp_uri_new(void)
+{
+ struct evhttp_uri *uri = mm_calloc(sizeof(struct evhttp_uri), 1);
+ if (uri)
+ uri->port = -1;
+ return uri;
+}
+
+void
+evhttp_uri_set_flags(struct evhttp_uri *uri, unsigned flags)
+{
+ uri->flags = flags;
+}
+
+/* Return true if the string starting at s and ending immediately before eos
+ * is a valid URI scheme according to RFC3986
+ */
+static int
+scheme_ok(const char *s, const char *eos)
+{
+ /* scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) */
+ EVUTIL_ASSERT(eos >= s);
+ if (s == eos)
+ return 0;
+ if (!EVUTIL_ISALPHA_(*s))
+ return 0;
+ while (++s < eos) {
+ if (! EVUTIL_ISALNUM_(*s) &&
+ *s != '+' && *s != '-' && *s != '.')
+ return 0;
+ }
+ return 1;
+}
+
+#define SUBDELIMS "!$&'()*+,;="
+
+/* Return true iff [s..eos) is a valid userinfo */
+static int
+userinfo_ok(const char *s, const char *eos)
+{
+ while (s < eos) {
+ if (CHAR_IS_UNRESERVED(*s) ||
+ strchr(SUBDELIMS, *s) ||
+ *s == ':')
+ ++s;
+ else if (*s == '%' && s+2 < eos &&
+ EVUTIL_ISXDIGIT_(s[1]) &&
+ EVUTIL_ISXDIGIT_(s[2]))
+ s += 3;
+ else
+ return 0;
+ }
+ return 1;
+}
+
+static int
+regname_ok(const char *s, const char *eos)
+{
+ while (s && s<eos) {
+ if (CHAR_IS_UNRESERVED(*s) ||
+ strchr(SUBDELIMS, *s))
+ ++s;
+ else if (*s == '%' &&
+ EVUTIL_ISXDIGIT_(s[1]) &&
+ EVUTIL_ISXDIGIT_(s[2]))
+ s += 3;
+ else
+ return 0;
+ }
+ return 1;
+}
+
+static int
+parse_port(const char *s, const char *eos)
+{
+ int portnum = 0;
+ while (s < eos) {
+ if (! EVUTIL_ISDIGIT_(*s))
+ return -1;
+ portnum = (portnum * 10) + (*s - '0');
+ if (portnum < 0)
+ return -1;
+ ++s;
+ }
+ return portnum;
+}
+
+/* returns 0 for bad, 1 for ipv6, 2 for IPvFuture */
+static int
+bracket_addr_ok(const char *s, const char *eos)
+{
+ if (s + 3 > eos || *s != '[' || *(eos-1) != ']')
+ return 0;
+ if (s[1] == 'v') {
+ /* IPvFuture, or junk.
+ "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
+ */
+ s += 2; /* skip [v */
+ --eos;
+ if (!EVUTIL_ISXDIGIT_(*s)) /*require at least one*/
+ return 0;
+ while (s < eos && *s != '.') {
+ if (EVUTIL_ISXDIGIT_(*s))
+ ++s;
+ else
+ return 0;
+ }
+ if (*s != '.')
+ return 0;
+ ++s;
+ while (s < eos) {
+ if (CHAR_IS_UNRESERVED(*s) ||
+ strchr(SUBDELIMS, *s) ||
+ *s == ':')
+ ++s;
+ else
+ return 0;
+ }
+ return 2;
+ } else {
+ /* IPv6, or junk */
+ char buf[64];
+ ev_ssize_t n_chars = eos-s-2;
+ struct in6_addr in6;
+ if (n_chars >= 64) /* way too long */
+ return 0;
+ memcpy(buf, s+1, n_chars);
+ buf[n_chars]='\0';
+ return (evutil_inet_pton(AF_INET6,buf,&in6)==1) ? 1 : 0;
+ }
+}
+
+static int
+parse_authority(struct evhttp_uri *uri, char *s, char *eos)
+{
+ char *cp, *port;
+ EVUTIL_ASSERT(eos);
+ if (eos == s) {
+ uri->host = mm_strdup("");
+ if (uri->host == NULL) {
+ event_warn("%s: strdup", __func__);
+ return -1;
+ }
+ return 0;
+ }
+
+ /* Optionally, we start with "userinfo@" */
+
+ cp = strchr(s, '@');
+ if (cp && cp < eos) {
+ if (! userinfo_ok(s,cp))
+ return -1;
+ *cp++ = '\0';
+ uri->userinfo = mm_strdup(s);
+ if (uri->userinfo == NULL) {
+ event_warn("%s: strdup", __func__);
+ return -1;
+ }
+ } else {
+ cp = s;
+ }
+ /* Optionally, we end with ":port" */
+ for (port=eos-1; port >= cp && EVUTIL_ISDIGIT_(*port); --port)
+ ;
+ if (port >= cp && *port == ':') {
+ if (port+1 == eos) /* Leave port unspecified; the RFC allows a
+ * nil port */
+ uri->port = -1;
+ else if ((uri->port = parse_port(port+1, eos))<0)
+ return -1;
+ eos = port;
+ }
+ /* Now, cp..eos holds the "host" port, which can be an IPv4Address,
+ * an IP-Literal, or a reg-name */
+ EVUTIL_ASSERT(eos >= cp);
+ if (*cp == '[' && eos >= cp+2 && *(eos-1) == ']') {
+ /* IPv6address, IP-Literal, or junk. */
+ if (! bracket_addr_ok(cp, eos))
+ return -1;
+ } else {
+ /* Make sure the host part is ok. */
+ if (! regname_ok(cp,eos)) /* Match IPv4Address or reg-name */
+ return -1;
+ }
+ uri->host = mm_malloc(eos-cp+1);
+ if (uri->host == NULL) {
+ event_warn("%s: malloc", __func__);
+ return -1;
+ }
+ memcpy(uri->host, cp, eos-cp);
+ uri->host[eos-cp] = '\0';
+ return 0;
+
+}
+
+static char *
+end_of_authority(char *cp)
+{
+ while (*cp) {
+ if (*cp == '?' || *cp == '#' || *cp == '/')
+ return cp;
+ ++cp;
+ }
+ return cp;
+}
+
+enum uri_part {
+ PART_PATH,
+ PART_QUERY,
+ PART_FRAGMENT
+};
+
+/* Return the character after the longest prefix of 'cp' that matches...
+ * *pchar / "/" if allow_qchars is false, or
+ * *(pchar / "/" / "?") if allow_qchars is true.
+ */
+static char *
+end_of_path(char *cp, enum uri_part part, unsigned flags)
+{
+ if (flags & EVHTTP_URI_NONCONFORMANT) {
+ /* If NONCONFORMANT:
+ * Path is everything up to a # or ? or nul.
+ * Query is everything up a # or nul
+ * Fragment is everything up to a nul.
+ */
+ switch (part) {
+ case PART_PATH:
+ while (*cp && *cp != '#' && *cp != '?')
+ ++cp;
+ break;
+ case PART_QUERY:
+ while (*cp && *cp != '#')
+ ++cp;
+ break;
+ case PART_FRAGMENT:
+ cp += strlen(cp);
+ break;
+ };
+ return cp;
+ }
+
+ while (*cp) {
+ if (CHAR_IS_UNRESERVED(*cp) ||
+ strchr(SUBDELIMS, *cp) ||
+ *cp == ':' || *cp == '@' || *cp == '/')
+ ++cp;
+ else if (*cp == '%' && EVUTIL_ISXDIGIT_(cp[1]) &&
+ EVUTIL_ISXDIGIT_(cp[2]))
+ cp += 3;
+ else if (*cp == '?' && part != PART_PATH)
+ ++cp;
+ else
+ return cp;
+ }
+ return cp;
+}
+
+static int
+path_matches_noscheme(const char *cp)
+{
+ while (*cp) {
+ if (*cp == ':')
+ return 0;
+ else if (*cp == '/')
+ return 1;
+ ++cp;
+ }
+ return 1;
+}
+
+struct evhttp_uri *
+evhttp_uri_parse(const char *source_uri)
+{
+ return evhttp_uri_parse_with_flags(source_uri, 0);
+}
+
+struct evhttp_uri *
+evhttp_uri_parse_with_flags(const char *source_uri, unsigned flags)
+{
+ char *readbuf = NULL, *readp = NULL, *token = NULL, *query = NULL;
+ char *path = NULL, *fragment = NULL;
+ int got_authority = 0;
+
+ struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
+ if (uri == NULL) {
+ event_warn("%s: calloc", __func__);
+ goto err;
+ }
+ uri->port = -1;
+ uri->flags = flags;
+
+ readbuf = mm_strdup(source_uri);
+ if (readbuf == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+
+ readp = readbuf;
+ token = NULL;
+
+ /* We try to follow RFC3986 here as much as we can, and match
+ the productions
+
+ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+
+ relative-ref = relative-part [ "?" query ] [ "#" fragment ]
+ */
+
+ /* 1. scheme: */
+ token = strchr(readp, ':');
+ if (token && scheme_ok(readp,token)) {
+ *token = '\0';
+ uri->scheme = mm_strdup(readp);
+ if (uri->scheme == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+ readp = token+1; /* eat : */
+ }
+
+ /* 2. Optionally, "//" then an 'authority' part. */
+ if (readp[0]=='/' && readp[1] == '/') {
+ char *authority;
+ readp += 2;
+ authority = readp;
+ path = end_of_authority(readp);
+ if (parse_authority(uri, authority, path) < 0)
+ goto err;
+ readp = path;
+ got_authority = 1;
+ }
+
+ /* 3. Query: path-abempty, path-absolute, path-rootless, or path-empty
+ */
+ path = readp;
+ readp = end_of_path(path, PART_PATH, flags);
+
+ /* Query */
+ if (*readp == '?') {
+ *readp = '\0';
+ ++readp;
+ query = readp;
+ readp = end_of_path(readp, PART_QUERY, flags);
+ }
+ /* fragment */
+ if (*readp == '#') {
+ *readp = '\0';
+ ++readp;
+ fragment = readp;
+ readp = end_of_path(readp, PART_FRAGMENT, flags);
+ }
+ if (*readp != '\0') {
+ goto err;
+ }
+
+ /* These next two cases may be unreachable; I'm leaving them
+ * in to be defensive. */
+ /* If you didn't get an authority, the path can't begin with "//" */
+ if (!got_authority && path[0]=='/' && path[1]=='/')
+ goto err;
+ /* If you did get an authority, the path must begin with "/" or be
+ * empty. */
+ if (got_authority && path[0] != '/' && path[0] != '\0')
+ goto err;
+ /* (End of maybe-unreachable cases) */
+
+ /* If there was no scheme, the first part of the path (if any) must
+ * have no colon in it. */
+ if (! uri->scheme && !path_matches_noscheme(path))
+ goto err;
+
+ EVUTIL_ASSERT(path);
+ uri->path = mm_strdup(path);
+ if (uri->path == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+
+ if (query) {
+ uri->query = mm_strdup(query);
+ if (uri->query == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+ }
+ if (fragment) {
+ uri->fragment = mm_strdup(fragment);
+ if (uri->fragment == NULL) {
+ event_warn("%s: strdup", __func__);
+ goto err;
+ }
+ }
+
+ mm_free(readbuf);
+
+ return uri;
+err:
+ if (uri)
+ evhttp_uri_free(uri);
+ if (readbuf)
+ mm_free(readbuf);
+ return NULL;
+}
+
+void
+evhttp_uri_free(struct evhttp_uri *uri)
+{
+#define URI_FREE_STR_(f) \
+ if (uri->f) { \
+ mm_free(uri->f); \
+ }
+
+ URI_FREE_STR_(scheme);
+ URI_FREE_STR_(userinfo);
+ URI_FREE_STR_(host);
+ URI_FREE_STR_(path);
+ URI_FREE_STR_(query);
+ URI_FREE_STR_(fragment);
+
+ mm_free(uri);
+#undef URI_FREE_STR_
+}
+
+char *
+evhttp_uri_join(struct evhttp_uri *uri, char *buf, size_t limit)
+{
+ struct evbuffer *tmp = 0;
+ size_t joined_size = 0;
+ char *output = NULL;
+
+#define URI_ADD_(f) evbuffer_add(tmp, uri->f, strlen(uri->f))
+
+ if (!uri || !buf || !limit)
+ return NULL;
+
+ tmp = evbuffer_new();
+ if (!tmp)
+ return NULL;
+
+ if (uri->scheme) {
+ URI_ADD_(scheme);
+ evbuffer_add(tmp, ":", 1);
+ }
+ if (uri->host) {
+ evbuffer_add(tmp, "//", 2);
+ if (uri->userinfo)
+ evbuffer_add_printf(tmp,"%s@", uri->userinfo);
+ URI_ADD_(host);
+ if (uri->port >= 0)
+ evbuffer_add_printf(tmp,":%d", uri->port);
+
+ if (uri->path && uri->path[0] != '/' && uri->path[0] != '\0')
+ goto err;
+ }
+
+ if (uri->path)
+ URI_ADD_(path);
+
+ if (uri->query) {
+ evbuffer_add(tmp, "?", 1);
+ URI_ADD_(query);
+ }
+
+ if (uri->fragment) {
+ evbuffer_add(tmp, "#", 1);
+ URI_ADD_(fragment);
+ }
+
+ evbuffer_add(tmp, "\0", 1); /* NUL */
+
+ joined_size = evbuffer_get_length(tmp);
+
+ if (joined_size > limit) {
+ /* It doesn't fit. */
+ evbuffer_free(tmp);
+ return NULL;
+ }
+ evbuffer_remove(tmp, buf, joined_size);
+
+ output = buf;
+err:
+ evbuffer_free(tmp);
+
+ return output;
+#undef URI_ADD_
+}
+
+const char *
+evhttp_uri_get_scheme(const struct evhttp_uri *uri)
+{
+ return uri->scheme;
+}
+const char *
+evhttp_uri_get_userinfo(const struct evhttp_uri *uri)
+{
+ return uri->userinfo;
+}
+const char *
+evhttp_uri_get_host(const struct evhttp_uri *uri)
+{
+ return uri->host;
+}
+int
+evhttp_uri_get_port(const struct evhttp_uri *uri)
+{
+ return uri->port;
+}
+const char *
+evhttp_uri_get_path(const struct evhttp_uri *uri)
+{
+ return uri->path;
+}
+const char *
+evhttp_uri_get_query(const struct evhttp_uri *uri)
+{
+ return uri->query;
+}
+const char *
+evhttp_uri_get_fragment(const struct evhttp_uri *uri)
+{
+ return uri->fragment;
+}
+
+#define URI_SET_STR_(f) do { \
+ if (uri->f) \
+ mm_free(uri->f); \
+ if (f) { \
+ if ((uri->f = mm_strdup(f)) == NULL) { \
+ event_warn("%s: strdup()", __func__); \
+ return -1; \
+ } \
+ } else { \
+ uri->f = NULL; \
+ } \
+ } while(0)
+
+int
+evhttp_uri_set_scheme(struct evhttp_uri *uri, const char *scheme)
+{
+ if (scheme && !scheme_ok(scheme, scheme+strlen(scheme)))
+ return -1;
+
+ URI_SET_STR_(scheme);
+ return 0;
+}
+int
+evhttp_uri_set_userinfo(struct evhttp_uri *uri, const char *userinfo)
+{
+ if (userinfo && !userinfo_ok(userinfo, userinfo+strlen(userinfo)))
+ return -1;
+ URI_SET_STR_(userinfo);
+ return 0;
+}
+int
+evhttp_uri_set_host(struct evhttp_uri *uri, const char *host)
+{
+ if (host) {
+ if (host[0] == '[') {
+ if (! bracket_addr_ok(host, host+strlen(host)))
+ return -1;
+ } else {
+ if (! regname_ok(host, host+strlen(host)))
+ return -1;
+ }
+ }
+
+ URI_SET_STR_(host);
+ return 0;
+}
+int
+evhttp_uri_set_port(struct evhttp_uri *uri, int port)
+{
+ if (port < -1)
+ return -1;
+ uri->port = port;
+ return 0;
+}
+#define end_of_cpath(cp,p,f) \
+ ((const char*)(end_of_path(((char*)(cp)), (p), (f))))
+
+int
+evhttp_uri_set_path(struct evhttp_uri *uri, const char *path)
+{
+ if (path && end_of_cpath(path, PART_PATH, uri->flags) != path+strlen(path))
+ return -1;
+
+ URI_SET_STR_(path);
+ return 0;
+}
+int
+evhttp_uri_set_query(struct evhttp_uri *uri, const char *query)
+{
+ if (query && end_of_cpath(query, PART_QUERY, uri->flags) != query+strlen(query))
+ return -1;
+ URI_SET_STR_(query);
+ return 0;
+}
+int
+evhttp_uri_set_fragment(struct evhttp_uri *uri, const char *fragment)
+{
+ if (fragment && end_of_cpath(fragment, PART_FRAGMENT, uri->flags) != fragment+strlen(fragment))
+ return -1;
+ URI_SET_STR_(fragment);
+ return 0;
+}
diff --git a/sntp/libevent/include/evdns.h b/sntp/libevent/include/evdns.h
new file mode 100644
index 000000000000..8672db03698f
--- /dev/null
+++ b/sntp/libevent/include/evdns.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT1_EVDNS_H_INCLUDED_
+#define EVENT1_EVDNS_H_INCLUDED_
+
+/** @file evdns.h
+
+ A dns subsystem for Libevent.
+
+ The <evdns.h> header is deprecated in Libevent 2.0 and later; please
+ use <event2/evdns.h> instead. Depending on what functionality you
+ need, you may also want to include more of the other <event2/...>
+ headers.
+ */
+
+#include <event.h>
+#include <event2/dns.h>
+#include <event2/dns_compat.h>
+#include <event2/dns_struct.h>
+
+#endif /* EVENT1_EVDNS_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event.h b/sntp/libevent/include/event.h
new file mode 100644
index 000000000000..3a1b0c2c0e43
--- /dev/null
+++ b/sntp/libevent/include/event.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT1_EVENT_H_INCLUDED_
+#define EVENT1_EVENT_H_INCLUDED_
+
+/** @file event.h
+
+ A library for writing event-driven network servers.
+
+ The <event.h> header is deprecated in Libevent 2.0 and later; please
+ use <event2/event.h> instead. Depending on what functionality you
+ need, you may also want to include more of the other event2/
+ headers.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <stdarg.h>
+
+/* For int types. */
+#include <evutil.h>
+
+#ifdef _WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <winsock2.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+#endif
+
+#include <event2/event_struct.h>
+#include <event2/event.h>
+#include <event2/event_compat.h>
+#include <event2/buffer.h>
+#include <event2/buffer_compat.h>
+#include <event2/bufferevent.h>
+#include <event2/bufferevent_struct.h>
+#include <event2/bufferevent_compat.h>
+#include <event2/tag.h>
+#include <event2/tag_compat.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT1_EVENT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/buffer.h b/sntp/libevent/include/event2/buffer.h
new file mode 100644
index 000000000000..839d6e7ca4c5
--- /dev/null
+++ b/sntp/libevent/include/event2/buffer.h
@@ -0,0 +1,1081 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFER_H_INCLUDED_
+#define EVENT2_BUFFER_H_INCLUDED_
+
+/** @file event2/buffer.h
+
+ Functions for buffering data for network sending or receiving.
+
+ An evbuffer can be used for preparing data before sending it to
+ the network or conversely for reading data from the network.
+ Evbuffers try to avoid memory copies as much as possible. As a
+ result, evbuffers can be used to pass data around without actually
+ incurring the overhead of copying the data.
+
+ A new evbuffer can be allocated with evbuffer_new(), and can be
+ freed with evbuffer_free(). Most users will be using evbuffers via
+ the bufferevent interface. To access a bufferevent's evbuffers, use
+ bufferevent_get_input() and bufferevent_get_output().
+
+ There are several guidelines for using evbuffers.
+
+ - if you already know how much data you are going to add as a result
+ of calling evbuffer_add() multiple times, it makes sense to use
+ evbuffer_expand() first to make sure that enough memory is allocated
+ before hand.
+
+ - evbuffer_add_buffer() adds the contents of one buffer to the other
+ without incurring any unnecessary memory copies.
+
+ - evbuffer_add() and evbuffer_add_buffer() do not mix very well:
+ if you use them, you will wind up with fragmented memory in your
+ buffer.
+
+ - For high-performance code, you may want to avoid copying data into and out
+ of buffers. You can skip the copy step by using
+ evbuffer_reserve_space()/evbuffer_commit_space() when writing into a
+ buffer, and evbuffer_peek() when reading.
+
+ In Libevent 2.0 and later, evbuffers are represented using a linked
+ list of memory chunks, with pointers to the first and last chunk in
+ the chain.
+
+ As the contents of an evbuffer can be stored in multiple different
+ memory blocks, it cannot be accessed directly. Instead, evbuffer_pullup()
+ can be used to force a specified number of bytes to be contiguous. This
+ will cause memory reallocation and memory copies if the data is split
+ across multiple blocks. It is more efficient, however, to use
+ evbuffer_peek() if you don't require that the memory to be contiguous.
+ */
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#include <stdarg.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+#include <event2/util.h>
+
+/**
+ An evbuffer is an opaque data type for efficiently buffering data to be
+ sent or received on the network.
+
+ @see event2/event.h for more information
+*/
+struct evbuffer
+#ifdef EVENT_IN_DOXYGEN_
+{}
+#endif
+;
+
+/**
+ Pointer to a position within an evbuffer.
+
+ Used when repeatedly searching through a buffer. Calling any function
+ that modifies or re-packs the buffer contents may invalidate all
+ evbuffer_ptrs for that buffer. Do not modify these values except with
+ evbuffer_ptr_set.
+
+ Used when repeatedly searching through a buffer. Calls to any function
+ that modifies or re-packs the buffer contents may invalidate all
+ evbuffer_ptrs for that buffer. Do not modify these values except with
+ evbuffer_ptr_set.
+
+ An evbuffer_ptr can represent any position from the start of a buffer up
+ to a position immediately after the end of a buffer.
+
+ @see evbuffer_ptr_set()
+ */
+struct evbuffer_ptr {
+ ev_ssize_t pos;
+
+ /* Do not alter or rely on the values of fields: they are for internal
+ * use */
+ struct {
+ void *chain;
+ size_t pos_in_chain;
+ } internal_;
+};
+
+/** Describes a single extent of memory inside an evbuffer. Used for
+ direct-access functions.
+
+ @see evbuffer_reserve_space, evbuffer_commit_space, evbuffer_peek
+ */
+#ifdef EVENT__HAVE_SYS_UIO_H
+#define evbuffer_iovec iovec
+/* Internal use -- defined only if we are using the native struct iovec */
+#define EVBUFFER_IOVEC_IS_NATIVE_
+#else
+struct evbuffer_iovec {
+ /** The start of the extent of memory. */
+ void *iov_base;
+ /** The length of the extent of memory. */
+ size_t iov_len;
+};
+#endif
+
+/**
+ Allocate storage for a new evbuffer.
+
+ @return a pointer to a newly allocated evbuffer struct, or NULL if an error
+ occurred
+ */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer *evbuffer_new(void);
+/**
+ Deallocate storage for an evbuffer.
+
+ @param buf pointer to the evbuffer to be freed
+ */
+EVENT2_EXPORT_SYMBOL
+void evbuffer_free(struct evbuffer *buf);
+
+/**
+ Enable locking on an evbuffer so that it can safely be used by multiple
+ threads at the same time.
+
+ NOTE: when locking is enabled, the lock will be held when callbacks are
+ invoked. This could result in deadlock if you aren't careful. Plan
+ accordingly!
+
+ @param buf An evbuffer to make lockable.
+ @param lock A lock object, or NULL if we should allocate our own.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_enable_locking(struct evbuffer *buf, void *lock);
+
+/**
+ Acquire the lock on an evbuffer. Has no effect if locking was not enabled
+ with evbuffer_enable_locking.
+*/
+EVENT2_EXPORT_SYMBOL
+void evbuffer_lock(struct evbuffer *buf);
+
+/**
+ Release the lock on an evbuffer. Has no effect if locking was not enabled
+ with evbuffer_enable_locking.
+*/
+EVENT2_EXPORT_SYMBOL
+void evbuffer_unlock(struct evbuffer *buf);
+
+
+/** If this flag is set, then we will not use evbuffer_peek(),
+ * evbuffer_remove(), evbuffer_remove_buffer(), and so on to read bytes
+ * from this buffer: we'll only take bytes out of this buffer by
+ * writing them to the network (as with evbuffer_write_atmost), by
+ * removing them without observing them (as with evbuffer_drain),
+ * or by copying them all out at once (as with evbuffer_add_buffer).
+ *
+ * Using this option allows the implementation to use sendfile-based
+ * operations for evbuffer_add_file(); see that function for more
+ * information.
+ *
+ * This flag is on by default for bufferevents that can take advantage
+ * of it; you should never actually need to set it on a bufferevent's
+ * output buffer.
+ */
+#define EVBUFFER_FLAG_DRAINS_TO_FD 1
+
+/** Change the flags that are set for an evbuffer by adding more.
+ *
+ * @param buffer the evbuffer that the callback is watching.
+ * @param cb the callback whose status we want to change.
+ * @param flags One or more EVBUFFER_FLAG_* options
+ * @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_set_flags(struct evbuffer *buf, ev_uint64_t flags);
+/** Change the flags that are set for an evbuffer by removing some.
+ *
+ * @param buffer the evbuffer that the callback is watching.
+ * @param cb the callback whose status we want to change.
+ * @param flags One or more EVBUFFER_FLAG_* options
+ * @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_clear_flags(struct evbuffer *buf, ev_uint64_t flags);
+
+/**
+ Returns the total number of bytes stored in the evbuffer
+
+ @param buf pointer to the evbuffer
+ @return the number of bytes stored in the evbuffer
+*/
+EVENT2_EXPORT_SYMBOL
+size_t evbuffer_get_length(const struct evbuffer *buf);
+
+/**
+ Returns the number of contiguous available bytes in the first buffer chain.
+
+ This is useful when processing data that might be split into multiple
+ chains, or that might all be in the first chain. Calls to
+ evbuffer_pullup() that cause reallocation and copying of data can thus be
+ avoided.
+
+ @param buf pointer to the evbuffer
+ @return 0 if no data is available, otherwise the number of available bytes
+ in the first buffer chain.
+*/
+EVENT2_EXPORT_SYMBOL
+size_t evbuffer_get_contiguous_space(const struct evbuffer *buf);
+
+/**
+ Expands the available space in an evbuffer.
+
+ Expands the available space in the evbuffer to at least datlen, so that
+ appending datlen additional bytes will not require any new allocations.
+
+ @param buf the evbuffer to be expanded
+ @param datlen the new minimum length requirement
+ @return 0 if successful, or -1 if an error occurred
+*/
+EVENT2_EXPORT_SYMBOL
+int evbuffer_expand(struct evbuffer *buf, size_t datlen);
+
+/**
+ Reserves space in the last chain or chains of an evbuffer.
+
+ Makes space available in the last chain or chains of an evbuffer that can
+ be arbitrarily written to by a user. The space does not become
+ available for reading until it has been committed with
+ evbuffer_commit_space().
+
+ The space is made available as one or more extents, represented by
+ an initial pointer and a length. You can force the memory to be
+ available as only one extent. Allowing more extents, however, makes the
+ function more efficient.
+
+ Multiple subsequent calls to this function will make the same space
+ available until evbuffer_commit_space() has been called.
+
+ It is an error to do anything that moves around the buffer's internal
+ memory structures before committing the space.
+
+ NOTE: The code currently does not ever use more than two extents.
+ This may change in future versions.
+
+ @param buf the evbuffer in which to reserve space.
+ @param size how much space to make available, at minimum. The
+ total length of the extents may be greater than the requested
+ length.
+ @param vec an array of one or more evbuffer_iovec structures to
+ hold pointers to the reserved extents of memory.
+ @param n_vec The length of the vec array. Must be at least 1;
+ 2 is more efficient.
+ @return the number of provided extents, or -1 on error.
+ @see evbuffer_commit_space()
+*/
+EVENT2_EXPORT_SYMBOL
+int
+evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size,
+ struct evbuffer_iovec *vec, int n_vec);
+
+/**
+ Commits previously reserved space.
+
+ Commits some of the space previously reserved with
+ evbuffer_reserve_space(). It then becomes available for reading.
+
+ This function may return an error if the pointer in the extents do
+ not match those returned from evbuffer_reserve_space, or if data
+ has been added to the buffer since the space was reserved.
+
+ If you want to commit less data than you got reserved space for,
+ modify the iov_len pointer of the appropriate extent to a smaller
+ value. Note that you may have received more space than you
+ requested if it was available!
+
+ @param buf the evbuffer in which to reserve space.
+ @param vec one or two extents returned by evbuffer_reserve_space.
+ @param n_vecs the number of extents.
+ @return 0 on success, -1 on error
+ @see evbuffer_reserve_space()
+*/
+EVENT2_EXPORT_SYMBOL
+int evbuffer_commit_space(struct evbuffer *buf,
+ struct evbuffer_iovec *vec, int n_vecs);
+
+/**
+ Append data to the end of an evbuffer.
+
+ @param buf the evbuffer to be appended to
+ @param data pointer to the beginning of the data buffer
+ @param datlen the number of bytes to be copied from the data buffer
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen);
+
+
+/**
+ Read data from an evbuffer and drain the bytes read.
+
+ If more bytes are requested than are available in the evbuffer, we
+ only extract as many bytes as were available.
+
+ @param buf the evbuffer to be read from
+ @param data the destination buffer to store the result
+ @param datlen the maximum size of the destination buffer
+ @return the number of bytes read, or -1 if we can't drain the buffer.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen);
+
+/**
+ Read data from an evbuffer, and leave the buffer unchanged.
+
+ If more bytes are requested than are available in the evbuffer, we
+ only extract as many bytes as were available.
+
+ @param buf the evbuffer to be read from
+ @param data_out the destination buffer to store the result
+ @param datlen the maximum size of the destination buffer
+ @return the number of bytes read, or -1 if we can't drain the buffer.
+ */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t evbuffer_copyout(struct evbuffer *buf, void *data_out, size_t datlen);
+
+/**
+ Read data from the middle of an evbuffer, and leave the buffer unchanged.
+
+ If more bytes are requested than are available in the evbuffer, we
+ only extract as many bytes as were available.
+
+ @param buf the evbuffer to be read from
+ @param pos the position to start reading from
+ @param data_out the destination buffer to store the result
+ @param datlen the maximum size of the destination buffer
+ @return the number of bytes read, or -1 if we can't drain the buffer.
+ */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos, void *data_out, size_t datlen);
+
+/**
+ Read data from an evbuffer into another evbuffer, draining
+ the bytes from the source buffer. This function avoids copy
+ operations to the extent possible.
+
+ If more bytes are requested than are available in src, the src
+ buffer is drained completely.
+
+ @param src the evbuffer to be read from
+ @param dst the destination evbuffer to store the result into
+ @param datlen the maximum numbers of bytes to transfer
+ @return the number of bytes read
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst,
+ size_t datlen);
+
+/** Used to tell evbuffer_readln what kind of line-ending to look for.
+ */
+enum evbuffer_eol_style {
+ /** Any sequence of CR and LF characters is acceptable as an
+ * EOL.
+ *
+ * Note that this style can produce ambiguous results: the
+ * sequence "CRLF" will be treated as a single EOL if it is
+ * all in the buffer at once, but if you first read a CR from
+ * the network and later read an LF from the network, it will
+ * be treated as two EOLs.
+ */
+ EVBUFFER_EOL_ANY,
+ /** An EOL is an LF, optionally preceded by a CR. This style is
+ * most useful for implementing text-based internet protocols. */
+ EVBUFFER_EOL_CRLF,
+ /** An EOL is a CR followed by an LF. */
+ EVBUFFER_EOL_CRLF_STRICT,
+ /** An EOL is a LF. */
+ EVBUFFER_EOL_LF,
+ /** An EOL is a NUL character (that is, a single byte with value 0) */
+ EVBUFFER_EOL_NUL
+};
+
+/**
+ * Read a single line from an evbuffer.
+ *
+ * Reads a line terminated by an EOL as determined by the evbuffer_eol_style
+ * argument. Returns a newly allocated nul-terminated string; the caller must
+ * free the returned value. The EOL is not included in the returned string.
+ *
+ * @param buffer the evbuffer to read from
+ * @param n_read_out if non-NULL, points to a size_t that is set to the
+ * number of characters in the returned string. This is useful for
+ * strings that can contain NUL characters.
+ * @param eol_style the style of line-ending to use.
+ * @return pointer to a single line, or NULL if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+char *evbuffer_readln(struct evbuffer *buffer, size_t *n_read_out,
+ enum evbuffer_eol_style eol_style);
+
+/**
+ Move all data from one evbuffer into another evbuffer.
+
+ This is a destructive add. The data from one buffer moves into
+ the other buffer. However, no unnecessary memory copies occur.
+
+ @param outbuf the output buffer
+ @param inbuf the input buffer
+ @return 0 if successful, or -1 if an error occurred
+
+ @see evbuffer_remove_buffer()
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf);
+
+/**
+ Copy data from one evbuffer into another evbuffer.
+
+ This is a non-destructive add. The data from one buffer is copied
+ into the other buffer. However, no unnecessary memory copies occur.
+
+ Note that buffers already containing buffer references can't be added
+ to other buffers.
+
+ @param outbuf the output buffer
+ @param inbuf the input buffer
+ @return 0 if successful, or -1 if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_buffer_reference(struct evbuffer *outbuf,
+ struct evbuffer *inbuf);
+
+/**
+ A cleanup function for a piece of memory added to an evbuffer by
+ reference.
+
+ @see evbuffer_add_reference()
+ */
+typedef void (*evbuffer_ref_cleanup_cb)(const void *data,
+ size_t datalen, void *extra);
+
+/**
+ Reference memory into an evbuffer without copying.
+
+ The memory needs to remain valid until all the added data has been
+ read. This function keeps just a reference to the memory without
+ actually incurring the overhead of a copy.
+
+ @param outbuf the output buffer
+ @param data the memory to reference
+ @param datlen how memory to reference
+ @param cleanupfn callback to be invoked when the memory is no longer
+ referenced by this evbuffer.
+ @param cleanupfn_arg optional argument to the cleanup callback
+ @return 0 if successful, or -1 if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_reference(struct evbuffer *outbuf,
+ const void *data, size_t datlen,
+ evbuffer_ref_cleanup_cb cleanupfn, void *cleanupfn_arg);
+
+/**
+ Copy data from a file into the evbuffer for writing to a socket.
+
+ This function avoids unnecessary data copies between userland and
+ kernel. If sendfile is available and the EVBUFFER_FLAG_DRAINS_TO_FD
+ flag is set, it uses those functions. Otherwise, it tries to use
+ mmap (or CreateFileMapping on Windows).
+
+ The function owns the resulting file descriptor and will close it
+ when finished transferring data.
+
+ The results of using evbuffer_remove() or evbuffer_pullup() on
+ evbuffers whose data was added using this function are undefined.
+
+ For more fine-grained control, use evbuffer_add_file_segment.
+
+ @param outbuf the output buffer
+ @param fd the file descriptor
+ @param offset the offset from which to read data
+ @param length how much data to read, or -1 to read as much as possible.
+ (-1 requires that 'fd' support fstat.)
+ @return 0 if successful, or -1 if an error occurred
+*/
+
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_file(struct evbuffer *outbuf, int fd, ev_off_t offset,
+ ev_off_t length);
+
+/**
+ An evbuffer_file_segment holds a reference to a range of a file --
+ possibly the whole file! -- for use in writing from an evbuffer to a
+ socket. It could be implemented with mmap, sendfile, splice, or (if all
+ else fails) by just pulling all the data into RAM. A single
+ evbuffer_file_segment can be added more than once, and to more than one
+ evbuffer.
+ */
+struct evbuffer_file_segment;
+
+/**
+ Flag for creating evbuffer_file_segment: If this flag is set, then when
+ the evbuffer_file_segment is freed and no longer in use by any
+ evbuffer, the underlying fd is closed.
+ */
+#define EVBUF_FS_CLOSE_ON_FREE 0x01
+/**
+ Flag for creating evbuffer_file_segment: Disable memory-map based
+ implementations.
+ */
+#define EVBUF_FS_DISABLE_MMAP 0x02
+/**
+ Flag for creating evbuffer_file_segment: Disable direct fd-to-fd
+ implementations (including sendfile and splice).
+
+ You might want to use this option if data needs to be taken from the
+ evbuffer by any means other than writing it to the network: the sendfile
+ backend is fast, but it only works for sending files directly to the
+ network.
+ */
+#define EVBUF_FS_DISABLE_SENDFILE 0x04
+/**
+ Flag for creating evbuffer_file_segment: Do not allocate a lock for this
+ segment. If this option is set, then neither the segment nor any
+ evbuffer it is added to may ever be accessed from more than one thread
+ at a time.
+ */
+#define EVBUF_FS_DISABLE_LOCKING 0x08
+
+/**
+ A cleanup function for a evbuffer_file_segment added to an evbuffer
+ for reference.
+ */
+typedef void (*evbuffer_file_segment_cleanup_cb)(
+ struct evbuffer_file_segment const* seg, int flags, void* arg);
+
+/**
+ Create and return a new evbuffer_file_segment for reading data from a
+ file and sending it out via an evbuffer.
+
+ This function avoids unnecessary data copies between userland and
+ kernel. Where available, it uses sendfile or splice.
+
+ The file descriptor must not be closed so long as any evbuffer is using
+ this segment.
+
+ The results of using evbuffer_remove() or evbuffer_pullup() or any other
+ function that reads bytes from an evbuffer on any evbuffer containing
+ the newly returned segment are undefined, unless you pass the
+ EVBUF_FS_DISABLE_SENDFILE flag to this function.
+
+ @param fd an open file to read from.
+ @param offset an index within the file at which to start reading
+ @param length how much data to read, or -1 to read as much as possible.
+ (-1 requires that 'fd' support fstat.)
+ @param flags any number of the EVBUF_FS_* flags
+ @return a new evbuffer_file_segment, or NULL on failure.
+ **/
+EVENT2_EXPORT_SYMBOL
+struct evbuffer_file_segment *evbuffer_file_segment_new(
+ int fd, ev_off_t offset, ev_off_t length, unsigned flags);
+
+/**
+ Free an evbuffer_file_segment
+
+ It is safe to call this function even if the segment has been added to
+ one or more evbuffers. The evbuffer_file_segment will not be freed
+ until no more references to it exist.
+ */
+EVENT2_EXPORT_SYMBOL
+void evbuffer_file_segment_free(struct evbuffer_file_segment *seg);
+
+/**
+ Add cleanup callback and argument for the callback to an
+ evbuffer_file_segment.
+
+ The cleanup callback will be invoked when no more references to the
+ evbuffer_file_segment exist.
+ **/
+EVENT2_EXPORT_SYMBOL
+void evbuffer_file_segment_add_cleanup_cb(struct evbuffer_file_segment *seg,
+ evbuffer_file_segment_cleanup_cb cb, void* arg);
+
+/**
+ Insert some or all of an evbuffer_file_segment at the end of an evbuffer
+
+ Note that the offset and length parameters of this function have a
+ different meaning from those provided to evbuffer_file_segment_new: When
+ you create the segment, the offset is the offset _within the file_, and
+ the length is the length _of the segment_, whereas when you add a
+ segment to an evbuffer, the offset is _within the segment_ and the
+ length is the length of the _part of the segment you want to use.
+
+ In other words, if you have a 10 KiB file, and you create an
+ evbuffer_file_segment for it with offset 20 and length 1000, it will
+ refer to bytes 20..1019 inclusive. If you then pass this segment to
+ evbuffer_add_file_segment and specify an offset of 20 and a length of
+ 50, you will be adding bytes 40..99 inclusive.
+
+ @param buf the evbuffer to append to
+ @param seg the segment to add
+ @param offset the offset within the segment to start from
+ @param length the amount of data to add, or -1 to add it all.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_file_segment(struct evbuffer *buf,
+ struct evbuffer_file_segment *seg, ev_off_t offset, ev_off_t length);
+
+/**
+ Append a formatted string to the end of an evbuffer.
+
+ The string is formated as printf.
+
+ @param buf the evbuffer that will be appended to
+ @param fmt a format string
+ @param ... arguments that will be passed to printf(3)
+ @return The number of bytes added if successful, or -1 if an error occurred.
+
+ @see evutil_printf(), evbuffer_add_vprintf()
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...)
+#ifdef __GNUC__
+ __attribute__((format(printf, 2, 3)))
+#endif
+;
+
+/**
+ Append a va_list formatted string to the end of an evbuffer.
+
+ @param buf the evbuffer that will be appended to
+ @param fmt a format string
+ @param ap a varargs va_list argument array that will be passed to vprintf(3)
+ @return The number of bytes added if successful, or -1 if an error occurred.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
+#ifdef __GNUC__
+ __attribute__((format(printf, 2, 0)))
+#endif
+;
+
+
+/**
+ Remove a specified number of bytes data from the beginning of an evbuffer.
+
+ @param buf the evbuffer to be drained
+ @param len the number of bytes to drain from the beginning of the buffer
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_drain(struct evbuffer *buf, size_t len);
+
+
+/**
+ Write the contents of an evbuffer to a file descriptor.
+
+ The evbuffer will be drained after the bytes have been successfully written.
+
+ @param buffer the evbuffer to be written and drained
+ @param fd the file descriptor to be written to
+ @return the number of bytes written, or -1 if an error occurred
+ @see evbuffer_read()
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_write(struct evbuffer *buffer, evutil_socket_t fd);
+
+/**
+ Write some of the contents of an evbuffer to a file descriptor.
+
+ The evbuffer will be drained after the bytes have been successfully written.
+
+ @param buffer the evbuffer to be written and drained
+ @param fd the file descriptor to be written to
+ @param howmuch the largest allowable number of bytes to write, or -1
+ to write as many bytes as we can.
+ @return the number of bytes written, or -1 if an error occurred
+ @see evbuffer_read()
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd,
+ ev_ssize_t howmuch);
+
+/**
+ Read from a file descriptor and store the result in an evbuffer.
+
+ @param buffer the evbuffer to store the result
+ @param fd the file descriptor to read from
+ @param howmuch the number of bytes to be read
+ @return the number of bytes read, or -1 if an error occurred
+ @see evbuffer_write()
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_read(struct evbuffer *buffer, evutil_socket_t fd, int howmuch);
+
+/**
+ Search for a string within an evbuffer.
+
+ @param buffer the evbuffer to be searched
+ @param what the string to be searched for
+ @param len the length of the search string
+ @param start NULL or a pointer to a valid struct evbuffer_ptr.
+ @return a struct evbuffer_ptr whose 'pos' field has the offset of the
+ first occurrence of the string in the buffer after 'start'. The 'pos'
+ field of the result is -1 if the string was not found.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer_ptr evbuffer_search(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start);
+
+/**
+ Search for a string within part of an evbuffer.
+
+ @param buffer the evbuffer to be searched
+ @param what the string to be searched for
+ @param len the length of the search string
+ @param start NULL or a pointer to a valid struct evbuffer_ptr that
+ indicates where we should start searching.
+ @param end NULL or a pointer to a valid struct evbuffer_ptr that
+ indicates where we should stop searching.
+ @return a struct evbuffer_ptr whose 'pos' field has the offset of the
+ first occurrence of the string in the buffer after 'start'. The 'pos'
+ field of the result is -1 if the string was not found.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer_ptr evbuffer_search_range(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start, const struct evbuffer_ptr *end);
+
+/**
+ Defines how to adjust an evbuffer_ptr by evbuffer_ptr_set()
+
+ @see evbuffer_ptr_set() */
+enum evbuffer_ptr_how {
+ /** Sets the pointer to the position; can be called on with an
+ uninitialized evbuffer_ptr. */
+ EVBUFFER_PTR_SET,
+ /** Advances the pointer by adding to the current position. */
+ EVBUFFER_PTR_ADD
+};
+
+/**
+ Sets the search pointer in the buffer to position.
+
+ There are two ways to use this function: you can call
+ evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
+ to move 'pos' to a position 'N' bytes after the start of the buffer, or
+ evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET)
+ to move 'pos' forward by 'N' bytes.
+
+ If evbuffer_ptr is not initialized, this function can only be called
+ with EVBUFFER_PTR_SET.
+
+ An evbuffer_ptr can represent any position from the start of the buffer to
+ a position immediately after the end of the buffer.
+
+ @param buffer the evbuffer to be search
+ @param ptr a pointer to a struct evbuffer_ptr
+ @param position the position at which to start the next search
+ @param how determines how the pointer should be manipulated.
+ @returns 0 on success or -1 otherwise
+*/
+EVENT2_EXPORT_SYMBOL
+int
+evbuffer_ptr_set(struct evbuffer *buffer, struct evbuffer_ptr *ptr,
+ size_t position, enum evbuffer_ptr_how how);
+
+/**
+ Search for an end-of-line string within an evbuffer.
+
+ @param buffer the evbuffer to be searched
+ @param start NULL or a pointer to a valid struct evbuffer_ptr to start
+ searching at.
+ @param eol_len_out If non-NULL, the pointed-to value will be set to
+ the length of the end-of-line string.
+ @param eol_style The kind of EOL to look for; see evbuffer_readln() for
+ more information
+ @return a struct evbuffer_ptr whose 'pos' field has the offset of the
+ first occurrence EOL in the buffer after 'start'. The 'pos'
+ field of the result is -1 if the string was not found.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer_ptr evbuffer_search_eol(struct evbuffer *buffer,
+ struct evbuffer_ptr *start, size_t *eol_len_out,
+ enum evbuffer_eol_style eol_style);
+
+/** Function to peek at data inside an evbuffer without removing it or
+ copying it out.
+
+ Pointers to the data are returned by filling the 'vec_out' array
+ with pointers to one or more extents of data inside the buffer.
+
+ The total data in the extents that you get back may be more than
+ you requested (if there is more data last extent than you asked
+ for), or less (if you do not provide enough evbuffer_iovecs, or if
+ the buffer does not have as much data as you asked to see).
+
+ @param buffer the evbuffer to peek into,
+ @param len the number of bytes to try to peek. If len is negative, we
+ will try to fill as much of vec_out as we can. If len is negative
+ and vec_out is not provided, we return the number of evbuffer_iovecs
+ that would be needed to get all the data in the buffer.
+ @param start_at an evbuffer_ptr indicating the point at which we
+ should start looking for data. NULL means, "At the start of the
+ buffer."
+ @param vec_out an array of evbuffer_iovec
+ @param n_vec the length of vec_out. If 0, we only count how many
+ extents would be necessary to point to the requested amount of
+ data.
+ @return The number of extents needed. This may be less than n_vec
+ if we didn't need all the evbuffer_iovecs we were given, or more
+ than n_vec if we would need more to return all the data that was
+ requested.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
+ struct evbuffer_ptr *start_at,
+ struct evbuffer_iovec *vec_out, int n_vec);
+
+
+/** Structure passed to an evbuffer_cb_func evbuffer callback
+
+ @see evbuffer_cb_func, evbuffer_add_cb()
+ */
+struct evbuffer_cb_info {
+ /** The number of bytes in this evbuffer when callbacks were last
+ * invoked. */
+ size_t orig_size;
+ /** The number of bytes added since callbacks were last invoked. */
+ size_t n_added;
+ /** The number of bytes removed since callbacks were last invoked. */
+ size_t n_deleted;
+};
+
+/** Type definition for a callback that is invoked whenever data is added or
+ removed from an evbuffer.
+
+ An evbuffer may have one or more callbacks set at a time. The order
+ in which they are executed is undefined.
+
+ A callback function may add more callbacks, or remove itself from the
+ list of callbacks, or add or remove data from the buffer. It may not
+ remove another callback from the list.
+
+ If a callback adds or removes data from the buffer or from another
+ buffer, this can cause a recursive invocation of your callback or
+ other callbacks. If you ask for an infinite loop, you might just get
+ one: watch out!
+
+ @param buffer the buffer whose size has changed
+ @param info a structure describing how the buffer changed.
+ @param arg a pointer to user data
+*/
+typedef void (*evbuffer_cb_func)(struct evbuffer *buffer, const struct evbuffer_cb_info *info, void *arg);
+
+struct evbuffer_cb_entry;
+/** Add a new callback to an evbuffer.
+
+ Subsequent calls to evbuffer_add_cb() add new callbacks. To remove this
+ callback, call evbuffer_remove_cb or evbuffer_remove_cb_entry.
+
+ @param buffer the evbuffer to be monitored
+ @param cb the callback function to invoke when the evbuffer is modified,
+ or NULL to remove all callbacks.
+ @param cbarg an argument to be provided to the callback function
+ @return a handle to the callback on success, or NULL on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer_cb_entry *evbuffer_add_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg);
+
+/** Remove a callback from an evbuffer, given a handle returned from
+ evbuffer_add_cb.
+
+ Calling this function invalidates the handle.
+
+ @return 0 if a callback was removed, or -1 if no matching callback was
+ found.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_remove_cb_entry(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *ent);
+
+/** Remove a callback from an evbuffer, given the function and argument
+ used to add it.
+
+ @return 0 if a callback was removed, or -1 if no matching callback was
+ found.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_remove_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg);
+
+/** If this flag is not set, then a callback is temporarily disabled, and
+ * should not be invoked.
+ *
+ * @see evbuffer_cb_set_flags(), evbuffer_cb_clear_flags()
+ */
+#define EVBUFFER_CB_ENABLED 1
+
+/** Change the flags that are set for a callback on a buffer by adding more.
+
+ @param buffer the evbuffer that the callback is watching.
+ @param cb the callback whose status we want to change.
+ @param flags EVBUFFER_CB_ENABLED to re-enable the callback.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_cb_set_flags(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *cb, ev_uint32_t flags);
+
+/** Change the flags that are set for a callback on a buffer by removing some
+
+ @param buffer the evbuffer that the callback is watching.
+ @param cb the callback whose status we want to change.
+ @param flags EVBUFFER_CB_ENABLED to disable the callback.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_cb_clear_flags(struct evbuffer *buffer,
+ struct evbuffer_cb_entry *cb, ev_uint32_t flags);
+
+#if 0
+/** Postpone calling a given callback until unsuspend is called later.
+
+ This is different from disabling the callback, since the callback will get
+ invoked later if the buffer size changes between now and when we unsuspend
+ it.
+
+ @param the buffer that the callback is watching.
+ @param cb the callback we want to suspend.
+ */
+EVENT2_EXPORT_SYMBOL
+void evbuffer_cb_suspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb);
+/** Stop postponing a callback that we postponed with evbuffer_cb_suspend.
+
+ If data was added to or removed from the buffer while the callback was
+ suspended, the callback will get called once now.
+
+ @param the buffer that the callback is watching.
+ @param cb the callback we want to stop suspending.
+ */
+EVENT2_EXPORT_SYMBOL
+void evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb);
+#endif
+
+/**
+ Makes the data at the beginning of an evbuffer contiguous.
+
+ @param buf the evbuffer to make contiguous
+ @param size the number of bytes to make contiguous, or -1 to make the
+ entire buffer contiguous.
+ @return a pointer to the contiguous memory array, or NULL if param size
+ requested more data than is present in the buffer.
+*/
+
+EVENT2_EXPORT_SYMBOL
+unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size);
+
+/**
+ Prepends data to the beginning of the evbuffer
+
+ @param buf the evbuffer to which to prepend data
+ @param data a pointer to the memory to prepend
+ @param size the number of bytes to prepend
+ @return 0 if successful, or -1 otherwise
+*/
+
+EVENT2_EXPORT_SYMBOL
+int evbuffer_prepend(struct evbuffer *buf, const void *data, size_t size);
+
+/**
+ Prepends all data from the src evbuffer to the beginning of the dst
+ evbuffer.
+
+ @param dst the evbuffer to which to prepend data
+ @param src the evbuffer to prepend; it will be emptied as a result
+ @return 0 if successful, or -1 otherwise
+*/
+EVENT2_EXPORT_SYMBOL
+int evbuffer_prepend_buffer(struct evbuffer *dst, struct evbuffer* src);
+
+/**
+ Prevent calls that modify an evbuffer from succeeding. A buffer may
+ frozen at the front, at the back, or at both the front and the back.
+
+ If the front of a buffer is frozen, operations that drain data from
+ the front of the buffer, or that prepend data to the buffer, will
+ fail until it is unfrozen. If the back a buffer is frozen, operations
+ that append data from the buffer will fail until it is unfrozen.
+
+ @param buf The buffer to freeze
+ @param at_front If true, we freeze the front of the buffer. If false,
+ we freeze the back.
+ @return 0 on success, -1 on failure.
+*/
+EVENT2_EXPORT_SYMBOL
+int evbuffer_freeze(struct evbuffer *buf, int at_front);
+/**
+ Re-enable calls that modify an evbuffer.
+
+ @param buf The buffer to un-freeze
+ @param at_front If true, we unfreeze the front of the buffer. If false,
+ we unfreeze the back.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_unfreeze(struct evbuffer *buf, int at_front);
+
+struct event_base;
+/**
+ Force all the callbacks on an evbuffer to be run, not immediately after
+ the evbuffer is altered, but instead from inside the event loop.
+
+ This can be used to serialize all the callbacks to a single thread
+ of execution.
+ */
+EVENT2_EXPORT_SYMBOL
+int evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base);
+
+/**
+ Append data from 1 or more iovec's to an evbuffer
+
+ Calculates the number of bytes needed for an iovec structure and guarantees
+ all data will fit into a single chain. Can be used in lieu of functionality
+ which calls evbuffer_add() constantly before being used to increase
+ performance.
+
+ @param buffer the destination buffer
+ @param vec the source iovec
+ @param n_vec the number of iovec structures.
+ @return the number of bytes successfully written to the output buffer.
+*/
+EVENT2_EXPORT_SYMBOL
+size_t evbuffer_add_iovec(struct evbuffer * buffer, struct evbuffer_iovec * vec, int n_vec);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_BUFFER_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/buffer_compat.h b/sntp/libevent/include/event2/buffer_compat.h
new file mode 100644
index 000000000000..c0bdd9d21f06
--- /dev/null
+++ b/sntp/libevent/include/event2/buffer_compat.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFER_COMPAT_H_INCLUDED_
+#define EVENT2_BUFFER_COMPAT_H_INCLUDED_
+
+#include <event2/visibility.h>
+
+/** @file event2/buffer_compat.h
+
+ Obsolete and deprecated versions of the functions in buffer.h: provided
+ only for backward compatibility.
+ */
+
+
+/**
+ Obsolete alias for evbuffer_readln(buffer, NULL, EOL_STYLE_ANY).
+
+ @deprecated This function is deprecated because its behavior is not correct
+ for almost any protocol, and also because it's wholly subsumed by
+ evbuffer_readln().
+
+ @param buffer the evbuffer to read from
+ @return pointer to a single line, or NULL if an error occurred
+
+*/
+EVENT2_EXPORT_SYMBOL
+char *evbuffer_readline(struct evbuffer *buffer);
+
+/** Type definition for a callback that is invoked whenever data is added or
+ removed from an evbuffer.
+
+ An evbuffer may have one or more callbacks set at a time. The order
+ in which they are executed is undefined.
+
+ A callback function may add more callbacks, or remove itself from the
+ list of callbacks, or add or remove data from the buffer. It may not
+ remove another callback from the list.
+
+ If a callback adds or removes data from the buffer or from another
+ buffer, this can cause a recursive invocation of your callback or
+ other callbacks. If you ask for an infinite loop, you might just get
+ one: watch out!
+
+ @param buffer the buffer whose size has changed
+ @param old_len the previous length of the buffer
+ @param new_len the current length of the buffer
+ @param arg a pointer to user data
+*/
+typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_len, void *arg);
+
+/**
+ Replace all callbacks on an evbuffer with a single new callback, or
+ remove them.
+
+ Subsequent calls to evbuffer_setcb() replace callbacks set by previous
+ calls. Setting the callback to NULL removes any previously set callback.
+
+ @deprecated This function is deprecated because it clears all previous
+ callbacks set on the evbuffer, which can cause confusing behavior if
+ multiple parts of the code all want to add their own callbacks on a
+ buffer. Instead, use evbuffer_add(), evbuffer_del(), and
+ evbuffer_setflags() to manage your own evbuffer callbacks without
+ interfering with callbacks set by others.
+
+ @param buffer the evbuffer to be monitored
+ @param cb the callback function to invoke when the evbuffer is modified,
+ or NULL to remove all callbacks.
+ @param cbarg an argument to be provided to the callback function
+ */
+EVENT2_EXPORT_SYMBOL
+void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
+
+
+/**
+ Find a string within an evbuffer.
+
+ @param buffer the evbuffer to be searched
+ @param what the string to be searched for
+ @param len the length of the search string
+ @return a pointer to the beginning of the search string, or NULL if the search failed.
+ */
+EVENT2_EXPORT_SYMBOL
+unsigned char *evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len);
+
+/** deprecated in favor of calling the functions directly */
+#define EVBUFFER_LENGTH(x) evbuffer_get_length(x)
+/** deprecated in favor of calling the functions directly */
+#define EVBUFFER_DATA(x) evbuffer_pullup((x), -1)
+
+#endif
+
diff --git a/sntp/libevent/include/event2/bufferevent.h b/sntp/libevent/include/event2/bufferevent.h
new file mode 100644
index 000000000000..46203b04f596
--- /dev/null
+++ b/sntp/libevent/include/event2/bufferevent.h
@@ -0,0 +1,994 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFEREVENT_H_INCLUDED_
+#define EVENT2_BUFFEREVENT_H_INCLUDED_
+
+/**
+ @file event2/bufferevent.h
+
+ Functions for buffering data for network sending or receiving. Bufferevents
+ are higher level than evbuffers: each has an underlying evbuffer for reading
+ and one for writing, and callbacks that are invoked under certain
+ circumstances.
+
+ A bufferevent provides input and output buffers that get filled and
+ drained automatically. The user of a bufferevent no longer deals
+ directly with the I/O, but instead is reading from input and writing
+ to output buffers.
+
+ Once initialized, the bufferevent structure can be used repeatedly
+ with bufferevent_enable() and bufferevent_disable().
+
+ When reading is enabled, the bufferevent will try to read from the
+ file descriptor onto its input buffer, and call the read callback.
+ When writing is enabled, the bufferevent will try to write data onto its
+ file descriptor when the output buffer has enough data, and call the write
+ callback when the output buffer is sufficiently drained.
+
+ Bufferevents come in several flavors, including:
+
+ <dl>
+ <dt>Socket-based bufferevents</dt>
+ <dd>A bufferevent that reads and writes data onto a network
+ socket. Created with bufferevent_socket_new().</dd>
+
+ <dt>Paired bufferevents</dt>
+ <dd>A pair of bufferevents that send and receive data to one
+ another without touching the network. Created with
+ bufferevent_pair_new().</dd>
+
+ <dt>Filtering bufferevents</dt>
+ <dd>A bufferevent that transforms data, and sends or receives it
+ over another underlying bufferevent. Created with
+ bufferevent_filter_new().</dd>
+
+ <dt>SSL-backed bufferevents</dt>
+ <dd>A bufferevent that uses the openssl library to send and
+ receive data over an encrypted connection. Created with
+ bufferevent_openssl_socket_new() or
+ bufferevent_openssl_filter_new().</dd>
+ </dl>
+ */
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/** @name Bufferevent event codes
+
+ These flags are passed as arguments to a bufferevent's event callback.
+
+ @{
+*/
+#define BEV_EVENT_READING 0x01 /**< error encountered while reading */
+#define BEV_EVENT_WRITING 0x02 /**< error encountered while writing */
+#define BEV_EVENT_EOF 0x10 /**< eof file reached */
+#define BEV_EVENT_ERROR 0x20 /**< unrecoverable error encountered */
+#define BEV_EVENT_TIMEOUT 0x40 /**< user-specified timeout reached */
+#define BEV_EVENT_CONNECTED 0x80 /**< connect operation finished. */
+/**@}*/
+
+/**
+ An opaque type for handling buffered IO
+
+ @see event2/bufferevent.h
+ */
+struct bufferevent
+#ifdef EVENT_IN_DOXYGEN_
+{}
+#endif
+;
+struct event_base;
+struct evbuffer;
+struct sockaddr;
+
+/**
+ A read or write callback for a bufferevent.
+
+ The read callback is triggered when new data arrives in the input
+ buffer and the amount of readable data exceed the low watermark
+ which is 0 by default.
+
+ The write callback is triggered if the write buffer has been
+ exhausted or fell below its low watermark.
+
+ @param bev the bufferevent that triggered the callback
+ @param ctx the user-specified context for this bufferevent
+ */
+typedef void (*bufferevent_data_cb)(struct bufferevent *bev, void *ctx);
+
+/**
+ An event/error callback for a bufferevent.
+
+ The event callback is triggered if either an EOF condition or another
+ unrecoverable error was encountered.
+
+ For bufferevents with deferred callbacks, this is a bitwise OR of all errors
+ that have happened on the bufferevent since the last callback invocation.
+
+ @param bev the bufferevent for which the error condition was reached
+ @param what a conjunction of flags: BEV_EVENT_READING or BEV_EVENT_WRITING
+ to indicate if the error was encountered on the read or write path,
+ and one of the following flags: BEV_EVENT_EOF, BEV_EVENT_ERROR,
+ BEV_EVENT_TIMEOUT, BEV_EVENT_CONNECTED.
+
+ @param ctx the user-specified context for this bufferevent
+*/
+typedef void (*bufferevent_event_cb)(struct bufferevent *bev, short what, void *ctx);
+
+/** Options that can be specified when creating a bufferevent */
+enum bufferevent_options {
+ /** If set, we close the underlying file
+ * descriptor/bufferevent/whatever when this bufferevent is freed. */
+ BEV_OPT_CLOSE_ON_FREE = (1<<0),
+
+ /** If set, and threading is enabled, operations on this bufferevent
+ * are protected by a lock */
+ BEV_OPT_THREADSAFE = (1<<1),
+
+ /** If set, callbacks are run deferred in the event loop. */
+ BEV_OPT_DEFER_CALLBACKS = (1<<2),
+
+ /** If set, callbacks are executed without locks being held on the
+ * bufferevent. This option currently requires that
+ * BEV_OPT_DEFER_CALLBACKS also be set; a future version of Libevent
+ * might remove the requirement.*/
+ BEV_OPT_UNLOCK_CALLBACKS = (1<<3)
+};
+
+/**
+ Create a new socket bufferevent over an existing socket.
+
+ @param base the event base to associate with the new bufferevent.
+ @param fd the file descriptor from which data is read and written to.
+ This file descriptor is not allowed to be a pipe(2).
+ It is safe to set the fd to -1, so long as you later
+ set it with bufferevent_setfd or bufferevent_socket_connect().
+ @param options Zero or more BEV_OPT_* flags
+ @return a pointer to a newly allocated bufferevent struct, or NULL if an
+ error occurred
+ @see bufferevent_free()
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *bufferevent_socket_new(struct event_base *base, evutil_socket_t fd, int options);
+
+/**
+ Launch a connect() attempt with a socket-based bufferevent.
+
+ When the connect succeeds, the eventcb will be invoked with
+ BEV_EVENT_CONNECTED set.
+
+ If the bufferevent does not already have a socket set, we allocate a new
+ socket here and make it nonblocking before we begin.
+
+ If no address is provided, we assume that the socket is already connecting,
+ and configure the bufferevent so that a BEV_EVENT_CONNECTED event will be
+ yielded when it is done connecting.
+
+ @param bufev an existing bufferevent allocated with
+ bufferevent_socket_new().
+ @param addr the address we should connect to
+ @param socklen The length of the address
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_socket_connect(struct bufferevent *, struct sockaddr *, int);
+
+struct evdns_base;
+/**
+ Resolve the hostname 'hostname' and connect to it as with
+ bufferevent_socket_connect().
+
+ @param bufev An existing bufferevent allocated with bufferevent_socket_new()
+ @param evdns_base Optionally, an evdns_base to use for resolving hostnames
+ asynchronously. May be set to NULL for a blocking resolve.
+ @param family A preferred address family to resolve addresses to, or
+ AF_UNSPEC for no preference. Only AF_INET, AF_INET6, and AF_UNSPEC are
+ supported.
+ @param hostname The hostname to resolve; see below for notes on recognized
+ formats
+ @param port The port to connect to on the resolved address.
+ @return 0 if successful, -1 on failure.
+
+ Recognized hostname formats are:
+
+ www.example.com (hostname)
+ 1.2.3.4 (ipv4address)
+ ::1 (ipv6address)
+ [::1] ([ipv6address])
+
+ Performance note: If you do not provide an evdns_base, this function
+ may block while it waits for a DNS response. This is probably not
+ what you want.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_socket_connect_hostname(struct bufferevent *,
+ struct evdns_base *, int, const char *, int);
+
+/**
+ Return the error code for the last failed DNS lookup attempt made by
+ bufferevent_socket_connect_hostname().
+
+ @param bev The bufferevent object.
+ @return DNS error code.
+ @see evutil_gai_strerror()
+*/
+EVENT2_EXPORT_SYMBOL
+int bufferevent_socket_get_dns_error(struct bufferevent *bev);
+
+/**
+ Assign a bufferevent to a specific event_base.
+
+ NOTE that only socket bufferevents support this function.
+
+ @param base an event_base returned by event_init()
+ @param bufev a bufferevent struct returned by bufferevent_new()
+ or bufferevent_socket_new()
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_new()
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
+
+/**
+ Return the event_base used by a bufferevent
+*/
+EVENT2_EXPORT_SYMBOL
+struct event_base *bufferevent_get_base(struct bufferevent *bev);
+
+/**
+ Assign a priority to a bufferevent.
+
+ Only supported for socket bufferevents.
+
+ @param bufev a bufferevent struct
+ @param pri the priority to be assigned
+ @return 0 if successful, or -1 if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_priority_set(struct bufferevent *bufev, int pri);
+
+/**
+ Return the priority of a bufferevent.
+
+ Only supported for socket bufferevents
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_get_priority(const struct bufferevent *bufev);
+
+/**
+ Deallocate the storage associated with a bufferevent structure.
+
+ If there is pending data to write on the bufferevent, it probably won't be
+ flushed before the bufferevent is freed.
+
+ @param bufev the bufferevent structure to be freed.
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_free(struct bufferevent *bufev);
+
+
+/**
+ Changes the callbacks for a bufferevent.
+
+ @param bufev the bufferevent object for which to change callbacks
+ @param readcb callback to invoke when there is data to be read, or NULL if
+ no callback is desired
+ @param writecb callback to invoke when the file descriptor is ready for
+ writing, or NULL if no callback is desired
+ @param eventcb callback to invoke when there is an event on the file
+ descriptor
+ @param cbarg an argument that will be supplied to each of the callbacks
+ (readcb, writecb, and errorcb)
+ @see bufferevent_new()
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_setcb(struct bufferevent *bufev,
+ bufferevent_data_cb readcb, bufferevent_data_cb writecb,
+ bufferevent_event_cb eventcb, void *cbarg);
+
+/**
+ Retrieves the callbacks for a bufferevent.
+
+ @param bufev the bufferevent to examine.
+ @param readcb_ptr if readcb_ptr is nonnull, *readcb_ptr is set to the current
+ read callback for the bufferevent.
+ @param writecb_ptr if writecb_ptr is nonnull, *writecb_ptr is set to the
+ current write callback for the bufferevent.
+ @param eventcb_ptr if eventcb_ptr is nonnull, *eventcb_ptr is set to the
+ current event callback for the bufferevent.
+ @param cbarg_ptr if cbarg_ptr is nonnull, *cbarg_ptr is set to the current
+ callback argument for the bufferevent.
+ @see buffervent_setcb()
+*/
+EVENT2_EXPORT_SYMBOL
+void bufferevent_getcb(struct bufferevent *bufev,
+ bufferevent_data_cb *readcb_ptr,
+ bufferevent_data_cb *writecb_ptr,
+ bufferevent_event_cb *eventcb_ptr,
+ void **cbarg_ptr);
+
+/**
+ Changes the file descriptor on which the bufferevent operates.
+ Not supported for all bufferevent types.
+
+ @param bufev the bufferevent object for which to change the file descriptor
+ @param fd the file descriptor to operate on
+*/
+EVENT2_EXPORT_SYMBOL
+int bufferevent_setfd(struct bufferevent *bufev, evutil_socket_t fd);
+
+/**
+ Returns the file descriptor associated with a bufferevent, or -1 if
+ no file descriptor is associated with the bufferevent.
+ */
+EVENT2_EXPORT_SYMBOL
+evutil_socket_t bufferevent_getfd(struct bufferevent *bufev);
+
+/**
+ Returns the underlying bufferevent associated with a bufferevent (if
+ the bufferevent is a wrapper), or NULL if there is no underlying bufferevent.
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *bufferevent_get_underlying(struct bufferevent *bufev);
+
+/**
+ Write data to a bufferevent buffer.
+
+ The bufferevent_write() function can be used to write data to the file
+ descriptor. The data is appended to the output buffer and written to the
+ descriptor automatically as it becomes available for writing.
+
+ @param bufev the bufferevent to be written to
+ @param data a pointer to the data to be written
+ @param size the length of the data, in bytes
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_write_buffer()
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_write(struct bufferevent *bufev,
+ const void *data, size_t size);
+
+
+/**
+ Write data from an evbuffer to a bufferevent buffer. The evbuffer is
+ being drained as a result.
+
+ @param bufev the bufferevent to be written to
+ @param buf the evbuffer to be written
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_write()
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
+
+
+/**
+ Read data from a bufferevent buffer.
+
+ The bufferevent_read() function is used to read data from the input buffer.
+
+ @param bufev the bufferevent to be read from
+ @param data pointer to a buffer that will store the data
+ @param size the size of the data buffer, in bytes
+ @return the amount of data read, in bytes.
+ */
+EVENT2_EXPORT_SYMBOL
+size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
+
+/**
+ Read data from a bufferevent buffer into an evbuffer. This avoids
+ memory copies.
+
+ @param bufev the bufferevent to be read from
+ @param buf the evbuffer to which to add data
+ @return 0 if successful, or -1 if an error occurred.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf);
+
+/**
+ Returns the input buffer.
+
+ The user MUST NOT set the callback on this buffer.
+
+ @param bufev the bufferevent from which to get the evbuffer
+ @return the evbuffer object for the input buffer
+ */
+
+EVENT2_EXPORT_SYMBOL
+struct evbuffer *bufferevent_get_input(struct bufferevent *bufev);
+
+/**
+ Returns the output buffer.
+
+ The user MUST NOT set the callback on this buffer.
+
+ When filters are being used, the filters need to be manually
+ triggered if the output buffer was manipulated.
+
+ @param bufev the bufferevent from which to get the evbuffer
+ @return the evbuffer object for the output buffer
+ */
+
+EVENT2_EXPORT_SYMBOL
+struct evbuffer *bufferevent_get_output(struct bufferevent *bufev);
+
+/**
+ Enable a bufferevent.
+
+ @param bufev the bufferevent to be enabled
+ @param event any combination of EV_READ | EV_WRITE.
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_disable()
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_enable(struct bufferevent *bufev, short event);
+
+/**
+ Disable a bufferevent.
+
+ @param bufev the bufferevent to be disabled
+ @param event any combination of EV_READ | EV_WRITE.
+ @return 0 if successful, or -1 if an error occurred
+ @see bufferevent_enable()
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_disable(struct bufferevent *bufev, short event);
+
+/**
+ Return the events that are enabled on a given bufferevent.
+
+ @param bufev the bufferevent to inspect
+ @return A combination of EV_READ | EV_WRITE
+ */
+EVENT2_EXPORT_SYMBOL
+short bufferevent_get_enabled(struct bufferevent *bufev);
+
+/**
+ Set the read and write timeout for a bufferevent.
+
+ A bufferevent's timeout will fire the first time that the indicated
+ amount of time has elapsed since a successful read or write operation,
+ during which the bufferevent was trying to read or write.
+
+ (In other words, if reading or writing is disabled, or if the
+ bufferevent's read or write operation has been suspended because
+ there's no data to write, or not enough banwidth, or so on, the
+ timeout isn't active. The timeout only becomes active when we we're
+ willing to actually read or write.)
+
+ Calling bufferevent_enable or setting a timeout for a bufferevent
+ whose timeout is already pending resets its timeout.
+
+ If the timeout elapses, the corresponding operation (EV_READ or
+ EV_WRITE) becomes disabled until you re-enable it again. The
+ bufferevent's event callback is called with the
+ BEV_EVENT_TIMEOUT|BEV_EVENT_READING or
+ BEV_EVENT_TIMEOUT|BEV_EVENT_WRITING.
+
+ @param bufev the bufferevent to be modified
+ @param timeout_read the read timeout, or NULL
+ @param timeout_write the write timeout, or NULL
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_set_timeouts(struct bufferevent *bufev,
+ const struct timeval *timeout_read, const struct timeval *timeout_write);
+
+/**
+ Sets the watermarks for read and write events.
+
+ On input, a bufferevent does not invoke the user read callback unless
+ there is at least low watermark data in the buffer. If the read buffer
+ is beyond the high watermark, the bufferevent stops reading from the network.
+
+ On output, the user write callback is invoked whenever the buffered data
+ falls below the low watermark. Filters that write to this bufev will try
+ not to write more bytes to this buffer than the high watermark would allow,
+ except when flushing.
+
+ @param bufev the bufferevent to be modified
+ @param events EV_READ, EV_WRITE or both
+ @param lowmark the lower watermark to set
+ @param highmark the high watermark to set
+*/
+
+EVENT2_EXPORT_SYMBOL
+void bufferevent_setwatermark(struct bufferevent *bufev, short events,
+ size_t lowmark, size_t highmark);
+
+/**
+ Retrieves the watermarks for read or write events. Result is undefined if
+ events contains both EV_READ and EV_WRITE.
+
+ @param bufev the bufferevent to be examined
+ @param events EV_READ or EV_WRITE
+ @param lowmark receives the lower watermark if not NULL
+ @param highmark receives the high watermark if not NULL
+*/
+EVENT2_EXPORT_SYMBOL
+void bufferevent_getwatermark(struct bufferevent *bufev, short events,
+ size_t *lowmark, size_t *highmark);
+
+/**
+ Acquire the lock on a bufferevent. Has no effect if locking was not
+ enabled with BEV_OPT_THREADSAFE.
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_lock(struct bufferevent *bufev);
+
+/**
+ Release the lock on a bufferevent. Has no effect if locking was not
+ enabled with BEV_OPT_THREADSAFE.
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_unlock(struct bufferevent *bufev);
+
+/**
+ Flags that can be passed into filters to let them know how to
+ deal with the incoming data.
+*/
+enum bufferevent_flush_mode {
+ /** usually set when processing data */
+ BEV_NORMAL = 0,
+
+ /** want to checkpoint all data sent. */
+ BEV_FLUSH = 1,
+
+ /** encountered EOF on read or done sending data */
+ BEV_FINISHED = 2
+};
+
+/**
+ Triggers the bufferevent to produce more data if possible.
+
+ @param bufev the bufferevent object
+ @param iotype either EV_READ or EV_WRITE or both.
+ @param mode either BEV_NORMAL or BEV_FLUSH or BEV_FINISHED
+ @return -1 on failure, 0 if no data was produces, 1 if data was produced
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_flush(struct bufferevent *bufev,
+ short iotype,
+ enum bufferevent_flush_mode mode);
+
+/**
+ Flags for bufferevent_trigger(_event) that modify when and how to trigger
+ the callback.
+*/
+enum bufferevent_trigger_options {
+ /** trigger the callback regardless of the watermarks */
+ BEV_TRIG_IGNORE_WATERMARKS = (1<<16),
+
+ /** defer even if the callbacks are not */
+ BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS,
+
+ /* (Note: for internal reasons, these need to be disjoint from
+ * bufferevent_options, except when they mean the same thing. */
+};
+
+/**
+ Triggers bufferevent data callbacks.
+
+ The function will honor watermarks unless options contain
+ BEV_TRIG_IGNORE_WATERMARKS. If the options contain BEV_OPT_DEFER_CALLBACKS,
+ the callbacks are deferred.
+
+ @param bufev the bufferevent object
+ @param iotype either EV_READ or EV_WRITE or both.
+ @param options
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_trigger(struct bufferevent *bufev, short iotype,
+ int options);
+
+/**
+ Triggers the bufferevent event callback.
+
+ If the options contain BEV_OPT_DEFER_CALLBACKS, the callbacks are deferred.
+
+ @param bufev the bufferevent object
+ @param what the flags to pass onto the event callback
+ @param options
+ */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_trigger_event(struct bufferevent *bufev, short what,
+ int options);
+
+/**
+ @name Filtering support
+
+ @{
+*/
+/**
+ Values that filters can return.
+ */
+enum bufferevent_filter_result {
+ /** everything is okay */
+ BEV_OK = 0,
+
+ /** the filter needs to read more data before output */
+ BEV_NEED_MORE = 1,
+
+ /** the filter encountered a critical error, no further data
+ can be processed. */
+ BEV_ERROR = 2
+};
+
+/** A callback function to implement a filter for a bufferevent.
+
+ @param src An evbuffer to drain data from.
+ @param dst An evbuffer to add data to.
+ @param limit A suggested upper bound of bytes to write to dst.
+ The filter may ignore this value, but doing so means that
+ it will overflow the high-water mark associated with dst.
+ -1 means "no limit".
+ @param mode Whether we should write data as may be convenient
+ (BEV_NORMAL), or flush as much data as we can (BEV_FLUSH),
+ or flush as much as we can, possibly including an end-of-stream
+ marker (BEV_FINISH).
+ @param ctx A user-supplied pointer.
+
+ @return BEV_OK if we wrote some data; BEV_NEED_MORE if we can't
+ produce any more output until we get some input; and BEV_ERROR
+ on an error.
+ */
+typedef enum bufferevent_filter_result (*bufferevent_filter_cb)(
+ struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit,
+ enum bufferevent_flush_mode mode, void *ctx);
+
+/**
+ Allocate a new filtering bufferevent on top of an existing bufferevent.
+
+ @param underlying the underlying bufferevent.
+ @param input_filter The filter to apply to data we read from the underlying
+ bufferevent
+ @param output_filter The filer to apply to data we write to the underlying
+ bufferevent
+ @param options A bitfield of bufferevent options.
+ @param free_context A function to use to free the filter context when
+ this bufferevent is freed.
+ @param ctx A context pointer to pass to the filter functions.
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *
+bufferevent_filter_new(struct bufferevent *underlying,
+ bufferevent_filter_cb input_filter,
+ bufferevent_filter_cb output_filter,
+ int options,
+ void (*free_context)(void *),
+ void *ctx);
+/**@}*/
+
+/**
+ Allocate a pair of linked bufferevents. The bufferevents behave as would
+ two bufferevent_sock instances connected to opposite ends of a
+ socketpair(), except that no internal socketpair is allocated.
+
+ @param base The event base to associate with the socketpair.
+ @param options A set of options for this bufferevent
+ @param pair A pointer to an array to hold the two new bufferevent objects.
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_pair_new(struct event_base *base, int options,
+ struct bufferevent *pair[2]);
+
+/**
+ Given one bufferevent returned by bufferevent_pair_new(), returns the
+ other one if it still exists. Otherwise returns NULL.
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *bufferevent_pair_get_partner(struct bufferevent *bev);
+
+/**
+ Abstract type used to configure rate-limiting on a bufferevent or a group
+ of bufferevents.
+ */
+struct ev_token_bucket_cfg;
+
+/**
+ A group of bufferevents which are configured to respect the same rate
+ limit.
+*/
+struct bufferevent_rate_limit_group;
+
+/** Maximum configurable rate- or burst-limit. */
+#define EV_RATE_LIMIT_MAX EV_SSIZE_MAX
+
+/**
+ Initialize and return a new object to configure the rate-limiting behavior
+ of bufferevents.
+
+ @param read_rate The maximum number of bytes to read per tick on
+ average.
+ @param read_burst The maximum number of bytes to read in any single tick.
+ @param write_rate The maximum number of bytes to write per tick on
+ average.
+ @param write_burst The maximum number of bytes to write in any single tick.
+ @param tick_len The length of a single tick. Defaults to one second.
+ Any fractions of a millisecond are ignored.
+
+ Note that all rate-limits hare are currently best-effort: future versions
+ of Libevent may implement them more tightly.
+ */
+EVENT2_EXPORT_SYMBOL
+struct ev_token_bucket_cfg *ev_token_bucket_cfg_new(
+ size_t read_rate, size_t read_burst,
+ size_t write_rate, size_t write_burst,
+ const struct timeval *tick_len);
+
+/** Free all storage held in 'cfg'.
+
+ Note: 'cfg' is not currently reference-counted; it is not safe to free it
+ until no bufferevent is using it.
+ */
+EVENT2_EXPORT_SYMBOL
+void ev_token_bucket_cfg_free(struct ev_token_bucket_cfg *cfg);
+
+/**
+ Set the rate-limit of a the bufferevent 'bev' to the one specified in
+ 'cfg'. If 'cfg' is NULL, disable any per-bufferevent rate-limiting on
+ 'bev'.
+
+ Note that only some bufferevent types currently respect rate-limiting.
+ They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
+ bufferevents.
+
+ Return 0 on sucess, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_set_rate_limit(struct bufferevent *bev,
+ struct ev_token_bucket_cfg *cfg);
+
+/**
+ Create a new rate-limit group for bufferevents. A rate-limit group
+ constrains the maximum number of bytes sent and received, in toto,
+ by all of its bufferevents.
+
+ @param base An event_base to run any necessary timeouts for the group.
+ Note that all bufferevents in the group do not necessarily need to share
+ this event_base.
+ @param cfg The rate-limit for this group.
+
+ Note that all rate-limits hare are currently best-effort: future versions
+ of Libevent may implement them more tightly.
+
+ Note also that only some bufferevent types currently respect rate-limiting.
+ They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
+ bufferevents.
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent_rate_limit_group *bufferevent_rate_limit_group_new(
+ struct event_base *base,
+ const struct ev_token_bucket_cfg *cfg);
+/**
+ Change the rate-limiting settings for a given rate-limiting group.
+
+ Return 0 on success, -1 on failure.
+*/
+EVENT2_EXPORT_SYMBOL
+int bufferevent_rate_limit_group_set_cfg(
+ struct bufferevent_rate_limit_group *,
+ const struct ev_token_bucket_cfg *);
+
+/**
+ Change the smallest quantum we're willing to allocate to any single
+ bufferevent in a group for reading or writing at a time.
+
+ The rationale is that, because of TCP/IP protocol overheads and kernel
+ behavior, if a rate-limiting group is so tight on bandwidth that you're
+ only willing to send 1 byte per tick per bufferevent, you might instead
+ want to batch up the reads and writes so that you send N bytes per
+ 1/N of the bufferevents (chosen at random) each tick, so you still wind
+ up send 1 byte per tick per bufferevent on average, but you don't send
+ so many tiny packets.
+
+ The default min-share is currently 64 bytes.
+
+ Returns 0 on success, -1 on faulre.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_rate_limit_group_set_min_share(
+ struct bufferevent_rate_limit_group *, size_t);
+
+/**
+ Free a rate-limiting group. The group must have no members when
+ this function is called.
+*/
+EVENT2_EXPORT_SYMBOL
+void bufferevent_rate_limit_group_free(struct bufferevent_rate_limit_group *);
+
+/**
+ Add 'bev' to the list of bufferevents whose aggregate reading and writing
+ is restricted by 'g'. If 'g' is NULL, remove 'bev' from its current group.
+
+ A bufferevent may belong to no more than one rate-limit group at a time.
+ If 'bev' is already a member of a group, it will be removed from its old
+ group before being added to 'g'.
+
+ Return 0 on success and -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_add_to_rate_limit_group(struct bufferevent *bev,
+ struct bufferevent_rate_limit_group *g);
+
+/** Remove 'bev' from its current rate-limit group (if any). */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_remove_from_rate_limit_group(struct bufferevent *bev);
+
+/**
+ Set the size limit for single read operation.
+
+ Set to 0 for a reasonable default.
+
+ Return 0 on success and -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_set_max_single_read(struct bufferevent *bev, size_t size);
+
+/**
+ Set the size limit for single write operation.
+
+ Set to 0 for a reasonable default.
+
+ Return 0 on success and -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_set_max_single_write(struct bufferevent *bev, size_t size);
+
+/** Get the current size limit for single read operation. */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_max_single_read(struct bufferevent *bev);
+
+/** Get the current size limit for single write operation. */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_max_single_write(struct bufferevent *bev);
+
+/**
+ @name Rate limit inspection
+
+ Return the current read or write bucket size for a bufferevent.
+ If it is not configured with a per-bufferevent ratelimit, return
+ EV_SSIZE_MAX. This function does not inspect the group limit, if any.
+ Note that it can return a negative value if the bufferevent has been
+ made to read or write more than its limit.
+
+ @{
+ */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_read_limit(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_write_limit(struct bufferevent *bev);
+/*@}*/
+
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_max_to_read(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_get_max_to_write(struct bufferevent *bev);
+
+EVENT2_EXPORT_SYMBOL
+const struct ev_token_bucket_cfg *bufferevent_get_token_bucket_cfg(const struct bufferevent * bev);
+
+/**
+ @name Group Rate limit inspection
+
+ Return the read or write bucket size for a bufferevent rate limit
+ group. Note that it can return a negative value if bufferevents in
+ the group have been made to read or write more than their limits.
+
+ @{
+ */
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_rate_limit_group_get_read_limit(
+ struct bufferevent_rate_limit_group *);
+EVENT2_EXPORT_SYMBOL
+ev_ssize_t bufferevent_rate_limit_group_get_write_limit(
+ struct bufferevent_rate_limit_group *);
+/*@}*/
+
+/**
+ @name Rate limit manipulation
+
+ Subtract a number of bytes from a bufferevent's read or write bucket.
+ The decrement value can be negative, if you want to manually refill
+ the bucket. If the change puts the bucket above or below zero, the
+ bufferevent will resume or suspend reading writing as appropriate.
+ These functions make no change in the buckets for the bufferevent's
+ group, if any.
+
+ Returns 0 on success, -1 on internal error.
+
+ @{
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_decrement_read_limit(struct bufferevent *bev, ev_ssize_t decr);
+EVENT2_EXPORT_SYMBOL
+int bufferevent_decrement_write_limit(struct bufferevent *bev, ev_ssize_t decr);
+/*@}*/
+
+/**
+ @name Group rate limit manipulation
+
+ Subtract a number of bytes from a bufferevent rate-limiting group's
+ read or write bucket. The decrement value can be negative, if you
+ want to manually refill the bucket. If the change puts the bucket
+ above or below zero, the bufferevents in the group will resume or
+ suspend reading writing as appropriate.
+
+ Returns 0 on success, -1 on internal error.
+
+ @{
+ */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_rate_limit_group_decrement_read(
+ struct bufferevent_rate_limit_group *, ev_ssize_t);
+EVENT2_EXPORT_SYMBOL
+int bufferevent_rate_limit_group_decrement_write(
+ struct bufferevent_rate_limit_group *, ev_ssize_t);
+/*@}*/
+
+
+/**
+ * Inspect the total bytes read/written on a group.
+ *
+ * Set the variable pointed to by total_read_out to the total number of bytes
+ * ever read on grp, and the variable pointed to by total_written_out to the
+ * total number of bytes ever written on grp. */
+EVENT2_EXPORT_SYMBOL
+void bufferevent_rate_limit_group_get_totals(
+ struct bufferevent_rate_limit_group *grp,
+ ev_uint64_t *total_read_out, ev_uint64_t *total_written_out);
+
+/**
+ * Reset the total bytes read/written on a group.
+ *
+ * Reset the number of bytes read or written on grp as given by
+ * bufferevent_rate_limit_group_reset_totals(). */
+EVENT2_EXPORT_SYMBOL
+void
+bufferevent_rate_limit_group_reset_totals(
+ struct bufferevent_rate_limit_group *grp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_BUFFEREVENT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/bufferevent_compat.h b/sntp/libevent/include/event2/bufferevent_compat.h
new file mode 100644
index 000000000000..65482042f9d1
--- /dev/null
+++ b/sntp/libevent/include/event2/bufferevent_compat.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos, Nick Mathewson
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
+#define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
+
+#define evbuffercb bufferevent_data_cb
+#define everrorcb bufferevent_event_cb
+
+/**
+ Create a new bufferevent for an fd.
+
+ This function is deprecated. Use bufferevent_socket_new and
+ bufferevent_set_callbacks instead.
+
+ Libevent provides an abstraction on top of the regular event callbacks.
+ This abstraction is called a buffered event. A buffered event provides
+ input and output buffers that get filled and drained automatically. The
+ user of a buffered event no longer deals directly with the I/O, but
+ instead is reading from input and writing to output buffers.
+
+ Once initialized, the bufferevent structure can be used repeatedly with
+ bufferevent_enable() and bufferevent_disable().
+
+ When read enabled the bufferevent will try to read from the file descriptor
+ and call the read callback. The write callback is executed whenever the
+ output buffer is drained below the write low watermark, which is 0 by
+ default.
+
+ If multiple bases are in use, bufferevent_base_set() must be called before
+ enabling the bufferevent for the first time.
+
+ @deprecated This function is deprecated because it uses the current
+ event base, and as such can be error prone for multithreaded programs.
+ Use bufferevent_socket_new() instead.
+
+ @param fd the file descriptor from which data is read and written to.
+ This file descriptor is not allowed to be a pipe(2).
+ @param readcb callback to invoke when there is data to be read, or NULL if
+ no callback is desired
+ @param writecb callback to invoke when the file descriptor is ready for
+ writing, or NULL if no callback is desired
+ @param errorcb callback to invoke when there is an error on the file
+ descriptor
+ @param cbarg an argument that will be supplied to each of the callbacks
+ (readcb, writecb, and errorcb)
+ @return a pointer to a newly allocated bufferevent struct, or NULL if an
+ error occurred
+ @see bufferevent_base_set(), bufferevent_free()
+ */
+struct bufferevent *bufferevent_new(evutil_socket_t fd,
+ evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
+
+
+/**
+ Set the read and write timeout for a buffered event.
+
+ @param bufev the bufferevent to be modified
+ @param timeout_read the read timeout
+ @param timeout_write the write timeout
+ */
+void bufferevent_settimeout(struct bufferevent *bufev,
+ int timeout_read, int timeout_write);
+
+#define EVBUFFER_READ BEV_EVENT_READING
+#define EVBUFFER_WRITE BEV_EVENT_WRITING
+#define EVBUFFER_EOF BEV_EVENT_EOF
+#define EVBUFFER_ERROR BEV_EVENT_ERROR
+#define EVBUFFER_TIMEOUT BEV_EVENT_TIMEOUT
+
+/** macro for getting access to the input buffer of a bufferevent */
+#define EVBUFFER_INPUT(x) bufferevent_get_input(x)
+/** macro for getting access to the output buffer of a bufferevent */
+#define EVBUFFER_OUTPUT(x) bufferevent_get_output(x)
+
+#endif
diff --git a/sntp/libevent/include/event2/bufferevent_ssl.h b/sntp/libevent/include/event2/bufferevent_ssl.h
new file mode 100644
index 000000000000..bf39b844a965
--- /dev/null
+++ b/sntp/libevent/include/event2/bufferevent_ssl.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
+#define EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
+
+/** @file event2/bufferevent_ssl.h
+
+ OpenSSL support for bufferevents.
+ */
+#include <event2/visibility.h>
+#include <event2/event-config.h>
+#include <event2/bufferevent.h>
+#include <event2/util.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This is what openssl's SSL objects are underneath. */
+struct ssl_st;
+
+/**
+ The state of an SSL object to be used when creating a new
+ SSL bufferevent.
+ */
+enum bufferevent_ssl_state {
+ BUFFEREVENT_SSL_OPEN = 0,
+ BUFFEREVENT_SSL_CONNECTING = 1,
+ BUFFEREVENT_SSL_ACCEPTING = 2
+};
+
+#if defined(EVENT__HAVE_OPENSSL) || defined(EVENT_IN_DOXYGEN_)
+/**
+ Create a new SSL bufferevent to send its data over another bufferevent.
+
+ @param base An event_base to use to detect reading and writing. It
+ must also be the base for the underlying bufferevent.
+ @param underlying A socket to use for this SSL
+ @param ssl A SSL* object from openssl.
+ @param state The current state of the SSL connection
+ @param options One or more bufferevent_options
+ @return A new bufferevent on success, or NULL on failure
+*/
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *
+bufferevent_openssl_filter_new(struct event_base *base,
+ struct bufferevent *underlying,
+ struct ssl_st *ssl,
+ enum bufferevent_ssl_state state,
+ int options);
+
+/**
+ Create a new SSL bufferevent to send its data over an SSL * on a socket.
+
+ @param base An event_base to use to detect reading and writing
+ @param fd A socket to use for this SSL
+ @param ssl A SSL* object from openssl.
+ @param state The current state of the SSL connection
+ @param options One or more bufferevent_options
+ @return A new bufferevent on success, or NULL on failure.
+*/
+EVENT2_EXPORT_SYMBOL
+struct bufferevent *
+bufferevent_openssl_socket_new(struct event_base *base,
+ evutil_socket_t fd,
+ struct ssl_st *ssl,
+ enum bufferevent_ssl_state state,
+ int options);
+
+/** Control how to report dirty SSL shutdowns.
+
+ If the peer (or the network, or an attacker) closes the TCP
+ connection before closing the SSL channel, and the protocol is SSL >= v3,
+ this is a "dirty" shutdown. If allow_dirty_shutdown is 0 (default),
+ this is reported as BEV_EVENT_ERROR.
+
+ If instead allow_dirty_shutdown=1, a dirty shutdown is reported as
+ BEV_EVENT_EOF.
+
+ (Note that if the protocol is < SSLv3, you will always receive
+ BEV_EVENT_EOF, since SSL 2 and earlier cannot distinguish a secure
+ connection close from a dirty one. This is one reason (among many)
+ not to use SSL 2.)
+*/
+
+EVENT2_EXPORT_SYMBOL
+int bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev);
+EVENT2_EXPORT_SYMBOL
+void bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev,
+ int allow_dirty_shutdown);
+
+/** Return the underlying openssl SSL * object for an SSL bufferevent. */
+EVENT2_EXPORT_SYMBOL
+struct ssl_st *
+bufferevent_openssl_get_ssl(struct bufferevent *bufev);
+
+/** Tells a bufferevent to begin SSL renegotiation. */
+EVENT2_EXPORT_SYMBOL
+int bufferevent_ssl_renegotiate(struct bufferevent *bev);
+
+/** Return the most recent OpenSSL error reported on an SSL bufferevent. */
+EVENT2_EXPORT_SYMBOL
+unsigned long bufferevent_get_openssl_error(struct bufferevent *bev);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/bufferevent_struct.h b/sntp/libevent/include/event2/bufferevent_struct.h
new file mode 100644
index 000000000000..e84c082c30cc
--- /dev/null
+++ b/sntp/libevent/include/event2/bufferevent_struct.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_
+#define EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_
+
+/** @file event2/bufferevent_struct.h
+
+ Data structures for bufferevents. Using these structures may hurt forward
+ compatibility with later versions of Libevent: be careful!
+
+ @deprecated Use of bufferevent_struct.h is completely deprecated; these
+ structures are only exposed for backward compatibility with programs
+ written before Libevent 2.0 that used them.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+/* For struct event */
+#include <event2/event_struct.h>
+
+struct event_watermark {
+ size_t low;
+ size_t high;
+};
+
+/**
+ Shared implementation of a bufferevent.
+
+ This type is exposed only because it was exposed in previous versions,
+ and some people's code may rely on manipulating it. Otherwise, you
+ should really not rely on the layout, size, or contents of this structure:
+ it is fairly volatile, and WILL change in future versions of the code.
+**/
+struct bufferevent {
+ /** Event base for which this bufferevent was created. */
+ struct event_base *ev_base;
+ /** Pointer to a table of function pointers to set up how this
+ bufferevent behaves. */
+ const struct bufferevent_ops *be_ops;
+
+ /** A read event that triggers when a timeout has happened or a socket
+ is ready to read data. Only used by some subtypes of
+ bufferevent. */
+ struct event ev_read;
+ /** A write event that triggers when a timeout has happened or a socket
+ is ready to write data. Only used by some subtypes of
+ bufferevent. */
+ struct event ev_write;
+
+ /** An input buffer. Only the bufferevent is allowed to add data to
+ this buffer, though the user is allowed to drain it. */
+ struct evbuffer *input;
+
+ /** An input buffer. Only the bufferevent is allowed to drain data
+ from this buffer, though the user is allowed to add it. */
+ struct evbuffer *output;
+
+ struct event_watermark wm_read;
+ struct event_watermark wm_write;
+
+ bufferevent_data_cb readcb;
+ bufferevent_data_cb writecb;
+ /* This should be called 'eventcb', but renaming it would break
+ * backward compatibility */
+ bufferevent_event_cb errorcb;
+ void *cbarg;
+
+ struct timeval timeout_read;
+ struct timeval timeout_write;
+
+ /** Events that are currently enabled: currently EV_READ and EV_WRITE
+ are supported. */
+ short enabled;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/dns.h b/sntp/libevent/include/event2/dns.h
new file mode 100644
index 000000000000..a00c83e6a373
--- /dev/null
+++ b/sntp/libevent/include/event2/dns.h
@@ -0,0 +1,701 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/*
+ * The original DNS code is due to Adam Langley with heavy
+ * modifications by Nick Mathewson. Adam put his DNS software in the
+ * public domain. You can find his original copyright below. Please,
+ * aware that the code as part of Libevent is governed by the 3-clause
+ * BSD license above.
+ *
+ * This software is Public Domain. To view a copy of the public domain dedication,
+ * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
+ * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+ *
+ * I ask and expect, but do not require, that all derivative works contain an
+ * attribution similar to:
+ * Parts developed by Adam Langley <agl@imperialviolet.org>
+ *
+ * You may wish to replace the word "Parts" with something else depending on
+ * the amount of original code.
+ *
+ * (Derivative works does not include programs which link against, run or include
+ * the source verbatim in their source distributions)
+ */
+
+/** @file event2/dns.h
+ *
+ * Welcome, gentle reader
+ *
+ * Async DNS lookups are really a whole lot harder than they should be,
+ * mostly stemming from the fact that the libc resolver has never been
+ * very good at them. Before you use this library you should see if libc
+ * can do the job for you with the modern async call getaddrinfo_a
+ * (see http://www.imperialviolet.org/page25.html#e498). Otherwise,
+ * please continue.
+ *
+ * The library keeps track of the state of nameservers and will avoid
+ * them when they go down. Otherwise it will round robin between them.
+ *
+ * Quick start guide:
+ * #include "evdns.h"
+ * void callback(int result, char type, int count, int ttl,
+ * void *addresses, void *arg);
+ * evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
+ * evdns_resolve("www.hostname.com", 0, callback, NULL);
+ *
+ * When the lookup is complete the callback function is called. The
+ * first argument will be one of the DNS_ERR_* defines in evdns.h.
+ * Hopefully it will be DNS_ERR_NONE, in which case type will be
+ * DNS_IPv4_A, count will be the number of IP addresses, ttl is the time
+ * which the data can be cached for (in seconds), addresses will point
+ * to an array of uint32_t's and arg will be whatever you passed to
+ * evdns_resolve.
+ *
+ * Searching:
+ *
+ * In order for this library to be a good replacement for glibc's resolver it
+ * supports searching. This involves setting a list of default domains, in
+ * which names will be queried for. The number of dots in the query name
+ * determines the order in which this list is used.
+ *
+ * Searching appears to be a single lookup from the point of view of the API,
+ * although many DNS queries may be generated from a single call to
+ * evdns_resolve. Searching can also drastically slow down the resolution
+ * of names.
+ *
+ * To disable searching:
+ * 1. Never set it up. If you never call evdns_resolv_conf_parse or
+ * evdns_search_add then no searching will occur.
+ *
+ * 2. If you do call evdns_resolv_conf_parse then don't pass
+ * DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it).
+ *
+ * 3. When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag.
+ *
+ * The order of searches depends on the number of dots in the name. If the
+ * number is greater than the ndots setting then the names is first tried
+ * globally. Otherwise each search domain is appended in turn.
+ *
+ * The ndots setting can either be set from a resolv.conf, or by calling
+ * evdns_search_ndots_set.
+ *
+ * For example, with ndots set to 1 (the default) and a search domain list of
+ * ["myhome.net"]:
+ * Query: www
+ * Order: www.myhome.net, www.
+ *
+ * Query: www.abc
+ * Order: www.abc., www.abc.myhome.net
+ *
+ * Internals:
+ *
+ * Requests are kept in two queues. The first is the inflight queue. In
+ * this queue requests have an allocated transaction id and nameserver.
+ * They will soon be transmitted if they haven't already been.
+ *
+ * The second is the waiting queue. The size of the inflight ring is
+ * limited and all other requests wait in waiting queue for space. This
+ * bounds the number of concurrent requests so that we don't flood the
+ * nameserver. Several algorithms require a full walk of the inflight
+ * queue and so bounding its size keeps thing going nicely under huge
+ * (many thousands of requests) loads.
+ *
+ * If a nameserver loses too many requests it is considered down and we
+ * try not to use it. After a while we send a probe to that nameserver
+ * (a lookup for google.com) and, if it replies, we consider it working
+ * again. If the nameserver fails a probe we wait longer to try again
+ * with the next probe.
+ */
+
+#ifndef EVENT2_DNS_H_INCLUDED_
+#define EVENT2_DNS_H_INCLUDED_
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For integer types. */
+#include <event2/util.h>
+
+/** Error codes 0-5 are as described in RFC 1035. */
+#define DNS_ERR_NONE 0
+/** The name server was unable to interpret the query */
+#define DNS_ERR_FORMAT 1
+/** The name server was unable to process this query due to a problem with the
+ * name server */
+#define DNS_ERR_SERVERFAILED 2
+/** The domain name does not exist */
+#define DNS_ERR_NOTEXIST 3
+/** The name server does not support the requested kind of query */
+#define DNS_ERR_NOTIMPL 4
+/** The name server refuses to reform the specified operation for policy
+ * reasons */
+#define DNS_ERR_REFUSED 5
+/** The reply was truncated or ill-formatted */
+#define DNS_ERR_TRUNCATED 65
+/** An unknown error occurred */
+#define DNS_ERR_UNKNOWN 66
+/** Communication with the server timed out */
+#define DNS_ERR_TIMEOUT 67
+/** The request was canceled because the DNS subsystem was shut down. */
+#define DNS_ERR_SHUTDOWN 68
+/** The request was canceled via a call to evdns_cancel_request */
+#define DNS_ERR_CANCEL 69
+/** There were no answers and no error condition in the DNS packet.
+ * This can happen when you ask for an address that exists, but a record
+ * type that doesn't. */
+#define DNS_ERR_NODATA 70
+
+#define DNS_IPv4_A 1
+#define DNS_PTR 2
+#define DNS_IPv6_AAAA 3
+
+#define DNS_QUERY_NO_SEARCH 1
+
+#define DNS_OPTION_SEARCH 1
+#define DNS_OPTION_NAMESERVERS 2
+#define DNS_OPTION_MISC 4
+#define DNS_OPTION_HOSTSFILE 8
+#define DNS_OPTIONS_ALL 15
+
+/* Obsolete name for DNS_QUERY_NO_SEARCH */
+#define DNS_NO_SEARCH DNS_QUERY_NO_SEARCH
+
+/**
+ * The callback that contains the results from a lookup.
+ * - result is one of the DNS_ERR_* values (DNS_ERR_NONE for success)
+ * - type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA
+ * - count contains the number of addresses of form type
+ * - ttl is the number of seconds the resolution may be cached for.
+ * - addresses needs to be cast according to type. It will be an array of
+ * 4-byte sequences for ipv4, or an array of 16-byte sequences for ipv6,
+ * or a nul-terminated string for PTR.
+ */
+typedef void (*evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg);
+
+struct evdns_base;
+struct event_base;
+
+/** Flag for evdns_base_new: process resolv.conf. */
+#define EVDNS_BASE_INITIALIZE_NAMESERVERS 1
+/** Flag for evdns_base_new: Do not prevent the libevent event loop from
+ * exiting when we have no active dns requests. */
+#define EVDNS_BASE_DISABLE_WHEN_INACTIVE 0x8000
+
+/**
+ Initialize the asynchronous DNS library.
+
+ This function initializes support for non-blocking name resolution by
+ calling evdns_resolv_conf_parse() on UNIX and
+ evdns_config_windows_nameservers() on Windows.
+
+ @param event_base the event base to associate the dns client with
+ @param flags any of EVDNS_BASE_INITIALIZE_NAMESERVERS|
+ EVDNS_BASE_DISABLE_WHEN_INACTIVE
+ @return evdns_base object if successful, or NULL if an error occurred.
+ @see evdns_base_free()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_base * evdns_base_new(struct event_base *event_base, int initialize_nameservers);
+
+
+/**
+ Shut down the asynchronous DNS resolver and terminate all active requests.
+
+ If the 'fail_requests' option is enabled, all active requests will return
+ an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise,
+ the requests will be silently discarded.
+
+ @param evdns_base the evdns base to free
+ @param fail_requests if zero, active requests will be aborted; if non-zero,
+ active requests will return DNS_ERR_SHUTDOWN.
+ @see evdns_base_new()
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_base_free(struct evdns_base *base, int fail_requests);
+
+/**
+ Remove all hosts entries that have been loaded into the event_base via
+ evdns_base_load_hosts or via event_base_resolv_conf_parse.
+
+ @param evdns_base the evdns base to remove outdated host addresses from
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_base_clear_host_addresses(struct evdns_base *base);
+
+/**
+ Convert a DNS error code to a string.
+
+ @param err the DNS error code
+ @return a string containing an explanation of the error code
+*/
+EVENT2_EXPORT_SYMBOL
+const char *evdns_err_to_string(int err);
+
+
+/**
+ Add a nameserver.
+
+ The address should be an IPv4 address in network byte order.
+ The type of address is chosen so that it matches in_addr.s_addr.
+
+ @param base the evdns_base to which to add the name server
+ @param address an IP address in network byte order
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_base_nameserver_ip_add()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_nameserver_add(struct evdns_base *base,
+ unsigned long int address);
+
+/**
+ Get the number of configured nameservers.
+
+ This returns the number of configured nameservers (not necessarily the
+ number of running nameservers). This is useful for double-checking
+ whether our calls to the various nameserver configuration functions
+ have been successful.
+
+ @param base the evdns_base to which to apply this operation
+ @return the number of configured nameservers
+ @see evdns_base_nameserver_add()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_count_nameservers(struct evdns_base *base);
+
+/**
+ Remove all configured nameservers, and suspend all pending resolves.
+
+ Resolves will not necessarily be re-attempted until evdns_base_resume() is called.
+
+ @param base the evdns_base to which to apply this operation
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_base_resume()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_clear_nameservers_and_suspend(struct evdns_base *base);
+
+
+/**
+ Resume normal operation and continue any suspended resolve requests.
+
+ Re-attempt resolves left in limbo after an earlier call to
+ evdns_base_clear_nameservers_and_suspend().
+
+ @param base the evdns_base to which to apply this operation
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_base_clear_nameservers_and_suspend()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_resume(struct evdns_base *base);
+
+/**
+ Add a nameserver by string address.
+
+ This function parses a n IPv4 or IPv6 address from a string and adds it as a
+ nameserver. It supports the following formats:
+ - [IPv6Address]:port
+ - [IPv6Address]
+ - IPv6Address
+ - IPv4Address:port
+ - IPv4Address
+
+ If no port is specified, it defaults to 53.
+
+ @param base the evdns_base to which to apply this operation
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_base_nameserver_add()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_nameserver_ip_add(struct evdns_base *base,
+ const char *ip_as_string);
+
+/**
+ Add a nameserver by sockaddr.
+ **/
+EVENT2_EXPORT_SYMBOL
+int
+evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
+ const struct sockaddr *sa, ev_socklen_t len, unsigned flags);
+
+struct evdns_request;
+
+/**
+ Lookup an A record for a given name.
+
+ @param base the evdns_base to which to apply this operation
+ @param name a DNS hostname
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return an evdns_request object if successful, or NULL if an error occurred.
+ @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_request *evdns_base_resolve_ipv4(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr);
+
+/**
+ Lookup an AAAA record for a given name.
+
+ @param base the evdns_base to which to apply this operation
+ @param name a DNS hostname
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return an evdns_request object if successful, or NULL if an error occurred.
+ @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_request *evdns_base_resolve_ipv6(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr);
+
+struct in_addr;
+struct in6_addr;
+
+/**
+ Lookup a PTR record for a given IP address.
+
+ @param base the evdns_base to which to apply this operation
+ @param in an IPv4 address
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return an evdns_request object if successful, or NULL if an error occurred.
+ @see evdns_resolve_reverse_ipv6(), evdns_cancel_request()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_request *evdns_base_resolve_reverse(struct evdns_base *base, const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
+
+
+/**
+ Lookup a PTR record for a given IPv6 address.
+
+ @param base the evdns_base to which to apply this operation
+ @param in an IPv6 address
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return an evdns_request object if successful, or NULL if an error occurred.
+ @see evdns_resolve_reverse_ipv6(), evdns_cancel_request()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_request *evdns_base_resolve_reverse_ipv6(struct evdns_base *base, const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
+
+/**
+ Cancels a pending DNS resolution request.
+
+ @param base the evdns_base that was used to make the request
+ @param req the evdns_request that was returned by calling a resolve function
+ @see evdns_base_resolve_ipv4(), evdns_base_resolve_ipv6, evdns_base_resolve_reverse
+*/
+EVENT2_EXPORT_SYMBOL
+void evdns_cancel_request(struct evdns_base *base, struct evdns_request *req);
+
+/**
+ Set the value of a configuration option.
+
+ The currently available configuration options are:
+
+ ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case,
+ bind-to, initial-probe-timeout, getaddrinfo-allow-skew.
+
+ In versions before Libevent 2.0.3-alpha, the option name needed to end with
+ a colon.
+
+ @param base the evdns_base to which to apply this operation
+ @param option the name of the configuration option to be modified
+ @param val the value to be set
+ @return 0 if successful, or -1 if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_set_option(struct evdns_base *base, const char *option, const char *val);
+
+
+/**
+ Parse a resolv.conf file.
+
+ The 'flags' parameter determines what information is parsed from the
+ resolv.conf file. See the man page for resolv.conf for the format of this
+ file.
+
+ The following directives are not parsed from the file: sortlist, rotate,
+ no-check-names, inet6, debug.
+
+ If this function encounters an error, the possible return values are: 1 =
+ failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of
+ memory, 5 = short read from file, 6 = no nameservers listed in the file
+
+ @param base the evdns_base to which to apply this operation
+ @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
+ DNS_OPTIONS_HOSTSFILE|DNS_OPTIONS_ALL
+ @param filename the path to the resolv.conf file
+ @return 0 if successful, or various positive error codes if an error
+ occurred (see above)
+ @see resolv.conf(3), evdns_config_windows_nameservers()
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char *const filename);
+
+/**
+ Load an /etc/hosts-style file from 'hosts_fname' into 'base'.
+
+ If hosts_fname is NULL, add minimal entries for localhost, and nothing
+ else.
+
+ Note that only evdns_getaddrinfo uses the /etc/hosts entries.
+
+ This function does not replace previously loaded hosts entries; to do that,
+ call evdns_base_clear_host_addresses first.
+
+ Return 0 on success, negative on failure.
+*/
+EVENT2_EXPORT_SYMBOL
+int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
+
+/**
+ Obtain nameserver information using the Windows API.
+
+ Attempt to configure a set of nameservers based on platform settings on
+ a win32 host. Preferentially tries to use GetNetworkParams; if that fails,
+ looks in the registry.
+
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resolv_conf_parse()
+ */
+#ifdef _WIN32
+EVENT2_EXPORT_SYMBOL
+int evdns_base_config_windows_nameservers(struct evdns_base *);
+#define EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
+#endif
+
+
+/**
+ Clear the list of search domains.
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_base_search_clear(struct evdns_base *base);
+
+
+/**
+ Add a domain to the list of search domains
+
+ @param domain the domain to be added to the search list
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_base_search_add(struct evdns_base *base, const char *domain);
+
+
+/**
+ Set the 'ndots' parameter for searches.
+
+ Sets the number of dots which, when found in a name, causes
+ the first query to be without any search domain.
+
+ @param ndots the new ndots parameter
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_base_search_ndots_set(struct evdns_base *base, const int ndots);
+
+/**
+ A callback that is invoked when a log message is generated
+
+ @param is_warning indicates if the log message is a 'warning'
+ @param msg the content of the log message
+ */
+typedef void (*evdns_debug_log_fn_type)(int is_warning, const char *msg);
+
+
+/**
+ Set the callback function to handle DNS log messages. If this
+ callback is not set, evdns log messages are handled with the regular
+ Libevent logging system.
+
+ @param fn the callback to be invoked when a log message is generated
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_set_log_fn(evdns_debug_log_fn_type fn);
+
+/**
+ Set a callback that will be invoked to generate transaction IDs. By
+ default, we pick transaction IDs based on the current clock time, which
+ is bad for security.
+
+ @param fn the new callback, or NULL to use the default.
+
+ NOTE: This function has no effect in Libevent 2.0.4-alpha and later,
+ since Libevent now provides its own secure RNG.
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void));
+
+/**
+ Set a callback used to generate random bytes. By default, we use
+ the same function as passed to evdns_set_transaction_id_fn to generate
+ bytes two at a time. If a function is provided here, it's also used
+ to generate transaction IDs.
+
+ NOTE: This function has no effect in Libevent 2.0.4-alpha and later,
+ since Libevent now provides its own secure RNG.
+*/
+EVENT2_EXPORT_SYMBOL
+void evdns_set_random_bytes_fn(void (*fn)(char *, size_t));
+
+/*
+ * Functions used to implement a DNS server.
+ */
+
+struct evdns_server_request;
+struct evdns_server_question;
+
+/**
+ A callback to implement a DNS server. The callback function receives a DNS
+ request. It should then optionally add a number of answers to the reply
+ using the evdns_server_request_add_*_reply functions, before calling either
+ evdns_server_request_respond to send the reply back, or
+ evdns_server_request_drop to decline to answer the request.
+
+ @param req A newly received request
+ @param user_data A pointer that was passed to
+ evdns_add_server_port_with_base().
+ */
+typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, void *);
+#define EVDNS_ANSWER_SECTION 0
+#define EVDNS_AUTHORITY_SECTION 1
+#define EVDNS_ADDITIONAL_SECTION 2
+
+#define EVDNS_TYPE_A 1
+#define EVDNS_TYPE_NS 2
+#define EVDNS_TYPE_CNAME 5
+#define EVDNS_TYPE_SOA 6
+#define EVDNS_TYPE_PTR 12
+#define EVDNS_TYPE_MX 15
+#define EVDNS_TYPE_TXT 16
+#define EVDNS_TYPE_AAAA 28
+
+#define EVDNS_QTYPE_AXFR 252
+#define EVDNS_QTYPE_ALL 255
+
+#define EVDNS_CLASS_INET 1
+
+/* flags that can be set in answers; as part of the err parameter */
+#define EVDNS_FLAGS_AA 0x400
+#define EVDNS_FLAGS_RD 0x080
+
+/** Create a new DNS server port.
+
+ @param base The event base to handle events for the server port.
+ @param socket A UDP socket to accept DNS requests.
+ @param flags Always 0 for now.
+ @param callback A function to invoke whenever we get a DNS request
+ on the socket.
+ @param user_data Data to pass to the callback.
+ @return an evdns_server_port structure for this server port.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
+/** Close down a DNS server port, and free associated structures. */
+EVENT2_EXPORT_SYMBOL
+void evdns_close_server_port(struct evdns_server_port *port);
+
+/** Sets some flags in a reply we're building.
+ Allows setting of the AA or RD flags
+ */
+EVENT2_EXPORT_SYMBOL
+void evdns_server_request_set_flags(struct evdns_server_request *req, int flags);
+
+/* Functions to add an answer to an in-progress DNS reply.
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data);
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl);
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);
+
+/**
+ Send back a response to a DNS request, and free the request structure.
+*/
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_respond(struct evdns_server_request *req, int err);
+/**
+ Free a DNS request without sending back a reply.
+*/
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_drop(struct evdns_server_request *req);
+struct sockaddr;
+/**
+ Get the address that made a DNS request.
+ */
+EVENT2_EXPORT_SYMBOL
+int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, int addr_len);
+
+/** Callback for evdns_getaddrinfo. */
+typedef void (*evdns_getaddrinfo_cb)(int result, struct evutil_addrinfo *res, void *arg);
+
+struct evdns_base;
+struct evdns_getaddrinfo_request;
+/** Make a non-blocking getaddrinfo request using the dns_base in 'dns_base'.
+ *
+ * If we can answer the request immediately (with an error or not!), then we
+ * invoke cb immediately and return NULL. Otherwise we return
+ * an evdns_getaddrinfo_request and invoke cb later.
+ *
+ * When the callback is invoked, we pass as its first argument the error code
+ * that getaddrinfo would return (or 0 for no error). As its second argument,
+ * we pass the evutil_addrinfo structures we found (or NULL on error). We
+ * pass 'arg' as the third argument.
+ *
+ * Limitations:
+ *
+ * - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
+ * - For ai_socktype, we only handle SOCKTYPE_STREAM, SOCKTYPE_UDP, and 0.
+ * - For ai_protocol, we only handle IPPROTO_TCP, IPPROTO_UDP, and 0.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evdns_getaddrinfo_request *evdns_getaddrinfo(
+ struct evdns_base *dns_base,
+ const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in,
+ evdns_getaddrinfo_cb cb, void *arg);
+
+/* Cancel an in-progress evdns_getaddrinfo. This MUST NOT be called after the
+ * getaddrinfo's callback has been invoked. The resolves will be canceled,
+ * and the callback will be invoked with the error EVUTIL_EAI_CANCEL. */
+EVENT2_EXPORT_SYMBOL
+void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !EVENT2_DNS_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/dns_compat.h b/sntp/libevent/include/event2/dns_compat.h
new file mode 100644
index 000000000000..965fd65445b4
--- /dev/null
+++ b/sntp/libevent/include/event2/dns_compat.h
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_DNS_COMPAT_H_INCLUDED_
+#define EVENT2_DNS_COMPAT_H_INCLUDED_
+
+/** @file event2/dns_compat.h
+
+ Potentially non-threadsafe versions of the functions in dns.h: provided
+ only for backwards compatibility.
+
+
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/**
+ Initialize the asynchronous DNS library.
+
+ This function initializes support for non-blocking name resolution by
+ calling evdns_resolv_conf_parse() on UNIX and
+ evdns_config_windows_nameservers() on Windows.
+
+ @deprecated This function is deprecated because it always uses the current
+ event base, and is easily confused by multiple calls to event_init(), and
+ so is not safe for multithreaded use. Additionally, it allocates a global
+ structure that only one thread can use. The replacement is
+ evdns_base_new().
+
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_shutdown()
+ */
+int evdns_init(void);
+
+struct evdns_base;
+/**
+ Return the global evdns_base created by event_init() and used by the other
+ deprecated functions.
+
+ @deprecated This function is deprecated because use of the global
+ evdns_base is error-prone.
+ */
+struct evdns_base *evdns_get_global_base(void);
+
+/**
+ Shut down the asynchronous DNS resolver and terminate all active requests.
+
+ If the 'fail_requests' option is enabled, all active requests will return
+ an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise,
+ the requests will be silently discarded.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_shutdown().
+
+ @param fail_requests if zero, active requests will be aborted; if non-zero,
+ active requests will return DNS_ERR_SHUTDOWN.
+ @see evdns_init()
+ */
+void evdns_shutdown(int fail_requests);
+
+/**
+ Add a nameserver.
+
+ The address should be an IPv4 address in network byte order.
+ The type of address is chosen so that it matches in_addr.s_addr.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_nameserver_add().
+
+ @param address an IP address in network byte order
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_nameserver_ip_add()
+ */
+int evdns_nameserver_add(unsigned long int address);
+
+/**
+ Get the number of configured nameservers.
+
+ This returns the number of configured nameservers (not necessarily the
+ number of running nameservers). This is useful for double-checking
+ whether our calls to the various nameserver configuration functions
+ have been successful.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_count_nameservers().
+
+ @return the number of configured nameservers
+ @see evdns_nameserver_add()
+ */
+int evdns_count_nameservers(void);
+
+/**
+ Remove all configured nameservers, and suspend all pending resolves.
+
+ Resolves will not necessarily be re-attempted until evdns_resume() is called.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_clear_nameservers_and_suspend().
+
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resume()
+ */
+int evdns_clear_nameservers_and_suspend(void);
+
+/**
+ Resume normal operation and continue any suspended resolve requests.
+
+ Re-attempt resolves left in limbo after an earlier call to
+ evdns_clear_nameservers_and_suspend().
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_resume().
+
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_clear_nameservers_and_suspend()
+ */
+int evdns_resume(void);
+
+/**
+ Add a nameserver.
+
+ This wraps the evdns_nameserver_add() function by parsing a string as an IP
+ address and adds it as a nameserver.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_nameserver_ip_add().
+
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_nameserver_add()
+ */
+int evdns_nameserver_ip_add(const char *ip_as_string);
+
+/**
+ Lookup an A record for a given name.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_resolve_ipv4().
+
+ @param name a DNS hostname
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
+ */
+int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
+
+/**
+ Lookup an AAAA record for a given name.
+
+ @param name a DNS hostname
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
+ */
+int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
+
+struct in_addr;
+struct in6_addr;
+
+/**
+ Lookup a PTR record for a given IP address.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_resolve_reverse().
+
+ @param in an IPv4 address
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resolve_reverse_ipv6()
+ */
+int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
+
+/**
+ Lookup a PTR record for a given IPv6 address.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_resolve_reverse_ipv6().
+
+ @param in an IPv6 address
+ @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
+ @param callback a callback function to invoke when the request is completed
+ @param ptr an argument to pass to the callback function
+ @return 0 if successful, or -1 if an error occurred
+ @see evdns_resolve_reverse_ipv6()
+ */
+int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
+
+/**
+ Set the value of a configuration option.
+
+ The currently available configuration options are:
+
+ ndots, timeout, max-timeouts, max-inflight, and attempts
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_set_option().
+
+ @param option the name of the configuration option to be modified
+ @param val the value to be set
+ @param flags Ignored.
+ @return 0 if successful, or -1 if an error occurred
+ */
+int evdns_set_option(const char *option, const char *val, int flags);
+
+/**
+ Parse a resolv.conf file.
+
+ The 'flags' parameter determines what information is parsed from the
+ resolv.conf file. See the man page for resolv.conf for the format of this
+ file.
+
+ The following directives are not parsed from the file: sortlist, rotate,
+ no-check-names, inet6, debug.
+
+ If this function encounters an error, the possible return values are: 1 =
+ failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of
+ memory, 5 = short read from file, 6 = no nameservers listed in the file
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_resolv_conf_parse().
+
+ @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
+ DNS_OPTIONS_ALL
+ @param filename the path to the resolv.conf file
+ @return 0 if successful, or various positive error codes if an error
+ occurred (see above)
+ @see resolv.conf(3), evdns_config_windows_nameservers()
+ */
+int evdns_resolv_conf_parse(int flags, const char *const filename);
+
+/**
+ Clear the list of search domains.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_search_clear().
+ */
+void evdns_search_clear(void);
+
+/**
+ Add a domain to the list of search domains
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_search_add().
+
+ @param domain the domain to be added to the search list
+ */
+void evdns_search_add(const char *domain);
+
+/**
+ Set the 'ndots' parameter for searches.
+
+ Sets the number of dots which, when found in a name, causes
+ the first query to be without any search domain.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which evdns_base it applies to. The recommended
+ function is evdns_base_search_ndots_set().
+
+ @param ndots the new ndots parameter
+ */
+void evdns_search_ndots_set(const int ndots);
+
+/**
+ As evdns_server_new_with_base.
+
+ @deprecated This function is deprecated because it does not allow the
+ caller to specify which even_base it uses. The recommended
+ function is evdns_add_server_port_with_base().
+
+*/
+struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
+
+#ifdef _WIN32
+int evdns_config_windows_nameservers(void);
+#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/dns_struct.h b/sntp/libevent/include/event2/dns_struct.h
new file mode 100644
index 000000000000..593a8a70b649
--- /dev/null
+++ b/sntp/libevent/include/event2/dns_struct.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_DNS_STRUCT_H_INCLUDED_
+#define EVENT2_DNS_STRUCT_H_INCLUDED_
+
+/** @file event2/dns_struct.h
+
+ Data structures for dns. Using these structures may hurt forward
+ compatibility with later versions of Libevent: be careful!
+
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/*
+ * Structures used to implement a DNS server.
+ */
+
+struct evdns_server_request {
+ int flags;
+ int nquestions;
+ struct evdns_server_question **questions;
+};
+struct evdns_server_question {
+ int type;
+#ifdef __cplusplus
+ int dns_question_class;
+#else
+ /* You should refer to this field as "dns_question_class". The
+ * name "class" works in C for backward compatibility, and will be
+ * removed in a future version. (1.5 or later). */
+ int class;
+#define dns_question_class class
+#endif
+ char name[1];
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */
+
diff --git a/sntp/libevent/include/event2/event.h b/sntp/libevent/include/event2/event.h
new file mode 100644
index 000000000000..6e2b884d440d
--- /dev/null
+++ b/sntp/libevent/include/event2/event.h
@@ -0,0 +1,1669 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_EVENT_H_INCLUDED_
+#define EVENT2_EVENT_H_INCLUDED_
+
+/**
+ @mainpage
+
+ @section intro Introduction
+
+ Libevent is an event notification library for developing scalable network
+ servers. The Libevent API provides a mechanism to execute a callback
+ function when a specific event occurs on a file descriptor or after a
+ timeout has been reached. Furthermore, Libevent also support callbacks due
+ to signals or regular timeouts.
+
+ Libevent is meant to replace the event loop found in event driven network
+ servers. An application just needs to call event_base_dispatch() and then add or
+ remove events dynamically without having to change the event loop.
+
+
+ Currently, Libevent supports /dev/poll, kqueue(2), select(2), poll(2),
+ epoll(4), and evports. The internal event mechanism is completely
+ independent of the exposed event API, and a simple update of Libevent can
+ provide new functionality without having to redesign the applications. As a
+ result, Libevent allows for portable application development and provides
+ the most scalable event notification mechanism available on an operating
+ system. Libevent can also be used for multithreaded programs. Libevent
+ should compile on Linux, *BSD, Mac OS X, Solaris and, Windows.
+
+ @section usage Standard usage
+
+ Every program that uses Libevent must include the <event2/event.h>
+ header, and pass the -levent flag to the linker. (You can instead link
+ -levent_core if you only want the main event and buffered IO-based code,
+ and don't want to link any protocol code.)
+
+ @section setup Library setup
+
+ Before you call any other Libevent functions, you need to set up the
+ library. If you're going to use Libevent from multiple threads in a
+ multithreaded application, you need to initialize thread support --
+ typically by using evthread_use_pthreads() or
+ evthread_use_windows_threads(). See <event2/thread.h> for more
+ information.
+
+ This is also the point where you can replace Libevent's memory
+ management functions with event_set_mem_functions, and enable debug mode
+ with event_enable_debug_mode().
+
+ @section base Creating an event base
+
+ Next, you need to create an event_base structure, using event_base_new()
+ or event_base_new_with_config(). The event_base is responsible for
+ keeping track of which events are "pending" (that is to say, being
+ watched to see if they become active) and which events are "active".
+ Every event is associated with a single event_base.
+
+ @section event Event notification
+
+ For each file descriptor that you wish to monitor, you must create an
+ event structure with event_new(). (You may also declare an event
+ structure and call event_assign() to initialize the members of the
+ structure.) To enable notification, you add the structure to the list
+ of monitored events by calling event_add(). The event structure must
+ remain allocated as long as it is active, so it should generally be
+ allocated on the heap.
+
+ @section loop Dispatching events.
+
+ Finally, you call event_base_dispatch() to loop and dispatch events.
+ You can also use event_base_loop() for more fine-grained control.
+
+ Currently, only one thread can be dispatching a given event_base at a
+ time. If you want to run events in multiple threads at once, you can
+ either have a single event_base whose events add work to a work queue,
+ or you can create multiple event_base objects.
+
+ @section bufferevent I/O Buffers
+
+ Libevent provides a buffered I/O abstraction on top of the regular event
+ callbacks. This abstraction is called a bufferevent. A bufferevent
+ provides input and output buffers that get filled and drained
+ automatically. The user of a buffered event no longer deals directly
+ with the I/O, but instead is reading from input and writing to output
+ buffers.
+
+ Once initialized via bufferevent_socket_new(), the bufferevent structure
+ can be used repeatedly with bufferevent_enable() and
+ bufferevent_disable(). Instead of reading and writing directly to a
+ socket, you would call bufferevent_read() and bufferevent_write().
+
+ When read enabled the bufferevent will try to read from the file descriptor
+ and call the read callback. The write callback is executed whenever the
+ output buffer is drained below the write low watermark, which is 0 by
+ default.
+
+ See <event2/bufferevent*.h> for more information.
+
+ @section timers Timers
+
+ Libevent can also be used to create timers that invoke a callback after a
+ certain amount of time has expired. The evtimer_new() macro returns
+ an event struct to use as a timer. To activate the timer, call
+ evtimer_add(). Timers can be deactivated by calling evtimer_del().
+ (These macros are thin wrappers around event_new(), event_add(),
+ and event_del(); you can also use those instead.)
+
+ @section evdns Asynchronous DNS resolution
+
+ Libevent provides an asynchronous DNS resolver that should be used instead
+ of the standard DNS resolver functions. See the <event2/dns.h>
+ functions for more detail.
+
+ @section evhttp Event-driven HTTP servers
+
+ Libevent provides a very simple event-driven HTTP server that can be
+ embedded in your program and used to service HTTP requests.
+
+ To use this capability, you need to include the <event2/http.h> header in your
+ program. See that header for more information.
+
+ @section evrpc A framework for RPC servers and clients
+
+ Libevent provides a framework for creating RPC servers and clients. It
+ takes care of marshaling and unmarshaling all data structures.
+
+ @section api API Reference
+
+ To browse the complete documentation of the libevent API, click on any of
+ the following links.
+
+ event2/event.h
+ The primary libevent header
+
+ event2/thread.h
+ Functions for use by multithreaded programs
+
+ event2/buffer.h and event2/bufferevent.h
+ Buffer management for network reading and writing
+
+ event2/util.h
+ Utility functions for portable nonblocking network code
+
+ event2/dns.h
+ Asynchronous DNS resolution
+
+ event2/http.h
+ An embedded libevent-based HTTP server
+
+ event2/rpc.h
+ A framework for creating RPC servers and clients
+
+ */
+
+/** @file event2/event.h
+
+ Core functions for waiting for and receiving events, and using event bases.
+*/
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <stdio.h>
+
+/* For int types. */
+#include <event2/util.h>
+
+/**
+ * Structure to hold information and state for a Libevent dispatch loop.
+ *
+ * The event_base lies at the center of Libevent; every application will
+ * have one. It keeps track of all pending and active events, and
+ * notifies your application of the active ones.
+ *
+ * This is an opaque structure; you can allocate one using
+ * event_base_new() or event_base_new_with_config().
+ *
+ * @see event_base_new(), event_base_free(), event_base_loop(),
+ * event_base_new_with_config()
+ */
+struct event_base
+#ifdef EVENT_IN_DOXYGEN_
+{/*Empty body so that doxygen will generate documentation here.*/}
+#endif
+;
+
+/**
+ * @struct event
+ *
+ * Structure to represent a single event.
+ *
+ * An event can have some underlying condition it represents: a socket
+ * becoming readable or writeable (or both), or a signal becoming raised.
+ * (An event that represents no underlying condition is still useful: you
+ * can use one to implement a timer, or to communicate between threads.)
+ *
+ * Generally, you can create events with event_new(), then make them
+ * pending with event_add(). As your event_base runs, it will run the
+ * callbacks of an events whose conditions are triggered. When you
+ * longer want the event, free it with event_free().
+ *
+ * In more depth:
+ *
+ * An event may be "pending" (one whose condition we are watching),
+ * "active" (one whose condition has triggered and whose callback is about
+ * to run), neither, or both. Events come into existence via
+ * event_assign() or event_new(), and are then neither active nor pending.
+ *
+ * To make an event pending, pass it to event_add(). When doing so, you
+ * can also set a timeout for the event.
+ *
+ * Events become active during an event_base_loop() call when either their
+ * condition has triggered, or when their timeout has elapsed. You can
+ * also activate an event manually using event_active(). The even_base
+ * loop will run the callbacks of active events; after it has done so, it
+ * marks them as no longer active.
+ *
+ * You can make an event non-pending by passing it to event_del(). This
+ * also makes the event non-active.
+ *
+ * Events can be "persistent" or "non-persistent". A non-persistent event
+ * becomes non-pending as soon as it is triggered: thus, it only runs at
+ * most once per call to event_add(). A persistent event remains pending
+ * even when it becomes active: you'll need to event_del() it manually in
+ * order to make it non-pending. When a persistent event with a timeout
+ * becomes active, its timeout is reset: this means you can use persistent
+ * events to implement periodic timeouts.
+ *
+ * This should be treated as an opaque structure; you should never read or
+ * write any of its fields directly. For backward compatibility with old
+ * code, it is defined in the event2/event_struct.h header; including this
+ * header may make your code incompatible with other versions of Libevent.
+ *
+ * @see event_new(), event_free(), event_assign(), event_get_assignment(),
+ * event_add(), event_del(), event_active(), event_pending(),
+ * event_get_fd(), event_get_base(), event_get_events(),
+ * event_get_callback(), event_get_callback_arg(),
+ * event_priority_set()
+ */
+struct event
+#ifdef EVENT_IN_DOXYGEN_
+{/*Empty body so that doxygen will generate documentation here.*/}
+#endif
+;
+
+/**
+ * Configuration for an event_base.
+ *
+ * There are many options that can be used to alter the behavior and
+ * implementation of an event_base. To avoid having to pass them all in a
+ * complex many-argument constructor, we provide an abstract data type
+ * wrhere you set up configation information before passing it to
+ * event_base_new_with_config().
+ *
+ * @see event_config_new(), event_config_free(), event_base_new_with_config(),
+ * event_config_avoid_method(), event_config_require_features(),
+ * event_config_set_flag(), event_config_set_num_cpus_hint()
+ */
+struct event_config
+#ifdef EVENT_IN_DOXYGEN_
+{/*Empty body so that doxygen will generate documentation here.*/}
+#endif
+;
+
+/**
+ * Enable some relatively expensive debugging checks in Libevent that
+ * would normally be turned off. Generally, these checks cause code that
+ * would otherwise crash mysteriously to fail earlier with an assertion
+ * failure. Note that this method MUST be called before any events or
+ * event_bases have been created.
+ *
+ * Debug mode can currently catch the following errors:
+ * An event is re-assigned while it is added
+ * Any function is called on a non-assigned event
+ *
+ * Note that debugging mode uses memory to track every event that has been
+ * initialized (via event_assign, event_set, or event_new) but not yet
+ * released (via event_free or event_debug_unassign). If you want to use
+ * debug mode, and you find yourself running out of memory, you will need
+ * to use event_debug_unassign to explicitly stop tracking events that
+ * are no longer considered set-up.
+ *
+ * @see event_debug_unassign()
+ */
+EVENT2_EXPORT_SYMBOL
+void event_enable_debug_mode(void);
+
+/**
+ * When debugging mode is enabled, informs Libevent that an event should no
+ * longer be considered as assigned. When debugging mode is not enabled, does
+ * nothing.
+ *
+ * This function must only be called on a non-added event.
+ *
+ * @see event_enable_debug_mode()
+ */
+EVENT2_EXPORT_SYMBOL
+void event_debug_unassign(struct event *);
+
+/**
+ * Create and return a new event_base to use with the rest of Libevent.
+ *
+ * @return a new event_base on success, or NULL on failure.
+ *
+ * @see event_base_free(), event_base_new_with_config()
+ */
+EVENT2_EXPORT_SYMBOL
+struct event_base *event_base_new(void);
+
+/**
+ Reinitialize the event base after a fork
+
+ Some event mechanisms do not survive across fork. The event base needs
+ to be reinitialized with the event_reinit() function.
+
+ @param base the event base that needs to be re-initialized
+ @return 0 if successful, or -1 if some events could not be re-added.
+ @see event_base_new()
+*/
+EVENT2_EXPORT_SYMBOL
+int event_reinit(struct event_base *base);
+
+/**
+ Event dispatching loop
+
+ This loop will run the event base until either there are no more pending or
+ active, or until something calls event_base_loopbreak() or
+ event_base_loopexit().
+
+ @param base the event_base structure returned by event_base_new() or
+ event_base_new_with_config()
+ @return 0 if successful, -1 if an error occurred, or 1 if we exited because
+ no events were pending or active.
+ @see event_base_loop()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_dispatch(struct event_base *);
+
+/**
+ Get the kernel event notification mechanism used by Libevent.
+
+ @param eb the event_base structure returned by event_base_new()
+ @return a string identifying the kernel event mechanism (kqueue, epoll, etc.)
+ */
+EVENT2_EXPORT_SYMBOL
+const char *event_base_get_method(const struct event_base *);
+
+/**
+ Gets all event notification mechanisms supported by Libevent.
+
+ This functions returns the event mechanism in order preferred by
+ Libevent. Note that this list will include all backends that
+ Libevent has compiled-in support for, and will not necessarily check
+ your OS to see whether it has the required resources.
+
+ @return an array with pointers to the names of support methods.
+ The end of the array is indicated by a NULL pointer. If an
+ error is encountered NULL is returned.
+*/
+EVENT2_EXPORT_SYMBOL
+const char **event_get_supported_methods(void);
+
+/**
+ @name event type flag
+
+ Flags to pass to event_base_get_num_events() to specify the kinds of events
+ we want to aggregate counts for
+*/
+/**@{*/
+/** count the number of active events, which have been triggered.*/
+#define EVENT_BASE_COUNT_ACTIVE 1U
+/** count the number of virtual events, which is used to represent an internal
+ * condition, other than a pending event, that keeps the loop from exiting. */
+#define EVENT_BASE_COUNT_VIRTUAL 2U
+/** count the number of events which have been added to event base, including
+ * internal events. */
+#define EVENT_BASE_COUNT_ADDED 4U
+/**@}*/
+
+/**
+ Gets the number of events in event_base, as specified in the flags.
+
+ Since event base has some internal events added to make some of its
+ functionalities work, EVENT_BASE_COUNT_ADDED may return more than the
+ number of events you added using event_add().
+
+ If you pass EVENT_BASE_COUNT_ACTIVE and EVENT_BASE_COUNT_ADDED together, an
+ active event will be counted twice. However, this might not be the case in
+ future libevent versions. The return value is an indication of the work
+ load, but the user shouldn't rely on the exact value as this may change in
+ the future.
+
+ @param eb the event_base structure returned by event_base_new()
+ @param flags a bitwise combination of the kinds of events to aggregate
+ counts for
+ @return the number of events specified in the flags
+*/
+EVENT2_EXPORT_SYMBOL
+int event_base_get_num_events(struct event_base *, unsigned int);
+
+/**
+ Get the maximum number of events in a given event_base as specified in the
+ flags.
+
+ @param eb the event_base structure returned by event_base_new()
+ @param flags a bitwise combination of the kinds of events to aggregate
+ counts for
+ @param clear option used to reset the maximum count.
+ @return the number of events specified in the flags
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_get_max_events(struct event_base *, unsigned int, int);
+
+/**
+ Allocates a new event configuration object.
+
+ The event configuration object can be used to change the behavior of
+ an event base.
+
+ @return an event_config object that can be used to store configuration, or
+ NULL if an error is encountered.
+ @see event_base_new_with_config(), event_config_free(), event_config
+*/
+EVENT2_EXPORT_SYMBOL
+struct event_config *event_config_new(void);
+
+/**
+ Deallocates all memory associated with an event configuration object
+
+ @param cfg the event configuration object to be freed.
+*/
+EVENT2_EXPORT_SYMBOL
+void event_config_free(struct event_config *cfg);
+
+/**
+ Enters an event method that should be avoided into the configuration.
+
+ This can be used to avoid event mechanisms that do not support certain
+ file descriptor types, or for debugging to avoid certain event
+ mechanisms. An application can make use of multiple event bases to
+ accommodate incompatible file descriptor types.
+
+ @param cfg the event configuration object
+ @param method the name of the event method to avoid
+ @return 0 on success, -1 on failure.
+*/
+EVENT2_EXPORT_SYMBOL
+int event_config_avoid_method(struct event_config *cfg, const char *method);
+
+/**
+ A flag used to describe which features an event_base (must) provide.
+
+ Because of OS limitations, not every Libevent backend supports every
+ possible feature. You can use this type with
+ event_config_require_features() to tell Libevent to only proceed if your
+ event_base implements a given feature, and you can receive this type from
+ event_base_get_features() to see which features are available.
+*/
+enum event_method_feature {
+ /** Require an event method that allows edge-triggered events with EV_ET. */
+ EV_FEATURE_ET = 0x01,
+ /** Require an event method where having one event triggered among
+ * many is [approximately] an O(1) operation. This excludes (for
+ * example) select and poll, which are approximately O(N) for N
+ * equal to the total number of possible events. */
+ EV_FEATURE_O1 = 0x02,
+ /** Require an event method that allows file descriptors as well as
+ * sockets. */
+ EV_FEATURE_FDS = 0x04,
+ /** Require an event method that allows you to use EV_CLOSED to detect
+ * connection close without the necessity of reading all the pending data.
+ *
+ * Methods that do support EV_CLOSED may not be able to provide support on
+ * all kernel versions.
+ **/
+ EV_FEATURE_EARLY_CLOSE = 0x08
+};
+
+/**
+ A flag passed to event_config_set_flag().
+
+ These flags change the behavior of an allocated event_base.
+
+ @see event_config_set_flag(), event_base_new_with_config(),
+ event_method_feature
+ */
+enum event_base_config_flag {
+ /** Do not allocate a lock for the event base, even if we have
+ locking set up.
+
+ Setting this option will make it unsafe and nonfunctional to call
+ functions on the base concurrently from multiple threads.
+ */
+ EVENT_BASE_FLAG_NOLOCK = 0x01,
+ /** Do not check the EVENT_* environment variables when configuring
+ an event_base */
+ EVENT_BASE_FLAG_IGNORE_ENV = 0x02,
+ /** Windows only: enable the IOCP dispatcher at startup
+
+ If this flag is set then bufferevent_socket_new() and
+ evconn_listener_new() will use IOCP-backed implementations
+ instead of the usual select-based one on Windows.
+ */
+ EVENT_BASE_FLAG_STARTUP_IOCP = 0x04,
+ /** Instead of checking the current time every time the event loop is
+ ready to run timeout callbacks, check after each timeout callback.
+ */
+ EVENT_BASE_FLAG_NO_CACHE_TIME = 0x08,
+
+ /** If we are using the epoll backend, this flag says that it is
+ safe to use Libevent's internal change-list code to batch up
+ adds and deletes in order to try to do as few syscalls as
+ possible. Setting this flag can make your code run faster, but
+ it may trigger a Linux bug: it is not safe to use this flag
+ if you have any fds cloned by dup() or its variants. Doing so
+ will produce strange and hard-to-diagnose bugs.
+
+ This flag can also be activated by setting the
+ EVENT_EPOLL_USE_CHANGELIST environment variable.
+
+ This flag has no effect if you wind up using a backend other than
+ epoll.
+ */
+ EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST = 0x10,
+
+ /** Ordinarily, Libevent implements its time and timeout code using
+ the fastest monotonic timer that we have. If this flag is set,
+ however, we use less efficient more precise timer, assuming one is
+ present.
+ */
+ EVENT_BASE_FLAG_PRECISE_TIMER = 0x20
+};
+
+/**
+ Return a bitmask of the features implemented by an event base. This
+ will be a bitwise OR of one or more of the values of
+ event_method_feature
+
+ @see event_method_feature
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_get_features(const struct event_base *base);
+
+/**
+ Enters a required event method feature that the application demands.
+
+ Note that not every feature or combination of features is supported
+ on every platform. Code that requests features should be prepared
+ to handle the case where event_base_new_with_config() returns NULL, as in:
+ <pre>
+ event_config_require_features(cfg, EV_FEATURE_ET);
+ base = event_base_new_with_config(cfg);
+ if (base == NULL) {
+ // We can't get edge-triggered behavior here.
+ event_config_require_features(cfg, 0);
+ base = event_base_new_with_config(cfg);
+ }
+ </pre>
+
+ @param cfg the event configuration object
+ @param feature a bitfield of one or more event_method_feature values.
+ Replaces values from previous calls to this function.
+ @return 0 on success, -1 on failure.
+ @see event_method_feature, event_base_new_with_config()
+*/
+EVENT2_EXPORT_SYMBOL
+int event_config_require_features(struct event_config *cfg, int feature);
+
+/**
+ * Sets one or more flags to configure what parts of the eventual event_base
+ * will be initialized, and how they'll work.
+ *
+ * @see event_base_config_flags, event_base_new_with_config()
+ **/
+EVENT2_EXPORT_SYMBOL
+int event_config_set_flag(struct event_config *cfg, int flag);
+
+/**
+ * Records a hint for the number of CPUs in the system. This is used for
+ * tuning thread pools, etc, for optimal performance. In Libevent 2.0,
+ * it is only on Windows, and only when IOCP is in use.
+ *
+ * @param cfg the event configuration object
+ * @param cpus the number of cpus
+ * @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_config_set_num_cpus_hint(struct event_config *cfg, int cpus);
+
+/**
+ * Record an interval and/or a number of callbacks after which the event base
+ * should check for new events. By default, the event base will run as many
+ * events are as activated at the higest activated priority before checking
+ * for new events. If you configure it by setting max_interval, it will check
+ * the time after each callback, and not allow more than max_interval to
+ * elapse before checking for new events. If you configure it by setting
+ * max_callbacks to a value >= 0, it will run no more than max_callbacks
+ * callbacks before checking for new events.
+ *
+ * This option can decrease the latency of high-priority events, and
+ * avoid priority inversions where multiple low-priority events keep us from
+ * polling for high-priority events, but at the expense of slightly decreasing
+ * the throughput. Use it with caution!
+ *
+ * @param cfg The event_base configuration object.
+ * @param max_interval An interval after which Libevent should stop running
+ * callbacks and check for more events, or NULL if there should be
+ * no such interval.
+ * @param max_callbacks A number of callbacks after which Libevent should
+ * stop running callbacks and check for more events, or -1 if there
+ * should be no such limit.
+ * @param min_priority A priority below which max_interval and max_callbacks
+ * should not be enforced. If this is set to 0, they are enforced
+ * for events of every priority; if it's set to 1, they're enforced
+ * for events of priority 1 and above, and so on.
+ * @return 0 on success, -1 on failure.
+ **/
+EVENT2_EXPORT_SYMBOL
+int event_config_set_max_dispatch_interval(struct event_config *cfg,
+ const struct timeval *max_interval, int max_callbacks,
+ int min_priority);
+
+/**
+ Initialize the event API.
+
+ Use event_base_new_with_config() to initialize a new event base, taking
+ the specified configuration under consideration. The configuration object
+ can currently be used to avoid certain event notification mechanisms.
+
+ @param cfg the event configuration object
+ @return an initialized event_base that can be used to registering events,
+ or NULL if no event base can be created with the requested event_config.
+ @see event_base_new(), event_base_free(), event_init(), event_assign()
+*/
+EVENT2_EXPORT_SYMBOL
+struct event_base *event_base_new_with_config(const struct event_config *);
+
+/**
+ Deallocate all memory associated with an event_base, and free the base.
+
+ Note that this function will not close any fds or free any memory passed
+ to event_new as the argument to callback.
+
+ If there are any pending finalizer callbacks, this function will invoke
+ them.
+
+ @param eb an event_base to be freed
+ */
+EVENT2_EXPORT_SYMBOL
+void event_base_free(struct event_base *);
+
+/**
+ As event_free, but do not run finalizers.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_base_free_nofinalize(struct event_base *);
+
+/** @name Log severities
+ */
+/**@{*/
+#define EVENT_LOG_DEBUG 0
+#define EVENT_LOG_MSG 1
+#define EVENT_LOG_WARN 2
+#define EVENT_LOG_ERR 3
+/**@}*/
+
+/* Obsolete names: these are deprecated, but older programs might use them.
+ * They violate the reserved-identifier namespace. */
+#define _EVENT_LOG_DEBUG EVENT_LOG_DEBUG
+#define _EVENT_LOG_MSG EVENT_LOG_MSG
+#define _EVENT_LOG_WARN EVENT_LOG_WARN
+#define _EVENT_LOG_ERR EVENT_LOG_ERR
+
+/**
+ A callback function used to intercept Libevent's log messages.
+
+ @see event_set_log_callback
+ */
+typedef void (*event_log_cb)(int severity, const char *msg);
+/**
+ Redirect Libevent's log messages.
+
+ @param cb a function taking two arguments: an integer severity between
+ EVENT_LOG_DEBUG and EVENT_LOG_ERR, and a string. If cb is NULL,
+ then the default log is used.
+
+ NOTE: The function you provide *must not* call any other libevent
+ functionality. Doing so can produce undefined behavior.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_set_log_callback(event_log_cb cb);
+
+/**
+ A function to be called if Libevent encounters a fatal internal error.
+
+ @see event_set_fatal_callback
+ */
+typedef void (*event_fatal_cb)(int err);
+
+/**
+ Override Libevent's behavior in the event of a fatal internal error.
+
+ By default, Libevent will call exit(1) if a programming error makes it
+ impossible to continue correct operation. This function allows you to supply
+ another callback instead. Note that if the function is ever invoked,
+ something is wrong with your program, or with Libevent: any subsequent calls
+ to Libevent may result in undefined behavior.
+
+ Libevent will (almost) always log an EVENT_LOG_ERR message before calling
+ this function; look at the last log message to see why Libevent has died.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_set_fatal_callback(event_fatal_cb cb);
+
+#define EVENT_DBG_ALL 0xffffffffu
+#define EVENT_DBG_NONE 0
+
+/**
+ Turn on debugging logs and have them sent to the default log handler.
+
+ This is a global setting; if you are going to call it, you must call this
+ before any calls that create an event-base. You must call it before any
+ multithreaded use of Libevent.
+
+ Debug logs are verbose.
+
+ @param which Controls which debug messages are turned on. This option is
+ unused for now; for forward compatibility, you must pass in the constant
+ "EVENT_DBG_ALL" to turn debugging logs on, or "EVENT_DBG_NONE" to turn
+ debugging logs off.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_enable_debug_logging(ev_uint32_t which);
+
+/**
+ Associate a different event base with an event.
+
+ The event to be associated must not be currently active or pending.
+
+ @param eb the event base
+ @param ev the event
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_set(struct event_base *, struct event *);
+
+/** @name Loop flags
+
+ These flags control the behavior of event_base_loop().
+ */
+/**@{*/
+/** Block until we have an active event, then exit once all active events
+ * have had their callbacks run. */
+#define EVLOOP_ONCE 0x01
+/** Do not block: see which events are ready now, run the callbacks
+ * of the highest-priority ones, then exit. */
+#define EVLOOP_NONBLOCK 0x02
+/** Do not exit the loop because we have no pending events. Instead, keep
+ * running until event_base_loopexit() or event_base_loopbreak() makes us
+ * stop.
+ */
+#define EVLOOP_NO_EXIT_ON_EMPTY 0x04
+/**@}*/
+
+/**
+ Wait for events to become active, and run their callbacks.
+
+ This is a more flexible version of event_base_dispatch().
+
+ By default, this loop will run the event base until either there are no more
+ pending or active events, or until something calls event_base_loopbreak() or
+ event_base_loopexit(). You can override this behavior with the 'flags'
+ argument.
+
+ @param eb the event_base structure returned by event_base_new() or
+ event_base_new_with_config()
+ @param flags any combination of EVLOOP_ONCE | EVLOOP_NONBLOCK
+ @return 0 if successful, -1 if an error occurred, or 1 if we exited because
+ no events were pending or active.
+ @see event_base_loopexit(), event_base_dispatch(), EVLOOP_ONCE,
+ EVLOOP_NONBLOCK
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_loop(struct event_base *, int);
+
+/**
+ Exit the event loop after the specified time
+
+ The next event_base_loop() iteration after the given timer expires will
+ complete normally (handling all queued events) then exit without
+ blocking for events again.
+
+ Subsequent invocations of event_base_loop() will proceed normally.
+
+ @param eb the event_base structure returned by event_init()
+ @param tv the amount of time after which the loop should terminate,
+ or NULL to exit after running all currently active events.
+ @return 0 if successful, or -1 if an error occurred
+ @see event_base_loopbreak()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_loopexit(struct event_base *, const struct timeval *);
+
+/**
+ Abort the active event_base_loop() immediately.
+
+ event_base_loop() will abort the loop after the next event is completed;
+ event_base_loopbreak() is typically invoked from this event's callback.
+ This behavior is analogous to the "break;" statement.
+
+ Subsequent invocations of event_base_loop() will proceed normally.
+
+ @param eb the event_base structure returned by event_init()
+ @return 0 if successful, or -1 if an error occurred
+ @see event_base_loopexit()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_loopbreak(struct event_base *);
+
+/**
+ Tell the active event_base_loop() to scan for new events immediately.
+
+ Calling this function makes the currently active event_base_loop()
+ start the loop over again (scanning for new events) after the current
+ event callback finishes. If the event loop is not running, this
+ function has no effect.
+
+ event_base_loopbreak() is typically invoked from this event's callback.
+ This behavior is analogous to the "continue;" statement.
+
+ Subsequent invocations of event loop will proceed normally.
+
+ @param eb the event_base structure returned by event_init()
+ @return 0 if successful, or -1 if an error occurred
+ @see event_base_loopbreak()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_loopcontinue(struct event_base *);
+
+/**
+ Checks if the event loop was told to exit by event_base_loopexit().
+
+ This function will return true for an event_base at every point after
+ event_loopexit() is called, until the event loop is next entered.
+
+ @param eb the event_base structure returned by event_init()
+ @return true if event_base_loopexit() was called on this event base,
+ or 0 otherwise
+ @see event_base_loopexit()
+ @see event_base_got_break()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_got_exit(struct event_base *);
+
+/**
+ Checks if the event loop was told to abort immediately by event_base_loopbreak().
+
+ This function will return true for an event_base at every point after
+ event_base_loopbreak() is called, until the event loop is next entered.
+
+ @param eb the event_base structure returned by event_init()
+ @return true if event_base_loopbreak() was called on this event base,
+ or 0 otherwise
+ @see event_base_loopbreak()
+ @see event_base_got_exit()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_got_break(struct event_base *);
+
+/**
+ * @name event flags
+ *
+ * Flags to pass to event_new(), event_assign(), event_pending(), and
+ * anything else with an argument of the form "short events"
+ */
+/**@{*/
+/** Indicates that a timeout has occurred. It's not necessary to pass
+ * this flag to event_for new()/event_assign() to get a timeout. */
+#define EV_TIMEOUT 0x01
+/** Wait for a socket or FD to become readable */
+#define EV_READ 0x02
+/** Wait for a socket or FD to become writeable */
+#define EV_WRITE 0x04
+/** Wait for a POSIX signal to be raised*/
+#define EV_SIGNAL 0x08
+/**
+ * Persistent event: won't get removed automatically when activated.
+ *
+ * When a persistent event with a timeout becomes activated, its timeout
+ * is reset to 0.
+ */
+#define EV_PERSIST 0x10
+/** Select edge-triggered behavior, if supported by the backend. */
+#define EV_ET 0x20
+/**
+ * If this option is provided, then event_del() will not block in one thread
+ * while waiting for the event callback to complete in another thread.
+ *
+ * To use this option safely, you may need to use event_finalize() or
+ * event_free_finalize() in order to safely tear down an event in a
+ * multithreaded application. See those functions for more information.
+ *
+ * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ * BECOMES STABLE.
+ **/
+#define EV_FINALIZE 0x40
+/**
+ * Detects connection close events. You can use this to detect when a
+ * connection has been closed, without having to read all the pending data
+ * from a connection.
+ *
+ * Not all backends support EV_CLOSED. To detect or require it, use the
+ * feature flag EV_FEATURE_EARLY_CLOSE.
+ **/
+#define EV_CLOSED 0x80
+/**@}*/
+
+/**
+ @name evtimer_* macros
+
+ Aliases for working with one-shot timer events */
+/**@{*/
+#define evtimer_assign(ev, b, cb, arg) \
+ event_assign((ev), (b), -1, 0, (cb), (arg))
+#define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg))
+#define evtimer_add(ev, tv) event_add((ev), (tv))
+#define evtimer_del(ev) event_del(ev)
+#define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
+#define evtimer_initialized(ev) event_initialized(ev)
+/**@}*/
+
+/**
+ @name evsignal_* macros
+
+ Aliases for working with signal events
+ */
+/**@{*/
+#define evsignal_add(ev, tv) event_add((ev), (tv))
+#define evsignal_assign(ev, b, x, cb, arg) \
+ event_assign((ev), (b), (x), EV_SIGNAL|EV_PERSIST, cb, (arg))
+#define evsignal_new(b, x, cb, arg) \
+ event_new((b), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
+#define evsignal_del(ev) event_del(ev)
+#define evsignal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv))
+#define evsignal_initialized(ev) event_initialized(ev)
+/**@}*/
+
+/**
+ A callback function for an event.
+
+ It receives three arguments:
+
+ @param fd An fd or signal
+ @param events One or more EV_* flags
+ @param arg A user-supplied argument.
+
+ @see event_new()
+ */
+typedef void (*event_callback_fn)(evutil_socket_t, short, void *);
+
+/**
+ Return a value used to specify that the event itself must be used as the callback argument.
+
+ The function event_new() takes a callback argument which is passed
+ to the event's callback function. To specify that the argument to be
+ passed to the callback function is the event that event_new() returns,
+ pass in the return value of event_self_cbarg() as the callback argument
+ for event_new().
+
+ For example:
+ <pre>
+ struct event *ev = event_new(base, sock, events, callback, %event_self_cbarg());
+ </pre>
+
+ For consistency with event_new(), it is possible to pass the return value
+ of this function as the callback argument for event_assign() &ndash; this
+ achieves the same result as passing the event in directly.
+
+ @return a value to be passed as the callback argument to event_new() or
+ event_assign().
+ @see event_new(), event_assign()
+ */
+EVENT2_EXPORT_SYMBOL
+void *event_self_cbarg(void);
+
+/**
+ Allocate and asssign a new event structure, ready to be added.
+
+ The function event_new() returns a new event that can be used in
+ future calls to event_add() and event_del(). The fd and events
+ arguments determine which conditions will trigger the event; the
+ callback and callback_arg arguments tell Libevent what to do when the
+ event becomes active.
+
+ If events contains one of EV_READ, EV_WRITE, or EV_READ|EV_WRITE, then
+ fd is a file descriptor or socket that should get monitored for
+ readiness to read, readiness to write, or readiness for either operation
+ (respectively). If events contains EV_SIGNAL, then fd is a signal
+ number to wait for. If events contains none of those flags, then the
+ event can be triggered only by a timeout or by manual activation with
+ event_active(): In this case, fd must be -1.
+
+ The EV_PERSIST flag can also be passed in the events argument: it makes
+ event_add() persistent until event_del() is called.
+
+ The EV_ET flag is compatible with EV_READ and EV_WRITE, and supported
+ only by certain backends. It tells Libevent to use edge-triggered
+ events.
+
+ The EV_TIMEOUT flag has no effect here.
+
+ It is okay to have multiple events all listening on the same fds; but
+ they must either all be edge-triggered, or all not be edge triggerd.
+
+ When the event becomes active, the event loop will run the provided
+ callbuck function, with three arguments. The first will be the provided
+ fd value. The second will be a bitfield of the events that triggered:
+ EV_READ, EV_WRITE, or EV_SIGNAL. Here the EV_TIMEOUT flag indicates
+ that a timeout occurred, and EV_ET indicates that an edge-triggered
+ event occurred. The third event will be the callback_arg pointer that
+ you provide.
+
+ @param base the event base to which the event should be attached.
+ @param fd the file descriptor or signal to be monitored, or -1.
+ @param events desired events to monitor: bitfield of EV_READ, EV_WRITE,
+ EV_SIGNAL, EV_PERSIST, EV_ET.
+ @param callback callback function to be invoked when the event occurs
+ @param callback_arg an argument to be passed to the callback function
+
+ @return a newly allocated struct event that must later be freed with
+ event_free().
+ @see event_free(), event_add(), event_del(), event_assign()
+ */
+EVENT2_EXPORT_SYMBOL
+struct event *event_new(struct event_base *, evutil_socket_t, short, event_callback_fn, void *);
+
+
+/**
+ Prepare a new, already-allocated event structure to be added.
+
+ The function event_assign() prepares the event structure ev to be used
+ in future calls to event_add() and event_del(). Unlike event_new(), it
+ doesn't allocate memory itself: it requires that you have already
+ allocated a struct event, probably on the heap. Doing this will
+ typically make your code depend on the size of the event structure, and
+ thereby create incompatibility with future versions of Libevent.
+
+ The easiest way to avoid this problem is just to use event_new() and
+ event_free() instead.
+
+ A slightly harder way to future-proof your code is to use
+ event_get_struct_event_size() to determine the required size of an event
+ at runtime.
+
+ Note that it is NOT safe to call this function on an event that is
+ active or pending. Doing so WILL corrupt internal data structures in
+ Libevent, and lead to strange, hard-to-diagnose bugs. You _can_ use
+ event_assign to change an existing event, but only if it is not active
+ or pending!
+
+ The arguments for this function, and the behavior of the events that it
+ makes, are as for event_new().
+
+ @param ev an event struct to be modified
+ @param base the event base to which ev should be attached.
+ @param fd the file descriptor to be monitored
+ @param events desired events to monitor; can be EV_READ and/or EV_WRITE
+ @param callback callback function to be invoked when the event occurs
+ @param callback_arg an argument to be passed to the callback function
+
+ @return 0 if success, or -1 on invalid arguments.
+
+ @see event_new(), event_add(), event_del(), event_base_once(),
+ event_get_struct_event_size()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_assign(struct event *, struct event_base *, evutil_socket_t, short, event_callback_fn, void *);
+
+/**
+ Deallocate a struct event * returned by event_new().
+
+ If the event is pending or active, first make it non-pending and
+ non-active.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_free(struct event *);
+
+/**
+ * Callback type for event_finalize and event_free_finalize().
+ *
+ * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ * BECOMES STABLE.
+ *
+ **/
+typedef void (*event_finalize_callback_fn)(struct event *, void *);
+/**
+ @name Finalization functions
+
+ These functions are used to safely tear down an event in a multithreaded
+ application. If you construct your events with EV_FINALIZE to avoid
+ deadlocks, you will need a way to remove an event in the certainty that
+ it will definitely not be running its callback when you deallocate it
+ and its callback argument.
+
+ To do this, call one of event_finalize() or event_free_finalize with
+ 0 for its first argument, the event to tear down as its second argument,
+ and a callback function as its third argument. The callback will be
+ invoked as part of the event loop, with the event's priority.
+
+ After you call a finalizer function, event_add() and event_active() will
+ no longer work on the event, and event_del() will produce a no-op. You
+ must not try to change the event's fields with event_assign() or
+ event_set() while the finalize callback is in progress. Once the
+ callback has been invoked, you should treat the event structure as
+ containing uninitialized memory.
+
+ The event_free_finalize() function frees the event after it's finalized;
+ event_finalize() does not.
+
+ A finalizer callback must not make events pending or active. It must not
+ add events, activate events, or attempt to "resucitate" the event being
+ finalized in any way.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
+
+ @return 0 on succes, -1 on failure.
+ */
+/**@{*/
+EVENT2_EXPORT_SYMBOL
+int event_finalize(unsigned, struct event *, event_finalize_callback_fn);
+EVENT2_EXPORT_SYMBOL
+int event_free_finalize(unsigned, struct event *, event_finalize_callback_fn);
+/**@}*/
+
+/**
+ Schedule a one-time event
+
+ The function event_base_once() is similar to event_new(). However, it
+ schedules a callback to be called exactly once, and does not require the
+ caller to prepare an event structure.
+
+ Note that in Libevent 2.0 and earlier, if the event is never triggered, the
+ internal memory used to hold it will never be freed. In Libevent 2.1,
+ the internal memory will get freed by event_base_free() if the event
+ is never triggered. The 'arg' value, however, will not get freed in either
+ case--you'll need to free that on your own if you want it to go away.
+
+ @param base an event_base
+ @param fd a file descriptor to monitor, or -1 for no fd.
+ @param events event(s) to monitor; can be any of EV_READ |
+ EV_WRITE, or EV_TIMEOUT
+ @param callback callback function to be invoked when the event occurs
+ @param arg an argument to be passed to the callback function
+ @param timeout the maximum amount of time to wait for the event. NULL
+ makes an EV_READ/EV_WRITE event make forever; NULL makes an
+ EV_TIMEOUT event succees immediately.
+ @return 0 if successful, or -1 if an error occurred
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_once(struct event_base *, evutil_socket_t, short, event_callback_fn, void *, const struct timeval *);
+
+/**
+ Add an event to the set of pending events.
+
+ The function event_add() schedules the execution of the event 'ev' when the
+ condition specified by event_assign() or event_new() occurs, or when the time
+ specified in timeout has elapesed. If atimeout is NULL, no timeout
+ occurs and the function will only be
+ called if a matching event occurs. The event in the
+ ev argument must be already initialized by event_assign() or event_new()
+ and may not be used
+ in calls to event_assign() until it is no longer pending.
+
+ If the event in the ev argument already has a scheduled timeout, calling
+ event_add() replaces the old timeout with the new one if tv is non-NULL.
+
+ @param ev an event struct initialized via event_assign() or event_new()
+ @param timeout the maximum amount of time to wait for the event, or NULL
+ to wait forever
+ @return 0 if successful, or -1 if an error occurred
+ @see event_del(), event_assign(), event_new()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_add(struct event *ev, const struct timeval *timeout);
+
+/**
+ Remove a timer from a pending event without removing the event itself.
+
+ If the event has a scheduled timeout, this function unschedules it but
+ leaves the event otherwise pending.
+
+ @param ev an event struct initialized via event_assign() or event_new()
+ @return 0 on success, or -1 if an error occurrect.
+*/
+EVENT2_EXPORT_SYMBOL
+int event_remove_timer(struct event *ev);
+
+/**
+ Remove an event from the set of monitored events.
+
+ The function event_del() will cancel the event in the argument ev. If the
+ event has already executed or has never been added the call will have no
+ effect.
+
+ @param ev an event struct to be removed from the working set
+ @return 0 if successful, or -1 if an error occurred
+ @see event_add()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_del(struct event *);
+
+/**
+ As event_del(), but never blocks while the event's callback is running
+ in another thread, even if the event was constructed without the
+ EV_FINALIZE flag.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_del_noblock(struct event *ev);
+/**
+ As event_del(), but always blocks while the event's callback is running
+ in another thread, even if the event was constructed with the
+ EV_FINALIZE flag.
+
+ THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES
+ BECOMES STABLE.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_del_block(struct event *ev);
+
+/**
+ Make an event active.
+
+ You can use this function on a pending or a non-pending event to make it
+ active, so that its callback will be run by event_base_dispatch() or
+ event_base_loop().
+
+ One common use in multithreaded programs is to wake the thread running
+ event_base_loop() from another thread.
+
+ @param ev an event to make active.
+ @param res a set of flags to pass to the event's callback.
+ @param ncalls an obsolete argument: this is ignored.
+ **/
+EVENT2_EXPORT_SYMBOL
+void event_active(struct event *ev, int res, short ncalls);
+
+/**
+ Checks if a specific event is pending or scheduled.
+
+ @param ev an event struct previously passed to event_add()
+ @param events the requested event type; any of EV_TIMEOUT|EV_READ|
+ EV_WRITE|EV_SIGNAL
+ @param tv if this field is not NULL, and the event has a timeout,
+ this field is set to hold the time at which the timeout will
+ expire.
+
+ @return true if the event is pending on any of the events in 'what', (that
+ is to say, it has been added), or 0 if the event is not added.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_pending(const struct event *ev, short events, struct timeval *tv);
+
+/**
+ If called from within the callback for an event, returns that event.
+
+ The behavior of this function is not defined when called from outside the
+ callback function for an event.
+ */
+EVENT2_EXPORT_SYMBOL
+struct event *event_base_get_running_event(struct event_base *base);
+
+/**
+ Test if an event structure might be initialized.
+
+ The event_initialized() function can be used to check if an event has been
+ initialized.
+
+ Warning: This function is only useful for distinguishing a a zeroed-out
+ piece of memory from an initialized event, it can easily be confused by
+ uninitialized memory. Thus, it should ONLY be used to distinguish an
+ initialized event from zero.
+
+ @param ev an event structure to be tested
+ @return 1 if the structure might be initialized, or 0 if it has not been
+ initialized
+ */
+EVENT2_EXPORT_SYMBOL
+int event_initialized(const struct event *ev);
+
+/**
+ Get the signal number assigned to a signal event
+*/
+#define event_get_signal(ev) ((int)event_get_fd(ev))
+
+/**
+ Get the socket or signal assigned to an event, or -1 if the event has
+ no socket.
+*/
+EVENT2_EXPORT_SYMBOL
+evutil_socket_t event_get_fd(const struct event *ev);
+
+/**
+ Get the event_base associated with an event.
+*/
+EVENT2_EXPORT_SYMBOL
+struct event_base *event_get_base(const struct event *ev);
+
+/**
+ Return the events (EV_READ, EV_WRITE, etc) assigned to an event.
+*/
+EVENT2_EXPORT_SYMBOL
+short event_get_events(const struct event *ev);
+
+/**
+ Return the callback assigned to an event.
+*/
+EVENT2_EXPORT_SYMBOL
+event_callback_fn event_get_callback(const struct event *ev);
+
+/**
+ Return the callback argument assigned to an event.
+*/
+EVENT2_EXPORT_SYMBOL
+void *event_get_callback_arg(const struct event *ev);
+
+/**
+ Return the priority of an event.
+ @see event_priority_init(), event_get_priority()
+*/
+EVENT2_EXPORT_SYMBOL
+int event_get_priority(const struct event *ev);
+
+/**
+ Extract _all_ of arguments given to construct a given event. The
+ event_base is copied into *base_out, the fd is copied into *fd_out, and so
+ on.
+
+ If any of the "_out" arguments is NULL, it will be ignored.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_get_assignment(const struct event *event,
+ struct event_base **base_out, evutil_socket_t *fd_out, short *events_out,
+ event_callback_fn *callback_out, void **arg_out);
+
+/**
+ Return the size of struct event that the Libevent library was compiled
+ with.
+
+ This will be NO GREATER than sizeof(struct event) if you're running with
+ the same version of Libevent that your application was built with, but
+ otherwise might not.
+
+ Note that it might be SMALLER than sizeof(struct event) if some future
+ version of Libevent adds extra padding to the end of struct event.
+ We might do this to help ensure ABI-compatibility between different
+ versions of Libevent.
+ */
+EVENT2_EXPORT_SYMBOL
+size_t event_get_struct_event_size(void);
+
+/**
+ Get the Libevent version.
+
+ Note that this will give you the version of the library that you're
+ currently linked against, not the version of the headers that you've
+ compiled against.
+
+ @return a string containing the version number of Libevent
+*/
+EVENT2_EXPORT_SYMBOL
+const char *event_get_version(void);
+
+/**
+ Return a numeric representation of Libevent's version.
+
+ Note that this will give you the version of the library that you're
+ currently linked against, not the version of the headers you've used to
+ compile.
+
+ The format uses one byte each for the major, minor, and patchlevel parts of
+ the version number. The low-order byte is unused. For example, version
+ 2.0.1-alpha has a numeric representation of 0x02000100
+*/
+EVENT2_EXPORT_SYMBOL
+ev_uint32_t event_get_version_number(void);
+
+/** As event_get_version, but gives the version of Libevent's headers. */
+#define LIBEVENT_VERSION EVENT__VERSION
+/** As event_get_version_number, but gives the version number of Libevent's
+ * headers. */
+#define LIBEVENT_VERSION_NUMBER EVENT__NUMERIC_VERSION
+
+/** Largest number of priorities that Libevent can support. */
+#define EVENT_MAX_PRIORITIES 256
+/**
+ Set the number of different event priorities
+
+ By default Libevent schedules all active events with the same priority.
+ However, some time it is desirable to process some events with a higher
+ priority than others. For that reason, Libevent supports strict priority
+ queues. Active events with a lower priority are always processed before
+ events with a higher priority.
+
+ The number of different priorities can be set initially with the
+ event_base_priority_init() function. This function should be called
+ before the first call to event_base_dispatch(). The
+ event_priority_set() function can be used to assign a priority to an
+ event. By default, Libevent assigns the middle priority to all events
+ unless their priority is explicitly set.
+
+ Note that urgent-priority events can starve less-urgent events: after
+ running all urgent-priority callbacks, Libevent checks for more urgent
+ events again, before running less-urgent events. Less-urgent events
+ will not have their callbacks run until there are no events more urgent
+ than them that want to be active.
+
+ @param eb the event_base structure returned by event_base_new()
+ @param npriorities the maximum number of priorities
+ @return 0 if successful, or -1 if an error occurred
+ @see event_priority_set()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_priority_init(struct event_base *, int);
+
+/**
+ Get the number of different event priorities.
+
+ @param eb the event_base structure returned by event_base_new()
+ @return Number of different event priorities
+ @see event_base_priority_init()
+*/
+EVENT2_EXPORT_SYMBOL
+int event_base_get_npriorities(struct event_base *eb);
+
+/**
+ Assign a priority to an event.
+
+ @param ev an event struct
+ @param priority the new priority to be assigned
+ @return 0 if successful, or -1 if an error occurred
+ @see event_priority_init(), event_get_priority()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_priority_set(struct event *, int);
+
+/**
+ Prepare an event_base to use a large number of timeouts with the same
+ duration.
+
+ Libevent's default scheduling algorithm is optimized for having a large
+ number of timeouts with their durations more or less randomly
+ distributed. But if you have a large number of timeouts that all have
+ the same duration (for example, if you have a large number of
+ connections that all have a 10-second timeout), then you can improve
+ Libevent's performance by telling Libevent about it.
+
+ To do this, call this function with the common duration. It will return a
+ pointer to a different, opaque timeout value. (Don't depend on its actual
+ contents!) When you use this timeout value in event_add(), Libevent will
+ schedule the event more efficiently.
+
+ (This optimization probably will not be worthwhile until you have thousands
+ or tens of thousands of events with the same timeout.)
+ */
+EVENT2_EXPORT_SYMBOL
+const struct timeval *event_base_init_common_timeout(struct event_base *base,
+ const struct timeval *duration);
+
+#if !defined(EVENT__DISABLE_MM_REPLACEMENT) || defined(EVENT_IN_DOXYGEN_)
+/**
+ Override the functions that Libevent uses for memory management.
+
+ Usually, Libevent uses the standard libc functions malloc, realloc, and
+ free to allocate memory. Passing replacements for those functions to
+ event_set_mem_functions() overrides this behavior.
+
+ Note that all memory returned from Libevent will be allocated by the
+ replacement functions rather than by malloc() and realloc(). Thus, if you
+ have replaced those functions, it will not be appropriate to free() memory
+ that you get from Libevent. Instead, you must use the free_fn replacement
+ that you provided.
+
+ Note also that if you are going to call this function, you should do so
+ before any call to any Libevent function that does allocation.
+ Otherwise, those funtions will allocate their memory using malloc(), but
+ then later free it using your provided free_fn.
+
+ @param malloc_fn A replacement for malloc.
+ @param realloc_fn A replacement for realloc
+ @param free_fn A replacement for free.
+ **/
+EVENT2_EXPORT_SYMBOL
+void event_set_mem_functions(
+ void *(*malloc_fn)(size_t sz),
+ void *(*realloc_fn)(void *ptr, size_t sz),
+ void (*free_fn)(void *ptr));
+/** This definition is present if Libevent was built with support for
+ event_set_mem_functions() */
+#define EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
+#endif
+
+/**
+ Writes a human-readable description of all inserted and/or active
+ events to a provided stdio stream.
+
+ This is intended for debugging; its format is not guaranteed to be the same
+ between libevent versions.
+
+ @param base An event_base on which to scan the events.
+ @param output A stdio file to write on.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_base_dump_events(struct event_base *, FILE *);
+
+
+/**
+ Activates all pending events for the given fd and event mask.
+
+ This function activates pending events only. Events which have not been
+ added will not become active.
+
+ @param base the event_base on which to activate the events.
+ @param fd An fd to active events on.
+ @param events One or more of EV_{READ,WRITE}.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events);
+
+/**
+ Activates all pending signals with a given signal number
+
+ This function activates pending events only. Events which have not been
+ added will not become active.
+
+ @param base the event_base on which to activate the events.
+ @param fd The signal to active events on.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_base_active_by_signal(struct event_base *base, int sig);
+
+/**
+ * Callback for iterating events in an event base via event_base_foreach_event
+ */
+typedef int (*event_base_foreach_event_cb)(const struct event_base *, const struct event *, void *);
+
+/**
+ Iterate over all added or active events events in an event loop, and invoke
+ a given callback on each one.
+
+ The callback must not call any function that modifies the event base, that
+ modifies any event in the event base, or that adds or removes any event to
+ the event base. Doing so is unsupported and will lead to undefined
+ behavior -- likely, to crashes.
+
+ event_base_foreach_event() holds a lock on the event_base() for the whole
+ time it's running: slow callbacks are not advisable.
+
+ Note that Libevent adds some events of its own to make pieces of its
+ functionality work. You must not assume that the only events you'll
+ encounter will be the ones you added yourself.
+
+ The callback function must return 0 to continue iteration, or some other
+ integer to stop iterating.
+
+ @param base An event_base on which to scan the events.
+ @param fn A callback function to receive the events.
+ @param arg An argument passed to the callback function.
+ @return 0 if we iterated over every event, or the value returned by the
+ callback function if the loop exited early.
+*/
+EVENT2_EXPORT_SYMBOL
+int event_base_foreach_event(struct event_base *base, event_base_foreach_event_cb fn, void *arg);
+
+
+/** Sets 'tv' to the current time (as returned by gettimeofday()),
+ looking at the cached value in 'base' if possible, and calling
+ gettimeofday() or clock_gettime() as appropriate if there is no
+ cached time.
+
+ Generally, this value will only be cached while actually
+ processing event callbacks, and may be very inaccuate if your
+ callbacks take a long time to execute.
+
+ Returns 0 on success, negative on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_gettimeofday_cached(struct event_base *base,
+ struct timeval *tv);
+
+/** Update cached_tv in the 'base' to the current time
+ *
+ * You can use this function is useful for selectively increasing
+ * the accuracy of the cached time value in 'base' during callbacks
+ * that take a long time to execute.
+ *
+ * This function has no effect if the base is currently not in its
+ * event loop, or if timeval caching is disabled via
+ * EVENT_BASE_FLAG_NO_CACHE_TIME.
+ *
+ * @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int event_base_update_cache_time(struct event_base *base);
+
+/** Release up all globally-allocated resources allocated by Libevent.
+
+ This function does not free developer-controlled resources like
+ event_bases, events, bufferevents, listeners, and so on. It only releases
+ resources like global locks that there is no other way to free.
+
+ It is not actually necessary to call this function before exit: every
+ resource that it frees would be released anyway on exit. It mainly exists
+ so that resource-leak debugging tools don't see Libevent as holding
+ resources at exit.
+
+ You should only call this function when no other Libevent functions will
+ be invoked -- e.g., when cleanly exiting a program.
+ */
+EVENT2_EXPORT_SYMBOL
+void libevent_global_shutdown(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/event_compat.h b/sntp/libevent/include/event2/event_compat.h
new file mode 100644
index 000000000000..5110175a1b91
--- /dev/null
+++ b/sntp/libevent/include/event2/event_compat.h
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_EVENT_COMPAT_H_INCLUDED_
+#define EVENT2_EVENT_COMPAT_H_INCLUDED_
+
+/** @file event2/event_compat.h
+
+ Potentially non-threadsafe versions of the functions in event.h: provided
+ only for backwards compatibility.
+
+ In the oldest versions of Libevent, event_base was not a first-class
+ structure. Instead, there was a single event base that every function
+ manipulated. Later, when separate event bases were added, the old functions
+ that didn't take an event_base argument needed to work by manipulating the
+ "current" event base. This could lead to thread-safety issues, and obscure,
+ hard-to-diagnose bugs.
+
+ @deprecated All functions in this file are by definition deprecated.
+ */
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/**
+ Initialize the event API.
+
+ The event API needs to be initialized with event_init() before it can be
+ used. Sets the global current base that gets used for events that have no
+ base associated with them.
+
+ @deprecated This function is deprecated because it replaces the "current"
+ event_base, and is totally unsafe for multithreaded use. The replacement
+ is event_base_new().
+
+ @see event_base_set(), event_base_new()
+ */
+EVENT2_EXPORT_SYMBOL
+struct event_base *event_init(void);
+
+/**
+ Loop to process events.
+
+ Like event_base_dispatch(), but uses the "current" base.
+
+ @deprecated This function is deprecated because it is easily confused by
+ multiple calls to event_init(), and because it is not safe for
+ multithreaded use. The replacement is event_base_dispatch().
+
+ @see event_base_dispatch(), event_init()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_dispatch(void);
+
+/**
+ Handle events.
+
+ This function behaves like event_base_loop(), but uses the "current" base
+
+ @deprecated This function is deprecated because it uses the event base from
+ the last call to event_init, and is therefore not safe for multithreaded
+ use. The replacement is event_base_loop().
+
+ @see event_base_loop(), event_init()
+*/
+EVENT2_EXPORT_SYMBOL
+int event_loop(int);
+
+
+/**
+ Exit the event loop after the specified time.
+
+ This function behaves like event_base_loopexit(), except that it uses the
+ "current" base.
+
+ @deprecated This function is deprecated because it uses the event base from
+ the last call to event_init, and is therefore not safe for multithreaded
+ use. The replacement is event_base_loopexit().
+
+ @see event_init, event_base_loopexit()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_loopexit(const struct timeval *);
+
+
+/**
+ Abort the active event_loop() immediately.
+
+ This function behaves like event_base_loopbreakt(), except that it uses the
+ "current" base.
+
+ @deprecated This function is deprecated because it uses the event base from
+ the last call to event_init, and is therefore not safe for multithreaded
+ use. The replacement is event_base_loopbreak().
+
+ @see event_base_loopbreak(), event_init()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_loopbreak(void);
+
+/**
+ Schedule a one-time event to occur.
+
+ @deprecated This function is obsolete, and has been replaced by
+ event_base_once(). Its use is deprecated because it relies on the
+ "current" base configured by event_init().
+
+ @see event_base_once()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_once(evutil_socket_t , short,
+ void (*)(evutil_socket_t, short, void *), void *, const struct timeval *);
+
+
+/**
+ Get the kernel event notification mechanism used by Libevent.
+
+ @deprecated This function is obsolete, and has been replaced by
+ event_base_get_method(). Its use is deprecated because it relies on the
+ "current" base configured by event_init().
+
+ @see event_base_get_method()
+ */
+EVENT2_EXPORT_SYMBOL
+const char *event_get_method(void);
+
+
+/**
+ Set the number of different event priorities.
+
+ @deprecated This function is deprecated because it is easily confused by
+ multiple calls to event_init(), and because it is not safe for
+ multithreaded use. The replacement is event_base_priority_init().
+
+ @see event_base_priority_init()
+ */
+EVENT2_EXPORT_SYMBOL
+int event_priority_init(int);
+
+/**
+ Prepare an event structure to be added.
+
+ @deprecated event_set() is not recommended for new code, because it requires
+ a subsequent call to event_base_set() to be safe under most circumstances.
+ Use event_assign() or event_new() instead.
+ */
+EVENT2_EXPORT_SYMBOL
+void event_set(struct event *, evutil_socket_t, short, void (*)(evutil_socket_t, short, void *), void *);
+
+#define evtimer_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
+#define evsignal_set(ev, x, cb, arg) \
+ event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
+
+
+/**
+ @name timeout_* macros
+
+ @deprecated These macros are deprecated because their naming is inconsistent
+ with the rest of Libevent. Use the evtimer_* macros instead.
+ @{
+ */
+#define timeout_add(ev, tv) event_add((ev), (tv))
+#define timeout_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
+#define timeout_del(ev) event_del(ev)
+#define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
+#define timeout_initialized(ev) event_initialized(ev)
+/**@}*/
+
+/**
+ @name signal_* macros
+
+ @deprecated These macros are deprecated because their naming is inconsistent
+ with the rest of Libevent. Use the evsignal_* macros instead.
+ @{
+ */
+#define signal_add(ev, tv) event_add((ev), (tv))
+#define signal_set(ev, x, cb, arg) \
+ event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
+#define signal_del(ev) event_del(ev)
+#define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv))
+#define signal_initialized(ev) event_initialized(ev)
+/**@}*/
+
+#ifndef EVENT_FD
+/* These macros are obsolete; use event_get_fd and event_get_signal instead. */
+#define EVENT_FD(ev) ((int)event_get_fd(ev))
+#define EVENT_SIGNAL(ev) event_get_signal(ev)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/event_struct.h b/sntp/libevent/include/event2/event_struct.h
new file mode 100644
index 000000000000..1c8b71b6b0df
--- /dev/null
+++ b/sntp/libevent/include/event2/event_struct.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_EVENT_STRUCT_H_INCLUDED_
+#define EVENT2_EVENT_STRUCT_H_INCLUDED_
+
+/** @file event2/event_struct.h
+
+ Structures used by event.h. Using these structures directly WILL harm
+ forward compatibility: be careful.
+
+ No field declared in this file should be used directly in user code. Except
+ for historical reasons, these fields would not be exposed at all.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/* For evkeyvalq */
+#include <event2/keyvalq_struct.h>
+
+#define EVLIST_TIMEOUT 0x01
+#define EVLIST_INSERTED 0x02
+#define EVLIST_SIGNAL 0x04
+#define EVLIST_ACTIVE 0x08
+#define EVLIST_INTERNAL 0x10
+#define EVLIST_ACTIVE_LATER 0x20
+#define EVLIST_FINALIZING 0x40
+#define EVLIST_INIT 0x80
+
+#define EVLIST_ALL 0xff
+
+/* Fix so that people don't have to run with <sys/queue.h> */
+#ifndef TAILQ_ENTRY
+#define EVENT_DEFINED_TQENTRY_
+#define TAILQ_ENTRY(type) \
+struct { \
+ struct type *tqe_next; /* next element */ \
+ struct type **tqe_prev; /* address of previous next element */ \
+}
+#endif /* !TAILQ_ENTRY */
+
+#ifndef TAILQ_HEAD
+#define EVENT_DEFINED_TQHEAD_
+#define TAILQ_HEAD(name, type) \
+struct name { \
+ struct type *tqh_first; \
+ struct type **tqh_last; \
+}
+#endif
+
+/* Fix so that people don't have to run with <sys/queue.h> */
+#ifndef LIST_ENTRY
+#define EVENT_DEFINED_LISTENTRY_
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+#endif /* !LIST_ENTRY */
+
+#ifndef LIST_HEAD
+#define EVENT_DEFINED_LISTHEAD_
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+ }
+#endif /* !LIST_HEAD */
+
+struct event;
+
+struct event_callback {
+ TAILQ_ENTRY(event_callback) evcb_active_next;
+ short evcb_flags;
+ ev_uint8_t evcb_pri; /* smaller numbers are higher priority */
+ ev_uint8_t evcb_closure;
+ /* allows us to adopt for different types of events */
+ union {
+ void (*evcb_callback)(evutil_socket_t, short, void *);
+ void (*evcb_selfcb)(struct event_callback *, void *);
+ void (*evcb_evfinalize)(struct event *, void *);
+ void (*evcb_cbfinalize)(struct event_callback *, void *);
+ } evcb_cb_union;
+ void *evcb_arg;
+};
+
+struct event_base;
+struct event {
+ struct event_callback ev_evcallback;
+
+ /* for managing timeouts */
+ union {
+ TAILQ_ENTRY(event) ev_next_with_common_timeout;
+ int min_heap_idx;
+ } ev_timeout_pos;
+ evutil_socket_t ev_fd;
+
+ struct event_base *ev_base;
+
+ union {
+ /* used for io events */
+ struct {
+ LIST_ENTRY (event) ev_io_next;
+ struct timeval ev_timeout;
+ } ev_io;
+
+ /* used by signal events */
+ struct {
+ LIST_ENTRY (event) ev_signal_next;
+ short ev_ncalls;
+ /* Allows deletes in callback */
+ short *ev_pncalls;
+ } ev_signal;
+ } ev_;
+
+ short ev_events;
+ short ev_res; /* result passed to event callback */
+ struct timeval ev_timeout;
+};
+
+TAILQ_HEAD (event_list, event);
+
+#ifdef EVENT_DEFINED_TQENTRY_
+#undef TAILQ_ENTRY
+#endif
+
+#ifdef EVENT_DEFINED_TQHEAD_
+#undef TAILQ_HEAD
+#endif
+
+LIST_HEAD (event_dlist, event);
+
+#ifdef EVENT_DEFINED_LISTENTRY_
+#undef LIST_ENTRY
+#endif
+
+#ifdef EVENT_DEFINED_LISTHEAD_
+#undef LIST_HEAD
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/http.h b/sntp/libevent/include/event2/http.h
new file mode 100644
index 000000000000..81f44b855231
--- /dev/null
+++ b/sntp/libevent/include/event2/http.h
@@ -0,0 +1,1140 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_HTTP_H_INCLUDED_
+#define EVENT2_HTTP_H_INCLUDED_
+
+/* For int types. */
+#include <event2/util.h>
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* In case we haven't included the right headers yet. */
+struct evbuffer;
+struct event_base;
+struct bufferevent;
+struct evhttp_connection;
+
+/** @file event2/http.h
+ *
+ * Basic support for HTTP serving.
+ *
+ * As Libevent is a library for dealing with event notification and most
+ * interesting applications are networked today, I have often found the
+ * need to write HTTP code. The following prototypes and definitions provide
+ * an application with a minimal interface for making HTTP requests and for
+ * creating a very simple HTTP server.
+ */
+
+/* Response codes */
+#define HTTP_OK 200 /**< request completed ok */
+#define HTTP_NOCONTENT 204 /**< request does not have content */
+#define HTTP_MOVEPERM 301 /**< the uri moved permanently */
+#define HTTP_MOVETEMP 302 /**< the uri moved temporarily */
+#define HTTP_NOTMODIFIED 304 /**< page was not modified from last */
+#define HTTP_BADREQUEST 400 /**< invalid http request was made */
+#define HTTP_NOTFOUND 404 /**< could not find content for uri */
+#define HTTP_BADMETHOD 405 /**< method not allowed for this uri */
+#define HTTP_ENTITYTOOLARGE 413 /**< */
+#define HTTP_EXPECTATIONFAILED 417 /**< we can't handle this expectation */
+#define HTTP_INTERNAL 500 /**< internal error */
+#define HTTP_NOTIMPLEMENTED 501 /**< not implemented */
+#define HTTP_SERVUNAVAIL 503 /**< the server is not available */
+
+struct evhttp;
+struct evhttp_request;
+struct evkeyvalq;
+struct evhttp_bound_socket;
+struct evconnlistener;
+struct evdns_base;
+
+/**
+ * Create a new HTTP server.
+ *
+ * @param base (optional) the event base to receive the HTTP events
+ * @return a pointer to a newly initialized evhttp server structure
+ * @see evhttp_free()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp *evhttp_new(struct event_base *base);
+
+/**
+ * Binds an HTTP server on the specified address and port.
+ *
+ * Can be called multiple times to bind the same http server
+ * to multiple different ports.
+ *
+ * @param http a pointer to an evhttp object
+ * @param address a string containing the IP address to listen(2) on
+ * @param port the port number to listen on
+ * @return 0 on success, -1 on failure.
+ * @see evhttp_accept_socket()
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_bind_socket(struct evhttp *http, const char *address, ev_uint16_t port);
+
+/**
+ * Like evhttp_bind_socket(), but returns a handle for referencing the socket.
+ *
+ * The returned pointer is not valid after \a http is freed.
+ *
+ * @param http a pointer to an evhttp object
+ * @param address a string containing the IP address to listen(2) on
+ * @param port the port number to listen on
+ * @return Handle for the socket on success, NULL on failure.
+ * @see evhttp_bind_socket(), evhttp_del_accept_socket()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_bound_socket *evhttp_bind_socket_with_handle(struct evhttp *http, const char *address, ev_uint16_t port);
+
+/**
+ * Makes an HTTP server accept connections on the specified socket.
+ *
+ * This may be useful to create a socket and then fork multiple instances
+ * of an http server, or when a socket has been communicated via file
+ * descriptor passing in situations where an http servers does not have
+ * permissions to bind to a low-numbered port.
+ *
+ * Can be called multiple times to have the http server listen to
+ * multiple different sockets.
+ *
+ * @param http a pointer to an evhttp object
+ * @param fd a socket fd that is ready for accepting connections
+ * @return 0 on success, -1 on failure.
+ * @see evhttp_bind_socket()
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd);
+
+/**
+ * Like evhttp_accept_socket(), but returns a handle for referencing the socket.
+ *
+ * The returned pointer is not valid after \a http is freed.
+ *
+ * @param http a pointer to an evhttp object
+ * @param fd a socket fd that is ready for accepting connections
+ * @return Handle for the socket on success, NULL on failure.
+ * @see evhttp_accept_socket(), evhttp_del_accept_socket()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_bound_socket *evhttp_accept_socket_with_handle(struct evhttp *http, evutil_socket_t fd);
+
+/**
+ * The most low-level evhttp_bind/accept method: takes an evconnlistener, and
+ * returns an evhttp_bound_socket. The listener will be freed when the bound
+ * socket is freed.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_bound_socket *evhttp_bind_listener(struct evhttp *http, struct evconnlistener *listener);
+
+/**
+ * Return the listener used to implement a bound socket.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evconnlistener *evhttp_bound_socket_get_listener(struct evhttp_bound_socket *bound);
+
+typedef void evhttp_bound_socket_foreach_fn(struct evhttp_bound_socket *, void *);
+/**
+ * Applies the function specified in the first argument to all
+ * evhttp_bound_sockets associated with "http". The user must not
+ * attempt to free or remove any connections, sockets or listeners
+ * in the callback "function".
+ *
+ * @param http pointer to an evhttp object
+ * @param function function to apply to every bound socket
+ * @param argument pointer value passed to function for every socket iterated
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_foreach_bound_socket(struct evhttp *http, evhttp_bound_socket_foreach_fn *function, void *argument);
+
+/**
+ * Makes an HTTP server stop accepting connections on the specified socket
+ *
+ * This may be useful when a socket has been sent via file descriptor passing
+ * and is no longer needed by the current process.
+ *
+ * If you created this bound socket with evhttp_bind_socket_with_handle or
+ * evhttp_accept_socket_with_handle, this function closes the fd you provided.
+ * If you created this bound socket with evhttp_bind_listener, this function
+ * frees the listener you provided.
+ *
+ * \a bound_socket is an invalid pointer after this call returns.
+ *
+ * @param http a pointer to an evhttp object
+ * @param bound_socket a handle returned by evhttp_{bind,accept}_socket_with_handle
+ * @see evhttp_bind_socket_with_handle(), evhttp_accept_socket_with_handle()
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_del_accept_socket(struct evhttp *http, struct evhttp_bound_socket *bound_socket);
+
+/**
+ * Get the raw file descriptor referenced by an evhttp_bound_socket.
+ *
+ * @param bound_socket a handle returned by evhttp_{bind,accept}_socket_with_handle
+ * @return the file descriptor used by the bound socket
+ * @see evhttp_bind_socket_with_handle(), evhttp_accept_socket_with_handle()
+ */
+EVENT2_EXPORT_SYMBOL
+evutil_socket_t evhttp_bound_socket_get_fd(struct evhttp_bound_socket *bound_socket);
+
+/**
+ * Free the previously created HTTP server.
+ *
+ * Works only if no requests are currently being served.
+ *
+ * @param http the evhttp server object to be freed
+ * @see evhttp_start()
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_free(struct evhttp* http);
+
+/** XXX Document. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size);
+/** XXX Document. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_max_body_size(struct evhttp* http, ev_ssize_t max_body_size);
+
+/**
+ Set the value to use for the Content-Type header when none was provided. If
+ the content type string is NULL, the Content-Type header will not be
+ automatically added.
+
+ @param http the http server on which to set the default content type
+ @param content_type the value for the Content-Type header
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_default_content_type(struct evhttp *http,
+ const char *content_type);
+
+/**
+ Sets the what HTTP methods are supported in requests accepted by this
+ server, and passed to user callbacks.
+
+ If not supported they will generate a "405 Method not allowed" response.
+
+ By default this includes the following methods: GET, POST, HEAD, PUT, DELETE
+
+ @param http the http server on which to set the methods
+ @param methods bit mask constructed from evhttp_cmd_type values
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_allowed_methods(struct evhttp* http, ev_uint16_t methods);
+
+/**
+ Set a callback for a specified URI
+
+ @param http the http sever on which to set the callback
+ @param path the path for which to invoke the callback
+ @param cb the callback function that gets invoked on requesting path
+ @param cb_arg an additional context argument for the callback
+ @return 0 on success, -1 if the callback existed already, -2 on failure
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_set_cb(struct evhttp *http, const char *path,
+ void (*cb)(struct evhttp_request *, void *), void *cb_arg);
+
+/** Removes the callback for a specified URI */
+EVENT2_EXPORT_SYMBOL
+int evhttp_del_cb(struct evhttp *, const char *);
+
+/**
+ Set a callback for all requests that are not caught by specific callbacks
+
+ Invokes the specified callback for all requests that do not match any of
+ the previously specified request paths. This is catchall for requests not
+ specifically configured with evhttp_set_cb().
+
+ @param http the evhttp server object for which to set the callback
+ @param cb the callback to invoke for any unmatched requests
+ @param arg an context argument for the callback
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_gencb(struct evhttp *http,
+ void (*cb)(struct evhttp_request *, void *), void *arg);
+
+/**
+ Set a callback used to create new bufferevents for connections
+ to a given evhttp object.
+
+ You can use this to override the default bufferevent type -- for example,
+ to make this evhttp object use SSL bufferevents rather than unencrypted
+ ones.
+
+ New bufferevents must be allocated with no fd set on them.
+
+ @param http the evhttp server object for which to set the callback
+ @param cb the callback to invoke for incoming connections
+ @param arg an context argument for the callback
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_bevcb(struct evhttp *http,
+ struct bufferevent *(*cb)(struct event_base *, void *), void *arg);
+
+/**
+ Adds a virtual host to the http server.
+
+ A virtual host is a newly initialized evhttp object that has request
+ callbacks set on it via evhttp_set_cb() or evhttp_set_gencb(). It
+ most not have any listing sockets associated with it.
+
+ If the virtual host has not been removed by the time that evhttp_free()
+ is called on the main http server, it will be automatically freed, too.
+
+ It is possible to have hierarchical vhosts. For example: A vhost
+ with the pattern *.example.com may have other vhosts with patterns
+ foo.example.com and bar.example.com associated with it.
+
+ @param http the evhttp object to which to add a virtual host
+ @param pattern the glob pattern against which the hostname is matched.
+ The match is case insensitive and follows otherwise regular shell
+ matching.
+ @param vhost the virtual host to add the regular http server.
+ @return 0 on success, -1 on failure
+ @see evhttp_remove_virtual_host()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_add_virtual_host(struct evhttp* http, const char *pattern,
+ struct evhttp* vhost);
+
+/**
+ Removes a virtual host from the http server.
+
+ @param http the evhttp object from which to remove the virtual host
+ @param vhost the virtual host to remove from the regular http server.
+ @return 0 on success, -1 on failure
+ @see evhttp_add_virtual_host()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost);
+
+/**
+ Add a server alias to an http object. The http object can be a virtual
+ host or the main server.
+
+ @param http the evhttp object
+ @param alias the alias to add
+ @see evhttp_add_remove_alias()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_add_server_alias(struct evhttp *http, const char *alias);
+
+/**
+ Remove a server alias from an http object.
+
+ @param http the evhttp object
+ @param alias the alias to remove
+ @see evhttp_add_server_alias()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_remove_server_alias(struct evhttp *http, const char *alias);
+
+/**
+ * Set the timeout for an HTTP request.
+ *
+ * @param http an evhttp object
+ * @param timeout_in_secs the timeout, in seconds
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_timeout(struct evhttp *http, int timeout_in_secs);
+
+/**
+ * Set the timeout for an HTTP request.
+ *
+ * @param http an evhttp object
+ * @param tv the timeout, or NULL
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_set_timeout_tv(struct evhttp *http, const struct timeval* tv);
+
+/* Request/Response functionality */
+
+/**
+ * Send an HTML error message to the client.
+ *
+ * @param req a request object
+ * @param error the HTTP error code
+ * @param reason a brief explanation of the error. If this is NULL, we'll
+ * just use the standard meaning of the error code.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_error(struct evhttp_request *req, int error,
+ const char *reason);
+
+/**
+ * Send an HTML reply to the client.
+ *
+ * The body of the reply consists of the data in databuf. After calling
+ * evhttp_send_reply() databuf will be empty, but the buffer is still
+ * owned by the caller and needs to be deallocated by the caller if
+ * necessary.
+ *
+ * @param req a request object
+ * @param code the HTTP response code to send
+ * @param reason a brief message to send with the response code
+ * @param databuf the body of the response
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_reply(struct evhttp_request *req, int code,
+ const char *reason, struct evbuffer *databuf);
+
+/* Low-level response interface, for streaming/chunked replies */
+
+/**
+ Initiate a reply that uses Transfer-Encoding chunked.
+
+ This allows the caller to stream the reply back to the client and is
+ useful when either not all of the reply data is immediately available
+ or when sending very large replies.
+
+ The caller needs to supply data chunks with evhttp_send_reply_chunk()
+ and complete the reply by calling evhttp_send_reply_end().
+
+ @param req a request object
+ @param code the HTTP response code to send
+ @param reason a brief message to send with the response code
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_reply_start(struct evhttp_request *req, int code,
+ const char *reason);
+
+/**
+ Send another data chunk as part of an ongoing chunked reply.
+
+ The reply chunk consists of the data in databuf. After calling
+ evhttp_send_reply_chunk() databuf will be empty, but the buffer is
+ still owned by the caller and needs to be deallocated by the caller
+ if necessary.
+
+ @param req a request object
+ @param databuf the data chunk to send as part of the reply.
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_reply_chunk(struct evhttp_request *req,
+ struct evbuffer *databuf);
+
+/**
+ Send another data chunk as part of an ongoing chunked reply.
+
+ The reply chunk consists of the data in databuf. After calling
+ evhttp_send_reply_chunk() databuf will be empty, but the buffer is
+ still owned by the caller and needs to be deallocated by the caller
+ if necessary.
+
+ @param req a request object
+ @param databuf the data chunk to send as part of the reply.
+ @param cb callback funcion
+ @param call back's argument.
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_reply_chunk_with_cb(struct evhttp_request *, struct evbuffer *,
+ void (*cb)(struct evhttp_connection *, void *), void *arg);
+
+/**
+ Complete a chunked reply, freeing the request as appropriate.
+
+ @param req a request object
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_send_reply_end(struct evhttp_request *req);
+
+/*
+ * Interfaces for making requests
+ */
+
+/** The different request types supported by evhttp. These are as specified
+ * in RFC2616, except for PATCH which is specified by RFC5789.
+ *
+ * By default, only some of these methods are accepted and passed to user
+ * callbacks; use evhttp_set_allowed_methods() to change which methods
+ * are allowed.
+ */
+enum evhttp_cmd_type {
+ EVHTTP_REQ_GET = 1 << 0,
+ EVHTTP_REQ_POST = 1 << 1,
+ EVHTTP_REQ_HEAD = 1 << 2,
+ EVHTTP_REQ_PUT = 1 << 3,
+ EVHTTP_REQ_DELETE = 1 << 4,
+ EVHTTP_REQ_OPTIONS = 1 << 5,
+ EVHTTP_REQ_TRACE = 1 << 6,
+ EVHTTP_REQ_CONNECT = 1 << 7,
+ EVHTTP_REQ_PATCH = 1 << 8
+};
+
+/** a request object can represent either a request or a reply */
+enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE };
+
+/**
+ * Create and return a connection object that can be used to for making HTTP
+ * requests. The connection object tries to resolve address and establish the
+ * connection when it is given an http request object.
+ *
+ * @param base the event_base to use for handling the connection
+ * @param dnsbase the dns_base to use for resolving host names; if not
+ * specified host name resolution will block.
+ * @param bev a bufferevent to use for connecting to the server; if NULL, a
+ * socket-based bufferevent will be created. This buffrevent will be freed
+ * when the connection closes. It must have no fd set on it.
+ * @param address the address to which to connect
+ * @param port the port to connect to
+ * @return an evhttp_connection object that can be used for making requests
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_connection *evhttp_connection_base_bufferevent_new(
+ struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, unsigned short port);
+
+/**
+ * Return the bufferevent that an evhttp_connection is using.
+ */
+EVENT2_EXPORT_SYMBOL
+struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *evcon);
+
+/**
+ * Return the HTTP server associated with this connection, or NULL.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp *evhttp_connection_get_server(struct evhttp_connection *evcon);
+
+/**
+ * Creates a new request object that needs to be filled in with the request
+ * parameters. The callback is executed when the request completed or an
+ * error occurred.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_request *evhttp_request_new(
+ void (*cb)(struct evhttp_request *, void *), void *arg);
+
+/**
+ * Enable delivery of chunks to requestor.
+ * @param cb will be called after every read of data with the same argument
+ * as the completion callback. Will never be called on an empty
+ * response. May drain the input buffer; it will be drained
+ * automatically on return.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_set_chunked_cb(struct evhttp_request *,
+ void (*cb)(struct evhttp_request *, void *));
+
+/**
+ * Register callback for additional parsing of request headers.
+ * @param cb will be called after receiving and parsing the full header.
+ * It allows analyzing the header and possibly closing the connection
+ * by returning a value < 0.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_set_header_cb(struct evhttp_request *,
+ int (*cb)(struct evhttp_request *, void *));
+
+/**
+ * The different error types supported by evhttp
+ *
+ * @see evhttp_request_set_error_cb()
+ */
+enum evhttp_request_error {
+ /**
+ * Timeout reached, also @see evhttp_connection_set_timeout()
+ */
+ EVREQ_HTTP_TIMEOUT,
+ /**
+ * EOF reached
+ */
+ EVREQ_HTTP_EOF,
+ /**
+ * Error while reading header, or invalid header
+ */
+ EVREQ_HTTP_INVALID_HEADER,
+ /**
+ * Error encountered while reading or writing
+ */
+ EVREQ_HTTP_BUFFER_ERROR,
+ /**
+ * The evhttp_cancel_request() called on this request.
+ */
+ EVREQ_HTTP_REQUEST_CANCEL,
+ /**
+ * Body is greater then evhttp_connection_set_max_body_size()
+ */
+ EVREQ_HTTP_DATA_TOO_LONG
+};
+/**
+ * Set a callback for errors
+ * @see evhttp_request_error for error types.
+ *
+ * On error, both the error callback and the regular callback will be called,
+ * error callback is called before the regular callback.
+ **/
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_set_error_cb(struct evhttp_request *,
+ void (*)(enum evhttp_request_error, void *));
+
+/**
+ * Set a callback to be called on request completion of evhttp_send_* function.
+ *
+ * The callback function will be called on the completion of the request after
+ * the output data has been written and before the evhttp_request object
+ * is destroyed. This can be useful for tracking resources associated with a
+ * request (ex: timing metrics).
+ *
+ * @param req a request object
+ * @param cb callback function that will be called on request completion
+ * @param cb_arg an additional context argument for the callback
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_set_on_complete_cb(struct evhttp_request *req,
+ void (*cb)(struct evhttp_request *, void *), void *cb_arg);
+
+/** Frees the request object and removes associated events. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_free(struct evhttp_request *req);
+
+/**
+ * Create and return a connection object that can be used to for making HTTP
+ * requests. The connection object tries to resolve address and establish the
+ * connection when it is given an http request object.
+ *
+ * @param base the event_base to use for handling the connection
+ * @param dnsbase the dns_base to use for resolving host names; if not
+ * specified host name resolution will block.
+ * @param address the address to which to connect
+ * @param port the port to connect to
+ * @return an evhttp_connection object that can be used for making requests
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_connection *evhttp_connection_base_new(
+ struct event_base *base, struct evdns_base *dnsbase,
+ const char *address, unsigned short port);
+
+/** Takes ownership of the request object
+ *
+ * Can be used in a request callback to keep onto the request until
+ * evhttp_request_free() is explicitly called by the user.
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_request_own(struct evhttp_request *req);
+
+/** Returns 1 if the request is owned by the user */
+EVENT2_EXPORT_SYMBOL
+int evhttp_request_is_owned(struct evhttp_request *req);
+
+/**
+ * Returns the connection object associated with the request or NULL
+ *
+ * The user needs to either free the request explicitly or call
+ * evhttp_send_reply_end().
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_connection *evhttp_request_get_connection(struct evhttp_request *req);
+
+/**
+ * Returns the underlying event_base for this connection
+ */
+EVENT2_EXPORT_SYMBOL
+struct event_base *evhttp_connection_get_base(struct evhttp_connection *req);
+
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_max_headers_size(struct evhttp_connection *evcon,
+ ev_ssize_t new_max_headers_size);
+
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_max_body_size(struct evhttp_connection* evcon,
+ ev_ssize_t new_max_body_size);
+
+/** Frees an http connection */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_free(struct evhttp_connection *evcon);
+
+/** sets the ip address from which http connections are made */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_local_address(struct evhttp_connection *evcon,
+ const char *address);
+
+/** sets the local port from which http connections are made */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_local_port(struct evhttp_connection *evcon,
+ ev_uint16_t port);
+
+/** Sets the timeout in seconds for events related to this connection */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_timeout(struct evhttp_connection *evcon,
+ int timeout_in_secs);
+
+/** Sets the timeout for events related to this connection. Takes a struct
+ * timeval. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_timeout_tv(struct evhttp_connection *evcon,
+ const struct timeval *tv);
+
+/** Sets the delay before retrying requests on this connection. This is only
+ * used if evhttp_connection_set_retries is used to make the number of retries
+ * at least one. Each retry after the first is twice as long as the one before
+ * it. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_initial_retry_tv(struct evhttp_connection *evcon,
+ const struct timeval *tv);
+
+/** Sets the retry limit for this connection - -1 repeats indefinitely */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_retries(struct evhttp_connection *evcon,
+ int retry_max);
+
+/** Set a callback for connection close. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_set_closecb(struct evhttp_connection *evcon,
+ void (*)(struct evhttp_connection *, void *), void *);
+
+/** Get the remote address and port associated with this connection. */
+EVENT2_EXPORT_SYMBOL
+void evhttp_connection_get_peer(struct evhttp_connection *evcon,
+ char **address, ev_uint16_t *port);
+
+/** Get the remote address associated with this connection.
+ * extracted from getpeername().
+ *
+ * @return NULL if getpeername() return non success,
+ * or connection is not connected,
+ * otherwise it return pointer to struct sockaddr_storage */
+EVENT2_EXPORT_SYMBOL
+const struct sockaddr*
+evhttp_connection_get_addr(struct evhttp_connection *evcon);
+
+/**
+ Make an HTTP request over the specified connection.
+
+ The connection gets ownership of the request. On failure, the
+ request object is no longer valid as it has been freed.
+
+ @param evcon the evhttp_connection object over which to send the request
+ @param req the previously created and configured request object
+ @param type the request type EVHTTP_REQ_GET, EVHTTP_REQ_POST, etc.
+ @param uri the URI associated with the request
+ @return 0 on success, -1 on failure
+ @see evhttp_cancel_request()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_make_request(struct evhttp_connection *evcon,
+ struct evhttp_request *req,
+ enum evhttp_cmd_type type, const char *uri);
+
+/**
+ Cancels a pending HTTP request.
+
+ Cancels an ongoing HTTP request. The callback associated with this request
+ is not executed and the request object is freed. If the request is
+ currently being processed, e.g. it is ongoing, the corresponding
+ evhttp_connection object is going to get reset.
+
+ A request cannot be canceled if its callback has executed already. A request
+ may be canceled reentrantly from its chunked callback.
+
+ @param req the evhttp_request to cancel; req becomes invalid after this call.
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_cancel_request(struct evhttp_request *req);
+
+/**
+ * A structure to hold a parsed URI or Relative-Ref conforming to RFC3986.
+ */
+struct evhttp_uri;
+
+/** Returns the request URI */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_request_get_uri(const struct evhttp_request *req);
+/** Returns the request URI (parsed) */
+EVENT2_EXPORT_SYMBOL
+const struct evhttp_uri *evhttp_request_get_evhttp_uri(const struct evhttp_request *req);
+/** Returns the request command */
+EVENT2_EXPORT_SYMBOL
+enum evhttp_cmd_type evhttp_request_get_command(const struct evhttp_request *req);
+
+EVENT2_EXPORT_SYMBOL
+int evhttp_request_get_response_code(const struct evhttp_request *req);
+EVENT2_EXPORT_SYMBOL
+const char * evhttp_request_get_response_code_line(const struct evhttp_request *req);
+
+/** Returns the input headers */
+EVENT2_EXPORT_SYMBOL
+struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req);
+/** Returns the output headers */
+EVENT2_EXPORT_SYMBOL
+struct evkeyvalq *evhttp_request_get_output_headers(struct evhttp_request *req);
+/** Returns the input buffer */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer *evhttp_request_get_input_buffer(struct evhttp_request *req);
+/** Returns the output buffer */
+EVENT2_EXPORT_SYMBOL
+struct evbuffer *evhttp_request_get_output_buffer(struct evhttp_request *req);
+/** Returns the host associated with the request. If a client sends an absolute
+ URI, the host part of that is preferred. Otherwise, the input headers are
+ searched for a Host: header. NULL is returned if no absolute URI or Host:
+ header is provided. */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_request_get_host(struct evhttp_request *req);
+
+/* Interfaces for dealing with HTTP headers */
+
+/**
+ Finds the value belonging to a header.
+
+ @param headers the evkeyvalq object in which to find the header
+ @param key the name of the header to find
+ @returns a pointer to the value for the header or NULL if the header
+ could not be found.
+ @see evhttp_add_header(), evhttp_remove_header()
+*/
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_find_header(const struct evkeyvalq *headers,
+ const char *key);
+
+/**
+ Removes a header from a list of existing headers.
+
+ @param headers the evkeyvalq object from which to remove a header
+ @param key the name of the header to remove
+ @returns 0 if the header was removed, -1 otherwise.
+ @see evhttp_find_header(), evhttp_add_header()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_remove_header(struct evkeyvalq *headers, const char *key);
+
+/**
+ Adds a header to a list of existing headers.
+
+ @param headers the evkeyvalq object to which to add a header
+ @param key the name of the header
+ @param value the value belonging to the header
+ @returns 0 on success, -1 otherwise.
+ @see evhttp_find_header(), evhttp_clear_headers()
+*/
+EVENT2_EXPORT_SYMBOL
+int evhttp_add_header(struct evkeyvalq *headers, const char *key, const char *value);
+
+/**
+ Removes all headers from the header list.
+
+ @param headers the evkeyvalq object from which to remove all headers
+*/
+EVENT2_EXPORT_SYMBOL
+void evhttp_clear_headers(struct evkeyvalq *headers);
+
+/* Miscellaneous utility functions */
+
+
+/**
+ Helper function to encode a string for inclusion in a URI. All
+ characters are replaced by their hex-escaped (%22) equivalents,
+ except for characters explicitly unreserved by RFC3986 -- that is,
+ ASCII alphanumeric characters, hyphen, dot, underscore, and tilde.
+
+ The returned string must be freed by the caller.
+
+ @param str an unencoded string
+ @return a newly allocated URI-encoded string or NULL on failure
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_encode_uri(const char *str);
+
+/**
+ As evhttp_encode_uri, but if 'size' is nonnegative, treat the string
+ as being 'size' bytes long. This allows you to encode strings that
+ may contain 0-valued bytes.
+
+ The returned string must be freed by the caller.
+
+ @param str an unencoded string
+ @param size the length of the string to encode, or -1 if the string
+ is NUL-terminated
+ @param space_to_plus if true, space characters in 'str' are encoded
+ as +, not %20.
+ @return a newly allocate URI-encoded string, or NULL on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_uriencode(const char *str, ev_ssize_t size, int space_to_plus);
+
+/**
+ Helper function to sort of decode a URI-encoded string. Unlike
+ evhttp_get_decoded_uri, it decodes all plus characters that appear
+ _after_ the first question mark character, but no plusses that occur
+ before. This is not a good way to decode URIs in whole or in part.
+
+ The returned string must be freed by the caller
+
+ @deprecated This function is deprecated; you probably want to use
+ evhttp_get_decoded_uri instead.
+
+ @param uri an encoded URI
+ @return a newly allocated unencoded URI or NULL on failure
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_decode_uri(const char *uri);
+
+/**
+ Helper function to decode a URI-escaped string or HTTP parameter.
+
+ If 'decode_plus' is 1, then we decode the string as an HTTP parameter
+ value, and convert all plus ('+') characters to spaces. If
+ 'decode_plus' is 0, we leave all plus characters unchanged.
+
+ The returned string must be freed by the caller.
+
+ @param uri a URI-encode encoded URI
+ @param decode_plus determines whether we convert '+' to space.
+ @param size_out if size_out is not NULL, *size_out is set to the size of the
+ returned string
+ @return a newly allocated unencoded URI or NULL on failure
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_uridecode(const char *uri, int decode_plus,
+ size_t *size_out);
+
+/**
+ Helper function to parse out arguments in a query.
+
+ Parsing a URI like
+
+ http://foo.com/?q=test&s=some+thing
+
+ will result in two entries in the key value queue.
+
+ The first entry is: key="q", value="test"
+ The second entry is: key="s", value="some thing"
+
+ @deprecated This function is deprecated as of Libevent 2.0.9. Use
+ evhttp_uri_parse and evhttp_parse_query_str instead.
+
+ @param uri the request URI
+ @param headers the head of the evkeyval queue
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_parse_query(const char *uri, struct evkeyvalq *headers);
+
+/**
+ Helper function to parse out arguments from the query portion of an
+ HTTP URI.
+
+ Parsing a query string like
+
+ q=test&s=some+thing
+
+ will result in two entries in the key value queue.
+
+ The first entry is: key="q", value="test"
+ The second entry is: key="s", value="some thing"
+
+ @param query_parse the query portion of the URI
+ @param headers the head of the evkeyval queue
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evhttp_parse_query_str(const char *uri, struct evkeyvalq *headers);
+
+/**
+ * Escape HTML character entities in a string.
+ *
+ * Replaces <, >, ", ' and & with &lt;, &gt;, &quot;,
+ * &#039; and &amp; correspondingly.
+ *
+ * The returned string needs to be freed by the caller.
+ *
+ * @param html an unescaped HTML string
+ * @return an escaped HTML string or NULL on error
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_htmlescape(const char *html);
+
+/**
+ * Return a new empty evhttp_uri with no fields set.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_uri *evhttp_uri_new(void);
+
+/**
+ * Changes the flags set on a given URI. See EVHTTP_URI_* for
+ * a list of flags.
+ **/
+EVENT2_EXPORT_SYMBOL
+void evhttp_uri_set_flags(struct evhttp_uri *uri, unsigned flags);
+
+/** Return the scheme of an evhttp_uri, or NULL if there is no scheme has
+ * been set and the evhttp_uri contains a Relative-Ref. */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_scheme(const struct evhttp_uri *uri);
+/**
+ * Return the userinfo part of an evhttp_uri, or NULL if it has no userinfo
+ * set.
+ */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_userinfo(const struct evhttp_uri *uri);
+/**
+ * Return the host part of an evhttp_uri, or NULL if it has no host set.
+ * The host may either be a regular hostname (conforming to the RFC 3986
+ * "regname" production), or an IPv4 address, or the empty string, or a
+ * bracketed IPv6 address, or a bracketed 'IP-Future' address.
+ *
+ * Note that having a NULL host means that the URI has no authority
+ * section, but having an empty-string host means that the URI has an
+ * authority section with no host part. For example,
+ * "mailto:user@example.com" has a host of NULL, but "file:///etc/motd"
+ * has a host of "".
+ */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_host(const struct evhttp_uri *uri);
+/** Return the port part of an evhttp_uri, or -1 if there is no port set. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_get_port(const struct evhttp_uri *uri);
+/** Return the path part of an evhttp_uri, or NULL if it has no path set */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_path(const struct evhttp_uri *uri);
+/** Return the query part of an evhttp_uri (excluding the leading "?"), or
+ * NULL if it has no query set */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_query(const struct evhttp_uri *uri);
+/** Return the fragment part of an evhttp_uri (excluding the leading "#"),
+ * or NULL if it has no fragment set */
+EVENT2_EXPORT_SYMBOL
+const char *evhttp_uri_get_fragment(const struct evhttp_uri *uri);
+
+/** Set the scheme of an evhttp_uri, or clear the scheme if scheme==NULL.
+ * Returns 0 on success, -1 if scheme is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_scheme(struct evhttp_uri *uri, const char *scheme);
+/** Set the userinfo of an evhttp_uri, or clear the userinfo if userinfo==NULL.
+ * Returns 0 on success, -1 if userinfo is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_userinfo(struct evhttp_uri *uri, const char *userinfo);
+/** Set the host of an evhttp_uri, or clear the host if host==NULL.
+ * Returns 0 on success, -1 if host is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_host(struct evhttp_uri *uri, const char *host);
+/** Set the port of an evhttp_uri, or clear the port if port==-1.
+ * Returns 0 on success, -1 if port is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_port(struct evhttp_uri *uri, int port);
+/** Set the path of an evhttp_uri, or clear the path if path==NULL.
+ * Returns 0 on success, -1 if path is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_path(struct evhttp_uri *uri, const char *path);
+/** Set the query of an evhttp_uri, or clear the query if query==NULL.
+ * The query should not include a leading "?".
+ * Returns 0 on success, -1 if query is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_query(struct evhttp_uri *uri, const char *query);
+/** Set the fragment of an evhttp_uri, or clear the fragment if fragment==NULL.
+ * The fragment should not include a leading "#".
+ * Returns 0 on success, -1 if fragment is not well-formed. */
+EVENT2_EXPORT_SYMBOL
+int evhttp_uri_set_fragment(struct evhttp_uri *uri, const char *fragment);
+
+/**
+ * Helper function to parse a URI-Reference as specified by RFC3986.
+ *
+ * This function matches the URI-Reference production from RFC3986,
+ * which includes both URIs like
+ *
+ * scheme://[[userinfo]@]foo.com[:port]]/[path][?query][#fragment]
+ *
+ * and relative-refs like
+ *
+ * [path][?query][#fragment]
+ *
+ * Any optional elements portions not present in the original URI are
+ * left set to NULL in the resulting evhttp_uri. If no port is
+ * specified, the port is set to -1.
+ *
+ * Note that no decoding is performed on percent-escaped characters in
+ * the string; if you want to parse them, use evhttp_uridecode or
+ * evhttp_parse_query_str as appropriate.
+ *
+ * Note also that most URI schemes will have additional constraints that
+ * this function does not know about, and cannot check. For example,
+ * mailto://www.example.com/cgi-bin/fortune.pl is not a reasonable
+ * mailto url, http://www.example.com:99999/ is not a reasonable HTTP
+ * URL, and ftp:username@example.com is not a reasonable FTP URL.
+ * Nevertheless, all of these URLs conform to RFC3986, and this function
+ * accepts all of them as valid.
+ *
+ * @param source_uri the request URI
+ * @param flags Zero or more EVHTTP_URI_* flags to affect the behavior
+ * of the parser.
+ * @return uri container to hold parsed data, or NULL if there is error
+ * @see evhttp_uri_free()
+ */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_uri *evhttp_uri_parse_with_flags(const char *source_uri,
+ unsigned flags);
+
+/** Tolerate URIs that do not conform to RFC3986.
+ *
+ * Unfortunately, some HTTP clients generate URIs that, according to RFC3986,
+ * are not conformant URIs. If you need to support these URIs, you can
+ * do so by passing this flag to evhttp_uri_parse_with_flags.
+ *
+ * Currently, these changes are:
+ * <ul>
+ * <li> Nonconformant URIs are allowed to contain otherwise unreasonable
+ * characters in their path, query, and fragment components.
+ * </ul>
+ */
+#define EVHTTP_URI_NONCONFORMANT 0x01
+
+/** Alias for evhttp_uri_parse_with_flags(source_uri, 0) */
+EVENT2_EXPORT_SYMBOL
+struct evhttp_uri *evhttp_uri_parse(const char *source_uri);
+
+/**
+ * Free all memory allocated for a parsed uri. Only use this for URIs
+ * generated by evhttp_uri_parse.
+ *
+ * @param uri container with parsed data
+ * @see evhttp_uri_parse()
+ */
+EVENT2_EXPORT_SYMBOL
+void evhttp_uri_free(struct evhttp_uri *uri);
+
+/**
+ * Join together the uri parts from parsed data to form a URI-Reference.
+ *
+ * Note that no escaping of reserved characters is done on the members
+ * of the evhttp_uri, so the generated string might not be a valid URI
+ * unless the members of evhttp_uri are themselves valid.
+ *
+ * @param uri container with parsed data
+ * @param buf destination buffer
+ * @param limit destination buffer size
+ * @return an joined uri as string or NULL on error
+ * @see evhttp_uri_parse()
+ */
+EVENT2_EXPORT_SYMBOL
+char *evhttp_uri_join(struct evhttp_uri *uri, char *buf, size_t limit);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_HTTP_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/http_compat.h b/sntp/libevent/include/event2/http_compat.h
new file mode 100644
index 000000000000..0d9af17f3fed
--- /dev/null
+++ b/sntp/libevent/include/event2/http_compat.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_HTTP_COMPAT_H_INCLUDED_
+#define EVENT2_HTTP_COMPAT_H_INCLUDED_
+
+/** @file event2/http_compat.h
+
+ Potentially non-threadsafe versions of the functions in http.h: provided
+ only for backwards compatibility.
+
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/**
+ * Start an HTTP server on the specified address and port
+ *
+ * @deprecated It does not allow an event base to be specified
+ *
+ * @param address the address to which the HTTP server should be bound
+ * @param port the port number on which the HTTP server should listen
+ * @return an struct evhttp object
+ */
+struct evhttp *evhttp_start(const char *address, unsigned short port);
+
+/**
+ * A connection object that can be used to for making HTTP requests. The
+ * connection object tries to establish the connection when it is given an
+ * http request object.
+ *
+ * @deprecated It does not allow an event base to be specified
+ */
+struct evhttp_connection *evhttp_connection_new(
+ const char *address, unsigned short port);
+
+/**
+ * Associates an event base with the connection - can only be called
+ * on a freshly created connection object that has not been used yet.
+ *
+ * @deprecated XXXX Why?
+ */
+void evhttp_connection_set_base(struct evhttp_connection *evcon,
+ struct event_base *base);
+
+
+/** Returns the request URI */
+#define evhttp_request_uri evhttp_request_get_uri
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/http_struct.h b/sntp/libevent/include/event2/http_struct.h
new file mode 100644
index 000000000000..4bf5b1ff60f5
--- /dev/null
+++ b/sntp/libevent/include/event2/http_struct.h
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_HTTP_STRUCT_H_INCLUDED_
+#define EVENT2_HTTP_STRUCT_H_INCLUDED_
+
+/** @file event2/http_struct.h
+
+ Data structures for http. Using these structures may hurt forward
+ compatibility with later versions of Libevent: be careful!
+
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+/**
+ * the request structure that a server receives.
+ * WARNING: expect this structure to change. I will try to provide
+ * reasonable accessors.
+ */
+struct evhttp_request {
+#if defined(TAILQ_ENTRY)
+ TAILQ_ENTRY(evhttp_request) next;
+#else
+struct {
+ struct evhttp_request *tqe_next;
+ struct evhttp_request **tqe_prev;
+} next;
+#endif
+
+ /* the connection object that this request belongs to */
+ struct evhttp_connection *evcon;
+ int flags;
+/** The request obj owns the evhttp connection and needs to free it */
+#define EVHTTP_REQ_OWN_CONNECTION 0x0001
+/** Request was made via a proxy */
+#define EVHTTP_PROXY_REQUEST 0x0002
+/** The request object is owned by the user; the user must free it */
+#define EVHTTP_USER_OWNED 0x0004
+/** The request will be used again upstack; freeing must be deferred */
+#define EVHTTP_REQ_DEFER_FREE 0x0008
+/** The request should be freed upstack */
+#define EVHTTP_REQ_NEEDS_FREE 0x0010
+
+ struct evkeyvalq *input_headers;
+ struct evkeyvalq *output_headers;
+
+ /* address of the remote host and the port connection came from */
+ char *remote_host;
+ ev_uint16_t remote_port;
+
+ /* cache of the hostname for evhttp_request_get_host */
+ char *host_cache;
+
+ enum evhttp_request_kind kind;
+ enum evhttp_cmd_type type;
+
+ size_t headers_size;
+ size_t body_size;
+
+ char *uri; /* uri after HTTP request was parsed */
+ struct evhttp_uri *uri_elems; /* uri elements */
+
+ char major; /* HTTP Major number */
+ char minor; /* HTTP Minor number */
+
+ int response_code; /* HTTP Response code */
+ char *response_code_line; /* Readable response */
+
+ struct evbuffer *input_buffer; /* read data */
+ ev_int64_t ntoread;
+ unsigned chunked:1, /* a chunked request */
+ userdone:1; /* the user has sent all data */
+
+ struct evbuffer *output_buffer; /* outgoing post or data */
+
+ /* Callback */
+ void (*cb)(struct evhttp_request *, void *);
+ void *cb_arg;
+
+ /*
+ * Chunked data callback - call for each completed chunk if
+ * specified. If not specified, all the data is delivered via
+ * the regular callback.
+ */
+ void (*chunk_cb)(struct evhttp_request *, void *);
+
+ /*
+ * Callback added for forked-daapd so they can collect ICY
+ * (shoutcast) metadata from the http header. If return
+ * int is negative the connection will be closed.
+ */
+ int (*header_cb)(struct evhttp_request *, void *);
+
+ /*
+ * Error callback - called when error is occured.
+ * @see evhttp_request_error for error types.
+ *
+ * @see evhttp_request_set_error_cb()
+ */
+ void (*error_cb)(enum evhttp_request_error, void *);
+
+ /*
+ * Send complete callback - called when the request is actually
+ * sent and completed.
+ */
+ void (*on_complete_cb)(struct evhttp_request *, void *);
+ void *on_complete_cb_arg;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_HTTP_STRUCT_H_INCLUDED_ */
+
diff --git a/sntp/libevent/include/event2/keyvalq_struct.h b/sntp/libevent/include/event2/keyvalq_struct.h
new file mode 100644
index 000000000000..bffa54b3a766
--- /dev/null
+++ b/sntp/libevent/include/event2/keyvalq_struct.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_KEYVALQ_STRUCT_H_INCLUDED_
+#define EVENT2_KEYVALQ_STRUCT_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Fix so that people don't have to run with <sys/queue.h> */
+/* XXXX This code is duplicated with event_struct.h */
+#ifndef TAILQ_ENTRY
+#define EVENT_DEFINED_TQENTRY_
+#define TAILQ_ENTRY(type) \
+struct { \
+ struct type *tqe_next; /* next element */ \
+ struct type **tqe_prev; /* address of previous next element */ \
+}
+#endif /* !TAILQ_ENTRY */
+
+#ifndef TAILQ_HEAD
+#define EVENT_DEFINED_TQHEAD_
+#define TAILQ_HEAD(name, type) \
+struct name { \
+ struct type *tqh_first; \
+ struct type **tqh_last; \
+}
+#endif
+
+/*
+ * Key-Value pairs. Can be used for HTTP headers but also for
+ * query argument parsing.
+ */
+struct evkeyval {
+ TAILQ_ENTRY(evkeyval) next;
+
+ char *key;
+ char *value;
+};
+
+TAILQ_HEAD (evkeyvalq, evkeyval);
+
+/* XXXX This code is duplicated with event_struct.h */
+#ifdef EVENT_DEFINED_TQENTRY_
+#undef TAILQ_ENTRY
+#endif
+
+#ifdef EVENT_DEFINED_TQHEAD_
+#undef TAILQ_HEAD
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/include/event2/listener.h b/sntp/libevent/include/event2/listener.h
new file mode 100644
index 000000000000..8c77803d6d84
--- /dev/null
+++ b/sntp/libevent/include/event2/listener.h
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_LISTENER_H_INCLUDED_
+#define EVENT2_LISTENER_H_INCLUDED_
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event.h>
+
+struct sockaddr;
+struct evconnlistener;
+
+/**
+ A callback that we invoke when a listener has a new connection.
+
+ @param listener The evconnlistener
+ @param fd The new file descriptor
+ @param addr The source address of the connection
+ @param socklen The length of addr
+ @param user_arg the pointer passed to evconnlistener_new()
+ */
+typedef void (*evconnlistener_cb)(struct evconnlistener *, evutil_socket_t, struct sockaddr *, int socklen, void *);
+
+/**
+ A callback that we invoke when a listener encounters a non-retriable error.
+
+ @param listener The evconnlistener
+ @param user_arg the pointer passed to evconnlistener_new()
+ */
+typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
+
+/** Flag: Indicates that we should not make incoming sockets nonblocking
+ * before passing them to the callback. */
+#define LEV_OPT_LEAVE_SOCKETS_BLOCKING (1u<<0)
+/** Flag: Indicates that freeing the listener should close the underlying
+ * socket. */
+#define LEV_OPT_CLOSE_ON_FREE (1u<<1)
+/** Flag: Indicates that we should set the close-on-exec flag, if possible */
+#define LEV_OPT_CLOSE_ON_EXEC (1u<<2)
+/** Flag: Indicates that we should disable the timeout (if any) between when
+ * this socket is closed and when we can listen again on the same port. */
+#define LEV_OPT_REUSEABLE (1u<<3)
+/** Flag: Indicates that the listener should be locked so it's safe to use
+ * from multiple threadcs at once. */
+#define LEV_OPT_THREADSAFE (1u<<4)
+/** Flag: Indicates that the listener should be created in disabled
+ * state. Use evconnlistener_enable() to enable it later. */
+#define LEV_OPT_DISABLED (1u<<5)
+/** Flag: Indicates that the listener should defer accept() until data is
+ * available, if possible. Ignored on platforms that do not support this.
+ *
+ * This option can help performance for protocols where the client transmits
+ * immediately after connecting. Do not use this option if your protocol
+ * _doesn't_ start out with the client transmitting data, since in that case
+ * this option will sometimes cause the kernel to never tell you about the
+ * connection.
+ *
+ * This option is only supported by evconnlistener_new_bind(): it can't
+ * work with evconnlistener_new_fd(), since the listener needs to be told
+ * to use the option before it is actually bound.
+ */
+#define LEV_OPT_DEFERRED_ACCEPT (1u<<6)
+
+/**
+ Allocate a new evconnlistener object to listen for incoming TCP connections
+ on a given file descriptor.
+
+ @param base The event base to associate the listener with.
+ @param cb A callback to be invoked when a new connection arrives. If the
+ callback is NULL, the listener will be treated as disabled until the
+ callback is set.
+ @param ptr A user-supplied pointer to give to the callback.
+ @param flags Any number of LEV_OPT_* flags
+ @param backlog Passed to the listen() call to determine the length of the
+ acceptable connection backlog. Set to -1 for a reasonable default.
+ Set to 0 if the socket is already listening.
+ @param fd The file descriptor to listen on. It must be a nonblocking
+ file descriptor, and it should already be bound to an appropriate
+ port and address.
+*/
+EVENT2_EXPORT_SYMBOL
+struct evconnlistener *evconnlistener_new(struct event_base *base,
+ evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
+ evutil_socket_t fd);
+/**
+ Allocate a new evconnlistener object to listen for incoming TCP connections
+ on a given address.
+
+ @param base The event base to associate the listener with.
+ @param cb A callback to be invoked when a new connection arrives. If the
+ callback is NULL, the listener will be treated as disabled until the
+ callback is set.
+ @param ptr A user-supplied pointer to give to the callback.
+ @param flags Any number of LEV_OPT_* flags
+ @param backlog Passed to the listen() call to determine the length of the
+ acceptable connection backlog. Set to -1 for a reasonable default.
+ @param addr The address to listen for connections on.
+ @param socklen The length of the address.
+ */
+EVENT2_EXPORT_SYMBOL
+struct evconnlistener *evconnlistener_new_bind(struct event_base *base,
+ evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
+ const struct sockaddr *sa, int socklen);
+/**
+ Disable and deallocate an evconnlistener.
+ */
+EVENT2_EXPORT_SYMBOL
+void evconnlistener_free(struct evconnlistener *lev);
+/**
+ Re-enable an evconnlistener that has been disabled.
+ */
+EVENT2_EXPORT_SYMBOL
+int evconnlistener_enable(struct evconnlistener *lev);
+/**
+ Stop listening for connections on an evconnlistener.
+ */
+EVENT2_EXPORT_SYMBOL
+int evconnlistener_disable(struct evconnlistener *lev);
+
+/** Return an evconnlistener's associated event_base. */
+EVENT2_EXPORT_SYMBOL
+struct event_base *evconnlistener_get_base(struct evconnlistener *lev);
+
+/** Return the socket that an evconnlistner is listening on. */
+EVENT2_EXPORT_SYMBOL
+evutil_socket_t evconnlistener_get_fd(struct evconnlistener *lev);
+
+/** Change the callback on the listener to cb and its user_data to arg.
+ */
+EVENT2_EXPORT_SYMBOL
+void evconnlistener_set_cb(struct evconnlistener *lev,
+ evconnlistener_cb cb, void *arg);
+
+/** Set an evconnlistener's error callback. */
+EVENT2_EXPORT_SYMBOL
+void evconnlistener_set_error_cb(struct evconnlistener *lev,
+ evconnlistener_errorcb errorcb);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/include/event2/rpc.h b/sntp/libevent/include/event2/rpc.h
new file mode 100644
index 000000000000..dd43df266a17
--- /dev/null
+++ b/sntp/libevent/include/event2/rpc.h
@@ -0,0 +1,596 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_RPC_H_INCLUDED_
+#define EVENT2_RPC_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @file rpc.h
+ *
+ * This header files provides basic support for an RPC server and client.
+ *
+ * To support RPCs in a server, every supported RPC command needs to be
+ * defined and registered.
+ *
+ * EVRPC_HEADER(SendCommand, Request, Reply);
+ *
+ * SendCommand is the name of the RPC command.
+ * Request is the name of a structure generated by event_rpcgen.py.
+ * It contains all parameters relating to the SendCommand RPC. The
+ * server needs to fill in the Reply structure.
+ * Reply is the name of a structure generated by event_rpcgen.py. It
+ * contains the answer to the RPC.
+ *
+ * To register an RPC with an HTTP server, you need to first create an RPC
+ * base with:
+ *
+ * struct evrpc_base *base = evrpc_init(http);
+ *
+ * A specific RPC can then be registered with
+ *
+ * EVRPC_REGISTER(base, SendCommand, Request, Reply, FunctionCB, arg);
+ *
+ * when the server receives an appropriately formatted RPC, the user callback
+ * is invoked. The callback needs to fill in the reply structure.
+ *
+ * void FunctionCB(EVRPC_STRUCT(SendCommand)* rpc, void *arg);
+ *
+ * To send the reply, call EVRPC_REQUEST_DONE(rpc);
+ *
+ * See the regression test for an example.
+ */
+
+/**
+ Determines if the member has been set in the message
+
+ @param msg the message to inspect
+ @param member the member variable to test for presences
+ @return 1 if it's present or 0 otherwise.
+*/
+#define EVTAG_HAS(msg, member) \
+ ((msg)->member##_set == 1)
+
+#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_
+
+/**
+ Assigns a value to the member in the message.
+
+ @param msg the message to which to assign a value
+ @param member the name of the member variable
+ @param value the value to assign
+*/
+#define EVTAG_ASSIGN(msg, member, value) \
+ (*(msg)->base->member##_assign)((msg), (value))
+/**
+ Assigns a value to the member in the message.
+
+ @param msg the message to which to assign a value
+ @param member the name of the member variable
+ @param value the value to assign
+ @param len the length of the value
+*/
+#define EVTAG_ASSIGN_WITH_LEN(msg, member, value, len) \
+ (*(msg)->base->member##_assign)((msg), (value), (len))
+/**
+ Returns the value for a member.
+
+ @param msg the message from which to get the value
+ @param member the name of the member variable
+ @param pvalue a pointer to the variable to hold the value
+ @return 0 on success, -1 otherwise.
+*/
+#define EVTAG_GET(msg, member, pvalue) \
+ (*(msg)->base->member##_get)((msg), (pvalue))
+/**
+ Returns the value for a member.
+
+ @param msg the message from which to get the value
+ @param member the name of the member variable
+ @param pvalue a pointer to the variable to hold the value
+ @param plen a pointer to the length of the value
+ @return 0 on success, -1 otherwise.
+*/
+#define EVTAG_GET_WITH_LEN(msg, member, pvalue, plen) \
+ (*(msg)->base->member##_get)((msg), (pvalue), (plen))
+
+#endif /* EVENT2_RPC_COMPAT_H_INCLUDED_ */
+
+/**
+ Adds a value to an array.
+*/
+#define EVTAG_ARRAY_ADD_VALUE(msg, member, value) \
+ (*(msg)->base->member##_add)((msg), (value))
+/**
+ Allocates a new entry in the array and returns it.
+*/
+#define EVTAG_ARRAY_ADD(msg, member) \
+ (*(msg)->base->member##_add)(msg)
+/**
+ Gets a variable at the specified offset from the array.
+*/
+#define EVTAG_ARRAY_GET(msg, member, offset, pvalue) \
+ (*(msg)->base->member##_get)((msg), (offset), (pvalue))
+/**
+ Returns the number of entries in the array.
+*/
+#define EVTAG_ARRAY_LEN(msg, member) ((msg)->member##_length)
+
+
+struct evbuffer;
+struct event_base;
+struct evrpc_req_generic;
+struct evrpc_request_wrapper;
+struct evrpc;
+
+/** The type of a specific RPC Message
+ *
+ * @param rpcname the name of the RPC message
+ */
+#define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname
+
+struct evhttp_request;
+struct evrpc_status;
+struct evrpc_hook_meta;
+
+/** Creates the definitions and prototypes for an RPC
+ *
+ * You need to use EVRPC_HEADER to create structures and function prototypes
+ * needed by the server and client implementation. The structures have to be
+ * defined in an .rpc file and converted to source code via event_rpcgen.py
+ *
+ * @param rpcname the name of the RPC
+ * @param reqstruct the name of the RPC request structure
+ * @param replystruct the name of the RPC reply structure
+ * @see EVRPC_GENERATE()
+ */
+#define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \
+EVRPC_STRUCT(rpcname) { \
+ struct evrpc_hook_meta *hook_meta; \
+ struct reqstruct* request; \
+ struct rplystruct* reply; \
+ struct evrpc* rpc; \
+ struct evhttp_request* http_req; \
+ struct evbuffer* rpc_data; \
+}; \
+int evrpc_send_request_##rpcname(struct evrpc_pool *, \
+ struct reqstruct *, struct rplystruct *, \
+ void (*)(struct evrpc_status *, \
+ struct reqstruct *, struct rplystruct *, void *cbarg), \
+ void *);
+
+struct evrpc_pool;
+
+/** use EVRPC_GENERATE instead */
+struct evrpc_request_wrapper *evrpc_make_request_ctx(
+ struct evrpc_pool *pool, void *request, void *reply,
+ const char *rpcname,
+ void (*req_marshal)(struct evbuffer*, void *),
+ void (*rpl_clear)(void *),
+ int (*rpl_unmarshal)(void *, struct evbuffer *),
+ void (*cb)(struct evrpc_status *, void *, void *, void *),
+ void *cbarg);
+
+/** Creates a context structure that contains rpc specific information.
+ *
+ * EVRPC_MAKE_CTX is used to populate a RPC specific context that
+ * contains information about marshaling the RPC data types.
+ *
+ * @param rpcname the name of the RPC
+ * @param reqstruct the name of the RPC request structure
+ * @param replystruct the name of the RPC reply structure
+ * @param pool the evrpc_pool over which to make the request
+ * @param request a pointer to the RPC request structure object
+ * @param reply a pointer to the RPC reply structure object
+ * @param cb the callback function to call when the RPC has completed
+ * @param cbarg the argument to supply to the callback
+ */
+#define EVRPC_MAKE_CTX(rpcname, reqstruct, rplystruct, \
+ pool, request, reply, cb, cbarg) \
+ evrpc_make_request_ctx(pool, request, reply, \
+ #rpcname, \
+ (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \
+ (void (*)(void *))rplystruct##_clear, \
+ (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal, \
+ (void (*)(struct evrpc_status *, void *, void *, void *))cb, \
+ cbarg)
+
+/** Generates the code for receiving and sending an RPC message
+ *
+ * EVRPC_GENERATE is used to create the code corresponding to sending
+ * and receiving a particular RPC message
+ *
+ * @param rpcname the name of the RPC
+ * @param reqstruct the name of the RPC request structure
+ * @param replystruct the name of the RPC reply structure
+ * @see EVRPC_HEADER()
+ */
+#define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \
+ int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \
+ struct reqstruct *request, struct rplystruct *reply, \
+ void (*cb)(struct evrpc_status *, \
+ struct reqstruct *, struct rplystruct *, void *cbarg), \
+ void *cbarg) { \
+ return evrpc_send_request_generic(pool, request, reply, \
+ (void (*)(struct evrpc_status *, void *, void *, void *))cb, \
+ cbarg, \
+ #rpcname, \
+ (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \
+ (void (*)(void *))rplystruct##_clear, \
+ (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal); \
+}
+
+/** Provides access to the HTTP request object underlying an RPC
+ *
+ * Access to the underlying http object; can be used to look at headers or
+ * for getting the remote ip address
+ *
+ * @param rpc_req the rpc request structure provided to the server callback
+ * @return an struct evhttp_request object that can be inspected for
+ * HTTP headers or sender information.
+ */
+#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req
+
+/** completes the server response to an rpc request */
+void evrpc_request_done(struct evrpc_req_generic *req);
+
+/** accessors for request and reply */
+void *evrpc_get_request(struct evrpc_req_generic *req);
+void *evrpc_get_reply(struct evrpc_req_generic *req);
+
+/** Creates the reply to an RPC request
+ *
+ * EVRPC_REQUEST_DONE is used to answer a request; the reply is expected
+ * to have been filled in. The request and reply pointers become invalid
+ * after this call has finished.
+ *
+ * @param rpc_req the rpc request structure provided to the server callback
+ */
+#define EVRPC_REQUEST_DONE(rpc_req) do { \
+ struct evrpc_req_generic *req_ = (struct evrpc_req_generic *)(rpc_req); \
+ evrpc_request_done(req_); \
+} while (0)
+
+
+struct evrpc_base;
+struct evhttp;
+
+/* functions to start up the rpc system */
+
+/** Creates a new rpc base from which RPC requests can be received
+ *
+ * @param server a pointer to an existing HTTP server
+ * @return a newly allocated evrpc_base struct
+ * @see evrpc_free()
+ */
+struct evrpc_base *evrpc_init(struct evhttp *server);
+
+/**
+ * Frees the evrpc base
+ *
+ * For now, you are responsible for making sure that no rpcs are ongoing.
+ *
+ * @param base the evrpc_base object to be freed
+ * @see evrpc_init
+ */
+void evrpc_free(struct evrpc_base *base);
+
+/** register RPCs with the HTTP Server
+ *
+ * registers a new RPC with the HTTP server, each RPC needs to have
+ * a unique name under which it can be identified.
+ *
+ * @param base the evrpc_base structure in which the RPC should be
+ * registered.
+ * @param name the name of the RPC
+ * @param request the name of the RPC request structure
+ * @param reply the name of the RPC reply structure
+ * @param callback the callback that should be invoked when the RPC
+ * is received. The callback has the following prototype
+ * void (*callback)(EVRPC_STRUCT(Message)* rpc, void *arg)
+ * @param cbarg an additional parameter that can be passed to the callback.
+ * The parameter can be used to carry around state.
+ */
+#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
+ evrpc_register_generic(base, #name, \
+ (void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \
+ (void *(*)(void *))request##_new, NULL, \
+ (void (*)(void *))request##_free, \
+ (int (*)(void *, struct evbuffer *))request##_unmarshal, \
+ (void *(*)(void *))reply##_new, NULL, \
+ (void (*)(void *))reply##_free, \
+ (int (*)(void *))reply##_complete, \
+ (void (*)(struct evbuffer *, void *))reply##_marshal)
+
+/**
+ Low level function for registering an RPC with a server.
+
+ Use EVRPC_REGISTER() instead.
+
+ @see EVRPC_REGISTER()
+*/
+int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
+ void (*)(struct evrpc_req_generic*, void *), void *);
+
+/**
+ * Unregisters an already registered RPC
+ *
+ * @param base the evrpc_base object from which to unregister an RPC
+ * @param name the name of the rpc to unregister
+ * @return -1 on error or 0 when successful.
+ * @see EVRPC_REGISTER()
+ */
+#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name)
+
+int evrpc_unregister_rpc(struct evrpc_base *base, const char *name);
+
+/*
+ * Client-side RPC support
+ */
+
+struct evhttp_connection;
+struct evrpc_status;
+
+/** launches an RPC and sends it to the server
+ *
+ * EVRPC_MAKE_REQUEST() is used by the client to send an RPC to the server.
+ *
+ * @param name the name of the RPC
+ * @param pool the evrpc_pool that contains the connection objects over which
+ * the request should be sent.
+ * @param request a pointer to the RPC request structure - it contains the
+ * data to be sent to the server.
+ * @param reply a pointer to the RPC reply structure. It is going to be filled
+ * if the request was answered successfully
+ * @param cb the callback to invoke when the RPC request has been answered
+ * @param cbarg an additional argument to be passed to the client
+ * @return 0 on success, -1 on failure
+ */
+#define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg) \
+ evrpc_send_request_##name((pool), (request), (reply), (cb), (cbarg))
+
+/**
+ Makes an RPC request based on the provided context.
+
+ This is a low-level function and should not be used directly
+ unless a custom context object is provided. Use EVRPC_MAKE_REQUEST()
+ instead.
+
+ @param ctx a context from EVRPC_MAKE_CTX()
+ @returns 0 on success, -1 otherwise.
+ @see EVRPC_MAKE_REQUEST(), EVRPC_MAKE_CTX()
+*/
+int evrpc_make_request(struct evrpc_request_wrapper *ctx);
+
+/** creates an rpc connection pool
+ *
+ * a pool has a number of connections associated with it.
+ * rpc requests are always made via a pool.
+ *
+ * @param base a pointer to an struct event_based object; can be left NULL
+ * in singled-threaded applications
+ * @return a newly allocated struct evrpc_pool object
+ * @see evrpc_pool_free()
+ */
+struct evrpc_pool *evrpc_pool_new(struct event_base *base);
+/** frees an rpc connection pool
+ *
+ * @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new()
+ * @see evrpc_pool_new()
+ */
+void evrpc_pool_free(struct evrpc_pool *pool);
+
+/**
+ * Adds a connection over which rpc can be dispatched to the pool.
+ *
+ * The connection object must have been newly created.
+ *
+ * @param pool the pool to which to add the connection
+ * @param evcon the connection to add to the pool.
+ */
+void evrpc_pool_add_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *evcon);
+
+/**
+ * Removes a connection from the pool.
+ *
+ * The connection object must have been newly created.
+ *
+ * @param pool the pool from which to remove the connection
+ * @param evcon the connection to remove from the pool.
+ */
+void evrpc_pool_remove_connection(struct evrpc_pool *pool,
+ struct evhttp_connection *evcon);
+
+/**
+ * Sets the timeout in secs after which a request has to complete. The
+ * RPC is completely aborted if it does not complete by then. Setting
+ * the timeout to 0 means that it never timeouts and can be used to
+ * implement callback type RPCs.
+ *
+ * Any connection already in the pool will be updated with the new
+ * timeout. Connections added to the pool after set_timeout has be
+ * called receive the pool timeout only if no timeout has been set
+ * for the connection itself.
+ *
+ * @param pool a pointer to a struct evrpc_pool object
+ * @param timeout_in_secs the number of seconds after which a request should
+ * timeout and a failure be returned to the callback.
+ */
+void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs);
+
+/**
+ * Hooks for changing the input and output of RPCs; this can be used to
+ * implement compression, authentication, encryption, ...
+ */
+
+enum EVRPC_HOOK_TYPE {
+ EVRPC_INPUT, /**< apply the function to an input hook */
+ EVRPC_OUTPUT /**< apply the function to an output hook */
+};
+
+#ifndef _WIN32
+/** Deprecated alias for EVRPC_INPUT. Not available on windows, where it
+ * conflicts with platform headers. */
+#define INPUT EVRPC_INPUT
+/** Deprecated alias for EVRPC_OUTPUT. Not available on windows, where it
+ * conflicts with platform headers. */
+#define OUTPUT EVRPC_OUTPUT
+#endif
+
+/**
+ * Return value from hook processing functions
+ */
+
+enum EVRPC_HOOK_RESULT {
+ EVRPC_TERMINATE = -1, /**< indicates the rpc should be terminated */
+ EVRPC_CONTINUE = 0, /**< continue processing the rpc */
+ EVRPC_PAUSE = 1 /**< pause processing request until resumed */
+};
+
+/** adds a processing hook to either an rpc base or rpc pool
+ *
+ * If a hook returns TERMINATE, the processing is aborted. On CONTINUE,
+ * the request is immediately processed after the hook returns. If the
+ * hook returns PAUSE, request processing stops until evrpc_resume_request()
+ * has been called.
+ *
+ * The add functions return handles that can be used for removing hooks.
+ *
+ * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
+ * @param hook_type either INPUT or OUTPUT
+ * @param cb the callback to call when the hook is activated
+ * @param cb_arg an additional argument for the callback
+ * @return a handle to the hook so it can be removed later
+ * @see evrpc_remove_hook()
+ */
+void *evrpc_add_hook(void *vbase,
+ enum EVRPC_HOOK_TYPE hook_type,
+ int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *),
+ void *cb_arg);
+
+/** removes a previously added hook
+ *
+ * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
+ * @param hook_type either INPUT or OUTPUT
+ * @param handle a handle returned by evrpc_add_hook()
+ * @return 1 on success or 0 on failure
+ * @see evrpc_add_hook()
+ */
+int evrpc_remove_hook(void *vbase,
+ enum EVRPC_HOOK_TYPE hook_type,
+ void *handle);
+
+/** resume a paused request
+ *
+ * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
+ * @param ctx the context pointer provided to the original hook call
+ */
+int
+evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
+
+/** adds meta data to request
+ *
+ * evrpc_hook_add_meta() allows hooks to add meta data to a request. for
+ * a client request, the meta data can be inserted by an outgoing request hook
+ * and retrieved by the incoming request hook.
+ *
+ * @param ctx the context provided to the hook call
+ * @param key a NUL-terminated c-string
+ * @param data the data to be associated with the key
+ * @param data_size the size of the data
+ */
+void evrpc_hook_add_meta(void *ctx, const char *key,
+ const void *data, size_t data_size);
+
+/** retrieves meta data previously associated
+ *
+ * evrpc_hook_find_meta() can be used to retrieve meta data associated to a
+ * request by a previous hook.
+ * @param ctx the context provided to the hook call
+ * @param key a NUL-terminated c-string
+ * @param data pointer to a data pointer that will contain the retrieved data
+ * @param data_size pointer to the size of the data
+ * @return 0 on success or -1 on failure
+ */
+int evrpc_hook_find_meta(void *ctx, const char *key,
+ void **data, size_t *data_size);
+
+/**
+ * returns the connection object associated with the request
+ *
+ * @param ctx the context provided to the hook call
+ * @return a pointer to the evhttp_connection object
+ */
+struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
+
+/**
+ Function for sending a generic RPC request.
+
+ Do not call this function directly, use EVRPC_MAKE_REQUEST() instead.
+
+ @see EVRPC_MAKE_REQUEST()
+ */
+int evrpc_send_request_generic(struct evrpc_pool *pool,
+ void *request, void *reply,
+ void (*cb)(struct evrpc_status *, void *, void *, void *),
+ void *cb_arg,
+ const char *rpcname,
+ void (*req_marshal)(struct evbuffer *, void *),
+ void (*rpl_clear)(void *),
+ int (*rpl_unmarshal)(void *, struct evbuffer *));
+
+/**
+ Function for registering a generic RPC with the RPC base.
+
+ Do not call this function directly, use EVRPC_REGISTER() instead.
+
+ @see EVRPC_REGISTER()
+ */
+int
+evrpc_register_generic(struct evrpc_base *base, const char *name,
+ void (*callback)(struct evrpc_req_generic *, void *), void *cbarg,
+ void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *),
+ int (*req_unmarshal)(void *, struct evbuffer *),
+ void *(*rpl_new)(void *), void *rpl_new_arg, void (*rpl_free)(void *),
+ int (*rpl_complete)(void *),
+ void (*rpl_marshal)(struct evbuffer *, void *));
+
+/** accessors for obscure and undocumented functionality */
+struct evrpc_pool* evrpc_request_get_pool(struct evrpc_request_wrapper *ctx);
+void evrpc_request_set_pool(struct evrpc_request_wrapper *ctx,
+ struct evrpc_pool *pool);
+void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx,
+ void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg),
+ void *cb_arg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_RPC_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/rpc_compat.h b/sntp/libevent/include/event2/rpc_compat.h
new file mode 100644
index 000000000000..8d8334d25f9d
--- /dev/null
+++ b/sntp/libevent/include/event2/rpc_compat.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_RPC_COMPAT_H_INCLUDED_
+#define EVENT2_RPC_COMPAT_H_INCLUDED_
+
+/** @file event2/rpc_compat.h
+
+ Deprecated versions of the functions in rpc.h: provided only for
+ backwards compatibility.
+
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** backwards compatible accessors that work only with gcc */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+
+#undef EVTAG_ASSIGN
+#undef EVTAG_GET
+#undef EVTAG_ADD
+
+#define EVTAG_ASSIGN(msg, member, args...) \
+ (*(msg)->base->member##_assign)(msg, ## args)
+#define EVTAG_GET(msg, member, args...) \
+ (*(msg)->base->member##_get)(msg, ## args)
+#define EVTAG_ADD(msg, member, args...) \
+ (*(msg)->base->member##_add)(msg, ## args)
+#endif
+#define EVTAG_LEN(msg, member) ((msg)->member##_length)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/rpc_struct.h b/sntp/libevent/include/event2/rpc_struct.h
new file mode 100644
index 000000000000..8f691f49fbcd
--- /dev/null
+++ b/sntp/libevent/include/event2/rpc_struct.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_RPC_STRUCT_H_INCLUDED_
+#define EVENT2_RPC_STRUCT_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @file event2/rpc_struct.h
+
+ Structures used by rpc.h. Using these structures directly may harm
+ forward compatibility: be careful!
+
+ */
+
+/**
+ * provides information about the completed RPC request.
+ */
+struct evrpc_status {
+#define EVRPC_STATUS_ERR_NONE 0
+#define EVRPC_STATUS_ERR_TIMEOUT 1
+#define EVRPC_STATUS_ERR_BADPAYLOAD 2
+#define EVRPC_STATUS_ERR_UNSTARTED 3
+#define EVRPC_STATUS_ERR_HOOKABORTED 4
+ int error;
+
+ /* for looking at headers or other information */
+ struct evhttp_request *http_req;
+};
+
+/* the structure below needs to be synchronized with evrpc_req_generic */
+
+/* Encapsulates a request */
+struct evrpc {
+ TAILQ_ENTRY(evrpc) next;
+
+ /* the URI at which the request handler lives */
+ const char* uri;
+
+ /* creates a new request structure */
+ void *(*request_new)(void *);
+ void *request_new_arg;
+
+ /* frees the request structure */
+ void (*request_free)(void *);
+
+ /* unmarshals the buffer into the proper request structure */
+ int (*request_unmarshal)(void *, struct evbuffer *);
+
+ /* creates a new reply structure */
+ void *(*reply_new)(void *);
+ void *reply_new_arg;
+
+ /* frees the reply structure */
+ void (*reply_free)(void *);
+
+ /* verifies that the reply is valid */
+ int (*reply_complete)(void *);
+
+ /* marshals the reply into a buffer */
+ void (*reply_marshal)(struct evbuffer*, void *);
+
+ /* the callback invoked for each received rpc */
+ void (*cb)(struct evrpc_req_generic *, void *);
+ void *cb_arg;
+
+ /* reference for further configuration */
+ struct evrpc_base *base;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_RPC_STRUCT_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/tag.h b/sntp/libevent/include/event2/tag.h
new file mode 100644
index 000000000000..2f73bfc00e93
--- /dev/null
+++ b/sntp/libevent/include/event2/tag.h
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_TAG_H_INCLUDED_
+#define EVENT2_TAG_H_INCLUDED_
+
+/** @file event2/tag.h
+
+ Helper functions for reading and writing tagged data onto buffers.
+
+ */
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/* For int types. */
+#include <event2/util.h>
+
+struct evbuffer;
+
+/*
+ * Marshaling tagged data - We assume that all tags are inserted in their
+ * numeric order - so that unknown tags will always be higher than the
+ * known ones - and we can just ignore the end of an event buffer.
+ */
+
+EVENT2_EXPORT_SYMBOL
+void evtag_init(void);
+
+/**
+ Unmarshals the header and returns the length of the payload
+
+ @param evbuf the buffer from which to unmarshal data
+ @param ptag a pointer in which the tag id is being stored
+ @returns -1 on failure or the number of bytes in the remaining payload.
+*/
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_header(struct evbuffer *evbuf, ev_uint32_t *ptag);
+
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, const void *data,
+ ev_uint32_t len);
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal_buffer(struct evbuffer *evbuf, ev_uint32_t tag,
+ struct evbuffer *data);
+
+/**
+ Encode an integer and store it in an evbuffer.
+
+ We encode integers by nybbles; the first nibble contains the number
+ of significant nibbles - 1; this allows us to encode up to 64-bit
+ integers. This function is byte-order independent.
+
+ @param evbuf evbuffer to store the encoded number
+ @param number a 32-bit integer
+ */
+EVENT2_EXPORT_SYMBOL
+void evtag_encode_int(struct evbuffer *evbuf, ev_uint32_t number);
+EVENT2_EXPORT_SYMBOL
+void evtag_encode_int64(struct evbuffer *evbuf, ev_uint64_t number);
+
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag,
+ ev_uint32_t integer);
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal_int64(struct evbuffer *evbuf, ev_uint32_t tag,
+ ev_uint64_t integer);
+
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag,
+ const char *string);
+
+EVENT2_EXPORT_SYMBOL
+void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag,
+ struct timeval *tv);
+
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag,
+ struct evbuffer *dst);
+EVENT2_EXPORT_SYMBOL
+int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag);
+EVENT2_EXPORT_SYMBOL
+int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength);
+EVENT2_EXPORT_SYMBOL
+int evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength);
+EVENT2_EXPORT_SYMBOL
+int evtag_consume(struct evbuffer *evbuf);
+
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ ev_uint32_t *pinteger);
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_int64(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ ev_uint64_t *pinteger);
+
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag,
+ void *data, size_t len);
+
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ char **pstring);
+
+EVENT2_EXPORT_SYMBOL
+int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag,
+ struct timeval *ptv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_TAG_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/tag_compat.h b/sntp/libevent/include/event2/tag_compat.h
new file mode 100644
index 000000000000..a276c0d35b6e
--- /dev/null
+++ b/sntp/libevent/include/event2/tag_compat.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_TAG_COMPAT_H_INCLUDED_
+#define EVENT2_TAG_COMPAT_H_INCLUDED_
+
+/** @file event2/tag_compat.h
+
+ Obsolete/deprecated functions from tag.h; provided only for backwards
+ compatibility.
+ */
+
+/**
+ @name Misnamed functions
+
+ @deprecated These macros are deprecated because their names don't follow
+ Libevent's naming conventions. Use evtag_encode_int and
+ evtag_encode_int64 instead.
+
+ @{
+*/
+#define encode_int(evbuf, number) evtag_encode_int((evbuf), (number))
+#define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number))
+/**@}*/
+
+#endif /* EVENT2_TAG_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/thread.h b/sntp/libevent/include/event2/thread.h
new file mode 100644
index 000000000000..b51998631b7a
--- /dev/null
+++ b/sntp/libevent/include/event2/thread.h
@@ -0,0 +1,253 @@
+/*
+ * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_THREAD_H_INCLUDED_
+#define EVENT2_THREAD_H_INCLUDED_
+
+/** @file event2/thread.h
+
+ Functions for multi-threaded applications using Libevent.
+
+ When using a multi-threaded application in which multiple threads
+ add and delete events from a single event base, Libevent needs to
+ lock its data structures.
+
+ Like the memory-management function hooks, all of the threading functions
+ _must_ be set up before an event_base is created if you want the base to
+ use them.
+
+ Most programs will either be using Windows threads or Posix threads. You
+ can configure Libevent to use one of these event_use_windows_threads() or
+ event_use_pthreads() respectively. If you're using another threading
+ library, you'll need to configure threading functions manually using
+ evthread_set_lock_callbacks() and evthread_set_condition_callbacks().
+
+ */
+
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+
+/**
+ @name Flags passed to lock functions
+
+ @{
+*/
+/** A flag passed to a locking callback when the lock was allocated as a
+ * read-write lock, and we want to acquire or release the lock for writing. */
+#define EVTHREAD_WRITE 0x04
+/** A flag passed to a locking callback when the lock was allocated as a
+ * read-write lock, and we want to acquire or release the lock for reading. */
+#define EVTHREAD_READ 0x08
+/** A flag passed to a locking callback when we don't want to block waiting
+ * for the lock; if we can't get the lock immediately, we will instead
+ * return nonzero from the locking callback. */
+#define EVTHREAD_TRY 0x10
+/**@}*/
+
+#if !defined(EVENT__DISABLE_THREAD_SUPPORT) || defined(EVENT_IN_DOXYGEN_)
+
+#define EVTHREAD_LOCK_API_VERSION 1
+
+/**
+ @name Types of locks
+
+ @{*/
+/** A recursive lock is one that can be acquired multiple times at once by the
+ * same thread. No other process can allocate the lock until the thread that
+ * has been holding it has unlocked it as many times as it locked it. */
+#define EVTHREAD_LOCKTYPE_RECURSIVE 1
+/* A read-write lock is one that allows multiple simultaneous readers, but
+ * where any one writer excludes all other writers and readers. */
+#define EVTHREAD_LOCKTYPE_READWRITE 2
+/**@}*/
+
+/** This structure describes the interface a threading library uses for
+ * locking. It's used to tell evthread_set_lock_callbacks() how to use
+ * locking on this platform.
+ */
+struct evthread_lock_callbacks {
+ /** The current version of the locking API. Set this to
+ * EVTHREAD_LOCK_API_VERSION */
+ int lock_api_version;
+ /** Which kinds of locks does this version of the locking API
+ * support? A bitfield of EVTHREAD_LOCKTYPE_RECURSIVE and
+ * EVTHREAD_LOCKTYPE_READWRITE.
+ *
+ * (Note that RECURSIVE locks are currently mandatory, and
+ * READWRITE locks are not currently used.)
+ **/
+ unsigned supported_locktypes;
+ /** Function to allocate and initialize new lock of type 'locktype'.
+ * Returns NULL on failure. */
+ void *(*alloc)(unsigned locktype);
+ /** Funtion to release all storage held in 'lock', which was created
+ * with type 'locktype'. */
+ void (*free)(void *lock, unsigned locktype);
+ /** Acquire an already-allocated lock at 'lock' with mode 'mode'.
+ * Returns 0 on success, and nonzero on failure. */
+ int (*lock)(unsigned mode, void *lock);
+ /** Release a lock at 'lock' using mode 'mode'. Returns 0 on success,
+ * and nonzero on failure. */
+ int (*unlock)(unsigned mode, void *lock);
+};
+
+/** Sets a group of functions that Libevent should use for locking.
+ * For full information on the required callback API, see the
+ * documentation for the individual members of evthread_lock_callbacks.
+ *
+ * Note that if you're using Windows or the Pthreads threading library, you
+ * probably shouldn't call this function; instead, use
+ * evthread_use_windows_threads() or evthread_use_posix_threads() if you can.
+ */
+EVENT2_EXPORT_SYMBOL
+int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *);
+
+#define EVTHREAD_CONDITION_API_VERSION 1
+
+struct timeval;
+
+/** This structure describes the interface a threading library uses for
+ * condition variables. It's used to tell evthread_set_condition_callbacks
+ * how to use locking on this platform.
+ */
+struct evthread_condition_callbacks {
+ /** The current version of the conditions API. Set this to
+ * EVTHREAD_CONDITION_API_VERSION */
+ int condition_api_version;
+ /** Function to allocate and initialize a new condition variable.
+ * Returns the condition variable on success, and NULL on failure.
+ * The 'condtype' argument will be 0 with this API version.
+ */
+ void *(*alloc_condition)(unsigned condtype);
+ /** Function to free a condition variable. */
+ void (*free_condition)(void *cond);
+ /** Function to signal a condition variable. If 'broadcast' is 1, all
+ * threads waiting on 'cond' should be woken; otherwise, only on one
+ * thread is worken. Should return 0 on success, -1 on failure.
+ * This function will only be called while holding the associated
+ * lock for the condition.
+ */
+ int (*signal_condition)(void *cond, int broadcast);
+ /** Function to wait for a condition variable. The lock 'lock'
+ * will be held when this function is called; should be released
+ * while waiting for the condition to be come signalled, and
+ * should be held again when this function returns.
+ * If timeout is provided, it is interval of seconds to wait for
+ * the event to become signalled; if it is NULL, the function
+ * should wait indefinitely.
+ *
+ * The function should return -1 on error; 0 if the condition
+ * was signalled, or 1 on a timeout. */
+ int (*wait_condition)(void *cond, void *lock,
+ const struct timeval *timeout);
+};
+
+/** Sets a group of functions that Libevent should use for condition variables.
+ * For full information on the required callback API, see the
+ * documentation for the individual members of evthread_condition_callbacks.
+ *
+ * Note that if you're using Windows or the Pthreads threading library, you
+ * probably shouldn't call this function; instead, use
+ * evthread_use_windows_threads() or evthread_use_pthreads() if you can.
+ */
+EVENT2_EXPORT_SYMBOL
+int evthread_set_condition_callbacks(
+ const struct evthread_condition_callbacks *);
+
+/**
+ Sets the function for determining the thread id.
+
+ @param base the event base for which to set the id function
+ @param id_fn the identify function Libevent should invoke to
+ determine the identity of a thread.
+*/
+EVENT2_EXPORT_SYMBOL
+void evthread_set_id_callback(
+ unsigned long (*id_fn)(void));
+
+#if (defined(_WIN32) && !defined(EVENT__DISABLE_THREAD_SUPPORT)) || defined(EVENT_IN_DOXYGEN_)
+/** Sets up Libevent for use with Windows builtin locking and thread ID
+ functions. Unavailable if Libevent is not built for Windows.
+
+ @return 0 on success, -1 on failure. */
+EVENT2_EXPORT_SYMBOL
+int evthread_use_windows_threads(void);
+/**
+ Defined if Libevent was built with support for evthread_use_windows_threads()
+*/
+#define EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED 1
+#endif
+
+#if defined(EVENT__HAVE_PTHREADS) || defined(EVENT_IN_DOXYGEN_)
+/** Sets up Libevent for use with Pthreads locking and thread ID functions.
+ Unavailable if Libevent is not build for use with pthreads. Requires
+ libraries to link against Libevent_pthreads as well as Libevent.
+
+ @return 0 on success, -1 on failure. */
+EVENT2_EXPORT_SYMBOL
+int evthread_use_pthreads(void);
+/** Defined if Libevent was built with support for evthread_use_pthreads() */
+#define EVTHREAD_USE_PTHREADS_IMPLEMENTED 1
+
+#endif
+
+/** Enable debugging wrappers around the current lock callbacks. If Libevent
+ * makes one of several common locking errors, exit with an assertion failure.
+ *
+ * If you're going to call this function, you must do so before any locks are
+ * allocated.
+ **/
+EVENT2_EXPORT_SYMBOL
+void evthread_enable_lock_debugging(void);
+
+/* Old (misspelled) version: This is deprecated; use
+ * evthread_enable_log_debugging instead. */
+EVENT2_EXPORT_SYMBOL
+void evthread_enable_lock_debuging(void);
+
+#endif /* EVENT__DISABLE_THREAD_SUPPORT */
+
+struct event_base;
+/** Make sure it's safe to tell an event base to wake up from another thread
+ or a signal handler.
+
+ You shouldn't need to call this by hand; configuring the base with thread
+ support should be necessary and sufficient.
+
+ @return 0 on success, -1 on failure.
+ */
+EVENT2_EXPORT_SYMBOL
+int evthread_make_base_notifiable(struct event_base *base);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT2_THREAD_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/util.h b/sntp/libevent/include/event2/util.h
new file mode 100644
index 000000000000..14c6a25d7a86
--- /dev/null
+++ b/sntp/libevent/include/event2/util.h
@@ -0,0 +1,768 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_UTIL_H_INCLUDED_
+#define EVENT2_UTIL_H_INCLUDED_
+
+/** @file event2/util.h
+
+ Common convenience functions for cross-platform portability and
+ related socket manipulations.
+
+ */
+#include <event2/visibility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <event2/event-config.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(EVENT__HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#ifdef EVENT__HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef EVENT__HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#ifdef _MSC_VER
+#include <BaseTsd.h>
+#endif
+#include <stdarg.h>
+#ifdef EVENT__HAVE_NETDB_H
+#if !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+#include <netdb.h>
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#ifdef EVENT__HAVE_GETADDRINFO
+/* for EAI_* definitions. */
+#include <ws2tcpip.h>
+#endif
+#else
+#include <sys/socket.h>
+#endif
+
+/* Some openbsd autoconf versions get the name of this macro wrong. */
+#if defined(EVENT__SIZEOF_VOID__) && !defined(EVENT__SIZEOF_VOID_P)
+#define EVENT__SIZEOF_VOID_P EVENT__SIZEOF_VOID__
+#endif
+
+/**
+ * @name Standard integer types.
+ *
+ * Integer type definitions for types that are supposed to be defined in the
+ * C99-specified stdint.h. Shamefully, some platforms do not include
+ * stdint.h, so we need to replace it. (If you are on a platform like this,
+ * your C headers are now over 10 years out of date. You should bug them to
+ * do something about this.)
+ *
+ * We define:
+ *
+ * <dl>
+ * <dt>ev_uint64_t, ev_uint32_t, ev_uint16_t, ev_uint8_t</dt>
+ * <dd>unsigned integer types of exactly 64, 32, 16, and 8 bits
+ * respectively.</dd>
+ * <dt>ev_int64_t, ev_int32_t, ev_int16_t, ev_int8_t</dt>
+ * <dd>signed integer types of exactly 64, 32, 16, and 8 bits
+ * respectively.</dd>
+ * <dt>ev_uintptr_t, ev_intptr_t</dt>
+ * <dd>unsigned/signed integers large enough
+ * to hold a pointer without loss of bits.</dd>
+ * <dt>ev_ssize_t</dt>
+ * <dd>A signed type of the same size as size_t</dd>
+ * <dt>ev_off_t</dt>
+ * <dd>A signed type typically used to represent offsets within a
+ * (potentially large) file</dd>
+ *
+ * @{
+ */
+#ifdef EVENT__HAVE_UINT64_T
+#define ev_uint64_t uint64_t
+#define ev_int64_t int64_t
+#elif defined(_WIN32)
+#define ev_uint64_t unsigned __int64
+#define ev_int64_t signed __int64
+#elif EVENT__SIZEOF_LONG_LONG == 8
+#define ev_uint64_t unsigned long long
+#define ev_int64_t long long
+#elif EVENT__SIZEOF_LONG == 8
+#define ev_uint64_t unsigned long
+#define ev_int64_t long
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_uint64_t ...
+#define ev_int64_t ...
+#else
+#error "No way to define ev_uint64_t"
+#endif
+
+#ifdef EVENT__HAVE_UINT32_T
+#define ev_uint32_t uint32_t
+#define ev_int32_t int32_t
+#elif defined(_WIN32)
+#define ev_uint32_t unsigned int
+#define ev_int32_t signed int
+#elif EVENT__SIZEOF_LONG == 4
+#define ev_uint32_t unsigned long
+#define ev_int32_t signed long
+#elif EVENT__SIZEOF_INT == 4
+#define ev_uint32_t unsigned int
+#define ev_int32_t signed int
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_uint32_t ...
+#define ev_int32_t ...
+#else
+#error "No way to define ev_uint32_t"
+#endif
+
+#ifdef EVENT__HAVE_UINT16_T
+#define ev_uint16_t uint16_t
+#define ev_int16_t int16_t
+#elif defined(_WIN32)
+#define ev_uint16_t unsigned short
+#define ev_int16_t signed short
+#elif EVENT__SIZEOF_INT == 2
+#define ev_uint16_t unsigned int
+#define ev_int16_t signed int
+#elif EVENT__SIZEOF_SHORT == 2
+#define ev_uint16_t unsigned short
+#define ev_int16_t signed short
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_uint16_t ...
+#define ev_int16_t ...
+#else
+#error "No way to define ev_uint16_t"
+#endif
+
+#ifdef EVENT__HAVE_UINT8_T
+#define ev_uint8_t uint8_t
+#define ev_int8_t int8_t
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_uint8_t ...
+#define ev_int8_t ...
+#else
+#define ev_uint8_t unsigned char
+#define ev_int8_t signed char
+#endif
+
+#ifdef EVENT__HAVE_UINTPTR_T
+#define ev_uintptr_t uintptr_t
+#define ev_intptr_t intptr_t
+#elif EVENT__SIZEOF_VOID_P <= 4
+#define ev_uintptr_t ev_uint32_t
+#define ev_intptr_t ev_int32_t
+#elif EVENT__SIZEOF_VOID_P <= 8
+#define ev_uintptr_t ev_uint64_t
+#define ev_intptr_t ev_int64_t
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_uintptr_t ...
+#define ev_intptr_t ...
+#else
+#error "No way to define ev_uintptr_t"
+#endif
+
+#ifdef EVENT__ssize_t
+#define ev_ssize_t EVENT__ssize_t
+#else
+#define ev_ssize_t ssize_t
+#endif
+
+/* Note that we define ev_off_t based on the compile-time size of off_t that
+ * we used to build Libevent, and not based on the current size of off_t.
+ * (For example, we don't define ev_off_t to off_t.). We do this because
+ * some systems let you build your software with different off_t sizes
+ * at runtime, and so putting in any dependency on off_t would risk API
+ * mismatch.
+ */
+#ifdef _WIN32
+#define ev_off_t ev_int64_t
+#elif EVENT__SIZEOF_OFF_T == 8
+#define ev_off_t ev_int64_t
+#elif EVENT__SIZEOF_OFF_T == 4
+#define ev_off_t ev_int32_t
+#elif defined(EVENT_IN_DOXYGEN_)
+#define ev_off_t ...
+#else
+#define ev_off_t off_t
+#endif
+/**@}*/
+
+/* Limits for integer types.
+
+ We're making two assumptions here:
+ - The compiler does constant folding properly.
+ - The platform does signed arithmetic in two's complement.
+*/
+
+/**
+ @name Limits for integer types
+
+ These macros hold the largest or smallest values possible for the
+ ev_[u]int*_t types.
+
+ @{
+*/
+#define EV_UINT64_MAX ((((ev_uint64_t)0xffffffffUL) << 32) | 0xffffffffUL)
+#define EV_INT64_MAX ((((ev_int64_t) 0x7fffffffL) << 32) | 0xffffffffL)
+#define EV_INT64_MIN ((-EV_INT64_MAX) - 1)
+#define EV_UINT32_MAX ((ev_uint32_t)0xffffffffUL)
+#define EV_INT32_MAX ((ev_int32_t) 0x7fffffffL)
+#define EV_INT32_MIN ((-EV_INT32_MAX) - 1)
+#define EV_UINT16_MAX ((ev_uint16_t)0xffffUL)
+#define EV_INT16_MAX ((ev_int16_t) 0x7fffL)
+#define EV_INT16_MIN ((-EV_INT16_MAX) - 1)
+#define EV_UINT8_MAX 255
+#define EV_INT8_MAX 127
+#define EV_INT8_MIN ((-EV_INT8_MAX) - 1)
+/** @} */
+
+/**
+ @name Limits for SIZE_T and SSIZE_T
+
+ @{
+*/
+#if EVENT__SIZEOF_SIZE_T == 8
+#define EV_SIZE_MAX EV_UINT64_MAX
+#define EV_SSIZE_MAX EV_INT64_MAX
+#elif EVENT__SIZEOF_SIZE_T == 4
+#define EV_SIZE_MAX EV_UINT32_MAX
+#define EV_SSIZE_MAX EV_INT32_MAX
+#elif defined(EVENT_IN_DOXYGEN_)
+#define EV_SIZE_MAX ...
+#define EV_SSIZE_MAX ...
+#else
+#error "No way to define SIZE_MAX"
+#endif
+
+#define EV_SSIZE_MIN ((-EV_SSIZE_MAX) - 1)
+/**@}*/
+
+#ifdef _WIN32
+#define ev_socklen_t int
+#elif defined(EVENT__socklen_t)
+#define ev_socklen_t EVENT__socklen_t
+#else
+#define ev_socklen_t socklen_t
+#endif
+
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
+#if !defined(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \
+ && !defined(ss_family)
+#define ss_family __ss_family
+#endif
+#endif
+
+/**
+ * A type wide enough to hold the output of "socket()" or "accept()". On
+ * Windows, this is an intptr_t; elsewhere, it is an int. */
+#ifdef _WIN32
+#define evutil_socket_t intptr_t
+#else
+#define evutil_socket_t int
+#endif
+
+/** Create two new sockets that are connected to each other.
+
+ On Unix, this simply calls socketpair(). On Windows, it uses the
+ loopback network interface on 127.0.0.1, and only
+ AF_INET,SOCK_STREAM are supported.
+
+ (This may fail on some Windows hosts where firewall software has cleverly
+ decided to keep 127.0.0.1 from talking to itself.)
+
+ Parameters and return values are as for socketpair()
+*/
+EVENT2_EXPORT_SYMBOL
+int evutil_socketpair(int d, int type, int protocol, evutil_socket_t sv[2]);
+/** Do platform-specific operations as needed to make a socket nonblocking.
+
+ @param sock The socket to make nonblocking
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_socket_nonblocking(evutil_socket_t sock);
+
+/** Do platform-specific operations to make a listener socket reusable.
+
+ Specifically, we want to make sure that another program will be able
+ to bind this address right after we've closed the listener.
+
+ This differs from Windows's interpretation of "reusable", which
+ allows multiple listeners to bind the same address at the same time.
+
+ @param sock The socket to make reusable
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
+
+/** Do platform-specific operations as needed to close a socket upon a
+ successful execution of one of the exec*() functions.
+
+ @param sock The socket to be closed
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_socket_closeonexec(evutil_socket_t sock);
+
+/** Do the platform-specific call needed to close a socket returned from
+ socket() or accept().
+
+ @param sock The socket to be closed
+ @return 0 on success, -1 on failure
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_closesocket(evutil_socket_t sock);
+#define EVUTIL_CLOSESOCKET(s) evutil_closesocket(s)
+
+/** Do platform-specific operations, if possible, to make a tcp listener
+ * socket defer accept()s until there is data to read.
+ *
+ * Not all platforms support this. You don't want to do this for every
+ * listener socket: only the ones that implement a protocol where the
+ * client transmits before the server needs to respond.
+ *
+ * @param sock The listening socket to to make deferred
+ * @return 0 on success (whether the operation is supported or not),
+ * -1 on failure
+*/
+EVENT2_EXPORT_SYMBOL
+int evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock);
+
+#ifdef _WIN32
+/** Return the most recent socket error. Not idempotent on all platforms. */
+#define EVUTIL_SOCKET_ERROR() WSAGetLastError()
+/** Replace the most recent socket error with errcode */
+#define EVUTIL_SET_SOCKET_ERROR(errcode) \
+ do { WSASetLastError(errcode); } while (0)
+/** Return the most recent socket error to occur on sock. */
+EVENT2_EXPORT_SYMBOL
+int evutil_socket_geterror(evutil_socket_t sock);
+/** Convert a socket error to a string. */
+EVENT2_EXPORT_SYMBOL
+const char *evutil_socket_error_to_string(int errcode);
+#elif defined(EVENT_IN_DOXYGEN_)
+/**
+ @name Socket error functions
+
+ These functions are needed for making programs compatible between
+ Windows and Unix-like platforms.
+
+ You see, Winsock handles socket errors differently from the rest of
+ the world. Elsewhere, a socket error is like any other error and is
+ stored in errno. But winsock functions require you to retrieve the
+ error with a special function, and don't let you use strerror for
+ the error codes. And handling EWOULDBLOCK is ... different.
+
+ @{
+*/
+/** Return the most recent socket error. Not idempotent on all platforms. */
+#define EVUTIL_SOCKET_ERROR() ...
+/** Replace the most recent socket error with errcode */
+#define EVUTIL_SET_SOCKET_ERROR(errcode) ...
+/** Return the most recent socket error to occur on sock. */
+#define evutil_socket_geterror(sock) ...
+/** Convert a socket error to a string. */
+#define evutil_socket_error_to_string(errcode) ...
+/**@}*/
+#else
+#define EVUTIL_SOCKET_ERROR() (errno)
+#define EVUTIL_SET_SOCKET_ERROR(errcode) \
+ do { errno = (errcode); } while (0)
+#define evutil_socket_geterror(sock) (errno)
+#define evutil_socket_error_to_string(errcode) (strerror(errcode))
+#endif
+
+
+/**
+ * @name Manipulation macros for struct timeval.
+ *
+ * We define replacements
+ * for timeradd, timersub, timerclear, timercmp, and timerisset.
+ *
+ * @{
+ */
+#ifdef EVENT__HAVE_TIMERADD
+#define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp))
+#define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp))
+#else
+#define evutil_timeradd(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
+ if ((vvp)->tv_usec >= 1000000) { \
+ (vvp)->tv_sec++; \
+ (vvp)->tv_usec -= 1000000; \
+ } \
+ } while (0)
+#define evutil_timersub(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
+ if ((vvp)->tv_usec < 0) { \
+ (vvp)->tv_sec--; \
+ (vvp)->tv_usec += 1000000; \
+ } \
+ } while (0)
+#endif /* !EVENT__HAVE_TIMERADD */
+
+#ifdef EVENT__HAVE_TIMERCLEAR
+#define evutil_timerclear(tvp) timerclear(tvp)
+#else
+#define evutil_timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
+#endif
+/**@}*/
+
+/** Return true iff the tvp is related to uvp according to the relational
+ * operator cmp. Recognized values for cmp are ==, <=, <, >=, and >. */
+#define evutil_timercmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+
+#ifdef EVENT__HAVE_TIMERISSET
+#define evutil_timerisset(tvp) timerisset(tvp)
+#else
+#define evutil_timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#endif
+
+/** Replacement for offsetof on platforms that don't define it. */
+#ifdef offsetof
+#define evutil_offsetof(type, field) offsetof(type, field)
+#else
+#define evutil_offsetof(type, field) ((off_t)(&((type *)0)->field))
+#endif
+
+/* big-int related functions */
+/** Parse a 64-bit value from a string. Arguments are as for strtol. */
+EVENT2_EXPORT_SYMBOL
+ev_int64_t evutil_strtoll(const char *s, char **endptr, int base);
+
+/** Replacement for gettimeofday on platforms that lack it. */
+#ifdef EVENT__HAVE_GETTIMEOFDAY
+#define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz))
+#else
+struct timezone;
+EVENT2_EXPORT_SYMBOL
+int evutil_gettimeofday(struct timeval *tv, struct timezone *tz);
+#endif
+
+/** Replacement for snprintf to get consistent behavior on platforms for
+ which the return value of snprintf does not conform to C99.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_snprintf(char *buf, size_t buflen, const char *format, ...)
+#ifdef __GNUC__
+ __attribute__((format(printf, 3, 4)))
+#endif
+;
+/** Replacement for vsnprintf to get consistent behavior on platforms for
+ which the return value of snprintf does not conform to C99.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
+#ifdef __GNUC__
+ __attribute__((format(printf, 3, 0)))
+#endif
+;
+
+/** Replacement for inet_ntop for platforms which lack it. */
+EVENT2_EXPORT_SYMBOL
+const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len);
+/** Replacement for inet_pton for platforms which lack it. */
+EVENT2_EXPORT_SYMBOL
+int evutil_inet_pton(int af, const char *src, void *dst);
+struct sockaddr;
+
+/** Parse an IPv4 or IPv6 address, with optional port, from a string.
+
+ Recognized formats are:
+ - [IPv6Address]:port
+ - [IPv6Address]
+ - IPv6Address
+ - IPv4Address:port
+ - IPv4Address
+
+ If no port is specified, the port in the output is set to 0.
+
+ @param str The string to parse.
+ @param out A struct sockaddr to hold the result. This should probably be
+ a struct sockaddr_storage.
+ @param outlen A pointer to the number of bytes that that 'out' can safely
+ hold. Set to the number of bytes used in 'out' on success.
+ @return -1 if the address is not well-formed, if the port is out of range,
+ or if out is not large enough to hold the result. Otherwise returns
+ 0 on success.
+*/
+EVENT2_EXPORT_SYMBOL
+int evutil_parse_sockaddr_port(const char *str, struct sockaddr *out, int *outlen);
+
+/** Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1
+ * preceeds sa2, or greater than 0 if sa1 follows sa2. If include_port is
+ * true, consider the port as well as the address. Only implemented for
+ * AF_INET and AF_INET6 addresses. The ordering is not guaranteed to remain
+ * the same between Libevent versions. */
+EVENT2_EXPORT_SYMBOL
+int evutil_sockaddr_cmp(const struct sockaddr *sa1, const struct sockaddr *sa2,
+ int include_port);
+
+/** As strcasecmp, but always compares the characters in locale-independent
+ ASCII. That's useful if you're handling data in ASCII-based protocols.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_ascii_strcasecmp(const char *str1, const char *str2);
+/** As strncasecmp, but always compares the characters in locale-independent
+ ASCII. That's useful if you're handling data in ASCII-based protocols.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_ascii_strncasecmp(const char *str1, const char *str2, size_t n);
+
+/* Here we define evutil_addrinfo to the native addrinfo type, or redefine it
+ * if this system has no getaddrinfo(). */
+#ifdef EVENT__HAVE_STRUCT_ADDRINFO
+#define evutil_addrinfo addrinfo
+#else
+/** A definition of struct addrinfo for systems that lack it.
+
+ (This is just an alias for struct addrinfo if the system defines
+ struct addrinfo.)
+*/
+struct evutil_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 nodename */
+ struct sockaddr *ai_addr; /* binary address */
+ struct evutil_addrinfo *ai_next; /* next structure in linked list */
+};
+#endif
+/** @name evutil_getaddrinfo() error codes
+
+ These values are possible error codes for evutil_getaddrinfo() and
+ related functions.
+
+ @{
+*/
+#if defined(EAI_ADDRFAMILY) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_ADDRFAMILY EAI_ADDRFAMILY
+#else
+#define EVUTIL_EAI_ADDRFAMILY -901
+#endif
+#if defined(EAI_AGAIN) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_AGAIN EAI_AGAIN
+#else
+#define EVUTIL_EAI_AGAIN -902
+#endif
+#if defined(EAI_BADFLAGS) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_BADFLAGS EAI_BADFLAGS
+#else
+#define EVUTIL_EAI_BADFLAGS -903
+#endif
+#if defined(EAI_FAIL) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_FAIL EAI_FAIL
+#else
+#define EVUTIL_EAI_FAIL -904
+#endif
+#if defined(EAI_FAMILY) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_FAMILY EAI_FAMILY
+#else
+#define EVUTIL_EAI_FAMILY -905
+#endif
+#if defined(EAI_MEMORY) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_MEMORY EAI_MEMORY
+#else
+#define EVUTIL_EAI_MEMORY -906
+#endif
+/* This test is a bit complicated, since some MS SDKs decide to
+ * remove NODATA or redefine it to be the same as NONAME, in a
+ * fun interpretation of RFC 2553 and RFC 3493. */
+#if defined(EAI_NODATA) && defined(EVENT__HAVE_GETADDRINFO) && (!defined(EAI_NONAME) || EAI_NODATA != EAI_NONAME)
+#define EVUTIL_EAI_NODATA EAI_NODATA
+#else
+#define EVUTIL_EAI_NODATA -907
+#endif
+#if defined(EAI_NONAME) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_NONAME EAI_NONAME
+#else
+#define EVUTIL_EAI_NONAME -908
+#endif
+#if defined(EAI_SERVICE) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_SERVICE EAI_SERVICE
+#else
+#define EVUTIL_EAI_SERVICE -909
+#endif
+#if defined(EAI_SOCKTYPE) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_SOCKTYPE EAI_SOCKTYPE
+#else
+#define EVUTIL_EAI_SOCKTYPE -910
+#endif
+#if defined(EAI_SYSTEM) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_EAI_SYSTEM EAI_SYSTEM
+#else
+#define EVUTIL_EAI_SYSTEM -911
+#endif
+
+#define EVUTIL_EAI_CANCEL -90001
+
+#if defined(AI_PASSIVE) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_PASSIVE AI_PASSIVE
+#else
+#define EVUTIL_AI_PASSIVE 0x1000
+#endif
+#if defined(AI_CANONNAME) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_CANONNAME AI_CANONNAME
+#else
+#define EVUTIL_AI_CANONNAME 0x2000
+#endif
+#if defined(AI_NUMERICHOST) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_NUMERICHOST AI_NUMERICHOST
+#else
+#define EVUTIL_AI_NUMERICHOST 0x4000
+#endif
+#if defined(AI_NUMERICSERV) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_NUMERICSERV AI_NUMERICSERV
+#else
+#define EVUTIL_AI_NUMERICSERV 0x8000
+#endif
+#if defined(AI_V4MAPPED) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_V4MAPPED AI_V4MAPPED
+#else
+#define EVUTIL_AI_V4MAPPED 0x10000
+#endif
+#if defined(AI_ALL) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_ALL AI_ALL
+#else
+#define EVUTIL_AI_ALL 0x20000
+#endif
+#if defined(AI_ADDRCONFIG) && defined(EVENT__HAVE_GETADDRINFO)
+#define EVUTIL_AI_ADDRCONFIG AI_ADDRCONFIG
+#else
+#define EVUTIL_AI_ADDRCONFIG 0x40000
+#endif
+/**@}*/
+
+struct evutil_addrinfo;
+/**
+ * This function clones getaddrinfo for systems that don't have it. For full
+ * details, see RFC 3493, section 6.1.
+ *
+ * Limitations:
+ * - When the system has no getaddrinfo, we fall back to gethostbyname_r or
+ * gethostbyname, with their attendant issues.
+ * - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
+ *
+ * For a nonblocking variant, see evdns_getaddrinfo.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_getaddrinfo(const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res);
+
+/** Release storage allocated by evutil_getaddrinfo or evdns_getaddrinfo. */
+EVENT2_EXPORT_SYMBOL
+void evutil_freeaddrinfo(struct evutil_addrinfo *ai);
+
+EVENT2_EXPORT_SYMBOL
+const char *evutil_gai_strerror(int err);
+
+/** Generate n bytes of secure pseudorandom data, and store them in buf.
+ *
+ * Current versions of Libevent use an ARC4-based random number generator,
+ * seeded using the platform's entropy source (/dev/urandom on Unix-like
+ * systems; CryptGenRandom on Windows). This is not actually as secure as it
+ * should be: ARC4 is a pretty lousy cipher, and the current implementation
+ * provides only rudimentary prediction- and backtracking-resistance. Don't
+ * use this for serious cryptographic applications.
+ */
+EVENT2_EXPORT_SYMBOL
+void evutil_secure_rng_get_bytes(void *buf, size_t n);
+
+/**
+ * Seed the secure random number generator if needed, and return 0 on
+ * success or -1 on failure.
+ *
+ * It is okay to call this function more than once; it will still return
+ * 0 if the RNG has been successfully seeded and -1 if it can't be
+ * seeded.
+ *
+ * Ordinarily you don't need to call this function from your own code;
+ * Libevent will seed the RNG itself the first time it needs good random
+ * numbers. You only need to call it if (a) you want to double-check
+ * that one of the seeding methods did succeed, or (b) you plan to drop
+ * the capability to seed (by chrooting, or dropping capabilities, or
+ * whatever), and you want to make sure that seeding happens before your
+ * program loses the ability to do it.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_secure_rng_init(void);
+
+/**
+ * Set a filename to use in place of /dev/urandom for seeding the secure
+ * PRNG. Return 0 on success, -1 on failure.
+ *
+ * Call this function BEFORE calling any other initialization or RNG
+ * functions.
+ *
+ * (This string will _NOT_ be copied internally. Do not free it while any
+ * user of the secure RNG might be running. Don't pass anything other than a
+ * real /dev/...random device file here, or you might lose security.)
+ *
+ * This API is unstable, and might change in a future libevent version.
+ */
+EVENT2_EXPORT_SYMBOL
+int evutil_secure_rng_set_urandom_device_file(char *fname);
+
+/** Seed the random number generator with extra random bytes.
+
+ You should almost never need to call this function; it should be
+ sufficient to invoke evutil_secure_rng_init(), or let Libevent take
+ care of calling evutil_secure_rng_init() on its own.
+
+ If you call this function as a _replacement_ for the regular
+ entropy sources, then you need to be sure that your input
+ contains a fairly large amount of strong entropy. Doing so is
+ notoriously hard: most people who try get it wrong. Watch out!
+
+ @param dat a buffer full of a strong source of random numbers
+ @param datlen the number of bytes to read from datlen
+ */
+EVENT2_EXPORT_SYMBOL
+void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT1_EVUTIL_H_INCLUDED_ */
diff --git a/sntp/libevent/include/event2/visibility.h b/sntp/libevent/include/event2/visibility.h
new file mode 100644
index 000000000000..5e7163a1e993
--- /dev/null
+++ b/sntp/libevent/include/event2/visibility.h
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT2_VISIBILITY_H_INCLUDED_
+#define EVENT2_VISIBILITY_H_INCLUDED_
+
+#include <event2/event-config.h>
+
+#if defined(event_EXPORTS) || defined(event_extra_EXPORTS) || defined(event_core_EXPORTS)
+
+#if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define EVENT2_EXPORT_SYMBOL __global
+#elif defined __GNUC__
+#define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default")))
+#elif defined(_MSC_VER)
+#define EVENT2_EXPORT_SYMBOL extern __declspec(dllexport)
+#else
+/* unknown compiler */
+#define EVENT2_EXPORT_SYMBOL
+#endif
+
+#else
+
+#if defined(EVENT__NEED_DLLIMPORT) && defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST)
+#define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport)
+#else
+#define EVENT2_EXPORT_SYMBOL
+#endif
+
+#endif
+
+#endif /* EVENT2_VISIBILITY_H_INCLUDED_ */
diff --git a/sntp/libevent/include/evhttp.h b/sntp/libevent/include/evhttp.h
new file mode 100644
index 000000000000..549bc9b14a3c
--- /dev/null
+++ b/sntp/libevent/include/evhttp.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT1_EVHTTP_H_INCLUDED_
+#define EVENT1_EVHTTP_H_INCLUDED_
+
+/** @file evhttp.h
+
+ An http implementation subsystem for Libevent.
+
+ The <evhttp.h> header is deprecated in Libevent 2.0 and later; please
+ use <event2/http.h> instead. Depending on what functionality you
+ need, you may also want to include more of the other <event2/...>
+ headers.
+ */
+
+#include <event.h>
+#include <event2/http.h>
+#include <event2/http_struct.h>
+#include <event2/http_compat.h>
+
+#endif /* EVENT1_EVHTTP_H_INCLUDED_ */
diff --git a/sntp/libevent/include/evrpc.h b/sntp/libevent/include/evrpc.h
new file mode 100644
index 000000000000..7e986f7dabbc
--- /dev/null
+++ b/sntp/libevent/include/evrpc.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT1_EVRPC_H_INCLUDED_
+#define EVENT1_EVRPC_H_INCLUDED_
+
+/** @file evrpc.h
+
+ An RPC system for Libevent.
+
+ The <evrpc.h> header is deprecated in Libevent 2.0 and later; please
+ use <event2/rpc.h> instead. Depending on what functionality you
+ need, you may also want to include more of the other <event2/...>
+ headers.
+ */
+
+#include <event.h>
+#include <event2/rpc.h>
+#include <event2/rpc_struct.h>
+#include <event2/rpc_compat.h>
+
+#endif /* EVENT1_EVRPC_H_INCLUDED_ */
diff --git a/sntp/libevent/include/evutil.h b/sntp/libevent/include/evutil.h
new file mode 100644
index 000000000000..12c137d74506
--- /dev/null
+++ b/sntp/libevent/include/evutil.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 EVENT1_EVUTIL_H_INCLUDED_
+#define EVENT1_EVUTIL_H_INCLUDED_
+
+/** @file evutil.h
+
+ Utility and compatibility functions for Libevent.
+
+ The <evutil.h> header is deprecated in Libevent 2.0 and later; please
+ use <event2/util.h> instead.
+*/
+
+#include <event2/util.h>
+
+#endif /* EVENT1_EVUTIL_H_INCLUDED_ */
diff --git a/sntp/libevent/include/include.am b/sntp/libevent/include/include.am
new file mode 100644
index 000000000000..9aad2dba4abe
--- /dev/null
+++ b/sntp/libevent/include/include.am
@@ -0,0 +1,46 @@
+# include/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+include_event2dir = $(includedir)/event2
+
+EVENT2_EXPORT = \
+ include/event2/buffer.h \
+ include/event2/buffer_compat.h \
+ include/event2/bufferevent.h \
+ include/event2/bufferevent_compat.h \
+ include/event2/bufferevent_ssl.h \
+ include/event2/bufferevent_struct.h \
+ include/event2/dns.h \
+ include/event2/dns_compat.h \
+ include/event2/dns_struct.h \
+ include/event2/event.h \
+ include/event2/event_compat.h \
+ include/event2/event_struct.h \
+ include/event2/http.h \
+ include/event2/http_compat.h \
+ include/event2/http_struct.h \
+ include/event2/keyvalq_struct.h \
+ include/event2/listener.h \
+ include/event2/rpc.h \
+ include/event2/rpc_compat.h \
+ include/event2/rpc_struct.h \
+ include/event2/tag.h \
+ include/event2/tag_compat.h \
+ include/event2/thread.h \
+ include/event2/util.h \
+ include/event2/visibility.h
+
+## Without the nobase_ prefixing, Automake would strip "include/event2/" from
+## the source header filename to derive the installed header filename.
+## With nobase_ the installed path is $(includedir)/include/event2/ev*.h.
+
+if INSTALL_LIBEVENT
+include_event2_HEADERS = $(EVENT2_EXPORT)
+nodist_include_event2_HEADERS = include/event2/event-config.h
+else
+noinst_HEADERS += $(EVENT2_EXPORT)
+nodist_noinst_HEADERS = include/event2/event-config.h
+endif
diff --git a/sntp/libevent/iocp-internal.h b/sntp/libevent/iocp-internal.h
new file mode 100644
index 000000000000..93dbe2b1a454
--- /dev/null
+++ b/sntp/libevent/iocp-internal.h
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 IOCP_INTERNAL_H_INCLUDED_
+#define IOCP_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct event_overlapped;
+struct event_iocp_port;
+struct evbuffer;
+typedef void (*iocp_callback)(struct event_overlapped *, ev_uintptr_t, ev_ssize_t, int success);
+
+/* This whole file is actually win32 only. We wrap the structures in a win32
+ * ifdef so that we can test-compile code that uses these interfaces on
+ * non-win32 platforms. */
+#ifdef _WIN32
+
+/**
+ Internal use only. Wraps an OVERLAPPED that we're using for libevent
+ functionality. Whenever an event_iocp_port gets an event for a given
+ OVERLAPPED*, it upcasts the pointer to an event_overlapped, and calls the
+ iocp_callback function with the event_overlapped, the iocp key, and the
+ number of bytes transferred as arguments.
+ */
+struct event_overlapped {
+ OVERLAPPED overlapped;
+ iocp_callback cb;
+};
+
+/* Mingw's headers don't define LPFN_ACCEPTEX. */
+
+typedef BOOL (WINAPI *AcceptExPtr)(SOCKET, SOCKET, PVOID, DWORD, DWORD, DWORD, LPDWORD, LPOVERLAPPED);
+typedef BOOL (WINAPI *ConnectExPtr)(SOCKET, const struct sockaddr *, int, PVOID, DWORD, LPDWORD, LPOVERLAPPED);
+typedef void (WINAPI *GetAcceptExSockaddrsPtr)(PVOID, DWORD, DWORD, DWORD, LPSOCKADDR *, LPINT, LPSOCKADDR *, LPINT);
+
+/** Internal use only. Holds pointers to functions that only some versions of
+ Windows provide.
+ */
+struct win32_extension_fns {
+ AcceptExPtr AcceptEx;
+ ConnectExPtr ConnectEx;
+ GetAcceptExSockaddrsPtr GetAcceptExSockaddrs;
+};
+
+/**
+ Internal use only. Stores a Windows IO Completion port, along with
+ related data.
+ */
+struct event_iocp_port {
+ /** The port itself */
+ HANDLE port;
+ /* A lock to cover internal structures. */
+ CRITICAL_SECTION lock;
+ /** Number of threads ever open on the port. */
+ short n_threads;
+ /** True iff we're shutting down all the threads on this port */
+ short shutdown;
+ /** How often the threads on this port check for shutdown and other
+ * conditions */
+ long ms;
+ /* The threads that are waiting for events. */
+ HANDLE *threads;
+ /** Number of threads currently open on this port. */
+ short n_live_threads;
+ /** A semaphore to signal when we are done shutting down. */
+ HANDLE *shutdownSemaphore;
+};
+
+const struct win32_extension_fns *event_get_win32_extension_fns_(void);
+#else
+/* Dummy definition so we can test-compile more things on unix. */
+struct event_overlapped {
+ iocp_callback cb;
+};
+#endif
+
+/** Initialize the fields in an event_overlapped.
+
+ @param overlapped The struct event_overlapped to initialize
+ @param cb The callback that should be invoked once the IO operation has
+ finished.
+ */
+void event_overlapped_init_(struct event_overlapped *, iocp_callback cb);
+
+/** Allocate and return a new evbuffer that supports overlapped IO on a given
+ socket. The socket must be associated with an IO completion port using
+ event_iocp_port_associate_.
+*/
+struct evbuffer *evbuffer_overlapped_new_(evutil_socket_t fd);
+
+/** XXXX Document (nickm) */
+evutil_socket_t evbuffer_overlapped_get_fd_(struct evbuffer *buf);
+
+void evbuffer_overlapped_set_fd_(struct evbuffer *buf, evutil_socket_t fd);
+
+/** Start reading data onto the end of an overlapped evbuffer.
+
+ An evbuffer can only have one read pending at a time. While the read
+ is in progress, no other data may be added to the end of the buffer.
+ The buffer must be created with event_overlapped_init_().
+ evbuffer_commit_read_() must be called in the completion callback.
+
+ @param buf The buffer to read onto
+ @param n The number of bytes to try to read.
+ @param ol Overlapped object with associated completion callback.
+ @return 0 on success, -1 on error.
+ */
+int evbuffer_launch_read_(struct evbuffer *buf, size_t n, struct event_overlapped *ol);
+
+/** Start writing data from the start of an evbuffer.
+
+ An evbuffer can only have one write pending at a time. While the write is
+ in progress, no other data may be removed from the front of the buffer.
+ The buffer must be created with event_overlapped_init_().
+ evbuffer_commit_write_() must be called in the completion callback.
+
+ @param buf The buffer to read onto
+ @param n The number of bytes to try to read.
+ @param ol Overlapped object with associated completion callback.
+ @return 0 on success, -1 on error.
+ */
+int evbuffer_launch_write_(struct evbuffer *buf, ev_ssize_t n, struct event_overlapped *ol);
+
+/** XXX document */
+void evbuffer_commit_read_(struct evbuffer *, ev_ssize_t);
+void evbuffer_commit_write_(struct evbuffer *, ev_ssize_t);
+
+/** Create an IOCP, and launch its worker threads. Internal use only.
+
+ This interface is unstable, and will change.
+ */
+struct event_iocp_port *event_iocp_port_launch_(int n_cpus);
+
+/** Associate a file descriptor with an iocp, such that overlapped IO on the
+ fd will happen on one of the iocp's worker threads.
+*/
+int event_iocp_port_associate_(struct event_iocp_port *port, evutil_socket_t fd,
+ ev_uintptr_t key);
+
+/** Tell all threads serving an iocp to stop. Wait for up to waitMsec for all
+ the threads to finish whatever they're doing. If waitMsec is -1, wait
+ as long as required. If all the threads are done, free the port and return
+ 0. Otherwise, return -1. If you get a -1 return value, it is safe to call
+ this function again.
+*/
+int event_iocp_shutdown_(struct event_iocp_port *port, long waitMsec);
+
+/* FIXME document. */
+int event_iocp_activate_overlapped_(struct event_iocp_port *port,
+ struct event_overlapped *o,
+ ev_uintptr_t key, ev_uint32_t n_bytes);
+
+struct event_base;
+/* FIXME document. */
+struct event_iocp_port *event_base_get_iocp_(struct event_base *base);
+
+/* FIXME document. */
+int event_base_start_iocp_(struct event_base *base, int n_cpus);
+void event_base_stop_iocp_(struct event_base *base);
+
+/* FIXME document. */
+struct bufferevent *bufferevent_async_new_(struct event_base *base,
+ evutil_socket_t fd, int options);
+
+/* FIXME document. */
+void bufferevent_async_set_connected_(struct bufferevent *bev);
+int bufferevent_async_can_connect_(struct bufferevent *bev);
+int bufferevent_async_connect_(struct bufferevent *bev, evutil_socket_t fd,
+ const struct sockaddr *sa, int socklen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/ipv6-internal.h b/sntp/libevent/ipv6-internal.h
new file mode 100644
index 000000000000..0c207377b8da
--- /dev/null
+++ b/sntp/libevent/ipv6-internal.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/* Internal use only: Fake IPv6 structures and values on platforms that
+ * do not have them */
+
+#ifndef IPV6_INTERNAL_H_INCLUDED_
+#define IPV6_INTERNAL_H_INCLUDED_
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include "event2/util.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @file ipv6-internal.h
+ *
+ * Replacement types and functions for platforms that don't support ipv6
+ * properly.
+ */
+
+#ifndef EVENT__HAVE_STRUCT_IN6_ADDR
+struct in6_addr {
+ ev_uint8_t s6_addr[16];
+};
+#endif
+
+#ifndef EVENT__HAVE_SA_FAMILY_T
+typedef int sa_family_t;
+#endif
+
+#ifndef EVENT__HAVE_STRUCT_SOCKADDR_IN6
+struct sockaddr_in6 {
+ /* This will fail if we find a struct sockaddr that doesn't have
+ * sa_family as the first element. */
+ sa_family_t sin6_family;
+ ev_uint16_t sin6_port;
+ struct in6_addr sin6_addr;
+};
+#endif
+
+#ifndef AF_INET6
+#define AF_INET6 3333
+#endif
+#ifndef PF_INET6
+#define PF_INET6 AF_INET6
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/kqueue-internal.h b/sntp/libevent/kqueue-internal.h
new file mode 100644
index 000000000000..02c5a3606cad
--- /dev/null
+++ b/sntp/libevent/kqueue-internal.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 KQUEUE_INTERNAL_H_INCLUDED_
+#define KQUEUE_INTERNAL_H_INCLUDED_
+
+/** Notification function, used to tell an event base to wake up from another
+ * thread. Only works when event_kq_add_notify_event_() has previously been
+ * called successfully on that base. */
+int event_kq_notify_base_(struct event_base *base);
+
+/** Prepare a kqueue-using event base to receive notifications via an internal
+ * EVFILT_USER event. Return 0 on sucess, -1 on failure.
+ */
+int event_kq_add_notify_event_(struct event_base *base);
+
+#endif
diff --git a/sntp/libevent/kqueue.c b/sntp/libevent/kqueue.c
new file mode 100644
index 000000000000..39334674244b
--- /dev/null
+++ b/sntp/libevent/kqueue.c
@@ -0,0 +1,549 @@
+/* $OpenBSD: kqueue.c,v 1.5 2002/07/10 14:41:31 art Exp $ */
+
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_KQUEUE
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <sys/event.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#ifdef EVENT__HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+/* Some platforms apparently define the udata field of struct kevent as
+ * intptr_t, whereas others define it as void*. There doesn't seem to be an
+ * easy way to tell them apart via autoconf, so we need to use OS macros. */
+#if defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__)
+#define PTR_TO_UDATA(x) ((intptr_t)(x))
+#define INT_TO_UDATA(x) ((intptr_t)(x))
+#else
+#define PTR_TO_UDATA(x) (x)
+#define INT_TO_UDATA(x) ((void*)(x))
+#endif
+
+#include "event-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
+#include "changelist-internal.h"
+
+#include "kqueue-internal.h"
+
+#define NEVENT 64
+
+struct kqop {
+ struct kevent *changes;
+ int changes_size;
+
+ struct kevent *events;
+ int events_size;
+ int kq;
+ int notify_event_added;
+ pid_t pid;
+};
+
+static void kqop_free(struct kqop *kqop);
+
+static void *kq_init(struct event_base *);
+static int kq_sig_add(struct event_base *, int, short, short, void *);
+static int kq_sig_del(struct event_base *, int, short, short, void *);
+static int kq_dispatch(struct event_base *, struct timeval *);
+static void kq_dealloc(struct event_base *);
+
+const struct eventop kqops = {
+ "kqueue",
+ kq_init,
+ event_changelist_add_,
+ event_changelist_del_,
+ kq_dispatch,
+ kq_dealloc,
+ 1 /* need reinit */,
+ EV_FEATURE_ET|EV_FEATURE_O1|EV_FEATURE_FDS,
+ EVENT_CHANGELIST_FDINFO_SIZE
+};
+
+static const struct eventop kqsigops = {
+ "kqueue_signal",
+ NULL,
+ kq_sig_add,
+ kq_sig_del,
+ NULL,
+ NULL,
+ 1 /* need reinit */,
+ 0,
+ 0
+};
+
+static void *
+kq_init(struct event_base *base)
+{
+ int kq = -1;
+ struct kqop *kqueueop = NULL;
+
+ if (!(kqueueop = mm_calloc(1, sizeof(struct kqop))))
+ return (NULL);
+
+/* Initialize the kernel queue */
+
+ if ((kq = kqueue()) == -1) {
+ event_warn("kqueue");
+ goto err;
+ }
+
+ kqueueop->kq = kq;
+
+ kqueueop->pid = getpid();
+
+ /* Initialize fields */
+ kqueueop->changes = mm_calloc(NEVENT, sizeof(struct kevent));
+ if (kqueueop->changes == NULL)
+ goto err;
+ kqueueop->events = mm_calloc(NEVENT, sizeof(struct kevent));
+ if (kqueueop->events == NULL)
+ goto err;
+ kqueueop->events_size = kqueueop->changes_size = NEVENT;
+
+ /* Check for Mac OS X kqueue bug. */
+ memset(&kqueueop->changes[0], 0, sizeof kqueueop->changes[0]);
+ kqueueop->changes[0].ident = -1;
+ kqueueop->changes[0].filter = EVFILT_READ;
+ kqueueop->changes[0].flags = EV_ADD;
+ /*
+ * If kqueue works, then kevent will succeed, and it will
+ * stick an error in events[0]. If kqueue is broken, then
+ * kevent will fail.
+ */
+ if (kevent(kq,
+ kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 ||
+ (int)kqueueop->events[0].ident != -1 ||
+ kqueueop->events[0].flags != EV_ERROR) {
+ event_warn("%s: detected broken kqueue; not using.", __func__);
+ goto err;
+ }
+
+ base->evsigsel = &kqsigops;
+
+ return (kqueueop);
+err:
+ if (kqueueop)
+ kqop_free(kqueueop);
+
+ return (NULL);
+}
+
+#define ADD_UDATA 0x30303
+
+static void
+kq_setup_kevent(struct kevent *out, evutil_socket_t fd, int filter, short change)
+{
+ memset(out, 0, sizeof(struct kevent));
+ out->ident = fd;
+ out->filter = filter;
+
+ if (change & EV_CHANGE_ADD) {
+ out->flags = EV_ADD;
+ /* We set a magic number here so that we can tell 'add'
+ * errors from 'del' errors. */
+ out->udata = INT_TO_UDATA(ADD_UDATA);
+ if (change & EV_ET)
+ out->flags |= EV_CLEAR;
+#ifdef NOTE_EOF
+ /* Make it behave like select() and poll() */
+ if (filter == EVFILT_READ)
+ out->fflags = NOTE_EOF;
+#endif
+ } else {
+ EVUTIL_ASSERT(change & EV_CHANGE_DEL);
+ out->flags = EV_DELETE;
+ }
+}
+
+static int
+kq_build_changes_list(const struct event_changelist *changelist,
+ struct kqop *kqop)
+{
+ int i;
+ int n_changes = 0;
+
+ for (i = 0; i < changelist->n_changes; ++i) {
+ struct event_change *in_ch = &changelist->changes[i];
+ struct kevent *out_ch;
+ if (n_changes >= kqop->changes_size - 1) {
+ int newsize = kqop->changes_size * 2;
+ struct kevent *newchanges;
+
+ newchanges = mm_realloc(kqop->changes,
+ newsize * sizeof(struct kevent));
+ if (newchanges == NULL) {
+ event_warn("%s: realloc", __func__);
+ return (-1);
+ }
+ kqop->changes = newchanges;
+ kqop->changes_size = newsize;
+ }
+ if (in_ch->read_change) {
+ out_ch = &kqop->changes[n_changes++];
+ kq_setup_kevent(out_ch, in_ch->fd, EVFILT_READ,
+ in_ch->read_change);
+ }
+ if (in_ch->write_change) {
+ out_ch = &kqop->changes[n_changes++];
+ kq_setup_kevent(out_ch, in_ch->fd, EVFILT_WRITE,
+ in_ch->write_change);
+ }
+ }
+ return n_changes;
+}
+
+static int
+kq_grow_events(struct kqop *kqop, size_t new_size)
+{
+ struct kevent *newresult;
+
+ newresult = mm_realloc(kqop->events,
+ new_size * sizeof(struct kevent));
+
+ if (newresult) {
+ kqop->events = newresult;
+ kqop->events_size = new_size;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+static int
+kq_dispatch(struct event_base *base, struct timeval *tv)
+{
+ struct kqop *kqop = base->evbase;
+ struct kevent *events = kqop->events;
+ struct kevent *changes;
+ struct timespec ts, *ts_p = NULL;
+ int i, n_changes, res;
+
+ if (tv != NULL) {
+ TIMEVAL_TO_TIMESPEC(tv, &ts);
+ ts_p = &ts;
+ }
+
+ /* Build "changes" from "base->changes" */
+ EVUTIL_ASSERT(kqop->changes);
+ n_changes = kq_build_changes_list(&base->changelist, kqop);
+ if (n_changes < 0)
+ return -1;
+
+ event_changelist_remove_all_(&base->changelist, base);
+
+ /* steal the changes array in case some broken code tries to call
+ * dispatch twice at once. */
+ changes = kqop->changes;
+ kqop->changes = NULL;
+
+ /* Make sure that 'events' is at least as long as the list of changes:
+ * otherwise errors in the changes can get reported as a -1 return
+ * value from kevent() rather than as EV_ERROR events in the events
+ * array.
+ *
+ * (We could instead handle -1 return values from kevent() by
+ * retrying with a smaller changes array or a larger events array,
+ * but this approach seems less risky for now.)
+ */
+ if (kqop->events_size < n_changes) {
+ int new_size = kqop->events_size;
+ do {
+ new_size *= 2;
+ } while (new_size < n_changes);
+
+ kq_grow_events(kqop, new_size);
+ events = kqop->events;
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = kevent(kqop->kq, changes, n_changes,
+ events, kqop->events_size, ts_p);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ EVUTIL_ASSERT(kqop->changes == NULL);
+ kqop->changes = changes;
+
+ if (res == -1) {
+ if (errno != EINTR) {
+ event_warn("kevent");
+ return (-1);
+ }
+
+ return (0);
+ }
+
+ event_debug(("%s: kevent reports %d", __func__, res));
+
+ for (i = 0; i < res; i++) {
+ int which = 0;
+
+ if (events[i].flags & EV_ERROR) {
+ switch (events[i].data) {
+
+ /* Can occur on delete if we are not currently
+ * watching any events on this fd. That can
+ * happen when the fd was closed and another
+ * file was opened with that fd. */
+ case ENOENT:
+ /* Can occur for reasons not fully understood
+ * on FreeBSD. */
+ case EINVAL:
+ continue;
+
+ /* Can occur on a delete if the fd is closed. */
+ case EBADF:
+ /* XXXX On NetBSD, we can also get EBADF if we
+ * try to add the write side of a pipe, but
+ * the read side has already been closed.
+ * Other BSDs call this situation 'EPIPE'. It
+ * would be good if we had a way to report
+ * this situation. */
+ continue;
+ /* These two can occur on an add if the fd was one side
+ * of a pipe, and the other side was closed. */
+ case EPERM:
+ case EPIPE:
+ /* Report read events, if we're listening for
+ * them, so that the user can learn about any
+ * add errors. (If the operation was a
+ * delete, then udata should be cleared.) */
+ if (events[i].udata) {
+ /* The operation was an add:
+ * report the error as a read. */
+ which |= EV_READ;
+ break;
+ } else {
+ /* The operation was a del:
+ * report nothing. */
+ continue;
+ }
+
+ /* Other errors shouldn't occur. */
+ default:
+ errno = events[i].data;
+ return (-1);
+ }
+ } else if (events[i].filter == EVFILT_READ) {
+ which |= EV_READ;
+ } else if (events[i].filter == EVFILT_WRITE) {
+ which |= EV_WRITE;
+ } else if (events[i].filter == EVFILT_SIGNAL) {
+ which |= EV_SIGNAL;
+#ifdef EVFILT_USER
+ } else if (events[i].filter == EVFILT_USER) {
+ base->is_notify_pending = 0;
+#endif
+ }
+
+ if (!which)
+ continue;
+
+ if (events[i].filter == EVFILT_SIGNAL) {
+ evmap_signal_active_(base, events[i].ident, 1);
+ } else {
+ evmap_io_active_(base, events[i].ident, which | EV_ET);
+ }
+ }
+
+ if (res == kqop->events_size) {
+ /* We used all the events space that we have. Maybe we should
+ make it bigger. */
+ kq_grow_events(kqop, kqop->events_size * 2);
+ }
+
+ return (0);
+}
+
+static void
+kqop_free(struct kqop *kqop)
+{
+ if (kqop->changes)
+ mm_free(kqop->changes);
+ if (kqop->events)
+ mm_free(kqop->events);
+ if (kqop->kq >= 0 && kqop->pid == getpid())
+ close(kqop->kq);
+ memset(kqop, 0, sizeof(struct kqop));
+ mm_free(kqop);
+}
+
+static void
+kq_dealloc(struct event_base *base)
+{
+ struct kqop *kqop = base->evbase;
+ evsig_dealloc_(base);
+ kqop_free(kqop);
+}
+
+/* signal handling */
+static int
+kq_sig_add(struct event_base *base, int nsignal, short old, short events, void *p)
+{
+ struct kqop *kqop = base->evbase;
+ struct kevent kev;
+ struct timespec timeout = { 0, 0 };
+ (void)p;
+
+ EVUTIL_ASSERT(nsignal >= 0 && nsignal < NSIG);
+
+ memset(&kev, 0, sizeof(kev));
+ kev.ident = nsignal;
+ kev.filter = EVFILT_SIGNAL;
+ kev.flags = EV_ADD;
+
+ /* Be ready for the signal if it is sent any
+ * time between now and the next call to
+ * kq_dispatch. */
+ if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1)
+ return (-1);
+
+ /* We can set the handler for most signals to SIG_IGN and
+ * still have them reported to us in the queue. However,
+ * if the handler for SIGCHLD is SIG_IGN, the system reaps
+ * zombie processes for us, and we don't get any notification.
+ * This appears to be the only signal with this quirk. */
+ if (evsig_set_handler_(base, nsignal,
+ nsignal == SIGCHLD ? SIG_DFL : SIG_IGN) == -1)
+ return (-1);
+
+ return (0);
+}
+
+static int
+kq_sig_del(struct event_base *base, int nsignal, short old, short events, void *p)
+{
+ struct kqop *kqop = base->evbase;
+ struct kevent kev;
+
+ struct timespec timeout = { 0, 0 };
+ (void)p;
+
+ EVUTIL_ASSERT(nsignal >= 0 && nsignal < NSIG);
+
+ memset(&kev, 0, sizeof(kev));
+ kev.ident = nsignal;
+ kev.filter = EVFILT_SIGNAL;
+ kev.flags = EV_DELETE;
+
+ /* Because we insert signal events
+ * immediately, we need to delete them
+ * immediately, too */
+ if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1)
+ return (-1);
+
+ if (evsig_restore_handler_(base, nsignal) == -1)
+ return (-1);
+
+ return (0);
+}
+
+
+/* OSX 10.6 and FreeBSD 8.1 add support for EVFILT_USER, which we can use
+ * to wake up the event loop from another thread. */
+
+/* Magic number we use for our filter ID. */
+#define NOTIFY_IDENT 42
+
+int
+event_kq_add_notify_event_(struct event_base *base)
+{
+ struct kqop *kqop = base->evbase;
+#if defined(EVFILT_USER) && defined(NOTE_TRIGGER)
+ struct kevent kev;
+ struct timespec timeout = { 0, 0 };
+#endif
+
+ if (kqop->notify_event_added)
+ return 0;
+
+#if defined(EVFILT_USER) && defined(NOTE_TRIGGER)
+ memset(&kev, 0, sizeof(kev));
+ kev.ident = NOTIFY_IDENT;
+ kev.filter = EVFILT_USER;
+ kev.flags = EV_ADD | EV_CLEAR;
+
+ if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) {
+ event_warn("kevent: adding EVFILT_USER event");
+ return -1;
+ }
+
+ kqop->notify_event_added = 1;
+
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+int
+event_kq_notify_base_(struct event_base *base)
+{
+ struct kqop *kqop = base->evbase;
+#if defined(EVFILT_USER) && defined(NOTE_TRIGGER)
+ struct kevent kev;
+ struct timespec timeout = { 0, 0 };
+#endif
+ if (! kqop->notify_event_added)
+ return -1;
+
+#if defined(EVFILT_USER) && defined(NOTE_TRIGGER)
+ memset(&kev, 0, sizeof(kev));
+ kev.ident = NOTIFY_IDENT;
+ kev.filter = EVFILT_USER;
+ kev.fflags = NOTE_TRIGGER;
+
+ if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) {
+ event_warn("kevent: triggering EVFILT_USER event");
+ return -1;
+ }
+
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+#endif /* EVENT__HAVE_KQUEUE */
diff --git a/sntp/libevent/libevent.pc.in b/sntp/libevent/libevent.pc.in
new file mode 100644
index 000000000000..7030884eebd0
--- /dev/null
+++ b/sntp/libevent/libevent.pc.in
@@ -0,0 +1,16 @@
+#libevent pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libevent
+Description: libevent is an asynchronous notification event loop library
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -levent
+Libs.private: @LIBS@
+Cflags: -I${includedir}
+
diff --git a/sntp/libevent/libevent_openssl.pc.in b/sntp/libevent/libevent_openssl.pc.in
new file mode 100644
index 000000000000..a65d1e066800
--- /dev/null
+++ b/sntp/libevent/libevent_openssl.pc.in
@@ -0,0 +1,16 @@
+#libevent pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libevent_openssl
+Description: libevent_openssl adds openssl-based TLS support to libevent
+Version: @VERSION@
+Requires: libevent
+Conflicts:
+Libs: -L${libdir} -levent_openssl
+Libs.private: @LIBS@ @OPENSSL_LIBS@
+Cflags: -I${includedir} @OPENSSL_INCS@
+
diff --git a/sntp/libevent/libevent_pthreads.pc.in b/sntp/libevent/libevent_pthreads.pc.in
new file mode 100644
index 000000000000..9bc2392b342e
--- /dev/null
+++ b/sntp/libevent/libevent_pthreads.pc.in
@@ -0,0 +1,16 @@
+#libevent pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libevent_pthreads
+Description: libevent_pthreads adds pthreads-based threading support to libevent
+Version: @VERSION@
+Requires: libevent
+Conflicts:
+Libs: -L${libdir} -levent_pthreads
+Libs.private: @LIBS@ @PTHREAD_LIBS@
+Cflags: -I${includedir} @PTHREAD_CFLAGS@
+
diff --git a/sntp/libevent/listener.c b/sntp/libevent/listener.c
new file mode 100644
index 000000000000..3272c405ce6e
--- /dev/null
+++ b/sntp/libevent/listener.c
@@ -0,0 +1,882 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos, Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifdef _WIN32
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <mswsock.h>
+#endif
+#include <errno.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "event2/listener.h"
+#include "event2/util.h"
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "mm-internal.h"
+#include "util-internal.h"
+#include "log-internal.h"
+#include "evthread-internal.h"
+#ifdef _WIN32
+#include "iocp-internal.h"
+#include "defer-internal.h"
+#include "event-internal.h"
+#endif
+
+struct evconnlistener_ops {
+ int (*enable)(struct evconnlistener *);
+ int (*disable)(struct evconnlistener *);
+ void (*destroy)(struct evconnlistener *);
+ void (*shutdown)(struct evconnlistener *);
+ evutil_socket_t (*getfd)(struct evconnlistener *);
+ struct event_base *(*getbase)(struct evconnlistener *);
+};
+
+struct evconnlistener {
+ const struct evconnlistener_ops *ops;
+ void *lock;
+ evconnlistener_cb cb;
+ evconnlistener_errorcb errorcb;
+ void *user_data;
+ unsigned flags;
+ short refcnt;
+ int accept4_flags;
+ unsigned enabled : 1;
+};
+
+struct evconnlistener_event {
+ struct evconnlistener base;
+ struct event listener;
+};
+
+#ifdef _WIN32
+struct evconnlistener_iocp {
+ struct evconnlistener base;
+ evutil_socket_t fd;
+ struct event_base *event_base;
+ struct event_iocp_port *port;
+ short n_accepting;
+ unsigned shutting_down : 1;
+ unsigned event_added : 1;
+ struct accepting_socket **accepting;
+};
+#endif
+
+#define LOCK(listener) EVLOCK_LOCK((listener)->lock, 0)
+#define UNLOCK(listener) EVLOCK_UNLOCK((listener)->lock, 0)
+
+struct evconnlistener *
+evconnlistener_new_async(struct event_base *base,
+ evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
+ evutil_socket_t fd); /* XXXX export this? */
+
+static int event_listener_enable(struct evconnlistener *);
+static int event_listener_disable(struct evconnlistener *);
+static void event_listener_destroy(struct evconnlistener *);
+static evutil_socket_t event_listener_getfd(struct evconnlistener *);
+static struct event_base *event_listener_getbase(struct evconnlistener *);
+
+#if 0
+static void
+listener_incref_and_lock(struct evconnlistener *listener)
+{
+ LOCK(listener);
+ ++listener->refcnt;
+}
+#endif
+
+static int
+listener_decref_and_unlock(struct evconnlistener *listener)
+{
+ int refcnt = --listener->refcnt;
+ if (refcnt == 0) {
+ listener->ops->destroy(listener);
+ UNLOCK(listener);
+ EVTHREAD_FREE_LOCK(listener->lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ mm_free(listener);
+ return 1;
+ } else {
+ UNLOCK(listener);
+ return 0;
+ }
+}
+
+static const struct evconnlistener_ops evconnlistener_event_ops = {
+ event_listener_enable,
+ event_listener_disable,
+ event_listener_destroy,
+ NULL, /* shutdown */
+ event_listener_getfd,
+ event_listener_getbase
+};
+
+static void listener_read_cb(evutil_socket_t, short, void *);
+
+struct evconnlistener *
+evconnlistener_new(struct event_base *base,
+ evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
+ evutil_socket_t fd)
+{
+ struct evconnlistener_event *lev;
+
+#ifdef _WIN32
+ if (base && event_base_get_iocp_(base)) {
+ const struct win32_extension_fns *ext =
+ event_get_win32_extension_fns_();
+ if (ext->AcceptEx && ext->GetAcceptExSockaddrs)
+ return evconnlistener_new_async(base, cb, ptr, flags,
+ backlog, fd);
+ }
+#endif
+
+ if (backlog > 0) {
+ if (listen(fd, backlog) < 0)
+ return NULL;
+ } else if (backlog < 0) {
+ if (listen(fd, 128) < 0)
+ return NULL;
+ }
+
+ lev = mm_calloc(1, sizeof(struct evconnlistener_event));
+ if (!lev)
+ return NULL;
+
+ lev->base.ops = &evconnlistener_event_ops;
+ lev->base.cb = cb;
+ lev->base.user_data = ptr;
+ lev->base.flags = flags;
+ lev->base.refcnt = 1;
+
+ lev->base.accept4_flags = 0;
+ if (!(flags & LEV_OPT_LEAVE_SOCKETS_BLOCKING))
+ lev->base.accept4_flags |= EVUTIL_SOCK_NONBLOCK;
+ if (flags & LEV_OPT_CLOSE_ON_EXEC)
+ lev->base.accept4_flags |= EVUTIL_SOCK_CLOEXEC;
+
+ if (flags & LEV_OPT_THREADSAFE) {
+ EVTHREAD_ALLOC_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ }
+
+ event_assign(&lev->listener, base, fd, EV_READ|EV_PERSIST,
+ listener_read_cb, lev);
+
+ if (!(flags & LEV_OPT_DISABLED))
+ evconnlistener_enable(&lev->base);
+
+ return &lev->base;
+}
+
+struct evconnlistener *
+evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb,
+ void *ptr, unsigned flags, int backlog, const struct sockaddr *sa,
+ int socklen)
+{
+ struct evconnlistener *listener;
+ evutil_socket_t fd;
+ int on = 1;
+ int family = sa ? sa->sa_family : AF_UNSPEC;
+ int socktype = SOCK_STREAM | EVUTIL_SOCK_NONBLOCK;
+
+ if (backlog == 0)
+ return NULL;
+
+ if (flags & LEV_OPT_CLOSE_ON_EXEC)
+ socktype |= EVUTIL_SOCK_CLOEXEC;
+
+ fd = evutil_socket_(family, socktype, 0);
+ if (fd == -1)
+ return NULL;
+
+ if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void*)&on, sizeof(on))<0)
+ goto err;
+
+ if (flags & LEV_OPT_REUSEABLE) {
+ if (evutil_make_listen_socket_reuseable(fd) < 0)
+ goto err;
+ }
+
+ if (flags & LEV_OPT_DEFERRED_ACCEPT) {
+ if (evutil_make_tcp_listen_socket_deferred(fd) < 0)
+ goto err;
+ }
+
+ if (sa) {
+ if (bind(fd, sa, socklen)<0)
+ goto err;
+ }
+
+ listener = evconnlistener_new(base, cb, ptr, flags, backlog, fd);
+ if (!listener)
+ goto err;
+
+ return listener;
+err:
+ evutil_closesocket(fd);
+ return NULL;
+}
+
+void
+evconnlistener_free(struct evconnlistener *lev)
+{
+ LOCK(lev);
+ lev->cb = NULL;
+ lev->errorcb = NULL;
+ if (lev->ops->shutdown)
+ lev->ops->shutdown(lev);
+ listener_decref_and_unlock(lev);
+}
+
+static void
+event_listener_destroy(struct evconnlistener *lev)
+{
+ struct evconnlistener_event *lev_e =
+ EVUTIL_UPCAST(lev, struct evconnlistener_event, base);
+
+ event_del(&lev_e->listener);
+ if (lev->flags & LEV_OPT_CLOSE_ON_FREE)
+ evutil_closesocket(event_get_fd(&lev_e->listener));
+ event_debug_unassign(&lev_e->listener);
+}
+
+int
+evconnlistener_enable(struct evconnlistener *lev)
+{
+ int r;
+ LOCK(lev);
+ lev->enabled = 1;
+ if (lev->cb)
+ r = lev->ops->enable(lev);
+ else
+ r = 0;
+ UNLOCK(lev);
+ return r;
+}
+
+int
+evconnlistener_disable(struct evconnlistener *lev)
+{
+ int r;
+ LOCK(lev);
+ lev->enabled = 0;
+ r = lev->ops->disable(lev);
+ UNLOCK(lev);
+ return r;
+}
+
+static int
+event_listener_enable(struct evconnlistener *lev)
+{
+ struct evconnlistener_event *lev_e =
+ EVUTIL_UPCAST(lev, struct evconnlistener_event, base);
+ return event_add(&lev_e->listener, NULL);
+}
+
+static int
+event_listener_disable(struct evconnlistener *lev)
+{
+ struct evconnlistener_event *lev_e =
+ EVUTIL_UPCAST(lev, struct evconnlistener_event, base);
+ return event_del(&lev_e->listener);
+}
+
+evutil_socket_t
+evconnlistener_get_fd(struct evconnlistener *lev)
+{
+ evutil_socket_t fd;
+ LOCK(lev);
+ fd = lev->ops->getfd(lev);
+ UNLOCK(lev);
+ return fd;
+}
+
+static evutil_socket_t
+event_listener_getfd(struct evconnlistener *lev)
+{
+ struct evconnlistener_event *lev_e =
+ EVUTIL_UPCAST(lev, struct evconnlistener_event, base);
+ return event_get_fd(&lev_e->listener);
+}
+
+struct event_base *
+evconnlistener_get_base(struct evconnlistener *lev)
+{
+ struct event_base *base;
+ LOCK(lev);
+ base = lev->ops->getbase(lev);
+ UNLOCK(lev);
+ return base;
+}
+
+static struct event_base *
+event_listener_getbase(struct evconnlistener *lev)
+{
+ struct evconnlistener_event *lev_e =
+ EVUTIL_UPCAST(lev, struct evconnlistener_event, base);
+ return event_get_base(&lev_e->listener);
+}
+
+void
+evconnlistener_set_cb(struct evconnlistener *lev,
+ evconnlistener_cb cb, void *arg)
+{
+ int enable = 0;
+ LOCK(lev);
+ if (lev->enabled && !lev->cb)
+ enable = 1;
+ lev->cb = cb;
+ lev->user_data = arg;
+ if (enable)
+ evconnlistener_enable(lev);
+ UNLOCK(lev);
+}
+
+void
+evconnlistener_set_error_cb(struct evconnlistener *lev,
+ evconnlistener_errorcb errorcb)
+{
+ LOCK(lev);
+ lev->errorcb = errorcb;
+ UNLOCK(lev);
+}
+
+static void
+listener_read_cb(evutil_socket_t fd, short what, void *p)
+{
+ struct evconnlistener *lev = p;
+ int err;
+ evconnlistener_cb cb;
+ evconnlistener_errorcb errorcb;
+ void *user_data;
+ LOCK(lev);
+ while (1) {
+ struct sockaddr_storage ss;
+ ev_socklen_t socklen = sizeof(ss);
+ evutil_socket_t new_fd = evutil_accept4_(fd, (struct sockaddr*)&ss, &socklen, lev->accept4_flags);
+ if (new_fd < 0)
+ break;
+ if (socklen == 0) {
+ /* This can happen with some older linux kernels in
+ * response to nmap. */
+ evutil_closesocket(new_fd);
+ continue;
+ }
+
+ if (lev->cb == NULL) {
+ evutil_closesocket(new_fd);
+ UNLOCK(lev);
+ return;
+ }
+ ++lev->refcnt;
+ cb = lev->cb;
+ user_data = lev->user_data;
+ UNLOCK(lev);
+ cb(lev, new_fd, (struct sockaddr*)&ss, (int)socklen,
+ user_data);
+ LOCK(lev);
+ if (lev->refcnt == 1) {
+ int freed = listener_decref_and_unlock(lev);
+ EVUTIL_ASSERT(freed);
+ return;
+ }
+ --lev->refcnt;
+ }
+ err = evutil_socket_geterror(fd);
+ if (EVUTIL_ERR_ACCEPT_RETRIABLE(err)) {
+ UNLOCK(lev);
+ return;
+ }
+ if (lev->errorcb != NULL) {
+ ++lev->refcnt;
+ errorcb = lev->errorcb;
+ user_data = lev->user_data;
+ UNLOCK(lev);
+ errorcb(lev, user_data);
+ LOCK(lev);
+ listener_decref_and_unlock(lev);
+ } else {
+ event_sock_warn(fd, "Error from accept() call");
+ }
+}
+
+#ifdef _WIN32
+struct accepting_socket {
+ CRITICAL_SECTION lock;
+ struct event_overlapped overlapped;
+ SOCKET s;
+ int error;
+ struct event_callback deferred;
+ struct evconnlistener_iocp *lev;
+ ev_uint8_t buflen;
+ ev_uint8_t family;
+ unsigned free_on_cb:1;
+ char addrbuf[1];
+};
+
+static void accepted_socket_cb(struct event_overlapped *o, ev_uintptr_t key,
+ ev_ssize_t n, int ok);
+static void accepted_socket_invoke_user_cb(struct event_callback *cb, void *arg);
+
+static void
+iocp_listener_event_add(struct evconnlistener_iocp *lev)
+{
+ if (lev->event_added)
+ return;
+
+ lev->event_added = 1;
+ event_base_add_virtual_(lev->event_base);
+}
+
+static void
+iocp_listener_event_del(struct evconnlistener_iocp *lev)
+{
+ if (!lev->event_added)
+ return;
+
+ lev->event_added = 0;
+ event_base_del_virtual_(lev->event_base);
+}
+
+static struct accepting_socket *
+new_accepting_socket(struct evconnlistener_iocp *lev, int family)
+{
+ struct accepting_socket *res;
+ int addrlen;
+ int buflen;
+
+ if (family == AF_INET)
+ addrlen = sizeof(struct sockaddr_in);
+ else if (family == AF_INET6)
+ addrlen = sizeof(struct sockaddr_in6);
+ else
+ return NULL;
+ buflen = (addrlen+16)*2;
+
+ res = mm_calloc(1,sizeof(struct accepting_socket)-1+buflen);
+ if (!res)
+ return NULL;
+
+ event_overlapped_init_(&res->overlapped, accepted_socket_cb);
+ res->s = INVALID_SOCKET;
+ res->lev = lev;
+ res->buflen = buflen;
+ res->family = family;
+
+ event_deferred_cb_init_(&res->deferred,
+ event_base_get_npriorities(lev->event_base) / 2,
+ accepted_socket_invoke_user_cb, res);
+
+ InitializeCriticalSectionAndSpinCount(&res->lock, 1000);
+
+ return res;
+}
+
+static void
+free_and_unlock_accepting_socket(struct accepting_socket *as)
+{
+ /* requires lock. */
+ if (as->s != INVALID_SOCKET)
+ closesocket(as->s);
+
+ LeaveCriticalSection(&as->lock);
+ DeleteCriticalSection(&as->lock);
+ mm_free(as);
+}
+
+static int
+start_accepting(struct accepting_socket *as)
+{
+ /* requires lock */
+ const struct win32_extension_fns *ext = event_get_win32_extension_fns_();
+ DWORD pending = 0;
+ SOCKET s = socket(as->family, SOCK_STREAM, 0);
+ int error = 0;
+
+ if (!as->lev->base.enabled)
+ return 0;
+
+ if (s == INVALID_SOCKET) {
+ error = WSAGetLastError();
+ goto report_err;
+ }
+
+ /* XXXX It turns out we need to do this again later. Does this call
+ * have any effect? */
+ setsockopt(s, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
+ (char *)&as->lev->fd, sizeof(&as->lev->fd));
+
+ if (!(as->lev->base.flags & LEV_OPT_LEAVE_SOCKETS_BLOCKING))
+ evutil_make_socket_nonblocking(s);
+
+ if (event_iocp_port_associate_(as->lev->port, s, 1) < 0) {
+ closesocket(s);
+ return -1;
+ }
+
+ as->s = s;
+
+ if (ext->AcceptEx(as->lev->fd, s, as->addrbuf, 0,
+ as->buflen/2, as->buflen/2, &pending, &as->overlapped.overlapped))
+ {
+ /* Immediate success! */
+ accepted_socket_cb(&as->overlapped, 1, 0, 1);
+ } else {
+ error = WSAGetLastError();
+ if (error != ERROR_IO_PENDING) {
+ goto report_err;
+ }
+ }
+
+ return 0;
+
+report_err:
+ as->error = error;
+ event_deferred_cb_schedule_(
+ as->lev->event_base,
+ &as->deferred);
+ return 0;
+}
+
+static void
+stop_accepting(struct accepting_socket *as)
+{
+ /* requires lock. */
+ SOCKET s = as->s;
+ as->s = INVALID_SOCKET;
+ closesocket(s);
+}
+
+static void
+accepted_socket_invoke_user_cb(struct event_callback *dcb, void *arg)
+{
+ struct accepting_socket *as = arg;
+
+ struct sockaddr *sa_local=NULL, *sa_remote=NULL;
+ int socklen_local=0, socklen_remote=0;
+ const struct win32_extension_fns *ext = event_get_win32_extension_fns_();
+ struct evconnlistener *lev = &as->lev->base;
+ evutil_socket_t sock=-1;
+ void *data;
+ evconnlistener_cb cb=NULL;
+ evconnlistener_errorcb errorcb=NULL;
+ int error;
+
+ EVUTIL_ASSERT(ext->GetAcceptExSockaddrs);
+
+ LOCK(lev);
+ EnterCriticalSection(&as->lock);
+ if (as->free_on_cb) {
+ free_and_unlock_accepting_socket(as);
+ listener_decref_and_unlock(lev);
+ return;
+ }
+
+ ++lev->refcnt;
+
+ error = as->error;
+ if (error) {
+ as->error = 0;
+ errorcb = lev->errorcb;
+ } else {
+ ext->GetAcceptExSockaddrs(
+ as->addrbuf, 0, as->buflen/2, as->buflen/2,
+ &sa_local, &socklen_local, &sa_remote,
+ &socklen_remote);
+ sock = as->s;
+ cb = lev->cb;
+ as->s = INVALID_SOCKET;
+
+ /* We need to call this so getsockname, getpeername, and
+ * shutdown work correctly on the accepted socket. */
+ /* XXXX handle error? */
+ setsockopt(sock, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
+ (char *)&as->lev->fd, sizeof(&as->lev->fd));
+ }
+ data = lev->user_data;
+
+ LeaveCriticalSection(&as->lock);
+ UNLOCK(lev);
+
+ if (errorcb) {
+ WSASetLastError(error);
+ errorcb(lev, data);
+ } else if (cb) {
+ cb(lev, sock, sa_remote, socklen_remote, data);
+ }
+
+ LOCK(lev);
+ if (listener_decref_and_unlock(lev))
+ return;
+
+ EnterCriticalSection(&as->lock);
+ start_accepting(as);
+ LeaveCriticalSection(&as->lock);
+}
+
+static void
+accepted_socket_cb(struct event_overlapped *o, ev_uintptr_t key, ev_ssize_t n, int ok)
+{
+ struct accepting_socket *as =
+ EVUTIL_UPCAST(o, struct accepting_socket, overlapped);
+
+ LOCK(&as->lev->base);
+ EnterCriticalSection(&as->lock);
+ if (ok) {
+ /* XXXX Don't do this if some EV_MT flag is set. */
+ event_deferred_cb_schedule_(
+ as->lev->event_base,
+ &as->deferred);
+ LeaveCriticalSection(&as->lock);
+ } else if (as->free_on_cb) {
+ struct evconnlistener *lev = &as->lev->base;
+ free_and_unlock_accepting_socket(as);
+ listener_decref_and_unlock(lev);
+ return;
+ } else if (as->s == INVALID_SOCKET) {
+ /* This is okay; we were disabled by iocp_listener_disable. */
+ LeaveCriticalSection(&as->lock);
+ } else {
+ /* Some error on accept that we couldn't actually handle. */
+ BOOL ok;
+ DWORD transfer = 0, flags=0;
+ event_sock_warn(as->s, "Unexpected error on AcceptEx");
+ ok = WSAGetOverlappedResult(as->s, &o->overlapped,
+ &transfer, FALSE, &flags);
+ if (ok) {
+ /* well, that was confusing! */
+ as->error = 1;
+ } else {
+ as->error = WSAGetLastError();
+ }
+ event_deferred_cb_schedule_(
+ as->lev->event_base,
+ &as->deferred);
+ LeaveCriticalSection(&as->lock);
+ }
+ UNLOCK(&as->lev->base);
+}
+
+static int
+iocp_listener_enable(struct evconnlistener *lev)
+{
+ int i;
+ struct evconnlistener_iocp *lev_iocp =
+ EVUTIL_UPCAST(lev, struct evconnlistener_iocp, base);
+
+ LOCK(lev);
+ iocp_listener_event_add(lev_iocp);
+ for (i = 0; i < lev_iocp->n_accepting; ++i) {
+ struct accepting_socket *as = lev_iocp->accepting[i];
+ if (!as)
+ continue;
+ EnterCriticalSection(&as->lock);
+ if (!as->free_on_cb && as->s == INVALID_SOCKET)
+ start_accepting(as);
+ LeaveCriticalSection(&as->lock);
+ }
+ UNLOCK(lev);
+ return 0;
+}
+
+static int
+iocp_listener_disable_impl(struct evconnlistener *lev, int shutdown)
+{
+ int i;
+ struct evconnlistener_iocp *lev_iocp =
+ EVUTIL_UPCAST(lev, struct evconnlistener_iocp, base);
+
+ LOCK(lev);
+ iocp_listener_event_del(lev_iocp);
+ for (i = 0; i < lev_iocp->n_accepting; ++i) {
+ struct accepting_socket *as = lev_iocp->accepting[i];
+ if (!as)
+ continue;
+ EnterCriticalSection(&as->lock);
+ if (!as->free_on_cb && as->s != INVALID_SOCKET) {
+ if (shutdown)
+ as->free_on_cb = 1;
+ stop_accepting(as);
+ }
+ LeaveCriticalSection(&as->lock);
+ }
+
+ if (shutdown && lev->flags & LEV_OPT_CLOSE_ON_FREE)
+ evutil_closesocket(lev_iocp->fd);
+
+ UNLOCK(lev);
+ return 0;
+}
+
+static int
+iocp_listener_disable(struct evconnlistener *lev)
+{
+ return iocp_listener_disable_impl(lev,0);
+}
+
+static void
+iocp_listener_destroy(struct evconnlistener *lev)
+{
+ struct evconnlistener_iocp *lev_iocp =
+ EVUTIL_UPCAST(lev, struct evconnlistener_iocp, base);
+
+ if (! lev_iocp->shutting_down) {
+ lev_iocp->shutting_down = 1;
+ iocp_listener_disable_impl(lev,1);
+ }
+
+}
+
+static evutil_socket_t
+iocp_listener_getfd(struct evconnlistener *lev)
+{
+ struct evconnlistener_iocp *lev_iocp =
+ EVUTIL_UPCAST(lev, struct evconnlistener_iocp, base);
+ return lev_iocp->fd;
+}
+static struct event_base *
+iocp_listener_getbase(struct evconnlistener *lev)
+{
+ struct evconnlistener_iocp *lev_iocp =
+ EVUTIL_UPCAST(lev, struct evconnlistener_iocp, base);
+ return lev_iocp->event_base;
+}
+
+static const struct evconnlistener_ops evconnlistener_iocp_ops = {
+ iocp_listener_enable,
+ iocp_listener_disable,
+ iocp_listener_destroy,
+ iocp_listener_destroy, /* shutdown */
+ iocp_listener_getfd,
+ iocp_listener_getbase
+};
+
+/* XXX define some way to override this. */
+#define N_SOCKETS_PER_LISTENER 4
+
+struct evconnlistener *
+evconnlistener_new_async(struct event_base *base,
+ evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
+ evutil_socket_t fd)
+{
+ struct sockaddr_storage ss;
+ int socklen = sizeof(ss);
+ struct evconnlistener_iocp *lev;
+ int i;
+
+ flags |= LEV_OPT_THREADSAFE;
+
+ if (!base || !event_base_get_iocp_(base))
+ goto err;
+
+ /* XXXX duplicate code */
+ if (backlog > 0) {
+ if (listen(fd, backlog) < 0)
+ goto err;
+ } else if (backlog < 0) {
+ if (listen(fd, 128) < 0)
+ goto err;
+ }
+ if (getsockname(fd, (struct sockaddr*)&ss, &socklen)) {
+ event_sock_warn(fd, "getsockname");
+ goto err;
+ }
+ lev = mm_calloc(1, sizeof(struct evconnlistener_iocp));
+ if (!lev) {
+ event_warn("calloc");
+ goto err;
+ }
+ lev->base.ops = &evconnlistener_iocp_ops;
+ lev->base.cb = cb;
+ lev->base.user_data = ptr;
+ lev->base.flags = flags;
+ lev->base.refcnt = 1;
+ lev->base.enabled = 1;
+
+ lev->port = event_base_get_iocp_(base);
+ lev->fd = fd;
+ lev->event_base = base;
+
+
+ if (event_iocp_port_associate_(lev->port, fd, 1) < 0)
+ goto err_free_lev;
+
+ EVTHREAD_ALLOC_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+
+ lev->n_accepting = N_SOCKETS_PER_LISTENER;
+ lev->accepting = mm_calloc(lev->n_accepting,
+ sizeof(struct accepting_socket *));
+ if (!lev->accepting) {
+ event_warn("calloc");
+ goto err_delete_lock;
+ }
+ for (i = 0; i < lev->n_accepting; ++i) {
+ lev->accepting[i] = new_accepting_socket(lev, ss.ss_family);
+ if (!lev->accepting[i]) {
+ event_warnx("Couldn't create accepting socket");
+ goto err_free_accepting;
+ }
+ if (cb && start_accepting(lev->accepting[i]) < 0) {
+ event_warnx("Couldn't start accepting on socket");
+ EnterCriticalSection(&lev->accepting[i]->lock);
+ free_and_unlock_accepting_socket(lev->accepting[i]);
+ goto err_free_accepting;
+ }
+ ++lev->base.refcnt;
+ }
+
+ iocp_listener_event_add(lev);
+
+ return &lev->base;
+
+err_free_accepting:
+ mm_free(lev->accepting);
+ /* XXXX free the other elements. */
+err_delete_lock:
+ EVTHREAD_FREE_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+err_free_lev:
+ mm_free(lev);
+err:
+ /* Don't close the fd, it is caller's responsibility. */
+ return NULL;
+}
+
+#endif
diff --git a/sntp/libevent/log-internal.h b/sntp/libevent/log-internal.h
new file mode 100644
index 000000000000..330478a9edd6
--- /dev/null
+++ b/sntp/libevent/log-internal.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 LOG_INTERNAL_H_INCLUDED_
+#define LOG_INTERNAL_H_INCLUDED_
+
+#include "event2/util.h"
+
+#ifdef __GNUC__
+#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
+#define EV_NORETURN __attribute__((noreturn))
+#else
+#define EV_CHECK_FMT(a,b)
+#define EV_NORETURN
+#endif
+
+#define EVENT_ERR_ABORT_ ((int)0xdeaddead)
+
+#define USE_GLOBAL_FOR_DEBUG_LOGGING
+
+#if !defined(EVENT__DISABLE_DEBUG_MODE) || defined(USE_DEBUG)
+#define EVENT_DEBUG_LOGGING_ENABLED
+#endif
+
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
+extern ev_uint32_t event_debug_logging_mask_;
+#define event_debug_get_logging_mask_() (event_debug_logging_mask_)
+#else
+ev_uint32_t event_debug_get_logging_mask_(void);
+#endif
+#else
+#define event_debug_get_logging_mask_() (0)
+#endif
+
+void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
+void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2);
+void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4) EV_NORETURN;
+void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3);
+void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN;
+void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2);
+void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2);
+void event_debugx_(const char *fmt, ...) EV_CHECK_FMT(1,2);
+
+void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
+ EV_CHECK_FMT(3,0);
+
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+#define event_debug(x) do { \
+ if (event_debug_get_logging_mask_()) { \
+ event_debugx_ x; \
+ } \
+ } while (0)
+#else
+#define event_debug(x) ((void)0)
+#endif
+
+#undef EV_CHECK_FMT
+
+#endif
diff --git a/sntp/libevent/log.c b/sntp/libevent/log.c
new file mode 100644
index 000000000000..e8ae9fdc310e
--- /dev/null
+++ b/sntp/libevent/log.c
@@ -0,0 +1,253 @@
+/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
+
+/*
+ * log.c
+ *
+ * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code.
+ *
+ * Copyright (c) 2005-2012 Niels Provos and Nick Mathewson
+ *
+ * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
+ *
+ * Copyright (c) 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. 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.
+ */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <errno.h>
+#include "event2/event.h"
+#include "event2/util.h"
+
+#include "log-internal.h"
+
+static void event_log(int severity, const char *msg);
+static void event_exit(int errcode) EV_NORETURN;
+
+static event_fatal_cb fatal_fn = NULL;
+
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+#ifdef USE_DEBUG
+#define DEFAULT_MASK EVENT_DBG_ALL
+#else
+#define DEFAULT_MASK 0
+#endif
+
+#ifdef USE_GLOBAL_FOR_DEBUG_LOGGING
+ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+#else
+static ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK;
+ev_uint32_t
+event_debug_get_logging_mask_(void)
+{
+ return event_debug_logging_mask_;
+}
+#endif
+#endif /* EVENT_DEBUG_LOGGING_ENABLED */
+
+void
+event_enable_debug_logging(ev_uint32_t which)
+{
+#ifdef EVENT_DEBUG_LOGGING_ENABLED
+ event_debug_logging_mask_ = which;
+#endif
+}
+
+void
+event_set_fatal_callback(event_fatal_cb cb)
+{
+ fatal_fn = cb;
+}
+
+static void
+event_exit(int errcode)
+{
+ if (fatal_fn) {
+ fatal_fn(errcode);
+ exit(errcode); /* should never be reached */
+ } else if (errcode == EVENT_ERR_ABORT_)
+ abort();
+ else
+ exit(errcode);
+}
+
+void
+event_err(int eval, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_ERR, strerror(errno), fmt, ap);
+ va_end(ap);
+ event_exit(eval);
+}
+
+void
+event_warn(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_WARN, strerror(errno), fmt, ap);
+ va_end(ap);
+}
+
+void
+event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...)
+{
+ va_list ap;
+ int err = evutil_socket_geterror(sock);
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_ERR, evutil_socket_error_to_string(err), fmt, ap);
+ va_end(ap);
+ event_exit(eval);
+}
+
+void
+event_sock_warn(evutil_socket_t sock, const char *fmt, ...)
+{
+ va_list ap;
+ int err = evutil_socket_geterror(sock);
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_WARN, evutil_socket_error_to_string(err), fmt, ap);
+ va_end(ap);
+}
+
+void
+event_errx(int eval, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_ERR, NULL, fmt, ap);
+ va_end(ap);
+ event_exit(eval);
+}
+
+void
+event_warnx(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_WARN, NULL, fmt, ap);
+ va_end(ap);
+}
+
+void
+event_msgx(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_MSG, NULL, fmt, ap);
+ va_end(ap);
+}
+
+void
+event_debugx_(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ event_logv_(EVENT_LOG_DEBUG, NULL, fmt, ap);
+ va_end(ap);
+}
+
+void
+event_logv_(int severity, const char *errstr, const char *fmt, va_list ap)
+{
+ char buf[1024];
+ size_t len;
+
+ if (severity == EVENT_LOG_DEBUG && !event_debug_get_logging_mask_())
+ return;
+
+ if (fmt != NULL)
+ evutil_vsnprintf(buf, sizeof(buf), fmt, ap);
+ else
+ buf[0] = '\0';
+
+ if (errstr) {
+ len = strlen(buf);
+ if (len < sizeof(buf) - 3) {
+ evutil_snprintf(buf + len, sizeof(buf) - len, ": %s", errstr);
+ }
+ }
+
+ event_log(severity, buf);
+}
+
+static event_log_cb log_fn = NULL;
+
+void
+event_set_log_callback(event_log_cb cb)
+{
+ log_fn = cb;
+}
+
+static void
+event_log(int severity, const char *msg)
+{
+ if (log_fn)
+ log_fn(severity, msg);
+ else {
+ const char *severity_str;
+ switch (severity) {
+ case EVENT_LOG_DEBUG:
+ severity_str = "debug";
+ break;
+ case EVENT_LOG_MSG:
+ severity_str = "msg";
+ break;
+ case EVENT_LOG_WARN:
+ severity_str = "warn";
+ break;
+ case EVENT_LOG_ERR:
+ severity_str = "err";
+ break;
+ default:
+ severity_str = "???";
+ break;
+ }
+ (void)fprintf(stderr, "[%s] %s\n", severity_str, msg);
+ }
+}
diff --git a/sntp/libevent/m4/ac_backport_259_ssizet.m4 b/sntp/libevent/m4/ac_backport_259_ssizet.m4
new file mode 100644
index 000000000000..75fde386cb8e
--- /dev/null
+++ b/sntp/libevent/m4/ac_backport_259_ssizet.m4
@@ -0,0 +1,3 @@
+AN_IDENTIFIER([ssize_t], [AC_TYPE_SSIZE_T])
+AC_DEFUN([AC_TYPE_SSIZE_T], [AC_CHECK_TYPE(ssize_t, int)])
+
diff --git a/sntp/libevent/m4/libevent_openssl.m4 b/sntp/libevent/m4/libevent_openssl.m4
new file mode 100644
index 000000000000..3cb064a0bd36
--- /dev/null
+++ b/sntp/libevent/m4/libevent_openssl.m4
@@ -0,0 +1,47 @@
+dnl ######################################################################
+dnl OpenSSL support
+AC_DEFUN([LIBEVENT_OPENSSL], [
+AC_REQUIRE([NTP_PKG_CONFIG])dnl
+
+case "$enable_openssl" in
+ yes)
+ have_openssl=no
+ case "$PKG_CONFIG" in
+ '')
+ ;;
+ *)
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl 2>/dev/null`
+ case "$OPENSSL_LIBS" in
+ '') ;;
+ *) OPENSSL_LIBS="$OPENSSL_LIBS $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"
+ have_openssl=yes
+ ;;
+ esac
+ OPENSSL_INCS=`$PKG_CONFIG --cflags openssl 2>/dev/null`
+ ;;
+ esac
+ case "$have_openssl" in
+ yes) ;;
+ *)
+ save_LIBS="$LIBS"
+ LIBS=""
+ OPENSSL_LIBS=""
+ AC_SEARCH_LIBS([SSL_new], [ssl],
+ [have_openssl=yes
+ OPENSSL_LIBS="$LIBS -lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD"],
+ [have_openssl=no],
+ [-lcrypto $EV_LIB_GDI $EV_LIB_WS32 $OPENSSL_LIBADD])
+ LIBS="$save_LIBS"
+ ;;
+ esac
+ AC_SUBST(OPENSSL_INCS)
+ AC_SUBST(OPENSSL_LIBS)
+ case "$have_openssl" in
+ yes) AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl]) ;;
+ esac
+ ;;
+esac
+
+# check if we have and should use openssl
+AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
+])
diff --git a/m4/libtool.m4 b/sntp/libevent/m4/libtool.m4
index d8125842f0a8..d8125842f0a8 100644
--- a/m4/libtool.m4
+++ b/sntp/libevent/m4/libtool.m4
diff --git a/m4/ltoptions.m4 b/sntp/libevent/m4/ltoptions.m4
index 17cfd51c0b34..17cfd51c0b34 100644
--- a/m4/ltoptions.m4
+++ b/sntp/libevent/m4/ltoptions.m4
diff --git a/m4/ltsugar.m4 b/sntp/libevent/m4/ltsugar.m4
index 9000a057d31d..9000a057d31d 100644
--- a/m4/ltsugar.m4
+++ b/sntp/libevent/m4/ltsugar.m4
diff --git a/m4/ltversion.m4 b/sntp/libevent/m4/ltversion.m4
index 9c7b5d411858..9c7b5d411858 100644
--- a/m4/ltversion.m4
+++ b/sntp/libevent/m4/ltversion.m4
diff --git a/m4/lt~obsolete.m4 b/sntp/libevent/m4/lt~obsolete.m4
index c573da90c5cc..c573da90c5cc 100644
--- a/m4/lt~obsolete.m4
+++ b/sntp/libevent/m4/lt~obsolete.m4
diff --git a/sntp/libevent/m4/ntp_pkg_config.m4 b/sntp/libevent/m4/ntp_pkg_config.m4
new file mode 100644
index 000000000000..1bce8a6e4db3
--- /dev/null
+++ b/sntp/libevent/m4/ntp_pkg_config.m4
@@ -0,0 +1,27 @@
+dnl NTP_PKG_CONFIG -*- Autoconf -*-
+dnl
+dnl Look for pkg-config, which must be at least
+dnl $ntp_pkgconfig_min_version.
+dnl
+AC_DEFUN([NTP_PKG_CONFIG], [
+
+dnl lower the minimum version if you find an earlier one works
+ntp_pkgconfig_min_version='0.15.0'
+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+AS_UNSET([ac_cv_path_PKG_CONFIG])
+AS_UNSET([ac_cv_path_ac_pt_PKG_CONFIG])
+
+case "$PKG_CONFIG" in
+ /*)
+ AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+]) dnl NTP_PKG_CONFIG
+
diff --git a/sntp/libevent/m4/openldap-thread-check.m4 b/sntp/libevent/m4/openldap-thread-check.m4
new file mode 100644
index 000000000000..33f9199ff300
--- /dev/null
+++ b/sntp/libevent/m4/openldap-thread-check.m4
@@ -0,0 +1,683 @@
+dnl OpenLDAP Autoconf thread check
+dnl
+dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
+dnl
+dnl Copyright 1998-2010 The OpenLDAP Foundation.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted only as authorized by the OpenLDAP
+dnl Public License.
+dnl
+dnl A copy of this license is available in the file LICENSE-OPENLDAP in
+dnl this directory of the distribution or, alternatively, at
+dnl <http://www.OpenLDAP.org/license.html>.
+dnl
+dnl --------------------------------------------------------------------
+
+# OL_THREAD_CHECK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+
+AC_DEFUN([OL_THREAD_CHECK], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG([C])
+OL_ARG_WITH(threads,[ --with-threads with threads],
+ auto, [auto nt posix mach pth lwp yes no manual] )
+
+case "$ol_with_threads$host" in
+ auto*-*-solaris2.[[0-6]])
+ dnl signals sometimes delivered to wrong thread with Solaris 2.6
+ ol_with_threads=no
+ ;;
+esac
+
+dnl AIX Thread requires we use cc_r or xlc_r.
+dnl But only do this IF AIX and CC is not set
+dnl and threads are auto|yes|posix.
+dnl
+dnl If we find cc_r|xlc_r, force pthreads and assume
+dnl pthread_create is in $LIBS (ie: don't bring in
+dnl any additional thread libraries)
+dnl If we do not find cc_r|xlc_r, disable threads
+
+ol_aix_threads=no
+case "$host" in
+*-*-aix*) dnl all AIX is not a good idea.
+ if test -z "$CC" ; then
+ case "$ol_with_threads" in
+ auto | yes | posix) ol_aix_threads=yes ;;
+ esac
+ fi
+;;
+esac
+
+if test $ol_aix_threads = yes ; then
+ if test -z "${CC}" ; then
+ AC_CHECK_PROGS(CC,cc_r xlc_r cc)
+
+ if test "$CC" = cc ; then
+ dnl no CC! don't allow --with-threads
+ if test $ol_with_threads != auto ; then
+ AC_MSG_ERROR([--with-threads requires cc_r (or other suitable compiler) on AIX])
+ else
+ AC_MSG_WARN([disabling threads, no cc_r on AIX])
+ fi
+ ol_with_threads=no
+ fi
+ fi
+
+ case ${CC} in cc_r | xlc_r)
+ ol_with_threads=posix
+ ol_cv_pthread_create=yes
+ ;;
+ esac
+fi
+
+dnl ----------------------------------------------------------------
+dnl Threads?
+ol_link_threads=no
+dnl ol_with_yielding_select=${ol_with_yielding_select:-auto}
+OL_ARG_WITH(yielding_select,[ --with-yielding-select with yielding select],
+ auto, [auto yes no manual] )
+
+case $ol_with_threads in auto | yes | nt)
+
+ OL_NT_THREADS
+
+ if test "$ol_cv_nt_threads" = yes ; then
+ ol_link_threads=nt
+ ol_with_threads=found
+ ol_with_yielding_select=yes
+
+ AC_DEFINE([HAVE_NT_SERVICE_MANAGER], [1], [if you have NT Service Manager])
+ AC_DEFINE([HAVE_NT_EVENT_LOG], [1], [if you have NT Event Log])
+ fi
+
+ if test $ol_with_threads = nt ; then
+ AC_MSG_ERROR([could not locate NT Threads])
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | posix)
+
+ AC_CHECK_HEADERS(pthread.h)
+
+ if test $ac_cv_header_pthread_h = yes ; then
+ OL_POSIX_THREAD_VERSION
+
+ if test $ol_cv_pthread_version != 0 ; then
+ AC_DEFINE_UNQUOTED([HAVE_PTHREADS], [$ol_cv_pthread_version],
+ [define to pthreads API spec revision])
+ else
+ AC_MSG_ERROR([unknown pthread version])
+ fi
+
+ # consider threads found
+ ol_with_threads=found
+
+ OL_HEADER_LINUX_THREADS
+ OL_HEADER_GNU_PTH_PTHREAD_H
+
+ if test $ol_cv_header_gnu_pth_pthread_h = no ; then
+ AC_CHECK_HEADERS(sched.h)
+ fi
+
+ dnl Now the hard part, how to link?
+ dnl
+ dnl currently supported checks:
+ dnl
+ dnl Check for no flags
+ dnl pthread_create() in $LIBS
+ dnl
+ dnl Check special pthread (final) flags
+ dnl [skipped] pthread_create() with -mt (Solaris) [disabled]
+ dnl pthread_create() with -kthread (FreeBSD)
+ dnl pthread_create() with -pthread (FreeBSD/Digital Unix)
+ dnl pthread_create() with -pthreads (?)
+ dnl pthread_create() with -mthreads (AIX)
+ dnl pthread_create() with -thread (?)
+ dnl
+ dnl Check pthread (final) libraries
+ dnl pthread_mutex_unlock() in -lpthread -lmach -lexc -lc_r (OSF/1)
+ dnl pthread_mutex_lock() in -lpthread -lmach -lexc (OSF/1)
+ dnl [skipped] pthread_mutex_trylock() in -lpthread -lexc (OSF/1)
+ dnl pthread_join() -Wl,-woff,85 -lpthread (IRIX)
+ dnl pthread_create() in -lpthread (many)
+ dnl pthread_create() in -lc_r (FreeBSD)
+ dnl
+ dnl Check pthread (draft4) flags (depreciated)
+ dnl pthread_create() with -threads (OSF/1)
+ dnl
+ dnl Check pthread (draft4) libraries (depreciated)
+ dnl pthread_mutex_unlock() in -lpthreads -lmach -lexc -lc_r (OSF/1)
+ dnl pthread_mutex_lock() in -lpthreads -lmach -lexc (OSF/1)
+ dnl pthread_mutex_trylock() in -lpthreads -lexc (OSF/1)
+ dnl pthread_create() in -lpthreads (many)
+ dnl
+
+ dnl pthread_create in $LIBS
+ AC_CACHE_CHECK([for pthread_create in default libraries],
+ ol_cv_pthread_create,[
+ AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
+ [ol_cv_pthread_create=yes],
+ [ol_cv_pthread_create=no],
+ [AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
+ [ol_cv_pthread_create=yes],
+ [ol_cv_pthread_create=no])])])
+
+ if test $ol_cv_pthread_create != no ; then
+ ol_link_threads=posix
+ ol_link_pthreads=""
+ fi
+
+dnl OL_PTHREAD_TRY([-mt], [ol_cv_pthread_mt])
+ OL_PTHREAD_TRY([-kthread], [ol_cv_pthread_kthread])
+ OL_PTHREAD_TRY([-pthread], [ol_cv_pthread_pthread])
+ OL_PTHREAD_TRY([-pthreads], [ol_cv_pthread_pthreads])
+ OL_PTHREAD_TRY([-mthreads], [ol_cv_pthread_mthreads])
+ OL_PTHREAD_TRY([-thread], [ol_cv_pthread_thread])
+
+ OL_PTHREAD_TRY([-lpthread -lmach -lexc -lc_r],
+ [ol_cv_pthread_lpthread_lmach_lexc_lc_r])
+ OL_PTHREAD_TRY([-lpthread -lmach -lexc],
+ [ol_cv_pthread_lpthread_lmach_lexc])
+dnl OL_PTHREAD_TRY([-lpthread -lexc],
+dnl [ol_cv_pthread_lpthread_lexc])
+
+ OL_PTHREAD_TRY([-lpthread -Wl,-woff,85],
+ [ol_cv_pthread_lib_lpthread_woff])
+
+ OL_PTHREAD_TRY([-lpthread], [ol_cv_pthread_lpthread])
+ OL_PTHREAD_TRY([-lc_r], [ol_cv_pthread_lc_r])
+
+ OL_PTHREAD_TRY([-threads], [ol_cv_pthread_threads])
+
+ OL_PTHREAD_TRY([-lpthreads -lmach -lexc -lc_r],
+ [ol_cv_pthread_lpthreads_lmach_lexc_lc_r])
+ OL_PTHREAD_TRY([-lpthreads -lmach -lexc],
+ [ol_cv_pthread_lpthreads_lmach_lexc])
+ OL_PTHREAD_TRY([-lpthreads -lexc],
+ [ol_cv_pthread_lpthreads_lexc])
+
+ OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
+
+ if test $ol_link_threads != no ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
+
+ dnl save flags
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+
+ dnl All POSIX Thread (final) implementations should have
+ dnl sched_yield instead of pthread yield.
+ dnl check for both, and thr_yield for Solaris
+ AC_CHECK_FUNCS(sched_yield pthread_yield thr_yield)
+
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test $ac_cv_func_thr_yield = no ; then
+ dnl Digital UNIX has sched_yield() in -lrt
+ AC_CHECK_LIB(rt, sched_yield,
+ [LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+ AC_DEFINE([HAVE_SCHED_YIELD], [1],
+ [Define if you have the sched_yield function.])
+ ac_cv_func_sched_yield=yes],
+ [ac_cv_func_sched_yield=no])
+ fi
+ if test $ac_cv_func_sched_yield = no &&
+ test $ac_cv_func_pthread_yield = no &&
+ test "$ac_cv_func_thr_yield" = no ; then
+ AC_MSG_WARN([could not locate sched_yield() or pthread_yield()])
+ fi
+
+ dnl Check functions for compatibility
+ AC_CHECK_FUNCS(pthread_kill)
+
+ dnl Check for pthread_rwlock_destroy with <pthread.h>
+ dnl as pthread_rwlock_t may not be defined.
+ AC_CACHE_CHECK([for pthread_rwlock_destroy with <pthread.h>],
+ [ol_cv_func_pthread_rwlock_destroy], [
+ dnl save the flags
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+pthread_rwlock_t rwlock;
+]], [[pthread_rwlock_destroy(&rwlock);]])],[ol_cv_func_pthread_rwlock_destroy=yes],[ol_cv_func_pthread_rwlock_destroy=no])
+ ])
+ if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
+ AC_DEFINE([HAVE_PTHREAD_RWLOCK_DESTROY], [1],
+ [define if you have pthread_rwlock_destroy function])
+ fi
+
+ dnl Check for pthread_detach with <pthread.h> inclusion
+ dnl as it's symbol may have been mangled.
+ AC_CACHE_CHECK([for pthread_detach with <pthread.h>],
+ [ol_cv_func_pthread_detach], [
+ dnl save the flags
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*)0
+#endif
+]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no])
+ ])
+
+ if test $ol_cv_func_pthread_detach = no ; then
+ AC_MSG_ERROR([could not locate pthread_detach()])
+ fi
+
+ AC_DEFINE([HAVE_PTHREAD_DETACH], [1],
+ [define if you have pthread_detach function])
+
+ dnl Check for setconcurreny functions
+ AC_CHECK_FUNCS( \
+ pthread_setconcurrency \
+ pthread_getconcurrency \
+ thr_setconcurrency \
+ thr_getconcurrency \
+ )
+
+ OL_SYS_LINUX_THREADS
+ OL_LINUX_THREADS
+
+ if test $ol_cv_linux_threads = error; then
+ AC_MSG_ERROR([LinuxThreads header/library mismatch]);
+ fi
+
+ AC_CACHE_CHECK([if pthread_create() works],
+ ol_cv_pthread_create_works,[
+ AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
+ [ol_cv_pthread_create_works=yes],
+ [ol_cv_pthread_create_works=no],
+ [dnl assume yes
+ ol_cv_pthread_create_works=yes])])
+
+ if test $ol_cv_pthread_create_works = no ; then
+ AC_MSG_ERROR([pthread_create is not usable, check environment settings])
+ fi
+
+ ol_replace_broken_yield=no
+dnl case "$host" in
+dnl *-*-linux*)
+dnl AC_CHECK_FUNCS(nanosleep)
+dnl ol_replace_broken_yield=yes
+dnl ;;
+dnl esac
+
+ if test $ol_replace_broken_yield = yes ; then
+ AC_DEFINE([REPLACE_BROKEN_YIELD], [1],
+ [define if sched_yield yields the entire process])
+ fi
+
+ dnl Check if select causes an yield
+ if test x$ol_with_yielding_select = xauto ; then
+ AC_CACHE_CHECK([if select yields when using pthreads],
+ ol_cv_pthread_select_yields,[
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#ifndef NULL
+#define NULL (void*) 0
+#endif
+
+static int fildes[2];
+
+static void *task(p)
+ void *p;
+{
+ int i;
+ struct timeval tv;
+
+ fd_set rfds;
+
+ tv.tv_sec=10;
+ tv.tv_usec=0;
+
+ FD_ZERO(&rfds);
+ FD_SET(fildes[0], &rfds);
+
+ /* we're not interested in any fds */
+ i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
+
+ if(i < 0) {
+ perror("select");
+ exit(10);
+ }
+
+ exit(0); /* if we exit here, the select blocked the whole process */
+}
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+ pthread_t t;
+
+ /* create a pipe to select */
+ if(pipe(&fildes[0])) {
+ perror("select");
+ exit(1);
+ }
+
+#ifdef HAVE_PTHREAD_SETCONCURRENCY
+ (void) pthread_setconcurrency(2);
+#else
+#ifdef HAVE_THR_SETCONCURRENCY
+ /* Set Solaris LWP concurrency to 2 */
+ thr_setconcurrency(2);
+#endif
+#endif
+
+#if HAVE_PTHREADS < 6
+ pthread_create(&t, pthread_attr_default, task, NULL);
+#else
+ pthread_create(&t, NULL, task, NULL);
+#endif
+
+ /* make sure task runs first */
+#ifdef HAVE_THR_YIELD
+ thr_yield();
+#elif defined( HAVE_SCHED_YIELD )
+ sched_yield();
+#elif defined( HAVE_PTHREAD_YIELD )
+ pthread_yield();
+#endif
+
+ exit(2);
+}]])],[ol_cv_pthread_select_yields=no],[ol_cv_pthread_select_yields=yes],[ol_cv_pthread_select_yields=cross])])
+
+ if test $ol_cv_pthread_select_yields = cross ; then
+ AC_MSG_ERROR([crossing compiling: use --with-yielding-select=yes|no|manual])
+ fi
+
+ if test $ol_cv_pthread_select_yields = yes ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+
+ dnl restore flags
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
+ else
+ AC_MSG_ERROR([could not locate usable POSIX Threads])
+ fi
+ fi
+
+ if test $ol_with_threads = posix ; then
+ AC_MSG_ERROR([could not locate POSIX Threads])
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | mach)
+
+ dnl check for Mach CThreads
+ AC_CHECK_HEADERS(mach/cthreads.h cthreads.h)
+ if test $ac_cv_header_mach_cthreads_h = yes ; then
+ ol_with_threads=found
+
+ dnl check for cthreads support in current $LIBS
+ AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
+
+ if test $ol_link_threads = no ; then
+ dnl try -all_load
+ dnl this test needs work
+ AC_CACHE_CHECK([for cthread_fork with -all_load],
+ [ol_cv_cthread_all_load], [
+ dnl save the flags
+ save_LIBS="$LIBS"
+ LIBS="-all_load $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mach/cthreads.h>]], [[
+ cthread_fork((void *)0, (void *)0);
+ ]])],[ol_cv_cthread_all_load=yes],[ol_cv_cthread_all_load=no])
+ dnl restore the LIBS
+ LIBS="$save_LIBS"
+ ])
+
+ if test $ol_cv_cthread_all_load = yes ; then
+ LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
+ ol_link_threads=mach
+ ol_with_threads=found
+ fi
+ fi
+
+ elif test $ac_cv_header_cthreads_h = yes ; then
+ dnl Hurd variant of Mach Cthreads
+ dnl uses <cthreads.h> and -lthreads
+
+ ol_with_threads=found
+
+ dnl save the flags
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lthreads"
+ AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
+ LIBS="$save_LIBS"
+
+ if test $ol_link_threads = yes ; then
+ LTHREAD_LIBS="-lthreads"
+ ol_link_threads=mach
+ ol_with_threads=found
+ else
+ AC_MSG_ERROR([could not link with Mach CThreads])
+ fi
+
+ elif test $ol_with_threads = mach ; then
+ AC_MSG_ERROR([could not locate Mach CThreads])
+ fi
+
+ if test $ol_link_threads = mach ; then
+ AC_DEFINE([HAVE_MACH_CTHREADS], [1],
+ [define if you have Mach Cthreads])
+ elif test $ol_with_threads = found ; then
+ AC_MSG_ERROR([could not link with Mach CThreads])
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | pth)
+
+ AC_CHECK_HEADERS(pth.h)
+
+ if test $ac_cv_header_pth_h = yes ; then
+ AC_CHECK_LIB(pth, pth_version, [have_pth=yes], [have_pth=no])
+
+ if test $have_pth = yes ; then
+ AC_DEFINE([HAVE_GNU_PTH], [1], [if you have GNU Pth])
+ LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
+ ol_link_threads=pth
+ ol_with_threads=found
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+ fi
+ fi
+ ;;
+esac
+
+case $ol_with_threads in auto | yes | lwp)
+
+ dnl check for SunOS5 LWP
+ AC_CHECK_HEADERS(thread.h synch.h)
+ if test $ac_cv_header_thread_h = yes &&
+ test $ac_cv_header_synch_h = yes ; then
+ AC_CHECK_LIB(thread, thr_create, [have_thr=yes], [have_thr=no])
+
+ if test $have_thr = yes ; then
+ AC_DEFINE([HAVE_THR], [1],
+ [if you have Solaris LWP (thr) package])
+ LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
+ ol_link_threads=thr
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=yes
+ fi
+
+ dnl Check for setconcurrency functions
+ AC_CHECK_FUNCS( \
+ thr_setconcurrency \
+ thr_getconcurrency \
+ )
+ fi
+ fi
+
+ dnl check for SunOS4 LWP
+ AC_CHECK_HEADERS(lwp/lwp.h)
+ if test $ac_cv_header_lwp_lwp_h = yes ; then
+ AC_CHECK_LIB(lwp, lwp_create, [have_lwp=yes], [have_lwp=no])
+
+ if test $have_lwp = yes ; then
+ AC_DEFINE([HAVE_LWP], [1],
+ [if you have SunOS LWP package])
+ LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
+ ol_link_threads=lwp
+
+ if test x$ol_with_yielding_select = xauto ; then
+ ol_with_yielding_select=no
+ fi
+ fi
+ fi
+ ;;
+esac
+
+if test $ol_with_yielding_select = yes ; then
+ AC_DEFINE([HAVE_YIELDING_SELECT], [1],
+ [define if select implicitly yields])
+fi
+
+if test $ol_with_threads = manual ; then
+ dnl User thinks he can manually configure threads.
+ ol_link_threads=yes
+
+ AC_MSG_WARN([thread defines and link options must be set manually])
+
+ AC_CHECK_HEADERS(pthread.h sched.h)
+ AC_CHECK_FUNCS(sched_yield pthread_yield)
+ OL_HEADER_LINUX_THREADS
+
+ AC_CHECK_HEADERS(mach/cthreads.h)
+ AC_CHECK_HEADERS(lwp/lwp.h)
+ AC_CHECK_HEADERS(thread.h synch.h)
+fi
+
+if test $ol_link_threads != no && test $ol_link_threads != nt ; then
+ dnl needed to get reentrant/threadsafe versions
+ dnl
+ AC_DEFINE([REENTRANT], [1], [enable thread safety])
+ AC_DEFINE([_REENTRANT], [1], [enable thread safety])
+ AC_DEFINE([THREAD_SAFE], [1], [enable thread safety])
+ AC_DEFINE([_THREAD_SAFE], [1], [enable thread safety])
+ AC_DEFINE([THREADSAFE], [1], [enable thread safety])
+ AC_DEFINE([_THREADSAFE], [1], [enable thread safety])
+ AC_DEFINE([_SGI_MP_SOURCE], [1], [enable thread safety])
+
+ dnl The errno declaration may dependent upon _REENTRANT.
+ dnl If it does, we must link with thread support.
+ AC_CACHE_CHECK([for thread specific errno],
+ [ol_cv_errno_thread_specific], [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], [[errno = 0;]])],[ol_cv_errno_thread_specific=yes],[ol_cv_errno_thread_specific=no])
+ ])
+
+ dnl The h_errno declaration may dependent upon _REENTRANT.
+ dnl If it does, we must link with thread support.
+ AC_CACHE_CHECK([for thread specific h_errno],
+ [ol_cv_h_errno_thread_specific], [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[h_errno = 0;]])],[ol_cv_h_errno_thread_specific=yes],[ol_cv_h_errno_thread_specific=no])
+ ])
+
+ if test $ol_cv_errno_thread_specific != yes ||
+ test $ol_cv_h_errno_thread_specific != yes ; then
+ LIBS="$LTHREAD_LIBS $LIBS"
+ LTHREAD_LIBS=""
+ fi
+
+dnl When in thread environment, use
+dnl #if defined( HAVE_REENTRANT_FUNCTIONS ) || defined( HAVE_FUNC_R )
+dnl func_r(...);
+dnl #else
+dnl # if defined( HAVE_THREADS )
+dnl /* lock */
+dnl # endif
+dnl func(...);
+dnl # if defined( HAVE_THREADS )
+dnl /* unlock */
+dnl # endif
+dnl #endif
+dnl
+dnl HAVE_REENTRANT_FUNCTIONS is derived from:
+dnl _POSIX_REENTRANT_FUNCTIONS
+dnl _POSIX_THREAD_SAFE_FUNCTIONS
+dnl _POSIX_THREADSAFE_FUNCTIONS
+dnl
+dnl and is currently defined in <ldap_pvt_thread.h>
+dnl
+dnl HAVE_THREADS is defined by <ldap_pvt_thread.h> iff -UNO_THREADS
+dnl
+dnl libldap/*.c should only include <ldap_pvt_thread.h> iff
+dnl LDAP_R_COMPILE is defined. ie:
+dnl #ifdef LDAP_R_COMPILE
+dnl # include <ldap_pvt_thread.h>
+dnl #endif
+dnl
+dnl LDAP_R_COMPILE is defined by libldap_r/Makefile.in
+dnl specifically for compiling the threadsafe version of
+dnl the ldap library (-lldap_r).
+dnl
+dnl dnl check for reentrant/threadsafe functions
+dnl dnl
+dnl dnl note: these should only be used when linking
+dnl dnl with $LTHREAD_LIBS
+dnl dnl
+dnl save_CPPFLAGS="$CPPFLAGS"
+dnl save_LIBS="$LIBS"
+dnl LIBS="$LTHREAD_LIBS $LIBS"
+dnl AC_CHECK_FUNCS( \
+dnl gmtime_r \
+dnl gethostbyaddr_r gethostbyname_r \
+dnl feof_unlocked unlocked_feof \
+dnl putc_unlocked unlocked_putc \
+dnl flockfile ftrylockfile \
+dnl )
+dnl CPPFLAGS="$save_CPPFLAGS"
+dnl LIBS="$save_LIBS"
+fi
+
+if test $ol_link_threads = no ; then
+ if test $ol_with_threads = yes ; then
+ AC_MSG_ERROR([no suitable thread support])
+ fi
+
+ if test $ol_with_threads = auto ; then
+ AC_MSG_WARN([no suitable thread support, disabling threads])
+ ol_with_threads=no
+ fi
+
+ AC_DEFINE([NO_THREADS], [1],
+ [define if you have (or want) no threads])
+ LTHREAD_LIBS=""
+ BUILD_THREAD=no
+else
+ BUILD_THREAD=yes
+fi
+
+if test $ol_link_threads != no ; then
+ AC_DEFINE([LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE], [1],
+ [define to 1 if library is thread safe])
+fi
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+case "$ol_with_threads" in
+ no)
+ ol_pthread_ok=no
+ $2
+ ;;
+ *)
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ ;;
+esac
+
+AC_LANG_RESTORE
+])
diff --git a/sntp/libevent/m4/openldap.m4 b/sntp/libevent/m4/openldap.m4
new file mode 100644
index 000000000000..49ffb87058ac
--- /dev/null
+++ b/sntp/libevent/m4/openldap.m4
@@ -0,0 +1,1131 @@
+dnl OpenLDAP Autoconf Macros
+dnl $OpenLDAP: pkg/ldap/build/openldap.m4,v 1.157.2.10 2010/04/13 20:22:21 kurt Exp $
+dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
+dnl
+dnl Copyright 1998-2010 The OpenLDAP Foundation.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted only as authorized by the OpenLDAP
+dnl Public License.
+dnl
+dnl A copy of this license is available in the file LICENSE-OPENLDAP in
+dnl this directory of the distribution or, alternatively, at
+dnl <http://www.OpenLDAP.org/license.html>.
+dnl
+dnl --------------------------------------------------------------------
+dnl Restricted form of AC_ARG_ENABLE that limits user options
+dnl
+dnl $1 = option name
+dnl $2 = help-string
+dnl $3 = default value (auto). "--" means do not set it by default
+dnl $4 = allowed values (auto yes no)
+dnl $5 = overridden default
+AC_DEFUN([OL_ARG_ENABLE], [# OpenLDAP --enable-$1
+ pushdef([ol_DefVal],ifelse($3,,auto,$3))
+ AC_ARG_ENABLE($1,ifelse($4,,[$2],[$2] translit([$4],[ ],[|])) ifelse($3,--,,@<:@ol_DefVal@:>@),[
+ ol_arg=invalid
+ for ol_val in ifelse($4,,[auto yes no],[$4]) ; do
+ if test "$enableval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ AC_MSG_ERROR(bad value $enableval for --enable-$1)
+ fi
+ ol_enable_$1="$ol_arg"
+]ifelse($3,--,,[,
+[ ol_enable_$1=ifelse($5,,ol_DefVal,[${]$5[:-]ol_DefVal[}])]]))dnl
+dnl AC_MSG_RESULT([OpenLDAP -enable-$1 $ol_enable_$1])
+ popdef([ol_DefVal])
+# end --enable-$1
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl Restricted form of AC_ARG_WITH that limits user options
+dnl
+dnl $1 = option name
+dnl $2 = help-string
+dnl $3 = default value (no)
+dnl $4 = allowed values (yes or no)
+AC_DEFUN([OL_ARG_WITH], [# OpenLDAP --with-$1
+ AC_ARG_WITH($1,[$2 @<:@]ifelse($3,,yes,$3)@:>@,[
+ ol_arg=invalid
+ for ol_val in ifelse($4,,[yes no],[$4]) ; do
+ if test "$withval" = "$ol_val" ; then
+ ol_arg="$ol_val"
+ fi
+ done
+ if test "$ol_arg" = "invalid" ; then
+ AC_MSG_ERROR(bad value $withval for --with-$1)
+ fi
+ ol_with_$1="$ol_arg"
+],
+[ ol_with_$1=ifelse($3,,"no","$3")])dnl
+dnl AC_MSG_RESULT([OpenLDAP --with-$1 $ol_with_$1])
+# end --with-$1
+])dnl
+dnl ====================================================================
+dnl Check for dependency generation flag
+AC_DEFUN([OL_MKDEPEND], [# test for make depend flag
+OL_MKDEP=
+OL_MKDEP_FLAGS=
+if test -z "${MKDEP}"; then
+ OL_MKDEP="${CC-cc}"
+ if test -z "${MKDEP_FLAGS}"; then
+ AC_CACHE_CHECK([for ${OL_MKDEP} depend flag], ol_cv_mkdep, [
+ ol_cv_mkdep=no
+ for flag in "-M" "-xM"; do
+ cat > conftest.c <<EOF
+ noCode;
+EOF
+ if AC_TRY_COMMAND($OL_MKDEP $flag conftest.c) \
+ | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
+ then
+ if test ! -f conftest."${ac_object}" ; then
+ ol_cv_mkdep=$flag
+ OL_MKDEP_FLAGS="$flag"
+ break
+ fi
+ fi
+ done
+ rm -f conftest*
+ ])
+ test "$ol_cv_mkdep" = no && OL_MKDEP=":"
+ else
+ cc_cv_mkdep=yes
+ OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
+ fi
+else
+ cc_cv_mkdep=yes
+ OL_MKDEP="${MKDEP}"
+ OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
+fi
+AC_SUBST(OL_MKDEP)
+AC_SUBST(OL_MKDEP_FLAGS)
+])
+dnl
+dnl ====================================================================
+dnl Check if system uses EBCDIC instead of ASCII
+AC_DEFUN([OL_CPP_EBCDIC], [# test for EBCDIC
+AC_CACHE_CHECK([for EBCDIC],ol_cv_cpp_ebcdic,[
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#if !('M' == 0xd4)
+#include <__ASCII__/generate_error.h>
+#endif
+]])],[ol_cv_cpp_ebcdic=yes],[ol_cv_cpp_ebcdic=no])])
+if test $ol_cv_cpp_ebcdic = yes ; then
+ AC_DEFINE(HAVE_EBCDIC,1, [define if system uses EBCDIC instead of ASCII])
+fi
+])
+dnl
+dnl --------------------------------------------------------------------
+dnl Check for MSVC
+AC_DEFUN([OL_MSVC],
+[AC_REQUIRE_CPP()dnl
+AC_CACHE_CHECK([whether we are using MS Visual C++], ol_cv_msvc,
+[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#ifndef _MSC_VER
+#include <__FOO__/generate_error.h>
+#endif
+]])],[ol_cv_msvc=yes],[ol_cv_msvc=no])])])
+
+dnl --------------------------------------------------------------------
+dnl OpenLDAP version of STDC header check w/ EBCDIC support
+AC_DEFUN([OL_HEADER_STDC],
+[AC_REQUIRE_CPP()dnl
+AC_REQUIRE([OL_CPP_EBCDIC])dnl
+AC_CACHE_CHECK([for ANSI C header files], ol_cv_header_stdc,
+[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>]])],[ol_cv_header_stdc=yes],[ol_cv_header_stdc=no])
+
+if test $ol_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+AC_EGREP_HEADER(memchr, string.h, , ol_cv_header_stdc=no)
+fi
+
+if test $ol_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+AC_EGREP_HEADER(free, stdlib.h, , ol_cv_header_stdc=no)
+fi
+
+if test $ol_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h>
+#ifndef HAVE_EBCDIC
+# 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); }
+]])],[],[ol_cv_header_stdc=no],[:])
+fi])
+if test $ol_cv_header_stdc = yes; then
+ AC_DEFINE([STDC_HEADERS], [1], [is standard C provided?])
+fi
+ac_cv_header_stdc=disable
+])
+dnl
+dnl ====================================================================
+dnl DNS resolver macros
+AC_DEFUN([OL_RESOLVER_TRY],
+[if test $ol_cv_lib_resolver = no ; then
+ AC_CACHE_CHECK([for resolver link (]ifelse($2,,default,$2)[)],[$1],
+[
+ ol_RESOLVER_LIB=ifelse($2,,,$2)
+ ol_LIBS=$LIBS
+ LIBS="$ol_RESOLVER_LIB $LIBS"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <netinet/in.h>
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
+#ifdef HAVE_RESOLV_H
+# include <resolv.h>
+#endif
+]], [[{
+ int len, status;
+ char *request = NULL;
+ unsigned char reply[64*1024];
+ unsigned char host[64*1024];
+ unsigned char *p;
+
+#ifdef NS_HFIXEDSZ
+ /* Bind 8/9 interface */
+ len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
+#else
+ /* Bind 4 interface */
+# ifndef T_SRV
+# define T_SRV 33
+# endif
+ len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
+#endif
+ p = reply;
+#ifdef NS_HFIXEDSZ
+ /* Bind 8/9 interface */
+ p += NS_HFIXEDSZ;
+#elif defined(HFIXEDSZ)
+ /* Bind 4 interface w/ HFIXEDSZ */
+ p += HFIXEDSZ;
+#else
+ /* Bind 4 interface w/o HFIXEDSZ */
+ p += sizeof(HEADER);
+#endif
+ status = dn_expand( reply, reply+len, p, host, sizeof(host));
+}]])],[$1=yes],[$1=no])
+
+ LIBS="$ol_LIBS"
+])
+
+ if test $$1 = yes ; then
+ ol_cv_lib_resolver=ifelse($2,,yes,$2)
+ fi
+fi
+])
+dnl --------------------------------------------------------------------
+dnl Try to locate appropriate library
+AC_DEFUN([OL_RESOLVER_LINK],
+[ol_cv_lib_resolver=no
+OL_RESOLVER_TRY(ol_cv_resolver_none)
+OL_RESOLVER_TRY(ol_cv_resolver_resolv,[-lresolv])
+OL_RESOLVER_TRY(ol_cv_resolver_bind,[-lbind])
+])
+dnl
+dnl ====================================================================
+dnl International Components for Unicode (ICU)
+AC_DEFUN([OL_ICU],
+[ol_icu=no
+AC_CHECK_HEADERS( unicode/utypes.h )
+if test $ac_cv_header_unicode_utypes_h = yes ; then
+ dnl OL_ICULIBS="-licui18n -licuuc -licudata"
+ OL_ICULIBS="-licuuc -licudata"
+
+ AC_CACHE_CHECK([for ICU libraries], [ol_cv_lib_icu], [
+ ol_LIBS="$LIBS"
+ LIBS="$OL_ICULIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <unicode/utypes.h>
+]], [[
+(void) u_errorName(0);
+]])],[ol_cv_lib_icu=yes],[ol_cv_lib_icu=no])
+ LIBS="$ol_LIBS"
+])
+
+ if test $ol_cv_lib_icu != no ; then
+ ol_icu="$OL_ICULIBS"
+ AC_DEFINE([HAVE_ICU], [1], [define if you actually have ICU])
+ fi
+fi
+])
+dnl
+dnl ====================================================================
+dnl Berkeley DB macros
+dnl
+dnl --------------------------------------------------------------------
+dnl Try to link
+AC_DEFUN([OL_BERKELEY_DB_TRY],
+[if test $ol_cv_lib_db = no ; then
+ AC_CACHE_CHECK([for Berkeley DB link (]ifelse($2,,default,$2)[)],[$1],
+[
+ ol_DB_LIB=ifelse($2,,,$2)
+ ol_LIBS=$LIBS
+ LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
+
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
+
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
+]], [[
+#if DB_VERSION_MAJOR > 2
+ db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+ db_appexit( NULL );
+#else
+ (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
+]])],[$1=yes],[$1=no])
+
+ LIBS="$ol_LIBS"
+])
+
+ if test $$1 = yes ; then
+ ol_cv_lib_db=ifelse($2,,yes,$2)
+ fi
+fi
+])
+dnl
+dnl --------------------------------------------------------------------
+dnl Get major and minor version from <db.h>
+AC_DEFUN([OL_BDB_HEADER_VERSION],
+[AC_CACHE_CHECK([for Berkeley DB major version in db.h], [ol_cv_bdb_major],[
+ AC_LANG_CONFTEST([
+#include <db.h>
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
+__db_version DB_VERSION_MAJOR
+])
+ set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
+ ol_cv_bdb_major=${3}
+])
+case $ol_cv_bdb_major in [[1-9]]*) : ;; *)
+ AC_MSG_ERROR([Unknown Berkeley DB major version in db.h]) ;;
+esac
+
+dnl Determine minor version
+AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[
+ AC_LANG_CONFTEST([
+#include <db.h>
+#ifndef DB_VERSION_MINOR
+# define DB_VERSION_MINOR 0
+#endif
+__db_version DB_VERSION_MINOR
+])
+ set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
+ ol_cv_bdb_minor=${3}
+])
+case $ol_cv_bdb_minor in [[0-9]]*) : ;; *)
+ AC_MSG_ERROR([Unknown Berkeley DB minor version in db.h]) ;;
+esac
+])
+dnl
+dnl --------------------------------------------------------------------
+dnl Try to locate appropriate library
+AC_DEFUN([OL_BERKELEY_DB_LINK],
+[ol_cv_lib_db=no
+
+if test $ol_cv_bdb_major = 4 ; then
+ OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_m,[-ldb-4.$ol_cv_bdb_minor])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db4m,[-ldb4$ol_cv_bdb_minor])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db_4m,[-ldb-4$ol_cv_bdb_minor])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db_4_m,[-ldb-4-$ol_cv_bdb_minor])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db_4,[-ldb-4])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db4,[-ldb4])
+ OL_BERKELEY_DB_TRY(ol_cv_db_db,[-ldb])
+fi
+OL_BERKELEY_DB_TRY(ol_cv_db_none)
+])
+dnl
+dnl --------------------------------------------------------------------
+dnl Check if Berkeley DB version
+AC_DEFUN([OL_BERKELEY_DB_VERSION],
+[AC_CACHE_CHECK([for Berkeley DB library and header version match], [ol_cv_berkeley_db_version], [
+ ol_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ if test $ol_cv_lib_db != yes ; then
+ LIBS="$ol_cv_lib_db $LIBS"
+ fi
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_DB_185_H
+ choke me;
+#else
+#include <db.h>
+#endif
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+main()
+{
+#if DB_VERSION_MAJOR > 1
+ char *version;
+ int major, minor, patch;
+
+ version = db_version( &major, &minor, &patch );
+
+ if( major != DB_VERSION_MAJOR ||
+ minor != DB_VERSION_MINOR ||
+ patch != DB_VERSION_PATCH )
+ {
+ printf("Berkeley DB version mismatch\n"
+ "\theader: %s\n\tlibrary: %s\n",
+ DB_VERSION_STRING, version);
+ return 1;
+ }
+#endif
+
+ return 0;
+}]])],[ol_cv_berkeley_db_version=yes],[ol_cv_berkeley_db_version=no],[ol_cv_berkeley_db_version=cross])
+
+ LIBS="$ol_LIBS"
+])
+
+ if test $ol_cv_berkeley_db_version = no ; then
+ AC_MSG_ERROR([Berkeley DB version mismatch])
+ fi
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl Check if Berkeley DB supports DB_THREAD
+AC_DEFUN([OL_BERKELEY_DB_THREAD],
+[AC_CACHE_CHECK([for Berkeley DB thread support], [ol_cv_berkeley_db_thread], [
+ ol_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ if test $ol_cv_lib_db != yes ; then
+ LIBS="$ol_cv_lib_db $LIBS"
+ fi
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_DB_185_H
+ choke me;
+#else
+#include <db.h>
+#endif
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+main()
+{
+ int rc;
+ u_int32_t flags = DB_CREATE |
+#ifdef DB_PRIVATE
+ DB_PRIVATE |
+#endif
+ DB_THREAD;
+
+#if DB_VERSION_MAJOR > 2
+ DB_ENV *env = NULL;
+
+ rc = db_env_create( &env, 0 );
+
+ flags |= DB_INIT_MPOOL;
+#ifdef DB_MPOOL_PRIVATE
+ flags |= DB_MPOOL_PRIVATE;
+#endif
+
+ if( rc ) {
+ printf("BerkeleyDB: %s\n", db_strerror(rc) );
+ return rc;
+ }
+
+#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
+ rc = (env->open)( env, NULL, flags, 0 );
+#else
+ rc = (env->open)( env, NULL, NULL, flags, 0 );
+#endif
+
+ if ( rc == 0 ) {
+ rc = env->close( env, 0 );
+ }
+
+ if( rc ) {
+ printf("BerkeleyDB: %s\n", db_strerror(rc) );
+ return rc;
+ }
+
+#else
+ DB_ENV env;
+ memset( &env, '\0', sizeof(env) );
+
+ rc = db_appinit( NULL, NULL, &env, flags );
+
+ if( rc == 0 ) {
+ db_appexit( &env );
+ }
+
+ unlink("__db_mpool.share");
+ unlink("__db_lock.share");
+#endif
+
+ return rc;
+}]])],[ol_cv_berkeley_db_thread=yes],[ol_cv_berkeley_db_thread=no],[ol_cv_berkeley_db_thread=cross])
+
+ LIBS="$ol_LIBS"
+])
+
+ if test $ol_cv_berkeley_db_thread != no ; then
+ AC_DEFINE([HAVE_BERKELEY_DB_THREAD], [1],
+ [define if Berkeley DB has DB_THREAD support])
+ fi
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl Find any DB
+AC_DEFUN([OL_BERKELEY_DB],
+[ol_cv_berkeley_db=no
+AC_CHECK_HEADERS(db.h)
+if test $ac_cv_header_db_h = yes; then
+ OL_BDB_HEADER_VERSION
+ OL_BDB_COMPAT
+
+ if test $ol_cv_bdb_compat != yes ; then
+ AC_MSG_ERROR([BerkeleyDB version incompatible with BDB/HDB backends])
+ fi
+
+ OL_BERKELEY_DB_LINK
+ if test "$ol_cv_lib_db" != no ; then
+ ol_cv_berkeley_db=yes
+ OL_BERKELEY_DB_VERSION
+ OL_BERKELEY_DB_THREAD
+ fi
+fi
+])
+dnl --------------------------------------------------------------------
+dnl Check for version compatility with back-bdb
+AC_DEFUN([OL_BDB_COMPAT],
+[AC_CACHE_CHECK([if Berkeley DB version supported by BDB/HDB backends], [ol_cv_bdb_compat],[
+ AC_EGREP_CPP(__db_version_compat,[
+#include <db.h>
+
+ /* this check could be improved */
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
+#ifndef DB_VERSION_MINOR
+# define DB_VERSION_MINOR 0
+#endif
+
+#define DB_VERSION_MM ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
+
+/* require 4.4 or later */
+#if DB_VERSION_MM >= 0x0404
+ __db_version_compat
+#endif
+ ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
+])
+
+dnl
+dnl ====================================================================
+dnl Check POSIX Thread version
+dnl
+dnl defines ol_cv_pthread_version to 4, 5, 6, 7, 8, 10, depending on the
+dnl version of the POSIX.4a Draft that is implemented.
+dnl 10 == POSIX.4a Final == POSIX.1c-1996 for our purposes.
+dnl Existence of pthread.h should be tested separately.
+dnl
+dnl tests:
+dnl pthread_detach() was dropped in Draft 8, it is present
+dnl in every other version
+dnl PTHREAD_CREATE_UNDETACHED is only in Draft 7, it was called
+dnl PTHREAD_CREATE_JOINABLE after that
+dnl pthread_attr_create was renamed to pthread_attr_init in Draft 6.
+dnl Draft 6-10 has _init, Draft 4-5 has _create.
+dnl pthread_attr_default was dropped in Draft 6, only 4 and 5 have it
+dnl PTHREAD_MUTEX_INITIALIZER was introduced in Draft 5. It's not
+dnl interesting to us because we don't try to statically
+dnl initialize mutexes. 5-10 has it.
+dnl
+dnl Draft 9 and 10 are equivalent for our purposes.
+dnl
+AC_DEFUN([OL_POSIX_THREAD_VERSION],
+[AC_CACHE_CHECK([POSIX thread version],[ol_cv_pthread_version],[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+# include <pthread.h>
+ ]], [[
+ int i = PTHREAD_CREATE_JOINABLE;
+ ]])],[
+ AC_EGREP_HEADER(pthread_detach,pthread.h,
+ ol_cv_pthread_version=10, ol_cv_pthread_version=8)],[
+ AC_EGREP_CPP(draft7,[
+# include <pthread.h>
+# ifdef PTHREAD_CREATE_UNDETACHED
+ draft7
+# endif
+ ], ol_cv_pthread_version=7, [
+ AC_EGREP_HEADER(pthread_attr_init,pthread.h,
+ ol_cv_pthread_version=6, [
+ AC_EGREP_CPP(draft5,[
+# include <pthread.h>
+#ifdef PTHREAD_MUTEX_INITIALIZER
+ draft5
+#endif
+ ], ol_cv_pthread_version=5, ol_cv_pthread_version=4) ]) ]) ])
+])
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+AC_DEFUN([OL_PTHREAD_TEST_INCLUDES], [[
+/* pthread test headers */
+#include <pthread.h>
+#if HAVE_PTHREADS < 7
+#include <errno.h>
+#endif
+#ifndef NULL
+#define NULL (void*)0
+#endif
+
+static void *task(p)
+ void *p;
+{
+ return (void *) (p == NULL);
+}
+]])
+AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[
+ /* pthread test function */
+#ifndef PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED 1
+#endif
+ pthread_t t;
+ int status;
+ int detach = PTHREAD_CREATE_DETACHED;
+
+#if HAVE_PTHREADS > 4
+ /* Final pthreads */
+ pthread_attr_t attr;
+
+ status = pthread_attr_init(&attr);
+ if( status ) return status;
+
+#if HAVE_PTHREADS < 7
+ status = pthread_attr_setdetachstate(&attr, &detach);
+ if( status < 0 ) status = errno;
+#else
+ status = pthread_attr_setdetachstate(&attr, detach);
+#endif
+ if( status ) return status;
+ status = pthread_create( &t, &attr, task, NULL );
+#if HAVE_PTHREADS < 7
+ if( status < 0 ) status = errno;
+#endif
+ if( status ) return status;
+#else
+ /* Draft 4 pthreads */
+ status = pthread_create( &t, pthread_attr_default, task, NULL );
+ if( status ) return errno;
+
+ /* give thread a chance to complete */
+ /* it should remain joinable and hence detachable */
+ sleep( 1 );
+
+ status = pthread_detach( &t );
+ if( status ) return errno;
+#endif
+
+#ifdef HAVE_LINUX_THREADS
+ pthread_kill_other_threads_np();
+#endif
+
+ return 0;
+]])
+
+AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], [
+AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES
+
+int main(argc, argv)
+ int argc;
+ char **argv;
+{
+OL_PTHREAD_TEST_FUNCTION
+}
+])])
+dnl --------------------------------------------------------------------
+AC_DEFUN([OL_PTHREAD_TRY], [# Pthread try link: $1 ($2)
+if test "$ol_link_threads" = no ; then
+ # try $1
+ AC_CACHE_CHECK([for pthread link with $1], [$2], [
+ # save the flags
+ ol_LIBS="$LIBS"
+ LIBS="$1 $LIBS"
+
+ AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
+ [$2=yes],
+ [$2=no],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM(OL_PTHREAD_TEST_INCLUDES,
+ OL_PTHREAD_TEST_FUNCTION)],
+ [$2=yes], [$2=no])])
+
+ # restore the LIBS
+ LIBS="$ol_LIBS"
+ ])
+
+ if test $$2 = yes ; then
+ ol_link_pthreads="$1"
+ ol_link_threads=posix
+ fi
+fi
+])
+dnl
+dnl ====================================================================
+dnl Check GNU Pth pthread Header
+dnl
+dnl defines ol_cv_header linux_threads to 'yes' or 'no'
+dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h
+dnl doesn't exists. Existance of pthread.h should separately
+dnl checked.
+dnl
+AC_DEFUN([OL_HEADER_GNU_PTH_PTHREAD_H], [
+ AC_CACHE_CHECK([for GNU Pth pthread.h],
+ [ol_cv_header_gnu_pth_pthread_h],
+ [AC_EGREP_CPP(__gnu_pth__,
+ [#include <pthread.h>
+#ifdef _POSIX_THREAD_IS_GNU_PTH
+ __gnu_pth__;
+#endif
+],
+ [ol_cv_header_gnu_pth_pthread_h=yes],
+ [ol_cv_header_gnu_pth_pthread_h=no])
+ ])
+])dnl
+dnl ====================================================================
+dnl Check for NT Threads
+AC_DEFUN([OL_NT_THREADS], [
+ AC_CHECK_FUNC(_beginthread)
+
+ if test $ac_cv_func__beginthread = yes ; then
+ AC_DEFINE([HAVE_NT_THREADS], [1], [if you have NT Threads])
+ ol_cv_nt_threads=yes
+ fi
+])
+dnl ====================================================================
+dnl Check LinuxThreads Header
+dnl
+dnl defines ol_cv_header linux_threads to 'yes' or 'no'
+dnl 'no' implies pthreads.h is not LinuxThreads or pthreads.h
+dnl doesn't exists. Existance of pthread.h should separately
+dnl checked.
+dnl
+AC_DEFUN([OL_HEADER_LINUX_THREADS], [
+ AC_CACHE_CHECK([for LinuxThreads pthread.h],
+ [ol_cv_header_linux_threads],
+ [AC_EGREP_CPP(pthread_kill_other_threads_np,
+ [#include <pthread.h>],
+ [ol_cv_header_linux_threads=yes],
+ [ol_cv_header_linux_threads=no])
+ ])
+ if test $ol_cv_header_linux_threads = yes; then
+ AC_DEFINE([HAVE_LINUX_THREADS], [1], [if you have LinuxThreads])
+ fi
+])dnl
+dnl --------------------------------------------------------------------
+dnl Check LinuxThreads Implementation
+dnl
+dnl defines ol_cv_sys_linux_threads to 'yes' or 'no'
+dnl 'no' implies pthreads implementation is not LinuxThreads.
+dnl
+AC_DEFUN([OL_SYS_LINUX_THREADS], [
+ AC_CHECK_FUNCS(pthread_kill_other_threads_np)
+ AC_CACHE_CHECK([for LinuxThreads implementation],
+ [ol_cv_sys_linux_threads],
+ [ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np])
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl Check LinuxThreads consistency
+AC_DEFUN([OL_LINUX_THREADS], [
+ AC_REQUIRE([OL_HEADER_LINUX_THREADS])
+ AC_REQUIRE([OL_SYS_LINUX_THREADS])
+ AC_CACHE_CHECK([for LinuxThreads consistency], [ol_cv_linux_threads], [
+ if test $ol_cv_header_linux_threads = yes &&
+ test $ol_cv_sys_linux_threads = yes; then
+ ol_cv_linux_threads=yes
+ elif test $ol_cv_header_linux_threads = no &&
+ test $ol_cv_sys_linux_threads = no; then
+ ol_cv_linux_threads=no
+ else
+ ol_cv_linux_threads=error
+ fi
+ ])
+])dnl
+dnl
+dnl ====================================================================
+dnl Check for POSIX Regex
+AC_DEFUN([OL_POSIX_REGEX], [
+AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <regex.h>
+static char *pattern, *string;
+main()
+{
+ int rc;
+ regex_t re;
+
+ pattern = "^A";
+
+ if(regcomp(&re, pattern, 0)) {
+ return -1;
+ }
+
+ string = "ALL MATCH";
+
+ rc = regexec(&re, string, 0, (void*)0, 0);
+
+ regfree(&re);
+
+ return rc;
+}]])],[ol_cv_c_posix_regex=yes],[ol_cv_c_posix_regex=no],[ol_cv_c_posix_regex=cross])])
+])
+dnl
+dnl ====================================================================
+dnl Check if toupper() requires islower() to be called first
+AC_DEFUN([OL_C_UPPER_LOWER],
+[AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <ctype.h>
+main()
+{
+ if ('C' == toupper('C'))
+ exit(0);
+ else
+ exit(1);
+}]])],[ol_cv_c_upper_lower=no],[ol_cv_c_upper_lower=yes],[ol_cv_c_upper_lower=safe])])
+if test $ol_cv_c_upper_lower != no ; then
+ AC_DEFINE([C_UPPER_LOWER], [1], [define if toupper() requires islower()])
+fi
+])
+dnl
+dnl ====================================================================
+dnl Error string checks
+dnl
+dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
+dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
+dnl Reported by Keith Bostic.
+AC_DEFUN([OL_SYS_ERRLIST],
+[AC_CACHE_CHECK([declaration of sys_errlist],ol_cv_dcl_sys_errlist,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h>
+#ifdef _WIN32
+#include <stdlib.h>
+#endif ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_dcl_sys_errlist=yes
+ ol_cv_have_sys_errlist=yes],[ol_cv_dcl_sys_errlist=no])])
+#
+# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
+if test $ol_cv_dcl_sys_errlist = no ; then
+ AC_DEFINE([DECL_SYS_ERRLIST], [1],
+ [define if sys_errlist is not declared in stdio.h or errno.h])
+
+ AC_CACHE_CHECK([existence of sys_errlist],ol_cv_have_sys_errlist,[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], [[char *c = (char *) *sys_errlist]])],[ol_cv_have_sys_errlist=yes],[ol_cv_have_sys_errlist=no])])
+fi
+if test $ol_cv_have_sys_errlist = yes ; then
+ AC_DEFINE([HAVE_SYS_ERRLIST], [1],
+ [define if you actually have sys_errlist in your libs])
+fi
+])dnl
+AC_DEFUN([OL_NONPOSIX_STRERROR_R],
+[AC_CACHE_CHECK([non-posix strerror_r],ol_cv_nonposix_strerror_r,[
+ AC_EGREP_CPP(strerror_r,[#include <string.h>],
+ ol_decl_strerror_r=yes, ol_decl_strerror_r=no)dnl
+
+ if test $ol_decl_strerror_r = yes ; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[ /* from autoconf 2.59 */
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no])
+ else
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ main() {
+ char buf[100];
+ buf[0] = 0;
+ strerror_r( 1, buf, sizeof buf );
+ exit( buf[0] == 0 );
+ }
+ ]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror=no],[ol_cv_nonposix_strerror=no])
+ fi
+ ])
+if test $ol_cv_nonposix_strerror_r = yes ; then
+ AC_DEFINE([HAVE_NONPOSIX_STRERROR_R], [1],
+ [define if strerror_r returns char* instead of int])
+fi
+])dnl
+dnl
+AC_DEFUN([OL_STRERROR],
+[OL_SYS_ERRLIST dnl TEMPORARY
+AC_CHECK_FUNCS(strerror strerror_r)
+ol_cv_func_strerror_r=no
+if test "${ac_cv_func_strerror_r}" = yes ; then
+ OL_NONPOSIX_STRERROR_R
+elif test "${ac_cv_func_strerror}" = no ; then
+ OL_SYS_ERRLIST
+fi
+])dnl
+dnl ====================================================================
+dnl Early MIPS compilers (used in Ultrix 4.2) don't like
+dnl "int x; int *volatile a = &x; *a = 0;"
+dnl -- borrowed from PDKSH
+AC_DEFUN([OL_C_VOLATILE],
+ [AC_CACHE_CHECK(if compiler understands volatile, ol_cv_c_volatile,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int x, y, z;]], [[volatile int a; int * volatile b = x ? &y : &z;
+ /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
+ *b = 0;]])],[ol_cv_c_volatile=yes],[ol_cv_c_volatile=no])])
+ if test $ol_cv_c_volatile = yes; then
+ :
+ else
+ AC_DEFINE([volatile], [], [define as empty if volatile is not supported])
+ fi
+ ])dnl
+dnl
+dnl ====================================================================
+dnl Look for fetch(3)
+AC_DEFUN([OL_LIB_FETCH],
+[ol_LIBS=$LIBS
+LIBS="-lfetch -lcom_err $LIBS"
+AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#include <stdio.h>
+#include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
+LIBS=$ol_LIBS
+if test $ol_cv_lib_fetch != no ; then
+ ol_link_fetch="-lfetch -lcom_err"
+ AC_DEFINE([HAVE_FETCH], [1],
+ [define if you actually have FreeBSD fetch(3)])
+fi
+])dnl
+dnl
+dnl ====================================================================
+dnl Define inet_aton is available
+AC_DEFUN([OL_FUNC_INET_ATON],
+ [AC_CACHE_CHECK([for inet_aton()], ol_cv_func_inet_aton,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
+# include <netinet/in.h>
+# ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
+#endif
+]], [[struct in_addr in;
+int rc = inet_aton( "255.255.255.255", &in );]])],[ol_cv_func_inet_aton=yes],[ol_cv_func_inet_aton=no])])
+ if test $ol_cv_func_inet_aton != no; then
+ AC_DEFINE(HAVE_INET_ATON, 1,
+ [define to you inet_aton(3) is available])
+ fi
+ ])dnl
+dnl
+dnl ====================================================================
+dnl check no of arguments for ctime_r
+AC_DEFUN([OL_FUNC_CTIME_R_NARGS],
+ [AC_CACHE_CHECK(number of arguments of ctime_r, ol_cv_func_ctime_r_nargs,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[time_t ti; char *buffer; ctime_r(&ti,buffer,32);]])],[ol_cv_func_ctime_r_nargs3=yes],[ol_cv_func_ctime_r_nargs3=no])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[time_t ti; char *buffer; ctime_r(&ti,buffer);]])],[ol_cv_func_ctime_r_nargs2=yes],[ol_cv_func_ctime_r_nargs2=no])
+
+ if test $ol_cv_func_ctime_r_nargs3 = yes &&
+ test $ol_cv_func_ctime_r_nargs2 = no ; then
+
+ ol_cv_func_ctime_r_nargs=3
+
+ elif test $ol_cv_func_ctime_r_nargs3 = no &&
+ test $ol_cv_func_ctime_r_nargs2 = yes ; then
+
+ ol_cv_func_ctime_r_nargs=2
+
+ else
+ ol_cv_func_ctime_r_nargs=0
+ fi
+ ])
+
+ if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
+ AC_DEFINE_UNQUOTED(CTIME_R_NARGS, $ol_cv_func_ctime_r_nargs,
+ [set to the number of arguments ctime_r() expects])
+ fi
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl check return type of ctime_r()
+AC_DEFUN([OL_FUNC_CTIME_R_TYPE],
+ [AC_CACHE_CHECK(return type of ctime_r, ol_cv_func_ctime_r_type,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[extern int (ctime_r)();]])],[ol_cv_func_ctime_r_type="int"],[ol_cv_func_ctime_r_type="charp"])
+ ])
+ if test $ol_cv_func_ctime_r_type = "int" ; then
+ AC_DEFINE(CTIME_R_RETURNS_INT,1, [define if ctime_r() returns int])
+ fi
+])dnl
+dnl ====================================================================
+dnl check no of arguments for gethostbyname_r
+AC_DEFUN([OL_FUNC_GETHOSTBYNAME_R_NARGS],
+ [AC_CACHE_CHECK(number of arguments of gethostbyname_r,
+ ol_cv_func_gethostbyname_r_nargs,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#define BUFSIZE (sizeof(struct hostent)+10)]], [[struct hostent hent; char buffer[BUFSIZE];
+ int bufsize=BUFSIZE;int h_errno;
+ (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
+ buffer, bufsize, &h_errno);]])],[ol_cv_func_gethostbyname_r_nargs5=yes],[ol_cv_func_gethostbyname_r_nargs5=no])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#define BUFSIZE (sizeof(struct hostent)+10)]], [[struct hostent hent;struct hostent *rhent;
+ char buffer[BUFSIZE];
+ int bufsize=BUFSIZE;int h_errno;
+ (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
+ &rhent, &h_errno);]])],[ol_cv_func_gethostbyname_r_nargs6=yes],[ol_cv_func_gethostbyname_r_nargs6=no])
+
+ if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
+ test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
+
+ ol_cv_func_gethostbyname_r_nargs=5
+
+ elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
+ test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
+
+ ol_cv_func_gethostbyname_r_nargs=6
+
+ else
+ ol_cv_func_gethostbyname_r_nargs=0
+ fi
+ ])
+ if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
+ AC_DEFINE_UNQUOTED(GETHOSTBYNAME_R_NARGS,
+ $ol_cv_func_gethostbyname_r_nargs,
+ [set to the number of arguments gethostbyname_r() expects])
+ fi
+])dnl
+dnl
+dnl check no of arguments for gethostbyaddr_r
+AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS],
+ [AC_CACHE_CHECK(number of arguments of gethostbyaddr_r,
+ [ol_cv_func_gethostbyaddr_r_nargs],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#define BUFSIZE (sizeof(struct hostent)+10)]], [[struct hostent hent; char buffer[BUFSIZE];
+ struct in_addr add;
+ size_t alen=sizeof(struct in_addr);
+ int bufsize=BUFSIZE;int h_errno;
+ (void)gethostbyaddr_r( (void *)&(add.s_addr),
+ alen, AF_INET, &hent, buffer, bufsize, &h_errno);]])],[ol_cv_func_gethostbyaddr_r_nargs7=yes],[ol_cv_func_gethostbyaddr_r_nargs7=no])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#define BUFSIZE (sizeof(struct hostent)+10)]], [[struct hostent hent;
+ struct hostent *rhent; char buffer[BUFSIZE];
+ struct in_addr add;
+ size_t alen=sizeof(struct in_addr);
+ int bufsize=BUFSIZE;int h_errno;
+ (void)gethostbyaddr_r( (void *)&(add.s_addr),
+ alen, AF_INET, &hent, buffer, bufsize,
+ &rhent, &h_errno);]])],[ol_cv_func_gethostbyaddr_r_nargs8=yes],[ol_cv_func_gethostbyaddr_r_nargs8=no])
+
+ if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
+ test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
+
+ ol_cv_func_gethostbyaddr_r_nargs=7
+
+ elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
+ test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
+
+ ol_cv_func_gethostbyaddr_r_nargs=8
+
+ else
+ ol_cv_func_gethostbyaddr_r_nargs=0
+ fi
+ ])
+ if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
+ AC_DEFINE_UNQUOTED(GETHOSTBYADDR_R_NARGS,
+ $ol_cv_func_gethostbyaddr_r_nargs,
+ [set to the number of arguments gethostbyaddr_r() expects])
+ fi
+])dnl
+dnl
+dnl --------------------------------------------------------------------
+dnl Check for Cyrus SASL version compatility
+AC_DEFUN([OL_SASL_COMPAT],
+[AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[
+ AC_EGREP_CPP(__sasl_compat,[
+#ifdef HAVE_SASL_SASL_H
+#include <sasl/sasl.h>
+#else
+#include <sasl.h>
+#endif
+
+/* Require 2.1.15+ */
+#if SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1
+ char *__sasl_compat = "2.2+ or better okay (we guess)";
+#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR == 1 \
+ && SASL_VERSION_STEP >=15
+ char *__sasl_compat = "2.1.15+ or better okay";
+#endif
+ ], [ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
+])
+dnl ====================================================================
+dnl check for SSL compatibility
+AC_DEFUN([OL_SSL_COMPAT],
+[AC_CACHE_CHECK([OpenSSL library version (CRL checking capability)],
+ [ol_cv_ssl_crl_compat],[
+ AC_EGREP_CPP(__ssl_compat,[
+#ifdef HAVE_OPENSSL_SSL_H
+#include <openssl/ssl.h>
+#endif
+
+/* Require 0.9.7d+ */
+#if OPENSSL_VERSION_NUMBER >= 0x0090704fL
+ char *__ssl_compat = "0.9.7d";
+#endif
+ ], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])])
+])
diff --git a/sntp/libevent/make-event-config.sed b/sntp/libevent/make-event-config.sed
new file mode 100644
index 000000000000..e31018a2dd55
--- /dev/null
+++ b/sntp/libevent/make-event-config.sed
@@ -0,0 +1,23 @@
+# Sed script to postprocess config.h into event-config.h.
+
+1i\
+/* event2/event-config.h\
+ *\
+ * This file was generated by autoconf when libevent was built, and post-\
+ * processed by Libevent so that its macros would have a uniform prefix.\
+ *\
+ * DO NOT EDIT THIS FILE.\
+ *\
+ * Do not rely on macros in this file existing in later versions.\
+ */\
+\
+#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_\
+#define EVENT2_EVENT_CONFIG_H_INCLUDED_\
+
+$a\
+\
+#endif /* event2/event-config.h */
+
+s/#\( *\)define /#\1define EVENT__/
+s/#\( *\)undef /#\1undef EVENT__/
+s/#\( *\)if\(n*\)def /#\1if\2def EVENT__/
diff --git a/sntp/libevent/minheap-internal.h b/sntp/libevent/minheap-internal.h
new file mode 100644
index 000000000000..b3b6f1fd497e
--- /dev/null
+++ b/sntp/libevent/minheap-internal.h
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com>
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 MINHEAP_INTERNAL_H_INCLUDED_
+#define MINHEAP_INTERNAL_H_INCLUDED_
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/util.h"
+#include "util-internal.h"
+#include "mm-internal.h"
+
+typedef struct min_heap
+{
+ struct event** p;
+ unsigned n, a;
+} min_heap_t;
+
+static inline void min_heap_ctor_(min_heap_t* s);
+static inline void min_heap_dtor_(min_heap_t* s);
+static inline void min_heap_elem_init_(struct event* e);
+static inline int min_heap_elt_is_top_(const struct event *e);
+static inline int min_heap_empty_(min_heap_t* s);
+static inline unsigned min_heap_size_(min_heap_t* s);
+static inline struct event* min_heap_top_(min_heap_t* s);
+static inline int min_heap_reserve_(min_heap_t* s, unsigned n);
+static inline int min_heap_push_(min_heap_t* s, struct event* e);
+static inline struct event* min_heap_pop_(min_heap_t* s);
+static inline int min_heap_adjust_(min_heap_t *s, struct event* e);
+static inline int min_heap_erase_(min_heap_t* s, struct event* e);
+static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e);
+static inline void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct event* e);
+static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e);
+
+#define min_heap_elem_greater(a, b) \
+ (evutil_timercmp(&(a)->ev_timeout, &(b)->ev_timeout, >))
+
+void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; }
+void min_heap_dtor_(min_heap_t* s) { if (s->p) mm_free(s->p); }
+void min_heap_elem_init_(struct event* e) { e->ev_timeout_pos.min_heap_idx = -1; }
+int min_heap_empty_(min_heap_t* s) { return 0u == s->n; }
+unsigned min_heap_size_(min_heap_t* s) { return s->n; }
+struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; }
+
+int min_heap_push_(min_heap_t* s, struct event* e)
+{
+ if (min_heap_reserve_(s, s->n + 1))
+ return -1;
+ min_heap_shift_up_(s, s->n++, e);
+ return 0;
+}
+
+struct event* min_heap_pop_(min_heap_t* s)
+{
+ if (s->n)
+ {
+ struct event* e = *s->p;
+ min_heap_shift_down_(s, 0u, s->p[--s->n]);
+ e->ev_timeout_pos.min_heap_idx = -1;
+ return e;
+ }
+ return 0;
+}
+
+int min_heap_elt_is_top_(const struct event *e)
+{
+ return e->ev_timeout_pos.min_heap_idx == 0;
+}
+
+int min_heap_erase_(min_heap_t* s, struct event* e)
+{
+ if (-1 != e->ev_timeout_pos.min_heap_idx)
+ {
+ struct event *last = s->p[--s->n];
+ unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
+ /* we replace e with the last element in the heap. We might need to
+ shift it upward if it is less than its parent, or downward if it is
+ greater than one or both its children. Since the children are known
+ to be less than the parent, it can't need to shift both up and
+ down. */
+ if (e->ev_timeout_pos.min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], last))
+ min_heap_shift_up_unconditional_(s, e->ev_timeout_pos.min_heap_idx, last);
+ else
+ min_heap_shift_down_(s, e->ev_timeout_pos.min_heap_idx, last);
+ e->ev_timeout_pos.min_heap_idx = -1;
+ return 0;
+ }
+ return -1;
+}
+
+int min_heap_adjust_(min_heap_t *s, struct event *e)
+{
+ if (-1 == e->ev_timeout_pos.min_heap_idx) {
+ return min_heap_push_(s, e);
+ } else {
+ unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
+ /* The position of e has changed; we shift it up or down
+ * as needed. We can't need to do both. */
+ if (e->ev_timeout_pos.min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], e))
+ min_heap_shift_up_unconditional_(s, e->ev_timeout_pos.min_heap_idx, e);
+ else
+ min_heap_shift_down_(s, e->ev_timeout_pos.min_heap_idx, e);
+ return 0;
+ }
+}
+
+int min_heap_reserve_(min_heap_t* s, unsigned n)
+{
+ if (s->a < n)
+ {
+ struct event** p;
+ unsigned a = s->a ? s->a * 2 : 8;
+ if (a < n)
+ a = n;
+ if (!(p = (struct event**)mm_realloc(s->p, a * sizeof *p)))
+ return -1;
+ s->p = p;
+ s->a = a;
+ }
+ return 0;
+}
+
+void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct event* e)
+{
+ unsigned parent = (hole_index - 1) / 2;
+ do
+ {
+ (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index;
+ hole_index = parent;
+ parent = (hole_index - 1) / 2;
+ } while (hole_index && min_heap_elem_greater(s->p[parent], e));
+ (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
+}
+
+void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e)
+{
+ unsigned parent = (hole_index - 1) / 2;
+ while (hole_index && min_heap_elem_greater(s->p[parent], e))
+ {
+ (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index;
+ hole_index = parent;
+ parent = (hole_index - 1) / 2;
+ }
+ (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
+}
+
+void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e)
+{
+ unsigned min_child = 2 * (hole_index + 1);
+ while (min_child <= s->n)
+ {
+ min_child -= min_child == s->n || min_heap_elem_greater(s->p[min_child], s->p[min_child - 1]);
+ if (!(min_heap_elem_greater(e, s->p[min_child])))
+ break;
+ (s->p[hole_index] = s->p[min_child])->ev_timeout_pos.min_heap_idx = hole_index;
+ hole_index = min_child;
+ min_child = 2 * (hole_index + 1);
+ }
+ (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
+}
+
+#endif /* MINHEAP_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/mm-internal.h b/sntp/libevent/mm-internal.h
new file mode 100644
index 000000000000..4ba6fce4adaf
--- /dev/null
+++ b/sntp/libevent/mm-internal.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 MM_INTERNAL_H_INCLUDED_
+#define MM_INTERNAL_H_INCLUDED_
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+/* Internal use only: Memory allocation functions. We give them nice short
+ * mm_names for our own use, but make sure that the symbols have longer names
+ * so they don't conflict with other libraries (like, say, libmm). */
+
+/** Allocate uninitialized memory.
+ *
+ * @return On success, return a pointer to sz newly allocated bytes.
+ * On failure, set errno to ENOMEM and return NULL.
+ * If the argument sz is 0, simply return NULL.
+ */
+void *event_mm_malloc_(size_t sz);
+
+/** Allocate memory initialized to zero.
+ *
+ * @return On success, return a pointer to (count * size) newly allocated
+ * bytes, initialized to zero.
+ * On failure, or if the product would result in an integer overflow,
+ * set errno to ENOMEM and return NULL.
+ * If either arguments are 0, simply return NULL.
+ */
+void *event_mm_calloc_(size_t count, size_t size);
+
+/** Duplicate a string.
+ *
+ * @return On success, return a pointer to a newly allocated duplicate
+ * of a string.
+ * Set errno to ENOMEM and return NULL if a memory allocation error
+ * occurs (or would occur) in the process.
+ * If the argument str is NULL, set errno to EINVAL and return NULL.
+ */
+char *event_mm_strdup_(const char *str);
+
+void *event_mm_realloc_(void *p, size_t sz);
+void event_mm_free_(void *p);
+#define mm_malloc(sz) event_mm_malloc_(sz)
+#define mm_calloc(count, size) event_mm_calloc_((count), (size))
+#define mm_strdup(s) event_mm_strdup_(s)
+#define mm_realloc(p, sz) event_mm_realloc_((p), (sz))
+#define mm_free(p) event_mm_free_(p)
+#else
+#define mm_malloc(sz) malloc(sz)
+#define mm_calloc(n, sz) calloc((n), (sz))
+#define mm_strdup(s) strdup(s)
+#define mm_realloc(p, sz) realloc((p), (sz))
+#define mm_free(p) free(p)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/poll.c b/sntp/libevent/poll.c
new file mode 100644
index 000000000000..51475934b348
--- /dev/null
+++ b/sntp/libevent/poll.c
@@ -0,0 +1,341 @@
+/* $OpenBSD: poll.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
+
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_POLL
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <poll.h>
+#include <signal.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "event-internal.h"
+#include "evsignal-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
+#include "time-internal.h"
+
+struct pollidx {
+ int idxplus1;
+};
+
+struct pollop {
+ int event_count; /* Highest number alloc */
+ int nfds; /* Highest number used */
+ int realloc_copy; /* True iff we must realloc
+ * event_set_copy */
+ struct pollfd *event_set;
+ struct pollfd *event_set_copy;
+};
+
+static void *poll_init(struct event_base *);
+static int poll_add(struct event_base *, int, short old, short events, void *idx);
+static int poll_del(struct event_base *, int, short old, short events, void *idx);
+static int poll_dispatch(struct event_base *, struct timeval *);
+static void poll_dealloc(struct event_base *);
+
+const struct eventop pollops = {
+ "poll",
+ poll_init,
+ poll_add,
+ poll_del,
+ poll_dispatch,
+ poll_dealloc,
+ 0, /* doesn't need_reinit */
+ EV_FEATURE_FDS,
+ sizeof(struct pollidx),
+};
+
+static void *
+poll_init(struct event_base *base)
+{
+ struct pollop *pollop;
+
+ if (!(pollop = mm_calloc(1, sizeof(struct pollop))))
+ return (NULL);
+
+ evsig_init_(base);
+
+ evutil_weakrand_seed_(&base->weakrand_seed, 0);
+
+ return (pollop);
+}
+
+#ifdef CHECK_INVARIANTS
+static void
+poll_check_ok(struct pollop *pop)
+{
+ int i, idx;
+ struct event *ev;
+
+ for (i = 0; i < pop->fd_count; ++i) {
+ idx = pop->idxplus1_by_fd[i]-1;
+ if (idx < 0)
+ continue;
+ EVUTIL_ASSERT(pop->event_set[idx].fd == i);
+ }
+ for (i = 0; i < pop->nfds; ++i) {
+ struct pollfd *pfd = &pop->event_set[i];
+ EVUTIL_ASSERT(pop->idxplus1_by_fd[pfd->fd] == i+1);
+ }
+}
+#else
+#define poll_check_ok(pop)
+#endif
+
+static int
+poll_dispatch(struct event_base *base, struct timeval *tv)
+{
+ int res, i, j, nfds;
+ long msec = -1;
+ struct pollop *pop = base->evbase;
+ struct pollfd *event_set;
+
+ poll_check_ok(pop);
+
+ nfds = pop->nfds;
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (base->th_base_lock) {
+ /* If we're using this backend in a multithreaded setting,
+ * then we need to work on a copy of event_set, so that we can
+ * let other threads modify the main event_set while we're
+ * polling. If we're not multithreaded, then we'll skip the
+ * copy step here to save memory and time. */
+ if (pop->realloc_copy) {
+ struct pollfd *tmp = mm_realloc(pop->event_set_copy,
+ pop->event_count * sizeof(struct pollfd));
+ if (tmp == NULL) {
+ event_warn("realloc");
+ return -1;
+ }
+ pop->event_set_copy = tmp;
+ pop->realloc_copy = 0;
+ }
+ memcpy(pop->event_set_copy, pop->event_set,
+ sizeof(struct pollfd)*nfds);
+ event_set = pop->event_set_copy;
+ } else {
+ event_set = pop->event_set;
+ }
+#else
+ event_set = pop->event_set;
+#endif
+
+ if (tv != NULL) {
+ msec = evutil_tv_to_msec_(tv);
+ if (msec < 0 || msec > INT_MAX)
+ msec = INT_MAX;
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = poll(event_set, nfds, msec);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ if (res == -1) {
+ if (errno != EINTR) {
+ event_warn("poll");
+ return (-1);
+ }
+
+ return (0);
+ }
+
+ event_debug(("%s: poll reports %d", __func__, res));
+
+ if (res == 0 || nfds == 0)
+ return (0);
+
+ i = evutil_weakrand_range_(&base->weakrand_seed, nfds);
+ for (j = 0; j < nfds; j++) {
+ int what;
+ if (++i == nfds)
+ i = 0;
+ what = event_set[i].revents;
+ if (!what)
+ continue;
+
+ res = 0;
+
+ /* If the file gets closed notify */
+ if (what & (POLLHUP|POLLERR))
+ what |= POLLIN|POLLOUT;
+ if (what & POLLIN)
+ res |= EV_READ;
+ if (what & POLLOUT)
+ res |= EV_WRITE;
+ if (res == 0)
+ continue;
+
+ evmap_io_active_(base, event_set[i].fd, res);
+ }
+
+ return (0);
+}
+
+static int
+poll_add(struct event_base *base, int fd, short old, short events, void *idx_)
+{
+ struct pollop *pop = base->evbase;
+ struct pollfd *pfd = NULL;
+ struct pollidx *idx = idx_;
+ int i;
+
+ EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
+ if (!(events & (EV_READ|EV_WRITE)))
+ return (0);
+
+ poll_check_ok(pop);
+ if (pop->nfds + 1 >= pop->event_count) {
+ struct pollfd *tmp_event_set;
+ int tmp_event_count;
+
+ if (pop->event_count < 32)
+ tmp_event_count = 32;
+ else
+ tmp_event_count = pop->event_count * 2;
+
+ /* We need more file descriptors */
+ tmp_event_set = mm_realloc(pop->event_set,
+ tmp_event_count * sizeof(struct pollfd));
+ if (tmp_event_set == NULL) {
+ event_warn("realloc");
+ return (-1);
+ }
+ pop->event_set = tmp_event_set;
+
+ pop->event_count = tmp_event_count;
+ pop->realloc_copy = 1;
+ }
+
+ i = idx->idxplus1 - 1;
+
+ if (i >= 0) {
+ pfd = &pop->event_set[i];
+ } else {
+ i = pop->nfds++;
+ pfd = &pop->event_set[i];
+ pfd->events = 0;
+ pfd->fd = fd;
+ idx->idxplus1 = i + 1;
+ }
+
+ pfd->revents = 0;
+ if (events & EV_WRITE)
+ pfd->events |= POLLOUT;
+ if (events & EV_READ)
+ pfd->events |= POLLIN;
+ poll_check_ok(pop);
+
+ return (0);
+}
+
+/*
+ * Nothing to be done here.
+ */
+
+static int
+poll_del(struct event_base *base, int fd, short old, short events, void *idx_)
+{
+ struct pollop *pop = base->evbase;
+ struct pollfd *pfd = NULL;
+ struct pollidx *idx = idx_;
+ int i;
+
+ EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
+ if (!(events & (EV_READ|EV_WRITE)))
+ return (0);
+
+ poll_check_ok(pop);
+ i = idx->idxplus1 - 1;
+ if (i < 0)
+ return (-1);
+
+ /* Do we still want to read or write? */
+ pfd = &pop->event_set[i];
+ if (events & EV_READ)
+ pfd->events &= ~POLLIN;
+ if (events & EV_WRITE)
+ pfd->events &= ~POLLOUT;
+ poll_check_ok(pop);
+ if (pfd->events)
+ /* Another event cares about that fd. */
+ return (0);
+
+ /* Okay, so we aren't interested in that fd anymore. */
+ idx->idxplus1 = 0;
+
+ --pop->nfds;
+ if (i != pop->nfds) {
+ /*
+ * Shift the last pollfd down into the now-unoccupied
+ * position.
+ */
+ memcpy(&pop->event_set[i], &pop->event_set[pop->nfds],
+ sizeof(struct pollfd));
+ idx = evmap_io_get_fdinfo_(&base->io, pop->event_set[i].fd);
+ EVUTIL_ASSERT(idx);
+ EVUTIL_ASSERT(idx->idxplus1 == pop->nfds + 1);
+ idx->idxplus1 = i + 1;
+ }
+
+ poll_check_ok(pop);
+ return (0);
+}
+
+static void
+poll_dealloc(struct event_base *base)
+{
+ struct pollop *pop = base->evbase;
+
+ evsig_dealloc_(base);
+ if (pop->event_set)
+ mm_free(pop->event_set);
+ if (pop->event_set_copy)
+ mm_free(pop->event_set_copy);
+
+ memset(pop, 0, sizeof(struct pollop));
+ mm_free(pop);
+}
+
+#endif /* EVENT__HAVE_POLL */
diff --git a/sntp/libevent/ratelim-internal.h b/sntp/libevent/ratelim-internal.h
new file mode 100644
index 000000000000..6cc1cdde2c87
--- /dev/null
+++ b/sntp/libevent/ratelim-internal.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 RATELIM_INTERNAL_H_INCLUDED_
+#define RATELIM_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/util.h"
+
+/** A token bucket is an internal structure that tracks how many bytes we are
+ * currently willing to read or write on a given bufferevent or group of
+ * bufferevents */
+struct ev_token_bucket {
+ /** How many bytes are we willing to read or write right now? These
+ * values are signed so that we can do "defecit spending" */
+ ev_ssize_t read_limit, write_limit;
+ /** When was this bucket last updated? Measured in abstract 'ticks'
+ * relative to the token bucket configuration. */
+ ev_uint32_t last_updated;
+};
+
+/** Configuration info for a token bucket or set of token buckets. */
+struct ev_token_bucket_cfg {
+ /** How many bytes are we willing to read on average per tick? */
+ size_t read_rate;
+ /** How many bytes are we willing to read at most in any one tick? */
+ size_t read_maximum;
+ /** How many bytes are we willing to write on average per tick? */
+ size_t write_rate;
+ /** How many bytes are we willing to write at most in any one tick? */
+ size_t write_maximum;
+
+ /* How long is a tick? Note that fractions of a millisecond are
+ * ignored. */
+ struct timeval tick_timeout;
+
+ /* How long is a tick, in milliseconds? Derived from tick_timeout. */
+ unsigned msec_per_tick;
+};
+
+/** The current tick is 'current_tick': add bytes to 'bucket' as specified in
+ * 'cfg'. */
+int ev_token_bucket_update_(struct ev_token_bucket *bucket,
+ const struct ev_token_bucket_cfg *cfg,
+ ev_uint32_t current_tick);
+
+/** In which tick does 'tv' fall according to 'cfg'? Note that ticks can
+ * overflow easily; your code needs to handle this. */
+ev_uint32_t ev_token_bucket_get_tick_(const struct timeval *tv,
+ const struct ev_token_bucket_cfg *cfg);
+
+/** Adjust 'bucket' to respect 'cfg', and note that it was last updated in
+ * 'current_tick'. If 'reinitialize' is true, we are changing the
+ * configuration of 'bucket'; otherwise, we are setting it up for the first
+ * time.
+ */
+int ev_token_bucket_init_(struct ev_token_bucket *bucket,
+ const struct ev_token_bucket_cfg *cfg,
+ ev_uint32_t current_tick,
+ int reinitialize);
+
+int bufferevent_remove_from_rate_limit_group_internal_(struct bufferevent *bev,
+ int unsuspend);
+
+/** Decrease the read limit of 'b' by 'n' bytes */
+#define ev_token_bucket_decrement_read(b,n) \
+ do { \
+ (b)->read_limit -= (n); \
+ } while (0)
+/** Decrease the write limit of 'b' by 'n' bytes */
+#define ev_token_bucket_decrement_write(b,n) \
+ do { \
+ (b)->write_limit -= (n); \
+ } while (0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/sample/dns-example.c b/sntp/libevent/sample/dns-example.c
new file mode 100644
index 000000000000..15e48ce4bc66
--- /dev/null
+++ b/sntp/libevent/sample/dns-example.c
@@ -0,0 +1,248 @@
+/*
+ This example code shows how to use the high-level, low-level, and
+ server-level interfaces of evdns.
+
+ XXX It's pretty ugly and should probably be cleaned up.
+ */
+
+#include <event2/event-config.h>
+
+/* Compatibility for possible missing IPv6 declarations */
+#include "../ipv6-internal.h"
+
+#include <sys/types.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#include <event2/event.h>
+#include <event2/dns.h>
+#include <event2/dns_struct.h>
+#include <event2/util.h>
+
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define u32 ev_uint32_t
+#define u8 ev_uint8_t
+
+static const char *
+debug_ntoa(u32 address)
+{
+ static char buf[32];
+ u32 a = ntohl(address);
+ evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d",
+ (int)(u8)((a>>24)&0xff),
+ (int)(u8)((a>>16)&0xff),
+ (int)(u8)((a>>8 )&0xff),
+ (int)(u8)((a )&0xff));
+ return buf;
+}
+
+static void
+main_callback(int result, char type, int count, int ttl,
+ void *addrs, void *orig) {
+ char *n = (char*)orig;
+ int i;
+ for (i = 0; i < count; ++i) {
+ if (type == DNS_IPv4_A) {
+ printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i]));
+ } else if (type == DNS_PTR) {
+ printf("%s: %s\n", n, ((char**)addrs)[i]);
+ }
+ }
+ if (!count) {
+ printf("%s: No answer (%d)\n", n, result);
+ }
+ fflush(stdout);
+}
+
+static void
+gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
+{
+ const char *name = arg;
+ int i;
+ if (err) {
+ printf("%s: %s\n", name, evutil_gai_strerror(err));
+ }
+ if (ai && ai->ai_canonname)
+ printf(" %s ==> %s\n", name, ai->ai_canonname);
+ for (i=0; ai; ai = ai->ai_next, ++i) {
+ char buf[128];
+ if (ai->ai_family == PF_INET) {
+ struct sockaddr_in *sin =
+ (struct sockaddr_in*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET, &sin->sin_addr, buf,
+ sizeof(buf));
+ printf("[%d] %s: %s\n",i,name,buf);
+ } else {
+ struct sockaddr_in6 *sin6 =
+ (struct sockaddr_in6*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET6, &sin6->sin6_addr, buf,
+ sizeof(buf));
+ printf("[%d] %s: %s\n",i,name,buf);
+ }
+ }
+}
+
+static void
+evdns_server_callback(struct evdns_server_request *req, void *data)
+{
+ int i, r;
+ (void)data;
+ /* dummy; give 192.168.11.11 as an answer for all A questions,
+ * give foo.bar.example.com as an answer for all PTR questions. */
+ for (i = 0; i < req->nquestions; ++i) {
+ u32 ans = htonl(0xc0a80b0bUL);
+ if (req->questions[i]->type == EVDNS_TYPE_A &&
+ req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
+ printf(" -- replying for %s (A)\n", req->questions[i]->name);
+ r = evdns_server_request_add_a_reply(req, req->questions[i]->name,
+ 1, &ans, 10);
+ if (r<0)
+ printf("eeep, didn't work.\n");
+ } else if (req->questions[i]->type == EVDNS_TYPE_PTR &&
+ req->questions[i]->dns_question_class == EVDNS_CLASS_INET) {
+ printf(" -- replying for %s (PTR)\n", req->questions[i]->name);
+ r = evdns_server_request_add_ptr_reply(req, NULL, req->questions[i]->name,
+ "foo.bar.example.com", 10);
+ if (r<0)
+ printf("ugh, no luck");
+ } else {
+ printf(" -- skipping %s [%d %d]\n", req->questions[i]->name,
+ req->questions[i]->type, req->questions[i]->dns_question_class);
+ }
+ }
+
+ r = evdns_server_request_respond(req, 0);
+ if (r<0)
+ printf("eeek, couldn't send reply.\n");
+}
+
+static int verbose = 0;
+
+static void
+logfn(int is_warn, const char *msg) {
+ if (!is_warn && !verbose)
+ return;
+ fprintf(stderr, "%s: %s\n", is_warn?"WARN":"INFO", msg);
+}
+
+int
+main(int c, char **v) {
+ int idx;
+ int reverse = 0, servertest = 0, use_getaddrinfo = 0;
+ struct event_base *event_base = NULL;
+ struct evdns_base *evdns_base = NULL;
+ const char *resolv_conf = NULL;
+ if (c<2) {
+ fprintf(stderr, "syntax: %s [-x] [-v] [-c resolv.conf] hostname\n", v[0]);
+ fprintf(stderr, "syntax: %s [-servertest]\n", v[0]);
+ return 1;
+ }
+ idx = 1;
+ while (idx < c && v[idx][0] == '-') {
+ if (!strcmp(v[idx], "-x"))
+ reverse = 1;
+ else if (!strcmp(v[idx], "-v"))
+ verbose = 1;
+ else if (!strcmp(v[idx], "-g"))
+ use_getaddrinfo = 1;
+ else if (!strcmp(v[idx], "-servertest"))
+ servertest = 1;
+ else if (!strcmp(v[idx], "-c")) {
+ if (idx + 1 < c)
+ resolv_conf = v[++idx];
+ else
+ fprintf(stderr, "-c needs an argument\n");
+ } else
+ fprintf(stderr, "Unknown option %s\n", v[idx]);
+ ++idx;
+ }
+
+#ifdef _WIN32
+ {
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+ }
+#endif
+
+ event_base = event_base_new();
+ evdns_base = evdns_base_new(event_base, EVDNS_BASE_DISABLE_WHEN_INACTIVE);
+ evdns_set_log_fn(logfn);
+
+ if (servertest) {
+ evutil_socket_t sock;
+ struct sockaddr_in my_addr;
+ sock = socket(PF_INET, SOCK_DGRAM, 0);
+ if (sock == -1) {
+ perror("socket");
+ exit(1);
+ }
+ evutil_make_socket_nonblocking(sock);
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_port = htons(10053);
+ my_addr.sin_addr.s_addr = INADDR_ANY;
+ if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr))<0) {
+ perror("bind");
+ exit(1);
+ }
+ evdns_add_server_port_with_base(event_base, sock, 0, evdns_server_callback, NULL);
+ }
+ if (idx < c) {
+ int res;
+#ifdef _WIN32
+ if (resolv_conf == NULL)
+ res = evdns_base_config_windows_nameservers(evdns_base);
+ else
+#endif
+ res = evdns_base_resolv_conf_parse(evdns_base,
+ DNS_OPTION_NAMESERVERS,
+ resolv_conf ? resolv_conf : "/etc/resolv.conf");
+
+ if (res < 0) {
+ fprintf(stderr, "Couldn't configure nameservers");
+ return 1;
+ }
+ }
+
+ printf("EVUTIL_AI_CANONNAME in example = %d\n", EVUTIL_AI_CANONNAME);
+ for (; idx < c; ++idx) {
+ if (reverse) {
+ struct in_addr addr;
+ if (evutil_inet_pton(AF_INET, v[idx], &addr)!=1) {
+ fprintf(stderr, "Skipping non-IP %s\n", v[idx]);
+ continue;
+ }
+ fprintf(stderr, "resolving %s...\n",v[idx]);
+ evdns_base_resolve_reverse(evdns_base, &addr, 0, main_callback, v[idx]);
+ } else if (use_getaddrinfo) {
+ struct evutil_addrinfo hints;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_flags = EVUTIL_AI_CANONNAME;
+ fprintf(stderr, "resolving (fwd) %s...\n",v[idx]);
+ evdns_getaddrinfo(evdns_base, v[idx], NULL, &hints,
+ gai_callback, v[idx]);
+ } else {
+ fprintf(stderr, "resolving (fwd) %s...\n",v[idx]);
+ evdns_base_resolve_ipv4(evdns_base, v[idx], 0, main_callback, v[idx]);
+ }
+ }
+ fflush(stdout);
+ event_base_dispatch(event_base);
+ return 0;
+}
+
diff --git a/sntp/libevent/sample/event-read-fifo.c b/sntp/libevent/sample/event-read-fifo.c
new file mode 100644
index 000000000000..27b0b530d5c1
--- /dev/null
+++ b/sntp/libevent/sample/event-read-fifo.c
@@ -0,0 +1,162 @@
+/*
+ * This sample code shows how to use Libevent to read from a named pipe.
+ * XXX This code could make better use of the Libevent interfaces.
+ *
+ * XXX This does not work on Windows; ignore everything inside the _WIN32 block.
+ *
+ * On UNIX, compile with:
+ * cc -I/usr/local/include -o event-read-fifo event-read-fifo.c \
+ * -L/usr/local/lib -levent
+ */
+
+#include <event2/event-config.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <signal.h>
+#else
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+
+static void
+fifo_read(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[255];
+ int len;
+ struct event *ev = arg;
+#ifdef _WIN32
+ DWORD dwBytesRead;
+#endif
+
+ fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n",
+ (int)fd, event, arg);
+#ifdef _WIN32
+ len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL);
+
+ /* Check for end of file. */
+ if (len && dwBytesRead == 0) {
+ fprintf(stderr, "End Of File");
+ event_del(ev);
+ return;
+ }
+
+ buf[dwBytesRead] = '\0';
+#else
+ len = read(fd, buf, sizeof(buf) - 1);
+
+ if (len <= 0) {
+ if (len == -1)
+ perror("read");
+ else if (len == 0)
+ fprintf(stderr, "Connection closed\n");
+ event_del(ev);
+ event_base_loopbreak(event_get_base(ev));
+ return;
+ }
+
+ buf[len] = '\0';
+#endif
+ fprintf(stdout, "Read: %s\n", buf);
+}
+
+/* On Unix, cleanup event.fifo if SIGINT is received. */
+#ifndef _WIN32
+static void
+signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event_base *base = arg;
+ event_base_loopbreak(base);
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ struct event *evfifo;
+ struct event_base* base;
+#ifdef _WIN32
+ HANDLE socket;
+ /* Open a file. */
+ socket = CreateFileA("test.txt", /* open File */
+ GENERIC_READ, /* open for reading */
+ 0, /* do not share */
+ NULL, /* no security */
+ OPEN_EXISTING, /* existing file only */
+ FILE_ATTRIBUTE_NORMAL, /* normal file */
+ NULL); /* no attr. template */
+
+ if (socket == INVALID_HANDLE_VALUE)
+ return 1;
+
+#else
+ struct event *signal_int;
+ struct stat st;
+ const char *fifo = "event.fifo";
+ int socket;
+
+ if (lstat(fifo, &st) == 0) {
+ if ((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+
+ unlink(fifo);
+ if (mkfifo(fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+
+ socket = open(fifo, O_RDONLY | O_NONBLOCK, 0);
+
+ if (socket == -1) {
+ perror("open");
+ exit(1);
+ }
+
+ fprintf(stderr, "Write data to %s\n", fifo);
+#endif
+ /* Initalize the event library */
+ base = event_base_new();
+
+ /* Initalize one event */
+#ifdef _WIN32
+ evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read,
+ event_self_cbarg());
+#else
+ /* catch SIGINT so that event.fifo can be cleaned up */
+ signal_int = evsignal_new(base, SIGINT, signal_cb, base);
+ event_add(signal_int, NULL);
+
+ evfifo = event_new(base, socket, EV_READ|EV_PERSIST, fifo_read,
+ event_self_cbarg());
+#endif
+
+ /* Add it to the active events, without a timeout */
+ event_add(evfifo, NULL);
+
+ event_base_dispatch(base);
+ event_base_free(base);
+#ifdef _WIN32
+ CloseHandle(socket);
+#else
+ close(socket);
+ unlink(fifo);
+#endif
+ libevent_global_shutdown();
+ return (0);
+}
+
diff --git a/sntp/libevent/sample/hello-world.c b/sntp/libevent/sample/hello-world.c
new file mode 100644
index 000000000000..d3cf058a8b55
--- /dev/null
+++ b/sntp/libevent/sample/hello-world.c
@@ -0,0 +1,141 @@
+/*
+ This exmple program provides a trivial server program that listens for TCP
+ connections on port 9995. When they arrive, it writes a short message to
+ each client connection, and closes each connection once it is flushed.
+
+ Where possible, it exits cleanly in response to a SIGINT (ctrl-c).
+*/
+
+
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <signal.h>
+#ifndef _WIN32
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#include <sys/socket.h>
+#endif
+
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+#include <event2/event.h>
+
+static const char MESSAGE[] = "Hello, World!\n";
+
+static const int PORT = 9995;
+
+static void listener_cb(struct evconnlistener *, evutil_socket_t,
+ struct sockaddr *, int socklen, void *);
+static void conn_writecb(struct bufferevent *, void *);
+static void conn_eventcb(struct bufferevent *, short, void *);
+static void signal_cb(evutil_socket_t, short, void *);
+
+int
+main(int argc, char **argv)
+{
+ struct event_base *base;
+ struct evconnlistener *listener;
+ struct event *signal_event;
+
+ struct sockaddr_in sin;
+#ifdef _WIN32
+ WSADATA wsa_data;
+ WSAStartup(0x0201, &wsa_data);
+#endif
+
+ base = event_base_new();
+ if (!base) {
+ fprintf(stderr, "Could not initialize libevent!\n");
+ return 1;
+ }
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(PORT);
+
+ listener = evconnlistener_new_bind(base, listener_cb, (void *)base,
+ LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_FREE, -1,
+ (struct sockaddr*)&sin,
+ sizeof(sin));
+
+ if (!listener) {
+ fprintf(stderr, "Could not create a listener!\n");
+ return 1;
+ }
+
+ signal_event = evsignal_new(base, SIGINT, signal_cb, (void *)base);
+
+ if (!signal_event || event_add(signal_event, NULL)<0) {
+ fprintf(stderr, "Could not create/add a signal event!\n");
+ return 1;
+ }
+
+ event_base_dispatch(base);
+
+ evconnlistener_free(listener);
+ event_free(signal_event);
+ event_base_free(base);
+
+ printf("done\n");
+ return 0;
+}
+
+static void
+listener_cb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *sa, int socklen, void *user_data)
+{
+ struct event_base *base = user_data;
+ struct bufferevent *bev;
+
+ bev = bufferevent_socket_new(base, fd, BEV_OPT_CLOSE_ON_FREE);
+ if (!bev) {
+ fprintf(stderr, "Error constructing bufferevent!");
+ event_base_loopbreak(base);
+ return;
+ }
+ bufferevent_setcb(bev, NULL, conn_writecb, conn_eventcb, NULL);
+ bufferevent_enable(bev, EV_WRITE);
+ bufferevent_disable(bev, EV_READ);
+
+ bufferevent_write(bev, MESSAGE, strlen(MESSAGE));
+}
+
+static void
+conn_writecb(struct bufferevent *bev, void *user_data)
+{
+ struct evbuffer *output = bufferevent_get_output(bev);
+ if (evbuffer_get_length(output) == 0) {
+ printf("flushed answer\n");
+ bufferevent_free(bev);
+ }
+}
+
+static void
+conn_eventcb(struct bufferevent *bev, short events, void *user_data)
+{
+ if (events & BEV_EVENT_EOF) {
+ printf("Connection closed.\n");
+ } else if (events & BEV_EVENT_ERROR) {
+ printf("Got an error on the connection: %s\n",
+ strerror(errno));/*XXX win32*/
+ }
+ /* None of the other events can happen here, since we haven't enabled
+ * timeouts */
+ bufferevent_free(bev);
+}
+
+static void
+signal_cb(evutil_socket_t sig, short events, void *user_data)
+{
+ struct event_base *base = user_data;
+ struct timeval delay = { 2, 0 };
+
+ printf("Caught an interrupt signal; exiting cleanly in two seconds.\n");
+
+ event_base_loopexit(base, &delay);
+}
diff --git a/sntp/libevent/sample/hostcheck.c b/sntp/libevent/sample/hostcheck.c
new file mode 100644
index 000000000000..50709369c07e
--- /dev/null
+++ b/sntp/libevent/sample/hostcheck.c
@@ -0,0 +1,217 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/* This file is an amalgamation of hostcheck.c and most of rawstr.c
+ from cURL. The contents of the COPYING file mentioned above are:
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1996 - 2013, Daniel Stenberg, <daniel@haxx.se>.
+
+All rights reserved.
+
+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", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
+NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization of the copyright holder.
+*/
+
+#include "hostcheck.h"
+#include <string.h>
+
+/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because
+ its behavior is altered by the current locale. */
+static char Curl_raw_toupper(char in)
+{
+ switch (in) {
+ case 'a':
+ return 'A';
+ case 'b':
+ return 'B';
+ case 'c':
+ return 'C';
+ case 'd':
+ return 'D';
+ case 'e':
+ return 'E';
+ case 'f':
+ return 'F';
+ case 'g':
+ return 'G';
+ case 'h':
+ return 'H';
+ case 'i':
+ return 'I';
+ case 'j':
+ return 'J';
+ case 'k':
+ return 'K';
+ case 'l':
+ return 'L';
+ case 'm':
+ return 'M';
+ case 'n':
+ return 'N';
+ case 'o':
+ return 'O';
+ case 'p':
+ return 'P';
+ case 'q':
+ return 'Q';
+ case 'r':
+ return 'R';
+ case 's':
+ return 'S';
+ case 't':
+ return 'T';
+ case 'u':
+ return 'U';
+ case 'v':
+ return 'V';
+ case 'w':
+ return 'W';
+ case 'x':
+ return 'X';
+ case 'y':
+ return 'Y';
+ case 'z':
+ return 'Z';
+ }
+ return in;
+}
+
+/*
+ * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant
+ * to be locale independent and only compare strings we know are safe for
+ * this. See http://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for
+ * some further explanation to why this function is necessary.
+ *
+ * The function is capable of comparing a-z case insensitively even for
+ * non-ascii.
+ */
+
+static int Curl_raw_equal(const char *first, const char *second)
+{
+ while(*first && *second) {
+ if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
+ /* get out of the loop as soon as they don't match */
+ break;
+ first++;
+ second++;
+ }
+ /* we do the comparison here (possibly again), just to make sure that if the
+ loop above is skipped because one of the strings reached zero, we must not
+ return this as a successful match */
+ return (Curl_raw_toupper(*first) == Curl_raw_toupper(*second));
+}
+
+static int Curl_raw_nequal(const char *first, const char *second, size_t max)
+{
+ while(*first && *second && max) {
+ if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) {
+ break;
+ }
+ max--;
+ first++;
+ second++;
+ }
+ if(0 == max)
+ return 1; /* they are equal this far */
+
+ return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
+}
+
+/*
+ * Match a hostname against a wildcard pattern.
+ * E.g.
+ * "foo.host.com" matches "*.host.com".
+ *
+ * We use the matching rule described in RFC6125, section 6.4.3.
+ * http://tools.ietf.org/html/rfc6125#section-6.4.3
+ */
+
+static int hostmatch(const char *hostname, const char *pattern)
+{
+ const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
+ int wildcard_enabled;
+ size_t prefixlen, suffixlen;
+ pattern_wildcard = strchr(pattern, '*');
+ if(pattern_wildcard == NULL)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ /* We require at least 2 dots in pattern to avoid too wide wildcard
+ match. */
+ wildcard_enabled = 1;
+ pattern_label_end = strchr(pattern, '.');
+ if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL ||
+ pattern_wildcard > pattern_label_end ||
+ Curl_raw_nequal(pattern, "xn--", 4)) {
+ wildcard_enabled = 0;
+ }
+ if(!wildcard_enabled)
+ return Curl_raw_equal(pattern, hostname) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+
+ hostname_label_end = strchr(hostname, '.');
+ if(hostname_label_end == NULL ||
+ !Curl_raw_equal(pattern_label_end, hostname_label_end))
+ return CURL_HOST_NOMATCH;
+
+ /* The wildcard must match at least one character, so the left-most
+ label of the hostname is at least as large as the left-most label
+ of the pattern. */
+ if(hostname_label_end - hostname < pattern_label_end - pattern)
+ return CURL_HOST_NOMATCH;
+
+ prefixlen = pattern_wildcard - pattern;
+ suffixlen = pattern_label_end - (pattern_wildcard+1);
+ return Curl_raw_nequal(pattern, hostname, prefixlen) &&
+ Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen,
+ suffixlen) ?
+ CURL_HOST_MATCH : CURL_HOST_NOMATCH;
+}
+
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname)
+{
+ if(!match_pattern || !*match_pattern ||
+ !hostname || !*hostname) /* sanity check */
+ return 0;
+
+ if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */
+ return 1;
+
+ if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH)
+ return 1;
+ return 0;
+}
diff --git a/sntp/libevent/sample/hostcheck.h b/sntp/libevent/sample/hostcheck.h
new file mode 100644
index 000000000000..f40bc4343501
--- /dev/null
+++ b/sntp/libevent/sample/hostcheck.h
@@ -0,0 +1,30 @@
+#ifndef HEADER_CURL_HOSTCHECK_H
+#define HEADER_CURL_HOSTCHECK_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#define CURL_HOST_NOMATCH 0
+#define CURL_HOST_MATCH 1
+int Curl_cert_hostcheck(const char *match_pattern, const char *hostname);
+
+#endif /* HEADER_CURL_HOSTCHECK_H */
+
diff --git a/sntp/libevent/sample/http-server.c b/sntp/libevent/sample/http-server.c
new file mode 100644
index 000000000000..1cb89bc91b04
--- /dev/null
+++ b/sntp/libevent/sample/http-server.c
@@ -0,0 +1,415 @@
+/*
+ A trivial static http webserver using Libevent's evhttp.
+
+ This is not the best code in the world, and it does some fairly stupid stuff
+ that you would never want to do in a production webserver. Caveat hackor!
+
+ */
+
+/* Compatibility for possible missing IPv6 declarations */
+#include "../util-internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
+#else
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <dirent.h>
+#endif
+
+#include <event2/event.h>
+#include <event2/http.h>
+#include <event2/buffer.h>
+#include <event2/util.h>
+#include <event2/keyvalq_struct.h>
+
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#endif
+
+#ifdef _WIN32
+#ifndef stat
+#define stat _stat
+#endif
+#ifndef fstat
+#define fstat _fstat
+#endif
+#ifndef open
+#define open _open
+#endif
+#ifndef close
+#define close _close
+#endif
+#ifndef O_RDONLY
+#define O_RDONLY _O_RDONLY
+#endif
+#endif
+
+char uri_root[512];
+
+static const struct table_entry {
+ const char *extension;
+ const char *content_type;
+} content_type_table[] = {
+ { "txt", "text/plain" },
+ { "c", "text/plain" },
+ { "h", "text/plain" },
+ { "html", "text/html" },
+ { "htm", "text/htm" },
+ { "css", "text/css" },
+ { "gif", "image/gif" },
+ { "jpg", "image/jpeg" },
+ { "jpeg", "image/jpeg" },
+ { "png", "image/png" },
+ { "pdf", "application/pdf" },
+ { "ps", "application/postsript" },
+ { NULL, NULL },
+};
+
+/* Try to guess a good content-type for 'path' */
+static const char *
+guess_content_type(const char *path)
+{
+ const char *last_period, *extension;
+ const struct table_entry *ent;
+ last_period = strrchr(path, '.');
+ if (!last_period || strchr(last_period, '/'))
+ goto not_found; /* no exension */
+ extension = last_period + 1;
+ for (ent = &content_type_table[0]; ent->extension; ++ent) {
+ if (!evutil_ascii_strcasecmp(ent->extension, extension))
+ return ent->content_type;
+ }
+
+not_found:
+ return "application/misc";
+}
+
+/* Callback used for the /dump URI, and for every non-GET request:
+ * dumps all information to stdout and gives back a trivial 200 ok */
+static void
+dump_request_cb(struct evhttp_request *req, void *arg)
+{
+ const char *cmdtype;
+ struct evkeyvalq *headers;
+ struct evkeyval *header;
+ struct evbuffer *buf;
+
+ switch (evhttp_request_get_command(req)) {
+ case EVHTTP_REQ_GET: cmdtype = "GET"; break;
+ case EVHTTP_REQ_POST: cmdtype = "POST"; break;
+ case EVHTTP_REQ_HEAD: cmdtype = "HEAD"; break;
+ case EVHTTP_REQ_PUT: cmdtype = "PUT"; break;
+ case EVHTTP_REQ_DELETE: cmdtype = "DELETE"; break;
+ case EVHTTP_REQ_OPTIONS: cmdtype = "OPTIONS"; break;
+ case EVHTTP_REQ_TRACE: cmdtype = "TRACE"; break;
+ case EVHTTP_REQ_CONNECT: cmdtype = "CONNECT"; break;
+ case EVHTTP_REQ_PATCH: cmdtype = "PATCH"; break;
+ default: cmdtype = "unknown"; break;
+ }
+
+ printf("Received a %s request for %s\nHeaders:\n",
+ cmdtype, evhttp_request_get_uri(req));
+
+ headers = evhttp_request_get_input_headers(req);
+ for (header = headers->tqh_first; header;
+ header = header->next.tqe_next) {
+ printf(" %s: %s\n", header->key, header->value);
+ }
+
+ buf = evhttp_request_get_input_buffer(req);
+ puts("Input data: <<<");
+ while (evbuffer_get_length(buf)) {
+ int n;
+ char cbuf[128];
+ n = evbuffer_remove(buf, cbuf, sizeof(cbuf));
+ if (n > 0)
+ (void) fwrite(cbuf, 1, n, stdout);
+ }
+ puts(">>>");
+
+ evhttp_send_reply(req, 200, "OK", NULL);
+}
+
+/* This callback gets invoked when we get any http request that doesn't match
+ * any other callback. Like any evhttp server callback, it has a simple job:
+ * it must eventually call evhttp_send_error() or evhttp_send_reply().
+ */
+static void
+send_document_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = NULL;
+ const char *docroot = arg;
+ const char *uri = evhttp_request_get_uri(req);
+ struct evhttp_uri *decoded = NULL;
+ const char *path;
+ char *decoded_path;
+ char *whole_path = NULL;
+ size_t len;
+ int fd = -1;
+ struct stat st;
+
+ if (evhttp_request_get_command(req) != EVHTTP_REQ_GET) {
+ dump_request_cb(req, arg);
+ return;
+ }
+
+ printf("Got a GET request for <%s>\n", uri);
+
+ /* Decode the URI */
+ decoded = evhttp_uri_parse(uri);
+ if (!decoded) {
+ printf("It's not a good URI. Sending BADREQUEST\n");
+ evhttp_send_error(req, HTTP_BADREQUEST, 0);
+ return;
+ }
+
+ /* Let's see what path the user asked for. */
+ path = evhttp_uri_get_path(decoded);
+ if (!path) path = "/";
+
+ /* We need to decode it, to see what path the user really wanted. */
+ decoded_path = evhttp_uridecode(path, 0, NULL);
+ if (decoded_path == NULL)
+ goto err;
+ /* Don't allow any ".."s in the path, to avoid exposing stuff outside
+ * of the docroot. This test is both overzealous and underzealous:
+ * it forbids aceptable paths like "/this/one..here", but it doesn't
+ * do anything to prevent symlink following." */
+ if (strstr(decoded_path, ".."))
+ goto err;
+
+ len = strlen(decoded_path)+strlen(docroot)+2;
+ if (!(whole_path = malloc(len))) {
+ perror("malloc");
+ goto err;
+ }
+ evutil_snprintf(whole_path, len, "%s/%s", docroot, decoded_path);
+
+ if (stat(whole_path, &st)<0) {
+ goto err;
+ }
+
+ /* This holds the content we're sending. */
+ evb = evbuffer_new();
+
+ if (S_ISDIR(st.st_mode)) {
+ /* If it's a directory, read the comments and make a little
+ * index page */
+#ifdef _WIN32
+ HANDLE d;
+ WIN32_FIND_DATAA ent;
+ char *pattern;
+ size_t dirlen;
+#else
+ DIR *d;
+ struct dirent *ent;
+#endif
+ const char *trailing_slash = "";
+
+ if (!strlen(path) || path[strlen(path)-1] != '/')
+ trailing_slash = "/";
+
+#ifdef _WIN32
+ dirlen = strlen(whole_path);
+ pattern = malloc(dirlen+3);
+ memcpy(pattern, whole_path, dirlen);
+ pattern[dirlen] = '\\';
+ pattern[dirlen+1] = '*';
+ pattern[dirlen+2] = '\0';
+ d = FindFirstFileA(pattern, &ent);
+ free(pattern);
+ if (d == INVALID_HANDLE_VALUE)
+ goto err;
+#else
+ if (!(d = opendir(whole_path)))
+ goto err;
+#endif
+
+ evbuffer_add_printf(evb, "<html>\n <head>\n"
+ " <title>%s</title>\n"
+ " <base href='%s%s'>\n"
+ " </head>\n"
+ " <body>\n"
+ " <h1>%s</h1>\n"
+ " <ul>\n",
+ decoded_path, /* XXX html-escape this. */
+ path, /* XXX html-escape this? */
+ trailing_slash,
+ decoded_path /* XXX html-escape this */);
+#ifdef _WIN32
+ do {
+ const char *name = ent.cFileName;
+#else
+ while ((ent = readdir(d))) {
+ const char *name = ent->d_name;
+#endif
+ evbuffer_add_printf(evb,
+ " <li><a href=\"%s\">%s</a>\n",
+ name, name);/* XXX escape this */
+#ifdef _WIN32
+ } while (FindNextFileA(d, &ent));
+#else
+ }
+#endif
+ evbuffer_add_printf(evb, "</ul></body></html>\n");
+#ifdef _WIN32
+ CloseHandle(d);
+#else
+ closedir(d);
+#endif
+ evhttp_add_header(evhttp_request_get_output_headers(req),
+ "Content-Type", "text/html");
+ } else {
+ /* Otherwise it's a file; add it to the buffer to get
+ * sent via sendfile */
+ const char *type = guess_content_type(decoded_path);
+ if ((fd = open(whole_path, O_RDONLY)) < 0) {
+ perror("open");
+ goto err;
+ }
+
+ if (fstat(fd, &st)<0) {
+ /* Make sure the length still matches, now that we
+ * opened the file :/ */
+ perror("fstat");
+ goto err;
+ }
+ evhttp_add_header(evhttp_request_get_output_headers(req),
+ "Content-Type", type);
+ evbuffer_add_file(evb, fd, 0, st.st_size);
+ }
+
+ evhttp_send_reply(req, 200, "OK", evb);
+ goto done;
+err:
+ evhttp_send_error(req, 404, "Document was not found");
+ if (fd>=0)
+ close(fd);
+done:
+ if (decoded)
+ evhttp_uri_free(decoded);
+ if (decoded_path)
+ free(decoded_path);
+ if (whole_path)
+ free(whole_path);
+ if (evb)
+ evbuffer_free(evb);
+}
+
+static void
+syntax(void)
+{
+ fprintf(stdout, "Syntax: http-server <docroot>\n");
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event_base *base;
+ struct evhttp *http;
+ struct evhttp_bound_socket *handle;
+
+ unsigned short port = 0;
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#else
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return (1);
+#endif
+ if (argc < 2) {
+ syntax();
+ return 1;
+ }
+
+ base = event_base_new();
+ if (!base) {
+ fprintf(stderr, "Couldn't create an event_base: exiting\n");
+ return 1;
+ }
+
+ /* Create a new evhttp object to handle requests. */
+ http = evhttp_new(base);
+ if (!http) {
+ fprintf(stderr, "couldn't create evhttp. Exiting.\n");
+ return 1;
+ }
+
+ /* The /dump URI will dump all requests to stdout and say 200 ok. */
+ evhttp_set_cb(http, "/dump", dump_request_cb, NULL);
+
+ /* We want to accept arbitrary requests, so we need to set a "generic"
+ * cb. We can also add callbacks for specific paths. */
+ evhttp_set_gencb(http, send_document_cb, argv[1]);
+
+ /* Now we tell the evhttp what port to listen on */
+ handle = evhttp_bind_socket_with_handle(http, "0.0.0.0", port);
+ if (!handle) {
+ fprintf(stderr, "couldn't bind to port %d. Exiting.\n",
+ (int)port);
+ return 1;
+ }
+
+ {
+ /* Extract and display the address we're listening on. */
+ struct sockaddr_storage ss;
+ evutil_socket_t fd;
+ ev_socklen_t socklen = sizeof(ss);
+ char addrbuf[128];
+ void *inaddr;
+ const char *addr;
+ int got_port = -1;
+ fd = evhttp_bound_socket_get_fd(handle);
+ memset(&ss, 0, sizeof(ss));
+ if (getsockname(fd, (struct sockaddr *)&ss, &socklen)) {
+ perror("getsockname() failed");
+ return 1;
+ }
+ if (ss.ss_family == AF_INET) {
+ got_port = ntohs(((struct sockaddr_in*)&ss)->sin_port);
+ inaddr = &((struct sockaddr_in*)&ss)->sin_addr;
+ } else if (ss.ss_family == AF_INET6) {
+ got_port = ntohs(((struct sockaddr_in6*)&ss)->sin6_port);
+ inaddr = &((struct sockaddr_in6*)&ss)->sin6_addr;
+ } else {
+ fprintf(stderr, "Weird address family %d\n",
+ ss.ss_family);
+ return 1;
+ }
+ addr = evutil_inet_ntop(ss.ss_family, inaddr, addrbuf,
+ sizeof(addrbuf));
+ if (addr) {
+ printf("Listening on %s:%d\n", addr, got_port);
+ evutil_snprintf(uri_root, sizeof(uri_root),
+ "http://%s:%d",addr,got_port);
+ } else {
+ fprintf(stderr, "evutil_inet_ntop failed\n");
+ return 1;
+ }
+ }
+
+ event_base_dispatch(base);
+
+ return 0;
+}
diff --git a/sntp/libevent/sample/https-client.c b/sntp/libevent/sample/https-client.c
new file mode 100644
index 000000000000..e13ac4bd342f
--- /dev/null
+++ b/sntp/libevent/sample/https-client.c
@@ -0,0 +1,426 @@
+/*
+ This is an example of how to hook up evhttp with bufferevent_ssl
+
+ It just GETs an https URL given on the command-line and prints the response
+ body to stdout.
+
+ Actually, it also accepts plain http URLs to make it easy to compare http vs
+ https code paths.
+
+ Loosely based on le-proxy.c.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#define snprintf _snprintf
+#define strcasecmp _stricmp
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include <event2/bufferevent_ssl.h>
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+#include <event2/http.h>
+
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+#include "openssl_hostname_validation.h"
+
+static struct event_base *base;
+static int ignore_cert = 0;
+
+static void
+http_request_done(struct evhttp_request *req, void *ctx)
+{
+ char buffer[256];
+ int nread;
+
+ if (req == NULL) {
+ /* If req is NULL, it means an error occurred, but
+ * sadly we are mostly left guessing what the error
+ * might have been. We'll do our best... */
+ struct bufferevent *bev = (struct bufferevent *) ctx;
+ unsigned long oslerr;
+ int printed_err = 0;
+ int errcode = EVUTIL_SOCKET_ERROR();
+ fprintf(stderr, "some request failed - no idea which one though!\n");
+ /* Print out the OpenSSL error queue that libevent
+ * squirreled away for us, if any. */
+ while ((oslerr = bufferevent_get_openssl_error(bev))) {
+ ERR_error_string_n(oslerr, buffer, sizeof(buffer));
+ fprintf(stderr, "%s\n", buffer);
+ printed_err = 1;
+ }
+ /* If the OpenSSL error queue was empty, maybe it was a
+ * socket error; let's try printing that. */
+ if (! printed_err)
+ fprintf(stderr, "socket error = %s (%d)\n",
+ evutil_socket_error_to_string(errcode),
+ errcode);
+ return;
+ }
+
+ fprintf(stderr, "Response line: %d %s\n",
+ evhttp_request_get_response_code(req),
+ evhttp_request_get_response_code_line(req));
+
+ while ((nread = evbuffer_remove(evhttp_request_get_input_buffer(req),
+ buffer, sizeof(buffer)))
+ > 0) {
+ /* These are just arbitrary chunks of 256 bytes.
+ * They are not lines, so we can't treat them as such. */
+ fwrite(buffer, nread, 1, stdout);
+ }
+}
+
+static void
+syntax(void)
+{
+ fputs("Syntax:\n", stderr);
+ fputs(" https-client -url <https-url> [-data data-file.bin] [-ignore-cert]\n", stderr);
+ fputs("Example:\n", stderr);
+ fputs(" https-client -url https://ip.appspot.com/\n", stderr);
+
+ exit(1);
+}
+
+static void
+die(const char *msg)
+{
+ fputs(msg, stderr);
+ exit(1);
+}
+
+static void
+die_openssl(const char *func)
+{
+ fprintf (stderr, "%s failed:\n", func);
+
+ /* This is the OpenSSL function that prints the contents of the
+ * error stack to the specified file handle. */
+ ERR_print_errors_fp (stderr);
+
+ exit(1);
+}
+
+/* See http://archives.seul.org/libevent/users/Jan-2013/msg00039.html */
+static int cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg)
+{
+ char cert_str[256];
+ const char *host = (const char *) arg;
+ const char *res_str = "X509_verify_cert failed";
+ HostnameValidationResult res = Error;
+
+ /* This is the function that OpenSSL would call if we hadn't called
+ * SSL_CTX_set_cert_verify_callback(). Therefore, we are "wrapping"
+ * the default functionality, rather than replacing it. */
+ int ok_so_far = 0;
+
+ X509 *server_cert = NULL;
+
+ if (ignore_cert) {
+ return 1;
+ }
+
+ ok_so_far = X509_verify_cert(x509_ctx);
+
+ server_cert = X509_STORE_CTX_get_current_cert(x509_ctx);
+
+ if (ok_so_far) {
+ res = validate_hostname(host, server_cert);
+
+ switch (res) {
+ case MatchFound:
+ res_str = "MatchFound";
+ break;
+ case MatchNotFound:
+ res_str = "MatchNotFound";
+ break;
+ case NoSANPresent:
+ res_str = "NoSANPresent";
+ break;
+ case MalformedCertificate:
+ res_str = "MalformedCertificate";
+ break;
+ case Error:
+ res_str = "Error";
+ break;
+ default:
+ res_str = "WTF!";
+ break;
+ }
+ }
+
+ X509_NAME_oneline(X509_get_subject_name (server_cert),
+ cert_str, sizeof (cert_str));
+
+ if (res == MatchFound) {
+ printf("https server '%s' has this certificate, "
+ "which looks good to me:\n%s\n",
+ host, cert_str);
+ return 1;
+ } else {
+ printf("Got '%s' for hostname '%s' and certificate:\n%s\n",
+ res_str, host, cert_str);
+ return 0;
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ int r;
+
+ struct evhttp_uri *http_uri;
+ const char *url = NULL, *data_file = NULL;
+ const char *scheme, *host, *path, *query;
+ char uri[256];
+ int port;
+
+ SSL_CTX *ssl_ctx;
+ SSL *ssl;
+ struct bufferevent *bev;
+ struct evhttp_connection *evcon;
+ struct evhttp_request *req;
+ struct evkeyvalq *output_headers;
+ struct evbuffer * output_buffer;
+
+ int i;
+
+ for (i = 1; i < argc; i++) {
+ if (!strcmp("-url", argv[i])) {
+ if (i < argc - 1) {
+ url = argv[i + 1];
+ } else {
+ syntax();
+ }
+ } else if (!strcmp("-ignore-cert", argv[i])) {
+ ignore_cert = 1;
+ } else if (!strcmp("-data", argv[i])) {
+ if (i < argc - 1) {
+ data_file = argv[i + 1];
+ } else {
+ syntax();
+ }
+ } else if (!strcmp("-help", argv[i])) {
+ syntax();
+ }
+ }
+
+ if (!url) {
+ syntax();
+ }
+
+#ifdef _WIN32
+ {
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int err;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ err = WSAStartup(wVersionRequested, &wsaData);
+ if (err != 0) {
+ printf("WSAStartup failed with error: %d\n", err);
+ return 1;
+ }
+ }
+#endif // _WIN32
+
+ http_uri = evhttp_uri_parse(url);
+ if (http_uri == NULL) {
+ die("malformed url");
+ }
+
+ scheme = evhttp_uri_get_scheme(http_uri);
+ if (scheme == NULL || (strcasecmp(scheme, "https") != 0 &&
+ strcasecmp(scheme, "http") != 0)) {
+ die("url must be http or https");
+ }
+
+ host = evhttp_uri_get_host(http_uri);
+ if (host == NULL) {
+ die("url must have a host");
+ }
+
+ port = evhttp_uri_get_port(http_uri);
+ if (port == -1) {
+ port = (strcasecmp(scheme, "http") == 0) ? 80 : 443;
+ }
+
+ path = evhttp_uri_get_path(http_uri);
+ if (path == NULL) {
+ path = "/";
+ }
+
+ query = evhttp_uri_get_query(http_uri);
+ if (query == NULL) {
+ snprintf(uri, sizeof(uri) - 1, "%s", path);
+ } else {
+ snprintf(uri, sizeof(uri) - 1, "%s?%s", path, query);
+ }
+ uri[sizeof(uri) - 1] = '\0';
+
+ // Initialize OpenSSL
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+
+ /* This isn't strictly necessary... OpenSSL performs RAND_poll
+ * automatically on first use of random number generator. */
+ r = RAND_poll();
+ if (r == 0) {
+ die_openssl("RAND_poll");
+ }
+
+ /* Create a new OpenSSL context */
+ ssl_ctx = SSL_CTX_new(SSLv23_method());
+ if (!ssl_ctx)
+ die_openssl("SSL_CTX_new");
+
+ #ifndef _WIN32
+ /* TODO: Add certificate loading on Windows as well */
+
+ /* Attempt to use the system's trusted root certificates.
+ * (This path is only valid for Debian-based systems.) */
+ if (1 != SSL_CTX_load_verify_locations(ssl_ctx,
+ "/etc/ssl/certs/ca-certificates.crt",
+ NULL))
+ die_openssl("SSL_CTX_load_verify_locations");
+ /* Ask OpenSSL to verify the server certificate. Note that this
+ * does NOT include verifying that the hostname is correct.
+ * So, by itself, this means anyone with any legitimate
+ * CA-issued certificate for any website, can impersonate any
+ * other website in the world. This is not good. See "The
+ * Most Dangerous Code in the World" article at
+ * https://crypto.stanford.edu/~dabo/pubs/abstracts/ssl-client-bugs.html
+ */
+ SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
+ /* This is how we solve the problem mentioned in the previous
+ * comment. We "wrap" OpenSSL's validation routine in our
+ * own routine, which also validates the hostname by calling
+ * the code provided by iSECPartners. Note that even though
+ * the "Everything You've Always Wanted to Know About
+ * Certificate Validation With OpenSSL (But Were Afraid to
+ * Ask)" paper from iSECPartners says very explicitly not to
+ * call SSL_CTX_set_cert_verify_callback (at the bottom of
+ * page 2), what we're doing here is safe because our
+ * cert_verify_callback() calls X509_verify_cert(), which is
+ * OpenSSL's built-in routine which would have been called if
+ * we hadn't set the callback. Therefore, we're just
+ * "wrapping" OpenSSL's routine, not replacing it. */
+ SSL_CTX_set_cert_verify_callback (ssl_ctx, cert_verify_callback,
+ (void *) host);
+ #endif // not _WIN32
+
+ // Create event base
+ base = event_base_new();
+ if (!base) {
+ perror("event_base_new()");
+ return 1;
+ }
+
+ // Create OpenSSL bufferevent and stack evhttp on top of it
+ ssl = SSL_new(ssl_ctx);
+ if (ssl == NULL) {
+ die_openssl("SSL_new()");
+ }
+
+ // Set hostname for SNI extension
+ SSL_set_tlsext_host_name(ssl, host);
+
+ if (strcasecmp(scheme, "http") == 0) {
+ bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
+ } else {
+ bev = bufferevent_openssl_socket_new(base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ }
+
+ if (bev == NULL) {
+ fprintf(stderr, "bufferevent_openssl_socket_new() failed\n");
+ return 1;
+ }
+
+ bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
+
+ // For simplicity, we let DNS resolution block. Everything else should be
+ // asynchronous though.
+ evcon = evhttp_connection_base_bufferevent_new(base, NULL, bev,
+ host, port);
+ if (evcon == NULL) {
+ fprintf(stderr, "evhttp_connection_base_bufferevent_new() failed\n");
+ return 1;
+ }
+
+ // Fire off the request
+ req = evhttp_request_new(http_request_done, bev);
+ if (req == NULL) {
+ fprintf(stderr, "evhttp_request_new() failed\n");
+ return 1;
+ }
+
+ output_headers = evhttp_request_get_output_headers(req);
+ evhttp_add_header(output_headers, "Host", host);
+ evhttp_add_header(output_headers, "Connection", "close");
+
+ if (data_file) {
+ /* NOTE: In production code, you'd probably want to use
+ * evbuffer_add_file() or evbuffer_add_file_segment(), to
+ * avoid needless copying. */
+ FILE * f = fopen(data_file, "rb");
+ char buf[1024];
+ size_t s;
+ size_t bytes = 0;
+
+ if (!f) {
+ syntax();
+ }
+
+ output_buffer = evhttp_request_get_output_buffer(req);
+ while ((s = fread(buf, 1, sizeof(buf), f)) > 0) {
+ evbuffer_add(output_buffer, buf, s);
+ bytes += s;
+ }
+ evutil_snprintf(buf, sizeof(buf)-1, "%lu", bytes);
+ evhttp_add_header(output_headers, "Content-Length", buf);
+ fclose(f);
+ }
+
+ r = evhttp_make_request(evcon, req, data_file ? EVHTTP_REQ_POST : EVHTTP_REQ_GET, uri);
+ if (r != 0) {
+ fprintf(stderr, "evhttp_make_request() failed\n");
+ return 1;
+ }
+
+ event_base_dispatch(base);
+
+ evhttp_connection_free(evcon);
+ event_base_free(base);
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+ return 0;
+}
diff --git a/sntp/libevent/sample/include.am b/sntp/libevent/sample/include.am
new file mode 100644
index 000000000000..81980ac51e1d
--- /dev/null
+++ b/sntp/libevent/sample/include.am
@@ -0,0 +1,51 @@
+# sample/include.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+SAMPLES = \
+ sample/dns-example \
+ sample/event-read-fifo \
+ sample/hello-world \
+ sample/http-server \
+ sample/signal-test \
+ sample/time-test
+
+if OPENSSL
+SAMPLES += sample/le-proxy
+sample_le_proxy_SOURCES = sample/le-proxy.c
+sample_le_proxy_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+sample_le_proxy_INCLUDES = $(OPENSSL_INCS)
+
+SAMPLES += sample/https-client
+sample_https_client_SOURCES = \
+ sample/https-client.c \
+ sample/hostcheck.c \
+ sample/openssl_hostname_validation.c
+sample_https_client_LDADD = libevent.la libevent_openssl.la ${OPENSSL_LIBS} ${OPENSSL_LIBADD}
+sample_https_client_INCLUDES = $(OPENSSL_INCS)
+noinst_HEADERS += \
+ sample/hostcheck.h \
+ sample/openssl_hostname_validation.h
+endif
+
+noinst_PROGRAMS += $(SAMPLES)
+
+$(SAMPLES) : libevent.la
+
+sample_event_read_fifo_SOURCES = sample/event-read-fifo.c
+sample_event_read_fifo_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_time_test_SOURCES = sample/time-test.c
+sample_time_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_signal_test_SOURCES = sample/signal-test.c
+sample_signal_test_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_dns_example_SOURCES = sample/dns-example.c
+sample_dns_example_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_hello_world_SOURCES = sample/hello-world.c
+sample_hello_world_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+sample_http_server_SOURCES = sample/http-server.c
+sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+
+
+
diff --git a/sntp/libevent/sample/le-proxy.c b/sntp/libevent/sample/le-proxy.c
new file mode 100644
index 000000000000..30e0a5f6b9c6
--- /dev/null
+++ b/sntp/libevent/sample/le-proxy.c
@@ -0,0 +1,288 @@
+/*
+ This example code shows how to write an (optionally encrypting) SSL proxy
+ with Libevent's bufferevent layer.
+
+ XXX It's a little ugly and should probably be cleaned up.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include <event2/bufferevent_ssl.h>
+#include <event2/bufferevent.h>
+#include <event2/buffer.h>
+#include <event2/listener.h>
+#include <event2/util.h>
+
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+static struct event_base *base;
+static struct sockaddr_storage listen_on_addr;
+static struct sockaddr_storage connect_to_addr;
+static int connect_to_addrlen;
+static int use_wrapper = 1;
+
+static SSL_CTX *ssl_ctx = NULL;
+
+#define MAX_OUTPUT (512*1024)
+
+static void drained_writecb(struct bufferevent *bev, void *ctx);
+static void eventcb(struct bufferevent *bev, short what, void *ctx);
+
+static void
+readcb(struct bufferevent *bev, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+ struct evbuffer *src, *dst;
+ size_t len;
+ src = bufferevent_get_input(bev);
+ len = evbuffer_get_length(src);
+ if (!partner) {
+ evbuffer_drain(src, len);
+ return;
+ }
+ dst = bufferevent_get_output(partner);
+ evbuffer_add_buffer(dst, src);
+
+ if (evbuffer_get_length(dst) >= MAX_OUTPUT) {
+ /* We're giving the other side data faster than it can
+ * pass it on. Stop reading here until we have drained the
+ * other side to MAX_OUTPUT/2 bytes. */
+ bufferevent_setcb(partner, readcb, drained_writecb,
+ eventcb, bev);
+ bufferevent_setwatermark(partner, EV_WRITE, MAX_OUTPUT/2,
+ MAX_OUTPUT);
+ bufferevent_disable(bev, EV_READ);
+ }
+}
+
+static void
+drained_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+
+ /* We were choking the other side until we drained our outbuf a bit.
+ * Now it seems drained. */
+ bufferevent_setcb(bev, readcb, NULL, eventcb, partner);
+ bufferevent_setwatermark(bev, EV_WRITE, 0, 0);
+ if (partner)
+ bufferevent_enable(partner, EV_READ);
+}
+
+static void
+close_on_finished_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *b = bufferevent_get_output(bev);
+
+ if (evbuffer_get_length(b) == 0) {
+ bufferevent_free(bev);
+ }
+}
+
+static void
+eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct bufferevent *partner = ctx;
+
+ if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
+ if (what & BEV_EVENT_ERROR) {
+ unsigned long err;
+ while ((err = (bufferevent_get_openssl_error(bev)))) {
+ const char *msg = (const char*)
+ ERR_reason_error_string(err);
+ const char *lib = (const char*)
+ ERR_lib_error_string(err);
+ const char *func = (const char*)
+ ERR_func_error_string(err);
+ fprintf(stderr,
+ "%s in %s %s\n", msg, lib, func);
+ }
+ if (errno)
+ perror("connection error");
+ }
+
+ if (partner) {
+ /* Flush all pending data */
+ readcb(bev, ctx);
+
+ if (evbuffer_get_length(
+ bufferevent_get_output(partner))) {
+ /* We still have to flush data from the other
+ * side, but when that's done, close the other
+ * side. */
+ bufferevent_setcb(partner,
+ NULL, close_on_finished_writecb,
+ eventcb, NULL);
+ bufferevent_disable(partner, EV_READ);
+ } else {
+ /* We have nothing left to say to the other
+ * side; close it. */
+ bufferevent_free(partner);
+ }
+ }
+ bufferevent_free(bev);
+ }
+}
+
+static void
+syntax(void)
+{
+ fputs("Syntax:\n", stderr);
+ fputs(" le-proxy [-s] [-W] <listen-on-addr> <connect-to-addr>\n", stderr);
+ fputs("Example:\n", stderr);
+ fputs(" le-proxy 127.0.0.1:8888 1.2.3.4:80\n", stderr);
+
+ exit(1);
+}
+
+static void
+accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *a, int slen, void *p)
+{
+ struct bufferevent *b_out, *b_in;
+ /* Create two linked bufferevent objects: one to connect, one for the
+ * new connection */
+ b_in = bufferevent_socket_new(base, fd,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+
+ if (!ssl_ctx || use_wrapper)
+ b_out = bufferevent_socket_new(base, -1,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ else {
+ SSL *ssl = SSL_new(ssl_ctx);
+ b_out = bufferevent_openssl_socket_new(base, -1, ssl,
+ BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ }
+
+ assert(b_in && b_out);
+
+ if (bufferevent_socket_connect(b_out,
+ (struct sockaddr*)&connect_to_addr, connect_to_addrlen)<0) {
+ perror("bufferevent_socket_connect");
+ bufferevent_free(b_out);
+ bufferevent_free(b_in);
+ return;
+ }
+
+ if (ssl_ctx && use_wrapper) {
+ struct bufferevent *b_ssl;
+ SSL *ssl = SSL_new(ssl_ctx);
+ b_ssl = bufferevent_openssl_filter_new(base,
+ b_out, ssl, BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ if (!b_ssl) {
+ perror("Bufferevent_openssl_new");
+ bufferevent_free(b_out);
+ bufferevent_free(b_in);
+ }
+ b_out = b_ssl;
+ }
+
+ bufferevent_setcb(b_in, readcb, NULL, eventcb, b_out);
+ bufferevent_setcb(b_out, readcb, NULL, eventcb, b_in);
+
+ bufferevent_enable(b_in, EV_READ|EV_WRITE);
+ bufferevent_enable(b_out, EV_READ|EV_WRITE);
+}
+
+int
+main(int argc, char **argv)
+{
+ int i;
+ int socklen;
+
+ int use_ssl = 0;
+ struct evconnlistener *listener;
+
+ if (argc < 3)
+ syntax();
+
+ for (i=1; i < argc; ++i) {
+ if (!strcmp(argv[i], "-s")) {
+ use_ssl = 1;
+ } else if (!strcmp(argv[i], "-W")) {
+ use_wrapper = 0;
+ } else if (argv[i][0] == '-') {
+ syntax();
+ } else
+ break;
+ }
+
+ if (i+2 != argc)
+ syntax();
+
+ memset(&listen_on_addr, 0, sizeof(listen_on_addr));
+ socklen = sizeof(listen_on_addr);
+ if (evutil_parse_sockaddr_port(argv[i],
+ (struct sockaddr*)&listen_on_addr, &socklen)<0) {
+ int p = atoi(argv[i]);
+ struct sockaddr_in *sin = (struct sockaddr_in*)&listen_on_addr;
+ if (p < 1 || p > 65535)
+ syntax();
+ sin->sin_port = htons(p);
+ sin->sin_addr.s_addr = htonl(0x7f000001);
+ sin->sin_family = AF_INET;
+ socklen = sizeof(struct sockaddr_in);
+ }
+
+ memset(&connect_to_addr, 0, sizeof(connect_to_addr));
+ connect_to_addrlen = sizeof(connect_to_addr);
+ if (evutil_parse_sockaddr_port(argv[i+1],
+ (struct sockaddr*)&connect_to_addr, &connect_to_addrlen)<0)
+ syntax();
+
+ base = event_base_new();
+ if (!base) {
+ perror("event_base_new()");
+ return 1;
+ }
+
+ if (use_ssl) {
+ int r;
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+ r = RAND_poll();
+ if (r == 0) {
+ fprintf(stderr, "RAND_poll() failed.\n");
+ return 1;
+ }
+ ssl_ctx = SSL_CTX_new(SSLv23_method());
+ }
+
+ listener = evconnlistener_new_bind(base, accept_cb, NULL,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_CLOSE_ON_EXEC|LEV_OPT_REUSEABLE,
+ -1, (struct sockaddr*)&listen_on_addr, socklen);
+
+ if (! listener) {
+ fprintf(stderr, "Couldn't open listener.\n");
+ event_base_free(base);
+ return 1;
+ }
+ event_base_dispatch(base);
+
+ evconnlistener_free(listener);
+ event_base_free(base);
+
+ return 0;
+}
diff --git a/sntp/libevent/sample/openssl_hostname_validation.c b/sntp/libevent/sample/openssl_hostname_validation.c
new file mode 100644
index 000000000000..b5adc67b8aaf
--- /dev/null
+++ b/sntp/libevent/sample/openssl_hostname_validation.c
@@ -0,0 +1,172 @@
+/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
+
+/*
+Copyright (C) 2012, iSEC Partners.
+
+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
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+ */
+
+/*
+ * Helper functions to perform basic hostname validation using OpenSSL.
+ *
+ * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
+ * attempting to use this code. This whitepaper describes how the code works,
+ * how it should be used, and what its limitations are.
+ *
+ * Author: Alban Diquet
+ * License: See LICENSE
+ *
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <openssl/x509v3.h>
+#include <openssl/ssl.h>
+
+#include "openssl_hostname_validation.h"
+#include "hostcheck.h"
+
+#define HOSTNAME_MAX_SIZE 255
+
+/**
+* Tries to find a match for hostname in the certificate's Common Name field.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if the Common Name had a NUL character embedded in it.
+* Returns Error if the Common Name could not be extracted.
+*/
+static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) {
+ int common_name_loc = -1;
+ X509_NAME_ENTRY *common_name_entry = NULL;
+ ASN1_STRING *common_name_asn1 = NULL;
+ char *common_name_str = NULL;
+
+ // Find the position of the CN field in the Subject field of the certificate
+ common_name_loc = X509_NAME_get_index_by_NID(X509_get_subject_name((X509 *) server_cert), NID_commonName, -1);
+ if (common_name_loc < 0) {
+ return Error;
+ }
+
+ // Extract the CN field
+ common_name_entry = X509_NAME_get_entry(X509_get_subject_name((X509 *) server_cert), common_name_loc);
+ if (common_name_entry == NULL) {
+ return Error;
+ }
+
+ // Convert the CN field to a C string
+ common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
+ if (common_name_asn1 == NULL) {
+ return Error;
+ }
+ common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
+
+ // Make sure there isn't an embedded NUL character in the CN
+ if ((size_t)ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
+ return MalformedCertificate;
+ }
+
+ // Compare expected hostname with the CN
+ if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
+ return MatchFound;
+ }
+ else {
+ return MatchNotFound;
+ }
+}
+
+
+/**
+* Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns NoSANPresent if the SAN extension was not present in the certificate.
+*/
+static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *server_cert) {
+ HostnameValidationResult result = MatchNotFound;
+ int i;
+ int san_names_nb = -1;
+ STACK_OF(GENERAL_NAME) *san_names = NULL;
+
+ // Try to extract the names within the SAN extension from the certificate
+ san_names = X509_get_ext_d2i((X509 *) server_cert, NID_subject_alt_name, NULL, NULL);
+ if (san_names == NULL) {
+ return NoSANPresent;
+ }
+ san_names_nb = sk_GENERAL_NAME_num(san_names);
+
+ // Check each name within the extension
+ for (i=0; i<san_names_nb; i++) {
+ const GENERAL_NAME *current_name = sk_GENERAL_NAME_value(san_names, i);
+
+ if (current_name->type == GEN_DNS) {
+ // Current name is a DNS name, let's check it
+ char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
+
+ // Make sure there isn't an embedded NUL character in the DNS name
+ if ((size_t)ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name)) {
+ result = MalformedCertificate;
+ break;
+ }
+ else { // Compare expected hostname with the DNS name
+ if (Curl_cert_hostcheck(dns_name, hostname)
+ == CURL_HOST_MATCH) {
+ result = MatchFound;
+ break;
+ }
+ }
+ }
+ }
+ sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+
+ return result;
+}
+
+
+/**
+* Validates the server's identity by looking for the expected hostname in the
+* server's certificate. As described in RFC 6125, it first tries to find a match
+* in the Subject Alternative Name extension. If the extension is not present in
+* the certificate, it checks the Common Name instead.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns Error if there was an error.
+*/
+HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
+ HostnameValidationResult result;
+
+ if((hostname == NULL) || (server_cert == NULL))
+ return Error;
+
+ // First try the Subject Alternative Names extension
+ result = matches_subject_alternative_name(hostname, server_cert);
+ if (result == NoSANPresent) {
+ // Extension was not found: try the Common Name
+ result = matches_common_name(hostname, server_cert);
+ }
+
+ return result;
+}
diff --git a/sntp/libevent/sample/openssl_hostname_validation.h b/sntp/libevent/sample/openssl_hostname_validation.h
new file mode 100644
index 000000000000..54aa1c436d74
--- /dev/null
+++ b/sntp/libevent/sample/openssl_hostname_validation.h
@@ -0,0 +1,56 @@
+/* Obtained from: https://github.com/iSECPartners/ssl-conservatory */
+
+/*
+Copyright (C) 2012, iSEC Partners.
+
+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
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+ */
+
+/*
+ * Helper functions to perform basic hostname validation using OpenSSL.
+ *
+ * Please read "everything-you-wanted-to-know-about-openssl.pdf" before
+ * attempting to use this code. This whitepaper describes how the code works,
+ * how it should be used, and what its limitations are.
+ *
+ * Author: Alban Diquet
+ * License: See LICENSE
+ *
+ */
+
+typedef enum {
+ MatchFound,
+ MatchNotFound,
+ NoSANPresent,
+ MalformedCertificate,
+ Error
+} HostnameValidationResult;
+
+/**
+* Validates the server's identity by looking for the expected hostname in the
+* server's certificate. As described in RFC 6125, it first tries to find a match
+* in the Subject Alternative Name extension. If the extension is not present in
+* the certificate, it checks the Common Name instead.
+*
+* Returns MatchFound if a match was found.
+* Returns MatchNotFound if no matches were found.
+* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
+* Returns Error if there was an error.
+*/
+HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert);
diff --git a/sntp/libevent/sample/signal-test.c b/sntp/libevent/sample/signal-test.c
new file mode 100644
index 000000000000..a61642f325e3
--- /dev/null
+++ b/sntp/libevent/sample/signal-test.c
@@ -0,0 +1,75 @@
+/*
+ * Compile with:
+ * cc -I/usr/local/include -o signal-test \
+ * signal-test.c -L/usr/local/lib -levent
+ */
+
+#include <sys/types.h>
+
+#include <event2/event-config.h>
+
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#include <sys/time.h>
+#else
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#include <signal.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+int called = 0;
+
+static void
+signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *signal = arg;
+
+ printf("%s: got signal %d\n", __func__, event_get_signal(signal));
+
+ if (called >= 2)
+ event_del(signal);
+
+ called++;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event *signal_int;
+ struct event_base* base;
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ /* Initalize the event library */
+ base = event_base_new();
+
+ /* Initalize one event */
+ signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg());
+
+ event_add(signal_int, NULL);
+
+ event_base_dispatch(base);
+ event_base_free(base);
+
+ return (0);
+}
+
diff --git a/sntp/libevent/sample/time-test.c b/sntp/libevent/sample/time-test.c
new file mode 100644
index 000000000000..c94c18a5004e
--- /dev/null
+++ b/sntp/libevent/sample/time-test.c
@@ -0,0 +1,107 @@
+/*
+ * XXX This sample code was once meant to show how to use the basic Libevent
+ * interfaces, but it never worked on non-Unix platforms, and some of the
+ * interfaces have changed since it was first written. It should probably
+ * be removed or replaced with something better.
+ *
+ * Compile with:
+ * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent
+ */
+
+#include <sys/types.h>
+
+#include <event2/event-config.h>
+
+#include <sys/stat.h>
+#ifndef _WIN32
+#include <sys/queue.h>
+#include <unistd.h>
+#endif
+#include <time.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event2/event.h>
+#include <event2/event_struct.h>
+#include <event2/util.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+struct timeval lasttime;
+
+int event_is_persistent;
+
+static void
+timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval newtime, difference;
+ struct event *timeout = arg;
+ double elapsed;
+
+ evutil_gettimeofday(&newtime, NULL);
+ evutil_timersub(&newtime, &lasttime, &difference);
+ elapsed = difference.tv_sec +
+ (difference.tv_usec / 1.0e6);
+
+ printf("timeout_cb called at %d: %.3f seconds elapsed.\n",
+ (int)newtime.tv_sec, elapsed);
+ lasttime = newtime;
+
+ if (! event_is_persistent) {
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 2;
+ event_add(timeout, &tv);
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event timeout;
+ struct timeval tv;
+ struct event_base *base;
+ int flags;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void)WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ if (argc == 2 && !strcmp(argv[1], "-p")) {
+ event_is_persistent = 1;
+ flags = EV_PERSIST;
+ } else {
+ event_is_persistent = 0;
+ flags = 0;
+ }
+
+ /* Initalize the event library */
+ base = event_base_new();
+
+ /* Initalize one event */
+ event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout);
+
+ evutil_timerclear(&tv);
+ tv.tv_sec = 2;
+ event_add(&timeout, &tv);
+
+ evutil_gettimeofday(&lasttime, NULL);
+
+ event_base_dispatch(base);
+
+ return (0);
+}
+
diff --git a/sntp/libevent/select.c b/sntp/libevent/select.c
new file mode 100644
index 000000000000..8ae53cc11ec5
--- /dev/null
+++ b/sntp/libevent/select.c
@@ -0,0 +1,346 @@
+/* $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
+
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_SELECT
+
+#ifdef __APPLE__
+/* Apple wants us to define this if we might ever pass more than
+ * FD_SETSIZE bits to select(). */
+#define _DARWIN_UNLIMITED_SELECT
+#endif
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#include <sys/queue.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "event-internal.h"
+#include "evsignal-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+
+#ifndef EVENT__HAVE_FD_MASK
+/* This type is mandatory, but Android doesn't define it. */
+typedef unsigned long fd_mask;
+#endif
+
+#ifndef NFDBITS
+#define NFDBITS (sizeof(fd_mask)*8)
+#endif
+
+/* Divide positive x by y, rounding up. */
+#define DIV_ROUNDUP(x, y) (((x)+((y)-1))/(y))
+
+/* How many bytes to allocate for N fds? */
+#define SELECT_ALLOC_SIZE(n) \
+ (DIV_ROUNDUP(n, NFDBITS) * sizeof(fd_mask))
+
+struct selectop {
+ int event_fds; /* Highest fd in fd set */
+ int event_fdsz;
+ int resize_out_sets;
+ fd_set *event_readset_in;
+ fd_set *event_writeset_in;
+ fd_set *event_readset_out;
+ fd_set *event_writeset_out;
+};
+
+static void *select_init(struct event_base *);
+static int select_add(struct event_base *, int, short old, short events, void*);
+static int select_del(struct event_base *, int, short old, short events, void*);
+static int select_dispatch(struct event_base *, struct timeval *);
+static void select_dealloc(struct event_base *);
+
+const struct eventop selectops = {
+ "select",
+ select_init,
+ select_add,
+ select_del,
+ select_dispatch,
+ select_dealloc,
+ 0, /* doesn't need reinit. */
+ EV_FEATURE_FDS,
+ 0,
+};
+
+static int select_resize(struct selectop *sop, int fdsz);
+static void select_free_selectop(struct selectop *sop);
+
+static void *
+select_init(struct event_base *base)
+{
+ struct selectop *sop;
+
+ if (!(sop = mm_calloc(1, sizeof(struct selectop))))
+ return (NULL);
+
+ if (select_resize(sop, SELECT_ALLOC_SIZE(32 + 1))) {
+ select_free_selectop(sop);
+ return (NULL);
+ }
+
+ evsig_init_(base);
+
+ evutil_weakrand_seed_(&base->weakrand_seed, 0);
+
+ return (sop);
+}
+
+#ifdef CHECK_INVARIANTS
+static void
+check_selectop(struct selectop *sop)
+{
+ /* nothing to be done here */
+}
+#else
+#define check_selectop(sop) do { (void) sop; } while (0)
+#endif
+
+static int
+select_dispatch(struct event_base *base, struct timeval *tv)
+{
+ int res=0, i, j, nfds;
+ struct selectop *sop = base->evbase;
+
+ check_selectop(sop);
+ if (sop->resize_out_sets) {
+ fd_set *readset_out=NULL, *writeset_out=NULL;
+ size_t sz = sop->event_fdsz;
+ if (!(readset_out = mm_realloc(sop->event_readset_out, sz)))
+ return (-1);
+ sop->event_readset_out = readset_out;
+ if (!(writeset_out = mm_realloc(sop->event_writeset_out, sz))) {
+ /* We don't free readset_out here, since it was
+ * already successfully reallocated. The next time
+ * we call select_dispatch, the realloc will be a
+ * no-op. */
+ return (-1);
+ }
+ sop->event_writeset_out = writeset_out;
+ sop->resize_out_sets = 0;
+ }
+
+ memcpy(sop->event_readset_out, sop->event_readset_in,
+ sop->event_fdsz);
+ memcpy(sop->event_writeset_out, sop->event_writeset_in,
+ sop->event_fdsz);
+
+ nfds = sop->event_fds+1;
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = select(nfds, sop->event_readset_out,
+ sop->event_writeset_out, NULL, tv);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ check_selectop(sop);
+
+ if (res == -1) {
+ if (errno != EINTR) {
+ event_warn("select");
+ return (-1);
+ }
+
+ return (0);
+ }
+
+ event_debug(("%s: select reports %d", __func__, res));
+
+ check_selectop(sop);
+ i = evutil_weakrand_range_(&base->weakrand_seed, nfds);
+ for (j = 0; j < nfds; ++j) {
+ if (++i >= nfds)
+ i = 0;
+ res = 0;
+ if (FD_ISSET(i, sop->event_readset_out))
+ res |= EV_READ;
+ if (FD_ISSET(i, sop->event_writeset_out))
+ res |= EV_WRITE;
+
+ if (res == 0)
+ continue;
+
+ evmap_io_active_(base, i, res);
+ }
+ check_selectop(sop);
+
+ return (0);
+}
+
+static int
+select_resize(struct selectop *sop, int fdsz)
+{
+ fd_set *readset_in = NULL;
+ fd_set *writeset_in = NULL;
+
+ if (sop->event_readset_in)
+ check_selectop(sop);
+
+ if ((readset_in = mm_realloc(sop->event_readset_in, fdsz)) == NULL)
+ goto error;
+ sop->event_readset_in = readset_in;
+ if ((writeset_in = mm_realloc(sop->event_writeset_in, fdsz)) == NULL) {
+ /* Note that this will leave event_readset_in expanded.
+ * That's okay; we wouldn't want to free it, since that would
+ * change the semantics of select_resize from "expand the
+ * readset_in and writeset_in, or return -1" to "expand the
+ * *set_in members, or trash them and return -1."
+ */
+ goto error;
+ }
+ sop->event_writeset_in = writeset_in;
+ sop->resize_out_sets = 1;
+
+ memset((char *)sop->event_readset_in + sop->event_fdsz, 0,
+ fdsz - sop->event_fdsz);
+ memset((char *)sop->event_writeset_in + sop->event_fdsz, 0,
+ fdsz - sop->event_fdsz);
+
+ sop->event_fdsz = fdsz;
+ check_selectop(sop);
+
+ return (0);
+
+ error:
+ event_warn("malloc");
+ return (-1);
+}
+
+
+static int
+select_add(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct selectop *sop = base->evbase;
+ (void) p;
+
+ EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
+ check_selectop(sop);
+ /*
+ * Keep track of the highest fd, so that we can calculate the size
+ * of the fd_sets for select(2)
+ */
+ if (sop->event_fds < fd) {
+ int fdsz = sop->event_fdsz;
+
+ if (fdsz < (int)sizeof(fd_mask))
+ fdsz = (int)sizeof(fd_mask);
+
+ /* In theory we should worry about overflow here. In
+ * reality, though, the highest fd on a unixy system will
+ * not overflow here. XXXX */
+ while (fdsz < (int) SELECT_ALLOC_SIZE(fd + 1))
+ fdsz *= 2;
+
+ if (fdsz != sop->event_fdsz) {
+ if (select_resize(sop, fdsz)) {
+ check_selectop(sop);
+ return (-1);
+ }
+ }
+
+ sop->event_fds = fd;
+ }
+
+ if (events & EV_READ)
+ FD_SET(fd, sop->event_readset_in);
+ if (events & EV_WRITE)
+ FD_SET(fd, sop->event_writeset_in);
+ check_selectop(sop);
+
+ return (0);
+}
+
+/*
+ * Nothing to be done here.
+ */
+
+static int
+select_del(struct event_base *base, int fd, short old, short events, void *p)
+{
+ struct selectop *sop = base->evbase;
+ (void)p;
+
+ EVUTIL_ASSERT((events & EV_SIGNAL) == 0);
+ check_selectop(sop);
+
+ if (sop->event_fds < fd) {
+ check_selectop(sop);
+ return (0);
+ }
+
+ if (events & EV_READ)
+ FD_CLR(fd, sop->event_readset_in);
+
+ if (events & EV_WRITE)
+ FD_CLR(fd, sop->event_writeset_in);
+
+ check_selectop(sop);
+ return (0);
+}
+
+static void
+select_free_selectop(struct selectop *sop)
+{
+ if (sop->event_readset_in)
+ mm_free(sop->event_readset_in);
+ if (sop->event_writeset_in)
+ mm_free(sop->event_writeset_in);
+ if (sop->event_readset_out)
+ mm_free(sop->event_readset_out);
+ if (sop->event_writeset_out)
+ mm_free(sop->event_writeset_out);
+
+ memset(sop, 0, sizeof(struct selectop));
+ mm_free(sop);
+}
+
+static void
+select_dealloc(struct event_base *base)
+{
+ evsig_dealloc_(base);
+
+ select_free_selectop(base->evbase);
+}
+
+#endif /* EVENT__HAVE_SELECT */
diff --git a/sntp/libevent/signal.c b/sntp/libevent/signal.c
new file mode 100644
index 000000000000..3f46295024e5
--- /dev/null
+++ b/sntp/libevent/signal.c
@@ -0,0 +1,479 @@
+/* $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
+
+/*
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <winsock2.h>
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#ifdef EVENT__HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event-internal.h"
+#include "event2/util.h"
+#include "evsignal-internal.h"
+#include "log-internal.h"
+#include "evmap-internal.h"
+#include "evthread-internal.h"
+
+/*
+ signal.c
+
+ This is the signal-handling implementation we use for backends that don't
+ have a better way to do signal handling. It uses sigaction() or signal()
+ to set a signal handler, and a socket pair to tell the event base when
+
+ Note that I said "the event base" : only one event base can be set up to use
+ this at a time. For historical reasons and backward compatibility, if you
+ add an event for a signal to event_base A, then add an event for a signal
+ (any signal!) to event_base B, event_base B will get informed about the
+ signal, but event_base A won't.
+
+ It would be neat to change this behavior in some future version of Libevent.
+ kqueue already does something far more sensible. We can make all backends
+ on Linux do a reasonable thing using signalfd.
+*/
+
+#ifndef _WIN32
+/* Windows wants us to call our signal handlers as __cdecl. Nobody else
+ * expects you to do anything crazy like this. */
+#define __cdecl
+#endif
+
+static int evsig_add(struct event_base *, evutil_socket_t, short, short, void *);
+static int evsig_del(struct event_base *, evutil_socket_t, short, short, void *);
+
+static const struct eventop evsigops = {
+ "signal",
+ NULL,
+ evsig_add,
+ evsig_del,
+ NULL,
+ NULL,
+ 0, 0, 0
+};
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+/* Lock for evsig_base and evsig_base_n_signals_added fields. */
+static void *evsig_base_lock = NULL;
+#endif
+/* The event base that's currently getting informed about signals. */
+static struct event_base *evsig_base = NULL;
+/* A copy of evsig_base->sigev_n_signals_added. */
+static int evsig_base_n_signals_added = 0;
+static evutil_socket_t evsig_base_fd = -1;
+
+static void __cdecl evsig_handler(int sig);
+
+#define EVSIGBASE_LOCK() EVLOCK_LOCK(evsig_base_lock, 0)
+#define EVSIGBASE_UNLOCK() EVLOCK_UNLOCK(evsig_base_lock, 0)
+
+void
+evsig_set_base_(struct event_base *base)
+{
+ EVSIGBASE_LOCK();
+ evsig_base = base;
+ evsig_base_n_signals_added = base->sig.ev_n_signals_added;
+ evsig_base_fd = base->sig.ev_signal_pair[1];
+ EVSIGBASE_UNLOCK();
+}
+
+/* Callback for when the signal handler write a byte to our signaling socket */
+static void
+evsig_cb(evutil_socket_t fd, short what, void *arg)
+{
+ static char signals[1024];
+ ev_ssize_t n;
+ int i;
+ int ncaught[NSIG];
+ struct event_base *base;
+
+ base = arg;
+
+ memset(&ncaught, 0, sizeof(ncaught));
+
+ while (1) {
+#ifdef _WIN32
+ n = recv(fd, signals, sizeof(signals), 0);
+#else
+ n = read(fd, signals, sizeof(signals));
+#endif
+ if (n == -1) {
+ int err = evutil_socket_geterror(fd);
+ if (! EVUTIL_ERR_RW_RETRIABLE(err))
+ event_sock_err(1, fd, "%s: recv", __func__);
+ break;
+ } else if (n == 0) {
+ /* XXX warn? */
+ break;
+ }
+ for (i = 0; i < n; ++i) {
+ ev_uint8_t sig = signals[i];
+ if (sig < NSIG)
+ ncaught[sig]++;
+ }
+ }
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+ for (i = 0; i < NSIG; ++i) {
+ if (ncaught[i])
+ evmap_signal_active_(base, i, ncaught[i]);
+ }
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+}
+
+int
+evsig_init_(struct event_base *base)
+{
+ /*
+ * Our signal handler is going to write to one end of the socket
+ * pair to wake up our event loop. The event loop then scans for
+ * signals that got delivered.
+ */
+ if (evutil_make_internal_pipe_(base->sig.ev_signal_pair) == -1) {
+#ifdef _WIN32
+ /* Make this nonfatal on win32, where sometimes people
+ have localhost firewalled. */
+ event_sock_warn(-1, "%s: socketpair", __func__);
+#else
+ event_sock_err(1, -1, "%s: socketpair", __func__);
+#endif
+ return -1;
+ }
+
+ if (base->sig.sh_old) {
+ mm_free(base->sig.sh_old);
+ }
+ base->sig.sh_old = NULL;
+ base->sig.sh_old_max = 0;
+
+ event_assign(&base->sig.ev_signal, base, base->sig.ev_signal_pair[0],
+ EV_READ | EV_PERSIST, evsig_cb, base);
+
+ base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL;
+ event_priority_set(&base->sig.ev_signal, 0);
+
+ base->evsigsel = &evsigops;
+
+ return 0;
+}
+
+/* Helper: set the signal handler for evsignal to handler in base, so that
+ * we can restore the original handler when we clear the current one. */
+int
+evsig_set_handler_(struct event_base *base,
+ int evsignal, void (__cdecl *handler)(int))
+{
+#ifdef EVENT__HAVE_SIGACTION
+ struct sigaction sa;
+#else
+ ev_sighandler_t sh;
+#endif
+ struct evsig_info *sig = &base->sig;
+ void *p;
+
+ /*
+ * resize saved signal handler array up to the highest signal number.
+ * a dynamic array is used to keep footprint on the low side.
+ */
+ if (evsignal >= sig->sh_old_max) {
+ int new_max = evsignal + 1;
+ event_debug(("%s: evsignal (%d) >= sh_old_max (%d), resizing",
+ __func__, evsignal, sig->sh_old_max));
+ p = mm_realloc(sig->sh_old, new_max * sizeof(*sig->sh_old));
+ if (p == NULL) {
+ event_warn("realloc");
+ return (-1);
+ }
+
+ memset((char *)p + sig->sh_old_max * sizeof(*sig->sh_old),
+ 0, (new_max - sig->sh_old_max) * sizeof(*sig->sh_old));
+
+ sig->sh_old_max = new_max;
+ sig->sh_old = p;
+ }
+
+ /* allocate space for previous handler out of dynamic array */
+ sig->sh_old[evsignal] = mm_malloc(sizeof *sig->sh_old[evsignal]);
+ if (sig->sh_old[evsignal] == NULL) {
+ event_warn("malloc");
+ return (-1);
+ }
+
+ /* save previous handler and setup new handler */
+#ifdef EVENT__HAVE_SIGACTION
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = handler;
+ sa.sa_flags |= SA_RESTART;
+ sigfillset(&sa.sa_mask);
+
+ if (sigaction(evsignal, &sa, sig->sh_old[evsignal]) == -1) {
+ event_warn("sigaction");
+ mm_free(sig->sh_old[evsignal]);
+ sig->sh_old[evsignal] = NULL;
+ return (-1);
+ }
+#else
+ if ((sh = signal(evsignal, handler)) == SIG_ERR) {
+ event_warn("signal");
+ mm_free(sig->sh_old[evsignal]);
+ sig->sh_old[evsignal] = NULL;
+ return (-1);
+ }
+ *sig->sh_old[evsignal] = sh;
+#endif
+
+ return (0);
+}
+
+static int
+evsig_add(struct event_base *base, evutil_socket_t evsignal, short old, short events, void *p)
+{
+ struct evsig_info *sig = &base->sig;
+ (void)p;
+
+ EVUTIL_ASSERT(evsignal >= 0 && evsignal < NSIG);
+
+ /* catch signals if they happen quickly */
+ EVSIGBASE_LOCK();
+ if (evsig_base != base && evsig_base_n_signals_added) {
+ event_warnx("Added a signal to event base %p with signals "
+ "already added to event_base %p. Only one can have "
+ "signals at a time with the %s backend. The base with "
+ "the most recently added signal or the most recent "
+ "event_base_loop() call gets preference; do "
+ "not rely on this behavior in future Libevent versions.",
+ base, evsig_base, base->evsel->name);
+ }
+ evsig_base = base;
+ evsig_base_n_signals_added = ++sig->ev_n_signals_added;
+ evsig_base_fd = base->sig.ev_signal_pair[1];
+ EVSIGBASE_UNLOCK();
+
+ event_debug(("%s: %d: changing signal handler", __func__, (int)evsignal));
+ if (evsig_set_handler_(base, (int)evsignal, evsig_handler) == -1) {
+ goto err;
+ }
+
+
+ if (!sig->ev_signal_added) {
+ if (event_add_nolock_(&sig->ev_signal, NULL, 0))
+ goto err;
+ sig->ev_signal_added = 1;
+ }
+
+ return (0);
+
+err:
+ EVSIGBASE_LOCK();
+ --evsig_base_n_signals_added;
+ --sig->ev_n_signals_added;
+ EVSIGBASE_UNLOCK();
+ return (-1);
+}
+
+int
+evsig_restore_handler_(struct event_base *base, int evsignal)
+{
+ int ret = 0;
+ struct evsig_info *sig = &base->sig;
+#ifdef EVENT__HAVE_SIGACTION
+ struct sigaction *sh;
+#else
+ ev_sighandler_t *sh;
+#endif
+
+ if (evsignal >= sig->sh_old_max) {
+ /* Can't actually restore. */
+ /* XXXX.*/
+ return 0;
+ }
+
+ /* restore previous handler */
+ sh = sig->sh_old[evsignal];
+ sig->sh_old[evsignal] = NULL;
+#ifdef EVENT__HAVE_SIGACTION
+ if (sigaction(evsignal, sh, NULL) == -1) {
+ event_warn("sigaction");
+ ret = -1;
+ }
+#else
+ if (signal(evsignal, *sh) == SIG_ERR) {
+ event_warn("signal");
+ ret = -1;
+ }
+#endif
+
+ mm_free(sh);
+
+ return ret;
+}
+
+static int
+evsig_del(struct event_base *base, evutil_socket_t evsignal, short old, short events, void *p)
+{
+ EVUTIL_ASSERT(evsignal >= 0 && evsignal < NSIG);
+
+ event_debug(("%s: "EV_SOCK_FMT": restoring signal handler",
+ __func__, EV_SOCK_ARG(evsignal)));
+
+ EVSIGBASE_LOCK();
+ --evsig_base_n_signals_added;
+ --base->sig.ev_n_signals_added;
+ EVSIGBASE_UNLOCK();
+
+ return (evsig_restore_handler_(base, (int)evsignal));
+}
+
+static void __cdecl
+evsig_handler(int sig)
+{
+ int save_errno = errno;
+#ifdef _WIN32
+ int socket_errno = EVUTIL_SOCKET_ERROR();
+#endif
+ ev_uint8_t msg;
+
+ if (evsig_base == NULL) {
+ event_warnx(
+ "%s: received signal %d, but have no base configured",
+ __func__, sig);
+ return;
+ }
+
+#ifndef EVENT__HAVE_SIGACTION
+ signal(sig, evsig_handler);
+#endif
+
+ /* Wake up our notification mechanism */
+ msg = sig;
+#ifdef _WIN32
+ send(evsig_base_fd, (char*)&msg, 1, 0);
+#else
+ {
+ int r = write(evsig_base_fd, (char*)&msg, 1);
+ (void)r; /* Suppress 'unused return value' and 'unused var' */
+ }
+#endif
+ errno = save_errno;
+#ifdef _WIN32
+ EVUTIL_SET_SOCKET_ERROR(socket_errno);
+#endif
+}
+
+void
+evsig_dealloc_(struct event_base *base)
+{
+ int i = 0;
+ if (base->sig.ev_signal_added) {
+ event_del(&base->sig.ev_signal);
+ base->sig.ev_signal_added = 0;
+ }
+ /* debug event is created in evsig_init_/event_assign even when
+ * ev_signal_added == 0, so unassign is required */
+ event_debug_unassign(&base->sig.ev_signal);
+
+ for (i = 0; i < NSIG; ++i) {
+ if (i < base->sig.sh_old_max && base->sig.sh_old[i] != NULL)
+ evsig_restore_handler_(base, i);
+ }
+ EVSIGBASE_LOCK();
+ if (base == evsig_base) {
+ evsig_base = NULL;
+ evsig_base_n_signals_added = 0;
+ evsig_base_fd = -1;
+ }
+ EVSIGBASE_UNLOCK();
+
+ if (base->sig.ev_signal_pair[0] != -1) {
+ evutil_closesocket(base->sig.ev_signal_pair[0]);
+ base->sig.ev_signal_pair[0] = -1;
+ }
+ if (base->sig.ev_signal_pair[1] != -1) {
+ evutil_closesocket(base->sig.ev_signal_pair[1]);
+ base->sig.ev_signal_pair[1] = -1;
+ }
+ base->sig.sh_old_max = 0;
+
+ /* per index frees are handled in evsig_del() */
+ if (base->sig.sh_old) {
+ mm_free(base->sig.sh_old);
+ base->sig.sh_old = NULL;
+ }
+}
+
+static void
+evsig_free_globals_locks(void)
+{
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (evsig_base_lock != NULL) {
+ EVTHREAD_FREE_LOCK(evsig_base_lock, 0);
+ evsig_base_lock = NULL;
+ }
+#endif
+ return;
+}
+
+void
+evsig_free_globals_(void)
+{
+ evsig_free_globals_locks();
+}
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+int
+evsig_global_setup_locks_(const int enable_locks)
+{
+ EVTHREAD_SETUP_GLOBAL_LOCK(evsig_base_lock, 0);
+ return 0;
+}
+
+#endif
diff --git a/sntp/libevent/strlcpy-internal.h b/sntp/libevent/strlcpy-internal.h
new file mode 100644
index 000000000000..cfc27ec66276
--- /dev/null
+++ b/sntp/libevent/strlcpy-internal.h
@@ -0,0 +1,22 @@
+#ifndef STRLCPY_INTERNAL_H_INCLUDED_
+#define STRLCPY_INTERNAL_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifndef EVENT__HAVE_STRLCPY
+#include <string.h>
+size_t event_strlcpy_(char *dst, const char *src, size_t siz);
+#define strlcpy event_strlcpy_
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/sntp/libevent/strlcpy.c b/sntp/libevent/strlcpy.c
new file mode 100644
index 000000000000..3876475f5a6f
--- /dev/null
+++ b/sntp/libevent/strlcpy.c
@@ -0,0 +1,75 @@
+/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ * 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. The name of the author 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 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 AUTHOR 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 *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <sys/types.h>
+
+#ifndef EVENT__HAVE_STRLCPY
+#include "strlcpy-internal.h"
+
+/*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+event_strlcpy_(dst, src, siz)
+ char *dst;
+ const char *src;
+ size_t siz;
+{
+ register char *d = dst;
+ register const char *s = src;
+ register size_t n = siz;
+
+ /* Copy as many bytes as will fit */
+ if (n != 0 && --n != 0) {
+ do {
+ if ((*d++ = *s++) == 0)
+ break;
+ } while (--n != 0);
+ }
+
+ /* Not enough room in dst, add NUL and traverse rest of src */
+ if (n == 0) {
+ if (siz != 0)
+ *d = '\0'; /* NUL-terminate dst */
+ while (*s++)
+ ;
+ }
+
+ return (s - src - 1); /* count does not include NUL */
+}
+#endif
diff --git a/sntp/libevent/test/Makefile.nmake b/sntp/libevent/test/Makefile.nmake
new file mode 100644
index 000000000000..30c3eb792bce
--- /dev/null
+++ b/sntp/libevent/test/Makefile.nmake
@@ -0,0 +1,79 @@
+# WATCH OUT! This makefile is a work in progress. -*- makefile -*-
+
+!IFDEF OPENSSL_DIR
+SSL_CFLAGS=/I$(OPENSSL_DIR)\include /DEVENT__HAVE_OPENSSL
+SSL_OBJS=regress_ssl.obj
+SSL_LIBS=..\libevent_openssl.lib $(OPENSSL_DIR)\lib\libeay32.lib $(OPENSSL_DIR)\lib\ssleay32.lib gdi32.lib User32.lib
+!ELSE
+SSL_CFLAGS=
+SSL_OBJS=
+SSL_LIBS=
+!ENDIF
+
+CFLAGS=/I.. /I../WIN32-Code /I../WIN32-Code/nmake /I../include /I../compat /DHAVE_CONFIG_H /DTINYTEST_LOCAL $(SSL_CFLAGS)
+
+CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
+
+REGRESS_OBJS=regress.obj regress_buffer.obj regress_http.obj regress_dns.obj \
+ regress_testutils.obj \
+ regress_rpc.obj regress.gen.obj \
+ regress_et.obj regress_bufferevent.obj \
+ regress_listener.obj regress_util.obj tinytest.obj \
+ regress_main.obj regress_minheap.obj regress_iocp.obj \
+ regress_thread.obj regress_finalize.obj $(SSL_OBJS)
+
+OTHER_OBJS=test-init.obj test-eof.obj test-closed.obj test-weof.obj test-time.obj \
+ bench.obj bench_cascade.obj bench_http.obj bench_httpclient.obj \
+ test-changelist.obj \
+ print-winsock-errors.obj
+
+PROGRAMS=regress.exe \
+ test-init.exe test-eof.exe test-closed.exe test-weof.exe test-time.exe \
+ test-changelist.exe \
+ print-winsock-errors.exe
+
+# Disabled for now:
+# bench.exe bench_cascade.exe bench_http.exe bench_httpclient.exe
+
+
+LIBS=..\libevent.lib ws2_32.lib shell32.lib advapi32.lib
+
+all: $(PROGRAMS)
+
+regress.exe: $(REGRESS_OBJS)
+ $(CC) $(CFLAGS) $(LIBS) $(SSL_LIBS) $(REGRESS_OBJS)
+
+test-init.exe: test-init.obj
+ $(CC) $(CFLAGS) $(LIBS) test-init.obj
+test-eof.exe: test-eof.obj
+ $(CC) $(CFLAGS) $(LIBS) test-eof.obj
+test-closed.exe: test-closed.obj
+ $(CC) $(CFLAGS) $(LIBS) test-closed.obj
+test-changelist.exe: test-changelist.obj
+ $(CC) $(CFLAGS) $(LIBS) test-changelist.obj
+test-weof.exe: test-weof.obj
+ $(CC) $(CFLAGS) $(LIBS) test-weof.obj
+test-time.exe: test-time.obj
+ $(CC) $(CFLAGS) $(LIBS) test-time.obj
+
+print-winsock-errors.exe: print-winsock-errors.obj
+ $(CC) $(CFLAGS) $(LIBS) print-winsock-errors.obj
+
+bench.exe: bench.obj
+ $(CC) $(CFLAGS) $(LIBS) bench.obj
+bench_cascade.exe: bench_cascade.obj
+ $(CC) $(CFLAGS) $(LIBS) bench_cascade.obj
+bench_http.exe: bench_http.obj
+ $(CC) $(CFLAGS) $(LIBS) bench_http.obj
+bench_httpclient.exe: bench_httpclient.obj
+ $(CC) $(CFLAGS) $(LIBS) bench_httpclient.obj
+
+regress.gen.c regress.gen.h: regress.rpc ../event_rpcgen.py
+ echo // > regress.gen.c
+ echo #define NO_PYTHON_EXISTS > regress.gen.h
+ -python ..\event_rpcgen.py regress.rpc
+
+clean:
+ -del $(REGRESS_OBJS)
+ -del $(OTHER_OBJS)
+ -del $(PROGRAMS)
diff --git a/sntp/libevent/test/bench.c b/sntp/libevent/test/bench.c
new file mode 100644
index 000000000000..922a743add4b
--- /dev/null
+++ b/sntp/libevent/test/bench.c
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ *
+ * Mon 03/10/2003 - Modified by Davide Libenzi <davidel@xmailserver.org>
+ *
+ * Added chain event propagation to improve the sensitivity of
+ * the measure respect to the event loop efficency.
+ *
+ *
+ */
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#else
+#include <sys/socket.h>
+#include <signal.h>
+#include <sys/resource.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#ifdef _WIN32
+#include <getopt.h>
+#endif
+
+#include <event.h>
+#include <evutil.h>
+
+static int count, writes, fired, failures;
+static evutil_socket_t *pipes;
+static int num_pipes, num_active, num_writes;
+static struct event *events;
+
+
+static void
+read_cb(evutil_socket_t fd, short which, void *arg)
+{
+ ev_intptr_t idx = (ev_intptr_t) arg, widx = idx + 1;
+ u_char ch;
+ ev_ssize_t n;
+
+ n = recv(fd, (char*)&ch, sizeof(ch), 0);
+ if (n >= 0)
+ count += n;
+ else
+ failures++;
+ if (writes) {
+ if (widx >= num_pipes)
+ widx -= num_pipes;
+ n = send(pipes[2 * widx + 1], "e", 1, 0);
+ if (n != 1)
+ failures++;
+ writes--;
+ fired++;
+ }
+}
+
+static struct timeval *
+run_once(void)
+{
+ evutil_socket_t *cp, space;
+ long i;
+ static struct timeval ts, te;
+
+ for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
+ if (event_initialized(&events[i]))
+ event_del(&events[i]);
+ event_set(&events[i], cp[0], EV_READ | EV_PERSIST, read_cb, (void *)(ev_intptr_t) i);
+ event_add(&events[i], NULL);
+ }
+
+ event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
+
+ fired = 0;
+ space = num_pipes / num_active;
+ space = space * 2;
+ for (i = 0; i < num_active; i++, fired++)
+ (void) send(pipes[i * space + 1], "e", 1, 0);
+
+ count = 0;
+ writes = num_writes;
+ { int xcount = 0;
+ evutil_gettimeofday(&ts, NULL);
+ do {
+ event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK);
+ xcount++;
+ } while (count != fired);
+ evutil_gettimeofday(&te, NULL);
+
+ if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count);
+ }
+
+ evutil_timersub(&te, &ts, &te);
+
+ return (&te);
+}
+
+int
+main(int argc, char **argv)
+{
+#ifdef HAVE_SETRLIMIT
+ struct rlimit rl;
+#endif
+ int i, c;
+ struct timeval *tv;
+ evutil_socket_t *cp;
+
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#endif
+ num_pipes = 100;
+ num_active = 1;
+ num_writes = num_pipes;
+ while ((c = getopt(argc, argv, "n:a:w:")) != -1) {
+ switch (c) {
+ case 'n':
+ num_pipes = atoi(optarg);
+ break;
+ case 'a':
+ num_active = atoi(optarg);
+ break;
+ case 'w':
+ num_writes = atoi(optarg);
+ break;
+ default:
+ fprintf(stderr, "Illegal argument \"%c\"\n", c);
+ exit(1);
+ }
+ }
+
+#ifdef HAVE_SETRLIMIT
+ rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
+ if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
+ perror("setrlimit");
+ exit(1);
+ }
+#endif
+
+ events = calloc(num_pipes, sizeof(struct event));
+ pipes = calloc(num_pipes * 2, sizeof(evutil_socket_t));
+ if (events == NULL || pipes == NULL) {
+ perror("malloc");
+ exit(1);
+ }
+
+ event_init();
+
+ for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
+#ifdef USE_PIPES
+ if (pipe(cp) == -1) {
+#else
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, cp) == -1) {
+#endif
+ perror("pipe");
+ exit(1);
+ }
+ }
+
+ for (i = 0; i < 25; i++) {
+ tv = run_once();
+ if (tv == NULL)
+ exit(1);
+ fprintf(stdout, "%ld\n",
+ tv->tv_sec * 1000000L + tv->tv_usec);
+ }
+
+ exit(0);
+}
diff --git a/sntp/libevent/test/bench_cascade.c b/sntp/libevent/test/bench_cascade.c
new file mode 100644
index 000000000000..2d85cc1f1038
--- /dev/null
+++ b/sntp/libevent/test/bench_cascade.c
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ */
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#else
+#include <sys/socket.h>
+#include <sys/resource.h>
+#endif
+#include <signal.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <getopt.h>
+#include <event.h>
+#include <evutil.h>
+
+/*
+ * This benchmark tests how quickly we can propagate a write down a chain
+ * of socket pairs. We start by writing to the first socket pair and all
+ * events will fire subsequently until the last socket pair has been reached
+ * and the benchmark terminates.
+ */
+
+static int fired;
+static evutil_socket_t *pipes;
+static struct event *events;
+
+static void
+read_cb(evutil_socket_t fd, short which, void *arg)
+{
+ char ch;
+ evutil_socket_t sock = (evutil_socket_t)(ev_intptr_t)arg;
+
+ (void) recv(fd, &ch, sizeof(ch), 0);
+ if (sock >= 0) {
+ if (send(sock, "e", 1, 0) < 0)
+ perror("send");
+ }
+ fired++;
+}
+
+static struct timeval *
+run_once(int num_pipes)
+{
+ int i;
+ evutil_socket_t *cp;
+ static struct timeval ts, te, tv_timeout;
+
+ events = (struct event *)calloc(num_pipes, sizeof(struct event));
+ pipes = (evutil_socket_t *)calloc(num_pipes * 2, sizeof(evutil_socket_t));
+
+ if (events == NULL || pipes == NULL) {
+ perror("malloc");
+ exit(1);
+ }
+
+ for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, cp) == -1) {
+ perror("socketpair");
+ exit(1);
+ }
+ }
+
+ /* measurements includes event setup */
+ evutil_gettimeofday(&ts, NULL);
+
+ /* provide a default timeout for events */
+ evutil_timerclear(&tv_timeout);
+ tv_timeout.tv_sec = 60;
+
+ for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
+ evutil_socket_t fd = i < num_pipes - 1 ? cp[3] : -1;
+ event_set(&events[i], cp[0], EV_READ, read_cb,
+ (void *)(ev_intptr_t)fd);
+ event_add(&events[i], &tv_timeout);
+ }
+
+ fired = 0;
+
+ /* kick everything off with a single write */
+ if (send(pipes[1], "e", 1, 0) < 0)
+ perror("send");
+
+ event_dispatch();
+
+ evutil_gettimeofday(&te, NULL);
+ evutil_timersub(&te, &ts, &te);
+
+ for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
+ event_del(&events[i]);
+ evutil_closesocket(cp[0]);
+ evutil_closesocket(cp[1]);
+ }
+
+ free(pipes);
+ free(events);
+
+ return (&te);
+}
+
+int
+main(int argc, char **argv)
+{
+#ifdef HAVE_SETRLIMIT
+ struct rlimit rl;
+#endif
+ int i, c;
+ struct timeval *tv;
+
+ int num_pipes = 100;
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#endif
+
+ while ((c = getopt(argc, argv, "n:")) != -1) {
+ switch (c) {
+ case 'n':
+ num_pipes = atoi(optarg);
+ break;
+ default:
+ fprintf(stderr, "Illegal argument \"%c\"\n", c);
+ exit(1);
+ }
+ }
+
+#ifdef HAVE_SETRLIMIT
+ rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50;
+ if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
+ perror("setrlimit");
+ exit(1);
+ }
+#endif
+
+ event_init();
+
+ for (i = 0; i < 25; i++) {
+ tv = run_once(num_pipes);
+ if (tv == NULL)
+ exit(1);
+ fprintf(stdout, "%ld\n",
+ tv->tv_sec * 1000000L + tv->tv_usec);
+ }
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+ exit(0);
+}
diff --git a/sntp/libevent/test/bench_http.c b/sntp/libevent/test/bench_http.c
new file mode 100644
index 000000000000..6d0d971799b5
--- /dev/null
+++ b/sntp/libevent/test/bench_http.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2008-2012 Niels Provos and Nick Mathewson
+ *
+ * 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.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#else
+#include <sys/socket.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/buffer.h"
+#include "event2/util.h"
+#include "event2/http.h"
+#include "event2/thread.h"
+
+static void http_basic_cb(struct evhttp_request *req, void *arg);
+
+static char *content;
+static size_t content_len = 0;
+
+static void
+http_basic_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+
+ evbuffer_add(evb, content, content_len);
+
+ /* allow sending of an empty reply */
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+
+ evbuffer_free(evb);
+}
+
+#if LIBEVENT_VERSION_NUMBER >= 0x02000200
+static void
+http_ref_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+
+ evbuffer_add_reference(evb, content, content_len, NULL, NULL);
+
+ /* allow sending of an empty reply */
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+
+ evbuffer_free(evb);
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ struct event_config *cfg = event_config_new();
+ struct event_base *base;
+ struct evhttp *http;
+ int i;
+ int c;
+ int use_iocp = 0;
+ unsigned short port = 8080;
+ char *endptr = NULL;
+
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#else
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return (1);
+#endif
+
+ for (i = 1; i < argc; ++i) {
+ if (*argv[i] != '-')
+ continue;
+
+ c = argv[i][1];
+
+ if ((c == 'p' || c == 'l') && i + 1 >= argc) {
+ fprintf(stderr, "-%c requires argument.\n", c);
+ exit(1);
+ }
+
+ switch (c) {
+ case 'p':
+ if (i+1 >= argc || !argv[i+1]) {
+ fprintf(stderr, "Missing port\n");
+ exit(1);
+ }
+ port = (int)strtol(argv[i+1], &endptr, 10);
+ if (*endptr != '\0') {
+ fprintf(stderr, "Bad port\n");
+ exit(1);
+ }
+ break;
+ case 'l':
+ if (i+1 >= argc || !argv[i+1]) {
+ fprintf(stderr, "Missing content length\n");
+ exit(1);
+ }
+ content_len = (size_t)strtol(argv[i+1], &endptr, 10);
+ if (*endptr != '\0' || content_len == 0) {
+ fprintf(stderr, "Bad content length\n");
+ exit(1);
+ }
+ break;
+#ifdef _WIN32
+ case 'i':
+ use_iocp = 1;
+ evthread_use_windows_threads();
+ event_config_set_flag(cfg,EVENT_BASE_FLAG_STARTUP_IOCP);
+ break;
+#endif
+ default:
+ fprintf(stderr, "Illegal argument \"%c\"\n", c);
+ exit(1);
+ }
+ }
+
+ base = event_base_new_with_config(cfg);
+ if (!base) {
+ fprintf(stderr, "creating event_base failed. Exiting.\n");
+ return 1;
+ }
+
+ http = evhttp_new(base);
+
+ content = malloc(content_len);
+ if (content == NULL) {
+ fprintf(stderr, "Cannot allocate content\n");
+ exit(1);
+ } else {
+ int i = 0;
+ for (i = 0; i < (int)content_len; ++i)
+ content[i] = (i & 255);
+ }
+
+ evhttp_set_cb(http, "/ind", http_basic_cb, NULL);
+ fprintf(stderr, "/ind - basic content (memory copy)\n");
+
+ evhttp_set_cb(http, "/ref", http_ref_cb, NULL);
+ fprintf(stderr, "/ref - basic content (reference)\n");
+
+ fprintf(stderr, "Serving %d bytes on port %d using %s\n",
+ (int)content_len, port,
+ use_iocp? "IOCP" : event_base_get_method(base));
+
+ evhttp_bind_socket(http, "0.0.0.0", port);
+
+#ifdef _WIN32
+ if (use_iocp) {
+ struct timeval tv={99999999,0};
+ event_base_loopexit(base, &tv);
+ }
+#endif
+ event_base_dispatch(base);
+
+#ifdef _WIN32
+ WSACleanup();
+#endif
+
+ /* NOTREACHED */
+ return (0);
+}
diff --git a/sntp/libevent/test/bench_httpclient.c b/sntp/libevent/test/bench_httpclient.c
new file mode 100644
index 000000000000..22f174da5b66
--- /dev/null
+++ b/sntp/libevent/test/bench_httpclient.c
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ */
+
+/* for EVUTIL_ERR_CONNECT_RETRIABLE macro */
+#include "util-internal.h"
+
+#include <sys/types.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/util.h"
+
+const char *resource = NULL;
+struct event_base *base = NULL;
+
+int total_n_handled = 0;
+int total_n_errors = 0;
+int total_n_launched = 0;
+size_t total_n_bytes = 0;
+struct timeval total_time = {0,0};
+int n_errors = 0;
+
+const int PARALLELISM = 200;
+const int N_REQUESTS = 20000;
+
+struct request_info {
+ size_t n_read;
+ struct timeval started;
+};
+
+static int launch_request(void);
+static void readcb(struct bufferevent *b, void *arg);
+static void errorcb(struct bufferevent *b, short what, void *arg);
+
+static void
+readcb(struct bufferevent *b, void *arg)
+{
+ struct request_info *ri = arg;
+ struct evbuffer *input = bufferevent_get_input(b);
+ size_t n = evbuffer_get_length(input);
+
+ ri->n_read += n;
+ evbuffer_drain(input, n);
+}
+
+static void
+errorcb(struct bufferevent *b, short what, void *arg)
+{
+ struct request_info *ri = arg;
+ struct timeval now, diff;
+ if (what & BEV_EVENT_EOF) {
+ ++total_n_handled;
+ total_n_bytes += ri->n_read;
+ evutil_gettimeofday(&now, NULL);
+ evutil_timersub(&now, &ri->started, &diff);
+ evutil_timeradd(&diff, &total_time, &total_time);
+
+ if (total_n_handled && (total_n_handled%1000)==0)
+ printf("%d requests done\n",total_n_handled);
+
+ if (total_n_launched < N_REQUESTS) {
+ if (launch_request() < 0)
+ perror("Can't launch");
+ }
+ } else {
+ ++total_n_errors;
+ perror("Unexpected error");
+ }
+
+ bufferevent_setcb(b, NULL, NULL, NULL, NULL);
+ free(ri);
+ bufferevent_disable(b, EV_READ|EV_WRITE);
+ bufferevent_free(b);
+}
+
+static void
+frob_socket(evutil_socket_t sock)
+{
+#ifdef HAVE_SO_LINGER
+ struct linger l;
+#endif
+ int one = 1;
+ if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*)&one, sizeof(one))<0)
+ perror("setsockopt(SO_REUSEADDR)");
+#ifdef HAVE_SO_LINGER
+ l.l_onoff = 1;
+ l.l_linger = 0;
+ if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&l, sizeof(l))<0)
+ perror("setsockopt(SO_LINGER)");
+#endif
+}
+
+static int
+launch_request(void)
+{
+ evutil_socket_t sock;
+ struct sockaddr_in sin;
+ struct bufferevent *b;
+
+ struct request_info *ri;
+
+ memset(&sin, 0, sizeof(sin));
+
+ ++total_n_launched;
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+ sin.sin_port = htons(8080);
+ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ return -1;
+ if (evutil_make_socket_nonblocking(sock) < 0) {
+ evutil_closesocket(sock);
+ return -1;
+ }
+ frob_socket(sock);
+ if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
+ int e = errno;
+ if (! EVUTIL_ERR_CONNECT_RETRIABLE(e)) {
+ evutil_closesocket(sock);
+ return -1;
+ }
+ }
+
+ ri = malloc(sizeof(*ri));
+ ri->n_read = 0;
+ evutil_gettimeofday(&ri->started, NULL);
+
+ b = bufferevent_socket_new(base, sock, BEV_OPT_CLOSE_ON_FREE);
+
+ bufferevent_setcb(b, readcb, NULL, errorcb, ri);
+ bufferevent_enable(b, EV_READ|EV_WRITE);
+
+ evbuffer_add_printf(bufferevent_get_output(b),
+ "GET %s HTTP/1.0\r\n\r\n", resource);
+
+ return 0;
+}
+
+
+int
+main(int argc, char **argv)
+{
+ int i;
+ struct timeval start, end, total;
+ long long usec;
+ double throughput;
+ resource = "/ref";
+
+ setvbuf(stdout, NULL, _IONBF, 0);
+
+ base = event_base_new();
+
+ for (i=0; i < PARALLELISM; ++i) {
+ if (launch_request() < 0)
+ perror("launch");
+ }
+
+ evutil_gettimeofday(&start, NULL);
+
+ event_base_dispatch(base);
+
+ evutil_gettimeofday(&end, NULL);
+ evutil_timersub(&end, &start, &total);
+ usec = total_time.tv_sec * (long long)1000000 + total_time.tv_usec;
+
+ if (!total_n_handled) {
+ puts("Nothing worked. You probably did something dumb.");
+ return 0;
+ }
+
+
+ throughput = total_n_handled /
+ (total.tv_sec+ ((double)total.tv_usec)/1000000.0);
+
+#ifdef _WIN32
+#define I64_FMT "%I64d"
+#define I64_TYP __int64
+#else
+#define I64_FMT "%lld"
+#define I64_TYP long long int
+#endif
+
+ printf("\n%d requests in %d.%06d sec. (%.2f throughput)\n"
+ "Each took about %.02f msec latency\n"
+ I64_FMT "bytes read. %d errors.\n",
+ total_n_handled,
+ (int)total.tv_sec, (int)total.tv_usec,
+ throughput,
+ (double)(usec/1000) / total_n_handled,
+ (I64_TYP)total_n_bytes, n_errors);
+
+ return 0;
+}
diff --git a/sntp/libevent/test/check-dumpevents.py b/sntp/libevent/test/check-dumpevents.py
new file mode 100755
index 000000000000..16fe9bc92fdf
--- /dev/null
+++ b/sntp/libevent/test/check-dumpevents.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python2
+#
+# Post-process the output of test-dumpevents and check it for correctness.
+#
+
+import math
+import re
+import sys
+
+text = sys.stdin.readlines()
+
+try:
+ expect_inserted_pos = text.index("Inserted:\n")
+ expect_active_pos = text.index("Active:\n")
+ got_inserted_pos = text.index("Inserted events:\n")
+ got_active_pos = text.index("Active events:\n")
+except ValueError:
+ print >>sys.stderr, "Missing expected dividing line in dumpevents output"
+ sys.exit(1)
+
+if not (expect_inserted_pos < expect_active_pos <
+ got_inserted_pos < got_active_pos):
+ print >>sys.stderr, "Sections out of order in dumpevents output"
+ sys.exit(1)
+
+now,T= text[1].split()
+T = float(T)
+
+want_inserted = set(text[expect_inserted_pos+1:expect_active_pos])
+want_active = set(text[expect_active_pos+1:got_inserted_pos-1])
+got_inserted = set(text[got_inserted_pos+1:got_active_pos])
+got_active = set(text[got_active_pos+1:])
+
+pat = re.compile(r'Timeout=([0-9\.]+)')
+def replace_time(m):
+ t = float(m.group(1))
+ if .9 < abs(t-T) < 1.1:
+ return "Timeout=T+1"
+ elif 2.4 < abs(t-T) < 2.6:
+ return "Timeout=T+2.5"
+ else:
+ return m.group(0)
+
+cleaned_inserted = set( pat.sub(replace_time, s) for s in got_inserted
+ if "Internal" not in s)
+
+if cleaned_inserted != want_inserted:
+ print >>sys.stderr, "Inserted event lists were not as expected!"
+ sys.exit(1)
+
+if set(got_active) != set(want_active):
+ print >>sys.stderr, "Active event lists were not as expected!"
+ sys.exit(1)
+
diff --git a/sntp/libevent/test/include.am b/sntp/libevent/test/include.am
new file mode 100644
index 000000000000..ca36da46e271
--- /dev/null
+++ b/sntp/libevent/test/include.am
@@ -0,0 +1,145 @@
+# test/Makefile.am for libevent
+# Copyright 2000-2007 Niels Provos
+# Copyright 2007-2012 Niels Provos and Nick Mathewson
+#
+# See LICENSE for copying information.
+
+regress_CPPFLAGS = -DTINYTEST_LOCAL
+
+EXTRA_DIST+= \
+ test/check-dumpevents.py \
+ test/regress.gen.c \
+ test/regress.gen.h \
+ test/regress.rpc \
+ test/rpcgen_wrapper.sh \
+ test/test.sh
+
+TESTPROGRAMS = \
+ test/bench \
+ test/bench_cascade \
+ test/bench_http \
+ test/bench_httpclient \
+ test/test-changelist \
+ test/test-dumpevents \
+ test/test-eof \
+ test/test-closed \
+ test/test-fdleak \
+ test/test-init \
+ test/test-ratelim \
+ test/test-time \
+ test/test-weof \
+ test/regress
+
+if BUILD_REGRESS
+noinst_PROGRAMS += $(TESTPROGRAMS)
+EXTRA_PROGRAMS+= test/regress
+endif
+
+noinst_HEADERS+= \
+ test/regress.h \
+ test/regress_thread.h \
+ test/tinytest.h \
+ test/tinytest_local.h \
+ test/tinytest_macros.h
+
+# We need to copy this file, since automake doesn't want us to use top_srcdir
+# in TESTS.
+TESTS = test/test-script.sh
+
+test/test-script.sh: test/test.sh
+ cp $(top_srcdir)/test/test.sh $@
+
+DISTCLEANFILES += test/test-script.sh test/regress.gen.c test/regress.gen.h
+
+if BUILD_REGRESS
+BUILT_SOURCES += test/regress.gen.c test/regress.gen.h
+endif
+
+test_test_init_SOURCES = test/test-init.c
+test_test_init_LDADD = libevent_core.la
+test_test_dumpevents_SOURCES = test/test-dumpevents.c
+test_test_dumpevents_LDADD = libevent_core.la
+test_test_eof_SOURCES = test/test-eof.c
+test_test_eof_LDADD = libevent_core.la
+test_test_closed_SOURCES = test/test-closed.c
+test_test_closed_LDADD = libevent_core.la
+test_test_changelist_SOURCES = test/test-changelist.c
+test_test_changelist_LDADD = libevent_core.la
+test_test_weof_SOURCES = test/test-weof.c
+test_test_weof_LDADD = libevent_core.la
+test_test_time_SOURCES = test/test-time.c
+test_test_time_LDADD = libevent_core.la
+test_test_ratelim_SOURCES = test/test-ratelim.c
+test_test_ratelim_LDADD = libevent_core.la -lm
+test_test_fdleak_SOURCES = test/test-fdleak.c
+test_test_fdleak_LDADD = libevent_core.la
+
+test_regress_SOURCES = \
+ test/regress.c \
+ test/regress.gen.c \
+ test/regress.gen.h \
+ test/regress_buffer.c \
+ test/regress_bufferevent.c \
+ test/regress_dns.c \
+ test/regress_et.c \
+ test/regress_finalize.c \
+ test/regress_http.c \
+ test/regress_listener.c \
+ test/regress_main.c \
+ test/regress_minheap.c \
+ test/regress_rpc.c \
+ test/regress_testutils.c \
+ test/regress_testutils.h \
+ test/regress_util.c \
+ test/tinytest.c \
+ $(regress_thread_SOURCES) \
+ $(regress_zlib_SOURCES)
+
+if PTHREADS
+regress_thread_SOURCES = test/regress_thread.c
+PTHREAD_LIBS += libevent_pthreads.la
+endif
+if BUILD_WIN32
+regress_thread_SOURCES = test/regress_thread.c
+endif
+if ZLIB_REGRESS
+regress_zlib_SOURCES = test/regress_zlib.c
+endif
+if BUILD_WIN32
+test_regress_SOURCES += test/regress_iocp.c
+endif
+
+test_regress_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la $(PTHREAD_LIBS) $(ZLIB_LIBS)
+test_regress_CPPFLAGS = $(AM_CPPFLAGS) $(PTHREAD_CFLAGS) $(ZLIB_CFLAGS) -Itest
+test_regress_LDFLAGS = $(PTHREAD_CFLAGS)
+
+if OPENSSL
+test_regress_SOURCES += test/regress_ssl.c
+test_regress_CPPFLAGS += $(OPENSSL_INCS)
+test_regress_LDADD += libevent_openssl.la $(OPENSSL_LIBS) ${OPENSSL_LIBADD}
+endif
+
+test_bench_SOURCES = test/bench.c
+test_bench_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_cascade_SOURCES = test/bench_cascade.c
+test_bench_cascade_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_http_SOURCES = test/bench_http.c
+test_bench_http_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la
+test_bench_httpclient_SOURCES = test/bench_httpclient.c
+test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
+
+test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
+
+test/rpcgen-attempted: test/regress.rpc event_rpcgen.py test/rpcgen_wrapper.sh
+ $(AM_V_GEN)date -u > $@
+ $(AM_V_at)if $(srcdir)/test/rpcgen_wrapper.sh $(srcdir)/test; then \
+ true; \
+ else \
+ echo "No Python installed; stubbing out RPC test." >&2; \
+ echo " "> test/regress.gen.c; \
+ echo "#define NO_PYTHON_EXISTS" > test/regress.gen.h; \
+ fi
+
+CLEANFILES += test/rpcgen-attempted
+
+$(TESTPROGRAMS) : libevent.la
diff --git a/sntp/libevent/test/regress.c b/sntp/libevent/test/regress.c
new file mode 100644
index 000000000000..4d17b6780b04
--- /dev/null
+++ b/sntp/libevent/test/regress.c
@@ -0,0 +1,3309 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+#include <ctype.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/event_compat.h"
+#include "event2/tag.h"
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/util.h"
+#include "event-internal.h"
+#include "evthread-internal.h"
+#include "log-internal.h"
+#include "time-internal.h"
+
+#include "regress.h"
+
+#ifndef _WIN32
+#include "regress.gen.h"
+#endif
+
+evutil_socket_t pair[2];
+int test_ok;
+int called;
+struct event_base *global_base;
+
+static char wbuf[4096];
+static char rbuf[4096];
+static int woff;
+static int roff;
+static int usepersist;
+static struct timeval tset;
+static struct timeval tcalled;
+
+
+#define TEST1 "this is a test"
+
+#ifndef SHUT_WR
+#define SHUT_WR 1
+#endif
+
+#ifdef _WIN32
+#define write(fd,buf,len) send((fd),(buf),(int)(len),0)
+#define read(fd,buf,len) recv((fd),(buf),(int)(len),0)
+#endif
+
+struct basic_cb_args
+{
+ struct event_base *eb;
+ struct event *ev;
+ unsigned int callcount;
+};
+
+static void
+simple_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[256];
+ int len;
+
+ len = read(fd, buf, sizeof(buf));
+
+ if (len) {
+ if (!called) {
+ if (event_add(arg, NULL) == -1)
+ exit(1);
+ }
+ } else if (called == 1)
+ test_ok = 1;
+
+ called++;
+}
+
+static void
+basic_read_cb(evutil_socket_t fd, short event, void *data)
+{
+ char buf[256];
+ int len;
+ struct basic_cb_args *arg = data;
+
+ len = read(fd, buf, sizeof(buf));
+
+ if (len < 0) {
+ tt_fail_perror("read (callback)");
+ } else {
+ switch (arg->callcount++) {
+ case 0: /* first call: expect to read data; cycle */
+ if (len > 0)
+ return;
+
+ tt_fail_msg("EOF before data read");
+ break;
+
+ case 1: /* second call: expect EOF; stop */
+ if (len > 0)
+ tt_fail_msg("not all data read on first cycle");
+ break;
+
+ default: /* third call: should not happen */
+ tt_fail_msg("too many cycles");
+ }
+ }
+
+ event_del(arg->ev);
+ event_base_loopexit(arg->eb, NULL);
+}
+
+static void
+dummy_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+}
+
+static void
+simple_write_cb(evutil_socket_t fd, short event, void *arg)
+{
+ int len;
+
+ len = write(fd, TEST1, strlen(TEST1) + 1);
+ if (len == -1)
+ test_ok = 0;
+ else
+ test_ok = 1;
+}
+
+static void
+multiple_write_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *ev = arg;
+ int len;
+
+ len = 128;
+ if (woff + len >= (int)sizeof(wbuf))
+ len = sizeof(wbuf) - woff;
+
+ len = write(fd, wbuf + woff, len);
+ if (len == -1) {
+ fprintf(stderr, "%s: write\n", __func__);
+ if (usepersist)
+ event_del(ev);
+ return;
+ }
+
+ woff += len;
+
+ if (woff >= (int)sizeof(wbuf)) {
+ shutdown(fd, SHUT_WR);
+ if (usepersist)
+ event_del(ev);
+ return;
+ }
+
+ if (!usepersist) {
+ if (event_add(ev, NULL) == -1)
+ exit(1);
+ }
+}
+
+static void
+multiple_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *ev = arg;
+ int len;
+
+ len = read(fd, rbuf + roff, sizeof(rbuf) - roff);
+ if (len == -1)
+ fprintf(stderr, "%s: read\n", __func__);
+ if (len <= 0) {
+ if (usepersist)
+ event_del(ev);
+ return;
+ }
+
+ roff += len;
+ if (!usepersist) {
+ if (event_add(ev, NULL) == -1)
+ exit(1);
+ }
+}
+
+static void
+timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ evutil_gettimeofday(&tcalled, NULL);
+}
+
+struct both {
+ struct event ev;
+ int nread;
+};
+
+static void
+combined_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct both *both = arg;
+ char buf[128];
+ int len;
+
+ len = read(fd, buf, sizeof(buf));
+ if (len == -1)
+ fprintf(stderr, "%s: read\n", __func__);
+ if (len <= 0)
+ return;
+
+ both->nread += len;
+ if (event_add(&both->ev, NULL) == -1)
+ exit(1);
+}
+
+static void
+combined_write_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct both *both = arg;
+ char buf[128];
+ int len;
+
+ len = sizeof(buf);
+ if (len > both->nread)
+ len = both->nread;
+
+ memset(buf, 'q', len);
+
+ len = write(fd, buf, len);
+ if (len == -1)
+ fprintf(stderr, "%s: write\n", __func__);
+ if (len <= 0) {
+ shutdown(fd, SHUT_WR);
+ return;
+ }
+
+ both->nread -= len;
+ if (event_add(&both->ev, NULL) == -1)
+ exit(1);
+}
+
+/* These macros used to replicate the work of the legacy test wrapper code */
+#define setup_test(x) do { \
+ if (!in_legacy_test_wrapper) { \
+ TT_FAIL(("Legacy test %s not wrapped properly", x)); \
+ return; \
+ } \
+ } while (0)
+#define cleanup_test() setup_test("cleanup")
+
+static void
+test_simpleread(void)
+{
+ struct event ev;
+
+ /* Very simple read test */
+ setup_test("Simple read: ");
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ shutdown(pair[0], SHUT_WR);
+
+ event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ cleanup_test();
+}
+
+static void
+test_simplewrite(void)
+{
+ struct event ev;
+
+ /* Very simple write test */
+ setup_test("Simple write: ");
+
+ event_set(&ev, pair[0], EV_WRITE, simple_write_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ cleanup_test();
+}
+
+static void
+simpleread_multiple_cb(evutil_socket_t fd, short event, void *arg)
+{
+ if (++called == 2)
+ test_ok = 1;
+}
+
+static void
+test_simpleread_multiple(void)
+{
+ struct event one, two;
+
+ /* Very simple read test */
+ setup_test("Simple read to multiple evens: ");
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ shutdown(pair[0], SHUT_WR);
+
+ event_set(&one, pair[1], EV_READ, simpleread_multiple_cb, NULL);
+ if (event_add(&one, NULL) == -1)
+ exit(1);
+ event_set(&two, pair[1], EV_READ, simpleread_multiple_cb, NULL);
+ if (event_add(&two, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ cleanup_test();
+}
+
+static int have_closed = 0;
+static int premature_event = 0;
+static void
+simpleclose_close_fd_cb(evutil_socket_t s, short what, void *ptr)
+{
+ evutil_socket_t **fds = ptr;
+ TT_BLATHER(("Closing"));
+ evutil_closesocket(*fds[0]);
+ evutil_closesocket(*fds[1]);
+ *fds[0] = -1;
+ *fds[1] = -1;
+ have_closed = 1;
+}
+
+static void
+record_event_cb(evutil_socket_t s, short what, void *ptr)
+{
+ short *whatp = ptr;
+ if (!have_closed)
+ premature_event = 1;
+ *whatp = what;
+ TT_BLATHER(("Recorded %d on socket %d", (int)what, (int)s));
+}
+
+static void
+test_simpleclose(void *ptr)
+{
+ /* Test that a close of FD is detected as a read and as a write. */
+ struct event_base *base = event_base_new();
+ evutil_socket_t pair1[2]={-1,-1}, pair2[2] = {-1, -1};
+ evutil_socket_t *to_close[2];
+ struct event *rev=NULL, *wev=NULL, *closeev=NULL;
+ struct timeval tv;
+ short got_read_on_close = 0, got_write_on_close = 0;
+ char buf[1024];
+ memset(buf, 99, sizeof(buf));
+#ifdef _WIN32
+#define LOCAL_SOCKETPAIR_AF AF_INET
+#else
+#define LOCAL_SOCKETPAIR_AF AF_UNIX
+#endif
+ if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, pair1)<0)
+ TT_DIE(("socketpair: %s", strerror(errno)));
+ if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, pair2)<0)
+ TT_DIE(("socketpair: %s", strerror(errno)));
+ if (evutil_make_socket_nonblocking(pair1[1]) < 0)
+ TT_DIE(("make_socket_nonblocking"));
+ if (evutil_make_socket_nonblocking(pair2[1]) < 0)
+ TT_DIE(("make_socket_nonblocking"));
+
+ /** Stuff pair2[1] full of data, until write fails */
+ while (1) {
+ int r = write(pair2[1], buf, sizeof(buf));
+ if (r<0) {
+ int err = evutil_socket_geterror(pair2[1]);
+ if (! EVUTIL_ERR_RW_RETRIABLE(err))
+ TT_DIE(("write failed strangely: %s",
+ evutil_socket_error_to_string(err)));
+ break;
+ }
+ }
+ to_close[0] = &pair1[0];
+ to_close[1] = &pair2[0];
+
+ closeev = event_new(base, -1, EV_TIMEOUT, simpleclose_close_fd_cb,
+ to_close);
+ rev = event_new(base, pair1[1], EV_READ, record_event_cb,
+ &got_read_on_close);
+ TT_BLATHER(("Waiting for read on %d", (int)pair1[1]));
+ wev = event_new(base, pair2[1], EV_WRITE, record_event_cb,
+ &got_write_on_close);
+ TT_BLATHER(("Waiting for write on %d", (int)pair2[1]));
+ tv.tv_sec = 0;
+ tv.tv_usec = 100*1000; /* Close pair1[0] after a little while, and make
+ * sure we get a read event. */
+ event_add(closeev, &tv);
+ event_add(rev, NULL);
+ event_add(wev, NULL);
+ /* Don't let the test go on too long. */
+ tv.tv_sec = 0;
+ tv.tv_usec = 200*1000;
+ event_base_loopexit(base, &tv);
+ event_base_loop(base, 0);
+
+ tt_int_op(got_read_on_close, ==, EV_READ);
+ tt_int_op(got_write_on_close, ==, EV_WRITE);
+ tt_int_op(premature_event, ==, 0);
+
+end:
+ if (pair1[0] >= 0)
+ evutil_closesocket(pair1[0]);
+ if (pair1[1] >= 0)
+ evutil_closesocket(pair1[1]);
+ if (pair2[0] >= 0)
+ evutil_closesocket(pair2[0]);
+ if (pair2[1] >= 0)
+ evutil_closesocket(pair2[1]);
+ if (rev)
+ event_free(rev);
+ if (wev)
+ event_free(wev);
+ if (closeev)
+ event_free(closeev);
+ if (base)
+ event_base_free(base);
+}
+
+
+static void
+test_multiple(void)
+{
+ struct event ev, ev2;
+ int i;
+
+ /* Multiple read and write test */
+ setup_test("Multiple read/write: ");
+ memset(rbuf, 0, sizeof(rbuf));
+ for (i = 0; i < (int)sizeof(wbuf); i++)
+ wbuf[i] = i;
+
+ roff = woff = 0;
+ usepersist = 0;
+
+ event_set(&ev, pair[0], EV_WRITE, multiple_write_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+ event_set(&ev2, pair[1], EV_READ, multiple_read_cb, &ev2);
+ if (event_add(&ev2, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ if (roff == woff)
+ test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0;
+
+ cleanup_test();
+}
+
+static void
+test_persistent(void)
+{
+ struct event ev, ev2;
+ int i;
+
+ /* Multiple read and write test with persist */
+ setup_test("Persist read/write: ");
+ memset(rbuf, 0, sizeof(rbuf));
+ for (i = 0; i < (int)sizeof(wbuf); i++)
+ wbuf[i] = i;
+
+ roff = woff = 0;
+ usepersist = 1;
+
+ event_set(&ev, pair[0], EV_WRITE|EV_PERSIST, multiple_write_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+ event_set(&ev2, pair[1], EV_READ|EV_PERSIST, multiple_read_cb, &ev2);
+ if (event_add(&ev2, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ if (roff == woff)
+ test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0;
+
+ cleanup_test();
+}
+
+static void
+test_combined(void)
+{
+ struct both r1, r2, w1, w2;
+
+ setup_test("Combined read/write: ");
+ memset(&r1, 0, sizeof(r1));
+ memset(&r2, 0, sizeof(r2));
+ memset(&w1, 0, sizeof(w1));
+ memset(&w2, 0, sizeof(w2));
+
+ w1.nread = 4096;
+ w2.nread = 8192;
+
+ event_set(&r1.ev, pair[0], EV_READ, combined_read_cb, &r1);
+ event_set(&w1.ev, pair[0], EV_WRITE, combined_write_cb, &w1);
+ event_set(&r2.ev, pair[1], EV_READ, combined_read_cb, &r2);
+ event_set(&w2.ev, pair[1], EV_WRITE, combined_write_cb, &w2);
+ tt_assert(event_add(&r1.ev, NULL) != -1);
+ tt_assert(!event_add(&w1.ev, NULL));
+ tt_assert(!event_add(&r2.ev, NULL));
+ tt_assert(!event_add(&w2.ev, NULL));
+ event_dispatch();
+
+ if (r1.nread == 8192 && r2.nread == 4096)
+ test_ok = 1;
+
+end:
+ cleanup_test();
+}
+
+static void
+test_simpletimeout(void)
+{
+ struct timeval tv;
+ struct event ev;
+
+ setup_test("Simple timeout: ");
+
+ tv.tv_usec = 200*1000;
+ tv.tv_sec = 0;
+ evutil_timerclear(&tcalled);
+ evtimer_set(&ev, timeout_cb, NULL);
+ evtimer_add(&ev, &tv);
+
+ evutil_gettimeofday(&tset, NULL);
+ event_dispatch();
+ test_timeval_diff_eq(&tset, &tcalled, 200);
+
+ test_ok = 1;
+end:
+ cleanup_test();
+}
+
+static void
+periodic_timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ int *count = arg;
+
+ (*count)++;
+ if (*count == 6) {
+ /* call loopexit only once - on slow machines(?), it is
+ * apparently possible for this to get called twice. */
+ test_ok = 1;
+ event_base_loopexit(global_base, NULL);
+ }
+}
+
+static void
+test_persistent_timeout(void)
+{
+ struct timeval tv;
+ struct event ev;
+ int count = 0;
+
+ evutil_timerclear(&tv);
+ tv.tv_usec = 10000;
+
+ event_assign(&ev, global_base, -1, EV_TIMEOUT|EV_PERSIST,
+ periodic_timeout_cb, &count);
+ event_add(&ev, &tv);
+
+ event_dispatch();
+
+ event_del(&ev);
+}
+
+static void
+test_persistent_timeout_jump(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event ev;
+ int count = 0;
+ struct timeval msec100 = { 0, 100 * 1000 };
+ struct timeval msec50 = { 0, 50 * 1000 };
+ struct timeval msec300 = { 0, 300 * 1000 };
+
+ event_assign(&ev, data->base, -1, EV_PERSIST, periodic_timeout_cb, &count);
+ event_add(&ev, &msec100);
+ /* Wait for a bit */
+ evutil_usleep_(&msec300);
+ event_base_loopexit(data->base, &msec50);
+ event_base_dispatch(data->base);
+ tt_int_op(count, ==, 1);
+
+end:
+ event_del(&ev);
+}
+
+struct persist_active_timeout_called {
+ int n;
+ short events[16];
+ struct timeval tvs[16];
+};
+
+static void
+activate_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *ev = arg;
+ event_active(ev, EV_READ, 1);
+}
+
+static void
+persist_active_timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct persist_active_timeout_called *c = arg;
+ if (c->n < 15) {
+ c->events[c->n] = event;
+ evutil_gettimeofday(&c->tvs[c->n], NULL);
+ ++c->n;
+ }
+}
+
+static void
+test_persistent_active_timeout(void *ptr)
+{
+ struct timeval tv, tv2, tv_exit, start;
+ struct event ev;
+ struct persist_active_timeout_called res;
+
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+
+ memset(&res, 0, sizeof(res));
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 200 * 1000;
+ event_assign(&ev, base, -1, EV_TIMEOUT|EV_PERSIST,
+ persist_active_timeout_cb, &res);
+ event_add(&ev, &tv);
+
+ tv2.tv_sec = 0;
+ tv2.tv_usec = 100 * 1000;
+ event_base_once(base, -1, EV_TIMEOUT, activate_cb, &ev, &tv2);
+
+ tv_exit.tv_sec = 0;
+ tv_exit.tv_usec = 600 * 1000;
+ event_base_loopexit(base, &tv_exit);
+
+ event_base_assert_ok_(base);
+ evutil_gettimeofday(&start, NULL);
+
+ event_base_dispatch(base);
+ event_base_assert_ok_(base);
+
+ tt_int_op(res.n, ==, 3);
+ tt_int_op(res.events[0], ==, EV_READ);
+ tt_int_op(res.events[1], ==, EV_TIMEOUT);
+ tt_int_op(res.events[2], ==, EV_TIMEOUT);
+ test_timeval_diff_eq(&start, &res.tvs[0], 100);
+ test_timeval_diff_eq(&start, &res.tvs[1], 300);
+ test_timeval_diff_eq(&start, &res.tvs[2], 500);
+end:
+ event_del(&ev);
+}
+
+struct common_timeout_info {
+ struct event ev;
+ struct timeval called_at;
+ int which;
+ int count;
+};
+
+static void
+common_timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct common_timeout_info *ti = arg;
+ ++ti->count;
+ evutil_gettimeofday(&ti->called_at, NULL);
+ if (ti->count >= 4)
+ event_del(&ti->ev);
+}
+
+static void
+test_common_timeout(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+
+ struct event_base *base = data->base;
+ int i;
+ struct common_timeout_info info[100];
+
+ struct timeval start;
+ struct timeval tmp_100_ms = { 0, 100*1000 };
+ struct timeval tmp_200_ms = { 0, 200*1000 };
+ struct timeval tmp_5_sec = { 5, 0 };
+ struct timeval tmp_5M_usec = { 0, 5*1000*1000 };
+
+ const struct timeval *ms_100, *ms_200, *sec_5;
+
+ ms_100 = event_base_init_common_timeout(base, &tmp_100_ms);
+ ms_200 = event_base_init_common_timeout(base, &tmp_200_ms);
+ sec_5 = event_base_init_common_timeout(base, &tmp_5_sec);
+ tt_assert(ms_100);
+ tt_assert(ms_200);
+ tt_assert(sec_5);
+ tt_ptr_op(event_base_init_common_timeout(base, &tmp_200_ms),
+ ==, ms_200);
+ tt_ptr_op(event_base_init_common_timeout(base, ms_200), ==, ms_200);
+ tt_ptr_op(event_base_init_common_timeout(base, &tmp_5M_usec), ==, sec_5);
+ tt_int_op(ms_100->tv_sec, ==, 0);
+ tt_int_op(ms_200->tv_sec, ==, 0);
+ tt_int_op(sec_5->tv_sec, ==, 5);
+ tt_int_op(ms_100->tv_usec, ==, 100000|0x50000000);
+ tt_int_op(ms_200->tv_usec, ==, 200000|0x50100000);
+ tt_int_op(sec_5->tv_usec, ==, 0|0x50200000);
+
+ memset(info, 0, sizeof(info));
+
+ for (i=0; i<100; ++i) {
+ info[i].which = i;
+ event_assign(&info[i].ev, base, -1, EV_TIMEOUT|EV_PERSIST,
+ common_timeout_cb, &info[i]);
+ if (i % 2) {
+ if ((i%20)==1) {
+ /* Glass-box test: Make sure we survive the
+ * transition to non-common timeouts. It's
+ * a little tricky. */
+ event_add(&info[i].ev, ms_200);
+ event_add(&info[i].ev, &tmp_100_ms);
+ } else if ((i%20)==3) {
+ /* Check heap-to-common too. */
+ event_add(&info[i].ev, &tmp_200_ms);
+ event_add(&info[i].ev, ms_100);
+ } else if ((i%20)==5) {
+ /* Also check common-to-common. */
+ event_add(&info[i].ev, ms_200);
+ event_add(&info[i].ev, ms_100);
+ } else {
+ event_add(&info[i].ev, ms_100);
+ }
+ } else {
+ event_add(&info[i].ev, ms_200);
+ }
+ }
+
+ event_base_assert_ok_(base);
+ evutil_gettimeofday(&start, NULL);
+ event_base_dispatch(base);
+
+ event_base_assert_ok_(base);
+
+ for (i=0; i<10; ++i) {
+ tt_int_op(info[i].count, ==, 4);
+ if (i % 2) {
+ test_timeval_diff_eq(&start, &info[i].called_at, 400);
+ } else {
+ test_timeval_diff_eq(&start, &info[i].called_at, 800);
+ }
+ }
+
+ /* Make sure we can free the base with some events in. */
+ for (i=0; i<100; ++i) {
+ if (i % 2) {
+ event_add(&info[i].ev, ms_100);
+ } else {
+ event_add(&info[i].ev, ms_200);
+ }
+ }
+
+end:
+ event_base_free(data->base); /* need to do this here before info is
+ * out-of-scope */
+ data->base = NULL;
+}
+
+#ifndef _WIN32
+static void signal_cb(evutil_socket_t fd, short event, void *arg);
+
+#define current_base event_global_current_base_
+extern struct event_base *current_base;
+
+static void
+child_signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval tv;
+ int *pint = arg;
+
+ *pint = 1;
+
+ tv.tv_usec = 500000;
+ tv.tv_sec = 0;
+ event_loopexit(&tv);
+}
+
+static void
+test_fork(void)
+{
+ int status, got_sigchld = 0;
+ struct event ev, sig_ev;
+ pid_t pid;
+
+ setup_test("After fork: ");
+
+ tt_assert(current_base);
+ evthread_make_base_notifiable(current_base);
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+
+ evsignal_set(&sig_ev, SIGCHLD, child_signal_cb, &got_sigchld);
+ evsignal_add(&sig_ev, NULL);
+
+ event_base_assert_ok_(current_base);
+ TT_BLATHER(("Before fork"));
+ if ((pid = regress_fork()) == 0) {
+ /* in the child */
+ TT_BLATHER(("In child, before reinit"));
+ event_base_assert_ok_(current_base);
+ if (event_reinit(current_base) == -1) {
+ fprintf(stdout, "FAILED (reinit)\n");
+ exit(1);
+ }
+ TT_BLATHER(("After reinit"));
+ event_base_assert_ok_(current_base);
+ TT_BLATHER(("After assert-ok"));
+
+ evsignal_del(&sig_ev);
+
+ called = 0;
+
+ event_dispatch();
+
+ event_base_free(current_base);
+
+ /* we do not send an EOF; simple_read_cb requires an EOF
+ * to set test_ok. we just verify that the callback was
+ * called. */
+ exit(test_ok != 0 || called != 2 ? -2 : 76);
+ }
+
+ /* wait for the child to read the data */
+ {
+ const struct timeval tv = { 0, 100000 };
+ evutil_usleep_(&tv);
+ }
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ TT_BLATHER(("Before waitpid"));
+ if (waitpid(pid, &status, 0) == -1) {
+ fprintf(stdout, "FAILED (fork)\n");
+ exit(1);
+ }
+ TT_BLATHER(("After waitpid"));
+
+ if (WEXITSTATUS(status) != 76) {
+ fprintf(stdout, "FAILED (exit): %d\n", WEXITSTATUS(status));
+ exit(1);
+ }
+
+ /* test that the current event loop still works */
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ fprintf(stderr, "%s: write\n", __func__);
+ }
+
+ shutdown(pair[0], SHUT_WR);
+
+ event_dispatch();
+
+ if (!got_sigchld) {
+ fprintf(stdout, "FAILED (sigchld)\n");
+ exit(1);
+ }
+
+ evsignal_del(&sig_ev);
+
+ end:
+ cleanup_test();
+}
+
+static void
+signal_cb_sa(int sig)
+{
+ test_ok = 2;
+}
+
+static void
+signal_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *ev = arg;
+
+ evsignal_del(ev);
+ test_ok = 1;
+}
+
+static void
+test_simplesignal(void)
+{
+ struct event ev;
+ struct itimerval itv;
+
+ setup_test("Simple signal: ");
+ evsignal_set(&ev, SIGALRM, signal_cb, &ev);
+ evsignal_add(&ev, NULL);
+ /* find bugs in which operations are re-ordered */
+ evsignal_del(&ev);
+ evsignal_add(&ev, NULL);
+
+ memset(&itv, 0, sizeof(itv));
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 100000;
+ if (setitimer(ITIMER_REAL, &itv, NULL) == -1)
+ goto skip_simplesignal;
+
+ event_dispatch();
+ skip_simplesignal:
+ if (evsignal_del(&ev) == -1)
+ test_ok = 0;
+
+ cleanup_test();
+}
+
+static void
+test_multiplesignal(void)
+{
+ struct event ev_one, ev_two;
+ struct itimerval itv;
+
+ setup_test("Multiple signal: ");
+
+ evsignal_set(&ev_one, SIGALRM, signal_cb, &ev_one);
+ evsignal_add(&ev_one, NULL);
+
+ evsignal_set(&ev_two, SIGALRM, signal_cb, &ev_two);
+ evsignal_add(&ev_two, NULL);
+
+ memset(&itv, 0, sizeof(itv));
+ itv.it_value.tv_sec = 0;
+ itv.it_value.tv_usec = 100000;
+ if (setitimer(ITIMER_REAL, &itv, NULL) == -1)
+ goto skip_simplesignal;
+
+ event_dispatch();
+
+ skip_simplesignal:
+ if (evsignal_del(&ev_one) == -1)
+ test_ok = 0;
+ if (evsignal_del(&ev_two) == -1)
+ test_ok = 0;
+
+ cleanup_test();
+}
+
+static void
+test_immediatesignal(void)
+{
+ struct event ev;
+
+ test_ok = 0;
+ evsignal_set(&ev, SIGUSR1, signal_cb, &ev);
+ evsignal_add(&ev, NULL);
+ raise(SIGUSR1);
+ event_loop(EVLOOP_NONBLOCK);
+ evsignal_del(&ev);
+ cleanup_test();
+}
+
+static void
+test_signal_dealloc(void)
+{
+ /* make sure that evsignal_event is event_del'ed and pipe closed */
+ struct event ev;
+ struct event_base *base = event_init();
+ evsignal_set(&ev, SIGUSR1, signal_cb, &ev);
+ evsignal_add(&ev, NULL);
+ evsignal_del(&ev);
+ event_base_free(base);
+ /* If we got here without asserting, we're fine. */
+ test_ok = 1;
+ cleanup_test();
+}
+
+static void
+test_signal_pipeloss(void)
+{
+ /* make sure that the base1 pipe is closed correctly. */
+ struct event_base *base1, *base2;
+ int pipe1;
+ test_ok = 0;
+ base1 = event_init();
+ pipe1 = base1->sig.ev_signal_pair[0];
+ base2 = event_init();
+ event_base_free(base2);
+ event_base_free(base1);
+ if (close(pipe1) != -1 || errno!=EBADF) {
+ /* fd must be closed, so second close gives -1, EBADF */
+ printf("signal pipe not closed. ");
+ test_ok = 0;
+ } else {
+ test_ok = 1;
+ }
+ cleanup_test();
+}
+
+/*
+ * make two bases to catch signals, use both of them. this only works
+ * for event mechanisms that use our signal pipe trick. kqueue handles
+ * signals internally, and all interested kqueues get all the signals.
+ */
+static void
+test_signal_switchbase(void)
+{
+ struct event ev1, ev2;
+ struct event_base *base1, *base2;
+ int is_kqueue;
+ test_ok = 0;
+ base1 = event_init();
+ base2 = event_init();
+ is_kqueue = !strcmp(event_get_method(),"kqueue");
+ evsignal_set(&ev1, SIGUSR1, signal_cb, &ev1);
+ evsignal_set(&ev2, SIGUSR1, signal_cb, &ev2);
+ if (event_base_set(base1, &ev1) ||
+ event_base_set(base2, &ev2) ||
+ event_add(&ev1, NULL) ||
+ event_add(&ev2, NULL)) {
+ fprintf(stderr, "%s: cannot set base, add\n", __func__);
+ exit(1);
+ }
+
+ tt_ptr_op(event_get_base(&ev1), ==, base1);
+ tt_ptr_op(event_get_base(&ev2), ==, base2);
+
+ test_ok = 0;
+ /* can handle signal before loop is called */
+ raise(SIGUSR1);
+ event_base_loop(base2, EVLOOP_NONBLOCK);
+ if (is_kqueue) {
+ if (!test_ok)
+ goto end;
+ test_ok = 0;
+ }
+ event_base_loop(base1, EVLOOP_NONBLOCK);
+ if (test_ok && !is_kqueue) {
+ test_ok = 0;
+
+ /* set base1 to handle signals */
+ event_base_loop(base1, EVLOOP_NONBLOCK);
+ raise(SIGUSR1);
+ event_base_loop(base1, EVLOOP_NONBLOCK);
+ event_base_loop(base2, EVLOOP_NONBLOCK);
+ }
+end:
+ event_base_free(base1);
+ event_base_free(base2);
+ cleanup_test();
+}
+
+/*
+ * assert that a signal event removed from the event queue really is
+ * removed - with no possibility of it's parent handler being fired.
+ */
+static void
+test_signal_assert(void)
+{
+ struct event ev;
+ struct event_base *base = event_init();
+ test_ok = 0;
+ /* use SIGCONT so we don't kill ourselves when we signal to nowhere */
+ evsignal_set(&ev, SIGCONT, signal_cb, &ev);
+ evsignal_add(&ev, NULL);
+ /*
+ * if evsignal_del() fails to reset the handler, it's current handler
+ * will still point to evsig_handler().
+ */
+ evsignal_del(&ev);
+
+ raise(SIGCONT);
+#if 0
+ /* only way to verify we were in evsig_handler() */
+ /* XXXX Now there's no longer a good way. */
+ if (base->sig.evsig_caught)
+ test_ok = 0;
+ else
+ test_ok = 1;
+#else
+ test_ok = 1;
+#endif
+
+ event_base_free(base);
+ cleanup_test();
+ return;
+}
+
+/*
+ * assert that we restore our previous signal handler properly.
+ */
+static void
+test_signal_restore(void)
+{
+ struct event ev;
+ struct event_base *base = event_init();
+#ifdef EVENT__HAVE_SIGACTION
+ struct sigaction sa;
+#endif
+
+ test_ok = 0;
+#ifdef EVENT__HAVE_SIGACTION
+ sa.sa_handler = signal_cb_sa;
+ sa.sa_flags = 0x0;
+ sigemptyset(&sa.sa_mask);
+ if (sigaction(SIGUSR1, &sa, NULL) == -1)
+ goto out;
+#else
+ if (signal(SIGUSR1, signal_cb_sa) == SIG_ERR)
+ goto out;
+#endif
+ evsignal_set(&ev, SIGUSR1, signal_cb, &ev);
+ evsignal_add(&ev, NULL);
+ evsignal_del(&ev);
+
+ raise(SIGUSR1);
+ /* 1 == signal_cb, 2 == signal_cb_sa, we want our previous handler */
+ if (test_ok != 2)
+ test_ok = 0;
+out:
+ event_base_free(base);
+ cleanup_test();
+ return;
+}
+
+static void
+signal_cb_swp(int sig, short event, void *arg)
+{
+ called++;
+ if (called < 5)
+ raise(sig);
+ else
+ event_loopexit(NULL);
+}
+static void
+timeout_cb_swp(evutil_socket_t fd, short event, void *arg)
+{
+ if (called == -1) {
+ struct timeval tv = {5, 0};
+
+ called = 0;
+ evtimer_add((struct event *)arg, &tv);
+ raise(SIGUSR1);
+ return;
+ }
+ test_ok = 0;
+ event_loopexit(NULL);
+}
+
+static void
+test_signal_while_processing(void)
+{
+ struct event_base *base = event_init();
+ struct event ev, ev_timer;
+ struct timeval tv = {0, 0};
+
+ setup_test("Receiving a signal while processing other signal: ");
+
+ called = -1;
+ test_ok = 1;
+ signal_set(&ev, SIGUSR1, signal_cb_swp, NULL);
+ signal_add(&ev, NULL);
+ evtimer_set(&ev_timer, timeout_cb_swp, &ev_timer);
+ evtimer_add(&ev_timer, &tv);
+ event_dispatch();
+
+ event_base_free(base);
+ cleanup_test();
+ return;
+}
+#endif
+
+static void
+test_free_active_base(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base1;
+ struct event ev1;
+
+ base1 = event_init();
+ if (base1) {
+ event_assign(&ev1, base1, data->pair[1], EV_READ,
+ dummy_read_cb, NULL);
+ event_add(&ev1, NULL);
+ event_base_free(base1); /* should not crash */
+ } else {
+ tt_fail_msg("failed to create event_base for test");
+ }
+
+ base1 = event_init();
+ tt_assert(base1);
+ event_assign(&ev1, base1, 0, 0, dummy_read_cb, NULL);
+ event_active(&ev1, EV_READ, 1);
+ event_base_free(base1);
+end:
+ ;
+}
+
+static void
+test_manipulate_active_events(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event ev1;
+
+ event_assign(&ev1, base, -1, EV_TIMEOUT, dummy_read_cb, NULL);
+
+ /* Make sure an active event is pending. */
+ event_active(&ev1, EV_READ, 1);
+ tt_int_op(event_pending(&ev1, EV_READ|EV_TIMEOUT|EV_WRITE, NULL),
+ ==, EV_READ);
+
+ /* Make sure that activating an event twice works. */
+ event_active(&ev1, EV_WRITE, 1);
+ tt_int_op(event_pending(&ev1, EV_READ|EV_TIMEOUT|EV_WRITE, NULL),
+ ==, EV_READ|EV_WRITE);
+
+end:
+ event_del(&ev1);
+}
+
+static void
+event_selfarg_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct event *ev = arg;
+ struct event_base *base = event_get_base(ev);
+ event_base_assert_ok_(base);
+ event_base_loopexit(base, NULL);
+ tt_want(ev == event_base_get_running_event(base));
+}
+
+static void
+test_event_new_selfarg(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event *ev = event_new(base, -1, EV_READ, event_selfarg_cb,
+ event_self_cbarg());
+
+ event_active(ev, EV_READ, 1);
+ event_base_dispatch(base);
+
+ event_free(ev);
+}
+
+static void
+test_event_assign_selfarg(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event ev;
+
+ event_assign(&ev, base, -1, EV_READ, event_selfarg_cb,
+ event_self_cbarg());
+ event_active(&ev, EV_READ, 1);
+ event_base_dispatch(base);
+}
+
+static void
+test_event_base_get_num_events(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event ev;
+ int event_count_active;
+ int event_count_virtual;
+ int event_count_added;
+ int event_count_active_virtual;
+ int event_count_active_added;
+ int event_count_virtual_added;
+ int event_count_active_added_virtual;
+
+ struct timeval qsec = {0, 100000};
+
+ event_assign(&ev, base, -1, EV_READ, event_selfarg_cb,
+ event_self_cbarg());
+
+ event_add(&ev, &qsec);
+ event_count_active = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE);
+ event_count_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL);
+ event_count_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ADDED);
+ event_count_active_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_VIRTUAL);
+ event_count_active_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_ADDED);
+ event_count_virtual_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL|EVENT_BASE_COUNT_ADDED);
+ event_count_active_added_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|
+ EVENT_BASE_COUNT_ADDED|
+ EVENT_BASE_COUNT_VIRTUAL);
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 0);
+ /* libevent itself adds a timeout event, so the event_count is 2 here */
+ tt_int_op(event_count_added, ==, 2);
+ tt_int_op(event_count_active_virtual, ==, 0);
+ tt_int_op(event_count_active_added, ==, 2);
+ tt_int_op(event_count_virtual_added, ==, 2);
+ tt_int_op(event_count_active_added_virtual, ==, 2);
+
+ event_active(&ev, EV_READ, 1);
+ event_count_active = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE);
+ event_count_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL);
+ event_count_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ADDED);
+ event_count_active_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_VIRTUAL);
+ event_count_active_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_ADDED);
+ event_count_virtual_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL|EVENT_BASE_COUNT_ADDED);
+ event_count_active_added_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|
+ EVENT_BASE_COUNT_ADDED|
+ EVENT_BASE_COUNT_VIRTUAL);
+ tt_int_op(event_count_active, ==, 1);
+ tt_int_op(event_count_virtual, ==, 0);
+ tt_int_op(event_count_added, ==, 3);
+ tt_int_op(event_count_active_virtual, ==, 1);
+ tt_int_op(event_count_active_added, ==, 4);
+ tt_int_op(event_count_virtual_added, ==, 3);
+ tt_int_op(event_count_active_added_virtual, ==, 4);
+
+ event_base_loop(base, 0);
+ event_count_active = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE);
+ event_count_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL);
+ event_count_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ADDED);
+ event_count_active_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_VIRTUAL);
+ event_count_active_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_ADDED);
+ event_count_virtual_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL|EVENT_BASE_COUNT_ADDED);
+ event_count_active_added_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|
+ EVENT_BASE_COUNT_ADDED|
+ EVENT_BASE_COUNT_VIRTUAL);
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 0);
+ tt_int_op(event_count_added, ==, 0);
+ tt_int_op(event_count_active_virtual, ==, 0);
+ tt_int_op(event_count_active_added, ==, 0);
+ tt_int_op(event_count_virtual_added, ==, 0);
+ tt_int_op(event_count_active_added_virtual, ==, 0);
+
+ event_base_add_virtual_(base);
+ event_count_active = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE);
+ event_count_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL);
+ event_count_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ADDED);
+ event_count_active_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_VIRTUAL);
+ event_count_active_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|EVENT_BASE_COUNT_ADDED);
+ event_count_virtual_added = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_VIRTUAL|EVENT_BASE_COUNT_ADDED);
+ event_count_active_added_virtual = event_base_get_num_events(base,
+ EVENT_BASE_COUNT_ACTIVE|
+ EVENT_BASE_COUNT_ADDED|
+ EVENT_BASE_COUNT_VIRTUAL);
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 1);
+ tt_int_op(event_count_added, ==, 0);
+ tt_int_op(event_count_active_virtual, ==, 1);
+ tt_int_op(event_count_active_added, ==, 0);
+ tt_int_op(event_count_virtual_added, ==, 1);
+ tt_int_op(event_count_active_added_virtual, ==, 1);
+
+end:
+ ;
+}
+
+static void
+test_event_base_get_max_events(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event ev;
+ struct event ev2;
+ int event_count_active;
+ int event_count_virtual;
+ int event_count_added;
+ int event_count_active_virtual;
+ int event_count_active_added;
+ int event_count_virtual_added;
+ int event_count_active_added_virtual;
+
+ struct timeval qsec = {0, 100000};
+
+ event_assign(&ev, base, -1, EV_READ, event_selfarg_cb,
+ event_self_cbarg());
+ event_assign(&ev2, base, -1, EV_READ, event_selfarg_cb,
+ event_self_cbarg());
+
+ event_add(&ev, &qsec);
+ event_add(&ev2, &qsec);
+ event_del(&ev2);
+
+ event_count_active = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE, 0);
+ event_count_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_active_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_virtual_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_added_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE |
+ EVENT_BASE_COUNT_ADDED |
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 0);
+ /* libevent itself adds a timeout event, so the event_count is 4 here */
+ tt_int_op(event_count_added, ==, 4);
+ tt_int_op(event_count_active_virtual, ==, 0);
+ tt_int_op(event_count_active_added, ==, 4);
+ tt_int_op(event_count_virtual_added, ==, 4);
+ tt_int_op(event_count_active_added_virtual, ==, 4);
+
+ event_active(&ev, EV_READ, 1);
+ event_count_active = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE, 0);
+ event_count_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_active_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_virtual_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_added_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE |
+ EVENT_BASE_COUNT_ADDED |
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+
+ tt_int_op(event_count_active, ==, 1);
+ tt_int_op(event_count_virtual, ==, 0);
+ tt_int_op(event_count_added, ==, 4);
+ tt_int_op(event_count_active_virtual, ==, 1);
+ tt_int_op(event_count_active_added, ==, 5);
+ tt_int_op(event_count_virtual_added, ==, 4);
+ tt_int_op(event_count_active_added_virtual, ==, 5);
+
+ event_base_loop(base, 0);
+ event_count_active = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE, 1);
+ event_count_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL, 1);
+ event_count_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ADDED, 1);
+ event_count_active_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_active_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_virtual_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_added_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE |
+ EVENT_BASE_COUNT_ADDED |
+ EVENT_BASE_COUNT_VIRTUAL, 1);
+
+ tt_int_op(event_count_active, ==, 1);
+ tt_int_op(event_count_virtual, ==, 0);
+ tt_int_op(event_count_added, ==, 4);
+ tt_int_op(event_count_active_virtual, ==, 0);
+ tt_int_op(event_count_active_added, ==, 0);
+ tt_int_op(event_count_virtual_added, ==, 0);
+ tt_int_op(event_count_active_added_virtual, ==, 0);
+
+ event_count_active = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE, 0);
+ event_count_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ADDED, 0);
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 0);
+ tt_int_op(event_count_added, ==, 0);
+
+ event_base_add_virtual_(base);
+ event_count_active = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE, 0);
+ event_count_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_VIRTUAL, 0);
+ event_count_active_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_virtual_added = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_VIRTUAL | EVENT_BASE_COUNT_ADDED, 0);
+ event_count_active_added_virtual = event_base_get_max_events(base,
+ EVENT_BASE_COUNT_ACTIVE |
+ EVENT_BASE_COUNT_ADDED |
+ EVENT_BASE_COUNT_VIRTUAL, 0);
+
+ tt_int_op(event_count_active, ==, 0);
+ tt_int_op(event_count_virtual, ==, 1);
+ tt_int_op(event_count_added, ==, 0);
+ tt_int_op(event_count_active_virtual, ==, 1);
+ tt_int_op(event_count_active_added, ==, 0);
+ tt_int_op(event_count_virtual_added, ==, 1);
+ tt_int_op(event_count_active_added_virtual, ==, 1);
+
+end:
+ ;
+}
+
+static void
+test_bad_assign(void *ptr)
+{
+ struct event ev;
+ int r;
+ /* READ|SIGNAL is not allowed */
+ r = event_assign(&ev, NULL, -1, EV_SIGNAL|EV_READ, dummy_read_cb, NULL);
+ tt_int_op(r,==,-1);
+
+end:
+ ;
+}
+
+static int reentrant_cb_run = 0;
+
+static void
+bad_reentrant_run_loop_cb(evutil_socket_t fd, short what, void *ptr)
+{
+ struct event_base *base = ptr;
+ int r;
+ reentrant_cb_run = 1;
+ /* This reentrant call to event_base_loop should be detected and
+ * should fail */
+ r = event_base_loop(base, 0);
+ tt_int_op(r, ==, -1);
+end:
+ ;
+}
+
+static void
+test_bad_reentrant(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event ev;
+ int r;
+ event_assign(&ev, base, -1,
+ 0, bad_reentrant_run_loop_cb, base);
+
+ event_active(&ev, EV_WRITE, 1);
+ r = event_base_loop(base, 0);
+ tt_int_op(r, ==, 1);
+ tt_int_op(reentrant_cb_run, ==, 1);
+end:
+ ;
+}
+
+static int n_write_a_byte_cb=0;
+static int n_read_and_drain_cb=0;
+static int n_activate_other_event_cb=0;
+static void
+write_a_byte_cb(evutil_socket_t fd, short what, void *arg)
+{
+ char buf[] = "x";
+ if (write(fd, buf, 1) == 1)
+ ++n_write_a_byte_cb;
+}
+static void
+read_and_drain_cb(evutil_socket_t fd, short what, void *arg)
+{
+ char buf[128];
+ int n;
+ ++n_read_and_drain_cb;
+ while ((n = read(fd, buf, sizeof(buf))) > 0)
+ ;
+}
+
+static void
+activate_other_event_cb(evutil_socket_t fd, short what, void *other_)
+{
+ struct event *ev_activate = other_;
+ ++n_activate_other_event_cb;
+ event_active_later_(ev_activate, EV_READ);
+}
+
+static void
+test_active_later(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event *ev1, *ev2;
+ struct event ev3, ev4;
+ struct timeval qsec = {0, 100000};
+ ev1 = event_new(data->base, data->pair[0], EV_READ|EV_PERSIST, read_and_drain_cb, NULL);
+ ev2 = event_new(data->base, data->pair[1], EV_WRITE|EV_PERSIST, write_a_byte_cb, NULL);
+ event_assign(&ev3, data->base, -1, 0, activate_other_event_cb, &ev4);
+ event_assign(&ev4, data->base, -1, 0, activate_other_event_cb, &ev3);
+ event_add(ev1, NULL);
+ event_add(ev2, NULL);
+ event_active_later_(&ev3, EV_READ);
+
+ event_base_loopexit(data->base, &qsec);
+
+ event_base_loop(data->base, 0);
+
+ TT_BLATHER(("%d write calls, %d read calls, %d activate-other calls.",
+ n_write_a_byte_cb, n_read_and_drain_cb, n_activate_other_event_cb));
+ event_del(&ev3);
+ event_del(&ev4);
+
+ tt_int_op(n_write_a_byte_cb, ==, n_activate_other_event_cb);
+ tt_int_op(n_write_a_byte_cb, >, 100);
+ tt_int_op(n_read_and_drain_cb, >, 100);
+ tt_int_op(n_activate_other_event_cb, >, 100);
+
+ event_active_later_(&ev4, EV_READ);
+ event_active(&ev4, EV_READ, 1); /* This should make the event
+ active immediately. */
+ tt_assert((ev4.ev_flags & EVLIST_ACTIVE) != 0);
+ tt_assert((ev4.ev_flags & EVLIST_ACTIVE_LATER) == 0);
+
+ /* Now leave this one around, so that event_free sees it and removes
+ * it. */
+ event_active_later_(&ev3, EV_READ);
+ event_base_assert_ok_(data->base);
+ event_base_free(data->base);
+ data->base = NULL;
+end:
+ ;
+}
+
+
+static void incr_arg_cb(evutil_socket_t fd, short what, void *arg)
+{
+ int *intptr = arg;
+ (void) fd; (void) what;
+ ++*intptr;
+}
+static void remove_timers_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct event **ep = arg;
+ (void) fd; (void) what;
+ event_remove_timer(ep[0]);
+ event_remove_timer(ep[1]);
+}
+static void send_a_byte_cb(evutil_socket_t fd, short what, void *arg)
+{
+ evutil_socket_t *sockp = arg;
+ (void) fd; (void) what;
+ (void) write(*sockp, "A", 1);
+}
+struct read_not_timeout_param
+{
+ struct event **ev;
+ int events;
+ int count;
+};
+static void read_not_timeout_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct read_not_timeout_param *rntp = arg;
+ char c;
+ ev_ssize_t n;
+ (void) fd; (void) what;
+ n = read(fd, &c, 1);
+ tt_int_op(n, ==, 1);
+ rntp->events |= what;
+ ++rntp->count;
+ if(2 == rntp->count) event_del(rntp->ev[0]);
+end:
+ ;
+}
+
+static void
+test_event_remove_timeout(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = data->base;
+ struct event *ev[5];
+ int ev1_fired=0;
+ struct timeval ms25 = { 0, 25*1000 },
+ ms40 = { 0, 40*1000 },
+ ms75 = { 0, 75*1000 },
+ ms125 = { 0, 125*1000 };
+ struct read_not_timeout_param rntp = { ev, 0, 0 };
+
+ event_base_assert_ok_(base);
+
+ ev[0] = event_new(base, data->pair[0], EV_READ|EV_PERSIST,
+ read_not_timeout_cb, &rntp);
+ ev[1] = evtimer_new(base, incr_arg_cb, &ev1_fired);
+ ev[2] = evtimer_new(base, remove_timers_cb, ev);
+ ev[3] = evtimer_new(base, send_a_byte_cb, &data->pair[1]);
+ ev[4] = evtimer_new(base, send_a_byte_cb, &data->pair[1]);
+ tt_assert(base);
+ event_add(ev[2], &ms25); /* remove timers */
+ event_add(ev[4], &ms40); /* write to test if timer re-activates */
+ event_add(ev[0], &ms75); /* read */
+ event_add(ev[1], &ms75); /* timer */
+ event_add(ev[3], &ms125); /* timeout. */
+ event_base_assert_ok_(base);
+
+ event_base_dispatch(base);
+
+ tt_int_op(ev1_fired, ==, 0);
+ tt_int_op(rntp.events, ==, EV_READ);
+
+ event_base_assert_ok_(base);
+end:
+ event_free(ev[0]);
+ event_free(ev[1]);
+ event_free(ev[2]);
+ event_free(ev[3]);
+ event_free(ev[4]);
+}
+
+static void
+test_event_base_new(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_base *base = 0;
+ struct event ev1;
+ struct basic_cb_args args;
+
+ int towrite = (int)strlen(TEST1)+1;
+ int len = write(data->pair[0], TEST1, towrite);
+
+ if (len < 0)
+ tt_abort_perror("initial write");
+ else if (len != towrite)
+ tt_abort_printf(("initial write fell short (%d of %d bytes)",
+ len, towrite));
+
+ if (shutdown(data->pair[0], SHUT_WR))
+ tt_abort_perror("initial write shutdown");
+
+ base = event_base_new();
+ if (!base)
+ tt_abort_msg("failed to create event base");
+
+ args.eb = base;
+ args.ev = &ev1;
+ args.callcount = 0;
+ event_assign(&ev1, base, data->pair[1],
+ EV_READ|EV_PERSIST, basic_read_cb, &args);
+
+ if (event_add(&ev1, NULL))
+ tt_abort_perror("initial event_add");
+
+ if (event_base_loop(base, 0))
+ tt_abort_msg("unsuccessful exit from event loop");
+
+end:
+ if (base)
+ event_base_free(base);
+}
+
+static void
+test_loopexit(void)
+{
+ struct timeval tv, tv_start, tv_end;
+ struct event ev;
+
+ setup_test("Loop exit: ");
+
+ tv.tv_usec = 0;
+ tv.tv_sec = 60*60*24;
+ evtimer_set(&ev, timeout_cb, NULL);
+ evtimer_add(&ev, &tv);
+
+ tv.tv_usec = 300*1000;
+ tv.tv_sec = 0;
+ event_loopexit(&tv);
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_dispatch();
+ evutil_gettimeofday(&tv_end, NULL);
+
+ evtimer_del(&ev);
+
+ tt_assert(event_base_got_exit(global_base));
+ tt_assert(!event_base_got_break(global_base));
+
+ test_timeval_diff_eq(&tv_start, &tv_end, 300);
+
+ test_ok = 1;
+end:
+ cleanup_test();
+}
+
+static void
+test_loopexit_multiple(void)
+{
+ struct timeval tv, tv_start, tv_end;
+ struct event_base *base;
+
+ setup_test("Loop Multiple exit: ");
+
+ base = event_base_new();
+
+ tv.tv_usec = 200*1000;
+ tv.tv_sec = 0;
+ event_base_loopexit(base, &tv);
+
+ tv.tv_usec = 0;
+ tv.tv_sec = 3;
+ event_base_loopexit(base, &tv);
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_base_dispatch(base);
+ evutil_gettimeofday(&tv_end, NULL);
+
+ tt_assert(event_base_got_exit(base));
+ tt_assert(!event_base_got_break(base));
+
+ event_base_free(base);
+
+ test_timeval_diff_eq(&tv_start, &tv_end, 200);
+
+ test_ok = 1;
+
+end:
+ cleanup_test();
+}
+
+static void
+break_cb(evutil_socket_t fd, short events, void *arg)
+{
+ test_ok = 1;
+ event_loopbreak();
+}
+
+static void
+fail_cb(evutil_socket_t fd, short events, void *arg)
+{
+ test_ok = 0;
+}
+
+static void
+test_loopbreak(void)
+{
+ struct event ev1, ev2;
+ struct timeval tv;
+
+ setup_test("Loop break: ");
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ evtimer_set(&ev1, break_cb, NULL);
+ evtimer_add(&ev1, &tv);
+ evtimer_set(&ev2, fail_cb, NULL);
+ evtimer_add(&ev2, &tv);
+
+ event_dispatch();
+
+ tt_assert(!event_base_got_exit(global_base));
+ tt_assert(event_base_got_break(global_base));
+
+ evtimer_del(&ev1);
+ evtimer_del(&ev2);
+
+end:
+ cleanup_test();
+}
+
+static struct event *readd_test_event_last_added = NULL;
+static void
+re_add_read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[256];
+ struct event *ev_other = arg;
+ ev_ssize_t n_read;
+
+ readd_test_event_last_added = ev_other;
+
+ n_read = read(fd, buf, sizeof(buf));
+
+ if (n_read < 0) {
+ tt_fail_perror("read");
+ event_base_loopbreak(event_get_base(ev_other));
+ return;
+ } else {
+ event_add(ev_other, NULL);
+ ++test_ok;
+ }
+}
+
+static void
+test_nonpersist_readd(void)
+{
+ struct event ev1, ev2;
+
+ setup_test("Re-add nonpersistent events: ");
+ event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2);
+ event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1);
+
+ if (write(pair[0], "Hello", 5) < 0) {
+ tt_fail_perror("write(pair[0])");
+ }
+
+ if (write(pair[1], "Hello", 5) < 0) {
+ tt_fail_perror("write(pair[1])\n");
+ }
+
+ if (event_add(&ev1, NULL) == -1 ||
+ event_add(&ev2, NULL) == -1) {
+ test_ok = 0;
+ }
+ if (test_ok != 0)
+ exit(1);
+ event_loop(EVLOOP_ONCE);
+ if (test_ok != 2)
+ exit(1);
+ /* At this point, we executed both callbacks. Whichever one got
+ * called first added the second, but the second then immediately got
+ * deleted before its callback was called. At this point, though, it
+ * re-added the first.
+ */
+ if (!readd_test_event_last_added) {
+ test_ok = 0;
+ } else if (readd_test_event_last_added == &ev1) {
+ if (!event_pending(&ev1, EV_READ, NULL) ||
+ event_pending(&ev2, EV_READ, NULL))
+ test_ok = 0;
+ } else {
+ if (event_pending(&ev1, EV_READ, NULL) ||
+ !event_pending(&ev2, EV_READ, NULL))
+ test_ok = 0;
+ }
+
+ event_del(&ev1);
+ event_del(&ev2);
+
+ cleanup_test();
+}
+
+struct test_pri_event {
+ struct event ev;
+ int count;
+};
+
+static void
+test_priorities_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct test_pri_event *pri = arg;
+ struct timeval tv;
+
+ if (pri->count == 3) {
+ event_loopexit(NULL);
+ return;
+ }
+
+ pri->count++;
+
+ evutil_timerclear(&tv);
+ event_add(&pri->ev, &tv);
+}
+
+static void
+test_priorities_impl(int npriorities)
+{
+ struct test_pri_event one, two;
+ struct timeval tv;
+
+ TT_BLATHER(("Testing Priorities %d: ", npriorities));
+
+ event_base_priority_init(global_base, npriorities);
+
+ memset(&one, 0, sizeof(one));
+ memset(&two, 0, sizeof(two));
+
+ timeout_set(&one.ev, test_priorities_cb, &one);
+ if (event_priority_set(&one.ev, 0) == -1) {
+ fprintf(stderr, "%s: failed to set priority", __func__);
+ exit(1);
+ }
+
+ timeout_set(&two.ev, test_priorities_cb, &two);
+ if (event_priority_set(&two.ev, npriorities - 1) == -1) {
+ fprintf(stderr, "%s: failed to set priority", __func__);
+ exit(1);
+ }
+
+ evutil_timerclear(&tv);
+
+ if (event_add(&one.ev, &tv) == -1)
+ exit(1);
+ if (event_add(&two.ev, &tv) == -1)
+ exit(1);
+
+ event_dispatch();
+
+ event_del(&one.ev);
+ event_del(&two.ev);
+
+ if (npriorities == 1) {
+ if (one.count == 3 && two.count == 3)
+ test_ok = 1;
+ } else if (npriorities == 2) {
+ /* Two is called once because event_loopexit is priority 1 */
+ if (one.count == 3 && two.count == 1)
+ test_ok = 1;
+ } else {
+ if (one.count == 3 && two.count == 0)
+ test_ok = 1;
+ }
+}
+
+static void
+test_priorities(void)
+{
+ test_priorities_impl(1);
+ if (test_ok)
+ test_priorities_impl(2);
+ if (test_ok)
+ test_priorities_impl(3);
+}
+
+/* priority-active-inversion: activate a higher-priority event, and make sure
+ * it keeps us from running a lower-priority event first. */
+static int n_pai_calls = 0;
+static struct event pai_events[3];
+
+static void
+prio_active_inversion_cb(evutil_socket_t fd, short what, void *arg)
+{
+ int *call_order = arg;
+ *call_order = n_pai_calls++;
+ if (n_pai_calls == 1) {
+ /* This should activate later, even though it shares a
+ priority with us. */
+ event_active(&pai_events[1], EV_READ, 1);
+ /* This should activate next, since its priority is higher,
+ even though we activated it second. */
+ event_active(&pai_events[2], EV_TIMEOUT, 1);
+ }
+}
+
+static void
+test_priority_active_inversion(void *data_)
+{
+ struct basic_test_data *data = data_;
+ struct event_base *base = data->base;
+ int call_order[3];
+ int i;
+ tt_int_op(event_base_priority_init(base, 8), ==, 0);
+
+ n_pai_calls = 0;
+ memset(call_order, 0, sizeof(call_order));
+
+ for (i=0;i<3;++i) {
+ event_assign(&pai_events[i], data->base, -1, 0,
+ prio_active_inversion_cb, &call_order[i]);
+ }
+
+ event_priority_set(&pai_events[0], 4);
+ event_priority_set(&pai_events[1], 4);
+ event_priority_set(&pai_events[2], 0);
+
+ event_active(&pai_events[0], EV_WRITE, 1);
+
+ event_base_dispatch(base);
+ tt_int_op(n_pai_calls, ==, 3);
+ tt_int_op(call_order[0], ==, 0);
+ tt_int_op(call_order[1], ==, 2);
+ tt_int_op(call_order[2], ==, 1);
+end:
+ ;
+}
+
+
+static void
+test_multiple_cb(evutil_socket_t fd, short event, void *arg)
+{
+ if (event & EV_READ)
+ test_ok |= 1;
+ else if (event & EV_WRITE)
+ test_ok |= 2;
+}
+
+static void
+test_multiple_events_for_same_fd(void)
+{
+ struct event e1, e2;
+
+ setup_test("Multiple events for same fd: ");
+
+ event_set(&e1, pair[0], EV_READ, test_multiple_cb, NULL);
+ event_add(&e1, NULL);
+ event_set(&e2, pair[0], EV_WRITE, test_multiple_cb, NULL);
+ event_add(&e2, NULL);
+ event_loop(EVLOOP_ONCE);
+ event_del(&e2);
+
+ if (write(pair[1], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ event_loop(EVLOOP_ONCE);
+ event_del(&e1);
+
+ if (test_ok != 3)
+ test_ok = 0;
+
+ cleanup_test();
+}
+
+int evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf);
+int evtag_decode_int64(ev_uint64_t *pnumber, struct evbuffer *evbuf);
+int evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t number);
+int evtag_decode_tag(ev_uint32_t *pnumber, struct evbuffer *evbuf);
+
+static void
+read_once_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[256];
+ int len;
+
+ len = read(fd, buf, sizeof(buf));
+
+ if (called) {
+ test_ok = 0;
+ } else if (len) {
+ /* Assumes global pair[0] can be used for writing */
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ test_ok = 0;
+ } else {
+ test_ok = 1;
+ }
+ }
+
+ called++;
+}
+
+static void
+test_want_only_once(void)
+{
+ struct event ev;
+ struct timeval tv;
+
+ /* Very simple read test */
+ setup_test("Want read only once: ");
+
+ if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ /* Setup the loop termination */
+ evutil_timerclear(&tv);
+ tv.tv_usec = 300*1000;
+ event_loopexit(&tv);
+
+ event_set(&ev, pair[1], EV_READ, read_once_cb, &ev);
+ if (event_add(&ev, NULL) == -1)
+ exit(1);
+ event_dispatch();
+
+ cleanup_test();
+}
+
+#define TEST_MAX_INT 6
+
+static void
+evtag_int_test(void *ptr)
+{
+ struct evbuffer *tmp = evbuffer_new();
+ ev_uint32_t integers[TEST_MAX_INT] = {
+ 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000
+ };
+ ev_uint32_t integer;
+ ev_uint64_t big_int;
+ int i;
+
+ evtag_init();
+
+ for (i = 0; i < TEST_MAX_INT; i++) {
+ int oldlen, newlen;
+ oldlen = (int)EVBUFFER_LENGTH(tmp);
+ evtag_encode_int(tmp, integers[i]);
+ newlen = (int)EVBUFFER_LENGTH(tmp);
+ TT_BLATHER(("encoded 0x%08x with %d bytes",
+ (unsigned)integers[i], newlen - oldlen));
+ big_int = integers[i];
+ big_int *= 1000000000; /* 1 billion */
+ evtag_encode_int64(tmp, big_int);
+ }
+
+ for (i = 0; i < TEST_MAX_INT; i++) {
+ tt_int_op(evtag_decode_int(&integer, tmp), !=, -1);
+ tt_uint_op(integer, ==, integers[i]);
+ tt_int_op(evtag_decode_int64(&big_int, tmp), !=, -1);
+ tt_assert((big_int / 1000000000) == integers[i]);
+ }
+
+ tt_uint_op(EVBUFFER_LENGTH(tmp), ==, 0);
+end:
+ evbuffer_free(tmp);
+}
+
+static void
+evtag_fuzz(void *ptr)
+{
+ u_char buffer[4096];
+ struct evbuffer *tmp = evbuffer_new();
+ struct timeval tv;
+ int i, j;
+
+ int not_failed = 0;
+
+ evtag_init();
+
+ for (j = 0; j < 100; j++) {
+ for (i = 0; i < (int)sizeof(buffer); i++)
+ buffer[i] = rand();
+ evbuffer_drain(tmp, -1);
+ evbuffer_add(tmp, buffer, sizeof(buffer));
+
+ if (evtag_unmarshal_timeval(tmp, 0, &tv) != -1)
+ not_failed++;
+ }
+
+ /* The majority of decodes should fail */
+ tt_int_op(not_failed, <, 10);
+
+ /* Now insert some corruption into the tag length field */
+ evbuffer_drain(tmp, -1);
+ evutil_timerclear(&tv);
+ tv.tv_sec = 1;
+ evtag_marshal_timeval(tmp, 0, &tv);
+ evbuffer_add(tmp, buffer, sizeof(buffer));
+
+ ((char *)EVBUFFER_DATA(tmp))[1] = '\xff';
+ if (evtag_unmarshal_timeval(tmp, 0, &tv) != -1) {
+ tt_abort_msg("evtag_unmarshal_timeval should have failed");
+ }
+
+end:
+ evbuffer_free(tmp);
+}
+
+static void
+evtag_tag_encoding(void *ptr)
+{
+ struct evbuffer *tmp = evbuffer_new();
+ ev_uint32_t integers[TEST_MAX_INT] = {
+ 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000
+ };
+ ev_uint32_t integer;
+ int i;
+
+ evtag_init();
+
+ for (i = 0; i < TEST_MAX_INT; i++) {
+ int oldlen, newlen;
+ oldlen = (int)EVBUFFER_LENGTH(tmp);
+ evtag_encode_tag(tmp, integers[i]);
+ newlen = (int)EVBUFFER_LENGTH(tmp);
+ TT_BLATHER(("encoded 0x%08x with %d bytes",
+ (unsigned)integers[i], newlen - oldlen));
+ }
+
+ for (i = 0; i < TEST_MAX_INT; i++) {
+ tt_int_op(evtag_decode_tag(&integer, tmp), !=, -1);
+ tt_uint_op(integer, ==, integers[i]);
+ }
+
+ tt_uint_op(EVBUFFER_LENGTH(tmp), ==, 0);
+
+end:
+ evbuffer_free(tmp);
+}
+
+static void
+evtag_test_peek(void *ptr)
+{
+ struct evbuffer *tmp = evbuffer_new();
+ ev_uint32_t u32;
+
+ evtag_marshal_int(tmp, 30, 0);
+ evtag_marshal_string(tmp, 40, "Hello world");
+
+ tt_int_op(evtag_peek(tmp, &u32), ==, 1);
+ tt_int_op(u32, ==, 30);
+ tt_int_op(evtag_peek_length(tmp, &u32), ==, 0);
+ tt_int_op(u32, ==, 1+1+1);
+ tt_int_op(evtag_consume(tmp), ==, 0);
+
+ tt_int_op(evtag_peek(tmp, &u32), ==, 1);
+ tt_int_op(u32, ==, 40);
+ tt_int_op(evtag_peek_length(tmp, &u32), ==, 0);
+ tt_int_op(u32, ==, 1+1+11);
+ tt_int_op(evtag_payload_length(tmp, &u32), ==, 0);
+ tt_int_op(u32, ==, 11);
+
+end:
+ evbuffer_free(tmp);
+}
+
+
+static void
+test_methods(void *ptr)
+{
+ const char **methods = event_get_supported_methods();
+ struct event_config *cfg = NULL;
+ struct event_base *base = NULL;
+ const char *backend;
+ int n_methods = 0;
+
+ tt_assert(methods);
+
+ backend = methods[0];
+ while (*methods != NULL) {
+ TT_BLATHER(("Support method: %s", *methods));
+ ++methods;
+ ++n_methods;
+ }
+
+ cfg = event_config_new();
+ assert(cfg != NULL);
+
+ tt_int_op(event_config_avoid_method(cfg, backend), ==, 0);
+ event_config_set_flag(cfg, EVENT_BASE_FLAG_IGNORE_ENV);
+
+ base = event_base_new_with_config(cfg);
+ if (n_methods > 1) {
+ tt_assert(base);
+ tt_str_op(backend, !=, event_base_get_method(base));
+ } else {
+ tt_assert(base == NULL);
+ }
+
+end:
+ if (base)
+ event_base_free(base);
+ if (cfg)
+ event_config_free(cfg);
+}
+
+static void
+test_version(void *arg)
+{
+ const char *vstr;
+ ev_uint32_t vint;
+ int major, minor, patch, n;
+
+ vstr = event_get_version();
+ vint = event_get_version_number();
+
+ tt_assert(vstr);
+ tt_assert(vint);
+
+ tt_str_op(vstr, ==, LIBEVENT_VERSION);
+ tt_int_op(vint, ==, LIBEVENT_VERSION_NUMBER);
+
+ n = sscanf(vstr, "%d.%d.%d", &major, &minor, &patch);
+ tt_assert(3 == n);
+ tt_int_op((vint&0xffffff00), ==, ((major<<24)|(minor<<16)|(patch<<8)));
+end:
+ ;
+}
+
+static void
+test_base_features(void *arg)
+{
+ struct event_base *base = NULL;
+ struct event_config *cfg = NULL;
+
+ cfg = event_config_new();
+
+ tt_assert(0 == event_config_require_features(cfg, EV_FEATURE_ET));
+
+ base = event_base_new_with_config(cfg);
+ if (base) {
+ tt_int_op(EV_FEATURE_ET, ==,
+ event_base_get_features(base) & EV_FEATURE_ET);
+ } else {
+ base = event_base_new();
+ tt_int_op(0, ==, event_base_get_features(base) & EV_FEATURE_ET);
+ }
+
+end:
+ if (base)
+ event_base_free(base);
+ if (cfg)
+ event_config_free(cfg);
+}
+
+#ifdef EVENT__HAVE_SETENV
+#define SETENV_OK
+#elif !defined(EVENT__HAVE_SETENV) && defined(EVENT__HAVE_PUTENV)
+static void setenv(const char *k, const char *v, int o_)
+{
+ char b[256];
+ evutil_snprintf(b, sizeof(b), "%s=%s",k,v);
+ putenv(b);
+}
+#define SETENV_OK
+#endif
+
+#ifdef EVENT__HAVE_UNSETENV
+#define UNSETENV_OK
+#elif !defined(EVENT__HAVE_UNSETENV) && defined(EVENT__HAVE_PUTENV)
+static void unsetenv(const char *k)
+{
+ char b[256];
+ evutil_snprintf(b, sizeof(b), "%s=",k);
+ putenv(b);
+}
+#define UNSETENV_OK
+#endif
+
+#if defined(SETENV_OK) && defined(UNSETENV_OK)
+static void
+methodname_to_envvar(const char *mname, char *buf, size_t buflen)
+{
+ char *cp;
+ evutil_snprintf(buf, buflen, "EVENT_NO%s", mname);
+ for (cp = buf; *cp; ++cp) {
+ *cp = EVUTIL_TOUPPER_(*cp);
+ }
+}
+#endif
+
+static void
+test_base_environ(void *arg)
+{
+ struct event_base *base = NULL;
+ struct event_config *cfg = NULL;
+
+#if defined(SETENV_OK) && defined(UNSETENV_OK)
+ const char **basenames;
+ int i, n_methods=0;
+ char varbuf[128];
+ const char *defaultname, *ignoreenvname;
+
+ /* See if unsetenv works before we rely on it. */
+ setenv("EVENT_NOWAFFLES", "1", 1);
+ unsetenv("EVENT_NOWAFFLES");
+ if (getenv("EVENT_NOWAFFLES") != NULL) {
+#ifndef EVENT__HAVE_UNSETENV
+ TT_DECLARE("NOTE", ("Can't fake unsetenv; skipping test"));
+#else
+ TT_DECLARE("NOTE", ("unsetenv doesn't work; skipping test"));
+#endif
+ tt_skip();
+ }
+
+ basenames = event_get_supported_methods();
+ for (i = 0; basenames[i]; ++i) {
+ methodname_to_envvar(basenames[i], varbuf, sizeof(varbuf));
+ unsetenv(varbuf);
+ ++n_methods;
+ }
+
+ base = event_base_new();
+ tt_assert(base);
+
+ defaultname = event_base_get_method(base);
+ TT_BLATHER(("default is <%s>", defaultname));
+ event_base_free(base);
+ base = NULL;
+
+ /* Can we disable the method with EVENT_NOfoo ? */
+ if (!strcmp(defaultname, "epoll (with changelist)")) {
+ setenv("EVENT_NOEPOLL", "1", 1);
+ ignoreenvname = "epoll";
+ } else {
+ methodname_to_envvar(defaultname, varbuf, sizeof(varbuf));
+ setenv(varbuf, "1", 1);
+ ignoreenvname = defaultname;
+ }
+
+ /* Use an empty cfg rather than NULL so a failure doesn't exit() */
+ cfg = event_config_new();
+ base = event_base_new_with_config(cfg);
+ event_config_free(cfg);
+ cfg = NULL;
+ if (n_methods == 1) {
+ tt_assert(!base);
+ } else {
+ tt_assert(base);
+ tt_str_op(defaultname, !=, event_base_get_method(base));
+ event_base_free(base);
+ base = NULL;
+ }
+
+ /* Can we disable looking at the environment with IGNORE_ENV ? */
+ cfg = event_config_new();
+ event_config_set_flag(cfg, EVENT_BASE_FLAG_IGNORE_ENV);
+ base = event_base_new_with_config(cfg);
+ tt_assert(base);
+ tt_str_op(ignoreenvname, ==, event_base_get_method(base));
+#else
+ tt_skip();
+#endif
+
+end:
+ if (base)
+ event_base_free(base);
+ if (cfg)
+ event_config_free(cfg);
+}
+
+static void
+read_called_once_cb(evutil_socket_t fd, short event, void *arg)
+{
+ tt_int_op(event, ==, EV_READ);
+ called += 1;
+end:
+ ;
+}
+
+static void
+timeout_called_once_cb(evutil_socket_t fd, short event, void *arg)
+{
+ tt_int_op(event, ==, EV_TIMEOUT);
+ called += 100;
+end:
+ ;
+}
+
+static void
+immediate_called_twice_cb(evutil_socket_t fd, short event, void *arg)
+{
+ tt_int_op(event, ==, EV_TIMEOUT);
+ called += 1000;
+end:
+ ;
+}
+
+static void
+test_event_once(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct timeval tv;
+ int r;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 50*1000;
+ called = 0;
+ r = event_base_once(data->base, data->pair[0], EV_READ,
+ read_called_once_cb, NULL, NULL);
+ tt_int_op(r, ==, 0);
+ r = event_base_once(data->base, -1, EV_TIMEOUT,
+ timeout_called_once_cb, NULL, &tv);
+ tt_int_op(r, ==, 0);
+ r = event_base_once(data->base, -1, 0, NULL, NULL, NULL);
+ tt_int_op(r, <, 0);
+ r = event_base_once(data->base, -1, EV_TIMEOUT,
+ immediate_called_twice_cb, NULL, NULL);
+ tt_int_op(r, ==, 0);
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ r = event_base_once(data->base, -1, EV_TIMEOUT,
+ immediate_called_twice_cb, NULL, &tv);
+ tt_int_op(r, ==, 0);
+
+ if (write(data->pair[1], TEST1, strlen(TEST1)+1) < 0) {
+ tt_fail_perror("write");
+ }
+
+ shutdown(data->pair[1], SHUT_WR);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(called, ==, 2101);
+end:
+ ;
+}
+
+static void
+test_event_once_never(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct timeval tv;
+
+ /* Have one trigger in 10 seconds (don't worry, because) */
+ tv.tv_sec = 10;
+ tv.tv_usec = 0;
+ called = 0;
+ event_base_once(data->base, -1, EV_TIMEOUT,
+ timeout_called_once_cb, NULL, &tv);
+
+ /* But shut down the base in 75 msec. */
+ tv.tv_sec = 0;
+ tv.tv_usec = 75*1000;
+ event_base_loopexit(data->base, &tv);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(called, ==, 0);
+end:
+ ;
+}
+
+static void
+test_event_pending(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event *r=NULL, *w=NULL, *t=NULL;
+ struct timeval tv, now, tv2;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 500 * 1000;
+ r = event_new(data->base, data->pair[0], EV_READ, simple_read_cb,
+ NULL);
+ w = event_new(data->base, data->pair[1], EV_WRITE, simple_write_cb,
+ NULL);
+ t = evtimer_new(data->base, timeout_cb, NULL);
+
+ tt_assert(r);
+ tt_assert(w);
+ tt_assert(t);
+
+ evutil_gettimeofday(&now, NULL);
+ event_add(r, NULL);
+ event_add(t, &tv);
+
+ tt_assert( event_pending(r, EV_READ, NULL));
+ tt_assert(!event_pending(w, EV_WRITE, NULL));
+ tt_assert(!event_pending(r, EV_WRITE, NULL));
+ tt_assert( event_pending(r, EV_READ|EV_WRITE, NULL));
+ tt_assert(!event_pending(r, EV_TIMEOUT, NULL));
+ tt_assert( event_pending(t, EV_TIMEOUT, NULL));
+ tt_assert( event_pending(t, EV_TIMEOUT, &tv2));
+
+ tt_assert(evutil_timercmp(&tv2, &now, >));
+
+ test_timeval_diff_eq(&now, &tv2, 500);
+
+end:
+ if (r) {
+ event_del(r);
+ event_free(r);
+ }
+ if (w) {
+ event_del(w);
+ event_free(w);
+ }
+ if (t) {
+ event_del(t);
+ event_free(t);
+ }
+}
+
+#ifndef _WIN32
+/* You can't do this test on windows, since dup2 doesn't work on sockets */
+
+static void
+dfd_cb(evutil_socket_t fd, short e, void *data)
+{
+ *(int*)data = (int)e;
+}
+
+/* Regression test for our workaround for a fun epoll/linux related bug
+ * where fd2 = dup(fd1); add(fd2); close(fd2); dup2(fd1,fd2); add(fd2)
+ * will get you an EEXIST */
+static void
+test_dup_fd(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev1=NULL, *ev2=NULL;
+ int fd, dfd=-1;
+ int ev1_got, ev2_got;
+
+ tt_int_op(write(data->pair[0], "Hello world",
+ strlen("Hello world")), >, 0);
+ fd = data->pair[1];
+
+ dfd = dup(fd);
+ tt_int_op(dfd, >=, 0);
+
+ ev1 = event_new(base, fd, EV_READ|EV_PERSIST, dfd_cb, &ev1_got);
+ ev2 = event_new(base, dfd, EV_READ|EV_PERSIST, dfd_cb, &ev2_got);
+ ev1_got = ev2_got = 0;
+ event_add(ev1, NULL);
+ event_add(ev2, NULL);
+ event_base_loop(base, EVLOOP_ONCE);
+ tt_int_op(ev1_got, ==, EV_READ);
+ tt_int_op(ev2_got, ==, EV_READ);
+
+ /* Now close and delete dfd then dispatch. We need to do the
+ * dispatch here so that when we add it later, we think there
+ * was an intermediate delete. */
+ close(dfd);
+ event_del(ev2);
+ ev1_got = ev2_got = 0;
+ event_base_loop(base, EVLOOP_ONCE);
+ tt_want_int_op(ev1_got, ==, EV_READ);
+ tt_int_op(ev2_got, ==, 0);
+
+ /* Re-duplicate the fd. We need to get the same duplicated
+ * value that we closed to provoke the epoll quirk. Also, we
+ * need to change the events to write, or else the old lingering
+ * read event will make the test pass whether the change was
+ * successful or not. */
+ tt_int_op(dup2(fd, dfd), ==, dfd);
+ event_free(ev2);
+ ev2 = event_new(base, dfd, EV_WRITE|EV_PERSIST, dfd_cb, &ev2_got);
+ event_add(ev2, NULL);
+ ev1_got = ev2_got = 0;
+ event_base_loop(base, EVLOOP_ONCE);
+ tt_want_int_op(ev1_got, ==, EV_READ);
+ tt_int_op(ev2_got, ==, EV_WRITE);
+
+end:
+ if (ev1)
+ event_free(ev1);
+ if (ev2)
+ event_free(ev2);
+ if (dfd >= 0)
+ close(dfd);
+}
+#endif
+
+#ifdef EVENT__DISABLE_MM_REPLACEMENT
+static void
+test_mm_functions(void *arg)
+{
+ tinytest_set_test_skipped_();
+}
+#else
+static int
+check_dummy_mem_ok(void *mem_)
+{
+ char *mem = mem_;
+ mem -= 16;
+ return !memcmp(mem, "{[<guardedram>]}", 16);
+}
+
+static void *
+dummy_malloc(size_t len)
+{
+ char *mem = malloc(len+16);
+ memcpy(mem, "{[<guardedram>]}", 16);
+ return mem+16;
+}
+
+static void *
+dummy_realloc(void *mem_, size_t len)
+{
+ char *mem = mem_;
+ if (!mem)
+ return dummy_malloc(len);
+ tt_want(check_dummy_mem_ok(mem_));
+ mem -= 16;
+ mem = realloc(mem, len+16);
+ return mem+16;
+}
+
+static void
+dummy_free(void *mem_)
+{
+ char *mem = mem_;
+ tt_want(check_dummy_mem_ok(mem_));
+ mem -= 16;
+ free(mem);
+}
+
+static void
+test_mm_functions(void *arg)
+{
+ struct event_base *b = NULL;
+ struct event_config *cfg = NULL;
+ event_set_mem_functions(dummy_malloc, dummy_realloc, dummy_free);
+ cfg = event_config_new();
+ event_config_avoid_method(cfg, "Nonesuch");
+ b = event_base_new_with_config(cfg);
+ tt_assert(b);
+ tt_assert(check_dummy_mem_ok(b));
+end:
+ if (cfg)
+ event_config_free(cfg);
+ if (b)
+ event_base_free(b);
+}
+#endif
+
+static void
+many_event_cb(evutil_socket_t fd, short event, void *arg)
+{
+ int *calledp = arg;
+ *calledp += 1;
+}
+
+static void
+test_many_events(void *arg)
+{
+ /* Try 70 events that should all be ready at once. This will
+ * exercise the "resize" code on most of the backends, and will make
+ * sure that we can get past the 64-handle limit of some windows
+ * functions. */
+#define MANY 70
+
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ int one_at_a_time = data->setup_data != NULL;
+ evutil_socket_t sock[MANY];
+ struct event *ev[MANY];
+ int called[MANY];
+ int i;
+ int loopflags = EVLOOP_NONBLOCK, evflags=0;
+ if (one_at_a_time) {
+ loopflags |= EVLOOP_ONCE;
+ evflags = EV_PERSIST;
+ }
+
+ memset(sock, 0xff, sizeof(sock));
+ memset(ev, 0, sizeof(ev));
+ memset(called, 0, sizeof(called));
+
+ for (i = 0; i < MANY; ++i) {
+ /* We need an event that will hit the backend, and that will
+ * be ready immediately. "Send a datagram" is an easy
+ * instance of that. */
+ sock[i] = socket(AF_INET, SOCK_DGRAM, 0);
+ tt_assert(sock[i] >= 0);
+ called[i] = 0;
+ ev[i] = event_new(base, sock[i], EV_WRITE|evflags,
+ many_event_cb, &called[i]);
+ event_add(ev[i], NULL);
+ if (one_at_a_time)
+ event_base_loop(base, EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ }
+
+ event_base_loop(base, loopflags);
+
+ for (i = 0; i < MANY; ++i) {
+ if (one_at_a_time)
+ tt_int_op(called[i], ==, MANY - i + 1);
+ else
+ tt_int_op(called[i], ==, 1);
+ }
+
+end:
+ for (i = 0; i < MANY; ++i) {
+ if (ev[i])
+ event_free(ev[i]);
+ if (sock[i] >= 0)
+ evutil_closesocket(sock[i]);
+ }
+#undef MANY
+}
+
+static void
+test_struct_event_size(void *arg)
+{
+ tt_int_op(event_get_struct_event_size(), <=, sizeof(struct event));
+end:
+ ;
+}
+
+static void
+test_get_assignment(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev1 = NULL;
+ const char *str = "foo";
+
+ struct event_base *b;
+ evutil_socket_t s;
+ short what;
+ event_callback_fn cb;
+ void *cb_arg;
+
+ ev1 = event_new(base, data->pair[1], EV_READ, dummy_read_cb, (void*)str);
+ event_get_assignment(ev1, &b, &s, &what, &cb, &cb_arg);
+
+ tt_ptr_op(b, ==, base);
+ tt_int_op(s, ==, data->pair[1]);
+ tt_int_op(what, ==, EV_READ);
+ tt_ptr_op(cb, ==, dummy_read_cb);
+ tt_ptr_op(cb_arg, ==, str);
+
+ /* Now make sure this doesn't crash. */
+ event_get_assignment(ev1, NULL, NULL, NULL, NULL, NULL);
+
+end:
+ if (ev1)
+ event_free(ev1);
+}
+
+struct foreach_helper {
+ int count;
+ const struct event *ev;
+};
+
+static int
+foreach_count_cb(const struct event_base *base, const struct event *ev, void *arg)
+{
+ struct foreach_helper *h = event_get_callback_arg(ev);
+ struct timeval *tv = arg;
+ if (event_get_callback(ev) != timeout_cb)
+ return 0;
+ tt_ptr_op(event_get_base(ev), ==, base);
+ tt_int_op(tv->tv_sec, ==, 10);
+ h->ev = ev;
+ h->count++;
+ return 0;
+end:
+ return -1;
+}
+
+static int
+foreach_find_cb(const struct event_base *base, const struct event *ev, void *arg)
+{
+ const struct event **ev_out = arg;
+ struct foreach_helper *h = event_get_callback_arg(ev);
+ if (event_get_callback(ev) != timeout_cb)
+ return 0;
+ if (h->count == 99) {
+ *ev_out = ev;
+ return 101;
+ }
+ return 0;
+}
+
+static void
+test_event_foreach(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev[5];
+ struct foreach_helper visited[5];
+ int i;
+ struct timeval ten_sec = {10,0};
+ const struct event *ev_found = NULL;
+
+ for (i = 0; i < 5; ++i) {
+ visited[i].count = 0;
+ visited[i].ev = NULL;
+ ev[i] = event_new(base, -1, 0, timeout_cb, &visited[i]);
+ }
+
+ tt_int_op(-1, ==, event_base_foreach_event(NULL, foreach_count_cb, NULL));
+ tt_int_op(-1, ==, event_base_foreach_event(base, NULL, NULL));
+
+ event_add(ev[0], &ten_sec);
+ event_add(ev[1], &ten_sec);
+ event_active(ev[1], EV_TIMEOUT, 1);
+ event_active(ev[2], EV_TIMEOUT, 1);
+ event_add(ev[3], &ten_sec);
+ /* Don't touch ev[4]. */
+
+ tt_int_op(0, ==, event_base_foreach_event(base, foreach_count_cb,
+ &ten_sec));
+ tt_int_op(1, ==, visited[0].count);
+ tt_int_op(1, ==, visited[1].count);
+ tt_int_op(1, ==, visited[2].count);
+ tt_int_op(1, ==, visited[3].count);
+ tt_ptr_op(ev[0], ==, visited[0].ev);
+ tt_ptr_op(ev[1], ==, visited[1].ev);
+ tt_ptr_op(ev[2], ==, visited[2].ev);
+ tt_ptr_op(ev[3], ==, visited[3].ev);
+
+ visited[2].count = 99;
+ tt_int_op(101, ==, event_base_foreach_event(base, foreach_find_cb,
+ &ev_found));
+ tt_ptr_op(ev_found, ==, ev[2]);
+
+end:
+ for (i=0; i<5; ++i) {
+ event_free(ev[i]);
+ }
+}
+
+static struct event_base *cached_time_base = NULL;
+static int cached_time_reset = 0;
+static int cached_time_sleep = 0;
+static void
+cache_time_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct timeval *tv = arg;
+ tt_int_op(0, ==, event_base_gettimeofday_cached(cached_time_base, tv));
+ if (cached_time_sleep) {
+ struct timeval delay = { 0, 30*1000 };
+ evutil_usleep_(&delay);
+ }
+ if (cached_time_reset) {
+ event_base_update_cache_time(cached_time_base);
+ }
+end:
+ ;
+}
+
+static void
+test_gettimeofday_cached(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_config *cfg = NULL;
+ struct event_base *base = NULL;
+ struct timeval tv1, tv2, tv3, now;
+ struct event *ev1=NULL, *ev2=NULL, *ev3=NULL;
+ int cached_time_disable = strstr(data->setup_data, "disable") != NULL;
+
+ cfg = event_config_new();
+ if (cached_time_disable) {
+ event_config_set_flag(cfg, EVENT_BASE_FLAG_NO_CACHE_TIME);
+ }
+ cached_time_base = base = event_base_new_with_config(cfg);
+ tt_assert(base);
+
+ /* Try gettimeofday_cached outside of an event loop. */
+ evutil_gettimeofday(&now, NULL);
+ tt_int_op(0, ==, event_base_gettimeofday_cached(NULL, &tv1));
+ tt_int_op(0, ==, event_base_gettimeofday_cached(base, &tv2));
+ tt_int_op(timeval_msec_diff(&tv1, &tv2), <, 10);
+ tt_int_op(timeval_msec_diff(&tv1, &now), <, 10);
+
+ cached_time_reset = strstr(data->setup_data, "reset") != NULL;
+ cached_time_sleep = strstr(data->setup_data, "sleep") != NULL;
+
+ ev1 = event_new(base, -1, 0, cache_time_cb, &tv1);
+ ev2 = event_new(base, -1, 0, cache_time_cb, &tv2);
+ ev3 = event_new(base, -1, 0, cache_time_cb, &tv3);
+
+ event_active(ev1, EV_TIMEOUT, 1);
+ event_active(ev2, EV_TIMEOUT, 1);
+ event_active(ev3, EV_TIMEOUT, 1);
+
+ event_base_dispatch(base);
+
+ if (cached_time_reset && cached_time_sleep) {
+ tt_int_op(labs(timeval_msec_diff(&tv1,&tv2)), >, 10);
+ tt_int_op(labs(timeval_msec_diff(&tv2,&tv3)), >, 10);
+ } else if (cached_time_disable && cached_time_sleep) {
+ tt_int_op(labs(timeval_msec_diff(&tv1,&tv2)), >, 10);
+ tt_int_op(labs(timeval_msec_diff(&tv2,&tv3)), >, 10);
+ } else if (! cached_time_disable) {
+ tt_assert(evutil_timercmp(&tv1, &tv2, ==));
+ tt_assert(evutil_timercmp(&tv2, &tv3, ==));
+ }
+
+end:
+ if (ev1)
+ event_free(ev1);
+ if (ev2)
+ event_free(ev2);
+ if (ev3)
+ event_free(ev3);
+ if (base)
+ event_base_free(base);
+ if (cfg)
+ event_config_free(cfg);
+}
+
+static void
+tabf_cb(evutil_socket_t fd, short what, void *arg)
+{
+ int *ptr = arg;
+ *ptr = what;
+ *ptr += 0x10000;
+}
+
+static void
+test_active_by_fd(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct event *ev1 = NULL, *ev2 = NULL, *ev3 = NULL, *ev4 = NULL;
+ int e1,e2,e3,e4;
+#ifndef _WIN32
+ struct event *evsig = NULL;
+ int es;
+#endif
+ struct timeval tenmin = { 600, 0 };
+
+ /* Ensure no crash on nonexistent FD. */
+ event_base_active_by_fd(base, 1000, EV_READ);
+
+ /* Ensure no crash on bogus FD. */
+ event_base_active_by_fd(base, -1, EV_READ);
+
+ /* Ensure no crash on nonexistent/bogus signal. */
+ event_base_active_by_signal(base, 1000);
+ event_base_active_by_signal(base, -1);
+
+ event_base_assert_ok_(base);
+
+ e1 = e2 = e3 = e4 = 0;
+ ev1 = event_new(base, data->pair[0], EV_READ, tabf_cb, &e1);
+ ev2 = event_new(base, data->pair[0], EV_WRITE, tabf_cb, &e2);
+ ev3 = event_new(base, data->pair[1], EV_READ, tabf_cb, &e3);
+ ev4 = event_new(base, data->pair[1], EV_READ, tabf_cb, &e4);
+ tt_assert(ev1);
+ tt_assert(ev2);
+ tt_assert(ev3);
+ tt_assert(ev4);
+#ifndef _WIN32
+ evsig = event_new(base, SIGHUP, EV_SIGNAL, tabf_cb, &es);
+ tt_assert(evsig);
+ event_add(evsig, &tenmin);
+#endif
+
+ event_add(ev1, &tenmin);
+ event_add(ev2, NULL);
+ event_add(ev3, NULL);
+ event_add(ev4, &tenmin);
+
+
+ event_base_assert_ok_(base);
+
+ /* Trigger 2, 3, 4 */
+ event_base_active_by_fd(base, data->pair[0], EV_WRITE);
+ event_base_active_by_fd(base, data->pair[1], EV_READ);
+#ifndef _WIN32
+ event_base_active_by_signal(base, SIGHUP);
+#endif
+
+ event_base_assert_ok_(base);
+
+ event_base_loop(base, EVLOOP_ONCE);
+
+ tt_int_op(e1, ==, 0);
+ tt_int_op(e2, ==, EV_WRITE | 0x10000);
+ tt_int_op(e3, ==, EV_READ | 0x10000);
+ /* Mask out EV_WRITE here, since it could be genuinely writeable. */
+ tt_int_op((e4 & ~EV_WRITE), ==, EV_READ | 0x10000);
+#ifndef _WIN32
+ tt_int_op(es, ==, EV_SIGNAL | 0x10000);
+#endif
+
+end:
+ if (ev1)
+ event_free(ev1);
+ if (ev2)
+ event_free(ev2);
+ if (ev3)
+ event_free(ev3);
+ if (ev4)
+ event_free(ev4);
+#ifndef _WIN32
+ if (evsig)
+ event_free(evsig);
+#endif
+}
+
+struct testcase_t main_testcases[] = {
+ /* Some converted-over tests */
+ { "methods", test_methods, TT_FORK, NULL, NULL },
+ { "version", test_version, 0, NULL, NULL },
+ BASIC(base_features, TT_FORK|TT_NO_LOGS),
+ { "base_environ", test_base_environ, TT_FORK, NULL, NULL },
+
+ BASIC(event_base_new, TT_FORK|TT_NEED_SOCKETPAIR),
+ BASIC(free_active_base, TT_FORK|TT_NEED_SOCKETPAIR),
+
+ BASIC(manipulate_active_events, TT_FORK|TT_NEED_BASE),
+ BASIC(event_new_selfarg, TT_FORK|TT_NEED_BASE),
+ BASIC(event_assign_selfarg, TT_FORK|TT_NEED_BASE),
+ BASIC(event_base_get_num_events, TT_FORK|TT_NEED_BASE),
+ BASIC(event_base_get_max_events, TT_FORK|TT_NEED_BASE),
+
+ BASIC(bad_assign, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
+ BASIC(bad_reentrant, TT_FORK|TT_NEED_BASE|TT_NO_LOGS),
+ BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
+ BASIC(event_remove_timeout, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
+
+ /* These are still using the old API */
+ LEGACY(persistent_timeout, TT_FORK|TT_NEED_BASE),
+ { "persistent_timeout_jump", test_persistent_timeout_jump, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "persistent_active_timeout", test_persistent_active_timeout,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ LEGACY(priorities, TT_FORK|TT_NEED_BASE),
+ BASIC(priority_active_inversion, TT_FORK|TT_NEED_BASE),
+ { "common_timeout", test_common_timeout, TT_FORK|TT_NEED_BASE,
+ &basic_setup, NULL },
+
+ /* These legacy tests may not all need all of these flags. */
+ LEGACY(simpleread, TT_ISOLATED),
+ LEGACY(simpleread_multiple, TT_ISOLATED),
+ LEGACY(simplewrite, TT_ISOLATED),
+ { "simpleclose", test_simpleclose, TT_FORK, &basic_setup,
+ NULL },
+ LEGACY(multiple, TT_ISOLATED),
+ LEGACY(persistent, TT_ISOLATED),
+ LEGACY(combined, TT_ISOLATED),
+ LEGACY(simpletimeout, TT_ISOLATED),
+ LEGACY(loopbreak, TT_ISOLATED),
+ LEGACY(loopexit, TT_ISOLATED),
+ LEGACY(loopexit_multiple, TT_ISOLATED),
+ LEGACY(nonpersist_readd, TT_ISOLATED),
+ LEGACY(multiple_events_for_same_fd, TT_ISOLATED),
+ LEGACY(want_only_once, TT_ISOLATED),
+ { "event_once", test_event_once, TT_ISOLATED, &basic_setup, NULL },
+ { "event_once_never", test_event_once_never, TT_ISOLATED, &basic_setup, NULL },
+ { "event_pending", test_event_pending, TT_ISOLATED, &basic_setup,
+ NULL },
+#ifndef _WIN32
+ { "dup_fd", test_dup_fd, TT_ISOLATED, &basic_setup, NULL },
+#endif
+ { "mm_functions", test_mm_functions, TT_FORK, NULL, NULL },
+ { "many_events", test_many_events, TT_ISOLATED, &basic_setup, NULL },
+ { "many_events_slow_add", test_many_events, TT_ISOLATED, &basic_setup, (void*)1 },
+
+ { "struct_event_size", test_struct_event_size, 0, NULL, NULL },
+ BASIC(get_assignment, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
+
+ BASIC(event_foreach, TT_FORK|TT_NEED_BASE),
+ { "gettimeofday_cached", test_gettimeofday_cached, TT_FORK, &basic_setup, (void*)"" },
+ { "gettimeofday_cached_sleep", test_gettimeofday_cached, TT_FORK, &basic_setup, (void*)"sleep" },
+ { "gettimeofday_cached_reset", test_gettimeofday_cached, TT_FORK, &basic_setup, (void*)"sleep reset" },
+ { "gettimeofday_cached_disabled", test_gettimeofday_cached, TT_FORK, &basic_setup, (void*)"sleep disable" },
+ { "gettimeofday_cached_disabled_nosleep", test_gettimeofday_cached, TT_FORK, &basic_setup, (void*)"disable" },
+
+ BASIC(active_by_fd, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR),
+
+#ifndef _WIN32
+ LEGACY(fork, TT_ISOLATED),
+#endif
+ END_OF_TESTCASES
+};
+
+struct testcase_t evtag_testcases[] = {
+ { "int", evtag_int_test, TT_FORK, NULL, NULL },
+ { "fuzz", evtag_fuzz, TT_FORK, NULL, NULL },
+ { "encoding", evtag_tag_encoding, TT_FORK, NULL, NULL },
+ { "peek", evtag_test_peek, 0, NULL, NULL },
+
+ END_OF_TESTCASES
+};
+
+struct testcase_t signal_testcases[] = {
+#ifndef _WIN32
+ LEGACY(simplesignal, TT_ISOLATED),
+ LEGACY(multiplesignal, TT_ISOLATED),
+ LEGACY(immediatesignal, TT_ISOLATED),
+ LEGACY(signal_dealloc, TT_ISOLATED),
+ LEGACY(signal_pipeloss, TT_ISOLATED),
+ LEGACY(signal_switchbase, TT_ISOLATED|TT_NO_LOGS),
+ LEGACY(signal_restore, TT_ISOLATED),
+ LEGACY(signal_assert, TT_ISOLATED),
+ LEGACY(signal_while_processing, TT_ISOLATED),
+#endif
+ END_OF_TESTCASES
+};
+
diff --git a/sntp/libevent/test/regress.gen.c b/sntp/libevent/test/regress.gen.c
new file mode 100644
index 000000000000..8d1c8b69c3fc
--- /dev/null
+++ b/sntp/libevent/test/regress.gen.c
@@ -0,0 +1 @@
+
diff --git a/sntp/libevent/test/regress.gen.h b/sntp/libevent/test/regress.gen.h
new file mode 100644
index 000000000000..7130984dbc75
--- /dev/null
+++ b/sntp/libevent/test/regress.gen.h
@@ -0,0 +1 @@
+#define NO_PYTHON_EXISTS
diff --git a/sntp/libevent/test/regress.h b/sntp/libevent/test/regress.h
new file mode 100644
index 000000000000..a9892b0ef7c8
--- /dev/null
+++ b/sntp/libevent/test/regress.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 REGRESS_H_INCLUDED_
+#define REGRESS_H_INCLUDED_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+extern struct testcase_t main_testcases[];
+extern struct testcase_t evtag_testcases[];
+extern struct testcase_t evbuffer_testcases[];
+extern struct testcase_t finalize_testcases[];
+extern struct testcase_t bufferevent_testcases[];
+extern struct testcase_t bufferevent_iocp_testcases[];
+extern struct testcase_t util_testcases[];
+extern struct testcase_t signal_testcases[];
+extern struct testcase_t http_testcases[];
+extern struct testcase_t dns_testcases[];
+extern struct testcase_t rpc_testcases[];
+extern struct testcase_t edgetriggered_testcases[];
+extern struct testcase_t minheap_testcases[];
+extern struct testcase_t iocp_testcases[];
+extern struct testcase_t ssl_testcases[];
+extern struct testcase_t listener_testcases[];
+extern struct testcase_t listener_iocp_testcases[];
+extern struct testcase_t thread_testcases[];
+
+void regress_threads(void *);
+void test_bufferevent_zlib(void *);
+
+/* Helpers to wrap old testcases */
+extern evutil_socket_t pair[2];
+extern int test_ok;
+extern int called;
+extern struct event_base *global_base;
+extern int in_legacy_test_wrapper;
+
+int regress_make_tmpfile(const void *data, size_t datalen, char **filename_out);
+
+struct basic_test_data {
+ struct event_base *base;
+ evutil_socket_t pair[2];
+
+ void (*legacy_test_fn)(void);
+
+ void *setup_data;
+};
+extern const struct testcase_setup_t basic_setup;
+
+
+extern const struct testcase_setup_t legacy_setup;
+void run_legacy_test_fn(void *ptr);
+
+extern int libevent_tests_running_in_debug_mode;
+
+/* A couple of flags that basic/legacy_setup can support. */
+#define TT_NEED_SOCKETPAIR TT_FIRST_USER_FLAG
+#define TT_NEED_BASE (TT_FIRST_USER_FLAG<<1)
+#define TT_NEED_DNS (TT_FIRST_USER_FLAG<<2)
+#define TT_LEGACY (TT_FIRST_USER_FLAG<<3)
+#define TT_NEED_THREADS (TT_FIRST_USER_FLAG<<4)
+#define TT_NO_LOGS (TT_FIRST_USER_FLAG<<5)
+#define TT_ENABLE_IOCP_FLAG (TT_FIRST_USER_FLAG<<6)
+#define TT_ENABLE_IOCP (TT_ENABLE_IOCP_FLAG|TT_NEED_THREADS)
+
+/* All the flags that a legacy test needs. */
+#define TT_ISOLATED TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_BASE
+
+
+#define BASIC(name,flags) \
+ { #name, test_## name, flags, &basic_setup, NULL }
+
+#define LEGACY(name,flags) \
+ { #name, run_legacy_test_fn, flags|TT_LEGACY, &legacy_setup, \
+ test_## name }
+
+struct evutil_addrinfo;
+struct evutil_addrinfo *ai_find_by_family(struct evutil_addrinfo *ai, int f);
+struct evutil_addrinfo *ai_find_by_protocol(struct evutil_addrinfo *ai, int p);
+int test_ai_eq_(const struct evutil_addrinfo *ai, const char *sockaddr_port,
+ int socktype, int protocol, int line);
+
+#define test_ai_eq(ai, str, s, p) do { \
+ if (test_ai_eq_((ai), (str), (s), (p), __LINE__)<0) \
+ goto end; \
+ } while (0)
+
+#define test_timeval_diff_leq(tv1, tv2, diff, tolerance) \
+ tt_int_op(abs(timeval_msec_diff((tv1), (tv2)) - diff), <=, tolerance)
+
+#define test_timeval_diff_eq(tv1, tv2, diff) \
+ test_timeval_diff_leq((tv1), (tv2), (diff), 50)
+
+long timeval_msec_diff(const struct timeval *start, const struct timeval *end);
+
+#ifndef _WIN32
+pid_t regress_fork(void);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* REGRESS_H_INCLUDED_ */
diff --git a/sntp/libevent/test/regress.rpc b/sntp/libevent/test/regress.rpc
new file mode 100644
index 000000000000..0ee904e9139f
--- /dev/null
+++ b/sntp/libevent/test/regress.rpc
@@ -0,0 +1,25 @@
+/* tests data packing and unpacking */
+
+struct msg {
+ string /* sender */ from_name = 1; /* be verbose */
+ string to_name = 2;
+ optional struct[kill] attack = 3;
+ array struct[run] run = 4;
+}
+
+struct kill {
+ string weapon = 0x10121;
+ string action = 2;
+ array int how_often = 3;
+}
+
+struct run {
+ string how = 1;
+ optional bytes some_bytes = 2;
+
+ bytes fixed_bytes[24] = 3;
+ array string notes = 4;
+
+ optional int64 large_number = 5;
+ array int other_numbers = 6;
+}
diff --git a/sntp/libevent/test/regress_buffer.c b/sntp/libevent/test/regress_buffer.c
new file mode 100644
index 000000000000..ccb14870a5be
--- /dev/null
+++ b/sntp/libevent/test/regress_buffer.c
@@ -0,0 +1,2240 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "event2/event.h"
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/util.h"
+
+#include "defer-internal.h"
+#include "evbuffer-internal.h"
+#include "log-internal.h"
+
+#include "regress.h"
+
+/* Validates that an evbuffer is good. Returns false if it isn't, true if it
+ * is*/
+static int
+evbuffer_validate_(struct evbuffer *buf)
+{
+ struct evbuffer_chain *chain;
+ size_t sum = 0;
+ int found_last_with_datap = 0;
+
+ if (buf->first == NULL) {
+ tt_assert(buf->last == NULL);
+ tt_assert(buf->total_len == 0);
+ }
+
+ chain = buf->first;
+
+ tt_assert(buf->last_with_datap);
+ if (buf->last_with_datap == &buf->first)
+ found_last_with_datap = 1;
+
+ while (chain != NULL) {
+ if (&chain->next == buf->last_with_datap)
+ found_last_with_datap = 1;
+ sum += chain->off;
+ if (chain->next == NULL) {
+ tt_assert(buf->last == chain);
+ }
+ tt_assert(chain->buffer_len >= chain->misalign + chain->off);
+ chain = chain->next;
+ }
+
+ if (buf->first)
+ tt_assert(*buf->last_with_datap);
+
+ if (*buf->last_with_datap) {
+ chain = *buf->last_with_datap;
+ if (chain->off == 0 || buf->total_len == 0) {
+ tt_assert(chain->off == 0)
+ tt_assert(chain == buf->first);
+ tt_assert(buf->total_len == 0);
+ }
+ chain = chain->next;
+ while (chain != NULL) {
+ tt_assert(chain->off == 0);
+ chain = chain->next;
+ }
+ } else {
+ tt_assert(buf->last_with_datap == &buf->first);
+ }
+ tt_assert(found_last_with_datap);
+
+ tt_assert(sum == buf->total_len);
+ return 1;
+ end:
+ return 0;
+}
+
+static void
+evbuffer_get_waste(struct evbuffer *buf, size_t *allocatedp, size_t *wastedp, size_t *usedp)
+{
+ struct evbuffer_chain *chain;
+ size_t a, w, u;
+ int n = 0;
+ u = a = w = 0;
+
+ chain = buf->first;
+ /* skip empty at start */
+ while (chain && chain->off==0) {
+ ++n;
+ a += chain->buffer_len;
+ chain = chain->next;
+ }
+ /* first nonempty chain: stuff at the end only is wasted. */
+ if (chain) {
+ ++n;
+ a += chain->buffer_len;
+ u += chain->off;
+ if (chain->next && chain->next->off)
+ w += (size_t)(chain->buffer_len - (chain->misalign + chain->off));
+ chain = chain->next;
+ }
+ /* subsequent nonempty chains */
+ while (chain && chain->off) {
+ ++n;
+ a += chain->buffer_len;
+ w += (size_t)chain->misalign;
+ u += chain->off;
+ if (chain->next && chain->next->off)
+ w += (size_t) (chain->buffer_len - (chain->misalign + chain->off));
+ chain = chain->next;
+ }
+ /* subsequent empty chains */
+ while (chain) {
+ ++n;
+ a += chain->buffer_len;
+ }
+ *allocatedp = a;
+ *wastedp = w;
+ *usedp = u;
+}
+
+#define evbuffer_validate(buf) \
+ TT_STMT_BEGIN if (!evbuffer_validate_(buf)) TT_DIE(("Buffer format invalid")); TT_STMT_END
+
+static void
+test_evbuffer(void *ptr)
+{
+ static char buffer[512], *tmp;
+ struct evbuffer *evb = evbuffer_new();
+ struct evbuffer *evb_two = evbuffer_new();
+ size_t sz_tmp;
+ int i;
+
+ evbuffer_validate(evb);
+ evbuffer_add_printf(evb, "%s/%d", "hello", 1);
+ evbuffer_validate(evb);
+
+ tt_assert(evbuffer_get_length(evb) == 7);
+ tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "hello/1", 1));
+
+ evbuffer_add_buffer(evb, evb_two);
+ evbuffer_validate(evb);
+
+ evbuffer_drain(evb, strlen("hello/"));
+ evbuffer_validate(evb);
+ tt_assert(evbuffer_get_length(evb) == 1);
+ tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1", 1));
+
+ evbuffer_add_printf(evb_two, "%s", "/hello");
+ evbuffer_validate(evb);
+ evbuffer_add_buffer(evb, evb_two);
+ evbuffer_validate(evb);
+
+ tt_assert(evbuffer_get_length(evb_two) == 0);
+ tt_assert(evbuffer_get_length(evb) == 7);
+ tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0);
+
+ memset(buffer, 0, sizeof(buffer));
+ evbuffer_add(evb, buffer, sizeof(buffer));
+ evbuffer_validate(evb);
+ tt_assert(evbuffer_get_length(evb) == 7 + 512);
+
+ tmp = (char *)evbuffer_pullup(evb, 7 + 512);
+ tt_assert(tmp);
+ tt_assert(!strncmp(tmp, "1/hello", 7));
+ tt_assert(!memcmp(tmp + 7, buffer, sizeof(buffer)));
+ evbuffer_validate(evb);
+
+ evbuffer_prepend(evb, "something", 9);
+ evbuffer_validate(evb);
+ evbuffer_prepend(evb, "else", 4);
+ evbuffer_validate(evb);
+
+ tmp = (char *)evbuffer_pullup(evb, 4 + 9 + 7);
+ tt_assert(!strncmp(tmp, "elsesomething1/hello", 4 + 9 + 7));
+ evbuffer_validate(evb);
+
+ evbuffer_drain(evb, -1);
+ evbuffer_validate(evb);
+ evbuffer_drain(evb_two, -1);
+ evbuffer_validate(evb);
+
+ for (i = 0; i < 3; ++i) {
+ evbuffer_add(evb_two, buffer, sizeof(buffer));
+ evbuffer_validate(evb_two);
+ evbuffer_add_buffer(evb, evb_two);
+ evbuffer_validate(evb);
+ evbuffer_validate(evb_two);
+ }
+
+ tt_assert(evbuffer_get_length(evb_two) == 0);
+ tt_assert(evbuffer_get_length(evb) == i * sizeof(buffer));
+
+ /* test remove buffer */
+ sz_tmp = (size_t)(sizeof(buffer)*2.5);
+ evbuffer_remove_buffer(evb, evb_two, sz_tmp);
+ tt_assert(evbuffer_get_length(evb_two) == sz_tmp);
+ tt_assert(evbuffer_get_length(evb) == sizeof(buffer) / 2);
+ evbuffer_validate(evb);
+
+ if (memcmp(evbuffer_pullup(
+ evb, -1), buffer, sizeof(buffer) / 2) != 0 ||
+ memcmp(evbuffer_pullup(
+ evb_two, -1), buffer, sizeof(buffer) != 0))
+ tt_abort_msg("Pullup did not preserve content");
+
+ evbuffer_validate(evb);
+
+
+ /* testing one-vector reserve and commit */
+ {
+ struct evbuffer_iovec v[1];
+ char *buf;
+ int i, j, r;
+
+ for (i = 0; i < 3; ++i) {
+ r = evbuffer_reserve_space(evb, 10000, v, 1);
+ tt_int_op(r, ==, 1);
+ tt_assert(v[0].iov_len >= 10000);
+ tt_assert(v[0].iov_base != NULL);
+
+ evbuffer_validate(evb);
+ buf = v[0].iov_base;
+ for (j = 0; j < 10000; ++j) {
+ buf[j] = j;
+ }
+ evbuffer_validate(evb);
+
+ tt_int_op(evbuffer_commit_space(evb, v, 1), ==, 0);
+ evbuffer_validate(evb);
+
+ tt_assert(evbuffer_get_length(evb) >= 10000);
+
+ evbuffer_drain(evb, j * 5000);
+ evbuffer_validate(evb);
+ }
+ }
+
+ end:
+ evbuffer_free(evb);
+ evbuffer_free(evb_two);
+}
+
+static void
+no_cleanup(const void *data, size_t datalen, void *extra)
+{
+}
+
+static void
+test_evbuffer_remove_buffer_with_empty(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ char buf[2];
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ /* setup the buffers */
+ /* we need more data in src than we will move later */
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ evbuffer_add_reference(src, buf, sizeof(buf), no_cleanup, NULL);
+ /* we need one buffer in dst and one empty buffer at the end */
+ evbuffer_add(dst, buf, sizeof(buf));
+ evbuffer_add_reference(dst, buf, 0, no_cleanup, NULL);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ /* move three bytes over */
+ evbuffer_remove_buffer(src, dst, 3);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+end:
+ evbuffer_free(src);
+ evbuffer_free(dst);
+}
+
+static void
+test_evbuffer_reserve2(void *ptr)
+{
+ /* Test the two-vector cases of reserve/commit. */
+ struct evbuffer *buf = evbuffer_new();
+ int n, i;
+ struct evbuffer_iovec v[2];
+ size_t remaining;
+ char *cp, *cp2;
+
+ /* First chunk will necessarily be one chunk. Use 512 bytes of it.*/
+ n = evbuffer_reserve_space(buf, 1024, v, 2);
+ tt_int_op(n, ==, 1);
+ tt_int_op(evbuffer_get_length(buf), ==, 0);
+ tt_assert(v[0].iov_base != NULL);
+ tt_int_op(v[0].iov_len, >=, 1024);
+ memset(v[0].iov_base, 'X', 512);
+ cp = v[0].iov_base;
+ remaining = v[0].iov_len - 512;
+ v[0].iov_len = 512;
+ evbuffer_validate(buf);
+ tt_int_op(0, ==, evbuffer_commit_space(buf, v, 1));
+ tt_int_op(evbuffer_get_length(buf), ==, 512);
+ evbuffer_validate(buf);
+
+ /* Ask for another same-chunk request, in an existing chunk. Use 8
+ * bytes of it. */
+ n = evbuffer_reserve_space(buf, 32, v, 2);
+ tt_int_op(n, ==, 1);
+ tt_assert(cp + 512 == v[0].iov_base);
+ tt_int_op(remaining, ==, v[0].iov_len);
+ memset(v[0].iov_base, 'Y', 8);
+ v[0].iov_len = 8;
+ tt_int_op(0, ==, evbuffer_commit_space(buf, v, 1));
+ tt_int_op(evbuffer_get_length(buf), ==, 520);
+ remaining -= 8;
+ evbuffer_validate(buf);
+
+ /* Now ask for a request that will be split. Use only one byte of it,
+ though. */
+ n = evbuffer_reserve_space(buf, remaining+64, v, 2);
+ tt_int_op(n, ==, 2);
+ tt_assert(cp + 520 == v[0].iov_base);
+ tt_int_op(remaining, ==, v[0].iov_len);
+ tt_assert(v[1].iov_base);
+ tt_assert(v[1].iov_len >= 64);
+ cp2 = v[1].iov_base;
+ memset(v[0].iov_base, 'Z', 1);
+ v[0].iov_len = 1;
+ tt_int_op(0, ==, evbuffer_commit_space(buf, v, 1));
+ tt_int_op(evbuffer_get_length(buf), ==, 521);
+ remaining -= 1;
+ evbuffer_validate(buf);
+
+ /* Now ask for a request that will be split. Use some of the first
+ * part and some of the second. */
+ n = evbuffer_reserve_space(buf, remaining+64, v, 2);
+ evbuffer_validate(buf);
+ tt_int_op(n, ==, 2);
+ tt_assert(cp + 521 == v[0].iov_base);
+ tt_int_op(remaining, ==, v[0].iov_len);
+ tt_assert(v[1].iov_base == cp2);
+ tt_assert(v[1].iov_len >= 64);
+ memset(v[0].iov_base, 'W', 400);
+ v[0].iov_len = 400;
+ memset(v[1].iov_base, 'x', 60);
+ v[1].iov_len = 60;
+ tt_int_op(0, ==, evbuffer_commit_space(buf, v, 2));
+ tt_int_op(evbuffer_get_length(buf), ==, 981);
+ evbuffer_validate(buf);
+
+ /* Now peek to make sure stuff got made how we like. */
+ memset(v,0,sizeof(v));
+ n = evbuffer_peek(buf, -1, NULL, v, 2);
+ tt_int_op(n, ==, 2);
+ tt_int_op(v[0].iov_len, ==, 921);
+ tt_int_op(v[1].iov_len, ==, 60);
+
+ cp = v[0].iov_base;
+ for (i=0; i<512; ++i)
+ tt_int_op(cp[i], ==, 'X');
+ for (i=512; i<520; ++i)
+ tt_int_op(cp[i], ==, 'Y');
+ for (i=520; i<521; ++i)
+ tt_int_op(cp[i], ==, 'Z');
+ for (i=521; i<921; ++i)
+ tt_int_op(cp[i], ==, 'W');
+
+ cp = v[1].iov_base;
+ for (i=0; i<60; ++i)
+ tt_int_op(cp[i], ==, 'x');
+
+end:
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_reserve_many(void *ptr)
+{
+ /* This is a glass-box test to handle expanding a buffer with more
+ * chunks and reallocating chunks as needed */
+ struct evbuffer *buf = evbuffer_new();
+ struct evbuffer_iovec v[8];
+ int n;
+ size_t sz;
+ int add_data = ptr && !strcmp(ptr, "add");
+ int fill_first = ptr && !strcmp(ptr, "fill");
+ char *cp1, *cp2;
+
+ /* When reserving the the first chunk, we just allocate it */
+ n = evbuffer_reserve_space(buf, 128, v, 2);
+ evbuffer_validate(buf);
+ tt_int_op(n, ==, 1);
+ tt_assert(v[0].iov_len >= 128);
+ sz = v[0].iov_len;
+ cp1 = v[0].iov_base;
+ if (add_data) {
+ *(char*)v[0].iov_base = 'X';
+ v[0].iov_len = 1;
+ n = evbuffer_commit_space(buf, v, 1);
+ tt_int_op(n, ==, 0);
+ } else if (fill_first) {
+ memset(v[0].iov_base, 'X', v[0].iov_len);
+ n = evbuffer_commit_space(buf, v, 1);
+ tt_int_op(n, ==, 0);
+ n = evbuffer_reserve_space(buf, 128, v, 2);
+ tt_int_op(n, ==, 1);
+ sz = v[0].iov_len;
+ tt_assert(v[0].iov_base != cp1);
+ cp1 = v[0].iov_base;
+ }
+
+ /* Make another chunk get added. */
+ n = evbuffer_reserve_space(buf, sz+128, v, 2);
+ evbuffer_validate(buf);
+ tt_int_op(n, ==, 2);
+ sz = v[0].iov_len + v[1].iov_len;
+ tt_int_op(sz, >=, v[0].iov_len+128);
+ if (add_data) {
+ tt_assert(v[0].iov_base == cp1 + 1);
+ } else {
+ tt_assert(v[0].iov_base == cp1);
+ }
+ cp1 = v[0].iov_base;
+ cp2 = v[1].iov_base;
+
+ /* And a third chunk. */
+ n = evbuffer_reserve_space(buf, sz+128, v, 3);
+ evbuffer_validate(buf);
+ tt_int_op(n, ==, 3);
+ tt_assert(cp1 == v[0].iov_base);
+ tt_assert(cp2 == v[1].iov_base);
+ sz = v[0].iov_len + v[1].iov_len + v[2].iov_len;
+
+ /* Now force a reallocation by asking for more space in only 2
+ * buffers. */
+ n = evbuffer_reserve_space(buf, sz+128, v, 2);
+ evbuffer_validate(buf);
+ if (add_data) {
+ tt_int_op(n, ==, 2);
+ tt_assert(cp1 == v[0].iov_base);
+ } else {
+ tt_int_op(n, ==, 1);
+ }
+
+end:
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_expand(void *ptr)
+{
+ char data[4096];
+ struct evbuffer *buf;
+ size_t a,w,u;
+ void *buffer;
+
+ memset(data, 'X', sizeof(data));
+
+ /* Make sure that expand() works on an empty buffer */
+ buf = evbuffer_new();
+ tt_int_op(evbuffer_expand(buf, 20000), ==, 0);
+ evbuffer_validate(buf);
+ a=w=u=0;
+ evbuffer_get_waste(buf, &a,&w,&u);
+ tt_assert(w == 0);
+ tt_assert(u == 0);
+ tt_assert(a >= 20000);
+ tt_assert(buf->first);
+ tt_assert(buf->first == buf->last);
+ tt_assert(buf->first->off == 0);
+ tt_assert(buf->first->buffer_len >= 20000);
+
+ /* Make sure that expand() works as a no-op when there's enough
+ * contiguous space already. */
+ buffer = buf->first->buffer;
+ evbuffer_add(buf, data, 1024);
+ tt_int_op(evbuffer_expand(buf, 1024), ==, 0);
+ tt_assert(buf->first->buffer == buffer);
+ evbuffer_validate(buf);
+ evbuffer_free(buf);
+
+ /* Make sure that expand() can work by moving misaligned data
+ * when it makes sense to do so. */
+ buf = evbuffer_new();
+ evbuffer_add(buf, data, 400);
+ {
+ int n = (int)(buf->first->buffer_len - buf->first->off - 1);
+ tt_assert(n < (int)sizeof(data));
+ evbuffer_add(buf, data, n);
+ }
+ tt_assert(buf->first == buf->last);
+ tt_assert(buf->first->off == buf->first->buffer_len - 1);
+ evbuffer_drain(buf, buf->first->off - 1);
+ tt_assert(1 == evbuffer_get_length(buf));
+ tt_assert(buf->first->misalign > 0);
+ tt_assert(buf->first->off == 1);
+ buffer = buf->first->buffer;
+ tt_assert(evbuffer_expand(buf, 40) == 0);
+ tt_assert(buf->first == buf->last);
+ tt_assert(buf->first->off == 1);
+ tt_assert(buf->first->buffer == buffer);
+ tt_assert(buf->first->misalign == 0);
+ evbuffer_validate(buf);
+ evbuffer_free(buf);
+
+ /* add, expand, pull-up: This used to crash libevent. */
+ buf = evbuffer_new();
+
+ evbuffer_add(buf, data, sizeof(data));
+ evbuffer_add(buf, data, sizeof(data));
+ evbuffer_add(buf, data, sizeof(data));
+
+ evbuffer_validate(buf);
+ evbuffer_expand(buf, 1024);
+ evbuffer_validate(buf);
+ evbuffer_pullup(buf, -1);
+ evbuffer_validate(buf);
+
+end:
+ evbuffer_free(buf);
+}
+
+
+static int reference_cb_called;
+static void
+reference_cb(const void *data, size_t len, void *extra)
+{
+ tt_str_op(data, ==, "this is what we add as read-only memory.");
+ tt_int_op(len, ==, strlen(data));
+ tt_want(extra == (void *)0xdeadaffe);
+ ++reference_cb_called;
+end:
+ ;
+}
+
+static void
+test_evbuffer_reference(void *ptr)
+{
+ struct evbuffer *src = evbuffer_new();
+ struct evbuffer *dst = evbuffer_new();
+ struct evbuffer_iovec v[1];
+ const char *data = "this is what we add as read-only memory.";
+ reference_cb_called = 0;
+
+ tt_assert(evbuffer_add_reference(src, data, strlen(data),
+ reference_cb, (void *)0xdeadaffe) != -1);
+
+ evbuffer_reserve_space(dst, strlen(data), v, 1);
+ tt_assert(evbuffer_remove(src, v[0].iov_base, 10) != -1);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ /* make sure that we don't write data at the beginning */
+ evbuffer_prepend(src, "aaaaa", 5);
+ evbuffer_validate(src);
+ evbuffer_drain(src, 5);
+
+ tt_assert(evbuffer_remove(src, ((char*)(v[0].iov_base)) + 10,
+ strlen(data) - 10) != -1);
+
+ v[0].iov_len = strlen(data);
+
+ evbuffer_commit_space(dst, v, 1);
+ evbuffer_validate(src);
+ evbuffer_validate(dst);
+
+ tt_int_op(reference_cb_called, ==, 1);
+
+ tt_assert(!memcmp(evbuffer_pullup(dst, strlen(data)),
+ data, strlen(data)));
+ evbuffer_validate(dst);
+
+ end:
+ evbuffer_free(dst);
+ evbuffer_free(src);
+}
+
+static struct event_base *addfile_test_event_base = NULL;
+static int addfile_test_done_writing = 0;
+static int addfile_test_total_written = 0;
+static int addfile_test_total_read = 0;
+
+static void
+addfile_test_writecb(evutil_socket_t fd, short what, void *arg)
+{
+ struct evbuffer *b = arg;
+ int r;
+ evbuffer_validate(b);
+ while (evbuffer_get_length(b)) {
+ r = evbuffer_write(b, fd);
+ if (r > 0) {
+ addfile_test_total_written += r;
+ TT_BLATHER(("Wrote %d/%d bytes", r, addfile_test_total_written));
+ } else {
+ int e = evutil_socket_geterror(fd);
+ if (EVUTIL_ERR_RW_RETRIABLE(e))
+ return;
+ tt_fail_perror("write");
+ event_base_loopexit(addfile_test_event_base,NULL);
+ }
+ evbuffer_validate(b);
+ }
+ addfile_test_done_writing = 1;
+ return;
+end:
+ event_base_loopexit(addfile_test_event_base,NULL);
+}
+
+static void
+addfile_test_readcb(evutil_socket_t fd, short what, void *arg)
+{
+ struct evbuffer *b = arg;
+ int e, r = 0;
+ do {
+ r = evbuffer_read(b, fd, 1024);
+ if (r > 0) {
+ addfile_test_total_read += r;
+ TT_BLATHER(("Read %d/%d bytes", r, addfile_test_total_read));
+ }
+ } while (r > 0);
+ if (r < 0) {
+ e = evutil_socket_geterror(fd);
+ if (! EVUTIL_ERR_RW_RETRIABLE(e)) {
+ tt_fail_perror("read");
+ event_base_loopexit(addfile_test_event_base,NULL);
+ }
+ }
+ if (addfile_test_done_writing &&
+ addfile_test_total_read >= addfile_test_total_written) {
+ event_base_loopexit(addfile_test_event_base,NULL);
+ }
+}
+
+static void
+test_evbuffer_add_file(void *ptr)
+{
+ struct basic_test_data *testdata = ptr;
+ const char *impl = testdata->setup_data;
+ struct evbuffer *src = evbuffer_new(), *dest = evbuffer_new();
+ char *tmpfilename = NULL;
+ char *data = NULL;
+ const char *expect_data;
+ size_t datalen, expect_len;
+ const char *compare;
+ int fd = -1;
+ int want_ismapping = -1, want_cansendfile = -1;
+ unsigned flags = 0;
+ int use_segment = 1, use_bigfile = 0, map_from_offset = 0,
+ view_from_offset = 0;
+ struct evbuffer_file_segment *seg = NULL;
+ ev_off_t starting_offset = 0, mapping_len = -1;
+ ev_off_t segment_offset = 0, segment_len = -1;
+ struct event *rev=NULL, *wev=NULL;
+ struct event_base *base = testdata->base;
+ evutil_socket_t pair[2] = {-1, -1};
+ struct evutil_weakrand_state seed = { 123456789U };
+
+ /* This test is highly parameterized based on substrings of its
+ * argument. The strings are: */
+ tt_assert(impl);
+ if (strstr(impl, "nosegment")) {
+ /* If nosegment is set, use the older evbuffer_add_file
+ * interface */
+ use_segment = 0;
+ }
+ if (strstr(impl, "bigfile")) {
+ /* If bigfile is set, use a 512K file. Else use a smaller
+ * one. */
+ use_bigfile = 1;
+ }
+ if (strstr(impl, "map_offset")) {
+ /* If map_offset is set, we build the file segment starting
+ * from a point other than byte 0 and ending somewhere other
+ * than the last byte. Otherwise we map the whole thing */
+ map_from_offset = 1;
+ }
+ if (strstr(impl, "offset_in_segment")) {
+ /* If offset_in_segment is set, we add a subsection of the
+ * file semgment starting from a point other than byte 0 of
+ * the segment. */
+ view_from_offset = 1;
+ }
+ if (strstr(impl, "sendfile")) {
+ /* If sendfile is set, we try to use a sendfile/splice style
+ * backend. */
+ flags = EVBUF_FS_DISABLE_MMAP;
+ want_cansendfile = 1;
+ want_ismapping = 0;
+ } else if (strstr(impl, "mmap")) {
+ /* If sendfile is set, we try to use a mmap/CreateFileMapping
+ * style backend. */
+ flags = EVBUF_FS_DISABLE_SENDFILE;
+ want_ismapping = 1;
+ want_cansendfile = 0;
+ } else if (strstr(impl, "linear")) {
+ /* If linear is set, we try to use a read-the-whole-thing
+ * backend. */
+ flags = EVBUF_FS_DISABLE_SENDFILE|EVBUF_FS_DISABLE_MMAP;
+ want_ismapping = 0;
+ want_cansendfile = 0;
+ } else if (strstr(impl, "default")) {
+ /* The caller doesn't care which backend we use. */
+ ;
+ } else {
+ /* The caller must choose a backend. */
+ TT_DIE(("Didn't recognize the implementation"));
+ }
+
+ if (use_bigfile) {
+ unsigned int i;
+ datalen = 1024*512;
+ data = malloc(1024*512);
+ tt_assert(data);
+ for (i = 0; i < datalen; ++i)
+ data[i] = (char)evutil_weakrand_(&seed);
+ } else {
+ data = strdup("here is a relatively small string.");
+ tt_assert(data);
+ datalen = strlen(data);
+ }
+
+ fd = regress_make_tmpfile(data, datalen, &tmpfilename);
+
+ if (map_from_offset) {
+ starting_offset = datalen/4 + 1;
+ mapping_len = datalen / 2 - 1;
+ expect_data = data + starting_offset;
+ expect_len = mapping_len;
+ } else {
+ expect_data = data;
+ expect_len = datalen;
+ }
+ if (view_from_offset) {
+ tt_assert(use_segment); /* Can't do this with add_file*/
+ segment_offset = expect_len / 3;
+ segment_len = expect_len / 2;
+ expect_data = expect_data + segment_offset;
+ expect_len = segment_len;
+ }
+
+ if (use_segment) {
+ seg = evbuffer_file_segment_new(fd, starting_offset,
+ mapping_len, flags);
+ tt_assert(seg);
+ if (want_ismapping >= 0) {
+ if (seg->is_mapping != (unsigned)want_ismapping)
+ tt_skip();
+ }
+ if (want_cansendfile >= 0) {
+ if (seg->can_sendfile != (unsigned)want_cansendfile)
+ tt_skip();
+ }
+ }
+
+ /* Say that it drains to a fd so that we can use sendfile. */
+ evbuffer_set_flags(src, EVBUFFER_FLAG_DRAINS_TO_FD);
+
+#if defined(EVENT__HAVE_SENDFILE) && defined(__sun__) && defined(__svr4__)
+ /* We need to use a pair of AF_INET sockets, since Solaris
+ doesn't support sendfile() over AF_UNIX. */
+ if (evutil_ersatz_socketpair_(AF_INET, SOCK_STREAM, 0, pair) == -1)
+ tt_abort_msg("ersatz_socketpair failed");
+#else
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+ tt_abort_msg("socketpair failed");
+#endif
+ evutil_make_socket_nonblocking(pair[0]);
+ evutil_make_socket_nonblocking(pair[1]);
+
+ tt_assert(fd != -1);
+
+ if (use_segment) {
+ tt_assert(evbuffer_add_file_segment(src, seg,
+ segment_offset, segment_len)!=-1);
+ } else {
+ tt_assert(evbuffer_add_file(src, fd, starting_offset,
+ mapping_len) != -1);
+ }
+
+ evbuffer_validate(src);
+
+ addfile_test_event_base = base;
+ wev = event_new(base, pair[0], EV_WRITE|EV_PERSIST,
+ addfile_test_writecb, src);
+ rev = event_new(base, pair[1], EV_READ|EV_PERSIST,
+ addfile_test_readcb, dest);
+
+ event_add(wev, NULL);
+ event_add(rev, NULL);
+ event_base_dispatch(base);
+
+ evbuffer_validate(src);
+ evbuffer_validate(dest);
+
+ tt_assert(addfile_test_done_writing);
+ tt_int_op(addfile_test_total_written, ==, expect_len);
+ tt_int_op(addfile_test_total_read, ==, expect_len);
+
+ compare = (char *)evbuffer_pullup(dest, expect_len);
+ tt_assert(compare != NULL);
+ if (memcmp(compare, expect_data, expect_len)) {
+ tt_abort_msg("Data from add_file differs.");
+ }
+
+ evbuffer_validate(dest);
+ end:
+ if (data)
+ free(data);
+ if (seg)
+ evbuffer_file_segment_free(seg);
+ if (src)
+ evbuffer_free(src);
+ if (dest)
+ evbuffer_free(dest);
+ if (pair[0] >= 0)
+ evutil_closesocket(pair[0]);
+ if (pair[1] >= 0)
+ evutil_closesocket(pair[1]);
+ if (tmpfilename) {
+ unlink(tmpfilename);
+ free(tmpfilename);
+ }
+}
+
+static int file_segment_cleanup_cb_called_count = 0;
+static struct evbuffer_file_segment const* file_segment_cleanup_cb_called_with = NULL;
+static int file_segment_cleanup_cb_called_with_flags = 0;
+static void* file_segment_cleanup_cb_called_with_arg = NULL;
+static void
+file_segment_cleanup_cp(struct evbuffer_file_segment const* seg, int flags, void* arg)
+{
+ ++file_segment_cleanup_cb_called_count;
+ file_segment_cleanup_cb_called_with = seg;
+ file_segment_cleanup_cb_called_with_flags = flags;
+ file_segment_cleanup_cb_called_with_arg = arg;
+}
+
+static void
+test_evbuffer_file_segment_add_cleanup_cb(void* ptr)
+{
+ char *tmpfilename = NULL;
+ int fd = -1;
+ struct evbuffer *evb = NULL;
+ struct evbuffer_file_segment *seg = NULL, *segptr;
+ char const* arg = "token";
+
+ fd = regress_make_tmpfile("file_segment_test_file", 22, &tmpfilename);
+ tt_int_op(fd, >=, 0);
+
+ evb = evbuffer_new();
+ tt_assert(evb);
+
+ segptr = seg = evbuffer_file_segment_new(fd, 0, -1, 0);
+ tt_assert(seg);
+
+ evbuffer_file_segment_add_cleanup_cb(
+ seg, &file_segment_cleanup_cp, (void*)arg);
+
+ tt_assert(fd != -1);
+
+ tt_assert(evbuffer_add_file_segment(evb, seg, 0, -1)!=-1);
+
+ evbuffer_validate(evb);
+
+ tt_int_op(file_segment_cleanup_cb_called_count, ==, 0);
+ evbuffer_file_segment_free(seg);
+ seg = NULL; /* Prevent double-free. */
+
+ tt_int_op(file_segment_cleanup_cb_called_count, ==, 0);
+ evbuffer_free(evb);
+ evb = NULL; /* pevent double-free */
+
+ tt_int_op(file_segment_cleanup_cb_called_count, ==, 1);
+ tt_assert(file_segment_cleanup_cb_called_with == segptr);
+ tt_assert(file_segment_cleanup_cb_called_with_flags == 0);
+ tt_assert(file_segment_cleanup_cb_called_with_arg == (void*)arg);
+
+end:
+ if (evb)
+ evbuffer_free(evb);
+ if (seg)
+ evbuffer_file_segment_free(seg);
+ if (tmpfilename) {
+ unlink(tmpfilename);
+ free(tmpfilename);
+ }
+}
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+static void *
+failing_malloc(size_t how_much)
+{
+ errno = ENOMEM;
+ return NULL;
+}
+#endif
+
+static void
+test_evbuffer_readln(void *ptr)
+{
+ struct evbuffer *evb = evbuffer_new();
+ struct evbuffer *evb_tmp = evbuffer_new();
+ const char *s;
+ char *cp = NULL;
+ size_t sz;
+
+#define tt_line_eq(content) \
+ TT_STMT_BEGIN \
+ if (!cp || sz != strlen(content) || strcmp(cp, content)) { \
+ TT_DIE(("Wanted %s; got %s [%d]", content, cp, (int)sz)); \
+ } \
+ TT_STMT_END
+
+ /* Test EOL_ANY. */
+ s = "complex silly newline\r\n\n\r\n\n\rmore\0\n";
+ evbuffer_add(evb, s, strlen(s)+2);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_ANY);
+ tt_line_eq("complex silly newline");
+ free(cp);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_ANY);
+ if (!cp || sz != 5 || memcmp(cp, "more\0\0", 6))
+ tt_abort_msg("Not as expected");
+ tt_uint_op(evbuffer_get_length(evb), ==, 0);
+ evbuffer_validate(evb);
+ s = "\nno newline";
+ evbuffer_add(evb, s, strlen(s));
+ free(cp);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_ANY);
+ tt_line_eq("");
+ free(cp);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_ANY);
+ tt_assert(!cp);
+ evbuffer_validate(evb);
+ evbuffer_drain(evb, evbuffer_get_length(evb));
+ tt_assert(evbuffer_get_length(evb) == 0);
+ evbuffer_validate(evb);
+
+ /* Test EOL_CRLF */
+ s = "Line with\rin the middle\nLine with good crlf\r\n\nfinal\n";
+ evbuffer_add(evb, s, strlen(s));
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF);
+ tt_line_eq("Line with\rin the middle");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF);
+ tt_line_eq("Line with good crlf");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF);
+ tt_line_eq("");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF);
+ tt_line_eq("final");
+ s = "x";
+ evbuffer_validate(evb);
+ evbuffer_add(evb, s, 1);
+ evbuffer_validate(evb);
+ free(cp);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF);
+ tt_assert(!cp);
+ evbuffer_validate(evb);
+
+ /* Test CRLF_STRICT */
+ s = " and a bad crlf\nand a good one\r\n\r\nMore\r";
+ evbuffer_add(evb, s, strlen(s));
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("x and a bad crlf\nand a good one");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_assert(!cp);
+ evbuffer_validate(evb);
+ evbuffer_add(evb, "\n", 1);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("More");
+ free(cp);
+ tt_assert(evbuffer_get_length(evb) == 0);
+ evbuffer_validate(evb);
+
+ s = "An internal CR\r is not an eol\r\nNor is a lack of one";
+ evbuffer_add(evb, s, strlen(s));
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("An internal CR\r is not an eol");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_assert(!cp);
+ evbuffer_validate(evb);
+
+ evbuffer_add(evb, "\r\n", 2);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("Nor is a lack of one");
+ free(cp);
+ tt_assert(evbuffer_get_length(evb) == 0);
+ evbuffer_validate(evb);
+
+ /* Test LF */
+ s = "An\rand a nl\n\nText";
+ evbuffer_add(evb, s, strlen(s));
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_line_eq("An\rand a nl");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_line_eq("");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_assert(!cp);
+ free(cp);
+ evbuffer_add(evb, "\n", 1);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_line_eq("Text");
+ free(cp);
+ evbuffer_validate(evb);
+
+ /* Test NUL */
+ tt_int_op(evbuffer_get_length(evb), ==, 0);
+ {
+ char x[] =
+ "NUL\n\0\0"
+ "The all-zeros character which may serve\0"
+ "to accomplish time fill\0and media fill";
+ /* Add all but the final NUL of x. */
+ evbuffer_add(evb, x, sizeof(x)-1);
+ }
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_NUL);
+ tt_line_eq("NUL\n");
+ free(cp);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_NUL);
+ tt_line_eq("");
+ free(cp);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_NUL);
+ tt_line_eq("The all-zeros character which may serve");
+ free(cp);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_NUL);
+ tt_line_eq("to accomplish time fill");
+ free(cp);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_NUL);
+ tt_ptr_op(cp, ==, NULL);
+ evbuffer_drain(evb, -1);
+
+ /* Test CRLF_STRICT - across boundaries*/
+ s = " and a bad crlf\nand a good one\r";
+ evbuffer_add(evb_tmp, s, strlen(s));
+ evbuffer_validate(evb);
+ evbuffer_add_buffer(evb, evb_tmp);
+ evbuffer_validate(evb);
+ s = "\n\r";
+ evbuffer_add(evb_tmp, s, strlen(s));
+ evbuffer_validate(evb);
+ evbuffer_add_buffer(evb, evb_tmp);
+ evbuffer_validate(evb);
+ s = "\nMore\r";
+ evbuffer_add(evb_tmp, s, strlen(s));
+ evbuffer_validate(evb);
+ evbuffer_add_buffer(evb, evb_tmp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq(" and a bad crlf\nand a good one");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("");
+ free(cp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_assert(!cp);
+ free(cp);
+ evbuffer_validate(evb);
+ evbuffer_add(evb, "\n", 1);
+ evbuffer_validate(evb);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_CRLF_STRICT);
+ tt_line_eq("More");
+ free(cp); cp = NULL;
+ evbuffer_validate(evb);
+ tt_assert(evbuffer_get_length(evb) == 0);
+
+ /* Test memory problem*/
+ s = "one line\ntwo line\nblue line";
+ evbuffer_add(evb_tmp, s, strlen(s));
+ evbuffer_validate(evb);
+ evbuffer_add_buffer(evb, evb_tmp);
+ evbuffer_validate(evb);
+
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_line_eq("one line");
+ free(cp); cp = NULL;
+ evbuffer_validate(evb);
+
+ /* the next call to readline should fail */
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+ event_set_mem_functions(failing_malloc, realloc, free);
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_assert(cp == NULL);
+ evbuffer_validate(evb);
+
+ /* now we should get the next line back */
+ event_set_mem_functions(malloc, realloc, free);
+#endif
+ cp = evbuffer_readln(evb, &sz, EVBUFFER_EOL_LF);
+ tt_line_eq("two line");
+ free(cp); cp = NULL;
+ evbuffer_validate(evb);
+
+ end:
+ evbuffer_free(evb);
+ evbuffer_free(evb_tmp);
+ if (cp) free(cp);
+}
+
+static void
+test_evbuffer_search_eol(void *ptr)
+{
+ struct evbuffer *buf = evbuffer_new();
+ struct evbuffer_ptr ptr1, ptr2;
+ const char *s;
+ size_t eol_len;
+
+ s = "string! \r\n\r\nx\n";
+ evbuffer_add(buf, s, strlen(s));
+ eol_len = -1;
+ ptr1 = evbuffer_search_eol(buf, NULL, &eol_len, EVBUFFER_EOL_CRLF);
+ tt_int_op(ptr1.pos, ==, 8);
+ tt_int_op(eol_len, ==, 2);
+
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_CRLF);
+ tt_int_op(ptr2.pos, ==, 8);
+ tt_int_op(eol_len, ==, 2);
+
+ evbuffer_ptr_set(buf, &ptr1, 1, EVBUFFER_PTR_ADD);
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_CRLF);
+ tt_int_op(ptr2.pos, ==, 9);
+ tt_int_op(eol_len, ==, 1);
+
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_CRLF_STRICT);
+ tt_int_op(ptr2.pos, ==, 10);
+ tt_int_op(eol_len, ==, 2);
+
+ eol_len = -1;
+ ptr1 = evbuffer_search_eol(buf, NULL, &eol_len, EVBUFFER_EOL_LF);
+ tt_int_op(ptr1.pos, ==, 9);
+ tt_int_op(eol_len, ==, 1);
+
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_LF);
+ tt_int_op(ptr2.pos, ==, 9);
+ tt_int_op(eol_len, ==, 1);
+
+ evbuffer_ptr_set(buf, &ptr1, 1, EVBUFFER_PTR_ADD);
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_LF);
+ tt_int_op(ptr2.pos, ==, 11);
+ tt_int_op(eol_len, ==, 1);
+
+ tt_assert(evbuffer_ptr_set(buf, &ptr1, evbuffer_get_length(buf), EVBUFFER_PTR_SET) == 0);
+ eol_len = -1;
+ ptr2 = evbuffer_search_eol(buf, &ptr1, &eol_len, EVBUFFER_EOL_LF);
+ tt_int_op(ptr2.pos, ==, -1);
+ tt_int_op(eol_len, ==, 0);
+
+end:
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_iterative(void *ptr)
+{
+ struct evbuffer *buf = evbuffer_new();
+ const char *abc = "abcdefghijklmnopqrstvuwxyzabcdefghijklmnopqrstvuwxyzabcdefghijklmnopqrstvuwxyzabcdefghijklmnopqrstvuwxyz";
+ unsigned i, j, sum, n;
+
+ sum = 0;
+ n = 0;
+ for (i = 0; i < 1000; ++i) {
+ for (j = 1; j < strlen(abc); ++j) {
+ char format[32];
+ evutil_snprintf(format, sizeof(format), "%%%u.%us", j, j);
+ evbuffer_add_printf(buf, format, abc);
+
+ /* Only check for rep violations every so often.
+ Walking over the whole list of chains can get
+ pretty expensive as it gets long.
+ */
+ if ((n % 337) == 0)
+ evbuffer_validate(buf);
+
+ sum += j;
+ n++;
+ }
+ }
+ evbuffer_validate(buf);
+
+ tt_uint_op(sum, ==, evbuffer_get_length(buf));
+
+ {
+ size_t a,w,u;
+ a=w=u=0;
+ evbuffer_get_waste(buf, &a, &w, &u);
+ if (0)
+ printf("Allocated: %u.\nWasted: %u.\nUsed: %u.",
+ (unsigned)a, (unsigned)w, (unsigned)u);
+ tt_assert( ((double)w)/a < .125);
+ }
+ end:
+ evbuffer_free(buf);
+
+}
+
+static void
+test_evbuffer_find(void *ptr)
+{
+ u_char* p;
+ const char* test1 = "1234567890\r\n";
+ const char* test2 = "1234567890\r";
+#define EVBUFFER_INITIAL_LENGTH 256
+ char test3[EVBUFFER_INITIAL_LENGTH];
+ unsigned int i;
+ struct evbuffer * buf = evbuffer_new();
+
+ tt_assert(buf);
+
+ /* make sure evbuffer_find doesn't match past the end of the buffer */
+ evbuffer_add(buf, (u_char*)test1, strlen(test1));
+ evbuffer_validate(buf);
+ evbuffer_drain(buf, strlen(test1));
+ evbuffer_validate(buf);
+ evbuffer_add(buf, (u_char*)test2, strlen(test2));
+ evbuffer_validate(buf);
+ p = evbuffer_find(buf, (u_char*)"\r\n", 2);
+ tt_want(p == NULL);
+
+ /*
+ * drain the buffer and do another find; in r309 this would
+ * read past the allocated buffer causing a valgrind error.
+ */
+ evbuffer_drain(buf, strlen(test2));
+ evbuffer_validate(buf);
+ for (i = 0; i < EVBUFFER_INITIAL_LENGTH; ++i)
+ test3[i] = 'a';
+ test3[EVBUFFER_INITIAL_LENGTH - 1] = 'x';
+ evbuffer_add(buf, (u_char *)test3, EVBUFFER_INITIAL_LENGTH);
+ evbuffer_validate(buf);
+ p = evbuffer_find(buf, (u_char *)"xy", 2);
+ tt_want(p == NULL);
+
+ /* simple test for match at end of allocated buffer */
+ p = evbuffer_find(buf, (u_char *)"ax", 2);
+ tt_assert(p != NULL);
+ tt_want(strncmp((char*)p, "ax", 2) == 0);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_ptr_set(void *ptr)
+{
+ struct evbuffer *buf = evbuffer_new();
+ struct evbuffer_ptr pos;
+ struct evbuffer_iovec v[1];
+
+ tt_assert(buf);
+
+ tt_int_op(evbuffer_get_length(buf), ==, 0);
+
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ tt_assert(pos.pos == 0);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 1, EVBUFFER_PTR_ADD) == -1);
+ tt_assert(pos.pos == -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 1, EVBUFFER_PTR_SET) == -1);
+ tt_assert(pos.pos == -1);
+
+ /* create some chains */
+ evbuffer_reserve_space(buf, 5000, v, 1);
+ v[0].iov_len = 5000;
+ memset(v[0].iov_base, 1, v[0].iov_len);
+ evbuffer_commit_space(buf, v, 1);
+ evbuffer_validate(buf);
+
+ evbuffer_reserve_space(buf, 4000, v, 1);
+ v[0].iov_len = 4000;
+ memset(v[0].iov_base, 2, v[0].iov_len);
+ evbuffer_commit_space(buf, v, 1);
+
+ evbuffer_reserve_space(buf, 3000, v, 1);
+ v[0].iov_len = 3000;
+ memset(v[0].iov_base, 3, v[0].iov_len);
+ evbuffer_commit_space(buf, v, 1);
+ evbuffer_validate(buf);
+
+ tt_int_op(evbuffer_get_length(buf), ==, 12000);
+
+ tt_assert(evbuffer_ptr_set(buf, &pos, 13000, EVBUFFER_PTR_SET) == -1);
+ tt_assert(pos.pos == -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ tt_assert(pos.pos == 0);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 13000, EVBUFFER_PTR_ADD) == -1);
+
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ tt_assert(pos.pos == 0);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 10000, EVBUFFER_PTR_ADD) == 0);
+ tt_assert(pos.pos == 10000);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 1000, EVBUFFER_PTR_ADD) == 0);
+ tt_assert(pos.pos == 11000);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 1000, EVBUFFER_PTR_ADD) == 0);
+ tt_assert(pos.pos == 12000);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 1000, EVBUFFER_PTR_ADD) == -1);
+ tt_assert(pos.pos == -1);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+static void
+test_evbuffer_search(void *ptr)
+{
+ struct evbuffer *buf = evbuffer_new();
+ struct evbuffer *tmp = evbuffer_new();
+ struct evbuffer_ptr pos, end;
+
+ tt_assert(buf);
+ tt_assert(tmp);
+
+ pos = evbuffer_search(buf, "x", 1, NULL);
+ tt_int_op(pos.pos, ==, -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search(buf, "x", 1, &pos);
+ tt_int_op(pos.pos, ==, -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search_range(buf, "x", 1, &pos, &pos);
+ tt_int_op(pos.pos, ==, -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 0, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search_range(buf, "x", 1, &pos, NULL);
+ tt_int_op(pos.pos, ==, -1);
+
+ /* set up our chains */
+ evbuffer_add_printf(tmp, "hello"); /* 5 chars */
+ evbuffer_add_buffer(buf, tmp);
+ evbuffer_add_printf(tmp, "foo"); /* 3 chars */
+ evbuffer_add_buffer(buf, tmp);
+ evbuffer_add_printf(tmp, "cat"); /* 3 chars */
+ evbuffer_add_buffer(buf, tmp);
+ evbuffer_add_printf(tmp, "attack");
+ evbuffer_add_buffer(buf, tmp);
+
+ pos = evbuffer_search(buf, "attack", 6, NULL);
+ tt_int_op(pos.pos, ==, 11);
+ pos = evbuffer_search(buf, "attacker", 8, NULL);
+ tt_int_op(pos.pos, ==, -1);
+
+ /* test continuing search */
+ pos = evbuffer_search(buf, "oc", 2, NULL);
+ tt_int_op(pos.pos, ==, 7);
+ pos = evbuffer_search(buf, "cat", 3, &pos);
+ tt_int_op(pos.pos, ==, 8);
+ pos = evbuffer_search(buf, "tacking", 7, &pos);
+ tt_int_op(pos.pos, ==, -1);
+
+ evbuffer_ptr_set(buf, &pos, 5, EVBUFFER_PTR_SET);
+ pos = evbuffer_search(buf, "foo", 3, &pos);
+ tt_int_op(pos.pos, ==, 5);
+
+ evbuffer_ptr_set(buf, &pos, 2, EVBUFFER_PTR_ADD);
+ pos = evbuffer_search(buf, "tat", 3, &pos);
+ tt_int_op(pos.pos, ==, 10);
+
+ /* test bounded search. */
+ /* Set "end" to the first t in "attack". */
+ evbuffer_ptr_set(buf, &end, 12, EVBUFFER_PTR_SET);
+ pos = evbuffer_search_range(buf, "foo", 3, NULL, &end);
+ tt_int_op(pos.pos, ==, 5);
+ pos = evbuffer_search_range(buf, "foocata", 7, NULL, &end);
+ tt_int_op(pos.pos, ==, 5);
+ pos = evbuffer_search_range(buf, "foocatat", 8, NULL, &end);
+ tt_int_op(pos.pos, ==, -1);
+ pos = evbuffer_search_range(buf, "ack", 3, NULL, &end);
+ tt_int_op(pos.pos, ==, -1);
+
+ /* Set "end" after the last byte in the buffer. */
+ tt_assert(evbuffer_ptr_set(buf, &end, 17, EVBUFFER_PTR_SET) == 0);
+
+ pos = evbuffer_search_range(buf, "attack", 6, NULL, &end);
+ tt_int_op(pos.pos, ==, 11);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 11, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search_range(buf, "attack", 6, &pos, &end);
+ tt_int_op(pos.pos, ==, 11);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 17, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search_range(buf, "attack", 6, &pos, &end);
+ tt_int_op(pos.pos, ==, -1);
+ tt_assert(evbuffer_ptr_set(buf, &pos, 17, EVBUFFER_PTR_SET) == 0);
+ pos = evbuffer_search_range(buf, "attack", 6, &pos, NULL);
+ tt_int_op(pos.pos, ==, -1);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+ if (tmp)
+ evbuffer_free(tmp);
+}
+
+static void
+log_change_callback(struct evbuffer *buffer,
+ const struct evbuffer_cb_info *cbinfo,
+ void *arg)
+{
+
+ size_t old_len = cbinfo->orig_size;
+ size_t new_len = old_len + cbinfo->n_added - cbinfo->n_deleted;
+ struct evbuffer *out = arg;
+ evbuffer_add_printf(out, "%lu->%lu; ", (unsigned long)old_len,
+ (unsigned long)new_len);
+}
+static void
+self_draining_callback(struct evbuffer *evbuffer, size_t old_len,
+ size_t new_len, void *arg)
+{
+ if (new_len > old_len)
+ evbuffer_drain(evbuffer, new_len);
+}
+
+static void
+test_evbuffer_callbacks(void *ptr)
+{
+ struct evbuffer *buf = evbuffer_new();
+ struct evbuffer *buf_out1 = evbuffer_new();
+ struct evbuffer *buf_out2 = evbuffer_new();
+ struct evbuffer_cb_entry *cb1, *cb2;
+
+ tt_assert(buf);
+ tt_assert(buf_out1);
+ tt_assert(buf_out2);
+
+ cb1 = evbuffer_add_cb(buf, log_change_callback, buf_out1);
+ cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
+
+ /* Let's run through adding and deleting some stuff from the buffer
+ * and turning the callbacks on and off and removing them. The callback
+ * adds a summary of length changes to buf_out1/buf_out2 when called. */
+ /* size: 0-> 36. */
+ evbuffer_add_printf(buf, "The %d magic words are spotty pudding", 2);
+ evbuffer_validate(buf);
+ evbuffer_cb_clear_flags(buf, cb2, EVBUFFER_CB_ENABLED);
+ evbuffer_drain(buf, 10); /*36->26*/
+ evbuffer_validate(buf);
+ evbuffer_prepend(buf, "Hello", 5);/*26->31*/
+ evbuffer_cb_set_flags(buf, cb2, EVBUFFER_CB_ENABLED);
+ evbuffer_add_reference(buf, "Goodbye", 7, NULL, NULL); /*31->38*/
+ evbuffer_remove_cb_entry(buf, cb1);
+ evbuffer_validate(buf);
+ evbuffer_drain(buf, evbuffer_get_length(buf)); /*38->0*/;
+ tt_assert(-1 == evbuffer_remove_cb(buf, log_change_callback, NULL));
+ evbuffer_add(buf, "X", 1); /* 0->1 */
+ tt_assert(!evbuffer_remove_cb(buf, log_change_callback, buf_out2));
+ evbuffer_validate(buf);
+
+ tt_str_op(evbuffer_pullup(buf_out1, -1), ==,
+ "0->36; 36->26; 26->31; 31->38; ");
+ tt_str_op(evbuffer_pullup(buf_out2, -1), ==,
+ "0->36; 31->38; 38->0; 0->1; ");
+ evbuffer_drain(buf_out1, evbuffer_get_length(buf_out1));
+ evbuffer_drain(buf_out2, evbuffer_get_length(buf_out2));
+ /* Let's test the obsolete buffer_setcb function too. */
+ cb1 = evbuffer_add_cb(buf, log_change_callback, buf_out1);
+ tt_assert(cb1 != NULL);
+ cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
+ tt_assert(cb2 != NULL);
+ evbuffer_setcb(buf, self_draining_callback, NULL);
+ evbuffer_add_printf(buf, "This should get drained right away.");
+ tt_uint_op(evbuffer_get_length(buf), ==, 0);
+ tt_uint_op(evbuffer_get_length(buf_out1), ==, 0);
+ tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
+ evbuffer_setcb(buf, NULL, NULL);
+ evbuffer_add_printf(buf, "This will not.");
+ tt_str_op(evbuffer_pullup(buf, -1), ==, "This will not.");
+ evbuffer_validate(buf);
+ evbuffer_drain(buf, evbuffer_get_length(buf));
+ evbuffer_validate(buf);
+#if 0
+ /* Now let's try a suspended callback. */
+ cb1 = evbuffer_add_cb(buf, log_change_callback, buf_out1);
+ cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
+ evbuffer_cb_suspend(buf,cb2);
+ evbuffer_prepend(buf,"Hello world",11); /*0->11*/
+ evbuffer_validate(buf);
+ evbuffer_cb_suspend(buf,cb1);
+ evbuffer_add(buf,"more",4); /* 11->15 */
+ evbuffer_cb_unsuspend(buf,cb2);
+ evbuffer_drain(buf, 4); /* 15->11 */
+ evbuffer_cb_unsuspend(buf,cb1);
+ evbuffer_drain(buf, evbuffer_get_length(buf)); /* 11->0 */
+
+ tt_str_op(evbuffer_pullup(buf_out1, -1), ==,
+ "0->11; 11->11; 11->0; ");
+ tt_str_op(evbuffer_pullup(buf_out2, -1), ==,
+ "0->15; 15->11; 11->0; ");
+#endif
+
+ end:
+ if (buf)
+ evbuffer_free(buf);
+ if (buf_out1)
+ evbuffer_free(buf_out1);
+ if (buf_out2)
+ evbuffer_free(buf_out2);
+}
+
+static int ref_done_cb_called_count = 0;
+static void *ref_done_cb_called_with = NULL;
+static const void *ref_done_cb_called_with_data = NULL;
+static size_t ref_done_cb_called_with_len = 0;
+static void ref_done_cb(const void *data, size_t len, void *info)
+{
+ ++ref_done_cb_called_count;
+ ref_done_cb_called_with = info;
+ ref_done_cb_called_with_data = data;
+ ref_done_cb_called_with_len = len;
+}
+
+static void
+test_evbuffer_add_reference(void *ptr)
+{
+ const char chunk1[] = "If you have found the answer to such a problem";
+ const char chunk2[] = "you ought to write it up for publication";
+ /* -- Knuth's "Notes on the Exercises" from TAOCP */
+ char tmp[16];
+ size_t len1 = strlen(chunk1), len2=strlen(chunk2);
+
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ evbuffer_add_reference(buf1, chunk1, len1, ref_done_cb, (void*)111);
+ evbuffer_add(buf1, ", ", 2);
+ evbuffer_add_reference(buf1, chunk2, len2, ref_done_cb, (void*)222);
+ tt_int_op(evbuffer_get_length(buf1), ==, len1+len2+2);
+
+ /* Make sure we can drain a little from a reference. */
+ tt_int_op(evbuffer_remove(buf1, tmp, 6), ==, 6);
+ tt_int_op(memcmp(tmp, "If you", 6), ==, 0);
+ tt_int_op(evbuffer_remove(buf1, tmp, 5), ==, 5);
+ tt_int_op(memcmp(tmp, " have", 5), ==, 0);
+
+ /* Make sure that prepending does not meddle with immutable data */
+ tt_int_op(evbuffer_prepend(buf1, "I have ", 7), ==, 0);
+ tt_int_op(memcmp(chunk1, "If you", 6), ==, 0);
+ evbuffer_validate(buf1);
+
+ /* Make sure that when the chunk is over, the callback is invoked. */
+ evbuffer_drain(buf1, 7); /* Remove prepended stuff. */
+ evbuffer_drain(buf1, len1-11-1); /* remove all but one byte of chunk1 */
+ tt_int_op(ref_done_cb_called_count, ==, 0);
+ evbuffer_remove(buf1, tmp, 1);
+ tt_int_op(tmp[0], ==, 'm');
+ tt_assert(ref_done_cb_called_with == (void*)111);
+ tt_assert(ref_done_cb_called_with_data == chunk1);
+ tt_assert(ref_done_cb_called_with_len == len1);
+ tt_int_op(ref_done_cb_called_count, ==, 1);
+ evbuffer_validate(buf1);
+
+ /* Drain some of the remaining chunk, then add it to another buffer */
+ evbuffer_drain(buf1, 6); /* Remove the ", you ". */
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+ tt_int_op(ref_done_cb_called_count, ==, 1);
+ evbuffer_add(buf2, "I ", 2);
+
+ evbuffer_add_buffer(buf2, buf1);
+ tt_int_op(ref_done_cb_called_count, ==, 1);
+ evbuffer_remove(buf2, tmp, 16);
+ tt_int_op(memcmp("I ought to write", tmp, 16), ==, 0);
+ evbuffer_drain(buf2, evbuffer_get_length(buf2));
+ tt_int_op(ref_done_cb_called_count, ==, 2);
+ tt_assert(ref_done_cb_called_with == (void*)222);
+ evbuffer_validate(buf2);
+
+ /* Now add more stuff to buf1 and make sure that it gets removed on
+ * free. */
+ evbuffer_add(buf1, "You shake and shake the ", 24);
+ evbuffer_add_reference(buf1, "ketchup bottle", 14, ref_done_cb,
+ (void*)3333);
+ evbuffer_add(buf1, ". Nothing comes and then a lot'll.", 42);
+ evbuffer_free(buf1);
+ buf1 = NULL;
+ tt_int_op(ref_done_cb_called_count, ==, 3);
+ tt_assert(ref_done_cb_called_with == (void*)3333);
+
+end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+static void
+test_evbuffer_multicast(void *ptr)
+{
+ const char chunk1[] = "If you have found the answer to such a problem";
+ const char chunk2[] = "you ought to write it up for publication";
+ /* -- Knuth's "Notes on the Exercises" from TAOCP */
+ char tmp[16];
+ size_t len1 = strlen(chunk1), len2=strlen(chunk2);
+
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ evbuffer_add(buf1, chunk1, len1);
+ evbuffer_add(buf1, ", ", 2);
+ evbuffer_add(buf1, chunk2, len2);
+ tt_int_op(evbuffer_get_length(buf1), ==, len1+len2+2);
+
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ tt_int_op(evbuffer_add_buffer_reference(buf2, buf1), ==, 0);
+ /* nested references are not allowed */
+ tt_int_op(evbuffer_add_buffer_reference(buf2, buf2), ==, -1);
+ tt_int_op(evbuffer_add_buffer_reference(buf1, buf2), ==, -1);
+
+ /* both buffers contain the same amount of data */
+ tt_int_op(evbuffer_get_length(buf1), ==, evbuffer_get_length(buf1));
+
+ /* Make sure we can drain a little from the first buffer. */
+ tt_int_op(evbuffer_remove(buf1, tmp, 6), ==, 6);
+ tt_int_op(memcmp(tmp, "If you", 6), ==, 0);
+ tt_int_op(evbuffer_remove(buf1, tmp, 5), ==, 5);
+ tt_int_op(memcmp(tmp, " have", 5), ==, 0);
+
+ /* Make sure that prepending does not meddle with immutable data */
+ tt_int_op(evbuffer_prepend(buf1, "I have ", 7), ==, 0);
+ tt_int_op(memcmp(chunk1, "If you", 6), ==, 0);
+ evbuffer_validate(buf1);
+
+ /* Make sure we can drain a little from the second buffer. */
+ tt_int_op(evbuffer_remove(buf2, tmp, 6), ==, 6);
+ tt_int_op(memcmp(tmp, "If you", 6), ==, 0);
+ tt_int_op(evbuffer_remove(buf2, tmp, 5), ==, 5);
+ tt_int_op(memcmp(tmp, " have", 5), ==, 0);
+
+ /* Make sure that prepending does not meddle with immutable data */
+ tt_int_op(evbuffer_prepend(buf2, "I have ", 7), ==, 0);
+ tt_int_op(memcmp(chunk1, "If you", 6), ==, 0);
+ evbuffer_validate(buf2);
+
+ /* Make sure the data can be read from the second buffer when the first is freed */
+ evbuffer_free(buf1);
+ buf1 = NULL;
+
+ tt_int_op(evbuffer_remove(buf2, tmp, 6), ==, 6);
+ tt_int_op(memcmp(tmp, "I have", 6), ==, 0);
+
+ tt_int_op(evbuffer_remove(buf2, tmp, 6), ==, 6);
+ tt_int_op(memcmp(tmp, " foun", 6), ==, 0);
+
+end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+static void
+test_evbuffer_multicast_drain(void *ptr)
+{
+ const char chunk1[] = "If you have found the answer to such a problem";
+ const char chunk2[] = "you ought to write it up for publication";
+ /* -- Knuth's "Notes on the Exercises" from TAOCP */
+ size_t len1 = strlen(chunk1), len2=strlen(chunk2);
+
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ evbuffer_add(buf1, chunk1, len1);
+ evbuffer_add(buf1, ", ", 2);
+ evbuffer_add(buf1, chunk2, len2);
+ tt_int_op(evbuffer_get_length(buf1), ==, len1+len2+2);
+
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ tt_int_op(evbuffer_add_buffer_reference(buf2, buf1), ==, 0);
+ tt_int_op(evbuffer_get_length(buf2), ==, len1+len2+2);
+ tt_int_op(evbuffer_drain(buf1, evbuffer_get_length(buf1)), ==, 0);
+ tt_int_op(evbuffer_get_length(buf2), ==, len1+len2+2);
+ tt_int_op(evbuffer_drain(buf2, evbuffer_get_length(buf2)), ==, 0);
+ evbuffer_validate(buf1);
+ evbuffer_validate(buf2);
+
+end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+}
+
+/* Some cases that we didn't get in test_evbuffer() above, for more coverage. */
+static void
+test_evbuffer_prepend(void *ptr)
+{
+ struct evbuffer *buf1 = NULL, *buf2 = NULL;
+ char tmp[128];
+ int n;
+
+ buf1 = evbuffer_new();
+ tt_assert(buf1);
+
+ /* Case 0: The evbuffer is entirely empty. */
+ evbuffer_prepend(buf1, "This string has 29 characters", 29);
+ evbuffer_validate(buf1);
+
+ /* Case 1: Prepend goes entirely in new chunk. */
+ evbuffer_prepend(buf1, "Short.", 6);
+ evbuffer_validate(buf1);
+
+ /* Case 2: prepend goes entirely in first chunk. */
+ evbuffer_drain(buf1, 6+11);
+ evbuffer_prepend(buf1, "it", 2);
+ evbuffer_validate(buf1);
+ tt_assert(!memcmp(buf1->first->buffer+buf1->first->misalign,
+ "it has", 6));
+
+ /* Case 3: prepend is split over multiple chunks. */
+ evbuffer_prepend(buf1, "It is no longer true to say ", 28);
+ evbuffer_validate(buf1);
+ n = evbuffer_remove(buf1, tmp, sizeof(tmp)-1);
+ tt_int_op(n, >=, 0);
+ tmp[n]='\0';
+ tt_str_op(tmp,==,"It is no longer true to say it has 29 characters");
+
+ buf2 = evbuffer_new();
+ tt_assert(buf2);
+
+ /* Case 4: prepend a buffer to an empty buffer. */
+ n = 999;
+ evbuffer_add_printf(buf1, "Here is string %d. ", n++);
+ evbuffer_prepend_buffer(buf2, buf1);
+ evbuffer_validate(buf2);
+
+ /* Case 5: prepend a buffer to a nonempty buffer. */
+ evbuffer_add_printf(buf1, "Here is string %d. ", n++);
+ evbuffer_prepend_buffer(buf2, buf1);
+ evbuffer_validate(buf2);
+ evbuffer_validate(buf1);
+ n = evbuffer_remove(buf2, tmp, sizeof(tmp)-1);
+ tt_int_op(n, >=, 0);
+ tmp[n]='\0';
+ tt_str_op(tmp,==,"Here is string 1000. Here is string 999. ");
+
+end:
+ if (buf1)
+ evbuffer_free(buf1);
+ if (buf2)
+ evbuffer_free(buf2);
+
+}
+
+static void
+test_evbuffer_peek(void *info)
+{
+ struct evbuffer *buf = NULL, *tmp_buf = NULL;
+ int i;
+ struct evbuffer_iovec v[20];
+ struct evbuffer_ptr ptr;
+
+#define tt_iov_eq(v, s) \
+ tt_int_op((v)->iov_len, ==, strlen(s)); \
+ tt_assert(!memcmp((v)->iov_base, (s), strlen(s)))
+
+ /* Let's make a very fragmented buffer. */
+ buf = evbuffer_new();
+ tmp_buf = evbuffer_new();
+ for (i = 0; i < 16; ++i) {
+ evbuffer_add_printf(tmp_buf, "Contents of chunk [%d]\n", i);
+ evbuffer_add_buffer(buf, tmp_buf);
+ }
+
+ /* How many chunks do we need for everything? */
+ i = evbuffer_peek(buf, -1, NULL, NULL, 0);
+ tt_int_op(i, ==, 16);
+
+ /* Simple peek: get everything. */
+ i = evbuffer_peek(buf, -1, NULL, v, 20);
+ tt_int_op(i, ==, 16); /* we used only 16 chunks. */
+ tt_iov_eq(&v[0], "Contents of chunk [0]\n");
+ tt_iov_eq(&v[3], "Contents of chunk [3]\n");
+ tt_iov_eq(&v[12], "Contents of chunk [12]\n");
+ tt_iov_eq(&v[15], "Contents of chunk [15]\n");
+
+ /* Just get one chunk worth. */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(buf, -1, NULL, v, 1);
+ tt_int_op(i, ==, 1);
+ tt_iov_eq(&v[0], "Contents of chunk [0]\n");
+ tt_assert(v[1].iov_base == NULL);
+
+ /* Suppose we want at least the first 40 bytes. */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(buf, 40, NULL, v, 16);
+ tt_int_op(i, ==, 2);
+ tt_iov_eq(&v[0], "Contents of chunk [0]\n");
+ tt_iov_eq(&v[1], "Contents of chunk [1]\n");
+ tt_assert(v[2].iov_base == NULL);
+
+ /* How many chunks do we need for 100 bytes? */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(buf, 100, NULL, NULL, 0);
+ tt_int_op(i, ==, 5);
+ tt_assert(v[0].iov_base == NULL);
+
+ /* Now we ask for more bytes than we provide chunks for */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(buf, 60, NULL, v, 1);
+ tt_int_op(i, ==, 3);
+ tt_iov_eq(&v[0], "Contents of chunk [0]\n");
+ tt_assert(v[1].iov_base == NULL);
+
+ /* Now we ask for more bytes than the buffer has. */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(buf, 65536, NULL, v, 20);
+ tt_int_op(i, ==, 16); /* we used only 16 chunks. */
+ tt_iov_eq(&v[0], "Contents of chunk [0]\n");
+ tt_iov_eq(&v[3], "Contents of chunk [3]\n");
+ tt_iov_eq(&v[12], "Contents of chunk [12]\n");
+ tt_iov_eq(&v[15], "Contents of chunk [15]\n");
+ tt_assert(v[16].iov_base == NULL);
+
+ /* What happens if we try an empty buffer? */
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(tmp_buf, -1, NULL, v, 20);
+ tt_int_op(i, ==, 0);
+ tt_assert(v[0].iov_base == NULL);
+ memset(v, 0, sizeof(v));
+ i = evbuffer_peek(tmp_buf, 50, NULL, v, 20);
+ tt_int_op(i, ==, 0);
+ tt_assert(v[0].iov_base == NULL);
+
+ /* Okay, now time to have fun with pointers. */
+ memset(v, 0, sizeof(v));
+ evbuffer_ptr_set(buf, &ptr, 30, EVBUFFER_PTR_SET);
+ i = evbuffer_peek(buf, 50, &ptr, v, 20);
+ tt_int_op(i, ==, 3);
+ tt_iov_eq(&v[0], " of chunk [1]\n");
+ tt_iov_eq(&v[1], "Contents of chunk [2]\n");
+ tt_iov_eq(&v[2], "Contents of chunk [3]\n"); /*more than we asked for*/
+
+ /* advance to the start of another chain. */
+ memset(v, 0, sizeof(v));
+ evbuffer_ptr_set(buf, &ptr, 14, EVBUFFER_PTR_ADD);
+ i = evbuffer_peek(buf, 44, &ptr, v, 20);
+ tt_int_op(i, ==, 2);
+ tt_iov_eq(&v[0], "Contents of chunk [2]\n");
+ tt_iov_eq(&v[1], "Contents of chunk [3]\n"); /*more than we asked for*/
+
+ /* peek at the end of the buffer */
+ memset(v, 0, sizeof(v));
+ tt_assert(evbuffer_ptr_set(buf, &ptr, evbuffer_get_length(buf), EVBUFFER_PTR_SET) == 0);
+ i = evbuffer_peek(buf, 44, &ptr, v, 20);
+ tt_int_op(i, ==, 0);
+ tt_assert(v[0].iov_base == NULL);
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+ if (tmp_buf)
+ evbuffer_free(tmp_buf);
+}
+
+/* Check whether evbuffer freezing works right. This is called twice,
+ once with the argument "start" and once with the argument "end".
+ When we test "start", we freeze the start of an evbuffer and make sure
+ that modifying the start of the buffer doesn't work. When we test
+ "end", we freeze the end of an evbuffer and make sure that modifying
+ the end of the buffer doesn't work.
+ */
+static void
+test_evbuffer_freeze(void *ptr)
+{
+ struct evbuffer *buf = NULL, *tmp_buf=NULL;
+ const char string[] = /* Year's End, Richard Wilbur */
+ "I've known the wind by water banks to shake\n"
+ "The late leaves down, which frozen where they fell\n"
+ "And held in ice as dancers in a spell\n"
+ "Fluttered all winter long into a lake...";
+ const int start = !strcmp(ptr, "start");
+ char *cp;
+ char charbuf[128];
+ int r;
+ size_t orig_length;
+ struct evbuffer_iovec v[1];
+
+ if (!start)
+ tt_str_op(ptr, ==, "end");
+
+ buf = evbuffer_new();
+ tmp_buf = evbuffer_new();
+ tt_assert(tmp_buf);
+
+ evbuffer_add(buf, string, strlen(string));
+ evbuffer_freeze(buf, start); /* Freeze the start or the end.*/
+
+#define FREEZE_EQ(a, startcase, endcase) \
+ do { \
+ if (start) { \
+ tt_int_op((a), ==, (startcase)); \
+ } else { \
+ tt_int_op((a), ==, (endcase)); \
+ } \
+ } while (0)
+
+
+ orig_length = evbuffer_get_length(buf);
+
+ /* These functions all manipulate the end of buf. */
+ r = evbuffer_add(buf, "abc", 0);
+ FREEZE_EQ(r, 0, -1);
+ r = evbuffer_reserve_space(buf, 10, v, 1);
+ FREEZE_EQ(r, 1, -1);
+ if (r == 1) {
+ memset(v[0].iov_base, 'X', 10);
+ v[0].iov_len = 10;
+ }
+ r = evbuffer_commit_space(buf, v, 1);
+ FREEZE_EQ(r, 0, -1);
+ r = evbuffer_add_reference(buf, string, 5, NULL, NULL);
+ FREEZE_EQ(r, 0, -1);
+ r = evbuffer_add_printf(buf, "Hello %s", "world");
+ FREEZE_EQ(r, 11, -1);
+ /* TODO: test add_buffer, add_file, read */
+
+ if (!start)
+ tt_int_op(orig_length, ==, evbuffer_get_length(buf));
+
+ orig_length = evbuffer_get_length(buf);
+
+ /* These functions all manipulate the start of buf. */
+ r = evbuffer_remove(buf, charbuf, 1);
+ FREEZE_EQ(r, -1, 1);
+ r = evbuffer_drain(buf, 3);
+ FREEZE_EQ(r, -1, 0);
+ r = evbuffer_prepend(buf, "dummy", 5);
+ FREEZE_EQ(r, -1, 0);
+ cp = evbuffer_readln(buf, NULL, EVBUFFER_EOL_LF);
+ FREEZE_EQ(cp==NULL, 1, 0);
+ if (cp)
+ free(cp);
+ /* TODO: Test remove_buffer, add_buffer, write, prepend_buffer */
+
+ if (start)
+ tt_int_op(orig_length, ==, evbuffer_get_length(buf));
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+
+ if (tmp_buf)
+ evbuffer_free(tmp_buf);
+}
+
+static void
+test_evbuffer_add_iovec(void * ptr)
+{
+ struct evbuffer * buf = NULL;
+ struct evbuffer_iovec vec[4];
+ const char * data[] = {
+ "Guilt resembles a sword with two edges.",
+ "On the one hand, it cuts for Justice, imposing practical morality upon those who fear it.",
+ "Conscience does not always adhere to rational judgment.",
+ "Guilt is always a self-imposed burden, but it is not always rightly imposed."
+ /* -- R.A. Salvatore, _Sojurn_ */
+ };
+ size_t expected_length = 0;
+ size_t returned_length = 0;
+ int i;
+
+ buf = evbuffer_new();
+
+ tt_assert(buf);
+
+ for (i = 0; i < 4; i++) {
+ vec[i].iov_len = strlen(data[i]);
+ vec[i].iov_base = (char*) data[i];
+ expected_length += vec[i].iov_len;
+ }
+
+ returned_length = evbuffer_add_iovec(buf, vec, 4);
+
+ tt_int_op(returned_length, ==, evbuffer_get_length(buf));
+ tt_int_op(evbuffer_get_length(buf), ==, expected_length);
+
+ for (i = 0; i < 4; i++) {
+ char charbuf[1024];
+
+ memset(charbuf, 0, 1024);
+ evbuffer_remove(buf, charbuf, strlen(data[i]));
+ tt_assert(strcmp(charbuf, data[i]) == 0);
+ }
+
+ tt_assert(evbuffer_get_length(buf) == 0);
+end:
+ if (buf) {
+ evbuffer_free(buf);
+ }
+}
+
+static void
+test_evbuffer_copyout(void *dummy)
+{
+ const char string[] =
+ "Still they skirmish to and fro, men my messmates on the snow "
+ "When we headed off the aurochs turn for turn; "
+ "When the rich Allobrogenses never kept amanuenses, "
+ "And our only plots were piled in lakes at Berne.";
+ /* -- Kipling, "In The Neolithic Age" */
+ char tmp[256];
+ struct evbuffer_ptr ptr;
+ struct evbuffer *buf;
+
+ (void)dummy;
+
+ buf = evbuffer_new();
+ tt_assert(buf);
+
+ tt_int_op(strlen(string), ==, 206);
+
+ /* Ensure separate chains */
+ evbuffer_add_reference(buf, string, 80, no_cleanup, NULL);
+ evbuffer_add_reference(buf, string+80, 80, no_cleanup, NULL);
+ evbuffer_add(buf, string+160, strlen(string)-160);
+
+ tt_int_op(206, ==, evbuffer_get_length(buf));
+
+ /* First, let's test plain old copyout. */
+
+ /* Copy a little from the beginning. */
+ tt_int_op(10, ==, evbuffer_copyout(buf, tmp, 10));
+ tt_int_op(0, ==, memcmp(tmp, "Still they", 10));
+
+ /* Now copy more than a little from the beginning */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(100, ==, evbuffer_copyout(buf, tmp, 100));
+ tt_int_op(0, ==, memcmp(tmp, string, 100));
+
+ /* Copy too much; ensure truncation. */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(206, ==, evbuffer_copyout(buf, tmp, 230));
+ tt_int_op(0, ==, memcmp(tmp, string, 206));
+
+ /* That was supposed to be nondestructive, btw */
+ tt_int_op(206, ==, evbuffer_get_length(buf));
+
+ /* Now it's time to test copyout_from! First, let's start in the
+ * first chain. */
+ evbuffer_ptr_set(buf, &ptr, 15, EVBUFFER_PTR_SET);
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(10, ==, evbuffer_copyout_from(buf, &ptr, tmp, 10));
+ tt_int_op(0, ==, memcmp(tmp, "mish to an", 10));
+
+ /* Right up to the end of the first chain */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(65, ==, evbuffer_copyout_from(buf, &ptr, tmp, 65));
+ tt_int_op(0, ==, memcmp(tmp, string+15, 65));
+
+ /* Span into the second chain */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(90, ==, evbuffer_copyout_from(buf, &ptr, tmp, 90));
+ tt_int_op(0, ==, memcmp(tmp, string+15, 90));
+
+ /* Span into the third chain */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(160, ==, evbuffer_copyout_from(buf, &ptr, tmp, 160));
+ tt_int_op(0, ==, memcmp(tmp, string+15, 160));
+
+ /* Overrun */
+ memset(tmp, 0, sizeof(tmp));
+ tt_int_op(206-15, ==, evbuffer_copyout_from(buf, &ptr, tmp, 999));
+ tt_int_op(0, ==, memcmp(tmp, string+15, 206-15));
+
+ /* That was supposed to be nondestructive, too */
+ tt_int_op(206, ==, evbuffer_get_length(buf));
+
+end:
+ if (buf)
+ evbuffer_free(buf);
+}
+
+static void *
+setup_passthrough(const struct testcase_t *testcase)
+{
+ return testcase->setup_data;
+}
+static int
+cleanup_passthrough(const struct testcase_t *testcase, void *ptr)
+{
+ (void) ptr;
+ return 1;
+}
+
+static const struct testcase_setup_t nil_setup = {
+ setup_passthrough,
+ cleanup_passthrough
+};
+
+struct testcase_t evbuffer_testcases[] = {
+ { "evbuffer", test_evbuffer, 0, NULL, NULL },
+ { "remove_buffer_with_empty", test_evbuffer_remove_buffer_with_empty, 0, NULL, NULL },
+ { "reserve2", test_evbuffer_reserve2, 0, NULL, NULL },
+ { "reserve_many", test_evbuffer_reserve_many, 0, NULL, NULL },
+ { "reserve_many2", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"add" },
+ { "reserve_many3", test_evbuffer_reserve_many, 0, &nil_setup, (void*)"fill" },
+ { "expand", test_evbuffer_expand, 0, NULL, NULL },
+ { "reference", test_evbuffer_reference, 0, NULL, NULL },
+ { "iterative", test_evbuffer_iterative, 0, NULL, NULL },
+ { "readln", test_evbuffer_readln, TT_NO_LOGS, &basic_setup, NULL },
+ { "search_eol", test_evbuffer_search_eol, 0, NULL, NULL },
+ { "find", test_evbuffer_find, 0, NULL, NULL },
+ { "ptr_set", test_evbuffer_ptr_set, 0, NULL, NULL },
+ { "search", test_evbuffer_search, 0, NULL, NULL },
+ { "callbacks", test_evbuffer_callbacks, 0, NULL, NULL },
+ { "add_reference", test_evbuffer_add_reference, 0, NULL, NULL },
+ { "multicast", test_evbuffer_multicast, 0, NULL, NULL },
+ { "multicast_drain", test_evbuffer_multicast_drain, 0, NULL, NULL },
+ { "prepend", test_evbuffer_prepend, TT_FORK, NULL, NULL },
+ { "peek", test_evbuffer_peek, 0, NULL, NULL },
+ { "freeze_start", test_evbuffer_freeze, 0, &nil_setup, (void*)"start" },
+ { "freeze_end", test_evbuffer_freeze, 0, &nil_setup, (void*)"end" },
+ { "add_iovec", test_evbuffer_add_iovec, 0, NULL, NULL},
+ { "copyout", test_evbuffer_copyout, 0, NULL, NULL},
+ { "file_segment_add_cleanup_cb", test_evbuffer_file_segment_add_cleanup_cb, 0, NULL, NULL },
+
+#define ADDFILE_TEST(name, parameters) \
+ { name, test_evbuffer_add_file, TT_FORK|TT_NEED_BASE, \
+ &basic_setup, (void*)(parameters) }
+
+#define ADDFILE_TEST_GROUP(name, parameters) \
+ ADDFILE_TEST(name "_sendfile", "sendfile " parameters), \
+ ADDFILE_TEST(name "_mmap", "mmap " parameters), \
+ ADDFILE_TEST(name "_linear", "linear " parameters)
+
+ ADDFILE_TEST_GROUP("add_file", ""),
+ ADDFILE_TEST("add_file_nosegment", "default nosegment"),
+
+ ADDFILE_TEST_GROUP("add_big_file", "bigfile"),
+ ADDFILE_TEST("add_big_file_nosegment", "default nosegment bigfile"),
+
+ ADDFILE_TEST_GROUP("add_file_offset", "bigfile map_offset"),
+ ADDFILE_TEST("add_file_offset_nosegment",
+ "default nosegment bigfile map_offset"),
+
+ ADDFILE_TEST_GROUP("add_file_offset2", "bigfile offset_in_segment"),
+
+ ADDFILE_TEST_GROUP("add_file_offset3",
+ "bigfile offset_in_segment map_offset"),
+
+ END_OF_TESTCASES
+};
diff --git a/sntp/libevent/test/regress_bufferevent.c b/sntp/libevent/test/regress_bufferevent.c
new file mode 100644
index 000000000000..4ec2dccf43e9
--- /dev/null
+++ b/sntp/libevent/test/regress_bufferevent.c
@@ -0,0 +1,1014 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+/* The old tests here need assertions to work. */
+#undef NDEBUG
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#endif
+#include <fcntl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+
+#ifdef EVENT__HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+#include "event2/event-config.h"
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/event_compat.h"
+#include "event2/tag.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent.h"
+#include "event2/bufferevent_compat.h"
+#include "event2/bufferevent_struct.h"
+#include "event2/listener.h"
+#include "event2/util.h"
+
+#include "bufferevent-internal.h"
+#include "util-internal.h"
+#ifdef _WIN32
+#include "iocp-internal.h"
+#endif
+
+#include "regress.h"
+#include "regress_testutils.h"
+
+/*
+ * simple bufferevent test
+ */
+
+static void
+readcb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bev->input) == 8333) {
+ struct evbuffer *evbuf = evbuffer_new();
+ assert(evbuf != NULL);
+
+ /* gratuitous test of bufferevent_read_buffer */
+ bufferevent_read_buffer(bev, evbuf);
+
+ bufferevent_disable(bev, EV_READ);
+
+ if (evbuffer_get_length(evbuf) == 8333) {
+ test_ok++;
+ }
+
+ evbuffer_free(evbuf);
+ }
+}
+
+static void
+writecb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bev->output) == 0) {
+ test_ok++;
+ }
+}
+
+static void
+errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ test_ok = -2;
+}
+
+static void
+test_bufferevent_impl(int use_pair)
+{
+ struct bufferevent *bev1 = NULL, *bev2 = NULL;
+ char buffer[8333];
+ int i;
+
+ if (use_pair) {
+ struct bufferevent *pair[2];
+ tt_assert(0 == bufferevent_pair_new(NULL, 0, pair));
+ bev1 = pair[0];
+ bev2 = pair[1];
+ bufferevent_setcb(bev1, readcb, writecb, errorcb, bev1);
+ bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
+ tt_int_op(bufferevent_getfd(bev1), ==, -1);
+ tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
+ tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, bev2);
+ tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, bev1);
+ } else {
+ bev1 = bufferevent_new(pair[0], readcb, writecb, errorcb, NULL);
+ bev2 = bufferevent_new(pair[1], readcb, writecb, errorcb, NULL);
+ tt_int_op(bufferevent_getfd(bev1), ==, pair[0]);
+ tt_ptr_op(bufferevent_get_underlying(bev1), ==, NULL);
+ tt_ptr_op(bufferevent_pair_get_partner(bev1), ==, NULL);
+ tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
+ }
+
+ {
+ /* Test getcb. */
+ bufferevent_data_cb r, w;
+ bufferevent_event_cb e;
+ void *a;
+ bufferevent_getcb(bev1, &r, &w, &e, &a);
+ tt_ptr_op(r, ==, readcb);
+ tt_ptr_op(w, ==, writecb);
+ tt_ptr_op(e, ==, errorcb);
+ tt_ptr_op(a, ==, use_pair ? bev1 : NULL);
+ }
+
+ bufferevent_disable(bev1, EV_READ);
+ bufferevent_enable(bev2, EV_READ);
+
+ tt_int_op(bufferevent_get_enabled(bev1), ==, EV_WRITE);
+ tt_int_op(bufferevent_get_enabled(bev2), ==, EV_WRITE|EV_READ);
+
+ for (i = 0; i < (int)sizeof(buffer); i++)
+ buffer[i] = i;
+
+ bufferevent_write(bev1, buffer, sizeof(buffer));
+
+ event_dispatch();
+
+ bufferevent_free(bev1);
+ tt_ptr_op(bufferevent_pair_get_partner(bev2), ==, NULL);
+ bufferevent_free(bev2);
+
+ if (test_ok != 2)
+ test_ok = 0;
+end:
+ ;
+}
+
+static void
+test_bufferevent(void)
+{
+ test_bufferevent_impl(0);
+}
+
+static void
+test_bufferevent_pair(void)
+{
+ test_bufferevent_impl(1);
+}
+
+/*
+ * test watermarks and bufferevent
+ */
+
+static void
+wm_readcb(struct bufferevent *bev, void *arg)
+{
+ struct evbuffer *evbuf = evbuffer_new();
+ int len = (int)evbuffer_get_length(bev->input);
+ static int nread;
+
+ assert(len >= 10 && len <= 20);
+
+ assert(evbuf != NULL);
+
+ /* gratuitous test of bufferevent_read_buffer */
+ bufferevent_read_buffer(bev, evbuf);
+
+ nread += len;
+ if (nread == 65000) {
+ bufferevent_disable(bev, EV_READ);
+ test_ok++;
+ }
+
+ evbuffer_free(evbuf);
+}
+
+static void
+wm_writecb(struct bufferevent *bev, void *arg)
+{
+ assert(evbuffer_get_length(bev->output) <= 100);
+ if (evbuffer_get_length(bev->output) == 0) {
+ evbuffer_drain(bev->output, evbuffer_get_length(bev->output));
+ test_ok++;
+ }
+}
+
+static void
+wm_errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ test_ok = -2;
+}
+
+static void
+test_bufferevent_watermarks_impl(int use_pair)
+{
+ struct bufferevent *bev1 = NULL, *bev2 = NULL;
+ char buffer[65000];
+ size_t low, high;
+ int i;
+ test_ok = 0;
+
+ if (use_pair) {
+ struct bufferevent *pair[2];
+ tt_assert(0 == bufferevent_pair_new(NULL, 0, pair));
+ bev1 = pair[0];
+ bev2 = pair[1];
+ bufferevent_setcb(bev1, NULL, wm_writecb, errorcb, NULL);
+ bufferevent_setcb(bev2, wm_readcb, NULL, errorcb, NULL);
+ } else {
+ bev1 = bufferevent_new(pair[0], NULL, wm_writecb, wm_errorcb, NULL);
+ bev2 = bufferevent_new(pair[1], wm_readcb, NULL, wm_errorcb, NULL);
+ }
+ tt_assert(bev1);
+ tt_assert(bev2);
+ bufferevent_disable(bev1, EV_READ);
+ bufferevent_enable(bev2, EV_READ);
+
+ /* By default, low watermarks are set to 0 */
+ bufferevent_getwatermark(bev1, EV_READ, &low, NULL);
+ tt_int_op(low, ==, 0);
+ bufferevent_getwatermark(bev2, EV_WRITE, &low, NULL);
+ tt_int_op(low, ==, 0);
+
+ for (i = 0; i < (int)sizeof(buffer); i++)
+ buffer[i] = (char)i;
+
+ /* limit the reading on the receiving bufferevent */
+ bufferevent_setwatermark(bev2, EV_READ, 10, 20);
+
+ bufferevent_getwatermark(bev2, EV_READ, &low, &high);
+ tt_int_op(low, ==, 10);
+ tt_int_op(high, ==, 20);
+
+ /* Tell the sending bufferevent not to notify us till it's down to
+ 100 bytes. */
+ bufferevent_setwatermark(bev1, EV_WRITE, 100, 2000);
+
+ bufferevent_getwatermark(bev1, EV_WRITE, &low, &high);
+ tt_int_op(low, ==, 100);
+ tt_int_op(high, ==, 2000);
+
+ bufferevent_write(bev1, buffer, sizeof(buffer));
+
+ event_dispatch();
+
+ tt_int_op(test_ok, ==, 2);
+
+ /* The write callback drained all the data from outbuf, so we
+ * should have removed the write event... */
+ tt_assert(!event_pending(&bev2->ev_write, EV_WRITE, NULL));
+
+end:
+ if (bev1)
+ bufferevent_free(bev1);
+ if (bev2)
+ bufferevent_free(bev2);
+}
+
+static void
+test_bufferevent_watermarks(void)
+{
+ test_bufferevent_watermarks_impl(0);
+}
+
+static void
+test_bufferevent_pair_watermarks(void)
+{
+ test_bufferevent_watermarks_impl(1);
+}
+
+/*
+ * Test bufferevent filters
+ */
+
+/* strip an 'x' from each byte */
+
+static enum bufferevent_filter_result
+bufferevent_input_filter(struct evbuffer *src, struct evbuffer *dst,
+ ev_ssize_t lim, enum bufferevent_flush_mode state, void *ctx)
+{
+ const unsigned char *buffer;
+ unsigned i;
+
+ buffer = evbuffer_pullup(src, evbuffer_get_length(src));
+ for (i = 0; i < evbuffer_get_length(src); i += 2) {
+ assert(buffer[i] == 'x');
+ evbuffer_add(dst, buffer + i + 1, 1);
+
+ if (i + 2 > evbuffer_get_length(src))
+ break;
+ }
+
+ evbuffer_drain(src, i);
+ return (BEV_OK);
+}
+
+/* add an 'x' before each byte */
+
+static enum bufferevent_filter_result
+bufferevent_output_filter(struct evbuffer *src, struct evbuffer *dst,
+ ev_ssize_t lim, enum bufferevent_flush_mode state, void *ctx)
+{
+ const unsigned char *buffer;
+ unsigned i;
+
+ buffer = evbuffer_pullup(src, evbuffer_get_length(src));
+ for (i = 0; i < evbuffer_get_length(src); ++i) {
+ evbuffer_add(dst, "x", 1);
+ evbuffer_add(dst, buffer + i, 1);
+ }
+
+ evbuffer_drain(src, evbuffer_get_length(src));
+ return (BEV_OK);
+}
+
+static void
+test_bufferevent_filters_impl(int use_pair)
+{
+ struct bufferevent *bev1 = NULL, *bev2 = NULL;
+ struct bufferevent *bev1_base = NULL, *bev2_base = NULL;
+ char buffer[8333];
+ int i;
+
+ test_ok = 0;
+
+ if (use_pair) {
+ struct bufferevent *pair[2];
+ tt_assert(0 == bufferevent_pair_new(NULL, 0, pair));
+ bev1 = pair[0];
+ bev2 = pair[1];
+ } else {
+ bev1 = bufferevent_socket_new(NULL, pair[0], 0);
+ bev2 = bufferevent_socket_new(NULL, pair[1], 0);
+ }
+ bev1_base = bev1;
+ bev2_base = bev2;
+
+ for (i = 0; i < (int)sizeof(buffer); i++)
+ buffer[i] = i;
+
+ bev1 = bufferevent_filter_new(bev1, NULL, bufferevent_output_filter,
+ BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
+
+ bev2 = bufferevent_filter_new(bev2, bufferevent_input_filter,
+ NULL, BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
+ bufferevent_setcb(bev1, NULL, writecb, errorcb, NULL);
+ bufferevent_setcb(bev2, readcb, NULL, errorcb, NULL);
+
+ tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev1_base);
+ tt_ptr_op(bufferevent_get_underlying(bev2), ==, bev2_base);
+ tt_int_op(bufferevent_getfd(bev1), ==, -1);
+ tt_int_op(bufferevent_getfd(bev2), ==, -1);
+
+ bufferevent_disable(bev1, EV_READ);
+ bufferevent_enable(bev2, EV_READ);
+ /* insert some filters */
+ bufferevent_write(bev1, buffer, sizeof(buffer));
+
+ event_dispatch();
+
+ if (test_ok != 2)
+ test_ok = 0;
+
+end:
+ if (bev1)
+ bufferevent_free(bev1);
+ if (bev2)
+ bufferevent_free(bev2);
+
+}
+
+static void
+test_bufferevent_filters(void)
+{
+ test_bufferevent_filters_impl(0);
+}
+
+static void
+test_bufferevent_pair_filters(void)
+{
+ test_bufferevent_filters_impl(1);
+}
+
+
+static void
+sender_writecb(struct bufferevent *bev, void *ctx)
+{
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ bufferevent_disable(bev,EV_READ|EV_WRITE);
+ TT_BLATHER(("Flushed %d: freeing it.", (int)bufferevent_getfd(bev)));
+ bufferevent_free(bev);
+ }
+}
+
+static void
+sender_errorcb(struct bufferevent *bev, short what, void *ctx)
+{
+ TT_FAIL(("Got sender error %d",(int)what));
+}
+
+static int bufferevent_connect_test_flags = 0;
+static int bufferevent_trigger_test_flags = 0;
+static int n_strings_read = 0;
+static int n_reads_invoked = 0;
+
+#define TEST_STR "Now is the time for all good events to signal for " \
+ "the good of their protocol"
+static void
+listen_cb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *sa, int socklen, void *arg)
+{
+ struct event_base *base = arg;
+ struct bufferevent *bev;
+ const char s[] = TEST_STR;
+ TT_BLATHER(("Got a request on socket %d", (int)fd ));
+ bev = bufferevent_socket_new(base, fd, bufferevent_connect_test_flags);
+ tt_assert(bev);
+ bufferevent_setcb(bev, NULL, sender_writecb, sender_errorcb, NULL);
+ bufferevent_write(bev, s, sizeof(s));
+end:
+ ;
+}
+
+static void
+reader_eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct event_base *base = ctx;
+ if (what & BEV_EVENT_ERROR) {
+ perror("foobar");
+ TT_FAIL(("got connector error %d", (int)what));
+ return;
+ }
+ if (what & BEV_EVENT_CONNECTED) {
+ TT_BLATHER(("connected on %d", (int)bufferevent_getfd(bev)));
+ bufferevent_enable(bev, EV_READ);
+ }
+ if (what & BEV_EVENT_EOF) {
+ char buf[512];
+ size_t n;
+ n = bufferevent_read(bev, buf, sizeof(buf)-1);
+ tt_int_op(n, >=, 0);
+ buf[n] = '\0';
+ tt_str_op(buf, ==, TEST_STR);
+ if (++n_strings_read == 2)
+ event_base_loopexit(base, NULL);
+ TT_BLATHER(("EOF on %d: %d strings read.",
+ (int)bufferevent_getfd(bev), n_strings_read));
+ }
+end:
+ ;
+}
+
+static void
+reader_readcb(struct bufferevent *bev, void *ctx)
+{
+ TT_BLATHER(("Read invoked on %d.", (int)bufferevent_getfd(bev)));
+ n_reads_invoked++;
+}
+
+static void
+test_bufferevent_connect(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evconnlistener *lev=NULL;
+ struct bufferevent *bev1=NULL, *bev2=NULL;
+ struct sockaddr_in localhost;
+ struct sockaddr_storage ss;
+ struct sockaddr *sa;
+ ev_socklen_t slen;
+
+ int be_flags=BEV_OPT_CLOSE_ON_FREE;
+
+ if (strstr((char*)data->setup_data, "defer")) {
+ be_flags |= BEV_OPT_DEFER_CALLBACKS;
+ }
+ if (strstr((char*)data->setup_data, "unlocked")) {
+ be_flags |= BEV_OPT_UNLOCK_CALLBACKS;
+ }
+ if (strstr((char*)data->setup_data, "lock")) {
+ be_flags |= BEV_OPT_THREADSAFE;
+ }
+ bufferevent_connect_test_flags = be_flags;
+#ifdef _WIN32
+ if (!strcmp((char*)data->setup_data, "unset_connectex")) {
+ struct win32_extension_fns *ext =
+ (struct win32_extension_fns *)
+ event_get_win32_extension_fns_();
+ ext->ConnectEx = NULL;
+ }
+#endif
+
+ memset(&localhost, 0, sizeof(localhost));
+
+ localhost.sin_port = 0; /* pick-a-port */
+ localhost.sin_addr.s_addr = htonl(0x7f000001L);
+ localhost.sin_family = AF_INET;
+ sa = (struct sockaddr *)&localhost;
+ lev = evconnlistener_new_bind(data->base, listen_cb, data->base,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
+ 16, sa, sizeof(localhost));
+ tt_assert(lev);
+
+ sa = (struct sockaddr *)&ss;
+ slen = sizeof(ss);
+ if (regress_get_listener_addr(lev, sa, &slen) < 0) {
+ tt_abort_perror("getsockname");
+ }
+
+ tt_assert(!evconnlistener_enable(lev));
+ bev1 = bufferevent_socket_new(data->base, -1, be_flags);
+ bev2 = bufferevent_socket_new(data->base, -1, be_flags);
+ tt_assert(bev1);
+ tt_assert(bev2);
+ bufferevent_setcb(bev1, reader_readcb,NULL, reader_eventcb, data->base);
+ bufferevent_setcb(bev2, reader_readcb,NULL, reader_eventcb, data->base);
+
+ bufferevent_enable(bev1, EV_READ);
+ bufferevent_enable(bev2, EV_READ);
+
+ tt_want(!bufferevent_socket_connect(bev1, sa, sizeof(localhost)));
+ tt_want(!bufferevent_socket_connect(bev2, sa, sizeof(localhost)));
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(n_strings_read, ==, 2);
+ tt_int_op(n_reads_invoked, >=, 2);
+end:
+ if (lev)
+ evconnlistener_free(lev);
+
+ if (bev1)
+ bufferevent_free(bev1);
+
+ if (bev2)
+ bufferevent_free(bev2);
+}
+
+static void
+want_fail_eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct event_base *base = ctx;
+ const char *err;
+ evutil_socket_t s;
+
+ if (what & BEV_EVENT_ERROR) {
+ s = bufferevent_getfd(bev);
+ err = evutil_socket_error_to_string(evutil_socket_geterror(s));
+ TT_BLATHER(("connection failure on "EV_SOCK_FMT": %s",
+ EV_SOCK_ARG(s), err));
+ test_ok = 1;
+ } else {
+ TT_FAIL(("didn't fail? what %hd", what));
+ }
+
+ event_base_loopexit(base, NULL);
+}
+
+static void
+close_socket_cb(evutil_socket_t fd, short what, void *arg)
+{
+ evutil_socket_t *fdp = arg;
+ if (*fdp >= 0) {
+ evutil_closesocket(*fdp);
+ *fdp = -1;
+ }
+}
+
+static void
+test_bufferevent_connect_fail(void *arg)
+{
+ struct basic_test_data *data = (struct basic_test_data *)arg;
+ struct bufferevent *bev=NULL;
+ struct sockaddr_in localhost;
+ struct sockaddr *sa = (struct sockaddr*)&localhost;
+ evutil_socket_t fake_listener = -1;
+ ev_socklen_t slen = sizeof(localhost);
+ struct event close_listener_event;
+ int close_listener_event_added = 0;
+ struct timeval one_second = { 1, 0 };
+ int r;
+
+ test_ok = 0;
+
+ memset(&localhost, 0, sizeof(localhost));
+ localhost.sin_port = 0; /* have the kernel pick a port */
+ localhost.sin_addr.s_addr = htonl(0x7f000001L);
+ localhost.sin_family = AF_INET;
+
+ /* bind, but don't listen or accept. should trigger
+ "Connection refused" reliably on most platforms. */
+ fake_listener = socket(localhost.sin_family, SOCK_STREAM, 0);
+ tt_assert(fake_listener >= 0);
+ tt_assert(bind(fake_listener, sa, slen) == 0);
+ tt_assert(getsockname(fake_listener, sa, &slen) == 0);
+ bev = bufferevent_socket_new(data->base, -1,
+ BEV_OPT_CLOSE_ON_FREE | BEV_OPT_DEFER_CALLBACKS);
+ tt_assert(bev);
+ bufferevent_setcb(bev, NULL, NULL, want_fail_eventcb, data->base);
+
+ r = bufferevent_socket_connect(bev, sa, slen);
+ /* XXXX we'd like to test the '0' case everywhere, but FreeBSD tells
+ * detects the error immediately, which is not really wrong of it. */
+ tt_want(r == 0 || r == -1);
+
+ /* Close the listener socket after a second. This should trigger
+ "connection refused" on some other platforms, including OSX. */
+ evtimer_assign(&close_listener_event, data->base, close_socket_cb,
+ &fake_listener);
+ event_add(&close_listener_event, &one_second);
+ close_listener_event_added = 1;
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 1);
+
+end:
+ if (fake_listener >= 0)
+ evutil_closesocket(fake_listener);
+
+ if (bev)
+ bufferevent_free(bev);
+
+ if (close_listener_event_added)
+ event_del(&close_listener_event);
+}
+
+struct timeout_cb_result {
+ struct timeval read_timeout_at;
+ struct timeval write_timeout_at;
+ struct timeval last_wrote_at;
+ int n_read_timeouts;
+ int n_write_timeouts;
+ int total_calls;
+};
+
+static void
+bev_timeout_write_cb(struct bufferevent *bev, void *arg)
+{
+ struct timeout_cb_result *res = arg;
+ evutil_gettimeofday(&res->last_wrote_at, NULL);
+}
+
+static void
+bev_timeout_event_cb(struct bufferevent *bev, short what, void *arg)
+{
+ struct timeout_cb_result *res = arg;
+ ++res->total_calls;
+
+ if ((what & (BEV_EVENT_READING|BEV_EVENT_TIMEOUT))
+ == (BEV_EVENT_READING|BEV_EVENT_TIMEOUT)) {
+ evutil_gettimeofday(&res->read_timeout_at, NULL);
+ ++res->n_read_timeouts;
+ }
+ if ((what & (BEV_EVENT_WRITING|BEV_EVENT_TIMEOUT))
+ == (BEV_EVENT_WRITING|BEV_EVENT_TIMEOUT)) {
+ evutil_gettimeofday(&res->write_timeout_at, NULL);
+ ++res->n_write_timeouts;
+ }
+}
+
+static void
+test_bufferevent_timeouts(void *arg)
+{
+ /* "arg" is a string containing "pair" and/or "filter". */
+ struct bufferevent *bev1 = NULL, *bev2 = NULL;
+ struct basic_test_data *data = arg;
+ int use_pair = 0, use_filter = 0;
+ struct timeval tv_w, tv_r, started_at;
+ struct timeout_cb_result res1, res2;
+ char buf[1024];
+
+ memset(&res1, 0, sizeof(res1));
+ memset(&res2, 0, sizeof(res2));
+
+ if (strstr((char*)data->setup_data, "pair"))
+ use_pair = 1;
+ if (strstr((char*)data->setup_data, "filter"))
+ use_filter = 1;
+
+ if (use_pair) {
+ struct bufferevent *p[2];
+ tt_int_op(0, ==, bufferevent_pair_new(data->base, 0, p));
+ bev1 = p[0];
+ bev2 = p[1];
+ } else {
+ bev1 = bufferevent_socket_new(data->base, data->pair[0], 0);
+ bev2 = bufferevent_socket_new(data->base, data->pair[1], 0);
+ }
+
+ tt_assert(bev1);
+ tt_assert(bev2);
+
+ if (use_filter) {
+ struct bufferevent *bevf1, *bevf2;
+ bevf1 = bufferevent_filter_new(bev1, NULL, NULL,
+ BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
+ bevf2 = bufferevent_filter_new(bev2, NULL, NULL,
+ BEV_OPT_CLOSE_ON_FREE, NULL, NULL);
+ tt_assert(bevf1);
+ tt_assert(bevf2);
+ bev1 = bevf1;
+ bev2 = bevf2;
+ }
+
+ /* Do this nice and early. */
+ bufferevent_disable(bev2, EV_READ);
+
+ /* bev1 will try to write and read. Both will time out. */
+ evutil_gettimeofday(&started_at, NULL);
+ tv_w.tv_sec = tv_r.tv_sec = 0;
+ tv_w.tv_usec = 100*1000;
+ tv_r.tv_usec = 150*1000;
+ bufferevent_setcb(bev1, NULL, bev_timeout_write_cb,
+ bev_timeout_event_cb, &res1);
+ bufferevent_setwatermark(bev1, EV_WRITE, 1024*1024+10, 0);
+ bufferevent_set_timeouts(bev1, &tv_r, &tv_w);
+ if (use_pair) {
+ /* For a pair, the fact that the other side isn't reading
+ * makes the writer stall */
+ bufferevent_write(bev1, "ABCDEFG", 7);
+ } else {
+ /* For a real socket, the kernel's TCP buffers can eat a
+ * fair number of bytes; make sure that at some point we
+ * have some bytes that will stall. */
+ struct evbuffer *output = bufferevent_get_output(bev1);
+ int i;
+ memset(buf, 0xbb, sizeof(buf));
+ for (i=0;i<1024;++i) {
+ evbuffer_add_reference(output, buf, sizeof(buf),
+ NULL, NULL);
+ }
+ }
+ bufferevent_enable(bev1, EV_READ|EV_WRITE);
+
+ /* bev2 has nothing to say, and isn't listening. */
+ bufferevent_setcb(bev2, NULL, bev_timeout_write_cb,
+ bev_timeout_event_cb, &res2);
+ tv_w.tv_sec = tv_r.tv_sec = 0;
+ tv_w.tv_usec = 200*1000;
+ tv_r.tv_usec = 100*1000;
+ bufferevent_set_timeouts(bev2, &tv_r, &tv_w);
+ bufferevent_enable(bev2, EV_WRITE);
+
+ tv_r.tv_sec = 0;
+ tv_r.tv_usec = 350000;
+
+ event_base_loopexit(data->base, &tv_r);
+ event_base_dispatch(data->base);
+
+ /* XXXX Test that actually reading or writing a little resets the
+ * timeouts. */
+
+ /* Each buf1 timeout happens, and happens only once. */
+ tt_want(res1.n_read_timeouts);
+ tt_want(res1.n_write_timeouts);
+ tt_want(res1.n_read_timeouts == 1);
+ tt_want(res1.n_write_timeouts == 1);
+
+ test_timeval_diff_eq(&started_at, &res1.read_timeout_at, 150);
+ test_timeval_diff_eq(&started_at, &res1.write_timeout_at, 100);
+
+end:
+ if (bev1)
+ bufferevent_free(bev1);
+ if (bev2)
+ bufferevent_free(bev2);
+}
+
+static void
+trigger_failure_cb(evutil_socket_t fd, short what, void *ctx)
+{
+ TT_FAIL(("The triggered callback did not fire or the machine is really slow (try increasing timeout)."));
+}
+
+static void
+trigger_eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct event_base *base = ctx;
+ if (what == ~0) {
+ TT_BLATHER(("Event successfully triggered."));
+ event_base_loopexit(base, NULL);
+ return;
+ }
+ reader_eventcb(bev, what, ctx);
+}
+
+static void
+trigger_readcb_triggered(struct bufferevent *bev, void *ctx)
+{
+ TT_BLATHER(("Read successfully triggered."));
+ n_reads_invoked++;
+ bufferevent_trigger_event(bev, ~0, bufferevent_trigger_test_flags);
+}
+
+static void
+trigger_readcb(struct bufferevent *bev, void *ctx)
+{
+ struct timeval timeout = { 30, 0 };
+ struct event_base *base = ctx;
+ size_t low, high, len;
+ int expected_reads;
+
+ TT_BLATHER(("Read invoked on %d.", (int)bufferevent_getfd(bev)));
+ expected_reads = ++n_reads_invoked;
+
+ bufferevent_setcb(bev, trigger_readcb_triggered, NULL, trigger_eventcb, ctx);
+
+ bufferevent_getwatermark(bev, EV_READ, &low, &high);
+ len = evbuffer_get_length(bufferevent_get_input(bev));
+
+ bufferevent_setwatermark(bev, EV_READ, len + 1, 0);
+ bufferevent_trigger(bev, EV_READ, bufferevent_trigger_test_flags);
+ /* no callback expected */
+ tt_int_op(n_reads_invoked, ==, expected_reads);
+
+ if ((bufferevent_trigger_test_flags & BEV_TRIG_DEFER_CALLBACKS) ||
+ (bufferevent_connect_test_flags & BEV_OPT_DEFER_CALLBACKS)) {
+ /* will be deferred */
+ } else {
+ expected_reads++;
+ }
+
+ event_base_once(base, -1, EV_TIMEOUT, trigger_failure_cb, NULL, &timeout);
+
+ bufferevent_trigger(bev, EV_READ,
+ bufferevent_trigger_test_flags | BEV_TRIG_IGNORE_WATERMARKS);
+ tt_int_op(n_reads_invoked, ==, expected_reads);
+
+ bufferevent_setwatermark(bev, EV_READ, low, high);
+end:
+ ;
+}
+
+static void
+test_bufferevent_trigger(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evconnlistener *lev=NULL;
+ struct bufferevent *bev=NULL;
+ struct sockaddr_in localhost;
+ struct sockaddr_storage ss;
+ struct sockaddr *sa;
+ ev_socklen_t slen;
+
+ int be_flags=BEV_OPT_CLOSE_ON_FREE;
+ int trig_flags=0;
+
+ if (strstr((char*)data->setup_data, "defer")) {
+ be_flags |= BEV_OPT_DEFER_CALLBACKS;
+ }
+ bufferevent_connect_test_flags = be_flags;
+
+ if (strstr((char*)data->setup_data, "postpone")) {
+ trig_flags |= BEV_TRIG_DEFER_CALLBACKS;
+ }
+ bufferevent_trigger_test_flags = trig_flags;
+
+ memset(&localhost, 0, sizeof(localhost));
+
+ localhost.sin_port = 0; /* pick-a-port */
+ localhost.sin_addr.s_addr = htonl(0x7f000001L);
+ localhost.sin_family = AF_INET;
+ sa = (struct sockaddr *)&localhost;
+ lev = evconnlistener_new_bind(data->base, listen_cb, data->base,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
+ 16, sa, sizeof(localhost));
+ tt_assert(lev);
+
+ sa = (struct sockaddr *)&ss;
+ slen = sizeof(ss);
+ if (regress_get_listener_addr(lev, sa, &slen) < 0) {
+ tt_abort_perror("getsockname");
+ }
+
+ tt_assert(!evconnlistener_enable(lev));
+ bev = bufferevent_socket_new(data->base, -1, be_flags);
+ tt_assert(bev);
+ bufferevent_setcb(bev, trigger_readcb, NULL, trigger_eventcb, data->base);
+
+ bufferevent_enable(bev, EV_READ);
+
+ tt_want(!bufferevent_socket_connect(bev, sa, sizeof(localhost)));
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(n_reads_invoked, ==, 2);
+end:
+ if (lev)
+ evconnlistener_free(lev);
+
+ if (bev)
+ bufferevent_free(bev);
+}
+
+struct testcase_t bufferevent_testcases[] = {
+
+ LEGACY(bufferevent, TT_ISOLATED),
+ LEGACY(bufferevent_pair, TT_ISOLATED),
+ LEGACY(bufferevent_watermarks, TT_ISOLATED),
+ LEGACY(bufferevent_pair_watermarks, TT_ISOLATED),
+ LEGACY(bufferevent_filters, TT_ISOLATED),
+ LEGACY(bufferevent_pair_filters, TT_ISOLATED),
+ { "bufferevent_connect", test_bufferevent_connect, TT_FORK|TT_NEED_BASE,
+ &basic_setup, (void*)"" },
+ { "bufferevent_connect_defer", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"defer" },
+ { "bufferevent_connect_lock", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS, &basic_setup, (void*)"lock" },
+ { "bufferevent_connect_lock_defer", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS, &basic_setup,
+ (void*)"defer lock" },
+ { "bufferevent_connect_unlocked_cbs", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS, &basic_setup,
+ (void*)"lock defer unlocked" },
+ { "bufferevent_connect_fail", test_bufferevent_connect_fail,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "bufferevent_timeout", test_bufferevent_timeouts,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR, &basic_setup, (void*)"" },
+ { "bufferevent_timeout_pair", test_bufferevent_timeouts,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"pair" },
+ { "bufferevent_timeout_filter", test_bufferevent_timeouts,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"filter" },
+ { "bufferevent_timeout_filter_pair", test_bufferevent_timeouts,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"filter pair" },
+ { "bufferevent_trigger", test_bufferevent_trigger, TT_FORK|TT_NEED_BASE,
+ &basic_setup, (void*)"" },
+ { "bufferevent_trigger_defer", test_bufferevent_trigger,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (void*)"defer" },
+ { "bufferevent_trigger_postpone", test_bufferevent_trigger,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS, &basic_setup,
+ (void*)"postpone" },
+ { "bufferevent_trigger_defer_postpone", test_bufferevent_trigger,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS, &basic_setup,
+ (void*)"defer postpone" },
+#ifdef EVENT__HAVE_LIBZ
+ LEGACY(bufferevent_zlib, TT_ISOLATED),
+#else
+ { "bufferevent_zlib", NULL, TT_SKIP, NULL, NULL },
+#endif
+
+ END_OF_TESTCASES,
+};
+
+struct testcase_t bufferevent_iocp_testcases[] = {
+
+ LEGACY(bufferevent, TT_ISOLATED|TT_ENABLE_IOCP),
+ LEGACY(bufferevent_watermarks, TT_ISOLATED|TT_ENABLE_IOCP),
+ LEGACY(bufferevent_filters, TT_ISOLATED|TT_ENABLE_IOCP),
+ { "bufferevent_connect", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"" },
+ { "bufferevent_connect_defer", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, (void*)"defer" },
+ { "bufferevent_connect_lock", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"lock" },
+ { "bufferevent_connect_lock_defer", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_NEED_THREADS|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"defer lock" },
+ { "bufferevent_connect_fail", test_bufferevent_connect_fail,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup, NULL },
+ { "bufferevent_connect_nonblocking", test_bufferevent_connect,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP, &basic_setup,
+ (void*)"unset_connectex" },
+
+ END_OF_TESTCASES,
+};
diff --git a/sntp/libevent/test/regress_dns.c b/sntp/libevent/test/regress_dns.c
new file mode 100644
index 000000000000..338c4ee8fd54
--- /dev/null
+++ b/sntp/libevent/test/regress_dns.c
@@ -0,0 +1,1922 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#include <ws2tcpip.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <signal.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/dns.h"
+#include "event2/dns_compat.h"
+#include "event2/dns_struct.h"
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/event_struct.h"
+#include "event2/util.h"
+#include "event2/listener.h"
+#include "event2/bufferevent.h"
+#include "log-internal.h"
+#include "regress.h"
+#include "regress_testutils.h"
+
+static int dns_ok = 0;
+static int dns_got_cancel = 0;
+static int dns_err = 0;
+
+
+static void
+dns_gethostbyname_cb(int result, char type, int count, int ttl,
+ void *addresses, void *arg)
+{
+ dns_ok = dns_err = 0;
+
+ if (result == DNS_ERR_TIMEOUT) {
+ printf("[Timed out] ");
+ dns_err = result;
+ goto out;
+ }
+
+ if (result != DNS_ERR_NONE) {
+ printf("[Error code %d] ", result);
+ goto out;
+ }
+
+ TT_BLATHER(("type: %d, count: %d, ttl: %d: ", type, count, ttl));
+
+ switch (type) {
+ case DNS_IPv6_AAAA: {
+#if defined(EVENT__HAVE_STRUCT_IN6_ADDR) && defined(EVENT__HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
+ struct in6_addr *in6_addrs = addresses;
+ char buf[INET6_ADDRSTRLEN+1];
+ int i;
+ /* a resolution that's not valid does not help */
+ if (ttl < 0)
+ goto out;
+ for (i = 0; i < count; ++i) {
+ const char *b = evutil_inet_ntop(AF_INET6, &in6_addrs[i], buf,sizeof(buf));
+ if (b)
+ TT_BLATHER(("%s ", b));
+ else
+ TT_BLATHER(("%s ", strerror(errno)));
+ }
+#endif
+ break;
+ }
+ case DNS_IPv4_A: {
+ struct in_addr *in_addrs = addresses;
+ int i;
+ /* a resolution that's not valid does not help */
+ if (ttl < 0)
+ goto out;
+ for (i = 0; i < count; ++i)
+ TT_BLATHER(("%s ", inet_ntoa(in_addrs[i])));
+ break;
+ }
+ case DNS_PTR:
+ /* may get at most one PTR */
+ if (count != 1)
+ goto out;
+
+ TT_BLATHER(("%s ", *(char **)addresses));
+ break;
+ default:
+ goto out;
+ }
+
+ dns_ok = type;
+
+out:
+ if (arg == NULL)
+ event_loopexit(NULL);
+ else
+ event_base_loopexit((struct event_base *)arg, NULL);
+}
+
+static void
+dns_gethostbyname(void)
+{
+ dns_ok = 0;
+ evdns_resolve_ipv4("www.monkey.org", 0, dns_gethostbyname_cb, NULL);
+ event_dispatch();
+
+ tt_int_op(dns_ok, ==, DNS_IPv4_A);
+ test_ok = dns_ok;
+end:
+ ;
+}
+
+static void
+dns_gethostbyname6(void)
+{
+ dns_ok = 0;
+ evdns_resolve_ipv6("www.ietf.org", 0, dns_gethostbyname_cb, NULL);
+ event_dispatch();
+
+ if (!dns_ok && dns_err == DNS_ERR_TIMEOUT) {
+ tt_skip();
+ }
+
+ tt_int_op(dns_ok, ==, DNS_IPv6_AAAA);
+ test_ok = 1;
+end:
+ ;
+}
+
+static void
+dns_gethostbyaddr(void)
+{
+ struct in_addr in;
+ in.s_addr = htonl(0x7f000001ul); /* 127.0.0.1 */
+ dns_ok = 0;
+ evdns_resolve_reverse(&in, 0, dns_gethostbyname_cb, NULL);
+ event_dispatch();
+
+ tt_int_op(dns_ok, ==, DNS_PTR);
+ test_ok = dns_ok;
+end:
+ ;
+}
+
+static void
+dns_resolve_reverse(void *ptr)
+{
+ struct in_addr in;
+ struct event_base *base = event_base_new();
+ struct evdns_base *dns = evdns_base_new(base, 1/* init name servers */);
+ struct evdns_request *req = NULL;
+
+ tt_assert(base);
+ tt_assert(dns);
+ in.s_addr = htonl(0x7f000001ul); /* 127.0.0.1 */
+ dns_ok = 0;
+
+ req = evdns_base_resolve_reverse(
+ dns, &in, 0, dns_gethostbyname_cb, base);
+ tt_assert(req);
+
+ event_base_dispatch(base);
+
+ tt_int_op(dns_ok, ==, DNS_PTR);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+ if (base)
+ event_base_free(base);
+}
+
+static int n_server_responses = 0;
+
+static void
+dns_server_request_cb(struct evdns_server_request *req, void *data)
+{
+ int i, r;
+ const char TEST_ARPA[] = "11.11.168.192.in-addr.arpa";
+ const char TEST_IN6[] =
+ "f.e.f.e." "0.0.0.0." "0.0.0.0." "1.1.1.1."
+ "a.a.a.a." "0.0.0.0." "0.0.0.0." "0.f.f.f.ip6.arpa";
+
+ for (i = 0; i < req->nquestions; ++i) {
+ const int qtype = req->questions[i]->type;
+ const int qclass = req->questions[i]->dns_question_class;
+ const char *qname = req->questions[i]->name;
+
+ struct in_addr ans;
+ ans.s_addr = htonl(0xc0a80b0bUL); /* 192.168.11.11 */
+ if (qtype == EVDNS_TYPE_A &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, "zz.example.com")) {
+ r = evdns_server_request_add_a_reply(req, qname,
+ 1, &ans.s_addr, 12345);
+ if (r<0)
+ dns_ok = 0;
+ } else if (qtype == EVDNS_TYPE_AAAA &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, "zz.example.com")) {
+ char addr6[17] = "abcdefghijklmnop";
+ r = evdns_server_request_add_aaaa_reply(req,
+ qname, 1, addr6, 123);
+ if (r<0)
+ dns_ok = 0;
+ } else if (qtype == EVDNS_TYPE_PTR &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, TEST_ARPA)) {
+ r = evdns_server_request_add_ptr_reply(req, NULL,
+ qname, "ZZ.EXAMPLE.COM", 54321);
+ if (r<0)
+ dns_ok = 0;
+ } else if (qtype == EVDNS_TYPE_PTR &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, TEST_IN6)){
+ r = evdns_server_request_add_ptr_reply(req, NULL,
+ qname,
+ "ZZ-INET6.EXAMPLE.COM", 54322);
+ if (r<0)
+ dns_ok = 0;
+ } else if (qtype == EVDNS_TYPE_A &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, "drop.example.com")) {
+ if (evdns_server_request_drop(req)<0)
+ dns_ok = 0;
+ return;
+ } else {
+ printf("Unexpected question %d %d \"%s\" ",
+ qtype, qclass, qname);
+ dns_ok = 0;
+ }
+ }
+ r = evdns_server_request_respond(req, 0);
+ if (r<0) {
+ printf("Couldn't send reply. ");
+ dns_ok = 0;
+ }
+}
+
+static void
+dns_server_gethostbyname_cb(int result, char type, int count, int ttl,
+ void *addresses, void *arg)
+{
+ if (result == DNS_ERR_CANCEL) {
+ if (arg != (void*)(char*)90909) {
+ printf("Unexpected cancelation");
+ dns_ok = 0;
+ }
+ dns_got_cancel = 1;
+ goto out;
+ }
+ if (result != DNS_ERR_NONE) {
+ printf("Unexpected result %d. ", result);
+ dns_ok = 0;
+ goto out;
+ }
+ if (count != 1) {
+ printf("Unexpected answer count %d. ", count);
+ dns_ok = 0;
+ goto out;
+ }
+ switch (type) {
+ case DNS_IPv4_A: {
+ struct in_addr *in_addrs = addresses;
+ if (in_addrs[0].s_addr != htonl(0xc0a80b0bUL) || ttl != 12345) {
+ printf("Bad IPv4 response \"%s\" %d. ",
+ inet_ntoa(in_addrs[0]), ttl);
+ dns_ok = 0;
+ goto out;
+ }
+ break;
+ }
+ case DNS_IPv6_AAAA: {
+#if defined (EVENT__HAVE_STRUCT_IN6_ADDR) && defined(EVENT__HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN)
+ struct in6_addr *in6_addrs = addresses;
+ char buf[INET6_ADDRSTRLEN+1];
+ if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16)
+ || ttl != 123) {
+ const char *b = evutil_inet_ntop(AF_INET6, &in6_addrs[0],buf,sizeof(buf));
+ printf("Bad IPv6 response \"%s\" %d. ", b, ttl);
+ dns_ok = 0;
+ goto out;
+ }
+#endif
+ break;
+ }
+ case DNS_PTR: {
+ char **addrs = addresses;
+ if (arg != (void*)6) {
+ if (strcmp(addrs[0], "ZZ.EXAMPLE.COM") ||
+ ttl != 54321) {
+ printf("Bad PTR response \"%s\" %d. ",
+ addrs[0], ttl);
+ dns_ok = 0;
+ goto out;
+ }
+ } else {
+ if (strcmp(addrs[0], "ZZ-INET6.EXAMPLE.COM") ||
+ ttl != 54322) {
+ printf("Bad ipv6 PTR response \"%s\" %d. ",
+ addrs[0], ttl);
+ dns_ok = 0;
+ goto out;
+ }
+ }
+ break;
+ }
+ default:
+ printf("Bad response type %d. ", type);
+ dns_ok = 0;
+ }
+ out:
+ if (++n_server_responses == 3) {
+ event_loopexit(NULL);
+ }
+}
+
+static void
+dns_server(void)
+{
+ evutil_socket_t sock=-1;
+ struct sockaddr_in my_addr;
+ struct sockaddr_storage ss;
+ ev_socklen_t slen;
+ struct evdns_server_port *port=NULL;
+ struct in_addr resolve_addr;
+ struct in6_addr resolve_addr6;
+ struct evdns_base *base=NULL;
+ struct evdns_request *req=NULL;
+
+ dns_ok = 1;
+
+ base = evdns_base_new(NULL, 0);
+
+ /* Now configure a nameserver port. */
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sock<0) {
+ tt_abort_perror("socket");
+ }
+
+ evutil_make_socket_nonblocking(sock);
+
+ memset(&my_addr, 0, sizeof(my_addr));
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_port = 0; /* kernel picks */
+ my_addr.sin_addr.s_addr = htonl(0x7f000001UL);
+ if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr)) < 0) {
+ tt_abort_perror("bind");
+ }
+ slen = sizeof(ss);
+ if (getsockname(sock, (struct sockaddr*)&ss, &slen) < 0) {
+ tt_abort_perror("getsockname");
+ }
+
+ port = evdns_add_server_port(sock, 0, dns_server_request_cb, NULL);
+
+ /* Add ourself as the only nameserver, and make sure we really are
+ * the only nameserver. */
+ evdns_base_nameserver_sockaddr_add(base, (struct sockaddr*)&ss, slen, 0);
+ tt_int_op(evdns_base_count_nameservers(base), ==, 1);
+
+ /* Send some queries. */
+ evdns_base_resolve_ipv4(base, "zz.example.com", DNS_QUERY_NO_SEARCH,
+ dns_server_gethostbyname_cb, NULL);
+ evdns_base_resolve_ipv6(base, "zz.example.com", DNS_QUERY_NO_SEARCH,
+ dns_server_gethostbyname_cb, NULL);
+ resolve_addr.s_addr = htonl(0xc0a80b0bUL); /* 192.168.11.11 */
+ evdns_base_resolve_reverse(base, &resolve_addr, 0,
+ dns_server_gethostbyname_cb, NULL);
+ memcpy(resolve_addr6.s6_addr,
+ "\xff\xf0\x00\x00\x00\x00\xaa\xaa"
+ "\x11\x11\x00\x00\x00\x00\xef\xef", 16);
+ evdns_base_resolve_reverse_ipv6(base, &resolve_addr6, 0,
+ dns_server_gethostbyname_cb, (void*)6);
+
+ req = evdns_base_resolve_ipv4(base,
+ "drop.example.com", DNS_QUERY_NO_SEARCH,
+ dns_server_gethostbyname_cb, (void*)(char*)90909);
+
+ evdns_cancel_request(base, req);
+
+ event_dispatch();
+
+ tt_assert(dns_got_cancel);
+ test_ok = dns_ok;
+
+end:
+ if (port)
+ evdns_close_server_port(port);
+ if (sock >= 0)
+ evutil_closesocket(sock);
+ if (base)
+ evdns_base_free(base, 0);
+}
+
+static int n_replies_left;
+static struct event_base *exit_base;
+
+struct generic_dns_callback_result {
+ int result;
+ char type;
+ int count;
+ int ttl;
+ size_t addrs_len;
+ void *addrs;
+ char addrs_buf[256];
+};
+
+static void
+generic_dns_callback(int result, char type, int count, int ttl, void *addresses,
+ void *arg)
+{
+ size_t len;
+ struct generic_dns_callback_result *res = arg;
+ res->result = result;
+ res->type = type;
+ res->count = count;
+ res->ttl = ttl;
+
+ if (type == DNS_IPv4_A)
+ len = count * 4;
+ else if (type == DNS_IPv6_AAAA)
+ len = count * 16;
+ else if (type == DNS_PTR)
+ len = strlen(addresses)+1;
+ else {
+ res->addrs_len = len = 0;
+ res->addrs = NULL;
+ }
+ if (len) {
+ res->addrs_len = len;
+ if (len > 256)
+ len = 256;
+ memcpy(res->addrs_buf, addresses, len);
+ res->addrs = res->addrs_buf;
+ }
+
+ if (--n_replies_left == 0)
+ event_base_loopexit(exit_base, NULL);
+}
+
+static struct regress_dns_server_table search_table[] = {
+ { "host.a.example.com", "err", "3", 0 },
+ { "host.b.example.com", "err", "3", 0 },
+ { "host.c.example.com", "A", "11.22.33.44", 0 },
+ { "host2.a.example.com", "err", "3", 0 },
+ { "host2.b.example.com", "A", "200.100.0.100", 0 },
+ { "host2.c.example.com", "err", "3", 0 },
+ { "hostn.a.example.com", "errsoa", "0", 0 },
+ { "hostn.b.example.com", "errsoa", "3", 0 },
+ { "hostn.c.example.com", "err", "0", 0 },
+
+ { "host", "err", "3", 0 },
+ { "host2", "err", "3", 0 },
+ { "*", "err", "3", 0 },
+ { NULL, NULL, NULL, 0 }
+};
+
+static void
+dns_search_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+
+ struct generic_dns_callback_result r[8];
+
+ tt_assert(regress_dnsserver(base, &portnum, search_table));
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+
+ evdns_base_search_add(dns, "a.example.com");
+ evdns_base_search_add(dns, "b.example.com");
+ evdns_base_search_add(dns, "c.example.com");
+
+ n_replies_left = sizeof(r)/sizeof(r[0]);
+ exit_base = base;
+
+ evdns_base_resolve_ipv4(dns, "host", 0, generic_dns_callback, &r[0]);
+ evdns_base_resolve_ipv4(dns, "host2", 0, generic_dns_callback, &r[1]);
+ evdns_base_resolve_ipv4(dns, "host", DNS_NO_SEARCH, generic_dns_callback, &r[2]);
+ evdns_base_resolve_ipv4(dns, "host2", DNS_NO_SEARCH, generic_dns_callback, &r[3]);
+ evdns_base_resolve_ipv4(dns, "host3", 0, generic_dns_callback, &r[4]);
+ evdns_base_resolve_ipv4(dns, "hostn.a.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[5]);
+ evdns_base_resolve_ipv4(dns, "hostn.b.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[6]);
+ evdns_base_resolve_ipv4(dns, "hostn.c.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[7]);
+
+ event_base_dispatch(base);
+
+ tt_int_op(r[0].type, ==, DNS_IPv4_A);
+ tt_int_op(r[0].count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r[0].addrs)[0], ==, htonl(0x0b16212c));
+ tt_int_op(r[1].type, ==, DNS_IPv4_A);
+ tt_int_op(r[1].count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r[1].addrs)[0], ==, htonl(0xc8640064));
+ tt_int_op(r[2].result, ==, DNS_ERR_NOTEXIST);
+ tt_int_op(r[3].result, ==, DNS_ERR_NOTEXIST);
+ tt_int_op(r[4].result, ==, DNS_ERR_NOTEXIST);
+ tt_int_op(r[5].result, ==, DNS_ERR_NODATA);
+ tt_int_op(r[5].ttl, ==, 42);
+ tt_int_op(r[6].result, ==, DNS_ERR_NOTEXIST);
+ tt_int_op(r[6].ttl, ==, 42);
+ tt_int_op(r[7].result, ==, DNS_ERR_NODATA);
+ tt_int_op(r[7].ttl, ==, 0);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+
+ regress_clean_dnsserver();
+}
+
+static int request_count = 0;
+static struct evdns_request *current_req = NULL;
+
+static void
+search_cancel_server_cb(struct evdns_server_request *req, void *data)
+{
+ const char *question;
+
+ if (req->nquestions != 1)
+ TT_DIE(("Only handling one question at a time; got %d",
+ req->nquestions));
+
+ question = req->questions[0]->name;
+
+ TT_BLATHER(("got question, %s", question));
+
+ tt_assert(request_count > 0);
+ tt_assert(!evdns_server_request_respond(req, 3));
+
+ if (!--request_count)
+ evdns_cancel_request(NULL, current_req);
+
+end:
+ ;
+}
+
+static void
+dns_search_cancel_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+ struct evdns_server_port *port = NULL;
+ ev_uint16_t portnum = 0;
+ struct generic_dns_callback_result r1;
+ char buf[64];
+
+ port = regress_get_dnsserver(base, &portnum, NULL,
+ search_cancel_server_cb, NULL);
+ tt_assert(port);
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+
+ evdns_base_search_add(dns, "a.example.com");
+ evdns_base_search_add(dns, "b.example.com");
+ evdns_base_search_add(dns, "c.example.com");
+ evdns_base_search_add(dns, "d.example.com");
+
+ exit_base = base;
+ request_count = 3;
+ n_replies_left = 1;
+
+ current_req = evdns_base_resolve_ipv4(dns, "host", 0,
+ generic_dns_callback, &r1);
+ event_base_dispatch(base);
+
+ tt_int_op(r1.result, ==, DNS_ERR_CANCEL);
+
+end:
+ if (port)
+ evdns_close_server_port(port);
+ if (dns)
+ evdns_base_free(dns, 0);
+}
+
+static void
+fail_server_cb(struct evdns_server_request *req, void *data)
+{
+ const char *question;
+ int *count = data;
+ struct in_addr in;
+
+ /* Drop the first N requests that we get. */
+ if (*count > 0) {
+ --*count;
+ tt_want(! evdns_server_request_drop(req));
+ return;
+ }
+
+ if (req->nquestions != 1)
+ TT_DIE(("Only handling one question at a time; got %d",
+ req->nquestions));
+
+ question = req->questions[0]->name;
+
+ if (!evutil_ascii_strcasecmp(question, "google.com")) {
+ /* Detect a probe, and get out of the loop. */
+ event_base_loopexit(exit_base, NULL);
+ }
+
+ tt_assert(evutil_inet_pton(AF_INET, "16.32.64.128", &in));
+ evdns_server_request_add_a_reply(req, question, 1, &in.s_addr,
+ 100);
+ tt_assert(! evdns_server_request_respond(req, 0))
+ return;
+end:
+ tt_want(! evdns_server_request_drop(req));
+}
+
+static void
+dns_retry_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_server_port *port = NULL;
+ struct evdns_base *dns = NULL;
+ int drop_count = 2;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+
+ struct generic_dns_callback_result r1;
+
+ port = regress_get_dnsserver(base, &portnum, NULL,
+ fail_server_cb, &drop_count);
+ tt_assert(port);
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+ tt_assert(! evdns_base_set_option(dns, "timeout", "0.2"));
+ tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "10"));
+ tt_assert(! evdns_base_set_option(dns, "initial-probe-timeout", "0.1"));
+
+ evdns_base_resolve_ipv4(dns, "host.example.com", 0,
+ generic_dns_callback, &r1);
+
+ n_replies_left = 1;
+ exit_base = base;
+
+ event_base_dispatch(base);
+
+ tt_int_op(drop_count, ==, 0);
+
+ tt_int_op(r1.type, ==, DNS_IPv4_A);
+ tt_int_op(r1.count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r1.addrs)[0], ==, htonl(0x10204080));
+
+ /* Now try again, but this time have the server get treated as
+ * failed, so we can send it a test probe. */
+ drop_count = 4;
+ tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2"));
+ tt_assert(! evdns_base_set_option(dns, "attempts:", "3"));
+ memset(&r1, 0, sizeof(r1));
+
+ evdns_base_resolve_ipv4(dns, "host.example.com", 0,
+ generic_dns_callback, &r1);
+
+ n_replies_left = 2;
+
+ /* This will run until it answers the "google.com" probe request. */
+ event_base_dispatch(base);
+
+ /* We'll treat the server as failed here. */
+ tt_int_op(r1.result, ==, DNS_ERR_TIMEOUT);
+
+ /* It should work this time. */
+ tt_int_op(drop_count, ==, 0);
+ evdns_base_resolve_ipv4(dns, "host.example.com", 0,
+ generic_dns_callback, &r1);
+
+ event_base_dispatch(base);
+ tt_int_op(r1.result, ==, DNS_ERR_NONE);
+ tt_int_op(r1.type, ==, DNS_IPv4_A);
+ tt_int_op(r1.count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r1.addrs)[0], ==, htonl(0x10204080));
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+ if (port)
+ evdns_close_server_port(port);
+}
+
+static struct regress_dns_server_table internal_error_table[] = {
+ /* Error 4 (NOTIMPL) makes us reissue the request to another server
+ if we can.
+
+ XXXX we should reissue under a much wider set of circumstances!
+ */
+ { "foof.example.com", "err", "4", 0 },
+ { NULL, NULL, NULL, 0 }
+};
+
+static struct regress_dns_server_table reissue_table[] = {
+ { "foof.example.com", "A", "240.15.240.15", 0 },
+ { NULL, NULL, NULL, 0 }
+};
+
+static void
+dns_reissue_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_server_port *port1 = NULL, *port2 = NULL;
+ struct evdns_base *dns = NULL;
+ struct generic_dns_callback_result r1;
+ ev_uint16_t portnum1 = 0, portnum2=0;
+ char buf1[64], buf2[64];
+
+ port1 = regress_get_dnsserver(base, &portnum1, NULL,
+ regress_dns_server_cb, internal_error_table);
+ tt_assert(port1);
+ port2 = regress_get_dnsserver(base, &portnum2, NULL,
+ regress_dns_server_cb, reissue_table);
+ tt_assert(port2);
+ evutil_snprintf(buf1, sizeof(buf1), "127.0.0.1:%d", (int)portnum1);
+ evutil_snprintf(buf2, sizeof(buf2), "127.0.0.1:%d", (int)portnum2);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf1));
+ tt_assert(! evdns_base_set_option(dns, "timeout:", "0.3"));
+ tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2"));
+ tt_assert(! evdns_base_set_option(dns, "attempts:", "5"));
+
+ memset(&r1, 0, sizeof(r1));
+ evdns_base_resolve_ipv4(dns, "foof.example.com", 0,
+ generic_dns_callback, &r1);
+
+ /* Add this after, so that we are sure to get a reissue. */
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf2));
+
+ n_replies_left = 1;
+ exit_base = base;
+
+ event_base_dispatch(base);
+ tt_int_op(r1.result, ==, DNS_ERR_NONE);
+ tt_int_op(r1.type, ==, DNS_IPv4_A);
+ tt_int_op(r1.count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r1.addrs)[0], ==, htonl(0xf00ff00f));
+
+ /* Make sure we dropped at least once. */
+ tt_int_op(internal_error_table[0].seen, >, 0);
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+ if (port1)
+ evdns_close_server_port(port1);
+ if (port2)
+ evdns_close_server_port(port2);
+}
+
+#if 0
+static void
+dumb_bytes_fn(char *p, size_t n)
+{
+ unsigned i;
+ /* This gets us 6 bits of entropy per transaction ID, which means we
+ * will have probably have collisions and need to pick again. */
+ for (i=0;i<n;++i)
+ p[i] = (char)(rand() & 7);
+}
+#endif
+
+static void
+dns_inflight_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evdns_base *dns = NULL;
+ ev_uint16_t portnum = 0;
+ char buf[64];
+
+ struct generic_dns_callback_result r[20];
+ int i;
+
+ tt_assert(regress_dnsserver(base, &portnum, reissue_table));
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)portnum);
+
+ dns = evdns_base_new(base, 0);
+ tt_assert(!evdns_base_nameserver_ip_add(dns, buf));
+ tt_assert(! evdns_base_set_option(dns, "max-inflight:", "3"));
+ tt_assert(! evdns_base_set_option(dns, "randomize-case:", "0"));
+
+ for (i=0;i<20;++i)
+ evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r[i]);
+
+ n_replies_left = 20;
+ exit_base = base;
+
+ event_base_dispatch(base);
+
+ for (i=0;i<20;++i) {
+ tt_int_op(r[i].type, ==, DNS_IPv4_A);
+ tt_int_op(r[i].count, ==, 1);
+ tt_int_op(((ev_uint32_t*)r[i].addrs)[0], ==, htonl(0xf00ff00f));
+ }
+
+end:
+ if (dns)
+ evdns_base_free(dns, 0);
+ regress_clean_dnsserver();
+}
+
+/* === Test for bufferevent_socket_connect_hostname */
+
+static int total_connected_or_failed = 0;
+static int total_n_accepted = 0;
+static struct event_base *be_connect_hostname_base = NULL;
+
+/* Implements a DNS server for the connect_hostname test and the
+ * getaddrinfo_async test */
+static void
+be_getaddrinfo_server_cb(struct evdns_server_request *req, void *data)
+{
+ int i;
+ int *n_got_p=data;
+ int added_any=0;
+ ++*n_got_p;
+
+ for (i=0;i<req->nquestions;++i) {
+ const int qtype = req->questions[i]->type;
+ const int qclass = req->questions[i]->dns_question_class;
+ const char *qname = req->questions[i]->name;
+ struct in_addr ans;
+ struct in6_addr ans6;
+ memset(&ans6, 0, sizeof(ans6));
+
+ TT_BLATHER(("Got question about %s, type=%d", qname, qtype));
+
+ if (qtype == EVDNS_TYPE_A &&
+ qclass == EVDNS_CLASS_INET &&
+ !evutil_ascii_strcasecmp(qname, "nobodaddy.example.com")) {
+ ans.s_addr = htonl(0x7f000001);
+ evdns_server_request_add_a_reply(req, qname,
+ 1, &ans.s_addr, 2000);
+ added_any = 1;
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "nosuchplace.example.com")) {
+ /* ok, just say notfound. */
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "both.example.com")) {
+ if (qtype == EVDNS_TYPE_A) {
+ ans.s_addr = htonl(0x50502020);
+ evdns_server_request_add_a_reply(req, qname,
+ 1, &ans.s_addr, 2000);
+ added_any = 1;
+ } else if (qtype == EVDNS_TYPE_AAAA) {
+ ans6.s6_addr[0] = 0x80;
+ ans6.s6_addr[1] = 0xff;
+ ans6.s6_addr[14] = 0xbb;
+ ans6.s6_addr[15] = 0xbb;
+ evdns_server_request_add_aaaa_reply(req, qname,
+ 1, &ans6.s6_addr, 2000);
+ added_any = 1;
+ }
+ evdns_server_request_add_cname_reply(req, qname,
+ "both-canonical.example.com", 1000);
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v4only.example.com") ||
+ !evutil_ascii_strcasecmp(qname, "v4assert.example.com")) {
+ if (qtype == EVDNS_TYPE_A) {
+ ans.s_addr = htonl(0x12345678);
+ evdns_server_request_add_a_reply(req, qname,
+ 1, &ans.s_addr, 2000);
+ added_any = 1;
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v4assert.example.com")) {
+ TT_FAIL(("Got an AAAA request for v4assert"));
+ }
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v6only.example.com") ||
+ !evutil_ascii_strcasecmp(qname, "v6assert.example.com")) {
+ if (qtype == EVDNS_TYPE_AAAA) {
+ ans6.s6_addr[0] = 0x0b;
+ ans6.s6_addr[1] = 0x0b;
+ ans6.s6_addr[14] = 0xf0;
+ ans6.s6_addr[15] = 0x0d;
+ evdns_server_request_add_aaaa_reply(req, qname,
+ 1, &ans6.s6_addr, 2000);
+ added_any = 1;
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v6assert.example.com")) {
+ TT_FAIL(("Got a A request for v6assert"));
+ }
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v6timeout.example.com")) {
+ if (qtype == EVDNS_TYPE_A) {
+ ans.s_addr = htonl(0xabcdef01);
+ evdns_server_request_add_a_reply(req, qname,
+ 1, &ans.s_addr, 2000);
+ added_any = 1;
+ } else if (qtype == EVDNS_TYPE_AAAA) {
+ /* Let the v6 request time out.*/
+ evdns_server_request_drop(req);
+ return;
+ }
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v4timeout.example.com")) {
+ if (qtype == EVDNS_TYPE_AAAA) {
+ ans6.s6_addr[0] = 0x0a;
+ ans6.s6_addr[1] = 0x0a;
+ ans6.s6_addr[14] = 0xff;
+ ans6.s6_addr[15] = 0x01;
+ evdns_server_request_add_aaaa_reply(req, qname,
+ 1, &ans6.s6_addr, 2000);
+ added_any = 1;
+ } else if (qtype == EVDNS_TYPE_A) {
+ /* Let the v4 request time out.*/
+ evdns_server_request_drop(req);
+ return;
+ }
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "v6timeout-nonexist.example.com")) {
+ if (qtype == EVDNS_TYPE_A) {
+ /* Fall through, give an nexist. */
+ } else if (qtype == EVDNS_TYPE_AAAA) {
+ /* Let the v6 request time out.*/
+ evdns_server_request_drop(req);
+ return;
+ }
+ } else if (!evutil_ascii_strcasecmp(qname,
+ "all-timeout.example.com")) {
+ /* drop all requests */
+ evdns_server_request_drop(req);
+ return;
+ } else {
+ TT_GRIPE(("Got weird request for %s",qname));
+ }
+ }
+ if (added_any) {
+ TT_BLATHER(("answering"));
+ evdns_server_request_respond(req, 0);
+ } else {
+ TT_BLATHER(("saying nexist."));
+ evdns_server_request_respond(req, 3);
+ }
+}
+
+/* Implements a listener for connect_hostname test. */
+static void
+nil_accept_cb(struct evconnlistener *l, evutil_socket_t fd, struct sockaddr *s,
+ int socklen, void *arg)
+{
+ int *p = arg;
+ (*p)++;
+ ++total_n_accepted;
+ /* don't do anything with the socket; let it close when we exit() */
+ if (total_n_accepted >= 3 && total_connected_or_failed >= 5)
+ event_base_loopexit(be_connect_hostname_base,
+ NULL);
+}
+
+struct be_conn_hostname_result {
+ int dnserr;
+ int what;
+};
+
+/* Bufferevent event callback for the connect_hostname test: remembers what
+ * event we got. */
+static void
+be_connect_hostname_event_cb(struct bufferevent *bev, short what, void *ctx)
+{
+ struct be_conn_hostname_result *got = ctx;
+ if (!got->what) {
+ TT_BLATHER(("Got a bufferevent event %d", what));
+ got->what = what;
+
+ if ((what & BEV_EVENT_CONNECTED) || (what & BEV_EVENT_ERROR)) {
+ int r;
+ if ((r = bufferevent_socket_get_dns_error(bev))) {
+ got->dnserr = r;
+ TT_BLATHER(("DNS error %d: %s", r,
+ evutil_gai_strerror(r)));
+ } ++total_connected_or_failed;
+ TT_BLATHER(("Got %d connections or errors.", total_connected_or_failed));
+
+ if (total_n_accepted >= 3 && total_connected_or_failed >= 5)
+ event_base_loopexit(be_connect_hostname_base,
+ NULL);
+ }
+ } else {
+ TT_FAIL(("Two events on one bufferevent. %d,%d",
+ got->what, (int)what));
+ }
+}
+
+static void
+test_bufferevent_connect_hostname(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evconnlistener *listener = NULL;
+ struct bufferevent *be1=NULL, *be2=NULL, *be3=NULL, *be4=NULL, *be5=NULL;
+ struct be_conn_hostname_result be1_outcome={0,0}, be2_outcome={0,0},
+ be3_outcome={0,0}, be4_outcome={0,0}, be5_outcome={0,0};
+ int expect_err5;
+ struct evdns_base *dns=NULL;
+ struct evdns_server_port *port=NULL;
+ struct sockaddr_in sin;
+ int listener_port=-1;
+ ev_uint16_t dns_port=0;
+ int n_accept=0, n_dns=0;
+ char buf[128];
+
+ be_connect_hostname_base = data->base;
+
+ /* Bind an address and figure out what port it's on. */
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
+ sin.sin_port = 0;
+ listener = evconnlistener_new_bind(data->base, nil_accept_cb,
+ &n_accept,
+ LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_EXEC,
+ -1, (struct sockaddr *)&sin, sizeof(sin));
+ tt_assert(listener);
+ listener_port = regress_get_socket_port(
+ evconnlistener_get_fd(listener));
+
+ port = regress_get_dnsserver(data->base, &dns_port, NULL,
+ be_getaddrinfo_server_cb, &n_dns);
+ tt_assert(port);
+ tt_int_op(dns_port, >=, 0);
+
+ /* Start an evdns_base that uses the server as its resolver. */
+ dns = evdns_base_new(data->base, 0);
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", (int)dns_port);
+ evdns_base_nameserver_ip_add(dns, buf);
+
+ /* Now, finally, at long last, launch the bufferevents. One should do
+ * a failing lookup IP, one should do a successful lookup by IP,
+ * and one should do a successful lookup by hostname. */
+ be1 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be2 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be3 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be4 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+ be5 = bufferevent_socket_new(data->base, -1, BEV_OPT_CLOSE_ON_FREE);
+
+ bufferevent_setcb(be1, NULL, NULL, be_connect_hostname_event_cb,
+ &be1_outcome);
+ bufferevent_setcb(be2, NULL, NULL, be_connect_hostname_event_cb,
+ &be2_outcome);
+ bufferevent_setcb(be3, NULL, NULL, be_connect_hostname_event_cb,
+ &be3_outcome);
+ bufferevent_setcb(be4, NULL, NULL, be_connect_hostname_event_cb,
+ &be4_outcome);
+ bufferevent_setcb(be5, NULL, NULL, be_connect_hostname_event_cb,
+ &be5_outcome);
+
+ /* Launch an async resolve that will fail. */
+ tt_assert(!bufferevent_socket_connect_hostname(be1, dns, AF_INET,
+ "nosuchplace.example.com", listener_port));
+ /* Connect to the IP without resolving. */
+ tt_assert(!bufferevent_socket_connect_hostname(be2, dns, AF_INET,
+ "127.0.0.1", listener_port));
+ /* Launch an async resolve that will succeed. */
+ tt_assert(!bufferevent_socket_connect_hostname(be3, dns, AF_INET,
+ "nobodaddy.example.com", listener_port));
+ /* Use the blocking resolver. This one will fail if your resolver
+ * can't resolve localhost to 127.0.0.1 */
+ tt_assert(!bufferevent_socket_connect_hostname(be4, NULL, AF_INET,
+ "localhost", listener_port));
+ /* Use the blocking resolver with a nonexistent hostname. */
+ tt_assert(!bufferevent_socket_connect_hostname(be5, NULL, AF_INET,
+ "nonesuch.nowhere.example.com", 80));
+ {
+ /* The blocking resolver will use the system nameserver, which
+ * might tell us anything. (Yes, some twits even pretend that
+ * example.com is real.) Let's see what answer to expect. */
+ struct evutil_addrinfo hints, *ai = NULL;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
+ expect_err5 = evutil_getaddrinfo(
+ "nonesuch.nowhere.example.com", "80", &hints, &ai);
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(be1_outcome.what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be1_outcome.dnserr, ==, EVUTIL_EAI_NONAME);
+ tt_int_op(be2_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be2_outcome.dnserr, ==, 0);
+ tt_int_op(be3_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be3_outcome.dnserr, ==, 0);
+ tt_int_op(be4_outcome.what, ==, BEV_EVENT_CONNECTED);
+ tt_int_op(be4_outcome.dnserr, ==, 0);
+ if (expect_err5) {
+ tt_int_op(be5_outcome.what, ==, BEV_EVENT_ERROR);
+ tt_int_op(be5_outcome.dnserr, ==, expect_err5);
+ }
+
+ tt_int_op(n_accept, ==, 3);
+ tt_int_op(n_dns, ==, 2);
+
+end:
+ if (listener)
+ evconnlistener_free(listener);
+ if (port)
+ evdns_close_server_port(port);
+ if (dns)
+ evdns_base_free(dns, 0);
+ if (be1)
+ bufferevent_free(be1);
+ if (be2)
+ bufferevent_free(be2);
+ if (be3)
+ bufferevent_free(be3);
+ if (be4)
+ bufferevent_free(be4);
+ if (be5)
+ bufferevent_free(be5);
+}
+
+
+struct gai_outcome {
+ int err;
+ struct evutil_addrinfo *ai;
+};
+
+static int n_gai_results_pending = 0;
+static struct event_base *exit_base_on_no_pending_results = NULL;
+
+static void
+gai_cb(int err, struct evutil_addrinfo *res, void *ptr)
+{
+ struct gai_outcome *go = ptr;
+ go->err = err;
+ go->ai = res;
+ if (--n_gai_results_pending <= 0 && exit_base_on_no_pending_results)
+ event_base_loopexit(exit_base_on_no_pending_results, NULL);
+ if (n_gai_results_pending < 900)
+ TT_BLATHER(("Got an answer; expecting %d more.",
+ n_gai_results_pending));
+}
+
+static void
+cancel_gai_cb(evutil_socket_t fd, short what, void *ptr)
+{
+ struct evdns_getaddrinfo_request *r = ptr;
+ evdns_getaddrinfo_cancel(r);
+}
+
+static void
+test_getaddrinfo_async(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evutil_addrinfo hints, *a;
+ struct gai_outcome local_outcome;
+ struct gai_outcome a_out[12];
+ int i;
+ struct evdns_getaddrinfo_request *r;
+ char buf[128];
+ struct evdns_server_port *port = NULL;
+ ev_uint16_t dns_port = 0;
+ int n_dns_questions = 0;
+ struct evdns_base *dns_base;
+
+ memset(a_out, 0, sizeof(a_out));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+
+ dns_base = evdns_base_new(data->base, 0);
+ tt_assert(dns_base);
+
+ /* for localhost */
+ evdns_base_load_hosts(dns_base, NULL);
+
+ tt_assert(! evdns_base_set_option(dns_base, "timeout", "0.3"));
+ tt_assert(! evdns_base_set_option(dns_base, "getaddrinfo-allow-skew", "0.2"));
+
+ n_gai_results_pending = 10000; /* don't think about exiting yet. */
+
+ /* 1. Try some cases that will never hit the asynchronous resolver. */
+ /* 1a. Simple case with a symbolic service name */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ r = evdns_getaddrinfo(dns_base, "1.2.3.4", "http",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(! r);
+ if (!local_outcome.err) {
+ tt_ptr_op(local_outcome.ai,!=,NULL);
+ test_ai_eq(local_outcome.ai, "1.2.3.4:80", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+ } else {
+ TT_BLATHER(("Apparently we have no getservbyname."));
+ }
+
+ /* 1b. EVUTIL_AI_NUMERICHOST is set */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_flags = EVUTIL_AI_NUMERICHOST;
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ r = evdns_getaddrinfo(dns_base, "www.google.com", "80",
+ &hints, gai_cb, &local_outcome);
+ tt_ptr_op(r,==,NULL);
+ tt_int_op(local_outcome.err,==,EVUTIL_EAI_NONAME);
+ tt_ptr_op(local_outcome.ai,==,NULL);
+
+ /* 1c. We give a numeric address (ipv6) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ r = evdns_getaddrinfo(dns_base, "f::f", "8008",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(!r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ tt_ptr_op(local_outcome.ai->ai_next,==,NULL);
+ test_ai_eq(local_outcome.ai, "[f::f]:8008", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 1d. We give a numeric address (ipv4) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_UNSPEC;
+ r = evdns_getaddrinfo(dns_base, "5.6.7.8", NULL,
+ &hints, gai_cb, &local_outcome);
+ tt_assert(!r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ a = ai_find_by_protocol(local_outcome.ai, IPPROTO_TCP);
+ tt_assert(a);
+ test_ai_eq(a, "5.6.7.8", SOCK_STREAM, IPPROTO_TCP);
+ a = ai_find_by_protocol(local_outcome.ai, IPPROTO_UDP);
+ tt_assert(a);
+ test_ai_eq(a, "5.6.7.8", SOCK_DGRAM, IPPROTO_UDP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 1e. nodename is NULL (bind) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_flags = EVUTIL_AI_PASSIVE;
+ r = evdns_getaddrinfo(dns_base, NULL, "9090",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(!r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ /* we should get a v4 address of 0.0.0.0... */
+ a = ai_find_by_family(local_outcome.ai, PF_INET);
+ tt_assert(a);
+ test_ai_eq(a, "0.0.0.0:9090", SOCK_DGRAM, IPPROTO_UDP);
+ /* ... and a v6 address of ::0 */
+ a = ai_find_by_family(local_outcome.ai, PF_INET6);
+ tt_assert(a);
+ test_ai_eq(a, "[::]:9090", SOCK_DGRAM, IPPROTO_UDP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 1f. nodename is NULL (connect) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evdns_getaddrinfo(dns_base, NULL, "2",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(!r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ /* we should get a v4 address of 127.0.0.1 .... */
+ a = ai_find_by_family(local_outcome.ai, PF_INET);
+ tt_assert(a);
+ test_ai_eq(a, "127.0.0.1:2", SOCK_STREAM, IPPROTO_TCP);
+ /* ... and a v6 address of ::1 */
+ a = ai_find_by_family(local_outcome.ai, PF_INET6);
+ tt_assert(a);
+ test_ai_eq(a, "[::1]:2", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 1g. We find localhost immediately. (pf_unspec) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evdns_getaddrinfo(dns_base, "LOCALHOST", "80",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(!r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ /* we should get a v4 address of 127.0.0.1 .... */
+ a = ai_find_by_family(local_outcome.ai, PF_INET);
+ tt_assert(a);
+ test_ai_eq(a, "127.0.0.1:80", SOCK_STREAM, IPPROTO_TCP);
+ /* ... and a v6 address of ::1 */
+ a = ai_find_by_family(local_outcome.ai, PF_INET6);
+ tt_assert(a);
+ test_ai_eq(a, "[::1]:80", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 1g. We find localhost immediately. (pf_inet6) */
+ memset(&hints, 0, sizeof(hints));
+ memset(&local_outcome, 0, sizeof(local_outcome));
+ hints.ai_family = PF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evdns_getaddrinfo(dns_base, "LOCALHOST", "9999",
+ &hints, gai_cb, &local_outcome);
+ tt_assert(! r);
+ tt_int_op(local_outcome.err,==,0);
+ tt_assert(local_outcome.ai);
+ a = local_outcome.ai;
+ test_ai_eq(a, "[::1]:9999", SOCK_STREAM, IPPROTO_TCP);
+ tt_ptr_op(a->ai_next, ==, NULL);
+ evutil_freeaddrinfo(local_outcome.ai);
+ local_outcome.ai = NULL;
+
+ /* 2. Okay, now we can actually test the asynchronous resolver. */
+ /* Start a dummy local dns server... */
+ port = regress_get_dnsserver(data->base, &dns_port, NULL,
+ be_getaddrinfo_server_cb, &n_dns_questions);
+ tt_assert(port);
+ tt_int_op(dns_port, >=, 0);
+ /* ... and tell the evdns_base about it. */
+ evutil_snprintf(buf, sizeof(buf), "127.0.0.1:%d", dns_port);
+ evdns_base_nameserver_ip_add(dns_base, buf);
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = EVUTIL_AI_CANONNAME;
+ /* 0: Request for both.example.com should return both addresses. */
+ r = evdns_getaddrinfo(dns_base, "both.example.com", "8000",
+ &hints, gai_cb, &a_out[0]);
+ tt_assert(r);
+
+ /* 1: Request for v4only.example.com should return one address. */
+ r = evdns_getaddrinfo(dns_base, "v4only.example.com", "8001",
+ &hints, gai_cb, &a_out[1]);
+ tt_assert(r);
+
+ /* 2: Request for v6only.example.com should return one address. */
+ hints.ai_flags = 0;
+ r = evdns_getaddrinfo(dns_base, "v6only.example.com", "8002",
+ &hints, gai_cb, &a_out[2]);
+ tt_assert(r);
+
+ /* 3: PF_INET request for v4assert.example.com should not generate a
+ * v6 request. The server will fail the test if it does. */
+ hints.ai_family = PF_INET;
+ r = evdns_getaddrinfo(dns_base, "v4assert.example.com", "8003",
+ &hints, gai_cb, &a_out[3]);
+ tt_assert(r);
+
+ /* 4: PF_INET6 request for v6assert.example.com should not generate a
+ * v4 request. The server will fail the test if it does. */
+ hints.ai_family = PF_INET6;
+ r = evdns_getaddrinfo(dns_base, "v6assert.example.com", "8004",
+ &hints, gai_cb, &a_out[4]);
+ tt_assert(r);
+
+ /* 5: PF_INET request for nosuchplace.example.com should give NEXIST. */
+ hints.ai_family = PF_INET;
+ r = evdns_getaddrinfo(dns_base, "nosuchplace.example.com", "8005",
+ &hints, gai_cb, &a_out[5]);
+ tt_assert(r);
+
+ /* 6: PF_UNSPEC request for nosuchplace.example.com should give NEXIST.
+ */
+ hints.ai_family = PF_UNSPEC;
+ r = evdns_getaddrinfo(dns_base, "nosuchplace.example.com", "8006",
+ &hints, gai_cb, &a_out[6]);
+ tt_assert(r);
+
+ /* 7: PF_UNSPEC request for v6timeout.example.com should give an ipv4
+ * address only. */
+ hints.ai_family = PF_UNSPEC;
+ r = evdns_getaddrinfo(dns_base, "v6timeout.example.com", "8007",
+ &hints, gai_cb, &a_out[7]);
+ tt_assert(r);
+
+ /* 8: PF_UNSPEC request for v6timeout-nonexist.example.com should give
+ * a NEXIST */
+ hints.ai_family = PF_UNSPEC;
+ r = evdns_getaddrinfo(dns_base, "v6timeout-nonexist.example.com",
+ "8008", &hints, gai_cb, &a_out[8]);
+ tt_assert(r);
+
+ /* 9: AI_ADDRCONFIG should at least not crash. Can't test it more
+ * without knowing what kind of internet we have. */
+ hints.ai_flags |= EVUTIL_AI_ADDRCONFIG;
+ r = evdns_getaddrinfo(dns_base, "both.example.com",
+ "8009", &hints, gai_cb, &a_out[9]);
+ tt_assert(r);
+
+ /* 10: PF_UNSPEC for v4timeout.example.com should give an ipv6 address
+ * only. */
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_flags = 0;
+ r = evdns_getaddrinfo(dns_base, "v4timeout.example.com", "8010",
+ &hints, gai_cb, &a_out[10]);
+ tt_assert(r);
+
+ /* 11: timeout.example.com: cancel it after 100 msec. */
+ r = evdns_getaddrinfo(dns_base, "all-timeout.example.com", "8011",
+ &hints, gai_cb, &a_out[11]);
+ tt_assert(r);
+ {
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 100*1000; /* 100 msec */
+ event_base_once(data->base, -1, EV_TIMEOUT, cancel_gai_cb,
+ r, &tv);
+ }
+
+ /* XXXXX There are more tests we could do, including:
+
+ - A test to elicit NODATA.
+
+ */
+
+ n_gai_results_pending = 12;
+ exit_base_on_no_pending_results = data->base;
+
+ event_base_dispatch(data->base);
+
+ /* 0: both.example.com */
+ tt_int_op(a_out[0].err, ==, 0);
+ tt_assert(a_out[0].ai);
+ tt_assert(a_out[0].ai->ai_next);
+ tt_assert(!a_out[0].ai->ai_next->ai_next);
+ a = ai_find_by_family(a_out[0].ai, PF_INET);
+ tt_assert(a);
+ test_ai_eq(a, "80.80.32.32:8000", SOCK_STREAM, IPPROTO_TCP);
+ a = ai_find_by_family(a_out[0].ai, PF_INET6);
+ tt_assert(a);
+ test_ai_eq(a, "[80ff::bbbb]:8000", SOCK_STREAM, IPPROTO_TCP);
+ tt_assert(a_out[0].ai->ai_canonname);
+ tt_str_op(a_out[0].ai->ai_canonname, ==, "both-canonical.example.com");
+
+ /* 1: v4only.example.com */
+ tt_int_op(a_out[1].err, ==, 0);
+ tt_assert(a_out[1].ai);
+ tt_assert(! a_out[1].ai->ai_next);
+ test_ai_eq(a_out[1].ai, "18.52.86.120:8001", SOCK_STREAM, IPPROTO_TCP);
+ tt_assert(a_out[1].ai->ai_canonname == NULL);
+
+
+ /* 2: v6only.example.com */
+ tt_int_op(a_out[2].err, ==, 0);
+ tt_assert(a_out[2].ai);
+ tt_assert(! a_out[2].ai->ai_next);
+ test_ai_eq(a_out[2].ai, "[b0b::f00d]:8002", SOCK_STREAM, IPPROTO_TCP);
+
+ /* 3: v4assert.example.com */
+ tt_int_op(a_out[3].err, ==, 0);
+ tt_assert(a_out[3].ai);
+ tt_assert(! a_out[3].ai->ai_next);
+ test_ai_eq(a_out[3].ai, "18.52.86.120:8003", SOCK_STREAM, IPPROTO_TCP);
+
+ /* 4: v6assert.example.com */
+ tt_int_op(a_out[4].err, ==, 0);
+ tt_assert(a_out[4].ai);
+ tt_assert(! a_out[4].ai->ai_next);
+ test_ai_eq(a_out[4].ai, "[b0b::f00d]:8004", SOCK_STREAM, IPPROTO_TCP);
+
+ /* 5: nosuchplace.example.com (inet) */
+ tt_int_op(a_out[5].err, ==, EVUTIL_EAI_NONAME);
+ tt_assert(! a_out[5].ai);
+
+ /* 6: nosuchplace.example.com (unspec) */
+ tt_int_op(a_out[6].err, ==, EVUTIL_EAI_NONAME);
+ tt_assert(! a_out[6].ai);
+
+ /* 7: v6timeout.example.com */
+ tt_int_op(a_out[7].err, ==, 0);
+ tt_assert(a_out[7].ai);
+ tt_assert(! a_out[7].ai->ai_next);
+ test_ai_eq(a_out[7].ai, "171.205.239.1:8007", SOCK_STREAM, IPPROTO_TCP);
+
+ /* 8: v6timeout-nonexist.example.com */
+ tt_int_op(a_out[8].err, ==, EVUTIL_EAI_NONAME);
+ tt_assert(! a_out[8].ai);
+
+ /* 9: both (ADDRCONFIG) */
+ tt_int_op(a_out[9].err, ==, 0);
+ tt_assert(a_out[9].ai);
+ a = ai_find_by_family(a_out[9].ai, PF_INET);
+ if (a)
+ test_ai_eq(a, "80.80.32.32:8009", SOCK_STREAM, IPPROTO_TCP);
+ else
+ tt_assert(ai_find_by_family(a_out[9].ai, PF_INET6));
+ a = ai_find_by_family(a_out[9].ai, PF_INET6);
+ if (a)
+ test_ai_eq(a, "[80ff::bbbb]:8009", SOCK_STREAM, IPPROTO_TCP);
+ else
+ tt_assert(ai_find_by_family(a_out[9].ai, PF_INET));
+
+ /* 10: v4timeout.example.com */
+ tt_int_op(a_out[10].err, ==, 0);
+ tt_assert(a_out[10].ai);
+ tt_assert(! a_out[10].ai->ai_next);
+ test_ai_eq(a_out[10].ai, "[a0a::ff01]:8010", SOCK_STREAM, IPPROTO_TCP);
+
+ /* 11: cancelled request. */
+ tt_int_op(a_out[11].err, ==, EVUTIL_EAI_CANCEL);
+ tt_assert(a_out[11].ai == NULL);
+
+end:
+ if (local_outcome.ai)
+ evutil_freeaddrinfo(local_outcome.ai);
+ for (i=0;i<10;++i) {
+ if (a_out[i].ai)
+ evutil_freeaddrinfo(a_out[i].ai);
+ }
+ if (port)
+ evdns_close_server_port(port);
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+}
+
+struct gaic_request_status {
+ int magic;
+ struct event_base *base;
+ struct evdns_base *dns_base;
+ struct evdns_getaddrinfo_request *request;
+ struct event cancel_event;
+ int canceled;
+};
+
+#define GAIC_MAGIC 0x1234abcd
+
+static int pending = 0;
+
+static void
+gaic_cancel_request_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct gaic_request_status *status = arg;
+
+ tt_assert(status->magic == GAIC_MAGIC);
+ status->canceled = 1;
+ evdns_getaddrinfo_cancel(status->request);
+ return;
+end:
+ event_base_loopexit(status->base, NULL);
+}
+
+static void
+gaic_server_cb(struct evdns_server_request *req, void *arg)
+{
+ ev_uint32_t answer = 0x7f000001;
+ tt_assert(req->nquestions);
+ evdns_server_request_add_a_reply(req, req->questions[0]->name, 1,
+ &answer, 100);
+ evdns_server_request_respond(req, 0);
+ return;
+end:
+ evdns_server_request_respond(req, DNS_ERR_REFUSED);
+}
+
+
+static void
+gaic_getaddrinfo_cb(int result, struct evutil_addrinfo *res, void *arg)
+{
+ struct gaic_request_status *status = arg;
+ struct event_base *base = status->base;
+ tt_assert(status->magic == GAIC_MAGIC);
+
+ if (result == EVUTIL_EAI_CANCEL) {
+ tt_assert(status->canceled);
+ }
+ event_del(&status->cancel_event);
+
+ memset(status, 0xf0, sizeof(*status));
+ free(status);
+
+end:
+ if (--pending <= 0)
+ event_base_loopexit(base, NULL);
+}
+
+static void
+gaic_launch(struct event_base *base, struct evdns_base *dns_base)
+{
+ struct gaic_request_status *status = calloc(1,sizeof(*status));
+ struct timeval tv = { 0, 10000 };
+ status->magic = GAIC_MAGIC;
+ status->base = base;
+ status->dns_base = dns_base;
+ event_assign(&status->cancel_event, base, -1, 0, gaic_cancel_request_cb,
+ status);
+ status->request = evdns_getaddrinfo(dns_base,
+ "foobar.bazquux.example.com", "80", NULL, gaic_getaddrinfo_cb,
+ status);
+ event_add(&status->cancel_event, &tv);
+ ++pending;
+}
+
+#ifdef EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
+/* FIXME: We should move this to regress_main.c if anything else needs it.*/
+
+/* Trivial replacements for malloc/free/realloc to check for memory leaks.
+ * Not threadsafe. */
+static int allocated_chunks = 0;
+
+static void *
+cnt_malloc(size_t sz)
+{
+ allocated_chunks += 1;
+ return malloc(sz);
+}
+
+static void *
+cnt_realloc(void *old, size_t sz)
+{
+ if (!old)
+ allocated_chunks += 1;
+ if (!sz)
+ allocated_chunks -= 1;
+ return realloc(old, sz);
+}
+
+static void
+cnt_free(void *ptr)
+{
+ allocated_chunks -= 1;
+ free(ptr);
+}
+
+struct testleak_env_t {
+ struct event_base *base;
+ struct evdns_base *dns_base;
+ struct evdns_request *req;
+ struct generic_dns_callback_result r;
+};
+
+static void *
+testleak_setup(const struct testcase_t *testcase)
+{
+ struct testleak_env_t *env;
+
+ allocated_chunks = 0;
+ event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
+ if (!libevent_tests_running_in_debug_mode)
+ event_enable_debug_mode();
+
+ /* not mm_calloc: we don't want to mess with the count. */
+ env = calloc(1, sizeof(struct testleak_env_t));
+ env->base = event_base_new();
+ env->dns_base = evdns_base_new(env->base, 0);
+ env->req = evdns_base_resolve_ipv4(
+ env->dns_base, "example.com", DNS_QUERY_NO_SEARCH,
+ generic_dns_callback, &env->r);
+ return env;
+}
+
+static int
+testleak_cleanup(const struct testcase_t *testcase, void *env_)
+{
+ int ok = 0;
+ struct testleak_env_t *env = env_;
+ tt_assert(env);
+#ifdef EVENT__DISABLE_DEBUG_MODE
+ tt_int_op(allocated_chunks, ==, 0);
+#else
+ /* FIXME: that's `1' because of event_debug_map_HT_GROW */
+ tt_int_op(allocated_chunks, ==, 1);
+#endif
+ ok = 1;
+end:
+ if (env) {
+ if (env->dns_base)
+ evdns_base_free(env->dns_base, 0);
+ if (env->base)
+ event_base_free(env->base);
+ free(env);
+ }
+ return ok;
+}
+
+static struct testcase_setup_t testleak_funcs = {
+ testleak_setup, testleak_cleanup
+};
+
+static void
+test_dbg_leak_cancel(void *env_)
+{
+ /* cancel, loop, free/dns, free/base */
+ struct testleak_env_t *env = env_;
+ int send_err_shutdown = 1;
+ evdns_cancel_request(env->dns_base, env->req);
+ env->req = 0;
+
+ /* `req` is freed in callback, that's why one loop is required. */
+ event_base_loop(env->base, EVLOOP_NONBLOCK);
+
+ /* send_err_shutdown means nothing as soon as our request is
+ * already canceled */
+ evdns_base_free(env->dns_base, send_err_shutdown);
+ env->dns_base = 0;
+ event_base_free(env->base);
+ env->base = 0;
+}
+
+static void
+dbg_leak_resume(void *env_, int cancel, int send_err_shutdown)
+{
+ /* cancel, loop, free/dns, free/base */
+ struct testleak_env_t *env = env_;
+ if (cancel) {
+ evdns_cancel_request(env->dns_base, env->req);
+ tt_assert(!evdns_base_resume(env->dns_base));
+ } else {
+ /* TODO: No nameservers, request can't be processed, must be errored */
+ tt_assert(!evdns_base_resume(env->dns_base));
+ }
+
+ /**
+ * Because we don't cancel request,
+ * and want our callback to recieve DNS_ERR_SHUTDOWN,
+ * we use deferred callback, and there was
+ * - one extra malloc(),
+ * @see reply_schedule_callback()
+ * - and one missing free
+ * @see request_finished() (req->handle->pending_cb = 1)
+ * than we don't need to count in testleak_cleanup()
+ *
+ * So just decrement allocated_chunks to 2,
+ * like we already take care about it.
+ */
+ if (!cancel && send_err_shutdown) {
+ allocated_chunks -= 2;
+ }
+
+ event_base_loop(env->base, EVLOOP_NONBLOCK);
+
+end:
+ evdns_base_free(env->dns_base, send_err_shutdown);
+ env->dns_base = 0;
+ event_base_free(env->base);
+ env->base = 0;
+}
+
+#define IMPL_DBG_LEAK_RESUME(name, cancel, send_err_shutdown) \
+ static void \
+ test_dbg_leak_##name##_(void *env_) \
+ { \
+ dbg_leak_resume(env_, cancel, send_err_shutdown); \
+ }
+IMPL_DBG_LEAK_RESUME(resume, 0, 0)
+IMPL_DBG_LEAK_RESUME(cancel_and_resume, 1, 0)
+IMPL_DBG_LEAK_RESUME(resume_send_err, 0, 1)
+IMPL_DBG_LEAK_RESUME(cancel_and_resume_send_err, 1, 1)
+
+static void
+test_dbg_leak_shutdown(void *env_)
+{
+ /* free/dns, loop, free/base */
+ struct testleak_env_t *env = env_;
+ int send_err_shutdown = 1;
+
+ /* `req` is freed both with `send_err_shutdown` and without it,
+ * the only difference is `evdns_callback` call */
+ env->req = 0;
+
+ evdns_base_free(env->dns_base, send_err_shutdown);
+ env->dns_base = 0;
+
+ /* `req` is freed in callback, that's why one loop is required */
+ event_base_loop(env->base, EVLOOP_NONBLOCK);
+ event_base_free(env->base);
+ env->base = 0;
+}
+#endif
+
+static void
+test_getaddrinfo_async_cancel_stress(void *ptr)
+{
+ struct event_base *base;
+ struct evdns_base *dns_base = NULL;
+ struct evdns_server_port *server = NULL;
+ evutil_socket_t fd = -1;
+ struct sockaddr_in sin;
+ struct sockaddr_storage ss;
+ ev_socklen_t slen;
+ int i;
+
+ base = event_base_new();
+ dns_base = evdns_base_new(base, 0);
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = 0;
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+ if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ tt_abort_perror("socket");
+ }
+ evutil_make_socket_nonblocking(fd);
+ if (bind(fd, (struct sockaddr*)&sin, sizeof(sin))<0) {
+ tt_abort_perror("bind");
+ }
+ server = evdns_add_server_port_with_base(base, fd, 0, gaic_server_cb,
+ base);
+
+ memset(&ss, 0, sizeof(ss));
+ slen = sizeof(ss);
+ if (getsockname(fd, (struct sockaddr*)&ss, &slen)<0) {
+ tt_abort_perror("getsockname");
+ }
+ evdns_base_nameserver_sockaddr_add(dns_base,
+ (struct sockaddr*)&ss, slen, 0);
+
+ for (i = 0; i < 1000; ++i) {
+ gaic_launch(base, dns_base);
+ }
+
+ event_base_dispatch(base);
+
+end:
+ if (dns_base)
+ evdns_base_free(dns_base, 1);
+ if (server)
+ evdns_close_server_port(server);
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+
+#define DNS_LEGACY(name, flags) \
+ { #name, run_legacy_test_fn, flags|TT_LEGACY, &legacy_setup, \
+ dns_##name }
+
+struct testcase_t dns_testcases[] = {
+ DNS_LEGACY(server, TT_FORK|TT_NEED_BASE),
+ DNS_LEGACY(gethostbyname, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT),
+ DNS_LEGACY(gethostbyname6, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT),
+ DNS_LEGACY(gethostbyaddr, TT_FORK|TT_NEED_BASE|TT_NEED_DNS|TT_OFF_BY_DEFAULT),
+ { "resolve_reverse", dns_resolve_reverse, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
+ { "search", dns_search_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "search_cancel", dns_search_cancel_test,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "retry", dns_retry_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "reissue", dns_reissue_test, TT_FORK|TT_NEED_BASE|TT_NO_LOGS, &basic_setup, NULL },
+ { "inflight", dns_inflight_test, TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+ { "bufferevent_connect_hostname", test_bufferevent_connect_hostname,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
+ { "getaddrinfo_async", test_getaddrinfo_async,
+ TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
+ { "getaddrinfo_cancel_stress", test_getaddrinfo_async_cancel_stress,
+ TT_FORK, NULL, NULL },
+
+#ifdef EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
+ { "leak_shutdown", test_dbg_leak_shutdown, TT_FORK, &testleak_funcs, NULL },
+ { "leak_cancel", test_dbg_leak_cancel, TT_FORK, &testleak_funcs, NULL },
+
+ { "leak_resume", test_dbg_leak_resume_, TT_FORK, &testleak_funcs, NULL },
+ { "leak_cancel_and_resume", test_dbg_leak_cancel_and_resume_,
+ TT_FORK, &testleak_funcs, NULL },
+ { "leak_resume_send_err", test_dbg_leak_resume_send_err_,
+ TT_FORK, &testleak_funcs, NULL },
+ { "leak_cancel_and_resume_send_err", test_dbg_leak_cancel_and_resume_send_err_,
+ TT_FORK, &testleak_funcs, NULL },
+#endif
+
+ END_OF_TESTCASES
+};
+
diff --git a/sntp/libevent/test/regress_et.c b/sntp/libevent/test/regress_et.c
new file mode 100644
index 000000000000..229a78e2d429
--- /dev/null
+++ b/sntp/libevent/test/regress_et.c
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../util-internal.h"
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/util.h"
+
+#include "regress.h"
+
+static int was_et = 0;
+
+static void
+read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf;
+ int len;
+
+ len = recv(fd, &buf, sizeof(buf), 0);
+
+ called++;
+ if (event & EV_ET)
+ was_et = 1;
+
+ if (!len)
+ event_del(arg);
+}
+
+#ifndef SHUT_WR
+#define SHUT_WR 1
+#endif
+
+#ifdef _WIN32
+#define LOCAL_SOCKETPAIR_AF AF_INET
+#else
+#define LOCAL_SOCKETPAIR_AF AF_UNIX
+#endif
+
+static void
+test_edgetriggered(void *et)
+{
+ struct event *ev = NULL;
+ struct event_base *base = NULL;
+ const char *test = "test string";
+ evutil_socket_t pair[2] = {-1,-1};
+ int supports_et;
+
+ /* On Linux 3.2.1 (at least, as patched by Fedora and tested by Nick),
+ * doing a "recv" on an AF_UNIX socket resets the readability of the
+ * socket, even though there is no state change, so we don't actually
+ * get edge-triggered behavior. Yuck! Linux 3.1.9 didn't have this
+ * problem.
+ */
+#ifdef __linux__
+ if (evutil_ersatz_socketpair_(AF_INET, SOCK_STREAM, 0, pair) == -1) {
+ tt_abort_perror("socketpair");
+ }
+#else
+ if (evutil_socketpair(LOCAL_SOCKETPAIR_AF, SOCK_STREAM, 0, pair) == -1) {
+ tt_abort_perror("socketpair");
+ }
+#endif
+
+ called = was_et = 0;
+
+ tt_int_op(send(pair[0], test, (int)strlen(test)+1, 0), >, 0);
+ shutdown(pair[0], SHUT_WR);
+
+ /* Initalize the event library */
+ base = event_base_new();
+
+ if (!strcmp(event_base_get_method(base), "epoll") ||
+ !strcmp(event_base_get_method(base), "epoll (with changelist)") ||
+ !strcmp(event_base_get_method(base), "kqueue"))
+ supports_et = 1;
+ else
+ supports_et = 0;
+
+ TT_BLATHER(("Checking for edge-triggered events with %s, which should %s"
+ "support edge-triggering", event_base_get_method(base),
+ supports_et?"":"not "));
+
+ /* Initalize one event */
+ ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev);
+
+ event_add(ev, NULL);
+
+ /* We're going to call the dispatch function twice. The first invocation
+ * will read a single byte from pair[1] in either case. If we're edge
+ * triggered, we'll only see the event once (since we only see transitions
+ * from no data to data), so the second invocation of event_base_loop will
+ * do nothing. If we're level triggered, the second invocation of
+ * event_base_loop will also activate the event (because there's still
+ * data to read). */
+ event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
+ event_base_loop(base,EVLOOP_NONBLOCK|EVLOOP_ONCE);
+
+ if (supports_et) {
+ tt_int_op(called, ==, 1);
+ tt_assert(was_et);
+ } else {
+ tt_int_op(called, ==, 2);
+ tt_assert(!was_et);
+ }
+
+ end:
+ if (ev) {
+ event_del(ev);
+ event_free(ev);
+ }
+ if (base)
+ event_base_free(base);
+ evutil_closesocket(pair[0]);
+ evutil_closesocket(pair[1]);
+}
+
+static void
+test_edgetriggered_mix_error(void *data_)
+{
+ struct basic_test_data *data = data_;
+ struct event_base *base = NULL;
+ struct event *ev_et=NULL, *ev_lt=NULL;
+
+#ifdef EVENT__DISABLE_DEBUG_MODE
+ if (1)
+ tt_skip();
+#endif
+
+ if (!libevent_tests_running_in_debug_mode)
+ event_enable_debug_mode();
+
+ base = event_base_new();
+
+ /* try mixing edge-triggered and level-triggered to make sure it fails*/
+ ev_et = event_new(base, data->pair[0], EV_READ|EV_ET, read_cb, ev_et);
+ tt_assert(ev_et);
+ ev_lt = event_new(base, data->pair[0], EV_READ, read_cb, ev_lt);
+ tt_assert(ev_lt);
+
+ /* Add edge-triggered, then level-triggered. Get an error. */
+ tt_int_op(0, ==, event_add(ev_et, NULL));
+ tt_int_op(-1, ==, event_add(ev_lt, NULL));
+ tt_int_op(EV_READ, ==, event_pending(ev_et, EV_READ, NULL));
+ tt_int_op(0, ==, event_pending(ev_lt, EV_READ, NULL));
+
+ tt_int_op(0, ==, event_del(ev_et));
+ /* Add level-triggered, then edge-triggered. Get an error. */
+ tt_int_op(0, ==, event_add(ev_lt, NULL));
+ tt_int_op(-1, ==, event_add(ev_et, NULL));
+ tt_int_op(EV_READ, ==, event_pending(ev_lt, EV_READ, NULL));
+ tt_int_op(0, ==, event_pending(ev_et, EV_READ, NULL));
+
+end:
+ if (ev_et)
+ event_free(ev_et);
+ if (ev_lt)
+ event_free(ev_lt);
+ if (base)
+ event_base_free(base);
+}
+
+struct testcase_t edgetriggered_testcases[] = {
+ { "et", test_edgetriggered, TT_FORK, NULL, NULL },
+ { "et_mix_error", test_edgetriggered_mix_error,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NO_LOGS, &basic_setup, NULL },
+ END_OF_TESTCASES
+};
diff --git a/sntp/libevent/test/regress_finalize.c b/sntp/libevent/test/regress_finalize.c
new file mode 100644
index 000000000000..61a6313f1b3b
--- /dev/null
+++ b/sntp/libevent/test/regress_finalize.c
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 2013 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+#include "tinytest.h"
+#include "tinytest_macros.h"
+#include <stdlib.h>
+
+#include "event2/event.h"
+#include "event2/util.h"
+#include "event-internal.h"
+#include "defer-internal.h"
+
+#include "regress.h"
+#include "regress_thread.h"
+
+static void
+timer_callback(evutil_socket_t fd, short what, void *arg)
+{
+ int *int_arg = arg;
+ *int_arg += 1;
+ (void)fd;
+ (void)what;
+}
+static void
+simple_callback(struct event_callback *evcb, void *arg)
+{
+ int *int_arg = arg;
+ *int_arg += 1;
+ (void)evcb;
+}
+static void
+event_finalize_callback_1(struct event *ev, void *arg)
+{
+ int *int_arg = arg;
+ *int_arg += 100;
+ (void)ev;
+}
+static void
+callback_finalize_callback_1(struct event_callback *evcb, void *arg)
+{
+ int *int_arg = arg;
+ *int_arg += 100;
+ (void)evcb;
+}
+
+
+static void
+test_fin_cb_invoked(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+
+ struct event *ev;
+ struct event ev2;
+ struct event_callback evcb;
+ int cb_called = 0;
+ int ev_called = 0;
+
+ const struct timeval ten_sec = {10,0};
+
+ event_deferred_cb_init_(&evcb, 0, simple_callback, &cb_called);
+ ev = evtimer_new(base, timer_callback, &ev_called);
+ /* Just finalize them; don't bother adding. */
+ event_free_finalize(0, ev, event_finalize_callback_1);
+ event_callback_finalize_(base, 0, &evcb, callback_finalize_callback_1);
+
+ event_base_dispatch(base);
+
+ tt_int_op(cb_called, ==, 100);
+ tt_int_op(ev_called, ==, 100);
+
+ ev_called = cb_called = 0;
+ event_base_assert_ok_(base);
+
+ /* Now try it when they're active. (actually, don't finalize: make
+ * sure activation can happen! */
+ ev = evtimer_new(base, timer_callback, &ev_called);
+ event_deferred_cb_init_(&evcb, 0, simple_callback, &cb_called);
+
+ event_active(ev, EV_TIMEOUT, 1);
+ event_callback_activate_(base, &evcb);
+
+ event_base_dispatch(base);
+ tt_int_op(cb_called, ==, 1);
+ tt_int_op(ev_called, ==, 1);
+
+ ev_called = cb_called = 0;
+ event_base_assert_ok_(base);
+
+ /* Great, it worked. Now activate and finalize and make sure only
+ * finalizing happens. */
+ event_active(ev, EV_TIMEOUT, 1);
+ event_callback_activate_(base, &evcb);
+ event_free_finalize(0, ev, event_finalize_callback_1);
+ event_callback_finalize_(base, 0, &evcb, callback_finalize_callback_1);
+
+ event_base_dispatch(base);
+ tt_int_op(cb_called, ==, 100);
+ tt_int_op(ev_called, ==, 100);
+
+ ev_called = 0;
+
+ event_base_assert_ok_(base);
+
+ /* Okay, now add but don't have it become active, and make sure *that*
+ * works. */
+ ev = evtimer_new(base, timer_callback, &ev_called);
+ event_add(ev, &ten_sec);
+ event_free_finalize(0, ev, event_finalize_callback_1);
+
+ event_base_dispatch(base);
+ tt_int_op(ev_called, ==, 100);
+
+ ev_called = 0;
+ event_base_assert_ok_(base);
+
+ /* Now try adding and deleting after finalizing. */
+ ev = evtimer_new(base, timer_callback, &ev_called);
+ evtimer_assign(&ev2, base, timer_callback, &ev_called);
+ event_add(ev, &ten_sec);
+ event_free_finalize(0, ev, event_finalize_callback_1);
+ event_finalize(0, &ev2, event_finalize_callback_1);
+
+ event_add(&ev2, &ten_sec);
+ event_del(ev);
+ event_active(&ev2, EV_TIMEOUT, 1);
+
+ event_base_dispatch(base);
+ tt_int_op(ev_called, ==, 200);
+
+ event_base_assert_ok_(base);
+
+end:
+ ;
+}
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+static void *
+tfff_malloc(size_t n)
+{
+ return malloc(n);
+}
+static void *tfff_p1=NULL, *tfff_p2=NULL;
+static int tfff_p1_freed=0, tfff_p2_freed=0;
+static void
+tfff_free(void *p)
+{
+ if (! p)
+ return;
+ if (p == tfff_p1)
+ ++tfff_p1_freed;
+ if (p == tfff_p2)
+ ++tfff_p2_freed;
+ free(p);
+}
+static void *
+tfff_realloc(void *p, size_t sz)
+{
+ return realloc(p,sz);
+}
+#endif
+
+static void
+test_fin_free_finalize(void *arg)
+{
+#ifdef EVENT__DISABLE_MM_REPLACEMENT
+ tinytest_set_test_skipped_();
+#else
+ struct event_base *base = NULL;
+ struct event *ev, *ev2;
+ int ev_called = 0;
+ int ev2_called = 0;
+
+ (void)arg;
+
+ event_set_mem_functions(tfff_malloc, tfff_realloc, tfff_free);
+
+ base = event_base_new();
+ tt_assert(base);
+
+ ev = evtimer_new(base, timer_callback, &ev_called);
+ ev2 = evtimer_new(base, timer_callback, &ev2_called);
+ tfff_p1 = ev;
+ tfff_p2 = ev2;
+ event_free_finalize(0, ev, event_finalize_callback_1);
+ event_finalize(0, ev2, event_finalize_callback_1);
+
+ event_base_dispatch(base);
+
+ tt_int_op(ev_called, ==, 100);
+ tt_int_op(ev2_called, ==, 100);
+
+ event_base_assert_ok_(base);
+ tt_int_op(tfff_p1_freed, ==, 1);
+ tt_int_op(tfff_p2_freed, ==, 0);
+
+ event_free(ev2);
+
+end:
+ if (base)
+ event_base_free(base);
+#endif
+}
+
+/* For test_fin_within_cb */
+struct event_and_count {
+ struct event *ev;
+ struct event *ev2;
+ int count;
+};
+static void
+event_finalize_callback_2(struct event *ev, void *arg)
+{
+ struct event_and_count *evc = arg;
+ evc->count += 100;
+ event_free(ev);
+}
+static void
+timer_callback_2(evutil_socket_t fd, short what, void *arg)
+{
+ struct event_and_count *evc = arg;
+ event_finalize(0, evc->ev, event_finalize_callback_2);
+ event_finalize(0, evc->ev2, event_finalize_callback_2);
+ ++ evc->count;
+ (void)fd;
+ (void)what;
+}
+
+static void
+test_fin_within_cb(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+
+ struct event_and_count evc1, evc2;
+ evc1.count = evc2.count = 0;
+ evc2.ev2 = evc1.ev = evtimer_new(base, timer_callback_2, &evc1);
+ evc1.ev2 = evc2.ev = evtimer_new(base, timer_callback_2, &evc2);
+
+ /* Activate both. The first one will have its callback run, which
+ * will finalize both of them, preventing the second one's callback
+ * from running. */
+ event_active(evc1.ev, EV_TIMEOUT, 1);
+ event_active(evc2.ev, EV_TIMEOUT, 1);
+
+ event_base_dispatch(base);
+ tt_int_op(evc1.count, ==, 101);
+ tt_int_op(evc2.count, ==, 100);
+
+ event_base_assert_ok_(base);
+ /* Now try with EV_PERSIST events. */
+ evc1.count = evc2.count = 0;
+ evc2.ev2 = evc1.ev = event_new(base, -1, EV_PERSIST, timer_callback_2, &evc1);
+ evc1.ev2 = evc2.ev = event_new(base, -1, EV_PERSIST, timer_callback_2, &evc2);
+
+ event_active(evc1.ev, EV_TIMEOUT, 1);
+ event_active(evc2.ev, EV_TIMEOUT, 1);
+
+ event_base_dispatch(base);
+ tt_int_op(evc1.count, ==, 101);
+ tt_int_op(evc2.count, ==, 100);
+
+ event_base_assert_ok_(base);
+end:
+ ;
+}
+
+#if 0
+static void
+timer_callback_3(evutil_socket_t *fd, short what, void *arg)
+{
+ (void)fd;
+ (void)what;
+
+}
+static void
+test_fin_many(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+
+ struct event *ev1, *ev2;
+ struct event_callback evcb1, evcb2;
+ int ev1_count = 0, ev2_count = 0;
+ int evcb1_count = 0, evcb2_count = 0;
+ struct event_callback *array[4];
+
+ int n;
+
+ /* First attempt: call finalize_many with no events running */
+ ev1 = evtimer_new(base, timer_callback, &ev1_count);
+ ev1 = evtimer_new(base, timer_callback, &ev2_count);
+ event_deferred_cb_init_(&evcb1, 0, simple_callback, &evcb1_called);
+ event_deferred_cb_init_(&evcb2, 0, simple_callback, &evcb2_called);
+ array[0] = &ev1->ev_evcallback;
+ array[1] = &ev2->ev_evcallback;
+ array[2] = &evcb1;
+ array[3] = &evcb2;
+
+
+
+ n = event_callback_finalize_many(base, 4, array,
+ callback_finalize_callback_1);
+
+}
+#endif
+
+
+#define TEST(name, flags) \
+ { #name, test_fin_##name, (flags), &basic_setup, NULL }
+
+struct testcase_t finalize_testcases[] = {
+
+ TEST(cb_invoked, TT_FORK|TT_NEED_BASE),
+ TEST(free_finalize, TT_FORK),
+ TEST(within_cb, TT_FORK|TT_NEED_BASE),
+// TEST(many, TT_FORK|TT_NEED_BASE),
+
+
+ END_OF_TESTCASES
+};
+
diff --git a/sntp/libevent/test/regress_http.c b/sntp/libevent/test/regress_http.c
new file mode 100644
index 000000000000..ca7d5155bf14
--- /dev/null
+++ b/sntp/libevent/test/regress_http.c
@@ -0,0 +1,3893 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/dns.h"
+
+#include "event2/event.h"
+#include "event2/http.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent.h"
+#include "event2/util.h"
+#include "log-internal.h"
+#include "http-internal.h"
+#include "regress.h"
+#include "regress_testutils.h"
+
+static struct evhttp *http;
+/* set if a test needs to call loopexit on a base */
+static struct event_base *exit_base;
+
+static char const BASIC_REQUEST_BODY[] = "This is funny";
+
+#define IMPL_HTTP_REQUEST_ERROR_CB(name, expecting_error) \
+ static void \
+ http_request_error_cb_with_##name##_(enum evhttp_request_error error, \
+ void *arg) \
+ { \
+ if (error != expecting_error) { \
+ fprintf(stderr, "FAILED\n"); \
+ exit(1); \
+ } \
+ test_ok = 1; \
+ }
+IMPL_HTTP_REQUEST_ERROR_CB(cancel, EVREQ_HTTP_REQUEST_CANCEL)
+
+static void http_basic_cb(struct evhttp_request *req, void *arg);
+static void http_chunked_cb(struct evhttp_request *req, void *arg);
+static void http_post_cb(struct evhttp_request *req, void *arg);
+static void http_put_cb(struct evhttp_request *req, void *arg);
+static void http_delete_cb(struct evhttp_request *req, void *arg);
+static void http_delay_cb(struct evhttp_request *req, void *arg);
+static void http_large_delay_cb(struct evhttp_request *req, void *arg);
+static void http_badreq_cb(struct evhttp_request *req, void *arg);
+static void http_dispatcher_cb(struct evhttp_request *req, void *arg);
+static void http_on_complete_cb(struct evhttp_request *req, void *arg);
+
+static int
+http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6)
+{
+ int port;
+ struct evhttp_bound_socket *sock;
+
+ if (ipv6)
+ sock = evhttp_bind_socket_with_handle(myhttp, "::1", *pport);
+ else
+ sock = evhttp_bind_socket_with_handle(myhttp, "127.0.0.1", *pport);
+
+ if (sock == NULL)
+ event_errx(1, "Could not start web server");
+
+ port = regress_get_socket_port(evhttp_bound_socket_get_fd(sock));
+ if (port < 0)
+ return -1;
+ *pport = (ev_uint16_t) port;
+
+ return 0;
+}
+
+static struct evhttp *
+http_setup(ev_uint16_t *pport, struct event_base *base, int ipv6)
+{
+ struct evhttp *myhttp;
+
+ /* Try a few different ports */
+ myhttp = evhttp_new(base);
+
+ if (http_bind(myhttp, pport, ipv6) < 0)
+ return NULL;
+
+ /* Register a callback for certain types of requests */
+ evhttp_set_cb(myhttp, "/test", http_basic_cb, base);
+ evhttp_set_cb(myhttp, "/chunked", http_chunked_cb, base);
+ evhttp_set_cb(myhttp, "/streamed", http_chunked_cb, base);
+ evhttp_set_cb(myhttp, "/postit", http_post_cb, base);
+ evhttp_set_cb(myhttp, "/putit", http_put_cb, base);
+ evhttp_set_cb(myhttp, "/deleteit", http_delete_cb, base);
+ evhttp_set_cb(myhttp, "/delay", http_delay_cb, base);
+ evhttp_set_cb(myhttp, "/largedelay", http_large_delay_cb, base);
+ evhttp_set_cb(myhttp, "/badrequest", http_badreq_cb, base);
+ evhttp_set_cb(myhttp, "/oncomplete", http_on_complete_cb, base);
+ evhttp_set_cb(myhttp, "/", http_dispatcher_cb, base);
+ return (myhttp);
+}
+
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 1024
+#endif
+
+static evutil_socket_t
+http_connect(const char *address, u_short port)
+{
+ /* Stupid code for connecting */
+ struct evutil_addrinfo ai, *aitop;
+ char strport[NI_MAXSERV];
+
+ struct sockaddr *sa;
+ int slen;
+ evutil_socket_t fd;
+
+ memset(&ai, 0, sizeof(ai));
+ ai.ai_family = AF_INET;
+ ai.ai_socktype = SOCK_STREAM;
+ evutil_snprintf(strport, sizeof(strport), "%d", port);
+ if (evutil_getaddrinfo(address, strport, &ai, &aitop) != 0) {
+ event_warn("getaddrinfo");
+ return (-1);
+ }
+ sa = aitop->ai_addr;
+ slen = aitop->ai_addrlen;
+
+ fd = socket(AF_INET, SOCK_STREAM, 0);
+ if (fd == -1)
+ event_err(1, "socket failed");
+
+ evutil_make_socket_nonblocking(fd);
+ if (connect(fd, sa, slen) == -1) {
+#ifdef _WIN32
+ int tmp_err = WSAGetLastError();
+ if (tmp_err != WSAEINPROGRESS && tmp_err != WSAEINVAL &&
+ tmp_err != WSAEWOULDBLOCK)
+ event_err(1, "connect failed");
+#else
+ if (errno != EINPROGRESS)
+ event_err(1, "connect failed");
+#endif
+ }
+
+ evutil_freeaddrinfo(aitop);
+
+ return (fd);
+}
+
+/* Helper: do a strcmp on the contents of buf and the string s. */
+static int
+evbuffer_datacmp(struct evbuffer *buf, const char *s)
+{
+ size_t b_sz = evbuffer_get_length(buf);
+ size_t s_sz = strlen(s);
+ unsigned char *d;
+ int r;
+
+ if (b_sz < s_sz)
+ return -1;
+
+ d = evbuffer_pullup(buf, s_sz);
+ if ((r = memcmp(d, s, s_sz)))
+ return r;
+
+ if (b_sz > s_sz)
+ return 1;
+ else
+ return 0;
+}
+
+/* Helper: Return true iff buf contains s */
+static int
+evbuffer_contains(struct evbuffer *buf, const char *s)
+{
+ struct evbuffer_ptr ptr;
+ ptr = evbuffer_search(buf, s, strlen(s), NULL);
+ return ptr.pos != -1;
+}
+
+static void
+http_readcb(struct bufferevent *bev, void *arg)
+{
+ const char *what = BASIC_REQUEST_BODY;
+ struct event_base *my_base = arg;
+
+ if (evbuffer_contains(bufferevent_get_input(bev), what)) {
+ struct evhttp_request *req = evhttp_request_new(NULL, NULL);
+ enum message_read_status done;
+
+ /* req->kind = EVHTTP_RESPONSE; */
+ done = evhttp_parse_firstline_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ done = evhttp_parse_headers_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ if (done == 1 &&
+ evhttp_find_header(evhttp_request_get_input_headers(req),
+ "Content-Type") != NULL)
+ test_ok++;
+
+ out:
+ evhttp_request_free(req);
+ bufferevent_disable(bev, EV_READ);
+ if (exit_base)
+ event_base_loopexit(exit_base, NULL);
+ else if (my_base)
+ event_base_loopexit(my_base, NULL);
+ else {
+ fprintf(stderr, "No way to exit loop!\n");
+ exit(1);
+ }
+ }
+}
+
+static void
+http_writecb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ /* enable reading of the reply */
+ bufferevent_enable(bev, EV_READ);
+ test_ok++;
+ }
+}
+
+static void
+http_errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ test_ok = -2;
+ event_base_loopexit(arg, NULL);
+}
+
+static int found_multi = 0;
+static int found_multi2 = 0;
+
+static void
+http_basic_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+ struct evhttp_connection *evcon;
+ int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL;
+ event_debug(("%s: called\n", __func__));
+ evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
+
+ evcon = evhttp_request_get_connection(req);
+ tt_assert(evhttp_connection_get_server(evcon) == http);
+
+ /* For multi-line headers test */
+ {
+ const char *multi =
+ evhttp_find_header(evhttp_request_get_input_headers(req),"X-Multi");
+ if (multi) {
+ found_multi = !strcmp(multi,"aaaaaaaa a END");
+ if (strcmp("END", multi + strlen(multi) - 3) == 0)
+ test_ok++;
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "X-Last"))
+ test_ok++;
+ }
+ }
+ {
+ const char *multi2 =
+ evhttp_find_header(evhttp_request_get_input_headers(req),"X-Multi-Extra-WS");
+ if (multi2) {
+ found_multi2 = !strcmp(multi2,"libevent 2.1");
+ }
+ }
+
+
+ /* injecting a bad content-length */
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "X-Negative"))
+ evhttp_add_header(evhttp_request_get_output_headers(req),
+ "Content-Length", "-100");
+
+ /* allow sending of an empty reply */
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine",
+ !empty ? evb : NULL);
+
+end:
+ evbuffer_free(evb);
+}
+
+static char const* const CHUNKS[] = {
+ "This is funny",
+ "but not hilarious.",
+ "bwv 1052"
+};
+
+struct chunk_req_state {
+ struct event_base *base;
+ struct evhttp_request *req;
+ int i;
+};
+
+static void
+http_chunked_trickle_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+ struct chunk_req_state *state = arg;
+ struct timeval when = { 0, 0 };
+
+ evbuffer_add_printf(evb, "%s", CHUNKS[state->i]);
+ evhttp_send_reply_chunk(state->req, evb);
+ evbuffer_free(evb);
+
+ if (++state->i < (int) (sizeof(CHUNKS)/sizeof(CHUNKS[0]))) {
+ event_base_once(state->base, -1, EV_TIMEOUT,
+ http_chunked_trickle_cb, state, &when);
+ } else {
+ evhttp_send_reply_end(state->req);
+ free(state);
+ }
+}
+
+static void
+http_chunked_cb(struct evhttp_request *req, void *arg)
+{
+ struct timeval when = { 0, 0 };
+ struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state));
+ event_debug(("%s: called\n", __func__));
+
+ memset(state, 0, sizeof(struct chunk_req_state));
+ state->req = req;
+ state->base = arg;
+
+ if (strcmp(evhttp_request_get_uri(req), "/streamed") == 0) {
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Content-Length", "39");
+ }
+
+ /* generate a chunked/streamed reply */
+ evhttp_send_reply_start(req, HTTP_OK, "Everything is fine");
+
+ /* but trickle it across several iterations to ensure we're not
+ * assuming it comes all at once */
+ event_base_once(arg, -1, EV_TIMEOUT, http_chunked_trickle_cb, state, &when);
+}
+
+static void
+http_complete_write(evutil_socket_t fd, short what, void *arg)
+{
+ struct bufferevent *bev = arg;
+ const char *http_request = "host\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+ bufferevent_write(bev, http_request, strlen(http_request));
+}
+
+static void
+http_basic_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct timeval tv;
+ struct bufferevent *bev;
+ evutil_socket_t fd;
+ const char *http_request;
+ ev_uint16_t port = 0, port2 = 0;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ /* bind to a second socket */
+ if (http_bind(http, &port2, 0) == -1) {
+ fprintf(stdout, "FAILED (bind)\n");
+ exit(1);
+ }
+
+ fd = http_connect("127.0.0.1", port);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ /* first half of the http request */
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: some";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+ evutil_timerclear(&tv);
+ tv.tv_usec = 10000;
+ event_base_once(data->base,
+ -1, EV_TIMEOUT, http_complete_write, bev, &tv);
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 3);
+
+ /* connect to the second port */
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ fd = http_connect("127.0.0.1", port2);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 5);
+
+ /* Connect to the second port again. This time, send an absolute uri. */
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ fd = http_connect("127.0.0.1", port2);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_request =
+ "GET http://somehost.net/test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 7);
+
+ evhttp_free(http);
+ end:
+ ;
+}
+
+
+static void
+http_delay_reply(evutil_socket_t fd, short what, void *arg)
+{
+ struct evhttp_request *req = arg;
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL);
+
+ ++test_ok;
+}
+
+static void
+http_delay_cb(struct evhttp_request *req, void *arg)
+{
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0;
+ tv.tv_usec = 200 * 1000;
+
+ event_base_once(arg, -1, EV_TIMEOUT, http_delay_reply, req, &tv);
+}
+
+static void
+http_badreq_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *buf = evbuffer_new();
+
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Content-Type", "text/xml; charset=UTF-8");
+ evbuffer_add_printf(buf, "Hello, %s!", "127.0.0.1");
+
+ evhttp_send_reply(req, HTTP_OK, "OK", buf);
+ evbuffer_free(buf);
+}
+
+static void
+http_badreq_errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ /* ignore */
+}
+
+#ifndef SHUT_WR
+#ifdef _WIN32
+#define SHUT_WR SD_SEND
+#else
+#define SHUT_WR 1
+#endif
+#endif
+
+static void
+http_badreq_readcb(struct bufferevent *bev, void *arg)
+{
+ const char *what = "Hello, 127.0.0.1";
+ const char *bad_request = "400 Bad Request";
+
+ if (evbuffer_contains(bufferevent_get_input(bev), bad_request)) {
+ TT_FAIL(("%s:bad request detected", __func__));
+ bufferevent_disable(bev, EV_READ);
+ event_base_loopexit(arg, NULL);
+ return;
+ }
+
+ if (evbuffer_contains(bufferevent_get_input(bev), what)) {
+ struct evhttp_request *req = evhttp_request_new(NULL, NULL);
+ enum message_read_status done;
+
+ /* req->kind = EVHTTP_RESPONSE; */
+ done = evhttp_parse_firstline_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ done = evhttp_parse_headers_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ if (done == 1 &&
+ evhttp_find_header(evhttp_request_get_input_headers(req),
+ "Content-Type") != NULL)
+ test_ok++;
+
+ out:
+ evhttp_request_free(req);
+ evbuffer_drain(bufferevent_get_input(bev), evbuffer_get_length(bufferevent_get_input(bev)));
+ }
+
+ shutdown(bufferevent_getfd(bev), SHUT_WR);
+}
+
+static void
+http_badreq_successcb(evutil_socket_t fd, short what, void *arg)
+{
+ event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg));
+ event_base_loopexit(exit_base, NULL);
+}
+
+static void
+http_bad_request_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct timeval tv;
+ struct bufferevent *bev = NULL;
+ evutil_socket_t fd = -1;
+ const char *http_request;
+ ev_uint16_t port=0, port2=0;
+
+ test_ok = 0;
+ exit_base = data->base;
+
+ http = http_setup(&port, data->base, 0);
+
+ /* bind to a second socket */
+ if (http_bind(http, &port2, 0) == -1)
+ TT_DIE(("Bind socket failed"));
+
+ /* NULL request test */
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_badreq_readcb, http_writecb,
+ http_badreq_errorcb, data->base);
+ bufferevent_enable(bev, EV_READ);
+
+ /* real NULL request */
+ http_request = "";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ shutdown(fd, SHUT_WR);
+ timerclear(&tv);
+ tv.tv_usec = 10000;
+ event_base_once(data->base, -1, EV_TIMEOUT, http_badreq_successcb, bev, &tv);
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ if (test_ok != 0) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ /* Second answer (BAD REQUEST) on connection close */
+
+ /* connect to the second port */
+ fd = http_connect("127.0.0.1", port2);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_badreq_readcb, http_writecb,
+ http_badreq_errorcb, data->base);
+ bufferevent_enable(bev, EV_READ);
+
+ /* first half of the http request */
+ http_request =
+ "GET /badrequest HTTP/1.0\r\n" \
+ "Connection: Keep-Alive\r\n" \
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ timerclear(&tv);
+ tv.tv_usec = 10000;
+ event_base_once(data->base, -1, EV_TIMEOUT, http_badreq_successcb, bev, &tv);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 2);
+
+end:
+ evhttp_free(http);
+ if (bev)
+ bufferevent_free(bev);
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+static struct evhttp_connection *delayed_client;
+
+static void
+http_large_delay_cb(struct evhttp_request *req, void *arg)
+{
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_usec = 500000;
+
+ event_base_once(arg, -1, EV_TIMEOUT, http_delay_reply, req, &tv);
+ evhttp_connection_fail_(delayed_client, EVREQ_HTTP_EOF);
+}
+
+/*
+ * HTTP DELETE test, just piggyback on the basic test
+ */
+
+static void
+http_delete_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+ int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL;
+
+ /* Expecting a DELETE request */
+ if (evhttp_request_get_command(req) != EVHTTP_REQ_DELETE) {
+ fprintf(stdout, "FAILED (delete type)\n");
+ exit(1);
+ }
+
+ event_debug(("%s: called\n", __func__));
+ evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
+
+ /* allow sending of an empty reply */
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine",
+ !empty ? evb : NULL);
+
+ evbuffer_free(evb);
+}
+
+static void
+http_delete_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev;
+ evutil_socket_t fd = -1;
+ const char *http_request;
+ ev_uint16_t port = 0;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_request =
+ "DELETE /deleteit HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ evhttp_free(http);
+
+ tt_int_op(test_ok, ==, 2);
+ end:
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+static void
+http_sent_cb(struct evhttp_request *req, void *arg)
+{
+ ev_uintptr_t val = (ev_uintptr_t)arg;
+ struct evbuffer *b;
+
+ if (val != 0xDEADBEEF) {
+ fprintf(stdout, "FAILED on_complete_cb argument\n");
+ exit(1);
+ }
+
+ b = evhttp_request_get_output_buffer(req);
+ if (evbuffer_get_length(b) != 0) {
+ fprintf(stdout, "FAILED on_complete_cb output buffer not written\n");
+ exit(1);
+ }
+
+ event_debug(("%s: called\n", __func__));
+
+ ++test_ok;
+}
+
+static void
+http_on_complete_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb = evbuffer_new();
+
+ evhttp_request_set_on_complete_cb(req, http_sent_cb, (void *)0xDEADBEEF);
+
+ event_debug(("%s: called\n", __func__));
+ evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
+
+ /* allow sending of an empty reply */
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+
+ evbuffer_free(evb);
+
+ ++test_ok;
+}
+
+static void
+http_on_complete_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev;
+ evutil_socket_t fd = -1;
+ const char *http_request;
+ ev_uint16_t port = 0;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_request =
+ "GET /oncomplete HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev);
+
+ evhttp_free(http);
+
+ tt_int_op(test_ok, ==, 4);
+ end:
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+static void
+http_allowed_methods_eventcb(struct bufferevent *bev, short what, void *arg)
+{
+ char **output = arg;
+ if ((what & (BEV_EVENT_ERROR|BEV_EVENT_EOF))) {
+ char buf[4096];
+ int n;
+ n = evbuffer_remove(bufferevent_get_input(bev), buf,
+ sizeof(buf)-1);
+ if (n >= 0) {
+ buf[n]='\0';
+ if (*output)
+ free(*output);
+ *output = strdup(buf);
+ }
+ event_base_loopexit(exit_base, NULL);
+ }
+}
+
+static void
+http_allowed_methods_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev1, *bev2, *bev3;
+ evutil_socket_t fd1=-1, fd2=-1, fd3=-1;
+ const char *http_request;
+ char *result1=NULL, *result2=NULL, *result3=NULL;
+ ev_uint16_t port = 0;
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ fd1 = http_connect("127.0.0.1", port);
+ tt_int_op(fd1, >=, 0);
+
+ /* GET is out; PATCH is in. */
+ evhttp_set_allowed_methods(http, EVHTTP_REQ_PATCH);
+
+ /* Stupid thing to send a request */
+ bev1 = bufferevent_socket_new(data->base, fd1, 0);
+ bufferevent_enable(bev1, EV_READ|EV_WRITE);
+ bufferevent_setcb(bev1, NULL, NULL,
+ http_allowed_methods_eventcb, &result1);
+
+ http_request =
+ "GET /index.html HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev1, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ fd2 = http_connect("127.0.0.1", port);
+ tt_int_op(fd2, >=, 0);
+
+ bev2 = bufferevent_socket_new(data->base, fd2, 0);
+ bufferevent_enable(bev2, EV_READ|EV_WRITE);
+ bufferevent_setcb(bev2, NULL, NULL,
+ http_allowed_methods_eventcb, &result2);
+
+ http_request =
+ "PATCH /test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev2, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ fd3 = http_connect("127.0.0.1", port);
+ tt_int_op(fd3, >=, 0);
+
+ bev3 = bufferevent_socket_new(data->base, fd3, 0);
+ bufferevent_enable(bev3, EV_READ|EV_WRITE);
+ bufferevent_setcb(bev3, NULL, NULL,
+ http_allowed_methods_eventcb, &result3);
+
+ http_request =
+ "FLOOP /test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev3, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev1);
+ bufferevent_free(bev2);
+ bufferevent_free(bev3);
+
+ evhttp_free(http);
+
+ /* Method known but disallowed */
+ tt_assert(result1);
+ tt_assert(!strncmp(result1, "HTTP/1.1 501 ", strlen("HTTP/1.1 501 ")));
+
+ /* Method known and allowed */
+ tt_assert(result2);
+ tt_assert(!strncmp(result2, "HTTP/1.1 200 ", strlen("HTTP/1.1 200 ")));
+
+ /* Method unknown */
+ tt_assert(result3);
+ tt_assert(!strncmp(result3, "HTTP/1.1 501 ", strlen("HTTP/1.1 501 ")));
+
+ end:
+ if (result1)
+ free(result1);
+ if (result2)
+ free(result2);
+ if (result3)
+ free(result3);
+ if (fd1 >= 0)
+ evutil_closesocket(fd1);
+ if (fd2 >= 0)
+ evutil_closesocket(fd2);
+ if (fd3 >= 0)
+ evutil_closesocket(fd3);
+}
+
+static void http_request_done(struct evhttp_request *, void *);
+static void http_request_empty_done(struct evhttp_request *, void *);
+
+static void
+http_connection_test_(struct basic_test_data *data, int persistent, const char *address, struct evdns_base *dnsbase, int ipv6)
+{
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, ipv6);
+
+ evcon = evhttp_connection_base_new(data->base, dnsbase, address, port);
+ tt_assert(evcon);
+
+ tt_assert(evhttp_connection_get_base(evcon) == data->base);
+
+ exit_base = data->base;
+
+ tt_assert(evhttp_connection_get_server(evcon) == NULL);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok);
+
+ /* try to make another request over the same connection */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /*
+ * if our connections are not supposed to be persistent; request
+ * a close from the server.
+ */
+ if (!persistent)
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Connection", "close");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ /* make another request: request empty reply */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_empty_done, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Empty", "itis");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_connection_test(void *arg)
+{
+ http_connection_test_(arg, 0, "127.0.0.1", NULL, 0);
+}
+static void
+http_persist_connection_test(void *arg)
+{
+ http_connection_test_(arg, 1, "127.0.0.1", NULL, 0);
+}
+
+static struct regress_dns_server_table search_table[] = {
+ { "localhost", "A", "127.0.0.1", 0 },
+ { NULL, NULL, NULL, 0 }
+};
+
+static void
+http_connection_async_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct evdns_base *dns_base = NULL;
+ ev_uint16_t portnum = 0;
+ char address[64];
+
+ exit_base = data->base;
+ tt_assert(regress_dnsserver(data->base, &portnum, search_table));
+
+ dns_base = evdns_base_new(data->base, 0/* init name servers */);
+ tt_assert(dns_base);
+
+ /* Add ourself as the only nameserver, and make sure we really are
+ * the only nameserver. */
+ evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
+ evdns_base_nameserver_ip_add(dns_base, address);
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, dns_base, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok);
+
+ /* try to make another request over the same connection */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /*
+ * if our connections are not supposed to be persistent; request
+ * a close from the server.
+ */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Connection", "close");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ /* make another request: request empty reply */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_empty_done, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Empty", "itis");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+ regress_clean_dnsserver();
+}
+
+static void
+http_request_never_call(struct evhttp_request *req, void *arg)
+{
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+}
+
+static void
+http_do_cancel(evutil_socket_t fd, short what, void *arg)
+{
+ struct evhttp_request *req = arg;
+ struct timeval tv;
+ struct event_base *base;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0;
+ tv.tv_usec = 500 * 1000;
+
+ base = evhttp_connection_get_base(evhttp_request_get_connection(req));
+ evhttp_cancel_request(req);
+
+ event_base_loopexit(base, &tv);
+
+ ++test_ok;
+}
+
+static void
+http_cancel_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct timeval tv;
+
+ exit_base = data->base;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_request_never_call, NULL);
+ evhttp_request_set_error_cb(req, http_request_error_cb_with_cancel_);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/delay"),
+ !=, -1);
+
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0;
+ tv.tv_usec = 100 * 1000;
+
+ event_base_once(data->base, -1, EV_TIMEOUT, http_do_cancel, req, &tv);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 3);
+
+ /* try to make another request over the same connection */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test"),
+ !=, -1);
+
+ event_base_dispatch(data->base);
+
+ /* make another request: request empty reply */
+ test_ok = 0;
+
+ req = evhttp_request_new(http_request_empty_done, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Empty", "itis");
+
+ /* We give ownership of the request to the connection */
+ tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test"),
+ !=, -1);
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_request_done(struct evhttp_request *req, void *arg)
+{
+ const char *what = arg;
+
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Type") == NULL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(what)) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), what) != 0) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ EVUTIL_ASSERT(exit_base);
+ event_base_loopexit(exit_base, NULL);
+}
+
+static void
+http_request_expect_error(struct evhttp_request *req, void *arg)
+{
+ if (evhttp_request_get_response_code(req) == HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ EVUTIL_ASSERT(arg);
+ event_base_loopexit(arg, NULL);
+}
+
+/* test virtual hosts */
+static void
+http_virtual_host_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct evhttp *second = NULL, *third = NULL;
+ evutil_socket_t fd;
+ struct bufferevent *bev;
+ const char *http_request;
+
+ exit_base = data->base;
+
+ http = http_setup(&port, data->base, 0);
+
+ /* virtual host */
+ second = evhttp_new(NULL);
+ evhttp_set_cb(second, "/funnybunny", http_basic_cb, NULL);
+ third = evhttp_new(NULL);
+ evhttp_set_cb(third, "/blackcoffee", http_basic_cb, NULL);
+
+ if (evhttp_add_virtual_host(http, "foo.com", second) == -1) {
+ tt_abort_msg("Couldn't add vhost");
+ }
+
+ if (evhttp_add_virtual_host(http, "bar.*.foo.com", third) == -1) {
+ tt_abort_msg("Couldn't add wildcarded vhost");
+ }
+
+ /* add some aliases to the vhosts */
+ tt_assert(evhttp_add_server_alias(second, "manolito.info") == 0);
+ tt_assert(evhttp_add_server_alias(third, "bonkers.org") == 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /* make a request with a different host and expect an error */
+ req = evhttp_request_new(http_request_expect_error, data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/funnybunny") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1);
+
+ test_ok = 0;
+
+ /* make a request with the right host and expect a response */
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "foo.com");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/funnybunny") == -1) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1);
+
+ test_ok = 0;
+
+ /* make a request with the right host and expect a response */
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "bar.magic.foo.com");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/blackcoffee") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1)
+
+ test_ok = 0;
+
+ /* make a request with the right host and expect a response */
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "manolito.info");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/funnybunny") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1)
+
+ test_ok = 0;
+
+ /* make a request with the right host and expect a response */
+ req = evhttp_request_new(http_request_done, (void*) BASIC_REQUEST_BODY);
+
+ /* Add the Host header. This time with the optional port. */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "bonkers.org:8000");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/blackcoffee") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1)
+
+ test_ok = 0;
+
+ /* Now make a raw request with an absolute URI. */
+ fd = http_connect("127.0.0.1", port);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, NULL);
+
+ /* The host in the URI should override the Host: header */
+ http_request =
+ "GET http://manolito.info/funnybunny HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 2);
+
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+
+/* test date header and content length */
+
+static void
+http_request_empty_done(struct evhttp_request *req, void *arg)
+{
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Date") == NULL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Length") == NULL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (strcmp(evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Length"),
+ "0")) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != 0) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ EVUTIL_ASSERT(arg);
+ event_base_loopexit(arg, NULL);
+}
+
+/*
+ * HTTP DISPATCHER test
+ */
+
+void
+http_dispatcher_cb(struct evhttp_request *req, void *arg)
+{
+
+ struct evbuffer *evb = evbuffer_new();
+ event_debug(("%s: called\n", __func__));
+ evbuffer_add_printf(evb, "DISPATCHER_TEST");
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+
+ evbuffer_free(evb);
+}
+
+static void
+http_dispatcher_test_done(struct evhttp_request *req, void *arg)
+{
+ struct event_base *base = arg;
+ const char *what = "DISPATCHER_TEST";
+
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Type") == NULL) {
+ fprintf(stderr, "FAILED (content type)\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(what)) {
+ fprintf(stderr, "FAILED (length %lu vs %lu)\n",
+ (unsigned long)evbuffer_get_length(evhttp_request_get_input_buffer(req)), (unsigned long)strlen(what));
+ exit(1);
+ }
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), what) != 0) {
+ fprintf(stderr, "FAILED (data)\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_base_loopexit(base, NULL);
+}
+
+static void
+http_dispatcher_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /* also bind to local host */
+ evhttp_connection_set_local_address(evcon, "127.0.0.1");
+
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_dispatcher_test_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+/*
+ * HTTP POST test.
+ */
+
+void http_postrequest_done(struct evhttp_request *, void *);
+
+#define POST_DATA "Okay. Not really printf"
+
+static void
+http_post_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule an HTTP POST request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_postrequest_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), POST_DATA);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/postit") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 1);
+
+ test_ok = 0;
+
+ req = evhttp_request_new(http_postrequest_done, data->base);
+ tt_assert(req);
+
+ /* Now try with 100-continue. */
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), POST_DATA);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/postit") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 1);
+
+ evhttp_connection_free(evcon);
+ evhttp_free(http);
+
+ end:
+ ;
+}
+
+void
+http_post_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb;
+ event_debug(("%s: called\n", __func__));
+
+ /* Yes, we are expecting a post request */
+ if (evhttp_request_get_command(req) != EVHTTP_REQ_POST) {
+ fprintf(stdout, "FAILED (post type)\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(POST_DATA)) {
+ fprintf(stdout, "FAILED (length: %lu vs %lu)\n",
+ (unsigned long) evbuffer_get_length(evhttp_request_get_input_buffer(req)), (unsigned long) strlen(POST_DATA));
+ exit(1);
+ }
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), POST_DATA) != 0) {
+ fprintf(stdout, "FAILED (data)\n");
+ fprintf(stdout, "Got :%s\n", evbuffer_pullup(evhttp_request_get_input_buffer(req),-1));
+ fprintf(stdout, "Want:%s\n", POST_DATA);
+ exit(1);
+ }
+
+ evb = evbuffer_new();
+ evbuffer_add_printf(evb, BASIC_REQUEST_BODY);
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
+
+ evbuffer_free(evb);
+}
+
+void
+http_postrequest_done(struct evhttp_request *req, void *arg)
+{
+ const char *what = BASIC_REQUEST_BODY;
+ struct event_base *base = arg;
+
+ if (req == NULL) {
+ fprintf(stderr, "FAILED (timeout)\n");
+ exit(1);
+ }
+
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+
+ fprintf(stderr, "FAILED (response code)\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Type") == NULL) {
+ fprintf(stderr, "FAILED (content type)\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(what)) {
+ fprintf(stderr, "FAILED (length %lu vs %lu)\n",
+ (unsigned long)evbuffer_get_length(evhttp_request_get_input_buffer(req)), (unsigned long)strlen(what));
+ exit(1);
+ }
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), what) != 0) {
+ fprintf(stderr, "FAILED (data)\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_base_loopexit(base, NULL);
+}
+
+/*
+ * HTTP PUT test, basically just like POST, but ...
+ */
+
+void http_putrequest_done(struct evhttp_request *, void *);
+
+#define PUT_DATA "Hi, I'm some PUT data"
+
+static void
+http_put_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * Schedule the HTTP PUT request
+ */
+
+ req = evhttp_request_new(http_putrequest_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "someotherhost");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), PUT_DATA);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_PUT, "/putit") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ evhttp_connection_free(evcon);
+ evhttp_free(http);
+
+ tt_int_op(test_ok, ==, 1);
+ end:
+ ;
+}
+
+void
+http_put_cb(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *evb;
+ event_debug(("%s: called\n", __func__));
+
+ /* Expecting a PUT request */
+ if (evhttp_request_get_command(req) != EVHTTP_REQ_PUT) {
+ fprintf(stdout, "FAILED (put type)\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(PUT_DATA)) {
+ fprintf(stdout, "FAILED (length: %lu vs %lu)\n",
+ (unsigned long)evbuffer_get_length(evhttp_request_get_input_buffer(req)), (unsigned long)strlen(PUT_DATA));
+ exit(1);
+ }
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), PUT_DATA) != 0) {
+ fprintf(stdout, "FAILED (data)\n");
+ fprintf(stdout, "Got :%s\n", evbuffer_pullup(evhttp_request_get_input_buffer(req),-1));
+ fprintf(stdout, "Want:%s\n", PUT_DATA);
+ exit(1);
+ }
+
+ evb = evbuffer_new();
+ evbuffer_add_printf(evb, "That ain't funny");
+
+ evhttp_send_reply(req, HTTP_OK, "Everything is great", evb);
+
+ evbuffer_free(evb);
+}
+
+void
+http_putrequest_done(struct evhttp_request *req, void *arg)
+{
+ struct event_base *base = arg;
+ const char *what = "That ain't funny";
+
+ if (req == NULL) {
+ fprintf(stderr, "FAILED (timeout)\n");
+ exit(1);
+ }
+
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+
+ fprintf(stderr, "FAILED (response code)\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Type") == NULL) {
+ fprintf(stderr, "FAILED (content type)\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != strlen(what)) {
+ fprintf(stderr, "FAILED (length %lu vs %lu)\n",
+ (unsigned long)evbuffer_get_length(evhttp_request_get_input_buffer(req)), (unsigned long)strlen(what));
+ exit(1);
+ }
+
+
+ if (evbuffer_datacmp(evhttp_request_get_input_buffer(req), what) != 0) {
+ fprintf(stderr, "FAILED (data)\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_base_loopexit(base, NULL);
+}
+
+static void
+http_failure_readcb(struct bufferevent *bev, void *arg)
+{
+ const char *what = "400 Bad Request";
+ if (evbuffer_contains(bufferevent_get_input(bev), what)) {
+ test_ok = 2;
+ bufferevent_disable(bev, EV_READ);
+ event_base_loopexit(arg, NULL);
+ }
+}
+
+/*
+ * Testing that the HTTP server can deal with a malformed request.
+ */
+static void
+http_failure_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev;
+ evutil_socket_t fd = -1;
+ const char *http_request;
+ ev_uint16_t port = 0;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, http_failure_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_request = "illegal request\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev);
+
+ evhttp_free(http);
+
+ tt_int_op(test_ok, ==, 2);
+ end:
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+static void
+close_detect_done(struct evhttp_request *req, void *arg)
+{
+ struct timeval tv;
+ tt_assert(req);
+ tt_assert(evhttp_request_get_response_code(req) == HTTP_OK);
+
+ test_ok = 1;
+
+ end:
+ evutil_timerclear(&tv);
+ tv.tv_usec = 150000;
+ event_base_loopexit(arg, &tv);
+}
+
+static void
+close_detect_launch(evutil_socket_t fd, short what, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ struct event_base *base = evhttp_connection_get_base(evcon);
+ struct evhttp_request *req;
+
+ req = evhttp_request_new(close_detect_done, base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_fail_msg("Couldn't make request");
+ }
+}
+
+static void
+close_detect_cb(struct evhttp_request *req, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ struct event_base *base = evhttp_connection_get_base(evcon);
+ struct timeval tv;
+
+ if (req != NULL && evhttp_request_get_response_code(req) != HTTP_OK) {
+ tt_abort_msg("Failed");
+ }
+
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0; /* longer than the http time out */
+ tv.tv_usec = 600000; /* longer than the http time out */
+
+ /* launch a new request on the persistent connection in .3 seconds */
+ event_base_once(base, -1, EV_TIMEOUT, close_detect_launch, evcon, &tv);
+ end:
+ ;
+}
+
+
+static void
+http_close_detection_(struct basic_test_data *data, int with_delay)
+{
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ const struct timeval sec_tenth = { 0, 100000 };
+
+ test_ok = 0;
+ http = http_setup(&port, data->base, 0);
+
+ /* .1 second timeout */
+ evhttp_set_timeout_tv(http, &sec_tenth);
+
+ evcon = evhttp_connection_base_new(data->base, NULL,
+ "127.0.0.1", port);
+ tt_assert(evcon);
+ evhttp_connection_set_timeout_tv(evcon, &sec_tenth);
+
+
+ tt_assert(evcon);
+ delayed_client = evcon;
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(close_detect_cb, evcon);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon,
+ req, EVHTTP_REQ_GET, with_delay ? "/largedelay" : "/test") == -1) {
+ tt_abort_msg("couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ /* at this point, the http server should have no connection */
+ tt_assert(TAILQ_FIRST(&http->connections) == NULL);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+static void
+http_close_detection_test(void *arg)
+{
+ http_close_detection_(arg, 0);
+}
+static void
+http_close_detection_delay_test(void *arg)
+{
+ http_close_detection_(arg, 1);
+}
+
+static void
+http_highport_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ int i = -1;
+ struct evhttp *myhttp = NULL;
+
+ /* Try a few different ports */
+ for (i = 0; i < 50; ++i) {
+ myhttp = evhttp_new(data->base);
+ if (evhttp_bind_socket(myhttp, "127.0.0.1", 65535 - i) == 0) {
+ test_ok = 1;
+ evhttp_free(myhttp);
+ return;
+ }
+ evhttp_free(myhttp);
+ }
+
+ tt_fail_msg("Couldn't get a high port");
+}
+
+static void
+http_bad_header_test(void *ptr)
+{
+ struct evkeyvalq headers;
+
+ TAILQ_INIT(&headers);
+
+ tt_want(evhttp_add_header(&headers, "One", "Two") == 0);
+ tt_want(evhttp_add_header(&headers, "One", "Two\r\n Three") == 0);
+ tt_want(evhttp_add_header(&headers, "One\r", "Two") == -1);
+ tt_want(evhttp_add_header(&headers, "One\n", "Two") == -1);
+ tt_want(evhttp_add_header(&headers, "One", "Two\r") == -1);
+ tt_want(evhttp_add_header(&headers, "One", "Two\n") == -1);
+
+ evhttp_clear_headers(&headers);
+}
+
+static int validate_header(
+ const struct evkeyvalq* headers,
+ const char *key, const char *value)
+{
+ const char *real_val = evhttp_find_header(headers, key);
+ tt_assert(real_val != NULL);
+ tt_want(strcmp(real_val, value) == 0);
+end:
+ return (0);
+}
+
+static void
+http_parse_query_test(void *ptr)
+{
+ struct evkeyvalq headers;
+ int r;
+
+ TAILQ_INIT(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test", &headers);
+ tt_want(validate_header(&headers, "q", "test") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test&foo=bar", &headers);
+ tt_want(validate_header(&headers, "q", "test") == 0);
+ tt_want(validate_header(&headers, "foo", "bar") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test+foo", &headers);
+ tt_want(validate_header(&headers, "q", "test foo") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test%0Afoo", &headers);
+ tt_want(validate_header(&headers, "q", "test\nfoo") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test%0Dfoo", &headers);
+ tt_want(validate_header(&headers, "q", "test\rfoo") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test&&q2", &headers);
+ tt_int_op(r, ==, -1);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test+this", &headers);
+ tt_want(validate_header(&headers, "q", "test this") == 0);
+ tt_int_op(r, ==, 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=test&q2=foo", &headers);
+ tt_int_op(r, ==, 0);
+ tt_want(validate_header(&headers, "q", "test") == 0);
+ tt_want(validate_header(&headers, "q2", "foo") == 0);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q&q2=foo", &headers);
+ tt_int_op(r, ==, -1);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=foo&q2", &headers);
+ tt_int_op(r, ==, -1);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=foo&q2&q3=x", &headers);
+ tt_int_op(r, ==, -1);
+ evhttp_clear_headers(&headers);
+
+ r = evhttp_parse_query("http://www.test.com/?q=&q2=&q3=", &headers);
+ tt_int_op(r, ==, 0);
+ tt_want(validate_header(&headers, "q", "") == 0);
+ tt_want(validate_header(&headers, "q2", "") == 0);
+ tt_want(validate_header(&headers, "q3", "") == 0);
+ evhttp_clear_headers(&headers);
+
+end:
+ evhttp_clear_headers(&headers);
+}
+
+static void
+http_parse_uri_test(void *ptr)
+{
+ const int nonconform = (ptr != NULL);
+ const unsigned parse_flags =
+ nonconform ? EVHTTP_URI_NONCONFORMANT : 0;
+ struct evhttp_uri *uri = NULL;
+ char url_tmp[4096];
+#define URI_PARSE(uri) \
+ evhttp_uri_parse_with_flags((uri), parse_flags)
+
+#define TT_URI(want) do { \
+ char *ret = evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)); \
+ tt_want(ret != NULL); \
+ tt_want(ret == url_tmp); \
+ if (strcmp(ret,want) != 0) \
+ TT_FAIL(("\"%s\" != \"%s\"",ret,want)); \
+ } while(0)
+
+ tt_want(evhttp_uri_join(NULL, 0, 0) == NULL);
+ tt_want(evhttp_uri_join(NULL, url_tmp, 0) == NULL);
+ tt_want(evhttp_uri_join(NULL, url_tmp, sizeof(url_tmp)) == NULL);
+
+ /* bad URIs: parsing */
+#define BAD(s) do { \
+ if (URI_PARSE(s) != NULL) \
+ TT_FAIL(("Expected error parsing \"%s\"",s)); \
+ } while(0)
+ /* Nonconformant URIs we can parse: parsing */
+#define NCF(s) do { \
+ uri = URI_PARSE(s); \
+ if (uri != NULL && !nonconform) { \
+ TT_FAIL(("Expected error parsing \"%s\"",s)); \
+ } else if (uri == NULL && nonconform) { \
+ TT_FAIL(("Couldn't parse nonconformant URI \"%s\"", \
+ s)); \
+ } \
+ if (uri) { \
+ tt_want(evhttp_uri_join(uri, url_tmp, \
+ sizeof(url_tmp))); \
+ evhttp_uri_free(uri); \
+ } \
+ } while(0)
+
+ NCF("http://www.test.com/ why hello");
+ NCF("http://www.test.com/why-hello\x01");
+ NCF("http://www.test.com/why-hello?\x01");
+ NCF("http://www.test.com/why-hello#\x01");
+ BAD("http://www.\x01.test.com/why-hello");
+ BAD("http://www.%7test.com/why-hello");
+ NCF("http://www.test.com/why-hell%7o");
+ BAD("h%3ttp://www.test.com/why-hello");
+ NCF("http://www.test.com/why-hello%7");
+ NCF("http://www.test.com/why-hell%7o");
+ NCF("http://www.test.com/foo?ba%r");
+ NCF("http://www.test.com/foo#ba%r");
+ BAD("99:99/foo");
+ BAD("http://www.test.com:999x/");
+ BAD("http://www.test.com:x/");
+ BAD("http://[hello-there]/");
+ BAD("http://[::1]]/");
+ BAD("http://[::1/");
+ BAD("http://[foob/");
+ BAD("http://[/");
+ BAD("http://[ffff:ffff:ffff:ffff:Ffff:ffff:ffff:"
+ "ffff:ffff:ffff:ffff:ffff:ffff:ffff]/");
+ BAD("http://[vX.foo]/");
+ BAD("http://[vX.foo]/");
+ BAD("http://[v.foo]/");
+ BAD("http://[v5.fo%o]/");
+ BAD("http://[v5X]/");
+ BAD("http://[v5]/");
+ BAD("http://[]/");
+ BAD("http://f\x01red@www.example.com/");
+ BAD("http://f%0red@www.example.com/");
+ BAD("http://www.example.com:9999999999999999999999999999999999999/");
+ BAD("http://www.example.com:hihi/");
+ BAD("://www.example.com/");
+
+ /* bad URIs: joining */
+ uri = evhttp_uri_new();
+ tt_want(0==evhttp_uri_set_host(uri, "www.example.com"));
+ tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) != NULL);
+ /* not enough space: */
+ tt_want(evhttp_uri_join(uri, url_tmp, 3) == NULL);
+ /* host is set, but path doesn't start with "/": */
+ tt_want(0==evhttp_uri_set_path(uri, "hi_mom"));
+ tt_want(evhttp_uri_join(uri, url_tmp, sizeof(url_tmp)) == NULL);
+ tt_want(evhttp_uri_join(uri, NULL, sizeof(url_tmp))==NULL);
+ tt_want(evhttp_uri_join(uri, url_tmp, 0)==NULL);
+ evhttp_uri_free(uri);
+ uri = URI_PARSE("mailto:foo@bar");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_host(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(!strcmp(evhttp_uri_get_scheme(uri), "mailto"));
+ tt_want(!strcmp(evhttp_uri_get_path(uri), "foo@bar"));
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("mailto:foo@bar");
+ evhttp_uri_free(uri);
+
+ uri = evhttp_uri_new();
+ /* Bad URI usage: setting invalid values */
+ tt_want(-1 == evhttp_uri_set_scheme(uri,""));
+ tt_want(-1 == evhttp_uri_set_scheme(uri,"33"));
+ tt_want(-1 == evhttp_uri_set_scheme(uri,"hi!"));
+ tt_want(-1 == evhttp_uri_set_userinfo(uri,"hello@"));
+ tt_want(-1 == evhttp_uri_set_host(uri,"[1.2.3.4]"));
+ tt_want(-1 == evhttp_uri_set_host(uri,"["));
+ tt_want(-1 == evhttp_uri_set_host(uri,"www.[foo].com"));
+ tt_want(-1 == evhttp_uri_set_port(uri,-3));
+ tt_want(-1 == evhttp_uri_set_path(uri,"hello?world"));
+ tt_want(-1 == evhttp_uri_set_query(uri,"hello#world"));
+ tt_want(-1 == evhttp_uri_set_fragment(uri,"hello#world"));
+ /* Valid URI usage: setting valid values */
+ tt_want(0 == evhttp_uri_set_scheme(uri,"http"));
+ tt_want(0 == evhttp_uri_set_scheme(uri,NULL));
+ tt_want(0 == evhttp_uri_set_userinfo(uri,"username:pass"));
+ tt_want(0 == evhttp_uri_set_userinfo(uri,NULL));
+ tt_want(0 == evhttp_uri_set_host(uri,"www.example.com"));
+ tt_want(0 == evhttp_uri_set_host(uri,"1.2.3.4"));
+ tt_want(0 == evhttp_uri_set_host(uri,"[1:2:3:4::]"));
+ tt_want(0 == evhttp_uri_set_host(uri,"[v7.wobblewobble]"));
+ tt_want(0 == evhttp_uri_set_host(uri,NULL));
+ tt_want(0 == evhttp_uri_set_host(uri,""));
+ tt_want(0 == evhttp_uri_set_port(uri, -1));
+ tt_want(0 == evhttp_uri_set_port(uri, 80));
+ tt_want(0 == evhttp_uri_set_port(uri, 65535));
+ tt_want(0 == evhttp_uri_set_path(uri, ""));
+ tt_want(0 == evhttp_uri_set_path(uri, "/documents/public/index.html"));
+ tt_want(0 == evhttp_uri_set_path(uri, NULL));
+ tt_want(0 == evhttp_uri_set_query(uri, "key=val&key2=val2"));
+ tt_want(0 == evhttp_uri_set_query(uri, "keyvalblarg"));
+ tt_want(0 == evhttp_uri_set_query(uri, ""));
+ tt_want(0 == evhttp_uri_set_query(uri, NULL));
+ tt_want(0 == evhttp_uri_set_fragment(uri, ""));
+ tt_want(0 == evhttp_uri_set_fragment(uri, "here?i?am"));
+ tt_want(0 == evhttp_uri_set_fragment(uri, NULL));
+ evhttp_uri_free(uri);
+
+ /* Valid parsing */
+ uri = URI_PARSE("http://www.test.com/?q=t%33est");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=t%33est") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://www.test.com/?q=t%33est");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://%77ww.test.com");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "%77ww.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://%77ww.test.com");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://www.test.com?q=test");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://www.test.com?q=test");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://www.test.com#fragment");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want_str_op(evhttp_uri_get_fragment(uri), ==, "fragment");
+ TT_URI("http://www.test.com#fragment");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://8000/");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "8000") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://8000/");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://:8000/");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == 8000);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://:8000/");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://www.test.com:/"); /* empty port */
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want_str_op(evhttp_uri_get_path(uri), ==, "/");
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://www.test.com/");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("http://www.test.com:"); /* empty port 2 */
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "http") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("http://www.test.com");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("ftp://www.test.com/?q=test");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "www.test.com") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("ftp://www.test.com/?q=test");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("ftp://[::1]:999/?q=test");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "[::1]") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == 999);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("ftp://[::1]:999/?q=test");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("ftp://[ff00::127.0.0.1]/?q=test");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "[ff00::127.0.0.1]") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("ftp://[ff00::127.0.0.1]/?q=test");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("ftp://[v99.not_(any:time)_soon]/?q=test");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "ftp") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "[v99.not_(any:time)_soon]") == 0);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("ftp://[v99.not_(any:time)_soon]/?q=test");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("scheme://user:pass@foo.com:42/?q=test&s=some+thing#fragment");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
+ tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user:pass") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
+ tt_want(evhttp_uri_get_port(uri) == 42);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=test&s=some+thing") == 0);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
+ TT_URI("scheme://user:pass@foo.com:42/?q=test&s=some+thing#fragment");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("scheme://user@foo.com/#fragment");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
+ tt_want(strcmp(evhttp_uri_get_userinfo(uri), "user") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "fragment") == 0);
+ TT_URI("scheme://user@foo.com/#fragment");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("scheme://%75ser@foo.com/#frag@ment");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "scheme") == 0);
+ tt_want(strcmp(evhttp_uri_get_userinfo(uri), "%75ser") == 0);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "foo.com") == 0);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "frag@ment") == 0);
+ TT_URI("scheme://%75ser@foo.com/#frag@ment");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("file:///some/path/to/the/file");
+ tt_want(strcmp(evhttp_uri_get_scheme(uri), "file") == 0);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the/file") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("file:///some/path/to/the/file");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("///some/path/to/the-file");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_scheme(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(strcmp(evhttp_uri_get_host(uri), "") == 0);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/some/path/to/the-file") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("///some/path/to/the-file");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("/s:ome/path/to/the-file?q=99#fred");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_scheme(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_host(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "/s:ome/path/to/the-file") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=99") == 0);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "fred") == 0);
+ TT_URI("/s:ome/path/to/the-file?q=99#fred");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("relative/path/with/co:lon");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_scheme(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_host(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "relative/path/with/co:lon") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(evhttp_uri_get_fragment(uri) == NULL);
+ TT_URI("relative/path/with/co:lon");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("bob?q=99&q2=q?33#fr?ed");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_scheme(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_host(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "bob") == 0);
+ tt_want(strcmp(evhttp_uri_get_query(uri), "q=99&q2=q?33") == 0);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);
+ TT_URI("bob?q=99&q2=q?33#fr?ed");
+ evhttp_uri_free(uri);
+
+ uri = URI_PARSE("#fr?ed");
+ tt_want(uri != NULL);
+ tt_want(evhttp_uri_get_scheme(uri) == NULL);
+ tt_want(evhttp_uri_get_userinfo(uri) == NULL);
+ tt_want(evhttp_uri_get_host(uri) == NULL);
+ tt_want(evhttp_uri_get_port(uri) == -1);
+ tt_want(strcmp(evhttp_uri_get_path(uri), "") == 0);
+ tt_want(evhttp_uri_get_query(uri) == NULL);
+ tt_want(strcmp(evhttp_uri_get_fragment(uri), "fr?ed") == 0);
+ TT_URI("#fr?ed");
+ evhttp_uri_free(uri);
+#undef URI_PARSE
+#undef TT_URI
+#undef BAD
+}
+
+static void
+http_uriencode_test(void *ptr)
+{
+ char *s=NULL, *s2=NULL;
+ size_t sz;
+ int bytes_decoded;
+
+#define ENC(from,want,plus) do { \
+ s = evhttp_uriencode((from), -1, (plus)); \
+ tt_assert(s); \
+ tt_str_op(s,==,(want)); \
+ sz = -1; \
+ s2 = evhttp_uridecode((s), (plus), &sz); \
+ tt_assert(s2); \
+ tt_str_op(s2,==,(from)); \
+ tt_int_op(sz,==,strlen(from)); \
+ free(s); \
+ free(s2); \
+ s = s2 = NULL; \
+ } while (0)
+
+#define DEC(from,want,dp) do { \
+ s = evhttp_uridecode((from),(dp),&sz); \
+ tt_assert(s); \
+ tt_str_op(s,==,(want)); \
+ tt_int_op(sz,==,strlen(want)); \
+ free(s); \
+ s = NULL; \
+ } while (0)
+
+#define OLD_DEC(from,want) do { \
+ s = evhttp_decode_uri((from)); \
+ tt_assert(s); \
+ tt_str_op(s,==,(want)); \
+ free(s); \
+ s = NULL; \
+ } while (0)
+
+
+ ENC("Hello", "Hello",0);
+ ENC("99", "99",0);
+ ENC("", "",0);
+ ENC(
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789-.~_",
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789-.~_",0);
+ ENC(" ", "%20",0);
+ ENC(" ", "+",1);
+ ENC("\xff\xf0\xe0", "%FF%F0%E0",0);
+ ENC("\x01\x19", "%01%19",1);
+ ENC("http://www.ietf.org/rfc/rfc3986.txt",
+ "http%3A%2F%2Fwww.ietf.org%2Frfc%2Frfc3986.txt",1);
+
+ ENC("1+2=3", "1%2B2%3D3",1);
+ ENC("1+2=3", "1%2B2%3D3",0);
+
+ /* Now try encoding with internal NULs. */
+ s = evhttp_uriencode("hello\0world", 11, 0);
+ tt_assert(s);
+ tt_str_op(s,==,"hello%00world");
+ free(s);
+ s = NULL;
+
+ /* Now try decoding just part of string. */
+ s = malloc(6 + 1 /* NUL byte */);
+ bytes_decoded = evhttp_decode_uri_internal("hello%20%20", 6, s, 0);
+ tt_assert(s);
+ tt_int_op(bytes_decoded,==,6);
+ tt_str_op(s,==,"hello%");
+ free(s);
+ s = NULL;
+
+ /* Now try out some decoding cases that we don't generate with
+ * encode_uri: Make sure that malformed stuff doesn't crash... */
+ DEC("%%xhello th+ere \xff",
+ "%%xhello th+ere \xff", 0);
+ /* Make sure plus decoding works */
+ DEC("plus+should%20work+", "plus should work ",1);
+ /* Try some lowercase hex */
+ DEC("%f0%a0%b0", "\xf0\xa0\xb0",1);
+
+ /* Try an internal NUL. */
+ sz = 0;
+ s = evhttp_uridecode("%00%00x%00%00", 1, &sz);
+ tt_int_op(sz,==,5);
+ tt_assert(!memcmp(s, "\0\0x\0\0", 5));
+ free(s);
+ s = NULL;
+
+ /* Try with size == NULL */
+ sz = 0;
+ s = evhttp_uridecode("%00%00x%00%00", 1, NULL);
+ tt_assert(!memcmp(s, "\0\0x\0\0", 5));
+ free(s);
+ s = NULL;
+
+ /* Test out the crazy old behavior of the deprecated
+ * evhttp_decode_uri */
+ OLD_DEC("http://example.com/normal+path/?key=val+with+spaces",
+ "http://example.com/normal+path/?key=val with spaces");
+
+end:
+ if (s)
+ free(s);
+ if (s2)
+ free(s2);
+#undef ENC
+#undef DEC
+#undef OLD_DEC
+}
+
+static void
+http_base_test(void *ptr)
+{
+ struct event_base *base = NULL;
+ struct bufferevent *bev;
+ evutil_socket_t fd;
+ const char *http_request;
+ ev_uint16_t port = 0;
+
+ test_ok = 0;
+ base = event_base_new();
+ tt_assert(base);
+ http = http_setup(&port, base, 0);
+
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(base, fd, 0);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, base);
+ bufferevent_base_set(base, bev);
+
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ event_base_dispatch(base);
+
+ bufferevent_free(bev);
+ evutil_closesocket(fd);
+
+ evhttp_free(http);
+
+ tt_int_op(test_ok, ==, 2);
+
+end:
+ if (base)
+ event_base_free(base);
+}
+
+/*
+ * the server is just going to close the connection if it times out during
+ * reading the headers.
+ */
+
+static void
+http_incomplete_readcb(struct bufferevent *bev, void *arg)
+{
+ test_ok = -1;
+ event_base_loopexit(exit_base,NULL);
+}
+
+static void
+http_incomplete_errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ if (what == (BEV_EVENT_READING|BEV_EVENT_EOF))
+ test_ok++;
+ else
+ test_ok = -2;
+ event_base_loopexit(exit_base,NULL);
+}
+
+static void
+http_incomplete_writecb(struct bufferevent *bev, void *arg)
+{
+ if (arg != NULL) {
+ evutil_socket_t fd = *(evutil_socket_t *)arg;
+ /* terminate the write side to simulate EOF */
+ shutdown(fd, SHUT_WR);
+ }
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ /* enable reading of the reply */
+ bufferevent_enable(bev, EV_READ);
+ test_ok++;
+ }
+}
+
+static void
+http_incomplete_test_(struct basic_test_data *data, int use_timeout)
+{
+ struct bufferevent *bev;
+ evutil_socket_t fd;
+ const char *http_request;
+ ev_uint16_t port = 0;
+ struct timeval tv_start, tv_end;
+
+ exit_base = data->base;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+ evhttp_set_timeout(http, 1);
+
+ fd = http_connect("127.0.0.1", port);
+ tt_int_op(fd, >=, 0);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev,
+ http_incomplete_readcb, http_incomplete_writecb,
+ http_incomplete_errorcb, use_timeout ? NULL : &fd);
+
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: somehost\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ evutil_gettimeofday(&tv_start, NULL);
+
+ event_base_dispatch(data->base);
+
+ evutil_gettimeofday(&tv_end, NULL);
+ evutil_timersub(&tv_end, &tv_start, &tv_end);
+
+ bufferevent_free(bev);
+ if (use_timeout) {
+ evutil_closesocket(fd);
+ }
+
+ evhttp_free(http);
+
+ if (use_timeout && tv_end.tv_sec >= 3) {
+ tt_abort_msg("time");
+ } else if (!use_timeout && tv_end.tv_sec >= 1) {
+ /* we should be done immediately */
+ tt_abort_msg("time");
+ }
+
+ tt_int_op(test_ok, ==, 2);
+ end:
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+static void
+http_incomplete_test(void *arg)
+{
+ http_incomplete_test_(arg, 0);
+}
+static void
+http_incomplete_timeout_test(void *arg)
+{
+ http_incomplete_test_(arg, 1);
+}
+
+/*
+ * the server is going to reply with chunked data.
+ */
+
+static void
+http_chunked_readcb(struct bufferevent *bev, void *arg)
+{
+ /* nothing here */
+}
+
+static void
+http_chunked_errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ struct evhttp_request *req = NULL;
+
+ if (!test_ok)
+ goto out;
+
+ test_ok = -1;
+
+ if ((what & BEV_EVENT_EOF) != 0) {
+ const char *header;
+ enum message_read_status done;
+ req = evhttp_request_new(NULL, NULL);
+
+ /* req->kind = EVHTTP_RESPONSE; */
+ done = evhttp_parse_firstline_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ done = evhttp_parse_headers_(req, bufferevent_get_input(bev));
+ if (done != ALL_DATA_READ)
+ goto out;
+
+ header = evhttp_find_header(evhttp_request_get_input_headers(req), "Transfer-Encoding");
+ if (header == NULL || strcmp(header, "chunked"))
+ goto out;
+
+ header = evhttp_find_header(evhttp_request_get_input_headers(req), "Connection");
+ if (header == NULL || strcmp(header, "close"))
+ goto out;
+
+ header = evbuffer_readln(bufferevent_get_input(bev), NULL, EVBUFFER_EOL_CRLF);
+ if (header == NULL)
+ goto out;
+ /* 13 chars */
+ if (strcmp(header, "d")) {
+ free((void*)header);
+ goto out;
+ }
+ free((void*)header);
+
+ if (strncmp((char *)evbuffer_pullup(bufferevent_get_input(bev), 13),
+ "This is funny", 13))
+ goto out;
+
+ evbuffer_drain(bufferevent_get_input(bev), 13 + 2);
+
+ header = evbuffer_readln(bufferevent_get_input(bev), NULL, EVBUFFER_EOL_CRLF);
+ if (header == NULL)
+ goto out;
+ /* 18 chars */
+ if (strcmp(header, "12"))
+ goto out;
+ free((char *)header);
+
+ if (strncmp((char *)evbuffer_pullup(bufferevent_get_input(bev), 18),
+ "but not hilarious.", 18))
+ goto out;
+
+ evbuffer_drain(bufferevent_get_input(bev), 18 + 2);
+
+ header = evbuffer_readln(bufferevent_get_input(bev), NULL, EVBUFFER_EOL_CRLF);
+ if (header == NULL)
+ goto out;
+ /* 8 chars */
+ if (strcmp(header, "8")) {
+ free((void*)header);
+ goto out;
+ }
+ free((char *)header);
+
+ if (strncmp((char *)evbuffer_pullup(bufferevent_get_input(bev), 8),
+ "bwv 1052.", 8))
+ goto out;
+
+ evbuffer_drain(bufferevent_get_input(bev), 8 + 2);
+
+ header = evbuffer_readln(bufferevent_get_input(bev), NULL, EVBUFFER_EOL_CRLF);
+ if (header == NULL)
+ goto out;
+ /* 0 chars */
+ if (strcmp(header, "0")) {
+ free((void*)header);
+ goto out;
+ }
+ free((void *)header);
+
+ test_ok = 2;
+ }
+
+out:
+ if (req)
+ evhttp_request_free(req);
+
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_chunked_writecb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ /* enable reading of the reply */
+ bufferevent_enable(bev, EV_READ);
+ test_ok++;
+ }
+}
+
+static void
+http_chunked_request_done(struct evhttp_request *req, void *arg)
+{
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evhttp_find_header(evhttp_request_get_input_headers(req),
+ "Transfer-Encoding") == NULL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != 13 + 18 + 8) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ if (strncmp((char *)evbuffer_pullup(evhttp_request_get_input_buffer(req), 13 + 18 + 8),
+ "This is funnybut not hilarious.bwv 1052",
+ 13 + 18 + 8)) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_chunk_out_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev;
+ evutil_socket_t fd;
+ const char *http_request;
+ ev_uint16_t port = 0;
+ struct timeval tv_start, tv_end;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ int i;
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ fd = http_connect("127.0.0.1", port);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev,
+ http_chunked_readcb, http_chunked_writecb,
+ http_chunked_errorcb, data->base);
+
+ http_request =
+ "GET /chunked HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+
+ evutil_gettimeofday(&tv_start, NULL);
+
+ event_base_dispatch(data->base);
+
+ bufferevent_free(bev);
+
+ evutil_gettimeofday(&tv_end, NULL);
+ evutil_timersub(&tv_end, &tv_start, &tv_end);
+
+ tt_int_op(tv_end.tv_sec, <, 1);
+
+ tt_int_op(test_ok, ==, 2);
+
+ /* now try again with the regular connection object */
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /* make two requests to check the keepalive behavior */
+ for (i = 0; i < 2; i++) {
+ test_ok = 0;
+ req = evhttp_request_new(http_chunked_request_done,data->base);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req,
+ EVHTTP_REQ_GET, "/chunked") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_ok == 1);
+ }
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_stream_out_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+ exit_base = data->base;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_request_done,
+ (void *)"This is funnybut not hilarious.bwv 1052");
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/streamed")
+ == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_stream_in_chunk(struct evhttp_request *req, void *arg)
+{
+ struct evbuffer *reply = arg;
+
+ if (evhttp_request_get_response_code(req) != HTTP_OK) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ evbuffer_add_buffer(reply, evhttp_request_get_input_buffer(req));
+}
+
+static void
+http_stream_in_done(struct evhttp_request *req, void *arg)
+{
+ if (evbuffer_get_length(evhttp_request_get_input_buffer(req)) != 0) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ event_base_loopexit(exit_base, NULL);
+}
+
+/**
+ * Makes a request and reads the response in chunks.
+ */
+static void
+http_stream_in_test_(struct basic_test_data *data, char const *url,
+ size_t expected_len, char const *expected)
+{
+ struct evhttp_connection *evcon;
+ struct evbuffer *reply = evbuffer_new();
+ struct evhttp_request *req = NULL;
+ ev_uint16_t port = 0;
+
+ exit_base = data->base;
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL,"127.0.0.1", port);
+ tt_assert(evcon);
+
+ req = evhttp_request_new(http_stream_in_done, reply);
+ evhttp_request_set_chunked_cb(req, http_stream_in_chunk);
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, url) == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ if (evbuffer_get_length(reply) != expected_len) {
+ TT_DIE(("reply length %lu; expected %lu; FAILED (%s)\n",
+ (unsigned long)evbuffer_get_length(reply),
+ (unsigned long)expected_len,
+ (char*)evbuffer_pullup(reply, -1)));
+ }
+
+ if (memcmp(evbuffer_pullup(reply, -1), expected, expected_len) != 0) {
+ tt_abort_msg("Memory mismatch");
+ }
+
+ test_ok = 1;
+ end:
+ if (reply)
+ evbuffer_free(reply);
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_stream_in_test(void *arg)
+{
+ http_stream_in_test_(arg, "/chunked", 13 + 18 + 8,
+ "This is funnybut not hilarious.bwv 1052");
+
+ http_stream_in_test_(arg, "/test", strlen(BASIC_REQUEST_BODY),
+ BASIC_REQUEST_BODY);
+}
+
+static void
+http_stream_in_cancel_chunk(struct evhttp_request *req, void *arg)
+{
+ tt_int_op(evhttp_request_get_response_code(req), ==, HTTP_OK);
+
+ end:
+ evhttp_cancel_request(req);
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_stream_in_cancel_done(struct evhttp_request *req, void *arg)
+{
+ /* should never be called */
+ tt_fail_msg("In cancel done");
+}
+
+static void
+http_stream_in_cancel_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evhttp_connection *evcon;
+ struct evhttp_request *req = NULL;
+ ev_uint16_t port = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ req = evhttp_request_new(http_stream_in_cancel_done, data->base);
+ evhttp_request_set_chunked_cb(req, http_stream_in_cancel_chunk);
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/chunked") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ test_ok = 1;
+ end:
+ evhttp_connection_free(evcon);
+ evhttp_free(http);
+
+}
+
+static void
+http_connection_fail_done(struct evhttp_request *req, void *arg)
+{
+ struct evhttp_connection *evcon = arg;
+ struct event_base *base = evhttp_connection_get_base(evcon);
+
+ /* An ENETUNREACH error results in an unrecoverable
+ * evhttp_connection error (see evhttp_connection_fail_()). The
+ * connection will be reset, and the user will be notified with a NULL
+ * req parameter. */
+ tt_assert(!req);
+
+ evhttp_connection_free(evcon);
+
+ test_ok = 1;
+
+ end:
+ event_base_loopexit(base, NULL);
+}
+
+/* Test unrecoverable evhttp_connection errors by generating an ENETUNREACH
+ * error on connection. */
+static void
+http_connection_fail_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ /* auto detect a port */
+ http = http_setup(&port, data->base, 0);
+ evhttp_free(http);
+ http = NULL;
+
+ /* Pick an unroutable address. This administratively scoped multicast
+ * address should do when working with TCP. */
+ evcon = evhttp_connection_base_new(data->base, NULL, "239.10.20.30", 80);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_connection_fail_done, evcon);
+ tt_assert(req);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(test_ok, ==, 1);
+
+ end:
+ ;
+}
+
+static void
+http_connection_retry_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(req);
+ tt_int_op(evhttp_request_get_response_code(req), !=, HTTP_OK);
+ if (evhttp_find_header(evhttp_request_get_input_headers(req), "Content-Type") != NULL) {
+ tt_abort_msg("(content type)\n");
+ }
+
+ tt_uint_op(evbuffer_get_length(evhttp_request_get_input_buffer(req)), ==, 0);
+
+ test_ok = 1;
+ end:
+ event_base_loopexit(arg,NULL);
+}
+
+static struct event_base *http_make_web_server_base=NULL;
+static void
+http_make_web_server(evutil_socket_t fd, short what, void *arg)
+{
+ ev_uint16_t port = *(ev_uint16_t*)arg;
+ http = http_setup(&port, http_make_web_server_base, 0);
+}
+
+static void
+http_connection_retry_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct timeval tv, tv_start, tv_end;
+
+ exit_base = data->base;
+ test_ok = 0;
+
+ /* auto detect a port */
+ http = http_setup(&port, data->base, 0);
+ evhttp_free(http);
+ http = NULL;
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ evhttp_connection_set_timeout(evcon, 1);
+ /* also bind to local host */
+ evhttp_connection_set_local_address(evcon, "127.0.0.1");
+
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_connection_retry_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/?arg=val") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_base_dispatch(data->base);
+ evutil_gettimeofday(&tv_end, NULL);
+ evutil_timersub(&tv_end, &tv_start, &tv_end);
+ tt_int_op(tv_end.tv_sec, <, 1);
+
+ tt_int_op(test_ok, ==, 1);
+
+ /*
+ * now test the same but with retries
+ */
+ test_ok = 0;
+
+ {
+ const struct timeval tv_timeout = { 0, 500000 };
+ const struct timeval tv_retry = { 0, 500000 };
+ evhttp_connection_set_timeout_tv(evcon, &tv_timeout);
+ evhttp_connection_set_initial_retry_tv(evcon, &tv_retry);
+ }
+ evhttp_connection_set_retries(evcon, 1);
+
+ req = evhttp_request_new(http_connection_retry_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/?arg=val") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_base_dispatch(data->base);
+ evutil_gettimeofday(&tv_end, NULL);
+
+ /* fails fast, .5 sec to wait to retry, fails fast again. */
+ test_timeval_diff_leq(&tv_start, &tv_end, 500, 200);
+
+ tt_assert(test_ok == 1);
+
+ /*
+ * now test the same but with retries and give it a web server
+ * at the end
+ */
+ test_ok = 0;
+
+ evhttp_connection_set_timeout(evcon, 1);
+ evhttp_connection_set_retries(evcon, 3);
+
+ req = evhttp_request_new(http_dispatcher_test_done, data->base);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET,
+ "/?arg=val") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ /* start up a web server .2 seconds after the connection tried
+ * to send a request
+ */
+ evutil_timerclear(&tv);
+ tv.tv_usec = 200000;
+ http_make_web_server_base = data->base;
+ event_base_once(data->base, -1, EV_TIMEOUT, http_make_web_server, &port, &tv);
+
+ evutil_gettimeofday(&tv_start, NULL);
+ event_base_dispatch(data->base);
+ evutil_gettimeofday(&tv_end, NULL);
+ /* We'll wait twice as long as we did last time. */
+ test_timeval_diff_leq(&tv_start, &tv_end, 1000, 400);
+
+ tt_int_op(test_ok, ==, 1);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_primitives(void *ptr)
+{
+ char *escaped = NULL;
+ struct evhttp *http = NULL;
+
+ escaped = evhttp_htmlescape("<script>");
+ tt_assert(escaped);
+ tt_str_op(escaped, ==, "&lt;script&gt;");
+ free(escaped);
+
+ escaped = evhttp_htmlescape("\"\'&");
+ tt_assert(escaped);
+ tt_str_op(escaped, ==, "&quot;&#039;&amp;");
+
+ http = evhttp_new(NULL);
+ tt_assert(http);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, 0);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, -1);
+ tt_int_op(evhttp_del_cb(http, "/test"), ==, 0);
+ tt_int_op(evhttp_del_cb(http, "/test"), ==, -1);
+ tt_int_op(evhttp_set_cb(http, "/test", http_basic_cb, NULL), ==, 0);
+
+ end:
+ if (escaped)
+ free(escaped);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_multi_line_header_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev= NULL;
+ evutil_socket_t fd = -1;
+ const char *http_start_request;
+ ev_uint16_t port = 0;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ tt_ptr_op(http, !=, NULL);
+
+ fd = http_connect("127.0.0.1", port);
+
+ tt_int_op(fd, !=, -1);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ tt_ptr_op(bev, !=, NULL);
+ bufferevent_setcb(bev, http_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ http_start_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: somehost\r\n"
+ "Connection: close\r\n"
+ "X-Multi-Extra-WS: libevent \r\n"
+ "\t\t\t2.1 \r\n"
+ "X-Multi: aaaaaaaa\r\n"
+ " a\r\n"
+ "\tEND\r\n"
+ "X-Last: last\r\n"
+ "\r\n";
+
+ bufferevent_write(bev, http_start_request, strlen(http_start_request));
+ found_multi = found_multi2 = 0;
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(found_multi, ==, 1);
+ tt_int_op(found_multi2, ==, 1);
+ tt_int_op(test_ok, ==, 4);
+ end:
+ if (bev)
+ bufferevent_free(bev);
+ if (fd >= 0)
+ evutil_closesocket(fd);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+http_request_bad(struct evhttp_request *req, void *arg)
+{
+ if (req != NULL) {
+ fprintf(stderr, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_negative_content_length_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_request_bad, data->base);
+
+ /* Cause the response to have a negative content-length */
+ evhttp_add_header(evhttp_request_get_output_headers(req), "X-Negative", "makeitso");
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+
+static void
+http_data_length_constraints_test_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(req);
+ tt_int_op(evhttp_request_get_response_code(req), ==, HTTP_BADREQUEST);
+end:
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_large_entity_test_done(struct evhttp_request *req, void *arg)
+{
+ tt_assert(req);
+ tt_int_op(evhttp_request_get_response_code(req), ==, HTTP_ENTITYTOOLARGE);
+end:
+ event_base_loopexit(arg, NULL);
+}
+
+static void
+http_data_length_constraints_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ char long_str[8192];
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+
+ /* also bind to local host */
+ evhttp_connection_set_local_address(evcon, "127.0.0.1");
+
+ /*
+ * At this point, we want to schedule an HTTP GET request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
+ tt_assert(req);
+
+ memset(long_str, 'a', 8192);
+ long_str[8191] = '\0';
+ /* Add the information that we care about */
+ evhttp_set_max_headers_size(http, 8191);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Longheader", long_str);
+
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
+ tt_assert(req);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+
+ /* GET /?arg=verylongvalue HTTP/1.1 */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, long_str) == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ evhttp_set_max_body_size(http, 8190);
+ req = evhttp_request_new(http_data_length_constraints_test_done, data->base);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ req = evhttp_request_new(http_large_entity_test_done, data->base);
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Host", "somehost");
+ evhttp_add_header(evhttp_request_get_output_headers(req), "Expect", "100-continue");
+ evbuffer_add_printf(evhttp_request_get_output_buffer(req), "%s", long_str);
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+ event_base_dispatch(data->base);
+
+ test_ok = 1;
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+/*
+ * Testing client reset of server chunked connections
+ */
+
+struct terminate_state {
+ struct event_base *base;
+ struct evhttp_request *req;
+ struct bufferevent *bev;
+ evutil_socket_t fd;
+ int gotclosecb: 1;
+};
+
+static void
+terminate_chunked_trickle_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct terminate_state *state = arg;
+ struct evbuffer *evb;
+ struct timeval tv;
+
+ if (evhttp_request_get_connection(state->req) == NULL) {
+ test_ok = 1;
+ evhttp_request_free(state->req);
+ event_base_loopexit(state->base,NULL);
+ return;
+ }
+
+ evb = evbuffer_new();
+ evbuffer_add_printf(evb, "%p", evb);
+ evhttp_send_reply_chunk(state->req, evb);
+ evbuffer_free(evb);
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 3000;
+ EVUTIL_ASSERT(state);
+ EVUTIL_ASSERT(state->base);
+ event_base_once(state->base, -1, EV_TIMEOUT, terminate_chunked_trickle_cb, arg, &tv);
+}
+
+static void
+terminate_chunked_close_cb(struct evhttp_connection *evcon, void *arg)
+{
+ struct terminate_state *state = arg;
+ state->gotclosecb = 1;
+}
+
+static void
+terminate_chunked_cb(struct evhttp_request *req, void *arg)
+{
+ struct terminate_state *state = arg;
+ struct timeval tv;
+
+ /* we want to know if this connection closes on us */
+ evhttp_connection_set_closecb(
+ evhttp_request_get_connection(req),
+ terminate_chunked_close_cb, arg);
+
+ state->req = req;
+
+ evhttp_send_reply_start(req, HTTP_OK, "OK");
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 3000;
+ event_base_once(state->base, -1, EV_TIMEOUT, terminate_chunked_trickle_cb, arg, &tv);
+}
+
+static void
+terminate_chunked_client(evutil_socket_t fd, short event, void *arg)
+{
+ struct terminate_state *state = arg;
+ bufferevent_free(state->bev);
+ evutil_closesocket(state->fd);
+}
+
+static void
+terminate_readcb(struct bufferevent *bev, void *arg)
+{
+ /* just drop the data */
+ evbuffer_drain(bufferevent_get_input(bev), -1);
+}
+
+
+static void
+http_terminate_chunked_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev = NULL;
+ struct timeval tv;
+ const char *http_request;
+ ev_uint16_t port = 0;
+ evutil_socket_t fd = -1;
+ struct terminate_state terminate_state;
+
+ test_ok = 0;
+
+ http = http_setup(&port, data->base, 0);
+ evhttp_del_cb(http, "/test");
+ tt_assert(evhttp_set_cb(http, "/test",
+ terminate_chunked_cb, &terminate_state) == 0);
+
+ fd = http_connect("127.0.0.1", port);
+
+ /* Stupid thing to send a request */
+ bev = bufferevent_socket_new(data->base, fd, 0);
+ bufferevent_setcb(bev, terminate_readcb, http_writecb,
+ http_errorcb, data->base);
+
+ memset(&terminate_state, 0, sizeof(terminate_state));
+ terminate_state.base = data->base;
+ terminate_state.fd = fd;
+ terminate_state.bev = bev;
+ terminate_state.gotclosecb = 0;
+
+ /* first half of the http request */
+ http_request =
+ "GET /test HTTP/1.1\r\n"
+ "Host: some\r\n\r\n";
+
+ bufferevent_write(bev, http_request, strlen(http_request));
+ evutil_timerclear(&tv);
+ tv.tv_usec = 10000;
+ event_base_once(data->base, -1, EV_TIMEOUT, terminate_chunked_client, &terminate_state,
+ &tv);
+
+ event_base_dispatch(data->base);
+
+ if (terminate_state.gotclosecb == 0)
+ test_ok = 0;
+
+ end:
+ if (fd >= 0)
+ evutil_closesocket(fd);
+ if (http)
+ evhttp_free(http);
+}
+
+static struct regress_dns_server_table ipv6_search_table[] = {
+ { "localhost", "AAAA", "::1", 0 },
+ { NULL, NULL, NULL, 0 }
+};
+
+static void
+http_ipv6_for_domain_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct evdns_base *dns_base = NULL;
+ ev_uint16_t portnum = 0;
+ char address[64];
+
+ tt_assert(regress_dnsserver(data->base, &portnum, ipv6_search_table));
+
+ dns_base = evdns_base_new(data->base, 0/* init name servers */);
+ tt_assert(dns_base);
+
+ /* Add ourself as the only nameserver, and make sure we really are
+ * the only nameserver. */
+ evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum);
+ evdns_base_nameserver_ip_add(dns_base, address);
+
+ http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base, 1 /* ipv6 */);
+
+ end:
+ if (dns_base)
+ evdns_base_free(dns_base, 0);
+ regress_clean_dnsserver();
+}
+
+static void
+http_request_get_addr_on_close(struct evhttp_connection *evcon, void *arg)
+{
+ const struct sockaddr *storage;
+ char addrbuf[128];
+ char local[] = "127.0.0.1:";
+
+ test_ok = 0;
+ tt_assert(evcon);
+
+ storage = evhttp_connection_get_addr(evcon);
+ tt_assert(storage);
+
+ evutil_format_sockaddr_port_((struct sockaddr *)storage, addrbuf, sizeof(addrbuf));
+ tt_assert(!strncmp(addrbuf, local, sizeof(local) - 1));
+
+ test_ok = 1;
+ return;
+
+end:
+ test_ok = 0;
+}
+
+static void
+http_get_addr_test(void *arg)
+{
+ struct basic_test_data *data = arg;
+ ev_uint16_t port = 0;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ test_ok = 0;
+ exit_base = data->base;
+
+ http = http_setup(&port, data->base, 0);
+
+ evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port);
+ tt_assert(evcon);
+ evhttp_connection_set_closecb(evcon, http_request_get_addr_on_close, arg);
+
+ /*
+ * At this point, we want to schedule a request to the HTTP
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(http_request_done, (void *)BASIC_REQUEST_BODY);
+
+ /* We give ownership of the request to the connection */
+ if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) {
+ tt_abort_msg("Couldn't make request");
+ }
+
+ event_base_dispatch(data->base);
+
+ http_request_get_addr_on_close(evcon, NULL);
+
+ end:
+ if (evcon)
+ evhttp_connection_free(evcon);
+ if (http)
+ evhttp_free(http);
+}
+
+#define HTTP_LEGACY(name) \
+ { #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
+ http_##name##_test }
+
+#define HTTP(name) \
+ { #name, http_##name##_test, TT_ISOLATED, &basic_setup, NULL }
+
+struct testcase_t http_testcases[] = {
+ { "primitives", http_primitives, 0, NULL, NULL },
+ { "base", http_base_test, TT_FORK, NULL, NULL },
+ { "bad_headers", http_bad_header_test, 0, NULL, NULL },
+ { "parse_query", http_parse_query_test, 0, NULL, NULL },
+ { "parse_uri", http_parse_uri_test, 0, NULL, NULL },
+ { "parse_uri_nc", http_parse_uri_test, 0, &basic_setup, (void*)"nc" },
+ { "uriencode", http_uriencode_test, 0, NULL, NULL },
+ HTTP(basic),
+ HTTP(cancel),
+ HTTP(virtual_host),
+ HTTP(post),
+ HTTP(put),
+ HTTP(delete),
+ HTTP(allowed_methods),
+ HTTP(failure),
+ HTTP(connection),
+ HTTP(persist_connection),
+ HTTP(connection_async),
+ HTTP(close_detection),
+ HTTP(close_detection_delay),
+ HTTP(bad_request),
+ HTTP(incomplete),
+ HTTP(incomplete_timeout),
+ HTTP(terminate_chunked),
+ HTTP(on_complete),
+
+ HTTP(highport),
+ HTTP(dispatcher),
+ HTTP(multi_line_header),
+ HTTP(negative_content_length),
+ HTTP(chunk_out),
+ HTTP(stream_out),
+
+ HTTP(stream_in),
+ HTTP(stream_in_cancel),
+
+ HTTP(connection_fail),
+ { "connection_retry", http_connection_retry_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, NULL },
+
+ HTTP(data_length_constraints),
+
+ HTTP(ipv6_for_domain),
+ HTTP(get_addr),
+
+ END_OF_TESTCASES
+};
+
diff --git a/sntp/libevent/test/regress_iocp.c b/sntp/libevent/test/regress_iocp.c
new file mode 100644
index 000000000000..17b385241fa1
--- /dev/null
+++ b/sntp/libevent/test/regress_iocp.c
@@ -0,0 +1,352 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "event2/event.h"
+#include "event2/thread.h"
+#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
+#include "event2/bufferevent.h"
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#include "regress.h"
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winsock2.h>
+#undef WIN32_LEAN_AND_MEAN
+
+#include "iocp-internal.h"
+#include "evbuffer-internal.h"
+#include "evthread-internal.h"
+
+/* FIXME remove these ones */
+#include <sys/queue.h>
+#include "event2/event_struct.h"
+#include "event-internal.h"
+
+#define MAX_CALLS 16
+
+static void *count_lock = NULL, *count_cond = NULL;
+static int count = 0;
+
+static void
+count_init(void)
+{
+ EVTHREAD_ALLOC_LOCK(count_lock, 0);
+ EVTHREAD_ALLOC_COND(count_cond);
+
+ tt_assert(count_lock);
+ tt_assert(count_cond);
+
+end:
+ ;
+}
+
+static void
+count_free(void)
+{
+ EVTHREAD_FREE_LOCK(count_lock, 0);
+ EVTHREAD_FREE_COND(count_cond);
+}
+
+static void
+count_incr(void)
+{
+ EVLOCK_LOCK(count_lock, 0);
+ count++;
+ EVTHREAD_COND_BROADCAST(count_cond);
+ EVLOCK_UNLOCK(count_lock, 0);
+}
+
+static int
+count_wait_for(int i, int ms)
+{
+ struct timeval tv;
+ DWORD elapsed;
+ int rv = -1;
+
+ EVLOCK_LOCK(count_lock, 0);
+ while (ms > 0 && count != i) {
+ tv.tv_sec = 0;
+ tv.tv_usec = ms * 1000;
+ elapsed = GetTickCount();
+ EVTHREAD_COND_WAIT_TIMED(count_cond, count_lock, &tv);
+ elapsed = GetTickCount() - elapsed;
+ ms -= elapsed;
+ }
+ if (count == i)
+ rv = 0;
+ EVLOCK_UNLOCK(count_lock, 0);
+
+ return rv;
+}
+
+struct dummy_overlapped {
+ struct event_overlapped eo;
+ void *lock;
+ int call_count;
+ uintptr_t keys[MAX_CALLS];
+ ev_ssize_t sizes[MAX_CALLS];
+};
+
+static void
+dummy_cb(struct event_overlapped *o, uintptr_t key, ev_ssize_t n, int ok)
+{
+ struct dummy_overlapped *d_o =
+ EVUTIL_UPCAST(o, struct dummy_overlapped, eo);
+
+ EVLOCK_LOCK(d_o->lock, 0);
+ if (d_o->call_count < MAX_CALLS) {
+ d_o->keys[d_o->call_count] = key;
+ d_o->sizes[d_o->call_count] = n;
+ }
+ d_o->call_count++;
+ EVLOCK_UNLOCK(d_o->lock, 0);
+
+ count_incr();
+}
+
+static int
+pair_is_in(struct dummy_overlapped *o, uintptr_t key, ev_ssize_t n)
+{
+ int i;
+ int result = 0;
+ EVLOCK_LOCK(o->lock, 0);
+ for (i=0; i < o->call_count; ++i) {
+ if (o->keys[i] == key && o->sizes[i] == n) {
+ result = 1;
+ break;
+ }
+ }
+ EVLOCK_UNLOCK(o->lock, 0);
+ return result;
+}
+
+static void
+test_iocp_port(void *ptr)
+{
+ struct event_iocp_port *port = NULL;
+ struct dummy_overlapped o1, o2;
+
+ memset(&o1, 0, sizeof(o1));
+ memset(&o2, 0, sizeof(o2));
+
+ count_init();
+ EVTHREAD_ALLOC_LOCK(o1.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVTHREAD_ALLOC_LOCK(o2.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+
+ tt_assert(o1.lock);
+ tt_assert(o2.lock);
+
+ event_overlapped_init_(&o1.eo, dummy_cb);
+ event_overlapped_init_(&o2.eo, dummy_cb);
+
+ port = event_iocp_port_launch_(0);
+ tt_assert(port);
+
+ tt_assert(!event_iocp_activate_overlapped_(port, &o1.eo, 10, 100));
+ tt_assert(!event_iocp_activate_overlapped_(port, &o2.eo, 20, 200));
+
+ tt_assert(!event_iocp_activate_overlapped_(port, &o1.eo, 11, 101));
+ tt_assert(!event_iocp_activate_overlapped_(port, &o2.eo, 21, 201));
+
+ tt_assert(!event_iocp_activate_overlapped_(port, &o1.eo, 12, 102));
+ tt_assert(!event_iocp_activate_overlapped_(port, &o2.eo, 22, 202));
+
+ tt_assert(!event_iocp_activate_overlapped_(port, &o1.eo, 13, 103));
+ tt_assert(!event_iocp_activate_overlapped_(port, &o2.eo, 23, 203));
+
+ tt_int_op(count_wait_for(8, 2000), ==, 0);
+
+ tt_want(!event_iocp_shutdown_(port, 2000));
+
+ tt_int_op(o1.call_count, ==, 4);
+ tt_int_op(o2.call_count, ==, 4);
+
+ tt_want(pair_is_in(&o1, 10, 100));
+ tt_want(pair_is_in(&o1, 11, 101));
+ tt_want(pair_is_in(&o1, 12, 102));
+ tt_want(pair_is_in(&o1, 13, 103));
+
+ tt_want(pair_is_in(&o2, 20, 200));
+ tt_want(pair_is_in(&o2, 21, 201));
+ tt_want(pair_is_in(&o2, 22, 202));
+ tt_want(pair_is_in(&o2, 23, 203));
+
+end:
+ EVTHREAD_FREE_LOCK(o1.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVTHREAD_FREE_LOCK(o2.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ count_free();
+}
+
+static struct evbuffer *rbuf = NULL, *wbuf = NULL;
+
+static void
+read_complete(struct event_overlapped *eo, uintptr_t key,
+ ev_ssize_t nbytes, int ok)
+{
+ tt_assert(ok);
+ evbuffer_commit_read_(rbuf, nbytes);
+ count_incr();
+end:
+ ;
+}
+
+static void
+write_complete(struct event_overlapped *eo, uintptr_t key,
+ ev_ssize_t nbytes, int ok)
+{
+ tt_assert(ok);
+ evbuffer_commit_write_(wbuf, nbytes);
+ count_incr();
+end:
+ ;
+}
+
+static void
+test_iocp_evbuffer(void *ptr)
+{
+ struct event_overlapped rol, wol;
+ struct basic_test_data *data = ptr;
+ struct event_iocp_port *port = NULL;
+ struct evbuffer *buf=NULL;
+ struct evbuffer_chain *chain;
+ char junk[1024];
+ int i;
+
+ count_init();
+ event_overlapped_init_(&rol, read_complete);
+ event_overlapped_init_(&wol, write_complete);
+
+ for (i = 0; i < (int)sizeof(junk); ++i)
+ junk[i] = (char)(i);
+
+ rbuf = evbuffer_overlapped_new_(data->pair[0]);
+ wbuf = evbuffer_overlapped_new_(data->pair[1]);
+ evbuffer_enable_locking(rbuf, NULL);
+ evbuffer_enable_locking(wbuf, NULL);
+
+ port = event_iocp_port_launch_(0);
+ tt_assert(port);
+ tt_assert(rbuf);
+ tt_assert(wbuf);
+
+ tt_assert(!event_iocp_port_associate_(port, data->pair[0], 100));
+ tt_assert(!event_iocp_port_associate_(port, data->pair[1], 100));
+
+ for (i=0;i<10;++i)
+ evbuffer_add(wbuf, junk, sizeof(junk));
+
+ buf = evbuffer_new();
+ tt_assert(buf != NULL);
+ evbuffer_add(rbuf, junk, sizeof(junk));
+ tt_assert(!evbuffer_launch_read_(rbuf, 2048, &rol));
+ evbuffer_add_buffer(buf, rbuf);
+ tt_int_op(evbuffer_get_length(buf), ==, sizeof(junk));
+ for (chain = buf->first; chain; chain = chain->next)
+ tt_int_op(chain->flags & EVBUFFER_MEM_PINNED_ANY, ==, 0);
+ tt_assert(!evbuffer_get_length(rbuf));
+ tt_assert(!evbuffer_launch_write_(wbuf, 512, &wol));
+
+ tt_int_op(count_wait_for(2, 2000), ==, 0);
+
+ tt_int_op(evbuffer_get_length(rbuf),==,512);
+
+ /* FIXME Actually test some stuff here. */
+
+ tt_want(!event_iocp_shutdown_(port, 2000));
+end:
+ count_free();
+ evbuffer_free(rbuf);
+ evbuffer_free(wbuf);
+ if (buf) evbuffer_free(buf);
+}
+
+static int got_readcb = 0;
+
+static void
+async_readcb(struct bufferevent *bev, void *arg)
+{
+ /* Disabling read should cause the loop to quit */
+ bufferevent_disable(bev, EV_READ);
+ got_readcb++;
+}
+
+static void
+test_iocp_bufferevent_async(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ struct event_iocp_port *port = NULL;
+ struct bufferevent *bea1=NULL, *bea2=NULL;
+ char buf[128];
+ size_t n;
+
+ event_base_start_iocp_(data->base, 0);
+ port = event_base_get_iocp_(data->base);
+ tt_assert(port);
+
+ bea1 = bufferevent_async_new_(data->base, data->pair[0],
+ BEV_OPT_DEFER_CALLBACKS);
+ bea2 = bufferevent_async_new_(data->base, data->pair[1],
+ BEV_OPT_DEFER_CALLBACKS);
+ tt_assert(bea1);
+ tt_assert(bea2);
+
+ bufferevent_setcb(bea2, async_readcb, NULL, NULL, NULL);
+ bufferevent_enable(bea1, EV_WRITE);
+ bufferevent_enable(bea2, EV_READ);
+
+ bufferevent_write(bea1, "Hello world", strlen("Hello world")+1);
+
+ event_base_dispatch(data->base);
+
+ tt_int_op(got_readcb, ==, 1);
+ n = bufferevent_read(bea2, buf, sizeof(buf)-1);
+ buf[n]='\0';
+ tt_str_op(buf, ==, "Hello world");
+
+end:
+ bufferevent_free(bea1);
+ bufferevent_free(bea2);
+}
+
+
+struct testcase_t iocp_testcases[] = {
+ { "port", test_iocp_port, TT_FORK|TT_NEED_THREADS, &basic_setup, NULL },
+ { "evbuffer", test_iocp_evbuffer,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_THREADS,
+ &basic_setup, NULL },
+ { "bufferevent_async", test_iocp_bufferevent_async,
+ TT_FORK|TT_NEED_SOCKETPAIR|TT_NEED_THREADS|TT_NEED_BASE,
+ &basic_setup, NULL },
+ END_OF_TESTCASES
+};
diff --git a/sntp/libevent/test/regress_listener.c b/sntp/libevent/test/regress_listener.c
new file mode 100644
index 000000000000..4db102df68ca
--- /dev/null
+++ b/sntp/libevent/test/regress_listener.c
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include <sys/types.h>
+
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#include <unistd.h>
+#endif
+
+#include <string.h>
+
+#include "event2/listener.h"
+#include "event2/event.h"
+#include "event2/util.h"
+
+#include "regress.h"
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+static void
+acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *addr, int socklen, void *arg)
+{
+ int *ptr = arg;
+ --*ptr;
+ TT_BLATHER(("Got one for %p", ptr));
+ evutil_closesocket(fd);
+
+ if (! *ptr)
+ evconnlistener_disable(listener);
+}
+
+static void
+regress_pick_a_port(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evconnlistener *listener1 = NULL, *listener2 = NULL;
+ struct sockaddr_in sin;
+ int count1 = 2, count2 = 1;
+ struct sockaddr_storage ss1, ss2;
+ struct sockaddr_in *sin1, *sin2;
+ ev_socklen_t slen1 = sizeof(ss1), slen2 = sizeof(ss2);
+ unsigned int flags =
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE|LEV_OPT_CLOSE_ON_EXEC;
+
+ evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1;
+
+ if (data->setup_data && strstr((char*)data->setup_data, "ts")) {
+ flags |= LEV_OPT_THREADSAFE;
+ }
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
+ sin.sin_port = 0; /* "You pick!" */
+
+ listener1 = evconnlistener_new_bind(base, acceptcb, &count1,
+ flags, -1, (struct sockaddr *)&sin, sizeof(sin));
+ tt_assert(listener1);
+ listener2 = evconnlistener_new_bind(base, acceptcb, &count2,
+ flags, -1, (struct sockaddr *)&sin, sizeof(sin));
+ tt_assert(listener2);
+
+ tt_int_op(evconnlistener_get_fd(listener1), >=, 0);
+ tt_int_op(evconnlistener_get_fd(listener2), >=, 0);
+ tt_assert(getsockname(evconnlistener_get_fd(listener1),
+ (struct sockaddr*)&ss1, &slen1) == 0);
+ tt_assert(getsockname(evconnlistener_get_fd(listener2),
+ (struct sockaddr*)&ss2, &slen2) == 0);
+ tt_int_op(ss1.ss_family, ==, AF_INET);
+ tt_int_op(ss2.ss_family, ==, AF_INET);
+
+ sin1 = (struct sockaddr_in*)&ss1;
+ sin2 = (struct sockaddr_in*)&ss2;
+ tt_int_op(ntohl(sin1->sin_addr.s_addr), ==, 0x7f000001);
+ tt_int_op(ntohl(sin2->sin_addr.s_addr), ==, 0x7f000001);
+ tt_int_op(sin1->sin_port, !=, sin2->sin_port);
+
+ tt_ptr_op(evconnlistener_get_base(listener1), ==, base);
+ tt_ptr_op(evconnlistener_get_base(listener2), ==, base);
+
+ fd1 = fd2 = fd3 = -1;
+ evutil_socket_connect_(&fd1, (struct sockaddr*)&ss1, slen1);
+ evutil_socket_connect_(&fd2, (struct sockaddr*)&ss1, slen1);
+ evutil_socket_connect_(&fd3, (struct sockaddr*)&ss2, slen2);
+
+#ifdef _WIN32
+ Sleep(100); /* XXXX this is a stupid stopgap. */
+#endif
+ event_base_dispatch(base);
+
+ tt_int_op(count1, ==, 0);
+ tt_int_op(count2, ==, 0);
+
+end:
+ if (fd1>=0)
+ EVUTIL_CLOSESOCKET(fd1);
+ if (fd2>=0)
+ EVUTIL_CLOSESOCKET(fd2);
+ if (fd3>=0)
+ EVUTIL_CLOSESOCKET(fd3);
+ if (listener1)
+ evconnlistener_free(listener1);
+ if (listener2)
+ evconnlistener_free(listener2);
+}
+
+static void
+errorcb(struct evconnlistener *lis, void *data_)
+{
+ int *data = data_;
+ *data = 1000;
+ evconnlistener_disable(lis);
+}
+
+static void
+regress_listener_error(void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ struct evconnlistener *listener = NULL;
+ int count = 1;
+ unsigned int flags = LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE;
+
+ if (data->setup_data && strstr((char*)data->setup_data, "ts")) {
+ flags |= LEV_OPT_THREADSAFE;
+ }
+
+ /* send, so that pair[0] will look 'readable'*/
+ tt_int_op(send(data->pair[1], "hello", 5, 0), >, 0);
+
+ /* Start a listener with a bogus socket. */
+ listener = evconnlistener_new(base, acceptcb, &count,
+ flags, 0,
+ data->pair[0]);
+ tt_assert(listener);
+
+ evconnlistener_set_error_cb(listener, errorcb);
+
+ tt_assert(listener);
+
+ event_base_dispatch(base);
+ tt_int_op(count,==,1000); /* set by error cb */
+
+end:
+ if (listener)
+ evconnlistener_free(listener);
+}
+
+struct testcase_t listener_testcases[] = {
+
+ { "randport", regress_pick_a_port, TT_FORK|TT_NEED_BASE,
+ &basic_setup, NULL},
+
+ { "randport_ts", regress_pick_a_port, TT_FORK|TT_NEED_BASE,
+ &basic_setup, (char*)"ts"},
+
+ { "error", regress_listener_error,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
+ &basic_setup, NULL},
+
+ { "error_ts", regress_listener_error,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR,
+ &basic_setup, (char*)"ts"},
+
+ END_OF_TESTCASES,
+};
+
+struct testcase_t listener_iocp_testcases[] = {
+ { "randport", regress_pick_a_port,
+ TT_FORK|TT_NEED_BASE|TT_ENABLE_IOCP,
+ &basic_setup, NULL},
+
+ { "error", regress_listener_error,
+ TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_ENABLE_IOCP,
+ &basic_setup, NULL},
+
+ END_OF_TESTCASES,
+};
diff --git a/sntp/libevent/test/regress_main.c b/sntp/libevent/test/regress_main.c
new file mode 100644
index 000000000000..58cbe5fe2741
--- /dev/null
+++ b/sntp/libevent/test/regress_main.c
@@ -0,0 +1,462 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+#if defined(__APPLE__) && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 && \
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+#define FORK_BREAKS_GCOV
+#include <vproc.h>
+#endif
+#endif
+
+#include "event2/event-config.h"
+
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+#if 0
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#include <signal.h>
+#include <errno.h>
+#endif
+
+#include <sys/types.h>
+#ifdef EVENT__HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "event2/util.h"
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/dns.h"
+#include "event2/dns_compat.h"
+#include "event2/thread.h"
+
+#include "event2/event-config.h"
+#include "regress.h"
+#include "tinytest.h"
+#include "tinytest_macros.h"
+#include "../iocp-internal.h"
+#include "../event-internal.h"
+
+long
+timeval_msec_diff(const struct timeval *start, const struct timeval *end)
+{
+ long ms = end->tv_sec - start->tv_sec;
+ ms *= 1000;
+ ms += ((end->tv_usec - start->tv_usec)+500) / 1000;
+ return ms;
+}
+
+/* ============================================================ */
+/* Code to wrap up old legacy test cases that used setup() and cleanup().
+ *
+ * Not all of the tests designated "legacy" are ones that used setup() and
+ * cleanup(), of course. A test is legacy it it uses setup()/cleanup(), OR
+ * if it wants to find its event base/socketpair in global variables (ugh),
+ * OR if it wants to communicate success/failure through test_ok.
+ */
+
+/* This is set to true if we're inside a legacy test wrapper. It lets the
+ setup() and cleanup() functions in regress.c know they're not needed.
+ */
+int in_legacy_test_wrapper = 0;
+
+static void dnslogcb(int w, const char *m)
+{
+ TT_BLATHER(("%s", m));
+}
+
+/* creates a temporary file with the data in it. If *filename_out gets set,
+ * the caller should try to unlink it. */
+int
+regress_make_tmpfile(const void *data, size_t datalen, char **filename_out)
+{
+#ifndef _WIN32
+ char tmpfilename[32];
+ int fd;
+ *filename_out = NULL;
+ strcpy(tmpfilename, "/tmp/eventtmp.XXXXXX");
+#ifdef EVENT__HAVE_UMASK
+ umask(0077);
+#endif
+ fd = mkstemp(tmpfilename);
+ if (fd == -1)
+ return (-1);
+ if (write(fd, data, datalen) != (int)datalen) {
+ close(fd);
+ return (-1);
+ }
+ lseek(fd, 0, SEEK_SET);
+ /* remove it from the file system */
+ unlink(tmpfilename);
+ return (fd);
+#else
+ /* XXXX actually delete the file later */
+ char tmpfilepath[MAX_PATH];
+ char tmpfilename[MAX_PATH];
+ DWORD r, written;
+ int tries = 16;
+ HANDLE h;
+ r = GetTempPathA(MAX_PATH, tmpfilepath);
+ if (r > MAX_PATH || r == 0)
+ return (-1);
+ for (; tries > 0; --tries) {
+ r = GetTempFileNameA(tmpfilepath, "LIBEVENT", 0, tmpfilename);
+ if (r == 0)
+ return (-1);
+ h = CreateFileA(tmpfilename, GENERIC_READ|GENERIC_WRITE,
+ 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h != INVALID_HANDLE_VALUE)
+ break;
+ }
+ if (tries == 0)
+ return (-1);
+ written = 0;
+ *filename_out = strdup(tmpfilename);
+ WriteFile(h, data, (DWORD)datalen, &written, NULL);
+ /* Closing the fd returned by this function will indeed close h. */
+ return _open_osfhandle((intptr_t)h,_O_RDONLY);
+#endif
+}
+
+#ifndef _WIN32
+pid_t
+regress_fork(void)
+{
+ pid_t pid = fork();
+#ifdef FORK_BREAKS_GCOV
+ vproc_transaction_begin(0);
+#endif
+ return pid;
+}
+#endif
+
+static void
+ignore_log_cb(int s, const char *msg)
+{
+}
+
+static void *
+basic_test_setup(const struct testcase_t *testcase)
+{
+ struct event_base *base = NULL;
+ evutil_socket_t spair[2] = { -1, -1 };
+ struct basic_test_data *data = NULL;
+
+#ifndef _WIN32
+ if (testcase->flags & TT_ENABLE_IOCP_FLAG)
+ return (void*)TT_SKIP;
+#endif
+
+ if (testcase->flags & TT_NEED_THREADS) {
+ if (!(testcase->flags & TT_FORK))
+ return NULL;
+#if defined(EVTHREAD_USE_PTHREADS_IMPLEMENTED)
+ if (evthread_use_pthreads())
+ exit(1);
+#elif defined(EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED)
+ if (evthread_use_windows_threads())
+ exit(1);
+#else
+ return (void*)TT_SKIP;
+#endif
+ }
+
+ if (testcase->flags & TT_NEED_SOCKETPAIR) {
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, spair) == -1) {
+ fprintf(stderr, "%s: socketpair\n", __func__);
+ exit(1);
+ }
+
+ if (evutil_make_socket_nonblocking(spair[0]) == -1) {
+ fprintf(stderr, "fcntl(O_NONBLOCK)");
+ exit(1);
+ }
+
+ if (evutil_make_socket_nonblocking(spair[1]) == -1) {
+ fprintf(stderr, "fcntl(O_NONBLOCK)");
+ exit(1);
+ }
+ }
+ if (testcase->flags & TT_NEED_BASE) {
+ if (testcase->flags & TT_LEGACY)
+ base = event_init();
+ else
+ base = event_base_new();
+ if (!base)
+ exit(1);
+ }
+ if (testcase->flags & TT_ENABLE_IOCP_FLAG) {
+ if (event_base_start_iocp_(base, 0)<0) {
+ event_base_free(base);
+ return (void*)TT_SKIP;
+ }
+ }
+
+ if (testcase->flags & TT_NEED_DNS) {
+ evdns_set_log_fn(dnslogcb);
+ if (evdns_init())
+ return NULL; /* fast failure */ /*XXX asserts. */
+ }
+
+ if (testcase->flags & TT_NO_LOGS)
+ event_set_log_callback(ignore_log_cb);
+
+ data = calloc(1, sizeof(*data));
+ if (!data)
+ exit(1);
+ data->base = base;
+ data->pair[0] = spair[0];
+ data->pair[1] = spair[1];
+ data->setup_data = testcase->setup_data;
+ return data;
+}
+
+static int
+basic_test_cleanup(const struct testcase_t *testcase, void *ptr)
+{
+ struct basic_test_data *data = ptr;
+
+ if (testcase->flags & TT_NO_LOGS)
+ event_set_log_callback(NULL);
+
+ if (testcase->flags & TT_NEED_SOCKETPAIR) {
+ if (data->pair[0] != -1)
+ evutil_closesocket(data->pair[0]);
+ if (data->pair[1] != -1)
+ evutil_closesocket(data->pair[1]);
+ }
+
+ if (testcase->flags & TT_NEED_DNS) {
+ evdns_shutdown(0);
+ }
+
+ if (testcase->flags & TT_NEED_BASE) {
+ if (data->base) {
+ event_base_assert_ok_(data->base);
+ event_base_free(data->base);
+ }
+ }
+
+ if (testcase->flags & TT_FORK)
+ libevent_global_shutdown();
+
+ free(data);
+
+ return 1;
+}
+
+const struct testcase_setup_t basic_setup = {
+ basic_test_setup, basic_test_cleanup
+};
+
+/* The "data" for a legacy test is just a pointer to the void fn(void)
+ function implementing the test case. We need to set up some globals,
+ though, since that's where legacy tests expect to find a socketpair
+ (sometimes) and a global event_base (sometimes).
+ */
+static void *
+legacy_test_setup(const struct testcase_t *testcase)
+{
+ struct basic_test_data *data = basic_test_setup(testcase);
+ if (data == (void*)TT_SKIP || data == NULL)
+ return data;
+ global_base = data->base;
+ pair[0] = data->pair[0];
+ pair[1] = data->pair[1];
+ data->legacy_test_fn = testcase->setup_data;
+ return data;
+}
+
+/* This function is the implementation of every legacy test case. It
+ sets test_ok to 0, invokes the test function, and tells tinytest that
+ the test failed if the test didn't set test_ok to 1.
+ */
+void
+run_legacy_test_fn(void *ptr)
+{
+ struct basic_test_data *data = ptr;
+ test_ok = called = 0;
+
+ in_legacy_test_wrapper = 1;
+ data->legacy_test_fn(); /* This part actually calls the test */
+ in_legacy_test_wrapper = 0;
+
+ if (!test_ok)
+ tt_abort_msg("Legacy unit test failed");
+
+end:
+ test_ok = 0;
+}
+
+/* This function doesn't have to clean up ptr (which is just a pointer
+ to the test function), but it may need to close the socketpair or
+ free the event_base.
+ */
+static int
+legacy_test_cleanup(const struct testcase_t *testcase, void *ptr)
+{
+ int r = basic_test_cleanup(testcase, ptr);
+ pair[0] = pair[1] = -1;
+ global_base = NULL;
+ return r;
+}
+
+const struct testcase_setup_t legacy_setup = {
+ legacy_test_setup, legacy_test_cleanup
+};
+
+/* ============================================================ */
+
+#if (!defined(EVENT__HAVE_PTHREADS) && !defined(_WIN32)) || defined(EVENT__DISABLE_THREAD_SUPPORT)
+struct testcase_t thread_testcases[] = {
+ { "basic", NULL, TT_SKIP, NULL, NULL },
+ END_OF_TESTCASES
+};
+#endif
+
+struct testgroup_t testgroups[] = {
+ { "main/", main_testcases },
+ { "heap/", minheap_testcases },
+ { "et/", edgetriggered_testcases },
+ { "finalize/", finalize_testcases },
+ { "evbuffer/", evbuffer_testcases },
+ { "signal/", signal_testcases },
+ { "util/", util_testcases },
+ { "bufferevent/", bufferevent_testcases },
+ { "http/", http_testcases },
+ { "dns/", dns_testcases },
+ { "evtag/", evtag_testcases },
+ { "rpc/", rpc_testcases },
+ { "thread/", thread_testcases },
+ { "listener/", listener_testcases },
+#ifdef _WIN32
+ { "iocp/", iocp_testcases },
+ { "iocp/bufferevent/", bufferevent_iocp_testcases },
+ { "iocp/listener/", listener_iocp_testcases },
+#endif
+#ifdef EVENT__HAVE_OPENSSL
+ { "ssl/", ssl_testcases },
+#endif
+ END_OF_GROUPS
+};
+
+const char *alltests[] = { "+..", NULL };
+const char *livenettests[] = {
+ "+util/getaddrinfo_live",
+ "+dns/gethostby..",
+ "+dns/resolve_reverse",
+ NULL
+};
+const char *finetimetests[] = {
+ "+util/monotonic_res_precise",
+ "+util/monotonic_res_fallback",
+ "+thread/deferred_cb_skew",
+ "+http/connection_retry",
+ NULL
+};
+struct testlist_alias_t testaliases[] = {
+ { "all", alltests },
+ { "live_net", livenettests },
+ { "fine_timing", finetimetests },
+ END_OF_ALIASES
+};
+
+int libevent_tests_running_in_debug_mode = 0;
+
+int
+main(int argc, const char **argv)
+{
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+#ifndef _WIN32
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return 1;
+#endif
+
+#ifdef _WIN32
+ tinytest_skip(testgroups, "http/connection_retry");
+#endif
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ if (!getenv("EVENT_NO_DEBUG_LOCKS"))
+ evthread_enable_lock_debugging();
+#endif
+
+ if (getenv("EVENT_DEBUG_MODE")) {
+ event_enable_debug_mode();
+ libevent_tests_running_in_debug_mode = 1;
+ }
+ if (getenv("EVENT_DEBUG_LOGGING_ALL")) {
+ event_enable_debug_logging(EVENT_DBG_ALL);
+ }
+
+ tinytest_set_aliases(testaliases);
+
+ if (tinytest_main(argc,argv,testgroups))
+ return 1;
+
+ libevent_global_shutdown();
+
+ return 0;
+}
+
diff --git a/sntp/libevent/test/regress_minheap.c b/sntp/libevent/test/regress_minheap.c
new file mode 100644
index 000000000000..a1f554ebbe8f
--- /dev/null
+++ b/sntp/libevent/test/regress_minheap.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../minheap-internal.h"
+
+#include <stdlib.h>
+#include "event2/event_struct.h"
+
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+static void
+set_random_timeout(struct event *ev)
+{
+ ev->ev_timeout.tv_sec = rand();
+ ev->ev_timeout.tv_usec = rand() & 0xfffff;
+ ev->ev_timeout_pos.min_heap_idx = -1;
+}
+
+static void
+check_heap(struct min_heap *heap)
+{
+ unsigned i;
+ for (i = 1; i < heap->n; ++i) {
+ unsigned parent_idx = (i-1)/2;
+ tt_want(evutil_timercmp(&heap->p[i]->ev_timeout,
+ &heap->p[parent_idx]->ev_timeout, >=));
+ }
+}
+
+static void
+test_heap_randomized(void *ptr)
+{
+ struct min_heap heap;
+ struct event *inserted[1024];
+ struct event *e, *last_e;
+ int i;
+
+ min_heap_ctor_(&heap);
+
+ for (i = 0; i < 1024; ++i) {
+ inserted[i] = malloc(sizeof(struct event));
+ set_random_timeout(inserted[i]);
+ min_heap_push_(&heap, inserted[i]);
+ }
+ check_heap(&heap);
+
+ tt_assert(min_heap_size_(&heap) == 1024);
+
+ for (i = 0; i < 512; ++i) {
+ min_heap_erase_(&heap, inserted[i]);
+ if (0 == (i % 32))
+ check_heap(&heap);
+ }
+ tt_assert(min_heap_size_(&heap) == 512);
+
+ last_e = min_heap_pop_(&heap);
+ while (1) {
+ e = min_heap_pop_(&heap);
+ if (!e)
+ break;
+ tt_want(evutil_timercmp(&last_e->ev_timeout,
+ &e->ev_timeout, <=));
+ }
+ tt_assert(min_heap_size_(&heap) == 0);
+end:
+ for (i = 0; i < 1024; ++i)
+ free(inserted[i]);
+
+ min_heap_dtor_(&heap);
+}
+
+struct testcase_t minheap_testcases[] = {
+ { "randomized", test_heap_randomized, 0, NULL, NULL },
+ END_OF_TESTCASES
+};
diff --git a/sntp/libevent/test/regress_rpc.c b/sntp/libevent/test/regress_rpc.c
new file mode 100644
index 000000000000..01a058cbb2b8
--- /dev/null
+++ b/sntp/libevent/test/regress_rpc.c
@@ -0,0 +1,905 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/* The old tests here need assertions to work. */
+#undef NDEBUG
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <signal.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "event2/buffer.h"
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/http.h"
+#include "event2/http_compat.h"
+#include "event2/http_struct.h"
+#include "event2/rpc.h"
+#include "event2/rpc.h"
+#include "event2/rpc_struct.h"
+#include "event2/tag.h"
+#include "log-internal.h"
+
+#include "regress.gen.h"
+
+#include "regress.h"
+#include "regress_testutils.h"
+
+#ifndef NO_PYTHON_EXISTS
+
+static struct evhttp *
+http_setup(ev_uint16_t *pport)
+{
+ struct evhttp *myhttp;
+ ev_uint16_t port;
+ struct evhttp_bound_socket *sock;
+
+ myhttp = evhttp_new(NULL);
+ if (!myhttp)
+ event_errx(1, "Could not start web server");
+
+ /* Try a few different ports */
+ sock = evhttp_bind_socket_with_handle(myhttp, "127.0.0.1", 0);
+ if (!sock)
+ event_errx(1, "Couldn't open web port");
+
+ port = regress_get_socket_port(evhttp_bound_socket_get_fd(sock));
+
+ *pport = port;
+ return (myhttp);
+}
+
+EVRPC_HEADER(Message, msg, kill)
+EVRPC_HEADER(NeverReply, msg, kill)
+
+EVRPC_GENERATE(Message, msg, kill)
+EVRPC_GENERATE(NeverReply, msg, kill)
+
+static int need_input_hook = 0;
+static int need_output_hook = 0;
+
+static void
+MessageCb(EVRPC_STRUCT(Message)* rpc, void *arg)
+{
+ struct kill* kill_reply = rpc->reply;
+
+ if (need_input_hook) {
+ struct evhttp_request* req = EVRPC_REQUEST_HTTP(rpc);
+ const char *header = evhttp_find_header(
+ req->input_headers, "X-Hook");
+ assert(header);
+ assert(strcmp(header, "input") == 0);
+ }
+
+ /* we just want to fill in some non-sense */
+ EVTAG_ASSIGN(kill_reply, weapon, "dagger");
+ EVTAG_ASSIGN(kill_reply, action, "wave around like an idiot");
+
+ /* no reply to the RPC */
+ EVRPC_REQUEST_DONE(rpc);
+}
+
+static EVRPC_STRUCT(NeverReply) *saved_rpc;
+
+static void
+NeverReplyCb(EVRPC_STRUCT(NeverReply)* rpc, void *arg)
+{
+ test_ok += 1;
+ saved_rpc = rpc;
+}
+
+static void
+rpc_setup(struct evhttp **phttp, ev_uint16_t *pport, struct evrpc_base **pbase)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+
+ http = http_setup(&port);
+ base = evrpc_init(http);
+
+ EVRPC_REGISTER(base, Message, msg, kill, MessageCb, NULL);
+ EVRPC_REGISTER(base, NeverReply, msg, kill, NeverReplyCb, NULL);
+
+ *phttp = http;
+ *pport = port;
+ *pbase = base;
+
+ need_input_hook = 0;
+ need_output_hook = 0;
+}
+
+static void
+rpc_teardown(struct evrpc_base *base)
+{
+ assert(EVRPC_UNREGISTER(base, Message) == 0);
+ assert(EVRPC_UNREGISTER(base, NeverReply) == 0);
+
+ evrpc_free(base);
+}
+
+static void
+rpc_postrequest_failure(struct evhttp_request *req, void *arg)
+{
+ if (req->response_code != HTTP_SERVUNAVAIL) {
+
+ fprintf(stderr, "FAILED (response code)\n");
+ exit(1);
+ }
+
+ test_ok = 1;
+ event_loopexit(NULL);
+}
+
+/*
+ * Test a malformed payload submitted as an RPC
+ */
+
+static void
+rpc_basic_test(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ evcon = evhttp_connection_new("127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule an HTTP POST request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(rpc_postrequest_failure, NULL);
+ tt_assert(req);
+
+ /* Add the information that we care about */
+ evhttp_add_header(req->output_headers, "Host", "somehost");
+ evbuffer_add_printf(req->output_buffer, "Some Nonsense");
+
+ if (evhttp_make_request(evcon, req,
+ EVHTTP_REQ_POST,
+ "/.rpc.Message") == -1) {
+ tt_abort();
+ }
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ evhttp_connection_free(evcon);
+
+ rpc_teardown(base);
+
+ tt_assert(test_ok == 1);
+
+end:
+ evhttp_free(http);
+}
+
+static void
+rpc_postrequest_done(struct evhttp_request *req, void *arg)
+{
+ struct kill* kill_reply = NULL;
+
+ if (req->response_code != HTTP_OK) {
+ fprintf(stderr, "FAILED (response code)\n");
+ exit(1);
+ }
+
+ kill_reply = kill_new();
+
+ if ((kill_unmarshal(kill_reply, req->input_buffer)) == -1) {
+ fprintf(stderr, "FAILED (unmarshal)\n");
+ exit(1);
+ }
+
+ kill_free(kill_reply);
+
+ test_ok = 1;
+ event_loopexit(NULL);
+}
+
+static void
+rpc_basic_message(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evhttp_connection *evcon = NULL;
+ struct evhttp_request *req = NULL;
+ struct msg *msg;
+
+ rpc_setup(&http, &port, &base);
+
+ evcon = evhttp_connection_new("127.0.0.1", port);
+ tt_assert(evcon);
+
+ /*
+ * At this point, we want to schedule an HTTP POST request
+ * server using our make request method.
+ */
+
+ req = evhttp_request_new(rpc_postrequest_done, NULL);
+ if (req == NULL) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ /* Add the information that we care about */
+ evhttp_add_header(req->output_headers, "Host", "somehost");
+
+ /* set up the basic message */
+ msg = msg_new();
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "tester");
+ msg_marshal(req->output_buffer, msg);
+ msg_free(msg);
+
+ if (evhttp_make_request(evcon, req,
+ EVHTTP_REQ_POST,
+ "/.rpc.Message") == -1) {
+ fprintf(stdout, "FAILED\n");
+ exit(1);
+ }
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ evhttp_connection_free(evcon);
+
+ rpc_teardown(base);
+
+end:
+ evhttp_free(http);
+}
+
+static struct evrpc_pool *
+rpc_pool_with_connection(ev_uint16_t port)
+{
+ struct evhttp_connection *evcon;
+ struct evrpc_pool *pool;
+
+ pool = evrpc_pool_new(NULL);
+ assert(pool != NULL);
+
+ evcon = evhttp_connection_new("127.0.0.1", port);
+ assert(evcon != NULL);
+
+ evrpc_pool_add_connection(pool, evcon);
+
+ return (pool);
+}
+
+static void
+GotKillCb(struct evrpc_status *status,
+ struct msg *msg, struct kill *kill, void *arg)
+{
+ char *weapon;
+ char *action;
+
+ if (need_output_hook) {
+ struct evhttp_request *req = status->http_req;
+ const char *header = evhttp_find_header(
+ req->input_headers, "X-Pool-Hook");
+ assert(header);
+ assert(strcmp(header, "ran") == 0);
+ }
+
+ if (status->error != EVRPC_STATUS_ERR_NONE)
+ goto done;
+
+ if (EVTAG_GET(kill, weapon, &weapon) == -1) {
+ fprintf(stderr, "get weapon\n");
+ goto done;
+ }
+ if (EVTAG_GET(kill, action, &action) == -1) {
+ fprintf(stderr, "get action\n");
+ goto done;
+ }
+
+ if (strcmp(weapon, "dagger"))
+ goto done;
+
+ if (strcmp(action, "wave around like an idiot"))
+ goto done;
+
+ test_ok += 1;
+
+done:
+ event_loopexit(NULL);
+}
+
+static void
+GotKillCbTwo(struct evrpc_status *status,
+ struct msg *msg, struct kill *kill, void *arg)
+{
+ char *weapon;
+ char *action;
+
+ if (status->error != EVRPC_STATUS_ERR_NONE)
+ goto done;
+
+ if (EVTAG_GET(kill, weapon, &weapon) == -1) {
+ fprintf(stderr, "get weapon\n");
+ goto done;
+ }
+ if (EVTAG_GET(kill, action, &action) == -1) {
+ fprintf(stderr, "get action\n");
+ goto done;
+ }
+
+ if (strcmp(weapon, "dagger"))
+ goto done;
+
+ if (strcmp(action, "wave around like an idiot"))
+ goto done;
+
+ test_ok += 1;
+
+done:
+ if (test_ok == 2)
+ event_loopexit(NULL);
+}
+
+static int
+rpc_hook_add_header(void *ctx, struct evhttp_request *req,
+ struct evbuffer *evbuf, void *arg)
+{
+ const char *hook_type = arg;
+ if (strcmp("input", hook_type) == 0)
+ evhttp_add_header(req->input_headers, "X-Hook", hook_type);
+ else
+ evhttp_add_header(req->output_headers, "X-Hook", hook_type);
+
+ assert(evrpc_hook_get_connection(ctx) != NULL);
+
+ return (EVRPC_CONTINUE);
+}
+
+static int
+rpc_hook_add_meta(void *ctx, struct evhttp_request *req,
+ struct evbuffer *evbuf, void *arg)
+{
+ evrpc_hook_add_meta(ctx, "meta", "test", 5);
+
+ assert(evrpc_hook_get_connection(ctx) != NULL);
+
+ return (EVRPC_CONTINUE);
+}
+
+static int
+rpc_hook_remove_header(void *ctx, struct evhttp_request *req,
+ struct evbuffer *evbuf, void *arg)
+{
+ const char *header = evhttp_find_header(req->input_headers, "X-Hook");
+ void *data = NULL;
+ size_t data_len = 0;
+
+ assert(header != NULL);
+ assert(strcmp(header, arg) == 0);
+
+ evhttp_remove_header(req->input_headers, "X-Hook");
+ evhttp_add_header(req->input_headers, "X-Pool-Hook", "ran");
+
+ assert(evrpc_hook_find_meta(ctx, "meta", &data, &data_len) == 0);
+ assert(data != NULL);
+ assert(data_len == 5);
+
+ assert(evrpc_hook_get_connection(ctx) != NULL);
+
+ return (EVRPC_CONTINUE);
+}
+
+static void
+rpc_basic_client(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evrpc_pool *pool = NULL;
+ struct msg *msg = NULL;
+ struct kill *kill = NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ need_input_hook = 1;
+ need_output_hook = 1;
+
+ assert(evrpc_add_hook(base, EVRPC_INPUT, rpc_hook_add_header, (void*)"input")
+ != NULL);
+ assert(evrpc_add_hook(base, EVRPC_OUTPUT, rpc_hook_add_header, (void*)"output")
+ != NULL);
+
+ pool = rpc_pool_with_connection(port);
+ tt_assert(pool);
+
+ assert(evrpc_add_hook(pool, EVRPC_OUTPUT, rpc_hook_add_meta, NULL));
+ assert(evrpc_add_hook(pool, EVRPC_INPUT, rpc_hook_remove_header, (void*)"output"));
+
+ /* set up the basic message */
+ msg = msg_new();
+ tt_assert(msg);
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "tester");
+
+ kill = kill_new();
+
+ EVRPC_MAKE_REQUEST(Message, pool, msg, kill, GotKillCb, NULL);
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ tt_assert(test_ok == 1);
+
+ /* we do it twice to make sure that reuse works correctly */
+ kill_clear(kill);
+
+ EVRPC_MAKE_REQUEST(Message, pool, msg, kill, GotKillCb, NULL);
+
+ event_dispatch();
+
+ tt_assert(test_ok == 2);
+
+ /* we do it trice to make sure other stuff works, too */
+ kill_clear(kill);
+
+ {
+ struct evrpc_request_wrapper *ctx =
+ EVRPC_MAKE_CTX(Message, msg, kill,
+ pool, msg, kill, GotKillCb, NULL);
+ evrpc_make_request(ctx);
+ }
+
+ event_dispatch();
+
+ rpc_teardown(base);
+
+ tt_assert(test_ok == 3);
+
+end:
+ if (msg)
+ msg_free(msg);
+ if (kill)
+ kill_free(kill);
+
+ if (pool)
+ evrpc_pool_free(pool);
+ if (http)
+ evhttp_free(http);
+
+ need_input_hook = 0;
+ need_output_hook = 0;
+}
+
+/*
+ * We are testing that the second requests gets send over the same
+ * connection after the first RPCs completes.
+ */
+static void
+rpc_basic_queued_client(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evrpc_pool *pool = NULL;
+ struct msg *msg=NULL;
+ struct kill *kill_one=NULL, *kill_two=NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ pool = rpc_pool_with_connection(port);
+ tt_assert(pool);
+
+ /* set up the basic message */
+ msg = msg_new();
+ tt_assert(msg);
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "tester");
+
+ kill_one = kill_new();
+ kill_two = kill_new();
+
+ EVRPC_MAKE_REQUEST(Message, pool, msg, kill_one, GotKillCbTwo, NULL);
+ EVRPC_MAKE_REQUEST(Message, pool, msg, kill_two, GotKillCb, NULL);
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ rpc_teardown(base);
+
+ tt_assert(test_ok == 2);
+
+end:
+ if (msg)
+ msg_free(msg);
+ if (kill_one)
+ kill_free(kill_one);
+ if (kill_two)
+ kill_free(kill_two);
+
+ if (pool)
+ evrpc_pool_free(pool);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+GotErrorCb(struct evrpc_status *status,
+ struct msg *msg, struct kill *kill, void *arg)
+{
+ if (status->error != EVRPC_STATUS_ERR_TIMEOUT)
+ goto done;
+
+ /* should never be complete but just to check */
+ if (kill_complete(kill) == 0)
+ goto done;
+
+ test_ok += 1;
+
+done:
+ event_loopexit(NULL);
+}
+
+/* we just pause the rpc and continue it in the next callback */
+
+struct rpc_hook_ctx_ {
+ void *vbase;
+ void *ctx;
+};
+
+static int hook_pause_cb_called=0;
+
+static void
+rpc_hook_pause_cb(evutil_socket_t fd, short what, void *arg)
+{
+ struct rpc_hook_ctx_ *ctx = arg;
+ ++hook_pause_cb_called;
+ evrpc_resume_request(ctx->vbase, ctx->ctx, EVRPC_CONTINUE);
+ free(arg);
+}
+
+static int
+rpc_hook_pause(void *ctx, struct evhttp_request *req, struct evbuffer *evbuf,
+ void *arg)
+{
+ struct rpc_hook_ctx_ *tmp = malloc(sizeof(*tmp));
+ struct timeval tv;
+
+ assert(tmp != NULL);
+ tmp->vbase = arg;
+ tmp->ctx = ctx;
+
+ memset(&tv, 0, sizeof(tv));
+ event_once(-1, EV_TIMEOUT, rpc_hook_pause_cb, tmp, &tv);
+ return EVRPC_PAUSE;
+}
+
+static void
+rpc_basic_client_with_pause(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evrpc_pool *pool = NULL;
+ struct msg *msg = NULL;
+ struct kill *kill= NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ assert(evrpc_add_hook(base, EVRPC_INPUT, rpc_hook_pause, base));
+ assert(evrpc_add_hook(base, EVRPC_OUTPUT, rpc_hook_pause, base));
+
+ pool = rpc_pool_with_connection(port);
+ tt_assert(pool);
+ assert(evrpc_add_hook(pool, EVRPC_INPUT, rpc_hook_pause, pool));
+ assert(evrpc_add_hook(pool, EVRPC_OUTPUT, rpc_hook_pause, pool));
+
+ /* set up the basic message */
+ msg = msg_new();
+ tt_assert(msg);
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "tester");
+
+ kill = kill_new();
+
+ EVRPC_MAKE_REQUEST(Message, pool, msg, kill, GotKillCb, NULL);
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ tt_int_op(test_ok, ==, 1);
+ tt_int_op(hook_pause_cb_called, ==, 4);
+
+end:
+ if (base)
+ rpc_teardown(base);
+
+ if (msg)
+ msg_free(msg);
+ if (kill)
+ kill_free(kill);
+
+ if (pool)
+ evrpc_pool_free(pool);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+rpc_client_timeout(void)
+{
+ ev_uint16_t port;
+ struct evhttp *http = NULL;
+ struct evrpc_base *base = NULL;
+ struct evrpc_pool *pool = NULL;
+ struct msg *msg = NULL;
+ struct kill *kill = NULL;
+
+ rpc_setup(&http, &port, &base);
+
+ pool = rpc_pool_with_connection(port);
+ tt_assert(pool);
+
+ /* set the timeout to 1 second. */
+ evrpc_pool_set_timeout(pool, 1);
+
+ /* set up the basic message */
+ msg = msg_new();
+ tt_assert(msg);
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "tester");
+
+ kill = kill_new();
+
+ EVRPC_MAKE_REQUEST(NeverReply, pool, msg, kill, GotErrorCb, NULL);
+
+ test_ok = 0;
+
+ event_dispatch();
+
+ /* free the saved RPC structure up */
+ EVRPC_REQUEST_DONE(saved_rpc);
+
+ rpc_teardown(base);
+
+ tt_assert(test_ok == 2);
+
+end:
+ if (msg)
+ msg_free(msg);
+ if (kill)
+ kill_free(kill);
+
+ if (pool)
+ evrpc_pool_free(pool);
+ if (http)
+ evhttp_free(http);
+}
+
+static void
+rpc_test(void)
+{
+ struct msg *msg = NULL, *msg2 = NULL;
+ struct kill *attack = NULL;
+ struct run *run = NULL;
+ struct evbuffer *tmp = evbuffer_new();
+ struct timeval tv_start, tv_end;
+ ev_uint32_t tag;
+ int i;
+
+ msg = msg_new();
+
+ tt_assert(msg);
+
+ EVTAG_ASSIGN(msg, from_name, "niels");
+ EVTAG_ASSIGN(msg, to_name, "phoenix");
+
+ if (EVTAG_GET(msg, attack, &attack) == -1) {
+ tt_abort_msg("Failed to set kill message.");
+ }
+
+ EVTAG_ASSIGN(attack, weapon, "feather");
+ EVTAG_ASSIGN(attack, action, "tickle");
+ for (i = 0; i < 3; ++i) {
+ if (EVTAG_ARRAY_ADD_VALUE(attack, how_often, i) == NULL) {
+ tt_abort_msg("Failed to add how_often.");
+ }
+ }
+
+ evutil_gettimeofday(&tv_start, NULL);
+ for (i = 0; i < 1000; ++i) {
+ run = EVTAG_ARRAY_ADD(msg, run);
+ if (run == NULL) {
+ tt_abort_msg("Failed to add run message.");
+ }
+ EVTAG_ASSIGN(run, how, "very fast but with some data in it");
+ EVTAG_ASSIGN(run, fixed_bytes,
+ (ev_uint8_t*)"012345678901234567890123");
+
+ if (EVTAG_ARRAY_ADD_VALUE(
+ run, notes, "this is my note") == NULL) {
+ tt_abort_msg("Failed to add note.");
+ }
+ if (EVTAG_ARRAY_ADD_VALUE(run, notes, "pps") == NULL) {
+ tt_abort_msg("Failed to add note");
+ }
+
+ EVTAG_ASSIGN(run, large_number, 0xdead0a0bcafebeefLL);
+ EVTAG_ARRAY_ADD_VALUE(run, other_numbers, 0xdead0a0b);
+ EVTAG_ARRAY_ADD_VALUE(run, other_numbers, 0xbeefcafe);
+ }
+
+ if (msg_complete(msg) == -1)
+ tt_abort_msg("Failed to make complete message.");
+
+ evtag_marshal_msg(tmp, 0xdeaf, msg);
+
+ if (evtag_peek(tmp, &tag) == -1)
+ tt_abort_msg("Failed to peak tag.");
+
+ if (tag != 0xdeaf)
+ TT_DIE(("Got incorrect tag: %0x.", (unsigned)tag));
+
+ msg2 = msg_new();
+ if (evtag_unmarshal_msg(tmp, 0xdeaf, msg2) == -1)
+ tt_abort_msg("Failed to unmarshal message.");
+
+ evutil_gettimeofday(&tv_end, NULL);
+ evutil_timersub(&tv_end, &tv_start, &tv_end);
+ TT_BLATHER(("(%.1f us/add) ",
+ (float)tv_end.tv_sec/(float)i * 1000000.0 +
+ tv_end.tv_usec / (float)i));
+
+ if (!EVTAG_HAS(msg2, from_name) ||
+ !EVTAG_HAS(msg2, to_name) ||
+ !EVTAG_HAS(msg2, attack)) {
+ tt_abort_msg("Missing data structures.");
+ }
+
+ if (EVTAG_GET(msg2, attack, &attack) == -1) {
+ tt_abort_msg("Could not get attack.");
+ }
+
+ if (EVTAG_ARRAY_LEN(msg2, run) != i) {
+ tt_abort_msg("Wrong number of run messages.");
+ }
+
+ /* get the very first run message */
+ if (EVTAG_ARRAY_GET(msg2, run, 0, &run) == -1) {
+ tt_abort_msg("Failed to get run msg.");
+ } else {
+ /* verify the notes */
+ char *note_one, *note_two;
+ ev_uint64_t large_number;
+ ev_uint32_t short_number;
+
+ if (EVTAG_ARRAY_LEN(run, notes) != 2) {
+ tt_abort_msg("Wrong number of note strings.");
+ }
+
+ if (EVTAG_ARRAY_GET(run, notes, 0, &note_one) == -1 ||
+ EVTAG_ARRAY_GET(run, notes, 1, &note_two) == -1) {
+ tt_abort_msg("Could not get note strings.");
+ }
+
+ if (strcmp(note_one, "this is my note") ||
+ strcmp(note_two, "pps")) {
+ tt_abort_msg("Incorrect note strings encoded.");
+ }
+
+ if (EVTAG_GET(run, large_number, &large_number) == -1 ||
+ large_number != 0xdead0a0bcafebeefLL) {
+ tt_abort_msg("Incorrrect large_number.");
+ }
+
+ if (EVTAG_ARRAY_LEN(run, other_numbers) != 2) {
+ tt_abort_msg("Wrong number of other_numbers.");
+ }
+
+ if (EVTAG_ARRAY_GET(
+ run, other_numbers, 0, &short_number) == -1) {
+ tt_abort_msg("Could not get short number.");
+ }
+ tt_uint_op(short_number, ==, 0xdead0a0b);
+
+ }
+ tt_int_op(EVTAG_ARRAY_LEN(attack, how_often), ==, 3);
+
+ for (i = 0; i < 3; ++i) {
+ ev_uint32_t res;
+ if (EVTAG_ARRAY_GET(attack, how_often, i, &res) == -1) {
+ TT_DIE(("Cannot get %dth how_often msg.", i));
+ }
+ if ((int)res != i) {
+ TT_DIE(("Wrong message encoded %d != %d", i, res));
+ }
+ }
+
+ test_ok = 1;
+end:
+ if (msg)
+ msg_free(msg);
+ if (msg2)
+ msg_free(msg2);
+ if (tmp)
+ evbuffer_free(tmp);
+}
+
+#define RPC_LEGACY(name) \
+ { #name, run_legacy_test_fn, TT_FORK|TT_NEED_BASE|TT_LEGACY, \
+ &legacy_setup, \
+ rpc_##name }
+#else
+/* NO_PYTHON_EXISTS */
+
+#define RPC_LEGACY(name) \
+ { #name, NULL, TT_SKIP, NULL, NULL }
+
+#endif
+
+struct testcase_t rpc_testcases[] = {
+ RPC_LEGACY(basic_test),
+ RPC_LEGACY(basic_message),
+ RPC_LEGACY(basic_client),
+ RPC_LEGACY(basic_queued_client),
+ RPC_LEGACY(basic_client_with_pause),
+ RPC_LEGACY(client_timeout),
+ RPC_LEGACY(test),
+
+ END_OF_TESTCASES,
+};
diff --git a/sntp/libevent/test/regress_ssl.c b/sntp/libevent/test/regress_ssl.c
new file mode 100644
index 000000000000..c2113414cc63
--- /dev/null
+++ b/sntp/libevent/test/regress_ssl.c
@@ -0,0 +1,477 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+// Get rid of OSX 10.7 and greater deprecation warnings.
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#ifndef _WIN32
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+#include "event2/util.h"
+#include "event2/event.h"
+#include "event2/bufferevent_ssl.h"
+#include "event2/buffer.h"
+#include "event2/listener.h"
+
+#include "regress.h"
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+#include <openssl/ssl.h>
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/pem.h>
+
+#include <string.h>
+
+/* A short pre-generated key, to save the cost of doing an RSA key generation
+ * step during the unit tests. It's only 512 bits long, and it is published
+ * in this file, so you would have to be very foolish to consider using it in
+ * your own code. */
+static const char KEY[] =
+ "-----BEGIN RSA PRIVATE KEY-----\n"
+ "MIIBOgIBAAJBAKibTEzXjj+sqpipePX1lEk5BNFuL/dDBbw8QCXgaJWikOiKHeJq\n"
+ "3FQ0OmCnmpkdsPFE4x3ojYmmdgE2i0dJwq0CAwEAAQJAZ08gpUS+qE1IClps/2gG\n"
+ "AAer6Bc31K2AaiIQvCSQcH440cp062QtWMC3V5sEoWmdLsbAHFH26/9ZHn5zAflp\n"
+ "gQIhANWOx/UYeR8HD0WREU5kcuSzgzNLwUErHLzxP7U6aojpAiEAyh2H35CjN/P7\n"
+ "NhcZ4QYw3PeUWpqgJnaE/4i80BSYkSUCIQDLHFhLYLJZ80HwHTADif/ISn9/Ow6b\n"
+ "p6BWh3DbMar/eQIgBPS6azH5vpp983KXkNv9AL4VZi9ac/b+BeINdzC6GP0CIDmB\n"
+ "U6GFEQTZ3IfuiVabG5pummdC4DNbcdI+WKrSFNmQ\n"
+ "-----END RSA PRIVATE KEY-----\n";
+
+static EVP_PKEY *
+getkey(void)
+{
+ EVP_PKEY *key;
+ BIO *bio;
+
+ /* new read-only BIO backed by KEY. */
+ bio = BIO_new_mem_buf((char*)KEY, -1);
+ tt_assert(bio);
+
+ key = PEM_read_bio_PrivateKey(bio,NULL,NULL,NULL);
+ BIO_free(bio);
+ tt_assert(key);
+
+ return key;
+end:
+ return NULL;
+}
+
+static X509 *
+getcert(void)
+{
+ /* Dummy code to make a quick-and-dirty valid certificate with
+ OpenSSL. Don't copy this code into your own program! It does a
+ number of things in a stupid and insecure way. */
+ X509 *x509 = NULL;
+ X509_NAME *name = NULL;
+ EVP_PKEY *key = getkey();
+ int nid;
+ time_t now = time(NULL);
+
+ tt_assert(key);
+
+ x509 = X509_new();
+ tt_assert(x509);
+ tt_assert(0 != X509_set_version(x509, 2));
+ tt_assert(0 != ASN1_INTEGER_set(X509_get_serialNumber(x509),
+ (long)now));
+
+ name = X509_NAME_new();
+ tt_assert(name);
+ nid = OBJ_txt2nid("commonName");
+ tt_assert(NID_undef != nid);
+ tt_assert(0 != X509_NAME_add_entry_by_NID(
+ name, nid, MBSTRING_ASC, (unsigned char*)"example.com",
+ -1, -1, 0));
+
+ X509_set_subject_name(x509, name);
+ X509_set_issuer_name(x509, name);
+
+ X509_time_adj(X509_get_notBefore(x509), 0, &now);
+ now += 3600;
+ X509_time_adj(X509_get_notAfter(x509), 0, &now);
+ X509_set_pubkey(x509, key);
+ tt_assert(0 != X509_sign(x509, key, EVP_sha1()));
+
+ return x509;
+end:
+ X509_free(x509);
+ return NULL;
+}
+
+static int disable_tls_11_and_12 = 0;
+static SSL_CTX *the_ssl_ctx = NULL;
+
+static SSL_CTX *
+get_ssl_ctx(void)
+{
+ if (the_ssl_ctx)
+ return the_ssl_ctx;
+ the_ssl_ctx = SSL_CTX_new(SSLv23_method());
+ if (!the_ssl_ctx)
+ return NULL;
+ if (disable_tls_11_and_12) {
+#ifdef SSL_OP_NO_TLSv1_2
+ SSL_CTX_set_options(the_ssl_ctx, SSL_OP_NO_TLSv1_2);
+#endif
+#ifdef SSL_OP_NO_TLSv1_1
+ SSL_CTX_set_options(the_ssl_ctx, SSL_OP_NO_TLSv1_1);
+#endif
+ }
+ return the_ssl_ctx;
+}
+
+static void
+init_ssl(void)
+{
+ SSL_library_init();
+ ERR_load_crypto_strings();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+ if (SSLeay() != OPENSSL_VERSION_NUMBER) {
+ TT_DECLARE("WARN", ("Version mismatch for openssl: compiled with %lx but running with %lx", (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long) SSLeay()));
+ }
+}
+
+/* ====================
+ Here's a simple test: we read a number from the input, increment it, and
+ reply, until we get to 1001.
+*/
+
+static int test_is_done = 0;
+static int n_connected = 0;
+static int got_close = 0;
+static int got_error = 0;
+static int renegotiate_at = -1;
+static int stop_when_connected = 0;
+static int pending_connect_events = 0;
+static struct event_base *exit_base = NULL;
+
+static void
+respond_to_number(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *b = bufferevent_get_input(bev);
+ char *line;
+ int n;
+ line = evbuffer_readln(b, NULL, EVBUFFER_EOL_LF);
+ if (! line)
+ return;
+ n = atoi(line);
+ if (n <= 0)
+ TT_FAIL(("Bad number: %s", line));
+ TT_BLATHER(("The number was %d", n));
+ if (n == 1001) {
+ ++test_is_done;
+ bufferevent_free(bev); /* Should trigger close on other side. */
+ return;
+ }
+ if (!strcmp(ctx, "client") && n == renegotiate_at) {
+ SSL_renegotiate(bufferevent_openssl_get_ssl(bev));
+ }
+ ++n;
+ evbuffer_add_printf(bufferevent_get_output(bev),
+ "%d\n", n);
+ TT_BLATHER(("Done reading; now writing."));
+ bufferevent_enable(bev, EV_WRITE);
+ bufferevent_disable(bev, EV_READ);
+}
+
+static void
+done_writing_cb(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *b = bufferevent_get_output(bev);
+ if (evbuffer_get_length(b))
+ return;
+ TT_BLATHER(("Done writing."));
+ bufferevent_disable(bev, EV_WRITE);
+ bufferevent_enable(bev, EV_READ);
+}
+
+static void
+eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ TT_BLATHER(("Got event %d", (int)what));
+ if (what & BEV_EVENT_CONNECTED) {
+ SSL *ssl;
+ X509 *peer_cert;
+ ++n_connected;
+ ssl = bufferevent_openssl_get_ssl(bev);
+ tt_assert(ssl);
+ peer_cert = SSL_get_peer_certificate(ssl);
+ if (0==strcmp(ctx, "server")) {
+ tt_assert(peer_cert == NULL);
+ } else {
+ tt_assert(peer_cert != NULL);
+ }
+ if (stop_when_connected) {
+ if (--pending_connect_events == 0)
+ event_base_loopexit(exit_base, NULL);
+ }
+ } else if (what & BEV_EVENT_EOF) {
+ TT_BLATHER(("Got a good EOF"));
+ ++got_close;
+ bufferevent_free(bev);
+ } else if (what & BEV_EVENT_ERROR) {
+ TT_BLATHER(("Got an error."));
+ ++got_error;
+ bufferevent_free(bev);
+ }
+end:
+ ;
+}
+
+static void
+open_ssl_bufevs(struct bufferevent **bev1_out, struct bufferevent **bev2_out,
+ struct event_base *base, int is_open, int flags, SSL *ssl1, SSL *ssl2,
+ evutil_socket_t *fd_pair, struct bufferevent **underlying_pair)
+{
+ int state1 = is_open ? BUFFEREVENT_SSL_OPEN :BUFFEREVENT_SSL_CONNECTING;
+ int state2 = is_open ? BUFFEREVENT_SSL_OPEN :BUFFEREVENT_SSL_ACCEPTING;
+ if (fd_pair) {
+ *bev1_out = bufferevent_openssl_socket_new(
+ base, fd_pair[0], ssl1, state1, flags);
+ *bev2_out = bufferevent_openssl_socket_new(
+ base, fd_pair[1], ssl2, state2, flags);
+ } else {
+ *bev1_out = bufferevent_openssl_filter_new(
+ base, underlying_pair[0], ssl1, state1, flags);
+ *bev2_out = bufferevent_openssl_filter_new(
+ base, underlying_pair[1], ssl2, state2, flags);
+
+ }
+ bufferevent_setcb(*bev1_out, respond_to_number, done_writing_cb,
+ eventcb, (void*)"client");
+ bufferevent_setcb(*bev2_out, respond_to_number, done_writing_cb,
+ eventcb, (void*)"server");
+}
+
+static void
+regress_bufferevent_openssl(void *arg)
+{
+ struct basic_test_data *data = arg;
+
+ struct bufferevent *bev1, *bev2;
+ SSL *ssl1, *ssl2;
+ X509 *cert = getcert();
+ EVP_PKEY *key = getkey();
+ const int start_open = strstr((char*)data->setup_data, "open")!=NULL;
+ const int filter = strstr((char*)data->setup_data, "filter")!=NULL;
+ int flags = BEV_OPT_DEFER_CALLBACKS;
+ struct bufferevent *bev_ll[2] = { NULL, NULL };
+ evutil_socket_t *fd_pair = NULL;
+
+ tt_assert(cert);
+ tt_assert(key);
+
+ init_ssl();
+
+ if (strstr((char*)data->setup_data, "renegotiate")) {
+ if (SSLeay() >= 0x10001000 &&
+ SSLeay() < 0x1000104f) {
+ /* 1.0.1 up to 1.0.1c has a bug where TLS1.1 and 1.2
+ * can't renegotiate with themselves. Disable. */
+ disable_tls_11_and_12 = 1;
+ }
+ renegotiate_at = 600;
+ }
+
+ ssl1 = SSL_new(get_ssl_ctx());
+ ssl2 = SSL_new(get_ssl_ctx());
+
+ SSL_use_certificate(ssl2, cert);
+ SSL_use_PrivateKey(ssl2, key);
+
+ if (! start_open)
+ flags |= BEV_OPT_CLOSE_ON_FREE;
+
+ if (!filter) {
+ tt_assert(strstr((char*)data->setup_data, "socketpair"));
+ fd_pair = data->pair;
+ } else {
+ bev_ll[0] = bufferevent_socket_new(data->base, data->pair[0],
+ BEV_OPT_CLOSE_ON_FREE);
+ bev_ll[1] = bufferevent_socket_new(data->base, data->pair[1],
+ BEV_OPT_CLOSE_ON_FREE);
+ }
+
+ open_ssl_bufevs(&bev1, &bev2, data->base, 0, flags, ssl1, ssl2,
+ fd_pair, bev_ll);
+
+ if (!filter) {
+ tt_int_op(bufferevent_getfd(bev1), ==, data->pair[0]);
+ } else {
+ tt_ptr_op(bufferevent_get_underlying(bev1), ==, bev_ll[0]);
+ }
+
+ if (start_open) {
+ pending_connect_events = 2;
+ stop_when_connected = 1;
+ exit_base = data->base;
+ event_base_dispatch(data->base);
+ /* Okay, now the renegotiation is done. Make new
+ * bufferevents to test opening in BUFFEREVENT_SSL_OPEN */
+ flags |= BEV_OPT_CLOSE_ON_FREE;
+ bufferevent_free(bev1);
+ bufferevent_free(bev2);
+ bev1 = bev2 = NULL;
+ open_ssl_bufevs(&bev1, &bev2, data->base, 1, flags, ssl1, ssl2,
+ fd_pair, bev_ll);
+ }
+
+ bufferevent_enable(bev1, EV_READ|EV_WRITE);
+ bufferevent_enable(bev2, EV_READ|EV_WRITE);
+
+ evbuffer_add_printf(bufferevent_get_output(bev1), "1\n");
+
+ event_base_dispatch(data->base);
+
+ tt_assert(test_is_done == 1);
+ tt_assert(n_connected == 2);
+
+ /* We don't handle shutdown properly yet.
+ tt_int_op(got_close, ==, 1);
+ tt_int_op(got_error, ==, 0);
+ */
+end:
+ return;
+}
+
+static void
+acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
+ struct sockaddr *addr, int socklen, void *arg)
+{
+ struct basic_test_data *data = arg;
+ struct bufferevent *bev;
+ SSL *ssl = SSL_new(get_ssl_ctx());
+
+ SSL_use_certificate(ssl, getcert());
+ SSL_use_PrivateKey(ssl, getkey());
+
+ bev = bufferevent_openssl_socket_new(
+ data->base,
+ fd,
+ ssl,
+ BUFFEREVENT_SSL_ACCEPTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+
+ bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
+ (void*)"server");
+
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+
+ /* Only accept once, then disable ourself. */
+ evconnlistener_disable(listener);
+}
+
+static void
+regress_bufferevent_openssl_connect(void *arg)
+{
+ struct basic_test_data *data = arg;
+
+ struct event_base *base = data->base;
+
+ struct evconnlistener *listener;
+ struct bufferevent *bev;
+ struct sockaddr_in sin;
+ struct sockaddr_storage ss;
+ ev_socklen_t slen;
+
+ init_ssl();
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+
+ memset(&ss, 0, sizeof(ss));
+ slen = sizeof(ss);
+
+ listener = evconnlistener_new_bind(base, acceptcb, data,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
+ -1, (struct sockaddr *)&sin, sizeof(sin));
+
+ tt_assert(listener);
+ tt_assert(evconnlistener_get_fd(listener) >= 0);
+
+ bev = bufferevent_openssl_socket_new(
+ data->base, -1, SSL_new(get_ssl_ctx()),
+ BUFFEREVENT_SSL_CONNECTING,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
+ tt_assert(bev);
+
+ bufferevent_setcb(bev, respond_to_number, NULL, eventcb,
+ (void*)"client");
+
+ tt_assert(getsockname(evconnlistener_get_fd(listener),
+ (struct sockaddr*)&ss, &slen) == 0);
+ tt_assert(slen == sizeof(struct sockaddr_in));
+ tt_int_op(((struct sockaddr*)&ss)->sa_family, ==, AF_INET);
+ tt_int_op(((struct sockaddr*)&ss)->sa_family, ==, AF_INET);
+
+ tt_assert(0 ==
+ bufferevent_socket_connect(bev, (struct sockaddr*)&ss, slen));
+ evbuffer_add_printf(bufferevent_get_output(bev), "1\n");
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+
+ event_base_dispatch(base);
+end:
+ ;
+}
+
+struct testcase_t ssl_testcases[] = {
+
+ { "bufferevent_socketpair", regress_bufferevent_openssl, TT_ISOLATED,
+ &basic_setup, (void*)"socketpair" },
+ { "bufferevent_filter", regress_bufferevent_openssl,
+ TT_ISOLATED,
+ &basic_setup, (void*)"filter" },
+ { "bufferevent_renegotiate_socketpair", regress_bufferevent_openssl,
+ TT_ISOLATED,
+ &basic_setup, (void*)"socketpair renegotiate" },
+ { "bufferevent_renegotiate_filter", regress_bufferevent_openssl,
+ TT_ISOLATED,
+ &basic_setup, (void*)"filter renegotiate" },
+ { "bufferevent_socketpair_startopen", regress_bufferevent_openssl,
+ TT_ISOLATED, &basic_setup, (void*)"socketpair open" },
+ { "bufferevent_filter_startopen", regress_bufferevent_openssl,
+ TT_ISOLATED, &basic_setup, (void*)"filter open" },
+
+ { "bufferevent_connect", regress_bufferevent_openssl_connect,
+ TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
+ END_OF_TESTCASES,
+};
diff --git a/sntp/libevent/test/regress_testutils.c b/sntp/libevent/test/regress_testutils.c
new file mode 100644
index 000000000000..1f0046031fd4
--- /dev/null
+++ b/sntp/libevent/test/regress_testutils.c
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2010-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#include <ws2tcpip.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <sys/queue.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <signal.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/dns.h"
+#include "event2/dns_struct.h"
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/util.h"
+#include "event2/listener.h"
+#include "event2/bufferevent.h"
+#include "log-internal.h"
+#include "regress.h"
+#include "regress_testutils.h"
+
+/* globals */
+static struct evdns_server_port *dns_port;
+evutil_socket_t dns_sock = -1;
+
+/* Helper: return the port that a socket is bound on, in host order. */
+int
+regress_get_socket_port(evutil_socket_t fd)
+{
+ struct sockaddr_storage ss;
+ ev_socklen_t socklen = sizeof(ss);
+ if (getsockname(fd, (struct sockaddr*)&ss, &socklen) != 0)
+ return -1;
+ if (ss.ss_family == AF_INET)
+ return ntohs( ((struct sockaddr_in*)&ss)->sin_port);
+ else if (ss.ss_family == AF_INET6)
+ return ntohs( ((struct sockaddr_in6*)&ss)->sin6_port);
+ else
+ return -1;
+}
+
+struct evdns_server_port *
+regress_get_dnsserver(struct event_base *base,
+ ev_uint16_t *portnum,
+ evutil_socket_t *psock,
+ evdns_request_callback_fn_type cb,
+ void *arg)
+{
+ struct evdns_server_port *port = NULL;
+ evutil_socket_t sock;
+ struct sockaddr_in my_addr;
+
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sock < 0) {
+ tt_abort_perror("socket");
+ }
+
+ evutil_make_socket_nonblocking(sock);
+
+ memset(&my_addr, 0, sizeof(my_addr));
+ my_addr.sin_family = AF_INET;
+ my_addr.sin_port = htons(*portnum);
+ my_addr.sin_addr.s_addr = htonl(0x7f000001UL);
+ if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr)) < 0) {
+ evutil_closesocket(sock);
+ tt_abort_perror("bind");
+ }
+ port = evdns_add_server_port_with_base(base, sock, 0, cb, arg);
+ if (!*portnum)
+ *portnum = regress_get_socket_port(sock);
+ if (psock)
+ *psock = sock;
+
+ return port;
+end:
+ return NULL;
+}
+
+void
+regress_clean_dnsserver(void)
+{
+ if (dns_port)
+ evdns_close_server_port(dns_port);
+ if (dns_sock >= 0)
+ evutil_closesocket(dns_sock);
+}
+
+void
+regress_dns_server_cb(struct evdns_server_request *req, void *data)
+{
+ struct regress_dns_server_table *tab = data;
+ const char *question;
+
+ if (req->nquestions != 1)
+ TT_DIE(("Only handling one question at a time; got %d",
+ req->nquestions));
+
+ question = req->questions[0]->name;
+
+ while (tab->q && evutil_ascii_strcasecmp(question, tab->q) &&
+ strcmp("*", tab->q))
+ ++tab;
+ if (tab->q == NULL)
+ TT_DIE(("Unexpected question: '%s'", question));
+
+ ++tab->seen;
+
+ if (!strcmp(tab->anstype, "err")) {
+ int err = atoi(tab->ans);
+ tt_assert(! evdns_server_request_respond(req, err));
+ return;
+ } else if (!strcmp(tab->anstype, "errsoa")) {
+ int err = atoi(tab->ans);
+ char soa_record[] =
+ "\x04" "dns1" "\x05" "icann" "\x03" "org" "\0"
+ "\x0a" "hostmaster" "\x05" "icann" "\x03" "org" "\0"
+ "\x77\xde\x5e\xba" /* serial */
+ "\x00\x00\x1c\x20" /* refreshtime = 2h */
+ "\x00\x00\x0e\x10" /* retry = 1h */
+ "\x00\x12\x75\x00" /* expiration = 14d */
+ "\x00\x00\x0e\x10" /* min.ttl = 1h */
+ ;
+ evdns_server_request_add_reply(
+ req, EVDNS_AUTHORITY_SECTION,
+ "example.com", EVDNS_TYPE_SOA, EVDNS_CLASS_INET,
+ 42, sizeof(soa_record) - 1, 0, soa_record);
+ tt_assert(! evdns_server_request_respond(req, err));
+ return;
+ } else if (!strcmp(tab->anstype, "A")) {
+ struct in_addr in;
+ if (!evutil_inet_pton(AF_INET, tab->ans, &in)) {
+ TT_DIE(("Bad A value %s in table", tab->ans));
+ }
+ evdns_server_request_add_a_reply(req, question, 1, &in.s_addr,
+ 100);
+ } else if (!strcmp(tab->anstype, "AAAA")) {
+ struct in6_addr in6;
+ if (!evutil_inet_pton(AF_INET6, tab->ans, &in6)) {
+ TT_DIE(("Bad AAAA value %s in table", tab->ans));
+ }
+ evdns_server_request_add_aaaa_reply(req,
+ question, 1, &in6.s6_addr, 100);
+ } else {
+ TT_DIE(("Weird table entry with type '%s'", tab->anstype));
+ }
+ tt_assert(! evdns_server_request_respond(req, 0))
+ return;
+end:
+ tt_want(! evdns_server_request_drop(req));
+}
+
+int
+regress_dnsserver(struct event_base *base, ev_uint16_t *port,
+ struct regress_dns_server_table *search_table)
+{
+ dns_port = regress_get_dnsserver(base, port, &dns_sock,
+ regress_dns_server_cb, search_table);
+ return dns_port != NULL;
+}
+
+int
+regress_get_listener_addr(struct evconnlistener *lev,
+ struct sockaddr *sa, ev_socklen_t *socklen)
+{
+ evutil_socket_t s = evconnlistener_get_fd(lev);
+ if (s <= 0)
+ return -1;
+ return getsockname(s, sa, socklen);
+}
diff --git a/sntp/libevent/test/regress_testutils.h b/sntp/libevent/test/regress_testutils.h
new file mode 100644
index 000000000000..f90b9c997ab5
--- /dev/null
+++ b/sntp/libevent/test/regress_testutils.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2010-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 REGRESS_TESTUTILS_H_INCLUDED_
+#define REGRESS_TESTUTILS_H_INCLUDED_
+
+#include "event2/dns.h"
+
+struct regress_dns_server_table {
+ const char *q;
+ const char *anstype;
+ const char *ans;
+ int seen;
+};
+
+struct evdns_server_port *
+regress_get_dnsserver(struct event_base *base,
+ ev_uint16_t *portnum,
+ evutil_socket_t *psock,
+ evdns_request_callback_fn_type cb,
+ void *arg);
+
+/* Helper: return the port that a socket is bound on, in host order. */
+int regress_get_socket_port(evutil_socket_t fd);
+
+/* used to look up pre-canned responses in a search table */
+void regress_dns_server_cb(
+ struct evdns_server_request *req, void *data);
+
+/* globally allocates a dns server that serves from a search table */
+int regress_dnsserver(struct event_base *base, ev_uint16_t *port,
+ struct regress_dns_server_table *seach_table);
+
+/* clean up the global dns server resources */
+void regress_clean_dnsserver(void);
+
+struct evconnlistener;
+struct sockaddr;
+int regress_get_listener_addr(struct evconnlistener *lev,
+ struct sockaddr *sa, ev_socklen_t *socklen);
+
+#endif /* REGRESS_TESTUTILS_H_INCLUDED_ */
+
diff --git a/sntp/libevent/test/regress_thread.c b/sntp/libevent/test/regress_thread.c
new file mode 100644
index 000000000000..612bf1d6111f
--- /dev/null
+++ b/sntp/libevent/test/regress_thread.c
@@ -0,0 +1,584 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+
+/* The old tests here need assertions to work. */
+#undef NDEBUG
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifdef EVENT__HAVE_PTHREADS
+#include <pthread.h>
+#elif defined(_WIN32)
+#include <process.h>
+#endif
+#include <assert.h>
+#ifdef EVENT__HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <time.h>
+
+#include "sys/queue.h"
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/thread.h"
+#include "event2/util.h"
+#include "evthread-internal.h"
+#include "event-internal.h"
+#include "defer-internal.h"
+#include "regress.h"
+#include "tinytest_macros.h"
+#include "time-internal.h"
+#include "regress_thread.h"
+
+struct cond_wait {
+ void *lock;
+ void *cond;
+};
+
+static void
+wake_all_timeout(evutil_socket_t fd, short what, void *arg)
+{
+ struct cond_wait *cw = arg;
+ EVLOCK_LOCK(cw->lock, 0);
+ EVTHREAD_COND_BROADCAST(cw->cond);
+ EVLOCK_UNLOCK(cw->lock, 0);
+
+}
+
+static void
+wake_one_timeout(evutil_socket_t fd, short what, void *arg)
+{
+ struct cond_wait *cw = arg;
+ EVLOCK_LOCK(cw->lock, 0);
+ EVTHREAD_COND_SIGNAL(cw->cond);
+ EVLOCK_UNLOCK(cw->lock, 0);
+}
+
+#define NUM_THREADS 100
+#define NUM_ITERATIONS 100
+void *count_lock;
+static int count;
+
+static THREAD_FN
+basic_thread(void *arg)
+{
+ struct cond_wait cw;
+ struct event_base *base = arg;
+ struct event ev;
+ int i = 0;
+
+ EVTHREAD_ALLOC_LOCK(cw.lock, 0);
+ EVTHREAD_ALLOC_COND(cw.cond);
+ assert(cw.lock);
+ assert(cw.cond);
+
+ evtimer_assign(&ev, base, wake_all_timeout, &cw);
+ for (i = 0; i < NUM_ITERATIONS; i++) {
+ struct timeval tv;
+ evutil_timerclear(&tv);
+ tv.tv_sec = 0;
+ tv.tv_usec = 3000;
+
+ EVLOCK_LOCK(cw.lock, 0);
+ /* we need to make sure that event does not happen before
+ * we get to wait on the conditional variable */
+ assert(evtimer_add(&ev, &tv) == 0);
+
+ assert(EVTHREAD_COND_WAIT(cw.cond, cw.lock) == 0);
+ EVLOCK_UNLOCK(cw.lock, 0);
+
+ EVLOCK_LOCK(count_lock, 0);
+ ++count;
+ EVLOCK_UNLOCK(count_lock, 0);
+ }
+
+ /* exit the loop only if all threads fired all timeouts */
+ EVLOCK_LOCK(count_lock, 0);
+ if (count >= NUM_THREADS * NUM_ITERATIONS)
+ event_base_loopexit(base, NULL);
+ EVLOCK_UNLOCK(count_lock, 0);
+
+ EVTHREAD_FREE_LOCK(cw.lock, 0);
+ EVTHREAD_FREE_COND(cw.cond);
+
+ THREAD_RETURN();
+}
+
+static int notification_fd_used = 0;
+#ifndef _WIN32
+static int got_sigchld = 0;
+static void
+sigchld_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval tv;
+ struct event_base *base = arg;
+
+ got_sigchld++;
+ tv.tv_usec = 100000;
+ tv.tv_sec = 0;
+ event_base_loopexit(base, &tv);
+}
+
+
+static void
+notify_fd_cb(evutil_socket_t fd, short event, void *arg)
+{
+ ++notification_fd_used;
+}
+#endif
+
+static void
+thread_basic(void *arg)
+{
+ THREAD_T threads[NUM_THREADS];
+ struct event ev;
+ struct timeval tv;
+ int i;
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+
+ struct event *notification_event = NULL;
+ struct event *sigchld_event = NULL;
+
+ EVTHREAD_ALLOC_LOCK(count_lock, 0);
+ tt_assert(count_lock);
+
+ tt_assert(base);
+ if (evthread_make_base_notifiable(base)<0) {
+ tt_abort_msg("Couldn't make base notifiable!");
+ }
+
+#ifndef _WIN32
+ if (data->setup_data && !strcmp(data->setup_data, "forking")) {
+ pid_t pid;
+ int status;
+ sigchld_event = evsignal_new(base, SIGCHLD, sigchld_cb, base);
+ /* This piggybacks on the th_notify_fd weirdly, and looks
+ * inside libevent internals. Not a good idea in non-testing
+ * code! */
+ notification_event = event_new(base,
+ base->th_notify_fd[0], EV_READ|EV_PERSIST, notify_fd_cb,
+ NULL);
+ event_add(sigchld_event, NULL);
+ event_add(notification_event, NULL);
+
+ if ((pid = fork()) == 0) {
+ event_del(notification_event);
+ if (event_reinit(base) < 0) {
+ TT_FAIL(("reinit"));
+ exit(1);
+ }
+ event_assign(notification_event, base,
+ base->th_notify_fd[0], EV_READ|EV_PERSIST,
+ notify_fd_cb, NULL);
+ event_add(notification_event, NULL);
+ goto child;
+ }
+
+ event_base_dispatch(base);
+
+ if (waitpid(pid, &status, 0) == -1)
+ tt_abort_perror("waitpid");
+ TT_BLATHER(("Waitpid okay\n"));
+
+ tt_assert(got_sigchld);
+ tt_int_op(notification_fd_used, ==, 0);
+
+ goto end;
+ }
+
+child:
+#endif
+ for (i = 0; i < NUM_THREADS; ++i)
+ THREAD_START(threads[i], basic_thread, base);
+
+ evtimer_assign(&ev, base, NULL, NULL);
+ evutil_timerclear(&tv);
+ tv.tv_sec = 1000;
+ event_add(&ev, &tv);
+
+ event_base_dispatch(base);
+
+ for (i = 0; i < NUM_THREADS; ++i)
+ THREAD_JOIN(threads[i]);
+
+ event_del(&ev);
+
+ tt_int_op(count, ==, NUM_THREADS * NUM_ITERATIONS);
+
+ EVTHREAD_FREE_LOCK(count_lock, 0);
+
+ TT_BLATHER(("notifiations==%d", notification_fd_used));
+
+end:
+
+ if (notification_event)
+ event_free(notification_event);
+ if (sigchld_event)
+ event_free(sigchld_event);
+}
+
+#undef NUM_THREADS
+#define NUM_THREADS 10
+
+struct alerted_record {
+ struct cond_wait *cond;
+ struct timeval delay;
+ struct timeval alerted_at;
+ int timed_out;
+};
+
+static THREAD_FN
+wait_for_condition(void *arg)
+{
+ struct alerted_record *rec = arg;
+ int r;
+
+ EVLOCK_LOCK(rec->cond->lock, 0);
+ if (rec->delay.tv_sec || rec->delay.tv_usec) {
+ r = EVTHREAD_COND_WAIT_TIMED(rec->cond->cond, rec->cond->lock,
+ &rec->delay);
+ } else {
+ r = EVTHREAD_COND_WAIT(rec->cond->cond, rec->cond->lock);
+ }
+ EVLOCK_UNLOCK(rec->cond->lock, 0);
+
+ evutil_gettimeofday(&rec->alerted_at, NULL);
+ if (r == 1)
+ rec->timed_out = 1;
+
+ THREAD_RETURN();
+}
+
+static void
+thread_conditions_simple(void *arg)
+{
+ struct timeval tv_signal, tv_timeout, tv_broadcast;
+ struct alerted_record alerted[NUM_THREADS];
+ THREAD_T threads[NUM_THREADS];
+ struct cond_wait cond;
+ int i;
+ struct timeval launched_at;
+ struct event wake_one;
+ struct event wake_all;
+ struct basic_test_data *data = arg;
+ struct event_base *base = data->base;
+ int n_timed_out=0, n_signal=0, n_broadcast=0;
+
+ tv_signal.tv_sec = tv_timeout.tv_sec = tv_broadcast.tv_sec = 0;
+ tv_signal.tv_usec = 30*1000;
+ tv_timeout.tv_usec = 150*1000;
+ tv_broadcast.tv_usec = 500*1000;
+
+ EVTHREAD_ALLOC_LOCK(cond.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
+ EVTHREAD_ALLOC_COND(cond.cond);
+ tt_assert(cond.lock);
+ tt_assert(cond.cond);
+ for (i = 0; i < NUM_THREADS; ++i) {
+ memset(&alerted[i], 0, sizeof(struct alerted_record));
+ alerted[i].cond = &cond;
+ }
+
+ /* Threads 5 and 6 will be allowed to time out */
+ memcpy(&alerted[5].delay, &tv_timeout, sizeof(tv_timeout));
+ memcpy(&alerted[6].delay, &tv_timeout, sizeof(tv_timeout));
+
+ evtimer_assign(&wake_one, base, wake_one_timeout, &cond);
+ evtimer_assign(&wake_all, base, wake_all_timeout, &cond);
+
+ evutil_gettimeofday(&launched_at, NULL);
+
+ /* Launch the threads... */
+ for (i = 0; i < NUM_THREADS; ++i) {
+ THREAD_START(threads[i], wait_for_condition, &alerted[i]);
+ }
+
+ /* Start the timers... */
+ tt_int_op(event_add(&wake_one, &tv_signal), ==, 0);
+ tt_int_op(event_add(&wake_all, &tv_broadcast), ==, 0);
+
+ /* And run for a bit... */
+ event_base_dispatch(base);
+
+ /* And wait till the threads are done. */
+ for (i = 0; i < NUM_THREADS; ++i)
+ THREAD_JOIN(threads[i]);
+
+ /* Now, let's see what happened. At least one of 5 or 6 should
+ * have timed out. */
+ n_timed_out = alerted[5].timed_out + alerted[6].timed_out;
+ tt_int_op(n_timed_out, >=, 1);
+ tt_int_op(n_timed_out, <=, 2);
+
+ for (i = 0; i < NUM_THREADS; ++i) {
+ const struct timeval *target_delay;
+ struct timeval target_time, actual_delay;
+ if (alerted[i].timed_out) {
+ TT_BLATHER(("%d looks like a timeout\n", i));
+ target_delay = &tv_timeout;
+ tt_assert(i == 5 || i == 6);
+ } else if (evutil_timerisset(&alerted[i].alerted_at)) {
+ long diff1,diff2;
+ evutil_timersub(&alerted[i].alerted_at,
+ &launched_at, &actual_delay);
+ diff1 = timeval_msec_diff(&actual_delay,
+ &tv_signal);
+ diff2 = timeval_msec_diff(&actual_delay,
+ &tv_broadcast);
+ if (abs(diff1) < abs(diff2)) {
+ TT_BLATHER(("%d looks like a signal\n", i));
+ target_delay = &tv_signal;
+ ++n_signal;
+ } else {
+ TT_BLATHER(("%d looks like a broadcast\n", i));
+ target_delay = &tv_broadcast;
+ ++n_broadcast;
+ }
+ } else {
+ TT_FAIL(("Thread %d never got woken", i));
+ continue;
+ }
+ evutil_timeradd(target_delay, &launched_at, &target_time);
+ test_timeval_diff_leq(&target_time, &alerted[i].alerted_at,
+ 0, 50);
+ }
+ tt_int_op(n_broadcast + n_signal + n_timed_out, ==, NUM_THREADS);
+ tt_int_op(n_signal, ==, 1);
+
+end:
+ ;
+}
+
+#define CB_COUNT 128
+#define QUEUE_THREAD_COUNT 8
+
+static void
+SLEEP_MS(int ms)
+{
+ struct timeval tv;
+ tv.tv_sec = ms/1000;
+ tv.tv_usec = (ms%1000)*1000;
+ evutil_usleep_(&tv);
+}
+
+struct deferred_test_data {
+ struct event_callback cbs[CB_COUNT];
+ struct event_base *queue;
+};
+
+static struct timeval timer_start = {0,0};
+static struct timeval timer_end = {0,0};
+static unsigned callback_count = 0;
+static THREAD_T load_threads[QUEUE_THREAD_COUNT];
+static struct deferred_test_data deferred_data[QUEUE_THREAD_COUNT];
+
+static void
+deferred_callback(struct event_callback *cb, void *arg)
+{
+ SLEEP_MS(1);
+ callback_count += 1;
+}
+
+static THREAD_FN
+load_deferred_queue(void *arg)
+{
+ struct deferred_test_data *data = arg;
+ size_t i;
+
+ for (i = 0; i < CB_COUNT; ++i) {
+ event_deferred_cb_init_(&data->cbs[i], 0, deferred_callback,
+ NULL);
+ event_deferred_cb_schedule_(data->queue, &data->cbs[i]);
+ SLEEP_MS(1);
+ }
+
+ THREAD_RETURN();
+}
+
+static void
+timer_callback(evutil_socket_t fd, short what, void *arg)
+{
+ evutil_gettimeofday(&timer_end, NULL);
+}
+
+static void
+start_threads_callback(evutil_socket_t fd, short what, void *arg)
+{
+ int i;
+
+ for (i = 0; i < QUEUE_THREAD_COUNT; ++i) {
+ THREAD_START(load_threads[i], load_deferred_queue,
+ &deferred_data[i]);
+ }
+}
+
+static void
+thread_deferred_cb_skew(void *arg)
+{
+ struct timeval tv_timer = {1, 0};
+ struct event_base *base = NULL;
+ struct event_config *cfg = NULL;
+ struct timeval elapsed;
+ int elapsed_usec;
+ int i;
+
+ cfg = event_config_new();
+ tt_assert(cfg);
+ event_config_set_max_dispatch_interval(cfg, NULL, 16, 0);
+
+ base = event_base_new_with_config(cfg);
+ tt_assert(base);
+
+ for (i = 0; i < QUEUE_THREAD_COUNT; ++i)
+ deferred_data[i].queue = base;
+
+ evutil_gettimeofday(&timer_start, NULL);
+ event_base_once(base, -1, EV_TIMEOUT, timer_callback, NULL,
+ &tv_timer);
+ event_base_once(base, -1, EV_TIMEOUT, start_threads_callback,
+ NULL, NULL);
+ event_base_dispatch(base);
+
+ evutil_timersub(&timer_end, &timer_start, &elapsed);
+ TT_BLATHER(("callback count, %u", callback_count));
+ elapsed_usec =
+ (unsigned)(elapsed.tv_sec*1000000 + elapsed.tv_usec);
+ TT_BLATHER(("elapsed time, %u usec", elapsed_usec));
+
+ /* XXX be more intelligent here. just make sure skew is
+ * within .4 seconds for now. */
+ tt_assert(elapsed_usec >= 600000 && elapsed_usec <= 1400000);
+
+end:
+ for (i = 0; i < QUEUE_THREAD_COUNT; ++i)
+ THREAD_JOIN(load_threads[i]);
+ if (base)
+ event_base_free(base);
+ if (cfg)
+ event_config_free(cfg);
+}
+
+static struct event time_events[5];
+static struct timeval times[5];
+static struct event_base *exit_base = NULL;
+static void
+note_time_cb(evutil_socket_t fd, short what, void *arg)
+{
+ evutil_gettimeofday(arg, NULL);
+ if (arg == &times[4]) {
+ event_base_loopbreak(exit_base);
+ }
+}
+static THREAD_FN
+register_events_subthread(void *arg)
+{
+ struct timeval tv = {0,0};
+ SLEEP_MS(100);
+ event_active(&time_events[0], EV_TIMEOUT, 1);
+ SLEEP_MS(100);
+ event_active(&time_events[1], EV_TIMEOUT, 1);
+ SLEEP_MS(100);
+ tv.tv_usec = 100*1000;
+ event_add(&time_events[2], &tv);
+ tv.tv_usec = 150*1000;
+ event_add(&time_events[3], &tv);
+ SLEEP_MS(200);
+ event_active(&time_events[4], EV_TIMEOUT, 1);
+
+ THREAD_RETURN();
+}
+
+static void
+thread_no_events(void *arg)
+{
+ THREAD_T thread;
+ struct basic_test_data *data = arg;
+ struct timeval starttime, endtime;
+ int i;
+ exit_base = data->base;
+
+ memset(times,0,sizeof(times));
+ for (i=0;i<5;++i) {
+ event_assign(&time_events[i], data->base,
+ -1, 0, note_time_cb, &times[i]);
+ }
+
+ evutil_gettimeofday(&starttime, NULL);
+ THREAD_START(thread, register_events_subthread, data->base);
+ event_base_loop(data->base, EVLOOP_NO_EXIT_ON_EMPTY);
+ evutil_gettimeofday(&endtime, NULL);
+ tt_assert(event_base_got_break(data->base));
+ THREAD_JOIN(thread);
+ for (i=0; i<5; ++i) {
+ struct timeval diff;
+ double sec;
+ evutil_timersub(&times[i], &starttime, &diff);
+ sec = diff.tv_sec + diff.tv_usec/1.0e6;
+ TT_BLATHER(("event %d at %.4f seconds", i, sec));
+ }
+ test_timeval_diff_eq(&starttime, &times[0], 100);
+ test_timeval_diff_eq(&starttime, &times[1], 200);
+ test_timeval_diff_eq(&starttime, &times[2], 400);
+ test_timeval_diff_eq(&starttime, &times[3], 450);
+ test_timeval_diff_eq(&starttime, &times[4], 500);
+ test_timeval_diff_eq(&starttime, &endtime, 500);
+
+end:
+ ;
+}
+
+#define TEST(name) \
+ { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE, \
+ &basic_setup, NULL }
+
+struct testcase_t thread_testcases[] = {
+ { "basic", thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE,
+ &basic_setup, NULL },
+#ifndef _WIN32
+ { "forking", thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE,
+ &basic_setup, (char*)"forking" },
+#endif
+ TEST(conditions_simple),
+ { "deferred_cb_skew", thread_deferred_cb_skew,
+ TT_FORK|TT_NEED_THREADS|TT_OFF_BY_DEFAULT,
+ &basic_setup, NULL },
+ TEST(no_events),
+ END_OF_TESTCASES
+};
+
diff --git a/sntp/libevent/test/regress_thread.h b/sntp/libevent/test/regress_thread.h
new file mode 100644
index 000000000000..831b51e50739
--- /dev/null
+++ b/sntp/libevent/test/regress_thread.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 REGRESS_THREAD_H_INCLUDED_
+#define REGRESS_THREAD_H_INCLUDED_
+
+#ifdef EVENT__HAVE_PTHREADS
+#define THREAD_T pthread_t
+#define THREAD_FN void *
+#define THREAD_RETURN() return (NULL)
+#define THREAD_START(threadvar, fn, arg) \
+ pthread_create(&(threadvar), NULL, fn, arg)
+#define THREAD_JOIN(th) pthread_join(th, NULL)
+#else
+#define THREAD_T HANDLE
+#define THREAD_FN unsigned __stdcall
+#define THREAD_RETURN() return (0)
+#define THREAD_START(threadvar, fn, arg) do { \
+ uintptr_t threadhandle = _beginthreadex(NULL,0,fn,(arg),0,NULL); \
+ (threadvar) = (HANDLE) threadhandle; \
+ } while (0)
+#define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE)
+#endif
+
+#endif
diff --git a/sntp/libevent/test/regress_util.c b/sntp/libevent/test/regress_util.c
new file mode 100644
index 000000000000..d64d002495ab
--- /dev/null
+++ b/sntp/libevent/test/regress_util.c
@@ -0,0 +1,1411 @@
+/*
+ * Copyright (c) 2009-2012 Nick Mathewson and Niels Provos
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../util-internal.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#include <ws2tcpip.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN6_H
+#include <netinet/in6.h>
+#endif
+#ifdef EVENT__HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "event2/event.h"
+#include "event2/util.h"
+#include "../ipv6-internal.h"
+#include "../log-internal.h"
+#include "../strlcpy-internal.h"
+#include "../mm-internal.h"
+#include "../time-internal.h"
+
+#include "regress.h"
+
+enum entry_status { NORMAL, CANONICAL, BAD };
+
+/* This is a big table of results we expect from generating and parsing */
+static struct ipv4_entry {
+ const char *addr;
+ ev_uint32_t res;
+ enum entry_status status;
+} ipv4_entries[] = {
+ { "1.2.3.4", 0x01020304u, CANONICAL },
+ { "255.255.255.255", 0xffffffffu, CANONICAL },
+ { "256.0.0.0", 0, BAD },
+ { "ABC", 0, BAD },
+ { "1.2.3.4.5", 0, BAD },
+ { "176.192.208.244", 0xb0c0d0f4, CANONICAL },
+ { NULL, 0, BAD },
+};
+
+static struct ipv6_entry {
+ const char *addr;
+ ev_uint32_t res[4];
+ enum entry_status status;
+} ipv6_entries[] = {
+ { "::", { 0, 0, 0, 0, }, CANONICAL },
+ { "0:0:0:0:0:0:0:0", { 0, 0, 0, 0, }, NORMAL },
+ { "::1", { 0, 0, 0, 1, }, CANONICAL },
+ { "::1.2.3.4", { 0, 0, 0, 0x01020304, }, CANONICAL },
+ { "ffff:1::", { 0xffff0001u, 0, 0, 0, }, CANONICAL },
+ { "ffff:0000::", { 0xffff0000u, 0, 0, 0, }, NORMAL },
+ { "ffff::1234", { 0xffff0000u, 0, 0, 0x1234, }, CANONICAL },
+ { "0102::1.2.3.4", {0x01020000u, 0, 0, 0x01020304u }, NORMAL },
+ { "::9:c0a8:1:1", { 0, 0, 0x0009c0a8u, 0x00010001u }, CANONICAL },
+ { "::ffff:1.2.3.4", { 0, 0, 0x000ffffu, 0x01020304u }, CANONICAL },
+ { "FFFF::", { 0xffff0000u, 0, 0, 0 }, NORMAL },
+ { "foobar.", { 0, 0, 0, 0 }, BAD },
+ { "foobar", { 0, 0, 0, 0 }, BAD },
+ { "fo:obar", { 0, 0, 0, 0 }, BAD },
+ { "ffff", { 0, 0, 0, 0 }, BAD },
+ { "fffff::", { 0, 0, 0, 0 }, BAD },
+ { "fffff::", { 0, 0, 0, 0 }, BAD },
+ { "::1.0.1.1000", { 0, 0, 0, 0 }, BAD },
+ { "1:2:33333:4::", { 0, 0, 0, 0 }, BAD },
+ { "1:2:3:4:5:6:7:8:9", { 0, 0, 0, 0 }, BAD },
+ { "1::2::3", { 0, 0, 0, 0 }, BAD },
+ { ":::1", { 0, 0, 0, 0 }, BAD },
+ { NULL, { 0, 0, 0, 0, }, BAD },
+};
+
+static void
+regress_ipv4_parse(void *ptr)
+{
+ int i;
+ for (i = 0; ipv4_entries[i].addr; ++i) {
+ char written[128];
+ struct ipv4_entry *ent = &ipv4_entries[i];
+ struct in_addr in;
+ int r;
+ r = evutil_inet_pton(AF_INET, ent->addr, &in);
+ if (r == 0) {
+ if (ent->status != BAD) {
+ TT_FAIL(("%s did not parse, but it's a good address!",
+ ent->addr));
+ }
+ continue;
+ }
+ if (ent->status == BAD) {
+ TT_FAIL(("%s parsed, but we expected an error", ent->addr));
+ continue;
+ }
+ if (ntohl(in.s_addr) != ent->res) {
+ TT_FAIL(("%s parsed to %lx, but we expected %lx", ent->addr,
+ (unsigned long)ntohl(in.s_addr),
+ (unsigned long)ent->res));
+ continue;
+ }
+ if (ent->status == CANONICAL) {
+ const char *w = evutil_inet_ntop(AF_INET, &in, written,
+ sizeof(written));
+ if (!w) {
+ TT_FAIL(("Tried to write out %s; got NULL.", ent->addr));
+ continue;
+ }
+ if (strcmp(written, ent->addr)) {
+ TT_FAIL(("Tried to write out %s; got %s",
+ ent->addr, written));
+ continue;
+ }
+ }
+
+ }
+
+}
+
+static void
+regress_ipv6_parse(void *ptr)
+{
+#ifdef AF_INET6
+ int i, j;
+
+ for (i = 0; ipv6_entries[i].addr; ++i) {
+ char written[128];
+ struct ipv6_entry *ent = &ipv6_entries[i];
+ struct in6_addr in6;
+ int r;
+ r = evutil_inet_pton(AF_INET6, ent->addr, &in6);
+ if (r == 0) {
+ if (ent->status != BAD)
+ TT_FAIL(("%s did not parse, but it's a good address!",
+ ent->addr));
+ continue;
+ }
+ if (ent->status == BAD) {
+ TT_FAIL(("%s parsed, but we expected an error", ent->addr));
+ continue;
+ }
+ for (j = 0; j < 4; ++j) {
+ /* Can't use s6_addr32 here; some don't have it. */
+ ev_uint32_t u =
+ (in6.s6_addr[j*4 ] << 24) |
+ (in6.s6_addr[j*4+1] << 16) |
+ (in6.s6_addr[j*4+2] << 8) |
+ (in6.s6_addr[j*4+3]);
+ if (u != ent->res[j]) {
+ TT_FAIL(("%s did not parse as expected.", ent->addr));
+ continue;
+ }
+ }
+ if (ent->status == CANONICAL) {
+ const char *w = evutil_inet_ntop(AF_INET6, &in6, written,
+ sizeof(written));
+ if (!w) {
+ TT_FAIL(("Tried to write out %s; got NULL.", ent->addr));
+ continue;
+ }
+ if (strcmp(written, ent->addr)) {
+ TT_FAIL(("Tried to write out %s; got %s", ent->addr, written));
+ continue;
+ }
+ }
+
+ }
+#else
+ TT_BLATHER(("Skipping IPv6 address parsing."));
+#endif
+}
+
+static struct sa_port_ent {
+ const char *parse;
+ int safamily;
+ const char *addr;
+ int port;
+} sa_port_ents[] = {
+ { "[ffff::1]:1000", AF_INET6, "ffff::1", 1000 },
+ { "[ffff::1]", AF_INET6, "ffff::1", 0 },
+ { "[ffff::1", 0, NULL, 0 },
+ { "[ffff::1]:65599", 0, NULL, 0 },
+ { "[ffff::1]:0", 0, NULL, 0 },
+ { "[ffff::1]:-1", 0, NULL, 0 },
+ { "::1", AF_INET6, "::1", 0 },
+ { "1:2::1", AF_INET6, "1:2::1", 0 },
+ { "192.168.0.1:50", AF_INET, "192.168.0.1", 50 },
+ { "1.2.3.4", AF_INET, "1.2.3.4", 0 },
+ { NULL, 0, NULL, 0 },
+};
+
+static void
+regress_sockaddr_port_parse(void *ptr)
+{
+ struct sockaddr_storage ss;
+ int i, r;
+
+ for (i = 0; sa_port_ents[i].parse; ++i) {
+ struct sa_port_ent *ent = &sa_port_ents[i];
+ int len = sizeof(ss);
+ memset(&ss, 0, sizeof(ss));
+ r = evutil_parse_sockaddr_port(ent->parse, (struct sockaddr*)&ss, &len);
+ if (r < 0) {
+ if (ent->safamily)
+ TT_FAIL(("Couldn't parse %s!", ent->parse));
+ continue;
+ } else if (! ent->safamily) {
+ TT_FAIL(("Shouldn't have been able to parse %s!", ent->parse));
+ continue;
+ }
+ if (ent->safamily == AF_INET) {
+ struct sockaddr_in sin;
+ memset(&sin, 0, sizeof(sin));
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+ sin.sin_len = sizeof(sin);
+#endif
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(ent->port);
+ r = evutil_inet_pton(AF_INET, ent->addr, &sin.sin_addr);
+ if (1 != r) {
+ TT_FAIL(("Couldn't parse ipv4 target %s.", ent->addr));
+ } else if (memcmp(&sin, &ss, sizeof(sin))) {
+ TT_FAIL(("Parse for %s was not as expected.", ent->parse));
+ } else if (len != sizeof(sin)) {
+ TT_FAIL(("Length for %s not as expected.",ent->parse));
+ }
+ } else {
+ struct sockaddr_in6 sin6;
+ memset(&sin6, 0, sizeof(sin6));
+#ifdef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
+ sin6.sin6_len = sizeof(sin6);
+#endif
+ sin6.sin6_family = AF_INET6;
+ sin6.sin6_port = htons(ent->port);
+ r = evutil_inet_pton(AF_INET6, ent->addr, &sin6.sin6_addr);
+ if (1 != r) {
+ TT_FAIL(("Couldn't parse ipv6 target %s.", ent->addr));
+ } else if (memcmp(&sin6, &ss, sizeof(sin6))) {
+ TT_FAIL(("Parse for %s was not as expected.", ent->parse));
+ } else if (len != sizeof(sin6)) {
+ TT_FAIL(("Length for %s not as expected.",ent->parse));
+ }
+ }
+ }
+}
+
+
+static void
+regress_sockaddr_port_format(void *ptr)
+{
+ struct sockaddr_storage ss;
+ int len;
+ const char *cp;
+ char cbuf[128];
+ int r;
+
+ len = sizeof(ss);
+ r = evutil_parse_sockaddr_port("192.168.1.1:80",
+ (struct sockaddr*)&ss, &len);
+ tt_int_op(r,==,0);
+ cp = evutil_format_sockaddr_port_(
+ (struct sockaddr*)&ss, cbuf, sizeof(cbuf));
+ tt_ptr_op(cp,==,cbuf);
+ tt_str_op(cp,==,"192.168.1.1:80");
+
+ len = sizeof(ss);
+ r = evutil_parse_sockaddr_port("[ff00::8010]:999",
+ (struct sockaddr*)&ss, &len);
+ tt_int_op(r,==,0);
+ cp = evutil_format_sockaddr_port_(
+ (struct sockaddr*)&ss, cbuf, sizeof(cbuf));
+ tt_ptr_op(cp,==,cbuf);
+ tt_str_op(cp,==,"[ff00::8010]:999");
+
+ ss.ss_family=99;
+ cp = evutil_format_sockaddr_port_(
+ (struct sockaddr*)&ss, cbuf, sizeof(cbuf));
+ tt_ptr_op(cp,==,cbuf);
+ tt_str_op(cp,==,"<addr with socktype 99>");
+end:
+ ;
+}
+
+static struct sa_pred_ent {
+ const char *parse;
+
+ int is_loopback;
+} sa_pred_entries[] = {
+ { "127.0.0.1", 1 },
+ { "127.0.3.2", 1 },
+ { "128.1.2.3", 0 },
+ { "18.0.0.1", 0 },
+ { "129.168.1.1", 0 },
+
+ { "::1", 1 },
+ { "::0", 0 },
+ { "f::1", 0 },
+ { "::501", 0 },
+ { NULL, 0 },
+
+};
+
+static void
+test_evutil_sockaddr_predicates(void *ptr)
+{
+ struct sockaddr_storage ss;
+ int r, i;
+
+ for (i=0; sa_pred_entries[i].parse; ++i) {
+ struct sa_pred_ent *ent = &sa_pred_entries[i];
+ int len = sizeof(ss);
+
+ r = evutil_parse_sockaddr_port(ent->parse, (struct sockaddr*)&ss, &len);
+
+ if (r<0) {
+ TT_FAIL(("Couldn't parse %s!", ent->parse));
+ continue;
+ }
+
+ /* sockaddr_is_loopback */
+ if (ent->is_loopback != evutil_sockaddr_is_loopback_((struct sockaddr*)&ss)) {
+ TT_FAIL(("evutil_sockaddr_loopback(%s) not as expected",
+ ent->parse));
+ }
+ }
+}
+
+static void
+test_evutil_strtoll(void *ptr)
+{
+ const char *s;
+ char *endptr;
+
+ tt_want(evutil_strtoll("5000000000", NULL, 10) ==
+ ((ev_int64_t)5000000)*1000);
+ tt_want(evutil_strtoll("-5000000000", NULL, 10) ==
+ ((ev_int64_t)5000000)*-1000);
+ s = " 99999stuff";
+ tt_want(evutil_strtoll(s, &endptr, 10) == (ev_int64_t)99999);
+ tt_want(endptr == s+6);
+ tt_want(evutil_strtoll("foo", NULL, 10) == 0);
+ }
+
+static void
+test_evutil_snprintf(void *ptr)
+{
+ char buf[16];
+ int r;
+ ev_uint64_t u64 = ((ev_uint64_t)1000000000)*200;
+ ev_int64_t i64 = -1 * (ev_int64_t) u64;
+ size_t size = 8000;
+ ev_ssize_t ssize = -9000;
+
+ r = evutil_snprintf(buf, sizeof(buf), "%d %d", 50, 100);
+ tt_str_op(buf, ==, "50 100");
+ tt_int_op(r, ==, 6);
+
+ r = evutil_snprintf(buf, sizeof(buf), "longish %d", 1234567890);
+ tt_str_op(buf, ==, "longish 1234567");
+ tt_int_op(r, ==, 18);
+
+ r = evutil_snprintf(buf, sizeof(buf), EV_U64_FMT, EV_U64_ARG(u64));
+ tt_str_op(buf, ==, "200000000000");
+ tt_int_op(r, ==, 12);
+
+ r = evutil_snprintf(buf, sizeof(buf), EV_I64_FMT, EV_I64_ARG(i64));
+ tt_str_op(buf, ==, "-200000000000");
+ tt_int_op(r, ==, 13);
+
+ r = evutil_snprintf(buf, sizeof(buf), EV_SIZE_FMT" "EV_SSIZE_FMT,
+ EV_SIZE_ARG(size), EV_SSIZE_ARG(ssize));
+ tt_str_op(buf, ==, "8000 -9000");
+ tt_int_op(r, ==, 10);
+
+ end:
+ ;
+}
+
+static void
+test_evutil_casecmp(void *ptr)
+{
+ tt_int_op(evutil_ascii_strcasecmp("ABC", "ABC"), ==, 0);
+ tt_int_op(evutil_ascii_strcasecmp("ABC", "abc"), ==, 0);
+ tt_int_op(evutil_ascii_strcasecmp("ABC", "abcd"), <, 0);
+ tt_int_op(evutil_ascii_strcasecmp("ABC", "abb"), >, 0);
+ tt_int_op(evutil_ascii_strcasecmp("ABCd", "abc"), >, 0);
+
+ tt_int_op(evutil_ascii_strncasecmp("Libevent", "LibEvEnT", 100), ==, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Libevent", "LibEvEnT", 4), ==, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Libevent", "LibEXXXX", 4), ==, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Libevent", "LibE", 4), ==, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Libe", "LibEvEnT", 4), ==, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Lib", "LibEvEnT", 4), <, 0);
+ tt_int_op(evutil_ascii_strncasecmp("abc", "def", 99), <, 0);
+ tt_int_op(evutil_ascii_strncasecmp("Z", "qrst", 1), >, 0);
+end:
+ ;
+}
+
+static void
+test_evutil_rtrim(void *ptr)
+{
+#define TEST_TRIM(s, result) \
+ do { \
+ if (cp) mm_free(cp); \
+ cp = mm_strdup(s); \
+ tt_assert(cp); \
+ evutil_rtrim_lws_(cp); \
+ tt_str_op(cp, ==, result); \
+ } while(0)
+
+ char *cp = NULL;
+ (void) ptr;
+
+ TEST_TRIM("", "");
+ TEST_TRIM("a", "a");
+ TEST_TRIM("abcdef ghi", "abcdef ghi");
+
+ TEST_TRIM(" ", "");
+ TEST_TRIM(" ", "");
+ TEST_TRIM("a ", "a");
+ TEST_TRIM("abcdef gH ", "abcdef gH");
+
+ TEST_TRIM("\t\t", "");
+ TEST_TRIM(" \t", "");
+ TEST_TRIM("\t", "");
+ TEST_TRIM("a \t", "a");
+ TEST_TRIM("a\t ", "a");
+ TEST_TRIM("a\t", "a");
+ TEST_TRIM("abcdef gH \t ", "abcdef gH");
+
+end:
+ if (cp)
+ mm_free(cp);
+}
+
+static int logsev = 0;
+static char *logmsg = NULL;
+
+static void
+logfn(int severity, const char *msg)
+{
+ logsev = severity;
+ tt_want(msg);
+ if (msg) {
+ if (logmsg)
+ free(logmsg);
+ logmsg = strdup(msg);
+ }
+}
+
+static int fatal_want_severity = 0;
+static const char *fatal_want_message = NULL;
+static void
+fatalfn(int exitcode)
+{
+ if (logsev != fatal_want_severity ||
+ !logmsg ||
+ strcmp(logmsg, fatal_want_message))
+ exit(0);
+ else
+ exit(exitcode);
+}
+
+#ifndef _WIN32
+#define CAN_CHECK_ERR
+static void
+check_error_logging(void (*fn)(void), int wantexitcode,
+ int wantseverity, const char *wantmsg)
+{
+ pid_t pid;
+ int status = 0, exitcode;
+ fatal_want_severity = wantseverity;
+ fatal_want_message = wantmsg;
+ if ((pid = regress_fork()) == 0) {
+ /* child process */
+ fn();
+ exit(0); /* should be unreachable. */
+ } else {
+ wait(&status);
+ exitcode = WEXITSTATUS(status);
+ tt_int_op(wantexitcode, ==, exitcode);
+ }
+end:
+ ;
+}
+
+static void
+errx_fn(void)
+{
+ event_errx(2, "Fatal error; too many kumquats (%d)", 5);
+}
+
+static void
+err_fn(void)
+{
+ errno = ENOENT;
+ event_err(5,"Couldn't open %s", "/very/bad/file");
+}
+
+static void
+sock_err_fn(void)
+{
+ evutil_socket_t fd = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef _WIN32
+ EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
+#else
+ errno = EAGAIN;
+#endif
+ event_sock_err(20, fd, "Unhappy socket");
+}
+#endif
+
+static void
+test_evutil_log(void *ptr)
+{
+ evutil_socket_t fd = -1;
+ char buf[128];
+
+ event_set_log_callback(logfn);
+ event_set_fatal_callback(fatalfn);
+#define RESET() do { \
+ logsev = 0; \
+ if (logmsg) free(logmsg); \
+ logmsg = NULL; \
+ } while (0)
+#define LOGEQ(sev,msg) do { \
+ tt_int_op(logsev,==,sev); \
+ tt_assert(logmsg != NULL); \
+ tt_str_op(logmsg,==,msg); \
+ } while (0)
+
+#ifdef CAN_CHECK_ERR
+ /* We need to disable these tests for now. Previously, the logging
+ * module didn't enforce the requirement that a fatal callback
+ * actually exit. Now, it exits no matter what, so if we wan to
+ * reinstate these tests, we'll need to fork for each one. */
+ check_error_logging(errx_fn, 2, EVENT_LOG_ERR,
+ "Fatal error; too many kumquats (5)");
+ RESET();
+#endif
+
+ event_warnx("Far too many %s (%d)", "wombats", 99);
+ LOGEQ(EVENT_LOG_WARN, "Far too many wombats (99)");
+ RESET();
+
+ event_msgx("Connecting lime to coconut");
+ LOGEQ(EVENT_LOG_MSG, "Connecting lime to coconut");
+ RESET();
+
+ event_debug(("A millisecond passed! We should log that!"));
+#ifdef USE_DEBUG
+ LOGEQ(EVENT_LOG_DEBUG, "A millisecond passed! We should log that!");
+#else
+ tt_int_op(logsev,==,0);
+ tt_ptr_op(logmsg,==,NULL);
+#endif
+ RESET();
+
+ /* Try with an errno. */
+ errno = ENOENT;
+ event_warn("Couldn't open %s", "/bad/file");
+ evutil_snprintf(buf, sizeof(buf),
+ "Couldn't open /bad/file: %s",strerror(ENOENT));
+ LOGEQ(EVENT_LOG_WARN,buf);
+ RESET();
+
+#ifdef CAN_CHECK_ERR
+ evutil_snprintf(buf, sizeof(buf),
+ "Couldn't open /very/bad/file: %s",strerror(ENOENT));
+ check_error_logging(err_fn, 5, EVENT_LOG_ERR, buf);
+ RESET();
+#endif
+
+ /* Try with a socket errno. */
+ fd = socket(AF_INET, SOCK_STREAM, 0);
+#ifdef _WIN32
+ evutil_snprintf(buf, sizeof(buf),
+ "Unhappy socket: %s",
+ evutil_socket_error_to_string(WSAEWOULDBLOCK));
+ EVUTIL_SET_SOCKET_ERROR(WSAEWOULDBLOCK);
+#else
+ evutil_snprintf(buf, sizeof(buf),
+ "Unhappy socket: %s", strerror(EAGAIN));
+ errno = EAGAIN;
+#endif
+ event_sock_warn(fd, "Unhappy socket");
+ LOGEQ(EVENT_LOG_WARN, buf);
+ RESET();
+
+#ifdef CAN_CHECK_ERR
+ check_error_logging(sock_err_fn, 20, EVENT_LOG_ERR, buf);
+ RESET();
+#endif
+
+#undef RESET
+#undef LOGEQ
+end:
+ if (logmsg)
+ free(logmsg);
+ if (fd >= 0)
+ evutil_closesocket(fd);
+}
+
+static void
+test_evutil_strlcpy(void *arg)
+{
+ char buf[8];
+
+ /* Successful case. */
+ tt_int_op(5, ==, strlcpy(buf, "Hello", sizeof(buf)));
+ tt_str_op(buf, ==, "Hello");
+
+ /* Overflow by a lot. */
+ tt_int_op(13, ==, strlcpy(buf, "pentasyllabic", sizeof(buf)));
+ tt_str_op(buf, ==, "pentasy");
+
+ /* Overflow by exactly one. */
+ tt_int_op(8, ==, strlcpy(buf, "overlong", sizeof(buf)));
+ tt_str_op(buf, ==, "overlon");
+end:
+ ;
+}
+
+struct example_struct {
+ const char *a;
+ const char *b;
+ long c;
+};
+
+static void
+test_evutil_upcast(void *arg)
+{
+ struct example_struct es1;
+ const char **cp;
+ es1.a = "World";
+ es1.b = "Hello";
+ es1.c = -99;
+
+ tt_int_op(evutil_offsetof(struct example_struct, b), ==, sizeof(char*));
+
+ cp = &es1.b;
+ tt_ptr_op(EVUTIL_UPCAST(cp, struct example_struct, b), ==, &es1);
+
+end:
+ ;
+}
+
+static void
+test_evutil_integers(void *arg)
+{
+ ev_int64_t i64;
+ ev_uint64_t u64;
+ ev_int32_t i32;
+ ev_uint32_t u32;
+ ev_int16_t i16;
+ ev_uint16_t u16;
+ ev_int8_t i8;
+ ev_uint8_t u8;
+
+ void *ptr;
+ ev_intptr_t iptr;
+ ev_uintptr_t uptr;
+
+ ev_ssize_t ssize;
+
+ tt_int_op(sizeof(u64), ==, 8);
+ tt_int_op(sizeof(i64), ==, 8);
+ tt_int_op(sizeof(u32), ==, 4);
+ tt_int_op(sizeof(i32), ==, 4);
+ tt_int_op(sizeof(u16), ==, 2);
+ tt_int_op(sizeof(i16), ==, 2);
+ tt_int_op(sizeof(u8), ==, 1);
+ tt_int_op(sizeof(i8), ==, 1);
+
+ tt_int_op(sizeof(ev_ssize_t), ==, sizeof(size_t));
+ tt_int_op(sizeof(ev_intptr_t), >=, sizeof(void *));
+ tt_int_op(sizeof(ev_uintptr_t), ==, sizeof(intptr_t));
+
+ u64 = 1000000000;
+ u64 *= 1000000000;
+ tt_assert(u64 / 1000000000 == 1000000000);
+ i64 = -1000000000;
+ i64 *= 1000000000;
+ tt_assert(i64 / 1000000000 == -1000000000);
+
+ u64 = EV_UINT64_MAX;
+ i64 = EV_INT64_MAX;
+ tt_assert(u64 > 0);
+ tt_assert(i64 > 0);
+ u64++;
+ i64++;
+ tt_assert(u64 == 0);
+ tt_assert(i64 == EV_INT64_MIN);
+ tt_assert(i64 < 0);
+
+ u32 = EV_UINT32_MAX;
+ i32 = EV_INT32_MAX;
+ tt_assert(u32 > 0);
+ tt_assert(i32 > 0);
+ u32++;
+ i32++;
+ tt_assert(u32 == 0);
+ tt_assert(i32 == EV_INT32_MIN);
+ tt_assert(i32 < 0);
+
+ u16 = EV_UINT16_MAX;
+ i16 = EV_INT16_MAX;
+ tt_assert(u16 > 0);
+ tt_assert(i16 > 0);
+ u16++;
+ i16++;
+ tt_assert(u16 == 0);
+ tt_assert(i16 == EV_INT16_MIN);
+ tt_assert(i16 < 0);
+
+ u8 = EV_UINT8_MAX;
+ i8 = EV_INT8_MAX;
+ tt_assert(u8 > 0);
+ tt_assert(i8 > 0);
+ u8++;
+ i8++;
+ tt_assert(u8 == 0);
+ tt_assert(i8 == EV_INT8_MIN);
+ tt_assert(i8 < 0);
+
+ ssize = EV_SSIZE_MAX;
+ tt_assert(ssize > 0);
+ ssize++;
+ tt_assert(ssize < 0);
+ tt_assert(ssize == EV_SSIZE_MIN);
+
+ ptr = &ssize;
+ iptr = (ev_intptr_t)ptr;
+ uptr = (ev_uintptr_t)ptr;
+ ptr = (void *)iptr;
+ tt_assert(ptr == &ssize);
+ ptr = (void *)uptr;
+ tt_assert(ptr == &ssize);
+
+ iptr = -1;
+ tt_assert(iptr < 0);
+end:
+ ;
+}
+
+struct evutil_addrinfo *
+ai_find_by_family(struct evutil_addrinfo *ai, int family)
+{
+ while (ai) {
+ if (ai->ai_family == family)
+ return ai;
+ ai = ai->ai_next;
+ }
+ return NULL;
+}
+
+struct evutil_addrinfo *
+ai_find_by_protocol(struct evutil_addrinfo *ai, int protocol)
+{
+ while (ai) {
+ if (ai->ai_protocol == protocol)
+ return ai;
+ ai = ai->ai_next;
+ }
+ return NULL;
+}
+
+
+int
+test_ai_eq_(const struct evutil_addrinfo *ai, const char *sockaddr_port,
+ int socktype, int protocol, int line)
+{
+ struct sockaddr_storage ss;
+ int slen = sizeof(ss);
+ int gotport;
+ char buf[128];
+ memset(&ss, 0, sizeof(ss));
+ if (socktype > 0)
+ tt_int_op(ai->ai_socktype, ==, socktype);
+ if (protocol > 0)
+ tt_int_op(ai->ai_protocol, ==, protocol);
+
+ if (evutil_parse_sockaddr_port(
+ sockaddr_port, (struct sockaddr*)&ss, &slen)<0) {
+ TT_FAIL(("Couldn't parse expected address %s on line %d",
+ sockaddr_port, line));
+ return -1;
+ }
+ if (ai->ai_family != ss.ss_family) {
+ TT_FAIL(("Address family %d did not match %d on line %d",
+ ai->ai_family, ss.ss_family, line));
+ return -1;
+ }
+ if (ai->ai_addr->sa_family == AF_INET) {
+ struct sockaddr_in *sin = (struct sockaddr_in*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET, &sin->sin_addr, buf, sizeof(buf));
+ gotport = ntohs(sin->sin_port);
+ if (ai->ai_addrlen != sizeof(struct sockaddr_in)) {
+ TT_FAIL(("Addr size mismatch on line %d", line));
+ return -1;
+ }
+ } else {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)ai->ai_addr;
+ evutil_inet_ntop(AF_INET6, &sin6->sin6_addr, buf, sizeof(buf));
+ gotport = ntohs(sin6->sin6_port);
+ if (ai->ai_addrlen != sizeof(struct sockaddr_in6)) {
+ TT_FAIL(("Addr size mismatch on line %d", line));
+ return -1;
+ }
+ }
+ if (evutil_sockaddr_cmp(ai->ai_addr, (struct sockaddr*)&ss, 1)) {
+ TT_FAIL(("Wanted %s, got %s:%d on line %d", sockaddr_port,
+ buf, gotport, line));
+ return -1;
+ } else {
+ TT_BLATHER(("Wanted %s, got %s:%d on line %d", sockaddr_port,
+ buf, gotport, line));
+ }
+ return 0;
+end:
+ TT_FAIL(("Test failed on line %d", line));
+ return -1;
+}
+
+static void
+test_evutil_rand(void *arg)
+{
+ char buf1[32];
+ char buf2[32];
+ int counts[256];
+ int i, j, k, n=0;
+ struct evutil_weakrand_state seed = { 12346789U };
+
+ memset(buf2, 0, sizeof(buf2));
+ memset(counts, 0, sizeof(counts));
+
+ for (k=0;k<32;++k) {
+ /* Try a few different start and end points; try to catch
+ * the various misaligned cases of arc4random_buf */
+ int startpoint = evutil_weakrand_(&seed) % 4;
+ int endpoint = 32 - (evutil_weakrand_(&seed) % 4);
+
+ memset(buf2, 0, sizeof(buf2));
+
+ /* Do 6 runs over buf1, or-ing the result into buf2 each
+ * time, to make sure we're setting each byte that we mean
+ * to set. */
+ for (i=0;i<8;++i) {
+ memset(buf1, 0, sizeof(buf1));
+ evutil_secure_rng_get_bytes(buf1 + startpoint,
+ endpoint-startpoint);
+ n += endpoint - startpoint;
+ for (j=0; j<32; ++j) {
+ if (j >= startpoint && j < endpoint) {
+ buf2[j] |= buf1[j];
+ ++counts[(unsigned char)buf1[j]];
+ } else {
+ tt_assert(buf1[j] == 0);
+ tt_int_op(buf1[j], ==, 0);
+
+ }
+ }
+ }
+
+ /* This will give a false positive with P=(256**8)==(2**64)
+ * for each character. */
+ for (j=startpoint;j<endpoint;++j) {
+ tt_int_op(buf2[j], !=, 0);
+ }
+ }
+
+ evutil_weakrand_seed_(&seed, 0);
+ for (i = 0; i < 10000; ++i) {
+ ev_int32_t r = evutil_weakrand_range_(&seed, 9999);
+ tt_int_op(0, <=, r);
+ tt_int_op(r, <, 9999);
+ }
+
+ /* for (i=0;i<256;++i) { printf("%3d %2d\n", i, counts[i]); } */
+end:
+ ;
+}
+
+static void
+test_evutil_getaddrinfo(void *arg)
+{
+ struct evutil_addrinfo *ai = NULL, *a;
+ struct evutil_addrinfo hints;
+ int r;
+
+ /* Try using it as a pton. */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evutil_getaddrinfo("1.2.3.4", "8080", &hints, &ai);
+ tt_int_op(r, ==, 0);
+ tt_assert(ai);
+ tt_ptr_op(ai->ai_next, ==, NULL); /* no ambiguity */
+ test_ai_eq(ai, "1.2.3.4:8080", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_protocol = IPPROTO_UDP;
+ r = evutil_getaddrinfo("1001:b0b::f00f", "4321", &hints, &ai);
+ tt_int_op(r, ==, 0);
+ tt_assert(ai);
+ tt_ptr_op(ai->ai_next, ==, NULL); /* no ambiguity */
+ test_ai_eq(ai, "[1001:b0b::f00f]:4321", SOCK_DGRAM, IPPROTO_UDP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ /* Try out the behavior of nodename=NULL */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_INET;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_flags = EVUTIL_AI_PASSIVE; /* as if for bind */
+ r = evutil_getaddrinfo(NULL, "9999", &hints, &ai);
+ tt_int_op(r,==,0);
+ tt_assert(ai);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ test_ai_eq(ai, "0.0.0.0:9999", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+ hints.ai_flags = 0; /* as if for connect */
+ r = evutil_getaddrinfo(NULL, "9998", &hints, &ai);
+ tt_assert(ai);
+ tt_int_op(r,==,0);
+ test_ai_eq(ai, "127.0.0.1:9998", SOCK_STREAM, IPPROTO_TCP);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ hints.ai_flags = 0; /* as if for connect */
+ hints.ai_family = PF_INET6;
+ r = evutil_getaddrinfo(NULL, "9997", &hints, &ai);
+ tt_assert(ai);
+ tt_int_op(r,==,0);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ test_ai_eq(ai, "[::1]:9997", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ hints.ai_flags = EVUTIL_AI_PASSIVE; /* as if for bind. */
+ hints.ai_family = PF_INET6;
+ r = evutil_getaddrinfo(NULL, "9996", &hints, &ai);
+ tt_assert(ai);
+ tt_int_op(r,==,0);
+ tt_ptr_op(ai->ai_next, ==, NULL);
+ test_ai_eq(ai, "[::]:9996", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ /* Now try an unspec one. We should get a v6 and a v4. */
+ hints.ai_family = PF_UNSPEC;
+ r = evutil_getaddrinfo(NULL, "9996", &hints, &ai);
+ tt_assert(ai);
+ tt_int_op(r,==,0);
+ a = ai_find_by_family(ai, PF_INET6);
+ tt_assert(a);
+ test_ai_eq(a, "[::]:9996", SOCK_STREAM, IPPROTO_TCP);
+ a = ai_find_by_family(ai, PF_INET);
+ tt_assert(a);
+ test_ai_eq(a, "0.0.0.0:9996", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ /* Try out AI_NUMERICHOST: successful case. Also try
+ * multiprotocol. */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_flags = EVUTIL_AI_NUMERICHOST;
+ r = evutil_getaddrinfo("1.2.3.4", NULL, &hints, &ai);
+ tt_int_op(r, ==, 0);
+ a = ai_find_by_protocol(ai, IPPROTO_TCP);
+ tt_assert(a);
+ test_ai_eq(a, "1.2.3.4", SOCK_STREAM, IPPROTO_TCP);
+ a = ai_find_by_protocol(ai, IPPROTO_UDP);
+ tt_assert(a);
+ test_ai_eq(a, "1.2.3.4", SOCK_DGRAM, IPPROTO_UDP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+
+ /* Try the failing case of AI_NUMERICHOST */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_flags = EVUTIL_AI_NUMERICHOST;
+ r = evutil_getaddrinfo("www.google.com", "80", &hints, &ai);
+ tt_int_op(r, ==, EVUTIL_EAI_NONAME);
+ tt_ptr_op(ai, ==, NULL);
+
+ /* Try symbolic service names wit AI_NUMERICSERV */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = EVUTIL_AI_NUMERICSERV;
+ r = evutil_getaddrinfo("1.2.3.4", "http", &hints, &ai);
+ tt_int_op(r,==,EVUTIL_EAI_NONAME);
+
+ /* Try symbolic service names */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evutil_getaddrinfo("1.2.3.4", "http", &hints, &ai);
+ if (r!=0) {
+ TT_DECLARE("SKIP", ("Symbolic service names seem broken."));
+ } else {
+ tt_assert(ai);
+ test_ai_eq(ai, "1.2.3.4:80", SOCK_STREAM, IPPROTO_TCP);
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+ }
+
+end:
+ if (ai)
+ evutil_freeaddrinfo(ai);
+}
+
+static void
+test_evutil_getaddrinfo_live(void *arg)
+{
+ struct evutil_addrinfo *ai = NULL;
+ struct evutil_addrinfo hints;
+
+ struct sockaddr_in6 *sin6;
+ struct sockaddr_in *sin;
+ char buf[128];
+ const char *cp;
+ int r;
+
+ /* Now do some actual lookups. */
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = PF_INET;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_socktype = SOCK_STREAM;
+ r = evutil_getaddrinfo("www.google.com", "80", &hints, &ai);
+ if (r != 0) {
+ TT_DECLARE("SKIP", ("Couldn't resolve www.google.com"));
+ } else {
+ tt_assert(ai);
+ tt_int_op(ai->ai_family, ==, PF_INET);
+ tt_int_op(ai->ai_protocol, ==, IPPROTO_TCP);
+ tt_int_op(ai->ai_socktype, ==, SOCK_STREAM);
+ tt_int_op(ai->ai_addrlen, ==, sizeof(struct sockaddr_in));
+ sin = (struct sockaddr_in*)ai->ai_addr;
+ tt_int_op(sin->sin_family, ==, AF_INET);
+ tt_int_op(sin->sin_port, ==, htons(80));
+ tt_int_op(sin->sin_addr.s_addr, !=, 0xffffffff);
+
+ cp = evutil_inet_ntop(AF_INET, &sin->sin_addr, buf, sizeof(buf));
+ TT_BLATHER(("www.google.com resolved to %s",
+ cp?cp:"<unwriteable>"));
+ evutil_freeaddrinfo(ai);
+ ai = NULL;
+ }
+
+ hints.ai_family = PF_INET6;
+ r = evutil_getaddrinfo("ipv6.google.com", "80", &hints, &ai);
+ if (r != 0) {
+ TT_BLATHER(("Couldn't do an ipv6 lookup for ipv6.google.com"));
+ } else {
+ tt_assert(ai);
+ tt_int_op(ai->ai_family, ==, PF_INET6);
+ tt_int_op(ai->ai_addrlen, ==, sizeof(struct sockaddr_in6));
+ sin6 = (struct sockaddr_in6*)ai->ai_addr;
+ tt_int_op(sin6->sin6_port, ==, htons(80));
+
+ cp = evutil_inet_ntop(AF_INET6, &sin6->sin6_addr, buf,
+ sizeof(buf));
+ TT_BLATHER(("ipv6.google.com resolved to %s",
+ cp?cp:"<unwriteable>"));
+ }
+
+end:
+ if (ai)
+ evutil_freeaddrinfo(ai);
+}
+
+#ifdef _WIN32
+static void
+test_evutil_loadsyslib(void *arg)
+{
+ HANDLE h=NULL;
+
+ h = evutil_load_windows_system_library_(TEXT("kernel32.dll"));
+ tt_assert(h);
+
+end:
+ if (h)
+ CloseHandle(h);
+
+}
+#endif
+
+/** Test mm_malloc(). */
+static void
+test_event_malloc(void *arg)
+{
+ void *p = NULL;
+ (void)arg;
+
+ /* mm_malloc(0) should simply return NULL. */
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+ errno = 0;
+ p = mm_malloc(0);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, 0);
+#endif
+
+ /* Trivial case. */
+ errno = 0;
+ p = mm_malloc(8);
+ tt_assert(p != NULL);
+ tt_int_op(errno, ==, 0);
+ mm_free(p);
+
+ end:
+ errno = 0;
+ return;
+}
+
+static void
+test_event_calloc(void *arg)
+{
+ void *p = NULL;
+ (void)arg;
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+ /* mm_calloc() should simply return NULL
+ * if either argument is zero. */
+ errno = 0;
+ p = mm_calloc(0, 0);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, 0);
+ errno = 0;
+ p = mm_calloc(0, 1);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, 0);
+ errno = 0;
+ p = mm_calloc(1, 0);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, 0);
+#endif
+
+ /* Trivial case. */
+ errno = 0;
+ p = mm_calloc(8, 8);
+ tt_assert(p != NULL);
+ tt_int_op(errno, ==, 0);
+ mm_free(p);
+ p = NULL;
+
+ /* mm_calloc() should set errno = ENOMEM and return NULL
+ * in case of potential overflow. */
+ errno = 0;
+ p = mm_calloc(EV_SIZE_MAX/2, EV_SIZE_MAX/2 + 8);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, ENOMEM);
+
+ end:
+ errno = 0;
+ if (p)
+ mm_free(p);
+
+ return;
+}
+
+static void
+test_event_strdup(void *arg)
+{
+ void *p = NULL;
+ (void)arg;
+
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+ /* mm_strdup(NULL) should set errno = EINVAL and return NULL. */
+ errno = 0;
+ p = mm_strdup(NULL);
+ tt_assert(p == NULL);
+ tt_int_op(errno, ==, EINVAL);
+#endif
+
+ /* Trivial cases. */
+
+ errno = 0;
+ p = mm_strdup("");
+ tt_assert(p != NULL);
+ tt_int_op(errno, ==, 0);
+ tt_str_op(p, ==, "");
+ mm_free(p);
+
+ errno = 0;
+ p = mm_strdup("foo");
+ tt_assert(p != NULL);
+ tt_int_op(errno, ==, 0);
+ tt_str_op(p, ==, "foo");
+ mm_free(p);
+
+ /* XXX
+ * mm_strdup(str) where str is a string of length EV_SIZE_MAX
+ * should set errno = ENOMEM and return NULL. */
+
+ end:
+ errno = 0;
+ return;
+}
+
+static void
+test_evutil_usleep(void *arg)
+{
+ struct timeval tv1, tv2, tv3, diff1, diff2;
+ const struct timeval quarter_sec = {0, 250*1000};
+ const struct timeval tenth_sec = {0, 100*1000};
+ long usec1, usec2;
+
+ evutil_gettimeofday(&tv1, NULL);
+ evutil_usleep_(&quarter_sec);
+ evutil_gettimeofday(&tv2, NULL);
+ evutil_usleep_(&tenth_sec);
+ evutil_gettimeofday(&tv3, NULL);
+
+ evutil_timersub(&tv2, &tv1, &diff1);
+ evutil_timersub(&tv3, &tv2, &diff2);
+ usec1 = diff1.tv_sec * 1000000 + diff1.tv_usec;
+ usec2 = diff2.tv_sec * 1000000 + diff2.tv_usec;
+
+ tt_int_op(usec1, >, 200000);
+ tt_int_op(usec1, <, 300000);
+ tt_int_op(usec2, >, 80000);
+ tt_int_op(usec2, <, 120000);
+
+end:
+ ;
+}
+
+static void
+test_evutil_monotonic_res(void *data_)
+{
+ /* Basic santity-test for monotonic timers. What we'd really like
+ * to do is make sure that they can't go backwards even when the
+ * system clock goes backwards. But we haven't got a good way to
+ * move the system clock backwards.
+ */
+ struct basic_test_data *data = data_;
+ struct evutil_monotonic_timer timer;
+ const int precise = strstr(data->setup_data, "precise") != NULL;
+ const int fallback = strstr(data->setup_data, "fallback") != NULL;
+ struct timeval tv[10], delay;
+ int total_diff = 0;
+
+ int flags = 0, wantres, acceptdiff, i;
+ if (precise)
+ flags |= EV_MONOT_PRECISE;
+ if (fallback)
+ flags |= EV_MONOT_FALLBACK;
+ if (precise || fallback) {
+#ifdef _WIN32
+ wantres = 10*1000;
+ acceptdiff = 1000;
+#else
+ wantres = 1000;
+ acceptdiff = 300;
+#endif
+ } else {
+ wantres = 40*1000;
+ acceptdiff = 20*1000;
+ }
+
+ TT_BLATHER(("Precise = %d", precise));
+ TT_BLATHER(("Fallback = %d", fallback));
+
+ /* First, make sure we match up with usleep. */
+
+ delay.tv_sec = 0;
+ delay.tv_usec = wantres;
+
+ tt_int_op(evutil_configure_monotonic_time_(&timer, flags), ==, 0);
+
+ for (i = 0; i < 10; ++i) {
+ evutil_gettime_monotonic_(&timer, &tv[i]);
+ evutil_usleep_(&delay);
+ }
+
+ for (i = 0; i < 9; ++i) {
+ struct timeval diff;
+ tt_assert(evutil_timercmp(&tv[i], &tv[i+1], <));
+ evutil_timersub(&tv[i+1], &tv[i], &diff);
+ tt_int_op(diff.tv_sec, ==, 0);
+ total_diff += diff.tv_usec;
+ TT_BLATHER(("Difference = %d", (int)diff.tv_usec));
+ }
+ tt_int_op(abs(total_diff/9 - wantres), <, acceptdiff);
+
+end:
+ ;
+}
+
+static void
+test_evutil_monotonic_prc(void *data_)
+{
+ struct basic_test_data *data = data_;
+ struct evutil_monotonic_timer timer;
+ const int precise = strstr(data->setup_data, "precise") != NULL;
+ const int fallback = strstr(data->setup_data, "fallback") != NULL;
+ struct timeval tv[10];
+ int total_diff = 0;
+ int i, maxstep = 25*1000,flags=0;
+ if (precise)
+ maxstep = 500;
+ if (precise)
+ flags |= EV_MONOT_PRECISE;
+ if (fallback)
+ flags |= EV_MONOT_FALLBACK;
+ tt_int_op(evutil_configure_monotonic_time_(&timer, flags), ==, 0);
+
+ /* find out what precision we actually see. */
+
+ evutil_gettime_monotonic_(&timer, &tv[0]);
+ for (i = 1; i < 10; ++i) {
+ do {
+ evutil_gettime_monotonic_(&timer, &tv[i]);
+ } while (evutil_timercmp(&tv[i-1], &tv[i], ==));
+ }
+
+ total_diff = 0;
+ for (i = 0; i < 9; ++i) {
+ struct timeval diff;
+ tt_assert(evutil_timercmp(&tv[i], &tv[i+1], <));
+ evutil_timersub(&tv[i+1], &tv[i], &diff);
+ tt_int_op(diff.tv_sec, ==, 0);
+ total_diff += diff.tv_usec;
+ TT_BLATHER(("Step difference = %d", (int)diff.tv_usec));
+ }
+ TT_BLATHER(("Average step difference = %d", total_diff / 9));
+ tt_int_op(total_diff/9, <, maxstep);
+
+end:
+ ;
+}
+
+struct testcase_t util_testcases[] = {
+ { "ipv4_parse", regress_ipv4_parse, 0, NULL, NULL },
+ { "ipv6_parse", regress_ipv6_parse, 0, NULL, NULL },
+ { "sockaddr_port_parse", regress_sockaddr_port_parse, 0, NULL, NULL },
+ { "sockaddr_port_format", regress_sockaddr_port_format, 0, NULL, NULL },
+ { "sockaddr_predicates", test_evutil_sockaddr_predicates, 0,NULL,NULL },
+ { "evutil_snprintf", test_evutil_snprintf, 0, NULL, NULL },
+ { "evutil_strtoll", test_evutil_strtoll, 0, NULL, NULL },
+ { "evutil_casecmp", test_evutil_casecmp, 0, NULL, NULL },
+ { "evutil_rtrim", test_evutil_rtrim, 0, NULL, NULL },
+ { "strlcpy", test_evutil_strlcpy, 0, NULL, NULL },
+ { "log", test_evutil_log, TT_FORK, NULL, NULL },
+ { "upcast", test_evutil_upcast, 0, NULL, NULL },
+ { "integers", test_evutil_integers, 0, NULL, NULL },
+ { "rand", test_evutil_rand, TT_FORK, NULL, NULL },
+ { "getaddrinfo", test_evutil_getaddrinfo, TT_FORK, NULL, NULL },
+ { "getaddrinfo_live", test_evutil_getaddrinfo_live, TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
+#ifdef _WIN32
+ { "loadsyslib", test_evutil_loadsyslib, TT_FORK, NULL, NULL },
+#endif
+ { "mm_malloc", test_event_malloc, 0, NULL, NULL },
+ { "mm_calloc", test_event_calloc, 0, NULL, NULL },
+ { "mm_strdup", test_event_strdup, 0, NULL, NULL },
+ { "usleep", test_evutil_usleep, 0, NULL, NULL },
+ { "monotonic_res", test_evutil_monotonic_res, 0, &basic_setup, (void*)"" },
+ { "monotonic_res_precise", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"precise" },
+ { "monotonic_res_fallback", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"fallback" },
+ { "monotonic_prc", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"" },
+ { "monotonic_prc_precise", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"precise" },
+ { "monotonic_prc_fallback", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"fallback" },
+ END_OF_TESTCASES,
+};
+
diff --git a/sntp/libevent/test/regress_zlib.c b/sntp/libevent/test/regress_zlib.c
new file mode 100644
index 000000000000..9339397c93b6
--- /dev/null
+++ b/sntp/libevent/test/regress_zlib.c
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/* The old tests here need assertions to work. */
+#undef NDEBUG
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#ifndef _WIN32
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <netdb.h>
+#endif
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <assert.h>
+#include <errno.h>
+
+#include "event2/util.h"
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/buffer.h"
+#include "event2/bufferevent.h"
+
+#include "regress.h"
+
+/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
+ saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
+ that nobody will care if the compile outputs a no-such-identifier warning.
+
+ Sorry, but we like -Werror over here, so I guess we need to define these.
+ I hope that zlib 1.2.6 doesn't break these too.
+*/
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE 0
+#endif
+#ifndef _LFS64_LARGEFILE
+#define _LFS64_LARGEFILE 0
+#endif
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 0
+#endif
+#ifndef off64_t
+#define off64_t ev_int64_t
+#endif
+
+#include <zlib.h>
+
+static int infilter_calls;
+static int outfilter_calls;
+static int readcb_finished;
+static int writecb_finished;
+static int errorcb_invoked;
+
+/*
+ * Zlib filters
+ */
+
+static void
+zlib_deflate_free(void *ctx)
+{
+ z_streamp p = ctx;
+
+ assert(deflateEnd(p) == Z_OK);
+}
+
+static void
+zlib_inflate_free(void *ctx)
+{
+ z_streamp p = ctx;
+
+ assert(inflateEnd(p) == Z_OK);
+}
+
+static int
+getstate(enum bufferevent_flush_mode state)
+{
+ switch (state) {
+ case BEV_FINISHED:
+ return Z_FINISH;
+ case BEV_FLUSH:
+ return Z_SYNC_FLUSH;
+ case BEV_NORMAL:
+ default:
+ return Z_NO_FLUSH;
+ }
+}
+
+/*
+ * The input filter is triggered only on new input read from the network.
+ * That means all input data needs to be consumed or the filter needs to
+ * initiate its own triggering via a timeout.
+ */
+static enum bufferevent_filter_result
+zlib_input_filter(struct evbuffer *src, struct evbuffer *dst,
+ ev_ssize_t lim, enum bufferevent_flush_mode state, void *ctx)
+{
+ struct evbuffer_iovec v_in[1];
+ struct evbuffer_iovec v_out[1];
+ int nread, nwrite;
+ int res, n;
+
+ z_streamp p = ctx;
+
+ do {
+ /* let's do some decompression */
+ n = evbuffer_peek(src, -1, NULL, v_in, 1);
+ if (n) {
+ p->avail_in = v_in[0].iov_len;
+ p->next_in = v_in[0].iov_base;
+ } else {
+ p->avail_in = 0;
+ p->next_in = 0;
+ }
+
+ evbuffer_reserve_space(dst, 4096, v_out, 1);
+ p->next_out = v_out[0].iov_base;
+ p->avail_out = v_out[0].iov_len;
+
+ /* we need to flush zlib if we got a flush */
+ res = inflate(p, getstate(state));
+
+ /* let's figure out how much was compressed */
+ nread = v_in[0].iov_len - p->avail_in;
+ nwrite = v_out[0].iov_len - p->avail_out;
+
+ evbuffer_drain(src, nread);
+ v_out[0].iov_len = nwrite;
+ evbuffer_commit_space(dst, v_out, 1);
+
+ if (res==Z_BUF_ERROR) {
+ /* We're out of space, or out of decodeable input.
+ Only if nwrite == 0 assume the latter.
+ */
+ if (nwrite == 0)
+ return BEV_NEED_MORE;
+ } else {
+ assert(res == Z_OK || res == Z_STREAM_END);
+ }
+
+ } while (evbuffer_get_length(src) > 0);
+
+ ++infilter_calls;
+
+ return (BEV_OK);
+}
+
+static enum bufferevent_filter_result
+zlib_output_filter(struct evbuffer *src, struct evbuffer *dst,
+ ev_ssize_t lim, enum bufferevent_flush_mode state, void *ctx)
+{
+ struct evbuffer_iovec v_in[1];
+ struct evbuffer_iovec v_out[1];
+ int nread, nwrite;
+ int res, n;
+
+ z_streamp p = ctx;
+
+ do {
+ /* let's do some compression */
+ n = evbuffer_peek(src, -1, NULL, v_in, 1);
+ if (n) {
+ p->avail_in = v_in[0].iov_len;
+ p->next_in = v_in[0].iov_base;
+ } else {
+ p->avail_in = 0;
+ p->next_in = 0;
+ }
+
+ evbuffer_reserve_space(dst, 4096, v_out, 1);
+ p->next_out = v_out[0].iov_base;
+ p->avail_out = v_out[0].iov_len;
+
+ /* we need to flush zlib if we got a flush */
+ res = deflate(p, getstate(state));
+
+ /* let's figure out how much was decompressed */
+ nread = v_in[0].iov_len - p->avail_in;
+ nwrite = v_out[0].iov_len - p->avail_out;
+
+ evbuffer_drain(src, nread);
+ v_out[0].iov_len = nwrite;
+ evbuffer_commit_space(dst, v_out, 1);
+
+ if (res==Z_BUF_ERROR) {
+ /* We're out of space, or out of decodeable input.
+ Only if nwrite == 0 assume the latter.
+ */
+ if (nwrite == 0)
+ return BEV_NEED_MORE;
+ } else {
+ assert(res == Z_OK || res == Z_STREAM_END);
+ }
+
+ } while (evbuffer_get_length(src) > 0);
+
+ ++outfilter_calls;
+
+ return (BEV_OK);
+}
+
+/*
+ * simple bufferevent test (over transparent zlib treatment)
+ */
+
+static void
+readcb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bufferevent_get_input(bev)) == 8333) {
+ struct evbuffer *evbuf = evbuffer_new();
+ assert(evbuf != NULL);
+
+ /* gratuitous test of bufferevent_read_buffer */
+ bufferevent_read_buffer(bev, evbuf);
+
+ bufferevent_disable(bev, EV_READ);
+
+ if (evbuffer_get_length(evbuf) == 8333) {
+ ++readcb_finished;
+ }
+
+ evbuffer_free(evbuf);
+ }
+}
+
+static void
+writecb(struct bufferevent *bev, void *arg)
+{
+ if (evbuffer_get_length(bufferevent_get_output(bev)) == 0) {
+ ++writecb_finished;
+ }
+}
+
+static void
+errorcb(struct bufferevent *bev, short what, void *arg)
+{
+ errorcb_invoked = 1;
+}
+
+void
+test_bufferevent_zlib(void *arg)
+{
+ struct bufferevent *bev1=NULL, *bev2=NULL;
+ char buffer[8333];
+ z_stream z_input, z_output;
+ int i, r;
+ evutil_socket_t pair[2] = {-1, -1};
+ (void)arg;
+
+ infilter_calls = outfilter_calls = readcb_finished = writecb_finished
+ = errorcb_invoked = 0;
+
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) {
+ tt_abort_perror("socketpair");
+ }
+
+ evutil_make_socket_nonblocking(pair[0]);
+ evutil_make_socket_nonblocking(pair[1]);
+
+ bev1 = bufferevent_socket_new(NULL, pair[0], 0);
+ bev2 = bufferevent_socket_new(NULL, pair[1], 0);
+
+ memset(&z_output, 0, sizeof(z_output));
+ r = deflateInit(&z_output, Z_DEFAULT_COMPRESSION);
+ tt_int_op(r, ==, Z_OK);
+ memset(&z_input, 0, sizeof(z_input));
+ r = inflateInit(&z_input);
+ tt_int_op(r, ==, Z_OK);
+
+ /* initialize filters */
+ bev1 = bufferevent_filter_new(bev1, NULL, zlib_output_filter,
+ BEV_OPT_CLOSE_ON_FREE, zlib_deflate_free, &z_output);
+ bev2 = bufferevent_filter_new(bev2, zlib_input_filter,
+ NULL, BEV_OPT_CLOSE_ON_FREE, zlib_inflate_free, &z_input);
+ bufferevent_setcb(bev1, readcb, writecb, errorcb, NULL);
+ bufferevent_setcb(bev2, readcb, writecb, errorcb, NULL);
+
+ bufferevent_disable(bev1, EV_READ);
+ bufferevent_enable(bev1, EV_WRITE);
+
+ bufferevent_enable(bev2, EV_READ);
+
+ for (i = 0; i < (int)sizeof(buffer); i++)
+ buffer[i] = i;
+
+ /* break it up into multiple buffer chains */
+ bufferevent_write(bev1, buffer, 1800);
+ bufferevent_write(bev1, buffer + 1800, sizeof(buffer) - 1800);
+
+ /* we are done writing - we need to flush everything */
+ bufferevent_flush(bev1, EV_WRITE, BEV_FINISHED);
+
+ event_dispatch();
+
+ tt_want(infilter_calls);
+ tt_want(outfilter_calls);
+ tt_want(readcb_finished);
+ tt_want(writecb_finished);
+ tt_want(!errorcb_invoked);
+
+ test_ok = 1;
+end:
+ if (bev1)
+ bufferevent_free(bev1);
+ if (bev2)
+ bufferevent_free(bev2);
+
+ if (pair[0] >= 0)
+ evutil_closesocket(pair[0]);
+ if (pair[1] >= 0)
+ evutil_closesocket(pair[1]);
+}
diff --git a/sntp/libevent/test/rpcgen_wrapper.sh b/sntp/libevent/test/rpcgen_wrapper.sh
new file mode 100755
index 000000000000..aaa03031a1f6
--- /dev/null
+++ b/sntp/libevent/test/rpcgen_wrapper.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# libevent rpcgen_wrapper.sh
+# Transforms event_rpcgen.py failure into success for make, only if
+# regress.gen.c and regress.gen.h already exist in $srcdir. This
+# is needed for "make distcheck" to pass the read-only $srcdir build,
+# as with read-only sources fresh from tarball, regress.gen.[ch] will
+# be correct in $srcdir but unwritable. This previously triggered
+# Makefile.am to create stub regress.gen.c and regress.gen.h in the
+# distcheck _build directory, which were then detected as leftover
+# files in the build tree after distclean, breaking distcheck.
+# Note that regress.gen.[ch] are not in fresh git clones, making
+# working Python a requirement for make distcheck of a git tree.
+
+exit_updated() {
+# echo "Updated ${srcdir}/regress.gen.c and ${srcdir}/regress.gen.h"
+ exit 0
+}
+
+exit_reuse() {
+ echo "event_rpcgen.py failed, ${srcdir}/regress.gen.\[ch\] will be reused." >&2
+ exit 0
+}
+
+exit_failed() {
+ echo "Could not generate regress.gen.\[ch\] using event_rpcgen.sh" >&2
+ exit 1
+}
+
+if [ -x /usr/bin/python2 ] ; then
+ PYTHON2=/usr/bin/python2
+elif [ "x`which python2`" != x ] ; then
+ PYTHON2=python2
+else
+ PYTHON2=python
+fi
+
+srcdir=$1
+srcdir=${srcdir:-.}
+
+${PYTHON2} ${srcdir}/../event_rpcgen.py --quiet ${srcdir}/regress.rpc \
+ test/regress.gen.h test/regress.gen.c
+
+case "$?" in
+ 0)
+ exit_updated
+ ;;
+ *)
+ test -r ${srcdir}/regress.gen.c -a -r ${srcdir}/regress.gen.h && \
+ exit_reuse
+ exit_failed
+ ;;
+esac
diff --git a/sntp/libevent/test/test-changelist.c b/sntp/libevent/test/test-changelist.c
new file mode 100644
index 000000000000..6e2466d5a55c
--- /dev/null
+++ b/sntp/libevent/test/test-changelist.c
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2010-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/util.h"
+#include <time.h>
+
+struct cpu_usage_timer {
+#ifdef _WIN32
+ HANDLE thread;
+ FILETIME usertimeBegin;
+ FILETIME kerneltimeBegin;
+#else
+ clock_t ticksBegin;
+#endif
+ struct timeval timeBegin;
+};
+static void
+start_cpu_usage_timer(struct cpu_usage_timer *timer)
+{
+#ifdef _WIN32
+ int r;
+ FILETIME createtime, exittime;
+ timer->thread = GetCurrentThread();
+ r = GetThreadTimes(timer->thread, &createtime, &exittime,
+ &timer->usertimeBegin, &timer->kerneltimeBegin);
+ if (r==0) printf("GetThreadTimes failed.");
+#else
+ timer->ticksBegin = clock();
+#endif
+
+ evutil_gettimeofday(&timer->timeBegin, NULL);
+}
+#ifdef _WIN32
+static ev_int64_t
+filetime_to_100nsec(const FILETIME *ft)
+{
+ /* Number of 100-nanosecond units */
+ ev_int64_t n = ft->dwHighDateTime;
+ n <<= 32;
+ n += ft->dwLowDateTime;
+ return n;
+}
+static double
+filetime_diff(const FILETIME *ftStart, const FILETIME *ftEnd)
+{
+ ev_int64_t s, e, diff;
+ double r;
+ s = filetime_to_100nsec(ftStart);
+ e = filetime_to_100nsec(ftEnd);
+ diff = e - s;
+ r = (double) diff;
+ return r / 1.0e7;
+}
+#endif
+
+static void
+get_cpu_usage(struct cpu_usage_timer *timer, double *secElapsedOut,
+ double *secUsedOut, double *usageOut)
+{
+#ifdef _WIN32
+ double usertime_seconds, kerneltime_seconds;
+ FILETIME createtime, exittime, usertimeEnd, kerneltimeEnd;
+ int r;
+#else
+ clock_t ticksEnd;
+#endif
+ struct timeval timeEnd, timeDiff;
+ double secondsPassed, secondsUsed;
+
+#ifdef _WIN32
+ r = GetThreadTimes(timer->thread, &createtime, &exittime,
+ &usertimeEnd, &kerneltimeEnd);
+ if (r==0) printf("GetThreadTimes failed.");
+ usertime_seconds = filetime_diff(&timer->usertimeBegin, &usertimeEnd);
+ kerneltime_seconds = filetime_diff(&timer->kerneltimeBegin, &kerneltimeEnd);
+ secondsUsed = kerneltime_seconds + usertime_seconds;
+#else
+ ticksEnd = clock();
+ secondsUsed = (ticksEnd - timer->ticksBegin) / (double)CLOCKS_PER_SEC;
+#endif
+ evutil_gettimeofday(&timeEnd, NULL);
+ evutil_timersub(&timeEnd, &timer->timeBegin, &timeDiff);
+ secondsPassed = timeDiff.tv_sec + (timeDiff.tv_usec / 1.0e6);
+
+ *secElapsedOut = secondsPassed;
+ *secUsedOut = secondsUsed;
+ *usageOut = secondsUsed / secondsPassed;
+}
+
+static void
+write_cb(evutil_socket_t fd, short event, void *arg)
+{
+ printf("write callback. should only see this once\n");
+
+ /* got what we want remove the event */
+ event_del(*(struct event**)arg);
+
+ /* opps changed my mind add it back again */
+ event_add(*(struct event**)arg,NULL);
+
+ /* not a good day for decisiveness, I really didn't want it after all */
+ event_del(*(struct event**)arg);
+
+}
+
+static void
+timeout_cb(evutil_socket_t fd, short event, void *arg)
+{
+ printf("timeout fired, time to end test\n");
+ event_del(*(struct event**)arg);
+ return;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event* ev;
+ struct event* timeout;
+ struct event_base* base;
+
+ evutil_socket_t pair[2];
+ struct timeval tv;
+ struct cpu_usage_timer timer;
+
+ double usage, secPassed, secUsed;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+ return (1);
+
+ /* Initalize the event library */
+ if (!(base = event_base_new()))
+ return (1);
+
+ /* Initalize a timeout to terminate the test */
+ timeout = evtimer_new(base,timeout_cb,&timeout);
+ /* and watch for writability on one end of the pipe */
+ ev = event_new(base,pair[1],EV_WRITE | EV_PERSIST, write_cb, &ev);
+
+ tv.tv_sec = 1;
+ tv.tv_usec = 500*1000;
+
+ evtimer_add(timeout, &tv);
+
+ event_add(ev, NULL);
+
+ start_cpu_usage_timer(&timer);
+
+ event_base_dispatch(base);
+
+ event_free(ev);
+ event_free(timeout);
+ event_base_free(base);
+
+ get_cpu_usage(&timer, &secPassed, &secUsed, &usage);
+
+ /* attempt to calculate our cpu usage over the test should be
+ virtually nil */
+
+ printf("usec used=%d, usec passed=%d, cpu usage=%.2f%%\n",
+ (int)(secUsed*1e6),
+ (int)(secPassed*1e6),
+ usage*100);
+
+ if (usage > 50.0) /* way too high */
+ return 1;
+
+ return 0;
+}
+
diff --git a/sntp/libevent/test/test-closed.c b/sntp/libevent/test/test-closed.c
new file mode 100644
index 000000000000..5b04f354acc9
--- /dev/null
+++ b/sntp/libevent/test/test-closed.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2013 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#else
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event.h>
+#include <evutil.h>
+
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+struct timeval timeout = {3, 0};
+
+static void
+closed_cb(evutil_socket_t fd, short event, void *arg)
+{
+ if (EV_TIMEOUT & event) {
+ printf("%s: Timeout!\n", __func__);
+ exit(1);
+ }
+
+ if (EV_CLOSED & event) {
+ printf("%s: detected socket close with success\n", __func__);
+ return;
+ }
+
+ printf("%s: unable to detect socket close\n", __func__);
+ exit(1);
+}
+
+#ifndef SHUT_WR
+#define SHUT_WR 1
+#endif
+
+int
+main(int argc, char **argv)
+{
+ struct event_base *base;
+ struct event_config *cfg;
+ struct event *ev;
+ const char *test = "test string";
+ evutil_socket_t pair[2];
+
+ /* Initialize the library and check if the backend
+ supports EV_FEATURE_EARLY_CLOSE
+ */
+ cfg = event_config_new();
+ event_config_require_features(cfg, EV_FEATURE_EARLY_CLOSE);
+ base = event_base_new_with_config(cfg);
+ event_config_free(cfg);
+ if (!base) {
+ /* Backend doesn't support EV_FEATURE_EARLY_CLOSE */
+ return 0;
+ }
+
+ /* Create a pair of sockets */
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+ return (1);
+
+ /* Send some data on socket 0 and immediately close it */
+ if (send(pair[0], test, (int)strlen(test)+1, 0) < 0)
+ return (1);
+ shutdown(pair[0], SHUT_WR);
+
+ /* Dispatch */
+ ev = event_new(base, pair[1], EV_CLOSED | EV_TIMEOUT, closed_cb, event_self_cbarg());
+ event_add(ev, &timeout);
+ event_base_dispatch(base);
+
+ /* Finalize library */
+ event_base_free(base);
+ return 0;
+}
+
diff --git a/sntp/libevent/test/test-dumpevents.c b/sntp/libevent/test/test-dumpevents.c
new file mode 100644
index 000000000000..1c272d4c0160
--- /dev/null
+++ b/sntp/libevent/test/test-dumpevents.c
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "util-internal.h"
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <event2/event.h>
+#include <signal.h>
+
+static void
+sock_perror(const char *s)
+{
+#ifdef _WIN32
+ const char *err = evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR());
+ fprintf(stderr, "%s: %s\n", s, err);
+#else
+ perror(s);
+#endif
+}
+
+static void
+callback1(evutil_socket_t fd, short events, void *arg)
+{
+}
+static void
+callback2(evutil_socket_t fd, short events, void *arg)
+{
+}
+
+/* Testing code for event_base_dump_events().
+
+ Notes that just because we have code to exercise this function,
+ doesn't mean that *ANYTHING* about the output format is guaranteed to
+ remain in the future.
+ */
+int
+main(int argc, char **argv)
+{
+#define N_EVENTS 13
+ int i;
+ struct event *ev[N_EVENTS];
+ evutil_socket_t pair1[2];
+ evutil_socket_t pair2[2];
+ struct timeval tv_onesec = {1,0};
+ struct timeval tv_two5sec = {2,500*1000};
+ const struct timeval *tv_onesec_common;
+ const struct timeval *tv_two5sec_common;
+ struct event_base *base;
+ struct timeval now;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+#ifdef _WIN32
+#define LOCAL_SOCKETPAIR_AF AF_INET
+#else
+#define LOCAL_SOCKETPAIR_AF AF_UNIX
+#endif
+
+ if (evutil_make_internal_pipe_(pair1) < 0 ||
+ evutil_make_internal_pipe_(pair2) < 0) {
+ sock_perror("evutil_make_internal_pipe_");
+ return 1;
+ }
+
+ if (!(base = event_base_new())) {
+ fprintf(stderr,"Couldn't make event_base\n");
+ return 2;
+ }
+
+ tv_onesec_common = event_base_init_common_timeout(base, &tv_onesec);
+ tv_two5sec_common = event_base_init_common_timeout(base, &tv_two5sec);
+
+ ev[0] = event_new(base, pair1[0], EV_WRITE, callback1, NULL);
+ ev[1] = event_new(base, pair1[1], EV_READ|EV_PERSIST, callback1, NULL);
+ ev[2] = event_new(base, pair2[0], EV_WRITE|EV_PERSIST, callback2, NULL);
+ ev[3] = event_new(base, pair2[1], EV_READ, callback2, NULL);
+
+ /* For timers */
+ ev[4] = evtimer_new(base, callback1, NULL);
+ ev[5] = evtimer_new(base, callback1, NULL);
+ ev[6] = evtimer_new(base, callback1, NULL);
+ ev[7] = event_new(base, -1, EV_PERSIST, callback2, NULL);
+ ev[8] = event_new(base, -1, EV_PERSIST, callback2, NULL);
+ ev[9] = event_new(base, -1, EV_PERSIST, callback2, NULL);
+
+ /* To activate */
+ ev[10] = event_new(base, -1, 0, callback1, NULL);
+ ev[11] = event_new(base, -1, 0, callback2, NULL);
+
+ /* Signals */
+ ev[12] = evsignal_new(base, SIGINT, callback2, NULL);
+
+ event_add(ev[0], NULL);
+ event_add(ev[1], &tv_onesec);
+ event_add(ev[2], tv_onesec_common);
+ event_add(ev[3], tv_two5sec_common);
+
+ event_add(ev[4], tv_onesec_common);
+ event_add(ev[5], tv_onesec_common);
+ event_add(ev[6], &tv_onesec);
+ event_add(ev[7], tv_two5sec_common);
+ event_add(ev[8], tv_onesec_common);
+ event_add(ev[9], &tv_two5sec);
+
+ event_active(ev[10], EV_READ, 1);
+ event_active(ev[11], EV_READ|EV_WRITE|EV_TIMEOUT, 1);
+ event_active(ev[1], EV_READ, 1);
+
+ event_add(ev[12], NULL);
+
+ evutil_gettimeofday(&now,NULL);
+ puts("=====expected");
+ printf("Now= %ld.%06d\n",(long)now.tv_sec,(int)now.tv_usec);
+ puts("Inserted:");
+ printf(" %p [fd %ld] Write\n",ev[0],(long)pair1[0]);
+ printf(" %p [fd %ld] Read Persist Timeout=T+1\n",ev[1],(long)pair1[1]);
+ printf(" %p [fd %ld] Write Persist Timeout=T+1\n",ev[2],(long)pair2[0]);
+ printf(" %p [fd %ld] Read Timeout=T+2.5\n",ev[3],(long)pair2[1]);
+ printf(" %p [fd -1] Timeout=T+1\n",ev[4]);
+ printf(" %p [fd -1] Timeout=T+1\n",ev[5]);
+ printf(" %p [fd -1] Timeout=T+1\n",ev[6]);
+ printf(" %p [fd -1] Persist Timeout=T+2.5\n",ev[7]);
+ printf(" %p [fd -1] Persist Timeout=T+1\n",ev[8]);
+ printf(" %p [fd -1] Persist Timeout=T+2.5\n",ev[9]);
+ printf(" %p [sig %d] Signal Persist\n", ev[12], (int)SIGINT);
+
+ puts("Active:");
+ printf(" %p [fd -1, priority=0] Read active\n", ev[10]);
+ printf(" %p [fd -1, priority=0] Read Write Timeout active\n", ev[11]);
+ printf(" %p [fd %ld, priority=0] Read active\n", ev[1], (long)pair1[1]);
+
+ puts("======received");
+ event_base_dump_events(base, stdout);
+
+ for (i = 0; i < N_EVENTS; ++i) {
+ event_free(ev[i]);
+ }
+ event_base_free(base);
+
+ return 0;
+}
+
diff --git a/sntp/libevent/test/test-eof.c b/sntp/libevent/test/test-eof.c
new file mode 100644
index 000000000000..a9ca5343a2ce
--- /dev/null
+++ b/sntp/libevent/test/test-eof.c
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#else
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <event.h>
+#include <evutil.h>
+
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+int test_okay = 1;
+int called = 0;
+struct timeval timeout = {60, 0};
+
+static void
+read_cb(evutil_socket_t fd, short event, void *arg)
+{
+ char buf[256];
+ int len;
+
+ if (EV_TIMEOUT & event) {
+ printf("%s: Timeout!\n", __func__);
+ exit(1);
+ }
+
+ len = recv(fd, buf, sizeof(buf), 0);
+
+ printf("%s: read %d%s\n", __func__,
+ len, len ? "" : " - means EOF");
+
+ if (len) {
+ if (!called)
+ event_add(arg, &timeout);
+ } else if (called == 1)
+ test_okay = 0;
+
+ called++;
+}
+
+#ifndef SHUT_WR
+#define SHUT_WR 1
+#endif
+
+int
+main(int argc, char **argv)
+{
+ struct event ev;
+ const char *test = "test string";
+ evutil_socket_t pair[2];
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+ return (1);
+
+
+ if (send(pair[0], test, (int)strlen(test)+1, 0) < 0)
+ return (1);
+ shutdown(pair[0], SHUT_WR);
+
+ /* Initalize the event library */
+ event_init();
+
+ /* Initalize one event */
+ event_set(&ev, pair[1], EV_READ | EV_TIMEOUT, read_cb, &ev);
+
+ event_add(&ev, &timeout);
+
+ event_dispatch();
+
+ return (test_okay);
+}
+
diff --git a/sntp/libevent/test/test-fdleak.c b/sntp/libevent/test/test-fdleak.c
new file mode 100644
index 000000000000..ee2432b71317
--- /dev/null
+++ b/sntp/libevent/test/test-fdleak.c
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2012 Ross Lagerwall <rosslagerwall@gmail.com>
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#ifdef EVENT__HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#include "event2/event.h"
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/listener.h"
+
+/* Number of requests to make. Setting this too high might result in the machine
+ running out of ephemeral ports */
+#ifdef _WIN32
+#define MAX_REQUESTS 1000
+#else
+#define MAX_REQUESTS 4000
+#endif
+
+/* Provide storage for the address, both for the server & the clients */
+static struct sockaddr_in sin;
+
+/* Number of sucessful requests so far */
+static int num_requests;
+
+static void start_client(struct event_base *base);
+
+static void
+my_perror(const char *s)
+{
+ fprintf(stderr, "%s: %s",
+ s, evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR()));
+}
+
+/*
+===============================================
+Server functions
+===============================================
+*/
+
+/* Read a byte from the client and write it back */
+static void
+server_read_cb(struct bufferevent *bev, void *ctx)
+{
+ while (evbuffer_get_length(bufferevent_get_input(bev))) {
+ unsigned char tmp;
+ bufferevent_read(bev, &tmp, 1);
+ bufferevent_write(bev, &tmp, 1);
+ }
+}
+
+/* Wait for an EOF and then free the bufferevent */
+static void
+server_event_cb(struct bufferevent *bev, short events, void *ctx)
+{
+ if (events & BEV_EVENT_ERROR) {
+ my_perror("Error from bufferevent");
+ exit(1);
+ } else if (events & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) {
+ bufferevent_free(bev);
+ }
+}
+
+/* Accept a client socket and set it up to for reading & writing */
+static void
+listener_accept_cb(struct evconnlistener *listener, evutil_socket_t sock,
+ struct sockaddr *addr, int len, void *ptr)
+{
+ struct event_base *base = evconnlistener_get_base(listener);
+ struct bufferevent *bev = bufferevent_socket_new(base, sock,
+ BEV_OPT_CLOSE_ON_FREE);
+
+ bufferevent_setcb(bev, server_read_cb, NULL, server_event_cb, NULL);
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+}
+
+/* Start the server listening on a random port and start the first client. */
+static void
+start_loop(void)
+{
+ struct event_base *base;
+ struct evconnlistener *listener;
+ struct sockaddr_storage ss;
+ ev_socklen_t socklen = sizeof(ss);
+ evutil_socket_t fd;
+
+ base = event_base_new();
+ if (base == NULL) {
+ puts("Could not open event base!");
+ exit(1);
+ }
+
+ listener = evconnlistener_new_bind(base, listener_accept_cb, NULL,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE,
+ -1, (struct sockaddr *)&sin, sizeof(sin));
+ if (listener == NULL) {
+ my_perror("Could not create listener!");
+ exit(1);
+ }
+ fd = evconnlistener_get_fd(listener);
+ if (fd < 0) {
+ puts("Couldn't get fd from listener");
+ exit(1);
+ }
+ if (getsockname(fd, (struct sockaddr *)&ss, &socklen) < 0) {
+ my_perror("getsockname()");
+ exit(1);
+ }
+ memcpy(&sin, &ss, sizeof(sin));
+ if (sin.sin_family != AF_INET) {
+ puts("AF mismatch from getsockname().");
+ exit(1);
+ }
+
+ start_client(base);
+
+ event_base_dispatch(base);
+}
+
+/*
+===============================================
+Client functions
+===============================================
+*/
+
+/* Check that the server sends back the same byte that the client sent.
+ If MAX_REQUESTS have been reached, exit. Otherwise, start another client. */
+static void
+client_read_cb(struct bufferevent *bev, void *ctx)
+{
+ unsigned char tmp;
+ struct event_base *base = bufferevent_get_base(bev);
+
+ bufferevent_read(bev, &tmp, 1);
+ if (tmp != 'A') {
+ puts("Incorrect data received!");
+ exit(2);
+ }
+ bufferevent_free(bev);
+
+ num_requests++;
+ if (num_requests == MAX_REQUESTS) {
+ event_base_loopbreak(base);
+ } else {
+ start_client(base);
+ }
+}
+
+/* Send a byte to the server. */
+static void
+client_event_cb(struct bufferevent *bev, short events, void *ctx)
+{
+ if (events & BEV_EVENT_CONNECTED) {
+ unsigned char tmp = 'A';
+ bufferevent_write(bev, &tmp, 1);
+ } else if (events & BEV_EVENT_ERROR) {
+ puts("Client socket got error!");
+ exit(2);
+ }
+
+ bufferevent_enable(bev, EV_READ);
+}
+
+/* Open a client socket to connect to localhost on sin */
+static void
+start_client(struct event_base *base)
+{
+ struct bufferevent *bev = bufferevent_socket_new(base, -1,
+ BEV_OPT_CLOSE_ON_FREE);
+ bufferevent_setcb(bev, client_read_cb, NULL, client_event_cb, NULL);
+
+ if (bufferevent_socket_connect(bev, (struct sockaddr *)&sin,
+ sizeof(sin)) < 0) {
+ my_perror("Could not connect!");
+ bufferevent_free(bev);
+ exit(2);
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+#ifdef EVENT__HAVE_SETRLIMIT
+ /* Set the fd limit to a low value so that any fd leak is caught without
+ making many requests. */
+ struct rlimit rl;
+ rl.rlim_cur = rl.rlim_max = 20;
+ if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
+ my_perror("setrlimit");
+ exit(3);
+ }
+#endif
+
+#ifdef _WIN32
+ WSADATA WSAData;
+ WSAStartup(0x101, &WSAData);
+#endif
+
+ /* Set up an address, used by both client & server. */
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001);
+ sin.sin_port = 0; /* Tell the implementation to pick a port. */
+
+ start_loop();
+
+ return 0;
+}
+
+/* XXX why does this test cause so much latency sometimes (OSX 10.5)? */
diff --git a/sntp/libevent/test/test-init.c b/sntp/libevent/test/test-init.c
new file mode 100644
index 000000000000..92fbc6b14659
--- /dev/null
+++ b/sntp/libevent/test/test-init.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include <event.h>
+
+int
+main(int argc, char **argv)
+{
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ /* Initalize the event library */
+ event_init();
+
+ return (0);
+}
+
diff --git a/sntp/libevent/test/test-ratelim.c b/sntp/libevent/test/test-ratelim.c
new file mode 100644
index 000000000000..27649b8490e0
--- /dev/null
+++ b/sntp/libevent/test/test-ratelim.c
@@ -0,0 +1,602 @@
+/*
+ * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "../util-internal.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/socket.h>
+#include <netinet/in.h>
+# ifdef _XOPEN_SOURCE_EXTENDED
+# include <arpa/inet.h>
+# endif
+#endif
+#include <signal.h>
+
+#include "event2/bufferevent.h"
+#include "event2/buffer.h"
+#include "event2/event.h"
+#include "event2/util.h"
+#include "event2/listener.h"
+#include "event2/thread.h"
+
+
+static int cfg_verbose = 0;
+static int cfg_help = 0;
+
+static int cfg_n_connections = 30;
+static int cfg_duration = 5;
+static int cfg_connlimit = 0;
+static int cfg_grouplimit = 0;
+static int cfg_tick_msec = 1000;
+static int cfg_min_share = -1;
+static int cfg_group_drain = 0;
+
+static int cfg_connlimit_tolerance = -1;
+static int cfg_grouplimit_tolerance = -1;
+static int cfg_stddev_tolerance = -1;
+
+#ifdef _WIN32
+static int cfg_enable_iocp = 0;
+#endif
+
+static struct timeval cfg_tick = { 0, 500*1000 };
+
+static struct ev_token_bucket_cfg *conn_bucket_cfg = NULL;
+static struct ev_token_bucket_cfg *group_bucket_cfg = NULL;
+struct bufferevent_rate_limit_group *ratelim_group = NULL;
+static double seconds_per_tick = 0.0;
+
+struct client_state {
+ size_t queued;
+ ev_uint64_t received;
+
+};
+static const struct timeval *ms100_common=NULL;
+
+/* info from check_bucket_levels_cb */
+static int total_n_bev_checks = 0;
+static ev_int64_t total_rbucket_level=0;
+static ev_int64_t total_wbucket_level=0;
+static ev_int64_t total_max_to_read=0;
+static ev_int64_t total_max_to_write=0;
+static ev_int64_t max_bucket_level=EV_INT64_MIN;
+static ev_int64_t min_bucket_level=EV_INT64_MAX;
+
+/* from check_group_bucket_levels_cb */
+static int total_n_group_bev_checks = 0;
+static ev_int64_t total_group_rbucket_level = 0;
+static ev_int64_t total_group_wbucket_level = 0;
+
+static int n_echo_conns_open = 0;
+
+/* Info on the open connections */
+struct bufferevent **bevs;
+struct client_state *states;
+struct bufferevent_rate_limit_group *group = NULL;
+
+static void check_bucket_levels_cb(evutil_socket_t fd, short events, void *arg);
+
+static void
+loud_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct client_state *cs = ctx;
+ struct evbuffer *output = bufferevent_get_output(bev);
+ char buf[1024];
+#ifdef _WIN32
+ int r = rand() % 256;
+#else
+ int r = random() % 256;
+#endif
+ memset(buf, r, sizeof(buf));
+ while (evbuffer_get_length(output) < 8192) {
+ evbuffer_add(output, buf, sizeof(buf));
+ cs->queued += sizeof(buf);
+ }
+}
+
+static void
+discard_readcb(struct bufferevent *bev, void *ctx)
+{
+ struct client_state *cs = ctx;
+ struct evbuffer *input = bufferevent_get_input(bev);
+ size_t len = evbuffer_get_length(input);
+ evbuffer_drain(input, len);
+ cs->received += len;
+}
+
+static void
+write_on_connectedcb(struct bufferevent *bev, short what, void *ctx)
+{
+ if (what & BEV_EVENT_CONNECTED) {
+ loud_writecb(bev, ctx);
+ /* XXXX this shouldn't be needed. */
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+ }
+}
+
+static void
+echo_readcb(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *input = bufferevent_get_input(bev);
+ struct evbuffer *output = bufferevent_get_output(bev);
+
+ evbuffer_add_buffer(output, input);
+ if (evbuffer_get_length(output) > 1024000)
+ bufferevent_disable(bev, EV_READ);
+}
+
+static void
+echo_writecb(struct bufferevent *bev, void *ctx)
+{
+ struct evbuffer *output = bufferevent_get_output(bev);
+ if (evbuffer_get_length(output) < 512000)
+ bufferevent_enable(bev, EV_READ);
+}
+
+static void
+echo_eventcb(struct bufferevent *bev, short what, void *ctx)
+{
+ if (what & (BEV_EVENT_EOF|BEV_EVENT_ERROR)) {
+ --n_echo_conns_open;
+ bufferevent_free(bev);
+ }
+}
+
+static void
+echo_listenercb(struct evconnlistener *listener, evutil_socket_t newsock,
+ struct sockaddr *sourceaddr, int socklen, void *ctx)
+{
+ struct event_base *base = ctx;
+ int flags = BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE;
+ struct bufferevent *bev;
+
+ bev = bufferevent_socket_new(base, newsock, flags);
+ bufferevent_setcb(bev, echo_readcb, echo_writecb, echo_eventcb, NULL);
+ if (conn_bucket_cfg) {
+ struct event *check_event =
+ event_new(base, -1, EV_PERSIST, check_bucket_levels_cb, bev);
+ bufferevent_set_rate_limit(bev, conn_bucket_cfg);
+
+ assert(bufferevent_get_token_bucket_cfg(bev) != NULL);
+ event_add(check_event, ms100_common);
+ }
+ if (ratelim_group)
+ bufferevent_add_to_rate_limit_group(bev, ratelim_group);
+ ++n_echo_conns_open;
+ bufferevent_enable(bev, EV_READ|EV_WRITE);
+}
+
+/* Called periodically to check up on how full the buckets are */
+static void
+check_bucket_levels_cb(evutil_socket_t fd, short events, void *arg)
+{
+ struct bufferevent *bev = arg;
+
+ ev_ssize_t r = bufferevent_get_read_limit(bev);
+ ev_ssize_t w = bufferevent_get_write_limit(bev);
+ ev_ssize_t rm = bufferevent_get_max_to_read(bev);
+ ev_ssize_t wm = bufferevent_get_max_to_write(bev);
+ /* XXXX check that no value is above the cofigured burst
+ * limit */
+ total_rbucket_level += r;
+ total_wbucket_level += w;
+ total_max_to_read += rm;
+ total_max_to_write += wm;
+#define B(x) \
+ if ((x) > max_bucket_level) \
+ max_bucket_level = (x); \
+ if ((x) < min_bucket_level) \
+ min_bucket_level = (x)
+ B(r);
+ B(w);
+#undef B
+
+ total_n_bev_checks++;
+ if (total_n_bev_checks >= .8 * (cfg_duration / cfg_tick_msec) * cfg_n_connections) {
+ event_free(event_base_get_running_event(bufferevent_get_base(bev)));
+ }
+}
+
+static void
+check_group_bucket_levels_cb(evutil_socket_t fd, short events, void *arg)
+{
+ if (ratelim_group) {
+ ev_ssize_t r = bufferevent_rate_limit_group_get_read_limit(ratelim_group);
+ ev_ssize_t w = bufferevent_rate_limit_group_get_write_limit(ratelim_group);
+ total_group_rbucket_level += r;
+ total_group_wbucket_level += w;
+ }
+ ++total_n_group_bev_checks;
+}
+
+static void
+group_drain_cb(evutil_socket_t fd, short events, void *arg)
+{
+ bufferevent_rate_limit_group_decrement_read(ratelim_group, cfg_group_drain);
+ bufferevent_rate_limit_group_decrement_write(ratelim_group, cfg_group_drain);
+}
+
+static int
+test_ratelimiting(void)
+{
+ struct event_base *base;
+ struct sockaddr_in sin;
+ struct evconnlistener *listener;
+
+ struct sockaddr_storage ss;
+ ev_socklen_t slen;
+
+ int i;
+
+ struct timeval tv;
+
+ ev_uint64_t total_received;
+ double total_sq_persec, total_persec;
+ double variance;
+ double expected_total_persec = -1.0, expected_avg_persec = -1.0;
+ int ok = 1;
+ struct event_config *base_cfg;
+ struct event *periodic_level_check;
+ struct event *group_drain_event=NULL;
+
+ memset(&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */
+ sin.sin_port = 0; /* unspecified port */
+
+ if (0)
+ event_enable_debug_mode();
+
+ base_cfg = event_config_new();
+
+#ifdef _WIN32
+ if (cfg_enable_iocp) {
+ evthread_use_windows_threads();
+ event_config_set_flag(base_cfg, EVENT_BASE_FLAG_STARTUP_IOCP);
+ }
+#endif
+
+ base = event_base_new_with_config(base_cfg);
+ event_config_free(base_cfg);
+ if (! base) {
+ fprintf(stderr, "Couldn't create event_base");
+ return 1;
+ }
+
+ listener = evconnlistener_new_bind(base, echo_listenercb, base,
+ LEV_OPT_CLOSE_ON_FREE|LEV_OPT_REUSEABLE, -1,
+ (struct sockaddr *)&sin, sizeof(sin));
+ if (! listener) {
+ fprintf(stderr, "Couldn't create listener");
+ return 1;
+ }
+
+ slen = sizeof(ss);
+ if (getsockname(evconnlistener_get_fd(listener), (struct sockaddr *)&ss,
+ &slen) < 0) {
+ perror("getsockname");
+ return 1;
+ }
+
+ if (cfg_connlimit > 0) {
+ conn_bucket_cfg = ev_token_bucket_cfg_new(
+ cfg_connlimit, cfg_connlimit * 4,
+ cfg_connlimit, cfg_connlimit * 4,
+ &cfg_tick);
+ assert(conn_bucket_cfg);
+ }
+
+ if (cfg_grouplimit > 0) {
+ group_bucket_cfg = ev_token_bucket_cfg_new(
+ cfg_grouplimit, cfg_grouplimit * 4,
+ cfg_grouplimit, cfg_grouplimit * 4,
+ &cfg_tick);
+ group = ratelim_group = bufferevent_rate_limit_group_new(
+ base, group_bucket_cfg);
+ expected_total_persec = cfg_grouplimit - (cfg_group_drain / seconds_per_tick);
+ expected_avg_persec = cfg_grouplimit / cfg_n_connections;
+ if (cfg_connlimit > 0 && expected_avg_persec > cfg_connlimit)
+ expected_avg_persec = cfg_connlimit;
+ if (cfg_min_share >= 0)
+ bufferevent_rate_limit_group_set_min_share(
+ ratelim_group, cfg_min_share);
+ }
+
+ if (expected_avg_persec < 0 && cfg_connlimit > 0)
+ expected_avg_persec = cfg_connlimit;
+
+ if (expected_avg_persec > 0)
+ expected_avg_persec /= seconds_per_tick;
+ if (expected_total_persec > 0)
+ expected_total_persec /= seconds_per_tick;
+
+ bevs = calloc(cfg_n_connections, sizeof(struct bufferevent *));
+ states = calloc(cfg_n_connections, sizeof(struct client_state));
+
+ for (i = 0; i < cfg_n_connections; ++i) {
+ bevs[i] = bufferevent_socket_new(base, -1,
+ BEV_OPT_CLOSE_ON_FREE|BEV_OPT_THREADSAFE);
+ assert(bevs[i]);
+ bufferevent_setcb(bevs[i], discard_readcb, loud_writecb,
+ write_on_connectedcb, &states[i]);
+ bufferevent_enable(bevs[i], EV_READ|EV_WRITE);
+ bufferevent_socket_connect(bevs[i], (struct sockaddr *)&ss,
+ slen);
+ }
+
+ tv.tv_sec = cfg_duration - 1;
+ tv.tv_usec = 995000;
+
+ event_base_loopexit(base, &tv);
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 100*1000;
+ ms100_common = event_base_init_common_timeout(base, &tv);
+
+ periodic_level_check = event_new(base, -1, EV_PERSIST, check_group_bucket_levels_cb, NULL);
+ event_add(periodic_level_check, ms100_common);
+
+ if (cfg_group_drain && ratelim_group) {
+ group_drain_event = event_new(base, -1, EV_PERSIST, group_drain_cb, NULL);
+ event_add(group_drain_event, &cfg_tick);
+ }
+
+ event_base_dispatch(base);
+
+ ratelim_group = NULL; /* So no more responders get added */
+ event_free(periodic_level_check);
+ if (group_drain_event)
+ event_del(group_drain_event);
+
+ for (i = 0; i < cfg_n_connections; ++i) {
+ bufferevent_free(bevs[i]);
+ }
+ evconnlistener_free(listener);
+
+ /* Make sure no new echo_conns get added to the group. */
+ ratelim_group = NULL;
+
+ /* This should get _everybody_ freed */
+ while (n_echo_conns_open) {
+ printf("waiting for %d conns\n", n_echo_conns_open);
+ tv.tv_sec = 0;
+ tv.tv_usec = 300000;
+ event_base_loopexit(base, &tv);
+ event_base_dispatch(base);
+ }
+
+ if (group)
+ bufferevent_rate_limit_group_free(group);
+
+ if (total_n_bev_checks) {
+ printf("Average read bucket level: %f\n",
+ (double)total_rbucket_level/total_n_bev_checks);
+ printf("Average write bucket level: %f\n",
+ (double)total_wbucket_level/total_n_bev_checks);
+ printf("Highest read bucket level: %f\n",
+ (double)max_bucket_level);
+ printf("Highest write bucket level: %f\n",
+ (double)min_bucket_level);
+ printf("Average max-to-read: %f\n",
+ ((double)total_max_to_read)/total_n_bev_checks);
+ printf("Average max-to-write: %f\n",
+ ((double)total_max_to_write)/total_n_bev_checks);
+ }
+ if (total_n_group_bev_checks) {
+ printf("Average group read bucket level: %f\n",
+ ((double)total_group_rbucket_level)/total_n_group_bev_checks);
+ printf("Average group write bucket level: %f\n",
+ ((double)total_group_wbucket_level)/total_n_group_bev_checks);
+ }
+
+ total_received = 0;
+ total_persec = 0.0;
+ total_sq_persec = 0.0;
+ for (i=0; i < cfg_n_connections; ++i) {
+ double persec = states[i].received;
+ persec /= cfg_duration;
+ total_received += states[i].received;
+ total_persec += persec;
+ total_sq_persec += persec*persec;
+ printf("%d: %f per second\n", i+1, persec);
+ }
+ printf(" total: %f per second\n",
+ ((double)total_received)/cfg_duration);
+ if (expected_total_persec > 0) {
+ double diff = expected_total_persec -
+ ((double)total_received/cfg_duration);
+ printf(" [Off by %lf]\n", diff);
+ if (cfg_grouplimit_tolerance > 0 &&
+ fabs(diff) > cfg_grouplimit_tolerance) {
+ fprintf(stderr, "Group bandwidth out of bounds\n");
+ ok = 0;
+ }
+ }
+
+ printf(" average: %f per second\n",
+ (((double)total_received)/cfg_duration)/cfg_n_connections);
+ if (expected_avg_persec > 0) {
+ double diff = expected_avg_persec - (((double)total_received)/cfg_duration)/cfg_n_connections;
+ printf(" [Off by %lf]\n", diff);
+ if (cfg_connlimit_tolerance > 0 &&
+ fabs(diff) > cfg_connlimit_tolerance) {
+ fprintf(stderr, "Connection bandwidth out of bounds\n");
+ ok = 0;
+ }
+ }
+
+ variance = total_sq_persec/cfg_n_connections - total_persec*total_persec/(cfg_n_connections*cfg_n_connections);
+
+ printf(" stddev: %f per second\n", sqrt(variance));
+ if (cfg_stddev_tolerance > 0 &&
+ sqrt(variance) > cfg_stddev_tolerance) {
+ fprintf(stderr, "Connection variance out of bounds\n");
+ ok = 0;
+ }
+
+ event_base_free(base);
+ free(bevs);
+ free(states);
+
+ return ok ? 0 : 1;
+}
+
+static struct option {
+ const char *name; int *ptr; int min; int isbool;
+} options[] = {
+ { "-v", &cfg_verbose, 0, 1 },
+ { "-h", &cfg_help, 0, 1 },
+ { "-n", &cfg_n_connections, 1, 0 },
+ { "-d", &cfg_duration, 1, 0 },
+ { "-c", &cfg_connlimit, 0, 0 },
+ { "-g", &cfg_grouplimit, 0, 0 },
+ { "-G", &cfg_group_drain, -100000, 0 },
+ { "-t", &cfg_tick_msec, 10, 0 },
+ { "--min-share", &cfg_min_share, 0, 0 },
+ { "--check-connlimit", &cfg_connlimit_tolerance, 0, 0 },
+ { "--check-grouplimit", &cfg_grouplimit_tolerance, 0, 0 },
+ { "--check-stddev", &cfg_stddev_tolerance, 0, 0 },
+#ifdef _WIN32
+ { "--iocp", &cfg_enable_iocp, 0, 1 },
+#endif
+ { NULL, NULL, -1, 0 },
+};
+
+static int
+handle_option(int argc, char **argv, int *i, const struct option *opt)
+{
+ long val;
+ char *endptr = NULL;
+ if (opt->isbool) {
+ *opt->ptr = 1;
+ return 0;
+ }
+ if (*i + 1 == argc) {
+ fprintf(stderr, "Too few arguments to '%s'\n",argv[*i]);
+ return -1;
+ }
+ val = strtol(argv[*i+1], &endptr, 10);
+ if (*argv[*i+1] == '\0' || !endptr || *endptr != '\0') {
+ fprintf(stderr, "Couldn't parse numeric value '%s'\n",
+ argv[*i+1]);
+ return -1;
+ }
+ if (val < opt->min || val > 0x7fffffff) {
+ fprintf(stderr, "Value '%s' is out-of-range'\n",
+ argv[*i+1]);
+ return -1;
+ }
+ *opt->ptr = (int)val;
+ ++*i;
+ return 0;
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr,
+"test-ratelim [-v] [-n INT] [-d INT] [-c INT] [-g INT] [-t INT]\n\n"
+"Pushes bytes through a number of possibly rate-limited connections, and\n"
+"displays average throughput.\n\n"
+" -n INT: Number of connections to open (default: 30)\n"
+" -d INT: Duration of the test in seconds (default: 5 sec)\n");
+ fprintf(stderr,
+" -c INT: Connection-rate limit applied to each connection in bytes per second\n"
+" (default: None.)\n"
+" -g INT: Group-rate limit applied to sum of all usage in bytes per second\n"
+" (default: None.)\n"
+" -G INT: drain INT bytes from the group limit every tick. (default: 0)\n"
+" -t INT: Granularity of timing, in milliseconds (default: 1000 msec)\n");
+}
+
+int
+main(int argc, char **argv)
+{
+ int i,j;
+ double ratio;
+
+#ifdef _WIN32
+ WORD wVersionRequested = MAKEWORD(2,2);
+ WSADATA wsaData;
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+#ifndef _WIN32
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return 1;
+#endif
+ for (i = 1; i < argc; ++i) {
+ for (j = 0; options[j].name; ++j) {
+ if (!strcmp(argv[i],options[j].name)) {
+ if (handle_option(argc,argv,&i,&options[j])<0)
+ return 1;
+ goto again;
+ }
+ }
+ fprintf(stderr, "Unknown option '%s'\n", argv[i]);
+ usage();
+ return 1;
+ again:
+ ;
+ }
+ if (cfg_help) {
+ usage();
+ return 0;
+ }
+
+ cfg_tick.tv_sec = cfg_tick_msec / 1000;
+ cfg_tick.tv_usec = (cfg_tick_msec % 1000)*1000;
+
+ seconds_per_tick = ratio = cfg_tick_msec / 1000.0;
+
+ cfg_connlimit *= ratio;
+ cfg_grouplimit *= ratio;
+
+ {
+ struct timeval tv;
+ evutil_gettimeofday(&tv, NULL);
+#ifdef _WIN32
+ srand(tv.tv_usec);
+#else
+ srandom(tv.tv_usec);
+#endif
+ }
+
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
+ evthread_enable_lock_debugging();
+#endif
+
+ return test_ratelimiting();
+}
diff --git a/sntp/libevent/test/test-time.c b/sntp/libevent/test/test-time.c
new file mode 100644
index 000000000000..dcd6639a56fb
--- /dev/null
+++ b/sntp/libevent/test/test-time.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+#include <unistd.h>
+#include <sys/time.h>
+#endif
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/event_compat.h"
+#include "event2/event_struct.h"
+
+int called = 0;
+
+#define NEVENT 20000
+
+struct event *ev[NEVENT];
+
+static int
+rand_int(int n)
+{
+#ifdef _WIN32
+ return (int)(rand() % n);
+#else
+ return (int)(random() % n);
+#endif
+}
+
+static void
+time_cb(evutil_socket_t fd, short event, void *arg)
+{
+ struct timeval tv;
+ int i, j;
+
+ called++;
+
+ if (called < 10*NEVENT) {
+ for (i = 0; i < 10; i++) {
+ j = rand_int(NEVENT);
+ tv.tv_sec = 0;
+ tv.tv_usec = rand_int(50000);
+ if (tv.tv_usec % 2)
+ evtimer_add(ev[j], &tv);
+ else
+ evtimer_del(ev[j]);
+ }
+ }
+}
+
+int
+main(int argc, char **argv)
+{
+ struct timeval tv;
+ int i;
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+ /* Initalize the event library */
+ event_init();
+
+ for (i = 0; i < NEVENT; i++) {
+ ev[i] = malloc(sizeof(struct event));
+
+ /* Initalize one event */
+ evtimer_set(ev[i], time_cb, ev[i]);
+ tv.tv_sec = 0;
+ tv.tv_usec = rand_int(50000);
+ evtimer_add(ev[i], &tv);
+ }
+
+ event_dispatch();
+
+ return (called < NEVENT);
+}
+
diff --git a/sntp/libevent/test/test-weof.c b/sntp/libevent/test/test-weof.c
new file mode 100644
index 000000000000..c379f287cb50
--- /dev/null
+++ b/sntp/libevent/test/test-weof.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2002-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#else
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef EVENT__HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+
+#include "event2/event.h"
+#include "event2/event_struct.h"
+#include "event2/event_compat.h"
+#include "event2/util.h"
+
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+evutil_socket_t pair[2];
+int test_okay = 1;
+int called = 0;
+
+static void
+write_cb(evutil_socket_t fd, short event, void *arg)
+{
+ const char *test = "test string";
+ int len;
+
+ len = send(fd, test, (int)strlen(test) + 1, 0);
+
+ printf("%s: write %d%s\n", __func__,
+ len, len ? "" : " - means EOF");
+
+ if (len > 0) {
+ if (!called)
+ event_add(arg, NULL);
+ evutil_closesocket(pair[0]);
+ } else if (called == 1)
+ test_okay = 0;
+
+ called++;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct event ev;
+
+#ifdef _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+
+ wVersionRequested = MAKEWORD(2, 2);
+
+ (void) WSAStartup(wVersionRequested, &wsaData);
+#endif
+
+#ifndef _WIN32
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
+ return (1);
+#endif
+
+ if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+ return (1);
+
+ /* Initalize the event library */
+ event_init();
+
+ /* Initalize one event */
+ event_set(&ev, pair[1], EV_WRITE, write_cb, &ev);
+
+ event_add(&ev, NULL);
+
+ event_dispatch();
+
+ return (test_okay);
+}
+
diff --git a/sntp/libevent/test/test.sh b/sntp/libevent/test/test.sh
new file mode 100755
index 000000000000..2b083ac7f3c9
--- /dev/null
+++ b/sntp/libevent/test/test.sh
@@ -0,0 +1,144 @@
+#!/bin/sh
+
+BACKENDS="EVPORT KQUEUE EPOLL DEVPOLL POLL SELECT WIN32"
+TESTS="test-eof test-closed test-weof test-time test-changelist test-fdleak"
+FAILED=no
+TEST_OUTPUT_FILE=${TEST_OUTPUT_FILE:-/dev/null}
+REGRESS_ARGS=${REGRESS_ARGS:-}
+
+# /bin/echo is a little more likely to support -n than sh's builtin echo,
+# printf is even more likely
+if test "`printf %s hello 2>&1`" = "hello"
+then
+ ECHO_N="printf %s"
+else
+ if test -x /bin/echo
+ then
+ ECHO_N="/bin/echo -n"
+ else
+ ECHO_N="echo -n"
+ fi
+fi
+
+if test "$TEST_OUTPUT_FILE" != "/dev/null"
+then
+ touch "$TEST_OUTPUT_FILE" || exit 1
+fi
+
+TEST_DIR=.
+TEST_SRC_DIR=.
+
+T=`echo "$0" | sed -e 's/test.sh$//' | sed -e 's/test-script.sh//' `
+if test -x "$T/test-init"
+then
+ TEST_DIR="$T"
+elif test -x "./test/test-init"
+then
+ TEST_DIR="./test"
+fi
+if test -f "$T/check-dumpevents.py"
+then
+ TEST_SRC_DIR="$T"
+elif test -f "./test/check-dumpevents.py"
+then
+ TEST_SRC_DIR="./test"
+fi
+
+setup () {
+ for i in $BACKENDS; do
+ eval "EVENT_NO$i=yes; export EVENT_NO$i"
+ done
+ unset EVENT_EPOLL_USE_CHANGELIST
+ unset EVENT_PRECISE_TIMER
+}
+
+announce () {
+ echo "$@"
+ echo "$@" >>"$TEST_OUTPUT_FILE"
+}
+
+announce_n () {
+ $ECHO_N "$@"
+ echo "$@" >>"$TEST_OUTPUT_FILE"
+}
+
+
+run_tests () {
+ if $TEST_DIR/test-init 2>>"$TEST_OUTPUT_FILE" ;
+ then
+ true
+ else
+ announce Skipping test
+ return
+ fi
+ for i in $TESTS; do
+ announce_n " $i: "
+ if $TEST_DIR/$i >>"$TEST_OUTPUT_FILE" ;
+ then
+ announce OKAY ;
+ else
+ announce FAILED ;
+ FAILED=yes
+ fi
+ done
+ announce_n " test-dumpevents: "
+ if python2 -c 'import sys; assert(sys.version_info >= (2, 4))' 2>/dev/null && test -f $TEST_SRC_DIR/check-dumpevents.py; then
+ if $TEST_DIR/test-dumpevents | python2 $TEST_SRC_DIR/check-dumpevents.py >> "$TEST_OUTPUT_FILE" ;
+ then
+ announce OKAY ;
+ else
+ announce FAILED ;
+ fi
+ else
+ # no python
+ if $TEST_DIR/test-dumpevents >/dev/null; then
+ announce "OKAY (output not checked)" ;
+ else
+ announce "FAILED (output not checked)" ;
+ fi
+ fi
+ test -x $TEST_DIR/regress || return
+ announce_n " regress: "
+ if test "$TEST_OUTPUT_FILE" = "/dev/null" ;
+ then
+ $TEST_DIR/regress --quiet $REGRESS_ARGS
+ else
+ $TEST_DIR/regress $REGRESS_ARGS >>"$TEST_OUTPUT_FILE"
+ fi
+ if test "$?" = "0" ;
+ then
+ announce OKAY ;
+ else
+ announce FAILED ;
+ FAILED=yes
+ fi
+}
+
+do_test() {
+ setup
+ announce "$1 $2"
+ unset EVENT_NO$1
+ if test "$2" = "(changelist)" ; then
+ EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST
+ elif test "$2" = "(timerfd)" ; then
+ EVENT_PRECISE_TIMER=1; export EVENT_PRECISE_TIMER
+ elif test "$2" = "(timerfd+changelist)" ; then
+ EVENT_EPOLL_USE_CHANGELIST=yes; export EVENT_EPOLL_USE_CHANGELIST
+ EVENT_PRECISE_TIMER=1; export EVENT_PRECISE_TIMER
+ fi
+
+ run_tests
+}
+
+announce "Running tests:"
+
+do_test EPOLL "(timerfd)"
+do_test EPOLL "(changelist)"
+do_test EPOLL "(timerfd+changelist)"
+for i in $BACKENDS; do
+ do_test $i
+done
+
+if test "$FAILED" = "yes"; then
+ exit 1
+fi
diff --git a/sntp/libevent/test/tinytest.c b/sntp/libevent/test/tinytest.c
new file mode 100644
index 000000000000..36b3a627c48b
--- /dev/null
+++ b/sntp/libevent/test/tinytest.c
@@ -0,0 +1,460 @@
+/* tinytest.c -- Copyright 2009-2012 Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 TINYTEST_LOCAL
+#include "tinytest_local.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#ifdef _WIN32
+#include <windows.h>
+#else
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#endif
+
+#if defined(__APPLE__) && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 && \
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+/* Workaround for a stupid bug in OSX 10.6 */
+#define FORK_BREAKS_GCOV
+#include <vproc.h>
+#endif
+#endif
+
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif
+
+#include "tinytest.h"
+#include "tinytest_macros.h"
+
+#define LONGEST_TEST_NAME 16384
+
+static int in_tinytest_main = 0; /**< true if we're in tinytest_main().*/
+static int n_ok = 0; /**< Number of tests that have passed */
+static int n_bad = 0; /**< Number of tests that have failed. */
+static int n_skipped = 0; /**< Number of tests that have been skipped. */
+
+static int opt_forked = 0; /**< True iff we're called from inside a win32 fork*/
+static int opt_nofork = 0; /**< Suppress calls to fork() for debugging. */
+static int opt_verbosity = 1; /**< -==quiet,0==terse,1==normal,2==verbose */
+const char *verbosity_flag = "";
+
+const struct testlist_alias_t *cfg_aliases=NULL;
+
+enum outcome { SKIP=2, OK=1, FAIL=0 };
+static enum outcome cur_test_outcome = 0;
+const char *cur_test_prefix = NULL; /**< prefix of the current test group */
+/** Name of the current test, if we haven't logged is yet. Used for --quiet */
+const char *cur_test_name = NULL;
+
+#ifdef _WIN32
+/* Copy of argv[0] for win32. */
+static char commandname[MAX_PATH+1];
+#endif
+
+static void usage(struct testgroup_t *groups, int list_groups)
+ __attribute__((noreturn));
+static int process_test_option(struct testgroup_t *groups, const char *test);
+
+static enum outcome
+testcase_run_bare_(const struct testcase_t *testcase)
+{
+ void *env = NULL;
+ int outcome;
+ if (testcase->setup) {
+ env = testcase->setup->setup_fn(testcase);
+ if (!env)
+ return FAIL;
+ else if (env == (void*)TT_SKIP)
+ return SKIP;
+ }
+
+ cur_test_outcome = OK;
+ testcase->fn(env);
+ outcome = cur_test_outcome;
+
+ if (testcase->setup) {
+ if (testcase->setup->cleanup_fn(testcase, env) == 0)
+ outcome = FAIL;
+ }
+
+ return outcome;
+}
+
+#define MAGIC_EXITCODE 42
+
+static enum outcome
+testcase_run_forked_(const struct testgroup_t *group,
+ const struct testcase_t *testcase)
+{
+#ifdef _WIN32
+ /* Fork? On Win32? How primitive! We'll do what the smart kids do:
+ we'll invoke our own exe (whose name we recall from the command
+ line) with a command line that tells it to run just the test we
+ want, and this time without forking.
+
+ (No, threads aren't an option. The whole point of forking is to
+ share no state between tests.)
+ */
+ int ok;
+ char buffer[LONGEST_TEST_NAME+256];
+ STARTUPINFOA si;
+ PROCESS_INFORMATION info;
+ DWORD exitcode;
+
+ if (!in_tinytest_main) {
+ printf("\nERROR. On Windows, testcase_run_forked_ must be"
+ " called from within tinytest_main.\n");
+ abort();
+ }
+ if (opt_verbosity>0)
+ printf("[forking] ");
+
+ snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
+ commandname, verbosity_flag, group->prefix, testcase->name);
+
+ memset(&si, 0, sizeof(si));
+ memset(&info, 0, sizeof(info));
+ si.cb = sizeof(si);
+
+ ok = CreateProcessA(commandname, buffer, NULL, NULL, 0,
+ 0, NULL, NULL, &si, &info);
+ if (!ok) {
+ printf("CreateProcess failed!\n");
+ return 0;
+ }
+ WaitForSingleObject(info.hProcess, INFINITE);
+ GetExitCodeProcess(info.hProcess, &exitcode);
+ CloseHandle(info.hProcess);
+ CloseHandle(info.hThread);
+ if (exitcode == 0)
+ return OK;
+ else if (exitcode == MAGIC_EXITCODE)
+ return SKIP;
+ else
+ return FAIL;
+#else
+ int outcome_pipe[2];
+ pid_t pid;
+ (void)group;
+
+ if (pipe(outcome_pipe))
+ perror("opening pipe");
+
+ if (opt_verbosity>0)
+ printf("[forking] ");
+ pid = fork();
+#ifdef FORK_BREAKS_GCOV
+ vproc_transaction_begin(0);
+#endif
+ if (!pid) {
+ /* child. */
+ int test_r, write_r;
+ char b[1];
+ close(outcome_pipe[0]);
+ test_r = testcase_run_bare_(testcase);
+ assert(0<=(int)test_r && (int)test_r<=2);
+ b[0] = "NYS"[test_r];
+ write_r = (int)write(outcome_pipe[1], b, 1);
+ if (write_r != 1) {
+ perror("write outcome to pipe");
+ exit(1);
+ }
+ exit(0);
+ return FAIL; /* unreachable */
+ } else {
+ /* parent */
+ int status, r;
+ char b[1];
+ /* Close this now, so that if the other side closes it,
+ * our read fails. */
+ close(outcome_pipe[1]);
+ r = (int)read(outcome_pipe[0], b, 1);
+ if (r == 0) {
+ printf("[Lost connection!] ");
+ return 0;
+ } else if (r != 1) {
+ perror("read outcome from pipe");
+ }
+ waitpid(pid, &status, 0);
+ close(outcome_pipe[0]);
+ return b[0]=='Y' ? OK : (b[0]=='S' ? SKIP : FAIL);
+ }
+#endif
+}
+
+int
+testcase_run_one(const struct testgroup_t *group,
+ const struct testcase_t *testcase)
+{
+ enum outcome outcome;
+
+ if (testcase->flags & (TT_SKIP|TT_OFF_BY_DEFAULT)) {
+ if (opt_verbosity>0)
+ printf("%s%s: %s\n",
+ group->prefix, testcase->name,
+ (testcase->flags & TT_SKIP) ? "SKIPPED" : "DISABLED");
+ ++n_skipped;
+ return SKIP;
+ }
+
+ if (opt_verbosity>0 && !opt_forked) {
+ printf("%s%s: ", group->prefix, testcase->name);
+ } else {
+ if (opt_verbosity==0) printf(".");
+ cur_test_prefix = group->prefix;
+ cur_test_name = testcase->name;
+ }
+
+ if ((testcase->flags & TT_FORK) && !(opt_forked||opt_nofork)) {
+ outcome = testcase_run_forked_(group, testcase);
+ } else {
+ outcome = testcase_run_bare_(testcase);
+ }
+
+ if (outcome == OK) {
+ ++n_ok;
+ if (opt_verbosity>0 && !opt_forked)
+ puts(opt_verbosity==1?"OK":"");
+ } else if (outcome == SKIP) {
+ ++n_skipped;
+ if (opt_verbosity>0 && !opt_forked)
+ puts("SKIPPED");
+ } else {
+ ++n_bad;
+ if (!opt_forked)
+ printf("\n [%s FAILED]\n", testcase->name);
+ }
+
+ if (opt_forked) {
+ exit(outcome==OK ? 0 : (outcome==SKIP?MAGIC_EXITCODE : 1));
+ return 1; /* unreachable */
+ } else {
+ return (int)outcome;
+ }
+}
+
+int
+tinytest_set_flag_(struct testgroup_t *groups, const char *arg, int set, unsigned long flag)
+{
+ int i, j;
+ size_t length = LONGEST_TEST_NAME;
+ char fullname[LONGEST_TEST_NAME];
+ int found=0;
+ if (strstr(arg, ".."))
+ length = strstr(arg,"..")-arg;
+ for (i=0; groups[i].prefix; ++i) {
+ for (j=0; groups[i].cases[j].name; ++j) {
+ struct testcase_t *testcase = &groups[i].cases[j];
+ snprintf(fullname, sizeof(fullname), "%s%s",
+ groups[i].prefix, testcase->name);
+ if (!flag) { /* Hack! */
+ printf(" %s", fullname);
+ if (testcase->flags & TT_OFF_BY_DEFAULT)
+ puts(" (Off by default)");
+ else if (testcase->flags & TT_SKIP)
+ puts(" (DISABLED)");
+ else
+ puts("");
+ }
+ if (!strncmp(fullname, arg, length)) {
+ if (set)
+ testcase->flags |= flag;
+ else
+ testcase->flags &= ~flag;
+ ++found;
+ }
+ }
+ }
+ return found;
+}
+
+static void
+usage(struct testgroup_t *groups, int list_groups)
+{
+ puts("Options are: [--verbose|--quiet|--terse] [--no-fork]");
+ puts(" Specify tests by name, or using a prefix ending with '..'");
+ puts(" To skip a test, prefix its name with a colon.");
+ puts(" To enable a disabled test, prefix its name with a plus.");
+ puts(" Use --list-tests for a list of tests.");
+ if (list_groups) {
+ puts("Known tests are:");
+ tinytest_set_flag_(groups, "..", 1, 0);
+ }
+ exit(0);
+}
+
+static int
+process_test_alias(struct testgroup_t *groups, const char *test)
+{
+ int i, j, n, r;
+ for (i=0; cfg_aliases && cfg_aliases[i].name; ++i) {
+ if (!strcmp(cfg_aliases[i].name, test)) {
+ n = 0;
+ for (j = 0; cfg_aliases[i].tests[j]; ++j) {
+ r = process_test_option(groups, cfg_aliases[i].tests[j]);
+ if (r<0)
+ return -1;
+ n += r;
+ }
+ return n;
+ }
+ }
+ printf("No such test alias as @%s!",test);
+ return -1;
+}
+
+static int
+process_test_option(struct testgroup_t *groups, const char *test)
+{
+ int flag = TT_ENABLED_;
+ int n = 0;
+ if (test[0] == '@') {
+ return process_test_alias(groups, test + 1);
+ } else if (test[0] == ':') {
+ ++test;
+ flag = TT_SKIP;
+ } else if (test[0] == '+') {
+ ++test;
+ ++n;
+ if (!tinytest_set_flag_(groups, test, 0, TT_OFF_BY_DEFAULT)) {
+ printf("No such test as %s!\n", test);
+ return -1;
+ }
+ } else {
+ ++n;
+ }
+ if (!tinytest_set_flag_(groups, test, 1, flag)) {
+ printf("No such test as %s!\n", test);
+ return -1;
+ }
+ return n;
+}
+
+void
+tinytest_set_aliases(const struct testlist_alias_t *aliases)
+{
+ cfg_aliases = aliases;
+}
+
+int
+tinytest_main(int c, const char **v, struct testgroup_t *groups)
+{
+ int i, j, n=0;
+
+#ifdef _WIN32
+ const char *sp = strrchr(v[0], '.');
+ const char *extension = "";
+ if (!sp || stricmp(sp, ".exe"))
+ extension = ".exe"; /* Add an exe so CreateProcess will work */
+ snprintf(commandname, sizeof(commandname), "%s%s", v[0], extension);
+ commandname[MAX_PATH]='\0';
+#endif
+ for (i=1; i<c; ++i) {
+ if (v[i][0] == '-') {
+ if (!strcmp(v[i], "--RUNNING-FORKED")) {
+ opt_forked = 1;
+ } else if (!strcmp(v[i], "--no-fork")) {
+ opt_nofork = 1;
+ } else if (!strcmp(v[i], "--quiet")) {
+ opt_verbosity = -1;
+ verbosity_flag = "--quiet";
+ } else if (!strcmp(v[i], "--verbose")) {
+ opt_verbosity = 2;
+ verbosity_flag = "--verbose";
+ } else if (!strcmp(v[i], "--terse")) {
+ opt_verbosity = 0;
+ verbosity_flag = "--terse";
+ } else if (!strcmp(v[i], "--help")) {
+ usage(groups, 0);
+ } else if (!strcmp(v[i], "--list-tests")) {
+ usage(groups, 1);
+ } else {
+ printf("Unknown option %s. Try --help\n",v[i]);
+ return -1;
+ }
+ } else {
+ int r = process_test_option(groups, v[i]);
+ if (r<0)
+ return -1;
+ n += r;
+ }
+ }
+ if (!n)
+ tinytest_set_flag_(groups, "..", 1, TT_ENABLED_);
+
+ setvbuf(stdout, NULL, _IONBF, 0);
+
+ ++in_tinytest_main;
+ for (i=0; groups[i].prefix; ++i)
+ for (j=0; groups[i].cases[j].name; ++j)
+ if (groups[i].cases[j].flags & TT_ENABLED_)
+ testcase_run_one(&groups[i],
+ &groups[i].cases[j]);
+
+ --in_tinytest_main;
+
+ if (opt_verbosity==0)
+ puts("");
+
+ if (n_bad)
+ printf("%d/%d TESTS FAILED. (%d skipped)\n", n_bad,
+ n_bad+n_ok,n_skipped);
+ else if (opt_verbosity >= 1)
+ printf("%d tests ok. (%d skipped)\n", n_ok, n_skipped);
+
+ return (n_bad == 0) ? 0 : 1;
+}
+
+int
+tinytest_get_verbosity_(void)
+{
+ return opt_verbosity;
+}
+
+void
+tinytest_set_test_failed_(void)
+{
+ if (opt_verbosity <= 0 && cur_test_name) {
+ if (opt_verbosity==0) puts("");
+ printf("%s%s: ", cur_test_prefix, cur_test_name);
+ cur_test_name = NULL;
+ }
+ cur_test_outcome = 0;
+}
+
+void
+tinytest_set_test_skipped_(void)
+{
+ if (cur_test_outcome==OK)
+ cur_test_outcome = SKIP;
+}
+
diff --git a/sntp/libevent/test/tinytest.h b/sntp/libevent/test/tinytest.h
new file mode 100644
index 000000000000..dff440e3190e
--- /dev/null
+++ b/sntp/libevent/test/tinytest.h
@@ -0,0 +1,98 @@
+/* tinytest.h -- Copyright 2009-2012 Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 TINYTEST_H_INCLUDED_
+#define TINYTEST_H_INCLUDED_
+
+/** Flag for a test that needs to run in a subprocess. */
+#define TT_FORK (1<<0)
+/** Runtime flag for a test we've decided to skip. */
+#define TT_SKIP (1<<1)
+/** Internal runtime flag for a test we've decided to run. */
+#define TT_ENABLED_ (1<<2)
+/** Flag for a test that's off by default. */
+#define TT_OFF_BY_DEFAULT (1<<3)
+/** If you add your own flags, make them start at this point. */
+#define TT_FIRST_USER_FLAG (1<<4)
+
+typedef void (*testcase_fn)(void *);
+
+struct testcase_t;
+
+/** Functions to initialize/teardown a structure for a testcase. */
+struct testcase_setup_t {
+ /** Return a new structure for use by a given testcase. */
+ void *(*setup_fn)(const struct testcase_t *);
+ /** Clean/free a structure from setup_fn. Return 1 if ok, 0 on err. */
+ int (*cleanup_fn)(const struct testcase_t *, void *);
+};
+
+/** A single test-case that you can run. */
+struct testcase_t {
+ const char *name; /**< An identifier for this case. */
+ testcase_fn fn; /**< The function to run to implement this case. */
+ unsigned long flags; /**< Bitfield of TT_* flags. */
+ const struct testcase_setup_t *setup; /**< Optional setup/cleanup fns*/
+ void *setup_data; /**< Extra data usable by setup function */
+};
+#define END_OF_TESTCASES { NULL, NULL, 0, NULL, NULL }
+
+/** A group of tests that are selectable together. */
+struct testgroup_t {
+ const char *prefix; /**< Prefix to prepend to testnames. */
+ struct testcase_t *cases; /** Array, ending with END_OF_TESTCASES */
+};
+#define END_OF_GROUPS { NULL, NULL}
+
+struct testlist_alias_t {
+ const char *name;
+ const char **tests;
+};
+#define END_OF_ALIASES { NULL, NULL }
+
+/** Implementation: called from a test to indicate failure, before logging. */
+void tinytest_set_test_failed_(void);
+/** Implementation: called from a test to indicate that we're skipping. */
+void tinytest_set_test_skipped_(void);
+/** Implementation: return 0 for quiet, 1 for normal, 2 for loud. */
+int tinytest_get_verbosity_(void);
+/** Implementation: Set a flag on tests matching a name; returns number
+ * of tests that matched. */
+int tinytest_set_flag_(struct testgroup_t *, const char *, int set, unsigned long);
+
+/** Set all tests in 'groups' matching the name 'named' to be skipped. */
+#define tinytest_skip(groups, named) \
+ tinytest_set_flag_(groups, named, 1, TT_SKIP)
+
+/** Run a single testcase in a single group. */
+int testcase_run_one(const struct testgroup_t *,const struct testcase_t *);
+
+void tinytest_set_aliases(const struct testlist_alias_t *aliases);
+
+/** Run a set of testcases from an END_OF_GROUPS-terminated array of groups,
+ as selected from the command line. */
+int tinytest_main(int argc, const char **argv, struct testgroup_t *groups);
+
+#endif
diff --git a/sntp/libevent/test/tinytest_local.h b/sntp/libevent/test/tinytest_local.h
new file mode 100644
index 000000000000..87ec2fa67e76
--- /dev/null
+++ b/sntp/libevent/test/tinytest_local.h
@@ -0,0 +1,12 @@
+
+#include "util-internal.h"
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+#include "event2/util.h"
+
+#ifdef snprintf
+#undef snprintf
+#endif
+#define snprintf evutil_snprintf
diff --git a/sntp/libevent/test/tinytest_macros.h b/sntp/libevent/test/tinytest_macros.h
new file mode 100644
index 000000000000..9ff69b1d506d
--- /dev/null
+++ b/sntp/libevent/test/tinytest_macros.h
@@ -0,0 +1,184 @@
+/* tinytest_macros.h -- Copyright 2009-2012 Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 TINYTEST_MACROS_H_INCLUDED_
+#define TINYTEST_MACROS_H_INCLUDED_
+
+/* Helpers for defining statement-like macros */
+#define TT_STMT_BEGIN do {
+#define TT_STMT_END } while (0)
+
+/* Redefine this if your test functions want to abort with something besides
+ * "goto end;" */
+#ifndef TT_EXIT_TEST_FUNCTION
+#define TT_EXIT_TEST_FUNCTION TT_STMT_BEGIN goto end; TT_STMT_END
+#endif
+
+/* Redefine this if you want to note success/failure in some different way. */
+#ifndef TT_DECLARE
+#define TT_DECLARE(prefix, args) \
+ TT_STMT_BEGIN \
+ printf("\n %s %s:%d: ",prefix,__FILE__,__LINE__); \
+ printf args ; \
+ TT_STMT_END
+#endif
+
+/* Announce a failure. Args are parenthesized printf args. */
+#define TT_GRIPE(args) TT_DECLARE("FAIL", args)
+
+/* Announce a non-failure if we're verbose. */
+#define TT_BLATHER(args) \
+ TT_STMT_BEGIN \
+ if (tinytest_get_verbosity_()>1) TT_DECLARE(" OK", args); \
+ TT_STMT_END
+
+#define TT_DIE(args) \
+ TT_STMT_BEGIN \
+ tinytest_set_test_failed_(); \
+ TT_GRIPE(args); \
+ TT_EXIT_TEST_FUNCTION; \
+ TT_STMT_END
+
+#define TT_FAIL(args) \
+ TT_STMT_BEGIN \
+ tinytest_set_test_failed_(); \
+ TT_GRIPE(args); \
+ TT_STMT_END
+
+/* Fail and abort the current test for the reason in msg */
+#define tt_abort_printf(msg) TT_DIE(msg)
+#define tt_abort_perror(op) TT_DIE(("%s: %s [%d]",(op),strerror(errno), errno))
+#define tt_abort_msg(msg) TT_DIE(("%s", msg))
+#define tt_abort() TT_DIE(("%s", "(Failed.)"))
+
+/* Fail but do not abort the current test for the reason in msg. */
+#define tt_failprint_f(msg) TT_FAIL(msg)
+#define tt_fail_perror(op) TT_FAIL(("%s: %s [%d]",(op),strerror(errno), errno))
+#define tt_fail_msg(msg) TT_FAIL(("%s", msg))
+#define tt_fail() TT_FAIL(("%s", "(Failed.)"))
+
+/* End the current test, and indicate we are skipping it. */
+#define tt_skip() \
+ TT_STMT_BEGIN \
+ tinytest_set_test_skipped_(); \
+ TT_EXIT_TEST_FUNCTION; \
+ TT_STMT_END
+
+#define tt_want_(b, msg, fail) \
+ TT_STMT_BEGIN \
+ if (!(b)) { \
+ tinytest_set_test_failed_(); \
+ TT_GRIPE(("%s",msg)); \
+ fail; \
+ } else { \
+ TT_BLATHER(("%s",msg)); \
+ } \
+ TT_STMT_END
+
+/* Assert b, but do not stop the test if b fails. Log msg on failure. */
+#define tt_want_msg(b, msg) \
+ tt_want_(b, msg, );
+
+/* Assert b and stop the test if b fails. Log msg on failure. */
+#define tt_assert_msg(b, msg) \
+ tt_want_(b, msg, TT_EXIT_TEST_FUNCTION);
+
+/* Assert b, but do not stop the test if b fails. */
+#define tt_want(b) tt_want_msg( (b), "want("#b")")
+/* Assert b, and stop the test if b fails. */
+#define tt_assert(b) tt_assert_msg((b), "assert("#b")")
+
+#define tt_assert_test_fmt_type(a,b,str_test,type,test,printf_type,printf_fmt, \
+ setup_block,cleanup_block,die_on_fail) \
+ TT_STMT_BEGIN \
+ type val1_ = (type)(a); \
+ type val2_ = (type)(b); \
+ int tt_status_ = (test); \
+ if (!tt_status_ || tinytest_get_verbosity_()>1) { \
+ printf_type print_; \
+ printf_type print1_; \
+ printf_type print2_; \
+ type value_ = val1_; \
+ setup_block; \
+ print1_ = print_; \
+ value_ = val2_; \
+ setup_block; \
+ print2_ = print_; \
+ TT_DECLARE(tt_status_?" OK":"FAIL", \
+ ("assert(%s): "printf_fmt" vs "printf_fmt, \
+ str_test, print1_, print2_)); \
+ print_ = print1_; \
+ cleanup_block; \
+ print_ = print2_; \
+ cleanup_block; \
+ if (!tt_status_) { \
+ tinytest_set_test_failed_(); \
+ die_on_fail ; \
+ } \
+ } \
+ TT_STMT_END
+
+#define tt_assert_test_type(a,b,str_test,type,test,fmt,die_on_fail) \
+ tt_assert_test_fmt_type(a,b,str_test,type,test,type,fmt, \
+ {print_=value_;},{},die_on_fail)
+
+/* Helper: assert that a op b, when cast to type. Format the values with
+ * printf format fmt on failure. */
+#define tt_assert_op_type(a,op,b,type,fmt) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,type,(val1_ op val2_),fmt, \
+ TT_EXIT_TEST_FUNCTION)
+
+#define tt_int_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_), \
+ "%ld",TT_EXIT_TEST_FUNCTION)
+
+#define tt_uint_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,unsigned long, \
+ (val1_ op val2_),"%lu",TT_EXIT_TEST_FUNCTION)
+
+#define tt_ptr_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ (val1_ op val2_),"%p",TT_EXIT_TEST_FUNCTION)
+
+#define tt_str_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const char *, \
+ (strcmp(val1_,val2_) op 0),"<%s>",TT_EXIT_TEST_FUNCTION)
+
+#define tt_want_int_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,long,(val1_ op val2_),"%ld",(void)0)
+
+#define tt_want_uint_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,unsigned long, \
+ (val1_ op val2_),"%lu",(void)0)
+
+#define tt_want_ptr_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,void*, \
+ (val1_ op val2_),"%p",(void)0)
+
+#define tt_want_str_op(a,op,b) \
+ tt_assert_test_type(a,b,#a" "#op" "#b,const char *, \
+ (strcmp(val1_,val2_) op 0),"<%s>",(void)0)
+
+#endif
diff --git a/sntp/libevent/time-internal.h b/sntp/libevent/time-internal.h
new file mode 100644
index 000000000000..daf20f47a30e
--- /dev/null
+++ b/sntp/libevent/time-internal.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 TIME_INTERNAL_H_INCLUDED_
+#define TIME_INTERNAL_H_INCLUDED_
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef EVENT__HAVE_MACH_MACH_TIME_H
+/* For mach_timebase_info */
+#include <mach/mach_time.h>
+#endif
+
+#include <time.h>
+
+#include "event2/util.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+#define HAVE_POSIX_MONOTONIC
+#elif defined(EVENT__HAVE_MACH_ABSOLUTE_TIME)
+#define HAVE_MACH_MONOTONIC
+#elif defined(_WIN32)
+#define HAVE_WIN32_MONOTONIC
+#else
+#define HAVE_FALLBACK_MONOTONIC
+#endif
+
+long evutil_tv_to_msec_(const struct timeval *tv);
+void evutil_usleep_(const struct timeval *tv);
+
+#ifdef _WIN32
+typedef ULONGLONG (WINAPI *ev_GetTickCount_func)(void);
+#endif
+
+struct evutil_monotonic_timer {
+
+#ifdef HAVE_MACH_MONOTONIC
+ struct mach_timebase_info mach_timebase_units;
+#endif
+
+#ifdef HAVE_POSIX_MONOTONIC
+ int monotonic_clock;
+#endif
+
+#ifdef HAVE_WIN32_MONOTONIC
+ ev_GetTickCount_func GetTickCount64_fn;
+ ev_GetTickCount_func GetTickCount_fn;
+ ev_uint64_t last_tick_count;
+ ev_uint64_t adjust_tick_count;
+
+ ev_uint64_t first_tick;
+ ev_uint64_t first_counter;
+ double usec_per_count;
+ int use_performance_counter;
+#endif
+
+ struct timeval adjust_monotonic_clock;
+ struct timeval last_time;
+};
+
+#define EV_MONOT_PRECISE 1
+#define EV_MONOT_FALLBACK 2
+
+int evutil_configure_monotonic_time_(struct evutil_monotonic_timer *mt,
+ int flags);
+int evutil_gettime_monotonic_(struct evutil_monotonic_timer *mt, struct timeval *tv);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EVENT_INTERNAL_H_INCLUDED_ */
diff --git a/sntp/libevent/util-internal.h b/sntp/libevent/util-internal.h
new file mode 100644
index 000000000000..5866dbc518bd
--- /dev/null
+++ b/sntp/libevent/util-internal.h
@@ -0,0 +1,479 @@
+/*
+ * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 UTIL_INTERNAL_H_INCLUDED_
+#define UTIL_INTERNAL_H_INCLUDED_
+
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#include <errno.h>
+
+/* For EVUTIL_ASSERT */
+#include "log-internal.h"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef EVENT__HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef EVENT__HAVE_SYS_EVENTFD_H
+#include <sys/eventfd.h>
+#endif
+#include "event2/util.h"
+
+#include "time-internal.h"
+#include "ipv6-internal.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* If we need magic to say "inline", get it for free internally. */
+#ifdef EVENT__inline
+#define inline EVENT__inline
+#endif
+#ifdef EVENT____func__
+#define __func__ EVENT____func__
+#endif
+
+/* A good no-op to use in macro definitions. */
+#define EVUTIL_NIL_STMT_ ((void)0)
+/* A no-op that tricks the compiler into thinking a condition is used while
+ * definitely not making any code for it. Used to compile out asserts while
+ * avoiding "unused variable" warnings. The "!" forces the compiler to
+ * do the sizeof() on an int, in case "condition" is a bitfield value.
+ */
+#define EVUTIL_NIL_CONDITION_(condition) do { \
+ (void)sizeof(!(condition)); \
+} while(0)
+
+/* Internal use only: macros to match patterns of error codes in a
+ cross-platform way. We need these macros because of two historical
+ reasons: first, nonblocking IO functions are generally written to give an
+ error on the "blocked now, try later" case, so sometimes an error from a
+ read, write, connect, or accept means "no error; just wait for more
+ data," and we need to look at the error code. Second, Windows defines
+ a different set of error codes for sockets. */
+
+#ifndef _WIN32
+
+#if EAGAIN == EWOULDBLOCK
+#define EVUTIL_ERR_IS_EAGAIN(e) \
+ ((e) == EAGAIN)
+#else
+#define EVUTIL_ERR_IS_EAGAIN(e) \
+ ((e) == EAGAIN || (e) == EWOULDBLOCK)
+#endif
+
+/* True iff e is an error that means a read/write operation can be retried. */
+#define EVUTIL_ERR_RW_RETRIABLE(e) \
+ ((e) == EINTR || EVUTIL_ERR_IS_EAGAIN(e))
+/* True iff e is an error that means an connect can be retried. */
+#define EVUTIL_ERR_CONNECT_RETRIABLE(e) \
+ ((e) == EINTR || (e) == EINPROGRESS)
+/* True iff e is an error that means a accept can be retried. */
+#define EVUTIL_ERR_ACCEPT_RETRIABLE(e) \
+ ((e) == EINTR || EVUTIL_ERR_IS_EAGAIN(e) || (e) == ECONNABORTED)
+
+/* True iff e is an error that means the connection was refused */
+#define EVUTIL_ERR_CONNECT_REFUSED(e) \
+ ((e) == ECONNREFUSED)
+
+#else
+/* Win32 */
+
+#define EVUTIL_ERR_IS_EAGAIN(e) \
+ ((e) == WSAEWOULDBLOCK || (e) == EAGAIN)
+
+#define EVUTIL_ERR_RW_RETRIABLE(e) \
+ ((e) == WSAEWOULDBLOCK || \
+ (e) == WSAEINTR)
+
+#define EVUTIL_ERR_CONNECT_RETRIABLE(e) \
+ ((e) == WSAEWOULDBLOCK || \
+ (e) == WSAEINTR || \
+ (e) == WSAEINPROGRESS || \
+ (e) == WSAEINVAL)
+
+#define EVUTIL_ERR_ACCEPT_RETRIABLE(e) \
+ EVUTIL_ERR_RW_RETRIABLE(e)
+
+#define EVUTIL_ERR_CONNECT_REFUSED(e) \
+ ((e) == WSAECONNREFUSED)
+
+#endif
+
+/* Arguments for shutdown() */
+#ifdef SHUT_RD
+#define EVUTIL_SHUT_RD SHUT_RD
+#else
+#define EVUTIL_SHUT_RD 0
+#endif
+#ifdef SHUT_WR
+#define EVUTIL_SHUT_WR SHUT_WR
+#else
+#define EVUTIL_SHUT_WR 1
+#endif
+#ifdef SHUT_BOTH
+#define EVUTIL_SHUT_BOTH SHUT_BOTH
+#else
+#define EVUTIL_SHUT_BOTH 2
+#endif
+
+/* Helper: Verify that all the elements in 'dlist' are internally consistent.
+ * Checks for circular lists and bad prev/next pointers.
+ *
+ * Example usage:
+ * EVUTIL_ASSERT_LIST_OK(eventlist, event, ev_next);
+ */
+#define EVUTIL_ASSERT_LIST_OK(dlist, type, field) do { \
+ struct type *elm1, *elm2, **nextp; \
+ if (LIST_EMPTY((dlist))) \
+ break; \
+ \
+ /* Check list for circularity using Floyd's */ \
+ /* 'Tortoise and Hare' algorithm */ \
+ elm1 = LIST_FIRST((dlist)); \
+ elm2 = LIST_NEXT(elm1, field); \
+ while (elm1 && elm2) { \
+ EVUTIL_ASSERT(elm1 != elm2); \
+ elm1 = LIST_NEXT(elm1, field); \
+ elm2 = LIST_NEXT(elm2, field); \
+ if (!elm2) \
+ break; \
+ EVUTIL_ASSERT(elm1 != elm2); \
+ elm2 = LIST_NEXT(elm2, field); \
+ } \
+ \
+ /* Now check next and prev pointers for consistency. */ \
+ nextp = &LIST_FIRST((dlist)); \
+ elm1 = LIST_FIRST((dlist)); \
+ while (elm1) { \
+ EVUTIL_ASSERT(*nextp == elm1); \
+ EVUTIL_ASSERT(nextp == elm1->field.le_prev); \
+ nextp = &LIST_NEXT(elm1, field); \
+ elm1 = *nextp; \
+ } \
+ } while (0)
+
+/* Helper: Verify that all the elements in a TAILQ are internally consistent.
+ * Checks for circular lists and bad prev/next pointers.
+ *
+ * Example usage:
+ * EVUTIL_ASSERT_TAILQ_OK(activelist, event, ev_active_next);
+ */
+#define EVUTIL_ASSERT_TAILQ_OK(tailq, type, field) do { \
+ struct type *elm1, *elm2, **nextp; \
+ if (TAILQ_EMPTY((tailq))) \
+ break; \
+ \
+ /* Check list for circularity using Floyd's */ \
+ /* 'Tortoise and Hare' algorithm */ \
+ elm1 = TAILQ_FIRST((tailq)); \
+ elm2 = TAILQ_NEXT(elm1, field); \
+ while (elm1 && elm2) { \
+ EVUTIL_ASSERT(elm1 != elm2); \
+ elm1 = TAILQ_NEXT(elm1, field); \
+ elm2 = TAILQ_NEXT(elm2, field); \
+ if (!elm2) \
+ break; \
+ EVUTIL_ASSERT(elm1 != elm2); \
+ elm2 = TAILQ_NEXT(elm2, field); \
+ } \
+ \
+ /* Now check next and prev pointers for consistency. */ \
+ nextp = &TAILQ_FIRST((tailq)); \
+ elm1 = TAILQ_FIRST((tailq)); \
+ while (elm1) { \
+ EVUTIL_ASSERT(*nextp == elm1); \
+ EVUTIL_ASSERT(nextp == elm1->field.tqe_prev); \
+ nextp = &TAILQ_NEXT(elm1, field); \
+ elm1 = *nextp; \
+ } \
+ EVUTIL_ASSERT(nextp == (tailq)->tqh_last); \
+ } while (0)
+
+/* Locale-independent replacements for some ctypes functions. Use these
+ * when you care about ASCII's notion of character types, because you are about
+ * to send those types onto the wire.
+ */
+int EVUTIL_ISALPHA_(char c);
+int EVUTIL_ISALNUM_(char c);
+int EVUTIL_ISSPACE_(char c);
+int EVUTIL_ISDIGIT_(char c);
+int EVUTIL_ISXDIGIT_(char c);
+int EVUTIL_ISPRINT_(char c);
+int EVUTIL_ISLOWER_(char c);
+int EVUTIL_ISUPPER_(char c);
+char EVUTIL_TOUPPER_(char c);
+char EVUTIL_TOLOWER_(char c);
+
+/** Remove all trailing horizontal whitespace (space or tab) from the end of a
+ * string */
+void evutil_rtrim_lws_(char *);
+
+
+/** Helper macro. If we know that a given pointer points to a field in a
+ structure, return a pointer to the structure itself. Used to implement
+ our half-baked C OO. Example:
+
+ struct subtype {
+ int x;
+ struct supertype common;
+ int y;
+ };
+ ...
+ void fn(struct supertype *super) {
+ struct subtype *sub = EVUTIL_UPCAST(super, struct subtype, common);
+ ...
+ }
+ */
+#define EVUTIL_UPCAST(ptr, type, field) \
+ ((type *)(((char*)(ptr)) - evutil_offsetof(type, field)))
+
+/* As open(pathname, flags, mode), except that the file is always opened with
+ * the close-on-exec flag set. (And the mode argument is mandatory.)
+ */
+int evutil_open_closeonexec_(const char *pathname, int flags, unsigned mode);
+
+int evutil_read_file_(const char *filename, char **content_out, size_t *len_out,
+ int is_binary);
+
+int evutil_socket_connect_(evutil_socket_t *fd_ptr, struct sockaddr *sa, int socklen);
+
+int evutil_socket_finished_connecting_(evutil_socket_t fd);
+
+int evutil_ersatz_socketpair_(int, int , int, evutil_socket_t[]);
+
+int evutil_resolve_(int family, const char *hostname, struct sockaddr *sa,
+ ev_socklen_t *socklen, int port);
+
+const char *evutil_getenv_(const char *name);
+
+/* Structure to hold the state of our weak random number generator.
+ */
+struct evutil_weakrand_state {
+ ev_uint32_t seed;
+};
+
+#define EVUTIL_WEAKRAND_MAX EV_INT32_MAX
+
+/* Initialize the state of a week random number generator based on 'seed'. If
+ * the seed is 0, construct a new seed based on not-very-strong platform
+ * entropy, like the PID and the time of day.
+ *
+ * This function, and the other evutil_weakrand* functions, are meant for
+ * speed, not security or statistical strength. If you need a RNG which an
+ * attacker can't predict, or which passes strong statistical tests, use the
+ * evutil_secure_rng* functions instead.
+ */
+ev_uint32_t evutil_weakrand_seed_(struct evutil_weakrand_state *state, ev_uint32_t seed);
+/* Return a pseudorandom value between 0 and EVUTIL_WEAKRAND_MAX inclusive.
+ * Updates the state in 'seed' as needed -- this value must be protected by a
+ * lock.
+ */
+ev_int32_t evutil_weakrand_(struct evutil_weakrand_state *seed);
+/* Return a pseudorandom value x such that 0 <= x < top. top must be no more
+ * than EVUTIL_WEAKRAND_MAX. Updates the state in 'seed' as needed -- this
+ * value must be proteced by a lock */
+ev_int32_t evutil_weakrand_range_(struct evutil_weakrand_state *seed, ev_int32_t top);
+
+/* Evaluates to the same boolean value as 'p', and hints to the compiler that
+ * we expect this value to be false. */
+#if defined(__GNUC__) && __GNUC__ >= 3 /* gcc 3.0 or later */
+#define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
+#else
+#define EVUTIL_UNLIKELY(p) (p)
+#endif
+
+/* Replacement for assert() that calls event_errx on failure. */
+#ifdef NDEBUG
+#define EVUTIL_ASSERT(cond) EVUTIL_NIL_CONDITION_(cond)
+#define EVUTIL_FAILURE_CHECK(cond) 0
+#else
+#define EVUTIL_ASSERT(cond) \
+ do { \
+ if (EVUTIL_UNLIKELY(!(cond))) { \
+ event_errx(EVENT_ERR_ABORT_, \
+ "%s:%d: Assertion %s failed in %s", \
+ __FILE__,__LINE__,#cond,__func__); \
+ /* In case a user-supplied handler tries to */ \
+ /* return control to us, log and abort here. */ \
+ (void)fprintf(stderr, \
+ "%s:%d: Assertion %s failed in %s", \
+ __FILE__,__LINE__,#cond,__func__); \
+ abort(); \
+ } \
+ } while (0)
+#define EVUTIL_FAILURE_CHECK(cond) EVUTIL_UNLIKELY(cond)
+#endif
+
+#ifndef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE
+/* Replacement for sockaddr storage that we can use internally on platforms
+ * that lack it. It is not space-efficient, but neither is sockaddr_storage.
+ */
+struct sockaddr_storage {
+ union {
+ struct sockaddr ss_sa;
+ struct sockaddr_in ss_sin;
+ struct sockaddr_in6 ss_sin6;
+ char ss_padding[128];
+ } ss_union;
+};
+#define ss_family ss_union.ss_sa.sa_family
+#endif
+
+/* Internal addrinfo error code. This one is returned from only from
+ * evutil_getaddrinfo_common_, when we are sure that we'll have to hit a DNS
+ * server. */
+#define EVUTIL_EAI_NEED_RESOLVE -90002
+
+struct evdns_base;
+struct evdns_getaddrinfo_request;
+typedef struct evdns_getaddrinfo_request* (*evdns_getaddrinfo_fn)(
+ struct evdns_base *base,
+ const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in,
+ void (*cb)(int, struct evutil_addrinfo *, void *), void *arg);
+
+void evutil_set_evdns_getaddrinfo_fn_(evdns_getaddrinfo_fn fn);
+
+struct evutil_addrinfo *evutil_new_addrinfo_(struct sockaddr *sa,
+ ev_socklen_t socklen, const struct evutil_addrinfo *hints);
+struct evutil_addrinfo *evutil_addrinfo_append_(struct evutil_addrinfo *first,
+ struct evutil_addrinfo *append);
+void evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints);
+int evutil_getaddrinfo_common_(const char *nodename, const char *servname,
+ struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum);
+
+int evutil_getaddrinfo_async_(struct evdns_base *dns_base,
+ const char *nodename, const char *servname,
+ const struct evutil_addrinfo *hints_in,
+ void (*cb)(int, struct evutil_addrinfo *, void *), void *arg);
+
+/** Return true iff sa is a looback address. (That is, it is 127.0.0.1/8, or
+ * ::1). */
+int evutil_sockaddr_is_loopback_(const struct sockaddr *sa);
+
+
+/**
+ Formats a sockaddr sa into a string buffer of size outlen stored in out.
+ Returns a pointer to out. Always writes something into out, so it's safe
+ to use the output of this function without checking it for NULL.
+ */
+const char *evutil_format_sockaddr_port_(const struct sockaddr *sa, char *out, size_t outlen);
+
+int evutil_hex_char_to_int_(char c);
+
+
+void evutil_free_secure_rng_globals_(void);
+void evutil_free_globals_(void);
+
+#ifdef _WIN32
+HANDLE evutil_load_windows_system_library_(const TCHAR *library_name);
+#endif
+
+#ifndef EV_SIZE_FMT
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
+#define EV_U64_FMT "%I64u"
+#define EV_I64_FMT "%I64d"
+#define EV_I64_ARG(x) ((__int64)(x))
+#define EV_U64_ARG(x) ((unsigned __int64)(x))
+#else
+#define EV_U64_FMT "%llu"
+#define EV_I64_FMT "%lld"
+#define EV_I64_ARG(x) ((long long)(x))
+#define EV_U64_ARG(x) ((unsigned long long)(x))
+#endif
+#endif
+
+#ifdef _WIN32
+#define EV_SOCK_FMT EV_I64_FMT
+#define EV_SOCK_ARG(x) EV_I64_ARG((x))
+#else
+#define EV_SOCK_FMT "%d"
+#define EV_SOCK_ARG(x) (x)
+#endif
+
+#if defined(__STDC__) && defined(__STDC_VERSION__)
+#if (__STDC_VERSION__ >= 199901L)
+#define EV_SIZE_FMT "%zu"
+#define EV_SSIZE_FMT "%zd"
+#define EV_SIZE_ARG(x) (x)
+#define EV_SSIZE_ARG(x) (x)
+#endif
+#endif
+
+#ifndef EV_SIZE_FMT
+#if (EVENT__SIZEOF_SIZE_T <= EVENT__SIZEOF_LONG)
+#define EV_SIZE_FMT "%lu"
+#define EV_SSIZE_FMT "%ld"
+#define EV_SIZE_ARG(x) ((unsigned long)(x))
+#define EV_SSIZE_ARG(x) ((long)(x))
+#else
+#define EV_SIZE_FMT EV_U64_FMT
+#define EV_SSIZE_FMT EV_I64_FMT
+#define EV_SIZE_ARG(x) EV_U64_ARG(x)
+#define EV_SSIZE_ARG(x) EV_I64_ARG(x)
+#endif
+#endif
+
+evutil_socket_t evutil_socket_(int domain, int type, int protocol);
+evutil_socket_t evutil_accept4_(evutil_socket_t sockfd, struct sockaddr *addr,
+ ev_socklen_t *addrlen, int flags);
+
+ /* used by one of the test programs.. */
+EVENT2_EXPORT_SYMBOL
+int evutil_make_internal_pipe_(evutil_socket_t fd[2]);
+evutil_socket_t evutil_eventfd_(unsigned initval, int flags);
+
+#ifdef SOCK_NONBLOCK
+#define EVUTIL_SOCK_NONBLOCK SOCK_NONBLOCK
+#else
+#define EVUTIL_SOCK_NONBLOCK 0x4000000
+#endif
+#ifdef SOCK_CLOEXEC
+#define EVUTIL_SOCK_CLOEXEC SOCK_CLOEXEC
+#else
+#define EVUTIL_SOCK_CLOEXEC 0x80000000
+#endif
+#ifdef EFD_NONBLOCK
+#define EVUTIL_EFD_NONBLOCK EFD_NONBLOCK
+#else
+#define EVUTIL_EFD_NONBLOCK 0x4000
+#endif
+#ifdef EFD_CLOEXEC
+#define EVUTIL_EFD_CLOEXEC EFD_CLOEXEC
+#else
+#define EVUTIL_EFD_CLOEXEC 0x8000
+#endif
+
+void evutil_memclear_(void *mem, size_t len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/sntp/libevent/whatsnew-2.0.txt b/sntp/libevent/whatsnew-2.0.txt
new file mode 100644
index 000000000000..3561fcb94c6f
--- /dev/null
+++ b/sntp/libevent/whatsnew-2.0.txt
@@ -0,0 +1,609 @@
+What's New In Libevent 2.0 so far:
+
+1. Meta-issues
+
+1.1. About this document
+
+ This document describes the key differences between Libevent 1.4 and
+ Libevent 2.0, from a user's point of view. It was most recently
+ updated based on features in git master as of August 2010.
+
+ NOTE: I am very sure that I missed some thing on this list. Caveat
+ haxxor.
+
+1.2. Better documentation
+
+ There is now a book-in-progress that explains how to use Libevent and its
+ growing pile of APIs. As of this writing, it covers everything except the
+ http and rpc code. Check out the latest draft at
+ http://www.wangafu.net/~nickm/libevent-book/ .
+
+2. New and Improved Event APIs
+
+ Many APIs are improved, refactored, or deprecated in Libevent 2.0.
+
+ COMPATIBILITY:
+
+ Nearly all existing code that worked with Libevent 1.4 should still
+ work correctly with Libevent 2.0. However, if you are writing new code,
+ or if you want to port old code, we strongly recommend using the new APIs
+ and avoiding deprecated APIs as much as possible.
+
+ Binaries linked against Libevent 1.4 will need to be recompiled to link
+ against Libevent 2.0. This is nothing new; we have never been good at
+ preserving binary compatibility between releases. We'll try harder in the
+ future, though: see 2.1 below.
+
+2.1. New header layout for improved forward-compatibility
+
+ Libevent 2.0 has a new header layout to make it easier for programmers to
+ write good, well-supported libevent code. The new headers are divided
+ into three types.
+
+ There are *regular headers*, like event2/event.h. These headers contain
+ the functions that most programmers will want to use.
+
+ There are *backward compatibility headers*, like event2/event_compat.h.
+ These headers contain declarations for deprecated functions from older
+ versions of Libevent. Documentation in these headers should suggest what's
+ wrong with the old functions, and what functions you want to start using
+ instead of the old ones. Some of these functions might be removed in a
+ future release. New programs should generally not include these headers.
+
+ Finally, there are *structure headers*, like event2/event_struct.h.
+ These headers contain definitions of some structures that Libevent has
+ historically exposed. Exposing them caused problems in the past,
+ since programs that were compiled to work with one version of Libevent
+ would often stop working with another version that changed the size or
+ layout of some object. We've moving them into separate headers so
+ that programmers can know that their code is not depending on any
+ unstable aspect of the Libvent ABI. New programs should generally not
+ include these headers unless they really know what they are doing, are
+ willing to rebuild their software whenever they want to link it
+ against a new version of Libevent, and are willing to risk their code
+ breaking if and when data structures change.
+
+ Functionality that once was located in event.h is now more subdivided.
+ The core event logic is now in event2/event.h. The "evbuffer" functions
+ for low-level buffer manipulation are in event2/buffer.h. The
+ "bufferevent" functions for higher-level buffered IO are in
+ event2/bufferevent.h.
+
+ COMPATIBILITY:
+
+ All of the old headers (event.h, evdns.h, evhttp.h, evrpc.h, and
+ evutil.h) will continue to work by including the corresponding new
+ headers. Old code should not be broken by this change.
+
+2.2. New thread-safe, binary-compatible, harder-to-mess-up APIs
+
+ Some aspects of the historical Libevent API have encouraged
+ non-threadsafe code, or forced code built against one version of Libevent
+ to no longer build with another. The problems with now-deprecated APIs
+ fell into two categories:
+
+ 1) Dependence on the "current" event_base. In an application with
+ multiple event_bases, Libevent previously had a notion of the
+ "current" event_base. New events were linked to this base, and
+ the caller needed to explicitly reattach them to another base.
+ This was horribly error-prone.
+
+ Functions like "event_set" that worked with the "current" event_base
+ are now deprecated but still available (see 2.1). There are new
+ functions like "event_assign" that take an explicit event_base
+ argument when setting up a structure. Using these functions will help
+ prevent errors in your applications, and to be more threadsafe.
+
+ 2) Structure dependence. Applications needed to allocate 'struct
+ event' themselves, since there was no function in Libevent to do it
+ for them. But since the size and contents of struct event can
+ change between libevent versions, this created binary-compatibility
+ nightmares. All structures of this kind are now isolated in
+ _struct.h header (see 2.1), and there are new allocate-and-
+ initialize functions you can use instead of the old initialize-only
+ functions. For example, instead of malloc and event_set, you
+ can use event_new().
+
+ (For people who do really want to allocate a struct event on the
+ stack, or put one inside another structure, you can still use
+ event2/event_compat.h.)
+
+ So in the case where old code would look like this:
+
+ #include <event.h>
+ ...
+ struct event *ev = malloc(sizeof(struct event));
+ /* This call will cause a buffer overrun if you compile with one version
+ of Libevent and link dynamically against another. */
+ event_set(ev, fd, EV_READ, cb, NULL);
+ /* If you forget this call, your code will break in hard-to-diagnose
+ ways in the presence of multiple event bases. */
+ event_set_base(ev, base);
+
+ New code will look more like this:
+
+ #include <event2/event.h>
+ ...
+ struct event *ev;
+ ev = event_new(base, fd, EV_READ, cb, NULL);
+
+2.3. Overrideable allocation functions
+
+ If you want to override the allocation functions used by libevent
+ (for example, to use a specialized allocator, or debug memory
+ issues, or so on), you can replace them by calling
+ event_set_mem_functions. It takes replacements for malloc(),
+ free(), and realloc().
+
+ If you're going to use this facility, you need to call it _before_
+ Libevent does any memory allocation; otherwise, Libevent may allocate some
+ memory with malloc(), and free it with the free() function you provide.
+
+ You can disable this feature when you are building Libevent by passing
+ the --disable-malloc-replacement argument to configure.
+
+2.4. Configurable event_base creation
+
+ Older versions of Libevent would always got the fastest backend
+ available, unless you reconfigured their behavior with the environment
+ variables EVENT_NOSELECT, EVENT_NOPOLL, and so forth. This was annoying
+ to programmers who wanted to pick a backend explicitly without messing
+ with the environment.
+
+ Also, despite our best efforts, not every backend supports every
+ operation we might like. Some features (like edge-triggered events, or
+ working with non-socket file descriptors) only work with some operating
+ systems' fast backends. Previously, programmers who cared about this
+ needed to know which backends supported what. This tended to get quite
+ ungainly.
+
+ There is now an API to choose backends, either by name or by feature.
+ Here is an example:
+
+ struct event_config_t *config;
+ struct event_base *base;
+
+ /* Create a new configuration object. */
+ config = event_config_new();
+ /* We don't want to use the "select" method. */
+ event_config_avoid_method(config, "select");
+ /* We want a method that can work with non-socket file descriptors */
+ event_config_require_features(config, EV_FEATURE_FDS);
+
+ base = event_base_new_with_config(config);
+ if (!base) {
+ /* There is no backend method that does what we want. */
+ exit(1);
+ }
+ event_config_free(config);
+
+ Supported features are documented in event2/event.h
+
+2.5. Socket is now an abstract type
+
+ All APIs that formerly accepted int as a socket type now accept
+ "evutil_socket_t". On Unix, this is just an alias for "int" as
+ before. On Windows, however, it's an alias for SOCKET, which can
+ be wider than int on 64-bit platforms.
+
+2.6. Timeouts and persistent events work together.
+
+ Previously, it wasn't useful to set a timeout on a persistent event:
+ the timeout would trigger once, and never again. This is not what
+ applications tend to want. Instead, applications tend to want every
+ triggering of the event to re-set the timeout. So now, if you set
+ up an event like this:
+ struct event *ev;
+ struct timeval tv;
+ ev = event_new(base, fd, EV_READ|EV_PERSIST, cb, NULL);
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+ event_add(ev, &tv);
+
+ The callback 'cb' will be invoked whenever fd is ready to read, OR whenever
+ a second has passed since the last invocation of cb.
+
+2.7. Multiple events allowed per fd
+
+ Older versions of Libevent allowed at most one EV_READ event and at most
+ one EV_WRITE event per socket, per event base. This restriction is no
+ longer present.
+
+2.8. evthread_* functions for thread-safe structures.
+
+ Libevent structures can now be built with locking support. This code
+ makes it safe to add, remove, and activate events on an event base from a
+ different thread. (Previously, if you wanted to write multithreaded code
+ with Libevent, you could only an event_base or its events in one thread at
+ a time.)
+
+ If you want threading support and you're using pthreads, you can just
+ call evthread_use_pthreads(). (You'll need to link against the
+ libevent_pthreads library in addition to libevent_core. These functions are
+ not in libevent_core.)
+
+ If you want threading support and you're using Windows, you can just
+ call evthread_use_windows_threads().
+
+ If you are using some locking system besides Windows and pthreads, You
+ can enable this on a per-event-base level by writing functions to
+ implement mutexes, conditions, and thread IDs, and passing them to
+ evthread_set_lock_callbacks and related functions in event2/thread.h.
+
+ Once locking functions are enabled, every new event_base is created with a
+ lock. You can prevent a single event_base from being built with a lock
+ disabled by using the EVENT_BASE_FLAG_NOLOCK flag in its
+ event_config. If an event_base is created with a lock, it is safe to call
+ event_del, event_add, and event_active on its events from any thread. The
+ event callbacks themselves are still all executed from the thread running
+ the event loop.
+
+ To make an evbuffer or a bufferevent object threadsafe, call its
+ *_enable_locking() function.
+
+ The HTTP api is not currently threadsafe.
+
+ To build Libevent with threading support disabled, pass
+ --disable-thread-support to the configure script.
+
+2.9. Edge-triggered events on some backends.
+
+ With some backends, it's now possible to add the EV_ET flag to an event
+ in order to request that the event's semantics be edge-triggered. Right
+ now, epoll and kqueue support this.
+
+ The corresponding event_config feature is EV_FEATURE_ET; see 2.4 for more
+ information.
+
+2.10. Better support for huge numbers of timeouts
+
+ The heap-based priority queue timer implementation for Libevent 1.4 is good
+ for randomly distributed timeouts, but suboptimal if you have huge numbers
+ of timeouts that all expire in the same amount of time after their
+ creation. The new event_base_init_common_timeout() logic lets you signal
+ that a given timeout interval will be very common, and should use a linked
+ list implementation instead of a priority queue.
+
+2.11. Improved debugging support
+
+ It's been pretty easy to forget to delete all your events before you
+ re-initialize them, or otherwise put Libevent in an internally inconsistent
+ state. You can tell libevent to catch these and other common errors with
+ the new event_enable_debug_mode() call. Just invoke it before you do
+ any calls to other libevent functions, and it'll catch many common
+ event-level errors in your code.
+
+2.12. Functions to access all event fields
+
+ So that you don't have to access the struct event fields directly, Libevent
+ now provides accessor functions to retrieve everything from an event that
+ you set during event_new() or event_assign().
+
+3. Backend-specific and performance improvements.
+
+3.1. Change-minimization on O(1) backends
+
+ With previous versions of Libevent, if you called event_del() and
+ event_add() repeatedly on a single event between trips to the backend's
+ dispatch function, the backend might wind up making unnecessary calls or
+ passing unnecessary data to the kernel. The new backend logic batches up
+ redundant adds and deletes, and performs no more operations than necessary
+ at the kernel level.
+
+ This logic is on for the kqueue backend, and available (but off by
+ default) for the epoll backend. To turn it on for the epoll backend,
+ set the EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST flag in the
+ event_base_cofig, or set the EVENT_EPOLL_USE_CHANGELIST environment
+ variable. Doing this with epoll may result in weird bugs if you give
+ any fds closed by dup() or its variants.
+
+3.2. Improved notification on Linux
+
+ When we need to wake the event loop up from another thread, we use
+ an epollfd to do so, instead of a socketpair. This is supposed to be
+ faster.
+
+3.3. Windows: better support for everything
+
+ Bufferevents on Windows can use a new mechanism (off-by-default; see below)
+ to send their data via Windows overlapped IO and get their notifications
+ via the IOCP API. This should be much faster than using event-based
+ notification.
+
+ Other functions throughout the code have been fixed to work more
+ consistently with Windows. Libevent now builds on Windows using either
+ mingw, or using MSVC (with nmake). Libevent works fine with UNICODE
+ defined, or not.
+
+ Data structures are a little smarter: our lookups from socket to pending
+ event are now done with O(1) hash tables rather than O(lg n) red-black
+ trees.
+
+ Unfortunately, the main Windows backend is still select()-based: from
+ testing the IOCP backends on the mailing list, it seems that there isn't
+ actually a way to tell for certain whether a socket is writable with IOCP.
+ Libevent 2.1 may add a multithreaded WaitForMultipleEvents-based
+ backend for better performance with many inactive sockets and better
+ integration with Windows events.
+
+4. Improvements to evbuffers
+
+ Libevent has long had an "evbuffer" implementation to wrap access to an
+ input or output memory buffer. In previous versions, the implementation
+ was very inefficient and lacked some desirable features. We've made many
+ improvements in Libevent 2.0.
+
+4.1. Chunked-memory internal representation
+
+ Previously, each evbuffer was a huge chunk of memory. When we ran out of
+ space in an evbuffer, we used realloc() to grow the chunk of memory. When
+ data was misaligned, we used memmove to move the data back to the front
+ of the buffer.
+
+ Needless to say, this is a terrible interface for networked IO.
+
+ Now, evbuffers are implemented as a linked list of memory chunks, like
+ most Unix kernels use for network IO. (See Linux's skbuf interfaces,
+ or *BSD's mbufs). Data is added at the end of the linked list and
+ removed from the front, so that we don't ever need realloc huge chunks
+ or memmove the whole buffer contents.
+
+ To avoid excessive calls to read and write, we use the readv/writev
+ interfaces (or WSASend/WSARecv on Windows) to do IO on multiple chunks at
+ once with a single system call.
+
+ COMPATIBILITY NOTE:
+ The evbuffer struct is no longer exposed in a header. The code here is
+ too volatile to expose an official evbuffer structure, and there was never
+ any means provided to create an evbuffer except via evbuffer_new which
+ heap-allocated the buffer.
+
+ If you need access to the whole buffer as a linear chunk of memory, the
+ EVBUFFER_DATA() function still works. Watch out, though: it needs to copy
+ the buffer's contents in a linear chunk before you can use it.
+
+4.2. More flexible readline support
+
+ The old evbuffer_readline() function (which accepted any sequence of
+ CR and LF characters as a newline, and which couldn't handle lines
+ containing NUL characters), is now deprecated. The preferred
+ function is evbuffer_readln(), which supports a variety of
+ line-ending styles, and which can return the number of characters in
+ the line returned.
+
+ You can also call evbuffer_search_eol() to find the end of a line
+ in an evbuffer without ever extracting the line.
+
+4.3. Support for file-based IO in evbuffers.
+
+ You can now add chunks of a file into a evbuffer, and Libevent will have
+ your OS use mapped-memory functionality, sendfile, or splice to transfer
+ the data without ever copying it to userspace. On OSs where this is not
+ supported, Libevent just loads the data.
+
+ There are probably some bugs remaining in this code. On some platforms
+ (like Windows), it just reads the relevant parts of the file into RAM.
+
+4.4. Support for zero-copy ("scatter/gather") writes in evbuffers.
+
+ You can add a piece of memory to an evbuffer without copying it.
+ Instead, Libevent adds a new element to the evbuffer's linked list of
+ chunks with a pointer to the memory you supplied. You can do this
+ either with a reference-counted chunk (via evbuffer_add_reference), or
+ by asking Libevent for a pointer to its internal vectors (via
+ evbuffer_reserve_space or evbuffer_peek()).
+
+4.5. Multiple callbacks per evbuffer
+
+ Previously, you could only have one callback active on an evbuffer at a
+ time. In practice, this meant that if one part of Libevent was using an
+ evbuffer callback to notice when an internal evbuffer was reading or
+ writing data, you couldn't have your own callback on that evbuffer.
+
+ Now, you can now use the evbuffer_add_cb() function to add a callback that
+ does not interfere with any other callbacks.
+
+ The evbuffer_setcb() function is now deprecated.
+
+4.6. New callback interface
+
+ Previously, evbuffer callbacks were invoked with the old size of the
+ buffer and the new size of the buffer. This interface could not capture
+ operations that simultaneously filled _and_ drained a buffer, or handle
+ cases where we needed to postpone callbacks until multiple operations were
+ complete.
+
+ Callbacks that are set with evbuffer_setcb still use the old API.
+ Callbacks added with evbuffer_add_cb() use a new interface that takes a
+ pointer to a struct holding the total number of bytes drained read and the
+ total number of bytes written. See event2/buffer.h for full details.
+
+4.7. Misc new evbuffer features
+
+ You can use evbuffer_remove() to move a given number of bytes from one
+ buffer to another.
+
+ The evbuffer_search() function lets you search for repeated instances of
+ a pattern inside an evbuffer.
+
+ You can use evbuffer_freeze() to temporarily suspend drains from or adds
+ to a given evbuffer. This is useful for code that exposes an evbuffer as
+ part of its public API, but wants users to treat it as a pure source or
+ sink.
+
+ There's an evbuffer_copyout() that looks at the data at the start of an
+ evbuffer without doing a drain.
+
+ You can have an evbuffer defer all of its callbacks, so that rather than
+ being invoked immediately when the evbuffer's length changes, they are
+ invoked from within the event_loop. This is useful when you have a
+ complex set of callbacks that can change the length of other evbuffers,
+ and you want to avoid having them recurse and overflow your stack.
+
+5. Bufferevents improvements
+
+ Libevent has long included a "bufferevents" structure and related
+ functions that were useful for generic buffered IO on a TCP connection.
+ This is what Libevent uses for its HTTP implementation. In addition to
+ the improvements that they get for free from the underlying evbuffer
+ implementation above, there are many new features in Libevent 2.0's
+ evbuffers.
+
+5.1. New OO implementations
+
+ The "bufferevent" structure is now an abstract base type with multiple
+ implementations. This should not break existing code, which always
+ allocated bufferevents with bufferevent_new().
+
+ Current implementations of the bufferevent interface are described below.
+
+5.2. bufferevent_socket_new() replaces bufferevent_new()
+
+ Since bufferevents that use a socket are not the only kind,
+ bufferevent_new() is now deprecated. Use bufferevent_socket_new()
+ instead.
+
+5.3. Filtered bufferevent IO
+
+ You can use bufferevent_filter_new() to create a bufferevent that wraps
+ around another bufferevent and transforms data it is sending and
+ receiving. See test/regress_zlib.c for a toy example that uses zlib to
+ compress data before sending it over a bufferevent.
+
+5.3. Linked pairs of bufferevents
+
+ You can use bufferevent_pair_new() to produce two linked
+ bufferevents. This is like using socketpair, but doesn't require
+ system-calls.
+
+5.4. SSL support for bufferevents with OpenSSL
+
+ There is now a bufferevent type that supports SSL/TLS using the
+ OpenSSL library. The code for this is build in a separate
+ library, libevent_openssl, so that your programs don't need to
+ link against OpenSSL unless they actually want SSL support.
+
+ There are two ways to construct one of these bufferevents, both
+ declared in <event2/bufferevent_ssl.h>. If you want to wrap an
+ SSL layer around an existing bufferevent, you would call the
+ bufferevent_openssl_filter_new() function. If you want to do SSL
+ on a socket directly, call bufferevent_openssl_socket_new().
+
+5.5. IOCP support for bufferevents on Windows
+
+ There is now a bufferevents backend that supports IOCP on Windows.
+ Supposedly, this will eventually make Windows IO much faster for
+ programs using bufferevents. We'll have to see; the code is not
+ currently optimized at all. To try it out, call the
+ event_base_start_iocp() method on an event_base before contructing
+ bufferevents.
+
+ This is tricky code; there are probably some bugs hiding here.
+
+5.6. Improved connect support for bufferevents.
+
+ You can now create a bufferevent that is not yet connected to any
+ host, and tell it to connect, either by address or by hostname.
+
+ The functions to do this are bufferevent_socket_connect and
+ bufferevent_socket_connect_hostname.
+
+5.7. Rate-limiting for bufferevents
+
+ If you need to limit the number of bytes read/written by a single
+ bufferevent, or by a group of them, you can do this with a new set of
+ bufferevent rate-limiting calls.
+
+6. Other improvements
+
+6.1. DNS improvements
+
+6.1.1. DNS: IPv6 nameservers
+
+ The evdns code now lets you have nameservers whose addresses are IPv6.
+
+6.1.2. DNS: Better security
+
+ Libevent 2.0 tries harder to resist DNS answer-sniping attacks than
+ earlier versions of evdns. See comments in the code for full details.
+
+ Notably, evdns now supports the "0x20 hack" to make it harder to
+ impersonate a DNS server. Additionally, Libevent now uses a strong
+ internal RNG to generate DNS transaction IDs, so you don't need to supply
+ your own.
+
+6.1.3. DNS: Getaddrinfo support
+
+ There's now an asynchronous getaddrinfo clone, evdns_getaddrinfo(),
+ to make the results of the evdns functions more usable. It doesn't
+ support every feature of a typical platform getaddrinfo() yet, but it
+ is quite close.
+
+ There is also a blocking evutil_getaddrinfo() declared in
+ event2/util.h, to provide a getaddrinfo() implementation for
+ platforms that don't have one, and smooth over the differences in
+ various platforms implementations of RFC3493.
+
+ Bufferevents provide bufferevent_connect_hostname(), which combines
+ the name lookup and connect operations.
+
+6.1.4. DNS: No more evdns globals
+
+ Like an event base, evdns operations are now supposed to use an evdns_base
+ argument. This makes them easier to wrap for other (more OO) languages,
+ and easier to control the lifetime of. The old evdns functions will
+ still, of course, continue working.
+
+6.2. Listener support
+
+ You can now more easily automate setting up a bound socket to listen for
+ TCP connections. Just use the evconnlistener_*() functions in the
+ event2/listener.h header.
+
+ The listener code supports IOCP on Windows if available.
+
+6.3. Secure RNG support
+
+ Network code very frequently needs a secure, hard-to-predict random number
+ generator. Some operating systems provide a good C implementation of one;
+ others do not. Libevent 2.0 now provides a consistent implementation
+ based on the arc4random code originally from OpenBSD. Libevent (and you)
+ can use the evutil_secure_rng_*() functions to access a fairly secure
+ random stream of bytes.
+
+6.4. HTTP
+
+ The evhttp uriencoding and uridecoding APIs have updated versions
+ that behave more correctly, and can handle strings with internal NULs.
+
+ The evhttp query parsing and URI parsing logic can now detect errors
+ more usefully. Moreover, we include an actual URI parsing function
+ (evhttp_uri_parse()) to correctly parse URIs, so as to discourage
+ people from rolling their own ad-hoc parsing functions.
+
+ There are now accessor functions for the useful fields of struct http
+ and friends; it shouldn't be necessary to access them directly any
+ more.
+
+ Libevent now lets you declare support for all specified HTTP methods,
+ including OPTIONS, PATCH, and so on. The default list is unchanged.
+
+ Numerous evhttp bugs also got fixed.
+
+7. Infrastructure improvements
+
+7.1. Better unit test framework
+
+ We now use a unit test framework that Nick wrote called "tinytest".
+ The main benefit from Libevent's point of view is that tests which
+ might mess with global state can all run each in their own
+ subprocess. This way, when there's a bug that makes one unit test
+ crash or mess up global state, it doesn't affect any others.
+
+7.2. Better unit tests
+
+ Despite all the code we've added, our unit tests are much better than
+ before. Right now, iterating over the different backends on various
+ platforms, I'm getting between 78% and 81% test coverage, compared
+ with less than 45% test coverage in Libevent 1.4.
+
diff --git a/sntp/libevent/whatsnew-2.1.txt b/sntp/libevent/whatsnew-2.1.txt
new file mode 100644
index 000000000000..c0ee7cf7dc02
--- /dev/null
+++ b/sntp/libevent/whatsnew-2.1.txt
@@ -0,0 +1,639 @@
+ What's new in Libevent 2.1
+ Nick Mathewson
+
+0. Before we start
+
+0.1. About this document
+
+ This document describes the key differences between Libevent 2.0 and
+ Libevent 2.1, from a user's point of view. It's a work in progress.
+
+ For better documentation about libevent, see the links at
+ http://libevent.org/
+
+ Libevent 2.1 would not be possible without the generous help of
+ numerous volunteers. For a list of who did what in Libevent 2.1,
+ please see the ChangeLog!
+
+ NOTE: I am very sure that I missed some thing on this list. Caveat
+ haxxor.
+
+0.2. Where to get help
+
+ Try looking at the other documentation too. All of the header files
+ have documentation in the doxygen format; this gets turned into nice
+ HTML and linked to from the libevent.org website.
+
+ There is a work-in-progress book with reference manual at
+ http://www.wangafu.net/~nickm/libevent-book/ .
+
+ You can ask questions on the #libevent IRC channel at irc.oftc.net or
+ on the mailing list at libevent-users@freehaven.net. The mailing list
+ is subscribers-only, so you will need to subscribe before you post.
+
+0.3. Compatibility
+
+ Our source-compatibility policy is that correct code (that is to say,
+ code that uses public interfaces of Libevent and relies only on their
+ documented behavior) should have forward source compatibility: any
+ such code that worked with a previous version of Libevent should work
+ with this version too.
+
+ We don't try to do binary compatibility except within stable release
+ series, so binaries linked against any version of Libevent 2.0 will
+ probably need to be recompiled against Libevent 2.1.3-alpha if you
+ want to use it. It is probable that we'll break binary compatibility
+ again before Libevent 2.1 is stable.
+
+1. New APIs and features
+
+1.1. New ways to build libevent
+
+ We now provide an --enable-gcc-hardening configure option to turn on
+ GCC features designed for increased code security.
+
+ There is also an --enable-silent-rules configure option to make
+ compilation run more quietly with automake 1.11 or later.
+
+ You no longer need to use the --enable-gcc-warnings option to turn on
+ all of the GCC warnings that Libevent uses. The only change from
+ using that option now is to turn warnings into errors.
+
+ For IDE users, files that are not supposed to be built are now
+ surrounded with appropriate #ifdef lines to keep your IDE from getting
+ upset.
+
+
+1.2. New functions for events and the event loop
+
+ If you're running Libevent with multiple event priorities, you might
+ want to make sure that Libevent checks for new events frequently, so
+ that time-consuming or numerous low-priority events don't keep it from
+ checking for new high-priority events. You can now use the
+ event_config_set_max_dispatch_interval() interface to ensure that the
+ loop checks for new events either every N microseconds, every M
+ callbacks, or both.
+
+ When configuring an event base, you can now choose whether you want
+ timers to be more efficient, or more precise. (This only has effect
+ on Linux for now.) Timers are efficient by default: to select more
+ precise timers, use the EVENT_BASE_FLAG_PRECISE_TIMER flag when
+ constructing the event_config, or set the EVENT_PRECISE_TIMER
+ environment variable to a non-empty string.
+
+ There is an EVLOOP_NO_EXIT_ON_EMPTY flag that tells event_base_loop()
+ to keep looping even when there are no pending events. (Ordinarily,
+ event_base_loop() will exit as soon as no events are pending.)
+
+ Past versions of Libevent have been annoying to use with some
+ memory-leak-checking tools, because Libevent allocated some global
+ singletons but provided no means to free them. There is now a
+ function, libevent_global_shutdown(), that you can use to free all
+ globally held resources before exiting, so that your leak-check tools
+ don't complain. (Note: this function doesn't free non-global things
+ like events, bufferevents, and so on; and it doesn't free anything
+ that wouldn't otherwise get cleaned up by the operating system when
+ your process exit()s. If you aren't using a leak-checking tool, there
+ is not much reason to call libevent_global_shutdown().)
+
+ There is a new event_base_get_npriorities() function to return the
+ number of priorities set in the event base.
+
+ Libevent 2.0 added an event_new() function to construct a new struct
+ event on the heap. Unfortunately, with event_new(), there was no
+ equivalent for:
+
+ struct event ev;
+ event_assign(&ev, base, fd, EV_READ, callback, &ev);
+
+ In other words, there was no easy way for event_new() to set up an
+ event so that the event itself would be its callback argument.
+ Libevent 2.1 lets you do this by passing "event_self_cbarg()" as the
+ callback argument:
+
+ struct event *evp;
+ evp = event_new(base, fd, EV_READ, callback,
+ event_self_cbarg());
+
+ There's also a new event_base_get_running_event() function you can
+ call from within a Libevent callback to get a pointer to the current
+ event. This should never be strictly necessary, but it's sometimes
+ convenient.
+
+ The event_base_once() function used to leak some memory if the event
+ that it added was never actually triggered. Now, its memory is
+ tracked in the event_base and freed when the event_base is freed.
+ Note however that Libevent doesn't know how to free any information
+ passed as the callback argument to event_base_once is still something
+ you'll might need a way to de-allocate yourself.
+
+ There is an event_get_priority() function to return an event's
+ priority.
+
+ By analogy to event_base_loopbreak(), there is now an
+ event_base_loopcontinue() that tells Libevent to stop processing
+ active event callbacks, and re-scan for new events right away.
+
+ There's a function, event_base_foreach_event(), that can iterate over
+ every event currently pending or active on an event base, and invoke a
+ user-supplied callback on each. The callback must not alter the events
+ or add or remove anything to the event base.
+
+ We now have an event_remove_timer() function to remove the timeout on
+ an event while leaving its socket and/or signal triggers unchanged.
+ (If we were designing the API from scratch, this would be the behavior
+ of "event_add(ev, NULL)" on an already-added event with a timeout. But
+ that's a no-op in past versions of Libevent, and we don't want to
+ break compatibility.)
+
+1.3. Event finalization
+
+ [NOTE: This is an experimental feature in Libevent 2.1.3-alpha. Though
+ it seems solid so far, its API might change between now and the first
+ release candidate for Libevent 2.1.]
+
+1.3.1. Why event finalization?
+
+ Libevent 2.1 now supports an API for safely "finalizing" events that
+ might be running in multiple threads, and provides a way to slightly
+ change the semantics of event_del() to prevent deadlocks in
+ multithreaded programs.
+
+ To motivate this feature, consider the following code, in the context
+ of a mulithreaded Libevent application:
+
+ struct connection *conn = event_get_callback_arg(ev);
+ event_del(ev);
+ connection_free(conn);
+
+ Suppose that the event's callback might be running in another thread,
+ and using the value of "conn" concurrently. We wouldn't want to
+ execute the connection_free() call until "conn" is no longer in use.
+ How can we make this code safe?
+
+ Libevent 2.0 answered that question by saying that the event_del()
+ call should block if the event's callback is running in another
+ thread. That way, we can be sure that event_del() has canceled the
+ callback (if the callback hadn't started running yet), or has waited
+ for the callback to finish.
+
+ But now suppose that the data structure is protected by a lock, and we
+ have the following code:
+
+ void check_disable(struct connection *connection) {
+ lock(connection);
+ if (should_stop_reading(connection))
+ event_del(connection->read_event);
+ unlock(connection);
+ }
+
+ What happens when we call check_disable() from a callback and from
+ another thread? Let's say that the other thread gets the lock
+ first. If it decides to call event_del(), it will wait for the
+ callback to finish. But meanwhile, the callback will be waiting for
+ the lock on the connection. Since each threads is waiting for the
+ other one to release a resource, the program will deadlock.
+
+ This bug showed up in multithreaded bufferevent programs in 2.1,
+ particularly when freeing bufferevents. (For more information, see
+ the "Deadlock when calling bufferevent_free from an other thread"
+ thread on libevent-users starting on 6 August 2012 and running through
+ February of 2013. You might also like to read my earlier writeup at
+ http://archives.seul.org/libevent/users/Feb-2012/msg00053.html and
+ the ensuing discussion.)
+
+1.3.2. The EV_FINALIZE flag and avoiding deadlock
+
+ To prevent the deadlock condition described above, Libevent
+ 2.1.3-alpha adds a new flag, "EV_FINALIZE". You can pass it to
+ event_new() and event_assign() along with EV_READ, EV_WRITE, and the
+ other event flags.
+
+ When an event is constructed with the EV_FINALIZE flag, event_del()
+ will not block on that event, even when the event's callback is
+ running in another thread. By using EV_FINALIZE, you are therefore
+ promising not to use the "event_del(ev); free(event_get_callback_arg(ev));"
+ pattern, but rather to use one of the finalization functions below to
+ clean up the event.
+
+ EV_FINALIZE has no effect on a single-threaded program, or on a
+ program where events are only used from one thread.
+
+
+ There are also two new variants of event_del() that you can use for
+ more fine-grained control:
+ event_del_noblock(ev)
+ event_del_block(ev)
+ The event_del_noblock() function will never block, even if the event
+ callback is running in another thread and doesn't have the EV_FINALIZE
+ flag. The event_del_block() function will _always_ block if the event
+ callback is running in another thread, even if the event _does_ have
+ the EV_FINALIZE flag.
+
+ [A future version of Libevent may have a way to make the EV_FINALIZE
+ flag the default.]
+
+1.3.3. Safely finalizing events
+
+ To safely tear down an event that may be running, Libevent 2.1.3-alpha
+ introduces event_finalize() and event_free_finalize(). You call them
+ on an event, and provide a finalizer callback to be run on the event
+ and its callback argument once the event is definitely no longer
+ running.
+
+ With event_free_finalize(), the event is also freed once the finalizer
+ callback has been invoked.
+
+ A finalized event cannot be re-added or activated. The finalizer
+ callback must not add events, activate events, or attempt to
+ "resucitate" the event being finalized in any way.
+
+ If any finalizer callbacks are pending as the event_base is being
+ freed, they will be invoked. You can override this behavior with the
+ new function event_base_free_nofinalize().
+
+1.4. New debugging features
+
+ You can now turn on debug logs at runtime using a new function,
+ event_enable_debug_logging().
+
+ The event_enable_lock_debugging() function is now spelled correctly.
+ You can still use the old "event_enable_lock_debuging" name, though,
+ so your old programs shouldnt' break.
+
+ There's also been some work done to try to make the debugging logs
+ more generally useful.
+
+1.5. New evbuffer functions
+
+ In Libevent 2.0, we introduced evbuffer_add_file() to add an entire
+ file's contents to an evbuffer, and then send them using sendfile() or
+ mmap() as appropriate. This API had some drawbacks, however.
+ Notably, it created one mapping or fd for every instance of the same
+ file added to any evbuffer. Also, adding a file to an evbuffer could
+ make that buffer unusable with SSL bufferevents, filtering
+ bufferevents, and any code that tried to read the contents of the
+ evbuffer.
+
+ Libevent 2.1 adds a new evbuffer_file_segment API to solve these
+ problems. Now, you can use evbuffer_file_segment_new() to construct a
+ file-segment object, and evbuffer_add_file_segment() to insert it (or
+ part of it) into an evbuffer. These segments avoid creating redundant
+ maps or fds. Better still, the code is smart enough (when the OS
+ supports sendfile) to map the file when that's necessary, and use
+ sendfile() otherwise.
+
+ File segments can receive callback functions that are invoked when the
+ file segments are freed.
+
+ The evbuffer_ptr interface has been extended so that an evbuffer_ptr
+ can now yield a point just after the end of the buffer. This makes
+ many algorithms simpler to implement.
+
+ There's a new evbuffer_add_buffer() interface that you can use to add
+ one buffer to another nondestructively. When you say
+ evbuffer_add_buffer_reference(outbuf, inbuf), outbuf now contains a
+ reference to the contents of inbuf.
+
+ To aid in adding data in bulk while minimizing evbuffer calls, there
+ is an evbuffer_add_iovec() function.
+
+ There's a new evbuffer_copyout_from() variant function to enable
+ copying data nondestructively from the middle of a buffer.
+
+ evbuffer_readln() now supports an EVBUFFER_EOL_NUL argument to fetch
+ NUL-terminated strings from buffers.
+
+1.6. New functions and features: bufferevents
+
+ You can now use the bufferevent_getcb() function to find out a
+ bufferevent's callbacks. Previously, there was no supported way to do
+ that.
+
+ The largest chunk readable or writeable in a single bufferevent
+ callback is no longer hardcoded; it's now configurable with
+ the new functions bufferevent_set_max_single_read() and
+ bufferevent_set_max_single_write().
+
+ For consistency, OpenSSL bufferevents now make sure to always set one
+ of BEV_EVENT_READING or BEV_EVENT_WRITING when invoking an event
+ callback.
+
+ Calling bufferevent_set_timeouts(bev, NULL, NULL) now removes the
+ timeouts from socket and ssl bufferevents correctly.
+
+ You can find the priority at which a bufferevent runs with
+ bufferevent_get_priority().
+
+1.7. New functions and features: evdns
+
+ The previous evdns interface used an "open a test UDP socket" trick in
+ order to detect IPv6 support. This was a hack, since it would
+ sometimes badly confuse people's firewall software, even though no
+ packets were sent. The current evdns interface-detection code uses
+ the appropriate OS functions to see which interfaces are configured.
+
+ The evdns_base_new() function now has multiple possible values for its
+ second (flags) argument. Using 1 and 0 have their old meanings, though the
+ 1 flag now has a symbolic name of EVDNS_BASE_INITIALIZE_NAMESERVERS.
+ A second flag is now supported too: the EVDNS_BASE_DISABLE_WHEN_INACTIVE
+ flag, which tells the evdns_base that it should not prevent Libevent from
+ exiting while it has no DNS requests in progress.
+
+1.8. New functions and features: evconnlistener
+
+ Libevent 2.1 adds the following evconnlistener flags:
+
+ LEV_OPT_DEFERRED_ACCEPT -- Tells the OS that it doesn't need to
+ report sockets as having arrived until the initiator has sent some
+ data too. This can greatly improve performance with protocols like
+ HTTP where the client always speaks first. On operating systems
+ that don't support this functionality, this option has no effect.
+
+ LEV_OPT_DISABLED -- Creates an evconnlistener in the disabled (not
+ listening) state.
+
+ Libevent 2.1 changes the behavior of the LEV_OPT_CLOSE_ON_EXEC
+ flag. Previously, it would apply to the listener sockets, but not to
+ the accepted sockets themselves. That's almost never what you want.
+ Now, it applies both to the listener and the accepted sockets.
+
+1.9. New functions and features: evhttp
+
+ **********************************************************************
+ NOTE: The evhttp module will eventually be deprecated in favor of Mark
+ Ellzey's libevhtp library. Don't worry -- this won't happen until
+ libevhtp provides every feature that evhttp does, and provides a
+ compatible interface that applications can use to migrate.
+ **********************************************************************
+
+ Previously, you could only set evhttp timeouts in increments of one
+ second. Now, you can use evhttp_set_timeout_tv() and
+ evhttp_connection_set_timeout_tv() to configure
+ microsecond-granularity timeouts.
+
+ There are a new pair of functions: evhttp_set_bevcb() and
+ evhttp_connection_base_bufferevent_new(), that you can use to
+ configure which bufferevents will be used for incoming and outgoing
+ http connections respectively. These functions, combined with SSL
+ bufferevents, should enable HTTPS support.
+
+ There's a new evhttp_foreach_bound_socket() function to iterate over
+ every listener on an evhttp object.
+
+ Whitespace between lines in headers is now folded into a single space;
+ whitespace at the end of a header is now removed.
+
+ The socket errno value is now preserved when invoking an http error
+ callback.
+
+ There's a new kind of request callback for errors; you can set it with
+ evhttp_request_set_error_cb(). It gets called when there's a request error,
+ and actually reports the error code and lets you figure out which request
+ failed.
+
+2. Cross-platform performance improvements
+
+2.1. Better data structures
+
+ We replaced several users of the sys/queue.h "TAILQ" data structure
+ with the "LIST" data structure. Because this data type doesn't
+ require FIFO access, it requires fewer pointer checks and
+ manipulations to keep it in line.
+
+ All previous versions of Libevent have kept every pending (added)
+ event in an "eventqueue" data structure. Starting in Libevent 2.0,
+ however, this structure became redundant: every pending timeout event
+ is stored in the timeout heap or in one of the common_timeout queues,
+ and every pending fd or signal event is stored in an evmap. Libevent
+ 2.1 removes this data structure, and thereby saves all of the code
+ that we'd been using to keep it updated.
+
+2.2. Faster activations and timeouts
+
+ It's a common pattern in older code to use event_base_once() with a
+ 0-second timeout to ensure that a callback will get run 'as soon as
+ possible' in the current iteration of the Libevent loop. We optimize
+ this case by calling event_active() directly, and bypassing the
+ timeout pool. (People who are using this pattern should also consider
+ using event_active() themselves.)
+
+ Libevent 2.0 would wake up a polling event loop whenever the first
+ timeout in the event loop was adjusted--whether it had become earlier
+ or later. We now only notify the event loop when a change causes the
+ expiration time to become _sooner_ than it would have been otherwise.
+
+ The timeout heap code is now optimized to perform fewer comparisons
+ and shifts when changing or removing a timeout.
+
+ Instead of checking for a wall-clock time jump every time we call
+ clock_gettime(), we now check only every 5 seconds. This should save
+ a huge number of gettimeofday() calls.
+
+2.3. Microoptimizations
+
+ Internal event list maintainance no longer use the antipattern where
+ we have one function with multiple totally independent behaviors
+ depending on an argument:
+ #define OP1 1
+ #define OP2 2
+ #define OP3 3
+ void func(int operation, struct event *ev) {
+ switch (op) {
+ ...
+ }
+ }
+ Instead, these functions are now split into separate functions for
+ each operation:
+ void func_op1(struct event *ev) { ... }
+ void func_op2(struct event *ev) { ... }
+ void func_op3(struct event *ev) { ... }
+
+ This produces better code generation and inlining decisions on some
+ compilers, and makes the code easier to read and check.
+
+2.4. Evbuffer performance improvements
+
+ The EVBUFFER_EOL_CRLF line-ending type is now much faster, thanks to
+ smart optimizations.
+
+2.5. HTTP performance improvements
+
+ o Performance tweak to evhttp_parse_request_line. (aee1a97 Mark Ellzey)
+ o Add missing break to evhttp_parse_request_line (0fcc536)
+
+2.6. Coarse timers by default on Linux
+
+ Due to limitations of the epoll interface, Libevent programs using epoll
+ have not previously been able to wait for timeouts with accuracy smaller
+ than 1 millisecond. But Libevent had been using CLOCK_MONOTONIC for
+ timekeeping on Linux, which is needlessly expensive: CLOCK_MONOTONIC_COARSE
+ has approximately the resolution corresponding to epoll, and is much faster
+ to invoke than CLOCK_MONOTONIC.
+
+ To disable coarse timers, and get a more plausible precision, use the
+ new EVENT_BASE_FLAG_PRECISE_TIMER flag when setting up your event base.
+
+3. Backend/OS-specific improvements
+
+3.1. Linux-specific improvements
+
+ The logic for deciding which arguements to use with epoll_ctl() is now
+ a table-driven lookup, rather than the previous pile of cascading
+ branches. This should minimize epoll_ctl() calls and make the epoll
+ code run a little faster on change-heavy loads.
+
+ Libevent now takes advantage of Linux's support for enhanced APIs
+ (e.g., SOCK_CLOEXEC, SOCK_NONBLOCK, accept4, pipe2) that allow us to
+ simultaneously create a socket, make it nonblocking, and make it
+ close-on-exec. This should save syscalls throughout our codebase, and
+ avoid race-conditions if an exec() occurs after a socket is socket is
+ created but before we can make it close-on-execute on it.
+
+3.2. Windows-specific improvements
+
+ We now use GetSystemTimeAsFileTime to implement gettimeofday. It's
+ significantly faster and more accurate than our old ftime()-based approach.
+
+3.3. Improvements in the solaris evport backend.
+
+ The evport backend has been updated to use many of the infrastructure
+ improvements from Libevent 2.0. Notably, it keeps track of per-fd
+ information using the evmap infrastructure, and removes a number of
+ linear scans over recently-added events. This last change makes it
+ efficient to receive many more events per evport_getn() call, thereby
+ reducing evport overhead in general.
+
+3.4. OSX backend improvements
+
+ The OSX select backend doesn't like to have more than a certain number
+ of fds set unless an "unlimited select" option has been set.
+ Therefore, we now set it.
+
+3.5. Monotonic clocks on even more platforms
+
+ Libevent previously used a monotonic clock for its internal timekeeping
+ only on platforms supporting the POSIX clock_gettime() interface. Now,
+ Libevent has support for monotonic clocks on OSX and Windows too, and a
+ fallback implementation for systems without monotonic clocks that will at
+ least keep time running forwards.
+
+ Using monotonic timers makes Libevent more resilient to changes in the
+ system time, as can happen in small amounts due to clock adjustments from
+ NTP, or in large amounts due to users who move their system clocks all over
+ the timeline in order to keep nagware from nagging them.
+
+3.6. Faster cross-thread notification on kqueue
+
+ When a thread other than the one in which the main event loop is
+ running needs to wake the thread running the main event loop, Libevent
+ usually writes to a socketpair in order to force the main event loop
+ to wake up. On Linux, we've been able to use eventfd() instead. Now
+ on BSD and OSX systems (any anywhere else that has kqueue with the
+ EVFILT_USER extension), we can use EVFILT_USER to wake up the main
+ thread from kqueue. This should be a tiny bit faster than the
+ previous approach.
+
+4. Infrastructure improvements
+
+4.1. Faster tests
+
+ I've spent some time to try to make the unit tests run faster in
+ Libevent 2.1. Nearly all of this was a matter of searching slow tests
+ for unreasonably long timeouts, and cutting them down to reasonably
+ long delays, though on one or two cases I actually had to parallelize
+ an operation or improve an algorithm.
+
+ On my desktop, a full "make verify" run of Libevent 2.0.18-stable
+ requires about 218 seconds. Libevent 2.1.1-alpha cuts this down to
+ about 78 seconds.
+
+ Faster unit tests are great, since they let programmers test their
+ changes without losing their train of thought.
+
+4.2. Finicky tests are now off-by-default
+
+ The Tinytest unit testing framework now supports optional tests, and
+ Libevent uses them. By default, Libevent's unit testing framework
+ does not run tests that require a working network, and does not run
+ tests that tend to fail on heavily loaded systems because of timing
+ issues. To re-enable all tests, run ./test/regress using the "@all"
+ alias.
+
+4.3. Modernized use of autotools
+
+ Our autotools-based build system has been updated to build without
+ warnings on recent autoconf/automake versions.
+
+ Libevent's autotools makefiles are no longer recursive. This allows
+ make to use the maximum possible parallelism to do the minimally
+ necessary amount of work. See Peter Miller's "Recursive Make
+ Considered Harmful" at http://miller.emu.id.au/pmiller/books/rmch/ for
+ more information here.
+
+ We now use the "quiet build" option to suppress distracting messages
+ about which commandlines are running. You can get them back with
+ "make V=1".
+
+4.4. Portability
+
+ Libevent now uses large-file support internally on platforms where it
+ matters. You shouldn't need to set _LARGEFILE or OFFSET_BITS or
+ anything magic before including the Libevent headers, either, since
+ Libevent now sets the size of ev_off_t to the size of off_t that it
+ received at compile time, not to some (possibly different) size based
+ on current macro definitions when your program is building.
+
+ We now also use the Autoconf AC_USE_SYSTEM_EXTENSIONS mechanism to
+ enable per-system macros needed to enable not-on-by-default features.
+ Unlike the rest of the autoconf macros, we output these to an
+ internal-use-only evconfig-private.h header, since their names need to
+ survive unmangled. This lets us build correctly on more platforms,
+ and avoid inconsistencies when some files define _GNU_SOURCE and
+ others don't.
+
+ Libevent now tries to detect OpenSSL via pkg-config.
+
+4.5. Standards conformance
+
+ Previous Libevent versions had no consistent convention for internal
+ vs external identifiers, and used identifiers starting with the "_"
+ character throughout the codebase. That's no good, since the C
+ standard says that identifiers beginning with _ are reserved. I'm not
+ aware of having any collisions with system identifiers, but it's best
+ to fix these things before they cause trouble.
+
+ We now avoid all use of the _identifiers in the Libevent source code.
+ These changes were made *mainly* through the use of automated scripts,
+ so there shouldn't be any mistakes, but you never know.
+
+ As an exception, the names _EVENT_LOG_DEBUG, _EVENT_LOG_MSG_,
+ _EVENT_LOG_WARN, and _EVENT_LOG_ERR are still exposed in event.h: they
+ are now deprecated, but to support older code, they will need to stay
+ around for a while. New code should use EVENT_LOG_DEBUG,
+ EVENT_LOG_MSG, EVENT_LOG_WARN, and EVENT_LOG_ERR instead.
+
+4.6. Event and callback refactoring
+
+ As a simplification and optimization to Libevent's "deferred callback"
+ logic (introduced in 2.0 to avoid callback recursion), Libevent now
+ treats all of its deferrable callback types using the same logic it
+ uses for active events. Now deferred events no longer cause priority
+ inversion, no longer require special code to cancel them, and so on.
+
+ Regular events and deferred callbacks now both descend from an
+ internal light-weight event_callback supertype, and both support
+ priorities and take part in the other anti-priority-inversion
+ mechanisms in Libevent.
+
+ To avoid starvation from callback recursion (which was the reason we
+ introduced "deferred callbacks" in the first place) the implementation
+ now allows an event callback to be scheduled as "active later":
+ instead of running in the current iteration of the event loop, it runs
+ in the next one.
+
+5. Testing
+
+ Libevent's test coverage level is more or less unchanged since before:
+ we still have over 80% line coverage in our tests on Linux and OSX.
+ There are some under-tested modules, though: we need to fix those.
diff --git a/sntp/libevent/win32select.c b/sntp/libevent/win32select.c
new file mode 100644
index 000000000000..a50a2df7b4e7
--- /dev/null
+++ b/sntp/libevent/win32select.c
@@ -0,0 +1,388 @@
+/*
+ * Copyright 2007-2012 Niels Provos and Nick Mathewson
+ * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2003 Michael A. Davis <mike@datanerds.net>
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+#include "event2/event-config.h"
+#include "evconfig-private.h"
+
+#ifdef _WIN32
+
+#include <winsock2.h>
+#include <windows.h>
+#include <sys/types.h>
+#include <sys/queue.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include "event2/util.h"
+#include "util-internal.h"
+#include "log-internal.h"
+#include "event2/event.h"
+#include "event-internal.h"
+#include "evmap-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
+#include "time-internal.h"
+
+#define XFREE(ptr) do { if (ptr) mm_free(ptr); } while (0)
+
+extern struct event_list timequeue;
+extern struct event_list addqueue;
+
+struct win_fd_set {
+ u_int fd_count;
+ SOCKET fd_array[1];
+};
+
+/* MSDN says this is required to handle SIGFPE */
+volatile double SIGFPE_REQ = 0.0f;
+
+struct idx_info {
+ int read_pos_plus1;
+ int write_pos_plus1;
+};
+
+struct win32op {
+ unsigned num_fds_in_fd_sets;
+ int resize_out_sets;
+ struct win_fd_set *readset_in;
+ struct win_fd_set *writeset_in;
+ struct win_fd_set *readset_out;
+ struct win_fd_set *writeset_out;
+ struct win_fd_set *exset_out;
+ unsigned signals_are_broken : 1;
+};
+
+static void *win32_init(struct event_base *);
+static int win32_add(struct event_base *, evutil_socket_t, short old, short events, void *idx_);
+static int win32_del(struct event_base *, evutil_socket_t, short old, short events, void *idx_);
+static int win32_dispatch(struct event_base *base, struct timeval *);
+static void win32_dealloc(struct event_base *);
+
+struct eventop win32ops = {
+ "win32",
+ win32_init,
+ win32_add,
+ win32_del,
+ win32_dispatch,
+ win32_dealloc,
+ 0, /* doesn't need reinit */
+ 0, /* No features supported. */
+ sizeof(struct idx_info),
+};
+
+#define FD_SET_ALLOC_SIZE(n) ((sizeof(struct win_fd_set) + ((n)-1)*sizeof(SOCKET)))
+
+static int
+grow_fd_sets(struct win32op *op, unsigned new_num_fds)
+{
+ size_t size;
+
+ EVUTIL_ASSERT(new_num_fds >= op->readset_in->fd_count &&
+ new_num_fds >= op->writeset_in->fd_count);
+ EVUTIL_ASSERT(new_num_fds >= 1);
+
+ size = FD_SET_ALLOC_SIZE(new_num_fds);
+ if (!(op->readset_in = mm_realloc(op->readset_in, size)))
+ return (-1);
+ if (!(op->writeset_in = mm_realloc(op->writeset_in, size)))
+ return (-1);
+ op->resize_out_sets = 1;
+ op->num_fds_in_fd_sets = new_num_fds;
+ return (0);
+}
+
+static int
+do_fd_set(struct win32op *op, struct idx_info *ent, evutil_socket_t s, int read)
+{
+ struct win_fd_set *set = read ? op->readset_in : op->writeset_in;
+ if (read) {
+ if (ent->read_pos_plus1 > 0)
+ return (0);
+ } else {
+ if (ent->write_pos_plus1 > 0)
+ return (0);
+ }
+ if (set->fd_count == op->num_fds_in_fd_sets) {
+ if (grow_fd_sets(op, op->num_fds_in_fd_sets*2))
+ return (-1);
+ /* set pointer will have changed and needs reiniting! */
+ set = read ? op->readset_in : op->writeset_in;
+ }
+ set->fd_array[set->fd_count] = s;
+ if (read)
+ ent->read_pos_plus1 = set->fd_count+1;
+ else
+ ent->write_pos_plus1 = set->fd_count+1;
+ return (set->fd_count++);
+}
+
+static int
+do_fd_clear(struct event_base *base,
+ struct win32op *op, struct idx_info *ent, int read)
+{
+ int i;
+ struct win_fd_set *set = read ? op->readset_in : op->writeset_in;
+ if (read) {
+ i = ent->read_pos_plus1 - 1;
+ ent->read_pos_plus1 = 0;
+ } else {
+ i = ent->write_pos_plus1 - 1;
+ ent->write_pos_plus1 = 0;
+ }
+ if (i < 0)
+ return (0);
+ if (--set->fd_count != (unsigned)i) {
+ struct idx_info *ent2;
+ SOCKET s2;
+ s2 = set->fd_array[i] = set->fd_array[set->fd_count];
+
+ ent2 = evmap_io_get_fdinfo_(&base->io, s2);
+
+ if (!ent2) /* This indicates a bug. */
+ return (0);
+ if (read)
+ ent2->read_pos_plus1 = i+1;
+ else
+ ent2->write_pos_plus1 = i+1;
+ }
+ return (0);
+}
+
+#define NEVENT 32
+void *
+win32_init(struct event_base *base)
+{
+ struct win32op *winop;
+ size_t size;
+ if (!(winop = mm_calloc(1, sizeof(struct win32op))))
+ return NULL;
+ winop->num_fds_in_fd_sets = NEVENT;
+ size = FD_SET_ALLOC_SIZE(NEVENT);
+ if (!(winop->readset_in = mm_malloc(size)))
+ goto err;
+ if (!(winop->writeset_in = mm_malloc(size)))
+ goto err;
+ if (!(winop->readset_out = mm_malloc(size)))
+ goto err;
+ if (!(winop->writeset_out = mm_malloc(size)))
+ goto err;
+ if (!(winop->exset_out = mm_malloc(size)))
+ goto err;
+ winop->readset_in->fd_count = winop->writeset_in->fd_count = 0;
+ winop->readset_out->fd_count = winop->writeset_out->fd_count
+ = winop->exset_out->fd_count = 0;
+
+ if (evsig_init_(base) < 0)
+ winop->signals_are_broken = 1;
+
+ evutil_weakrand_seed_(&base->weakrand_seed, 0);
+
+ return (winop);
+ err:
+ XFREE(winop->readset_in);
+ XFREE(winop->writeset_in);
+ XFREE(winop->readset_out);
+ XFREE(winop->writeset_out);
+ XFREE(winop->exset_out);
+ XFREE(winop);
+ return (NULL);
+}
+
+int
+win32_add(struct event_base *base, evutil_socket_t fd,
+ short old, short events, void *idx_)
+{
+ struct win32op *win32op = base->evbase;
+ struct idx_info *idx = idx_;
+
+ if ((events & EV_SIGNAL) && win32op->signals_are_broken)
+ return (-1);
+
+ if (!(events & (EV_READ|EV_WRITE)))
+ return (0);
+
+ event_debug(("%s: adding event for %d", __func__, (int)fd));
+ if (events & EV_READ) {
+ if (do_fd_set(win32op, idx, fd, 1)<0)
+ return (-1);
+ }
+ if (events & EV_WRITE) {
+ if (do_fd_set(win32op, idx, fd, 0)<0)
+ return (-1);
+ }
+ return (0);
+}
+
+int
+win32_del(struct event_base *base, evutil_socket_t fd, short old, short events,
+ void *idx_)
+{
+ struct win32op *win32op = base->evbase;
+ struct idx_info *idx = idx_;
+
+ event_debug(("%s: Removing event for "EV_SOCK_FMT,
+ __func__, EV_SOCK_ARG(fd)));
+ if (events & EV_READ)
+ do_fd_clear(base, win32op, idx, 1);
+ if (events & EV_WRITE)
+ do_fd_clear(base, win32op, idx, 0);
+
+ return 0;
+}
+
+static void
+fd_set_copy(struct win_fd_set *out, const struct win_fd_set *in)
+{
+ out->fd_count = in->fd_count;
+ memcpy(out->fd_array, in->fd_array, in->fd_count * (sizeof(SOCKET)));
+}
+
+/*
+ static void dump_fd_set(struct win_fd_set *s)
+ {
+ unsigned int i;
+ printf("[ ");
+ for(i=0;i<s->fd_count;++i)
+ printf("%d ",(int)s->fd_array[i]);
+ printf("]\n");
+ }
+*/
+
+int
+win32_dispatch(struct event_base *base, struct timeval *tv)
+{
+ struct win32op *win32op = base->evbase;
+ int res = 0;
+ unsigned j, i;
+ int fd_count;
+ SOCKET s;
+
+ if (win32op->resize_out_sets) {
+ size_t size = FD_SET_ALLOC_SIZE(win32op->num_fds_in_fd_sets);
+ if (!(win32op->readset_out = mm_realloc(win32op->readset_out, size)))
+ return (-1);
+ if (!(win32op->exset_out = mm_realloc(win32op->exset_out, size)))
+ return (-1);
+ if (!(win32op->writeset_out = mm_realloc(win32op->writeset_out, size)))
+ return (-1);
+ win32op->resize_out_sets = 0;
+ }
+
+ fd_set_copy(win32op->readset_out, win32op->readset_in);
+ fd_set_copy(win32op->exset_out, win32op->writeset_in);
+ fd_set_copy(win32op->writeset_out, win32op->writeset_in);
+
+ fd_count =
+ (win32op->readset_out->fd_count > win32op->writeset_out->fd_count) ?
+ win32op->readset_out->fd_count : win32op->writeset_out->fd_count;
+
+ if (!fd_count) {
+ long msec = tv ? evutil_tv_to_msec_(tv) : LONG_MAX;
+ /* Sleep's DWORD argument is unsigned long */
+ if (msec < 0)
+ msec = LONG_MAX;
+ /* Windows doesn't like you to call select() with no sockets */
+ Sleep(msec);
+ return (0);
+ }
+
+ EVBASE_RELEASE_LOCK(base, th_base_lock);
+
+ res = select(fd_count,
+ (struct fd_set*)win32op->readset_out,
+ (struct fd_set*)win32op->writeset_out,
+ (struct fd_set*)win32op->exset_out, tv);
+
+ EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+
+ event_debug(("%s: select returned %d", __func__, res));
+
+ if (res <= 0) {
+ return res;
+ }
+
+ if (win32op->readset_out->fd_count) {
+ i = evutil_weakrand_range_(&base->weakrand_seed,
+ win32op->readset_out->fd_count);
+ for (j=0; j<win32op->readset_out->fd_count; ++j) {
+ if (++i >= win32op->readset_out->fd_count)
+ i = 0;
+ s = win32op->readset_out->fd_array[i];
+ evmap_io_active_(base, s, EV_READ);
+ }
+ }
+ if (win32op->exset_out->fd_count) {
+ i = evutil_weakrand_range_(&base->weakrand_seed,
+ win32op->exset_out->fd_count);
+ for (j=0; j<win32op->exset_out->fd_count; ++j) {
+ if (++i >= win32op->exset_out->fd_count)
+ i = 0;
+ s = win32op->exset_out->fd_array[i];
+ evmap_io_active_(base, s, EV_WRITE);
+ }
+ }
+ if (win32op->writeset_out->fd_count) {
+ SOCKET s;
+ i = evutil_weakrand_range_(&base->weakrand_seed,
+ win32op->writeset_out->fd_count);
+ for (j=0; j<win32op->writeset_out->fd_count; ++j) {
+ if (++i >= win32op->writeset_out->fd_count)
+ i = 0;
+ s = win32op->writeset_out->fd_array[i];
+ evmap_io_active_(base, s, EV_WRITE);
+ }
+ }
+ return (0);
+}
+
+void
+win32_dealloc(struct event_base *base)
+{
+ struct win32op *win32op = base->evbase;
+
+ evsig_dealloc_(base);
+ if (win32op->readset_in)
+ mm_free(win32op->readset_in);
+ if (win32op->writeset_in)
+ mm_free(win32op->writeset_in);
+ if (win32op->readset_out)
+ mm_free(win32op->readset_out);
+ if (win32op->writeset_out)
+ mm_free(win32op->writeset_out);
+ if (win32op->exset_out)
+ mm_free(win32op->exset_out);
+ /* XXXXX free the tree. */
+
+ memset(win32op, 0, sizeof(*win32op));
+ mm_free(win32op);
+}
+
+#endif
diff --git a/sntp/libopts/COPYING.gplv3 b/sntp/libopts/COPYING.gplv3
index 6c1b848d6b28..065b7a6c5516 100644
--- a/sntp/libopts/COPYING.gplv3
+++ b/sntp/libopts/COPYING.gplv3
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
- copyright (c) by Bruce Korb - all rights reserved
+ Copyright (C) by Bruce Korb - all rights reserved
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
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
- <program> copyright (c) by Bruce Korb - all rights reserved
+ <program> Copyright (C) by Bruce Korb - all rights reserved
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/sntp/libopts/COPYING.lgplv3 b/sntp/libopts/COPYING.lgplv3
index c7759a01b2c8..3deaacb08b80 100644
--- a/sntp/libopts/COPYING.lgplv3
+++ b/sntp/libopts/COPYING.lgplv3
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/sntp/libopts/Makefile.am b/sntp/libopts/Makefile.am
index a94972e05771..ea1b56dfd2f2 100644
--- a/sntp/libopts/Makefile.am
+++ b/sntp/libopts/Makefile.am
@@ -6,23 +6,55 @@ else
noinst_LTLIBRARIES = libopts.la
endif
libopts_la_SOURCES = libopts.c
-libopts_la_CPPFLAGS = -I$(top_srcdir)
-libopts_la_LDFLAGS = -version-info 35:0:10
-EXTRA_DIST = \
+libopts_la_CPPFLAGS = -I$(srcdir)
+libopts_la_LDFLAGS = -version-info 41:0:16
+EXTRA_DIST =
+BUILT_SOURCES =
+MOSTLYCLEANFILES =
+
+libopts.c: $(BUILT_SOURCES)
+ @: do-nothing rule to avoid default SCCS get
+
+
+# Makefile fragment from gnulib-s stdnoreturn module:
+#
+_NORETURN_H=$(srcdir)/compat/_Noreturn.h
+EXTRA_DIST += $(srcdir)/compat/_Noreturn.h
+BUILT_SOURCES += $(STDNORETURN_H)
+if GL_GENERATE_STDNORETURN_H
+stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+ < $(srcdir)/stdnoreturn.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+stdnoreturn.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += stdnoreturn.h stdnoreturn.h-t
+EXTRA_DIST += stdnoreturn.in.h
+
+EXTRA_DIST += \
COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
MakeDefs.inc README ag-char-map.h \
- autoopts/usage-txt.h autoopts/options.h autoopts/project.h \
+ alias.c ao-strs.c ao-strs.h \
+ autoopts/project.h autoopts/options.h autoopts/usage-txt.h \
autoopts.c autoopts.h boolean.c \
- compat/strdup.c compat/compat.h compat/windows-config.h \
- compat/snprintf.c compat/strchr.c compat/pathfind.c \
- configfile.c cook.c enumeration.c \
- environment.c file.c genshell.c \
- genshell.h load.c m4/liboptschk.m4 \
- m4/libopts.m4 makeshell.c nested.c \
- numeric.c parse-duration.c parse-duration.h \
- pgusage.c proto.h putshell.c \
- reset.c restore.c save.c \
- sort.c stack.c streqvcmp.c \
+ check.c compat/snprintf.c compat/strchr.c \
+ compat/strdup.c compat/_Noreturn.h compat/pathfind.c \
+ compat/compat.h compat/windows-config.h configfile.c \
+ cook.c enum.c env.c \
+ file.c find.c genshell.c \
+ genshell.h gettext.h init.c \
+ intprops.h load.c m4/stdnoreturn.m4 \
+ m4/liboptschk.m4 m4/libopts.m4 makeshell.c \
+ nested.c numeric.c option-value-type.c \
+ option-value-type.h option-xat-attribute.c option-xat-attribute.h \
+ parse-duration.c parse-duration.h pgusage.c \
+ proto.h putshell.c reset.c \
+ restore.c save.c sort.c \
+ stack.c stdnoreturn.in.h streqvcmp.c \
text_mmap.c time.c tokenize.c \
- usage.c value-type.c value-type.h \
- version.c xat-attribute.c xat-attribute.h
+ usage.c version.c
diff --git a/sntp/libopts/Makefile.in b/sntp/libopts/Makefile.in
index 024399d014ed..111bc0f3a7fd 100644
--- a/sntp/libopts/Makefile.in
+++ b/sntp/libopts/Makefile.in
@@ -38,16 +38,30 @@ subdir = libopts
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
- $(top_srcdir)/../m4/libtool.m4 \
- $(top_srcdir)/../m4/ltoptions.m4 \
- $(top_srcdir)/../m4/ltsugar.m4 \
- $(top_srcdir)/../m4/ltversion.m4 \
- $(top_srcdir)/../m4/lt~obsolete.m4 \
- $(top_srcdir)/../m4/ntp_cacheversion.m4 \
- $(top_srcdir)/../m4/ntp_dir_sep.m4 \
- $(top_srcdir)/../m4/ntp_lib_m.m4 \
- $(top_srcdir)/../m4/ntp_openssl.m4 $(top_srcdir)/../version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/libevent/m4/openldap.m4 \
+ $(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/m4/ntp_compiler.m4 \
+ $(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/m4/ntp_googletest.m4 \
+ $(top_srcdir)/m4/ntp_ipv6.m4 $(top_srcdir)/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/m4/ntp_libevent.m4 \
+ $(top_srcdir)/m4/ntp_libntp.m4 \
+ $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/m4/ntp_openssl.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
+ $(top_srcdir)/m4/ntp_sysexits.m4 \
+ $(top_srcdir)/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -80,42 +94,71 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libopts_la_LIBADD =
am_libopts_la_OBJECTS = libopts_la-libopts.lo
libopts_la_OBJECTS = $(am_libopts_la_OBJECTS)
-libopts_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libopts_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libopts_la_LDFLAGS) $(LDFLAGS) -o $@
@INSTALL_LIBOPTS_FALSE@am_libopts_la_rpath =
@INSTALL_LIBOPTS_TRUE@am_libopts_la_rpath = -rpath $(libdir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libopts_la_SOURCES)
DIST_SOURCES = $(libopts_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -125,19 +168,29 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
@@ -145,19 +198,75 @@ LIBOPTS_DIR = @LIBOPTS_DIR@
LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_SYSLOG = @LIB_SYSLOG@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_FORCE_LIBEVENT_DIST = @NTP_FORCE_LIBEVENT_DIST@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -168,19 +277,40 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -222,6 +352,7 @@ psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
+subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
@@ -231,28 +362,31 @@ MAINTAINERCLEANFILES = Makefile.in
@INSTALL_LIBOPTS_TRUE@lib_LTLIBRARIES = libopts.la
@INSTALL_LIBOPTS_FALSE@noinst_LTLIBRARIES = libopts.la
libopts_la_SOURCES = libopts.c
-libopts_la_CPPFLAGS = -I$(top_srcdir)
-libopts_la_LDFLAGS = -version-info 35:0:10
-EXTRA_DIST = \
- COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
- MakeDefs.inc README ag-char-map.h \
- autoopts/usage-txt.h autoopts/options.h autoopts/project.h \
- autoopts.c autoopts.h boolean.c \
- compat/strdup.c compat/compat.h compat/windows-config.h \
- compat/snprintf.c compat/strchr.c compat/pathfind.c \
- configfile.c cook.c enumeration.c \
- environment.c file.c genshell.c \
- genshell.h load.c m4/liboptschk.m4 \
- m4/libopts.m4 makeshell.c nested.c \
- numeric.c parse-duration.c parse-duration.h \
- pgusage.c proto.h putshell.c \
- reset.c restore.c save.c \
- sort.c stack.c streqvcmp.c \
- text_mmap.c time.c tokenize.c \
- usage.c value-type.c value-type.h \
- version.c xat-attribute.c xat-attribute.h
-
-all: all-am
+libopts_la_CPPFLAGS = -I$(srcdir)
+libopts_la_LDFLAGS = -version-info 41:0:16
+EXTRA_DIST = $(srcdir)/compat/_Noreturn.h stdnoreturn.in.h \
+ COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd MakeDefs.inc README \
+ ag-char-map.h alias.c ao-strs.c ao-strs.h autoopts/project.h \
+ autoopts/options.h autoopts/usage-txt.h autoopts.c autoopts.h \
+ boolean.c check.c compat/snprintf.c compat/strchr.c \
+ compat/strdup.c compat/_Noreturn.h compat/pathfind.c \
+ compat/compat.h compat/windows-config.h configfile.c cook.c \
+ enum.c env.c file.c find.c genshell.c genshell.h gettext.h \
+ init.c intprops.h load.c m4/stdnoreturn.m4 m4/liboptschk.m4 \
+ m4/libopts.m4 makeshell.c nested.c numeric.c \
+ option-value-type.c option-value-type.h option-xat-attribute.c \
+ option-xat-attribute.h parse-duration.c parse-duration.h \
+ pgusage.c proto.h putshell.c reset.c restore.c save.c sort.c \
+ stack.c stdnoreturn.in.h streqvcmp.c text_mmap.c time.c \
+ tokenize.c usage.c version.c
+BUILT_SOURCES = $(STDNORETURN_H)
+MOSTLYCLEANFILES = stdnoreturn.h stdnoreturn.h-t
+
+# Makefile fragment from gnulib-s stdnoreturn module:
+#
+_NORETURN_H = $(srcdir)/compat/_Noreturn.h
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
@@ -327,7 +461,7 @@ clean-noinstLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
libopts.la: $(libopts_la_OBJECTS) $(libopts_la_DEPENDENCIES)
- $(libopts_la_LINK) $(am_libopts_la_rpath) $(libopts_la_OBJECTS) $(libopts_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(libopts_la_LINK) $(am_libopts_la_rpath) $(libopts_la_OBJECTS) $(libopts_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -338,32 +472,36 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libopts_la-libopts.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libopts_la-libopts.lo: libopts.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libopts_la-libopts.lo -MD -MP -MF $(DEPDIR)/libopts_la-libopts.Tpo -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libopts_la-libopts.Tpo $(DEPDIR)/libopts_la-libopts.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libopts_la-libopts.lo -MD -MP -MF $(DEPDIR)/libopts_la-libopts.Tpo -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libopts_la-libopts.Tpo $(DEPDIR)/libopts_la-libopts.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libopts.c' object='libopts_la-libopts.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libopts_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libopts_la-libopts.lo `test -f 'libopts.c' || echo '$(srcdir)/'`libopts.c
mostlyclean-libtool:
-rm -f *.lo
@@ -454,13 +592,15 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-am
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -475,6 +615,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -485,6 +626,7 @@ distclean-generic:
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)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
@@ -557,7 +699,7 @@ ps-am:
uninstall-am: uninstall-libLTLIBRARIES
-.MAKE: install-am install-strip
+.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
@@ -574,6 +716,18 @@ uninstall-am: uninstall-libLTLIBRARIES
tags uninstall uninstall-am uninstall-libLTLIBRARIES
+libopts.c: $(BUILT_SOURCES)
+ @: do-nothing rule to avoid default SCCS get
+@GL_GENERATE_STDNORETURN_H_TRUE@stdnoreturn.h: stdnoreturn.in.h $(top_builddir)/config.status $(_NORETURN_H)
+@GL_GENERATE_STDNORETURN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDNORETURN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_STDNORETURN_H_TRUE@ sed -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+@GL_GENERATE_STDNORETURN_H_TRUE@ < $(srcdir)/stdnoreturn.in.h; \
+@GL_GENERATE_STDNORETURN_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDNORETURN_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDNORETURN_H_FALSE@stdnoreturn.h: $(top_builddir)/config.status
+@GL_GENERATE_STDNORETURN_H_FALSE@ rm -f $@
+
# 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/sntp/libopts/README b/sntp/libopts/README
index afa540987412..4bf758d8c21d 100644
--- a/sntp/libopts/README
+++ b/sntp/libopts/README
@@ -115,7 +115,7 @@ These macros work as follows:
LICENSING:
-This material is Copyright (c) 1992-2011 by Bruce Korb. You are
+This material is Copyright (C) 1992-2014 by Bruce Korb. You are
licensed to use this under the terms of either the GNU Lesser General
Public License (see: COPYING.lgpl), or, at your option, the modified
Berkeley Software Distribution License (see: COPYING.mbsd). Both of
diff --git a/sntp/libopts/ag-char-map.h b/sntp/libopts/ag-char-map.h
index b4f088ef3a4b..01733d71c78e 100644
--- a/sntp/libopts/ag-char-map.h
+++ b/sntp/libopts/ag-char-map.h
@@ -1,192 +1,526 @@
/*
- * Character mapping generated 04/29/11 15:43:58
+ * 29 bits for 46 character classifications
+ * generated by char-mapper on 08/08/14 at 16:09:03
*
* This file contains the character classifications
* used by AutoGen and AutoOpts for identifying tokens.
- * This file is part of AutoGen.
- * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
- * AutoGen 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 3 of the License, or (at your option) any later
- * version.
- * AutoGen 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, see <http://www.gnu.org/licenses/>.
+ * The table is static scope, so %guard is empty.
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#ifndef AG_CHAR_MAP_H_GUARD
#define AG_CHAR_MAP_H_GUARD 1
#ifdef HAVE_CONFIG_H
# if defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-# elif defined(HAVE_STDINT_H)
-# include <stdint.h>
-
-# else
-# ifndef HAVE_INT8_T
- typedef signed char int8_t;
-# endif
-# ifndef HAVE_UINT8_T
- typedef unsigned char uint8_t;
-# endif
-# ifndef HAVE_INT16_T
- typedef signed short int16_t;
-# endif
-# ifndef HAVE_UINT16_T
- typedef unsigned short uint16_t;
-# endif
-# ifndef HAVE_UINT_T
- typedef unsigned int uint_t;
-# endif
+# include <inttypes.h>
-# ifndef HAVE_INT32_T
-# if SIZEOF_INT == 4
- typedef signed int int32_t;
-# elif SIZEOF_LONG == 4
- typedef signed long int32_t;
-# endif
-# endif
+# elif defined(HAVE_STDINT_H)
+# include <stdint.h>
-# ifndef HAVE_UINT32_T
-# if SIZEOF_INT == 4
- typedef unsigned int uint32_t;
-# elif SIZEOF_LONG == 4
- typedef unsigned long uint32_t;
-# endif
+# elif !defined(HAVE_UINT32_T)
+# if SIZEOF_INT == 4
+ typedef unsigned int uint32_t;
+# elif SIZEOF_LONG == 4
+ typedef unsigned long uint32_t;
# endif
# endif /* HAVE_*INT*_H header */
#else /* not HAVE_CONFIG_H -- */
-# ifdef __sun
-# include <inttypes.h>
-# else
-# include <stdint.h>
-# endif
+# include <inttypes.h>
#endif /* HAVE_CONFIG_H */
#if 0 /* mapping specification source (from autogen.map) */
//
-// %guard autoopts_internal
+// %guard
// %file ag-char-map.h
-// %static-table option-char-category
+// %backup
+// %optimize
//
-// %comment
-// This file contains the character classifications
-// used by AutoGen and AutoOpts for identifying tokens.
-//
-// This file is part of AutoGen.
-// AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
-//
-// AutoGen 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 3 of the License, or (at your option) any later
-// version.
+// %comment -- see above
+// %
//
-// AutoGen 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.
+// newline "\n"
+// nul-byte "\x00"
+// dir-sep "/\\"
+// percent "%"
+// comma ","
+// colon ":"
+// underscore "_"
+// plus "+"
+// dollar "$"
+// option-marker "-"
//
-// You should have received a copy of the GNU General Public License along
-// with this program. If not, see <http://www.gnu.org/licenses/>.
-// %
+// horiz-white "\t "
+// alt-white "\v\f\r\b"
+// whitespace +horiz-white +newline +alt-white
+// non-nl-white +horiz-white +alt-white
+// quote "'\""
+// parentheses "()"
//
-// lower-case "a-z"
-// upper-case "A-Z"
-// alphabetic +lower-case +upper-case
+// graphic "!-~"
+// inversion "~-"
// oct-digit "0-7"
// dec-digit "89" +oct-digit
// hex-digit "a-fA-F" +dec-digit
+// lower-case "a-z"
+// upper-case "A-Z"
+// alphabetic +lower-case +upper-case
// alphanumeric +alphabetic +dec-digit
-// var-first "_" +alphabetic
+// var-first +underscore +alphabetic
// variable-name +var-first +dec-digit
// option-name "^-" +variable-name
-// value-name ":" +option-name
-// horiz-white "\t "
-// compound-name "[.]" +value-name +horiz-white
-// whitespace "\v\f\r\n\b" +horiz-white
-// unquotable "!-~" -"\"#(),;<=>[\\]`{}?*'"
+// value-name +colon +option-name
+// name-sep "[.]"
+// compound-name +value-name +name-sep +horiz-white
+// scheme-note +parentheses +quote
+//
+// unquotable "!-~" -"#,;<=>[\\]`{}?*" -quote -parentheses
// end-xml-token "/>" +whitespace
-// graphic "!-~"
-// plus-n-space "+" +whitespace
+// plus-n-space +plus +whitespace
// punctuation "!-~" -alphanumeric -"_"
// suffix "-._" +alphanumeric
-// suffix-fmt "%/" +suffix
-// false-type "nNfF0\x00"
-// file-name "/" +suffix
-// end-token "\x00" +whitespace
-// end-list-entry "," +end-token
+// suffix-fmt +percent +suffix +dir-sep
+// false-type "nNfF0" +nul-byte
+// file-name +dir-sep +suffix
+// end-token +nul-byte +whitespace
+// end-list-entry +comma +end-token
+// set-separator "|+-!" +end-list-entry
+// signed-number +inversion +dec-digit
+// make-script +dollar +newline
+// load-line-skip +horiz-white +option-marker
//
#endif /* 0 -- mapping spec. source */
-typedef uint32_t option_char_category_mask_t;
-static option_char_category_mask_t const option_char_category[128];
-static inline int is_option_char_category_char(char ch, option_char_category_mask_t mask) {
- unsigned int ix = (unsigned char)ch;
- return ((ix < 128) && ((option_char_category[ix] & mask) != 0)); }
-
-#define IS_LOWER_CASE_CHAR(_c) is_option_char_category_char((_c), 0x000001)
-#define IS_UPPER_CASE_CHAR(_c) is_option_char_category_char((_c), 0x000002)
-#define IS_ALPHABETIC_CHAR(_c) is_option_char_category_char((_c), 0x000003)
-#define IS_OCT_DIGIT_CHAR(_c) is_option_char_category_char((_c), 0x000004)
-#define IS_DEC_DIGIT_CHAR(_c) is_option_char_category_char((_c), 0x00000C)
-#define IS_HEX_DIGIT_CHAR(_c) is_option_char_category_char((_c), 0x00001C)
-#define IS_ALPHANUMERIC_CHAR(_c) is_option_char_category_char((_c), 0x00000F)
-#define IS_VAR_FIRST_CHAR(_c) is_option_char_category_char((_c), 0x000023)
-#define IS_VARIABLE_NAME_CHAR(_c) is_option_char_category_char((_c), 0x00002F)
-#define IS_OPTION_NAME_CHAR(_c) is_option_char_category_char((_c), 0x00006F)
-#define IS_VALUE_NAME_CHAR(_c) is_option_char_category_char((_c), 0x0000EF)
-#define IS_HORIZ_WHITE_CHAR(_c) is_option_char_category_char((_c), 0x000100)
-#define IS_COMPOUND_NAME_CHAR(_c) is_option_char_category_char((_c), 0x0003EF)
-#define IS_WHITESPACE_CHAR(_c) is_option_char_category_char((_c), 0x000500)
-#define IS_UNQUOTABLE_CHAR(_c) is_option_char_category_char((_c), 0x000800)
-#define IS_END_XML_TOKEN_CHAR(_c) is_option_char_category_char((_c), 0x001500)
-#define IS_GRAPHIC_CHAR(_c) is_option_char_category_char((_c), 0x002000)
-#define IS_PLUS_N_SPACE_CHAR(_c) is_option_char_category_char((_c), 0x004500)
-#define IS_PUNCTUATION_CHAR(_c) is_option_char_category_char((_c), 0x008000)
-#define IS_SUFFIX_CHAR(_c) is_option_char_category_char((_c), 0x01000F)
-#define IS_SUFFIX_FMT_CHAR(_c) is_option_char_category_char((_c), 0x03000F)
-#define IS_FALSE_TYPE_CHAR(_c) is_option_char_category_char((_c), 0x040000)
-#define IS_FILE_NAME_CHAR(_c) is_option_char_category_char((_c), 0x09000F)
-#define IS_END_TOKEN_CHAR(_c) is_option_char_category_char((_c), 0x100500)
-#define IS_END_LIST_ENTRY_CHAR(_c) is_option_char_category_char((_c), 0x300500)
-
-#if 1 /* def AUTOOPTS_INTERNAL */
-static option_char_category_mask_t const option_char_category[128] = {
- /*x00*/ 0x140000, /*x01*/ 0x000000, /*x02*/ 0x000000, /*x03*/ 0x000000,
- /*x04*/ 0x000000, /*x05*/ 0x000000, /*x06*/ 0x000000, /*\a */ 0x000000,
- /*\b */ 0x000400, /*\t */ 0x000100, /*\n */ 0x000400, /*\v */ 0x000400,
- /*\f */ 0x000400, /*\r */ 0x000400, /*x0E*/ 0x000000, /*x0F*/ 0x000000,
- /*x10*/ 0x000000, /*x11*/ 0x000000, /*x12*/ 0x000000, /*x13*/ 0x000000,
- /*x14*/ 0x000000, /*x15*/ 0x000000, /*x16*/ 0x000000, /*x17*/ 0x000000,
- /*x18*/ 0x000000, /*x19*/ 0x000000, /*x1A*/ 0x000000, /*x1B*/ 0x000000,
- /*x1C*/ 0x000000, /*x1D*/ 0x000000, /*x1E*/ 0x000000, /*x1F*/ 0x000000,
- /* */ 0x000100, /* ! */ 0x00A800, /* " */ 0x00A000, /* # */ 0x00A000,
- /* $ */ 0x00A800, /* % */ 0x02A800, /* & */ 0x00A800, /* ' */ 0x00A000,
- /* ( */ 0x00A000, /* ) */ 0x00A000, /* * */ 0x00A000, /* + */ 0x00E800,
- /* , */ 0x20A000, /* - */ 0x01A840, /* . */ 0x01AA00, /* / */ 0x0AB800,
- /* 0 */ 0x042804, /* 1 */ 0x002804, /* 2 */ 0x002804, /* 3 */ 0x002804,
- /* 4 */ 0x002804, /* 5 */ 0x002804, /* 6 */ 0x002804, /* 7 */ 0x002804,
- /* 8 */ 0x002808, /* 9 */ 0x002808, /* : */ 0x00A880, /* ; */ 0x00A000,
- /* < */ 0x00A000, /* = */ 0x00A000, /* > */ 0x00B000, /* ? */ 0x00A000,
- /* @ */ 0x00A800, /* A */ 0x002812, /* B */ 0x002812, /* C */ 0x002812,
- /* D */ 0x002812, /* E */ 0x002812, /* F */ 0x042812, /* G */ 0x002802,
- /* H */ 0x002802, /* I */ 0x002802, /* J */ 0x002802, /* K */ 0x002802,
- /* L */ 0x002802, /* M */ 0x002802, /* N */ 0x042802, /* O */ 0x002802,
- /* P */ 0x002802, /* Q */ 0x002802, /* R */ 0x002802, /* S */ 0x002802,
- /* T */ 0x002802, /* U */ 0x002802, /* V */ 0x002802, /* W */ 0x002802,
- /* X */ 0x002802, /* Y */ 0x002802, /* Z */ 0x002802, /* [ */ 0x00A200,
- /* \ */ 0x00A000, /* ] */ 0x00A200, /* ^ */ 0x00A840, /* _ */ 0x012820,
- /* ` */ 0x00A000, /* a */ 0x002811, /* b */ 0x002811, /* c */ 0x002811,
- /* d */ 0x002811, /* e */ 0x002811, /* f */ 0x042811, /* g */ 0x002801,
- /* h */ 0x002801, /* i */ 0x002801, /* j */ 0x002801, /* k */ 0x002801,
- /* l */ 0x002801, /* m */ 0x002801, /* n */ 0x042801, /* o */ 0x002801,
- /* p */ 0x002801, /* q */ 0x002801, /* r */ 0x002801, /* s */ 0x002801,
- /* t */ 0x002801, /* u */ 0x002801, /* v */ 0x002801, /* w */ 0x002801,
- /* x */ 0x002801, /* y */ 0x002801, /* z */ 0x002801, /* { */ 0x00A000,
- /* | */ 0x00A800, /* } */ 0x00A000, /* ~ */ 0x00A800, /*x7F*/ 0x000000
+typedef uint32_t ag_char_map_mask_t;
+
+#define IS_NEWLINE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000001)
+#define SPN_NEWLINE_CHARS(_s) spn_ag_char_map_chars(_s, 0)
+#define BRK_NEWLINE_CHARS(_s) brk_ag_char_map_chars(_s, 0)
+#define SPN_NEWLINE_BACK(s,e) spn_ag_char_map_back(s, e, 0)
+#define BRK_NEWLINE_BACK(s,e) brk_ag_char_map_back(s, e, 0)
+#define IS_NUL_BYTE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000002)
+#define SPN_NUL_BYTE_CHARS(_s) spn_ag_char_map_chars(_s, 1)
+#define BRK_NUL_BYTE_CHARS(_s) brk_ag_char_map_chars(_s, 1)
+#define SPN_NUL_BYTE_BACK(s,e) spn_ag_char_map_back(s, e, 1)
+#define BRK_NUL_BYTE_BACK(s,e) brk_ag_char_map_back(s, e, 1)
+#define IS_DIR_SEP_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000004)
+#define SPN_DIR_SEP_CHARS(_s) spn_ag_char_map_chars(_s, 2)
+#define BRK_DIR_SEP_CHARS(_s) brk_ag_char_map_chars(_s, 2)
+#define SPN_DIR_SEP_BACK(s,e) spn_ag_char_map_back(s, e, 2)
+#define BRK_DIR_SEP_BACK(s,e) brk_ag_char_map_back(s, e, 2)
+#define IS_PERCENT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000008)
+#define SPN_PERCENT_CHARS(_s) spn_ag_char_map_chars(_s, 3)
+#define BRK_PERCENT_CHARS(_s) brk_ag_char_map_chars(_s, 3)
+#define SPN_PERCENT_BACK(s,e) spn_ag_char_map_back(s, e, 3)
+#define BRK_PERCENT_BACK(s,e) brk_ag_char_map_back(s, e, 3)
+#define IS_COMMA_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000010)
+#define SPN_COMMA_CHARS(_s) spn_ag_char_map_chars(_s, 4)
+#define BRK_COMMA_CHARS(_s) brk_ag_char_map_chars(_s, 4)
+#define SPN_COMMA_BACK(s,e) spn_ag_char_map_back(s, e, 4)
+#define BRK_COMMA_BACK(s,e) brk_ag_char_map_back(s, e, 4)
+#define IS_COLON_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000020)
+#define SPN_COLON_CHARS(_s) spn_ag_char_map_chars(_s, 5)
+#define BRK_COLON_CHARS(_s) brk_ag_char_map_chars(_s, 5)
+#define SPN_COLON_BACK(s,e) spn_ag_char_map_back(s, e, 5)
+#define BRK_COLON_BACK(s,e) brk_ag_char_map_back(s, e, 5)
+#define IS_UNDERSCORE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000040)
+#define SPN_UNDERSCORE_CHARS(_s) spn_ag_char_map_chars(_s, 6)
+#define BRK_UNDERSCORE_CHARS(_s) brk_ag_char_map_chars(_s, 6)
+#define SPN_UNDERSCORE_BACK(s,e) spn_ag_char_map_back(s, e, 6)
+#define BRK_UNDERSCORE_BACK(s,e) brk_ag_char_map_back(s, e, 6)
+#define IS_PLUS_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000080)
+#define SPN_PLUS_CHARS(_s) spn_ag_char_map_chars(_s, 7)
+#define BRK_PLUS_CHARS(_s) brk_ag_char_map_chars(_s, 7)
+#define SPN_PLUS_BACK(s,e) spn_ag_char_map_back(s, e, 7)
+#define BRK_PLUS_BACK(s,e) brk_ag_char_map_back(s, e, 7)
+#define IS_DOLLAR_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000100)
+#define SPN_DOLLAR_CHARS(_s) spn_ag_char_map_chars(_s, 8)
+#define BRK_DOLLAR_CHARS(_s) brk_ag_char_map_chars(_s, 8)
+#define SPN_DOLLAR_BACK(s,e) spn_ag_char_map_back(s, e, 8)
+#define BRK_DOLLAR_BACK(s,e) brk_ag_char_map_back(s, e, 8)
+#define IS_OPTION_MARKER_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000200)
+#define SPN_OPTION_MARKER_CHARS(_s) spn_ag_char_map_chars(_s, 9)
+#define BRK_OPTION_MARKER_CHARS(_s) brk_ag_char_map_chars(_s, 9)
+#define SPN_OPTION_MARKER_BACK(s,e) spn_ag_char_map_back(s, e, 9)
+#define BRK_OPTION_MARKER_BACK(s,e) brk_ag_char_map_back(s, e, 9)
+#define IS_HORIZ_WHITE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000400)
+#define SPN_HORIZ_WHITE_CHARS(_s) spn_ag_char_map_chars(_s, 10)
+#define BRK_HORIZ_WHITE_CHARS(_s) brk_ag_char_map_chars(_s, 10)
+#define SPN_HORIZ_WHITE_BACK(s,e) spn_ag_char_map_back(s, e, 10)
+#define BRK_HORIZ_WHITE_BACK(s,e) brk_ag_char_map_back(s, e, 10)
+#define IS_ALT_WHITE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000800)
+#define SPN_ALT_WHITE_CHARS(_s) spn_ag_char_map_chars(_s, 11)
+#define BRK_ALT_WHITE_CHARS(_s) brk_ag_char_map_chars(_s, 11)
+#define SPN_ALT_WHITE_BACK(s,e) spn_ag_char_map_back(s, e, 11)
+#define BRK_ALT_WHITE_BACK(s,e) brk_ag_char_map_back(s, e, 11)
+#define IS_WHITESPACE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000C01)
+#define SPN_WHITESPACE_CHARS(_s) spn_ag_char_map_chars(_s, 12)
+#define BRK_WHITESPACE_CHARS(_s) brk_ag_char_map_chars(_s, 12)
+#define SPN_WHITESPACE_BACK(s,e) spn_ag_char_map_back(s, e, 12)
+#define BRK_WHITESPACE_BACK(s,e) brk_ag_char_map_back(s, e, 12)
+#define IS_NON_NL_WHITE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000C00)
+#define SPN_NON_NL_WHITE_CHARS(_s) spn_ag_char_map_chars(_s, 13)
+#define BRK_NON_NL_WHITE_CHARS(_s) brk_ag_char_map_chars(_s, 13)
+#define SPN_NON_NL_WHITE_BACK(s,e) spn_ag_char_map_back(s, e, 13)
+#define BRK_NON_NL_WHITE_BACK(s,e) brk_ag_char_map_back(s, e, 13)
+#define IS_QUOTE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00001000)
+#define SPN_QUOTE_CHARS(_s) spn_ag_char_map_chars(_s, 14)
+#define BRK_QUOTE_CHARS(_s) brk_ag_char_map_chars(_s, 14)
+#define SPN_QUOTE_BACK(s,e) spn_ag_char_map_back(s, e, 14)
+#define BRK_QUOTE_BACK(s,e) brk_ag_char_map_back(s, e, 14)
+#define IS_PARENTHESES_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00002000)
+#define SPN_PARENTHESES_CHARS(_s) spn_ag_char_map_chars(_s, 15)
+#define BRK_PARENTHESES_CHARS(_s) brk_ag_char_map_chars(_s, 15)
+#define SPN_PARENTHESES_BACK(s,e) spn_ag_char_map_back(s, e, 15)
+#define BRK_PARENTHESES_BACK(s,e) brk_ag_char_map_back(s, e, 15)
+#define IS_GRAPHIC_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00004000)
+#define SPN_GRAPHIC_CHARS(_s) spn_ag_char_map_chars(_s, 16)
+#define BRK_GRAPHIC_CHARS(_s) brk_ag_char_map_chars(_s, 16)
+#define SPN_GRAPHIC_BACK(s,e) spn_ag_char_map_back(s, e, 16)
+#define BRK_GRAPHIC_BACK(s,e) brk_ag_char_map_back(s, e, 16)
+#define IS_INVERSION_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00008000)
+#define SPN_INVERSION_CHARS(_s) spn_ag_char_map_chars(_s, 17)
+#define BRK_INVERSION_CHARS(_s) brk_ag_char_map_chars(_s, 17)
+#define SPN_INVERSION_BACK(s,e) spn_ag_char_map_back(s, e, 17)
+#define BRK_INVERSION_BACK(s,e) brk_ag_char_map_back(s, e, 17)
+#define IS_OCT_DIGIT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00010000)
+#define SPN_OCT_DIGIT_CHARS(_s) spn_ag_char_map_chars(_s, 18)
+#define BRK_OCT_DIGIT_CHARS(_s) brk_ag_char_map_chars(_s, 18)
+#define SPN_OCT_DIGIT_BACK(s,e) spn_ag_char_map_back(s, e, 18)
+#define BRK_OCT_DIGIT_BACK(s,e) brk_ag_char_map_back(s, e, 18)
+#define IS_DEC_DIGIT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00030000)
+#define SPN_DEC_DIGIT_CHARS(_s) spn_ag_char_map_chars(_s, 19)
+#define BRK_DEC_DIGIT_CHARS(_s) brk_ag_char_map_chars(_s, 19)
+#define SPN_DEC_DIGIT_BACK(s,e) spn_ag_char_map_back(s, e, 19)
+#define BRK_DEC_DIGIT_BACK(s,e) brk_ag_char_map_back(s, e, 19)
+#define IS_HEX_DIGIT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00070000)
+#define SPN_HEX_DIGIT_CHARS(_s) spn_ag_char_map_chars(_s, 20)
+#define BRK_HEX_DIGIT_CHARS(_s) brk_ag_char_map_chars(_s, 20)
+#define SPN_HEX_DIGIT_BACK(s,e) spn_ag_char_map_back(s, e, 20)
+#define BRK_HEX_DIGIT_BACK(s,e) brk_ag_char_map_back(s, e, 20)
+#define IS_LOWER_CASE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00080000)
+#define SPN_LOWER_CASE_CHARS(_s) spn_ag_char_map_chars(_s, 21)
+#define BRK_LOWER_CASE_CHARS(_s) brk_ag_char_map_chars(_s, 21)
+#define SPN_LOWER_CASE_BACK(s,e) spn_ag_char_map_back(s, e, 21)
+#define BRK_LOWER_CASE_BACK(s,e) brk_ag_char_map_back(s, e, 21)
+#define IS_UPPER_CASE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00100000)
+#define SPN_UPPER_CASE_CHARS(_s) spn_ag_char_map_chars(_s, 22)
+#define BRK_UPPER_CASE_CHARS(_s) brk_ag_char_map_chars(_s, 22)
+#define SPN_UPPER_CASE_BACK(s,e) spn_ag_char_map_back(s, e, 22)
+#define BRK_UPPER_CASE_BACK(s,e) brk_ag_char_map_back(s, e, 22)
+#define IS_ALPHABETIC_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00180000)
+#define SPN_ALPHABETIC_CHARS(_s) spn_ag_char_map_chars(_s, 23)
+#define BRK_ALPHABETIC_CHARS(_s) brk_ag_char_map_chars(_s, 23)
+#define SPN_ALPHABETIC_BACK(s,e) spn_ag_char_map_back(s, e, 23)
+#define BRK_ALPHABETIC_BACK(s,e) brk_ag_char_map_back(s, e, 23)
+#define IS_ALPHANUMERIC_CHAR( _c) is_ag_char_map_char((char)(_c), 0x001B0000)
+#define SPN_ALPHANUMERIC_CHARS(_s) spn_ag_char_map_chars(_s, 24)
+#define BRK_ALPHANUMERIC_CHARS(_s) brk_ag_char_map_chars(_s, 24)
+#define SPN_ALPHANUMERIC_BACK(s,e) spn_ag_char_map_back(s, e, 24)
+#define BRK_ALPHANUMERIC_BACK(s,e) brk_ag_char_map_back(s, e, 24)
+#define IS_VAR_FIRST_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00180040)
+#define SPN_VAR_FIRST_CHARS(_s) spn_ag_char_map_chars(_s, 25)
+#define BRK_VAR_FIRST_CHARS(_s) brk_ag_char_map_chars(_s, 25)
+#define SPN_VAR_FIRST_BACK(s,e) spn_ag_char_map_back(s, e, 25)
+#define BRK_VAR_FIRST_BACK(s,e) brk_ag_char_map_back(s, e, 25)
+#define IS_VARIABLE_NAME_CHAR( _c) is_ag_char_map_char((char)(_c), 0x001B0040)
+#define SPN_VARIABLE_NAME_CHARS(_s) spn_ag_char_map_chars(_s, 26)
+#define BRK_VARIABLE_NAME_CHARS(_s) brk_ag_char_map_chars(_s, 26)
+#define SPN_VARIABLE_NAME_BACK(s,e) spn_ag_char_map_back(s, e, 26)
+#define BRK_VARIABLE_NAME_BACK(s,e) brk_ag_char_map_back(s, e, 26)
+#define IS_OPTION_NAME_CHAR( _c) is_ag_char_map_char((char)(_c), 0x003B0040)
+#define SPN_OPTION_NAME_CHARS(_s) spn_ag_char_map_chars(_s, 27)
+#define BRK_OPTION_NAME_CHARS(_s) brk_ag_char_map_chars(_s, 27)
+#define SPN_OPTION_NAME_BACK(s,e) spn_ag_char_map_back(s, e, 27)
+#define BRK_OPTION_NAME_BACK(s,e) brk_ag_char_map_back(s, e, 27)
+#define IS_VALUE_NAME_CHAR( _c) is_ag_char_map_char((char)(_c), 0x003B0060)
+#define SPN_VALUE_NAME_CHARS(_s) spn_ag_char_map_chars(_s, 28)
+#define BRK_VALUE_NAME_CHARS(_s) brk_ag_char_map_chars(_s, 28)
+#define SPN_VALUE_NAME_BACK(s,e) spn_ag_char_map_back(s, e, 28)
+#define BRK_VALUE_NAME_BACK(s,e) brk_ag_char_map_back(s, e, 28)
+#define IS_NAME_SEP_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00400000)
+#define SPN_NAME_SEP_CHARS(_s) spn_ag_char_map_chars(_s, 29)
+#define BRK_NAME_SEP_CHARS(_s) brk_ag_char_map_chars(_s, 29)
+#define SPN_NAME_SEP_BACK(s,e) spn_ag_char_map_back(s, e, 29)
+#define BRK_NAME_SEP_BACK(s,e) brk_ag_char_map_back(s, e, 29)
+#define IS_COMPOUND_NAME_CHAR( _c) is_ag_char_map_char((char)(_c), 0x007B0460)
+#define SPN_COMPOUND_NAME_CHARS(_s) spn_ag_char_map_chars(_s, 30)
+#define BRK_COMPOUND_NAME_CHARS(_s) brk_ag_char_map_chars(_s, 30)
+#define SPN_COMPOUND_NAME_BACK(s,e) spn_ag_char_map_back(s, e, 30)
+#define BRK_COMPOUND_NAME_BACK(s,e) brk_ag_char_map_back(s, e, 30)
+#define IS_SCHEME_NOTE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00003000)
+#define SPN_SCHEME_NOTE_CHARS(_s) spn_ag_char_map_chars(_s, 31)
+#define BRK_SCHEME_NOTE_CHARS(_s) brk_ag_char_map_chars(_s, 31)
+#define SPN_SCHEME_NOTE_BACK(s,e) spn_ag_char_map_back(s, e, 31)
+#define BRK_SCHEME_NOTE_BACK(s,e) brk_ag_char_map_back(s, e, 31)
+#define IS_UNQUOTABLE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00800000)
+#define SPN_UNQUOTABLE_CHARS(_s) spn_ag_char_map_chars(_s, 32)
+#define BRK_UNQUOTABLE_CHARS(_s) brk_ag_char_map_chars(_s, 32)
+#define SPN_UNQUOTABLE_BACK(s,e) spn_ag_char_map_back(s, e, 32)
+#define BRK_UNQUOTABLE_BACK(s,e) brk_ag_char_map_back(s, e, 32)
+#define IS_END_XML_TOKEN_CHAR( _c) is_ag_char_map_char((char)(_c), 0x01000C01)
+#define SPN_END_XML_TOKEN_CHARS(_s) spn_ag_char_map_chars(_s, 33)
+#define BRK_END_XML_TOKEN_CHARS(_s) brk_ag_char_map_chars(_s, 33)
+#define SPN_END_XML_TOKEN_BACK(s,e) spn_ag_char_map_back(s, e, 33)
+#define BRK_END_XML_TOKEN_BACK(s,e) brk_ag_char_map_back(s, e, 33)
+#define IS_PLUS_N_SPACE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000C81)
+#define SPN_PLUS_N_SPACE_CHARS(_s) spn_ag_char_map_chars(_s, 34)
+#define BRK_PLUS_N_SPACE_CHARS(_s) brk_ag_char_map_chars(_s, 34)
+#define SPN_PLUS_N_SPACE_BACK(s,e) spn_ag_char_map_back(s, e, 34)
+#define BRK_PLUS_N_SPACE_BACK(s,e) brk_ag_char_map_back(s, e, 34)
+#define IS_PUNCTUATION_CHAR( _c) is_ag_char_map_char((char)(_c), 0x02000000)
+#define SPN_PUNCTUATION_CHARS(_s) spn_ag_char_map_chars(_s, 35)
+#define BRK_PUNCTUATION_CHARS(_s) brk_ag_char_map_chars(_s, 35)
+#define SPN_PUNCTUATION_BACK(s,e) spn_ag_char_map_back(s, e, 35)
+#define BRK_PUNCTUATION_BACK(s,e) brk_ag_char_map_back(s, e, 35)
+#define IS_SUFFIX_CHAR( _c) is_ag_char_map_char((char)(_c), 0x041B0000)
+#define SPN_SUFFIX_CHARS(_s) spn_ag_char_map_chars(_s, 36)
+#define BRK_SUFFIX_CHARS(_s) brk_ag_char_map_chars(_s, 36)
+#define SPN_SUFFIX_BACK(s,e) spn_ag_char_map_back(s, e, 36)
+#define BRK_SUFFIX_BACK(s,e) brk_ag_char_map_back(s, e, 36)
+#define IS_SUFFIX_FMT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x041B000C)
+#define SPN_SUFFIX_FMT_CHARS(_s) spn_ag_char_map_chars(_s, 37)
+#define BRK_SUFFIX_FMT_CHARS(_s) brk_ag_char_map_chars(_s, 37)
+#define SPN_SUFFIX_FMT_BACK(s,e) spn_ag_char_map_back(s, e, 37)
+#define BRK_SUFFIX_FMT_BACK(s,e) brk_ag_char_map_back(s, e, 37)
+#define IS_FALSE_TYPE_CHAR( _c) is_ag_char_map_char((char)(_c), 0x08000002)
+#define SPN_FALSE_TYPE_CHARS(_s) spn_ag_char_map_chars(_s, 38)
+#define BRK_FALSE_TYPE_CHARS(_s) brk_ag_char_map_chars(_s, 38)
+#define SPN_FALSE_TYPE_BACK(s,e) spn_ag_char_map_back(s, e, 38)
+#define BRK_FALSE_TYPE_BACK(s,e) brk_ag_char_map_back(s, e, 38)
+#define IS_FILE_NAME_CHAR( _c) is_ag_char_map_char((char)(_c), 0x041B0004)
+#define SPN_FILE_NAME_CHARS(_s) spn_ag_char_map_chars(_s, 39)
+#define BRK_FILE_NAME_CHARS(_s) brk_ag_char_map_chars(_s, 39)
+#define SPN_FILE_NAME_BACK(s,e) spn_ag_char_map_back(s, e, 39)
+#define BRK_FILE_NAME_BACK(s,e) brk_ag_char_map_back(s, e, 39)
+#define IS_END_TOKEN_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000C03)
+#define SPN_END_TOKEN_CHARS(_s) spn_ag_char_map_chars(_s, 40)
+#define BRK_END_TOKEN_CHARS(_s) brk_ag_char_map_chars(_s, 40)
+#define SPN_END_TOKEN_BACK(s,e) spn_ag_char_map_back(s, e, 40)
+#define BRK_END_TOKEN_BACK(s,e) brk_ag_char_map_back(s, e, 40)
+#define IS_END_LIST_ENTRY_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000C13)
+#define SPN_END_LIST_ENTRY_CHARS(_s) spn_ag_char_map_chars(_s, 41)
+#define BRK_END_LIST_ENTRY_CHARS(_s) brk_ag_char_map_chars(_s, 41)
+#define SPN_END_LIST_ENTRY_BACK(s,e) spn_ag_char_map_back(s, e, 41)
+#define BRK_END_LIST_ENTRY_BACK(s,e) brk_ag_char_map_back(s, e, 41)
+#define IS_SET_SEPARATOR_CHAR( _c) is_ag_char_map_char((char)(_c), 0x10000C13)
+#define SPN_SET_SEPARATOR_CHARS(_s) spn_ag_char_map_chars(_s, 42)
+#define BRK_SET_SEPARATOR_CHARS(_s) brk_ag_char_map_chars(_s, 42)
+#define SPN_SET_SEPARATOR_BACK(s,e) spn_ag_char_map_back(s, e, 42)
+#define BRK_SET_SEPARATOR_BACK(s,e) brk_ag_char_map_back(s, e, 42)
+#define IS_SIGNED_NUMBER_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00038000)
+#define SPN_SIGNED_NUMBER_CHARS(_s) spn_ag_char_map_chars(_s, 43)
+#define BRK_SIGNED_NUMBER_CHARS(_s) brk_ag_char_map_chars(_s, 43)
+#define SPN_SIGNED_NUMBER_BACK(s,e) spn_ag_char_map_back(s, e, 43)
+#define BRK_SIGNED_NUMBER_BACK(s,e) brk_ag_char_map_back(s, e, 43)
+#define IS_MAKE_SCRIPT_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000101)
+#define SPN_MAKE_SCRIPT_CHARS(_s) spn_ag_char_map_chars(_s, 44)
+#define BRK_MAKE_SCRIPT_CHARS(_s) brk_ag_char_map_chars(_s, 44)
+#define SPN_MAKE_SCRIPT_BACK(s,e) spn_ag_char_map_back(s, e, 44)
+#define BRK_MAKE_SCRIPT_BACK(s,e) brk_ag_char_map_back(s, e, 44)
+#define IS_LOAD_LINE_SKIP_CHAR( _c) is_ag_char_map_char((char)(_c), 0x00000600)
+#define SPN_LOAD_LINE_SKIP_CHARS(_s) spn_ag_char_map_chars(_s, 45)
+#define BRK_LOAD_LINE_SKIP_CHARS(_s) brk_ag_char_map_chars(_s, 45)
+#define SPN_LOAD_LINE_SKIP_BACK(s,e) spn_ag_char_map_back(s, e, 45)
+#define BRK_LOAD_LINE_SKIP_BACK(s,e) brk_ag_char_map_back(s, e, 45)
+
+static ag_char_map_mask_t const ag_char_map_table[128] = {
+ /*NUL*/ 0x00000002, /*x01*/ 0x00000000, /*x02*/ 0x00000000, /*x03*/ 0x00000000,
+ /*x04*/ 0x00000000, /*x05*/ 0x00000000, /*x06*/ 0x00000000, /*BEL*/ 0x00000000,
+ /* BS*/ 0x00000800, /* HT*/ 0x00000400, /* NL*/ 0x00000001, /* VT*/ 0x00000800,
+ /* FF*/ 0x00000800, /* CR*/ 0x00000800, /*x0E*/ 0x00000000, /*x0F*/ 0x00000000,
+ /*x10*/ 0x00000000, /*x11*/ 0x00000000, /*x12*/ 0x00000000, /*x13*/ 0x00000000,
+ /*x14*/ 0x00000000, /*x15*/ 0x00000000, /*x16*/ 0x00000000, /*x17*/ 0x00000000,
+ /*x18*/ 0x00000000, /*x19*/ 0x00000000, /*x1A*/ 0x00000000, /*ESC*/ 0x00000000,
+ /*x1C*/ 0x00000000, /*x1D*/ 0x00000000, /*x1E*/ 0x00000000, /*x1F*/ 0x00000000,
+ /* */ 0x00000400, /* ! */ 0x02804000, /* " */ 0x02005000, /* # */ 0x02004000,
+ /* $ */ 0x02804100, /* % */ 0x02804008, /* & */ 0x02804000, /* ' */ 0x02005000,
+ /* ( */ 0x02006000, /* ) */ 0x02006000, /* * */ 0x02004000, /* + */ 0x12804080,
+ /* , */ 0x02004010, /* - */ 0x06A0C200, /* . */ 0x06C04000, /* / */ 0x03804004,
+ /* 0 */ 0x08814000, /* 1 */ 0x00814000, /* 2 */ 0x00814000, /* 3 */ 0x00814000,
+ /* 4 */ 0x00814000, /* 5 */ 0x00814000, /* 6 */ 0x00814000, /* 7 */ 0x00814000,
+ /* 8 */ 0x00824000, /* 9 */ 0x00824000, /* : */ 0x02804020, /* ; */ 0x02004000,
+ /* < */ 0x02004000, /* = */ 0x02004000, /* > */ 0x03004000, /* ? */ 0x02004000,
+ /* @ */ 0x02804000, /* A */ 0x00944000, /* B */ 0x00944000, /* C */ 0x00944000,
+ /* D */ 0x00944000, /* E */ 0x00944000, /* F */ 0x08944000, /* G */ 0x00904000,
+ /* H */ 0x00904000, /* I */ 0x00904000, /* J */ 0x00904000, /* K */ 0x00904000,
+ /* L */ 0x00904000, /* M */ 0x00904000, /* N */ 0x08904000, /* O */ 0x00904000,
+ /* P */ 0x00904000, /* Q */ 0x00904000, /* R */ 0x00904000, /* S */ 0x00904000,
+ /* T */ 0x00904000, /* U */ 0x00904000, /* V */ 0x00904000, /* W */ 0x00904000,
+ /* X */ 0x00904000, /* Y */ 0x00904000, /* Z */ 0x00904000, /* [ */ 0x02404000,
+ /* \ */ 0x02004004, /* ] */ 0x02404000, /* ^ */ 0x02A04000, /* _ */ 0x04804040,
+ /* ` */ 0x02004000, /* a */ 0x008C4000, /* b */ 0x008C4000, /* c */ 0x008C4000,
+ /* d */ 0x008C4000, /* e */ 0x008C4000, /* f */ 0x088C4000, /* g */ 0x00884000,
+ /* h */ 0x00884000, /* i */ 0x00884000, /* j */ 0x00884000, /* k */ 0x00884000,
+ /* l */ 0x00884000, /* m */ 0x00884000, /* n */ 0x08884000, /* o */ 0x00884000,
+ /* p */ 0x00884000, /* q */ 0x00884000, /* r */ 0x00884000, /* s */ 0x00884000,
+ /* t */ 0x00884000, /* u */ 0x00884000, /* v */ 0x00884000, /* w */ 0x00884000,
+ /* x */ 0x00884000, /* y */ 0x00884000, /* z */ 0x00884000, /* { */ 0x02004000,
+ /* | */ 0x12804000, /* } */ 0x02004000, /* ~ */ 0x0280C000, /*x7F*/ 0x00000000
};
-#endif /* AUTOOPTS_INTERNAL */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef _
+# define _(_s) _s
+#endif
+
+static unsigned char const * ag_char_map_spanners[46];
+/**
+ * Character category masks. Some categories may have multiple bits,
+ * if their definition incorporates other character categories.
+ * This mask array is only used by calc_ag_char_map_spanners().
+ */
+static ag_char_map_mask_t const ag_char_map_masks[46] = {
+ 0x00000001, /* NEWLINE */
+ 0x00000002, /* NUL_BYTE */
+ 0x00000004, /* DIR_SEP */
+ 0x00000008, /* PERCENT */
+ 0x00000010, /* COMMA */
+ 0x00000020, /* COLON */
+ 0x00000040, /* UNDERSCORE */
+ 0x00000080, /* PLUS */
+ 0x00000100, /* DOLLAR */
+ 0x00000200, /* OPTION_MARKER */
+ 0x00000400, /* HORIZ_WHITE */
+ 0x00000800, /* ALT_WHITE */
+ 0x00000C01, /* WHITESPACE */
+ 0x00000C00, /* NON_NL_WHITE */
+ 0x00001000, /* QUOTE */
+ 0x00002000, /* PARENTHESES */
+ 0x00004000, /* GRAPHIC */
+ 0x00008000, /* INVERSION */
+ 0x00010000, /* OCT_DIGIT */
+ 0x00030000, /* DEC_DIGIT */
+ 0x00070000, /* HEX_DIGIT */
+ 0x00080000, /* LOWER_CASE */
+ 0x00100000, /* UPPER_CASE */
+ 0x00180000, /* ALPHABETIC */
+ 0x001B0000, /* ALPHANUMERIC */
+ 0x00180040, /* VAR_FIRST */
+ 0x001B0040, /* VARIABLE_NAME */
+ 0x003B0040, /* OPTION_NAME */
+ 0x003B0060, /* VALUE_NAME */
+ 0x00400000, /* NAME_SEP */
+ 0x007B0460, /* COMPOUND_NAME */
+ 0x00003000, /* SCHEME_NOTE */
+ 0x00800000, /* UNQUOTABLE */
+ 0x01000C01, /* END_XML_TOKEN */
+ 0x00000C81, /* PLUS_N_SPACE */
+ 0x02000000, /* PUNCTUATION */
+ 0x041B0000, /* SUFFIX */
+ 0x041B000C, /* SUFFIX_FMT */
+ 0x08000002, /* FALSE_TYPE */
+ 0x041B0004, /* FILE_NAME */
+ 0x00000C03, /* END_TOKEN */
+ 0x00000C13, /* END_LIST_ENTRY */
+ 0x10000C13, /* SET_SEPARATOR */
+ 0x00038000, /* SIGNED_NUMBER */
+ 0x00000101, /* MAKE_SCRIPT */
+ 0x00000600, /* LOAD_LINE_SKIP */
+};
+#undef LOCK_SPANNER_TABLES
+
+static unsigned char const *
+calc_ag_char_map_spanners(unsigned int mask_ix)
+{
+#ifdef LOCK_SPANNER_TABLES
+ if (ag_char_map_spanners[mask_ix] != NULL)
+ return ag_char_map_spanners[mask_ix];
+
+ pthread_mutex_lock(&ag_char_map_mutex);
+ if (ag_char_map_spanners[mask_ix] == NULL)
+#endif
+ {
+ int ix = 1;
+ ag_char_map_mask_t mask = ag_char_map_masks[mask_ix];
+ unsigned char * res = malloc(256 /* 1 << NBBY */);
+ if (res == NULL) {
+ fputs(_("no memory for char-mapper span map\n"), stderr);
+ exit(EXIT_FAILURE);
+ }
+
+ memset(res, 0, 256);
+ for (; ix < 128; ix++)
+ if (ag_char_map_table[ix] & mask)
+ res[ix] = 1;
+ ag_char_map_spanners[mask_ix] = res;
+ }
+#ifdef LOCK_SPANNER_TABLES
+ pthread_mutex_unlock(&ag_char_map_mutex);
+#endif
+ return ag_char_map_spanners[mask_ix];
+}
+#define ag_char_map_masks POISONED_ag_char_map_masks
+
+static inline int
+is_ag_char_map_char(char ch, ag_char_map_mask_t mask)
+{
+ unsigned int ix = (unsigned char)ch;
+ return ((ix < 128) && ((ag_char_map_table[ix] & mask) != 0));
+}
+
+static inline char *
+spn_ag_char_map_chars(char const * p, unsigned int mask_ix)
+{
+ unsigned char const * v = ag_char_map_spanners[mask_ix];
+ if (v == NULL)
+ v = calc_ag_char_map_spanners(mask_ix);
+ while (v[(unsigned char)*p]) p++;
+ return (char *)(uintptr_t)p;
+}
+
+static inline char *
+brk_ag_char_map_chars(char const * p, unsigned int mask_ix)
+{
+ unsigned char const * v = ag_char_map_spanners[mask_ix];
+ if (v == NULL)
+ v = calc_ag_char_map_spanners(mask_ix);
+ while ((*p != '\0') && (! v[(unsigned char)*p])) p++;
+ return (char *)(uintptr_t)p;
+}
+
+static inline char *
+spn_ag_char_map_back(char const * s, char const * e, unsigned int mask_ix)
+{
+ unsigned char const * v = ag_char_map_spanners[mask_ix];
+ if (v == NULL)
+ v = calc_ag_char_map_spanners(mask_ix);
+ if (s >= e) e = s + strlen(s);
+ while ((e > s) && v[(unsigned char)e[-1]]) e--;
+ return (char *)(uintptr_t)e;
+}
+
+static inline char *
+brk_ag_char_map_back(char const * s, char const * e, unsigned int mask_ix)
+{
+ unsigned char const * v = ag_char_map_spanners[mask_ix];
+ if (v == NULL)
+ v = calc_ag_char_map_spanners(mask_ix);
+ if (s == e) e += strlen(e);
+ while ((e > s) && (! v[(unsigned char)e[-1]])) e--;
+ return (char *)(uintptr_t)e;
+}
#endif /* AG_CHAR_MAP_H_GUARD */
diff --git a/sntp/libopts/alias.c b/sntp/libopts/alias.c
new file mode 100644
index 000000000000..be8c6c6cb46f
--- /dev/null
+++ b/sntp/libopts/alias.c
@@ -0,0 +1,116 @@
+
+/**
+ * \file alias.c
+ *
+ * Handle options that are aliases for another option.
+ *
+ * @addtogroup autoopts
+ * @{
+ */
+/*
+ * This routine will forward an option alias to the correct option code.
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+LOCAL tSuccess
+too_many_occurrences(tOptions * opts, tOptDesc * od)
+{
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) {
+ char const * eqv = (od->optEquivIndex != NO_EQUIVALENT) ? zequiv : zNil;
+
+ fprintf(stderr, ztoo_often_fmt, opts->pzProgName);
+
+ if (od->optMaxCt > 1)
+ fprintf(stderr, zat_most, od->optMaxCt, od->pz_Name, eqv);
+ else
+ fprintf(stderr, zonly_one, od->pz_Name, eqv);
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+ /* NOTREACHED */
+ }
+
+ return FAILURE;
+}
+
+/*=export_func optionAlias
+ * private:
+ *
+ * what: relay an option to its alias
+ * arg: + tOptions * + opts + program options descriptor +
+ * arg: + tOptDesc * + old_od + the descriptor for this arg +
+ * arg: + unsigned int + alias + the aliased-to option index +
+ * ret-type: int
+ *
+ * doc:
+ * Handle one option as if it had been specified as another. Exactly.
+ * Returns "-1" if the aliased-to option has appeared too many times.
+=*/
+int
+optionAlias(tOptions * opts, tOptDesc * old_od, unsigned int alias)
+{
+ tOptDesc * new_od;
+
+ if (opts <= OPTPROC_EMIT_LIMIT)
+ return 0;
+
+ new_od = opts->pOptDesc + alias;
+ if ((unsigned)opts->optCt <= alias) {
+ fputs(zbad_alias_id, stderr);
+ option_exits(EXIT_FAILURE);
+ }
+
+ /*
+ * Copy over the option instance flags
+ */
+ new_od->fOptState &= OPTST_PERSISTENT_MASK;
+ new_od->fOptState |= (old_od->fOptState & ~OPTST_PERSISTENT_MASK);
+ new_od->optArg.argString = old_od->optArg.argString;
+
+ /*
+ * Keep track of count only for DEFINED (command line) options.
+ * IF we have too many, build up an error message and bail.
+ */
+ if ( (new_od->fOptState & OPTST_DEFINED)
+ && (++new_od->optOccCt > new_od->optMaxCt) )
+ return too_many_occurrences(opts, new_od);
+
+ /*
+ * Clear the state bits and counters
+ */
+ old_od->fOptState &= OPTST_PERSISTENT_MASK;
+ old_od->optOccCt = 0;
+
+ /*
+ * If there is a procedure to call, call it
+ */
+ if (new_od->pOptProc != NULL)
+ (*new_od->pOptProc)(opts, new_od);
+ return 0;
+}
+
+/** @}
+ *
+ * Local Variables:
+ * mode: C
+ * c-file-style: "stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * end of autoopts/alias.c */
diff --git a/sntp/libopts/ao-strs.c b/sntp/libopts/ao-strs.c
new file mode 100644
index 000000000000..a8fac46c6c46
--- /dev/null
+++ b/sntp/libopts/ao-strs.c
@@ -0,0 +1,374 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (ao-strs.c)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:03 PM by AutoGen 5.18.4pre11
+ * From the definitions ao-strs.def
+ * and the template file strings
+ *
+ * Copyright (C) 2011-2014 Bruce Korb, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the
+ * Modified (3 clause) Berkeley Software Distribution License
+ * <http://www.xfree86.org/3.3.6/COPYRIGHT2.html>
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * strings IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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.
+ */
+#include "ao-strs.h"
+
+char const ao_strs_strtable[6633] =
+/* 0 */ "-_^\0"
+/* 4 */ " %s%s\n\0"
+/* 12 */ "auto-options\0"
+/* 25 */ "program\0"
+/* 33 */ "%%-%ds %%s\n\0"
+/* 45 */ "\n"
+ "%s\n\n\0"
+/* 51 */ "=file\0"
+/* 57 */ "=Mbr\0"
+/* 62 */ "=Cplx\0"
+/* 68 */ "[=arg]\0"
+/* 75 */ "--%2$s%1$s\0"
+/* 86 */ "=Tim\0"
+/* 91 */ "none\0"
+/* 96 */ "# preset/initialization file\n"
+ "# %s#\n\0"
+/* 134 */ " %3s %-14s %s\0"
+/* 148 */ "%s\0"
+/* 151 */ "T/F\0"
+/* 155 */ "\n"
+ "%s\n\n"
+ "%s\0"
+/* 163 */ "Fil\0"
+/* 167 */ "KWd\0"
+/* 171 */ "Mbr\0"
+/* 175 */ "Cpx\0"
+/* 179 */ "no \0"
+/* 183 */ "Num\0"
+/* 187 */ "opt\0"
+/* 191 */ "YES\0"
+/* 195 */ "Str\0"
+/* 199 */ "Tim\0"
+/* 203 */ "\t\t\t\t- \0"
+/* 210 */ "\t\t\t\t \0"
+/* 217 */ "\t\t\t\t-- and \0"
+/* 229 */ "\t\t\t\t%s\n\0"
+/* 237 */ " \0"
+/* 244 */ " \0"
+/* 250 */ " \0"
+/* 254 */ " \0"
+/* 257 */ "all\0"
+/* 261 */ " \t\n"
+ ":=\0"
+/* 267 */ "%s_%s_%d=\0"
+/* 277 */ "''\0"
+/* 280 */ " ;;\n\n\0"
+/* 293 */ "'\n\n\0"
+/* 297 */ "</%s>\n\0"
+/* 304 */ " %s\n\0"
+/* 310 */ "%%-%ds\0"
+/* 317 */ "\n"
+ "export %s_%s_%d\n\0"
+/* 335 */ "false\0"
+/* 341 */ " -* )\n\0"
+/* 351 */ "flag\0"
+/* 356 */ "INVALID-%d\0"
+/* 367 */ "*INVALID*\0"
+/* 377 */ "\\n\\\n\0"
+/* 382 */ " --* )\n\0"
+/* 393 */ "--\0"
+/* 396 */ "LONGUSAGE\0"
+/* 406 */ " %s\n\0"
+/* 422 */ "\\%03o\0"
+/* 428 */ "more\0"
+/* 433 */ "<%s type=nested>\n\0"
+/* 451 */ "%s\n\0"
+/* 455 */ "%s\n"
+ " \0"
+/* 461 */ "OPT_ARG_NEEDED=NO\0"
+/* 479 */ "<%s/>\n\0"
+/* 486 */ "OPT_ARG_NEEDED=OK\0"
+/* 504 */ "\t\0"
+/* 506 */ "<%s>\0"
+/* 511 */ "option\0"
+/* 518 */ "\n"
+ "export %s_%s\n\0"
+/* 533 */ "%s_%s=\0"
+/* 540 */ " | \0"
+/* 544 */ "PAGER\0"
+/* 550 */ " + \0"
+/* 554 */ " puts(_(%s));\n\0"
+/* 570 */ "\\'\0"
+/* 573 */ "'%s'\0"
+/* 578 */ " -- %s\0"
+/* 585 */ "%s_%s_TEXT='\0"
+/* 598 */ "#! %s\n\0"
+/* 605 */ "\n"
+ "env | grep '^%s_'\n\0"
+/* 625 */ "=%1$lu # 0x%1$lX\n\0"
+/* 643 */ "stdout\0"
+/* 650 */ "%A %B %e, %Y at %r %Z\0"
+/* 672 */ "%s/use-%u.XXXXXX\0"
+/* 689 */ "true\0"
+/* 694 */ "<%s type=%s>\0"
+/* 707 */ "VERSION\0"
+/* 715 */ "#x%02X;\0"
+/* 723 */ "OPT_ARG_NEEDED=YES\0"
+/* 742 */ "'\\''\0"
+/* 747 */ " '%s'\0"
+/* 753 */ "\n"
+ "OPTION_CT=0\n\0"
+/* 767 */ "set --\0"
+/* 774 */ " ;;\n\n\0"
+/* 791 */ " '%c' )\n\0"
+/* 807 */ " '%s' )\n\0"
+/* 823 */ " '%s' | \\\n\0"
+/* 841 */ "TMPDIR\0"
+/* 848 */ "/tmp\0"
+/* 853 */ "%1$s %2$s ; rm -f %2$s\0"
+/* 876 */ "<%1$s type=boolean>%2$s</%1$s>\n\0"
+/* 908 */ "# From the %s option definitions\n"
+ "#\n\0"
+/* 945 */ "echo 'Warning: Cannot load options files' >&2\0"
+/* 992 */ "echo 'Warning: Cannot save options files' >&2\0"
+/* 1039 */ "echo 'Warning: Cannot suppress the loading of options files' >&2\0"
+/* 1105 */ "<%1$s type=integer>0x%2$lX</%1$s>\n\0"
+/* 1140 */ "%1$s_%2$s_TEXT='no %2$s text'\n\0"
+/* 1171 */ "%1$s_%2$s_MODE='%3$s'\n"
+ "export %1$s_%2$s_MODE\n\0"
+/* 1216 */ "%1$s_%2$s='%3$s'\n"
+ "export %1$s_%2$s\n\0"
+/* 1251 */ "%1$s_%2$s_CT=%3$d\n"
+ "export %1$s_%2$s_CT\n\0"
+/* 1290 */ "OPTION_CT=%d\n"
+ "export OPTION_CT\n\0"
+/* 1321 */ "%1$s_%2$s=%3$s\n"
+ "export %1$s_%2$s\n\0"
+/* 1354 */ "%1$s_%2$s=%3$d # 0x%3$X\n"
+ "export %1$s_%2$s\n\0"
+/* 1396 */ " case \"${OPT_CODE}\" in\n\0"
+/* 1427 */ " if [ $%1$s_%2$s_CT -gt %3$u ] ; then\n"
+ " echo 'Error: more than %3$d %2$s options'\n"
+ " echo \"$%1$s_USAGE_TEXT\"\n"
+ " exit 1\n"
+ " fi >&2\n\0"
+/* 1618 */ "test ${%1$s_%2$s_CT-0} -ge %3$u || {\n"
+ " echo %1$s_%2$s has not been set\n"
+ " exit 1\n"
+ "} 1>&2\n\0"
+/* 1710 */ "test -n \"$%1$s_%2$s\" || {\n"
+ " echo %1$s_%2$s has not been set\n"
+ " exit 1\n"
+ "} 1>&2\n\0"
+/* 1791 */ " echo \"$%s_%s_TEXT\"\n"
+ " exit 0\n\0"
+/* 1842 */ "\n"
+ "# # # # # # # # # #\n"
+ "#\n"
+ "# END OF AUTOMATED OPTION PROCESSING\n"
+ "#\n"
+ "# # # # # # # # # # -- do not modify this marker --\n\0"
+/* 1958 */ " if [ -n \"${OPT_ARG_VAL}\" ]\n"
+ " then\n"
+ " eval %1$s_${OPT_NAME}${OPT_ELEMENT}=\"'${OPT_ARG_VAL}'\"\n"
+ " export %1$s_${OPT_NAME}${OPT_ELEMENT}\n"
+ " fi\n"
+ "done\n"
+ "OPTION_COUNT=`expr $ARG_COUNT - $#`\n"
+ "OPERAND_COUNT=$#\n"
+ "unset OPT_PROCESS || :\n"
+ "unset OPT_ELEMENT || :\n"
+ "unset OPT_ARG || :\n"
+ "unset OPT_ARG_NEEDED || :\n"
+ "unset OPT_NAME || :\n"
+ "unset OPT_CODE || :\n"
+ "unset OPT_ARG_VAL || :\n\0"
+/* 2337 */ " OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
+ " shift\n"
+ " OPT_ARG=$1\n"
+ " case \"${OPT_CODE}\" in *=* )\n"
+ " OPT_ARG_VAL=`echo \"${OPT_CODE}\"|sed 's/^[^=]*=//'`\n"
+ " OPT_CODE=`echo \"${OPT_CODE}\"|sed 's/=.*$//'` ;; esac\n\0"
+/* 2588 */ " OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
+ " OPT_ARG=` echo \"X${OPT_ARG}\" | sed 's/X-.//'`\n\0"
+/* 2705 */ "\n"
+ "ARG_COUNT=$#\n"
+ "OPT_PROCESS=true\n"
+ "OPT_ARG=$1\n"
+ "while ${OPT_PROCESS} && [ $# -gt 0 ]\n"
+ "do\n"
+ " OPT_ELEMENT=''\n"
+ " OPT_ARG_VAL=''\n\n"
+ " case \"${OPT_ARG}\" in\n"
+ " -- )\n"
+ " OPT_PROCESS=false\n"
+ " shift\n"
+ " ;;\n\0"
+/* 2912 */ " case \"${OPT_ARG_NEEDED}\" in\n"
+ " NO )\n"
+ " OPT_ARG_VAL=''\n"
+ " ;;\n"
+ " YES )\n"
+ " if [ -z \"${OPT_ARG_VAL}\" ]\n"
+ " then\n"
+ " if [ $# -eq 0 ]\n"
+ " then\n"
+ " echo No argument provided for ${OPT_NAME} option\n"
+ " echo \"$%s_USAGE_TEXT\"\n"
+ " exit 1\n"
+ " fi >&2\n"
+ " OPT_ARG_VAL=${OPT_ARG}\n"
+ " shift\n"
+ " OPT_ARG=$1\n"
+ " fi\n"
+ " ;;\n"
+ " OK )\n"
+ " if [ -z \"${OPT_ARG_VAL}\" ] && [ $# -gt 0 ]\n"
+ " then\n"
+ " case \"${OPT_ARG}\" in -* ) ;; * )\n"
+ " OPT_ARG_VAL=${OPT_ARG}\n"
+ " shift\n"
+ " OPT_ARG=$1 ;; esac\n"
+ " fi\n"
+ " ;;\n"
+ " esac\n\0"
+/* 3691 */ " %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
+ " OPT_ELEMENT=\"_${%1$s_%2$s_CT}\"\n"
+ " OPT_NAME='%2$s'\n\0"
+/* 3815 */ "\n"
+ "if test -z \"${%1$s_%2$s}\"\n"
+ "then\n"
+ " %1$s_%2$s_CT=0\n"
+ " export %1$s_%2$s_CT\n"
+ "else\n"
+ " %1$s_%2$s_CT=1\n"
+ " %1$s_%2$s_1=${%1$s_%2$s}\n"
+ " export %1$s_%2$s_CT %1$s_%2$s_1\n"
+ "fi\n\0"
+/* 3973 */ " * )\n"
+ " OPT_PROCESS=false\n"
+ " ;;\n"
+ " esac\n\0"
+/* 4030 */ " %1$s_%2$s_CT=0\n"
+ " OPT_ELEMENT=''\n"
+ " %1$s_%2$s='%3$s'\n"
+ " export %1$s_%2$s\n"
+ " OPT_NAME='%2$s'\n\0"
+/* 4171 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+ " echo 'Error: duplicate %2$s option'\n"
+ " echo \"$%1$s_USAGE_TEXT\"\n"
+ " exit 1\n"
+ " fi >&2\n"
+ " %1$s_%2$s_set=true\n"
+ " %1$s_%2$s='%3$s'\n"
+ " export %1$s_%2$s\n"
+ " OPT_NAME='%2$s'\n\0"
+/* 4488 */ "\n"
+ "ARG_COUNT=$#\n"
+ "OPT_ARG=$1\n"
+ "while [ $# -gt 0 ]\n"
+ "do\n"
+ " OPT_ELEMENT=''\n"
+ " OPT_ARG_VAL=''\n"
+ " OPT_ARG=${1}\n\0"
+/* 4591 */ " case \"${OPT_ARG_NEEDED}\" in\n"
+ " NO )\n"
+ " if [ -n \"${OPT_ARG}\" ]\n"
+ " then\n"
+ " OPT_ARG=-${OPT_ARG}\n"
+ " else\n"
+ " shift\n"
+ " OPT_ARG=$1\n"
+ " fi\n"
+ " ;;\n"
+ " YES )\n"
+ " if [ -n \"${OPT_ARG}\" ]\n"
+ " then\n"
+ " OPT_ARG_VAL=${OPT_ARG}\n"
+ " else\n"
+ " if [ $# -eq 0 ]\n"
+ " then\n"
+ " echo No argument provided for ${OPT_NAME} option\n"
+ " echo \"$%s_USAGE_TEXT\"\n"
+ " exit 1\n"
+ " fi >&2\n"
+ " shift\n"
+ " OPT_ARG_VAL=$1\n"
+ " fi\n"
+ " shift\n"
+ " OPT_ARG=$1\n"
+ " ;;\n"
+ " OK )\n"
+ " if [ -n \"${OPT_ARG}\" ]\n"
+ " then\n"
+ " OPT_ARG_VAL=${OPT_ARG}\n"
+ " shift\n"
+ " OPT_ARG=$1\n"
+ " else\n"
+ " shift\n"
+ " if [ $# -gt 0 ]\n"
+ " then\n"
+ " case \"$1\" in -* ) ;; * )\n"
+ " OPT_ARG_VAL=$1\n"
+ " shift ;; esac\n"
+ " OPT_ARG=$1\n"
+ " fi\n"
+ " fi\n"
+ " ;;\n"
+ " esac\n\0"
+/* 5745 */ " echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
+ " exit 0\n\0"
+/* 5819 */ "%s OF %s\n"
+ "#\n"
+ "# From here to the next `-- do not modify this marker --',\n"
+ "# the text has been generated %s\n\0"
+/* 5925 */ " eval %1$s_%2$s${OPT_ELEMENT}=true\n"
+ " export %1$s_%2$s${OPT_ELEMENT}\n\0"
+/* 6015 */ " if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
+ " echo 'Error: duplicate %2$s option'\n"
+ " echo \"$%1$s_USAGE_TEXT\"\n"
+ " exit 1\n"
+ " fi >&2\n"
+ " %1$s_%2$s_set=true\n"
+ " OPT_NAME='%2$s'\n\0"
+/* 6274 */ "\n"
+ "%1$s_%2$s=${%1$s_%2$s-'%3$s'}\n"
+ "%1$s_%2$s_set=false\n"
+ "export %1$s_%2$s\n\0"
+/* 6343 */ "\n"
+ "%1$s_%2$s=${%1$s_%2$s}\n"
+ "%1$s_%2$s_set=false\n"
+ "export %1$s_%2$s\n\0"
+/* 6405 */ "# # # # # # # # # # -- do not modify this marker --\n"
+ "#\n"
+ "# DO NOT EDIT THIS SECTION\n\0"
+/* 6488 */ " * )\n"
+ " echo Unknown %s: \"${OPT_CODE}\" >&2\n"
+ " echo \"$%s_USAGE_TEXT\" >&2\n"
+ " exit 1\n"
+ " ;;\n"
+ " esac\n";
+
+/* end of ao-strs.c */
diff --git a/sntp/libopts/ao-strs.h b/sntp/libopts/ao-strs.h
new file mode 100644
index 000000000000..abe1f89e9eb2
--- /dev/null
+++ b/sntp/libopts/ao-strs.h
@@ -0,0 +1,330 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (ao-strs.h)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:03 PM by AutoGen 5.18.4pre11
+ * From the definitions ao-strs.def
+ * and the template file strings
+ *
+ * Copyright (C) 2011-2014 Bruce Korb, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the
+ * Modified (3 clause) Berkeley Software Distribution License
+ * <http://www.xfree86.org/3.3.6/COPYRIGHT2.html>
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * strings IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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 STRINGS_AO_STRS_H_GUARD
+#define STRINGS_AO_STRS_H_GUARD 1
+/*
+ * 142 strings in ao_strs_strtable string table
+ */
+#define ARG_BREAK_STR (ao_strs_strtable+261)
+#define ARG_BREAK_STR_LEN 5
+#define ARG_BY_NUM_FMT (ao_strs_strtable+267)
+#define ARG_BY_NUM_FMT_LEN 9
+#define BOOL_ATR_FMT (ao_strs_strtable+876)
+#define BOOL_ATR_FMT_LEN 31
+#define CHK_MAX_COUNT (ao_strs_strtable+1427)
+#define CHK_MAX_COUNT_LEN 190
+#define CHK_MIN_COUNT (ao_strs_strtable+1618)
+#define CHK_MIN_COUNT_LEN 91
+#define CHK_ONE_REQUIRED (ao_strs_strtable+1710)
+#define CHK_ONE_REQUIRED_LEN 80
+#define ECHO_N_EXIT (ao_strs_strtable+1791)
+#define ECHO_N_EXIT_LEN 50
+#define EMPTY_ARG (ao_strs_strtable+277)
+#define EMPTY_ARG_LEN 2
+#define END_MARK (ao_strs_strtable+1842)
+#define END_MARK_LEN 115
+#define END_OPT_SEL_STR (ao_strs_strtable+280)
+#define END_OPT_SEL_STR_LEN 12
+#define END_PRE_FMT (ao_strs_strtable+908)
+#define END_PRE_FMT_LEN 36
+#define END_SET_TEXT (ao_strs_strtable+293)
+#define END_SET_TEXT_LEN 3
+#define END_XML_FMT (ao_strs_strtable+297)
+#define END_XML_FMT_LEN 6
+#define ENUM_ERR_LINE (ao_strs_strtable+304)
+#define ENUM_ERR_LINE_LEN 5
+#define ENUM_ERR_WIDTH (ao_strs_strtable+310)
+#define ENUM_ERR_WIDTH_LEN 6
+#define EXPORT_ARG_FMT (ao_strs_strtable+317)
+#define EXPORT_ARG_FMT_LEN 17
+#define FALSE_STR (ao_strs_strtable+335)
+#define FALSE_STR_LEN 5
+#define FINISH_LOOP (ao_strs_strtable+1958)
+#define FINISH_LOOP_LEN 378
+#define FLAG_OPT_MARK (ao_strs_strtable+341)
+#define FLAG_OPT_MARK_LEN 9
+#define FLAG_STR (ao_strs_strtable+351)
+#define FLAG_STR_LEN 4
+#define INIT_LOPT_STR (ao_strs_strtable+2337)
+#define INIT_LOPT_STR_LEN 250
+#define INIT_OPT_STR (ao_strs_strtable+2588)
+#define INIT_OPT_STR_LEN 116
+#define INVALID_FMT (ao_strs_strtable+356)
+#define INVALID_FMT_LEN 10
+#define INVALID_STR (ao_strs_strtable+367)
+#define INVALID_STR_LEN 9
+#define LINE_SPLICE (ao_strs_strtable+377)
+#define LINE_SPLICE_LEN 4
+#define LONG_OPT_MARK (ao_strs_strtable+382)
+#define LONG_OPT_MARKER (ao_strs_strtable+393)
+#define LONG_OPT_MARKER_LEN 2
+#define LONG_OPT_MARK_LEN 10
+#define LONG_USE_STR (ao_strs_strtable+396)
+#define LONG_USE_STR_LEN 9
+#define LOOP_STR (ao_strs_strtable+2705)
+#define LOOP_STR_LEN 206
+#define LOPT_ARG_FMT (ao_strs_strtable+2912)
+#define LOPT_ARG_FMT_LEN 778
+#define LVL3_CMD (ao_strs_strtable+406)
+#define LVL3_CMD_LEN 15
+#define MK_STR_OCT_FMT (ao_strs_strtable+422)
+#define MK_STR_OCT_FMT_LEN 5
+#define MORE_STR (ao_strs_strtable+428)
+#define MORE_STR_LEN 4
+#define MULTI_ARG_FMT (ao_strs_strtable+3691)
+#define MULTI_ARG_FMT_LEN 123
+#define MULTI_DEF_FMT (ao_strs_strtable+3815)
+#define MULTI_DEF_FMT_LEN 157
+#define NESTED_OPT_FMT (ao_strs_strtable+433)
+#define NESTED_OPT_FMT_LEN 17
+#define NLSTR_FMT (ao_strs_strtable+451)
+#define NLSTR_FMT_LEN 3
+#define NLSTR_SPACE_FMT (ao_strs_strtable+455)
+#define NLSTR_SPACE_FMT_LEN 5
+#define NONE_STR (ao_strs_strtable+91)
+#define NONE_STR_LEN 4
+#define NOT_FOUND_STR (ao_strs_strtable+3973)
+#define NOT_FOUND_STR_LEN 56
+#define NO_ARG_NEEDED (ao_strs_strtable+461)
+#define NO_ARG_NEEDED_LEN 17
+#define NO_LOAD_WARN (ao_strs_strtable+945)
+#define NO_LOAD_WARN_LEN 46
+#define NO_MULTI_ARG_FMT (ao_strs_strtable+4030)
+#define NO_MULTI_ARG_FMT_LEN 140
+#define NO_SAVE_OPTS (ao_strs_strtable+992)
+#define NO_SAVE_OPTS_LEN 46
+#define NO_SGL_ARG_FMT (ao_strs_strtable+4171)
+#define NO_SGL_ARG_FMT_LEN 316
+#define NO_SUPPRESS_LOAD (ao_strs_strtable+1039)
+#define NO_SUPPRESS_LOAD_LEN 65
+#define NULL_ATR_FMT (ao_strs_strtable+479)
+#define NULL_ATR_FMT_LEN 6
+#define NUMB_ATR_FMT (ao_strs_strtable+1105)
+#define NUMB_ATR_FMT_LEN 34
+#define OK_NEED_OPT_ARG (ao_strs_strtable+486)
+#define OK_NEED_OPT_ARG_LEN 17
+#define ONE_TAB_STR (ao_strs_strtable+504)
+#define ONE_TAB_STR_LEN 1
+#define ONLY_OPTS_LOOP (ao_strs_strtable+4488)
+#define ONLY_OPTS_LOOP_LEN 102
+#define OPEN_CLOSE_FMT (ao_strs_strtable+479)
+#define OPEN_CLOSE_FMT_LEN 6
+#define OPEN_XML_FMT (ao_strs_strtable+506)
+#define OPEN_XML_FMT_LEN 4
+#define OPTION_STR (ao_strs_strtable+511)
+#define OPTION_STR_LEN 6
+#define OPT_ARG_FMT (ao_strs_strtable+4591)
+#define OPT_ARG_FMT_LEN 1153
+#define OPT_END_FMT (ao_strs_strtable+518)
+#define OPT_END_FMT_LEN 14
+#define OPT_VAL_FMT (ao_strs_strtable+533)
+#define OPT_VAL_FMT_LEN 6
+#define OR_STR (ao_strs_strtable+540)
+#define OR_STR_LEN 3
+#define PAGER_NAME (ao_strs_strtable+544)
+#define PAGER_NAME_LEN 5
+#define PAGE_USAGE_FMT (ao_strs_strtable+853)
+#define PAGE_USAGE_FMT_LEN 22
+#define PAGE_USAGE_TEXT (ao_strs_strtable+5745)
+#define PAGE_USAGE_TEXT_LEN 73
+#define PLUS_STR (ao_strs_strtable+550)
+#define PLUS_STR_LEN 3
+#define PREAMBLE_FMT (ao_strs_strtable+5819)
+#define PREAMBLE_FMT_LEN 105
+#define PUTS_FMT (ao_strs_strtable+554)
+#define PUTS_FMT_LEN 15
+#define QUOT_APOS (ao_strs_strtable+570)
+#define QUOT_APOS_LEN 2
+#define QUOT_ARG_FMT (ao_strs_strtable+573)
+#define QUOT_ARG_FMT_LEN 4
+#define SET_MULTI_ARG (ao_strs_strtable+5925)
+#define SET_MULTI_ARG_LEN 89
+#define SET_NO_TEXT_FMT (ao_strs_strtable+1140)
+#define SET_NO_TEXT_FMT_LEN 30
+#define SET_OFF_FMT (ao_strs_strtable+578)
+#define SET_OFF_FMT_LEN 6
+#define SET_TEXT_FMT (ao_strs_strtable+585)
+#define SET_TEXT_FMT_LEN 12
+#define SGL_ARG_FMT (ao_strs_strtable+6015)
+#define SGL_ARG_FMT_LEN 258
+#define SGL_DEF_FMT (ao_strs_strtable+6274)
+#define SGL_DEF_FMT_LEN 68
+#define SGL_NO_DEF_FMT (ao_strs_strtable+6343)
+#define SGL_NO_DEF_FMT_LEN 61
+#define SHELL_MAGIC (ao_strs_strtable+598)
+#define SHELL_MAGIC_LEN 6
+#define SHOW_PROG_ENV (ao_strs_strtable+605)
+#define SHOW_PROG_ENV_LEN 19
+#define SHOW_VAL_FMT (ao_strs_strtable+625)
+#define SHOW_VAL_FMT_LEN 17
+#define START_MARK (ao_strs_strtable+6405)
+#define START_MARK_LEN 82
+#define STDOUT (ao_strs_strtable+643)
+#define STDOUT_LEN 6
+#define TIME_FMT (ao_strs_strtable+650)
+#define TIME_FMT_LEN 21
+#define TMPDIR (ao_strs_strtable+841)
+#define TMPDIR_LEN 6
+#define TMP_FILE_FMT (ao_strs_strtable+672)
+#define TMP_FILE_FMT_LEN 16
+#define TMP_USAGE_FMT (ao_strs_strtable+672)
+#define TMP_USAGE_FMT_LEN 16
+#define TRUE_STR (ao_strs_strtable+689)
+#define TRUE_STR_LEN 4
+#define TWO_SPACES_STR (ao_strs_strtable+254)
+#define TWO_SPACES_STR_LEN 2
+#define TYPE_ATR_FMT (ao_strs_strtable+694)
+#define TYPE_ATR_FMT_LEN 12
+#define UNK_OPT_FMT (ao_strs_strtable+6488)
+#define UNK_OPT_FMT_LEN 144
+#define VER_STR (ao_strs_strtable+707)
+#define VER_STR_LEN 7
+#define XML_HEX_BYTE_FMT (ao_strs_strtable+715)
+#define XML_HEX_BYTE_FMT_LEN 7
+#define YES_NEED_OPT_ARG (ao_strs_strtable+723)
+#define YES_NEED_OPT_ARG_LEN 18
+#define apostrophe (ao_strs_strtable+742)
+#define apostrophe_LEN 4
+#define arg_fmt (ao_strs_strtable+747)
+#define arg_fmt_LEN 5
+#define init_optct (ao_strs_strtable+753)
+#define init_optct_LEN 13
+#define set_dash (ao_strs_strtable+767)
+#define set_dash_LEN 6
+#define tmp_dir (ao_strs_strtable+848)
+#define tmp_dir_LEN 4
+#define zAll (ao_strs_strtable+257)
+#define zAll_LEN 3
+#define zCfgAO_Flags (ao_strs_strtable+12)
+#define zCfgAO_Flags_LEN 12
+#define zCfgProg (ao_strs_strtable+25)
+#define zCfgProg_LEN 7
+#define zEquivMode (ao_strs_strtable+1171)
+#define zEquivMode_LEN 44
+#define zFiveSpaces (ao_strs_strtable+244)
+#define zFiveSpaces_LEN 5
+#define zFmtFmt (ao_strs_strtable+33)
+#define zFmtFmt_LEN 11
+#define zFullOptFmt (ao_strs_strtable+1216)
+#define zFullOptFmt_LEN 34
+#define zGnuBreak (ao_strs_strtable+45)
+#define zGnuBreak_LEN 5
+#define zGnuFileArg (ao_strs_strtable+51)
+#define zGnuFileArg_LEN 5
+#define zGnuKeyLArg (ao_strs_strtable+57)
+#define zGnuKeyLArg_LEN 4
+#define zGnuNestArg (ao_strs_strtable+62)
+#define zGnuNestArg_LEN 5
+#define zGnuOptArg (ao_strs_strtable+68)
+#define zGnuOptArg_LEN 6
+#define zGnuOptFmt (ao_strs_strtable+75)
+#define zGnuOptFmt_LEN 10
+#define zGnuTimeArg (ao_strs_strtable+86)
+#define zGnuTimeArg_LEN 4
+#define zNone (ao_strs_strtable+91)
+#define zNone_LEN 4
+#define zOptCookieCt (ao_strs_strtable+1251)
+#define zOptCookieCt_LEN 38
+#define zOptCtFmt (ao_strs_strtable+1290)
+#define zOptCtFmt_LEN 30
+#define zOptDisabl (ao_strs_strtable+1321)
+#define zOptDisabl_LEN 32
+#define zOptNumFmt (ao_strs_strtable+1354)
+#define zOptNumFmt_LEN 41
+#define zOptionCase (ao_strs_strtable+1396)
+#define zOptionCase_LEN 30
+#define zOptionEndSelect (ao_strs_strtable+774)
+#define zOptionEndSelect_LEN 16
+#define zOptionFlag (ao_strs_strtable+791)
+#define zOptionFlag_LEN 15
+#define zOptionFullName (ao_strs_strtable+807)
+#define zOptionFullName_LEN 15
+#define zOptionPartName (ao_strs_strtable+823)
+#define zOptionPartName_LEN 17
+#define zPresetFile (ao_strs_strtable+96)
+#define zPresetFile_LEN 37
+#define zReqOptFmt (ao_strs_strtable+134)
+#define zReqOptFmt_LEN 13
+#define zSepChars (ao_strs_strtable+0)
+#define zSepChars_LEN 3
+#define zShrtGnuOptFmt (ao_strs_strtable+148)
+#define zShrtGnuOptFmt_LEN 2
+#define zSixSpaces (ao_strs_strtable+237)
+#define zSixSpaces_LEN 6
+#define zStdBoolArg (ao_strs_strtable+151)
+#define zStdBoolArg_LEN 3
+#define zStdBreak (ao_strs_strtable+155)
+#define zStdBreak_LEN 7
+#define zStdFileArg (ao_strs_strtable+163)
+#define zStdFileArg_LEN 3
+#define zStdKeyArg (ao_strs_strtable+167)
+#define zStdKeyArg_LEN 3
+#define zStdKeyLArg (ao_strs_strtable+171)
+#define zStdKeyLArg_LEN 3
+#define zStdNestArg (ao_strs_strtable+175)
+#define zStdNestArg_LEN 3
+#define zStdNoArg (ao_strs_strtable+179)
+#define zStdNoArg_LEN 3
+#define zStdNumArg (ao_strs_strtable+183)
+#define zStdNumArg_LEN 3
+#define zStdOptArg (ao_strs_strtable+187)
+#define zStdOptArg_LEN 3
+#define zStdReqArg (ao_strs_strtable+191)
+#define zStdReqArg_LEN 3
+#define zStdStrArg (ao_strs_strtable+195)
+#define zStdStrArg_LEN 3
+#define zStdTimeArg (ao_strs_strtable+199)
+#define zStdTimeArg_LEN 3
+#define zTabHyp (ao_strs_strtable+203)
+#define zTabHypAnd (ao_strs_strtable+217)
+#define zTabHypAnd_LEN 11
+#define zTabHyp_LEN 6
+#define zTabSpace (ao_strs_strtable+210)
+#define zTabSpace_LEN 6
+#define zTabout (ao_strs_strtable+229)
+#define zTabout_LEN 7
+#define zThreeSpaces (ao_strs_strtable+250)
+#define zThreeSpaces_LEN 3
+#define zTwoSpaces (ao_strs_strtable+254)
+#define zTwoSpaces_LEN 2
+#define zambig_file (ao_strs_strtable+4)
+#define zambig_file_LEN 7
+extern char const ao_strs_strtable[6633];
+
+#endif /* STRINGS_AO_STRS_H_GUARD */
diff --git a/sntp/libopts/autoopts.c b/sntp/libopts/autoopts.c
index 657818181b82..a5193186a7c0 100644
--- a/sntp/libopts/autoopts.c
+++ b/sntp/libopts/autoopts.c
@@ -2,16 +2,18 @@
/**
* \file autoopts.c
*
- * Time-stamp: "2011-03-25 17:55:07 bkorb"
- *
* This file contains all of the routines that must be linked into
* an executable to use the generated option processing. The optional
* routines are in separately compiled modules so that they will not
* necessarily be linked in.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -23,132 +25,105 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-#ifndef PKGDATADIR
-# define PKGDATADIR ""
-#endif
-
-static char const zNil[] = "";
-static arg_types_t argTypes = { NULL };
-static char zOptFmtLine[16] = { NUL };
-static ag_bool displayEnum = AG_FALSE;
-static char const pkgdatadir_default[] = PKGDATADIR;
-static char const * program_pkgdatadir = pkgdatadir_default;
-static tOptionLoadMode option_load_mode = OPTION_LOAD_UNCOOKED;
-static tePagerState pagerState = PAGER_STATE_INITIAL;
-
- FILE * option_usage_fp = NULL;
-
-/* = = = START-STATIC-FORWARD = = = */
-static tSuccess
-findOptDesc(tOptions* pOpts, tOptState* pOptState);
-
-static tSuccess
-next_opt_arg_must(tOptions* pOpts, tOptState* pOptState);
-
-static tSuccess
-next_opt_arg_may(tOptions* pOpts, tOptState* pOptState);
+/**
+ * The number of tab characters to skip when printing continuation lines.
+ */
+static unsigned int tab_skip_ct = 0;
-static tSuccess
-next_opt_arg_none(tOptions* pOpts, tOptState* pOptState);
+#ifndef HAVE_PATHFIND
+# define pathfind(_p, _n, _m) option_pathfind(_p, _n, _m)
+# include "compat/pathfind.c"
+#endif
-static tSuccess
-nextOption(tOptions* pOpts, tOptState* pOptState);
+#ifndef HAVE_SNPRINTF
+# define vsnprintf option_vsnprintf
+# define snprintf option_snprintf
+# include "compat/snprintf.c"
+#endif
-static tSuccess
-doPresets(tOptions* pOpts);
+#ifndef HAVE_STRDUP
+# define strdup(_s) option_strdup(_s)
+# include "compat/strdup.c"
+#endif
-static int
-checkConsistency(tOptions* pOpts);
-/* = = = END-STATIC-FORWARD = = = */
+#ifndef HAVE_STRCHR
+# define strrchr(_s, _c) option_strrchr(_s, _c)
+# define strchr(_s, _c) option_strchr(_s, _c)
+# include "compat/strchr.c"
+#endif
LOCAL void *
ao_malloc(size_t sz)
{
void * res = malloc(sz);
if (res == NULL) {
- fprintf(stderr, zAO_Alloc, (int)sz);
- exit(EXIT_FAILURE);
+ fprintf(stderr, zalloc_fail, (int)sz);
+ option_exits(EXIT_FAILURE);
}
return res;
}
#undef malloc
-#define malloc(_s) ao_malloc(_s)
+#define malloc(_s) ao_malloc(_s)
LOCAL void *
ao_realloc(void *p, size_t sz)
{
void * res = (p == NULL) ? malloc(sz) : realloc(p, sz);
if (res == NULL) {
- fprintf(stderr, zAO_Realloc, (int)sz, p);
- exit(EXIT_FAILURE);
+ fprintf(stderr, zrealloc_fail, (int)sz, p);
+ option_exits(EXIT_FAILURE);
}
return res;
}
#undef realloc
-#define realloc(_p,_s) ao_realloc(_p,_s)
+#define realloc(_p,_s) ao_realloc(_p,_s)
LOCAL char *
ao_strdup(char const *str)
{
char * res = strdup(str);
if (res == NULL) {
- fprintf(stderr, zAO_Strdup, (int)strlen(str));
- exit(EXIT_FAILURE);
+ fprintf(stderr, zalloc_fail, (int)strlen(str));
+ option_exits(EXIT_FAILURE);
}
return res;
}
#undef strdup
-#define strdup(_p) ao_strdup(_p)
+#define strdup(_p) ao_strdup(_p)
-#ifndef HAVE_PATHFIND
-# include "compat/pathfind.c"
-#endif
-
-#ifndef HAVE_SNPRINTF
-# include "compat/snprintf.c"
-#endif
-
-#ifndef HAVE_STRDUP
-# include "compat/strdup.c"
-#endif
-
-#ifndef HAVE_STRCHR
-# include "compat/strchr.c"
-#endif
-
-/*
- * handle_opt
+/**
+ * handle an option.
*
* This routine handles equivalencing, sets the option state flags and
* invokes the handler procedure, if any.
*/
LOCAL tSuccess
-handle_opt(tOptions* pOpts, tOptState* pOptState)
+handle_opt(tOptions * opts, tOptState * o_st)
{
/*
* Save a copy of the option procedure pointer.
* If this is an equivalence class option, we still want this proc.
*/
- tOptDesc* pOD = pOptState->pOD;
- tOptProc* pOP = pOD->pOptProc;
- if (pOD->fOptState & OPTST_ALLOC_ARG)
- AGFREE(pOD->optArg.argString);
+ tOptDesc * od = o_st->pOD;
+ tOptProc * opt_proc = od->pOptProc;
+ if (od->fOptState & OPTST_ALLOC_ARG)
+ AGFREE(od->optArg.argString);
- pOD->optArg.argString = pOptState->pzOptArg;
+ od->optArg.argString = o_st->pzOptArg;
/*
* IF we are presetting options, then we will ignore any un-presettable
* options. They are the ones either marked as such.
*/
- if ( ((pOpts->fOptSet & OPTPROC_PRESETTING) != 0)
- && ((pOD->fOptState & OPTST_NO_INIT) != 0)
+ if ( ((opts->fOptSet & OPTPROC_PRESETTING) != 0)
+ && ((od->fOptState & OPTST_NO_INIT) != 0)
)
return PROBLEM;
@@ -156,19 +131,19 @@ handle_opt(tOptions* pOpts, tOptState* pOptState)
* IF this is an equivalence class option,
* THEN
* Save the option value that got us to this option
- * entry. (It may not be pOD->optChar[0], if this is an
+ * entry. (It may not be od->optChar[0], if this is an
* equivalence entry.)
* set the pointer to the equivalence class base
*/
- if (pOD->optEquivIndex != NO_EQUIVALENT) {
- tOptDesc* p = pOpts->pOptDesc + pOD->optEquivIndex;
+ if (od->optEquivIndex != NO_EQUIVALENT) {
+ tOptDesc * eqv_od = opts->pOptDesc + od->optEquivIndex;
/*
* IF the current option state has not been defined (set on the
* command line), THEN we will allow continued resetting of
* the value. Once "defined", then it must not change.
*/
- if ((pOD->fOptState & OPTST_DEFINED) != 0) {
+ if ((od->fOptState & OPTST_DEFINED) != 0) {
/*
* The equivalenced-to option has been found on the command
* line before. Make sure new occurrences are the same type.
@@ -177,9 +152,9 @@ handle_opt(tOptions* pOpts, tOptState* pOptState)
* it was not the same equivalenced-to option,
* THEN we have a usage problem.
*/
- if (p->optActualIndex != pOD->optIndex) {
- fprintf(stderr, (char*)zMultiEquiv, p->pz_Name, pOD->pz_Name,
- (pOpts->pOptDesc + p->optActualIndex)->pz_Name);
+ if (eqv_od->optActualIndex != od->optIndex) {
+ fprintf(stderr, zmultiway_bug, eqv_od->pz_Name, od->pz_Name,
+ (opts->pOptDesc + eqv_od->optActualIndex)->pz_Name);
return FAILURE;
}
} else {
@@ -189,649 +164,75 @@ handle_opt(tOptions* pOpts, tOptState* pOptState)
* never have been selected before, or else it was selected by
* some sort of "presetting" mechanism.
*/
- p->optActualIndex = NO_EQUIVALENT;
+ eqv_od->optActualIndex = NO_EQUIVALENT;
}
- if (p->optActualIndex != pOD->optIndex) {
+ if (eqv_od->optActualIndex != od->optIndex) {
/*
* First time through, copy over the state
* and add in the equivalence flag
*/
- p->optActualValue = pOD->optValue;
- p->optActualIndex = pOD->optIndex;
- pOptState->flags |= OPTST_EQUIVALENCE;
+ eqv_od->optActualValue = od->optValue;
+ eqv_od->optActualIndex = od->optIndex;
+ o_st->flags |= OPTST_EQUIVALENCE;
}
/*
* Copy the most recent option argument. set membership state
- * is kept in ``p->optCookie''. Do not overwrite.
+ * is kept in 'eqv_od->optCookie'. Do not overwrite.
*/
- p->optArg.argString = pOD->optArg.argString;
- pOD = p;
+ eqv_od->optArg.argString = od->optArg.argString;
+ od = eqv_od;
} else {
- pOD->optActualValue = pOD->optValue;
- pOD->optActualIndex = pOD->optIndex;
+ od->optActualValue = od->optValue;
+ od->optActualIndex = od->optIndex;
}
- pOD->fOptState &= OPTST_PERSISTENT_MASK;
- pOD->fOptState |= (pOptState->flags & ~OPTST_PERSISTENT_MASK);
+ od->fOptState &= OPTST_PERSISTENT_MASK;
+ od->fOptState |= (o_st->flags & ~OPTST_PERSISTENT_MASK);
/*
* Keep track of count only for DEFINED (command line) options.
* IF we have too many, build up an error message and bail.
*/
- if ( (pOD->fOptState & OPTST_DEFINED)
- && (++pOD->optOccCt > pOD->optMaxCt) ) {
-
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
- char const * pzEqv =
- (pOD->optEquivIndex != NO_EQUIVALENT) ? zEquiv : zNil;
-
- fputs(zErrOnly, stderr);
-
- if (pOD->optMaxCt > 1)
- fprintf(stderr, zAtMost, pOD->optMaxCt, pOD->pz_Name, pzEqv);
- else
- fprintf(stderr, zOnlyOne, pOD->pz_Name, pzEqv);
- }
-
- return FAILURE;
- }
-
+ if ( (od->fOptState & OPTST_DEFINED)
+ && (++od->optOccCt > od->optMaxCt) )
+ return too_many_occurrences(opts, od);
/*
* If provided a procedure to call, call it
*/
- if (pOP != NULL)
- (*pOP)(pOpts, pOD);
-
- return SUCCESS;
-}
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * HUNT FOR OPTIONS IN THE ARGUMENT LIST
- *
- * The next four procedures are "private" to nextOption().
- * nextOption() uses findOptDesc() to find the next descriptor and it, in
- * turn, uses longOptionFind() and shortOptionFind() to actually do the hunt.
- *
- * longOptionFind
- *
- * Find the long option descriptor for the current option
- */
-LOCAL tSuccess
-longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState)
-{
- ag_bool disable = AG_FALSE;
- char* pzEq = strchr(pzOptName, '=');
- tOptDesc* pOD = pOpts->pOptDesc;
- int idx = 0;
- int idxLim = pOpts->optCt;
- int matchCt = 0;
- int matchIdx = 0;
- int nameLen;
- char opt_name_buf[128];
-
- /*
- * IF the value is attached to the name,
- * copy it off so we can NUL terminate.
- */
- if (pzEq != NULL) {
- nameLen = (int)(pzEq - pzOptName);
- if (nameLen >= sizeof(opt_name_buf))
- return FAILURE;
- memcpy(opt_name_buf, pzOptName, nameLen);
- opt_name_buf[nameLen] = NUL;
- pzOptName = opt_name_buf;
- pzEq++;
-
- } else nameLen = strlen(pzOptName);
-
- do {
- /*
- * If option disabled or a doc option, skip to next
- */
- if (pOD->pz_Name == NULL)
- continue;
-
- if ( SKIP_OPT(pOD)
- && (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT)))
- continue;
-
- if (strneqvcmp(pzOptName, pOD->pz_Name, nameLen) == 0) {
- /*
- * IF we have a complete match
- * THEN it takes priority over any already located partial
- */
- if (pOD->pz_Name[ nameLen ] == NUL) {
- matchCt = 1;
- matchIdx = idx;
- break;
- }
- }
-
- /*
- * IF there is a disable name
- * *AND* no argument value has been supplied
- * (disabled options may have no argument)
- * *AND* the option name matches the disable name
- * THEN ...
- */
- else if ( (pOD->pz_DisableName != NULL)
- && (strneqvcmp(pzOptName, pOD->pz_DisableName, nameLen) == 0)
- ) {
- disable = AG_TRUE;
-
- /*
- * IF we have a complete match
- * THEN it takes priority over any already located partial
- */
- if (pOD->pz_DisableName[ nameLen ] == NUL) {
- matchCt = 1;
- matchIdx = idx;
- break;
- }
- }
-
- else
- continue;
-
- /*
- * We found a partial match, either regular or disabling.
- * Remember the index for later.
- */
- matchIdx = idx;
-
- if (++matchCt > 1)
- break;
-
- } while (pOD++, (++idx < idxLim));
-
- /*
- * Make sure we either found an exact match or found only one partial
- */
- if (matchCt == 1) {
- pOD = pOpts->pOptDesc + matchIdx;
-
- if (SKIP_OPT(pOD)) {
- fprintf(stderr, zDisabledErr, pOpts->pzProgName, pOD->pz_Name);
- if (pOD->pzText != NULL)
- fprintf(stderr, " -- %s", pOD->pzText);
- fputc('\n', stderr);
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
-
- /*
- * IF we found a disablement name,
- * THEN set the bit in the callers' flag word
- */
- if (disable)
- pOptState->flags |= OPTST_DISABLED;
-
- pOptState->pOD = pOD;
- pOptState->pzOptArg = pzEq;
- pOptState->optType = TOPT_LONG;
- return SUCCESS;
- }
-
- /*
- * IF there is no equal sign
- * *AND* we are using named arguments
- * *AND* there is a default named option,
- * THEN return that option.
- */
- if ( (pzEq == NULL)
- && NAMED_OPTS(pOpts)
- && (pOpts->specOptIdx.default_opt != NO_EQUIVALENT)) {
- pOptState->pOD = pOpts->pOptDesc + pOpts->specOptIdx.default_opt;
-
- pOptState->pzOptArg = pzOptName;
- pOptState->optType = TOPT_DEFAULT;
- return SUCCESS;
- }
-
- /*
- * IF we are to stop on errors (the default, actually)
- * THEN call the usage procedure.
- */
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
- fprintf(stderr, (matchCt == 0) ? zIllOptStr : zAmbigOptStr,
- pOpts->pzProgPath, pzOptName);
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
- }
-
- return FAILURE;
-}
-
-
-/*
- * shortOptionFind
- *
- * Find the short option descriptor for the current option
- */
-LOCAL tSuccess
-shortOptionFind(tOptions* pOpts, uint_t optValue, tOptState* pOptState)
-{
- tOptDesc* pRes = pOpts->pOptDesc;
- int ct = pOpts->optCt;
-
- /*
- * Search the option list
- */
- do {
- if (optValue != pRes->optValue)
- continue;
-
- if (SKIP_OPT(pRes)) {
- if ( (pRes->fOptState == (OPTST_OMITTED | OPTST_NO_INIT))
- && (pRes->pz_Name != NULL)) {
- fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name);
- if (pRes->pzText != NULL)
- fprintf(stderr, " -- %s", pRes->pzText);
- fputc('\n', stderr);
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
- goto short_opt_error;
- }
-
- pOptState->pOD = pRes;
- pOptState->optType = TOPT_SHORT;
- return SUCCESS;
-
- } while (pRes++, --ct > 0);
-
- /*
- * IF the character value is a digit
- * AND there is a special number option ("-n")
- * THEN the result is the "option" itself and the
- * option is the specially marked "number" option.
- */
- if ( IS_DEC_DIGIT_CHAR(optValue)
- && (pOpts->specOptIdx.number_option != NO_EQUIVALENT) ) {
- pOptState->pOD = \
- pRes = pOpts->pOptDesc + pOpts->specOptIdx.number_option;
- (pOpts->pzCurOpt)--;
- pOptState->optType = TOPT_SHORT;
- return SUCCESS;
- }
-
-short_opt_error:
-
- /*
- * IF we are to stop on errors (the default, actually)
- * THEN call the usage procedure.
- */
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
- fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue);
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
- }
-
- return FAILURE;
-}
-
-
-/*
- * findOptDesc
- *
- * Find the option descriptor for the current option
- */
-static tSuccess
-findOptDesc(tOptions* pOpts, tOptState* pOptState)
-{
- /*
- * IF we are continuing a short option list (e.g. -xyz...)
- * THEN continue a single flag option.
- * OTHERWISE see if there is room to advance and then do so.
- */
- if ((pOpts->pzCurOpt != NULL) && (*pOpts->pzCurOpt != NUL))
- return shortOptionFind(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState);
-
- if (pOpts->curOptIdx >= pOpts->origArgCt)
- return PROBLEM; /* NORMAL COMPLETION */
-
- pOpts->pzCurOpt = pOpts->origArgVect[ pOpts->curOptIdx ];
-
- /*
- * IF all arguments must be named options, ...
- */
- if (NAMED_OPTS(pOpts)) {
- char * pz = pOpts->pzCurOpt;
- int def;
- tSuccess res;
- tAoUS * def_opt;
-
- pOpts->curOptIdx++;
-
- if (*pz != '-')
- return longOptionFind(pOpts, pz, pOptState);
-
- /*
- * The name is prefixed with one or more hyphens. Strip them off
- * and disable the "default_opt" setting. Use heavy recasting to
- * strip off the "const" quality of the "default_opt" field.
- */
- while (*(++pz) == '-') ;
- def_opt = (void *)&(pOpts->specOptIdx.default_opt);
- def = *def_opt;
- *def_opt = NO_EQUIVALENT;
- res = longOptionFind(pOpts, pz, pOptState);
- *def_opt = def;
- return res;
- }
-
- /*
- * Note the kind of flag/option marker
- */
- if (*((pOpts->pzCurOpt)++) != '-')
- return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */
-
- /*
- * Special hack for a hyphen by itself
- */
- if (*(pOpts->pzCurOpt) == NUL)
- return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */
-
- /*
- * The current argument is to be processed as an option argument
- */
- pOpts->curOptIdx++;
-
- /*
- * We have an option marker.
- * Test the next character for long option indication
- */
- if (pOpts->pzCurOpt[0] == '-') {
- if (*++(pOpts->pzCurOpt) == NUL)
- /*
- * NORMAL COMPLETION - NOT this arg, but rest are operands
- */
- return PROBLEM;
-
- /*
- * We do not allow the hyphen to be used as a flag value.
- * Therefore, if long options are not to be accepted, we punt.
- */
- if ((pOpts->fOptSet & OPTPROC_LONGOPT) == 0) {
- fprintf(stderr, zIllOptStr, pOpts->pzProgPath,
- zIllegal, pOpts->pzCurOpt-2);
- return FAILURE;
- }
-
- return longOptionFind(pOpts, pOpts->pzCurOpt, pOptState);
- }
-
- /*
- * If short options are not allowed, then do long
- * option processing. Otherwise the character must be a
- * short (i.e. single character) option.
- */
- if ((pOpts->fOptSet & OPTPROC_SHORTOPT) != 0)
- return shortOptionFind(pOpts, (tAoUC)*(pOpts->pzCurOpt), pOptState);
-
- return longOptionFind(pOpts, pOpts->pzCurOpt, pOptState);
-}
-
-
-static tSuccess
-next_opt_arg_must(tOptions* pOpts, tOptState* pOptState)
-{
- /*
- * An option argument is required. Long options can either have
- * a separate command line argument, or an argument attached by
- * the '=' character. Figure out which.
- */
- switch (pOptState->optType) {
- case TOPT_SHORT:
- /*
- * See if an arg string follows the flag character
- */
- if (*++(pOpts->pzCurOpt) == NUL)
- pOpts->pzCurOpt = pOpts->origArgVect[ pOpts->curOptIdx++ ];
- pOptState->pzOptArg = pOpts->pzCurOpt;
- break;
-
- case TOPT_LONG:
- /*
- * See if an arg string has already been assigned (glued on
- * with an `=' character)
- */
- if (pOptState->pzOptArg == NULL)
- pOptState->pzOptArg = pOpts->origArgVect[ pOpts->curOptIdx++ ];
- break;
-
- default:
-#ifdef DEBUG
- fputs("AutoOpts lib error: option type not selected\n", stderr);
- exit(EXIT_FAILURE);
-#endif
-
- case TOPT_DEFAULT:
- /*
- * The option was selected by default. The current token is
- * the option argument.
- */
- break;
- }
-
- /*
- * Make sure we did not overflow the argument list.
- */
- if (pOpts->curOptIdx > pOpts->origArgCt) {
- fprintf(stderr, zMisArg, pOpts->pzProgPath, pOptState->pOD->pz_Name);
- return FAILURE;
- }
-
- pOpts->pzCurOpt = NULL; /* next time advance to next arg */
- return SUCCESS;
-}
-
-
-static tSuccess
-next_opt_arg_may(tOptions* pOpts, tOptState* pOptState)
-{
- /*
- * An option argument is optional.
- */
- switch (pOptState->optType) {
- case TOPT_SHORT:
- if (*++pOpts->pzCurOpt != NUL)
- pOptState->pzOptArg = pOpts->pzCurOpt;
- else {
- char* pzLA = pOpts->origArgVect[ pOpts->curOptIdx ];
-
- /*
- * BECAUSE it is optional, we must make sure
- * we did not find another flag and that there
- * is such an argument.
- */
- if ((pzLA == NULL) || (*pzLA == '-'))
- pOptState->pzOptArg = NULL;
- else {
- pOpts->curOptIdx++; /* argument found */
- pOptState->pzOptArg = pzLA;
- }
- }
- break;
-
- case TOPT_LONG:
- /*
- * Look for an argument if we don't already have one (glued on
- * with a `=' character) *AND* we are not in named argument mode
- */
- if ( (pOptState->pzOptArg == NULL)
- && (! NAMED_OPTS(pOpts))) {
- char* pzLA = pOpts->origArgVect[ pOpts->curOptIdx ];
-
- /*
- * BECAUSE it is optional, we must make sure
- * we did not find another flag and that there
- * is such an argument.
- */
- if ((pzLA == NULL) || (*pzLA == '-'))
- pOptState->pzOptArg = NULL;
- else {
- pOpts->curOptIdx++; /* argument found */
- pOptState->pzOptArg = pzLA;
- }
- }
- break;
-
- default:
- case TOPT_DEFAULT:
- fputs(zAO_Woops, stderr );
- exit(EX_SOFTWARE);
- }
-
- /*
- * After an option with an optional argument, we will
- * *always* start with the next option because if there
- * were any characters following the option name/flag,
- * they would be interpreted as the argument.
- */
- pOpts->pzCurOpt = NULL;
- return SUCCESS;
-}
-
-
-static tSuccess
-next_opt_arg_none(tOptions* pOpts, tOptState* pOptState)
-{
- /*
- * No option argument. Make sure next time around we find
- * the correct option flag character for short options
- */
- if (pOptState->optType == TOPT_SHORT)
- (pOpts->pzCurOpt)++;
-
- /*
- * It is a long option. Make sure there was no ``=xxx'' argument
- */
- else if (pOptState->pzOptArg != NULL) {
- fprintf(stderr, zNoArg, pOpts->pzProgPath, pOptState->pOD->pz_Name);
- return FAILURE;
- }
+ if (opt_proc != NULL)
+ (*opt_proc)(opts, od);
- /*
- * It is a long option. Advance to next command line argument.
- */
- else
- pOpts->pzCurOpt = NULL;
return SUCCESS;
}
-/*
- * nextOption
- *
+/**
* Find the option descriptor and option argument (if any) for the
* next command line argument. DO NOT modify the descriptor. Put
* all the state in the state argument so that the option can be skipped
* without consequence (side effect).
+ *
+ * @param opts the program option descriptor
+ * @param o_st the state of the next found option
*/
-static tSuccess
-nextOption(tOptions* pOpts, tOptState* pOptState)
+LOCAL tSuccess
+next_opt(tOptions * opts, tOptState * o_st)
{
{
- tSuccess res;
- res = findOptDesc(pOpts, pOptState);
+ tSuccess res = find_opt(opts, o_st);
if (! SUCCESSFUL(res))
return res;
}
- if ( ((pOptState->flags & OPTST_DEFINED) != 0)
- && ((pOptState->pOD->fOptState & OPTST_NO_COMMAND) != 0)) {
- fprintf(stderr, zNotCmdOpt, pOptState->pOD->pz_Name);
+ if ( ((o_st->flags & OPTST_DEFINED) != 0)
+ && ((o_st->pOD->fOptState & OPTST_NO_COMMAND) != 0)) {
+ fprintf(stderr, zNotCmdOpt, o_st->pOD->pz_Name);
return FAILURE;
}
- pOptState->flags |= (pOptState->pOD->fOptState & OPTST_PERSISTENT_MASK);
-
- /*
- * Figure out what to do about option arguments. An argument may be
- * required, not associated with the option, or be optional. We detect the
- * latter by examining for an option marker on the next possible argument.
- * Disabled mode option selection also disables option arguments.
- */
- {
- enum { ARG_NONE, ARG_MAY, ARG_MUST } arg_type = ARG_NONE;
- tSuccess res;
-
- if ((pOptState->flags & OPTST_DISABLED) != 0)
- arg_type = ARG_NONE;
-
- else if (OPTST_GET_ARGTYPE(pOptState->flags) == OPARG_TYPE_NONE)
- arg_type = ARG_NONE;
-
- else if (pOptState->flags & OPTST_ARG_OPTIONAL)
- arg_type = ARG_MAY;
-
- else
- arg_type = ARG_MUST;
-
- switch (arg_type) {
- case ARG_MUST: res = next_opt_arg_must(pOpts, pOptState); break;
- case ARG_MAY: res = next_opt_arg_may( pOpts, pOptState); break;
- case ARG_NONE: res = next_opt_arg_none(pOpts, pOptState); break;
- }
-
- return res;
- }
-}
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * DO PRESETS
- *
- * The next several routines do the immediate action pass on the command
- * line options, then the environment variables, then the config files in
- * reverse order. Once done with that, the order is reversed and all
- * the config files and environment variables are processed again, this
- * time only processing the non-immediate action options. doPresets()
- * will then return for optionProcess() to do the final pass on the command
- * line arguments.
- */
-
-/**
- * scan the command line for immediate action options.
- * This is only called the first time through.
- */
-LOCAL tSuccess
-doImmediateOpts(tOptions* pOpts)
-{
- pOpts->curOptIdx = 1; /* start by skipping program name */
- pOpts->pzCurOpt = NULL;
-
- /*
- * Examine all the options from the start. We process any options that
- * are marked for immediate processing.
- */
- for (;;) {
- tOptState optState = OPTSTATE_INITIALIZER(PRESET);
-
- switch (nextOption(pOpts, &optState)) {
- case FAILURE: goto failed_option;
- case PROBLEM: return SUCCESS; /* no more args */
- case SUCCESS: break;
- }
-
- /*
- * IF this is an immediate-attribute option, then do it.
- */
- if (! DO_IMMEDIATELY(optState.flags))
- continue;
-
- if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
- break;
- } failed_option:;
-
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
-
- return FAILURE;
+ return get_opt_arg(opts, o_st);
}
/**
@@ -839,14 +240,18 @@ doImmediateOpts(tOptions* pOpts)
* interspersed options and arguments for the few non-standard programs that
* require it.) Thus, do not rewind option indexes because some programs
* choose to re-invoke after a non-option.
+ *
+ * @param[in,out] opts program options descriptor
+ * @returns SUCCESS or FAILURE
*/
LOCAL tSuccess
-doRegularOpts(tOptions* pOpts)
+regular_opts(tOptions * opts)
{
+ /* assert: opts->fOptSet & OPTPROC_IMMEDIATE == 0 */
for (;;) {
- tOptState optState = OPTSTATE_INITIALIZER(DEFINED);
+ tOptState opt_st = OPTSTATE_INITIALIZER(DEFINED);
- switch (nextOption(pOpts, &optState)) {
+ switch (next_opt(opts, &opt_st)) {
case FAILURE: goto failed_option;
case PROBLEM: return SUCCESS; /* no more args */
case SUCCESS: break;
@@ -856,194 +261,22 @@ doRegularOpts(tOptions* pOpts)
* IF this is an immediate action option,
* THEN skip it (unless we are supposed to do it a second time).
*/
- if (! DO_NORMALLY(optState.flags)) {
- if (! DO_SECOND_TIME(optState.flags))
+ if (! DO_NORMALLY(opt_st.flags)) {
+ if (! DO_SECOND_TIME(opt_st.flags))
continue;
- optState.pOD->optOccCt--; /* don't count this repetition */
+ opt_st.pOD->optOccCt--; /* don't count this repetition */
}
- if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
+ if (! SUCCESSFUL(handle_opt(opts, &opt_st)))
break;
} failed_option:;
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
return FAILURE;
}
-
-/**
- * check for preset values from a config files or envrionment variables
- */
-static tSuccess
-doPresets(tOptions* pOpts)
-{
- tOptDesc * pOD = NULL;
-
- if (! SUCCESSFUL(doImmediateOpts(pOpts)))
- return FAILURE;
-
- /*
- * IF this option set has a --save-opts option, then it also
- * has a --load-opts option. See if a command line option has disabled
- * option presetting.
- */
- if ( (pOpts->specOptIdx.save_opts != NO_EQUIVALENT)
- && (pOpts->specOptIdx.save_opts != 0)) {
- pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts + 1;
- if (DISABLED_OPT(pOD))
- return SUCCESS;
- }
-
- /*
- * Until we return from this procedure, disable non-presettable opts
- */
- pOpts->fOptSet |= OPTPROC_PRESETTING;
- /*
- * IF there are no config files,
- * THEN do any environment presets and leave.
- */
- if (pOpts->papzHomeList == NULL) {
- doEnvPresets(pOpts, ENV_ALL);
- }
- else {
- doEnvPresets(pOpts, ENV_IMM);
-
- /*
- * Check to see if environment variables have disabled presetting.
- */
- if ((pOD != NULL) && ! DISABLED_OPT(pOD))
- internalFileLoad(pOpts);
-
- /*
- * ${PROGRAM_LOAD_OPTS} value of "no" cannot disable other environment
- * variable options. Only the loading of .rc files.
- */
- doEnvPresets(pOpts, ENV_NON_IMM);
- }
- pOpts->fOptSet &= ~OPTPROC_PRESETTING;
-
- return SUCCESS;
-}
-
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * VERIFY OPTION CONSISTENCY
- *
- * Make sure that the argument list passes our consistency tests.
- */
-static int
-checkConsistency(tOptions* pOpts)
-{
- int errCt = 0;
- tOptDesc* pOD = pOpts->pOptDesc;
- int oCt = pOpts->presetOptCt;
-
- /*
- * FOR each of "oCt" options, ...
- */
- for (;;) {
- const int* pMust = pOD->pOptMust;
- const int* pCant = pOD->pOptCant;
-
- /*
- * IF the current option was provided on the command line
- * THEN ensure that any "MUST" requirements are not
- * "DEFAULT" (unspecified) *AND* ensure that any
- * "CANT" options have not been SET or DEFINED.
- */
- if (SELECTED_OPT(pOD)) {
- if (pMust != NULL) for (;;) {
- tOptDesc* p = pOpts->pOptDesc + *(pMust++);
- if (UNUSED_OPT(p)) {
- const tOptDesc* pN = pOpts->pOptDesc + pMust[-1];
- errCt++;
- fprintf(stderr, zReqFmt, pOD->pz_Name, pN->pz_Name);
- }
-
- if (*pMust == NO_EQUIVALENT)
- break;
- }
-
- if (pCant != NULL) for (;;) {
- tOptDesc* p = pOpts->pOptDesc + *(pCant++);
- if (SELECTED_OPT(p)) {
- const tOptDesc* pN = pOpts->pOptDesc + pCant[-1];
- errCt++;
- fprintf(stderr, zCantFmt, pOD->pz_Name, pN->pz_Name);
- }
-
- if (*pCant == NO_EQUIVALENT)
- break;
- }
- }
-
- /*
- * IF this option is not equivalenced to another,
- * OR it is equivalenced to itself (is the equiv. root)
- * THEN we need to make sure it occurs often enough.
- */
- if ( (pOD->optEquivIndex == NO_EQUIVALENT)
- || (pOD->optEquivIndex == pOD->optIndex) ) do {
- /*
- * IF the occurrence counts have been satisfied,
- * THEN there is no problem.
- */
- if (pOD->optOccCt >= pOD->optMinCt)
- break;
-
- /*
- * IF MUST_SET means SET and PRESET are okay,
- * so min occurrence count doesn't count
- */
- if ( (pOD->fOptState & OPTST_MUST_SET)
- && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) )
- break;
-
- errCt++;
- if (pOD->optMinCt > 1)
- fprintf(stderr, zNotEnough, pOD->pz_Name, pOD->optMinCt);
- else fprintf(stderr, zNeedOne, pOD->pz_Name);
- } while (0);
-
- if (--oCt <= 0)
- break;
- pOD++;
- }
-
- /*
- * IF we are stopping on errors, check to see if any remaining
- * arguments are required to be there or prohibited from being there.
- */
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
-
- /*
- * Check for prohibition
- */
- if ((pOpts->fOptSet & OPTPROC_NO_ARGS) != 0) {
- if (pOpts->origArgCt > pOpts->curOptIdx) {
- fprintf(stderr, zNoArgs, pOpts->pzProgName);
- ++errCt;
- }
- }
-
- /*
- * ELSE not prohibited, check for being required
- */
- else if ((pOpts->fOptSet & OPTPROC_ARGS_REQ) != 0) {
- if (pOpts->origArgCt <= pOpts->curOptIdx) {
- fprintf(stderr, zArgsMust, pOpts->pzProgName);
- ++errCt;
- }
- }
- }
-
- return errCt;
-}
-
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* THESE ROUTINES ARE CALLABLE FROM THE GENERATED OPTION PROCESSING CODE
@@ -1066,9 +299,9 @@ checkConsistency(tOptions* pOpts)
*
* what: this is the main option processing routine
*
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + int + argc + program arg count +
- * arg: + char** + argv + program arg vector +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + int + a_ct + program arg count +
+ * arg: + char** + a_v + program arg vector +
*
* ret_type: int
* ret_desc: the count of the arguments processed
@@ -1097,57 +330,29 @@ checkConsistency(tOptions* pOpts)
* ERRSKIP_OPTERR or ERRSTOP_OPTERR macros were invoked.
=*/
int
-optionProcess(tOptions * pOpts, int argCt, char ** argVect)
+optionProcess(tOptions * opts, int a_ct, char ** a_v)
{
- if (! SUCCESSFUL(validateOptionsStruct(pOpts, argVect[0])))
- exit(EX_SOFTWARE);
-
+ if (! SUCCESSFUL(validate_struct(opts, a_v[0])))
+ ao_bug(zbad_data_msg);
+
/*
* Establish the real program name, the program full path,
* and do all the presetting the first time thru only.
*/
- if ((pOpts->fOptSet & OPTPROC_INITDONE) == 0) {
- pOpts->origArgCt = argCt;
- pOpts->origArgVect = argVect;
- pOpts->fOptSet |= OPTPROC_INITDONE;
- if (HAS_pzPkgDataDir(pOpts))
- program_pkgdatadir = pOpts->pzPkgDataDir;
-
- if (! SUCCESSFUL(doPresets(pOpts)))
- return 0;
-
- /*
- * IF option name conversion was suppressed but it is not suppressed
- * for the command line, then it's time to translate option names.
- * Usage text will not get retranslated.
- */
- if ( ((pOpts->fOptSet & OPTPROC_TRANSLATE) != 0)
- && (pOpts->pTransProc != NULL)
- && ((pOpts->fOptSet & OPTPROC_NO_XLAT_MASK)
- == OPTPROC_NXLAT_OPT_CFG) ) {
-
- pOpts->fOptSet &= ~OPTPROC_NXLAT_OPT_CFG;
- (*pOpts->pTransProc)();
- }
-
- if ((pOpts->fOptSet & OPTPROC_REORDER) != 0)
- optionSort(pOpts);
-
- pOpts->curOptIdx = 1;
- pOpts->pzCurOpt = NULL;
- }
+ if (! ao_initialize(opts, a_ct, a_v))
+ return 0;
/*
* IF we are (re)starting,
* THEN reset option location
*/
- else if (pOpts->curOptIdx <= 0) {
- pOpts->curOptIdx = 1;
- pOpts->pzCurOpt = NULL;
+ if (opts->curOptIdx <= 0) {
+ opts->curOptIdx = 1;
+ opts->pzCurOpt = NULL;
}
- if (! SUCCESSFUL(doRegularOpts(pOpts)))
- return pOpts->origArgCt;
+ if (! SUCCESSFUL(regular_opts(opts)))
+ return (int)opts->origArgCt;
/*
* IF there were no errors
@@ -1156,29 +361,34 @@ optionProcess(tOptions * pOpts, int argCt, char ** argVect)
* THEN do that now before testing for conflicts.
* (conflicts are ignored in preset options)
*/
- if ( (pOpts->specOptIdx.save_opts != NO_EQUIVALENT)
- && (pOpts->specOptIdx.save_opts != 0)) {
- tOptDesc* pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts;
+ switch (opts->specOptIdx.save_opts) {
+ case 0:
+ case NO_EQUIVALENT:
+ break;
+ default:
+ {
+ tOptDesc * od = opts->pOptDesc + opts->specOptIdx.save_opts;
- if (SELECTED_OPT(pOD)) {
- optionSaveFile(pOpts);
- exit(EXIT_SUCCESS);
+ if (SELECTED_OPT(od)) {
+ optionSaveFile(opts);
+ option_exits(EXIT_SUCCESS);
}
}
+ }
/*
* IF we are checking for errors,
* THEN look for too few occurrences of required options
*/
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
- if (checkConsistency(pOpts) != 0)
- (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
- }
+ if (((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ && (! is_consistent(opts)))
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
- return pOpts->curOptIdx;
+ return (int)opts->curOptIdx;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/autoopts.h b/sntp/libopts/autoopts.h
index 831a52b18808..ac0a199bfd1e 100644
--- a/sntp/libopts/autoopts.h
+++ b/sntp/libopts/autoopts.h
@@ -2,14 +2,16 @@
/*
* \file autoopts.h
*
- * Time-stamp: "2011-03-25 17:51:34 bkorb"
- *
* This file defines all the global structures and special values
* used in the automated option processing library.
*
+ * @group autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -21,18 +23,16 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#ifndef AUTOGEN_AUTOOPTS_H
#define AUTOGEN_AUTOOPTS_H
-
-#include "compat/compat.h"
-#include "ag-char-map.h"
+#include <stdnoreturn.h>
#define AO_NAME_LIMIT 127
#define AO_NAME_SIZE ((size_t)(AO_NAME_LIMIT + 1))
@@ -53,22 +53,72 @@
#undef EXPORT
#define EXPORT
+#ifndef NUL
+#define NUL '\0'
+#endif
+#define BEL '\a'
+#define BS '\b'
+#define HT '\t'
+#define LF '\n'
+#define VT '\v'
+#define FF '\f'
+#define CR '\r'
+
#if defined(_WIN32) && !defined(__CYGWIN__)
# define DIRCH '\\'
#else
# define DIRCH '/'
#endif
+#ifndef EX_USAGE
+ /**
+ * Command line usage problem
+ */
+# define EX_USAGE 64
+#endif
+#ifndef EX_DATAERR
+ /**
+ * The input data was incorrect in some way.
+ */
+# define EX_DATAERR 64
+#endif
#ifndef EX_NOINPUT
+ /**
+ * option state was requested from a file that cannot be loaded.
+ */
# define EX_NOINPUT 66
#endif
#ifndef EX_SOFTWARE
+ /**
+ * AutoOpts Software failure.
+ */
# define EX_SOFTWARE 70
#endif
-#ifndef EX_CONFIG
-# define EX_CONFIG 78
+#ifndef EX_OSERR
+ /**
+ * Command line usage problem
+ */
+# define EX_OSERR 71
+#endif
+
+#define NL '\n'
+#ifndef C
+/**
+ * Coercive cast. Compel an address to be interpreted as the type
+ * of the first argument. No complaints, just do it.
+ */
+#define C(_t,_p) ((_t)(void *)(_p))
#endif
+/* The __attribute__((__warn_unused_result__)) feature
+ is available in gcc versions 3.4 and newer,
+ while the typeof feature has been available since 2.7 at least. */
+# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+# define ignore_val(x) ((void) (x))
+# else
+# define ignore_val(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
+# endif
+
/*
* Convert the number to a list usable in a printf call
*/
@@ -77,46 +127,59 @@
#define NAMED_OPTS(po) \
(((po)->fOptSet & (OPTPROC_SHORTOPT | OPTPROC_LONGOPT)) == 0)
-#define SKIP_OPT(p) (((p)->fOptState & (OPTST_DOCUMENT|OPTST_OMITTED)) != 0)
+#define SKIP_OPT(p) (((p)->fOptState & OPTST_IMMUTABLE_MASK) != 0)
typedef int tDirection;
+/**
+ * handling option presets. Start with command line and work through
+ * config settings in reverse order.
+ */
#define DIRECTION_PRESET -1
+/**
+ * handling normal options. Start with first config file, then environment
+ * variables and finally the command line.
+ */
#define DIRECTION_PROCESS 1
+/**
+ * An initialzation phase or an option being loaded from program sources.
+ */
#define DIRECTION_CALLED 0
#define PROCESSING(d) ((d)>0)
#define PRESETTING(d) ((d)<0)
+#define CALLED(d) ((d)==0)
-/*
+/**
* When loading a line (or block) of text as an option, the value can
- * be processed in any of several modes:
- *
- * @table @samp
- * @item keep
- * Every part of the value between the delimiters is saved.
- *
- * @item uncooked
- * Even if the value begins with quote characters, do not do quote processing.
- *
- * @item cooked
- * If the value looks like a quoted string, then process it.
- * Double quoted strings are processed the way strings are in "C" programs,
- * except they are treated as regular characters if the following character
- * is not a well-established escape sequence.
- * Single quoted strings (quoted with apostrophies) are handled the way
- * strings are handled in shell scripts, *except* that backslash escapes
- * are honored before backslash escapes and apostrophies.
- * @end table
+ * be processed in any of several modes.
*/
typedef enum {
+ /**
+ * If the value looks like a quoted string, then process it. Double
+ * quoted strings are processed the way strings are in "C" programs,
+ * except they are treated as regular characters if the following
+ * character is not a well-established escape sequence. Single quoted
+ * strings (quoted with apostrophies) are handled the way strings are
+ * handled in shell scripts, *except* that backslash escapes are
+ * honored before backslash escapes and apostrophies.
+ */
OPTION_LOAD_COOKED,
+
+ /**
+ * Even if the value begins with quote characters, do not do quote
+ * processing. Strip leading and trailing white space.
+ */
OPTION_LOAD_UNCOOKED,
+
+ /**
+ * Keep every part of the value between the delimiters.
+ */
OPTION_LOAD_KEEP
} tOptionLoadMode;
static tOptionLoadMode option_load_mode;
-/*
+/**
* The pager state is used by optionPagedUsage() procedure.
* When it runs, it sets itself up to be called again on exit.
* If, however, a routine needs a child process to do some work
@@ -125,8 +188,16 @@ static tOptionLoadMode option_load_mode;
* to run the pager program before its time.
*/
typedef enum {
- PAGER_STATE_INITIAL,
+ PAGER_STATE_INITIAL, //@< initial option paging state
+
+ /**
+ * temp file created and optionPagedUsage is scheduled to run at exit
+ */
PAGER_STATE_READY,
+
+ /**
+ * This is a child process used in creating shell script usage.
+ */
PAGER_STATE_CHILD
} tePagerState;
@@ -144,10 +215,10 @@ typedef enum {
} teOptType;
typedef struct {
- tOptDesc* pOD;
- tCC* pzOptArg;
- tAoUL flags;
- teOptType optType;
+ tOptDesc * pOD;
+ char const * pzOptArg;
+ opt_state_mask_t flags;
+ teOptType optType;
} tOptState;
#define OPTSTATE_INITIALIZER(st) \
{ NULL, NULL, OPTST_ ## st, TOPT_UNDEFINED }
@@ -163,6 +234,10 @@ typedef enum { TEXTTO_TABLE COUNT_TT } teTextTo;
#undef _TT_
+/**
+ * option argument types. Used to create usage information for
+ * particular options.
+ */
typedef struct {
char const * pzStr;
char const * pzReq;
@@ -197,9 +272,7 @@ ao_realloc(void *p, size_t sz);
static char *
ao_strdup(char const *str);
-#define TAGMEM(m, t)
-
-/*
+/**
* DO option handling?
*
* Options are examined at two times: at immediate handling time and at
@@ -229,7 +302,8 @@ ao_strdup(char const *str);
|| ( ((_flg) & (OPTST_DISABLED|OPTST_DISABLE_IMM)) \
== (OPTST_DISABLED|OPTST_DISABLE_IMM) ))
-/* B) handling at "regular" time because it was not immediate
+/**
+ * B) handling at "regular" time because it was not immediate
*
* 1. OPTST_DISABLED is not set:
* IMM must *NOT* be set
@@ -250,7 +324,8 @@ ao_strdup(char const *str);
|| (((_flg) & (OPTST_DISABLED|OPTST_DISABLE_IMM)) == \
OPTST_DISABLED) )
-/* C) handling at "regular" time because it is to be handled twice.
+/**
+ * C) handling at "regular" time because it is to be handled twice.
* The immediate bit was already tested and found to be set:
*
* 3. OPTST_DISABLED is not set:
@@ -308,7 +383,17 @@ extern char* strchr(char const *s, int c);
extern char* strrchr(char const *s, int c);
#endif
-/*
+/**
+ * INQUERY_CALL() tests whether the option handling function has been
+ * called by an inquery (help text needed, or option being reset),
+ * or called by a set-the-option operation.
+ */
+#define INQUERY_CALL(_o, _d) ( \
+ ((_o) <= OPTPROC_EMIT_LIMIT) \
+ || ((_d) == NULL) \
+ || (((_d)->fOptState & OPTST_RESET) != 0) )
+
+/**
* Define and initialize all the user visible strings.
* We do not do translations. If translations are to be done, then
* the client will provide a callback for that purpose.
@@ -316,16 +401,81 @@ extern char* strrchr(char const *s, int c);
#undef DO_TRANSLATIONS
#include "autoopts/usage-txt.h"
-/*
+/**
* File pointer for usage output
*/
FILE * option_usage_fp;
+/**
+ * If provided in the option structure
+ */
static char const * program_pkgdatadir;
-
+/**
+ * privately exported functions
+ */
extern tOptProc optionPrintVersion, optionPagedUsage, optionLoadOpt;
+#ifdef AUTOOPTS_INTERNAL
+
+#ifndef PKGDATADIR
+# define PKGDATADIR ""
+#endif
+#define APOSTROPHE '\''
+
+#define OPTPROC_L_N_S (OPTPROC_LONGOPT | OPTPROC_SHORTOPT)
+#if defined(ENABLE_NLS) && defined(HAVE_LIBINTL_H)
+# include <libintl.h>
+#endif
+
+typedef struct {
+ size_t fnm_len;
+ uint32_t fnm_mask;
+ char const * fnm_name;
+} ao_flag_names_t;
+
+/**
+ * Automated Options Usage Flags.
+ * NB: no entry may be a prefix of another entry
+ */
+#define AOFLAG_TABLE \
+ _aof_(gnu, OPTPROC_GNUUSAGE ) \
+ _aof_(autoopts, ~OPTPROC_GNUUSAGE) \
+ _aof_(no_misuse_usage, OPTPROC_MISUSE ) \
+ _aof_(misuse_usage, ~OPTPROC_MISUSE ) \
+ _aof_(compute, OPTPROC_COMPUTE )
+
+#define _aof_(_n, _f) AOUF_ ## _n ## _ID,
+typedef enum { AOFLAG_TABLE AOUF_COUNT } ao_flag_id_t;
+#undef _aof_
+
+#define _aof_(_n, _f) AOUF_ ## _n = (1 << AOUF_ ## _n ## _ID),
+typedef enum { AOFLAG_TABLE } ao_flags_t;
+#undef _aof_
+
+static char const zNil[] = "";
+static arg_types_t argTypes = { NULL };
+static char line_fmt_buf[32];
+static bool displayEnum = false;
+static char const pkgdatadir_default[] = PKGDATADIR;
+static char const * program_pkgdatadir = pkgdatadir_default;
+static tOptionLoadMode option_load_mode = OPTION_LOAD_UNCOOKED;
+static tePagerState pagerState = PAGER_STATE_INITIAL;
+
+ FILE * option_usage_fp = NULL;
+
+static char const * pz_enum_err_fmt;
+
+tOptions * optionParseShellOptions = NULL;
+
+static char const * shell_prog = NULL;
+static char * script_leader = NULL;
+static char * script_trailer = NULL;
+static char * script_text = NULL;
+static bool print_exit = false;
+#endif /* AUTOOPTS_INTERNAL */
+
#endif /* AUTOGEN_AUTOOPTS_H */
-/*
+/**
+ * @}
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/autoopts/options.h b/sntp/libopts/autoopts/options.h
index c2925e7999bf..0d6f2c371d18 100644
--- a/sntp/libopts/autoopts/options.h
+++ b/sntp/libopts/autoopts/options.h
@@ -1,56 +1,88 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (options.h)
- *
- * It has been AutoGen-ed April 29, 2011 at 03:44:02 PM by AutoGen 5.11.9
+ *
+ * It has been AutoGen-ed August 3, 2014 at 10:44:46 AM by AutoGen 5.18.4pre11
* From the definitions funcs.def
* and the template file options_h
*
* This file defines all the global structures and special values
* used in the automated option processing library.
*
- * Automated Options Copyright (C) 1992-2011 by Bruce Korb
- *
- * AutoOpts is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AutoOpts 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.";
-
+ * Automated Options Copyright (C) 1992-2014 by Bruce Korb
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#ifndef AUTOOPTS_OPTIONS_H_GUARD
#define AUTOOPTS_OPTIONS_H_GUARD 1
+/** \file options.h
+ *
+ * @addtogroup autoopts
+ * @{
+ */
#include <sys/types.h>
#include <stdio.h>
-#if defined(HAVE_STDINT_H)
-# include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-#endif /* HAVE_STDINT/INTTYPES_H */
-
-#if defined(HAVE_LIMITS_H)
-# include <limits.h>
-#elif defined(HAVE_SYS_LIMITS_H)
-# include <sys/limits.h>
-#endif /* HAVE_LIMITS/SYS_LIMITS_H */
-
-#if defined(HAVE_SYSEXITS_H)
-# include <sysexits.h>
-#endif /* HAVE_SYSEXITS_H */
-
-#ifndef EX_USAGE
-# define EX_USAGE 64
-#endif
-
+#ifndef COMPAT_H_GUARD
/*
+ * This is needed for test compilations where the "compat.h"
+ * header is not usually available.
+ */
+# if defined(HAVE_STDINT_H)
+# include <stdint.h>
+# elif defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+# endif /* HAVE_STDINT/INTTYPES_H */
+
+# if defined(HAVE_LIMITS_H)
+# include <limits.h>
+# elif defined(HAVE_SYS_LIMITS_H)
+# include <sys/limits.h>
+# endif /* HAVE_LIMITS/SYS_LIMITS_H */
+
+# if defined(HAVE_SYSEXITS_H)
+# include <sysexits.h>
+# endif /* HAVE_SYSEXITS_H */
+
+# if defined(HAVE_STDBOOL_H)
+# include <stdbool.h>
+# else
+ typedef enum { false = 0, true = 1 } _Bool;
+# define bool _Bool
+
+ /* The other macros must be usable in preprocessor directives. */
+# define false 0
+# define true 1
+# endif /* HAVE_SYSEXITS_H */
+#endif /* COMPAT_H_GUARD */
+// END-CONFIGURED-HEADERS
+
+/**
+ * Defined to abnormal value of EX_USAGE. Used to indicate that paged usage
+ * was requested. It is used to distinguish a --usage from a --help request.
+ * --usage is abbreviated and --help gives as much help as possible.
+ */
+#define AO_EXIT_REQ_USAGE 10064
+
+/**
* PUBLIC DEFINES
*
* The following defines may be used in applications that need to test the
@@ -65,171 +97,226 @@
*
* See the relevant generated header file to determine which and what
* values for "opt_name" are available.
+ * @group version
+ * @{
+ */
+/// autoopts structure version
+#define OPTIONS_STRUCT_VERSION 167936
+/// autoopts structure version string
+#define OPTIONS_VERSION_STRING "41:0:16"
+/// minimum version the autoopts library supports
+#define OPTIONS_MINIMUM_VERSION 102400
+/// minimum version the autoopts library supports as a string
+#define OPTIONS_MIN_VER_STRING "25:0:0"
+/// the display version of the autoopts library, as a string
+#define OPTIONS_DOTTED_VERSION "41.0"
+/// convert a version/release number pair to an integer value
+#define OPTIONS_VER_TO_NUM(_v, _r) (((_v) * 4096) + (_r))
+/// @}
+
+/**
+ * Option argument types. This must fit in the OPTST_ARG_TYPE_MASK
+ * field of the fOptState field of an option descriptor (tOptDesc).
+ * It will be a problem to extend beyond 4 bits.
*/
-#define OPTIONS_STRUCT_VERSION 143360
-#define OPTIONS_VERSION_STRING "35:0:10"
-#define OPTIONS_MINIMUM_VERSION 102400
-#define OPTIONS_MIN_VER_STRING "25:0:0"
-
typedef enum {
- OPARG_TYPE_NONE = 0,
- OPARG_TYPE_STRING = 1, /* default type/ vanilla string */
- OPARG_TYPE_ENUMERATION = 2, /* opt arg is an enum (keyword list) */
- OPARG_TYPE_BOOLEAN = 3, /* opt arg is boolean-valued */
- OPARG_TYPE_MEMBERSHIP = 4, /* opt arg sets set membership bits */
- OPARG_TYPE_NUMERIC = 5, /* opt arg is a long int */
- OPARG_TYPE_HIERARCHY = 6, /* option arg is hierarchical value */
- OPARG_TYPE_FILE = 7, /* option arg names a file */
- OPARG_TYPE_TIME = 8, /* opt arg is a time duration */
- OPARG_TYPE_FLOAT = 9, /* opt arg is a floating point num */
- OPARG_TYPE_DOUBLE = 10, /* opt arg is a double prec. float */
- OPARG_TYPE_LONG_DOUBLE = 11, /* opt arg is a long double prec. */
- OPARG_TYPE_LONG_LONG = 12 /* opt arg is a long long int */
+ OPARG_TYPE_NONE = 0, ///< does not take an argument
+ OPARG_TYPE_STRING = 1, ///< default type/ vanilla string
+ OPARG_TYPE_ENUMERATION = 2, ///< opt arg is an enum (keyword list)
+ OPARG_TYPE_BOOLEAN = 3, ///< opt arg is boolean-valued
+ OPARG_TYPE_MEMBERSHIP = 4, ///< opt arg sets set membership bits
+ OPARG_TYPE_NUMERIC = 5, ///< opt arg is a long int
+ OPARG_TYPE_HIERARCHY = 6, ///< option arg is hierarchical value
+ OPARG_TYPE_FILE = 7, ///< option arg names a file
+ OPARG_TYPE_TIME = 8, ///< opt arg is a time duration
+ OPARG_TYPE_FLOAT = 9, ///< opt arg is a floating point num
+ OPARG_TYPE_DOUBLE = 10, ///< opt arg is a double prec. float
+ OPARG_TYPE_LONG_DOUBLE = 11, ///< opt arg is a long double prec.
+ OPARG_TYPE_LONG_LONG = 12 ///< opt arg is a long long int
} teOptArgType;
+/**
+ * value descriptor for sub options
+ */
typedef struct optionValue {
- teOptArgType valType;
- char* pzName;
+ teOptArgType valType; ///< which argument type
+ char * pzName; ///< name of the sub-option
union {
- char strVal[1]; /* OPARG_TYPE_STRING */
- unsigned int enumVal; /* OPARG_TYPE_ENUMERATION */
- unsigned int boolVal; /* OPARG_TYPE_BOOLEAN */
- unsigned long setVal; /* OPARG_TYPE_MEMBERSHIP */
- long longVal; /* OPARG_TYPE_NUMERIC */
- void* nestVal; /* OPARG_TYPE_HIERARCHY */
+ char strVal[1]; ///< OPARG_TYPE_STRING
+ unsigned int enumVal; ///< OPARG_TYPE_ENUMERATION
+ unsigned int boolVal; ///< OPARG_TYPE_BOOLEAN
+ unsigned long setVal; ///< OPARG_TYPE_MEMBERSHIP
+ long longVal; ///< OPARG_TYPE_NUMERIC
+ void* nestVal; ///< OPARG_TYPE_HIERARCHY
} v;
} tOptionValue;
+/**
+ * file argument state and handling.
+ */
typedef enum {
- FTYPE_MODE_MAY_EXIST = 0x00,
- FTYPE_MODE_MUST_EXIST = 0x01,
- FTYPE_MODE_MUST_NOT_EXIST = 0x02,
- FTYPE_MODE_EXIST_MASK = 0x03,
- FTYPE_MODE_NO_OPEN = 0x00,
- FTYPE_MODE_OPEN_FD = 0x10,
- FTYPE_MODE_FOPEN_FP = 0x20,
- FTYPE_MODE_OPEN_MASK = 0x30
+ FTYPE_MODE_MAY_EXIST = 0x00, ///< may or may not exist
+ FTYPE_MODE_MUST_EXIST = 0x01, ///< must pre-exist
+ FTYPE_MODE_MUST_NOT_EXIST = 0x02, ///< must *not* pre-exist
+ FTYPE_MODE_EXIST_MASK = 0x03, ///< mask for these bits
+ FTYPE_MODE_NO_OPEN = 0x00, ///< leave file closed
+ FTYPE_MODE_OPEN_FD = 0x10, ///< call open(2)
+ FTYPE_MODE_FOPEN_FP = 0x20, ///< call fopen(3)
+ FTYPE_MODE_OPEN_MASK = 0x30 ///< open/fopen/not open
} teOptFileType;
+/**
+ * the open flag bits or the mode string, depending on the open type.
+ */
typedef union {
- int file_flags;
- char const * file_mode;
+ int file_flags; ///< open(2) flag bits
+ char const * file_mode; ///< fopen(3) mode string
} tuFileMode;
-typedef struct argList tArgList;
+/// initial number of option argument holders to allocate
#define MIN_ARG_ALLOC_CT 6
-#define INCR_ARG_ALLOC_CT 8
-struct argList {
- int useCt;
+/// amount by which to increment the argument holder allocation.
+#define INCR_ARG_ALLOC_CT 8
+/**
+ * an argument list. When an option appears multiple times and
+ * the values get "stacked". \a apzArgs holds 8 pointers initially
+ * and is incremented by \a INCR_ARG_ALLOC_CT as needed.
+ */
+typedef struct {
+ int useCt; ///< elements in use
+
+ /// allocated elements, mininum \a MIN_ARG_ALLOC_CT
+ /// steps by \a INCR_ARG_ALLOC_CT
int allocCt;
- char const * apzArgs[MIN_ARG_ALLOC_CT];
-};
+ char const * apzArgs[MIN_ARG_ALLOC_CT]; ///< element array
+} tArgList;
-/*
+/**
* Bits in the fOptState option descriptor field.
+ * @{
*/
-typedef enum {
- OPTST_SET_ID = 0, /* Set via the "SET_OPT()" macro */
- OPTST_PRESET_ID = 1, /* Set via an RC/INI file */
- OPTST_DEFINED_ID = 2, /* Set via a command line option */
- OPTST_RESET_ID = 3, /* Reset via command line option */
- OPTST_EQUIVALENCE_ID = 4, /* selected by equiv'ed option */
- OPTST_DISABLED_ID = 5, /* option is in disabled state */
- OPTST_ALLOC_ARG_ID = 6, /* pzOptArg was allocated */
- OPTST_NO_INIT_ID = 8, /* option cannot be preset */
- OPTST_NUMBER_OPT_ID = 9, /* opt value (flag) is any digit */
- OPTST_STACKED_ID = 10, /* opt uses optionStackArg proc */
- OPTST_INITENABLED_ID = 11, /* option defaults to enabled */
- OPTST_ARG_TYPE_1_ID = 12, /* bit 1 of arg type enum */
- OPTST_ARG_TYPE_2_ID = 13, /* bit 2 of arg type enum */
- OPTST_ARG_TYPE_3_ID = 14, /* bit 3 of arg type enum */
- OPTST_ARG_TYPE_4_ID = 15, /* bit 4 of arg type enum */
- OPTST_ARG_OPTIONAL_ID = 16, /* the option arg not required */
- OPTST_IMM_ID = 17, /* process opt on first pass */
- OPTST_DISABLE_IMM_ID = 18, /* process disablement immed. */
- OPTST_OMITTED_ID = 19, /* compiled out of program */
- OPTST_MUST_SET_ID = 20, /* must be set or pre-set */
- OPTST_DOCUMENT_ID = 21, /* opt is for doc only */
- OPTST_TWICE_ID = 22, /* process opt twice - imm + reg */
- OPTST_DISABLE_TWICE_ID = 23, /* process disabled option twice */
- OPTST_SCALED_NUM_ID = 24, /* scaled integer value */
- OPTST_NO_COMMAND_ID = 25, /* disable from cmd line */
- OPTST_DEPRECATED_ID = 26 /* support is being removed */
-} opt_state_enum_t;
-
-#define OPTST_INIT 0U
-#define OPTST_SET (1U << OPTST_SET_ID)
-#define OPTST_PRESET (1U << OPTST_PRESET_ID)
-#define OPTST_DEFINED (1U << OPTST_DEFINED_ID)
-#define OPTST_RESET (1U << OPTST_RESET_ID)
-#define OPTST_EQUIVALENCE (1U << OPTST_EQUIVALENCE_ID)
-#define OPTST_DISABLED (1U << OPTST_DISABLED_ID)
-#define OPTST_ALLOC_ARG (1U << OPTST_ALLOC_ARG_ID)
-#define OPTST_NO_INIT (1U << OPTST_NO_INIT_ID)
-#define OPTST_NUMBER_OPT (1U << OPTST_NUMBER_OPT_ID)
-#define OPTST_STACKED (1U << OPTST_STACKED_ID)
-#define OPTST_INITENABLED (1U << OPTST_INITENABLED_ID)
-#define OPTST_ARG_TYPE_1 (1U << OPTST_ARG_TYPE_1_ID)
-#define OPTST_ARG_TYPE_2 (1U << OPTST_ARG_TYPE_2_ID)
-#define OPTST_ARG_TYPE_3 (1U << OPTST_ARG_TYPE_3_ID)
-#define OPTST_ARG_TYPE_4 (1U << OPTST_ARG_TYPE_4_ID)
-#define OPTST_ARG_OPTIONAL (1U << OPTST_ARG_OPTIONAL_ID)
-#define OPTST_IMM (1U << OPTST_IMM_ID)
-#define OPTST_DISABLE_IMM (1U << OPTST_DISABLE_IMM_ID)
-#define OPTST_OMITTED (1U << OPTST_OMITTED_ID)
-#define OPTST_MUST_SET (1U << OPTST_MUST_SET_ID)
-#define OPTST_DOCUMENT (1U << OPTST_DOCUMENT_ID)
-#define OPTST_TWICE (1U << OPTST_TWICE_ID)
-#define OPTST_DISABLE_TWICE (1U << OPTST_DISABLE_TWICE_ID)
-#define OPTST_SCALED_NUM (1U << OPTST_SCALED_NUM_ID)
-#define OPTST_NO_COMMAND (1U << OPTST_NO_COMMAND_ID)
-#define OPTST_DEPRECATED (1U << OPTST_DEPRECATED_ID)
-#define OPT_STATE_MASK 0x07FFFF7FU
-
-#define OPTST_SET_MASK ( \
- OPTST_DEFINED | OPTST_PRESET | OPTST_RESET | \
- OPTST_SET \
- /* 0x0000000FU */ )
-
-#define OPTST_MUTABLE_MASK ( \
- OPTST_ALLOC_ARG | OPTST_DEFINED | \
- OPTST_DISABLED | OPTST_EQUIVALENCE | \
- OPTST_PRESET | OPTST_RESET | \
- OPTST_SET \
- /* 0x0000007FU */ )
-
-#define OPTST_SELECTED_MASK ( \
- OPTST_DEFINED | OPTST_SET \
- /* 0x00000005U */ )
-
-#define OPTST_ARG_TYPE_MASK ( \
- OPTST_ARG_TYPE_1 | OPTST_ARG_TYPE_2 | OPTST_ARG_TYPE_3 | \
- OPTST_ARG_TYPE_4 \
- /* 0x0000F000U */ )
-
-#define OPTST_DO_NOT_SAVE_MASK ( \
- OPTST_DOCUMENT | OPTST_NO_INIT | OPTST_OMITTED \
- /* 0x00280100U */ )
-
-#define OPTST_NO_USAGE_MASK ( \
- OPTST_DEPRECATED | OPTST_NO_COMMAND | OPTST_OMITTED \
- /* 0x06080000U */ )
+
+/** integral type for holding opt_state masks */
+typedef uint32_t opt_state_mask_t;
+
+#define OPTST_ARG_TYPE_SHIFT 12
+/** bits defined for opt_state_mask_t */
+/** Set via the "SET_OPT()" macro */
+#define OPTST_SET 0x0000001U
+/** Set via an RC/INI file */
+#define OPTST_PRESET 0x0000002U
+/** Set via a command line option */
+#define OPTST_DEFINED 0x0000004U
+/** Reset via command line option */
+#define OPTST_RESET 0x0000008U
+/** selected by equiv'ed option */
+#define OPTST_EQUIVALENCE 0x0000010U
+/** option is in disabled state */
+#define OPTST_DISABLED 0x0000020U
+/** pzOptArg was allocated */
+#define OPTST_ALLOC_ARG 0x0000040U
+/** option cannot be preset */
+#define OPTST_NO_INIT 0x0000100U
+/** opt value (flag) is any digit */
+#define OPTST_NUMBER_OPT 0x0000200U
+/** opt uses optionStackArg proc */
+#define OPTST_STACKED 0x0000400U
+/** option defaults to enabled */
+#define OPTST_INITENABLED 0x0000800U
+/** bit 1 of arg type enum */
+#define OPTST_ARG_TYPE_1 0x0001000U
+/** bit 2 of arg type enum */
+#define OPTST_ARG_TYPE_2 0x0002000U
+/** bit 3 of arg type enum */
+#define OPTST_ARG_TYPE_3 0x0004000U
+/** bit 4 of arg type enum */
+#define OPTST_ARG_TYPE_4 0x0008000U
+/** the option arg not required */
+#define OPTST_ARG_OPTIONAL 0x0010000U
+/** process opt on first pass */
+#define OPTST_IMM 0x0020000U
+/** process disablement immed. */
+#define OPTST_DISABLE_IMM 0x0040000U
+/** compiled out of program */
+#define OPTST_OMITTED 0x0080000U
+/** must be set or pre-set */
+#define OPTST_MUST_SET 0x0100000U
+/** opt is for doc only */
+#define OPTST_DOCUMENT 0x0200000U
+/** process opt twice - imm + reg */
+#define OPTST_TWICE 0x0400000U
+/** process disabled option twice */
+#define OPTST_DISABLE_TWICE 0x0800000U
+/** scaled integer value */
+#define OPTST_SCALED_NUM 0x1000000U
+/** disable from cmd line */
+#define OPTST_NO_COMMAND 0x2000000U
+/** support is being removed */
+#define OPTST_DEPRECATED 0x4000000U
+/** alias for other option */
+#define OPTST_ALIAS 0x8000000U
+
+/** bits in SET mask:
+ * set preset reset defined */
+#define OPTST_SET_MASK 0x000000FU
+
+/** bits in MUTABLE mask:
+ * set preset reset defined equivalence disabled
+ * alloc_arg */
+#define OPTST_MUTABLE_MASK 0x000007FU
+
+/** bits omitted from PERSISTENT mask:
+ * mutable_mask */
+#define OPTST_PERSISTENT_MASK 0xFFFFF00U
+
+/** bits in SELECTED mask:
+ * set defined */
+#define OPTST_SELECTED_MASK 0x0000005U
+
+/** bits in ARG_TYPE mask:
+ * arg_type_1 arg_type_2 arg_type_3 arg_type_4 */
+#define OPTST_ARG_TYPE_MASK 0x000F000U
+
+/** bits in NO_USAGE mask:
+ * omitted no_command deprecated */
+#define OPTST_NO_USAGE_MASK 0x6080000U
+
+/** bits in IMMUTABLE mask:
+ * document omitted */
+#define OPTST_IMMUTABLE_MASK 0x0280000U
+
+/** bits in DO_NOT_SAVE mask:
+ * document omitted no_init */
+#define OPTST_DO_NOT_SAVE_MASK 0x0280100U
+
+/** bits in NO_OUTPUT mask:
+ * document omitted alias */
+#define OPTST_NO_OUTPUT_MASK 0x8280000U
+
+/** all bits in opt_state_mask_t masks */
+#define OPTST_MASK_ALL 0xFFFFF7FU
+
+/** no bits in opt_state_mask_t */
+#define OPTST_INIT 0x0000000U
+/** @} */
#ifdef NO_OPTIONAL_OPT_ARGS
# undef OPTST_ARG_OPTIONAL
# define OPTST_ARG_OPTIONAL 0
#endif
-#define OPTST_PERSISTENT_MASK (~OPTST_MUTABLE_MASK)
+#define VENDOR_OPTION_VALUE 'W'
#define SELECTED_OPT(_od) ((_od)->fOptState & OPTST_SELECTED_MASK)
#define UNUSED_OPT( _od) (((_od)->fOptState & OPTST_SET_MASK) == 0)
#define DISABLED_OPT(_od) ((_od)->fOptState & OPTST_DISABLED)
#define OPTION_STATE(_od) ((_od)->fOptState)
-#define OPTST_SET_ARGTYPE(_n) ((_n) << OPTST_ARG_TYPE_1_ID)
-#define OPTST_GET_ARGTYPE(_f) (((_f)&OPTST_ARG_TYPE_MASK)>>OPTST_ARG_TYPE_1_ID)
+#define OPTST_SET_ARGTYPE(_n) ((_n) << OPTST_ARG_TYPE_SHIFT)
+#define OPTST_GET_ARGTYPE(_f) \
+ (((_f)&OPTST_ARG_TYPE_MASK) >> OPTST_ARG_TYPE_SHIFT)
-/*
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* PRIVATE INTERFACES
*
* The following values are used in the generated code to communicate
@@ -237,240 +324,373 @@ typedef enum {
* and may be subject to change.
*/
-/*
+/**
* Define the processing state flags
+ * @{
*/
-typedef enum {
- OPTPROC_LONGOPT_ID = 0, /* Process long style options */
- OPTPROC_SHORTOPT_ID = 1, /* Process short style "flags" */
- OPTPROC_ERRSTOP_ID = 2, /* Stop on argument errors */
- OPTPROC_DISABLEDOPT_ID = 3, /* Current option is disabled */
- OPTPROC_NO_REQ_OPT_ID = 4, /* no options are required */
- OPTPROC_NUM_OPT_ID = 5, /* there is a number option */
- OPTPROC_INITDONE_ID = 6, /* have inits been done? */
- OPTPROC_NEGATIONS_ID = 7, /* any negation options? */
- OPTPROC_ENVIRON_ID = 8, /* check environment? */
- OPTPROC_NO_ARGS_ID = 9, /* Disallow remaining arguments */
- OPTPROC_ARGS_REQ_ID = 10, /* Require args after options */
- OPTPROC_REORDER_ID = 11, /* reorder operands after opts */
- OPTPROC_GNUUSAGE_ID = 12, /* emit usage in GNU style */
- OPTPROC_TRANSLATE_ID = 13, /* Translate strings in tOptions */
- OPTPROC_MISUSE_ID = 14, /* no usage on usage error */
- OPTPROC_NXLAT_OPT_CFG_ID = 16, /* suppress for config only */
- OPTPROC_NXLAT_OPT_ID = 17, /* suppress xlation always */
- OPTPROC_PRESETTING_ID = 19 /* opt processing in preset state */
-} optproc_state_enum_t;
-
-#define OPTPROC_NONE 0U
-#define OPTPROC_LONGOPT (1U << OPTPROC_LONGOPT_ID)
-#define OPTPROC_SHORTOPT (1U << OPTPROC_SHORTOPT_ID)
-#define OPTPROC_ERRSTOP (1U << OPTPROC_ERRSTOP_ID)
-#define OPTPROC_DISABLEDOPT (1U << OPTPROC_DISABLEDOPT_ID)
-#define OPTPROC_NO_REQ_OPT (1U << OPTPROC_NO_REQ_OPT_ID)
-#define OPTPROC_NUM_OPT (1U << OPTPROC_NUM_OPT_ID)
-#define OPTPROC_INITDONE (1U << OPTPROC_INITDONE_ID)
-#define OPTPROC_NEGATIONS (1U << OPTPROC_NEGATIONS_ID)
-#define OPTPROC_ENVIRON (1U << OPTPROC_ENVIRON_ID)
-#define OPTPROC_NO_ARGS (1U << OPTPROC_NO_ARGS_ID)
-#define OPTPROC_ARGS_REQ (1U << OPTPROC_ARGS_REQ_ID)
-#define OPTPROC_REORDER (1U << OPTPROC_REORDER_ID)
-#define OPTPROC_GNUUSAGE (1U << OPTPROC_GNUUSAGE_ID)
-#define OPTPROC_TRANSLATE (1U << OPTPROC_TRANSLATE_ID)
-#define OPTPROC_MISUSE (1U << OPTPROC_MISUSE_ID)
-#define OPTPROC_NXLAT_OPT_CFG (1U << OPTPROC_NXLAT_OPT_CFG_ID)
-#define OPTPROC_NXLAT_OPT (1U << OPTPROC_NXLAT_OPT_ID)
-#define OPTPROC_PRESETTING (1U << OPTPROC_PRESETTING_ID)
-#define OPTPROC_STATE_MASK 0x000B7FFFU
-
-#define OPTPROC_NO_XLAT_MASK ( \
- OPTPROC_NXLAT_OPT | OPTPROC_NXLAT_OPT_CFG \
- /* 0x00030000U */ )
-
-#define STMTS(s) do { s; } while (0)
-/*
- * The following must be #defined instead of typedef-ed
- * because "static const" cannot both be applied to a type,
- * tho each individually can...so they all are
+/** integral type for holding proc_state masks */
+typedef uint32_t proc_state_mask_t;
+
+/** bits defined for proc_state_mask_t */
+/** Process long style options */
+#define OPTPROC_LONGOPT 0x000001U
+/** Process short style "flags" */
+#define OPTPROC_SHORTOPT 0x000002U
+/** Stop on argument errors */
+#define OPTPROC_ERRSTOP 0x000004U
+/** Current option is disabled */
+#define OPTPROC_DISABLEDOPT 0x000008U
+/** no options are required */
+#define OPTPROC_NO_REQ_OPT 0x000010U
+/** there is a number option */
+#define OPTPROC_NUM_OPT 0x000020U
+/** have inits been done? */
+#define OPTPROC_INITDONE 0x000040U
+/** any negation options? */
+#define OPTPROC_NEGATIONS 0x000080U
+/** check environment? */
+#define OPTPROC_ENVIRON 0x000100U
+/** Disallow remaining arguments */
+#define OPTPROC_NO_ARGS 0x000200U
+/** Require args after options */
+#define OPTPROC_ARGS_REQ 0x000400U
+/** reorder operands after opts */
+#define OPTPROC_REORDER 0x000800U
+/** emit usage in GNU style */
+#define OPTPROC_GNUUSAGE 0x001000U
+/** Translate strings in tOptions */
+#define OPTPROC_TRANSLATE 0x002000U
+/** no usage on usage error */
+#define OPTPROC_MISUSE 0x004000U
+/** immediate options active */
+#define OPTPROC_IMMEDIATE 0x008000U
+/** suppress for config only */
+#define OPTPROC_NXLAT_OPT_CFG 0x010000U
+/** suppress xlation always */
+#define OPTPROC_NXLAT_OPT 0x020000U
+/** vendor options active */
+#define OPTPROC_VENDOR_OPT 0x040000U
+/** opt processing in preset state */
+#define OPTPROC_PRESETTING 0x080000U
+/** Ignore pzFullUsage, compute usage text */
+#define OPTPROC_COMPUTE 0x100000U
+/** Program outputs digested option state for shell scripts. Usage text
+ * always written to stderr */
+#define OPTPROC_SHELL_OUTPUT 0x200000U
+
+/** bits in NO_XLAT mask:
+ * nxlat_opt_cfg nxlat_opt */
+#define OPTPROC_NO_XLAT_MASK 0x030000U
+
+/** all bits in proc_state_mask_t masks */
+#define OPTPROC_MASK_ALL 0x3FFFFFU
+
+/** no bits in proc_state_mask_t */
+#define OPTPROC_NONE 0x000000U
+/** @} */
+
+#define STMTS(s) do { s; } while (false)
+
+/**
+ * Abbreviation for const memory character.
*/
-#define tSCC static char const
#define tCC char const
-#define tAoSC static char
-#define tAoUC unsigned char
-#define tAoUI unsigned int
-#define tAoUL unsigned long
-#define tAoUS unsigned short
-/*
- * It is so disgusting that there must be so many ways
- * of specifying TRUE and FALSE.
+/**
+ * Magical values for the program's option pointer
+ * @{
*/
-typedef enum { AG_FALSE = 0, AG_TRUE } ag_bool;
+typedef enum {
+ OP_VAL_EMIT_USAGE = 1, ///< request for usage
+ OP_VAL_EMIT_SHELL = 2, ///< emit value for Bourne shell evaluation
+ OP_VAL_RETURN_VALNAME = 3, ///< return the value as a string
+ OP_VAL_EMIT_LIMIT = 15 ///< limit for magic values
+} opt_proc_vals_t;
-/*
- * Define a structure that describes each option and
- * a pointer to the procedure that handles it.
- * The argument is the count of this flag previously seen.
+/// \a OPT_VAL_EMIT_USAGE cast as a pointer
+#define OPTPROC_EMIT_USAGE ((tOptions *)OP_VAL_EMIT_USAGE)
+
+/// \a OPT_VAL_EMIT_SHELL cast as a pointer
+#define OPTPROC_EMIT_SHELL ((tOptions *)OP_VAL_EMIT_SHELL)
+
+/// \a OPT_VAL_RETURN_VALNAME cast as a pointer
+#define OPTPROC_RETURN_VALNAME ((tOptions *)OP_VAL_RETURN_VALNAME)
+
+/// \a OPT_VAL_EMIT_LIMIT cast as a pointer
+#define OPTPROC_EMIT_LIMIT ((tOptions *)OP_VAL_EMIT_LIMIT)
+/** @} */
+
+/** group option processing procedure types
+ * @{
*/
+/** forward declaration for tOptDesc */
+typedef struct opt_desc tOptDesc;
+/** forward declaration for tOptiond */
typedef struct options tOptions;
-typedef struct optDesc tOptDesc;
-typedef struct optNames tOptNames;
-#define OPTPROC_EMIT_USAGE ((tOptions *)0x01UL)
-#define OPTPROC_EMIT_SHELL ((tOptions *)0x02UL)
-#define OPTPROC_RETURN_VALNAME ((tOptions *)0x03UL)
-#define OPTPROC_EMIT_LIMIT ((tOptions *)0x0FUL)
-/*
+/**
* The option procedures do the special processing for each
* option flag that needs it.
*/
-typedef void (tOptProc)(tOptions* pOpts, tOptDesc* pOptDesc);
-typedef tOptProc* tpOptProc;
+typedef void (tOptProc)(tOptions * pOpts, tOptDesc * pOptDesc);
-/*
+/**
+ * a pointer to an option processing procedure
+ */
+typedef tOptProc * tpOptProc;
+
+/**
* The usage procedure will never return. It calls "exit(2)"
* with the "exitCode" argument passed to it.
*/
// coverity[+kill]
typedef void (tUsageProc)(tOptions* pOpts, int exitCode);
-typedef tUsageProc* tpUsageProc;
-/*
+/**
+ * a pointer to a procedure that prints usage and exits.
+ */
+typedef tUsageProc * tpUsageProc;
+/** @} */
+
+/**
* Special definitions. "NOLIMIT" is the 'max' value to use when
* a flag may appear multiple times without limit. "NO_EQUIVALENT"
* is an illegal value for 'optIndex' (option description index).
+ * @{
*/
-#define NOLIMIT USHRT_MAX
-#define OPTION_LIMIT SHRT_MAX
+#define NOLIMIT USHRT_MAX ///< no occurrance count limit
+#define OPTION_LIMIT SHRT_MAX ///< maximum number of option types
+/// option index to indicate no equivalance or alias
#define NO_EQUIVALENT (OPTION_LIMIT+1)
+/** @} */
+/**
+ * Option argument value. Which is valid is determined by:
+ * (fOptState & OPTST_ARG_TYPE_MASK) >> OPTST_ARG_TYPE_SHIFT
+ * which will yield one of the teOptArgType values.
+ */
typedef union {
- char const * argString;
- uintptr_t argEnum;
- uintptr_t argIntptr;
- long argInt;
- unsigned long argUint;
- unsigned int argBool;
- FILE * argFp;
- int argFd;
-} optArgBucket_t;
-
-#define pzLastArg optArg.argString
-
-/*
+ char const * argString; ///< as a string
+ uintptr_t argEnum; ///< as an enumeration value
+ uintptr_t argIntptr; ///< as an integer big enough to hold pointer
+ long argInt; ///< as a long integer
+ unsigned long argUint; ///< as an unsigned long ingeger
+ unsigned int argBool; ///< as a boolean value
+ FILE * argFp; ///< as a FILE * pointer
+ int argFd; ///< as a file descriptor (int)
+} opt_arg_union_t;
+
+/// Compatibility define: \a pzLastArg is now \a optArg.argString
+#define pzLastArg optArg.argString
+/// The old amorphous argument bucket is now the opt_arg_union_t union.
+#define optArgBucket_t opt_arg_union_t
+
+/**
+ * Enumeration of AutoOpts defined options. The enumeration is used in
+ * marking each option that is defined by AutoOpts so libopts can find
+ * the correct descriptor. This renders \a option_spec_idx_t redundant.
+ */
+typedef enum {
+ AOUSE_USER_DEFINED = 0, ///< user specified option
+ AOUSE_RESET_OPTION, ///< reset option state option
+ AOUSE_VERSION, ///< request version
+ AOUSE_HELP, ///< request usage help
+ AOUSE_MORE_HELP, ///< request paged usage
+ AOUSE_USAGE, ///< request short usage
+ AOUSE_SAVE_OPTS, ///< save option state
+ AOUSE_LOAD_OPTS, ///< load options from file
+ AOUSE_VENDOR_OPT ///< specify a vendor option
+} opt_usage_t;
+
+/**
* Descriptor structure for each option.
* Only the fields marked "PUBLIC" are for public use.
*/
-struct optDesc {
- tAoUS const optIndex; /* PUBLIC */
- tAoUS const optValue; /* PUBLIC */
- tAoUS optActualIndex; /* PUBLIC */
- tAoUS optActualValue; /* PUBLIC */
-
- tAoUS const optEquivIndex; /* PUBLIC */
- tAoUS const optMinCt;
- tAoUS const optMaxCt;
- tAoUS optOccCt; /* PUBLIC */
-
- tAoUI fOptState; /* PUBLIC */
- tAoUI reserved;
- optArgBucket_t optArg; /* PUBLIC */
- void* optCookie; /* PUBLIC */
-
- int const * const pOptMust;
- int const * const pOptCant;
- tpOptProc const pOptProc;
- char const* const pzText;
-
- char const* const pz_NAME;
- char const* const pz_Name;
- char const* const pz_DisableName;
- char const* const pz_DisablePfx;
+struct opt_desc {
+ /// Public, the index of this descriptor
+ uint16_t const optIndex;
+ /// Public, the flag character (value)
+ uint16_t const optValue;
+ /// Public, the index of the option used to activate option
+ uint16_t optActualIndex;
+ /// Public, the flag character of the activating option
+ uint16_t optActualValue;
+
+ /// Public, the index of the equivalenced-to option.
+ /// This is NO_EQUIVALENT unless activated.
+ uint16_t const optEquivIndex;
+ /// Private, the minimum occurrance count
+ uint16_t const optMinCt;
+ /// Private, the maximum occurrance count (NOLIMIT, if unlimited)
+ uint16_t const optMaxCt;
+ /// Public, the actual occurrance count
+ uint16_t optOccCt;
+
+ /// Public, the option processing state
+ opt_state_mask_t fOptState;
+ /// Private, how the option is used (opt_usage_t)
+ uint32_t optUsage;
+ /// Public, The current option argument value
+ opt_arg_union_t optArg;
+ /// Public, data that is actually private to the code that handles
+ /// this particular option. It is public IFF you have your own
+ /// handling function.
+ void * optCookie;
+
+ /// Private, a list of options that must be specified when this option
+ /// has been specified
+ int const * const pOptMust;
+
+ /// Private, a list of options that cannot be specified when this option
+ /// has been specified
+ int const * const pOptCant;
+
+ /// Private, the function to call for handling this option
+ tpOptProc const pOptProc;
+
+ /// Private, usage information about this option
+ char const * const pzText;
+
+ /// Public, the UPPER CASE, shell variable name syntax name of the option
+ char const * const pz_NAME;
+
+ /// the unmodified name of the option
+ char const * const pz_Name;
+
+ /// the option name to use to disable the option. Long options names
+ /// must be active.
+ char const * const pz_DisableName;
+
+ /// the special prefix that makes the normal option name become the
+ /// disablement name.
+ char const * const pz_DisablePfx;
};
-/*
+/**
* Some options need special processing, so we store their
- * indexes in a known place:
+ * indexes in a known place.
*/
-typedef struct optSpecIndex tOptSpecIndex;
-struct optSpecIndex {
- const tAoUS more_help;
- const tAoUS save_opts;
- const tAoUS number_option;
- const tAoUS default_opt;
-};
-
-/*
+typedef struct {
+ uint16_t const more_help; ///< passes help text through pager
+ uint16_t const save_opts; ///< stores option state to a file
+ uint16_t const number_option; ///< the option "name" is an integer
+ /// all arguments are options, this is the default option that must
+ /// take an argument. That argument is the unrecognized option.
+ uint16_t const default_opt;
+} option_spec_idx_t;
+
+/**
* The procedure generated for translating option text
*/
typedef void (tOptionXlateProc)(void);
-/*
- * Everything marked "PUBLIC" is also marked "const".
- * Public access is not a license to modify. Other fields
- * are used and modified by the library. They are also
- * subject to change without any notice. Do not even
- * look at these outside of libopts.
+/**
+ * Everything marked "PUBLIC" is also marked "const". Public access is not
+ * a license to modify. Other fields are used and modified by the library.
+ * They are also subject to change without any notice.
+ * Do not even look at these outside of libopts.
*/
struct options {
- int const structVersion;
- int origArgCt;
- char** origArgVect;
- unsigned int fOptSet;
- unsigned int curOptIdx;
- char* pzCurOpt;
-
- char const* const pzProgPath; /* PUBLIC */
- char const* const pzProgName; /* PUBLIC */
- char const* const pzPROGNAME; /* PUBLIC */
- char const* const pzRcName; /* PUBLIC */
- char const* const pzCopyright; /* PUBLIC */
- char const* const pzCopyNotice; /* PUBLIC */
- char const* const pzFullVersion; /* PUBLIC */
- char const* const* const papzHomeList;
- char const* const pzUsageTitle;
- char const* const pzExplain;
- char const* const pzDetail;
- tOptDesc* const pOptDesc; /* PUBLIC */
- char const* const pzBugAddr; /* PUBLIC */
-
- void* pExtensions;
- void* pSavedState;
-
+ int const structVersion; ///< The version of this struct
+ unsigned int origArgCt; ///< program argument count
+ char ** origArgVect; ///< program argument vector
+ proc_state_mask_t fOptSet; ///< option proc. state flags
+ unsigned int curOptIdx; ///< current option index
+ char * pzCurOpt; ///< current option text
+
+ /// Public, the full path of the program
+ char const * const pzProgPath;
+ /// Public, the name of the executable, without any path
+ char const * const pzProgName;
+ /// Public, the upper-cased, shell variable syntax-ed program name
+ char const * const pzPROGNAME;
+ /// the name of the "rc file" (configuration file)
+ char const * const pzRcName;
+ /// the copyright text
+ char const * const pzCopyright;
+ /// the full copyright notice
+ char const * const pzCopyNotice;
+ /// a string with the program name, project name and version
+ char const * const pzFullVersion;
+ /// a list of pointers to directories to search for the config file
+ char const * const * const papzHomeList;
+ /// the title line for usage
+ char const * const pzUsageTitle;
+ /// some added explanation for what this program is trying to do
+ char const * const pzExplain;
+ /// a detailed explanation of the program's purpose, for use when
+ /// full help has been requested
+ char const * const pzDetail;
+ /// The public array of option descriptors
+ tOptDesc * const pOptDesc;
+ /// the email address for reporting bugs
+ char const * const pzBugAddr;
+
+ /// Reserved for future use
+ void * pExtensions;
+ /// A copy of the option state when optionSaveState was called.
+ void * pSavedState;
+
+ /// The procedure to call to print usage text
// coverity[+kill]
- tpUsageProc pUsageProc;
- tOptionXlateProc* pTransProc;
-
- tOptSpecIndex specOptIdx;
- int const optCt;
- int const presetOptCt;
- char const * pzFullUsage;
- char const * pzShortUsage;
- /* PUBLIC: */
- optArgBucket_t const * const originalOptArgArray;
- void * const * const originalOptArgCookie;
- char const * const pzPkgDataDir;
- char const * const pzPackager;
+ tpUsageProc pUsageProc;
+ /// The procedure to call to translate translatable option messages
+ tOptionXlateProc * pTransProc;
+
+ /// Special option indexes.
+ option_spec_idx_t specOptIdx;
+ /// the total number of options for the program
+ int const optCt;
+ /// The number of "presettable" options, though some may be marked
+ /// "no-preset". Includes all user specified options, plus a few
+ /// that are specified by AutoOpts.
+ int const presetOptCt;
+ /// user specified full usage text
+ char const * pzFullUsage;
+ /// user specifed short usage (usage error triggered) message
+ char const * pzShortUsage;
+ /// The option argument settings active when optionSaveState was called
+ opt_arg_union_t const * const originalOptArgArray;
+ /// any saved cookie value
+ void * const * const originalOptArgCookie;
+ /// the package data directory (e.g. global configuration files)
+ char const * const pzPkgDataDir;
+ /// email address of the project packager
+ char const * const pzPackager;
};
/*
* Versions where in various fields first appear:
* ($AO_CURRENT * 4096 + $AO_REVISION, but $AO_REVISION must be zero)
*/
-#define originalOptArgArray_STRUCT_VERSION 131072 /* AO_CURRENT = 32 */
+/**
+ * The version that first stored the original argument vector
+ */
+#define originalOptArgArray_STRUCT_VERSION 0x20000 /* AO_CURRENT = 32 */
#define HAS_originalOptArgArray(_opt) \
((_opt)->structVersion >= originalOptArgArray_STRUCT_VERSION)
-#define pzPkgDataDir_STRUCT_VERSION 139264 /* AO_CURRENT = 34 */
+/**
+ * The version that first stored the package data directory
+ */
+#define pzPkgDataDir_STRUCT_VERSION 0x22000 /* AO_CURRENT = 34 */
#define HAS_pzPkgDataDir(_opt) \
((_opt)->structVersion >= pzPkgDataDir_STRUCT_VERSION)
-/*
+/**
+ * The version that first stored the option usage in each option descriptor
+ */
+#define opt_usage_t_STRUCT_VERSION 0x26000 /* AO_CURRENT = 38 */
+#define HAS_opt_usage_t(_opt) \
+ ((_opt)->structVersion >= opt_usage_t_STRUCT_VERSION)
+
+/**
* "token list" structure returned by "string_tokenize()"
*/
typedef struct {
- unsigned long tkn_ct;
- unsigned char* tkn_list[1];
+ unsigned long tkn_ct; ///< number of tokens found
+ unsigned char* tkn_list[1]; ///< array of pointers to tokens
} token_list_t;
/*
@@ -483,7 +703,9 @@ typedef struct {
#define strequate option_strequate
#define strtransform option_strtransform
-/*
+/**
+ * Everything needed to be known about an mmap-ed file.
+ *
* This is an output only structure used by text_mmap and text_munmap.
* Clients must not alter the contents and must provide it to both
* the text_mmap and text_munmap procedures. BE ADVISED: if you are
@@ -493,17 +715,19 @@ typedef struct {
* is not zero, then there *may* not be a terminating NUL.
*/
typedef struct {
- void* txt_data; /* text file data */
- size_t txt_size; /* actual file size */
- size_t txt_full_size; /* mmaped mem size */
- int txt_fd; /* file descriptor */
- int txt_zero_fd; /* fd for /dev/zero */
- int txt_errno; /* warning code */
- int txt_prot; /* "prot" flags */
- int txt_flags; /* mapping type */
- int txt_alloc; /* if we malloced memory */
+ void * txt_data; ///< text file data
+ size_t txt_size; ///< actual file size
+ size_t txt_full_size; ///< mmaped mem size
+ int txt_fd; ///< file descriptor
+ int txt_zero_fd; ///< fd for /dev/zero
+ int txt_errno; ///< warning code
+ int txt_prot; ///< "prot" flags
+ int txt_flags; ///< mapping type
} tmap_info_t;
+/**
+ * mmap result wrapper that yields "true" when mmap has failed.
+ */
#define TEXT_MMAP_FAILED_ADDR(a) ((void*)(a) == (void*)MAP_FAILED)
#ifdef __cplusplus
@@ -514,29 +738,23 @@ CPLUSPLUS_OPENER
#define CPLUSPLUS_CLOSER
#endif
-/*
+/**
* The following routines may be coded into AutoOpts client code:
*/
-/* From: tokenize.c line 166
- *
+/**
* ao_string_tokenize - tokenize an input string
*
- * Arguments:
- * string string to be tokenized
- *
- * Returns: token_list_t* - pointer to a structure that lists each token
- *
* This function will convert one input string into a list of strings.
* The list of strings is derived by separating the input based on
* white space separation. However, if the input contains either single
* or double quote characters, then the text after that character up to
* a matching quote will become the string in the list.
- *
+ *
* The returned pointer should be deallocated with @code{free(3C)} when
* are done using the data. The data are placed in a single block of
* allocated memory. Do not deallocate individual token/strings.
- *
+ *
* The structure pointed to will contain at least these two fields:
* @table @samp
* @item tkn_ct
@@ -545,7 +763,7 @@ CPLUSPLUS_OPENER
* An array of @code{tkn_ct + 1} pointers to substring tokens, with
* the last pointer set to NULL.
* @end table
- *
+ *
* There are two types of quoted strings: single quoted (@code{'}) and
* double quoted (@code{"}). Singly quoted strings are fairly raw in that
* escape characters (@code{\\}) are simply another character, except when
@@ -555,22 +773,20 @@ CPLUSPLUS_OPENER
* @code{'} incorporates the single quote into the string
* @code{\n} suppresses both the backslash and newline character
* @end example
- *
+ *
* Double quote strings are formed according to the rules of string
* constants in ANSI-C programs.
+ *
+ * @param string string to be tokenized
+ *
+ * @return token_list_t* - pointer to a structure that lists each token
*/
extern token_list_t* ao_string_tokenize(char const*);
-/* From: configfile.c line 80
- *
+/**
* configFileLoad - parse a configuration file
*
- * Arguments:
- * pzFile the file to load
- *
- * Returns: const tOptionValue* - An allocated, compound value structure
- *
* This routine will load a named configuration file and parse the
* text as a hierarchically valued option. The option descriptor
* created from an option definition file is not used via this interface.
@@ -578,20 +794,17 @@ extern token_list_t* ao_string_tokenize(char const*);
* type "@code{OPARG_TYPE_HIERARCHY}". It may be used in calls to
* @code{optionGetValue()}, @code{optionNextValue()} and
* @code{optionUnloadNested()}.
+ *
+ * @param fname the file to load
+ *
+ * @return const tOptionValue* - An allocated, compound value structure
*/
extern const tOptionValue* configFileLoad(char const*);
-/* From: configfile.c line 1059
- *
+/**
* optionFileLoad - Load the locatable config files, in order
*
- * Arguments:
- * pOpts program options descriptor
- * pzProg program name
- *
- * Returns: int - 0 -> SUCCESS, -1 -> FAILURE
- *
* This function looks in all the specified directories for a configuration
* file ("rc" file or "ini" file) and processes any found twice. The first
* time through, they are processed in reverse order (last file first). At
@@ -599,154 +812,178 @@ extern const tOptionValue* configFileLoad(char const*);
* example, if the last named file specifies not processing any more
* configuration files, then no more configuration files will be processed.
* Such an option in the @strong{first} named directory will have no effect.
- *
+ *
* Once the immediate action configurables have been handled, then the
* directories are handled in normal, forward order. In that way, later
* config files can override the settings of earlier config files.
- *
+ *
* See the AutoOpts documentation for a thorough discussion of the
* config file format.
- *
+ *
* Configuration files not found or not decipherable are simply ignored.
+ *
+ * @param opts program options descriptor
+ * @param prog program name
+ *
+ * @return int - 0 -> SUCCESS, -1 -> FAILURE
*/
extern int optionFileLoad(tOptions*, char const*);
-/* From: configfile.c line 212
- *
+/**
* optionFindNextValue - find a hierarcicaly valued option instance
*
- * Arguments:
- * pOptDesc an option with a nested arg type
- * pPrevVal the last entry
- * name name of value to find
- * value the matching value
- *
- * Returns: const tOptionValue* - a compound value structure
- *
* This routine will find the next entry in a nested value option or
* configurable. It will search through the list and return the next entry
* that matches the criteria.
+ *
+ * @param odesc an option with a nested arg type
+ * @param pPrevVal the last entry
+ * @param name name of value to find
+ * @param value the matching value
+ *
+ * @return const tOptionValue* - a compound value structure
*/
extern const tOptionValue* optionFindNextValue(const tOptDesc*, const tOptionValue*, char const*, char const*);
-/* From: configfile.c line 138
- *
+/**
* optionFindValue - find a hierarcicaly valued option instance
*
- * Arguments:
- * pOptDesc an option with a nested arg type
- * name name of value to find
- * value the matching value
- *
- * Returns: const tOptionValue* - a compound value structure
- *
* This routine will find an entry in a nested value option or configurable.
* It will search through the list and return a matching entry.
+ *
+ * @param odesc an option with a nested arg type
+ * @param name name of value to find
+ * @param val the matching value
+ *
+ * @return const tOptionValue* - a compound value structure
*/
extern const tOptionValue* optionFindValue(const tOptDesc*, char const*, char const*);
-/* From: restore.c line 166
- *
+/**
* optionFree - free allocated option processing memory
*
- * Arguments:
- * pOpts program options descriptor
- *
* AutoOpts sometimes allocates memory and puts pointers to it in the
* option state structures. This routine deallocates all such memory.
+ *
+ * @param pOpts program options descriptor
*/
extern void optionFree(tOptions*);
-/* From: configfile.c line 281
- *
+/**
* optionGetValue - get a specific value from a hierarcical list
*
- * Arguments:
- * pOptValue a hierarchcal value
- * valueName name of value to get
- *
- * Returns: const tOptionValue* - a compound value structure
- *
* This routine will find an entry in a nested value option or configurable.
* If "valueName" is NULL, then the first entry is returned. Otherwise,
* the first entry with a name that exactly matches the argument will be
- * returned.
+ * returned. If there is no matching value, NULL is returned and errno is
+ * set to ENOENT. If the provided option value is not a hierarchical value,
+ * NULL is also returned and errno is set to EINVAL.
+ *
+ * @param pOptValue a hierarchcal value
+ * @param valueName name of value to get
+ *
+ * @return const tOptionValue* - a compound value structure
*/
extern const tOptionValue* optionGetValue(const tOptionValue*, char const*);
-/* From: load.c line 478
- *
+/**
* optionLoadLine - process a string for an option name and value
*
- * Arguments:
- * pOpts program options descriptor
- * pzLine NUL-terminated text
- *
* This is a client program callable routine for setting options from, for
* example, the contents of a file that they read in. Only one option may
* appear in the text. It will be treated as a normal (non-preset) option.
- *
+ *
* When passed a pointer to the option struct and a string, it will find
* the option named by the first token on the string and set the option
* argument to the remainder of the string. The caller must NUL terminate
- * the string. Any embedded new lines will be included in the option
+ * the string. The caller need not skip over any introductory hyphens.
+ * Any embedded new lines will be included in the option
* argument. If the input looks like one or more quoted strings, then the
* input will be "cooked". The "cooking" is identical to the string
* formation used in AutoGen definition files (@pxref{basic expression}),
* except that you may not use backquotes.
+ *
+ * @param opts program options descriptor
+ * @param line NUL-terminated text
*/
extern void optionLoadLine(tOptions*, char const*);
-/* From: configfile.c line 340
+/**
+ * optionMemberList - Get the list of members of a bit mask set
*
- * optionNextValue - get the next value from a hierarchical list
+ * This converts the OPT_VALUE_name mask value to a allocated string.
+ * It is the caller's responsibility to free the string.
*
- * Arguments:
- * pOptValue a hierarchcal list value
- * pOldValue a value from this list
+ * @param od the set membership option description
*
- * Returns: const tOptionValue* - a compound value structure
+ * @return char* - the names of the set bits
+ */
+extern char* optionMemberList(tOptDesc *);
+
+
+/**
+ * optionNextValue - get the next value from a hierarchical list
*
* This routine will return the next entry after the entry passed in. At the
* end of the list, NULL will be returned. If the entry is not found on the
* list, NULL will be returned and "@var{errno}" will be set to EINVAL.
* The "@var{pOldValue}" must have been gotten from a prior call to this
* routine or to "@code{opitonGetValue()}".
+ *
+ * @param pOptValue a hierarchcal list value
+ * @param pOldValue a value from this list
+ *
+ * @return const tOptionValue* - a compound value structure
*/
extern const tOptionValue* optionNextValue(const tOptionValue*, const tOptionValue*);
-/* From: usage.c line 195
- *
+/**
* optionOnlyUsage - Print usage text for just the options
*
- * Arguments:
- * pOpts program options descriptor
- * ex_code exit code for calling exit(3)
- *
* This routine will print only the usage for each option.
* This function may be used when the emitted usage must incorporate
* information not available to AutoOpts.
+ *
+ * @param pOpts program options descriptor
+ * @param ex_code exit code for calling exit(3)
*/
extern void optionOnlyUsage(tOptions*, int);
-/* From: autoopts.c line 1065
+/**
+ * optionPrintVersion - Print the program version
*
- * optionProcess - this is the main option processing routine
+ * This routine will print the version to stdout.
*
- * Arguments:
- * pOpts program options descriptor
- * argc program arg count
- * argv program arg vector
+ * @param opts program options descriptor
+ * @param od the descriptor for this arg
+ */
+extern void optionPrintVersion(tOptions*, tOptDesc*);
+
+
+/**
+ * optionPrintVersionAndReturn - Print the program version
+ *
+ * This routine will print the version to stdout and return
+ * instead of exiting. Please see the source for the
+ * @code{print_ver} funtion for details on selecting how
+ * verbose to be after this function returns.
*
- * Returns: int - the count of the arguments processed
+ * @param opts program options descriptor
+ * @param od the descriptor for this arg
+ */
+extern void optionPrintVersionAndReturn(tOptions*, tOptDesc*);
+
+
+/**
+ * optionProcess - this is the main option processing routine
*
* This is the main entry point for processing options. It is intended
* that this procedure be called once at the beginning of the execution of
@@ -754,7 +991,7 @@ extern void optionOnlyUsage(tOptions*, int);
* necessary to stop and restart option processing, or to select completely
* different sets of options. This can be done easily, but you generally
* do not want to do this.
- *
+ *
* The number of arguments processed always includes the program name.
* If one of the arguments is "--", then it is counted and the processing
* stops. If an error was encountered and errors are to be tolerated, then
@@ -763,41 +1000,41 @@ extern void optionOnlyUsage(tOptions*, int);
* @emph{not} be counted among the processed arguments. A hyphen by itself
* is treated as an operand. Encountering an operand stops option
* processing.
+ *
+ * @param opts program options descriptor
+ * @param a_ct program arg count
+ * @param a_v program arg vector
+ *
+ * @return int - the count of the arguments processed
*/
extern int optionProcess(tOptions*, int, char**);
-/* From: restore.c line 123
- *
+/**
* optionRestore - restore option state from memory copy
*
- * Arguments:
- * pOpts program options descriptor
- *
* Copy back the option state from saved memory.
* The allocated memory is left intact, so this routine can be
* called repeatedly without having to call optionSaveState again.
* If you are restoring a state that was saved before the first call
* to optionProcess(3AO), then you may change the contents of the
* argc/argv parameters to optionProcess.
+ *
+ * @param pOpts program options descriptor
*/
extern void optionRestore(tOptions*);
-/* From: save.c line 664
- *
+/**
* optionSaveFile - saves the option state to a file
*
- * Arguments:
- * pOpts program options descriptor
- *
* This routine will save the state of option processing to a file. The name
* of that file can be specified with the argument to the @code{--save-opts}
* option, or by appending the @code{rcfile} attribute to the last
* @code{homerc} attribute. If no @code{rcfile} attribute was specified, it
* will default to @code{.@i{programname}rc}. If you wish to specify another
* file, you should invoke the @code{SET_OPT_SAVE_OPTS(@i{filename})} macro.
- *
+ *
* The recommend usage is as follows:
* @example
* optionProcess(&progOptions, argc, argv);
@@ -805,145 +1042,88 @@ extern void optionRestore(tOptions*);
* SET_OPT_SAVE_OPTS("myfilename");
* optionSaveFile(&progOptions);
* @end example
+ *
+ * @param opts program options descriptor
*/
extern void optionSaveFile(tOptions*);
-/* From: restore.c line 71
- *
+/**
* optionSaveState - saves the option state to memory
*
- * Arguments:
- * pOpts program options descriptor
- *
* This routine will allocate enough memory to save the current option
* processing state. If this routine has been called before, that memory
* will be reused. You may only save one copy of the option state. This
* routine may be called before optionProcess(3AO). If you do call it
* before the first call to optionProcess, then you may also change the
* contents of argc/argv after you call optionRestore(3AO)
- *
+ *
* In fact, more strongly put: it is safest to only use this function
* before having processed any options. In particular, the saving and
* restoring of stacked string arguments and hierarchical values is
* disabled. The values are not saved.
+ *
+ * @param pOpts program options descriptor
*/
extern void optionSaveState(tOptions*);
-/* From: nested.c line 551
- *
+/**
* optionUnloadNested - Deallocate the memory for a nested value
*
- * Arguments:
- * pOptVal the hierarchical value
- *
* A nested value needs to be deallocated. The pointer passed in should
* have been gotten from a call to @code{configFileLoad()} (See
* @pxref{libopts-configFileLoad}).
+ *
+ * @param pOptVal the hierarchical value
*/
extern void optionUnloadNested(tOptionValue const *);
-/* From: version.c line 31
- *
+/**
* optionVersion - return the compiled AutoOpts version number
*
- * Returns: char const* - the version string in constant memory
- *
* Returns the full version string compiled into the library.
* The returned string cannot be modified.
- */
-extern char const* optionVersion(void);
-
-
-/* From: ../compat/pathfind.c line 29
- *
- * pathfind - fild a file in a list of directories
- *
- * Arguments:
- * path colon separated list of search directories
- * file the name of the file to look for
- * mode the mode bits that must be set to match
- *
- * Returns: char* - the path to the located file
- *
- * the pathfind function is available only if HAVE_PATHFIND is not defined
*
- * pathfind looks for a a file with name "FILE" and "MODE" access
- * along colon delimited "PATH", and returns the full pathname as a
- * string, or NULL if not found. If "FILE" contains a slash, then
- * it is treated as a relative or absolute path and "PATH" is ignored.
- *
- * @strong{NOTE}: this function is compiled into @file{libopts} only if
- * it is not natively supplied.
- *
- * The "MODE" argument is a string of option letters chosen from the
- * list below:
- * @example
- * Letter Meaning
- * r readable
- * w writable
- * x executable
- * f normal file (NOT IMPLEMENTED)
- * b block special (NOT IMPLEMENTED)
- * c character special (NOT IMPLEMENTED)
- * d directory (NOT IMPLEMENTED)
- * p FIFO (pipe) (NOT IMPLEMENTED)
- * u set user ID bit (NOT IMPLEMENTED)
- * g set group ID bit (NOT IMPLEMENTED)
- * k sticky bit (NOT IMPLEMENTED)
- * s size nonzero (NOT IMPLEMENTED)
- * @end example
+ * @return char const* - the version string in constant memory
*/
-#ifndef HAVE_PATHFIND
-extern char* pathfind(char const*, char const*, char const*);
-#endif /* HAVE_PATHFIND */
+extern char const* optionVersion(void);
-/* From: streqvcmp.c line 209
- *
+/**
* strequate - map a list of characters to the same value
*
- * Arguments:
- * ch_list characters to equivalence
- *
* Each character in the input string get mapped to the first character
* in the string.
* This function name is mapped to option_strequate so as to not conflict
* with the POSIX name space.
+ *
+ * @param ch_list characters to equivalence
*/
extern void strequate(char const*);
-/* From: streqvcmp.c line 119
- *
+/**
* streqvcmp - compare two strings with an equivalence mapping
*
- * Arguments:
- * str1 first string
- * str2 second string
- *
- * Returns: int - the difference between two differing characters
- *
* Using a character mapping, two strings are compared for "equivalence".
* Each input character is mapped to a comparison character and the
* mapped-to characters are compared for the two NUL terminated input strings.
* This function name is mapped to option_streqvcmp so as to not conflict
* with the POSIX name space.
+ *
+ * @param str1 first string
+ * @param str2 second string
+ *
+ * @return int - the difference between two differing characters
*/
extern int streqvcmp(char const*, char const*);
-/* From: streqvcmp.c line 156
- *
+/**
* streqvmap - Set the character mappings for the streqv functions
*
- * Arguments:
- * From Input character
- * To Mapped-to character
- * ct compare length
- *
* Set the character mapping. If the count (@code{ct}) is set to zero, then
* the map is cleared by setting all entries in the map to their index
* value. Otherwise, the "@code{From}" character is mapped to the "@code{To}"
@@ -956,48 +1136,48 @@ extern int streqvcmp(char const*, char const*);
* @noindent
* will alter the mapping so that all English lower case letters
* will map to upper case.
- *
+ *
* This function name is mapped to option_streqvmap so as to not conflict
* with the POSIX name space.
+ *
+ * @param from Input character
+ * @param to Mapped-to character
+ * @param ct compare length
*/
extern void streqvmap(char, char, int);
-/* From: streqvcmp.c line 78
- *
+/**
* strneqvcmp - compare two strings with an equivalence mapping
*
- * Arguments:
- * str1 first string
- * str2 second string
- * ct compare length
- *
- * Returns: int - the difference between two differing characters
- *
* Using a character mapping, two strings are compared for "equivalence".
* Each input character is mapped to a comparison character and the
* mapped-to characters are compared for the two NUL terminated input strings.
* The comparison is limited to @code{ct} bytes.
* This function name is mapped to option_strneqvcmp so as to not conflict
* with the POSIX name space.
+ *
+ * @param str1 first string
+ * @param str2 second string
+ * @param ct compare length
+ *
+ * @return int - the difference between two differing characters
*/
extern int strneqvcmp(char const*, char const*, int);
-/* From: streqvcmp.c line 235
- *
+/**
* strtransform - convert a string into its mapped-to value
*
- * Arguments:
- * dest output string
- * src input string
- *
* Each character in the input string is mapped and the mapped-to
* character is put into the output.
* This function name is mapped to option_strtransform so as to not conflict
* with the POSIX name space.
- *
+ *
* The source and destination may be the same.
+ *
+ * @param dest output string
+ * @param src input string
*/
extern void strtransform(char*, char const*);
@@ -1010,6 +1190,8 @@ extern unsigned int ao_string_cook_escape_char(char const*, char*, unsigned int)
extern void genshelloptUsage(tOptions*, int);
+extern int optionAlias(tOptions *, tOptDesc *, unsigned int);
+
extern void optionBooleanVal(tOptions*, tOptDesc*);
extern uintptr_t optionEnumerationVal(tOptions*, tOptDesc*, char const * const *, unsigned int);
@@ -1020,20 +1202,22 @@ extern char const * optionKeywordName(tOptDesc*, unsigned int);
extern void optionLoadOpt(tOptions*, tOptDesc*);
-extern ag_bool optionMakePath(char*, int, char const*, char const*);
+extern bool optionMakePath(char*, int, char const*, char const*);
extern void optionNestedVal(tOptions*, tOptDesc*);
extern void optionNumericVal(tOptions*, tOptDesc*);
-extern void optionPagedUsage(tOptions*, tOptDesc*);
+extern void optionPagedUsage(tOptions *, tOptDesc *);
extern void optionParseShell(tOptions*);
-extern void optionPrintVersion(tOptions*, tOptDesc*);
+extern void optionPrintParagraphs(char const *, bool, FILE *);
extern void optionPutShell(tOptions*);
+extern char const * optionQuoteString(char const *, char const *);
+
extern void optionResetOpt(tOptions*, tOptDesc*);
extern void optionSetMembers(tOptions*, tOptDesc*, char const * const *, unsigned int);
@@ -1050,6 +1234,8 @@ extern void optionUnstackArg(tOptions*, tOptDesc*);
extern void optionUsage(tOptions*, int);
+extern void optionVendorOption(tOptions *, tOptDesc *);
+
extern void optionVersionStderr(tOptions*, tOptDesc*);
extern void* text_mmap(char const*, int, int, tmap_info_t*);
@@ -1058,7 +1244,8 @@ extern int text_munmap(tmap_info_t*);
CPLUSPLUS_CLOSER
#endif /* AUTOOPTS_OPTIONS_H_GUARD */
-/*
+/** @}
+ *
* Local Variables:
* c-file-style: "stroustrup"
* indent-tabs-mode: nil
diff --git a/sntp/libopts/autoopts/project.h b/sntp/libopts/autoopts/project.h
index b01affbc19e2..c61a6ca78580 100644
--- a/sntp/libopts/autoopts/project.h
+++ b/sntp/libopts/autoopts/project.h
@@ -1,8 +1,34 @@
+/**
+ * \file project.h
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
#ifndef AUTOGEN_PROJECT_H
#define AUTOGEN_PROJECT_H
#include "config.h"
+#include "compat/compat.h"
+#include "ag-char-map.h"
/*
* Procedure success codes
@@ -37,8 +63,6 @@ typedef int tSuccess;
# define STR(s) __STR(s)
#endif
-#define STRSIZE(s) (sizeof(s)-1)
-
#ifdef DEFINING
# define VALUE(s) = s
# define MODE
@@ -47,4 +71,7 @@ typedef int tSuccess;
# define MODE extern
#endif
+#define parse_duration option_parse_duration
+
#endif /* AUTOGEN_PROJECT_H */
+/* end of project.h */
diff --git a/sntp/libopts/autoopts/usage-txt.h b/sntp/libopts/autoopts/usage-txt.h
index de92663424b9..0c72d32d5c22 100644
--- a/sntp/libopts/autoopts/usage-txt.h
+++ b/sntp/libopts/autoopts/usage-txt.h
@@ -1,421 +1,657 @@
-/* -*- buffer-read-only: t -*- vi: set ro:
- *
- * DO NOT EDIT THIS FILE (usage-txt.h)
- *
- * It has been AutoGen-ed April 29, 2011 at 03:44:00 PM by AutoGen 5.11.9
- * From the definitions usage-txt.def
- * and the template file usage-txt.tpl
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (usage-txt.h)
+ *
+ * It has been AutoGen-ed August 3, 2014 at 10:44:44 AM by AutoGen 5.18.4pre11
+ * From the definitions usage-txt.def
+ * and the template file usage-txt.tpl
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+/** @file usage-txt.h
*
* This file handles all the bookkeeping required for tracking all the little
- * tiny strings used by the AutoOpts library. There are 142
+ * tiny strings used by the AutoOpts library. There are 108
* of them. This is not versioned because it is entirely internal to the
* library and accessed by client code only in a very well-controlled way:
* they may substitute translated strings using a procedure that steps through
* all the string pointers.
- *
- * AutoOpts is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AutoOpts 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.";
-
*/
#ifndef AUTOOPTS_USAGE_TXT_H_GUARD
#define AUTOOPTS_USAGE_TXT_H_GUARD 1
-#undef cch_t
-#define cch_t char const
-
/*
- * One structure to hold all the pointers to all the stringlets.
+ * One structure to hold all the pointers to all the translatable strings.
*/
typedef struct {
- int field_ct;
- char* utpz_GnuBoolArg;
- char* utpz_GnuKeyArg;
- char* utpz_GnuFileArg;
- char* utpz_GnuKeyLArg;
- char* utpz_GnuTimeArg;
- char* utpz_GnuNumArg;
- char* utpz_GnuStrArg;
- cch_t* apz_str[ 135 ];
+ int field_ct;
+ char * utpz_GnuBoolArg;
+ char * utpz_GnuKeyArg;
+ char * utpz_GnuNumArg;
+ char * utpz_GnuStrArg;
+ char const * apz_str[104];
} usage_text_t;
/*
- * Declare the global structure with all the pointers to translated
- * strings. This is then used by the usage generation procedure.
+ * Declare the global structure with all the pointers to translatable
+ * strings and the text array containing untranslatable strings.
*/
-extern usage_text_t option_usage_text;
+extern usage_text_t option_xlateable_txt;
+extern char const option_lib_text[4285];
-#if defined(AUTOOPTS_INTERNAL) /* DEFINE ALL THE STRINGS = = = = = */
+#if defined(AUTOOPTS_INTERNAL)
/*
- * Provide a mapping from a short name to fields in this structure.
+ * Provide a mapping from a short name to either the text directly
+ * (for untranslatable strings), or to pointers to the text, rendering
+ * them translatable.
*/
-#define zAO_Alloc (option_usage_text.apz_str[ 0])
-#define zAO_Bad (option_usage_text.apz_str[ 1])
-#define zAO_Big (option_usage_text.apz_str[ 2])
-#define zAO_Err (option_usage_text.apz_str[ 3])
-#define zAO_Realloc (option_usage_text.apz_str[ 4])
-#define zAO_Sml (option_usage_text.apz_str[ 5])
-#define zAO_Strdup (option_usage_text.apz_str[ 6])
-#define zAO_Ver (option_usage_text.apz_str[ 7])
-#define zAO_Woops (option_usage_text.apz_str[ 8])
-#define zAliasRange (option_usage_text.apz_str[ 9])
-#define zAll (option_usage_text.apz_str[ 10])
-#define zAlt (option_usage_text.apz_str[ 11])
-#define zAmbigKey (option_usage_text.apz_str[ 12])
-#define zAmbigOptStr (option_usage_text.apz_str[ 13])
-#define zArgsMust (option_usage_text.apz_str[ 14])
-#define zAtMost (option_usage_text.apz_str[ 15])
-#define zAuto (option_usage_text.apz_str[ 16])
-#define zBadPipe (option_usage_text.apz_str[ 17])
-#define zBadVerArg (option_usage_text.apz_str[ 18])
-#define zCantFmt (option_usage_text.apz_str[ 19])
-#define zCantSave (option_usage_text.apz_str[ 20])
-#define zCfgAO_Flags (option_usage_text.apz_str[ 21])
-#define zCfgProg (option_usage_text.apz_str[ 22])
-#define zDefaultOpt (option_usage_text.apz_str[ 23])
-#define zDis (option_usage_text.apz_str[ 24])
-#define zDisabledErr (option_usage_text.apz_str[ 25])
-#define zDisabledOpt (option_usage_text.apz_str[ 26])
-#define zDisabledWhy (option_usage_text.apz_str[ 27])
-#define zEnab (option_usage_text.apz_str[ 28])
-#define zEquiv (option_usage_text.apz_str[ 29])
-#define zErrOnly (option_usage_text.apz_str[ 30])
-#define zExamineFmt (option_usage_text.apz_str[ 31])
-#define zFiveSpaces (option_usage_text.apz_str[ 32])
-#define zFlagOkay (option_usage_text.apz_str[ 33])
-#define zFmtFmt (option_usage_text.apz_str[ 34])
-#define zForkFail (option_usage_text.apz_str[ 35])
-#define zFreopenFail (option_usage_text.apz_str[ 36])
-#define zFSErrOptLoad (option_usage_text.apz_str[ 37])
-#define zFSErrReadFile (option_usage_text.apz_str[ 38])
-#define zFSOptError (option_usage_text.apz_str[ 39])
-#define zFSOptErrMayExist (option_usage_text.apz_str[ 40])
-#define zFSOptErrMustExist (option_usage_text.apz_str[ 41])
-#define zFSOptErrNoExist (option_usage_text.apz_str[ 42])
-#define zFSOptErrOpen (option_usage_text.apz_str[ 43])
-#define zFSOptErrFopen (option_usage_text.apz_str[ 44])
-#define zFileCannotExist (option_usage_text.apz_str[ 45])
-#define zFileMustExist (option_usage_text.apz_str[ 46])
-#define zGenshell (option_usage_text.apz_str[ 47])
-#define zGnuBoolArg (option_usage_text.utpz_GnuBoolArg)
-#define zGnuBreak (option_usage_text.apz_str[ 48])
-#define zGnuKeyArg (option_usage_text.utpz_GnuKeyArg)
-#define zGnuFileArg (option_usage_text.utpz_GnuFileArg)
-#define zGnuKeyLArg (option_usage_text.utpz_GnuKeyLArg)
-#define zGnuTimeArg (option_usage_text.utpz_GnuTimeArg)
-#define zGnuNestArg (option_usage_text.apz_str[ 49])
-#define zGnuNumArg (option_usage_text.utpz_GnuNumArg)
-#define zGnuOptArg (option_usage_text.apz_str[ 50])
-#define zGnuOptFmt (option_usage_text.apz_str[ 51])
-#define zGnuStrArg (option_usage_text.utpz_GnuStrArg)
-#define zIllOptChr (option_usage_text.apz_str[ 52])
-#define zIllOptStr (option_usage_text.apz_str[ 53])
-#define zIllegal (option_usage_text.apz_str[ 54])
-#define zIntRange (option_usage_text.apz_str[ 55])
-#define zInvalOptDesc (option_usage_text.apz_str[ 56])
-#define zLowerBits (option_usage_text.apz_str[ 57])
-#define zMembers (option_usage_text.apz_str[ 58])
-#define zMisArg (option_usage_text.apz_str[ 59])
-#define zMultiEquiv (option_usage_text.apz_str[ 60])
-#define zMust (option_usage_text.apz_str[ 61])
-#define zNeedOne (option_usage_text.apz_str[ 62])
-#define zNoArg (option_usage_text.apz_str[ 63])
-#define zNoArgv (option_usage_text.apz_str[ 64])
-#define zNoArgs (option_usage_text.apz_str[ 65])
-#define zNoCreat (option_usage_text.apz_str[ 66])
-#define zNoFlags (option_usage_text.apz_str[ 67])
-#define zNoKey (option_usage_text.apz_str[ 68])
-#define zNoLim (option_usage_text.apz_str[ 69])
-#define zNoPreset (option_usage_text.apz_str[ 70])
-#define zNoResetArg (option_usage_text.apz_str[ 71])
-#define zNoRq_NoShrtTtl (option_usage_text.apz_str[ 72])
-#define zNoRq_ShrtTtl (option_usage_text.apz_str[ 73])
-#define zNoStat (option_usage_text.apz_str[ 74])
-#define zNoState (option_usage_text.apz_str[ 75])
-#define zNone (option_usage_text.apz_str[ 76])
-#define zNotDef (option_usage_text.apz_str[ 77])
-#define zNotCmdOpt (option_usage_text.apz_str[ 78])
-#define zNotEnough (option_usage_text.apz_str[ 79])
-#define zNotFile (option_usage_text.apz_str[ 80])
-#define zNotNumber (option_usage_text.apz_str[ 81])
-#define zNotDate (option_usage_text.apz_str[ 82])
-#define zNotDuration (option_usage_text.apz_str[ 83])
-#define zNrmOptFmt (option_usage_text.apz_str[ 84])
-#define zNumberOpt (option_usage_text.apz_str[ 85])
-#define zOneSpace (option_usage_text.apz_str[ 86])
-#define zOnlyOne (option_usage_text.apz_str[ 87])
-#define zOptsOnly (option_usage_text.apz_str[ 88])
-#define zOutputFail (option_usage_text.apz_str[ 89])
-#define zPathFmt (option_usage_text.apz_str[ 90])
-#define zPlsSendBugs (option_usage_text.apz_str[ 91])
-#define zPreset (option_usage_text.apz_str[ 92])
-#define zPresetFile (option_usage_text.apz_str[ 93])
-#define zPresetIntro (option_usage_text.apz_str[ 94])
-#define zProhib (option_usage_text.apz_str[ 95])
-#define zReorder (option_usage_text.apz_str[ 96])
-#define zRange (option_usage_text.apz_str[ 97])
-#define zRangeAbove (option_usage_text.apz_str[ 98])
-#define zRangeLie (option_usage_text.apz_str[ 99])
-#define zRangeOnly (option_usage_text.apz_str[100])
-#define zRangeOr (option_usage_text.apz_str[101])
-#define zRangeErr (option_usage_text.apz_str[102])
-#define zRangeExact (option_usage_text.apz_str[103])
-#define zRangeScaled (option_usage_text.apz_str[104])
-#define zRangeUpto (option_usage_text.apz_str[105])
-#define zResetNotConfig (option_usage_text.apz_str[106])
-#define zReqFmt (option_usage_text.apz_str[107])
-#define zReqOptFmt (option_usage_text.apz_str[108])
-#define zReqThese (option_usage_text.apz_str[109])
-#define zReq_NoShrtTtl (option_usage_text.apz_str[110])
-#define zReq_ShrtTtl (option_usage_text.apz_str[111])
-#define zSepChars (option_usage_text.apz_str[112])
-#define zSetMemberSettings (option_usage_text.apz_str[113])
-#define zShrtGnuOptFmt (option_usage_text.apz_str[114])
-#define zSixSpaces (option_usage_text.apz_str[115])
-#define zStdBoolArg (option_usage_text.apz_str[116])
-#define zStdBreak (option_usage_text.apz_str[117])
-#define zStdFileArg (option_usage_text.apz_str[118])
-#define zStdKeyArg (option_usage_text.apz_str[119])
-#define zStdKeyLArg (option_usage_text.apz_str[120])
-#define zStdTimeArg (option_usage_text.apz_str[121])
-#define zStdNestArg (option_usage_text.apz_str[122])
-#define zStdNoArg (option_usage_text.apz_str[123])
-#define zStdNumArg (option_usage_text.apz_str[124])
-#define zStdOptArg (option_usage_text.apz_str[125])
-#define zStdReqArg (option_usage_text.apz_str[126])
-#define zStdStrArg (option_usage_text.apz_str[127])
-#define zTabHyp (option_usage_text.apz_str[128])
-#define zTabHypAnd (option_usage_text.apz_str[129])
-#define zTabout (option_usage_text.apz_str[130])
-#define zThreeSpaces (option_usage_text.apz_str[131])
-#define zTwoSpaces (option_usage_text.apz_str[132])
-#define zUpTo (option_usage_text.apz_str[133])
-#define zValidKeys (option_usage_text.apz_str[134])
+#define zalloc_fail (option_xlateable_txt.apz_str[ 0])
+#define zno_opt_arg (option_xlateable_txt.apz_str[ 1])
+#define ztoo_new (option_xlateable_txt.apz_str[ 2])
+#define zwrong_ver (option_xlateable_txt.apz_str[ 3])
+#define zrealloc_fail (option_xlateable_txt.apz_str[ 4])
+#define ztoo_old (option_xlateable_txt.apz_str[ 5])
+#define zao_ver_fmt (option_xlateable_txt.apz_str[ 6])
+#define zao_bug_msg (option_xlateable_txt.apz_str[ 7])
+#define zno_reset (option_xlateable_txt.apz_str[ 8])
+#define zmissing_help_msg (option_xlateable_txt.apz_str[ 9])
+#define zbad_data_msg (option_xlateable_txt.apz_str[ 10])
+#define zbad_arg_type_msg (option_xlateable_txt.apz_str[ 11])
+#define zbad_default_msg (option_xlateable_txt.apz_str[ 12])
+#define zbad_alias_id (option_xlateable_txt.apz_str[ 13])
+#define zambiguous_key (option_xlateable_txt.apz_str[ 14])
+#define zambig_list_msg (option_xlateable_txt.apz_str[ 15])
+#define zambig_opt_fmt (option_xlateable_txt.apz_str[ 16])
+#define zargs_must (option_xlateable_txt.apz_str[ 17])
+#define zat_most (option_xlateable_txt.apz_str[ 18])
+#define zfserr_fmt (option_xlateable_txt.apz_str[ 19])
+#define zinter_proc_pipe (option_xlateable_txt.apz_str[ 20])
+#define zBadVerArg (option_xlateable_txt.apz_str[ 21])
+#define zconflict_fmt (option_xlateable_txt.apz_str[ 22])
+#define zDisabledErr (option_xlateable_txt.apz_str[ 23])
+#define zequiv (option_xlateable_txt.apz_str[ 24])
+#define zGnuBoolArg (option_xlateable_txt.utpz_GnuBoolArg)
+#define zGnuKeyArg (option_xlateable_txt.utpz_GnuKeyArg)
+#define zGnuNumArg (option_xlateable_txt.utpz_GnuNumArg)
+#define zGnuStrArg (option_xlateable_txt.utpz_GnuStrArg)
+#define zIllOptChr (option_xlateable_txt.apz_str[ 25])
+#define zIllOptStr (option_xlateable_txt.apz_str[ 26])
+#define zIllVendOptStr (option_xlateable_txt.apz_str[ 27])
+#define zIntRange (option_xlateable_txt.apz_str[ 28])
+#define zbad_od (option_xlateable_txt.apz_str[ 29])
+#define zInvalOptName (option_xlateable_txt.apz_str[ 30])
+#define zMisArg (option_xlateable_txt.apz_str[ 31])
+#define zmultiway_bug (option_xlateable_txt.apz_str[ 32])
+#define zneed_one (option_xlateable_txt.apz_str[ 33])
+#define zNoArg (option_xlateable_txt.apz_str[ 34])
+#define zNoArgs (option_xlateable_txt.apz_str[ 35])
+#define zNoCreat (option_xlateable_txt.apz_str[ 36])
+#define zNoKey (option_xlateable_txt.apz_str[ 37])
+#define zreset_arg (option_xlateable_txt.apz_str[ 38])
+#define zNoStat (option_xlateable_txt.apz_str[ 39])
+#define zNoState (option_xlateable_txt.apz_str[ 40])
+#define zNotCmdOpt (option_xlateable_txt.apz_str[ 41])
+#define zNotDate (option_xlateable_txt.apz_str[ 42])
+#define zNotDef (option_xlateable_txt.apz_str[ 43])
+#define zNotDuration (option_xlateable_txt.apz_str[ 44])
+#define zneed_more (option_xlateable_txt.apz_str[ 45])
+#define zNotNumber (option_xlateable_txt.apz_str[ 46])
+#define znum_too_large (option_xlateable_txt.apz_str[ 47])
+#define zoffer_usage_fmt (option_xlateable_txt.apz_str[ 48])
+#define zonly_one (option_xlateable_txt.apz_str[ 49])
+#define zstdout_name (option_xlateable_txt.apz_str[ 50])
+#define zstderr_name (option_xlateable_txt.apz_str[ 51])
+#define zwriting (option_xlateable_txt.apz_str[ 52])
+#define zRangeErr (option_xlateable_txt.apz_str[ 53])
+#define zneed_fmt (option_xlateable_txt.apz_str[ 54])
+#define zsave_warn (option_xlateable_txt.apz_str[ 55])
+#define zalt_opt (option_xlateable_txt.apz_str[ 56])
+#define zAuto (option_xlateable_txt.apz_str[ 57])
+#define zDefaultOpt (option_xlateable_txt.apz_str[ 58])
+#define zDis (option_xlateable_txt.apz_str[ 59])
+#define zDisabledOpt (option_xlateable_txt.apz_str[ 60])
+#define zDisabledWhy (option_xlateable_txt.apz_str[ 61])
+#define zEnab (option_xlateable_txt.apz_str[ 62])
+#define ztoo_often_fmt (option_xlateable_txt.apz_str[ 63])
+#define zExamineFmt (option_xlateable_txt.apz_str[ 64])
+#define zFileCannotExist (option_xlateable_txt.apz_str[ 65])
+#define zFileMustExist (option_xlateable_txt.apz_str[ 66])
+#define zFlagOkay (option_xlateable_txt.apz_str[ 67])
+#define zGenshell (option_xlateable_txt.apz_str[ 68])
+#define zLowerBits (option_xlateable_txt.apz_str[ 69])
+#define zMembers (option_xlateable_txt.apz_str[ 70])
+#define zMust (option_xlateable_txt.apz_str[ 71])
+#define zNoFlags (option_xlateable_txt.apz_str[ 72])
+#define zNoLim (option_xlateable_txt.apz_str[ 73])
+#define zNoPreset (option_xlateable_txt.apz_str[ 74])
+#define zNoRq_NoShrtTtl (option_xlateable_txt.apz_str[ 75])
+#define zNoRq_ShrtTtl (option_xlateable_txt.apz_str[ 76])
+#define zNrmOptFmt (option_xlateable_txt.apz_str[ 77])
+#define zNumberOpt (option_xlateable_txt.apz_str[ 78])
+#define zOptsOnly (option_xlateable_txt.apz_str[ 79])
+#define zPathFmt (option_xlateable_txt.apz_str[ 80])
+#define zPlsSendBugs (option_xlateable_txt.apz_str[ 81])
+#define zPreset (option_xlateable_txt.apz_str[ 82])
+#define zPresetIntro (option_xlateable_txt.apz_str[ 83])
+#define zProhib (option_xlateable_txt.apz_str[ 84])
+#define zProhibOne (option_xlateable_txt.apz_str[ 85])
+#define zRange (option_xlateable_txt.apz_str[ 86])
+#define zRangeAbove (option_xlateable_txt.apz_str[ 87])
+#define zRangeExact (option_xlateable_txt.apz_str[ 88])
+#define zRangeLie (option_xlateable_txt.apz_str[ 89])
+#define zRangeOnly (option_xlateable_txt.apz_str[ 90])
+#define zRangeOr (option_xlateable_txt.apz_str[ 91])
+#define zRangeScaled (option_xlateable_txt.apz_str[ 92])
+#define zRangeUpto (option_xlateable_txt.apz_str[ 93])
+#define zReorder (option_xlateable_txt.apz_str[ 94])
+#define zReqOne (option_xlateable_txt.apz_str[ 95])
+#define zReqThese (option_xlateable_txt.apz_str[ 96])
+#define zReq_NoShrtTtl (option_xlateable_txt.apz_str[ 97])
+#define zReq_ShrtTtl (option_xlateable_txt.apz_str[ 98])
+#define zSetMemberSettings (option_xlateable_txt.apz_str[ 99])
+#define zUpTo (option_xlateable_txt.apz_str[100])
+#define zValidKeys (option_xlateable_txt.apz_str[101])
+#define zVendIntro (option_xlateable_txt.apz_str[102])
+#define zVendOptsAre (option_xlateable_txt.apz_str[103])
/*
* First, set up the strings. Some of these are writable. These are all in
* English. This gets compiled into libopts and is distributed here so that
* xgettext (or equivalents) can extract these strings for translation.
*/
+static char eng_zGnuBoolArg[] = "=T/F";
+static char eng_zGnuKeyArg[] = "=KWd";
+static char eng_zGnuNumArg[] = "=num";
+static char eng_zGnuStrArg[] = "=str";
+char const option_lib_text[4285] =
+/* 0 */ "allocation of %d bytes failed\n\0"
+/* 31 */ "AutoOpts function called without option descriptor\n\0"
+/* 83 */ "\tThis exceeds the compiled library version: \0"
+/* 129 */ "Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n\0"
+/* 228 */ "realloc of %d bytes at 0x%p failed\n\0"
+/* 264 */ "\tThis is less than the minimum library version: \0"
+/* 314 */ "Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n\0"
+/* 405 */ "(AutoOpts bug): %s.\n\0"
+/* 427 */ "optionResetOpt() called, but reset-option not configured\0"
+/* 484 */ "could not locate the 'help' option\0"
+/* 519 */ "optionProcess() was called with invalid data\0"
+/* 564 */ "invalid argument type specified\0"
+/* 596 */ "defaulted to option with optional arg\0"
+/* 634 */ "aliasing option is out of range.\0"
+/* 667 */ "%s error: the keyword '%s' is ambiguous for %s\n\0"
+/* 716 */ " The following options match:\n\0"
+/* 748 */ "%s: ambiguous option name: %s (matches %d options)\n\0"
+/* 800 */ "%s: Command line arguments required\n\0"
+/* 837 */ "%d %s%s options allowed\n\0"
+/* 862 */ "%s error %d (%s) calling %s for '%s'\n\0"
+/* 900 */ "interprocess pipe\0"
+/* 918 */ "error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n\0"
+/* 1060 */ "%s error: the '%s' and '%s' options conflict\n\0"
+/* 1107 */ "%s: The '%s' option has been disabled.\0"
+/* 1146 */ "-equivalence\0"
+/* 1159 */ "%s: illegal option -- %c\n\0"
+/* 1185 */ "%s: illegal option -- %s\n\0"
+/* 1211 */ "%s: unknown vendor extension option -- %s\n\0"
+/* 1254 */ " or an integer from %d through %d\n\0"
+/* 1290 */ "%s error: invalid option descriptor for %s\n\0"
+/* 1335 */ "%s: invalid option name: %s\n\0"
+/* 1364 */ "%s: The '%s' option requires an argument.\n\0"
+/* 1407 */ "(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'.\0"
+/* 1490 */ "%s error: The %s option is required\n\0"
+/* 1528 */ "%s: The '%s' option cannot have an argument.\n\0"
+/* 1574 */ "%s: Command line arguments are not allowed.\n\0"
+/* 1619 */ "error %d (%s) creating %s\n\0"
+/* 1646 */ "%s error: '%s' does not match any %s keywords.\n\0"
+/* 1695 */ "%s error: The '%s' option requires an argument.\n\0"
+/* 1744 */ "error %d (%s) stat-ing %s\n\0"
+/* 1771 */ "%s error: no saved option state\n\0"
+/* 1804 */ "'%s' is not a command line option.\n\0"
+/* 1840 */ "%s error: '%s' is not a recognizable date/time.\n\0"
+/* 1890 */ "'%s' not defined\n\0"
+/* 1908 */ "%s error: '%s' is not a recognizable time duration.\n\0"
+/* 1962 */ "%s error: The %s option must appear %d times.\n\0"
+/* 2010 */ "%s error: '%s' is not a recognizable number.\n\0"
+/* 2057 */ "%s error: %s exceeds %s keyword count\n\0"
+/* 2097 */ "Try '%s %s' for more information.\n\0"
+/* 2132 */ "one %s%s option allowed\n\0"
+/* 2157 */ "standard output\0"
+/* 2173 */ "standard error\0"
+/* 2188 */ "write\0"
+/* 2194 */ "%s error: %s option value %ld is out of range.\n\0"
+/* 2243 */ "%s error: %s option requires the %s option\n\0"
+/* 2288 */ "%s warning: cannot save options - %s not regular file\n\0"
+/* 2344 */ "\t\t\t\t- an alternate for '%s'\n\0"
+/* 2373 */ "Version, usage and configuration options:\0"
+/* 2415 */ "\t\t\t\t- default option for unnamed options\n\0"
+/* 2457 */ "\t\t\t\t- disabled as '--%s'\n\0"
+/* 2483 */ " --- %-14s %s\n\0"
+/* 2498 */ "This option has been disabled\0"
+/* 2528 */ "\t\t\t\t- enabled by default\n\0"
+/* 2554 */ "%s error: only \0"
+/* 2571 */ " - examining environment variables named %s_*\n\0"
+/* 2618 */ "\t\t\t\t- file must not pre-exist\n\0"
+/* 2649 */ "\t\t\t\t- file must pre-exist\n\0"
+/* 2676 */ "Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n\0"
+/* 2779 */ "\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n\0"
+/* 2885 */ " or an integer mask with any of the lower %d bits set\n\0"
+/* 2941 */ "\t\t\t\t- is a set membership option\n\0"
+/* 2975 */ "\t\t\t\t- must appear between %d and %d times\n\0"
+/* 3018 */ "Options are specified by single or double hyphens and their name.\n\0"
+/* 3085 */ "\t\t\t\t- may appear multiple times\n\0"
+/* 3118 */ "\t\t\t\t- may not be preset\n\0"
+/* 3143 */ " Arg Option-Name Description\n\0"
+/* 3178 */ " Flg Arg Option-Name Description\n\0"
+/* 3216 */ " %3s %s\0"
+/* 3224 */ "The '-#<number>' option may omit the hash char\n\0"
+/* 3272 */ "All arguments are named options.\n\0"
+/* 3306 */ " - reading file %s\0"
+/* 3325 */ "\n"
+ "Please send bug reports to: <%s>\n\0"
+/* 3361 */ "\t\t\t\t- may NOT appear - preset only\n\0"
+/* 3397 */ "\n"
+ "The following option preset mechanisms are supported:\n\0"
+/* 3453 */ "prohibits these options:\n\0"
+/* 3479 */ "prohibits the option '%s'\n\0"
+/* 3506 */ "%s%ld to %ld\0"
+/* 3519 */ "%sgreater than or equal to %ld\0"
+/* 3550 */ "%s%ld exactly\0"
+/* 3564 */ "%sit must lie in one of the ranges:\n\0"
+/* 3601 */ "%sit must be in the range:\n\0"
+/* 3629 */ ", or\n\0"
+/* 3635 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
+/* 3681 */ "%sless than or equal to %ld\0"
+/* 3709 */ "Operands and options may be intermixed. They will be reordered.\n\0"
+/* 3775 */ "requires the option '%s'\n\0"
+/* 3801 */ "requires these options:\n\0"
+/* 3826 */ " Arg Option-Name Req? Description\n\0"
+/* 3866 */ " Flg Arg Option-Name Req? Description\n\0"
+/* 3909 */ "or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n\0"
+/* 4128 */ "\t\t\t\t- may appear up to %d times\n\0"
+/* 4161 */ "The valid \"%s\" option keywords are:\n\0"
+/* 4198 */ "The next option supports vendor supported extra options:\0"
+/* 4255 */ "These additional options are:";
- static char eng_zGnuBoolArg[] = "=T/F";
- static char eng_zGnuKeyArg[] = "=KWd";
- static char eng_zGnuFileArg[] = "=file";
- static char eng_zGnuKeyLArg[] = "=Mbr";
- static char eng_zGnuTimeArg[] = "=Tim";
- static char eng_zGnuNumArg[] = "=num";
- static char eng_zGnuStrArg[] = "=str";
-static char const usage_txt[4435] =
- "malloc of %d bytes failed\n\0"
- "AutoOpts function called without option descriptor\n\0"
- "\tThis exceeds the compiled library version: \0"
- "Automated Options Processing Error!\n"
- "\t%s called AutoOpts function with structure version %d:%d:%d.\n\0"
- "realloc of %d bytes at 0x%p failed\n\0"
- "\tThis is less than the minimum library version: \0"
- "strdup of %d byte string failed\n\0"
- "Automated Options version %s\n"
- "\tcopyright (c) 1999-2011 by Bruce Korb - all rights reserved\n\0"
- "AutoOpts lib error: defaulted to option with optional arg\n\0"
- "(AutoOpts bug): Aliasing option is out of range.\0"
- "all\0"
- "\t\t\t\t- an alternate for %s\n\0"
- "%s error: the keyword `%s' is ambiguous for %s\n\0"
- "%s: ambiguous option -- %s\n\0"
- "%s: Command line arguments required\n\0"
- "%d %s%s options allowed\n\0"
- "version and help options:\0"
- "Error %d (%s) from the pipe(2) syscall\n\0"
- "ERROR: version option argument '%c' invalid. Use:\n"
- "\t'v' - version only\n"
- "\t'c' - version and copyright\n"
- "\t'n' - version and copyright notice\n\0"
- "ERROR: %s option conflicts with the %s option\n\0"
- "%s(optionSaveState): error: cannot allocate %d bytes\n\0"
- "auto-options\0"
- "program\0"
- "\t\t\t\t- default option for unnamed options\n\0"
- "\t\t\t\t- disabled as --%s\n\0"
- "%s: The ``%s'' option has been disabled\0"
- " --- %-14s %s\n\0"
- "This option has been disabled\0"
- "\t\t\t\t- enabled by default\n\0"
- "-equivalence\0"
- "ERROR: only \0"
- " - examining environment variables named %s_*\n\0"
- " \0"
- "Options are specified by doubled hyphens and their name or by a single\n"
- "hyphen and the flag character.\n\0"
- "%%-%ds %%s\n\0"
- "fs error %d (%s) on fork - cannot obtain %s usage\n\0"
- "fs error %d (%s) on freopen\n\0"
- "File error %d (%s) opening %s for loading options\n\0"
- "fs error %d (%s) reading file %s\n\0"
- "fs error %d (%s) on %s %s for option %s\n\0"
- "stat-ing for directory\0"
- "stat-ing for regular file\0"
- "stat-ing for non-existant file\0"
- "open-ing file\0"
- "fopen-ing file\0"
- "\t\t\t\t- file must not pre-exist\n\0"
- "\t\t\t\t- file must pre-exist\n\0"
- "\n"
- "= = = = = = = =\n\n"
- "This incarnation of genshell will produce\n"
- "a shell script to parse the options for %s:\n\n\0"
- "\n"
- "%s\n\n\0"
- "=Cplx\0"
- "[=arg]\0"
- "--%2$s%1$s\0"
- "%s: illegal option -- %c\n\0"
- "%s: illegal option -- %s\n\0"
- "illegal\0"
- " or an integer from %d through %d\n\0"
- "AutoOpts ERROR: invalid option descriptor for %s\n\0"
- " or an integer mask with any of the lower %d bits set\n\0"
- "\t\t\t\t- is a set membership option\n\0"
- "%s: option `%s' requires an argument\n\0"
- "Equivalenced option '%s' was equivalenced to both\n"
- "\t'%s' and '%s'\0"
- "\t\t\t\t- must appear between %d and %d times\n\0"
- "ERROR: The %s option is required\n\0"
- "%s: option `%s' cannot have an argument\n\0"
- "%s: cannot allocate new argument vector\n\0"
- "%s: Command line arguments not allowed\n\0"
- "error %d (%s) creating %s\n\0"
- "Options are specified by single or double hyphens and their name.\n\0"
- "%s error: `%s' does not match any %s keywords\n\0"
- "\t\t\t\t- may appear multiple times\n\0"
- "\t\t\t\t- may not be preset\n\0"
- "The 'reset-option' option requires an argument\n\0"
- " Arg Option-Name Description\n\0"
- " Flg Arg Option-Name Description\n\0"
- "error %d (%s) stat-ing %s\n\0"
- "%s(optionRestore): error: no saved option state\n\0"
- "none\0"
- "'%s' not defined\n\0"
- "'%s' is not a command line option\n\0"
- "ERROR: The %s option must appear %d times\n\0"
- "error: cannot load options from non-regular file %s\n\0"
- "%s error: `%s' is not a recognizable number\n\0"
- "%s error: `%s' is not a recognizable date/time\n\0"
- "%s error: `%s' is not a recognizable time duration\n\0"
- " %3s %s\0"
- "The '-#<number>' option may omit the hash char\n\0"
- " \0"
- "one %s%s option allowed\n\0"
- "All arguments are named options.\n\0"
- "Write failure to output file\0"
- " - reading file %s\0"
- "\n"
- "please send bug reports to: %s\n\0"
- "\t\t\t\t- may NOT appear - preset only\n\0"
- "# preset/initialization file\n"
- "# %s#\n\0"
- "\n"
- "The following option preset mechanisms are supported:\n\0"
- "prohibits these options:\n\0"
- "Operands and options may be intermixed. They will be reordered.\n\0"
- "%s%ld to %ld\0"
- "%sgreater than or equal to %ld\0"
- "%sIt must lie in one of the ranges:\n\0"
- "%sIt must be in the range:\n\0"
- ", or\n\0"
- "%s error: %s option value ``%s'' is out of range.\n\0"
- "%s%ld exactly\0"
- "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
- "%sless than or equal to %ld\0"
- "The --reset-option has not been configured.\n\0"
- "ERROR: %s option requires the %s option\n\0"
- " %3s %-14s %s\0"
- "requires these options:\n\0"
- " Arg Option-Name Req? Description\n\0"
- " Flg Arg Option-Name Req? Description\n\0"
- "-_^\0"
- "or you may use a numeric representation. Preceding these with a '!' will\n"
- "clear the bits, specifying 'none' will clear all bits, and 'all' will set them\n"
- "all. Multiple entries may be passed as an option argument list.\n\0"
- "%s\0"
- " \0"
- "T/F\0"
- "\n"
- "%s\n\n"
- "%s\0"
- "Fil\0"
- "KWd\0"
- "Mbr\0"
- "Tim\0"
- "Cpx\0"
- "no \0"
- "Num\0"
- "opt\0"
- "YES\0"
- "Str\0"
- "\t\t\t\t- \0"
- "\t\t\t\t-- and \0"
- "\t\t\t\t%s\n\0"
- " \0"
- " \0"
- "\t\t\t\t- may appear up to %d times\n\0"
- "The valid \"%s\" option keywords are:\n\0";
-
-
- /*
- * Now, define (and initialize) the structure that contains
- * the pointers to all these strings.
- * Aren't you glad you don't maintain this by hand?
- */
- usage_text_t option_usage_text = {
- 142,
- eng_zGnuBoolArg, eng_zGnuKeyArg, eng_zGnuFileArg, eng_zGnuKeyLArg,
- eng_zGnuTimeArg, eng_zGnuNumArg, eng_zGnuStrArg,
+/*
+ * Now, define (and initialize) the structure that contains
+ * the pointers to all these strings.
+ * Aren't you glad you don't maintain this by hand?
+ */
+usage_text_t option_xlateable_txt = {
+ 108,
+ eng_zGnuBoolArg, eng_zGnuKeyArg, eng_zGnuNumArg, eng_zGnuStrArg,
{
- usage_txt + 0, usage_txt + 27, usage_txt + 79, usage_txt + 125,
- usage_txt + 224, usage_txt + 260, usage_txt + 310, usage_txt + 343,
- usage_txt + 434, usage_txt + 493, usage_txt + 543, usage_txt + 547,
- usage_txt + 574, usage_txt + 623, usage_txt + 651, usage_txt + 688,
- usage_txt + 713, usage_txt + 739, usage_txt + 779, usage_txt + 916,
- usage_txt + 964, usage_txt +1018, usage_txt +1031, usage_txt +1039,
- usage_txt +1081, usage_txt +1105, usage_txt +1145, usage_txt +1160,
- usage_txt +1190, usage_txt +1216, usage_txt +1229, usage_txt +1243,
- usage_txt +1290, usage_txt +1296, usage_txt +1399, usage_txt +1411,
- usage_txt +1462, usage_txt +1491, usage_txt +1542, usage_txt +1576,
- usage_txt +1617, usage_txt +1640, usage_txt +1666, usage_txt +1697,
- usage_txt +1711, usage_txt +1726, usage_txt +1757, usage_txt +1784,
- usage_txt +1890, usage_txt +1896, usage_txt +1902, usage_txt +1909,
- usage_txt +1920, usage_txt +1946, usage_txt +1972, usage_txt +1980,
- usage_txt +2016, usage_txt +2067, usage_txt +2123, usage_txt +2157,
- usage_txt +2195, usage_txt +2260, usage_txt +2303, usage_txt +2338,
- usage_txt +2379, usage_txt +2420, usage_txt +2460, usage_txt +2487,
- usage_txt +2554, usage_txt +2602, usage_txt +2635, usage_txt +2660,
- usage_txt +2708, usage_txt +2743, usage_txt +2781, usage_txt +2808,
- usage_txt +2857, usage_txt +2862, usage_txt +2880, usage_txt +2915,
- usage_txt +2959, usage_txt +3013, usage_txt +3059, usage_txt +3108,
- usage_txt +3161, usage_txt +3169, usage_txt +3217, usage_txt +3219,
- usage_txt +3244, usage_txt +3278, usage_txt +3307, usage_txt +3326,
- usage_txt +3360, usage_txt +3396, usage_txt +3434, usage_txt +3490,
- usage_txt +3516, usage_txt +3582, usage_txt +3595, usage_txt +3626,
- usage_txt +3663, usage_txt +3691, usage_txt +3697, usage_txt +3749,
- usage_txt +3763, usage_txt +3809, usage_txt +3837, usage_txt +3882,
- usage_txt +3924, usage_txt +3938, usage_txt +3963, usage_txt +4003,
- usage_txt +4046, usage_txt +4050, usage_txt +4269, usage_txt +4272,
- usage_txt +4279, usage_txt +4283, usage_txt +4291, usage_txt +4295,
- usage_txt +4299, usage_txt +4303, usage_txt +4307, usage_txt +4311,
- usage_txt +4315, usage_txt +4319, usage_txt +4323, usage_txt +4327,
- usage_txt +4331, usage_txt +4338, usage_txt +4350, usage_txt +4358,
- usage_txt +4362, usage_txt +4365, usage_txt +4398
- }
- };
+ option_lib_text + 0, option_lib_text + 31, option_lib_text + 83,
+ option_lib_text + 129, option_lib_text + 228, option_lib_text + 264,
+ option_lib_text + 314, option_lib_text + 405, option_lib_text + 427,
+ option_lib_text + 484, option_lib_text + 519, option_lib_text + 564,
+ option_lib_text + 596, option_lib_text + 634, option_lib_text + 667,
+ option_lib_text + 716, option_lib_text + 748, option_lib_text + 800,
+ option_lib_text + 837, option_lib_text + 862, option_lib_text + 900,
+ option_lib_text + 918, option_lib_text + 1060, option_lib_text + 1107,
+ option_lib_text + 1146, option_lib_text + 1159, option_lib_text + 1185,
+ option_lib_text + 1211, option_lib_text + 1254, option_lib_text + 1290,
+ option_lib_text + 1335, option_lib_text + 1364, option_lib_text + 1407,
+ option_lib_text + 1490, option_lib_text + 1528, option_lib_text + 1574,
+ option_lib_text + 1619, option_lib_text + 1646, option_lib_text + 1695,
+ option_lib_text + 1744, option_lib_text + 1771, option_lib_text + 1804,
+ option_lib_text + 1840, option_lib_text + 1890, option_lib_text + 1908,
+ option_lib_text + 1962, option_lib_text + 2010, option_lib_text + 2057,
+ option_lib_text + 2097, option_lib_text + 2132, option_lib_text + 2157,
+ option_lib_text + 2173, option_lib_text + 2188, option_lib_text + 2194,
+ option_lib_text + 2243, option_lib_text + 2288, option_lib_text + 2344,
+ option_lib_text + 2373, option_lib_text + 2415, option_lib_text + 2457,
+ option_lib_text + 2483, option_lib_text + 2498, option_lib_text + 2528,
+ option_lib_text + 2554, option_lib_text + 2571, option_lib_text + 2618,
+ option_lib_text + 2649, option_lib_text + 2676, option_lib_text + 2779,
+ option_lib_text + 2885, option_lib_text + 2941, option_lib_text + 2975,
+ option_lib_text + 3018, option_lib_text + 3085, option_lib_text + 3118,
+ option_lib_text + 3143, option_lib_text + 3178, option_lib_text + 3216,
+ option_lib_text + 3224, option_lib_text + 3272, option_lib_text + 3306,
+ option_lib_text + 3325, option_lib_text + 3361, option_lib_text + 3397,
+ option_lib_text + 3453, option_lib_text + 3479, option_lib_text + 3506,
+ option_lib_text + 3519, option_lib_text + 3550, option_lib_text + 3564,
+ option_lib_text + 3601, option_lib_text + 3629, option_lib_text + 3635,
+ option_lib_text + 3681, option_lib_text + 3709, option_lib_text + 3775,
+ option_lib_text + 3801, option_lib_text + 3826, option_lib_text + 3866,
+ option_lib_text + 3909, option_lib_text + 4128, option_lib_text + 4161,
+ option_lib_text + 4198, option_lib_text + 4255
+ } };
+#endif /* AUTOOPTS_INTERNAL */
+
+#ifdef XGETTEXT_SCAN_DO_NOT_COMPILE
+do not compile this section.
+/* TRANSLATORS: The following dummy functions were crated solely so that
+ * xgettext can extract the correct strings. These strings are actually
+ * referenced where the preceding "#line" directive states, though you will
+ * not see the literal string there. The literal string is defined above in
+ * the @code{option_lib_text} table and referenced via a #define name that
+ * redirects into the @code{option_xlateable_txt} structure above. When
+ * translating is activated, the pointers in @code{option_xlateable_txt} are
+ * updated to point to translated strings.
+ */
+static void dummy_func(void) {
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 90 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 88 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 92 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
-#endif /* DO_TRANSLATIONS */
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* XGETTEXT_SCAN_DO_NOT_COMPILE */
#endif /* AUTOOPTS_USAGE_TXT_H_GUARD */
diff --git a/sntp/libopts/boolean.c b/sntp/libopts/boolean.c
index 8079231105d8..e83e518c000a 100644
--- a/sntp/libopts/boolean.c
+++ b/sntp/libopts/boolean.c
@@ -2,16 +2,18 @@
/**
* \file boolean.c
*
- * Time-stamp: "2010-07-10 11:02:10 bkorb"
- *
- * Automated Options Paged Usage module.
+ * Handle options with true/false values for arguments.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This routine will run run-on options through a pager so the
* user may examine, print or edit them at their leisure.
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -23,19 +25,19 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*=export_func optionBooleanVal
* private:
*
* what: Decipher a boolean value
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Decipher a true or false value for a boolean valued option argument.
@@ -43,23 +45,23 @@
* it is an empty string or it is a number that evaluates to zero.
=*/
void
-optionBooleanVal( tOptions* pOpts, tOptDesc* pOD )
+optionBooleanVal(tOptions * opts, tOptDesc * od)
{
char* pz;
- ag_bool res = AG_TRUE;
+ bool res = true;
- if ((pOD->fOptState & OPTST_RESET) != 0)
+ if (INQUERY_CALL(opts, od))
return;
- if (pOD->optArg.argString == NULL) {
- pOD->optArg.argBool = AG_FALSE;
+ if (od->optArg.argString == NULL) {
+ od->optArg.argBool = false;
return;
}
- switch (*(pOD->optArg.argString)) {
+ switch (*(od->optArg.argString)) {
case '0':
{
- long val = strtol( pOD->optArg.argString, &pz, 0 );
+ long val = strtol(od->optArg.argString, &pz, 0);
if ((val != 0) || (*pz != NUL))
break;
/* FALLTHROUGH */
@@ -69,21 +71,22 @@ optionBooleanVal( tOptions* pOpts, tOptDesc* pOD )
case 'F':
case 'f':
case NUL:
- res = AG_FALSE;
+ res = false;
break;
case '#':
- if (pOD->optArg.argString[1] != 'f')
+ if (od->optArg.argString[1] != 'f')
break;
- res = AG_FALSE;
+ res = false;
}
- if (pOD->fOptState & OPTST_ALLOC_ARG) {
- AGFREE(pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ if (od->fOptState & OPTST_ALLOC_ARG) {
+ AGFREE(od->optArg.argString);
+ od->fOptState &= ~OPTST_ALLOC_ARG;
}
- pOD->optArg.argBool = res;
+ od->optArg.argBool = res;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/check.c b/sntp/libopts/check.c
new file mode 100644
index 000000000000..9b221a1ef926
--- /dev/null
+++ b/sntp/libopts/check.c
@@ -0,0 +1,177 @@
+/**
+ * @file check.c
+ *
+ * @brief option consistency checks.
+ *
+ * @addtogroup autoopts
+ * @{
+ */
+/*
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+/**
+ * Check for conflicts based on "must" and "cannot" attributes.
+ */
+static bool
+has_conflict(tOptions * pOpts, tOptDesc * od)
+{
+ if (od->pOptMust != NULL) {
+ int const * must = od->pOptMust;
+
+ while (*must != NO_EQUIVALENT) {
+ tOptDesc * p = pOpts->pOptDesc + *(must++);
+ if (UNUSED_OPT(p)) {
+ const tOptDesc * ood = pOpts->pOptDesc + must[-1];
+ fprintf(stderr, zneed_fmt, pOpts->pzProgName,
+ od->pz_Name, ood->pz_Name);
+ return true;
+ }
+ }
+ }
+
+ if (od->pOptCant != NULL) {
+ int const * cant = od->pOptCant;
+
+ while (*cant != NO_EQUIVALENT) {
+ tOptDesc * p = pOpts->pOptDesc + *(cant++);
+ if (SELECTED_OPT(p)) {
+ const tOptDesc * ood = pOpts->pOptDesc + cant[-1];
+ fprintf(stderr, zconflict_fmt, pOpts->pzProgName,
+ od->pz_Name, ood->pz_Name);
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+/**
+ * Check that the option occurs often enough. Too often is already checked.
+ */
+static bool
+occurs_enough(tOptions * pOpts, tOptDesc * pOD)
+{
+ (void)pOpts;
+
+ /*
+ * IF the occurrence counts have been satisfied,
+ * THEN there is no problem.
+ */
+ if (pOD->optOccCt >= pOD->optMinCt)
+ return true;
+
+ /*
+ * IF MUST_SET means SET and PRESET are okay,
+ * so min occurrence count doesn't count
+ */
+ if ( (pOD->fOptState & OPTST_MUST_SET)
+ && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) )
+ return true;
+
+ if (pOD->optMinCt > 1)
+ fprintf(stderr, zneed_more, pOpts->pzProgName, pOD->pz_Name,
+ pOD->optMinCt);
+ else fprintf(stderr, zneed_one, pOpts->pzProgName, pOD->pz_Name);
+ return false;
+}
+
+/**
+ * Verify option consistency.
+ *
+ * Make sure that the argument list passes our consistency tests.
+ */
+LOCAL bool
+is_consistent(tOptions * pOpts)
+{
+ tOptDesc * pOD = pOpts->pOptDesc;
+ int oCt = pOpts->presetOptCt;
+
+ /*
+ * FOR each of "oCt" options, ...
+ */
+ for (;;) {
+ /*
+ * IF the current option was provided on the command line
+ * THEN ensure that any "MUST" requirements are not
+ * "DEFAULT" (unspecified) *AND* ensure that any
+ * "CANT" options have not been SET or DEFINED.
+ */
+ if (SELECTED_OPT(pOD)) {
+ if (has_conflict(pOpts, pOD))
+ return false;
+ }
+
+ /*
+ * IF this option is not equivalenced to another,
+ * OR it is equivalenced to itself (is the equiv. root)
+ * THEN we need to make sure it occurs often enough.
+ */
+ if ( (pOD->optEquivIndex == NO_EQUIVALENT)
+ || (pOD->optEquivIndex == pOD->optIndex) )
+
+ if (! occurs_enough(pOpts, pOD))
+ return false;
+
+ if (--oCt <= 0)
+ break;
+ pOD++;
+ }
+
+ /*
+ * IF we are stopping on errors, check to see if any remaining
+ * arguments are required to be there or prohibited from being there.
+ */
+ if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
+
+ /*
+ * Check for prohibition
+ */
+ if ((pOpts->fOptSet & OPTPROC_NO_ARGS) != 0) {
+ if (pOpts->origArgCt > pOpts->curOptIdx) {
+ fprintf(stderr, zNoArgs, pOpts->pzProgName);
+ return false;
+ }
+ }
+
+ /*
+ * ELSE not prohibited, check for being required
+ */
+ else if ((pOpts->fOptSet & OPTPROC_ARGS_REQ) != 0) {
+ if (pOpts->origArgCt <= pOpts->curOptIdx) {
+ fprintf(stderr, zargs_must, pOpts->pzProgName);
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+/** @}
+ *
+ * Local Variables:
+ * mode: C
+ * c-file-style: "stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * end of autoopts/check.c */
diff --git a/sntp/libopts/compat/_Noreturn.h b/sntp/libopts/compat/_Noreturn.h
new file mode 100644
index 000000000000..c44ad89b7c09
--- /dev/null
+++ b/sntp/libopts/compat/_Noreturn.h
@@ -0,0 +1,10 @@
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
diff --git a/sntp/libopts/compat/compat.h b/sntp/libopts/compat/compat.h
index 230aef9cb352..69206a3c1404 100644
--- a/sntp/libopts/compat/compat.h
+++ b/sntp/libopts/compat/compat.h
@@ -1,50 +1,30 @@
-/* -*- Mode: C -*- */
-
-/**
- * \file compat.h --- fake the preprocessor into handlng portability
- *
- * Time-stamp: "2010-07-16 15:11:57 bkorb"
+/* -*- Mode: C -*-
*
* compat.h is free software.
- * This file is part of AutoGen.
- *
- * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
- *
- * AutoGen 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 3 of the License, or
- * (at your option) any later version.
+ * This file is part of AutoGen and AutoOpts.
*
- * AutoGen 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.
+ * AutoGen Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
*
- * As a special exception, Bruce Korb gives permission for additional
- * uses of the text contained in the release of compat.h.
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
*
- * The exception is that, if you link the compat.h library with other
- * files to produce an executable, this does not by itself cause the
- * resulting executable to be covered by the GNU General Public License.
- * Your use of that executable is in no way restricted on account of
- * linking the compat.h library code into it.
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
*
- * This exception does not however invalidate any other reasons why
- * the executable file might be covered by the GNU General Public License.
+ * These files have the following sha256 sums:
*
- * This exception applies only to the code released by Bruce Korb under
- * the name compat.h. If you copy code from other sources under the
- * General Public License into a copy of compat.h, as the General Public
- * License permits, the exception does not apply to the code that you add
- * in this way. To avoid misleading anyone as to the status of such
- * modified files, you must delete this exception notice from them.
- *
- * If you write modifications of your own for compat.h, it is your choice
- * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+/**
+ * \file compat.h
+ * fake the preprocessor into handlng stuff portability
*/
#ifndef COMPAT_H_GUARD
#define COMPAT_H_GUARD 1
@@ -62,7 +42,9 @@
#ifndef HAVE_STRSIGNAL
- char * strsignal( int signo );
+# ifndef HAVE_RAW_DECL_STRSIGNAL
+ char * strsignal(int signo);
+# endif
#endif
#define _GNU_SOURCE 1 /* for strsignal in GNU's libc */
@@ -82,7 +64,9 @@
# include <sys/procset.h>
#endif
#include <sys/stat.h>
-#include <sys/wait.h>
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
#if defined( HAVE_SOLARIS_SYSINFO )
# include <sys/systeminfo.h>
@@ -179,15 +163,15 @@
#include <setjmp.h>
#include <signal.h>
-#if defined( HAVE_STDINT_H )
+#if defined(HAVE_STDINT_H)
# include <stdint.h>
-#elif defined( HAVE_INTTYPES_H )
+
+#elif defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#endif
#include <stdlib.h>
#include <string.h>
-
#include <time.h>
#ifdef HAVE_UTIME_H
@@ -198,6 +182,17 @@
# include <unistd.h>
#endif
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+ typedef enum { false = 0, true = 1 } _Bool;
+# define bool _Bool
+
+ /* The other macros must be usable in preprocessor directives. */
+# define false 0
+# define true 1
+#endif
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* FIXUPS and CONVIENCE STUFF:
@@ -242,7 +237,7 @@
#endif
#if !defined (MAXPATHLEN)
-# define MAXPATHLEN ((size_t)4096)
+# define MAXPATHLEN 4096
#endif /* MAXPATHLEN */
#define AG_PATH_MAX ((size_t)MAXPATHLEN)
diff --git a/sntp/libopts/compat/pathfind.c b/sntp/libopts/compat/pathfind.c
index 2d5b27d913cc..6554533d2a3a 100644
--- a/sntp/libopts/compat/pathfind.c
+++ b/sntp/libopts/compat/pathfind.c
@@ -2,22 +2,24 @@
/* pathfind.c --- find a FILE MODE along PATH */
-/*
- * Author: Gary V Vaughan <gvaughan@oranda.demon.co.uk>
- * Time-stamp: "2010-07-17 09:50:32 bkorb"
- */
+/* Author: Gary V Vaughan <gvaughan@oranda.demon.co.uk> */
/* Code: */
+static char *
+pathfind( char const * path,
+ char const * fname,
+ char const * mode );
+
#include "compat.h"
#ifndef HAVE_PATHFIND
#if defined(__windows__) && !defined(__CYGWIN__)
-char*
-pathfind( char const* path,
- char const* fileName,
- char const* mode )
+static char *
+pathfind( char const * path,
+ char const * fname,
+ char const * mode )
{
- return NULL;
+ return strdup(fname);
}
#else
@@ -25,70 +27,22 @@ static char* make_absolute( char const *string, char const *dot_path );
static char* canonicalize_pathname( char *path );
static char* extract_colon_unit( char* dir, char const *string, int *p_index );
-
-/*=export_func pathfind
- *
- * what: fild a file in a list of directories
- *
- * ifndef: HAVE_PATHFIND
- *
- * arg: + char const* + path + colon separated list of search directories +
- * arg: + char const* + file + the name of the file to look for +
- * arg: + char const* + mode + the mode bits that must be set to match +
- *
- * ret_type: char*
- * ret_desc: the path to the located file
- *
- * doc:
- *
- * pathfind looks for a a file with name "FILE" and "MODE" access
- * along colon delimited "PATH", and returns the full pathname as a
- * string, or NULL if not found. If "FILE" contains a slash, then
- * it is treated as a relative or absolute path and "PATH" is ignored.
- *
- * @strong{NOTE}: this function is compiled into @file{libopts} only if
- * it is not natively supplied.
- *
- * The "MODE" argument is a string of option letters chosen from the
- * list below:
- * @example
- * Letter Meaning
- * r readable
- * w writable
- * x executable
- * f normal file (NOT IMPLEMENTED)
- * b block special (NOT IMPLEMENTED)
- * c character special (NOT IMPLEMENTED)
- * d directory (NOT IMPLEMENTED)
- * p FIFO (pipe) (NOT IMPLEMENTED)
- * u set user ID bit (NOT IMPLEMENTED)
- * g set group ID bit (NOT IMPLEMENTED)
- * k sticky bit (NOT IMPLEMENTED)
- * s size nonzero (NOT IMPLEMENTED)
- * @end example
- *
- * example:
- * To find the "ls" command using the "PATH" environment variable:
- * @example
- * #include <stdlib.h>
- * char* pz_ls = pathfind( getenv("PATH"), "ls", "rx" );
- * <<do whatever with pz_ls>>
- * free( pz_ls );
- * @end example
- * The path is allocated with @code{malloc(3C)}, so you must @code{free(3C)}
- * the result. Also, do not use unimplemented file modes. :-)
- *
- * err: returns NULL if the file is not found.
-=*/
-char*
-pathfind( char const* path,
- char const* fileName,
- char const* mode )
+/**
+ * local implementation of pathfind.
+ * @param[in] path colon separated list of directories
+ * @param[in] fname the name we are hunting for
+ * @param[in] mode the required file mode
+ * @returns an allocated string with the full path, or NULL
+ */
+static char *
+pathfind( char const * path,
+ char const * fname,
+ char const * mode )
{
- int p_index = 0;
- int mode_bits = 0;
- char* pathName = NULL;
- char zPath[ AG_PATH_MAX + 1 ];
+ int p_index = 0;
+ int mode_bits = 0;
+ char * res_path = NULL;
+ char zPath[ AG_PATH_MAX + 1 ];
if (strchr( mode, 'r' )) mode_bits |= R_OK;
if (strchr( mode, 'w' )) mode_bits |= W_OK;
@@ -101,9 +55,6 @@ pathfind( char const* path,
DIR* dirP;
char* colon_unit = extract_colon_unit( zPath, path, &p_index );
- /*
- * IF no more entries, THEN quit
- */
if (colon_unit == NULL)
break;
@@ -115,9 +66,6 @@ pathfind( char const* path,
if (dirP == NULL)
continue;
- /*
- * FOR every entry in the given directory, ...
- */
for (;;) {
struct dirent *entP = readdir( dirP );
@@ -127,31 +75,31 @@ pathfind( char const* path,
/*
* IF the file name matches the one we are looking for, ...
*/
- if (strcmp( entP->d_name, fileName ) == 0) {
- char* pzFullName = make_absolute( fileName, colon_unit);
+ if (strcmp(entP->d_name, fname) == 0) {
+ char * abs_name = make_absolute(fname, colon_unit);
/*
* Make sure we can access it in the way we want
*/
- if (access( pzFullName, mode_bits ) >= 0) {
+ if (access(abs_name, mode_bits) >= 0) {
/*
* We can, so normalize the name and return it below
*/
- pathName = canonicalize_pathname( pzFullName );
+ res_path = canonicalize_pathname(abs_name);
}
- free( (void*)pzFullName );
+ free(abs_name);
break;
}
}
closedir( dirP );
- if (pathName != NULL)
+ if (res_path != NULL)
break;
}
- return pathName;
+ return res_path;
}
/*
@@ -171,7 +119,7 @@ make_absolute( char const *string, char const *dot_path )
if (dot_path && dot_path[0]) {
result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
strcpy( result, dot_path );
- result_len = strlen( result );
+ result_len = (int)strlen(result);
if (result[result_len - 1] != '/') {
result[result_len++] = '/';
result[result_len] = '\0';
@@ -286,7 +234,7 @@ canonicalize_pathname( char *path )
static char*
extract_colon_unit( char* pzDir, char const *string, int *p_index )
{
- char* pzDest = pzDir;
+ char * pzDest = pzDir;
int ix = *p_index;
if (string == NULL)
@@ -296,7 +244,7 @@ extract_colon_unit( char* pzDir, char const *string, int *p_index )
return NULL;
{
- char const* pzSrc = string + ix;
+ char const * pzSrc = string + ix;
while (*pzSrc == ':') pzSrc++;
@@ -305,15 +253,16 @@ extract_colon_unit( char* pzDir, char const *string, int *p_index )
switch (ch) {
case ':':
pzDest[-1] = NUL;
+ /* FALLTHROUGH */
case NUL:
goto copy_done;
}
- if ((pzDest - pzDir) >= AG_PATH_MAX)
+ if ((unsigned long)(pzDest - pzDir) >= AG_PATH_MAX)
break;
} copy_done:;
- ix = pzSrc - string;
+ ix = (int)(pzSrc - string);
}
if (*pzDir == NUL)
diff --git a/sntp/libopts/compat/snprintf.c b/sntp/libopts/compat/snprintf.c
index fc91d63a9cf6..eccea1faf092 100644
--- a/sntp/libopts/compat/snprintf.c
+++ b/sntp/libopts/compat/snprintf.c
@@ -1,6 +1,7 @@
#ifndef HAVE_VPRINTF
#include "choke-me: no vprintf and no snprintf"
+ choke me.
#endif
#if defined(HAVE_STDARG_H)
@@ -21,6 +22,7 @@
#else
# include "must-have-stdarg-or-varargs"
+ choke me.
#endif
static int
diff --git a/sntp/libopts/compat/strchr.c b/sntp/libopts/compat/strchr.c
index 413f999ff934..f40938707bbf 100644
--- a/sntp/libopts/compat/strchr.c
+++ b/sntp/libopts/compat/strchr.c
@@ -24,11 +24,17 @@
SVID 3, POSIX, BSD 4.3, ISO 9899
*/
-char*
-strchr( char const *s, int c)
+static char *
+strchr(char const *s, int c);
+
+static char *
+strrchr(char const *s, int c);
+
+static char *
+strchr(char const *s, int c)
{
do {
- if ((unsigned)*s == (unsigned)c)
+ if ((unsigned char)*s == (unsigned char)c)
return s;
} while (*(++s) != NUL);
@@ -36,8 +42,8 @@ strchr( char const *s, int c)
return NULL;
}
-char*
-strrchr( char const *s, int c)
+static char *
+strrchr(char const *s, int c)
{
char const *e = s + strlen(s);
@@ -45,7 +51,7 @@ strrchr( char const *s, int c)
if (--e < s)
break;
- if ((unsigned)*e == (unsigned)c)
+ if ((unsigned char)*e == (unsigned char)c)
return e;
}
return NULL;
diff --git a/sntp/libopts/compat/strdup.c b/sntp/libopts/compat/strdup.c
index e2933a8afd40..f3a40770d030 100644
--- a/sntp/libopts/compat/strdup.c
+++ b/sntp/libopts/compat/strdup.c
@@ -3,6 +3,9 @@
*/
static char *
+strdup( char const *s );
+
+static char *
strdup( char const *s )
{
char *cp;
diff --git a/sntp/libopts/compat/windows-config.h b/sntp/libopts/compat/windows-config.h
index 360af1098cd0..78f3202b94dc 100644
--- a/sntp/libopts/compat/windows-config.h
+++ b/sntp/libopts/compat/windows-config.h
@@ -1,24 +1,33 @@
-/*
- * Time-stamp: "2010-02-24 08:39:04 bkorb"
+/**
+ * \file windows-config.h
+ *
+ * This file contains all of the routines that must be linked into
+ * an executable to use the generated option processing. The optional
+ * routines are in separately compiled modules so that they will not
+ * necessarily be linked in.
+ *
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
- * This file is part of AutoGen.
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
*
- * AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
*
- * AutoGen 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 3 of the License, or
- * (at your option) any later version.
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
*
- * AutoGen 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.
+ * These files have the following sha256 sums:
*
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
+
#ifndef WINDOWS_CONFIG_HACKERY
#define WINDOWS_CONFIG_HACKERY 1
@@ -32,64 +41,25 @@
#endif
/*
- * Miscellaneous functions that Microsoft maps
- * to other names
- *
- * #define inline __inline
- * #define vsnprintf _vsnprintf
+ * Miscellaneous functions that Microsoft maps to other names
*/
#define snprintf _snprintf
-/*
- * #define stricmp _stricmp
- * #define strcasecmp _stricmp
- * #define isascii __isascii
- * #define finite _finite
- * #define random rand
- * #define srandom srand
- */
#define SIZEOF_INT 4
#define SIZEOF_CHARP 4
#define SIZEOF_LONG 4
#define SIZEOF_SHORT 2
-typedef unsigned long uintptr_t;
-
-/*
- * # define HAVE_NET_IF_H
- * # define QSORT_USES_VOID_P
- * # define HAVE_SETVBUF
- * # define HAVE_VSPRINTF
- * # define HAVE_SNPRINTF
- * # define HAVE_VSNPRINTF
- * # define HAVE_PROTOTYPES /* from ntpq.mak * /
- * # define HAVE_MEMMOVE
- * # define HAVE_TERMIOS_H
- * # define HAVE_ERRNO_H
- * # define HAVE_STDARG_H
- * # define HAVE_NO_NICE
- * # define HAVE_MKTIME
- * # define TIME_WITH_SYS_TIME
- * # define HAVE_IO_COMPLETION_PORT
- * # define ISC_PLATFORM_NEEDNTOP
- * # define ISC_PLATFORM_NEEDPTON
- * # define NEED_S_CHAR_TYPEDEF
- * # define USE_PROTOTYPES /* for ntp_types.h * /
- *
- * #define ULONG_CONST(a) a ## UL
- */
-
#define HAVE_LIMITS_H 1
#define HAVE_STRDUP 1
#define HAVE_STRCHR 1
#define HAVE_FCNTL_H 1
/*
- * VS.NET's version of wspiapi.h has a bug in it
- * where it assigns a value to a variable inside
- * an if statement. It should be comparing them.
- * We prevent inclusion since we are not using this
- * code so we don't have to see the warning messages
+ * VS.NET's version of wspiapi.h has a bug in it where it assigns a value
+ * to a variable inside an if statement. It should be comparing them.
+ * We prevent inclusion since we are not using this code so we don't have
+ * to see the warning messages
*/
#ifndef _WSPIAPI_H_
#define _WSPIAPI_H_
@@ -116,7 +86,7 @@ typedef unsigned long uintptr_t;
#define strdup _strdup
#define stat _stat /* struct stat from <sys/stat.h> */
#define unlink _unlink
-#define fchmod( _x, _y );
+#define fchmod( _x, _y )
#define ssize_t SSIZE_T
#include <io.h>
@@ -142,4 +112,33 @@ typedef unsigned long uintptr_t;
# define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
#endif
+/* C99 exact size integer support. */
+#if defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+
+#elif defined(HAVE_STDINT_H)
+# include <stdint.h>
+# define MISSING_INTTYPES_H 1
+
+#elif ! defined(ADDED_EXACT_SIZE_INTEGERS)
+# define ADDED_EXACT_SIZE_INTEGERS 1
+# define MISSING_INTTYPES_H 1
+
+ typedef __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+
+ typedef __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+
+ typedef __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+
+ typedef unsigned long uintptr_t;
+ typedef long intptr_t;
+#endif
+
#endif /* WINDOWS_CONFIG_HACKERY */
+/* windows-config.h ends here */
diff --git a/sntp/libopts/configfile.c b/sntp/libopts/configfile.c
index 35e82d591f9f..d4bc4fea2870 100644
--- a/sntp/libopts/configfile.c
+++ b/sntp/libopts/configfile.c
@@ -1,13 +1,15 @@
/**
* \file configfile.c
*
- * Time-stamp: "2011-04-06 09:31:24 bkorb"
- *
* configuration/rc/ini file handling.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -19,68 +21,73 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-static void
-set_usage_flags(tOptions * opts, char const * flg_txt);
-
/* = = = START-STATIC-FORWARD = = = */
static void
file_preset(tOptions * opts, char const * fname, int dir);
-static char*
-handle_comment(char* pzText);
+static char *
+handle_comment(char* txt);
static char *
-handle_cfg(tOptions * pOpts, tOptState * pOS, char * pzText, int dir);
+handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir);
static char *
-handle_directive(tOptions * pOpts, char * pzText);
+handle_directive(tOptions * opts, char * txt);
static char *
-aoflags_directive(tOptions * pOpts, char * pzText);
+aoflags_directive(tOptions * opts, char * txt);
static char *
-program_directive(tOptions * pOpts, char * pzText);
+program_directive(tOptions * opts, char * txt);
static char *
-handle_section(tOptions * pOpts, char * pzText);
+handle_section(tOptions * opts, char * txt);
static int
parse_xml_encoding(char ** ppz);
static char *
-trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode);
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
static void
cook_xml_text(char * pzData);
static char *
-handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir);
-
-static char*
-parse_keyword(tOptions * pOpts, char * pzText, tOptionValue * pType);
+handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir);
-static char*
-parse_set_mem(tOptions * pOpts, char * pzText, tOptionValue * pType);
+static char const *
+parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ);
-static char *
-parse_value(char * pzText, tOptionValue * pType);
+static char const *
+parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ);
-static char *
-skip_unkn(char* pzText);
+static char const *
+parse_value(char const * txt, tOptionValue * typ);
/* = = = END-STATIC-FORWARD = = = */
+/**
+ * Skip over some unknown attribute
+ * @param[in] txt start of skpped text
+ * @returns character after skipped text
+ */
+inline static char const *
+skip_unkn(char const * txt)
+{
+ txt = BRK_END_XML_TOKEN_CHARS(txt);
+ return (*txt == NUL) ? NULL : txt;
+}
/*=export_func configFileLoad
*
* what: parse a configuration file
- * arg: + char const* + pzFile + the file to load +
+ * arg: + char const* + fname + the file to load +
*
* ret_type: const tOptionValue*
* ret_desc: An allocated, compound value structure
@@ -100,30 +107,31 @@ skip_unkn(char* pzText);
* @code{mmap(2)} or other file system calls, or it may be:
* @itemize @bullet
* @item
- * @code{ENOENT} - the file was empty.
+ * @code{ENOENT} - the file was not found.
+ * @item
+ * @code{ENOMSG} - the file was empty.
* @item
* @code{EINVAL} - the file contents are invalid -- not properly formed.
* @item
* @code{ENOMEM} - not enough memory to allocate the needed structures.
* @end itemize
=*/
-const tOptionValue*
-configFileLoad(char const* pzFile)
+const tOptionValue *
+configFileLoad(char const * fname)
{
- tmap_info_t cfgfile;
- tOptionValue* pRes = NULL;
+ tmap_info_t cfgfile;
+ tOptionValue * res = NULL;
tOptionLoadMode save_mode = option_load_mode;
- char* pzText =
- text_mmap(pzFile, PROT_READ, MAP_PRIVATE, &cfgfile);
+ char * txt = text_mmap(fname, PROT_READ, MAP_PRIVATE, &cfgfile);
- if (TEXT_MMAP_FAILED_ADDR(pzText))
+ if (TEXT_MMAP_FAILED_ADDR(txt))
return NULL; /* errno is set */
option_load_mode = OPTION_LOAD_COOKED;
- pRes = optionLoadNested(pzText, pzFile, strlen(pzFile));
+ res = optionLoadNested(txt, fname, strlen(fname));
- if (pRes == NULL) {
+ if (res == NULL) {
int err = errno;
text_munmap(&cfgfile);
errno = err;
@@ -131,16 +139,16 @@ configFileLoad(char const* pzFile)
text_munmap(&cfgfile);
option_load_mode = save_mode;
- return pRes;
+ return res;
}
/*=export_func optionFindValue
*
* what: find a hierarcicaly valued option instance
- * arg: + const tOptDesc* + pOptDesc + an option with a nested arg type +
- * arg: + char const* + name + name of value to find +
- * arg: + char const* + value + the matching value +
+ * arg: + const tOptDesc* + odesc + an option with a nested arg type +
+ * arg: + char const* + name + name of value to find +
+ * arg: + char const* + val + the matching value +
*
* ret_type: const tOptionValue*
* ret_desc: a compound value structure
@@ -159,60 +167,61 @@ configFileLoad(char const* pzFile)
* @code{ENOENT} - no entry matched the given name.
* @end itemize
=*/
-const tOptionValue*
-optionFindValue(const tOptDesc* pOptDesc, char const* pzName,
- char const* pzVal)
+const tOptionValue *
+optionFindValue(const tOptDesc * odesc, char const * name, char const * val)
{
- const tOptionValue* pRes = NULL;
+ const tOptionValue * res = NULL;
- if ( (pOptDesc == NULL)
- || (OPTST_GET_ARGTYPE(pOptDesc->fOptState) != OPARG_TYPE_HIERARCHY)) {
+ if ( (odesc == NULL)
+ || (OPTST_GET_ARGTYPE(odesc->fOptState) != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
}
- else if (pOptDesc->optCookie == NULL) {
+ else if (odesc->optCookie == NULL) {
errno = ENOENT;
}
else do {
- tArgList* pAL = pOptDesc->optCookie;
- int ct = pAL->useCt;
- void** ppOV = (void**)(pAL->apzArgs);
+ tArgList* argl = odesc->optCookie;
+ int argct = argl->useCt;
+ void ** poptv = (void**)(argl->apzArgs);
- if (ct == 0) {
+ if (argct == 0) {
errno = ENOENT;
break;
}
- if (pzName == NULL) {
- pRes = (tOptionValue*)*ppOV;
+ if (name == NULL) {
+ res = (tOptionValue*)*poptv;
break;
}
- while (--ct >= 0) {
- const tOptionValue* pOV = *(ppOV++);
- const tOptionValue* pRV = optionGetValue(pOV, pzName);
+ while (--argct >= 0) {
+ const tOptionValue * ov = *(poptv++);
+ const tOptionValue * rv = optionGetValue(ov, name);
- if (pRV == NULL)
+ if (rv == NULL)
continue;
- if (pzVal == NULL) {
- pRes = pOV;
+ if (val == NULL) {
+ res = ov;
break;
}
}
- if (pRes == NULL)
+ if (res == NULL)
errno = ENOENT;
- } while (0);
+ } while (false);
- return pRes;
+ return res;
}
/*=export_func optionFindNextValue
*
+ * FIXME: the handling of 'pzName' and 'pzVal' is just wrong.
+ *
* what: find a hierarcicaly valued option instance
- * arg: + const tOptDesc* + pOptDesc + an option with a nested arg type +
+ * arg: + const tOptDesc* + odesc + an option with a nested arg type +
* arg: + const tOptionValue* + pPrevVal + the last entry +
* arg: + char const* + name + name of value to find +
* arg: + char const* + value + the matching value +
@@ -236,45 +245,43 @@ optionFindValue(const tOptDesc* pOptDesc, char const* pzName,
* @end itemize
=*/
tOptionValue const *
-optionFindNextValue(const tOptDesc * pOptDesc, const tOptionValue * pPrevVal,
+optionFindNextValue(const tOptDesc * odesc, const tOptionValue * pPrevVal,
char const * pzName, char const * pzVal)
{
- int foundOldVal = 0;
- tOptionValue* pRes = NULL;
+ bool old_found = false;
+ tOptionValue* res = NULL;
- if ( (pOptDesc == NULL)
- || (OPTST_GET_ARGTYPE(pOptDesc->fOptState) != OPARG_TYPE_HIERARCHY)) {
+ (void)pzName;
+ (void)pzVal;
+
+ if ( (odesc == NULL)
+ || (OPTST_GET_ARGTYPE(odesc->fOptState) != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
}
- else if (pOptDesc->optCookie == NULL) {
+ else if (odesc->optCookie == NULL) {
errno = ENOENT;
}
else do {
- tArgList* pAL = pOptDesc->optCookie;
- int ct = pAL->useCt;
- void** ppOV = (void**)pAL->apzArgs;
-
- if (ct == 0) {
- errno = ENOENT;
- break;
- }
+ tArgList* argl = odesc->optCookie;
+ int ct = argl->useCt;
+ void** poptv = (void**)argl->apzArgs;
while (--ct >= 0) {
- tOptionValue* pOV = *(ppOV++);
- if (foundOldVal) {
- pRes = pOV;
+ tOptionValue* pOV = *(poptv++);
+ if (old_found) {
+ res = pOV;
break;
}
if (pOV == pPrevVal)
- foundOldVal = 1;
+ old_found = true;
}
- if (pRes == NULL)
+ if (res == NULL)
errno = ENOENT;
- } while (0);
+ } while (false);
- return pRes;
+ return res;
}
@@ -291,7 +298,9 @@ optionFindNextValue(const tOptDesc * pOptDesc, const tOptionValue * pPrevVal,
* This routine will find an entry in a nested value option or configurable.
* If "valueName" is NULL, then the first entry is returned. Otherwise,
* the first entry with a name that exactly matches the argument will be
- * returned.
+ * returned. If there is no matching value, NULL is returned and errno is
+ * set to ENOENT. If the provided option value is not a hierarchical value,
+ * NULL is also returned and errno is set to EINVAL.
*
* err:
* The returned result is NULL and errno is set:
@@ -303,40 +312,38 @@ optionFindNextValue(const tOptDesc * pOptDesc, const tOptionValue * pPrevVal,
* @code{ENOENT} - no entry matched the given name.
* @end itemize
=*/
-const tOptionValue*
-optionGetValue(const tOptionValue* pOld, char const* pzValName)
+tOptionValue const *
+optionGetValue(tOptionValue const * oov, char const * vname)
{
- tArgList* pAL;
- tOptionValue* pRes = NULL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
- if ((pOld == NULL) || (pOld->valType != OPARG_TYPE_HIERARCHY)) {
+ if ((oov == NULL) || (oov->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
- return NULL;
+ return res;
}
- pAL = pOld->v.nestVal;
+ arg_list = oov->v.nestVal;
- if (pAL->useCt > 0) {
- int ct = pAL->useCt;
- void** papOV = (void**)(pAL->apzArgs);
+ if (arg_list->useCt > 0) {
+ int ct = arg_list->useCt;
+ void ** ovlist = (void**)(arg_list->apzArgs);
- if (pzValName == NULL) {
- pRes = (tOptionValue*)*papOV;
- }
+ if (vname == NULL) {
+ res = (tOptionValue*)*ovlist;
- else do {
- tOptionValue* pOV = *(papOV++);
- if (strcmp(pOV->pzName, pzValName) == 0) {
- pRes = pOV;
+ } else do {
+ tOptionValue * opt_val = *(ovlist++);
+ if (strcmp(opt_val->pzName, vname) == 0) {
+ res = opt_val;
break;
}
} while (--ct > 0);
}
- if (pRes == NULL)
+ if (res == NULL)
errno = ENOENT;
- return pRes;
+ return res;
}
-
/*=export_func optionNextValue
*
* what: get the next value from a hierarchical list
@@ -365,30 +372,30 @@ optionGetValue(const tOptionValue* pOld, char const* pzValName)
* @end itemize
=*/
tOptionValue const *
-optionNextValue(tOptionValue const * pOVList,tOptionValue const * pOldOV )
+optionNextValue(tOptionValue const * ov_list,tOptionValue const * oov )
{
- tArgList* pAL;
- tOptionValue* pRes = NULL;
- int err = EINVAL;
+ tArgList * arg_list;
+ tOptionValue * res = NULL;
+ int err = EINVAL;
- if ((pOVList == NULL) || (pOVList->valType != OPARG_TYPE_HIERARCHY)) {
+ if ((ov_list == NULL) || (ov_list->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
return NULL;
}
- pAL = pOVList->v.nestVal;
+ arg_list = ov_list->v.nestVal;
{
- int ct = pAL->useCt;
- void** papNV = (void**)(pAL->apzArgs);
+ int ct = arg_list->useCt;
+ void ** o_list = (void**)(arg_list->apzArgs);
while (ct-- > 0) {
- tOptionValue* pNV = *(papNV++);
- if (pNV == pOldOV) {
+ tOptionValue * nov = *(o_list++);
+ if (nov == oov) {
if (ct == 0) {
err = ENOENT;
} else {
- err = 0;
- pRes = (tOptionValue*)*papNV;
+ err = 0;
+ res = (tOptionValue*)*o_list;
}
break;
}
@@ -396,25 +403,30 @@ optionNextValue(tOptionValue const * pOVList,tOptionValue const * pOldOV )
}
if (err != 0)
errno = err;
- return pRes;
+ return res;
}
-
/**
* Load a file containing presetting information (a configuration file).
*/
static void
file_preset(tOptions * opts, char const * fname, int dir)
{
- tmap_info_t cfgfile;
- tOptState optst = OPTSTATE_INITIALIZER(PRESET);
- tAoUL st_flags = optst.flags;
- char * ftext =
+ tmap_info_t cfgfile;
+ tOptState optst = OPTSTATE_INITIALIZER(PRESET);
+ opt_state_mask_t st_flags = optst.flags;
+ opt_state_mask_t fl_save = opts->fOptSet;
+ char * ftext =
text_mmap(fname, PROT_READ|PROT_WRITE, MAP_PRIVATE, &cfgfile);
if (TEXT_MMAP_FAILED_ADDR(ftext))
return;
+ /*
+ * While processing config files, we ignore errors.
+ */
+ opts->fOptSet &= ~OPTPROC_ERRSTOP;
+
if (dir == DIRECTION_CALLED) {
st_flags = OPTST_DEFINED;
dir = DIRECTION_PROCESS;
@@ -431,7 +443,7 @@ file_preset(tOptions * opts, char const * fname, int dir)
do {
optst.flags = st_flags;
- while (IS_WHITESPACE_CHAR(*ftext)) ftext++;
+ ftext = SPN_WHITESPACE_CHARS(ftext);
if (IS_VAR_FIRST_CHAR(*ftext)) {
ftext = handle_cfg(opts, &optst, ftext, dir);
@@ -456,8 +468,10 @@ file_preset(tOptions * opts, char const * fname, int dir)
break;
default:
- goto all_done;
+ ftext = NULL;
}
+ if (ftext == NULL)
+ goto all_done;
break;
case '[':
@@ -465,7 +479,7 @@ file_preset(tOptions * opts, char const * fname, int dir)
break;
case '#':
- ftext = strchr(ftext + 1, '\n');
+ ftext = strchr(ftext + 1, NL);
break;
default:
@@ -473,47 +487,46 @@ file_preset(tOptions * opts, char const * fname, int dir)
}
} while (ftext != NULL);
-all_done:
+ all_done:
text_munmap(&cfgfile);
+ opts->fOptSet = fl_save;
}
-
/**
- * "pzText" points to a "<!" sequence.
+ * "txt" points to a "<!" sequence.
* Theoretically, we should ensure that it begins with "<!--",
* but actually I don't care that much. It ends with "-->".
*/
-static char*
-handle_comment(char* pzText)
+static char *
+handle_comment(char* txt)
{
- char* pz = strstr(pzText, "-->");
+ char* pz = strstr(txt, "-->");
if (pz != NULL)
pz += 3;
return pz;
}
-
/**
- * "pzText" points to the start of some value name.
+ * "txt" points to the start of some value name.
* The end of the entry is the end of the line that is not preceded by
* a backslash escape character. The string value is always processed
* in "cooked" mode.
*/
static char *
-handle_cfg(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
+handle_cfg(tOptions * opts, tOptState * ost, char * txt, int dir)
{
- char* pzName = pzText++;
- char* pzEnd = strchr(pzText, '\n');
+ char* pzName = txt++;
+ char* pzEnd = strchr(txt, NL);
if (pzEnd == NULL)
- return pzText + strlen(pzText);
+ return txt + strlen(txt);
- while (IS_VALUE_NAME_CHAR(*pzText)) pzText++;
- while (IS_WHITESPACE_CHAR(*pzText)) pzText++;
- if (pzText > pzEnd) {
+ txt = SPN_VALUE_NAME_CHARS(txt);
+ txt = SPN_WHITESPACE_CHARS(txt);
+ if (txt > pzEnd) {
name_only:
*pzEnd++ = NUL;
- loadOptionLine(pOpts, pOS, pzName, dir, OPTION_LOAD_UNCOOKED);
+ load_opt_line(opts, ost, pzName, dir, OPTION_LOAD_UNCOOKED);
return pzEnd;
}
@@ -522,11 +535,11 @@ handle_cfg(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
* or else we must have skipped over white space. Anything else
* is an invalid format and we give up parsing the text.
*/
- if ((*pzText == '=') || (*pzText == ':')) {
- while (IS_WHITESPACE_CHAR(*++pzText)) ;
- if (pzText > pzEnd)
+ if ((*txt == '=') || (*txt == ':')) {
+ txt = SPN_WHITESPACE_CHARS(txt+1);
+ if (txt > pzEnd)
goto name_only;
- } else if (! IS_WHITESPACE_CHAR(pzText[-1]))
+ } else if (! IS_WHITESPACE_CHAR(txt[-1]))
return NULL;
/*
@@ -542,16 +555,16 @@ handle_cfg(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
switch (ch) {
case NUL:
pcS = NULL;
+ /* FALLTHROUGH */
- case '\n':
+ case NL:
*pcD = NUL;
pzEnd = pcS;
goto copy_done;
case '\\':
- if (*pcS == '\n') {
+ if (*pcS == NL)
ch = *(pcS++);
- }
/* FALLTHROUGH */
default:
*(pcD++) = ch;
@@ -569,19 +582,22 @@ handle_cfg(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
* "pzName" points to what looks like text for one option/configurable.
* It is NUL terminated. Process it.
*/
- loadOptionLine(pOpts, pOS, pzName, dir, OPTION_LOAD_UNCOOKED);
+ load_opt_line(opts, ost, pzName, dir, OPTION_LOAD_UNCOOKED);
return pzEnd;
}
-
/**
- * "pzText" points to a "<?" sequence.
+ * "txt" points to a "<?" sequence.
* We handle "<?program" and "<?auto-options" directives.
* All others are treated as comments.
+ *
+ * @param[in,out] opts program option descriptor
+ * @param[in] txt scanning pointer
+ * @returns the next character to look at
*/
static char *
-handle_directive(tOptions * pOpts, char * pzText)
+handle_directive(tOptions * opts, char * txt)
{
# define DIRECTIVE_TABLE \
_dt_(zCfgProg, program_directive) \
@@ -610,112 +626,124 @@ handle_directive(tOptions * pOpts, char * pzText)
for (ix = 0; ix < dir_ct; ix++) {
size_t len = strlen(dir_names[ix]);
- if ( (strncmp(pzText + 2, dir_names[ix], len) == 0)
- && (! IS_VALUE_NAME_CHAR(pzText[len+2])) )
- return dir_disp[ix](pOpts, pzText + len + 2);
+ if ( (strncmp(txt + 2, dir_names[ix], len) == 0)
+ && (! IS_VALUE_NAME_CHAR(txt[len+2])) )
+ return dir_disp[ix](opts, txt + len + 2);
}
/*
* We don't know what this is. Skip it.
*/
- pzText = strchr(pzText+2, '>');
- if (pzText != NULL)
- pzText++;
- return pzText;
+ txt = strchr(txt+2, '>');
+ if (txt != NULL)
+ txt++;
+ return txt;
+# undef DIRECTIVE_TABLE
}
/**
- * handle AutoOpts mode flags
+ * handle AutoOpts mode flags.
+ *
+ * @param[in,out] opts program option descriptor
+ * @param[in] txt scanning pointer
+ * @returns the next character to look at
*/
static char *
-aoflags_directive(tOptions * pOpts, char * pzText)
+aoflags_directive(tOptions * opts, char * txt)
{
- char * pz = pzText;
+ char * pz;
- while (IS_WHITESPACE_CHAR(*++pz)) ;
- pzText = strchr(pz, '>');
- if (pzText != NULL) {
+ pz = SPN_WHITESPACE_CHARS(txt+1);
+ txt = strchr(pz, '>');
+ if (txt != NULL) {
- size_t len = pzText - pz;
+ size_t len = (unsigned)(txt - pz);
char * ftxt = AGALOC(len + 1, "aoflags");
memcpy(ftxt, pz, len);
ftxt[len] = NUL;
- set_usage_flags(pOpts, ftxt);
+ set_usage_flags(opts, ftxt);
AGFREE(ftxt);
- pzText++;
+ txt++;
}
- return pzText;
+ return txt;
}
/**
* handle program segmentation of config file.
+ *
+ * @param[in,out] opts program option descriptor
+ * @param[in] txt scanning pointer
+ * @returns the next character to look at
*/
static char *
-program_directive(tOptions * pOpts, char * pzText)
+program_directive(tOptions * opts, char * txt)
{
static char const ttlfmt[] = "<?";
size_t ttl_len = sizeof(ttlfmt) + strlen(zCfgProg);
char * ttl = AGALOC(ttl_len, "prog title");
- size_t name_len = strlen(pOpts->pzProgName);
+ size_t name_len = strlen(opts->pzProgName);
memcpy(ttl, ttlfmt, sizeof(ttlfmt) - 1);
memcpy(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1));
do {
- while (IS_WHITESPACE_CHAR(*++pzText)) ;
+ txt = SPN_WHITESPACE_CHARS(txt+1);
- if ( (strneqvcmp(pzText, pOpts->pzProgName, (int)name_len) == 0)
- && (IS_END_XML_TOKEN_CHAR(pzText[name_len])) ) {
- pzText += name_len;
+ if ( (strneqvcmp(txt, opts->pzProgName, (int)name_len) == 0)
+ && (IS_END_XML_TOKEN_CHAR(txt[name_len])) ) {
+ txt += name_len;
break;
}
- pzText = strstr(pzText, ttl);
- } while (pzText != NULL);
+ txt = strstr(txt, ttl);
+ } while (txt != NULL);
AGFREE(ttl);
- if (pzText != NULL)
+ if (txt != NULL)
for (;;) {
- if (*pzText == NUL) {
- pzText = NULL;
+ if (*txt == NUL) {
+ txt = NULL;
break;
}
- if (*(pzText++) == '>')
+ if (*(txt++) == '>')
break;
}
- return pzText;
+ return txt;
}
-
/**
- * "pzText" points to a '[' character.
+ * "txt" points to a '[' character.
* The "traditional" [PROG_NAME] segmentation of the config file.
* Do not ever mix with the "<?program prog-name>" variation.
+ *
+ * @param[in,out] opts program option descriptor
+ * @param[in] txt scanning pointer
+ * @returns the next character to look at
*/
static char *
-handle_section(tOptions * pOpts, char * pzText)
+handle_section(tOptions * opts, char * txt)
{
- size_t len = strlen(pOpts->pzPROGNAME);
- if ( (strncmp(pzText+1, pOpts->pzPROGNAME, len) == 0)
- && (pzText[len+1] == ']'))
- return strchr(pzText + len + 2, '\n');
+ size_t len = strlen(opts->pzPROGNAME);
+ if ( (strncmp(txt+1, opts->pzPROGNAME, len) == 0)
+ && (txt[len+1] == ']'))
+ return strchr(txt + len + 2, NL);
if (len > 16)
return NULL;
{
char z[24];
- sprintf(z, "[%s]", pOpts->pzPROGNAME);
- pzText = strstr(pzText, z);
+ sprintf(z, "[%s]", opts->pzPROGNAME);
+ txt = strstr(txt, z);
}
- if (pzText != NULL)
- pzText = strchr(pzText, '\n');
- return pzText;
+ if (txt != NULL)
+ txt = strchr(txt, NL);
+ return txt;
}
/**
@@ -733,7 +761,7 @@ parse_xml_encoding(char ** ppz)
_xmlNm_(cr, '\r') \
_xmlNm_(vt, '\v') \
_xmlNm_(bel, '\a') \
- _xmlNm_(nl, '\n') \
+ _xmlNm_(nl, NL) \
_xmlNm_(space, ' ') \
_xmlNm_(quot, '"') \
_xmlNm_(apos, '\'')
@@ -809,28 +837,35 @@ parse_xml_encoding(char ** ppz)
* except for OPTION_LOAD_UNCOOKED.
*/
static char *
-trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode)
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode)
{
static char const fmt[] = "</%s>";
- char z[64], *pz = z;
size_t len = strlen(pznm) + sizeof(fmt) - 2 /* for %s */;
+ char * etext;
- if (len > sizeof(z))
- pz = AGALOC(len, "scan name");
+ {
+ char z[64], *pz = z;
+ if (len >= sizeof(z))
+ pz = AGALOC(len, "scan name");
+
+ len = (size_t)sprintf(pz, fmt, pznm);
+ *intxt = ' ';
+ etext = strstr(intxt, pz);
+ if (pz != z) AGFREE(pz);
+ }
- sprintf(pz, fmt, pznm);
- *pztxt = ' ';
- pztxt = strstr(pztxt, pz);
- if (pz != z) AGFREE(pz);
+ if (etext == NULL)
+ return etext;
- if (pztxt == NULL)
- return pztxt;
+ {
+ char * result = etext + len;
- if (mode != OPTION_LOAD_UNCOOKED)
- while (IS_WHITESPACE_CHAR(pztxt[-1])) len++, pztxt--;
+ if (mode != OPTION_LOAD_UNCOOKED)
+ etext = SPN_WHITESPACE_BACK(intxt, etext);
- *pztxt = NUL;
- return pztxt + len - 1 /* for NUL byte */;
+ *etext = NUL;
+ return result;
+ }
}
/**
@@ -851,8 +886,8 @@ cook_xml_text(char * pzData)
return;
case '&':
- *(pzd++) = \
- ch = parse_xml_encoding(&pzs);
+ ch = parse_xml_encoding(&pzs);
+ *(pzd++) = (char)ch;
if (ch == NUL)
return;
break;
@@ -865,77 +900,80 @@ cook_xml_text(char * pzData)
return;
}
- ch = strtoul(bf, NULL, 16);
+ ch = (int)strtoul(bf, NULL, 16);
/* FALLTHROUGH */
default:
- *(pzd++) = ch;
+ *(pzd++) = (char)ch;
}
}
}
/**
- * "pzText" points to a '<' character, followed by an alpha.
+ * "txt" points to a '<' character, followed by an alpha.
* The end of the entry is either the "/>" following the name, or else a
* "</name>" string.
*/
static char *
-handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
+handle_struct(tOptions * opts, tOptState * ost, char * txt, int dir)
{
tOptionLoadMode mode = option_load_mode;
tOptionValue valu;
- char* pzName = ++pzText;
+ char* pzName = ++txt;
char* pzData;
char* pcNulPoint;
- while (IS_VALUE_NAME_CHAR(*pzText)) pzText++;
- pcNulPoint = pzText;
+ txt = SPN_VALUE_NAME_CHARS(txt);
+ pcNulPoint = txt;
valu.valType = OPARG_TYPE_STRING;
- switch (*pzText) {
+ switch (*txt) {
case ' ':
case '\t':
- pzText = parseAttributes(pOpts, pzText, &mode, &valu);
- if (*pzText == '>')
+ txt = (void *)parse_attrs(
+ opts, SPN_WHITESPACE_CHARS(txt), &mode, &valu);
+ if (txt == NULL)
+ return txt;
+ if (*txt == '>')
break;
- if (*pzText != '/')
+ if (*txt != '/')
return NULL;
/* FALLTHROUGH */
case '/':
- if (pzText[1] != '>')
+ if (txt[1] != '>')
return NULL;
- *pzText = NUL;
- pzText += 2;
- loadOptionLine(pOpts, pOS, pzName, dir, mode);
- return pzText;
+ *txt = NUL;
+ txt += 2;
+ load_opt_line(opts, ost, pzName, dir, mode);
+ return txt;
case '>':
break;
default:
- pzText = strchr(pzText, '>');
- if (pzText != NULL)
- pzText++;
- return pzText;
+ txt = strchr(txt, '>');
+ if (txt != NULL)
+ txt++;
+ return txt;
}
/*
- * If we are here, we have a value. "pzText" points to a closing angle
+ * If we are here, we have a value. "txt" points to a closing angle
* bracket. Separate the name from the value for a moment.
*/
*pcNulPoint = NUL;
- pzData = ++pzText;
- pzText = trim_xml_text(pzText, pzName, mode);
- if (pzText == NULL)
- return pzText;
+ pzData = ++txt;
+ txt = trim_xml_text(txt, pzName, mode);
+ if (txt == NULL)
+ return txt;
/*
- * Rejoin the name and value for parsing by "loadOptionLine()".
- * Erase any attributes parsed by "parseAttributes()".
+ * Rejoin the name and value for parsing by "load_opt_line()".
+ * Erase any attributes parsed by "parse_attrs()".
*/
- memset(pcNulPoint, ' ', pzData - pcNulPoint);
+ memset(pcNulPoint, ' ', (size_t)(pzData - pcNulPoint));
/*
* If we are getting a "string" value that is to be cooked,
@@ -949,40 +987,39 @@ handle_struct(tOptions * pOpts, tOptState * pOS, char * pzText, int dir)
* "pzName" points to what looks like text for one option/configurable.
* It is NUL terminated. Process it.
*/
- loadOptionLine(pOpts, pOS, pzName, dir, mode);
+ load_opt_line(opts, ost, pzName, dir, mode);
- return pzText;
+ return txt;
}
-
/**
* Load a configuration file. This may be invoked either from
* scanning the "homerc" list, or from a specific file request.
* (see "optionFileLoad()", the implementation for --load-opts)
*/
LOCAL void
-internalFileLoad(tOptions* pOpts)
+intern_file_load(tOptions * opts)
{
uint32_t svfl;
int idx;
int inc;
- char zFileName[ AG_PATH_MAX+1 ];
+ char f_name[ AG_PATH_MAX+1 ];
- if (pOpts->papzHomeList == NULL)
+ if (opts->papzHomeList == NULL)
return;
- svfl = pOpts->fOptSet;
+ svfl = opts->fOptSet;
inc = DIRECTION_PRESET;
/*
* Never stop on errors in config files.
*/
- pOpts->fOptSet &= ~OPTPROC_ERRSTOP;
+ opts->fOptSet &= ~OPTPROC_ERRSTOP;
/*
* Find the last RC entry (highest priority entry)
*/
- for (idx = 0; pOpts->papzHomeList[ idx+1 ] != NULL; ++idx) ;
+ for (idx = 0; opts->papzHomeList[ idx+1 ] != NULL; ++idx) ;
/*
* For every path in the home list, ... *TWICE* We start at the last
@@ -991,8 +1028,8 @@ internalFileLoad(tOptions* pOpts)
* Then we go back up, doing the normal options.
*/
for (;;) {
- struct stat StatBuf;
- cch_t* pzPath;
+ struct stat sb;
+ cch_t * path;
/*
* IF we've reached the bottom end, change direction
@@ -1002,18 +1039,18 @@ internalFileLoad(tOptions* pOpts)
idx = 0;
}
- pzPath = pOpts->papzHomeList[ idx ];
+ path = opts->papzHomeList[ idx ];
/*
* IF we've reached the top end, bail out
*/
- if (pzPath == NULL)
+ if (path == NULL)
break;
idx += inc;
- if (! optionMakePath(zFileName, (int)sizeof(zFileName),
- pzPath, pOpts->pzProgPath))
+ if (! optionMakePath(f_name, (int)sizeof(f_name),
+ path, opts->pzProgPath))
continue;
/*
@@ -1021,47 +1058,46 @@ internalFileLoad(tOptions* pOpts)
* THEN append the Resource Configuration file name
* ELSE we must have the complete file name
*/
- if (stat(zFileName, &StatBuf) != 0)
+ if (stat(f_name, &sb) != 0)
continue; /* bogus name - skip the home list entry */
- if (S_ISDIR(StatBuf.st_mode)) {
- size_t len = strlen(zFileName);
- size_t nln = strlen(pOpts->pzRcName) + 1;
- char * pz = zFileName + len;
+ if (S_ISDIR(sb.st_mode)) {
+ size_t len = strlen(f_name);
+ size_t nln = strlen(opts->pzRcName) + 1;
+ char * pz = f_name + len;
- if (len + 1 + nln >= sizeof(zFileName))
+ if (len + 1 + nln >= sizeof(f_name))
continue;
if (pz[-1] != DIRCH)
*(pz++) = DIRCH;
- memcpy(pz, pOpts->pzRcName, nln);
+ memcpy(pz, opts->pzRcName, nln);
}
- file_preset(pOpts, zFileName, inc);
+ file_preset(opts, f_name, inc);
/*
* IF we are now to skip config files AND we are presetting,
* THEN change direction. We must go the other way.
*/
{
- tOptDesc * pOD = pOpts->pOptDesc + pOpts->specOptIdx.save_opts+1;
- if (DISABLED_OPT(pOD) && PRESETTING(inc)) {
+ tOptDesc * od = opts->pOptDesc + opts->specOptIdx.save_opts + 1;
+ if (DISABLED_OPT(od) && PRESETTING(inc)) {
idx -= inc; /* go back and reprocess current file */
inc = DIRECTION_PROCESS;
}
}
} /* twice for every path in the home list, ... */
- pOpts->fOptSet = svfl;
+ opts->fOptSet = svfl;
}
-
/*=export_func optionFileLoad
*
* what: Load the locatable config files, in order
*
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + char const* + pzProg + program name +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + char const* + prog + program name +
*
* ret_type: int
* ret_desc: 0 -> SUCCESS, -1 -> FAILURE
@@ -1090,317 +1126,254 @@ internalFileLoad(tOptions* pOpts)
* always be returned.
=*/
int
-optionFileLoad(tOptions* pOpts, char const* pzProgram)
+optionFileLoad(tOptions * opts, char const * prog)
{
- if (! SUCCESSFUL(validateOptionsStruct(pOpts, pzProgram)))
+ if (! SUCCESSFUL(validate_struct(opts, prog)))
return -1;
+ /*
+ * The pointer to the program name is "const". However, the
+ * structure is in writable memory, so we coerce the address
+ * of this pointer to point to writable memory.
+ */
{
char const ** pp =
- (char const **)(void *)&(pOpts->pzProgName);
- *pp = pzProgram;
+ (char const **)(void *)&(opts->pzProgName);
+ *pp = prog;
}
- internalFileLoad(pOpts);
+ intern_file_load(opts);
return 0;
}
-
/*=export_func optionLoadOpt
* private:
*
* what: Load an option rc/ini file
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + odesc + the descriptor for this arg +
*
* doc:
* Processes the options found in the file named with
- * pOptDesc->optArg.argString.
+ * odesc->optArg.argString.
=*/
void
-optionLoadOpt(tOptions* pOpts, tOptDesc* pOptDesc)
+optionLoadOpt(tOptions * opts, tOptDesc * odesc)
{
struct stat sb;
+ if (opts <= OPTPROC_EMIT_LIMIT)
+ return;
+
/*
* IF the option is not being disabled, THEN load the file. There must
* be a file. (If it is being disabled, then the disablement processing
* already took place. It must be done to suppress preloading of ini/rc
* files.)
*/
- if ( DISABLED_OPT(pOptDesc)
- || ((pOptDesc->fOptState & OPTST_RESET) != 0))
+ if ( DISABLED_OPT(odesc)
+ || ((odesc->fOptState & OPTST_RESET) != 0))
return;
- if (stat(pOptDesc->optArg.argString, &sb) != 0) {
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) == 0)
+ if (stat(odesc->optArg.argString, &sb) != 0) {
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) == 0)
return;
- fprintf(stderr, zFSErrOptLoad, errno, strerror(errno),
- pOptDesc->optArg.argString);
- exit(EX_NOINPUT);
+ fserr_exit(opts->pzProgName, "stat", odesc->optArg.argString);
/* NOT REACHED */
}
if (! S_ISREG(sb.st_mode)) {
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) == 0)
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) == 0)
return;
-
- fprintf(stderr, zNotFile, pOptDesc->optArg.argString);
- exit(EX_NOINPUT);
+ errno = EINVAL;
+ fserr_exit(opts->pzProgName, "stat", odesc->optArg.argString);
/* NOT REACHED */
}
- file_preset(pOpts, pOptDesc->optArg.argString, DIRECTION_CALLED);
+ file_preset(opts, odesc->optArg.argString, DIRECTION_CALLED);
}
-
/**
* Parse the various attributes of an XML-styled config file entry
+ *
+ * @returns NULL on failure, otherwise the scan point
*/
-LOCAL char*
-parseAttributes(
- tOptions* pOpts,
- char* pzText,
- tOptionLoadMode* pMode,
- tOptionValue* pType )
+LOCAL char const *
+parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
+ tOptionValue * pType)
{
- size_t len;
-
- do {
- if (! IS_WHITESPACE_CHAR(*pzText))
- switch (*pzText) {
- case '/': pType->valType = OPARG_TYPE_NONE;
- case '>': return pzText;
-
- default:
- case NUL: return NULL;
- }
+ size_t len = 0;
- while (IS_WHITESPACE_CHAR(*++pzText)) ;
- len = 0;
- while (IS_LOWER_CASE_CHAR(pzText[len])) len++;
+ for (;;) {
+ len = (size_t)(SPN_LOWER_CASE_CHARS(txt) - txt);
- switch (find_xat_attribute_id(pzText, len)) {
- case XAT_KWD_TYPE:
- pzText = parse_value(pzText+len, pType);
+ /*
+ * The enumeration used in this switch is derived from this switch
+ * statement itself. The "find_option_xat_attribute_cmd" function
+ * will return XAT_CMD_MEMBERS for the "txt" string value
+ * "members", etc.
+ */
+ switch (find_option_xat_attribute_cmd(txt, len)) {
+ case XAT_CMD_TYPE:
+ txt = parse_value(txt+len, pType);
break;
- case XAT_KWD_WORDS:
- pzText = parse_keyword(pOpts, pzText+len, pType);
+ case XAT_CMD_WORDS:
+ txt = parse_keyword(opts, txt+len, pType);
break;
- case XAT_KWD_MEMBERS:
- pzText = parse_set_mem(pOpts, pzText+len, pType);
+ case XAT_CMD_MEMBERS:
+ txt = parse_set_mem(opts, txt+len, pType);
break;
- case XAT_KWD_COOKED:
- pzText += len;
- if (! IS_END_XML_TOKEN_CHAR(*pzText))
+ case XAT_CMD_COOKED:
+ txt += len;
+ if (! IS_END_XML_TOKEN_CHAR(*txt))
goto invalid_kwd;
*pMode = OPTION_LOAD_COOKED;
break;
- case XAT_KWD_UNCOOKED:
- pzText += len;
- if (! IS_END_XML_TOKEN_CHAR(*pzText))
+ case XAT_CMD_UNCOOKED:
+ txt += len;
+ if (! IS_END_XML_TOKEN_CHAR(*txt))
goto invalid_kwd;
*pMode = OPTION_LOAD_UNCOOKED;
break;
- case XAT_KWD_KEEP:
- pzText += len;
- if (! IS_END_XML_TOKEN_CHAR(*pzText))
+ case XAT_CMD_KEEP:
+ txt += len;
+ if (! IS_END_XML_TOKEN_CHAR(*txt))
goto invalid_kwd;
*pMode = OPTION_LOAD_KEEP;
break;
default:
- case XAT_KWD_INVALID:
+ case XAT_INVALID_CMD:
invalid_kwd:
pType->valType = OPARG_TYPE_NONE;
- return skip_unkn(pzText);
+ return skip_unkn(txt);
}
- } while (pzText != NULL);
- return pzText;
+ if (txt == NULL)
+ return NULL;
+ txt = SPN_WHITESPACE_CHARS(txt);
+ switch (*txt) {
+ case '/': pType->valType = OPARG_TYPE_NONE;
+ /* FALLTHROUGH */
+ case '>': return txt;
+ }
+ if (! IS_LOWER_CASE_CHAR(*txt))
+ return NULL;
+ }
}
-
/**
- * "pzText" points to the character after "words=".
+ * "txt" points to the character after "words=".
* What should follow is a name of a keyword (enumeration) list.
+ *
+ * @param opts unused
+ * @param[in] txt keyword to skip over
+ * @param type unused value type
+ * @returns pointer after skipped text
*/
-static char*
-parse_keyword(tOptions * pOpts, char * pzText, tOptionValue * pType)
+static char const *
+parse_keyword(tOptions * opts, char const * txt, tOptionValue * typ)
{
- return skip_unkn(pzText);
-}
+ (void)opts;
+ (void)typ;
+ return skip_unkn(txt);
+}
/**
- * "pzText" points to the character after "members="
+ * "txt" points to the character after "members="
* What should follow is a name of a "set membership".
* A collection of bit flags.
+ *
+ * @param opts unused
+ * @param[in] txt keyword to skip over
+ * @param type unused value type
+ * @returns pointer after skipped text
*/
-static char*
-parse_set_mem(tOptions * pOpts, char * pzText, tOptionValue * pType)
+static char const *
+parse_set_mem(tOptions * opts, char const * txt, tOptionValue * typ)
{
- return skip_unkn(pzText);
-}
+ (void)opts;
+ (void)typ;
+ return skip_unkn(txt);
+}
/**
- * "pzText" points to the character after "type="
+ * parse the type. The keyword "type" was found, now figure out
+ * the type that follows the type.
+ *
+ * @param[in] txt points to the '=' character after the "type" keyword.
+ * @param[out] typ where to store the type found
+ * @returns the next byte after the type name
*/
-static char *
-parse_value(char * pzText, tOptionValue * pType)
+static char const *
+parse_value(char const * txt, tOptionValue * typ)
{
size_t len = 0;
- if (*(pzText++) != '=')
+ if (*(txt++) != '=')
goto woops;
- while (IS_OPTION_NAME_CHAR(pzText[len])) len++;
- pzText += len;
+ len = (size_t)(SPN_OPTION_NAME_CHARS(txt) - txt);
- if ((len == 0) || (! IS_END_XML_TOKEN_CHAR(*pzText))) {
+ if ((len == 0) || (! IS_END_XML_TOKEN_CHAR(txt[len]))) {
woops:
- pType->valType = OPARG_TYPE_NONE;
- return skip_unkn(pzText);
+ typ->valType = OPARG_TYPE_NONE;
+ return skip_unkn(txt + len);
}
- switch (find_value_type_id(pzText - len, len)) {
+ /*
+ * The enumeration used in this switch is derived from this switch
+ * statement itself. The "find_option_value_type_cmd" function
+ * will return VTP_CMD_INTEGER for the "txt" string value
+ * "integer", etc.
+ */
+ switch (find_option_value_type_cmd(txt, len)) {
default:
- case VTP_KWD_INVALID: goto woops;
+ case VTP_INVALID_CMD: goto woops;
- case VTP_KWD_STRING:
- pType->valType = OPARG_TYPE_STRING;
+ case VTP_CMD_STRING:
+ typ->valType = OPARG_TYPE_STRING;
break;
- case VTP_KWD_INTEGER:
- pType->valType = OPARG_TYPE_NUMERIC;
+ case VTP_CMD_INTEGER:
+ typ->valType = OPARG_TYPE_NUMERIC;
break;
- case VTP_KWD_BOOL:
- case VTP_KWD_BOOLEAN:
- pType->valType = OPARG_TYPE_BOOLEAN;
+ case VTP_CMD_BOOL:
+ case VTP_CMD_BOOLEAN:
+ typ->valType = OPARG_TYPE_BOOLEAN;
break;
- case VTP_KWD_KEYWORD:
- pType->valType = OPARG_TYPE_ENUMERATION;
+ case VTP_CMD_KEYWORD:
+ typ->valType = OPARG_TYPE_ENUMERATION;
break;
- case VTP_KWD_SET:
- case VTP_KWD_SET_MEMBERSHIP:
- pType->valType = OPARG_TYPE_MEMBERSHIP;
+ case VTP_CMD_SET:
+ case VTP_CMD_SET_MEMBERSHIP:
+ typ->valType = OPARG_TYPE_MEMBERSHIP;
break;
- case VTP_KWD_NESTED:
- case VTP_KWD_HIERARCHY:
- pType->valType = OPARG_TYPE_HIERARCHY;
- }
-
- return pzText;
-}
-
-
-/**
- * Skip over some unknown attribute
- */
-static char *
-skip_unkn(char* pzText)
-{
- for (;; pzText++) {
- if (IS_END_XML_TOKEN_CHAR(*pzText)) return pzText;
- if (*pzText == NUL) return NULL;
- }
-}
-
-
-/**
- * Make sure the option descriptor is there and that we understand it.
- * This should be called from any user entry point where one needs to
- * worry about validity. (Some entry points are free to assume that
- * the call is not the first to the library and, thus, that this has
- * already been called.)
- */
-LOCAL tSuccess
-validateOptionsStruct(tOptions* pOpts, char const* pzProgram)
-{
- if (pOpts == NULL) {
- fputs(zAO_Bad, stderr);
- exit(EX_CONFIG);
- }
-
- /*
- * IF the client has enabled translation and the translation procedure
- * is available, then go do it.
- */
- if ( ((pOpts->fOptSet & OPTPROC_TRANSLATE) != 0)
- && (pOpts->pTransProc != NULL) ) {
- /*
- * If option names are not to be translated at all, then do not do
- * it for configuration parsing either. (That is the bit that really
- * gets tested anyway.)
- */
- if ((pOpts->fOptSet & OPTPROC_NO_XLAT_MASK) == OPTPROC_NXLAT_OPT)
- pOpts->fOptSet |= OPTPROC_NXLAT_OPT_CFG;
- (*pOpts->pTransProc)();
- pOpts->fOptSet &= ~OPTPROC_TRANSLATE;
+ case VTP_CMD_NESTED:
+ case VTP_CMD_HIERARCHY:
+ typ->valType = OPARG_TYPE_HIERARCHY;
}
- /*
- * IF the struct version is not the current, and also
- * either too large (?!) or too small,
- * THEN emit error message and fail-exit
- */
- if ( ( pOpts->structVersion != OPTIONS_STRUCT_VERSION )
- && ( (pOpts->structVersion > OPTIONS_STRUCT_VERSION )
- || (pOpts->structVersion < OPTIONS_MINIMUM_VERSION )
- ) ) {
- static char const aover[] =
- __STR(AO_CURRENT)":"__STR(AO_REVISION)":"__STR(AO_AGE)"\n";
-
- fprintf(stderr, zAO_Err, pzProgram, NUM_TO_VER(pOpts->structVersion));
- if (pOpts->structVersion > OPTIONS_STRUCT_VERSION )
- fputs(zAO_Big, stderr);
- else
- fputs(zAO_Sml, stderr);
-
- fwrite(aover, sizeof(aover) - 1, 1, stderr);
- return FAILURE;
- }
-
- /*
- * If the program name hasn't been set, then set the name and the path
- * and the set of equivalent characters.
- */
- if (pOpts->pzProgName == NULL) {
- char const * pz = strrchr(pzProgram, DIRCH);
- char const ** pp =
- (char const **)(void **)&(pOpts->pzProgName);
- if (pz == NULL)
- *pp = pzProgram;
- else *pp = pz+1;
-
- pp = (char const **)(void **)&(pOpts->pzProgPath);
- *pp = pzProgram;
-
- /*
- * when comparing long names, these are equivalent
- */
- strequate(zSepChars);
- }
-
- return SUCCESS;
+ return txt + len;
}
-
-/**
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/cook.c b/sntp/libopts/cook.c
index 811ce593080a..952aac95065d 100644
--- a/sntp/libopts/cook.c
+++ b/sntp/libopts/cook.c
@@ -1,14 +1,16 @@
/**
* \file cook.c
*
- * Time-stamp: "2011-03-12 15:05:26 bkorb"
- *
* This file contains the routines that deal with processing quoted strings
* into an internal format.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -20,15 +22,15 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/* = = = START-STATIC-FORWARD = = = */
-static ag_bool
+static bool
contiguous_quote(char ** pps, char * pq, int * lnct_p);
/* = = = END-STATIC-FORWARD = = = */
@@ -59,26 +61,26 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p);
* err: @code{NULL} is returned if the string is mal-formed.
=*/
unsigned int
-ao_string_cook_escape_char( char const* pzIn, char* pRes, u_int nl )
+ao_string_cook_escape_char(char const * pzIn, char * pRes, uint_t nl)
{
- unsigned int res = 1;
+ unsigned int res = 1;
switch (*pRes = *pzIn++) {
case NUL: /* NUL - end of input string */
return 0;
case '\r':
- if (*pzIn != '\n')
+ if (*pzIn != NL)
return 1;
res++;
/* FALLTHROUGH */
- case '\n': /* NL - emit newline */
+ case NL: /* NL - emit newline */
*pRes = (char)nl;
return res;
case 'a': *pRes = '\a'; break;
case 'b': *pRes = '\b'; break;
case 'f': *pRes = '\f'; break;
- case 'n': *pRes = '\n'; break;
+ case 'n': *pRes = NL; break;
case 'r': *pRes = '\r'; break;
case 't': *pRes = '\t'; break;
case 'v': *pRes = '\v'; break;
@@ -86,13 +88,17 @@ ao_string_cook_escape_char( char const* pzIn, char* pRes, u_int nl )
case 'x':
case 'X': /* HEX Escape */
if (IS_HEX_DIGIT_CHAR(*pzIn)) {
- char z[4], *pz = z;
+ char z[4];
+ unsigned int ct = 0;
- do *(pz++) = *(pzIn++);
- while (IS_HEX_DIGIT_CHAR(*pzIn) && (pz < z + 2));
- *pz = NUL;
- *pRes = (unsigned char)strtoul(z, NULL, 16);
- res += pz - z;
+ do {
+ z[ct] = pzIn[ct];
+ if (++ct >= 2)
+ break;
+ } while (IS_HEX_DIGIT_CHAR(pzIn[ct]));
+ z[ct] = NUL;
+ *pRes = (char)strtoul(z, NULL, 16);
+ return ct + 1;
}
break;
@@ -101,24 +107,29 @@ ao_string_cook_escape_char( char const* pzIn, char* pRes, u_int nl )
{
/*
* IF the character copied was an octal digit,
- * THEN set the output character to an octal value
+ * THEN set the output character to an octal value.
+ * The 3 octal digit result might exceed 0xFF, so check it.
*/
- char z[4], *pz = z + 1;
+ char z[4];
unsigned long val;
- z[0] = *pRes;
+ unsigned int ct = 0;
+
+ z[ct++] = *--pzIn;
+ while (IS_OCT_DIGIT_CHAR(pzIn[ct])) {
+ z[ct] = pzIn[ct];
+ if (++ct >= 3)
+ break;
+ }
- while (IS_OCT_DIGIT_CHAR(*pzIn) && (pz < z + 3))
- *(pz++) = *(pzIn++);
- *pz = NUL;
+ z[ct] = NUL;
val = strtoul(z, NULL, 8);
if (val > 0xFF)
val = 0xFF;
- *pRes = (unsigned char)val;
- res = pz - z;
- break;
+ *pRes = (char)val;
+ return ct;
}
- default: ;
+ default: /* quoted character is result character */;
}
return res;
@@ -130,14 +141,14 @@ ao_string_cook_escape_char( char const* pzIn, char* pRes, u_int nl )
* A quoted string has been found.
* Find the end of it and compress any escape sequences.
*/
-static ag_bool
+static bool
contiguous_quote(char ** pps, char * pq, int * lnct_p)
{
char * ps = *pps + 1;
for (;;) {
while (IS_WHITESPACE_CHAR(*ps))
- if (*(ps++) == '\n')
+ if (*(ps++) == NL)
(*lnct_p)++;
/*
@@ -149,7 +160,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
case '\'':
*pq = *(ps++); /* assign new quote character and return */
*pps = ps;
- return AG_TRUE;
+ return true;
case '/':
/*
@@ -158,16 +169,16 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
switch (ps[1]) {
default:
*pps = NULL;
- return AG_FALSE;
+ return false;
case '/':
/*
* Skip to end of line
*/
- ps = strchr(ps, '\n');
+ ps = strchr(ps, NL);
if (ps == NULL) {
*pps = NULL;
- return AG_FALSE;
+ return false;
}
break;
@@ -179,11 +190,11 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
*/
if (p == NULL) {
*pps = NULL;
- return AG_FALSE;
+ return false;
}
while (ps < p) {
- if (*(ps++) == '\n')
+ if (*(ps++) == NL)
(*lnct_p)++;
}
@@ -198,7 +209,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
* The series of quoted strings has come to an end.
*/
*pps = ps;
- return AG_FALSE;
+ return false;
}
}
}
@@ -261,7 +272,7 @@ ao_string_cook(char * pzScan, int * lnct_p)
case NUL:
return NULL;
- case '\n':
+ case NL:
(*lnct_p)++;
break;
@@ -271,7 +282,7 @@ ao_string_cook(char * pzScan, int * lnct_p)
* THEN drop both the escape and the newline from
* the result string.
*/
- if (*pzS == '\n') {
+ if (*pzS == NL) {
pzS++;
pzD--;
(*lnct_p)++;
@@ -282,7 +293,8 @@ ao_string_cook(char * pzScan, int * lnct_p)
* THEN we do the full escape character processing
*/
else if (q != '\'') {
- int ct = ao_string_cook_escape_char( pzS, pzD-1, (u_int)'\n' );
+ unsigned int ct;
+ ct = ao_string_cook_escape_char(pzS, pzD-1, (uint_t)NL);
if (ct == 0)
return NULL;
@@ -302,7 +314,9 @@ ao_string_cook(char * pzScan, int * lnct_p)
} /* switch (*(pzD++) = *(pzS++)) */
} /* for (;;) */
}
-/*
+
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/enumeration.c b/sntp/libopts/enum.c
index a79a32e5d31c..299ffb12e1e4 100644
--- a/sntp/libopts/enumeration.c
+++ b/sntp/libopts/enum.c
@@ -2,16 +2,19 @@
/**
* \file enumeration.c
*
- * Time-stamp: "2011-04-06 10:48:22 bkorb"
- *
- * Automated Options Paged Usage module.
+ * Handle options with enumeration names and bit mask bit names
+ * for their arguments.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This routine will run run-on options through a pager so the
* user may examine, print or edit them at their leisure.
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -23,35 +26,36 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-static char const * pz_enum_err_fmt;
-
/* = = = START-STATIC-FORWARD = = = */
static void
enum_err(tOptions * pOpts, tOptDesc * pOD,
char const * const * paz_names, int name_ct);
static uintptr_t
-find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD,
+find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
char const * const * paz_names, unsigned int name_ct);
static void
-set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
- unsigned int name_ct);
-
-static void
set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
unsigned int name_ct);
static void
-set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
- unsigned int name_ct);
+set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
+ unsigned int nm_ct);
+
+static uintptr_t
+check_membership_start(tOptDesc * od, char const ** argp, bool * invert);
+
+static uintptr_t
+find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
+ char const * const * nm_list, unsigned int nm_ct);
/* = = = END-STATIC-FORWARD = = = */
static void
@@ -105,7 +109,7 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
*/
if (max_len > 35) {
do {
- fprintf(option_usage_fp, " %s\n", *(paz_names++));
+ fprintf(option_usage_fp, ENUM_ERR_LINE, *(paz_names++));
} while (--ct_down > 0);
}
@@ -118,19 +122,19 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
fputc(' ', option_usage_fp);
fputs(*(paz_names++), option_usage_fp);
} while (--ct_down > 0);
- fputc('\n', option_usage_fp);
+ fputc(NL, option_usage_fp);
}
/*
* Otherwise, columnize the output
*/
else {
- int ent_no = 0;
+ unsigned int ent_no = 0;
char zFmt[16]; /* format for all-but-last entries on a line */
- sprintf(zFmt, "%%-%ds", (int)max_len);
+ sprintf(zFmt, ENUM_ERR_WIDTH, (int)max_len);
max_len = 78 / max_len; /* max_len is now max entries on a line */
- fputs(" ", option_usage_fp);
+ fputs(TWO_SPACES_STR, option_usage_fp);
/*
* Loop through all but the last entry
@@ -141,14 +145,14 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
/*
* Last entry on a line. Start next line, too.
*/
- fprintf(option_usage_fp, "%s\n ", *(paz_names++));
+ fprintf(option_usage_fp, NLSTR_SPACE_FMT, *(paz_names++));
ent_no = 0;
}
else
fprintf(option_usage_fp, zFmt, *(paz_names++) );
}
- fprintf(option_usage_fp, "%s\n", *paz_names);
+ fprintf(option_usage_fp, NLSTR_FMT, *paz_names);
}
if (pOpts > OPTPROC_EMIT_LIMIT) {
@@ -166,9 +170,18 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
}
}
-
+/**
+ * Convert a name or number into a binary number.
+ * "~0" and "-1" will be converted to the largest value in the enumeration.
+ *
+ * @param name the keyword name (number) to convert
+ * @param pOpts the program's option descriptor
+ * @param pOD the option descriptor for this option
+ * @param paz_names the list of keywords for this option
+ * @param name_ct the count of keywords
+ */
static uintptr_t
-find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD,
+find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
char const * const * paz_names, unsigned int name_ct)
{
/*
@@ -176,35 +189,49 @@ find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD,
* The result gets stashed in a char* pointer.
*/
uintptr_t res = name_ct;
- size_t len = strlen((char*)pzName);
+ size_t len = strlen((char*)name);
uintptr_t idx;
- if (IS_DEC_DIGIT_CHAR(*pzName)) {
- char * pz = (char *)(void *)pzName;
+ if (IS_DEC_DIGIT_CHAR(*name)) {
+ char * pz = (char *)(void *)name;
unsigned long val = strtoul(pz, &pz, 0);
if ((*pz == NUL) && (val < name_ct))
return (uintptr_t)val;
+ pz_enum_err_fmt = znum_too_large;
+ option_usage_fp = stderr;
enum_err(pOpts, pOD, paz_names, (int)name_ct);
return name_ct;
}
+ if (IS_INVERSION_CHAR(*name) && (name[2] == NUL)) {
+ if ( ((name[0] == '~') && (name[1] == '0'))
+ || ((name[0] == '-') && (name[1] == '1')))
+ return (uintptr_t)(name_ct - 1);
+ goto oops;
+ }
+
/*
* Look for an exact match, but remember any partial matches.
* Multiple partial matches means we have an ambiguous match.
*/
for (idx = 0; idx < name_ct; idx++) {
- if (strncmp((char*)paz_names[idx], (char*)pzName, len) == 0) {
+ if (strncmp((char*)paz_names[idx], (char*)name, len) == 0) {
if (paz_names[idx][len] == NUL)
return idx; /* full match */
- res = (res != name_ct) ? ~0 : idx; /* save partial match */
+ if (res == name_ct)
+ res = idx; /* save partial match */
+ else
+ res = (uintptr_t)~0; /* may yet find full match */
}
}
if (res < name_ct)
return res; /* partial match */
- pz_enum_err_fmt = (res == name_ct) ? zNoKey : zAmbigKey;
+ oops:
+
+ pz_enum_err_fmt = (res == name_ct) ? zNoKey : zambiguous_key;
option_usage_fp = stderr;
enum_err(pOpts, pOD, paz_names, (int)name_ct);
return name_ct;
@@ -226,9 +253,9 @@ find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD,
char const *
optionKeywordName(tOptDesc * pOD, unsigned int enum_val)
{
- tOptDesc od;
-
+ tOptDesc od = { 0 };
od.optArg.argEnum = enum_val;
+
(*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od );
return od.optArg.argString;
}
@@ -272,12 +299,12 @@ optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD,
case (uintptr_t)OPTPROC_EMIT_SHELL:
{
- unsigned int ix = pOD->optArg.argEnum;
+ unsigned int ix = (unsigned int)pOD->optArg.argEnum;
/*
* print the name string.
*/
if (ix >= name_ct)
- printf("INVALID-%d", ix);
+ printf(INVALID_FMT, ix);
else
fputs(paz_names[ ix ], stdout);
@@ -286,19 +313,21 @@ optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD,
case (uintptr_t)OPTPROC_RETURN_VALNAME:
{
- tSCC zInval[] = "*INVALID*";
- unsigned int ix = pOD->optArg.argEnum;
+ unsigned int ix = (unsigned int)pOD->optArg.argEnum;
/*
* Replace the enumeration value with the name string.
*/
if (ix >= name_ct)
- return (uintptr_t)zInval;
+ return (uintptr_t)INVALID_STR;
pOD->optArg.argString = paz_names[ix];
break;
}
default:
+ if ((pOD->fOptState & OPTST_RESET) != 0)
+ break;
+
res = find_name(pOD->optArg.argString, pOpts, pOD, paz_names, name_ct);
if (pOD->fOptState & OPTST_ALLOC_ARG) {
@@ -312,31 +341,22 @@ optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD,
}
static void
-set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
- unsigned int name_ct)
-{
- /*
- * print the list of enumeration names.
- */
- enum_err(OPTPROC_EMIT_USAGE, pOD, paz_names, (int)name_ct );
-}
-
-static void
set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
unsigned int name_ct)
{
/*
* print the name string.
*/
- int ix = 0;
- uintptr_t bits = (uintptr_t)pOD->optCookie;
- size_t len = 0;
+ unsigned int ix = 0;
+ uintptr_t bits = (uintptr_t)pOD->optCookie;
+ size_t len = 0;
+ (void)pOpts;
bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1;
while (bits != 0) {
if (bits & 1) {
- if (len++ > 0) fputs(" | ", stdout);
+ if (len++ > 0) fputs(OR_STR, stdout);
fputs(paz_names[ix], stdout);
}
if (++ix >= name_ct) break;
@@ -345,18 +365,14 @@ set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
}
static void
-set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
- unsigned int name_ct)
+set_memb_names(tOptions * opts, tOptDesc * od, char const * const * nm_list,
+ unsigned int nm_ct)
{
- static char const none[] = "none";
- static char const plus[3] = " + ";
-
- char * pz;
- uintptr_t bits = (uintptr_t)pOD->optCookie;
- int ix = 0;
- size_t len = sizeof(none);
-
- bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1;
+ char * pz;
+ uintptr_t mask = (1UL << (uintptr_t)nm_ct) - 1UL;
+ uintptr_t bits = (uintptr_t)od->optCookie & mask;
+ unsigned int ix = 0;
+ size_t len = 1;
/*
* Replace the enumeration value with the name string.
@@ -364,46 +380,161 @@ set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
*/
while (bits != 0) {
if (bits & 1)
- len += strlen(paz_names[ix]) + sizeof(plus);
- if (++ix >= name_ct) break;
+ len += strlen(nm_list[ix]) + PLUS_STR_LEN + 1;
+ if (++ix >= nm_ct) break;
bits >>= 1;
}
- pOD->optArg.argString = pz = AGALOC(len, "enum name");
+ od->optArg.argString = pz = AGALOC(len, "enum");
+ bits = (uintptr_t)od->optCookie & mask;
+ if (bits == 0) {
+ *pz = NUL;
+ return;
+ }
- /*
- * Start by clearing all the bits. We want to turn off any defaults
- * because we will be restoring to current state, not adding to
- * the default set of bits.
- */
- memcpy(pz, none, sizeof(none)-1);
- pz += sizeof(none)-1;
- bits = (uintptr_t)pOD->optCookie;
- bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1;
- ix = 0;
+ for (ix = 0; ; ix++) {
+ size_t nln;
+ int doit = bits & 1;
- while (bits != 0) {
- if (bits & 1) {
- size_t nln = strlen(paz_names[ix]);
- memcpy(pz, plus, sizeof(plus));
- memcpy(pz+sizeof(plus), paz_names[ix], nln);
- pz += strlen(paz_names[ix]) + 3;
- }
- if (++ix >= name_ct) break;
bits >>= 1;
+ if (doit == 0)
+ continue;
+
+ nln = strlen(nm_list[ix]);
+ memcpy(pz, nm_list[ix], nln);
+ pz += nln;
+ if (bits == 0)
+ break;
+ memcpy(pz, PLUS_STR, PLUS_STR_LEN);
+ pz += PLUS_STR_LEN;
}
*pz = NUL;
+ (void)opts;
+}
+
+/**
+ * Check membership start conditions. An equal character (@samp{=}) says to
+ * clear the result and not carry over any residual value. A carat
+ * (@samp{^}), which may follow the equal character, says to invert the
+ * result. The scanning pointer is advanced past these characters and any
+ * leading white space. Invalid sequences are indicated by setting the
+ * scanning pointer to NULL.
+ *
+ * @param od the set membership option description
+ * @param argp a pointer to the string scanning pointer
+ * @param invert a pointer to the boolean inversion indicator
+ *
+ * @returns either zero or the original value for the optCookie.
+ */
+static uintptr_t
+check_membership_start(tOptDesc * od, char const ** argp, bool * invert)
+{
+ uintptr_t res = (uintptr_t)od->optCookie;
+ char const * arg = SPN_WHITESPACE_CHARS(od->optArg.argString);
+ if ((arg == NULL) || (*arg == NUL))
+ goto member_start_fail;
+
+ *invert = false;
+
+ switch (*arg) {
+ case '=':
+ res = 0UL;
+ arg = SPN_WHITESPACE_CHARS(arg + 1);
+ switch (*arg) {
+ case '=': case ',':
+ goto member_start_fail;
+ case '^':
+ goto inversion;
+ default:
+ break;
+ }
+ break;
+
+ case '^':
+ inversion:
+ *invert = true;
+ arg = SPN_WHITESPACE_CHARS(arg + 1);
+ if (*arg != ',')
+ break;
+ /* FALLTHROUGH */
+
+ case ',':
+ goto member_start_fail;
+
+ default:
+ break;
+ }
+
+ *argp = arg;
+ return res;
+
+member_start_fail:
+ *argp = NULL;
+ return 0UL;
+}
+
+/**
+ * convert a name to a bit. Look up a name string to get a bit number
+ * and shift the value "1" left that number of bits.
+ *
+ * @param opts program options descriptor
+ * @param od the set membership option description
+ * @param pz address of the start of the bit name
+ * @param nm_list the list of names for this option
+ * @param nm_ct the number of entries in this list
+ *
+ * @returns 0UL on error, other an unsigned long with the correct bit set.
+ */
+static uintptr_t
+find_member_bit(tOptions * opts, tOptDesc * od, char const * pz, int len,
+ char const * const * nm_list, unsigned int nm_ct)
+{
+ char nm_buf[ AO_NAME_SIZE ];
+
+ memcpy(nm_buf, pz, len);
+ nm_buf[len] = NUL;
+
+ {
+ unsigned int shift_ct = (unsigned int)
+ find_name(nm_buf, opts, od, nm_list, nm_ct);
+ if (shift_ct >= nm_ct)
+ return 0UL;
+
+ return 1UL << shift_ct;
+ }
+}
+
+/*=export_func optionMemberList
+ * what: Get the list of members of a bit mask set
+ *
+ * arg: tOptDesc *, od, the set membership option description
+ *
+ * ret_type: char*
+ * ret_desc: the names of the set bits
+ *
+ * doc: This converts the OPT_VALUE_name mask value to a allocated string.
+ * It is the caller's responsibility to free the string.
+=*/
+char *
+optionMemberList(tOptDesc * od)
+{
+ uintptr_t sv = od->optArg.argIntptr;
+ char * res;
+ (*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
+ res = (void *)od->optArg.argString;
+ od->optArg.argIntptr = sv;
+ return res;
}
/*=export_func optionSetMembers
* what: Convert between bit flag values and strings
* private:
*
- * arg: tOptions*, pOpts, the program options descriptor
- * arg: tOptDesc*, pOD, enumeration option description
+ * arg: tOptions*, opts, the program options descriptor
+ * arg: tOptDesc*, od, the set membership option description
* arg: char const * const *,
- * paz_names, list of enumeration names
- * arg: unsigned int, name_ct, number of names in list
+ * nm_list, list of enumeration names
+ * arg: unsigned int, nm_ct, number of names in list
*
* doc: This converts the optArg.argString string from the option description
* into the index corresponding to an entry in the name list.
@@ -412,111 +543,110 @@ set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
* if there is only one partial match.
=*/
void
-optionSetMembers(tOptions * pOpts, tOptDesc * pOD,
- char const* const * paz_names, unsigned int name_ct)
+optionSetMembers(tOptions * opts, tOptDesc * od,
+ char const * const * nm_list, unsigned int nm_ct)
{
/*
* IF the program option descriptor pointer is invalid,
* then it is some sort of special request.
*/
- switch ((uintptr_t)pOpts) {
+ switch ((uintptr_t)opts) {
case (uintptr_t)OPTPROC_EMIT_USAGE:
- set_memb_usage(pOpts, pOD, paz_names, name_ct);
+ enum_err(OPTPROC_EMIT_USAGE, od, nm_list, nm_ct);
return;
case (uintptr_t)OPTPROC_EMIT_SHELL:
- set_memb_shell(pOpts, pOD, paz_names, name_ct);
+ set_memb_shell(opts, od, nm_list, nm_ct);
return;
case (uintptr_t)OPTPROC_RETURN_VALNAME:
- set_memb_names(pOpts, pOD, paz_names, name_ct);
+ set_memb_names(opts, od, nm_list, nm_ct);
return;
default:
break;
}
- if ((pOD->fOptState & OPTST_RESET) != 0)
+ if ((od->fOptState & OPTST_RESET) != 0)
return;
{
- char const* pzArg = pOD->optArg.argString;
- uintptr_t res;
- if ((pzArg == NULL) || (*pzArg == NUL)) {
- pOD->optCookie = (void*)0;
- return;
- }
-
- res = (uintptr_t)pOD->optCookie;
- for (;;) {
- tSCC zSpn[] = " ,|+\t\r\f\n";
- int iv, len;
-
- pzArg += strspn(pzArg, zSpn);
- iv = (*pzArg == '!');
- if (iv)
- pzArg += strspn(pzArg+1, zSpn) + 1;
+ char const * arg;
+ bool invert;
+ uintptr_t res = check_membership_start(od, &arg, &invert);
+ if (arg == NULL)
+ goto fail_return;
+
+ while (*arg != NUL) {
+ bool inv_val = false;
+ int len;
+
+ switch (*arg) {
+ case ',':
+ arg = SPN_WHITESPACE_CHARS(arg+1);
+ if ((*arg == ',') || (*arg == '|'))
+ goto fail_return;
+ continue;
+
+ case '-':
+ case '!':
+ inv_val = true;
+ /* FALLTHROUGH */
+
+ case '+':
+ case '|':
+ arg = SPN_WHITESPACE_CHARS(arg+1);
+ }
- len = strcspn(pzArg, zSpn);
+ len = (int)(BRK_SET_SEPARATOR_CHARS(arg) - arg);
if (len == 0)
break;
- if ((len == 3) && (strncmp(pzArg, zAll, 3) == 0)) {
- if (iv)
+ if ((len == 3) && (strncmp(arg, zAll, 3) == 0)) {
+ if (inv_val)
res = 0;
else res = ~0UL;
}
- else if ((len == 4) && (strncmp(pzArg, zNone, 4) == 0)) {
- if (! iv)
+ else if ((len == 4) && (strncmp(arg, zNone, 4) == 0)) {
+ if (! inv_val)
res = 0;
}
else do {
- char* pz;
- uintptr_t bit = strtoul(pzArg, &pz, 0);
-
- if (pz != pzArg + len) {
- char z[ AO_NAME_SIZE ];
- char const* p;
- int shift_ct;
-
- if (*pz != NUL) {
- if (len >= AO_NAME_LIMIT)
- break;
- memcpy(z, pzArg, (size_t)len);
- z[len] = NUL;
- p = z;
- } else {
- p = pzArg;
- }
-
- shift_ct = find_name(p, pOpts, pOD, paz_names, name_ct);
- if (shift_ct >= name_ct) {
- pOD->optCookie = (void*)0;
- return;
- }
- bit = 1UL << shift_ct;
+ char * pz;
+ uintptr_t bit = strtoul(arg, &pz, 0);
+
+ if (pz != arg + len) {
+ bit = find_member_bit(opts, od, pz, len, nm_list, nm_ct);
+ if (bit == 0UL)
+ goto fail_return;
}
- if (iv)
+ if (inv_val)
res &= ~bit;
else res |= bit;
- } while (0);
+ } while (false);
- if (pzArg[len] == NUL)
- break;
- pzArg += len + 1;
- }
- if (name_ct < (8 * sizeof(uintptr_t))) {
- res &= (1UL << name_ct) - 1UL;
+ arg = SPN_WHITESPACE_CHARS(arg + len);
}
- pOD->optCookie = (void*)res;
+ if (invert)
+ res ^= ~0UL;
+
+ if (nm_ct < (8 * sizeof(uintptr_t)))
+ res &= (1UL << nm_ct) - 1UL;
+
+ od->optCookie = (void *)res;
}
+ return;
+
+fail_return:
+ od->optCookie = (void *)0;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
* indent-tabs-mode: nil
* End:
- * end of autoopts/enumeration.c */
+ * end of autoopts/enum.c */
diff --git a/sntp/libopts/environment.c b/sntp/libopts/env.c
index 8530230ea7e6..7b6615e5e91b 100644
--- a/sntp/libopts/environment.c
+++ b/sntp/libopts/env.c
@@ -2,16 +2,18 @@
/**
* \file environment.c
*
- * Time-stamp: "2011-04-06 09:35:55 bkorb"
- *
* This file contains all of the routines that must be linked into
* an executable to use the generated option processing. The optional
* routines are in separately compiled modules so that they will not
* necessarily be linked in.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -23,52 +25,52 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/* = = = START-STATIC-FORWARD = = = */
static void
do_env_opt(tOptState * os, char * env_name,
- tOptions* pOpts, teEnvPresetType type);
+ tOptions * pOpts, teEnvPresetType type);
/* = = = END-STATIC-FORWARD = = = */
/*
* doPrognameEnv - check for preset values from the ${PROGNAME}
* environment variable. This is accomplished by parsing the text into
* tokens, temporarily replacing the arg vector and calling
- * doImmediateOpts and/or doRegularOpts.
+ * immediate_opts and/or regular_opts.
*/
LOCAL void
-doPrognameEnv(tOptions* pOpts, teEnvPresetType type)
+doPrognameEnv(tOptions * pOpts, teEnvPresetType type)
{
- char const* pczOptStr = getenv(pOpts->pzPROGNAME);
- token_list_t* pTL;
- int sv_argc;
- tAoUI sv_flag;
- char** sv_argv;
+ char const * env_opts = getenv(pOpts->pzPROGNAME);
+ token_list_t* pTL;
+ int sv_argc;
+ proc_state_mask_t sv_flag;
+ char ** sv_argv;
/*
* No such beast? Then bail now.
*/
- if (pczOptStr == NULL)
+ if (env_opts == NULL)
return;
/*
* Tokenize the string. If there's nothing of interest, we'll bail
* here immediately.
*/
- pTL = ao_string_tokenize(pczOptStr);
+ pTL = ao_string_tokenize(env_opts);
if (pTL == NULL)
return;
/*
* Substitute our $PROGNAME argument list for the real one
*/
- sv_argc = pOpts->origArgCt;
+ sv_argc = (int)pOpts->origArgCt;
sv_argv = pOpts->origArgVect;
sv_flag = pOpts->fOptSet;
@@ -78,8 +80,11 @@ doPrognameEnv(tOptions* pOpts, teEnvPresetType type)
* The option scanning code will skip the "program name" at the start
* of this list of tokens, so we accommodate this way ....
*/
- pOpts->origArgVect = (char**)(pTL->tkn_list - 1);
- pOpts->origArgCt = pTL->tkn_ct + 1;
+ {
+ uintptr_t v = (uintptr_t)(pTL->tkn_list);
+ pOpts->origArgVect = (void *)(v - sizeof(char *));
+ }
+ pOpts->origArgCt = (unsigned int)pTL->tkn_ct + 1;
pOpts->fOptSet &= ~OPTPROC_ERRSTOP;
pOpts->curOptIdx = 1;
@@ -87,17 +92,17 @@ doPrognameEnv(tOptions* pOpts, teEnvPresetType type)
switch (type) {
case ENV_IMM:
- (void)doImmediateOpts(pOpts);
+ (void)immediate_opts(pOpts);
break;
case ENV_ALL:
- (void)doImmediateOpts(pOpts);
+ (void)immediate_opts(pOpts);
pOpts->curOptIdx = 1;
pOpts->pzCurOpt = NULL;
/* FALLTHROUGH */
case ENV_NON_IMM:
- (void)doRegularOpts(pOpts);
+ (void)regular_opts(pOpts);
}
/*
@@ -105,13 +110,13 @@ doPrognameEnv(tOptions* pOpts, teEnvPresetType type)
*/
free(pTL);
pOpts->origArgVect = sv_argv;
- pOpts->origArgCt = sv_argc;
+ pOpts->origArgCt = (unsigned int)sv_argc;
pOpts->fOptSet = sv_flag;
}
static void
do_env_opt(tOptState * os, char * env_name,
- tOptions* pOpts, teEnvPresetType type)
+ tOptions * pOpts, teEnvPresetType type)
{
os->pzOptArg = getenv(env_name);
if (os->pzOptArg == NULL)
@@ -124,6 +129,8 @@ do_env_opt(tOptState * os, char * env_name,
&& (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) {
os->flags |= OPTST_DISABLED;
os->pzOptArg = NULL;
+ handle_opt(pOpts, os);
+ return;
}
switch (type) {
@@ -177,11 +184,11 @@ do_env_opt(tOptState * os, char * env_name,
}
/*
- * doEnvPresets - check for preset values from the envrionment
+ * env_presets - check for preset values from the envrionment
* This routine should process in all, immediate or normal modes....
*/
LOCAL void
-doEnvPresets(tOptions* pOpts, teEnvPresetType type)
+env_presets(tOptions * pOpts, teEnvPresetType type)
{
int ct;
tOptState st;
@@ -203,7 +210,7 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type)
pzFlagName = zEnvName
+ snprintf(zEnvName, sizeof(zEnvName), "%s_", pOpts->pzPROGNAME);
- spaceLeft = AO_NAME_SIZE - (pzFlagName - zEnvName) - 1;
+ spaceLeft = AO_NAME_SIZE - (unsigned long)(pzFlagName - zEnvName) - 1;
for (;ct-- > 0; st.pOD++) {
size_t nln;
@@ -241,7 +248,7 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type)
return;
nln = strlen(st.pOD->pz_NAME) + 1;
-
+
if (nln > spaceLeft)
return;
@@ -250,7 +257,8 @@ doEnvPresets(tOptions* pOpts, teEnvPresetType type)
}
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/file.c b/sntp/libopts/file.c
index bb6adf63bc0f..ec740c5d309d 100644
--- a/sntp/libopts/file.c
+++ b/sntp/libopts/file.c
@@ -2,11 +2,15 @@
/**
* \file file.c
*
- * Time-stamp: "2010-07-10 11:00:59 bkorb"
+ * Handle options that have file names for arguments.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -18,12 +22,122 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+/**
+ * Make sure the directory containing the subject file exists and that
+ * the file exists or does not exist, per the option requirements.
+ *
+ * @param ftype file existence type flags
+ * @param pOpts program option descriptor
+ * @param pOD the option descriptor
+ */
+static void
+check_existence(teOptFileType ftype, tOptions * pOpts, tOptDesc * pOD)
+{
+ char const * fname = pOD->optArg.argString;
+ struct stat sb;
+
+ errno = 0;
+
+ switch (ftype & FTYPE_MODE_EXIST_MASK) {
+ case FTYPE_MODE_MUST_NOT_EXIST:
+ if ((stat(fname, &sb) == 0) || (errno != ENOENT)) {
+ if (errno == 0)
+ errno = EINVAL;
+ fserr_exit(pOpts->pzProgName, "stat", fname);
+ /* NOTREACHED */
+ }
+ /* FALLTHROUGH */
+
+ default:
+ case FTYPE_MODE_MAY_EXIST:
+ {
+ char * p = strrchr(fname, DIRCH);
+ size_t l;
+
+ if (p == NULL)
+ /*
+ * The file may or may not exist and its directory is ".".
+ * Assume that "." exists.
+ */
+ break;
+
+ l = (size_t)(p - fname);
+ p = AGALOC(l + 1, "fname");
+ memcpy(p, fname, l);
+ p[l] = NUL;
+
+ if ((stat(p, &sb) != 0) || (errno = EINVAL, ! S_ISDIR(sb.st_mode)))
+ fserr_exit(pOpts->pzProgName, "stat", p);
+ /* NOTREACHED */
+
+ AGFREE(p);
+ break;
+ }
+
+ case FTYPE_MODE_MUST_EXIST:
+ if ( (stat(fname, &sb) != 0)
+ || (errno = EINVAL, ! S_ISREG(sb.st_mode)) )
+ fserr_exit(pOpts->pzProgName, "stat", fname);
+ /* NOTREACHED */
+
+ break;
+ }
+}
+
+/**
+ * Open the specified file with open(2) and save the FD.
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * @param pOpts program option descriptor
+ * @param pOD the option descriptor
+ * @param mode the open mode (uses int flags value)
*/
+static void
+open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode)
+{
+ int fd = open(pOD->optArg.argString, mode.file_flags);
+ if (fd < 0)
+ fserr_exit(pOpts->pzProgName, "open", pOD->optArg.argString);
+ /* NOTREACHED */
+
+ if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
+ pOD->optCookie = (void *)pOD->optArg.argString;
+ else
+ AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
+
+ pOD->optArg.argFd = fd;
+ pOD->fOptState &= ~OPTST_ALLOC_ARG;
+}
+
+/**
+ * Open the specified file with open(2) and save the FD.
+ *
+ * @param pOpts program option descriptor
+ * @param pOD the option descriptor
+ * @param mode the open mode (uses "char *" mode value)
+ */
+static void
+fopen_file_fp(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode)
+{
+ FILE * fp = fopen(pOD->optArg.argString, mode.file_mode);
+ if (fp == NULL)
+ fserr_exit(pOpts->pzProgName, "fopen", pOD->optArg.argString);
+ /* NOTREACHED */
+
+ if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
+ pOD->optCookie = (void *)pOD->optArg.argString;
+ else
+ AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
+
+ pOD->optArg.argFp = fp;
+ pOD->fOptState &= ~OPTST_ALLOC_ARG;
+}
/*=export_func optionFileCheck
* private:
@@ -42,7 +156,7 @@
* (FILE* pointer).
=*/
void
-optionFileCheck(tOptions* pOpts, tOptDesc* pOD,
+optionFileCheck(tOptions * pOpts, tOptDesc * pOD,
teOptFileType ftype, tuFileMode mode)
{
if (pOpts <= OPTPROC_EMIT_LIMIT) {
@@ -51,11 +165,11 @@ optionFileCheck(tOptions* pOpts, tOptDesc* pOD,
switch (ftype & FTYPE_MODE_EXIST_MASK) {
case FTYPE_MODE_MUST_NOT_EXIST:
- fputs(zFileCannotExist, option_usage_fp);
+ fputs(zFileCannotExist + tab_skip_ct, option_usage_fp);
break;
case FTYPE_MODE_MUST_EXIST:
- fputs(zFileMustExist, option_usage_fp);
+ fputs(zFileMustExist + tab_skip_ct, option_usage_fp);
break;
}
return;
@@ -67,104 +181,18 @@ optionFileCheck(tOptions* pOpts, tOptDesc* pOD,
return;
}
- {
- struct stat sb;
-
- errno = 0;
-
- switch (ftype & FTYPE_MODE_EXIST_MASK) {
- case FTYPE_MODE_MUST_NOT_EXIST:
- if ( (stat(pOD->optArg.argString, &sb) == 0)
- || (errno != ENOENT) ){
- if (errno == 0)
- errno = EINVAL;
- fprintf(stderr, zFSOptError, errno, strerror(errno),
- zFSOptErrNoExist, pOD->optArg.argString, pOD->pz_Name);
- pOpts->pUsageProc(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
- /* FALLTHROUGH */
-
- default:
- case FTYPE_MODE_MAY_EXIST:
- {
- char * p = strrchr(pOD->optArg.argString, DIRCH);
- if (p == NULL)
- break; /* assume "." always exists. */
-
- *p = NUL;
- if ( (stat(pOD->optArg.argString, &sb) != 0)
- || (errno = EINVAL, ! S_ISDIR(sb.st_mode)) ){
- fprintf(stderr, zFSOptError, errno, strerror(errno),
- zFSOptErrMayExist, pOD->optArg.argString, pOD->pz_Name);
- pOpts->pUsageProc(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
- if (p != NULL)
- *p = DIRCH;
- break;
- }
-
- case FTYPE_MODE_MUST_EXIST:
- if ( (stat(pOD->optArg.argString, &sb) != 0)
- || (errno = EINVAL, ! S_ISREG(sb.st_mode)) ){
- fprintf(stderr, zFSOptError, errno, strerror(errno),
- zFSOptErrMustExist, pOD->optArg.argString,
- pOD->pz_Name);
- pOpts->pUsageProc(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
- break;
- }
- }
+ check_existence(ftype, pOpts, pOD);
switch (ftype & FTYPE_MODE_OPEN_MASK) {
default:
- case FTYPE_MODE_NO_OPEN:
- break;
-
- case FTYPE_MODE_OPEN_FD:
- {
- int fd = open(pOD->optArg.argString, mode.file_flags);
- if (fd < 0) {
- fprintf(stderr, zFSOptError, errno, strerror(errno),
- zFSOptErrOpen, pOD->optArg.argString, pOD->pz_Name);
- pOpts->pUsageProc(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
-
- if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
- pOD->optCookie = (void *)pOD->optArg.argString;
- else
- AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
-
- pOD->optArg.argFd = fd;
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
- break;
- }
-
- case FTYPE_MODE_FOPEN_FP:
- {
- FILE* fp = fopen(pOD->optArg.argString, mode.file_mode);
- if (fp == NULL) {
- fprintf(stderr, zFSOptError, errno, strerror(errno),
- zFSOptErrFopen, pOD->optArg.argString, pOD->pz_Name);
- pOpts->pUsageProc(pOpts, EXIT_FAILURE);
- /* NOTREACHED */
- }
-
- if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0)
- pOD->optCookie = (void *)pOD->optArg.argString;
- else
- AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name");
-
- pOD->optArg.argFp = fp;
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
- break;
- }
+ case FTYPE_MODE_NO_OPEN: break;
+ case FTYPE_MODE_OPEN_FD: open_file_fd( pOpts, pOD, mode); break;
+ case FTYPE_MODE_FOPEN_FP: fopen_file_fp(pOpts, pOD, mode); break;
}
}
-/*
+
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/find.c b/sntp/libopts/find.c
new file mode 100644
index 000000000000..1ec02e5f6de1
--- /dev/null
+++ b/sntp/libopts/find.c
@@ -0,0 +1,780 @@
+/**
+ * @file check.c
+ *
+ * @brief Hunt for options in the option descriptor list
+ *
+ * This file contains the routines that deal with processing quoted strings
+ * into an internal format.
+ *
+ * @addtogroup autoopts
+ * @{
+ */
+/*
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+/* = = = START-STATIC-FORWARD = = = */
+static int
+parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz);
+
+static void
+opt_ambiguities(tOptions * opts, char const * name, int nm_len);
+
+static int
+opt_match_ct(tOptions * opts, char const * name, int nm_len,
+ int * ixp, bool * disable);
+
+static tSuccess
+opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st);
+
+static tSuccess
+opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st);
+
+static tSuccess
+opt_ambiguous(tOptions * opts, char const * name, int match_ct);
+
+static tSuccess
+get_opt_arg_must(tOptions * opts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_may(tOptions * pOpts, tOptState * o_st);
+
+static tSuccess
+get_opt_arg_none(tOptions * pOpts, tOptState* o_st);
+/* = = = END-STATIC-FORWARD = = = */
+
+/**
+ * find the name and name length we are looking for
+ */
+static int
+parse_opt(char const ** nm_pp, char ** arg_pp, char * buf, size_t bufsz)
+{
+ int res = 0;
+ char const * p = *nm_pp;
+ *arg_pp = NULL;
+
+ for (;;) {
+ switch (*(p++)) {
+ case NUL: return res;
+
+ case '=':
+ memcpy(buf, *nm_pp, (size_t)res);
+
+ buf[res] = NUL;
+ *nm_pp = buf;
+ *arg_pp = (char *)p;
+ return res;
+
+ default:
+ if (++res >= (int)bufsz)
+ return -1;
+ }
+ }
+}
+
+/**
+ * print out the options that match the given name.
+ *
+ * @param pOpts option data
+ * @param opt_name name of option to look for
+ */
+static void
+opt_ambiguities(tOptions * opts, char const * name, int nm_len)
+{
+ char const * const hyph =
+ NAMED_OPTS(opts) ? "" : LONG_OPT_MARKER;
+
+ tOptDesc * pOD = opts->pOptDesc;
+ int idx = 0;
+
+ fputs(zambig_list_msg, stderr);
+ do {
+ if (pOD->pz_Name == NULL)
+ continue; /* doc option */
+
+ if (strneqvcmp(name, pOD->pz_Name, nm_len) == 0)
+ fprintf(stderr, zambig_file, hyph, pOD->pz_Name);
+
+ else if ( (pOD->pz_DisableName != NULL)
+ && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0)
+ )
+ fprintf(stderr, zambig_file, hyph, pOD->pz_DisableName);
+ } while (pOD++, (++idx < opts->optCt));
+}
+
+/**
+ * Determine the number of options that match the name
+ *
+ * @param pOpts option data
+ * @param opt_name name of option to look for
+ * @param nm_len length of provided name
+ * @param index pointer to int for option index
+ * @param disable pointer to bool to mark disabled option
+ * @return count of options that match
+ */
+static int
+opt_match_ct(tOptions * opts, char const * name, int nm_len,
+ int * ixp, bool * disable)
+{
+ int matchCt = 0;
+ int idx = 0;
+ int idxLim = opts->optCt;
+ tOptDesc * pOD = opts->pOptDesc;
+
+ do {
+ /*
+ * If option disabled or a doc option, skip to next
+ */
+ if (pOD->pz_Name == NULL)
+ continue;
+
+ if ( SKIP_OPT(pOD)
+ && (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT)))
+ continue;
+
+ if (strneqvcmp(name, pOD->pz_Name, nm_len) == 0) {
+ /*
+ * IF we have a complete match
+ * THEN it takes priority over any already located partial
+ */
+ if (pOD->pz_Name[ nm_len ] == NUL) {
+ *ixp = idx;
+ return 1;
+ }
+ }
+
+ /*
+ * IF there is a disable name
+ * *AND* the option name matches the disable name
+ * THEN ...
+ */
+ else if ( (pOD->pz_DisableName != NULL)
+ && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0)
+ ) {
+ *disable = true;
+
+ /*
+ * IF we have a complete match
+ * THEN it takes priority over any already located partial
+ */
+ if (pOD->pz_DisableName[ nm_len ] == NUL) {
+ *ixp = idx;
+ return 1;
+ }
+ }
+
+ else
+ continue; /* does not match any option */
+
+ /*
+ * We found a full or partial match, either regular or disabling.
+ * Remember the index for later.
+ */
+ *ixp = idx;
+ ++matchCt;
+
+ } while (pOD++, (++idx < idxLim));
+
+ return matchCt;
+}
+
+/**
+ * Set the option to the indicated option number.
+ *
+ * @param opts option data
+ * @param arg option argument (if glued to name)
+ * @param idx option index
+ * @param disable mark disabled option
+ * @param st state about current option
+ */
+static tSuccess
+opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st)
+{
+ tOptDesc * pOD = opts->pOptDesc + idx;
+
+ if (SKIP_OPT(pOD)) {
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) == 0)
+ return FAILURE;
+
+ fprintf(stderr, zDisabledErr, opts->pzProgName, pOD->pz_Name);
+ if (pOD->pzText != NULL)
+ fprintf(stderr, SET_OFF_FMT, pOD->pzText);
+ fputc(NL, stderr);
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+
+ /*
+ * IF we found a disablement name,
+ * THEN set the bit in the callers' flag word
+ */
+ if (disable)
+ st->flags |= OPTST_DISABLED;
+
+ st->pOD = pOD;
+ st->pzOptArg = arg;
+ st->optType = TOPT_LONG;
+
+ return SUCCESS;
+}
+
+/**
+ * An option was not found. Check for default option and set it
+ * if there is one. Otherwise, handle the error.
+ *
+ * @param opts option data
+ * @param name name of option to look for
+ * @param arg option argument
+ * @param st state about current option
+ *
+ * @return success status
+ */
+static tSuccess
+opt_unknown(tOptions * opts, char const * name, char * arg, tOptState * st)
+{
+ /*
+ * IF there is no equal sign
+ * *AND* we are using named arguments
+ * *AND* there is a default named option,
+ * THEN return that option.
+ */
+ if ( (arg == NULL)
+ && NAMED_OPTS(opts)
+ && (opts->specOptIdx.default_opt != NO_EQUIVALENT)) {
+
+ st->pOD = opts->pOptDesc + opts->specOptIdx.default_opt;
+ st->pzOptArg = name;
+ st->optType = TOPT_DEFAULT;
+ return SUCCESS;
+ }
+
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) {
+ fprintf(stderr, zIllOptStr, opts->pzProgPath, name);
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+
+ return FAILURE;
+}
+
+/**
+ * Several options match the provided name.
+ *
+ * @param opts option data
+ * @param name name of option to look for
+ * @param match_ct number of matching options
+ *
+ * @return success status (always FAILURE, if it returns)
+ */
+static tSuccess
+opt_ambiguous(tOptions * opts, char const * name, int match_ct)
+{
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0) {
+ fprintf(stderr, zambig_opt_fmt, opts->pzProgPath, name, match_ct);
+ if (match_ct <= 4)
+ opt_ambiguities(opts, name, (int)strlen(name));
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+ return FAILURE;
+}
+
+/*=export_func optionVendorOption
+ * private:
+ *
+ * what: Process a vendor option
+ * arg: + tOptions * + pOpts + program options descriptor +
+ * arg: + tOptDesc * + pOptDesc + the descriptor for this arg +
+ *
+ * doc:
+ * For POSIX specified utilities, the options are constrained to the options,
+ * @xref{config attributes, Program Configuration}. AutoOpts clients should
+ * never specify this directly. It gets referenced when the option
+ * definitions contain a "vendor-opt" attribute.
+=*/
+void
+optionVendorOption(tOptions * pOpts, tOptDesc * pOD)
+{
+ tOptState opt_st = OPTSTATE_INITIALIZER(PRESET);
+ char const * vopt_str = pOD->optArg.argString;
+
+ if (pOpts <= OPTPROC_EMIT_LIMIT)
+ return;
+
+ if ((pOD->fOptState & OPTST_RESET) != 0)
+ return;
+
+ if ((pOD->fOptState & OPTPROC_IMMEDIATE) == 0)
+ opt_st.flags = OPTST_DEFINED;
+
+ if ( ((pOpts->fOptSet & OPTPROC_VENDOR_OPT) == 0)
+ || ! SUCCESSFUL(opt_find_long(pOpts, vopt_str, &opt_st))
+ || ! SUCCESSFUL(get_opt_arg(pOpts, &opt_st)) )
+ {
+ fprintf(stderr, zIllVendOptStr, pOpts->pzProgName, vopt_str);
+ (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+
+ /*
+ * See if we are in immediate handling state.
+ */
+ if (pOpts->fOptSet & OPTPROC_IMMEDIATE) {
+ /*
+ * See if the enclosed option is okay with that state.
+ */
+ if (DO_IMMEDIATELY(opt_st.flags))
+ (void)handle_opt(pOpts, &opt_st);
+
+ } else {
+ /*
+ * non-immediate direction.
+ * See if the enclosed option is okay with that state.
+ */
+ if (DO_NORMALLY(opt_st.flags) || DO_SECOND_TIME(opt_st.flags))
+ (void)handle_opt(pOpts, &opt_st);
+ }
+}
+
+/**
+ * Find the option descriptor by full name.
+ *
+ * @param opts option data
+ * @param opt_name name of option to look for
+ * @param state state about current option
+ *
+ * @return success status
+ */
+LOCAL tSuccess
+opt_find_long(tOptions * opts, char const * opt_name, tOptState * state)
+{
+ char name_buf[128];
+ char * opt_arg;
+ int nm_len = parse_opt(&opt_name, &opt_arg, name_buf, sizeof(name_buf));
+
+ int idx = 0;
+ bool disable = false;
+ int ct;
+
+ if (nm_len <= 1) {
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) == 0)
+ return FAILURE;
+
+ fprintf(stderr, zInvalOptName, opts->pzProgName, opt_name);
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+
+ ct = opt_match_ct(opts, opt_name, nm_len, &idx, &disable);
+
+ /*
+ * See if we found one match, no matches or multiple matches.
+ */
+ switch (ct) {
+ case 1: return opt_set(opts, opt_arg, idx, disable, state);
+ case 0: return opt_unknown(opts, opt_name, opt_arg, state);
+ default: return opt_ambiguous(opts, opt_name, ct);
+ }
+}
+
+
+/**
+ * Find the short option descriptor for the current option
+ *
+ * @param pOpts option data
+ * @param optValue option flag character
+ * @param pOptState state about current option
+ */
+LOCAL tSuccess
+opt_find_short(tOptions* pOpts, uint_t optValue, tOptState* pOptState)
+{
+ tOptDesc* pRes = pOpts->pOptDesc;
+ int ct = pOpts->optCt;
+
+ /*
+ * Search the option list
+ */
+ do {
+ if (optValue != pRes->optValue)
+ continue;
+
+ if (SKIP_OPT(pRes)) {
+ if ( (pRes->fOptState == (OPTST_OMITTED | OPTST_NO_INIT))
+ && (pRes->pz_Name != NULL)) {
+ if ((pOpts->fOptSet & OPTPROC_ERRSTOP) == 0)
+ return FAILURE;
+
+ fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name);
+ if (pRes->pzText != NULL)
+ fprintf(stderr, SET_OFF_FMT, pRes->pzText);
+ fputc(NL, stderr);
+ (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+ goto short_opt_error;
+ }
+
+ pOptState->pOD = pRes;
+ pOptState->optType = TOPT_SHORT;
+ return SUCCESS;
+
+ } while (pRes++, --ct > 0);
+
+ /*
+ * IF the character value is a digit
+ * AND there is a special number option ("-n")
+ * THEN the result is the "option" itself and the
+ * option is the specially marked "number" option.
+ */
+ if ( IS_DEC_DIGIT_CHAR(optValue)
+ && (pOpts->specOptIdx.number_option != NO_EQUIVALENT) ) {
+ pOptState->pOD = \
+ pRes = pOpts->pOptDesc + pOpts->specOptIdx.number_option;
+ (pOpts->pzCurOpt)--;
+ pOptState->optType = TOPT_SHORT;
+ return SUCCESS;
+ }
+
+ short_opt_error:
+
+ /*
+ * IF we are to stop on errors (the default, actually)
+ * THEN call the usage procedure.
+ */
+ if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0) {
+ fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue);
+ (*pOpts->pUsageProc)(pOpts, EXIT_FAILURE);
+ /* NOTREACHED */
+ _exit(EXIT_FAILURE); /* to be certain */
+ }
+
+ return FAILURE;
+}
+
+/**
+ * Process option with a required argument. Long options can either have a
+ * separate command line argument, or an argument attached by the '='
+ * character. Figure out which.
+ *
+ * @param[in,out] opts the program option descriptor
+ * @param[in,out] o_st the option processing state
+ * @returns SUCCESS or FAILURE
+ */
+static tSuccess
+get_opt_arg_must(tOptions * opts, tOptState * o_st)
+{
+ switch (o_st->optType) {
+ case TOPT_SHORT:
+ /*
+ * See if an arg string follows the flag character
+ */
+ if (*++(opts->pzCurOpt) == NUL)
+ opts->pzCurOpt = opts->origArgVect[ opts->curOptIdx++ ];
+ o_st->pzOptArg = opts->pzCurOpt;
+ break;
+
+ case TOPT_LONG:
+ /*
+ * See if an arg string has already been assigned (glued on
+ * with an `=' character)
+ */
+ if (o_st->pzOptArg == NULL)
+ o_st->pzOptArg = opts->origArgVect[ opts->curOptIdx++ ];
+ break;
+
+ default:
+#ifdef DEBUG
+ fputs("AutoOpts lib error: option type not selected\n", stderr);
+ option_exits(EXIT_FAILURE);
+#endif
+
+ case TOPT_DEFAULT:
+ /*
+ * The option was selected by default. The current token is
+ * the option argument.
+ */
+ break;
+ }
+
+ /*
+ * Make sure we did not overflow the argument list.
+ */
+ if (opts->curOptIdx > opts->origArgCt) {
+ fprintf(stderr, zMisArg, opts->pzProgPath, o_st->pOD->pz_Name);
+ return FAILURE;
+ }
+
+ opts->pzCurOpt = NULL; /* next time advance to next arg */
+ return SUCCESS;
+}
+
+/**
+ * Process an option with an optional argument. For short options, it looks
+ * at the character after the option character, or it consumes the next full
+ * argument. For long options, it looks for an '=' character attachment to
+ * the long option name before deciding to take the next command line
+ * argument.
+ *
+ * @param pOpts the option descriptor
+ * @param o_st a structure for managing the current processing state
+ * @returns SUCCESS or does not return
+ */
+static tSuccess
+get_opt_arg_may(tOptions * pOpts, tOptState * o_st)
+{
+ /*
+ * An option argument is optional.
+ */
+ switch (o_st->optType) {
+ case TOPT_SHORT:
+ if (*++pOpts->pzCurOpt != NUL)
+ o_st->pzOptArg = pOpts->pzCurOpt;
+ else {
+ char* pzLA = pOpts->origArgVect[ pOpts->curOptIdx ];
+
+ /*
+ * BECAUSE it is optional, we must make sure
+ * we did not find another flag and that there
+ * is such an argument.
+ */
+ if ((pzLA == NULL) || (*pzLA == '-'))
+ o_st->pzOptArg = NULL;
+ else {
+ pOpts->curOptIdx++; /* argument found */
+ o_st->pzOptArg = pzLA;
+ }
+ }
+ break;
+
+ case TOPT_LONG:
+ /*
+ * Look for an argument if we don't already have one (glued on
+ * with a `=' character) *AND* we are not in named argument mode
+ */
+ if ( (o_st->pzOptArg == NULL)
+ && (! NAMED_OPTS(pOpts))) {
+ char* pzLA = pOpts->origArgVect[ pOpts->curOptIdx ];
+
+ /*
+ * BECAUSE it is optional, we must make sure
+ * we did not find another flag and that there
+ * is such an argument.
+ */
+ if ((pzLA == NULL) || (*pzLA == '-'))
+ o_st->pzOptArg = NULL;
+ else {
+ pOpts->curOptIdx++; /* argument found */
+ o_st->pzOptArg = pzLA;
+ }
+ }
+ break;
+
+ default:
+ case TOPT_DEFAULT:
+ ao_bug(zbad_default_msg);
+ }
+
+ /*
+ * After an option with an optional argument, we will
+ * *always* start with the next option because if there
+ * were any characters following the option name/flag,
+ * they would be interpreted as the argument.
+ */
+ pOpts->pzCurOpt = NULL;
+ return SUCCESS;
+}
+
+/**
+ * Process option that does not have an argument.
+ *
+ * @param[in,out] opts the program option descriptor
+ * @param[in,out] o_st the option processing state
+ * @returns SUCCESS or FAILURE
+ */
+static tSuccess
+get_opt_arg_none(tOptions * pOpts, tOptState* o_st)
+{
+ /*
+ * No option argument. Make sure next time around we find
+ * the correct option flag character for short options
+ */
+ if (o_st->optType == TOPT_SHORT)
+ (pOpts->pzCurOpt)++;
+
+ /*
+ * It is a long option. Make sure there was no ``=xxx'' argument
+ */
+ else if (o_st->pzOptArg != NULL) {
+ fprintf(stderr, zNoArg, pOpts->pzProgPath, o_st->pOD->pz_Name);
+ return FAILURE;
+ }
+
+ /*
+ * It is a long option. Advance to next command line argument.
+ */
+ else
+ pOpts->pzCurOpt = NULL;
+ return SUCCESS;
+}
+
+/**
+ * Process option. Figure out whether or not to look for an option argument.
+ *
+ * @param[in,out] opts the program option descriptor
+ * @param[in,out] o_st the option processing state
+ * @returns SUCCESS or FAILURE
+ */
+LOCAL tSuccess
+get_opt_arg(tOptions * opts, tOptState * o_st)
+{
+ o_st->flags |= (o_st->pOD->fOptState & OPTST_PERSISTENT_MASK);
+
+ /*
+ * Disabled options and options specified to not have arguments
+ * are handled with the "none" procedure. Otherwise, check the
+ * optional flag and call either the "may" or "must" function.
+ */
+ if ( ((o_st->flags & OPTST_DISABLED) != 0)
+ || (OPTST_GET_ARGTYPE(o_st->flags) == OPARG_TYPE_NONE))
+ return get_opt_arg_none(opts, o_st);
+
+ if (o_st->flags & OPTST_ARG_OPTIONAL)
+ return get_opt_arg_may( opts, o_st);
+
+ return get_opt_arg_must(opts, o_st);
+}
+
+/**
+ * Find the option descriptor for the current option.
+ *
+ * @param[in,out] opts the program option descriptor
+ * @param[in,out] o_st the option processing state
+ * @returns SUCCESS or FAILURE
+ */
+LOCAL tSuccess
+find_opt(tOptions * opts, tOptState * o_st)
+{
+ /*
+ * IF we are continuing a short option list (e.g. -xyz...)
+ * THEN continue a single flag option.
+ * OTHERWISE see if there is room to advance and then do so.
+ */
+ if ((opts->pzCurOpt != NULL) && (*opts->pzCurOpt != NUL))
+ return opt_find_short(opts, (uint8_t)*(opts->pzCurOpt), o_st);
+
+ if (opts->curOptIdx >= opts->origArgCt)
+ return PROBLEM; /* NORMAL COMPLETION */
+
+ opts->pzCurOpt = opts->origArgVect[ opts->curOptIdx ];
+
+ /*
+ * IF all arguments must be named options, ...
+ */
+ if (NAMED_OPTS(opts)) {
+ char * pz = opts->pzCurOpt;
+ int def;
+ tSuccess res;
+ uint16_t * def_opt;
+
+ opts->curOptIdx++;
+
+ if (*pz != '-')
+ return opt_find_long(opts, pz, o_st);
+
+ /*
+ * The name is prefixed with one or more hyphens. Strip them off
+ * and disable the "default_opt" setting. Use heavy recasting to
+ * strip off the "const" quality of the "default_opt" field.
+ */
+ while (*(++pz) == '-') ;
+ def_opt = (void *)&(opts->specOptIdx.default_opt);
+ def = *def_opt;
+ *def_opt = NO_EQUIVALENT;
+ res = opt_find_long(opts, pz, o_st);
+ *def_opt = (uint16_t)def;
+ return res;
+ }
+
+ /*
+ * Note the kind of flag/option marker
+ */
+ if (*((opts->pzCurOpt)++) != '-')
+ return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */
+
+ /*
+ * Special hack for a hyphen by itself
+ */
+ if (*(opts->pzCurOpt) == NUL)
+ return PROBLEM; /* NORMAL COMPLETION - this + rest are operands */
+
+ /*
+ * The current argument is to be processed as an option argument
+ */
+ opts->curOptIdx++;
+
+ /*
+ * We have an option marker.
+ * Test the next character for long option indication
+ */
+ if (opts->pzCurOpt[0] == '-') {
+ if (*++(opts->pzCurOpt) == NUL)
+ /*
+ * NORMAL COMPLETION - NOT this arg, but rest are operands
+ */
+ return PROBLEM;
+
+ /*
+ * We do not allow the hyphen to be used as a flag value.
+ * Therefore, if long options are not to be accepted, we punt.
+ */
+ if ((opts->fOptSet & OPTPROC_LONGOPT) == 0) {
+ fprintf(stderr, zIllOptStr, opts->pzProgPath, opts->pzCurOpt-2);
+ return FAILURE;
+ }
+
+ return opt_find_long(opts, opts->pzCurOpt, o_st);
+ }
+
+ /*
+ * If short options are not allowed, then do long
+ * option processing. Otherwise the character must be a
+ * short (i.e. single character) option.
+ */
+ if ((opts->fOptSet & OPTPROC_SHORTOPT) != 0)
+ return opt_find_short(opts, (uint8_t)*(opts->pzCurOpt), o_st);
+
+ return opt_find_long(opts, opts->pzCurOpt, o_st);
+}
+
+/** @}
+ *
+ * Local Variables:
+ * mode: C
+ * c-file-style: "stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * end of autoopts/find.c */
diff --git a/sntp/libopts/genshell.c b/sntp/libopts/genshell.c
index 05f2f1da46bb..20e6c15c9fd6 100644
--- a/sntp/libopts/genshell.c
+++ b/sntp/libopts/genshell.c
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (genshell.c)
- *
- * It has been AutoGen-ed April 29, 2011 at 03:43:59 PM by AutoGen 5.11.9
+ *
+ * It has been AutoGen-ed
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -16,59 +16,44 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The genshellopt program is copyrighted and licensed
+ * under the following terms:
*
- * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved
+ * Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the GNU Lesser General Public License,
+ * version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
*
- * genshellopt 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 3 of the License, or
- * (at your option) any later version.
- *
- * genshellopt 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, see <http://www.gnu.org/licenses/>.
-
+ * The genshellopt library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "genshell.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-#define OPTION_CODE_COMPILE 1
-#include "genshell.h"
-
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
-
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[260] =
-"genshellopt 1\n\
-Copyright (C) 1999-2011 Bruce Korb, all rights reserved.\n\
-This is free software. It is licensed for use, modification and\n\
-redistribution under the terms of the\n\
-GNU General Public License, version 3 or later\n\
- <http://gnu.org/licenses/gpl.html>\n";
-static char const zCopyrightNotice[611] =
-"genshellopt is free software: you can redistribute it and/or modify it\n\
-under the terms of the GNU General Public License as published by the\n\
-Free Software Foundation, either version 3 of the License, or (at your\n\
-option) any later version.\n\n\
-genshellopt is distributed in the hope that it will be useful, but WITHOUT\n\
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n\
-for more details.\n\n\
-You should have received a copy of the GNU General Public License along\n\
-with this program. If not, see <http://www.gnu.org/licenses/>.\n";
+#define zCopyright (genshellopt_opt_strs+0)
+#define zLicenseDescrip (genshellopt_opt_strs+285)
extern tUsageProc genshelloptUsage;
@@ -76,65 +61,120 @@ extern tUsageProc genshelloptUsage;
# define NULL 0
#endif
-/*
- * Script option description:
+/**
+ * static const strings for genshellopt options
*/
-static char const zScriptText[] =
- "Output Script File";
-static char const zScript_NAME[] = "SCRIPT";
-static char const zScript_Name[] = "script";
-#define SCRIPT_FLAGS (OPTST_DISABLED \
+static char const genshellopt_opt_strs[1769] =
+/* 0 */ "genshellopt 1\n"
+ "Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the GNU Lesser General Public License,\n"
+ "version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
+/* 285 */ "The genshellopt library is free software; you can redistribute it and/or\n"
+ "modify it under the terms of the GNU Library General Public License as\n"
+ "published by the Free Software Foundation; either version 2 of the License,\n"
+ "or (at your option) any later version.\n\n"
+ "This library is distributed in the hope that it will be useful, but WITHOUT\n"
+ "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
+ "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n"
+ "License for more details.\n\n"
+ "You should have received a copy of the GNU Library General Public License\n"
+ "along with this library; if not, see\n"
+ "<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
+/* 957 */ "Output Script File\0"
+/* 976 */ "SCRIPT\0"
+/* 983 */ "script\0"
+/* 990 */ "Shell name (follows \"#!\" magic)\0"
+/* 1022 */ "SHELL\0"
+/* 1028 */ "no-shell\0"
+/* 1037 */ "no\0"
+/* 1040 */ "display extended usage information and exit\0"
+/* 1084 */ "help\0"
+/* 1089 */ "extended usage information passed thru pager\0"
+/* 1134 */ "more-help\0"
+/* 1144 */ "output version information and exit\0"
+/* 1180 */ "version\0"
+/* 1188 */ "GENSHELLOPT\0"
+/* 1200 */ "genshellopt - Generate Shell Option Processing Script - Ver. 1\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/* 1321 */ "autogen-users@lists.sourceforge.net\0"
+/* 1357 */ "Note that 'shell' is only useful if the output file does not already exist.\n"
+ "If it does, then the shell name and optional first argument will be\n"
+ "extracted from the script file.\n\0"
+/* 1534 */ "If the script file already exists and contains Automated Option Processing\n"
+ "text, the second line of the file through the ending tag will be replaced\n"
+ "by the newly generated text. The first '#!' line will be regenerated.\n\0"
+/* 1755 */ "genshellopt 1";
+
+/**
+ * script option description:
+ */
+/** Descriptive text for the script option */
+#define SCRIPT_DESC (genshellopt_opt_strs+957)
+/** Upper-cased name for the script option */
+#define SCRIPT_NAME (genshellopt_opt_strs+976)
+/** Name string for the script option */
+#define SCRIPT_name (genshellopt_opt_strs+983)
+/** Compiled in flag settings for the script option */
+#define SCRIPT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Shell option description:
+/**
+ * shell option description:
*/
-static char const zShellText[] =
- "Shell name (follows \"#!\" magic)";
-static char const zShell_NAME[] = "SHELL";
-static char const zNotShell_Name[] = "no-shell";
-static char const zNotShell_Pfx[] = "no";
-#define zShell_Name (zNotShell_Name + 3)
-#define SHELL_FLAGS (OPTST_INITENABLED \
+/** Descriptive text for the shell option */
+#define SHELL_DESC (genshellopt_opt_strs+990)
+/** Upper-cased name for the shell option */
+#define SHELL_NAME (genshellopt_opt_strs+1022)
+/** disablement name for the shell option */
+#define NOT_SHELL_name (genshellopt_opt_strs+1028)
+/** disablement prefix for the shell option */
+#define NOT_SHELL_PFX (genshellopt_opt_strs+1037)
+/** Name string for the shell option */
+#define SHELL_name (NOT_SHELL_name + 3)
+/** Compiled in flag settings for the shell option */
+#define SHELL_FLAGS (OPTST_INITENABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (genshellopt_opt_strs+1040)
+#define HELP_name (genshellopt_opt_strs+1084)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (genshellopt_opt_strs+1089)
+#define MORE_HELP_name (genshellopt_opt_strs+1134)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-/*
+#define VER_DESC (genshellopt_opt_strs+1144)
+#define VER_name (genshellopt_opt_strs+1180)
+/**
* Declare option callback procedures
*/
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ optionBooleanVal, optionNestedVal, optionNumericVal,
+ optionPagedUsage, optionPrintVersion, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
doUsageOpt;
+#define VER_PROC optionPrintVersion
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Genshellopt Option Descriptions.
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the genshellopt Option Descriptions.
+ * This is an array of GENSHELL_OPTION_CT entries, one for each
+ * option that the genshellopt program responds to.
*/
static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
@@ -142,11 +182,11 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SCRIPT_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --script */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zScriptText, zScript_NAME, zScript_Name,
+ /* desc, NAME, name */ SCRIPT_DESC, SCRIPT_NAME, SCRIPT_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_GENSHELL_OPT_SHELL,
@@ -154,74 +194,71 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SHELL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --shell */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zShellText, zShell_NAME, zShell_Name,
- /* disablement strs */ zNotShell_Name, zNotShell_Pfx },
+ /* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name,
+ /* disablement strs */ NOT_SHELL_name, NOT_SHELL_PFX },
{ /* entry idx, value */ INDEX_GENSHELL_OPT_VERSION, VALUE_GENSHELL_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ optionPrintVersion,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_GENSHELL_OPT_HELP, VALUE_GENSHELL_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_GENSHELL_OPT_MORE_HELP, VALUE_GENSHELL_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Genshellopt Option Environment
- */
-static char const zPROGNAME[12] = "GENSHELLOPT";
-static char const zUsageTitle[121] =
-"genshellopt - Generate Shell Option Processing Script - Ver. 1\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
-#define zRcName NULL
-#define apzHomeList NULL
-
-static char const zBugsAddr[36] = "autogen-users@lists.sourceforge.net";
-static char const zExplain[] = "\n\
-Note that ``shell'' is only useful if the output file does not already\n\
-exist. If it does, then the shell name and optional first argument will\n\
-be extracted from the script file.\n";
-static char const zDetail[237] = "\n\
-If the script file already exists and contains Automated Option Processing\n\
-text, the second line of the file through the ending tag will be replaced\n\
-by the newly generated text. The first ``#!'' line will be regenerated.\n";
-static char const zFullVersion[] = GENSHELLOPT_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of genshellopt. */
+#define zPROGNAME (genshellopt_opt_strs+1188)
+/** Reference to the title line for genshellopt usage. */
+#define zUsageTitle (genshellopt_opt_strs+1200)
+/** There is no genshellopt configuration file. */
+#define zRcName NULL
+/** There are no directories to search for genshellopt config files. */
+#define apzHomeList NULL
+/** The genshellopt program bug email address. */
+#define zBugsAddr (genshellopt_opt_strs+1321)
+/** Clarification/explanation of what genshellopt does. */
+#define zExplain (genshellopt_opt_strs+1357)
+/** Extra detail explaining what genshellopt does. */
+#define zDetail (genshellopt_opt_strs+1534)
+/** The full version string for genshellopt. */
+#define zFullVersion (genshellopt_opt_strs+1755)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -231,16 +268,49 @@ static char const zFullVersion[] = GENSHELLOPT_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define genshellopt_full_usage (NULL)
+#define genshellopt_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the genshelloptUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = GENSHELLOPT_EXIT_SUCCESS;
+ genshelloptUsage(&genshelloptOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
+/* extracted from optmain.tlib near line 1245 */
-#define genshellopt_full_usage NULL
-#define genshellopt_short_usage NULL
+/**
+ * The directory containing the data associated with genshellopt.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged genshellopt
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define genshellopt_packager_info NULL
#else
+/** Packager information for genshellopt. */
static char const genshellopt_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -253,7 +323,13 @@ static char const genshellopt_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for genshellopt. The one structure that
+ * binds them all.
+ */
tOptions genshelloptOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -266,7 +342,7 @@ tOptions genshelloptOptions = {
+ OPTPROC_NO_ARGS ),
0, NULL, /* current option index, current option */
NULL, NULL, zPROGNAME,
- zRcName, zCopyright, zCopyrightNotice,
+ zRcName, zCopyright, zLicenseDescrip,
zFullVersion, apzHomeList, zUsageTitle,
zExplain, zDetail, optDesc,
zBugsAddr, /* address to send bugs to */
@@ -287,102 +363,484 @@ tOptions genshelloptOptions = {
PKGDATADIR, genshellopt_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- GENSHELL_USAGE(GENSHELLOPT_EXIT_SUCCESS);
-}
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * genshellopt program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(GENSHELLOPT_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the genshelloptOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &genshelloptOptions;
+ tOptions * const opts = &genshelloptOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- genshelloptOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the genshelloptOptions structure noted in the
+ comments below. The literal text is defined in genshellopt_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ genshellopt_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via genshelloptOptions.pzCopyright */
+ puts(_("genshellopt 1\n\
+Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the GNU Lesser General Public License,\n\
+version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
+
+ /* referenced via genshelloptOptions.pzCopyNotice */
+ puts(_("The genshellopt library is free software; you can redistribute it and/or\n\
+modify it under the terms of the GNU Library General Public License as\n\
+published by the Free Software Foundation; either version 2 of the License,\n\
+or (at your option) any later version.\n\n"));
+ puts(_("This library is distributed in the hope that it will be useful, but WITHOUT\n\
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n\
+License for more details.\n\n"));
+ puts(_("You should have received a copy of the GNU Library General Public License\n\
+along with this library; if not, see\n\
+<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
+
+ /* referenced via genshelloptOptions.pOptDesc->pzText */
+ puts(_("Output Script File"));
+
+ /* referenced via genshelloptOptions.pOptDesc->pzText */
+ puts(_("Shell name (follows \"#!\" magic)"));
+
+ /* referenced via genshelloptOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via genshelloptOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via genshelloptOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via genshelloptOptions.pzUsageTitle */
+ puts(_("genshellopt - Generate Shell Option Processing Script - Ver. 1\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
+
+ /* referenced via genshelloptOptions.pzExplain */
+ puts(_("Note that 'shell' is only useful if the output file does not already exist.\n\
+If it does, then the shell name and optional first argument will be\n\
+extracted from the script file.\n"));
+
+ /* referenced via genshelloptOptions.pzDetail */
+ puts(_("If the script file already exists and contains Automated Option Processing\n\
+text, the second line of the file through the ending tag will be replaced\n\
+by the newly generated text. The first '#!' line will be regenerated.\n"));
+
+ /* referenced via genshelloptOptions.pzFullVersion */
+ puts(_("genshellopt 1"));
+
+ /* referenced via genshelloptOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via genshelloptOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 90 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 88 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 92 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/sntp/libopts/genshell.h b/sntp/libopts/genshell.h
index e5457a764090..1c1873574140 100644
--- a/sntp/libopts/genshell.h
+++ b/sntp/libopts/genshell.h
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (genshell.h)
- *
- * It has been AutoGen-ed April 29, 2011 at 03:43:59 PM by AutoGen 5.11.9
+ *
+ * It has been AutoGen-ed
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -16,25 +16,29 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The genshellopt program is copyrighted and licensed
+ * under the following terms:
*
- * genshellopt copyright (c) 1999-2011 Bruce Korb - all rights reserved
+ * Copyright (C) 1999-2014 Bruce Korb, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the GNU Lesser General Public License,
+ * version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
*
- * genshellopt 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 3 of the License, or
- * (at your option) any later version.
- *
- * genshellopt 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, see <http://www.gnu.org/licenses/>.
-
+ * The genshellopt library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the genshellopt program.
* These macros are documented in the AutoGen info file in the
@@ -44,22 +48,22 @@
#define AUTOOPTS_GENSHELL_H_GUARD 1
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for genshellopt
*/
typedef enum {
INDEX_GENSHELL_OPT_SCRIPT = 0,
@@ -68,48 +72,69 @@ typedef enum {
INDEX_GENSHELL_OPT_HELP = 3,
INDEX_GENSHELL_OPT_MORE_HELP = 4
} teGenshell_OptIndex;
-
+/** count of all options for genshellopt */
#define GENSHELL_OPTION_CT 5
+/** genshellopt version */
#define GENSHELLOPT_VERSION "1"
+/** Full genshellopt version text */
#define GENSHELLOPT_FULL_VERSION "genshellopt 1"
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teGenshell_OptIndex enumeration above).
* e.g. HAVE_GENSHELL_OPT(SCRIPT)
*/
#define GENSHELL_DESC(n) (genshelloptOptions.pOptDesc[INDEX_GENSHELL_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_GENSHELL_OPT(n) (! UNUSED_OPT(& GENSHELL_DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define GENSHELL_OPT_ARG(n) (GENSHELL_DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_GENSHELL_OPT(n) (GENSHELL_DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_GENSHELL_OPT(n) (GENSHELL_DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_GENSHELL_OPT(n) (SELECTED_OPT(&GENSHELL_DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_GENSHELL_OPT(n) (UNUSED_OPT(& GENSHELL_DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_GENSHELL_OPT(n) (! DISABLED_OPT(& GENSHELL_DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_GENSHELL_OPT(n) (((tArgList*)(GENSHELL_DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_GENSHELL_OPT(n) (((tArgList*)(GENSHELL_DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_GENSHELL_OPT(n) STMTS( \
GENSHELL_DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((GENSHELL_DESC(n).fOptState & OPTST_INITENABLED) == 0) \
GENSHELL_DESC(n).fOptState |= OPTST_DISABLED; \
GENSHELL_DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of genshellopt exit codes
*/
typedef enum {
- GENSHELLOPT_EXIT_SUCCESS = 0,
- GENSHELLOPT_EXIT_FAILURE = 1
-} genshellopt_exit_code_t;
-/* * * * * *
- *
+ GENSHELLOPT_EXIT_SUCCESS = 0,
+ GENSHELLOPT_EXIT_FAILURE = 1,
+ GENSHELLOPT_EXIT_USAGE_ERROR = 64,
+ GENSHELLOPT_EXIT_LIBOPTS_FAILURE = 70
+} genshellopt_exit_code_t;
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_GENSHELL_OPT_SCRIPT 'o'
#define VALUE_GENSHELL_OPT_SHELL 's'
+/** option flag (value) for help-value option */
#define VALUE_GENSHELL_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_GENSHELL_OPT_MORE_HELP '!'
+/** option flag (value) for version-value option */
#define VALUE_GENSHELL_OPT_VERSION 'v'
/*
* Interface defines not associated with particular options
@@ -121,12 +146,12 @@ typedef enum {
genshelloptOptions.pzCurOpt = NULL )
#define START_GENSHELL_OPT RESTART_GENSHELL_OPT(1)
#define GENSHELL_USAGE(c) (*genshelloptOptions.pUsageProc)(&genshelloptOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the genshellopt option descriptor.
@@ -136,10 +161,21 @@ extern tOptions genshelloptOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
- static inline char* aoGetsText(char const* pz) {
- if (pz == NULL) return NULL;
- return (char*)gettext(pz);
- }
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
+static inline char* aoGetsText(char const* pz) {
+ if (pz == NULL) return NULL;
+ return (char*)gettext(pz);
+}
# define _(s) aoGetsText(s)
# endif /* _() */
@@ -169,4 +205,5 @@ extern tOptions genshelloptOptions;
}
#endif
#endif /* AUTOOPTS_GENSHELL_H_GUARD */
+
/* genshell.h ends here */
diff --git a/sntp/libopts/gettext.h b/sntp/libopts/gettext.h
new file mode 100644
index 000000000000..9b7416ded249
--- /dev/null
+++ b/sntp/libopts/gettext.h
@@ -0,0 +1,288 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2014 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+ the gettext() and ngettext() macros. This is an alternative to calling
+ textdomain(), and is useful for libraries. */
+# ifdef DEFAULT_TEXT_DOMAIN
+# undef gettext
+# define gettext(Msgid) \
+ dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+ <libintl.h>, which chokes if dcgettext is defined as a macro. So include
+ it now, to make later inclusions of <libintl.h> a NOP. */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+# undef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
+# define dcgettext(Domainname, Msgid, Category) \
+ ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 \
+ ? ((void) (Msgid2), (const char *) (Msgid1)) \
+ : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
+# undef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) \
+ ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) \
+ ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* Prefer gnulib's setlocale override over libintl's setlocale override. */
+#ifdef GNULIB_defined_setlocale
+# undef setlocale
+# define setlocale rpl_setlocale
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file. */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+ MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
+ short and rarely need to change.
+ The letter 'p' stands for 'particular' or 'special'. */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ int category)
+{
+ const char *translation = dcgettext (domain, msg_ctxt_id, category);
+ if (translation == msg_ctxt_id)
+ return msgid;
+ else
+ return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ const char *translation =
+ dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ if (translation == msg_ctxt_id || translation == msgid_plural)
+ return (n == 1 ? msgid : msgid_plural);
+ else
+ return translation;
+}
+
+/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
+ can be arbitrary expressions. But for string literals these macros are
+ less efficient than those above. */
+
+#include <string.h>
+
+#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (translation != msg_ctxt_id)
+ return translation;
+ }
+ return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ return translation;
+ }
+ return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/sntp/libopts/init.c b/sntp/libopts/init.c
new file mode 100644
index 000000000000..e038ed74e290
--- /dev/null
+++ b/sntp/libopts/init.c
@@ -0,0 +1,298 @@
+/**
+ * \file initialize.c
+ *
+ * initialize the libopts data structures.
+ *
+ * @addtogroup autoopts
+ * @{
+ */
+/*
+ * This file is part of AutoOpts, a companion to AutoGen.
+ * AutoOpts is free software.
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
+ *
+ * AutoOpts is available under any one of two licenses. The license
+ * in use must be one of these two and the choice is under the control
+ * of the user of the license.
+ *
+ * The GNU Lesser General Public License, version 3 or later
+ * See the files "COPYING.lgplv3" and "COPYING.gplv3"
+ *
+ * The Modified Berkeley Software Distribution License
+ * See the file "COPYING.mbsd"
+ *
+ * These files have the following sha256 sums:
+ *
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
+ */
+
+/* = = = START-STATIC-FORWARD = = = */
+static tSuccess
+do_presets(tOptions * opts);
+/* = = = END-STATIC-FORWARD = = = */
+
+/**
+ * Make sure the option descriptor is there and that we understand it.
+ * This should be called from any user entry point where one needs to
+ * worry about validity. (Some entry points are free to assume that
+ * the call is not the first to the library and, thus, that this has
+ * already been called.)
+ *
+ * Upon successful completion, pzProgName and pzProgPath are set.
+ *
+ * @param[in,out] opts program options descriptor
+ * @param[in] pname name of program, from argv[]
+ * @returns SUCCESS or FAILURE
+ */
+LOCAL tSuccess
+validate_struct(tOptions * opts, char const * pname)
+{
+ if (opts == NULL) {
+ fputs(zno_opt_arg, stderr);
+ return FAILURE;
+ }
+ print_exit = ((opts->fOptSet & OPTPROC_SHELL_OUTPUT) != 0);
+
+ /*
+ * IF the client has enabled translation and the translation procedure
+ * is available, then go do it.
+ */
+ if ( ((opts->fOptSet & OPTPROC_TRANSLATE) != 0)
+ && (opts->pTransProc != NULL)
+ && (option_xlateable_txt.field_ct != 0) ) {
+ /*
+ * If option names are not to be translated at all, then do not do
+ * it for configuration parsing either. (That is the bit that really
+ * gets tested anyway.)
+ */
+ if ((opts->fOptSet & OPTPROC_NO_XLAT_MASK) == OPTPROC_NXLAT_OPT)
+ opts->fOptSet |= OPTPROC_NXLAT_OPT_CFG;
+ (*opts->pTransProc)();
+ }
+
+ /*
+ * IF the struct version is not the current, and also
+ * either too large (?!) or too small,
+ * THEN emit error message and fail-exit
+ */
+ if ( ( opts->structVersion != OPTIONS_STRUCT_VERSION )
+ && ( (opts->structVersion > OPTIONS_STRUCT_VERSION )
+ || (opts->structVersion < OPTIONS_MINIMUM_VERSION )
+ ) ) {
+
+ static char const ao_ver_string[] =
+ STR(AO_CURRENT)":"STR(AO_REVISION)":"STR(AO_AGE)"\n";
+
+ fprintf(stderr, zwrong_ver, pname, NUM_TO_VER(opts->structVersion));
+ if (opts->structVersion > OPTIONS_STRUCT_VERSION )
+ fputs(ztoo_new, stderr);
+ else
+ fputs(ztoo_old, stderr);
+
+ fwrite(ao_ver_string, sizeof(ao_ver_string) - 1, 1, stderr);
+ return FAILURE;
+ }
+
+ /*
+ * If the program name hasn't been set, then set the name and the path
+ * and the set of equivalent characters.
+ */
+ if (opts->pzProgName == NULL) {
+ char const * pz = strrchr(pname, DIRCH);
+ char const ** pp =
+ (char const **)(void **)&(opts->pzProgName);
+
+ if (pz != NULL)
+ *pp = pz+1;
+ else
+ *pp = pname;
+
+ pz = pathfind(getenv("PATH"), (char *)pname, "rx");
+ if (pz != NULL)
+ pname = (void *)pz;
+
+ pp = (char const **)(void **)&(opts->pzProgPath);
+ *pp = pname;
+
+ /*
+ * when comparing long names, these are equivalent
+ */
+ strequate(zSepChars);
+ }
+
+ return SUCCESS;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * DO PRESETS
+ *
+ * The next several routines do the immediate action pass on the command
+ * line options, then the environment variables, then the config files in
+ * reverse order. Once done with that, the order is reversed and all
+ * the config files and environment variables are processed again, this
+ * time only processing the non-immediate action options. do_presets()
+ * will then return for optionProcess() to do the final pass on the command
+ * line arguments.
+ */
+
+/**
+ * scan the command line for immediate action options.
+ * This is only called the first time through.
+ * While this procedure is active, the OPTPROC_IMMEDIATE is true.
+ *
+ * @param pOpts program options descriptor
+ * @returns SUCCESS or FAILURE
+ */
+LOCAL tSuccess
+immediate_opts(tOptions * opts)
+{
+ tSuccess res;
+
+ opts->fOptSet |= OPTPROC_IMMEDIATE;
+ opts->curOptIdx = 1; /* start by skipping program name */
+ opts->pzCurOpt = NULL;
+
+ /*
+ * Examine all the options from the start. We process any options that
+ * are marked for immediate processing.
+ */
+ for (;;) {
+ tOptState opt_st = OPTSTATE_INITIALIZER(PRESET);
+
+ res = next_opt(opts, &opt_st);
+ switch (res) {
+ case FAILURE: goto failed_option;
+ case PROBLEM: res = SUCCESS; goto leave;
+ case SUCCESS: break;
+ }
+
+ /*
+ * IF this is an immediate-attribute option, then do it.
+ */
+ if (! DO_IMMEDIATELY(opt_st.flags))
+ continue;
+
+ if (! SUCCESSFUL(handle_opt(opts, &opt_st)))
+ break;
+ } failed_option:;
+
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ (*opts->pUsageProc)(opts, EXIT_FAILURE);
+
+ leave:
+
+ opts->fOptSet &= ~OPTPROC_IMMEDIATE;
+ return res;
+}
+
+/**
+ * check for preset values from a config files or envrionment variables
+ *
+ * @param[in,out] opts the structure with the option names to check
+ */
+static tSuccess
+do_presets(tOptions * opts)
+{
+ tOptDesc * od = NULL;
+
+ if (! SUCCESSFUL(immediate_opts(opts)))
+ return FAILURE;
+
+ /*
+ * IF this option set has a --save-opts option, then it also
+ * has a --load-opts option. See if a command line option has disabled
+ * option presetting.
+ */
+ if ( (opts->specOptIdx.save_opts != NO_EQUIVALENT)
+ && (opts->specOptIdx.save_opts != 0)) {
+ od = opts->pOptDesc + opts->specOptIdx.save_opts + 1;
+ if (DISABLED_OPT(od))
+ return SUCCESS;
+ }
+
+ /*
+ * Until we return from this procedure, disable non-presettable opts
+ */
+ opts->fOptSet |= OPTPROC_PRESETTING;
+ /*
+ * IF there are no config files,
+ * THEN do any environment presets and leave.
+ */
+ if (opts->papzHomeList == NULL) {
+ env_presets(opts, ENV_ALL);
+ }
+ else {
+ env_presets(opts, ENV_IMM);
+
+ /*
+ * Check to see if environment variables have disabled presetting.
+ */
+ if ((od != NULL) && ! DISABLED_OPT(od))
+ intern_file_load(opts);
+
+ /*
+ * ${PROGRAM_LOAD_OPTS} value of "no" cannot disable other environment
+ * variable options. Only the loading of .rc files.
+ */
+ env_presets(opts, ENV_NON_IMM);
+ }
+ opts->fOptSet &= ~OPTPROC_PRESETTING;
+
+ return SUCCESS;
+}
+
+/**
+ * AutoOpts initialization
+ *
+ * @param[in,out] opts the structure to initialize
+ * @param[in] a_ct program argument count
+ * @param[in] a_v program argument vector
+ */
+LOCAL bool
+ao_initialize(tOptions * opts, int a_ct, char ** a_v)
+{
+ if ((opts->fOptSet & OPTPROC_INITDONE) != 0)
+ return true;
+
+ opts->origArgCt = (unsigned int)a_ct;
+ opts->origArgVect = a_v;
+ opts->fOptSet |= OPTPROC_INITDONE;
+
+ if (HAS_pzPkgDataDir(opts))
+ program_pkgdatadir = opts->pzPkgDataDir;
+
+ if (! SUCCESSFUL(do_presets(opts)))
+ return false;
+
+ /*
+ * IF option name conversion was suppressed but it is not suppressed
+ * for the command line, then it's time to translate option names.
+ * Usage text will not get retranslated.
+ */
+ if ( ((opts->fOptSet & OPTPROC_TRANSLATE) != 0)
+ && (opts->pTransProc != NULL)
+ && ((opts->fOptSet & OPTPROC_NO_XLAT_MASK) == OPTPROC_NXLAT_OPT_CFG)
+ ) {
+ opts->fOptSet &= ~OPTPROC_NXLAT_OPT_CFG;
+ (*opts->pTransProc)();
+ }
+
+ if ((opts->fOptSet & OPTPROC_REORDER) != 0)
+ optionSort(opts);
+
+ opts->curOptIdx = 1;
+ opts->pzCurOpt = NULL;
+ return true;
+}
+
+/** @}
+ *
+ * Local Variables:
+ * mode: C
+ * c-file-style: "stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * end of autoopts/initialize.c */
diff --git a/sntp/libopts/intprops.h b/sntp/libopts/intprops.h
new file mode 100644
index 000000000000..6936ad572f88
--- /dev/null
+++ b/sntp/libopts/intprops.h
@@ -0,0 +1,320 @@
+/* intprops.h -- properties of integer types
+
+ Copyright (C) 2001-2005, 2009-2014 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
+
+#include <limits.h>
+
+/* Return an integer value, converted to the same type as the integer
+ expression E after integer type promotion. V is the unconverted value. */
+#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if the arithmetic type T is an integer type. bool counts as
+ an integer. */
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+ complement, ones' complement, or signed magnitude representation,
+ respectively. Much GNU code assumes two's complement, but some
+ people like to be portable to all possible C hosts. */
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement. */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
+
+/* True if the arithmetic type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+ a signed type. */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions. These
+ macros have undefined behavior if T is signed and has padding bits.
+ If this is a problem for you, please let us know how to fix it for
+ your host. */
+
+/* The maximum and minimum values for the integer type T. */
+#define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
+ : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+/* The maximum and minimum values for the type of the expression E,
+ after integer promotion. E should not have side effects. */
+#define _GL_INT_MINIMUM(e) \
+ (_GL_INT_SIGNED (e) \
+ ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e) \
+ (_GL_INT_SIGNED (e) \
+ ? _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e) \
+ (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works. This could be done by
+ 'configure', but for now it's easier to do it by hand. */
+#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed. Return 0
+ if it is definitely unsigned. This macro does not evaluate its argument,
+ and expands to an integer constant expression. */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Bound on length of the string representing an unsigned integer
+ value representable in B bits. log10 (2.0) < 146/485. The
+ smallest value of B where this bound is not tight is 2621. */
+#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
+/* Bound on length of the string representing an integer type or expression T.
+ Subtract 1 for the sign bit if T is signed, and then add 1 more for
+ a minus sign if needed.
+
+ Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+ signed, this macro may overestimate the true bound by one byte when
+ applied to unsigned types of size 2, 4, 16, ... bytes. */
+#define INT_STRLEN_BOUND(t) \
+ (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
+ - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ + _GL_SIGNED_TYPE_OR_EXPR (t))
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+ including the terminating null. */
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+ The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
+ operators might not yield numerically correct answers due to
+ arithmetic overflow. They do not rely on undefined or
+ implementation-defined behavior. Their implementations are simple
+ and straightforward, but they are a bit harder to use than the
+ INT_<op>_OVERFLOW macros described below.
+
+ Example usage:
+
+ long int i = ...;
+ long int j = ...;
+ if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
+ printf ("multiply would overflow");
+ else
+ printf ("product is %ld", i * j);
+
+ Restrictions on *_RANGE_OVERFLOW macros:
+
+ These macros do not check for all possible numerical problems or
+ undefined or unspecified behavior: they do not check for division
+ by zero, for bad shift counts, or for shifting negative numbers.
+
+ These macros may evaluate their arguments zero or multiple times,
+ so the arguments should not have side effects. The arithmetic
+ arguments (including the MIN and MAX arguments) must be of the same
+ integer type after the usual arithmetic conversions, and the type
+ must have minimum value MIN and maximum MAX. Unsigned types should
+ use a zero MIN of the proper type.
+
+ These macros are tuned for constant MIN and MAX. For commutative
+ operations such as A + B, they are also tuned for constant B. */
+
+/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. */
+#define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \
+ ((b) < 0 \
+ ? (a) < (min) - (b) \
+ : (max) - (b) < (a))
+
+/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. */
+#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \
+ ((b) < 0 \
+ ? (max) + (b) < (a) \
+ : (a) < (min) + (b))
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. */
+#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
+ ((min) < 0 \
+ ? (a) < - (max) \
+ : 0 < (a))
+
+/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Avoid && and || as they tickle
+ bugs in Sun C 5.11 2010/08/13 and other compilers; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
+ ((b) < 0 \
+ ? ((a) < 0 \
+ ? (a) < (max) / (b) \
+ : (b) == -1 \
+ ? 0 \
+ : (min) / (b) < (a)) \
+ : (b) == 0 \
+ ? 0 \
+ : ((a) < 0 \
+ ? (a) < (min) / (b) \
+ : (max) / (b) < (a)))
+
+/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Do not check for division by zero. */
+#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \
+ ((min) < 0 && (b) == -1 && (a) < - (max))
+
+/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Do not check for division by zero.
+ Mathematically, % should never overflow, but on x86-like hosts
+ INT_MIN % -1 traps, and the C standard permits this, so treat this
+ as an overflow too. */
+#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \
+ INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
+
+/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
+ See above for restrictions. Here, MIN and MAX are for A only, and B need
+ not be of the same type as the other arguments. The C standard says that
+ behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
+ A is negative then A << B has undefined behavior and A >> B has
+ implementation-defined behavior, but do not check these other
+ restrictions. */
+#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \
+ ((a) < 0 \
+ ? (a) < (min) >> (b) \
+ : (max) >> (b) < (a))
+
+
+/* The _GL*_OVERFLOW macros have the same restrictions as the
+ *_RANGE_OVERFLOW macros, except that they do not assume that operands
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
+ that the result (e.g., A + B) has that type. */
+#define _GL_ADD_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? (b) <= (a) + (b) \
+ : (b) < 0 ? (a) <= (a) + (b) \
+ : (a) + (b) < (b))
+#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
+ : (a) < 0 ? 1 \
+ : (b) < 0 ? (a) - (b) <= (a) \
+ : (a) < (b))
+#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
+ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
+ : (a) < 0 ? (b) <= (a) + (b) - 1 \
+ : (b) < 0 && (a) + (b) <= (a))
+#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \
+ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
+ : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
+ : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
+
+/* Return a nonzero value if A is a mathematical multiple of B, where
+ A is unsigned, B is negative, and MAX is the maximum value of A's
+ type. A's type must be the same as (A % B)'s type. Normally (A %
+ -B == 0) suffices, but things get tricky if -B would overflow. */
+#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \
+ (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \
+ ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \
+ ? (a) \
+ : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \
+ : (a) % - (b)) \
+ == 0)
+
+
+/* Integer overflow checks.
+
+ The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
+ might not yield numerically correct answers due to arithmetic overflow.
+ They work correctly on all known practical hosts, and do not rely
+ on undefined behavior due to signed arithmetic overflow.
+
+ Example usage:
+
+ long int i = ...;
+ long int j = ...;
+ if (INT_MULTIPLY_OVERFLOW (i, j))
+ printf ("multiply would overflow");
+ else
+ printf ("product is %ld", i * j);
+
+ These macros do not check for all possible numerical problems or
+ undefined or unspecified behavior: they do not check for division
+ by zero, for bad shift counts, or for shifting negative numbers.
+
+ These macros may evaluate their arguments zero or multiple times, so the
+ arguments should not have side effects.
+
+ These macros are tuned for their last argument being a constant.
+
+ Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
+ A % B, and A << B would overflow, respectively. */
+
+#define INT_ADD_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+#define INT_SUBTRACT_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+#define INT_NEGATE_OVERFLOW(a) \
+ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#define INT_MULTIPLY_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
+#define INT_DIVIDE_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
+#define INT_REMAINDER_OVERFLOW(a, b) \
+ _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
+#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
+ INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
+ _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+
+/* Return 1 if the expression A <op> B would overflow,
+ where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+ assuming MIN and MAX are the minimum and maximum for the result type.
+ Arguments should be free of side effects. */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
+ op_result_overflow (a, b, \
+ _GL_INT_MINIMUM (0 * (b) + (a)), \
+ _GL_INT_MAXIMUM (0 * (b) + (a)))
+
+#endif /* _GL_INTPROPS_H */
diff --git a/sntp/libopts/libopts.c b/sntp/libopts/libopts.c
index 15a070d928c5..a0ff3624745a 100644
--- a/sntp/libopts/libopts.c
+++ b/sntp/libopts/libopts.c
@@ -1,26 +1,30 @@
-#include "autoopts/project.h"
#define AUTOOPTS_INTERNAL 1
-#include "compat/compat.h"
+#include "autoopts/project.h"
#define LOCAL static
+#include "ao-strs.h"
#include "autoopts/options.h"
#include "autoopts/usage-txt.h"
#include "genshell.h"
-#include "xat-attribute.h"
-#include "value-type.h"
+#include "option-xat-attribute.h"
+#include "option-value-type.h"
+#include "ao-strs.h"
#include "ag-char-map.h"
#include "autoopts.h"
#include "proto.h"
-#include "parse-duration.h"
#include "parse-duration.c"
-#include "value-type.c"
-#include "xat-attribute.c"
+#include "ao-strs.c"
+#include "option-value-type.c"
+#include "option-xat-attribute.c"
#include "autoopts.c"
+#include "alias.c"
#include "boolean.c"
+#include "check.c"
#include "configfile.c"
#include "cook.c"
-#include "enumeration.c"
-#include "environment.c"
+#include "enum.c"
+#include "env.c"
#include "file.c"
+#include "find.c"
#include "genshell.c"
#include "load.c"
#include "makeshell.c"
@@ -35,7 +39,8 @@
#include "stack.c"
#include "streqvcmp.c"
#include "text_mmap.c"
-#include "tokenize.c"
#include "time.c"
+#include "tokenize.c"
#include "usage.c"
#include "version.c"
+#include "init.c"
diff --git a/sntp/libopts/load.c b/sntp/libopts/load.c
index 024dce9301a8..5c29d96ecc9a 100644
--- a/sntp/libopts/load.c
+++ b/sntp/libopts/load.c
@@ -1,15 +1,18 @@
/**
* \file load.c
- * Time-stamp: "2010-12-18 11:46:07 bkorb"
*
* This file contains the routines that deal with processing text strings
* for options, either from a NUL-terminated string passed in or from an
* rc/ini file.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -21,37 +24,83 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/* = = = START-STATIC-FORWARD = = = */
-static ag_bool
-insertProgramPath(char * pzBuf, int bufSize, char const * pzName,
- char const * pzProgPath);
+static bool
+get_realpath(char * buf, size_t b_sz);
+
+static bool
+add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path);
+
+static bool
+add_env_val(char * buf, int buf_sz, char const * name);
-static ag_bool
-insertEnvVal(char * pzBuf, int bufSize, char const * pzName,
- char const * pzProgPath);
+static char *
+assemble_arg_val(char * txt, tOptionLoadMode mode);
-static char*
-assembleArgValue(char* pzTxt, tOptionLoadMode mode);
+static char *
+trim_quotes(char * arg);
+
+static bool
+direction_ok(opt_state_mask_t f, int dir);
/* = = = END-STATIC-FORWARD = = = */
+static bool
+get_realpath(char * buf, size_t b_sz)
+{
+#if defined(HAVE_CANONICALIZE_FILE_NAME)
+ {
+ size_t name_len;
+
+ char * pz = canonicalize_file_name(buf);
+ if (pz == NULL)
+ return false;
+
+ name_len = strlen(pz);
+ if (name_len >= (size_t)b_sz) {
+ free(pz);
+ return false;
+ }
+
+ memcpy(buf, pz, name_len + 1);
+ free(pz);
+ }
+
+#elif defined(HAVE_REALPATH)
+ {
+ size_t name_len;
+ char z[PATH_MAX+1];
+
+ if (realpath(buf, z) == NULL)
+ return false;
+
+ name_len = strlen(z);
+ if (name_len >= b_sz)
+ return false;
+
+ memcpy(buf, z, name_len + 1);
+ }
+#endif
+ return true;
+}
+
/*=export_func optionMakePath
* private:
*
* what: translate and construct a path
- * arg: + char* + pzBuf + The result buffer +
- * arg: + int + bufSize + The size of this buffer +
- * arg: + char const* + pzName + The input name +
- * arg: + char const* + pzProgPath + The full path of the current program +
+ * arg: + char* + p_buf + The result buffer +
+ * arg: + int + b_sz + The size of this buffer +
+ * arg: + char const* + fname + The input name +
+ * arg: + char const* + prg_path + The full path of the current program +
*
- * ret-type: ag_bool
- * ret-desc: AG_TRUE if the name was handled, otherwise AG_FALSE.
+ * ret-type: bool
+ * ret-desc: true if the name was handled, otherwise false.
* If the name does not start with ``$'', then it is handled
* simply by copying the input name to the output buffer and
* resolving the name with either
@@ -77,7 +126,7 @@ assembleArgValue(char* pzTxt, tOptionLoadMode mode);
* @code{pzName} string and must either be the entire string or be followed
* by the @code{'/'} (backslash on windows) character.
*
- * err: @code{AG_FALSE} is returned if:
+ * err: @code{false} is returned if:
* @*
* @bullet{} The input name exceeds @code{bufSize} bytes.
* @*
@@ -92,28 +141,29 @@ assembleArgValue(char* pzTxt, tOptionLoadMode mode);
* @bullet{} @code{canonicalize_file_name} or @code{realpath} return
* errors (cannot resolve the resulting path).
=*/
-ag_bool
-optionMakePath(char * pzBuf, int bufSize, char const * pzName,
- char const * pzProgPath)
+bool
+optionMakePath(char * p_buf, int b_sz, char const * fname, char const * prg_path)
{
- size_t name_len = strlen(pzName);
+ {
+ size_t len = strlen(fname);
- if ((bufSize <= name_len) || (name_len == 0))
- return AG_FALSE;
+ if (((size_t)b_sz <= len) || (len == 0))
+ return false;
+ }
/*
* IF not an environment variable, just copy the data
*/
- if (*pzName != '$') {
- char const* pzS = pzName;
- char* pzD = pzBuf;
- int ct = bufSize;
+ if (*fname != '$') {
+ char const * src = fname;
+ char * dst = p_buf;
+ int ct = b_sz;
for (;;) {
- if ( (*(pzD++) = *(pzS++)) == NUL)
+ if ( (*(dst++) = *(src++)) == NUL)
break;
if (--ct <= 0)
- return AG_FALSE;
+ return false;
}
}
@@ -122,79 +172,49 @@ optionMakePath(char * pzBuf, int bufSize, char const * pzName,
* it must start with "$$/". In either event, replace the "$$"
* with the path to the executable and append a "/" character.
*/
- else switch (pzName[1]) {
+ else switch (fname[1]) {
case NUL:
- return AG_FALSE;
+ return false;
case '$':
- if (! insertProgramPath(pzBuf, bufSize, pzName, pzProgPath))
- return AG_FALSE;
+ if (! add_prog_path(p_buf, b_sz, fname, prg_path))
+ return false;
break;
case '@':
if (program_pkgdatadir[0] == NUL)
- return AG_FALSE;
+ return false;
- if (snprintf(pzBuf, bufSize, "%s%s", program_pkgdatadir, pzName + 2)
- >= bufSize)
- return AG_FALSE;
+ if (snprintf(p_buf, (size_t)b_sz, "%s%s",
+ program_pkgdatadir, fname + 2) >= b_sz)
+ return false;
break;
default:
- if (! insertEnvVal(pzBuf, bufSize, pzName, pzProgPath))
- return AG_FALSE;
+ if (! add_env_val(p_buf, b_sz, fname))
+ return false;
}
-#if defined(HAVE_CANONICALIZE_FILE_NAME)
- {
- char * pz = canonicalize_file_name(pzBuf);
- if (pz == NULL)
- return AG_FALSE;
-
- name_len = strlen(pz);
- if (name_len >= bufSize) {
- free(pz);
- return AG_FALSE;
- }
-
- memcpy(pzBuf, pz, name_len + 1);
- free(pz);
- }
-
-#elif defined(HAVE_REALPATH)
- {
- char z[PATH_MAX+1];
-
- if (realpath(pzBuf, z) == NULL)
- return AG_FALSE;
-
- name_len = strlen(z);
- if (name_len >= bufSize)
- return AG_FALSE;
-
- memcpy(pzBuf, z, name_len + 1);
- }
-#endif
-
- return AG_TRUE;
+ return get_realpath(p_buf, b_sz);
}
-
-static ag_bool
-insertProgramPath(char * pzBuf, int bufSize, char const * pzName,
- char const * pzProgPath)
+/**
+ * convert a leading "$$" into a path to the executable.
+ */
+static bool
+add_prog_path(char * buf, int b_sz, char const * fname, char const * prg_path)
{
- char const* pzPath;
- char const* pz;
+ char const * path;
+ char const * pz;
int skip = 2;
- switch (pzName[2]) {
+ switch (fname[2]) {
case DIRCH:
skip = 3;
case NUL:
break;
default:
- return AG_FALSE;
+ return false;
}
/*
@@ -202,104 +222,112 @@ insertProgramPath(char * pzBuf, int bufSize, char const * pzName,
* If it is, we're done. Otherwise, we have to hunt
* for the program using "pathfind".
*/
- if (strchr(pzProgPath, DIRCH) != NULL)
- pzPath = pzProgPath;
+ if (strchr(prg_path, DIRCH) != NULL)
+ path = prg_path;
else {
- pzPath = pathfind(getenv("PATH"), (char*)pzProgPath, "rx");
+ path = pathfind(getenv("PATH"), (char*)prg_path, "rx");
- if (pzPath == NULL)
- return AG_FALSE;
+ if (path == NULL)
+ return false;
}
- pz = strrchr(pzPath, DIRCH);
+ pz = strrchr(path, DIRCH);
/*
* IF we cannot find a directory name separator,
* THEN we do not have a path name to our executable file.
*/
if (pz == NULL)
- return AG_FALSE;
+ return false;
- pzName += skip;
+ fname += skip;
/*
* Concatenate the file name to the end of the executable path.
* The result may be either a file or a directory.
*/
- if ((pz - pzPath)+1 + strlen(pzName) >= bufSize)
- return AG_FALSE;
+ if ((unsigned)(pz - path) + 1 + strlen(fname) >= (unsigned)b_sz)
+ return false;
- memcpy(pzBuf, pzPath, (size_t)((pz - pzPath)+1));
- strcpy(pzBuf + (pz - pzPath) + 1, pzName);
+ memcpy(buf, path, (size_t)((pz - path)+1));
+ strcpy(buf + (pz - path) + 1, fname);
/*
- * If the "pzPath" path was gotten from "pathfind()", then it was
+ * If the "path" path was gotten from "pathfind()", then it was
* allocated and we need to deallocate it.
*/
- if (pzPath != pzProgPath)
- AGFREE(pzPath);
- return AG_TRUE;
+ if (path != prg_path)
+ AGFREE(path);
+ return true;
}
-
-static ag_bool
-insertEnvVal(char * pzBuf, int bufSize, char const * pzName,
- char const * pzProgPath)
+/**
+ * Add an environment variable value.
+ */
+static bool
+add_env_val(char * buf, int buf_sz, char const * name)
{
- char* pzDir = pzBuf;
+ char * dir_part = buf;
for (;;) {
- int ch = (int)*++pzName;
+ int ch = (int)*++name;
if (! IS_VALUE_NAME_CHAR(ch))
break;
- *(pzDir++) = (char)ch;
+ *(dir_part++) = (char)ch;
}
- if (pzDir == pzBuf)
- return AG_FALSE;
+ if (dir_part == buf)
+ return false;
- *pzDir = NUL;
+ *dir_part = NUL;
- pzDir = getenv(pzBuf);
+ dir_part = getenv(buf);
/*
* Environment value not found -- skip the home list entry
*/
- if (pzDir == NULL)
- return AG_FALSE;
+ if (dir_part == NULL)
+ return false;
- if (strlen(pzDir) + 1 + strlen(pzName) >= bufSize)
- return AG_FALSE;
+ if (strlen(dir_part) + 1 + strlen(name) >= (unsigned)buf_sz)
+ return false;
- sprintf(pzBuf, "%s%s", pzDir, pzName);
- return AG_TRUE;
+ sprintf(buf, "%s%s", dir_part, name);
+ return true;
}
-
+/**
+ * Trim leading and trailing white space.
+ * If we are cooking the text and the text is quoted, then "cook"
+ * the string. To cook, the string must be quoted.
+ *
+ * @param[in,out] txt the input and output string
+ * @param[in] mode the handling mode (cooking method)
+ */
LOCAL void
-mungeString(char* pzTxt, tOptionLoadMode mode)
+munge_str(char * txt, tOptionLoadMode mode)
{
- char* pzE;
+ char * pzE;
if (mode == OPTION_LOAD_KEEP)
return;
- if (IS_WHITESPACE_CHAR(*pzTxt)) {
- char* pzS = pzTxt;
- char* pzD = pzTxt;
- while (IS_WHITESPACE_CHAR(*++pzS)) ;
- while ((*(pzD++) = *(pzS++)) != NUL) ;
- pzE = pzD-1;
+ if (IS_WHITESPACE_CHAR(*txt)) {
+ char * src = SPN_WHITESPACE_CHARS(txt+1);
+ size_t l = strlen(src) + 1;
+ memmove(txt, src, l);
+ pzE = txt + l - 1;
+
} else
- pzE = pzTxt + strlen(pzTxt);
+ pzE = txt + strlen(txt);
- while ((pzE > pzTxt) && IS_WHITESPACE_CHAR(pzE[-1])) pzE--;
+ pzE = SPN_WHITESPACE_BACK(txt, pzE);
*pzE = NUL;
if (mode == OPTION_LOAD_UNCOOKED)
return;
- switch (*pzTxt) {
+ switch (*txt) {
default: return;
case '"':
case '\'': break;
@@ -311,22 +339,20 @@ mungeString(char* pzTxt, tOptionLoadMode mode)
case '\'': break;
}
- (void)ao_string_cook(pzTxt, NULL);
+ (void)ao_string_cook(txt, NULL);
}
-
-static char*
-assembleArgValue(char* pzTxt, tOptionLoadMode mode)
+static char *
+assemble_arg_val(char * txt, tOptionLoadMode mode)
{
- static char const zBrk[] = " \t\n:=";
- char* pzEnd = strpbrk(pzTxt, zBrk);
- int space_break;
+ char * end = strpbrk(txt, ARG_BREAK_STR);
+ int space_break;
/*
* Not having an argument to a configurable name is okay.
*/
- if (pzEnd == NULL)
- return pzTxt + strlen(pzTxt);
+ if (end == NULL)
+ return txt + strlen(txt);
/*
* If we are keeping all whitespace, then the modevalue starts with the
@@ -334,8 +360,8 @@ assembleArgValue(char* pzTxt, tOptionLoadMode mode)
* of which character caused it.
*/
if (mode == OPTION_LOAD_KEEP) {
- *(pzEnd++) = NUL;
- return pzEnd;
+ *(end++) = NUL;
+ return end;
}
/*
@@ -343,90 +369,85 @@ assembleArgValue(char* pzTxt, tOptionLoadMode mode)
* because we'll have to skip over an immediately following ':' or '='
* (and the white space following *that*).
*/
- space_break = IS_WHITESPACE_CHAR(*pzEnd);
- *(pzEnd++) = NUL;
- while (IS_WHITESPACE_CHAR(*pzEnd)) pzEnd++;
- if (space_break && ((*pzEnd == ':') || (*pzEnd == '=')))
- while (IS_WHITESPACE_CHAR(*++pzEnd)) ;
+ space_break = IS_WHITESPACE_CHAR(*end);
+ *(end++) = NUL;
+
+ end = SPN_WHITESPACE_CHARS(end);
+ if (space_break && ((*end == ':') || (*end == '=')))
+ end = SPN_WHITESPACE_CHARS(end+1);
- return pzEnd;
+ return end;
}
+static char *
+trim_quotes(char * arg)
+{
+ switch (*arg) {
+ case '"':
+ case '\'':
+ ao_string_cook(arg, NULL);
+ }
+ return arg;
+}
-/*
- * Load an option from a block of text. The text must start with the
- * configurable/option name and be followed by its associated value.
- * That value may be processed in any of several ways. See "tOptionLoadMode"
- * in autoopts.h.
+/**
+ * See if the option is to be processed in the current scan direction
+ * (-1 or +1).
*/
-LOCAL void
-loadOptionLine(
- tOptions* pOpts,
- tOptState* pOS,
- char* pzLine,
- tDirection direction,
- tOptionLoadMode load_mode )
+static bool
+direction_ok(opt_state_mask_t f, int dir)
{
- while (IS_WHITESPACE_CHAR(*pzLine)) pzLine++;
-
- {
- char* pzArg = assembleArgValue(pzLine, load_mode);
-
- if (! SUCCESSFUL(longOptionFind(pOpts, pzLine, pOS)))
- return;
- if (pOS->flags & OPTST_NO_INIT)
- return;
- pOS->pzOptArg = pzArg;
- }
+ if (dir == 0)
+ return true;
- switch (pOS->flags & (OPTST_IMM|OPTST_DISABLE_IMM)) {
+ switch (f & (OPTST_IMM|OPTST_DISABLE_IMM)) {
case 0:
/*
* The selected option has no immediate action.
* THEREFORE, if the direction is PRESETTING
* THEN we skip this option.
*/
- if (PRESETTING(direction))
- return;
+ if (PRESETTING(dir))
+ return false;
break;
case OPTST_IMM:
- if (PRESETTING(direction)) {
+ if (PRESETTING(dir)) {
/*
* We are in the presetting direction with an option we handle
* immediately for enablement, but normally for disablement.
* Therefore, skip if disabled.
*/
- if ((pOS->flags & OPTST_DISABLED) == 0)
- return;
+ if ((f & OPTST_DISABLED) == 0)
+ return false;
} else {
/*
* We are in the processing direction with an option we handle
* immediately for enablement, but normally for disablement.
* Therefore, skip if NOT disabled.
*/
- if ((pOS->flags & OPTST_DISABLED) != 0)
- return;
+ if ((f & OPTST_DISABLED) != 0)
+ return false;
}
break;
case OPTST_DISABLE_IMM:
- if (PRESETTING(direction)) {
+ if (PRESETTING(dir)) {
/*
* We are in the presetting direction with an option we handle
* immediately for disablement, but normally for disablement.
* Therefore, skip if NOT disabled.
*/
- if ((pOS->flags & OPTST_DISABLED) != 0)
- return;
+ if ((f & OPTST_DISABLED) != 0)
+ return false;
} else {
/*
* We are in the processing direction with an option we handle
* immediately for disablement, but normally for disablement.
* Therefore, skip if disabled.
*/
- if ((pOS->flags & OPTST_DISABLED) == 0)
- return;
+ if ((f & OPTST_DISABLED) == 0)
+ return false;
}
break;
@@ -436,51 +457,95 @@ loadOptionLine(
* THEREFORE, if the direction is PROCESSING
* THEN we skip this option.
*/
- if (PROCESSING(direction))
- return;
+ if (PROCESSING(dir))
+ return false;
break;
}
+ return true;
+}
+
+/**
+ * Load an option from a block of text. The text must start with the
+ * configurable/option name and be followed by its associated value.
+ * That value may be processed in any of several ways. See "tOptionLoadMode"
+ * in autoopts.h.
+ *
+ * @param[in,out] opts program options descriptor
+ * @param[in,out] opt_state option processing state
+ * @param[in,out] line source line with long option name in it
+ * @param[in] direction current processing direction (preset or not)
+ * @param[in] load_mode option loading mode (OPTION_LOAD_*)
+ */
+LOCAL void
+load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
+ tDirection direction, tOptionLoadMode load_mode )
+{
+ /*
+ * When parsing a stored line, we only look at the characters after
+ * a hyphen. Long names must always be at least two characters and
+ * short options are always exactly one character long.
+ */
+ line = SPN_LOAD_LINE_SKIP_CHARS(line);
+
+ {
+ char * arg = assemble_arg_val(line, load_mode);
+
+ if (IS_OPTION_NAME_CHAR(line[1])) {
+
+ if (! SUCCESSFUL(opt_find_long(opts, line, opt_state)))
+ return;
+
+ } else if (! SUCCESSFUL(opt_find_short(opts, *line, opt_state)))
+ return;
+
+ if ((! CALLED(direction)) && (opt_state->flags & OPTST_NO_INIT))
+ return;
+
+ opt_state->pzOptArg = trim_quotes(arg);
+ }
+
+ if (! direction_ok(opt_state->flags, direction))
+ return;
/*
* Fix up the args.
*/
- if (OPTST_GET_ARGTYPE(pOS->pOD->fOptState) == OPARG_TYPE_NONE) {
- if (*pOS->pzOptArg != NUL)
+ if (OPTST_GET_ARGTYPE(opt_state->pOD->fOptState) == OPARG_TYPE_NONE) {
+ if (*opt_state->pzOptArg != NUL)
return;
- pOS->pzOptArg = NULL;
+ opt_state->pzOptArg = NULL;
- } else if (pOS->pOD->fOptState & OPTST_ARG_OPTIONAL) {
- if (*pOS->pzOptArg == NUL)
- pOS->pzOptArg = NULL;
+ } else if (opt_state->pOD->fOptState & OPTST_ARG_OPTIONAL) {
+ if (*opt_state->pzOptArg == NUL)
+ opt_state->pzOptArg = NULL;
else {
- AGDUPSTR(pOS->pzOptArg, pOS->pzOptArg, "option argument");
- pOS->flags |= OPTST_ALLOC_ARG;
+ AGDUPSTR(opt_state->pzOptArg, opt_state->pzOptArg, "opt arg");
+ opt_state->flags |= OPTST_ALLOC_ARG;
}
} else {
- if (*pOS->pzOptArg == NUL)
- pOS->pzOptArg = zNil;
+ if (*opt_state->pzOptArg == NUL)
+ opt_state->pzOptArg = zNil;
else {
- AGDUPSTR(pOS->pzOptArg, pOS->pzOptArg, "option argument");
- pOS->flags |= OPTST_ALLOC_ARG;
+ AGDUPSTR(opt_state->pzOptArg, opt_state->pzOptArg, "opt arg");
+ opt_state->flags |= OPTST_ALLOC_ARG;
}
}
{
tOptionLoadMode sv = option_load_mode;
option_load_mode = load_mode;
- handle_opt(pOpts, pOS);
+ handle_opt(opts, opt_state);
option_load_mode = sv;
}
}
-
/*=export_func optionLoadLine
*
* what: process a string for an option name and value
*
- * arg: tOptions*, pOpts, program options descriptor
- * arg: char const*, pzLine, NUL-terminated text
+ * arg: tOptions*, opts, program options descriptor
+ * arg: char const*, line, NUL-terminated text
*
* doc:
*
@@ -491,7 +556,8 @@ loadOptionLine(
* When passed a pointer to the option struct and a string, it will find
* the option named by the first token on the string and set the option
* argument to the remainder of the string. The caller must NUL terminate
- * the string. Any embedded new lines will be included in the option
+ * the string. The caller need not skip over any introductory hyphens.
+ * Any embedded new lines will be included in the option
* argument. If the input looks like one or more quoted strings, then the
* input will be "cooked". The "cooking" is identical to the string
* formation used in AutoGen definition files (@pxref{basic expression}),
@@ -501,15 +567,19 @@ loadOptionLine(
* will cause a warning to print, but the function should return.
=*/
void
-optionLoadLine(tOptions * pOpts, char const * pzLine)
+optionLoadLine(tOptions * opts, char const * line)
{
tOptState st = OPTSTATE_INITIALIZER(SET);
- char* pz;
- AGDUPSTR(pz, pzLine, "user option line");
- loadOptionLine(pOpts, &st, pz, DIRECTION_PROCESS, OPTION_LOAD_COOKED);
+ char * pz;
+ proc_state_mask_t sv_flags = opts->fOptSet;
+ opts->fOptSet &= ~OPTPROC_ERRSTOP;
+ AGDUPSTR(pz, line, "opt line");
+ load_opt_line(opts, &st, pz, DIRECTION_CALLED, OPTION_LOAD_COOKED);
AGFREE(pz);
+ opts->fOptSet = sv_flags;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4
index 7a52b5e33dbd..4a4ca181bcce 100644
--- a/sntp/libopts/m4/libopts.m4
+++ b/sntp/libopts/m4/libopts.m4
@@ -1,8 +1,8 @@
dnl -*- buffer-read-only: t -*- vi: set ro:
-dnl
+dnl
dnl DO NOT EDIT THIS FILE (libopts.m4)
-dnl
-dnl It has been AutoGen-ed April 29, 2011 at 03:43:56 PM by AutoGen 5.11.9
+dnl
+dnl It has been AutoGen-ed August 3, 2014 at 10:44:34 AM by AutoGen 5.18.4pre11
dnl From the definitions libopts.def
dnl and the template file conftest.tpl
dnl
@@ -11,33 +11,35 @@ dnl
AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
AC_REQUIRE([AC_HEADER_STDC])
AC_HEADER_DIRENT
-
+
# =================
# AC_CHECK_HEADERS
# =================
AC_CHECK_HEADERS([ \
- dlfcn.h errno.h fcntl.h libgen.h \
- memory.h netinet/in.h setjmp.h sys/mman.h \
- sys/param.h sys/poll.h sys/procset.h sys/select.h \
- sys/socket.h sys/stropts.h sys/time.h sys/un.h \
- sys/wait.h unistd.h utime.h sysexits.h ])
-
+ sys/mman.h sys/param.h sys/poll.h sys/procset.h \
+ sys/select.h sys/socket.h sys/stropts.h sys/time.h \
+ sys/un.h sys/wait.h dlfcn.h errno.h \
+ fcntl.h libgen.h libintl.h memory.h \
+ netinet/in.h setjmp.h stdbool.h sysexits.h \
+ unistd.h utime.h])
+
AC_CHECK_HEADERS([stdarg.h varargs.h],
[lo_have_arg_hdr=true;break],
[lo_have_arg_hdr=false])
-
+
AC_CHECK_HEADERS([string.h strings.h],
[lo_have_str_hdr=true;break],
[lo_have_str_hdr=false])
-
+
AC_CHECK_HEADERS([limits.h sys/limits.h values.h],
[lo_have_lim_hdr=true;break],
[lo_have_lim_hdr=false])
-
+
AC_CHECK_HEADERS([inttypes.h stdint.h],
[lo_have_typ_hdr=true;break],
[lo_have_typ_hdr=false])
-
+ gl_STDNORETURN_H
+
# ----------------------------------------------------------------------
# check for various programs used during the build.
# On OS/X, "wchar.h" needs "runetype.h" to work properly.
@@ -48,63 +50,67 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
# include <runetype.h>
#endif
])
-
+
+ AC_ARG_ENABLE([nls],
+ AS_HELP_STRING([--disable-nls],[disable nls support in libopts]))
+ AS_IF([test "x$enable_nls" != "xno" && \
+ test "X${ac_cv_header_libintl_h}" = Xyes], [
+ AC_DEFINE([ENABLE_NLS],[1],[nls support in libopts])])
+
# --------------------------------------------
# Verify certain entries from AC_CHECK_HEADERS
# --------------------------------------------
- [for f in sys_types sys_mman sys_param sys_stat sys_wait \
- string errno stdlib memory setjmp
- do eval as_ac_var=\${ac_cv_header_${f}_h+set}
- test "${as_ac_var}" = set || {
- ]AC_MSG_ERROR([You must have ${f}.h on your system])[
- }
- done
-
- ${lo_have_arg_hdr} || \
- ]AC_MSG_ERROR([You must have stdarg.h or varargs.h on your system])[
-
+ [${lo_have_arg_hdr} || \
+ ]AC_MSG_ERROR([you must have stdarg.h or varargs.h on your system])[
+
${lo_have_str_hdr} || \
- ]AC_MSG_ERROR([You must have string.h or strings.h on your system])[
-
+ ]AC_MSG_ERROR([you must have string.h or strings.h on your system])[
+
${lo_have_lim_hdr} || \
]AC_MSG_ERROR(
- [You must have one of limits.h, sys/limits.h or values.h])[
-
+ [you must have one of limits.h, sys/limits.h or values.h])[
+
${lo_have_typ_hdr} || \
- ]AC_MSG_ERROR([You must have inttypes.h or stdint.h on your system])
-
+ ]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
+
+ for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
+ do eval as_ac_var=\${ac_cv_header_${f}_h}
+ test "X${as_ac_var}" = Xyes || {
+ ]AC_MSG_ERROR([you must have ${f}.h on your system])[
+ }
+ done
+ test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
+ echo '#include <stdint.h>' > inttypes.h]
+
# ----------------------------------------------------------------------
# Checks for typedefs
# ----------------------------------------------------------------------
AC_CHECK_TYPES(wchar_t)
AC_CHECK_TYPES(wint_t, [], [], [
- AC_INCLUDES_DEFAULT
- #if HAVE_RUNETYPE_H
- # include <runetype.h>
- #endif
- #if HAVE_WCHAR_H
- # include <wchar.h>
- #endif
+ AC_INCLUDES_DEFAULT
+ #if HAVE_RUNETYPE_H
+ # include <runetype.h>
+ #endif
+ #if HAVE_WCHAR_H
+ # include <wchar.h>
+ #endif
])
AC_CHECK_TYPES([int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
- intptr_t, uintptr_t, uint_t, pid_t, size_t])
-
- # =====
- # sizes
- # =====
+ intptr_t, uintptr_t, uint_t, pid_t, size_t, ptrdiff_t])
AC_CHECK_SIZEOF(char*, 8)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(short, 2)
-
- # ----------------------------------------------------------------------
- # AC_CHECK_LIB for SVR4 libgen, and use it if it defines pathfind.
- # ----------------------------------------------------------------------
+
+ # ------------
+ # AC_CHECK_LIB
+ # ------------
AC_CHECK_LIB(gen, pathfind)
+ AC_CHECK_LIB(intl,gettext)
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal])
+ strrchr strsignal fchmod fstat chmod])
AC_PROG_SED
[while :
do
@@ -119,7 +125,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
if ! true ; then exit 1 ; fi
echo /bin/sh'`
test -x "$POSIX_SHELL" && break
- ]AC_ERROR([Cannot locate a working POSIX shell])[
+ ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
done]
AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
[define to a working POSIX compliant shell])
@@ -145,7 +151,7 @@ AC_DEFUN([LIBOPTS_WITH_REGEX_HEADER],[
else
AC_DEFINE([REGEX_HEADER],[<regex.h>],[name of regex header file])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_WITH_REGEX_HEADER
@@ -158,7 +164,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
) # end of AC_ARG_WITH libregex
if test "${with_libregex+set}" = set && \
- test "${withval}" = no
+ test "X${withval}" = Xno
then ## disabled by request
libopts_cv_with_libregex_root=no
libopts_cv_with_libregex_cflags=no
@@ -167,14 +173,14 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
AC_ARG_WITH([libregex-cflags],
AS_HELP_STRING([--with-libregex-cflags], [libregex compile flags]),
- [libopts_cv_with_libregex_cflags=${with_regex_cflags}],
+ [libopts_cv_with_libregex_cflags=${with_libregex_cflags}],
AC_CACHE_CHECK([whether with-libregex-cflags was specified], libopts_cv_with_libregex_cflags,
libopts_cv_with_libregex_cflags=no)
) # end of AC_ARG_WITH libregex-cflags
AC_ARG_WITH([libregex-libs],
AS_HELP_STRING([--with-libregex-libs], [libregex link command arguments]),
- [libopts_cv_with_libregex_libs=${with_regex_libs}],
+ [libopts_cv_with_libregex_libs=${with_libregex_libs}],
AC_CACHE_CHECK([whether with-libregex-libs was specified], libopts_cv_with_libregex_libs,
libopts_cv_with_libregex_libs=no)
) # end of AC_ARG_WITH libregex-libs
@@ -195,8 +201,6 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
esac
libopts_save_CPPFLAGS="${CPPFLAGS}"
libopts_save_LIBS="${LIBS}"
- fi ## disabled by request
-
case "X${libopts_cv_with_libregex_cflags}" in
Xyes|Xno|X )
libopts_cv_with_libregex_cflags="" ;;
@@ -212,7 +216,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
LIBREGEX_LIBS=""
AC_MSG_CHECKING([whether libregex functions properly])
AC_CACHE_VAL([libopts_cv_with_libregex],[
- AC_TRY_RUN([@%:@include <stdio.h>
+ AC_RUN_IFELSE([@%:@include <stdio.h>
@%:@include <stdlib.h>
@%:@include <sys/types.h>
@%:@include REGEX_HEADER
@@ -233,8 +237,9 @@ int main() {
}
return 0; }],
[libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
- [libopts_cv_with_libregex=no]) # end of AC_TRY_RUN
+ [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
+ fi ## disabled by request
AC_MSG_RESULT([${libopts_cv_with_libregex}])
if test "X${libopts_cv_with_libregex}" != Xno
then
@@ -243,22 +248,26 @@ int main() {
else
CPPFLAGS="${libopts_save_CPPFLAGS}"
LIBS="${libopts_save_LIBS}"
+ libopts_cv_with_libregex_root=no
+libopts_cv_with_libregex_cflags=no
+libopts_cv_with_libregex_libs=no
+libopts_cv_with_libregex=no
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_WITHLIB_REGEX
AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
AC_MSG_CHECKING([whether pathfind(3) works])
AC_CACHE_VAL([libopts_cv_run_pathfind],[
- AC_TRY_RUN([@%:@include <string.h>
+ AC_RUN_IFELSE([@%:@include <string.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
return (pz == 0) ? 1 : 0;
}],
[libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
- ) # end of TRY_RUN
+ ) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
AC_MSG_RESULT([${libopts_cv_run_pathfind}])
if test "X${libopts_cv_run_pathfind}" != Xno
@@ -266,7 +275,7 @@ int main (int argc, char** argv) {
AC_DEFINE([HAVE_PATHFIND],[1],
[Define this if pathfind(3) works])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_RUN_PATHFIND
@@ -287,14 +296,14 @@ echo ${dzero}`
AC_DEFINE([HAVE_DEV_ZERO],[1],
[Define this if /dev/zero is readable device])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_TEST_DEV_ZERO
AC_DEFUN([LIBOPTS_RUN_REALPATH],[
AC_MSG_CHECKING([whether we have a functional realpath(3C)])
AC_CACHE_VAL([libopts_cv_run_realpath],[
- AC_TRY_RUN([@%:@include <limits.h>
+ AC_RUN_IFELSE([@%:@include <limits.h>
@%:@include <stdlib.h>
int main (int argc, char** argv) {
@%:@ifndef PATH_MAX
@@ -306,7 +315,7 @@ choke me!!
return (pz == zPath) ? 0 : 1;
}],
[libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
- ) # end of TRY_RUN
+ ) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
AC_MSG_RESULT([${libopts_cv_run_realpath}])
if test "X${libopts_cv_run_realpath}" != Xno
@@ -314,14 +323,14 @@ choke me!!
AC_DEFINE([HAVE_REALPATH],[1],
[Define this if we have a functional realpath(3C)])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_RUN_REALPATH
AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
AC_MSG_CHECKING([whether strftime() works])
AC_CACHE_VAL([libopts_cv_run_strftime],[
- AC_TRY_RUN([@%:@include <time.h>
+ AC_RUN_IFELSE([@%:@include <time.h>
@%:@include <string.h>
char t_buf@<:@ 64 @:>@;
int main() {
@@ -339,7 +348,7 @@ int main() {
strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
return (strcmp( t_buf, z ) != 0); }],
[libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
- ) # end of TRY_RUN
+ ) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
AC_MSG_RESULT([${libopts_cv_run_strftime}])
if test "X${libopts_cv_run_strftime}" != Xno
@@ -347,19 +356,19 @@ int main() {
AC_DEFINE([HAVE_STRFTIME],[1],
[Define this if strftime() works])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_RUN_STRFTIME
AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
AC_MSG_CHECKING([whether fopen accepts "b" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
- AC_TRY_RUN([@%:@include <stdio.h>
+ AC_RUN_IFELSE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
return (fp == NULL) ? 1 : fclose(fp); }],
[libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
- ) # end of TRY_RUN
+ ) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
AC_MSG_RESULT([${libopts_cv_run_fopen_binary}])
if test "X${libopts_cv_run_fopen_binary}" != Xno
@@ -370,19 +379,19 @@ return (fp == NULL) ? 1 : fclose(fp); }],
AC_DEFINE([FOPEN_BINARY_FLAG],"",
[fopen(3) accepts a 'b' in the mode flag])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_BINARY
AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
AC_MSG_CHECKING([whether fopen accepts "t" mode])
AC_CACHE_VAL([libopts_cv_run_fopen_text],[
- AC_TRY_RUN([@%:@include <stdio.h>
+ AC_RUN_IFELSE([@%:@include <stdio.h>
int main (int argc, char** argv) {
FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
return (fp == NULL) ? 1 : fclose(fp); }],
[libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
- ) # end of TRY_RUN
+ ) # end of RUN_IFELSE
]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
AC_MSG_RESULT([${libopts_cv_run_fopen_text}])
if test "X${libopts_cv_run_fopen_text}" != Xno
@@ -393,7 +402,7 @@ return (fp == NULL) ? 1 : fclose(fp); }],
AC_DEFINE([FOPEN_TEXT_FLAG],"",
[fopen(3) accepts a 't' in the mode flag])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_RUN_FOPEN_TEXT
@@ -409,7 +418,7 @@ AC_DEFUN([LIBOPTS_DISABLE_OPTIONAL_ARGS],[
AC_DEFINE([NO_OPTIONAL_OPT_ARGS], [1],
[Define this if optional arguments are disallowed])
fi
-
+
]) # end of AC_DEFUN of LIBOPTS_DISABLE_OPTIONAL_ARGS
@@ -446,15 +455,13 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
dnl @synopsis LIBOPTS_CHECK
dnl
-dnl Time-stamp: "2010-11-29 15:45:54 bkorb"
-dnl
dnl If autoopts-config works, add the linking information to LIBS.
dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
dnl the config tests that the library needs. Invoke the
dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts.
dnl
dnl This file is part of AutoGen.
-dnl AutoGen Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+dnl AutoGen Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
dnl
dnl AutoGen is free software: you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by the
@@ -478,18 +485,18 @@ AC_DEFUN([LIBOPTS_CHECK_COMMON],[
[ifelse($1, , [libopts], [$1])])
AC_ARG_ENABLE([local-libopts],
AC_HELP_STRING([--enable-local-libopts],
- [Force using the supplied libopts tearoff code]),[
+ [Use the supplied libopts tearoff code]),[
if test x$enableval = xyes ; then
AC_MSG_NOTICE([Using supplied libopts tearoff])
- LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
LIBOPTS_CFLAGS='-I$(top_srcdir)/AO_Libopts_Dir'
NEED_LIBOPTS_DIR=true
+ LIBOPTS_LDADD='$(top_builddir)/AO_Libopts_Dir/libopts.la'
fi])
AC_ARG_ENABLE([libopts-install],
- AC_HELP_STRING([--disable-libopts-install],
- [Do not install libopts with client installation]))
- AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" != Xno])
+ AC_HELP_STRING([--enable-libopts-install],
+ [Install libopts with client installation]))
+ AM_CONDITIONAL([INSTALL_LIBOPTS],[test "X${enable_libopts_install}" = Xyes])
[if test -z "${NEED_LIBOPTS_DIR}" ; then]
AC_MSG_CHECKING([whether autoopts-config can be found])
@@ -543,20 +550,24 @@ AC_DEFUN([LIBOPTS_CHECK_COMMON],[
m4_popdef([AO_Libopts_Dir])
[# end of AC_DEFUN of LIBOPTS_CHECK_COMMON]
])
+dnl
dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without
dnl requiring same, a fallback implementation for older Automake is provided.
dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
dnl is correct only in terms of m4sh generated script.
-m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
-if test -z "$$1_TRUE"; then :
- m4_n([$2])[]dnl
-m4_ifval([$3],
-[else
- $3
-])dnl
-fi[]dnl
-])])
+dnl
+m4_ifndef([AM_COND_IF],
+ [AC_DEFUN([AM_COND_IF], [
+ if test -z "$$1_TRUE"; then :
+ m4_n([$2])[]dnl
+ m4_ifval([$3],[
+ else
+ $3
+ ])dnl
+ fi[]dnl
+ ])dnl
+])
dnl
AC_DEFUN([LIBOPTS_CHECK_NOBUILD], [
m4_pushdef([AO_Libopts_Dir],
@@ -574,9 +585,8 @@ AC_DEFUN([LIBOPTS_CHECK], [
LIBOPTS_CHECK_COMMON(AO_Libopts_Dir)
AM_COND_IF([NEED_LIBOPTS], [
INVOKE_LIBOPTS_MACROS
- AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
- ])dnl
+ ])
+ AC_CONFIG_FILES(AO_Libopts_Dir/Makefile)
m4_popdef([AO_Libopts_Dir])dnl
# end of AC_DEFUN of LIBOPTS_CHECK
])
-
diff --git a/sntp/libopts/m4/liboptschk.m4 b/sntp/libopts/m4/liboptschk.m4
index 48e4ceb7a108..c71ae1035700 100644
--- a/sntp/libopts/m4/liboptschk.m4
+++ b/sntp/libopts/m4/liboptschk.m4
@@ -1,12 +1,10 @@
# liboptschk.m4 serial 2 (autogen - 5.11.4)
-dnl Copyright (c) 2005-2011 by Bruce Korb - all rights reserved
+dnl Copyright (C) 2005-2014 by Bruce Korb - all rights reserved
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-dnl Time-stamp: "2010-12-07 12:57:56 bkorb"
-dnl
AC_DEFUN([ag_FIND_LIBOPTS],
[if test "X${ac_cv_header_autoopts_options_h}" = Xno
then :
diff --git a/sntp/libopts/m4/stdnoreturn.m4 b/sntp/libopts/m4/stdnoreturn.m4
new file mode 100644
index 000000000000..eea2c1e21dd1
--- /dev/null
+++ b/sntp/libopts/m4/stdnoreturn.m4
@@ -0,0 +1,41 @@
+# Check for stdnoreturn.h that conforms to C11.
+
+dnl Copyright 2012-2014 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdnoreturn.h> if it is not supported.
+
+AC_DEFUN([gl_STDNORETURN_H],
+[
+ AC_CACHE_CHECK([for working stdnoreturn.h],
+ [gl_cv_header_working_stdnoreturn_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdnoreturn.h>
+ /* Do not check for 'noreturn' after the return type.
+ C11 allows it, but it's rarely done that way
+ and circa-2012 bleeding-edge GCC rejects it when given
+ -Werror=old-style-declaration. */
+ noreturn void foo1 (void) { exit (0); }
+ _Noreturn void foo2 (void) { exit (0); }
+ int testit (int argc, char **argv) {
+ if (argc & 1)
+ return 0;
+ (argv[0][0] ? foo1 : foo2) ();
+ }
+ ]])],
+ [gl_cv_header_working_stdnoreturn_h=yes],
+ [gl_cv_header_working_stdnoreturn_h=no])])
+
+ if test $gl_cv_header_working_stdnoreturn_h = yes; then
+ STDNORETURN_H=''
+ else
+ STDNORETURN_H='stdnoreturn.h'
+ fi
+
+ AC_SUBST([STDNORETURN_H])
+ AM_CONDITIONAL([GL_GENERATE_STDNORETURN_H], [test -n "$STDNORETURN_H"])
+])
diff --git a/sntp/libopts/makeshell.c b/sntp/libopts/makeshell.c
index 7b9b6cdde179..a0bfcacca655 100644
--- a/sntp/libopts/makeshell.c
+++ b/sntp/libopts/makeshell.c
@@ -2,14 +2,16 @@
/**
* \file makeshell.c
*
- * Time-stamp: "2011-04-20 11:06:57 bkorb"
- *
* This module will interpret the options set in the tOptions
* structure and create a Bourne shell script capable of parsing them.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -21,358 +23,80 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
- *
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
- */
-
-tOptions * optionParseShellOptions = NULL;
-
-/* * * * * * * * * * * * * * * * * * * * *
- *
- * Setup Format Strings
- */
-static char const zStartMarker[] =
-"# # # # # # # # # # -- do not modify this marker --\n#\n"
-"# DO NOT EDIT THIS SECTION";
-
-static char const zPreamble[] =
-"%s OF %s\n#\n"
-"# From here to the next `-- do not modify this marker --',\n"
-"# the text has been generated %s\n";
-
-static char const zEndPreamble[] =
-"# From the %s option definitions\n#\n";
-
-static char const zMultiDef[] = "\n"
-"if test -z \"${%1$s_%2$s}\"\n"
-"then\n"
-" %1$s_%2$s_CT=0\n"
-"else\n"
-" %1$s_%2$s_CT=1\n"
-" %1$s_%2$s_1=\"${%1$s_%2$s}\"\n"
-"fi\n"
-"export %1$s_%2$s_CT";
-
-static char const zSingleDef[] = "\n"
-"%1$s_%2$s=\"${%1$s_%2$s-'%3$s'}\"\n"
-"%1$s_%2$s_set=false\n"
-"export %1$s_%2$s\n";
-
-static char const zSingleNoDef[] = "\n"
-"%1$s_%2$s=\"${%1$s_%2$s}\"\n"
-"%1$s_%2$s_set=false\n"
-"export %1$s_%2$s\n";
-
-/* * * * * * * * * * * * * * * * * * * * *
- *
- * LOOP START
- *
- * The loop may run in either of two modes:
- * all options are named options (loop only)
- * regular, marked option processing.
- */
-static char const zLoopCase[] = "\n"
-"OPT_PROCESS=true\n"
-"OPT_ARG=\"$1\"\n\n"
-"while ${OPT_PROCESS} && [ $# -gt 0 ]\ndo\n"
-" OPT_ELEMENT=''\n"
-" OPT_ARG_VAL=''\n\n"
- /*
- * 'OPT_ARG' may or may not match the current $1
- */
-" case \"${OPT_ARG}\" in\n"
-" -- )\n"
-" OPT_PROCESS=false\n"
-" shift\n"
-" ;;\n\n";
-
-static char const zLoopOnly[] = "\n"
-"OPT_ARG=\"$1\"\n\n"
-"while [ $# -gt 0 ]\ndo\n"
-" OPT_ELEMENT=''\n"
-" OPT_ARG_VAL=''\n\n"
-" OPT_ARG=\"${1}\"\n";
-
-/* * * * * * * * * * * * * * * *
- *
- * CASE SELECTORS
+ * These files have the following sha256 sums:
*
- * If the loop runs as a regular option loop,
- * then we must have selectors for each acceptable option
- * type (long option, flag character and non-option)
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-static char const zLongSelection[] =
-" --* )\n";
-
-static char const zFlagSelection[] =
-" -* )\n";
-
-static char const zEndSelection[] =
-" ;;\n\n";
-
-static char const zNoSelection[] =
-" * )\n"
-" OPT_PROCESS=false\n"
-" ;;\n"
-" esac\n\n";
-
-/* * * * * * * * * * * * * * * *
- *
- * LOOP END
- */
-static char const zLoopEnd[] =
-" if [ -n \"${OPT_ARG_VAL}\" ]\n"
-" then\n"
-" eval %1$s_${OPT_NAME}${OPT_ELEMENT}=\"'${OPT_ARG_VAL}'\"\n"
-" export %1$s_${OPT_NAME}${OPT_ELEMENT}\n"
-" fi\n"
-"done\n\n"
-"unset OPT_PROCESS || :\n"
-"unset OPT_ELEMENT || :\n"
-"unset OPT_ARG || :\n"
-"unset OPT_ARG_NEEDED || :\n"
-"unset OPT_NAME || :\n"
-"unset OPT_CODE || :\n"
-"unset OPT_ARG_VAL || :\n%2$s";
-
-static char const zTrailerMarker[] = "\n"
-"# # # # # # # # # #\n#\n"
-"# END OF AUTOMATED OPTION PROCESSING\n"
-"#\n# # # # # # # # # # -- do not modify this marker --\n";
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * OPTION SELECTION
- */
-static char const zOptionCase[] =
-" case \"${OPT_CODE}\" in\n";
-
-static char const zOptionPartName[] =
-" '%s' | \\\n";
-
-static char const zOptionFullName[] =
-" '%s' )\n";
-
-static char const zOptionFlag[] =
-" '%c' )\n";
-
-static char const zOptionEndSelect[] =
-" ;;\n\n";
-
-static char const zOptionUnknown[] =
-" * )\n"
-" echo Unknown %s: \"${OPT_CODE}\" >&2\n"
-" echo \"$%s_USAGE_TEXT\"\n"
-" exit 1\n"
-" ;;\n"
-" esac\n\n";
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * OPTION PROCESSING
- *
- * Formats for emitting the text for handling particular options
- */
-static char const zTextExit[] =
-" echo \"$%s_%s_TEXT\"\n"
-" exit 0\n";
-
-static char const zPagedUsageExit[] =
-" echo \"$%s_LONGUSAGE_TEXT\" | ${PAGER-more}\n"
-" exit 0\n";
-
-static char const zCmdFmt[] =
-" %s\n";
-
-static char const zCountTest[] =
-" if [ $%1$s_%2$s_CT -ge %3$d ] ; then\n"
-" echo Error: more than %3$d %2$s options >&2\n"
-" echo \"$%1$s_USAGE_TEXT\"\n"
-" exit 1 ; fi\n";
-
-static char const zMultiArg[] =
-" %1$s_%2$s_CT=`expr ${%1$s_%2$s_CT} + 1`\n"
-" OPT_ELEMENT=\"_${%1$s_%2$s_CT}\"\n"
-" OPT_NAME='%2$s'\n";
-
-static char const zSingleArg[] =
-" if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
-" echo Error: duplicate %2$s option >&2\n"
-" echo \"$%1$s_USAGE_TEXT\"\n"
-" exit 1 ; fi\n"
-" %1$s_%2$s_set=true\n"
-" OPT_NAME='%2$s'\n";
-
-static char const zNoMultiArg[] =
-" %1$s_%2$s_CT=0\n"
-" OPT_ELEMENT=''\n"
-" %1$s_%2$s='%3$s'\n"
-" export %1$s_%2$s\n"
-" OPT_NAME='%2$s'\n";
-
-static char const zNoSingleArg[] =
-" if [ -n \"${%1$s_%2$s}\" ] && ${%1$s_%2$s_set} ; then\n"
-" echo Error: duplicate %2$s option >&2\n"
-" echo \"$%1$s_USAGE_TEXT\"\n"
-" exit 1 ; fi\n"
-" %1$s_%2$s_set=true\n"
-" %1$s_%2$s='%3$s'\n"
-" export %1$s_%2$s\n"
-" OPT_NAME='%2$s'\n";
-
-static char const zMayArg[] =
-" eval %1$s_%2$s${OPT_ELEMENT}=true\n"
-" export %1$s_%2$s${OPT_ELEMENT}\n"
-" OPT_ARG_NEEDED=OK\n";
-
-static char const zMustArg[] =
-" OPT_ARG_NEEDED=YES\n";
-
-static char const zCantArg[] =
-" eval %1$s_%2$s${OPT_ELEMENT}=true\n"
-" export %1$s_%2$s${OPT_ELEMENT}\n"
-" OPT_ARG_NEEDED=NO\n";
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * LONG OPTION PROCESSING
- *
- * Formats for emitting the text for handling long option types
- */
-static char const zLongOptInit[] =
-" OPT_CODE=`echo \"X${OPT_ARG}\"|sed 's/^X-*//'`\n"
-" shift\n"
-" OPT_ARG=\"$1\"\n\n"
-" case \"${OPT_CODE}\" in *=* )\n"
-" OPT_ARG_VAL=`echo \"${OPT_CODE}\"|sed 's/^[^=]*=//'`\n"
-" OPT_CODE=`echo \"${OPT_CODE}\"|sed 's/=.*$//'` ;; esac\n\n";
-
-static char const zLongOptArg[] =
-" case \"${OPT_ARG_NEEDED}\" in\n"
-" NO )\n"
-" OPT_ARG_VAL=''\n"
-" ;;\n\n"
-" YES )\n"
-" if [ -z \"${OPT_ARG_VAL}\" ]\n"
-" then\n"
-" if [ $# -eq 0 ]\n"
-" then\n"
-" echo No argument provided for ${OPT_NAME} option >&2\n"
-" echo \"$%s_USAGE_TEXT\"\n"
-" exit 1\n"
-" fi\n\n"
-" OPT_ARG_VAL=\"${OPT_ARG}\"\n"
-" shift\n"
-" OPT_ARG=\"$1\"\n"
-" fi\n"
-" ;;\n\n"
-" OK )\n"
-" if [ -z \"${OPT_ARG_VAL}\" ] && [ $# -gt 0 ]\n"
-" then\n"
-" case \"${OPT_ARG}\" in -* ) ;; * )\n"
-" OPT_ARG_VAL=\"${OPT_ARG}\"\n"
-" shift\n"
-" OPT_ARG=\"$1\" ;; esac\n"
-" fi\n"
-" ;;\n"
-" esac\n";
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * FLAG OPTION PROCESSING
- *
- * Formats for emitting the text for handling flag option types
- */
-static char const zFlagOptInit[] =
-" OPT_CODE=`echo \"X${OPT_ARG}\" | sed 's/X-\\(.\\).*/\\1/'`\n"
-" OPT_ARG=` echo \"X${OPT_ARG}\" | sed 's/X-.//'`\n\n";
-
-static char const zFlagOptArg[] =
-" case \"${OPT_ARG_NEEDED}\" in\n"
-" NO )\n"
-" if [ -n \"${OPT_ARG}\" ]\n"
-" then\n"
-" OPT_ARG=-\"${OPT_ARG}\"\n"
-" else\n"
-" shift\n"
-" OPT_ARG=\"$1\"\n"
-" fi\n"
-" ;;\n\n"
-" YES )\n"
-" if [ -n \"${OPT_ARG}\" ]\n"
-" then\n"
-" OPT_ARG_VAL=\"${OPT_ARG}\"\n\n"
-" else\n"
-" if [ $# -eq 0 ]\n"
-" then\n"
-" echo No argument provided for ${OPT_NAME} option >&2\n"
-" echo \"$%s_USAGE_TEXT\"\n"
-" exit 1\n"
-" fi\n"
-" shift\n"
-" OPT_ARG_VAL=\"$1\"\n"
-" fi\n\n"
-" shift\n"
-" OPT_ARG=\"$1\"\n"
-" ;;\n\n"
-" OK )\n"
-" if [ -n \"${OPT_ARG}\" ]\n"
-" then\n"
-" OPT_ARG_VAL=\"${OPT_ARG}\"\n"
-" shift\n"
-" OPT_ARG=\"$1\"\n\n"
-" else\n"
-" shift\n"
-" if [ $# -gt 0 ]\n"
-" then\n"
-" case \"$1\" in -* ) ;; * )\n"
-" OPT_ARG_VAL=\"$1\"\n"
-" shift ;; esac\n"
-" OPT_ARG=\"$1\"\n"
-" fi\n"
-" fi\n"
-" ;;\n"
-" esac\n";
-
-tSCC* pzShell = NULL;
-static char* pzLeader = NULL;
-static char* pzTrailer = NULL;
/* = = = START-STATIC-FORWARD = = = */
static void
emit_var_text(char const * prog, char const * var, int fdin);
static void
-textToVariable(tOptions * pOpts, teTextTo whichVar, tOptDesc * pOD);
+text_to_var(tOptions * opts, teTextTo which, tOptDesc * od);
+
+static void
+emit_usage(tOptions * opts);
static void
-emitUsage(tOptions* pOpts);
+emit_wrapup(tOptions * opts);
static void
-emitSetup(tOptions* pOpts);
+emit_setup(tOptions * opts);
static void
-printOptionAction(tOptions* pOpts, tOptDesc* pOptDesc);
+emit_action(tOptions * opts, tOptDesc * od);
static void
-printOptionInaction(tOptions* pOpts, tOptDesc* pOptDesc);
+emit_inaction(tOptions * opts, tOptDesc * od);
static void
-emitFlag(tOptions* pOpts);
+emit_flag(tOptions * opts);
static void
-emitMatchExpr(tCC* pzMatchName, tOptDesc* pCurOpt, tOptions* pOpts);
+emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts);
static void
-emitLong(tOptions* pOpts);
+emit_long(tOptions * opts);
+
+static char *
+load_old_output(char const * fname, char const * pname);
static void
-openOutput(char const* pzFile);
+open_out(char const * fname, char const * pname);
/* = = = END-STATIC-FORWARD = = = */
+LOCAL noreturn void
+option_exits(int exit_code)
+{
+ if (print_exit)
+ printf("\nexit %d\n", exit_code);
+ exit(exit_code);
+}
+
+LOCAL noreturn void
+ao_bug(char const * msg)
+{
+ fprintf(stderr, zao_bug_msg, msg);
+ option_exits(EX_SOFTWARE);
+}
+
+LOCAL void
+fserr_warn(char const * prog, char const * op, char const * fname)
+{
+ fprintf(stderr, zfserr_fmt, prog, errno, strerror(errno),
+ op, fname);
+}
+
+LOCAL noreturn void
+fserr_exit(char const * prog, char const * op, char const * fname)
+{
+ fserr_warn(prog, op, fname);
+ option_exits(EXIT_FAILURE);
+}
+
/*=export_func optionParseShell
* private:
*
@@ -383,7 +107,7 @@ openOutput(char const* pzFile);
* Emit a shell script that will parse the command line options.
=*/
void
-optionParseShell(tOptions* pOpts)
+optionParseShell(tOptions * opts)
{
/*
* Check for our SHELL option now.
@@ -391,102 +115,119 @@ optionParseShell(tOptions* pOpts)
* it will override anything we do here.
*/
if (HAVE_GENSHELL_OPT(SHELL))
- pzShell = GENSHELL_OPT_ARG(SHELL);
+ shell_prog = GENSHELL_OPT_ARG(SHELL);
else if (! ENABLED_GENSHELL_OPT(SHELL))
- pzShell = NULL;
+ shell_prog = NULL;
- else if ((pzShell = getenv("SHELL")),
- pzShell == NULL)
+ else if ((shell_prog = getenv("SHELL")),
+ shell_prog == NULL)
- pzShell = POSIX_SHELL;
+ shell_prog = POSIX_SHELL;
/*
* Check for a specified output file
*/
if (HAVE_GENSHELL_OPT(SCRIPT))
- openOutput(GENSHELL_OPT_ARG(SCRIPT));
-
- emitUsage(pOpts);
- emitSetup(pOpts);
+ open_out(GENSHELL_OPT_ARG(SCRIPT), opts->pzProgName);
+
+ emit_usage(opts);
+ emit_setup(opts);
/*
* There are four modes of option processing.
*/
- switch (pOpts->fOptSet & (OPTPROC_LONGOPT|OPTPROC_SHORTOPT)) {
+ switch (opts->fOptSet & (OPTPROC_LONGOPT|OPTPROC_SHORTOPT)) {
case OPTPROC_LONGOPT:
- fputs(zLoopCase, stdout);
+ fputs(LOOP_STR, stdout);
- fputs(zLongSelection, stdout);
- fputs(zLongOptInit, stdout);
- emitLong(pOpts);
- printf(zLongOptArg, pOpts->pzPROGNAME);
- fputs(zEndSelection, stdout);
+ fputs(LONG_OPT_MARK, stdout);
+ fputs(INIT_LOPT_STR, stdout);
+ emit_long(opts);
+ printf(LOPT_ARG_FMT, opts->pzPROGNAME);
+ fputs(END_OPT_SEL_STR, stdout);
- fputs(zNoSelection, stdout);
+ fputs(NOT_FOUND_STR, stdout);
break;
case 0:
- fputs(zLoopOnly, stdout);
- fputs(zLongOptInit, stdout);
- emitLong(pOpts);
- printf(zLongOptArg, pOpts->pzPROGNAME);
+ fputs(ONLY_OPTS_LOOP, stdout);
+ fputs(INIT_LOPT_STR, stdout);
+ emit_long(opts);
+ printf(LOPT_ARG_FMT, opts->pzPROGNAME);
break;
case OPTPROC_SHORTOPT:
- fputs(zLoopCase, stdout);
+ fputs(LOOP_STR, stdout);
- fputs(zFlagSelection, stdout);
- fputs(zFlagOptInit, stdout);
- emitFlag(pOpts);
- printf(zFlagOptArg, pOpts->pzPROGNAME);
- fputs(zEndSelection, stdout);
+ fputs(FLAG_OPT_MARK, stdout);
+ fputs(INIT_OPT_STR, stdout);
+ emit_flag(opts);
+ printf(OPT_ARG_FMT, opts->pzPROGNAME);
+ fputs(END_OPT_SEL_STR, stdout);
- fputs(zNoSelection, stdout);
+ fputs(NOT_FOUND_STR, stdout);
break;
case OPTPROC_LONGOPT|OPTPROC_SHORTOPT:
- fputs(zLoopCase, stdout);
+ fputs(LOOP_STR, stdout);
- fputs(zLongSelection, stdout);
- fputs(zLongOptInit, stdout);
- emitLong(pOpts);
- printf(zLongOptArg, pOpts->pzPROGNAME);
- fputs(zEndSelection, stdout);
+ fputs(LONG_OPT_MARK, stdout);
+ fputs(INIT_LOPT_STR, stdout);
+ emit_long(opts);
+ printf(LOPT_ARG_FMT, opts->pzPROGNAME);
+ fputs(END_OPT_SEL_STR, stdout);
- fputs(zFlagSelection, stdout);
- fputs(zFlagOptInit, stdout);
- emitFlag(pOpts);
- printf(zFlagOptArg, pOpts->pzPROGNAME);
- fputs(zEndSelection, stdout);
+ fputs(FLAG_OPT_MARK, stdout);
+ fputs(INIT_OPT_STR, stdout);
+ emit_flag(opts);
+ printf(OPT_ARG_FMT, opts->pzPROGNAME);
+ fputs(END_OPT_SEL_STR, stdout);
- fputs(zNoSelection, stdout);
+ fputs(NOT_FOUND_STR, stdout);
break;
}
- printf(zLoopEnd, pOpts->pzPROGNAME, zTrailerMarker);
- if ((pzTrailer != NULL) && (*pzTrailer != '\0'))
- fputs(pzTrailer, stdout);
+ emit_wrapup(opts);
+ if ((script_trailer != NULL) && (*script_trailer != NUL))
+ fputs(script_trailer, stdout);
else if (ENABLED_GENSHELL_OPT(SHELL))
- printf("\nenv | grep '^%s_'\n", pOpts->pzPROGNAME);
+ printf(SHOW_PROG_ENV, opts->pzPROGNAME);
- fflush(stdout);
+#ifdef HAVE_FCHMOD
fchmod(STDOUT_FILENO, 0755);
+#endif
fclose(stdout);
- if (ferror(stdout)) {
- fputs(zOutputFail, stderr);
- exit(EXIT_FAILURE);
- }
+
+ if (ferror(stdout))
+ fserr_exit(opts->pzProgName, zwriting, zstdout_name);
+
+ AGFREE(script_text);
+ script_leader = NULL;
+ script_trailer = NULL;
+ script_text = NULL;
}
#ifdef HAVE_WORKING_FORK
+/**
+ * Print the value of "var" to a file descriptor.
+ * The "fdin" is the read end of a pipe to a forked process that
+ * is writing usage text to it. We read that text in and re-emit
+ * to standard out, formatting it so that it is assigned to a
+ * shell variable.
+ *
+ * @param[in] prog The capitalized, c-variable-formatted program name
+ * @param[in] var a similarly formatted type name
+ * (LONGUSAGE, USAGE or VERSION)
+ * @param[in] fdin the input end of a pipe
+ */
static void
emit_var_text(char const * prog, char const * var, int fdin)
{
FILE * fp = fdopen(fdin, "r" FOPEN_BINARY_FLAG);
int nlct = 0; /* defer newlines and skip trailing ones */
- printf("%s_%s_TEXT='", prog, var);
+ printf(SET_TEXT_FMT, prog, var);
if (fp == NULL)
goto skip_text;
@@ -494,121 +235,125 @@ emit_var_text(char const * prog, char const * var, int fdin)
int ch = fgetc(fp);
switch (ch) {
- case '\n':
+ case NL:
nlct++;
break;
case '\'':
while (nlct > 0) {
- fputc('\n', stdout);
+ fputc(NL, stdout);
nlct--;
}
- fputs("'\\''", stdout);
+ fputs(apostrophe, stdout);
break;
case EOF:
- goto endCharLoop;
+ goto done;
default:
while (nlct > 0) {
- fputc('\n', stdout);
+ fputc(NL, stdout);
nlct--;
}
fputc(ch, stdout);
break;
}
- } endCharLoop:;
+ } done:;
fclose(fp);
-skip_text:
+ skip_text:
- fputs("'\n\n", stdout);
+ fputs(END_SET_TEXT, stdout);
}
-
#endif
-/*
+/**
* The purpose of this function is to assign "long usage", short usage
* and version information to a shell variable. Rather than wind our
* way through all the logic necessary to emit the text directly, we
* fork(), have our child process emit the text the normal way and
* capture the output in the parent process.
+ *
+ * @param[in] opts the program options
+ * @param[in] which what to print: long usage, usage or version
+ * @param[in] od for TT_VERSION, it is the version option
*/
static void
-textToVariable(tOptions * pOpts, teTextTo whichVar, tOptDesc * pOD)
+text_to_var(tOptions * opts, teTextTo which, tOptDesc * od)
{
# define _TT_(n) static char const z ## n [] = #n;
TEXTTO_TABLE
# undef _TT_
# define _TT_(n) z ## n ,
- static char const * apzTTNames[] = { TEXTTO_TABLE };
+ static char const * ttnames[] = { TEXTTO_TABLE };
# undef _TT_
#if ! defined(HAVE_WORKING_FORK)
- printf("%1$s_%2$s_TEXT='no %2$s text'\n",
- pOpts->pzPROGNAME, apzTTNames[ whichVar ]);
+ printf(SET_NO_TEXT_FMT, opts->pzPROGNAME, ttnames[which]);
#else
- int pipeFd[2];
+ int fdpair[2];
fflush(stdout);
fflush(stderr);
- if (pipe(pipeFd) != 0) {
- fprintf(stderr, zBadPipe, errno, strerror(errno));
- exit(EXIT_FAILURE);
- }
+ if (pipe(fdpair) != 0)
+ fserr_exit(opts->pzProgName, "pipe", zinter_proc_pipe);
switch (fork()) {
case -1:
- fprintf(stderr, zForkFail, errno, strerror(errno), pOpts->pzProgName);
- exit(EXIT_FAILURE);
- break;
+ fserr_exit(opts->pzProgName, "fork", opts->pzProgName);
+ /* NOTREACHED */
case 0:
/*
* Send both stderr and stdout to the pipe. No matter which
* descriptor is used, we capture the output on the read end.
*/
- dup2(pipeFd[1], STDERR_FILENO);
- dup2(pipeFd[1], STDOUT_FILENO);
- close(pipeFd[0]);
+ dup2(fdpair[1], STDERR_FILENO);
+ dup2(fdpair[1], STDOUT_FILENO);
+ close(fdpair[0]);
- switch (whichVar) {
+ switch (which) {
case TT_LONGUSAGE:
- (*(pOpts->pUsageProc))(pOpts, EXIT_SUCCESS);
+ (*(opts->pUsageProc))(opts, EXIT_SUCCESS);
/* NOTREACHED */
case TT_USAGE:
- (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
+ (*(opts->pUsageProc))(opts, EXIT_FAILURE);
/* NOTREACHED */
case TT_VERSION:
- if (pOD->fOptState & OPTST_ALLOC_ARG) {
- AGFREE(pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ if (od->fOptState & OPTST_ALLOC_ARG) {
+ AGFREE(od->optArg.argString);
+ od->fOptState &= ~OPTST_ALLOC_ARG;
}
- pOD->optArg.argString = "c";
- optionPrintVersion(pOpts, pOD);
+ od->optArg.argString = "c";
+ optionPrintVersion(opts, od);
/* NOTREACHED */
default:
- exit(EXIT_FAILURE);
+ option_exits(EXIT_FAILURE);
+ /* NOTREACHED */
}
+ /* NOTREACHED */
default:
- close(pipeFd[1]);
+ close(fdpair[1]);
}
- emit_var_text(pOpts->pzPROGNAME, apzTTNames[whichVar], pipeFd[0]);
+ emit_var_text(opts->pzPROGNAME, ttnames[which], fdpair[0]);
#endif
}
-
+/**
+ * capture usage text in shell variables.
+ *
+ */
static void
-emitUsage(tOptions* pOpts)
+emit_usage(tOptions * opts)
{
- char zTimeBuf[AO_NAME_SIZE];
+ char tm_nm_buf[AO_NAME_SIZE];
/*
* First, switch stdout to the output file name.
@@ -616,61 +361,61 @@ emitUsage(tOptions* pOpts)
* by the definitions (rather than the current
* executable name). Down case the upper cased name.
*/
- if (pzLeader != NULL)
- fputs(pzLeader, stdout);
+ if (script_leader != NULL)
+ fputs(script_leader, stdout);
{
- tSCC zStdout[] = "stdout";
- tCC* pzOutName;
+ char const * out_nm;
{
- time_t curTime = time(NULL);
- struct tm* pTime = localtime(&curTime);
- strftime(zTimeBuf, AO_NAME_SIZE, "%A %B %e, %Y at %r %Z", pTime );
+ time_t c_tim = time(NULL);
+ struct tm * ptm = localtime(&c_tim);
+ strftime(tm_nm_buf, AO_NAME_SIZE, TIME_FMT, ptm );
}
if (HAVE_GENSHELL_OPT(SCRIPT))
- pzOutName = GENSHELL_OPT_ARG(SCRIPT);
- else pzOutName = zStdout;
+ out_nm = GENSHELL_OPT_ARG(SCRIPT);
+ else out_nm = STDOUT;
- if ((pzLeader == NULL) && (pzShell != NULL))
- printf("#! %s\n", pzShell);
+ if ((script_leader == NULL) && (shell_prog != NULL))
+ printf(SHELL_MAGIC, shell_prog);
- printf(zPreamble, zStartMarker, pzOutName, zTimeBuf);
+ printf(PREAMBLE_FMT, START_MARK, out_nm, tm_nm_buf);
}
- printf(zEndPreamble, pOpts->pzPROGNAME);
+ printf(END_PRE_FMT, opts->pzPROGNAME);
/*
* Get a copy of the original program name in lower case and
* fill in an approximation of the program name from it.
*/
{
- char * pzPN = zTimeBuf;
- char const * pz = pOpts->pzPROGNAME;
+ char * pzPN = tm_nm_buf;
+ char const * pz = opts->pzPROGNAME;
char ** pp;
+ /* Copy the program name into the time/name buffer */
for (;;) {
- if ((*pzPN++ = tolower(*pz++)) == '\0')
+ if ((*pzPN++ = (char)tolower(*pz++)) == NUL)
break;
}
- pp = (char **)(void *)&(pOpts->pzProgPath);
- *pp = zTimeBuf;
- pp = (char **)(void *)&(pOpts->pzProgName);
- *pp = zTimeBuf;
+ pp = (char **)(void *)&(opts->pzProgPath);
+ *pp = tm_nm_buf;
+ pp = (char **)(void *)&(opts->pzProgName);
+ *pp = tm_nm_buf;
}
- textToVariable(pOpts, TT_LONGUSAGE, NULL);
- textToVariable(pOpts, TT_USAGE, NULL);
+ text_to_var(opts, TT_LONGUSAGE, NULL);
+ text_to_var(opts, TT_USAGE, NULL);
{
- tOptDesc* pOptDesc = pOpts->pOptDesc;
- int optionCt = pOpts->optCt;
+ tOptDesc* pOptDesc = opts->pOptDesc;
+ int optionCt = opts->optCt;
for (;;) {
if (pOptDesc->pOptProc == optionPrintVersion) {
- textToVariable(pOpts, TT_VERSION, pOptDesc);
+ text_to_var(opts, TT_VERSION, pOptDesc);
break;
}
@@ -681,252 +426,289 @@ emitUsage(tOptions* pOpts)
}
}
+static void
+emit_wrapup(tOptions * opts)
+{
+ tOptDesc * od = opts->pOptDesc;
+ int opt_ct = opts->presetOptCt;
+ char const * fmt;
+
+ printf(FINISH_LOOP, opts->pzPROGNAME);
+ for (;opt_ct > 0; od++, --opt_ct) {
+ /*
+ * Options that are either usage documentation or are compiled out
+ * are not to be processed.
+ */
+ if (SKIP_OPT(od) || (od->pz_NAME == NULL))
+ continue;
+
+ /*
+ * do not presence check if there is no minimum/must-set
+ */
+ if ((od->optMinCt == 0) && ((od->fOptState & OPTST_MUST_SET) == 0))
+ continue;
+
+ if (od->optMaxCt > 1)
+ fmt = CHK_MIN_COUNT;
+ else fmt = CHK_ONE_REQUIRED;
+
+ {
+ int min = (od->optMinCt == 0) ? 1 : od->optMinCt;
+ printf(fmt, opts->pzPROGNAME, od->pz_NAME, min);
+ }
+ }
+ fputs(END_MARK, stdout);
+}
static void
-emitSetup(tOptions* pOpts)
+emit_setup(tOptions * opts)
{
- tOptDesc* pOptDesc = pOpts->pOptDesc;
- int optionCt = pOpts->presetOptCt;
- char const* pzFmt;
- char const* pzDefault;
+ tOptDesc * od = opts->pOptDesc;
+ int opt_ct = opts->presetOptCt;
+ char const * fmt;
+ char const * def_val;
- for (;optionCt > 0; pOptDesc++, --optionCt) {
- char zVal[16];
+ for (;opt_ct > 0; od++, --opt_ct) {
+ char int_val_buf[32];
/*
* Options that are either usage documentation or are compiled out
* are not to be processed.
*/
- if (SKIP_OPT(pOptDesc) || (pOptDesc->pz_NAME == NULL))
+ if (SKIP_OPT(od) || (od->pz_NAME == NULL))
continue;
- if (pOptDesc->optMaxCt > 1)
- pzFmt = zMultiDef;
- else pzFmt = zSingleDef;
+ if (od->optMaxCt > 1)
+ fmt = MULTI_DEF_FMT;
+ else fmt = SGL_DEF_FMT;
/*
* IF this is an enumeration/bitmask option, then convert the value
* to a string before printing the default value.
*/
- switch (OPTST_GET_ARGTYPE(pOptDesc->fOptState)) {
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_ENUMERATION:
- (*(pOptDesc->pOptProc))(OPTPROC_EMIT_SHELL, pOptDesc );
- pzDefault = pOptDesc->optArg.argString;
+ (*(od->pOptProc))(OPTPROC_EMIT_SHELL, od );
+ def_val = od->optArg.argString;
break;
/*
* Numeric and membership bit options are just printed as a number.
*/
case OPARG_TYPE_NUMERIC:
- snprintf(zVal, sizeof(zVal), "%d",
- (int)pOptDesc->optArg.argInt);
- pzDefault = zVal;
+ snprintf(int_val_buf, sizeof(int_val_buf), "%d",
+ (int)od->optArg.argInt);
+ def_val = int_val_buf;
break;
case OPARG_TYPE_MEMBERSHIP:
- snprintf(zVal, sizeof(zVal), "%lu",
- (unsigned long)pOptDesc->optArg.argIntptr);
- pzDefault = zVal;
+ snprintf(int_val_buf, sizeof(int_val_buf), "%lu",
+ (unsigned long)od->optArg.argIntptr);
+ def_val = int_val_buf;
break;
case OPARG_TYPE_BOOLEAN:
- pzDefault = (pOptDesc->optArg.argBool) ? "true" : "false";
+ def_val = (od->optArg.argBool) ? TRUE_STR : FALSE_STR;
break;
default:
- if (pOptDesc->optArg.argString == NULL) {
- if (pzFmt == zSingleDef)
- pzFmt = zSingleNoDef;
- pzDefault = NULL;
+ if (od->optArg.argString == NULL) {
+ if (fmt == SGL_DEF_FMT)
+ fmt = SGL_NO_DEF_FMT;
+ def_val = NULL;
}
else
- pzDefault = pOptDesc->optArg.argString;
+ def_val = od->optArg.argString;
}
- printf(pzFmt, pOpts->pzPROGNAME, pOptDesc->pz_NAME, pzDefault);
+ printf(fmt, opts->pzPROGNAME, od->pz_NAME, def_val);
}
}
-
static void
-printOptionAction(tOptions* pOpts, tOptDesc* pOptDesc)
+emit_action(tOptions * opts, tOptDesc * od)
{
- if (pOptDesc->pOptProc == optionPrintVersion)
- printf(zTextExit, pOpts->pzPROGNAME, "VERSION");
+ if (od->pOptProc == optionPrintVersion)
+ printf(ECHO_N_EXIT, opts->pzPROGNAME, VER_STR);
- else if (pOptDesc->pOptProc == optionPagedUsage)
- printf(zPagedUsageExit, pOpts->pzPROGNAME);
+ else if (od->pOptProc == optionPagedUsage)
+ printf(PAGE_USAGE_TEXT, opts->pzPROGNAME);
- else if (pOptDesc->pOptProc == optionLoadOpt) {
- printf(zCmdFmt, "echo 'Warning: Cannot load options files' >&2");
- printf(zCmdFmt, "OPT_ARG_NEEDED=YES");
+ else if (od->pOptProc == optionLoadOpt) {
+ printf(LVL3_CMD, NO_LOAD_WARN);
+ printf(LVL3_CMD, YES_NEED_OPT_ARG);
- } else if (pOptDesc->pz_NAME == NULL) {
+ } else if (od->pz_NAME == NULL) {
- if (pOptDesc->pOptProc == NULL) {
- printf(zCmdFmt, "echo 'Warning: Cannot save options files' "
- ">&2");
- printf(zCmdFmt, "OPT_ARG_NEEDED=OK");
+ if (od->pOptProc == NULL) {
+ printf(LVL3_CMD, NO_SAVE_OPTS);
+ printf(LVL3_CMD, OK_NEED_OPT_ARG);
} else
- printf(zTextExit, pOpts->pzPROGNAME, "LONGUSAGE");
+ printf(ECHO_N_EXIT, opts->pzPROGNAME, LONG_USE_STR);
} else {
- if (pOptDesc->optMaxCt == 1)
- printf(zSingleArg, pOpts->pzPROGNAME, pOptDesc->pz_NAME);
+ if (od->optMaxCt == 1)
+ printf(SGL_ARG_FMT, opts->pzPROGNAME, od->pz_NAME);
else {
- if ((unsigned)pOptDesc->optMaxCt < NOLIMIT)
- printf(zCountTest, pOpts->pzPROGNAME,
- pOptDesc->pz_NAME, pOptDesc->optMaxCt);
+ if ((unsigned)od->optMaxCt < NOLIMIT)
+ printf(CHK_MAX_COUNT, opts->pzPROGNAME,
+ od->pz_NAME, od->optMaxCt);
- printf(zMultiArg, pOpts->pzPROGNAME, pOptDesc->pz_NAME);
+ printf(MULTI_ARG_FMT, opts->pzPROGNAME, od->pz_NAME);
}
/*
* Fix up the args.
*/
- if (OPTST_GET_ARGTYPE(pOptDesc->fOptState) == OPARG_TYPE_NONE) {
- printf(zCantArg, pOpts->pzPROGNAME, pOptDesc->pz_NAME);
+ if (OPTST_GET_ARGTYPE(od->fOptState) == OPARG_TYPE_NONE) {
+ printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME);
+ printf(LVL3_CMD, NO_ARG_NEEDED);
- } else if (pOptDesc->fOptState & OPTST_ARG_OPTIONAL) {
- printf(zMayArg, pOpts->pzPROGNAME, pOptDesc->pz_NAME);
+ } else if (od->fOptState & OPTST_ARG_OPTIONAL) {
+ printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME);
+ printf(LVL3_CMD, OK_NEED_OPT_ARG);
} else {
- fputs(zMustArg, stdout);
+ printf(LVL3_CMD, YES_NEED_OPT_ARG);
}
}
fputs(zOptionEndSelect, stdout);
}
-
static void
-printOptionInaction(tOptions* pOpts, tOptDesc* pOptDesc)
+emit_inaction(tOptions * opts, tOptDesc * od)
{
- if (pOptDesc->pOptProc == optionLoadOpt) {
- printf(zCmdFmt, "echo 'Warning: Cannot suppress the loading of "
- "options files' >&2");
+ if (od->pOptProc == optionLoadOpt) {
+ printf(LVL3_CMD, NO_SUPPRESS_LOAD);
- } else if (pOptDesc->optMaxCt == 1)
- printf(zNoSingleArg, pOpts->pzPROGNAME,
- pOptDesc->pz_NAME, pOptDesc->pz_DisablePfx);
+ } else if (od->optMaxCt == 1)
+ printf(NO_SGL_ARG_FMT, opts->pzPROGNAME,
+ od->pz_NAME, od->pz_DisablePfx);
else
- printf(zNoMultiArg, pOpts->pzPROGNAME,
- pOptDesc->pz_NAME, pOptDesc->pz_DisablePfx);
+ printf(NO_MULTI_ARG_FMT, opts->pzPROGNAME,
+ od->pz_NAME, od->pz_DisablePfx);
- printf(zCmdFmt, "OPT_ARG_NEEDED=NO");
+ printf(LVL3_CMD, NO_ARG_NEEDED);
fputs(zOptionEndSelect, stdout);
}
-
+/**
+ * recognize flag options. These go at the end.
+ * At the end, emit code to handle options we don't recognize.
+ *
+ * @param[in] opts the program options
+ */
static void
-emitFlag(tOptions* pOpts)
+emit_flag(tOptions * opts)
{
- tOptDesc* pOptDesc = pOpts->pOptDesc;
- int optionCt = pOpts->optCt;
+ tOptDesc* od = opts->pOptDesc;
+ int opt_ct = opts->optCt;
fputs(zOptionCase, stdout);
- for (;optionCt > 0; pOptDesc++, --optionCt) {
+ for (;opt_ct > 0; od++, --opt_ct) {
- if (SKIP_OPT(pOptDesc))
+ if (SKIP_OPT(od) || ! IS_GRAPHIC_CHAR(od->optValue))
continue;
- if (IS_GRAPHIC_CHAR(pOptDesc->optValue)) {
- printf(zOptionFlag, pOptDesc->optValue);
- printOptionAction(pOpts, pOptDesc);
- }
+ printf(zOptionFlag, od->optValue);
+ emit_action(opts, od);
}
- printf(zOptionUnknown, "flag", pOpts->pzPROGNAME);
+ printf(UNK_OPT_FMT, FLAG_STR, opts->pzPROGNAME);
}
-
-/*
- * Emit the match text for a long option
+/**
+ * Emit the match text for a long option. The passed in \a name may be
+ * either the enablement name or the disablement name.
+ *
+ * @param[in] name The current name to check.
+ * @param[in] cod current option descriptor
+ * @param[in] opts the program options
*/
static void
-emitMatchExpr(tCC* pzMatchName, tOptDesc* pCurOpt, tOptions* pOpts)
+emit_match_expr(char const * name, tOptDesc * cod, tOptions * opts)
{
- tOptDesc* pOD = pOpts->pOptDesc;
- int oCt = pOpts->optCt;
- int min = 1;
- char zName[ 256 ];
- char* pz = zName;
-
- for (;;) {
- int matchCt = 0;
-
- /*
- * Omit the current option, Documentation opts and compiled out opts.
- */
- if ((pOD == pCurOpt) || SKIP_OPT(pOD)){
- if (--oCt <= 0)
- break;
- pOD++;
- continue;
- }
-
- /*
- * Check each character of the name case insensitively.
- * They must not be the same. They cannot be, because it would
- * not compile correctly if they were.
- */
- while ( toupper(pOD->pz_Name[matchCt])
- == toupper(pzMatchName[matchCt]))
- matchCt++;
+ char name_bf[32];
+ unsigned int min_match_ct = 2;
+ unsigned int max_match_ct = strlen(name) - 1;
- if (matchCt > min)
- min = matchCt;
-
- /*
- * Check the disablement name, too.
- */
- if (pOD->pz_DisableName != NULL) {
- matchCt = 0;
- while ( toupper(pOD->pz_DisableName[matchCt])
- == toupper(pzMatchName[matchCt]))
- matchCt++;
- if (matchCt > min)
- min = matchCt;
+ if (max_match_ct >= sizeof(name_bf) - 1)
+ goto leave;
+
+ {
+ tOptDesc * od = opts->pOptDesc;
+ int ct = opts->optCt;
+
+ for (; ct-- > 0; od++) {
+ unsigned int match_ct = 0;
+
+ /*
+ * Omit the current option, Doc opts and compiled out opts.
+ */
+ if ((od == cod) || SKIP_OPT(od))
+ continue;
+
+ /*
+ * Check each character of the name case insensitively.
+ * They must not be the same. They cannot be, because it would
+ * not compile correctly if they were.
+ */
+ while (toupper(od->pz_Name[match_ct]) == toupper(name[match_ct]))
+ match_ct++;
+
+ if (match_ct > min_match_ct)
+ min_match_ct = match_ct;
+
+ /*
+ * Check the disablement name, too.
+ */
+ if (od->pz_DisableName == NULL)
+ continue;
+
+ match_ct = 0;
+ while ( toupper(od->pz_DisableName[match_ct])
+ == toupper(name[match_ct]))
+ match_ct++;
+ if (match_ct > min_match_ct)
+ min_match_ct = match_ct;
}
- if (--oCt <= 0)
- break;
- pOD++;
}
/*
- * IF the 'min' is all or one short of the name length,
- * THEN the entire string must be matched.
+ * Don't bother emitting partial matches if there is only one possible
+ * partial match.
*/
- if ( (pzMatchName[min ] == NUL)
- || (pzMatchName[min+1] == NUL) )
- printf(zOptionFullName, pzMatchName);
+ if (min_match_ct < max_match_ct) {
+ char * pz = name_bf + min_match_ct;
+ int nm_ix = min_match_ct;
- else {
- int matchCt = 0;
- for (; matchCt <= min; matchCt++)
- *pz++ = pzMatchName[matchCt];
+ memcpy(name_bf, name, min_match_ct);
for (;;) {
*pz = NUL;
- printf(zOptionPartName, zName);
- *pz++ = pzMatchName[matchCt++];
- if (pzMatchName[matchCt] == NUL) {
+ printf(zOptionPartName, name_bf);
+ *pz++ = name[nm_ix++];
+ if (name[nm_ix] == NUL) {
*pz = NUL;
- printf(zOptionFullName, zName);
break;
}
}
}
-}
+leave:
+ printf(zOptionFullName, name);
+}
-/*
- * Emit GNU-standard long option handling code
+/**
+ * Emit GNU-standard long option handling code.
+ *
+ * @param[in] opts the program options
*/
static void
-emitLong(tOptions* pOpts)
+emit_long(tOptions * opts)
{
- tOptDesc* pOD = pOpts->pOptDesc;
- int ct = pOpts->optCt;
+ tOptDesc * od = opts->pOptDesc;
+ int ct = opts->optCt;
fputs(zOptionCase, stdout);
@@ -937,88 +719,113 @@ emitLong(tOptions* pOpts)
/*
* Documentation & compiled-out options
*/
- if (SKIP_OPT(pOD))
+ if (SKIP_OPT(od))
continue;
- emitMatchExpr(pOD->pz_Name, pOD, pOpts);
- printOptionAction(pOpts, pOD);
+ emit_match_expr(od->pz_Name, od, opts);
+ emit_action(opts, od);
/*
* Now, do the same thing for the disablement version of the option.
*/
- if (pOD->pz_DisableName != NULL) {
- emitMatchExpr(pOD->pz_DisableName, pOD, pOpts);
- printOptionInaction(pOpts, pOD);
+ if (od->pz_DisableName != NULL) {
+ emit_match_expr(od->pz_DisableName, od, opts);
+ emit_inaction(opts, od);
}
- } while (pOD++, --ct > 0);
+ } while (od++, --ct > 0);
- printf(zOptionUnknown, "option", pOpts->pzPROGNAME);
+ printf(UNK_OPT_FMT, OPTION_STR, opts->pzPROGNAME);
}
-
-static void
-openOutput(char const* pzFile)
+/**
+ * Load the previous shell script output file. We need to preserve any
+ * hand-edited additions outside of the START_MARK and END_MARKs.
+ *
+ * @param[in] fname the output file name
+ */
+static char *
+load_old_output(char const * fname, char const * pname)
{
- FILE* fp;
- char* pzData = NULL;
+ /*
+ * IF we cannot stat the file,
+ * THEN assume we are creating a new file.
+ * Skip the loading of the old data.
+ */
+ FILE * fp = fopen(fname, "r" FOPEN_BINARY_FLAG);
struct stat stbf;
+ char * text;
+ char * scan;
- do {
- char* pzScan;
- size_t sizeLeft;
+ if (fp == NULL)
+ return NULL;
- /*
- * IF we cannot stat the file,
- * THEN assume we are creating a new file.
- * Skip the loading of the old data.
- */
- if (stat(pzFile, &stbf) != 0)
+ /*
+ * If we opened it, we should be able to stat it and it needs
+ * to be a regular file
+ */
+ if ((fstat(fileno(fp), &stbf) != 0) || (! S_ISREG(stbf.st_mode)))
+ fserr_exit(pname, "fstat", fname);
+
+ scan = text = AGALOC(stbf.st_size + 1, "f data");
+
+ /*
+ * Read in all the data as fast as our OS will let us.
+ */
+ for (;;) {
+ size_t inct = fread((void*)scan, 1, (size_t)stbf.st_size, fp);
+ if (inct == 0)
break;
- /*
- * The file must be a regular file
- */
- if (! S_ISREG(stbf.st_mode)) {
- fprintf(stderr, zNotFile, pzFile);
- exit(EXIT_FAILURE);
- }
+ stbf.st_size -= (ssize_t)inct;
- pzData = AGALOC(stbf.st_size + 1, "file data");
- fp = fopen(pzFile, "r" FOPEN_BINARY_FLAG);
+ if (stbf.st_size == 0)
+ break;
- sizeLeft = (unsigned)stbf.st_size;
- pzScan = pzData;
+ scan += inct;
+ }
- /*
- * Read in all the data as fast as our OS will let us.
- */
- for (;;) {
- int inct = fread((void*)pzScan, (size_t)1, sizeLeft, fp);
- if (inct == 0)
- break;
+ *scan = NUL;
+ fclose(fp);
- pzScan += inct;
- sizeLeft -= inct;
+ return text;
+}
- if (sizeLeft == 0)
- break;
- }
+/**
+ * Open the specified output file. If it already exists, load its
+ * contents and save the non-generated (hand edited) portions.
+ * If a "start mark" is found, everything before it is preserved leader.
+ * If not, the entire thing is a trailer. Assuming the start is found,
+ * then everything after the end marker is the trailer. If the end
+ * mark is not found, the file is actually corrupt, but we take the
+ * remainder to be the trailer.
+ *
+ * @param[in] fname the output file name
+ */
+static void
+open_out(char const * fname, char const * pname)
+{
- /*
- * NUL-terminate the leader and look for the trailer
- */
- *pzScan = '\0';
- fclose(fp);
- pzScan = strstr(pzData, zStartMarker);
- if (pzScan == NULL) {
- pzTrailer = pzData;
+ do {
+ char * txt = script_text = load_old_output(fname, pname);
+ char * scn;
+
+ if (txt == NULL)
+ break;
+
+ scn = strstr(txt, START_MARK);
+ if (scn == NULL) {
+ script_trailer = txt;
break;
}
- *(pzScan++) = NUL;
- pzScan = strstr(pzScan, zTrailerMarker);
- if (pzScan == NULL) {
- pzTrailer = pzData;
+ *(scn++) = NUL;
+ scn = strstr(scn, END_MARK);
+ if (scn == NULL) {
+ /*
+ * The file is corrupt. Set the trailer to be everything
+ * after the start mark. The user will need to fix it up.
+ */
+ script_trailer = txt + strlen(txt) + START_MARK_LEN + 1;
break;
}
@@ -1026,23 +833,20 @@ openOutput(char const* pzFile)
* Check to see if the data contains our marker.
* If it does, then we will skip over it
*/
- pzTrailer = pzScan + sizeof(zTrailerMarker) - 1;
- pzLeader = pzData;
- } while (AG_FALSE);
+ script_trailer = scn + END_MARK_LEN;
+ script_leader = txt;
+ } while (false);
- if (freopen(pzFile, "w" FOPEN_BINARY_FLAG, stdout) != stdout) {
- fprintf(stderr, zFreopenFail, errno, strerror(errno));
- exit(EXIT_FAILURE);
- }
+ if (freopen(fname, "w" FOPEN_BINARY_FLAG, stdout) != stdout)
+ fserr_exit(pname, "freopen", fname);
}
-
/*=export_func genshelloptUsage
* private:
* what: The usage function for the genshellopt generated program
*
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + int + exitCode + usage text type to produce +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + int + exit_cd + usage text type to produce +
*
* doc:
* This function is used to create the usage strings for the option
@@ -1052,21 +856,21 @@ openOutput(char const* pzFile)
* and create shell script variables containing the two types of text.
=*/
void
-genshelloptUsage(tOptions * pOpts, int exitCode)
+genshelloptUsage(tOptions * opts, int exit_cd)
{
#if ! defined(HAVE_WORKING_FORK)
- optionUsage(pOpts, exitCode);
+ optionUsage(opts, exit_cd);
#else
/*
* IF not EXIT_SUCCESS,
* THEN emit the short form of usage.
*/
- if (exitCode != EXIT_SUCCESS)
- optionUsage(pOpts, exitCode);
+ if (exit_cd != EXIT_SUCCESS)
+ optionUsage(opts, exit_cd);
fflush(stderr);
fflush(stdout);
if (ferror(stdout) || ferror(stderr))
- exit(EXIT_FAILURE);
+ option_exits(EXIT_FAILURE);
option_usage_fp = stdout;
@@ -1075,12 +879,12 @@ genshelloptUsage(tOptions * pOpts, int exitCode)
*/
switch (fork()) {
case -1:
- optionUsage(pOpts, EXIT_FAILURE);
+ optionUsage(opts, EXIT_FAILURE);
/* NOTREACHED */
case 0:
pagerState = PAGER_STATE_CHILD;
- optionUsage(pOpts, EXIT_SUCCESS);
+ optionUsage(opts, EXIT_SUCCESS);
/* NOTREACHED */
_exit(EXIT_FAILURE);
@@ -1098,10 +902,10 @@ genshelloptUsage(tOptions * pOpts, int exitCode)
{
char * pz;
char ** pp = (char **)(void *)&(optionParseShellOptions->pzProgName);
- AGDUPSTR(pz, optionParseShellOptions->pzPROGNAME, "program name");
+ AGDUPSTR(pz, optionParseShellOptions->pzPROGNAME, "prog name");
*pp = pz;
while (*pz != NUL) {
- *pz = tolower(*pz);
+ *pz = (char)tolower(*pz);
pz++;
}
}
@@ -1130,16 +934,15 @@ genshelloptUsage(tOptions * pOpts, int exitCode)
}
fflush(stdout);
- if (ferror(stdout)) {
- fputs(zOutputFail, stderr);
- exit(EXIT_FAILURE);
- }
+ if (ferror(stdout))
+ fserr_exit(opts->pzProgName, zwriting, zstdout_name);
- exit(EXIT_SUCCESS);
+ option_exits(EXIT_SUCCESS);
#endif
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/nested.c b/sntp/libopts/nested.c
index f9f7e7ae7b80..0ec8f0880661 100644
--- a/sntp/libopts/nested.c
+++ b/sntp/libopts/nested.c
@@ -2,13 +2,17 @@
/**
* \file nested.c
*
- * Time-stamp: "2010-08-22 11:17:56 bkorb"
+ * Handle options with arguments that contain nested values.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* Automated Options Nested Values module.
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -20,11 +24,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
typedef struct {
@@ -41,37 +45,50 @@ static xml_xlate_t const xml_xlate[] = {
{ '\'',5, "apos;" }
};
+#ifndef ENOMSG
+#define ENOMSG ENOENT
+#endif
+
/* = = = START-STATIC-FORWARD = = = */
static void
-remove_continuation(char* pzSrc);
+remove_continuation(char * src);
static char const*
scan_q_str(char const* pzTxt);
-static tOptionValue*
-add_string(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen);
+static tOptionValue *
+add_string(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
-static tOptionValue*
-add_bool(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen);
+static tOptionValue *
+add_bool(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
static tOptionValue*
-add_number(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen);
+add_number(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len);
static tOptionValue*
-add_nested(void** pp, char const* pzName, size_t nameLen,
- char* pzValue, size_t dataLen);
+add_nested(void ** pp, char const * name, size_t nm_len,
+ char * val, size_t d_len);
static char const *
-scan_name(char const* pzName, tOptionValue* pRes);
+scan_name(char const * name, tOptionValue * res);
-static char const*
-scan_xml(char const* pzName, tOptionValue* pRes);
+static char const *
+unnamed_xml(char const * txt);
+
+static char const *
+scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val);
+
+static char const *
+find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len);
+
+static char const *
+scan_xml(char const * xml_name, tOptionValue * res_val);
static void
-sort_list(tArgList* pAL);
+sort_list(tArgList * arg_list);
/* = = = END-STATIC-FORWARD = = = */
/**
@@ -79,13 +96,13 @@ sort_list(tArgList* pAL);
* characters, but trim out the backslash:
*/
static void
-remove_continuation(char* pzSrc)
+remove_continuation(char * src)
{
char* pzD;
do {
- while (*pzSrc == '\n') pzSrc++;
- pzD = strchr(pzSrc, '\n');
+ while (*src == NL) src++;
+ pzD = strchr(src, NL);
if (pzD == NULL)
return;
@@ -94,20 +111,20 @@ remove_continuation(char* pzSrc)
* points to a newline character. It now becomes the source and
* pzD goes to the previous character.
*/
- pzSrc = pzD--;
+ src = pzD--;
if (*pzD != '\\')
pzD++;
- } while (pzD == pzSrc);
+ } while (pzD == src);
/*
* Start shifting text.
*/
for (;;) {
- char ch = ((*pzD++) = *(pzSrc++));
+ char ch = ((*pzD++) = *(src++));
switch (ch) {
case NUL: return;
case '\\':
- if (*pzSrc == '\n')
+ if (*src == NL)
--pzD; /* rewrite on next iteration */
}
}
@@ -152,34 +169,40 @@ scan_q_str(char const* pzTxt)
/**
* Associate a name with either a string or no value.
+ *
+ * @param[in,out] pp argument list to add to
+ * @param[in] name the name of the "suboption"
+ * @param[in] nm_len the length of the name
+ * @param[in] val the string value for the suboption
+ * @param[in] d_len the length of the value
+ *
+ * @returns the new value structure
*/
-static tOptionValue*
-add_string(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen)
+static tOptionValue *
+add_string(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len)
{
tOptionValue* pNV;
- size_t sz = nameLen + dataLen + sizeof(*pNV);
+ size_t sz = nm_len + d_len + sizeof(*pNV);
pNV = AGALOC(sz, "option name/str value pair");
- if (pNV == NULL)
- return NULL;
- if (pzValue == NULL) {
+ if (val == NULL) {
pNV->valType = OPARG_TYPE_NONE;
pNV->pzName = pNV->v.strVal;
} else {
pNV->valType = OPARG_TYPE_STRING;
- if (dataLen > 0) {
- char const * pzSrc = pzValue;
+ if (d_len > 0) {
+ char const * src = val;
char * pzDst = pNV->v.strVal;
- int ct = dataLen;
+ int ct = (int)d_len;
do {
- int ch = *(pzSrc++) & 0xFF;
+ int ch = *(src++) & 0xFF;
if (ch == NUL) goto data_copy_done;
if (ch == '&')
- ch = get_special_char(&pzSrc, &ct);
- *(pzDst++) = ch;
+ ch = get_special_char(&src, &ct);
+ *(pzDst++) = (char)ch;
} while (--ct > 0);
data_copy_done:
*pzDst = NUL;
@@ -188,104 +211,127 @@ add_string(void** pp, char const* pzName, size_t nameLen,
pNV->v.strVal[0] = NUL;
}
- pNV->pzName = pNV->v.strVal + dataLen + 1;
+ pNV->pzName = pNV->v.strVal + d_len + 1;
}
- memcpy(pNV->pzName, pzName, nameLen);
- pNV->pzName[ nameLen ] = NUL;
+ memcpy(pNV->pzName, name, nm_len);
+ pNV->pzName[ nm_len ] = NUL;
addArgListEntry(pp, pNV);
return pNV;
}
/**
- * Associate a name with either a string or no value.
+ * Associate a name with a boolean value
+ *
+ * @param[in,out] pp argument list to add to
+ * @param[in] name the name of the "suboption"
+ * @param[in] nm_len the length of the name
+ * @param[in] val the boolean value for the suboption
+ * @param[in] d_len the length of the value
+ *
+ * @returns the new value structure
*/
-static tOptionValue*
-add_bool(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen)
+static tOptionValue *
+add_bool(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len)
{
- tOptionValue* pNV;
- size_t sz = nameLen + sizeof(*pNV) + 1;
+ size_t sz = nm_len + sizeof(tOptionValue) + 1;
+ tOptionValue * new_val = AGALOC(sz, "bool val");
- pNV = AGALOC(sz, "option name/bool value pair");
- if (pNV == NULL)
- return NULL;
- while (IS_WHITESPACE_CHAR(*pzValue) && (dataLen > 0)) {
- dataLen--; pzValue++;
+ /*
+ * Scan over whitespace is constrained by "d_len"
+ */
+ while (IS_WHITESPACE_CHAR(*val) && (d_len > 0)) {
+ d_len--; val++;
}
- if (dataLen == 0)
- pNV->v.boolVal = 0;
- else if (IS_DEC_DIGIT_CHAR(*pzValue))
- pNV->v.boolVal = atoi(pzValue);
+ if (d_len == 0)
+ new_val->v.boolVal = 0;
- else pNV->v.boolVal = ! IS_FALSE_TYPE_CHAR(*pzValue);
+ else if (IS_DEC_DIGIT_CHAR(*val))
+ new_val->v.boolVal = (unsigned)atoi(val);
- pNV->valType = OPARG_TYPE_BOOLEAN;
- pNV->pzName = (char*)(pNV + 1);
- memcpy(pNV->pzName, pzName, nameLen);
- pNV->pzName[ nameLen ] = NUL;
- addArgListEntry(pp, pNV);
- return pNV;
+ else new_val->v.boolVal = ! IS_FALSE_TYPE_CHAR(*val);
+
+ new_val->valType = OPARG_TYPE_BOOLEAN;
+ new_val->pzName = (char*)(new_val + 1);
+ memcpy(new_val->pzName, name, nm_len);
+ new_val->pzName[ nm_len ] = NUL;
+ addArgListEntry(pp, new_val);
+ return new_val;
}
/**
- * Associate a name with either a string or no value.
+ * Associate a name with strtol() value, defaulting to zero.
+ *
+ * @param[in,out] pp argument list to add to
+ * @param[in] name the name of the "suboption"
+ * @param[in] nm_len the length of the name
+ * @param[in] val the numeric value for the suboption
+ * @param[in] d_len the length of the value
+ *
+ * @returns the new value structure
*/
static tOptionValue*
-add_number(void** pp, char const* pzName, size_t nameLen,
- char const* pzValue, size_t dataLen)
+add_number(void ** pp, char const * name, size_t nm_len,
+ char const * val, size_t d_len)
{
- tOptionValue* pNV;
- size_t sz = nameLen + sizeof(*pNV) + 1;
+ size_t sz = nm_len + sizeof(tOptionValue) + 1;
+ tOptionValue * new_val = AGALOC(sz, "int val");
- pNV = AGALOC(sz, "option name/bool value pair");
- if (pNV == NULL)
- return NULL;
- while (IS_WHITESPACE_CHAR(*pzValue) && (dataLen > 0)) {
- dataLen--; pzValue++;
+ /*
+ * Scan over whitespace is constrained by "d_len"
+ */
+ while (IS_WHITESPACE_CHAR(*val) && (d_len > 0)) {
+ d_len--; val++;
}
- if (dataLen == 0)
- pNV->v.longVal = 0;
+ if (d_len == 0)
+ new_val->v.longVal = 0;
else
- pNV->v.longVal = strtol(pzValue, 0, 0);
-
- pNV->valType = OPARG_TYPE_NUMERIC;
- pNV->pzName = (char*)(pNV + 1);
- memcpy(pNV->pzName, pzName, nameLen);
- pNV->pzName[ nameLen ] = NUL;
- addArgListEntry(pp, pNV);
- return pNV;
+ new_val->v.longVal = strtol(val, 0, 0);
+
+ new_val->valType = OPARG_TYPE_NUMERIC;
+ new_val->pzName = (char*)(new_val + 1);
+ memcpy(new_val->pzName, name, nm_len);
+ new_val->pzName[ nm_len ] = NUL;
+ addArgListEntry(pp, new_val);
+ return new_val;
}
/**
- * Associate a name with either a string or no value.
+ * Associate a name with a nested/hierarchical value.
+ *
+ * @param[in,out] pp argument list to add to
+ * @param[in] name the name of the "suboption"
+ * @param[in] nm_len the length of the name
+ * @param[in] val the nested values for the suboption
+ * @param[in] d_len the length of the value
+ *
+ * @returns the new value structure
*/
static tOptionValue*
-add_nested(void** pp, char const* pzName, size_t nameLen,
- char* pzValue, size_t dataLen)
+add_nested(void ** pp, char const * name, size_t nm_len,
+ char * val, size_t d_len)
{
- tOptionValue* pNV;
+ tOptionValue* new_val;
- if (dataLen == 0) {
- size_t sz = nameLen + sizeof(*pNV) + 1;
- pNV = AGALOC(sz, "empty nested value pair");
- if (pNV == NULL)
- return NULL;
- pNV->v.nestVal = NULL;
- pNV->valType = OPARG_TYPE_HIERARCHY;
- pNV->pzName = (char*)(pNV + 1);
- memcpy(pNV->pzName, pzName, nameLen);
- pNV->pzName[ nameLen ] = NUL;
+ if (d_len == 0) {
+ size_t sz = nm_len + sizeof(*new_val) + 1;
+ new_val = AGALOC(sz, "empty nest");
+ new_val->v.nestVal = NULL;
+ new_val->valType = OPARG_TYPE_HIERARCHY;
+ new_val->pzName = (char*)(new_val + 1);
+ memcpy(new_val->pzName, name, nm_len);
+ new_val->pzName[ nm_len ] = NUL;
} else {
- pNV = optionLoadNested(pzValue, pzName, nameLen);
+ new_val = optionLoadNested(val, name, nm_len);
}
- if (pNV != NULL)
- addArgListEntry(pp, pNV);
+ if (new_val != NULL)
+ addArgListEntry(pp, new_val);
- return pNV;
+ return new_val;
}
/**
@@ -293,50 +339,53 @@ add_nested(void** pp, char const* pzName, size_t nameLen,
* (if called for) and create the name/value association.
*/
static char const *
-scan_name(char const* pzName, tOptionValue* pRes)
+scan_name(char const * name, tOptionValue * res)
{
- tOptionValue* pNV;
- char const * pzScan = pzName+1; /* we know first char is a name char */
+ tOptionValue* new_val;
+ char const * pzScan = name+1; /* we know first char is a name char */
char const * pzVal;
- size_t nameLen = 1;
- size_t dataLen = 0;
+ size_t nm_len = 1;
+ size_t d_len = 0;
/*
* Scan over characters that name a value. These names may not end
* with a colon, but they may contain colons.
*/
- while (IS_VALUE_NAME_CHAR(*pzScan)) { pzScan++; nameLen++; }
- if (pzScan[-1] == ':') { pzScan--; nameLen--; }
- while (IS_HORIZ_WHITE_CHAR(*pzScan)) pzScan++;
+ pzScan = SPN_VALUE_NAME_CHARS(name + 1);
+ if (pzScan[-1] == ':')
+ pzScan--;
+ nm_len = (size_t)(pzScan - name);
+
+ pzScan = SPN_HORIZ_WHITE_CHARS(pzScan);
re_switch:
switch (*pzScan) {
case '=':
case ':':
- while (IS_HORIZ_WHITE_CHAR((int)*++pzScan)) ;
+ pzScan = SPN_HORIZ_WHITE_CHARS(pzScan + 1);
if ((*pzScan == '=') || (*pzScan == ':'))
goto default_char;
goto re_switch;
- case '\n':
+ case NL:
case ',':
pzScan++;
/* FALLTHROUGH */
case NUL:
- add_string(&(pRes->v.nestVal), pzName, nameLen, NULL, (size_t)0);
+ add_string(&(res->v.nestVal), name, nm_len, NULL, (size_t)0);
break;
case '"':
case '\'':
pzVal = pzScan;
pzScan = scan_q_str(pzScan);
- dataLen = pzScan - pzVal;
- pNV = add_string(&(pRes->v.nestVal), pzName, nameLen, pzVal,
- dataLen);
- if ((pNV != NULL) && (option_load_mode == OPTION_LOAD_COOKED))
- ao_string_cook(pNV->v.strVal, NULL);
+ d_len = (size_t)(pzScan - pzVal);
+ new_val = add_string(&(res->v.nestVal), name, nm_len, pzVal,
+ d_len);
+ if ((new_val != NULL) && (option_load_mode == OPTION_LOAD_COOKED))
+ ao_string_cook(new_val->v.strVal, NULL);
break;
default:
@@ -351,11 +400,11 @@ scan_name(char const* pzName, tOptionValue* pRes)
switch (ch) {
case NUL:
pzScan--;
- dataLen = pzScan - pzVal;
+ d_len = (size_t)(pzScan - pzVal);
goto string_done;
/* FALLTHROUGH */
- case '\n':
+ case NL:
if ( (pzScan > pzVal + 2)
&& (pzScan[-2] == '\\')
&& (pzScan[ 0] != NUL))
@@ -363,12 +412,12 @@ scan_name(char const* pzName, tOptionValue* pRes)
/* FALLTHROUGH */
case ',':
- dataLen = (pzScan - pzVal) - 1;
+ d_len = (size_t)(pzScan - pzVal) - 1;
string_done:
- pNV = add_string(&(pRes->v.nestVal), pzName, nameLen,
- pzVal, dataLen);
- if (pNV != NULL)
- remove_continuation(pNV->v.strVal);
+ new_val = add_string(&(res->v.nestVal), name, nm_len,
+ pzVal, d_len);
+ if (new_val != NULL)
+ remove_continuation(new_val->v.strVal);
goto leave_scan_name;
}
}
@@ -379,138 +428,191 @@ scan_name(char const* pzName, tOptionValue* pRes)
}
/**
- * We've found a '<' character. We ignore this if it is a comment or a
- * directive. If it is something else, then whatever it is we are looking
- * at is bogus. Returning NULL stops processing.
+ * Some xml element that does not start with a name.
+ * The next character must be either '!' (introducing a comment),
+ * or '?' (introducing an XML meta-marker of some sort).
+ * We ignore these and indicate an error (NULL result) otherwise.
+ *
+ * @param[in] txt the text within an xml bracket
+ * @returns the address of the character after the closing marker, or NULL.
*/
-static char const*
-scan_xml(char const* pzName, tOptionValue* pRes)
+static char const *
+unnamed_xml(char const * txt)
{
- size_t nameLen = 1, valLen = 0;
- char const* pzScan = ++pzName;
- char const* pzVal;
- tOptionValue valu;
- tOptionValue* pNewVal;
- tOptionLoadMode save_mode = option_load_mode;
-
- if (! IS_VAR_FIRST_CHAR(*pzName)) {
- switch (*pzName) {
- default:
- pzName = NULL;
- break;
+ switch (*txt) {
+ default:
+ txt = NULL;
+ break;
- case '!':
- pzName = strstr(pzName, "-->");
- if (pzName != NULL)
- pzName += 3;
- break;
+ case '!':
+ txt = strstr(txt, "-->");
+ if (txt != NULL)
+ txt += 3;
+ break;
- case '?':
- pzName = strchr(pzName, '>');
- if (pzName != NULL)
- pzName++;
- break;
- }
- return pzName;
+ case '?':
+ txt = strchr(txt, '>');
+ if (txt != NULL)
+ txt++;
+ break;
}
+ return txt;
+}
- pzScan++;
- while (IS_VALUE_NAME_CHAR((int)*pzScan)) { pzScan++; nameLen++; }
- if (nameLen > 64)
+/**
+ * Scan off the xml element name, and the rest of the header, too.
+ * Set the value type to NONE if it ends with "/>".
+ *
+ * @param[in] name the first name character (alphabetic)
+ * @param[out] nm_len the length of the name
+ * @param[out] val set valType field to STRING or NONE.
+ *
+ * @returns the scan resumption point, or NULL on error
+ */
+static char const *
+scan_xml_name(char const * name, size_t * nm_len, tOptionValue * val)
+{
+ char const * scan = SPN_VALUE_NAME_CHARS(name + 1);
+ *nm_len = (size_t)(scan - name);
+ if (*nm_len > 64)
return NULL;
- valu.valType = OPARG_TYPE_STRING;
+ val->valType = OPARG_TYPE_STRING;
- switch (*pzScan) {
- case ' ':
- case '\t':
- pzScan = parseAttributes(
- NULL, (char*)pzScan, &option_load_mode, &valu );
- if (*pzScan == '>') {
- pzScan++;
- break;
- }
+ if (IS_WHITESPACE_CHAR(*scan)) {
+ /*
+ * There are attributes following the name. Parse 'em.
+ */
+ scan = SPN_WHITESPACE_CHARS(scan);
+ scan = parse_attrs(NULL, scan, &option_load_mode, val);
+ if (scan == NULL)
+ return NULL; /* oops */
+ }
- if (*pzScan != '/') {
- option_load_mode = save_mode;
- return NULL;
- }
- /* FALLTHROUGH */
+ if (! IS_END_XML_TOKEN_CHAR(*scan))
+ return NULL; /* oops */
- case '/':
- if (*++pzScan != '>') {
- option_load_mode = save_mode;
+ if (*scan == '/') {
+ /*
+ * Single element XML entries get inserted as an empty string.
+ */
+ if (*++scan != '>')
return NULL;
- }
- add_string(&(pRes->v.nestVal), pzName, nameLen, NULL, (size_t)0);
- option_load_mode = save_mode;
- return pzScan+1;
-
- default:
- option_load_mode = save_mode;
- return NULL;
-
- case '>':
- pzScan++;
- break;
+ val->valType = OPARG_TYPE_NONE;
}
+ return scan+1;
+}
- pzVal = pzScan;
+/**
+ * We've found a closing '>' without a preceding '/', thus we must search
+ * the text for '<name/>' where "name" is the name of the XML element.
+ *
+ * @param[in] name the start of the name in the element header
+ * @param[in] nm_len the length of that name
+ * @param[out] len the length of the value (string between header and
+ * the trailer/tail.
+ * @returns the character after the trailer, or NULL if not found.
+ */
+static char const *
+find_end_xml(char const * src, size_t nm_len, char const * val, size_t * len)
+{
+ char z[72] = "</";
+ char * dst = z + 2;
+
+ do {
+ *(dst++) = *(src++);
+ } while (--nm_len > 0); /* nm_len is known to be 64 or less */
+ *(dst++) = '>';
+ *dst = NUL;
{
- char z[68];
- char* pzD = z;
- int ct = nameLen;
- char const* pzS = pzName;
-
- *(pzD++) = '<';
- *(pzD++) = '/';
-
- do {
- *(pzD++) = *(pzS++);
- } while (--ct > 0);
- *(pzD++) = '>';
- *pzD = NUL;
-
- pzScan = strstr(pzScan, z);
- if (pzScan == NULL) {
- option_load_mode = save_mode;
- return NULL;
+ char const * res = strstr(val, z);
+
+ if (res != NULL) {
+ char const * end = (option_load_mode != OPTION_LOAD_KEEP)
+ ? SPN_WHITESPACE_BACK(val, res)
+ : res;
+ *len = (size_t)(end - val); /* includes trailing white space */
+ res = SPN_WHITESPACE_CHARS(res + (dst - z));
}
- valLen = (pzScan - pzVal);
- pzScan += nameLen + 3;
- while (IS_WHITESPACE_CHAR(*pzScan)) pzScan++;
+ return res;
+ }
+}
+
+/**
+ * We've found a '<' character. We ignore this if it is a comment or a
+ * directive. If it is something else, then whatever it is we are looking
+ * at is bogus. Returning NULL stops processing.
+ *
+ * @param[in] xml_name the name of an xml bracket (usually)
+ * @param[in,out] res_val the option data derived from the XML element
+ *
+ * @returns the place to resume scanning input
+ */
+static char const *
+scan_xml(char const * xml_name, tOptionValue * res_val)
+{
+ size_t nm_len, v_len;
+ char const * scan;
+ char const * val_str;
+ tOptionValue valu;
+ tOptionLoadMode save_mode = option_load_mode;
+
+ if (! IS_VAR_FIRST_CHAR(*++xml_name))
+ return unnamed_xml(xml_name);
+
+ /*
+ * "scan_xml_name()" may change "option_load_mode".
+ */
+ val_str = scan_xml_name(xml_name, &nm_len, &valu);
+ if (val_str == NULL)
+ goto bail_scan_xml;
+
+ if (valu.valType == OPARG_TYPE_NONE)
+ scan = val_str;
+ else {
+ if (option_load_mode != OPTION_LOAD_KEEP)
+ val_str = SPN_WHITESPACE_CHARS(val_str);
+ scan = find_end_xml(xml_name, nm_len, val_str, &v_len);
+ if (scan == NULL)
+ goto bail_scan_xml;
}
+ /*
+ * "scan" now points to where the scan is to resume after returning.
+ * It either points after "/>" at the end of the XML element header,
+ * or it points after the "</name>" tail based on the name in the header.
+ */
+
switch (valu.valType) {
case OPARG_TYPE_NONE:
- add_string(&(pRes->v.nestVal), pzName, nameLen, NULL, (size_t)0);
+ add_string(&(res_val->v.nestVal), xml_name, nm_len, NULL, 0);
break;
case OPARG_TYPE_STRING:
- pNewVal = add_string(
- &(pRes->v.nestVal), pzName, nameLen, pzVal, valLen);
+ {
+ tOptionValue * new_val = add_string(
+ &(res_val->v.nestVal), xml_name, nm_len, val_str, v_len);
+
+ if (option_load_mode != OPTION_LOAD_KEEP)
+ munge_str(new_val->v.strVal, option_load_mode);
- if (option_load_mode == OPTION_LOAD_KEEP)
- break;
- mungeString(pNewVal->v.strVal, option_load_mode);
break;
+ }
case OPARG_TYPE_BOOLEAN:
- add_bool(&(pRes->v.nestVal), pzName, nameLen, pzVal, valLen);
+ add_bool(&(res_val->v.nestVal), xml_name, nm_len, val_str, v_len);
break;
case OPARG_TYPE_NUMERIC:
- add_number(&(pRes->v.nestVal), pzName, nameLen, pzVal, valLen);
+ add_number(&(res_val->v.nestVal), xml_name, nm_len, val_str, v_len);
break;
case OPARG_TYPE_HIERARCHY:
{
- char* pz = AGALOC(valLen+1, "hierarchical scan");
- if (pz == NULL)
- break;
- memcpy(pz, pzVal, valLen);
- pz[valLen] = NUL;
- add_nested(&(pRes->v.nestVal), pzName, nameLen, pz, valLen);
+ char * pz = AGALOC(v_len+1, "h scan");
+ memcpy(pz, val_str, v_len);
+ pz[v_len] = NUL;
+ add_nested(&(res_val->v.nestVal), xml_name, nm_len, pz, v_len);
AGFREE(pz);
break;
}
@@ -522,7 +624,11 @@ scan_xml(char const* pzName, tOptionValue* pRes)
}
option_load_mode = save_mode;
- return pzScan;
+ return scan;
+
+bail_scan_xml:
+ option_load_mode = save_mode;
+ return NULL;
}
@@ -533,19 +639,19 @@ scan_xml(char const* pzName, tOptionValue* pRes)
* knowing what they are doing.
*/
LOCAL void
-unload_arg_list(tArgList* pAL)
+unload_arg_list(tArgList * arg_list)
{
- int ct = pAL->useCt;
- tCC** ppNV = pAL->apzArgs;
+ int ct = arg_list->useCt;
+ char const ** pnew_val = arg_list->apzArgs;
while (ct-- > 0) {
- tOptionValue* pNV = (tOptionValue*)(void*)*(ppNV++);
- if (pNV->valType == OPARG_TYPE_HIERARCHY)
- unload_arg_list(pNV->v.nestVal);
- AGFREE(pNV);
+ tOptionValue* new_val = (tOptionValue*)(void*)*(pnew_val++);
+ if (new_val->valType == OPARG_TYPE_HIERARCHY)
+ unload_arg_list(new_val->v.nestVal);
+ AGFREE(new_val);
}
- AGFREE((void*)pAL);
+ AGFREE((void*)arg_list);
}
/*=export_func optionUnloadNested
@@ -559,17 +665,17 @@ unload_arg_list(tArgList* pAL)
* @pxref{libopts-configFileLoad}).
=*/
void
-optionUnloadNested(tOptionValue const * pOV)
+optionUnloadNested(tOptionValue const * opt_val)
{
- if (pOV == NULL) return;
- if (pOV->valType != OPARG_TYPE_HIERARCHY) {
+ if (opt_val == NULL) return;
+ if (opt_val->valType != OPARG_TYPE_HIERARCHY) {
errno = EINVAL;
return;
}
- unload_arg_list(pOV->v.nestVal);
+ unload_arg_list(opt_val->v.nestVal);
- AGFREE((void*)pOV);
+ AGFREE((void*)opt_val);
}
/**
@@ -578,27 +684,27 @@ optionUnloadNested(tOptionValue const * pOV)
* Typically, we also hope the input is sorted.
*/
static void
-sort_list(tArgList* pAL)
+sort_list(tArgList * arg_list)
{
int ix;
- int lm = pAL->useCt;
+ int lm = arg_list->useCt;
/*
* This loop iterates "useCt" - 1 times.
*/
for (ix = 0; ++ix < lm;) {
int iy = ix-1;
- tOptionValue* pNewNV = (tOptionValue*)(void*)(pAL->apzArgs[ix]);
- tOptionValue* pOldNV = (tOptionValue*)(void*)(pAL->apzArgs[iy]);
+ tOptionValue * new_v = C(tOptionValue *, arg_list->apzArgs[ix]);
+ tOptionValue * old_v = C(tOptionValue *, arg_list->apzArgs[iy]);
/*
* For as long as the new entry precedes the "old" entry,
* move the old pointer. Stop before trying to extract the
* "-1" entry.
*/
- while (strcmp(pOldNV->pzName, pNewNV->pzName) > 0) {
- pAL->apzArgs[iy+1] = (void*)pOldNV;
- pOldNV = (tOptionValue*)(void*)(pAL->apzArgs[--iy]);
+ while (strcmp(old_v->pzName, new_v->pzName) > 0) {
+ arg_list->apzArgs[iy+1] = (void*)old_v;
+ old_v = (tOptionValue*)(void*)(arg_list->apzArgs[--iy]);
if (iy < 0)
break;
}
@@ -607,17 +713,17 @@ sort_list(tArgList* pAL)
* Always store the pointer. Sometimes it is redundant,
* but the redundancy is cheaper than a test and branch sequence.
*/
- pAL->apzArgs[iy+1] = (void*)pNewNV;
+ arg_list->apzArgs[iy+1] = (void*)new_v;
}
}
-/* optionLoadNested
+/*=
* private:
*
* what: parse a hierarchical option argument
- * arg: + char const* + pzTxt + the text to scan +
- * arg: + char const* + pzName + the name for the text +
- * arg: + size_t + nameLen + the length of "name" +
+ * arg: + char const * + pzTxt + the text to scan +
+ * arg: + char const * + pzName + the name for the text +
+ * arg: + size_t + nm_len + the length of "name" +
*
* ret_type: tOptionValue*
* ret_desc: An allocated, compound value structure
@@ -626,75 +732,81 @@ sort_list(tArgList* pAL)
* A block of text represents a series of values. It may be an
* entire configuration file, or it may be an argument to an
* option that takes a hierarchical value.
- */
-LOCAL tOptionValue*
-optionLoadNested(char const* pzTxt, char const* pzName, size_t nameLen)
+ *
+ * If NULL is returned, errno will be set:
+ * @itemize @bullet
+ * @item
+ * @code{EINVAL} the input text was NULL.
+ * @item
+ * @code{ENOMEM} the storage structures could not be allocated
+ * @item
+ * @code{ENOMSG} no configuration values were found
+ * @end itemize
+=*/
+LOCAL tOptionValue *
+optionLoadNested(char const * text, char const * name, size_t nm_len)
{
- tOptionValue* pRes;
+ tOptionValue* res_val;
/*
* Make sure we have some data and we have space to put what we find.
*/
- if (pzTxt == NULL) {
+ if (text == NULL) {
errno = EINVAL;
return NULL;
}
- while (IS_WHITESPACE_CHAR(*pzTxt)) pzTxt++;
- if (*pzTxt == NUL) {
- errno = ENOENT;
+ text = SPN_WHITESPACE_CHARS(text);
+ if (*text == NUL) {
+ errno = ENOMSG;
return NULL;
}
- pRes = AGALOC(sizeof(*pRes) + nameLen + 1, "nested args");
- if (pRes == NULL) {
- errno = ENOMEM;
- return NULL;
- }
- pRes->valType = OPARG_TYPE_HIERARCHY;
- pRes->pzName = (char*)(pRes + 1);
- memcpy(pRes->pzName, pzName, nameLen);
- pRes->pzName[nameLen] = NUL;
+ res_val = AGALOC(sizeof(*res_val) + nm_len + 1, "nest args");
+ res_val->valType = OPARG_TYPE_HIERARCHY;
+ res_val->pzName = (char*)(res_val + 1);
+ memcpy(res_val->pzName, name, nm_len);
+ res_val->pzName[nm_len] = NUL;
{
- tArgList * pAL = AGALOC(sizeof(*pAL), "nested arg list");
- if (pAL == NULL) {
- AGFREE(pRes);
- return NULL;
- }
+ tArgList * arg_list = AGALOC(sizeof(*arg_list), "nest arg l");
- pRes->v.nestVal = pAL;
- pAL->useCt = 0;
- pAL->allocCt = MIN_ARG_ALLOC_CT;
+ res_val->v.nestVal = arg_list;
+ arg_list->useCt = 0;
+ arg_list->allocCt = MIN_ARG_ALLOC_CT;
}
/*
* Scan until we hit a NUL.
*/
do {
- while (IS_WHITESPACE_CHAR((int)*pzTxt)) pzTxt++;
- if (IS_VAR_FIRST_CHAR((int)*pzTxt)) {
- pzTxt = scan_name(pzTxt, pRes);
- }
- else switch (*pzTxt) {
+ text = SPN_WHITESPACE_CHARS(text);
+ if (IS_VAR_FIRST_CHAR(*text))
+ text = scan_name(text, res_val);
+
+ else switch (*text) {
case NUL: goto scan_done;
- case '<': pzTxt = scan_xml(pzTxt, pRes);
- if (pzTxt == NULL) goto woops;
- if (*pzTxt == ',') pzTxt++; break;
- case '#': pzTxt = strchr(pzTxt, '\n'); break;
+ case '<': text = scan_xml(text, res_val);
+ if (text == NULL) goto woops;
+ if (*text == ',') text++; break;
+ case '#': text = strchr(text, NL); break;
default: goto woops;
}
- } while (pzTxt != NULL); scan_done:;
+ } while (text != NULL); scan_done:;
{
- tArgList * al = pRes->v.nestVal;
- if (al->useCt != 0)
+ tArgList * al = res_val->v.nestVal;
+ if (al->useCt == 0) {
+ errno = ENOMSG;
+ goto woops;
+ }
+ if (al->useCt > 1)
sort_list(al);
}
- return pRes;
+ return res_val;
woops:
- AGFREE(pRes->v.nestVal);
- AGFREE(pRes);
+ AGFREE(res_val->v.nestVal);
+ AGFREE(res_val);
return NULL;
}
@@ -702,45 +814,45 @@ optionLoadNested(char const* pzTxt, char const* pzName, size_t nameLen)
* private:
*
* what: parse a hierarchical option argument
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Nested value was found on the command line
=*/
void
-optionNestedVal(tOptions* pOpts, tOptDesc* pOD)
+optionNestedVal(tOptions * opts, tOptDesc * od)
{
- if (pOpts < OPTPROC_EMIT_LIMIT)
+ if (opts < OPTPROC_EMIT_LIMIT)
return;
- if (pOD->fOptState & OPTST_RESET) {
- tArgList* pAL = pOD->optCookie;
- int ct;
- tCC ** av;
+ if (od->fOptState & OPTST_RESET) {
+ tArgList * arg_list = od->optCookie;
+ int ct;
+ char const ** av;
- if (pAL == NULL)
+ if (arg_list == NULL)
return;
- ct = pAL->useCt;
- av = pAL->apzArgs;
+ ct = arg_list->useCt;
+ av = arg_list->apzArgs;
while (--ct >= 0) {
void * p = (void *)*(av++);
optionUnloadNested((tOptionValue const *)p);
}
- AGFREE(pOD->optCookie);
+ AGFREE(od->optCookie);
} else {
- tOptionValue* pOV = optionLoadNested(
- pOD->optArg.argString, pOD->pz_Name, strlen(pOD->pz_Name));
+ tOptionValue * opt_val = optionLoadNested(
+ od->optArg.argString, od->pz_Name, strlen(od->pz_Name));
- if (pOV != NULL)
- addArgListEntry(&(pOD->optCookie), (void*)pOV);
+ if (opt_val != NULL)
+ addArgListEntry(&(od->optCookie), (void*)opt_val);
}
}
-/*
+/**
* get_special_char
*/
LOCAL int
@@ -763,7 +875,7 @@ get_special_char(char const ** ppz, int * ct)
retch = (int)strtoul(pz, (char **)&pz, base);
if (*pz != ';')
return '&';
- base = ++pz - *ppz;
+ base = (int)(++pz - *ppz);
if (base > *ct)
return '&';
@@ -778,7 +890,7 @@ get_special_char(char const ** ppz, int * ct)
for (;;) {
if ( (*ct >= xlatp->xml_len)
- && (strncmp(pz, xlatp->xml_txt, xlatp->xml_len) == 0)) {
+ && (strncmp(pz, xlatp->xml_txt, (size_t)xlatp->xml_len) == 0)) {
*ppz += xlatp->xml_len;
*ct -= xlatp->xml_len;
return xlatp->xml_ch;
@@ -792,7 +904,7 @@ get_special_char(char const ** ppz, int * ct)
return '&';
}
-/*
+/**
* emit_special_char
*/
LOCAL void
@@ -811,10 +923,11 @@ emit_special_char(FILE * fp, int ch)
break;
xlatp++;
}
- fprintf(fp, "#x%02X;", (ch & 0xFF));
+ fprintf(fp, XML_HEX_BYTE_FMT, (ch & 0xFF));
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/numeric.c b/sntp/libopts/numeric.c
index ff6b2a50f279..9baba65e7ba9 100644
--- a/sntp/libopts/numeric.c
+++ b/sntp/libopts/numeric.c
@@ -2,11 +2,15 @@
/**
* \file numeric.c
*
- * Time-stamp: "2011-03-25 16:26:10 bkorb"
+ * Handle options with numeric (integer) arguments.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -18,17 +22,17 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*=export_func optionShowRange
* private:
*
- * what:
+ * what: Show info about range constraints
* arg: + tOptions* + pOpts + program options descriptor +
* arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
* arg: + void * + rng_table + the value range tables +
@@ -38,15 +42,11 @@
* Show information about a numeric option with range constraints.
=*/
void
-optionShowRange(tOptions* pOpts, tOptDesc* pOD, void * rng_table, int rng_ct)
+optionShowRange(tOptions * pOpts, tOptDesc * pOD, void * rng_table, int rng_ct)
{
- static char const bullet[] = "\t\t\t\t- ";
- static char const deepin[] = "\t\t\t\t ";
- static char const onetab[] = "\t";
-
const struct {long const rmin, rmax;} * rng = rng_table;
- char const * pz_indent = bullet;
+ char const * pz_indent = zTabHyp + tab_skip_ct;
/*
* The range is shown only for full usage requests and an error
@@ -55,10 +55,10 @@ optionShowRange(tOptions* pOpts, tOptDesc* pOD, void * rng_table, int rng_ct)
if (pOpts != OPTPROC_EMIT_USAGE) {
if (pOpts <= OPTPROC_EMIT_LIMIT)
return;
- pz_indent = onetab;
+ pz_indent = ONE_TAB_STR;
fprintf(option_usage_fp, zRangeErr, pOpts->pzProgName,
- pOD->pz_Name, pOD->optArg.argString);
+ pOD->pz_Name, pOD->optArg.argInt);
pz_indent = "";
}
@@ -66,7 +66,9 @@ optionShowRange(tOptions* pOpts, tOptDesc* pOD, void * rng_table, int rng_ct)
fprintf(option_usage_fp, zRangeScaled, pz_indent);
fprintf(option_usage_fp, (rng_ct > 1) ? zRangeLie : zRangeOnly, pz_indent);
- pz_indent = (pOpts != OPTPROC_EMIT_USAGE) ? onetab : deepin;
+ pz_indent = (pOpts != OPTPROC_EMIT_USAGE)
+ ? ONE_TAB_STR
+ : (zTabSpace + tab_skip_ct);
for (;;) {
if (rng->rmax == LONG_MIN)
@@ -80,7 +82,7 @@ optionShowRange(tOptions* pOpts, tOptDesc* pOD, void * rng_table, int rng_ct)
rng->rmax);
if (--rng_ct <= 0) {
- fputc('\n', option_usage_fp);
+ fputc(NL, option_usage_fp);
break;
}
fputs(zRangeOr, option_usage_fp);
@@ -95,37 +97,44 @@ optionShowRange(tOptions* pOpts, tOptDesc* pOD, void * rng_table, int rng_ct)
* private:
*
* what: process an option with a numeric value.
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Decipher a numeric value.
=*/
void
-optionNumericVal(tOptions* pOpts, tOptDesc* pOD )
+optionNumericVal(tOptions * opts, tOptDesc * od)
{
char* pz;
long val;
/*
+ * Guard against all the different ways this procedure might get invoked
+ * when there is no string argument provided.
+ */
+ if (INQUERY_CALL(opts, od) || (od->optArg.argString == NULL))
+ return;
+
+ /*
* Numeric options may have a range associated with it.
* If it does, the usage procedure requests that it be
- * emitted by passing a NULL pOD pointer. Also bail out
+ * emitted by passing a NULL od pointer. Also bail out
* if there is no option argument or if we are being reset.
*/
- if ( (pOD == NULL)
- || (pOD->optArg.argString == NULL)
- || ((pOD->fOptState & OPTST_RESET) != 0))
+ if ( (od == NULL)
+ || (od->optArg.argString == NULL)
+ || ((od->fOptState & OPTST_RESET) != 0))
return;
errno = 0;
- val = strtol(pOD->optArg.argString, &pz, 0);
- if ((pz == pOD->optArg.argString) || (errno != 0))
+ val = strtol(od->optArg.argString, &pz, 0);
+ if ((pz == od->optArg.argString) || (errno != 0))
goto bad_number;
- if ((pOD->fOptState & OPTST_SCALED_NUM) != 0)
+ if ((od->fOptState & OPTST_SCALED_NUM) != 0)
switch (*(pz++)) {
- case '\0': pz--; break;
+ case NUL: pz--; break;
case 't': val *= 1000;
case 'g': val *= 1000;
case 'm': val *= 1000;
@@ -142,25 +151,26 @@ optionNumericVal(tOptions* pOpts, tOptDesc* pOD )
if (*pz != NUL)
goto bad_number;
- if (pOD->fOptState & OPTST_ALLOC_ARG) {
- AGFREE(pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ if (od->fOptState & OPTST_ALLOC_ARG) {
+ AGFREE(od->optArg.argString);
+ od->fOptState &= ~OPTST_ALLOC_ARG;
}
- pOD->optArg.argInt = val;
+ od->optArg.argInt = val;
return;
bad_number:
- fprintf( stderr, zNotNumber, pOpts->pzProgName, pOD->optArg.argString );
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
- (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
+ fprintf( stderr, zNotNumber, opts->pzProgName, od->optArg.argString );
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ (*(opts->pUsageProc))(opts, EXIT_FAILURE);
errno = EINVAL;
- pOD->optArg.argInt = ~0;
+ od->optArg.argInt = ~0;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/option-value-type.c b/sntp/libopts/option-value-type.c
new file mode 100644
index 000000000000..08c003a8df5e
--- /dev/null
+++ b/sntp/libopts/option-value-type.c
@@ -0,0 +1,156 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (stdin.c)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:05 PM by AutoGen 5.18.4pre11
+ * From the definitions stdin
+ * and the template file str2enum
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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.
+ */
+#include "option-value-type.h"
+/* ANSI-C code produced by gperf version 3.0.3 */
+/* Command-line: gperf option-value-type.gp */
+/* Computed positions: -k'1' */
+
+
+
+# if 0 /* gperf build options: */
+// %struct-type
+// %language=ANSI-C
+// %includes
+// %global-table
+// %omit-struct-type
+// %readonly-tables
+// %compare-strncmp
+//
+// %define slot-name vtp_name
+// %define hash-function-name option_value_type_hash
+// %define lookup-function-name find_option_value_type_name
+// %define word-array-name option_value_type_table
+// %define initializer-suffix ,VTP_COUNT_CMD
+//
+# endif
+
+#include "option-value-type.h"
+typedef struct {
+ char const * vtp_name;
+ option_value_type_enum_t vtp_id;
+} option_value_type_map_t;
+#include <string.h>
+
+/* maximum key range = 15, duplicates = 0 */
+
+static unsigned int
+option_value_type_hash (register const char *str, register unsigned int len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 0, 18,
+ 18, 18, 18, 18, 0, 10, 18, 5, 18, 18,
+ 5, 18, 18, 18, 18, 0, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18
+ };
+ return len + asso_values[(unsigned char)str[0]];
+}
+
+static const option_value_type_map_t option_value_type_table[] =
+ {
+ {"",VTP_COUNT_CMD}, {"",VTP_COUNT_CMD},
+ {"",VTP_COUNT_CMD},
+ {"set", VTP_CMD_SET},
+ {"bool", VTP_CMD_BOOL},
+ {"",VTP_COUNT_CMD},
+ {"string", VTP_CMD_STRING},
+ {"boolean", VTP_CMD_BOOLEAN},
+ {"",VTP_COUNT_CMD},
+ {"hierarchy", VTP_CMD_HIERARCHY},
+ {"",VTP_COUNT_CMD},
+ {"nested", VTP_CMD_NESTED},
+ {"keyword", VTP_CMD_KEYWORD},
+ {"",VTP_COUNT_CMD},
+ {"set-membership", VTP_CMD_SET_MEMBERSHIP},
+ {"",VTP_COUNT_CMD}, {"",VTP_COUNT_CMD},
+ {"integer", VTP_CMD_INTEGER}
+ };
+
+static inline const option_value_type_map_t *
+find_option_value_type_name (register const char *str, register unsigned int len)
+{
+ if (len <= 14 && len >= 3)
+ {
+ register int key = (int)option_value_type_hash (str, len);
+
+ if (key <= 17 && key >= 0)
+ {
+ register const char *s = option_value_type_table[key].vtp_name;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return &option_value_type_table[key];
+ }
+ }
+ return 0;
+}
+
+/**
+ * Convert a command (keyword) to a option_value_type_enum_t enumeration value.
+ *
+ * @param[in] str a string that should start with a known key word.
+ * @param[in] len the provided length of the keyword at \a str.
+ * @returns the enumeration value.
+ * If not found, that value is VTP_INVALID_CMD.
+ */
+option_value_type_enum_t
+find_option_value_type_cmd(char const * str, size_t len)
+{
+ option_value_type_map_t const * map;
+
+ map = find_option_value_type_name(str, (unsigned int)len);
+ return (map == NULL) ? VTP_INVALID_CMD : map->vtp_id;
+}
+
+/* end of option-value-type.c */
diff --git a/sntp/libopts/option-value-type.h b/sntp/libopts/option-value-type.h
new file mode 100644
index 000000000000..23b2be9cb1d6
--- /dev/null
+++ b/sntp/libopts/option-value-type.h
@@ -0,0 +1,60 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (stdin.h)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:05 PM by AutoGen 5.18.4pre11
+ * From the definitions stdin
+ * and the template file str2enum
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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.
+ *
+ * Command/Keyword Dispatcher
+ */
+#ifndef STR2ENUM_OPTION_VALUE_TYPE_H_GUARD
+#define STR2ENUM_OPTION_VALUE_TYPE_H_GUARD 1
+#include <sys/types.h>
+#ifndef MISSING_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+typedef enum {
+ VTP_INVALID_CMD = 0,
+ VTP_CMD_STRING = 1,
+ VTP_CMD_INTEGER = 2,
+ VTP_CMD_BOOL = 3,
+ VTP_CMD_BOOLEAN = 4,
+ VTP_CMD_KEYWORD = 5,
+ VTP_CMD_SET = 6,
+ VTP_CMD_SET_MEMBERSHIP = 7,
+ VTP_CMD_NESTED = 8,
+ VTP_CMD_HIERARCHY = 9,
+ VTP_COUNT_CMD
+} option_value_type_enum_t;
+
+extern option_value_type_enum_t
+find_option_value_type_cmd(char const * str, size_t len);
+
+#endif /* STR2ENUM_OPTION_VALUE_TYPE_H_GUARD */
+/* end of option-value-type.h */
diff --git a/sntp/libopts/option-xat-attribute.c b/sntp/libopts/option-xat-attribute.c
new file mode 100644
index 000000000000..cc5f4f133c3d
--- /dev/null
+++ b/sntp/libopts/option-xat-attribute.c
@@ -0,0 +1,148 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (stdin.c)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:04 PM by AutoGen 5.18.4pre11
+ * From the definitions stdin
+ * and the template file str2enum
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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.
+ */
+#include "option-xat-attribute.h"
+/* ANSI-C code produced by gperf version 3.0.3 */
+/* Command-line: gperf option-xat-attribute.gp */
+/* Computed positions: -k'1' */
+
+
+
+# if 0 /* gperf build options: */
+// %struct-type
+// %language=ANSI-C
+// %includes
+// %global-table
+// %omit-struct-type
+// %readonly-tables
+// %compare-strncmp
+//
+// %define slot-name xat_name
+// %define hash-function-name option_xat_attribute_hash
+// %define lookup-function-name find_option_xat_attribute_name
+// %define word-array-name option_xat_attribute_table
+// %define initializer-suffix ,XAT_COUNT_CMD
+//
+# endif
+
+#include "option-xat-attribute.h"
+typedef struct {
+ char const * xat_name;
+ option_xat_attribute_enum_t xat_id;
+} option_xat_attribute_map_t;
+#include <string.h>
+
+/* maximum key range = 6, duplicates = 0 */
+
+static unsigned int
+option_xat_attribute_hash (register const char *str, register unsigned int len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10, 0,
+ 10,10,10,10,10,10,10, 5,10, 0,
+ 10,10,10,10,10,10, 0, 0,10, 0,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10,10,10,10,10,
+ 10,10,10,10,10,10
+ };
+ return len + asso_values[(unsigned char)str[0]];
+}
+
+static const option_xat_attribute_map_t option_xat_attribute_table[] =
+ {
+ {"",XAT_COUNT_CMD}, {"",XAT_COUNT_CMD},
+ {"",XAT_COUNT_CMD}, {"",XAT_COUNT_CMD},
+ {"type", XAT_CMD_TYPE},
+ {"words", XAT_CMD_WORDS},
+ {"cooked", XAT_CMD_COOKED},
+ {"members", XAT_CMD_MEMBERS},
+ {"uncooked", XAT_CMD_UNCOOKED},
+ {"keep", XAT_CMD_KEEP}
+ };
+
+static inline const option_xat_attribute_map_t *
+find_option_xat_attribute_name (register const char *str, register unsigned int len)
+{
+ if (len <= 8 && len >= 4)
+ {
+ register int key = (int)option_xat_attribute_hash (str, len);
+
+ if (key <= 9 && key >= 0)
+ {
+ register const char *s = option_xat_attribute_table[key].xat_name;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return &option_xat_attribute_table[key];
+ }
+ }
+ return 0;
+}
+
+/**
+ * Convert a command (keyword) to a option_xat_attribute_enum_t enumeration value.
+ *
+ * @param[in] str a string that should start with a known key word.
+ * @param[in] len the provided length of the keyword at \a str.
+ * @returns the enumeration value.
+ * If not found, that value is XAT_INVALID_CMD.
+ */
+option_xat_attribute_enum_t
+find_option_xat_attribute_cmd(char const * str, size_t len)
+{
+ option_xat_attribute_map_t const * map;
+
+ map = find_option_xat_attribute_name(str, (unsigned int)len);
+ return (map == NULL) ? XAT_INVALID_CMD : map->xat_id;
+}
+
+/* end of option-xat-attribute.c */
diff --git a/sntp/libopts/option-xat-attribute.h b/sntp/libopts/option-xat-attribute.h
new file mode 100644
index 000000000000..d2c19c792301
--- /dev/null
+++ b/sntp/libopts/option-xat-attribute.h
@@ -0,0 +1,57 @@
+/* -*- buffer-read-only: t -*- vi: set ro:
+ *
+ * DO NOT EDIT THIS FILE (stdin.h)
+ *
+ * It has been AutoGen-ed August 8, 2014 at 04:09:04 PM by AutoGen 5.18.4pre11
+ * From the definitions stdin
+ * and the template file str2enum
+ *
+ * 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 ``Bruce Korb'' nor the name of any other
+ * contributor may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * str2enum IS PROVIDED BY Bruce Korb ``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 Bruce Korb OR ANY OTHER 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.
+ *
+ * Command/Keyword Dispatcher
+ */
+#ifndef STR2ENUM_OPTION_XAT_ATTRIBUTE_H_GUARD
+#define STR2ENUM_OPTION_XAT_ATTRIBUTE_H_GUARD 1
+#include <sys/types.h>
+#ifndef MISSING_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+typedef enum {
+ XAT_INVALID_CMD = 0,
+ XAT_CMD_TYPE = 1,
+ XAT_CMD_WORDS = 2,
+ XAT_CMD_MEMBERS = 3,
+ XAT_CMD_COOKED = 4,
+ XAT_CMD_UNCOOKED = 5,
+ XAT_CMD_KEEP = 6,
+ XAT_COUNT_CMD
+} option_xat_attribute_enum_t;
+
+extern option_xat_attribute_enum_t
+find_option_xat_attribute_cmd(char const * str, size_t len);
+
+#endif /* STR2ENUM_OPTION_XAT_ATTRIBUTE_H_GUARD */
+/* end of option-xat-attribute.h */
diff --git a/sntp/libopts/parse-duration.c b/sntp/libopts/parse-duration.c
index 0a8c4ada8408..ff3fe4228f33 100644
--- a/sntp/libopts/parse-duration.c
+++ b/sntp/libopts/parse-duration.c
@@ -1,18 +1,18 @@
/* Parse a time duration and return a seconds count
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2014 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
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 3 of the License, or
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
@@ -27,6 +27,8 @@
#include <stdlib.h>
#include <string.h>
+#include "intprops.h"
+
#ifndef NUL
#define NUL '\0'
#endif
@@ -51,17 +53,18 @@ typedef enum {
#define SEC_PER_MONTH (SEC_PER_DAY * 30)
#define SEC_PER_YEAR (SEC_PER_DAY * 365)
-#define TIME_MAX 0x7FFFFFFF
+#undef MAX_DURATION
+#define MAX_DURATION TYPE_MAXIMUM(time_t)
/* Wrapper around strtoul that does not require a cast. */
-static unsigned long inline
+static unsigned long
str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
{
return strtoul (str, (char **)ppz, base);
}
/* Wrapper around strtol that does not require a cast. */
-static long inline
+static long
str_const_to_l (cch_t * str, cch_t ** ppz, int base)
{
return strtol (str, (char **)ppz, base);
@@ -70,7 +73,7 @@ str_const_to_l (cch_t * str, cch_t ** ppz, int base)
/* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
with errno set as an error situation, and returning BAD_TIME
with errno set in an error situation. */
-static time_t inline
+static time_t
scale_n_add (time_t base, time_t val, int scale)
{
if (base == BAD_TIME)
@@ -80,14 +83,14 @@ scale_n_add (time_t base, time_t val, int scale)
return BAD_TIME;
}
- if (val > TIME_MAX / scale)
+ if (val > MAX_DURATION / scale)
{
errno = ERANGE;
return BAD_TIME;
}
val *= scale;
- if (base > TIME_MAX - val)
+ if (base > MAX_DURATION - val)
{
errno = ERANGE;
return BAD_TIME;
diff --git a/sntp/libopts/parse-duration.h b/sntp/libopts/parse-duration.h
index 9fd2a364cdb1..da7301e1cebe 100644
--- a/sntp/libopts/parse-duration.h
+++ b/sntp/libopts/parse-duration.h
@@ -1,18 +1,18 @@
/* Parse a time duration and return a seconds count
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2014 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
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 3 of the License, or
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/*
@@ -31,7 +31,7 @@
the string may contain: NNN Y NNN M NNN W NNN d NNN h NNN m NNN s
This represents NNN years, NNN months, NNN weeks, NNN days, NNN hours,
NNN minutes and NNN seconds.
- The embeded white space is optional.
+ The embedded white space is optional.
These terms must appear in this order.
Case is significant: 'M' is months and 'm' is minutes.
The final "s" is optional.
diff --git a/sntp/libopts/pgusage.c b/sntp/libopts/pgusage.c
index 2e2194867e38..80a89a713d47 100644
--- a/sntp/libopts/pgusage.c
+++ b/sntp/libopts/pgusage.c
@@ -2,16 +2,18 @@
/**
* \file pgusage.c
*
- * Time-stamp: "2011-03-25 17:54:41 bkorb"
- *
* Automated Options Paged Usage module.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This routine will run run-on options through a pager so the
* user may examine, print or edit them at their leisure.
*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -23,19 +25,81 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
+#if defined(HAVE_WORKING_FORK)
+static FILE *
+open_tmp_usage(char ** buf)
+{
+ char * bf;
+ size_t bfsz;
+
+ {
+ unsigned int my_pid = (unsigned int)getpid();
+ char const * tmpdir = getenv(TMPDIR);
+ if (tmpdir == NULL)
+ tmpdir = tmp_dir;
+ bfsz = TMP_FILE_FMT_LEN + strlen(tmpdir) + 10;
+ bf = AGALOC(bfsz, "tmp fil");
+ snprintf(bf, bfsz, TMP_FILE_FMT, tmpdir, my_pid);
+ }
+
+ {
+ static mode_t const cmask = S_IRWXO | S_IRWXG;
+ mode_t svmsk = umask(cmask);
+ int fd = mkstemp(bf);
+ (void)umask(svmsk);
+
+ if (fd < 0) {
+ AGFREE(bf);
+ return NULL;
+ }
+ *buf = bf;
+ return fdopen(fd, "w");
+ }
+}
+
+static char *
+mk_pager_cmd(char const * fname)
+{
+ /*
+ * Page the file and remove it when done. For shell script processing,
+ * we must redirect the output to the current stderr, otherwise stdout.
+ */
+ fclose(option_usage_fp);
+ option_usage_fp = NULL;
+
+ {
+ char const * pager = (char const *)getenv(PAGER_NAME);
+ size_t bfsz;
+ char * res;
+
+ /*
+ * Use the "more(1)" program if "PAGER" has not been defined
+ */
+ if (pager == NULL)
+ pager = MORE_STR;
+
+ bfsz = strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN;
+ res = AGALOC(bfsz, "more cmd");
+ snprintf(res, bfsz, PAGE_USAGE_FMT, pager, fname);
+ AGFREE((void*)fname);
+ return res;
+ }
+}
+#endif
+
/*=export_func optionPagedUsage
* private:
*
- * what: Decipher a boolean value
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * what: emit help text and pass through a pager program.
+ * arg: + tOptions * + opts + program options descriptor +
+ * arg: + tOptDesc * + od + the descriptor for this arg +
*
* doc:
* Run the usage output through a pager.
@@ -43,16 +107,16 @@
* This is disabled on platforms without a working fork() function.
=*/
void
-optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
+optionPagedUsage(tOptions * opts, tOptDesc * od)
{
#if ! defined(HAVE_WORKING_FORK)
- if ((pOD->fOptState & OPTST_RESET) != 0)
+ if ((od->fOptState & OPTST_RESET) != 0)
return;
- (*pOptions->pUsageProc)(pOptions, EXIT_SUCCESS);
+ (*opts->pUsageProc)(opts, EXIT_SUCCESS);
#else
- static pid_t my_pid;
- char zPageUsage[ 1024 ];
+ static bool sv_print_exit = false;
+ static char * fil_name = NULL;
/*
* IF we are being called after the usage proc is done
@@ -62,25 +126,14 @@ optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
switch (pagerState) {
case PAGER_STATE_INITIAL:
{
- if ((pOD->fOptState & OPTST_RESET) != 0)
+ if ((od->fOptState & OPTST_RESET) != 0)
return;
-
- my_pid = getpid();
-#ifdef HAVE_SNPRINTF
- snprintf(zPageUsage, sizeof(zPageUsage), "/tmp/use.%lu", (tAoUL)my_pid);
-#else
- sprintf(zPageUsage, "/tmp/use.%lu", (tAoUL)my_pid);
-#endif
- unlink(zPageUsage);
-
- /*
- * Set usage output to this temporary file
- */
- option_usage_fp = fopen(zPageUsage, "w" FOPEN_BINARY_FLAG);
+ option_usage_fp = open_tmp_usage(&fil_name);
if (option_usage_fp == NULL)
- _exit(EXIT_FAILURE);
+ (*opts->pUsageProc)(opts, EXIT_SUCCESS);
- pagerState = PAGER_STATE_READY;
+ pagerState = PAGER_STATE_READY;
+ sv_print_exit = print_exit;
/*
* Set up so this routine gets called during the exit logic
@@ -89,38 +142,31 @@ optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
/*
* The usage procedure will now put the usage information into
- * the temporary file we created above.
+ * the temporary file we created above. Keep any shell commands
+ * out of the result.
*/
- (*pOptions->pUsageProc)(pOptions, EXIT_SUCCESS);
+ print_exit = false;
+ (*opts->pUsageProc)(opts, EXIT_SUCCESS);
/* NOTREACHED */
_exit(EXIT_FAILURE);
}
case PAGER_STATE_READY:
- {
- tSCC zPage[] = "%1$s /tmp/use.%2$lu ; rm -f /tmp/use.%2$lu";
- tCC* pzPager = (tCC*)getenv("PAGER");
+ fil_name = mk_pager_cmd(fil_name);
- /*
- * Use the "more(1)" program if "PAGER" has not been defined
- */
- if (pzPager == NULL)
- pzPager = "more";
+ if (sv_print_exit) {
+ fputs("\nexit 0\n", stdout);
+ fclose(stdout);
+ dup2(STDERR_FILENO, STDOUT_FILENO);
- /*
- * Page the file and remove it when done.
- */
-#ifdef HAVE_SNPRINTF
- snprintf(zPageUsage, sizeof(zPageUsage), zPage, pzPager, (tAoUL)my_pid);
-#else
- sprintf(zPageUsage, zPage, pzPager, (tAoUL)my_pid);
-#endif
- fclose(stderr);
- dup2(STDOUT_FILENO, STDERR_FILENO);
+ } else {
+ fclose(stderr);
+ dup2(STDOUT_FILENO, STDERR_FILENO);
+ }
- (void)system(zPageUsage);
- }
+ ignore_val( system( fil_name));
+ AGFREE(fil_name);
case PAGER_STATE_CHILD:
/*
@@ -131,7 +177,8 @@ optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
#endif
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/proto.h b/sntp/libopts/proto.h
index 13843c8b620c..3275ea1d0f6f 100644
--- a/sntp/libopts/proto.h
+++ b/sntp/libopts/proto.h
@@ -1,112 +1,146 @@
/* -*- buffer-read-only: t -*- vi: set ro:
*
* Prototypes for autoopts
- * Generated Fri Apr 29 15:44:06 PDT 2011
+ * Generated Fri Aug 8 16:09:18 PDT 2014
*/
#ifndef AUTOOPTS_PROTO_H_GUARD
#define AUTOOPTS_PROTO_H_GUARD 1
-#ifndef LOCAL
-# define LOCAL extern
-# define REDEF_LOCAL 1
-#else
-# undef REDEF_LOCAL
-#endif
+/*
+ * Extracted from alias.c
+ */
+static tSuccess
+too_many_occurrences(tOptions * opts, tOptDesc * od);
+
/*
* Extracted from autoopts.c
*/
-LOCAL void *
+static void *
ao_malloc(size_t sz);
-LOCAL void *
+static void *
ao_realloc(void *p, size_t sz);
-LOCAL char *
+static char *
ao_strdup(char const *str);
-LOCAL tSuccess
-handle_opt(tOptions* pOpts, tOptState* pOptState);
-
-LOCAL tSuccess
-longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState);
+static tSuccess
+handle_opt(tOptions * opts, tOptState * o_st);
-LOCAL tSuccess
-shortOptionFind(tOptions* pOpts, uint_t optValue, tOptState* pOptState);
+static tSuccess
+next_opt(tOptions * opts, tOptState * o_st);
-LOCAL tSuccess
-doImmediateOpts(tOptions* pOpts);
+static tSuccess
+regular_opts(tOptions * opts);
-LOCAL tSuccess
-doRegularOpts(tOptions* pOpts);
+/*
+ * Extracted from check.c
+ */
+static bool
+is_consistent(tOptions * pOpts);
/*
* Extracted from configfile.c
*/
-LOCAL void
-internalFileLoad(tOptions* pOpts);
+static void
+intern_file_load(tOptions * opts);
-LOCAL char*
-parseAttributes(
- tOptions* pOpts,
- char* pzText,
- tOptionLoadMode* pMode,
- tOptionValue* pType );
+static char const *
+parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
+ tOptionValue * pType);
-LOCAL tSuccess
-validateOptionsStruct(tOptions* pOpts, char const* pzProgram);
+/*
+ * Extracted from env.c
+ */
+static void
+doPrognameEnv(tOptions * pOpts, teEnvPresetType type);
+
+static void
+env_presets(tOptions * pOpts, teEnvPresetType type);
/*
- * Extracted from environment.c
+ * Extracted from find.c
*/
-LOCAL void
-doPrognameEnv(tOptions* pOpts, teEnvPresetType type);
+static tSuccess
+opt_find_long(tOptions * opts, char const * opt_name, tOptState * state);
+
+static tSuccess
+opt_find_short(tOptions* pOpts, uint_t optValue, tOptState* pOptState);
-LOCAL void
-doEnvPresets(tOptions* pOpts, teEnvPresetType type);
+static tSuccess
+get_opt_arg(tOptions * opts, tOptState * o_st);
+
+static tSuccess
+find_opt(tOptions * opts, tOptState * o_st);
+
+/*
+ * Extracted from init.c
+ */
+static tSuccess
+validate_struct(tOptions * opts, char const * pname);
+
+static tSuccess
+immediate_opts(tOptions * opts);
+
+static bool
+ao_initialize(tOptions * opts, int a_ct, char ** a_v);
/*
* Extracted from load.c
*/
-LOCAL void
-mungeString(char* pzTxt, tOptionLoadMode mode);
+static void
+munge_str(char * txt, tOptionLoadMode mode);
+
+static void
+load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
+ tDirection direction, tOptionLoadMode load_mode );
+
+/*
+ * Extracted from makeshell.c
+ */
+static noreturn void
+option_exits(int exit_code);
+
+static noreturn void
+ao_bug(char const * msg);
+
+static void
+fserr_warn(char const * prog, char const * op, char const * fname);
-LOCAL void
-loadOptionLine(
- tOptions* pOpts,
- tOptState* pOS,
- char* pzLine,
- tDirection direction,
- tOptionLoadMode load_mode );
+static noreturn void
+fserr_exit(char const * prog, char const * op, char const * fname);
/*
* Extracted from nested.c
*/
-LOCAL void
-unload_arg_list(tArgList* pAL);
+static void
+unload_arg_list(tArgList * arg_list);
-LOCAL tOptionValue*
-optionLoadNested(char const* pzTxt, char const* pzName, size_t nameLen);
+static tOptionValue *
+optionLoadNested(char const * text, char const * name, size_t nm_len);
-LOCAL int
+static int
get_special_char(char const ** ppz, int * ct);
-LOCAL void
+static void
emit_special_char(FILE * fp, int ch);
/*
* Extracted from sort.c
*/
-LOCAL void
-optionSort(tOptions* pOpts);
+static void
+optionSort(tOptions * opts);
/*
* Extracted from stack.c
*/
-LOCAL void
-addArgListEntry(void** ppAL, void* entry);
+static void
+addArgListEntry(void ** ppAL, void * entry);
+
+/*
+ * Extracted from usage.c
+ */
+static void
+set_usage_flags(tOptions * opts, char const * flg_txt);
-#ifdef REDEF_LOCAL
-# undef LOCAL
-# define LOCAL
-#endif
#endif /* AUTOOPTS_PROTO_H_GUARD */
diff --git a/sntp/libopts/putshell.c b/sntp/libopts/putshell.c
index f15284f6b996..4b0fa10a13fb 100644
--- a/sntp/libopts/putshell.c
+++ b/sntp/libopts/putshell.c
@@ -2,15 +2,17 @@
/**
* \file putshell.c
*
- * Time-stamp: "2010-09-05 06:10:56 bkorb"
- *
* This module will interpret the options set in the tOptions
* structure and print them to standard out in a fashion that
* will allow them to be interpreted by the Bourne or Korn shells.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -22,19 +24,22 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-static char const zOptValFmt[] = "%s_%s=";
-static char const zOptEnd[] = "\nexport %s_%s\n";
-static char const zOptNumFmt[] = "%1$s_%2$s=%3$d # 0x%3$X\nexport %1$s_%2$s\n";
/* = = = START-STATIC-FORWARD = = = */
+static size_t
+string_size(char const * scan, size_t nl_len);
+
+static char const *
+print_quoted_apostrophes(char const * str);
+
static void
-print_quot_str(tCC* pzStr);
+print_quot_str(char const * str);
static void
print_enumeration(tOptions * pOpts, tOptDesc * pOD);
@@ -46,21 +51,180 @@ static void
print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
static void
-print_reordering(tOptions * pOpts);
+print_reordering(tOptions * opts);
/* = = = END-STATIC-FORWARD = = = */
-/*
- * Make sure embedded single quotes come out okay. The initial quote has
- * been emitted and the closing quote will be upon return.
+/**
+ * Count the number of bytes required to represent a string as a
+ * compilable string.
+ *
+ * @param[in] scan the text to be rewritten as a C program text string.
+ * @param[in] nl_len the number of bytes used for each embedded newline.
+ *
+ * @returns the count, including the terminating NUL byte.
+ */
+static size_t
+string_size(char const * scan, size_t nl_len)
+{
+ /*
+ * Start by counting the start and end quotes, plus the NUL.
+ */
+ size_t res_ln = 3;
+
+ for (;;) {
+ char ch = *(scan++);
+ if ((ch >= ' ') && (ch <= '~')) {
+
+ /*
+ * a backslash allowance for double quotes and baskslashes
+ */
+ res_ln += ((ch == '"') || (ch == '\\')) ? 2 : 1;
+ }
+
+ /*
+ * When not a normal character, then count the characters
+ * required to represent whatever it is.
+ */
+ else switch (ch) {
+ case NUL:
+ return res_ln;
+
+ case NL:
+ res_ln += nl_len;
+ break;
+
+ case HT:
+ case BEL:
+ case BS:
+ case FF:
+ case CR:
+ case VT:
+ res_ln += 2;
+ break;
+
+ default:
+ res_ln += 4; /* text len for \xNN */
+ }
+ }
+}
+
+/*=export_func optionQuoteString
+ * private:
+ *
+ * what: Print a string as quoted text suitable for a C compiler.
+ * arg: + char const * + text + a block of text to quote +
+ * arg: + char const * + nl + line splice text +
+ *
+ * ret_type: char const *
+ * ret_desc: the allocated input string as a quoted string
+ *
+ * doc:
+ * This is for internal use by autogen and autoopts.
+ * It takes an input string and produces text the C compiler can process
+ * to produce an exact copy of the original string.
+ * The caller must deallocate the result. Standard C strings and
+ * K&R strings are distinguished by the "nl" string.
+=*/
+char const *
+optionQuoteString(char const * text, char const * nl)
+{
+ size_t nl_len = strlen(nl);
+ char * out;
+ char * res = out = AGALOC(string_size(text, nl_len), "quot str");
+ *(out++) = '"';
+
+ for (;;) {
+ unsigned char ch = (unsigned char)*text;
+ if ((ch >= ' ') && (ch <= '~')) {
+ if ((ch == '"') || (ch == '\\'))
+ /*
+ * We must escape these characters in the output string
+ */
+ *(out++) = '\\';
+ *(out++) = (char)ch;
+
+ } else switch (ch) {
+# define add_esc_ch(_ch) { *(out++) = '\\'; *(out++) = (_ch); }
+ case BEL: add_esc_ch('a'); break;
+ case BS: add_esc_ch('b'); break;
+ case HT: add_esc_ch('t'); break;
+ case VT: add_esc_ch('v'); break;
+ case FF: add_esc_ch('f'); break;
+ case CR: add_esc_ch('r'); break;
+
+ case LF:
+ /*
+ * Place contiguous new-lines on a single line.
+ * The current character is a NL, check the next one.
+ */
+ while (*++text == NL)
+ add_esc_ch('n');
+
+ /*
+ * Insert a splice before starting next line
+ */
+ if (*text != NUL) {
+ memcpy(out, nl, nl_len);
+ out += nl_len;
+
+ continue; /* text is already at the next character */
+ }
+
+ add_esc_ch('n');
+ /* FALLTHROUGH */
+
+ case NUL:
+ /*
+ * End of string. Terminate the quoted output. If necessary,
+ * deallocate the text string. Return the scan resumption point.
+ */
+ *(out++) = '"';
+ *out = NUL;
+ return res;
+
+ default:
+ /*
+ * sprintf is safe here, because we already computed
+ * the amount of space we will be using.
+ */
+ sprintf(out, MK_STR_OCT_FMT, ch);
+ out += 4;
+ }
+
+ text++;
+# undef add_esc_ch
+ }
+}
+
+/**
+ * Print out escaped apostorophes.
+ *
+ * @param[in] str the apostrophies to print
+ */
+static char const *
+print_quoted_apostrophes(char const * str)
+{
+ while (*str == APOSTROPHE) {
+ fputs(QUOT_APOS, stdout);
+ str++;
+ }
+ return str;
+}
+
+/**
+ * Print a single quote (apostrophe quoted) string.
+ * Other than somersaults for apostrophes, nothing else needs quoting.
+ *
+ * @param[in] str the string to print
*/
static void
-print_quot_str(tCC* pzStr)
+print_quot_str(char const * str)
{
/*
* Handle empty strings to make the rest of the logic simpler.
*/
- if ((pzStr == NULL) || (*pzStr == NUL)) {
- fputs("''", stdout);
+ if ((str == NULL) || (*str == NUL)) {
+ fputs(EMPTY_ARG, stdout);
return;
}
@@ -68,69 +232,66 @@ print_quot_str(tCC* pzStr)
* Emit any single quotes/apostrophes at the start of the string and
* bail if that is all we need to do.
*/
- while (*pzStr == '\'') {
- fputs("\\'", stdout);
- pzStr++;
- }
- if (*pzStr == NUL)
+ str = print_quoted_apostrophes(str);
+ if (*str == NUL)
return;
/*
* Start the single quote string
*/
- fputc('\'', stdout);
+ fputc(APOSTROPHE, stdout);
for (;;) {
- tCC* pz = strchr(pzStr, '\'');
+ char const * pz = strchr(str, APOSTROPHE);
if (pz == NULL)
break;
/*
* Emit the string up to the single quote (apostrophe) we just found.
*/
- (void)fwrite(pzStr, (size_t)(pz - pzStr), (size_t)1, stdout);
- fputc('\'', stdout);
- pzStr = pz;
+ (void)fwrite(str, (size_t)(pz - str), (size_t)1, stdout);
/*
- * Emit an escaped apostrophe for every one we find.
- * If that ends the string, do not re-open the single quotes.
+ * Close the current string, emit the apostrophes and re-open the
+ * string (IFF there is more text to print).
*/
- while (*++pzStr == '\'') fputs("\\'", stdout);
- if (*pzStr == NUL)
+ fputc(APOSTROPHE, stdout);
+ str = print_quoted_apostrophes(pz);
+ if (*str == NUL)
return;
- fputc('\'', stdout);
+ fputc(APOSTROPHE, stdout);
}
/*
* If we broke out of the loop, we must still emit the remaining text
* and then close the single quote string.
*/
- fputs(pzStr, stdout);
- fputc('\'', stdout);
+ fputs(str, stdout);
+ fputc(APOSTROPHE, stdout);
}
static void
print_enumeration(tOptions * pOpts, tOptDesc * pOD)
{
uintptr_t e_val = pOD->optArg.argEnum;
- printf(zOptValFmt, pOpts->pzPROGNAME, pOD->pz_NAME);
+ printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME);
/*
* Convert value to string, print that and restore numeric value.
*/
(*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD);
- printf("'%s'", pOD->optArg.argString);
+ printf(QUOT_ARG_FMT, pOD->optArg.argString);
if (pOD->fOptState & OPTST_ALLOC_ARG)
AGFREE(pOD->optArg.argString);
pOD->optArg.argEnum = e_val;
- printf(zOptEnd, pOpts->pzPROGNAME, pOD->pz_NAME);
+ printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME);
}
static void
print_membership(tOptions * pOpts, tOptDesc * pOD)
{
+ char const * svstr = pOD->optArg.argString;
char const * pz;
uintptr_t val = 1;
printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
@@ -138,14 +299,10 @@ print_membership(tOptions * pOpts, tOptDesc * pOD)
pOD->optCookie = (void*)(uintptr_t)~0UL;
(*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD);
- /*
- * We are building the typeset list. The list returned starts with
- * 'none + ' for use by option saving stuff. We must ignore that.
- */
- pz = pOD->optArg.argString + 7;
+ pz = pOD->optArg.argString;
while (*pz != NUL) {
- printf("typeset -x -i %s_", pOD->pz_NAME);
- while (IS_PLUS_N_SPACE_CHAR(*pz)) pz++;
+ printf("readonly %s_", pOD->pz_NAME);
+ pz = SPN_PLUS_N_SPACE_CHARS(pz);
for (;;) {
int ch = *(pz++);
@@ -155,66 +312,52 @@ print_membership(tOptions * pOpts, tOptDesc * pOD)
else if (ch == NUL) { pz--; goto name_done; }
else fputc('_', stdout);
} name_done:;
- printf("=%1$lu # 0x%1$lX\n", (unsigned long)val);
+ printf(SHOW_VAL_FMT, (unsigned long)val);
val <<= 1;
}
AGFREE(pOD->optArg.argString);
- pOD->optArg.argString = NULL;
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ pOD->optArg.argString = svstr;
}
static void
print_stacked_arg(tOptions * pOpts, tOptDesc * pOD)
{
- tSCC zOptCookieCt[] = "%1$s_%2$s_CT=%3$d\nexport %1$s_%2$s_CT\n";
-
- tArgList* pAL = (tArgList*)pOD->optCookie;
- tCC** ppz = pAL->apzArgs;
- int ct = pAL->useCt;
+ tArgList* pAL = (tArgList*)pOD->optCookie;
+ char const ** ppz = pAL->apzArgs;
+ int ct = pAL->useCt;
printf(zOptCookieCt, pOpts->pzPROGNAME, pOD->pz_NAME, ct);
while (--ct >= 0) {
- tSCC numarg_z[] = "%s_%s_%d=";
- tSCC end_z[] = "\nexport %s_%s_%d\n";
-
- printf(numarg_z, pOpts->pzPROGNAME, pOD->pz_NAME,
+ printf(ARG_BY_NUM_FMT, pOpts->pzPROGNAME, pOD->pz_NAME,
pAL->useCt - ct);
print_quot_str(*(ppz++));
- printf(end_z, pOpts->pzPROGNAME, pOD->pz_NAME,
+ printf(EXPORT_ARG_FMT, pOpts->pzPROGNAME, pOD->pz_NAME,
pAL->useCt - ct);
}
}
+/**
+ * emit the arguments as readily parsed text.
+ * The program options are set by emitting the shell "set" command.
+ *
+ * @param[in] opts the program options structure
+ */
static void
-print_reordering(tOptions * pOpts)
+print_reordering(tOptions * opts)
{
- int optIx;
-
- fputs("set --", stdout);
-
- for (optIx = pOpts->curOptIdx; optIx < pOpts->origArgCt; optIx++) {
-
- char* pzArg = pOpts->origArgVect[ optIx ];
+ unsigned int ix;
- if (strchr(pzArg, '\'') == NULL)
- printf(" '%s'", pzArg);
+ fputs(set_dash, stdout);
- else {
- fputs(" '", stdout);
- for (;;) {
- char ch = *(pzArg++);
- switch (ch) {
- case '\'': fputs("'\\''", stdout); break;
- case NUL: goto arg_done;
- default: fputc(ch, stdout); break;
- }
- } arg_done:;
- fputc('\'', stdout);
- }
+ for (ix = opts->curOptIdx;
+ ix < opts->origArgCt;
+ ix++) {
+ fputc(' ', stdout);
+ print_quot_str(opts->origArgVect[ ix ]);
}
- fputs("\nOPTION_CT=0\n", stdout);
+ fputs(init_optct, stdout);
}
/*=export_func optionPutShell
@@ -228,17 +371,13 @@ void
optionPutShell(tOptions* pOpts)
{
int optIx = 0;
- tSCC zOptCtFmt[] = "OPTION_CT=%d\nexport OPTION_CT\n";
- tSCC zOptDisabl[] = "%1$s_%2$s=%3$s\nexport %1$s_%2$s\n";
- tSCC zFullOptFmt[]= "%1$s_%2$s='%3$s'\nexport %1$s_%2$s\n";
- tSCC zEquivMode[] = "%1$s_%2$s_MODE='%3$s'\nexport %1$s_%2$s_MODE\n";
printf(zOptCtFmt, pOpts->curOptIdx-1);
do {
tOptDesc* pOD = pOpts->pOptDesc + optIx;
- if (SKIP_OPT(pOD))
+ if ((pOD->fOptState & OPTST_NO_OUTPUT_MASK) != 0)
continue;
/*
@@ -281,9 +420,8 @@ optionPutShell(tOptions* pOpts)
* The idea is that if someone defines an option to initialize
* enabled, we should tell our shell script that it is enabled.
*/
- if (UNUSED_OPT(pOD) && DISABLED_OPT(pOD)) {
+ if (UNUSED_OPT(pOD) && DISABLED_OPT(pOD))
continue;
- }
/*
* Handle stacked arguments
@@ -350,9 +488,9 @@ optionPutShell(tOptions* pOpts)
/*
* This option has a text value
*/
- printf(zOptValFmt, pOpts->pzPROGNAME, pOD->pz_NAME);
+ printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME);
print_quot_str(pOD->optArg.argString);
- printf(zOptEnd, pOpts->pzPROGNAME, pOD->pz_NAME);
+ printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME);
} while (++optIx < pOpts->presetOptCt );
@@ -363,7 +501,8 @@ optionPutShell(tOptions* pOpts)
fflush(stdout);
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/reset.c b/sntp/libopts/reset.c
index 2959db664c3a..df81cd718a4e 100644
--- a/sntp/libopts/reset.c
+++ b/sntp/libopts/reset.c
@@ -2,11 +2,15 @@
/**
* \file reset.c
*
- * Time-stamp: "2010-07-10 10:56:34 bkorb"
+ * Reset the option state to the compiled state.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -18,11 +22,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
static void
@@ -67,40 +71,41 @@ optionResetEverything(tOptions * pOpts)
* For example, --reset=foo will cause the --foo option to be reset.
=*/
void
-optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
+optionResetOpt(tOptions * pOpts, tOptDesc * pOD)
{
- static ag_bool reset_active = AG_FALSE;
+ static bool reset_active = false;
tOptState opt_state = OPTSTATE_INITIALIZER(DEFINED);
char const * pzArg = pOD->optArg.argString;
tSuccess succ;
+ if (pOpts <= OPTPROC_EMIT_LIMIT)
+ return;
+
if (reset_active)
return;
if ( (! HAS_originalOptArgArray(pOpts))
- || (pOpts->originalOptArgCookie == NULL)) {
- fputs(zResetNotConfig, stderr);
- _exit(EX_SOFTWARE);
- }
+ || (pOpts->originalOptArgCookie == NULL))
+ ao_bug(zno_reset);
if ((pzArg == NULL) || (*pzArg == NUL)) {
- fputs(zNoResetArg, stderr);
+ fprintf(stderr, zreset_arg, pOpts->pzProgName, pOD->pz_Name);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
/* NOTREACHED */
assert(0 == 1);
}
- reset_active = AG_TRUE;
+ reset_active = true;
if (pzArg[1] == NUL) {
if (*pzArg == '*') {
optionResetEverything(pOpts);
- reset_active = AG_FALSE;
+ reset_active = false;
return;
}
- succ = shortOptionFind(pOpts, (tAoUC)*pzArg, &opt_state);
+ succ = opt_find_short(pOpts, (uint8_t)*pzArg, &opt_state);
if (! SUCCESSFUL(succ)) {
fprintf(stderr, zIllOptChr, pOpts->pzProgPath, *pzArg);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
@@ -108,7 +113,7 @@ optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
assert(0 == 1);
}
} else {
- succ = longOptionFind(pOpts, (char *)pzArg, &opt_state);
+ succ = opt_find_long(pOpts, (char *)pzArg, &opt_state);
if (! SUCCESSFUL(succ)) {
fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg);
pOpts->pUsageProc(pOpts, EXIT_FAILURE);
@@ -124,9 +129,10 @@ optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
* Finally, clear the reset flag, too.
*/
optionReset(pOpts, opt_state.pOD);
- reset_active = AG_FALSE;
+ reset_active = false;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/restore.c b/sntp/libopts/restore.c
index f55f3d2499d1..f711cb3adfc1 100644
--- a/sntp/libopts/restore.c
+++ b/sntp/libopts/restore.c
@@ -2,15 +2,17 @@
/*
* \file restore.c
*
- * Time-stamp: "2010-08-22 11:04:00 bkorb"
- *
* This module's routines will save the current option state to memory
* and restore it. If saved prior to the initial optionProcess call,
* then the initial state will be restored.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -22,11 +24,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*
@@ -92,29 +94,20 @@ fixupSavedOptionArgs(tOptions* pOpts)
* Otherwise, it will always succeed.
=*/
void
-optionSaveState(tOptions* pOpts)
+optionSaveState(tOptions * pOpts)
{
- tOptions* p = (tOptions*)pOpts->pSavedState;
+ tOptions * p = (tOptions*)pOpts->pSavedState;
if (p == NULL) {
- size_t sz = sizeof(*pOpts) + (pOpts->optCt * sizeof(tOptDesc));
+ size_t sz = sizeof(*pOpts)
+ + ((size_t)pOpts->optCt * sizeof(tOptDesc));
p = AGALOC(sz, "saved option state");
- if (p == NULL) {
- tCC* pzName = pOpts->pzProgName;
- if (pzName == NULL) {
- pzName = pOpts->pzPROGNAME;
- if (pzName == NULL)
- pzName = zNil;
- }
- fprintf(stderr, zCantSave, pzName, sz);
- exit(EXIT_FAILURE);
- }
pOpts->pSavedState = p;
}
memcpy(p, pOpts, sizeof(*p));
- memcpy(p + 1, pOpts->pOptDesc, p->optCt * sizeof(tOptDesc));
+ memcpy(p + 1, pOpts->pOptDesc, (size_t)p->optCt * sizeof(tOptDesc));
fixupSavedOptionArgs(pOpts);
}
@@ -141,21 +134,21 @@ optionRestore(tOptions* pOpts)
tOptions* p = (tOptions*)pOpts->pSavedState;
if (p == NULL) {
- tCC* pzName = pOpts->pzProgName;
+ char const * pzName = pOpts->pzProgName;
if (pzName == NULL) {
pzName = pOpts->pzPROGNAME;
if (pzName == NULL)
pzName = zNil;
}
fprintf(stderr, zNoState, pzName);
- exit(EXIT_FAILURE);
+ option_exits(EXIT_FAILURE);
}
pOpts->pSavedState = NULL;
optionFree(pOpts);
memcpy(pOpts, p, sizeof(*p));
- memcpy(pOpts->pOptDesc, p+1, p->optCt * sizeof(tOptDesc));
+ memcpy(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc));
pOpts->pSavedState = p;
fixupSavedOptionArgs(pOpts);
@@ -213,13 +206,15 @@ optionFree(tOptions* pOpts)
if (pOpts->pSavedState != NULL) {
tOptions * p = (tOptions*)pOpts->pSavedState;
memcpy(pOpts, p, sizeof(*p));
- memcpy(pOpts->pOptDesc, p+1, p->optCt * sizeof(tOptDesc));
+ memcpy(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc));
AGFREE(pOpts->pSavedState);
pOpts->pSavedState = NULL;
goto free_saved_state;
}
}
-/*
+
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/save.c b/sntp/libopts/save.c
index 9c36bc83fdbf..19c4c5b8408d 100644
--- a/sntp/libopts/save.c
+++ b/sntp/libopts/save.c
@@ -2,15 +2,17 @@
/*
* \file save.c
*
- * Time-stamp: "2011-04-06 09:21:44 bkorb"
- *
* This module's routines will take the currently set options and
* store them into an ".rc" file for re-interpretation the next
* time the invoking program is run.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -22,70 +24,66 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-static char const zWarn[] = "%s WARNING: cannot save options - ";
-static char const close_xml[] = "</%s>\n";
-
/* = = = START-STATIC-FORWARD = = = */
-static tCC*
-findDirName(tOptions* pOpts, int* p_free);
+static char const *
+find_dir_name(tOptions * opts, int * p_free);
static char const *
-findFileName(tOptions * pOpts, int * p_free_name);
+find_file_name(tOptions * opts, int * p_free_name);
static void
-printEntry(
- FILE * fp,
- tOptDesc * p,
- tCC* pzLA );
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg);
static void
-print_a_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp);
+prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp);
static void
-print_a_string(FILE * fp, char const * name, char const * pz);
+prt_string(FILE * fp, char const * name, char const * pz);
static void
-printValueList(FILE * fp, char const * name, tArgList * al);
+prt_val_list(FILE * fp, char const * name, tArgList * al);
static void
-printHierarchy(FILE * fp, tOptDesc * p);
+prt_nested(FILE * fp, tOptDesc * p);
static FILE *
-openSaveFile(tOptions* pOpts);
+open_sv_file(tOptions * opts);
static void
-printNoArgOpt(FILE * fp, tOptDesc * p, tOptDesc * pOD);
+prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD);
static void
-printStringArg(FILE * fp, tOptDesc * pOD);
+prt_str_arg(FILE * fp, tOptDesc * pOD);
static void
-printEnumArg(FILE * fp, tOptDesc * pOD);
+prt_enum_arg(FILE * fp, tOptDesc * od);
static void
-printSetMemberArg(FILE * fp, tOptDesc * pOD);
+prt_set_arg(FILE * fp, tOptDesc * od);
static void
-printFileArg(FILE * fp, tOptDesc * pOD, tOptions* pOpts);
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts);
/* = = = END-STATIC-FORWARD = = = */
-static tCC*
-findDirName(tOptions* pOpts, int* p_free)
+/**
+ */
+static char const *
+find_dir_name(tOptions * opts, int * p_free)
{
- tCC* pzDir;
+ char const * pzDir;
- if ( (pOpts->specOptIdx.save_opts == NO_EQUIVALENT)
- || (pOpts->specOptIdx.save_opts == 0))
+ if ( (opts->specOptIdx.save_opts == NO_EQUIVALENT)
+ || (opts->specOptIdx.save_opts == 0))
return NULL;
- pzDir = pOpts->pOptDesc[ pOpts->specOptIdx.save_opts ].optArg.argString;
+ pzDir = opts->pOptDesc[ opts->specOptIdx.save_opts ].optArg.argString;
if ((pzDir != NULL) && (*pzDir != NUL))
return pzDir;
@@ -94,7 +92,7 @@ findDirName(tOptions* pOpts, int* p_free)
* we can stash the RC (INI) file.
*/
{
- tCC* const* papz = pOpts->papzHomeList;
+ char const * const* papz = opts->papzHomeList;
if (papz == NULL)
return NULL;
@@ -109,9 +107,9 @@ findDirName(tOptions* pOpts, int* p_free)
return pzDir;
{
- tCC* pzEndDir = strchr(++pzDir, DIRCH);
- char* pzFileName;
- char* pzEnv;
+ char const * pzEndDir = strchr(++pzDir, DIRCH);
+ char * pzFileName;
+ char * pzEnv;
if (pzEndDir != NULL) {
char z[ AO_NAME_SIZE ];
@@ -130,7 +128,7 @@ findDirName(tOptions* pOpts, int* p_free)
}
if (pzEnv == NULL) {
- fprintf(stderr, zWarn, pOpts->pzProgName);
+ fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNotDef, pzDir);
return NULL;
}
@@ -140,7 +138,7 @@ findDirName(tOptions* pOpts, int* p_free)
{
size_t sz = strlen(pzEnv) + strlen(pzEndDir) + 2;
- pzFileName = (char*)AGALOC(sz, "dir name");
+ pzFileName = (char *)AGALOC(sz, "dir name");
}
if (pzFileName == NULL)
@@ -156,14 +154,15 @@ findDirName(tOptions* pOpts, int* p_free)
}
}
-
+/**
+ */
static char const *
-findFileName(tOptions * pOpts, int * p_free_name)
+find_file_name(tOptions * opts, int * p_free_name)
{
struct stat stBuf;
int free_dir_name = 0;
- char const * pzDir = findDirName(pOpts, &free_dir_name);
+ char const * pzDir = find_dir_name(opts, &free_dir_name);
if (pzDir == NULL)
return NULL;
@@ -181,7 +180,7 @@ findFileName(tOptions * pOpts, int * p_free_name)
*/
if (errno != ENOENT) {
bogus_name:
- fprintf(stderr, zWarn, pOpts->pzProgName);
+ fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno), pzDir);
if (free_dir_name)
AGFREE((void*)pzDir);
@@ -198,7 +197,7 @@ findFileName(tOptions * pOpts, int * p_free_name)
break; /* found directory -- viz., "." */
}
- if ((dirchp - pzDir) >= sizeof(z))
+ if ((size_t)(dirchp - pzDir) >= sizeof(z))
goto bogus_name;
memcpy(z, pzDir, (size_t)(dirchp - pzDir));
@@ -207,21 +206,21 @@ findFileName(tOptions * pOpts, int * p_free_name)
if ((stat(z, &stBuf) != 0) || ! S_ISDIR(stBuf.st_mode))
goto bogus_name;
stBuf.st_mode = S_IFREG; /* file within this directory */
- } while (0);
+ } while (false);
/*
* IF what we found was a directory,
* THEN tack on the config file name
*/
if (S_ISDIR(stBuf.st_mode)) {
- size_t sz = strlen(pzDir) + strlen(pOpts->pzRcName) + 2;
+ size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2;
{
- char* pzPath = (char*)AGALOC(sz, "file name");
+ char * pzPath = (char*)AGALOC(sz, "file name");
#ifdef HAVE_SNPRINTF
- snprintf(pzPath, sz, "%s/%s", pzDir, pOpts->pzRcName);
+ snprintf(pzPath, sz, "%s/%s", pzDir, opts->pzRcName);
#else
- sprintf(pzPath, "%s/%s", pzDir, pOpts->pzRcName);
+ sprintf(pzPath, "%s/%s", pzDir, opts->pzRcName);
#endif
if (free_dir_name)
AGFREE((void*)pzDir);
@@ -235,7 +234,7 @@ findFileName(tOptions * pOpts, int * p_free_name)
*/
if (stat(pzDir, &stBuf) != 0) {
if (errno != ENOENT) {
- fprintf(stderr, zWarn, pOpts->pzProgName);
+ fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoStat, errno, strerror(errno),
pzDir);
AGFREE((void*)pzDir);
@@ -254,8 +253,7 @@ findFileName(tOptions * pOpts, int * p_free_name)
* or will soon be a file.
*/
if (! S_ISREG(stBuf.st_mode)) {
- fprintf(stderr, zWarn, pOpts->pzProgName);
- fprintf(stderr, zNotFile, pzDir);
+ fprintf(stderr, zsave_warn, opts->pzProgName, pzDir);
if (free_dir_name)
AGFREE((void*)pzDir);
return NULL;
@@ -269,13 +267,18 @@ findFileName(tOptions * pOpts, int * p_free_name)
return pzDir;
}
-
+/**
+ * print one option entry to the save file.
+ *
+ * @param[in] fp the file pointer for the save file
+ * @param[in] od the option descriptor to print
+ * @param[in] l_arg the last argument for the option
+ */
static void
-printEntry(
- FILE * fp,
- tOptDesc * p,
- tCC* pzLA )
+prt_entry(FILE * fp, tOptDesc * od, char const * l_arg)
{
+ int space_ct;
+
/*
* There is an argument. Pad the name so values line up.
* Not disabled *OR* this got equivalenced to another opt,
@@ -283,86 +286,84 @@ printEntry(
* Otherwise, there must be a disablement name.
*/
{
- char const * pz;
- if (! DISABLED_OPT(p) || (p->optEquivIndex != NO_EQUIVALENT))
- pz = p->pz_Name;
- else
- pz = p->pz_DisableName;
-
- fprintf(fp, "%-18s", pz);
+ char const * pz =
+ (! DISABLED_OPT(od) || (od->optEquivIndex != NO_EQUIVALENT))
+ ? od->pz_Name
+ : od->pz_DisableName;
+ space_ct = 17 - strlen(pz);
+ fputs(pz, fp);
}
+
+ if ( (l_arg == NULL)
+ && (OPTST_GET_ARGTYPE(od->fOptState) != OPARG_TYPE_NUMERIC))
+ goto end_entry;
+
+ fputs(" = ", fp);
+ while (space_ct-- > 0) fputc(' ', fp);
+
/*
* IF the option is numeric only,
* THEN the char pointer is really the number
*/
- if (OPTST_GET_ARGTYPE(p->fOptState) == OPARG_TYPE_NUMERIC)
- fprintf(fp, " %d\n", (int)(t_word)pzLA);
-
- /*
- * OTHERWISE, FOR each line of the value text, ...
- */
- else if (pzLA == NULL)
- fputc('\n', fp);
+ if (OPTST_GET_ARGTYPE(od->fOptState) == OPARG_TYPE_NUMERIC)
+ fprintf(fp, "%d", (int)(t_word)l_arg);
else {
- fputc(' ', fp); fputc(' ', fp);
for (;;) {
- tCC* pzNl = strchr(pzLA, '\n');
+ char const * eol = strchr(l_arg, NL);
/*
* IF this is the last line
* THEN bail and print it
*/
- if (pzNl == NULL)
+ if (eol == NULL)
break;
/*
* Print the continuation and the text from the current line
*/
- (void)fwrite(pzLA, (size_t)(pzNl - pzLA), (size_t)1, fp);
- pzLA = pzNl+1; /* advance the Last Arg pointer */
+ (void)fwrite(l_arg, (size_t)(eol - l_arg), (size_t)1, fp);
+ l_arg = eol+1; /* advance the Last Arg pointer */
fputs("\\\n", fp);
}
/*
* Terminate the entry
*/
- fputs(pzLA, fp);
- fputc('\n', fp);
+ fputs(l_arg, fp);
}
-}
+end_entry:
+ fputc(NL, fp);
+}
+/**
+ */
static void
-print_a_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
+prt_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
{
- static char const bool_atr[] = "<%1$s type=boolean>%2$s</%1$s>\n";
- static char const numb_atr[] = "<%1$s type=integer>0x%2$lX</%1$s>\n";
- static char const type_atr[] = "<%s type=%s>";
- static char const null_atr[] = "<%s/>\n";
-
while (--depth >= 0)
putc(' ', fp), putc(' ', fp);
switch (ovp->valType) {
default:
case OPARG_TYPE_NONE:
- fprintf(fp, null_atr, ovp->pzName);
+ fprintf(fp, NULL_ATR_FMT, ovp->pzName);
break;
case OPARG_TYPE_STRING:
- print_a_string(fp, ovp->pzName, ovp->v.strVal);
+ prt_string(fp, ovp->pzName, ovp->v.strVal);
break;
case OPARG_TYPE_ENUMERATION:
case OPARG_TYPE_MEMBERSHIP:
if (pOD != NULL) {
- tAoUI opt_state = pOD->fOptState;
+ uint32_t opt_state = pOD->fOptState;
uintptr_t val = pOD->optArg.argEnum;
char const * typ = (ovp->valType == OPARG_TYPE_ENUMERATION)
? "keyword" : "set-membership";
- fprintf(fp, type_atr, ovp->pzName, typ);
+ fprintf(fp, TYPE_ATR_FMT, ovp->pzName, typ);
/*
* This is a magic incantation that will convert the
@@ -382,33 +383,32 @@ print_a_value(FILE * fp, int depth, tOptDesc * pOD, tOptionValue const * ovp)
pOD->optArg.argEnum = val;
pOD->fOptState = opt_state;
- fprintf(fp, close_xml, ovp->pzName);
+ fprintf(fp, END_XML_FMT, ovp->pzName);
break;
}
/* FALLTHROUGH */
case OPARG_TYPE_NUMERIC:
- fprintf(fp, numb_atr, ovp->pzName, ovp->v.longVal);
+ fprintf(fp, NUMB_ATR_FMT, ovp->pzName, ovp->v.longVal);
break;
case OPARG_TYPE_BOOLEAN:
- fprintf(fp, bool_atr, ovp->pzName,
+ fprintf(fp, BOOL_ATR_FMT, ovp->pzName,
ovp->v.boolVal ? "true" : "false");
break;
case OPARG_TYPE_HIERARCHY:
- printValueList(fp, ovp->pzName, ovp->v.nestVal);
+ prt_val_list(fp, ovp->pzName, ovp->v.nestVal);
break;
}
}
-
+/**
+ */
static void
-print_a_string(FILE * fp, char const * name, char const * pz)
+prt_string(FILE * fp, char const * name, char const * pz)
{
- static char const open_atr[] = "<%s>";
-
- fprintf(fp, open_atr, name);
+ fprintf(fp, OPEN_XML_FMT, name);
for (;;) {
int ch = ((int)*(pz++)) & 0xFF;
@@ -436,12 +436,13 @@ print_a_string(FILE * fp, char const * name, char const * pz)
putc(ch, fp);
}
} string_done:;
- fprintf(fp, close_xml, name);
+ fprintf(fp, END_XML_FMT, name);
}
-
+/**
+ */
static void
-printValueList(FILE * fp, char const * name, tArgList * al)
+prt_val_list(FILE * fp, char const * name, tArgList * al)
{
static int depth = 1;
@@ -455,17 +456,17 @@ printValueList(FILE * fp, char const * name, tArgList * al)
opt_list = (void **)al->apzArgs;
if (opt_ct <= 0) {
- fprintf(fp, "<%s/>\n", name);
+ fprintf(fp, OPEN_CLOSE_FMT, name);
return;
}
- fprintf(fp, "<%s type=nested>\n", name);
+ fprintf(fp, NESTED_OPT_FMT, name);
depth++;
while (--opt_ct >= 0) {
tOptionValue const * ovp = *(opt_list++);
- print_a_value(fp, depth, NULL, ovp);
+ prt_value(fp, depth, NULL, ovp);
}
depth--;
@@ -474,9 +475,10 @@ printValueList(FILE * fp, char const * name, tArgList * al)
fprintf(fp, "</%s>\n", name);
}
-
+/**
+ */
static void
-printHierarchy(FILE * fp, tOptDesc * p)
+prt_nested(FILE * fp, tOptDesc * p)
{
int opt_ct;
tArgList * al = p->optCookie;
@@ -498,10 +500,10 @@ printHierarchy(FILE * fp, tOptDesc * p)
if (ovp == NULL)
continue;
- fprintf(fp, "<%s type=nested>\n", p->pz_Name);
+ fprintf(fp, NESTED_OPT_FMT, p->pz_Name);
do {
- print_a_value(fp, 1, p, ovp);
+ prt_value(fp, 1, p, ovp);
} while (ovp = optionNextValue(base, ovp),
ovp != NULL);
@@ -510,21 +512,26 @@ printHierarchy(FILE * fp, tOptDesc * p)
} while (--opt_ct > 0);
}
-
+/**
+ * open the file for saving option state.
+ *
+ * @param[in] opts the program options structure
+ * @returns the open file pointer. It may be NULL.
+ */
static FILE *
-openSaveFile(tOptions* pOpts)
+open_sv_file(tOptions * opts)
{
- FILE* fp;
+ FILE * fp;
{
int free_name = 0;
- tCC* pzFName = findFileName(pOpts, &free_name);
+ char const * pzFName = find_file_name(opts, &free_name);
if (pzFName == NULL)
return NULL;
fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG);
if (fp == NULL) {
- fprintf(stderr, zWarn, pOpts->pzProgName);
+ fprintf(stderr, zsave_warn, opts->pzProgName);
fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName);
if (free_name)
AGFREE((void*) pzFName );
@@ -535,32 +542,35 @@ openSaveFile(tOptions* pOpts)
AGFREE((void*)pzFName);
}
+ fputs("# ", fp);
{
- char const* pz = pOpts->pzUsageTitle;
- fputs("# ", fp);
- do { fputc(*pz, fp); } while (*(pz++) != '\n');
+ char const * e = strchr(opts->pzUsageTitle, NL);
+ if (e++ != NULL)
+ fwrite(opts->pzUsageTitle, 1, e - opts->pzUsageTitle, fp);
}
{
- time_t timeVal = time(NULL);
- char* pzTime = ctime(&timeVal);
+ time_t cur_time = time(NULL);
+ char * time_str = ctime(&cur_time);
- fprintf(fp, zPresetFile, pzTime);
+ fprintf(fp, zPresetFile, time_str);
#ifdef HAVE_ALLOCATED_CTIME
/*
* The return values for ctime(), localtime(), and gmtime()
* normally point to static data that is overwritten by each call.
* The test to detect allocated ctime, so we leak the memory.
*/
- AGFREE((void*)pzTime);
+ AGFREE((void*)time_str);
#endif
}
return fp;
}
+/**
+ */
static void
-printNoArgOpt(FILE * fp, tOptDesc * p, tOptDesc * pOD)
+prt_no_arg_opt(FILE * fp, tOptDesc * p, tOptDesc * pOD)
{
/*
* The aliased to argument indicates whether or not the option
@@ -580,13 +590,15 @@ printNoArgOpt(FILE * fp, tOptDesc * p, tOptDesc * pOD)
fprintf(fp, "%s\n", pznm);
}
+/**
+ */
static void
-printStringArg(FILE * fp, tOptDesc * pOD)
+prt_str_arg(FILE * fp, tOptDesc * pOD)
{
if (pOD->fOptState & OPTST_STACKED) {
- tArgList* pAL = (tArgList*)pOD->optCookie;
+ tArgList * pAL = (tArgList*)pOD->optCookie;
int uct = pAL->useCt;
- tCC** ppz = pAL->apzArgs;
+ char const ** ppz = pAL->apzArgs;
/*
* un-disable multiple copies of disabled options.
@@ -595,77 +607,89 @@ printStringArg(FILE * fp, tOptDesc * pOD)
pOD->fOptState &= ~OPTST_DISABLED;
while (uct-- > 0)
- printEntry(fp, pOD, *(ppz++));
+ prt_entry(fp, pOD, *(ppz++));
} else {
- printEntry(fp, pOD, pOD->optArg.argString);
+ prt_entry(fp, pOD, pOD->optArg.argString);
}
}
+/**
+ * print the string value of an enumeration.
+ *
+ * @param[in] fp the file pointer to write to
+ * @param[in] od the option descriptor with the enumerated value
+ */
static void
-printEnumArg(FILE * fp, tOptDesc * pOD)
+prt_enum_arg(FILE * fp, tOptDesc * od)
{
- uintptr_t val = pOD->optArg.argEnum;
+ uintptr_t val = od->optArg.argEnum;
/*
* This is a magic incantation that will convert the
* bit flag values back into a string suitable for printing.
*/
- (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD);
- printEntry(fp, pOD, (void*)(pOD->optArg.argString));
+ (*(od->pOptProc))(OPTPROC_RETURN_VALNAME, od);
+ prt_entry(fp, od, (void*)(od->optArg.argString));
- pOD->optArg.argEnum = val;
+ od->optArg.argEnum = val;
}
+/**
+ * Print the bits set in a bit mask option.
+ * We call the option handling function with a magic value for
+ * the options pointer and it allocates and fills in the string.
+ * We print that with a call to prt_entry().
+ *
+ * @param[in] fp the file pointer to write to
+ * @param[in] od the option descriptor with a bit mask value type
+ */
static void
-printSetMemberArg(FILE * fp, tOptDesc * pOD)
+prt_set_arg(FILE * fp, tOptDesc * od)
{
- uintptr_t val = pOD->optArg.argEnum;
-
- /*
- * This is a magic incantation that will convert the
- * bit flag values back into a string suitable for printing.
- */
- (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD);
- printEntry(fp, pOD, (void*)(pOD->optArg.argString));
-
- if (pOD->optArg.argString != NULL) {
- /*
- * set membership strings get allocated
- */
- AGFREE((void*)pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
- }
-
- pOD->optArg.argEnum = val;
+ char * list = optionMemberList(od);
+ size_t len = strlen(list);
+ char * buf = (char *)AGALOC(len + 3, "dir name");
+ *buf= '=';
+ memcpy(buf+1, list, len + 1);
+ prt_entry(fp, od, buf);
+ AGFREE(buf);
+ AGFREE(list);
}
+/**
+ * figure out what the option file name argument is.
+ * If one can be found, call prt_entry() to emit it.
+ *
+ * @param[in] fp the file pointer to write to.
+ * @param[in] od the option descriptor with a bit mask value type
+ * @param[in] opts the program options descriptor
+ */
static void
-printFileArg(FILE * fp, tOptDesc * pOD, tOptions* pOpts)
+prt_file_arg(FILE * fp, tOptDesc * od, tOptions * opts)
{
/*
* If the cookie is not NULL, then it has the file name, period.
* Otherwise, if we have a non-NULL string argument, then....
*/
- if (pOD->optCookie != NULL)
- printEntry(fp, pOD, pOD->optCookie);
+ if (od->optCookie != NULL)
+ prt_entry(fp, od, od->optCookie);
- else if (HAS_originalOptArgArray(pOpts)) {
+ else if (HAS_originalOptArgArray(opts)) {
char const * orig =
- pOpts->originalOptArgArray[pOD->optIndex].argString;
+ opts->originalOptArgArray[od->optIndex].argString;
- if (pOD->optArg.argString == orig)
+ if (od->optArg.argString == orig)
return;
- printEntry(fp, pOD, pOD->optArg.argString);
+ prt_entry(fp, od, od->optArg.argString);
}
}
-
/*=export_func optionSaveFile
*
* what: saves the option state to a file
*
- * arg: tOptions*, pOpts, program options descriptor
+ * arg: tOptions*, opts, program options descriptor
*
* doc:
*
@@ -691,11 +715,11 @@ printFileArg(FILE * fp, tOptDesc * pOD, tOptions* pOpts)
* will be printed to @code{stderr} and the routine will return.
=*/
void
-optionSaveFile(tOptions* pOpts)
+optionSaveFile(tOptions * opts)
{
- tOptDesc* pOD;
- int ct;
- FILE* fp = openSaveFile(pOpts);
+ tOptDesc * od;
+ int ct;
+ FILE * fp = open_sv_file(opts);
if (fp == NULL)
return;
@@ -703,10 +727,10 @@ optionSaveFile(tOptions* pOpts)
/*
* FOR each of the defined options, ...
*/
- ct = pOpts->presetOptCt;
- pOD = pOpts->pOptDesc;
+ ct = opts->presetOptCt;
+ od = opts->pOptDesc;
do {
- tOptDesc* p;
+ tOptDesc * p;
/*
* IF the option has not been defined
@@ -717,14 +741,14 @@ optionSaveFile(tOptions* pOpts)
* Equivalenced options get picked up when the equivalenced-to
* option is processed.
*/
- if (UNUSED_OPT(pOD))
+ if (UNUSED_OPT(od))
continue;
- if ((pOD->fOptState & OPTST_DO_NOT_SAVE_MASK) != 0)
+ if ((od->fOptState & OPTST_DO_NOT_SAVE_MASK) != 0)
continue;
- if ( (pOD->optEquivIndex != NO_EQUIVALENT)
- && (pOD->optEquivIndex != pOD->optIndex))
+ if ( (od->optEquivIndex != NO_EQUIVALENT)
+ && (od->optEquivIndex != od->optIndex))
continue;
/*
@@ -732,50 +756,51 @@ optionSaveFile(tOptions* pOpts)
* but the actual option argument type comes from the original
* option descriptor. Be careful!
*/
- p = ((pOD->fOptState & OPTST_EQUIVALENCE) != 0)
- ? (pOpts->pOptDesc + pOD->optActualIndex) : pOD;
+ p = ((od->fOptState & OPTST_EQUIVALENCE) != 0)
+ ? (opts->pOptDesc + od->optActualIndex) : od;
- switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_NONE:
- printNoArgOpt(fp, p, pOD);
+ prt_no_arg_opt(fp, p, od);
break;
case OPARG_TYPE_NUMERIC:
- printEntry(fp, p, (void*)(p->optArg.argInt));
+ prt_entry(fp, p, (void*)(p->optArg.argInt));
break;
case OPARG_TYPE_STRING:
- printStringArg(fp, p);
+ prt_str_arg(fp, p);
break;
case OPARG_TYPE_ENUMERATION:
- printEnumArg(fp, p);
+ prt_enum_arg(fp, p);
break;
case OPARG_TYPE_MEMBERSHIP:
- printSetMemberArg(fp, p);
+ prt_set_arg(fp, p);
break;
case OPARG_TYPE_BOOLEAN:
- printEntry(fp, p, p->optArg.argBool ? "true" : "false");
+ prt_entry(fp, p, p->optArg.argBool ? "true" : "false");
break;
case OPARG_TYPE_HIERARCHY:
- printHierarchy(fp, p);
+ prt_nested(fp, p);
break;
case OPARG_TYPE_FILE:
- printFileArg(fp, p, pOpts);
+ prt_file_arg(fp, p, opts);
break;
default:
break; /* cannot handle - skip it */
}
- } while (pOD++, (--ct > 0));
+ } while (od++, (--ct > 0));
fclose(fp);
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/sort.c b/sntp/libopts/sort.c
index 6291db1cc6ca..894d0ecf58eb 100644
--- a/sntp/libopts/sort.c
+++ b/sntp/libopts/sort.c
@@ -2,13 +2,15 @@
/*
* \file sort.c
*
- * Time-stamp: "2010-07-17 10:34:15 bkorb"
- *
* This module implements argument sorting.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -20,35 +22,35 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/* = = = START-STATIC-FORWARD = = = */
static tSuccess
-mustHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx);
+must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
static tSuccess
-mayHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx);
+maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
static tSuccess
-checkShortOpts(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx);
+short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx);
/* = = = END-STATIC-FORWARD = = = */
/*
- * "mustHandleArg" and "mayHandleArg" are really similar. The biggest
+ * "must_arg" and "maybe_arg" are really similar. The biggest
* difference is that "may" will consume the next argument only if it
* does not start with a hyphen and "must" will consume it, hyphen or not.
*/
static tSuccess
-mustHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx)
+must_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx)
{
/*
* An option argument is required. Long options can either have
@@ -61,7 +63,7 @@ mustHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
* See if an arg string follows the flag character. If not,
* the next arg must be the option argument.
*/
- if (*pzArg != NUL)
+ if (*arg_txt != NUL)
return SUCCESS;
break;
@@ -77,16 +79,16 @@ mustHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
default:
return FAILURE;
}
- if (pOpts->curOptIdx >= pOpts->origArgCt)
+ if (opts->curOptIdx >= opts->origArgCt)
return FAILURE;
- ppzOpts[ (*pOptsIdx)++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ opt_txt[ (*opt_idx)++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
return SUCCESS;
}
static tSuccess
-mayHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx)
+maybe_arg(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx)
{
/*
* An option argument is optional.
@@ -98,7 +100,7 @@ mayHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
* THEN see if there is another argument. If so and if it
* does *NOT* start with a hyphen, then it is the option arg.
*/
- if (*pzArg != NUL)
+ if (*arg_txt != NUL)
return SUCCESS;
break;
@@ -114,12 +116,12 @@ mayHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
default:
return FAILURE;
}
- if (pOpts->curOptIdx >= pOpts->origArgCt)
+ if (opts->curOptIdx >= opts->origArgCt)
return PROBLEM;
- pzArg = pOpts->origArgVect[ pOpts->curOptIdx ];
- if (*pzArg != '-')
- ppzOpts[ (*pOptsIdx)++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ arg_txt = opts->origArgVect[ opts->curOptIdx ];
+ if (*arg_txt != '-')
+ opt_txt[ (*opt_idx)++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
return SUCCESS;
}
@@ -128,31 +130,31 @@ mayHandleArg(tOptions* pOpts, char* pzArg, tOptState* pOS,
* does or may take an argument, the do the argument processing and leave.
*/
static tSuccess
-checkShortOpts(tOptions* pOpts, char* pzArg, tOptState* pOS,
- char** ppzOpts, int* pOptsIdx)
+short_opt_ck(tOptions * opts, char * arg_txt, tOptState * pOS,
+ char ** opt_txt, uint32_t * opt_idx)
{
- while (*pzArg != NUL) {
- if (FAILED(shortOptionFind(pOpts, (tAoUC)*pzArg, pOS)))
+ while (*arg_txt != NUL) {
+ if (FAILED(opt_find_short(opts, (uint8_t)*arg_txt, pOS)))
return FAILURE;
/*
* See if we can have an arg.
*/
if (OPTST_GET_ARGTYPE(pOS->pOD->fOptState) == OPARG_TYPE_NONE) {
- pzArg++;
+ arg_txt++;
} else if (pOS->pOD->fOptState & OPTST_ARG_OPTIONAL) {
/*
* Take an argument if it is not attached and it does not
* start with a hyphen.
*/
- if (pzArg[1] != NUL)
+ if (arg_txt[1] != NUL)
return SUCCESS;
- pzArg = pOpts->origArgVect[ pOpts->curOptIdx ];
- if (*pzArg != '-')
- ppzOpts[ (*pOptsIdx)++ ] =
- pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ arg_txt = opts->origArgVect[ opts->curOptIdx ];
+ if (*arg_txt != '-')
+ opt_txt[ (*opt_idx)++ ] =
+ opts->origArgVect[ (opts->curOptIdx)++ ];
return SUCCESS;
} else {
@@ -160,11 +162,11 @@ checkShortOpts(tOptions* pOpts, char* pzArg, tOptState* pOS,
* IF we need another argument, be sure it is there and
* take it.
*/
- if (pzArg[1] == NUL) {
- if (pOpts->curOptIdx >= pOpts->origArgCt)
+ if (arg_txt[1] == NUL) {
+ if (opts->curOptIdx >= opts->origArgCt)
return FAILURE;
- ppzOpts[ (*pOptsIdx)++ ] =
- pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ opt_txt[ (*opt_idx)++ ] =
+ opts->origArgVect[ (opts->curOptIdx)++ ];
}
return SUCCESS;
}
@@ -177,12 +179,12 @@ checkShortOpts(tOptions* pOpts, char* pzArg, tOptState* pOS,
* then this routine will to the trick.
*/
LOCAL void
-optionSort(tOptions* pOpts)
+optionSort(tOptions * opts)
{
- char** ppzOpts;
- char** ppzOpds;
- int optsIdx = 0;
- int opdsIdx = 0;
+ char ** opt_txt;
+ char ** ppzOpds;
+ uint32_t optsIdx = 0;
+ uint32_t opdsIdx = 0;
tOptState os = OPTSTATE_INITIALIZER(DEFINED);
@@ -190,24 +192,24 @@ optionSort(tOptions* pOpts)
* Disable for POSIX conformance, or if there are no operands.
*/
if ( (getenv("POSIXLY_CORRECT") != NULL)
- || NAMED_OPTS(pOpts))
+ || NAMED_OPTS(opts))
return;
/*
* Make sure we can allocate two full-sized arg vectors.
*/
- ppzOpts = malloc(pOpts->origArgCt * sizeof(char*));
- if (ppzOpts == NULL)
+ opt_txt = malloc(opts->origArgCt * sizeof(char*));
+ if (opt_txt == NULL)
goto exit_no_mem;
- ppzOpds = malloc(pOpts->origArgCt * sizeof(char*));
+ ppzOpds = malloc(opts->origArgCt * sizeof(char*));
if (ppzOpds == NULL) {
- free(ppzOpts);
+ free(opt_txt);
goto exit_no_mem;
}
- pOpts->curOptIdx = 1;
- pOpts->pzCurOpt = NULL;
+ opts->curOptIdx = 1;
+ opts->pzCurOpt = NULL;
/*
* Now, process all the options from our current position onward.
@@ -215,30 +217,30 @@ optionSort(tOptions* pOpts)
* non-standard programs that require it.)
*/
for (;;) {
- char* pzArg;
+ char * arg_txt;
tSuccess res;
/*
* If we're out of arguments, we're done. Join the option and
* operand lists into the original argument vector.
*/
- if (pOpts->curOptIdx >= pOpts->origArgCt) {
+ if (opts->curOptIdx >= opts->origArgCt) {
errno = 0;
goto joinLists;
}
- pzArg = pOpts->origArgVect[ pOpts->curOptIdx ];
- if (*pzArg != '-') {
- ppzOpds[ opdsIdx++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ arg_txt = opts->origArgVect[ opts->curOptIdx ];
+ if (*arg_txt != '-') {
+ ppzOpds[ opdsIdx++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
continue;
}
- switch (pzArg[1]) {
+ switch (arg_txt[1]) {
case NUL:
/*
* A single hyphen is an operand.
*/
- ppzOpds[ opdsIdx++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ ppzOpds[ opdsIdx++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
continue;
case '-':
@@ -246,12 +248,12 @@ optionSort(tOptions* pOpts)
* Two consecutive hypens. Put them on the options list and then
* _always_ force the remainder of the arguments to be operands.
*/
- if (pzArg[2] == NUL) {
- ppzOpts[ optsIdx++ ] =
- pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ if (arg_txt[2] == NUL) {
+ opt_txt[ optsIdx++ ] =
+ opts->origArgVect[ (opts->curOptIdx)++ ];
goto restOperands;
}
- res = longOptionFind(pOpts, pzArg+2, &os);
+ res = opt_find_long(opts, arg_txt+2, &os);
break;
default:
@@ -260,10 +262,10 @@ optionSort(tOptions* pOpts)
* option processing. Otherwise the character must be a
* short (i.e. single character) option.
*/
- if ((pOpts->fOptSet & OPTPROC_SHORTOPT) == 0) {
- res = longOptionFind(pOpts, pzArg+1, &os);
+ if ((opts->fOptSet & OPTPROC_SHORTOPT) == 0) {
+ res = opt_find_long(opts, arg_txt+1, &os);
} else {
- res = shortOptionFind(pOpts, (tAoUC)pzArg[1], &os);
+ res = opt_find_short(opts, (uint8_t)arg_txt[1], &os);
}
break;
}
@@ -277,7 +279,7 @@ optionSort(tOptions* pOpts)
* Next, we have to see if we need to pull another argument to be
* used as the option argument.
*/
- ppzOpts[ optsIdx++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ opt_txt[ optsIdx++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
if (OPTST_GET_ARGTYPE(os.pOD->fOptState) == OPARG_TYPE_NONE) {
/*
@@ -286,20 +288,20 @@ optionSort(tOptions* pOpts)
* of the argument string.
*/
if ( (os.optType == TOPT_SHORT)
- && FAILED(checkShortOpts(pOpts, pzArg+2, &os, ppzOpts,
- &optsIdx)) ) {
+ && FAILED(short_opt_ck(opts, arg_txt+2, &os, opt_txt,
+ &optsIdx)) ) {
errno = EINVAL;
goto freeTemps;
}
} else if (os.pOD->fOptState & OPTST_ARG_OPTIONAL) {
- switch (mayHandleArg(pOpts, pzArg+2, &os, ppzOpts, &optsIdx)) {
+ switch (maybe_arg(opts, arg_txt+2, &os, opt_txt, &optsIdx)) {
case FAILURE: errno = EIO; goto freeTemps;
case PROBLEM: errno = 0; goto joinLists;
}
} else {
- switch (mustHandleArg(pOpts, pzArg+2, &os, ppzOpts, &optsIdx)) {
+ switch (must_arg(opts, arg_txt+2, &os, opt_txt, &optsIdx)) {
case PROBLEM:
case FAILURE: errno = EIO; goto freeTemps;
}
@@ -307,18 +309,19 @@ optionSort(tOptions* pOpts)
} /* for (;;) */
restOperands:
- while (pOpts->curOptIdx < pOpts->origArgCt)
- ppzOpds[ opdsIdx++ ] = pOpts->origArgVect[ (pOpts->curOptIdx)++ ];
+ while (opts->curOptIdx < opts->origArgCt)
+ ppzOpds[ opdsIdx++ ] = opts->origArgVect[ (opts->curOptIdx)++ ];
joinLists:
if (optsIdx > 0)
- memcpy(pOpts->origArgVect + 1, ppzOpts, optsIdx * sizeof(char*));
+ memcpy(opts->origArgVect + 1, opt_txt,
+ (size_t)optsIdx * sizeof(char*));
if (opdsIdx > 0)
- memcpy(pOpts->origArgVect + 1 + optsIdx, ppzOpds,
- opdsIdx * sizeof(char*));
+ memcpy(opts->origArgVect + 1 + optsIdx, ppzOpds,
+ (size_t)opdsIdx * sizeof(char*));
freeTemps:
- free(ppzOpts);
+ free(opt_txt);
free(ppzOpds);
return;
@@ -327,7 +330,8 @@ optionSort(tOptions* pOpts)
return;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/stack.c b/sntp/libopts/stack.c
index d930772b7dd6..d2ce165adb88 100644
--- a/sntp/libopts/stack.c
+++ b/sntp/libopts/stack.c
@@ -2,14 +2,16 @@
/**
* \file stack.c
*
- * Time-stamp: "2010-07-17 10:42:27 bkorb"
- *
* This is a special option processing routine that will save the
* argument to an option in a FIFO queue.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -21,11 +23,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#ifdef WITH_LIBREGEX
@@ -36,33 +38,30 @@
* private:
*
* what: Remove option args from a stack
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Invoked for options that are equivalenced to stacked options.
=*/
void
-optionUnstackArg(
- tOptions* pOpts,
- tOptDesc* pOptDesc )
+optionUnstackArg(tOptions * opts, tOptDesc * od)
{
- int res;
+ tArgList * arg_list;
- tArgList* pAL;
-
- if ((pOptDesc->fOptState & OPTST_RESET) != 0)
+ if (INQUERY_CALL(opts, od))
return;
- pAL = (tArgList*)pOptDesc->optCookie;
+
+ arg_list = (tArgList*)od->optCookie;
/*
* IF we don't have any stacked options,
* THEN indicate that we don't have any of these options
*/
- if (pAL == NULL) {
- pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
- if ((pOptDesc->fOptState & OPTST_INITENABLED) == 0)
- pOptDesc->fOptState |= OPTST_DISABLED;
+ if (arg_list == NULL) {
+ od->fOptState &= OPTST_PERSISTENT_MASK;
+ if ((od->fOptState & OPTST_INITENABLED) == 0)
+ od->fOptState |= OPTST_DISABLED;
return;
}
@@ -71,7 +70,7 @@ optionUnstackArg(
regex_t re;
int i, ct, dIdx;
- if (regcomp(&re, pOptDesc->optArg.argString, REG_NOSUB) != 0)
+ if (regcomp(&re, od->optArg.argString, REG_NOSUB) != 0)
return;
/*
@@ -80,9 +79,11 @@ optionUnstackArg(
* index is incremented every time. The destination only when
* we are keeping a define.
*/
- for (i = 0, dIdx = 0, ct = pAL->useCt; --ct >= 0; i++) {
- tCC* pzSrc = pAL->apzArgs[ i ];
- char* pzEq = strchr(pzSrc, '=');
+ for (i = 0, dIdx = 0, ct = arg_list->useCt; --ct >= 0; i++) {
+ char const * pzSrc = arg_list->apzArgs[ i ];
+ char * pzEq = strchr(pzSrc, '=');
+ int res;
+
if (pzEq != NULL)
*pzEq = NUL;
@@ -96,7 +97,7 @@ optionUnstackArg(
* the list.
*/
AGFREE(pzSrc);
- pAL->useCt--;
+ arg_list->useCt--;
break;
default:
@@ -109,7 +110,7 @@ optionUnstackArg(
* THEN we have to move the current one.
*/
if (dIdx != i)
- pAL->apzArgs[ dIdx ] = pzSrc;
+ arg_list->apzArgs[ dIdx ] = pzSrc;
dIdx++;
}
}
@@ -126,21 +127,21 @@ optionUnstackArg(
* index is incremented every time. The destination only when
* we are keeping a define.
*/
- for (i = 0, dIdx = 0, ct = pAL->useCt; --ct >= 0; i++) {
- tCC* pzSrc = pAL->apzArgs[ i ];
- char* pzEq = strchr(pzSrc, '=');
+ for (i = 0, dIdx = 0, ct = arg_list->useCt; --ct >= 0; i++) {
+ const char * pzSrc = arg_list->apzArgs[ i ];
+ char * pzEq = strchr(pzSrc, '=');
if (pzEq != NULL)
*pzEq = NUL;
- if (strcmp(pzSrc, pOptDesc->optArg.argString) == 0) {
+ if (strcmp(pzSrc, od->optArg.argString) == 0) {
/*
* Remove this entry by reducing the in-use count
* and *not* putting the string pointer back into
* the list.
*/
AGFREE(pzSrc);
- pAL->useCt--;
+ arg_list->useCt--;
} else {
if (pzEq != NULL)
*pzEq = '=';
@@ -150,7 +151,7 @@ optionUnstackArg(
* THEN we have to move the current one.
*/
if (dIdx != i)
- pAL->apzArgs[ dIdx ] = pzSrc;
+ arg_list->apzArgs[ dIdx ] = pzSrc;
dIdx++;
}
}
@@ -160,12 +161,12 @@ optionUnstackArg(
* IF we have unstacked everything,
* THEN indicate that we don't have any of these options
*/
- if (pAL->useCt == 0) {
- pOptDesc->fOptState &= OPTST_PERSISTENT_MASK;
- if ((pOptDesc->fOptState & OPTST_INITENABLED) == 0)
- pOptDesc->fOptState |= OPTST_DISABLED;
- AGFREE((void*)pAL);
- pOptDesc->optCookie = NULL;
+ if (arg_list->useCt == 0) {
+ od->fOptState &= OPTST_PERSISTENT_MASK;
+ if ((od->fOptState & OPTST_INITENABLED) == 0)
+ od->fOptState |= OPTST_DISABLED;
+ AGFREE((void *)arg_list);
+ od->optCookie = NULL;
}
}
@@ -176,7 +177,7 @@ optionUnstackArg(
* as an opaque address.
*/
LOCAL void
-addArgListEntry(void** ppAL, void* entry)
+addArgListEntry(void ** ppAL, void * entry)
{
tArgList* pAL = *(void**)ppAL;
@@ -205,7 +206,7 @@ addArgListEntry(void** ppAL, void* entry)
* The base structure contains space for MIN_ARG_ALLOC_CT
* pointers. We subtract it off to find our augment size.
*/
- sz += sizeof(char*) * (pAL->allocCt - MIN_ARG_ALLOC_CT);
+ sz += sizeof(char*) * ((size_t)pAL->allocCt - MIN_ARG_ALLOC_CT);
pAL = (tArgList*)AGREALOC((void*)pAL, sz, "expanded opt arg stack");
if (pAL == NULL)
return;
@@ -223,39 +224,41 @@ addArgListEntry(void** ppAL, void* entry)
* private:
*
* what: put option args on a stack
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Keep an entry-ordered list of option arguments.
=*/
void
-optionStackArg(
- tOptions* pOpts,
- tOptDesc* pOD )
+optionStackArg(tOptions * opts, tOptDesc * od)
{
char * pz;
- if ((pOD->fOptState & OPTST_RESET) != 0) {
- tArgList* pAL = (void*)pOD->optCookie;
+ if (INQUERY_CALL(opts, od))
+ return;
+
+ if ((od->fOptState & OPTST_RESET) != 0) {
+ tArgList * arg_list = (void*)od->optCookie;
int ix;
- if (pAL == NULL)
+ if (arg_list == NULL)
return;
- ix = pAL->useCt;
+ ix = arg_list->useCt;
while (--ix >= 0)
- AGFREE(pAL->apzArgs[ix]);
- AGFREE(pAL);
+ AGFREE(arg_list->apzArgs[ix]);
+ AGFREE(arg_list);
} else {
- if (pOD->optArg.argString == NULL)
+ if (od->optArg.argString == NULL)
return;
- AGDUPSTR(pz, pOD->optArg.argString, "stack arg");
- addArgListEntry(&(pOD->optCookie), (void*)pz);
+ AGDUPSTR(pz, od->optArg.argString, "stack arg");
+ addArgListEntry(&(od->optCookie), (void*)pz);
}
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/stdnoreturn.in.h b/sntp/libopts/stdnoreturn.in.h
new file mode 100644
index 000000000000..d4ae183ce6c0
--- /dev/null
+++ b/sntp/libopts/stdnoreturn.in.h
@@ -0,0 +1,50 @@
+/* A substitute for ISO C11 <stdnoreturn.h>.
+
+ Copyright 2012-2014 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef noreturn
+
+/* ISO C11 <stdnoreturn.h> for platforms that lack it.
+
+ References:
+ ISO C11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+ section 7.23 */
+
+/* The definition of _Noreturn is copied here. */
+
+#if 1200 <= _MSC_VER
+/* Standard include files on this platform contain declarations like
+ "__declspec (noreturn) void abort (void);". "#define noreturn
+ _Noreturn" would cause this declaration to be rewritten to the
+ invalid "__declspec (__declspec (noreturn)) void abort (void);".
+ Instead, define noreturn to empty, so that such declarations are
+ rewritten to "__declspec () void abort (void);", which is
+ equivalent to "void abort (void);"; this gives up on noreturn's
+ advice to the compiler but at least it is valid code. */
+# define noreturn /*empty*/
+#else
+# define noreturn _Noreturn
+#endif
+
+/* Did he ever return?
+ No he never returned
+ And his fate is still unlearn'd ...
+ -- Steiner J, Hawes BL. M.T.A. (1949) */
+
+#endif /* noreturn */
diff --git a/sntp/libopts/streqvcmp.c b/sntp/libopts/streqvcmp.c
index d2cb65de6346..371d7f4f0cfd 100644
--- a/sntp/libopts/streqvcmp.c
+++ b/sntp/libopts/streqvcmp.c
@@ -2,8 +2,6 @@
/**
* \file streqvcmp.c
*
- * Time-stamp: "2010-07-17 10:16:24 bkorb"
- *
* String Equivalence Comparison
*
* These routines allow any character to be mapped to any other
@@ -11,9 +9,13 @@
* the characters "-", "_" and "^" all need to be equivalent
* (because they are treated so by different development environments).
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -25,19 +27,19 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*
* This array is designed for mapping upper and lower case letter
* together for a case independent comparison. The mappings are
* based upon ascii character sequences.
*/
static unsigned char charmap[] = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, '\a',
- '\b', '\t', '\n', '\v', '\f', '\r', 0x0E, 0x0F,
+ NUL, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, '\a',
+ '\b', '\t', NL, '\v', '\f', '\r', 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
@@ -98,12 +100,19 @@ static unsigned char charmap[] = {
* err: none checked. Caller responsible for seg faults.
=*/
int
-strneqvcmp(tCC* s1, tCC* s2, int ct)
+strneqvcmp(char const * s1, char const * s2, int ct)
{
for (; ct > 0; --ct) {
unsigned char u1 = (unsigned char) *s1++;
unsigned char u2 = (unsigned char) *s2++;
- int dif = charmap[ u1 ] - charmap[ u2 ];
+ int dif;
+ if (u1 == u2) {
+ if (u1 == NUL)
+ return 0;
+ continue;
+ }
+
+ dif = charmap[ u1 ] - charmap[ u2 ];
if (dif != 0)
return dif;
@@ -137,12 +146,19 @@ strneqvcmp(tCC* s1, tCC* s2, int ct)
* err: none checked. Caller responsible for seg faults.
=*/
int
-streqvcmp(tCC* s1, tCC* s2)
+streqvcmp(char const * s1, char const * s2)
{
for (;;) {
unsigned char u1 = (unsigned char) *s1++;
unsigned char u2 = (unsigned char) *s2++;
- int dif = charmap[ u1 ] - charmap[ u2 ];
+ int dif;
+ if (u1 == u2) {
+ if (u1 == NUL)
+ return 0;
+ continue;
+ }
+
+ dif = charmap[ u1 ] - charmap[ u2 ];
if (dif != 0)
return dif;
@@ -157,8 +173,8 @@ streqvcmp(tCC* s1, tCC* s2)
*
* what: Set the character mappings for the streqv functions
*
- * arg: + char + From + Input character +
- * arg: + char + To + Mapped-to character +
+ * arg: + char + from + Input character +
+ * arg: + char + to + Mapped-to character +
* arg: + int + ct + compare length +
*
* doc:
@@ -182,24 +198,24 @@ streqvcmp(tCC* s1, tCC* s2)
* err: none.
=*/
void
-streqvmap(char From, char To, int ct)
+streqvmap(char from, char to, int ct)
{
if (ct == 0) {
ct = sizeof(charmap) - 1;
do {
- charmap[ ct ] = ct;
+ charmap[ct] = (unsigned char)ct;
} while (--ct >= 0);
}
else {
- int chTo = (int)To & 0xFF;
- int chFrom = (int)From & 0xFF;
+ unsigned int i_to = (int)to & 0xFF;
+ unsigned int i_from = (int)from & 0xFF;
do {
- charmap[ chFrom ] = (unsigned)chTo;
- chFrom++;
- chTo++;
- if ((chFrom >= sizeof(charmap)) || (chTo >= sizeof(charmap)))
+ charmap[i_from] = (unsigned char)i_to;
+ i_from++;
+ i_to++;
+ if ((i_from >= sizeof(charmap)) || (i_to >= sizeof(charmap)))
break;
} while (--ct > 0);
}
@@ -225,9 +241,9 @@ void
strequate(char const* s)
{
if ((s != NULL) && (*s != NUL)) {
- unsigned char equiv = (unsigned)*s;
+ unsigned char equiv = (unsigned char)*s;
while (*s != NUL)
- charmap[ (unsigned)*(s++) ] = equiv;
+ charmap[(unsigned char)*(s++)] = equiv;
}
}
@@ -254,11 +270,12 @@ void
strtransform(char* d, char const* s)
{
do {
- *(d++) = (char)charmap[ (unsigned)*s ];
+ *(d++) = (char)charmap[(unsigned char)*s];
} while (*(s++) != NUL);
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/text_mmap.c b/sntp/libopts/text_mmap.c
index 01aa7d821255..f30e71c6c9c3 100644
--- a/sntp/libopts/text_mmap.c
+++ b/sntp/libopts/text_mmap.c
@@ -1,11 +1,15 @@
/**
- * \file text_mmap.c
+ * @file text_mmap.c
*
- * Time-stamp: "2010-07-17 10:15:32 bkorb"
+ * Map a text file, ensuring the text always has an ending NUL byte.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -17,16 +21,32 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
+#if defined(HAVE_MMAP)
+# ifndef MAP_ANONYMOUS
+# ifdef MAP_ANON
+# define MAP_ANONYMOUS MAP_ANON
+# endif
+# endif
-#ifndef MAP_ANONYMOUS
-# ifdef MAP_ANON
-# define MAP_ANONYMOUS MAP_ANON
+# if ! defined(MAP_ANONYMOUS) && ! defined(HAVE_DEV_ZERO)
+ /*
+ * We must have either /dev/zero or anonymous mapping for
+ * this to work.
+ */
+# undef HAVE_MMAP
+
+# else
+# ifdef _SC_PAGESIZE
+# define GETPAGESIZE() sysconf(_SC_PAGESIZE)
+# else
+# define GETPAGESIZE() getpagesize()
+# endif
# endif
#endif
@@ -43,6 +63,192 @@
&& ((_flg & (MAP_SHARED|MAP_PRIVATE)) == MAP_SHARED))
#define MAP_FAILED_PTR ((void*)MAP_FAILED)
+/**
+ * Load the contents of a text file. There are two separate implementations,
+ * depending up on whether mmap(3) is available.
+ *
+ * If not available, malloc the file length plus one byte. Read it in
+ * and NUL terminate.
+ *
+ * If available, first check to see if the text file size is a multiple of a
+ * page size. If it is, map the file size plus an extra page from either
+ * anonymous memory or from /dev/zero. Then map the file text on top of the
+ * first pages of the anonymous/zero pages. Otherwise, just map the file
+ * because there will be NUL bytes provided at the end.
+ *
+ * @param mapinfo a structure holding everything we need to know
+ * about the mapping.
+ *
+ * @param pzFile name of the file, for error reporting.
+ */
+static void
+load_text_file(tmap_info_t * mapinfo, char const * pzFile)
+{
+#if ! defined(HAVE_MMAP)
+ mapinfo->txt_data = AGALOC(mapinfo->txt_size+1, "file text");
+ if (mapinfo->txt_data == NULL) {
+ mapinfo->txt_errno = ENOMEM;
+ return;
+ }
+
+ {
+ size_t sz = mapinfo->txt_size;
+ char* pz = mapinfo->txt_data;
+
+ while (sz > 0) {
+ ssize_t rdct = read(mapinfo->txt_fd, pz, sz);
+ if (rdct <= 0) {
+ mapinfo->txt_errno = errno;
+ fserr_warn("libopts", "read", pzFile);
+ free(mapinfo->txt_data);
+ return;
+ }
+
+ pz += rdct;
+ sz -= rdct;
+ }
+
+ *pz = NUL;
+ }
+
+ mapinfo->txt_errno = 0;
+
+#else /* HAVE mmap */
+ size_t const pgsz = (size_t)GETPAGESIZE();
+ void * map_addr = NULL;
+
+ (void)pzFile;
+
+ mapinfo->txt_full_size = (mapinfo->txt_size + pgsz) & ~(pgsz - 1);
+ if (mapinfo->txt_full_size == (mapinfo->txt_size + pgsz)) {
+ /*
+ * The text is a multiple of a page boundary. We must map an
+ * extra page so the text ends with a NUL.
+ */
+#if defined(MAP_ANONYMOUS)
+ map_addr = mmap(NULL, mapinfo->txt_full_size, PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE, AO_INVALID_FD, 0);
+#else
+ mapinfo->txt_zero_fd = open("/dev/zero", O_RDONLY);
+
+ if (mapinfo->txt_zero_fd == AO_INVALID_FD) {
+ mapinfo->txt_errno = errno;
+ return;
+ }
+ map_addr = mmap(NULL, mapinfo->txt_full_size, PROT_READ|PROT_WRITE,
+ MAP_PRIVATE, mapinfo->txt_zero_fd, 0);
+#endif
+ if (map_addr == MAP_FAILED_PTR) {
+ mapinfo->txt_errno = errno;
+ return;
+ }
+ mapinfo->txt_flags |= MAP_FIXED;
+ }
+
+ mapinfo->txt_data =
+ mmap(map_addr, mapinfo->txt_size, mapinfo->txt_prot,
+ mapinfo->txt_flags, mapinfo->txt_fd, 0);
+
+ if (mapinfo->txt_data == MAP_FAILED_PTR)
+ mapinfo->txt_errno = errno;
+#endif /* HAVE_MMAP */
+}
+
+/**
+ * Make sure all the parameters are correct: we have a file name that
+ * is a text file that we can read.
+ *
+ * @param fname the text file to map
+ * @param prot the memory protections requested (read/write/etc.)
+ * @param flags mmap flags
+ * @param mapinfo a structure holding everything we need to know
+ * about the mapping.
+ */
+static void
+validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo)
+{
+ memset(mapinfo, 0, sizeof(*mapinfo));
+#if defined(HAVE_MMAP) && ! defined(MAP_ANONYMOUS)
+ mapinfo->txt_zero_fd = AO_INVALID_FD;
+#endif
+ mapinfo->txt_fd = AO_INVALID_FD;
+ mapinfo->txt_prot = prot;
+ mapinfo->txt_flags = flags;
+
+ /*
+ * Map mmap flags and protections into open flags and do the open.
+ */
+ {
+ /*
+ * See if we will be updating the file. If we can alter the memory
+ * and if we share the data and we are *not* copy-on-writing the data,
+ * then our updates will show in the file, so we must open with
+ * write access.
+ */
+ int o_flag = FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY;
+
+ /*
+ * If you're not sharing the file and you are writing to it,
+ * then don't let anyone else have access to the file.
+ */
+ if (((flags & MAP_SHARED) == 0) && (prot & PROT_WRITE))
+ o_flag |= O_EXCL;
+
+ mapinfo->txt_fd = open(fname, o_flag);
+ if (mapinfo->txt_fd < 0) {
+ mapinfo->txt_errno = errno;
+ mapinfo->txt_fd = AO_INVALID_FD;
+ return;
+ }
+ }
+
+ /*
+ * Make sure we can stat the regular file. Save the file size.
+ */
+ {
+ struct stat sb;
+ if (fstat(mapinfo->txt_fd, &sb) != 0) {
+ mapinfo->txt_errno = errno;
+ close(mapinfo->txt_fd);
+ return;
+ }
+
+ if (! S_ISREG(sb.st_mode)) {
+ mapinfo->txt_errno = errno = EINVAL;
+ close(mapinfo->txt_fd);
+ return;
+ }
+
+ mapinfo->txt_size = (size_t)sb.st_size;
+ }
+
+ if (mapinfo->txt_fd == AO_INVALID_FD)
+ mapinfo->txt_errno = errno;
+}
+
+/**
+ * Close any files opened by the mapping.
+ *
+ * @param mi a structure holding everything we need to know about the map.
+ */
+static void
+close_mmap_files(tmap_info_t * mi)
+{
+ if (mi->txt_fd == AO_INVALID_FD)
+ return;
+
+ close(mi->txt_fd);
+ mi->txt_fd = AO_INVALID_FD;
+
+#if defined(HAVE_MMAP) && ! defined(MAP_ANONYMOUS)
+ if (mi->txt_zero_fd == AO_INVALID_FD)
+ return;
+
+ close(mi->txt_zero_fd);
+ mi->txt_zero_fd = AO_INVALID_FD;
+#endif
+}
+
/*=export_func text_mmap
* private:
*
@@ -61,20 +267,20 @@
* This routine will mmap a file into memory ensuring that there is at least
* one @file{NUL} character following the file data. It will return the
* address where the file contents have been mapped into memory. If there is a
- * problem, then it will return @code{MAP_FAILED} and set @file{errno}
+ * problem, then it will return @code{MAP_FAILED} and set @code{errno}
* appropriately.
*
- * The named file does not exist, @code{stat(2)} will set @file{errno} as it
- * will. If the file is not a regular file, @file{errno} will be
+ * The named file does not exist, @code{stat(2)} will set @code{errno} as it
+ * will. If the file is not a regular file, @code{errno} will be
* @code{EINVAL}. At that point, @code{open(2)} is attempted with the access
* bits set appropriately for the requested @code{mmap(2)} protections and flag
- * bits. On failure, @file{errno} will be set according to the documentation
- * for @code{open(2)}. If @code{mmap(2)} fails, @file{errno} will be set as
+ * bits. On failure, @code{errno} will be set according to the documentation
+ * for @code{open(2)}. If @code{mmap(2)} fails, @code{errno} will be set as
* that routine sets it. If @code{text_mmap} works to this point, a valid
* address will be returned, but there may still be ``issues''.
*
* If the file size is not an even multiple of the system page size, then
- * @code{text_map} will return at this point and @file{errno} will be zero.
+ * @code{text_map} will return at this point and @code{errno} will be zero.
* Otherwise, an anonymous map is attempted. If not available, then an attempt
* is made to @code{mmap(2)} @file{/dev/zero}. If any of these fail, the
* address of the file's data is returned, bug @code{no} @file{NUL} characters
@@ -96,197 +302,23 @@
* << use the data >>
* text_munmap(&mi);
=*/
-void*
-text_mmap(char const* pzFile, int prot, int flags, tmap_info_t* pMI)
+void *
+text_mmap(char const * pzFile, int prot, int flags, tmap_info_t * mi)
{
- memset(pMI, 0, sizeof(*pMI));
-#ifdef HAVE_MMAP
- pMI->txt_zero_fd = -1;
-#endif
- pMI->txt_fd = -1;
-
- /*
- * Make sure we can stat the regular file. Save the file size.
- */
- {
- struct stat sb;
- if (stat(pzFile, &sb) != 0) {
- pMI->txt_errno = errno;
- return MAP_FAILED_PTR;
- }
-
- if (! S_ISREG(sb.st_mode)) {
- pMI->txt_errno = errno = EINVAL;
- return MAP_FAILED_PTR;
- }
-
- pMI->txt_size = sb.st_size;
- }
-
- /*
- * Map mmap flags and protections into open flags and do the open.
- */
- {
- int o_flag;
- /*
- * See if we will be updating the file. If we can alter the memory
- * and if we share the data and we are *not* copy-on-writing the data,
- * then our updates will show in the file, so we must open with
- * write access.
- */
- if (FILE_WRITABLE(prot,flags))
- o_flag = O_RDWR;
- else
- o_flag = O_RDONLY;
-
- /*
- * If you're not sharing the file and you are writing to it,
- * then don't let anyone else have access to the file.
- */
- if (((flags & MAP_SHARED) == 0) && (prot & PROT_WRITE))
- o_flag |= O_EXCL;
-
- pMI->txt_fd = open(pzFile, o_flag);
- }
-
- if (pMI->txt_fd == AO_INVALID_FD) {
- pMI->txt_errno = errno;
+ validate_mmap(pzFile, prot, flags, mi);
+ if (mi->txt_errno != 0)
return MAP_FAILED_PTR;
- }
-
-#ifdef HAVE_MMAP /* * * * * WITH MMAP * * * * * */
- /*
- * do the mmap. If we fail, then preserve errno, close the file and
- * return the failure.
- */
- pMI->txt_data =
- mmap(NULL, pMI->txt_size+1, prot, flags, pMI->txt_fd, (size_t)0);
- if (pMI->txt_data == MAP_FAILED_PTR) {
- pMI->txt_errno = errno;
- goto fail_return;
- }
-
- /*
- * Most likely, everything will turn out fine now. The only difficult
- * part at this point is coping with files with sizes that are a multiple
- * of the page size. Handling that is what this whole thing is about.
- */
- pMI->txt_zero_fd = -1;
- pMI->txt_errno = 0;
-
- {
- void* pNuls;
-#ifdef _SC_PAGESIZE
- size_t pgsz = sysconf(_SC_PAGESIZE);
-#else
- size_t pgsz = getpagesize();
-#endif
- /*
- * Compute the pagesize rounded mapped memory size.
- * IF this is not the same as the file size, then there are NUL's
- * at the end of the file mapping and all is okay.
- */
- pMI->txt_full_size = (pMI->txt_size + (pgsz - 1)) & ~(pgsz - 1);
- if (pMI->txt_size != pMI->txt_full_size)
- return pMI->txt_data;
-
- /*
- * Still here? We have to remap the trailing inaccessible page
- * either anonymously or to /dev/zero.
- */
- pMI->txt_full_size += pgsz;
-#if defined(MAP_ANONYMOUS)
- pNuls = mmap(
- (void*)(((char*)pMI->txt_data) + pMI->txt_size),
- pgsz, PROT_READ|PROT_WRITE,
- MAP_ANONYMOUS|MAP_FIXED|MAP_PRIVATE, AO_INVALID_FD, (size_t)0);
-
- if (pNuls != MAP_FAILED_PTR)
- return pMI->txt_data;
-
- pMI->txt_errno = errno;
-#elif defined(HAVE_DEV_ZERO)
- pMI->txt_zero_fd = open("/dev/zero", O_RDONLY);
+ load_text_file(mi, pzFile);
- if (pMI->txt_zero_fd == AO_INVALID_FD) {
- pMI->txt_errno = errno;
+ if (mi->txt_errno == 0)
+ return mi->txt_data;
- } else {
- pNuls = mmap(
- (void*)(((char*)pMI->txt_data) + pMI->txt_size), pgsz,
- PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
- pMI->txt_zero_fd, 0 );
+ close_mmap_files(mi);
- if (pNuls != MAP_FAILED_PTR)
- return pMI->txt_data;
-
- pMI->txt_errno = errno;
- close(pMI->txt_zero_fd);
- pMI->txt_zero_fd = -1;
- }
-#endif
-
- pMI->txt_full_size = pMI->txt_size;
- }
-
- {
- void* p = AGALOC(pMI->txt_size+1, "file text");
- memcpy(p, pMI->txt_data, pMI->txt_size);
- ((char*)p)[pMI->txt_size] = NUL;
- munmap(pMI->txt_data, pMI->txt_size );
- pMI->txt_data = p;
- }
- pMI->txt_alloc = 1;
- return pMI->txt_data;
-
-#else /* * * * * * no HAVE_MMAP * * * * * */
-
- pMI->txt_data = AGALOC(pMI->txt_size+1, "file text");
- if (pMI->txt_data == NULL) {
- pMI->txt_errno = ENOMEM;
- goto fail_return;
- }
-
- {
- size_t sz = pMI->txt_size;
- char* pz = pMI->txt_data;
-
- while (sz > 0) {
- ssize_t rdct = read(pMI->txt_fd, pz, sz);
- if (rdct <= 0) {
- pMI->txt_errno = errno;
- fprintf(stderr, zFSErrReadFile,
- errno, strerror(errno), pzFile);
- free(pMI->txt_data);
- goto fail_return;
- }
-
- pz += rdct;
- sz -= rdct;
- }
-
- *pz = NUL;
- }
-
- /*
- * We never need a dummy page mapped in
- */
- pMI->txt_zero_fd = -1;
- pMI->txt_errno = 0;
-
- return pMI->txt_data;
-
-#endif /* * * * * * no HAVE_MMAP * * * * * */
-
- fail_return:
- if (pMI->txt_fd >= 0) {
- close(pMI->txt_fd);
- pMI->txt_fd = -1;
- }
- errno = pMI->txt_errno;
- pMI->txt_data = MAP_FAILED_PTR;
- return pMI->txt_data;
+ errno = mi->txt_errno;
+ mi->txt_data = MAP_FAILED_PTR;
+ return mi->txt_data;
}
@@ -298,7 +330,7 @@ text_mmap(char const* pzFile, int prot, int flags, tmap_info_t* pMI)
* arg: tmap_info_t*, mapinfo, info about the mapping
*
* ret-type: int
- * ret-desc: -1 or 0. @file{errno} will have the error code.
+ * ret-desc: -1 or 0. @code{errno} will have the error code.
*
* doc:
*
@@ -310,71 +342,35 @@ text_mmap(char const* pzFile, int prot, int flags, tmap_info_t* pMI)
* err: Any error code issued by munmap(2) or close(2) is possible.
=*/
int
-text_munmap(tmap_info_t* pMI)
+text_munmap(tmap_info_t * mi)
{
-#ifdef HAVE_MMAP
- int res = 0;
- if (pMI->txt_alloc) {
- /*
- * IF the user has write permission and the text is not mapped private,
- * then write back any changes. Hopefully, nobody else has modified
- * the file in the mean time.
- */
- if ( ((pMI->txt_prot & PROT_WRITE) != 0)
- && ((pMI->txt_flags & MAP_PRIVATE) == 0)) {
-
- if (lseek(pMI->txt_fd, (size_t)0, SEEK_SET) != 0)
- goto error_return;
-
- res = (write(pMI->txt_fd, pMI->txt_data, pMI->txt_size) < 0)
- ? errno : 0;
- }
-
- AGFREE(pMI->txt_data);
- errno = res;
- } else {
- res = munmap(pMI->txt_data, pMI->txt_full_size);
- }
- if (res != 0)
- goto error_return;
-
- res = close(pMI->txt_fd);
- if (res != 0)
- goto error_return;
-
- pMI->txt_fd = -1;
errno = 0;
- if (pMI->txt_zero_fd != -1) {
- res = close(pMI->txt_zero_fd);
- pMI->txt_zero_fd = -1;
- }
- error_return:
- pMI->txt_errno = errno;
- return res;
-#else /* HAVE_MMAP */
+#ifdef HAVE_MMAP
+ (void)munmap(mi->txt_data, mi->txt_full_size);
- errno = 0;
+#else /* don't HAVE_MMAP */
/*
* IF the memory is writable *AND* it is not private (copy-on-write)
* *AND* the memory is "sharable" (seen by other processes)
- * THEN rewrite the data.
+ * THEN rewrite the data. Emulate mmap visibility.
*/
- if ( FILE_WRITABLE(pMI->txt_prot, pMI->txt_flags)
- && (lseek(pMI->txt_fd, 0, SEEK_SET) >= 0) ) {
- write(pMI->txt_fd, pMI->txt_data, pMI->txt_size);
+ if ( FILE_WRITABLE(mi->txt_prot, mi->txt_flags)
+ && (lseek(mi->txt_fd, 0, SEEK_SET) >= 0) ) {
+ write(mi->txt_fd, mi->txt_data, mi->txt_size);
}
- close(pMI->txt_fd);
- pMI->txt_fd = -1;
- pMI->txt_errno = errno;
- free(pMI->txt_data);
-
- return pMI->txt_errno;
+ free(mi->txt_data);
#endif /* HAVE_MMAP */
+
+ mi->txt_errno = errno;
+ close_mmap_files(mi);
+
+ return mi->txt_errno;
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/time.c b/sntp/libopts/time.c
index 656c78d60130..517d5b199a4f 100644
--- a/sntp/libopts/time.c
+++ b/sntp/libopts/time.c
@@ -2,11 +2,13 @@
/**
* \file time.c
*
- * Time-stamp: "2011-03-06 11:52:23 bkorb"
- *
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -18,61 +20,64 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*=export_func optionTimeVal
* private:
*
* what: process an option with a time duration.
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Decipher a time duration value.
=*/
void
-optionTimeVal(tOptions * pOpts, tOptDesc * pOD)
+optionTimeVal(tOptions * opts, tOptDesc * od)
{
time_t val;
- if ((pOD->fOptState & OPTST_RESET) != 0)
+ if (INQUERY_CALL(opts, od))
return;
- val = parse_duration(pOD->optArg.argString);
+ val = parse_duration(od->optArg.argString);
if (val == BAD_TIME) {
- fprintf(stderr, zNotDuration, pOpts->pzProgName, pOD->optArg.argString);
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
- (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
+ fprintf(stderr, zNotDuration, opts->pzProgName, od->optArg.argString);
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ (*(opts->pUsageProc))(opts, EXIT_FAILURE);
}
- if (pOD->fOptState & OPTST_ALLOC_ARG) {
- AGFREE(pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ if (od->fOptState & OPTST_ALLOC_ARG) {
+ AGFREE(od->optArg.argString);
+ od->fOptState &= ~OPTST_ALLOC_ARG;
}
- pOD->optArg.argInt = val;
+ od->optArg.argInt = (long)val;
}
/*=export_func optionTimeDate
* private:
*
* what: process an option with a time and date.
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* Decipher a time and date value.
=*/
void
-optionTimeDate(tOptions * pOpts, tOptDesc * pOD)
+optionTimeDate(tOptions * opts, tOptDesc * od)
{
#if defined(HAVE_GETDATE_R) && defined(HAVE_PUTENV)
- if ((! HAS_pzPkgDataDir(pOpts)) || (pOpts->pzPkgDataDir == NULL))
+ if (INQUERY_CALL(opts, od))
+ return;
+
+ if ((! HAS_pzPkgDataDir(opts)) || (opts->pzPkgDataDir == NULL))
goto default_action;
/*
@@ -85,8 +90,8 @@ optionTimeDate(tOptions * pOpts, tOptDesc * pOD)
if (envptr == NULL) {
static char const fmt[] = "DATEMSK=%s/datemsk";
- envptr = AGALOC(sizeof(fmt) + strlen(pOpts->pzPkgDataDir), fmt);
- sprintf(envptr, fmt, pOpts->pzPkgDataDir);
+ envptr = AGALOC(sizeof(fmt) + strlen(opts->pzPkgDataDir), fmt);
+ sprintf(envptr, fmt, opts->pzPkgDataDir);
putenv(envptr);
}
@@ -102,33 +107,34 @@ optionTimeDate(tOptions * pOpts, tOptDesc * pOD)
struct tm stm;
time_t tm;
- if (getdate_r(pOD->optArg.argString, &stm) != 0) {
- fprintf(stderr, zNotDate, pOpts->pzProgName,
- pOD->optArg.argString);
- if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
- (*(pOpts->pUsageProc))(pOpts, EXIT_FAILURE);
+ if (getdate_r(od->optArg.argString, &stm) != 0) {
+ fprintf(stderr, zNotDate, opts->pzProgName,
+ od->optArg.argString);
+ if ((opts->fOptSet & OPTPROC_ERRSTOP) != 0)
+ (*(opts->pUsageProc))(opts, EXIT_FAILURE);
return;
}
tm = mktime(&stm);
- if (pOD->fOptState & OPTST_ALLOC_ARG) {
- AGFREE(pOD->optArg.argString);
- pOD->fOptState &= ~OPTST_ALLOC_ARG;
+ if (od->fOptState & OPTST_ALLOC_ARG) {
+ AGFREE(od->optArg.argString);
+ od->fOptState &= ~OPTST_ALLOC_ARG;
}
- pOD->optArg.argInt = tm;
+ od->optArg.argInt = tm;
}
return;
-default_action:
+ default_action:
#endif
- optionTimeVal(pOpts, pOD);
- if (pOD->optArg.argInt != BAD_TIME)
- pOD->optArg.argInt += (unsigned long)time(NULL);
+ optionTimeVal(opts, od);
+ if (od->optArg.argInt != BAD_TIME)
+ od->optArg.argInt += (long)time(NULL);
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/tokenize.c b/sntp/libopts/tokenize.c
index 4ca1245cf066..34abf836012b 100644
--- a/sntp/libopts/tokenize.c
+++ b/sntp/libopts/tokenize.c
@@ -1,10 +1,15 @@
+/** \file tokenize.c
+ *
+ * Tokenize a string, accommodating quoted strings.
+ *
+ * @addtogroup autoopts
+ * @{
+ */
/*
* This file defines the string_tokenize interface
- * Time-stamp: "2010-07-17 10:40:26 bkorb"
- *
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -16,11 +21,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#include <errno.h>
@@ -87,11 +92,11 @@ copy_raw(ch_t** ppDest, char const ** ppSrc)
switch (*pSrc) {
case NUL: *ppSrc = NULL; return;
case '\r':
- if (*(++pSrc) == '\n')
+ if (*(++pSrc) == NL)
++pSrc;
continue;
- case '\n':
+ case NL:
++pSrc;
continue;
@@ -128,7 +133,7 @@ alloc_token_list(char const * str)
* Trim leading white space. Use "ENOENT" and a NULL return to indicate
* an empty string was passed.
*/
- while (IS_WHITESPACE_CHAR(*str)) str++;
+ str = SPN_WHITESPACE_CHARS(str);
if (*str == NUL) goto enoent_res;
/*
@@ -137,18 +142,16 @@ alloc_token_list(char const * str)
* high and we'll squander the space for a few extra pointers.
*/
{
- cc_t* pz = (cc_t*)str;
+ char const * pz = str;
do {
max_token_ct++;
- while (! IS_WHITESPACE_CHAR(*++pz))
- if (*pz == NUL) goto found_nul;
- while (IS_WHITESPACE_CHAR(*pz)) pz++;
+ pz = BRK_WHITESPACE_CHARS(pz+1);
+ pz = SPN_WHITESPACE_CHARS(pz);
} while (*pz != NUL);
- found_nul:
- res = malloc(sizeof(*res) + (pz - (cc_t*)str)
- + (max_token_ct * sizeof(ch_t*)));
+ res = malloc(sizeof(*res) + (size_t)(pz - str)
+ + ((size_t)max_token_ct * sizeof(ch_t*)));
}
if (res == NULL)
@@ -249,7 +252,7 @@ ao_string_tokenize(char const* str)
int ch = (ch_t)*str;
if (IS_WHITESPACE_CHAR(ch)) {
found_white_space:
- while (IS_WHITESPACE_CHAR(*++str)) ;
+ str = SPN_WHITESPACE_CHARS(str+1);
break;
}
@@ -281,7 +284,7 @@ ao_string_tokenize(char const* str)
default:
str++;
- *(pzDest++) = ch;
+ *(pzDest++) = (unsigned char)ch;
}
} copy_done:;
@@ -326,7 +329,8 @@ main(int argc, char** argv)
}
#endif
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/usage.c b/sntp/libopts/usage.c
index 4d106675c304..206235d7afca 100644
--- a/sntp/libopts/usage.c
+++ b/sntp/libopts/usage.c
@@ -2,11 +2,13 @@
/*
* \file usage.c
*
- * Time-stamp: "2011-02-01 14:42:37 bkorb"
- *
* This module implements the default usage procedure for
* Automated Options. It may be overridden, of course.
*
+ * @addtogroup autoopts
+ * @{
+ */
+/*
* Sort options:
--start=END-[S]TATIC-FORWARD --patt='^/\*($|[^:])' \
--out=xx.c key='^[a-zA-Z0-9_]+\(' --trail='^/\*:' \
@@ -16,7 +18,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -28,144 +30,187 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
-#define OPTPROC_L_N_S (OPTPROC_LONGOPT | OPTPROC_SHORTOPT)
-
/* = = = START-STATIC-FORWARD = = = */
-static void
-set_usage_flags(tOptions * opts, char const * flg_txt);
+static unsigned int
+parse_usage_flags(ao_flag_names_t const * fnt, char const * txt);
-static inline ag_bool
+static inline bool
do_gnu_usage(tOptions * pOpts);
-static inline ag_bool
+static inline bool
skip_misuse_usage(tOptions * pOpts);
static void
+print_offer_usage(tOptions * opts);
+
+static void
print_usage_details(tOptions * opts, int exit_code);
static void
-prt_extd_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT);
+print_one_paragraph(char const * text, bool plain, FILE * fp);
static void
-prt_ini_list(char const * const * papz, ag_bool * pInitIntro,
- char const * pzRc, char const * pzPN);
+prt_conflicts(tOptions * opts, tOptDesc * od);
static void
-prt_preamble(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT);
+prt_one_vendor(tOptions * opts, tOptDesc * od,
+ arg_types_t * argtp, char const * usefmt);
static void
-prt_one_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT);
+prt_vendor_opts(tOptions * opts, char const * title);
static void
-prt_opt_usage(tOptions * pOpts, int ex_code, char const * pOptTitle);
+prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title);
static void
-prt_prog_detail(tOptions* pOptions);
+prt_ini_list(char const * const * papz, char const * ini_file,
+ char const * path_nm);
-static int
-setGnuOptFmts(tOptions* pOpts, tCC** ppT);
+static void
+prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at);
-static int
-setStdOptFmts(tOptions* pOpts, tCC** ppT);
-/* = = = END-STATIC-FORWARD = = = */
+static void
+prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at);
-/*
- * NB: no entry may be a prefix of another entry
- */
-#define AOFLAG_TABLE \
- _aof_(gnu, OPTPROC_GNUUSAGE ) \
- _aof_(autoopts, ~OPTPROC_GNUUSAGE) \
- _aof_(no_misuse_usage, OPTPROC_MISUSE ) \
- _aof_(misuse_usage, ~OPTPROC_MISUSE )
+static void
+prt_opt_usage(tOptions * opts, int ex_code, char const * title);
static void
-set_usage_flags(tOptions * opts, char const * flg_txt)
-{
- typedef struct {
- size_t fnm_len;
- uint32_t fnm_mask;
- char const * fnm_name;
- } ao_flag_names_t;
-
-# define _aof_(_n, _f) AOUF_ ## _n ## _ID,
- typedef enum { AOFLAG_TABLE AOUF_COUNT } ao_flag_id_t;
-# undef _aof_
+prt_prog_detail(tOptions * opts);
-# define _aof_(_n, _f) AOUF_ ## _n = (1 << AOUF_ ## _n ## _ID),
- typedef enum { AOFLAG_TABLE } ao_flags_t;
-# undef _aof_
+static int
+setGnuOptFmts(tOptions * opts, char const ** ptxt);
-# define _aof_(_n, _f) { sizeof(#_n)-1, _f, #_n },
- static ao_flag_names_t const fn_table[AOUF_COUNT] = {
- AOFLAG_TABLE
- };
-# undef _aof_
+static int
+setStdOptFmts(tOptions * opts, char const ** ptxt);
+/* = = = END-STATIC-FORWARD = = = */
- ao_flags_t flg = 0;
+/**
+ * Parse the option usage flags string. Any parsing problems yield
+ * a zero (no flags set) result. This function is internal to
+ * set_usage_flags().
+ *
+ * @param[in] fnt Flag Name Table - maps a name to a mask
+ * @param[in] txt the text to process. If NULL, then
+ * getenv("AUTOOPTS_USAGE") is used.
+ * @returns a bit mask indicating which \a fnt entries were found.
+ */
+static unsigned int
+parse_usage_flags(ao_flag_names_t const * fnt, char const * txt)
+{
+ unsigned int res = 0;
- if (flg_txt == NULL) {
- flg_txt = getenv("AUTOOPTS_USAGE");
- if (flg_txt == NULL)
- return;
+ /*
+ * The text may be passed in. If not, use the environment variable.
+ */
+ if (txt == NULL) {
+ txt = getenv("AUTOOPTS_USAGE");
+ if (txt == NULL)
+ return 0;
}
- while (IS_WHITESPACE_CHAR(*flg_txt)) flg_txt++;
- if (*flg_txt == NUL)
- return;
+ txt = SPN_WHITESPACE_CHARS(txt);
+ if (*txt == NUL)
+ return 0;
+ /*
+ * search the string for table entries. We must understand everything
+ * we see in the string, or we give up on it.
+ */
for (;;) {
int ix = 0;
- ao_flag_names_t const * fnt = fn_table;
for (;;) {
- if (strneqvcmp(flg_txt, fnt->fnm_name, fnt->fnm_len) == 0)
+ if (strneqvcmp(txt, fnt[ix].fnm_name, (int)fnt[ix].fnm_len) == 0)
break;
if (++ix >= AOUF_COUNT)
- return;
- fnt++;
+ return 0;
}
/*
* Make sure we have a full match. Look for whitespace,
* a comma, or a NUL byte.
*/
- if (! IS_END_LIST_ENTRY_CHAR(flg_txt[fnt->fnm_len]))
- return;
+ if (! IS_END_LIST_ENTRY_CHAR(txt[fnt[ix].fnm_len]))
+ return 0;
- flg |= 1 << ix;
- flg_txt += fnt->fnm_len;
- while (IS_WHITESPACE_CHAR(*flg_txt)) flg_txt++;
+ res |= 1U << ix;
+ txt = SPN_WHITESPACE_CHARS(txt + fnt[ix].fnm_len);
- if (*flg_txt == NUL)
- break;
+ switch (*txt) {
+ case NUL:
+ return res;
- if (*flg_txt == ',') {
- /*
- * skip the comma and following white space
- */
- while (IS_WHITESPACE_CHAR(*++flg_txt)) ;
- if (*flg_txt == NUL)
- break;
+ case ',':
+ txt = SPN_WHITESPACE_CHARS(txt + 1);
+ /* Something must follow the comma */
+
+ default:
+ continue;
}
}
+}
+/**
+ * Set option usage flags. Any parsing problems yield no changes to options.
+ * Three different bits may be fiddled: \a OPTPROC_GNUUSAGE, \a OPTPROC_MISUSE
+ * and \a OPTPROC_COMPUTE.
+ *
+ * @param[in] flg_txt text to parse. If NULL, then the AUTOOPTS_USAGE
+ * environment variable is parsed.
+ * @param[in,out] opts the program option descriptor
+ */
+LOCAL void
+set_usage_flags(tOptions * opts, char const * flg_txt)
+{
+# define _aof_(_n, _f) { sizeof(#_n)-1, _f, #_n },
+ static ao_flag_names_t const fn_table[AOUF_COUNT] = {
+ AOFLAG_TABLE
+ };
+# undef _aof_
+
+ /*
+ * the flag word holds a bit for each selected table entry.
+ */
+ unsigned int flg = parse_usage_flags(fn_table, flg_txt);
+ if (flg == 0) return;
+
+ /*
+ * Ensure we do not have conflicting selections
+ */
{
- ao_flag_names_t const * fnm = fn_table;
+ static unsigned int const form_mask =
+ AOUF_gnu | AOUF_autoopts;
+ static unsigned int const misuse_mask =
+ AOUF_no_misuse_usage | AOUF_misuse_usage;
+ if ( ((flg & form_mask) == form_mask)
+ || ((flg & misuse_mask) == misuse_mask) )
+ return;
+ }
- while (flg != 0) {
+ /*
+ * Now fiddle the fOptSet bits, based on settings.
+ * The OPTPROC_LONGOPT bit is immutable, thus if it is set,
+ * then fnm points to a mask off mask.
+ */
+ {
+ ao_flag_names_t const * fnm = fn_table;
+ for (;;) {
if ((flg & 1) != 0) {
if ((fnm->fnm_mask & OPTPROC_LONGOPT) != 0)
opts->fOptSet &= fnm->fnm_mask;
else opts->fOptSet |= fnm->fnm_mask;
}
flg >>= 1;
+ if (flg == 0)
+ break;
fnm++;
}
}
@@ -175,20 +220,20 @@ set_usage_flags(tOptions * opts, char const * flg_txt)
* Figure out if we should try to format usage text sort-of like
* the way many GNU programs do.
*/
-static inline ag_bool
+static inline bool
do_gnu_usage(tOptions * pOpts)
{
- return (pOpts->fOptSet & OPTPROC_GNUUSAGE) ? AG_TRUE : AG_FALSE;
+ return (pOpts->fOptSet & OPTPROC_GNUUSAGE) ? true : false;
}
/*
* Figure out if we should try to format usage text sort-of like
* the way many GNU programs do.
*/
-static inline ag_bool
+static inline bool
skip_misuse_usage(tOptions * pOpts)
{
- return (pOpts->fOptSet & OPTPROC_MISUSE) ? AG_TRUE : AG_FALSE;
+ return (pOpts->fOptSet & OPTPROC_MISUSE) ? true : false;
}
@@ -216,39 +261,100 @@ optionOnlyUsage(tOptions * pOpts, int ex_code)
/*
* Determine which header and which option formatting strings to use
*/
- if (do_gnu_usage(pOpts)) {
+ if (do_gnu_usage(pOpts))
(void)setGnuOptFmts(pOpts, &pOptTitle);
- }
- else {
+ else
(void)setStdOptFmts(pOpts, &pOptTitle);
- }
prt_opt_usage(pOpts, ex_code, pOptTitle);
fflush(option_usage_fp);
- if (ferror(option_usage_fp) != 0) {
- fputs(zOutputFail, stderr);
- exit(EXIT_FAILURE);
+ if (ferror(option_usage_fp) != 0)
+ fserr_exit(pOpts->pzProgName, zwriting, (option_usage_fp == stderr)
+ ? zstderr_name : zstdout_name);
+}
+
+/**
+ * Print a message suggesting how to get help.
+ *
+ * @param[in] opts the program options
+ */
+static void
+print_offer_usage(tOptions * opts)
+{
+ char help[24];
+
+ if (HAS_opt_usage_t(opts)) {
+ int ix = opts->presetOptCt;
+ tOptDesc * od = opts->pOptDesc + ix;
+ while (od->optUsage != AOUSE_HELP) {
+ if (++ix >= opts->optCt)
+ ao_bug(zmissing_help_msg);
+ od++;
+ }
+ switch (opts->fOptSet & (OPTPROC_LONGOPT | OPTPROC_SHORTOPT)) {
+ case OPTPROC_SHORTOPT:
+ help[0] = '-';
+ help[1] = od->optValue;
+ help[2] = NUL;
+ break;
+
+ case OPTPROC_LONGOPT:
+ case (OPTPROC_LONGOPT | OPTPROC_SHORTOPT):
+ help[0] = help[1] = '-';
+ strncpy(help + 2, od->pz_Name, 20);
+ break;
+
+ case 0:
+ strncpy(help, od->pz_Name, 20);
+ break;
+ }
+
+ } else {
+ switch (opts->fOptSet & (OPTPROC_LONGOPT | OPTPROC_SHORTOPT)) {
+ case OPTPROC_SHORTOPT:
+ strcpy(help, "-h");
+ break;
+
+ case OPTPROC_LONGOPT:
+ case (OPTPROC_LONGOPT | OPTPROC_SHORTOPT):
+ strcpy(help, "--help");
+ break;
+
+ case 0:
+ strcpy(help, "help");
+ break;
+ }
}
+
+ fprintf(option_usage_fp, zoffer_usage_fmt, opts->pzProgName, help);
}
+/**
+ * Print information about each option.
+ *
+ * @param[in] opts the program options
+ * @param[in] exit_code whether or not there was a usage error reported.
+ * used to select full usage versus abbreviated.
+ */
static void
print_usage_details(tOptions * opts, int exit_code)
{
{
char const * pOptTitle = NULL;
+ int flen;
/*
* Determine which header and which option formatting strings to use
*/
if (do_gnu_usage(opts)) {
- int flen = setGnuOptFmts(opts, &pOptTitle);
- sprintf(zOptFmtLine, zFmtFmt, flen);
- fputc('\n', option_usage_fp);
+ flen = setGnuOptFmts(opts, &pOptTitle);
+ sprintf(line_fmt_buf, zFmtFmt, flen);
+ fputc(NL, option_usage_fp);
}
else {
- int flen = setStdOptFmts(opts, &pOptTitle);
- sprintf(zOptFmtLine, zFmtFmt, flen);
+ flen = setStdOptFmts(opts, &pOptTitle);
+ sprintf(line_fmt_buf, zFmtFmt, flen);
/*
* When we exit with EXIT_SUCCESS and the first option is a doc
@@ -261,6 +367,9 @@ print_usage_details(tOptions * opts, int exit_code)
fputs(pOptTitle, option_usage_fp);
}
+ flen = 4 - ((flen + 15) / 8);
+ if (flen > 0)
+ tab_skip_ct = flen;
prt_opt_usage(opts, exit_code, pOptTitle);
}
@@ -301,18 +410,150 @@ print_usage_details(tOptions * opts, int exit_code)
fflush(option_usage_fp);
- if (ferror(option_usage_fp) != 0) {
- fputs(zOutputFail, stderr);
- exit(EXIT_FAILURE);
+ if (ferror(option_usage_fp) != 0)
+ fserr_exit(opts->pzProgName, zwriting, (option_usage_fp == stderr)
+ ? zstderr_name : zstdout_name);
+}
+
+static void
+print_one_paragraph(char const * text, bool plain, FILE * fp)
+{
+ if (plain) {
+#ifdef ENABLE_NLS
+#ifdef HAVE_LIBINTL_H
+#ifdef DEBUG_ENABLED
+#undef gettext
+#endif
+ char * buf = dgettext("libopts", text);
+ if (buf == text)
+ text = gettext(text);
+#endif /* HAVE_LIBINTL_H */
+#endif /* ENABLE_NLS */
+ fputs(text, fp);
+ }
+
+ else {
+ char const * t = optionQuoteString(text, LINE_SPLICE);
+ fprintf(fp, PUTS_FMT, t);
+ AGFREE((void *)t);
}
}
+
+/*=export_func optionPrintParagraphs
+ * private:
+ *
+ * what: Print a paragraph of usage text
+ * arg: + char const * + text + a block of text that has bee i18n-ed +
+ * arg: + bool + plain + false -> wrap text in fputs() +
+ * arg: + FILE * + fp + the stream file pointer for output +
+ *
+ * doc:
+ * This procedure is called in two contexts: when a full or short usage text
+ * has been provided for display, and when autogen is assembling a list of
+ * translatable texts in the optmain.tlib template. In the former case, \a
+ * plain is set to \a true, otherwise \a false.
+ *
+ * Anything less than 256 characters in size is printed as a single unit.
+ * Otherwise, paragraphs are detected. A paragraph break is defined as just
+ * before a non-empty line preceded by two newlines or a line that starts
+ * with at least one space character but fewer than 8 space characters.
+ * Lines indented with tabs or more than 7 spaces are considered continuation
+ * lines.
+ *
+ * If 'plain' is true, we are emitting text for a user to see. So, if it is
+ * true and NLS is not enabled, then just write the whole thing at once.
+=*/
+void
+optionPrintParagraphs(char const * text, bool plain, FILE * fp)
+{
+ size_t len = strlen(text);
+ char * buf;
+#ifndef ENABLE_NLS
+ if (plain || (len < 256))
+#else
+ if (len < 256)
+#endif
+ {
+ print_one_paragraph(text, plain, fp);
+ return;
+ }
+
+ AGDUPSTR(buf, text, "ppara");
+ text = buf;
+
+ for (;;) {
+ char * scan;
+
+ if (len < 256) {
+ done:
+ print_one_paragraph(buf, plain, fp);
+ break;
+ }
+ scan = buf;
+
+ try_longer:
+ scan = strchr(scan, NL);
+ if (scan == NULL)
+ goto done;
+ if ((scan - buf) < 40) {
+ scan++;
+ goto try_longer;
+ }
+
+ scan++;
+ if ((! isspace((int)*scan)) || (*scan == HT))
+ /*
+ * line starts with tab or non-whitespace --> continuation
+ */
+ goto try_longer;
+
+ if (*scan == NL) {
+ /*
+ * Double newline -> paragraph break
+ * Include all newlines in current paragraph.
+ */
+ while (*++scan == NL) /*continue*/;
+
+ } else {
+ char * p = scan;
+ int sp_ct = 0;
+
+ while (*p == ' ') {
+ if (++sp_ct >= 8) {
+ /*
+ * Too many spaces --> continuation line
+ */
+ scan = p;
+ goto try_longer;
+ }
+ p++;
+ }
+ }
+
+ /*
+ * "scan" points to the first character of a paragraph or the
+ * terminating NUL byte.
+ */
+ {
+ char svch = *scan;
+ *scan = NUL;
+ print_one_paragraph(buf, plain, fp);
+ len -= scan - buf;
+ if (len <= 0)
+ break;
+ *scan = svch;
+ buf = scan;
+ }
+ }
+ AGFREE((void *)text);
+}
/*=export_func optionUsage
* private:
*
* what: Print usage text
- * arg: + tOptions* + pOptions + program options descriptor +
+ * arg: + tOptions* + opts + program options descriptor +
* arg: + int + exitCode + exit code for calling exit(3) +
*
* doc:
@@ -321,16 +562,17 @@ print_usage_details(tOptions * opts, int exit_code)
* over-ride this, providing the value of it is set to either "gnu" or
* "autoopts". This routine will @strong{not} return.
*
- * If "exitCode" is "EX_USAGE" (normally 64), then output will to to stdout
- * and the actual exit code will be "EXIT_SUCCESS".
+ * If "exitCode" is "AO_EXIT_REQ_USAGE" (normally 64), then output will to
+ * to stdout and the actual exit code will be "EXIT_SUCCESS".
=*/
void
-optionUsage(tOptions * pOptions, int usage_exit_code)
+optionUsage(tOptions * opts, int usage_exit_code)
{
- int exit_code =
- (usage_exit_code == EX_USAGE) ? EXIT_SUCCESS : usage_exit_code;
+ int exit_code = (usage_exit_code == AO_EXIT_REQ_USAGE)
+ ? EXIT_SUCCESS : usage_exit_code;
- displayEnum = AG_FALSE;
+ displayEnum = false;
+ set_usage_flags(opts, NULL);
/*
* Paged usage will preset option_usage_fp to an output file.
@@ -344,111 +586,273 @@ optionUsage(tOptions * pOptions, int usage_exit_code)
char const * pz;
if (exit_code == EXIT_SUCCESS) {
- pz = (pOptions->structVersion >= 30 * 4096)
- ? pOptions->pzFullUsage : NULL;
+ pz = (opts->structVersion >= 30 * 4096)
+ ? opts->pzFullUsage : NULL;
if (option_usage_fp == NULL)
- option_usage_fp = stdout;
+ option_usage_fp = print_exit ? stderr : stdout;
+
} else {
- pz = (pOptions->structVersion >= 30 * 4096)
- ? pOptions->pzShortUsage : NULL;
+ pz = (opts->structVersion >= 30 * 4096)
+ ? opts->pzShortUsage : NULL;
if (option_usage_fp == NULL)
option_usage_fp = stderr;
}
- if (pz != NULL) {
- fputs(pz, option_usage_fp);
- exit(exit_code);
+ if (((opts->fOptSet & OPTPROC_COMPUTE) == 0) && (pz != NULL)) {
+ if ((opts->fOptSet & OPTPROC_TRANSLATE) != 0)
+ optionPrintParagraphs(pz, true, option_usage_fp);
+ else
+ fputs(pz, option_usage_fp);
+ goto flush_and_exit;
}
}
- fprintf(option_usage_fp, pOptions->pzUsageTitle, pOptions->pzProgName);
- set_usage_flags(pOptions, NULL);
+ fprintf(option_usage_fp, opts->pzUsageTitle, opts->pzProgName);
if ((exit_code == EXIT_SUCCESS) ||
- (! skip_misuse_usage(pOptions)))
+ (! skip_misuse_usage(opts)))
- print_usage_details(pOptions, usage_exit_code);
+ print_usage_details(opts, usage_exit_code);
+ else
+ print_offer_usage(opts);
+
+ flush_and_exit:
+ fflush(option_usage_fp);
+ if (ferror(option_usage_fp) != 0)
+ fserr_exit(opts->pzProgName, zwriting, (option_usage_fp == stdout)
+ ? zstdout_name : zstderr_name);
- exit(exit_code);
+ option_exits(exit_code);
}
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* PER OPTION TYPE USAGE INFORMATION
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * print option conflicts.
+ *
+ * @param opts the program option descriptor
+ * @param od the option descriptor
*/
static void
-prt_extd_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
+prt_conflicts(tOptions * opts, tOptDesc * od)
{
+ const int * opt_no;
+ fputs(zTabHyp + tab_skip_ct, option_usage_fp);
+
/*
- * IF there are option conflicts or dependencies,
- * THEN print them here.
+ * REQUIRED:
*/
- if ( (pOD->pOptMust != NULL)
- || (pOD->pOptCant != NULL) ) {
-
- fputs(zTabHyp, option_usage_fp);
-
- /*
- * DEPENDENCIES:
- */
- if (pOD->pOptMust != NULL) {
- const int* pOptNo = pOD->pOptMust;
+ if (od->pOptMust != NULL) {
+ opt_no = od->pOptMust;
+ if (opt_no[1] == NO_EQUIVALENT) {
+ fprintf(option_usage_fp, zReqOne,
+ opts->pOptDesc[*opt_no].pz_Name);
+ } else {
fputs(zReqThese, option_usage_fp);
for (;;) {
- fprintf(option_usage_fp, zTabout,
- pOptions->pOptDesc[*pOptNo].pz_Name);
- if (*++pOptNo == NO_EQUIVALENT)
+ fprintf(option_usage_fp, zTabout + tab_skip_ct,
+ opts->pOptDesc[*opt_no].pz_Name);
+ if (*++opt_no == NO_EQUIVALENT)
break;
}
-
- if (pOD->pOptCant != NULL)
- fputs(zTabHypAnd, option_usage_fp);
}
+ if (od->pOptCant != NULL)
+ fputs(zTabHypAnd + tab_skip_ct, option_usage_fp);
+ }
+
+ /*
+ * CONFLICTS:
+ */
+ if (od->pOptCant == NULL)
+ return;
+
+ opt_no = od->pOptCant;
+
+ if (opt_no[1] == NO_EQUIVALENT) {
+ fprintf(option_usage_fp, zProhibOne,
+ opts->pOptDesc[*opt_no].pz_Name);
+ return;
+ }
+
+ fputs(zProhib, option_usage_fp);
+ for (;;) {
+ fprintf(option_usage_fp, zTabout + tab_skip_ct,
+ opts->pOptDesc[*opt_no].pz_Name);
+ if (*++opt_no == NO_EQUIVALENT)
+ break;
+ }
+}
+
+/**
+ * Print the usage information for a single vendor option.
+ *
+ * @param[in] opts the program option descriptor
+ * @param[in] od the option descriptor
+ * @param[in] argtp names of the option argument types
+ * @param[in] usefmt format for primary usage line
+ */
+static void
+prt_one_vendor(tOptions * opts, tOptDesc * od,
+ arg_types_t * argtp, char const * usefmt)
+{
+ prt_preamble(opts, od, argtp);
+
+ {
+ char z[ 80 ];
+ char const * pzArgType;
+
/*
- * CONFLICTS:
+ * Determine the argument type string first on its usage, then,
+ * when the option argument is required, base the type string on the
+ * argument type.
*/
- if (pOD->pOptCant != NULL) {
- const int* pOptNo = pOD->pOptCant;
+ if (od->fOptState & OPTST_ARG_OPTIONAL) {
+ pzArgType = argtp->pzOpt;
+
+ } else switch (OPTST_GET_ARGTYPE(od->fOptState)) {
+ case OPARG_TYPE_NONE: pzArgType = argtp->pzNo; break;
+ case OPARG_TYPE_ENUMERATION: pzArgType = argtp->pzKey; break;
+ case OPARG_TYPE_FILE: pzArgType = argtp->pzFile; break;
+ case OPARG_TYPE_MEMBERSHIP: pzArgType = argtp->pzKeyL; break;
+ case OPARG_TYPE_BOOLEAN: pzArgType = argtp->pzBool; break;
+ case OPARG_TYPE_NUMERIC: pzArgType = argtp->pzNum; break;
+ case OPARG_TYPE_HIERARCHY: pzArgType = argtp->pzNest; break;
+ case OPARG_TYPE_STRING: pzArgType = argtp->pzStr; break;
+ case OPARG_TYPE_TIME: pzArgType = argtp->pzTime; break;
+ default: goto bogus_desc;
+ }
- fputs(zProhib, option_usage_fp);
- for (;;) {
- fprintf(option_usage_fp, zTabout,
- pOptions->pOptDesc[*pOptNo].pz_Name);
- if (*++pOptNo == NO_EQUIVALENT)
- break;
- }
+ pzArgType = SPN_WHITESPACE_CHARS(pzArgType);
+ if (*pzArgType == NUL)
+ snprintf(z, sizeof(z), "%s", od->pz_Name);
+ else
+ snprintf(z, sizeof(z), "%s=%s", od->pz_Name, pzArgType);
+ fprintf(option_usage_fp, usefmt, z, od->pzText);
+
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
+ case OPARG_TYPE_ENUMERATION:
+ case OPARG_TYPE_MEMBERSHIP:
+ displayEnum = (od->pOptProc != NULL) ? true : displayEnum;
}
}
+ return;
+
+ bogus_desc:
+ fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name);
+ ao_bug(zbad_arg_type_msg);
+}
+
+/**
+ * Print the long options processed with "-W". These options will be the
+ * ones that do *not* have flag characters.
+ *
+ * @param opts the program option descriptor
+ * @param title the title for the options
+ */
+static void
+prt_vendor_opts(tOptions * opts, char const * title)
+{
+ static unsigned int const not_vended_mask =
+ OPTST_NO_USAGE_MASK | OPTST_DOCUMENT;
+
+ static char const vfmtfmt[] = "%%-%us %%s\n";
+ char vfmt[sizeof(vfmtfmt)];
+
+ /*
+ * Only handle client specified options. The "vendor option" follows
+ * "presetOptCt", so we won't loop/recurse indefinitely.
+ */
+ int ct = opts->presetOptCt;
+ tOptDesc * od = opts->pOptDesc;
+ fprintf(option_usage_fp, zTabout + tab_skip_ct, zVendOptsAre);
+
+ {
+ size_t nmlen = 0;
+ do {
+ size_t l;
+ if ( ((od->fOptState & not_vended_mask) != 0)
+ || IS_GRAPHIC_CHAR(od->optValue))
+ continue;
+
+ l = strlen(od->pz_Name);
+ if (l > nmlen) nmlen = l;
+ } while (od++, (--ct > 0));
+
+ snprintf(vfmt, sizeof(vfmt), vfmtfmt, (unsigned int)nmlen + 4);
+ }
+
+ if (tab_skip_ct > 0)
+ tab_skip_ct--;
+
+ ct = opts->presetOptCt;
+ od = opts->pOptDesc;
+
+ do {
+ if ( ((od->fOptState & not_vended_mask) != 0)
+ || IS_GRAPHIC_CHAR(od->optValue))
+ continue;
+
+ prt_one_vendor(opts, od, &argTypes, vfmt);
+ prt_extd_usage(opts, od, title);
+
+ } while (od++, (--ct > 0));
+
+ /* no need to restore "tab_skip_ct" - options are done now */
+}
+
+/**
+ * Print extended usage. Usage/help was requested.
+ *
+ * @param opts the program option descriptor
+ * @param od the option descriptor
+ * @param title the title for the options
+ */
+static void
+prt_extd_usage(tOptions * opts, tOptDesc * od, char const * title)
+{
+ if ( ((opts->fOptSet & OPTPROC_VENDOR_OPT) != 0)
+ && (od->optActualValue == VENDOR_OPTION_VALUE)) {
+ prt_vendor_opts(opts, title);
+ return;
+ }
+
+ /*
+ * IF there are option conflicts or dependencies,
+ * THEN print them here.
+ */
+ if ((od->pOptMust != NULL) || (od->pOptCant != NULL))
+ prt_conflicts(opts, od);
+
/*
* IF there is a disablement string
* THEN print the disablement info
*/
- if (pOD->pz_DisableName != NULL )
- fprintf(option_usage_fp, zDis, pOD->pz_DisableName);
+ if (od->pz_DisableName != NULL )
+ fprintf(option_usage_fp, zDis + tab_skip_ct, od->pz_DisableName);
/*
* Check for argument types that have callbacks with magical properties
*/
- switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_NUMERIC:
/*
* IF the numeric option has a special callback,
* THEN call it, requesting the range or other special info
*/
- if ( (pOD->pOptProc != NULL)
- && (pOD->pOptProc != optionNumericVal) ) {
- (*(pOD->pOptProc))(OPTPROC_EMIT_USAGE, pOD);
+ if ( (od->pOptProc != NULL)
+ && (od->pOptProc != optionNumericVal) ) {
+ (*(od->pOptProc))(OPTPROC_EMIT_USAGE, od);
}
break;
case OPARG_TYPE_FILE:
- (*(pOD->pOptProc))(OPTPROC_EMIT_USAGE, pOD);
+ (*(od->pOptProc))(OPTPROC_EMIT_USAGE, od);
break;
}
@@ -456,18 +860,18 @@ prt_extd_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
* IF the option defaults to being enabled,
* THEN print that out
*/
- if (pOD->fOptState & OPTST_INITENABLED)
- fputs(zEnab, option_usage_fp);
+ if (od->fOptState & OPTST_INITENABLED)
+ fputs(zEnab + tab_skip_ct, option_usage_fp);
/*
* IF the option is in an equivalence class
* AND not the designated lead
* THEN print equivalence and leave it at that.
*/
- if ( (pOD->optEquivIndex != NO_EQUIVALENT)
- && (pOD->optEquivIndex != pOD->optActualIndex ) ) {
- fprintf(option_usage_fp, zAlt,
- pOptions->pOptDesc[ pOD->optEquivIndex ].pz_Name);
+ if ( (od->optEquivIndex != NO_EQUIVALENT)
+ && (od->optEquivIndex != od->optActualIndex ) ) {
+ fprintf(option_usage_fp, zalt_opt + tab_skip_ct,
+ opts->pOptDesc[ od->optEquivIndex ].pz_Name);
return;
}
@@ -477,32 +881,33 @@ prt_extd_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
* AND it is not an auto-managed option (e.g. --help, et al.)
* THEN advise that this option may not be preset.
*/
- if ( ((pOD->fOptState & OPTST_NO_INIT) != 0)
- && ( (pOptions->papzHomeList != NULL)
- || (pOptions->pzPROGNAME != NULL)
+ if ( ((od->fOptState & OPTST_NO_INIT) != 0)
+ && ( (opts->papzHomeList != NULL)
+ || (opts->pzPROGNAME != NULL)
)
- && (pOD->optIndex < pOptions->presetOptCt)
+ && (od->optIndex < opts->presetOptCt)
)
- fputs(zNoPreset, option_usage_fp);
+ fputs(zNoPreset + tab_skip_ct, option_usage_fp);
/*
* Print the appearance requirements.
*/
- if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP)
- fputs(zMembers, option_usage_fp);
+ if (OPTST_GET_ARGTYPE(od->fOptState) == OPARG_TYPE_MEMBERSHIP)
+ fputs(zMembers + tab_skip_ct, option_usage_fp);
- else switch (pOD->optMinCt) {
+ else switch (od->optMinCt) {
case 1:
case 0:
- switch (pOD->optMaxCt) {
- case 0: fputs(zPreset, option_usage_fp); break;
- case NOLIMIT: fputs(zNoLim, option_usage_fp); break;
+ switch (od->optMaxCt) {
+ case 0: fputs(zPreset + tab_skip_ct, option_usage_fp); break;
+ case NOLIMIT: fputs(zNoLim + tab_skip_ct, option_usage_fp); break;
case 1: break;
/*
* IF the max is more than one but limited, print "UP TO" message
*/
- default: fprintf(option_usage_fp, zUpTo, pOD->optMaxCt); break;
+ default:
+ fprintf(option_usage_fp, zUpTo + tab_skip_ct, od->optMaxCt); break;
}
break;
@@ -510,80 +915,86 @@ prt_extd_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
/*
* More than one is required. Print the range.
*/
- fprintf(option_usage_fp, zMust, pOD->optMinCt, pOD->optMaxCt);
+ fprintf(option_usage_fp, zMust + tab_skip_ct,
+ od->optMinCt, od->optMaxCt);
}
- if ( NAMED_OPTS(pOptions)
- && (pOptions->specOptIdx.default_opt == pOD->optIndex))
- fputs(zDefaultOpt, option_usage_fp);
+ if ( NAMED_OPTS(opts)
+ && (opts->specOptIdx.default_opt == od->optIndex))
+ fputs(zDefaultOpt + tab_skip_ct, option_usage_fp);
}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Figure out where all the initialization files might live. This requires
+ * translating some environment variables and testing to see if a name is a
+ * directory or a file. It's squishy, but important to tell users how to
+ * find these files.
*
- * Figure out where all the initialization files might live.
- * This requires translating some environment variables and
- * testing to see if a name is a directory or a file. It's
- * squishy, but important to tell users how to find these files.
+ * @param[in] papz search path
+ * @param[out] ini_file an output buffer of AG_PATH_MAX+1 bytes
+ * @param[in] path_nm the name of the file we're hunting for
*/
static void
-prt_ini_list(char const * const * papz, ag_bool * pInitIntro,
- char const * pzRc, char const * pzPN)
+prt_ini_list(char const * const * papz, char const * ini_file,
+ char const * path_nm)
{
- char zPath[AG_PATH_MAX+1];
-
- if (papz == NULL)
- return;
+ char pth_buf[AG_PATH_MAX+1];
fputs(zPresetIntro, option_usage_fp);
- *pInitIntro = AG_FALSE;
for (;;) {
- char const * pzPath = *(papz++);
- char const * pzReal = zPath;
+ char const * path = *(papz++);
+ char const * nm_buf = pth_buf;
- if (pzPath == NULL)
+ if (path == NULL)
break;
/*
* Ignore any invalid paths
*/
- if (! optionMakePath(zPath, (int)sizeof(zPath), pzPath, pzPN))
- pzReal = pzPath;
+ if (! optionMakePath(pth_buf, (int)sizeof(pth_buf), path, path_nm))
+ nm_buf = path;
/*
* Expand paths that are relative to the executable or installation
* directories. Leave alone paths that use environment variables.
*/
- else if ((*pzPath == '$')
- && ((pzPath[1] == '$') || (pzPath[1] == '@')))
- pzPath = pzReal;
+ else if ((*path == '$')
+ && ((path[1] == '$') || (path[1] == '@')))
+ path = nm_buf;
/*
* Print the name of the "homerc" file. If the "rcfile" name is
* not empty, we may or may not print that, too...
*/
- fprintf(option_usage_fp, zPathFmt, pzPath);
- if (*pzRc != NUL) {
+ fprintf(option_usage_fp, zPathFmt, path);
+ if (*ini_file != NUL) {
struct stat sb;
/*
* IF the "homerc" file is a directory,
* then append the "rcfile" name.
*/
- if ((stat(pzReal, &sb) == 0) && S_ISDIR(sb.st_mode)) {
- fputc(DIRCH, option_usage_fp);
- fputs(pzRc, option_usage_fp);
+ if ((stat(nm_buf, &sb) == 0) && S_ISDIR(sb.st_mode)) {
+ fputc(DIRCH, option_usage_fp);
+ fputs(ini_file, option_usage_fp);
}
}
- fputc('\n', option_usage_fp);
+ fputc(NL, option_usage_fp);
}
}
-
+/**
+ * Print the usage line preamble text
+ *
+ * @param opts the program option descriptor
+ * @param od the option descriptor
+ * @param at names of the option argument types
+ */
static void
-prt_preamble(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
+prt_preamble(tOptions * opts, tOptDesc * od, arg_types_t * at)
{
/*
* Flag prefix: IF no flags at all, then omit it. If not printable
@@ -591,88 +1002,104 @@ prt_preamble(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
* Follow it with a comma if we are doing GNU usage and long
* opts are to be printed too.
*/
- if ((pOptions->fOptSet & OPTPROC_SHORTOPT) == 0)
- fputs(pAT->pzSpc, option_usage_fp);
+ if ((opts->fOptSet & OPTPROC_SHORTOPT) == 0)
+ fputs(at->pzSpc, option_usage_fp);
- else if (! IS_GRAPHIC_CHAR(pOD->optValue)) {
- if ( (pOptions->fOptSet & (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
+ else if (! IS_GRAPHIC_CHAR(od->optValue)) {
+ if ( (opts->fOptSet & (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
== (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
fputc(' ', option_usage_fp);
- fputs(pAT->pzNoF, option_usage_fp);
+ fputs(at->pzNoF, option_usage_fp);
} else {
- fprintf(option_usage_fp, " -%c", pOD->optValue);
- if ( (pOptions->fOptSet & (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
+ fprintf(option_usage_fp, " -%c", od->optValue);
+ if ( (opts->fOptSet & (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
== (OPTPROC_GNUUSAGE|OPTPROC_LONGOPT))
fputs(", ", option_usage_fp);
}
}
-/*
+/**
* Print the usage information for a single option.
+ *
+ * @param opts the program option descriptor
+ * @param od the option descriptor
+ * @param at names of the option argument types
*/
static void
-prt_one_usage(tOptions * pOptions, tOptDesc * pOD, arg_types_t * pAT)
+prt_one_usage(tOptions * opts, tOptDesc * od, arg_types_t * at)
{
- prt_preamble(pOptions, pOD, pAT);
+ prt_preamble(opts, od, at);
{
- char z[ 80 ];
- char const * pzArgType;
+ char z[80];
+ char const * atyp;
/*
* Determine the argument type string first on its usage, then,
* when the option argument is required, base the type string on the
* argument type.
*/
- if (pOD->fOptState & OPTST_ARG_OPTIONAL) {
- pzArgType = pAT->pzOpt;
-
- } else switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
- case OPARG_TYPE_NONE: pzArgType = pAT->pzNo; break;
- case OPARG_TYPE_ENUMERATION: pzArgType = pAT->pzKey; break;
- case OPARG_TYPE_FILE: pzArgType = pAT->pzFile; break;
- case OPARG_TYPE_MEMBERSHIP: pzArgType = pAT->pzKeyL; break;
- case OPARG_TYPE_BOOLEAN: pzArgType = pAT->pzBool; break;
- case OPARG_TYPE_NUMERIC: pzArgType = pAT->pzNum; break;
- case OPARG_TYPE_HIERARCHY: pzArgType = pAT->pzNest; break;
- case OPARG_TYPE_STRING: pzArgType = pAT->pzStr; break;
- case OPARG_TYPE_TIME: pzArgType = pAT->pzTime; break;
+ if (od->fOptState & OPTST_ARG_OPTIONAL) {
+ atyp = at->pzOpt;
+
+ } else switch (OPTST_GET_ARGTYPE(od->fOptState)) {
+ case OPARG_TYPE_NONE: atyp = at->pzNo; break;
+ case OPARG_TYPE_ENUMERATION: atyp = at->pzKey; break;
+ case OPARG_TYPE_FILE: atyp = at->pzFile; break;
+ case OPARG_TYPE_MEMBERSHIP: atyp = at->pzKeyL; break;
+ case OPARG_TYPE_BOOLEAN: atyp = at->pzBool; break;
+ case OPARG_TYPE_NUMERIC: atyp = at->pzNum; break;
+ case OPARG_TYPE_HIERARCHY: atyp = at->pzNest; break;
+ case OPARG_TYPE_STRING: atyp = at->pzStr; break;
+ case OPARG_TYPE_TIME: atyp = at->pzTime; break;
default: goto bogus_desc;
}
- snprintf(z, sizeof(z), pAT->pzOptFmt, pzArgType, pOD->pz_Name,
- (pOD->optMinCt != 0) ? pAT->pzReq : pAT->pzOpt);
+#ifdef _WIN32
+ if (at->pzOptFmt == zGnuOptFmt)
+ snprintf(z, sizeof(z), "--%s%s", od->pz_Name, atyp);
+ else if (at->pzOptFmt == zGnuOptFmt + 2)
+ snprintf(z, sizeof(z), "%s%s", od->pz_Name, atyp);
+ else
+#endif
+ snprintf(z, sizeof(z), at->pzOptFmt, atyp, od->pz_Name,
+ (od->optMinCt != 0) ? at->pzReq : at->pzOpt);
- fprintf(option_usage_fp, zOptFmtLine, z, pOD->pzText);
+ fprintf(option_usage_fp, line_fmt_buf, z, od->pzText);
- switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_ENUMERATION:
case OPARG_TYPE_MEMBERSHIP:
- displayEnum = (pOD->pOptProc != NULL) ? AG_TRUE : displayEnum;
+ displayEnum = (od->pOptProc != NULL) ? true : displayEnum;
}
}
+
return;
bogus_desc:
- fprintf(stderr, zInvalOptDesc, pOD->pz_Name);
- exit(EX_SOFTWARE);
+ fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name);
+ option_exits(EX_SOFTWARE);
}
-
-/*
+/**
* Print out the usage information for just the options.
*/
static void
-prt_opt_usage(tOptions * pOpts, int ex_code, char const * pOptTitle)
+prt_opt_usage(tOptions * opts, int ex_code, char const * title)
{
- int ct = pOpts->optCt;
+ int ct = opts->optCt;
int optNo = 0;
- tOptDesc * pOD = pOpts->pOptDesc;
+ tOptDesc * od = opts->pOptDesc;
int docCt = 0;
do {
- if ((pOD->fOptState & OPTST_NO_USAGE_MASK) != 0) {
+ /*
+ * no usage --> disallowed on command line (OPTST_NO_COMMAND), or
+ * deprecated -- strongly discouraged (OPTST_DEPRECATED), or
+ * compiled out of current object code (OPTST_OMITTED)
+ */
+ if ((od->fOptState & OPTST_NO_USAGE_MASK) != 0) {
/*
* IF this is a compiled-out option
@@ -680,29 +1107,34 @@ prt_opt_usage(tOptions * pOpts, int ex_code, char const * pOptTitle)
* *AND* this is NOT abbreviated usage
* THEN display this option.
*/
- if ( (pOD->fOptState == (OPTST_OMITTED | OPTST_NO_INIT))
- && (pOD->pz_Name != NULL)
+ if ( (od->fOptState == (OPTST_OMITTED | OPTST_NO_INIT))
+ && (od->pz_Name != NULL)
&& (ex_code == EXIT_SUCCESS)) {
char const * why_pz =
- (pOD->pzText == NULL) ? zDisabledWhy : pOD->pzText;
- prt_preamble(pOpts, pOD, &argTypes);
- fprintf(option_usage_fp, zDisabledOpt, pOD->pz_Name, why_pz);
+ (od->pzText == NULL) ? zDisabledWhy : od->pzText;
+ prt_preamble(opts, od, &argTypes);
+ fprintf(option_usage_fp, zDisabledOpt, od->pz_Name, why_pz);
}
continue;
}
- if ((pOD->fOptState & OPTST_DOCUMENT) != 0) {
+ if ((od->fOptState & OPTST_DOCUMENT) != 0) {
if (ex_code == EXIT_SUCCESS) {
- fprintf(option_usage_fp, argTypes.pzBrk, pOD->pzText,
- pOptTitle);
+ fprintf(option_usage_fp, argTypes.pzBrk, od->pzText,
+ title);
docCt++;
}
continue;
}
+ /* Skip name only options when we have a vendor option */
+ if ( ((opts->fOptSet & OPTPROC_VENDOR_OPT) != 0)
+ && (! IS_GRAPHIC_CHAR(od->optValue)))
+ continue;
+
/*
* IF this is the first auto-opt maintained option
* *AND* we are doing a full help
@@ -710,50 +1142,56 @@ prt_opt_usage(tOptions * pOpts, int ex_code, char const * pOptTitle)
* *AND* the last one was not a doc option,
* THEN document that the remaining options are not user opts
*/
- if ( (pOpts->presetOptCt == optNo)
- && (ex_code == EXIT_SUCCESS)
- && (docCt > 0)
- && ((pOD[-1].fOptState & OPTST_DOCUMENT) == 0) )
- fprintf(option_usage_fp, argTypes.pzBrk, zAuto, pOptTitle);
+ if ((docCt > 0) && (ex_code == EXIT_SUCCESS)) {
+ if (opts->presetOptCt == optNo) {
+ if ((od[-1].fOptState & OPTST_DOCUMENT) == 0)
+ fprintf(option_usage_fp, argTypes.pzBrk, zAuto, title);
+
+ } else if ((ct == 1) &&
+ (opts->fOptSet & OPTPROC_VENDOR_OPT))
+ fprintf(option_usage_fp, argTypes.pzBrk, zVendIntro, title);
+ }
- prt_one_usage(pOpts, pOD, &argTypes);
+ prt_one_usage(opts, od, &argTypes);
/*
* IF we were invoked because of the --help option,
* THEN print all the extra info
*/
if (ex_code == EXIT_SUCCESS)
- prt_extd_usage(pOpts, pOD, &argTypes);
+ prt_extd_usage(opts, od, title);
- } while (pOD++, optNo++, (--ct > 0));
+ } while (od++, optNo++, (--ct > 0));
- fputc('\n', option_usage_fp);
+ fputc(NL, option_usage_fp);
}
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * PROGRAM DETAILS
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Print program details.
+ * @param[in] opts the program option descriptor
*/
static void
-prt_prog_detail(tOptions* pOptions)
+prt_prog_detail(tOptions * opts)
{
- ag_bool initIntro = AG_TRUE;
+ bool need_intro = (opts->papzHomeList == NULL);
/*
- * Display all the places we look for config files
+ * Display all the places we look for config files, if we have
+ * a list of directories to search.
*/
- prt_ini_list(pOptions->papzHomeList, &initIntro,
- pOptions->pzRcName, pOptions->pzProgPath);
+ if (! need_intro)
+ prt_ini_list(opts->papzHomeList, opts->pzRcName, opts->pzProgPath);
/*
* Let the user know about environment variable settings
*/
- if ((pOptions->fOptSet & OPTPROC_ENVIRON) != 0) {
- if (initIntro)
+ if ((opts->fOptSet & OPTPROC_ENVIRON) != 0) {
+ if (need_intro)
fputs(zPresetIntro, option_usage_fp);
- fprintf(option_usage_fp, zExamineFmt, pOptions->pzPROGNAME);
+ fprintf(option_usage_fp, zExamineFmt, opts->pzPROGNAME);
}
/*
@@ -762,26 +1200,26 @@ prt_prog_detail(tOptions* pOptions)
* option struct pointer. That tells it to display the keywords.
*/
if (displayEnum) {
- int ct = pOptions->optCt;
+ int ct = opts->optCt;
int optNo = 0;
- tOptDesc* pOD = pOptions->pOptDesc;
+ tOptDesc * od = opts->pOptDesc;
- fputc('\n', option_usage_fp);
+ fputc(NL, option_usage_fp);
fflush(option_usage_fp);
do {
- switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
+ switch (OPTST_GET_ARGTYPE(od->fOptState)) {
case OPARG_TYPE_ENUMERATION:
case OPARG_TYPE_MEMBERSHIP:
- (*(pOD->pOptProc))(OPTPROC_EMIT_USAGE, pOD);
+ (*(od->pOptProc))(OPTPROC_EMIT_USAGE, od);
}
- } while (pOD++, optNo++, (--ct > 0));
+ } while (od++, optNo++, (--ct > 0));
}
/*
* If there is a detail string, now is the time for that.
*/
- if (pOptions->pzDetail != NULL)
- fputs(pOptions->pzDetail, option_usage_fp);
+ if (opts->pzDetail != NULL)
+ fputs(opts->pzDetail, option_usage_fp);
}
@@ -800,10 +1238,11 @@ prt_prog_detail(tOptions* pOptions)
* Set up the formatting for GNU-style output
*/
static int
-setGnuOptFmts(tOptions* pOpts, tCC** ppT)
+setGnuOptFmts(tOptions * opts, char const ** ptxt)
{
+ static char const zOneSpace[] = " ";
int flen = 22;
- *ppT = zNoRq_ShrtTtl;
+ *ptxt = zNoRq_ShrtTtl;
argTypes.pzStr = zGnuStrArg;
argTypes.pzReq = zOneSpace;
@@ -820,7 +1259,7 @@ setGnuOptFmts(tOptions* pOpts, tCC** ppT)
argTypes.pzNoF = zSixSpaces;
argTypes.pzSpc = zThreeSpaces;
- switch (pOpts->fOptSet & OPTPROC_L_N_S) {
+ switch (opts->fOptSet & OPTPROC_L_N_S) {
case OPTPROC_L_N_S: argTypes.pzOptFmt = zGnuOptFmt; break;
case OPTPROC_LONGOPT: argTypes.pzOptFmt = zGnuOptFmt; break;
case 0: argTypes.pzOptFmt = zGnuOptFmt + 2; break;
@@ -840,7 +1279,7 @@ setGnuOptFmts(tOptions* pOpts, tCC** ppT)
* Standard (AutoOpts normal) option line formatting
*/
static int
-setStdOptFmts(tOptions* pOpts, tCC** ppT)
+setStdOptFmts(tOptions * opts, char const ** ptxt)
{
int flen = 0;
@@ -859,27 +1298,27 @@ setStdOptFmts(tOptions* pOpts, tCC** ppT)
argTypes.pzNoF = zFiveSpaces;
argTypes.pzSpc = zTwoSpaces;
- switch (pOpts->fOptSet & (OPTPROC_NO_REQ_OPT | OPTPROC_SHORTOPT)) {
+ switch (opts->fOptSet & (OPTPROC_NO_REQ_OPT | OPTPROC_SHORTOPT)) {
case (OPTPROC_NO_REQ_OPT | OPTPROC_SHORTOPT):
- *ppT = zNoRq_ShrtTtl;
+ *ptxt = zNoRq_ShrtTtl;
argTypes.pzOptFmt = zNrmOptFmt;
flen = 19;
break;
case OPTPROC_NO_REQ_OPT:
- *ppT = zNoRq_NoShrtTtl;
+ *ptxt = zNoRq_NoShrtTtl;
argTypes.pzOptFmt = zNrmOptFmt;
flen = 19;
break;
case OPTPROC_SHORTOPT:
- *ppT = zReq_ShrtTtl;
+ *ptxt = zReq_ShrtTtl;
argTypes.pzOptFmt = zReqOptFmt;
flen = 24;
break;
case 0:
- *ppT = zReq_NoShrtTtl;
+ *ptxt = zReq_NoShrtTtl;
argTypes.pzOptFmt = zReqOptFmt;
flen = 24;
}
@@ -887,8 +1326,8 @@ setStdOptFmts(tOptions* pOpts, tCC** ppT)
return flen;
}
-
-/*:
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/value-type.c b/sntp/libopts/value-type.c
deleted file mode 100644
index ff98c0a1ede1..000000000000
--- a/sntp/libopts/value-type.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
-
-
-#if 0 /* gperf build options: */
-// %struct-type
-// %language=ANSI-C
-// %includes
-// %global-table
-// %omit-struct-type
-// %readonly-tables
-// %compare-strncmp
-//
-// %define slot-name vtp_name
-// %define hash-function-name value_type_hash
-// %define lookup-function-name find_value_type_name
-// %define word-array-name value_type_table
-// %define initializer-suffix ,VTP_COUNT_KWD
-#endif /* gperf build options: */
-
-#include "value-type.h"
-
-typedef struct {
- char const * vtp_name;
- value_type_enum_t vtp_id;
-} value_type_map_t;
-#include <string.h>
-
-/* maximum key range = 20, duplicates = 0 */
-
-#ifdef __GNUC__
-#else
-#ifdef __cplusplus
-#endif
-#endif
-inline static unsigned int
-value_type_hash (register const char *str, register unsigned int len)
-{
- static const unsigned char asso_values[] =
- {
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 10, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 5, 23, 23, 5, 0, 0, 23, 15, 23,
- 23, 10, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23
- };
- return len + asso_values[(unsigned char)str[2]];
-}
-
-static const value_type_map_t value_type_table[] =
- {
- {"",VTP_COUNT_KWD}, {"",VTP_COUNT_KWD},
- {"",VTP_COUNT_KWD},
- {"set", VTP_KWD_SET},
- {"",VTP_COUNT_KWD}, {"",VTP_COUNT_KWD},
- {"nested", VTP_KWD_NESTED},
- {"integer", VTP_KWD_INTEGER},
- {"",VTP_COUNT_KWD},
- {"bool", VTP_KWD_BOOL},
- {"",VTP_COUNT_KWD},
- {"string", VTP_KWD_STRING},
- {"boolean", VTP_KWD_BOOLEAN},
- {"",VTP_COUNT_KWD},
- {"set-membership", VTP_KWD_SET_MEMBERSHIP},
- {"",VTP_COUNT_KWD}, {"",VTP_COUNT_KWD},
- {"keyword", VTP_KWD_KEYWORD},
- {"",VTP_COUNT_KWD},
- {"hierarchy", VTP_KWD_HIERARCHY},
- {"",VTP_COUNT_KWD}, {"",VTP_COUNT_KWD},
- {"invalid", VTP_KWD_INVALID}
- };
-
-#ifdef __GNUC__
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
-static inline const value_type_map_t *
-find_value_type_name (register const char *str, register unsigned int len)
-{
- if (len <= 14 && len >= 3)
- {
- register int key = value_type_hash (str, len);
-
- if (key <= 22 && key >= 0)
- {
- register const char *s = value_type_table[key].vtp_name;
-
- if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
- return &value_type_table[key];
- }
- }
- return 0;
-}
-
-
-value_type_enum_t
-find_value_type_id(char const * str, unsigned int len)
-{
- const value_type_map_t * p =
- find_value_type_name(str, len);
- return (p == 0) ? VTP_KWD_INVALID : p->vtp_id;
-}
diff --git a/sntp/libopts/value-type.h b/sntp/libopts/value-type.h
deleted file mode 100644
index 5ff917cb9e7c..000000000000
--- a/sntp/libopts/value-type.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Generated header for gperf generated source Fri Apr 29 15:43:59 PDT 2011
- * This file enumerates the list of names and declares the
- * procedure for mapping string names to the enum value.
- */
-#ifndef AUTOOPTS_VALUE_TYPE_H_GUARD
-#define AUTOOPTS_VALUE_TYPE_H_GUARD 1
-
-typedef enum {
- VTP_KWD_INVALID,
- VTP_KWD_STRING,
- VTP_KWD_INTEGER,
- VTP_KWD_BOOLEAN,
- VTP_KWD_BOOL,
- VTP_KWD_KEYWORD,
- VTP_KWD_SET,
- VTP_KWD_SET_MEMBERSHIP,
- VTP_KWD_NESTED,
- VTP_KWD_HIERARCHY,
- VTP_COUNT_KWD
-} value_type_enum_t;
-
-extern value_type_enum_t
-find_value_type_id(char const * str, unsigned int len);
-#endif /* AUTOOPTS_VALUE_TYPE_H_GUARD */
diff --git a/sntp/libopts/version.c b/sntp/libopts/version.c
index aae1b87485c8..1516c147f889 100644
--- a/sntp/libopts/version.c
+++ b/sntp/libopts/version.c
@@ -1,15 +1,16 @@
-/*
- * Time-stamp: "2011-04-22 12:54:28 bkorb"
+/** \file version.c
*
* This module implements the default usage procedure for
* Automated Options. It may be overridden, of course.
+ *
+ * @addtogroup autoopts
+ * @{
*/
-
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
- * AutoOpts is Copyright (c) 1992-2011 by Bruce Korb - all rights reserved
+ * AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -21,11 +22,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
- * These files have the following md5sums:
+ * These files have the following sha256 sums:
*
- * 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
- * 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
- * 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
+ * 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
+ * 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
+ * 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*=export_func optionVersion
@@ -40,147 +41,194 @@
char const*
optionVersion(void)
{
- static char const zVersion[] =
- STR(AO_CURRENT.AO_REVISION);
-
- return zVersion;
+ static char const ver[] = OPTIONS_DOTTED_VERSION;
+ return ver;
}
static void
-emit_simple_ver(tOptions * pOpts, FILE * fp)
+emit_first_line(
+ FILE * fp, char const * alt1, char const * alt2, char const * alt3)
{
- if (pOpts->pzFullVersion != NULL)
- fputs(pOpts->pzFullVersion, fp);
-
- else if (pOpts->pzCopyright != NULL) {
- char const * pe = strchr(pOpts->pzCopyright, '\n');
- if (pe == NULL)
- pe = pOpts->pzCopyright + strlen(pOpts->pzCopyright);
- fwrite(pOpts->pzCopyright, 1, pe - pOpts->pzCopyright, fp);
- }
-
- else {
- char const * pe = strchr(pOpts->pzUsageTitle, '\n');
- if (pe == NULL)
- pe = pOpts->pzUsageTitle + strlen(pOpts->pzUsageTitle);
- fwrite(pOpts->pzUsageTitle, 1, pe - pOpts->pzCopyright, fp);
- }
- fputc('\n', fp);
+ char const * p = (alt1 != NULL) ? alt1 : ((alt2 != NULL) ? alt2 : alt3);
+ char const * e;
+ if (p == NULL)
+ return;
+ e = strchr(p, NL);
+ if (e == NULL)
+ fputs(p, fp);
+ else
+ fwrite(p, 1, (e - p), fp);
+ fputc(NL, fp);
}
+/**
+ * Select among various ways to emit version information.
+ *
+ * @param[in] o the option descriptor
+ * @param[in] fp the output stream
+ */
static void
-emit_copy_ver(tOptions * pOpts, FILE * fp)
+emit_simple_ver(tOptions * o, FILE * fp)
{
- if (pOpts->pzCopyright != NULL)
- fputs(pOpts->pzCopyright, fp);
-
- else if (pOpts->pzFullVersion != NULL)
- fputs(pOpts->pzFullVersion, fp);
-
- else {
- char const * pe = strchr(pOpts->pzUsageTitle, '\n');
- if (pe == NULL)
- pe = pOpts->pzUsageTitle + strlen(pOpts->pzUsageTitle);
- fwrite(pOpts->pzUsageTitle, 1, pe - pOpts->pzCopyright, fp);
- }
-
- fputc('\n', fp);
-
- if (HAS_pzPkgDataDir(pOpts) && (pOpts->pzPackager != NULL))
- fputs(pOpts->pzPackager, fp);
-
- else if (pOpts->pzBugAddr != NULL)
- fprintf(fp, zPlsSendBugs, pOpts->pzBugAddr);
+ emit_first_line(fp, o->pzFullVersion, o->pzCopyright, o->pzUsageTitle);
}
+/**
+ * print the version with a copyright notice.
+ *
+ * @param[in] o the option descriptor
+ * @param[in] fp the output stream
+ */
static void
-emit_copy_note(tOptions * pOpts, FILE * fp)
+emit_copy_full(tOptions * o, FILE * fp)
{
- if (pOpts->pzCopyright != NULL) {
- fputs(pOpts->pzCopyright, fp);
- fputc('\n', fp);
+ if (o->pzCopyright != NULL)
+ fputs(o->pzCopyright, fp);
+
+ else if (o->pzFullVersion != NULL)
+ fputs(o->pzFullVersion, fp);
+
+ else
+ emit_first_line(fp, o->pzUsageTitle, NULL, NULL);
+
+ if (HAS_pzPkgDataDir(o) && (o->pzPackager != NULL)) {
+ fputc(NL, fp);
+ fputs(o->pzPackager, fp);
+
+ } else if (o->pzBugAddr != NULL) {
+ fputc(NL, fp);
+ fprintf(fp, zPlsSendBugs, o->pzBugAddr);
}
+}
- if (pOpts->pzCopyNotice != NULL) {
- fputs(pOpts->pzCopyNotice, fp);
- fputc('\n', fp);
+/**
+ * print the version and any copyright notice.
+ * The version with a full copyright and additional notes.
+ *
+ * @param[in] opts the option descriptor
+ * @param[in] fp the output stream
+ */
+static void
+emit_copy_note(tOptions * opts, FILE * fp)
+{
+ if (opts->pzCopyright != NULL)
+ fputs(opts->pzCopyright, fp);
+
+ if (opts->pzCopyNotice != NULL)
+ fputs(opts->pzCopyNotice, fp);
+
+ fputc(NL, fp);
+ fprintf(fp, zao_ver_fmt, optionVersion());
+
+ if (HAS_pzPkgDataDir(opts) && (opts->pzPackager != NULL)) {
+ fputc(NL, fp);
+ fputs(opts->pzPackager, fp);
+
+ } else if (opts->pzBugAddr != NULL) {
+ fputc(NL, fp);
+ fprintf(fp, zPlsSendBugs, opts->pzBugAddr);
}
-
- fprintf(fp, zAO_Ver, optionVersion());
-
- if (HAS_pzPkgDataDir(pOpts) && (pOpts->pzPackager != NULL))
- fputs(pOpts->pzPackager, fp);
-
- else if (pOpts->pzBugAddr != NULL)
- fprintf(fp, zPlsSendBugs, pOpts->pzBugAddr);
}
+/**
+ * Handle the version printing. We must see how much information
+ * is being requested and select the correct printing routine.
+ */
static void
-print_ver(tOptions * pOpts, tOptDesc * pOD, FILE * fp)
+print_ver(tOptions * opts, tOptDesc * od, FILE * fp, bool call_exit)
{
char ch;
+ if (opts <= OPTPROC_EMIT_LIMIT)
+ return;
+
/*
- * IF the optional argument flag is off, or the argument
- * is not provided, then just print the version.
+ * IF we have an argument for this option, use it
+ * Otherwise, default to version only or copyright note,
+ * depending on whether the layout is GNU standard form or not.
*/
- if ( ((pOD->fOptState & OPTST_ARG_OPTIONAL) == 0)
- || (pOD->optArg.argString == NULL))
- ch = 'v';
- else ch = pOD->optArg.argString[0];
+ if ( (od->fOptState & OPTST_ARG_OPTIONAL)
+ && (od->optArg.argString != NULL)
+ && (od->optArg.argString[0] != NUL))
+
+ ch = od->optArg.argString[0];
+
+ else {
+ set_usage_flags(opts, NULL);
+ ch = (opts->fOptSet & OPTPROC_GNUUSAGE) ? 'c' : 'v';
+ }
switch (ch) {
case NUL: /* arg provided, but empty */
- case 'v': case 'V': emit_simple_ver(pOpts, fp); break;
- case 'c': case 'C': emit_copy_ver(pOpts, fp); break;
- case 'n': case 'N': emit_copy_note(pOpts, fp); break;
+ case 'v': case 'V': emit_simple_ver(opts, fp); break;
+ case 'c': case 'C': emit_copy_full( opts, fp); break;
+ case 'n': case 'N': emit_copy_note( opts, fp); break;
default:
fprintf(stderr, zBadVerArg, ch);
- exit(EXIT_FAILURE);
+ option_exits(EXIT_FAILURE);
}
fflush(fp);
- if (ferror(fp) != 0) {
- fputs(zOutputFail, stderr);
- exit(EXIT_FAILURE);
- }
- exit(EXIT_SUCCESS);
+ if (ferror(fp))
+ fserr_exit(opts->pzProgName, zwriting,
+ (fp == stdout) ? zstdout_name : zstderr_name);
+
+ if (call_exit)
+ option_exits(EXIT_SUCCESS);
}
/*=export_func optionPrintVersion
- * private:
*
* what: Print the program version
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* This routine will print the version to stdout.
=*/
void
-optionPrintVersion(tOptions * pOpts, tOptDesc * pOD)
+optionPrintVersion(tOptions * opts, tOptDesc * od)
{
- print_ver(pOpts, pOD, stdout);
+ print_ver(opts, od, print_exit ? stderr : stdout, true);
+}
+
+/*=export_func optionPrintVersionAndReturn
+ *
+ * what: Print the program version
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
+ *
+ * doc:
+ * This routine will print the version to stdout and return
+ * instead of exiting. Please see the source for the
+ * @code{print_ver} funtion for details on selecting how
+ * verbose to be after this function returns.
+=*/
+void
+optionPrintVersionAndReturn(tOptions * opts, tOptDesc * od)
+{
+ print_ver(opts, od, print_exit ? stderr : stdout, false);
}
/*=export_func optionVersionStderr
* private:
*
* what: Print the program version to stderr
- * arg: + tOptions* + pOpts + program options descriptor +
- * arg: + tOptDesc* + pOptDesc + the descriptor for this arg +
+ * arg: + tOptions* + opts + program options descriptor +
+ * arg: + tOptDesc* + od + the descriptor for this arg +
*
* doc:
* This routine will print the version to stderr.
=*/
void
-optionVersionStderr(tOptions * pOpts, tOptDesc * pOD)
+optionVersionStderr(tOptions * opts, tOptDesc * od)
{
- print_ver(pOpts, pOD, stderr);
+ print_ver(opts, od, stderr, true);
}
-/*
+/** @}
+ *
* Local Variables:
* mode: C
* c-file-style: "stroustrup"
diff --git a/sntp/libopts/xat-attribute.c b/sntp/libopts/xat-attribute.c
deleted file mode 100644
index db4753124082..000000000000
--- a/sntp/libopts/xat-attribute.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* ANSI-C code produced by gperf version 3.0.4 */
-
-
-#if 0 /* gperf build options: */
-// %struct-type
-// %language=ANSI-C
-// %includes
-// %global-table
-// %omit-struct-type
-// %readonly-tables
-// %compare-strncmp
-//
-// %define slot-name xat_name
-// %define hash-function-name xat_attribute_hash
-// %define lookup-function-name find_xat_attribute_name
-// %define word-array-name xat_attribute_table
-// %define initializer-suffix ,XAT_COUNT_KWD
-#endif /* gperf build options: */
-
-#include "xat-attribute.h"
-
-typedef struct {
- char const * xat_name;
- xat_attribute_enum_t xat_id;
-} xat_attribute_map_t;
-#include <string.h>
-
-/* maximum key range = 9, duplicates = 0 */
-
-#ifdef __GNUC__
-#else
-#ifdef __cplusplus
-#endif
-#endif
-inline static unsigned int
-xat_attribute_hash (register const char *str, register unsigned int len)
-{
- static const unsigned char asso_values[] =
- {
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 0,
- 13, 13, 13, 13, 13, 5, 13, 5, 13, 0,
- 13, 13, 13, 13, 13, 13, 0, 0, 13, 0,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 13
- };
- return len + asso_values[(unsigned char)str[0]];
-}
-
-static const xat_attribute_map_t xat_attribute_table[] =
- {
- {"",XAT_COUNT_KWD}, {"",XAT_COUNT_KWD},
- {"",XAT_COUNT_KWD}, {"",XAT_COUNT_KWD},
- {"type", XAT_KWD_TYPE},
- {"words", XAT_KWD_WORDS},
- {"cooked", XAT_KWD_COOKED},
- {"members", XAT_KWD_MEMBERS},
- {"uncooked", XAT_KWD_UNCOOKED},
- {"keep", XAT_KWD_KEEP},
- {"",XAT_COUNT_KWD}, {"",XAT_COUNT_KWD},
- {"invalid", XAT_KWD_INVALID}
- };
-
-#ifdef __GNUC__
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
-static inline const xat_attribute_map_t *
-find_xat_attribute_name (register const char *str, register unsigned int len)
-{
- if (len <= 8 && len >= 4)
- {
- register int key = xat_attribute_hash (str, len);
-
- if (key <= 12 && key >= 0)
- {
- register const char *s = xat_attribute_table[key].xat_name;
-
- if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
- return &xat_attribute_table[key];
- }
- }
- return 0;
-}
-
-
-xat_attribute_enum_t
-find_xat_attribute_id(char const * str, unsigned int len)
-{
- const xat_attribute_map_t * p =
- find_xat_attribute_name(str, len);
- return (p == 0) ? XAT_KWD_INVALID : p->xat_id;
-}
diff --git a/sntp/libopts/xat-attribute.h b/sntp/libopts/xat-attribute.h
deleted file mode 100644
index 079c59a3d0ac..000000000000
--- a/sntp/libopts/xat-attribute.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Generated header for gperf generated source Fri Apr 29 15:43:59 PDT 2011
- * This file enumerates the list of names and declares the
- * procedure for mapping string names to the enum value.
- */
-#ifndef AUTOOPTS_XAT_ATTRIBUTE_H_GUARD
-#define AUTOOPTS_XAT_ATTRIBUTE_H_GUARD 1
-
-typedef enum {
- XAT_KWD_INVALID,
- XAT_KWD_TYPE,
- XAT_KWD_WORDS,
- XAT_KWD_MEMBERS,
- XAT_KWD_COOKED,
- XAT_KWD_UNCOOKED,
- XAT_KWD_KEEP,
- XAT_COUNT_KWD
-} xat_attribute_enum_t;
-
-extern xat_attribute_enum_t
-find_xat_attribute_id(char const * str, unsigned int len);
-#endif /* AUTOOPTS_XAT_ATTRIBUTE_H_GUARD */
diff --git a/sntp/loc/README b/sntp/loc/README
new file mode 100644
index 000000000000..58f216956530
--- /dev/null
+++ b/sntp/loc/README
@@ -0,0 +1,17 @@
+If you look at the files here you should be able to figure out what is
+being done.
+
+../scripts/genLocInfo handles the parsing of these files.
+
+If no "more specific" file has been found and cvo.sh says the OS is
+redhat* or fedora*, we will look for loc/redhat .
+
+If no "mode specific" file has been found and the "uname" command returns
+"Linux", we will look for loc/linux .
+
+Note that automake has interesting behavior - we build the man pages using
+the man_MANS target, but they are actually installed using the empty
+manX_MANS= target, which "does the right thing". This means that we
+need to have empty manX_MANS= targets for each possible X, based on
+the data in the loc/ files. For executables, this generally means
+sections 1 and 8.
diff --git a/sntp/loc/darwin b/sntp/loc/darwin
new file mode 100644
index 000000000000..c902860b6a07
--- /dev/null
+++ b/sntp/loc/darwin
@@ -0,0 +1,14 @@
+# Darwin (Mac OS X) installations and man page suffixes
+MDOC
+ntp-keygen,bin,8
+ntp-wait,sbin,8
+ntpd,sbin,8
+ntpdate,sbin,8
+ntpdc,sbin,8
+ntpdsim,sbin,8
+ntpq,bin,8
+ntpsnmpd,sbin,8
+ntpsweep,noinst,8
+ntptime,sbin,8
+ntptrace,sbin,8
+sntp,bin,8
diff --git a/sntp/loc/debian b/sntp/loc/debian
new file mode 100644
index 000000000000..7bc895ae010b
--- /dev/null
+++ b/sntp/loc/debian
@@ -0,0 +1,17 @@
+# Debian installations and man page suffixes
+MDOC
+calc_tickadj,sbin,8
+ntp-keygen,sbin,8
+ntp-wait,sbin,8
+ntpd,sbin,8
+ntpdate,sbin,8
+ntpdc,bin,1
+ntpdsim,sbin,8
+ntpq,bin,1
+ntpsnmpd,sbin,8
+ntpsweep,bin,1
+ntptime,sbin,8
+ntptrace,bin,1
+sntp,bin,1
+tickadj,sbin,8
+timetrim,sbin,8
diff --git a/sntp/loc/freebsd b/sntp/loc/freebsd
new file mode 100644
index 000000000000..7759e315693a
--- /dev/null
+++ b/sntp/loc/freebsd
@@ -0,0 +1,14 @@
+# FreeBSD installations and man page suffixes
+MDOC
+ntp-keygen,sbin,8
+ntp-wait,sbin,8
+ntpd,sbin,8
+ntpdate,sbin,8
+ntpdc,sbin,8
+ntpdsim,sbin,8
+ntpq,sbin,8
+ntpsnmpd,sbin,8
+ntptime,sbin,8
+ntpsweep,noinst,8
+ntptrace,sbin,8
+sntp,sbin,8
diff --git a/sntp/loc/legacy b/sntp/loc/legacy
new file mode 100644
index 000000000000..46c63a2831a6
--- /dev/null
+++ b/sntp/loc/legacy
@@ -0,0 +1,17 @@
+# Legacy installations and man page suffixes
+MAN
+calc_tickadj,bin,1
+ntp-keygen,bin,1
+ntp-wait,bin,1
+ntpd,bin,1
+ntpdate,bin,1
+ntpdc,bin,1
+ntpdsim,bin,1
+ntpq,bin,1
+ntpsnmpd,bin,1
+ntpsweep,noinst,1
+ntptime,bin,1
+ntptrace,bin,1
+sntp,bin,1
+tickadj,bin,1
+timetrim,bin,1
diff --git a/sntp/loc/netbsd b/sntp/loc/netbsd
new file mode 100644
index 000000000000..e84f7899a1c9
--- /dev/null
+++ b/sntp/loc/netbsd
@@ -0,0 +1,14 @@
+# NetBSD installations and man page suffixes
+MDOC
+ntp-keygen,sbin,8
+ntp-wait,sbin,8
+ntpd,sbin,8
+ntpdate,sbin,8
+ntpdc,sbin,8
+ntpdsim,sbin,8
+ntpq,sbin,8
+ntpsnmpd,sbin,8
+ntpsweep,noinst,8
+ntptime,sbin,8
+ntptrace,sbin,8
+sntp,bin,1
diff --git a/sntp/loc/redhat b/sntp/loc/redhat
new file mode 100644
index 000000000000..a35a60546008
--- /dev/null
+++ b/sntp/loc/redhat
@@ -0,0 +1,17 @@
+# RedHat/Fedora installations and man page suffixes
+MAN
+calc_tickadj,sbin,8
+ntp-keygen,sbin,8
+ntp-wait,sbin,8
+ntpd,sbin,8
+ntpdate,sbin,8
+ntpdc,sbin,8
+ntpdsim,sbin,8
+ntpq,sbin,8
+ntpsnmpd,sbin,8
+ntpsweep,noinst,8
+ntptime,sbin,8
+ntptrace,sbin,8
+sntp,sbin,8
+tickadj,sbin,8
+timetrim,sbin,8
diff --git a/sntp/loc/solaris b/sntp/loc/solaris
new file mode 100644
index 000000000000..eca143843c4d
--- /dev/null
+++ b/sntp/loc/solaris
@@ -0,0 +1,16 @@
+# Solaris installations and man page suffixes
+MAN
+calc_tickadj,sbin,1m
+ntp-keygen,sbin,1m
+ntp-wait,libexec,1m
+ntpd,libexec,1m
+ntpdate,sbin,1m
+ntpdc,sbin,1m
+ntpdsim,sbin,1m
+ntpq,sbin,1m
+ntpsnmpd,libexec,1m
+ntpsweep,noinst,1m
+ntptime,sbin,1m
+ntptrace,sbin,1m
+sntp,sbin,1m
+tickadj,sbin,1m
diff --git a/sntp/log.c b/sntp/log.c
index 8a524d2034f4..d7034951528e 100644
--- a/sntp/log.c
+++ b/sntp/log.c
@@ -2,15 +2,19 @@
#include "log.h"
-char *progname = "sntp"; /* for msyslog use too */
+char *progname; /* for msyslog use too */
static void cleanup_log(void);
void
-init_logging(void)
+sntp_init_logging(
+ const char *prog
+ )
{
- openlog(progname, LOG_PID | LOG_CONS, OPENLOG_FAC);
msyslog_term = TRUE;
+ init_logging(prog, 0, FALSE);
+ msyslog_term_pid = FALSE;
+ msyslog_include_timestamp = FALSE;
}
@@ -19,13 +23,7 @@ open_logfile(
const char *logfile
)
{
- syslog_file = fopen(logfile, "a");
- if (syslog_file == NULL) {
- msyslog(LOG_ERR, "sntp: Cannot open logfile %s",
- logfile);
- return;
- }
- syslogit = FALSE;
+ change_logfile(logfile, FALSE);
atexit(cleanup_log);
}
diff --git a/sntp/log.h b/sntp/log.h
index b1878a0230dd..fdb2ba21bcad 100644
--- a/sntp/log.h
+++ b/sntp/log.h
@@ -19,7 +19,9 @@
# define OPENLOG_FAC LOG_DAEMON
#endif
-void init_logging(void);
+void sntp_init_logging(const char *program);
void open_logfile(const char *logfile);
+extern char *progname; /* for msyslog use too */
+
#endif
diff --git a/sntp/m4/define_dir.m4 b/sntp/m4/define_dir.m4
new file mode 100644
index 000000000000..3b48c8b2d488
--- /dev/null
+++ b/sntp/m4/define_dir.m4
@@ -0,0 +1,35 @@
+dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+dnl
+dnl This macro sets VARNAME to the expansion of the DIR variable,
+dnl taking care of fixing up ${prefix} and such.
+dnl
+dnl VARNAME is then offered as both an output variable and a C
+dnl preprocessor symbol.
+dnl
+dnl Example:
+dnl
+dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <kasal@ucw.cz>
+dnl @author Andreas Schwab <schwab@suse.de>
+dnl @author Guido U. Draheim <guidod@gmx.de>
+dnl @author Alexandre Oliva
+dnl @version 2006-10-13
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
+
diff --git a/sntp/m4/hms_search_lib.m4 b/sntp/m4/hms_search_lib.m4
new file mode 100644
index 000000000000..e6dd601403b1
--- /dev/null
+++ b/sntp/m4/hms_search_lib.m4
@@ -0,0 +1,30 @@
+dnl Helper function to manage granular libraries
+dnl
+dnl Usage:
+dnl
+dnl LIB_MATH=''
+dnl AC_SUBST([LIB_MATH])
+dnl ...
+dnl HMS_SEARCH_LIBS([LIB_MATH], [sqrt], [m], [AIF], [AINF], [OL])
+dnl
+dnl which expands to something like:
+dnl
+dnl AC_SEARCH_LIBS([sqrt], [m], [case "$ac_cv_search_sqrt" in
+dnl 'none required') ;;
+dnl no) ;;
+dnl *) LIB_MATH="$ac_cv_search_sqrt $LIB_MATH" ;;
+dnl esac
+dnl [AIF]],
+dnl [AINF],
+dnl [OL])
+dnl
+dnl arguments are: lib-var, function, search-libs, [AIF], [AINF], [other-libs]
+AC_DEFUN([HMS_SEARCH_LIBS],
+[AC_SEARCH_LIBS([$2], [$3], [case "$ac_cv_search_$2[]" in
+ 'none required') ;;
+ no) ;;
+ *) $1[]="$ac_cv_search_$2[] $[]$1" ;;
+ esac
+ [$4]],
+ [$5],
+ [$6])])
diff --git a/sntp/m4/libtool.m4 b/sntp/m4/libtool.m4
new file mode 100644
index 000000000000..d8125842f0a8
--- /dev/null
+++ b/sntp/m4/libtool.m4
@@ -0,0 +1,7831 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# 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.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool 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.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -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
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_REPLACE_SHELLFNS
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case "$ECHO" in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([${with_sysroot}])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*) ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS="$save_LDFLAGS"])
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/sntp/m4/ltoptions.m4 b/sntp/m4/ltoptions.m4
new file mode 100644
index 000000000000..17cfd51c0b34
--- /dev/null
+++ b/sntp/m4/ltoptions.m4
@@ -0,0 +1,369 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# 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.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/sntp/m4/ltsugar.m4 b/sntp/m4/ltsugar.m4
new file mode 100644
index 000000000000..9000a057d31d
--- /dev/null
+++ b/sntp/m4/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# 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.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/sntp/m4/ltversion.m4 b/sntp/m4/ltversion.m4
new file mode 100644
index 000000000000..9c7b5d411858
--- /dev/null
+++ b/sntp/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# 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.
+
+# @configure_input@
+
+# serial 3293 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4])
+m4_define([LT_PACKAGE_REVISION], [1.3293])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4'
+macro_revision='1.3293'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/sntp/m4/lt~obsolete.m4 b/sntp/m4/lt~obsolete.m4
new file mode 100644
index 000000000000..c573da90c5cc
--- /dev/null
+++ b/sntp/m4/lt~obsolete.m4
@@ -0,0 +1,98 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# 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.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/m4/ntp_cacheversion.m4 b/sntp/m4/ntp_cacheversion.m4
index bf27b89130d1..3619a603f524 100644
--- a/m4/ntp_cacheversion.m4
+++ b/sntp/m4/ntp_cacheversion.m4
@@ -9,20 +9,22 @@
# all _cv_ variables only makes sense immediately after loading, before
# use or modification.
#
-# It is assumed that parent configure.ac files which use
-# AC_CONFIG_SUBDIR to invoke child configure.ac files have used
-# NTP_CACHEVERSION if any children do. The top-level configure script
+# The top-level configure.ac in a subtree using NTP_CACHEVERSION
# will clear a previous cache lacking any saved cache version number,
-# while children do not. The reason is the children can rely on the
-# parent having cleared any cache variables predating this mechanism.
-# Therefore the child can rely on the config.cache generated by the
-# parent on the first run despite not finding its version stamp
-# previously saved. In this case top-level means a configure script
-# not invoked by another configure script in its parent directory.
+# while children do not. This comes into play only when introducing
+# NTP_CACHEVERSION where it had not been previously used: Previous
+# cached results are presumed incompatible and not used. The reason
+# children do not flush the cached is it is shared with the parent and
+# the children can rely on the parent having cleared any cache variables
+# predating this mechanism. Therefore the child can rely on the
+# config.cache generated by the parent on the first run despite not
+# finding the child version stamp in it.
+#
+# See html/copyright.html or COPYRIGHT in plain text.
AC_DEFUN_ONCE([NTP_CACHEVERSION], [
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
- AC_BEFORE([$0], [AM_CONFIG_HEADER])dnl
+ AC_BEFORE([$0], [AC_CONFIG_HEADERS])dnl
AC_BEFORE([$0], [AC_PROG_CC])dnl
AC_BEFORE([$0], [AC_CONFIG_SUBDIRS])dnl
@@ -57,11 +59,13 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [
# Parent configure just created cache from empty,
# flushing would be counterproductive.
ntp_cache_flush=0;
+ ;;
esac
esac
;;
*)
# configure cache version mismatches config.cache version
+ ;;
esac
case "$ntp_cache_flush" in
@@ -98,7 +102,12 @@ AC_DEFUN_ONCE([NTP_CACHEVERSION], [
for c_varname in $c_varname_list
do
- AS_UNSET([$c_varname])
+ dnl AS_UNSET([$c_varname])
+ dnl With Autoconf 2.61 and automake 1.10.3, using AS_UNSET
+ dnl here triggers generation of a syntax error in configure.
+ dnl Once we require a newer Autoconf we can revert to the
+ dnl AS_UNSET code.
+ { eval $c_varname=; unset $c_varname; }
done
AC_MSG_NOTICE([[$cache_file saved by another version, ignored.]])
diff --git a/sntp/m4/ntp_compiler.m4 b/sntp/m4/ntp_compiler.m4
new file mode 100644
index 000000000000..2b418662b99c
--- /dev/null
+++ b/sntp/m4/ntp_compiler.m4
@@ -0,0 +1,195 @@
+dnl ######################################################################
+dnl Common m4sh code for compiler stuff
+AC_DEFUN([NTP_COMPILER], [
+AC_REQUIRE([AC_PROG_CC_C89])
+
+CFLAGS_NTP=
+CPPFLAGS_NTP=
+LDADD_NTP=
+LDFLAGS_NTP=
+AC_SUBST([CFLAGS_NTP])
+AC_SUBST([CPPFLAGS_NTP])
+AC_SUBST([LDADD_NTP])
+AC_SUBST([LDFLAGS_NTP])
+
+case "$ac_cv_prog_cc_c89" in
+ no)
+ AC_MSG_WARN([ANSI C89/ISO C90 is the minimum to compile NTP]
+ [ version 4.2.5 and higher.])
+ ;;
+esac
+
+AC_CACHE_CHECK(
+ [if $CC can handle @%:@warning],
+ [ntp_cv_cpp_warning],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[#warning foo]])],
+ [ntp_cv_cpp_warning=yes],
+ [ntp_cv_cpp_warning=no]
+ )]
+)
+case "$ntp_cv_cpp_warning" in
+ no)
+ AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1],
+ [Should we avoid @%:@warning on option name collisions?])
+esac
+
+AC_CACHE_CHECK(
+ [if $CC supports __attribute__((...))],
+ [ntp_cv_cc_attribute],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[]],
+ [[void foo(void) __attribute__((__noreturn__));]]
+ )],
+ [ntp_cv_cc_attribute=yes],
+ [ntp_cv_cc_attribute=no]
+ )]
+)
+case "$ntp_cv_cc_attribute" in
+ yes)
+ AC_DEFINE([HAVE___ATTRIBUTE__], [],
+ [defined if C compiler supports __attribute__((...))])
+esac
+AH_VERBATIM(
+ [HAVE___ATTRIBUTE___VERBATIM],
+ [
+ /* define away __attribute__() if unsupported */
+ #ifndef HAVE___ATTRIBUTE__
+ # define __attribute__(x) /* empty */
+ #endif
+ #define ISC_PLATFORM_NORETURN_PRE
+ #define ISC_PLATFORM_NORETURN_POST __attribute__((__noreturn__))
+ ]
+)
+
+case "$GCC" in
+ yes)
+ SAVED_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wstrict-overflow"
+ AC_CACHE_CHECK(
+ [if $CC can handle -Wstrict-overflow],
+ [ntp_cv_gcc_Wstrict_overflow],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [ntp_cv_gcc_Wstrict_overflow=yes],
+ [ntp_cv_gcc_Wstrict_overflow=no]
+ ) ]
+ )
+ #
+ # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
+ # flag to CFLAGS.
+ #
+ CFLAGS="$SAVED_CFLAGS -Winit-self"
+ AC_CACHE_CHECK(
+ [if $CC can handle -Winit-self],
+ [ntp_cv_gcc_Winit_self],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [ntp_cv_gcc_Winit_self=yes],
+ [ntp_cv_gcc_Winit_self=no]
+ )
+ ]
+ )
+ CFLAGS="$SAVED_CFLAGS"
+ AS_UNSET([SAVED_CFLAGS])
+ #
+ # $ntp_cv_gcc_Winit_self is tested later to add the
+ # flag to CFLAGS_NTP.
+ #
+ AC_CACHE_CHECK(
+ [if linker supports omitting unused code and data],
+ [ntp_cv_gc_sections_runs],
+ [
+ dnl NetBSD will link but likely not run with --gc-sections
+ dnl http://bugs.ntp.org/1844
+ dnl http://gnats.netbsd.org/40401
+ dnl --gc-sections causes attempt to load as linux elf, with
+ dnl wrong syscalls in place. Test a little gauntlet of
+ dnl simple stdio read code checking for errors, expecting
+ dnl enough syscall differences that the NetBSD code will
+ dnl fail even with Linux emulation working as designed.
+ dnl A shorter test could be refined by someone with access
+ dnl to a NetBSD host with Linux emulation working.
+ origCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wl,--gc-sections"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <stdlib.h>
+ #include <stdio.h>
+ ]],
+ [[
+ FILE * fpC;
+ char buf[32];
+ size_t cch;
+ int read_success_once;
+
+ fpC = fopen("conftest.c", "r");
+ if (NULL == fpC)
+ exit(1);
+ do {
+ cch = fread(buf, sizeof(buf), 1, fpC);
+ read_success_once |= (0 != cch);
+ } while (0 != cch);
+ if (!read_success_once)
+ exit(2);
+ if (!feof(fpC))
+ exit(3);
+ if (0 != fclose(fpC))
+ exit(4);
+
+ exit(EXIT_SUCCESS);
+ ]]
+ )],
+ [
+ if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
+ ntp_cv_gc_sections_runs=no
+ else
+ ntp_cv_gc_sections_runs=no
+ ./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
+ fi
+ ],
+ [ntp_cv_gc_sections_runs=no]
+ )
+ CFLAGS="$origCFLAGS"
+ AS_UNSET([origCFLAGS])
+ ]
+ )
+ case "$ntp_cv_gc_sections_runs" in
+ yes)
+ LDADD_LIBNTP="-Wl,--gc-sections"
+ CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
+ ;;
+ no)
+ LDADD_LIBNTP=
+ ;;
+ esac
+ CFLAGS_NTP="$CFLAGS_NTP -Wall"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
+ CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
+ # CFLAGS_NTP="$CFLAGS_NTP -Werror"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
+ CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
+ CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
+ CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
+ # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
+ case "$ntp_cv_gcc_Winit_self" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
+ esac
+ case "$ntp_cv_gcc_Wstrict_overflow" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
+ esac
+ # -W[no-]strict-prototypes might be added by NTP_OPENSSL
+esac
+
+NTP_OS_CFLAGS
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_crosscompile.m4 b/sntp/m4/ntp_crosscompile.m4
new file mode 100644
index 000000000000..941618d39d9a
--- /dev/null
+++ b/sntp/m4/ntp_crosscompile.m4
@@ -0,0 +1,8 @@
+dnl ######################################################################
+AC_DEFUN([NTP_CROSSCOMPILE], [
+
+# Expose a cross-compilation indicator to makefiles
+AM_CONDITIONAL([NTP_CROSSCOMPILE], [test $build != $host])
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_crypto_rand.m4 b/sntp/m4/ntp_crypto_rand.m4
new file mode 100644
index 000000000000..c529f3a51dff
--- /dev/null
+++ b/sntp/m4/ntp_crypto_rand.m4
@@ -0,0 +1,53 @@
+# SYNOPSIS -*- Autoconf -*-
+#
+# NTP_CRYPTO_RAND
+#
+# DESCRIPTION
+#
+# AUTHOR
+#
+# Harlan Stenn
+#
+# LICENSE
+#
+# This file is Copyright (c) 2014 Network Time Foundation
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice,
+# author attribution and this notice are preserved. This file is offered
+# as-is, without any warranty.
+
+AC_DEFUN([NTP_CRYPTO_RAND], [
+
+dnl check for --disable-openssl-random
+dnl if that's not specified:
+dnl - Look for RAND_poll and RAND_bytes
+dnl - if they exist, define USE_OPENSSL_CRYPTO_RAND
+
+AC_MSG_CHECKING([if we want to use OpenSSL's crypto random (if available)])
+AC_ARG_ENABLE(
+ [openssl-random],
+ [AS_HELP_STRING(
+ [--enable-openssl-random],
+ [Use OpenSSL's crypto random number functions, if available (default is yes)]
+ )],
+ [ntp_use_openssl_random=$enableval],
+ [ntp_use_openssl_random=yes]
+)
+AC_MSG_RESULT([$ntp_use_openssl_random])
+
+# The following might need extra libraries
+NTPO_SAVED_LIBS="$LIBS"
+LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+dnl AC_MSG_NOTICE([LIBS is <$LIBS>])
+AC_CHECK_FUNCS([RAND_bytes RAND_poll])
+LIBS="$NTPO_SAVED_LIBS"
+case "$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
+ yesyesyes)
+ AC_DEFINE([USE_OPENSSL_CRYPTO_RAND], [1], [Use OpenSSL's crypto random functions])
+ ;;
+ *) ntp_use_openssl_random=no ;;
+esac
+
+]) dnl NTP_CRYPTO_RAND
+
diff --git a/sntp/m4/ntp_debug.m4 b/sntp/m4/ntp_debug.m4
new file mode 100644
index 000000000000..820f9a0bc408
--- /dev/null
+++ b/sntp/m4/ntp_debug.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Common m4sh code for debug
+AC_DEFUN([NTP_DEBUG], [
+
+AC_MSG_CHECKING([if we're including debugging code])
+AC_ARG_ENABLE(
+ [debugging],
+ [AS_HELP_STRING(
+ [--enable-debugging],
+ [+ include ntpd debugging code]
+ )],
+ [ntp_ok=$enableval],
+ [ntp_ok=yes]
+)
+case "$ntp_ok" in
+ yes)
+ AC_DEFINE([DEBUG], [1], [Enable debugging code?])
+esac
+AC_MSG_RESULT([$ntp_ok])
+
+])dnl
+dnl ======================================================================
diff --git a/m4/ntp_dir_sep.m4 b/sntp/m4/ntp_dir_sep.m4
index 96d0fbc05e17..d10735bef45b 100644
--- a/m4/ntp_dir_sep.m4
+++ b/sntp/m4/ntp_dir_sep.m4
@@ -7,7 +7,7 @@ AC_CACHE_CHECK(
[
case "$ntp_cv_dir_sep" in
'')
- case "$target_os" in
+ case "$host_os" in
*djgpp | *mingw32* | *emx*)
ntp_cv_dir_sep="'\\'"
;;
diff --git a/sntp/m4/ntp_facilitynames.m4 b/sntp/m4/ntp_facilitynames.m4
new file mode 100644
index 000000000000..f58f8943890d
--- /dev/null
+++ b/sntp/m4/ntp_facilitynames.m4
@@ -0,0 +1,24 @@
+dnl ######################################################################
+dnl Check syslog.h for 'facilitynames' table
+AC_DEFUN([NTP_FACILITYNAMES], [
+AC_CACHE_CHECK([for facilitynames in syslog.h],ac_cv_HAVE_SYSLOG_FACILITYNAMES,[
+AC_TRY_COMPILE([
+#define SYSLOG_NAMES
+#include <stdlib.h>
+#include <syslog.h>
+],
+[ void *fnames; fnames = facilitynames; ],
+ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes,ac_cv_HAVE_SYSLOG_FACILITYNAMES=no,ac_cv_HAVE_SYSLOG_FACILITYNAMES=cross)])
+case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
+ yes)
+ AC_DEFINE(HAVE_SYSLOG_FACILITYNAMES,1,[ ])
+ ;;
+ no)
+ AC_MSG_WARN([No facilitynames in <syslog.h>])
+ ;;
+ cross)
+ AC_MSG_WARN([facilitynames in <syslog.h> - cross-compiling])
+ ;;
+esac
+])
+dnl ======================================================================
diff --git a/sntp/m4/ntp_googletest.m4 b/sntp/m4/ntp_googletest.m4
new file mode 100644
index 000000000000..4aa740f13e3c
--- /dev/null
+++ b/sntp/m4/ntp_googletest.m4
@@ -0,0 +1,53 @@
+dnl ######################################################################
+dnl NTP_GOOGLETEST gtest support shared by top-level and sntp/configure.ac
+AC_DEFUN([NTP_GOOGLETEST], [
+gta=false
+AC_ARG_WITH(
+ [gtest],
+ [AS_HELP_STRING(
+ [--with-gtest],
+ [Use the gtest framework (Default: if it's available)]
+ )],
+ [try_gtest=$withval],
+ [try_gtest=yes]
+)
+case "$try_gtest" in
+ yes)
+ AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
+ AS_UNSET([ac_cv_path_GTEST_CONFIG])
+ case x${GTEST_CONFIG} in
+ x) ;;
+ *)
+ AC_MSG_CHECKING([gtest version])
+ gtest_version_test=`$GTEST_CONFIG --min-version=1.5 || echo toolow`
+ case "$gtest_version_test" in
+ toolow*)
+ ;;
+ *)
+ GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
+ GTEST_LIBS=`$GTEST_CONFIG --libs`
+ GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
+ GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
+ AC_SUBST([GTEST_LDFLAGS])
+ AC_SUBST([GTEST_LIBS])
+ AC_SUBST([GTEST_CXXFLAGS])
+ AC_SUBST([GTEST_CPPFLAGS])
+ gta=true
+ ;;
+ esac
+ gtest_version=`$GTEST_CONFIG --version`
+ case "$gta" in
+ true)
+ AC_MSG_RESULT([($gtest_version) ok])
+ ;;
+ *) AC_MSG_RESULT([($gtest_version) not ok])
+ ;;
+ esac
+ AS_UNSET([gtest_version_test])
+ AS_UNSET([gtest_version])
+ esac
+esac
+AM_CONDITIONAL([GTEST_AVAILABLE], [$gta])
+
+])
+dnl ======================================================================
diff --git a/sntp/m4/ntp_ipv6.m4 b/sntp/m4/ntp_ipv6.m4
new file mode 100644
index 000000000000..079e51099458
--- /dev/null
+++ b/sntp/m4/ntp_ipv6.m4
@@ -0,0 +1,528 @@
+dnl ######################################################################
+dnl Common IPv6 detection for NTP configure.ac files
+AC_DEFUN([NTP_IPV6], [
+
+AC_CACHE_CHECK(
+ [for struct sockaddr_storage],
+ [ntp_cv_sockaddr_storage],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ]],
+ [[
+ struct sockaddr_storage n;
+ ]]
+ )],
+ [ntp_cv_sockaddr_storage=yes],
+ [ntp_cv_sockaddr_storage=no]
+ )]
+)
+case "$ntp_cv_sockaddr_storage" in
+ yes)
+ AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], [1],
+ [Does a system header define struct sockaddr_storage?])
+ AC_CACHE_CHECK(
+ [for sockaddr_storage.__ss_family],
+ [ntp_cv_have___ss_family],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ]],
+ [[
+ struct sockaddr_storage s;
+ s.__ss_family = 1;
+ ]]
+ )],
+ [ntp_cv_have___ss_family=yes],
+ [ntp_cv_have___ss_family=no]
+ )]
+ )
+ case "$ntp_cv_have___ss_family" in
+ yes)
+ AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
+ [Does struct sockaddr_storage have __ss_family?])
+ esac
+ AH_VERBATIM(
+ [HAVE___SS_FAMILY_IN_SS_VERBATIM],
+ [
+ /* Handle sockaddr_storage.__ss_family */
+ #ifdef HAVE___SS_FAMILY_IN_SS
+ # define ss_family __ss_family
+ #endif /* HAVE___SS_FAMILY_IN_SS */
+ ]
+ )
+esac
+
+
+#
+# Look for in_port_t.
+#
+AC_CACHE_CHECK(
+ [for in_port_t],
+ [isc_cv_have_in_port_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ ]],
+ [[
+ in_port_t port = 25;
+ return (0);
+ ]]
+ )],
+ [isc_cv_have_in_port_t=yes],
+ [isc_cv_have_in_port_t=no]
+ )]
+)
+case "$isc_cv_have_in_port_t" in
+ no)
+ AC_DEFINE([ISC_PLATFORM_NEEDPORTT], [1],
+ [Declare in_port_t?])
+esac
+
+AC_CACHE_CHECK(
+ [type of socklen arg for getsockname()],
+ [ntp_cv_getsockname_socklen_type],
+ [
+ getsockname_socklen_type_found=no
+ for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
+ for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ ]], [[
+ extern
+ getsockname(int, $getsockname_arg2,
+ $ntp_cv_getsockname_socklen_type *);
+ ]]
+ )],
+ [getsockname_socklen_type_found=yes ; break 2],
+ []
+ )
+ done
+ done
+ case "$getsockname_socklen_type_found" in
+ no)
+ ntp_cv_getsockname_socklen_type='socklen_t'
+ esac
+ AS_UNSET([getsockname_arg2])
+ AS_UNSET([getsockname_socklen_type_found])
+ ]
+)
+AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
+ [$ntp_cv_getsockname_socklen_type],
+ [What is getsockname()'s socklen type?])
+
+AC_CACHE_CHECK(
+ [struct sockaddr for sa_len],
+ [isc_cv_platform_havesalen],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ]],
+ [[
+ extern struct sockaddr *ps;
+ return ps->sa_len;
+ ]]
+ )],
+ [isc_cv_platform_havesalen=yes],
+ [isc_cv_platform_havesalen=no]
+ )]
+)
+case "$isc_cv_platform_havesalen" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVESALEN], [1],
+ [struct sockaddr has sa_len?])
+esac
+
+AC_ARG_ENABLE(
+ [ipv6],
+ [AS_HELP_STRING(
+ [--enable-ipv6],
+ [s use IPv6?]
+ )]
+)
+
+case "$enable_ipv6" in
+ yes|''|autodetect)
+ case "$host" in
+ powerpc-ibm-aix4*)
+ ;;
+ *)
+ AC_DEFINE([WANT_IPV6], [1], [configure --enable-ipv6])
+ ;;
+ esac
+ ;;
+ no)
+ ;;
+esac
+
+
+dnl [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion)
+case "$host" in
+ *-*-darwin*)
+ AC_DEFINE([__APPLE_USE_RFC_3542], [1], [Are we _special_?])
+esac
+
+
+AC_CACHE_CHECK(
+ [for IPv6 structures],
+ [isc_cv_found_ipv6],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ ]],
+ [[
+ struct sockaddr_in6 sin6;
+ ]]
+ )],
+ [isc_cv_found_ipv6=yes],
+ [isc_cv_found_ipv6=no]
+ )]
+)
+
+#
+# See whether IPv6 support is provided via a Kame add-on.
+# This is done before other IPv6 linking tests so LIBS is properly set.
+#
+AC_MSG_CHECKING([for Kame IPv6 support])
+AC_ARG_WITH(
+ [kame],
+ [AS_HELP_STRING(
+ [--with-kame],
+ [- =/usr/local/v6]
+ )],
+ [use_kame="$withval"],
+ [use_kame="no"]
+)
+case "$use_kame" in
+ no)
+ ;;
+ yes)
+ kame_path=/usr/local/v6
+ ;;
+ *)
+ kame_path="$use_kame"
+ ;;
+esac
+case "$use_kame" in
+ no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ if test -f $kame_path/lib/libinet6.a; then
+ AC_MSG_RESULT([$kame_path/lib/libinet6.a])
+ LIBS="-L$kame_path/lib -linet6 $LIBS"
+ else
+ AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
+
+Please choose the proper path with the following command:
+
+ configure --with-kame=PATH
+])
+ fi
+ ;;
+esac
+
+#
+# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
+# Including it on Kame-using platforms is very bad, though, because
+# Kame uses #error against direct inclusion. So include it on only
+# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
+# This is done before the in6_pktinfo check because that's what
+# netinet6/in6.h is needed for.
+#
+case "$host" in
+ *-bsdi4.[[01]]*)
+ AC_DEFINE([ISC_PLATFORM_NEEDNETINET6IN6H], [1],
+ [Do we need netinet6/in6.h?])
+ isc_netinet6in6_hack="#include <netinet6/in6.h>"
+ ;;
+ *)
+ isc_netinet6in6_hack=""
+ ;;
+esac
+
+#
+# This is similar to the netinet6/in6.h issue.
+#
+case "$host" in
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
+ AC_DEFINE([ISC_PLATFORM_FIXIN6ISADDR], [1],
+ [Do we need to fix in6isaddr?])
+ isc_netinetin6_hack="#include <netinet/in6.h>"
+ ;;
+ *)
+ isc_netinetin6_hack=""
+ ;;
+esac
+
+
+case "$isc_cv_found_ipv6" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVEIPV6], [1], [have IPv6?])
+ AC_CACHE_CHECK(
+ [for in6_pktinfo],
+ [isc_cv_have_in6_pktinfo],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_netinetin6_hack
+ $isc_netinet6in6_hack
+ ]],
+ [[
+ struct in6_pktinfo xyzzy;
+ ]]
+ )],
+ [isc_cv_have_in6_pktinfo=yes],
+ [isc_cv_have_in6_pktinfo=no]
+ )]
+ )
+ case "$isc_cv_have_in6_pktinfo" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVEIN6PKTINFO], [1],
+ [have struct in6_pktinfo?])
+ esac
+
+
+ # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
+ AC_CACHE_CHECK(
+ [for sockaddr_in6.sin6_scope_id],
+ [isc_cv_have_sin6_scope_id],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_netinetin6_hack
+ $isc_netinet6in6_hack
+ ]],
+ [[
+ struct sockaddr_in6 xyzzy;
+ xyzzy.sin6_scope_id = 0;
+ ]]
+ )],
+ [isc_cv_have_sin6_scope_id=yes],
+ [isc_cv_have_sin6_scope_id=no]
+ )]
+ )
+
+ case "$isc_cv_have_sin6_scope_id" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVESCOPEID], [1], [sin6_scope_id?])
+ esac
+esac
+
+
+# We need this check run even without isc_cv_found_ipv6=yes
+
+AC_CACHE_CHECK(
+ [for in6addr_any],
+ [isc_cv_in6addr_any_links],
+ [
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ AC_INCLUDES_DEFAULT [[
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_netinetin6_hack
+ $isc_netinet6in6_hack
+ ]],
+ [[
+ printf("%x", in6addr_any.s6_addr[15]);
+ ]]
+ )],
+ [isc_cv_in6addr_any_links=yes],
+ [isc_cv_in6addr_any_links=no]
+ )
+ LIBS="$SAVED_LIBS"
+ AS_UNSET([SAVED_LIBS])
+ ]
+)
+
+case "$isc_cv_in6addr_any_links" in
+ no)
+ AC_DEFINE([ISC_PLATFORM_NEEDIN6ADDRANY], [1], [missing in6addr_any?])
+esac
+
+
+AC_CACHE_CHECK(
+ [for struct if_laddrconf],
+ [isc_cv_struct_if_laddrconf],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <net/if6.h>
+ ]],
+ [[
+ struct if_laddrconf a;
+ ]]
+ )],
+ [isc_cv_struct_if_laddrconf=yes],
+ [isc_cv_struct_if_laddrconf=no]
+ )]
+)
+
+case "$isc_cv_struct_if_laddrconf" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRCONF], [1],
+ [have struct if_laddrconf?])
+esac
+
+AC_CACHE_CHECK(
+ [for struct if_laddrreq],
+ isc_cv_struct_if_laddrreq,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <net/if6.h>
+ ]],
+ [[
+ struct if_laddrreq a;
+ ]]
+ )],
+ [isc_cv_struct_if_laddrreq=yes],
+ [isc_cv_struct_if_laddrreq=no]
+ )]
+)
+
+case "$isc_cv_struct_if_laddrreq" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
+ [have struct if_laddrreq?])
+esac
+
+AC_CACHE_CHECK(
+ [for multicast IP support],
+ [ntp_cv_multicast],
+ [
+ ntp_cv_multicast=no
+ case "$host" in
+ i386-sequent-sysv4)
+ ;;
+ *)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ]],
+ [[
+ struct ip_mreq ipmr;
+ ipmr.imr_interface.s_addr = 0;
+ ]]
+ )],
+ [ntp_cv_multicast=yes],
+ []
+ )
+ ;;
+ esac
+ ]
+)
+case "$ntp_cv_multicast" in
+ yes)
+ AC_DEFINE([MCAST], [1], [Does the target support multicast IP?])
+ AC_CACHE_CHECK(
+ [arg type needed for setsockopt() IP*_MULTICAST_LOOP],
+ [ntp_cv_typeof_ip_multicast_loop],
+ [
+ case "$host" in
+ *-*-netbsd*|*-*-*linux*)
+ ntp_cv_typeof_ip_multicast_loop=u_int
+ ;;
+ *)
+ ntp_cv_typeof_ip_multicast_loop=u_char
+ ;;
+ esac
+ ]
+ )
+ AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
+ [$ntp_cv_typeof_ip_multicast_loop],
+ [What type to use for setsockopt])
+esac
+
+AC_ARG_ENABLE(
+ [getifaddrs],
+ [AS_HELP_STRING(
+ [--enable-getifaddrs],
+ [+ Enable the use of getifaddrs() [[yes|no]].]
+ )],
+ [want_getifaddrs="$enableval"],
+ [want_getifaddrs="yes"]
+)
+
+case $want_getifaddrs in
+ glibc)
+ AC_MSG_WARN([--enable-getifaddrs=glibc is no longer required])
+esac
+case $want_getifaddrs in
+ no)
+ ;;
+ *)
+ SAVED_LIBS="$LIBS"
+ LIBS="$LDADD_LIBNTP $LIBS"
+ AC_CHECK_FUNCS([getifaddrs])
+ LIBS="$SAVED_LIBS"
+ AS_UNSET([SAVED_LIBS])
+ ;;
+esac
+
+#
+# Check for if_nametoindex() for IPv6 scoped addresses support
+#
+case "$host" in
+ *-hp-hpux*)
+ AC_SEARCH_LIBS([if_nametoindex], [ipv6])
+esac
+SAVED_LIBS="$LIBS"
+LIBS="$LDADD_LIBNTP $LIBS"
+AC_CHECK_FUNCS([if_nametoindex])
+LIBS="$SAVED_LIBS"
+AS_UNSET([SAVED_LIBS])
+case "$ac_cv_func_if_nametoindex" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_HAVEIFNAMETOINDEX], [1],
+ [ISC: do we have if_nametoindex()?])
+esac
+
+])dnl
+dnl ======================================================================
diff --git a/m4/ntp_lib_m.m4 b/sntp/m4/ntp_lib_m.m4
index ea0503c98b2a..ea0503c98b2a 100644
--- a/m4/ntp_lib_m.m4
+++ b/sntp/m4/ntp_lib_m.m4
diff --git a/sntp/m4/ntp_libevent.m4 b/sntp/m4/ntp_libevent.m4
new file mode 100644
index 000000000000..5f81ae90576c
--- /dev/null
+++ b/sntp/m4/ntp_libevent.m4
@@ -0,0 +1,150 @@
+dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*-
+dnl
+dnl Provide only the --enable-local-libevent command-line option.
+dnl
+dnl Used standalone by top-level NTP configure.ac, which should have
+dnl --enable-local-libevent in its --help output but which doesn't do
+dnl anything differently based upon its presence or value.
+dnl
+dnl Also AC_REQUIRE'd by NTP_LIBEVENT_CHECK_NOBUILD.
+AC_DEFUN([NTP_ENABLE_LOCAL_LIBEVENT], [
+
+AC_ARG_ENABLE(
+ [local-libevent],
+ [AC_HELP_STRING(
+ [--enable-local-libevent],
+ [Force using the supplied libevent tearoff code]
+ )],
+ [ntp_use_local_libevent=$enableval],
+ [ntp_use_local_libevent=${ntp_use_local_libevent-detect}]
+)
+
+]) dnl NTP_ENABLE_LOCAL_LIBEVENT
+
+dnl NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]]) -*- Autoconf -*-
+dnl
+dnl Look for libevent, which must be at least MINVERSION.
+dnl DIR is the location of our "bundled" copy of libevent.
+dnl If NOBUILD is provided as the 3rd argument, do all of the above,
+dnl but DO NOT invoke DIR/configure if we are going to use our bundled
+dnl version. This may be the case for nested packages.
+dnl
+dnl provide --enable-local-libevent .
+dnl
+dnl Examples:
+dnl
+dnl NTP_LIBEVENT_CHECK_NOBUILD([2.0.9], [sntp/libevent])
+dnl NTP_LIBEVENT_CHECK
+dnl
+AC_DEFUN([NTP_LIBEVENT_CHECK_NOBUILD], [
+AC_REQUIRE([NTP_PKG_CONFIG])dnl
+AC_REQUIRE([NTP_ENABLE_LOCAL_LIBEVENT])dnl
+
+ntp_libevent_min_version=m4_default([$1], [2.0.9])
+ntp_libevent_tearoff=m4_default([$2], [libevent])
+
+AC_SUBST([CPPFLAGS_LIBEVENT])
+AC_SUBST([LDADD_LIBEVENT])
+
+case "$ntp_use_local_libevent" in
+ yes)
+ ;;
+ *) # If we have (a good enough) pkg-config, see if it can find libevent
+ case "$PKG_CONFIG" in
+ /*)
+ AC_MSG_CHECKING([if libevent $ntp_libevent_min_version or later is installed])
+ if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
+ then
+ ntp_use_local_libevent=no
+ AC_MSG_NOTICE([Using the installed libevent])
+ CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
+ # HMS: I hope the following is accurate.
+ # We don't need -levent, we only need -levent_core.
+ # While we could grab only the -L stuff, there *might* be
+ # other flags there we want. Originally we just removed -levent
+ # but then somebody decided to install -levent-2.0
+ # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
+ # So now we dance...
+ LDADD_LIBEVENT=
+ for i in `$PKG_CONFIG --libs libevent`
+ do
+ case "$i" in
+ -levent*) ;;
+ *) case "$LDADD_LIBEVENT" in
+ '') LDADD_LIBEVENT="$i" ;;
+ *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
+ esac
+ ;;
+ esac
+ done
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
+ esac
+ LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
+ AC_MSG_RESULT([yes])
+ else
+ ntp_use_local_libevent=yes
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ ntp_use_local_libevent=yes
+ ;;
+ esac
+ ;;
+esac
+
+case "$ntp_use_local_libevent" in
+ yes)
+ AC_MSG_NOTICE([Using libevent tearoff])
+ CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
+ case "$LIBISC_PTHREADS_NOTHREADS" in
+ pthreads)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ ;;
+ *)
+ LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
+ esac
+esac
+
+AM_CONDITIONAL([BUILD_LIBEVENT], [test "x$ntp_use_local_libevent" = "xyes"])
+
+]) dnl NTP_LIBEVENT_CHECK_NOBUILD
+
+dnl NTP_LIBEVENT_CHECK([MINVERSION [, DIR]]) -*- Autoconf -*-
+AC_DEFUN([NTP_LIBEVENT_CHECK], [
+
+AC_SUBST([NTP_FORCE_LIBEVENT_DIST])
+NTP_LIBEVENT_CHECK_NOBUILD([$1], [$2])
+
+case "$ntp_libevent_tearoff" in
+ libevent)
+ ;;
+ *)
+ AC_MSG_ERROR([ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff])
+ ;;
+esac
+
+case "$ntp_use_local_libevent" in
+ yes)
+ dnl ac_configure_args is undocumented but widely abused, as here,
+ dnl to modify the defaults of the libevent subpackage, by prefixing
+ dnl our changes to the child configure arguments already assembled.
+ dnl User-supplied contradictory choices should prevail thanks to
+ dnl "last wins".
+ ac_configure_args=" --disable-openssl${ac_configure_args}"
+ ac_configure_args=" --disable-shared${ac_configure_args}"
+ ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
+ ac_configure_args=" --disable-libevent-install${ac_configure_args}"
+ ac_configure_args=" --enable-silent-rules${ac_configure_args}"
+ ac_configure_args=" --enable-function-sections${ac_configure_args}"
+ AC_CONFIG_SUBDIRS([libevent])
+ ;;
+ *)
+ NTP_FORCE_LIBEVENT_DIST=libevent
+ ;;
+esac
+
+]) dnl NTP_LIBEVENT_CHECK
+
diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4
new file mode 100644
index 000000000000..13a621d1ceb7
--- /dev/null
+++ b/sntp/m4/ntp_libntp.m4
@@ -0,0 +1,1137 @@
+dnl ######################################################################
+dnl Common m4sh code for libntp and clients
+dnl
+dnl Any configure tests which libntp or libisc code depends upon should
+dnl be here or in another m4 macro used by the top-level and sntp
+dnl configure.ac files, so that libntp can be moved into the sntp
+dnl subpackage while retaining access to such test results.
+dnl
+AC_DEFUN([NTP_LIBNTP], [
+
+AC_REQUIRE([NTP_CROSSCOMPILE])
+
+# HMS: Save $LIBS and empty it.
+# any LIBS we add here should go in to LDADD_LIBNTP
+AC_SUBST([LDADD_LIBNTP])
+__LIBS=$LIBS
+LIBS=
+
+dnl The contents of NTP_PROG_CC used to be here...
+
+AC_PROG_INSTALL
+# [Bug 2332] because we need to know if we are using GNU ld...
+LT_PATH_LD
+
+NTP_DIR_SEP
+NTP_LINEEDITLIBS
+NTP_LIB_M
+
+AC_FUNC_FORK
+AC_FUNC_ALLOCA
+AC_FUNC_STRERROR_R
+
+ac_busted_vpath_in_make=no
+case "$build" in
+ *-*-irix6.1*) # 64 bit only
+ # busted vpath?
+ ;;
+ *-*-irix6*) # 6.2 (and later?)
+ ac_busted_vpath_in_make=yes
+ ;;
+ *-*-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
+ yes.|no*)
+ ;;
+ *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
+ '')
+ AC_MSG_ERROR([building outside of the main directory requires GNU make])
+ esac
+ ;;
+esac
+
+case "$host" in
+ *-*-aix4*)
+ # Bug 2516:
+ # Was *-*-aix[[4-9]]*
+ # XXX only verified thru AIX6. But...
+ # Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
+ # that this support would be in 5.3, removed in 6, and added back.
+ #
+ # (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.
+ ;;
+ *)
+ HMS_SEARCH_LIBS([LDADD_LIBNTP], [clock_gettime], [rt])
+ AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
+ ;;
+esac
+
+AC_CHECK_FUNCS([getclock stime timegm strlcpy strlcat])
+
+dnl HP-UX 11.31 on HPPA has a net/if.h that can't be compiled with gcc4
+dnl due to an incomplete type (a union) mpinfou used in an array. gcc3
+dnl compiles it without complaint. The mpinfou union is defined later
+dnl in the resulting preprocessed source than the spu_info array in
+dnl /usr/include/machine/sys/getppdp.h:
+dnl extern union mpinfou spu_info[];
+dnl triggering the error. Our strategy is on HP-UX only, test compile
+dnl net/if.h. If that fails, try adding a duplicate definition of
+dnl mpinfou, and if that helps add it to confdefs.h (used for further
+dnl configure tests) and config.h.
+#
+AC_CHECK_HEADERS([errno.h sys/socket.h sys/types.h time.h])
+AC_CHECK_HEADERS([net/if.h], [], [], [
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+])
+case "$host" in
+ *-hp-hpux*)
+ AC_CACHE_CHECK(
+ [if net/if.h requires mpinfou predeclaration],
+ [ntp_cv_predecl_mpinfou],
+ [
+ np_cv_predecl_mpinfou=no
+ case "$ac_cv_header_net_if_h" in
+ no)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+ } mpinfou_t;
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #include <net/if.h>
+ ]],
+ [[
+ ]]
+ )],
+ [
+ ntp_cv_predecl_mpinfou=yes
+ ac_cv_header_net_if_h=yes
+ ]
+ )
+ esac
+ ]
+ )
+ case "$ntp_cv_predecl_mpinfou" in
+ yes)
+ cat >>confdefs.h <<_ACEOF
+#ifndef MPINFOU_PREDECLARED
+# define MPINFOU_PREDECLARED
+typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+} mpinfou_t;
+#endif
+_ACEOF
+ AH_BOTTOM([
+#ifndef MPINFOU_PREDECLARED
+# define MPINFOU_PREDECLARED
+typedef union mpinfou {
+ struct pdk_mpinfo *pdkptr;
+ struct mpinfo *pikptr;
+} mpinfou_t;
+#endif
+])
+ esac
+esac
+
+case "$host" in
+ *-linux*)
+ AC_CHECK_HEADERS([linux/if_addr.h], [], [], [
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ ])
+esac
+
+AC_CHECK_HEADERS([arpa/nameser.h sys/param.h sys/time.h sys/timers.h])
+# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
+AC_CHECK_HEADERS([sys/sysctl.h], [], [], [
+ #if defined HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
+])
+AC_CHECK_HEADERS([netinet/in_system.h netinet/in_systm.h netinet/in.h])
+
+AC_CHECK_HEADERS([resolv.h], [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+])
+
+AC_CHECK_HEADERS([net/if_var.h], [], [], [
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+])
+
+AC_CHECK_HEADERS([netinet/ip.h netinet/in_var.h], [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NET_IF_VAR_H
+ # include <net/if_var.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ # include <netinet/in_systm.h>
+ #endif
+])
+
+# HMS: Do we need to check for -lsocket before or after these tests?
+HMS_SEARCH_LIBS([LDADD_LIBNTP], [inet_pton], [nsl])
+HMS_SEARCH_LIBS([LDADD_LIBNTP], [inet_ntop], [resolv], , , [-lnsl])
+
+# [Bug 1628] On Solaris, we need -lxnet -lsocket. Generalize this to
+# avoid keying on the OS name: If we find socket functions in
+# libsocket, next try for them in libxnet without libsocket, if found,
+# list both. If we simply tested libxnet first, we would find the
+# functions there and never add libsocket. See also [Bug 660]
+# http://bugs.ntp.org/show_bug.cgi?id=660#c9
+saved_LIBS=$LIBS
+HMS_SEARCH_LIBS([LDADD_LIBNTP], [setsockopt], [socket])
+case "$ac_cv_search_setsockopt" in
+ -lsocket)
+ LIBS="$saved_LIBS"
+ HMS_SEARCH_LIBS([LDADD_LIBNTP], [getsockopt], [xnet])
+ # XXX Possible trouble here - reading the comments above and looking at the
+ # code below I wonder if we'll add -lxnet when we don't need it.
+ # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
+ # there when it is not needed?
+ case "$ac_cv_search_getsockopt" in
+ -lxnet)
+ LIBS="-lxnet -lsocket $saved_LIBS"
+ ;;
+ *) LIBS="-lsocket $saved_LIBS"
+ ;;
+ esac
+ ;;
+esac
+AS_UNSET([saved_LIBS])
+
+# Bug 2427 - look for recvmsg here.
+AC_CHECK_FUNCS([recvmsg])
+
+AC_C_INLINE
+
+case "$ac_cv_c_inline" in
+ '')
+ ;;
+ *)
+ AC_DEFINE([HAVE_INLINE], [1], [inline keyword or macro available])
+ AC_SUBST([HAVE_INLINE])
+esac
+
+AC_HEADER_TIME
+AC_CHECK_SIZEOF([time_t])
+AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
+AC_CHECK_SIZEOF([signed char])
+AC_CHECK_TYPES([s_char, long long])
+AC_CHECK_SIZEOF([short])
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+
+case "$ac_cv_type_long_long" in
+ no)
+ ;;
+ *)
+ AC_CHECK_SIZEOF([long long])
+ ;;
+esac
+
+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], [1],
+ [Do we need an 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], [1],
+ [Do we need an s_char typedef?])
+ ;;
+esac
+
+AC_TYPE_UID_T
+
+m4_divert_text([HELP_ENABLE],
+[AS_HELP_STRING([defaults:],
+ [+ yes, - no, s system-specific])])
+
+NTP_DEBUG
+
+# check if we can compile with pthreads
+AC_CHECK_HEADERS([semaphore.h])
+AC_CHECK_FUNCS([socketpair])
+AC_ARG_ENABLE(
+ [thread-support],
+ [AS_HELP_STRING([--enable-thread-support],
+ [s use threads (+ if available)])],
+ [],
+ [enable_thread_support=yes]
+ )
+have_pthreads=no
+case "$enable_thread_support" in
+ yes)
+ ol_found_pthreads=no
+ OL_THREAD_CHECK([ol_found_pthreads=yes])
+ case "$ol_found_pthreads" in
+ yes)
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ AC_CHECK_FUNCS([sem_timedwait])
+ LIBS="$saved_LIBS"
+ AS_UNSET([saved_LIBS])
+ CFLAGS="$saved_CFLAGS"
+ AS_UNSET([saved_CFLAGS])
+ case "$ac_cv_func_sem_timedwait" in
+ yes)
+ PTHREAD_LIBS="$LTHREAD_LIBS"
+ have_pthreads=yes
+ # Bug 2332: With GCC we need to force a reference to libgcc_s
+ # (if libgcc_s exists) or the combination of
+ # threads + setuid + mlockall does not work on linux because
+ # thread cancellation fails to load libgcc_s with dlopen().
+ # We have to pass this all as linker options to avoid argument
+ # reordering by libtool.
+ case "$GCC$with_gnu_ld" in
+ yesyes)
+ AC_CHECK_LIB([gcc_s], [exit],
+ [PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"])
+ ;;
+ esac
+ esac
+ esac
+esac
+AC_SUBST([PTHREAD_LIBS])
+case "$have_pthreads" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
+ saved_LIBS="$LIBS"
+ LIBS="$LTHREAD_LIBS $LIBS"
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ AC_CHECK_SIZEOF(
+ [pthread_t],
+ ,
+ [
+ AC_INCLUDES_DEFAULT()
+ #include <pthread.h>
+ ]
+ )
+ LIBISC_PTHREADS_NOTHREADS=pthreads
+ AC_DEFINE([ISC_PLATFORM_USETHREADS], [1],
+ [enable libisc thread support?])
+ #
+ # We'd like to use sigwait() too
+ #
+ AC_CHECK_FUNC(
+ [sigwait],
+ [have_sigwait=yes],
+ [AC_CHECK_LIB(
+ [c],
+ [sigwait],
+ [have_sigwait=yes],
+ [AC_CHECK_LIB(
+ [pthread],
+ [sigwait],
+ [have_sigwait=yes],
+ [AC_CHECK_LIB(
+ [pthread],
+ [_Psigwait],
+ [have_sigwait=yes],
+ [have_sigwait=no]
+ )]
+ )]
+ )]
+ )
+ case "$host:$have_sigwait" in
+ *-freebsd*:no)
+ AC_CHECK_LIB(
+ [c_r],
+ [sigwait],
+ [have_sigwait=yes]
+ )
+ esac
+ case "$have_sigwait" in
+ yes)
+ ac_cv_func_sigwait=yes
+ AC_DEFINE([HAVE_SIGWAIT], [1], [sigwait() available?])
+ esac
+
+ AC_CHECK_FUNCS([pthread_attr_getstacksize])
+ AC_CHECK_FUNCS([pthread_attr_setstacksize sysconf])
+
+ case "$host" in
+ *-freebsd5.[[012]]|*-freebsd5.[[012]].*)
+ ;;
+ *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*|*-freebsd6.*)
+ AC_DEFINE([NEED_PTHREAD_SCOPE_SYSTEM], [1],
+ [use PTHREAD_SCOPE_SYSTEM?])
+ ;;
+ *-bsdi3.*|*-bsdi4.0*)
+ AC_DEFINE([NEED_PTHREAD_INIT], [1], [pthread_init() required?])
+ ;;
+ *-linux*)
+ AC_DEFINE([HAVE_LINUXTHREADS], [1], [using Linux pthread?])
+ ;;
+ *-solaris*)
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1])
+ AC_CHECK_FUNCS([pthread_setconcurrency])
+ case "$ac_cv_func_pthread_setconcurrency" in
+ yes)
+ AC_DEFINE([CALL_PTHREAD_SETCONCURRENCY], [1],
+ [why not HAVE_P_S?])
+ esac
+ ;;
+ *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
+ AC_DEFINE([HAVE_UNIXWARE_SIGWAIT], [1], [deviant sigwait?])
+ ;;
+ esac
+ hack_shutup_pthreadonceinit=no
+ case "$host" in
+ *-aix5.[[123]].*)
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.[[89]])
+ hack_shutup_pthreadonceinit=yes
+ ;;
+ *-solaris2.1[[0-9]])
+ AC_CACHE_CHECK(
+ [if extra braces are needed for PTHREAD_ONCE_INIT],
+ [ntp_cv_braces_around_pthread_once_init],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <pthread.h>
+ ]],
+ [[
+ static pthread_once_t once_test =
+ PTHREAD_ONCE_INIT;
+ ]]
+ )],
+ [ntp_cv_braces_around_pthread_once_init=no],
+ [ntp_cv_braces_around_pthread_once_init=yes]
+ )]
+ )
+ case "$ntp_cv_braces_around_pthread_once_init" in
+ yes)
+ hack_shutup_pthreadonceinit=yes
+ esac
+ ;;
+ esac
+ case "$hack_shutup_pthreadonceinit" in
+ yes)
+ AC_DEFINE([ISC_PLATFORM_BRACEPTHREADONCEINIT], [1],
+ [Enclose PTHREAD_ONCE_INIT in extra braces?])
+ esac
+ LIBS="$saved_LIBS"
+ AS_UNSET([saved_LIBS])
+ CFLAGS="$saved_CFLAGS"
+ AS_UNSET([saved_CFLAGS])
+ ;;
+ *)
+ LIBISC_PTHREADS_NOTHREADS=nothreads
+ ;;
+esac
+AC_SUBST([LIBISC_PTHREADS_NOTHREADS])
+AM_CONDITIONAL([PTHREADS], [test "$have_pthreads" != "no"])
+
+AC_DEFUN([NTP_BEFORE_HW_FUNC_VSNPRINTF], [
+ AC_BEFORE([$0], [HW_FUNC_VSNPRINTF])dnl
+ AC_BEFORE([$0], [HW_FUNC_SNPRINTF])dnl
+ AC_ARG_ENABLE(
+ [c99-snprintf],
+ [AS_HELP_STRING([--enable-c99-snprintf], [s force replacement])],
+ [force_c99_snprintf=$enableval],
+ [force_c99_snprintf=no]
+ )
+ case "$force_c99_snprintf" in
+ yes)
+ hw_force_rpl_snprintf=yes
+ hw_force_rpl_vsnprintf=yes
+ esac
+ AH_VERBATIM(
+ [snprinte],dnl sorted in config.h just before #define snprintf
+ [
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ /*
+ * stdio.h must be included after _GNU_SOURCE is defined
+ * but before #define snprintf rpl_snprintf
+ */
+ # include <stdio.h>
+ #endif
+ ])
+ AH_BOTTOM([
+ #if !defined(_KERNEL) && !defined(PARSESTREAM)
+ # if defined(HW_WANT_RPL_VSNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ # include <stdarg.h>
+ int rpl_vsnprintf(char *, size_t, const char *, va_list);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ # if defined(HW_WANT_RPL_SNPRINTF)
+ # if defined(__cplusplus)
+ extern "C" {
+ # endif
+ int rpl_snprintf(char *, size_t, const char *, ...);
+ # if defined(__cplusplus)
+ }
+ # endif
+ # endif
+ #endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */
+ ])
+]) dnl end of AC_DEFUN of NTP_BEFORE_HW_FUNC_VSNPRINTF
+
+AC_DEFUN([NTP_C99_SNPRINTF], [
+ AC_REQUIRE([NTP_BEFORE_HW_FUNC_VSNPRINTF])dnl
+ AC_REQUIRE([HW_FUNC_VSNPRINTF])dnl
+ AC_REQUIRE([HW_FUNC_SNPRINTF])dnl
+]) dnl end of DEFUN of NTP_C99_SNPRINTF
+
+NTP_C99_SNPRINTF
+
+dnl C99-snprintf does not handle %m
+case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
+ no:yes)
+ AC_CACHE_CHECK(
+ [if vsnprintf expands "%m" to strerror(errno)],
+ [ntp_cv_vsnprintf_percent_m],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ );
+
+ int call_vsnprintf(
+ char * dst,
+ size_t sz,
+ const char *fmt,
+ ...
+ )
+ {
+ va_list ap;
+ int rc;
+
+ va_start(ap, fmt);
+ rc = vsnprintf(dst, sz, fmt, ap);
+ va_end(ap);
+
+ return rc;
+ }
+ ]],
+ [[
+ char sbuf[512];
+ char pbuf[512];
+ int slen;
+
+ strcpy(sbuf, strerror(ENOENT));
+ errno = ENOENT;
+ slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
+ "wrong");
+ return strcmp(sbuf, pbuf);
+ ]]
+ )],
+ [ntp_cv_vsnprintf_percent_m=yes],
+ [ntp_cv_vsnprintf_percent_m=no],
+ [ntp_cv_vsnprintf_percent_m=no]
+ )]
+ )
+ case "$ntp_cv_vsnprintf_percent_m" in
+ yes)
+ AC_DEFINE([VSNPRINTF_PERCENT_M], [1],
+ [vsnprintf expands "%m" to strerror(errno)])
+ esac
+esac
+
+AC_CHECK_HEADERS([sys/clockctl.h])
+
+AC_ARG_ENABLE(
+ [clockctl],
+ [AS_HELP_STRING(
+ [--enable-clockctl],
+ [s Use /dev/clockctl for non-root clock control]
+ )],
+ [ntp_use_dev_clockctl=$enableval],
+ [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
+)
+
+AC_MSG_CHECKING([if we should use /dev/clockctl])
+AC_MSG_RESULT([$ntp_use_dev_clockctl])
+
+
+AC_CHECK_HEADERS([sys/capability.h sys/prctl.h])
+
+AC_MSG_CHECKING([if we have linux capabilities (libcap)])
+
+case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
+ yesyes)
+ case "$host" in
+ mips-sgi-irix*)
+ ntp_have_linuxcaps=no
+ ;;
+ *) ntp_have_linuxcaps=yes
+ ;;
+ esac
+ ;;
+ *)
+ ntp_have_linuxcaps=no
+ ;;
+esac
+
+AC_ARG_ENABLE(
+ [linuxcaps],
+ [AS_HELP_STRING(
+ [--enable-linuxcaps],
+ [+ Use Linux capabilities for non-root clock control]
+ )],
+ [ntp_have_linuxcaps=$enableval]
+)
+
+AC_MSG_RESULT([$ntp_have_linuxcaps])
+
+case "$ntp_have_linuxcaps" in
+ yes)
+ AC_DEFINE([HAVE_LINUX_CAPABILITIES], [1],
+ [Do we have Linux capabilities?])
+ LIBS="$LIBS -lcap"
+ ;;
+esac
+
+
+AC_CHECK_HEADERS([priv.h])
+
+AC_MSG_CHECKING([if we have solaris privileges])
+
+case "$ac_cv_header_priv_h" in
+ yes)
+ case "$host" in
+ *-solaris*)
+ AC_CHECK_FUNC(
+ [setppriv],
+ [ntp_have_solarisprivs=yes],
+ [ntp_have_solarisprivs=no]
+ )
+ ;;
+ esac
+esac
+
+AC_ARG_ENABLE(
+ [solarisprivs],
+ [AS_HELP_STRING(
+ [--enable-solarisprivs],
+ [+ Use Solaris privileges for non-root clock control]
+ )],
+ [ntp_have_solarisprivs=$enableval]
+)
+
+
+case "$ntp_have_solarisprivs" in
+ yes)
+ AC_DEFINE([HAVE_SOLARIS_PRIVS], [1],
+ [Are Solaris privileges available?])
+esac
+
+AC_MSG_RESULT([$ntp_have_solarisprivs])
+
+case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
+ *yes*)
+ AC_DEFINE([HAVE_DROPROOT], [1],
+ [Can we drop root privileges?])
+esac
+
+case "$host" in
+ *-*-darwin*)
+ AC_SEARCH_LIBS([res_9_init], [resolv])
+ ;;
+ *) AC_SEARCH_LIBS([res_init], [resolv])
+ ;;
+esac
+AC_HEADER_RESOLV
+#HMS: Why do we do this check so "early"?
+AC_CHECK_FUNCS([res_init], , [AC_CHECK_FUNCS([__res_init])])
+
+# We also need -lsocket, but we have tested for that already.
+AC_CHECK_FUNC([inet_ntop], [],
+ [AC_DEFINE([ISC_PLATFORM_NEEDNTOP], [1], [ISC: provide inet_ntop()])])
+AC_CHECK_FUNC([inet_pton], [],
+ [AC_DEFINE([ISC_PLATFORM_NEEDPTON], [1], [ISC: provide inet_pton()])])
+
+AC_CHECK_TYPES([uintptr_t, int32, u_int32])
+
+AH_VERBATIM([TYPEDEF_UINTPTR_T],
+[/* Provide a typedef for uintptr_t? */
+#ifndef HAVE_UINTPTR_T
+typedef unsigned int uintptr_t;
+#define HAVE_UINTPTR_T 1
+#endif])
+
+case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ AC_CACHE_CHECK(
+ [for int32 with DNS headers included],
+ [ntp_cv_type_int32_with_dns],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
+ ]],
+ [[
+ size_t cb = sizeof(int32);
+ ]]
+ )],
+ [ntp_cv_type_int32_with_dns=yes],
+ [ntp_cv_type_int32_with_dns=no]
+ )]
+ )
+ case "$ntp_cv_type_int32_with_dns" in
+ yes)
+ AC_DEFINE([HAVE_INT32_ONLY_WITH_DNS], [1],
+ [int32 type in DNS headers, not others.])
+ esac
+esac
+
+case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
+ no::yes)
+ AC_CACHE_CHECK(
+ [for u_int32 with DNS headers included],
+ [ntp_cv_type_u_int32_with_dns],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_ARPA_NAMESER_H
+ # include <arpa/nameser.h>
+ #endif
+ #include <resolv.h>
+ ]],
+ [[
+ size_t cb = sizeof(u_int32);
+ ]]
+ )],
+ [ntp_cv_type_u_int32_with_dns=yes],
+ [ntp_cv_type_u_int32_with_dns=no]
+ )]
+ )
+ case "$ntp_cv_type_u_int32_with_dns" in
+ yes)
+ AC_DEFINE([HAVE_U_INT32_ONLY_WITH_DNS], [1],
+ [u_int32 type in DNS headers, not others.])
+ esac
+esac
+
+AC_CHECK_HEADERS(
+ [sys/timepps.h],
+ [],
+ [],
+ [
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_ERRNO_H
+ # include <errno.h>
+ #endif
+ ]
+)
+
+AC_CACHE_CHECK(
+ [for struct timespec],
+ [ntp_cv_struct_timespec],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #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;
+ ]]
+ )],
+ [ntp_cv_struct_timespec=yes],
+ [ntp_cv_struct_timespec=no]
+ )]
+)
+case "$ntp_cv_struct_timespec" in
+ yes)
+ AC_DEFINE([HAVE_STRUCT_TIMESPEC], [1], [struct timespec declared?])
+esac
+
+AC_CACHE_CHECK(
+ [for struct ntptimeval],
+ [ntp_cv_struct_ntptimeval],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/time.h>
+ #include <sys/timex.h>
+ ]],
+ [[
+ struct ntptimeval n;
+ ]]
+ )],
+ [ntp_cv_struct_ntptimeval=yes],
+ [ntp_cv_struct_ntptimeval=no]
+ )]
+)
+case "$ntp_cv_struct_ntptimeval" in
+ yes)
+ AC_DEFINE([HAVE_STRUCT_NTPTIMEVAL], [1],
+ [Do we have struct ntptimeval?])
+esac
+
+AC_CHECK_HEADERS(
+ [md5.h],
+ [],
+ [],
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ ]
+)
+
+AC_SEARCH_LIBS([MD5Init], [md5 md])
+AC_CHECK_FUNCS([MD5Init sysconf getdtablesize sigaction sigset sigvec])
+
+AC_CACHE_CHECK(
+ [for SIGIO],
+ [ntp_cv_hdr_def_sigio],
+ [AC_PREPROC_IFELSE(
+ [
+ #include <signal.h>
+
+ #ifndef SIGIO
+ # error
+ #endif
+ ],
+ [ntp_cv_hdr_def_sigio=yes],
+ [ntp_cv_hdr_def_sigio=no]
+ )]
+ )
+
+dnl Override those system that have a losing SIGIO
+AC_MSG_CHECKING([if we want to use SIGIO])
+ans=no
+case "$ntp_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
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ m68k-*-mint*)
+ ans=no
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+ AC_DEFINE([HAVE_SIGNALED_IO], [1],
+ [Can we use SIGIO for tcp and udp IO?])
+esac
+AC_MSG_RESULT([$ans])
+
+AC_CACHE_CHECK(
+ [for SIGPOLL],
+ [ntp_cv_hdr_def_sigpoll],
+ [AC_PREPROC_IFELSE(
+ [
+ #include <signal.h>
+
+ #ifndef SIGPOLL
+ # error
+ #endif
+ ],
+ [ntp_cv_hdr_def_sigpoll=yes],
+ [ntp_cv_hdr_def_sigpoll=no]
+ )]
+)
+
+AC_MSG_CHECKING([if we can use SIGPOLL for UDP I/O])
+ans=no
+case "$ntp_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[[4-9]]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-solaris*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+ AC_DEFINE([USE_UDP_SIGPOLL], [1], [Can we use SIGPOLL for UDP?])
+esac
+AC_MSG_RESULT([$ans])
+
+AC_MSG_CHECKING([if we can use SIGPOLL for TTY I/O])
+ans=no
+case "$ntp_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[[4-9]]*)
+ # XXX Only verified thru AIX6
+ ans=no
+ ;;
+ *-*-hpux*)
+ ans=no
+ ;;
+ *-*-*linux*)
+ ans=no
+ ;;
+ *-*-osf*)
+ ans=no
+ ;;
+ *-*-sunos*)
+ ans=no
+ ;;
+ *-*-ultrix*)
+ ans=no
+ ;;
+ *-*-qnx*)
+ ans=no
+ ;;
+ *-*-unicosmp*)
+ ans=no
+ ;;
+ *-*-kfreebsd*)
+ ans=no
+ ;;
+ *) ans=yes
+ ;;
+ esac
+ ;;
+esac
+case "$ans" in
+ yes)
+ AC_DEFINE([USE_TTY_SIGPOLL], [1], [Can we use SIGPOLL for tty IO?])
+esac
+AC_MSG_RESULT([$ans])
+
+AC_CACHE_CHECK(
+ [number of arguments to gettimeofday()],
+ [ntp_cv_func_Xettimeofday_nargs],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/time.h>
+ ]],
+ [[
+ gettimeofday(0, 0);
+ settimeofday(0, 0);
+ ]]
+ )],
+ [ntp_cv_func_Xettimeofday_nargs=2],
+ [ntp_cv_func_Xettimeofday_nargs=1]
+ )]
+)
+case "$ntp_cv_func_Xettimeofday_nargs" in
+ 1)
+ AC_DEFINE([SYSV_TIMEOFDAY], [1], [Does Xettimeofday take 1 arg?])
+esac
+
+AC_CHECK_FUNCS([settimeofday], ,[
+ case "$host" in
+ *-*-mpeix*) ac_cv_func_settimeofday=yes
+ esac
+])
+
+AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
+ntp_warning='GRONK'
+ans=none
+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!'
+ esac
+esac
+AC_MSG_RESULT([$ans])
+case "$ntp_warning" in
+ '')
+ ;;
+ *)
+ AC_MSG_WARN([*** $ntp_warning ***])
+ ;;
+esac
+
+
+dnl add to LDADD_LIBNTP set by ntp_compiler.m4
+LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
+LIBS=$__LIBS
+AS_UNSET([__LIBS])
+
+])dnl
+dnl ======================================================================
diff --git a/m4/ntp_lineeditlibs.m4 b/sntp/m4/ntp_lineeditlibs.m4
index f86e617f4b30..f86e617f4b30 100644
--- a/m4/ntp_lineeditlibs.m4
+++ b/sntp/m4/ntp_lineeditlibs.m4
diff --git a/sntp/m4/ntp_locinfo.m4 b/sntp/m4/ntp_locinfo.m4
new file mode 100644
index 000000000000..f045ac2609d5
--- /dev/null
+++ b/sntp/m4/ntp_locinfo.m4
@@ -0,0 +1,129 @@
+dnl ######################################################################
+dnl @synopsis NTP_LOCINFO([SCRIPTSDIRPATH])
+dnl Location information:
+dnl - installation directory (*_DB for bin/, *_DL for libexec/, *_DS for sbin/)
+dnl ... or *_NI for noinst_*
+dnl - man tag format (man or mdoc)
+dnl - man section (1, 1m, 1M, 8)
+
+AC_DEFUN([NTP_LOCINFO], [
+
+AC_MSG_CHECKING([for install dir and man conventions])
+
+AC_ARG_WITH(
+ [locfile],
+ [AS_HELP_STRING(
+ [--with-locfile=XXX],
+ [os-specific or "legacy"]
+ )],
+ [],
+ [with_locfile=no]
+)
+
+( \
+ SENTINEL_DIR="$PWD" && \
+ cd $srcdir/$1 && \
+ case "$with_locfile" in \
+ yes|no|'') \
+ scripts/genLocInfo -d "$SENTINEL_DIR" \
+ ;; \
+ *) \
+ scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile" \
+ ;; \
+ esac \
+) > genLocInfo.i 2> genLocInfo.err
+. ./genLocInfo.i
+
+case "$GENLOCINFO" in
+ OK)
+ AC_MSG_RESULT([in file $GENLOCINFOFILE])
+ rm genLocInfo.err genLocInfo.i
+ ;;
+ *)
+ AC_MSG_RESULT([failed.])
+ AC_MSG_ERROR([Problem with genLocInfo!])
+ ;;
+esac
+
+AM_CONDITIONAL([WANT_CALC_TICKADJ_MS], [test "$CALC_TICKADJ_MS" ])
+
+AC_SUBST([CALC_TICKADJ_DB])
+AC_SUBST([CALC_TICKADJ_DL])
+AC_SUBST([CALC_TICKADJ_DS])
+AC_SUBST([CALC_TICKADJ_MS])
+AC_SUBST([CALC_TICKADJ_NI])
+AC_SUBST([MANTAGFMT])
+AC_SUBST([NTPDATE_DB])
+AC_SUBST([NTPDATE_DL])
+AC_SUBST([NTPDATE_DS])
+AC_SUBST([NTPDATE_MS])
+AC_SUBST([NTPDATE_NI])
+AC_SUBST([NTPDC_DB])
+AC_SUBST([NTPDC_DL])
+AC_SUBST([NTPDC_DS])
+AC_SUBST([NTPDC_MS])
+AC_SUBST([NTPDC_NI])
+AC_SUBST([NTPDSIM_DB])
+AC_SUBST([NTPDSIM_DL])
+AC_SUBST([NTPDSIM_DS])
+AC_SUBST([NTPDSIM_MS])
+AC_SUBST([NTPDSIM_NI])
+AC_SUBST([NTPD_DB])
+AC_SUBST([NTPD_DL])
+AC_SUBST([NTPD_DS])
+AC_SUBST([NTPD_MS])
+AC_SUBST([NTPD_NI])
+AC_SUBST([NTPQ_DB])
+AC_SUBST([NTPQ_DL])
+AC_SUBST([NTPQ_DS])
+AC_SUBST([NTPQ_MS])
+AC_SUBST([NTPQ_NI])
+AC_SUBST([NTPSNMPD_DB])
+AC_SUBST([NTPSNMPD_DL])
+AC_SUBST([NTPSNMPD_DS])
+AC_SUBST([NTPSNMPD_MS])
+AC_SUBST([NTPSNMPD_NI])
+AC_SUBST([NTPSWEEP_DB])
+AC_SUBST([NTPSWEEP_DL])
+AC_SUBST([NTPSWEEP_DS])
+AC_SUBST([NTPSWEEP_MS])
+AC_SUBST([NTPSWEEP_NI])
+AM_CONDITIONAL([INSTALL_NTPSWEEP], [test -z "$NTPSWEEP_NI" ])
+AC_SUBST([NTPTIME_DB])
+AC_SUBST([NTPTIME_DL])
+AC_SUBST([NTPTIME_DS])
+AC_SUBST([NTPTIME_MS])
+AC_SUBST([NTPTIME_NI])
+AC_SUBST([NTPTRACE_DB])
+AC_SUBST([NTPTRACE_DL])
+AC_SUBST([NTPTRACE_DS])
+AC_SUBST([NTPTRACE_MS])
+AC_SUBST([NTPTRACE_NI])
+AC_SUBST([NTP_KEYGEN_DB])
+AC_SUBST([NTP_KEYGEN_DL])
+AC_SUBST([NTP_KEYGEN_DS])
+AC_SUBST([NTP_KEYGEN_MS])
+AC_SUBST([NTP_KEYGEN_NI])
+AC_SUBST([NTP_WAIT_DB])
+AC_SUBST([NTP_WAIT_DL])
+AC_SUBST([NTP_WAIT_DS])
+AC_SUBST([NTP_WAIT_MS])
+AC_SUBST([NTP_WAIT_NI])
+AC_SUBST([SNTP_DB])
+AC_SUBST([SNTP_DL])
+AC_SUBST([SNTP_DS])
+AC_SUBST([SNTP_MS])
+AC_SUBST([SNTP_NI])
+AC_SUBST([TICKADJ_DB])
+AC_SUBST([TICKADJ_DL])
+AC_SUBST([TICKADJ_DS])
+AC_SUBST([TICKADJ_MS])
+AC_SUBST([TICKADJ_NI])
+AC_SUBST([TIMETRIM_DB])
+AC_SUBST([TIMETRIM_DL])
+AC_SUBST([TIMETRIM_DS])
+AC_SUBST([TIMETRIM_MS])
+AC_SUBST([TIMETRIM_NI])
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_openssl.m4 b/sntp/m4/ntp_openssl.m4
new file mode 100644
index 000000000000..9d9189ce9383
--- /dev/null
+++ b/sntp/m4/ntp_openssl.m4
@@ -0,0 +1,372 @@
+dnl ####################################################################
+dnl OpenSSL support shared by top-level and sntp/configure.ac
+dnl
+dnl Provides command-line option --with-crypto, as well as deprecated
+dnl options --with-openssl-incdir, --with-openssl-libdir, and the
+dnl latter's suboption --with-rpath.
+dnl
+dnl Specifying --with-openssl-libdir or --with-openssl-incdir causes any
+dnl pkg-config openssl information to be ignored in favor of the legacy
+dnl manual search for directories and specified library names.
+dnl
+dnl Output AC_DEFINEs (for config.h)
+dnl OPENSSL defined only if using OpenSSL
+dnl
+dnl Output variables:
+dnl ntp_openssl yes if using OpenSSL, no otherwise
+dnl
+dnl Output substitutions:
+dnl CFLAGS_NTP OpenSSL-specific flags added as needed, and
+dnl -Wstrict-prototypes for gcc if it does not
+dnl trigger a flood of warnings for each file
+dnl including OpenSSL headers.
+dnl CPPFLAGS_NTP OpenSSL -Iincludedir flags added as needed.
+dnl LDADD_NTP OpenSSL -L and -l flags added as needed.
+dnl LDFLAGS_NTP Other OpenSSL link flags added as needed.
+dnl
+dnl ####################################################################
+AC_DEFUN([NTP_OPENSSL], [
+AC_REQUIRE([NTP_PKG_CONFIG])dnl
+AC_REQUIRE([NTP_VER_SUFFIX])dnl
+
+AC_ARG_WITH(
+ [crypto],
+ [AS_HELP_STRING(
+ [--with-crypto],
+ [+ =openssl,libcrypto]
+ )]
+)
+AC_ARG_WITH(
+ [openssl-libdir],
+ [AS_HELP_STRING(
+ [--with-openssl-libdir],
+ [+ =/something/reasonable]
+ )]
+)
+AC_ARG_WITH(
+ [openssl-incdir],
+ [AS_HELP_STRING(
+ [--with-openssl-incdir],
+ [+ =/something/reasonable]
+ )]
+)
+AC_ARG_WITH(
+ [rpath],
+ [AS_HELP_STRING(
+ [--without-rpath],
+ [s Disable auto-added -R linker paths]
+ )]
+)
+ntp_openssl=no
+ntp_openssl_from_pkg_config=no
+with_crypto=${with_crypto:-openssl,libcrypto}
+case "$with_crypto" in
+ yes)
+ with_crypto=openssl,libcrypto
+esac
+case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
+ no:*) ;;
+ *:notempty:notgiven:notgiven)
+ for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
+ AC_MSG_CHECKING([pkg-config for $pkg])
+ if $PKG_CONFIG --exists $pkg ; then
+ CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
+ CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
+ LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l $pkg`"
+ LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
+ VER_SUFFIX=o
+ ntp_openssl=yes
+ ntp_openssl_from_pkg_config=yes
+ AC_MSG_RESULT([yes])
+
+ break
+ fi
+ AC_MSG_RESULT([no])
+ done
+esac
+case "$with_crypto:$ntp_openssl" in
+ no:*) ;;
+ *:no)
+ need_dash_r=
+ need_dash_Wlrpath=
+ case "${with_rpath-notgiven}" in
+ yes)
+ # Lame - what to do if we need -Wl... but not -R?
+ need_dash_r=1
+ ;;
+ notgiven)
+ case "$host" in
+ *-*-linux*)
+ # This may really only be true for gcc
+ need_dash_Wlrpath=1
+ ;;
+ *-*-netbsd*)
+ need_dash_r=1
+ ;;
+ *-*-solaris*)
+ need_dash_r=1
+ ;;
+ esac
+ ;;
+ esac
+
+ AC_MSG_CHECKING([for openssl library directory])
+ with_openssl_libdir=${with_openssl_libdir-notgiven}
+ case "$with_openssl_libdir" in
+ notgiven)
+ case "$build" in
+ $host)
+ with_openssl_libdir=default
+ ;;
+ *)
+ with_openssl_libdir=no
+ ;;
+ esac
+ esac
+ case "$with_openssl_libdir" in
+ default)
+ # Look in:
+ with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
+ with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
+ esac
+ case "$with_openssl_libdir" in
+ no)
+ ;;
+ *) # Look for libcrypto.a and libssl.a:
+ for i in $with_openssl_libdir no
+ do
+ case "$host" in
+ *-*-darwin*)
+ test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
+ ;;
+ *)
+ test -f $i/libcrypto.so -a -f $i/libssl.so && break
+ test -f $i/libcrypto.a -a -f $i/libssl.a && break
+ ;;
+ esac
+ done
+ openssl_libdir=$i
+ ;;
+ esac
+ AC_MSG_RESULT([$openssl_libdir])
+ case "$openssl_libdir" in
+ no)
+ openssl_libdir=
+ AC_MSG_WARN([libcrypto and libssl not found in any of $with_openssl_libdir])
+ esac
+
+ AC_MSG_CHECKING([for openssl include directory])
+ with_openssl_incdir=${with_openssl_incdir-notgiven}
+ case "$with_openssl_incdir" in
+ notgiven)
+ # Look in:
+ with_openssl_incdir="/usr/include /usr/sfw/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/include"
+ with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
+ esac
+ case "$with_openssl_incdir" in
+ no)
+ ;;
+ *) # look for openssl/evp.h:
+ for i in $with_openssl_incdir no
+ do
+ test -f $i/openssl/evp.h && break
+ done
+ openssl_incdir=$i
+ ;;
+ esac
+ AS_UNSET([i])
+ AC_MSG_RESULT([$openssl_incdir])
+ case "$openssl_incdir" in
+ no)
+ openssl_incdir=
+ AC_MSG_WARN([did not find openssl/evp.h in any of $with_openssl_incdir])
+ esac
+ if test -z "$openssl_libdir" -o -z "$openssl_incdir"
+ then
+ ntp_openssl=no
+ else
+ ntp_openssl=yes
+ VER_SUFFIX=o
+ fi
+ case "$ntp_openssl" in
+ yes)
+ # We have OpenSSL inc/lib dirs - use them.
+ case "$openssl_incdir" in
+ /usr/include)
+ ;;
+ *)
+ CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
+ ;;
+ esac
+ case "$openssl_libdir" in
+ /usr/lib)
+ ;;
+ *)
+ LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
+ case "$need_dash_r" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
+ esac
+ case "$need_dash_Wlrpath" in
+ 1)
+ LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
+ esac
+ ;;
+ esac
+ LDADD_NTP="$LDADD_NTP -lcrypto"
+ esac
+esac
+
+AC_MSG_CHECKING([if we will use crypto])
+AC_MSG_RESULT([$ntp_openssl])
+
+case "$ntp_openssl" in
+ yes)
+ AC_DEFINE([OPENSSL], [], [Use OpenSSL?])
+ case "$VER_SUFFIX" in
+ *o*) ;;
+ *) AC_MSG_ERROR([OPENSSL set but no 'o' in VER_SUFFIX!]) ;;
+ esac
+ ;;
+esac
+
+NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
+NTPO_SAVED_LIBS="$LIBS"
+
+#
+# check for linking with -lcrypto failure, and try -lcrypto -lz.
+# Helps m68k-atari-mint
+#
+case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
+ yes:no)
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
+ AC_CACHE_CHECK(
+ [if linking with -lcrypto alone works],
+ [ntp_cv_bare_lcrypto],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ ]],
+ [[
+ ERR_load_crypto_strings();
+ OpenSSL_add_all_algorithms();
+ ]]
+ )],
+ [ntp_cv_bare_lcrypto=yes],
+ [ntp_cv_bare_lcrypto=no]
+ )]
+ )
+ case "$ntp_cv_bare_lcrypto" in
+ no)
+ LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
+ AC_CACHE_CHECK(
+ [if linking with -lcrypto -lz works],
+ [ntp_cv_lcrypto_lz],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include "openssl/err.h"
+ #include "openssl/evp.h"
+ ]],
+ [[
+ ERR_load_crypto_strings();
+ OpenSSL_add_all_algorithms();
+ ]]
+ )],
+ [ntp_cv_lcrypto_lz=yes],
+ [ntp_cv_lcrypto_lz=no]
+ )]
+ )
+ case "$ntp_cv_lcrypto_lz" in
+ yes)
+ LDADD_NTP="$LDADD_NTP -lz"
+ esac
+ esac
+esac
+
+#
+# Older OpenSSL headers have a number of callback prototypes inside
+# other function prototypes which trigger copious warnings with gcc's
+# -Wstrict-prototypes, which is included in -Wall.
+#
+# An example:
+#
+# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
+# int (*cb)(), int sgckey);
+# ^^^^^^^^^^^
+#
+#
+#
+openssl_triggers_warnings=unknown
+NTPO_SAVED_CFLAGS="$CFLAGS"
+
+case "$ntp_openssl:$GCC" in
+ yes:yes)
+ CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ ]],
+ [[
+ /* see if -Werror breaks gcc */
+ ]]
+ )],
+ [gcc_handles_Werror=yes],
+ [gcc_handles_Werror=no]
+ )
+ case "$gcc_handles_Werror" in
+ no)
+ # if this gcc doesn't do -Werror go ahead and use
+ # -Wstrict-prototypes.
+ openssl_triggers_warnings=yes
+ ;;
+ yes)
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #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"
+ ]],
+ [[
+ /* empty body */
+ ]]
+ )],
+ [openssl_triggers_warnings=no],
+ [openssl_triggers_warnings=yes]
+ )
+ esac
+ case "$openssl_triggers_warnings" in
+ yes)
+ CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
+ ;;
+ *)
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
+ esac
+ ;;
+ no:yes)
+ # gcc without OpenSSL
+ CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
+esac
+
+CFLAGS="$NTPO_SAVED_CFLAGS"
+CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
+LIBS="$NTPO_SAVED_LIBS"
+AS_UNSET([NTPO_SAVED_CFLAGS])
+AS_UNSET([NTPO_SAVED_CPPFLAGS])
+AS_UNSET([NTPO_SAVED_LIBS])
+AS_UNSET([openssl_triggers_warnings])
+AS_UNSET([ntp_openssl_from_pkg_config])
+])
+dnl ======================================================================
diff --git a/sntp/m4/ntp_pkg_config.m4 b/sntp/m4/ntp_pkg_config.m4
new file mode 100644
index 000000000000..1bce8a6e4db3
--- /dev/null
+++ b/sntp/m4/ntp_pkg_config.m4
@@ -0,0 +1,27 @@
+dnl NTP_PKG_CONFIG -*- Autoconf -*-
+dnl
+dnl Look for pkg-config, which must be at least
+dnl $ntp_pkgconfig_min_version.
+dnl
+AC_DEFUN([NTP_PKG_CONFIG], [
+
+dnl lower the minimum version if you find an earlier one works
+ntp_pkgconfig_min_version='0.15.0'
+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+AS_UNSET([ac_cv_path_PKG_CONFIG])
+AS_UNSET([ac_cv_path_ac_pt_PKG_CONFIG])
+
+case "$PKG_CONFIG" in
+ /*)
+ AC_MSG_CHECKING([if pkg-config is at least version $ntp_pkgconfig_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+ ;;
+esac
+
+]) dnl NTP_PKG_CONFIG
+
diff --git a/sntp/m4/ntp_prog_cc.m4 b/sntp/m4/ntp_prog_cc.m4
new file mode 100644
index 000000000000..c6b4e03f0770
--- /dev/null
+++ b/sntp/m4/ntp_prog_cc.m4
@@ -0,0 +1,21 @@
+dnl ######################################################################
+dnl NTP compiler basics
+dnl
+AC_DEFUN([NTP_PROG_CC], [
+
+dnl must come before AC_PROG_CC or similar
+AC_USE_SYSTEM_EXTENSIONS
+
+dnl we need to check for cross compile tools for vxWorks here
+AC_PROG_CC
+# Ralf Wildenhues: With per-target flags we need CC_C_O
+# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
+AM_PROG_CC_C_O
+AC_PROG_GCC_TRADITIONAL
+NTP_COMPILER
+AC_C_BIGENDIAN
+AC_C_VOLATILE
+AC_PROG_CPP
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_rlimit.m4 b/sntp/m4/ntp_rlimit.m4
new file mode 100644
index 000000000000..c1267b771374
--- /dev/null
+++ b/sntp/m4/ntp_rlimit.m4
@@ -0,0 +1,66 @@
+dnl ######################################################################
+dnl rlimit capabilities checks
+AC_DEFUN([NTP_RLIMIT_ITEMS], [
+
+AC_CACHE_CHECK(
+ [for RLIMIT_MEMLOCK],
+ [ntp_cv_rlimit_memlock],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_RESOURCE_H
+ # include <sys/resource.h>
+ #endif
+ ]],
+ [[
+ getrlimit(RLIMIT_MEMLOCK, 0);
+ ]]
+ )],
+ [ntp_cv_rlimit_memlock=yes],
+ [ntp_cv_rlimit_memlock=no]
+ )]
+)
+case "$ntp_cv_rlimit_memlock" in
+ yes)
+ AC_SUBST([HAVE_RLIMIT_MEMLOCK])
+ HAVE_RLIMIT_MEMLOCK=" memlock 32"
+esac
+
+AC_CACHE_CHECK(
+ [for RLIMIT_STACK],
+ [ntp_cv_rlimit_stack],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+ #ifdef HAVE_SYS_RESOURCE_H
+ # include <sys/resource.h>
+ #endif
+ ]],
+ [[
+ getrlimit(RLIMIT_STACK, 0);
+ ]]
+ )],
+ [ntp_cv_rlimit_stack=yes],
+ [ntp_cv_rlimit_stack=no]
+ )]
+)
+case "$ntp_cv_rlimit_stack" in
+ yes)
+ AC_SUBST([HAVE_RLIMIT_STACK])
+ HAVE_RLIMIT_STACK=" stacksize 50"
+esac
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_sntp.m4 b/sntp/m4/ntp_sntp.m4
new file mode 100644
index 000000000000..a9d405eae38e
--- /dev/null
+++ b/sntp/m4/ntp_sntp.m4
@@ -0,0 +1,29 @@
+dnl ######################################################################
+dnl Common m4sh code SNTP
+AC_DEFUN([NTP_WITHSNTP], [
+
+dnl preset withsntp=no in env to change default to --without-sntp
+AC_MSG_CHECKING([if sntp will be built])
+AC_ARG_WITH(
+ [sntp],
+ [AS_HELP_STRING(
+ [--without-sntp],
+ [- disable building sntp and sntp/tests]
+ )],
+ [],
+ [with_sntp="${withsntp=yes}"]
+)
+case "$with_sntp" in
+ no)
+ SNTP=
+ ;;
+ *)
+ SNTP=sntp
+ ;;
+esac
+AC_SUBST([SNTP])
+AM_CONDITIONAL([BUILD_SNTP], [test -n "$SNTP"])
+AC_MSG_RESULT([$with_sntp])
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_sysexits.m4 b/sntp/m4/ntp_sysexits.m4
new file mode 100644
index 000000000000..48a529d4107e
--- /dev/null
+++ b/sntp/m4/ntp_sysexits.m4
@@ -0,0 +1,11 @@
+dnl ######################################################################
+dnl sysexits.h
+AC_DEFUN([NTP_SYSEXITS_H], [
+
+AC_CHECK_HEADERS([sysexits.h], [],[
+AC_DEFINE([EX_OK], [0], [successful termination])
+AC_DEFINE([EX_SOFTWARE], [70], [internal software error])
+])dnl
+
+])dnl
+dnl ======================================================================
diff --git a/sntp/m4/ntp_ver_suffix.m4 b/sntp/m4/ntp_ver_suffix.m4
new file mode 100644
index 000000000000..34839b58b323
--- /dev/null
+++ b/sntp/m4/ntp_ver_suffix.m4
@@ -0,0 +1,13 @@
+dnl ####################################################################
+dnl NTP Version Suffix (Crypto)
+dnl
+dnl Output substitutions:
+dnl VER_SUFFIX Version Suffix (scripts/mkver.in)
+dnl
+dnl ####################################################################
+AC_DEFUN([NTP_VER_SUFFIX], [
+
+AC_SUBST([VER_SUFFIX])
+VER_SUFFIX=
+])
+dnl ======================================================================
diff --git a/sntp/m4/ntp_vpathhack.m4 b/sntp/m4/ntp_vpathhack.m4
new file mode 100644
index 000000000000..7099fe88d1e1
--- /dev/null
+++ b/sntp/m4/ntp_vpathhack.m4
@@ -0,0 +1,43 @@
+dnl ######################################################################
+dnl NTP_VPATH_HACK
+dnl
+dnl Compiling ntpd doesn't require YACC or Bison unless ntp_parser.y is
+dnl modified, because the output ntp_parser.[ch] are committed. This
+dnl raises an issue with Automake-generated Makefiles on non-GNU make
+dnl used from a build tree outside the source tree.
+dnl
+dnl With GNU make, ylwrap updates $srcdir/ntp_parser.[ch] directly.
+dnl Under Sun or BSD make, ylwrap needs those files to be in the build
+dnl tree.
+dnl
+dnl With VPATH_HACK enabled, ntpd/Makefile.am includes code to symlink
+dnl from ntp_parser.[ch] in the build tree to the corresponding files
+dnl in $srcdir, and to check for ylwrap replacing the .h with a normal
+dnl file, and in that case copy the updated .h to $srcdir and restore
+dnl the symlink.
+dnl
+dnl if we are building outside the srcdir and either
+dnl force_ntp_vpath_hack is yes
+dnl or
+dnl we're not using GNU make
+dnl then we want VPATH_HACK to be true for .am tests
+dnl
+AC_DEFUN([NTP_VPATH_HACK], [
+AC_MSG_CHECKING([to see if we need ylwrap VPATH hack])
+ntp_vpath_hack="no"
+case "$srcdir::${force_ntp_vpath_hack-no}" in
+ .::*)
+ ;; # VPATH_HACK path is for VPATH builds only.
+ *::yes)
+ ntp_vpath_hack="yes"
+ ;;
+ *::*)
+ case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
+ '')
+ ntp_vpath_hack="yes"
+ esac
+esac
+AC_MSG_RESULT([$ntp_vpath_hack])
+AM_CONDITIONAL([VPATH_HACK], [test x$ntp_vpath_hack = xyes])
+])
+dnl ======================================================================
diff --git a/m4/os_cflags.m4 b/sntp/m4/os_cflags.m4
index 7fac93bd1e8c..2ac4ffc7dfb7 100644
--- a/m4/os_cflags.m4
+++ b/sntp/m4/os_cflags.m4
@@ -7,7 +7,7 @@ AC_DEFUN([NTP_OS_CFLAGS], [
set)
;;
*)
- ntp_os_cflags=""
+ ntp_os_cflags=
case "$host_os" in
aix[[1-3]]*)
;;
@@ -21,8 +21,13 @@ AC_DEFUN([NTP_OS_CFLAGS], [
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
;;
aix*)
+ # XXX Only verified thru AIX6.
+ # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
# avoid circular dependencies in yp headers
- ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
+ # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
+ # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
+ # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
+ ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
;;
amigaos)
@@ -91,8 +96,8 @@ AC_DEFUN([NTP_OS_CFLAGS], [
;;
*)
ntp_os_cflags_msg="$ntp_os_cflags"
- CFLAGS="$CFLAGS $ntp_os_cflags"
esac
+ CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
AC_MSG_RESULT([$ntp_os_cflags_msg])
AS_UNSET([ntp_os_cflags_msg])
])
diff --git a/sntp/m4/snprintf.m4 b/sntp/m4/snprintf.m4
new file mode 100644
index 000000000000..15f06f0805c1
--- /dev/null
+++ b/sntp/m4/snprintf.m4
@@ -0,0 +1,288 @@
+# Modified by Dave Hart for integration into NTP 4.2.7 <hart@ntp.org>
+#
+# Changed in a backwards-incompatible way to separate HAVE_SNPRINTF from
+# HW_WANT_RPL_SNPRINTF, etc. for each of the four replaced functions.
+# HAVE_* will always be set if the corresponding HW_FUNC_* macro is
+# invoked, directly or indirectly. This allows 3rd-party modules like
+# libopts to avoid their own replacement of snprintf.
+#
+# Changed to honor hw_nodef_snprintf, etc. which prevent config.h from
+# aliasing snprintf to rpl_snprintf, etc.
+#
+# Changed to honor hw_force_rpl_snprintf=yes, etc. This is used by NTP
+# to test rpl_snprintf() and rpl_vsnprintf() on platforms which provide
+# C99-compliant implementations.
+#
+
+# $Id: snprintf.m4,v 1.1.1.1 2008/01/06 03:24:00 holger Exp $
+
+# Copyright (c) 2008 Holger Weiss <holger@jhweiss.de>.
+#
+# This code may freely be used, modified and/or redistributed for any purpose.
+# It would be nice if additions and fixes to this file (including trivial code
+# cleanups) would be sent back in order to let me include them in the version
+# available at <http://www.jhweiss.de/software/snprintf.html>. However, this is
+# not a requirement for using or redistributing (possibly modified) versions of
+# this file, nor is leaving this notice intact mandatory.
+
+# HW_HEADER_STDARG_H
+# ------------------
+# Define HAVE_STDARG_H to 1 if <stdarg.h> is available.
+AC_DEFUN([HW_HEADER_STDARG_H],
+[
+ AC_PREREQ([2.60])dnl Older releases should work if AC_CHECK_HEADERS is used.
+ AC_CHECK_HEADERS_ONCE([stdarg.h])
+])# HW_HEADER_STDARG_H
+
+# HW_HEADER_VARARGS_H
+# -------------------
+# Define HAVE_VARARGS_H to 1 if <varargs.h> is available.
+AC_DEFUN([HW_HEADER_VARARGS_H],
+[
+ AC_PREREQ([2.60])dnl Older releases should work if AC_CHECK_HEADERS is used.
+ AC_CHECK_HEADERS_ONCE([varargs.h])
+])# HW_HEADER_VARARGS_H
+
+# HW_FUNC_VA_COPY
+# ---------------
+# Set $hw_cv_func_va_copy to "yes" or "no". Define HAVE_VA_COPY to 1 if
+# $hw_cv_func_va_copy is set to "yes". Note that it's "unspecified whether
+# va_copy and va_end are macros or identifiers declared with external linkage."
+# (C99: 7.15.1, 1) Therefore, the presence of va_copy(3) cannot simply "be
+# tested with #ifdef", as suggested by the Autoconf manual (5.5.1).
+AC_DEFUN([HW_FUNC_VA_COPY],
+[
+ AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+ AC_REQUIRE([HW_HEADER_VARARGS_H])dnl Our check evaluates HAVE_VARARGS_H.
+ AC_CACHE_CHECK([for va_copy],
+ [hw_cv_func_va_copy],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_STDARG_H
+ #include <stdarg.h>
+ #elif HAVE_VARARGS_H
+ #include <varargs.h>
+ #endif]],
+ [[va_list ap, aq; va_copy(aq, ap);]])],
+ [hw_cv_func_va_copy=yes],
+ [hw_cv_func_va_copy=no],
+ [hw_cv_func_va_copy=no])])
+ AS_IF([test "$hw_cv_func_va_copy" = yes],
+ [AC_DEFINE([HAVE_VA_COPY], [1],
+ [Define to 1 if you have the `va_copy' function or macro.])])
+])# HW_FUNC_VA_COPY
+
+# HW_FUNC___VA_COPY
+# -----------------
+# Set $hw_cv_func___va_copy to "yes" or "no". Define HAVE___VA_COPY to 1 if
+# $hw_cv_func___va_copy is set to "yes".
+AC_DEFUN([HW_FUNC___VA_COPY],
+[
+ AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+ AC_REQUIRE([HW_HEADER_VARARGS_H])dnl Our check evaluates HAVE_VARARGS_H.
+ AC_CACHE_CHECK([for __va_copy],
+ [hw_cv_func___va_copy],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_STDARG_H
+ #include <stdarg.h>
+ #elif HAVE_VARARGS_H
+ #include <varargs.h>
+ #endif]],
+ [[va_list ap, aq; __va_copy(aq, ap);]])],
+ [hw_cv_func___va_copy=yes],
+ [hw_cv_func___va_copy=no],
+ [hw_cv_func___va_copy=no])])
+ AS_IF([test "$hw_cv_func___va_copy" = yes],
+ [AC_DEFINE([HAVE___VA_COPY], [1],
+ [Define to 1 if you have the `__va_copy' function or macro.])])
+])# HW_FUNC___VA_COPY
+
+# HW_FUNC_VSNPRINTF
+# -----------------
+# Set $hw_cv_func_vsnprintf and $hw_cv_func_vsnprintf_c99 to "yes" or
+# "no", respectively. If either $hw_force_rpl_vsnprintf is "yes" or
+# $hw_cv_func_vsnprintf_c99 is "no", define HW_WANT_RPL_VSNPRINTF and
+# define vsnprintf to rpl_vsnprintf.
+AC_DEFUN([HW_FUNC_VSNPRINTF],
+[
+ AC_PREREQ([2.60])dnl 2.59 should work if some AC_TYPE_* macros are replaced.
+ AC_REQUIRE([HW_HEADER_STDARG_H])dnl Our check evaluates HAVE_STDARG_H.
+ AC_CHECK_FUNC([vsnprintf],
+ [hw_cv_func_vsnprintf=yes],
+ [hw_cv_func_vsnprintf=no])
+ AS_IF([test "$hw_cv_func_vsnprintf" = yes],
+ [AC_CACHE_CHECK([whether vsnprintf is C99 compliant],
+ [hw_cv_func_vsnprintf_c99],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_STDARG_H
+ #include <stdarg.h>
+ #endif
+ #include <stdio.h>
+ static int testprintf(char *buf, size_t size, const char *format, ...)
+ {
+ int result;
+ va_list ap;
+ va_start(ap, format);
+ result = vsnprintf(buf, size, format, ap);
+ va_end(ap);
+ return result;
+ }]],
+ [[char buf[43];
+ if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;]])],
+ [hw_cv_func_vsnprintf_c99=yes],
+ [hw_cv_func_vsnprintf_c99=no],
+ [hw_cv_func_vsnprintf_c99=no])])],
+ [hw_cv_func_vsnprintf_c99=no])
+ AC_DEFINE([HAVE_VSNPRINTF], [1],
+ [Define if C99-compliant `vsnprintf' is available.])
+ AC_MSG_CHECKING([if C99-snprintf replacement vsnprintf will be used])
+ AS_IF([test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no],
+ [hw_use_rpl_vsnprintf=yes],
+ [hw_use_rpl_vsnprintf=no])
+ AC_MSG_RESULT([$hw_use_rpl_vsnprintf])
+ AS_IF([test "$hw_use_rpl_vsnprintf" = yes],
+ [AC_DEFINE([HW_WANT_RPL_VSNPRINTF], [1],
+ [Define to provide `rpl_vsnprintf' function.])
+ AS_IF([test ${hw_nodef_vsnprintf=no} = no],
+ [AC_DEFINE([vsnprintf], [rpl_vsnprintf],
+ [Define to rpl_vsnprintf if the replacement function should be used.])])
+ AC_CHECK_HEADERS([inttypes.h locale.h stddef.h stdint.h])
+ AC_CHECK_MEMBERS([struct lconv.decimal_point, struct lconv.thousands_sep],
+ [], [], [#include <locale.h>])
+ AC_TYPE_LONG_DOUBLE
+ AC_TYPE_LONG_LONG_INT
+ AC_TYPE_UNSIGNED_LONG_LONG_INT
+ AC_TYPE_SIZE_T
+ AC_TYPE_INTMAX_T
+ AC_TYPE_UINTMAX_T
+ AC_TYPE_UINTPTR_T
+ AC_CHECK_TYPES([ptrdiff_t])
+ AC_CHECK_FUNCS([localeconv])
+ _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_VSNPRINTF
+
+# HW_FUNC_SNPRINTF
+# ----------------
+# Set $hw_cv_func_snprintf and $hw_cv_func_snprintf_c99 to "yes" or
+# "no", respectively. If either $hw_force_rpl_snprintf is "yes" or
+# $hw_cv_func_snprintf_c99 is "no", define HW_WANT_RPL_SNPRINTF and
+# define snprintf to rpl_snprintf.
+# The same will be done for vsnprintf, as if HW_FUNC_VSNPRINTF were
+# used.
+AC_DEFUN([HW_FUNC_SNPRINTF],
+[
+ AC_REQUIRE([HW_FUNC_VSNPRINTF])dnl Our snprintf(3) calls vsnprintf(3).
+ AC_CHECK_FUNC([snprintf],
+ [hw_cv_func_snprintf=yes],
+ [hw_cv_func_snprintf=no])
+ AS_IF([test "$hw_cv_func_snprintf" = yes],
+ [AC_CACHE_CHECK([whether snprintf is C99 compliant],
+ [hw_cv_func_snprintf_c99],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[char buf[43];
+ if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
+ snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
+ buf[0] != 'T' || buf[3] != '\0')
+ return 1;]])],
+ [hw_cv_func_snprintf_c99=yes],
+ [hw_cv_func_snprintf_c99=no],
+ [hw_cv_func_snprintf_c99=no])])],
+ [hw_cv_func_snprintf_c99=no])
+ AC_DEFINE([HAVE_SNPRINTF], [1],
+ [Define if C99-compliant `snprintf' is available.])
+ AC_MSG_CHECKING([if C99-snprintf replacement snprintf will be used])
+ AS_IF([test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no],
+ [hw_use_rpl_snprintf=yes],
+ [hw_use_rpl_snprintf=no])
+ AC_MSG_RESULT([$hw_use_rpl_snprintf])
+ AS_IF([test "$hw_use_rpl_snprintf" = yes],
+ [AC_DEFINE([HW_WANT_RPL_SNPRINTF], [1],
+ [Define to provide `rpl_snprintf' function.])
+ AS_IF([test ${hw_nodef_snprintf=no} = no],
+ [AC_DEFINE([snprintf], [rpl_snprintf],
+ [Define to rpl_snprintf if the replacement function should be used.])])
+ _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_SNPRINTF
+
+# HW_FUNC_VASPRINTF
+# -----------------
+# Set $hw_cv_func_vasprintf to "yes" or "no". If either
+# $hw_force_rpl_vasprintf is "yes" or $hw_cv_func_vasprintf is "no",
+# define HW_WANT_RPL_VASPRINTF and define vasprintf to rpl_vasprintf.
+# The same will be done for vsnprintf, as if HW_FUNC_VSNPRINTF were
+# used.
+AC_DEFUN([HW_FUNC_VASPRINTF],
+[
+ AC_REQUIRE([HW_FUNC_VSNPRINTF])dnl Our vasprintf(3) calls vsnprintf(3).
+ AC_CHECK_FUNCS([vasprintf],
+ [hw_cv_func_vasprintf=yes],
+ [hw_cv_func_vasprintf=no])
+ AC_DEFINE([HAVE_VASPRINTF], [1],
+ [Define if `vasprintf' is available.])
+ AC_MSG_CHECKING([if C99-snprintf replacement vasprintf will be used])
+ AS_IF([test "${hw_force_rpl_vasprintf=no}" = yes -o "$hw_cv_func_vasprintf" = no],
+ [hw_use_rpl_vasprintf=yes],
+ [hw_use_rpl_vasprintf=no])
+ AC_MSG_RESULT([$hw_use_rpl_vasprintf])
+ AS_IF([test "$hw_use_rpl_vasprintf" = yes],
+ [AC_DEFINE([HW_WANT_RPL_VASPRINTF], [1],
+ [Define to provide `rpl_vasprintf' function.])
+ AS_IF([test ${hw_nodef_vasprintf=no} = no],
+ [AC_DEFINE([vasprintf], [rpl_vasprintf],
+ [Define to rpl_vasprintf if the replacement function should be used.])])
+ AC_CHECK_HEADERS([stdlib.h])
+ HW_FUNC_VA_COPY
+ AS_IF([test "$hw_cv_func_va_copy" = no],
+ [HW_FUNC___VA_COPY])
+ _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_VASPRINTF
+
+# HW_FUNC_ASPRINTF
+# ----------------
+# Set $hw_cv_func_asprintf to "yes" or "no". If either
+# $hw_force_rpl_asprintf is "yes" or $hw_cv_func_asprintf is "no",
+# define HW_WANT_RPL_ASPRINTF and define asprintf to rpl_asprintf.
+# The same will be done for vasprintf, as if HW_FUNC_VASPRINTF were
+# used.
+AC_DEFUN([HW_FUNC_ASPRINTF],
+[
+ AC_REQUIRE([HW_FUNC_VASPRINTF])dnl Our asprintf(3) calls vasprintf(3).
+ AC_CHECK_FUNCS([asprintf],
+ [hw_cv_func_asprintf=yes],
+ [hw_cv_func_asprintf=no])
+ AC_DEFINE([HAVE_ASPRINTF], [1],
+ [Define if `asprintf' is available.])
+ AC_MSG_CHECKING([if C99-snprintf replacement asprintf will be used])
+ AS_IF([test "${hw_force_rpl_asprintf=no}" = yes -o "$hw_cv_func_asprintf" = no],
+ [hw_use_rpl_asprintf=yes],
+ [hw_use_rpl_asprintf=no])
+ AC_MSG_RESULT([$hw_use_rpl_asprintf])
+ AS_IF([test "$hw_use_rpl_asprintf" = yes],
+ [AC_DEFINE([HW_WANT_RPL_ASPRINTF], [1],
+ [Define to provide `rpl_asprintf' function.])
+ AS_IF([test ${hw_nodef_asprintf=no} = no],
+ [AC_DEFINE([asprintf], [rpl_asprintf],
+ [Define to rpl_asprintf if the replacement function should be used.])])
+ _HW_FUNC_XPRINTF_REPLACE])
+])# HW_FUNC_ASPRINTF
+
+# _HW_FUNC_XPRINTF_REPLACE
+# ------------------------
+# Arrange for building snprintf.c. Must be called if one or more of the
+# functions provided by snprintf.c are needed.
+AC_DEFUN([_HW_FUNC_XPRINTF_REPLACE],
+[
+ AS_IF([test "x$_hw_cv_func_xprintf_replace_done" != xyes],
+ [AC_C_CONST
+ HW_HEADER_STDARG_H
+ AC_LIBOBJ([snprintf])
+ _hw_cv_func_xprintf_replace_done=yes])
+])# _HW_FUNC_XPRINTF_REPLACE
+
+dnl vim: set joinspaces textwidth=80:
diff --git a/sntp/m4/version.m4 b/sntp/m4/version.m4
new file mode 100644
index 000000000000..602bcab18571
--- /dev/null
+++ b/sntp/m4/version.m4
@@ -0,0 +1 @@
+m4_define([VERSION_NUMBER],[4.2.8])
diff --git a/sntp/main.c b/sntp/main.c
index 9ddb5bfa8f12..d60710868f2d 100644
--- a/sntp/main.c
+++ b/sntp/main.c
@@ -1,73 +1,195 @@
#include <config.h>
+#include <event2/util.h>
+#include <event2/event.h>
+
+#include "ntp_workimpl.h"
+#ifdef WORK_THREAD
+# include <event2/thread.h>
+#endif
+
#include "main.h"
+#include "ntp_libopts.h"
#include "kod_management.h"
#include "networking.h"
#include "utilities.h"
#include "log.h"
+#include "libntp.h"
+
+int shutting_down;
+int time_derived;
+int time_adjusted;
+int n_pending_dns = 0;
+int n_pending_ntp = 0;
int ai_fam_pref = AF_UNSPEC;
+int ntpver = 4;
+double steplimit = -1;
+SOCKET sock4 = -1; /* Socket for IPv4 */
+SOCKET sock6 = -1; /* Socket for IPv6 */
+/*
+** BCAST *must* listen on port 123 (by default), so we can only
+** use the UCST sockets (above) if they too are using port 123
+*/
+SOCKET bsock4 = -1; /* Broadcast Socket for IPv4 */
+SOCKET bsock6 = -1; /* Broadcast Socket for IPv6 */
+struct event_base *base;
+struct event *ev_sock4;
+struct event *ev_sock6;
+struct event *ev_worker_timeout;
+struct event *ev_xmt_timer;
+
+struct dns_ctx {
+ const char * name;
+ int flags;
+#define CTX_BCST 0x0001
+#define CTX_UCST 0x0002
+#define CTX_xCST 0x0003
+#define CTX_CONC 0x0004
+#define CTX_unused 0xfffd
+ int key_id;
+ struct timeval timeout;
+ struct key * key;
+};
+
+typedef struct sent_pkt_tag sent_pkt;
+struct sent_pkt_tag {
+ sent_pkt * link;
+ struct dns_ctx * dctx;
+ sockaddr_u addr;
+ time_t stime;
+ int done;
+ struct pkt x_pkt;
+};
+
+typedef struct xmt_ctx_tag xmt_ctx;
+struct xmt_ctx_tag {
+ xmt_ctx * link;
+ SOCKET sock;
+ time_t sched;
+ sent_pkt * spkt;
+};
+
+struct timeval gap;
+xmt_ctx * xmt_q;
+struct key * keys = NULL;
+int response_timeout;
+struct timeval response_tv;
+struct timeval start_tv;
+/* check the timeout at least once per second */
+struct timeval wakeup_tv = { 0, 888888 };
+
+sent_pkt * fam_listheads[2];
+#define v4_pkts_list (fam_listheads[0])
+#define v6_pkts_list (fam_listheads[1])
-struct key *keys = NULL;
+static union {
+ struct pkt pkt;
+ char buf[LEN_PKT_NOMAC + NTP_MAXEXTEN + MAX_MAC_LEN];
+} rbuf;
-void set_li_vn_mode (struct pkt *spkt, char leap, char version, char mode);
-int sntp_main (int argc, char **argv);
-int on_wire (struct addrinfo *host, struct addrinfo *bcastaddr);
-int set_time (double offset);
+#define r_pkt rbuf.pkt
-#define NORMALIZE_TIMEVAL(tv) \
-do { \
- while ((tv).tv_usec < 0) { \
- (tv).tv_usec += 1000000; \
- (tv).tv_sec--; \
- } \
- while ((tv).tv_usec > 999999) { \
- (tv).tv_usec -= 1000000; \
- (tv).tv_sec++; \
- } \
-} while (0)
+#ifdef HAVE_DROPROOT
+int droproot; /* intres imports these */
+int root_dropped;
+#endif
+u_long current_time; /* libntp/authkeys.c */
+
+void open_sockets(void);
+void handle_lookup(const char *name, int flags);
+void sntp_addremove_fd(int fd, int is_pipe, int remove_it);
+void worker_timeout(evutil_socket_t, short, void *);
+void worker_resp_cb(evutil_socket_t, short, void *);
+void sntp_name_resolved(int, int, void *, const char *, const char *,
+ const struct addrinfo *,
+ const struct addrinfo *);
+void queue_xmt(SOCKET sock, struct dns_ctx *dctx, sent_pkt *spkt,
+ u_int xmt_delay);
+void xmt_timer_cb(evutil_socket_t, short, void *ptr);
+void xmt(xmt_ctx *xctx);
+int check_kod(const struct addrinfo *ai);
+void timeout_query(sent_pkt *);
+void timeout_queries(void);
+void sock_cb(evutil_socket_t, short, void *);
+void check_exit_conditions(void);
+void sntp_libevent_log_cb(int, const char *);
+void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode);
+int set_time(double offset);
+void dec_pending_ntp(const char *, sockaddr_u *);
+int libevent_version_ok(void);
+int gettimeofday_cached(struct event_base *b, struct timeval *tv);
/*
* The actual main function.
*/
-int
+int
sntp_main (
- int argc,
- char **argv
- )
+ int argc,
+ char **argv,
+ const char *sntpVersion
+ )
{
- register int c;
- struct kod_entry *reason = NULL;
- int optct;
- /* boolean, u_int quiets gcc4 signed overflow warning */
- u_int sync_data_suc;
- struct addrinfo **bcastaddr = NULL;
- struct addrinfo **resh = NULL;
- struct addrinfo *ai;
- int resc;
- int kodc;
- int ow_ret;
- int bcast = 0;
- char *hostname;
+ int i;
+ int exitcode;
+ int optct;
+ struct event_config * evcfg;
+
+ /* Initialize logging system - sets up progname */
+ sntp_init_logging(argv[0]);
- optct = optionProcess(&sntpOptions, argc, argv);
+ if (!libevent_version_ok())
+ exit(EX_SOFTWARE);
+
+ init_lib();
+ init_auth();
+
+ optct = ntpOptionProcess(&sntpOptions, argc, argv);
argc -= optct;
- argv += optct;
+ argv += optct;
+
+
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
+
+ TRACE(2, ("init_lib() done, %s%s\n",
+ (ipv4_works)
+ ? "ipv4_works "
+ : "",
+ (ipv6_works)
+ ? "ipv6_works "
+ : ""));
+ ntpver = OPT_VALUE_NTPVERSION;
+ steplimit = OPT_VALUE_STEPLIMIT / 1e3;
+ gap.tv_usec = max(0, OPT_VALUE_GAP * 1000);
+ gap.tv_usec = min(gap.tv_usec, 999999);
- /* Initialize logging system */
- init_logging();
if (HAVE_OPT(LOGFILE))
open_logfile(OPT_ARG(LOGFILE));
- msyslog(LOG_NOTICE, "Started sntp");
+ msyslog(LOG_INFO, "%s", sntpVersion);
+
+ if (0 == argc && !HAVE_OPT(BROADCAST) && !HAVE_OPT(CONCURRENT)) {
+ printf("%s: Must supply at least one of -b hostname, -c hostname, or hostname.\n",
+ progname);
+ exit(EX_USAGE);
+ }
+
+
+ /*
+ ** Eventually, we probably want:
+ ** - separate bcst and ucst timeouts (why?)
+ ** - multiple --timeout values in the commandline
+ */
+
+ response_timeout = OPT_VALUE_TIMEOUT;
+ response_tv.tv_sec = response_timeout;
+ response_tv.tv_usec = 0;
/* IPv6 available? */
if (isc_net_probeipv6() != ISC_R_SUCCESS) {
ai_fam_pref = AF_INET;
-#ifdef DEBUG
- printf("No ipv6 support available, forcing ipv4\n");
-#endif
+ TRACE(1, ("No ipv6 support available, forcing ipv4\n"));
} else {
/* Check for options -4 and -6 */
if (HAVE_OPT(IPV4))
@@ -76,90 +198,919 @@ sntp_main (
ai_fam_pref = AF_INET6;
}
- /* Parse config file if declared TODO */
+ /* TODO: Parse config file if declared */
- /*
- * If there's a specified KOD file init KOD system. If not use
- * default file. For embedded systems with no writable
- * filesystem, -K /dev/null can be used to disable KoD storage.
- */
- if (HAVE_OPT(KOD))
- kod_init_kod_db(OPT_ARG(KOD));
- else
- kod_init_kod_db("/var/db/ntp-kod");
+ /*
+ ** Init the KOD system.
+ ** For embedded systems with no writable filesystem,
+ ** -K /dev/null can be used to disable KoD storage.
+ */
+ kod_init_kod_db(OPT_ARG(KOD), FALSE);
+ // HMS: Should we use arg-defalt for this too?
if (HAVE_OPT(KEYFILE))
auth_init(OPT_ARG(KEYFILE), &keys);
-#ifdef EXERCISE_KOD_DB
- add_entry("192.168.169.170", "DENY");
- add_entry("192.168.169.171", "DENY");
- add_entry("192.168.169.172", "DENY");
- add_entry("192.168.169.173", "DENY");
- add_entry("192.168.169.174", "DENY");
- delete_entry("192.168.169.174", "DENY");
- delete_entry("192.168.169.172", "DENY");
- delete_entry("192.168.169.170", "DENY");
- if ((kodc = search_entry("192.168.169.173", &reason)) == 0)
- printf("entry for 192.168.169.173 not found but should have been!\n");
+ /*
+ ** Considering employing a variable that prevents functions of doing
+ ** anything until everything is initialized properly
+ **
+ ** HMS: What exactly does the above mean?
+ */
+ event_set_log_callback(&sntp_libevent_log_cb);
+ if (debug > 0)
+ event_enable_debug_mode();
+#ifdef WORK_THREAD
+ evthread_use_pthreads();
+ /* we use libevent from main thread only, locks should be academic */
+ if (debug > 0)
+ evthread_enable_lock_debuging();
+#endif
+ evcfg = event_config_new();
+ if (NULL == evcfg) {
+ printf("%s: event_config_new() failed!\n", progname);
+ return -1;
+ }
+#ifndef HAVE_SOCKETPAIR
+ event_config_require_features(evcfg, EV_FEATURE_FDS);
+#endif
+ /* all libevent calls are from main thread */
+ /* event_config_set_flag(evcfg, EVENT_BASE_FLAG_NOLOCK); */
+ base = event_base_new_with_config(evcfg);
+ event_config_free(evcfg);
+ if (NULL == base) {
+ printf("%s: event_base_new() failed!\n", progname);
+ return -1;
+ }
+
+ /* wire into intres resolver */
+ worker_per_query = TRUE;
+ addremove_io_fd = &sntp_addremove_fd;
+
+ open_sockets();
+
+ if (HAVE_OPT(BROADCAST)) {
+ int cn = STACKCT_OPT( BROADCAST );
+ const char ** cp = STACKLST_OPT( BROADCAST );
+
+ while (cn-- > 0) {
+ handle_lookup(*cp, CTX_BCST);
+ cp++;
+ }
+ }
+
+ if (HAVE_OPT(CONCURRENT)) {
+ int cn = STACKCT_OPT( CONCURRENT );
+ const char ** cp = STACKLST_OPT( CONCURRENT );
+
+ while (cn-- > 0) {
+ handle_lookup(*cp, CTX_UCST | CTX_CONC);
+ cp++;
+ }
+ }
+
+ for (i = 0; i < argc; ++i)
+ handle_lookup(argv[i], CTX_UCST);
+
+ gettimeofday_cached(base, &start_tv);
+ event_base_dispatch(base);
+ event_base_free(base);
+
+ if (!time_adjusted &&
+ (ENABLED_OPT(STEP) || ENABLED_OPT(SLEW)))
+ exitcode = 1;
else
- free(reason);
+ exitcode = 0;
+
+ return exitcode;
+}
+
+
+/*
+** open sockets and make them non-blocking
+*/
+void
+open_sockets(
+ void
+ )
+{
+ sockaddr_u name;
+
+ if (-1 == sock4) {
+ sock4 = socket(PF_INET, SOCK_DGRAM, 0);
+ if (-1 == sock4) {
+ /* error getting a socket */
+ msyslog(LOG_ERR, "open_sockets: socket(PF_INET) failed: %m");
+ exit(1);
+ }
+ /* Make it non-blocking */
+ make_socket_nonblocking(sock4);
+
+ /* Let's try using a wildcard... */
+ ZERO(name);
+ AF(&name) = AF_INET;
+ SET_ADDR4N(&name, INADDR_ANY);
+ SET_PORT(&name, (HAVE_OPT(USERESERVEDPORT) ? 123 : 0));
+
+ if (-1 == bind(sock4, &name.sa,
+ SOCKLEN(&name))) {
+ msyslog(LOG_ERR, "open_sockets: bind(sock4) failed: %m");
+ exit(1);
+ }
+
+ /* Register an NTP callback for recv/timeout */
+ ev_sock4 = event_new(base, sock4,
+ EV_TIMEOUT | EV_READ | EV_PERSIST,
+ &sock_cb, NULL);
+ if (NULL == ev_sock4) {
+ msyslog(LOG_ERR,
+ "open_sockets: event_new(base, sock4) failed!");
+ } else {
+ event_add(ev_sock4, &wakeup_tv);
+ }
+ }
+
+ /* We may not always have IPv6... */
+ if (-1 == sock6 && ipv6_works) {
+ sock6 = socket(PF_INET6, SOCK_DGRAM, 0);
+ if (-1 == sock6 && ipv6_works) {
+ /* error getting a socket */
+ msyslog(LOG_ERR, "open_sockets: socket(PF_INET6) failed: %m");
+ exit(1);
+ }
+ /* Make it non-blocking */
+ make_socket_nonblocking(sock6);
+
+ /* Let's try using a wildcard... */
+ ZERO(name);
+ AF(&name) = AF_INET6;
+ SET_ADDR6N(&name, in6addr_any);
+ SET_PORT(&name, (HAVE_OPT(USERESERVEDPORT) ? 123 : 0));
+
+ if (-1 == bind(sock6, &name.sa,
+ SOCKLEN(&name))) {
+ msyslog(LOG_ERR, "open_sockets: bind(sock6) failed: %m");
+ exit(1);
+ }
+ /* Register an NTP callback for recv/timeout */
+ ev_sock6 = event_new(base, sock6,
+ EV_TIMEOUT | EV_READ | EV_PERSIST,
+ &sock_cb, NULL);
+ if (NULL == ev_sock6) {
+ msyslog(LOG_ERR,
+ "open_sockets: event_new(base, sock6) failed!");
+ } else {
+ event_add(ev_sock6, &wakeup_tv);
+ }
+ }
+
+ return;
+}
+
+
+/*
+** handle_lookup
+*/
+void
+handle_lookup(
+ const char *name,
+ int flags
+ )
+{
+ struct addrinfo hints; /* Local copy is OK */
+ struct dns_ctx *ctx;
+ long l;
+ char * name_copy;
+ size_t name_sz;
+ size_t octets;
+
+ TRACE(1, ("handle_lookup(%s,%#x)\n", name, flags));
+
+ ZERO(hints);
+ hints.ai_family = ai_fam_pref;
+ hints.ai_flags = AI_CANONNAME | Z_AI_NUMERICSERV;
+ /*
+ ** Unless we specify a socktype, we'll get at least two
+ ** entries for each address: one for TCP and one for
+ ** UDP. That's not what we want.
+ */
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+
+ name_sz = 1 + strlen(name);
+ octets = sizeof(*ctx) + name_sz; // Space for a ctx and the name
+ ctx = emalloc_zero(octets); // ctx at ctx[0]
+ name_copy = (char *)(ctx + 1); // Put the name at ctx[1]
+ memcpy(name_copy, name, name_sz); // copy the name to ctx[1]
+ ctx->name = name_copy; // point to it...
+ ctx->flags = flags;
+ ctx->timeout = response_tv;
+
+ /* The following should arguably be passed in... */
+ if (ENABLED_OPT(AUTHENTICATION) &&
+ atoint(OPT_ARG(AUTHENTICATION), &l)) {
+ ctx->key_id = l;
+ get_key(ctx->key_id, &ctx->key);
+ } else {
+ ctx->key_id = -1;
+ ctx->key = NULL;
+ }
+
+ ++n_pending_dns;
+ getaddrinfo_sometime(name, "123", &hints, 0,
+ &sntp_name_resolved, ctx);
+}
+
+
+/*
+** DNS Callback:
+** - For each IP:
+** - - open a socket
+** - - increment n_pending_ntp
+** - - send a request if this is a Unicast callback
+** - - queue wait for response
+** - decrement n_pending_dns
+*/
+void
+sntp_name_resolved(
+ int rescode,
+ int gai_errno,
+ void * context,
+ const char * name,
+ const char * service,
+ const struct addrinfo * hints,
+ const struct addrinfo * addr
+ )
+{
+ struct dns_ctx * dctx;
+ sent_pkt * spkt;
+ const struct addrinfo * ai;
+ SOCKET sock;
+ u_int xmt_delay_v4;
+ u_int xmt_delay_v6;
+ u_int xmt_delay;
+ size_t octets;
+
+ xmt_delay_v4 = 0;
+ xmt_delay_v6 = 0;
+ dctx = context;
+ if (rescode) {
+#ifdef EAI_SYSTEM
+ if (EAI_SYSTEM == rescode) {
+ errno = gai_errno;
+ mfprintf(stderr, "%s lookup error %m\n",
+ dctx->name);
+ } else
#endif
+ fprintf(stderr, "%s lookup error %s\n",
+ dctx->name, gai_strerror(rescode));
+ } else {
+ TRACE(3, ("%s [%s]\n", dctx->name,
+ (addr->ai_canonname != NULL)
+ ? addr->ai_canonname
+ : ""));
+
+ for (ai = addr; ai != NULL; ai = ai->ai_next) {
+
+ if (check_kod(ai))
+ continue;
+
+ switch (ai->ai_family) {
+
+ case AF_INET:
+ sock = sock4;
+ xmt_delay = xmt_delay_v4;
+ xmt_delay_v4++;
+ break;
+
+ case AF_INET6:
+ if (!ipv6_works)
+ continue;
+
+ sock = sock6;
+ xmt_delay = xmt_delay_v6;
+ xmt_delay_v6++;
+ break;
+
+ default:
+ msyslog(LOG_ERR, "sntp_name_resolved: unexpected ai_family: %d",
+ ai->ai_family);
+ exit(1);
+ break;
+ }
- /* Considering employing a variable that prevents functions of doing anything until
- * everything is initialized properly
- */
- resc = resolve_hosts((const char **)argv, argc, &resh, ai_fam_pref);
- if (resc < 1) {
- printf("Unable to resolve hostname(s)\n");
- return -1;
+ /*
+ ** We're waiting for a response for either unicast
+ ** or broadcast, so...
+ */
+ ++n_pending_ntp;
+
+ /* If this is for a unicast IP, queue a request */
+ if (dctx->flags & CTX_UCST) {
+ spkt = emalloc_zero(sizeof(*spkt));
+ spkt->dctx = dctx;
+ octets = min(ai->ai_addrlen, sizeof(spkt->addr));
+ memcpy(&spkt->addr, ai->ai_addr, octets);
+ queue_xmt(sock, dctx, spkt, xmt_delay);
+ }
+ }
+ }
+ /* n_pending_dns really should be >0 here... */
+ --n_pending_dns;
+ check_exit_conditions();
+}
+
+
+/*
+** queue_xmt
+*/
+void
+queue_xmt(
+ SOCKET sock,
+ struct dns_ctx * dctx,
+ sent_pkt * spkt,
+ u_int xmt_delay
+ )
+{
+ sockaddr_u * dest;
+ sent_pkt ** pkt_listp;
+ sent_pkt * match;
+ xmt_ctx * xctx;
+ struct timeval start_cb;
+ struct timeval delay;
+
+ dest = &spkt->addr;
+ if (IS_IPV6(dest))
+ pkt_listp = &v6_pkts_list;
+ else
+ pkt_listp = &v4_pkts_list;
+
+ /* reject attempts to add address already listed */
+ for (match = *pkt_listp; match != NULL; match = match->link) {
+ if (ADDR_PORT_EQ(&spkt->addr, &match->addr)) {
+ if (strcasecmp(spkt->dctx->name,
+ match->dctx->name))
+ printf("%s %s duplicate address from %s ignored.\n",
+ sptoa(&match->addr),
+ match->dctx->name,
+ spkt->dctx->name);
+ else
+ printf("%s %s, duplicate address ignored.\n",
+ sptoa(&match->addr),
+ match->dctx->name);
+ dec_pending_ntp(spkt->dctx->name, &spkt->addr);
+ free(spkt);
+ return;
+ }
+ }
+
+ LINK_SLIST(*pkt_listp, spkt, link);
+
+ xctx = emalloc_zero(sizeof(*xctx));
+ xctx->sock = sock;
+ xctx->spkt = spkt;
+ gettimeofday_cached(base, &start_cb);
+ xctx->sched = start_cb.tv_sec + (2 * xmt_delay);
+
+ LINK_SORT_SLIST(xmt_q, xctx, (xctx->sched < L_S_S_CUR()->sched),
+ link, xmt_ctx);
+ if (xmt_q == xctx) {
+ /*
+ * The new entry is the first scheduled. The timer is
+ * either not active or is set for the second xmt
+ * context in xmt_q.
+ */
+ if (NULL == ev_xmt_timer)
+ ev_xmt_timer = event_new(base, INVALID_SOCKET,
+ EV_TIMEOUT,
+ &xmt_timer_cb, NULL);
+ if (NULL == ev_xmt_timer) {
+ msyslog(LOG_ERR,
+ "queue_xmt: event_new(base, -1, EV_TIMEOUT) failed!");
+ exit(1);
+ }
+ ZERO(delay);
+ if (xctx->sched > start_cb.tv_sec)
+ delay.tv_sec = xctx->sched - start_cb.tv_sec;
+ event_add(ev_xmt_timer, &delay);
+ TRACE(2, ("queue_xmt: xmt timer for %u usec\n",
+ (u_int)delay.tv_usec));
}
- bcast = ENABLED_OPT(BROADCAST);
- if (bcast) {
- const char * myargv[2];
-
- myargv[0] = OPT_ARG(BROADCAST);
- myargv[1] = NULL;
- bcast = resolve_hosts(myargv, 1, &bcastaddr, ai_fam_pref);
- }
-
- /* Select a certain ntp server according to simple criteria? For now
- * let's just pay attention to previous KoDs.
- */
- sync_data_suc = FALSE;
- for (c = 0; c < resc && !sync_data_suc; c++) {
- ai = resh[c];
- do {
- hostname = addrinfo_to_str(ai);
- if ((kodc = search_entry(hostname, &reason)) == 0) {
- if (is_reachable(ai)) {
- ow_ret = on_wire(ai, bcast ? bcastaddr[0] : NULL);
- if (0 == ow_ret)
- sync_data_suc = TRUE;
- }
- } else {
- printf("%d prior KoD%s for %s, skipping.\n",
- kodc, (kodc > 1) ? "s" : "", hostname);
- free(reason);
+}
+
+
+/*
+** xmt_timer_cb
+*/
+void
+xmt_timer_cb(
+ evutil_socket_t fd,
+ short what,
+ void * ctx
+ )
+{
+ struct timeval start_cb;
+ struct timeval delay;
+ xmt_ctx * x;
+
+ UNUSED_ARG(fd);
+ UNUSED_ARG(ctx);
+ DEBUG_INSIST(EV_TIMEOUT == what);
+
+ if (NULL == xmt_q || shutting_down)
+ return;
+ gettimeofday_cached(base, &start_cb);
+ if (xmt_q->sched <= start_cb.tv_sec) {
+ UNLINK_HEAD_SLIST(x, xmt_q, link);
+ TRACE(2, ("xmt_timer_cb: at .%6.6u -> %s\n",
+ (u_int)start_cb.tv_usec, stoa(&x->spkt->addr)));
+ xmt(x);
+ free(x);
+ if (NULL == xmt_q)
+ return;
+ }
+ if (xmt_q->sched <= start_cb.tv_sec) {
+ event_add(ev_xmt_timer, &gap);
+ TRACE(2, ("xmt_timer_cb: at .%6.6u gap %6.6u\n",
+ (u_int)start_cb.tv_usec,
+ (u_int)gap.tv_usec));
+ } else {
+ delay.tv_sec = xmt_q->sched - start_cb.tv_sec;
+ delay.tv_usec = 0;
+ event_add(ev_xmt_timer, &delay);
+ TRACE(2, ("xmt_timer_cb: at .%6.6u next %ld seconds\n",
+ (u_int)start_cb.tv_usec,
+ (long)delay.tv_sec));
+ }
+}
+
+
+/*
+** xmt()
+*/
+void
+xmt(
+ xmt_ctx * xctx
+ )
+{
+ SOCKET sock = xctx->sock;
+ struct dns_ctx *dctx = xctx->spkt->dctx;
+ sent_pkt * spkt = xctx->spkt;
+ sockaddr_u * dst = &spkt->addr;
+ struct timeval tv_xmt;
+ struct pkt x_pkt;
+ int pkt_len;
+ int sent;
+
+ if (0 != gettimeofday(&tv_xmt, NULL)) {
+ msyslog(LOG_ERR,
+ "xmt: gettimeofday() failed: %m");
+ exit(1);
+ }
+ tv_xmt.tv_sec += JAN_1970;
+
+ pkt_len = generate_pkt(&x_pkt, &tv_xmt, dctx->key_id,
+ dctx->key);
+
+ sent = sendpkt(sock, dst, &x_pkt, pkt_len);
+ if (sent) {
+ /* Save the packet we sent... */
+ memcpy(&spkt->x_pkt, &x_pkt, min(sizeof(spkt->x_pkt),
+ pkt_len));
+ spkt->stime = tv_xmt.tv_sec - JAN_1970;
+
+ TRACE(2, ("xmt: %lx.%6.6u %s %s\n", (u_long)tv_xmt.tv_sec,
+ (u_int)tv_xmt.tv_usec, dctx->name, stoa(dst)));
+ } else {
+ dec_pending_ntp(dctx->name, dst);
+ }
+
+ return;
+}
+
+
+/*
+ * timeout_queries() -- give up on unrequited NTP queries
+ */
+void
+timeout_queries(void)
+{
+ struct timeval start_cb;
+ u_int idx;
+ sent_pkt * head;
+ sent_pkt * spkt;
+ sent_pkt * spkt_next;
+ long age;
+ int didsomething = 0;
+
+ TRACE(3, ("timeout_queries: called to check %u items\n",
+ (unsigned)COUNTOF(fam_listheads)));
+
+ gettimeofday_cached(base, &start_cb);
+ for (idx = 0; idx < COUNTOF(fam_listheads); idx++) {
+ head = fam_listheads[idx];
+ for (spkt = head; spkt != NULL; spkt = spkt_next) {
+ char xcst;
+
+ didsomething = 1;
+ switch (spkt->dctx->flags & CTX_xCST) {
+ case CTX_BCST:
+ xcst = 'B';
+ break;
+
+ case CTX_UCST:
+ xcst = 'U';
+ break;
+
+ default:
+ INSIST(!"spkt->dctx->flags neither UCST nor BCST");
+ break;
}
- free(hostname);
- ai = ai->ai_next;
- } while (NULL != ai);
- freeaddrinfo(resh[c]);
+
+ spkt_next = spkt->link;
+ if (0 == spkt->stime || spkt->done)
+ continue;
+ age = start_cb.tv_sec - spkt->stime;
+ TRACE(3, ("%s %s %cCST age %ld\n",
+ stoa(&spkt->addr),
+ spkt->dctx->name, xcst, age));
+ if (age > response_timeout)
+ timeout_query(spkt);
+ }
+ }
+ // Do we care about didsomething?
+ TRACE(3, ("timeout_queries: didsomething is %d, age is %ld\n",
+ didsomething, (long) (start_cb.tv_sec - start_tv.tv_sec)));
+ if (start_cb.tv_sec - start_tv.tv_sec > response_timeout) {
+ TRACE(3, ("timeout_queries: bail!\n"));
+ event_base_loopexit(base, NULL);
+ shutting_down = TRUE;
+ }
+}
+
+
+void dec_pending_ntp(
+ const char * name,
+ sockaddr_u * server
+ )
+{
+ if (n_pending_ntp > 0) {
+ --n_pending_ntp;
+ check_exit_conditions();
+ } else {
+ INSIST(0 == n_pending_ntp);
+ TRACE(1, ("n_pending_ntp was zero before decrement for %s\n",
+ hostnameaddr(name, server)));
+ }
+}
+
+
+void timeout_query(
+ sent_pkt * spkt
+ )
+{
+ sockaddr_u * server;
+ char xcst;
+
+
+ switch (spkt->dctx->flags & CTX_xCST) {
+ case CTX_BCST:
+ xcst = 'B';
+ break;
+
+ case CTX_UCST:
+ xcst = 'U';
+ break;
+
+ default:
+ INSIST(!"spkt->dctx->flags neither UCST nor BCST");
+ break;
}
- free(resh);
+ spkt->done = TRUE;
+ server = &spkt->addr;
+ msyslog(LOG_INFO, "%s no %cCST response after %d seconds",
+ hostnameaddr(spkt->dctx->name, server), xcst,
+ response_timeout);
+ dec_pending_ntp(spkt->dctx->name, server);
+ return;
+}
+
+
+/*
+** check_kod
+*/
+int
+check_kod(
+ const struct addrinfo * ai
+ )
+{
+ char *hostname;
+ struct kod_entry *reason;
+
+ /* Is there a KoD on file for this address? */
+ hostname = addrinfo_to_str(ai);
+ TRACE(2, ("check_kod: checking <%s>\n", hostname));
+ if (search_entry(hostname, &reason)) {
+ printf("prior KoD for %s, skipping.\n",
+ hostname);
+ free(reason);
+ free(hostname);
- if (!sync_data_suc)
return 1;
+ }
+ free(hostname);
+
return 0;
}
-static union {
- struct pkt pkt;
- char buf[1500];
-} rbuf;
-#define r_pkt rbuf.pkt
+/*
+** Socket readable/timeout Callback:
+** Read in the packet
+** Unicast:
+** - close socket
+** - decrement n_pending_ntp
+** - If packet is good, set the time and "exit"
+** Broadcast:
+** - If packet is good, set the time and "exit"
+*/
+void
+sock_cb(
+ evutil_socket_t fd,
+ short what,
+ void *ptr
+ )
+{
+ sockaddr_u sender;
+ sockaddr_u * psau;
+ sent_pkt ** p_pktlist;
+ sent_pkt * spkt;
+ int rpktl;
+ int rc;
+
+ INSIST(sock4 == fd || sock6 == fd);
+
+ TRACE(3, ("sock_cb: event on sock%s:%s%s%s%s\n",
+ (fd == sock6)
+ ? "6"
+ : "4",
+ (what & EV_TIMEOUT) ? " timeout" : "",
+ (what & EV_READ) ? " read" : "",
+ (what & EV_WRITE) ? " write" : "",
+ (what & EV_SIGNAL) ? " signal" : ""));
+
+ if (!(EV_READ & what)) {
+ if (EV_TIMEOUT & what)
+ timeout_queries();
+
+ return;
+ }
+
+ /* Read in the packet */
+ rpktl = recvdata(fd, &sender, &rbuf, sizeof(rbuf));
+ if (rpktl < 0) {
+ msyslog(LOG_DEBUG, "recvfrom error %m");
+ return;
+ }
+
+ if (sock6 == fd)
+ p_pktlist = &v6_pkts_list;
+ else
+ p_pktlist = &v4_pkts_list;
+
+ for (spkt = *p_pktlist; spkt != NULL; spkt = spkt->link) {
+ psau = &spkt->addr;
+ if (SOCK_EQ(&sender, psau))
+ break;
+ }
+ if (NULL == spkt) {
+ msyslog(LOG_WARNING,
+ "Packet from unexpected source %s dropped",
+ sptoa(&sender));
+ return;
+ }
+
+ TRACE(1, ("sock_cb: %s %s\n", spkt->dctx->name,
+ sptoa(&sender)));
+
+ rpktl = process_pkt(&r_pkt, &sender, rpktl, MODE_SERVER,
+ &spkt->x_pkt, "sock_cb");
+
+ TRACE(2, ("sock_cb: process_pkt returned %d\n", rpktl));
+
+ /* If this is a Unicast packet, one down ... */
+ if (!spkt->done && (CTX_UCST & spkt->dctx->flags)) {
+ dec_pending_ntp(spkt->dctx->name, &spkt->addr);
+ spkt->done = TRUE;
+ }
+
+
+ /* If the packet is good, set the time and we're all done */
+ rc = handle_pkt(rpktl, &r_pkt, &spkt->addr, spkt->dctx->name);
+ if (0 != rc)
+ TRACE(1, ("sock_cb: handle_pkt() returned %d\n", rc));
+ check_exit_conditions();
+}
+
+
+/*
+ * check_exit_conditions()
+ *
+ * If sntp has a reply, ask the event loop to stop after this round of
+ * callbacks, unless --wait was used.
+ */
+void
+check_exit_conditions(void)
+{
+ if ((0 == n_pending_ntp && 0 == n_pending_dns) ||
+ (time_derived && !HAVE_OPT(WAIT))) {
+ event_base_loopexit(base, NULL);
+ shutting_down = TRUE;
+ } else {
+ TRACE(2, ("%d NTP and %d name queries pending\n",
+ n_pending_ntp, n_pending_dns));
+ }
+}
+
+
+/*
+ * sntp_addremove_fd() is invoked by the intres blocking worker code
+ * to read from a pipe, or to stop same.
+ */
+void sntp_addremove_fd(
+ int fd,
+ int is_pipe,
+ int remove_it
+ )
+{
+ u_int idx;
+ blocking_child *c;
+ struct event * ev;
+
+#ifdef HAVE_SOCKETPAIR
+ if (is_pipe) {
+ /* sntp only asks for EV_FEATURE_FDS without HAVE_SOCKETPAIR */
+ msyslog(LOG_ERR, "fatal: pipes not supported on systems with socketpair()");
+ exit(1);
+ }
+#endif
+
+ c = NULL;
+ for (idx = 0; idx < blocking_children_alloc; idx++) {
+ c = blocking_children[idx];
+ if (NULL == c)
+ continue;
+ if (fd == c->resp_read_pipe)
+ break;
+ }
+ if (idx == blocking_children_alloc)
+ return;
+
+ if (remove_it) {
+ ev = c->resp_read_ctx;
+ c->resp_read_ctx = NULL;
+ event_del(ev);
+ event_free(ev);
+
+ return;
+ }
+
+ ev = event_new(base, fd, EV_READ | EV_PERSIST,
+ &worker_resp_cb, c);
+ if (NULL == ev) {
+ msyslog(LOG_ERR,
+ "sntp_addremove_fd: event_new(base, fd) failed!");
+ return;
+ }
+ c->resp_read_ctx = ev;
+ event_add(ev, NULL);
+}
+
+
+/* called by forked intres child to close open descriptors */
+#ifdef WORK_FORK
+void
+kill_asyncio(
+ int startfd
+ )
+{
+ if (INVALID_SOCKET != sock4) {
+ closesocket(sock4);
+ sock4 = INVALID_SOCKET;
+ }
+ if (INVALID_SOCKET != sock6) {
+ closesocket(sock6);
+ sock6 = INVALID_SOCKET;
+ }
+ if (INVALID_SOCKET != bsock4) {
+ closesocket(sock4);
+ sock4 = INVALID_SOCKET;
+ }
+ if (INVALID_SOCKET != bsock6) {
+ closesocket(sock6);
+ sock6 = INVALID_SOCKET;
+ }
+}
+#endif
+
+
+/*
+ * worker_resp_cb() is invoked when resp_read_pipe is readable.
+ */
+void
+worker_resp_cb(
+ evutil_socket_t fd,
+ short what,
+ void * ctx /* blocking_child * */
+ )
+{
+ blocking_child * c;
+
+ DEBUG_INSIST(EV_READ & what);
+ c = ctx;
+ DEBUG_INSIST(fd == c->resp_read_pipe);
+ process_blocking_resp(c);
+}
+
+
+/*
+ * intres_timeout_req(s) is invoked in the parent to schedule an idle
+ * timeout to fire in s seconds, if not reset earlier by a call to
+ * intres_timeout_req(0), which clears any pending timeout. When the
+ * timeout expires, worker_idle_timer_fired() is invoked (again, in the
+ * parent).
+ *
+ * sntp and ntpd each provide implementations adapted to their timers.
+ */
+void
+intres_timeout_req(
+ u_int seconds /* 0 cancels */
+ )
+{
+ struct timeval tv_to;
+
+ if (NULL == ev_worker_timeout) {
+ ev_worker_timeout = event_new(base, -1,
+ EV_TIMEOUT | EV_PERSIST,
+ &worker_timeout, NULL);
+ DEBUG_INSIST(NULL != ev_worker_timeout);
+ } else {
+ event_del(ev_worker_timeout);
+ }
+ if (0 == seconds)
+ return;
+ tv_to.tv_sec = seconds;
+ tv_to.tv_usec = 0;
+ event_add(ev_worker_timeout, &tv_to);
+}
+
+
+void
+worker_timeout(
+ evutil_socket_t fd,
+ short what,
+ void * ctx
+ )
+{
+ UNUSED_ARG(fd);
+ UNUSED_ARG(ctx);
+
+ DEBUG_REQUIRE(EV_TIMEOUT & what);
+ worker_idle_timer_fired();
+}
+
+
+void
+sntp_libevent_log_cb(
+ int severity,
+ const char * msg
+ )
+{
+ int level;
+
+ switch (severity) {
+
+ default:
+ case _EVENT_LOG_DEBUG:
+ level = LOG_DEBUG;
+ break;
+
+ case _EVENT_LOG_MSG:
+ level = LOG_NOTICE;
+ break;
+
+ case _EVENT_LOG_WARN:
+ level = LOG_WARNING;
+ break;
+
+ case _EVENT_LOG_ERR:
+ level = LOG_ERR;
+ break;
+ }
+
+ msyslog(level, "%s", msg);
+}
+
int
generate_pkt (
@@ -169,98 +1120,120 @@ generate_pkt (
struct key *pkt_key
)
{
- l_fp xmt;
- int pkt_len = LEN_PKT_NOMAC;
- memset(x_pkt, 0, sizeof(struct pkt));
- TVTOTS(tv_xmt, &xmt);
- HTONL_FP(&xmt, &(x_pkt->xmt));
+ l_fp xmt_fp;
+ int pkt_len;
+ int mac_size;
+
+ pkt_len = LEN_PKT_NOMAC;
+ ZERO(*x_pkt);
+ TVTOTS(tv_xmt, &xmt_fp);
+ HTONL_FP(&xmt_fp, &x_pkt->xmt);
x_pkt->stratum = STRATUM_TO_PKT(STRATUM_UNSPEC);
x_pkt->ppoll = 8;
/* FIXME! Modus broadcast + adr. check -> bdr. pkt */
- set_li_vn_mode(x_pkt, LEAP_NOTINSYNC, 4, 3);
+ set_li_vn_mode(x_pkt, LEAP_NOTINSYNC, ntpver, 3);
if (pkt_key != NULL) {
- int mac_size = 20; /* max room for MAC */
x_pkt->exten[0] = htonl(key_id);
- mac_size = make_mac((char *)x_pkt, pkt_len, mac_size, pkt_key, (char *)&x_pkt->exten[1]);
- if (mac_size)
+ mac_size = 20; /* max room for MAC */
+ mac_size = make_mac((char *)x_pkt, pkt_len, mac_size,
+ pkt_key, (char *)&x_pkt->exten[1]);
+ if (mac_size > 0)
pkt_len += mac_size + 4;
}
return pkt_len;
}
+
int
-handle_pkt (
- int rpktl,
- struct pkt *rpkt,
- struct addrinfo *host
+handle_pkt(
+ int rpktl,
+ struct pkt * rpkt,
+ sockaddr_u * host,
+ const char * hostname
)
{
- struct timeval tv_dst;
- int sw_case, digits;
- char *hostname = NULL, *ref, *ts_str = NULL;
- double offset, precision, root_dispersion;
- char addr_buf[INET6_ADDRSTRLEN];
- char *p_SNTP_PRETEND_TIME;
- time_t pretend_time;
-
- if(rpktl > 0)
+ char disptxt[32];
+ const char * addrtxt;
+ struct timeval tv_dst;
+ int cnt;
+ int sw_case;
+ int digits;
+ int stratum;
+ char * ref;
+ char * ts_str;
+ double offset;
+ double precision;
+ double synch_distance;
+ char * p_SNTP_PRETEND_TIME;
+ time_t pretend_time;
+#if SIZEOF_TIME_T == 8
+ long long ll;
+#else
+ long l;
+#endif
+
+ ts_str = NULL;
+
+ if (rpktl > 0)
sw_case = 1;
else
sw_case = rpktl;
- switch(sw_case) {
+ switch (sw_case) {
+
case SERVER_UNUSEABLE:
return -1;
break;
case PACKET_UNUSEABLE:
break;
-
+
case SERVER_AUTH_FAIL:
break;
case KOD_DEMOBILIZE:
/* Received a DENY or RESTR KOD packet */
- hostname = addrinfo_to_str(host);
+ addrtxt = stoa(host);
ref = (char *)&rpkt->refid;
- add_entry(hostname, ref);
-
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp handle_pkt: Received KOD packet with code: %c%c%c%c from %s, demobilizing all connections\n",
- ref[0], ref[1], ref[2], ref[3],
- hostname);
-
- msyslog(LOG_WARNING, "Received a KOD packet with code %c%c%c%c from %s, demobilizing all connections",
- ref[0], ref[1], ref[2], ref[3], hostname);
+ add_entry(addrtxt, ref);
+ msyslog(LOG_WARNING, "KOD code %c%c%c%c from %s %s",
+ ref[0], ref[1], ref[2], ref[3], addrtxt, hostname);
break;
case KOD_RATE:
- /* Hmm... probably we should sleep a bit here */
+ /*
+ ** Hmm...
+ ** We should probably call add_entry() with an
+ ** expiration timestamp of several seconds in the future,
+ ** and back-off even more if we get more RATE responses.
+ */
break;
case 1:
- if (ENABLED_OPT(NORMALVERBOSE)) {
- getnameinfo(host->ai_addr, host->ai_addrlen, addr_buf,
- sizeof(addr_buf), NULL, 0, NI_NUMERICHOST);
- printf("sntp handle_pkt: Received %i bytes from %s\n", rpktl, addr_buf);
- }
+ TRACE(3, ("handle_pkt: %d bytes from %s %s\n",
+ rpktl, stoa(host), hostname));
- GETTIMEOFDAY(&tv_dst, (struct timezone *)NULL);
+ gettimeofday_cached(base, &tv_dst);
p_SNTP_PRETEND_TIME = getenv("SNTP_PRETEND_TIME");
if (p_SNTP_PRETEND_TIME) {
+ pretend_time = 0;
#if SIZEOF_TIME_T == 4
- sscanf(p_SNTP_PRETEND_TIME, "%ld", &pretend_time);
+ if (1 == sscanf(p_SNTP_PRETEND_TIME, "%ld", &l))
+ pretend_time = (time_t)l;
#elif SIZEOF_TIME_T == 8
- sscanf(p_SNTP_PRETEND_TIME, "%lld", &pretend_time);
+ if (1 == sscanf(p_SNTP_PRETEND_TIME, "%lld", &ll))
+ pretend_time = (time_t)ll;
#else
# include "GRONK: unexpected value for SIZEOF_TIME_T"
#endif
- tv_dst.tv_sec = pretend_time;
+ if (0 != pretend_time)
+ tv_dst.tv_sec = pretend_time;
}
offset_calculation(rpkt, rpktl, &tv_dst, &offset,
- &precision, &root_dispersion);
+ &precision, &synch_distance);
+ time_derived = TRUE;
for (digits = 0; (precision *= 10.) < 1.; ++digits)
/* empty */ ;
@@ -268,35 +1241,51 @@ handle_pkt (
digits = 6;
ts_str = tv_to_str(&tv_dst);
- printf("%s ", ts_str);
- if (offset > 0)
- printf("+");
- printf("%.*f", digits, offset);
- if (root_dispersion > 0.)
- printf(" +/- %f secs", root_dispersion);
- printf("\n");
+ stratum = rpkt->stratum;
+ if (0 == stratum)
+ stratum = 16;
+
+ if (synch_distance > 0.) {
+ cnt = snprintf(disptxt, sizeof(disptxt),
+ " +/- %f", synch_distance);
+ if (cnt >= sizeof(disptxt))
+ snprintf(disptxt, sizeof(disptxt),
+ "ERROR %d >= %d", cnt,
+ (int)sizeof(disptxt));
+ } else {
+ disptxt[0] = '\0';
+ }
+
+ msyslog(LOG_INFO, "%s %+.*f%s %s s%d%s", ts_str,
+ digits, offset, disptxt,
+ hostnameaddr(hostname, host), stratum,
+ (time_adjusted)
+ ? " [excess]"
+ : "");
free(ts_str);
if (p_SNTP_PRETEND_TIME)
return 0;
- if (ENABLED_OPT(SETTOD) || ENABLED_OPT(ADJTIME))
- return set_time(offset);
+ if (!time_adjusted &&
+ (ENABLED_OPT(STEP) || ENABLED_OPT(SLEW)))
+ return set_time(offset);
- return 0;
+ return EX_OK;
}
return 1;
}
+
void
-offset_calculation (
+offset_calculation(
struct pkt *rpkt,
int rpktl,
struct timeval *tv_dst,
double *offset,
double *precision,
- double *root_dispersion
+ double *synch_distance
)
{
l_fp p_rec, p_xmt, p_ref, p_org, tmp, dst;
@@ -312,31 +1301,8 @@ offset_calculation (
NTOHL_FP(&rpkt->xmt, &p_xmt);
*precision = LOGTOD(rpkt->precision);
-#ifdef DEBUG
- printf("sntp precision: %f\n", *precision);
-#endif /* DEBUG */
- *root_dispersion = FPTOD(p_rdsp);
-
-#ifdef DEBUG
- printf("sntp rootdelay: %f\n", FPTOD(p_rdly));
- printf("sntp rootdisp: %f\n", *root_dispersion);
-
- pkt_output(rpkt, rpktl, stdout);
-
- printf("sntp offset_calculation: rpkt->reftime:\n");
- l_fp_output(&(rpkt->reftime), stdout);
- printf("sntp offset_calculation: rpkt->org:\n");
- l_fp_output(&(rpkt->org), stdout);
- printf("sntp offset_calculation: rpkt->rec:\n");
- l_fp_output(&(rpkt->rec), stdout);
- printf("sntp offset_calculation: rpkt->rec:\n");
- l_fp_output_bin(&(rpkt->rec), stdout);
- printf("sntp offset_calculation: rpkt->rec:\n");
- l_fp_output_dec(&(rpkt->rec), stdout);
- printf("sntp offset_calculation: rpkt->xmt:\n");
- l_fp_output(&(rpkt->xmt), stdout);
-#endif
+ TRACE(3, ("offset_calculation: LOGTOD(rpkt->precision): %f\n", *precision));
/* Compute offset etc. */
tmp = p_rec;
@@ -350,66 +1316,67 @@ offset_calculation (
*offset = (t21 + t34) / 2.;
delta = t21 - t34;
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp offset_calculation:\tt21: %.6f\t\t t34: %.6f\n\t\tdelta: %.6f\t offset: %.6f\n",
- t21, t34, delta, *offset);
-}
-
-/* The heart of (S)NTP, exchange NTP packets and compute values to correct the local clock */
-int
-on_wire (
- struct addrinfo *host,
- struct addrinfo *bcast
- )
-{
- char addr_buf[INET6_ADDRSTRLEN];
- register int try;
- SOCKET sock;
- struct key *pkt_key = NULL;
- int key_id = 0;
- struct timeval tv_xmt;
- struct pkt x_pkt;
- int error, rpktl, handle_pkt_res;
-
-
- if (ENABLED_OPT(AUTHENTICATION)) {
- key_id = (int) OPT_ARG(AUTHENTICATION);
- get_key(key_id, &pkt_key);
- }
- for (try=0; try<5; try++) {
- memset(&r_pkt, 0, sizeof rbuf);
-
- error = GETTIMEOFDAY(&tv_xmt, (struct timezone *)NULL);
- tv_xmt.tv_sec += JAN_1970;
+ // synch_distance is:
+ // (peer->delay + peer->rootdelay) / 2 + peer->disp
+ // + peer->rootdisp + clock_phi * (current_time - peer->update)
+ // + peer->jitter;
+ //
+ // and peer->delay = fabs(peer->offset - p_offset) * 2;
+ // and peer->offset needs history, so we're left with
+ // p_offset = (t21 + t34) / 2.;
+ // peer->disp = 0; (we have no history to augment this)
+ // clock_phi = 15e-6;
+ // peer->jitter = LOGTOD(sys_precision); (we have no history to augment this)
+ // and ntp_proto.c:set_sys_tick_precision() should get us sys_precision.
+ //
+ // so our answer seems to be:
+ //
+ // (fabs(t21 + t34) + peer->rootdelay) / 3.
+ // + 0 (peer->disp)
+ // + peer->rootdisp
+ // + 15e-6 (clock_phi)
+ // + LOGTOD(sys_precision)
+
+ INSIST( FPTOD(p_rdly) >= 0. );
+#if 1
+ *synch_distance = (fabs(t21 + t34) + FPTOD(p_rdly)) / 3.
+ + 0.
+ + FPTOD(p_rdsp)
+ + 15e-6
+ + 0. /* LOGTOD(sys_precision) when we can get it */
+ ;
+ INSIST( *synch_distance >= 0. );
+#else
+ *synch_distance = (FPTOD(p_rdly) + FPTOD(p_rdsp))/2.0;
+#endif
#ifdef DEBUG
- printf("sntp on_wire: Current time sec: %i msec: %i\n", (unsigned int) tv_xmt.tv_sec,
- (unsigned int) tv_xmt.tv_usec);
+ if (debug > 3) {
+ printf("sntp rootdelay: %f\n", FPTOD(p_rdly));
+ printf("sntp rootdisp: %f\n", FPTOD(p_rdsp));
+ printf("sntp syncdist: %f\n", *synch_distance);
+
+ pkt_output(rpkt, rpktl, stdout);
+
+ printf("sntp offset_calculation: rpkt->reftime:\n");
+ l_fp_output(&p_ref, stdout);
+ printf("sntp offset_calculation: rpkt->org:\n");
+ l_fp_output(&p_org, stdout);
+ printf("sntp offset_calculation: rpkt->rec:\n");
+ l_fp_output(&p_rec, stdout);
+ printf("sntp offset_calculation: rpkt->xmt:\n");
+ l_fp_output(&p_xmt, stdout);
+ }
#endif
- if (bcast) {
- create_socket(&sock, (sockaddr_u *)bcast->ai_addr);
- rpktl = recv_bcst_pkt(sock, &r_pkt, sizeof rbuf, (sockaddr_u *)bcast->ai_addr);
- closesocket(sock);
- } else {
- int pkt_len = generate_pkt(&x_pkt, &tv_xmt, key_id, pkt_key);
+ TRACE(3, ("sntp offset_calculation:\trec - org t21: %.6f\n"
+ "\txmt - dst t34: %.6f\tdelta: %.6f\toffset: %.6f\n",
+ t21, t34, delta, *offset));
- create_socket(&sock, (sockaddr_u *)host->ai_addr);
- sendpkt(sock, (sockaddr_u *)host->ai_addr, &x_pkt, pkt_len);
- rpktl = recvpkt(sock, &r_pkt, sizeof rbuf, &x_pkt);
- closesocket(sock);
- }
+ return;
+}
- handle_pkt_res = handle_pkt(rpktl, &r_pkt, host);
- if (handle_pkt_res < 1)
- return handle_pkt_res;
- }
- getnameinfo(host->ai_addr, host->ai_addrlen, addr_buf, sizeof(addr_buf), NULL, 0, NI_NUMERICHOST);
- msyslog(LOG_DEBUG, "Received no useable packet from %s!", addr_buf);
-
- return -1;
-}
/* Compute the 8 bits for li_vn_mode */
void
@@ -418,13 +1385,18 @@ set_li_vn_mode (
char leap,
char version,
char mode
- )
+ )
{
if (leap > 3) {
- msyslog(LOG_DEBUG, "set_li_vn_mode: leap > 3 using max. 3");
+ msyslog(LOG_DEBUG, "set_li_vn_mode: leap > 3, using max. 3");
leap = 3;
}
+ if (version < 0 || version > 7) {
+ msyslog(LOG_DEBUG, "set_li_vn_mode: version < 0 or > 7, using 4");
+ version = 4;
+ }
+
if (mode > 7) {
msyslog(LOG_DEBUG, "set_li_vn_mode: mode > 7, using client mode 3");
mode = 3;
@@ -435,37 +1407,173 @@ set_li_vn_mode (
spkt->li_vn_mode |= mode;
}
-/* set_time corrects the local clock by offset with either settimeofday() or by default
- * with adjtime()/adjusttimeofday().
- */
+
+/*
+** set_time applies 'offset' to the local clock.
+*/
int
set_time(
double offset
)
{
- struct timeval tp;
+ int rc;
+
+ if (time_adjusted)
+ return EX_OK;
+
+ /*
+ ** If we can step but we cannot slew, then step.
+ ** If we can step or slew and and |offset| > steplimit, then step.
+ */
+ if (ENABLED_OPT(STEP) &&
+ ( !ENABLED_OPT(SLEW)
+ || (ENABLED_OPT(SLEW) && (fabs(offset) > steplimit))
+ )) {
+ rc = step_systime(offset);
+
+ /* If there was a problem, can we rely on errno? */
+ if (1 == rc)
+ time_adjusted = TRUE;
+ return (time_adjusted)
+ ? EX_OK
+ : 1;
+ /*
+ ** In case of error, what should we use?
+ ** EX_UNAVAILABLE?
+ ** EX_OSERR?
+ ** EX_NOPERM?
+ */
+ }
- if (ENABLED_OPT(SETTOD)) {
- GETTIMEOFDAY(&tp, NULL);
+ if (ENABLED_OPT(SLEW)) {
+ rc = adj_systime(offset);
+
+ /* If there was a problem, can we rely on errno? */
+ if (1 == rc)
+ time_adjusted = TRUE;
+ return (time_adjusted)
+ ? EX_OK
+ : 1;
+ /*
+ ** In case of error, what should we use?
+ ** EX_UNAVAILABLE?
+ ** EX_OSERR?
+ ** EX_NOPERM?
+ */
+ }
- tp.tv_sec += (long)offset;
- tp.tv_usec += 1e6 * (offset - (long)offset);
- NORMALIZE_TIMEVAL(tp);
+ return EX_SOFTWARE;
+}
- if (SETTIMEOFDAY(&tp, NULL) < 0) {
- msyslog(LOG_ERR, "Time not set: settimeofday(): %m");
- return -1;
- }
+
+int
+libevent_version_ok(void)
+{
+ ev_uint32_t v_compile_maj;
+ ev_uint32_t v_run_maj;
+
+ v_compile_maj = LIBEVENT_VERSION_NUMBER & 0xffff0000;
+ v_run_maj = event_get_version_number() & 0xffff0000;
+ if (v_compile_maj != v_run_maj) {
+ fprintf(stderr,
+ "Incompatible libevent versions: have %s, built with %s\n",
+ event_get_version(),
+ LIBEVENT_VERSION);
return 0;
}
+ return 1;
+}
- tp.tv_sec = (long)offset;
- tp.tv_usec = 1e6 * (offset - (long)offset);
- NORMALIZE_TIMEVAL(tp);
-
- if (ADJTIMEOFDAY(&tp, NULL) < 0) {
- msyslog(LOG_ERR, "Time not set: adjtime(): %m");
- return -1;
+/*
+ * gettimeofday_cached()
+ *
+ * Clones the event_base_gettimeofday_cached() interface but ensures the
+ * times are always on the gettimeofday() 1970 scale. Older libevent 2
+ * sometimes used gettimeofday(), sometimes the since-system-start
+ * clock_gettime(CLOCK_MONOTONIC), depending on the platform.
+ *
+ * It is not cleanly possible to tell which timescale older libevent is
+ * using.
+ *
+ * The strategy involves 1 hour thresholds chosen to be far longer than
+ * the duration of a round of libevent callbacks, which share a cached
+ * start-of-round time. First compare the last cached time with the
+ * current gettimeofday() time. If they are within one hour, libevent
+ * is using the proper timescale so leave the offset 0. Otherwise,
+ * compare libevent's cached time and the current time on the monotonic
+ * scale. If they are within an hour, libevent is using the monotonic
+ * scale so calculate the offset to add to such times to bring them to
+ * gettimeofday()'s scale.
+ */
+int
+gettimeofday_cached(
+ struct event_base * b,
+ struct timeval * caller_tv
+ )
+{
+#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
+ static struct event_base * cached_b;
+ static struct timeval cached;
+ static struct timeval adj_cached;
+ static struct timeval offset;
+ static int offset_ready;
+ struct timeval latest;
+ struct timeval systemt;
+ struct timespec ts;
+ struct timeval mono;
+ struct timeval diff;
+ int cgt_rc;
+ int gtod_rc;
+
+ event_base_gettimeofday_cached(b, &latest);
+ if (b == cached_b &&
+ !memcmp(&latest, &cached, sizeof(latest))) {
+ *caller_tv = adj_cached;
+ return 0;
+ }
+ cached = latest;
+ cached_b = b;
+ if (!offset_ready) {
+ cgt_rc = clock_gettime(CLOCK_MONOTONIC, &ts);
+ gtod_rc = gettimeofday(&systemt, NULL);
+ if (0 != gtod_rc) {
+ msyslog(LOG_ERR,
+ "%s: gettimeofday() error %m",
+ progname);
+ exit(1);
+ }
+ diff = sub_tval(systemt, latest);
+ if (debug > 1)
+ printf("system minus cached %+ld.%06ld\n",
+ (long)diff.tv_sec, diff.tv_usec);
+ if (0 != cgt_rc || labs((long)diff.tv_sec) < 3600) {
+ /*
+ * Either use_monotonic == 0, or this libevent
+ * has been repaired. Leave offset at zero.
+ */
+ } else {
+ mono.tv_sec = ts.tv_sec;
+ mono.tv_usec = ts.tv_nsec / 1000;
+ diff = sub_tval(latest, mono);
+ if (debug > 1)
+ printf("cached minus monotonic %+ld.%06ld\n",
+ (long)diff.tv_sec, diff.tv_usec);
+ if (labs((long)diff.tv_sec) < 3600) {
+ /* older libevent2 using monotonic */
+ offset = sub_tval(systemt, mono);
+ TRACE(1, ("%s: Offsetting libevent CLOCK_MONOTONIC times by %+ld.%06ld\n",
+ "gettimeofday_cached",
+ (long)offset.tv_sec, offset.tv_usec));
+ }
+ }
+ offset_ready = TRUE;
}
+ adj_cached = add_tval(cached, offset);
+ *caller_tv = adj_cached;
+
return 0;
+#else
+ return event_base_gettimeofday_cached(b, caller_tv);
+#endif
}
+
diff --git a/sntp/main.h b/sntp/main.h
index e6965e17286a..ebe1ee315eb6 100644
--- a/sntp/main.h
+++ b/sntp/main.h
@@ -1,28 +1,31 @@
#ifndef MAIN_H
#define MAIN_H
-#include <l_stdlib.h>
-#include <ntp_fp.h>
-#include <ntp.h>
-#include <ntp_stdlib.h>
-#include <ntp_unixtime.h>
+#include <stdio.h>
#include <isc/result.h>
#include <isc/net.h>
-#include <stdio.h>
+
+#include <ntp.h>
+#include <ntp_unixtime.h>
+#include <ntp_stdlib.h>
+#include <ntp_intres.h>
+#include <ntp_debug.h>
+#include <timevalops.h>
#include <sntp-opts.h>
#include "crypto.h"
-void set_li_vn_mode (struct pkt *spkt, char leap, char version, char mode);
-int sntp_main (int argc, char **argv);
-int generate_pkt (struct pkt *x_pkt, const struct timeval *tv_xmt,
+void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode);
+extern int sntp_main(int argc, char **argv, const char *);
+int generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt,
int key_id, struct key *pkt_key);
-int handle_pkt (int rpktl, struct pkt *rpkt, struct addrinfo *host);
-void offset_calculation (struct pkt *rpkt, int rpktl, struct timeval *tv_dst,
- double *offset, double *precision,
- double *root_dispersion);
-int on_wire (struct addrinfo *host, struct addrinfo *bcastaddr);
-int set_time (double offset);
+int handle_pkt(int rpktl, struct pkt *rpkt, sockaddr_u *host,
+ const char *hostname);
+void offset_calculation(struct pkt *rpkt, int rpktl,
+ struct timeval *tv_dst, double *offset,
+ double *precision, double *root_dispersion);
+int on_wire(struct addrinfo *host, struct addrinfo *bcastaddr);
+int set_time(double offset);
#endif /* MAIN_H */
diff --git a/sntp/networking.c b/sntp/networking.c
index 31bc5f8fdf91..75c2f7140143 100644
--- a/sntp/networking.c
+++ b/sntp/networking.c
@@ -1,94 +1,10 @@
#include <config.h>
#include "networking.h"
+#include "ntp_debug.h"
-char adr_buf[INET6_ADDRSTRLEN];
-
-
-/* resolve_hosts consumes an array of hostnames/addresses and its length, stores a pointer
- * to the array with the resolved hosts in res and returns the size of the array res.
- * pref_family enforces IPv4 or IPv6 depending on commandline options and system
- * capability. If pref_family is NULL or PF_UNSPEC any compatible family will be accepted.
- * Check here: Probably getaddrinfo() can do without ISC's IPv6 availability check?
- */
-int
-resolve_hosts (
- const char **hosts,
- int hostc,
- struct addrinfo ***res,
- int pref_family
- )
-{
- register unsigned int a;
- unsigned int resc;
- struct addrinfo **tres;
-
- if (hostc < 1 || NULL == res)
- return 0;
-
- tres = emalloc(sizeof(struct addrinfo *) * hostc);
- for (a = 0, resc = 0; a < hostc; a++) {
- struct addrinfo hints;
- int error;
-
- tres[resc] = NULL;
-#ifdef DEBUG
- printf("sntp resolve_hosts: Starting host resolution for %s...\n", hosts[a]);
-#endif
- memset(&hints, 0, sizeof(hints));
- if (AF_UNSPEC == pref_family)
- hints.ai_family = PF_UNSPEC;
- else
- hints.ai_family = pref_family;
- hints.ai_socktype = SOCK_DGRAM;
- error = getaddrinfo(hosts[a], "123", &hints, &tres[resc]);
- if (error) {
- msyslog(LOG_DEBUG, "Error looking up %s%s: %s",
- (AF_UNSPEC == hints.ai_family)
- ? ""
- : (AF_INET == hints.ai_family)
- ? "(A) "
- : "(AAAA) ",
- hosts[a], gai_strerror(error));
- } else {
-#ifdef DEBUG
- for (dres = tres[resc]; dres; dres = dres->ai_next) {
- getnameinfo(dres->ai_addr, dres->ai_addrlen, adr_buf, sizeof(adr_buf), NULL, 0, NI_NUMERICHOST);
- STDLINE
- printf("Resolv No.: %i Result of getaddrinfo for %s:\n", resc, hosts[a]);
- printf("socktype: %i ", dres->ai_socktype);
- printf("protocol: %i ", dres->ai_protocol);
- printf("Prefered socktype: %i IP: %s\n", dres->ai_socktype, adr_buf);
- STDLINE
- }
-#endif
- resc++;
- }
- }
-
- if (resc)
- *res = realloc(tres, sizeof(struct addrinfo *) * resc);
- else {
- free(tres);
- *res = NULL;
- }
- return resc;
-}
-
-/* Creates a socket and returns. */
-void
-create_socket (
- SOCKET *rsock,
- sockaddr_u *dest
- )
-{
- *rsock = socket(AF(dest), SOCK_DGRAM, 0);
-
- if (-1 == *rsock && ENABLED_OPT(NORMALVERBOSE))
- printf("Failed to create UDP socket with family %d\n", AF(dest));
-}
/* Send a packet */
-void
+int
sendpkt (
SOCKET rsock,
sockaddr_u *dest,
@@ -99,204 +15,108 @@ sendpkt (
int cc;
#ifdef DEBUG
- printf("sntp sendpkt: Packet data:\n");
- pkt_output(pkt, len, stdout);
-#endif
-
- if (ENABLED_OPT(NORMALVERBOSE)) {
- getnameinfo(&dest->sa, SOCKLEN(dest), adr_buf, sizeof(adr_buf), NULL, 0, NI_NUMERICHOST);
- printf("sntp sendpkt: Sending packet to %s... ", adr_buf);
+ if (debug > 2) {
+ printf("sntp sendpkt: Packet data:\n");
+ pkt_output(pkt, len, stdout);
}
+#endif
+ TRACE(1, ("sntp sendpkt: Sending packet to %s ...\n",
+ sptoa(dest)));
- cc = sendto(rsock, (void *)pkt, len, 0, &dest->sa, SOCKLEN(dest));
+ cc = sendto(rsock, (void *)pkt, len, 0, &dest->sa,
+ SOCKLEN(dest));
if (cc == SOCKET_ERROR) {
-#ifdef DEBUG
- printf("\n sntp sendpkt: Socket error: %i. Couldn't send packet!\n", cc);
-#endif
- if (errno != EWOULDBLOCK && errno != ENOBUFS) {
- /* oh well */
- }
- } else if (ENABLED_OPT(NORMALVERBOSE)) {
- printf("Packet sent.\n");
+ msyslog(LOG_ERR, "Send to %s failed, %m",
+ sptoa(dest));
+ return FALSE;
}
+ TRACE(1, ("Packet sent.\n"));
+
+ return TRUE;
}
+
/* Receive raw data */
int
recvdata(
- SOCKET rsock,
- sockaddr_u *sender,
- char *rdata,
- int rdata_length
+ SOCKET rsock,
+ sockaddr_u * sender,
+ void * rdata,
+ int rdata_length
)
{
GETSOCKNAME_SOCKLEN_TYPE slen;
int recvc;
-#ifdef DEBUG
- printf("sntp recvdata: Trying to receive data from...\n");
-#endif
slen = sizeof(*sender);
- recvc = recvfrom(rsock, rdata, rdata_length, 0,
+ recvc = recvfrom(rsock, rdata, rdata_length, 0,
&sender->sa, &slen);
+ if (recvc < 0)
+ return recvc;
#ifdef DEBUG
- if (recvc > 0) {
- printf("Received %d bytes from %s:\n", recvc, stoa(sender));
- pkt_output((struct pkt *) rdata, recvc, stdout);
- } else {
- saved_errno = errno;
- printf("recvfrom error %d (%s)\n", errno, strerror(errno));
- errno = saved_errno;
+ if (debug > 2) {
+ printf("Received %d bytes from %s:\n", recvc, sptoa(sender));
+ pkt_output((struct pkt *)rdata, recvc, stdout);
}
#endif
return recvc;
}
-/* Receive data from broadcast. Couldn't finish that. Need to do some digging
- * here, especially for protocol independence and IPv6 multicast */
-int
-recv_bcst_data (
- SOCKET rsock,
- char *rdata,
- int rdata_len,
- sockaddr_u *sas,
- sockaddr_u *ras
+/* Parsing from a short 'struct pkt' directly is bound to create
+ * coverity warnings. These are hard to avoid, as the formal declaration
+ * does not reflect the true layout in the presence of autokey extension
+ * fields. Parsing and skipping the extension fields of a received packet
+ * until there's only the MAC left is better done in this separate
+ * function.
+ */
+static void*
+skip_efields(
+ u_int32 *head, /* head of extension chain */
+ u_int32 *tail /* tail/end of extension chain */
)
{
- char *buf;
- int btrue = 1;
- int recv_bytes = 0;
- int rdy_socks;
- GETSOCKNAME_SOCKLEN_TYPE ss_len;
- struct timeval timeout_tv;
- fd_set bcst_fd;
-#ifdef MCAST
- struct ip_mreq mdevadr;
- TYPEOF_IP_MULTICAST_LOOP mtrue = 1;
-#endif
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
- struct ipv6_mreq mdevadr6;
-#endif
-
- setsockopt(rsock, SOL_SOCKET, SO_REUSEADDR, &btrue, sizeof(btrue));
- if (IS_IPV4(sas)) {
- if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp recv_bcst_data: Couldn't bind() address %s:%d.\n",
- stoa(sas), SRCPORT(sas));
- }
-
-#ifdef MCAST
- if (setsockopt(rsock, IPPROTO_IP, IP_MULTICAST_LOOP, &mtrue, sizeof(mtrue)) < 0) {
- /* some error message regarding setting up multicast loop */
- return BROADCAST_FAILED;
- }
- mdevadr.imr_multiaddr.s_addr = NSRCADR(sas);
- mdevadr.imr_interface.s_addr = htonl(INADDR_ANY);
- if (mdevadr.imr_multiaddr.s_addr == -1) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
- printf("sntp recv_bcst_data: %s:%d is not a broad-/multicast address, aborting...\n",
- stoa(sas), SRCPORT(sas));
- }
- return BROADCAST_FAILED;
- }
- if (setsockopt(rsock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mdevadr, sizeof(mdevadr)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
- buf = ss_to_str(sas);
- printf("sntp recv_bcst_data: Couldn't add IP membership for %s\n", buf);
- free(buf);
- }
- }
-#endif /* MCAST */
- }
-#ifdef ISC_PLATFORM_HAVEIPV6
- else if (IS_IPV6(sas)) {
- if (bind(rsock, &sas->sa, SOCKLEN(sas)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp recv_bcst_data: Couldn't bind() address.\n");
- }
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
- if (setsockopt(rsock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &btrue, sizeof (btrue)) < 0) {
- /* some error message regarding setting up multicast loop */
- return BROADCAST_FAILED;
- }
- memset(&mdevadr6, 0, sizeof(mdevadr6));
- mdevadr6.ipv6mr_multiaddr = SOCK_ADDR6(sas);
- if (!IN6_IS_ADDR_MULTICAST(&mdevadr6.ipv6mr_multiaddr)) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
- buf = ss_to_str(sas);
- printf("sntp recv_bcst_data: %s is not a broad-/multicast address, aborting...\n", buf);
- free(buf);
- }
- return BROADCAST_FAILED;
- }
- if (setsockopt(rsock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
- &mdevadr6, sizeof(mdevadr6)) < 0) {
- if (ENABLED_OPT(NORMALVERBOSE)) {
- buf = ss_to_str(sas);
- printf("sntp recv_bcst_data: Couldn't join group for %s\n", buf);
- free(buf);
- }
- }
-#endif /* INCLUDE_IPV6_MULTICAST_SUPPORT */
- }
-#endif /* ISC_PLATFORM_HAVEIPV6 */
- FD_ZERO(&bcst_fd);
- FD_SET(rsock, &bcst_fd);
- if (ENABLED_OPT(TIMEOUT))
- timeout_tv.tv_sec = (int) OPT_ARG(TIMEOUT);
- else
- timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */
- timeout_tv.tv_usec = 0;
- rdy_socks = select(rsock + 1, &bcst_fd, 0, 0, &timeout_tv);
- switch (rdy_socks) {
- case -1:
- if (ENABLED_OPT(NORMALVERBOSE))
- perror("sntp recv_bcst_data: select()");
- return BROADCAST_FAILED;
- break;
- case 0:
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp recv_bcst_data: select() reached timeout (%u sec), aborting.\n",
- (unsigned)timeout_tv.tv_sec);
- return BROADCAST_FAILED;
- break;
- default:
- ss_len = sizeof(*ras);
- recv_bytes = recvfrom(rsock, rdata, rdata_len, 0, &ras->sa, &ss_len);
- break;
- }
- if (recv_bytes == -1) {
- if (ENABLED_OPT(NORMALVERBOSE))
- perror("sntp recv_bcst_data: recvfrom:");
- recv_bytes = BROADCAST_FAILED;
+
+ u_int nlen; /* next extension length */
+ while ((tail - head) > 6) {
+ nlen = ntohl(*head++) & 0xffff;
+ nlen = (nlen + 3) >> 2;
+ if (nlen > (tail - head) || nlen < 4)
+ return NULL; /* Blooper! Inconsistent! */
+ head += nlen;
}
-#ifdef MCAST
- if (IS_IPV4(sas))
- setsockopt(rsock, IPPROTO_IP, IP_DROP_MEMBERSHIP, &btrue, sizeof(btrue));
-#endif
-#ifdef INCLUDE_IPV6_MULTICAST_SUPPORT
- if (IS_IPV6(sas))
- setsockopt(rsock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &btrue, sizeof(btrue));
-#endif
- return recv_bytes;
+ return head;
}
+/*
+** Check if it's data for us and whether it's useable or not.
+**
+** If not, return a failure code so we can delete this server from our list
+** and continue with another one.
+*/
int
process_pkt (
struct pkt *rpkt,
- sockaddr_u *sas,
+ sockaddr_u *sender,
int pkt_len,
int mode,
struct pkt *spkt,
- char * func_name
+ const char * func_name
)
{
- unsigned int key_id = 0;
- struct key *pkt_key = NULL;
- int is_authentic = 0;
- unsigned int exten_words, exten_words_used = 0;
- int mac_size;
+ u_int key_id;
+ struct key * pkt_key;
+ int is_authentic;
+ int mac_size;
+ u_int exten_len;
+ u_int32 * exten_end;
+ u_int32 * packet_end;
+ l_fp sent_xmt;
+ l_fp resp_org;
+
+ key_id = 0;
+ pkt_key = NULL;
+ is_authentic = (HAVE_OPT(AUTHENTICATION)) ? 0 : -1;
+
/*
* Parse the extension field if present. We figure out whether
* an extension field is present by measuring the MAC size. If
@@ -311,105 +131,109 @@ process_pkt (
*/
if (pkt_len < LEN_PKT_NOMAC || (pkt_len & 3) != 0) {
unusable:
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: Funny packet length: %i. Discarding package.\n", func_name, pkt_len);
+ msyslog(LOG_ERR,
+ "%s: Incredible packet length: %d. Discarding.",
+ func_name, pkt_len);
return PACKET_UNUSEABLE;
}
- /* skip past the extensions, if any */
- exten_words = ((unsigned)pkt_len - LEN_PKT_NOMAC) >> 2;
- while (exten_words > 6) {
- unsigned int exten_len;
- exten_len = ntohl(rpkt->exten[exten_words_used]) & 0xffff;
- exten_len = (exten_len + 7) >> 2; /* convert to words, add 1 */
- if (exten_len > exten_words || exten_len < 5)
- goto unusable;
- exten_words -= exten_len;
- exten_words_used += exten_len;
- }
+ /* Note: pkt_len must be a multiple of 4 at this point! */
+ packet_end = (u_int32*)((char*)rpkt + pkt_len);
+ exten_end = skip_efields(rpkt->exten, packet_end);
+ if (NULL == exten_end)
+ goto unusable;
+ /* get size of MAC in cells; can be zero */
+ exten_len = (u_int)(packet_end - exten_end);
+
+ /* deduce action required from remaining length */
+ switch (exten_len) {
+
+ case 0: /* no MAC at all */
+ break;
- switch (exten_words) {
- case 1:
- key_id = ntohl(rpkt->exten[exten_words_used]);
+ case 1: /* crypto NAK */
+ key_id = ntohl(*exten_end);
printf("Crypto NAK = 0x%08x\n", key_id);
break;
- case 5:
- case 6:
- /* Look for the key used by the server in the specified keyfile
- * and if existent, fetch it or else leave the pointer untouched */
- key_id = ntohl(rpkt->exten[exten_words_used]);
+
+ case 3: /* key ID + 3DES MAC -- unsupported! */
+ goto unusable;
+
+ case 5: /* key ID + MD5 MAC */
+ case 6: /* key ID + SHA MAC */
+ /*
+ ** Look for the key used by the server in the specified
+ ** keyfile and if existent, fetch it or else leave the
+ ** pointer untouched
+ */
+ key_id = ntohl(*exten_end);
get_key(key_id, &pkt_key);
if (!pkt_key) {
printf("unrecognized key ID = 0x%08x\n", key_id);
break;
}
- /* Seems like we've got a key with matching keyid */
- /* Generate a md5sum of the packet with the key from our keyfile
- * and compare those md5sums */
- mac_size = exten_words << 2;
- if (!auth_md5((char *)rpkt, pkt_len - mac_size, mac_size - 4, pkt_key)) {
+ /*
+ ** Seems like we've got a key with matching keyid.
+ **
+ ** Generate a md5sum of the packet with the key from our
+ ** keyfile and compare those md5sums.
+ */
+ mac_size = exten_len << 2;
+ if (!auth_md5((char *)rpkt, pkt_len - mac_size,
+ mac_size - 4, pkt_key)) {
+ is_authentic = FALSE;
break;
}
/* Yay! Things worked out! */
- if (ENABLED_OPT(NORMALVERBOSE)) {
- char *hostname = ss_to_str(sas);
- printf("sntp %s: packet received from %s successfully authenticated using key id %i.\n",
- func_name, hostname, key_id);
- free(hostname);
- }
- is_authentic = 1;
- break;
- case 0:
+ is_authentic = TRUE;
+ TRACE(1, ("sntp %s: packet from %s authenticated using key id %d.\n",
+ func_name, stoa(sender), key_id));
break;
+
default:
goto unusable;
- break;
}
- if (!is_authentic) {
- if (ENABLED_OPT(AUTHENTICATION)) {
- /* We want a authenticated packet */
- if (ENABLED_OPT(NORMALVERBOSE)) {
- char *hostname = ss_to_str(sas);
- printf("sntp %s: packet received from %s is not authentic. Will discard it.\n",
- func_name, hostname);
- free(hostname);
- }
- return SERVER_AUTH_FAIL;
- }
- /* We don't know if the user wanted authentication so let's
- * use it anyways */
- if (ENABLED_OPT(NORMALVERBOSE)) {
- char *hostname = ss_to_str(sas);
- printf("sntp %s: packet received from %s is not authentic. Authentication not enforced.\n",
- func_name, hostname);
- free(hostname);
- }
+
+ switch (is_authentic) {
+
+ case -1: /* unknown */
+ break;
+
+ case 0: /* not authentic */
+ return SERVER_AUTH_FAIL;
+ break;
+
+ case 1: /* authentic */
+ break;
+
+ default: /* error */
+ break;
}
+
/* Check for server's ntp version */
if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION ||
PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: Packet shows wrong version (%i)\n",
- func_name, PKT_VERSION(rpkt->li_vn_mode));
+ msyslog(LOG_ERR,
+ "%s: Packet shows wrong version (%d)",
+ func_name, PKT_VERSION(rpkt->li_vn_mode));
return SERVER_UNUSEABLE;
}
/* We want a server to sync with */
if (PKT_MODE(rpkt->li_vn_mode) != mode &&
PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: mode %d stratum %i\n", func_name,
- PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
+ msyslog(LOG_ERR,
+ "%s: mode %d stratum %d", func_name,
+ PKT_MODE(rpkt->li_vn_mode), rpkt->stratum);
return SERVER_UNUSEABLE;
}
/* Stratum is unspecified (0) check what's going on */
if (STRATUM_PKT_UNSPEC == rpkt->stratum) {
char *ref_char;
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: Stratum unspecified, going to check for KOD (stratum: %i)\n",
- func_name, rpkt->stratum);
+
+ TRACE(1, ("%s: Stratum unspecified, going to check for KOD (stratum: %d)\n",
+ func_name, rpkt->stratum));
ref_char = (char *) &rpkt->refid;
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: Packet refid: %c%c%c%c\n", func_name,
- ref_char[0], ref_char[1], ref_char[2], ref_char[3]);
+ TRACE(1, ("%s: Packet refid: %c%c%c%c\n", func_name,
+ ref_char[0], ref_char[1], ref_char[2], ref_char[3]));
/* If it's a KOD packet we'll just use the KOD information */
if (ref_char[0] != 'X') {
if (strncmp(ref_char, "DENY", 4) == 0)
@@ -418,13 +242,17 @@ unusable:
return KOD_DEMOBILIZE;
if (strncmp(ref_char, "RATE", 4) == 0)
return KOD_RATE;
- /* There are other interesting kiss codes which might be interesting for authentication */
+ /*
+ ** There are other interesting kiss codes which
+ ** might be interesting for authentication.
+ */
}
}
/* If the server is not synced it's not really useable for us */
if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode)) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp %s: Server not in sync, skipping this server\n", func_name);
+ msyslog(LOG_ERR,
+ "%s: %s not in sync, skipping this server",
+ func_name, stoa(sender));
return SERVER_UNUSEABLE;
}
@@ -432,105 +260,19 @@ unusable:
* Decode the org timestamp and make sure we're getting a response
* to our last request, but only if we're not in broadcast mode.
*/
-#ifdef DEBUG
- printf("rpkt->org:\n");
- l_fp_output(&rpkt->org, stdout);
- printf("spkt->xmt:\n");
- l_fp_output(&spkt->xmt, stdout);
-#endif
- if (mode != MODE_BROADCAST && !L_ISEQU(&rpkt->org, &spkt->xmt)) {
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp process_pkt: pkt.org and peer.xmt differ\n");
- return PACKET_UNUSEABLE;
- }
-
- return pkt_len;
-}
+ if (MODE_BROADCAST == mode)
+ return pkt_len;
-int
-recv_bcst_pkt (
- SOCKET rsock,
- struct pkt *rpkt,
- unsigned int rsize,
- sockaddr_u *sas
- )
-{
- sockaddr_u sender;
- int pkt_len = recv_bcst_data(rsock, (char *)rpkt, rsize, sas, &sender);
- if (pkt_len < 0) {
- return BROADCAST_FAILED;
- }
- pkt_len = process_pkt(rpkt, sas, pkt_len, MODE_BROADCAST, NULL, "recv_bcst_pkt");
- return pkt_len;
-}
-
-/* Fetch data, check if it's data for us and whether it's useable or not. If not, return
- * a failure code so we can delete this server from our list and continue with another one.
- */
-int
-recvpkt (
- SOCKET rsock,
- struct pkt *rpkt, /* received packet (response) */
- unsigned int rsize, /* size of rpkt buffer */
- struct pkt *spkt /* sent packet (request) */
- )
-{
- int rdy_socks;
- int pkt_len;
- sockaddr_u sender;
- struct timeval timeout_tv;
- fd_set recv_fd;
-
- FD_ZERO(&recv_fd);
- FD_SET(rsock, &recv_fd);
- if (ENABLED_OPT(TIMEOUT))
- timeout_tv.tv_sec = (int) OPT_ARG(TIMEOUT);
- else
- timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */
- timeout_tv.tv_usec = 0;
- rdy_socks = select(rsock + 1, &recv_fd, 0, 0, &timeout_tv);
- switch (rdy_socks) {
- case -1:
- if (ENABLED_OPT(NORMALVERBOSE))
- perror("sntp recvpkt: select()");
- return PACKET_UNUSEABLE;
- break;
- case 0:
- if (ENABLED_OPT(NORMALVERBOSE))
- printf("sntp recvpkt: select() reached timeout (%u sec), aborting.\n",
- (unsigned)timeout_tv.tv_sec);
+ if (!L_ISEQU(&rpkt->org, &spkt->xmt)) {
+ NTOHL_FP(&rpkt->org, &resp_org);
+ NTOHL_FP(&spkt->xmt, &sent_xmt);
+ msyslog(LOG_ERR,
+ "%s response org expected to match sent xmt",
+ stoa(sender));
+ msyslog(LOG_ERR, "resp org: %s", prettydate(&resp_org));
+ msyslog(LOG_ERR, "sent xmt: %s", prettydate(&sent_xmt));
return PACKET_UNUSEABLE;
- break;
- default:
- break;
}
- pkt_len = recvdata(rsock, &sender, (char *)rpkt, rsize);
- if (pkt_len > 0)
- pkt_len = process_pkt(rpkt, &sender, pkt_len, MODE_SERVER, spkt, "recvpkt");
return pkt_len;
}
-
-/*
- * is_reachable - check to see if we have a route to given destination
- */
-int
-is_reachable (
- struct addrinfo *dst
- )
-{
- SOCKET sockfd = socket(dst->ai_family, SOCK_DGRAM, 0);
-
- if (-1 == sockfd) {
-#ifdef DEBUG
- printf("is_reachable: Couldn't create socket\n");
-#endif
- return 0;
- }
- if (connect(sockfd, dst->ai_addr, SOCKLEN((sockaddr_u *)dst->ai_addr))) {
- closesocket(sockfd);
- return 0;
- }
- closesocket(sockfd);
- return 1;
-}
diff --git a/sntp/networking.h b/sntp/networking.h
index 8cb72c44d7a5..3e63891c08c4 100644
--- a/sntp/networking.h
+++ b/sntp/networking.h
@@ -24,14 +24,6 @@
#include "sntp-opts.h"
#include "utilities.h"
-/*
- * for 4.2.6 only define AUTOKEY if OPENSSL, so that backported 4.2.7
- * references to AUTOKEY work -- in 4.2.7 AUTOKEY is independent of OPENSSL
- */
-#ifdef OPENSSL
-#define AUTOKEY
-#endif
-
/* FIXME To be replaced by the constants in ntp.h */
#define SERVER_UNUSEABLE -1 /* Skip server */
#define PACKET_UNUSEABLE -2 /* Discard packet and try to get a useable packet again if not tried too often */
@@ -40,25 +32,14 @@
#define KOD_RATE -5 /* KOD packet with code RATE, reduce poll intervall */
#define BROADCAST_FAILED -6
-
-/* From ntpdate.c */
-int is_reachable (struct addrinfo *dst);
-
-int resolve_hosts (const char **hosts, int hostc, struct addrinfo ***res, int pref_family);
-
-void create_socket (SOCKET *rsock, sockaddr_u *dest);
-
-void sendpkt (SOCKET rsock, sockaddr_u *dest, struct pkt *pkt, int len);
-
-int recvdata (SOCKET rsock, sockaddr_u *sender, char *rdata, int rdata_len);
-
-int recvpkt (SOCKET rsock, struct pkt *rpkt, unsigned int rsize, struct pkt *spkt);
-
-int recv_bcst_data (SOCKET rsock, char *rdata, int rdata_len, sockaddr_u *sas, sockaddr_u *ras);
-
-int recv_bcst_pkt (SOCKET rsock, struct pkt *rpkt, unsigned int rsize, sockaddr_u *sas);
-
-int process_pkt (struct pkt *rpkt, sockaddr_u *sas, int pkt_len, int mode, struct pkt *spkt, char * func_name);
+/* prototypes */
+int sendpkt(SOCKET rsock, sockaddr_u *dest, struct pkt *pkt, int len);
+int recvdata(SOCKET rsock, sockaddr_u *sender, void *rdata,
+ int rdata_len);
+int recvpkt(SOCKET rsock, struct pkt *rpkt, unsigned int rsize,
+ struct pkt *spkt);
+int process_pkt(struct pkt *rpkt, sockaddr_u *sas, int pkt_len,
+ int mode, struct pkt *spkt, const char *func_name);
/* Shortened peer structure. Not absolutely necessary yet */
struct speer {
diff --git a/sntp/scm-rev b/sntp/scm-rev
new file mode 100644
index 000000000000..201b90efb731
--- /dev/null
+++ b/sntp/scm-rev
@@ -0,0 +1 @@
+1.3265
diff --git a/sntp/scripts/Makefile.am b/sntp/scripts/Makefile.am
new file mode 100644
index 000000000000..52406105d3a4
--- /dev/null
+++ b/sntp/scripts/Makefile.am
@@ -0,0 +1,7 @@
+NULL=
+
+EXTRA_DIST = \
+ cvo.sh \
+ genLocInfo \
+ mansec2subst.sed \
+ $(NULL)
diff --git a/sntp/scripts/Makefile.in b/sntp/scripts/Makefile.in
new file mode 100644
index 000000000000..6dccb2d54519
--- /dev/null
+++ b/sntp/scripts/Makefile.in
@@ -0,0 +1,498 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = scripts
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+ $(top_srcdir)/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/libevent/m4/openldap.m4 \
+ $(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/m4/ntp_compiler.m4 \
+ $(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/m4/ntp_googletest.m4 \
+ $(top_srcdir)/m4/ntp_ipv6.m4 $(top_srcdir)/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/m4/ntp_libevent.m4 \
+ $(top_srcdir)/m4/ntp_libntp.m4 \
+ $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/m4/ntp_openssl.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
+ $(top_srcdir)/m4/ntp_sysexits.m4 \
+ $(top_srcdir)/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_SYSLOG = @LIB_SYSLOG@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_FORCE_LIBEVENT_DIST = @NTP_FORCE_LIBEVENT_DIST@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+EXTRA_DIST = \
+ cvo.sh \
+ genLocInfo \
+ mansec2subst.sed \
+ $(NULL)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign scripts/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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
+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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-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/scripts/cvo.sh b/sntp/scripts/cvo.sh
index a8d00ef6cb4f..a8d00ef6cb4f 100755
--- a/scripts/cvo.sh
+++ b/sntp/scripts/cvo.sh
diff --git a/sntp/scripts/genLocInfo b/sntp/scripts/genLocInfo
new file mode 100755
index 000000000000..d761c4c66358
--- /dev/null
+++ b/sntp/scripts/genLocInfo
@@ -0,0 +1,256 @@
+#! /bin/sh
+
+args=`getopt d:f:v $*`
+set -- $args
+
+LF=
+V=": "
+
+for i
+do
+ case "$i" in
+ -d) sdir="$2" ; shift 2 ;;
+ -f) locfile="$2" ; shift 2 ;;
+ -v) V= ; shift ;;
+ --) shift ; break ;;
+ esac
+done
+
+case "$sdir" in
+ '')
+ sdir=.
+esac
+
+case "$locfile" in
+ */*)
+ LF=$locfile
+ ;;
+ '')
+ ;;
+ *)
+ lf=loc/$locfile
+ if test -f $lf
+ then
+ LF=$lf
+ fi
+ ;;
+esac
+
+# If we have a file to use (ie, LF is not empty) then look for one.
+case "$LF" in
+ '')
+ PATH=$PATH:libevent/build-aux
+ export PATH
+ set `scripts/cvo.sh @osname@ @osver@` || exit 1
+
+ CVO_OSNAME=$1
+ CVO_OSVER=$2
+
+ x=$CVO_OSVER
+
+ while true
+ do
+ case "$x" in
+ '') break ;;
+ esac
+lf=loc/$CVO_OSNAME$x
+${V}echo "Looking for <$lf>" >&2
+ if test -f $lf
+ then
+ LF=$lf
+ break
+ fi
+ case "$x" in
+ *.*) x=`echo $x | sed -e 's/\.[^.]*$//'` ;;
+ *) x= ;;
+ esac
+ done
+ case "$LF" in
+ '')
+ lf=loc/$CVO_OSNAME
+${V}echo "Looking for <$lf>" >&2
+ if test -f $lf
+ then
+ LF=$lf
+ fi
+ ;;
+ esac
+ # Handle some "aliases"
+ case "$LF" in
+ '')
+ case "$CVO_OSNAME" in
+ redhat* | fedora*)
+ lf=loc/redhat
+${V}echo "Looking for <$lf>" >&2
+ if test -f $lf
+ then
+ LF=$lf
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
+ # This might be a good place to see if uname returns "Linux",
+ # and if so, use a generic file for that.
+ case "$LF" in
+ '')
+ case "`uname`" in
+ Linux)
+ lf=loc/linux
+${V}echo "Looking for <$lf>" >&2
+ if test -f $lf
+ then
+ LF=$lf
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
+ # Finally, 'legacy'
+ case "$LF" in
+ '')
+ lf=loc/legacy
+${V}echo "Looking for <$lf>" >&2
+ if test -f $lf
+ then
+ LF=$lf
+ fi
+ ;;
+ esac
+
+ case "$LF" in
+ '')
+ echo "No loc/XXX file found!" >&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+${V}echo "Using <$LF>" >&2
+echo "GENLOCINFOFILE=$LF"
+
+###
+
+rm -f $sdir/genLocInfo.rc?
+
+oIFS=$IFS
+IFS=","
+
+while true
+do
+ if read c d s x
+ then
+ # echo "Got <$c><$d><$s><$x>" >&2
+ case "$c" in
+ \#*) continue ;;
+ esac
+ case "$x" in
+ '') ;;
+ *) echo "Unrecognized input: <$c,$d,$s,$x>" >&2
+ touch $sdir/genLocInfo.rc1
+ continue
+ ;;
+ esac
+ case "$c,$d,$s" in
+ [Mm][Aa][Nn],,)
+ echo "MANTAGFMT=man"
+ continue
+ ;;
+ [Mm][Dd][Oo][Cc],,)
+ echo "MANTAGFMT=mdoc"
+ continue
+ ;;
+ esac
+
+ case "$c,$d,$s" in
+ *,bin,*) DB=bin ; DL= ; DS= ; NI= ;;
+ *,libexec,*) DB= ; DL=libexec ; DS= ; NI= ;;
+ *,noinst,*) DB= ; DL= ; DS= ; NI=noinst ;;
+ *,sbin,*) DB= ; DL= ; DS=sbin ; NI= ;;
+ *) echo "Unrecognized input: <$c,$d,$s>" >&2
+ touch $sdir/genLocInfo.rc1
+ continue
+ ;;
+ esac
+ case "$c,$d,$s" in
+ *,*,1) ;;
+ *,*,1m) ;;
+ *,*,1M) ;;
+ *,*,8) ;;
+ *) echo "Unrecognized input: <$c,$d,$s>" >&2
+ touch $sdir/genLocInfo.rc1
+ continue
+ ;;
+ esac
+
+ # Should be OK, mostly...
+ C=`echo $c | sed -e 'y/abcdefghijklmnopqrstuvwxyz-/ABCDEFGHIJKLMNOPQRSTUVWXYZ_/'`
+ # echo "c: <$c>, C: <$C>, DB: <$DB>, DL: <$DL>, DS: <$DS>" >&2
+
+ case "$d" in
+ bin)
+ eval ${C}_DB=$c
+ eval ${C}_DL=
+ eval ${C}_DS=
+ eval ${C}_NI=
+ ;;
+ libexec)
+ eval ${C}_DB=
+ eval ${C}_DL=$c
+ eval ${C}_DS=
+ eval ${C}_NI=
+ ;;
+ noinst)
+ eval ${C}_DB=
+ eval ${C}_DL=
+ eval ${C}_DS=
+ eval ${C}_NI=$c
+ ;;
+ sbin)
+ eval ${C}_DB=
+ eval ${C}_DL=
+ eval ${C}_DS=$c
+ eval ${C}_NI=
+ ;;
+ *) echo "$0: installdir <$d> must be bin, sbin, libexec, or noinst" >&2
+ exit 1
+ ;;
+ esac
+ eval ${C}_MS=$s
+
+ # echo "<$c> gets installed in <$d> with a <$s> manpage suffix" >&2
+ # echo "${C}_DB is <`eval echo '$'${C}_DB`>" >&2
+ # echo "${C}_DL is <`eval echo '$'${C}_DL`>" >&2
+ # echo "${C}_DS is <`eval echo '$'${C}_DS`>" >&2
+ # echo "${C}_NI is <`eval echo '$'${C}_NI`>" >&2
+ # echo "${C}_MS is <`eval echo '$'${C}_MS`>" >&2
+ echo "${C}_DB=`eval echo '$'${C}_DB`"
+ echo "${C}_DL=`eval echo '$'${C}_DL`"
+ echo "${C}_DS=`eval echo '$'${C}_DS`"
+ echo "${C}_NI=`eval echo '$'${C}_NI`"
+ echo "${C}_MS=`eval echo '$'${C}_MS`"
+
+ touch $sdir/genLocInfo.rc0
+ else
+ break
+ fi
+done < $LF
+IFS=$oIFS
+
+if test -f $sdir/genLocInfo.rc1
+then
+ rm $sdir/genLocInfo.rc?
+ exit 1
+fi
+
+if test -f $sdir/genLocInfo.rc0
+then
+ rm $sdir/genLocInfo.rc?
+ echo 'GENLOCINFO=OK'
+ exit 0
+fi
+
+exit 1
diff --git a/sntp/scripts/mansec2subst.sed b/sntp/scripts/mansec2subst.sed
new file mode 100644
index 000000000000..5e8c3e1942c3
--- /dev/null
+++ b/sntp/scripts/mansec2subst.sed
@@ -0,0 +1,28 @@
+s/1ntp-keygenman/@NTP_KEYGEN_MS@/g
+s/1ntp-keygenmdoc/@NTP_KEYGEN_MS@/g
+s/1ntp-waitman/@NTP_WAIT_MS@/g
+s/1ntp-waitmdoc/@NTP_WAIT_MS@/g
+s/1ntpdateman/@NTPDATE_MS@/g
+s/1ntpdatemdoc/@NTPDATE_MS@/g
+s/1ntpdcman/@NTPDC_MS@/g
+s/1ntpdcmdoc/@NTPDC_MS@/g
+s/1ntpdman/@NTPD_MS@/g
+s/1ntpdmdoc/@NTPD_MS@/g
+s/1ntpdsimman/@NTPDSIM_MS@/g
+s/1ntpdsimmdoc/@NTPDSIM_MS@/g
+s/1ntpqman/@NTPQ_MS@/g
+s/1ntpqmdoc/@NTPQ_MS@/g
+s/1ntpsnmpdman/@NTPSNMPD_MS@/g
+s/1ntpsnmpdmdoc/@NTPSNMPD_MS@/g
+s/1ntptimeman/@NTPTIME_MS@/g
+s/1ntptimemdoc/@NTPTIME_MS@/g
+s/1ntptraceman/@NTPTRACE_MS@/g
+s/1ntptracemdoc/@NTPTRACE_MS@/g
+s/1sntpman/@SNTP_MS@/g
+s/1sntpmdoc/@SNTP_MS@/g
+s/1tickadjman/@TICKADJ_MS@/g
+s/1tickadjmdoc/@TICKADJ_MS@/g
+s/1timetrimman/@TIMETRIM_MS@/g
+s/1timetrimmdoc/@TIMETRIM_MS@/g
+s/5man/5/g
+s/5mdoc/5/g
diff --git a/sntp/sntp-opts.c b/sntp/sntp-opts.c
index bc657b84a4bf..9e362d1a90f8 100644
--- a/sntp/sntp-opts.c
+++ b/sntp/sntp-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:33:53 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:51:01 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,241 +15,449 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The sntp program is copyrighted and licensed
+ * under the following terms:
*
- * see html/copyright.html
- *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "sntp-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-
-#define OPTION_CODE_COMPILE 1
-#include "sntp-opts.h"
+#include <errno.h>
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
+#define zCopyright (sntp_opt_strs+0)
+#define zLicenseDescrip (sntp_opt_strs+310)
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[38] =
-"sntp 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
+/*
+ * global included definitions
+ */
+#ifdef __windows
+ extern int atoi(const char*);
+#else
+# include <stdlib.h>
+#endif
#ifndef NULL
# define NULL 0
#endif
-/*
- * Ipv4 option description with
+/**
+ * static const strings for sntp options
+ */
+static char const sntp_opt_strs[2487] =
+/* 0 */ "sntp 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 310 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 950 */ "Force IPv4 DNS name resolution\0"
+/* 981 */ "IPV4\0"
+/* 986 */ "ipv4\0"
+/* 991 */ "Force IPv6 DNS name resolution\0"
+/* 1022 */ "IPV6\0"
+/* 1027 */ "ipv6\0"
+/* 1032 */ "Enable authentication with the key auth-keynumber\0"
+/* 1082 */ "AUTHENTICATION\0"
+/* 1097 */ "authentication\0"
+/* 1112 */ "Listen to the address specified for broadcast time sync\0"
+/* 1168 */ "BROADCAST\0"
+/* 1178 */ "broadcast\0"
+/* 1188 */ "Concurrently query all IPs returned for host-name\0"
+/* 1238 */ "CONCURRENT\0"
+/* 1249 */ "concurrent\0"
+/* 1260 */ "Increase debug verbosity level\0"
+/* 1291 */ "DEBUG_LEVEL\0"
+/* 1303 */ "debug-level\0"
+/* 1315 */ "Set the debug verbosity level\0"
+/* 1345 */ "SET_DEBUG_LEVEL\0"
+/* 1361 */ "set-debug-level\0"
+/* 1377 */ "The gap (in milliseconds) between time requests\0"
+/* 1425 */ "GAP\0"
+/* 1429 */ "gap\0"
+/* 1433 */ "KoD history filename\0"
+/* 1454 */ "KOD\0"
+/* 1458 */ "kod\0"
+/* 1462 */ "/var/db/ntp-kod\0"
+/* 1478 */ "Look in this file for the key specified with -a\0"
+/* 1526 */ "KEYFILE\0"
+/* 1534 */ "keyfile\0"
+/* 1542 */ "Log to specified logfile\0"
+/* 1567 */ "LOGFILE\0"
+/* 1575 */ "logfile\0"
+/* 1583 */ "Adjustments less than steplimit msec will be slewed\0"
+/* 1635 */ "STEPLIMIT\0"
+/* 1645 */ "steplimit\0"
+/* 1655 */ "Send int as our NTP protocol version\0"
+/* 1692 */ "NTPVERSION\0"
+/* 1703 */ "ntpversion\0"
+/* 1714 */ "Use the NTP Reserved Port (port 123)\0"
+/* 1751 */ "USERESERVEDPORT\0"
+/* 1767 */ "usereservedport\0"
+/* 1783 */ "OK to 'step' the time with settimeofday(2)\0"
+/* 1826 */ "STEP\0"
+/* 1831 */ "step\0"
+/* 1836 */ "OK to 'slew' the time with adjtime(2)\0"
+/* 1874 */ "SLEW\0"
+/* 1879 */ "slew\0"
+/* 1884 */ "The number of seconds to wait for responses\0"
+/* 1928 */ "TIMEOUT\0"
+/* 1936 */ "timeout\0"
+/* 1944 */ "Wait for pending replies (if not setting the time)\0"
+/* 1995 */ "WAIT\0"
+/* 2000 */ "no-wait\0"
+/* 2008 */ "no\0"
+/* 2011 */ "display extended usage information and exit\0"
+/* 2055 */ "help\0"
+/* 2060 */ "extended usage information passed thru pager\0"
+/* 2105 */ "more-help\0"
+/* 2115 */ "output version information and exit\0"
+/* 2151 */ "version\0"
+/* 2159 */ "save the option state to a config file\0"
+/* 2198 */ "save-opts\0"
+/* 2208 */ "load options from a config file\0"
+/* 2240 */ "LOAD_OPTS\0"
+/* 2250 */ "no-load-opts\0"
+/* 2263 */ "SNTP\0"
+/* 2268 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
+ "\t\t[ hostname-or-IP ...]\n\0"
+/* 2425 */ "$HOME\0"
+/* 2431 */ ".\0"
+/* 2433 */ ".ntprc\0"
+/* 2440 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2474 */ "\n\0"
+/* 2476 */ "sntp 4.2.8";
+
+/**
+ * ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv4Text[] =
- "Force IPv4 DNS name resolution";
-static char const zIpv4_NAME[] = "IPV4";
-static char const zIpv4_Name[] = "ipv4";
-static const int
- aIpv4CantList[] = {
+/** Descriptive text for the ipv4 option */
+#define IPV4_DESC (sntp_opt_strs+950)
+/** Upper-cased name for the ipv4 option */
+#define IPV4_NAME (sntp_opt_strs+981)
+/** Name string for the ipv4 option */
+#define IPV4_name (sntp_opt_strs+986)
+/** Other options that appear in conjunction with the ipv4 option */
+static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
-#define IPV4_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv4 option */
+#define IPV4_FLAGS (OPTST_DISABLED)
-/*
- * Ipv6 option description with
+/**
+ * ipv6 option description with
* "Must also have options" and "Incompatible options":
*/
-static char const zIpv6Text[] =
- "Force IPv6 DNS name resolution";
-static char const zIpv6_NAME[] = "IPV6";
-static char const zIpv6_Name[] = "ipv6";
-static const int
- aIpv6CantList[] = {
+/** Descriptive text for the ipv6 option */
+#define IPV6_DESC (sntp_opt_strs+991)
+/** Upper-cased name for the ipv6 option */
+#define IPV6_NAME (sntp_opt_strs+1022)
+/** Name string for the ipv6 option */
+#define IPV6_name (sntp_opt_strs+1027)
+/** Other options that appear in conjunction with the ipv6 option */
+static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
-#define IPV6_FLAGS (OPTST_DISABLED)
+/** Compiled in flag settings for the ipv6 option */
+#define IPV6_FLAGS (OPTST_DISABLED)
-/*
- * Normalverbose option description:
+/**
+ * authentication option description:
*/
-static char const zNormalverboseText[] =
- "Normal verbose";
-static char const zNormalverbose_NAME[] = "NORMALVERBOSE";
-static char const zNormalverbose_Name[] = "normalverbose";
-#define NORMALVERBOSE_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the authentication option */
+#define AUTHENTICATION_DESC (sntp_opt_strs+1032)
+/** Upper-cased name for the authentication option */
+#define AUTHENTICATION_NAME (sntp_opt_strs+1082)
+/** Name string for the authentication option */
+#define AUTHENTICATION_name (sntp_opt_strs+1097)
+/** Compiled in flag settings for the authentication option */
+#define AUTHENTICATION_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Kod option description:
+/**
+ * broadcast option description:
*/
-static char const zKodText[] =
- "KoD history filename";
-static char const zKod_NAME[] = "KOD";
-static char const zKod_Name[] = "kod";
-#define KOD_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the broadcast option */
+#define BROADCAST_DESC (sntp_opt_strs+1112)
+/** Upper-cased name for the broadcast option */
+#define BROADCAST_NAME (sntp_opt_strs+1168)
+/** Name string for the broadcast option */
+#define BROADCAST_name (sntp_opt_strs+1178)
+/** Compiled in flag settings for the broadcast option */
+#define BROADCAST_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Syslog option description with
- * "Must also have options" and "Incompatible options":
- */
-static char const zSyslogText[] =
- "Logging with syslog";
-static char const zSyslog_NAME[] = "SYSLOG";
-static char const zSyslog_Name[] = "syslog";
-static const int
- aSyslogCantList[] = {
- INDEX_OPT_LOGFILE, NO_EQUIVALENT };
-#define SYSLOG_FLAGS (OPTST_DISABLED)
-
-/*
- * Logfile option description with
- * "Must also have options" and "Incompatible options":
+/**
+ * concurrent option description:
*/
-static char const zLogfileText[] =
- "Log to specified logfile";
-static char const zLogfile_NAME[] = "LOGFILE";
-static char const zLogfile_Name[] = "logfile";
-static const int
- aLogfileCantList[] = {
- INDEX_OPT_SYSLOG, NO_EQUIVALENT };
-#define LOGFILE_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the concurrent option */
+#define CONCURRENT_DESC (sntp_opt_strs+1188)
+/** Upper-cased name for the concurrent option */
+#define CONCURRENT_NAME (sntp_opt_strs+1238)
+/** Name string for the concurrent option */
+#define CONCURRENT_name (sntp_opt_strs+1249)
+/** Compiled in flag settings for the concurrent option */
+#define CONCURRENT_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Settod option description with
- * "Must also have options" and "Incompatible options":
+/**
+ * debug-level option description:
+ */
+/** Descriptive text for the debug-level option */
+#define DEBUG_LEVEL_DESC (sntp_opt_strs+1260)
+/** Upper-cased name for the debug-level option */
+#define DEBUG_LEVEL_NAME (sntp_opt_strs+1291)
+/** Name string for the debug-level option */
+#define DEBUG_LEVEL_name (sntp_opt_strs+1303)
+/** Compiled in flag settings for the debug-level option */
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/**
+ * set-debug-level option description:
*/
-static char const zSettodText[] =
- "Set (step) the time with settimeofday()";
-static char const zSettod_NAME[] = "SETTOD";
-static char const zSettod_Name[] = "settod";
-static const int
- aSettodCantList[] = {
- INDEX_OPT_ADJTIME, NO_EQUIVALENT };
-#define SETTOD_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the set-debug-level option */
+#define SET_DEBUG_LEVEL_DESC (sntp_opt_strs+1315)
+/** Upper-cased name for the set-debug-level option */
+#define SET_DEBUG_LEVEL_NAME (sntp_opt_strs+1345)
+/** Name string for the set-debug-level option */
+#define SET_DEBUG_LEVEL_name (sntp_opt_strs+1361)
+/** Compiled in flag settings for the set-debug-level option */
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Adjtime option description with
- * "Must also have options" and "Incompatible options":
+/**
+ * gap option description:
*/
-static char const zAdjtimeText[] =
- "Set (slew) the time with adjtime()";
-static char const zAdjtime_NAME[] = "ADJTIME";
-static char const zAdjtime_Name[] = "adjtime";
-static const int
- aAdjtimeCantList[] = {
- INDEX_OPT_SETTOD, NO_EQUIVALENT };
-#define ADJTIME_FLAGS (OPTST_DISABLED)
+/** Descriptive text for the gap option */
+#define GAP_DESC (sntp_opt_strs+1377)
+/** Upper-cased name for the gap option */
+#define GAP_NAME (sntp_opt_strs+1425)
+/** Name string for the gap option */
+#define GAP_name (sntp_opt_strs+1429)
+/** The compiled in default value for the gap option argument */
+#define GAP_DFT_ARG ((char const*)50)
+/** Compiled in flag settings for the gap option */
+#define GAP_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Broadcast option description:
+/**
+ * kod option description:
*/
-static char const zBroadcastText[] =
- "Use broadcasts to the address specified for synchronisation";
-static char const zBroadcast_NAME[] = "BROADCAST";
-static char const zBroadcast_Name[] = "broadcast";
-#define BROADCAST_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+/** Descriptive text for the kod option */
+#define KOD_DESC (sntp_opt_strs+1433)
+/** Upper-cased name for the kod option */
+#define KOD_NAME (sntp_opt_strs+1454)
+/** Name string for the kod option */
+#define KOD_name (sntp_opt_strs+1458)
+/** The compiled in default value for the kod option argument */
+#define KOD_DFT_ARG (sntp_opt_strs+1462)
+/** Compiled in flag settings for the kod option */
+#define KOD_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/**
+ * keyfile option description:
+ */
+/** Descriptive text for the keyfile option */
+#define KEYFILE_DESC (sntp_opt_strs+1478)
+/** Upper-cased name for the keyfile option */
+#define KEYFILE_NAME (sntp_opt_strs+1526)
+/** Name string for the keyfile option */
+#define KEYFILE_name (sntp_opt_strs+1534)
+/** Compiled in flag settings for the keyfile option */
+#define KEYFILE_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/**
+ * logfile option description:
+ */
+/** Descriptive text for the logfile option */
+#define LOGFILE_DESC (sntp_opt_strs+1542)
+/** Upper-cased name for the logfile option */
+#define LOGFILE_NAME (sntp_opt_strs+1567)
+/** Name string for the logfile option */
+#define LOGFILE_name (sntp_opt_strs+1575)
+/** Compiled in flag settings for the logfile option */
+#define LOGFILE_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/**
+ * steplimit option description:
+ */
+/** Descriptive text for the steplimit option */
+#define STEPLIMIT_DESC (sntp_opt_strs+1583)
+/** Upper-cased name for the steplimit option */
+#define STEPLIMIT_NAME (sntp_opt_strs+1635)
+/** Name string for the steplimit option */
+#define STEPLIMIT_name (sntp_opt_strs+1645)
+/** Compiled in flag settings for the steplimit option */
+#define STEPLIMIT_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Timeout option description:
- */
-static char const zTimeoutText[] =
- "Specify the number of seconds to wait for broadcasts";
-static char const zTimeout_NAME[] = "TIMEOUT";
-static char const zTimeout_Name[] = "timeout";
-#define zTimeoutDefaultArg ((char const*)68)
-#define TIMEOUT_FLAGS (OPTST_DISABLED \
+/**
+ * ntpversion option description:
+ */
+/** Descriptive text for the ntpversion option */
+#define NTPVERSION_DESC (sntp_opt_strs+1655)
+/** Upper-cased name for the ntpversion option */
+#define NTPVERSION_NAME (sntp_opt_strs+1692)
+/** Name string for the ntpversion option */
+#define NTPVERSION_name (sntp_opt_strs+1703)
+/** The compiled in default value for the ntpversion option argument */
+#define NTPVERSION_DFT_ARG ((char const*)4)
+/** Compiled in flag settings for the ntpversion option */
+#define NTPVERSION_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Authentication option description:
+/**
+ * usereservedport option description:
+ */
+/** Descriptive text for the usereservedport option */
+#define USERESERVEDPORT_DESC (sntp_opt_strs+1714)
+/** Upper-cased name for the usereservedport option */
+#define USERESERVEDPORT_NAME (sntp_opt_strs+1751)
+/** Name string for the usereservedport option */
+#define USERESERVEDPORT_name (sntp_opt_strs+1767)
+/** Compiled in flag settings for the usereservedport option */
+#define USERESERVEDPORT_FLAGS (OPTST_DISABLED)
+
+/**
+ * step option description:
+ */
+/** Descriptive text for the step option */
+#define STEP_DESC (sntp_opt_strs+1783)
+/** Upper-cased name for the step option */
+#define STEP_NAME (sntp_opt_strs+1826)
+/** Name string for the step option */
+#define STEP_name (sntp_opt_strs+1831)
+/** Compiled in flag settings for the step option */
+#define STEP_FLAGS (OPTST_DISABLED)
+
+/**
+ * slew option description:
*/
-static char const zAuthenticationText[] =
- "Enable authentication with the key auth-keynumber";
-static char const zAuthentication_NAME[] = "AUTHENTICATION";
-static char const zAuthentication_Name[] = "authentication";
-#define AUTHENTICATION_FLAGS (OPTST_DISABLED \
+/** Descriptive text for the slew option */
+#define SLEW_DESC (sntp_opt_strs+1836)
+/** Upper-cased name for the slew option */
+#define SLEW_NAME (sntp_opt_strs+1874)
+/** Name string for the slew option */
+#define SLEW_name (sntp_opt_strs+1879)
+/** Compiled in flag settings for the slew option */
+#define SLEW_FLAGS (OPTST_DISABLED)
+
+/**
+ * timeout option description:
+ */
+/** Descriptive text for the timeout option */
+#define TIMEOUT_DESC (sntp_opt_strs+1884)
+/** Upper-cased name for the timeout option */
+#define TIMEOUT_NAME (sntp_opt_strs+1928)
+/** Name string for the timeout option */
+#define TIMEOUT_name (sntp_opt_strs+1936)
+/** The compiled in default value for the timeout option argument */
+#define TIMEOUT_DFT_ARG ((char const*)5)
+/** Compiled in flag settings for the timeout option */
+#define TIMEOUT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Keyfile option description:
+/**
+ * wait option description:
*/
-static char const zKeyfileText[] =
- "Specify a keyfile. SNTP will look in this file for the key specified with -a";
-static char const zKeyfile_NAME[] = "KEYFILE";
-static char const zKeyfile_Name[] = "keyfile";
-#define KEYFILE_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+/** Descriptive text for the wait option */
+#define WAIT_DESC (sntp_opt_strs+1944)
+/** Upper-cased name for the wait option */
+#define WAIT_NAME (sntp_opt_strs+1995)
+/** disablement name for the wait option */
+#define NOT_WAIT_name (sntp_opt_strs+2000)
+/** disablement prefix for the wait option */
+#define NOT_WAIT_PFX (sntp_opt_strs+2008)
+/** Name string for the wait option */
+#define WAIT_name (NOT_WAIT_name + 3)
+/** Compiled in flag settings for the wait option */
+#define WAIT_FLAGS (OPTST_INITENABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (sntp_opt_strs+2011)
+#define HELP_name (sntp_opt_strs+2055)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (sntp_opt_strs+2060)
+#define MORE_HELP_name (sntp_opt_strs+2105)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-static char const zSave_OptsText[] = "Save the option state to a config file";
-static char const zSave_Opts_Name[] = "save-opts";
-static char const zLoad_OptsText[] = "Load options from a config file";
-static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
-static char const zNotLoad_Opts_Name[] = "no-load-opts";
-static char const zNotLoad_Opts_Pfx[] = "no";
-#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
-/*
+#define VER_DESC (sntp_opt_strs+2115)
+#define VER_name (sntp_opt_strs+2151)
+#define SAVE_OPTS_DESC (sntp_opt_strs+2159)
+#define SAVE_OPTS_name (sntp_opt_strs+2198)
+#define LOAD_OPTS_DESC (sntp_opt_strs+2208)
+#define LOAD_OPTS_NAME (sntp_opt_strs+2240)
+#define NO_LOAD_OPTS_name (sntp_opt_strs+2250)
+#define LOAD_OPTS_pfx (sntp_opt_strs+2008)
+#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
+/**
* Declare option callback procedures
*/
-#if defined(TEST_SNTP_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-static tOptProc
- doUsageOpt;
-
-#else /* NOT defined TEST_SNTP_OPTS */
-/*
- * When not under test, there are different procs to use
- */
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ ntpOptionPrintVersion, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
- doUsageOpt;
-#endif /* defined(TEST_SNTP_OPTS) */
-#ifdef TEST_SNTP_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_SNTP_OPTS */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Sntp Option Descriptions.
+ doOptDebug_Level, doOptKeyfile, doOptKod, doOptLogfile,
+ doOptNtpversion, doOptSteplimit, doUsageOpt;
+#define VER_PROC ntpOptionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the sntp Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the sntp program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
{ /* entry idx, value */ 0, VALUE_OPT_IPV4,
@@ -257,11 +465,11 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV4_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv4 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv4CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
+ /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 1, VALUE_OPT_IPV6,
@@ -269,224 +477,292 @@ static tOptDesc optDesc[OPTION_CT] = {
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IPV6_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --ipv6 */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, aIpv6CantList,
/* option proc */ NULL,
- /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
+ /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 2, VALUE_OPT_NORMALVERBOSE,
- /* equiv idx, value */ 2, VALUE_OPT_NORMALVERBOSE,
+ { /* entry idx, value */ 2, VALUE_OPT_AUTHENTICATION,
+ /* equiv idx, value */ 2, VALUE_OPT_AUTHENTICATION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ NORMALVERBOSE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ AUTHENTICATION_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --authentication */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ zNormalverboseText, zNormalverbose_NAME, zNormalverbose_Name,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ AUTHENTICATION_DESC, AUTHENTICATION_NAME, AUTHENTICATION_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 3, VALUE_OPT_KOD,
- /* equiv idx, value */ 3, VALUE_OPT_KOD,
+ { /* entry idx, value */ 3, VALUE_OPT_BROADCAST,
+ /* equiv idx, value */ 3, VALUE_OPT_BROADCAST,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ BROADCAST_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --broadcast */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionStackArg,
+ /* desc, NAME, name */ BROADCAST_DESC, BROADCAST_NAME, BROADCAST_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 4, VALUE_OPT_CONCURRENT,
+ /* equiv idx, value */ 4, VALUE_OPT_CONCURRENT,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ CONCURRENT_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --concurrent */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionStackArg,
+ /* desc, NAME, name */ CONCURRENT_DESC, CONCURRENT_NAME, CONCURRENT_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
+ /* equiv idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --debug-level */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptDebug_Level,
+ /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equiv idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
+ /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --set-debug-level */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 7, VALUE_OPT_GAP,
+ /* equiv idx, value */ 7, VALUE_OPT_GAP,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ GAP_FLAGS, 0,
+ /* last opt argumnt */ { GAP_DFT_ARG },
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ GAP_DESC, GAP_NAME, GAP_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 8, VALUE_OPT_KOD,
+ /* equiv idx, value */ 8, VALUE_OPT_KOD,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KOD_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { KOD_DFT_ARG },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ zKodText, zKod_NAME, zKod_Name,
+ /* option proc */ doOptKod,
+ /* desc, NAME, name */ KOD_DESC, KOD_NAME, KOD_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 4, VALUE_OPT_SYSLOG,
- /* equiv idx, value */ 4, VALUE_OPT_SYSLOG,
+ { /* entry idx, value */ 9, VALUE_OPT_KEYFILE,
+ /* equiv idx, value */ 9, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ SYSLOG_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ KEYFILE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --keyfile */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aSyslogCantList,
- /* option proc */ NULL,
- /* desc, NAME, name */ zSyslogText, zSyslog_NAME, zSyslog_Name,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptKeyfile,
+ /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_LOGFILE,
- /* equiv idx, value */ 5, VALUE_OPT_LOGFILE,
+ { /* entry idx, value */ 10, VALUE_OPT_LOGFILE,
+ /* equiv idx, value */ 10, VALUE_OPT_LOGFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --logfile */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aLogfileCantList,
- /* option proc */ NULL,
- /* desc, NAME, name */ zLogfileText, zLogfile_NAME, zLogfile_Name,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptLogfile,
+ /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 6, VALUE_OPT_SETTOD,
- /* equiv idx, value */ 6, VALUE_OPT_SETTOD,
+ { /* entry idx, value */ 11, VALUE_OPT_STEPLIMIT,
+ /* equiv idx, value */ 11, VALUE_OPT_STEPLIMIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ SETTOD_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ STEPLIMIT_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --steplimit */
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aSettodCantList,
- /* option proc */ NULL,
- /* desc, NAME, name */ zSettodText, zSettod_NAME, zSettod_Name,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptSteplimit,
+ /* desc, NAME, name */ STEPLIMIT_DESC, STEPLIMIT_NAME, STEPLIMIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_ADJTIME,
- /* equiv idx, value */ 7, VALUE_OPT_ADJTIME,
+ { /* entry idx, value */ 12, VALUE_OPT_NTPVERSION,
+ /* equiv idx, value */ 12, VALUE_OPT_NTPVERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ ADJTIME_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ NTPVERSION_FLAGS, 0,
+ /* last opt argumnt */ { NTPVERSION_DFT_ARG },
/* arg list/cookie */ NULL,
- /* must/cannot opts */ NULL, aAdjtimeCantList,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptNtpversion,
+ /* desc, NAME, name */ NTPVERSION_DESC, NTPVERSION_NAME, NTPVERSION_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
+ /* equiv idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ USERESERVEDPORT_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --usereservedport */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zAdjtimeText, zAdjtime_NAME, zAdjtime_Name,
+ /* desc, NAME, name */ USERESERVEDPORT_DESC, USERESERVEDPORT_NAME, USERESERVEDPORT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_BROADCAST,
- /* equiv idx, value */ 8, VALUE_OPT_BROADCAST,
+ { /* entry idx, value */ 14, VALUE_OPT_STEP,
+ /* equiv idx, value */ 14, VALUE_OPT_STEP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ BROADCAST_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ STEP_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --step */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zBroadcastText, zBroadcast_NAME, zBroadcast_Name,
+ /* desc, NAME, name */ STEP_DESC, STEP_NAME, STEP_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 9, VALUE_OPT_TIMEOUT,
- /* equiv idx, value */ 9, VALUE_OPT_TIMEOUT,
+ { /* entry idx, value */ 15, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 15, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ TIMEOUT_FLAGS, 0,
- /* last opt argumnt */ { zTimeoutDefaultArg },
+ /* opt state flags */ SLEW_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --slew */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ optionNumericVal,
- /* desc, NAME, name */ zTimeoutText, zTimeout_NAME, zTimeout_Name,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_AUTHENTICATION,
- /* equiv idx, value */ 10, VALUE_OPT_AUTHENTICATION,
+ { /* entry idx, value */ 16, VALUE_OPT_TIMEOUT,
+ /* equiv idx, value */ 16, VALUE_OPT_TIMEOUT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ AUTHENTICATION_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ TIMEOUT_FLAGS, 0,
+ /* last opt argumnt */ { TIMEOUT_DFT_ARG },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionNumericVal,
- /* desc, NAME, name */ zAuthenticationText, zAuthentication_NAME, zAuthentication_Name,
+ /* desc, NAME, name */ TIMEOUT_DESC, TIMEOUT_NAME, TIMEOUT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_KEYFILE,
- /* equiv idx, value */ 11, VALUE_OPT_KEYFILE,
+ { /* entry idx, value */ 17, VALUE_OPT_WAIT,
+ /* equiv idx, value */ 17, VALUE_OPT_WAIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ KEYFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ WAIT_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --wait */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zKeyfileText, zKeyfile_NAME, zKeyfile_Name,
- /* disablement strs */ NULL, NULL },
+ /* desc, NAME, name */ WAIT_DESC, WAIT_NAME, WAIT_name,
+ /* disablement strs */ NOT_WAIT_name, NOT_WAIT_PFX },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
+ | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
+ /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_DISABLE_IMM, 0,
+ | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionLoadOpt,
- /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
- /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
+ /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
+ /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Sntp Option Environment
- */
-static char const zPROGNAME[5] = "SNTP";
-static char const zUsageTitle[152] =
-"sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
-\t\t[ hostname-or-IP ...]\n";
-static char const zRcName[7] = ".ntprc";
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of sntp. */
+#define zPROGNAME (sntp_opt_strs+2263)
+/** Reference to the title line for sntp usage. */
+#define zUsageTitle (sntp_opt_strs+2268)
+/** sntp configuration file name. */
+#define zRcName (sntp_opt_strs+2433)
+/** Directories to search for sntp config files. */
static char const * const apzHomeList[3] = {
- "$HOME",
- ".",
+ sntp_opt_strs+2425,
+ sntp_opt_strs+2431,
NULL };
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-static char const zExplain[] = "\n\n";
-static char const zDetail[352] = "\n\
-sntp implements the Simple Network Time Protocol, and is used to query an\n\
-NTP or SNTP server and either display the time or set the local system's\n\
-time (given suitable privilege).\n\n\
-It can be run interactively from the command line or as a cron job.\n\n\
-NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC\n\
-1305.\n";
-static char const zFullVersion[] = SNTP_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+/** The sntp program bug email address. */
+#define zBugsAddr (sntp_opt_strs+2440)
+/** Clarification/explanation of what sntp does. */
+#define zExplain (sntp_opt_strs+2474)
+/** Extra detail explaining what sntp does. */
+#define zDetail (NULL)
+/** The full version string for sntp. */
+#define zFullVersion (sntp_opt_strs+2476)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -496,16 +772,222 @@ static char const zFullVersion[] = SNTP_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define sntp_full_usage (NULL)
+#define sntp_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = SNTP_EXIT_SUCCESS;
+ optionUsage(&sntpOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
-#define sntp_full_usage NULL
-#define sntp_short_usage NULL
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug-level option.
+ *
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /*
+ * Be sure the flag-code[0] handles special values for the options pointer
+ * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
+ * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
+ * reset its state.
+ */
+ /* extracted from debug-opt.def, line 15 */
+OPT_VALUE_SET_DEBUG_LEVEL++;
+ (void)pOptDesc;
+ (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the kod option.
+ * Specifies the filename to be used for the persistent history of KoD
+ * responses received from servers. If the file does not exist, a
+ * warning message will be displayed. The file will not be created.
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptKod(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static teOptFileType const type =
+ FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+ static tuFileMode mode;
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+ mode.file_flags = O_CLOEXEC;
+
+ /*
+ * This function handles special invalid values for "pOptions"
+ */
+ optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the keyfile option.
+ * This option specifies the keyfile.
+ * @code{sntp} will search for the key specified with @option{-a}
+ * @file{keyno} in this file. See @command{ntp.keys(5)} for more
+ * information.
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptKeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static teOptFileType const type =
+ FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+ static tuFileMode mode;
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+ mode.file_flags = O_CLOEXEC;
+
+ /*
+ * This function handles special invalid values for "pOptions"
+ */
+ optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the logfile option.
+ * This option causes the client to write log messages to the specified
+ * @file{logfile}.
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLogfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static teOptFileType const type =
+ FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
+ static tuFileMode mode;
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+ mode.file_flags = O_CLOEXEC;
+
+ /*
+ * This function handles special invalid values for "pOptions"
+ */
+ optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the steplimit option.
+ * If the time adjustment is less than @file{steplimit} milliseconds,
+ * slew the amount using @command{adjtime(2)}. Otherwise, step the
+ * correction using @command{settimeofday(2)}.
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptSteplimit(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static struct {long rmin, rmax;} const rng[1] = {
+ { 0, LONG_MAX } };
+ int ix;
+
+ if (pOptions <= OPTPROC_EMIT_LIMIT)
+ goto emit_ranges;
+ optionNumericVal(pOptions, pOptDesc);
+
+ for (ix = 0; ix < 1; ix++) {
+ if (pOptDesc->optArg.argInt < rng[ix].rmin)
+ continue; /* ranges need not be ordered. */
+ if (pOptDesc->optArg.argInt == rng[ix].rmin)
+ return;
+ if (rng[ix].rmax == LONG_MIN)
+ continue;
+ if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+ return;
+ }
+
+ option_usage_fp = stderr;
+
+ emit_ranges:
+ optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the ntpversion option.
+ * When sending requests to a remote server, tell them we are running
+ * NTP protocol version @file{ntpversion} .
+ * @param[in] pOptions the sntp options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptNtpversion(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static struct {long rmin, rmax;} const rng[1] = {
+ { 0, 7 } };
+ int ix;
+
+ if (pOptions <= OPTPROC_EMIT_LIMIT)
+ goto emit_ranges;
+ optionNumericVal(pOptions, pOptDesc);
+
+ for (ix = 0; ix < 1; ix++) {
+ if (pOptDesc->optArg.argInt < rng[ix].rmin)
+ continue; /* ranges need not be ordered. */
+ if (pOptDesc->optArg.argInt == rng[ix].rmin)
+ return;
+ if (rng[ix].rmax == LONG_MIN)
+ continue;
+ if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+ return;
+ }
+
+ option_usage_fp = stderr;
+
+ emit_ranges:
+ optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+/* extracted from optmain.tlib near line 1245 */
+
+/**
+ * The directory containing the data associated with sntp.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged sntp
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define sntp_packager_info NULL
#else
+/** Packager information for sntp. */
static char const sntp_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -518,7 +1000,13 @@ static char const sntp_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for sntp. The one structure that
+ * binds them all.
+ */
tOptions sntpOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -527,6 +1015,7 @@ tOptions sntpOptions = {
+ OPTPROC_SHORTOPT
+ OPTPROC_LONGOPT
+ OPTPROC_NO_REQ_OPT
+ + OPTPROC_NEGATIONS
+ OPTPROC_ENVIRON
+ OPTPROC_MISUSE ),
0, NULL, /* current option index, current option */
@@ -546,126 +1035,538 @@ tOptions sntpOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 17 /* full option count */, 12 /* user option count */,
+ 23 /* full option count */, 18 /* user option count */,
sntp_full_usage, sntp_short_usage,
NULL, NULL,
PKGDATADIR, sntp_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(SNTP_EXIT_SUCCESS);
-}
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_SNTP_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = SNTP_EXIT_SUCCESS;
- (void)optionProcess(&sntpOptions, argc, argv);
- optionPutShell(&sntpOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_SNTP_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * sntp program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(SNTP_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the sntpOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &sntpOptions;
+ tOptions * const opts = &sntpOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- sntpOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the sntpOptions structure noted in the
+ comments below. The literal text is defined in sntp_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ sntp_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via sntpOptions.pzCopyright */
+ puts(_("sntp 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via sntpOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Force IPv4 DNS name resolution"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Force IPv6 DNS name resolution"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Enable authentication with the key auth-keynumber"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Listen to the address specified for broadcast time sync"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Concurrently query all IPs returned for host-name"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Increase debug verbosity level"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Set the debug verbosity level"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("The gap (in milliseconds) between time requests"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("KoD history filename"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Look in this file for the key specified with -a"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Log to specified logfile"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Adjustments less than steplimit msec will be slewed"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Send int as our NTP protocol version"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Use the NTP Reserved Port (port 123)"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("OK to 'step' the time with settimeofday(2)"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("OK to 'slew' the time with adjtime(2)"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("The number of seconds to wait for responses"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("Wait for pending replies (if not setting the time)"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("save the option state to a config file"));
+
+ /* referenced via sntpOptions.pOptDesc->pzText */
+ puts(_("load options from a config file"));
+
+ /* referenced via sntpOptions.pzUsageTitle */
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
+\t\t[ hostname-or-IP ...]\n"));
+
+ /* referenced via sntpOptions.pzExplain */
+ puts(_("\n"));
+
+ /* referenced via sntpOptions.pzFullVersion */
+ puts(_("sntp 4.2.8"));
+
+ /* referenced via sntpOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via sntpOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/sntp/sntp-opts.def b/sntp/sntp-opts.def
index 4a625413c8f8..c32f5e51e47b 100644
--- a/sntp/sntp-opts.def
+++ b/sntp/sntp-opts.def
@@ -6,269 +6,315 @@ autogen definitions options;
#include copyright.def
prog-name = "sntp";
-prog-title = "standard Simple Network Time Protocol program";
+prog-title = "standard Simple Network Time Protocol client program";
argument = '[ hostname-or-IP ...]';
#include homerc.def
long-opts;
-config-header = "config.h";
+config-header = "config.h";
environrc;
#include version.def
-test-main;
-
flag = {
- name = ipv4;
- value = 4;
- flags-cant = ipv6;
- descrip = "Force IPv4 DNS name resolution";
- doc = <<- _EndOfDoc_
+ name = ipv4;
+ value = 4;
+ flags-cant = ipv6;
+ descrip = "Force IPv4 DNS name resolution";
+ doc = <<- _EndOfDoc_
Force DNS resolution of the following host names on the command line
to the IPv4 namespace.
_EndOfDoc_;
};
flag = {
- name = ipv6;
- value = 6;
- flags-cant = ipv4;
- descrip = "Force IPv6 DNS name resolution";
- doc = <<- _EndOfDoc_
+ name = ipv6;
+ value = 6;
+ flags-cant = ipv4;
+ descrip = "Force IPv6 DNS name resolution";
+ doc = <<- _EndOfDoc_
Force DNS resolution of the following host names on the command line
to the IPv6 namespace.
_EndOfDoc_;
};
+flag = {
+ name = authentication;
+ value = a;
+ descrip = "Enable authentication with the key @var{auth-keynumber}";
+ arg-type = number;
+ arg-name = "auth-keynumber";
+ doc = <<- _EndOfDoc_
+ Enable authentication using the key specified in this option's
+ argument. The argument of this option is the @option{keyid}, a
+ number specified in the @option{keyfile} as this key's identifier.
+ See the @option{keyfile} option (@option{-k}) for more details.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = broadcast;
+ value = b;
+ descrip = "Listen to the address specified for broadcast time sync";
+ arg-type = string;
+ arg-name = "broadcast-address";
+ max = NOLIMIT;
+ stack-arg;
+ doc = <<- _EndOfDoc_
+ If specified @code{sntp} will listen to the specified address
+ for NTP broadcasts. The default maximum wait time
+ can (and probably should) be modified with @option{-t}.
+ _EndOfDoc_;
+};
flag = {
- name = normalverbose;
- value = d;
- descrip = "Normal verbose";
- doc = <<- _EndOfDoc_
- Diagnostic messages for non-fatal errors and a limited amount of
- tracing should be written to standard error. Fatal ones always
- produce a diagnostic. This option should be set when there is a
- suspected problem with the server, network or the source.
+ name = concurrent;
+ value = c;
+ descrip = "Concurrently query all IPs returned for host-name";
+ arg-type = string;
+ arg-name = "host-name";
+ max = NOLIMIT;
+ stack-arg;
+ doc = <<- _EndOfDoc_
+ Requests from an NTP "client" to a "server" should never be sent
+ more rapidly than one every 2 seconds. By default, any IPs returned
+ as part of a DNS lookup are assumed to be for a single instance of
+ @code{ntpd}, and therefore @code{sntp} will send queries to these IPs
+ one after another, with a 2-second gap in between each query.
+
+ The @option{-c} or @option{--concurrent} flag says that any IPs
+ returned for the DNS lookup of the supplied host-name are on
+ different machines, so we can send concurrent queries.
_EndOfDoc_;
};
+#include debug-opt.def
+
flag = {
- name = kod;
- value = K;
- arg-type = string;
- arg-name = "file-name";
- descrip = "KoD history filename";
- doc = <<- _EndOfDoc_
- Specifies the filename to be used to persist the history of KoD
- responses received from servers. The default is
- /var/db/ntp-kod.
+ name = gap;
+ value = g;
+ descrip = "The gap (in milliseconds) between time requests";
+ arg-type = number;
+ arg-name = "milliseconds";
+ arg-default = 50;
+ doc = <<- _EndOfDoc_
+ Since we're only going to use the first valid response we get and
+ there is benefit to specifying a good number of servers to query,
+ separate the queries we send out by the specified number of
+ milliseconds.
_EndOfDoc_;
};
+flag = {
+ name = kod;
+ value = K;
+ arg-type = file;
+ arg-name = "file-name";
+ arg-default = "/var/db/ntp-kod";
+ descrip = "KoD history filename";
+ doc = <<- _EndOfDoc_
+ Specifies the filename to be used for the persistent history of KoD
+ responses received from servers. If the file does not exist, a
+ warning message will be displayed. The file will not be created.
+ _EndOfDoc_;
+};
flag = {
- name = syslog;
- value = p;
- flags-cant = logfile;
- descrip = "Logging with syslog";
- doc = <<- _EndOfDoc_
- When this option is set all logging will be done using syslog.
+ name = keyfile;
+ value = k;
+ descrip = "Look in this file for the key specified with @option{-a}";
+ arg-type = file;
+ arg-name = "file-name";
+ doc = <<- _EndOfDoc_
+ This option specifies the keyfile.
+ @code{sntp} will search for the key specified with @option{-a}
+ @file{keyno} in this file. See @command{ntp.keys(5)} for more
+ information.
_EndOfDoc_;
};
flag = {
- name = logfile;
- value = l;
- arg-type = string;
- arg-name = "file-name";
- flags-cant = syslog;
- descrip = "Log to specified logfile";
- doc = <<- _EndOfDoc_
+ name = logfile;
+ value = l;
+ arg-type = file;
+ arg-name = "file-name";
+ descrip = "Log to specified logfile";
+ doc = <<- _EndOfDoc_
This option causes the client to write log messages to the specified
- logfile.
+ @file{logfile}.
_EndOfDoc_;
};
flag = {
- name = settod;
- value = s;
- flags-cant = adjtime;
- descrip = "Set (step) the time with settimeofday()";
- doc = <<- _EndOfDoc_
+ name = steplimit;
+ value = M;
+ arg-type = number;
+ arg-range = "0->";
+ descrip = "Adjustments less than @var{steplimit} msec will be slewed";
+ doc = <<- _EndOfDoc_
+ If the time adjustment is less than @file{steplimit} milliseconds,
+ slew the amount using @command{adjtime(2)}. Otherwise, step the
+ correction using @command{settimeofday(2)}.
_EndOfDoc_;
};
flag = {
- name = adjtime;
- value = j;
- flags-cant = settod;
- descrip = "Set (slew) the time with adjtime()";
- doc = <<- _EndOfDoc_
+ name = ntpversion;
+ value = o;
+ descrip = "Send @var{int} as our NTP protocol version";
+ arg-type = number;
+ arg-default = 4;
+ arg-range = "0->7";
+ doc = <<- _EndOfDoc_
+ When sending requests to a remote server, tell them we are running
+ NTP protocol version @file{ntpversion} .
_EndOfDoc_;
};
flag = {
- name = broadcast;
- value = b;
- descrip = "Use broadcasts to the address specified for synchronisation";
- arg-type = string;
- arg-name = "broadcast-address";
- doc = <<- _EndOfDoc_
- If specified SNTP will listen to the specified broadcast address
- for NTP broadcasts. The default maximum wait time,
- 68 seconds, can be modified with -t.
+ name = usereservedport;
+ value = r;
+ descrip = "Use the NTP Reserved Port (port 123)";
+ doc = <<- _EndOfDoc_
+ Use port 123, which is reserved for NTP, for our network
+ communications.
_EndOfDoc_;
};
flag = {
- name = timeout;
- value = t;
- descrip = "Specify the number of seconds to wait for broadcasts";
- arg-type = number;
- arg-name = "seconds";
- arg-default = 68;
- doc = <<- _EndOfDoc_
- When waiting for a broadcast packet SNTP will wait the number
- of seconds specified before giving up. Default 68 seconds.
+ name = step;
+ value = S;
+ descrip = "OK to 'step' the time with @command{settimeofday(2)}";
+ doc = <<- _EndOfDoc_
_EndOfDoc_;
};
flag = {
- name = authentication;
- value = a;
- descrip = "Enable authentication with the key auth-keynumber";
- arg-type = number;
- arg-name = "auth-keynumber";
- doc = <<- _EndOfDoc_
- This option enables authentication using the key specified in this option's argument.
- The argument of this option is the keyid, a number specified in the keyfile as this
- key's identifier. See the keyfile option (-k) for more details.
+ name = slew;
+ value = s;
+ descrip = "OK to 'slew' the time with @command{adjtime(2)}";
+ doc = <<- _EndOfDoc_
_EndOfDoc_;
};
+
flag = {
- name = keyfile;
- value = k;
- descrip = "Specify a keyfile. SNTP will look in this file for the key specified with -a";
- arg-type = string;
- arg-name = "file-name";
- doc = <<- _EndOfDoc_
- This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
- file. Key files follow the following format:
-
- keyid keytype key
-
- Where keyid is a number identifying this key
- keytype is one of the follow:
- S Key in 64 Bit hexadecimal number as specified in in the DES specification.
- N Key in 64 Bit hexadecimal number as specified in the NTP standard.
- A Key in a 1-to-8 character ASCII string.
- M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
- For more information see ntp.keys(5).
+ name = timeout;
+ value = t;
+ descrip = "The number of seconds to wait for responses";
+ arg-type = number;
+ arg-name = "seconds";
+ arg-default = 5;
+ doc = <<- _EndOfDoc_
+ When waiting for a reply, @code{sntp} will wait the number
+ of seconds specified before giving up. The default should be
+ more than enough for a unicast response. If @code{sntp} is
+ only waiting for a broadcast response a longer timeout is
+ likely needed.
_EndOfDoc_;
};
+flag = {
+ name = "wait";
+ descrip = "Wait for pending replies (if not setting the time)";
+ disable = no;
+ enabled;
+ settable;
+ doc = <<- _EndOfDoc_
+ If we are not setting the time, wait for all pending responses.
+ _EndOfDoc_;
+};
/* explain: Additional information whenever the usage routine is invoked */
explain = <<- _END_EXPLAIN
_END_EXPLAIN;
-detail = <<- _END_DETAIL
-sntp implements the Simple Network Time Protocol, and is used to query
-an NTP or SNTP server and either display the time or set the local
-system's time (given suitable privilege).
-
-It can be run interactively from the command line or as a cron job.
-
-NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
-1305.
- _END_DETAIL;
-
-prog-man-descrip = <<- _END_PROG_MAN_DESCRIP
-.I sntp
-can be used as a SNTP client to query a NTP or SNTP server and either display
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+.Nm
+can be used as an SNTP client to query a NTP or SNTP server and either display
the time or set the local system's time (given suitable privilege). It can be
-run as an interactive command or in a
-.I cron
+run as an interactive command or from a
+.Ic cron
job.
NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
are defined and described by RFC 5905.
-.PP
+.Pp
The default is to write the estimated correct local date and time (i.e. not
-UTC) to the standard output in a format like
-.BR "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs'" ,
+UTC) to the standard output in a format like:
+
+.Ic "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'"
+
where the
-.B "'(+0800)'"
+.Ic "'(+0800)'"
means that to get to UTC from the reported local time one must
add 8 hours and 0 minutes,
-and the
-.B "'+4.567 +/- 0.089 secs'"
+the
+.Ic "'+4.567'"
indicates the local clock is 4.567 seconds behind the correct time
-(so 4.567 seconds must be added to the local clock to get it to be correct),
-and the time of
-'1996-10-15 20:17:25.123'
-is believed to be correct to within
-+/- 0.089
-seconds.
- _END_PROG_MAN_DESCRIP;
-
-prog-info-descrip = <<- _END_PROG_INFO_DESCRIP
-@code{sntp}
-can be used as a SNTP client to query a NTP or SNTP server and either display
-the time or set the local system's time (given suitable privilege). It can be
-run as an interactive command or in a
-@code{cron}
-job.
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+.Ic "'+/- 0.089'"
+is the reported
+.Em synchronization distance
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+.Ic "'+/- ?'" .
+If the
+.Em host
+is different from the
+.Em IP ,
+both will be displayed.
+Otherwise, only the
+.Em IP
+is displayed.
+Finally, the
+.Em stratum
+of the host is reported.
+ _END_PROG_MDOC_DESCRIP;
+};
-NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
-are defined and described by RFC 5905.
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+.Bl -tag -width indent
+.It Li "sntp ntpserver.somewhere"
+is the simplest use of this program
+and can be run as an unprivileged command
+to check the current time and error in the local clock.
+.It Li "sntp -a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp -a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate 1ntpdatemdoc ,
+or
+.Xr rdate 8
+commands.
+.El
+ _END_MDOC_USAGE;
+};
-@indent
-The default is to write the estimated correct local date and time (i.e. not
-UTC) to the standard output in a format like
-@example
-1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
-@end example
-where the
-@example
-+4.567 +/- 0.089 secs
-@end example
-indicates the local clock is 4.567 seconds behind the correct time
-(so 4.567 seconds must be added to the local clock to get it to be correct),
-and the (local) time of
-@code{1996-10-15 20:17:25.123}
-can be converted to UTC time by adding 8 hours and 0 minutes, and
-is believed to be correct to within
-@code{+/- 0.089}
-seconds.
- _END_PROG_INFO_DESCRIP;
-
-man-doc = <<- _END_MAN_DOC
-.SH USAGE
-The simplest use of this program is as an unprivileged command to check the
-current time and error in the local clock. For example:
-.IP
-.B sntp ntpserver.somewhere
-.PP
-With suitable privilege, it can be run as a command or in a
-.I cron
-job to reset the local clock from a reliable server, like the
-.I ntpdate
-and
-.I rdate
-commands. For example:
-.IP
-.B sntp -a ntpserver.somewhere
-.SH RETURN VALUE
-The program returns a zero exit
-status for success, and a non-zero one otherwise.
-.SH BUGS
-Please report bugs to http://bugs.ntp.org .
- _END_MAN_DOC;
+doc-section = {
+ ds-type = 'AUTHORS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
+ _END_MDOC_AUTHORS;
+};
diff --git a/sntp/sntp-opts.h b/sntp/sntp-opts.h
index 926789b12e81..a904e18cd0b2 100644
--- a/sntp/sntp-opts.h
+++ b/sntp/sntp-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:33:53 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:51:00 AM by AutoGen 5.18.5pre4
* From the definitions sntp-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The sntp program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the sntp program.
* These macros are documented in the AutoGen info file in the
@@ -31,77 +46,103 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for sntp
*/
typedef enum {
- INDEX_OPT_IPV4 = 0,
- INDEX_OPT_IPV6 = 1,
- INDEX_OPT_NORMALVERBOSE = 2,
- INDEX_OPT_KOD = 3,
- INDEX_OPT_SYSLOG = 4,
- INDEX_OPT_LOGFILE = 5,
- INDEX_OPT_SETTOD = 6,
- INDEX_OPT_ADJTIME = 7,
- INDEX_OPT_BROADCAST = 8,
- INDEX_OPT_TIMEOUT = 9,
- INDEX_OPT_AUTHENTICATION = 10,
- INDEX_OPT_KEYFILE = 11,
- INDEX_OPT_VERSION = 12,
- INDEX_OPT_HELP = 13,
- INDEX_OPT_MORE_HELP = 14,
- INDEX_OPT_SAVE_OPTS = 15,
- INDEX_OPT_LOAD_OPTS = 16
+ INDEX_OPT_IPV4 = 0,
+ INDEX_OPT_IPV6 = 1,
+ INDEX_OPT_AUTHENTICATION = 2,
+ INDEX_OPT_BROADCAST = 3,
+ INDEX_OPT_CONCURRENT = 4,
+ INDEX_OPT_DEBUG_LEVEL = 5,
+ INDEX_OPT_SET_DEBUG_LEVEL = 6,
+ INDEX_OPT_GAP = 7,
+ INDEX_OPT_KOD = 8,
+ INDEX_OPT_KEYFILE = 9,
+ INDEX_OPT_LOGFILE = 10,
+ INDEX_OPT_STEPLIMIT = 11,
+ INDEX_OPT_NTPVERSION = 12,
+ INDEX_OPT_USERESERVEDPORT = 13,
+ INDEX_OPT_STEP = 14,
+ INDEX_OPT_SLEW = 15,
+ INDEX_OPT_TIMEOUT = 16,
+ INDEX_OPT_WAIT = 17,
+ INDEX_OPT_VERSION = 18,
+ INDEX_OPT_HELP = 19,
+ INDEX_OPT_MORE_HELP = 20,
+ INDEX_OPT_SAVE_OPTS = 21,
+ INDEX_OPT_LOAD_OPTS = 22
} teOptIndex;
+/** count of all options for sntp */
+#define OPTION_CT 23
+/** sntp version */
+#define SNTP_VERSION "4.2.8"
+/** Full sntp version text */
+#define SNTP_FULL_VERSION "sntp 4.2.8"
-#define OPTION_CT 17
-#define SNTP_VERSION "4.2.6p5"
-#define SNTP_FULL_VERSION "sntp 4.2.6p5"
-
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
* e.g. HAVE_OPT(IPV4)
*/
#define DESC(n) (sntpOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of sntp exit codes
*/
typedef enum {
- SNTP_EXIT_SUCCESS = 0,
- SNTP_EXIT_FAILURE = 1
-} sntp_exit_code_t;
-/*
+ SNTP_EXIT_SUCCESS = 0,
+ SNTP_EXIT_FAILURE = 1,
+ SNTP_EXIT_USAGE_ERROR = 64,
+ SNTP_EXIT_NO_CONFIG_INPUT = 66,
+ SNTP_EXIT_LIBOPTS_FAILURE = 70
+} sntp_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
@@ -113,90 +154,149 @@ typedef enum {
# warning undefining IPV6 due to option name conflict
# undef IPV6
# endif
-# ifdef NORMALVERBOSE
-# warning undefining NORMALVERBOSE due to option name conflict
-# undef NORMALVERBOSE
+# ifdef AUTHENTICATION
+# warning undefining AUTHENTICATION due to option name conflict
+# undef AUTHENTICATION
+# endif
+# ifdef BROADCAST
+# warning undefining BROADCAST due to option name conflict
+# undef BROADCAST
+# endif
+# ifdef CONCURRENT
+# warning undefining CONCURRENT due to option name conflict
+# undef CONCURRENT
+# endif
+# ifdef DEBUG_LEVEL
+# warning undefining DEBUG_LEVEL due to option name conflict
+# undef DEBUG_LEVEL
+# endif
+# ifdef SET_DEBUG_LEVEL
+# warning undefining SET_DEBUG_LEVEL due to option name conflict
+# undef SET_DEBUG_LEVEL
+# endif
+# ifdef GAP
+# warning undefining GAP due to option name conflict
+# undef GAP
# endif
# ifdef KOD
# warning undefining KOD due to option name conflict
# undef KOD
# endif
-# ifdef SYSLOG
-# warning undefining SYSLOG due to option name conflict
-# undef SYSLOG
+# ifdef KEYFILE
+# warning undefining KEYFILE due to option name conflict
+# undef KEYFILE
# endif
# ifdef LOGFILE
# warning undefining LOGFILE due to option name conflict
# undef LOGFILE
# endif
-# ifdef SETTOD
-# warning undefining SETTOD due to option name conflict
-# undef SETTOD
+# ifdef STEPLIMIT
+# warning undefining STEPLIMIT due to option name conflict
+# undef STEPLIMIT
# endif
-# ifdef ADJTIME
-# warning undefining ADJTIME due to option name conflict
-# undef ADJTIME
+# ifdef NTPVERSION
+# warning undefining NTPVERSION due to option name conflict
+# undef NTPVERSION
# endif
-# ifdef BROADCAST
-# warning undefining BROADCAST due to option name conflict
-# undef BROADCAST
+# ifdef USERESERVEDPORT
+# warning undefining USERESERVEDPORT due to option name conflict
+# undef USERESERVEDPORT
+# endif
+# ifdef STEP
+# warning undefining STEP due to option name conflict
+# undef STEP
+# endif
+# ifdef SLEW
+# warning undefining SLEW due to option name conflict
+# undef SLEW
# endif
# ifdef TIMEOUT
# warning undefining TIMEOUT due to option name conflict
# undef TIMEOUT
# endif
-# ifdef AUTHENTICATION
-# warning undefining AUTHENTICATION due to option name conflict
-# undef AUTHENTICATION
-# endif
-# ifdef KEYFILE
-# warning undefining KEYFILE due to option name conflict
-# undef KEYFILE
+# ifdef WAIT
+# warning undefining WAIT due to option name conflict
+# undef WAIT
# endif
#else /* NO_OPTION_NAME_WARNINGS */
# undef IPV4
# undef IPV6
-# undef NORMALVERBOSE
+# undef AUTHENTICATION
+# undef BROADCAST
+# undef CONCURRENT
+# undef DEBUG_LEVEL
+# undef SET_DEBUG_LEVEL
+# undef GAP
# undef KOD
-# undef SYSLOG
+# undef KEYFILE
# undef LOGFILE
-# undef SETTOD
-# undef ADJTIME
-# undef BROADCAST
+# undef STEPLIMIT
+# undef NTPVERSION
+# undef USERESERVEDPORT
+# undef STEP
+# undef SLEW
# undef TIMEOUT
-# undef AUTHENTICATION
-# undef KEYFILE
+# undef WAIT
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
#define VALUE_OPT_IPV4 '4'
#define VALUE_OPT_IPV6 '6'
-#define VALUE_OPT_NORMALVERBOSE 'd'
+#define VALUE_OPT_AUTHENTICATION 'a'
+
+#define OPT_VALUE_AUTHENTICATION (DESC(AUTHENTICATION).optArg.argInt)
+#define VALUE_OPT_BROADCAST 'b'
+#define VALUE_OPT_CONCURRENT 'c'
+#define VALUE_OPT_DEBUG_LEVEL 'd'
+#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
+
+#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
+#define VALUE_OPT_GAP 'g'
+
+#define OPT_VALUE_GAP (DESC(GAP).optArg.argInt)
#define VALUE_OPT_KOD 'K'
-#define VALUE_OPT_SYSLOG 'p'
+#define VALUE_OPT_KEYFILE 'k'
#define VALUE_OPT_LOGFILE 'l'
-#define VALUE_OPT_SETTOD 's'
-#define VALUE_OPT_ADJTIME 'j'
-#define VALUE_OPT_BROADCAST 'b'
+#define VALUE_OPT_STEPLIMIT 'M'
+
+#define OPT_VALUE_STEPLIMIT (DESC(STEPLIMIT).optArg.argInt)
+#define VALUE_OPT_NTPVERSION 'o'
+
+#define OPT_VALUE_NTPVERSION (DESC(NTPVERSION).optArg.argInt)
+#define VALUE_OPT_USERESERVEDPORT 'r'
+#define VALUE_OPT_STEP 'S'
+#define VALUE_OPT_SLEW 's'
#define VALUE_OPT_TIMEOUT 't'
#define OPT_VALUE_TIMEOUT (DESC(TIMEOUT).optArg.argInt)
-#define VALUE_OPT_AUTHENTICATION 'a'
+#define VALUE_OPT_WAIT 0x1001
-#define OPT_VALUE_AUTHENTICATION (DESC(AUTHENTICATION).optArg.argInt)
-#define VALUE_OPT_KEYFILE 'k'
+#define SET_OPT_WAIT STMTS( \
+ DESC(WAIT).optActualIndex = 17; \
+ DESC(WAIT).optActualValue = VALUE_OPT_WAIT; \
+ DESC(WAIT).fOptState &= OPTST_PERSISTENT_MASK; \
+ DESC(WAIT).fOptState |= OPTST_SET )
+#define DISABLE_OPT_WAIT STMTS( \
+ DESC(WAIT).fOptState &= OPTST_PERSISTENT_MASK; \
+ DESC(WAIT).fOptState |= OPTST_SET | OPTST_DISABLED; \
+ DESC(WAIT).optArg.argString = NULL )
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1002
+/** option flag (value) for save-opts-value option */
#define VALUE_OPT_SAVE_OPTS '>'
+/** option flag (value) for load-opts-value option */
#define VALUE_OPT_LOAD_OPTS '<'
#define SET_OPT_SAVE_OPTS(a) STMTS( \
DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
- DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
+ DESC(SAVE_OPTS).optArg.argString = (char const*)(a))
/*
* Interface defines not associated with particular options
*/
@@ -204,15 +304,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(sntpOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
sntpOptions.curOptIdx = (n); \
- sntpOptions.pzCurOpt = NULL)
+ sntpOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*sntpOptions.pUsageProc)(&sntpOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the sntp option descriptor.
@@ -222,6 +322,17 @@ extern tOptions sntpOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -255,4 +366,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_SNTP_OPTS_H_GUARD */
+
/* sntp-opts.h ends here */
diff --git a/sntp/sntp-opts.texi b/sntp/sntp-opts.texi
deleted file mode 100644
index 6d6fc430ffd3..000000000000
--- a/sntp/sntp-opts.texi
+++ /dev/null
@@ -1,286 +0,0 @@
-@node sntp Invocation
-@section Invoking sntp
-@pindex sntp
-@cindex standard Simple Network Time Protocol program
-@ignore
-#
-# EDIT THIS FILE WITH CAUTION (sntp-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:00 PM by AutoGen 5.12
-# From the definitions sntp-opts.def
-# and the template file aginfo.tpl
-@end ignore
-
-@code{sntp}
-can be used as a SNTP client to query a NTP or SNTP server and either display
-the time or set the local system's time (given suitable privilege). It can be
-run as an interactive command or in a
-@code{cron}
-job.
-
-NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
-are defined and described by RFC 5905.
-
-@indent
-The default is to write the estimated correct local date and time (i.e. not
-UTC) to the standard output in a format like
-@example
-1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
-@end example
-where the
-@example
-+4.567 +/- 0.089 secs
-@end example
-indicates the local clock is 4.567 seconds behind the correct time
-(so 4.567 seconds must be added to the local clock to get it to be correct),
-and the (local) time of
-@code{1996-10-15 20:17:25.123}
-can be converted to UTC time by adding 8 hours and 0 minutes, and
-is believed to be correct to within
-@code{+/- 0.089}
-seconds.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{sntp} program. It documents the @command{sntp} usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* sntp usage:: sntp usage help (-?)
-* sntp adjtime:: adjtime option (-j)
-* sntp authentication:: authentication option (-a)
-* sntp broadcast:: broadcast option (-b)
-* sntp ipv4:: ipv4 option (-4)
-* sntp ipv6:: ipv6 option (-6)
-* sntp keyfile:: keyfile option (-k)
-* sntp kod:: kod option (-K)
-* sntp logfile:: logfile option (-l)
-* sntp normalverbose:: normalverbose option (-d)
-* sntp settod:: settod option (-s)
-* sntp syslog:: syslog option (-p)
-* sntp timeout:: timeout option (-t)
-@end menu
-
-@node sntp usage
-@subsection sntp usage help (-?)
-@cindex sntp usage
-
-This is the automatically generated usage text for sntp:
-
-@exampleindent 0
-@example
-sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p5
-USAGE: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
- [ hostname-or-IP ...]
- Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
- -6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -d no normalverbose Normal verbose
- -K Str kod KoD history filename
- -p no syslog Logging with syslog
- - prohibits these options:
- logfile
- -l Str logfile Log to specified logfile
- - prohibits these options:
- syslog
- -s no settod Set (step) the time with settimeofday()
- - prohibits these options:
- adjtime
- -j no adjtime Set (slew) the time with adjtime()
- - prohibits these options:
- settod
- -b Str broadcast Use broadcasts to the address specified for synchronisation
- -t Num timeout Specify the number of seconds to wait for broadcasts
- -a Num authentication Enable authentication with the key auth-keynumber
- -k Str keyfile Specify a keyfile. SNTP will look in this file for the key specified with -a
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - disabled as --no-load-opts
- - may appear multiple times
-
-Options are specified by doubled hyphens and their name or by a single
-hyphen and the flag character.
-
-
-
-The following option preset mechanisms are supported:
- - reading file $HOME/.ntprc
- - reading file ./.ntprc
- - examining environment variables named SNTP_*
-
-sntp implements the Simple Network Time Protocol, and is used to query an
-NTP or SNTP server and either display the time or set the local system's
-time (given suitable privilege).
-
-It can be run interactively from the command line or as a cron job.
-
-NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
-1305.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node sntp adjtime
-@subsection adjtime option (-j)
-@cindex sntp-adjtime
-
-This is the ``set (slew) the time with adjtime()'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-settod.
-@end itemize
-
-
-
-@node sntp authentication
-@subsection authentication option (-a)
-@cindex sntp-authentication
-
-This is the ``enable authentication with the key auth-keynumber'' option.
-This option enables authentication using the key specified in this option's argument.
-The argument of this option is the keyid, a number specified in the keyfile as this
-key's identifier. See the keyfile option (-k) for more details.
-
-@node sntp broadcast
-@subsection broadcast option (-b)
-@cindex sntp-broadcast
-
-This is the ``use broadcasts to the address specified for synchronisation'' option.
-If specified SNTP will listen to the specified broadcast address
-for NTP broadcasts. The default maximum wait time,
-68 seconds, can be modified with -t.
-
-@node sntp ipv4
-@subsection ipv4 option (-4)
-@cindex sntp-ipv4
-
-This is the ``force ipv4 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv6.
-@end itemize
-
-Force DNS resolution of the following host names on the command line
-to the IPv4 namespace.
-
-@node sntp ipv6
-@subsection ipv6 option (-6)
-@cindex sntp-ipv6
-
-This is the ``force ipv6 dns name resolution'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-ipv4.
-@end itemize
-
-Force DNS resolution of the following host names on the command line
-to the IPv6 namespace.
-
-@node sntp keyfile
-@subsection keyfile option (-k)
-@cindex sntp-keyfile
-
-This is the ``specify a keyfile. sntp will look in this file for the key specified with -a'' option.
-This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
-file. Key files follow the following format:
-
-keyid keytype key
-
-Where keyid is a number identifying this key
-keytype is one of the follow:
-S Key in 64 Bit hexadecimal number as specified in in the DES specification.
-N Key in 64 Bit hexadecimal number as specified in the NTP standard.
-A Key in a 1-to-8 character ASCII string.
-M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
-For more information see ntp.keys(5).
-
-@node sntp kod
-@subsection kod option (-K)
-@cindex sntp-kod
-
-This is the ``kod history filename'' option.
-Specifies the filename to be used to persist the history of KoD
-responses received from servers. The default is
-/var/db/ntp-kod.
-
-@node sntp logfile
-@subsection logfile option (-l)
-@cindex sntp-logfile
-
-This is the ``log to specified logfile'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-syslog.
-@end itemize
-
-This option causes the client to write log messages to the specified
-logfile.
-
-@node sntp normalverbose
-@subsection normalverbose option (-d)
-@cindex sntp-normalverbose
-
-This is the ``normal verbose'' option.
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
-
-@node sntp settod
-@subsection settod option (-s)
-@cindex sntp-settod
-
-This is the ``set (step) the time with settimeofday()'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-adjtime.
-@end itemize
-
-
-
-@node sntp syslog
-@subsection syslog option (-p)
-@cindex sntp-syslog
-
-This is the ``logging with syslog'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must not appear in combination with any of the following options:
-logfile.
-@end itemize
-
-When this option is set all logging will be done using syslog.
-
-@node sntp timeout
-@subsection timeout option (-t)
-@cindex sntp-timeout
-
-This is the ``specify the number of seconds to wait for broadcasts'' option.
-When waiting for a broadcast packet SNTP will wait the number
-of seconds specified before giving up. Default 68 seconds.
diff --git a/sntp/sntp.1 b/sntp/sntp.1
deleted file mode 100644
index 46fa639ba4fc..000000000000
--- a/sntp/sntp.1
+++ /dev/null
@@ -1,219 +0,0 @@
-.TH SNTP 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (sntp.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:33:59 PM by AutoGen 5.12
-.\" From the definitions sntp-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-sntp \- standard Simple Network Time Protocol program
-.SH SYNOPSIS
-.B sntp
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.br
-.in +8
-[ hostname-or-IP ...]
-.PP
-
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBsntp\fP command.
-.I sntp
-can be used as a SNTP client to query a NTP or SNTP server and either display
-the time or set the local system's time (given suitable privilege). It can be
-run as an interactive command or in a
-.I cron
-job.
-
-NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
-are defined and described by RFC 5905.
-
-.PP
-The default is to write the estimated correct local date and time (i.e. not
-UTC) to the standard output in a format like
-.BR "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs'" ,
-where the
-.B "'(+0800)'"
-means that to get to UTC from the reported local time one must
-add 8 hours and 0 minutes,
-and the
-.B "'+4.567 +/- 0.089 secs'"
-indicates the local clock is 4.567 seconds behind the correct time
-(so 4.567 seconds must be added to the local clock to get it to be correct),
-and the time of
-'1996-10-15 20:17:25.123'
-is believed to be correct to within
-+/- 0.089
-seconds.
-.SH OPTIONS
-.TP
-.BR \-4 ", " \--ipv4
-Force IPv4 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv6.
-.sp
-Force DNS resolution of the following host names on the command line
-to the IPv4 namespace.
-.TP
-.BR \-6 ", " \--ipv6
-Force IPv6 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv4.
-.sp
-Force DNS resolution of the following host names on the command line
-to the IPv6 namespace.
-.TP
-.BR \-d ", " \--normalverbose
-Normal verbose.
-.sp
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
-.TP
-.BR \-K " \fIfile-name\fP, " \--kod "=" \fIfile-name\fP
-KoD history filename.
-.sp
-Specifies the filename to be used to persist the history of KoD
-responses received from servers. The default is
-/var/db/ntp-kod.
-.TP
-.BR \-p ", " \--syslog
-Logging with syslog.
-This option must not appear in combination with any of the following options:
-logfile.
-.sp
-When this option is set all logging will be done using syslog.
-.TP
-.BR \-l " \fIfile-name\fP, " \--logfile "=" \fIfile-name\fP
-Log to specified logfile.
-This option must not appear in combination with any of the following options:
-syslog.
-.sp
-This option causes the client to write log messages to the specified
-logfile.
-.TP
-.BR \-s ", " \--settod
-Set (step) the time with settimeofday().
-This option must not appear in combination with any of the following options:
-adjtime.
-.sp
-
-.TP
-.BR \-j ", " \--adjtime
-Set (slew) the time with adjtime().
-This option must not appear in combination with any of the following options:
-settod.
-.sp
-
-.TP
-.BR \-b " \fIbroadcast-address\fP, " \--broadcast "=" \fIbroadcast-address\fP
-Use broadcasts to the address specified for synchronisation.
-.sp
-If specified SNTP will listen to the specified broadcast address
-for NTP broadcasts. The default maximum wait time,
-68 seconds, can be modified with \-t.
-.TP
-.BR \-t " \fIseconds\fP, " \--timeout "=" \fIseconds\fP
-Specify the number of seconds to wait for broadcasts.
-This option takes an integer number as its argument.
-The default \fIseconds\fP for this option is:
-.ti +4
- 68
-.sp
-When waiting for a broadcast packet SNTP will wait the number
-of seconds specified before giving up. Default 68 seconds.
-.TP
-.BR \-a " \fIauth-keynumber\fP, " \--authentication "=" \fIauth-keynumber\fP
-Enable authentication with the key auth-keynumber.
-This option takes an integer number as its argument.
-.sp
-This option enables authentication using the key specified in this option's argument.
-The argument of this option is the keyid, a number specified in the keyfile as this
-key's identifier. See the keyfile option (-k) for more details.
-.TP
-.BR \-k " \fIfile-name\fP, " \--keyfile "=" \fIfile-name\fP
-Specify a keyfile. SNTP will look in this file for the key specified with \-a.
-.sp
-This option specifies the keyfile. SNTP will search for the key specified with \-a keyno in this
-file. Key files follow the following format:
-
-keyid keytype key
-
-Where keyid is a number identifying this key
-keytype is one of the follow:
-S Key in 64 Bit hexadecimal number as specified in in the DES specification.
-N Key in 64 Bit hexadecimal number as specified in the NTP standard.
-A Key in a 1-to-8 character ASCII string.
-M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
-For more information see ntp.keys(5).
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
-.TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
-out of order.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from configuration ("RC" or ".INI") file(s) and values from
-environment variables named:
-.nf
- \fBSNTP_<option-name>\fP or \fBSNTP\fP
-.fi
-.ad
-The environmental presets take precedence (are processed later than)
-the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
-is searched for within those directories.
-.SH USAGE
-The simplest use of this program is as an unprivileged command to check the
-current time and error in the local clock. For example:
-.IP
-.B sntp ntpserver.somewhere
-.PP
-With suitable privilege, it can be run as a command or in a
-.I cron
-job to reset the local clock from a reliable server, like the
-.I ntpdate
-and
-.I rdate
-commands. For example:
-.IP
-.B sntp \-a ntpserver.somewhere
-.SH RETURN VALUE
-The program returns a zero exit
-status for success, and a non-zero one otherwise.
-.SH BUGS
-Please report bugs to http://bugs.ntp.org .
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
-option definitions.
diff --git a/sntp/sntp.1sntpman b/sntp/sntp.1sntpman
new file mode 100644
index 000000000000..3d7fa7b00497
--- /dev/null
+++ b/sntp/sntp.1sntpman
@@ -0,0 +1,340 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH sntp 1sntpman "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4dayXk/ag-feaqWk)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:51:32 AM by AutoGen 5.18.5pre4
+.\" From the definitions sntp-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]sntp\fP
+\- standard Simple Network Time Protocol client program
+.SH SYNOPSIS
+\f\*[B-Font]sntp\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ hostname-or-IP ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]sntp\fP
+can be used as an SNTP client to query a NTP or SNTP server and either display
+the time or set the local system's time (given suitable privilege). It can be
+run as an interactive command or from a
+\f\*[B-Font]cron\f[]
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.sp \n(Ppu
+.ne 2
+
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+\f\*[B-Font]'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'\f[]
+where the
+\f\*[B-Font]'(+0800)'\f[]
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+\f\*[B-Font]'+4.567'\f[]
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+\f\*[B-Font]'+/- 0.089'\f[]
+is the reported
+\fIsynchronization\f[] \fIdistance\f[]
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+\f\*[B-Font]'+/- ?'\f[].
+If the
+\fIhost\f[]
+is different from the
+\fIIP\f[],
+both will be displayed.
+Otherwise, only the
+\fIIP\f[]
+is displayed.
+Finally, the
+\fIstratum\f[]
+of the host is reported.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-a\f[] \f\*[I-Font]auth\-keynumber\f[], \f\*[B-Font]\-\-authentication\f[]=\f\*[I-Font]auth\-keynumber\f[]
+Enable authentication with the key \fBauth-keynumber\fP.
+This option takes an integer number as its argument.
+.sp
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB-k\fP) for more details.
+.TP
+.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]broadcast\-address\f[], \f\*[B-Font]\-\-broadcast\f[]=\f\*[I-Font]broadcast\-address\f[]
+Listen to the address specified for broadcast time sync.
+This option may appear an unlimited number of times.
+.sp
+If specified \fBsntp\fP will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with \fB-t\fP.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]host\-name\f[], \f\*[B-Font]\-\-concurrent\f[]=\f\*[I-Font]host\-name\f[]
+Concurrently query all IPs returned for host-name.
+This option may appear an unlimited number of times.
+.sp
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2-second gap in between each query.
+.sp
+The \fB-c\fP or \fB--concurrent\fP flag says that any IPs
+returned for the DNS lookup of the supplied host-name are on
+different machines, so we can send concurrent queries.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-g\f[] \f\*[I-Font]milliseconds\f[], \f\*[B-Font]\-\-gap\f[]=\f\*[I-Font]milliseconds\f[]
+The gap (in milliseconds) between time requests.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]milliseconds\f[]
+for this option is:
+.ti +4
+ 50
+.sp
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
+.TP
+.NOP \f\*[B-Font]\-K\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-kod\f[]=\f\*[I-Font]file\-name\f[]
+KoD history filename.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /var/db/ntp-kod
+.sp
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
+.TP
+.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
+Look in this file for the key specified with \fB-a\fP.
+.sp
+This option specifies the keyfile.
+\fBsntp\fP will search for the key specified with \fB-a\fP
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-logfile\f[]=\f\*[I-Font]file\-name\f[]
+Log to specified logfile.
+.sp
+This option causes the client to write log messages to the specified
+\fIlogfile\fP.
+.TP
+.NOP \f\*[B-Font]\-M\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-steplimit\f[]=\f\*[I-Font]number\f[]
+Adjustments less than \fBsteplimit\fP msec will be slewed.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]number\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+greater than or equal to 0
+.fi
+.in -4
+.sp
+If the time adjustment is less than \fIsteplimit\fP milliseconds,
+slew the amount using \fBadjtime(2)\fP. Otherwise, step the
+correction using \fBsettimeofday(2)\fP.
+.TP
+.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-ntpversion\f[]=\f\*[I-Font]number\f[]
+Send \fBint\fP as our NTP protocol version.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]number\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 0 through 7
+.fi
+.in -4
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 4
+.sp
+When sending requests to a remote server, tell them we are running
+NTP protocol version \fIntpversion\fP .
+.TP
+.NOP \f\*[B-Font]\-r\f[], \f\*[B-Font]\-\-usereservedport\f[]
+Use the NTP Reserved Port (port 123).
+.sp
+Use port 123, which is reserved for NTP, for our network
+communications.
+.TP
+.NOP \f\*[B-Font]\-S\f[], \f\*[B-Font]\-\-step\f[]
+OK to 'step' the time with \fBsettimeofday(2)\fP.
+.sp
+.TP
+.NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-slew\f[]
+OK to 'slew' the time with \fBadjtime(2)\fP.
+.sp
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]seconds\f[], \f\*[B-Font]\-\-timeout\f[]=\f\*[I-Font]seconds\f[]
+The number of seconds to wait for responses.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]seconds\f[]
+for this option is:
+.ti +4
+ 5
+.sp
+When waiting for a reply, \fBsntp\fP will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If \fBsntp\fP is
+only waiting for a broadcast response a longer timeout is
+likely needed.
+.TP
+.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\- Fl \-no\-wait\f[]
+Wait for pending replies (if not setting the time).
+The \fIno\-wait\fP form will disable the option.
+This option is enabled by default.
+.sp
+If we are not setting the time, wait for all pending responses.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBSNTP_<option-name>\fP or \fBSNTP\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+.TP 7
+.NOP \f[C]sntp ntpserver.somewhere\f[]
+is the simplest use of this program
+and can be run as an unprivileged command
+to check the current time and error in the local clock.
+.TP 7
+.NOP \f[C]sntp \-a ntpserver.somewhere\f[]
+With suitable privilege,
+run as a command
+or from a
+\fCcron\fR(8)\f[]
+job,
+\f\*[B-Font]sntp \-a\f[]
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+\fCntpdate\fR(1ntpdatemdoc)\f[],
+or
+\fCrdate\fR(8)\f[]
+commands.
+.PP
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Johannes Maximilian Kuehn"
+.br
+.NOP "Harlan Stenn"
+.br
+.NOP "Dave Hart"
+.br
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
+option definitions.
diff --git a/sntp/sntp.1sntpmdoc b/sntp/sntp.1sntpmdoc
new file mode 100644
index 000000000000..b5f343c686c0
--- /dev/null
+++ b/sntp/sntp.1sntpmdoc
@@ -0,0 +1,296 @@
+.Dd December 19 2014
+.Dt SNTP 1sntpmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:51:38 AM by AutoGen 5.18.5pre4
+.\" From the definitions sntp-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm sntp
+.Nd standard Simple Network Time Protocol client program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ hostname\-or\-IP ...]
+.Pp
+.Sh DESCRIPTION
+.Nm
+can be used as an SNTP client to query a NTP or SNTP server and either display
+the time or set the local system's time (given suitable privilege). It can be
+run as an interactive command or from a
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.Pp
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996\-10\-15 20:17:25.123 (+0800) +4.567 +/\- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+4.567'"
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+.Ic "'+/\- 0.089'"
+is the reported
+.Em synchronization distance
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+.Ic "'+/\- ?'" .
+If the
+.Em host
+is different from the
+.Em IP ,
+both will be displayed.
+Otherwise, only the
+.Em IP
+is displayed.
+Finally, the
+.Em stratum
+of the host is reported.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+.It Fl a Ar auth\-keynumber , Fl \-authentication Ns = Ns Ar auth\-keynumber
+Enable authentication with the key \fBauth\-keynumber\fP.
+This option takes an integer number as its argument.
+.sp
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB\-k\fP) for more details.
+.It Fl b Ar broadcast\-address , Fl \-broadcast Ns = Ns Ar broadcast\-address
+Listen to the address specified for broadcast time sync.
+This option may appear an unlimited number of times.
+.sp
+If specified \fBsntp\fP will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with \fB\-t\fP.
+.It Fl c Ar host\-name , Fl \-concurrent Ns = Ns Ar host\-name
+Concurrently query all IPs returned for host\-name.
+This option may appear an unlimited number of times.
+.sp
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2\-second gap in between each query.
+.sp
+The \fB\-c\fP or \fB\-\-concurrent\fP flag says that any IPs
+returned for the DNS lookup of the supplied host\-name are on
+different machines, so we can send concurrent queries.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl g Ar milliseconds , Fl \-gap Ns = Ns Ar milliseconds
+The gap (in milliseconds) between time requests.
+This option takes an integer number as its argument.
+The default
+.Ar milliseconds
+for this option is:
+.ti +4
+ 50
+.sp
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
+.It Fl K Ar file\-name , Fl \-kod Ns = Ns Ar file\-name
+KoD history filename.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /var/db/ntp\-kod
+.sp
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
+.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
+Look in this file for the key specified with \fB\-a\fP.
+.sp
+This option specifies the keyfile.
+\fBsntp\fP will search for the key specified with \fB\-a\fP
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
+.It Fl l Ar file\-name , Fl \-logfile Ns = Ns Ar file\-name
+Log to specified logfile.
+.sp
+This option causes the client to write log messages to the specified
+\fIlogfile\fP.
+.It Fl M Ar number , Fl \-steplimit Ns = Ns Ar number
+Adjustments less than \fBsteplimit\fP msec will be slewed.
+This option takes an integer number as its argument.
+The value of
+.Ar number
+is constrained to being:
+.in +4
+.nf
+.na
+greater than or equal to 0
+.fi
+.in -4
+.sp
+If the time adjustment is less than \fIsteplimit\fP milliseconds,
+slew the amount using \fBadjtime(2)\fP. Otherwise, step the
+correction using \fBsettimeofday(2)\fP.
+.It Fl o Ar number , Fl \-ntpversion Ns = Ns Ar number
+Send \fBint\fP as our NTP protocol version.
+This option takes an integer number as its argument.
+The value of
+.Ar number
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 0 through 7
+.fi
+.in -4
+The default
+.Ar number
+for this option is:
+.ti +4
+ 4
+.sp
+When sending requests to a remote server, tell them we are running
+NTP protocol version \fIntpversion\fP .
+.It Fl r , Fl \-usereservedport
+Use the NTP Reserved Port (port 123).
+.sp
+Use port 123, which is reserved for NTP, for our network
+communications.
+.It Fl S , Fl \-step
+OK to 'step' the time with \fBsettimeofday(2)\fP.
+.sp
+.It Fl s , Fl \-slew
+OK to 'slew' the time with \fBadjtime(2)\fP.
+.sp
+.It Fl t Ar seconds , Fl \-timeout Ns = Ns Ar seconds
+The number of seconds to wait for responses.
+This option takes an integer number as its argument.
+The default
+.Ar seconds
+for this option is:
+.ti +4
+ 5
+.sp
+When waiting for a reply, \fBsntp\fP will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If \fBsntp\fP is
+only waiting for a broadcast response a longer timeout is
+likely needed.
+.It Fl \-wait , " Fl \-no\-wait"
+Wait for pending replies (if not setting the time).
+The \fIno\-wait\fP form will disable the option.
+This option is enabled by default.
+.sp
+If we are not setting the time, wait for all pending responses.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBSNTP_<option\-name>\fP or \fBSNTP\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+.Bl -tag -width indent
+.It Li "sntp ntpserver.somewhere"
+is the simplest use of this program
+and can be run as an unprivileged command
+to check the current time and error in the local clock.
+.It Li "sntp \-a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp \-a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate 1ntpdatemdoc ,
+or
+.Xr rdate 8
+commands.
+.El
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsntp\fP
+option definitions.
diff --git a/sntp/sntp.c b/sntp/sntp.c
index bdc8e4e7fd29..2e3bfecb3376 100644
--- a/sntp/sntp.c
+++ b/sntp/sntp.c
@@ -2,13 +2,11 @@
#include "main.h"
-volatile int debug;
-
int
main (
- int argc,
- char **argv
+ int argc,
+ char ** argv
)
{
- return sntp_main(argc, argv);
+ return sntp_main(argc, argv, Version);
}
diff --git a/sntp/sntp.html b/sntp/sntp.html
index b043f407b22d..36d6073187e5 100644
--- a/sntp/sntp.html
+++ b/sntp/sntp.html
@@ -36,7 +36,7 @@ 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 cron job.
- <p>This document applies to version 4.2.6p5 of <code>sntp</code>.
+ <p>This document applies to version 4.2.8 of <code>sntp</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -66,9 +66,13 @@ IETF specification.
<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
standard output in the format:
-<pre class="example"> 1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
+<pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
</pre>
- <p>where the +4.567 +/- 0.089 secs indicates the time offset and
+ <p>where
+YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
+(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
+and
+the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
<div class="node">
@@ -79,248 +83,281 @@ error bound of the system clock relative to the server clock.
<h3 class="section">Invoking sntp</h3>
-<p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-program-2"></a>
-<code>sntp</code>
-can be used as a SNTP client to query a NTP or SNTP server and either display
+<p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-client-program-2"></a>
+
+ <p><code>sntp</code>
+can be used as an SNTP client to query a NTP or SNTP server and either display
the time or set the local system's time (given suitable privilege). It can be
-run as an interactive command or in a
+run as an interactive command or from a
<code>cron</code>
job.
<p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
are defined and described by RFC 5905.
- <p class="indent">The default is to write the estimated correct local date and time (i.e. not
-UTC) to the standard output in a format like
-<pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
-</pre>
+ <p>The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+
+ <p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
+
<p>where the
-<pre class="example"> +4.567 +/- 0.089 secs
-</pre>
- <p>indicates the local clock is 4.567 seconds behind the correct time
-(so 4.567 seconds must be added to the local clock to get it to be correct),
-and the (local) time of
-<code>1996-10-15 20:17:25.123</code>
-can be converted to UTC time by adding 8 hours and 0 minutes, and
-is believed to be correct to within
-<code>+/- 0.089</code>
-seconds.
+<code>'(+0800)'</code>
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+<code>'+4.567'</code>
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+<code>'+/- 0.089'</code>
+is the reported
+<em>synchronization</em> <em>distance</em>
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+<code>'+/- ?'</code>.
+If the
+<em>host</em>
+is different from the
+<em>IP</em>,
+both will be displayed.
+Otherwise, only the
+<em>IP</em>
+is displayed.
+Finally, the
+<em>stratum</em>
+of the host is reported.
<p>This section was generated by <strong>AutoGen</strong>,
-the aginfo template and the option descriptions for the <span class="command">sntp</span> program. It documents the <span class="command">sntp</span> usage text and option meanings.
-
- <p>This software is released under a specialized copyright license.
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<ul class="menu">
-<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp usage help (-?)
-<li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>: adjtime option (-j)
-<li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
-<li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
-<li><a accesskey="5" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
-<li><a accesskey="6" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
-<li><a accesskey="7" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
-<li><a accesskey="8" href="#sntp-kod">sntp kod</a>: kod option (-K)
-<li><a accesskey="9" href="#sntp-logfile">sntp logfile</a>: logfile option (-l)
-<li><a href="#sntp-normalverbose">sntp normalverbose</a>: normalverbose option (-d)
-<li><a href="#sntp-settod">sntp settod</a>: settod option (-s)
-<li><a href="#sntp-syslog">sntp syslog</a>: syslog option (-p)
-<li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
+<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
+<li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
+<li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
+<li><a accesskey="5" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
+<li><a accesskey="6" href="#sntp-concurrent">sntp concurrent</a>: concurrent option (-c)
+<li><a accesskey="7" href="#sntp-gap">sntp gap</a>: gap option (-g)
+<li><a accesskey="8" href="#sntp-kod">sntp kod</a>: kod option (-K)
+<li><a accesskey="9" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
+<li><a href="#sntp-logfile">sntp logfile</a>: logfile option (-l)
+<li><a href="#sntp-steplimit">sntp steplimit</a>: steplimit option (-M)
+<li><a href="#sntp-ntpversion">sntp ntpversion</a>: ntpversion option (-o)
+<li><a href="#sntp-usereservedport">sntp usereservedport</a>: usereservedport option (-r)
+<li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
+<li><a href="#sntp-wait">sntp wait</a>: wait option
+<li><a href="#sntp-config">sntp config</a>: presetting/configuring sntp
+<li><a href="#sntp-exit-status">sntp exit status</a>: exit status
+<li><a href="#sntp-Usage">sntp Usage</a>: Usage
+<li><a href="#sntp-Authors">sntp Authors</a>: Authors
</ul>
<div class="node">
<p><hr>
-<a name="sntp-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
+<a name="sntp-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">sntp usage help (-?)</h4>
+<h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
-<p><a name="index-sntp-usage-3"></a>
-This is the automatically generated usage text for sntp:
+<p><a name="index-sntp-help-3"></a>
+This is the automatically generated usage text for sntp.
-<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p5
-USAGE: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8
+Usage: sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
- - prohibits these options:
- ipv6
+ - prohibits the option 'ipv6'
-6 no ipv6 Force IPv6 DNS name resolution
- - prohibits these options:
- ipv4
- -d no normalverbose Normal verbose
- -K Str kod KoD history filename
- -p no syslog Logging with syslog
- - prohibits these options:
- logfile
- -l Str logfile Log to specified logfile
- - prohibits these options:
- syslog
- -s no settod Set (step) the time with settimeofday()
- - prohibits these options:
- adjtime
- -j no adjtime Set (slew) the time with adjtime()
- - prohibits these options:
- settod
- -b Str broadcast Use broadcasts to the address specified for synchronisation
- -t Num timeout Specify the number of seconds to wait for broadcasts
+ - prohibits the option 'ipv4'
-a Num authentication Enable authentication with the key auth-keynumber
- -k Str keyfile Specify a keyfile. SNTP will look in this file for the key specified with -a
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -&gt; opt save-opts Save the option state to a config file
- -&lt; Str load-opts Load options from a config file
- - disabled as --no-load-opts
+ -b Str broadcast Listen to the address specified for broadcast time sync
+ - may appear multiple times
+ -c Str concurrent Concurrently query all IPs returned for host-name
+ - may appear multiple times
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -g Num gap The gap (in milliseconds) between time requests
+ -K Fil kod KoD history filename
+ -k Fil keyfile Look in this file for the key specified with -a
+ -l Fil logfile Log to specified logfile
+ -M Num steplimit Adjustments less than steplimit msec will be slewed
+ - it must be in the range:
+ greater than or equal to 0
+ -o Num ntpversion Send int as our NTP protocol version
+ - it must be in the range:
+ 0 to 7
+ -r no usereservedport Use the NTP Reserved Port (port 123)
+ -S no step OK to 'step' the time with settimeofday(2)
+ -s no slew OK to 'slew' the time with adjtime(2)
+ -t Num timeout The number of seconds to wait for responses
+ no wait Wait for pending replies (if not setting the time)
+ - disabled as '--no-wait'
+ - enabled by default
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -&gt; opt save-opts save the option state to a config file
+ -&lt; Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
- may appear multiple times
Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
-
The following option preset mechanisms are supported:
- reading file $HOME/.ntprc
- reading file ./.ntprc
- examining environment variables named SNTP_*
-sntp implements the Simple Network Time Protocol, and is used to query an
-NTP or SNTP server and either display the time or set the local system's
-time (given suitable privilege).
-
-It can be run interactively from the command line or as a cron job.
-
-NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
-1305.
-
-please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
</pre>
<div class="node">
<p><hr>
-<a name="sntp-adjtime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+<a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">adjtime option (-j)</h4>
+<h4 class="subsection">ipv4 option (-4)</h4>
-<p><a name="index-sntp_002dadjtime-4"></a>
-This is the &ldquo;set (slew) the time with adjtime()&rdquo; option.
+<p><a name="index-sntp_002dipv4-4"></a>
+This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
- <p>This option has some usage constraints. It:
+<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
-settod.
+ipv6.
</ul>
+ <p>Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
<div class="node">
<p><hr>
-<a name="sntp-authentication"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-adjtime">sntp adjtime</a>,
+<a name="sntp-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">authentication option (-a)</h4>
+<h4 class="subsection">ipv6 option (-6)</h4>
-<p><a name="index-sntp_002dauthentication-5"></a>
-This is the &ldquo;enable authentication with the key auth-keynumber&rdquo; option.
-This option enables authentication using the key specified in this option's argument.
-The argument of this option is the keyid, a number specified in the keyfile as this
-key's identifier. See the keyfile option (-k) for more details.
+<p><a name="index-sntp_002dipv6-5"></a>
+This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv4.
+</ul>
+
+ <p>Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
<div class="node">
<p><hr>
-<a name="sntp-broadcast"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
+<a name="sntp-authentication"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">broadcast option (-b)</h4>
-
-<p><a name="index-sntp_002dbroadcast-6"></a>
-This is the &ldquo;use broadcasts to the address specified for synchronisation&rdquo; option.
-If specified SNTP will listen to the specified broadcast address
-for NTP broadcasts. The default maximum wait time,
-68 seconds, can be modified with -t.
+<h4 class="subsection">authentication option (-a)</h4>
+<p><a name="index-sntp_002dauthentication-6"></a>
+This is the &ldquo;enable authentication with the key <var>auth-keynumber</var>&rdquo; option.
+This option takes a number argument <span class="file">auth-keynumber</span>.
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the <span class="option">keyid</span>, a
+number specified in the <span class="option">keyfile</span> as this key's identifier.
+See the <span class="option">keyfile</span> option (<span class="option">-k</span>) for more details.
<div class="node">
<p><hr>
-<a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
+<a name="sntp-broadcast"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">ipv4 option (-4)</h4>
+<h4 class="subsection">broadcast option (-b)</h4>
-<p><a name="index-sntp_002dipv4-7"></a>
-This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
+<p><a name="index-sntp_002dbroadcast-7"></a>
+This is the &ldquo;listen to the address specified for broadcast time sync&rdquo; option.
+This option takes a string argument <span class="file">broadcast-address</span>.
- <p>This option has some usage constraints. It:
+<p class="noindent">This option has some usage constraints. It:
<ul>
-<li>must not appear in combination with any of the following options:
-ipv6.
+<li>may appear an unlimited number of times.
</ul>
- <p>Force DNS resolution of the following host names on the command line
-to the IPv4 namespace.
-
+ <p>If specified <code>sntp</code> will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with <span class="option">-t</span>.
<div class="node">
<p><hr>
-<a name="sntp-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
+<a name="sntp-concurrent"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">ipv6 option (-6)</h4>
+<h4 class="subsection">concurrent option (-c)</h4>
-<p><a name="index-sntp_002dipv6-8"></a>
-This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
+<p><a name="index-sntp_002dconcurrent-8"></a>
+This is the &ldquo;concurrently query all ips returned for host-name&rdquo; option.
+This option takes a string argument <span class="file">host-name</span>.
- <p>This option has some usage constraints. It:
+<p class="noindent">This option has some usage constraints. It:
<ul>
-<li>must not appear in combination with any of the following options:
-ipv4.
+<li>may appear an unlimited number of times.
</ul>
- <p>Force DNS resolution of the following host names on the command line
-to the IPv6 namespace.
+ <p>Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
+one after another, with a 2-second gap in between each query.
+ <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
+returned for the DNS lookup of the supplied host-name are on
+different machines, so we can send concurrent queries.
<div class="node">
<p><hr>
-<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
+<a name="sntp-gap"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">keyfile option (-k)</h4>
-
-<p><a name="index-sntp_002dkeyfile-9"></a>
-This is the &ldquo;specify a keyfile. sntp will look in this file for the key specified with -a&rdquo; option.
-This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
-file. Key files follow the following format:
-
- <p>keyid keytype key
-
- <p>Where keyid is a number identifying this key
-keytype is one of the follow:
-S Key in 64 Bit hexadecimal number as specified in in the DES specification.
-N Key in 64 Bit hexadecimal number as specified in the NTP standard.
-A Key in a 1-to-8 character ASCII string.
-M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
-
- <p>For more information see ntp.keys(5).
+<h4 class="subsection">gap option (-g)</h4>
+<p><a name="index-sntp_002dgap-9"></a>
+This is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option.
+This option takes a number argument <span class="file">milliseconds</span>.
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
<div class="node">
<p><hr>
-<a name="sntp-kod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
+<a name="sntp-kod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
@@ -329,102 +366,234 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<p><a name="index-sntp_002dkod-10"></a>
This is the &ldquo;kod history filename&rdquo; option.
-Specifies the filename to be used to persist the history of KoD
-responses received from servers. The default is
-/var/db/ntp-kod.
-
+This option takes a file argument <span class="file">file-name</span>.
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
<div class="node">
<p><hr>
-<a name="sntp-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-normalverbose">sntp normalverbose</a>,
+<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
+<h4 class="subsection">keyfile option (-k)</h4>
+
+<p><a name="index-sntp_002dkeyfile-11"></a>
+This is the &ldquo;look in this file for the key specified with <span class="option">-a</span>&rdquo; option.
+This option takes a file argument <span class="file">file-name</span>.
+This option specifies the keyfile.
+<code>sntp</code> will search for the key specified with <span class="option">-a</span>
+<span class="file">keyno</span> in this file. See <span class="command">ntp.keys(5)</span> for more
+information.
+<div class="node">
+<p><hr>
+<a name="sntp-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
<h4 class="subsection">logfile option (-l)</h4>
-<p><a name="index-sntp_002dlogfile-11"></a>
-This is the &ldquo;log to specified logfile&rdquo; option.
+<p><a name="index-sntp_002dlogfile-12"></a>
+This is the &ldquo;log to specified logfile&rdquo; option.
+This option takes a file argument <span class="file">file-name</span>.
+This option causes the client to write log messages to the specified
+<span class="file">logfile</span>.
+<div class="node">
+<p><hr>
+<a name="sntp-steplimit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">steplimit option (-M)</h4>
- <p>This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-syslog.
-</ul>
+<p><a name="index-sntp_002dsteplimit-13"></a>
+This is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewed&rdquo; option.
+This option takes a number argument.
+If the time adjustment is less than <span class="file">steplimit</span> milliseconds,
+slew the amount using <span class="command">adjtime(2)</span>. Otherwise, step the
+correction using <span class="command">settimeofday(2)</span>.
+<div class="node">
+<p><hr>
+<a name="sntp-ntpversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
- <p>This option causes the client to write log messages to the specified
-logfile.
+<h4 class="subsection">ntpversion option (-o)</h4>
+<p><a name="index-sntp_002dntpversion-14"></a>
+This is the &ldquo;send <var>int</var> as our ntp protocol version&rdquo; option.
+This option takes a number argument.
+When sending requests to a remote server, tell them we are running
+NTP protocol version <span class="file">ntpversion</span> .
<div class="node">
<p><hr>
-<a name="sntp-normalverbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-settod">sntp settod</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
+<a name="sntp-usereservedport"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">normalverbose option (-d)</h4>
+<h4 class="subsection">usereservedport option (-r)</h4>
+
+<p><a name="index-sntp_002dusereservedport-15"></a>
+This is the &ldquo;use the ntp reserved port (port 123)&rdquo; option.
+Use port 123, which is reserved for NTP, for our network
+communications.
+<div class="node">
+<p><hr>
+<a name="sntp-timeout"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
-<p><a name="index-sntp_002dnormalverbose-12"></a>
-This is the &ldquo;normal verbose&rdquo; option.
-Diagnostic messages for non-fatal errors and a limited amount of
-tracing should be written to standard error. Fatal ones always
-produce a diagnostic. This option should be set when there is a
-suspected problem with the server, network or the source.
+<h4 class="subsection">timeout option (-t)</h4>
+<p><a name="index-sntp_002dtimeout-16"></a>
+This is the &ldquo;the number of seconds to wait for responses&rdquo; option.
+This option takes a number argument <span class="file">seconds</span>.
+When waiting for a reply, <code>sntp</code> will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If <code>sntp</code> is
+only waiting for a broadcast response a longer timeout is
+likely needed.
<div class="node">
<p><hr>
-<a name="sntp-settod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-normalverbose">sntp normalverbose</a>,
+<a name="sntp-wait"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">settod option (-s)</h4>
+<h4 class="subsection">wait option</h4>
-<p><a name="index-sntp_002dsettod-13"></a>
-This is the &ldquo;set (step) the time with settimeofday()&rdquo; option.
+<p><a name="index-sntp_002dwait-17"></a>
+This is the &ldquo;wait for pending replies (if not setting the time)&rdquo; option.
- <p>This option has some usage constraints. It:
+<p class="noindent">This option has some usage constraints. It:
<ul>
-<li>must not appear in combination with any of the following options:
-adjtime.
+<li>can be disabled with &ndash;no-wait.
+<li>It is enabled by default.
</ul>
+ <p>If we are not setting the time, wait for all pending responses.
+
<div class="node">
<p><hr>
-<a name="sntp-syslog"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
-Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
+<a name="sntp-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">syslog option (-p)</h4>
+<h4 class="subsection">presetting/configuring sntp</h4>
-<p><a name="index-sntp_002dsyslog-14"></a>
-This is the &ldquo;logging with syslog&rdquo; option.
+<p>Any option that is not marked as <i>not presettable</i> may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>SNTP</code> and <code>SNTP_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
+the options listed above in upper case and segmented with underscores.
+The <code>SNTP</code> variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
- <p>This option has some usage constraints. It:
+<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
<ul>
-<li>must not appear in combination with any of the following options:
-logfile.
+<li>$HOME
+<li>$PWD
</ul>
+ The environment variables <code>HOME</code>, and <code>PWD</code>
+are expanded and replaced when <span class="file">sntp</span> runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+within that directory and processed.
+
+ <p>Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+ <p>Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+<pre class="example"> [SNTP]
+</pre>
+ <p class="noindent">or by
+<pre class="example"> &lt;?program sntp&gt;
+</pre>
+ <p class="noindent">Do not mix these styles within one configuration file.
+
+ <p>Compound values and carefully constructed string values may also be
+specified using XML syntax:
+<pre class="example"> &lt;option-name&gt;
+ &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
+ &lt;/option-name&gt;
+</pre>
+ <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
+<pre class="example"> "...&lt;...&gt;..."
+</pre>
+ <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
+hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+ <p>The command line options relating to configuration and/or usage help are:
+
+<h5 class="subsubheading">version (-)</h5>
- <p>When this option is set all logging will be done using syslog.
+<p>Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+ <dl>
+<dt><span class="samp">version</span><dd>Only print the version. This is the default.
+<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
+<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</dl>
<div class="node">
<p><hr>
-<a name="sntp-timeout"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
+<a name="sntp-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
<br>
</div>
-<h4 class="subsection">timeout option (-t)</h4>
+<h4 class="subsection">sntp exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
+<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="sntp-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">sntp Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="sntp-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
-<p><a name="index-sntp_002dtimeout-15"></a>
-This is the &ldquo;specify the number of seconds to wait for broadcasts&rdquo; option.
-When waiting for a broadcast packet SNTP will wait the number
-of seconds specified before giving up. Default 68 seconds.
+<h4 class="subsection">sntp Authors</h4>
<div class="node">
<p><hr>
diff --git a/sntp/sntp.man.in b/sntp/sntp.man.in
new file mode 100644
index 000000000000..d97a4e203dd8
--- /dev/null
+++ b/sntp/sntp.man.in
@@ -0,0 +1,340 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH sntp @SNTP_MS@ "19 Dec 2014" "4.2.8" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-4dayXk/ag-feaqWk)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:51:32 AM by AutoGen 5.18.5pre4
+.\" From the definitions sntp-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]sntp\fP
+\- standard Simple Network Time Protocol client program
+.SH SYNOPSIS
+\f\*[B-Font]sntp\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+[ hostname-or-IP ...]
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+\f\*[B-Font]sntp\fP
+can be used as an SNTP client to query a NTP or SNTP server and either display
+the time or set the local system's time (given suitable privilege). It can be
+run as an interactive command or from a
+\f\*[B-Font]cron\f[]
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.sp \n(Ppu
+.ne 2
+
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+\f\*[B-Font]'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'\f[]
+where the
+\f\*[B-Font]'(+0800)'\f[]
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+\f\*[B-Font]'+4.567'\f[]
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+\f\*[B-Font]'+/- 0.089'\f[]
+is the reported
+\fIsynchronization\f[] \fIdistance\f[]
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+\f\*[B-Font]'+/- ?'\f[].
+If the
+\fIhost\f[]
+is different from the
+\fIIP\f[],
+both will be displayed.
+Otherwise, only the
+\fIIP\f[]
+is displayed.
+Finally, the
+\fIstratum\f[]
+of the host is reported.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+.TP
+.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+.TP
+.NOP \f\*[B-Font]\-a\f[] \f\*[I-Font]auth\-keynumber\f[], \f\*[B-Font]\-\-authentication\f[]=\f\*[I-Font]auth\-keynumber\f[]
+Enable authentication with the key \fBauth-keynumber\fP.
+This option takes an integer number as its argument.
+.sp
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB-k\fP) for more details.
+.TP
+.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]broadcast\-address\f[], \f\*[B-Font]\-\-broadcast\f[]=\f\*[I-Font]broadcast\-address\f[]
+Listen to the address specified for broadcast time sync.
+This option may appear an unlimited number of times.
+.sp
+If specified \fBsntp\fP will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with \fB-t\fP.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]host\-name\f[], \f\*[B-Font]\-\-concurrent\f[]=\f\*[I-Font]host\-name\f[]
+Concurrently query all IPs returned for host-name.
+This option may appear an unlimited number of times.
+.sp
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2-second gap in between each query.
+.sp
+The \fB-c\fP or \fB--concurrent\fP flag says that any IPs
+returned for the DNS lookup of the supplied host-name are on
+different machines, so we can send concurrent queries.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-g\f[] \f\*[I-Font]milliseconds\f[], \f\*[B-Font]\-\-gap\f[]=\f\*[I-Font]milliseconds\f[]
+The gap (in milliseconds) between time requests.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]milliseconds\f[]
+for this option is:
+.ti +4
+ 50
+.sp
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
+.TP
+.NOP \f\*[B-Font]\-K\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-kod\f[]=\f\*[I-Font]file\-name\f[]
+KoD history filename.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /var/db/ntp-kod
+.sp
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
+.TP
+.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
+Look in this file for the key specified with \fB-a\fP.
+.sp
+This option specifies the keyfile.
+\fBsntp\fP will search for the key specified with \fB-a\fP
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-logfile\f[]=\f\*[I-Font]file\-name\f[]
+Log to specified logfile.
+.sp
+This option causes the client to write log messages to the specified
+\fIlogfile\fP.
+.TP
+.NOP \f\*[B-Font]\-M\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-steplimit\f[]=\f\*[I-Font]number\f[]
+Adjustments less than \fBsteplimit\fP msec will be slewed.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]number\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+greater than or equal to 0
+.fi
+.in -4
+.sp
+If the time adjustment is less than \fIsteplimit\fP milliseconds,
+slew the amount using \fBadjtime(2)\fP. Otherwise, step the
+correction using \fBsettimeofday(2)\fP.
+.TP
+.NOP \f\*[B-Font]\-o\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-ntpversion\f[]=\f\*[I-Font]number\f[]
+Send \fBint\fP as our NTP protocol version.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]number\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 0 through 7
+.fi
+.in -4
+The default
+\f\*[I-Font]number\f[]
+for this option is:
+.ti +4
+ 4
+.sp
+When sending requests to a remote server, tell them we are running
+NTP protocol version \fIntpversion\fP .
+.TP
+.NOP \f\*[B-Font]\-r\f[], \f\*[B-Font]\-\-usereservedport\f[]
+Use the NTP Reserved Port (port 123).
+.sp
+Use port 123, which is reserved for NTP, for our network
+communications.
+.TP
+.NOP \f\*[B-Font]\-S\f[], \f\*[B-Font]\-\-step\f[]
+OK to 'step' the time with \fBsettimeofday(2)\fP.
+.sp
+.TP
+.NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-slew\f[]
+OK to 'slew' the time with \fBadjtime(2)\fP.
+.sp
+.TP
+.NOP \f\*[B-Font]\-t\f[] \f\*[I-Font]seconds\f[], \f\*[B-Font]\-\-timeout\f[]=\f\*[I-Font]seconds\f[]
+The number of seconds to wait for responses.
+This option takes an integer number as its argument.
+The default
+\f\*[I-Font]seconds\f[]
+for this option is:
+.ti +4
+ 5
+.sp
+When waiting for a reply, \fBsntp\fP will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If \fBsntp\fP is
+only waiting for a broadcast response a longer timeout is
+likely needed.
+.TP
+.NOP \f\*[B-Font]\-\-wait\f[], \f\*[B-Font]\- Fl \-no\-wait\f[]
+Wait for pending replies (if not setting the time).
+The \fIno\-wait\fP form will disable the option.
+This option is enabled by default.
+.sp
+If we are not setting the time, wait for all pending responses.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBSNTP_<option-name>\fP or \fBSNTP\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+.TP 7
+.NOP \f[C]sntp ntpserver.somewhere\f[]
+is the simplest use of this program
+and can be run as an unprivileged command
+to check the current time and error in the local clock.
+.TP 7
+.NOP \f[C]sntp \-a ntpserver.somewhere\f[]
+With suitable privilege,
+run as a command
+or from a
+\fCcron\fR(8)\f[]
+job,
+\f\*[B-Font]sntp \-a\f[]
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+\fCntpdate\fR(@NTPDATE_MS@)\f[],
+or
+\fCrdate\fR(8)\f[]
+commands.
+.PP
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH AUTHORS
+.NOP "Johannes Maximilian Kuehn"
+.br
+.NOP "Harlan Stenn"
+.br
+.NOP "Dave Hart"
+.br
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH "NOTES"
+This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
+option definitions.
diff --git a/sntp/sntp.mdoc.in b/sntp/sntp.mdoc.in
new file mode 100644
index 000000000000..1ce2e39554b7
--- /dev/null
+++ b/sntp/sntp.mdoc.in
@@ -0,0 +1,296 @@
+.Dd December 19 2014
+.Dt SNTP @SNTP_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:51:38 AM by AutoGen 5.18.5pre4
+.\" From the definitions sntp-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm sntp
+.Nd standard Simple Network Time Protocol client program
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+[ hostname\-or\-IP ...]
+.Pp
+.Sh DESCRIPTION
+.Nm
+can be used as an SNTP client to query a NTP or SNTP server and either display
+the time or set the local system's time (given suitable privilege). It can be
+run as an interactive command or from a
+.Ic cron
+job.
+NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
+are defined and described by RFC 5905.
+.Pp
+The default is to write the estimated correct local date and time (i.e. not
+UTC) to the standard output in a format like:
+.Ic "'1996\-10\-15 20:17:25.123 (+0800) +4.567 +/\- 0.089 [host] IP sN'"
+where the
+.Ic "'(+0800)'"
+means that to get to UTC from the reported local time one must
+add 8 hours and 0 minutes,
+the
+.Ic "'+4.567'"
+indicates the local clock is 4.567 seconds behind the correct time
+(so 4.567 seconds must be added to the local clock to get it to be correct).
+Note that the number of decimals printed for this value will change
+based on the reported precision of the server.
+.Ic "'+/\- 0.089'"
+is the reported
+.Em synchronization distance
+(in seconds), which represents the maximum error due to all causes.
+If the server does not report valid data needed to calculate the
+synchronization distance, this will be reported as
+.Ic "'+/\- ?'" .
+If the
+.Em host
+is different from the
+.Em IP ,
+both will be displayed.
+Otherwise, only the
+.Em IP
+is displayed.
+Finally, the
+.Em stratum
+of the host is reported.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl 4 , Fl \-ipv4
+Force IPv4 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv6.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv4 namespace.
+.It Fl 6 , Fl \-ipv6
+Force IPv6 DNS name resolution.
+This option must not appear in combination with any of the following options:
+ipv4.
+.sp
+Force DNS resolution of the following host names on the command line
+to the IPv6 namespace.
+.It Fl a Ar auth\-keynumber , Fl \-authentication Ns = Ns Ar auth\-keynumber
+Enable authentication with the key \fBauth\-keynumber\fP.
+This option takes an integer number as its argument.
+.sp
+Enable authentication using the key specified in this option's
+argument. The argument of this option is the \fBkeyid\fP, a
+number specified in the \fBkeyfile\fP as this key's identifier.
+See the \fBkeyfile\fP option (\fB\-k\fP) for more details.
+.It Fl b Ar broadcast\-address , Fl \-broadcast Ns = Ns Ar broadcast\-address
+Listen to the address specified for broadcast time sync.
+This option may appear an unlimited number of times.
+.sp
+If specified \fBsntp\fP will listen to the specified address
+for NTP broadcasts. The default maximum wait time
+can (and probably should) be modified with \fB\-t\fP.
+.It Fl c Ar host\-name , Fl \-concurrent Ns = Ns Ar host\-name
+Concurrently query all IPs returned for host\-name.
+This option may appear an unlimited number of times.
+.sp
+Requests from an NTP "client" to a "server" should never be sent
+more rapidly than one every 2 seconds. By default, any IPs returned
+as part of a DNS lookup are assumed to be for a single instance of
+\fBntpd\fP, and therefore \fBsntp\fP will send queries to these IPs
+one after another, with a 2\-second gap in between each query.
+.sp
+The \fB\-c\fP or \fB\-\-concurrent\fP flag says that any IPs
+returned for the DNS lookup of the supplied host\-name are on
+different machines, so we can send concurrent queries.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl g Ar milliseconds , Fl \-gap Ns = Ns Ar milliseconds
+The gap (in milliseconds) between time requests.
+This option takes an integer number as its argument.
+The default
+.Ar milliseconds
+for this option is:
+.ti +4
+ 50
+.sp
+Since we're only going to use the first valid response we get and
+there is benefit to specifying a good number of servers to query,
+separate the queries we send out by the specified number of
+milliseconds.
+.It Fl K Ar file\-name , Fl \-kod Ns = Ns Ar file\-name
+KoD history filename.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /var/db/ntp\-kod
+.sp
+Specifies the filename to be used for the persistent history of KoD
+responses received from servers. If the file does not exist, a
+warning message will be displayed. The file will not be created.
+.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
+Look in this file for the key specified with \fB\-a\fP.
+.sp
+This option specifies the keyfile.
+\fBsntp\fP will search for the key specified with \fB\-a\fP
+\fIkeyno\fP in this file. See \fBntp.keys(5)\fP for more
+information.
+.It Fl l Ar file\-name , Fl \-logfile Ns = Ns Ar file\-name
+Log to specified logfile.
+.sp
+This option causes the client to write log messages to the specified
+\fIlogfile\fP.
+.It Fl M Ar number , Fl \-steplimit Ns = Ns Ar number
+Adjustments less than \fBsteplimit\fP msec will be slewed.
+This option takes an integer number as its argument.
+The value of
+.Ar number
+is constrained to being:
+.in +4
+.nf
+.na
+greater than or equal to 0
+.fi
+.in -4
+.sp
+If the time adjustment is less than \fIsteplimit\fP milliseconds,
+slew the amount using \fBadjtime(2)\fP. Otherwise, step the
+correction using \fBsettimeofday(2)\fP.
+.It Fl o Ar number , Fl \-ntpversion Ns = Ns Ar number
+Send \fBint\fP as our NTP protocol version.
+This option takes an integer number as its argument.
+The value of
+.Ar number
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 0 through 7
+.fi
+.in -4
+The default
+.Ar number
+for this option is:
+.ti +4
+ 4
+.sp
+When sending requests to a remote server, tell them we are running
+NTP protocol version \fIntpversion\fP .
+.It Fl r , Fl \-usereservedport
+Use the NTP Reserved Port (port 123).
+.sp
+Use port 123, which is reserved for NTP, for our network
+communications.
+.It Fl S , Fl \-step
+OK to 'step' the time with \fBsettimeofday(2)\fP.
+.sp
+.It Fl s , Fl \-slew
+OK to 'slew' the time with \fBadjtime(2)\fP.
+.sp
+.It Fl t Ar seconds , Fl \-timeout Ns = Ns Ar seconds
+The number of seconds to wait for responses.
+This option takes an integer number as its argument.
+The default
+.Ar seconds
+for this option is:
+.ti +4
+ 5
+.sp
+When waiting for a reply, \fBsntp\fP will wait the number
+of seconds specified before giving up. The default should be
+more than enough for a unicast response. If \fBsntp\fP is
+only waiting for a broadcast response a longer timeout is
+likely needed.
+.It Fl \-wait , " Fl \-no\-wait"
+Wait for pending replies (if not setting the time).
+The \fIno\-wait\fP form will disable the option.
+This option is enabled by default.
+.sp
+If we are not setting the time, wait for all pending responses.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBSNTP_<option\-name>\fP or \fBSNTP\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+.Bl -tag -width indent
+.It Li "sntp ntpserver.somewhere"
+is the simplest use of this program
+and can be run as an unprivileged command
+to check the current time and error in the local clock.
+.It Li "sntp \-a ntpserver.somewhere"
+With suitable privilege,
+run as a command
+or from a
+.Xr cron 8
+job,
+.Ic "sntp \-a"
+will reset the local clock from a synchronized specified server,
+like the (deprecated)
+.Xr ntpdate @NTPDATE_MS@ ,
+or
+.Xr rdate 8
+commands.
+.El
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh AUTHORS
+.An "Johannes Maximilian Kuehn"
+.An "Harlan Stenn"
+.An "Dave Hart"
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh "BUGS"
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh "NOTES"
+This manual page was \fIAutoGen\fP\-erated from the \fBsntp\fP
+option definitions.
diff --git a/sntp/sntp.texi b/sntp/sntp.texi
index 482cf1eb065d..123eed3d8fd9 100644
--- a/sntp/sntp.texi
+++ b/sntp/sntp.texi
@@ -2,7 +2,7 @@
@c %**start of header
@setfilename sntp.info
@settitle Sntp User's Manual
-@include version.texi
+@include include/version.texi
@paragraphindent 2
@c %**end of header
@@ -54,13 +54,17 @@ By default, @code{sntp} writes the local data and time (i.e., not UTC) to the
standard output in the format:
@example
-1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
+1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
@end example
-where the +4.567 +/- 0.089 secs indicates the time offset and
+where
+YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
+(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
+and
+the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
-@include sntp-opts.texi
+@include invoke-sntp.texi
@node Usage
@comment node-name, next, previous, up
diff --git a/sntp/tests/Makefile.am b/sntp/tests/Makefile.am
new file mode 100644
index 000000000000..feb914276205
--- /dev/null
+++ b/sntp/tests/Makefile.am
@@ -0,0 +1,111 @@
+NULL =
+BUILT_SOURCES =
+
+check_PROGRAMS =
+if BUILD_SNTP
+check_PROGRAMS += tests
+endif
+
+base_SOURCES = \
+ $(srcdir)/../tests_main.cpp \
+ $(NULL)
+
+tests_SOURCES = \
+ $(base_SOURCES) \
+ crypto.cpp \
+ keyFile.cpp \
+ kodDatabase.cpp \
+ kodFile.cpp \
+ networking.cpp \
+ packetHandling.cpp \
+ packetProcessing.cpp \
+ utilities.cpp \
+ $(NULL)
+
+noinst_HEADERS = \
+ sntptest.h \
+ fileHandlingTest.h \
+ $(NULL)
+
+dist_check_SCRIPTS = tests-runner
+
+EXTRA_DIST = \
+ data/debug-input-lfp-bin \
+ data/debug-input-lfp-dec \
+ data/debug-input-pkt \
+ data/key-test-ascii \
+ data/key-test-comments \
+ data/key-test-empty \
+ data/key-test-hex \
+ data/key-test-invalid-hex \
+ data/kod-expected-multiple \
+ data/kod-expected-single \
+ data/kod-test-blanks \
+ data/kod-test-correct \
+ data/kod-test-empty \
+ $(NULL)
+
+CLEANFILES = \
+ data/kod-output-multiple \
+ data/kod-output-single \
+ data/debug-output-pkt \
+ data/debug-output-lfp-dec \
+ data/kod-output-blank \
+ data/debug-output-lfp-bin \
+ $(NULL)
+
+LDADD = \
+ ../libsntp.a \
+ $(LIBOPTS_LDADD) \
+ $(LDADD_LIBEVENT) \
+ $(top_builddir)/../libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+
+AM_CPPFLAGS = $(SNTP_INCS)
+AM_CPPFLAGS += -I$(srcdir)/..
+AM_CPPFLAGS += -I$(top_srcdir)/../tests
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_LIBEVENT)
+AM_CPPFLAGS += $(GTEST_CPPFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+TESTS =
+
+if !NTP_CROSSCOMPILE
+TESTS += tests-runner
+endif
+
+## ensure ../libsntp.a is built
+
+BUILT_SOURCES += check-libsntp
+CLEANFILES += check-libsntp
+
+check-libsntp: ../libsntp.a
+ @echo stamp > $@
+
+../libsntp.a:
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
+
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES += check-libntp
+CLEANFILES += check-libntp
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/sntp/tests/Makefile.in b/sntp/tests/Makefile.in
new file mode 100644
index 000000000000..c1232823a54b
--- /dev/null
+++ b/sntp/tests/Makefile.in
@@ -0,0 +1,898 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+check_PROGRAMS = $(am__EXEEXT_1)
+@BUILD_SNTP_TRUE@am__append_1 = tests
+@NTP_CROSSCOMPILE_FALSE@am__append_2 = tests-runner
+DIST_COMMON = $(dist_check_SCRIPTS) $(noinst_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf
+subdir = tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
+ $(top_srcdir)/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/libevent/m4/openldap.m4 \
+ $(top_srcdir)/m4/hms_search_lib.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/m4/ntp_compiler.m4 \
+ $(top_srcdir)/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/m4/ntp_debug.m4 $(top_srcdir)/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/m4/ntp_googletest.m4 \
+ $(top_srcdir)/m4/ntp_ipv6.m4 $(top_srcdir)/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/m4/ntp_libevent.m4 \
+ $(top_srcdir)/m4/ntp_libntp.m4 \
+ $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/m4/ntp_openssl.m4 \
+ $(top_srcdir)/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/m4/ntp_prog_cc.m4 $(top_srcdir)/m4/ntp_sntp.m4 \
+ $(top_srcdir)/m4/ntp_sysexits.m4 \
+ $(top_srcdir)/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@BUILD_SNTP_TRUE@am__EXEEXT_1 = tests$(EXEEXT)
+am__objects_1 =
+am__objects_2 = tests_main.$(OBJEXT) $(am__objects_1)
+am_tests_OBJECTS = $(am__objects_2) crypto.$(OBJEXT) keyFile.$(OBJEXT) \
+ kodDatabase.$(OBJEXT) kodFile.$(OBJEXT) networking.$(OBJEXT) \
+ packetHandling.$(OBJEXT) packetProcessing.$(OBJEXT) \
+ utilities.$(OBJEXT) $(am__objects_1)
+tests_OBJECTS = $(am_tests_OBJECTS)
+tests_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+tests_DEPENDENCIES = ../libsntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(top_builddir)/../libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/libevent/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(tests_SOURCES)
+DIST_SOURCES = $(tests_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_SYSLOG = @LIB_SYSLOG@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_FORCE_LIBEVENT_DIST = @NTP_FORCE_LIBEVENT_DIST@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+BUILT_SOURCES = check-libsntp check-libntp .deps-ver
+base_SOURCES = \
+ $(srcdir)/../tests_main.cpp \
+ $(NULL)
+
+tests_SOURCES = \
+ $(base_SOURCES) \
+ crypto.cpp \
+ keyFile.cpp \
+ kodDatabase.cpp \
+ kodFile.cpp \
+ networking.cpp \
+ packetHandling.cpp \
+ packetProcessing.cpp \
+ utilities.cpp \
+ $(NULL)
+
+noinst_HEADERS = \
+ sntptest.h \
+ fileHandlingTest.h \
+ $(NULL)
+
+dist_check_SCRIPTS = tests-runner
+EXTRA_DIST = \
+ data/debug-input-lfp-bin \
+ data/debug-input-lfp-dec \
+ data/debug-input-pkt \
+ data/key-test-ascii \
+ data/key-test-comments \
+ data/key-test-empty \
+ data/key-test-hex \
+ data/key-test-invalid-hex \
+ data/kod-expected-multiple \
+ data/kod-expected-single \
+ data/kod-test-blanks \
+ data/kod-test-correct \
+ data/kod-test-empty \
+ $(NULL)
+
+CLEANFILES = data/kod-output-multiple data/kod-output-single \
+ data/debug-output-pkt data/debug-output-lfp-dec \
+ data/kod-output-blank data/debug-output-lfp-bin $(NULL) \
+ check-libsntp check-libntp .deps-ver
+LDADD = \
+ ../libsntp.a \
+ $(LIBOPTS_LDADD) \
+ $(LDADD_LIBEVENT) \
+ $(top_builddir)/../libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+AM_CPPFLAGS = $(SNTP_INCS) -I$(srcdir)/.. -I$(top_srcdir)/../tests \
+ $(LIBOPTS_CFLAGS) $(CPPFLAGS_LIBEVENT) $(GTEST_CPPFLAGS) \
+ $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
+TESTS = $(am__append_2)
+SNTP_INCS = -I$(top_srcdir)/../include \
+ -I$(top_srcdir)/../lib/isc/include \
+ -I$(top_srcdir)/../lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/../lib/isc/unix/include
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES)
+ @rm -f tests$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodDatabase.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kodFile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networking.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetHandling.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packetProcessing.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+tests_main.o: $(srcdir)/../tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '$(srcdir)/../tests_main.cpp' || echo '$(srcdir)/'`$(srcdir)/../tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(srcdir)/../tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '$(srcdir)/../tests_main.cpp' || echo '$(srcdir)/'`$(srcdir)/../tests_main.cpp
+
+tests_main.obj: $(srcdir)/../tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '$(srcdir)/../tests_main.cpp'; then $(CYGPATH_W) '$(srcdir)/../tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../tests_main.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(srcdir)/../tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '$(srcdir)/../tests_main.cpp'; then $(CYGPATH_W) '$(srcdir)/../tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../tests_main.cpp'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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) \
+ $(dist_check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+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_sh_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+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-checkPROGRAMS clean-generic clean-libtool \
+ 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:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+check-libsntp: ../libsntp.a
+ @echo stamp > $@
+
+../libsntp.a:
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) libsntp.a
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
+ @[ -f $@ ] || \
+ cp $(top_srcdir)/deps-ver $@
+ @[ -w $@ ] || \
+ chmod ug+w $@
+ @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
+ echo -n "Prior $(subdir)/$(DEPDIR) version " && \
+ cat $@ && \
+ rm -rf $(DEPDIR) && \
+ mkdir $(DEPDIR) && \
+ case "$(top_builddir)" in \
+ .) \
+ ./config.status Makefile depfiles \
+ ;; \
+ *) \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
+ ;; \
+ esac && \
+ echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
+ cat $(top_srcdir)/deps-ver \
+ )
+ cp $(top_srcdir)/deps-ver $@
+
+.deps-ver: $(top_srcdir)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
+ @touch $@
+
+#
+# depsver.mf included in Makefile.am for directories with .deps
+#
+# When building in the same directory with sources that change over
+# time, such as when tracking using bk, the .deps files can become
+# stale with respect to moved, deleted, or superceded headers. Most
+# commonly, this would exhibit as make reporting a failure to make a
+# header file which is no longer in the location given. To address
+# this issue, we use a deps-ver file which is updated with each change
+# that breaks old .deps files. A copy of deps-ver is made into
+# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
+# with different contents than deps-ver, we make clean to ensure all
+# .o files built before the incompatible change are rebuilt along with
+# their updated .deps files, then remove $(DEPDIR) and recreate it as
+# empty stubs.
+#
+# It is normal when configured with --disable-dependency-tracking for
+# the DEPDIR to not have been created. For this reason, we use the
+# intermediate target .deps-ver, which invokes make recursively if
+# DEPDIR exists.
+#
+# If you modify depsver.mf, please make the changes to the master
+# copy, the one in sntp is copied by the bootstrap script from it.
+#
+# This comment block follows rather than leads the related code so that
+# it stays with it in the generated Makefile.in and Makefile.
+#
+
+# 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/sntp/tests/crypto.cpp b/sntp/tests/crypto.cpp
new file mode 100644
index 000000000000..a6f89f5aa842
--- /dev/null
+++ b/sntp/tests/crypto.cpp
@@ -0,0 +1,129 @@
+#include "sntptest.h"
+
+extern "C" {
+#include "crypto.h"
+};
+
+class cryptoTest : public sntptest {
+};
+
+#define MD5_LENGTH 16
+#define SHA1_LENGTH 20
+
+TEST_F(cryptoTest, MakeMd5Mac) {
+
+ const char* PKT_DATA = "abcdefgh0123";
+ const int PKT_LEN = strlen(PKT_DATA);
+ const char* EXPECTED_DIGEST =
+ "\x52\x6c\xb8\x38\xaf\x06\x5a\xfb\x6c\x98\xbb\xc0\x9b\x0a\x7a\x1b";
+ char actual[MD5_LENGTH];
+
+ key md5;
+ md5.next = NULL;
+ md5.key_id = 10;
+ md5.key_len = 6;
+ memcpy(&md5.key_seq, "md5seq", md5.key_len);
+ memcpy(&md5.type, "MD5", 4);
+
+ EXPECT_EQ(MD5_LENGTH,
+ make_mac((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5, actual));
+
+ EXPECT_TRUE(memcmp(EXPECTED_DIGEST, actual, MD5_LENGTH) == 0);
+}
+
+#ifdef OPENSSL
+TEST_F(cryptoTest, MakeSHA1Mac) {
+ const char* PKT_DATA = "abcdefgh0123";
+ const int PKT_LEN = strlen(PKT_DATA);
+ const char* EXPECTED_DIGEST =
+ "\x17\xaa\x82\x97\xc7\x17\x13\x6a\x9b\xa9"
+ "\x63\x85\xb4\xce\xbe\x94\xa0\x97\x16\x1d";
+ char actual[SHA1_LENGTH];
+
+ key sha1;
+ sha1.next = NULL;
+ sha1.key_id = 20;
+ sha1.key_len = 7;
+ memcpy(&sha1.key_seq, "sha1seq", sha1.key_len);
+ memcpy(&sha1.type, "SHA1", 5);
+
+ EXPECT_EQ(SHA1_LENGTH,
+ make_mac((char*)PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1, actual));
+
+ EXPECT_TRUE(memcmp(EXPECTED_DIGEST, actual, SHA1_LENGTH) == 0);
+}
+#endif /* OPENSSL */
+
+TEST_F(cryptoTest, VerifyCorrectMD5) {
+ const char* PKT_DATA =
+ "sometestdata" // Data
+ "\0\0\0\0" // Key-ID (unused)
+ "\xc7\x58\x99\xdd\x99\x32\x0f\x71" // MAC
+ "\x2b\x7b\xfe\x4f\xa2\x32\xcf\xac";
+ const int PKT_LEN = 12;
+
+ key md5;
+ md5.next = NULL;
+ md5.key_id = 0;
+ md5.key_len = 6;
+ memcpy(&md5.key_seq, "md5key", md5.key_len);
+ memcpy(&md5.type, "MD5", 4);
+
+ EXPECT_TRUE(auth_md5((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
+}
+
+#ifdef OPENSSL
+TEST_F(cryptoTest, VerifySHA1) {
+ const char* PKT_DATA =
+ "sometestdata" // Data
+ "\0\0\0\0" // Key-ID (unused)
+ "\xad\x07\xde\x36\x39\xa6\x77\xfa\x5b\xce" // MAC
+ "\x2d\x8a\x7d\x06\x96\xe6\x0c\xbc\xed\xe1";
+ const int PKT_LEN = 12;
+
+ key sha1;
+ sha1.next = NULL;
+ sha1.key_id = 0;
+ sha1.key_len = 7;
+ memcpy(&sha1.key_seq, "sha1key", sha1.key_len);
+ memcpy(&sha1.type, "SHA1", 5);
+
+ EXPECT_TRUE(auth_md5((char*)PKT_DATA, PKT_LEN, SHA1_LENGTH, &sha1));
+}
+#endif /* OPENSSL */
+
+TEST_F(cryptoTest, VerifyFailure) {
+ /* We use a copy of the MD5 verification code, but modify
+ * the last bit to make sure verification fails. */
+ const char* PKT_DATA =
+ "sometestdata" // Data
+ "\0\0\0\0" // Key-ID (unused)
+ "\xc7\x58\x99\xdd\x99\x32\x0f\x71" // MAC
+ "\x2b\x7b\xfe\x4f\xa2\x32\xcf\x00"; // Last byte is wrong!
+ const int PKT_LEN = 12;
+
+ key md5;
+ md5.next = NULL;
+ md5.key_id = 0;
+ md5.key_len = 6;
+ memcpy(&md5.key_seq, "md5key", md5.key_len);
+ memcpy(&md5.type, "MD5", 4);
+
+ EXPECT_FALSE(auth_md5((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5));
+}
+
+TEST_F(cryptoTest, PacketSizeNotMultipleOfFourBytes) {
+ const char* PKT_DATA = "123456";
+ const int PKT_LEN = 6;
+ char actual[MD5_LENGTH];
+
+ key md5;
+ md5.next = NULL;
+ md5.key_id = 10;
+ md5.key_len = 6;
+ memcpy(&md5.key_seq, "md5seq", md5.key_len);
+ memcpy(&md5.type, "MD5", 4);
+
+ EXPECT_EQ(0, make_mac((char*)PKT_DATA, PKT_LEN, MD5_LENGTH, &md5, actual));
+}
+
diff --git a/sntp/tests/data/debug-input-lfp-bin b/sntp/tests/data/debug-input-lfp-bin
new file mode 100644
index 000000000000..99d559cc23d2
--- /dev/null
+++ b/sntp/tests/data/debug-input-lfp-bin
@@ -0,0 +1,3 @@
+--------------------------------------------------------------------------------
+0: 00000000 1: 00000000 2: 00000000 3: 00111111 4: 00000000 5: 00000000 6: 00000000 7: 01111111
+--------------------------------------------------------------------------------
diff --git a/sntp/tests/data/debug-input-lfp-dec b/sntp/tests/data/debug-input-lfp-dec
new file mode 100644
index 000000000000..6e81c854347f
--- /dev/null
+++ b/sntp/tests/data/debug-input-lfp-dec
@@ -0,0 +1,3 @@
+--------------------------------------------------------------------------------
+0: 0 1: 0 2: 24 3: 166 4: 0 5: 4 6: 181 7: 22
+--------------------------------------------------------------------------------
diff --git a/sntp/tests/data/debug-input-pkt b/sntp/tests/data/debug-input-pkt
new file mode 100644
index 000000000000..ff61b75263cb
--- /dev/null
+++ b/sntp/tests/data/debug-input-pkt
@@ -0,0 +1,8 @@
+--------------------------------------------------------------------------------
+0: 24 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0
+8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0
+16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0
+24: 0 25: 0 26: 0 27: 0 28: 0 29: 0 30: 0 31: 0
+32: 0 33: 0 34: 0 35: 0 36: 0 37: 0 38: 0 39: 0
+40: 0 41: 0 42: 0 43: 8 44: 7f 45: ff 46: ff 47: ff
+--------------------------------------------------------------------------------
diff --git a/sntp/tests/data/key-test-ascii b/sntp/tests/data/key-test-ascii
new file mode 100644
index 000000000000..9240c819462b
--- /dev/null
+++ b/sntp/tests/data/key-test-ascii
@@ -0,0 +1,2 @@
+50 MD5 asciikeyOne
+40 MD5 asciikeyTwo
diff --git a/sntp/tests/data/key-test-comments b/sntp/tests/data/key-test-comments
new file mode 100644
index 000000000000..437049effedc
--- /dev/null
+++ b/sntp/tests/data/key-test-comments
@@ -0,0 +1,3 @@
+# This is an initial comment, this file should contain 2 keys.
+34 MD5 xyz #This is a comment after an ASCII key.
+10 MD5 010101010101010101010101010101 #Comment after hex key.
diff --git a/sntp/tests/data/key-test-empty b/sntp/tests/data/key-test-empty
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sntp/tests/data/key-test-empty
diff --git a/sntp/tests/data/key-test-hex b/sntp/tests/data/key-test-hex
new file mode 100644
index 000000000000..fb704c5fd94e
--- /dev/null
+++ b/sntp/tests/data/key-test-hex
@@ -0,0 +1,3 @@
+10 MD5 0123456789abcdef0123456789
+20 MD5 111111111111111111111111111111
+30 MD5 01010101010101010101010101
diff --git a/sntp/tests/data/key-test-invalid-hex b/sntp/tests/data/key-test-invalid-hex
new file mode 100644
index 000000000000..0933ed00bc7e
--- /dev/null
+++ b/sntp/tests/data/key-test-invalid-hex
@@ -0,0 +1,2 @@
+30 MD5 0101010101010101010101010101gh
+10 MD5 010101010101010101010101010101
diff --git a/sntp/tests/data/kod-expected-multiple b/sntp/tests/data/kod-expected-multiple
new file mode 100644
index 000000000000..c6ba292779eb
--- /dev/null
+++ b/sntp/tests/data/kod-expected-multiple
@@ -0,0 +1,3 @@
+000000000000abcd DENY 192.0.2.1
+000000000000abcd RSTR 192.0.2.5
+000000000000abcd RATE example.com
diff --git a/sntp/tests/data/kod-expected-single b/sntp/tests/data/kod-expected-single
new file mode 100644
index 000000000000..8ad3c7ccc17d
--- /dev/null
+++ b/sntp/tests/data/kod-expected-single
@@ -0,0 +1 @@
+0000000000000001 DENY host1
diff --git a/sntp/tests/data/kod-test-blanks b/sntp/tests/data/kod-test-blanks
new file mode 100644
index 000000000000..5c20e7271e57
--- /dev/null
+++ b/sntp/tests/data/kod-test-blanks
@@ -0,0 +1,6 @@
+
+0000000012345678 DENY 192.0.2.5
+
+0000000000000fff RSTR 192.0.2.100
+000000000000abcd DENY example.com
+
diff --git a/sntp/tests/data/kod-test-correct b/sntp/tests/data/kod-test-correct
new file mode 100644
index 000000000000..8a3e230ea0f9
--- /dev/null
+++ b/sntp/tests/data/kod-test-correct
@@ -0,0 +1,2 @@
+0000000012345678 DENY 192.0.2.5
+0000000000000fff RSTR 192.0.2.100
diff --git a/sntp/tests/data/kod-test-empty b/sntp/tests/data/kod-test-empty
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sntp/tests/data/kod-test-empty
diff --git a/sntp/tests/fileHandlingTest.h b/sntp/tests/fileHandlingTest.h
new file mode 100644
index 000000000000..502a248b9bd0
--- /dev/null
+++ b/sntp/tests/fileHandlingTest.h
@@ -0,0 +1,64 @@
+#ifndef FILE_HANDLING_TEST_H
+#define FILE_HANDLING_TEST_H
+
+#include "sntptest.h"
+
+#include <fstream>
+#include <string>
+
+using std::ifstream;
+using std::string;
+using std::ios;
+
+class fileHandlingTest : public sntptest {
+protected:
+ enum DirectoryType {
+ INPUT_DIR = 0,
+ OUTPUT_DIR = 1
+ };
+
+ std::string CreatePath(const char* filename, DirectoryType argument) {
+ std::string path;
+
+ if (m_params.size() >= argument + 1) {
+ path = m_params[argument];
+ }
+
+ if (path[path.size()-1] != DIR_SEP && !path.empty()) {
+ path.append(1, DIR_SEP);
+ }
+ path.append(filename);
+
+ return path;
+ }
+
+ int GetFileSize(ifstream& file) {
+ int initial = file.tellg();
+
+ file.seekg(0, ios::end);
+ int length = file.tellg();
+ file.seekg(initial);
+
+ return length;
+ }
+
+ void CompareFileContent(ifstream& expected, ifstream& actual) {
+ int currentLine = 1;
+ while (actual.good() && expected.good()) {
+ string actualLine, expectedLine;
+ getline(actual, actualLine);
+ getline(expected, expectedLine);
+
+ EXPECT_EQ(expectedLine, actualLine) << "Comparision failed on line " << currentLine;
+ currentLine++;
+ }
+ }
+
+ void ClearFile(const std::string& filename) {
+ std::ofstream clear(filename.c_str(), ios::trunc);
+ ASSERT_TRUE(clear.good());
+ clear.close();
+ }
+};
+
+#endif // FILE_HANDLING_TEST_H
diff --git a/sntp/tests/keyFile.cpp b/sntp/tests/keyFile.cpp
new file mode 100644
index 000000000000..3efbe8f8d8f6
--- /dev/null
+++ b/sntp/tests/keyFile.cpp
@@ -0,0 +1,131 @@
+#include "fileHandlingTest.h"
+
+extern "C" {
+#include "crypto.h"
+};
+
+class keyFileTest : public fileHandlingTest {
+protected:
+ ::testing::AssertionResult CompareKeys(key& expected, key& actual) {
+ if (expected.key_id != actual.key_id)
+ return ::testing::AssertionFailure()
+ << "Expected key_id: " << expected.key_id
+ << " but was: " << actual.key_id;
+ if (expected.key_len != actual.key_len)
+ return ::testing::AssertionFailure()
+ << "Expected key_len: " << expected.key_len
+ << " but was: " << actual.key_len;
+ if (strcmp(expected.type, actual.type) != 0)
+ return ::testing::AssertionFailure()
+ << "Expected key_type: " << expected.type
+ << " but was: " << actual.type;
+ if (memcmp(expected.key_seq, actual.key_seq, expected.key_len) != 0)
+ return ::testing::AssertionFailure()
+ << "Key mismatch!";
+ return ::testing::AssertionSuccess();
+ }
+
+ ::testing::AssertionResult CompareKeys(int key_id,
+ int key_len,
+ const char* type,
+ const char* key_seq,
+ key& actual) {
+ key temp;
+
+ temp.key_id = key_id;
+ temp.key_len = key_len;
+ strlcpy(temp.type, type, sizeof(temp.type));
+ memcpy(temp.key_seq, key_seq, key_len);
+
+ return CompareKeys(temp, actual);
+ }
+};
+
+TEST_F(keyFileTest, ReadEmptyKeyFile) {
+ key* keys = NULL;
+
+ ASSERT_EQ(0, auth_init(CreatePath("key-test-empty", INPUT_DIR).c_str(), &keys));
+
+ EXPECT_TRUE(keys == NULL);
+}
+
+TEST_F(keyFileTest, ReadASCIIKeys) {
+ key* keys = NULL;
+
+ ASSERT_EQ(2, auth_init(CreatePath("key-test-ascii", INPUT_DIR).c_str(), &keys));
+
+ ASSERT_TRUE(keys != NULL);
+
+ key* result = NULL;
+ get_key(40, &result);
+ ASSERT_TRUE(result != NULL);
+ EXPECT_TRUE(CompareKeys(40, 11, "MD5", "asciikeyTwo", *result));
+
+ result = NULL;
+ get_key(50, &result);
+ ASSERT_TRUE(result != NULL);
+ EXPECT_TRUE(CompareKeys(50, 11, "MD5", "asciikeyOne", *result));
+}
+
+TEST_F(keyFileTest, ReadHexKeys) {
+ key* keys = NULL;
+
+ ASSERT_EQ(3, auth_init(CreatePath("key-test-hex", INPUT_DIR).c_str(), &keys));
+
+ ASSERT_TRUE(keys != NULL);
+
+ key* result = NULL;
+ get_key(10, &result);
+ ASSERT_TRUE(result != NULL);
+ EXPECT_TRUE(CompareKeys(10, 13, "MD5",
+ "\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89", *result));
+
+ result = NULL;
+ get_key(20, &result);
+ ASSERT_TRUE(result != NULL);
+ char data1[15]; memset(data1, 0x11, 15);
+ EXPECT_TRUE(CompareKeys(20, 15, "MD5", data1, *result));
+
+ result = NULL;
+ get_key(30, &result);
+ ASSERT_TRUE(result != NULL);
+ char data2[13]; memset(data2, 0x01, 13);
+ EXPECT_TRUE(CompareKeys(30, 13, "MD5", data2, *result));
+}
+
+TEST_F(keyFileTest, ReadKeyFileWithComments) {
+ key* keys = NULL;
+
+ ASSERT_EQ(2, auth_init(CreatePath("key-test-comments", INPUT_DIR).c_str(), &keys));
+
+ ASSERT_TRUE(keys != NULL);
+
+ key* result = NULL;
+ get_key(10, &result);
+ ASSERT_TRUE(result != NULL);
+ char data[15]; memset(data, 0x01, 15);
+ EXPECT_TRUE(CompareKeys(10, 15, "MD5", data, *result));
+
+ result = NULL;
+ get_key(34, &result);
+ ASSERT_TRUE(result != NULL);
+ EXPECT_TRUE(CompareKeys(34, 3, "MD5", "xyz", *result));
+}
+
+TEST_F(keyFileTest, ReadKeyFileWithInvalidHex) {
+ key* keys = NULL;
+
+ ASSERT_EQ(1, auth_init(CreatePath("key-test-invalid-hex", INPUT_DIR).c_str(), &keys));
+
+ ASSERT_TRUE(keys != NULL);
+
+ key* result = NULL;
+ get_key(10, &result);
+ ASSERT_TRUE(result != NULL);
+ char data[15]; memset(data, 0x01, 15);
+ EXPECT_TRUE(CompareKeys(10, 15, "MD5", data, *result));
+
+ result = NULL;
+ get_key(30, &result); // Should not exist, and result should remain NULL.
+ ASSERT_TRUE(result == NULL);
+}
diff --git a/sntp/tests/kodDatabase.cpp b/sntp/tests/kodDatabase.cpp
new file mode 100644
index 000000000000..515f4337a3e4
--- /dev/null
+++ b/sntp/tests/kodDatabase.cpp
@@ -0,0 +1,118 @@
+#include "sntptest.h"
+
+extern "C" {
+#include "kod_management.h"
+};
+
+class kodDatabaseTest : public sntptest {
+protected:
+ virtual void SetUp() {
+ kod_init_kod_db("/dev/null", TRUE);
+ }
+};
+
+TEST_F(kodDatabaseTest, SingleEntryHandling) {
+ char HOST[] = "192.0.2.5";
+ char REASON[] = "DENY";
+
+ add_entry(HOST, REASON);
+
+ kod_entry* result;
+
+ EXPECT_EQ(1, search_entry(HOST, &result));
+ EXPECT_STREQ(HOST, result->hostname);
+ EXPECT_STREQ(REASON, result->type);
+}
+
+TEST_F(kodDatabaseTest, MultipleEntryHandling) {
+ char HOST1[] = "192.0.2.3";
+ char REASON1[] = "DENY";
+
+ char HOST2[] = "192.0.5.5";
+ char REASON2[] = "RATE";
+
+ char HOST3[] = "192.0.10.1";
+ char REASON3[] = "DENY";
+
+ add_entry(HOST1, REASON1);
+ add_entry(HOST2, REASON2);
+ add_entry(HOST3, REASON3);
+
+ kod_entry* result;
+
+ EXPECT_EQ(1, search_entry(HOST1, &result));
+ EXPECT_STREQ(HOST1, result->hostname);
+ EXPECT_STREQ(REASON1, result->type);
+
+ EXPECT_EQ(1, search_entry(HOST2, &result));
+ EXPECT_STREQ(HOST2, result->hostname);
+ EXPECT_STREQ(REASON2, result->type);
+
+ EXPECT_EQ(1, search_entry(HOST3, &result));
+ EXPECT_STREQ(HOST3, result->hostname);
+ EXPECT_STREQ(REASON3, result->type);
+
+ free(result);
+}
+
+TEST_F(kodDatabaseTest, NoMatchInSearch) {
+ char HOST_ADD[] = "192.0.2.6";
+ char HOST_NOTADD[] = "192.0.6.1";
+ char REASON[] = "DENY";
+
+ add_entry(HOST_ADD, REASON);
+
+ kod_entry* result;
+
+ EXPECT_EQ(0, search_entry(HOST_NOTADD, &result));
+ EXPECT_TRUE(result == NULL);
+}
+
+TEST_F(kodDatabaseTest, AddDuplicate) {
+ char HOST[] = "192.0.2.3";
+ char REASON1[] = "RATE";
+ char REASON2[] = "DENY";
+
+ add_entry(HOST, REASON1);
+ kod_entry* result1;
+ ASSERT_EQ(1, search_entry(HOST, &result1));
+
+ /*
+ * Sleeps for two seconds since we want to ensure that
+ * the timestamp is updated to a new value.
+ */
+ sleep(2);
+
+ add_entry(HOST, REASON2);
+ kod_entry* result2;
+ ASSERT_EQ(1, search_entry(HOST, &result2));
+
+ EXPECT_NE(result1->timestamp, result2->timestamp);
+
+ free(result1);
+ free(result2);
+}
+
+TEST_F(kodDatabaseTest, DeleteEntry) {
+ char HOST1[] = "192.0.2.1";
+ char HOST2[] = "192.0.2.2";
+ char HOST3[] = "192.0.2.3";
+ char REASON[] = "DENY";
+
+ add_entry(HOST1, REASON);
+ add_entry(HOST2, REASON);
+ add_entry(HOST3, REASON);
+
+ kod_entry* result;
+
+ ASSERT_EQ(1, search_entry(HOST2, &result));
+ free(result);
+
+ delete_entry(HOST2, REASON);
+
+ EXPECT_EQ(0, search_entry(HOST2, &result));
+
+ // Ensure that the other entry is still there.
+ EXPECT_EQ(1, search_entry(HOST1, &result));
+ free(result);
+}
diff --git a/sntp/tests/kodFile.cpp b/sntp/tests/kodFile.cpp
new file mode 100644
index 000000000000..e1775f6374fa
--- /dev/null
+++ b/sntp/tests/kodFile.cpp
@@ -0,0 +1,138 @@
+#include "fileHandlingTest.h"
+
+extern "C" {
+#include "kod_management.h"
+
+#include "ntp_stdlib.h" // For estrdup()
+};
+
+/*
+ * We access some parts of the kod database directly, without
+ * going through the public interface
+ */
+extern int kod_db_cnt;
+extern kod_entry** kod_db;
+extern char* kod_db_file;
+
+class kodFileTest : public fileHandlingTest {
+protected:
+ virtual void SetUp() {
+ kod_db_cnt = 0;
+ kod_db = NULL;
+ }
+
+ virtual void TearDown() {
+ }
+};
+
+TEST_F(kodFileTest, ReadEmptyFile) {
+ kod_init_kod_db(CreatePath("kod-test-empty", INPUT_DIR).c_str(), TRUE);
+
+ EXPECT_EQ(0, kod_db_cnt);
+}
+
+TEST_F(kodFileTest, ReadCorrectFile) {
+ kod_init_kod_db(CreatePath("kod-test-correct", INPUT_DIR).c_str(), TRUE);
+
+ EXPECT_EQ(2, kod_db_cnt);
+
+ kod_entry* res;
+
+ ASSERT_EQ(1, search_entry("192.0.2.5", &res));
+ EXPECT_STREQ("DENY", res->type);
+ EXPECT_STREQ("192.0.2.5", res->hostname);
+ EXPECT_EQ(0x12345678, res->timestamp);
+
+ ASSERT_EQ(1, search_entry("192.0.2.100", &res));
+ EXPECT_STREQ("RSTR", res->type);
+ EXPECT_STREQ("192.0.2.100", res->hostname);
+ EXPECT_EQ(0xfff, res->timestamp);
+}
+
+TEST_F(kodFileTest, ReadFileWithBlankLines) {
+ kod_init_kod_db(CreatePath("kod-test-blanks", INPUT_DIR).c_str(), TRUE);
+
+ EXPECT_EQ(3, kod_db_cnt);
+
+ kod_entry* res;
+
+ ASSERT_EQ(1, search_entry("192.0.2.5", &res));
+ EXPECT_STREQ("DENY", res->type);
+ EXPECT_STREQ("192.0.2.5", res->hostname);
+ EXPECT_EQ(0x12345678, res->timestamp);
+
+ ASSERT_EQ(1, search_entry("192.0.2.100", &res));
+ EXPECT_STREQ("RSTR", res->type);
+ EXPECT_STREQ("192.0.2.100", res->hostname);
+ EXPECT_EQ(0xfff, res->timestamp);
+
+ ASSERT_EQ(1, search_entry("example.com", &res));
+ EXPECT_STREQ("DENY", res->type);
+ EXPECT_STREQ("example.com", res->hostname);
+ EXPECT_EQ(0xabcd, res->timestamp);
+}
+
+TEST_F(kodFileTest, WriteEmptyFile) {
+ kod_db_file = estrdup(CreatePath("kod-output-blank", OUTPUT_DIR).c_str());
+
+ write_kod_db();
+
+ // Open file and ensure that the filesize is 0 bytes.
+ std::ifstream is(kod_db_file, std::ios::binary);
+ ASSERT_FALSE(is.fail());
+
+ EXPECT_EQ(0, GetFileSize(is));
+
+ is.close();
+}
+
+TEST_F(kodFileTest, WriteFileWithSingleEntry) {
+ kod_db_file = estrdup(CreatePath("kod-output-single", OUTPUT_DIR).c_str());
+
+ add_entry("host1", "DENY");
+
+ /* Here we must manipulate the timestamps, so they match the one in
+ * the expected file.
+ */
+ kod_db[0]->timestamp = 1;
+
+ write_kod_db();
+
+ // Open file and compare sizes.
+ ifstream actual(kod_db_file, ios::binary);
+ ifstream expected(CreatePath("kod-expected-single", INPUT_DIR).c_str());
+ ASSERT_TRUE(actual.good());
+ ASSERT_TRUE(expected.good());
+
+ ASSERT_EQ(GetFileSize(expected), GetFileSize(actual));
+
+ CompareFileContent(expected, actual);
+}
+
+TEST_F(kodFileTest, WriteFileWithMultipleEntries) {
+ kod_db_file = estrdup(CreatePath("kod-output-multiple", OUTPUT_DIR).c_str());
+
+ add_entry("example.com", "RATE");
+ add_entry("192.0.2.1", "DENY");
+ add_entry("192.0.2.5", "RSTR");
+
+ /*
+ * Manipulate timestamps. This is a bit of a hack, ideally these
+ * tests should not care about the internal representation.
+ */
+ kod_db[0]->timestamp = 0xabcd;
+ kod_db[1]->timestamp = 0xabcd;
+ kod_db[2]->timestamp = 0xabcd;
+
+ write_kod_db();
+
+ // Open file and compare sizes and content.
+ ifstream actual(kod_db_file, ios::binary);
+ ifstream expected(CreatePath("kod-expected-multiple", INPUT_DIR).c_str());
+ ASSERT_TRUE(actual.good());
+ ASSERT_TRUE(expected.good());
+
+ ASSERT_EQ(GetFileSize(expected), GetFileSize(actual));
+
+ CompareFileContent(expected, actual);
+}
diff --git a/sntp/tests/networking.cpp b/sntp/tests/networking.cpp
new file mode 100644
index 000000000000..1d6ad6c44065
--- /dev/null
+++ b/sntp/tests/networking.cpp
@@ -0,0 +1,5 @@
+#include "sntptest.h"
+
+extern "C" {
+#include "networking.h"
+};
diff --git a/sntp/tests/packetHandling.cpp b/sntp/tests/packetHandling.cpp
new file mode 100644
index 000000000000..ef17489bd6b9
--- /dev/null
+++ b/sntp/tests/packetHandling.cpp
@@ -0,0 +1,264 @@
+#include "sntptest.h"
+
+extern "C" {
+#include "kod_management.h"
+#include "main.h"
+#include "networking.h"
+#include "ntp.h"
+};
+
+class mainTest : public sntptest {
+protected:
+ ::testing::AssertionResult LfpEquality(const l_fp &expected, const l_fp &actual) {
+ if (L_ISEQU(&expected, &actual)) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << " expected: " << lfptoa(&expected, FRACTION_PREC)
+ << " (" << expected.l_ui << "." << expected.l_uf << ")"
+ << " but was: " << lfptoa(&actual, FRACTION_PREC)
+ << " (" << actual.l_ui << "." << actual.l_uf << ")";
+ }
+ }
+};
+
+TEST_F(mainTest, GenerateUnauthenticatedPacket) {
+ pkt testpkt;
+
+ timeval xmt;
+ GETTIMEOFDAY(&xmt, NULL);
+ xmt.tv_sec += JAN_1970;
+
+ EXPECT_EQ(LEN_PKT_NOMAC,
+ generate_pkt(&testpkt, &xmt, 0, NULL));
+
+ EXPECT_EQ(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode));
+ EXPECT_EQ(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode));
+ EXPECT_EQ(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode));
+
+ EXPECT_EQ(STRATUM_UNSPEC, PKT_TO_STRATUM(testpkt.stratum));
+ EXPECT_EQ(8, testpkt.ppoll);
+
+ l_fp expected_xmt, actual_xmt;
+ TVTOTS(&xmt, &expected_xmt);
+ NTOHL_FP(&testpkt.xmt, &actual_xmt);
+ EXPECT_TRUE(LfpEquality(expected_xmt, actual_xmt));
+}
+
+TEST_F(mainTest, GenerateAuthenticatedPacket) {
+ key testkey;
+ testkey.next = NULL;
+ testkey.key_id = 30;
+ testkey.key_len = 9;
+ memcpy(testkey.key_seq, "123456789", testkey.key_len);
+ memcpy(testkey.type, "MD5", 3);
+
+ pkt testpkt;
+
+ timeval xmt;
+ GETTIMEOFDAY(&xmt, NULL);
+ xmt.tv_sec += JAN_1970;
+
+ const int EXPECTED_PKTLEN = LEN_PKT_NOMAC + MAX_MD5_LEN;
+
+ EXPECT_EQ(EXPECTED_PKTLEN,
+ generate_pkt(&testpkt, &xmt, testkey.key_id, &testkey));
+
+ EXPECT_EQ(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode));
+ EXPECT_EQ(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode));
+ EXPECT_EQ(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode));
+
+ EXPECT_EQ(STRATUM_UNSPEC, PKT_TO_STRATUM(testpkt.stratum));
+ EXPECT_EQ(8, testpkt.ppoll);
+
+ l_fp expected_xmt, actual_xmt;
+ TVTOTS(&xmt, &expected_xmt);
+ NTOHL_FP(&testpkt.xmt, &actual_xmt);
+ EXPECT_TRUE(LfpEquality(expected_xmt, actual_xmt));
+
+ EXPECT_EQ(testkey.key_id, ntohl(testpkt.exten[0]));
+
+ char expected_mac[MAX_MD5_LEN];
+ ASSERT_EQ(MAX_MD5_LEN - 4, // Remove the key_id, only keep the mac.
+ make_mac((char*)&testpkt, LEN_PKT_NOMAC, MAX_MD5_LEN, &testkey, expected_mac));
+ EXPECT_TRUE(memcmp(expected_mac, (char*)&testpkt.exten[1], MAX_MD5_LEN -4) == 0);
+}
+
+TEST_F(mainTest, OffsetCalculationPositiveOffset) {
+ pkt rpkt;
+
+ rpkt.precision = -16; // 0,000015259
+ rpkt.rootdelay = HTONS_FP(DTOUFP(0.125));
+ rpkt.rootdisp = HTONS_FP(DTOUFP(0.25));
+ // Synch Distance: (0.125+0.25)/2.0 == 0.1875
+ l_fp reftime;
+ get_systime(&reftime);
+ HTONL_FP(&reftime, &rpkt.reftime);
+
+ l_fp tmp;
+
+ // T1 - Originate timestamp
+ tmp.l_ui = 1000000000UL;
+ tmp.l_uf = 0UL;
+ HTONL_FP(&tmp, &rpkt.org);
+
+ // T2 - Receive timestamp
+ tmp.l_ui = 1000000001UL;
+ tmp.l_uf = 2147483648UL;
+ HTONL_FP(&tmp, &rpkt.rec);
+
+ // T3 - Transmit timestamp
+ tmp.l_ui = 1000000002UL;
+ tmp.l_uf = 0UL;
+ HTONL_FP(&tmp, &rpkt.xmt);
+
+ // T4 - Destination timestamp as standard timeval
+ tmp.l_ui = 1000000001UL;
+ tmp.l_uf = 0UL;
+ timeval dst;
+ TSTOTV(&tmp, &dst);
+ dst.tv_sec -= JAN_1970;
+
+ double offset, precision, synch_distance;
+ offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
+
+ EXPECT_DOUBLE_EQ(1.25, offset);
+ EXPECT_DOUBLE_EQ(1. / ULOGTOD(16), precision);
+ // 1.1250150000000001 ?
+ EXPECT_DOUBLE_EQ(1.125015, synch_distance);
+}
+
+TEST_F(mainTest, OffsetCalculationNegativeOffset) {
+ pkt rpkt;
+
+ rpkt.precision = -1;
+ rpkt.rootdelay = HTONS_FP(DTOUFP(0.5));
+ rpkt.rootdisp = HTONS_FP(DTOUFP(0.5));
+ // Synch Distance is (0.5+0.5)/2.0, or 0.5
+ l_fp reftime;
+ get_systime(&reftime);
+ HTONL_FP(&reftime, &rpkt.reftime);
+
+ l_fp tmp;
+
+ // T1 - Originate timestamp
+ tmp.l_ui = 1000000001UL;
+ tmp.l_uf = 0UL;
+ HTONL_FP(&tmp, &rpkt.org);
+
+ // T2 - Receive timestamp
+ tmp.l_ui = 1000000000UL;
+ tmp.l_uf = 2147483648UL;
+ HTONL_FP(&tmp, &rpkt.rec);
+
+ // T3 - Transmit timestamp
+ tmp.l_ui = 1000000001UL;
+ tmp.l_uf = 2147483648UL;
+ HTONL_FP(&tmp, &rpkt.xmt);
+
+ // T4 - Destination timestamp as standard timeval
+ tmp.l_ui = 1000000003UL;
+ tmp.l_uf = 0UL;
+ timeval dst;
+ TSTOTV(&tmp, &dst);
+ dst.tv_sec -= JAN_1970;
+
+ double offset, precision, synch_distance;
+ offset_calculation(&rpkt, LEN_PKT_NOMAC, &dst, &offset, &precision, &synch_distance);
+
+ EXPECT_DOUBLE_EQ(-1, offset);
+ EXPECT_DOUBLE_EQ(1. / ULOGTOD(1), precision);
+ EXPECT_DOUBLE_EQ(1.3333483333333334, synch_distance);
+}
+
+TEST_F(mainTest, HandleUnusableServer) {
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+
+ ZERO(rpkt);
+ ZERO(host);
+ rpktl = SERVER_UNUSEABLE;
+ EXPECT_EQ(-1, handle_pkt(rpktl, &rpkt, &host, ""));
+}
+
+TEST_F(mainTest, HandleUnusablePacket) {
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+
+ ZERO(rpkt);
+ ZERO(host);
+ rpktl = PACKET_UNUSEABLE;
+ EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
+}
+
+TEST_F(mainTest, HandleServerAuthenticationFailure) {
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+
+ ZERO(rpkt);
+ ZERO(host);
+ rpktl = SERVER_AUTH_FAIL;
+ EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
+}
+
+TEST_F(mainTest, HandleKodDemobilize) {
+ const char * HOSTNAME = "192.0.2.1";
+ const char * REASON = "DENY";
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+ kod_entry * entry;
+
+ rpktl = KOD_DEMOBILIZE;
+ ZERO(rpkt);
+ memcpy(&rpkt.refid, REASON, 4);
+ ZERO(host);
+ host.sa4.sin_family = AF_INET;
+ host.sa4.sin_addr.s_addr = inet_addr(HOSTNAME);
+
+ // Test that the KOD-entry is added to the database.
+ kod_init_kod_db("/dev/null", TRUE);
+
+ EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, HOSTNAME));
+
+ ASSERT_EQ(1, search_entry(HOSTNAME, &entry));
+ EXPECT_TRUE(memcmp(REASON, entry->type, 4) == 0);
+}
+
+TEST_F(mainTest, HandleKodRate) {
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+
+ ZERO(rpkt);
+ ZERO(host);
+ rpktl = KOD_RATE;
+ EXPECT_EQ(1, handle_pkt(rpktl, &rpkt, &host, ""));
+}
+
+TEST_F(mainTest, HandleCorrectPacket) {
+ pkt rpkt;
+ sockaddr_u host;
+ int rpktl;
+ l_fp now;
+
+ // We don't want our testing code to actually change the system clock.
+ ASSERT_FALSE(ENABLED_OPT(STEP));
+ ASSERT_FALSE(ENABLED_OPT(SLEW));
+
+ get_systime(&now);
+ HTONL_FP(&now, &rpkt.reftime);
+ HTONL_FP(&now, &rpkt.org);
+ HTONL_FP(&now, &rpkt.rec);
+ HTONL_FP(&now, &rpkt.xmt);
+ rpktl = LEN_PKT_NOMAC;
+ ZERO(host);
+ AF(&host) = AF_INET;
+
+ EXPECT_EQ(0, handle_pkt(rpktl, &rpkt, &host, ""));
+}
+
+/* packetHandling.cpp */
diff --git a/sntp/tests/packetProcessing.cpp b/sntp/tests/packetProcessing.cpp
new file mode 100644
index 000000000000..322b8938ecc2
--- /dev/null
+++ b/sntp/tests/packetProcessing.cpp
@@ -0,0 +1,334 @@
+#include "sntptest.h"
+
+extern "C" {
+#include "networking.h"
+#include "ntp_stdlib.h"
+};
+
+#include <sstream>
+#include <string>
+
+// Hacks into the key database.
+extern key* key_ptr;
+extern int key_cnt;
+
+class packetProcessingTest : public sntptest {
+protected:
+ pkt testpkt;
+ pkt testspkt;
+ sockaddr_u testsock;
+ bool restoreKeyDb;
+
+ void PrepareAuthenticationTest(int key_id,
+ int key_len,
+ const char* type,
+ const void* key_seq) {
+ std::stringstream ss;
+ ss << key_id;
+
+ ActivateOption("-a", ss.str().c_str());
+
+ key_cnt = 1;
+ key_ptr = new key;
+ key_ptr->next = NULL;
+ key_ptr->key_id = key_id;
+ key_ptr->key_len = key_len;
+ memcpy(key_ptr->type, "MD5", 3);
+
+ ASSERT_TRUE(key_len < sizeof(key_ptr->key_seq));
+
+ memcpy(key_ptr->key_seq, key_seq, key_ptr->key_len);
+ restoreKeyDb = true;
+ }
+
+ void PrepareAuthenticationTest(int key_id,
+ int key_len,
+ const void* key_seq) {
+ PrepareAuthenticationTest(key_id, key_len, "MD5", key_seq);
+ }
+
+ virtual void SetUp() {
+ restoreKeyDb = false;
+
+ /* Initialize the test packet and socket,
+ * so they contain at least some valid data. */
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION,
+ MODE_SERVER);
+ testpkt.stratum = STRATUM_REFCLOCK;
+ memcpy(&testpkt.refid, "GPS\0", 4);
+
+ /* Set the origin timestamp of the received packet to the
+ * same value as the transmit timestamp of the sent packet. */
+ l_fp tmp;
+ tmp.l_ui = 1000UL;
+ tmp.l_uf = 0UL;
+
+ HTONL_FP(&tmp, &testpkt.org);
+ HTONL_FP(&tmp, &testspkt.xmt);
+ }
+
+ virtual void TearDown() {
+ if (restoreKeyDb) {
+ key_cnt = 0;
+ delete key_ptr;
+ key_ptr = NULL;
+ }
+ }
+};
+
+TEST_F(packetProcessingTest, TooShortLength) {
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC - 1,
+ MODE_SERVER, &testspkt, "UnitTest"));
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC - 1,
+ MODE_BROADCAST, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, LengthNotMultipleOfFour) {
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC + 6,
+ MODE_SERVER, &testspkt, "UnitTest"));
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC + 3,
+ MODE_BROADCAST, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, TooShortExtensionFieldLength) {
+ /* The lower 16-bits are the length of the extension field.
+ * This lengths must be multiples of 4 bytes, which gives
+ * a minimum of 4 byte extension field length. */
+ testpkt.exten[7] = htonl(3); // 3 bytes is too short.
+
+ /* We send in a pkt_len of header size + 4 byte extension
+ * header + 24 byte MAC, this prevents the length error to
+ * be caught at an earlier stage */
+ int pkt_len = LEN_PKT_NOMAC + 4 + 24;
+
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, UnauthenticatedPacketReject) {
+ // Activate authentication option
+ ActivateOption("-a", "123");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ int pkt_len = LEN_PKT_NOMAC;
+
+ // We demand authentication, but no MAC header is present.
+ EXPECT_EQ(SERVER_AUTH_FAIL,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, CryptoNAKPacketReject) {
+ // Activate authentication option
+ ActivateOption("-a", "123");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ int pkt_len = LEN_PKT_NOMAC + 4; // + 4 byte MAC = Crypto-NAK
+
+ EXPECT_EQ(SERVER_AUTH_FAIL,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, AuthenticatedPacketInvalid) {
+ // Activate authentication option
+ PrepareAuthenticationTest(50, 9, "123456789");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ // Prepare the packet.
+ int pkt_len = LEN_PKT_NOMAC;
+
+ testpkt.exten[0] = htonl(50);
+ int mac_len = make_mac((char*)&testpkt, pkt_len,
+ MAX_MD5_LEN, key_ptr,
+ (char*)&testpkt.exten[1]);
+
+ pkt_len += 4 + mac_len;
+
+ // Now, alter the MAC so it becomes invalid.
+ testpkt.exten[1] += 1;
+
+ EXPECT_EQ(SERVER_AUTH_FAIL,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, AuthenticatedPacketUnknownKey) {
+ // Activate authentication option
+ PrepareAuthenticationTest(30, 9, "123456789");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ // Prepare the packet. Observe that the Key-ID expected is 30,
+ // but the packet has a key id of 50.
+ int pkt_len = LEN_PKT_NOMAC;
+
+ testpkt.exten[0] = htonl(50);
+ int mac_len = make_mac((char*)&testpkt, pkt_len,
+ MAX_MD5_LEN, key_ptr,
+ (char*)&testpkt.exten[1]);
+ pkt_len += 4 + mac_len;
+
+ EXPECT_EQ(SERVER_AUTH_FAIL,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, ServerVersionTooOld) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_OLDVERSION - 1,
+ MODE_CLIENT);
+ ASSERT_LT(PKT_VERSION(testpkt.li_vn_mode), NTP_OLDVERSION);
+
+ int pkt_len = LEN_PKT_NOMAC;
+
+ EXPECT_EQ(SERVER_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, ServerVersionTooNew) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_VERSION + 1,
+ MODE_CLIENT);
+ ASSERT_GT(PKT_VERSION(testpkt.li_vn_mode), NTP_VERSION);
+
+ int pkt_len = LEN_PKT_NOMAC;
+
+ EXPECT_EQ(SERVER_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, NonWantedMode) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_VERSION,
+ MODE_CLIENT);
+
+ // The packet has a mode of MODE_CLIENT, but process_pkt expects MODE_SERVER
+
+ EXPECT_EQ(SERVER_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+/* Tests bug 1597 */
+TEST_F(packetProcessingTest, KoDRate) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.stratum = STRATUM_PKT_UNSPEC;
+ memcpy(&testpkt.refid, "RATE", 4);
+
+ EXPECT_EQ(KOD_RATE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, KoDDeny) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.stratum = STRATUM_PKT_UNSPEC;
+ memcpy(&testpkt.refid, "DENY", 4);
+
+ EXPECT_EQ(KOD_DEMOBILIZE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, RejectUnsyncedServer) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
+ NTP_VERSION,
+ MODE_SERVER);
+
+ EXPECT_EQ(SERVER_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, RejectWrongResponseServerMode) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ l_fp tmp;
+ tmp.l_ui = 1000UL;
+ tmp.l_uf = 0UL;
+ HTONL_FP(&tmp, &testpkt.org);
+
+ tmp.l_ui = 2000UL;
+ tmp.l_uf = 0UL;
+ HTONL_FP(&tmp, &testspkt.xmt);
+
+ EXPECT_EQ(PACKET_UNUSEABLE,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, AcceptNoSentPacketBroadcastMode) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_VERSION,
+ MODE_BROADCAST);
+
+ EXPECT_EQ(LEN_PKT_NOMAC,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_BROADCAST, NULL, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, CorrectUnauthenticatedPacket) {
+ ASSERT_FALSE(ENABLED_OPT(AUTHENTICATION));
+
+ EXPECT_EQ(LEN_PKT_NOMAC,
+ process_pkt(&testpkt, &testsock, LEN_PKT_NOMAC,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
+
+TEST_F(packetProcessingTest, CorrectAuthenticatedPacketMD5) {
+ PrepareAuthenticationTest(10, 15, "123456789abcdef");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ int pkt_len = LEN_PKT_NOMAC;
+
+ // Prepare the packet.
+ testpkt.exten[0] = htonl(10);
+ int mac_len = make_mac((char*)&testpkt, pkt_len,
+ MAX_MD5_LEN, key_ptr,
+ (char*)&testpkt.exten[1]);
+
+ pkt_len += 4 + mac_len;
+
+ EXPECT_EQ(pkt_len,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+
+}
+
+TEST_F(packetProcessingTest, CorrectAuthenticatedPacketSHA1) {
+ PrepareAuthenticationTest(20, 15, "SHA1", "abcdefghijklmno");
+ ASSERT_TRUE(ENABLED_OPT(AUTHENTICATION));
+
+ int pkt_len = LEN_PKT_NOMAC;
+
+ // Prepare the packet.
+ testpkt.exten[0] = htonl(20);
+ int mac_len = make_mac((char*)&testpkt, pkt_len,
+ MAX_MAC_LEN, key_ptr,
+ (char*)&testpkt.exten[1]);
+
+ pkt_len += 4 + mac_len;
+
+ EXPECT_EQ(pkt_len,
+ process_pkt(&testpkt, &testsock, pkt_len,
+ MODE_SERVER, &testspkt, "UnitTest"));
+}
diff --git a/sntp/tests/sntptest.h b/sntp/tests/sntptest.h
new file mode 100644
index 000000000000..d5add9cbf465
--- /dev/null
+++ b/sntp/tests/sntptest.h
@@ -0,0 +1,35 @@
+#ifndef SNTPTEST_H
+#define SNTPTEST_H
+
+#include "tests_main.h"
+
+extern "C" {
+#include "ntp_stdlib.h"
+#include "sntp-opts.h"
+};
+
+class sntptest : public ntptest {
+protected:
+ sntptest() {
+ optionSaveState(&sntpOptions);
+ }
+
+ ~sntptest() {
+ optionRestore(&sntpOptions);
+ }
+
+ void ActivateOption(const char* option, const char* argument) {
+ const int ARGV_SIZE = 4;
+
+ char* opts[ARGV_SIZE];
+
+ opts[0] = estrdup("sntpopts");
+ opts[1] = estrdup(option);
+ opts[2] = estrdup(argument);
+ opts[3] = estrdup("127.0.0.1");
+
+ optionProcess(&sntpOptions, ARGV_SIZE, opts);
+ }
+};
+
+#endif // SNTPTEST_H
diff --git a/sntp/tests/tests-runner b/sntp/tests/tests-runner
new file mode 100755
index 000000000000..412516ca6536
--- /dev/null
+++ b/sntp/tests/tests-runner
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# $builddir is always .
+builddir=.
+# $srcdir will be set to the correct directory when this script is called from
+# the Makefiles generated by Automake.
+
+# Create output directory.
+mkdir -p $builddir/data
+
+# Test executable expects two arguments: test_input_dir and test_output_dir.
+./tests $srcdir/data $builddir/data
+
diff --git a/sntp/tests/utilities.cpp b/sntp/tests/utilities.cpp
new file mode 100644
index 000000000000..4c8c30535064
--- /dev/null
+++ b/sntp/tests/utilities.cpp
@@ -0,0 +1,176 @@
+#include "sntptest.h"
+#include "fileHandlingTest.h"
+
+extern "C" {
+#include "main.h"
+#include "utilities.h"
+const char * Version = "stub unit test Version string";
+};
+
+using std::string;
+
+class utilitiesTest : public sntptest {
+protected:
+ sockaddr_u CreateSockaddr4(const char* address) {
+ sockaddr_u s;
+ s.sa4.sin_family = AF_INET;
+ s.sa4.sin_addr.s_addr = inet_addr(address);
+ SET_PORT(&s, 123);
+
+ return s;
+ }
+
+ addrinfo CreateAddrinfo(sockaddr_u* sock) {
+ addrinfo a;
+ a.ai_family = sock->sa.sa_family;
+ a.ai_addrlen = SIZEOF_SOCKADDR(a.ai_family);
+ a.ai_addr = &sock->sa;
+ return a;
+ }
+};
+
+class debugUtilitiesTest : public fileHandlingTest {
+protected:
+ bool outputFileOpened;
+ FILE* outputFile;
+
+ debugUtilitiesTest() : outputFileOpened(false) {}
+
+ void InitDebugTest(const string& filename) {
+ // Clear the contents of the current file.
+ // Open the output file
+ outputFile = fopen(filename.c_str(), "w+");
+ ASSERT_TRUE(outputFile != NULL);
+ outputFileOpened = true;
+ }
+
+ // Closes outputFile, and compare contents.
+ void FinishDebugTest(const string& expected,
+ const string& actual) {
+ if (outputFileOpened)
+ fclose(outputFile);
+
+ ifstream e(expected.c_str());
+ ifstream a(actual.c_str());
+ ASSERT_TRUE(e.good());
+ ASSERT_TRUE(a.good());
+
+ CompareFileContent(e, a);
+ }
+};
+
+/*
+ * These tests are essentially a copy of the tests for socktoa()
+ * in libntp. If sntp switches to using that functions, these
+ * tests can be removed.
+ */
+
+TEST_F(utilitiesTest, IPv4Address) {
+ const char* ADDR = "192.0.2.10";
+
+ sockaddr_u input = CreateSockaddr4(ADDR);
+ addrinfo inputA = CreateAddrinfo(&input);
+
+ EXPECT_STREQ(ADDR, ss_to_str(&input));
+ EXPECT_STREQ(ADDR, addrinfo_to_str(&inputA));
+}
+
+TEST_F(utilitiesTest, IPv6Address) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+ const char * expected = "2001:db8:85a3:8d3:1319:8a2e:370:7334";
+ sockaddr_u input;
+ addrinfo inputA;
+
+ memset(&input, 0, sizeof(input));
+ input.sa6.sin6_family = AF_INET6;
+ input.sa6.sin6_addr = address;
+ EXPECT_STREQ(expected, ss_to_str(&input));
+
+ inputA = CreateAddrinfo(&input);
+ EXPECT_STREQ(expected, addrinfo_to_str(&inputA));
+}
+
+TEST_F(utilitiesTest, SetLiVnMode1) {
+ pkt expected;
+ expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_VERSION,
+ MODE_SERVER);
+
+ pkt actual;
+ set_li_vn_mode(&actual, LEAP_NOWARNING, NTP_VERSION,
+ MODE_SERVER);
+
+ EXPECT_EQ(expected.li_vn_mode, actual.li_vn_mode);
+}
+
+TEST_F(utilitiesTest, SetLiVnMode2) {
+ pkt expected;
+ expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC,
+ NTP_OLDVERSION,
+ MODE_BROADCAST);
+
+ pkt actual;
+ set_li_vn_mode(&actual, LEAP_NOTINSYNC, NTP_OLDVERSION,
+ MODE_BROADCAST);
+
+ EXPECT_EQ(expected.li_vn_mode, actual.li_vn_mode);
+}
+
+/* Debug utilities tests */
+
+TEST_F(debugUtilitiesTest, PktOutput) {
+ string filename = CreatePath("debug-output-pkt", OUTPUT_DIR);
+ InitDebugTest(filename);
+
+ pkt testpkt;
+ memset(&testpkt, 0, sizeof(pkt));
+ testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING,
+ NTP_VERSION,
+ MODE_SERVER);
+
+ l_fp test;
+ test.l_ui = 8;
+ test.l_uf = 2147483647; // Lots of ones.
+ HTONL_FP(&test, &testpkt.xmt);
+
+ pkt_output(&testpkt, LEN_PKT_NOMAC, outputFile);
+
+ FinishDebugTest(CreatePath("debug-input-pkt", INPUT_DIR), filename);
+}
+
+TEST_F(debugUtilitiesTest, LfpOutputBinaryFormat) {
+ string filename = CreatePath("debug-output-lfp-bin", OUTPUT_DIR);
+ InitDebugTest(filename);
+
+ l_fp test;
+ test.l_ui = 63; // 00000000 00000000 00000000 00111111
+ test.l_uf = 127; // 00000000 00000000 00000000 01111111
+
+ l_fp network;
+ HTONL_FP(&test, &network);
+
+ l_fp_output_bin(&network, outputFile);
+
+ FinishDebugTest(CreatePath("debug-input-lfp-bin", INPUT_DIR), filename);
+}
+
+TEST_F(debugUtilitiesTest, LfpOutputDecimalFormat) {
+ string filename = CreatePath("debug-output-lfp-dec", OUTPUT_DIR);
+ InitDebugTest(filename);
+
+ l_fp test;
+ test.l_ui = 6310; // 0x000018A6
+ test.l_uf = 308502; // 0x00004B516
+
+ l_fp network;
+ HTONL_FP(&test, &network);
+
+ l_fp_output_dec(&network, outputFile);
+
+ FinishDebugTest(CreatePath("debug-input-lfp-dec", INPUT_DIR), filename);
+}
diff --git a/sntp/tests_main.cpp b/sntp/tests_main.cpp
new file mode 100644
index 000000000000..3d11bb1302ef
--- /dev/null
+++ b/sntp/tests_main.cpp
@@ -0,0 +1,25 @@
+#include "tests_main.h"
+
+int main(int argc, char **argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+
+ init_lib();
+ init_auth();
+
+ // Some tests makes use of extra parameters passed to the tests
+ // executable. Save these params as static members of the base class.
+ if (argc > 1) {
+ ntptest::SetExtraParams(1, argc-1, argv);
+ }
+
+ return RUN_ALL_TESTS();
+}
+
+std::vector<std::string> ntptest::m_params;
+
+void ntptest::SetExtraParams(int start, int count, char** argv)
+{
+ for (int i=0; i<count; i++) {
+ m_params.push_back(argv[i+start]);
+ }
+}
diff --git a/sntp/tests_main.h b/sntp/tests_main.h
new file mode 100644
index 000000000000..991f4b6d0da3
--- /dev/null
+++ b/sntp/tests_main.h
@@ -0,0 +1,22 @@
+#ifndef TESTS_MAIN_H
+#define TESTS_MAIN_H
+
+#include "config.h"
+
+#include <string>
+#include <vector>
+
+#include <gtest/gtest.h>
+
+extern "C" {
+#include "ntp_stdlib.h"
+}
+
+class ntptest : public ::testing::Test {
+public:
+ static void SetExtraParams(int start, int count, char** argv);
+protected:
+ static std::vector<std::string> m_params;
+};
+
+#endif // TESTS_MAIN_H
diff --git a/sntp/utilities.c b/sntp/utilities.c
index e19ee1c354ef..591c4f7ade9c 100644
--- a/sntp/utilities.c
+++ b/sntp/utilities.c
@@ -33,21 +33,12 @@ pkt_output (
/* Output a long floating point value in hex in the style described above
*/
void
-l_fp_output (
- l_fp *ts,
- FILE *output
- )
+l_fp_output(
+ l_fp * ts,
+ FILE * output
+ )
{
- register int a;
-
- fprintf(output, HLINE);
-
- for(a=0; a<8; a++)
- fprintf(output, "%i: %x \t", a, ((unsigned char *) ts)[a]);
-
- fprintf(output, "\n");
- fprintf(output, HLINE);
-
+ fprintf(output, "%s\n", prettydate(ts));
}
/* Output a long floating point value in binary in the style described above
@@ -112,34 +103,32 @@ l_fp_output_dec (
*/
char *
addrinfo_to_str (
- struct addrinfo *addr
+ const struct addrinfo *addr
)
{
sockaddr_u s;
- memset(&s, 0, sizeof(s));
+ ZERO(s);
memcpy(&s, addr->ai_addr, min(sizeof(s), addr->ai_addrlen));
return ss_to_str(&s);
}
+
/* Convert a sockaddr_u to a string containing the address in
* style of inet_ntoa
* Why not switch callers to use stoa from libntp? No free() needed
* in that case.
*/
char *
-ss_to_str (
+ss_to_str(
sockaddr_u *saddr
)
{
- char * buf;
-
- buf = emalloc(INET6_ADDRSTRLEN);
- strncpy(buf, stoa(saddr), INET6_ADDRSTRLEN);
-
- return buf;
+ return estrdup(stoa(saddr));
}
+
+
/*
* Converts a struct tv to a date string
*/
@@ -186,5 +175,35 @@ tv_to_str(
}
-
-
+/*
+ *
+ * hostnameaddr()
+ *
+ * Formats the hostname and resulting numeric IP address into a string,
+ * avoiding duplication if the "hostname" was in fact a numeric address.
+ *
+ */
+const char *
+hostnameaddr(
+ const char * hostname,
+ const sockaddr_u * addr
+ )
+{
+ const char * addrtxt;
+ char * result;
+ int cnt;
+
+ addrtxt = stoa(addr);
+ LIB_GETBUF(result);
+ if (strcmp(hostname, addrtxt))
+ cnt = snprintf(result, LIB_BUFLENGTH, "%s %s",
+ hostname, addrtxt);
+ else
+ cnt = snprintf(result, LIB_BUFLENGTH, "%s", addrtxt);
+ if (cnt >= LIB_BUFLENGTH)
+ snprintf(result, LIB_BUFLENGTH,
+ "hostnameaddr ERROR have %d (%d needed)",
+ LIB_BUFLENGTH, cnt + 1);
+
+ return result;
+}
diff --git a/sntp/utilities.h b/sntp/utilities.h
index a122f868d961..a022c7d49769 100644
--- a/sntp/utilities.h
+++ b/sntp/utilities.h
@@ -4,22 +4,24 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#include <ntp_stdlib.h>
-#include <ntp_fp.h>
-#include <ntp.h>
+
+#include "ntp.h"
+#include "ntp_stdlib.h"
+#include "lib_strbuf.h"
#define HLINE "--------------------------------------------------------------------------------\n"
#define PHLINE fprintf(output, HLINE);
#define STDLINE printf(HLINE);
-void pkt_output (struct pkt *dpkg, int pkt_length, FILE *output);
-void l_fp_output (l_fp *ts, FILE *output);
-void l_fp_output_bin (l_fp *ts, FILE *output);
-void l_fp_output_dec (l_fp *ts, FILE *output);
+void pkt_output(struct pkt *dpkg, int pkt_length, FILE *output);
+void l_fp_output(l_fp *ts, FILE *output);
+void l_fp_output_bin(l_fp *ts, FILE *output);
+void l_fp_output_dec(l_fp *ts, FILE *output);
-char *addrinfo_to_str (struct addrinfo *addr);
-char *ss_to_str (sockaddr_u *saddr);
-char *tv_to_str (const struct timeval *tv);
+char *addrinfo_to_str(const struct addrinfo *addr);
+char *ss_to_str(sockaddr_u *saddr);
+char *tv_to_str(const struct timeval *tv);
+const char * hostnameaddr(const char *, const sockaddr_u *);
-#endif
+#endif /* UTILITIES_H */
diff --git a/sntp/version.def b/sntp/version.def
deleted file mode 100644
index 706bf967cac2..000000000000
--- a/sntp/version.def
+++ /dev/null
@@ -1 +0,0 @@
-version = '4.2.6p5';
diff --git a/sntp/version.m4 b/sntp/version.m4
deleted file mode 100644
index 3b6882961ff5..000000000000
--- a/sntp/version.m4
+++ /dev/null
@@ -1 +0,0 @@
-m4_define([VERSION_NUMBER],[4.2.6p5])
diff --git a/sntp/version.texi b/sntp/version.texi
deleted file mode 100644
index 1d549577f406..000000000000
--- a/sntp/version.texi
+++ /dev/null
@@ -1,3 +0,0 @@
-@set UPDATED 24 December 2011
-@set EDITION 4.2.6p5
-@set VERSION 4.2.6p5
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 000000000000..a7d7c3c7e8d3
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,9 @@
+NULL =
+SUBDIRS =
+
+if GTEST_AVAILABLE
+SUBDIRS += libntp \
+ ntpd \
+ $(NULL)
+endif
+
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 000000000000..99270f31e08f
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,737 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+@GTEST_AVAILABLE_TRUE@am__append_1 = libntp \
+@GTEST_AVAILABLE_TRUE@ ntpd \
+@GTEST_AVAILABLE_TRUE@ $(NULL)
+
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = libntp ntpd
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+SUBDIRS = $(am__append_1)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# 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):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ 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; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ 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_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+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 mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-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/tests/libntp/Makefile.am b/tests/libntp/Makefile.am
new file mode 100644
index 000000000000..2f19a89fe731
--- /dev/null
+++ b/tests/libntp/Makefile.am
@@ -0,0 +1,93 @@
+NULL =
+BUILT_SOURCES =
+CLEANFILES =
+
+check_PROGRAMS = tests
+
+LDADD = \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += -I$(top_srcdir)/sntp
+AM_CPPFLAGS += $(GTEST_CPPFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
+ libntptest.cpp \
+ a_md5encrypt.cpp \
+ atoint.cpp \
+ atouint.cpp \
+ authkeys.cpp \
+ buftvtots.cpp \
+ calendar.cpp \
+ caljulian.cpp \
+ caltontp.cpp \
+ calyearstart.cpp \
+ clocktime.cpp \
+ decodenetnum.cpp \
+ hextoint.cpp \
+ hextolfp.cpp \
+ humandate.cpp \
+ lfpfunc.cpp \
+ lfptostr.cpp \
+ modetoa.cpp \
+ msyslog.cpp \
+ netof.cpp \
+ numtoa.cpp \
+ numtohost.cpp \
+ octtoint.cpp \
+ prettydate.cpp \
+ recvbuff.cpp \
+ refnumtoa.cpp \
+ sfptostr.cpp \
+ socktoa.cpp \
+ ssl_init.cpp \
+ statestr.cpp \
+ strtolfp.cpp \
+ timespecops.cpp \
+ timestructs.cpp \
+ timevalops.cpp \
+ tstotv.cpp \
+ tvtots.cpp \
+ uglydate.cpp \
+ vi64ops.cpp \
+ ymd2yd.cpp \
+ $(NULL)
+
+noinst_HEADERS = lfptest.h \
+ libntptest.h \
+ sockaddrtest.h \
+ timestructs.h \
+ $(NULL)
+
+TESTS =
+
+if !NTP_CROSSCOMPILE
+TESTS += tests
+endif
+
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES += check-libntp
+CLEANFILES += check-libntp
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/tests/libntp/Makefile.in b/tests/libntp/Makefile.in
new file mode 100644
index 000000000000..118e215d6711
--- /dev/null
+++ b/tests/libntp/Makefile.in
@@ -0,0 +1,971 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+check_PROGRAMS = tests$(EXEEXT)
+TESTS = $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_1 = tests
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf
+subdir = tests/libntp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__objects_1 =
+am_tests_OBJECTS = tests_main.$(OBJEXT) libntptest.$(OBJEXT) \
+ a_md5encrypt.$(OBJEXT) atoint.$(OBJEXT) atouint.$(OBJEXT) \
+ authkeys.$(OBJEXT) buftvtots.$(OBJEXT) calendar.$(OBJEXT) \
+ caljulian.$(OBJEXT) caltontp.$(OBJEXT) calyearstart.$(OBJEXT) \
+ clocktime.$(OBJEXT) decodenetnum.$(OBJEXT) hextoint.$(OBJEXT) \
+ hextolfp.$(OBJEXT) humandate.$(OBJEXT) lfpfunc.$(OBJEXT) \
+ lfptostr.$(OBJEXT) modetoa.$(OBJEXT) msyslog.$(OBJEXT) \
+ netof.$(OBJEXT) numtoa.$(OBJEXT) numtohost.$(OBJEXT) \
+ octtoint.$(OBJEXT) prettydate.$(OBJEXT) recvbuff.$(OBJEXT) \
+ refnumtoa.$(OBJEXT) sfptostr.$(OBJEXT) socktoa.$(OBJEXT) \
+ ssl_init.$(OBJEXT) statestr.$(OBJEXT) strtolfp.$(OBJEXT) \
+ timespecops.$(OBJEXT) timestructs.$(OBJEXT) \
+ timevalops.$(OBJEXT) tstotv.$(OBJEXT) tvtots.$(OBJEXT) \
+ uglydate.$(OBJEXT) vi64ops.$(OBJEXT) ymd2yd.$(OBJEXT) \
+ $(am__objects_1)
+tests_OBJECTS = $(am_tests_OBJECTS)
+tests_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+tests_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(tests_SOURCES)
+DIST_SOURCES = $(tests_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+@NTP_CROSSCOMPILE_FALSE@am__EXEEXT_1 = tests$(EXEEXT)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
+LDADD = \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp $(GTEST_CPPFLAGS) \
+ $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
+tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
+ libntptest.cpp \
+ a_md5encrypt.cpp \
+ atoint.cpp \
+ atouint.cpp \
+ authkeys.cpp \
+ buftvtots.cpp \
+ calendar.cpp \
+ caljulian.cpp \
+ caltontp.cpp \
+ calyearstart.cpp \
+ clocktime.cpp \
+ decodenetnum.cpp \
+ hextoint.cpp \
+ hextolfp.cpp \
+ humandate.cpp \
+ lfpfunc.cpp \
+ lfptostr.cpp \
+ modetoa.cpp \
+ msyslog.cpp \
+ netof.cpp \
+ numtoa.cpp \
+ numtohost.cpp \
+ octtoint.cpp \
+ prettydate.cpp \
+ recvbuff.cpp \
+ refnumtoa.cpp \
+ sfptostr.cpp \
+ socktoa.cpp \
+ ssl_init.cpp \
+ statestr.cpp \
+ strtolfp.cpp \
+ timespecops.cpp \
+ timestructs.cpp \
+ timevalops.cpp \
+ tstotv.cpp \
+ tvtots.cpp \
+ uglydate.cpp \
+ vi64ops.cpp \
+ ymd2yd.cpp \
+ $(NULL)
+
+noinst_HEADERS = lfptest.h \
+ libntptest.h \
+ sockaddrtest.h \
+ timestructs.h \
+ $(NULL)
+
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/libntp/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/libntp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES)
+ @rm -f tests$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/a_md5encrypt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atouint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authkeys.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buftvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caljulian.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caltontp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calyearstart.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clocktime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decodenetnum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hextolfp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/humandate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfpfunc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libntptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modetoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msyslog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netof.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numtohost.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/octtoint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prettydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvbuff.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refnumtoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfptostr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socktoa.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtolfp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespecops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timestructs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timevalops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstotv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvtots.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uglydate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vi64ops.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+tests_main.o: $(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
+
+tests_main.obj: $(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+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_sh_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+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-checkPROGRAMS clean-generic clean-libtool \
+ 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:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
+ @[ -f $@ ] || \
+ cp $(top_srcdir)/deps-ver $@
+ @[ -w $@ ] || \
+ chmod ug+w $@
+ @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
+ echo -n "Prior $(subdir)/$(DEPDIR) version " && \
+ cat $@ && \
+ rm -rf $(DEPDIR) && \
+ mkdir $(DEPDIR) && \
+ case "$(top_builddir)" in \
+ .) \
+ ./config.status Makefile depfiles \
+ ;; \
+ *) \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
+ ;; \
+ esac && \
+ echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
+ cat $(top_srcdir)/deps-ver \
+ )
+ cp $(top_srcdir)/deps-ver $@
+
+.deps-ver: $(top_srcdir)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
+ @touch $@
+
+#
+# depsver.mf included in Makefile.am for directories with .deps
+#
+# When building in the same directory with sources that change over
+# time, such as when tracking using bk, the .deps files can become
+# stale with respect to moved, deleted, or superceded headers. Most
+# commonly, this would exhibit as make reporting a failure to make a
+# header file which is no longer in the location given. To address
+# this issue, we use a deps-ver file which is updated with each change
+# that breaks old .deps files. A copy of deps-ver is made into
+# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
+# with different contents than deps-ver, we make clean to ensure all
+# .o files built before the incompatible change are rebuilt along with
+# their updated .deps files, then remove $(DEPDIR) and recreate it as
+# empty stubs.
+#
+# It is normal when configured with --disable-dependency-tracking for
+# the DEPDIR to not have been created. For this reason, we use the
+# intermediate target .deps-ver, which invokes make recursively if
+# DEPDIR exists.
+#
+# If you modify depsver.mf, please make the changes to the master
+# copy, the one in sntp is copied by the bootstrap script from it.
+#
+# This comment block follows rather than leads the related code so that
+# it stays with it in the generated Makefile.in and Makefile.
+#
+
+# 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/tests/libntp/a_md5encrypt.cpp b/tests/libntp/a_md5encrypt.cpp
new file mode 100644
index 000000000000..f4cea7e54981
--- /dev/null
+++ b/tests/libntp/a_md5encrypt.cpp
@@ -0,0 +1,89 @@
+#include "libntptest.h"
+
+extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
+#include "ntp.h"
+#include "ntp_stdlib.h"
+};
+
+class a_md5encryptTest : public libntptest {
+protected:
+};
+
+/*
+ * Example packet with MD5 hash calculated manually.
+ */
+const int keytype = KEY_TYPE_MD5;
+const char *key = "abcdefgh";
+const u_short keyLength = 8;
+const char *packet = "ijklmnopqrstuvwx";
+const int packetLength = 16;
+const int keyIdLength = 4;
+const int digestLength = 16;
+const int totalLength = packetLength + keyIdLength + digestLength;
+const char *expectedPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x53";
+
+TEST_F(a_md5encryptTest, Encrypt) {
+ char *packetPtr = new char[totalLength];
+ memset(packetPtr+packetLength, 0, keyIdLength);
+ memcpy(packetPtr, packet, packetLength);
+
+ cache_secretsize = keyLength;
+
+ int length = MD5authencrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength);
+
+ EXPECT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)packetPtr, packetLength, length));
+
+ EXPECT_EQ(20, length);
+ EXPECT_TRUE(memcmp(expectedPacket, packetPtr, totalLength) == 0);
+
+ delete[] packetPtr;
+}
+
+TEST_F(a_md5encryptTest, DecryptValid) {
+ cache_secretsize = keyLength;
+
+ EXPECT_TRUE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)expectedPacket, packetLength, 20));
+}
+
+TEST_F(a_md5encryptTest, DecryptInvalid) {
+ cache_secretsize = keyLength;
+
+ const char *invalidPacket = "ijklmnopqrstuvwx\0\0\0\0\x0c\x0e\x84\xcf\x0b\xb7\xa8\x68\x8e\x52\x38\xdb\xbc\x1c\x39\x54";
+
+ EXPECT_FALSE(MD5authdecrypt(keytype, (u_char*)key, (u_int32*)invalidPacket, packetLength, 20));
+}
+
+TEST_F(a_md5encryptTest, IPv4AddressToRefId) {
+ sockaddr_u addr;
+ addr.sa4.sin_family = AF_INET;
+ addr.sa4.sin_port = htons(80);
+
+ u_int32 address = inet_addr("192.0.2.1");
+ addr.sa4.sin_addr.s_addr = address;
+
+ EXPECT_EQ(address, addr2refid(&addr));
+}
+
+TEST_F(a_md5encryptTest, IPv6AddressToRefId) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+
+
+ sockaddr_u addr;
+ addr.sa6.sin6_family = AF_INET6;
+
+ addr.sa6.sin6_addr = address;
+
+ const int expected = 0x75cffd52;
+
+ EXPECT_EQ(expected, addr2refid(&addr));
+}
diff --git a/tests/libntp/atoint.cpp b/tests/libntp/atoint.cpp
new file mode 100644
index 000000000000..371f3fe0a2a1
--- /dev/null
+++ b/tests/libntp/atoint.cpp
@@ -0,0 +1,48 @@
+#include "libntptest.h"
+
+class atointTest : public libntptest {
+};
+
+TEST_F(atointTest, RegularPositive) {
+ const char *str = "17";
+ long val;
+
+ ASSERT_TRUE(atoint(str, &val));
+ EXPECT_EQ(17, val);
+}
+
+TEST_F(atointTest, RegularNegative) {
+ const char *str = "-20";
+ long val;
+
+ ASSERT_TRUE(atoint(str, &val));
+ EXPECT_EQ(-20, val);
+}
+
+TEST_F(atointTest, PositiveOverflowBoundary) {
+ const char *str = "2147483648";
+ long val;
+
+ EXPECT_FALSE(atoint(str, &val));
+}
+
+TEST_F(atointTest, NegativeOverflowBoundary) {
+ const char *str = "-2147483649";
+ long val;
+
+ EXPECT_FALSE(atoint(str, &val));
+}
+
+TEST_F(atointTest, PositiveOverflowBig) {
+ const char *str = "2300000000";
+ long val;
+
+ EXPECT_FALSE(atoint(str, &val));
+}
+
+TEST_F(atointTest, IllegalCharacter) {
+ const char *str = "4500l";
+ long val;
+
+ EXPECT_FALSE(atoint(str, &val));
+}
diff --git a/tests/libntp/atouint.cpp b/tests/libntp/atouint.cpp
new file mode 100644
index 000000000000..cc8cc394b840
--- /dev/null
+++ b/tests/libntp/atouint.cpp
@@ -0,0 +1,40 @@
+#include "libntptest.h"
+
+class atouintTest : public libntptest {
+};
+
+TEST_F(atouintTest, RegularPositive) {
+ const char *str = "305";
+ u_long actual;
+
+ ASSERT_TRUE(atouint(str, &actual));
+ EXPECT_EQ(305, actual);
+}
+
+TEST_F(atouintTest, PositiveOverflowBoundary) {
+ const char *str = "4294967296";
+ u_long actual;
+
+ ASSERT_FALSE(atouint(str, &actual));
+}
+
+TEST_F(atouintTest, PositiveOverflowBig) {
+ const char *str = "8000000000";
+ u_long actual;
+
+ ASSERT_FALSE(atouint(str, &actual));
+}
+
+TEST_F(atouintTest, Negative) {
+ const char *str = "-1";
+ u_long actual;
+
+ ASSERT_FALSE(atouint(str, &actual));
+}
+
+TEST_F(atouintTest, IllegalChar) {
+ const char *str = "50c3";
+ u_long actual;
+
+ ASSERT_FALSE(atouint(str, &actual));
+}
diff --git a/tests/libntp/authkeys.cpp b/tests/libntp/authkeys.cpp
new file mode 100644
index 000000000000..8dd33a9accfe
--- /dev/null
+++ b/tests/libntp/authkeys.cpp
@@ -0,0 +1,100 @@
+/* This file contains test for both libntp/authkeys.c and libntp/authusekey.c */
+
+#include "libntptest.h"
+
+extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
+#include "ntp.h"
+#include "ntp_stdlib.h"
+};
+
+class authkeysTest : public libntptest {
+protected:
+ static const int KEYTYPE = KEY_TYPE_MD5;
+
+ virtual void SetUp() {
+ /*
+ * init_auth() is called by tests_main.cpp earlier. It
+ * does not initialize global variables like
+ * authnumkeys, so let's reset them to zero here.
+ */
+ authnumkeys = 0;
+
+ /*
+ * Especially, empty the key cache!
+ */
+ cache_keyid = 0;
+ cache_type = 0;
+ cache_flags = 0;
+ cache_secret = NULL;
+ cache_secretsize = 0;
+ }
+
+ void AddTrustedKey(keyid_t keyno) {
+ /*
+ * We need to add a MD5-key in addition to setting the
+ * trust, because authhavekey() requires type != 0.
+ */
+ MD5auth_setkey(keyno, KEYTYPE, NULL, 0);
+
+ authtrust(keyno, TRUE);
+ }
+
+ void AddUntrustedKey(keyid_t keyno) {
+ authtrust(keyno, FALSE);
+ }
+};
+
+TEST_F(authkeysTest, AddTrustedKeys) {
+ const keyid_t KEYNO1 = 5;
+ const keyid_t KEYNO2 = 8;
+
+ AddTrustedKey(KEYNO1);
+ AddTrustedKey(KEYNO2);
+
+ EXPECT_TRUE(authistrusted(KEYNO1));
+ EXPECT_TRUE(authistrusted(KEYNO2));
+}
+
+TEST_F(authkeysTest, AddUntrustedKey) {
+ const keyid_t KEYNO = 3;
+
+ AddUntrustedKey(KEYNO);
+
+ EXPECT_FALSE(authistrusted(KEYNO));
+}
+
+TEST_F(authkeysTest, HaveKeyCorrect) {
+ const keyid_t KEYNO = 3;
+
+ AddTrustedKey(KEYNO);
+
+ EXPECT_TRUE(auth_havekey(KEYNO));
+ EXPECT_TRUE(authhavekey(KEYNO));
+}
+
+TEST_F(authkeysTest, HaveKeyIncorrect) {
+ const keyid_t KEYNO = 2;
+
+ EXPECT_FALSE(auth_havekey(KEYNO));
+ EXPECT_FALSE(authhavekey(KEYNO));
+}
+
+TEST_F(authkeysTest, AddWithAuthUseKey) {
+ const keyid_t KEYNO = 5;
+ const char* KEY = "52a";
+
+ EXPECT_TRUE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));
+}
+
+TEST_F(authkeysTest, EmptyKey) {
+ const keyid_t KEYNO = 3;
+ const char* KEY = "";
+
+
+ EXPECT_FALSE(authusekey(KEYNO, KEYTYPE, (u_char*)KEY));
+}
diff --git a/tests/libntp/buftvtots.cpp b/tests/libntp/buftvtots.cpp
new file mode 100644
index 000000000000..bb8a32d35bfa
--- /dev/null
+++ b/tests/libntp/buftvtots.cpp
@@ -0,0 +1,61 @@
+#include "lfptest.h"
+
+extern "C" {
+#include "ntp_unixtime.h"
+};
+
+// Required for Solaris.
+#include <math.h>
+
+class buftvtotsTest : public lfptest {
+};
+
+#ifndef SYS_WINNT
+TEST_F(buftvtotsTest, ZeroBuffer) {
+ const timeval input = {0, 0};
+ const l_fp expected = {0 + JAN_1970, 0};
+
+ l_fp actual;
+
+ ASSERT_TRUE(buftvtots((const char*)(&input), &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(buftvtotsTest, IntegerAndFractionalBuffer) {
+ const timeval input = {5, 500000}; // 5.5
+ const l_fp expected = {5 + JAN_1970, HALF};
+
+ l_fp actual;
+
+ ASSERT_TRUE(buftvtots((const char*)(&input), &actual));
+
+ // Compare the fractional part with an absolute error given.
+ EXPECT_EQ(expected.l_ui, actual.l_ui);
+
+ double expectedDouble, actualDouble;
+ M_LFPTOD(0, expected.l_uf, expectedDouble);
+ M_LFPTOD(0, actual.l_uf, actualDouble);
+
+ // The error should be less than 0.5 us
+ EXPECT_NEAR(expectedDouble, actualDouble, 0.0000005);
+}
+
+TEST_F(buftvtotsTest, IllegalMicroseconds) {
+ const timeval input = {0, 1100000}; // > 999 999 microseconds.
+
+ l_fp actual;
+
+ ASSERT_FALSE(buftvtots((const char*)(&input), &actual));
+}
+
+#else
+TEST_F(buftvtotsTest, AlwaysFalseOnWindows) {
+ /*
+ * Under Windows, buftvtots will just return
+ * 0 (false).
+ */
+ l_fp actual;
+ ASSERT_FALSE(buftvtots("", &actual));
+}
+
+#endif
diff --git a/tests/libntp/calendar.cpp b/tests/libntp/calendar.cpp
new file mode 100644
index 000000000000..35b39c7e529f
--- /dev/null
+++ b/tests/libntp/calendar.cpp
@@ -0,0 +1,337 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_calendar.h"
+}
+
+#include <string>
+#include <sstream>
+
+class calendarTest : public libntptest {
+protected:
+ static int leapdays(int year);
+
+ std::string CalendarToString(const calendar &cal);
+ std::string CalendarToString(const isodate &iso);
+ ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual);
+ ::testing::AssertionResult IsEqual(const isodate &expected, const isodate &actual);
+
+ std::string DateToString(const calendar &cal);
+ std::string DateToString(const isodate &iso);
+ ::testing::AssertionResult IsEqualDate(const calendar &expected, const calendar &actual);
+ ::testing::AssertionResult IsEqualDate(const isodate &expected, const isodate &actual);
+};
+
+
+// ---------------------------------------------------------------------
+// test support stuff
+// ---------------------------------------------------------------------
+int
+calendarTest::leapdays(int year)
+{
+ if (year % 400 == 0)
+ return 1;
+ if (year % 100 == 0)
+ return 0;
+ if (year % 4 == 0)
+ return 1;
+ return 0;
+}
+
+std::string
+calendarTest::CalendarToString(const calendar &cal) {
+ std::ostringstream ss;
+ ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
+ << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
+ << (u_int)cal.minute << ":" << (u_int)cal.second;
+ return ss.str();
+}
+
+std::string
+calendarTest:: CalendarToString(const isodate &iso) {
+ std::ostringstream ss;
+ ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday
+ << (u_int)iso.hour << ":" << (u_int)iso.minute << ":" << (u_int)iso.second;
+ return ss.str();
+}
+
+::testing::AssertionResult
+calendarTest:: IsEqual(const calendar &expected, const calendar &actual) {
+ if (expected.year == actual.year &&
+ (!expected.yearday || expected.yearday == actual.yearday) &&
+ expected.month == actual.month &&
+ expected.monthday == actual.monthday &&
+ expected.hour == actual.hour &&
+ expected.minute == actual.minute &&
+ expected.second == actual.second) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << CalendarToString(expected) << " but was "
+ << CalendarToString(actual);
+ }
+}
+
+::testing::AssertionResult
+calendarTest:: IsEqual(const isodate &expected, const isodate &actual) {
+ if (expected.year == actual.year &&
+ expected.week == actual.week &&
+ expected.weekday == actual.weekday &&
+ expected.hour == actual.hour &&
+ expected.minute == actual.minute &&
+ expected.second == actual.second) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << CalendarToString(expected) << " but was "
+ << CalendarToString(actual);
+ }
+}
+
+std::string
+calendarTest:: DateToString(const calendar &cal) {
+ std::ostringstream ss;
+ ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
+ << " (" << cal.yearday << ")";
+ return ss.str();
+}
+
+std::string
+calendarTest:: DateToString(const isodate &iso) {
+ std::ostringstream ss;
+ ss << iso.year << "-" << (u_int)iso.week << "-" << (u_int)iso.weekday;
+ return ss.str();
+}
+
+::testing::AssertionResult
+calendarTest:: IsEqualDate(const calendar &expected, const calendar &actual) {
+ if (expected.year == actual.year &&
+ (!expected.yearday || expected.yearday == actual.yearday) &&
+ expected.month == actual.month &&
+ expected.monthday == actual.monthday) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << DateToString(expected) << " but was "
+ << DateToString(actual);
+ }
+}
+
+::testing::AssertionResult
+calendarTest:: IsEqualDate(const isodate &expected, const isodate &actual) {
+ if (expected.year == actual.year &&
+ expected.week == actual.week &&
+ expected.weekday == actual.weekday) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << DateToString(expected) << " but was "
+ << DateToString(actual);
+ }
+}
+
+
+// ---------------------------------------------------------------------
+// test cases
+// ---------------------------------------------------------------------
+static const u_short real_month_table[2][13] = {
+ /* -*- table for regular years -*- */
+ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+ /* -*- table for leap years -*- */
+ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
+};
+
+// days in month, with one month wrap-around at both ends
+static const u_short real_month_days[2][14] = {
+ /* -*- table for regular years -*- */
+ { 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 },
+ /* -*- table for leap years -*- */
+ { 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31 }
+};
+
+// test the day/sec join & split ops, making sure that 32bit
+// intermediate results would definitely overflow and the hi DWORD of
+// the 'vint64' is definitely needed.
+TEST_F(calendarTest, DaySplitMerge) {
+ for (int32 day = -1000000; day <= 1000000; day += 100) {
+ for (int32 sec = -100000; sec <= 186400; sec += 10000) {
+ vint64 merge = ntpcal_dayjoin(day, sec);
+ ntpcal_split split = ntpcal_daysplit(&merge);
+ int32 eday = day;
+ int32 esec = sec;
+
+ while (esec >= 86400) {
+ eday += 1;
+ esec -= 86400;
+ }
+ while (esec < 0) {
+ eday -= 1;
+ esec += 86400;
+ }
+
+ EXPECT_EQ(eday, split.hi);
+ EXPECT_EQ(esec, split.lo);
+ }
+ }
+}
+
+TEST_F(calendarTest, SplitYearDays1) {
+ for (int32 eyd = -1; eyd <= 365; eyd++) {
+ ntpcal_split split = ntpcal_split_yeardays(eyd, 0);
+ if (split.lo >= 0 && split.hi >= 0) {
+ EXPECT_GT(12, split.hi);
+ EXPECT_GT(real_month_days[0][split.hi+1], split.lo);
+ int32 tyd = real_month_table[0][split.hi] + split.lo;
+ EXPECT_EQ(eyd, tyd);
+ } else
+ EXPECT_TRUE(eyd < 0 || eyd > 364);
+ }
+}
+
+TEST_F(calendarTest, SplitYearDays2) {
+ for (int32 eyd = -1; eyd <= 366; eyd++) {
+ ntpcal_split split = ntpcal_split_yeardays(eyd, 1);
+ if (split.lo >= 0 && split.hi >= 0) {
+ EXPECT_GT(12, split.hi);
+ EXPECT_GT(real_month_days[1][split.hi+1], split.lo);
+ int32 tyd = real_month_table[1][split.hi] + split.lo;
+ EXPECT_EQ(eyd, tyd);
+ } else
+ EXPECT_TRUE(eyd < 0 || eyd > 365);
+ }
+}
+
+TEST_F(calendarTest, RataDie1) {
+ int32 testDate = 1; // 0001-01-01 (proleptic date)
+ calendar expected = { 1, 1, 1, 1 };
+ calendar actual;
+
+ ntpcal_rd_to_date(&actual, testDate);
+ EXPECT_TRUE(IsEqualDate(expected, actual));
+}
+
+// check last day of february for first 10000 years
+TEST_F(calendarTest, LeapYears1) {
+ calendar dateIn, dateOut;
+
+ for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
+ dateIn.month = 2;
+ dateIn.monthday = 28 + leapdays(dateIn.year);
+ dateIn.yearday = 31 + dateIn.monthday;
+
+ ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
+
+ EXPECT_TRUE(IsEqualDate(dateIn, dateOut));
+ }
+}
+
+// check first day of march for first 10000 years
+TEST_F(calendarTest, LeapYears2) {
+ calendar dateIn, dateOut;
+
+ for (dateIn.year = 1; dateIn.year < 10000; ++dateIn.year) {
+ dateIn.month = 3;
+ dateIn.monthday = 1;
+ dateIn.yearday = 60 + leapdays(dateIn.year);
+
+ ntpcal_rd_to_date(&dateOut, ntpcal_date_to_rd(&dateIn));
+ EXPECT_TRUE(IsEqualDate(dateIn, dateOut));
+ }
+}
+
+// Full roundtrip for 1601-01-01 to 2400-12-31
+// checks sequence of rata die numbers and validates date output
+// (since the input is all nominal days of the calendar in that range
+// and the result of the inverse calculation must match the input no
+// invalid output can occur.)
+TEST_F(calendarTest, RoundTripDate) {
+ calendar truDate, expDate = { 1600, 0, 12, 31 };;
+ int32 truRdn, expRdn = ntpcal_date_to_rd(&expDate);
+ int leaps;
+
+ while (expDate.year < 2400) {
+ expDate.year++;
+ expDate.month = 0;
+ expDate.yearday = 0;
+ leaps = leapdays(expDate.year);
+ while (expDate.month < 12) {
+ expDate.month++;
+ expDate.monthday = 0;
+ while (expDate.monthday < real_month_days[leaps][expDate.month]) {
+ expDate.monthday++;
+ expDate.yearday++;
+ expRdn++;
+
+ truRdn = ntpcal_date_to_rd(&expDate);
+ EXPECT_EQ(expRdn, truRdn);
+
+ ntpcal_rd_to_date(&truDate, truRdn);
+ EXPECT_TRUE(IsEqualDate(expDate, truDate));
+ }
+ }
+ }
+}
+
+// Roundtrip testing on calyearstart
+TEST_F(calendarTest, RoundTripYearStart) {
+ static const time_t pivot = 0;
+ u_int32 ntp, expys, truys;
+ calendar date;
+
+ for (ntp = 0; ntp < 0xFFFFFFFFu - 30000000u; ntp += 30000000u) {
+ truys = calyearstart(ntp, &pivot);
+ ntpcal_ntp_to_date(&date, ntp, &pivot);
+ date.month = date.monthday = 1;
+ date.hour = date.minute = date.second = 0;
+ expys = ntpcal_date_to_ntp(&date);
+ EXPECT_EQ(expys, truys);
+ }
+}
+
+// Roundtrip testing on calymonthstart
+TEST_F(calendarTest, RoundTripMonthStart) {
+ static const time_t pivot = 0;
+ u_int32 ntp, expms, trums;
+ calendar date;
+
+ for (ntp = 0; ntp < 0xFFFFFFFFu - 2000000u; ntp += 2000000u) {
+ trums = calmonthstart(ntp, &pivot);
+ ntpcal_ntp_to_date(&date, ntp, &pivot);
+ date.monthday = 1;
+ date.hour = date.minute = date.second = 0;
+ expms = ntpcal_date_to_ntp(&date);
+ EXPECT_EQ(expms, trums);
+ }
+}
+
+// Roundtrip testing on calweekstart
+TEST_F(calendarTest, RoundTripWeekStart) {
+ static const time_t pivot = 0;
+ u_int32 ntp, expws, truws;
+ isodate date;
+
+ for (ntp = 0; ntp < 0xFFFFFFFFu - 600000u; ntp += 600000u) {
+ truws = calweekstart(ntp, &pivot);
+ isocal_ntp_to_date(&date, ntp, &pivot);
+ date.hour = date.minute = date.second = 0;
+ date.weekday = 1;
+ expws = isocal_date_to_ntp(&date);
+ EXPECT_EQ(expws, truws);
+ }
+}
+
+// Roundtrip testing on caldaystart
+TEST_F(calendarTest, RoundTripDayStart) {
+ static const time_t pivot = 0;
+ u_int32 ntp, expds, truds;
+ calendar date;
+
+ for (ntp = 0; ntp < 0xFFFFFFFFu - 80000u; ntp += 80000u) {
+ truds = caldaystart(ntp, &pivot);
+ ntpcal_ntp_to_date(&date, ntp, &pivot);
+ date.hour = date.minute = date.second = 0;
+ expds = ntpcal_date_to_ntp(&date);
+ EXPECT_EQ(expds, truds);
+ }
+}
+
diff --git a/tests/libntp/caljulian.cpp b/tests/libntp/caljulian.cpp
new file mode 100644
index 000000000000..d9cc952933e7
--- /dev/null
+++ b/tests/libntp/caljulian.cpp
@@ -0,0 +1,94 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_calendar.h"
+}
+
+#include <string>
+#include <sstream>
+
+class caljulianTest : public libntptest {
+protected:
+ virtual void SetUp();
+ virtual void TearDown();
+
+ std::string CalendarToString(const calendar &cal) {
+ std::ostringstream ss;
+ ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
+ << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
+ << (u_int)cal.minute << ":" << (u_int)cal.second;
+ return ss.str();
+ }
+
+ ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual) {
+ if (expected.year == actual.year &&
+ (expected.yearday == actual.yearday ||
+ (expected.month == actual.month &&
+ expected.monthday == actual.monthday)) &&
+ expected.hour == actual.hour &&
+ expected.minute == actual.minute &&
+ expected.second == actual.second) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << CalendarToString(expected) << " but was "
+ << CalendarToString(actual);
+ }
+ }
+};
+
+void caljulianTest::SetUp()
+{
+ ntpcal_set_timefunc(timefunc);
+ settime(1970, 1, 1, 0, 0, 0);
+}
+
+void caljulianTest::TearDown()
+{
+ ntpcal_set_timefunc(NULL);
+}
+
+
+TEST_F(caljulianTest, RegularTime) {
+ u_long testDate = 3485080800UL; // 2010-06-09 14:00:00
+ calendar expected = {2010,160,6,9,14,0,0};
+
+ calendar actual;
+
+ caljulian(testDate, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(caljulianTest, LeapYear) {
+ u_long input = 3549902400UL; // 2012-06-28 20:00:00Z
+ calendar expected = {2012, 179, 6, 28, 20, 0, 0};
+
+ calendar actual;
+
+ caljulian(input, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(caljulianTest, uLongBoundary) {
+ u_long time = 4294967295UL; // 2036-02-07 6:28:15
+ calendar expected = {2036,0,2,7,6,28,15};
+
+ calendar actual;
+
+ caljulian(time, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(caljulianTest, uLongWrapped) {
+ u_long time = 0;
+ calendar expected = {2036,0,2,7,6,28,16};
+
+ calendar actual;
+
+ caljulian(time, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
diff --git a/tests/libntp/caltontp.cpp b/tests/libntp/caltontp.cpp
new file mode 100644
index 000000000000..b9732db3273d
--- /dev/null
+++ b/tests/libntp/caltontp.cpp
@@ -0,0 +1,49 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_calendar.h"
+}
+
+class caltontpTest : public libntptest {
+};
+
+TEST_F(caltontpTest, DateGivenMonthDay) {
+ // 2010-06-24 12:50:00
+ calendar input = {2010, 0, 6, 24, 12, 50, 0};
+
+ u_long expected = 3486372600UL; // This is the timestamp above.
+
+ EXPECT_EQ(expected, caltontp(&input));
+}
+
+TEST_F(caltontpTest, DateGivenYearDay) {
+ // 2010-06-24 12:50:00
+ // This is the 175th day of 2010.
+ calendar input = {2010, 175, 0, 0, 12, 50, 0};
+
+ u_long expected = 3486372600UL; // This is the timestamp above.
+
+ EXPECT_EQ(expected, caltontp(&input));
+}
+
+TEST_F(caltontpTest, DateLeapYear) {
+ // 2012-06-24 12:00:00
+ // This is the 176th day of 2012 (since 2012 is a leap year).
+ calendar inputYd = {2012, 176, 0, 0, 12, 00, 00};
+ calendar inputMd = {2012, 0, 6, 24, 12, 00, 00};
+
+ u_long expected = 3549528000UL;
+
+ EXPECT_EQ(expected, caltontp(&inputYd));
+ EXPECT_EQ(expected, caltontp(&inputMd));
+}
+
+TEST_F(caltontpTest, WraparoundDateIn2036) {
+ // 2036-02-07 06:28:16
+ // This is (one) wrapping boundary where we go from ULONG_MAX to 0.
+ calendar input = {2036, 0, 2, 7, 6, 28, 16};
+
+ u_long expected = 0UL;
+
+ EXPECT_EQ(expected, caltontp(&input));
+}
diff --git a/tests/libntp/calyearstart.cpp b/tests/libntp/calyearstart.cpp
new file mode 100644
index 000000000000..774edf3eae44
--- /dev/null
+++ b/tests/libntp/calyearstart.cpp
@@ -0,0 +1,43 @@
+#include "libntptest.h"
+
+class calyearstartTest : public libntptest {
+protected:
+ virtual void SetUp();
+ virtual void TearDown();
+};
+
+void calyearstartTest::SetUp()
+{
+ ntpcal_set_timefunc(timefunc);
+ settime(1970, 1, 1, 0, 0, 0);
+}
+
+void calyearstartTest::TearDown()
+{
+ ntpcal_set_timefunc(NULL);
+}
+
+
+TEST_F(calyearstartTest, NoWrapInDateRange) {
+ const u_int32 input = 3486372600UL; // 2010-06-24 12:50:00.
+ const u_int32 expected = 3471292800UL; // 2010-01-01 00:00:00
+
+ EXPECT_EQ(expected, calyearstart(input, &nowtime));
+ EXPECT_EQ(expected, calyearstart(input, NULL));
+}
+
+TEST_F(calyearstartTest, NoWrapInDateRangeLeapYear) {
+ const u_int32 input = 3549528000UL; // 2012-06-24 12:00:00
+ const u_int32 expected = 3534364800UL; // 2012-01-01 00:00:00
+
+ EXPECT_EQ(expected, calyearstart(input, &nowtime));
+ EXPECT_EQ(expected, calyearstart(input, NULL));
+}
+
+TEST_F(calyearstartTest, WrapInDateRange) {
+ const u_int32 input = 19904UL; // 2036-02-07 12:00:00
+ const u_int32 expected = 4291747200UL; // 2036-01-01 00:00:00
+
+ EXPECT_EQ(expected, calyearstart(input, &nowtime));
+ EXPECT_EQ(expected, calyearstart(input, NULL));
+}
diff --git a/tests/libntp/clocktime.cpp b/tests/libntp/clocktime.cpp
new file mode 100644
index 000000000000..a24df1af48e3
--- /dev/null
+++ b/tests/libntp/clocktime.cpp
@@ -0,0 +1,187 @@
+#include "libntptest.h"
+
+// ---------------------------------------------------------------------
+// test fixture
+//
+// The clocktimeTest uses the NTP calendar feature to use a mockup
+// function for getting the current system time, so the tests are not
+// dependent on the actual system time.
+
+class clocktimeTest : public libntptest {
+ virtual void SetUp();
+ virtual void TearDown();
+};
+
+void clocktimeTest::SetUp()
+{
+ ntpcal_set_timefunc(timefunc);
+ settime(2000, 1, 1, 0, 0, 0);
+}
+
+void clocktimeTest::TearDown()
+{
+ ntpcal_set_timefunc(NULL);
+}
+
+// ---------------------------------------------------------------------
+// test cases
+
+TEST_F(clocktimeTest, CurrentYear) {
+ // Timestamp: 2010-06-24 12:50:00Z
+ const u_int32 timestamp = 3486372600UL;
+ const u_int32 expected = timestamp; // exactly the same.
+
+ const int yday=175, hour=12, minute=50, second=0, tzoff=0;
+
+ u_long yearstart=0;
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, CurrentYearFuzz) {
+ /*
+ * Timestamp (rec_ui) is: 2010-06-24 12:50:00
+ * Time sent into function is 12:00:00.
+ *
+ * Since the fuzz is rather small, we should get a NTP
+ * timestamp for the 12:00:00 time.
+ */
+
+ const u_int32 timestamp = 3486372600UL; // 2010-06-24 12:50:00Z
+ const u_int32 expected = 3486369600UL; // 2010-06-24 12:00:00Z
+
+ const int yday=175, hour=12, minute=0, second=0, tzoff=0;
+
+ u_long yearstart=0;
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, TimeZoneOffset) {
+ /*
+ * Timestamp (rec_ui) is: 2010-06-24 12:00:00 +0800
+ * (which is 2010-06-24 04:00:00Z)
+ *
+ * Time sent into function is 04:00:00 +0800
+ */
+ const u_int32 timestamp = 3486369600UL;
+ const u_int32 expected = timestamp;
+
+ const int yday=175, hour=4, minute=0, second=0, tzoff=8;
+
+ u_long yearstart=0;
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, WrongYearStart) {
+ /*
+ * Timestamp (rec_ui) is: 2010-01-02 11:00:00Z
+ * Time sent into function is 11:00:00.
+ * Yearstart sent into function is the yearstart of 2009!
+ */
+ const u_int32 timestamp = 3471418800UL;
+ const u_int32 expected = timestamp;
+
+ const int yday=2, hour=11, minute=0, second=0, tzoff=0;
+
+ u_long yearstart = 302024100UL; // Yearstart of 2009.
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, PreviousYear) {
+ /*
+ * Timestamp is: 2010-01-01 01:00:00Z
+ * Time sent into function is 23:00:00
+ * (which is meant to be 2009-12-31 23:00:00Z)
+ */
+ const u_int32 timestamp = 3471296400UL;
+ const u_int32 expected = 3471289200UL;
+
+ const int yday=365, hour=23, minute=0, second=0, tzoff=0;
+
+ u_long yearstart = 0;
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, NextYear) {
+ /*
+ * Timestamp is: 2009-12-31 23:00:00Z
+ * Time sent into function is 01:00:00
+ * (which is meant to be 2010-01-01 01:00:00Z)
+ */
+ const u_int32 timestamp = 3471289200UL;
+ const u_int32 expected = 3471296400UL;
+
+ const int yday=1, hour=1, minute=0, second=0, tzoff=0;
+ u_long yearstart = 0;
+ u_int32 actual;
+
+ ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+ EXPECT_EQ(expected, actual);
+}
+
+TEST_F(clocktimeTest, NoReasonableConversion) {
+ /* Timestamp is: 2010-01-02 11:00:00Z */
+ const u_int32 timestamp = 3471418800UL;
+
+ const int yday=100, hour=12, minute=0, second=0, tzoff=0;
+ u_long yearstart = 0;
+ u_int32 actual;
+
+ ASSERT_FALSE(clocktime(yday, hour, minute, second, tzoff, timestamp,
+ &yearstart, &actual));
+}
+
+TEST_F(clocktimeTest, AlwaysInLimit) {
+ /* Timestamp is: 2010-01-02 11:00:00Z */
+ const u_int32 timestamp = 3471418800UL;
+ const u_short prime_incs[] = { 127, 151, 163, 179 };
+ int cyc;
+ int yday;
+ u_char whichprime;
+ u_short ydayinc;
+ int hour;
+ int minute;
+ int second;
+ u_long yearstart;
+ u_int32 actual;
+ u_int32 diff;
+
+ yearstart = 0;
+ for (cyc = 0; cyc < 5; cyc++) {
+ settime(1900 + cyc * 65, 1, 1, 0, 0, 0);
+ for (yday = -26000; yday < 26000; yday += ydayinc) {
+ whichprime = abs(yday) % COUNTOF(prime_incs);
+ ydayinc = prime_incs[whichprime];
+ for (hour = -204; hour < 204; hour += 2) {
+ for (minute = -60; minute < 60; minute++) {
+ clocktime(yday, hour, minute, 30, 0,
+ timestamp, &yearstart, &actual);
+ diff = actual - timestamp;
+ if (diff >= 0x80000000UL)
+ diff = ~diff + 1;
+ ASSERT_LE(diff, (183u * SECSPERDAY));
+ }
+ }
+ }
+ }
+}
diff --git a/tests/libntp/decodenetnum.cpp b/tests/libntp/decodenetnum.cpp
new file mode 100644
index 000000000000..c6766de288ee
--- /dev/null
+++ b/tests/libntp/decodenetnum.cpp
@@ -0,0 +1,93 @@
+#include "sockaddrtest.h"
+
+class decodenetnumTest : public sockaddrtest {
+};
+
+TEST_F(decodenetnumTest, IPv4AddressOnly) {
+ const char *str = "192.0.2.1";
+ sockaddr_u actual;
+
+ sockaddr_u expected;
+ expected.sa4.sin_family = AF_INET;
+ expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.1");
+ SET_PORT(&expected, NTP_PORT);
+
+ ASSERT_TRUE(decodenetnum(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(decodenetnumTest, IPv4AddressWithPort) {
+ const char *str = "192.0.2.2:2000";
+ sockaddr_u actual;
+
+ sockaddr_u expected;
+ expected.sa4.sin_family = AF_INET;
+ expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.2");
+ SET_PORT(&expected, 2000);
+
+ ASSERT_TRUE(decodenetnum(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(decodenetnumTest, IPv6AddressOnly) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+
+ const char *str = "2001:0db8:85a3:08d3:1319:8a2e:0370:7334";
+ sockaddr_u actual;
+
+ sockaddr_u expected;
+ expected.sa6.sin6_family = AF_INET6;
+ expected.sa6.sin6_addr = address;
+ SET_PORT(&expected, NTP_PORT);
+
+ ASSERT_TRUE(decodenetnum(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(decodenetnumTest, IPv6AddressWithPort) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+
+ const char *str = "[2001:0db8:85a3:08d3:1319:8a2e:0370:7334]:3000";
+ sockaddr_u actual;
+
+ sockaddr_u expected;
+ expected.sa6.sin6_family = AF_INET6;
+ expected.sa6.sin6_addr = address;
+ SET_PORT(&expected, 3000);
+
+ ASSERT_TRUE(decodenetnum(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(decodenetnumTest, IllegalAddress) {
+ const char *str = "192.0.2.270:2000";
+ sockaddr_u actual;
+
+ ASSERT_FALSE(decodenetnum(str, &actual));
+}
+
+TEST_F(decodenetnumTest, IllegalCharInPort) {
+ /* An illegal port does not make the decodenetnum fail, but instead
+ * makes it use the standard port.
+ */
+ const char *str = "192.0.2.1:a700";
+ sockaddr_u actual;
+
+ sockaddr_u expected;
+ expected.sa4.sin_family = AF_INET;
+ expected.sa4.sin_addr.s_addr = inet_addr("192.0.2.1");
+ SET_PORT(&expected, NTP_PORT);
+
+ ASSERT_TRUE(decodenetnum(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
diff --git a/tests/libntp/hextoint.cpp b/tests/libntp/hextoint.cpp
new file mode 100644
index 000000000000..54c9a67aa149
--- /dev/null
+++ b/tests/libntp/hextoint.cpp
@@ -0,0 +1,42 @@
+#include "libntptest.h"
+
+class hextointTest : public libntptest {
+};
+
+TEST_F(hextointTest, SingleDigit) {
+ const char *str = "a"; // 10 decimal
+ u_long actual;
+
+ ASSERT_TRUE(hextoint(str, &actual));
+ EXPECT_EQ(10, actual);
+}
+
+TEST_F(hextointTest, MultipleDigits) {
+ const char *str = "8F3"; // 2291 decimal
+ u_long actual;
+
+ ASSERT_TRUE(hextoint(str, &actual));
+ EXPECT_EQ(2291, actual);
+}
+
+TEST_F(hextointTest, MaxUnsigned) {
+ const char *str = "ffffffff"; // 4294967295 decimal
+ u_long actual;
+
+ ASSERT_TRUE(hextoint(str, &actual));
+ EXPECT_EQ(4294967295UL, actual);
+}
+
+TEST_F(hextointTest, Overflow) {
+ const char *str = "100000000"; // Overflow by 1
+ u_long actual;
+
+ ASSERT_FALSE(hextoint(str, &actual));
+}
+
+TEST_F(hextointTest, IllegalChar) {
+ const char *str = "5gb"; // Illegal character g
+ u_long actual;
+
+ ASSERT_FALSE(hextoint(str, &actual));
+}
diff --git a/tests/libntp/hextolfp.cpp b/tests/libntp/hextolfp.cpp
new file mode 100644
index 000000000000..2e9f072cd6d1
--- /dev/null
+++ b/tests/libntp/hextolfp.cpp
@@ -0,0 +1,58 @@
+#include "lfptest.h"
+
+class hextolfpTest : public lfptest {
+};
+
+TEST_F(hextolfpTest, PositiveInteger) {
+ const char *str = "00001000.00000000";
+ l_fp actual;
+
+ l_fp expected = {4096, 0}; // 16^3, no fraction part.
+
+ ASSERT_TRUE(hextolfp(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(hextolfpTest, NegativeInteger) {
+ const char *str = "ffffffff.00000000"; // -1 decimal
+ l_fp actual;
+
+ l_fp expected = {-1, 0};
+
+ ASSERT_TRUE(hextolfp(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(hextolfpTest, PositiveFraction) {
+ const char *str = "00002000.80000000"; // 8196.5 decimal
+ l_fp actual;
+
+ l_fp expected = {8192, HALF};
+
+ ASSERT_TRUE(hextolfp(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(hextolfpTest, NegativeFraction) {
+ const char *str = "ffffffff.40000000"; // -1 + 0.25 decimal
+ l_fp actual;
+
+ l_fp expected = {-1, QUARTER}; //-1 + 0.25
+
+ ASSERT_TRUE(hextolfp(str, &actual));
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(hextolfpTest, IllegalNumberOfInteger) {
+ const char *str = "1000000.00000000"; // Missing one digit in integral part.
+ l_fp actual;
+
+ ASSERT_FALSE(hextolfp(str, &actual));
+}
+
+TEST_F(hextolfpTest, IllegalChar) {
+ const char *str = "10000000.0000h000"; // Illegal character h.
+ l_fp actual;
+
+ ASSERT_FALSE(hextolfp(str, &actual));
+}
diff --git a/tests/libntp/humandate.cpp b/tests/libntp/humandate.cpp
new file mode 100644
index 000000000000..742aa28724ab
--- /dev/null
+++ b/tests/libntp/humandate.cpp
@@ -0,0 +1,41 @@
+#include "libntptest.h"
+
+#include <sstream>
+#include <string>
+
+class humandateTest : public libntptest {
+};
+
+TEST_F(humandateTest, RegularTime) {
+ time_t sample = 1276601278;
+ std::ostringstream expected;
+
+ tm* time;
+ time = localtime(&sample);
+ ASSERT_TRUE(time != NULL);
+
+ expected << std::setfill('0')
+ << std::setw(2) << time->tm_hour << ":"
+ << std::setw(2) << time->tm_min << ":"
+ << std::setw(2) << time->tm_sec;
+
+ EXPECT_STREQ(expected.str().c_str(), humantime(sample));
+}
+
+TEST_F(humandateTest, CurrentTime) {
+ time_t sample;
+ std::ostringstream expected;
+
+ time(&sample);
+
+ tm* time;
+ time = localtime(&sample);
+ ASSERT_TRUE(time != NULL);
+
+ expected << std::setfill('0')
+ << std::setw(2) << time->tm_hour << ":"
+ << std::setw(2) << time->tm_min << ":"
+ << std::setw(2) << time->tm_sec;
+
+ EXPECT_STREQ(expected.str().c_str(), humantime(sample));
+}
diff --git a/tests/libntp/lfpfunc.cpp b/tests/libntp/lfpfunc.cpp
new file mode 100644
index 000000000000..275918cdc50f
--- /dev/null
+++ b/tests/libntp/lfpfunc.cpp
@@ -0,0 +1,547 @@
+#include "libntptest.h"
+#include "timestructs.h"
+
+extern "C" {
+#include "ntp_fp.h"
+}
+
+#include <float.h>
+#include <math.h>
+
+#include <string>
+#include <sstream>
+
+class lfpTest : public libntptest
+{
+ // nothing new right now
+};
+
+struct lfp_hl {
+ uint32_t h, l;
+};
+
+//----------------------------------------------------------------------
+// OO-wrapper for 'l_fp'
+//----------------------------------------------------------------------
+
+class LFP
+{
+public:
+ ~LFP();
+ LFP();
+ LFP(const LFP& rhs);
+ LFP(int32 i, u_int32 f);
+
+ LFP operator+ (const LFP &rhs) const;
+ LFP& operator+=(const LFP &rhs);
+
+ LFP operator- (const LFP &rhs) const;
+ LFP& operator-=(const LFP &rhs);
+
+ LFP& operator=(const LFP &rhs);
+ LFP operator-() const;
+
+ bool operator==(const LFP &rhs) const;
+
+ LFP neg() const;
+ LFP abs() const;
+ int signum() const;
+
+ bool l_isgt (const LFP &rhs) const
+ { return L_ISGT(&_v, &rhs._v); }
+ bool l_isgtu(const LFP &rhs) const
+ { return L_ISGTU(&_v, &rhs._v); }
+ bool l_ishis(const LFP &rhs) const
+ { return L_ISHIS(&_v, &rhs._v); }
+ bool l_isgeq(const LFP &rhs) const
+ { return L_ISGEQ(&_v, &rhs._v); }
+ bool l_isequ(const LFP &rhs) const
+ { return L_ISEQU(&_v, &rhs._v); }
+
+ int ucmp(const LFP & rhs) const;
+ int scmp(const LFP & rhs) const;
+
+ std::string toString() const;
+ std::ostream& toStream(std::ostream &oo) const;
+
+ operator double() const;
+ explicit LFP(double);
+
+protected:
+ LFP(const l_fp &rhs);
+
+ static int cmp_work(u_int32 a[3], u_int32 b[3]);
+
+ l_fp _v;
+};
+
+static std::ostream& operator<<(std::ostream &oo, const LFP& rhs)
+{
+ return rhs.toStream(oo);
+}
+
+//----------------------------------------------------------------------
+// reference comparision
+// This is implementad as a full signed MP-subtract in 3 limbs, where
+// the operands are zero or sign extended before the subtraction is
+// executed.
+//----------------------------------------------------------------------
+int LFP::scmp(const LFP & rhs) const
+{
+ u_int32 a[3], b[3];
+ const l_fp &op1(_v), &op2(rhs._v);
+
+ a[0] = op1.l_uf; a[1] = op1.l_ui; a[2] = 0;
+ b[0] = op2.l_uf; b[1] = op2.l_ui; b[2] = 0;
+
+ a[2] -= (op1.l_i < 0);
+ b[2] -= (op2.l_i < 0);
+
+ return cmp_work(a,b);
+}
+
+int LFP::ucmp(const LFP & rhs) const
+{
+ u_int32 a[3], b[3];
+ const l_fp &op1(_v), &op2(rhs._v);
+
+ a[0] = op1.l_uf; a[1] = op1.l_ui; a[2] = 0;
+ b[0] = op2.l_uf; b[1] = op2.l_ui; b[2] = 0;
+
+ return cmp_work(a,b);
+}
+
+int LFP::cmp_work(u_int32 a[3], u_int32 b[3])
+{
+ u_int32 cy, idx, tmp;
+ for (cy = idx = 0; idx < 3; ++idx) {
+ tmp = a[idx]; cy = (a[idx] -= cy ) > tmp;
+ tmp = a[idx]; cy |= (a[idx] -= b[idx]) > tmp;
+ }
+ if (a[2])
+ return -1;
+ return a[0] || a[1];
+}
+
+//----------------------------------------------------------------------
+// imlementation of the LFP stuff
+// This should be easy enough...
+//----------------------------------------------------------------------
+
+LFP::~LFP()
+{
+ // NOP
+}
+
+LFP::LFP()
+{
+ _v.l_ui = 0;
+ _v.l_uf = 0;
+}
+
+LFP::LFP(int32 i, u_int32 f)
+{
+ _v.l_i = i;
+ _v.l_uf = f;
+}
+
+LFP::LFP(const LFP &rhs)
+{
+ _v = rhs._v;
+}
+
+LFP::LFP(const l_fp & rhs)
+{
+ _v = rhs;
+}
+
+LFP& LFP::operator=(const LFP & rhs)
+{
+ _v = rhs._v;
+ return *this;
+}
+
+LFP& LFP::operator+=(const LFP & rhs)
+{
+ L_ADD(&_v, &rhs._v);
+ return *this;
+}
+
+LFP& LFP::operator-=(const LFP & rhs)
+{
+ L_SUB(&_v, &rhs._v);
+ return *this;
+}
+
+LFP LFP::operator+(const LFP &rhs) const
+{
+ LFP tmp(*this);
+ return tmp += rhs;
+}
+
+LFP LFP::operator-(const LFP &rhs) const
+{
+ LFP tmp(*this);
+ return tmp -= rhs;
+}
+
+LFP LFP::operator-() const
+{
+ LFP tmp(*this);
+ L_NEG(&tmp._v);
+ return tmp;
+}
+
+LFP
+LFP::neg() const
+{
+ LFP tmp(*this);
+ L_NEG(&tmp._v);
+ return tmp;
+}
+
+LFP
+LFP::abs() const
+{
+ LFP tmp(*this);
+ if (L_ISNEG(&tmp._v))
+ L_NEG(&tmp._v);
+ return tmp;
+}
+
+int
+LFP::signum() const
+{
+ if (_v.l_ui & 0x80000000u)
+ return -1;
+ return (_v.l_ui || _v.l_uf);
+}
+
+std::string
+LFP::toString() const
+{
+ std::ostringstream oss;
+ toStream(oss);
+ return oss.str();
+}
+
+std::ostream&
+LFP::toStream(std::ostream &os) const
+{
+ return os
+ << mfptoa(_v.l_ui, _v.l_uf, 9)
+ << " [$" << std::setw(8) << std::setfill('0') << std::hex << _v.l_ui
+ << ':' << std::setw(8) << std::setfill('0') << std::hex << _v.l_uf
+ << ']';
+}
+
+bool LFP::operator==(const LFP &rhs) const
+{
+ return L_ISEQU(&_v, &rhs._v);
+}
+
+
+LFP::operator double() const
+{
+ double res;
+ LFPTOD(&_v, res);
+ return res;
+}
+
+LFP::LFP(double rhs)
+{
+ DTOLFP(rhs, &_v);
+}
+
+
+//----------------------------------------------------------------------
+// testing the relational macros works better with proper predicate
+// formatting functions; it slows down the tests a bit, but makes for
+// readable failure messages.
+//----------------------------------------------------------------------
+
+testing::AssertionResult isgt_p(
+ const LFP &op1, const LFP &op2)
+{
+ if (op1.l_isgt(op2))
+ return testing::AssertionSuccess()
+ << "L_ISGT(" << op1 << "," << op2 << ") is true";
+ else
+ return testing::AssertionFailure()
+ << "L_ISGT(" << op1 << "," << op2 << ") is false";
+}
+
+testing::AssertionResult isgeq_p(
+ const LFP &op1, const LFP &op2)
+{
+ if (op1.l_isgeq(op2))
+ return testing::AssertionSuccess()
+ << "L_ISGEQ(" << op1 << "," << op2 << ") is true";
+ else
+ return testing::AssertionFailure()
+ << "L_ISGEQ(" << op1 << "," << op2 << ") is false";
+}
+
+testing::AssertionResult isgtu_p(
+ const LFP &op1, const LFP &op2)
+{
+ if (op1.l_isgtu(op2))
+ return testing::AssertionSuccess()
+ << "L_ISGTU(" << op1 << "," << op2 << ") is true";
+ else
+ return testing::AssertionFailure()
+ << "L_ISGTU(" << op1 << "," << op2 << ") is false";
+}
+
+testing::AssertionResult ishis_p(
+ const LFP &op1, const LFP &op2)
+{
+ if (op1.l_ishis(op2))
+ return testing::AssertionSuccess()
+ << "L_ISHIS(" << op1 << "," << op2 << ") is true";
+ else
+ return testing::AssertionFailure()
+ << "L_ISHIS(" << op1 << "," << op2 << ") is false";
+}
+
+testing::AssertionResult isequ_p(
+ const LFP &op1, const LFP &op2)
+{
+ if (op1.l_isequ(op2))
+ return testing::AssertionSuccess()
+ << "L_ISEQU(" << op1 << "," << op2 << ") is true";
+ else
+ return testing::AssertionFailure()
+ << "L_ISEQU(" << op1 << "," << op2 << ") is false";
+}
+
+//----------------------------------------------------------------------
+// test data table for add/sub and compare
+//----------------------------------------------------------------------
+
+static const lfp_hl addsub_tab[][3] = {
+ // trivial idendity:
+ {{0 ,0 }, { 0,0 }, { 0,0}},
+ // with carry from fraction and sign change:
+ {{-1,0x80000000}, { 0,0x80000000}, { 0,0}},
+ // without carry from fraction
+ {{ 1,0x40000000}, { 1,0x40000000}, { 2,0x80000000}},
+ // with carry from fraction:
+ {{ 1,0xC0000000}, { 1,0xC0000000}, { 3,0x80000000}},
+ // with carry from fraction and sign change:
+ {{0x7FFFFFFF, 0x7FFFFFFF}, {0x7FFFFFFF,0x7FFFFFFF}, {0xFFFFFFFE,0xFFFFFFFE}},
+ // two tests w/o carry (used for l_fp<-->double):
+ {{0x55555555,0xAAAAAAAA}, {0x11111111,0x11111111}, {0x66666666,0xBBBBBBBB}},
+ {{0x55555555,0x55555555}, {0x11111111,0x11111111}, {0x66666666,0x66666666}},
+ // wide-range test, triggers compare trouble
+ {{0x80000000,0x00000001}, {0xFFFFFFFF,0xFFFFFFFE}, {0x7FFFFFFF,0xFFFFFFFF}}
+};
+static const size_t addsub_cnt(sizeof(addsub_tab)/sizeof(addsub_tab[0]));
+static const size_t addsub_tot(sizeof(addsub_tab)/sizeof(addsub_tab[0][0]));
+
+
+//----------------------------------------------------------------------
+// epsilon estimation for the precision of a conversion double --> l_fp
+//
+// The error estimation limit is as follows:
+// * The 'l_fp' fixed point fraction has 32 bits precision, so we allow
+// for the LSB to toggle by clamping the epsilon to be at least 2^(-31)
+//
+// * The double mantissa has a precsion 54 bits, so the other minimum is
+// dval * (2^(-53))
+//
+// The maximum of those two boundaries is used for the check.
+//
+// Note: once there are more than 54 bits between the highest and lowest
+// '1'-bit of the l_fp value, the roundtrip *will* create truncation
+// errors. This is an inherent property caused by the 54-bit mantissa of
+// the 'double' type.
+double eps(double d)
+{
+ return std::max<double>(ldexp(1.0, -31), ldexp(fabs(d), -53));
+}
+
+//----------------------------------------------------------------------
+// test addition
+//----------------------------------------------------------------------
+TEST_F(lfpTest, AdditionLR) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP op2(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
+ LFP exp(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
+ LFP res(op1 + op2);
+
+ ASSERT_EQ(exp, res);
+ }
+}
+
+TEST_F(lfpTest, AdditionRL) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op2(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP op1(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
+ LFP exp(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
+ LFP res(op1 + op2);
+
+ ASSERT_EQ(exp, res);
+ }
+}
+
+//----------------------------------------------------------------------
+// test subtraction
+//----------------------------------------------------------------------
+TEST_F(lfpTest, SubtractionLR) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op2(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP exp(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
+ LFP op1(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
+ LFP res(op1 - op2);
+
+ ASSERT_EQ(exp, res);
+ }
+}
+
+TEST_F(lfpTest, SubtractionRL) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP exp(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP op2(addsub_tab[idx][1].h, addsub_tab[idx][1].l);
+ LFP op1(addsub_tab[idx][2].h, addsub_tab[idx][2].l);
+ LFP res(op1 - op2);
+
+ ASSERT_EQ(exp, res);
+ }
+}
+
+//----------------------------------------------------------------------
+// test negation
+//----------------------------------------------------------------------
+TEST_F(lfpTest, Negation) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP op2(-op1);
+ LFP sum(op1 + op2);
+
+ ASSERT_EQ(LFP(0,0), sum);
+ }
+}
+
+//----------------------------------------------------------------------
+// test absolute value
+//----------------------------------------------------------------------
+TEST_F(lfpTest, Absolute) {
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ LFP op2(op1.abs());
+
+ ASSERT_TRUE(op2.signum() >= 0);
+
+ if (op1.signum() >= 0)
+ op1 -= op2;
+ else
+ op1 += op2;
+ ASSERT_EQ(LFP(0,0), op1);
+ }
+
+ // There is one special case we have to check: the minimum
+ // value cannot be negated, or, to be more precise, the
+ // negation reproduces the original pattern.
+ LFP minVal(0x80000000, 0x00000000);
+ LFP minAbs(minVal.abs());
+ ASSERT_EQ(-1, minVal.signum());
+ ASSERT_EQ(minVal, minAbs);
+}
+
+//----------------------------------------------------------------------
+// fp -> double -> fp rountrip test
+//----------------------------------------------------------------------
+TEST_F(lfpTest, FDF_RoundTrip) {
+ // since a l_fp has 64 bits in it's mantissa and a double has
+ // only 54 bits available (including the hidden '1') we have to
+ // make a few concessions on the roundtrip precision. The 'eps()'
+ // function makes an educated guess about the avilable precision
+ // and checks the difference in the two 'l_fp' values against
+ // that limit.
+ for (size_t idx=0; idx < addsub_cnt; ++idx) {
+ LFP op1(addsub_tab[idx][0].h, addsub_tab[idx][0].l);
+ double op2(op1);
+ LFP op3(op2);
+ // for manual checks only:
+ // std::cout << std::setprecision(16) << op2 << std::endl;
+ ASSERT_LE(fabs(op1-op3), eps(op2));
+ }
+}
+
+//----------------------------------------------------------------------
+// test the compare stuff
+//
+// This uses the local compare and checks if the operations using the
+// macros in 'ntp_fp.h' produce mathing results.
+// ----------------------------------------------------------------------
+TEST_F(lfpTest, SignedRelOps) {
+ const lfp_hl * tv(&addsub_tab[0][0]);
+ for (size_t lc=addsub_tot-1; lc; --lc,++tv) {
+ LFP op1(tv[0].h,tv[0].l);
+ LFP op2(tv[1].h,tv[1].l);
+ int cmp(op1.scmp(op2));
+
+ switch (cmp) {
+ case -1:
+ std::swap(op1, op2);
+ case 1:
+ EXPECT_TRUE (isgt_p(op1,op2));
+ EXPECT_FALSE(isgt_p(op2,op1));
+
+ EXPECT_TRUE (isgeq_p(op1,op2));
+ EXPECT_FALSE(isgeq_p(op2,op1));
+
+ EXPECT_FALSE(isequ_p(op1,op2));
+ EXPECT_FALSE(isequ_p(op2,op1));
+ break;
+ case 0:
+ EXPECT_FALSE(isgt_p(op1,op2));
+ EXPECT_FALSE(isgt_p(op2,op1));
+
+ EXPECT_TRUE (isgeq_p(op1,op2));
+ EXPECT_TRUE (isgeq_p(op2,op1));
+
+ EXPECT_TRUE (isequ_p(op1,op2));
+ EXPECT_TRUE (isequ_p(op2,op1));
+ break;
+ default:
+ FAIL() << "unexpected SCMP result: " << cmp;
+ }
+ }
+}
+
+TEST_F(lfpTest, UnsignedRelOps) {
+ const lfp_hl * tv(&addsub_tab[0][0]);
+ for (size_t lc=addsub_tot-1; lc; --lc,++tv) {
+ LFP op1(tv[0].h,tv[0].l);
+ LFP op2(tv[1].h,tv[1].l);
+ int cmp(op1.ucmp(op2));
+
+ switch (cmp) {
+ case -1:
+ std::swap(op1, op2);
+ case 1:
+ EXPECT_TRUE (isgtu_p(op1,op2));
+ EXPECT_FALSE(isgtu_p(op2,op1));
+
+ EXPECT_TRUE (ishis_p(op1,op2));
+ EXPECT_FALSE(ishis_p(op2,op1));
+ break;
+ case 0:
+ EXPECT_FALSE(isgtu_p(op1,op2));
+ EXPECT_FALSE(isgtu_p(op2,op1));
+
+ EXPECT_TRUE (ishis_p(op1,op2));
+ EXPECT_TRUE (ishis_p(op2,op1));
+ break;
+ default:
+ FAIL() << "unexpected UCMP result: " << cmp;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+// that's all folks... but feel free to add things!
+//----------------------------------------------------------------------
diff --git a/tests/libntp/lfptest.h b/tests/libntp/lfptest.h
new file mode 100644
index 000000000000..034eb41dd6ce
--- /dev/null
+++ b/tests/libntp/lfptest.h
@@ -0,0 +1,31 @@
+#ifndef NTP_TESTS_LFPTEST_H
+#define NTP_TESTS_LFPTEST_H
+
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+};
+
+class lfptest : public libntptest {
+protected:
+ ::testing::AssertionResult IsEqual(const l_fp &expected, const l_fp &actual) {
+ if (L_ISEQU(&expected, &actual)) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << " expected: " << lfptoa(&expected, FRACTION_PREC)
+ << " (" << expected.l_ui << "." << expected.l_uf << ")"
+ << " but was: " << lfptoa(&actual, FRACTION_PREC)
+ << " (" << actual.l_ui << "." << actual.l_uf << ")";
+ }
+ }
+
+ static const int32 HALF = -2147483647L - 1L;
+ static const int32 HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
+ static const int32 HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
+ static const int32 QUARTER = 1073741824L;
+ static const int32 QUARTER_PROMILLE_APPRX = 1073742L;
+};
+
+#endif /* NTP_TESTS_LFPTEST_H */
diff --git a/tests/libntp/lfptostr.cpp b/tests/libntp/lfptostr.cpp
new file mode 100644
index 000000000000..aa5f5112d663
--- /dev/null
+++ b/tests/libntp/lfptostr.cpp
@@ -0,0 +1,103 @@
+/*
+ * This file contains test for both mfptoa and mfptoms (which uses dolfptoa),
+ * since all these functions are very similar. It also tests ulfptoa, which is
+ * a macro.
+ */
+
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+};
+
+class lfptostrTest : public libntptest {
+protected:
+ static const int LFP_MAX_PRECISION = 10;
+ static const int LFP_MAX_PRECISION_MS = 7;
+
+ static const int ONE_FOURTH = 1073741824; // (1 << 30)
+ static const int HALF = (1 << 31);
+ static const int THREE_FOURTH = -ONE_FOURTH;
+ static const int HALF_PROMILLE_UP = 2147484; // slightly more than 0.0005
+ static const int HALF_PROMILLE_DOWN = 2147483; // slightly less than 0.0005
+};
+
+TEST_F(lfptostrTest, PositiveInteger) {
+ l_fp test = {200, 0}; // exact 200.0000000000
+
+ EXPECT_STREQ("200.0000000000", mfptoa(test.l_ui, test.l_uf, LFP_MAX_PRECISION));
+ EXPECT_STREQ("200000.0000000", mfptoms(test.l_ui, test.l_uf, LFP_MAX_PRECISION_MS));
+}
+
+TEST_F(lfptostrTest, NegativeInteger) {
+ l_fp test = {-100, 0}; // -100
+
+ EXPECT_STREQ("-100.0000000000", lfptoa(&test, LFP_MAX_PRECISION));
+ EXPECT_STREQ("-100000.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
+}
+
+TEST_F(lfptostrTest, PositiveIntegerWithFraction) {
+ l_fp test = {200, ONE_FOURTH}; // 200.25
+
+ EXPECT_STREQ("200.2500000000", lfptoa(&test, LFP_MAX_PRECISION));
+ EXPECT_STREQ("200250.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
+}
+
+TEST_F(lfptostrTest, NegativeIntegerWithFraction) {
+ l_fp test = {-100, ONE_FOURTH}; // -99.75
+
+ EXPECT_STREQ("-99.7500000000", lfptoa(&test, LFP_MAX_PRECISION));
+ EXPECT_STREQ("-99750.0000000", lfptoms(&test, LFP_MAX_PRECISION_MS));
+}
+
+TEST_F(lfptostrTest, RoundingDownToInteger) {
+ l_fp test = {10, ONE_FOURTH}; // 10.25
+
+ EXPECT_STREQ("10", lfptoa(&test, 0));
+ EXPECT_STREQ("10250", lfptoms(&test, 0));
+}
+
+TEST_F(lfptostrTest, RoundingMiddleToInteger) {
+ l_fp test = {10, HALF}; // 10.5
+
+ EXPECT_STREQ("11", lfptoa(&test, 0));
+ EXPECT_STREQ("10500", lfptoms(&test, 0));
+}
+
+TEST_F(lfptostrTest, RoundingUpToInteger) {
+ l_fp test = {5, THREE_FOURTH}; // 5.75
+
+ EXPECT_STREQ("6", lfptoa(&test, 0));
+ EXPECT_STREQ("5750", lfptoms(&test, 0));
+}
+
+TEST_F(lfptostrTest, SingleDecimal) {
+ l_fp test = {8, ONE_FOURTH}; // 8.25
+
+ EXPECT_STREQ("8.3", lfptoa(&test, 1));
+ EXPECT_STREQ("8250.0", lfptoms(&test, 1));
+}
+
+TEST_F(lfptostrTest, MillisecondsRoundingUp) {
+ l_fp test = {1, HALF_PROMILLE_UP}; //slightly more than 1.0005
+
+ EXPECT_STREQ("1.0", lfptoa(&test, 1));
+
+ EXPECT_STREQ("1000.5", lfptoms(&test, 1));
+ EXPECT_STREQ("1001", lfptoms(&test, 0));
+}
+
+TEST_F(lfptostrTest, MillisecondsRoundingDown) {
+ l_fp test = {1, HALF_PROMILLE_DOWN}; // slightly less than 1.0005
+
+ EXPECT_STREQ("1.0", lfptoa(&test, 1));
+
+ EXPECT_STREQ("1000.5", lfptoms(&test, 1));
+ EXPECT_STREQ("1000", lfptoms(&test, 0));
+}
+
+TEST_F(lfptostrTest, UnsignedInteger) {
+ l_fp test = {3000000000UL, 0};
+
+ EXPECT_STREQ("3000000000.0", ulfptoa(&test, 1));
+}
diff --git a/tests/libntp/libntptest.cpp b/tests/libntp/libntptest.cpp
new file mode 100644
index 000000000000..c3363b008bdb
--- /dev/null
+++ b/tests/libntp/libntptest.cpp
@@ -0,0 +1,27 @@
+#include "libntptest.h"
+
+/* This file contains various constants that libntp needs to be set
+ * and that is normally defined in ntpd/ntpq/...
+ */
+
+u_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.
+const char *progname = "libntptest";
+
+time_t libntptest::nowtime = 0;
+
+time_t libntptest::timefunc(time_t *ptr)
+{
+ if (ptr)
+ *ptr = nowtime;
+ return nowtime;
+}
+
+void libntptest::settime(int y, int m, int d, int H, int M, int S)
+{
+
+ time_t days(ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS);
+ time_t secs(ntpcal_etime_to_seconds(H, M, S));
+
+ nowtime = days * SECSPERDAY + secs;
+}
+
diff --git a/tests/libntp/libntptest.h b/tests/libntp/libntptest.h
new file mode 100644
index 000000000000..ef2daa88a268
--- /dev/null
+++ b/tests/libntp/libntptest.h
@@ -0,0 +1,15 @@
+#include "tests_main.h"
+
+extern "C" {
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+};
+
+class libntptest : public ntptest {
+
+protected:
+ static time_t timefunc(time_t*);
+ static time_t nowtime;
+ static void settime(int y, int m, int d, int H, int M, int S);
+
+};
diff --git a/tests/libntp/modetoa.cpp b/tests/libntp/modetoa.cpp
new file mode 100644
index 000000000000..cb7404d0393f
--- /dev/null
+++ b/tests/libntp/modetoa.cpp
@@ -0,0 +1,16 @@
+#include "libntptest.h"
+
+class modetoaTest : public libntptest {
+};
+
+TEST_F(modetoaTest, KnownMode) {
+ const int MODE = 3; // Should be "client"
+
+ EXPECT_STREQ("client", modetoa(MODE));
+}
+
+TEST_F(modetoaTest, UnknownMode) {
+ const int MODE = 100;
+
+ EXPECT_STREQ("mode#100", modetoa(MODE));
+}
diff --git a/tests/libntp/msyslog.cpp b/tests/libntp/msyslog.cpp
new file mode 100644
index 000000000000..5b00703e6a7d
--- /dev/null
+++ b/tests/libntp/msyslog.cpp
@@ -0,0 +1,137 @@
+#include "libntptest.h"
+
+extern "C" {
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#ifndef VSNPRINTF_PERCENT_M
+// format_errmsg() is normally private to msyslog.c
+void format_errmsg (char *, size_t, const char *, int);
+#endif
+};
+
+class msyslogTest : public libntptest {
+};
+
+// msnprintf()
+TEST_F(msyslogTest, msnprintf)
+{
+#define FMT_PREFIX "msyslog.cpp ENOENT: "
+ char exp_buf[512];
+ char act_buf[512];
+ int exp_cnt;
+ int act_cnt;
+
+ exp_cnt = snprintf(exp_buf, sizeof(exp_buf), FMT_PREFIX "%s",
+ strerror(ENOENT));
+ errno = ENOENT;
+ act_cnt = msnprintf(act_buf, sizeof(act_buf), FMT_PREFIX "%m");
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+}
+
+TEST_F(msyslogTest, msnprintfLiteralPercentm)
+{
+ char exp_buf[32];
+ char act_buf[32];
+ int exp_cnt;
+ int act_cnt;
+
+ exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "%%m");
+ errno = ENOENT;
+ act_cnt = msnprintf(act_buf, sizeof(act_buf), "%%m");
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+}
+
+TEST_F(msyslogTest, msnprintfBackslashLiteralPercentm)
+{
+ char exp_buf[32];
+ char act_buf[32];
+ int exp_cnt;
+ int act_cnt;
+
+ exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "\%%m");
+ errno = ENOENT;
+ act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%%m");
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+}
+
+TEST_F(msyslogTest, msnprintfBackslashPercent)
+{
+ char exp_buf[32];
+ char act_buf[32];
+ int exp_cnt;
+ int act_cnt;
+
+ exp_cnt = snprintf(exp_buf, sizeof(exp_buf), "\%s",
+ strerror(ENOENT));
+ errno = ENOENT;
+ act_cnt = msnprintf(act_buf, sizeof(act_buf), "\%m");
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+}
+
+TEST_F(msyslogTest, msnprintfHangingPercent)
+{
+ static char fmt[] = "percent then nul term then non-nul %\0oops!";
+ char exp_buf[64];
+ char act_buf[64];
+ int exp_cnt;
+ int act_cnt;
+
+ ZERO(exp_buf);
+ ZERO(act_buf);
+ exp_cnt = snprintf(exp_buf, sizeof(exp_buf), fmt);
+ act_cnt = msnprintf(act_buf, sizeof(act_buf), fmt);
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+ EXPECT_STREQ("", act_buf + 1 + strlen(act_buf));
+}
+
+#ifndef VSNPRINTF_PERCENT_M
+TEST_F(msyslogTest, format_errmsgHangingPercent)
+{
+ static char fmt[] = "percent then nul term then non-nul %\0oops!";
+ char act_buf[64];
+
+ ZERO(act_buf);
+ format_errmsg(act_buf, sizeof(act_buf), fmt, ENOENT);
+ EXPECT_STREQ(fmt, act_buf);
+ EXPECT_STREQ("", act_buf + 1 + strlen(act_buf));
+}
+#endif
+
+TEST_F(msyslogTest, msnprintfNullTarget)
+{
+ int exp_cnt;
+ int act_cnt;
+
+ exp_cnt = snprintf(NULL, 0, "%d", 123);
+ errno = ENOENT;
+ act_cnt = msnprintf(NULL, 0, "%d", 123);
+ EXPECT_EQ(exp_cnt, act_cnt);
+}
+
+TEST_F(msyslogTest, msnprintfTruncate)
+{
+ char undist[] = "undisturbed";
+ char exp_buf[512];
+ char act_buf[512];
+ int exp_cnt;
+ int act_cnt;
+
+ memcpy(exp_buf + 3, undist, sizeof(undist));
+ memcpy(act_buf + 3, undist, sizeof(undist));
+ exp_cnt = snprintf(exp_buf, 3, "%s", strerror(ENOENT));
+ errno = ENOENT;
+ act_cnt = msnprintf(act_buf, 3, "%m");
+ EXPECT_EQ('\0', exp_buf[2]);
+ EXPECT_EQ('\0', act_buf[2]);
+ EXPECT_TRUE(act_cnt > 0);
+ EXPECT_EQ(exp_cnt, act_cnt);
+ EXPECT_STREQ(exp_buf, act_buf);
+ EXPECT_STREQ(exp_buf + 3, undist);
+ EXPECT_STREQ(act_buf + 3, undist);
+}
diff --git a/tests/libntp/netof.cpp b/tests/libntp/netof.cpp
new file mode 100644
index 000000000000..67b9df4e7cf7
--- /dev/null
+++ b/tests/libntp/netof.cpp
@@ -0,0 +1,69 @@
+#include "sockaddrtest.h"
+
+class netofTest : public sockaddrtest {
+};
+
+TEST_F(netofTest, ClassBAddress) {
+ sockaddr_u input = CreateSockaddr4("172.16.2.1", NTP_PORT);
+ sockaddr_u expected = CreateSockaddr4("172.16.0.0", NTP_PORT);
+
+ sockaddr_u* actual = netof(&input);
+
+ ASSERT_TRUE(actual != NULL);
+ EXPECT_TRUE(IsEqual(expected, *actual));
+}
+
+TEST_F(netofTest, ClassCAddress) {
+ sockaddr_u input = CreateSockaddr4("192.0.2.255", NTP_PORT);
+ sockaddr_u expected = CreateSockaddr4("192.0.2.0", NTP_PORT);
+
+ sockaddr_u* actual = netof(&input);
+
+ ASSERT_TRUE(actual != NULL);
+ EXPECT_TRUE(IsEqual(expected, *actual));
+}
+
+TEST_F(netofTest, ClassAAddress) {
+ /* Class A addresses are assumed to be classless,
+ * thus the same address should be returned.
+ */
+ sockaddr_u input = CreateSockaddr4("10.20.30.40", NTP_PORT);
+ sockaddr_u expected = CreateSockaddr4("10.20.30.40", NTP_PORT);
+
+ sockaddr_u* actual = netof(&input);
+
+ ASSERT_TRUE(actual != NULL);
+ EXPECT_TRUE(IsEqual(expected, *actual));
+}
+
+TEST_F(netofTest, IPv6Address) {
+ /* IPv6 addresses are assumed to have 64-bit host- and 64-bit network parts. */
+ const struct in6_addr input_address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ }; // 2001:0db8:85a3:08d3:1319:8a2e:0370:7334
+
+ const struct in6_addr expected_address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00
+ }; // 2001:0db8:85a3:08d3:0000:0000:0000:0000
+
+ sockaddr_u input;
+ input.sa6.sin6_family = AF_INET6;
+ input.sa6.sin6_addr = input_address;
+ SET_PORT(&input, 3000);
+
+ sockaddr_u expected;
+ expected.sa6.sin6_family = AF_INET6;
+ expected.sa6.sin6_addr = expected_address;
+ SET_PORT(&expected, 3000);
+
+ sockaddr_u* actual = netof(&input);
+
+ ASSERT_TRUE(actual != NULL);
+ EXPECT_TRUE(IsEqual(expected, *actual));
+}
diff --git a/tests/libntp/numtoa.cpp b/tests/libntp/numtoa.cpp
new file mode 100644
index 000000000000..58e00c4c27ec
--- /dev/null
+++ b/tests/libntp/numtoa.cpp
@@ -0,0 +1,18 @@
+#include "libntptest.h"
+
+class numtoaTest : public libntptest {
+};
+
+TEST_F(numtoaTest, Address) {
+ u_int32 input = htonl(3221225472UL+512UL+1UL); // 192.0.2.1
+
+ EXPECT_STREQ("192.0.2.1", numtoa(input));
+}
+
+TEST_F(numtoaTest, Netmask) {
+ // 255.255.255.0
+ u_int32 hostOrder = 255UL*256UL*256UL*256UL + 255UL*256UL*256UL + 255UL*256UL;
+ u_int32 input = htonl(hostOrder);
+
+ EXPECT_STREQ("255.255.255.0", numtoa(input));
+}
diff --git a/tests/libntp/numtohost.cpp b/tests/libntp/numtohost.cpp
new file mode 100644
index 000000000000..ffc574ee85b3
--- /dev/null
+++ b/tests/libntp/numtohost.cpp
@@ -0,0 +1,15 @@
+#include "libntptest.h"
+
+class numtohostTest : public libntptest {
+};
+
+TEST_F(numtohostTest, LoopbackNetNonResolve) {
+ /* A loopback address in 127.0.0.0/8 is chosen, and
+ * numtohost() should not try to resolve it unless
+ * it is 127.0.0.1
+ */
+
+ u_int32 input = 127*256*256*256 + 1*256 + 1; // 127.0.1.1
+
+ EXPECT_STREQ("127.0.1.1", numtohost(htonl(input)));
+}
diff --git a/tests/libntp/octtoint.cpp b/tests/libntp/octtoint.cpp
new file mode 100644
index 000000000000..14a993e035a1
--- /dev/null
+++ b/tests/libntp/octtoint.cpp
@@ -0,0 +1,57 @@
+#include "libntptest.h"
+
+class octtointTest : public libntptest {
+};
+
+TEST_F(octtointTest, SingleDigit) {
+ const char* str = "5";
+ u_long actual;
+
+ ASSERT_TRUE(octtoint(str, &actual));
+ EXPECT_EQ(5, actual);
+}
+
+TEST_F(octtointTest, MultipleDigits) {
+ const char* str = "271";
+ u_long actual;
+
+ ASSERT_TRUE(octtoint(str, &actual));
+ EXPECT_EQ(185, actual);
+}
+
+TEST_F(octtointTest, Zero) {
+ const char* str = "0";
+ u_long actual;
+
+ ASSERT_TRUE(octtoint(str, &actual));
+ EXPECT_EQ(0, actual);
+}
+
+TEST_F(octtointTest, MaximumUnsigned32bit) {
+ const char* str = "37777777777";
+ u_long actual;
+
+ ASSERT_TRUE(octtoint(str, &actual));
+ EXPECT_EQ(4294967295UL, actual);
+}
+
+TEST_F(octtointTest, Overflow) {
+ const char* str = "40000000000";
+ u_long actual;
+
+ ASSERT_FALSE(octtoint(str, &actual));
+}
+
+TEST_F(octtointTest, IllegalCharacter) {
+ const char* str = "5ac2";
+ u_long actual;
+
+ ASSERT_FALSE(octtoint(str, &actual));
+}
+
+TEST_F(octtointTest, IllegalDigit) {
+ const char* str = "5283";
+ u_long actual;
+
+ ASSERT_FALSE(octtoint(str, &actual));
+}
diff --git a/tests/libntp/prettydate.cpp b/tests/libntp/prettydate.cpp
new file mode 100644
index 000000000000..391ac29a85f5
--- /dev/null
+++ b/tests/libntp/prettydate.cpp
@@ -0,0 +1,16 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+};
+
+class prettydateTest : public libntptest {
+protected:
+ static const u_int32 HALF = 2147483648UL;
+};
+
+TEST_F(prettydateTest, ConstantDate) {
+ l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
+
+ ASSERT_STREQ("cfba1ce0.80000000 Wed, Jun 9 2010 14:00:00.500", gmprettydate(&time));
+}
diff --git a/tests/libntp/recvbuff.cpp b/tests/libntp/recvbuff.cpp
new file mode 100644
index 000000000000..e9505bd7c1cf
--- /dev/null
+++ b/tests/libntp/recvbuff.cpp
@@ -0,0 +1,38 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "recvbuff.h"
+};
+
+class recvbuffTest : public libntptest {
+protected:
+ virtual void SetUp() {
+ init_recvbuff(RECV_INIT);
+ }
+};
+
+TEST_F(recvbuffTest, Initialization) {
+ EXPECT_EQ(RECV_INIT, free_recvbuffs());
+ EXPECT_EQ(0, full_recvbuffs());
+ EXPECT_FALSE(has_full_recv_buffer());
+ EXPECT_TRUE(get_full_recv_buffer() == NULL);
+}
+
+TEST_F(recvbuffTest, GetAndFree) {
+ int initial = free_recvbuffs();
+ recvbuf_t* buf = get_free_recv_buffer();
+
+ EXPECT_EQ(initial-1, free_recvbuffs());
+ freerecvbuf(buf);
+ EXPECT_EQ(initial, free_recvbuffs());
+}
+
+TEST_F(recvbuffTest, GetAndFill) {
+ int initial = free_recvbuffs();
+ recvbuf_t* buf = get_free_recv_buffer();
+
+ add_full_recv_buffer(buf);
+ EXPECT_EQ(1, full_recvbuffs());
+ EXPECT_TRUE(has_full_recv_buffer());
+ EXPECT_EQ(buf, get_full_recv_buffer());
+}
diff --git a/tests/libntp/refnumtoa.cpp b/tests/libntp/refnumtoa.cpp
new file mode 100644
index 000000000000..75460c0b52ba
--- /dev/null
+++ b/tests/libntp/refnumtoa.cpp
@@ -0,0 +1,52 @@
+#include "libntptest.h"
+
+#include "ntp_net.h"
+#include "ntp_refclock.h"
+
+#include <sstream>
+
+class refnumtoaTest : public libntptest {
+protected:
+ /* Might need to be updated if a new refclock gets this id. */
+ static const int UNUSED_REFCLOCK_ID = 250;
+};
+
+#ifdef REFCLOCK /* clockname() is useless otherwise */
+TEST_F(refnumtoaTest, LocalClock) {
+ /* We test with a refclock address of type LOCALCLOCK.
+ * with id 8
+ */
+ u_int32 addr = REFCLOCK_ADDR;
+ addr |= REFCLK_LOCALCLOCK << 8;
+ addr |= 0x8;
+
+ sockaddr_u address;
+ address.sa4.sin_family = AF_INET;
+ address.sa4.sin_addr.s_addr = htonl(addr);
+
+ std::ostringstream expected;
+ expected << clockname(REFCLK_LOCALCLOCK)
+ << "(8)";
+
+ EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
+}
+#endif /* REFCLOCK */
+
+#ifdef REFCLOCK /* refnumtoa() is useless otherwise */
+TEST_F(refnumtoaTest, UnknownId) {
+ /* We test with a currently unused refclock ID */
+ u_int32 addr = REFCLOCK_ADDR;
+ addr |= UNUSED_REFCLOCK_ID << 8;
+ addr |= 0x4;
+
+ sockaddr_u address;
+ address.sa4.sin_family = AF_INET;
+ address.sa4.sin_addr.s_addr = htonl(addr);
+
+ std::ostringstream expected;
+ expected << "REFCLK(" << UNUSED_REFCLOCK_ID
+ << ",4)";
+
+ EXPECT_STREQ(expected.str().c_str(), refnumtoa(&address));
+}
+#endif /* REFCLOCK */
diff --git a/tests/libntp/sfptostr.cpp b/tests/libntp/sfptostr.cpp
new file mode 100644
index 000000000000..5cef47e3cdc2
--- /dev/null
+++ b/tests/libntp/sfptostr.cpp
@@ -0,0 +1,71 @@
+/*
+ * This file contains test for both fptoa and fptoms (which uses dofptoa),
+ * since all these functions are very similar.
+ */
+
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+};
+
+class sfptostr : public libntptest {
+protected:
+ static const int SFP_MAX_PRECISION = 6;
+};
+
+TEST_F(sfptostr, PositiveInteger) {
+ s_fp test = 300 << 16; // exact 300.000000
+
+ EXPECT_STREQ("300.000000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("300000.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, NegativeInteger) {
+ s_fp test = -200 << 16; // exact -200.000000
+
+ EXPECT_STREQ("-200.000000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("-200000.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, PositiveIntegerPositiveFraction) {
+ s_fp test = (300 << 16) + (1 << 15); // 300 + 0.5
+
+ EXPECT_STREQ("300.500000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("300500.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, NegativeIntegerNegativeFraction) {
+ s_fp test = (-200 << 16) - (1 << 15); // -200 - 0.5
+
+ EXPECT_STREQ("-200.500000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("-200500.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, PositiveIntegerNegativeFraction) {
+ s_fp test = (300 << 16) - (1 << 14); // 300 - 0.25
+
+ EXPECT_STREQ("299.750000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("299750.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, NegativeIntegerPositiveFraction) {
+ s_fp test = (-200 << 16) + (1 << 14)*3; // -200 + 0.75
+
+ EXPECT_STREQ("-199.250000", fptoa(test, SFP_MAX_PRECISION));
+ EXPECT_STREQ("-199250.000", fptoms(test, SFP_MAX_PRECISION));
+}
+
+TEST_F(sfptostr, SingleDecimalInteger) {
+ s_fp test = 300 << 16; // 300
+
+ EXPECT_STREQ("300.0", fptoa(test, 1));
+ EXPECT_STREQ("300000.0", fptoms(test, 1));
+}
+
+TEST_F(sfptostr, SingleDecimalRounding) {
+ s_fp test = (2 << 16) + (1 << 14)*3; // 2 + 0.25*3 = 2.75
+
+ EXPECT_STREQ("2.8", fptoa(test, 1));
+ EXPECT_STREQ("2750.0", fptoms(test, 1));
+}
diff --git a/tests/libntp/sockaddrtest.h b/tests/libntp/sockaddrtest.h
new file mode 100644
index 000000000000..4baac4dd73ee
--- /dev/null
+++ b/tests/libntp/sockaddrtest.h
@@ -0,0 +1,58 @@
+#ifndef TESTS_SOCKADDRTEST_H
+#define TESTS_SOCKADDRTEST_H
+
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp.h"
+};
+
+class sockaddrtest : public libntptest {
+protected:
+ ::testing::AssertionResult IsEqual(const sockaddr_u &expected, const sockaddr_u &actual) {
+ if (expected.sa.sa_family != actual.sa.sa_family) {
+ return ::testing::AssertionFailure()
+ << "Expected sa_family: " << expected.sa.sa_family
+ << " but got: " << actual.sa.sa_family;
+ }
+
+ if (actual.sa.sa_family == AF_INET) { // IPv4
+ if (expected.sa4.sin_port == actual.sa4.sin_port &&
+ memcmp(&expected.sa4.sin_addr, &actual.sa4.sin_addr,
+ sizeof(in_addr)) == 0) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "IPv4 comparision failed, expected: "
+ << expected.sa4.sin_addr.s_addr
+ << "(" << socktoa(&expected) << ")"
+ << " but was: "
+ << actual.sa4.sin_addr.s_addr
+ << "(" << socktoa(&actual) << ")";
+ }
+ } else if (actual.sa.sa_family == AF_INET6) { //IPv6
+ if (expected.sa6.sin6_port == actual.sa6.sin6_port &&
+ memcmp(&expected.sa6.sin6_addr, &actual.sa6.sin6_addr,
+ sizeof(in6_addr)) == 0) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "IPv6 comparision failed";
+ }
+ } else { // Unknown family
+ return ::testing::AssertionFailure()
+ << "Unknown sa_family: " << actual.sa.sa_family;
+ }
+ }
+
+ sockaddr_u CreateSockaddr4(const char* address, unsigned int port) {
+ sockaddr_u s;
+ s.sa4.sin_family = AF_INET;
+ s.sa4.sin_addr.s_addr = inet_addr(address);
+ SET_PORT(&s, port);
+
+ return s;
+ }
+};
+
+#endif // TESTS_SOCKADDRTEST_H
diff --git a/tests/libntp/socktoa.cpp b/tests/libntp/socktoa.cpp
new file mode 100644
index 000000000000..6c70b6d8ddc1
--- /dev/null
+++ b/tests/libntp/socktoa.cpp
@@ -0,0 +1,100 @@
+#include "sockaddrtest.h"
+
+class socktoaTest : public sockaddrtest {
+};
+
+TEST_F(socktoaTest, IPv4AddressWithPort) {
+ sockaddr_u input = CreateSockaddr4("192.0.2.10", 123);
+
+ EXPECT_STREQ("192.0.2.10", socktoa(&input));
+ EXPECT_STREQ("192.0.2.10:123", sockporttoa(&input));
+}
+
+TEST_F(socktoaTest, IPv6AddressWithPort) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+
+ const char* expected =
+ "2001:db8:85a3:8d3:1319:8a2e:370:7334";
+ const char* expected_port =
+ "[2001:db8:85a3:8d3:1319:8a2e:370:7334]:123";
+
+ sockaddr_u input;
+ memset(&input, 0, sizeof(input));
+ AF(&input) = AF_INET6;
+ SET_ADDR6N(&input, address);
+ SET_PORT(&input, 123);
+
+ EXPECT_STREQ(expected, socktoa(&input));
+ EXPECT_STREQ(expected_port, sockporttoa(&input));
+}
+
+#ifdef ISC_PLATFORM_HAVESCOPEID
+TEST_F(socktoaTest, ScopedIPv6AddressWithPort) {
+ const struct in6_addr address = {
+ 0xfe, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x12, 0x3f, 0xff,
+ 0xfe, 0x29, 0xff, 0xfa
+ };
+
+ const char* expected =
+ "fe80::212:3fff:fe29:fffa%5";
+ const char* expected_port =
+ "[fe80::212:3fff:fe29:fffa%5]:123";
+
+ sockaddr_u input;
+ memset(&input, 0, sizeof(input));
+ AF(&input) = AF_INET6;
+ SET_ADDR6N(&input, address);
+ SET_PORT(&input, 123);
+ SCOPE_VAR(&input) = 5;
+
+ EXPECT_STREQ(expected, socktoa(&input));
+ EXPECT_STREQ(expected_port, sockporttoa(&input));
+}
+#endif /* ISC_PLATFORM_HAVESCOPEID */
+
+TEST_F(socktoaTest, HashEqual) {
+ sockaddr_u input1 = CreateSockaddr4("192.00.2.2", 123);
+ sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
+
+ ASSERT_TRUE(IsEqual(input1, input2));
+ EXPECT_EQ(sock_hash(&input1), sock_hash(&input2));
+}
+
+TEST_F(socktoaTest, HashNotEqual) {
+ /* These two addresses should not generate the same hash. */
+ sockaddr_u input1 = CreateSockaddr4("192.0.2.1", 123);
+ sockaddr_u input2 = CreateSockaddr4("192.0.2.2", 123);
+
+ ASSERT_FALSE(IsEqual(input1, input2));
+ EXPECT_NE(sock_hash(&input1), sock_hash(&input2));
+}
+
+TEST_F(socktoaTest, IgnoreIPv6Fields) {
+ const struct in6_addr address = {
+ 0x20, 0x01, 0x0d, 0xb8,
+ 0x85, 0xa3, 0x08, 0xd3,
+ 0x13, 0x19, 0x8a, 0x2e,
+ 0x03, 0x70, 0x73, 0x34
+ };
+
+ sockaddr_u input1, input2;
+
+ input1.sa6.sin6_family = AF_INET6;
+ input1.sa6.sin6_addr = address;
+ input1.sa6.sin6_flowinfo = 30L; // This value differs from input2.
+ SET_PORT(&input1, NTP_PORT);
+
+ input2.sa6.sin6_family = AF_INET6;
+ input2.sa6.sin6_addr = address;
+ input2.sa6.sin6_flowinfo = 10L; // This value differs from input1.
+ SET_PORT(&input2, NTP_PORT);
+
+ EXPECT_EQ(sock_hash(&input1), sock_hash(&input2));
+}
diff --git a/tests/libntp/ssl_init.cpp b/tests/libntp/ssl_init.cpp
new file mode 100644
index 000000000000..8812656c3142
--- /dev/null
+++ b/tests/libntp/ssl_init.cpp
@@ -0,0 +1,50 @@
+#include "libntptest.h"
+
+extern "C" {
+#ifdef OPENSSL
+# include "openssl/err.h"
+# include "openssl/rand.h"
+# include "openssl/evp.h"
+#endif
+#include "ntp.h"
+};
+
+class ssl_initTest : public libntptest {
+protected:
+ static const size_t TEST_MD5_DIGEST_LENGTH = 16;
+ static const size_t TEST_SHA1_DIGEST_LENGTH = 20;
+};
+
+// keytype_from_text()
+TEST_F(ssl_initTest, MD5KeyTypeWithoutDigestLength) {
+ ASSERT_EQ(KEY_TYPE_MD5, keytype_from_text("MD5", NULL));
+}
+
+TEST_F(ssl_initTest, MD5KeyTypeWithDigestLength) {
+ size_t digestLength;
+ size_t expected = TEST_MD5_DIGEST_LENGTH;
+
+ EXPECT_EQ(KEY_TYPE_MD5, keytype_from_text("MD5", &digestLength));
+ EXPECT_EQ(expected, digestLength);
+}
+
+#ifdef OPENSSL
+TEST_F(ssl_initTest, SHA1KeyTypeWithDigestLength) {
+ size_t digestLength;
+ size_t expected = TEST_SHA1_DIGEST_LENGTH;
+
+ EXPECT_EQ(NID_sha, keytype_from_text("SHA", &digestLength));
+ EXPECT_EQ(expected, digestLength);
+}
+#endif /* OPENSSL */
+
+// keytype_name()
+TEST_F(ssl_initTest, MD5KeyName) {
+ EXPECT_STREQ("MD5", keytype_name(KEY_TYPE_MD5));
+}
+
+#ifdef OPENSSL
+TEST_F(ssl_initTest, SHA1KeyName) {
+ EXPECT_STREQ("SHA", keytype_name(NID_sha));
+}
+#endif /* OPENSSL */
diff --git a/tests/libntp/statestr.cpp b/tests/libntp/statestr.cpp
new file mode 100644
index 000000000000..506b079aa478
--- /dev/null
+++ b/tests/libntp/statestr.cpp
@@ -0,0 +1,27 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h
+#include "ntp_control.h"
+};
+
+class statestrTest : public libntptest {
+};
+
+// eventstr()
+TEST_F(statestrTest, PeerRestart) {
+ EXPECT_STREQ("restart", eventstr(PEVNT_RESTART));
+}
+
+TEST_F(statestrTest, SysUnspecified) {
+ EXPECT_STREQ("unspecified", eventstr(EVNT_UNSPEC));
+}
+
+// ceventstr()
+TEST_F(statestrTest, ClockCodeExists) {
+ EXPECT_STREQ("clk_unspec", ceventstr(CTL_CLK_OKAY));
+}
+
+TEST_F(statestrTest, ClockCodeUnknown) {
+ EXPECT_STREQ("clk_-1", ceventstr(-1));
+}
diff --git a/tests/libntp/strtolfp.cpp b/tests/libntp/strtolfp.cpp
new file mode 100644
index 000000000000..729996e0b17d
--- /dev/null
+++ b/tests/libntp/strtolfp.cpp
@@ -0,0 +1,107 @@
+#include "lfptest.h"
+
+/* This class tests both atolfp and mstolfp */
+
+class strtolfpTest : public lfptest {
+};
+
+TEST_F(strtolfpTest, PositiveInteger) {
+ const char *str = "500";
+ const char *str_ms = "500000";
+
+ l_fp expected = {500,0};
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, NegativeInteger) {
+ const char *str = "-300";
+ const char *str_ms = "-300000";
+
+ l_fp expected;
+ expected.l_i = -300;
+ expected.l_uf = 0;
+
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, PositiveFraction) {
+ const char *str = "+500.5";
+ const char *str_ms = "500500.0";
+
+ l_fp expected = {500, HALF};
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, NegativeFraction) {
+ const char *str = "-300.75";
+ const char *str_ms = "-300750";
+
+ l_fp expected;
+ expected.l_i = -301;
+ expected.l_uf = QUARTER;
+
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, PositiveMsFraction) {
+ const char *str = "300.00025";
+ const char *str_ms = "300000.25";
+
+ l_fp expected = {300, QUARTER_PROMILLE_APPRX};
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, NegativeMsFraction) {
+ const char *str = "-199.99975";
+ const char *str_ms = "-199999.75";
+
+ l_fp expected;
+ expected.l_i = -200;
+ expected.l_uf = QUARTER_PROMILLE_APPRX;
+
+ l_fp actual, actual_ms;
+
+ ASSERT_TRUE(atolfp(str, &actual));
+ ASSERT_TRUE(mstolfp(str_ms, &actual_ms));
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+ EXPECT_TRUE(IsEqual(expected, actual_ms));
+}
+
+TEST_F(strtolfpTest, InvalidChars) {
+ const char *str = "500.4a2";
+ l_fp actual, actual_ms;
+
+ ASSERT_FALSE(atolfp(str, &actual));
+ ASSERT_FALSE(mstolfp(str, &actual_ms));
+}
diff --git a/tests/libntp/timespecops.cpp b/tests/libntp/timespecops.cpp
new file mode 100644
index 000000000000..392d271020a5
--- /dev/null
+++ b/tests/libntp/timespecops.cpp
@@ -0,0 +1,475 @@
+#include "libntptest.h"
+#include "timestructs.h"
+
+extern "C" {
+#include <math.h>
+#include "timespecops.h"
+}
+
+#include <string>
+#include <sstream>
+
+using namespace timeStruct;
+
+class timespecTest : public libntptest {
+protected:
+ static u_int32 my_tick_to_tsf(u_int32 ticks);
+ static u_int32 my_tsf_to_tick(u_int32 tsf);
+
+ // that's it...
+ struct lfpfracdata {
+ long nsec;
+ u_int32 frac;
+ };
+ static const lfpfracdata fdata[];
+};
+
+u_int32
+timespecTest::my_tick_to_tsf(
+ u_int32 ticks
+ )
+{
+ // convert nanoseconds to l_fp fractional units, using double
+ // precision float calculations or, if available, 64bit integer
+ // arithmetic. This should give the precise fraction, rounded to
+ // the nearest representation.
+#ifdef HAVE_U_INT64
+ return u_int32(((u_int64(ticks) << 32) + 500000000) / 1000000000);
+#else
+ return u_int32(double(ticks) * 4.294967296 + 0.5);
+#endif
+ // And before you ask: if ticks >= 1000000000, the result is
+ // truncated nonsense, so don't use it out-of-bounds.
+}
+
+u_int32
+timespecTest::my_tsf_to_tick(
+ u_int32 tsf
+ )
+{
+ // Inverse operation: converts fraction to microseconds.
+#ifdef HAVE_U_INT64
+ return u_int32((u_int64(tsf) * 1000000000 + 0x80000000) >> 32);
+#else
+ return u_int32(double(tsf) / 4.294967296 + 0.5);
+#endif
+ // Beware: The result might be 10^9 due to rounding!
+}
+
+const timespecTest::lfpfracdata timespecTest::fdata [] = {
+ { 0, 0x00000000 }, { 2218896, 0x00916ae6 },
+ { 16408100, 0x0433523d }, { 125000000, 0x20000000 },
+ { 250000000, 0x40000000 }, { 287455871, 0x4996b53d },
+ { 375000000, 0x60000000 }, { 500000000, 0x80000000 },
+ { 518978897, 0x84dbcd0e }, { 563730222, 0x90509fb3 },
+ { 563788007, 0x9054692c }, { 583289882, 0x95527c57 },
+ { 607074509, 0x9b693c2a }, { 625000000, 0xa0000000 },
+ { 645184059, 0xa52ac851 }, { 676497788, 0xad2ef583 },
+ { 678910895, 0xadcd1abb }, { 679569625, 0xadf84663 },
+ { 690926741, 0xb0e0932d }, { 705656483, 0xb4a5e73d },
+ { 723553854, 0xb93ad34c }, { 750000000, 0xc0000000 },
+ { 763550253, 0xc3780785 }, { 775284917, 0xc6791284 },
+ { 826190764, 0xd3813ce8 }, { 875000000, 0xe0000000 },
+ { 956805507, 0xf4f134a9 }, { 982570733, 0xfb89c16c }
+};
+
+
+// ---------------------------------------------------------------------
+// test support stuff -- part 1
+// ---------------------------------------------------------------------
+
+TEST_F(timespecTest, Helpers1) {
+ timespec_wrap x;
+
+ for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++) {
+ x.V.tv_nsec = -1;
+ ASSERT_FALSE(x.valid());
+ x.V.tv_nsec = 0;
+ ASSERT_TRUE(x.valid());
+ x.V.tv_nsec = 999999999;
+ ASSERT_TRUE(x.valid());
+ x.V.tv_nsec = 1000000000;
+ ASSERT_FALSE(x.valid());
+ }
+}
+
+//----------------------------------------------------------------------
+// test normalisation
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, Normalise) {
+ for (long ns = -2000000000; ns <= 2000000000; ns += 10000000) {
+ timespec_wrap x(0, ns);
+
+ x = normalize_tspec(x);
+ ASSERT_TRUE(x.valid());
+ }
+}
+
+//----------------------------------------------------------------------
+// test classification
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, SignNoFrac) {
+ // sign test, no fraction
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 0);
+ int E = (i > 0) - (i < 0);
+ int r = test_tspec(a);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timespecTest, SignWithFrac) {
+ // sign test, with fraction
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 10);
+ int E = (i >= 0) - (i < 0);
+ int r = test_tspec(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// test compare
+//----------------------------------------------------------------------
+TEST_F(timespecTest, CmpFracEQ) {
+ // fractions are equal
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a( i , 200);
+ timespec_wrap b( j , 200);
+ int E = (i > j) - (i < j);
+ int r = cmp_tspec_denorm(a, b);
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timespecTest, CmpFracGT) {
+ // fraction a bigger fraction b
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a(i, 999999800);
+ timespec_wrap b(j, 200);
+ int E = (i >= j) - (i < j);
+ int r = cmp_tspec_denorm(a, b);
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timespecTest, CmpFracLT) {
+ // fraction a less fraction b
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a(i, 200);
+ timespec_wrap b(j, 999999800);
+ int E = (i > j) - (i <= j);
+ int r = cmp_tspec_denorm(a, b);
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// Test addition (sum)
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, AddFullNorm) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a(i, 200);
+ timespec_wrap b(j, 400);
+ timespec_wrap E(i + j, 200 + 400);
+ timespec_wrap c;
+
+ c = add_tspec(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, AddFullOflow1) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a(i, 200);
+ timespec_wrap b(j, 999999900);
+ timespec_wrap E(i + j + 1, 100);
+ timespec_wrap c;
+
+ c = add_tspec(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, AddNsecNorm) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 200);
+ timespec_wrap E(i, 600);
+ timespec_wrap c;
+
+ c = add_tspec_ns(a, 600 - 200);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, AddNsecOflow1) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 200);
+ timespec_wrap E(i + 1, 100);
+ timespec_wrap c;
+
+ c = add_tspec_ns(a, NANOSECONDS - 100);
+ ASSERT_EQ(E, c);
+ }
+}
+
+//----------------------------------------------------------------------
+// test subtraction (difference)
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, SubFullNorm) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a( i , 600);
+ timespec_wrap b( j , 400);
+ timespec_wrap E(i-j, 200);
+ timespec_wrap c;
+
+ c = sub_tspec(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, SubFullOflow) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timespec_wrap a( i , 100);
+ timespec_wrap b( j , 999999900);
+ timespec_wrap E(i-j-1, 200);
+ timespec_wrap c;
+
+ c = sub_tspec(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, SubNsecNorm) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 600);
+ timespec_wrap E(i, 200);
+ timespec_wrap c;
+
+ c = sub_tspec_ns(a, 600 - 200);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timespecTest, SubNsecOflow) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a( i , 100);
+ timespec_wrap E(i-1, 200);
+ timespec_wrap c;
+
+ c = sub_tspec_ns(a, NANOSECONDS - 100);
+ ASSERT_EQ(E, c);
+ }
+}
+
+//----------------------------------------------------------------------
+// test negation
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, Neg) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 100);
+ timespec_wrap b;
+ timespec_wrap c;
+
+ b = neg_tspec(a);
+ c = add_tspec(a, b);
+ ASSERT_EQ(0, test_tspec(c));
+ }
+}
+
+//----------------------------------------------------------------------
+// test abs value
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, AbsNoFrac) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i , 0);
+ timespec_wrap b;
+
+ b = abs_tspec(a);
+ ASSERT_EQ((i != 0), test_tspec(b));
+ }
+}
+
+TEST_F(timespecTest, AbsWithFrac) {
+ for (int i = -4; i <= 4; ++i) {
+ timespec_wrap a(i, 100);
+ timespec_wrap b;
+
+ b = abs_tspec(a);
+ ASSERT_EQ(1, test_tspec(b));
+ }
+}
+
+// ---------------------------------------------------------------------
+// test support stuff -- part 2
+// ---------------------------------------------------------------------
+
+TEST_F(timespecTest, Helpers2) {
+ AssertTimespecClose isClose(0, 2);
+ timespec_wrap x, y;
+
+ for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++)
+ for (x.V.tv_nsec = 1;
+ x.V.tv_nsec < 1000000000;
+ x.V.tv_nsec += 499999999) {
+ for (long i = -4; i < 5; i++) {
+ y = x;
+ y.V.tv_nsec += i;
+ if (i >= -2 && i <= 2)
+ ASSERT_PRED_FORMAT2(isClose, x, y);
+ else
+ ASSERT_PRED_FORMAT2(!isClose, x, y);
+ }
+ }
+}
+
+// global predicate instances we're using here
+static AssertFpClose FpClose(0, 1);
+static AssertTimespecClose TimespecClose(0, 2);
+
+//----------------------------------------------------------------------
+// conversion to l_fp
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, ToLFPbittest) {
+ for (u_int32 i = 0; i < 1000000000; i+=1000) {
+ timespec_wrap a(1, i);
+ l_fp_wrap E(1, my_tick_to_tsf(i));
+ l_fp_wrap r;
+
+ r = tspec_intv_to_lfp(a);
+ ASSERT_PRED_FORMAT2(FpClose, E, r);
+ }
+}
+
+TEST_F(timespecTest, ToLFPrelPos) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timespec_wrap a(1, fdata[i].nsec);
+ l_fp_wrap E(1, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tspec_intv_to_lfp(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timespecTest, ToLFPrelNeg) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timespec_wrap a(-1, fdata[i].nsec);
+ l_fp_wrap E(~0, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tspec_intv_to_lfp(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timespecTest, ToLFPabs) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timespec_wrap a(1, fdata[i].nsec);
+ l_fp_wrap E(1 + JAN_1970, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tspec_stamp_to_lfp(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// conversion from l_fp
+//----------------------------------------------------------------------
+TEST_F(timespecTest, FromLFPbittest) {
+ // Not *exactly* a bittest, because 2**32 tests would take a
+ // really long time even on very fast machines! So we do test
+ // every 1000 fractional units.
+ for (u_int32 tsf = 0; tsf < ~u_int32(1000); tsf += 1000) {
+ timespec_wrap E(1, my_tsf_to_tick(tsf));
+ l_fp_wrap a(1, tsf);
+ timespec_wrap r;
+
+ r = lfp_intv_to_tspec(a);
+ // The conversion might be off by one nanosecond when
+ // comparing to calculated value.
+ ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ }
+}
+
+TEST_F(timespecTest, FromLFPrelPos) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ l_fp_wrap a(1, fdata[i].frac);
+ timespec_wrap E(1, fdata[i].nsec);
+ timespec_wrap r;
+
+ r = lfp_intv_to_tspec(a);
+ ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ }
+}
+
+TEST_F(timespecTest, FromLFPrelNeg) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ l_fp_wrap a(~0, fdata[i].frac);
+ timespec_wrap E(-1, fdata[i].nsec);
+ timespec_wrap r;
+
+ r = lfp_intv_to_tspec(a);
+ ASSERT_PRED_FORMAT2(TimespecClose, E, r);
+ }
+}
+
+
+// nsec -> frac -> nsec roundtrip, using a prime start and increment
+TEST_F(timespecTest, LFProundtrip) {
+ for (int32_t t = -1; t < 2; ++t)
+ for (u_int32 i = 4999; i < 1000000000; i+=10007) {
+ timespec_wrap E(t, i);
+ l_fp_wrap a;
+ timespec_wrap r;
+
+ a = tspec_intv_to_lfp(E);
+ r = lfp_intv_to_tspec(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// string formatting
+//----------------------------------------------------------------------
+
+TEST_F(timespecTest, ToString) {
+ static const struct {
+ time_t sec;
+ long nsec;
+ const char * repr;
+ } data [] = {
+ { 0, 0, "0.000000000" },
+ { 2, 0, "2.000000000" },
+ {-2, 0, "-2.000000000" },
+ { 0, 1, "0.000000001" },
+ { 0,-1, "-0.000000001" },
+ { 1,-1, "0.999999999" },
+ {-1, 1, "-0.999999999" },
+ {-1,-1, "-1.000000001" },
+ };
+ for (int i = 0; i < COUNTOF(data); i++) {
+ timespec_wrap a(data[i].sec, data[i].nsec);
+ std::string E(data[i].repr);
+ std::string r(tspectoa(a));
+ ASSERT_EQ(E, r);
+ }
+}
+
+// -*- EOF -*-
diff --git a/tests/libntp/timestructs.cpp b/tests/libntp/timestructs.cpp
new file mode 100644
index 000000000000..3cd0c543fb00
--- /dev/null
+++ b/tests/libntp/timestructs.cpp
@@ -0,0 +1,156 @@
+/*
+ * timestructs.cpp -- test bed adaptors for time structs.
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ */
+#include "libntptest.h"
+#include "timestructs.h"
+
+extern "C" {
+#include "timetoa.h"
+#include "timevalops.h"
+#include "timespecops.h"
+}
+
+namespace timeStruct {
+
+std::ostream&
+operator << (std::ostream& os, const timeStruct::l_fp_wrap& val)
+{
+ // raw data formatting
+ os << "0x" << std::hex << val.V.l_ui << ':'
+ << std::setfill('0') << std::setw(8) << val.V.l_uf
+ << std::dec;
+ // human-readable format
+ os << '[' << lfptoa(&val.V, 10) << ']';
+ return os;
+}
+
+std::ostream&
+operator << (std::ostream& os, const timeStruct::timeval_wrap& val)
+{
+ // raw data formatting
+ os << val.V.tv_sec << ':' << val.V.tv_usec;
+ // human-readable format
+ os << '['
+ << format_time_fraction(val.V.tv_sec, val.V.tv_usec, 6)
+ << ']';
+ return os;
+}
+
+std::ostream&
+operator << (std::ostream& os, const timeStruct::timespec_wrap& val)
+{
+ // raw data formatting
+ os << val.V.tv_sec << ':' << val.V.tv_nsec;
+ // human-readable format
+ os << '['
+ << format_time_fraction(val.V.tv_sec, val.V.tv_nsec, 9)
+ << ']';
+ return os;
+}
+
+// Implementation of the l_fp closeness predicate
+
+AssertFpClose::AssertFpClose(
+ u_int32 hi,
+ u_int32 lo
+ )
+{
+ limit.l_ui = hi;
+ limit.l_uf = lo;
+}
+
+::testing::AssertionResult
+AssertFpClose::operator()(
+ const char* m_expr,
+ const char* n_expr,
+ const l_fp & m,
+ const l_fp & n
+ )
+{
+ l_fp diff;
+
+ if (L_ISGEQ(&m, &n)) {
+ diff = m;
+ L_SUB(&diff, &n);
+ } else {
+ diff = n;
+ L_SUB(&diff, &m);
+ }
+ if (L_ISGEQ(&limit, &diff))
+ return ::testing::AssertionSuccess();
+
+ return ::testing::AssertionFailure()
+ << m_expr << " which is " << l_fp_wrap(m)
+ << "\nand\n"
+ << n_expr << " which is " << l_fp_wrap(n)
+ << "\nare not close; diff=" << l_fp_wrap(diff);
+}
+
+// Implementation of the timeval closeness predicate
+
+AssertTimevalClose::AssertTimevalClose(
+ time_t hi,
+ int32 lo
+ )
+{
+ limit.tv_sec = hi;
+ limit.tv_usec = lo;
+}
+
+::testing::AssertionResult
+AssertTimevalClose::operator()(
+ const char* m_expr,
+ const char* n_expr,
+ const struct timeval & m,
+ const struct timeval & n
+ )
+{
+ struct timeval diff;
+
+ diff = abs_tval(sub_tval(m, n));
+ if (cmp_tval(limit, diff) >= 0)
+ return ::testing::AssertionSuccess();
+
+ return ::testing::AssertionFailure()
+ << m_expr << " which is " << timeval_wrap(m)
+ << "\nand\n"
+ << n_expr << " which is " << timeval_wrap(n)
+ << "\nare not close; diff=" << timeval_wrap(diff);
+}
+
+// Implementation of the timespec closeness predicate
+
+AssertTimespecClose::AssertTimespecClose(
+ time_t hi,
+ int32 lo
+ )
+{
+ limit.tv_sec = hi;
+ limit.tv_nsec = lo;
+}
+
+::testing::AssertionResult
+AssertTimespecClose::operator()(
+ const char* m_expr,
+ const char* n_expr,
+ const struct timespec & m,
+ const struct timespec & n
+ )
+{
+ struct timespec diff;
+
+ diff = abs_tspec(sub_tspec(m, n));
+ if (cmp_tspec(limit, diff) >= 0)
+ return ::testing::AssertionSuccess();
+
+ return ::testing::AssertionFailure()
+ << m_expr << " which is " << timespec_wrap(m)
+ << "\nand\n"
+ << n_expr << " which is " << timespec_wrap(n)
+ << "\nare not close; diff=" << timespec_wrap(diff);
+}
+
+} // namespace timeStruct
diff --git a/tests/libntp/timestructs.h b/tests/libntp/timestructs.h
new file mode 100644
index 000000000000..7bc4ffdcf8ca
--- /dev/null
+++ b/tests/libntp/timestructs.h
@@ -0,0 +1,185 @@
+/*
+ * timestructs.h -- test bed adaptors for time structs.
+ *
+ * Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
+ * The contents of 'html/copyright.html' apply.
+ *
+ * Some wrapper classes and a closeness predicate that are used to
+ * bridge the gap between the goggletest framework and the structs used
+ * for representing time stamps (l_fp, struct timeval, struct timespec).
+ *
+ * Some ostream conversion operators are provided to give diagnostic
+ * output on errors. The normal string conversion functions will give
+ * HRVs (human readable values) but we might also be interested in the
+ * machine representation for diagnostic purposes.
+ */
+#ifndef TIMESTRUCTS_H
+#define TIMESTRUCTS_H
+
+extern "C" {
+#include "ntp_fp.h"
+}
+
+namespace timeStruct {
+
+// wrap a l_fp struct with common operations
+class l_fp_wrap {
+ public:
+ l_fp V;
+
+ l_fp_wrap()
+ { ZERO(V); }
+ l_fp_wrap(u_int32 hi, u_int32 lo)
+ { V.l_ui = hi; V.l_uf = lo; }
+ l_fp_wrap(const l_fp &rhs)
+ { V = rhs; }
+ bool operator == (const l_fp_wrap& rhs) const
+ { return L_ISEQU(&V, &rhs.V); }
+ operator l_fp* ()
+ { return &V; }
+ operator l_fp& ()
+ { return V; }
+ l_fp_wrap & operator = (const l_fp_wrap& rhs)
+ { V = rhs.V; return *this; }
+ l_fp_wrap& operator = (const l_fp& rhs)
+ { V = rhs; return *this; }
+ };
+
+// wrap a 'struct timeval' with common operations
+class timeval_wrap {
+public:
+ struct timeval V;
+
+ timeval_wrap()
+ { ZERO(V); }
+ timeval_wrap(time_t hi, long lo)
+ { V.tv_sec = hi; V.tv_usec = lo; }
+ timeval_wrap(const struct timeval & rhs)
+ { V = rhs; }
+ timeval_wrap(const timeval_wrap & rhs)
+ { V = rhs.V; }
+ bool operator == (const timeval_wrap& rhs) const
+ { return V.tv_sec == rhs.V.tv_sec &&
+ V.tv_usec == rhs.V.tv_usec ; }
+ bool valid() const
+ { return V.tv_usec >= 0 && V.tv_usec < 1000000; }
+ operator struct timeval* ()
+ { return &V; }
+ operator struct timeval& ()
+ { return V; }
+ timeval_wrap& operator = (const timeval_wrap& rhs)
+ { V = rhs.V; return *this; }
+ timeval_wrap& operator = (const struct timeval& rhs)
+ { V = rhs; return *this; }
+};
+
+// wrap a 'struct timespec' with common operations
+class timespec_wrap {
+public:
+ struct timespec V;
+
+ timespec_wrap()
+ { ZERO(V); }
+ timespec_wrap(time_t hi, long lo)
+ { V.tv_sec = hi; V.tv_nsec = lo; }
+ timespec_wrap(const struct timespec & rhs)
+ { V = rhs; }
+ timespec_wrap(const timespec_wrap & rhs)
+ { V = rhs.V; }
+ bool operator == (const timespec_wrap& rhs) const
+ { return V.tv_sec == rhs.V.tv_sec &&
+ V.tv_nsec == rhs.V.tv_nsec ; }
+ bool valid() const
+ { return V.tv_nsec >= 0 && V.tv_nsec < 1000000000; }
+ operator struct timespec* ()
+ { return &V; }
+ operator struct timespec& ()
+ { return V; }
+ timespec_wrap& operator = (const timespec_wrap& rhs)
+ { V = rhs.V; return *this; }
+ timespec_wrap& operator = (const struct timespec& rhs)
+ { V = rhs; return *this; }
+};
+
+// l_fp closeness testing predicate
+//
+// This predicate is used for the closeness ('near') testing of l_fp
+// values. Once constructed with a limit, it can be used to check the
+// absolute difference of two l_fp structs against that limit; if the
+// difference is less or equal to this limit, the test passes.
+class AssertFpClose {
+private:
+ l_fp limit;
+
+public:
+ AssertFpClose(u_int32 hi, u_int32 lo);
+
+ ::testing::AssertionResult
+ operator()(const char* m_expr, const char* n_expr,
+ const l_fp & m, const l_fp & n);
+};
+
+
+// timeval closeness testing predicate
+//
+// CAVEAT: This class uses the timevalops functions
+// - sub_tval
+// - abs_tval
+// - cmp_tval
+//
+// This creates a dependency loop of sorts. The loop is defused by the
+// fact that these basic operations can be tested by exact value tests,
+// so once the basic timeval operations passed it's safe to use this
+// predicate.
+class AssertTimevalClose {
+private:
+ struct timeval limit;
+
+public:
+ // note: (hi,lo) should be a positive normalised timeval;
+ // the constructor does not normalise the values!
+ AssertTimevalClose(time_t hi, int32 lo);
+
+ ::testing::AssertionResult
+ operator()(const char* m_expr, const char* n_expr,
+ const struct timeval & m, const struct timeval & n);
+};
+
+
+// timespec closeness testing predicate
+//
+// CAVEAT: This class uses the timespecops functions
+// - sub_tspec
+// - abs_tspec
+// - cmp_tspec
+//
+// See the equivalent timeval helper.
+class AssertTimespecClose {
+private:
+ struct timespec limit;
+
+public:
+ // note: (hi,lo) should be a positive normalised timespec;
+ // the constructor does not normalise the values!
+ AssertTimespecClose(time_t hi, int32 lo);
+
+ ::testing::AssertionResult
+ operator()(const char* m_expr, const char* n_expr,
+ const struct timespec & m, const struct timespec & n);
+};
+
+
+// since googletest wants to string format items, we declare the
+// necessary operators. Since all adaptors have only public members
+// there is need for friend declarations anywhere.
+
+extern std::ostream& operator << (std::ostream& os,
+ const timeStruct::l_fp_wrap& val);
+extern std::ostream& operator << (std::ostream& os,
+ const timeStruct::timeval_wrap& val);
+extern std::ostream& operator << (std::ostream& os,
+ const timeStruct::timespec_wrap& val);
+
+} // namespace timeStruct
+
+#endif // TIMESTRUCTS_H
diff --git a/tests/libntp/timevalops.cpp b/tests/libntp/timevalops.cpp
new file mode 100644
index 000000000000..7232615b91bc
--- /dev/null
+++ b/tests/libntp/timevalops.cpp
@@ -0,0 +1,480 @@
+#include "libntptest.h"
+#include "timestructs.h"
+
+extern "C" {
+#include <math.h>
+#include "timevalops.h"
+}
+
+#include <string>
+#include <sstream>
+
+using namespace timeStruct;
+
+class timevalTest : public libntptest {
+protected:
+ static u_int32 my_tick_to_tsf(u_int32 ticks);
+ static u_int32 my_tsf_to_tick(u_int32 tsf);
+
+ // that's it...
+ struct lfpfracdata {
+ long usec;
+ u_int32 frac;
+ };
+ static const lfpfracdata fdata[];
+};
+
+u_int32
+timevalTest::my_tick_to_tsf(
+ u_int32 ticks
+ )
+{
+ // convert microseconds to l_fp fractional units, using double
+ // precision float calculations or, if available, 64bit integer
+ // arithmetic. This should give the precise fraction, rounded to
+ // the nearest representation.
+#ifdef HAVE_U_INT64
+ return u_int32(((u_int64(ticks) << 32) + 500000) / 1000000);
+#else
+ return u_int32(double(ticks) * 4294.967296 + 0.5);
+#endif
+ // And before you ask: if ticks >= 1000000, the result is
+ // truncated nonsense, so don't use it out-of-bounds.
+}
+
+u_int32
+timevalTest::my_tsf_to_tick(
+ u_int32 tsf
+ )
+{
+ // Inverse operation: converts fraction to microseconds.
+#ifdef HAVE_U_INT64
+ return u_int32((u_int64(tsf) * 1000000 + 0x80000000) >> 32);
+#else
+ return u_int32(double(tsf) / 4294.967296 + 0.5);
+#endif
+ // Beware: The result might be 10^6 due to rounding!
+}
+
+const timevalTest::lfpfracdata timevalTest::fdata [] = {
+ { 0, 0x00000000 }, { 7478, 0x01ea1405 },
+ { 22077, 0x05a6d699 }, { 125000, 0x20000000 },
+ { 180326, 0x2e29d841 }, { 207979, 0x353e1c9b },
+ { 250000, 0x40000000 }, { 269509, 0x44fe8ab5 },
+ { 330441, 0x5497c808 }, { 333038, 0x5541fa76 },
+ { 375000, 0x60000000 }, { 394734, 0x650d4995 },
+ { 446327, 0x72427c7c }, { 500000, 0x80000000 },
+ { 517139, 0x846338b4 }, { 571953, 0x926b8306 },
+ { 587353, 0x965cc426 }, { 625000, 0xa0000000 },
+ { 692136, 0xb12fd32c }, { 750000, 0xc0000000 },
+ { 834068, 0xd5857aff }, { 848454, 0xd9344806 },
+ { 854222, 0xdaae4b02 }, { 861465, 0xdc88f862 },
+ { 875000, 0xe0000000 }, { 910661, 0xe921144d },
+ { 922162, 0xec12cf10 }, { 942190, 0xf1335d25 }
+};
+
+
+// ---------------------------------------------------------------------
+// test support stuff - part1
+// ---------------------------------------------------------------------
+
+TEST_F(timevalTest, Helpers1) {
+ timeval_wrap x;
+
+ for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++) {
+ x.V.tv_usec = -1;
+ ASSERT_FALSE(x.valid());
+ x.V.tv_usec = 0;
+ ASSERT_TRUE(x.valid());
+ x.V.tv_usec = 999999;
+ ASSERT_TRUE(x.valid());
+ x.V.tv_usec = 1000000;
+ ASSERT_FALSE(x.valid());
+ }
+}
+
+//----------------------------------------------------------------------
+// test normalisation
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, Normalise) {
+ for (long ns = -2000000000; ns <= 2000000000; ns += 10000000) {
+ timeval_wrap x(0, ns);
+
+ x = normalize_tval(x);
+ ASSERT_TRUE(x.valid());
+ }
+}
+
+//----------------------------------------------------------------------
+// test classification
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, SignNoFrac) {
+ // sign test, no fraction
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 0);
+ int E = (i > 0) - (i < 0);
+ int r = test_tval(a);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timevalTest, SignWithFrac) {
+ // sign test, with fraction
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 10);
+ int E = (i >= 0) - (i < 0);
+ int r = test_tval(a);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// test compare
+//----------------------------------------------------------------------
+TEST_F(timevalTest, CmpFracEQ) {
+ // fractions are equal
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 200);
+ timeval_wrap b(j, 200);
+ int E = (i > j) - (i < j);
+ int r = cmp_tval_denorm(a, b);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timevalTest, CmpFracGT) {
+ // fraction a bigger fraction b
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a( i , 999800);
+ timeval_wrap b( j , 200);
+ int E = (i >= j) - (i < j);
+ int r = cmp_tval_denorm(a, b);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+TEST_F(timevalTest, CmpFracLT) {
+ // fraction a less fraction b
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 200);
+ timeval_wrap b(j, 999800);
+ int E = (i > j) - (i <= j);
+ int r = cmp_tval_denorm(a, b);
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// Test addition (sum)
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, AddFullNorm) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 200);
+ timeval_wrap b(j, 400);
+ timeval_wrap E(i + j, 200 + 400);
+ timeval_wrap c;
+
+ c = add_tval(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, AddFullOflow1) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 200);
+ timeval_wrap b(j, 999900);
+ timeval_wrap E(i + j + 1, 100);
+ timeval_wrap c;
+
+ c = add_tval(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, AddUsecNorm) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 200);
+ timeval_wrap E(i, 600);
+ timeval_wrap c;
+
+ c = add_tval_us(a, 600 - 200);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, AddUsecOflow1) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 200);
+ timeval_wrap E(i + 1, 100);
+ timeval_wrap c;
+
+ c = add_tval_us(a, MICROSECONDS - 100);
+ ASSERT_EQ(E, c);
+ }
+}
+
+//----------------------------------------------------------------------
+// test subtraction (difference)
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, SubFullNorm) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 600);
+ timeval_wrap b(j, 400);
+ timeval_wrap E(i - j, 600 - 400);
+ timeval_wrap c;
+
+ c = sub_tval(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, SubFullOflow) {
+ for (int i = -4; i <= 4; ++i)
+ for (int j = -4; j <= 4; ++j) {
+ timeval_wrap a(i, 100);
+ timeval_wrap b(j, 999900);
+ timeval_wrap E(i - j - 1, 200);
+ timeval_wrap c;
+
+ c = sub_tval(a, b);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, SubUsecNorm) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 600);
+ timeval_wrap E(i, 200);
+ timeval_wrap c;
+
+ c = sub_tval_us(a, 600 - 200);
+ ASSERT_EQ(E, c);
+ }
+}
+
+TEST_F(timevalTest, SubUsecOflow) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 100);
+ timeval_wrap E(i - 1, 200);
+ timeval_wrap c;
+
+ c = sub_tval_us(a, MICROSECONDS - 100);
+ ASSERT_EQ(E, c);
+ }
+}
+
+//----------------------------------------------------------------------
+// test negation
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, Neg) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 100);
+ timeval_wrap b;
+ timeval_wrap c;
+
+ b = neg_tval(a);
+ c = add_tval(a, b);
+ ASSERT_EQ(0, test_tval(c));
+ }
+}
+
+//----------------------------------------------------------------------
+// test abs value
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, AbsNoFrac) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 0);
+ timeval_wrap b;
+
+ b = abs_tval(a);
+ ASSERT_EQ((i != 0), test_tval(b));
+ }
+}
+
+TEST_F(timevalTest, AbsWithFrac) {
+ for (int i = -4; i <= 4; ++i) {
+ timeval_wrap a(i, 100);
+ timeval_wrap b;
+
+ b = abs_tval(a);
+ ASSERT_EQ(1, test_tval(b));
+ }
+}
+
+// ---------------------------------------------------------------------
+// test support stuff -- part 2
+// ---------------------------------------------------------------------
+
+TEST_F(timevalTest, Helpers2) {
+ AssertTimevalClose isClose(0, 2);
+ timeval_wrap x, y;
+
+ for (x.V.tv_sec = -2; x.V.tv_sec < 3; x.V.tv_sec++)
+ for (x.V.tv_usec = 1;
+ x.V.tv_usec < 1000000;
+ x.V.tv_usec += 499999) {
+ for (long i = -4; i < 5; i++) {
+ y = x;
+ y.V.tv_usec += i;
+ if (i >= -2 && i <= 2)
+ ASSERT_PRED_FORMAT2(isClose, x, y);
+ else
+ ASSERT_PRED_FORMAT2(!isClose, x, y);
+ }
+ }
+}
+
+// and the global predicate instances we're using here
+static AssertFpClose FpClose(0, 1);
+static AssertTimevalClose TimevalClose(0, 1);
+
+//----------------------------------------------------------------------
+// conversion to l_fp
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, ToLFPbittest) {
+ for (u_int32 i = 0; i < 1000000; i++) {
+ timeval_wrap a(1, i);
+ l_fp_wrap E(1, my_tick_to_tsf(i));
+ l_fp_wrap r;
+
+ r = tval_intv_to_lfp(a);
+ ASSERT_PRED_FORMAT2(FpClose, E, r);
+ }
+}
+
+TEST_F(timevalTest, ToLFPrelPos) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timeval_wrap a(1, fdata[i].usec);
+ l_fp_wrap E(1, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tval_intv_to_lfp(a);
+ ASSERT_PRED_FORMAT2(FpClose, E, r);
+ }
+}
+
+TEST_F(timevalTest, ToLFPrelNeg) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timeval_wrap a(-1, fdata[i].usec);
+ l_fp_wrap E(~0, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tval_intv_to_lfp(a);
+ ASSERT_PRED_FORMAT2(FpClose, E, r);
+ }
+}
+
+TEST_F(timevalTest, ToLFPabs) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ timeval_wrap a(1, fdata[i].usec);
+ l_fp_wrap E(1 + JAN_1970, fdata[i].frac);
+ l_fp_wrap r;
+
+ r = tval_stamp_to_lfp(a);
+ ASSERT_PRED_FORMAT2(FpClose, E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// conversion from l_fp
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, FromLFPbittest) {
+ // Not *exactly* a bittest, because 2**32 tests would take a
+ // really long time even on very fast machines! So we do test
+ // every 1000 fractional units.
+ for (u_int32 tsf = 0; tsf < ~u_int32(1000); tsf += 1000) {
+ timeval_wrap E(1, my_tsf_to_tick(tsf));
+ l_fp_wrap a(1, tsf);
+ timeval_wrap r;
+
+ r = lfp_intv_to_tval(a);
+ // The conversion might be off by one microsecond when
+ // comparing to calculated value.
+ ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ }
+}
+
+TEST_F(timevalTest, FromLFPrelPos) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ l_fp_wrap a(1, fdata[i].frac);
+ timeval_wrap E(1, fdata[i].usec);
+ timeval_wrap r;
+
+ r = lfp_intv_to_tval(a);
+ ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ }
+}
+
+TEST_F(timevalTest, FromLFPrelNeg) {
+ for (int i = 0; i < COUNTOF(fdata); i++) {
+ l_fp_wrap a(~0, fdata[i].frac);
+ timeval_wrap E(-1, fdata[i].usec);
+ timeval_wrap r;
+
+ r = lfp_intv_to_tval(a);
+ ASSERT_PRED_FORMAT2(TimevalClose, E, r);
+ }
+}
+
+// usec -> frac -> usec roundtrip, using a prime start and increment
+TEST_F(timevalTest, LFProundtrip) {
+ for (int32_t t = -1; t < 2; ++t)
+ for (u_int32 i = 5; i < 1000000; i+=11) {
+ timeval_wrap E(t, i);
+ l_fp_wrap a;
+ timeval_wrap r;
+
+ a = tval_intv_to_lfp(E);
+ r = lfp_intv_to_tval(a);
+ ASSERT_EQ(E, r);
+ }
+}
+
+//----------------------------------------------------------------------
+// string formatting
+//----------------------------------------------------------------------
+
+TEST_F(timevalTest, ToString) {
+ static const struct {
+ time_t sec;
+ long usec;
+ const char * repr;
+ } data [] = {
+ { 0, 0, "0.000000" },
+ { 2, 0, "2.000000" },
+ {-2, 0, "-2.000000" },
+ { 0, 1, "0.000001" },
+ { 0,-1, "-0.000001" },
+ { 1,-1, "0.999999" },
+ {-1, 1, "-0.999999" },
+ {-1,-1, "-1.000001" },
+ };
+ for (int i = 0; i < COUNTOF(data); ++i) {
+ timeval_wrap a(data[i].sec, data[i].usec);
+ std::string E(data[i].repr);
+ std::string r(tvaltoa(a));
+
+ ASSERT_EQ(E, r);
+ }
+}
+
+// -*- EOF -*-
diff --git a/tests/libntp/tstotv.cpp b/tests/libntp/tstotv.cpp
new file mode 100644
index 000000000000..41f44d70e00b
--- /dev/null
+++ b/tests/libntp/tstotv.cpp
@@ -0,0 +1,57 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+#include "timevalops.h"
+};
+
+class tstotvTest : public libntptest {
+protected:
+ ::testing::AssertionResult IsEqual(const timeval& expected,
+ const timeval& actual) {
+ if (expected.tv_sec == actual.tv_sec &&
+ expected.tv_usec == actual.tv_usec) {
+ // Success
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << expected.tv_sec << "."
+ << expected.tv_usec
+ << " but was: " << actual.tv_sec << "."
+ << actual.tv_usec;
+ }
+ }
+
+ static const u_long HALF = 2147483648UL;
+};
+
+TEST_F(tstotvTest, Seconds) {
+ const l_fp input = {50, 0}; // 50.0 s
+ const timeval expected = {50, 0};
+ timeval actual;
+
+ TSTOTV(&input, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(tstotvTest, MicrosecondsExact) {
+ const l_fp input = {50, HALF}; // 10.5 s
+ const timeval expected = {50, 500000};
+ timeval actual;
+
+ TSTOTV(&input, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+
+}
+
+TEST_F(tstotvTest, MicrosecondsRounding) {
+ const l_fp input = {50, 3865471UL}; // Should round to 50.0009
+ const timeval expected = {50, 900};
+ timeval actual;
+
+ TSTOTV(&input, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
diff --git a/tests/libntp/tvtots.cpp b/tests/libntp/tvtots.cpp
new file mode 100644
index 000000000000..c51b7f59e63f
--- /dev/null
+++ b/tests/libntp/tvtots.cpp
@@ -0,0 +1,54 @@
+#include "lfptest.h"
+
+extern "C" {
+#include "timevalops.h"
+};
+
+// Required on Solaris for ldexp.
+#include <math.h>
+
+class tvtotsTest : public lfptest {
+};
+
+TEST_F(tvtotsTest, Seconds) {
+ timeval input = {500, 0}; // 500.0 s
+ l_fp expected = {500, 0};
+ l_fp actual;
+
+ TVTOTS(&input, &actual);
+
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(tvtotsTest, MicrosecondsRounded) {
+ /* 0.0005 can not be represented exact in a l_fp structure.
+ * It would equal to 2147483,648. This means that
+ * HALF_PROMILLE_UP (which is 2147484) should be
+ * the correct rounding. */
+
+ timeval input = {0, 500}; // 0.0005 exact
+ l_fp expected = {0, HALF_PROMILLE_UP};
+ l_fp actual;
+
+ TVTOTS(&input, &actual);
+ EXPECT_TRUE(IsEqual(expected, actual));
+}
+
+TEST_F(tvtotsTest, MicrosecondsExact) {
+ // 0.5 can be represented exact in both l_fp and timeval.
+ const timeval input = {10, 500000}; // 0.5 exact
+ const l_fp expected = {10, HALF}; // 0.5 exact
+ l_fp actual;
+
+ TVTOTS(&input, &actual);
+
+ // Compare the fractional part with an absolute error given.
+ EXPECT_EQ(expected.l_ui, actual.l_ui);
+
+ double expectedDouble, actualDouble;
+ M_LFPTOD(0, expected.l_uf, expectedDouble);
+ M_LFPTOD(0, actual.l_uf, actualDouble);
+
+ // The error should be less than 0.5 us
+ EXPECT_NEAR(expectedDouble, actualDouble, 0.0000005);
+}
diff --git a/tests/libntp/uglydate.cpp b/tests/libntp/uglydate.cpp
new file mode 100644
index 000000000000..6d9e6c6aceb8
--- /dev/null
+++ b/tests/libntp/uglydate.cpp
@@ -0,0 +1,18 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "ntp_fp.h"
+};
+
+class uglydateTest : public libntptest {
+protected:
+ static const u_int32 HALF = 2147483648UL;
+};
+
+TEST_F(uglydateTest, ConstantDateTime) {
+ l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
+
+ EXPECT_STREQ("3485080800.500000 10:159:14:00:00.500",
+ uglydate(&time));
+}
+
diff --git a/tests/libntp/vi64ops.cpp b/tests/libntp/vi64ops.cpp
new file mode 100644
index 000000000000..7b839ab371d4
--- /dev/null
+++ b/tests/libntp/vi64ops.cpp
@@ -0,0 +1,64 @@
+#include "libntptest.h"
+
+extern "C" {
+#include "vint64ops.h"
+}
+
+class vi64Test : public libntptest {
+public:
+ ::testing::AssertionResult IsEqual(const vint64 &expected, const vint64 &actual) {
+ if (0 == memcmp(&expected, &actual, sizeof(vint64))) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: "
+ << std::hex << expected.D_s.hi << '.'
+ << std::hex << expected.D_s.lo
+ << " but was "
+ << std::hex << actual.D_s.hi << '.'
+ << std::hex << actual.D_s.lo;
+ }
+ }
+};
+
+// ----------------------------------------------------------------------
+// test number parser
+TEST_F(vi64Test, ParseVUI64_pos) {
+ vint64 act, exp;
+ const char *sp;
+ char *ep;
+
+ sp = "1234x";
+ exp.D_s.hi = 0;
+ exp.D_s.lo = 1234;
+ act = strtouv64(sp, &ep, 0);
+ EXPECT_TRUE(IsEqual(exp, act));
+ EXPECT_EQ(*ep, 'x');
+}
+
+TEST_F(vi64Test, ParseVUI64_neg) {
+ vint64 act, exp;
+ const char *sp;
+ char *ep;
+
+ sp = "-1234x";
+ exp.D_s.hi = ~0;
+ exp.D_s.lo = -1234;
+ act = strtouv64(sp, &ep, 0);
+ EXPECT_TRUE(IsEqual(exp, act));
+ EXPECT_EQ(*ep, 'x');
+}
+
+TEST_F(vi64Test, ParseVUI64_case) {
+ vint64 act, exp;
+ const char *sp;
+ char *ep;
+
+ sp = "0123456789AbCdEf";
+ exp.D_s.hi = 0x01234567;
+ exp.D_s.lo = 0x89ABCDEF;
+ act = strtouv64(sp, &ep, 16);
+ EXPECT_TRUE(IsEqual(exp, act));
+ EXPECT_EQ(*ep, '\0');
+}
+
diff --git a/tests/libntp/ymd2yd.cpp b/tests/libntp/ymd2yd.cpp
new file mode 100644
index 000000000000..e6f46f8c080b
--- /dev/null
+++ b/tests/libntp/ymd2yd.cpp
@@ -0,0 +1,23 @@
+#include "libntptest.h"
+
+class ymd2ydTest : public libntptest {
+};
+
+TEST_F(ymd2ydTest, NonLeapYearFebruary) {
+ EXPECT_EQ(31+20, ymd2yd(2010,2,20)); //2010-02-20
+}
+
+TEST_F(ymd2ydTest, NonLeapYearJune) {
+ int expected = 31+28+31+30+31+18; // 18 June non-leap year
+ EXPECT_EQ(expected, ymd2yd(2011,6,18));
+}
+
+TEST_F(ymd2ydTest, LeapYearFebruary) {
+ EXPECT_EQ(31+20, ymd2yd(2012,2,20)); //2012-02-20 (leap year)
+}
+
+TEST_F(ymd2ydTest, LeapYearDecember) {
+ // 2012-12-31
+ int expected = 31+29+31+30+31+30+31+31+30+31+30+31;
+ EXPECT_EQ(expected, ymd2yd(2012,12,31));
+}
diff --git a/tests/ntpd/Makefile.am b/tests/ntpd/Makefile.am
new file mode 100644
index 000000000000..c5df6e4a32c4
--- /dev/null
+++ b/tests/ntpd/Makefile.am
@@ -0,0 +1,55 @@
+NULL =
+BUILT_SOURCES =
+CLEANFILES =
+
+check_PROGRAMS = tests
+
+LDADD = \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += -I$(top_srcdir)/sntp
+AM_CPPFLAGS += -I$(top_srcdir)/ntpd
+AM_CPPFLAGS += $(GTEST_CPPFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
+ ntpdtest.cpp \
+ $(top_srcdir)/ntpd/ntp_leapsec.c \
+ leapsec.cpp \
+ $(NULL)
+
+noinst_HEADERS = ntpdtest.h \
+ $(NULL)
+
+TESTS =
+
+if !NTP_CROSSCOMPILE
+TESTS += tests
+endif
+
+## check-libntp.mf - automake fragment
+## slightly adapted for deeper directory
+
+BUILT_SOURCES += check-libntp
+CLEANFILES += check-libntp
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/tests/ntpd/Makefile.in b/tests/ntpd/Makefile.in
new file mode 100644
index 000000000000..782513d4b51d
--- /dev/null
+++ b/tests/ntpd/Makefile.in
@@ -0,0 +1,939 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+check_PROGRAMS = tests$(EXEEXT)
+TESTS = $(am__EXEEXT_1)
+@NTP_CROSSCOMPILE_FALSE@am__append_1 = tests
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf
+subdir = tests/ntpd
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__objects_1 =
+am_tests_OBJECTS = tests_main.$(OBJEXT) ntpdtest.$(OBJEXT) \
+ ntp_leapsec.$(OBJEXT) leapsec.$(OBJEXT) $(am__objects_1)
+tests_OBJECTS = $(am_tests_OBJECTS)
+tests_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+tests_DEPENDENCIES = $(top_builddir)/libntp/libntp.a \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(tests_SOURCES)
+DIST_SOURCES = $(tests_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+@NTP_CROSSCOMPILE_FALSE@am__EXEEXT_1 = tests$(EXEEXT)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
+CHUTEST = @CHUTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DCFD = @DCFD@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITLINE_LIBS = @EDITLINE_LIBS@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
+HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
+LIBOPTS_DIR = @LIBOPTS_DIR@
+LIBOPTS_LDADD = @LIBOPTS_LDADD@
+LIBPARSE = @LIBPARSE@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LSCF = @LSCF@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_LAYOUT = @MAKE_CHECK_LAYOUT@
+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_NTPSNMPD = @MAKE_NTPSNMPD@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+MAKE_TIMETRIM = @MAKE_TIMETRIM@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
+PATH_PERL = @PATH_PERL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
+POSIX_SHELL = @POSIX_SHELL@
+PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNMP_CFLAGS = @SNMP_CFLAGS@
+SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
+SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
+STRIP = @STRIP@
+TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
+VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+NULL =
+BUILT_SOURCES = check-libntp .deps-ver
+CLEANFILES = check-libntp .deps-ver
+LDADD = \
+ $(top_builddir)/libntp/libntp.a \
+ $(LDADD_LIBNTP) \
+ $(PTHREAD_LIBS) \
+ $(LDADD_NTP) \
+ $(GTEST_LDFLAGS) \
+ $(GTEST_LIBS) \
+ $(NULL)
+
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+AM_CPPFLAGS = $(NTP_INCS) -I$(top_srcdir)/sntp -I$(top_srcdir)/ntpd \
+ $(GTEST_CPPFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
+tests_SOURCES = $(top_srcdir)/sntp/tests_main.cpp \
+ ntpdtest.cpp \
+ $(top_srcdir)/ntpd/ntp_leapsec.c \
+ leapsec.cpp \
+ $(NULL)
+
+noinst_HEADERS = ntpdtest.h \
+ $(NULL)
+
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/ntpd/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/ntpd/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES)
+ @rm -f tests$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/leapsec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntp_leapsec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntpdtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests_main.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+ntp_leapsec.o: $(top_srcdir)/ntpd/ntp_leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_leapsec.o -MD -MP -MF $(DEPDIR)/ntp_leapsec.Tpo -c -o ntp_leapsec.o `test -f '$(top_srcdir)/ntpd/ntp_leapsec.c' || echo '$(srcdir)/'`$(top_srcdir)/ntpd/ntp_leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_leapsec.Tpo $(DEPDIR)/ntp_leapsec.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/ntpd/ntp_leapsec.c' object='ntp_leapsec.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_leapsec.o `test -f '$(top_srcdir)/ntpd/ntp_leapsec.c' || echo '$(srcdir)/'`$(top_srcdir)/ntpd/ntp_leapsec.c
+
+ntp_leapsec.obj: $(top_srcdir)/ntpd/ntp_leapsec.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ntp_leapsec.obj -MD -MP -MF $(DEPDIR)/ntp_leapsec.Tpo -c -o ntp_leapsec.obj `if test -f '$(top_srcdir)/ntpd/ntp_leapsec.c'; then $(CYGPATH_W) '$(top_srcdir)/ntpd/ntp_leapsec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/ntpd/ntp_leapsec.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ntp_leapsec.Tpo $(DEPDIR)/ntp_leapsec.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/ntpd/ntp_leapsec.c' object='ntp_leapsec.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ntp_leapsec.obj `if test -f '$(top_srcdir)/ntpd/ntp_leapsec.c'; then $(CYGPATH_W) '$(top_srcdir)/ntpd/ntp_leapsec.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/ntpd/ntp_leapsec.c'; fi`
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+tests_main.o: $(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.o -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.o `test -f '$(top_srcdir)/sntp/tests_main.cpp' || echo '$(srcdir)/'`$(top_srcdir)/sntp/tests_main.cpp
+
+tests_main.obj: $(top_srcdir)/sntp/tests_main.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests_main.obj -MD -MP -MF $(DEPDIR)/tests_main.Tpo -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests_main.Tpo $(DEPDIR)/tests_main.Po
+@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/sntp/tests_main.cpp' object='tests_main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests_main.obj `if test -f '$(top_srcdir)/sntp/tests_main.cpp'; then $(CYGPATH_W) '$(top_srcdir)/sntp/tests_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/sntp/tests_main.cpp'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+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_sh_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+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-checkPROGRAMS clean-generic clean-libtool \
+ 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:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+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-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all check check-am install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+check-libntp: ../../libntp/libntp.a
+ @echo stamp > $@
+
+../../libntp/libntp.a:
+ cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
+ @[ -f $@ ] || \
+ cp $(top_srcdir)/deps-ver $@
+ @[ -w $@ ] || \
+ chmod ug+w $@
+ @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
+ echo -n "Prior $(subdir)/$(DEPDIR) version " && \
+ cat $@ && \
+ rm -rf $(DEPDIR) && \
+ mkdir $(DEPDIR) && \
+ case "$(top_builddir)" in \
+ .) \
+ ./config.status Makefile depfiles \
+ ;; \
+ *) \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
+ ;; \
+ esac && \
+ echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
+ cat $(top_srcdir)/deps-ver \
+ )
+ cp $(top_srcdir)/deps-ver $@
+
+.deps-ver: $(top_srcdir)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
+ @touch $@
+
+#
+# depsver.mf included in Makefile.am for directories with .deps
+#
+# When building in the same directory with sources that change over
+# time, such as when tracking using bk, the .deps files can become
+# stale with respect to moved, deleted, or superceded headers. Most
+# commonly, this would exhibit as make reporting a failure to make a
+# header file which is no longer in the location given. To address
+# this issue, we use a deps-ver file which is updated with each change
+# that breaks old .deps files. A copy of deps-ver is made into
+# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
+# with different contents than deps-ver, we make clean to ensure all
+# .o files built before the incompatible change are rebuilt along with
+# their updated .deps files, then remove $(DEPDIR) and recreate it as
+# empty stubs.
+#
+# It is normal when configured with --disable-dependency-tracking for
+# the DEPDIR to not have been created. For this reason, we use the
+# intermediate target .deps-ver, which invokes make recursively if
+# DEPDIR exists.
+#
+# If you modify depsver.mf, please make the changes to the master
+# copy, the one in sntp is copied by the bootstrap script from it.
+#
+# This comment block follows rather than leads the related code so that
+# it stays with it in the generated Makefile.in and Makefile.
+#
+
+# 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/tests/ntpd/leapsec.cpp b/tests/ntpd/leapsec.cpp
new file mode 100644
index 000000000000..6ae0cee34c31
--- /dev/null
+++ b/tests/ntpd/leapsec.cpp
@@ -0,0 +1,901 @@
+#include "ntpdtest.h"
+
+extern "C" {
+#include "ntp.h"
+#include "ntp_calendar.h"
+#include "ntp_leapsec.h"
+}
+
+#include <string>
+#include <sstream>
+
+static const char leap1 [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ " \t \n"
+ "2571782400 20 # 1 Jul 1981\n"
+ "2603318400 21 # 1 Jul 1982\n"
+ "2634854400 22 # 1 Jul 1983\n"
+ "2698012800 23 # 1 Jul 1985\n"
+ "2776982400 24 # 1 Jan 1988\n"
+ "2840140800 25 # 1 Jan 1990\n"
+ "2871676800 26 # 1 Jan 1991\n"
+ "2918937600 27 # 1 Jul 1992\n"
+ "2950473600 28 # 1 Jul 1993\n"
+ "2982009600 29 # 1 Jul 1994\n"
+ "3029443200 30 # 1 Jan 1996\n"
+ "3076704000 31 # 1 Jul 1997\n"
+ "3124137600 32 # 1 Jan 1999\n"
+ "3345062400 33 # 1 Jan 2006\n"
+ "3439756800 34 # 1 Jan 2009\n"
+ "3550089600 35 # 1 Jul 2012\n"
+ "#\n"
+ "#h dc2e6b0b 5aade95d a0587abd 4e0dacb4 e4d5049e\n"
+ "#\n";
+
+static const char leap2 [] =
+ "#\n"
+ "#@ 2950473700\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "2571782400 20 # 1 Jul 1981\n"
+ "2603318400 21 # 1 Jul 1982\n"
+ "2634854400 22 # 1 Jul 1983\n"
+ "2698012800 23 # 1 Jul 1985\n"
+ "2776982400 24 # 1 Jan 1988\n"
+ "2840140800 25 # 1 Jan 1990\n"
+ "2871676800 26 # 1 Jan 1991\n"
+ "2918937600 27 # 1 Jul 1992\n"
+ "2950473600 28 # 1 Jul 1993\n"
+ "#\n";
+
+// Faked table with a leap second removal at 2009
+static const char leap3 [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "2571782400 20 # 1 Jul 1981\n"
+ "2603318400 21 # 1 Jul 1982\n"
+ "2634854400 22 # 1 Jul 1983\n"
+ "2698012800 23 # 1 Jul 1985\n"
+ "2776982400 24 # 1 Jan 1988\n"
+ "2840140800 25 # 1 Jan 1990\n"
+ "2871676800 26 # 1 Jan 1991\n"
+ "2918937600 27 # 1 Jul 1992\n"
+ "2950473600 28 # 1 Jul 1993\n"
+ "2982009600 29 # 1 Jul 1994\n"
+ "3029443200 30 # 1 Jan 1996\n"
+ "3076704000 31 # 1 Jul 1997\n"
+ "3124137600 32 # 1 Jan 1999\n"
+ "3345062400 33 # 1 Jan 2006\n"
+ "3439756800 32 # 1 Jan 2009\n"
+ "3550089600 33 # 1 Jul 2012\n"
+ "#\n";
+
+// short table with good hash
+static const char leap_ghash [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#$ 3610566000\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "#\n"
+ "#h 4b304e10 95642b3f c10b91f9 90791725 25f280d0\n"
+ "#\n";
+
+// short table with bad hash
+static const char leap_bhash [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#$ 3610566000\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "#\n"
+ "#h dc2e6b0b 5aade95d a0587abd 4e0dacb4 e4d5049e\n"
+ "#\n";
+
+// short table with malformed hash
+static const char leap_mhash [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#$ 3610566000\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "#\n"
+ "#h f2349a02 788b9534 a8f2e141 f2029Q6d 4064a7ee\n"
+ "#\n";
+
+// short table with only 4 hash groups
+static const char leap_shash [] =
+ "#\n"
+ "#@ 3610569600\n"
+ "#$ 3610566000\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "#\n"
+ "#h f2349a02 788b9534 a8f2e141 f2029Q6d\n"
+ "#\n";
+
+// table with good hash and truncated/missing leading zeros
+static const char leap_gthash [] = {
+ "#\n"
+ "#$ 3535228800\n"
+ "#\n"
+ "# Updated through IERS Bulletin C46\n"
+ "# File expires on: 28 June 2014\n"
+ "#\n"
+ "#@ 3612902400\n"
+ "#\n"
+ "2272060800 10 # 1 Jan 1972\n"
+ "2287785600 11 # 1 Jul 1972\n"
+ "2303683200 12 # 1 Jan 1973\n"
+ "2335219200 13 # 1 Jan 1974\n"
+ "2366755200 14 # 1 Jan 1975\n"
+ "2398291200 15 # 1 Jan 1976\n"
+ "2429913600 16 # 1 Jan 1977\n"
+ "2461449600 17 # 1 Jan 1978\n"
+ "2492985600 18 # 1 Jan 1979\n"
+ "2524521600 19 # 1 Jan 1980\n"
+ "2571782400 20 # 1 Jul 1981\n"
+ "2603318400 21 # 1 Jul 1982\n"
+ "2634854400 22 # 1 Jul 1983\n"
+ "2698012800 23 # 1 Jul 1985\n"
+ "2776982400 24 # 1 Jan 1988\n"
+ "2840140800 25 # 1 Jan 1990\n"
+ "2871676800 26 # 1 Jan 1991\n"
+ "2918937600 27 # 1 Jul 1992\n"
+ "2950473600 28 # 1 Jul 1993\n"
+ "2982009600 29 # 1 Jul 1994\n"
+ "3029443200 30 # 1 Jan 1996\n"
+ "3076704000 31 # 1 Jul 1997\n"
+ "3124137600 32 # 1 Jan 1999\n"
+ "3345062400 33 # 1 Jan 2006\n"
+ "3439756800 34 # 1 Jan 2009\n"
+ "3550089600 35 # 1 Jul 2012\n"
+ "#\n"
+ "#h 1151a8f e85a5069 9000fcdb 3d5e5365 1d505b37"
+};
+
+static uint32_t lsec2009 = 3439756800u; // 1 Jan 2009, 00:00:00 utc
+static uint32_t lsec2012 = 3550089600u; // 1 Jul 2012, 00:00:00 utc
+
+int stringreader(void* farg)
+{
+ const char ** cpp = (const char**)farg;
+ if (**cpp)
+ return *(*cpp)++;
+ else
+ return EOF;
+}
+
+static int/*BOOL*/
+setup_load_table(
+ const char * cp,
+ int blim=FALSE)
+{
+ int rc;
+ leap_table_t * pt = leapsec_get_table(0);
+ rc = (pt != NULL) && leapsec_load(pt, stringreader, &cp, blim);
+ rc = rc && leapsec_set_table(pt);
+ return rc;
+}
+
+static int/*BOOL*/
+setup_clear_table()
+{
+ int rc;
+ leap_table_t * pt = leapsec_get_table(0);
+ if (pt)
+ leapsec_clear(pt);
+ rc = leapsec_set_table(pt);
+ return rc;
+}
+
+
+class leapsecTest : public ntpdtest {
+protected:
+ virtual void SetUp();
+ virtual void TearDown();
+
+ std::string CalendarToString(const calendar &cal) {
+ std::ostringstream ss;
+ ss << cal.year << "-" << (u_int)cal.month << "-" << (u_int)cal.monthday
+ << " (" << cal.yearday << ") " << (u_int)cal.hour << ":"
+ << (u_int)cal.minute << ":" << (u_int)cal.second;
+ return ss.str();
+ }
+
+ ::testing::AssertionResult IsEqual(const calendar &expected, const calendar &actual) {
+ if (expected.year == actual.year &&
+ (expected.yearday == actual.yearday ||
+ (expected.month == actual.month &&
+ expected.monthday == actual.monthday)) &&
+ expected.hour == actual.hour &&
+ expected.minute == actual.minute &&
+ expected.second == actual.second) {
+ return ::testing::AssertionSuccess();
+ } else {
+ return ::testing::AssertionFailure()
+ << "expected: " << CalendarToString(expected) << " but was "
+ << CalendarToString(actual);
+ }
+ }
+};
+
+void leapsecTest::SetUp()
+{
+ ntpcal_set_timefunc(timefunc);
+ settime(1970, 1, 1, 0, 0, 0);
+ leapsec_electric(1);
+}
+
+void leapsecTest::TearDown()
+{
+ ntpcal_set_timefunc(NULL);
+}
+
+// =====================================================================
+// VALIDATION TESTS
+// =====================================================================
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateGood) {
+ const char *cp = leap_ghash;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_GOODHASH, rc);
+}
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateNoHash) {
+ const char *cp = leap2;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_NOHASH, rc);
+}
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateBad) {
+ const char *cp = leap_bhash;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_BADHASH, rc);
+}
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateMalformed) {
+ const char *cp = leap_mhash;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_BADFORMAT, rc);
+}
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateMalformedShort) {
+ const char *cp = leap_shash;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_BADFORMAT, rc);
+}
+
+// ----------------------------------------------------------------------
+TEST_F(leapsecTest, ValidateNoLeadZero) {
+ const char *cp = leap_gthash;
+ int rc = leapsec_validate(stringreader, &cp);
+ EXPECT_EQ(LSVALID_GOODHASH, rc);
+}
+
+// =====================================================================
+// BASIC FUNCTIONS
+// =====================================================================
+
+// ----------------------------------------------------------------------
+// test table selection
+TEST_F(leapsecTest, tableSelect) {
+ leap_table_t *pt1, *pt2, *pt3, *pt4;
+
+ pt1 = leapsec_get_table(0);
+ pt2 = leapsec_get_table(0);
+ EXPECT_EQ(pt1, pt2);
+
+ pt1 = leapsec_get_table(1);
+ pt2 = leapsec_get_table(1);
+ EXPECT_EQ(pt1, pt2);
+
+ pt1 = leapsec_get_table(1);
+ pt2 = leapsec_get_table(0);
+ EXPECT_NE(pt1, pt2);
+
+ pt1 = leapsec_get_table(0);
+ pt2 = leapsec_get_table(1);
+ EXPECT_NE(pt1, pt2);
+
+ leapsec_set_table(pt1);
+ pt2 = leapsec_get_table(0);
+ pt3 = leapsec_get_table(1);
+ EXPECT_EQ(pt1, pt2);
+ EXPECT_NE(pt2, pt3);
+
+ pt1 = pt3;
+ leapsec_set_table(pt1);
+ pt2 = leapsec_get_table(0);
+ pt3 = leapsec_get_table(1);
+ EXPECT_EQ(pt1, pt2);
+ EXPECT_NE(pt2, pt3);
+}
+
+// ----------------------------------------------------------------------
+// load file & check expiration
+TEST_F(leapsecTest, loadFileExpire) {
+ const char *cp = leap1;
+ int rc;
+ leap_table_t * pt = leapsec_get_table(0);
+
+ rc = leapsec_load(pt, stringreader, &cp, FALSE)
+ && leapsec_set_table(pt);
+ EXPECT_EQ(1, rc);
+ rc = leapsec_expired(3439756800, NULL);
+ EXPECT_EQ(0, rc);
+ rc = leapsec_expired(3610569601, NULL);
+ EXPECT_EQ(1, rc);
+}
+
+// ----------------------------------------------------------------------
+// load file & check time-to-live
+TEST_F(leapsecTest, loadFileTTL) {
+ const char *cp = leap1;
+ int rc;
+ leap_table_t * pt = leapsec_get_table(0);
+ time_t pivot = 0x70000000;
+
+ const uint32_t limit = 3610569600u;
+
+ rc = leapsec_load(pt, stringreader, &cp, FALSE)
+ && leapsec_set_table(pt);
+ ASSERT_EQ(1, rc);
+
+ // exactly 1 day to live
+ rc = leapsec_daystolive(limit - 86400, &pivot);
+ EXPECT_EQ( 1, rc);
+ // less than 1 day to live
+ rc = leapsec_daystolive(limit - 86399, &pivot);
+ EXPECT_EQ( 0, rc);
+ // hit expiration exactly
+ rc = leapsec_daystolive(limit, &pivot);
+ EXPECT_EQ( 0, rc);
+ // expired since 1 sec
+ rc = leapsec_daystolive(limit + 1, &pivot);
+ EXPECT_EQ(-1, rc);
+}
+
+// ----------------------------------------------------------------------
+// ad-hoc jump: leap second at 2009.01.01 -60days
+TEST_F(leapsecTest, ls2009faraway) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ // test 60 days before leap. Nothing scheduled or indicated.
+ rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(33, qr.tai_offs);
+ EXPECT_EQ(0, qr.tai_diff);
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// ad-hoc jump: leap second at 2009.01.01 -1week
+TEST_F(leapsecTest, ls2009weekaway) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ // test 7 days before leap. Leap scheduled, but not yet indicated.
+ rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(33, qr.tai_offs);
+ EXPECT_EQ(1, qr.tai_diff);
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// ad-hoc jump: leap second at 2009.01.01 -1hr
+TEST_F(leapsecTest, ls2009houraway) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ // test 1 hour before leap. 61 true seconds to go.
+ rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(33, qr.tai_offs);
+ EXPECT_EQ(1, qr.tai_diff);
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// ad-hoc jump: leap second at 2009.01.01 -1sec
+TEST_F(leapsecTest, ls2009secaway) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ // test 1 second before leap (last boundary...) 2 true seconds to go.
+ rc = leapsec_query(&qr, lsec2009 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(33, qr.tai_offs);
+ EXPECT_EQ(1, qr.tai_diff);
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// ad-hoc jump to leap second at 2009.01.01
+TEST_F(leapsecTest, ls2009onspot) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ // test on-spot: treat leap second as already gone.
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(34, qr.tai_offs);
+ EXPECT_EQ(0, qr.tai_diff);
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// test handling of the leap second at 2009.01.01 without table
+TEST_F(leapsecTest, ls2009nodata) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_clear_table();
+ EXPECT_EQ(1, rc);
+
+ // test on-spot with empty table
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.tai_offs);
+ EXPECT_EQ(0, qr.tai_diff);
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// test handling of the leap second at 2009.01.01 with culled data
+TEST_F(leapsecTest, ls2009limdata) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1, TRUE);
+ EXPECT_EQ(1, rc);
+
+ // test on-spot with limted table - does not work if build before 2013!
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(35, qr.tai_offs);
+ EXPECT_EQ(0, qr.tai_diff);
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// add dynamic leap second (like from peer/clock)
+TEST_F(leapsecTest, addDynamic) {
+ int rc;
+ leap_result_t qr;
+
+ static const uint32_t insns[] = {
+ 2982009600, // 29 # 1 Jul 1994
+ 3029443200, // 30 # 1 Jan 1996
+ 3076704000, // 31 # 1 Jul 1997
+ 3124137600, // 32 # 1 Jan 1999
+ 3345062400, // 33 # 1 Jan 2006
+ 3439756800, // 34 # 1 Jan 2009
+ 3550089600, // 35 # 1 Jul 2012
+ 0 // sentinel
+ };
+
+ rc = setup_load_table(leap2, FALSE);
+ EXPECT_EQ(1, rc);
+
+ leap_table_t * pt = leapsec_get_table(0);
+ for (int idx=1; insns[idx]; ++idx) {
+ rc = leapsec_add_dyn(TRUE, insns[idx] - 20*SECSPERDAY - 100, NULL);
+ EXPECT_EQ(TRUE, rc);
+ }
+ // try to slip in a previous entry
+ rc = leapsec_add_dyn(TRUE, insns[0] - 20*SECSPERDAY - 100, NULL);
+ EXPECT_EQ(FALSE, rc);
+ //leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
+}
+
+// ----------------------------------------------------------------------
+// add fixed leap seconds (like from network packet)
+TEST_F(leapsecTest, addFixed) {
+ int rc;
+ leap_result_t qr;
+
+ static const struct { uint32_t tt; int of; } insns[] = {
+ {2982009600, 29},// # 1 Jul 1994
+ {3029443200, 30},// # 1 Jan 1996
+ {3076704000, 31},// # 1 Jul 1997
+ {3124137600, 32},// # 1 Jan 1999
+ {3345062400, 33},// # 1 Jan 2006
+ {3439756800, 34},// # 1 Jan 2009
+ {3550089600, 35},// # 1 Jul 2012
+ {0,0} // sentinel
+ };
+
+ rc = setup_load_table(leap2, FALSE);
+ EXPECT_EQ(1, rc);
+
+ leap_table_t * pt = leapsec_get_table(0);
+ // try to get in BAD time stamps...
+ for (int idx=0; insns[idx].tt; ++idx) {
+ rc = leapsec_add_fix(
+ insns[idx].of,
+ insns[idx].tt - 20*SECSPERDAY - 100,
+ insns[idx].tt + SECSPERDAY,
+ NULL);
+ EXPECT_EQ(FALSE, rc);
+ }
+ // no do it right
+ for (int idx=0; insns[idx].tt; ++idx) {
+ rc = leapsec_add_fix(
+ insns[idx].of,
+ insns[idx].tt,
+ insns[idx].tt + SECSPERDAY,
+ NULL);
+ EXPECT_EQ(TRUE, rc);
+ }
+ // try to slip in a previous entry
+ rc = leapsec_add_fix(
+ insns[0].of,
+ insns[0].tt,
+ insns[0].tt + SECSPERDAY,
+ NULL);
+ EXPECT_EQ(FALSE, rc);
+ //leapsec_dump(pt, (leapsec_dumper)fprintf, stdout);
+}
+
+// =====================================================================
+// SEQUENCE TESTS
+// =====================================================================
+
+// ----------------------------------------------------------------------
+// leap second insert at 2009.01.01, electric mode
+TEST_F(leapsecTest, ls2009seqInsElectric) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+ leapsec_electric(1);
+
+ rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call, same time frame: no trigger!
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// leap second insert at 2009.01.01, dumb mode
+TEST_F(leapsecTest, ls2009seqInsDumb) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+ leapsec_electric(0);
+
+ rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009+1, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(-1, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call, same time frame: no trigger!
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+
+// ----------------------------------------------------------------------
+// fake leap second remove at 2009.01.01, electric mode
+TEST_F(leapsecTest, ls2009seqDelElectric) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap3);
+ EXPECT_EQ(1, rc);
+ leapsec_electric(1);
+
+ rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call, same time frame: no trigger!
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// fake leap second remove at 2009.01.01. dumb mode
+TEST_F(leapsecTest, ls2009seqDelDumb) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap3);
+ EXPECT_EQ(1, rc);
+ leapsec_electric(0);
+
+ rc = leapsec_query(&qr, lsec2009 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 2, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2009 - 1, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(1, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call, same time frame: no trigger!
+ rc = leapsec_query(&qr, lsec2009, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// leap second insert at 2012.07.01, electric mode
+TEST_F(leapsecTest, ls2012seqInsElectric) {
+ int rc;
+ leap_result_t qr;
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ rc = leapsec_query(&qr, lsec2012 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call, same time frame: no trigger!
+ rc = leapsec_query(&qr, lsec2012, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
+// ----------------------------------------------------------------------
+// leap second insert at 2012.07.01, dumb mode
+TEST_F(leapsecTest, ls2012seqInsDumb) {
+ int rc;
+ leap_result_t qr;
+
+ leapsec_electric(0);
+ EXPECT_EQ(0, leapsec_electric(-1));
+ EXPECT_EQ(0, leapsec_electric(-1));
+
+ rc = setup_load_table(leap1);
+ EXPECT_EQ(1, rc);
+
+ rc = leapsec_query(&qr, lsec2012 - 60*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - 7*SECSPERDAY, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_SCHEDULE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - SECSPERHR, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ANNOUNCE, qr.proximity);
+
+ rc = leapsec_query(&qr, lsec2012 - 1, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ // This is just 1 sec before transition!
+ rc = leapsec_query(&qr, lsec2012, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_ALERT, qr.proximity);
+
+ // NOW the insert/backwarp must happen
+ rc = leapsec_query(&qr, lsec2012+1, NULL);
+ EXPECT_EQ(TRUE, rc);
+ EXPECT_EQ(-1, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+
+ // second call with transition time: no trigger!
+ rc = leapsec_query(&qr, lsec2012, NULL);
+ EXPECT_EQ(FALSE, rc);
+ EXPECT_EQ(0, qr.warped );
+ EXPECT_EQ(LSPROX_NOWARN, qr.proximity);
+}
+
diff --git a/tests/ntpd/ntpdtest.cpp b/tests/ntpd/ntpdtest.cpp
new file mode 100644
index 000000000000..76b3b1a254bc
--- /dev/null
+++ b/tests/ntpd/ntpdtest.cpp
@@ -0,0 +1,27 @@
+#include "ntpdtest.h"
+
+/* This file contains various constants that libntp needs to be set
+ * and that is normally defined in ntpd/ntpq/...
+ */
+
+u_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.
+const char *progname = "ntpdtest";
+
+time_t ntpdtest::nowtime = 0;
+
+time_t ntpdtest::timefunc(time_t *ptr)
+{
+ if (ptr)
+ *ptr = nowtime;
+ return nowtime;
+}
+
+void ntpdtest::settime(int y, int m, int d, int H, int M, int S)
+{
+
+ time_t days(ntpcal_edate_to_eradays(y-1, m-1, d-1) + 1 - DAY_UNIX_STARTS);
+ time_t secs(ntpcal_etime_to_seconds(H, M, S));
+
+ nowtime = days * SECSPERDAY + secs;
+}
+
diff --git a/tests/ntpd/ntpdtest.h b/tests/ntpd/ntpdtest.h
new file mode 100644
index 000000000000..cc3172a83dbd
--- /dev/null
+++ b/tests/ntpd/ntpdtest.h
@@ -0,0 +1,15 @@
+#include "tests_main.h"
+
+extern "C" {
+#include "ntp_stdlib.h"
+#include "ntp_calendar.h"
+};
+
+class ntpdtest : public ntptest {
+
+protected:
+ static time_t timefunc(time_t*);
+ static time_t nowtime;
+ static void settime(int y, int m, int d, int H, int M, int S);
+
+};
diff --git a/util/Makefile.am b/util/Makefile.am
index c5d5d66c4b0d..4265e0b4b957 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -1,75 +1,135 @@
NULL=
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
- ntp-keygen
-else
-sbin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
- ntp-keygen
-endif
+bin_PROGRAMS= $(NTP_KEYGEN_DB) $(NTPTIME_DB) $(TICKADJ_DB) $(TIMETRIM_DB)
+libexec_PROGRAMS= $(NTP_KEYGEN_DL) $(NTPTIME_DL) $(TICKADJ_DL) $(TIMETRIM_DL)
+sbin_PROGRAMS= $(NTP_KEYGEN_DS) $(NTPTIME_DS) $(TICKADJ_DS) $(TIMETRIM_DS)
-EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize \
- ntptime pps-api precision sht testrs6000 tg tickadj timetrim
+EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize ntp-keygen \
+ ntptime pps-api precision sht testrs6000 tg tg2 tickadj timetrim
-AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
-LDADD= ../libntp/libntp.a
+LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
+ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
-ntp_keygen_LDADD= version.o $(LIBOPTS_LDADD) ../libntp/libntp.a @LCRYPTO@
-ETAGS_ARGS= Makefile.am
-#EXTRA_DIST= README TAGS
-EXTRA_DIST= ntp-keygen-opts.def ntp-keygen.1 ntp-keygen-opts.texi ntp-keygen-opts.menu
+tickadj_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
+
+EXTRA_DIST= \
+ invoke-ntp-keygen.menu \
+ invoke-ntp-keygen.texi \
+ ntp-keygen-opts.def \
+ ntp-keygen.1ntp-keygenman \
+ ntp-keygen.1ntp-keygenmdoc \
+ ntp-keygen.man.in \
+ ntp-keygen.mdoc.in \
+ ntp-keygen.mdoc.in \
+ ntp-keygen.html \
+ ntp-keygen.texi \
+ $(NULL)
+
BUILT_SOURCES= ntp-keygen-opts.c ntp-keygen-opts.h
CLEANFILES=
-DISTCLEANFILES= .version version.c
-noinst_DATA= $(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu
-man_MANS= $(srcdir)/ntp-keygen.1
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+DISTCLEANFILES= .version version.c config.log $(man_MANS)
+
+html_DATA= \
+ $(srcdir)/ntp-keygen.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntp-keygen.menu \
+ $(srcdir)/invoke-ntp-keygen.texi \
+ $(srcdir)/ntp-keygen.man.in \
+ $(srcdir)/ntp-keygen.mdoc.in \
+ $(man_MANS) \
+ $(NULL)
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntp-keygen.$(NTP_KEYGEN_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
$(srcdir)/ntp-keygen-opts.h: $(srcdir)/ntp-keygen-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
-
+
$(srcdir)/ntp-keygen-opts.c: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
$(run_ag) ntp-keygen-opts.def
-$(srcdir)/ntp-keygen.1: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def
+###
+
+$(srcdir)/ntp-keygen.1ntp-keygenman: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-keygenman -Tagman-cmd.tpl ntp-keygen-opts.def
+
+$(srcdir)/ntp-keygen.man.in: $(srcdir)/ntp-keygen.1ntp-keygenman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-keygen.1ntp-keygenman > $(srcdir)/ntp-keygen.man.in+
+ mv $(srcdir)/ntp-keygen.man.in+ $(srcdir)/ntp-keygen.man.in
-$(srcdir)/ntp-keygen-opts.menu: $(srcdir)/ntp-keygen-opts.texi
+###
+
+$(srcdir)/ntp-keygen.1ntp-keygenmdoc: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-keygenmdoc -Tagmdoc-cmd.tpl ntp-keygen-opts.def
+
+$(srcdir)/ntp-keygen.mdoc.in: $(srcdir)/ntp-keygen.1ntp-keygenmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-keygen.1ntp-keygenmdoc > $(srcdir)/ntp-keygen.mdoc.in+
+ mv $(srcdir)/ntp-keygen.mdoc.in+ $(srcdir)/ntp-keygen.mdoc.in
+
+###
+
+ntp-keygen.$(NTP_KEYGEN_MS): $(srcdir)/ntp-keygen.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-keygen.$(NTP_KEYGEN_MS)+:$(srcdir)/ntp-keygen.$(MANTAGFMT).in
+ mv ntp-keygen.$(NTP_KEYGEN_MS)+ ntp-keygen.$(NTP_KEYGEN_MS)
+
+###
+
+$(srcdir)/invoke-ntp-keygen.menu: $(srcdir)/invoke-ntp-keygen.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-
-$(srcdir)/ntp-keygen-opts.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def
- $(top_srcdir)/scripts/check--help $@
+
+$(srcdir)/invoke-ntp-keygen.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-keygen-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
jitter_SOURCES= jitter.c jitter.h
jitter_LDADD=
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
-
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+$(PROGRAMS): version.o
+
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
-version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
- env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntp-keygen
- $(COMPILE) -c version.c
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
diff --git a/util/Makefile.in b/util/Makefile.in
index 84331ad825b2..f179f73cdad1 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -39,121 +39,175 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = @MAKE_NTPTIME@ \
-@NTP_BINSUBDIR_IS_BIN_TRUE@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
-@NTP_BINSUBDIR_IS_BIN_TRUE@ ntp-keygen$(EXEEXT)
-@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = @MAKE_NTPTIME@ \
-@NTP_BINSUBDIR_IS_BIN_FALSE@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
-@NTP_BINSUBDIR_IS_BIN_FALSE@ ntp-keygen$(EXEEXT)
EXTRA_PROGRAMS = audio-pcm$(EXEEXT) byteorder$(EXEEXT) hist$(EXEEXT) \
jitter$(EXEEXT) kern$(EXEEXT) longsize$(EXEEXT) \
- ntptime$(EXEEXT) pps-api$(EXEEXT) precision$(EXEEXT) \
- sht$(EXEEXT) testrs6000$(EXEEXT) tg$(EXEEXT) tickadj$(EXEEXT) \
- timetrim$(EXEEXT)
+ ntp-keygen$(EXEEXT) ntptime$(EXEEXT) pps-api$(EXEEXT) \
+ precision$(EXEEXT) sht$(EXEEXT) testrs6000$(EXEEXT) \
+ tg$(EXEEXT) tg2$(EXEEXT) tickadj$(EXEEXT) timetrim$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf ansi2knr.1 \
- ansi2knr.c
+ $(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf \
+ $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
+ $(top_srcdir)/sntp/check-libntp.mf ansi2knr.1 ansi2knr.c
subdir = util
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
- $(top_srcdir)/m4/define_dir.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/ntp_cacheversion.m4 \
- $(top_srcdir)/m4/ntp_dir_sep.m4 \
- $(top_srcdir)/m4/ntp_lineeditlibs.m4 \
- $(top_srcdir)/m4/ntp_openssl.m4 \
- $(top_srcdir)/m4/ntp_vpathhack.m4 \
- $(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/define_dir.m4 \
+ $(top_srcdir)/sntp/m4/hms_search_lib.m4 \
+ $(top_srcdir)/sntp/m4/libtool.m4 \
+ $(top_srcdir)/sntp/m4/ltoptions.m4 \
+ $(top_srcdir)/sntp/m4/ltsugar.m4 \
+ $(top_srcdir)/sntp/m4/ltversion.m4 \
+ $(top_srcdir)/sntp/m4/lt~obsolete.m4 \
+ $(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
+ $(top_srcdir)/sntp/m4/ntp_compiler.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
+ $(top_srcdir)/sntp/m4/ntp_debug.m4 \
+ $(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
+ $(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
+ $(top_srcdir)/sntp/m4/ntp_googletest.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libevent.m4 \
+ $(top_srcdir)/sntp/m4/ntp_libntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
+ $(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
+ $(top_srcdir)/sntp/m4/ntp_openssl.m4 \
+ $(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
+ $(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
+ $(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
+ $(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
+ $(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/os_cflags.m4 \
+ $(top_srcdir)/sntp/m4/snprintf.m4 \
+ $(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
- "$(DESTDIR)$(man1dir)"
-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"
+PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
audio_pcm_SOURCES = audio-pcm.c
audio_pcm_OBJECTS = audio-pcm.$(OBJEXT)
audio_pcm_LDADD = $(LDADD)
-audio_pcm_DEPENDENCIES = ../libntp/libntp.a
+am__DEPENDENCIES_1 =
+audio_pcm_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
byteorder_SOURCES = byteorder.c
byteorder_OBJECTS = byteorder.$(OBJEXT)
byteorder_LDADD = $(LDADD)
-byteorder_DEPENDENCIES = ../libntp/libntp.a
+byteorder_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
hist_SOURCES = hist.c
hist_OBJECTS = hist.$(OBJEXT)
hist_LDADD = $(LDADD)
-hist_DEPENDENCIES = ../libntp/libntp.a
+hist_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_jitter_OBJECTS = jitter.$(OBJEXT)
jitter_OBJECTS = $(am_jitter_OBJECTS)
jitter_DEPENDENCIES =
kern_SOURCES = kern.c
kern_OBJECTS = kern.$(OBJEXT)
kern_LDADD = $(LDADD)
-kern_DEPENDENCIES = ../libntp/libntp.a
+kern_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
longsize_SOURCES = longsize.c
longsize_OBJECTS = longsize.$(OBJEXT)
longsize_LDADD = $(LDADD)
-longsize_DEPENDENCIES = ../libntp/libntp.a
+longsize_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_ntp_keygen_OBJECTS = ntp-keygen.$(OBJEXT) ntp-keygen-opts.$(OBJEXT)
ntp_keygen_OBJECTS = $(am_ntp_keygen_OBJECTS)
-am__DEPENDENCIES_1 =
ntp_keygen_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) \
- ../libntp/libntp.a
+ ../libntp/libntp.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
ntptime_SOURCES = ntptime.c
ntptime_OBJECTS = ntptime.$(OBJEXT)
ntptime_LDADD = $(LDADD)
-ntptime_DEPENDENCIES = ../libntp/libntp.a
+ntptime_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
pps_api_SOURCES = pps-api.c
pps_api_OBJECTS = pps-api.$(OBJEXT)
pps_api_LDADD = $(LDADD)
-pps_api_DEPENDENCIES = ../libntp/libntp.a
+pps_api_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
precision_SOURCES = precision.c
precision_OBJECTS = precision.$(OBJEXT)
precision_LDADD = $(LDADD)
-precision_DEPENDENCIES = ../libntp/libntp.a
+precision_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
sht_SOURCES = sht.c
sht_OBJECTS = sht.$(OBJEXT)
sht_LDADD = $(LDADD)
-sht_DEPENDENCIES = ../libntp/libntp.a
+sht_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
testrs6000_SOURCES = testrs6000.c
testrs6000_OBJECTS = testrs6000.$(OBJEXT)
testrs6000_LDADD = $(LDADD)
-testrs6000_DEPENDENCIES = ../libntp/libntp.a
+testrs6000_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
tg_SOURCES = tg.c
tg_OBJECTS = tg.$(OBJEXT)
tg_LDADD = $(LDADD)
-tg_DEPENDENCIES = ../libntp/libntp.a
+tg_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+tg2_SOURCES = tg2.c
+tg2_OBJECTS = tg2.$(OBJEXT)
+tg2_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
tickadj_SOURCES = tickadj.c
tickadj_OBJECTS = tickadj.$(OBJEXT)
-tickadj_LDADD = $(LDADD)
-tickadj_DEPENDENCIES = ../libntp/libntp.a
+tickadj_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
timetrim_SOURCES = timetrim.c
timetrim_OBJECTS = timetrim.$(OBJEXT)
timetrim_LDADD = $(LDADD)
-timetrim_DEPENDENCIES = ../libntp/libntp.a
+timetrim_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
longsize.c $(ntp_keygen_SOURCES) ntptime.c pps-api.c \
- precision.c sht.c testrs6000.c tg.c tickadj.c timetrim.c
+ precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
DIST_SOURCES = audio-pcm.c byteorder.c hist.c $(jitter_SOURCES) kern.c \
longsize.c $(ntp_keygen_SOURCES) ntptime.c pps-api.c \
- precision.c sht.c testrs6000.c tg.c tickadj.c timetrim.c
+ precision.c sht.c testrs6000.c tg.c tg2.c tickadj.c timetrim.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -176,27 +230,40 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
+man8dir = $(mandir)/man8
NROFF = nroff
-MANS = $(man_MANS)
-DATA = $(noinst_DATA)
+MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
+DATA = $(html_DATA) $(noinst_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BINSUBDIR = @BINSUBDIR@
+CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
+CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
+CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
+CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
+CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
-CLKTEST = @CLKTEST@
+CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_NTP = @CPPFLAGS_NTP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@@ -208,21 +275,31 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EDITLINE_LIBS = @EDITLINE_LIBS@
-EF_LIBS = @EF_LIBS@
-EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+GTEST_CONFIG = @GTEST_CONFIG@
+GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
+GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
+GTEST_LDFLAGS = @GTEST_LDFLAGS@
+GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
+HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LCRYPTO = @LCRYPTO@
LD = @LD@
+LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_NLIST = @LDADD_NLIST@
+LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
+LDFLAGS_NTP = @LDFLAGS_NTP@
+LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
+LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@@ -230,6 +307,7 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
@@ -248,14 +326,68 @@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NTPDATE_DB = @NTPDATE_DB@
+NTPDATE_DL = @NTPDATE_DL@
+NTPDATE_DS = @NTPDATE_DS@
+NTPDATE_MS = @NTPDATE_MS@
+NTPDATE_NI = @NTPDATE_NI@
+NTPDC_DB = @NTPDC_DB@
+NTPDC_DL = @NTPDC_DL@
+NTPDC_DS = @NTPDC_DS@
+NTPDC_MS = @NTPDC_MS@
+NTPDC_NI = @NTPDC_NI@
+NTPDSIM_DB = @NTPDSIM_DB@
+NTPDSIM_DL = @NTPDSIM_DL@
+NTPDSIM_DS = @NTPDSIM_DS@
+NTPDSIM_MS = @NTPDSIM_MS@
+NTPDSIM_NI = @NTPDSIM_NI@
+NTPD_DB = @NTPD_DB@
+NTPD_DL = @NTPD_DL@
+NTPD_DS = @NTPD_DS@
+NTPD_MS = @NTPD_MS@
+NTPD_NI = @NTPD_NI@
+NTPQ_DB = @NTPQ_DB@
+NTPQ_DL = @NTPQ_DL@
+NTPQ_DS = @NTPQ_DS@
+NTPQ_MS = @NTPQ_MS@
+NTPQ_NI = @NTPQ_NI@
+NTPSNMPD_DB = @NTPSNMPD_DB@
+NTPSNMPD_DL = @NTPSNMPD_DL@
+NTPSNMPD_DS = @NTPSNMPD_DS@
+NTPSNMPD_MS = @NTPSNMPD_MS@
+NTPSNMPD_NI = @NTPSNMPD_NI@
+NTPSWEEP_DB = @NTPSWEEP_DB@
+NTPSWEEP_DL = @NTPSWEEP_DL@
+NTPSWEEP_DS = @NTPSWEEP_DS@
+NTPSWEEP_MS = @NTPSWEEP_MS@
+NTPSWEEP_NI = @NTPSWEEP_NI@
+NTPTIME_DB = @NTPTIME_DB@
+NTPTIME_DL = @NTPTIME_DL@
+NTPTIME_DS = @NTPTIME_DS@
+NTPTIME_MS = @NTPTIME_MS@
+NTPTIME_NI = @NTPTIME_NI@
+NTPTRACE_DB = @NTPTRACE_DB@
+NTPTRACE_DL = @NTPTRACE_DL@
+NTPTRACE_DS = @NTPTRACE_DS@
+NTPTRACE_MS = @NTPTRACE_MS@
+NTPTRACE_NI = @NTPTRACE_NI@
+NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
+NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
+NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
+NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
+NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
+NTP_KEYSDIR = @NTP_KEYSDIR@
+NTP_WAIT_DB = @NTP_WAIT_DB@
+NTP_WAIT_DL = @NTP_WAIT_DL@
+NTP_WAIT_DS = @NTP_WAIT_DS@
+NTP_WAIT_MS = @NTP_WAIT_MS@
+NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL = @OPENSSL@
-OPENSSL_INC = @OPENSSL_INC@
-OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -268,10 +400,12 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
+PERLLIBDIR = @PERLLIBDIR@
+PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -279,9 +413,27 @@ SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
+SNTP = @SNTP@
+SNTP_DB = @SNTP_DB@
+SNTP_DL = @SNTP_DL@
+SNTP_DS = @SNTP_DS@
+SNTP_MS = @SNTP_MS@
+SNTP_NI = @SNTP_NI@
+STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
+TICKADJ_DB = @TICKADJ_DB@
+TICKADJ_DL = @TICKADJ_DL@
+TICKADJ_DS = @TICKADJ_DS@
+TICKADJ_MS = @TICKADJ_MS@
+TICKADJ_NI = @TICKADJ_NI@
+TIMETRIM_DB = @TIMETRIM_DB@
+TIMETRIM_DL = @TIMETRIM_DL@
+TIMETRIM_DS = @TIMETRIM_DS@
+TIMETRIM_MS = @TIMETRIM_MS@
+TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
+VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
@@ -290,6 +442,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -338,42 +491,75 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
NULL =
-#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
-AUTOMAKE_OPTIONS =
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
-
+bin_PROGRAMS = $(NTP_KEYGEN_DB) $(NTPTIME_DB) $(TICKADJ_DB) $(TIMETRIM_DB)
+libexec_PROGRAMS = $(NTP_KEYGEN_DL) $(NTPTIME_DL) $(TICKADJ_DL) $(TIMETRIM_DL)
+sbin_PROGRAMS = $(NTP_KEYGEN_DS) $(NTPTIME_DS) $(TICKADJ_DS) $(TIMETRIM_DS)
+AM_CFLAGS = $(CFLAGS_NTP)
+AM_CPPFLAGS = $(NTP_INCS) $(LIBOPTS_CFLAGS) $(CPPFLAGS_NTP)
+AM_LDFLAGS = $(LDFLAGS_NTP)
# LDADD might need RESLIB and ADJLIB
-LDADD = ../libntp/libntp.a
+LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+tg2_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a \
+ $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
-ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a @LCRYPTO@
-ETAGS_ARGS = Makefile.am
-#EXTRA_DIST= README TAGS
-EXTRA_DIST = ntp-keygen-opts.def ntp-keygen.1 ntp-keygen-opts.texi ntp-keygen-opts.menu
-BUILT_SOURCES = ntp-keygen-opts.c ntp-keygen-opts.h .deps-ver
-CLEANFILES = .deps-ver
-DISTCLEANFILES = .version version.c
-noinst_DATA = $(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu
-man_MANS = $(srcdir)/ntp-keygen.1
-run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-
-std_def_list = $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+tickadj_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) $(LDADD_NLIST)
+EXTRA_DIST = \
+ invoke-ntp-keygen.menu \
+ invoke-ntp-keygen.texi \
+ ntp-keygen-opts.def \
+ ntp-keygen.1ntp-keygenman \
+ ntp-keygen.1ntp-keygenmdoc \
+ ntp-keygen.man.in \
+ ntp-keygen.mdoc.in \
+ ntp-keygen.mdoc.in \
+ ntp-keygen.html \
+ ntp-keygen.texi \
+ $(NULL)
+
+BUILT_SOURCES = ntp-keygen-opts.c ntp-keygen-opts.h check-libntp \
+ check-libopts .deps-ver
+CLEANFILES = check-libntp check-libopts .deps-ver
+DISTCLEANFILES = .version version.c config.log $(man_MANS)
+html_DATA = \
+ $(srcdir)/ntp-keygen.html \
+ $(NULL)
+
+noinst_DATA = \
+ $(srcdir)/invoke-ntp-keygen.menu \
+ $(srcdir)/invoke-ntp-keygen.texi \
+ $(srcdir)/ntp-keygen.man.in \
+ $(srcdir)/ntp-keygen.mdoc.in \
+ $(man_MANS) \
+ $(NULL)
+
+man1_MANS =
+man8_MANS =
+man_MANS = ntp-keygen.$(NTP_KEYGEN_MS)
+run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
jitter_SOURCES = jitter.c jitter.h
jitter_LDADD =
+NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
+ -I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -446,6 +632,49 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@@ -491,49 +720,52 @@ clean-sbinPROGRAMS:
rm -f $$list
audio-pcm$(EXEEXT): $(audio_pcm_OBJECTS) $(audio_pcm_DEPENDENCIES)
@rm -f audio-pcm$(EXEEXT)
- $(LINK) $(audio_pcm_OBJECTS) $(audio_pcm_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(audio_pcm_OBJECTS) $(audio_pcm_LDADD) $(LIBS)
byteorder$(EXEEXT): $(byteorder_OBJECTS) $(byteorder_DEPENDENCIES)
@rm -f byteorder$(EXEEXT)
- $(LINK) $(byteorder_OBJECTS) $(byteorder_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(byteorder_OBJECTS) $(byteorder_LDADD) $(LIBS)
hist$(EXEEXT): $(hist_OBJECTS) $(hist_DEPENDENCIES)
@rm -f hist$(EXEEXT)
- $(LINK) $(hist_OBJECTS) $(hist_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(hist_OBJECTS) $(hist_LDADD) $(LIBS)
jitter$(EXEEXT): $(jitter_OBJECTS) $(jitter_DEPENDENCIES)
@rm -f jitter$(EXEEXT)
- $(LINK) $(jitter_OBJECTS) $(jitter_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(jitter_OBJECTS) $(jitter_LDADD) $(LIBS)
kern$(EXEEXT): $(kern_OBJECTS) $(kern_DEPENDENCIES)
@rm -f kern$(EXEEXT)
- $(LINK) $(kern_OBJECTS) $(kern_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(kern_OBJECTS) $(kern_LDADD) $(LIBS)
longsize$(EXEEXT): $(longsize_OBJECTS) $(longsize_DEPENDENCIES)
@rm -f longsize$(EXEEXT)
- $(LINK) $(longsize_OBJECTS) $(longsize_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(longsize_OBJECTS) $(longsize_LDADD) $(LIBS)
ntp-keygen$(EXEEXT): $(ntp_keygen_OBJECTS) $(ntp_keygen_DEPENDENCIES)
@rm -f ntp-keygen$(EXEEXT)
- $(LINK) $(ntp_keygen_OBJECTS) $(ntp_keygen_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntp_keygen_OBJECTS) $(ntp_keygen_LDADD) $(LIBS)
ntptime$(EXEEXT): $(ntptime_OBJECTS) $(ntptime_DEPENDENCIES)
@rm -f ntptime$(EXEEXT)
- $(LINK) $(ntptime_OBJECTS) $(ntptime_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(ntptime_OBJECTS) $(ntptime_LDADD) $(LIBS)
pps-api$(EXEEXT): $(pps_api_OBJECTS) $(pps_api_DEPENDENCIES)
@rm -f pps-api$(EXEEXT)
- $(LINK) $(pps_api_OBJECTS) $(pps_api_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(pps_api_OBJECTS) $(pps_api_LDADD) $(LIBS)
precision$(EXEEXT): $(precision_OBJECTS) $(precision_DEPENDENCIES)
@rm -f precision$(EXEEXT)
- $(LINK) $(precision_OBJECTS) $(precision_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(precision_OBJECTS) $(precision_LDADD) $(LIBS)
sht$(EXEEXT): $(sht_OBJECTS) $(sht_DEPENDENCIES)
@rm -f sht$(EXEEXT)
- $(LINK) $(sht_OBJECTS) $(sht_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(sht_OBJECTS) $(sht_LDADD) $(LIBS)
testrs6000$(EXEEXT): $(testrs6000_OBJECTS) $(testrs6000_DEPENDENCIES)
@rm -f testrs6000$(EXEEXT)
- $(LINK) $(testrs6000_OBJECTS) $(testrs6000_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(testrs6000_OBJECTS) $(testrs6000_LDADD) $(LIBS)
tg$(EXEEXT): $(tg_OBJECTS) $(tg_DEPENDENCIES)
@rm -f tg$(EXEEXT)
- $(LINK) $(tg_OBJECTS) $(tg_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(tg_OBJECTS) $(tg_LDADD) $(LIBS)
+tg2$(EXEEXT): $(tg2_OBJECTS) $(tg2_DEPENDENCIES)
+ @rm -f tg2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(tg2_OBJECTS) $(tg2_LDADD) $(LIBS)
tickadj$(EXEEXT): $(tickadj_OBJECTS) $(tickadj_DEPENDENCIES)
@rm -f tickadj$(EXEEXT)
- $(LINK) $(tickadj_OBJECTS) $(tickadj_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(tickadj_OBJECTS) $(tickadj_LDADD) $(LIBS)
timetrim$(EXEEXT): $(timetrim_OBJECTS) $(timetrim_DEPENDENCIES)
@rm -f timetrim$(EXEEXT)
- $(LINK) $(timetrim_OBJECTS) $(timetrim_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(timetrim_OBJECTS) $(timetrim_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -555,26 +787,30 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sht.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrs6000.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tg2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tickadj.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timetrim.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -584,10 +820,10 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-man1: $(man_MANS)
+install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -613,7 +849,7 @@ install-man1: $(man_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list=''; test -n "$(man1dir)" || exit 0; \
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
@@ -622,6 +858,64 @@ uninstall-man1:
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -723,7 +1017,7 @@ check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -757,8 +1051,8 @@ maintainer-clean-generic:
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool \
- clean-sbinPROGRAMS mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -778,13 +1072,14 @@ info: info-am
info-am:
-install-data-am: install-man
+install-data-am: install-htmlDATA install-man
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
+ install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@@ -795,7 +1090,7 @@ install-info: install-info-am
install-info-am:
-install-man: install-man1
+install-man: install-man1 install-man8
install-pdf: install-pdf-am
@@ -825,28 +1120,30 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-man \
- uninstall-sbinPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-htmlDATA \
+ uninstall-libexecPROGRAMS uninstall-man uninstall-sbinPROGRAMS
-uninstall-man: uninstall-man1
+uninstall-man: uninstall-man1 uninstall-man8
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-exec-hook install-html install-html-am \
- install-info install-info-am install-man install-man1 \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-sbinPROGRAMS install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ clean-generic clean-libexecPROGRAMS clean-libtool \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-htmlDATA install-info \
+ install-info-am install-libexecPROGRAMS install-man \
+ install-man1 install-man8 install-pdf install-pdf-am \
+ install-ps install-ps-am install-sbinPROGRAMS install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
+ uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
+ uninstall-man1 uninstall-man8 uninstall-sbinPROGRAMS
$(srcdir)/ntp-keygen-opts.h: $(srcdir)/ntp-keygen-opts.c
@@ -855,47 +1152,88 @@ $(srcdir)/ntp-keygen-opts.h: $(srcdir)/ntp-keygen-opts.c
$(srcdir)/ntp-keygen-opts.c: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
$(run_ag) ntp-keygen-opts.def
-$(srcdir)/ntp-keygen.1: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def
+###
+
+$(srcdir)/ntp-keygen.1ntp-keygenman: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-keygenman -Tagman-cmd.tpl ntp-keygen-opts.def
+
+$(srcdir)/ntp-keygen.man.in: $(srcdir)/ntp-keygen.1ntp-keygenman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-keygen.1ntp-keygenman > $(srcdir)/ntp-keygen.man.in+
+ mv $(srcdir)/ntp-keygen.man.in+ $(srcdir)/ntp-keygen.man.in
+
+###
+
+$(srcdir)/ntp-keygen.1ntp-keygenmdoc: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntp-keygenmdoc -Tagmdoc-cmd.tpl ntp-keygen-opts.def
+
+$(srcdir)/ntp-keygen.mdoc.in: $(srcdir)/ntp-keygen.1ntp-keygenmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp-keygen.1ntp-keygenmdoc > $(srcdir)/ntp-keygen.mdoc.in+
+ mv $(srcdir)/ntp-keygen.mdoc.in+ $(srcdir)/ntp-keygen.mdoc.in
+
+###
+
+ntp-keygen.$(NTP_KEYGEN_MS): $(srcdir)/ntp-keygen.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntp-keygen.$(NTP_KEYGEN_MS)+:$(srcdir)/ntp-keygen.$(MANTAGFMT).in
+ mv ntp-keygen.$(NTP_KEYGEN_MS)+ ntp-keygen.$(NTP_KEYGEN_MS)
+
+###
-$(srcdir)/ntp-keygen-opts.menu: $(srcdir)/ntp-keygen-opts.texi
+$(srcdir)/invoke-ntp-keygen.menu: $(srcdir)/invoke-ntp-keygen.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntp-keygen-opts.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntp-keygen.texi: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntp-keygen-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+$(srcdir)/ntp-keygen.html: $(srcdir)/ntp-keygen.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp-keygen.html ntp-keygen.texi || true )
kern.o: kern.c
$(COMPILE) -DHAVE_TIMEX_H -c kern.c
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+$(PROGRAMS): version.o
+
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
+
+version.c: $(ntp_keygen_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntp-keygen
-version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
- env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntp-keygen
- $(COMPILE) -c version.c
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
install-exec-hook:
- @case ${BINSUBDIR} in \
- bin) ODIR=${sbindir} ;; \
- sbin) ODIR=${bindir} ;; \
- esac; \
- test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
- || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
- test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
+ @test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
+ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
+ test ! -f ${sbindir}/$$i \
+ || echo "*** $$i is also in ${sbindir}!"; \
+ done
+ @test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
+ || for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
+ test ! -f ${bindir}/$$i \
+ || echo "*** $$i is also in ${bindir}!"; \
done
#
+
+check-libntp: ../libntp/libntp.a
+ @echo stamp > $@
+
+../libntp/libntp.a:
+ cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
+
+check-libopts: ../sntp/libopts/libopts.la
+ @echo stamp > $@
+
+../sntp/libopts/libopts.la:
+ -cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
- $(MAKE) clean && \
+ $(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
@@ -904,17 +1242,10 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
.) \
./config.status Makefile depfiles \
;; \
- ..) \
- cd .. && \
- ./config.status $(subdir)/Makefile depfiles && \
- cd $(subdir) \
- ;; \
*) \
- echo 'Fatal: depsver.mf Automake fragment limited' \
- 'to immediate subdirectories.' && \
- echo "top_builddir: $(top_builddir)" && \
- echo "subdir: $(subdir)" && \
- exit 1 \
+ cd "$(top_builddir)" && \
+ ./config.status $(subdir)/Makefile depfiles && \
+ cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
@@ -923,7 +1254,7 @@ $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
- @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
+ @[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
diff --git a/util/README b/util/README
index 297a562c6cbe..d67b4c17d694 100644
--- a/util/README
+++ b/util/README
@@ -35,3 +35,10 @@ 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.
+
+tg.c and tg2.c are tone generators. They make audio signals
+that emulate WWV or IRIG (-B and -E). tg runs on Solaris.
+tg2 is a clone that runs on Linux, FreeBSD, and NetBSD.
+Read the source for the fine print. tg2 has a help option
+available via -h.
+
diff --git a/util/audio-pcm.c b/util/audio-pcm.c
index 6f2e4fa84a6d..cbaf0f2f460b 100644
--- a/util/audio-pcm.c
+++ b/util/audio-pcm.c
@@ -94,8 +94,8 @@ main( )
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);
+ snprintf(ai_dev, sizeof(ai_dev), AI_DEV, unit);
+ snprintf(ac_dev, sizeof(ac_dev), AC_DEV, unit);
/*
* Open audio device. Do not complain if not there.
diff --git a/util/hist.c b/util/hist.c
index 244f595fe7ce..c8cbe49f2c50 100644
--- a/util/hist.c
+++ b/util/hist.c
@@ -20,7 +20,7 @@
#define NSRT 20000 /* size of overflow histogram */
#define NCNT (600 * 1000000) /* sample interval (us) */
-int col (long *, long *);
+int col (const void *, const void *);
int
main(
@@ -37,9 +37,9 @@ main(
* Force pages into memory
*/
for (i = 0; i < NBUF; i++)
- gtod[i] = 0;
+ gtod[i] = 0;
for (i = 0; i < NSRT; i++)
- ovfl[i] = 0;
+ ovfl[i] = 0;
/*
* Construct histogram
@@ -52,7 +52,7 @@ main(
gettimeofday(&tr, &tzp);
u = tr.tv_sec * 1000000 + tr.tv_usec;
if (u - v > NCNT)
- break;
+ break;
w = u - t;
if (w <= 0) {
/*
@@ -62,7 +62,7 @@ main(
} else if (w > NBUF - 1) {
ovfl[n] = w;
if (n < NSRT - 1)
- n++;
+ n++;
} else {
gtod[w]++;
}
@@ -75,39 +75,36 @@ main(
*/
for (i = 0; i < NBUF - 1; i++) {
if (gtod[i] > 0)
- printf("%ld %ld\n", i, gtod[i]);
+ printf("%ld %ld\n", i, gtod[i]);
}
if (n == 0)
- return;
- qsort(
-#ifdef QSORT_USES_VOID_P
- (void *)
-#else
- (char *)
-#endif
- ovfl, (size_t)n, sizeof(long), col);
+ return;
+ qsort(&ovfl, (size_t)n, sizeof(ovfl[0]), col);
w = 0;
j = 0;
for (i = 0; i < n; i++) {
if (ovfl[i] != w) {
if (j > 0)
- printf("%ld %ld\n", w, j);
+ printf("%ld %ld\n", w, j);
w = ovfl[i];
j = 1;
} else
- j++;
+ j++;
}
if (j > 0)
- printf("%ld %ld\n", w, j);
+ printf("%ld %ld\n", w, j);
exit(0);
}
int
col(
- long *x,
- long *y
+ const void *vx,
+ const void *vy
)
{
+ const long *x = vx;
+ const long *y = vy;
+
return (*x - *y);
}
diff --git a/util/ntp-keygen-opts.menu b/util/invoke-ntp-keygen.menu
index bc5cfe9e19d8..bc5cfe9e19d8 100644
--- a/util/ntp-keygen-opts.menu
+++ b/util/invoke-ntp-keygen.menu
diff --git a/util/invoke-ntp-keygen.texi b/util/invoke-ntp-keygen.texi
new file mode 100644
index 000000000000..56ab5a8d2504
--- /dev/null
+++ b/util/invoke-ntp-keygen.texi
@@ -0,0 +1,1354 @@
+@node ntp-keygen Invocation
+@section Invoking ntp-keygen
+@pindex ntp-keygen
+@cindex Create a NTP host key
+@ignore
+#
+# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
+#
+# It has been AutoGen-ed December 19, 2014 at 07:50:55 AM by AutoGen 5.18.5pre4
+# From the definitions ntp-keygen-opts.def
+# and the template file agtexi-cmd.tpl
+@end ignore
+
+
+
+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.
+
+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.
+
+When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+utility programs.
+
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+
+Some files used by this program are encrypted using a private password.
+The
+@code{-p}
+option specifies the password for local encrypted files and the
+@code{-q}
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+@code{gethostname()}
+function, normally the DNS name of the host is used.
+
+The
+@kbd{pw}
+option of the
+@kbd{crypto}
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+@kbd{ntpd}
+without password but only on the same host.
+
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+@kbd{ntp.keys},
+is usually installed in
+@file{/etc}.
+Other files and links are usually installed in
+@file{/usr/local/etc},
+which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+@kbd{keysdir}
+configuration command in such cases.
+Normally, this is in
+@file{/etc}.
+
+This program directs commentary and error messages to the standard
+error stream
+@kbd{stderr}
+and remote files to the standard output stream
+@kbd{stdout}
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+@kbd{ntpkey}
+and include the file type, generating host and filestamp,
+as described in the
+@quotedblleft{}Cryptographic Data Files@quotedblright{}
+section below.
+@subsubsection Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+@file{/usr/local/etc}
+When run for the first time, or if all files with names beginning with
+@kbd{ntpkey}
+have been removed, use the
+@code{ntp-keygen}
+command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+@code{ntp-keygen}
+with the
+@code{-T}
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+
+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.
+A different sign key can be assigned using the
+@code{-S}
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+@code{-c}
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+
+Additional information on trusted groups and identity schemes is on the
+@quotedblleft{}Autokey Public-Key Authentication@quotedblright{}
+page.
+
+
+
+The
+@code{ntpd(1ntpdmdoc)}
+configuration command
+@code{crypto} @code{pw} @kbd{password}
+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.
+
+
+File names begin with the prefix
+@code{ntpkey_}
+and end with the postfix
+@kbd{_hostname.filestamp},
+where
+@kbd{hostname}
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+@kbd{filestamp}
+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
+@code{rm} @code{ntpkey*}
+command or all files generated
+at a specific time can be removed by a
+@code{rm}
+@kbd{*filestamp}
+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.
+
+All files are installed by default in the keys directory
+@file{/usr/local/etc},
+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.
+
+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.
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+@code{ntpd(1ntpdmdoc)}
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+@code{ntp-keygen}
+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.
+@subsubsection Running the program
+The safest way to run the
+@code{ntp-keygen}
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+@file{/usr/local/etc},
+then run the program.
+When run for the first time,
+or if all
+@code{ntpkey}
+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.
+
+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.
+
+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.
+
+Running the program as other than root and using the Unix
+@code{su}
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+@code{.rnd}
+in the user home directory.
+However, there should be only one
+@code{.rnd},
+most conveniently
+in the root directory, so it is convenient to define the
+@code{$RANDFILE}
+environment variable used by the OpenSSL library as the path to
+@code{/.rnd}.
+
+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
+@file{/etc}
+using the
+@code{keysdir}
+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.
+
+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.
+
+
+All files are installed by default in the keys directory
+@file{/usr/local/etc},
+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.
+
+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.
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+@code{ntpd(1ntpdmdoc)}
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+@code{ntp-keygen}
+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.
+@subsubsection Running the program
+The safest way to run the
+@code{ntp-keygen}
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+@file{/usr/local/etc},
+then run the program.
+When run for the first time,
+or if all
+@code{ntpkey}
+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.
+
+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.
+
+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.
+
+Running the program as other than root and using the Unix
+@code{su}
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+@code{.rnd}
+in the user home directory.
+However, there should be only one
+@code{.rnd},
+most conveniently
+in the root directory, so it is convenient to define the
+@code{$RANDFILE}
+environment variable used by the OpenSSL library as the path to
+@code{/.rnd}.
+
+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
+@file{/etc}
+using the
+@code{keysdir}
+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.
+
+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.
+seconds.
+seconds.
+
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+@ref{Authentication Options}
+section of
+@code{ntp.conf(5)}.
+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
+@ref{Automatic NTP Configuration Options}
+section of
+@code{ntp.conf(5)}.
+
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+@code{ntpkey}
+files.
+Then run
+@code{ntp-keygen}
+@code{-T}
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+@code{-T}
+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.
+
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+@code{ntp-keygen}
+with the
+@code{-S} @kbd{type}
+option, where
+@kbd{type}
+is either
+@code{RSA}
+or
+@code{DSA}.
+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
+@code{ntp-keygen}
+with the
+@code{-c} @kbd{scheme}
+option and selected
+@kbd{scheme}
+as needed.
+f
+@code{ntp-keygen}
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+@code{ntp-keygen}
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+@code{ntpd(1ntpdmdoc)}
+should be restarted.
+When
+@code{ntpd(1ntpdmdoc)}
+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.
+@subsubsection Identity Schemes
+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
+"Identification Schemes"
+page
+(maybe available at
+@code{http://www.eecis.udel.edu/%7emills/keygen.html}).
+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.
+
+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.
+
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+@code{ntp-keygen}
+@code{-P}
+@code{-p} @kbd{password}
+to generate the host key file
+@file{ntpkey_RSAkey_}@kbd{alice.filestamp}
+and trusted private certificate file
+@file{ntpkey_RSA-MD5_cert_}@kbd{alice.filestamp}.
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+@file{ntpkey_host_}@kbd{bob}
+to the host key file and soft link
+@file{ntpkey_cert_}@kbd{bob}
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+
+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 parameter file.
+On trusted host alice run
+@code{ntp-keygen}
+@code{-T}
+@code{-I}
+@code{-p} @kbd{password}
+to produce her parameter file
+@file{ntpkey_IFFpar_}@kbd{alice.filestamp},
+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
+@file{ntpkey_iff_}@kbd{alice}
+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.
+
+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 alice run
+@code{ntp-keygen}
+@code{-e}
+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
+@file{ntpkey_iff_}@kbd{alice}
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+
+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 alice run
+@code{ntp-keygen}
+@code{-T}
+@code{-G}
+@code{-p} @kbd{password}
+to produce her parameter file
+@file{ntpkey_GQpar_}@kbd{alice.filestamp},
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+@file{ntpkey_gq_}@kbd{alice}
+to this file.
+In addition, on each host bob install a soft link
+from generic
+@file{ntpkey_gq_}@kbd{bob}
+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.
+
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+@code{ntp-keygen}
+@code{-V} @kbd{n}
+@code{-p} @kbd{password},
+where
+@kbd{n}
+is the number of revokable keys (typically 5) to produce
+the parameter file
+@file{ntpkeys_MVpar_}@kbd{trish.filestamp}
+and client key files
+@file{ntpkeys_MVkeyd_}@kbd{trish.filestamp}
+where
+@kbd{d}
+is the key number (0 <
+@kbd{d}
+<
+@kbd{n}).
+Copy the parameter file to alice and install a soft link
+from the generic
+@file{ntpkey_mv_}@kbd{alice}
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+@file{ntpkey_mvkey_}@kbd{bob}
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+@subsubsection Command Line Options
+@table @asis
+@item @code{-c} @kbd{scheme}
+Select certificate message digest/signature encryption scheme.
+The
+@kbd{scheme}
+can be one of the following:
+. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+or
+@code{DSA-SHA1}.
+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
+@code{RSA-MD5}.
+@item @code{-d}
+Enable debugging.
+This option displays the cryptographic data produced in eye-friendly billboards.
+@item @code{-e}
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+@item @code{-G}
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+@item @code{-g}
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+@item @code{-H}
+Generate new host keys, obsoleting any that may exist.
+@item @code{-I}
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+@item @code{-i} @kbd{name}
+Set the suject name to
+@kbd{name}.
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+@item @code{-M}
+Generate MD5 keys, obsoleting any that may exist.
+@item @code{-P}
+Generate a private certificate.
+By default, the program generates public certificates.
+@item @code{-p} @kbd{password}
+Encrypt generated files containing private data with
+@kbd{password}
+and the DES-CBC algorithm.
+@item @code{-q}
+Set the password for reading files to password.
+@item @code{-S} @code{[@code{RSA} | @code{DSA}]}
+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.
+@item @code{-s} @kbd{name}
+Set the issuer name to
+@kbd{name}.
+This is used for the issuer field in certificates
+and in the file name for identity files.
+@item @code{-T}
+Generate a trusted certificate.
+By default, the program generates a non-trusted certificate.
+@item @code{-V} @kbd{nkeys}
+Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+@end table
+@subsubsection Random Seed File
+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
+@code{ntp-keygen}
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+
+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.
+
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+@code{.rnd},
+which must be available when starting the NTP daemon
+or the
+@code{ntp-keygen}
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+@code{randfile}
+subcommand of the
+@code{crypto}
+configuration command.
+If not specified in this way, or when starting the
+@code{ntp-keygen}
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+.Ev RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+.Ev RANDFILE
+environment variable is not present,
+the library will look for the
+@code{.rnd}
+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.
+@subsubsection Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+@code{ntp-keygen}
+program and
+@code{ntpd(1ntpdmdoc)}
+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.
+
+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
+@example
+@kbd{keyno} @kbd{type} @kbd{key}
+@end example
+where
+@kbd{keyno}
+is a positive integer in the range 1-65,535,
+@kbd{type}
+is the string MD5 defining the key format and
+@kbd{key}
+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
+@quoteleft{}#@quoteright{}
+character.
+
+Note that the keys used by the
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+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.
+
+The
+@code{ntp-keygen}
+program generates a MD5 symmetric keys file
+@file{ntpkey_MD5key_}@kbd{hostname.filestamp}.
+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
+@file{ntp.keys},
+so
+@code{ntp-keygen}
+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
+@code{ntpq(1ntpqmdoc)}
+and
+@code{ntpdc(1ntpdcmdoc)}
+utilities.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the @code{ntp-keygen} program.
+This software is released under the NTP license, <http://ntp.org/license>.
+
+@menu
+* ntp-keygen usage:: ntp-keygen help/usage (@option{--help})
+* ntp-keygen imbits:: imbits option (-b)
+* ntp-keygen certificate:: certificate option (-c)
+* ntp-keygen cipher:: cipher option (-C)
+* ntp-keygen id-key:: id-key option (-e)
+* ntp-keygen gq-params:: gq-params option (-G)
+* ntp-keygen host-key:: host-key option (-H)
+* ntp-keygen iffkey:: iffkey option (-I)
+* ntp-keygen ident:: ident option (-i)
+* ntp-keygen lifetime:: lifetime option (-l)
+* ntp-keygen md5key:: md5key option (-M)
+* ntp-keygen modulus:: modulus option (-m)
+* ntp-keygen pvt-cert:: pvt-cert option (-P)
+* ntp-keygen password:: password option (-p)
+* ntp-keygen export-passwd:: export-passwd option (-q)
+* ntp-keygen sign-key:: sign-key option (-S)
+* ntp-keygen subject-name:: subject-name option (-s)
+* ntp-keygen trusted-cert:: trusted-cert option (-T)
+* ntp-keygen mv-params:: mv-params option (-V)
+* ntp-keygen mv-keys:: mv-keys option (-v)
+* ntp-keygen config:: presetting/configuring ntp-keygen
+* ntp-keygen exit status:: exit status
+* ntp-keygen Usage:: Usage
+* ntp-keygen Notes:: Notes
+* ntp-keygen Bugs:: Bugs
+@end menu
+
+@node ntp-keygen usage
+@subsection ntp-keygen help/usage (@option{--help})
+@cindex ntp-keygen help
+
+This is the automatically generated usage text for ntp-keygen.
+
+The text printed is the same whether selected with the @code{help} option
+(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
+the usage text by passing it through a pager program.
+@code{more-help} is disabled on platforms without a working
+@code{fork(2)} function. The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}. Both will exit
+with a status code of 0.
+
+@exampleindent 0
+@example
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8
+Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
+ Flg Arg Option-Name Description
+ -b Num imbits identity modulus bits
+ - it must be in the range:
+ 256 to 2048
+ -c Str certificate certificate scheme
+ -C Str cipher privatekey cipher
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -e no id-key Write IFF or GQ identity keys
+ -G no gq-params Generate GQ parameters and keys
+ -H no host-key generate RSA host key
+ -I no iffkey generate IFF parameters
+ -i Str ident set Autokey group name
+ -l Num lifetime set certificate lifetime
+ -M no md5key generate MD5 keys
+ -m Num modulus modulus
+ - it must be in the range:
+ 256 to 2048
+ -P no pvt-cert generate PC private certificate
+ -p Str password local private password
+ -q Str export-passwd export IFF or GQ group keys with password
+ -S Str sign-key generate sign key (RSA or DSA)
+ -s Str subject-name set host and optionally group name
+ -T no trusted-cert trusted certificate (TC scheme)
+ -V Num mv-params generate <num> MV parameters
+ -v Num mv-keys update <num> MV keys
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -> opt save-opts save the option state to a config file
+ -< Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTP_KEYGEN_*
+
+Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
+@end example
+@exampleindent 4
+
+@node ntp-keygen imbits
+@subsection imbits option (-b)
+@cindex ntp-keygen-imbits
+
+This is the ``identity modulus bits'' option.
+This option takes a number argument @file{imbits}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+The number of bits in the identity modulus. The default is 256.
+@node ntp-keygen certificate
+@subsection certificate option (-c)
+@cindex ntp-keygen-certificate
+
+This is the ``certificate scheme'' option.
+This option takes a string argument @file{scheme}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+scheme is one of
+RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+DSA-SHA, or DSA-SHA1.
+
+Select the 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 RSA-MD5.
+@node ntp-keygen cipher
+@subsection cipher option (-C)
+@cindex ntp-keygen-cipher
+
+This is the ``privatekey cipher'' option.
+This option takes a string argument @file{cipher}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Select the cipher which is used to encrypt the files containing
+private keys. The default is three-key triple DES in CBC mode,
+equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+available in "@code{openssl -h}" output.
+@node ntp-keygen id-key
+@subsection id-key option (-e)
+@cindex ntp-keygen-id-key
+
+This is the ``write iff or gq identity keys'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+@node ntp-keygen gq-params
+@subsection gq-params option (-G)
+@cindex ntp-keygen-gq-params
+
+This is the ``generate gq parameters and keys'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+@node ntp-keygen host-key
+@subsection host-key option (-H)
+@cindex ntp-keygen-host-key
+
+This is the ``generate rsa host key'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate new host keys, obsoleting any that may exist.
+@node ntp-keygen iffkey
+@subsection iffkey option (-I)
+@cindex ntp-keygen-iffkey
+
+This is the ``generate iff parameters'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+@node ntp-keygen ident
+@subsection ident option (-i)
+@cindex ntp-keygen-ident
+
+This is the ``set autokey group name'' option.
+This option takes a string argument @file{group}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using @code{-i/--ident} or
+using @code{-s/--subject-name} following an '@code{@}' character,
+is also a part of the self-signed host certificate's subject and
+issuer names in the form @code{host@group} and should match the
+'@code{crypto ident}' or '@code{server ident}' configuration in
+@code{ntpd}'s configuration file.
+@node ntp-keygen lifetime
+@subsection lifetime option (-l)
+@cindex ntp-keygen-lifetime
+
+This is the ``set certificate lifetime'' option.
+This option takes a number argument @file{lifetime}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Set the certificate expiration to lifetime days from now.
+@node ntp-keygen md5key
+@subsection md5key option (-M)
+@cindex ntp-keygen-md5key
+
+This is the ``generate md5 keys'' option.
+Generate MD5 keys, obsoleting any that may exist.
+@node ntp-keygen modulus
+@subsection modulus option (-m)
+@cindex ntp-keygen-modulus
+
+This is the ``modulus'' option.
+This option takes a number argument @file{modulus}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+The number of bits in the prime modulus. The default is 512.
+@node ntp-keygen pvt-cert
+@subsection pvt-cert option (-P)
+@cindex ntp-keygen-pvt-cert
+
+This is the ``generate pc private certificate'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate a private certificate. By default, the program generates
+public certificates.
+@node ntp-keygen password
+@subsection password option (-p)
+@cindex ntp-keygen-password
+
+This is the ``local private password'' option.
+This option takes a string argument @file{passwd}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Local files containing private data are encrypted with the
+DES-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+@node ntp-keygen export-passwd
+@subsection export-passwd option (-q)
+@cindex ntp-keygen-export-passwd
+
+This is the ``export iff or gq group keys with password'' option.
+This option takes a string argument @file{passwd}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+--id-key (-e) for unencrypted exports.
+@node ntp-keygen sign-key
+@subsection sign-key option (-S)
+@cindex ntp-keygen-sign-key
+
+This is the ``generate sign key (rsa or dsa)'' option.
+This option takes a string argument @file{sign}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+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.
+@node ntp-keygen subject-name
+@subsection subject-name option (-s)
+@cindex ntp-keygen-subject-name
+
+This is the ``set host and optionally group name'' option.
+This option takes a string argument @file{host@@group}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Set the Autokey host name, and optionally, group name specified
+following an '@code{@}' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in @code{host@group} form for the host certificate's subject and issuer
+fields. Specifying '@code{-s @group}' is allowed, and results in
+leaving the host name unchanged while appending @code{@group} to the
+subject and issuer fields, as with @code{-i group}. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+@node ntp-keygen trusted-cert
+@subsection trusted-cert option (-T)
+@cindex ntp-keygen-trusted-cert
+
+This is the ``trusted certificate (tc scheme)'' option.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate a trusted certificate. By default, the program generates
+a non-trusted certificate.
+@node ntp-keygen mv-params
+@subsection mv-params option (-V)
+@cindex ntp-keygen-mv-params
+
+This is the ``generate <num> mv parameters'' option.
+This option takes a number argument @file{num}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate parameters and keys for the Mu-Varadharajan (MV)
+identification scheme.
+@node ntp-keygen mv-keys
+@subsection mv-keys option (-v)
+@cindex ntp-keygen-mv-keys
+
+This is the ``update <num> mv keys'' option.
+This option takes a number argument @file{num}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+This option has no @samp{doc} documentation.
+
+
+@node ntp-keygen config
+@subsection presetting/configuring ntp-keygen
+
+Any option that is not marked as @i{not presettable} may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTP-KEYGEN} and @code{NTP-KEYGEN_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
+the options listed above in upper case and segmented with underscores.
+The @code{NTP-KEYGEN} variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+
+@noindent
+@code{libopts} will search in 2 places for configuration files:
+@itemize @bullet
+@item
+$HOME
+@item
+$PWD
+@end itemize
+The environment variables @code{HOME}, and @code{PWD}
+are expanded and replaced when @file{ntp-keygen} runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named @file{.ntprc} is searched for
+within that directory and processed.
+
+Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+@example
+[NTP-KEYGEN]
+@end example
+@noindent
+or by
+@example
+<?program ntp-keygen>
+@end example
+@noindent
+Do not mix these styles within one configuration file.
+
+Compound values and carefully constructed string values may also be
+specified using XML syntax:
+@example
+<option-name>
+ <sub-opt>...&lt;...&gt;...</sub-opt>
+</option-name>
+@end example
+@noindent
+yielding an @code{option-name.sub-opt} string value of
+@example
+"...<...>..."
+@end example
+@code{AutoOpts} does not track suboptions. You simply note that it is a
+hierarchicly valued option. @code{AutoOpts} does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+The command line options relating to configuration and/or usage help are:
+
+@subsubheading version (-)
+
+Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+@table @samp
+@item version
+Only print the version. This is the default.
+@item copyright
+Name the copyright usage licensing terms.
+@item verbose
+Print the full copyright usage licensing terms.
+@end table
+
+@node ntp-keygen exit status
+@subsection ntp-keygen exit status
+
+One of the following exit values will be returned:
+@table @samp
+@item 0 (EXIT_SUCCESS)
+Successful program execution.
+@item 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
+@item 66 (EX_NOINPUT)
+A specified configuration file could not be loaded.
+@item 70 (EX_SOFTWARE)
+libopts had an internal operational error. Please report
+it to autogen-users@@lists.sourceforge.net. Thank you.
+@end table
+@node ntp-keygen Usage
+@subsection ntp-keygen Usage
+@node ntp-keygen Notes
+@subsection ntp-keygen Notes
+@node ntp-keygen Bugs
+@subsection ntp-keygen Bugs
diff --git a/util/jitter.c b/util/jitter.c
index 20c63ad7d01a..62a84ade3d59 100644
--- a/util/jitter.c
+++ b/util/jitter.c
@@ -21,7 +21,6 @@
#define JAN_1970 2208988800UL /* Unix base epoch */
#define CLOCK_GETTIME /* Solaris hires clock */
-int debug;
char progname[10];
double sys_residual;
double average;
diff --git a/util/ntp-keygen-opts.c b/util/ntp-keygen-opts.c
index c60210bae116..9e7de885433f 100644
--- a/util/ntp-keygen-opts.c
+++ b/util/ntp-keygen-opts.c
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:40 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:50:39 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,40 +15,49 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntp-keygen program is copyrighted and licensed
+ * under the following terms:
+ *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
*
- * see html/copyright.html
- *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ntp-keygen-opts.h"
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#define OPTION_CODE_COMPILE 1
-#include "ntp-keygen-opts.h"
#ifdef __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
-
-/* TRANSLATORS: choose the translation for option names wisely because you
- cannot ever change your mind. */
-static char const zCopyright[50] =
-"ntp-keygen (ntp) 4.2.6p5\n\
-see html/copyright.html\n";
-static char const zLicenseDescrip[25] =
-"see html/copyright.html\n";
-
-extern tUsageProc optionUsage;
+#define zCopyright (ntp_keygen_opt_strs+0)
+#define zLicenseDescrip (ntp_keygen_opt_strs+322)
/*
* global included definitions
*/
#include <stdlib.h>
+
#ifdef __windows
extern int atoi(const char*);
#else
@@ -59,682 +68,916 @@ extern tUsageProc optionUsage;
# define NULL 0
#endif
-/*
- * Certificate option description:
- */
-#ifdef OPENSSL
-static char const zCertificateText[] =
- "certificate scheme";
-static char const zCertificate_NAME[] = "CERTIFICATE";
-static char const zCertificate_Name[] = "certificate";
-#define CERTIFICATE_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-
-#else /* disable Certificate */
-#define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zCertificate_NAME NULL
-#define zCertificateText NULL
-#define zCertificate_Name NULL
-#endif /* OPENSSL */
-
-/*
- * Debug_Level option description:
+/**
+ * static const strings for ntp-keygen options
*/
-static char const zDebug_LevelText[] =
- "Increase output debug message level";
-static char const zDebug_Level_NAME[] = "DEBUG_LEVEL";
-static char const zDebug_Level_Name[] = "debug-level";
-#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+static char const ntp_keygen_opt_strs[2357] =
+/* 0 */ "ntp-keygen (ntp) 4.2.8\n"
+ "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+ "This is free software. It is licensed for use, modification and\n"
+ "redistribution under the terms of the NTP License, copies of which\n"
+ "can be seen at:\n"
+ " <http://ntp.org/license>\n"
+ " <http://opensource.org/licenses/ntp-license.php>\n\0"
+/* 322 */ "Permission to use, copy, modify, and distribute this software and its\n"
+ "documentation for any purpose with or without fee is hereby granted,\n"
+ "provided that the above copyright notice appears in all copies and that\n"
+ "both the copyright notice and this permission notice appear in supporting\n"
+ "documentation, and that the name The University of Delaware not be used in\n"
+ "advertising or publicity pertaining to distribution of the software without\n"
+ "specific, written prior permission. The University of Delaware makes no\n"
+ "representations about the suitability this software for any purpose. It is\n"
+ "provided \"as is\" without express or implied warranty.\n\0"
+/* 962 */ "identity modulus bits\0"
+/* 984 */ "IMBITS\0"
+/* 991 */ "imbits\0"
+/* 998 */ "certificate scheme\0"
+/* 1017 */ "CERTIFICATE\0"
+/* 1029 */ "certificate\0"
+/* 1041 */ "privatekey cipher\0"
+/* 1059 */ "CIPHER\0"
+/* 1066 */ "cipher\0"
+/* 1073 */ "Increase debug verbosity level\0"
+/* 1104 */ "DEBUG_LEVEL\0"
+/* 1116 */ "debug-level\0"
+/* 1128 */ "Set the debug verbosity level\0"
+/* 1158 */ "SET_DEBUG_LEVEL\0"
+/* 1174 */ "set-debug-level\0"
+/* 1190 */ "Write IFF or GQ identity keys\0"
+/* 1220 */ "ID_KEY\0"
+/* 1227 */ "id-key\0"
+/* 1234 */ "Generate GQ parameters and keys\0"
+/* 1266 */ "GQ_PARAMS\0"
+/* 1276 */ "gq-params\0"
+/* 1286 */ "generate RSA host key\0"
+/* 1308 */ "HOST_KEY\0"
+/* 1317 */ "host-key\0"
+/* 1326 */ "generate IFF parameters\0"
+/* 1350 */ "IFFKEY\0"
+/* 1357 */ "iffkey\0"
+/* 1364 */ "set Autokey group name\0"
+/* 1387 */ "IDENT\0"
+/* 1393 */ "ident\0"
+/* 1399 */ "set certificate lifetime\0"
+/* 1424 */ "LIFETIME\0"
+/* 1433 */ "lifetime\0"
+/* 1442 */ "generate MD5 keys\0"
+/* 1460 */ "MD5KEY\0"
+/* 1467 */ "md5key\0"
+/* 1474 */ "modulus\0"
+/* 1482 */ "MODULUS\0"
+/* 1490 */ "generate PC private certificate\0"
+/* 1522 */ "PVT_CERT\0"
+/* 1531 */ "pvt-cert\0"
+/* 1540 */ "local private password\0"
+/* 1563 */ "PASSWORD\0"
+/* 1572 */ "password\0"
+/* 1581 */ "export IFF or GQ group keys with password\0"
+/* 1623 */ "EXPORT_PASSWD\0"
+/* 1637 */ "export-passwd\0"
+/* 1651 */ "generate sign key (RSA or DSA)\0"
+/* 1682 */ "SIGN_KEY\0"
+/* 1691 */ "sign-key\0"
+/* 1700 */ "set host and optionally group name\0"
+/* 1735 */ "SUBJECT_NAME\0"
+/* 1748 */ "subject-name\0"
+/* 1761 */ "trusted certificate (TC scheme)\0"
+/* 1793 */ "TRUSTED_CERT\0"
+/* 1806 */ "trusted-cert\0"
+/* 1819 */ "generate <num> MV parameters\0"
+/* 1848 */ "MV_PARAMS\0"
+/* 1858 */ "mv-params\0"
+/* 1868 */ "update <num> MV keys\0"
+/* 1889 */ "MV_KEYS\0"
+/* 1897 */ "mv-keys\0"
+/* 1905 */ "display extended usage information and exit\0"
+/* 1949 */ "help\0"
+/* 1954 */ "extended usage information passed thru pager\0"
+/* 1999 */ "more-help\0"
+/* 2009 */ "output version information and exit\0"
+/* 2045 */ "version\0"
+/* 2053 */ "save the option state to a config file\0"
+/* 2092 */ "save-opts\0"
+/* 2102 */ "load options from a config file\0"
+/* 2134 */ "LOAD_OPTS\0"
+/* 2144 */ "no-load-opts\0"
+/* 2157 */ "no\0"
+/* 2160 */ "NTP_KEYGEN\0"
+/* 2171 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8\n"
+ "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/* 2283 */ "$HOME\0"
+/* 2289 */ ".\0"
+/* 2291 */ ".ntprc\0"
+/* 2298 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2332 */ "\n\0"
+/* 2334 */ "ntp-keygen (ntp) 4.2.8";
+
+/**
+ * imbits option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the imbits option */
+#define IMBITS_DESC (ntp_keygen_opt_strs+962)
+/** Upper-cased name for the imbits option */
+#define IMBITS_NAME (ntp_keygen_opt_strs+984)
+/** Name string for the imbits option */
+#define IMBITS_name (ntp_keygen_opt_strs+991)
+/** Compiled in flag settings for the imbits option */
+#define IMBITS_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Set_Debug_Level option description:
+#else /* disable imbits */
+#define IMBITS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define IMBITS_NAME NULL
+#define IMBITS_DESC NULL
+#define IMBITS_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * certificate option description:
*/
-static char const zSet_Debug_LevelText[] =
- "Set the output debug message level";
-static char const zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
-static char const zSet_Debug_Level_Name[] = "set-debug-level";
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+#ifdef AUTOKEY
+/** Descriptive text for the certificate option */
+#define CERTIFICATE_DESC (ntp_keygen_opt_strs+998)
+/** Upper-cased name for the certificate option */
+#define CERTIFICATE_NAME (ntp_keygen_opt_strs+1017)
+/** Name string for the certificate option */
+#define CERTIFICATE_name (ntp_keygen_opt_strs+1029)
+/** Compiled in flag settings for the certificate option */
+#define CERTIFICATE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Id_Key option description:
- */
-#ifdef OPENSSL
-static char const zId_KeyText[] =
- "Write IFF or GQ identity keys";
-static char const zId_Key_NAME[] = "ID_KEY";
-static char const zId_Key_Name[] = "id-key";
-#define ID_KEY_FLAGS (OPTST_DISABLED)
-
-#else /* disable Id_Key */
-#define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zId_Key_NAME NULL
-#define zId_KeyText NULL
-#define zId_Key_Name NULL
-#endif /* OPENSSL */
+#else /* disable certificate */
+#define CERTIFICATE_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define CERTIFICATE_NAME NULL
+#define CERTIFICATE_DESC NULL
+#define CERTIFICATE_name NULL
+#endif /* AUTOKEY */
-/*
- * Gq_Params option description:
- */
-#ifdef OPENSSL
-static char const zGq_ParamsText[] =
- "Generate GQ parameters and keys";
-static char const zGq_Params_NAME[] = "GQ_PARAMS";
-static char const zGq_Params_Name[] = "gq-params";
-#define GQ_PARAMS_FLAGS (OPTST_DISABLED)
-
-#else /* disable Gq_Params */
-#define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zGq_Params_NAME NULL
-#define zGq_ParamsText NULL
-#define zGq_Params_Name NULL
-#endif /* OPENSSL */
+/**
+ * cipher option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the cipher option */
+#define CIPHER_DESC (ntp_keygen_opt_strs+1041)
+/** Upper-cased name for the cipher option */
+#define CIPHER_NAME (ntp_keygen_opt_strs+1059)
+/** Name string for the cipher option */
+#define CIPHER_name (ntp_keygen_opt_strs+1066)
+/** Compiled in flag settings for the cipher option */
+#define CIPHER_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-/*
- * Host_Key option description:
- */
-#ifdef OPENSSL
-static char const zHost_KeyText[] =
- "generate RSA host key";
-static char const zHost_Key_NAME[] = "HOST_KEY";
-static char const zHost_Key_Name[] = "host-key";
-#define HOST_KEY_FLAGS (OPTST_DISABLED)
-
-#else /* disable Host_Key */
-#define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zHost_Key_NAME NULL
-#define zHost_KeyText NULL
-#define zHost_Key_Name NULL
-#endif /* OPENSSL */
+#else /* disable cipher */
+#define CIPHER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define CIPHER_NAME NULL
+#define CIPHER_DESC NULL
+#define CIPHER_name NULL
+#endif /* AUTOKEY */
-/*
- * Iffkey option description:
- */
-#ifdef OPENSSL
-static char const zIffkeyText[] =
- "generate IFF parameters";
-static char const zIffkey_NAME[] = "IFFKEY";
-static char const zIffkey_Name[] = "iffkey";
-#define IFFKEY_FLAGS (OPTST_DISABLED)
-
-#else /* disable Iffkey */
-#define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zIffkey_NAME NULL
-#define zIffkeyText NULL
-#define zIffkey_Name NULL
-#endif /* OPENSSL */
+/**
+ * debug-level option description:
+ */
+/** Descriptive text for the debug-level option */
+#define DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1073)
+/** Upper-cased name for the debug-level option */
+#define DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1104)
+/** Name string for the debug-level option */
+#define DEBUG_LEVEL_name (ntp_keygen_opt_strs+1116)
+/** Compiled in flag settings for the debug-level option */
+#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
+
+/**
+ * set-debug-level option description:
+ */
+/** Descriptive text for the set-debug-level option */
+#define SET_DEBUG_LEVEL_DESC (ntp_keygen_opt_strs+1128)
+/** Upper-cased name for the set-debug-level option */
+#define SET_DEBUG_LEVEL_NAME (ntp_keygen_opt_strs+1158)
+/** Name string for the set-debug-level option */
+#define SET_DEBUG_LEVEL_name (ntp_keygen_opt_strs+1174)
+/** Compiled in flag settings for the set-debug-level option */
+#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Issuer_Name option description:
- */
-#ifdef OPENSSL
-static char const zIssuer_NameText[] =
- "set issuer name";
-static char const zIssuer_Name_NAME[] = "ISSUER_NAME";
-static char const zIssuer_Name_Name[] = "issuer-name";
-#define ISSUER_NAME_FLAGS (OPTST_DISABLED \
+/**
+ * id-key option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the id-key option */
+#define ID_KEY_DESC (ntp_keygen_opt_strs+1190)
+/** Upper-cased name for the id-key option */
+#define ID_KEY_NAME (ntp_keygen_opt_strs+1220)
+/** Name string for the id-key option */
+#define ID_KEY_name (ntp_keygen_opt_strs+1227)
+/** Compiled in flag settings for the id-key option */
+#define ID_KEY_FLAGS (OPTST_DISABLED)
+
+#else /* disable id-key */
+#define ID_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define ID_KEY_NAME NULL
+#define ID_KEY_DESC NULL
+#define ID_KEY_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * gq-params option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the gq-params option */
+#define GQ_PARAMS_DESC (ntp_keygen_opt_strs+1234)
+/** Upper-cased name for the gq-params option */
+#define GQ_PARAMS_NAME (ntp_keygen_opt_strs+1266)
+/** Name string for the gq-params option */
+#define GQ_PARAMS_name (ntp_keygen_opt_strs+1276)
+/** Compiled in flag settings for the gq-params option */
+#define GQ_PARAMS_FLAGS (OPTST_DISABLED)
+
+#else /* disable gq-params */
+#define GQ_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define GQ_PARAMS_NAME NULL
+#define GQ_PARAMS_DESC NULL
+#define GQ_PARAMS_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * host-key option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the host-key option */
+#define HOST_KEY_DESC (ntp_keygen_opt_strs+1286)
+/** Upper-cased name for the host-key option */
+#define HOST_KEY_NAME (ntp_keygen_opt_strs+1308)
+/** Name string for the host-key option */
+#define HOST_KEY_name (ntp_keygen_opt_strs+1317)
+/** Compiled in flag settings for the host-key option */
+#define HOST_KEY_FLAGS (OPTST_DISABLED)
+
+#else /* disable host-key */
+#define HOST_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define HOST_KEY_NAME NULL
+#define HOST_KEY_DESC NULL
+#define HOST_KEY_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * iffkey option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the iffkey option */
+#define IFFKEY_DESC (ntp_keygen_opt_strs+1326)
+/** Upper-cased name for the iffkey option */
+#define IFFKEY_NAME (ntp_keygen_opt_strs+1350)
+/** Name string for the iffkey option */
+#define IFFKEY_name (ntp_keygen_opt_strs+1357)
+/** Compiled in flag settings for the iffkey option */
+#define IFFKEY_FLAGS (OPTST_DISABLED)
+
+#else /* disable iffkey */
+#define IFFKEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define IFFKEY_NAME NULL
+#define IFFKEY_DESC NULL
+#define IFFKEY_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * ident option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the ident option */
+#define IDENT_DESC (ntp_keygen_opt_strs+1364)
+/** Upper-cased name for the ident option */
+#define IDENT_NAME (ntp_keygen_opt_strs+1387)
+/** Name string for the ident option */
+#define IDENT_name (ntp_keygen_opt_strs+1393)
+/** Compiled in flag settings for the ident option */
+#define IDENT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Issuer_Name */
-#define ISSUER_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zIssuer_Name_NAME NULL
-#define zIssuer_NameText NULL
-#define zIssuer_Name_Name NULL
-#endif /* OPENSSL */
+#else /* disable ident */
+#define IDENT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define IDENT_NAME NULL
+#define IDENT_DESC NULL
+#define IDENT_name NULL
+#endif /* AUTOKEY */
-/*
- * Md5key option description:
+/**
+ * lifetime option description:
*/
-static char const zMd5keyText[] =
- "generate MD5 keys";
-static char const zMd5key_NAME[] = "MD5KEY";
-static char const zMd5key_Name[] = "md5key";
-#define MD5KEY_FLAGS (OPTST_DISABLED)
-
-/*
- * Modulus option description:
- */
-#ifdef OPENSSL
-static char const zModulusText[] =
- "modulus";
-static char const zModulus_NAME[] = "MODULUS";
-static char const zModulus_Name[] = "modulus";
-#define MODULUS_FLAGS (OPTST_DISABLED \
+#ifdef AUTOKEY
+/** Descriptive text for the lifetime option */
+#define LIFETIME_DESC (ntp_keygen_opt_strs+1399)
+/** Upper-cased name for the lifetime option */
+#define LIFETIME_NAME (ntp_keygen_opt_strs+1424)
+/** Name string for the lifetime option */
+#define LIFETIME_name (ntp_keygen_opt_strs+1433)
+/** Compiled in flag settings for the lifetime option */
+#define LIFETIME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-#else /* disable Modulus */
-#define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zModulus_NAME NULL
-#define zModulusText NULL
-#define zModulus_Name NULL
-#endif /* OPENSSL */
+#else /* disable lifetime */
+#define LIFETIME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define LIFETIME_NAME NULL
+#define LIFETIME_DESC NULL
+#define LIFETIME_name NULL
+#endif /* AUTOKEY */
-/*
- * Pvt_Cert option description:
- */
-#ifdef OPENSSL
-static char const zPvt_CertText[] =
- "generate PC private certificate";
-static char const zPvt_Cert_NAME[] = "PVT_CERT";
-static char const zPvt_Cert_Name[] = "pvt-cert";
-#define PVT_CERT_FLAGS (OPTST_DISABLED)
-
-#else /* disable Pvt_Cert */
-#define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zPvt_Cert_NAME NULL
-#define zPvt_CertText NULL
-#define zPvt_Cert_Name NULL
-#endif /* OPENSSL */
+/**
+ * md5key option description:
+ */
+/** Descriptive text for the md5key option */
+#define MD5KEY_DESC (ntp_keygen_opt_strs+1442)
+/** Upper-cased name for the md5key option */
+#define MD5KEY_NAME (ntp_keygen_opt_strs+1460)
+/** Name string for the md5key option */
+#define MD5KEY_name (ntp_keygen_opt_strs+1467)
+/** Compiled in flag settings for the md5key option */
+#define MD5KEY_FLAGS (OPTST_DISABLED)
+
+/**
+ * modulus option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the modulus option */
+#define MODULUS_DESC (ntp_keygen_opt_strs+1474)
+/** Upper-cased name for the modulus option */
+#define MODULUS_NAME (ntp_keygen_opt_strs+1482)
+/** Name string for the modulus option */
+#define MODULUS_name (ntp_keygen_opt_strs+1474)
+/** Compiled in flag settings for the modulus option */
+#define MODULUS_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-/*
- * Pvt_Passwd option description:
- */
-#ifdef OPENSSL
-static char const zPvt_PasswdText[] =
- "output private password";
-static char const zPvt_Passwd_NAME[] = "PVT_PASSWD";
-static char const zPvt_Passwd_Name[] = "pvt-passwd";
-#define PVT_PASSWD_FLAGS (OPTST_DISABLED \
+#else /* disable modulus */
+#define MODULUS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define MODULUS_NAME NULL
+#define MODULUS_DESC NULL
+#define MODULUS_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * pvt-cert option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the pvt-cert option */
+#define PVT_CERT_DESC (ntp_keygen_opt_strs+1490)
+/** Upper-cased name for the pvt-cert option */
+#define PVT_CERT_NAME (ntp_keygen_opt_strs+1522)
+/** Name string for the pvt-cert option */
+#define PVT_CERT_name (ntp_keygen_opt_strs+1531)
+/** Compiled in flag settings for the pvt-cert option */
+#define PVT_CERT_FLAGS (OPTST_DISABLED)
+
+#else /* disable pvt-cert */
+#define PVT_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define PVT_CERT_NAME NULL
+#define PVT_CERT_DESC NULL
+#define PVT_CERT_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * password option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the password option */
+#define PASSWORD_DESC (ntp_keygen_opt_strs+1540)
+/** Upper-cased name for the password option */
+#define PASSWORD_NAME (ntp_keygen_opt_strs+1563)
+/** Name string for the password option */
+#define PASSWORD_name (ntp_keygen_opt_strs+1572)
+/** Compiled in flag settings for the password option */
+#define PASSWORD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Pvt_Passwd */
-#define PVT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zPvt_Passwd_NAME NULL
-#define zPvt_PasswdText NULL
-#define zPvt_Passwd_Name NULL
-#endif /* OPENSSL */
+#else /* disable password */
+#define PASSWORD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define PASSWORD_NAME NULL
+#define PASSWORD_DESC NULL
+#define PASSWORD_name NULL
+#endif /* AUTOKEY */
-/*
- * Get_Pvt_Passwd option description:
- */
-#ifdef OPENSSL
-static char const zGet_Pvt_PasswdText[] =
- "input private password";
-static char const zGet_Pvt_Passwd_NAME[] = "GET_PVT_PASSWD";
-static char const zGet_Pvt_Passwd_Name[] = "get-pvt-passwd";
-#define GET_PVT_PASSWD_FLAGS (OPTST_DISABLED \
+/**
+ * export-passwd option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the export-passwd option */
+#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1581)
+/** Upper-cased name for the export-passwd option */
+#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1623)
+/** Name string for the export-passwd option */
+#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1637)
+/** Compiled in flag settings for the export-passwd option */
+#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Get_Pvt_Passwd */
-#define GET_PVT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zGet_Pvt_Passwd_NAME NULL
-#define zGet_Pvt_PasswdText NULL
-#define zGet_Pvt_Passwd_Name NULL
-#endif /* OPENSSL */
+#else /* disable export-passwd */
+#define EXPORT_PASSWD_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define EXPORT_PASSWD_NAME NULL
+#define EXPORT_PASSWD_DESC NULL
+#define EXPORT_PASSWD_name NULL
+#endif /* AUTOKEY */
-/*
- * Sign_Key option description:
- */
-#ifdef OPENSSL
-static char const zSign_KeyText[] =
- "generate sign key (RSA or DSA)";
-static char const zSign_Key_NAME[] = "SIGN_KEY";
-static char const zSign_Key_Name[] = "sign-key";
-#define SIGN_KEY_FLAGS (OPTST_DISABLED \
+/**
+ * sign-key option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the sign-key option */
+#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1651)
+/** Upper-cased name for the sign-key option */
+#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1682)
+/** Name string for the sign-key option */
+#define SIGN_KEY_name (ntp_keygen_opt_strs+1691)
+/** Compiled in flag settings for the sign-key option */
+#define SIGN_KEY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Sign_Key */
-#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSign_Key_NAME NULL
-#define zSign_KeyText NULL
-#define zSign_Key_Name NULL
-#endif /* OPENSSL */
+#else /* disable sign-key */
+#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define SIGN_KEY_NAME NULL
+#define SIGN_KEY_DESC NULL
+#define SIGN_KEY_name NULL
+#endif /* AUTOKEY */
-/*
- * Subject_Name option description:
- */
-#ifdef OPENSSL
-static char const zSubject_NameText[] =
- "set subject name";
-static char const zSubject_Name_NAME[] = "SUBJECT_NAME";
-static char const zSubject_Name_Name[] = "subject-name";
-#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \
+/**
+ * subject-name option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the subject-name option */
+#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1700)
+/** Upper-cased name for the subject-name option */
+#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1735)
+/** Name string for the subject-name option */
+#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1748)
+/** Compiled in flag settings for the subject-name option */
+#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Subject_Name */
-#define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSubject_Name_NAME NULL
-#define zSubject_NameText NULL
-#define zSubject_Name_Name NULL
-#endif /* OPENSSL */
+#else /* disable subject-name */
+#define SUBJECT_NAME_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define SUBJECT_NAME_NAME NULL
+#define SUBJECT_NAME_DESC NULL
+#define SUBJECT_NAME_name NULL
+#endif /* AUTOKEY */
-/*
- * Trusted_Cert option description:
- */
-#ifdef OPENSSL
-static char const zTrusted_CertText[] =
- "trusted certificate (TC scheme)";
-static char const zTrusted_Cert_NAME[] = "TRUSTED_CERT";
-static char const zTrusted_Cert_Name[] = "trusted-cert";
-#define TRUSTED_CERT_FLAGS (OPTST_DISABLED)
-
-#else /* disable Trusted_Cert */
-#define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zTrusted_Cert_NAME NULL
-#define zTrusted_CertText NULL
-#define zTrusted_Cert_Name NULL
-#endif /* OPENSSL */
-
-/*
- * Mv_Params option description:
- */
-#ifdef OPENSSL
-static char const zMv_ParamsText[] =
- "generate <num> MV parameters";
-static char const zMv_Params_NAME[] = "MV_PARAMS";
-static char const zMv_Params_Name[] = "mv-params";
-#define MV_PARAMS_FLAGS (OPTST_DISABLED \
+/**
+ * trusted-cert option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the trusted-cert option */
+#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1761)
+/** Upper-cased name for the trusted-cert option */
+#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1793)
+/** Name string for the trusted-cert option */
+#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1806)
+/** Compiled in flag settings for the trusted-cert option */
+#define TRUSTED_CERT_FLAGS (OPTST_DISABLED)
+
+#else /* disable trusted-cert */
+#define TRUSTED_CERT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define TRUSTED_CERT_NAME NULL
+#define TRUSTED_CERT_DESC NULL
+#define TRUSTED_CERT_name NULL
+#endif /* AUTOKEY */
+
+/**
+ * mv-params option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the mv-params option */
+#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1819)
+/** Upper-cased name for the mv-params option */
+#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1848)
+/** Name string for the mv-params option */
+#define MV_PARAMS_name (ntp_keygen_opt_strs+1858)
+/** Compiled in flag settings for the mv-params option */
+#define MV_PARAMS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-#else /* disable Mv_Params */
-#define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMv_Params_NAME NULL
-#define zMv_ParamsText NULL
-#define zMv_Params_Name NULL
-#endif /* OPENSSL */
+#else /* disable mv-params */
+#define MV_PARAMS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define MV_PARAMS_NAME NULL
+#define MV_PARAMS_DESC NULL
+#define MV_PARAMS_name NULL
+#endif /* AUTOKEY */
-/*
- * Mv_Keys option description:
- */
-#ifdef OPENSSL
-static char const zMv_KeysText[] =
- "update <num> MV keys";
-static char const zMv_Keys_NAME[] = "MV_KEYS";
-static char const zMv_Keys_Name[] = "mv-keys";
-#define MV_KEYS_FLAGS (OPTST_DISABLED \
+/**
+ * mv-keys option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the mv-keys option */
+#define MV_KEYS_DESC (ntp_keygen_opt_strs+1868)
+/** Upper-cased name for the mv-keys option */
+#define MV_KEYS_NAME (ntp_keygen_opt_strs+1889)
+/** Name string for the mv-keys option */
+#define MV_KEYS_name (ntp_keygen_opt_strs+1897)
+/** Compiled in flag settings for the mv-keys option */
+#define MV_KEYS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
-#else /* disable Mv_Keys */
-#define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMv_Keys_NAME NULL
-#define zMv_KeysText NULL
-#define zMv_Keys_Name NULL
-#endif /* OPENSSL */
+#else /* disable mv-keys */
+#define MV_KEYS_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define MV_KEYS_NAME NULL
+#define MV_KEYS_DESC NULL
+#define MV_KEYS_name NULL
+#endif /* AUTOKEY */
/*
* Help/More_Help/Version option descriptions:
*/
-static char const zHelpText[] = "Display extended usage information and exit";
-static char const zHelp_Name[] = "help";
+#define HELP_DESC (ntp_keygen_opt_strs+1905)
+#define HELP_name (ntp_keygen_opt_strs+1949)
#ifdef HAVE_WORKING_FORK
-#define OPTST_MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
-static char const zMore_Help_Name[] = "more-help";
-static char const zMore_HelpText[] = "Extended usage information passed thru pager";
+#define MORE_HELP_DESC (ntp_keygen_opt_strs+1954)
+#define MORE_HELP_name (ntp_keygen_opt_strs+1999)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-#define OPTST_MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zMore_Help_Name NULL
-#define zMore_HelpText NULL
+#define MORE_HELP_DESC HELP_DESC
+#define MORE_HELP_name HELP_name
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
-# define OPTST_VERSION_FLAGS OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
-# define OPTST_VERSION_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
- OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
+# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+ OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-
-static char const zVersionText[] = "Output version information and exit";
-static char const zVersion_Name[] = "version";
-static char const zSave_OptsText[] = "Save the option state to a config file";
-static char const zSave_Opts_Name[] = "save-opts";
-static char const zLoad_OptsText[] = "Load options from a config file";
-static char const zLoad_Opts_NAME[] = "LOAD_OPTS";
-static char const zNotLoad_Opts_Name[] = "no-load-opts";
-static char const zNotLoad_Opts_Pfx[] = "no";
-#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
-/*
+#define VER_DESC (ntp_keygen_opt_strs+2009)
+#define VER_name (ntp_keygen_opt_strs+2045)
+#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2053)
+#define SAVE_OPTS_name (ntp_keygen_opt_strs+2092)
+#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2102)
+#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2134)
+#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2144)
+#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2157)
+#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
+/**
* Declare option callback procedures
*/
-#ifdef OPENSSL
+#ifdef AUTOKEY
+ static tOptProc doOptImbits;
+#else /* not AUTOKEY */
+# define doOptImbits NULL
+#endif /* def/not AUTOKEY */
+#ifdef AUTOKEY
static tOptProc doOptModulus;
-#else /* not OPENSSL */
+#else /* not AUTOKEY */
# define doOptModulus NULL
-#endif /* def/not OPENSSL */
-#if defined(TEST_NTP_KEYGEN_OPTS)
-/*
- * Under test, omit argument processing, or call optionStackArg,
- * if multiple copies are allowed.
- */
-static tOptProc
- doUsageOpt;
-
-/*
- * #define map the "normal" callout procs to the test ones...
- */
-#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
-
-
-#else /* NOT defined TEST_NTP_KEYGEN_OPTS */
-/*
- * When not under test, there are different procs to use
- */
+#endif /* def/not AUTOKEY */
extern tOptProc
- optionBooleanVal, optionNestedVal, optionNumericVal,
- optionPagedUsage, optionPrintVersion, optionResetOpt,
- optionStackArg, optionTimeDate, optionTimeVal,
- optionUnstackArg, optionVersionStderr;
+ ntpOptionPrintVersion, optionBooleanVal, optionNestedVal,
+ optionNumericVal, optionPagedUsage, optionResetOpt,
+ optionStackArg, optionTimeDate, optionTimeVal,
+ optionUnstackArg, optionVendorOption;
static tOptProc
- doOptSet_Debug_Level, doUsageOpt;
-
-/*
- * #define map the "normal" callout procs
- */
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-
-#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
-#endif /* defined(TEST_NTP_KEYGEN_OPTS) */
-#ifdef TEST_NTP_KEYGEN_OPTS
-# define DOVERPROC optionVersionStderr
-#else
-# define DOVERPROC optionPrintVersion
-#endif /* TEST_NTP_KEYGEN_OPTS */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntp_Keygen Option Descriptions.
+ doOptDebug_Level, doUsageOpt;
+#define VER_PROC ntpOptionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Define the ntp-keygen Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ntp-keygen program responds to.
*/
static tOptDesc optDesc[OPTION_CT] = {
- { /* entry idx, value */ 0, VALUE_OPT_CERTIFICATE,
- /* equiv idx, value */ 0, VALUE_OPT_CERTIFICATE,
+ { /* entry idx, value */ 0, VALUE_OPT_IMBITS,
+ /* equiv idx, value */ 0, VALUE_OPT_IMBITS,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ IMBITS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --imbits */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ doOptImbits,
+ /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE,
+ /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ CERTIFICATE_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --certificate */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zCertificateText, zCertificate_NAME, zCertificate_Name,
+ /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 1, VALUE_OPT_DEBUG_LEVEL,
- /* equiv idx, value */ 1, VALUE_OPT_DEBUG_LEVEL,
+ { /* entry idx, value */ 2, VALUE_OPT_CIPHER,
+ /* equiv idx, value */ 2, VALUE_OPT_CIPHER,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ CIPHER_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --cipher */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
+ /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
+ /* option proc */ doOptDebug_Level,
+ /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 2, VALUE_OPT_SET_DEBUG_LEVEL,
- /* equiv idx, value */ 2, VALUE_OPT_SET_DEBUG_LEVEL,
+ { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
+ /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --set-debug-level */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
- /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 3, VALUE_OPT_ID_KEY,
- /* equiv idx, value */ 3, VALUE_OPT_ID_KEY,
+ { /* entry idx, value */ 5, VALUE_OPT_ID_KEY,
+ /* equiv idx, value */ 5, VALUE_OPT_ID_KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ ID_KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --id-key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zId_KeyText, zId_Key_NAME, zId_Key_Name,
+ /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 4, VALUE_OPT_GQ_PARAMS,
- /* equiv idx, value */ 4, VALUE_OPT_GQ_PARAMS,
+ { /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS,
+ /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ GQ_PARAMS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --gq-params */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zGq_ParamsText, zGq_Params_NAME, zGq_Params_Name,
+ /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 5, VALUE_OPT_HOST_KEY,
- /* equiv idx, value */ 5, VALUE_OPT_HOST_KEY,
+ { /* entry idx, value */ 7, VALUE_OPT_HOST_KEY,
+ /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ HOST_KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --host-key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zHost_KeyText, zHost_Key_NAME, zHost_Key_Name,
+ /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 6, VALUE_OPT_IFFKEY,
- /* equiv idx, value */ 6, VALUE_OPT_IFFKEY,
+ { /* entry idx, value */ 8, VALUE_OPT_IFFKEY,
+ /* equiv idx, value */ 8, VALUE_OPT_IFFKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ IFFKEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --iffkey */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zIffkeyText, zIffkey_NAME, zIffkey_Name,
+ /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 7, VALUE_OPT_ISSUER_NAME,
- /* equiv idx, value */ 7, VALUE_OPT_ISSUER_NAME,
+ { /* entry idx, value */ 9, VALUE_OPT_IDENT,
+ /* equiv idx, value */ 9, VALUE_OPT_IDENT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ ISSUER_NAME_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ IDENT_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --ident */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zIssuer_NameText, zIssuer_Name_NAME, zIssuer_Name_Name,
+ /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 8, VALUE_OPT_MD5KEY,
- /* equiv idx, value */ 8, VALUE_OPT_MD5KEY,
+ { /* entry idx, value */ 10, VALUE_OPT_LIFETIME,
+ /* equiv idx, value */ 10, VALUE_OPT_LIFETIME,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ LIFETIME_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --lifetime */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ optionNumericVal,
+ /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 11, VALUE_OPT_MD5KEY,
+ /* equiv idx, value */ 11, VALUE_OPT_MD5KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MD5KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --md5key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zMd5keyText, zMd5key_NAME, zMd5key_Name,
+ /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 9, VALUE_OPT_MODULUS,
- /* equiv idx, value */ 9, VALUE_OPT_MODULUS,
+ { /* entry idx, value */ 12, VALUE_OPT_MODULUS,
+ /* equiv idx, value */ 12, VALUE_OPT_MODULUS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODULUS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --modulus */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doOptModulus,
- /* desc, NAME, name */ zModulusText, zModulus_NAME, zModulus_Name,
+ /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_PVT_CERT,
- /* equiv idx, value */ 10, VALUE_OPT_PVT_CERT,
+ { /* entry idx, value */ 13, VALUE_OPT_PVT_CERT,
+ /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PVT_CERT_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --pvt-cert */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPvt_CertText, zPvt_Cert_NAME, zPvt_Cert_Name,
+ /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_PVT_PASSWD,
- /* equiv idx, value */ 11, VALUE_OPT_PVT_PASSWD,
+ { /* entry idx, value */ 14, VALUE_OPT_PASSWORD,
+ /* equiv idx, value */ 14, VALUE_OPT_PASSWORD,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ PVT_PASSWD_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ PASSWORD_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --password */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zPvt_PasswdText, zPvt_Passwd_NAME, zPvt_Passwd_Name,
+ /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_GET_PVT_PASSWD,
- /* equiv idx, value */ 12, VALUE_OPT_GET_PVT_PASSWD,
+ { /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
+ /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ GET_PVT_PASSWD_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* opt state flags */ EXPORT_PASSWD_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --export-passwd */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zGet_Pvt_PasswdText, zGet_Pvt_Passwd_NAME, zGet_Pvt_Passwd_Name,
+ /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 13, VALUE_OPT_SIGN_KEY,
- /* equiv idx, value */ 13, VALUE_OPT_SIGN_KEY,
+ { /* entry idx, value */ 16, VALUE_OPT_SIGN_KEY,
+ /* equiv idx, value */ 16, VALUE_OPT_SIGN_KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SIGN_KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --sign-key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSign_KeyText, zSign_Key_NAME, zSign_Key_Name,
+ /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 14, VALUE_OPT_SUBJECT_NAME,
- /* equiv idx, value */ 14, VALUE_OPT_SUBJECT_NAME,
+ { /* entry idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
+ /* equiv idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SUBJECT_NAME_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --subject-name */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSubject_NameText, zSubject_Name_NAME, zSubject_Name_Name,
+ /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 15, VALUE_OPT_TRUSTED_CERT,
- /* equiv idx, value */ 15, VALUE_OPT_TRUSTED_CERT,
+ { /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
+ /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ TRUSTED_CERT_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --trusted-cert */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zTrusted_CertText, zTrusted_Cert_NAME, zTrusted_Cert_Name,
+ /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_MV_PARAMS,
- /* equiv idx, value */ 16, VALUE_OPT_MV_PARAMS,
+ { /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS,
+ /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MV_PARAMS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --mv-params */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionNumericVal,
- /* desc, NAME, name */ zMv_ParamsText, zMv_Params_NAME, zMv_Params_Name,
+ /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_MV_KEYS,
- /* equiv idx, value */ 17, VALUE_OPT_MV_KEYS,
+ { /* entry idx, value */ 20, VALUE_OPT_MV_KEYS,
+ /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MV_KEYS_FLAGS, 0,
- /* last opt argumnt */ { NULL },
+ /* last opt argumnt */ { NULL }, /* --mv-keys */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionNumericVal,
- /* desc, NAME, name */ zMv_KeysText, zMv_Keys_NAME, zMv_Keys_Name,
+ /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_VERSION_FLAGS, 0,
+ /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ DOVERPROC,
- /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
+ /* option proc */ VER_PROC,
+ /* desc, NAME, name */ VER_DESC, NULL, VER_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
+ /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doUsageOpt,
- /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
+ /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ OPTST_MORE_HELP_FLAGS, 0,
+ /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionPagedUsage,
- /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
+ /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
+ | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
+ /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
- /* equiv idx value */ NO_EQUIVALENT, 0,
+ /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
- | OPTST_DISABLE_IMM, 0,
+ | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ optionLoadOpt,
- /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
- /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
+ /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
+ /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * Define the Ntp_Keygen Option Environment
- */
-static char const zPROGNAME[11] = "NTP_KEYGEN";
-static char const zUsageTitle[114] =
-"ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p5\n\
-USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
-static char const zRcName[7] = ".ntprc";
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/** Reference to the upper cased version of ntp-keygen. */
+#define zPROGNAME (ntp_keygen_opt_strs+2160)
+/** Reference to the title line for ntp-keygen usage. */
+#define zUsageTitle (ntp_keygen_opt_strs+2171)
+/** ntp-keygen configuration file name. */
+#define zRcName (ntp_keygen_opt_strs+2291)
+/** Directories to search for ntp-keygen config files. */
static char const * const apzHomeList[3] = {
- "$HOME",
- ".",
+ ntp_keygen_opt_strs+2283,
+ ntp_keygen_opt_strs+2289,
NULL };
-
-static char const zBugsAddr[34] = "http://bugs.ntp.org, bugs@ntp.org";
-#define zExplain NULL
-static char const zDetail[99] = "\n\
-If there is no new host key, look for an existing one. If one is not\n\
-found, create it.\n";
-static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
-/* extracted from optcode.tlib near line 515 */
+/** The ntp-keygen program bug email address. */
+#define zBugsAddr (ntp_keygen_opt_strs+2298)
+/** Clarification/explanation of what ntp-keygen does. */
+#define zExplain (ntp_keygen_opt_strs+2332)
+/** Extra detail explaining what ntp-keygen does. */
+#define zDetail (NULL)
+/** The full version string for ntp-keygen. */
+#define zFullVersion (ntp_keygen_opt_strs+2334)
+/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
# define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -744,16 +987,145 @@ static char const zFullVersion[] = NTP_KEYGEN_FULL_VERSION;
# define translate_option_strings NULL
#endif /* ENABLE_NLS */
+#define ntp_keygen_full_usage (NULL)
+#define ntp_keygen_short_usage (NULL)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ * Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param[in] opts the AutoOpts option description structure
+ * @param[in] od the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * opts, tOptDesc * od)
+{
+ int ex_code;
+ ex_code = NTP_KEYGEN_EXIT_SUCCESS;
+ optionUsage(&ntp_keygenOptions, ex_code);
+ /* NOTREACHED */
+ exit(1);
+ (void)opts;
+ (void)od;
+}
-#define ntp_keygen_full_usage NULL
-#define ntp_keygen_short_usage NULL
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the imbits option, when AUTOKEY is #define-d.
+ * The number of bits in the identity modulus. The default is 256.
+ * @param[in] pOptions the ntp-keygen options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+#ifdef AUTOKEY
+static void
+doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static struct {long rmin, rmax;} const rng[1] = {
+ { 256, 2048 } };
+ int ix;
+
+ if (pOptions <= OPTPROC_EMIT_LIMIT)
+ goto emit_ranges;
+ optionNumericVal(pOptions, pOptDesc);
+
+ for (ix = 0; ix < 1; ix++) {
+ if (pOptDesc->optArg.argInt < rng[ix].rmin)
+ continue; /* ranges need not be ordered. */
+ if (pOptDesc->optArg.argInt == rng[ix].rmin)
+ return;
+ if (rng[ix].rmax == LONG_MIN)
+ continue;
+ if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+ return;
+ }
+
+ option_usage_fp = stderr;
+
+ emit_ranges:
+ optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+#endif /* defined AUTOKEY */
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug-level option.
+ *
+ * @param[in] pOptions the ntp-keygen options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ /*
+ * Be sure the flag-code[0] handles special values for the options pointer
+ * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
+ * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
+ * reset its state.
+ */
+ /* extracted from debug-opt.def, line 15 */
+OPT_VALUE_SET_DEBUG_LEVEL++;
+ (void)pOptDesc;
+ (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the modulus option, when AUTOKEY is #define-d.
+ * The number of bits in the prime modulus. The default is 512.
+ * @param[in] pOptions the ntp-keygen options data structure
+ * @param[in,out] pOptDesc the option descriptor for this option.
+ */
+#ifdef AUTOKEY
+static void
+doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+ static struct {long rmin, rmax;} const rng[1] = {
+ { 256, 2048 } };
+ int ix;
+
+ if (pOptions <= OPTPROC_EMIT_LIMIT)
+ goto emit_ranges;
+ optionNumericVal(pOptions, pOptDesc);
+
+ for (ix = 0; ix < 1; ix++) {
+ if (pOptDesc->optArg.argInt < rng[ix].rmin)
+ continue; /* ranges need not be ordered. */
+ if (pOptDesc->optArg.argInt == rng[ix].rmin)
+ return;
+ if (rng[ix].rmax == LONG_MIN)
+ continue;
+ if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+ return;
+ }
+
+ option_usage_fp = stderr;
+
+ emit_ranges:
+ optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+#endif /* defined AUTOKEY */
+/* extracted from optmain.tlib near line 1245 */
+
+/**
+ * The directory containing the data associated with ntp-keygen.
+ */
#ifndef PKGDATADIR
# define PKGDATADIR ""
#endif
+/**
+ * Information about the person or institution that packaged ntp-keygen
+ * for the current distribution.
+ */
#ifndef WITH_PACKAGER
# define ntp_keygen_packager_info NULL
#else
+/** Packager information for ntp-keygen. */
static char const ntp_keygen_packager_info[] =
"Packaged by " WITH_PACKAGER
@@ -766,7 +1138,13 @@ static char const ntp_keygen_packager_info[] =
# endif
"\n";
#endif
+#ifndef __doxygen__
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ntp-keygen. The one structure that
+ * binds them all.
+ */
tOptions ntp_keygenOptions = {
OPTIONS_STRUCT_VERSION,
0, NULL, /* original argc + argv */
@@ -795,175 +1173,546 @@ tOptions ntp_keygenOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 23 /* full option count */, 18 /* user option count */,
+ 26 /* full option count */, 21 /* user option count */,
ntp_keygen_full_usage, ntp_keygen_short_usage,
NULL, NULL,
PKGDATADIR, ntp_keygen_packager_info
};
-/*
- * Create the static procedure(s) declared above.
- */
-static void
-doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
-{
- (void)pOptions;
- USAGE(NTP_KEYGEN_EXIT_SUCCESS);
-}
-
-#if ! defined(TEST_NTP_KEYGEN_OPTS)
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * For the set-debug-level option.
- */
-static void
-doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- /* extracted from debug-opt.def, line 27 */
-DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
-}
-#endif /* defined(TEST_NTP_KEYGEN_OPTS) */
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- * For the modulus option, when OPENSSL is #define-d.
- */
-#ifdef OPENSSL
-static void
-doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
-{
- static const struct {long const rmin, rmax;} rng[1] = {
- { 256, 2048 } };
- int ix;
-
- if (pOptions <= OPTPROC_EMIT_LIMIT)
- goto emit_ranges;
- optionNumericVal(pOptions, pOptDesc);
-
- for (ix = 0; ix < 1; ix++) {
- if (pOptDesc->optArg.argInt < rng[ix].rmin)
- continue; /* ranges need not be ordered. */
- if (pOptDesc->optArg.argInt == rng[ix].rmin)
- return;
- if (rng[ix].rmax == LONG_MIN)
- continue;
- if (pOptDesc->optArg.argInt <= rng[ix].rmax)
- return;
- }
-
- option_usage_fp = stderr;
-
-emit_ranges:
-
- optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
-}
-#endif /* defined OPENSSL */
-/* extracted from optmain.tlib near line 128 */
-
-#if defined(TEST_NTP_KEYGEN_OPTS) /* TEST MAIN PROCEDURE: */
-
-extern void optionPutShell(tOptions*);
-
-int
-main(int argc, char ** argv)
-{
- int res = NTP_KEYGEN_EXIT_SUCCESS;
- (void)optionProcess(&ntp_keygenOptions, argc, argv);
- optionPutShell(&ntp_keygenOptions);
- res = ferror(stdout);
- if (res != 0)
- fputs("output error writing to stdout\n", stderr);
- return res;
-}
-#endif /* defined TEST_NTP_KEYGEN_OPTS */
-/* extracted from optcode.tlib near line 666 */
-
#if ENABLE_NLS
+/**
+ * This code is designed to translate translatable option text for the
+ * ntp-keygen program. These translations happen upon entry
+ * to optionProcess().
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_DCGETTEXT
+# include <gettext.h>
+#endif
#include <autoopts/usage-txt.h>
-static char* AO_gettext(char const* pz);
-static void coerce_it(void** s);
+static char * AO_gettext(char const * pz);
+static void coerce_it(void ** s);
-static char*
-AO_gettext(char const* pz)
+/**
+ * AutoGen specific wrapper function for gettext. It relies on the macro _()
+ * to convert from English to the target language, then strdup-duplicates the
+ * result string. It tries the "libopts" domain first, then whatever has been
+ * set via the \a textdomain(3) call.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ * or the original text (if not).
+ */
+static char *
+AO_gettext(char const * pz)
{
- char* pzRes;
+ char * res;
if (pz == NULL)
return NULL;
- pzRes = _(pz);
- if (pzRes == pz)
- return pzRes;
- pzRes = strdup(pzRes);
- if (pzRes == NULL) {
+#ifdef HAVE_DCGETTEXT
+ /*
+ * While processing the option_xlateable_txt data, try to use the
+ * "libopts" domain. Once we switch to the option descriptor data,
+ * do *not* use that domain.
+ */
+ if (option_xlateable_txt.field_ct != 0) {
+ res = dgettext("libopts", pz);
+ if (res == pz)
+ res = (char *)(void *)_(pz);
+ } else
+ res = (char *)(void *)_(pz);
+#else
+ res = (char *)(void *)_(pz);
+#endif
+ if (res == pz)
+ return res;
+ res = strdup(res);
+ if (res == NULL) {
fputs(_("No memory for duping translated strings\n"), stderr);
exit(NTP_KEYGEN_EXIT_FAILURE);
}
- return pzRes;
+ return res;
}
-static void coerce_it(void** s) { *s = AO_gettext(*s);
+/**
+ * All the pointers we use are marked "* const", but they are stored in
+ * writable memory. Coerce the mutability and set the pointer.
+ */
+static void coerce_it(void ** s) { *s = AO_gettext(*s);
}
-/*
- * This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the ntp_keygenOptions
+ * structure defined above. This is done only once.
*/
static void
translate_option_strings(void)
{
- tOptions * const pOpt = &ntp_keygenOptions;
+ tOptions * const opts = &ntp_keygenOptions;
/*
* Guard against re-translation. It won't work. The strings will have
* been changed by the first pass through this code. One shot only.
*/
- if (option_usage_text.field_ct != 0) {
+ if (option_xlateable_txt.field_ct != 0) {
/*
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- tOptDesc * pOD = pOpt->pOptDesc;
- char ** ppz = (char**)(void*)&(option_usage_text);
- int ix = option_usage_text.field_ct;
+ char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ int ix = option_xlateable_txt.field_ct;
do {
- ppz++;
+ ppz++; /* skip over field_ct */
*ppz = AO_gettext(*ppz);
} while (--ix > 0);
-
- coerce_it((void*)&(pOpt->pzCopyright));
- coerce_it((void*)&(pOpt->pzCopyNotice));
- coerce_it((void*)&(pOpt->pzFullVersion));
- coerce_it((void*)&(pOpt->pzUsageTitle));
- coerce_it((void*)&(pOpt->pzExplain));
- coerce_it((void*)&(pOpt->pzDetail));
- coerce_it((void*)&(pOpt->pzPackager));
- option_usage_text.field_ct = 0;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
- coerce_it((void*)&(pOD->pzText));
- }
-
- if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
- tOptDesc * pOD = pOpt->pOptDesc;
- int ix;
-
- for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
- coerce_it((void*)&(pOD->pz_Name));
- coerce_it((void*)&(pOD->pz_DisableName));
- coerce_it((void*)&(pOD->pz_DisablePfx));
+ /* prevent re-translation and disable "libopts" domain lookup */
+ option_xlateable_txt.field_ct = 0;
+
+ coerce_it((void*)&(opts->pzCopyright));
+ coerce_it((void*)&(opts->pzCopyNotice));
+ coerce_it((void*)&(opts->pzFullVersion));
+ coerce_it((void*)&(opts->pzUsageTitle));
+ coerce_it((void*)&(opts->pzExplain));
+ coerce_it((void*)&(opts->pzDetail));
+ {
+ tOptDesc * od = opts->pOptDesc;
+ for (ix = opts->optCt; ix > 0; ix--, od++)
+ coerce_it((void*)&(od->pzText));
}
- /* prevent re-translation */
- ntp_keygenOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
}
}
-
#endif /* ENABLE_NLS */
+#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
+/** I18N function strictly for xgettext. Do not compile. */
+static void bogus_function(void) {
+ /* TRANSLATORS:
+
+ The following dummy function was crated solely so that xgettext can
+ extract the correct strings. These strings are actually referenced
+ by a field name in the ntp_keygenOptions structure noted in the
+ comments below. The literal text is defined in ntp_keygen_opt_strs.
+
+ NOTE: the strings below are segmented with respect to the source string
+ ntp_keygen_opt_strs. The strings above are handed off for translation
+ at run time a paragraph at a time. Consequently, they are presented here
+ for translation a paragraph at a time.
+
+ ALSO: often the description for an option will reference another option
+ by name. These are set off with apostrophe quotes (I hope). Do not
+ translate option names.
+ */
+ /* referenced via ntp_keygenOptions.pzCopyright */
+ puts(_("ntp-keygen (ntp) 4.2.8\n\
+Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+This is free software. It is licensed for use, modification and\n\
+redistribution under the terms of the NTP License, copies of which\n\
+can be seen at:\n"));
+ puts(_(" <http://ntp.org/license>\n\
+ <http://opensource.org/licenses/ntp-license.php>\n"));
+
+ /* referenced via ntp_keygenOptions.pzCopyNotice */
+ puts(_("Permission to use, copy, modify, and distribute this software and its\n\
+documentation for any purpose with or without fee is hereby granted,\n\
+provided that the above copyright notice appears in all copies and that\n\
+both the copyright notice and this permission notice appear in supporting\n\
+documentation, and that the name The University of Delaware not be used in\n\
+advertising or publicity pertaining to distribution of the software without\n\
+specific, written prior permission. The University of Delaware makes no\n\
+representations about the suitability this software for any purpose. It is\n\
+provided \"as is\" without express or implied warranty.\n"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("identity modulus bits"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("certificate scheme"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("privatekey cipher"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("Increase debug verbosity level"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("Set the debug verbosity level"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("Write IFF or GQ identity keys"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("Generate GQ parameters and keys"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate RSA host key"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate IFF parameters"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("set Autokey group name"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("set certificate lifetime"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate MD5 keys"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("modulus"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate PC private certificate"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("local private password"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("export IFF or GQ group keys with password"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate sign key (RSA or DSA)"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("set host and optionally group name"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("trusted certificate (TC scheme)"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("generate <num> MV parameters"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("update <num> MV keys"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("display extended usage information and exit"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("extended usage information passed thru pager"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("output version information and exit"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("save the option state to a config file"));
+
+ /* referenced via ntp_keygenOptions.pOptDesc->pzText */
+ puts(_("load options from a config file"));
+
+ /* referenced via ntp_keygenOptions.pzUsageTitle */
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8\n\
+Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
+
+ /* referenced via ntp_keygenOptions.pzExplain */
+ puts(_("\n"));
+
+ /* referenced via ntp_keygenOptions.pzFullVersion */
+ puts(_("ntp-keygen (ntp) 4.2.8"));
+
+ /* referenced via ntp_keygenOptions.pzFullUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+
+ /* referenced via ntp_keygenOptions.pzShortUsage */
+ puts(_("<<<NOT-FOUND>>>"));
+ /* LIBOPTS-MESSAGES: */
+#line 67 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 93 "../autoopts.c"
+ puts(_("allocation of %d bytes failed\n"));
+#line 53 "../init.c"
+ puts(_("AutoOpts function called without option descriptor\n"));
+#line 86 "../init.c"
+ puts(_("\tThis exceeds the compiled library version: "));
+#line 84 "../init.c"
+ puts(_("Automated Options Processing Error!\n"
+ "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
+#line 80 "../autoopts.c"
+ puts(_("realloc of %d bytes at 0x%p failed\n"));
+#line 88 "../init.c"
+ puts(_("\tThis is less than the minimum library version: "));
+#line 121 "../version.c"
+ puts(_("Automated Options version %s\n"
+ "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
+#line 82 "../makeshell.c"
+ puts(_("(AutoOpts bug): %s.\n"));
+#line 90 "../reset.c"
+ puts(_("optionResetOpt() called, but reset-option not configured"));
+#line 292 "../usage.c"
+ puts(_("could not locate the 'help' option"));
+#line 336 "../autoopts.c"
+ puts(_("optionProcess() was called with invalid data"));
+#line 748 "../usage.c"
+ puts(_("invalid argument type specified"));
+#line 598 "../find.c"
+ puts(_("defaulted to option with optional arg"));
+#line 76 "../alias.c"
+ puts(_("aliasing option is out of range."));
+#line 234 "../enum.c"
+ puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
+#line 108 "../find.c"
+ puts(_(" The following options match:\n"));
+#line 293 "../find.c"
+ puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
+#line 161 "../check.c"
+ puts(_("%s: Command line arguments required\n"));
+#line 43 "../alias.c"
+ puts(_("%d %s%s options allowed\n"));
+#line 89 "../makeshell.c"
+ puts(_("%s error %d (%s) calling %s for '%s'\n"));
+#line 301 "../makeshell.c"
+ puts(_("interprocess pipe"));
+#line 168 "../version.c"
+ puts(_("error: version option argument '%c' invalid. Use:\n"
+ "\t'v' - version only\n"
+ "\t'c' - version and copyright\n"
+ "\t'n' - version and full copyright notice\n"));
+#line 58 "../check.c"
+ puts(_("%s error: the '%s' and '%s' options conflict\n"));
+#line 217 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 430 "../find.c"
+ puts(_("%s: The '%s' option has been disabled."));
+#line 38 "../alias.c"
+ puts(_("-equivalence"));
+#line 469 "../find.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 110 "../reset.c"
+ puts(_("%s: illegal option -- %c\n"));
+#line 271 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 755 "../find.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 118 "../reset.c"
+ puts(_("%s: illegal option -- %s\n"));
+#line 335 "../find.c"
+ puts(_("%s: unknown vendor extension option -- %s\n"));
+#line 159 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 169 "../enum.c"
+ puts(_(" or an integer from %d through %d\n"));
+#line 747 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 1081 "../usage.c"
+ puts(_("%s error: invalid option descriptor for %s\n"));
+#line 385 "../find.c"
+ puts(_("%s: invalid option name: %s\n"));
+#line 527 "../find.c"
+ puts(_("%s: The '%s' option requires an argument.\n"));
+#line 156 "../autoopts.c"
+ puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
+ "\t'%s' and '%s'."));
+#line 94 "../check.c"
+ puts(_("%s error: The %s option is required\n"));
+#line 632 "../find.c"
+ puts(_("%s: The '%s' option cannot have an argument.\n"));
+#line 151 "../check.c"
+ puts(_("%s: Command line arguments are not allowed.\n"));
+#line 535 "../save.c"
+ puts(_("error %d (%s) creating %s\n"));
+#line 234 "../enum.c"
+ puts(_("%s error: '%s' does not match any %s keywords.\n"));
+#line 93 "../reset.c"
+ puts(_("%s error: The '%s' option requires an argument.\n"));
+#line 184 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 238 "../save.c"
+ puts(_("error %d (%s) stat-ing %s\n"));
+#line 143 "../restore.c"
+ puts(_("%s error: no saved option state\n"));
+#line 231 "../autoopts.c"
+ puts(_("'%s' is not a command line option.\n"));
+#line 111 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable date/time.\n"));
+#line 132 "../save.c"
+ puts(_("'%s' not defined\n"));
+#line 50 "../time.c"
+ puts(_("%s error: '%s' is not a recognizable time duration.\n"));
+#line 92 "../check.c"
+ puts(_("%s error: The %s option must appear %d times.\n"));
+#line 164 "../numeric.c"
+ puts(_("%s error: '%s' is not a recognizable number.\n"));
+#line 200 "../enum.c"
+ puts(_("%s error: %s exceeds %s keyword count\n"));
+#line 330 "../usage.c"
+ puts(_("Try '%s %s' for more information.\n"));
+#line 45 "../alias.c"
+ puts(_("one %s%s option allowed\n"));
+#line 203 "../makeshell.c"
+ puts(_("standard output"));
+#line 938 "../makeshell.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard output"));
+#line 415 "../usage.c"
+ puts(_("standard output"));
+#line 625 "../usage.c"
+ puts(_("standard output"));
+#line 175 "../version.c"
+ puts(_("standard output"));
+#line 274 "../usage.c"
+ puts(_("standard error"));
+#line 415 "../usage.c"
+ puts(_("standard error"));
+#line 625 "../usage.c"
+ puts(_("standard error"));
+#line 175 "../version.c"
+ puts(_("standard error"));
+#line 203 "../makeshell.c"
+ puts(_("write"));
+#line 938 "../makeshell.c"
+ puts(_("write"));
+#line 273 "../usage.c"
+ puts(_("write"));
+#line 414 "../usage.c"
+ puts(_("write"));
+#line 624 "../usage.c"
+ puts(_("write"));
+#line 174 "../version.c"
+ puts(_("write"));
+#line 60 "../numeric.c"
+ puts(_("%s error: %s option value %ld is out of range.\n"));
+#line 44 "../check.c"
+ puts(_("%s error: %s option requires the %s option\n"));
+#line 131 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 183 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 237 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 256 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+#line 534 "../save.c"
+ puts(_("%s warning: cannot save options - %s not regular file\n"));
+ /* END-LIBOPTS-MESSAGES */
+
+ /* USAGE-TEXT: */
+#line 873 "../usage.c"
+ puts(_("\t\t\t\t- an alternate for '%s'\n"));
+#line 1148 "../usage.c"
+ puts(_("Version, usage and configuration options:"));
+#line 924 "../usage.c"
+ puts(_("\t\t\t\t- default option for unnamed options\n"));
+#line 837 "../usage.c"
+ puts(_("\t\t\t\t- disabled as '--%s'\n"));
+#line 1117 "../usage.c"
+ puts(_(" --- %-14s %s\n"));
+#line 1115 "../usage.c"
+ puts(_("This option has been disabled"));
+#line 864 "../usage.c"
+ puts(_("\t\t\t\t- enabled by default\n"));
+#line 40 "../alias.c"
+ puts(_("%s error: only "));
+#line 1194 "../usage.c"
+ puts(_(" - examining environment variables named %s_*\n"));
+#line 168 "../file.c"
+ puts(_("\t\t\t\t- file must not pre-exist\n"));
+#line 172 "../file.c"
+ puts(_("\t\t\t\t- file must pre-exist\n"));
+#line 380 "../usage.c"
+ puts(_("Options are specified by doubled hyphens and their name or by a single\n"
+ "hyphen and the flag character.\n"));
+#line 916 "../makeshell.c"
+ puts(_("\n"
+ "= = = = = = = =\n\n"
+ "This incarnation of genshell will produce\n"
+ "a shell script to parse the options for %s:\n\n"));
+#line 166 "../enum.c"
+ puts(_(" or an integer mask with any of the lower %d bits set\n"));
+#line 897 "../usage.c"
+ puts(_("\t\t\t\t- is a set membership option\n"));
+#line 918 "../usage.c"
+ puts(_("\t\t\t\t- must appear between %d and %d times\n"));
+#line 382 "../usage.c"
+ puts(_("Options are specified by single or double hyphens and their name.\n"));
+#line 904 "../usage.c"
+ puts(_("\t\t\t\t- may appear multiple times\n"));
+#line 891 "../usage.c"
+ puts(_("\t\t\t\t- may not be preset\n"));
+#line 1309 "../usage.c"
+ puts(_(" Arg Option-Name Description\n"));
+#line 1245 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1303 "../usage.c"
+ puts(_(" Flg Arg Option-Name Description\n"));
+#line 1304 "../usage.c"
+ puts(_(" %3s %s"));
+#line 1310 "../usage.c"
+ puts(_(" %3s %s"));
+#line 387 "../usage.c"
+ puts(_("The '-#<number>' option may omit the hash char\n"));
+#line 383 "../usage.c"
+ puts(_("All arguments are named options.\n"));
+#line 971 "../usage.c"
+ puts(_(" - reading file %s"));
+#line 409 "../usage.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 100 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 129 "../version.c"
+ puts(_("\n"
+ "Please send bug reports to: <%s>\n"));
+#line 903 "../usage.c"
+ puts(_("\t\t\t\t- may NOT appear - preset only\n"));
+#line 944 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 1192 "../usage.c"
+ puts(_("\n"
+ "The following option preset mechanisms are supported:\n"));
+#line 682 "../usage.c"
+ puts(_("prohibits these options:\n"));
+#line 677 "../usage.c"
+ puts(_("prohibits the option '%s'\n"));
+#line 81 "../numeric.c"
+ puts(_("%s%ld to %ld"));
+#line 79 "../numeric.c"
+ puts(_("%sgreater than or equal to %ld"));
+#line 75 "../numeric.c"
+ puts(_("%s%ld exactly"));
+#line 68 "../numeric.c"
+ puts(_("%sit must lie in one of the ranges:\n"));
+#line 68 "../numeric.c"
+ puts(_("%sit must be in the range:\n"));
+#line 88 "../numeric.c"
+ puts(_(", or\n"));
+#line 66 "../numeric.c"
+ puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
+#line 77 "../numeric.c"
+ puts(_("%sless than or equal to %ld"));
+#line 390 "../usage.c"
+ puts(_("Operands and options may be intermixed. They will be reordered.\n"));
+#line 652 "../usage.c"
+ puts(_("requires the option '%s'\n"));
+#line 655 "../usage.c"
+ puts(_("requires these options:\n"));
+#line 1321 "../usage.c"
+ puts(_(" Arg Option-Name Req? Description\n"));
+#line 1315 "../usage.c"
+ puts(_(" Flg Arg Option-Name Req? Description\n"));
+#line 167 "../enum.c"
+ puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
+ "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
+ "will set them all. Multiple entries may be passed as an option\n"
+ "argument list.\n"));
+#line 910 "../usage.c"
+ puts(_("\t\t\t\t- may appear up to %d times\n"));
+#line 77 "../enum.c"
+ puts(_("The valid \"%s\" option keywords are:\n"));
+#line 1152 "../usage.c"
+ puts(_("The next option supports vendor supported extra options:"));
+#line 773 "../usage.c"
+ puts(_("These additional options are:"));
+ /* END-USAGE-TEXT */
+}
+#endif /* uncompilable code */
#ifdef __cplusplus
}
#endif
diff --git a/util/ntp-keygen-opts.def b/util/ntp-keygen-opts.def
index 61cf2721e587..3088cf52804c 100644
--- a/util/ntp-keygen-opts.def
+++ b/util/ntp-keygen-opts.def
@@ -10,17 +10,28 @@ prog-name = "ntp-keygen";
prog-title = "Create a NTP host key";
package = ntp;
-test-main;
-
include = '#include <stdlib.h>';
#include version.def
flag = {
+ value = b;
+ name = imbits;
+ arg-type = number;
+ arg-name = imbits;
+ arg-range = '256->2048';
+ ifdef = AUTOKEY;
+ descrip = "identity modulus bits";
+ doc = <<- _EndOfDoc_
+ The number of bits in the identity modulus. The default is 256.
+ _EndOfDoc_;
+};
+
+flag = {
value = c;
name = certificate;
arg-type = string;
arg-name = scheme;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "certificate scheme";
doc = <<- _EndOfDoc_
scheme is one of
@@ -34,12 +45,27 @@ flag = {
_EndOfDoc_;
};
+flag = {
+ value = C;
+ name = cipher;
+ arg-type = string;
+ arg-name = cipher;
+ ifdef = AUTOKEY;
+ descrip = "privatekey cipher";
+ doc = <<- _EndOfDoc_
+ Select the cipher which is used to encrypt the files containing
+ private keys. The default is three-key triple DES in CBC mode,
+ equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+ available in "@code{openssl -h}" output.
+ _EndOfDoc_;
+};
+
#include debug-opt.def
flag = {
value = e;
name = id-key;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "Write IFF or GQ identity keys";
doc = <<- _EndOfDoc_
Write the IFF or GQ client keys to the standard output. This is
@@ -50,7 +76,7 @@ flag = {
flag = {
value = G;
name = gq-params;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "Generate GQ parameters and keys";
doc = <<- _EndOfDoc_
Generate parameters and keys for the GQ identification scheme,
@@ -61,7 +87,7 @@ flag = {
flag = {
value = H;
name = host-key;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "generate RSA host key";
doc = <<- _EndOfDoc_
Generate new host keys, obsoleting any that may exist.
@@ -71,7 +97,7 @@ flag = {
flag = {
value = I;
name = iffkey;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "generate IFF parameters";
doc = <<- _EndOfDoc_
Generate parameters for the IFF identification scheme, obsoleting
@@ -81,14 +107,33 @@ flag = {
flag = {
value = i;
- name = issuer-name;
- ifdef = OPENSSL;
+ name = ident;
+ ifdef = AUTOKEY;
arg-type = string;
- arg-name = issuer-name;
- descrip = "set issuer name";
+ arg-name = group;
+ descrip = "set Autokey group name";
doc = <<- _EndOfDoc_
- Set the suject name to name. This is used as the subject field
- in certificates and in the file name for host and sign keys.
+ Set the optional Autokey group name to name. This is used in
+ the file name of IFF, GQ, and MV client parameters files. In
+ that role, the default is the host name if this option is not
+ provided. The group name, if specified using @code{-i/--ident} or
+ using @code{-s/--subject-name} following an '@code{@}' character,
+ is also a part of the self-signed host certificate's subject and
+ issuer names in the form @code{host@group} and should match the
+ '@code{crypto ident}' or '@code{server ident}' configuration in
+ @code{ntpd}'s configuration file.
+ _EndOfDoc_;
+};
+
+flag = {
+ value = l;
+ name = lifetime;
+ ifdef = AUTOKEY;
+ arg-type = number;
+ arg-name = lifetime;
+ descrip = "set certificate lifetime";
+ doc = <<- _EndOfDoc_
+ Set the certificate expiration to lifetime days from now.
_EndOfDoc_;
};
@@ -107,7 +152,7 @@ flag = {
arg-type = number;
arg-name = modulus;
arg-range = '256->2048';
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "modulus";
doc = <<- _EndOfDoc_
The number of bits in the prime modulus. The default is 512.
@@ -117,7 +162,7 @@ flag = {
flag = {
value = P;
name = pvt-cert;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "generate PC private certificate";
doc = <<- _EndOfDoc_
Generate a private certificate. By default, the program generates
@@ -127,26 +172,33 @@ flag = {
flag = {
value = p;
- name = pvt-passwd;
- ifdef = OPENSSL;
+ name = password; // was: pvt-passwd;
+ ifdef = AUTOKEY;
arg-type = string;
arg-name = passwd;
- descrip = "output private password";
+ descrip = "local private password";
doc = <<- _EndOfDoc_
- Encrypt generated files containing private data with the specified
- password and the DES-CBC algorithm.
+ Local files containing private data are encrypted with the
+ DES-CBC algorithm and the specified password. The same password
+ must be specified to the local ntpd via the "crypto pw password"
+ configuration command. The default password is the local
+ hostname.
_EndOfDoc_;
};
flag = {
value = q;
- name = get-pvt-passwd;
- ifdef = OPENSSL;
+ name = export-passwd; // Was: get-pvt-passwd;
+ ifdef = AUTOKEY;
arg-type = string;
arg-name = passwd;
- descrip = "input private password";
+ descrip = "export IFF or GQ group keys with password";
doc = <<- _EndOfDoc_
- Set the password for reading files to the specified password.
+ Export IFF or GQ identity group keys to the standard output,
+ encrypted with the DES-CBC algorithm and the specified password.
+ The same password must be specified to the remote ntpd via the
+ "crypto pw password" configuration command. See also the option
+ --id-key (-e) for unencrypted exports.
_EndOfDoc_;
};
@@ -155,7 +207,7 @@ flag = {
name = sign-key;
arg-type = string;
arg-name = sign;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "generate sign key (RSA or DSA)";
doc = <<- _EndOfDoc_
Generate a new sign key of the designated type, obsoleting any
@@ -168,19 +220,27 @@ flag = {
value = s;
name = subject-name;
arg-type = string;
- arg-name = host;
- ifdef = OPENSSL;
- descrip = "set subject name";
+ arg-name = host@group;
+ ifdef = AUTOKEY;
+ descrip = "set host and optionally group name";
doc = <<- _EndOfDoc_
- Set the issuer name to name. This is used for the issuer field
- in certificates and in the file name for identity files.
+ Set the Autokey host name, and optionally, group name specified
+ following an '@code{@}' character. The host name is used in the file
+ name of generated host and signing certificates, without the
+ group name. The host name, and if provided, group name are used
+ in @code{host@group} form for the host certificate's subject and issuer
+ fields. Specifying '@code{-s @group}' is allowed, and results in
+ leaving the host name unchanged while appending @code{@group} to the
+ subject and issuer fields, as with @code{-i group}. The group name, or
+ if not provided, the host name are also used in the file names
+ of IFF, GQ, and MV client parameter files.
_EndOfDoc_;
};
flag = {
value = T;
name = trusted-cert;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "trusted certificate (TC scheme)";
doc = <<- _EndOfDoc_
Generate a trusted certificate. By default, the program generates
@@ -193,7 +253,7 @@ flag = {
name = mv-params;
arg-type = number;
arg-name = num;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "generate <num> MV parameters";
doc = <<- _EndOfDoc_
Generate parameters and keys for the Mu-Varadharajan (MV)
@@ -206,11 +266,879 @@ flag = {
name = mv-keys;
arg-type = number;
arg-name = num;
- ifdef = OPENSSL;
+ ifdef = AUTOKEY;
descrip = "update <num> MV keys";
};
-detail = <<- _EODetail_
- If there is no new host key, look for an existing one.
- If one is not found, create it.
- _EODetail_;
+/* explain: Additional information whenever the usage routine is invoked */
+explain = <<- _END_EXPLAIN
+ _END_EXPLAIN;
+
+doc-section = {
+ ds-type = 'DESCRIPTION';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_PROG_MDOC_DESCRIP
+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.
+.Pp
+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.
+.Pp
+When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+.Pp
+Some files used by this program are encrypted using a private password.
+The
+.Fl p
+option specifies the password for local encrypted files and the
+.Fl q
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+.Fn gethostname
+function, normally the DNS name of the host is used.
+.Pp
+The
+.Ar pw
+option of the
+.Ar crypto
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+.Ar ntpd
+without password but only on the same host.
+.Pp
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+.Ar ntp.keys ,
+is usually installed in
+.Pa /etc .
+Other files and links are usually installed in
+.Pa /usr/local/etc ,
+which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+.Ar keysdir
+configuration command in such cases.
+Normally, this is in
+.Pa /etc .
+.Pp
+This program directs commentary and error messages to the standard
+error stream
+.Ar stderr
+and remote files to the standard output stream
+.Ar stdout
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+.Ar ntpkey
+and include the file type, generating host and filestamp,
+as described in the
+.Dq Cryptographic Data Files
+section below.
+.Ss Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+.Pa /usr/local/etc
+When run for the first time, or if all files with names beginning with
+.Ar ntpkey
+have been removed, use the
+.Nm
+command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+.Nm
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+.Pp
+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.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+.Pp
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public-Key Authentication
+page.
+
+
+.Pp
+The
+.Xr ntpd 1ntpdmdoc
+configuration command
+.Ic crypto pw Ar password
+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.
+
+.Pp
+File names begin with the prefix
+.Cm ntpkey_
+and end with the postfix
+.Ar _hostname.filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+.Ar filestamp
+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
+.Ic rm ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm
+.Ar \&*filestamp
+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.
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd 1ntpdmdoc
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd 1ntpdmdoc
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+seconds.
+seconds.
+
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+.Sx Authentication Options
+section of
+.Xr ntp.conf 5 .
+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
+.Sx Automatic NTP Configuration Options
+section of
+.Xr ntp.conf 5 .
+.Pp
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+.Cm ntpkey
+files.
+Then run
+.Nm
+.Fl T
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+.Fl T
+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.
+.Pp
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+.Nm
+with the
+.Fl S Ar type
+option, where
+.Ar type
+is either
+.Cm RSA
+or
+.Cm DSA .
+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
+.Nm
+with the
+.Fl c Ar scheme
+option and selected
+.Ar scheme
+as needed.
+f
+.Nm
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+.Pp
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+.Nm
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+.Xr ntpd 1ntpdmdoc
+should be restarted.
+When
+.Xr ntpd 1ntpdmdoc
+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.
+.Ss Identity Schemes
+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
+.Qq Identification Schemes
+page
+(maybe available at
+.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+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.
+.Pp
+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.
+.Pp
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+.Nm
+.Fl P
+.Fl p Ar password
+to generate the host key file
+.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+and trusted private certificate file
+.Pa ntpkey_RSA-MD5_cert_ Ns Ar alice.filestamp .
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+.Pa ntpkey_host_ Ns Ar bob
+to the host key file and soft link
+.Pa ntpkey_cert_ Ns Ar bob
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+.Pp
+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 parameter file.
+On trusted host alice run
+.Nm
+.Fl T
+.Fl I
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+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
+.Pa ntpkey_iff_ Ns Ar alice
+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.
+.Pp
+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 alice run
+.Nm
+.Fl e
+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
+.Pa ntpkey_iff_ Ns Ar alice
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+.Pp
+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 alice run
+.Nm
+.Fl T
+.Fl G
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+.Pa ntpkey_gq_ Ns Ar alice
+to this file.
+In addition, on each host bob install a soft link
+from generic
+.Pa ntpkey_gq_ Ns Ar bob
+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.
+.Pp
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+.Nm
+.Fl V Ar n
+.Fl p Ar password ,
+where
+.Ar n
+is the number of revokable keys (typically 5) to produce
+the parameter file
+.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+and client key files
+.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+where
+.Ar d
+is the key number (0 \&<
+.Ar d
+\&<
+.Ar n ) .
+Copy the parameter file to alice and install a soft link
+from the generic
+.Pa ntpkey_mv_ Ns Ar alice
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+.Pa ntpkey_mvkey_ Ns Ar bob
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+.Ss Command Line Options
+.Bl -tag -width indent
+.It Fl c Ar scheme
+Select certificate message digest/signature encryption scheme.
+The
+.Ar scheme
+can be one of the following:
+. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+or
+.Cm DSA-SHA1 .
+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
+.Cm RSA-MD5 .
+.It Fl d
+Enable debugging.
+This option displays the cryptographic data produced in eye-friendly billboards.
+.It Fl e
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+.It Fl G
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.It Fl g
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+.It Fl H
+Generate new host keys, obsoleting any that may exist.
+.It Fl I
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+.It Fl i Ar name
+Set the suject name to
+.Ar name .
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+.It Fl M
+Generate MD5 keys, obsoleting any that may exist.
+.It Fl P
+Generate a private certificate.
+By default, the program generates public certificates.
+.It Fl p Ar password
+Encrypt generated files containing private data with
+.Ar password
+and the DES-CBC algorithm.
+.It Fl q
+Set the password for reading files to password.
+.It Fl S Oo Cm RSA | DSA Oc
+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.
+.It Fl s Ar name
+Set the issuer name to
+.Ar name .
+This is used for the issuer field in certificates
+and in the file name for identity files.
+.It Fl T
+Generate a trusted certificate.
+By default, the program generates a non-trusted certificate.
+.It Fl V Ar nkeys
+Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+.El
+.Ss Random Seed File
+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
+.Nm
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+.Pp
+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.
+.Pp
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+.Cm .rnd ,
+which must be available when starting the NTP daemon
+or the
+.Nm
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+.Ic randfile
+subcommand of the
+.Ic crypto
+configuration command.
+If not specified in this way, or when starting the
+.Nm
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+.Ev RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+.Ev RANDFILE
+environment variable is not present,
+the library will look for the
+.Cm .rnd
+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.
+.Ss Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+.Nm
+program and
+.Xr ntpd 1ntpdmdoc
+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.
+.Pp
+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
+.D1 Ar keyno type key
+where
+.Ar keyno
+is a positive integer in the range 1-65,535,
+.Ar type
+is the string MD5 defining the key format and
+.Ar key
+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
+.Ql #
+character.
+.Pp
+Note that the keys used by the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+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.
+.Pp
+The
+.Nm
+program generates a MD5 symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+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
+.Pa ntp.keys ,
+so
+.Nm
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utilities.
+ _END_PROG_MDOC_DESCRIP;
+};
+
+doc-section = {
+ ds-type = 'USAGE';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_USAGE
+The
+.Fl p Ar password
+option specifies the write password and
+.Fl q Ar password
+option the read password for previously encrypted files.
+The
+.Nm
+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.
+ _END_MDOC_USAGE;
+};
+
+doc-section = {
+ ds-type = 'NOTES';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_NOTES
+Portions of this document came from FreeBSD.
+ _END_MDOC_NOTES;
+};
+
+doc-section = {
+ ds-type = 'BUGS';
+ ds-format = 'mdoc';
+ ds-text = <<- _END_MDOC_BUGS
+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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+ _END_MDOC_BUGS;
+};
diff --git a/util/ntp-keygen-opts.h b/util/ntp-keygen-opts.h
index 4ee5f220f476..c16925055f4c 100644
--- a/util/ntp-keygen-opts.h
+++ b/util/ntp-keygen-opts.h
@@ -1,11 +1,11 @@
-/*
+/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
- *
- * It has been AutoGen-ed December 24, 2011 at 06:34:40 PM by AutoGen 5.12
+ *
+ * It has been AutoGen-ed December 19, 2014 at 07:50:38 AM by AutoGen 5.18.5pre4
* From the definitions ntp-keygen-opts.def
* and the template file options
*
- * Generated from AutoOpts 35:0:10 templates.
+ * Generated from AutoOpts 41:0:16 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -15,12 +15,27 @@
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
* for details.
*
- * This source file is copyrighted and licensed under the following terms:
+ * The ntp-keygen program is copyrighted and licensed
+ * under the following terms:
*
- * see html/copyright.html
- *
+ * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * This is free software. It is licensed for use, modification and
+ * redistribution under the terms of the NTP License, copies of which
+ * can be seen at:
+ * <http://ntp.org/license>
+ * <http://opensource.org/licenses/ntp-license.php>
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose with or 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 The 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.
*/
-/*
+/**
* This file contains the programmatic interface to the Automated
* Options generated for the ntp-keygen program.
* These macros are documented in the AutoGen info file in the
@@ -31,90 +46,121 @@
#include "config.h"
#include <autoopts/options.h>
-/*
+/**
* Ensure that the library used for compiling this generated header is at
* least as new as the version current when the header template was released
* (not counting patch version increments). Also ensure that the oldest
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 143360
+#define AO_TEMPLATE_VERSION 167936
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
Choke Me.
#endif
-/*
- * Enumeration of each option:
+/**
+ * Enumeration of each option type for ntp-keygen
*/
typedef enum {
- INDEX_OPT_CERTIFICATE = 0,
- INDEX_OPT_DEBUG_LEVEL = 1,
- INDEX_OPT_SET_DEBUG_LEVEL = 2,
- INDEX_OPT_ID_KEY = 3,
- INDEX_OPT_GQ_PARAMS = 4,
- INDEX_OPT_HOST_KEY = 5,
- INDEX_OPT_IFFKEY = 6,
- INDEX_OPT_ISSUER_NAME = 7,
- INDEX_OPT_MD5KEY = 8,
- INDEX_OPT_MODULUS = 9,
- INDEX_OPT_PVT_CERT = 10,
- INDEX_OPT_PVT_PASSWD = 11,
- INDEX_OPT_GET_PVT_PASSWD = 12,
- INDEX_OPT_SIGN_KEY = 13,
- INDEX_OPT_SUBJECT_NAME = 14,
- INDEX_OPT_TRUSTED_CERT = 15,
- INDEX_OPT_MV_PARAMS = 16,
- INDEX_OPT_MV_KEYS = 17,
- INDEX_OPT_VERSION = 18,
- INDEX_OPT_HELP = 19,
- INDEX_OPT_MORE_HELP = 20,
- INDEX_OPT_SAVE_OPTS = 21,
- INDEX_OPT_LOAD_OPTS = 22
+ INDEX_OPT_IMBITS = 0,
+ INDEX_OPT_CERTIFICATE = 1,
+ INDEX_OPT_CIPHER = 2,
+ INDEX_OPT_DEBUG_LEVEL = 3,
+ INDEX_OPT_SET_DEBUG_LEVEL = 4,
+ INDEX_OPT_ID_KEY = 5,
+ INDEX_OPT_GQ_PARAMS = 6,
+ INDEX_OPT_HOST_KEY = 7,
+ INDEX_OPT_IFFKEY = 8,
+ INDEX_OPT_IDENT = 9,
+ INDEX_OPT_LIFETIME = 10,
+ INDEX_OPT_MD5KEY = 11,
+ INDEX_OPT_MODULUS = 12,
+ INDEX_OPT_PVT_CERT = 13,
+ INDEX_OPT_PASSWORD = 14,
+ INDEX_OPT_EXPORT_PASSWD = 15,
+ INDEX_OPT_SIGN_KEY = 16,
+ INDEX_OPT_SUBJECT_NAME = 17,
+ INDEX_OPT_TRUSTED_CERT = 18,
+ INDEX_OPT_MV_PARAMS = 19,
+ INDEX_OPT_MV_KEYS = 20,
+ INDEX_OPT_VERSION = 21,
+ INDEX_OPT_HELP = 22,
+ INDEX_OPT_MORE_HELP = 23,
+ INDEX_OPT_SAVE_OPTS = 24,
+ INDEX_OPT_LOAD_OPTS = 25
} teOptIndex;
+/** count of all options for ntp-keygen */
+#define OPTION_CT 26
+/** ntp-keygen version */
+#define NTP_KEYGEN_VERSION "4.2.8"
+/** Full ntp-keygen version text */
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.8"
-#define OPTION_CT 23
-#define NTP_KEYGEN_VERSION "4.2.6p5"
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.2.6p5"
-
-/*
+/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
* option name (as in the teOptIndex enumeration above).
- * e.g. HAVE_OPT(CERTIFICATE)
+ * e.g. HAVE_OPT(IMBITS)
*/
#define DESC(n) (ntp_keygenOptions.pOptDesc[INDEX_OPT_## n])
+/** 'true' if an option has been specified in any way */
#define HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+/** The string argument to an option. The argument type must be \"string\". */
#define OPT_ARG(n) (DESC(n).optArg.argString)
+/** Mask the option state revealing how an option was specified.
+ * It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
+ * \a OPTST_DEFINED, \a OPTST_RESET or zero.
+ */
#define STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+/** Count of option's occurrances *on the command line*. */
#define COUNT_OPT(n) (DESC(n).optOccCt)
+/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
#define ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+/** 'true' if \a HAVE_OPT would yield 'false'. */
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+/** 'true' if OPTST_DISABLED bit not set. */
#define ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+/** number of stacked option arguments.
+ * Valid only for stacked option arguments. */
#define STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+/** stacked argument vector.
+ * Valid only for stacked option arguments. */
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+/** Reset an option. */
#define CLEAR_OPT(n) STMTS( \
DESC(n).fOptState &= OPTST_PERSISTENT_MASK; \
if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
-
-/* * * * * *
- *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
* Enumeration of ntp-keygen exit codes
*/
typedef enum {
- NTP_KEYGEN_EXIT_SUCCESS = 0,
- NTP_KEYGEN_EXIT_FAILURE = 1
-} ntp_keygen_exit_code_t;
-/*
+ NTP_KEYGEN_EXIT_SUCCESS = 0,
+ NTP_KEYGEN_EXIT_FAILURE = 1,
+ NTP_KEYGEN_EXIT_USAGE_ERROR = 64,
+ NTP_KEYGEN_EXIT_NO_CONFIG_INPUT = 66,
+ NTP_KEYGEN_EXIT_LIBOPTS_FAILURE = 70
+} ntp_keygen_exit_code_t;
+/** @} */
+/**
* Make sure there are no #define name conflicts with the option names
*/
#ifndef NO_OPTION_NAME_WARNINGS
+# ifdef IMBITS
+# warning undefining IMBITS due to option name conflict
+# undef IMBITS
+# endif
# ifdef CERTIFICATE
# warning undefining CERTIFICATE due to option name conflict
# undef CERTIFICATE
# endif
+# ifdef CIPHER
+# warning undefining CIPHER due to option name conflict
+# undef CIPHER
+# endif
# ifdef DEBUG_LEVEL
# warning undefining DEBUG_LEVEL due to option name conflict
# undef DEBUG_LEVEL
@@ -139,9 +185,13 @@ typedef enum {
# warning undefining IFFKEY due to option name conflict
# undef IFFKEY
# endif
-# ifdef ISSUER_NAME
-# warning undefining ISSUER_NAME due to option name conflict
-# undef ISSUER_NAME
+# ifdef IDENT
+# warning undefining IDENT due to option name conflict
+# undef IDENT
+# endif
+# ifdef LIFETIME
+# warning undefining LIFETIME due to option name conflict
+# undef LIFETIME
# endif
# ifdef MD5KEY
# warning undefining MD5KEY due to option name conflict
@@ -155,13 +205,13 @@ typedef enum {
# warning undefining PVT_CERT due to option name conflict
# undef PVT_CERT
# endif
-# ifdef PVT_PASSWD
-# warning undefining PVT_PASSWD due to option name conflict
-# undef PVT_PASSWD
+# ifdef PASSWORD
+# warning undefining PASSWORD due to option name conflict
+# undef PASSWORD
# endif
-# ifdef GET_PVT_PASSWD
-# warning undefining GET_PVT_PASSWD due to option name conflict
-# undef GET_PVT_PASSWD
+# ifdef EXPORT_PASSWD
+# warning undefining EXPORT_PASSWD due to option name conflict
+# undef EXPORT_PASSWD
# endif
# ifdef SIGN_KEY
# warning undefining SIGN_KEY due to option name conflict
@@ -184,19 +234,22 @@ typedef enum {
# undef MV_KEYS
# endif
#else /* NO_OPTION_NAME_WARNINGS */
+# undef IMBITS
# undef CERTIFICATE
+# undef CIPHER
# undef DEBUG_LEVEL
# undef SET_DEBUG_LEVEL
# undef ID_KEY
# undef GQ_PARAMS
# undef HOST_KEY
# undef IFFKEY
-# undef ISSUER_NAME
+# undef IDENT
+# undef LIFETIME
# undef MD5KEY
# undef MODULUS
# undef PVT_CERT
-# undef PVT_PASSWD
-# undef GET_PVT_PASSWD
+# undef PASSWORD
+# undef EXPORT_PASSWD
# undef SIGN_KEY
# undef SUBJECT_NAME
# undef TRUSTED_CERT
@@ -204,49 +257,62 @@ typedef enum {
# undef MV_KEYS
#endif /* NO_OPTION_NAME_WARNINGS */
-/* * * * * *
- *
+/**
* Interface defines for specific options.
+ * @{
*/
+#define VALUE_OPT_IMBITS 'b'
+#ifdef AUTOKEY
+#define OPT_VALUE_IMBITS (DESC(IMBITS).optArg.argInt)
+#endif /* AUTOKEY */
#define VALUE_OPT_CERTIFICATE 'c'
+#define VALUE_OPT_CIPHER 'C'
#define VALUE_OPT_DEBUG_LEVEL 'd'
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
+
+#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_ID_KEY 'e'
#define VALUE_OPT_GQ_PARAMS 'G'
#define VALUE_OPT_HOST_KEY 'H'
#define VALUE_OPT_IFFKEY 'I'
-#define VALUE_OPT_ISSUER_NAME 'i'
+#define VALUE_OPT_IDENT 'i'
+#define VALUE_OPT_LIFETIME 'l'
+#ifdef AUTOKEY
+#define OPT_VALUE_LIFETIME (DESC(LIFETIME).optArg.argInt)
+#endif /* AUTOKEY */
#define VALUE_OPT_MD5KEY 'M'
#define VALUE_OPT_MODULUS 'm'
-#ifdef OPENSSL
-
+#ifdef AUTOKEY
#define OPT_VALUE_MODULUS (DESC(MODULUS).optArg.argInt)
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#define VALUE_OPT_PVT_CERT 'P'
-#define VALUE_OPT_PVT_PASSWD 'p'
-#define VALUE_OPT_GET_PVT_PASSWD 'q'
+#define VALUE_OPT_PASSWORD 'p'
+#define VALUE_OPT_EXPORT_PASSWD 'q'
#define VALUE_OPT_SIGN_KEY 'S'
#define VALUE_OPT_SUBJECT_NAME 's'
#define VALUE_OPT_TRUSTED_CERT 'T'
#define VALUE_OPT_MV_PARAMS 'V'
-#ifdef OPENSSL
-
+#ifdef AUTOKEY
#define OPT_VALUE_MV_PARAMS (DESC(MV_PARAMS).optArg.argInt)
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
#define VALUE_OPT_MV_KEYS 'v'
-#ifdef OPENSSL
-
+#ifdef AUTOKEY
#define OPT_VALUE_MV_KEYS (DESC(MV_KEYS).optArg.argInt)
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
+/** option flag (value) for help-value option */
#define VALUE_OPT_HELP '?'
+/** option flag (value) for more-help-value option */
#define VALUE_OPT_MORE_HELP '!'
-#define VALUE_OPT_VERSION INDEX_OPT_VERSION
+/** option flag (value) for version-value option */
+#define VALUE_OPT_VERSION 0x1001
+/** option flag (value) for save-opts-value option */
#define VALUE_OPT_SAVE_OPTS '>'
+/** option flag (value) for load-opts-value option */
#define VALUE_OPT_LOAD_OPTS '<'
#define SET_OPT_SAVE_OPTS(a) STMTS( \
DESC(SAVE_OPTS).fOptState &= OPTST_PERSISTENT_MASK; \
DESC(SAVE_OPTS).fOptState |= OPTST_SET; \
- DESC(SAVE_OPTS).optArg.argString = (char const*)(a) )
+ DESC(SAVE_OPTS).optArg.argString = (char const*)(a))
/*
* Interface defines not associated with particular options
*/
@@ -254,15 +320,15 @@ typedef enum {
#define ERRSTOP_OPTERR STMTS(ntp_keygenOptions.fOptSet |= OPTPROC_ERRSTOP)
#define RESTART_OPT(n) STMTS( \
ntp_keygenOptions.curOptIdx = (n); \
- ntp_keygenOptions.pzCurOpt = NULL)
+ ntp_keygenOptions.pzCurOpt = NULL )
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*ntp_keygenOptions.pUsageProc)(&ntp_keygenOptions, c)
-/* extracted from opthead.tlib near line 451 */
#ifdef __cplusplus
extern "C" {
#endif
+
/* * * * * *
*
* Declare the ntp-keygen option descriptor.
@@ -272,6 +338,17 @@ extern tOptions ntp_keygenOptions;
#if defined(ENABLE_NLS)
# ifndef _
# include <stdio.h>
+# ifndef HAVE_GETTEXT
+ extern char * gettext(char const *);
+# else
+# include <libintl.h>
+# endif
+
+# ifndef ATTRIBUTE_FORMAT_ARG
+# define ATTRIBUTE_FORMAT_ARG(_a)
+# endif
+
+static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
static inline char* aoGetsText(char const* pz) {
if (pz == NULL) return NULL;
return (char*)gettext(pz);
@@ -305,4 +382,5 @@ static inline char* aoGetsText(char const* pz) {
}
#endif
#endif /* AUTOOPTS_NTP_KEYGEN_OPTS_H_GUARD */
+
/* ntp-keygen-opts.h ends here */
diff --git a/util/ntp-keygen-opts.texi b/util/ntp-keygen-opts.texi
deleted file mode 100644
index a907c0e7bde9..000000000000
--- a/util/ntp-keygen-opts.texi
+++ /dev/null
@@ -1,363 +0,0 @@
-@node ntp-keygen Invocation
-@section Invoking ntp-keygen
-@pindex ntp-keygen
-@cindex Create a NTP host key
-@ignore
-#
-# EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.texi)
-#
-# It has been AutoGen-ed December 24, 2011 at 06:34:45 PM by AutoGen 5.12
-# From the definitions ntp-keygen-opts.def
-# and the template file aginfo.tpl
-@end ignore
-This program has no explanation.
-
-If there is no new host key, look for an existing one.
-If one is not found, create it.
-
-This section was generated by @strong{AutoGen},
-the aginfo template and the option descriptions for the @command{ntp-keygen} program. It documents the @command{ntp-keygen} usage text and option meanings.
-
-This software is released under a specialized copyright license.
-
-@menu
-* ntp-keygen usage:: ntp-keygen usage help (-?)
-* ntp-keygen certificate:: certificate option (-c)
-* ntp-keygen debug-level:: debug-level option (-d)
-* ntp-keygen get-pvt-passwd:: get-pvt-passwd option (-q)
-* ntp-keygen gq-params:: gq-params option (-G)
-* ntp-keygen host-key:: host-key option (-H)
-* ntp-keygen id-key:: id-key option (-e)
-* ntp-keygen iffkey:: iffkey option (-I)
-* ntp-keygen issuer-name:: issuer-name option (-i)
-* ntp-keygen md5key:: md5key option (-M)
-* ntp-keygen modulus:: modulus option (-m)
-* ntp-keygen mv-keys:: mv-keys option (-v)
-* ntp-keygen mv-params:: mv-params option (-V)
-* ntp-keygen pvt-cert:: pvt-cert option (-P)
-* ntp-keygen pvt-passwd:: pvt-passwd option (-p)
-* ntp-keygen set-debug-level:: set-debug-level option (-D)
-* ntp-keygen sign-key:: sign-key option (-S)
-* ntp-keygen subject-name:: subject-name option (-s)
-* ntp-keygen trusted-cert:: trusted-cert option (-T)
-@end menu
-
-@node ntp-keygen usage
-@subsection ntp-keygen usage help (-?)
-@cindex ntp-keygen usage
-
-This is the automatically generated usage text for ntp-keygen:
-
-@exampleindent 0
-@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.6p5
-USAGE: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
- Flg Arg Option-Name Description
- -c Str certificate certificate scheme
- -d no debug-level Increase output debug message level
- - may appear multiple times
- -D Str set-debug-level Set the output debug message level
- - may appear multiple times
- -e no id-key Write IFF or GQ identity keys
- -G no gq-params Generate GQ parameters and keys
- -H no host-key generate RSA host key
- -I no iffkey generate IFF parameters
- -i Str issuer-name set issuer name
- -M no md5key generate MD5 keys
- -m Num modulus modulus
- - It must be in the range:
- 256 to 2048
- -P no pvt-cert generate PC private certificate
- -p Str pvt-passwd output private password
- -q Str get-pvt-passwd input private password
- -S Str sign-key generate sign key (RSA or DSA)
- -s Str subject-name set subject name
- -T no trusted-cert trusted certificate (TC scheme)
- -V Num mv-params generate <num> MV parameters
- -v Num mv-keys update <num> MV keys
- opt version Output version information and exit
- -? no help Display extended usage information and exit
- -! no more-help Extended usage information passed thru pager
- -> opt save-opts Save the option state to a config file
- -< Str load-opts Load options from a config file
- - disabled as --no-load-opts
- - may appear multiple times
-
-Options are specified by doubled hyphens and their name or by a single
-hyphen and the flag character.
-
-The following option preset mechanisms are supported:
- - reading file $HOME/.ntprc
- - reading file ./.ntprc
- - examining environment variables named NTP_KEYGEN_*
-
-If there is no new host key, look for an existing one. If one is not
-found, create it.
-
-please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org
-@end example
-@exampleindent 4
-
-@node ntp-keygen certificate
-@subsection certificate option (-c)
-@cindex ntp-keygen-certificate
-
-This is the ``certificate scheme'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
-DSA-SHA, or DSA-SHA1.
-
-Select the 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 RSA-MD5.
-
-@node ntp-keygen debug-level
-@subsection debug-level option (-d)
-@cindex ntp-keygen-debug-level
-
-This is the ``increase output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Increase the debugging message output level.
-
-@node ntp-keygen get-pvt-passwd
-@subsection get-pvt-passwd option (-q)
-@cindex ntp-keygen-get-pvt-passwd
-
-This is the ``input private password'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the password for reading files to the specified password.
-
-@node ntp-keygen gq-params
-@subsection gq-params option (-G)
-@cindex ntp-keygen-gq-params
-
-This is the ``generate gq parameters and keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-
-@node ntp-keygen host-key
-@subsection host-key option (-H)
-@cindex ntp-keygen-host-key
-
-This is the ``generate rsa host key'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate new host keys, obsoleting any that may exist.
-
-@node ntp-keygen id-key
-@subsection id-key option (-e)
-@cindex ntp-keygen-id-key
-
-This is the ``write iff or gq identity keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
-
-@node ntp-keygen iffkey
-@subsection iffkey option (-I)
-@cindex ntp-keygen-iffkey
-
-This is the ``generate iff parameters'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters for the IFF identification scheme, obsoleting
-any that may exist.
-
-@node ntp-keygen issuer-name
-@subsection issuer-name option (-i)
-@cindex ntp-keygen-issuer-name
-
-This is the ``set issuer name'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the suject name to name. This is used as the subject field
-in certificates and in the file name for host and sign keys.
-
-@node ntp-keygen md5key
-@subsection md5key option (-M)
-@cindex ntp-keygen-md5key
-
-This is the ``generate md5 keys'' option.
-Generate MD5 keys, obsoleting any that may exist.
-
-@node ntp-keygen modulus
-@subsection modulus option (-m)
-@cindex ntp-keygen-modulus
-
-This is the ``modulus'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-The number of bits in the prime modulus. The default is 512.
-
-@node ntp-keygen mv-keys
-@subsection mv-keys option (-v)
-@cindex ntp-keygen-mv-keys
-
-This is the ``update <num> mv keys'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-This option has no @samp{doc} documentation.
-
-@node ntp-keygen mv-params
-@subsection mv-params option (-V)
-@cindex ntp-keygen-mv-params
-
-This is the ``generate <num> mv parameters'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate parameters and keys for the Mu-Varadharajan (MV)
-identification scheme.
-
-@node ntp-keygen pvt-cert
-@subsection pvt-cert option (-P)
-@cindex ntp-keygen-pvt-cert
-
-This is the ``generate pc private certificate'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate a private certificate. By default, the program generates
-public certificates.
-
-@node ntp-keygen pvt-passwd
-@subsection pvt-passwd option (-p)
-@cindex ntp-keygen-pvt-passwd
-
-This is the ``output private password'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Encrypt generated files containing private data with the specified
-password and the DES-CBC algorithm.
-
-@node ntp-keygen set-debug-level
-@subsection set-debug-level option (-D)
-@cindex ntp-keygen-set-debug-level
-
-This is the ``set the output debug message level'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-may appear an unlimited number of times.
-@end itemize
-
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-
-@node ntp-keygen sign-key
-@subsection sign-key option (-S)
-@cindex ntp-keygen-sign-key
-
-This is the ``generate sign key (rsa or dsa)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-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.
-
-@node ntp-keygen subject-name
-@subsection subject-name option (-s)
-@cindex ntp-keygen-subject-name
-
-This is the ``set subject name'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Set the issuer name to name. This is used for the issuer field
-in certificates and in the file name for identity files.
-
-@node ntp-keygen trusted-cert
-@subsection trusted-cert option (-T)
-@cindex ntp-keygen-trusted-cert
-
-This is the ``trusted certificate (tc scheme)'' option.
-
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{OPENSSL} during the compilation.
-@end itemize
-
-Generate a trusted certificate. By default, the program generates
-a non-trusted certificate.
diff --git a/util/ntp-keygen.1 b/util/ntp-keygen.1
deleted file mode 100644
index edf4c75ae1f0..000000000000
--- a/util/ntp-keygen.1
+++ /dev/null
@@ -1,190 +0,0 @@
-.TH NTP-KEYGEN 1 2011-12-24 "(ntp 4.2.6p5)" "Programmer's Manual"
-.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
-.\"
-.\" It has been AutoGen-ed December 24, 2011 at 06:34:45 PM by AutoGen 5.12
-.\" From the definitions ntp-keygen-opts.def
-.\" and the template file agman1.tpl
-.\"
-.SH NAME
-ntp-keygen \- Create a NTP host key
-.SH SYNOPSIS
-.B ntp-keygen
-.\" Mixture of short (flag) options and long options
-.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
-.PP
-All arguments must be options.
-.SH "DESCRIPTION"
-This manual page briefly documents the \fBntp-keygen\fP command.
-If there is no new host key, look for an existing one.
-If one is not found, create it.
-.SH OPTIONS
-.TP
-.BR \-c " \fIscheme\fP, " \--certificate "=" \fIscheme\fP
-certificate scheme.
-.sp
-scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
-DSA-SHA, or DSA-SHA1.
-
-Select the 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 RSA-MD5.
-.TP
-.BR \-d ", " \--debug-level
-Increase output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Increase the debugging message output level.
-.TP
-.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
-Set the output debug message level.
-This option may appear an unlimited number of times.
-.sp
-Set the output debugging level. Can be supplied multiple times,
-but each overrides the previous value(s).
-.TP
-.BR \-e ", " \--id-key
-Write IFF or GQ identity keys.
-.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
-.TP
-.BR \-G ", " \--gq-params
-Generate GQ parameters and keys.
-.sp
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-.TP
-.BR \-H ", " \--host-key
-generate RSA host key.
-.sp
-Generate new host keys, obsoleting any that may exist.
-.TP
-.BR \-I ", " \--iffkey
-generate IFF parameters.
-.sp
-Generate parameters for the IFF identification scheme, obsoleting
-any that may exist.
-.TP
-.BR \-i " \fIissuer-name\fP, " \--issuer-name "=" \fIissuer-name\fP
-set issuer name.
-.sp
-Set the suject name to name. This is used as the subject field
-in certificates and in the file name for host and sign keys.
-.TP
-.BR \-M ", " \--md5key
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
-.TP
-.BR \-m " \fImodulus\fP, " \--modulus "=" \fImodulus\fP
-modulus.
-This option takes an integer number as its argument.
-The value of \fImodulus\fP is constrained to being:
-.in +4
-.nf
-.na
-in the range 256 through 2048
-.fi
-.in -4
-.sp
-The number of bits in the prime modulus. The default is 512.
-.TP
-.BR \-P ", " \--pvt-cert
-generate PC private certificate.
-.sp
-Generate a private certificate. By default, the program generates
-public certificates.
-.TP
-.BR \-p " \fIpasswd\fP, " \--pvt-passwd "=" \fIpasswd\fP
-output private password.
-.sp
-Encrypt generated files containing private data with the specified
-password and the DES-CBC algorithm.
-.TP
-.BR \-q " \fIpasswd\fP, " \--get-pvt-passwd "=" \fIpasswd\fP
-input private password.
-.sp
-Set the password for reading files to the specified password.
-.TP
-.BR \-S " \fIsign\fP, " \--sign-key "=" \fIsign\fP
-generate sign key (RSA or DSA).
-.sp
-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.
-.TP
-.BR \-s " \fIhost\fP, " \--subject-name "=" \fIhost\fP
-set subject name.
-.sp
-Set the issuer name to name. This is used for the issuer field
-in certificates and in the file name for identity files.
-.TP
-.BR \-T ", " \--trusted-cert
-trusted certificate (TC scheme).
-.sp
-Generate a trusted certificate. By default, the program generates
-a non-trusted certificate.
-.TP
-.BR \-V " \fInum\fP, " \--mv-params "=" \fInum\fP
-generate <num> MV parameters.
-This option takes an integer number as its argument.
-.sp
-Generate parameters and keys for the Mu-Varadharajan (MV)
-identification scheme.
-.TP
-.BR \-v " \fInum\fP, " \--mv-keys "=" \fInum\fP
-update <num> MV keys.
-This option takes an integer number as its argument.
-.sp
-This option has not been fully documented.
-.TP
-.BR \-? , " \--help"
-Display extended usage information and exit.
-.TP
-.BR \-! , " \--more-help"
-Extended usage information passed thru pager.
-.TP
-.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
-Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
-configuration file listed in the \fBOPTION PRESETS\fP section, below.
-.TP
-.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
-Load options from \fIrcfile\fP.
-The \fIno-load-opts\fP form will disable the loading
-of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
-out of order.
-.TP
-.BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.SH OPTION PRESETS
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from configuration ("RC" or ".INI") file(s) and values from
-environment variables named:
-.nf
- \fBNTP_KEYGEN_<option-name>\fP or \fBNTP_KEYGEN\fP
-.fi
-.ad
-The environmental presets take precedence (are processed later than)
-the configuration files.
-The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
-If any of these are directories, then the file \fI.ntprc\fP
-is searched for within those directories.
-.SH AUTHOR
-David L. Mills and/or others
-.br
-Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
-
-.PP
-.nf
-.na
-see html/copyright.html
-
-.fi
-.ad
-.PP
-This manual page was \fIAutoGen\fP-erated from the \fBntp-keygen\fP
-option definitions.
diff --git a/util/ntp-keygen.1ntp-keygenman b/util/ntp-keygen.1ntp-keygenman
new file mode 100644
index 000000000000..5b076cebe2b1
--- /dev/null
+++ b/util/ntp-keygen.1ntp-keygenman
@@ -0,0 +1,1221 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-keygen 1ntp-keygenman "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6fayVi/ag-hgaqUi)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-keygen-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-keygen\fP
+\- Create a NTP host key
+.SH SYNOPSIS
+\f\*[B-Font]ntp-keygen\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+.sp \n(Ppu
+.ne 2
+
+Some files used by this program are encrypted using a private password.
+The
+\f\*[B-Font]\-p\f[]
+option specifies the password for local encrypted files and the
+\f\*[B-Font]\-q\f[]
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+\fBgethostname\fR()\f[]
+function, normally the DNS name of the host is used.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[I-Font]pw\f[]
+option of the
+\f\*[I-Font]crypto\f[]
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+\f\*[I-Font]ntpd\f[]
+without password but only on the same host.
+.sp \n(Ppu
+.ne 2
+
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+\f\*[I-Font]ntp.keys\f[],
+is usually installed in
+\fI/etc\f[].
+Other files and links are usually installed in
+\fI/usr/local/etc\f[],
+which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+\f\*[I-Font]keysdir\f[]
+configuration command in such cases.
+Normally, this is in
+\fI/etc\f[].
+.sp \n(Ppu
+.ne 2
+
+This program directs commentary and error messages to the standard
+error stream
+\f\*[I-Font]stderr\f[]
+and remote files to the standard output stream
+\f\*[I-Font]stdout\f[]
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+\f\*[I-Font]ntpkey\f[]
+and include the file type, generating host and filestamp,
+as described in the
+\*[Lq]Cryptographic Data Files\*[Rq]
+section below.
+.SS Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+\fI/usr/local/etc\f[]
+When run for the first time, or if all files with names beginning with
+\f\*[I-Font]ntpkey\f[]
+have been removed, use the
+\f\*[B-Font]ntp-keygen\fP
+command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+.sp \n(Ppu
+.ne 2
+
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-T\f[]
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+.sp \n(Ppu
+.ne 2
+
+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.
+A different sign key can be assigned using the
+\f\*[B-Font]\-S\f[]
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+\f\*[B-Font]\-c\f[]
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+.sp \n(Ppu
+.ne 2
+
+Additional information on trusted groups and identity schemes is on the
+\*[Lq]Autokey Public-Key Authentication\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
+The
+\fCntpd\fR(1ntpdmdoc)\f[]
+configuration command
+\f\*[B-Font]crypto\f[] \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+File names begin with the prefix
+\f\*[B-Font]ntpkey_\f[]
+and end with the postfix
+\f\*[I-Font]_hostname.filestamp\f[],
+where
+\f\*[I-Font]hostname\f[]
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+\f\*[I-Font]filestamp\f[]
+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
+\f\*[B-Font]rm\f[] \f\*[B-Font]ntpkey\&*\f[]
+command or all files generated
+at a specific time can be removed by a
+\f\*[B-Font]rm\f[]
+\f\*[I-Font]\&*filestamp\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+All files are installed by default in the keys directory
+\fI/usr/local/etc\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+\fCntpd\fR(1ntpdmdoc)\f[]
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SS Running the program
+The safest way to run the
+\f\*[B-Font]ntp-keygen\fP
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+\fI/usr/local/etc\f[],
+then run the program.
+When run for the first time,
+or if all
+\f\*[B-Font]ntpkey\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Running the program as other than root and using the Unix
+\f\*[B-Font]su\f[]
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+\f\*[B-Font].rnd\f[]
+in the user home directory.
+However, there should be only one
+\f\*[B-Font].rnd\f[],
+most conveniently
+in the root directory, so it is convenient to define the
+\f\*[B-Font]$RANDFILE\f[]
+environment variable used by the OpenSSL library as the path to
+\f\*[B-Font]/.rnd\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+All files are installed by default in the keys directory
+\fI/usr/local/etc\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+\fCntpd\fR(1ntpdmdoc)\f[]
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SS Running the program
+The safest way to run the
+\f\*[B-Font]ntp-keygen\fP
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+\fI/usr/local/etc\f[],
+then run the program.
+When run for the first time,
+or if all
+\f\*[B-Font]ntpkey\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Running the program as other than root and using the Unix
+\f\*[B-Font]su\f[]
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+\f\*[B-Font].rnd\f[]
+in the user home directory.
+However, there should be only one
+\f\*[B-Font].rnd\f[],
+most conveniently
+in the root directory, so it is convenient to define the
+\f\*[B-Font]$RANDFILE\f[]
+environment variable used by the OpenSSL library as the path to
+\f\*[B-Font]/.rnd\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+seconds.
+seconds.
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+\fIAuthentication\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[].
+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
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[].
+.sp \n(Ppu
+.ne 2
+
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+\f\*[B-Font]ntpkey\f[]
+files.
+Then run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+\f\*[B-Font]\-T\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-S\f[] \f\*[I-Font]type\f[]
+option, where
+\f\*[I-Font]type\f[]
+is either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[].
+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
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
+option and selected
+\f\*[I-Font]scheme\f[]
+as needed.
+f
+\f\*[B-Font]ntp-keygen\fP
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+.sp \n(Ppu
+.ne 2
+
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+\f\*[B-Font]ntp-keygen\fP
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+\fCntpd\fR(1ntpdmdoc)\f[]
+should be restarted.
+When
+\fCntpd\fR(1ntpdmdoc)\f[]
+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.
+.SS Identity Schemes
+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
+"Identification Schemes"
+page
+(maybe available at
+\f[C]http://www.eecis.udel.edu/%7emills/keygen.html\f[]).
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-P\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to generate the host key file
+\fIntpkey_RSAkey_\f[]\f\*[I-Font]alice.filestamp\f[]
+and trusted private certificate file
+\fIntpkey_RSA-MD5_cert_\f[]\f\*[I-Font]alice.filestamp\f[].
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+\fIntpkey_host_\f[]\f\*[I-Font]bob\f[]
+to the host key file and soft link
+\fIntpkey_cert_\f[]\f\*[I-Font]bob\f[]
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+.sp \n(Ppu
+.ne 2
+
+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 parameter file.
+On trusted host alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+\f\*[B-Font]\-I\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to produce her parameter file
+\fIntpkey_IFFpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+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
+\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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 alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-e\f[]
+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
+\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+.sp \n(Ppu
+.ne 2
+
+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 alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+\f\*[B-Font]\-G\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to produce her parameter file
+\fIntpkey_GQpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+\fIntpkey_gq_\f[]\f\*[I-Font]alice\f[]
+to this file.
+In addition, on each host bob install a soft link
+from generic
+\fIntpkey_gq_\f[]\f\*[I-Font]bob\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-V\f[] \f\*[I-Font]n\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[],
+where
+\f\*[I-Font]n\f[]
+is the number of revokable keys (typically 5) to produce
+the parameter file
+\fIntpkeys_MVpar_\f[]\f\*[I-Font]trish.filestamp\f[]
+and client key files
+\fIntpkeys_MVkeyd_\f[]\f\*[I-Font]trish.filestamp\f[]
+where
+\f\*[I-Font]d\f[]
+is the key number (0 \&<
+\f\*[I-Font]d\f[]
+\&<
+\f\*[I-Font]n\f[]).
+Copy the parameter file to alice and install a soft link
+from the generic
+\fIntpkey_mv_\f[]\f\*[I-Font]alice\f[]
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+\fIntpkey_mvkey_\f[]\f\*[I-Font]bob\f[]
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+.SS Command Line Options
+.TP 7
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
+Select certificate message digest/signature encryption scheme.
+The
+\f\*[I-Font]scheme\f[]
+can be one of the following:
+. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+or
+\f\*[B-Font]DSA-SHA1\f[].
+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
+\f\*[B-Font]RSA-MD5\f[].
+.TP 7
+.NOP \f\*[B-Font]\-d\f[]
+Enable debugging.
+This option displays the cryptographic data produced in eye-friendly billboards.
+.TP 7
+.NOP \f\*[B-Font]\-e\f[]
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+.TP 7
+.NOP \f\*[B-Font]\-G\f[]
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-g\f[]
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+.TP 7
+.NOP \f\*[B-Font]\-H\f[]
+Generate new host keys, obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-I\f[]
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]name\f[]
+Set the suject name to
+\f\*[I-Font]name\f[].
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+.TP 7
+.NOP \f\*[B-Font]\-M\f[]
+Generate MD5 keys, obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-P\f[]
+Generate a private certificate.
+By default, the program generates public certificates.
+.TP 7
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+Encrypt generated files containing private data with
+\f\*[I-Font]password\f[]
+and the DES-CBC algorithm.
+.TP 7
+.NOP \f\*[B-Font]\-q\f[]
+Set the password for reading files to password.
+.TP 7
+.NOP \f\*[B-Font]\-S\f[] [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]name\f[]
+Set the issuer name to
+\f\*[I-Font]name\f[].
+This is used for the issuer field in certificates
+and in the file name for identity files.
+.TP 7
+.NOP \f\*[B-Font]\-T\f[]
+Generate a trusted certificate.
+By default, the program generates a non-trusted certificate.
+.TP 7
+.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]nkeys\f[]
+Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+.PP
+.SS Random Seed File
+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
+\f\*[B-Font]ntp-keygen\fP
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+\f\*[B-Font].rnd\f[],
+which must be available when starting the NTP daemon
+or the
+\f\*[B-Font]ntp-keygen\fP
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+\f\*[B-Font]randfile\f[]
+subcommand of the
+\f\*[B-Font]crypto\f[]
+configuration command.
+If not specified in this way, or when starting the
+\f\*[B-Font]ntp-keygen\fP
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+RANDFILE
+environment variable is not present,
+the library will look for the
+\f\*[B-Font].rnd\f[]
+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.
+.SS Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+\f\*[B-Font]ntp-keygen\fP
+program and
+\fCntpd\fR(1ntpdmdoc)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+.in +4
+\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
+.in -4
+where
+\f\*[I-Font]keyno\f[]
+is a positive integer in the range 1-65,535,
+\f\*[I-Font]type\f[]
+is the string MD5 defining the key format and
+\f\*[I-Font]key\f[]
+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
+\[oq]#\[cq]
+character.
+.sp \n(Ppu
+.ne 2
+
+Note that the keys used by the
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntp-keygen\fP
+program generates a MD5 symmetric keys file
+\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname.filestamp\f[].
+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
+\fIntp.keys\f[],
+so
+\f\*[B-Font]ntp-keygen\fP
+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
+\fCntpq\fR(1ntpqmdoc)\f[]
+and
+\fCntpdc\fR(1ntpdcmdoc)\f[]
+utilities.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]imbits\f[], \f\*[B-Font]\-\-imbits\f[]=\f\*[I-Font]imbits\f[]
+identity modulus bits.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]imbits\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the identity modulus. The default is 256.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[], \f\*[B-Font]\-\-certificate\f[]=\f\*[I-Font]scheme\f[]
+certificate scheme.
+.sp
+scheme is one of
+RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+DSA-SHA, or DSA-SHA1.
+.sp
+Select the 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 RSA-MD5.
+.TP
+.NOP \f\*[B-Font]\-C\f[] \f\*[I-Font]cipher\f[], \f\*[B-Font]\-\-cipher\f[]=\f\*[I-Font]cipher\f[]
+privatekey cipher.
+.sp
+Select the cipher which is used to encrypt the files containing
+private keys. The default is three-key triple DES in CBC mode,
+equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+available in "\fBopenssl \-h\fP" output.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-id\-key\f[]
+Write IFF or GQ identity keys.
+.sp
+Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-gq\-params\f[]
+Generate GQ parameters and keys.
+.sp
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-host\-key\f[]
+generate RSA host key.
+.sp
+Generate new host keys, obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-I\f[], \f\*[B-Font]\-\-iffkey\f[]
+generate IFF parameters.
+.sp
+Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+.TP
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[], \f\*[B-Font]\-\-ident\f[]=\f\*[I-Font]group\f[]
+set Autokey group name.
+.sp
+Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using \fB-i/--ident\fP or
+using \fB-s/--subject-name\fP following an '\fB@\fP' character,
+is also a part of the self-signed host certificate's subject and
+issuer names in the form \fBhost@group\fP and should match the
+'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
+\fBntpd\fP's configuration file.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]lifetime\f[], \f\*[B-Font]\-\-lifetime\f[]=\f\*[I-Font]lifetime\f[]
+set certificate lifetime.
+This option takes an integer number as its argument.
+.sp
+Set the certificate expiration to lifetime days from now.
+.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
+generate MD5 keys.
+.sp
+Generate MD5 keys, obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]modulus\f[], \f\*[B-Font]\-\-modulus\f[]=\f\*[I-Font]modulus\f[]
+modulus.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]modulus\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the prime modulus. The default is 512.
+.TP
+.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pvt\-cert\f[]
+generate PC private certificate.
+.sp
+Generate a private certificate. By default, the program generates
+public certificates.
+.TP
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-password\f[]=\f\*[I-Font]passwd\f[]
+local private password.
+.sp
+Local files containing private data are encrypted with the
+DES-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+.TP
+.NOP \f\*[B-Font]\-q\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-export\-passwd\f[]=\f\*[I-Font]passwd\f[]
+export IFF or GQ group keys with password.
+.sp
+Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+--id-key (-e) for unencrypted exports.
+.TP
+.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
+generate sign key (RSA or DSA).
+.sp
+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.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]host@group\f[], \f\*[B-Font]\-\-subject\-name\f[]=\f\*[I-Font]host@group\f[]
+set host and optionally group name.
+.sp
+Set the Autokey host name, and optionally, group name specified
+following an '\fB@\fP' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in \fBhost@group\fP form for the host certificate's subject and issuer
+fields. Specifying '\fB-s @group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@group\fP to the
+subject and issuer fields, as with \fB-i group\fP. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+.TP
+.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-trusted\-cert\f[]
+trusted certificate (TC scheme).
+.sp
+Generate a trusted certificate. By default, the program generates
+a non-trusted certificate.
+.TP
+.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-params\f[]=\f\*[I-Font]num\f[]
+generate <num> MV parameters.
+This option takes an integer number as its argument.
+.sp
+Generate parameters and keys for the Mu-Varadharajan (MV)
+identification scheme.
+.TP
+.NOP \f\*[B-Font]\-v\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-keys\f[]=\f\*[I-Font]num\f[]
+update <num> MV keys.
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTP_KEYGEN_<option-name>\fP or \fBNTP_KEYGEN\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+The
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+option specifies the write password and
+\f\*[B-Font]\-q\f[] \f\*[I-Font]password\f[]
+option the read password for previously encrypted files.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+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.
+.sp \n(Ppu
+.ne 2
+
+Please report bugs to http://bugs.ntp.org .
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+Portions of this document came from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-keygen\fP
+option definitions.
diff --git a/util/ntp-keygen.1ntp-keygenmdoc b/util/ntp-keygen.1ntp-keygenmdoc
new file mode 100644
index 000000000000..a3bb102526bd
--- /dev/null
+++ b/util/ntp-keygen.1ntp-keygenmdoc
@@ -0,0 +1,1071 @@
+.Dd December 19 2014
+.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:58 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-keygen-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-keygen
+.Nd Create a NTP host key
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+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.
+.Pp
+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.
+.Pp
+When used to generate message digest keys, the program produces a file
+containing ten pseudo\-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex\-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utility programs.
+.Pp
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+.Pp
+Some files used by this program are encrypted using a private password.
+The
+.Fl p
+option specifies the password for local encrypted files and the
+.Fl q
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+.Fn gethostname
+function, normally the DNS name of the host is used.
+.Pp
+The
+.Ar pw
+option of the
+.Ar crypto
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+.Ar ntpd
+without password but only on the same host.
+.Pp
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+.Ar ntp.keys ,
+is usually installed in
+.Pa /etc .
+Other files and links are usually installed in
+.Pa /usr/local/etc ,
+which is normally in a shared filesystem in
+NFS\-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+.Ar keysdir
+configuration command in such cases.
+Normally, this is in
+.Pa /etc .
+.Pp
+This program directs commentary and error messages to the standard
+error stream
+.Ar stderr
+and remote files to the standard output stream
+.Ar stdout
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+.Ar ntpkey
+and include the file type, generating host and filestamp,
+as described in the
+.Dq Cryptographic Data Files
+section below.
+.Ss Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+.Pa /usr/local/etc
+When run for the first time, or if all files with names beginning with
+.Ar ntpkey
+have been removed, use the
+.Nm
+command without arguments to generate a
+default RSA host key and matching RSA\-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+.Nm
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+.Pp
+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.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken\-and\-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball\-and\-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re\-generated.
+.Pp
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public\-Key Authentication
+page.
+.Pp
+The
+.Xr ntpd 1ntpdmdoc
+configuration command
+.Ic crypto pw Ar password
+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.
+.Pp
+File names begin with the prefix
+.Cm ntpkey_
+and end with the postfix
+.Ar _hostname.filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+.Ar filestamp
+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
+.Ic rm ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm
+.Ar \&*filestamp
+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.
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd 1ntpdmdoc
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd 1ntpdmdoc
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+seconds.
+seconds.
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+.Sx Authentication Options
+section of
+.Xr ntp.conf 5 .
+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
+.Sx Automatic NTP Configuration Options
+section of
+.Xr ntp.conf 5 .
+.Pp
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+.Cm ntpkey
+files.
+Then run
+.Nm
+.Fl T
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+.Fl T
+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.
+.Pp
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+.Nm
+with the
+.Fl S Ar type
+option, where
+.Ar type
+is either
+.Cm RSA
+or
+.Cm DSA .
+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
+.Nm
+with the
+.Fl c Ar scheme
+option and selected
+.Ar scheme
+as needed.
+f
+.Nm
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+.Pp
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+.Nm
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+.Xr ntpd 1ntpdmdoc
+should be restarted.
+When
+.Xr ntpd 1ntpdmdoc
+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.
+.Ss Identity Schemes
+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
+.Qq Identification Schemes
+page
+(maybe available at
+.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+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.
+.Pp
+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.
+.Pp
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+.Nm
+.Fl P
+.Fl p Ar password
+to generate the host key file
+.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+and trusted private certificate file
+.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+.Pa ntpkey_host_ Ns Ar bob
+to the host key file and soft link
+.Pa ntpkey_cert_ Ns Ar bob
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+.Pp
+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 parameter file.
+On trusted host alice run
+.Nm
+.Fl T
+.Fl I
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+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
+.Pa ntpkey_iff_ Ns Ar alice
+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.
+.Pp
+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 alice run
+.Nm
+.Fl e
+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
+.Pa ntpkey_iff_ Ns Ar alice
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+.Pp
+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 alice run
+.Nm
+.Fl T
+.Fl G
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+.Pa ntpkey_gq_ Ns Ar alice
+to this file.
+In addition, on each host bob install a soft link
+from generic
+.Pa ntpkey_gq_ Ns Ar bob
+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.
+.Pp
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+.Nm
+.Fl V Ar n
+.Fl p Ar password ,
+where
+.Ar n
+is the number of revokable keys (typically 5) to produce
+the parameter file
+.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+and client key files
+.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+where
+.Ar d
+is the key number (0 \&<
+.Ar d
+\&<
+.Ar n ) .
+Copy the parameter file to alice and install a soft link
+from the generic
+.Pa ntpkey_mv_ Ns Ar alice
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+.Pa ntpkey_mvkey_ Ns Ar bob
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+.Ss Command Line Options
+.Bl -tag -width indent
+.It Fl c Ar scheme
+Select certificate message digest/signature encryption scheme.
+The
+.Ar scheme
+can be one of the following:
+. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
+or
+.Cm DSA\-SHA1 .
+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
+.Cm RSA\-MD5 .
+.It Fl d
+Enable debugging.
+This option displays the cryptographic data produced in eye\-friendly billboards.
+.It Fl e
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+.It Fl G
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.It Fl g
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+.It Fl H
+Generate new host keys, obsoleting any that may exist.
+.It Fl I
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+.It Fl i Ar name
+Set the suject name to
+.Ar name .
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+.It Fl M
+Generate MD5 keys, obsoleting any that may exist.
+.It Fl P
+Generate a private certificate.
+By default, the program generates public certificates.
+.It Fl p Ar password
+Encrypt generated files containing private data with
+.Ar password
+and the DES\-CBC algorithm.
+.It Fl q
+Set the password for reading files to password.
+.It Fl S Oo Cm RSA | DSA Oc
+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.
+.It Fl s Ar name
+Set the issuer name to
+.Ar name .
+This is used for the issuer field in certificates
+and in the file name for identity files.
+.It Fl T
+Generate a trusted certificate.
+By default, the program generates a non\-trusted certificate.
+.It Fl V Ar nkeys
+Generate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
+.El
+.Ss Random Seed File
+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
+.Nm
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+.Pp
+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.
+.Pp
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+.Cm .rnd ,
+which must be available when starting the NTP daemon
+or the
+.Nm
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+.Ic randfile
+subcommand of the
+.Ic crypto
+configuration command.
+If not specified in this way, or when starting the
+.Nm
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+.Ev RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+.Ev RANDFILE
+environment variable is not present,
+the library will look for the
+.Cm .rnd
+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.
+.Ss Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+.Nm
+program and
+.Xr ntpd 1ntpdmdoc
+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.
+.Pp
+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
+.D1 Ar keyno type key
+where
+.Ar keyno
+is a positive integer in the range 1\-65,535,
+.Ar type
+is the string MD5 defining the key format and
+.Ar key
+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
+.Ql #
+character.
+.Pp
+Note that the keys used by the
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+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.
+.Pp
+The
+.Nm
+program generates a MD5 symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+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
+.Pa ntp.keys ,
+so
+.Nm
+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
+.Xr ntpq 1ntpqmdoc
+and
+.Xr ntpdc 1ntpdcmdoc
+utilities.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl b Ar imbits , Fl \-imbits Ns = Ns Ar imbits
+identity modulus bits.
+This option takes an integer number as its argument.
+The value of
+.Ar imbits
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the identity modulus. The default is 256.
+.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme
+certificate scheme.
+.sp
+scheme is one of
+RSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
+DSA\-SHA, or DSA\-SHA1.
+.sp
+Select the 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 RSA\-MD5.
+.It Fl C Ar cipher , Fl \-cipher Ns = Ns Ar cipher
+privatekey cipher.
+.sp
+Select the cipher which is used to encrypt the files containing
+private keys. The default is three\-key triple DES in CBC mode,
+equivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers
+available in "\fBopenssl \-h\fP" output.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl e , Fl \-id\-key
+Write IFF or GQ identity keys.
+.sp
+Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+.It Fl G , Fl \-gq\-params
+Generate GQ parameters and keys.
+.sp
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.It Fl H , Fl \-host\-key
+generate RSA host key.
+.sp
+Generate new host keys, obsoleting any that may exist.
+.It Fl I , Fl \-iffkey
+generate IFF parameters.
+.sp
+Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+.It Fl i Ar group , Fl \-ident Ns = Ns Ar group
+set Autokey group name.
+.sp
+Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using \fB\-i/\-\-ident\fP or
+using \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
+is also a part of the self\-signed host certificate's subject and
+issuer names in the form \fBhost@group\fP and should match the
+\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
+\fBntpd\fP's configuration file.
+.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime
+set certificate lifetime.
+This option takes an integer number as its argument.
+.sp
+Set the certificate expiration to lifetime days from now.
+.It Fl M , Fl \-md5key
+generate MD5 keys.
+.sp
+Generate MD5 keys, obsoleting any that may exist.
+.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus
+modulus.
+This option takes an integer number as its argument.
+The value of
+.Ar modulus
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the prime modulus. The default is 512.
+.It Fl P , Fl \-pvt\-cert
+generate PC private certificate.
+.sp
+Generate a private certificate. By default, the program generates
+public certificates.
+.It Fl p Ar passwd , Fl \-password Ns = Ns Ar passwd
+local private password.
+.sp
+Local files containing private data are encrypted with the
+DES\-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+.It Fl q Ar passwd , Fl \-export\-passwd Ns = Ns Ar passwd
+export IFF or GQ group keys with password.
+.sp
+Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES\-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+-\-id\-key (\-e) for unencrypted exports.
+.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
+generate sign key (RSA or DSA).
+.sp
+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.
+.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group
+set host and optionally group name.
+.sp
+Set the Autokey host name, and optionally, group name specified
+following an '\fB@\fP' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in \fBhost@group\fP form for the host certificate's subject and issuer
+fields. Specifying '\fB\-s @group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@group\fP to the
+subject and issuer fields, as with \fB\-i group\fP. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+.It Fl T , Fl \-trusted\-cert
+trusted certificate (TC scheme).
+.sp
+Generate a trusted certificate. By default, the program generates
+a non\-trusted certificate.
+.It Fl V Ar num , Fl \-mv\-params Ns = Ns Ar num
+generate <num> MV parameters.
+This option takes an integer number as its argument.
+.sp
+Generate parameters and keys for the Mu\-Varadharajan (MV)
+identification scheme.
+.It Fl v Ar num , Fl \-mv\-keys Ns = Ns Ar num
+update <num> MV keys.
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTP_KEYGEN_<option\-name>\fP or \fBNTP_KEYGEN\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+The
+.Fl p Ar password
+option specifies the write password and
+.Fl q Ar password
+option the read password for previously encrypted files.
+The
+.Nm
+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.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+Portions of this document came from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-keygen\fP
+option definitions.
diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c
index 66d074f3fcfa..6aed1a271a15 100644
--- a/util/ntp-keygen.c
+++ b/util/ntp-keygen.c
@@ -88,12 +88,13 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-#include "ntp_types.h"
+
+#include "ntp.h"
#include "ntp_random.h"
#include "ntp_stdlib.h"
#include "ntp_assert.h"
-
#include "ntp_libopts.h"
+#include "ntp_unixtime.h"
#include "ntp-keygen-opts.h"
#ifdef OPENSSL
@@ -104,7 +105,7 @@
#include "openssl/pem.h"
#include "openssl/x509v3.h"
#include <openssl/objects.h>
-#endif /* OPENSSL */
+#endif /* OPENSSL */
#include <ssl_applink.c>
/*
@@ -112,11 +113,7 @@
*/
#define MD5KEYS 10 /* number of keys generated of each type */
#define MD5SIZE 20 /* maximum key size */
-#define JAN_1970 2208988800UL /* 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
+#ifdef AUTOKEY
#define PLEN 512 /* default prime modulus size (bits) */
#define ILEN 256 /* default identity modulus size (bits) */
#define MVMAX 100 /* max MV parameters */
@@ -128,14 +125,15 @@
#define BASIC_CONSTRAINTS "critical,CA:TRUE"
#define EXT_KEY_PRIVATE "private"
#define EXT_KEY_TRUST "trustRoot"
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Prototypes
*/
FILE *fheader (const char *, const char *, const char *);
int gen_md5 (char *);
-#ifdef OPENSSL
+void followlink (char *, size_t);
+#ifdef AUTOKEY
EVP_PKEY *gen_rsa (char *);
EVP_PKEY *gen_dsa (char *);
EVP_PKEY *gen_iffkey (char *);
@@ -149,52 +147,98 @@ EVP_PKEY *genkey (char *, char *);
EVP_PKEY *readkey (char *, char *, u_int *, EVP_PKEY **);
void writekey (char *, char *, u_int *, EVP_PKEY **);
u_long asn2ntp (ASN1_TIME *);
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
* Program variables
*/
extern char *optarg; /* command line argument */
char *progname;
-volatile int debug = 0; /* debug, not de bug */
-#ifdef OPENSSL
-u_int modulus = PLEN; /* prime modulus size (bits) */
-u_int modulus2 = ILEN; /* identity modulus size (bits) */
-#endif
+u_int lifetime = DAYSPERYEAR; /* certificate lifetime (days) */
int nkeys; /* MV keys */
time_t epoch; /* Unix epoch (seconds) since 1970 */
u_int fstamp; /* NTP filestamp */
-char *hostname = NULL; /* host name (subject name) */
-char *groupname = NULL; /* trusted host name (issuer name) */
-char filename[MAXFILENAME + 1]; /* file name */
+char hostbuf[MAXHOSTNAME + 1];
+char *hostname = NULL; /* host, used in cert filenames */
+char *groupname = NULL; /* group name */
+char certnamebuf[2 * sizeof(hostbuf)];
+char *certname = NULL; /* certificate subject/issuer name */
char *passwd1 = NULL; /* input private key password */
char *passwd2 = NULL; /* output private key password */
-#ifdef OPENSSL
+char filename[MAXFILENAME + 1]; /* file name */
+#ifdef AUTOKEY
+u_int modulus = PLEN; /* prime modulus size (bits) */
+u_int modulus2 = ILEN; /* identity modulus size (bits) */
long d0, d1, d2, d3; /* callback counters */
-#endif /* OPENSSL */
+const EVP_CIPHER * cipher = NULL;
+#endif /* AUTOKEY */
#ifdef SYS_WINNT
BOOL init_randfile();
/*
- * Don't try to follow symbolic links
+ * Don't try to follow symbolic links on Windows. Assume link == file.
*/
int
-readlink(char *link, char *file, int len)
+readlink(
+ char * link,
+ char * file,
+ int len
+ )
{
- return (-1);
+ return strlen(file);
}
/*
- * Don't try to create a symbolic link for now.
- * Just move the file to the name you need.
+ * Don't try to create symbolic links on Windows, that is supported on
+ * Vista and later only. Instead, if CreateHardLink is available (XP
+ * and later), hardlink the linkname to the original filename. On
+ * earlier systems, user must rename file to match expected link for
+ * ntpd to find it. To allow building a ntp-keygen.exe which loads on
+ * Windows pre-XP, runtime link to CreateHardLinkA().
*/
int
-symlink(char *filename, char *linkname) {
- DeleteFile(linkname);
- MoveFile(filename, linkname);
- return (0);
+symlink(
+ char * filename,
+ char* linkname
+ )
+{
+ typedef BOOL (WINAPI *PCREATEHARDLINKA)(
+ __in LPCSTR lpFileName,
+ __in LPCSTR lpExistingFileName,
+ __reserved LPSECURITY_ATTRIBUTES lpSA
+ );
+ static PCREATEHARDLINKA pCreateHardLinkA;
+ static int tried;
+ HMODULE hDll;
+ FARPROC pfn;
+ int link_created;
+ int saved_errno;
+
+ if (!tried) {
+ tried = TRUE;
+ hDll = LoadLibrary("kernel32");
+ pfn = GetProcAddress(hDll, "CreateHardLinkA");
+ pCreateHardLinkA = (PCREATEHARDLINKA)pfn;
+ }
+
+ if (NULL == pCreateHardLinkA) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ link_created = (*pCreateHardLinkA)(linkname, filename, NULL);
+
+ if (link_created)
+ return 0;
+
+ saved_errno = GetLastError(); /* yes we play loose */
+ mfprintf(stderr, "Create hard link %s to %s failed: %m\n",
+ linkname, filename);
+ errno = saved_errno;
+ return -1;
}
+
void
InitWin32Sockets() {
WORD wVersionRequested;
@@ -208,6 +252,33 @@ InitWin32Sockets() {
}
#endif /* SYS_WINNT */
+
+/*
+ * followlink() - replace filename with its target if symlink.
+ *
+ * Some readlink() implementations do not null-terminate the result.
+ */
+void
+followlink(
+ char * fname,
+ size_t bufsiz
+ )
+{
+ int len;
+
+ REQUIRE(bufsiz > 0);
+
+ len = readlink(fname, fname, (int)bufsiz);
+ if (len < 0 ) {
+ fname[0] = '\0';
+ return;
+ }
+ if (len > (int)bufsiz - 1)
+ len = (int)bufsiz - 1;
+ fname[len] = '\0';
+}
+
+
/*
* Main program
*/
@@ -219,7 +290,8 @@ main(
{
struct timeval tv; /* initialization vector */
int md5key = 0; /* generate MD5 keys */
-#ifdef OPENSSL
+ int optct; /* option count */
+#ifdef AUTOKEY
X509 *cert = NULL; /* X509 certificate */
X509_EXTENSION *ext; /* X509v3 extension */
EVP_PKEY *pkey_host = NULL; /* host key */
@@ -238,14 +310,17 @@ main(
const EVP_MD *ectx; /* EVP digest */
char pathbuf[MAXFILENAME + 1];
const char *scheme = NULL; /* digest/signature scheme */
+ const char *ciphername = NULL; /* to encrypt priv. key */
char *exten = NULL; /* private extension */
char *grpkey = NULL; /* identity extension */
int nid; /* X509 digest/signature scheme */
FILE *fstr = NULL; /* file handle */
-#define iffsw HAVE_OPT(ID_KEY)
-#endif /* OPENSSL */
- char hostbuf[MAXHOSTNAME + 1];
char groupbuf[MAXHOSTNAME + 1];
+ u_int temp;
+ BIO * bp;
+ int i, cnt;
+ char * ptr;
+#endif /* AUTOKEY */
progname = argv[0];
@@ -259,23 +334,28 @@ main(
#ifdef OPENSSL
ssl_check_version();
-#endif /* OPENSSL */
+#endif /* OPENSSL */
+
+ ntp_crypto_srandom();
/*
* Process options, initialize host name and timestamp.
+ * gethostname() won't null-terminate if hostname is exactly the
+ * length provided for the buffer.
*/
- gethostname(hostbuf, MAXHOSTNAME);
+ gethostname(hostbuf, sizeof(hostbuf) - 1);
+ hostbuf[COUNTOF(hostbuf) - 1] = '\0';
hostname = hostbuf;
- gettimeofday(&tv, 0);
-
+ groupname = hostbuf;
+ passwd1 = hostbuf;
+ passwd2 = NULL;
+ GETTIMEOFDAY(&tv, NULL);
epoch = tv.tv_sec;
+ fstamp = (u_int)(epoch + JAN_1970);
- {
- int optct = ntpOptionProcess(&ntp_keygenOptions,
- argc, argv);
- argc -= optct;
- argv += optct;
- }
+ optct = ntpOptionProcess(&ntp_keygenOptions, argc, argv);
+ argc -= optct;
+ argv += optct;
#ifdef OPENSSL
if (SSLeay() == SSLEAY_VERSION_NUMBER)
@@ -286,23 +366,22 @@ main(
OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
#endif /* OPENSSL */
- debug = DESC(DEBUG_LEVEL).optOccCt;
+ debug = OPT_VALUE_SET_DEBUG_LEVEL;
+
if (HAVE_OPT( MD5KEY ))
md5key++;
+#ifdef AUTOKEY
+ if (HAVE_OPT( PASSWORD ))
+ passwd1 = estrdup(OPT_ARG( PASSWORD ));
-#ifdef OPENSSL
- passwd1 = hostbuf;
- if (HAVE_OPT( PVT_PASSWD ))
- passwd1 = strdup(OPT_ARG( PVT_PASSWD ));
-
- if (HAVE_OPT( GET_PVT_PASSWD ))
- passwd2 = strdup(OPT_ARG( GET_PVT_PASSWD ));
+ if (HAVE_OPT( EXPORT_PASSWD ))
+ passwd2 = estrdup(OPT_ARG( EXPORT_PASSWD ));
if (HAVE_OPT( HOST_KEY ))
hostkey++;
if (HAVE_OPT( SIGN_KEY ))
- sign = strdup(OPT_ARG( SIGN_KEY ));
+ sign = estrdup(OPT_ARG( SIGN_KEY ));
if (HAVE_OPT( GQ_PARAMS ))
gqkey++;
@@ -318,17 +397,27 @@ main(
mvpar++;
nkeys = OPT_VALUE_MV_KEYS;
}
+
+ if (HAVE_OPT( IMBITS ))
+ modulus2 = OPT_VALUE_IMBITS;
+
if (HAVE_OPT( MODULUS ))
modulus = OPT_VALUE_MODULUS;
if (HAVE_OPT( CERTIFICATE ))
scheme = OPT_ARG( CERTIFICATE );
+ if (HAVE_OPT( CIPHER ))
+ ciphername = OPT_ARG( CIPHER );
+
if (HAVE_OPT( SUBJECT_NAME ))
- hostname = strdup(OPT_ARG( SUBJECT_NAME ));
+ hostname = estrdup(OPT_ARG( SUBJECT_NAME ));
- if (HAVE_OPT( ISSUER_NAME ))
- groupname = strdup(OPT_ARG( ISSUER_NAME ));
+ if (HAVE_OPT( IDENT ))
+ groupname = estrdup(OPT_ARG( IDENT ));
+
+ if (HAVE_OPT( LIFETIME ))
+ lifetime = OPT_VALUE_LIFETIME;
if (HAVE_OPT( PVT_CERT ))
exten = EXT_KEY_PRIVATE;
@@ -337,14 +426,43 @@ main(
exten = EXT_KEY_TRUST;
/*
+ * Remove the group name from the hostname variable used
+ * in host and sign certificate file names.
+ */
+ if (hostname != hostbuf)
+ ptr = strchr(hostname, '@');
+ else
+ ptr = NULL;
+ if (ptr != NULL) {
+ *ptr = '\0';
+ groupname = estrdup(ptr + 1);
+ /* -s @group is equivalent to -i group, host unch. */
+ if (ptr == hostname)
+ hostname = hostbuf;
+ }
+
+ /*
+ * Derive host certificate issuer/subject names from host name
+ * and optional group. If no groupname is provided, the issuer
+ * and subject is the hostname with no '@group', and the
+ * groupname variable is pointed to hostname for use in IFF, GQ,
+ * and MV parameters file names.
+ */
+ if (groupname == hostbuf) {
+ certname = hostname;
+ } else {
+ snprintf(certnamebuf, sizeof(certnamebuf), "%s@%s",
+ hostname, groupname);
+ certname = certnamebuf;
+ }
+
+ /*
* Seed random number generator and grow weeds.
*/
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
if (!RAND_status()) {
- u_int temp;
-
- if (RAND_file_name(pathbuf, MAXFILENAME) == NULL) {
+ if (RAND_file_name(pathbuf, sizeof(pathbuf)) == NULL) {
fprintf(stderr, "RAND_file_name %s\n",
ERR_error_string(ERR_get_error(), NULL));
exit (-1);
@@ -360,11 +478,22 @@ main(
"Random seed file %s %u bytes\n", pathbuf, temp);
RAND_add(&epoch, sizeof(epoch), 4.0);
}
+#endif /* AUTOKEY */
/*
+ * Create new unencrypted MD5 keys file if requested. If this
+ * option is selected, ignore all other options.
+ */
+ if (md5key) {
+ gen_md5("md5");
+ exit (0);
+ }
+
+#ifdef AUTOKEY
+ /*
* Load previous certificate if available.
*/
- sprintf(filename, "ntpkey_cert_%s", hostname);
+ snprintf(filename, sizeof(filename), "ntpkey_cert_%s", hostname);
if ((fstr = fopen(filename, "r")) != NULL) {
cert = PEM_read_X509(fstr, NULL, NULL, NULL);
fclose(fstr);
@@ -391,10 +520,6 @@ main(
* whether this is a trusted or private certificate.
*/
if (exten == NULL) {
- BIO *bp;
- int i, cnt;
- char *ptr;
-
ptr = strstr(groupbuf, "CN=");
cnt = X509_get_ext_count(cert);
for (i = 0; i < cnt; i++) {
@@ -412,33 +537,23 @@ main(
else if (strcmp(pathbuf,
"Private") == 0)
exten = EXT_KEY_PRIVATE;
- if (groupname == NULL)
- groupname = ptr + 3;
+ certname = estrdup(ptr + 3);
}
}
}
}
if (scheme == NULL)
scheme = "RSA-MD5";
- if (groupname == NULL)
- groupname = hostname;
+ if (ciphername == NULL)
+ ciphername = "des-ede3-cbc";
+ cipher = EVP_get_cipherbyname(ciphername);
+ if (cipher == NULL) {
+ fprintf(stderr, "Unknown cipher %s\n", ciphername);
+ exit(-1);
+ }
fprintf(stderr, "Using host %s group %s\n", hostname,
groupname);
- if ((iffkey || gqkey || mvkey) && exten == NULL)
- fprintf(stderr,
- "Warning: identity files may not be useful with a nontrusted certificate.\n");
-#endif /* OPENSSL */
-
- /*
- * Create new unencrypted MD5 keys file if requested. If this
- * option is selected, ignore all other options.
- */
- if (md5key) {
- gen_md5("md5");
- exit (0);
- }
-#ifdef OPENSSL
/*
* Create a new encrypted RSA host key file if requested;
* otherwise, look for an existing host key file. If not found,
@@ -448,10 +563,10 @@ main(
if (hostkey)
pkey_host = genkey("RSA", "host");
if (pkey_host == NULL) {
- sprintf(filename, "ntpkey_host_%s", hostname);
+ snprintf(filename, sizeof(filename), "ntpkey_host_%s", hostname);
pkey_host = readkey(filename, passwd1, &fstamp, NULL);
if (pkey_host != NULL) {
- readlink(filename, filename, sizeof(filename));
+ followlink(filename, sizeof(filename));
fprintf(stderr, "Using host key %s\n",
filename);
} else {
@@ -460,7 +575,7 @@ main(
}
if (pkey_host == NULL) {
fprintf(stderr, "Generating host key fails\n");
- exit (-1);
+ exit(-1);
}
/*
@@ -471,13 +586,14 @@ main(
if (sign != NULL)
pkey_sign = genkey(sign, "sign");
if (pkey_sign == NULL) {
- sprintf(filename, "ntpkey_sign_%s", hostname);
+ snprintf(filename, sizeof(filename), "ntpkey_sign_%s",
+ hostname);
pkey_sign = readkey(filename, passwd1, &fstamp, NULL);
if (pkey_sign != NULL) {
- readlink(filename, filename, sizeof(filename));
+ followlink(filename, sizeof(filename));
fprintf(stderr, "Using sign key %s\n",
filename);
- } else if (pkey_host != NULL) {
+ } else {
pkey_sign = pkey_host;
fprintf(stderr, "Using host key as sign key\n");
}
@@ -491,10 +607,11 @@ main(
if (gqkey)
pkey_gqkey = gen_gqkey("gqkey");
if (pkey_gqkey == NULL) {
- sprintf(filename, "ntpkey_gqkey_%s", groupname);
+ snprintf(filename, sizeof(filename), "ntpkey_gqkey_%s",
+ groupname);
pkey_gqkey = readkey(filename, passwd1, &fstamp, NULL);
if (pkey_gqkey != NULL) {
- readlink(filename, filename, sizeof(filename));
+ followlink(filename, sizeof(filename));
fprintf(stderr, "Using GQ parameters %s\n",
filename);
}
@@ -510,9 +627,8 @@ main(
if (pkey_gqkey != NULL && HAVE_OPT(ID_KEY)) {
RSA *rsa;
- epoch = fstamp - JAN_1970;
- sprintf(filename, "ntpkey_gqpar_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_gqpar_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing GQ parameters %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
@@ -522,9 +638,9 @@ main(
BN_copy(rsa->q, BN_value_one());
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
- PEM_write_PrivateKey(stdout, pkey, NULL, NULL, 0, NULL,
- NULL);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
+ NULL, NULL);
+ fflush(stdout);
if (debug)
RSA_print_fp(stderr, rsa, 0);
}
@@ -535,8 +651,8 @@ main(
if (pkey_gqkey != NULL && passwd2 != NULL) {
RSA *rsa;
- sprintf(filename, "ntpkey_gqkey_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_gqkey_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing GQ keys %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
@@ -544,9 +660,9 @@ main(
rsa = pkey_gqkey->pkey.rsa;
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
- PEM_write_PrivateKey(stdout, pkey,
- EVP_des_cbc(), NULL, 0, NULL, passwd2);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
+ NULL, passwd2);
+ fflush(stdout);
if (debug)
RSA_print_fp(stderr, rsa, 0);
}
@@ -558,10 +674,11 @@ main(
if (iffkey)
pkey_iffkey = gen_iffkey("iffkey");
if (pkey_iffkey == NULL) {
- sprintf(filename, "ntpkey_iffkey_%s", groupname);
+ snprintf(filename, sizeof(filename), "ntpkey_iffkey_%s",
+ groupname);
pkey_iffkey = readkey(filename, passwd1, &fstamp, NULL);
if (pkey_iffkey != NULL) {
- readlink(filename, filename, sizeof(filename));
+ followlink(filename, sizeof(filename));
fprintf(stderr, "Using IFF keys %s\n",
filename);
}
@@ -575,9 +692,8 @@ main(
if (pkey_iffkey != NULL && HAVE_OPT(ID_KEY)) {
DSA *dsa;
- epoch = fstamp - JAN_1970;
- sprintf(filename, "ntpkey_iffpar_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_iffpar_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing IFF parameters %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
@@ -586,9 +702,9 @@ main(
BN_copy(dsa->priv_key, BN_value_one());
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
- PEM_write_PrivateKey(stdout, pkey, NULL, NULL, 0, NULL,
- NULL);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
+ NULL, NULL);
+ fflush(stdout);
if (debug)
DSA_print_fp(stderr, dsa, 0);
}
@@ -599,9 +715,8 @@ main(
if (pkey_iffkey != NULL && passwd2 != NULL) {
DSA *dsa;
- epoch = fstamp - JAN_1970;
- sprintf(filename, "ntpkey_iffkey_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_iffkey_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing IFF keys %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
@@ -609,9 +724,9 @@ main(
dsa = pkey_iffkey->pkey.dsa;
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
- PEM_write_PrivateKey(stdout, pkey, EVP_des_cbc(), NULL,
- 0, NULL, passwd2);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
+ NULL, passwd2);
+ fflush(stdout);
if (debug)
DSA_print_fp(stderr, dsa, 0);
}
@@ -623,11 +738,12 @@ main(
if (mvkey)
pkey_mvkey = gen_mvkey("mv", pkey_mvpar);
if (pkey_mvkey == NULL) {
- sprintf(filename, "ntpkey_mvta_%s", groupname);
+ snprintf(filename, sizeof(filename), "ntpkey_mvta_%s",
+ groupname);
pkey_mvkey = readkey(filename, passwd1, &fstamp,
- pkey_mvpar);
+ pkey_mvpar);
if (pkey_mvkey != NULL) {
- readlink(filename, filename, sizeof(filename));
+ followlink(filename, sizeof(filename));
fprintf(stderr, "Using MV keys %s\n",
filename);
}
@@ -639,17 +755,16 @@ main(
* associated with client key 1.
*/
if (pkey_mvkey != NULL && HAVE_OPT(ID_KEY)) {
- epoch = fstamp - JAN_1970;
- sprintf(filename, "ntpkey_mvpar_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_mvpar_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing MV parameters %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
pkey = pkey_mvpar[2];
- PEM_write_PrivateKey(stdout, pkey, NULL, NULL, 0, NULL,
- NULL);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, NULL, NULL, 0,
+ NULL, NULL);
+ fflush(stdout);
if (debug)
DSA_print_fp(stderr, pkey->pkey.dsa, 0);
}
@@ -658,32 +773,23 @@ main(
* Write the encrypted MV server keys to the stdout stream.
*/
if (pkey_mvkey != NULL && passwd2 != NULL) {
- epoch = fstamp - JAN_1970;
- sprintf(filename, "ntpkey_mvkey_%s.%u", groupname,
- fstamp);
+ snprintf(filename, sizeof(filename),
+ "ntpkey_mvkey_%s.%u", groupname, fstamp);
fprintf(stderr, "Writing MV keys %s to stdout\n",
filename);
fprintf(stdout, "# %s\n# %s\n", filename,
ctime(&epoch));
pkey = pkey_mvpar[1];
- PEM_write_PrivateKey(stdout, pkey, EVP_des_cbc(), NULL,
- 0, NULL, passwd2);
- fclose(stdout);
+ PEM_write_PKCS8PrivateKey(stdout, pkey, cipher, NULL, 0,
+ NULL, passwd2);
+ fflush(stdout);
if (debug)
DSA_print_fp(stderr, pkey->pkey.dsa, 0);
}
/*
- * Don't generate a certificate if no host keys or extracting
- * encrypted or nonencrypted keys to the standard output stream.
- */
- if (pkey_host == NULL || HAVE_OPT(ID_KEY) || passwd2 != NULL)
- exit (0);
-
- /*
- * Decode the digest/signature scheme. If trusted, set the
- * subject and issuer names to the group name; if not set both
- * to the host name.
+ * Decode the digest/signature scheme and create the
+ * certificate. Do this every time we run the program.
*/
ectx = EVP_get_digestbyname(scheme);
if (ectx == NULL) {
@@ -692,12 +798,9 @@ main(
scheme);
exit (-1);
}
- if (exten == NULL)
- x509(pkey_sign, ectx, grpkey, exten, hostname);
- else
- x509(pkey_sign, ectx, grpkey, exten, groupname);
-#endif /* OPENSSL */
- exit (0);
+ x509(pkey_sign, ectx, grpkey, exten, certname);
+#endif /* AUTOKEY */
+ exit(0);
}
@@ -718,16 +821,22 @@ gen_md5(
u_char keystr[MD5SIZE];
u_char hexstr[2 * MD5SIZE + 1];
u_char hex[] = "0123456789abcdef";
-#endif /* OPENSSL */
+#endif /* OPENSSL */
str = fheader("MD5key", id, groupname);
- ntp_srandom((u_long)epoch);
for (i = 1; i <= MD5KEYS; i++) {
for (j = 0; j < MD5SIZE; j++) {
int temp;
while (1) {
- temp = ntp_random() & 0xff;
+ int rc;
+
+ rc = ntp_crypto_random_buf(&temp, 1);
+ if (-1 == rc) {
+ fprintf(stderr, "ntp_crypto_random_buf() failed.\n");
+ exit (-1);
+ }
+ temp &= 0xff;
if (temp == '#')
continue;
@@ -751,13 +860,13 @@ gen_md5(
fprintf(str, "%2d SHA1 %s # SHA1 key\n", i + MD5KEYS,
hexstr);
}
-#endif /* OPENSSL */
+#endif /* OPENSSL */
fclose(str);
return (1);
}
-#ifdef OPENSSL
+#ifdef AUTOKEY
/*
* readkey - load cryptographic parameters and keys
*
@@ -857,7 +966,7 @@ gen_rsa(
FILE *str;
fprintf(stderr, "Generating RSA keys (%d bits)...\n", modulus);
- rsa = RSA_generate_key(modulus, 3, cb, "RSA");
+ rsa = RSA_generate_key(modulus, 65537, cb, "RSA");
fprintf(stderr, "\n");
if (rsa == NULL) {
fprintf(stderr, "RSA generate keys fails\n%s\n",
@@ -888,7 +997,7 @@ gen_rsa(
str = fheader("RSAhost", id, hostname);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
- PEM_write_PrivateKey(str, pkey, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey, cipher, NULL, 0, NULL,
passwd1);
fclose(str);
if (debug)
@@ -943,7 +1052,7 @@ gen_dsa(
str = fheader("DSAsign", id, hostname);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
- PEM_write_PrivateKey(str, pkey, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey, cipher, NULL, 0, NULL,
passwd1);
fclose(str);
if (debug)
@@ -1110,7 +1219,7 @@ gen_iffkey(
str = fheader("IFFkey", id, groupname);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
- PEM_write_PrivateKey(str, pkey, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey, cipher, NULL, 0, NULL,
passwd1);
fclose(str);
if (debug)
@@ -1198,15 +1307,15 @@ gen_gqkey(
fprintf(stderr,
"Generating GQ parameters (%d bits)...\n",
modulus2);
- rsa = RSA_generate_key(modulus2, 3, cb, "GQ");
+ rsa = RSA_generate_key(modulus2, 65537, cb, "GQ");
fprintf(stderr, "\n");
if (rsa == NULL) {
fprintf(stderr, "RSA generate keys fails\n%s\n",
ERR_error_string(ERR_get_error(), NULL));
return (NULL);
}
- ctx = BN_CTX_new(); u = BN_new(); v = BN_new();
- g = BN_new(); k = BN_new(); r = BN_new(); y = BN_new();
+ u = BN_new(); v = BN_new(); g = BN_new();
+ k = BN_new(); r = BN_new(); y = BN_new();
/*
* Generate the group key b, which is saved in the e member of
@@ -1307,7 +1416,7 @@ gen_gqkey(
str = fheader("GQkey", id, groupname);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_RSA(pkey, rsa);
- PEM_write_PrivateKey(str, pkey, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey, cipher, NULL, 0, NULL,
passwd1);
fclose(str);
if (debug)
@@ -1376,8 +1485,8 @@ gen_gqkey(
*
* How it works
*
- * The scheme goes like this. Bob has the server values (p, E, q, gbar,
- * ghat) and Alice has the client values (p, xbar, xhat).
+ * The scheme goes like this. Bob has the server values (p, E, q,
+ * gbar, ghat) and Alice has the client values (p, xbar, xhat).
*
* Alice rolls new random nonce r mod p and sends to Bob in the MV
* request message. Bob rolls random nonce k mod q, encrypts y = r E^k
@@ -1540,7 +1649,6 @@ gen_mvkey(
*/
for (i = 0; i <= n; i++) {
a[i] = BN_new();
-
BN_one(a[i]);
}
for (j = 1; j <= n; j++) {
@@ -1560,7 +1668,6 @@ gen_mvkey(
*/
for (i = 0; i <= n; i++) {
g[i] = BN_new();
-
BN_mod_exp(g[i], dsa->g, a[i], dsa->p, ctx);
}
@@ -1639,6 +1746,7 @@ gen_mvkey(
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);
}
@@ -1655,7 +1763,6 @@ gen_mvkey(
* additional keys, so we sail on with only token revocations.
*/
s = BN_new();
-
BN_copy(s, dsa->q);
BN_div(s, u, s, s1[n], ctx);
@@ -1668,7 +1775,6 @@ gen_mvkey(
* changed.
*/
bige = BN_new(); gbar = BN_new(); ghat = BN_new();
-
BN_mod_exp(bige, biga, s, dsa->p, ctx);
BN_mod_exp(gbar, dsa->g, s, dsa->p, ctx);
BN_mod_mul(v, s, b, dsa->q, ctx);
@@ -1712,7 +1818,7 @@ gen_mvkey(
BN_copy(dsa->pub_key, b);
pkey = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey, dsa);
- PEM_write_PrivateKey(str, pkey, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey, cipher, NULL, 0, NULL,
passwd1);
evpars[i++] = pkey;
if (debug)
@@ -1738,7 +1844,7 @@ gen_mvkey(
dsa2->pub_key = BN_dup(ghat);
pkey1 = EVP_PKEY_new();
EVP_PKEY_assign_DSA(pkey1, dsa2);
- PEM_write_PrivateKey(str, pkey1, EVP_des_cbc(), NULL, 0, NULL,
+ PEM_write_PKCS8PrivateKey(str, pkey1, cipher, NULL, 0, NULL,
passwd1);
evpars[i++] = pkey1;
if (debug)
@@ -1756,7 +1862,6 @@ gen_mvkey(
fprintf(stderr, "Generating %d MV client keys\n", n);
for (j = 1; j <= n; j++) {
sdsa = DSA_new();
-
sdsa->p = BN_dup(dsa->p);
sdsa->q = BN_dup(BN_value_one());
sdsa->g = BN_dup(BN_value_one());
@@ -1764,7 +1869,7 @@ gen_mvkey(
sdsa->pub_key = BN_dup(xhat[j]);
pkey1 = EVP_PKEY_new();
EVP_PKEY_set1_DSA(pkey1, sdsa);
- PEM_write_PrivateKey(str, pkey1, EVP_des_cbc(), NULL, 0,
+ PEM_write_PKCS8PrivateKey(str, pkey1, cipher, NULL, 0,
NULL, passwd1);
evpars[i++] = pkey1;
if (debug)
@@ -1817,11 +1922,11 @@ gen_mvkey(
*/
int
x509 (
- EVP_PKEY *pkey, /* generic signature algorithm */
- const EVP_MD *md, /* generic digest algorithm */
+ EVP_PKEY *pkey, /* signing key */
+ const EVP_MD *md, /* signature/digest scheme */
char *gqpub, /* identity extension (hex string) */
char *exten, /* private cert extension */
- char *name /* subject/issuer namd */
+ char *name /* subject/issuer name */
)
{
X509 *cert; /* X509 certificate */
@@ -1848,15 +1953,15 @@ x509 (
X509_set_serialNumber(cert, serial);
ASN1_INTEGER_free(serial);
X509_time_adj(X509_get_notBefore(cert), 0L, &epoch);
- X509_time_adj(X509_get_notAfter(cert), YEAR, &epoch);
+ X509_time_adj(X509_get_notAfter(cert), lifetime * SECSPERDAY, &epoch);
subj = X509_get_subject_name(cert);
X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
- (unsigned char *) name, strlen(name), -1, 0);
+ (u_char *)name, strlen(name), -1, 0);
subj = X509_get_issuer_name(cert);
X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
- (unsigned char *) name, strlen(name), -1, 0);
+ (u_char *)name, strlen(name), -1, 0);
if (!X509_set_pubkey(cert, pkey)) {
- fprintf(stderr, "Assign key fails\n%s\n",
+ fprintf(stderr, "Assign certificate signing key fails\n%s\n",
ERR_error_string(ERR_get_error(), NULL));
X509_free(cert);
return (0);
@@ -1946,7 +2051,7 @@ x509 (
/*
* Write the certificate encoded in PEM.
*/
- sprintf(pathbuf, "%scert", id);
+ snprintf(pathbuf, sizeof(pathbuf), "%scert", id);
str = fheader(pathbuf, "cert", hostname);
PEM_write_X509(str, cert);
fclose(str);
@@ -2048,7 +2153,7 @@ genkey(
fprintf(stderr, "Invalid %s key type %s\n", id, type);
return (NULL);
}
-#endif /* OPENSSL */
+#endif /* AUTOKEY */
/*
@@ -2065,14 +2170,15 @@ fheader (
char linkname[MAXFILENAME]; /* link name */
int temp;
- sprintf(filename, "ntpkey_%s_%s.%lu", file, owner, epoch +
- JAN_1970);
+ snprintf(filename, sizeof(filename), "ntpkey_%s_%s.%u", file,
+ owner, fstamp);
if ((str = fopen(filename, "w")) == NULL) {
perror("Write");
exit (-1);
}
- sprintf(linkname, "ntpkey_%s_%s", ulink, owner);
- remove(linkname);
+ snprintf(linkname, sizeof(linkname), "ntpkey_%s_%s", ulink,
+ hostname);
+ (void)remove(linkname); /* The symlink() line below matters */
temp = symlink(filename, linkname);
if (temp < 0)
perror(file);
diff --git a/util/ntp-keygen.html b/util/ntp-keygen.html
new file mode 100644
index 000000000000..bf55aa407528
--- /dev/null
+++ b/util/ntp-keygen.html
@@ -0,0 +1,1811 @@
+<html lang="en">
+<head>
+<title>Ntp-keygen User's Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Ntp-keygen User's Manual">
+<meta name="generator" content="makeinfo 4.7">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family: serif; font-weight: normal; }
+--></style>
+</head>
+<body>
+<h1 class="settitle">Ntp-keygen User's Manual</h1>
+ <div class="shortcontents">
+<h2>Short Contents</h2>
+<ul>
+<a href="#Top">Top</a>
+<a href="#Top">NTP Key Generation Program User Manual</a>
+</ul>
+</div>
+
+
+
+<div class="node">
+<p><hr>
+<a name="Top"></a>Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">Top</h2>
+
+<ul class="menu">
+<li><a accesskey="1" href="#Description">Description</a>
+<li><a accesskey="2" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>: Invoking ntp-keygen
+<li><a accesskey="3" href="#Running-the-Program">Running the Program</a>
+<li><a accesskey="4" href="#Random-Seed-File">Random Seed File</a>
+<li><a accesskey="5" href="#Cryptographic-Data-Files">Cryptographic Data Files</a>
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Description">Description</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
+<br>
+</div>
+
+<h2 class="unnumbered">NTP Key Generation Program User Manual</h2>
+
+<p>This document describes the use of the NTP Project's <code>ntp-keygen</code>
+program, that generates cryptographic data files used by the NTPv4
+authentication and identity schemes.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software
+library has been installed, it can generate host keys, sign keys,
+certificates, and identity keys and parameters used by the Autokey
+public key cryptography.
+The message digest keys file is generated in a
+format compatible with NTPv3.
+All other files are in PEM-encoded
+printable ASCII format so they can be embedded as MIME attachments in
+mail to other sites.
+
+ <p>This document applies to version 4.2.8 of <code>ntp-keygen</code>.
+
+<div class="node">
+<p><hr>
+<a name="Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Running-the-Program">Running the Program</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Description</h3>
+
+<p>This program generates cryptographic data files used by the NTPv4
+authentication and identity schemes. It can generate message digest
+keys used in symmetric key cryptography and, if the OpenSSL software
+library has been installed, it can generate host keys, sign keys,
+certificates, and identity keys and parameters used by the Autokey
+public key cryptography. The message digest keys file is generated in a
+format compatible with NTPv3. All other files are in PEM-encoded
+printable ASCII format so they can be embedded as MIME attachments in
+mail to other sites.
+
+ <p>When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the
+OpenSSL library is installed, it produces an additional ten hex-encoded
+random bit strings suitable for the SHA1 and other message digest
+algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys
+used for ordinary NTP associations, additional keys can be defined as
+passwords for the ntpq and ntpdc utility programs.
+
+ <p>The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys
+are probably not compatible with anything other than Autokey.
+
+ <p>Some files used by this program are encrypted using a private password.
+The <code>-p</code> option specifies the password for local encrypted files and the
+<code>-q</code> option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+<code>gethostname()</code> function, normally the DNS name of the host, is used.
+
+ <p>The <kbd>pw</kbd> option of the <code>crypto</code> configuration command
+specifies the read password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by ntpd without password, but only on the same
+host.
+
+ <p>Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called <code>ntp.keys</code>, is
+usually installed in <code>/etc</code>.
+Other files and links are usually installed
+in <code>/usr/local/etc</code>, which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the keysdir
+configuration command in such cases.
+Normally, this is in <code>/etc</code>.
+
+ <p>This program directs commentary and error messages to the standard
+error stream <code>stderr</code> and remote files to the standard output stream
+<code>stdout</code> where they can be piped to other applications or redirected to
+files.
+The names used for generated files and links all begin with the
+string <code>ntpkey</code> and include the file type,
+generating host and filestamp,
+as described in the <a href="#Cryptographic-Data-Files">Cryptographic Data Files</a> section below.
+
+<div class="node">
+<p><hr>
+<a name="Running-the-Program"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Random-Seed-File">Random Seed File</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Description">Description</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Running the Program</h3>
+
+<p>To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually <code>/usr/local/etc</code>.
+When run for the
+first time, or if all files with names beginning <code>ntpkey</code>] have been
+removed, use the <code>ntp-keygen</code> command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+
+ <p>Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using <code>ntp-keygen</code>
+with the <code>-T</code> option and configure
+it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+
+ <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.
+A different sign key can be assigned using the <code>-S</code> option
+and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the <code>-c</code> option.
+
+ <p>The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+
+ <p>Additional information on trusted groups and identity schemes is on the
+Autokey Public-Key Authentication page.
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">Invoking ntp-keygen</h3>
+
+<p><a name="index-ntp_002dkeygen-1"></a><a name="index-Create-a-NTP-host-key-2"></a>
+
+ <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>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.
+
+ <p>When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+utility programs.
+
+ <p>The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+
+ <p>Some files used by this program are encrypted using a private password.
+The
+<code>-p</code>
+option specifies the password for local encrypted files and the
+<code>-q</code>
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+<code>gethostname()</code>
+function, normally the DNS name of the host is used.
+
+ <p>The
+<kbd>pw</kbd>
+option of the
+<kbd>crypto</kbd>
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+<kbd>ntpd</kbd>
+without password but only on the same host.
+
+ <p>Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+<kbd>ntp.keys</kbd>,
+is usually installed in
+<span class="file">/etc</span>.
+Other files and links are usually installed in
+<span class="file">/usr/local/etc</span>,
+which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+<kbd>keysdir</kbd>
+configuration command in such cases.
+Normally, this is in
+<span class="file">/etc</span>.
+
+ <p>This program directs commentary and error messages to the standard
+error stream
+<kbd>stderr</kbd>
+and remote files to the standard output stream
+<kbd>stdout</kbd>
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+<kbd>ntpkey</kbd>
+and include the file type, generating host and filestamp,
+as described in the
+Cryptographic Data Files
+section below.
+
+<h5 class="subsubsection">Running the Program</h5>
+
+<p>To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+<span class="file">/usr/local/etc</span>
+When run for the first time, or if all files with names beginning with
+<kbd>ntpkey</kbd>
+have been removed, use the
+<code>ntp-keygen</code>
+command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+
+ <p>Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+<code>ntp-keygen</code>
+with the
+<code>-T</code>
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+
+ <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.
+A different sign key can be assigned using the
+<code>-S</code>
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+<code>-c</code>
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+
+ <p>Additional information on trusted groups and identity schemes is on the
+Autokey Public-Key Authentication
+page.
+
+ <p>The
+<code>ntpd(1ntpdmdoc)</code>
+configuration command
+<code>crypto</code> <code>pw</code> <kbd>password</kbd>
+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>File names begin with the prefix
+<code>ntpkey_</code>
+and end with the postfix
+<kbd>_hostname.filestamp</kbd>,
+where
+<kbd>hostname</kbd>
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+<kbd>filestamp</kbd>
+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
+<code>rm</code> <code>ntpkey*</code>
+command or all files generated
+at a specific time can be removed by a
+<code>rm</code>
+<kbd>*filestamp</kbd>
+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>All files are installed by default in the keys directory
+<span class="file">/usr/local/etc</span>,
+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>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>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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+<code>ntpd(1ntpdmdoc)</code>
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+<code>ntp-keygen</code>
+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.
+
+<h5 class="subsubsection">Running the program</h5>
+
+<p>The safest way to run the
+<code>ntp-keygen</code>
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+<span class="file">/usr/local/etc</span>,
+then run the program.
+When run for the first time,
+or if all
+<code>ntpkey</code>
+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>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>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>Running the program as other than root and using the Unix
+<code>su</code>
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+<code>.rnd</code>
+in the user home directory.
+However, there should be only one
+<code>.rnd</code>,
+most conveniently
+in the root directory, so it is convenient to define the
+<code>$RANDFILE</code>
+environment variable used by the OpenSSL library as the path to
+<code>/.rnd</code>.
+
+ <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
+<span class="file">/etc</span>
+using the
+<code>keysdir</code>
+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>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>All files are installed by default in the keys directory
+<span class="file">/usr/local/etc</span>,
+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>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>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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+<code>ntpd(1ntpdmdoc)</code>
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+<code>ntp-keygen</code>
+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.
+
+<h5 class="subsubsection">Running the program</h5>
+
+<p>The safest way to run the
+<code>ntp-keygen</code>
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+<span class="file">/usr/local/etc</span>,
+then run the program.
+When run for the first time,
+or if all
+<code>ntpkey</code>
+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>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>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>Running the program as other than root and using the Unix
+<code>su</code>
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+<code>.rnd</code>
+in the user home directory.
+However, there should be only one
+<code>.rnd</code>,
+most conveniently
+in the root directory, so it is convenient to define the
+<code>$RANDFILE</code>
+environment variable used by the OpenSSL library as the path to
+<code>/.rnd</code>.
+
+ <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
+<span class="file">/etc</span>
+using the
+<code>keysdir</code>
+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>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.
+seconds.
+seconds.
+
+ <p>s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+<a href="#Authentication-Options">Authentication Options</a>
+section of
+<code>ntp.conf(5)</code>.
+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="#Automatic-NTP-Configuration-Options">Automatic NTP Configuration Options</a>
+section of
+<code>ntp.conf(5)</code>.
+
+ <p>On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+<code>ntpkey</code>
+files.
+Then run
+<code>ntp-keygen</code>
+<code>-T</code>
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+<code>-T</code>
+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>If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+<code>ntp-keygen</code>
+with the
+<code>-S</code> <kbd>type</kbd>
+option, where
+<kbd>type</kbd>
+is either
+<code>RSA</code>
+or
+<code>DSA</code>.
+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
+<code>ntp-keygen</code>
+with the
+<code>-c</code> <kbd>scheme</kbd>
+option and selected
+<kbd>scheme</kbd>
+as needed.
+f
+<code>ntp-keygen</code>
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+
+ <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
+<code>ntp-keygen</code>
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+<code>ntpd(1ntpdmdoc)</code>
+should be restarted.
+When
+<code>ntpd(1ntpdmdoc)</code>
+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.
+
+<h5 class="subsubsection">Identity Schemes</h5>
+
+<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
+"Identification Schemes"
+page
+(maybe available at
+<code>http://www.eecis.udel.edu/%7emills/keygen.html</code>).
+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>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>The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+<code>ntp-keygen</code>
+<code>-P</code>
+<code>-p</code> <kbd>password</kbd>
+to generate the host key file
+<span class="file">ntpkey_RSAkey_</span><kbd>alice.filestamp</kbd>
+and trusted private certificate file
+<span class="file">ntpkey_RSA-MD5_cert_</span><kbd>alice.filestamp</kbd>.
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+<span class="file">ntpkey_host_</span><kbd>bob</kbd>
+to the host key file and soft link
+<span class="file">ntpkey_cert_</span><kbd>bob</kbd>
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+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>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 parameter file.
+On trusted host alice run
+<code>ntp-keygen</code>
+<code>-T</code>
+<code>-I</code>
+<code>-p</code> <kbd>password</kbd>
+to produce her parameter file
+<span class="file">ntpkey_IFFpar_</span><kbd>alice.filestamp</kbd>,
+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
+<span class="file">ntpkey_iff_</span><kbd>alice</kbd>
+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>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 alice run
+<code>ntp-keygen</code>
+<code>-e</code>
+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
+<span class="file">ntpkey_iff_</span><kbd>alice</kbd>
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+
+ <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 alice run
+<code>ntp-keygen</code>
+<code>-T</code>
+<code>-G</code>
+<code>-p</code> <kbd>password</kbd>
+to produce her parameter file
+<span class="file">ntpkey_GQpar_</span><kbd>alice.filestamp</kbd>,
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+<span class="file">ntpkey_gq_</span><kbd>alice</kbd>
+to this file.
+In addition, on each host bob install a soft link
+from generic
+<span class="file">ntpkey_gq_</span><kbd>bob</kbd>
+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>For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+<code>ntp-keygen</code>
+<code>-V</code> <kbd>n</kbd>
+<code>-p</code> <kbd>password</kbd>,
+where
+<kbd>n</kbd>
+is the number of revokable keys (typically 5) to produce
+the parameter file
+<span class="file">ntpkeys_MVpar_</span><kbd>trish.filestamp</kbd>
+and client key files
+<span class="file">ntpkeys_MVkeyd_</span><kbd>trish.filestamp</kbd>
+where
+<kbd>d</kbd>
+is the key number (0 &lt;
+<kbd>d</kbd>
+&lt;
+<kbd>n</kbd>).
+Copy the parameter file to alice and install a soft link
+from the generic
+<span class="file">ntpkey_mv_</span><kbd>alice</kbd>
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+<span class="file">ntpkey_mvkey_</span><kbd>bob</kbd>
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+
+<h5 class="subsubsection">Command Line Options</h5>
+
+ <dl>
+<dt><code>-c</code> <kbd>scheme</kbd><dd>Select certificate message digest/signature encryption scheme.
+The
+<kbd>scheme</kbd>
+can be one of the following:
+. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+or
+<code>DSA-SHA1</code>.
+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
+<code>RSA-MD5</code>.
+<br><dt><code>-d</code><dd>Enable debugging.
+This option displays the cryptographic data produced in eye-friendly billboards.
+<br><dt><code>-e</code><dd>Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+<br><dt><code>-G</code><dd>Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+<br><dt><code>-g</code><dd>Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+<br><dt><code>-H</code><dd>Generate new host keys, obsoleting any that may exist.
+<br><dt><code>-I</code><dd>Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+<br><dt><code>-i</code> <kbd>name</kbd><dd>Set the suject name to
+<kbd>name</kbd>.
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+<br><dt><code>-M</code><dd>Generate MD5 keys, obsoleting any that may exist.
+<br><dt><code>-P</code><dd>Generate a private certificate.
+By default, the program generates public certificates.
+<br><dt><code>-p</code> <kbd>password</kbd><dd>Encrypt generated files containing private data with
+<kbd>password</kbd>
+and the DES-CBC algorithm.
+<br><dt><code>-q</code><dd>Set the password for reading files to password.
+<br><dt><code>-S</code> <code>[RSA | DSA]</code><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.
+<br><dt><code>-s</code> <kbd>name</kbd><dd>Set the issuer name to
+<kbd>name</kbd>.
+This is used for the issuer field in certificates
+and in the file name for identity files.
+<br><dt><code>-T</code><dd>Generate a trusted certificate.
+By default, the program generates a non-trusted certificate.
+<br><dt><code>-V</code> <kbd>nkeys</kbd><dd>Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+</dl>
+
+<h5 class="subsubsection">Random Seed File</h5>
+
+<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
+<code>ntp-keygen</code>
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+
+ <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>The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+<code>.rnd</code>,
+which must be available when starting the NTP daemon
+or the
+<code>ntp-keygen</code>
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+<code>randfile</code>
+subcommand of the
+<code>crypto</code>
+configuration command.
+If not specified in this way, or when starting the
+<code>ntp-keygen</code>
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+.Ev RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+.Ev RANDFILE
+environment variable is not present,
+the library will look for the
+<code>.rnd</code>
+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.
+
+<h5 class="subsubsection">Cryptographic Data Files</h5>
+
+<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 date format.
+Lines beginning with # are considered comments and ignored by the
+<code>ntp-keygen</code>
+program and
+<code>ntpd(1ntpdmdoc)</code>
+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>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
+<pre class="example"> <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd>
+</pre>
+ <p>where
+<kbd>keyno</kbd>
+is a positive integer in the range 1-65,535,
+<kbd>type</kbd>
+is the string MD5 defining the key format and
+<kbd>key</kbd>
+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>Note that the keys used by the
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+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>The
+<code>ntp-keygen</code>
+program generates a MD5 symmetric keys file
+<span class="file">ntpkey_MD5key_</span><kbd>hostname.filestamp</kbd>.
+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
+<span class="file">ntp.keys</span>,
+so
+<code>ntp-keygen</code>
+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
+<code>ntpq(1ntpqmdoc)</code>
+and
+<code>ntpdc(1ntpdcmdoc)</code>
+utilities.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp-keygen</code> program.
+This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
+
+<ul class="menu">
+<li><a accesskey="1" href="#ntp_002dkeygen-usage">ntp-keygen usage</a>: ntp-keygen help/usage (<span class="option">--help</span>)
+<li><a accesskey="2" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>: imbits option (-b)
+<li><a accesskey="3" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>: certificate option (-c)
+<li><a accesskey="4" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>: cipher option (-C)
+<li><a accesskey="5" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>: id-key option (-e)
+<li><a accesskey="6" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>: gq-params option (-G)
+<li><a accesskey="7" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>: host-key option (-H)
+<li><a accesskey="8" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>: iffkey option (-I)
+<li><a accesskey="9" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>: ident option (-i)
+<li><a href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>: lifetime option (-l)
+<li><a href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>: md5key option (-M)
+<li><a href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>: modulus option (-m)
+<li><a href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>: pvt-cert option (-P)
+<li><a href="#ntp_002dkeygen-password">ntp-keygen password</a>: password option (-p)
+<li><a href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>: export-passwd option (-q)
+<li><a href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>: sign-key option (-S)
+<li><a href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>: subject-name option (-s)
+<li><a href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>: trusted-cert option (-T)
+<li><a href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>: mv-params option (-V)
+<li><a href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>: mv-keys option (-v)
+<li><a href="#ntp_002dkeygen-config">ntp-keygen config</a>: presetting/configuring ntp-keygen
+<li><a href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>: exit status
+<li><a href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>: Usage
+<li><a href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>: Notes
+<li><a href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>: Bugs
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp-keygen help/usage (<span class="option">--help</span>)</h4>
+
+<p><a name="index-ntp_002dkeygen-help-3"></a>
+This is the automatically generated usage text for ntp-keygen.
+
+ <p>The text printed is the same whether selected with the <code>help</code> option
+(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
+<code>more-help</code> is disabled on platforms without a working
+<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
+used to select the program, defaulting to <span class="file">more</span>. Both will exit
+with a status code of 0.
+
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.7p486-RC
+Usage: ntp-keygen [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]...
+ Flg Arg Option-Name Description
+ -b Num imbits identity modulus bits
+ - it must be in the range:
+ 256 to 2048
+ -c Str certificate certificate scheme
+ -C Str cipher privatekey cipher
+ -d no debug-level Increase debug verbosity level
+ - may appear multiple times
+ -D Num set-debug-level Set the debug verbosity level
+ - may appear multiple times
+ -e no id-key Write IFF or GQ identity keys
+ -G no gq-params Generate GQ parameters and keys
+ -H no host-key generate RSA host key
+ -I no iffkey generate IFF parameters
+ -i Str ident set Autokey group name
+ -l Num lifetime set certificate lifetime
+ -M no md5key generate MD5 keys
+ -m Num modulus modulus
+ - it must be in the range:
+ 256 to 2048
+ -P no pvt-cert generate PC private certificate
+ -p Str password local private password
+ -q Str export-passwd export IFF or GQ group keys with password
+ -S Str sign-key generate sign key (RSA or DSA)
+ -s Str subject-name set host and optionally group name
+ -T no trusted-cert trusted certificate (TC scheme)
+ -V Num mv-params generate &lt;num&gt; MV parameters
+ -v Num mv-keys update &lt;num&gt; MV keys
+ opt version output version information and exit
+ -? no help display extended usage information and exit
+ -! no more-help extended usage information passed thru pager
+ -&gt; opt save-opts save the option state to a config file
+ -&lt; Str load-opts load options from a config file
+ - disabled as '--no-load-opts'
+ - may appear multiple times
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+The following option preset mechanisms are supported:
+ - reading file $HOME/.ntprc
+ - reading file ./.ntprc
+ - examining environment variables named NTP_KEYGEN_*
+
+Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
+</pre>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-imbits"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-usage">ntp-keygen usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">imbits option (-b)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dimbits-4"></a>
+This is the &ldquo;identity modulus bits&rdquo; option.
+This option takes a number argument <span class="file">imbits</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>The number of bits in the identity modulus. The default is 256.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-certificate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-imbits">ntp-keygen imbits</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">certificate option (-c)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dcertificate-5"></a>
+This is the &ldquo;certificate scheme&rdquo; option.
+This option takes a string argument <span class="file">scheme</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>scheme is one of
+RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+DSA-SHA, or DSA-SHA1.
+
+ <p>Select the 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 RSA-MD5.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-cipher"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-certificate">ntp-keygen certificate</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">cipher option (-C)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dcipher-6"></a>
+This is the &ldquo;privatekey cipher&rdquo; option.
+This option takes a string argument <span class="file">cipher</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Select the cipher which is used to encrypt the files containing
+private keys. The default is three-key triple DES in CBC mode,
+equivalent to "<code>-C des-ede3-cbc". The openssl tool lists ciphers
+available in "openssl -h" output.
+</code><div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-id_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-cipher">ntp-keygen cipher</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">id-key option (-e)</h4>
+
+<p><a name="index-ntp_002dkeygen_002did_002dkey-7"></a>
+This is the &ldquo;write iff or gq identity keys&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-gq_002dparams"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-id_002dkey">ntp-keygen id-key</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">gq-params option (-G)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dgq_002dparams-8"></a>
+This is the &ldquo;generate gq parameters and keys&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-host_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-gq_002dparams">ntp-keygen gq-params</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">host-key option (-H)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dhost_002dkey-9"></a>
+This is the &ldquo;generate rsa host key&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate new host keys, obsoleting any that may exist.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-iffkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-host_002dkey">ntp-keygen host-key</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">iffkey option (-I)</h4>
+
+<p><a name="index-ntp_002dkeygen_002diffkey-10"></a>
+This is the &ldquo;generate iff parameters&rdquo; option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-ident"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-iffkey">ntp-keygen iffkey</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ident option (-i)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dident-11"></a>
+This is the &ldquo;set autokey group name&rdquo; option.
+This option takes a string argument <span class="file">group</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using <code>-i/--ident</code> or
+using <code>-s/--subject-name</code> following an '<code>}' character,
+is also a part of the self-signed host certificate's subject and
+issuer names in the form host
+ <p>'crypto ident' or 'server ident' configuration in
+ntpd's configuration file.
+</code><div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-lifetime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-ident">ntp-keygen ident</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">lifetime option (-l)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dlifetime-12"></a>
+This is the ``set certificate lifetime'' option.
+This option takes a number argument <span class="file">lifetime</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Set the certificate expiration to lifetime days from now.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-md5key"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-lifetime">ntp-keygen lifetime</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">md5key option (-M)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dmd5key-13"></a>
+This is the ``generate md5 keys'' option.
+Generate MD5 keys, obsoleting any that may exist.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-modulus"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-md5key">ntp-keygen md5key</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">modulus option (-m)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dmodulus-14"></a>
+This is the ``modulus'' option.
+This option takes a number argument <span class="file">modulus</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>The number of bits in the prime modulus. The default is 512.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-pvt_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-modulus">ntp-keygen modulus</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">pvt-cert option (-P)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dpvt_002dcert-15"></a>
+This is the ``generate pc private certificate'' option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate a private certificate. By default, the program generates
+public certificates.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-password"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-pvt_002dcert">ntp-keygen pvt-cert</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">password option (-p)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dpassword-16"></a>
+This is the ``local private password'' option.
+This option takes a string argument <span class="file">passwd</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Local files containing private data are encrypted with the
+DES-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-export_002dpasswd"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-password">ntp-keygen password</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">export-passwd option (-q)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dexport_002dpasswd-17"></a>
+This is the ``export iff or gq group keys with password'' option.
+This option takes a string argument <span class="file">passwd</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+--id-key (-e) for unencrypted exports.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-sign_002dkey"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-export_002dpasswd">ntp-keygen export-passwd</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">sign-key option (-S)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dsign_002dkey-18"></a>
+This is the ``generate sign key (rsa or dsa)'' option.
+This option takes a string argument <span class="file">sign</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>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.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-subject_002dname"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-sign_002dkey">ntp-keygen sign-key</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">subject-name option (-s)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dsubject_002dname-19"></a>
+This is the ``set host and optionally group name'' option.
+This option takes a string argument <span class="file">host@group</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Set the Autokey host name, and optionally, group name specified
+following an '<code>}' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in host
+ <p>fields. Specifying '-s
+ <p>leaving the host name unchanged while appending
+ <p>subject and issuer fields, as with -i group. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+</code><div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-trusted_002dcert"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-subject_002dname">ntp-keygen subject-name</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">trusted-cert option (-T)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dtrusted_002dcert-20"></a>
+This is the ``trusted certificate (tc scheme)'' option.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate a trusted certificate. By default, the program generates
+a non-trusted certificate.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-mv_002dparams"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-trusted_002dcert">ntp-keygen trusted-cert</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">mv-params option (-V)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dmv_002dparams-21"></a>
+This is the ``generate &lt;num&gt; mv parameters'' option.
+This option takes a number argument <span class="file">num</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>Generate parameters and keys for the Mu-Varadharajan (MV)
+identification scheme.
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-mv_002dkeys"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-config">ntp-keygen config</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-mv_002dparams">ntp-keygen mv-params</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">mv-keys option (-v)</h4>
+
+<p><a name="index-ntp_002dkeygen_002dmv_002dkeys-22"></a>
+This is the ``update &lt;num&gt; mv keys'' option.
+This option takes a number argument <span class="file">num</span>.
+
+<p class="noindent">This option has some usage constraints. It:
+ <ul>
+<li>must be compiled in by defining <code>AUTOKEY</code> during the compilation.
+</ul>
+
+ <p>This option has no <span class="samp">doc</span> documentation.
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-mv_002dkeys">ntp-keygen mv-keys</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">presetting/configuring ntp-keygen</h4>
+
+<p>Any option that is not marked as <i>not presettable</i> may be preset by
+loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTP-KEYGEN</code> and <code>NTP-KEYGEN_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
+the options listed above in upper case and segmented with underscores.
+The <code>NTP-KEYGEN</code> variable will be tokenized and parsed like
+the command line. The remaining variables are tested for existence and their
+values are treated like option arguments.
+
+<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
+ <ul>
+<li>$HOME
+<li>$PWD
+</ul>
+ The environment variables <code>HOME</code>, and <code>PWD</code>
+are expanded and replaced when <span class="file">ntp-keygen</span> runs.
+For any of these that are plain files, they are simply processed.
+For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
+within that directory and processed.
+
+ <p>Configuration files may be in a wide variety of formats.
+The basic format is an option name followed by a value (argument) on the
+same line. Values may be separated from the option name with a colon,
+equal sign or simply white space. Values may be continued across multiple
+lines by escaping the newline with a backslash.
+
+ <p>Multiple programs may also share the same initialization file.
+Common options are collected at the top, followed by program specific
+segments. The segments are separated by lines like:
+<pre class="example"> [NTP-KEYGEN]
+</pre>
+ <p class="noindent">or by
+<pre class="example"> &lt;?program ntp-keygen&gt;
+</pre>
+ <p class="noindent">Do not mix these styles within one configuration file.
+
+ <p>Compound values and carefully constructed string values may also be
+specified using XML syntax:
+<pre class="example"> &lt;option-name&gt;
+ &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
+ &lt;/option-name&gt;
+</pre>
+ <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
+<pre class="example"> "...&lt;...&gt;..."
+</pre>
+ <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
+hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
+the associated name/value pair list (see: optionFindValue).
+
+ <p>The command line options relating to configuration and/or usage help are:
+
+<h5 class="subsubheading">version (-)</h5>
+
+<p>Print the program version to standard out, optionally with licensing
+information, then exit 0. The optional argument specifies how much licensing
+detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
+Only the first letter of the argument is examined:
+
+ <dl>
+<dt><span class="samp">version</span><dd>Only print the version. This is the default.
+<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
+<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
+</dl>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-config">ntp-keygen config</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp-keygen exit status</h4>
+
+<p>One of the following exit values will be returned:
+ <dl>
+<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
+<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
+<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+</dl>
+ <div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-exit-status">ntp-keygen exit status</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp-keygen Usage</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-Notes"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002dkeygen-Bugs">ntp-keygen Bugs</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-Usage">ntp-keygen Usage</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp-keygen Notes</h4>
+
+<div class="node">
+<p><hr>
+<a name="ntp_002dkeygen-Bugs"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002dkeygen-Notes">ntp-keygen Notes</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002dkeygen-Invocation">ntp-keygen Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ntp-keygen Bugs</h4>
+
+<div class="node">
+<p><hr>
+<a name="Random-Seed-File"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Cryptographic-Data-Files">Cryptographic Data Files</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#Running-the-Program">Running the Program</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Random Seed File</h3>
+
+<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 OpenSSL library routines.
+If a site supports ssh, it is very likely that means to do this are
+already available.
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called <code>.rnd</code>, which must be available when
+starting the <code>ntp-keygen</code> program or <code>ntpd</code> daemon.
+
+ <p>The OpenSSL library looks for the file using the path specified by the
+<code>RANDFILE</code> environment variable in the user home directory, whether root
+or some other user.
+If the <code>RANDFILE</code> environment variable is not
+present, the library looks for the <code>.rnd</code> file in the user home
+directory.
+Since both the <code>ntp-keygen</code> program and <code>ntpd</code> daemon must run
+as root, the logical place to put this file is in <code>/.rnd</code> or
+<code>/root/.rnd</code>.
+If the file is not available or cannot be written, the program exits
+with a message to the system log.
+
+<div class="node">
+<p><hr>
+<a name="Cryptographic-Data-Files"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Random-Seed-File">Random Seed File</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
+<br>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h3 class="section">Cryptographic Data Files</h3>
+
+<p>File and link names are in the <code>form ntpkey_key_name.fstamp</code>,
+where <code>key</code> is the key or parameter type,
+<code>name</code> is the host or group name and
+<code>fstamp</code> is the filestamp (NTP seconds) when the file was created).
+By convention, key names in generated file names include both upper and
+lower case characters, while key names in generated link names include
+only lower case characters. The filestamp is not used in generated link
+names.
+
+ <p>The key name is a string defining the cryptographic key type.
+Key types include public/private keys host and sign, certificate cert
+and several challenge/response key types.
+By convention, client files used for
+challenges have a par subtype, as in the IFF challenge IFFpar, while
+server files for responses have a key subtype, as in the GQ response
+GQkey.
+
+ <p>All files begin with two nonencrypted lines. The first line contains
+the file name in the format <code>ntpkey_key_host.fstamp</code>.
+The second line contains the datestamp in conventional Unix date format.
+Lines beginning with <code>#</code> are ignored.
+
+ <p>The remainder of the file contains cryptographic data encoded first
+using ASN.1 rules, then encrypted using the DES-CBC algorithm with
+given password and finally written in PEM-encoded printable ASCII text
+preceded and followed by MIME content identifier lines.
+
+ <p>The format of the symmetric keys file, ordinarily named <code>ntp.keys</code>,
+is somewhat different than the other files in the interest of backward
+compatibility.
+Ordinarily, the file is generated by this program, but
+it can be constructed and edited using an ordinary text editor.
+
+<pre class="example"> # ntpkey_MD5key_hms.local.3564038757
+ # Sun Dec 9 02:45:57 2012
+
+ 1 MD5 "]!ghT%O;3)WJ,/Nc:&gt;I # MD5 key
+ 2 MD5 lu+H^tF46BKR-6~pV_5 # MD5 key
+ 3 MD5 :lnoVsE%Yz*avh%EtNC # MD5 key
+ 4 MD5 |fdZrf0sF~^V # MD5 key
+ 5 MD5 IyAG&gt;O"y"LmCRS!*bHC # MD5 key
+ 6 MD5 "&gt;e\A # MD5 key
+ 7 MD5 c9x=M'CfLxax9v)PV-si # MD5 key
+ 8 MD5 E|=jvFVov?Bn|Ev=&amp;aK\ # MD5 key
+ 9 MD5 T!c4UT&amp;`(m$+m+B6,`Q0 # MD5 key
+ 10 MD5 JVF/1=)=IFbHbJQz..Cd # MD5 key
+ 11 SHA1 6dea311109529e436c2b4fccae9bc753c16d1b48 # SHA1 key
+ 12 SHA1 7076f373d86c4848c59ff8046e49cb7d614ec394 # SHA1 key
+ 13 SHA1 5f48b1b60591eb01b7cf1d33b7774f08d20262d3 # SHA1 key
+ 14 SHA1 eed5ab9d9497319ec60cf3781d52607e76720178 # SHA1 key
+ 15 SHA1 f283562611a04c964da8126296f5f8e58c3f85de # SHA1 key
+ 16 SHA1 1930da171297dd63549af50b29449de17dcf341f # SHA1 key
+ 17 SHA1 fee892110358cd4382322b889869e750db8e8a8f # SHA1 key
+ 18 SHA1 b5520c9fadd7ad3fd8bfa061c8821b65d029bb37 # SHA1 key
+ 19 SHA1 8c74fb440ec80f453ec6aaa62b9baed0ab723b92 # SHA1 key
+ 20 SHA1 6bc05f734306a189326000970c19b3910f403795 # SHA1 key
+</pre>
+ <p>Figure 1. Typical Symmetric Key File
+
+ <p>Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Each line of the file contains three fields, first an
+integer between 1 and 65534, inclusive, representing the key identifier
+used in the server and peer configuration commands.
+Next is the key type for the message digest algorithm,
+which in the absence of the
+OpenSSL library must be MD5 to designate the MD5 message digest
+algorithm.
+If the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library.
+However, if
+compatibility with FIPS 140-2 is required, the key type must be either
+SHA or SHA1.
+The key type can be changed using an ASCII text editor.
+
+ <p>An MD5 key consists of a printable ASCII string less than or equal to
+16 characters and terminated by whitespace or a # character.
+An OpenSSL
+key consists of a hex-encoded ASCII string of 40 characters, which is
+truncated as necessary.
+
+ <p>Note that the keys used by the <code>ntpq</code> and <code>ntpdc</code> 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>The <code>ntp-keygen</code> program generates a MD5 symmetric keys file
+<code>ntpkey_MD5key_hostname.filestamp</code>.
+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 <code>ntp.keys</code>, so <code>ntp-keygen</code>
+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 <code>ntpq</code> and
+<code>ntpdc</code> utilities.
+
+</body></html>
+
diff --git a/util/ntp-keygen.man.in b/util/ntp-keygen.man.in
new file mode 100644
index 000000000000..2b0f2b538aba
--- /dev/null
+++ b/util/ntp-keygen.man.in
@@ -0,0 +1,1221 @@
+.de1 NOP
+. it 1 an-trap
+. if \\n[.$] \,\\$*\/
+..
+.ie t \
+.ds B-Font [CB]
+.ds I-Font [CI]
+.ds R-Font [CR]
+.el \
+.ds B-Font B
+.ds I-Font I
+.ds R-Font R
+.TH ntp-keygen @NTP_KEYGEN_MS@ "19 Dec 2014" "ntp (4.2.8)" "User Commands"
+.\"
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6fayVi/ag-hgaqUi)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:51 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-keygen-opts.def
+.\" and the template file agman-cmd.tpl
+.SH NAME
+\f\*[B-Font]ntp-keygen\fP
+\- Create a NTP host key
+.SH SYNOPSIS
+\f\*[B-Font]ntp-keygen\fP
+.\" Mixture of short (flag) options and long options
+[\f\*[B-Font]\-flags\f[]]
+[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
+[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
+.sp \n(Ppu
+.ne 2
+
+All arguments must be options.
+.sp \n(Ppu
+.ne 2
+
+.SH DESCRIPTION
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utility programs.
+.sp \n(Ppu
+.ne 2
+
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+.sp \n(Ppu
+.ne 2
+
+Some files used by this program are encrypted using a private password.
+The
+\f\*[B-Font]\-p\f[]
+option specifies the password for local encrypted files and the
+\f\*[B-Font]\-q\f[]
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+\fBgethostname\fR()\f[]
+function, normally the DNS name of the host is used.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[I-Font]pw\f[]
+option of the
+\f\*[I-Font]crypto\f[]
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+\f\*[I-Font]ntpd\f[]
+without password but only on the same host.
+.sp \n(Ppu
+.ne 2
+
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+\f\*[I-Font]ntp.keys\f[],
+is usually installed in
+\fI/etc\f[].
+Other files and links are usually installed in
+\fI/usr/local/etc\f[],
+which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+\f\*[I-Font]keysdir\f[]
+configuration command in such cases.
+Normally, this is in
+\fI/etc\f[].
+.sp \n(Ppu
+.ne 2
+
+This program directs commentary and error messages to the standard
+error stream
+\f\*[I-Font]stderr\f[]
+and remote files to the standard output stream
+\f\*[I-Font]stdout\f[]
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+\f\*[I-Font]ntpkey\f[]
+and include the file type, generating host and filestamp,
+as described in the
+\*[Lq]Cryptographic Data Files\*[Rq]
+section below.
+.SS Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+\fI/usr/local/etc\f[]
+When run for the first time, or if all files with names beginning with
+\f\*[I-Font]ntpkey\f[]
+have been removed, use the
+\f\*[B-Font]ntp-keygen\fP
+command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+.sp \n(Ppu
+.ne 2
+
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-T\f[]
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+.sp \n(Ppu
+.ne 2
+
+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.
+A different sign key can be assigned using the
+\f\*[B-Font]\-S\f[]
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+\f\*[B-Font]\-c\f[]
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+.sp \n(Ppu
+.ne 2
+
+Additional information on trusted groups and identity schemes is on the
+\*[Lq]Autokey Public-Key Authentication\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
+The
+\fCntpd\fR(@NTPD_MS@)\f[]
+configuration command
+\f\*[B-Font]crypto\f[] \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+File names begin with the prefix
+\f\*[B-Font]ntpkey_\f[]
+and end with the postfix
+\f\*[I-Font]_hostname.filestamp\f[],
+where
+\f\*[I-Font]hostname\f[]
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+\f\*[I-Font]filestamp\f[]
+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
+\f\*[B-Font]rm\f[] \f\*[B-Font]ntpkey\&*\f[]
+command or all files generated
+at a specific time can be removed by a
+\f\*[B-Font]rm\f[]
+\f\*[I-Font]\&*filestamp\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+All files are installed by default in the keys directory
+\fI/usr/local/etc\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+\fCntpd\fR(@NTPD_MS@)\f[]
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SS Running the program
+The safest way to run the
+\f\*[B-Font]ntp-keygen\fP
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+\fI/usr/local/etc\f[],
+then run the program.
+When run for the first time,
+or if all
+\f\*[B-Font]ntpkey\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Running the program as other than root and using the Unix
+\f\*[B-Font]su\f[]
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+\f\*[B-Font].rnd\f[]
+in the user home directory.
+However, there should be only one
+\f\*[B-Font].rnd\f[],
+most conveniently
+in the root directory, so it is convenient to define the
+\f\*[B-Font]$RANDFILE\f[]
+environment variable used by the OpenSSL library as the path to
+\f\*[B-Font]/.rnd\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+All files are installed by default in the keys directory
+\fI/usr/local/etc\f[],
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+\fCntpd\fR(@NTPD_MS@)\f[]
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SS Running the program
+The safest way to run the
+\f\*[B-Font]ntp-keygen\fP
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+\fI/usr/local/etc\f[],
+then run the program.
+When run for the first time,
+or if all
+\f\*[B-Font]ntpkey\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+Running the program as other than root and using the Unix
+\f\*[B-Font]su\f[]
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+\f\*[B-Font].rnd\f[]
+in the user home directory.
+However, there should be only one
+\f\*[B-Font].rnd\f[],
+most conveniently
+in the root directory, so it is convenient to define the
+\f\*[B-Font]$RANDFILE\f[]
+environment variable used by the OpenSSL library as the path to
+\f\*[B-Font]/.rnd\f[].
+.sp \n(Ppu
+.ne 2
+
+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
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+seconds.
+seconds.
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+\fIAuthentication\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[].
+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
+\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
+section of
+\fCntp.conf\fR(5)\f[].
+.sp \n(Ppu
+.ne 2
+
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+\f\*[B-Font]ntpkey\f[]
+files.
+Then run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+\f\*[B-Font]\-T\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-S\f[] \f\*[I-Font]type\f[]
+option, where
+\f\*[I-Font]type\f[]
+is either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[].
+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
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
+option and selected
+\f\*[I-Font]scheme\f[]
+as needed.
+f
+\f\*[B-Font]ntp-keygen\fP
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+.sp \n(Ppu
+.ne 2
+
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+\f\*[B-Font]ntp-keygen\fP
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+\fCntpd\fR(@NTPD_MS@)\f[]
+should be restarted.
+When
+\fCntpd\fR(@NTPD_MS@)\f[]
+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.
+.SS Identity Schemes
+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
+"Identification Schemes"
+page
+(maybe available at
+\f[C]http://www.eecis.udel.edu/%7emills/keygen.html\f[]).
+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.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-P\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to generate the host key file
+\fIntpkey_RSAkey_\f[]\f\*[I-Font]alice.filestamp\f[]
+and trusted private certificate file
+\fIntpkey_RSA-MD5_cert_\f[]\f\*[I-Font]alice.filestamp\f[].
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+\fIntpkey_host_\f[]\f\*[I-Font]bob\f[]
+to the host key file and soft link
+\fIntpkey_cert_\f[]\f\*[I-Font]bob\f[]
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+.sp \n(Ppu
+.ne 2
+
+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 parameter file.
+On trusted host alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+\f\*[B-Font]\-I\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to produce her parameter file
+\fIntpkey_IFFpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+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
+\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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 alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-e\f[]
+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
+\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+.sp \n(Ppu
+.ne 2
+
+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 alice run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-T\f[]
+\f\*[B-Font]\-G\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+to produce her parameter file
+\fIntpkey_GQpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+\fIntpkey_gq_\f[]\f\*[I-Font]alice\f[]
+to this file.
+In addition, on each host bob install a soft link
+from generic
+\fIntpkey_gq_\f[]\f\*[I-Font]bob\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+\f\*[B-Font]ntp-keygen\fP
+\f\*[B-Font]\-V\f[] \f\*[I-Font]n\f[]
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[],
+where
+\f\*[I-Font]n\f[]
+is the number of revokable keys (typically 5) to produce
+the parameter file
+\fIntpkeys_MVpar_\f[]\f\*[I-Font]trish.filestamp\f[]
+and client key files
+\fIntpkeys_MVkeyd_\f[]\f\*[I-Font]trish.filestamp\f[]
+where
+\f\*[I-Font]d\f[]
+is the key number (0 \&<
+\f\*[I-Font]d\f[]
+\&<
+\f\*[I-Font]n\f[]).
+Copy the parameter file to alice and install a soft link
+from the generic
+\fIntpkey_mv_\f[]\f\*[I-Font]alice\f[]
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+\fIntpkey_mvkey_\f[]\f\*[I-Font]bob\f[]
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+.SS Command Line Options
+.TP 7
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
+Select certificate message digest/signature encryption scheme.
+The
+\f\*[I-Font]scheme\f[]
+can be one of the following:
+. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+or
+\f\*[B-Font]DSA-SHA1\f[].
+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
+\f\*[B-Font]RSA-MD5\f[].
+.TP 7
+.NOP \f\*[B-Font]\-d\f[]
+Enable debugging.
+This option displays the cryptographic data produced in eye-friendly billboards.
+.TP 7
+.NOP \f\*[B-Font]\-e\f[]
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+.TP 7
+.NOP \f\*[B-Font]\-G\f[]
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-g\f[]
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+.TP 7
+.NOP \f\*[B-Font]\-H\f[]
+Generate new host keys, obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-I\f[]
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]name\f[]
+Set the suject name to
+\f\*[I-Font]name\f[].
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+.TP 7
+.NOP \f\*[B-Font]\-M\f[]
+Generate MD5 keys, obsoleting any that may exist.
+.TP 7
+.NOP \f\*[B-Font]\-P\f[]
+Generate a private certificate.
+By default, the program generates public certificates.
+.TP 7
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+Encrypt generated files containing private data with
+\f\*[I-Font]password\f[]
+and the DES-CBC algorithm.
+.TP 7
+.NOP \f\*[B-Font]\-q\f[]
+Set the password for reading files to password.
+.TP 7
+.NOP \f\*[B-Font]\-S\f[] [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
+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.
+.TP 7
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]name\f[]
+Set the issuer name to
+\f\*[I-Font]name\f[].
+This is used for the issuer field in certificates
+and in the file name for identity files.
+.TP 7
+.NOP \f\*[B-Font]\-T\f[]
+Generate a trusted certificate.
+By default, the program generates a non-trusted certificate.
+.TP 7
+.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]nkeys\f[]
+Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+.PP
+.SS Random Seed File
+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
+\f\*[B-Font]ntp-keygen\fP
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+.sp \n(Ppu
+.ne 2
+
+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.
+.sp \n(Ppu
+.ne 2
+
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+\f\*[B-Font].rnd\f[],
+which must be available when starting the NTP daemon
+or the
+\f\*[B-Font]ntp-keygen\fP
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+\f\*[B-Font]randfile\f[]
+subcommand of the
+\f\*[B-Font]crypto\f[]
+configuration command.
+If not specified in this way, or when starting the
+\f\*[B-Font]ntp-keygen\fP
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+RANDFILE
+environment variable is not present,
+the library will look for the
+\f\*[B-Font].rnd\f[]
+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.
+.SS Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+\f\*[B-Font]ntp-keygen\fP
+program and
+\fCntpd\fR(@NTPD_MS@)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+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
+.in +4
+\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
+.in -4
+where
+\f\*[I-Font]keyno\f[]
+is a positive integer in the range 1-65,535,
+\f\*[I-Font]type\f[]
+is the string MD5 defining the key format and
+\f\*[I-Font]key\f[]
+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
+\[oq]#\[cq]
+character.
+.sp \n(Ppu
+.ne 2
+
+Note that the keys used by the
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+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.
+.sp \n(Ppu
+.ne 2
+
+The
+\f\*[B-Font]ntp-keygen\fP
+program generates a MD5 symmetric keys file
+\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname.filestamp\f[].
+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
+\fIntp.keys\f[],
+so
+\f\*[B-Font]ntp-keygen\fP
+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
+\fCntpq\fR(@NTPQ_MS@)\f[]
+and
+\fCntpdc\fR(@NTPDC_MS@)\f[]
+utilities.
+.SH "OPTIONS"
+.TP
+.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]imbits\f[], \f\*[B-Font]\-\-imbits\f[]=\f\*[I-Font]imbits\f[]
+identity modulus bits.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]imbits\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the identity modulus. The default is 256.
+.TP
+.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[], \f\*[B-Font]\-\-certificate\f[]=\f\*[I-Font]scheme\f[]
+certificate scheme.
+.sp
+scheme is one of
+RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+DSA-SHA, or DSA-SHA1.
+.sp
+Select the 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 RSA-MD5.
+.TP
+.NOP \f\*[B-Font]\-C\f[] \f\*[I-Font]cipher\f[], \f\*[B-Font]\-\-cipher\f[]=\f\*[I-Font]cipher\f[]
+privatekey cipher.
+.sp
+Select the cipher which is used to encrypt the files containing
+private keys. The default is three-key triple DES in CBC mode,
+equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+available in "\fBopenssl \-h\fP" output.
+.TP
+.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.TP
+.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.TP
+.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-id\-key\f[]
+Write IFF or GQ identity keys.
+.sp
+Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-gq\-params\f[]
+Generate GQ parameters and keys.
+.sp
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-host\-key\f[]
+generate RSA host key.
+.sp
+Generate new host keys, obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-I\f[], \f\*[B-Font]\-\-iffkey\f[]
+generate IFF parameters.
+.sp
+Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+.TP
+.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[], \f\*[B-Font]\-\-ident\f[]=\f\*[I-Font]group\f[]
+set Autokey group name.
+.sp
+Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using \fB-i/--ident\fP or
+using \fB-s/--subject-name\fP following an '\fB@\fP' character,
+is also a part of the self-signed host certificate's subject and
+issuer names in the form \fBhost@group\fP and should match the
+'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
+\fBntpd\fP's configuration file.
+.TP
+.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]lifetime\f[], \f\*[B-Font]\-\-lifetime\f[]=\f\*[I-Font]lifetime\f[]
+set certificate lifetime.
+This option takes an integer number as its argument.
+.sp
+Set the certificate expiration to lifetime days from now.
+.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
+generate MD5 keys.
+.sp
+Generate MD5 keys, obsoleting any that may exist.
+.TP
+.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]modulus\f[], \f\*[B-Font]\-\-modulus\f[]=\f\*[I-Font]modulus\f[]
+modulus.
+This option takes an integer number as its argument.
+The value of
+\f\*[I-Font]modulus\f[]
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the prime modulus. The default is 512.
+.TP
+.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pvt\-cert\f[]
+generate PC private certificate.
+.sp
+Generate a private certificate. By default, the program generates
+public certificates.
+.TP
+.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-password\f[]=\f\*[I-Font]passwd\f[]
+local private password.
+.sp
+Local files containing private data are encrypted with the
+DES-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+.TP
+.NOP \f\*[B-Font]\-q\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-export\-passwd\f[]=\f\*[I-Font]passwd\f[]
+export IFF or GQ group keys with password.
+.sp
+Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+--id-key (-e) for unencrypted exports.
+.TP
+.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
+generate sign key (RSA or DSA).
+.sp
+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.
+.TP
+.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]host@group\f[], \f\*[B-Font]\-\-subject\-name\f[]=\f\*[I-Font]host@group\f[]
+set host and optionally group name.
+.sp
+Set the Autokey host name, and optionally, group name specified
+following an '\fB@\fP' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in \fBhost@group\fP form for the host certificate's subject and issuer
+fields. Specifying '\fB-s @group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@group\fP to the
+subject and issuer fields, as with \fB-i group\fP. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+.TP
+.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-trusted\-cert\f[]
+trusted certificate (TC scheme).
+.sp
+Generate a trusted certificate. By default, the program generates
+a non-trusted certificate.
+.TP
+.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-params\f[]=\f\*[I-Font]num\f[]
+generate <num> MV parameters.
+This option takes an integer number as its argument.
+.sp
+Generate parameters and keys for the Mu-Varadharajan (MV)
+identification scheme.
+.TP
+.NOP \f\*[B-Font]\-v\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-keys\f[]=\f\*[I-Font]num\f[]
+update <num> MV keys.
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.TP
+.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
+Display usage information and exit.
+.TP
+.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
+Pass the extended usage information through a pager.
+.TP
+.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.TP
+.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
+Load options from \fIcfgfile\fP.
+The \fIno-load-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
+out of order.
+.TP
+.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.PP
+.SH "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTP_KEYGEN_<option-name>\fP or \fBNTP_KEYGEN\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.SH USAGE
+The
+\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
+option specifies the write password and
+\f\*[B-Font]\-q\f[] \f\*[I-Font]password\f[]
+option the read password for previously encrypted files.
+The
+\f\*[B-Font]ntp-keygen\fP
+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.
+.SH "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.SH "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.SH "EXIT STATUS"
+One of the following exit values will be returned:
+.TP
+.NOP 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.TP
+.NOP 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.TP
+.NOP 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.TP
+.NOP 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen-users@lists.sourceforge.net. Thank you.
+.PP
+.SH "AUTHORS"
+The University of Delaware
+.SH "COPYRIGHT"
+Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.SH BUGS
+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.
+.sp \n(Ppu
+.ne 2
+
+Please report bugs to http://bugs.ntp.org .
+.sp \n(Ppu
+.ne 2
+
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.SH NOTES
+Portions of this document came from FreeBSD.
+.sp \n(Ppu
+.ne 2
+
+This manual page was \fIAutoGen\fP-erated from the \fBntp-keygen\fP
+option definitions.
diff --git a/util/ntp-keygen.mdoc.in b/util/ntp-keygen.mdoc.in
new file mode 100644
index 000000000000..d94c7db095fc
--- /dev/null
+++ b/util/ntp-keygen.mdoc.in
@@ -0,0 +1,1071 @@
+.Dd December 19 2014
+.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
+.Os
+.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
+.\"
+.\" It has been AutoGen-ed December 19, 2014 at 07:50:58 AM by AutoGen 5.18.5pre4
+.\" From the definitions ntp-keygen-opts.def
+.\" and the template file agmdoc-cmd.tpl
+.Sh NAME
+.Nm ntp-keygen
+.Nd Create a NTP host key
+.Sh SYNOPSIS
+.Nm
+.\" Mixture of short (flag) options and long options
+.Op Fl flags
+.Op Fl flag Op Ar value
+.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
+.Pp
+All arguments must be options.
+.Pp
+.Sh DESCRIPTION
+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.
+.Pp
+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.
+.Pp
+When used to generate message digest keys, the program produces a file
+containing ten pseudo\-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the OpenSSL library is installed, it produces an additional ten
+hex\-encoded random bit strings suitable for the SHA1 and other message
+digest algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys used for ordinary NTP associations, additional keys
+can be defined as passwords for the
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+utility programs.
+.Pp
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys are probably not compatible with anything
+other than Autokey.
+.Pp
+Some files used by this program are encrypted using a private password.
+The
+.Fl p
+option specifies the password for local encrypted files and the
+.Fl q
+option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+.Fn gethostname
+function, normally the DNS name of the host is used.
+.Pp
+The
+.Ar pw
+option of the
+.Ar crypto
+configuration command specifies the read
+password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by
+.Ar ntpd
+without password but only on the same host.
+.Pp
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called
+.Ar ntp.keys ,
+is usually installed in
+.Pa /etc .
+Other files and links are usually installed in
+.Pa /usr/local/etc ,
+which is normally in a shared filesystem in
+NFS\-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the
+.Ar keysdir
+configuration command in such cases.
+Normally, this is in
+.Pa /etc .
+.Pp
+This program directs commentary and error messages to the standard
+error stream
+.Ar stderr
+and remote files to the standard output stream
+.Ar stdout
+where they can be piped to other applications or redirected to files.
+The names used for generated files and links all begin with the
+string
+.Ar ntpkey
+and include the file type, generating host and filestamp,
+as described in the
+.Dq Cryptographic Data Files
+section below.
+.Ss Running the Program
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually
+.Pa /usr/local/etc
+When run for the first time, or if all files with names beginning with
+.Ar ntpkey
+have been removed, use the
+.Nm
+command without arguments to generate a
+default RSA host key and matching RSA\-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+.Nm
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+.Pp
+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.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken\-and\-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball\-and\-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re\-generated.
+.Pp
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public\-Key Authentication
+page.
+.Pp
+The
+.Xr ntpd @NTPD_MS@
+configuration command
+.Ic crypto pw Ar password
+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.
+.Pp
+File names begin with the prefix
+.Cm ntpkey_
+and end with the postfix
+.Ar _hostname.filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix gethostname() routine, and
+.Ar filestamp
+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
+.Ic rm ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm
+.Ar \&*filestamp
+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.
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd @NTPD_MS@
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+.Pp
+All files are installed by default in the keys directory
+.Pa /usr/local/etc ,
+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.
+.Pp
+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.
+.Pp
+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, ntpd follows it to the file name
+to extract the filestamp.
+If a link is not present,
+.Xr ntpd @NTPD_MS@
+extracts the filestamp from the file itself.
+This allows clients to verify that the file and generation times
+are always current.
+The
+.Nm
+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.
+.Ss Running the program
+The safest way to run the
+.Nm
+program is logged in directly as root.
+The recommended procedure is change to the keys directory,
+usually
+.Pa /usr/local/etc ,
+then run the program.
+When run for the first time,
+or if all
+.Cm ntpkey
+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.
+.Pp
+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.
+.Pp
+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.
+.Pp
+Running the program as other than root and using the Unix
+.Ic su
+command
+to assume root may not work properly, since by default the OpenSSL library
+looks for the random seed file
+.Cm .rnd
+in the user home directory.
+However, there should be only one
+.Cm .rnd ,
+most conveniently
+in the root directory, so it is convenient to define the
+.Cm $RANDFILE
+environment variable used by the OpenSSL library as the path to
+.Cm /.rnd .
+.Pp
+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
+.Pa /etc
+using the
+.Ic keysdir
+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.
+.Pp
+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.
+seconds.
+seconds.
+s Trusted Hosts and Groups
+Each cryptographic configuration involves selection of a signature scheme
+and identification scheme, called a cryptotype,
+as explained in the
+.Sx Authentication Options
+section of
+.Xr ntp.conf 5 .
+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
+.Sx Automatic NTP Configuration Options
+section of
+.Xr ntp.conf 5 .
+.Pp
+On each trusted host as root, change to the keys directory.
+To insure a fresh fileset, remove all
+.Cm ntpkey
+files.
+Then run
+.Nm
+.Fl T
+to generate keys and a trusted certificate.
+On all other hosts do the same, but leave off the
+.Fl T
+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.
+.Pp
+If it is necessary to use a different sign key or different digest/signature
+scheme than the default, run
+.Nm
+with the
+.Fl S Ar type
+option, where
+.Ar type
+is either
+.Cm RSA
+or
+.Cm DSA .
+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
+.Nm
+with the
+.Fl c Ar scheme
+option and selected
+.Ar scheme
+as needed.
+f
+.Nm
+is run again without these options, it generates a new certificate
+using the same scheme and sign key.
+.Pp
+After setting up the environment it is advisable to update certificates
+from time to time, if only to extend the validity interval.
+Simply run
+.Nm
+with the same flags as before to generate new certificates
+using existing keys.
+However, if the host or sign key is changed,
+.Xr ntpd @NTPD_MS@
+should be restarted.
+When
+.Xr ntpd @NTPD_MS@
+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.
+.Ss Identity Schemes
+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
+.Qq Identification Schemes
+page
+(maybe available at
+.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+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.
+.Pp
+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.
+.Pp
+The PC scheme supports only one trusted host in the group.
+On trusted host alice run
+.Nm
+.Fl P
+.Fl p Ar password
+to generate the host key file
+.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+and trusted private certificate file
+.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
+Copy both files to all group hosts;
+they replace the files which would be generated in other schemes.
+On each host bob install a soft link from the generic name
+.Pa ntpkey_host_ Ns Ar bob
+to the host key file and soft link
+.Pa ntpkey_cert_ Ns Ar bob
+to the private certificate file.
+Note the generic links are on bob, but point to files generated
+by trusted host alice.
+In this scheme it is not possible to refresh
+either the keys or certificates without copying them
+to all other hosts in the group.
+.Pp
+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 parameter file.
+On trusted host alice run
+.Nm
+.Fl T
+.Fl I
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+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
+.Pa ntpkey_iff_ Ns Ar alice
+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.
+.Pp
+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 alice run
+.Nm
+.Fl e
+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
+.Pa ntpkey_iff_ Ns Ar alice
+to this file.
+To further protect the integrity of the keys,
+each file can be encrypted with a secret password.
+.Pp
+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 alice run
+.Nm
+.Fl T
+.Fl G
+.Fl p Ar password
+to produce her parameter file
+.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+which includes both server and client keys.
+Copy this file to all group hosts and install a soft link
+from the generic
+.Pa ntpkey_gq_ Ns Ar alice
+to this file.
+In addition, on each host bob install a soft link
+from generic
+.Pa ntpkey_gq_ Ns Ar bob
+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.
+.Pp
+For the MV scheme, proceed as in the TC scheme to generate keys
+and certificates for all group hosts.
+For illustration assume trish is the TA, alice one of several trusted hosts
+and bob one of her clients.
+On TA trish run
+.Nm
+.Fl V Ar n
+.Fl p Ar password ,
+where
+.Ar n
+is the number of revokable keys (typically 5) to produce
+the parameter file
+.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+and client key files
+.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+where
+.Ar d
+is the key number (0 \&<
+.Ar d
+\&<
+.Ar n ) .
+Copy the parameter file to alice and install a soft link
+from the generic
+.Pa ntpkey_mv_ Ns Ar alice
+to this file.
+Copy one of the client key files to alice for later distribution
+to her clients.
+It doesn't matter which client key file goes to alice,
+since they all work the same way.
+Alice copies the client key file to all of her cliens.
+On client bob install a soft link from generic
+.Pa ntpkey_mvkey_ Ns Ar bob
+to the client key file.
+As the MV scheme is independent of keys and certificates,
+these files can be refreshed as needed.
+.Ss Command Line Options
+.Bl -tag -width indent
+.It Fl c Ar scheme
+Select certificate message digest/signature encryption scheme.
+The
+.Ar scheme
+can be one of the following:
+. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
+or
+.Cm DSA\-SHA1 .
+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
+.Cm RSA\-MD5 .
+.It Fl d
+Enable debugging.
+This option displays the cryptographic data produced in eye\-friendly billboards.
+.It Fl e
+Write the IFF client keys to the standard output.
+This is intended for automatic key distribution by mail.
+.It Fl G
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.It Fl g
+Generate keys for the GQ identification scheme
+using the existing GQ parameters.
+If the GQ parameters do not yet exist, create them first.
+.It Fl H
+Generate new host keys, obsoleting any that may exist.
+.It Fl I
+Generate parameters for the IFF identification scheme,
+obsoleting any that may exist.
+.It Fl i Ar name
+Set the suject name to
+.Ar name .
+This is used as the subject field in certificates
+and in the file name for host and sign keys.
+.It Fl M
+Generate MD5 keys, obsoleting any that may exist.
+.It Fl P
+Generate a private certificate.
+By default, the program generates public certificates.
+.It Fl p Ar password
+Encrypt generated files containing private data with
+.Ar password
+and the DES\-CBC algorithm.
+.It Fl q
+Set the password for reading files to password.
+.It Fl S Oo Cm RSA | DSA Oc
+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.
+.It Fl s Ar name
+Set the issuer name to
+.Ar name .
+This is used for the issuer field in certificates
+and in the file name for identity files.
+.It Fl T
+Generate a trusted certificate.
+By default, the program generates a non\-trusted certificate.
+.It Fl V Ar nkeys
+Generate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
+.El
+.Ss Random Seed File
+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
+.Nm
+program.
+If a site supports OpenSSL or its companion OpenSSH,
+it is very likely that means to do this are already available.
+.Pp
+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.
+.Pp
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called
+.Cm .rnd ,
+which must be available when starting the NTP daemon
+or the
+.Nm
+program.
+The NTP daemon will first look for the file
+using the path specified by the
+.Ic randfile
+subcommand of the
+.Ic crypto
+configuration command.
+If not specified in this way, or when starting the
+.Nm
+program,
+the OpenSSL library will look for the file using the path specified
+by the
+.Ev RANDFILE
+environment variable in the user home directory,
+whether root or some other user.
+If the
+.Ev RANDFILE
+environment variable is not present,
+the library will look for the
+.Cm .rnd
+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.
+.Ss Cryptographic Data Files
+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 date format.
+Lines beginning with # are considered comments and ignored by the
+.Nm
+program and
+.Xr ntpd @NTPD_MS@
+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.
+.Pp
+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
+.D1 Ar keyno type key
+where
+.Ar keyno
+is a positive integer in the range 1\-65,535,
+.Ar type
+is the string MD5 defining the key format and
+.Ar key
+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
+.Ql #
+character.
+.Pp
+Note that the keys used by the
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+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.
+.Pp
+The
+.Nm
+program generates a MD5 symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+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
+.Pa ntp.keys ,
+so
+.Nm
+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
+.Xr ntpq @NTPQ_MS@
+and
+.Xr ntpdc @NTPDC_MS@
+utilities.
+.Sh "OPTIONS"
+.Bl -tag
+.It Fl b Ar imbits , Fl \-imbits Ns = Ns Ar imbits
+identity modulus bits.
+This option takes an integer number as its argument.
+The value of
+.Ar imbits
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the identity modulus. The default is 256.
+.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme
+certificate scheme.
+.sp
+scheme is one of
+RSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
+DSA\-SHA, or DSA\-SHA1.
+.sp
+Select the 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 RSA\-MD5.
+.It Fl C Ar cipher , Fl \-cipher Ns = Ns Ar cipher
+privatekey cipher.
+.sp
+Select the cipher which is used to encrypt the files containing
+private keys. The default is three\-key triple DES in CBC mode,
+equivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers
+available in "\fBopenssl \-h\fP" output.
+.It Fl d , Fl \-debug\-level
+Increase debug verbosity level.
+This option may appear an unlimited number of times.
+.sp
+.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
+Set the debug verbosity level.
+This option may appear an unlimited number of times.
+This option takes an integer number as its argument.
+.sp
+.It Fl e , Fl \-id\-key
+Write IFF or GQ identity keys.
+.sp
+Write the IFF or GQ client keys to the standard output. This is
+intended for automatic key distribution by mail.
+.It Fl G , Fl \-gq\-params
+Generate GQ parameters and keys.
+.sp
+Generate parameters and keys for the GQ identification scheme,
+obsoleting any that may exist.
+.It Fl H , Fl \-host\-key
+generate RSA host key.
+.sp
+Generate new host keys, obsoleting any that may exist.
+.It Fl I , Fl \-iffkey
+generate IFF parameters.
+.sp
+Generate parameters for the IFF identification scheme, obsoleting
+any that may exist.
+.It Fl i Ar group , Fl \-ident Ns = Ns Ar group
+set Autokey group name.
+.sp
+Set the optional Autokey group name to name. This is used in
+the file name of IFF, GQ, and MV client parameters files. In
+that role, the default is the host name if this option is not
+provided. The group name, if specified using \fB\-i/\-\-ident\fP or
+using \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
+is also a part of the self\-signed host certificate's subject and
+issuer names in the form \fBhost@group\fP and should match the
+\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
+\fBntpd\fP's configuration file.
+.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime
+set certificate lifetime.
+This option takes an integer number as its argument.
+.sp
+Set the certificate expiration to lifetime days from now.
+.It Fl M , Fl \-md5key
+generate MD5 keys.
+.sp
+Generate MD5 keys, obsoleting any that may exist.
+.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus
+modulus.
+This option takes an integer number as its argument.
+The value of
+.Ar modulus
+is constrained to being:
+.in +4
+.nf
+.na
+in the range 256 through 2048
+.fi
+.in -4
+.sp
+The number of bits in the prime modulus. The default is 512.
+.It Fl P , Fl \-pvt\-cert
+generate PC private certificate.
+.sp
+Generate a private certificate. By default, the program generates
+public certificates.
+.It Fl p Ar passwd , Fl \-password Ns = Ns Ar passwd
+local private password.
+.sp
+Local files containing private data are encrypted with the
+DES\-CBC algorithm and the specified password. The same password
+must be specified to the local ntpd via the "crypto pw password"
+configuration command. The default password is the local
+hostname.
+.It Fl q Ar passwd , Fl \-export\-passwd Ns = Ns Ar passwd
+export IFF or GQ group keys with password.
+.sp
+Export IFF or GQ identity group keys to the standard output,
+encrypted with the DES\-CBC algorithm and the specified password.
+The same password must be specified to the remote ntpd via the
+"crypto pw password" configuration command. See also the option
+-\-id\-key (\-e) for unencrypted exports.
+.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
+generate sign key (RSA or DSA).
+.sp
+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.
+.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group
+set host and optionally group name.
+.sp
+Set the Autokey host name, and optionally, group name specified
+following an '\fB@\fP' character. The host name is used in the file
+name of generated host and signing certificates, without the
+group name. The host name, and if provided, group name are used
+in \fBhost@group\fP form for the host certificate's subject and issuer
+fields. Specifying '\fB\-s @group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@group\fP to the
+subject and issuer fields, as with \fB\-i group\fP. The group name, or
+if not provided, the host name are also used in the file names
+of IFF, GQ, and MV client parameter files.
+.It Fl T , Fl \-trusted\-cert
+trusted certificate (TC scheme).
+.sp
+Generate a trusted certificate. By default, the program generates
+a non\-trusted certificate.
+.It Fl V Ar num , Fl \-mv\-params Ns = Ns Ar num
+generate <num> MV parameters.
+This option takes an integer number as its argument.
+.sp
+Generate parameters and keys for the Mu\-Varadharajan (MV)
+identification scheme.
+.It Fl v Ar num , Fl \-mv\-keys Ns = Ns Ar num
+update <num> MV keys.
+This option takes an integer number as its argument.
+.sp
+This option has not been fully documented.
+.It Fl \&? , Fl \-help
+Display usage information and exit.
+.It Fl \&! , Fl \-more\-help
+Pass the extended usage information through a pager.
+.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
+Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
+configuration file listed in the \fBOPTION PRESETS\fP section, below.
+The command will exit after updating the config file.
+.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
+Load options from \fIcfgfile\fP.
+The \fIno\-load\-opts\fP form will disable the loading
+of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early,
+out of order.
+.It Fl \-version Op Brq Ar v|c|n
+Output version of program and exit. The default mode is `v', a simple
+version. The `c' mode will print copyright information and `n' will
+print the full copyright notice.
+.El
+.Sh "OPTION PRESETS"
+Any option that is not marked as \fInot presettable\fP may be preset
+by loading values from configuration ("RC" or ".INI") file(s) and values from
+environment variables named:
+.nf
+ \fBNTP_KEYGEN_<option\-name>\fP or \fBNTP_KEYGEN\fP
+.fi
+.ad
+The environmental presets take precedence (are processed later than)
+the configuration files.
+The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
+If any of these are directories, then the file \fI.ntprc\fP
+is searched for within those directories.
+.Sh USAGE
+The
+.Fl p Ar password
+option specifies the write password and
+.Fl q Ar password
+option the read password for previously encrypted files.
+The
+.Nm
+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.
+.Sh "ENVIRONMENT"
+See \fBOPTION PRESETS\fP for configuration environment variables.
+.Sh "FILES"
+See \fBOPTION PRESETS\fP for configuration files.
+.Sh "EXIT STATUS"
+One of the following exit values will be returned:
+.Bl -tag
+.It 0 " (EXIT_SUCCESS)"
+Successful program execution.
+.It 1 " (EXIT_FAILURE)"
+The operation failed or the command syntax was not valid.
+.It 66 " (EX_NOINPUT)"
+A specified configuration file could not be loaded.
+.It 70 " (EX_SOFTWARE)"
+libopts had an internal operational error. Please report
+it to autogen\-users@lists.sourceforge.net. Thank you.
+.El
+.Sh "AUTHORS"
+The University of Delaware
+.Sh "COPYRIGHT"
+Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+This program is released under the terms of the NTP license, <http://ntp.org/license>.
+.Sh BUGS
+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.
+.Pp
+Please report bugs to http://bugs.ntp.org .
+.Pp
+Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
+.Sh NOTES
+Portions of this document came from FreeBSD.
+.Pp
+This manual page was \fIAutoGen\fP\-erated from the \fBntp\-keygen\fP
+option definitions.
diff --git a/util/ntp-keygen.texi b/util/ntp-keygen.texi
new file mode 100644
index 000000000000..92cec485a41b
--- /dev/null
+++ b/util/ntp-keygen.texi
@@ -0,0 +1,307 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename ntp-keygen.info
+@settitle Ntp-keygen User's Manual
+@include ../sntp/include/version.texi
+@paragraphindent 2
+@c %**end of header
+
+@ifinfo
+This file documents the use of the NTP Project's @code{ntp-keygen}
+program, which generates various keys for @code{ntpd},
+@end ifinfo
+
+@direntry
+* ntp-keygen: (ntp-keygen). NTP Key Generation
+@end direntry
+
+@titlepage
+@title NTP Key Generation User's Manual
+@subtitle ntp-keygen, version @value{VERSION}, @value{UPDATED}
+@c @author Max @email{foo@ntp.org}
+@end titlepage
+
+@c @page
+@c @vskip 0pt plus 1filll
+
+@shortcontents
+
+@menu
+* Description::
+* ntp-keygen Invocation:: Invoking ntp-keygen
+* Running the Program::
+* Random Seed File::
+* Cryptographic Data Files::
+@end menu
+
+@node Top, Description, (dir), (dir)
+@top NTP Key Generation Program User Manual
+
+This document describes the use of the NTP Project's @code{ntp-keygen}
+program, that generates cryptographic data files used by the NTPv4
+authentication and identity schemes.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software
+library has been installed, it can generate host keys, sign keys,
+certificates, and identity keys and parameters used by the Autokey
+public key cryptography.
+The message digest keys file is generated in a
+format compatible with NTPv3.
+All other files are in PEM-encoded
+printable ASCII format so they can be embedded as MIME attachments in
+mail to other sites.
+
+This document applies to version @value{VERSION} of @code{ntp-keygen}.
+
+@node Description, Running the Program, Top, Top
+@comment node-name, next, previous, up
+@section Description
+
+This program generates cryptographic data files used by the NTPv4
+authentication and identity schemes. It can generate message digest
+keys used in symmetric key cryptography and, if the OpenSSL software
+library has been installed, it can generate host keys, sign keys,
+certificates, and identity keys and parameters used by the Autokey
+public key cryptography. The message digest keys file is generated in a
+format compatible with NTPv3. All other files are in PEM-encoded
+printable ASCII format so they can be embedded as MIME attachments in
+mail to other sites.
+
+When used to generate message digest keys, the program produces a file
+containing ten pseudo-random printable ASCII strings suitable for the
+MD5 message digest algorithm included in the distribution.
+If the
+OpenSSL library is installed, it produces an additional ten hex-encoded
+random bit strings suitable for the SHA1 and other message digest
+algorithms.
+The message digest keys file must be distributed and stored
+using secure means beyond the scope of NTP itself.
+Besides the keys
+used for ordinary NTP associations, additional keys can be defined as
+passwords for the ntpq and ntpdc utility programs.
+
+The remaining generated files are compatible with other OpenSSL
+applications and other Public Key Infrastructure (PKI) resources.
+Certificates generated by this program are compatible with extant
+industry practice, although some users might find the interpretation of
+X509v3 extension fields somewhat liberal.
+However, the identity keys
+are probably not compatible with anything other than Autokey.
+
+Some files used by this program are encrypted using a private password.
+The @code{-p} option specifies the password for local encrypted files and the
+@code{-q} option the password for encrypted files sent to remote sites.
+If no password is specified, the host name returned by the Unix
+@code{gethostname()} function, normally the DNS name of the host, is used.
+
+The @kbd{pw} option of the @code{crypto} configuration command
+specifies the read password for previously encrypted local files.
+This must match the local password used by this program.
+If not specified, the host name is used.
+Thus, if files are generated by this program without password,
+they can be read back by ntpd without password, but only on the same
+host.
+
+Normally, encrypted files for each host are generated by that host and
+used only by that host, although exceptions exist as noted later on
+this page.
+The symmetric keys file, normally called @code{ntp.keys}, is
+usually installed in @code{/etc}.
+Other files and links are usually installed
+in @code{/usr/local/etc}, which is normally in a shared filesystem in
+NFS-mounted networks and cannot be changed by shared clients.
+The location of the keys directory can be changed by the keysdir
+configuration command in such cases.
+Normally, this is in @code{/etc}.
+
+This program directs commentary and error messages to the standard
+error stream @code{stderr} and remote files to the standard output stream
+@code{stdout} where they can be piped to other applications or redirected to
+files.
+The names used for generated files and links all begin with the
+string @code{ntpkey} and include the file type,
+generating host and filestamp,
+as described in the @ref{Cryptographic Data Files} section below.
+
+@node Running the Program, Random Seed File, Description, Top
+@comment node-name, next, previous, up
+@section Running the Program
+
+To test and gain experience with Autokey concepts, log in as root and
+change to the keys directory, usually @code{/usr/local/etc}.
+When run for the
+first time, or if all files with names beginning @code{ntpkey}] have been
+removed, use the @code{ntp-keygen} command without arguments to generate a
+default RSA host key and matching RSA-MD5 certificate with expiration
+date one year hence.
+If run again without options, the program uses the
+existing keys and parameters and generates only a new certificate with
+new expiration date one year hence.
+
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using @code{ntp-keygen}
+with the @code{-T} option and configure
+it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
+
+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.
+A different sign key can be assigned using the @code{-S} option
+and this can be either RSA or DSA type.
+By default, the signature
+message digest type is MD5, but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the @code{-c} option.
+
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
+
+Additional information on trusted groups and identity schemes is on the
+Autokey Public-Key Authentication page.
+
+@include invoke-ntp-keygen.texi
+
+@node Random Seed File, Cryptographic Data Files, Running the Program, Top
+@comment node-name, next, previous, up
+@section Random Seed File
+
+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 OpenSSL library routines.
+If a site supports ssh, it is very likely that means to do this are
+already available.
+The entropy seed used by the OpenSSL library is contained in a file,
+usually called @code{.rnd}, which must be available when
+starting the @code{ntp-keygen} program or @code{ntpd} daemon.
+
+The OpenSSL library looks for the file using the path specified by the
+@code{RANDFILE} environment variable in the user home directory, whether root
+or some other user.
+If the @code{RANDFILE} environment variable is not
+present, the library looks for the @code{.rnd} file in the user home
+directory.
+Since both the @code{ntp-keygen} program and @code{ntpd} daemon must run
+as root, the logical place to put this file is in @code{/.rnd} or
+@code{/root/.rnd}.
+If the file is not available or cannot be written, the program exits
+with a message to the system log.
+
+@node Cryptographic Data Files, , Random Seed File, Top
+@comment node-name, next, previous, up
+@section Cryptographic Data Files
+
+File and link names are in the @code{form ntpkey_key_name.fstamp},
+where @code{key} is the key or parameter type,
+@code{name} is the host or group name and
+@code{fstamp} is the filestamp (NTP seconds) when the file was created).
+By convention, key names in generated file names include both upper and
+lower case characters, while key names in generated link names include
+only lower case characters. The filestamp is not used in generated link
+names.
+
+The key name is a string defining the cryptographic key type.
+Key types include public/private keys host and sign, certificate cert
+and several challenge/response key types.
+By convention, client files used for
+challenges have a par subtype, as in the IFF challenge IFFpar, while
+server files for responses have a key subtype, as in the GQ response
+GQkey.
+
+All files begin with two nonencrypted lines. The first line contains
+the file name in the format @code{ntpkey_key_host.fstamp}.
+The second line contains the datestamp in conventional Unix date format.
+Lines beginning with @code{#} are ignored.
+
+The remainder of the file contains cryptographic data encoded first
+using ASN.1 rules, then encrypted using the DES-CBC algorithm with
+given password and finally written in PEM-encoded printable ASCII text
+preceded and followed by MIME content identifier lines.
+
+The format of the symmetric keys file, ordinarily named @code{ntp.keys},
+is somewhat different than the other files in the interest of backward
+compatibility.
+Ordinarily, the file is generated by this program, but
+it can be constructed and edited using an ordinary text editor.
+
+@example
+# ntpkey_MD5key_hms.local.3564038757
+# Sun Dec 9 02:45:57 2012
+
+ 1 MD5 "]!ghT%O;3)WJ,/Nc:>I # MD5 key
+ 2 MD5 lu+H^tF46BKR-6~p{V_5 # MD5 key
+ 3 MD5 :lnoVsE%Y}z*avh%EtNC # MD5 key
+ 4 MD5 |fdZrf0sF~@PHZ;w-i^V # MD5 key
+ 5 MD5 IyAG>O"}y"LmCRS!*bHC # MD5 key
+ 6 MD5 ">e\A@>hT/661ri52,,H # MD5 key
+ 7 MD5 c9x=M'CfLxax9v)PV-si # MD5 key
+ 8 MD5 E|=jvFVov?Bn|Ev=&aK\ # MD5 key
+ 9 MD5 T!c4UT&`(m$+m+B6,`Q0 # MD5 key
+10 MD5 JVF/1=)=IFbHbJQz..Cd # MD5 key
+11 SHA1 6dea311109529e436c2b4fccae9bc753c16d1b48 # SHA1 key
+12 SHA1 7076f373d86c4848c59ff8046e49cb7d614ec394 # SHA1 key
+13 SHA1 5f48b1b60591eb01b7cf1d33b7774f08d20262d3 # SHA1 key
+14 SHA1 eed5ab9d9497319ec60cf3781d52607e76720178 # SHA1 key
+15 SHA1 f283562611a04c964da8126296f5f8e58c3f85de # SHA1 key
+16 SHA1 1930da171297dd63549af50b29449de17dcf341f # SHA1 key
+17 SHA1 fee892110358cd4382322b889869e750db8e8a8f # SHA1 key
+18 SHA1 b5520c9fadd7ad3fd8bfa061c8821b65d029bb37 # SHA1 key
+19 SHA1 8c74fb440ec80f453ec6aaa62b9baed0ab723b92 # SHA1 key
+20 SHA1 6bc05f734306a189326000970c19b3910f403795 # SHA1 key
+@end example
+
+ Figure 1. Typical Symmetric Key File
+
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Each line of the file contains three fields, first an
+integer between 1 and 65534, inclusive, representing the key identifier
+used in the server and peer configuration commands.
+Next is the key type for the message digest algorithm,
+which in the absence of the
+OpenSSL library must be MD5 to designate the MD5 message digest
+algorithm.
+If the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library.
+However, if
+compatibility with FIPS 140-2 is required, the key type must be either
+SHA or SHA1.
+The key type can be changed using an ASCII text editor.
+
+An MD5 key consists of a printable ASCII string less than or equal to
+16 characters and terminated by whitespace or a # character.
+An OpenSSL
+key consists of a hex-encoded ASCII string of 40 characters, which is
+truncated as necessary.
+
+Note that the keys used by the @code{ntpq} and @code{ntpdc} 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.
+
+The @code{ntp-keygen} program generates a MD5 symmetric keys file
+@code{ntpkey_MD5key_hostname.filestamp}.
+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 @code{ntp.keys}, so @code{ntp-keygen}
+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 @code{ntpq} and
+@code{ntpdc} utilities.
diff --git a/util/ntptime.c b/util/ntptime.c
index 7202dfb5855e..dd5605ca7b30 100644
--- a/util/ntptime.c
+++ b/util/ntptime.c
@@ -15,7 +15,7 @@
#endif /* HAVE_CONFIG_H */
#include "ntp_fp.h"
-#include "ntp_unixtime.h"
+#include "timevalops.h"
#include "ntp_syscall.h"
#include "ntp_stdlib.h"
@@ -48,12 +48,19 @@
#define SCALE_FREQ 65536 /* frequency scale */
+/*
+ * 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 */
/*
* Function prototypes
*/
-char *sprintb (u_int, const char *);
-const char *timex_state (int);
+const char * sprintb (u_int, const char *);
+const char * timex_state (int);
#ifdef SIGSYS
void pll_trap (int);
@@ -67,7 +74,6 @@ 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;
-volatile int debug; /* for libntp */
static char optargs[] = "MNT:cde:f:hm:o:rs:t:";
int
@@ -79,7 +85,7 @@ main(
extern int ntp_optind;
extern char *ntp_optarg;
#ifdef SUBST_ADJTIMEX
- struct timex ntv;
+ struct timex ntv;
#else
struct ntptimeval ntv;
#endif
@@ -97,64 +103,75 @@ main(
int cost = 0;
volatile int rawtime = 0;
- memset((char *)&ntx, 0, sizeof(ntx));
+ ZERO(ntx);
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
+ while ((c = ntp_getopt(argc, argv, optargs)) != EOF) {
+ switch (c) {
#ifdef MOD_MICRO
- case 'M':
- ntx.modes |= MOD_MICRO;
- break;
+ case 'M':
+ ntx.modes |= MOD_MICRO;
+ break;
#endif
#ifdef MOD_NANO
- case 'N':
- ntx.modes |= MOD_NANO;
- break;
+ 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;
+ 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++;
+ 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\
+ 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\
@@ -165,7 +182,7 @@ main(
-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,
+ progname, optargs,
#ifdef MOD_MICRO
"-M switch to microsecond mode\n",
#else
@@ -185,7 +202,7 @@ main(
#else
"",
#endif
- MAXTC);
+ MAXTC);
exit(2);
}
@@ -208,8 +225,7 @@ main(
*/
pll_control = 1;
#ifdef SIGSYS
- if (sigsetjmp(env, 1) == 0)
- {
+ if (sigsetjmp(env, 1) == 0) {
#endif
status = syscall(BADCALL, &ntv); /* dummy parameter */
if ((status < 0) && (errno == ENOSYS))
@@ -225,7 +241,7 @@ main(
#ifdef SIGSYS
if (sigsetjmp(env, 1) == 0) {
#endif
- for (c = 0; c < sizeof times / sizeof times[0]; c++) {
+ for (c = 0; c < COUNTOF(times); c++) {
status = ntp_gettime(&ntv);
if ((status < 0) && (errno == ENOSYS))
--pll_control;
@@ -238,7 +254,7 @@ main(
#endif
if (pll_control >= 0) {
printf("[ us %06d:", times[0]);
- for (c = 1; c < sizeof times / sizeof times[0]; c++)
+ for (c = 1; c < COUNTOF(times); c++)
printf(" %d", times[c] - times[c - 1]);
printf(" ]\n");
}
@@ -272,9 +288,9 @@ main(
* Fetch timekeeping data and display.
*/
status = ntp_gettime(&ntv);
- if (status < 0)
+ if (status < 0) {
perror("ntp_gettime() call fails");
- else {
+ } else {
printf("ntp_gettime() returns code %d (%s)\n",
status, timex_state(status));
time_frac = ntv.time.tv_frac_sec;
@@ -293,14 +309,15 @@ main(
ts.l_uf += ts_roundbit;
ts.l_uf &= ts_mask;
printf(" time %s, (.%0*d),\n",
- prettydate(&ts), fdigits, (int) time_frac);
+ 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));
+ printf(" ntptime=%x.%x unixtime=%x.%0*d %s",
+ (u_int)ts.l_ui, (u_int)ts.l_uf,
+ (int)ntv.time.tv_sec, fdigits,
+ (int)time_frac,
+ ctime((time_t *)&ntv.time.tv_sec));
#if NTP_API > 3
printf(", TAI offset %ld\n", (long)ntv.tai);
#else
@@ -308,11 +325,11 @@ main(
#endif /* NTP_API */
}
status = ntp_adjtime(&ntx);
- if (status < 0)
+ if (status < 0) {
perror((errno == EPERM) ?
"Must be root to set kernel values\nntp_adjtime() call fails" :
"ntp_adjtime() call fails");
- else {
+ } else {
flash = ntx.status;
printf("ntp_adjtime() returns code %d (%s)\n",
status, timex_state(status));
@@ -339,7 +356,7 @@ main(
" time constant %lu, precision %.3f us, tolerance %.0f ppm,\n",
(u_long)ntx.constant, gtemp, ftemp);
if (ntx.shift == 0)
- exit (0);
+ exit(0);
ftemp = (double)ntx.ppsfreq / SCALE_FREQ;
gtemp = (double)ntx.stabil / SCALE_FREQ;
htemp = (double)ntx.jitter;
@@ -353,7 +370,7 @@ main(
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);
+ return 0;
}
/*
@@ -386,56 +403,72 @@ pll_trap(
/*
* Print a value a la the %b format of the kernel's printf
*/
-char *
+const char *
sprintb(
- register u_int v,
- register const char *bits
+ u_int v,
+ const char * bits
)
{
- register char *cp;
- register int i, any = 0;
- register char c;
+ char *cp;
+ char *cplim;
+ int i;
+ int any;
+ char c;
static char buf[132];
- if (bits && *bits == 8)
- (void)sprintf(buf, "0%o", v);
+ if (bits != NULL && *bits == 8)
+ snprintf(buf, sizeof(buf), "0%o", v);
else
- (void)sprintf(buf, "0x%x", v);
+ snprintf(buf, sizeof(buf), "0x%x", v);
cp = buf + strlen(buf);
- if (bits) {
+ cplim = buf + sizeof(buf);
+ if (bits != NULL) {
bits++;
*cp++ = ' ';
*cp++ = '(';
+ any = FALSE;
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;
+ if (v & (1 << (i - 1))) {
+ if (any) {
+ *cp++ = ',';
+ if (cp >= cplim)
+ goto overrun;
+ }
+ any = TRUE;
+ for (; (c = *bits) > 32; bits++) {
+ *cp++ = c;
+ if (cp >= cplim)
+ goto overrun;
+ }
+ } else {
+ for (; *bits > 32; bits++)
+ continue;
+ }
}
*cp++ = ')';
+ if (cp >= cplim)
+ goto overrun;
}
*cp = '\0';
- return (buf);
+ return buf;
+
+ overrun:
+ return "sprintb buffer too small";
}
-const char *timex_states[] = {
+const char * const timex_states[] = {
"OK", "INS", "DEL", "OOP", "WAIT", "ERROR"
};
const char *
timex_state(
- register int s
+ 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);
+ if (s >= 0 && s < COUNTOF(timex_states))
+ return timex_states[s];
+ snprintf(buf, sizeof(buf), "TIME-#%d", s);
+ return buf;
}
diff --git a/util/sht.c b/util/sht.c
index b993de907d08..dfd97ffb9f1f 100644
--- a/util/sht.c
+++ b/util/sht.c
@@ -2,6 +2,8 @@
* sht.c - Testprogram for shared memory refclock
* read/write shared memory segment; see usage
*/
+#include "config.h"
+
#ifndef SYS_WINNT
#include <sys/types.h>
#include <sys/ipc.h>
@@ -19,6 +21,7 @@
#define sleep(x) Sleep(x*1000)
#endif
#include <assert.h>
+
struct shmTime {
int mode; /* 0 - if valid set
* use values,
@@ -28,18 +31,20 @@ struct shmTime {
* use values
* clear valid
*/
- int count;
- time_t clockTimeStampSec;
- int clockTimeStampUSec;
- time_t receiveTimeStampSec;
- int receiveTimeStampUSec;
- int leap;
- int precision;
- int nsamples;
- int valid;
+ volatile int count;
+ time_t clockTimeStampSec;
+ int clockTimeStampUSec;
+ time_t receiveTimeStampSec;
+ int receiveTimeStampUSec;
+ int leap;
+ int precision;
+ int nsamples;
+ volatile int valid;
+ unsigned clockTimeStampNSec; /* Unsigned ns timestamps */
+ unsigned receiveTimeStampNSec; /* Unsigned ns timestamps */
};
-struct shmTime *
+static struct shmTime *
getShmTime (
int unit
)
@@ -62,7 +67,7 @@ getShmTime (
#else
char buf[10];
LPSECURITY_ATTRIBUTES psec=0;
- sprintf (buf,"NTP%d",unit);
+ snprintf (buf, sizeof(buf), "NTP%d", unit);
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa;
HANDLE shmid;
@@ -111,75 +116,145 @@ main (
char *argv[]
)
{
- volatile struct shmTime *p=getShmTime(2);
+ volatile struct shmTime *p;
+ int unit;
+ char *argp;
+
if (argc<=1) {
- printf ("usage: %s r[c][l]|w|snnn\n",argv[0]);
+ usage:
+ printf ("usage: %s [uu:]{r[c][l]|w|snnn}\n",argv[0]);
+ printf (" uu use clock unit uu (default: 2)\n");
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 (" 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;
+
+ srand(time(NULL));
+
+ unit = strtoul(argv[1], &argp, 10);
+ if (argp == argv[1])
+ unit = 2;
+ else if (*argp == ':')
+ argp++;
+ else
+ goto usage;
+
+ p=getShmTime(unit);
+ switch (*argp) {
+ case 's':
+ p->nsamples=atoi(argp+1);
+ break;
+
+ case 'l':
+ p->leap=atoi(argp+1);
+ break;
+
+ case 'p':
+ p->precision=-atoi(argp+1);
+ break;
+
+ case 'r': {
+ int clear=0;
+ int loop=0;
+ printf ("reader\n");
+ while (*++argp) {
+ switch (*argp) {
+ case 'l': loop=1; break;
+ case 'c': clear=1; break;
+ default : goto usage;
+ }
+ }
+again:
+ printf ("mode=%d, count=%d, clock=%ld.%09u, rec=%ld.%09u,\n",
+ p->mode,p->count,
+ (long)p->clockTimeStampSec,p->clockTimeStampNSec,
+ (long)p->receiveTimeStampSec,p->receiveTimeStampNSec);
+ 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);
+ goto again;
+ }
+ break;
}
+
+ case 'w': {
+ /* To show some life action, we read the system
+ * clock and use a bit of fuzz from 'random()' to get a
+ * bit of wobbling into the values (so we can observe a
+ * certain jitter!)
+ */
+ time_t clk_sec, rcv_sec;
+ uint clk_frc, rcv_frc;
+
+#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME)
+
+ /* Here we have a high-resolution system clock, and
+ * we're not afraid to use it!
+ */
+ struct timespec tmptime;
+ if (0 == clock_gettime(CLOCK_REALTIME, &tmptime)) {
+ rcv_sec = tmptime.tv_sec;
+ rcv_frc = (uint)tmptime.tv_nsec;
+ }
+ else
+#endif
+ {
+ time(&rcv_sec);
+ rcv_frc = (uint)random() % 1000000000u;
+ }
+ /* add a wobble of ~3.5msec to the clock time */
+ clk_sec = rcv_sec;
+ clk_frc = rcv_frc + (uint)(random()%7094713 - 3547356);
+ /* normalise result -- the SHM driver is picky! */
+ while ((int)clk_frc < 0) {
+ clk_frc += 1000000000;
+ clk_sec -= 1;
+ }
+ while ((int)clk_frc >= 1000000000) {
+ clk_frc -= 1000000000;
+ clk_sec += 1;
+ }
+
+ /* Most 'real' time sources would create a clock
+ * (reference) time stamp where the fraction is zero,
+ * but that's not an actual requirement. So we show how
+ * to deal with the time stamps in general; changing the
+ * behaviour for cases where the fraction of the
+ * clock time is zero should be trivial.
+ */
+ printf ("writer\n");
+ p->mode=0;
+ if (!p->valid) {
+ p->clockTimeStampSec = clk_sec;
+ p->clockTimeStampUSec = clk_frc / 1000; /* truncate! */
+ p->clockTimeStampNSec = clk_frc;
+ p->receiveTimeStampSec = rcv_sec;
+ p->receiveTimeStampUSec = rcv_frc / 1000; /* truncate! */
+ p->receiveTimeStampNSec = rcv_frc;
+ printf ("%ld.%09u %ld.%09u\n",
+ (long)p->clockTimeStampSec , p->clockTimeStampNSec ,
+ (long)p->receiveTimeStampSec, p->receiveTimeStampNSec);
+ p->valid=1;
+ }
+ else {
+ printf ("p->valid still set\n"); /* not an error! */
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return 0;
}
diff --git a/util/tg.c b/util/tg.c
index aa3950d888bf..8a96a816ad29 100644
--- a/util/tg.c
+++ b/util/tg.c
@@ -266,13 +266,13 @@ main(
/*
* Parse options
*/
- strcpy(device, DEVICE);
+ strlcpy(device, DEVICE, sizeof(device));
year = 0;
while ((temp = getopt(argc, argv, "a:dhilsu:v:y:")) != -1) {
switch (temp) {
case 'a': /* specify audio device (/dev/audio) */
- strcpy(device, optarg);
+ strlcpy(device, optarg, sizeof(device));
break;
case 'd': /* set DST for summer (WWV/H only) */
@@ -374,8 +374,8 @@ main(
case WWV:
printf("year %d day %d time %02d:%02d:%02d tone %d\n",
year, day, hour, minute, second, tone);
- sprintf(code, "%01d%03d%02d%02d%01d", year / 10, day,
- hour, minute, year % 10);
+ snprintf(code, sizeof(code), "%01d%03d%02d%02d%01d",
+ year / 10, day, hour, minute, year % 10);
printf("%s\n", code);
ptr = 8;
for (i = 0; i <= second; i++) {
@@ -431,16 +431,17 @@ main(
year++;
}
if (encode == WWV) {
- sprintf(code, "%01d%03d%02d%02d%01d",
- year / 10, day, hour, minute, year %
- 10);
+ snprintf(code, sizeof(code),
+ "%01d%03d%02d%02d%01d", year / 10,
+ day, hour, minute, year % 10);
printf("\n%s\n", code);
ptr = 8;
}
}
if (encode == IRIG) {
- sprintf(code, "%04x%04d%06d%02d%02d%02d", 0,
- year, day, hour, minute, second);
+ snprintf(code, sizeof(code),
+ "%04x%04d%06d%02d%02d%02d", 0, year, day,
+ hour, minute, second);
printf("%s\n", code);
ptr = 19;
}
diff --git a/util/tg2.c b/util/tg2.c
new file mode 100644
index 000000000000..6d52ef4fb3c1
--- /dev/null
+++ b/util/tg2.c
@@ -0,0 +1,2506 @@
+/*
+ * tg.c generate WWV or IRIG signals for test
+ */
+/*
+ * This program can generate audio signals that simulate the WWV/H
+ * broadcast timecode. Alternatively, it can generate the IRIG-B
+ * timecode commonly used to synchronize laboratory equipment. It is
+ * intended to test the WWV/H driver (refclock_wwv.c) and the IRIG
+ * driver (refclock_irig.c) in the NTP driver collection.
+ *
+ * Besides testing the drivers themselves, this program can be used to
+ * synchronize remote machines over audio transmission lines or program
+ * feeds. The program reads the time on the local machine and sets the
+ * initial epoch of the signal generator within one millisecond.
+ * Alernatively, the initial epoch can be set to an arbitrary time. This
+ * is useful when searching for bugs and testing for correct response to
+ * a leap second in UTC. Note however, the ultimate accuracy is limited
+ * by the intrinsic frequency error of the codec sample clock, which can
+ # reach well over 100 PPM.
+ *
+ * The default is to route generated signals to the line output
+ * jack; the s option on the command line routes these signals to the
+ * internal speaker as well. The v option controls the speaker volume
+ * over the range 0-255. The signal generator by default uses WWV
+ * format; the h option switches to WWVH format and the i option
+ * switches to IRIG-B format.
+ *
+ * Once started the program runs continuously. The default initial epoch
+ * for the signal generator is read from the computer system clock when
+ * the program starts. The y option specifies an alternate epoch using a
+ * string yydddhhmmss, where yy is the year of century, ddd the day of
+ * year, hh the hour of day and mm the minute of hour. For instance,
+ * 1946Z on 1 January 2006 is 060011946. The l option lights the leap
+ * warning bit in the WWV/H timecode, so is handy to check for correct
+ * behavior at the next leap second epoch. The remaining options are
+ * specified below under the Parse Options heading. Most of these are
+ * for testing.
+ *
+ * During operation the program displays the WWV/H timecode (9 digits)
+ * or IRIG timecode (20 digits) as each new string is constructed. The
+ * display is followed by the BCD binary bits as transmitted. Note that
+ * the transmissionorder is low-order first as the frame is processed
+ * left to right. For WWV/H The leap warning L preceeds the first bit.
+ * For IRIG the on-time marker M preceeds the first (units) bit, so its
+ * code is delayed one bit and the next digit (tens) needs only three
+ * bits.
+ *
+ * The program has been tested with the Sun Blade 1500 running Solaris
+ * 10, but not yet with other machines. It uses no special features and
+ * should be readily portable to other hardware and operating systems.
+ *
+ * $Log: tg.c,v $
+ * Revision 1.28 2007/02/12 23:57:45 dmw
+ * v0.23 2007-02-12 dmw:
+ * - Changed statistics to include calculated error
+ * of frequency, based on number of added or removed
+ * cycles over time.
+ *
+ * Revision 1.27 2007/02/09 02:28:59 dmw
+ * v0.22 2007-02-08 dmw:
+ * - Changed default for rate correction to "enabled", "-j" switch now disables.
+ * - Adjusted help message accordingly.
+ * - Added "2007" to modifications note at end of help message.
+ *
+ * Revision 1.26 2007/02/08 03:36:17 dmw
+ * v0.21 2007-02-07 dmw:
+ * - adjusted strings for shorten and lengthen to make
+ * fit on smaller screen.
+ *
+ * Revision 1.25 2007/02/01 06:08:09 dmw
+ * v0.20 2007-02-01 dmw:
+ * - Added periodic display of running time along with legend on IRIG-B, allows tracking how
+ * close IRIG output is to actual clock time.
+ *
+ * Revision 1.24 2007/01/31 19:24:11 dmw
+ * v0.19 2007-01-31 dmw:
+ * - Added tracking of how many seconds have been adjusted,
+ * how many cycles added (actually in milliseconds), how
+ * many cycles removed, print periodically if verbose is
+ * active.
+ * - Corrected lack of lengthen or shorten of minute & hour
+ * pulses for WWV format.
+ *
+ * Revision 1.23 2007/01/13 07:09:12 dmw
+ * v0.18 2007-01-13 dmw:
+ * - added -k option, which allows force of long or short
+ * cycles, to test against IRIG-B decoder.
+ *
+ * Revision 1.22 2007/01/08 16:27:23 dmw
+ * v0.17 2007-01-08 dmw:
+ * - Changed -j option to **enable** rate correction, not disable.
+ *
+ * Revision 1.21 2007/01/08 06:22:36 dmw
+ * v0.17 2007-01-08 dmw:
+ * - Run stability check versus ongoing system clock (assume NTP correction)
+ * and adjust time code rate to try to correct, if gets too far out of sync.
+ * Disable this algorithm with -j option.
+ *
+ * Revision 1.20 2006/12/19 04:59:04 dmw
+ * v0.16 2006-12-18 dmw
+ * - Corrected print of setting of output frequency, always
+ * showed 8000 samples/sec, now as specified on command line.
+ * - Modified to reflect new employer Norscan.
+ *
+ * Revision 1.19 2006/12/19 03:45:38 dmw
+ * v0.15 2006-12-18 dmw:
+ * - Added count of number of seconds to output then exit,
+ * default zero for forever.
+ *
+ * Revision 1.18 2006/12/18 05:43:36 dmw
+ * v0.14 2006-12-17 dmw:
+ * - Corrected WWV(H) signal to leave "tick" sound off of 29th and 59th second of minute.
+ * - Adjusted verbose output format for WWV(H).
+ *
+ * Revision 1.17 2006/12/18 02:31:33 dmw
+ * v0.13 2006-12-17 dmw:
+ * - Put SPARC code back in, hopefully will work, but I don't have
+ * a SPARC to try it on...
+ * - Reworked Verbose mode, different flag to initiate (x not v)
+ * and actually implement turn off of verbosity when this flag used.
+ * - Re-claimed v flag for output level.
+ * - Note that you must define OSS_MODS to get OSS to compile,
+ * otherwise will expect to compile using old SPARC options, as
+ * it used to be.
+ *
+ * Revision 1.16 2006/10/26 19:08:43 dmw
+ * v0.12 2006-10-26 dmw:
+ * - Reversed output binary dump for IRIG, makes it easier to read the numbers.
+ *
+ * Revision 1.15 2006/10/24 15:57:09 dmw
+ * v0.11 2006-10-24 dmw:
+ * - another tweak.
+ *
+ * Revision 1.14 2006/10/24 15:55:53 dmw
+ * v0.11 2006-10-24 dmw:
+ * - Curses a fix to the fix to the fix of the usaeg.
+ *
+ * Revision 1.13 2006/10/24 15:53:25 dmw
+ * v0.11 (still) 2006-10-24 dmw:
+ * - Messed with usage message that's all.
+ *
+ * Revision 1.12 2006/10/24 15:50:05 dmw
+ * v0.11 2006-10-24 dmw:
+ * - oops, needed to note "hours" in usage of that offset.
+ *
+ * Revision 1.11 2006/10/24 15:49:09 dmw
+ * v0.11 2006-10-24 dmw:
+ * - Added ability to offset actual time sent, from the UTC time
+ * as per the computer.
+ *
+ * Revision 1.10 2006/10/24 03:25:55 dmw
+ * v0.10 2006-10-23 dmw:
+ * - Corrected polarity of correction of offset when going into or out of DST.
+ * - Ensure that zero offset is always positive (pet peeve).
+ *
+ * Revision 1.9 2006/10/24 00:00:35 dmw
+ * v0.9 2006-10-23 dmw:
+ * - Shift time offset when DST in or out.
+ *
+ * Revision 1.8 2006/10/23 23:49:28 dmw
+ * v0.8 2006-10-23 dmw:
+ * - made offset of zero default positive.
+ *
+ * Revision 1.7 2006/10/23 23:44:13 dmw
+ * v0.7 2006-10-23 dmw:
+ * - Added unmodulated and inverted unmodulated output.
+ *
+ * Revision 1.6 2006/10/23 18:10:37 dmw
+ * v0.6 2006-10-23 dmw:
+ * - Cleaned up usage message.
+ * - Require at least one option, or prints usage message and exits.
+ *
+ * Revision 1.5 2006/10/23 16:58:10 dmw
+ * v0.5 2006-10-23 dmw:
+ * - Finally added a usage message.
+ * - Added leap second pending and DST change pending into IEEE 1344.
+ * - Default code type is now IRIG-B with IEEE 1344.
+ *
+ * Revision 1.4 2006/10/23 03:27:25 dmw
+ * v0.4 2006-10-22 dmw:
+ * - Added leap second addition and deletion.
+ * - Added DST changing forward and backward.
+ * - Changed date specification to more conventional year, month, and day of month
+ * (rather than day of year).
+ *
+ * Revision 1.3 2006/10/22 21:04:12 dmw
+ * v0.2 2006-10-22 dmw:
+ * - Corrected format of legend line.
+ *
+ * Revision 1.2 2006/10/22 21:01:07 dmw
+ * v0.1 2006-10-22 dmw:
+ * - Added some more verbose output (as is my style)
+ * - Corrected frame format - there were markers in the
+ * middle of frames, now correctly as "zero" bits.
+ * - Added header line to show fields of output.
+ * - Added straight binary seconds, were not implemented
+ * before.
+ * - Added IEEE 1344 with parity.
+ *
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#undef VERSION /* avoid conflict below */
+#endif
+
+#ifdef HAVE_SYS_SOUNDCARD_H
+#include <sys/soundcard.h>
+#else
+# ifdef HAVE_SYS_AUDIOIO_H
+# include <sys/audioio.h>
+# else
+# include <sys/audio.h>
+# endif
+#endif
+
+#include "ntp_stdlib.h" /* for strlcat(), strlcpy() */
+
+#include <math.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+
+#define VERSION (0)
+#define ISSUE (23)
+#define ISSUE_DATE "2007-02-12"
+
+#define SECOND (8000) /* one second of 125-us samples */
+#define BUFLNG (400) /* buffer size */
+#define DEVICE "/dev/audio" /* default audio device */
+#define WWV (0) /* WWV encoder */
+#define IRIG (1) /* IRIG-B encoder */
+#define OFF (0) /* zero amplitude */
+#define LOW (1) /* low amplitude */
+#define HIGH (2) /* high amplitude */
+#define DATA0 (200) /* WWV/H 0 pulse */
+#define DATA1 (500) /* WWV/H 1 pulse */
+#define PI (800) /* WWV/H PI pulse */
+#define M2 (2) /* IRIG 0 pulse */
+#define M5 (5) /* IRIG 1 pulse */
+#define M8 (8) /* IRIG PI pulse */
+
+#define NUL (0)
+
+#define SECONDS_PER_MINUTE (60)
+#define SECONDS_PER_HOUR (3600)
+
+#define OUTPUT_DATA_STRING_LENGTH (200)
+
+/* Attempt at unmodulated - "high" */
+int u6000[] = {
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 0- 9 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 10-19 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 20-29 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 30-39 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 40-49 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 50-59 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, /* 60-69 */
+ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247}; /* 70-79 */
+
+/* Attempt at unmodulated - "low" */
+int u3000[] = {
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 0- 9 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 10-19 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 20-29 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 30-39 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 40-49 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 50-59 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, /* 60-69 */
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119}; /* 70-79 */
+
+/*
+ * Companded sine table amplitude 3000 units
+ */
+int c3000[] = {1, 48, 63, 70, 78, 82, 85, 89, 92, 94, /* 0-9 */
+ 96, 98, 99, 100, 101, 101, 102, 103, 103, 103, /* 10-19 */
+ 103, 103, 103, 103, 102, 101, 101, 100, 99, 98, /* 20-29 */
+ 96, 94, 92, 89, 85, 82, 78, 70, 63, 48, /* 30-39 */
+ 129, 176, 191, 198, 206, 210, 213, 217, 220, 222, /* 40-49 */
+ 224, 226, 227, 228, 229, 229, 230, 231, 231, 231, /* 50-59 */
+ 231, 231, 231, 231, 230, 229, 229, 228, 227, 226, /* 60-69 */
+ 224, 222, 220, 217, 213, 210, 206, 198, 191, 176}; /* 70-79 */
+/*
+ * Companded sine table amplitude 6000 units
+ */
+int c6000[] = {1, 63, 78, 86, 93, 98, 101, 104, 107, 110, /* 0-9 */
+ 112, 113, 115, 116, 117, 117, 118, 118, 119, 119, /* 10-19 */
+ 119, 119, 119, 118, 118, 117, 117, 116, 115, 113, /* 20-29 */
+ 112, 110, 107, 104, 101, 98, 93, 86, 78, 63, /* 30-39 */
+ 129, 191, 206, 214, 221, 226, 229, 232, 235, 238, /* 40-49 */
+ 240, 241, 243, 244, 245, 245, 246, 246, 247, 247, /* 50-59 */
+ 247, 247, 247, 246, 246, 245, 245, 244, 243, 241, /* 60-69 */
+ 240, 238, 235, 232, 229, 226, 221, 214, 206, 191}; /* 70-79 */
+
+/*
+ * 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 DATA (0) /* send data (0, 1, PI) */
+#define COEF (1) /* send BCD bit */
+#define DEC (2) /* decrement to next digit and send PI */
+#define MIN (3) /* minute pulse */
+#define LEAP (4) /* leap warning */
+#define DUT1 (5) /* DUT1 bits */
+#define DST1 (6) /* DST1 bit */
+#define DST2 (7) /* DST2 bit */
+#define DECZ (8) /* decrement to next digit and send zero */
+#define DECC (9) /* decrement to next digit and send bit */
+#define NODEC (10) /* no decerement to next digit, send PI */
+#define DECX (11) /* decrement to next digit, send PI, but no tick */
+#define DATAX (12) /* send data (0, 1, PI), but no tick */
+
+/*
+ * WWV/H format (100-Hz, 9 digits, 1 m frame)
+ */
+struct progx progx[] = {
+ {MIN, 800}, /* 0 minute sync pulse */
+ {DATA, DATA0}, /* 1 */
+ {DST2, 0}, /* 2 DST2 */
+ {LEAP, 0}, /* 3 leap warning */
+ {COEF, 1}, /* 4 1 year units */
+ {COEF, 2}, /* 5 2 */
+ {COEF, 4}, /* 6 4 */
+ {COEF, 8}, /* 7 8 */
+ {DEC, DATA0}, /* 8 */
+ {DATA, PI}, /* 9 p1 */
+ {COEF, 1}, /* 10 1 minute units */
+ {COEF, 2}, /* 11 2 */
+ {COEF, 4}, /* 12 4 */
+ {COEF, 8}, /* 13 8 */
+ {DEC, DATA0}, /* 14 */
+ {COEF, 1}, /* 15 10 minute tens */
+ {COEF, 2}, /* 16 20 */
+ {COEF, 4}, /* 17 40 */
+ {COEF, 8}, /* 18 80 (not used) */
+ {DEC, PI}, /* 19 p2 */
+ {COEF, 1}, /* 20 1 hour units */
+ {COEF, 2}, /* 21 2 */
+ {COEF, 4}, /* 22 4 */
+ {COEF, 8}, /* 23 8 */
+ {DEC, DATA0}, /* 24 */
+ {COEF, 1}, /* 25 10 hour tens */
+ {COEF, 2}, /* 26 20 */
+ {COEF, 4}, /* 27 40 (not used) */
+ {COEF, 8}, /* 28 80 (not used) */
+ {DECX, PI}, /* 29 p3 */
+ {COEF, 1}, /* 30 1 day units */
+ {COEF, 2}, /* 31 2 */
+ {COEF, 4}, /* 32 4 */
+ {COEF, 8}, /* 33 8 */
+ {DEC, DATA0}, /* 34 not used */
+ {COEF, 1}, /* 35 10 day tens */
+ {COEF, 2}, /* 36 20 */
+ {COEF, 4}, /* 37 40 */
+ {COEF, 8}, /* 38 80 */
+ {DEC, PI}, /* 39 p4 */
+ {COEF, 1}, /* 40 100 day hundreds */
+ {COEF, 2}, /* 41 200 */
+ {COEF, 4}, /* 42 400 (not used) */
+ {COEF, 8}, /* 43 800 (not used) */
+ {DEC, DATA0}, /* 44 */
+ {DATA, DATA0}, /* 45 */
+ {DATA, DATA0}, /* 46 */
+ {DATA, DATA0}, /* 47 */
+ {DATA, DATA0}, /* 48 */
+ {DATA, PI}, /* 49 p5 */
+ {DUT1, 8}, /* 50 DUT1 sign */
+ {COEF, 1}, /* 51 10 year tens */
+ {COEF, 2}, /* 52 20 */
+ {COEF, 4}, /* 53 40 */
+ {COEF, 8}, /* 54 80 */
+ {DST1, 0}, /* 55 DST1 */
+ {DUT1, 1}, /* 56 0.1 DUT1 fraction */
+ {DUT1, 2}, /* 57 0.2 */
+ {DUT1, 4}, /* 58 0.4 */
+ {DATAX, PI}, /* 59 p6 */
+ {DATA, DATA0}, /* 60 leap */
+};
+
+/*
+ * IRIG format frames (1000 Hz, 1 second for 10 frames of data)
+ */
+
+/*
+ * IRIG format frame 10 - MS straight binary seconds
+ */
+struct progx progu[] = {
+ {COEF, 2}, /* 0 0x0 0200 seconds */
+ {COEF, 4}, /* 1 0x0 0400 */
+ {COEF, 8}, /* 2 0x0 0800 */
+ {DECC, 1}, /* 3 0x0 1000 */
+ {COEF, 2}, /* 4 0x0 2000 */
+ {COEF, 4}, /* 6 0x0 4000 */
+ {COEF, 8}, /* 7 0x0 8000 */
+ {DECC, 1}, /* 8 0x1 0000 */
+ {COEF, 2}, /* 9 0x2 0000 - but only 86,401 / 0x1 5181 seconds in a day, so always zero */
+ {NODEC, M8}, /* 9 PI */
+};
+
+/*
+ * IRIG format frame 8 - MS control functions
+ */
+struct progx progv[] = {
+ {COEF, 2}, /* 0 CF # 19 */
+ {COEF, 4}, /* 1 CF # 20 */
+ {COEF, 8}, /* 2 CF # 21 */
+ {DECC, 1}, /* 3 CF # 22 */
+ {COEF, 2}, /* 4 CF # 23 */
+ {COEF, 4}, /* 6 CF # 24 */
+ {COEF, 8}, /* 7 CF # 25 */
+ {DECC, 1}, /* 8 CF # 26 */
+ {COEF, 2}, /* 9 CF # 27 */
+ {DEC, M8}, /* 10 PI */
+};
+
+/*
+ * IRIG format frames 7 & 9 - LS control functions & LS straight binary seconds
+ */
+struct progx progw[] = {
+ {COEF, 1}, /* 0 CF # 10, 0x0 0001 seconds */
+ {COEF, 2}, /* 1 CF # 11, 0x0 0002 */
+ {COEF, 4}, /* 2 CF # 12, 0x0 0004 */
+ {COEF, 8}, /* 3 CF # 13, 0x0 0008 */
+ {DECC, 1}, /* 4 CF # 14, 0x0 0010 */
+ {COEF, 2}, /* 6 CF # 15, 0x0 0020 */
+ {COEF, 4}, /* 7 CF # 16, 0x0 0040 */
+ {COEF, 8}, /* 8 CF # 17, 0x0 0080 */
+ {DECC, 1}, /* 9 CF # 18, 0x0 0100 */
+ {NODEC, M8}, /* 10 PI */
+};
+
+/*
+ * IRIG format frames 2 to 6 - minutes, hours, days, hundreds days, 2 digit years (also called control functions bits 1-9)
+ */
+struct progx progy[] = {
+ {COEF, 1}, /* 0 1 units, CF # 1 */
+ {COEF, 2}, /* 1 2 units, CF # 2 */
+ {COEF, 4}, /* 2 4 units, CF # 3 */
+ {COEF, 8}, /* 3 8 units, CF # 4 */
+ {DECZ, M2}, /* 4 zero bit, CF # 5 / unused, default zero in years */
+ {COEF, 1}, /* 5 10 tens, CF # 6 */
+ {COEF, 2}, /* 6 20 tens, CF # 7*/
+ {COEF, 4}, /* 7 40 tens, CF # 8*/
+ {COEF, 8}, /* 8 80 tens, CF # 9*/
+ {DEC, M8}, /* 9 PI */
+};
+
+/*
+ * IRIG format first frame, frame 1 - seconds
+ */
+struct progx progz[] = {
+ {MIN, M8}, /* 0 PI (on-time marker for the second at zero cross of 1st cycle) */
+ {COEF, 1}, /* 1 1 units */
+ {COEF, 2}, /* 2 2 */
+ {COEF, 4}, /* 3 4 */
+ {COEF, 8}, /* 4 8 */
+ {DECZ, M2}, /* 5 zero bit */
+ {COEF, 1}, /* 6 10 tens */
+ {COEF, 2}, /* 7 20 */
+ {COEF, 4}, /* 8 40 */
+ {DEC, M8}, /* 9 PI */
+};
+
+/* LeapState values. */
+#define LEAPSTATE_NORMAL (0)
+#define LEAPSTATE_DELETING (1)
+#define LEAPSTATE_INSERTING (2)
+#define LEAPSTATE_ZERO_AFTER_INSERT (3)
+
+
+/*
+ * Forward declarations
+ */
+void WWV_Second(int, int); /* send second */
+void WWV_SecondNoTick(int, int); /* send second with no tick */
+void digit(int); /* encode digit */
+void peep(int, int, int); /* send cycles */
+void poop(int, int, int, int); /* Generate unmodulated from similar tables */
+void delay(int); /* delay samples */
+int ConvertMonthDayToDayOfYear (int, int, int); /* Calc day of year from year month & day */
+void Help (void); /* Usage message */
+void ReverseString(char *);
+
+/*
+ * Extern declarations, don't know why not in headers
+ */
+//float round ( float );
+
+/*
+ * Global variables
+ */
+char buffer[BUFLNG]; /* output buffer */
+int bufcnt = 0; /* buffer counter */
+int fd; /* audio codec file descriptor */
+int tone = 1000; /* WWV sync frequency */
+int HourTone = 1500; /* WWV hour on-time frequency */
+int encode = IRIG; /* encoder select */
+int leap = 0; /* leap indicator */
+int DstFlag = 0; /* winter/summer time */
+int dut1 = 0; /* DUT1 correction (sign, magnitude) */
+int utc = 0; /* option epoch */
+int IrigIncludeYear = FALSE; /* Whether to send year in first control functions area, between P5 and P6. */
+int IrigIncludeIeee = FALSE; /* Whether to send IEEE 1344 control functions extensions between P6 and P8. */
+int StraightBinarySeconds = 0;
+int ControlFunctions = 0;
+int Debug = FALSE;
+int Verbose = TRUE;
+char *CommandName;
+
+#ifndef HAVE_SYS_SOUNDCARD_H
+int level = AUDIO_MAX_GAIN / 8; /* output level */
+int port = AUDIO_LINE_OUT; /* output port */
+#endif
+
+int TotalSecondsCorrected = 0;
+int TotalCyclesAdded = 0;
+int TotalCyclesRemoved = 0;
+
+
+/*
+ * Main program
+ */
+int
+main(
+ int argc, /* command line options */
+ char **argv /* poiniter to list of tokens */
+ )
+{
+#ifndef HAVE_SYS_SOUNDCARD_H
+ audio_info_t info; /* Sun audio structure */
+ int rval; /* For IOCTL calls */
+#endif
+
+ struct timeval TimeValue; /* System clock at startup */
+ time_t SecondsPartOfTime; /* Sent to gmtime() for calculation of TimeStructure (can apply offset). */
+ time_t BaseRealTime; /* Base realtime so can determine seconds since starting. */
+ time_t NowRealTime; /* New realtime to can determine seconds as of now. */
+ unsigned SecondsRunningRealTime; /* Difference between NowRealTime and BaseRealTime. */
+ unsigned SecondsRunningSimulationTime; /* Time that the simulator has been running. */
+ int SecondsRunningDifference; /* Difference between what real time says we have been running */
+ /* and what simulator says we have been running - will slowly */
+ /* change because of clock drift. */
+ int ExpectedRunningDifference = 0; /* Stable value that we've obtained from check at initial start-up. */
+ unsigned StabilityCount; /* Used to check stability of difference while starting */
+#define RUN_BEFORE_STABILITY_CHECK (30) // Must run this many seconds before even checking stability.
+#define MINIMUM_STABILITY_COUNT (10) // Number of consecutive differences that need to be within initial stability band to say we are stable.
+#define INITIAL_STABILITY_BAND ( 2) // Determining initial stability for consecutive differences within +/- this value.
+#define RUNNING_STABILITY_BAND ( 5) // When running, stability is defined as difference within +/- this value.
+
+ struct tm *TimeStructure = NULL; /* Structure returned by gmtime */
+ char device[200]; /* audio device */
+ char code[200]; /* timecode */
+ int temp;
+ int arg = 0;
+ int sw = 0;
+ int ptr = 0;
+
+ int Year;
+ int Month;
+ int DayOfMonth;
+ int Hour;
+ int Minute;
+ int Second = 0;
+ int DayOfYear;
+
+ int BitNumber;
+#ifdef HAVE_SYS_SOUNDCARD_H
+ int AudioFormat;
+ int MonoStereo; /* 0=mono, 1=stereo */
+#define MONO (0)
+#define STEREO (1)
+ int SampleRate;
+ int SampleRateDifference;
+#endif
+ int SetSampleRate;
+ char FormatCharacter = '3'; /* Default is IRIG-B with IEEE 1344 extensions */
+ char AsciiValue;
+ int HexValue;
+ int OldPtr = 0;
+ int FrameNumber = 0;
+
+ /* Time offset for IEEE 1344 indication. */
+ float TimeOffset = 0.0;
+ int OffsetSignBit = 0;
+ int OffsetOnes = 0;
+ int OffsetHalf = 0;
+
+ int TimeQuality = 0; /* Time quality for IEEE 1344 indication. */
+ char ParityString[200]; /* Partial output string, to calculate parity on. */
+ int ParitySum = 0;
+ int ParityValue;
+ char *StringPointer;
+
+ /* Flags to indicate requested leap second addition or deletion by command line option. */
+ /* Should be mutually exclusive - generally ensured by code which interprets command line option. */
+ int InsertLeapSecond = FALSE;
+ int DeleteLeapSecond = FALSE;
+
+ /* Date and time of requested leap second addition or deletion. */
+ int LeapYear = 0;
+ int LeapMonth = 0;
+ int LeapDayOfMonth = 0;
+ int LeapHour = 0;
+ int LeapMinute = 0;
+ int LeapDayOfYear = 0;
+
+ /* State flag for the insertion and deletion of leap seconds, esp. deletion, */
+ /* where the logic gets a bit tricky. */
+ int LeapState = LEAPSTATE_NORMAL;
+
+ /* Flags for indication of leap second pending and leap secod polarity in IEEE 1344 */
+ int LeapSecondPending = FALSE;
+ int LeapSecondPolarity = FALSE;
+
+ /* Date and time of requested switch into or out of DST by command line option. */
+ int DstSwitchYear = 0;
+ int DstSwitchMonth = 0;
+ int DstSwitchDayOfMonth = 0;
+ int DstSwitchHour = 0;
+ int DstSwitchMinute = 0;
+ int DstSwitchDayOfYear = 0;
+
+ /* Indicate when we have been asked to switch into or out of DST by command line option. */
+ int DstSwitchFlag = FALSE;
+
+ /* To allow predict for DstPendingFlag in IEEE 1344 */
+ int DstSwitchPendingYear = 0; /* Default value isn't valid, but I don't care. */
+ int DstSwitchPendingDayOfYear = 0;
+ int DstSwitchPendingHour = 0;
+ int DstSwitchPendingMinute = 0;
+
+ /* /Flag for indication of a DST switch pending in IEEE 1344 */
+ int DstPendingFlag = FALSE;
+
+ /* Attempt at unmodulated */
+ int Unmodulated = FALSE;
+ int UnmodulatedInverted = FALSE;
+
+ /* Offset to actual time value sent. */
+ float UseOffsetHoursFloat;
+ int UseOffsetSecondsInt = 0;
+ float UseOffsetSecondsFloat;
+
+ /* String to allow us to put out reversed data - so can read the binary numbers. */
+ char OutputDataString[OUTPUT_DATA_STRING_LENGTH];
+
+ /* Number of seconds to send before exiting. Default = 0 = forever. */
+ int SecondsToSend = 0;
+ int CountOfSecondsSent = 0; /* Counter of seconds */
+
+ /* Flags to indicate whether to add or remove a cycle for time adjustment. */
+ int AddCycle = FALSE; // We are ahead, add cycle to slow down and get back in sync.
+ int RemoveCycle = FALSE; // We are behind, remove cycle to slow down and get back in sync.
+ int RateCorrection; // Aggregate flag for passing to subroutines.
+ int EnableRateCorrection = TRUE;
+
+ float RatioError;
+
+
+ CommandName = argv[0];
+
+ if (argc < 1)
+ {
+ Help ();
+ exit (-1);
+ }
+
+ /*
+ * Parse options
+ */
+ strlcpy(device, DEVICE, sizeof(device));
+ Year = 0;
+ SetSampleRate = SECOND;
+
+#if HAVE_SYS_SOUNDCARD_H
+ while ((temp = getopt(argc, argv, "a:b:c:df:g:hHi:jk:l:o:q:r:stu:xy:z?")) != -1) {
+#else
+ while ((temp = getopt(argc, argv, "a:b:c:df:g:hHi:jk:l:o:q:r:stu:v:xy:z?")) != -1) {
+#endif
+ switch (temp) {
+
+ case 'a': /* specify audio device (/dev/audio) */
+ strlcpy(device, optarg, sizeof(device));
+ break;
+
+ case 'b': /* Remove (delete) a leap second at the end of the specified minute. */
+ sscanf(optarg, "%2d%2d%2d%2d%2d", &LeapYear, &LeapMonth, &LeapDayOfMonth,
+ &LeapHour, &LeapMinute);
+ InsertLeapSecond = FALSE;
+ DeleteLeapSecond = TRUE;
+ break;
+
+ case 'c': /* specify number of seconds to send output for before exiting, 0 = forever */
+ sscanf(optarg, "%d", &SecondsToSend);
+ break;
+
+ case 'd': /* set DST for summer (WWV/H only) / start with DST active (IRIG) */
+ DstFlag++;
+ break;
+
+ case 'f': /* select format: i=IRIG-98 (default) 2=IRIG-2004 3-IRIG+IEEE-1344 w=WWV(H) */
+ sscanf(optarg, "%c", &FormatCharacter);
+ break;
+
+ case 'g': /* Date and time to switch back into / out of DST active. */
+ sscanf(optarg, "%2d%2d%2d%2d%2d", &DstSwitchYear, &DstSwitchMonth, &DstSwitchDayOfMonth,
+ &DstSwitchHour, &DstSwitchMinute);
+ DstSwitchFlag = TRUE;
+ break;
+
+ case 'h':
+ case 'H':
+ case '?':
+ Help ();
+ exit(-1);
+ break;
+
+ case 'i': /* Insert (add) a leap second at the end of the specified minute. */
+ sscanf(optarg, "%2d%2d%2d%2d%2d", &LeapYear, &LeapMonth, &LeapDayOfMonth,
+ &LeapHour, &LeapMinute);
+ InsertLeapSecond = TRUE;
+ DeleteLeapSecond = FALSE;
+ break;
+
+ case 'j':
+ EnableRateCorrection = FALSE;
+ break;
+
+ case 'k':
+ sscanf (optarg, "%d", &RateCorrection);
+ EnableRateCorrection = FALSE;
+ if (RateCorrection < 0)
+ {
+ RemoveCycle = TRUE;
+ AddCycle = FALSE;
+
+ if (Verbose)
+ printf ("\n> Forcing rate correction removal of cycle...\n");
+ }
+ else
+ {
+ if (RateCorrection > 0)
+ {
+ RemoveCycle = FALSE;
+ AddCycle = TRUE;
+
+ if (Verbose)
+ printf ("\n> Forcing rate correction addition of cycle...\n");
+ }
+ }
+ break;
+
+ case 'l': /* use time offset from UTC */
+ sscanf(optarg, "%f", &UseOffsetHoursFloat);
+ UseOffsetSecondsFloat = UseOffsetHoursFloat * (float) SECONDS_PER_HOUR;
+ UseOffsetSecondsInt = (int) (UseOffsetSecondsFloat + 0.5);
+ break;
+
+ case 'o': /* Set IEEE 1344 time offset in hours - positive or negative, to the half hour */
+ sscanf(optarg, "%f", &TimeOffset);
+ if (TimeOffset >= -0.2)
+ {
+ OffsetSignBit = 0;
+
+ if (TimeOffset > 0)
+ {
+ OffsetOnes = TimeOffset;
+
+ if ( (TimeOffset - floor(TimeOffset)) >= 0.4)
+ OffsetHalf = 1;
+ else
+ OffsetHalf = 0;
+ }
+ else
+ {
+ OffsetOnes = 0;
+ OffsetHalf = 0;
+ }
+ }
+ else
+ {
+ OffsetSignBit = 1;
+ OffsetOnes = -TimeOffset;
+
+ if ( (ceil(TimeOffset) - TimeOffset) >= 0.4)
+ OffsetHalf = 1;
+ else
+ OffsetHalf = 0;
+ }
+
+ /*printf ("\nGot TimeOffset = %3.1f, OffsetSignBit = %d, OffsetOnes = %d, OffsetHalf = %d...\n",
+ TimeOffset, OffsetSignBit, OffsetOnes, OffsetHalf);
+ */
+ break;
+
+ case 'q': /* Hex quality code 0 to 0x0F - 0 = maximum, 0x0F = no lock */
+ sscanf(optarg, "%x", &TimeQuality);
+ TimeQuality &= 0x0F;
+ /*printf ("\nGot TimeQuality = 0x%1X...\n", TimeQuality);
+ */
+ break;
+
+ case 'r': /* sample rate (nominally 8000, integer close to 8000 I hope) */
+ sscanf(optarg, "%d", &SetSampleRate);
+ break;
+
+ case 's': /* set leap warning bit (WWV/H only) */
+ leap++;
+ break;
+
+ case 't': /* select WWVH sync frequency */
+ tone = 1200;
+ break;
+
+ case 'u': /* set DUT1 offset (-7 to +7) */
+ sscanf(optarg, "%d", &dut1);
+ if (dut1 < 0)
+ dut1 = abs(dut1);
+ else
+ dut1 |= 0x8;
+ break;
+
+#ifndef HAVE_SYS_SOUNDCARD_H
+ case 'v': /* set output level (0-255) */
+ sscanf(optarg, "%d", &level);
+ break;
+#endif
+
+ case 'x': /* Turn off verbose output. */
+ Verbose = FALSE;
+ break;
+
+ case 'y': /* Set initial date and time */
+ sscanf(optarg, "%2d%2d%2d%2d%2d%2d", &Year, &Month, &DayOfMonth,
+ &Hour, &Minute, &Second);
+ utc++;
+ break;
+
+ case 'z': /* Turn on Debug output (also turns on Verbose below) */
+ Debug = TRUE;
+ break;
+
+ default:
+ printf("Invalid option \"%c\", aborting...\n", temp);
+ exit (-1);
+ break;
+ }
+ }
+
+ if (Debug)
+ Verbose = TRUE;
+
+ if (InsertLeapSecond || DeleteLeapSecond)
+ {
+ LeapDayOfYear = ConvertMonthDayToDayOfYear (LeapYear, LeapMonth, LeapDayOfMonth);
+
+ if (Debug)
+ {
+ printf ("\nHave request for leap second %s at year %4d day %3d at %2.2dh%2.2d....\n",\
+ DeleteLeapSecond ? "DELETION" : (InsertLeapSecond ? "ADDITION" : "( error ! )" ),
+ LeapYear, LeapDayOfYear, LeapHour, LeapMinute);
+ }
+ }
+
+ if (DstSwitchFlag)
+ {
+ DstSwitchDayOfYear = ConvertMonthDayToDayOfYear (DstSwitchYear, DstSwitchMonth, DstSwitchDayOfMonth);
+
+ /* Figure out time of minute previous to DST switch, so can put up warning flag in IEEE 1344 */
+ DstSwitchPendingYear = DstSwitchYear;
+ DstSwitchPendingDayOfYear = DstSwitchDayOfYear;
+ DstSwitchPendingHour = DstSwitchHour;
+ DstSwitchPendingMinute = DstSwitchMinute - 1;
+ if (DstSwitchPendingMinute < 0)
+ {
+ DstSwitchPendingMinute = 59;
+ DstSwitchPendingHour--;
+ if (DstSwitchPendingHour < 0)
+ {
+ DstSwitchPendingHour = 23;
+ DstSwitchPendingDayOfYear--;
+ if (DstSwitchPendingDayOfYear < 1)
+ {
+ DstSwitchPendingYear--;
+ }
+ }
+ }
+
+ if (Debug)
+ {
+ printf ("\nHave DST switch request for year %4d day %3d at %2.2dh%2.2d,",
+ DstSwitchYear, DstSwitchDayOfYear, DstSwitchHour, DstSwitchMinute);
+ printf ("\n so will have warning at year %4d day %3d at %2.2dh%2.2d.\n",
+ DstSwitchPendingYear, DstSwitchPendingDayOfYear, DstSwitchPendingHour, DstSwitchPendingMinute);
+ }
+ }
+
+ switch (tolower(FormatCharacter)) {
+ case 'i':
+ printf ("\nFormat is IRIG-1998 (no year coded)...\n\n");
+ encode = IRIG;
+ IrigIncludeYear = FALSE;
+ IrigIncludeIeee = FALSE;
+ break;
+
+ case '2':
+ printf ("\nFormat is IRIG-2004 (BCD year coded)...\n\n");
+ encode = IRIG;
+ IrigIncludeYear = TRUE;
+ IrigIncludeIeee = FALSE;
+ break;
+
+ case '3':
+ printf ("\nFormat is IRIG with IEEE-1344 (BCD year coded, and more control functions)...\n\n");
+ encode = IRIG;
+ IrigIncludeYear = TRUE;
+ IrigIncludeIeee = TRUE;
+ break;
+
+ case '4':
+ printf ("\nFormat is unmodulated IRIG with IEEE-1344 (BCD year coded, and more control functions)...\n\n");
+ encode = IRIG;
+ IrigIncludeYear = TRUE;
+ IrigIncludeIeee = TRUE;
+
+ Unmodulated = TRUE;
+ UnmodulatedInverted = FALSE;
+ break;
+
+ case '5':
+ printf ("\nFormat is inverted unmodulated IRIG with IEEE-1344 (BCD year coded, and more control functions)...\n\n");
+ encode = IRIG;
+ IrigIncludeYear = TRUE;
+ IrigIncludeIeee = TRUE;
+
+ Unmodulated = TRUE;
+ UnmodulatedInverted = TRUE;
+ break;
+
+ case 'w':
+ printf ("\nFormat is WWV(H)...\n\n");
+ encode = WWV;
+ break;
+
+ default:
+ printf ("\n\nUnexpected format value of \'%c\', cannot parse, aborting...\n\n", FormatCharacter);
+ exit (-1);
+ break;
+ }
+
+ /*
+ * Open audio device and set options
+ */
+ fd = open(device, O_WRONLY);
+ if (fd <= 0) {
+ printf("Unable to open audio device \"%s\", aborting: %s\n", device, strerror(errno));
+ exit(1);
+ }
+
+#ifdef HAVE_SYS_SOUNDCARD_H
+ /* First set coding type */
+ AudioFormat = AFMT_MU_LAW;
+ if (ioctl(fd, SNDCTL_DSP_SETFMT, &AudioFormat)==-1)
+ { /* Fatal error */
+ printf ("\nUnable to set output format, aborting...\n\n");
+ exit(-1);
+ }
+
+ if (AudioFormat != AFMT_MU_LAW)
+ {
+ printf ("\nUnable to set output format for mu law, aborting...\n\n");
+ exit(-1);
+ }
+
+ /* Next set number of channels */
+ MonoStereo = MONO; /* Mono */
+ if (ioctl(fd, SNDCTL_DSP_STEREO, &MonoStereo)==-1)
+ { /* Fatal error */
+ printf ("\nUnable to set mono/stereo, aborting...\n\n");
+ exit(-1);
+ }
+
+ if (MonoStereo != MONO)
+ {
+ printf ("\nUnable to set mono/stereo for mono, aborting...\n\n");
+ exit(-1);
+ }
+
+ /* Now set sample rate */
+ SampleRate = SetSampleRate;
+ if (ioctl(fd, SNDCTL_DSP_SPEED, &SampleRate)==-1)
+ { /* Fatal error */
+ printf ("\nUnable to set sample rate to %d, returned %d, aborting...\n\n", SetSampleRate, SampleRate);
+ exit(-1);
+ }
+
+ SampleRateDifference = SampleRate - SetSampleRate;
+
+ if (SampleRateDifference < 0)
+ SampleRateDifference = - SampleRateDifference;
+
+ /* Fixed allowable sample rate error 0.1% */
+ if (SampleRateDifference > (SetSampleRate/1000))
+ {
+ printf ("\nUnable to set sample rate to %d, result was %d, more than 0.1 percent, aborting...\n\n", SetSampleRate, SampleRate);
+ exit(-1);
+ }
+ else
+ {
+ /* printf ("\nAttempt to set sample rate to %d, actual %d...\n\n", SetSampleRate, SampleRate); */
+ }
+#else
+ rval = ioctl(fd, AUDIO_GETINFO, &info);
+ if (rval < 0) {
+ printf("\naudio control %s", strerror(errno));
+ exit(0);
+ }
+ info.play.port = port;
+ info.play.gain = level;
+ info.play.sample_rate = SetSampleRate;
+ info.play.channels = 1;
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ULAW;
+ printf("\nport %d gain %d rate %d chan %d prec %d encode %d\n",
+ info.play.port, info.play.gain, info.play.sample_rate,
+ info.play.channels, info.play.precision,
+ info.play.encoding);
+ ioctl(fd, AUDIO_SETINFO, &info);
+#endif
+
+ /*
+ * Unless specified otherwise, read the system clock and
+ * initialize the time.
+ */
+ gettimeofday(&TimeValue, NULL); // Now always read the system time to keep "real time" of operation.
+ NowRealTime = BaseRealTime = SecondsPartOfTime = TimeValue.tv_sec;
+ SecondsRunningSimulationTime = 0; // Just starting simulation, running zero seconds as of now.
+ StabilityCount = 0; // No stability yet.
+
+ if (utc)
+ {
+ DayOfYear = ConvertMonthDayToDayOfYear (Year, Month, DayOfMonth);
+ }
+ else
+ {
+ /* Apply offset to time. */
+ if (UseOffsetSecondsInt >= 0)
+ SecondsPartOfTime += (time_t) UseOffsetSecondsInt;
+ else
+ SecondsPartOfTime -= (time_t) (-UseOffsetSecondsInt);
+
+ TimeStructure = gmtime(&SecondsPartOfTime);
+ Minute = TimeStructure->tm_min;
+ Hour = TimeStructure->tm_hour;
+ DayOfYear = TimeStructure->tm_yday + 1;
+ Year = TimeStructure->tm_year % 100;
+ Second = TimeStructure->tm_sec;
+
+ /*
+ * Delay the first second so the generator is accurately
+ * aligned with the system clock within one sample (125
+ * microseconds ).
+ */
+ delay(SECOND - TimeValue.tv_usec * 8 / 1000);
+ }
+
+ StraightBinarySeconds = Second + (Minute * SECONDS_PER_MINUTE) + (Hour * SECONDS_PER_HOUR);
+
+ memset(code, 0, sizeof(code));
+ switch (encode) {
+
+ /*
+ * For WWV/H and default time, carefully set the signal
+ * generator seconds number to agree with the current time.
+ */
+ case WWV:
+ printf("WWV time signal, starting point:\n");
+ printf(" Year = %02d, Day of year = %03d, Time = %02d:%02d:%02d, Minute tone = %d Hz, Hour tone = %d Hz.\n",
+ Year, DayOfYear, Hour, Minute, Second, tone, HourTone);
+ snprintf(code, sizeof(code), "%01d%03d%02d%02d%01d",
+ Year / 10, DayOfYear, Hour, Minute, Year % 10);
+ if (Verbose)
+ {
+ printf("\n Year = %2.2d, Day of year = %3d, Time = %2.2d:%2.2d:%2.2d, Code = %s",
+ Year, DayOfYear, Hour, Minute, Second, code);
+
+ if ((EnableRateCorrection) || (RemoveCycle) || (AddCycle))
+ printf (", CountOfSecondsSent = %d, TotalCyclesAdded = %d, TotalCyclesRemoved = %d\n", CountOfSecondsSent, TotalCyclesAdded, TotalCyclesRemoved);
+ else
+ printf ("\n");
+ }
+
+ ptr = 8;
+ for (BitNumber = 0; BitNumber <= Second; BitNumber++) {
+ if (progx[BitNumber].sw == DEC)
+ ptr--;
+ }
+ break;
+
+ /*
+ * For IRIG the signal generator runs every second, so requires
+ * no additional alignment.
+ */
+ case IRIG:
+ printf ("IRIG-B time signal, starting point:\n");
+ printf (" Year = %02d, Day of year = %03d, Time = %02d:%02d:%02d, Straight binary seconds (SBS) = %05d / 0x%04X.\n",
+ Year, DayOfYear, Hour, Minute, Second, StraightBinarySeconds, StraightBinarySeconds);
+ printf ("\n");
+ if (Verbose)
+ {
+ printf ("Codes: \".\" = marker/position indicator, \"-\" = zero dummy bit, \"0\" = zero bit, \"1\" = one bit.\n");
+ if ((EnableRateCorrection) || (AddCycle) || (RemoveCycle))
+ {
+ printf (" \"o\" = short zero, \"*\" = long zero, \"x\" = short one, \"+\" = long one.\n");
+ }
+ printf ("Numerical values are time order reversed in output to make it easier to read.\n");
+ /* 111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999 */
+ /* 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 */
+ printf ("\n");
+ printf ("Legend of output codes:\n");
+ //printf ("\n");
+ //printf ("| StraightBinSecs | IEEE_1344_Control | Year | Day_of_Year | Hours | Minutes |Seconds |\n");
+ //printf ("| --------------- | ----------------- | ---- | ----------- | ----- | ------- |------- |\n");
+ //printf ("| | | | | | | |\n");
+ }
+ break;
+ }
+
+ /*
+ * Run the signal generator to generate new timecode strings
+ * once per minute for WWV/H and once per second for IRIG.
+ */
+ for (CountOfSecondsSent=0; ((SecondsToSend==0) || (CountOfSecondsSent<SecondsToSend)); CountOfSecondsSent++)
+ {
+ if ((encode == IRIG) && (((Second % 20) == 0) || (CountOfSecondsSent == 0)))
+ {
+ printf ("\n");
+
+ printf (" Year = %02d, Day of year = %03d, Time = %02d:%02d:%02d, Straight binary seconds (SBS) = %05d / 0x%04X.\n",
+ Year, DayOfYear, Hour, Minute, Second, StraightBinarySeconds, StraightBinarySeconds);
+ if ((EnableRateCorrection) || (RemoveCycle) || (AddCycle))
+ {
+ printf (" CountOfSecondsSent = %d, TotalCyclesAdded = %d, TotalCyclesRemoved = %d\n", CountOfSecondsSent, TotalCyclesAdded, TotalCyclesRemoved);
+ if ((CountOfSecondsSent != 0) && ((TotalCyclesAdded != 0) || (TotalCyclesRemoved != 0)))
+ {
+ RatioError = ((float) (TotalCyclesAdded - TotalCyclesRemoved)) / (1000.0 * (float) CountOfSecondsSent);
+ printf (" Adjusted by %2.1f%%, apparent send frequency is %4.2f Hz not %d Hz.\n\n",
+ RatioError*100.0, (1.0+RatioError)*((float) SetSampleRate), SetSampleRate);
+ }
+ }
+ else
+ printf ("\n");
+
+ /* printf ("|Seconds | Minutes | Hours | Day_of_Year | Year | IEEE_1344_Control | StraightBinSecs |\n");
+ printf ("|------- | ------- | ----- | ----------- | ---- | ----------------- |-------------------|\n");
+ printf ("| | | | | | | |\n");*/
+ printf ("| StraightBinSecs | IEEE_1344_Control | Year | Day_of_Year | Hours | Minutes |Seconds |\n");
+ printf ("| --------------- | ----------------- | ---- | ----------- | ----- | ------- |------- |\n");
+ printf ("| | | | | | | |\n");
+ }
+
+ if (RemoveCycle)
+ {
+ RateCorrection = -1;
+ TotalSecondsCorrected ++;
+ }
+ else
+ {
+ if (AddCycle)
+ {
+ TotalSecondsCorrected ++;
+ RateCorrection = +1;
+ }
+ else
+ RateCorrection = 0;
+ }
+
+ /*
+ * Crank the state machine to propagate carries to the
+ * year of century. Note that we delayed up to one
+ * second for alignment after reading the time, so this
+ * is the next second.
+ */
+
+ if (LeapState == LEAPSTATE_NORMAL)
+ {
+ /* If on the second of a leap (second 59 in the specified minute), then add or delete a second */
+ if ((Year == LeapYear) && (DayOfYear == LeapDayOfYear) && (Hour == LeapHour) && (Minute == LeapMinute))
+ {
+ /* To delete a second, which means we go from 58->60 instead of 58->59->00. */
+ if ((DeleteLeapSecond) && (Second == 58))
+ {
+ LeapState = LEAPSTATE_DELETING;
+
+ if (Debug)
+ printf ("\n<--- Ready to delete a leap second...\n");
+ }
+ else
+ { /* Delete takes precedence over insert. */
+ /* To add a second, which means we go from 59->60->00 instead of 59->00. */
+ if ((InsertLeapSecond) && (Second == 59))
+ {
+ LeapState = LEAPSTATE_INSERTING;
+
+ if (Debug)
+ printf ("\n<--- Ready to insert a leap second...\n");
+ }
+ }
+ }
+ }
+
+ switch (LeapState)
+ {
+ case LEAPSTATE_NORMAL:
+ Second = (Second + 1) % 60;
+ break;
+
+ case LEAPSTATE_DELETING:
+ Second = 0;
+ LeapState = LEAPSTATE_NORMAL;
+
+ if (Debug)
+ printf ("\n<--- Deleting a leap second...\n");
+ break;
+
+ case LEAPSTATE_INSERTING:
+ Second = 60;
+ LeapState = LEAPSTATE_ZERO_AFTER_INSERT;
+
+ if (Debug)
+ printf ("\n<--- Inserting a leap second...\n");
+ break;
+
+ case LEAPSTATE_ZERO_AFTER_INSERT:
+ Second = 0;
+ LeapState = LEAPSTATE_NORMAL;
+
+ if (Debug)
+ printf ("\n<--- Inserted a leap second, now back to zero...\n");
+ break;
+
+ default:
+ printf ("\n\nLeap second state invalid value of %d, aborting...", LeapState);
+ exit (-1);
+ break;
+ }
+
+ /* Check for second rollover, increment minutes and ripple upward if required. */
+ if (Second == 0) {
+ Minute++;
+ if (Minute >= 60) {
+ Minute = 0;
+ Hour++;
+ }
+
+ /* Check for activation of DST switch. */
+ /* If DST is active, this would mean that at the appointed time, we de-activate DST, */
+ /* which translates to going backward an hour (repeating the last hour). */
+ /* If DST is not active, this would mean that at the appointed time, we activate DST, */
+ /* which translates to going forward an hour (skipping the next hour). */
+ if (DstSwitchFlag)
+ {
+ /* The actual switch happens on the zero'th second of the actual minute specified. */
+ if ((Year == DstSwitchYear) && (DayOfYear == DstSwitchDayOfYear) && (Hour == DstSwitchHour) && (Minute == DstSwitchMinute))
+ {
+ if (DstFlag == 0)
+ { /* DST flag is zero, not in DST, going to DST, "spring ahead", so increment hour by two instead of one. */
+ Hour++;
+ DstFlag = 1;
+
+ /* Must adjust offset to keep consistent with UTC. */
+ /* Here we have to increase offset by one hour. If it goes from negative to positive, then we fix that. */
+ if (OffsetSignBit == 0)
+ { /* Offset is positive */
+ if (OffsetOnes == 0x0F)
+ {
+ OffsetSignBit = 1;
+ OffsetOnes = (OffsetHalf == 0) ? 8 : 7;
+ }
+ else
+ OffsetOnes++;
+ }
+ else
+ { /* Offset is negative */
+ if (OffsetOnes == 0)
+ {
+ OffsetSignBit = 0;
+ OffsetOnes = (OffsetHalf == 0) ? 1 : 0;
+ }
+ else
+ OffsetOnes--;
+ }
+
+ if (Debug)
+ printf ("\n<--- DST activated, spring ahead an hour, new offset !...\n");
+ }
+ else
+ { /* DST flag is non zero, in DST, going out of DST, "fall back", so no increment of hour. */
+ Hour--;
+ DstFlag = 0;
+
+ /* Must adjust offset to keep consistent with UTC. */
+ /* Here we have to reduce offset by one hour. If it goes negative, then we fix that. */
+ if (OffsetSignBit == 0)
+ { /* Offset is positive */
+ if (OffsetOnes == 0)
+ {
+ OffsetSignBit = 1;
+ OffsetOnes = (OffsetHalf == 0) ? 1 : 0;
+ }
+ else
+ OffsetOnes--;
+ }
+ else
+ { /* Offset is negative */
+ if (OffsetOnes == 0x0F)
+ {
+ OffsetSignBit = 0;
+ OffsetOnes = (OffsetHalf == 0) ? 8 : 7;
+ }
+ else
+ OffsetOnes++;
+ }
+
+ if (Debug)
+ printf ("\n<--- DST de-activated, fall back an hour!...\n");
+ }
+
+ DstSwitchFlag = FALSE; /* One time deal, not intended to run this program past two switches... */
+ }
+ }
+
+ if (Hour >= 24) {
+ /* Modified, just in case dumb case where activating DST advances 23h59:59 -> 01h00:00 */
+ Hour = Hour % 24;
+ DayOfYear++;
+ }
+
+ /*
+ * At year rollover check for leap second.
+ */
+ if (DayOfYear >= (Year & 0x3 ? 366 : 367)) {
+ if (leap) {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("\nLeap!");
+ leap = 0;
+ }
+ DayOfYear = 1;
+ Year++;
+ }
+ if (encode == WWV) {
+ snprintf(code, sizeof(code),
+ "%01d%03d%02d%02d%01d", Year / 10,
+ DayOfYear, Hour, Minute, Year % 10);
+ if (Verbose)
+ printf("\n Year = %2.2d, Day of year = %3d, Time = %2.2d:%2.2d:%2.2d, Code = %s",
+ Year, DayOfYear, Hour, Minute, Second, code);
+
+ if ((EnableRateCorrection) || (RemoveCycle) || (AddCycle))
+ {
+ printf (", CountOfSecondsSent = %d, TotalCyclesAdded = %d, TotalCyclesRemoved = %d\n", CountOfSecondsSent, TotalCyclesAdded, TotalCyclesRemoved);
+ if ((CountOfSecondsSent != 0) && ((TotalCyclesAdded != 0) || (TotalCyclesRemoved != 0)))
+ {
+ RatioError = ((float) (TotalCyclesAdded - TotalCyclesRemoved)) / (1000.0 * (float) CountOfSecondsSent);
+ printf (" Adjusted by %2.1f%%, apparent send frequency is %4.2f Hz not %d Hz.\n\n",
+ RatioError*100.0, (1.0+RatioError)*((float) SetSampleRate), SetSampleRate);
+ }
+ }
+ else
+ printf ("\n");
+
+ ptr = 8;
+ }
+ } /* End of "if (Second == 0)" */
+
+ /* After all that, if we are in the minute just prior to a leap second, warn of leap second pending */
+ /* and of the polarity */
+ if ((Year == LeapYear) && (DayOfYear == LeapDayOfYear) && (Hour == LeapHour) && (Minute == LeapMinute))
+ {
+ LeapSecondPending = TRUE;
+ LeapSecondPolarity = DeleteLeapSecond;
+ }
+ else
+ {
+ LeapSecondPending = FALSE;
+ LeapSecondPolarity = FALSE;
+ }
+
+ /* Notification through IEEE 1344 happens during the whole minute previous to the minute specified. */
+ /* The time of that minute has been previously calculated. */
+ if ((Year == DstSwitchPendingYear) && (DayOfYear == DstSwitchPendingDayOfYear) &&
+ (Hour == DstSwitchPendingHour) && (Minute == DstSwitchPendingMinute))
+ {
+ DstPendingFlag = TRUE;
+ }
+ else
+ {
+ DstPendingFlag = FALSE;
+ }
+
+
+ StraightBinarySeconds = Second + (Minute * SECONDS_PER_MINUTE) + (Hour * SECONDS_PER_HOUR);
+
+ if (encode == IRIG) {
+ if (IrigIncludeIeee)
+ {
+ if ((OffsetOnes == 0) && (OffsetHalf == 0))
+ OffsetSignBit = 0;
+
+ ControlFunctions = (LeapSecondPending == 0 ? 0x00000 : 0x00001) | (LeapSecondPolarity == 0 ? 0x00000 : 0x00002)
+ | (DstPendingFlag == 0 ? 0x00000 : 0x00004) | (DstFlag == 0 ? 0x00000 : 0x00008)
+ | (OffsetSignBit == 0 ? 0x00000 : 0x00010) | ((OffsetOnes & 0x0F) << 5) | (OffsetHalf == 0 ? 0x00000 : 0x00200)
+ | ((TimeQuality & 0x0F) << 10);
+ /* if (Verbose)
+ printf ("\nDstFlag = %d, OffsetSignBit = %d, OffsetOnes = %d, OffsetHalf = %d, TimeQuality = 0x%1.1X ==> ControlFunctions = 0x%5.5X...",
+ DstFlag, OffsetSignBit, OffsetOnes, OffsetHalf, TimeQuality, ControlFunctions);
+ */
+ }
+ else
+ ControlFunctions = 0;
+
+ /*
+ YearDay HourMin Sec
+ snprintf(code, sizeof(code), "%04x%04d%06d%02d%02d%02d",
+ 0, Year, DayOfYear, Hour, Minute, Second);
+ */
+ if (IrigIncludeYear) {
+ snprintf(ParityString, sizeof(ParityString),
+ "%04X%02d%04d%02d%02d%02d",
+ ControlFunctions & 0x7FFF, Year,
+ DayOfYear, Hour, Minute, Second);
+ } else {
+ snprintf(ParityString, sizeof(ParityString),
+ "%04X%02d%04d%02d%02d%02d",
+ ControlFunctions & 0x7FFF,
+ 0, DayOfYear, Hour, Minute, Second);
+ }
+
+ if (IrigIncludeIeee)
+ {
+ ParitySum = 0;
+ for (StringPointer=ParityString; *StringPointer!=NUL; StringPointer++)
+ {
+ switch (toupper(*StringPointer))
+ {
+ case '1':
+ case '2':
+ case '4':
+ case '8':
+ ParitySum += 1;
+ break;
+
+ case '3':
+ case '5':
+ case '6':
+ case '9':
+ case 'A':
+ case 'C':
+ ParitySum += 2;
+ break;
+
+ case '7':
+ case 'B':
+ case 'D':
+ case 'E':
+ ParitySum += 3;
+ break;
+
+ case 'F':
+ ParitySum += 4;
+ break;
+ }
+ }
+
+ if ((ParitySum & 0x01) == 0x01)
+ ParityValue = 0x01;
+ else
+ ParityValue = 0;
+ }
+ else
+ ParityValue = 0;
+
+ ControlFunctions |= ((ParityValue & 0x01) << 14);
+
+ if (IrigIncludeYear) {
+ snprintf(code, sizeof(code),
+ /* YearDay HourMin Sec */
+ "%05X%05X%02d%04d%02d%02d%02d",
+ StraightBinarySeconds,
+ ControlFunctions, Year, DayOfYear,
+ Hour, Minute, Second);
+ } else {
+ snprintf(code, sizeof(code),
+ /* YearDay HourMin Sec */
+ "%05X%05X%02d%04d%02d%02d%02d",
+ StraightBinarySeconds,
+ ControlFunctions, 0, DayOfYear,
+ Hour, Minute, Second);
+ }
+
+ if (Debug)
+ printf("\nCode string: %s, ParityString = %s, ParitySum = 0x%2.2X, ParityValue = %d, DstFlag = %d...\n", code, ParityString, ParitySum, ParityValue, DstFlag);
+
+ ptr = strlen(code)-1;
+ OldPtr = 0;
+ }
+
+ /*
+ * Generate data for the second
+ */
+ switch (encode) {
+
+ /*
+ * The IRIG second consists of 20 BCD digits of width-
+ * modulateod pulses at 2, 5 and 8 ms and modulated 50
+ * percent on the 1000-Hz carrier.
+ */
+ case IRIG:
+ /* Initialize the output string */
+ OutputDataString[0] = '\0';
+
+ for (BitNumber = 0; BitNumber < 100; BitNumber++) {
+ FrameNumber = (BitNumber/10) + 1;
+ switch (FrameNumber)
+ {
+ case 1:
+ /* bits 0 to 9, first frame */
+ sw = progz[BitNumber % 10].sw;
+ arg = progz[BitNumber % 10].arg;
+ break;
+
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ /* bits 10 to 59, second to sixth frame */
+ sw = progy[BitNumber % 10].sw;
+ arg = progy[BitNumber % 10].arg;
+ break;
+
+ case 7:
+ /* bits 60 to 69, seventh frame */
+ sw = progw[BitNumber % 10].sw;
+ arg = progw[BitNumber % 10].arg;
+ break;
+
+ case 8:
+ /* bits 70 to 79, eighth frame */
+ sw = progv[BitNumber % 10].sw;
+ arg = progv[BitNumber % 10].arg;
+ break;
+
+ case 9:
+ /* bits 80 to 89, ninth frame */
+ sw = progw[BitNumber % 10].sw;
+ arg = progw[BitNumber % 10].arg;
+ break;
+
+ case 10:
+ /* bits 90 to 99, tenth frame */
+ sw = progu[BitNumber % 10].sw;
+ arg = progu[BitNumber % 10].arg;
+ break;
+
+ default:
+ /* , Unexpected values of FrameNumber */
+ printf ("\n\nUnexpected value of FrameNumber = %d, cannot parse, aborting...\n\n", FrameNumber);
+ exit (-1);
+ break;
+ }
+
+ switch(sw) {
+
+ case DECC: /* decrement pointer and send bit. */
+ ptr--;
+ case COEF: /* send BCD bit */
+ AsciiValue = toupper(code[ptr]);
+ HexValue = isdigit(AsciiValue) ? AsciiValue - '0' : (AsciiValue - 'A')+10;
+ /* if (Debug) {
+ if (ptr != OldPtr) {
+ if (Verbose)
+ printf("\n(%c->%X)", AsciiValue, HexValue);
+ OldPtr = ptr;
+ }
+ }
+ */
+ // OK, adjust all unused bits in hundreds of days.
+ if ((FrameNumber == 5) && ((BitNumber % 10) > 1))
+ {
+ if (RateCorrection < 0)
+ { // Need to remove cycles to catch up.
+ if ((HexValue & arg) != 0)
+ {
+ if (Unmodulated)
+ {
+ poop(M5, 1000, HIGH, UnmodulatedInverted);
+ poop(M5-1, 1000, LOW, UnmodulatedInverted);
+
+ TotalCyclesRemoved += 1;
+ }
+ else
+ {
+ peep(M5, 1000, HIGH);
+ peep(M5-1, 1000, LOW);
+
+ TotalCyclesRemoved += 1;
+ }
+ strlcat(OutputDataString, "x", OUTPUT_DATA_STRING_LENGTH);
+ }
+ else
+ {
+ if (Unmodulated)
+ {
+ poop(M2, 1000, HIGH, UnmodulatedInverted);
+ poop(M8-1, 1000, LOW, UnmodulatedInverted);
+
+ TotalCyclesRemoved += 1;
+ }
+ else
+ {
+ peep(M2, 1000, HIGH);
+ peep(M8-1, 1000, LOW);
+
+ TotalCyclesRemoved += 1;
+ }
+ strlcat(OutputDataString, "o", OUTPUT_DATA_STRING_LENGTH);
+ }
+ } // End of true clause for "if (RateCorrection < 0)"
+ else
+ { // Else clause for "if (RateCorrection < 0)"
+ if (RateCorrection > 0)
+ { // Need to add cycles to slow back down.
+ if ((HexValue & arg) != 0)
+ {
+ if (Unmodulated)
+ {
+ poop(M5, 1000, HIGH, UnmodulatedInverted);
+ poop(M5+1, 1000, LOW, UnmodulatedInverted);
+
+ TotalCyclesAdded += 1;
+ }
+ else
+ {
+ peep(M5, 1000, HIGH);
+ peep(M5+1, 1000, LOW);
+
+ TotalCyclesAdded += 1;
+ }
+ strlcat(OutputDataString, "+", OUTPUT_DATA_STRING_LENGTH);
+ }
+ else
+ {
+ if (Unmodulated)
+ {
+ poop(M2, 1000, HIGH, UnmodulatedInverted);
+ poop(M8+1, 1000, LOW, UnmodulatedInverted);
+
+ TotalCyclesAdded += 1;
+ }
+ else
+ {
+ peep(M2, 1000, HIGH);
+ peep(M8+1, 1000, LOW);
+
+ TotalCyclesAdded += 1;
+ }
+ strlcat(OutputDataString, "*", OUTPUT_DATA_STRING_LENGTH);
+ }
+ } // End of true clause for "if (RateCorrection > 0)"
+ else
+ { // Else clause for "if (RateCorrection > 0)"
+ // Rate is OK, just do what you feel!
+ if ((HexValue & arg) != 0)
+ {
+ if (Unmodulated)
+ {
+ poop(M5, 1000, HIGH, UnmodulatedInverted);
+ poop(M5, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(M5, 1000, HIGH);
+ peep(M5, 1000, LOW);
+ }
+ strlcat(OutputDataString, "1", OUTPUT_DATA_STRING_LENGTH);
+ }
+ else
+ {
+ if (Unmodulated)
+ {
+ poop(M2, 1000, HIGH, UnmodulatedInverted);
+ poop(M8, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(M2, 1000, HIGH);
+ peep(M8, 1000, LOW);
+ }
+ strlcat(OutputDataString, "0", OUTPUT_DATA_STRING_LENGTH);
+ }
+ } // End of else clause for "if (RateCorrection > 0)"
+ } // End of else claues for "if (RateCorrection < 0)"
+ } // End of true clause for "if ((FrameNumber == 5) && (BitNumber == 8))"
+ else
+ { // Else clause for "if ((FrameNumber == 5) && (BitNumber == 8))"
+ if ((HexValue & arg) != 0)
+ {
+ if (Unmodulated)
+ {
+ poop(M5, 1000, HIGH, UnmodulatedInverted);
+ poop(M5, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(M5, 1000, HIGH);
+ peep(M5, 1000, LOW);
+ }
+ strlcat(OutputDataString, "1", OUTPUT_DATA_STRING_LENGTH);
+ }
+ else
+ {
+ if (Unmodulated)
+ {
+ poop(M2, 1000, HIGH, UnmodulatedInverted);
+ poop(M8, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(M2, 1000, HIGH);
+ peep(M8, 1000, LOW);
+ }
+ strlcat(OutputDataString, "0", OUTPUT_DATA_STRING_LENGTH);
+ }
+ } // end of else clause for "if ((FrameNumber == 5) && (BitNumber == 8))"
+ break;
+
+ case DECZ: /* decrement pointer and send zero bit */
+ ptr--;
+ if (Unmodulated)
+ {
+ poop(M2, 1000, HIGH, UnmodulatedInverted);
+ poop(M8, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(M2, 1000, HIGH);
+ peep(M8, 1000, LOW);
+ }
+ strlcat(OutputDataString, "-", OUTPUT_DATA_STRING_LENGTH);
+ break;
+
+ case DEC: /* send marker/position indicator IM/PI bit */
+ ptr--;
+ case NODEC: /* send marker/position indicator IM/PI bit but no decrement pointer */
+ case MIN: /* send "second start" marker/position indicator IM/PI bit */
+ if (Unmodulated)
+ {
+ poop(arg, 1000, HIGH, UnmodulatedInverted);
+ poop(10 - arg, 1000, LOW, UnmodulatedInverted);
+ }
+ else
+ {
+ peep(arg, 1000, HIGH);
+ peep(10 - arg, 1000, LOW);
+ }
+ strlcat(OutputDataString, ".", OUTPUT_DATA_STRING_LENGTH);
+ break;
+
+ default:
+ printf ("\n\nUnknown state machine value \"%d\", unable to continue, aborting...\n\n", sw);
+ exit (-1);
+ break;
+ }
+ if (ptr < 0)
+ break;
+ }
+ ReverseString ( OutputDataString );
+ if (Verbose)
+ {
+ printf("%s", OutputDataString);
+ if (RateCorrection > 0)
+ printf(" fast\n");
+ else
+ {
+ if (RateCorrection < 0)
+ printf (" slow\n");
+ else
+ printf ("\n");
+ }
+ }
+ break;
+
+ /*
+ * The WWV/H second consists of 9 BCD digits of width-
+ * modulateod pulses 200, 500 and 800 ms at 100-Hz.
+ */
+ case WWV:
+ sw = progx[Second].sw;
+ arg = progx[Second].arg;
+ switch(sw) {
+
+ case DATA: /* send data bit */
+ WWV_Second(arg, RateCorrection);
+ if (Verbose)
+ {
+ if (arg == DATA0)
+ printf ("0");
+ else
+ {
+ if (arg == DATA1)
+ printf ("1");
+ else
+ {
+ if (arg == PI)
+ printf ("P");
+ else
+ printf ("?");
+ }
+ }
+ }
+ break;
+
+ case DATAX: /* send data bit */
+ WWV_SecondNoTick(arg, RateCorrection);
+ if (Verbose)
+ {
+ if (arg == DATA0)
+ printf ("0");
+ else
+ {
+ if (arg == DATA1)
+ printf ("1");
+ else
+ {
+ if (arg == PI)
+ printf ("P");
+ else
+ printf ("?");
+ }
+ }
+ }
+ break;
+
+ case COEF: /* send BCD bit */
+ if (code[ptr] & arg) {
+ WWV_Second(DATA1, RateCorrection);
+ if (Verbose)
+ printf("1");
+ } else {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("0");
+ }
+ break;
+
+ case LEAP: /* send leap bit */
+ if (leap) {
+ WWV_Second(DATA1, RateCorrection);
+ if (Verbose)
+ printf("L");
+ } else {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("0");
+ }
+ break;
+
+ case DEC: /* send data bit */
+ ptr--;
+ WWV_Second(arg, RateCorrection);
+ if (Verbose)
+ {
+ if (arg == DATA0)
+ printf ("0");
+ else
+ {
+ if (arg == DATA1)
+ printf ("1");
+ else
+ {
+ if (arg == PI)
+ printf ("P");
+ else
+ printf ("?");
+ }
+ }
+ }
+ break;
+
+ case DECX: /* send data bit with no tick */
+ ptr--;
+ WWV_SecondNoTick(arg, RateCorrection);
+ if (Verbose)
+ {
+ if (arg == DATA0)
+ printf ("0");
+ else
+ {
+ if (arg == DATA1)
+ printf ("1");
+ else
+ {
+ if (arg == PI)
+ printf ("P");
+ else
+ printf ("?");
+ }
+ }
+ }
+ break;
+
+ case MIN: /* send minute sync */
+ if (Minute == 0)
+ {
+ peep(arg, HourTone, HIGH);
+
+ if (RateCorrection < 0)
+ {
+ peep( 990 - arg, HourTone, OFF);
+ TotalCyclesRemoved += 10;
+
+ if (Debug)
+ printf ("\n* Shorter Second: ");
+ }
+ else
+ {
+ if (RateCorrection > 0)
+ {
+ peep(1010 - arg, HourTone, OFF);
+
+ TotalCyclesAdded += 10;
+
+ if (Debug)
+ printf ("\n* Longer Second: ");
+ }
+ else
+ {
+ peep(1000 - arg, HourTone, OFF);
+ }
+ }
+
+ if (Verbose)
+ printf("H");
+ }
+ else
+ {
+ peep(arg, tone, HIGH);
+
+ if (RateCorrection < 0)
+ {
+ peep( 990 - arg, tone, OFF);
+ TotalCyclesRemoved += 10;
+
+ if (Debug)
+ printf ("\n* Shorter Second: ");
+ }
+ else
+ {
+ if (RateCorrection > 0)
+ {
+ peep(1010 - arg, tone, OFF);
+
+ TotalCyclesAdded += 10;
+
+ if (Debug)
+ printf ("\n* Longer Second: ");
+ }
+ else
+ {
+ peep(1000 - arg, tone, OFF);
+ }
+ }
+
+ if (Verbose)
+ printf("M");
+ }
+ break;
+
+ case DUT1: /* send DUT1 bits */
+ if (dut1 & arg)
+ {
+ WWV_Second(DATA1, RateCorrection);
+ if (Verbose)
+ printf("1");
+ }
+ else
+ {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("0");
+ }
+ break;
+
+ case DST1: /* send DST1 bit */
+ ptr--;
+ if (DstFlag)
+ {
+ WWV_Second(DATA1, RateCorrection);
+ if (Verbose)
+ printf("1");
+ }
+ else
+ {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("0");
+ }
+ break;
+
+ case DST2: /* send DST2 bit */
+ if (DstFlag)
+ {
+ WWV_Second(DATA1, RateCorrection);
+ if (Verbose)
+ printf("1");
+ }
+ else
+ {
+ WWV_Second(DATA0, RateCorrection);
+ if (Verbose)
+ printf("0");
+ }
+ break;
+ }
+ }
+
+ if (EnableRateCorrection)
+ {
+ SecondsRunningSimulationTime++;
+
+ gettimeofday(&TimeValue, NULL);
+ NowRealTime = TimeValue.tv_sec;
+
+ if (NowRealTime >= BaseRealTime) // Just in case system time corrects backwards, do not blow up.
+ {
+ SecondsRunningRealTime = (unsigned) (NowRealTime - BaseRealTime);
+ SecondsRunningDifference = SecondsRunningSimulationTime - SecondsRunningRealTime;
+
+ if (Debug)
+ {
+ printf ("> NowRealTime = 0x%8.8X, BaseRealtime = 0x%8.8X, SecondsRunningRealTime = 0x%8.8X, SecondsRunningSimulationTime = 0x%8.8X.\n",
+ (unsigned) NowRealTime, (unsigned) BaseRealTime, SecondsRunningRealTime, SecondsRunningSimulationTime);
+ printf ("> SecondsRunningDifference = 0x%8.8X, ExpectedRunningDifference = 0x%8.8X.\n",
+ SecondsRunningDifference, ExpectedRunningDifference);
+ }
+
+ if (SecondsRunningSimulationTime > RUN_BEFORE_STABILITY_CHECK)
+ {
+ if (StabilityCount < MINIMUM_STABILITY_COUNT)
+ {
+ if (StabilityCount == 0)
+ {
+ ExpectedRunningDifference = SecondsRunningDifference;
+ StabilityCount++;
+ if (Debug)
+ printf ("> Starting stability check.\n");
+ }
+ else
+ { // Else for "if (StabilityCount == 0)"
+ if ((ExpectedRunningDifference+INITIAL_STABILITY_BAND > SecondsRunningDifference)
+ && (ExpectedRunningDifference-INITIAL_STABILITY_BAND < SecondsRunningDifference))
+ { // So far, still within stability band, increment count.
+ StabilityCount++;
+ if (Debug)
+ printf ("> StabilityCount = %d.\n", StabilityCount);
+ }
+ else
+ { // Outside of stability band, start over.
+ StabilityCount = 0;
+ if (Debug)
+ printf ("> Out of stability band, start over.\n");
+ }
+ } // End of else for "if (StabilityCount == 0)"
+ } // End of true clause for "if (StabilityCount < MINIMUM_STABILITY_COUNT))"
+ else
+ { // Else clause for "if (StabilityCount < MINIMUM_STABILITY_COUNT))" - OK, so we are supposed to be stable.
+ if (AddCycle)
+ {
+ if (ExpectedRunningDifference >= SecondsRunningDifference)
+ {
+ if (Debug)
+ printf ("> Was adding cycles, ExpectedRunningDifference >= SecondsRunningDifference, can stop it now.\n");
+
+ AddCycle = FALSE;
+ RemoveCycle = FALSE;
+ }
+ else
+ {
+ if (Debug)
+ printf ("> Was adding cycles, not done yet.\n");
+ }
+ }
+ else
+ {
+ if (RemoveCycle)
+ {
+ if (ExpectedRunningDifference <= SecondsRunningDifference)
+ {
+ if (Debug)
+ printf ("> Was removing cycles, ExpectedRunningDifference <= SecondsRunningDifference, can stop it now.\n");
+
+ AddCycle = FALSE;
+ RemoveCycle = FALSE;
+ }
+ else
+ {
+ if (Debug)
+ printf ("> Was removing cycles, not done yet.\n");
+ }
+ }
+ else
+ {
+ if ((ExpectedRunningDifference+RUNNING_STABILITY_BAND > SecondsRunningDifference)
+ && (ExpectedRunningDifference-RUNNING_STABILITY_BAND < SecondsRunningDifference))
+ { // All is well, within tolerances.
+ if (Debug)
+ printf ("> All is well, within tolerances.\n");
+ }
+ else
+ { // Oops, outside tolerances. Else clause of "if ((ExpectedRunningDifference...SecondsRunningDifference)"
+ if (ExpectedRunningDifference > SecondsRunningDifference)
+ {
+ if (Debug)
+ printf ("> ExpectedRunningDifference > SecondsRunningDifference, running behind real time.\n");
+
+ // Behind real time, have to add a cycle to slow down and get back in sync.
+ AddCycle = FALSE;
+ RemoveCycle = TRUE;
+ }
+ else
+ { // Else clause of "if (ExpectedRunningDifference < SecondsRunningDifference)"
+ if (ExpectedRunningDifference < SecondsRunningDifference)
+ {
+ if (Debug)
+ printf ("> ExpectedRunningDifference < SecondsRunningDifference, running ahead of real time.\n");
+
+ // Ahead of real time, have to remove a cycle to speed up and get back in sync.
+ AddCycle = TRUE;
+ RemoveCycle = FALSE;
+ }
+ else
+ {
+ if (Debug)
+ printf ("> Oops, outside tolerances, but doesn't fit the profiles, how can this be?\n");
+ }
+ } // End of else clause of "if (ExpectedRunningDifference > SecondsRunningDifference)"
+ } // End of else clause of "if ((ExpectedRunningDifference...SecondsRunningDifference)"
+ } // End of else clause of "if (RemoveCycle)".
+ } // End of else clause of "if (AddCycle)".
+ } // End of else clause for "if (StabilityCount < MINIMUM_STABILITY_COUNT))"
+ } // End of true clause for "if ((SecondsRunningSimulationTime > RUN_BEFORE_STABILITY_CHECK)"
+ } // End of true clause for "if (NowRealTime >= BaseRealTime)"
+ else
+ {
+ if (Debug)
+ printf ("> Hmm, time going backwards?\n");
+ }
+ } // End of true clause for "if (EnableRateCorrection)"
+
+ fflush (stdout);
+ }
+
+
+printf ("\n\n>> Completed %d seconds, exiting...\n\n", SecondsToSend);
+return (0);
+}
+
+
+/*
+ * Generate WWV/H 0 or 1 data pulse.
+ */
+void WWV_Second(
+ int code, /* DATA0, DATA1, PI */
+ int Rate /* <0 -> do a short second, 0 -> normal second, >0 -> long second */
+ )
+{
+ /*
+ * The WWV data pulse begins with 5 ms of 1000 Hz follwed by a
+ * guard time of 25 ms. The data pulse is 170, 570 or 770 ms at
+ * 100 Hz corresponding to 0, 1 or position indicator (PI),
+ * respectively. Note the 100-Hz data pulses are transmitted 6
+ * dB below the 1000-Hz sync pulses. Originally the data pulses
+ * were transmited 10 dB below the sync pulses, but the station
+ * engineers increased that to 6 dB because the Heath GC-1000
+ * WWV/H radio clock worked much better.
+ */
+ peep(5, tone, HIGH); /* send seconds tick */
+ peep(25, tone, OFF);
+ peep(code - 30, 100, LOW); /* send data */
+
+ /* The quiet time is shortened or lengthened to get us back on time */
+ if (Rate < 0)
+ {
+ peep( 990 - code, 100, OFF);
+
+ TotalCyclesRemoved += 10;
+
+ if (Debug)
+ printf ("\n* Shorter Second: ");
+ }
+ else
+ {
+ if (Rate > 0)
+ {
+ peep(1010 - code, 100, OFF);
+
+ TotalCyclesAdded += 10;
+
+ if (Debug)
+ printf ("\n* Longer Second: ");
+ }
+ else
+ peep(1000 - code, 100, OFF);
+ }
+}
+
+/*
+ * Generate WWV/H 0 or 1 data pulse, with no tick, for 29th and 59th seconds
+ */
+void WWV_SecondNoTick(
+ int code, /* DATA0, DATA1, PI */
+ int Rate /* <0 -> do a short second, 0 -> normal second, >0 -> long second */
+ )
+{
+ /*
+ * The WWV data pulse begins with 5 ms of 1000 Hz follwed by a
+ * guard time of 25 ms. The data pulse is 170, 570 or 770 ms at
+ * 100 Hz corresponding to 0, 1 or position indicator (PI),
+ * respectively. Note the 100-Hz data pulses are transmitted 6
+ * dB below the 1000-Hz sync pulses. Originally the data pulses
+ * were transmited 10 dB below the sync pulses, but the station
+ * engineers increased that to 6 dB because the Heath GC-1000
+ * WWV/H radio clock worked much better.
+ */
+ peep(30, tone, OFF); /* send seconds non-tick */
+ peep(code - 30, 100, LOW); /* send data */
+
+ /* The quiet time is shortened or lengthened to get us back on time */
+ if (Rate < 0)
+ {
+ peep( 990 - code, 100, OFF);
+
+ TotalCyclesRemoved += 10;
+
+ if (Debug)
+ printf ("\n* Shorter Second: ");
+ }
+ else
+ {
+ if (Rate > 0)
+ {
+ peep(1010 - code, 100, OFF);
+
+ TotalCyclesAdded += 10;
+
+ if (Debug)
+ printf ("\n* Longer Second: ");
+ }
+ else
+ peep(1000 - code, 100, OFF);
+ }
+}
+
+/*
+ * Generate cycles of 100 Hz or any multiple of 100 Hz.
+ */
+void peep(
+ int pulse, /* pulse length (ms) */
+ int freq, /* frequency (Hz) */
+ int amp /* amplitude */
+ )
+{
+ int increm; /* phase increment */
+ int i, j;
+
+ if (amp == OFF || freq == 0)
+ increm = 10;
+ else
+ increm = freq / 100;
+ j = 0;
+ for (i = 0 ; i < pulse * 8; i++) {
+ switch (amp) {
+
+ case HIGH:
+ buffer[bufcnt++] = ~c6000[j];
+ break;
+
+ case LOW:
+ buffer[bufcnt++] = ~c3000[j];
+ break;
+
+ default:
+ buffer[bufcnt++] = ~0;
+ }
+ if (bufcnt >= BUFLNG) {
+ write(fd, buffer, BUFLNG);
+ bufcnt = 0;
+ }
+ j = (j + increm) % 80;
+ }
+}
+
+
+/*
+ * Generate unmodulated from similar tables.
+ */
+void poop(
+ int pulse, /* pulse length (ms) */
+ int freq, /* frequency (Hz) */
+ int amp, /* amplitude */
+ int inverted /* is upside down */
+ )
+{
+ int increm; /* phase increment */
+ int i, j;
+
+ if (amp == OFF || freq == 0)
+ increm = 10;
+ else
+ increm = freq / 100;
+ j = 0;
+ for (i = 0 ; i < pulse * 8; i++) {
+ switch (amp) {
+
+ case HIGH:
+ if (inverted)
+ buffer[bufcnt++] = ~u3000[j];
+ else
+ buffer[bufcnt++] = ~u6000[j];
+ break;
+
+ case LOW:
+ if (inverted)
+ buffer[bufcnt++] = ~u6000[j];
+ else
+ buffer[bufcnt++] = ~u3000[j];
+ break;
+
+ default:
+ buffer[bufcnt++] = ~0;
+ }
+ if (bufcnt >= BUFLNG) {
+ write(fd, buffer, BUFLNG);
+ bufcnt = 0;
+ }
+ j = (j + increm) % 80;
+ }
+}
+
+/*
+ * Delay for initial phasing
+ */
+void delay (
+ int Delay /* delay in samples */
+ )
+{
+ int samples; /* samples remaining */
+
+ samples = Delay;
+ memset(buffer, 0, BUFLNG);
+ while (samples >= BUFLNG) {
+ write(fd, buffer, BUFLNG);
+ samples -= BUFLNG;
+ }
+ write(fd, buffer, samples);
+}
+
+
+/* Calc day of year from year month & day */
+/* Year - 0 means 2000, 100 means 2100. */
+/* Month - 1 means January, 12 means December. */
+/* DayOfMonth - 1 is first day of month */
+int
+ConvertMonthDayToDayOfYear (int YearValue, int MonthValue, int DayOfMonthValue)
+ {
+ int ReturnValue;
+ int LeapYear;
+ int MonthCounter;
+
+ /* Array of days in a month. Note that here January is zero. */
+ /* NB: have to add 1 to days in February in a leap year! */
+ int DaysInMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+
+
+ LeapYear = FALSE;
+ if ((YearValue % 4) == 0)
+ {
+ if ((YearValue % 100) == 0)
+ {
+ if ((YearValue % 400) == 0)
+ {
+ LeapYear = TRUE;
+ }
+ }
+ else
+ {
+ LeapYear = TRUE;
+ }
+ }
+
+ if (Debug)
+ printf ("\nConvertMonthDayToDayOfYear(): Year %d %s a leap year.\n", YearValue+2000, LeapYear ? "is" : "is not");
+
+ /* Day of month given us starts in this algorithm. */
+ ReturnValue = DayOfMonthValue;
+
+ /* Add in days in month for each month past January. */
+ for (MonthCounter=1; MonthCounter<MonthValue; MonthCounter++)
+ {
+ ReturnValue += DaysInMonth [ MonthCounter - 1 ];
+ }
+
+ /* Add a day for leap years where we are past February. */
+ if ((LeapYear) && (MonthValue > 2))
+ {
+ ReturnValue++;
+ }
+
+ if (Debug)
+ printf ("\nConvertMonthDayToDayOfYear(): %4.4d-%2.2d-%2.2d represents day %3d of year.\n",
+ YearValue+2000, MonthValue, DayOfMonthValue, ReturnValue);
+
+ return (ReturnValue);
+ }
+
+
+void
+Help ( void )
+ {
+ printf ("\n\nTime Code Generation - IRIG-B or WWV, v%d.%d, %s dmw", VERSION, ISSUE, ISSUE_DATE);
+ printf ("\n\nRCS Info:");
+ printf ( "\n $Header: /home/dmw/src/IRIG_generation/ntp-4.2.2p3/util/RCS/tg.c,v 1.28 2007/02/12 23:57:45 dmw Exp $");
+ printf ("\n\nUsage: %s [option]*", CommandName);
+ printf ("\n\nOptions: -a device_name Output audio device name (default /dev/audio)");
+ printf ( "\n -b yymmddhhmm Remove leap second at end of minute specified");
+ printf ( "\n -c seconds_to_send Number of seconds to send (default 0 = forever)");
+ printf ( "\n -d Start with IEEE 1344 DST active");
+ printf ( "\n -f format_type i = Modulated IRIG-B 1998 (no year coded)");
+ printf ( "\n 2 = Modulated IRIG-B 2002 (year coded)");
+ printf ( "\n 3 = Modulated IRIG-B w/IEEE 1344 (year & control funcs) (default)");
+ printf ( "\n 4 = Unmodulated IRIG-B w/IEEE 1344 (year & control funcs)");
+ printf ( "\n 5 = Inverted unmodulated IRIG-B w/IEEE 1344 (year & control funcs)");
+ printf ( "\n w = WWV(H)");
+ printf ( "\n -g yymmddhhmm Switch into/out of DST at beginning of minute specified");
+ printf ( "\n -i yymmddhhmm Insert leap second at end of minute specified");
+ printf ( "\n -j Disable time rate correction against system clock (default enabled)");
+ printf ( "\n -k nn Force rate correction for testing (+1 = add cycle, -1 = remove cycle)");
+ printf ( "\n -l time_offset Set offset of time sent to UTC as per computer, +/- float hours");
+ printf ( "\n -o time_offset Set IEEE 1344 time offset, +/-, to 0.5 hour (default 0)");
+ printf ( "\n -q quality_code_hex Set IEEE 1344 quality code (default 0)");
+ printf ( "\n -r sample_rate Audio sample rate (default 8000)");
+ printf ( "\n -s Set leap warning bit (WWV[H] only)");
+ printf ( "\n -t sync_frequency WWV(H) on-time pulse tone frequency (default 1200)");
+ printf ( "\n -u DUT1_offset Set WWV(H) DUT1 offset -7 to +7 (default 0)");
+#ifndef HAVE_SYS_SOUNDCARD_H
+ printf ( "\n -v initial_output_level Set initial output level (default %d, must be 0 to 255)", AUDIO_MAX_GAIN/8);
+#endif
+ printf ( "\n -x Turn off verbose output (default on)");
+ printf ( "\n -y yymmddhhmmss Set initial date and time as specified (default system time)");
+ printf ("\n\nThis software licenced under the GPL, modifications performed 2006 & 2007 by Dean Weiten");
+ printf ( "\nContact: Dean Weiten, Norscan Instruments Ltd., Winnipeg, MB, Canada, ph (204)-233-9138, E-mail dmw@norscan.com");
+ printf ("\n\n");
+ }
+
+/* Reverse string order for nicer print. */
+void
+ReverseString(char *str)
+ {
+ int StringLength;
+ int IndexCounter;
+ int CentreOfString;
+ char TemporaryCharacter;
+
+
+ StringLength = strlen(str);
+ CentreOfString = (StringLength/2)+1;
+ for (IndexCounter = StringLength; IndexCounter >= CentreOfString; IndexCounter--)
+ {
+ TemporaryCharacter = str[IndexCounter-1];
+ str[IndexCounter-1] = str[StringLength-IndexCounter];
+ str[StringLength-IndexCounter] = TemporaryCharacter;
+ }
+ }
+
diff --git a/util/tickadj.c b/util/tickadj.c
index 7bfde4d28864..d54e9e6844ab 100644
--- a/util/tickadj.c
+++ b/util/tickadj.c
@@ -21,9 +21,12 @@
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
-#ifdef HAVE___ADJTIMEX /* Linux */
+#ifdef HAVE_SYS_TIMEX_H
+# include <sys/timex.h>
+#endif
+
+#ifdef HAVE_ADJTIMEX /* Linux */
-#include <sys/timex.h>
struct timex txc;
#if 0
@@ -57,9 +60,9 @@ main(
txc.tickadj = i;
txc.modes |= ADJ_TICKADJ;
} else {
- (void) fprintf(stderr,
- "%s: unlikely value for tickadj: %s\n",
- progname, ntp_optarg);
+ fprintf(stderr,
+ "%s: unlikely value for tickadj: %s\n",
+ progname, ntp_optarg);
errflg++;
}
break;
@@ -91,7 +94,7 @@ main(
}
if (!errflg) {
- if (__adjtimex(&txc) < 0)
+ if (adjtimex(&txc) < 0)
perror("adjtimex");
else if (!quiet)
printf("tick = %ld\ntick_adj = %d\n",
@@ -145,8 +148,8 @@ main(
#endif
#endif
}
-
- if (__adjtimex(&txc) < 0)
+
+ if (adjtimex(&txc) < 0)
{
perror("adjtimex");
}
@@ -163,7 +166,7 @@ main(
}
#endif
-#else /* not Linux... kmem tweaking: */
+#else /* not Linux... kmem tweaking: */
#ifdef HAVE_SYS_FILE_H
# include <sys/file.h>
@@ -213,7 +216,6 @@ main(
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
char *progname;
-volatile int debug;
int dokmem = 1;
int writetickadj = 0;
@@ -256,6 +258,8 @@ main(
int recommend_tickadj;
long tmp;
+ init_lib();
+
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "a:Adkpqst:")) != EOF)
{
diff --git a/version b/version
deleted file mode 100644
index 590a0a6895e6..000000000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-1.2349
diff --git a/version.m4 b/version.m4
deleted file mode 100644
index 3b6882961ff5..000000000000
--- a/version.m4
+++ /dev/null
@@ -1 +0,0 @@
-m4_define([VERSION_NUMBER],[4.2.6p5])